!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Cesium={})}(this,(function(exports){"use strict";var factory;function e$1Z(e){return(0===e.length||"/"!==e[e.length-1])&&(e+="/"),e}function t$$(e){return null!=e}function t$_(e){var t;this.name="DeveloperError",this.message=e;try{throw new Error}catch(e){t=e.stack}this.stack=t}factory=function(){var e,t;e=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=t(void 0,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();var n=1,r=function(e,t){var i=t.pixelRatio,n=t.version,r=t.stretchX,o=t.stretchY,a=t.content;this.paddedRect=e,this.pixelRatio=i,this.stretchX=r,this.stretchY=o,this.content=a,this.version=n},o={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};o.tl.get=function(){return[this.paddedRect.x+n,this.paddedRect.y+n]},o.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-n,this.paddedRect.y+this.paddedRect.h-n]},o.tlbr.get=function(){return this.tl.concat(this.br)},o.displaySize.get=function(){return[(this.paddedRect.w-2*n)/this.pixelRatio,(this.paddedRect.h-2*n)/this.pixelRatio]},Object.defineProperties(r.prototype,o);var a,s=(a=!0,function(e,t){var i=a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return a=!1,i}),l=s(void 0,(function(){return l.toString().search("(((.+)+)+)+$").toString().constructor(l).search("(((.+)+)+)+$")}));l();var u=function(e,t){c(this,e,4,t)};function c(e,t,i,n){var r=t.width,o=t.height;if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==r*o*i)throw new RangeError("mismatched image size")}else n=new Uint8Array(r*o*i);return e.width=r,e.height=o,e.data=n,e}function h(e,t,i){var n=t.width,r=t.height;if(n!==e.width||r!==e.height){var o=c({},{width:n,height:r},i);d(e,o,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,n),height:Math.min(e.height,r)},i),e.width=n,e.height=r,e.data=o.data}}function d(e,t,i,n,r,o){if(0===r.width||0===r.height)return t;if(r.width>e.width||r.height>e.height||i.x>e.width-r.width||i.y>e.height-r.height)return console.log("out of range source coordinates for image copy"),t;if(r.width>t.width||r.height>t.height||n.x>t.width-r.width||n.y>t.height-r.height)return console.log("out of range destination coordinates for image copy"),t;for(var a=e.data,s=t.data,l=0;l=0;d--){var f=a[d];if(!(h.w>f.w||h.h>f.h)){if(h.x=f.x,h.y=f.y,l=Math.max(l,h.y+h.h),s=Math.max(s,h.x+h.w),h.w===f.w&&h.h===f.h){var p=a.pop();d255?255:e}function w(e){return e<0?0:e>1?1:e}function C(e){return"%"===e[e.length-1]?S(parseFloat(e)/100*255):S(parseInt(e))}function T(e){return"%"===e[e.length-1]?w(parseFloat(e)/100):w(parseFloat(e))}function P(e,t,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?e+(t-e)*i*6:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function E(e){var t,i=e.replace(/ /g,"").toLowerCase();if(i in b)return b[i].slice();if("#"===i[0])return 4===i.length?(t=parseInt(i.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===i.length&&(t=parseInt(i.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var n=i.indexOf("("),r=i.indexOf(")");if(-1!==n&&r+1===i.length){var o=i.substr(0,n),a=i.substr(n+1,r-(n+1)).split(","),s=1;switch(o){case"rgba":if(4!==a.length)return null;s=T(a.pop());case"rgb":return 3!==a.length?null:[C(a[0]),C(a[1]),C(a[2]),s];case"hsla":if(4!==a.length)return null;s=T(a.pop());case"hsl":if(3!==a.length)return null;var l=(parseFloat(a[0])%360+360)%360/360,u=T(a[1]),c=T(a[2]),h=c<=.5?c*(u+1):c+u-c*u,d=2*c-h;return[S(255*P(d,h,l+1/3)),S(255*P(d,h,l)),S(255*P(d,h,l-1/3)),s];default:return null}}return null}const A=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),L=A(void 0,(function(){return L.toString().search("(((.+)+)+)+$").toString().constructor(L).search("(((.+)+)+)+$")}));L();class M{constructor(e,t,i,n=1){this.r=e,this.g=t,this.b=i,this.a=n}static parse(e){if(!e)return;if(e instanceof M)return e;if("string"!=typeof e)return;const t=E(e);return t?new M(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3]):void 0}toString(){const[e,t,i,n]=this.toArray();return"rgba("+Math.round(e)+","+Math.round(t)+","+Math.round(i)+","+n+")"}toArray(){const{r:e,g:t,b:i,a:n}=this;return 0===n?[0,0,0,0]:[255*e/n,255*t/n,255*i/n,n]}}M.black=new M(0,0,0,1),M.white=new M(1,1,1,1),M.transparent=new M(0,0,0,0),M.red=new M(1,0,0,1);var I={kind:"null"},O={kind:"number"},D={kind:"string"},R={kind:"boolean"},N={kind:"color"},F={kind:"object"},B={kind:"value"},z={kind:"formatted"},G={kind:"resolvedImage"};function k(e,t){var i,n=(i=!0,function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}),r=n(this,(function(){return r.toString().search("(((.+)+)+)+$").toString().constructor(r).search("(((.+)+)+)+$")}));return r(),{kind:"array",itemType:e,N:t}}function U(e){if("array"===e.kind){var t=U(e.itemType);return"number"==typeof e.N?"array<"+t+", "+e.N+">":"value"===e.itemType.kind?"array":"array<"+t+">"}return e.kind}var V=[I,O,D,R,N,z,F,k(B),G];function W(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!W(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var i=0,n=V;i=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof i&&i>=0&&i<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[e,t,i,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[e,t,i,n]:[e,t,i]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."},xe.isValue=function(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof M)return!0;if(e instanceof q)return!0;if(e instanceof ie)return!0;if(e instanceof ae)return!0;if(Array.isArray(e)){for(var t=0,i=e;t2){var s=e[1];if("string"!=typeof s||!(s in Me)||"object"===s)return t.error('The item type argument of "array" must be one of string, number, boolean',1);o=Me[s],n++}else o=Ae;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);a=e[2],n++}i=Le(o,a)}else i=Me[r];for(var l=[];n1)&&t.push(n)}}return t.concat(this.args.map((function(e){return e.serialize()})))};var Oe,De=(Oe=!0,function(e,t){var i=Oe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Oe=!1,i}),Re=De(void 0,(function(){return Re.toString().search("(((.+)+)+)+$").toString().constructor(Re).search("(((.+)+)+)+$")}));Re();var Ne={kind:"number"},Fe={kind:"value"};function Be(e,t){return{kind:"array",itemType:e,N:t}}var ze=function(e,t,i){this.type=e,this.index=t,this.input=i};ze.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1,Ne),n=t.parse(e[2],2,Be(t.expectedType||Fe));if(!i||!n)return null;var r=n.type;return new ze(r.itemType,i,n)},ze.prototype.evaluate=function(e){var t=this.index.evaluate(e),i=this.input.evaluate(e);if(t<0)throw new RuntimeError("Array index out of bounds: "+t+" < 0.");if(t>=i.length)throw new RuntimeError("Array index out of bounds: "+t+" > "+(i.length-1)+".");if(t!==Math.floor(t))throw new RuntimeError("Array index must be an integer, but found "+t+" instead.");return i[t]},ze.prototype.eachChild=function(e){e(this.index),e(this.input)},ze.prototype.possibleOutputs=function(){return[void 0]},ze.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Ge,ke=(Ge=!0,function(e,t){var i=Ge?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ge=!1,i}),Ue=ke(void 0,(function(){return Ue.toString().search("(((.+)+)+)+$").toString().constructor(Ue).search("(((.+)+)+)+$")}));Ue();var Ve={kind:"boolean"},We=function(e,t,i){this.type=e,this.branches=t,this.otherwise=i};We.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found only "+(e.length-1)+".");if(e.length%2!=0)return t.error("Expected an odd number of arguments.");var i;t.expectedType&&"value"!==t.expectedType.kind&&(i=t.expectedType);for(var n=[],r=1;r4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":validateRGBA(t[0],t[1],t[2],t[3])))return new M(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new RuntimeError(i||"Could not parse color from value '"+("string"==typeof t?t:String(JSON.stringify(t)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,l=this.args;si}function xt(e,t,i){return t<=i}function bt(e,t,i){return t>=i}function St(e,t,i,n){return 0===n.compare(t,i)}function wt(e,t,i,n){return!St(0,t,i,n)}function Ct(e,t,i,n){return n.compare(t,i)<0}function Tt(e,t,i,n){return n.compare(t,i)>0}function Pt(e,t,i,n){return n.compare(t,i)<=0}function Et(e,t,i,n){return n.compare(t,i)>=0}function At(e,t,i){var n,r=(n=!0,function(e,t){var i=n?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}),o="=="!==e&&"!="!==e;return function(){var n=r(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function a(e,t,i){this.type=ft,this.lhs=e,this.rhs=t,this.collator=i,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}return n(),a.parse=function(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");var i=e[0],n=t.parse(e[1],1,pt);if(!n)return null;if(!mt(i,n.type))return t.concat(1).error('"'+i+"\" comparisons are not supported for type '"+toString(n.type)+"'.");var r=t.parse(e[2],2,pt);if(!r)return null;if(!mt(i,r.type))return t.concat(2).error('"'+i+"\" comparisons are not supported for type '"+toString(r.type)+"'.");if(n.type.kind!==r.type.kind&&"value"!==n.type.kind&&"value"!==r.type.kind)return t.error("Cannot compare types '"+toString(n.type)+"' and '"+toString(r.type)+"'.");o&&("value"===n.type.kind&&"value"!==r.type.kind?n=new Ie(r.type,[n]):"value"!==n.type.kind&&"value"===r.type.kind&&(r=new Ie(n.type,[r])));var s=null;if(4===e.length){if("string"!==n.type.kind&&"string"!==r.type.kind&&"value"!==n.type.kind&&"value"!==r.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,_t)))return null}return new a(n,r,s)},a.prototype.evaluate=function(n){var r=this.lhs.evaluate(n),a=this.rhs.evaluate(n);if(o&&this.hasUntypedArgument){var s=xe.typeOf(r),l=xe.typeOf(a);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new RuntimeError('Expected arguments for "'+e+'" to be (string, string) or (number, number), but found ('+s.kind+", "+l.kind+") instead.")}if(this.collator&&!o&&this.hasUntypedArgument){var u=xe.typeOf(r),c=xe.typeOf(a);if("string"!==u.kind||"string"!==c.kind)return t(n,r,a)}return this.collator?i(n,r,a,this.collator.evaluate(n)):t(n,r,a)},a.prototype.eachChild=function(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)},a.prototype.possibleOutputs=function(){return[!0,!1]},a.prototype.serialize=function(){var t=[e];return this.eachChild((function(e){t.push(e.serialize())})),t},a}()}var Lt={};Lt.Equals=At("==",$t,St),Lt.NotEquals=At("!=",gt,wt),Lt.LessThan=At("<",yt,Ct),Lt.GreaterThan=At(">",vt,Tt),Lt.LessThanOrEqual=At("<=",xt,Pt),Lt.GreaterThanOrEqual=At(">=",bt,Et);var Mt,It=(Mt=!0,function(e,t){var i=Mt?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Mt=!1,i}),Ot=It(void 0,(function(){return Ot.toString().search("(((.+)+)+)+$").toString().constructor(Ot).search("(((.+)+)+)+$")}));Ot();var Dt={kind:"number"},Rt={kind:"string"},Nt={kind:"color"},Ft={kind:"value"},Bt={kind:"formatted"},zt={kind:"resolvedImage"};function Gt(e,t){return{kind:"array",itemType:e,N:t}}var kt=function(e){this.type=Bt,this.sections=e};kt.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i=e[1];if(!Array.isArray(i)&&"object"==typeof i)return t.error("First argument must be an image or text section.");for(var n=[],r=!1,o=1;o<=e.length-1;++o){var a=e[o];if(r&&"object"==typeof a&&!Array.isArray(a)){r=!1;var s=null;if(a["font-scale"]&&!(s=t.parse(a["font-scale"],1,Dt)))return null;var l=null;if(a["text-font"]&&!(l=t.parse(a["text-font"],1,Gt(Rt))))return null;var u=null;if(a["text-color"]&&!(u=t.parse(a["text-color"],1,Nt)))return null;var c=n[n.length-1];c.scale=s,c.font=l,c.textColor=u}else{var h=t.parse(e[o],1,Ft);if(!h)return null;var d=h.type.kind;if("string"!==d&&"value"!==d&&"null"!==d&&"resolvedImage"!==d)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");r=!0,n.push({content:h,scale:null,font:null,textColor:null})}}return new kt(n)},kt.prototype.evaluate=function(e){return new ie(this.sections.map((function(t){var i=t.content.evaluate(e);return xe.typeOf(i)===zt?new Q("",i,null,null,null):new Q(xe.toString$1(i),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)})))},kt.prototype.eachChild=function(e){for(var t=0,i=this.sections;t-1&&(i=!0),new ae({name:t,available:i})},jt.prototype.eachChild=function(e){e(this.input)},jt.prototype.possibleOutputs=function(){return[void 0]},jt.prototype.serialize=function(){return["image",this.input.serialize()]};var qt,Xt=(qt=!0,function(e,t){var i=qt?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return qt=!1,i}),Kt=Xt(void 0,(function(){return Kt.toString().search("(((.+)+)+)+$").toString().constructor(Kt).search("(((.+)+)+)+$")}));Kt();var Zt=function(e,t,i,n,r){this.type=e,this.operator=t,this.interpolation=i,this.input=n,this.labels=[],this.outputs=[];for(var o=0,a=r;o1})))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(r=t.parse(r,2,Jt)))return null;var l=[],u=null;"interpolate-hcl"===i||"interpolate-lab"===i?u=Qt:t.expectedType&&"value"!==t.expectedType.kind&&(u=t.expectedType);for(var c=0;c=h)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var _=t.parse(d,p,u);if(!_)return null;u=u||_.type,l.push([h,_])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new Zt(u,i,n,r,l):t.error("Type "+toString(u)+" is not interpolatable.")},Zt.prototype.evaluate=function(e){var t=this.labels,i=this.outputs;if(1===t.length)return i[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return i[0].evaluate(e);var r=t.length;if(n>=t[r-1])return i[r-1].evaluate(e);var o=findStopLessThanOrEqualTo(t,n),a=t[o],s=t[o+1],l=Zt.interpolationFactor(this.interpolation,n,a,s),u=i[o].evaluate(e),c=i[o+1].evaluate(e);return"interpolate"===this.operator?interpolate[this.type.kind.toLowerCase()](u,c,l):"interpolate-hcl"===this.operator?hcl.reverse(hcl.interpolate(hcl.forward(u),hcl.forward(c),l)):lab.reverse(lab.interpolate(lab.forward(u),lab.forward(c),l))},Zt.prototype.eachChild=function(e){e(this.input);for(var t=0,i=this.outputs;t=0},ui.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},ui.prototype.possibleOutputs=function(){return[!0,!1]},ui.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var ci,hi=(ci=!0,function(e,t){var i=ci?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ci=!1,i}),di=hi(void 0,(function(){return di.toString().search("(((.+)+)+)+$").toString().constructor(di).search("(((.+)+)+)+$")}));di();var fi=function(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t};fi.prototype.evaluate=function(e){return this.result.evaluate(e)},fi.prototype.eachChild=function(e){for(var t=0,i=this.bindings;tNumber.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof d&&Math.floor(d)!==d)return u.error("Numeric branch labels must be integer values.");if(i){if(u.checkSubtype(i,xe.typeOf(d)))return null}else i=xe.typeOf(d);if(void 0!==r[String(d)])return u.error("Branch labels must be unique.");r[String(d)]=o.length}var f=t.parse(l,a,n);if(!f)return null;n=n||f.type,o.push(f)}var p=t.parse(e[1],1,Ti);if(!p)return null;var _=t.parse(e[e.length-1],e.length-1,n);return _?"value"!==p.type.kind&&t.concat(1).checkSubtype(i,p.type)?null:new Pi(i,n,p,r,o,_):null},Pi.prototype.evaluate=function(e){var t=this.input.evaluate(e);return(xe.typeOf(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},Pi.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},Pi.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},Pi.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],i=[],n={},r=0,o=Object.keys(this.cases).sort();rt))throw new RuntimeError("Input is not a number.");a=s-1}return 0}Ni();var Bi,zi=(Bi=!0,function(e,t){var i=Bi?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Bi=!1,i}),Gi=zi(void 0,(function(){return Gi.toString().search("(((.+)+)+)+$").toString().constructor(Gi).search("(((.+)+)+)+$")}));Gi();var ki={kind:"number"},Ui=function(e,t,i){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var n=0,r=i;n=a)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var c=t.parse(s,u,r);if(!c)return null;r=r||c.type,n.push([a,c])}return new Ui(r,i,n)},Ui.prototype.evaluate=function(e){var t=this.labels,i=this.outputs;if(1===t.length)return i[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return i[0].evaluate(e);var r=t.length;return n>=t[r-1]?i[r-1].evaluate(e):i[Fi(t,n)].evaluate(e)},Ui.prototype.eachChild=function(e){e(this.input);for(var t=0,i=this.outputs;t0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var Vi,Wi=(Vi=!0,function(e,t){var i=Vi?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Vi=!1,i}),Hi=Wi(void 0,(function(){return Hi.toString().search("(((.+)+)+)+$").toString().constructor(Hi).search("(((.+)+)+)+$")}));Hi();var Yi=function(e,t){this.type=t.type,this.name=e,this.boundExpression=t};Yi.parse=function(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");var i=e[1];return t.scope.has(i)?new Yi(i,t.scope.get(i)):t.error('Unknown variable "'+i+'". Make sure "'+i+'" has been bound in an enclosing "let" expression before using it.',1)},Yi.prototype.evaluate=function(e){return this.boundExpression.evaluate(e)},Yi.prototype.eachChild=function(){},Yi.prototype.possibleOutputs=function(){return[void 0]},Yi.prototype.serialize=function(){return["var",this.name]};var ji,qi=(ji=!0,function(e,t){var i=ji?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ji=!1,i}),Xi=qi(void 0,(function(){return Xi.toString().search("(((.+)+)+)+$").toString().constructor(Xi).search("(((.+)+)+)+$")}));Xi();var Ki,Zi={"==":Lt.Equals,"!=":Lt.NotEquals,">":Lt.GreaterThan,"<":Lt.LessThan,">=":Lt.GreaterThanOrEqual,"<=":Lt.LessThanOrEqual,array:Ie,at:ze,boolean:Ie,case:We,coalesce:Xe,collator:dt,format:kt,image:jt,in:ui,interpolate:Zt,"interpolate-hcl":Zt,"interpolate-lab":Zt,length:gi,let:fi,literal:bi,match:Pi,number:Ie,"number-format":Oi,object:Ie,step:Ui,string:Ie,"to-boolean":ot,"to-color":ot,"to-number":ot,"to-string":ot,var:Yi},Ji=(Ki=!0,function(e,t){var i=Ki?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ki=!1,i}),Qi=Ji(void 0,(function(){return Qi.toString().search("(((.+)+)+)+$").toString().constructor(Qi).search("(((.+)+)+)+$")}));function en(){}Qi();var tn={};for(var nn in en.register=function(e,t,i){void 0===i&&(i={}),Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}),tn[e]={klass:t,omit:i.omit||[],shallow:i.shallow||[]}},en.register("Object",Object),en.register("Color",M),en.register("Error",Error),en.register("ResolvedImage",ae),en.register("ImageAtlas",g),en.register("ImagePosition",r),en.register("RGBAImage",u),en.register("Formatted",ie),en.register("FormattedSection",Q),Zi)Zi[nn]._classRegistryKey||en.register("Expression_"+nn,Zi[nn]);function rn(e){return e&&"undefined"!=typeof ArrayBuffer&&(e instanceof ArrayBuffer||e.constructor&&"ArrayBuffer"===e.constructor.name)}en.serialize=function(e,t){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp)return e;if(rn(e))return t&&t.push(e),e;if(ArrayBuffer.isView(e)){var i=e;return t&&t.push(i.buffer),i}if(e instanceof ImageData)return t&&t.push(e.data.buffer),e;if(Array.isArray(e)){for(var n=[],r=0,o=e;r=0)){var h=e[c];"function"!=typeof h&&(u[c]=tn[l].shallow.indexOf(c)>=0?h:en.serialize(h,t))}e instanceof Error&&(u.message=e.message)}if(u.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==l&&(u.$name=l),u}throw new Error("can't serialize object of type "+typeof e)},en.deserialize=function(e){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||rn(e)||ArrayBuffer.isView(e)||e instanceof ImageData)return e;if(Array.isArray(e))return e.map(en.deserialize);if("object"==typeof e){var t=e.$name||"Object",i=tn[t].klass;if(!i)throw new Error("can't deserialize unregistered class "+t);if(i.deserialize)return i.deserialize(e);for(var n=Object.create(i.prototype),r=0,o=Object.keys(e);r=0?s:en.deserialize(s)}}return n}throw new Error("can't deserialize object of type "+typeof e)};var on,an=(on=!0,function(e,t){var i=on?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return on=!1,i}),sn=an(void 0,(function(){return sn.toString().search("(((.+)+)+)+$").toString().constructor(sn).search("(((.+)+)+)+$")}));function ln(e){this._callback=e,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._callback()})}sn(),ln.prototype.trigger=function(){!this._triggered&&(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._callback()}),0))};const un=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),cn=un(void 0,(function(){return cn.toString().search("(((.+)+)+)+$").toString().constructor(cn).search("(((.+)+)+)+$")}));function hn(e,t){e.forEach((function(e){t[e]&&(t[e]=t[e].bind(t))}))}function dn(e,t,i){this.target=e,this.parent=t,this.mapId=i,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},hn(["receive","process"],this),this.invoker=new ln(this.process),this.target.addEventListener("message",this.receive,!1)}cn(),dn.prototype.send=function(e,t,i,n){const r=++dn.taskId;i&&(this.callbacks[r]=i);const o=[];return this.target.postMessage({id:r,type:e,hasCallback:!!i,targetMapId:n,sourceMapId:this.mapId,data:en.serialize(t,o)},o),{cancel:()=>{i&&delete this.callbacks[r],this.target.postMessage({id:r,type:"",targetMapId:n,sourceMapId:this.mapId})}}},dn.prototype.receive=function(e){const t=e.data,i=t.id;if(i&&(!t.targetMapId||this.mapId===t.targetMapId))if(""===t.type){delete this.tasks[i];const e=this.cancelCallbacks[i];delete this.cancelCallbacks[i],e&&e()}else this.tasks[i]=t,this.taskQueue.push(i),this.invoker.trigger()},dn.prototype.process=function(){if(!this.taskQueue.length)return;const e=this.taskQueue.shift(),t=this.tasks[e];if(delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),t)if(""===t.type){const i=this.callbacks[e];delete this.callbacks[e],i&&(t.error?i(en.deserialize(t.error)):i(null,en.deserialize(t.data)))}else{let i=!1;const n=t.hasCallback?(t,n)=>{i=!0,delete this.cancelCallbacks[e];const r=[];this.target.postMessage({id:e,type:"",sourceMapId:this.mapId,error:t?en.serialize(t):null,data:en.serialize(n,r)},r)}:e=>{i=!0};let r=null;const o=en.deserialize(t.data);if(this.parent[t.type])r=this.parent[t.type](t.sourceMapId,o,n);else if(this.parent.getWorkerSource){const e=t.type.split(".");r=this.parent.getWorkerSource(t.sourceMapId,e[0],o.source)[e[1]](o,n)}else n(new Error("Could not find function "+t.type));!i&&r&&r.cancel&&(this.cancelCallbacks[e]=r.cancel)}},dn.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)},dn.taskId=0;var fn,pn=(fn=!0,function(e,t){var i=fn?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return fn=!1,i}),_n=pn(void 0,(function(){return _n.toString().search("(((.+)+)+)+$").toString().constructor(_n).search("(((.+)+)+)+$")}));_n();var mn=function(e,t){void 0===t&&(t=[]),this.parent=e,this.bindings={};for(var i=0,n=t;i=0)return!1;var i=!0;return e.eachChild((function(e){i&&!Tn.isGlobalPropertyConstant(e,t)&&(i=!1)})),i};var Pn,En=(Pn=!0,function(e,t){var i=Pn?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Pn=!1,i}),An=En(void 0,(function(){return An.toString().search("(((.+)+)+)+$").toString().constructor(An).search("(((.+)+)+)+$")}));An();var Ln=function(e,t,i,n,r){void 0===t&&(t=[]),void 0===n&&(n=new mn),void 0===r&&(r=[]),this.registry=e,this.path=t,this.key=t.map((function(e){return"["+e+"]"})).join(""),this.scope=n,this.errors=r,this.expectedType=i};function Mn(e,t){const i=t[e];return void 0===i?null:i}Ln.prototype.parse=function(e,t,i,n,r){return void 0===r&&(r={}),t?this.concat(t,i,n)._parse(e,r):this._parse(e,r)},Ln.prototype._parse=function(e,t){function i(e,t,i){return"assert"===i?new Ie(t,[e]):"coerce"===i?new ot(t,[e]):e}if((null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e)&&(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=e[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var r=this.registry[n];if(r){var o=r.parse(e,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=i(o,a,t.typeAnnotation||"coerce");else o=i(o,a,t.typeAnnotation||"assert")}return!(o instanceof bi)&&o.type.kind,o}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===e?this.error("'undefined' value invalid. Use null instead."):"object"==typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof e+" instead.")},Ln.prototype.concat=function(e,t,i){var n="number"==typeof e?this.path.concat(e):this.path,r=i?this.scope.concat(i):this.scope;return new Ln(this.registry,n,t||null,r,this.errors)},Ln.prototype.error=function(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];var n=""+this.key+t.map((function(e){return"["+e+"]"})).join("");this.errors.push(new gn(n,e))},Ln.prototype.checkSubtype=function(e,t){var i=W(e,t);return i&&this.error(i),i};var In=function(e,t,i,n){this.name=e,this.type=t,this._evaluate=i,this.args=n};function On(e){return Array.isArray(e)?"("+e.map(toString).join(", ")+")":"("+toString(e.type)+"...)"}In.prototype.evaluate=function(e,t){return this._evaluate(e,this.args,t)},In.prototype.eachChild=function(e){this.args.forEach(e)},In.prototype.possibleOutputs=function(){return[void 0]},In.prototype.serialize=function(){return[this.name].concat(this.args.map((function(e){return e.serialize()})))},In.parse=function(e,t){var i,n=e[0],r=In.definitions[n];if(!r)return t.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(r)?r[0]:r.type,a=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,s=a.filter((function(t){var i=t[0];return!Array.isArray(i)||i.length===e.length-1})),l=null,u=0,c=s;u-1))}],"filter-type-==":[Nn,[Rn],function(e,t){var i=t[0];return e.geometryType()===i.value}],"filter-<":[Nn,[Rn,zn],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),$=m[1],g=(d=e.properties()[m[2]],m[3]);r="left"==$?d.substring(0,g):d.substring(d.length-g)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n":[Nn,[Rn,zn],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),$=m[1],g=(d=e.properties()[m[2]],m[3]);r="left"==$?d.substring(0,g):d.substring(d.length-g)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n>r}],"filter-id->":[Nn,[zn],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n>r}],"filter-<=":[Nn,[Rn,zn],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),$=m[1],g=(d=e.properties()[m[2]],m[3]);r="left"==$?d.substring(0,g):d.substring(d.length-g)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n<=r}],"filter-id-<=":[Nn,[zn],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n<=r}],"filter->=":[Nn,[Rn,zn],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),$=m[1],g=(d=e.properties()[m[2]],m[3]);r="left"==$?d.substring(0,g):d.substring(d.length-g)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n>=r}],"filter-id->=":[Nn,[zn],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n>=r}],"filter-has":[Nn,[zn],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[Nn,[],function(e){return null!==e.id()}],"filter-type-in":[Nn,[Un(Rn)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[Nn,[Un(zn)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[Nn,[Rn,Un(zn)],function(e,t){var i=t[0];return t[1].value.indexOf(e.properties()[i.value])>=0}],"filter-in-large":[Nn,[Rn,Un(zn)],function(e,t){var i=t[0],n=t[1];return binarySearch(e.properties()[i.value],n.value,0,n.value.length-1)}],all:{type:Nn,overloads:[[[Nn,Nn],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)&&n.evaluate(e)}],[Vn(Nn),function(e,t){for(var i=0,n=t;i-1}function ir(e){return!!e.expression&&e.expression.interpolated}Qn();var nr,rr=(nr=!0,function(e,t){var i=nr?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return nr=!1,i}),or=rr(void 0,(function(){return or.toString().search("(((.+)+)+)+$").toString().constructor(or).search("(((.+)+)+)+$")}));function ar(){}function sr(e){return{result:"success",value:e}}function lr(e){return{result:"error",value:e}}or(),ar.isExpression=function(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in Zi};var ur={kind:"number"},cr={kind:"string"},hr={kind:"boolean"},dr={kind:"color"},fr={kind:"value"},pr={kind:"formatted"},_r={kind:"resolvedImage"};function mr(e,t){return{kind:"array",itemType:e,N:t}}function $r(e){var t=null;if(e instanceof fi)t=$r(e.result);else if(e instanceof Xe){for(var i of e.args)if(t=$r(i))break}else(e instanceof Ui||e instanceof Zt)&&e.input instanceof Ln.CompoundExpression&&"zoom"===e.input.name&&(t=e);return t instanceof gn||e.eachChild((e=>{var i=$r(e);i instanceof gn?t=i:!t&&i?t=new gn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&i&&t!==i&&(t=new gn("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),t}function gr(e){var t={color:dr,string:cr,number:ur,enum:cr,boolean:hr,formatted:pr,resolvedImage:_r};return"array"===e.type?mr(t[e.value]||fr,e.length):t[e.type]}function yr(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function vr(e){return e}function xr(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];for(var n=0,r=t;n=e.stops[r-1][0])return e.stops[r-1][1];var o=Fi(e.stops.map((e=>e[0])),i),a=Lr(i,n,e.stops[o][0],e.stops[o+1][0]),s=e.stops[o][1],l=e.stops[o+1][1],u=interpolate[t.type]||vr;if(e.colorSpace&&"rgb"!==e.colorSpace){var c=colorSpaces[e.colorSpace];u=(e,t)=>c.reverse(c.interpolate(c.forward(e),c.forward(t),a))}return"function"==typeof s.evaluate?{evaluate(...e){var t=s.evaluate.apply(void 0,e),i=l.evaluate.apply(void 0,e);if(void 0!==t&&void 0!==i)return u(t,i,a)}}:u(s,l,a)}function Sr(e,t,i){return"color"===t.type?i=M.parse(i):"formatted"===t.type?i=Formatted.fromString(i.toString()):"resolvedImage"===t.type?i=ResolvedImage.fromString(i.toString()):Ir(i)!==t.type&&("enum"!==t.type||!t.values[i])&&(i=void 0),Ar(i,e.default,t.default)}function wr(e,t){var i=new Ln(Zi,[],t?gr(t):void 0),n=i.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?sr(new qn(n,t)):lr(i.errors)}function Cr(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!Tn.isStateConstant(t.expression)}function Tr(e,t,i,n){this.kind=e,this.zoomStops=i,this._styleExpression=t,this.isStateDependent="camera"!==e&&!Tn.isStateConstant(t.expression),this.interpolationType=n}function Pr(e,t){if("error"===(e=wr(e,t)).result)return e;var i=e.value.expression,n=Tn.isFeatureConstant(i);if(!n&&!er(t))return lr([new gn("","data expressions not supported")]);var r=Tn.isGlobalPropertyConstant(i,["zoom"]);if(!r&&!tr(t))return lr([new gn("","zoom expressions not supported")]);var o=$r(i);if(!o&&!r)return lr([new gn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof gn)return lr([o]);if(o instanceof Zt&&!ir(t))return lr([new gn("",'"interpolate" expressions cannot be used with this property')]);if(!o)return sr(new Cr(n?"constant":"source",e.value));var a=o instanceof Zt?o.interpolation:void 0;return sr(new Tr(n?"camera":"composite",e.value,o.labels,a))}function Er(e,t){var i,n,r,o="color"===t.type,a=e.stops&&"object"==typeof e.stops[0][0],s=a||void 0!==e.property,l=a||!s,u=e.type||(ir(t)?"exponential":"interval");if(o&&((e=xr({},e)).stops&&(e.stops=e.stops.map((function(e){return[e[0],M.parse(e[1])]}))),e.default?e.default=M.parse(e.default):e.default=M.parse(t.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!colorSpaces[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===u)i=br;else if("interval"===u)i=evaluateIntervalFunction;else if("categorical"===u){i=evaluateCategoricalFunction,n=Object.create(null);for(var c=0,h=e.stops;c=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&Array.isArray(e[2]);case"!in":case"!has":case"none":case"crossFields":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":case"like":case"!like":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,i=e.slice(1);tt?1:0}function zr(e){if(!e)return!0;var t=e[0];return e.length<=1?"any"!==t:"=="===t?Gr(e[1],e[2],"=="):"!="===t?Wr(Gr(e[1],e[2],"==")):"<"===t||">"===t||"<="===t||">="===t?Gr(e[1],e[2],t):"any"===t?kr(e.slice(1)):"all"===t?["all"].concat(e.slice(1).map(zr)):"crossFields"===t?["crossFields"].concat(e.slice(1).map(zr)):"none"===t?["all"].concat(e.slice(1).map(zr).map(Wr)):"in"===t?Ur(e[1],e.slice(2)):"!in"===t?Wr(Ur(e[1],e.slice(2))):"has"===t?Vr(e[1]):"!has"===t?Wr(Vr(e[1])):"like"===t?Gr(e[1],e[2],"like"):"!like"!==t||Wr(Gr(e[1],e[2],"like"))}function Gr(e,t,i){switch(e){case"$type":return["filter-type-"+i,t];case"$id":return["filter-id-"+i,t];default:return["filter-"+i,e,t]}}function kr(e){return["any"].concat(e.map(zr))}function Ur(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((function(e){return typeof e!=typeof t[0]}))?["filter-in-large",e,["literal",t.sort(Br)]]:["filter-in-small",e,["literal",t]]}}function Vr(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function Wr(e){return["!",e]}Nr.createFilter=function(e){if(null==e)return function(){return!0};!Nr.isExpressionFilter(e)&&(e=zr(e));var t=ar.createExpression(e,Fr);if("error"===t.result)throw new Error(t.value.map((function(e){return e.key+": "+e.message})).join(", "));return function(e,i){return t.value.evaluate(e,i)}};var Hr,Yr=(Hr=!0,function(e,t){var i=Hr?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Hr=!1,i}),jr=Yr(void 0,(function(){return jr.toString().search("(((.+)+)+)+$").toString().constructor(jr).search("(((.+)+)+)+$")}));jr();const qr=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Xr(e){var t=typeof e;if("number"===t||"boolean"===t||"string"===t||null==e)return JSON.stringify(e);if(Array.isArray(e)){for(var i="[",n=0,r=e;ni?(this.lastIntegerZoom=i+1,this.lastIntegerZoomTime=t):this.lastFloorZoomthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*i}:{fromScale:.5,toScale:1,t:1-(1-i)*t}},en.register("EvaluationParameters",$o);var go,yo=(go=!0,function(e,t){var i=go?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return go=!1,i}),vo=yo(void 0,(function(){return vo.toString().search("(((.+)+)+)+$").toString().constructor(vo).search("(((.+)+)+)+$")}));vo();var xo=8192;function bo(e,t,i){return Math.min(i,Math.max(t,e))}function So(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));return n(),{min:-1*Math.pow(2,e-1),max:Math.pow(2,e-1)-1}}var wo=So(15);function Co(e){for(var t=xo/e.extent,i=e.loadGeometry(),n=0;nwo.max||a.ywo.max)&&(a.x=bo(a.x,wo.min,wo.max),a.y=bo(a.y,wo.min,wo.max))}return i}var To,Po=(To=!0,function(e,t){var i=To?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return To=!1,i}),Eo=Po(void 0,(function(){return Eo.toString().search("(((.+)+)+)+$").toString().constructor(Eo).search("(((.+)+)+)+$")}));Eo();var Ao=function(e){void 0===e&&(e=[]),this.segments=e};Ao.prototype.prepareSegment=function(e,t,i,n){var r=this.segments[this.segments.length-1];return(!r||r.vertexLength+e>Ao.MAX_VERTEX_ARRAY_LENGTH||r.sortKey!==n)&&(r={vertexOffset:t.length,primitiveOffset:i.length,vertexLength:0,primitiveLength:0},void 0!==n&&(r.sortKey=n),this.segments.push(r)),r},Ao.prototype.get=function(){return this.segments},Ao.prototype.destroy=function(){for(var e=0,t=this.segments;ethis.capacity){this.capacity=Math.max(e,Math.floor(this.capacity*Do),Oo),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var t=this.uint8;this._refreshViews(),t&&(0==t.length&&console.log("oldUint8Array.length == 0"),this.uint8.set(t))}},Ro.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var No=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.int16[n+0]=t,this.int16[n+1]=i,e},t}(Ro);No.prototype.bytesPerElement=4,en.register("StructArrayLayout2i4",No);var Fo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=4*e;return this.int16[o+0]=t,this.int16[o+1]=i,this.int16[o+2]=n,this.int16[o+3]=r,e},t}(Ro);Fo.prototype.bytesPerElement=8,en.register("StructArrayLayout4i8",Fo);var Bo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(Ro);Bo.prototype.bytesPerElement=12,en.register("StructArrayLayout2i4i12",Bo);var zo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.uint8[l+4]=n,this.uint8[l+5]=r,this.uint8[l+6]=o,this.uint8[l+7]=a,e},t}(Ro);zo.prototype.bytesPerElement=8,en.register("StructArrayLayout2i4ub8",zo);var Go=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(){e.apply(this,arguments)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},r.prototype.emplaceBack=function(e,t,i,n,r,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,e,t,i,n,r,o,a,s)},r.prototype.emplace=function(e,t,i,n,r,o,a,s,l){var u=8*e;return this.uint16[u+0]=t,this.uint16[u+1]=i,this.uint16[u+2]=n,this.uint16[u+3]=r,this.uint16[u+4]=o,this.uint16[u+5]=a,this.uint16[u+6]=s,this.uint16[u+7]=l,e},r}(Ro);Go.prototype.bytesPerElement=16,en.register("StructArrayLayout8ui16",Go);var ko=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,i,n,r,o,a,s,l,u,c,h)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=12*e;return this.int16[f+0]=t,this.int16[f+1]=i,this.int16[f+2]=n,this.int16[f+3]=r,this.uint16[f+4]=o,this.uint16[f+5]=a,this.uint16[f+6]=s,this.uint16[f+7]=l,this.int16[f+8]=u,this.int16[f+9]=c,this.int16[f+10]=h,this.int16[f+11]=d,e},t}(Ro);ko.prototype.bytesPerElement=24,en.register("StructArrayLayout4i4ui4i24",ko);var Uo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.float32[r+0]=t,this.float32[r+1]=i,this.float32[r+2]=n,e},t}(Ro);Uo.prototype.bytesPerElement=12,en.register("StructArrayLayout3f12",Uo);var Vo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.uint32[i+0]=t,e},t}(Ro);Vo.prototype.bytesPerElement=4,en.register("StructArrayLayout1ul4",Vo);var Wo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c){var h=this.length;return this.resize(h+1),this.emplace(h,e,t,i,n,r,o,a,s,l,u,c)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=12*e,f=6*e;return this.int16[d+0]=t,this.int16[d+1]=i,this.int16[d+2]=n,this.int16[d+3]=r,this.int16[d+4]=o,this.int16[d+5]=a,this.uint32[f+3]=s,this.uint16[d+8]=l,this.uint16[d+9]=u,this.int16[d+10]=c,this.int16[d+11]=h,e},t}(Ro);Wo.prototype.bytesPerElement=24,en.register("StructArrayLayout6i1ul2ui2i24",Wo);var Ho=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(Ro);Ho.prototype.bytesPerElement=12,en.register("StructArrayLayout2i2i2i12",Ho);var Yo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=12*e,a=3*e;return this.uint8[o+0]=t,this.uint8[o+1]=i,this.float32[a+1]=n,this.float32[a+2]=r,e},t}(Ro);Yo.prototype.bytesPerElement=12,en.register("StructArrayLayout2ub2f12",Yo);var jo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m){var $=this.length;return this.resize($+1),this.emplace($,e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,$){var g=24*e,y=12*e,v=48*e;return this.int16[g+0]=t,this.int16[g+1]=i,this.uint16[g+2]=n,this.uint16[g+3]=r,this.uint32[y+2]=o,this.uint32[y+3]=a,this.uint32[y+4]=s,this.uint16[g+10]=l,this.uint16[g+11]=u,this.uint16[g+12]=c,this.float32[y+7]=h,this.float32[y+8]=d,this.uint8[v+36]=f,this.uint8[v+37]=p,this.uint8[v+38]=_,this.uint32[y+10]=m,this.int16[g+22]=$,e},t}(Ro);jo.prototype.bytesPerElement=48,en.register("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",jo);var qo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,$,g,y,v,x,b,S,w,C){var T=this.length;return this.resize(T+1),this.emplace(T,e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,$,g,y,v,x,b,S,w,C)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,$,g,y,v,x,b,S,w,C,T){var P=30*e,E=15*e;return this.int16[P+0]=t,this.int16[P+1]=i,this.int16[P+2]=n,this.int16[P+3]=r,this.int16[P+4]=o,this.int16[P+5]=a,this.int16[P+6]=s,this.int16[P+7]=l,this.uint16[P+8]=u,this.uint16[P+9]=c,this.uint16[P+10]=h,this.uint16[P+11]=d,this.uint16[P+12]=f,this.uint16[P+13]=p,this.uint16[P+14]=_,this.uint16[P+15]=m,this.uint16[P+16]=$,this.uint16[P+17]=g,this.uint16[P+18]=y,this.uint16[P+19]=v,this.uint16[P+20]=x,this.uint16[P+21]=b,this.uint32[E+11]=S,this.float32[E+12]=w,this.float32[E+13]=C,this.float32[E+14]=T,e},t}(Ro);qo.prototype.bytesPerElement=60,en.register("StructArrayLayout8i14ui1ul3f60",qo);var Xo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.float32[i+0]=t,e},t}(Ro);Xo.prototype.bytesPerElement=4,en.register("StructArrayLayout1f4",Xo);var Ko=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.int16[r+0]=t,this.int16[r+1]=i,this.int16[r+2]=n,e},t}(Ro);Ko.prototype.bytesPerElement=6,en.register("StructArrayLayout3i6",Ko);var Zo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=2*e,o=4*e;return this.uint32[r+0]=t,this.uint16[o+2]=i,this.uint16[o+3]=n,e},t}(Ro);Zo.prototype.bytesPerElement=8,en.register("StructArrayLayout1ul2ui8",Zo);var Jo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.uint16[r+0]=t,this.uint16[r+1]=i,this.uint16[r+2]=n,e},t}(Ro);Jo.prototype.bytesPerElement=6,en.register("StructArrayLayout3ui6",Jo);var Qo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.uint16[n+0]=t,this.uint16[n+1]=i,e},t}(Ro);Qo.prototype.bytesPerElement=4,en.register("StructArrayLayout2ui4",Qo);var ea=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.uint16[i+0]=t,e},t}(Ro);ea.prototype.bytesPerElement=2,en.register("StructArrayLayout1ui2",ea);var ta=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.float32[n+0]=t,this.float32[n+1]=i,e},t}(Ro);ta.prototype.bytesPerElement=8,en.register("StructArrayLayout2f8",ta);var ia=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=4*e;return this.float32[o+0]=t,this.float32[o+1]=i,this.float32[o+2]=n,this.float32[o+3]=r,e},t}(Ro);ia.prototype.bytesPerElement=16,en.register("StructArrayLayout4f16",ia);var na=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.float32[s+0]=t,this.float32[s+1]=i,this.float32[s+2]=n,this.float32[s+3]=r,this.float32[s+4]=o,this.float32[s+5]=a,e},t}(Ro);na.prototype.bytesPerElement=24,en.register("StructArrayLayout6f24",na);var ra=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,e,t,i,n,r,o,a,s)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l){var u=8*e;return this.float32[u+0]=t,this.float32[u+1]=i,this.float32[u+2]=n,this.float32[u+3]=r,this.float32[u+4]=o,this.float32[u+5]=a,this.float32[u+6]=s,this.float32[u+7]=l,e},t}(Ro);ra.prototype.bytesPerElement=32,en.register("StructArrayLayout8f32",ra);var oa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,i,n,r,o,a,s,l,u,c,h)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=12*e;return this.float32[f+0]=t,this.float32[f+1]=i,this.float32[f+2]=n,this.float32[f+3]=r,this.float32[f+4]=o,this.float32[f+5]=a,this.float32[f+6]=s,this.float32[f+7]=l,this.float32[f+8]=u,this.float32[f+9]=c,this.float32[f+10]=h,this.float32[f+11]=d,e},t}(Ro);oa.prototype.bytesPerElement=48,en.register("StructArrayLayout12f48",oa);var aa=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return i.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorPointX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorPointY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.x1.get=function(){return this._structArray.int16[this._pos2+2]},i.x1.set=function(e){this._structArray.int16[this._pos2+2]=e},i.y1.get=function(){return this._structArray.int16[this._pos2+3]},i.y1.set=function(e){this._structArray.int16[this._pos2+3]=e},i.x2.get=function(){return this._structArray.int16[this._pos2+4]},i.x2.set=function(e){this._structArray.int16[this._pos2+4]=e},i.y2.get=function(){return this._structArray.int16[this._pos2+5]},i.y2.set=function(e){this._structArray.int16[this._pos2+5]=e},i.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},i.featureIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},i.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},i.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+8]=e},i.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},i.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},i.radius.get=function(){return this._structArray.int16[this._pos2+10]},i.radius.set=function(e){this._structArray.int16[this._pos2+10]=e},i.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},i.signedDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+11]=e},i.anchorPoint.get=function(){return new pointGeometry(this.anchorPointX,this.anchorPointY)},Object.defineProperties(t.prototype,i),t}(Io);aa.prototype.size=24;var sa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new aa(this,e)},t}(Wo);en.register("CollisionBoxArray",sa);var la=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return i.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},i.glyphStartIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},i.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},i.numGlyphs.set=function(e){this._structArray.uint16[this._pos2+3]=e},i.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},i.vertexStartIndex.set=function(e){this._structArray.uint32[this._pos4+2]=e},i.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},i.lineStartIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},i.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},i.lineLength.set=function(e){this._structArray.uint32[this._pos4+4]=e},i.segment.get=function(){return this._structArray.uint16[this._pos2+10]},i.segment.set=function(e){this._structArray.uint16[this._pos2+10]=e},i.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},i.lowerSize.set=function(e){this._structArray.uint16[this._pos2+11]=e},i.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},i.upperSize.set=function(e){this._structArray.uint16[this._pos2+12]=e},i.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},i.lineOffsetX.set=function(e){this._structArray.float32[this._pos4+7]=e},i.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},i.lineOffsetY.set=function(e){this._structArray.float32[this._pos4+8]=e},i.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},i.writingMode.set=function(e){this._structArray.uint8[this._pos1+36]=e},i.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},i.placedOrientation.set=function(e){this._structArray.uint8[this._pos1+37]=e},i.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},i.hidden.set=function(e){this._structArray.uint8[this._pos1+38]=e},i.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},i.crossTileID.set=function(e){this._structArray.uint32[this._pos4+10]=e},i.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},i.associatedIconIndex.set=function(e){this._structArray.int16[this._pos2+22]=e},Object.defineProperties(t.prototype,i),t}(Io);la.prototype.size=48;var ua=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new la(this,e)},t}(jo);en.register("PlacedSymbolArray",ua);var ca=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0}};return i.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},i.rightJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+2]=e},i.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},i.centerJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+3]=e},i.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},i.leftJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+4]=e},i.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},i.verticalPlacedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+5]=e},i.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},i.placedIconSymbolIndex.set=function(e){this._structArray.int16[this._pos2+6]=e},i.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},i.verticalPlacedIconSymbolIndex.set=function(e){this._structArray.int16[this._pos2+7]=e},i.key.get=function(){return this._structArray.uint16[this._pos2+8]},i.key.set=function(e){this._structArray.uint16[this._pos2+8]=e},i.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},i.textBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},i.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},i.textBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+10]=e},i.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},i.verticalTextBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+11]=e},i.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},i.verticalTextBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+12]=e},i.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},i.iconBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+13]=e},i.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},i.iconBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+14]=e},i.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},i.verticalIconBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+15]=e},i.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},i.verticalIconBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+16]=e},i.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},i.featureIndex.set=function(e){this._structArray.uint16[this._pos2+17]=e},i.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},i.numHorizontalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+18]=e},i.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},i.numVerticalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+19]=e},i.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},i.numIconVertices.set=function(e){this._structArray.uint16[this._pos2+20]=e},i.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},i.numVerticalIconVertices.set=function(e){this._structArray.uint16[this._pos2+21]=e},i.crossTileID.get=function(){return this._structArray.uint32[this._pos4+11]},i.crossTileID.set=function(e){this._structArray.uint32[this._pos4+11]=e},i.textBoxScale.get=function(){return this._structArray.float32[this._pos4+12]},i.textBoxScale.set=function(e){this._structArray.float32[this._pos4+12]=e},i.textOffset0.get=function(){return this._structArray.float32[this._pos4+13]},i.textOffset0.set=function(e){this._structArray.float32[this._pos4+13]=e},i.textOffset1.get=function(){return this._structArray.float32[this._pos4+14]},i.textOffset1.set=function(e){this._structArray.float32[this._pos4+14]=e},Object.defineProperties(t.prototype,i),t}(Io);ca.prototype.size=60;var ha=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new ca(this,e)},t}(qo);en.register("SymbolInstanceArray",ha);var da=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={offsetX:{configurable:!0}};return i.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},i.offsetX.set=function(e){this._structArray.float32[this._pos4+0]=e},Object.defineProperties(t.prototype,i),t}(Io);da.prototype.size=4;var fa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getoffsetX=function(e){return this.float32[1*e+0]},t.prototype.get=function(e){return new da(this,e)},t}(Xo);en.register("GlyphOffsetArray",fa);var pa=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return i.x.get=function(){return this._structArray.int16[this._pos2+0]},i.x.set=function(e){this._structArray.int16[this._pos2+0]=e},i.y.get=function(){return this._structArray.int16[this._pos2+1]},i.y.set=function(e){this._structArray.int16[this._pos2+1]=e},i.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},i.tileUnitDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+2]=e},Object.defineProperties(t.prototype,i),t}(Io);pa.prototype.size=6;var _a=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getx=function(e){return this.int16[3*e+0]},t.prototype.gety=function(e){return this.int16[3*e+1]},t.prototype.gettileUnitDistanceFromAnchor=function(e){return this.int16[3*e+2]},t.prototype.get=function(e){return new pa(this,e)},t}(Ko);en.register("SymbolLineVertexArray",_a);var ma=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return i.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},i.featureIndex.set=function(e){this._structArray.uint32[this._pos4+0]=e},i.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},i.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},i.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},i.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+3]=e},Object.defineProperties(t.prototype,i),t}(Io);ma.prototype.size=8;var $a=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new ma(this,e)},t}(Zo);en.register("FeatureIndexArray",$a);var ga,ya=(ga=!0,function(e,t){var i=ga?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ga=!1,i}),va=ya(void 0,(function(){return va.toString().search("(((.+)+)+)+$").toString().constructor(va).search("(((.+)+)+)+$")}));va();var xa=function(e,t,i){this.property=e,this.value=t,this.parameters=i};xa.prototype.isConstant=function(){return"constant"===this.value.kind},xa.prototype.constantOr=function(e){return"constant"===this.value.kind?this.value.value:e},xa.prototype.evaluate=function(e,t,i){return this.property.evaluate(this.value,this.parameters,e,t,i)};var ba={},Sa=function(e,t){this.gl=e.gl,this.location=t};ba.Uniform1i=function(e){function t(t,i){e.call(this,t,i),this.current=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1i(this.location,e))},t}(Sa),ba.Uniform1f=function(e){function t(t,i){e.call(this,t,i),this.current=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1f(this.location,e))},t}(Sa),ba.Uniform2f=function(e){function t(t,i){e.call(this,t,i),this.current=[0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1])&&(this.current=e,this.gl.uniform2f(this.location,e[0],e[1]))},t}(Sa),ba.Uniform3f=function(e){function t(t,i){e.call(this,t,i),this.current=[0,0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2])&&(this.current=e,this.gl.uniform3f(this.location,e[0],e[1],e[2]))},t}(Sa),ba.Uniform4f=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i){e.call(this,t,i),this.current=[0,0,0,0]}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2]||e[3]!==this.current[3])&&(this.current=e,this.gl.uniform4f(this.location,e[0],e[1],e[2],e[3]))},r}(Sa),ba.UniformColor=function(e){function t(t,i){e.call(this,t,i),this.current=M.transparent}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e.r!==this.current.r||e.g!==this.current.g||e.b!==this.current.b||e.a!==this.current.a)&&(this.current=e,this.gl.uniform4f(this.location,e.r,e.g,e.b,e.a))},t}(Sa);var wa=new Float32Array(16);function Ca(e,t){return e??t}function Ta(e){return null!=e}function Pa(e){var t;this.name="DeveloperError",this.message=e;try{throw new Error}catch(e){t=e.stack}this.stack=t}ba.UniformMatrix4f=function(e){function t(t,i){e.call(this,t,i),this.current=wa}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.gl.uniformMatrix4fv(this.location,!1,e)},t}(Sa),Ca.EMPTY_OBJECT=Object.freeze({}),Ta(Object.create)&&(Pa.prototype=Object.create(Error.prototype),Pa.prototype.constructor=Pa),Pa.prototype.toString=function(){var e=this.name+": "+this.message;return Ta(this.stack)&&(e+="\n"+this.stack.toString()),e},Pa.throwInstantiationError=function(){throw new Pa("This function defines an interface and should not be called directly.")};var Ea={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,COMPILE_STATUS:35713,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,HALF_FLOAT_OES:36193,DOUBLE:5130,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,COLOR:6144,DEPTH:6145,STENCIL:6146,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,MAX_3D_TEXTURE_SIZE:32883,UNSIGNED_INT_2_10_10_10_REV:33640,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,MAX_TEXTURE_LOD_BIAS:34045,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,VERTEX_ATTRIB_ARRAY_INTEGER:35069,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,UNSIGNED_INT_10F_11F_11F_REV:35899,RGB9_E5:35901,UNSIGNED_INT_5_9_9_9_REV:35902,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,RASTERIZER_DISCARD:35977,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,UNSIGNED_INT_24_8:34042,DEPTH24_STENCIL8:35056,UNSIGNED_NORMALIZED:35863,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,MAX_SAMPLES:36183,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,VERTEX_ARRAY_BINDING:34229,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,SIGNED_NORMALIZED:36764,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,INVALID_INDEX:4294967295,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,SAMPLER_BINDING:35097,RGB10_A2UI:36975,INT_2_10_10_10_REV:36255,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497,TEXTURE_IMMUTABLE_FORMAT:37167,MAX_ELEMENT_INDEX:36203,TEXTURE_IMMUTABLE_LEVELS:33503,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047},Aa=Object.freeze(Ea),La={BYTE:Aa.BYTE,UNSIGNED_BYTE:Aa.UNSIGNED_BYTE,SHORT:Aa.SHORT,UNSIGNED_SHORT:Aa.UNSIGNED_SHORT,INT:Aa.INT,UNSIGNED_INT:Aa.UNSIGNED_INT,FLOAT:Aa.FLOAT,DOUBLE:Aa.DOUBLE,getSizeInBytes:function(e){if(!Ta(e))throw new Pa("value is required.");switch(e){case La.BYTE:return Int8Array.BYTES_PER_ELEMENT;case La.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case La.SHORT:return Int16Array.BYTES_PER_ELEMENT;case La.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case La.INT:return Int32Array.BYTES_PER_ELEMENT;case La.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case La.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case La.DOUBLE:return Float64Array.BYTES_PER_ELEMENT;default:throw new Pa("componentDatatype is not a valid value.")}},fromTypedArray:function(e){return e instanceof Int8Array?La.BYTE:e instanceof Uint8Array?La.UNSIGNED_BYTE:e instanceof Int16Array?La.SHORT:e instanceof Uint16Array?La.UNSIGNED_SHORT:e instanceof Int32Array?La.INT:e instanceof Uint32Array?La.UNSIGNED_INT:e instanceof Float32Array?La.FLOAT:e instanceof Float64Array?La.DOUBLE:void 0},validate:function(e){return Ta(e)&&(e===La.BYTE||e===La.UNSIGNED_BYTE||e===La.SHORT||e===La.UNSIGNED_SHORT||e===La.INT||e===La.UNSIGNED_INT||e===La.FLOAT||e===La.DOUBLE)},createTypedArray:function(e,t){if(!Ta(e))throw new Pa("componentDatatype is required.");if(!Ta(t))throw new Pa("valuesOrLength is required.");switch(e){case La.BYTE:return new Int8Array(t);case La.UNSIGNED_BYTE:return new Uint8Array(t);case La.SHORT:return new Int16Array(t);case La.UNSIGNED_SHORT:return new Uint16Array(t);case La.INT:return new Int32Array(t);case La.UNSIGNED_INT:return new Uint32Array(t);case La.FLOAT:return new Float32Array(t);case La.DOUBLE:return new Float64Array(t);default:throw new Pa("componentDatatype is not a valid value.")}},createArrayBufferView:function(e,t,i,n){if(!Ta(e))throw new Pa("componentDatatype is required.");if(!Ta(t))throw new Pa("buffer is required.");switch(i=Ca(i,0),n=Ca(n,(t.byteLength-i)/La.getSizeInBytes(e)),e){case La.BYTE:return new Int8Array(t,i,n);case La.UNSIGNED_BYTE:return new Uint8Array(t,i,n);case La.SHORT:return new Int16Array(t,i,n);case La.UNSIGNED_SHORT:return new Uint16Array(t,i,n);case La.INT:return new Int32Array(t,i,n);case La.UNSIGNED_INT:return new Uint32Array(t,i,n);case La.FLOAT:return new Float32Array(t,i,n);case La.DOUBLE:return new Float64Array(t,i,n);default:throw new Pa("componentDatatype is not a valid value.")}},fromName:function(e){switch(e){case"BYTE":return La.BYTE;case"UNSIGNED_BYTE":return La.UNSIGNED_BYTE;case"SHORT":return La.SHORT;case"UNSIGNED_SHORT":return La.UNSIGNED_SHORT;case"INT":return La.INT;case"UNSIGNED_INT":return La.UNSIGNED_INT;case"FLOAT":return La.FLOAT;case"DOUBLE":return La.DOUBLE;default:throw new Pa("name is not a valid value.")}}},Ma=Object.freeze(La),Ia=function(e){null==e&&(e=(new Date).getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,this.init_genrand(e)};Ia.prototype.init_genrand=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti>>30,this.mt[this.mti]=(1812433253*((4294901760&e)>>>16)<<16)+1812433253*(65535&e)+this.mti,this.mt[this.mti]>>>=0},Ia.prototype.genrand_int32=function(){var e,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var i;for(this.mti==this.N+1&&this.init_genrand(5489),i=0;i>>1^t[1&e];for(;i>>1^t[1&e];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^t[1&e],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,(e^=e>>>18)>>>0},Ia.prototype.random=function(){return this.genrand_int32()*(1/4294967296)};var Oa={};function Da(e){return e+" is required, actual value was undefined"}function Ra(e,t,i){return"Expected "+i+" to be typeof "+t+", actual typeof was "+e}Oa.typeOf={},Oa.defined=function(e,t){if(!Ta(t))throw new Pa(Da(e))},Oa.typeOf.func=function(e,t){if("function"!=typeof t)throw new Pa(Ra(typeof t,"function",e))},Oa.typeOf.string=function(e,t){if("string"!=typeof t)throw new Pa(Ra(typeof t,"string",e))},Oa.typeOf.number=function(e,t){if("number"!=typeof t)throw new Pa(Ra(typeof t,"number",e))},Oa.typeOf.number.lessThan=function(e,t,i){if(Oa.typeOf.number(e,t),t>=i)throw new Pa("Expected "+e+" to be less than "+i+", actual value was "+t)},Oa.typeOf.number.lessThanOrEquals=function(e,t,i){if(Oa.typeOf.number(e,t),t>i)throw new Pa("Expected "+e+" to be less than or equal to "+i+", actual value was "+t)},Oa.typeOf.number.greaterThan=function(e,t,i){if(Oa.typeOf.number(e,t),t<=i)throw new Pa("Expected "+e+" to be greater than "+i+", actual value was "+t)},Oa.typeOf.number.greaterThanOrEquals=function(e,t,i){if(Oa.typeOf.number(e,t),t0?1:-1})),Na.signNotZero=function(e){return e<0?-1:1},Na.toSNorm=function(e,t){return t=Ca(t,255),Math.round((.5*Na.clamp(e,-1,1)+.5)*t)},Na.fromSNorm=function(e,t){return t=Ca(t,255),Na.clamp(e,0,t)/t*2-1},Na.normalize=function(e,t,i){return 0===(i=Math.max(i-t,0))?0:Na.clamp((e-t)/i,0,1)},Na.sinh=Ca(Math.sinh,(function(e){return(Math.exp(e)-Math.exp(-e))/2})),Na.cosh=Ca(Math.cosh,(function(e){return(Math.exp(e)+Math.exp(-e))/2})),Na.lerp=function(e,t,i){return(1-i)*e+i*t},Na.PI=Math.PI,Na.ONE_OVER_PI=1/Math.PI,Na.PI_OVER_TWO=Math.PI/2,Na.PI_OVER_THREE=Math.PI/3,Na.PI_OVER_FOUR=Math.PI/4,Na.PI_OVER_SIX=Math.PI/6,Na.THREE_PI_OVER_TWO=3*Math.PI/2,Na.TWO_PI=2*Math.PI,Na.ONE_OVER_TWO_PI=1/(2*Math.PI),Na.RADIANS_PER_DEGREE=Math.PI/180,Na.DEGREES_PER_RADIAN=180/Math.PI,Na.RADIANS_PER_ARCSECOND=Na.RADIANS_PER_DEGREE/3600,Na.toRadians=function(e){if(!Ta(e))throw new Pa("degrees is required.");return e*Na.RADIANS_PER_DEGREE},Na.toDegrees=function(e){if(!Ta(e))throw new Pa("radians is required.");return e*Na.DEGREES_PER_RADIAN},Na.convertLongitudeRange=function(e){if(!Ta(e))throw new Pa("angle is required.");var t=Na.TWO_PI,i=e-Math.floor(e/t)*t;return i<-Math.PI?i+t:i>=Math.PI?i-t:i},Na.clampToLatitudeRange=function(e){if(!Ta(e))throw new Pa("angle is required.");return Na.clamp(e,-1*Na.PI_OVER_TWO,Na.PI_OVER_TWO)},Na.negativePiToPi=function(e){if(!Ta(e))throw new Pa("angle is required.");return Na.zeroToTwoPi(e+Na.PI)-Na.PI},Na.zeroToTwoPi=function(e){if(!Ta(e))throw new Pa("angle is required.");var t=Na.mod(e,Na.TWO_PI);return Math.abs(t)Na.EPSILON14?Na.TWO_PI:t},Na.mod=function(e,t){if(!Ta(e))throw new Pa("m is required.");if(!Ta(t))throw new Pa("n is required.");return(e%t+t)%t},Na.equalsEpsilon=function(e,t,i,n){if(!Ta(e))throw new Pa("left is required.");if(!Ta(t))throw new Pa("right is required.");if(!Ta(i))throw new Pa("relativeEpsilon is required.");n=Ca(n,i);var r=Math.abs(e-t);return r<=n||r<=i*Math.max(Math.abs(e),Math.abs(t))},Na.lessThan=function(e,t,i){if(!Ta(e))throw new Pa("first is required.");if(!Ta(t))throw new Pa("second is required.");if(!Ta(i))throw new Pa("relativeEpsilon is required.");return e-t<-i},Na.lessThanOrEquals=function(e,t,i){if(!Ta(e))throw new Pa("first is required.");if(!Ta(t))throw new Pa("second is required.");if(!Ta(i))throw new Pa("relativeEpsilon is required.");return e-ti},Na.greaterThanOrEquals=function(e,t,i){if(!Ta(e))throw new Pa("first is required.");if(!Ta(t))throw new Pa("second is required.");if(!Ta(i))throw new Pa("relativeEpsilon is required.");return e-t>-i};var Fa=[1];Na.factorial=function(e){if("number"!=typeof e||e<0)throw new Pa("A number greater than or equal to 0 is required.");var t=Fa.length;if(e>=t)for(var i=Fa[t-1],n=t;n<=e;n++){var r=i*n;Fa.push(r),i=r}return Fa[e]},Na.incrementWrap=function(e,t,i){if(i=Ca(i,0),!Ta(e))throw new Pa("n is required.");if(t<=i)throw new Pa("maximumValue must be greater than minimumValue.");return++e>t&&(e=i),e},Na.isPowerOfTwo=function(e){if("number"!=typeof e||e<0)throw new Pa("A number greater than or equal to 0 is required.");return 0!==e&&0==(e&e-1)},Na.nextPowerOfTwo=function(e){if("number"!=typeof e||e<0)throw new Pa("A number greater than or equal to 0 is required.");return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e},Na.clamp=function(e,t,i){if(!Ta(e))throw new Pa("value is required");if(!Ta(t))throw new Pa("min is required.");if(!Ta(i))throw new Pa("max is required.");return ei?i:e};var Ba=new Ia;Na.setRandomNumberSeed=function(e){if(!Ta(e))throw new Pa("seed is required.");Ba=new Ia(e)},Na.nextRandomNumber=function(){return Ba.random()},Na.randomBetween=function(e,t){return Na.nextRandomNumber()*(t-e)+e},Na.acosClamped=function(e){if(!Ta(e))throw new Pa("value is required.");return Math.acos(Na.clamp(e,-1,1))},Na.asinClamped=function(e){if(!Ta(e))throw new Pa("value is required.");return Math.asin(Na.clamp(e,-1,1))},Na.chordLength=function(e,t){if(!Ta(e))throw new Pa("angle is required.");if(!Ta(t))throw new Pa("radius is required.");return 2*t*Math.sin(.5*e)},Na.logBase=function(e,t){if(!Ta(e))throw new Pa("number is required.");if(!Ta(t))throw new Pa("base is required.");return Math.log(e)/Math.log(t)},Na.cbrt=Ca(Math.cbrt,(function(e){var t=Math.pow(Math.abs(e),.3333333333333333);return e<0?-t:t})),Na.log2=Ca(Math.log2,(function(e){return Math.log(e)*Math.LOG2E})),Na.fog=function(e,t){var i=e*t;return 1-Math.exp(-i*i)},Na.fastApproximateAtan=function(e){return Oa.typeOf.number("x",e),e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)},Na.fastApproximateAtan2=function(e,t){Oa.typeOf.number("x",e),Oa.typeOf.number("y",t);var i,n,r=Math.abs(e);i=Math.abs(t),n=Math.max(r,i);var o=(i=Math.min(r,i))/n;if(isNaN(o))throw new Pa("either x or y must be nonzero");return r=Na.fastApproximateAtan(o),r=Math.abs(t)>Math.abs(e)?Na.PI_OVER_TWO-r:r,r=e<0?Na.PI-r:r,r=t<0?-r:r};var za={UNSIGNED_BYTE:Aa.UNSIGNED_BYTE,UNSIGNED_SHORT:Aa.UNSIGNED_SHORT,UNSIGNED_INT:Aa.UNSIGNED_INT,getSizeInBytes:function(e){switch(e){case za.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case za.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case za.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}throw new Pa("indexDatatype is required and must be a valid IndexDatatype constant.")},fromSizeInBytes:function(e){switch(e){case 2:return za.UNSIGNED_SHORT;case 4:return za.UNSIGNED_INT;case 1:return za.UNSIGNED_BYTE;default:throw new Pa("Size in bytes cannot be mapped to an IndexDatatype")}},validate:function(e){return Ta(e)&&(e===za.UNSIGNED_BYTE||e===za.UNSIGNED_SHORT||e===za.UNSIGNED_INT)},createTypedArray:function(e,t){if(!Ta(e))throw new Pa("numberOfVertices is required.");return e>=Na.SIXTY_FOUR_KILOBYTES?new Uint32Array(t):new Uint16Array(t)},createTypedArrayFromArrayBuffer:function(e,t,i,n){if(!Ta(e))throw new Pa("numberOfVertices is required.");if(!Ta(t))throw new Pa("sourceArray is required.");if(!Ta(i))throw new Pa("byteOffset is required.");return e>=Na.SIXTY_FOUR_KILOBYTES?new Uint32Array(t,i,n):new Uint16Array(t,i,n)}},Ga=Object.freeze(za),ka={STREAM_DRAW:Aa.STREAM_DRAW,STATIC_DRAW:Aa.STATIC_DRAW,DYNAMIC_DRAW:Aa.DYNAMIC_DRAW,validate:function(e){return e===ka.STREAM_DRAW||e===ka.STATIC_DRAW||e===ka.DYNAMIC_DRAW}};function Ua(){return!0}function Va(e,t){function i(){throw new Pa(t)}for(var n in t=Ca(t,"This object was destroyed, i.e., destroy() was called."),e)"function"==typeof e[n]&&(e[n]=i);e.isDestroyed=Ua}function Wa(e){if(e=Ca(e,Ca.EMPTY_OBJECT),Oa.defined("options.context",e.context),!Ta(e.typedArray)&&!Ta(e.sizeInBytes))throw new Pa("Either options.sizeInBytes or options.typedArray is required.");if(Ta(e.typedArray)&&Ta(e.sizeInBytes))throw new Pa("Cannot pass in both options.sizeInBytes and options.typedArray.");if(Ta(e.typedArray)&&(Oa.typeOf.object("options.typedArray",e.typedArray),Oa.typeOf.number("options.typedArray.byteLength",e.typedArray.byteLength)),!ka.validate(e.usage))throw new Pa("usage is invalid.");var t=e.context._gl,i=e.bufferTarget,n=e.typedArray,r=e.sizeInBytes,o=e.usage,a=Ta(n);a&&(r=n.byteLength),Oa.typeOf.number.greaterThan("sizeInBytes",r,0);var s=t.createBuffer();t.bindBuffer(i,s),t.bufferData(i,a?n:r,o),t.bindBuffer(i,null),this._gl=t,this._webgl2=e.context._webgl2,this._bufferTarget=i,this._sizeInBytes=r,this._usage=o,this._buffer=s,this.vertexArrayDestroyable=!0,this.context=e.context,e.context.memorySize+=r}function Ha(e,t){this.x=Ca(e,0),this.y=Ca(t,0)}Wa.createVertexBuffer=function(e){return Oa.defined("options.context",e.context),new Wa({context:e.context,bufferTarget:Aa.ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})},Wa.createIndexBuffer=function(e){if(Oa.defined("options.context",e.context),!Ga.validate(e.indexDatatype))throw new Pa("Invalid indexDatatype.");if(e.indexDatatype===Ga.UNSIGNED_INT&&!e.context.elementIndexUint)throw new Pa("IndexDatatype.UNSIGNED_INT requires OES_element_index_uint, which is not supported on this system. Check context.elementIndexUint.");var t=e.context,i=e.indexDatatype,n=Ga.getSizeInBytes(i),r=new Wa({context:t,bufferTarget:Aa.ELEMENT_ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage}),o=r.sizeInBytes/n;return Object.defineProperties(r,{indexDatatype:{get:function(){return i}},bytesPerIndex:{get:function(){return n}},numberOfIndices:{get:function(){return o}}}),r},Object.defineProperties(Wa.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}}}),Wa.prototype._getBuffer=function(){return this._buffer},Wa.prototype.copyFromArrayView=function(e,t){t=Ca(t,0),Oa.defined("arrayView",e),Oa.typeOf.number.lessThanOrEquals("offsetInBytes + arrayView.byteLength",t+e.byteLength,this._sizeInBytes);var i=this._gl,n=this._bufferTarget;i.bindBuffer(n,this._buffer),i.bufferSubData(n,t,e),i.bindBuffer(n,null)},Wa.prototype.copyFromBuffer=function(e,t,i,n){if(!this._webgl2)throw new Pa("A WebGL 2 context is required.");if(!Ta(e))throw new Pa("readBuffer must be defined.");if(!Ta(n)||n<=0)throw new Pa("sizeInBytes must be defined and be greater than zero.");if(!Ta(t)||t<0||t+n>e._sizeInBytes)throw new Pa("readOffset must be greater than or equal to zero and readOffset + sizeInBytes must be less than of equal to readBuffer.sizeInBytes.");if(!Ta(i)||i<0||i+n>this._sizeInBytes)throw new Pa("writeOffset must be greater than or equal to zero and writeOffset + sizeInBytes must be less than of equal to this.sizeInBytes.");if(this._buffer===e._buffer&&(i>=t&&ii&&ta)throw new Pa("destinationOffset must be greater than zero and less than the arrayView length.");if(i+r>a)throw new Pa("destinationOffset + length must be less than or equal to the arrayViewLength.");if(t<0||t>this._sizeInBytes)throw new Pa("sourceOffset must be greater than zero and less than the buffers size.");if(t+r*o>this._sizeInBytes)throw new Pa("sourceOffset + length must be less than the buffers size.");var s=this._gl,l=Aa.COPY_READ_BUFFER;s.bindBuffer(l,this._buffer),s.getBufferSubData(l,t,e,i,n),s.bindBuffer(l,null)},Wa.prototype.isDestroyed=function(){return!1},Wa.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),this.context.memorySize-=this.sizeInBytes,Va(this)},Ha.fromElements=function(e,t,i){return Ta(i)?(i.x=e,i.y=t,i):new Ha(e,t)},Ha.clone=function(e,t){if(Ta(e))return Ta(t)?(t.x=e.x,t.y=e.y,t):new Ha(e.x,e.y)},Ha.fromCartesian3=Ha.clone,Ha.fromCartesian4=Ha.clone,Ha.packedLength=2,Ha.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Ca(i,0),t[i++]=e.x,t[i]=e.y,t},Ha.unpack=function(e,t,i){return Oa.defined("array",e),t=Ca(t,0),Ta(i)||(i=new Ha),i.x=e[t++],i.y=e[t],i},Ha.packArray=function(e,t){Oa.defined("array",e);var i=e.length,n=2*i;if(Ta(t)){if(!Array.isArray(t)&&t.length!==n)throw new Pa("If result is a typed array, it must have exactly array.length * 2 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;rNa.EPSILON12);return Ta(r)?(r.x=o*b,r.y=a*S,r.z=s*w,r):new Za(o*b,a*S,s*w)}function cs(e,t,i){this.longitude=Ca(e,0),this.latitude=Ca(t,0),this.height=Ca(i,0)}cs.fromRadians=function(e,t,i,n){return Oa.typeOf.number("longitude",e),Oa.typeOf.number("latitude",t),i=Ca(i,0),Ta(n)?(n.longitude=e,n.latitude=t,n.height=i,n):new cs(e,t,i)},cs.fromDegrees=function(e,t,i,n){return Oa.typeOf.number("longitude",e),Oa.typeOf.number("latitude",t),e=Na.toRadians(e),t=Na.toRadians(t),cs.fromRadians(e,t,i,n)};var hs=new Za,ds=new Za,fs=new Za,ps=new Za(1/6378137,1/6378137,1/6356752.314245179),_s=new Za(1/6378137,1/6378137,1/6378137),ms=new Za(1/40680631590769,1/40680631590769,1/40408299984661.445),$s=new Za(1/40680631590769,1/40680631590769,1/40680631590769),gs=Na.EPSILON1;function ys(e,t,i,n){t=Ca(t,0),i=Ca(i,0),n=Ca(n,0),Oa.typeOf.number.greaterThanOrEquals("x",t,0),Oa.typeOf.number.greaterThanOrEquals("y",i,0),Oa.typeOf.number.greaterThanOrEquals("z",n,0),Na.equalsEpsilon(n,6356752.314245179,Na.EPSILON10)&&(Na.Radius=n),e._radii=new Za(t,i,n),e._radiiSquared=new Za(t*t,i*i,n*n),e._radiiToTheFourth=new Za(t*t*t*t,i*i*i*i,n*n*n*n),e._oneOverRadii=new Za(0===t?0:1/t,0===i?0:1/i,0===n?0:1/n),e._oneOverRadiiSquared=new Za(0===t?0:1/(t*t),0===i?0:1/(i*i),0===n?0:1/(n*n)),e._minimumRadius=Math.min(t,i,n),e._maximumRadius=Math.max(t,i,n),e._centerToleranceSquared=Na.EPSILON1,0!==e._radiiSquared.z&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function vs(e,t,i){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,ys(this,e,t,i)}cs.fromCartesian=function(e,t,i){var n=Ta(t)?t.oneOverRadii:_s,r=Ta(t)?t.oneOverRadiiSquared:$s,o=Ta(t)?t._centerToleranceSquared:gs;Na.equalsEpsilon(Na.Radius,6356752.314245179,Na.EPSILON10)&&(n=Ta(t)?t.oneOverRadii:ps,r=Ta(t)?t.oneOverRadiiSquared:ms);var a=us(e,n,r,o,ds);if(Ta(a)){var s=Za.multiplyComponents(a,r,hs);s=Za.normalize(s,s);var l=Za.subtract(e,a,fs),u=Math.atan2(s.y,s.x),c=Math.asin(s.z),h=Na.sign(Za.dot(l,e))*Za.magnitude(l);return Ta(i)?(i.longitude=u,i.latitude=c,i.height=h,i):new cs(u,c,h)}},cs.toCartesian=function(e,t,i){return Oa.defined("cartographic",e),Za.fromRadians(e.longitude,e.latitude,e.height,t,i)},cs.sphericalDistance=function(e,t,i,n){if(Oa.defined("longitudeA",e),Oa.defined("longitudeB",i),Oa.defined("latitudeA",t),Oa.defined("latitudeB",n),e===i&&t===n)return 0;var r=Na.toRadians(t),o=Na.toRadians(n),a=Na.toRadians(e),s=Na.toRadians(i),l=a*a+r*r,u=s*s+o*o,c=(l+u-((a-s)*(a-s)+(r-o)*(r-o)))/(2*Math.sqrt(l)*Math.sqrt(u));return c=Na.clamp(c,-1,1),Math.acos(c)*Na.Radius},cs.clone=function(e,t){if(Ta(e))return Ta(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new cs(e.longitude,e.latitude,e.height)},cs.equals=function(e,t){return e===t||Ta(e)&&Ta(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height},cs.equalsEpsilon=function(e,t,i){return Oa.typeOf.number("epsilon",i),e===t||Ta(e)&&Ta(t)&&Math.abs(e.longitude-t.longitude)<=i&&Math.abs(e.latitude-t.latitude)<=i&&Math.abs(e.height-t.height)<=i},cs.ZERO=Object.freeze(new cs(0,0,0)),cs.prototype.clone=function(e){return cs.clone(this,e)},cs.prototype.equals=function(e){return cs.equals(this,e)},cs.prototype.equalsEpsilon=function(e,t){return cs.equalsEpsilon(this,e,t)},cs.prototype.toString=function(){return"("+this.longitude+", "+this.latitude+", "+this.height+")"},Object.defineProperties(vs.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}}),vs.clone=function(e,t){if(Ta(e)){var i=e._radii;return Ta(t)?(Za.clone(i,t._radii),Za.clone(e._radiiSquared,t._radiiSquared),Za.clone(e._radiiToTheFourth,t._radiiToTheFourth),Za.clone(e._oneOverRadii,t._oneOverRadii),Za.clone(e._oneOverRadiiSquared,t._oneOverRadiiSquared),t._minimumRadius=e._minimumRadius,t._maximumRadius=e._maximumRadius,t._centerToleranceSquared=e._centerToleranceSquared,t):new vs(i.x,i.y,i.z)}},vs.fromCartesian3=function(e,t){return Ta(t)||(t=new vs),Ta(e)&&ys(t,e.x,e.y,e.z),t},vs.WGS84=Object.freeze(new vs(6378137,6378137,Na.Radius)),vs.XIAN80=Object.freeze(new vs(6378140,6378140,6356755.29)),vs.CGCS2000=Object.freeze(new vs(6378137,6378137,6356752.31)),vs.UNIT_SPHERE=Object.freeze(new vs(1,1,1)),vs.MOON=Object.freeze(new vs(Na.LUNAR_RADIUS,Na.LUNAR_RADIUS,Na.LUNAR_RADIUS)),vs.prototype.clone=function(e){return vs.clone(this,e)},vs.packedLength=Za.packedLength,vs.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Ca(i,0),Za.pack(e._radii,t,i),t},vs.unpack=function(e,t,i){Oa.defined("array",e),t=Ca(t,0);var n=Za.unpack(e,t);return vs.fromCartesian3(n,i)},vs.prototype.geocentricSurfaceNormal=Za.normalize,vs.prototype.geodeticSurfaceNormalCartographic=function(e,t){Oa.typeOf.object("cartographic",e);var i=e.longitude,n=e.latitude,r=Math.cos(n),o=r*Math.cos(i),a=r*Math.sin(i),s=Math.sin(n);return Ta(t)||(t=new Za),t.x=o,t.y=a,t.z=s,Za.normalize(t,t)},vs.prototype.geodeticSurfaceNormal=function(e,t){return Ta(t)||(t=new Za),t=Za.multiplyComponents(e,this._oneOverRadiiSquared,t),Za.normalize(t,t)};var xs=new Za,bs=new Za;vs.prototype.cartographicToCartesian=function(e,t){var i=xs,n=bs;this.geodeticSurfaceNormalCartographic(e,i),Za.multiplyComponents(this._radiiSquared,i,n);var r=Math.sqrt(Za.dot(i,n));return Za.divideByScalar(n,r,n),Za.multiplyByScalar(i,e.height,i),Ta(t)||(t=new Za),Za.add(n,i,t)},vs.prototype.cartographicArrayToCartesianArray=function(e,t){Oa.defined("cartographics",e);var i=e.length;Ta(t)?t.length=i:t=new Array(i);for(var n=0;n=this._radii.z-t))return i},Object.defineProperties(Ts.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),Ts.prototype.project=function(e,t){var i=this._semimajorAxis,n=e.longitude*i,r=e.latitude*i,o=e.height;return Ta(t)?(t.x=n,t.y=r,t.z=o,t):new Za(n,r,o)},Ts.prototype.unproject=function(e,t){if(!Ta(e))throw new Pa("cartesian is required");var i=this._oneOverSemimajorAxis,n=e.x*i,r=e.y*i,o=e.z;return Ta(t)?(t.longitude=n,t.latitude=r,t.height=o,t):new cs(n,r,o)};var Ps={OUTSIDE:-1,INTERSECTING:0,INSIDE:1},Es=Object.freeze(Ps);function As(e,t,i,n){this.west=Ca(e,0),this.south=Ca(t,0),this.east=Ca(i,0),this.north=Ca(n,0)}Object.defineProperties(As.prototype,{width:{get:function(){return As.computeWidth(this)}},height:{get:function(){return As.computeHeight(this)}}}),As.packedLength=4,As.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Ca(i,0),t[i++]=e.west,t[i++]=e.south,t[i++]=e.east,t[i]=e.north,t},As.unpack=function(e,t,i){return Oa.defined("array",e),t=Ca(t,0),Ta(i)||(i=new As),i.west=e[t++],i.south=e[t++],i.east=e[t++],i.north=e[t],i},As.computeWidth=function(e){Oa.typeOf.object("rectangle",e);var t=e.east,i=e.west;return t=0?c.longitude:c.longitude+Na.TWO_PI;r=Math.min(r,h),o=Math.max(o,h)}return n-i>o-r&&(i=r,(n=o)>Na.PI&&(n-=Na.TWO_PI),i>Na.PI&&(i-=Na.TWO_PI)),Ta(t)?(t.west=i,t.south=a,t.east=n,t.north=s,t):new As(i,a,n,s)},As.fromCartesianArray=function(e,t,i){Oa.defined("cartesians",e),t=Ca(t,vs.WGS84);for(var n=Number.MAX_VALUE,r=-Number.MAX_VALUE,o=Number.MAX_VALUE,a=-Number.MAX_VALUE,s=Number.MAX_VALUE,l=-Number.MAX_VALUE,u=0,c=e.length;u=0?h.longitude:h.longitude+Na.TWO_PI;o=Math.min(o,d),a=Math.max(a,d)}return r-n>a-o&&(n=o,(r=a)>Na.PI&&(r-=Na.TWO_PI),n>Na.PI&&(n-=Na.TWO_PI)),Ta(i)?(i.west=n,i.south=s,i.east=r,i.north=l,i):new As(n,s,r,l)},As.clone=function(e,t){if(Ta(e))return Ta(t)?(t.west=e.west,t.south=e.south,t.east=e.east,t.north=e.north,t):new As(e.west,e.south,e.east,e.north)},As.equalsEpsilon=function(e,t,i){return Oa.typeOf.number("absoluteEpsilon",i),e===t||Ta(e)&&Ta(t)&&Math.abs(e.west-t.west)<=i&&Math.abs(e.south-t.south)<=i&&Math.abs(e.east-t.east)<=i&&Math.abs(e.north-t.north)<=i},As.prototype.clone=function(e){return As.clone(this,e)},As.prototype.equals=function(e){return As.equals(this,e)},As.equals=function(e,t){return e===t||Ta(e)&&Ta(t)&&e.west===t.west&&e.south===t.south&&e.east===t.east&&e.north===t.north},As.prototype.equalsEpsilon=function(e,t){return Oa.typeOf.number("epsilon",t),As.equalsEpsilon(this,e,t)},As.validate=function(e){Oa.typeOf.object("rectangle",e);var t=e.north;Oa.typeOf.number.greaterThanOrEquals("north",t,-Na.PI_OVER_TWO),Oa.typeOf.number.lessThanOrEquals("north",t,Na.PI_OVER_TWO);var i=e.south;Oa.typeOf.number.greaterThanOrEquals("south",i,-Na.PI_OVER_TWO),Oa.typeOf.number.lessThanOrEquals("south",i,Na.PI_OVER_TWO);var n=e.west;Oa.typeOf.number.greaterThanOrEquals("west",n,-Math.PI),Oa.typeOf.number.lessThanOrEquals("west",n,Math.PI);var r=e.east;Oa.typeOf.number.greaterThanOrEquals("east",r,-Math.PI),Oa.typeOf.number.lessThanOrEquals("east",r,Math.PI)},As.southwest=function(e,t){return Oa.typeOf.object("rectangle",e),Ta(t)?(t.longitude=e.west,t.latitude=e.south,t.height=0,t):new cs(e.west,e.south)},As.northwest=function(e,t){return Oa.typeOf.object("rectangle",e),Ta(t)?(t.longitude=e.west,t.latitude=e.north,t.height=0,t):new cs(e.west,e.north)},As.northeast=function(e,t){return Oa.typeOf.object("rectangle",e),Ta(t)?(t.longitude=e.east,t.latitude=e.north,t.height=0,t):new cs(e.east,e.north)},As.southeast=function(e,t){return Oa.typeOf.object("rectangle",e),Ta(t)?(t.longitude=e.east,t.latitude=e.south,t.height=0,t):new cs(e.east,e.south)},As.center=function(e,t){Oa.typeOf.object("rectangle",e);var i=e.east,n=e.west;i0?n+=Na.TWO_PI:o0&&(o+=Na.TWO_PI),n=c))return Ta(i)?(i.west=s,i.south=u,i.east=l,i.north=c,i):new As(s,u,l,c)}},As.simpleIntersection=function(e,t,i){Oa.typeOf.object("rectangle",e),Oa.typeOf.object("otherRectangle",t);var n=Math.max(e.west,t.west),r=Math.max(e.south,t.south),o=Math.min(e.east,t.east),a=Math.min(e.north,t.north);if(!(r>=a||n>=o))return Ta(i)?(i.west=n,i.south=r,i.east=o,i.north=a,i):new As(n,r,o,a)},As.union=function(e,t,i){Oa.typeOf.object("rectangle",e),Oa.typeOf.object("otherRectangle",t),Ta(i)||(i=new As);var n=e.east,r=e.west,o=t.east,a=t.west;n0?n+=Na.TWO_PI:o0&&(o+=Na.TWO_PI),nr||Na.equalsEpsilon(i,r,Na.EPSILON14))&&(i=e.south&&n<=e.north};var Ls=new cs;As.subsample=function(e,t,i,n){Oa.typeOf.object("rectangle",e),t=Ca(t,vs.WGS84),i=Ca(i,0),Ta(n)||(n=[]);var r=0,o=e.north,a=e.south,s=e.east,l=e.west,u=Ls;u.height=i,u.longitude=l,u.latitude=o,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=s,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.latitude=a,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=l,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.latitude=o<0?o:a>0?a:0;for(var c=1;c<8;++c)u.longitude=-Math.PI+c*Na.PI_OVER_TWO,As.contains(e,u)&&(n[r]=t.cartographicToCartesian(u,n[r]),r++);return 0===u.latitude&&(u.longitude=l,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=s,n[r]=t.cartographicToCartesian(u,n[r]),r++),n.length=r,n};var Ms=new cs;function Is(e,t,i,n){this.x=Ca(e,0),this.y=Ca(t,0),this.width=Ca(i,0),this.height=Ca(n,0)}As.prototype.contains=function(e){return As.contains(this,As.southwest(e,Ms))&&As.contains(this,As.northwest(e,Ms))&&As.contains(this,As.southeast(e,Ms))&&As.contains(this,As.northeast(e,Ms))},As.MAX_VALUE=Object.freeze(new As(-Math.PI,-Na.PI_OVER_TWO,Math.PI,Na.PI_OVER_TWO)),Is.packedLength=4,Is.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Ca(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.width,t[i]=e.height,t},Is.unpack=function(e,t,i){return Oa.defined("array",e),t=Ca(t,0),Ta(i)||(i=new Is),i.x=e[t++],i.y=e[t++],i.width=e[t++],i.height=e[t],i},Is.fromPoints=function(e,t){if(Ta(t)||(t=new Is),!Ta(e)||0===e.length)return t.x=0,t.y=0,t.width=0,t.height=0,t;for(var i=e.length,n=e[0].x,r=e[0].y,o=e[0].x,a=e[0].y,s=1;si.width?i.width=n:n<0&&(i.width-=n,i.x=t.x),r>i.height?i.height=r:r<0&&(i.height-=r,i.y=t.y),i},Is.intersect=function(e,t){Oa.typeOf.object("left",e),Oa.typeOf.object("right",t);var i=e.x,n=e.y,r=t.x,o=t.y;return i>r+t.width||i+e.widtho+t.height?Es.OUTSIDE:Es.INTERSECTING},Is.equals=function(e,t){return e===t||Ta(e)&&Ta(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height},Is.prototype.clone=function(e){return Is.clone(this,e)},Is.prototype.intersect=function(e){return Is.intersect(this,e)},Is.prototype.equals=function(e){return Is.equals(this,e)};var Ns,Fs,Bs,zs,Gs,ks,Us,Vs,Ws,Hs,Ys,js,qs,Xs,Ks,Zs,Js,Qs,el,tl,il,nl,rl,ol,al={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},sl={};function ll(e,t,i,n){return ul(e).then(t,i,n)}function ul(e){var t,i;return e instanceof hl?t=e:_l(e)?(i=pl(),e.then((function(e){i.resolve(e)}),(function(e){i.reject(e)}),(function(e){i.progress(e)})),t=i.promise):t=dl(e),t}function cl(e){return ll(e,fl)}function hl(e){this.then=e}function dl(e){var t=new hl((function(t){try{return ul(t?t(e):e)}catch(e){return fl(e)}}));return t}function fl(e){var t=new hl((function(t,i){try{return i?ul(i(e)):fl(e)}catch(e){return fl(e)}}));return t}function pl(){var e,t,i,n,r,o;return e=new hl(a),t=[],i=[],n=function(e,n,r){var o,a;return o=pl(),a="function"==typeof r?function(e){try{o.progress(r(e))}catch(e){o.progress(e)}}:function(e){o.progress(e)},t.push((function(t){t.then(e,n).then(o.resolve,o.reject,a)})),i.push(a),o.promise},r=function(e){return wl(i,e),e},o=function(e){return e=ul(e),n=e.then,o=ul,r=Tl,wl(t,e),i=t=zs,e},{then:a,resolve:s,reject:l,progress:u,promise:e,resolver:{resolve:s,reject:l,progress:u}};function a(e,t,i){return n(e,t,i)}function s(e){return o(e)}function l(e){return o(fl(e))}function u(e){return r(e)}}function _l(e){return e&&"function"==typeof e.then}function ml(e,t,i,n,r){return Cl(2,arguments),ll(e,(function(e){var o,a,s,l,u,c,h,d,f,p;if(f=e.length>>>0,o=Math.max(0,Math.min(t,f)),s=[],a=f-o+1,l=[],u=pl(),o)for(d=u.progress,h=function(e){l.push(e),--a||(c=h=Tl,u.reject(l))},c=function(e){s.push(e),--o||(c=h=Tl,u.resolve(s))},p=0;p>>0,h=e.length>>>0,r=[],o=[],u=(a=pl()).progress,l=function(e){o.push(e),--h||(s=l=Tl,a.resolve(r))},s=function(e,t){r[t]=e,--h||(s=l=Tl,a.resolve(r))},d=0;d>>0,i=[],s=pl(),r)for(o=function(e,n){ll(e,t).then((function(e){i[n]=e,--r||s.resolve(i)}),s.reject)},a=0;a2;return ll(e,(function(e){return e=n?i:e,t.resolve(e),e}),(function(e){return t.reject(e),fl(e)}),t.progress)}function wl(e,t){for(var i,n=0;i=e[n++];)i(t)}function Cl(e,t){for(var i,n=t.length;n>e;)if(null!=(i=t[--n])&&"function"!=typeof i)throw new Error("arg "+n+" must be a function")}function Tl(){}function Pl(e){return e}function El(e){for(var t=e.split("."),i=0,n=t.length;i0&&e.height>0,ol.resolve(rl)},e.onerror=function(){rl=!1,ol.resolve(rl)},e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",ol.promise}function jl(){return Ta(ol)||Yl(),rl}Object.defineProperties(sl,{element:{get:function(){if(sl.supportsFullscreen())return document[al.fullscreenElement]}},changeEventName:{get:function(){if(sl.supportsFullscreen())return al.fullscreenchange}},errorEventName:{get:function(){if(sl.supportsFullscreen())return al.fullscreenerror}},enabled:{get:function(){if(sl.supportsFullscreen())return document[al.fullscreenEnabled]}},fullscreen:{get:function(){if(sl.supportsFullscreen())return null!==sl.element}}}),sl.supportsFullscreen=function(){if(Ta(Ns))return Ns;Ns=!1;var e=document.body;if("function"==typeof e.requestFullscreen)return al.requestFullscreen="requestFullscreen",al.exitFullscreen="exitFullscreen",al.fullscreenEnabled="fullscreenEnabled",al.fullscreenElement="fullscreenElement",al.fullscreenchange="fullscreenchange",al.fullscreenerror="fullscreenerror",Ns=!0;for(var t,i=["webkit","moz","o","ms","khtml"],n=0,r=i.length;n>>0,(i=arguments).length<=1)for(;;){if(o in t){n=t[o++];break}if(++o>=r)throw new TypeError}else n=i[1];for(;o1&&(i-=1),6*i<1?e+6*(t-e)*i:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function tu(e,t,i,n){this.red=Ca(e,1),this.green=Ca(t,1),this.blue=Ca(i,1),this.alpha=Ca(n,1)}Jl.supportsFullscreen=function(){return sl.supportsFullscreen()},Jl.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"},Jl.supportsWebWorkers=function(){return typeof Worker<"u"},Jl.supportsWebAssembly=function(){return typeof WebAssembly<"u"&&!Jl.isEdge()},Jl.supportsOffscreenCanvas=function(){return typeof OffscreenCanvas<"u"&&!Jl.isEdge()},tu.fromCartesian4=function(e,t){return Oa.typeOf.object("cartesian",e),Ta(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new tu(e.x,e.y,e.z,e.w)},tu.fromBytes=function(e,t,i,n,r){return e=tu.byteToFloat(Ca(e,255)),t=tu.byteToFloat(Ca(t,255)),i=tu.byteToFloat(Ca(i,255)),n=tu.byteToFloat(Ca(n,255)),Ta(r)?(r.red=e,r.green=t,r.blue=i,r.alpha=n,r):new tu(e,t,i,n)},tu.fromAlpha=function(e,t,i){return Oa.typeOf.object("color",e),Oa.typeOf.number("alpha",t),Ta(i)?(i.red=e.red,i.green=e.green,i.blue=e.blue,i.alpha=t,i):new tu(e.red,e.green,e.blue,t)},Jl.supportsTypedArrays()&&(Xl=new ArrayBuffer(4),Kl=new Uint32Array(Xl),Zl=new Uint8Array(Xl)),tu.fromRgba=function(e,t){return Kl[0]=e,tu.fromBytes(Zl[0],Zl[1],Zl[2],Zl[3],t)},tu.byteToRgba=function(e,t,i,n){return Zl[0]=e,Zl[1]=t,Zl[2]=i,Zl[3]=n,Kl[0]},tu.fromHsl=function(e,t,i,n,r){e=Ca(e,0)%1,t=Ca(t,0),i=Ca(i,0),n=Ca(n,1);var o=i,a=i,s=i;if(0!==t){var l,u=2*i-(l=i<.5?i*(1+t):i+t-i*t);o=eu(u,l,e+1/3),a=eu(u,l,e),s=eu(u,l,e-1/3)}return Ta(r)?(r.red=o,r.green=a,r.blue=s,r.alpha=n,r):new tu(o,a,s,n)},tu.fromRandom=function(e,t){var i=(e=Ca(e,Ca.EMPTY_OBJECT)).red;if(!Ta(i)){var n=Ca(e.minimumRed,0),r=Ca(e.maximumRed,1);Oa.typeOf.number.lessThanOrEquals("minimumRed",n,r),i=n+Na.nextRandomNumber()*(r-n)}var o=e.green;if(!Ta(o)){var a=Ca(e.minimumGreen,0),s=Ca(e.maximumGreen,1);Oa.typeOf.number.lessThanOrEquals("minimumGreen",a,s),o=a+Na.nextRandomNumber()*(s-a)}var l=e.blue;if(!Ta(l)){var u=Ca(e.minimumBlue,0),c=Ca(e.maximumBlue,1);Oa.typeOf.number.lessThanOrEquals("minimumBlue",u,c),l=u+Na.nextRandomNumber()*(c-u)}var h=e.alpha;if(!Ta(h)){var d=Ca(e.minimumAlpha,0),f=Ca(e.maximumAlpha,1);Oa.typeOf.number.lessThanOrEquals("minumumAlpha",d,f),h=d+Na.nextRandomNumber()*(f-d)}return Ta(t)?(t.red=i,t.green=o,t.blue=l,t.alpha=h,t):new tu(i,o,l,h)};var iu=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i,nu=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,ru=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,ou=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;tu.fromCssColorString=function(e,t){Oa.typeOf.string("color",e),Ta(t)||(t=new tu);var i=tu[e.toUpperCase()];if(Ta(i))return tu.clone(i,t),t;var n=iu.exec(e);return null!==n?(t.red=parseInt(n[1],16)/15,t.green=parseInt(n[2],16)/15,t.blue=parseInt(n[3],16)/15,t.alpha=1,t):null!==(n=nu.exec(e))?(t.red=parseInt(n[1],16)/255,t.green=parseInt(n[2],16)/255,t.blue=parseInt(n[3],16)/255,t.alpha=1,t):null!==(n=ru.exec(e))?(t.red=parseFloat(n[1])/("%"===n[1].substr(-1)?100:255),t.green=parseFloat(n[2])/("%"===n[2].substr(-1)?100:255),t.blue=parseFloat(n[3])/("%"===n[3].substr(-1)?100:255),t.alpha=parseFloat(Ca(n[4],"1.0")),t):null!==(n=ou.exec(e))?tu.fromHsl(parseFloat(n[1])/360,parseFloat(n[2])/100,parseFloat(n[3])/100,parseFloat(Ca(n[4],"1.0")),t):t=void 0},tu.packedLength=4,tu.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Ca(i,0),t[i++]=e.red,t[i++]=e.green,t[i++]=e.blue,t[i]=e.alpha,t},tu.unpack=function(e,t,i){return Oa.defined("array",e),t=Ca(t,0),Ta(i)||(i=new tu),i.red=e[t++],i.green=e[t++],i.blue=e[t++],i.alpha=e[t],i},tu.byteToFloat=function(e){return e/255},tu.floatToByte=function(e){return 1===e?255:256*e|0},tu.clone=function(e,t){if(Ta(e))return Ta(t)?(t.red=e.red,t.green=e.green,t.blue=e.blue,t.alpha=e.alpha,t):new tu(e.red,e.green,e.blue,e.alpha)},tu.equals=function(e,t){return e===t||Ta(e)&&Ta(t)&&e.red===t.red&&e.green===t.green&&e.blue===t.blue&&e.alpha===t.alpha},tu.equalsArray=function(e,t,i){return e.red===t[i]&&e.green===t[i+1]&&e.blue===t[i+2]&&e.alpha===t[i+3]},tu.prototype.clone=function(e){return tu.clone(this,e)},tu.prototype.equals=function(e){return tu.equals(this,e)},tu.prototype.equalsEpsilon=function(e,t){return this===e||Ta(e)&&Math.abs(this.red-e.red)<=t&&Math.abs(this.green-e.green)<=t&&Math.abs(this.blue-e.blue)<=t&&Math.abs(this.alpha-e.alpha)<=t},tu.prototype.toString=function(){return"("+this.red+", "+this.green+", "+this.blue+", "+this.alpha+")"},tu.prototype.toCssColorString=function(){var e=tu.floatToByte(this.red),t=tu.floatToByte(this.green),i=tu.floatToByte(this.blue);return 1===this.alpha?"rgb("+e+","+t+","+i+")":"rgba("+e+","+t+","+i+","+this.alpha+")"},tu.prototype.toCssHexString=function(){let e=tu.floatToByte(this.red).toString(16);e.length<2&&(e=`0${e}`);let t=tu.floatToByte(this.green).toString(16);t.length<2&&(t=`0${t}`);let i=tu.floatToByte(this.blue).toString(16);if(i.length<2&&(i=`0${i}`),this.alpha<1){let n=tu.floatToByte(this.alpha).toString(16);return n.length<2&&(n=`0${n}`),`#${e}${t}${i}${n}`}return`#${e}${t}${i}`},tu.prototype.toBytes=function(e){var t=tu.floatToByte(this.red),i=tu.floatToByte(this.green),n=tu.floatToByte(this.blue),r=tu.floatToByte(this.alpha);return Ta(e)?(e[0]=t,e[1]=i,e[2]=n,e[3]=r,e):[t,i,n,r]},tu.prototype.toRgba=function(){return Zl[0]=tu.floatToByte(this.red),Zl[1]=tu.floatToByte(this.green),Zl[2]=tu.floatToByte(this.blue),Zl[3]=tu.floatToByte(this.alpha),Kl[0]},tu.prototype.brighten=function(e,t){return Oa.typeOf.number("magnitude",e),Oa.typeOf.number.greaterThanOrEquals("magnitude",e,0),Oa.typeOf.object("result",t),e=1-e,t.red=1-(1-this.red)*e,t.green=1-(1-this.green)*e,t.blue=1-(1-this.blue)*e,t.alpha=this.alpha,t},tu.prototype.darken=function(e,t){return Oa.typeOf.number("magnitude",e),Oa.typeOf.number.greaterThanOrEquals("magnitude",e,0),Oa.typeOf.object("result",t),e=1-e,t.red=this.red*e,t.green=this.green*e,t.blue=this.blue*e,t.alpha=this.alpha,t},tu.prototype.withAlpha=function(e,t){return tu.fromAlpha(this,e,t)},tu.add=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.red=e.red+t.red,i.green=e.green+t.green,i.blue=e.blue+t.blue,i.alpha=e.alpha+t.alpha,i},tu.subtract=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.red=e.red-t.red,i.green=e.green-t.green,i.blue=e.blue-t.blue,i.alpha=e.alpha-t.alpha,i},tu.multiply=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.red=e.red*t.red,i.green=e.green*t.green,i.blue=e.blue*t.blue,i.alpha=e.alpha*t.alpha,i},tu.divide=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.red=e.red/t.red,i.green=e.green/t.green,i.blue=e.blue/t.blue,i.alpha=e.alpha/t.alpha,i},tu.mod=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.red=e.red%t.red,i.green=e.green%t.green,i.blue=e.blue%t.blue,i.alpha=e.alpha%t.alpha,i},tu.lerp=function(e,t,i,n){return Oa.typeOf.object("start",e),Oa.typeOf.object("end",t),Oa.typeOf.number("t",i),Oa.typeOf.object("result",n),n.red=Na.lerp(e.red,t.red,i),n.green=Na.lerp(e.green,t.green,i),n.blue=Na.lerp(e.blue,t.blue,i),n.alpha=Na.lerp(e.alpha,t.alpha,i),n},tu.multiplyByScalar=function(e,t,i){return Oa.typeOf.object("color",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.red=e.red*t,i.green=e.green*t,i.blue=e.blue*t,i.alpha=e.alpha*t,i},tu.divideByScalar=function(e,t,i){return Oa.typeOf.object("color",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.red=e.red/t,i.green=e.green/t,i.blue=e.blue/t,i.alpha=e.alpha/t,i},tu.ALICEBLUE=Object.freeze(tu.fromCssColorString("#F0F8FF")),tu.ANTIQUEWHITE=Object.freeze(tu.fromCssColorString("#FAEBD7")),tu.AQUA=Object.freeze(tu.fromCssColorString("#00FFFF")),tu.AQUAMARINE=Object.freeze(tu.fromCssColorString("#7FFFD4")),tu.AZURE=Object.freeze(tu.fromCssColorString("#F0FFFF")),tu.BEIGE=Object.freeze(tu.fromCssColorString("#F5F5DC")),tu.BISQUE=Object.freeze(tu.fromCssColorString("#FFE4C4")),tu.BLACK=Object.freeze(tu.fromCssColorString("#000000")),tu.BLANCHEDALMOND=Object.freeze(tu.fromCssColorString("#FFEBCD")),tu.BLUE=Object.freeze(tu.fromCssColorString("#0000FF")),tu.BLUEVIOLET=Object.freeze(tu.fromCssColorString("#8A2BE2")),tu.BROWN=Object.freeze(tu.fromCssColorString("#A52A2A")),tu.BURLYWOOD=Object.freeze(tu.fromCssColorString("#DEB887")),tu.CADETBLUE=Object.freeze(tu.fromCssColorString("#5F9EA0")),tu.CHARTREUSE=Object.freeze(tu.fromCssColorString("#7FFF00")),tu.CHOCOLATE=Object.freeze(tu.fromCssColorString("#D2691E")),tu.CORAL=Object.freeze(tu.fromCssColorString("#FF7F50")),tu.CORNFLOWERBLUE=Object.freeze(tu.fromCssColorString("#6495ED")),tu.CORNSILK=Object.freeze(tu.fromCssColorString("#FFF8DC")),tu.CRIMSON=Object.freeze(tu.fromCssColorString("#DC143C")),tu.CYAN=Object.freeze(tu.fromCssColorString("#00FFFF")),tu.DARKBLUE=Object.freeze(tu.fromCssColorString("#00008B")),tu.DARKCYAN=Object.freeze(tu.fromCssColorString("#008B8B")),tu.DARKGOLDENROD=Object.freeze(tu.fromCssColorString("#B8860B")),tu.DARKGRAY=Object.freeze(tu.fromCssColorString("#A9A9A9")),tu.DARKGREEN=Object.freeze(tu.fromCssColorString("#006400")),tu.DARKGREY=tu.DARKGRAY,tu.DARKKHAKI=Object.freeze(tu.fromCssColorString("#BDB76B")),tu.DARKMAGENTA=Object.freeze(tu.fromCssColorString("#8B008B")),tu.DARKOLIVEGREEN=Object.freeze(tu.fromCssColorString("#556B2F")),tu.DARKORANGE=Object.freeze(tu.fromCssColorString("#FF8C00")),tu.DARKORCHID=Object.freeze(tu.fromCssColorString("#9932CC")),tu.DARKRED=Object.freeze(tu.fromCssColorString("#8B0000")),tu.DARKSALMON=Object.freeze(tu.fromCssColorString("#E9967A")),tu.DARKSEAGREEN=Object.freeze(tu.fromCssColorString("#8FBC8F")),tu.DARKSLATEBLUE=Object.freeze(tu.fromCssColorString("#483D8B")),tu.DARKSLATEGRAY=Object.freeze(tu.fromCssColorString("#2F4F4F")),tu.DARKSLATEGREY=tu.DARKSLATEGRAY,tu.DARKTURQUOISE=Object.freeze(tu.fromCssColorString("#00CED1")),tu.DARKVIOLET=Object.freeze(tu.fromCssColorString("#9400D3")),tu.DEEPPINK=Object.freeze(tu.fromCssColorString("#FF1493")),tu.DEEPSKYBLUE=Object.freeze(tu.fromCssColorString("#00BFFF")),tu.DIMGRAY=Object.freeze(tu.fromCssColorString("#696969")),tu.DIMGREY=tu.DIMGRAY,tu.DODGERBLUE=Object.freeze(tu.fromCssColorString("#1E90FF")),tu.FIREBRICK=Object.freeze(tu.fromCssColorString("#B22222")),tu.FLORALWHITE=Object.freeze(tu.fromCssColorString("#FFFAF0")),tu.FORESTGREEN=Object.freeze(tu.fromCssColorString("#228B22")),tu.FUCHSIA=Object.freeze(tu.fromCssColorString("#FF00FF")),tu.GAINSBORO=Object.freeze(tu.fromCssColorString("#DCDCDC")),tu.GHOSTWHITE=Object.freeze(tu.fromCssColorString("#F8F8FF")),tu.GOLD=Object.freeze(tu.fromCssColorString("#FFD700")),tu.GOLDENROD=Object.freeze(tu.fromCssColorString("#DAA520")),tu.GRAY=Object.freeze(tu.fromCssColorString("#808080")),tu.GREEN=Object.freeze(tu.fromCssColorString("#008000")),tu.GREENYELLOW=Object.freeze(tu.fromCssColorString("#ADFF2F")),tu.GREY=tu.GRAY,tu.HONEYDEW=Object.freeze(tu.fromCssColorString("#F0FFF0")),tu.HOTPINK=Object.freeze(tu.fromCssColorString("#FF69B4")),tu.INDIANRED=Object.freeze(tu.fromCssColorString("#CD5C5C")),tu.INDIGO=Object.freeze(tu.fromCssColorString("#4B0082")),tu.IVORY=Object.freeze(tu.fromCssColorString("#FFFFF0")),tu.KHAKI=Object.freeze(tu.fromCssColorString("#F0E68C")),tu.LAVENDER=Object.freeze(tu.fromCssColorString("#E6E6FA")),tu.LAVENDAR_BLUSH=Object.freeze(tu.fromCssColorString("#FFF0F5")),tu.LAWNGREEN=Object.freeze(tu.fromCssColorString("#7CFC00")),tu.LEMONCHIFFON=Object.freeze(tu.fromCssColorString("#FFFACD")),tu.LIGHTBLUE=Object.freeze(tu.fromCssColorString("#ADD8E6")),tu.LIGHTCORAL=Object.freeze(tu.fromCssColorString("#F08080")),tu.LIGHTCYAN=Object.freeze(tu.fromCssColorString("#E0FFFF")),tu.LIGHTGOLDENRODYELLOW=Object.freeze(tu.fromCssColorString("#FAFAD2")),tu.LIGHTGRAY=Object.freeze(tu.fromCssColorString("#D3D3D3")),tu.LIGHTGREEN=Object.freeze(tu.fromCssColorString("#90EE90")),tu.LIGHTGREY=tu.LIGHTGRAY,tu.LIGHTPINK=Object.freeze(tu.fromCssColorString("#FFB6C1")),tu.LIGHTSEAGREEN=Object.freeze(tu.fromCssColorString("#20B2AA")),tu.LIGHTSKYBLUE=Object.freeze(tu.fromCssColorString("#87CEFA")),tu.LIGHTSLATEGRAY=Object.freeze(tu.fromCssColorString("#778899")),tu.LIGHTSLATEGREY=tu.LIGHTSLATEGRAY,tu.LIGHTSTEELBLUE=Object.freeze(tu.fromCssColorString("#B0C4DE")),tu.LIGHTYELLOW=Object.freeze(tu.fromCssColorString("#FFFFE0")),tu.LIME=Object.freeze(tu.fromCssColorString("#00FF00")),tu.LIMEGREEN=Object.freeze(tu.fromCssColorString("#32CD32")),tu.LINEN=Object.freeze(tu.fromCssColorString("#FAF0E6")),tu.MAGENTA=Object.freeze(tu.fromCssColorString("#FF00FF")),tu.MAROON=Object.freeze(tu.fromCssColorString("#800000")),tu.MEDIUMAQUAMARINE=Object.freeze(tu.fromCssColorString("#66CDAA")),tu.MEDIUMBLUE=Object.freeze(tu.fromCssColorString("#0000CD")),tu.MEDIUMORCHID=Object.freeze(tu.fromCssColorString("#BA55D3")),tu.MEDIUMPURPLE=Object.freeze(tu.fromCssColorString("#9370DB")),tu.MEDIUMSEAGREEN=Object.freeze(tu.fromCssColorString("#3CB371")),tu.MEDIUMSLATEBLUE=Object.freeze(tu.fromCssColorString("#7B68EE")),tu.MEDIUMSPRINGGREEN=Object.freeze(tu.fromCssColorString("#00FA9A")),tu.MEDIUMTURQUOISE=Object.freeze(tu.fromCssColorString("#48D1CC")),tu.MEDIUMVIOLETRED=Object.freeze(tu.fromCssColorString("#C71585")),tu.MIDNIGHTBLUE=Object.freeze(tu.fromCssColorString("#191970")),tu.MINTCREAM=Object.freeze(tu.fromCssColorString("#F5FFFA")),tu.MISTYROSE=Object.freeze(tu.fromCssColorString("#FFE4E1")),tu.MOCCASIN=Object.freeze(tu.fromCssColorString("#FFE4B5")),tu.NAVAJOWHITE=Object.freeze(tu.fromCssColorString("#FFDEAD")),tu.NAVY=Object.freeze(tu.fromCssColorString("#000080")),tu.OLDLACE=Object.freeze(tu.fromCssColorString("#FDF5E6")),tu.OLIVE=Object.freeze(tu.fromCssColorString("#808000")),tu.OLIVEDRAB=Object.freeze(tu.fromCssColorString("#6B8E23")),tu.ORANGE=Object.freeze(tu.fromCssColorString("#FFA500")),tu.ORANGERED=Object.freeze(tu.fromCssColorString("#FF4500")),tu.ORCHID=Object.freeze(tu.fromCssColorString("#DA70D6")),tu.PALEGOLDENROD=Object.freeze(tu.fromCssColorString("#EEE8AA")),tu.PALEGREEN=Object.freeze(tu.fromCssColorString("#98FB98")),tu.PALETURQUOISE=Object.freeze(tu.fromCssColorString("#AFEEEE")),tu.PALEVIOLETRED=Object.freeze(tu.fromCssColorString("#DB7093")),tu.PAPAYAWHIP=Object.freeze(tu.fromCssColorString("#FFEFD5")),tu.PEACHPUFF=Object.freeze(tu.fromCssColorString("#FFDAB9")),tu.PERU=Object.freeze(tu.fromCssColorString("#CD853F")),tu.PINK=Object.freeze(tu.fromCssColorString("#FFC0CB")),tu.PLUM=Object.freeze(tu.fromCssColorString("#DDA0DD")),tu.POWDERBLUE=Object.freeze(tu.fromCssColorString("#B0E0E6")),tu.PURPLE=Object.freeze(tu.fromCssColorString("#800080")),tu.RED=Object.freeze(tu.fromCssColorString("#FF0000")),tu.ROSYBROWN=Object.freeze(tu.fromCssColorString("#BC8F8F")),tu.ROYALBLUE=Object.freeze(tu.fromCssColorString("#4169E1")),tu.SADDLEBROWN=Object.freeze(tu.fromCssColorString("#8B4513")),tu.SALMON=Object.freeze(tu.fromCssColorString("#FA8072")),tu.SANDYBROWN=Object.freeze(tu.fromCssColorString("#F4A460")),tu.SEAGREEN=Object.freeze(tu.fromCssColorString("#2E8B57")),tu.SEASHELL=Object.freeze(tu.fromCssColorString("#FFF5EE")),tu.SIENNA=Object.freeze(tu.fromCssColorString("#A0522D")),tu.SILVER=Object.freeze(tu.fromCssColorString("#C0C0C0")),tu.SKYBLUE=Object.freeze(tu.fromCssColorString("#87CEEB")),tu.SLATEBLUE=Object.freeze(tu.fromCssColorString("#6A5ACD")),tu.SLATEGRAY=Object.freeze(tu.fromCssColorString("#708090")),tu.SLATEGREY=tu.SLATEGRAY,tu.SNOW=Object.freeze(tu.fromCssColorString("#FFFAFA")),tu.SPRINGGREEN=Object.freeze(tu.fromCssColorString("#00FF7F")),tu.STEELBLUE=Object.freeze(tu.fromCssColorString("#4682B4")),tu.TAN=Object.freeze(tu.fromCssColorString("#D2B48C")),tu.TEAL=Object.freeze(tu.fromCssColorString("#008080")),tu.THISTLE=Object.freeze(tu.fromCssColorString("#D8BFD8")),tu.TOMATO=Object.freeze(tu.fromCssColorString("#FF6347")),tu.TURQUOISE=Object.freeze(tu.fromCssColorString("#40E0D0")),tu.VIOLET=Object.freeze(tu.fromCssColorString("#EE82EE")),tu.WHEAT=Object.freeze(tu.fromCssColorString("#F5DEB3")),tu.WHITE=Object.freeze(tu.fromCssColorString("#FFFFFF")),tu.WHITESMOKE=Object.freeze(tu.fromCssColorString("#F5F5F5")),tu.YELLOW=Object.freeze(tu.fromCssColorString("#FFFF00")),tu.YELLOWGREEN=Object.freeze(tu.fromCssColorString("#9ACD32")),tu.TRANSPARENT=Object.freeze(new tu(0,0,0,0));var au={CLOCKWISE:Aa.CW,COUNTER_CLOCKWISE:Aa.CCW,NONE:Aa.NONE,validate:function(e){return e===au.CLOCKWISE||e===au.COUNTER_CLOCKWISE}},su=Object.freeze(au),lu={_maximumCombinedTextureImageUnits:0,_maximumCubeMapSize:0,_maximumFragmentUniformVectors:0,_maximumTextureImageUnits:0,_maximumRenderbufferSize:0,_maximumTextureSize:0,_maximumVaryingVectors:0,_maximumVertexAttributes:0,_maximumVertexTextureImageUnits:0,_maximumVertexUniformVectors:0,_minimumAliasedLineWidth:0,_maximumAliasedLineWidth:0,_minimumAliasedPointSize:0,_maximumAliasedPointSize:0,_maximumViewportWidth:0,_maximumViewportHeight:0,_maximumTextureFilterAnisotropy:0,_maximumDrawBuffers:0,_maximumColorAttachments:0,_highpFloatSupported:!1,_highpIntSupported:!1,_uniformBufferOffsetAlignment:256,_maxUniformBufferBinding:36,_maxArrayTextureLayers:256};function uu(e){if("object"!=typeof e||null===e)return e;for(var t,i=Object.keys(e),n=0;nlu.maximumAliasedLineWidth)throw new Pa("renderState.lineWidth is out of range. Check minimumAliasedLineWidth and maximumAliasedLineWidth.");if(!su.validate(this.frontFace))throw new Pa("Invalid renderState.frontFace.");if(!du(this.cull.face))throw new Pa("Invalid renderState.cull.face.");if(this.scissorTest.rectangle.width<0||this.scissorTest.rectangle.height<0)throw new Pa("renderState.scissorTest.rectangle.width and renderState.scissorTest.rectangle.height must be greater than or equal to zero.");if(this.depthRange.near>this.depthRange.far)throw new Pa("renderState.depthRange.near can not be greater than renderState.depthRange.far.");if(this.depthRange.near<0)throw new Pa("renderState.depthRange.near must be greater than or equal to zero.");if(this.depthRange.far>1)throw new Pa("renderState.depthRange.far must be less than or equal to one.");if(!fu(this.depthTest.func))throw new Pa("Invalid renderState.depthTest.func.");if(this.blending.color.red<0||this.blending.color.red>1||this.blending.color.green<0||this.blending.color.green>1||this.blending.color.blue<0||this.blending.color.blue>1||this.blending.color.alpha<0||this.blending.color.alpha>1)throw new Pa("renderState.blending.color components must be greater than or equal to zero and less than or equal to one.");if(!cu(this.blending.equationRgb))throw new Pa("Invalid renderState.blending.equationRgb.");if(!cu(this.blending.equationAlpha))throw new Pa("Invalid renderState.blending.equationAlpha.");if(!hu(this.blending.functionSourceRgb))throw new Pa("Invalid renderState.blending.functionSourceRgb.");if(!hu(this.blending.functionSourceAlpha))throw new Pa("Invalid renderState.blending.functionSourceAlpha.");if(!hu(this.blending.functionDestinationRgb))throw new Pa("Invalid renderState.blending.functionDestinationRgb.");if(!hu(this.blending.functionDestinationAlpha))throw new Pa("Invalid renderState.blending.functionDestinationAlpha.");if(!pu(this.stencilTest.frontFunction))throw new Pa("Invalid renderState.stencilTest.frontFunction.");if(!pu(this.stencilTest.backFunction))throw new Pa("Invalid renderState.stencilTest.backFunction.");if(!_u(this.stencilTest.frontOperation.fail))throw new Pa("Invalid renderState.stencilTest.frontOperation.fail.");if(!_u(this.stencilTest.frontOperation.zFail))throw new Pa("Invalid renderState.stencilTest.frontOperation.zFail.");if(!_u(this.stencilTest.frontOperation.zPass))throw new Pa("Invalid renderState.stencilTest.frontOperation.zPass.");if(!_u(this.stencilTest.backOperation.fail))throw new Pa("Invalid renderState.stencilTest.backOperation.fail.");if(!_u(this.stencilTest.backOperation.zFail))throw new Pa("Invalid renderState.stencilTest.backOperation.zFail.");if(!_u(this.stencilTest.backOperation.zPass))throw new Pa("Invalid renderState.stencilTest.backOperation.zPass.");if(Ta(this.viewport)){if(this.viewport.width<0)throw new Pa("renderState.viewport.width must be greater than or equal to zero.");if(this.viewport.height<0)throw new Pa("renderState.viewport.height must be greater than or equal to zero.");if(this.viewport.width>lu.maximumViewportWidth)throw new Pa("renderState.viewport.width must be less than or equal to the maximum viewport width ("+lu.maximumViewportWidth.toString()+"). Check maximumViewportWidth.");if(this.viewport.height>lu.maximumViewportHeight)throw new Pa("renderState.viewport.height must be less than or equal to the maximum viewport height ("+lu.maximumViewportHeight.toString()+"). Check maximumViewportHeight.")}this.id=0,this._applyFunctions=[]}Object.defineProperties(lu,{maximumCombinedTextureImageUnits:{get:function(){return lu._maximumCombinedTextureImageUnits}},maximumCubeMapSize:{get:function(){return lu._maximumCubeMapSize}},maximumFragmentUniformVectors:{get:function(){return lu._maximumFragmentUniformVectors}},maximumTextureImageUnits:{get:function(){return lu._maximumTextureImageUnits}},maximumRenderbufferSize:{get:function(){return lu._maximumRenderbufferSize}},maximumTextureSize:{get:function(){return lu._maximumTextureSize}},maximumVaryingVectors:{get:function(){return lu._maximumVaryingVectors}},maximumVertexAttributes:{get:function(){return lu._maximumVertexAttributes}},maximumVertexTextureImageUnits:{get:function(){return lu._maximumVertexTextureImageUnits}},maximumVertexUniformVectors:{get:function(){return lu._maximumVertexUniformVectors}},minimumAliasedLineWidth:{get:function(){return lu._minimumAliasedLineWidth}},maximumAliasedLineWidth:{get:function(){return lu._maximumAliasedLineWidth}},minimumAliasedPointSize:{get:function(){return lu._minimumAliasedPointSize}},maximumAliasedPointSize:{get:function(){return lu._maximumAliasedPointSize}},maximumViewportWidth:{get:function(){return lu._maximumViewportWidth}},maximumViewportHeight:{get:function(){return lu._maximumViewportHeight}},maximumTextureFilterAnisotropy:{get:function(){return lu._maximumTextureFilterAnisotropy}},maximumDrawBuffers:{get:function(){return lu._maximumDrawBuffers}},maximumColorAttachments:{get:function(){return lu._maximumColorAttachments}},highpFloatSupported:{get:function(){return lu._highpFloatSupported}},highpIntSupported:{get:function(){return lu._highpIntSupported}},uniformBufferOffsetAlignment:{get:function(){return lu._uniformBufferOffsetAlignment}},maxUniformBufferBinding:{get:function(){return lu._maxUniformBufferBinding}},maxArrayTextureLayers:{get:function(){return lu._maxArrayTextureLayers}}});var $u=0,gu={};function yu(e,t,i){i?e.enable(t):e.disable(t)}function vu(e,t){e.frontFace(t.frontFace)}function xu(e,t){var i=t.cull,n=i.enabled;yu(e,e.CULL_FACE,n),n&&e.cullFace(i.face)}function bu(e,t){e.lineWidth(t.lineWidth)}function Su(e,t){var i=t.polygonOffset,n=i.enabled;yu(e,e.POLYGON_OFFSET_FILL,n),n&&e.polygonOffset(i.factor,i.units)}function wu(e,t,i){var n=t.scissorTest,r=Ta(i.scissorTest)?i.scissorTest.enabled:n.enabled;if(yu(e,e.SCISSOR_TEST,r),r){var o=Ta(i.scissorTest)?i.scissorTest.rectangle:n.rectangle;e.scissor(o.x,o.y,o.width,o.height)}}function Cu(e,t){var i=t.depthRange;e.depthRange(i.near,i.far)}function Tu(e,t){var i=t.depthTest,n=i.enabled;yu(e,e.DEPTH_TEST,n),n&&e.depthFunc(i.func)}function Pu(e,t){var i=t.colorMask;e.colorMask(i.red,i.green,i.blue,i.alpha)}function Eu(e,t){e.depthMask(t.depthMask)}function Au(e,t){e.stencilMask(t.stencilMask)}function Lu(e,t){e.blendColor(t.red,t.green,t.blue,t.alpha)}function Mu(e,t,i){var n=t.blending,r=Ta(i.blendingEnabled)?i.blendingEnabled:n.enabled;yu(e,e.BLEND,r),r&&(Lu(e,n.color),e.blendEquationSeparate(n.equationRgb,n.equationAlpha),e.blendFuncSeparate(n.functionSourceRgb,n.functionDestinationRgb,n.functionSourceAlpha,n.functionDestinationAlpha))}function Iu(e,t){var i=t.stencilTest,n=i.enabled;if(yu(e,e.STENCIL_TEST,n),n){var r=i.frontFunction,o=i.backFunction,a=i.reference,s=i.mask;e.stencilFunc(r,a,s),e.stencilFuncSeparate(e.BACK,o,a,s),e.stencilFuncSeparate(e.FRONT,r,a,s);var l=i.frontOperation,u=l.fail,c=l.zFail,h=l.zPass;e.stencilOpSeparate(e.FRONT,u,c,h);var d=i.backOperation,f=d.fail,p=d.zFail,_=d.zPass;e.stencilOpSeparate(e.BACK,f,p,_)}}function Ou(e,t){var i=t.sampleCoverage,n=i.enabled;yu(e,e.SAMPLE_COVERAGE,n),n&&e.sampleCoverage(i.value,i.invert)}mu.fromCache=function(e){var t=JSON.stringify(e),i=gu[t];if(Ta(i))return++i.referenceCount,i.state;var n=new mu(e),r=JSON.stringify(n);return Ta(i=gu[r])||(n.id=$u++,i={referenceCount:0,state:n=uu(n)},gu[r]=i),++i.referenceCount,gu[t]={referenceCount:1,state:i.state},i.state},mu.removeFromCache=function(e){var t=new mu(e),i=JSON.stringify(t),n=gu[i],r=JSON.stringify(e),o=gu[r];Ta(o)&&(--o.referenceCount,0===o.referenceCount&&(delete gu[r],Ta(n)&&--n.referenceCount)),Ta(n)&&0===n.referenceCount&&delete gu[i]},mu.getCache=function(){return gu},mu.clearCache=function(){gu={}};var Du=new Is;function Ru(e,t,i){var n=Ca(t.viewport,i.viewport);Ta(n)||((n=Du).width=i.context.drawingBufferWidth,n.height=i.context.drawingBufferHeight),i.context.uniformState.viewport=n,e.viewport(n.x,n.y,n.width,n.height)}function Nu(e,t){var i=[];return e.frontFace!==t.frontFace&&i.push(vu),(e.cull.enabled!==t.cull.enabled||e.cull.face!==t.cull.face)&&i.push(xu),e.lineWidth!==t.lineWidth&&i.push(bu),(e.polygonOffset.enabled!==t.polygonOffset.enabled||e.polygonOffset.factor!==t.polygonOffset.factor||e.polygonOffset.units!==t.polygonOffset.units)&&i.push(Su),(e.depthRange.near!==t.depthRange.near||e.depthRange.far!==t.depthRange.far)&&i.push(Cu),(e.depthTest.enabled!==t.depthTest.enabled||e.depthTest.func!==t.depthTest.func)&&i.push(Tu),(e.colorMask.red!==t.colorMask.red||e.colorMask.green!==t.colorMask.green||e.colorMask.blue!==t.colorMask.blue||e.colorMask.alpha!==t.colorMask.alpha)&&i.push(Pu),e.depthMask!==t.depthMask&&i.push(Eu),e.stencilMask!==t.stencilMask&&i.push(Au),(e.stencilTest.enabled!==t.stencilTest.enabled||e.stencilTest.frontFunction!==t.stencilTest.frontFunction||e.stencilTest.backFunction!==t.stencilTest.backFunction||e.stencilTest.reference!==t.stencilTest.reference||e.stencilTest.mask!==t.stencilTest.mask||e.stencilTest.frontOperation.fail!==t.stencilTest.frontOperation.fail||e.stencilTest.frontOperation.zFail!==t.stencilTest.frontOperation.zFail||e.stencilTest.backOperation.fail!==t.stencilTest.backOperation.fail||e.stencilTest.backOperation.zFail!==t.stencilTest.backOperation.zFail||e.stencilTest.backOperation.zPass!==t.stencilTest.backOperation.zPass)&&i.push(Iu),(e.sampleCoverage.enabled!==t.sampleCoverage.enabled||e.sampleCoverage.value!==t.sampleCoverage.value||e.sampleCoverage.invert!==t.sampleCoverage.invert)&&i.push(Ou),i}mu.apply=function(e,t,i){vu(e,t),xu(e,t),bu(e,t),Su(e,t),Cu(e,t),Tu(e,t),Pu(e,t),Eu(e,t),Au(e,t),Iu(e,t),Ou(e,t),wu(e,t,i),Mu(e,t,i),Ru(e,t,i)},mu.partialApply=function(e,t,i,n,r,o,a,s){if(t!==i){var l=i._applyFunctions[t.id];Ta(l)||(l=Nu(t,i),i._applyFunctions[t.id]=l);for(var u=l.length,c=0;c=n)){for(var r=e[i+n>>1],o=i-1,a=n+1;;){do{o++}while(e[o]r);if(o>=a)break;Ju(e,o,a),Ju(t,3*o,3*a),Ju(t,3*o+1,3*a+1),Ju(t,3*o+2,3*a+2)}Zu(e,t,i,a),Zu(e,t,a+1,n)}}function Ju(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function Qu(e,t,i,n){this.x=Ca(e,0),this.y=Ca(t,0),this.z=Ca(i,0),this.w=Ca(n,0)}Ku.prototype.add=function(e,t,i,n){this.ids.push(e),this.positions.push(t,i,n)},Ku.prototype.getPositions=function(e){for(var t=0,i=this.ids.length-1;t>1;this.ids[n]>=e?i=n:t=n+1}for(var r=[];this.ids[t]===e;){var o=this.positions[3*t],a=this.positions[3*t+1],s=this.positions[3*t+2];r.push({index:o,start:a,end:s}),t++}return r},Ku.serialize=function(e,t){var i=new Float64Array(e.ids),n=new Uint32Array(e.positions);return Zu(i,n,0,i.length-1),t&&t.push(i.buffer,n.buffer),{ids:i,positions:n}},Ku.deserialize=function(e){var t=new Ku;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t},en.register("FeaturePositionMap",Ku),Qu.fromElements=function(e,t,i,n,r){return Ta(r)?(r.x=e,r.y=t,r.z=i,r.w=n,r):new Qu(e,t,i,n)},Qu.fromColor=function(e,t){return Oa.typeOf.object("color",e),Ta(t)?(t.x=e.red,t.y=e.green,t.z=e.blue,t.w=e.alpha,t):new Qu(e.red,e.green,e.blue,e.alpha)},Qu.clone=function(e,t){if(Ta(e))return Ta(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new Qu(e.x,e.y,e.z,e.w)},Qu.packedLength=4,Qu.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Ca(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.z,t[i]=e.w,t},Qu.unpack=function(e,t,i){return Oa.defined("array",e),t=Ca(t,0),Ta(i)||(i=new Qu),i.x=e[t++],i.y=e[t++],i.z=e[t++],i.w=e[t],i},Qu.packArray=function(e,t){Oa.defined("array",e);var i=e.length,n=4*i;if(Ta(t)){if(!Array.isArray(t)&&t.length!==n)throw new Pa("If result is a typed array, it must have exactly array.length * 4 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;r=cc)return n<0?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY;var r=n*e.x*sc;return r+=n*e.y*lc,(r+=n*e.z*uc)*Math.pow(10,i)};var hc,dc=(hc=!0,function(e,t){var i=hc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return hc=!1,i}),fc=dc(void 0,(function(){return fc.toString().search("(((.+)+)+)+$").toString().constructor(fc).search("(((.+)+)+)+$")}));function pc(e,t,i){return Math.min(i,Math.max(t,e))}function _c(e,t){return 256*(e=pc(Math.floor(e),0,255))+(t=pc(Math.floor(t),0,255))}function mc(e){return[_c(255*e.r,255*e.g),_c(255*e.b,255*e.a)]}fc();var $c=function(e,t,i){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=i,this.maxValue=-1/0};$c.prototype.defines=function(){return this.names.map((function(e){return"HAS_UNIFORM_u_"+e}))},$c.prototype.setConstantPatternPositions=function(){},$c.prototype.populatePaintArray=function(){},$c.prototype.updatePaintArray=function(){},$c.prototype.upload=function(){},$c.prototype.destroy=function(){},$c.prototype.setUniforms=function(e,t,i,n){t.set(n.constantOr(this.value))},$c.prototype.getBinding=function(e,t){return"color"===this.type?new ba.UniformColor(e,t):new ba.Uniform1f(e,t)},$c.prototype.setUniformMap=function(e,t,i,n){var r=this;e[t]=function(){var e=n.get(i).constantOr(r.value);return"color"===r.type&&(e.red=e.r,e.green=e.g,e.blue=e.b,e.alpha=e.a),e}},$c.serialize=function(e){var t=e.value,i=e.names,n=e.type;return{value:en.serialize(t),names:i,type:n}},$c.deserialize=function(e){var t=e.value,i=e.names,n=e.type;return new $c(en.deserialize(t),i,n)};var gc=function(e,t,i){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=i,this.maxValue=-1/0,this.patternPositions={patternTo:null,patternFrom:null}};gc.prototype.defines=function(){return this.names.map((function(e){return"HAS_UNIFORM_u_"+e}))},gc.prototype.populatePaintArray=function(){},gc.prototype.updatePaintArray=function(){},gc.prototype.upload=function(){},gc.prototype.destroy=function(){},gc.prototype.setConstantPatternPositions=function(e,t){this.patternPositions.patternTo=e.tlbr,this.patternPositions.patternFrom=t.tlbr},gc.prototype.setUniforms=function(e,t,i,n,r){var o=this.patternPositions;"u_pattern_to"===r&&o.patternTo&&t.set(Qu(o.patternTo[0],o.patternTo[1],o.patternTo[2],o.patternTo[3])),"u_pattern_from"===r&&o.patternFrom&&t.set(Qu(o.patternFrom[0],o.patternFrom[1],o.patternFrom[2],o.patternFrom[3]))},gc.prototype.getBinding=function(e,t){return new ba.Uniform4f(e,t)},gc.prototype.setUniformMap=function(e,t,i,n){var r=this.patternPositions;e[t]=function(){return"u_pattern_to"===t&&r.patternTo?new Qu(r.patternTo[0],r.patternTo[1],r.patternTo[2],r.patternTo[3]):"u_pattern_from"===t&&r.patternFrom?new Qu(r.patternFrom[0],r.patternFrom[1],r.patternFrom[2],r.patternFrom[3]):void console.log("CrossFadedConstantBinder is not support")}};var yc=function(e,t,i,n){this.expression=e,this.names=t,this.type=i,this.uniformNames=this.names.map((function(e){return"a_"+e})),this.maxValue=-1/0,this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:"color"===i?2:1,offset:0}})),this.paintVertexArray=new n};yc.prototype.defines=function(){return[]},yc.prototype.setConstantPatternPositions=function(){},yc.prototype.populatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=r.length;r.reserve(e);var a=this.expression.evaluate(new $o(0),t,{},[],n);if("color"===this.type)for(var s=mc(a),l=o;l-1&&(i[l]=function(){return 0});return i}destroy(){for(const e in this.binders)this.binders[e].destroy()}}class Sc{constructor(e,t,i,n){void 0===n&&(n=function(){return!0}),this.programConfigurations={};for(const r of t)this.programConfigurations[r.id]=bc.createDynamic(r,i,n),this.programConfigurations[r.id].layoutAttributes=e;this.needsUpload=!1,this._featureMap=new Ku,this._bufferOffset=0}populatePaintArrays(e,t,i,n,r){for(const o in this.programConfigurations)this.programConfigurations[o].populatePaintArrays(e,t,i,n,r);void 0!==t.id&&this._featureMap.add(+t.id,i,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,i,n){for(const r of i)this.needsUpload=this.programConfigurations[r.id].updatePaintArrays(e,this._featureMap,t,r,n)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(const t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(const e in this.programConfigurations)this.programConfigurations[e].destroy()}}function wc(e,t){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"text-show-background":["show-background"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from"],"fill-pattern":["pattern_to","pattern_from"],"fill-extrusion-pattern":["pattern_to","pattern_from"]}[e]||[e.replace(t+"-","").replace(/-/g,"_")]}function Cc(e){return{"line-pattern":{source:ra,composite:ra},"fill-pattern":{source:ra,composite:ra},"fill-extrusion-pattern":{source:ra,composite:ra}}[e]}function Tc(e,t,i){var n={color:{source:ta,composite:ia},number:{source:Xo,composite:ta}},r=Cc(e);return r&&r[i]||n[t][i]}en.register("ConstantBinder",$c),en.register("CrossFadedConstantBinder",gc),en.register("SourceExpressionBinder",yc),en.register("CrossFadedCompositeBinder",xc),en.register("CompositeExpressionBinder",vc),en.register("ProgramConfiguration",bc,{omit:["_buffers"]}),en.register("ProgramConfigurationSet",Sc);var Pc,Ec=(Pc=!0,function(e,t){var i=Pc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Pc=!1,i}),Ac=Ec(void 0,(function(){return Ac.toString().search("(((.+)+)+)+$").toString().constructor(Ac).search("(((.+)+)+)+$")}));Ac();var Lc=ao([{name:"a_pos",components:2,type:"Int16"}],4),Mc=Lc.members,Ic=ao([{name:"a_pos",components:2,type:"Float32"}],4),Oc=Ic.members;function Dc(e,t,i,n,r){e.emplaceBack(2*t+(n+1)/2,2*i+(r+1)/2)}var Rc=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this._sourceLayerIds={};var t=this;this.layerIds=this.layers.map((function(e,i){return t._sourceLayerIds[e.sourceLayer]=i,e.sourceLayer})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new No,this.indexArray=new Jo,this.segments=new Ao,this.programConfigurations=new Sc(members,e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};Rc.prototype.populate=function(e,t){var i=this.layers[0],n=[],r=null;"circle"===i.type&&(r=i.layout.get("circle-sort-key"));for(var o=0,a=e;o0&&(this.layoutCesiumVertexBuffer=Yu.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=Yu.toIndexBuffer(e,this.indexArray))}this.programConfigurations.upload(e),this.uploaded=!0},Rc.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Rc.prototype.clear=function(){Ta(this.layoutVertexArray)&&(this.layoutVertexArray=null),Ta(this.indexArray)&&(this.indexArray=null)},Rc.prototype.addFeature=function(e,t,i){for(var n=0,r=t;n=xo||u<0||u>=xo)){var c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),h=c.vertexLength;Dc(this.layoutVertexArray,l,u,-1,-1),Dc(this.layoutVertexArray,l,u,1,-1),Dc(this.layoutVertexArray,l,u,1,1),Dc(this.layoutVertexArray,l,u,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),c.vertexLength+=4,c.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,i,{})},en.register("CircleBucket",Rc,{omit:["layers"]});var Nc,Fc=(Nc=!0,function(e,t){var i=Nc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Nc=!1,i}),Bc=Fc(void 0,(function(){return Bc.toString().search("(((.+)+)+)+$").toString().constructor(Bc).search("(((.+)+)+)+$")}));Bc();var zc=function(e){this.specification=e};zc.prototype.possiblyEvaluate=function(e,t){return e.expression.evaluate(t)},zc.prototype.interpolate=function(e,t,i){var n=interpolate[this.specification.type];return n?n(e,t,i):e},en.register("DataConstantProperty",zc);var Gc,kc=(Gc=!0,function(e,t){var i=Gc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Gc=!1,i}),Uc=kc(void 0,(function(){return Uc.toString().search("(((.+)+)+)+$").toString().constructor(Uc).search("(((.+)+)+)+$")}));Uc();var Vc=function(e,t){this.specification=e,this.overrides=t};Vc.prototype.possiblyEvaluate=function(e,t,i){return"constant"===e.expression.kind||"camera"===e.expression.kind?new xa(this,{kind:"constant",value:e.expression.evaluate(t,null,{},i)},t):new xa(this,e.expression,t)},Vc.prototype.interpolate=function(e,t,i){if("constant"!==e.value.kind||"constant"!==t.value.kind)return e;if(void 0===e.value.value||void 0===t.value.value)return new xa(this,{kind:"constant",value:void 0},e.parameters);var n=interpolate[this.specification.type];return n?new xa(this,{kind:"constant",value:n(e.value.value,t.value.value,i)},e.parameters):e},Vc.prototype.evaluate=function(e,t,i,n,r){return"constant"===e.kind?e.value:e.evaluate(t,i,n,r)},en.register("DataDrivenProperty",Vc);var Wc,Hc=(Wc=!0,function(e,t){var i=Wc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Wc=!1,i}),Yc=Hc(void 0,(function(){return Yc.toString().search("(((.+)+)+)+$").toString().constructor(Yc).search("(((.+)+)+)+$")}));Yc();var jc=function(e,t){this.property=e,this.value=t,this.expression=ar.normalizePropertyExpression(void 0===t?e.specification.default:t,e.specification)};jc.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},jc.prototype.possiblyEvaluate=function(e,t){return this.property.possiblyEvaluate(this,e,t)};var qc,Xc=(qc=!0,function(e,t){var i=qc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return qc=!1,i}),Kc=Xc(void 0,(function(){return Kc.toString().search("(((.+)+)+)+$").toString().constructor(Kc).search("(((.+)+)+)+$")}));function Zc(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,i=t*e;return 4*(e<.5?i:3*(e-t)+i-.75)}Kc();var Jc=function(e,t,i,n,r){this.property=e,this.value=t,this.begin=r+n.delay||0,this.end=this.begin+n.duration||0,e.specification.transition&&(n.delay||n.duration)&&(this.prior=i)};Jc.prototype.possiblyEvaluate=function(e,t){var i=e.now||0,n=this.value.possiblyEvaluate(e,t),r=this.prior;if(r){if(i>this.end)return this.prior=null,n;if(this.value.isDataDriven())return this.prior=null,n;if(i0;)t[i]=arguments[i+1];for(var n=0,r=t;n=0)return!0;return!1}eh(),th();const lh={};function uh(e){lh[e]||("undefined"!=typeof console&&console.warn(e),lh[e]=!0)}function ch(e,t,i){return(i.y-e.y)*(t.x-e.x)>(t.y-e.y)*(i.x-e.x)}function hh(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function dh(e){const t={};if(e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((e,i,n,r)=>{const o=n||r;return t[i]=!o||o.toLowerCase(),""})),t["max-age"]){const e=parseInt(t["max-age"],10);isNaN(e)?delete t["max-age"]:t["max-age"]=e}return t}var fh,ph=(fh=!0,function(e,t){var i=fh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return fh=!1,i}),_h=ph(void 0,(function(){return _h.toString().search("(((.+)+)+)+$").toString().constructor(_h).search("(((.+)+)+)+$")}));_h();var mh=function(e){this.property=e,this.value=new jc(e,void 0)};mh.prototype.transitioned=function(e,t){return new Jc(this.property,this.value,t,ih({},e.transition,this.transition),e.now)},mh.prototype.untransitioned=function(){return new Jc(this.property,this.value,null,{},0)};var $h,gh=($h=!0,function(e,t){var i=$h?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return $h=!1,i}),yh=gh(void 0,(function(){return yh.toString().search("(((.+)+)+)+$").toString().constructor(yh).search("(((.+)+)+)+$")}));yh();var vh,xh=function(e){for(var t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){var i=e[t];i.specification.overridable&&this.overridableProperties.push(t);var n=this.defaultPropertyValues[t]=new jc(i,void 0),r=this.defaultTransitionablePropertyValues[t]=new mh(i);this.defaultTransitioningPropertyValues[t]=r.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=n.possiblyEvaluate({})}},bh=(vh=!0,function(e,t){var i=vh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return vh=!1,i}),Sh=bh(void 0,(function(){return Sh.toString().search("(((.+)+)+)+$").toString().constructor(Sh).search("(((.+)+)+)+$")}));function wh(){}Sh(),wh.getMaximumPaintValue=function(e,t,i){var n=t.paint.get(e).value;return"constant"===n.kind?n.value:i.programConfigurations.get(t.id).binders[e].maxValue},wh.translateDistance=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},wh.translate=function(e,t,i,n,r){if(!t||!t[0]&&!t[1])return e;var o=to.convert(t)._mult(r);"viewport"===i&&o._rotate(-n);for(var a=[],s=0;s=this.maxzoom)||"none"===this.visibility},Hh.prototype.updateTransitions=function(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)},Hh.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},Hh.prototype.recalculate=function(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,t)},Hh.prototype.serialize=function(){var e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),oh(e,(function(e,t){return!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length)}))},Hh.prototype._validate=function(e,t,i,n,r){return!0},Hh.prototype.is3D=function(){return!1},Hh.prototype.isTileClipped=function(){return!1},Hh.prototype.hasOffscreenPass=function(){return!1},Hh.prototype.resize=function(){},Hh.prototype.isStateDependent=function(){return!0};var Yh,jh=(Yh=!0,function(e,t){var i=Yh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Yh=!1,i}),qh=jh(void 0,(function(){return qh.toString().search("(((.+)+)+)+$").toString().constructor(qh).search("(((.+)+)+)+$")}));qh();var Xh,Kh=8,Zh={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},Jh={"*":{type:"source"}},Qh=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],ed={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},"*":{type:"*"}},td={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},id={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},nd={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1}},rd={type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},od={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},ad={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},sd=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],ld={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ud={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},cd={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},hd={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},dd={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},fd={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},pd={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_d={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},md={type:"array",value:"*"},$d={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},gd={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},yd={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},vd={type:"array",value:"*",minimum:1},xd={type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},bd={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},Sd=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],wd={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},Cd={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},Td={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},Pd={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Ed={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-show-background":{type:"boolean",default:!1,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},Ad={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Ld={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Md={"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Id={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},Od={$version:Kh,$root:Zh,sources:Jh,source:Qh,source_vector:ed,source_raster:td,source_raster_dem:id,source_geojson:nd,source_video:rd,source_image:od,layer:ad,layout:sd,layout_background:ld,layout_fill:ud,layout_circle:cd,layout_heatmap:hd,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:dd,layout_symbol:fd,layout_raster:pd,layout_hillshade:_d,filter:md,filter_operator:$d,geometry_type:gd,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:yd,expression:vd,expression_name:xd,light:bd,paint:Sd,paint_fill:wd,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:Cd,paint_circle:Td,paint_heatmap:Pd,paint_symbol:Ed,paint_raster:Ad,paint_hillshade:Ld,paint_background:Md,transition:Id,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}}},Dd=(Xh=!0,function(e,t){var i=Xh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Xh=!1,i}),Rd=Dd(void 0,(function(){return Rd.toString().search("(((.+)+)+)+$").toString().constructor(Rd).search("(((.+)+)+)+$")}));function Nd(){}function Fd(e,t,i){if(e.length>1){if(Bd(e,t))return!0;for(var n=0;nt.y!=r.y>t.y&&t.x<(r.x-n.x)*(t.y-n.y)/(r.y-n.y)+n.x&&(o=!o);return o}function Ud(e,t){for(var i=!1,n=0,r=e.length-1;nt.y!=a.y>t.y&&t.x<(a.x-o.x)*(t.y-o.y)/(a.y-o.y)+o.x&&(i=!i)}return i}Rd(),Nd.polygonIntersectsPolygon=function(e,t){for(var i=0;i=3)for(var o=0;o1?e.distSqr(i):e.distSqr(i.sub(t)._mult(r)._add(t))};var Vd=new xh({"circle-sort-key":new Vc(Od.layout_circle["circle-sort-key"])}),Wd=new xh({"circle-radius":new Vc(Od.paint_circle["circle-radius"]),"circle-color":new Vc(Od.paint_circle["circle-color"]),"circle-blur":new Vc(Od.paint_circle["circle-blur"]),"circle-opacity":new Vc(Od.paint_circle["circle-opacity"]),"circle-translate":new zc(Od.paint_circle["circle-translate"]),"circle-translate-anchor":new zc(Od.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new zc(Od.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new zc(Od.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Vc(Od.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Vc(Od.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Vc(Od.paint_circle["circle-stroke-opacity"])}),Hd={paint:Wd,layout:Vd},Yd=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,Hd)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.createBucket=function(e){return new Rc(e)},r.prototype.queryRadius=function(e){var t=e;return wh.getMaximumPaintValue("circle-radius",this,t)+wh.getMaximumPaintValue("circle-stroke-width",this,t)+wh.translateDistance(this.paint.get("circle-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,o,a,s,l){s=Xd();for(var u=wh.translate(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),0,a),c=this.paint.get("circle-radius")?.evaluate(t,i),h=this.paint.get("circle-stroke-width")?.evaluate(t,i),d=c+h,f="map"===this.paint.get("circle-pitch-alignment"),p=f?u:qd(u,s),_=f?d*a:d,m=0,$=n;m<$.length;m+=1)for(var g=0,y=$[m];gi;){if(n-i>600){var o=n-i+1,a=t-i+1,s=Math.log(o),l=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);Jd(e,t,Math.max(i,Math.floor(t-a*l/o+u)),Math.min(n,Math.floor(t+(o-a)*l/o+u)),r)}var c=e[t],h=i,d=n;for(Qd(e,i,t),r(e[n],c)>0&&Qd(e,i,n);h0;)d--}0===r(e[i],c)?Qd(e,i,d):Qd(e,++d,n),d<=t&&(i=d+1),t<=d&&(n=d-1)}}function Qd(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function ef(e,t){return et?1:0}var tf,nf=(tf=!0,function(e,t){var i=tf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return tf=!1,i}),rf=nf(void 0,(function(){return rf.toString().search("(((.+)+)+)+$").toString().constructor(rf).search("(((.+)+)+)+$")}));function of(e){for(var t=0,i=0,n=e.length,r=n-1,o=void 0,a=void 0;i1)for(var l=0;l80*i){n=o=e[0],r=a=e[1];for(var p=i;po&&(o=s),l>a&&(a=l);u=0!==(u=Math.max(o-n,a-r))?1/u:0}return hf(d,f,i,n,r,u),f}function uf(e,t,i,n,r){var o,a;if(r===zf(e,t,i,n)>0)for(o=t;o=t;o-=n)a=Nf(o,e[o],e[o+1],a);return a&&Ef(a,a.next)&&(Ff(a),a=a.next),a}function cf(e,t){if(!e)return e;t||(t=e);var i,n=e;do{if(i=!1,n.steiner||!Ef(n,n.next)&&0!==Pf(n.prev,n,n.next))n=n.next;else{if(Ff(n),(n=t=n.prev)===n.next)break;i=!0}}while(i||n!==t);return t}function hf(e,t,i,n,r,o,a){if(e){!a&&o&&xf(e,n,r,o);for(var s,l,u=e;e.prev!==e.next;)if(s=e.prev,l=e.next,o?ff(e,n,r,o):df(e))t.push(s.i/i),t.push(e.i/i),t.push(l.i/i),Ff(e),e=l.next,u=l.next;else if((e=l)===u){a?1===a?hf(e=pf(cf(e),t,i),t,i,n,r,o,2):2===a&&_f(e,t,i,n,r,o):hf(cf(e),t,i,n,r,o,1);break}}}function df(e){var t=e.prev,i=e,n=e.next;if(Pf(t,i,n)>=0)return!1;for(var r=e.next.next;r!==e.prev;){if(Cf(t.x,t.y,i.x,i.y,n.x,n.y,r.x,r.y)&&Pf(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function ff(e,t,i,n){var r=e.prev,o=e,a=e.next;if(Pf(r,o,a)>=0)return!1;for(var s=r.xo.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,c=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,h=Sf(s,l,t,i,n),d=Sf(u,c,t,i,n),f=e.prevZ,p=e.nextZ;f&&f.z>=h&&p&&p.z<=d;){if(f!==e.prev&&f!==e.next&&Cf(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Pf(f.prev,f,f.next)>=0||(f=f.prevZ,p!==e.prev&&p!==e.next&&Cf(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Pf(p.prev,p,p.next)>=0))return!1;p=p.nextZ}for(;f&&f.z>=h;){if(f!==e.prev&&f!==e.next&&Cf(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Pf(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&Cf(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Pf(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function pf(e,t,i){var n=e;do{var r=n.prev,o=n.next.next;!Ef(r,o)&&Af(r,n,n.next,o)&&Of(r,o)&&Of(o,r)&&(t.push(r.i/i),t.push(n.i/i),t.push(o.i/i),Ff(n),Ff(n.next),n=e=o),n=n.next}while(n!==e);return cf(n)}function _f(e,t,i,n,r,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Tf(a,s)){var l=Rf(a,s);return a=cf(a,a.next),l=cf(l,l.next),hf(a,t,i,n,r,o),void hf(l,t,i,n,r,o)}s=s.next}a=a.next}while(a!==e)}function mf(e,t,i,n){var r,o,a,s=[];for(r=0,o=t.length;r=n.next.y&&n.next.y!==n.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&s>a){if(a=s,s===r){if(o===n.y)return n;if(o===n.next.y)return n.next}i=n.x=n.x&&n.x>=c&&r!==n.x&&Cf(oi.x||n.x===i.x&&vf(i,n)))&&(i=n,d=l)),n=n.next}while(n!==u);return i}function vf(e,t){return Pf(e.prev,e,t.prev)<0&&Pf(t.next,e,e.next)<0}function xf(e,t,i,n){var r=e;do{null===r.z&&(r.z=Sf(r.x,r.y,t,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==e);r.prevZ.nextZ=null,r.prevZ=null,bf(r)}function bf(e){var t,i,n,r,o,a,s,l,u=1;do{for(i=e,e=null,o=null,a=0;i;){for(a++,n=i,s=0,t=0;t0||l>0&&n;)0!==s&&(0===l||!n||i.z<=n.z)?(r=i,i=i.nextZ,s--):(r=n,n=n.nextZ,l--),o?o.nextZ=r:e=r,r.prevZ=o,o=r;i=n}o.nextZ=null,u*=2}while(a>1);return e}function Sf(e,t,i,n,r){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function wf(e){var t=e,i=e;do{(t.x=0&&(e-a)*(n-s)-(i-a)*(t-s)>=0&&(i-a)*(o-s)-(r-a)*(n-s)>=0}function Tf(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!If(e,t)&&(Of(e,t)&&Of(t,e)&&Df(e,t)&&(Pf(e.prev,e,t.prev)||Pf(e,t.prev,t))||Ef(e,t)&&Pf(e.prev,e,e.next)>0&&Pf(t.prev,t,t.next)>0)}function Pf(e,t,i){return(t.y-e.y)*(i.x-t.x)-(t.x-e.x)*(i.y-t.y)}function Ef(e,t){return e.x===t.x&&e.y===t.y}function Af(e,t,i,n){var r=Mf(Pf(e,t,i)),o=Mf(Pf(e,t,n)),a=Mf(Pf(i,n,e)),s=Mf(Pf(i,n,t));return!!(r!==o&&a!==s||0===r&&Lf(e,i,t)||0===o&&Lf(e,n,t)||0===a&&Lf(i,e,n)||0===s&&Lf(i,t,n))}function Lf(e,t,i){return t.x<=Math.max(e.x,i.x)&&t.x>=Math.min(e.x,i.x)&&t.y<=Math.max(e.y,i.y)&&t.y>=Math.min(e.y,i.y)}function Mf(e){return e>0?1:e<0?-1:0}function If(e,t){var i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&Af(i,i.next,e,t))return!0;i=i.next}while(i!==e);return!1}function Of(e,t){return Pf(e.prev,e,e.next)<0?Pf(e,t,e.next)>=0&&Pf(e,e.prev,t)>=0:Pf(e,t,e.prev)<0||Pf(e,e.next,t)<0}function Df(e,t){var i=e,n=!1,r=(e.x+t.x)/2,o=(e.y+t.y)/2;do{i.y>o!=i.next.y>o&&i.next.y!==i.y&&r<(i.next.x-i.x)*(o-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==e);return n}function Rf(e,t){var i=new Bf(e.i,e.x,e.y),n=new Bf(t.i,t.x,t.y),r=e.next,o=t.prev;return e.next=t,t.prev=e,i.next=r,r.prev=i,n.next=i,i.prev=n,o.next=n,n.prev=o,n}function Nf(e,t,i,n){var r=new Bf(e,t,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function Ff(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Bf(e,t,i){this.i=e,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function zf(e,t,i,n){for(var r=0,o=t,a=i-n;o0&&(n+=e[r-1].length,i.holes.push(n))}return i};var Gf,kf=(Gf=!0,function(e,t){var i=Gf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Gf=!1,i}),Uf=kf(void 0,(function(){return Uf.toString().search("(((.+)+)+)+$").toString().constructor(Uf).search("(((.+)+)+)+$")}));function Vf(e,t,i,n,r){for(var o=r.patternDependencies,a=0,s=t;a>0];case"i16":return mp[e>>1];case"i32":case"i64":return $p[e>>2];case"float":return yp[e>>2];case"double":return vp[e>>3];default:de("invalid type for getValue: "+t)}return null},n=function(e,t){e||de("Assertion failed: "+t)},r=function(e){var t=Xf["_"+e];return n(t,"Cannot call unknown function "+e+", make sure it is exported"),t},o=function(e,t,i,o,a){var s={string:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);t=d_(i),c(e,t,i)}return t},array:function(e){var t=d_(e.length);return h(e,t),t}},u=r(e),d=[],f=0;if(n("array"!==t,'Return type should not be "array".'),o)for(var p=0;p=r);)++o;if(o-i>16&&e.subarray&&dp)return dp.decode(e.subarray(i,o));for(var a="";i>10,56320|1023&c)}}else a+=String.fromCharCode((31&s)<<6|l)}else a+=String.fromCharCode(s)}return a},l=function(e,t){return e?s(_p,e,t):""},u=function(e,i,n,r){if(!(r>0))return 0;for(var o=n,a=n+r-1,s=0;s=55296&&l<=57343&&(l=65536+((1023&l)<<10)|1023&e.charCodeAt(++s)),l<=127){if(n>=a)break;i[n++]=l}else if(l<=2047){if(n+1>=a)break;i[n++]=192|l>>6,i[n++]=128|63&l}else if(l<=65535){if(n+2>=a)break;i[n++]=224|l>>12,i[n++]=128|l>>6&63,i[n++]=128|63&l}else{if(n+3>=a)break;l>=2097152&&t("Invalid Unicode code point 0x"+l.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),i[n++]=240|l>>18,i[n++]=128|l>>12&63,i[n++]=128|l>>6&63,i[n++]=128|63&l}}return i[n]=0,n-o},c=function(e,t,i){return n("number"==typeof i,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),u(e,_p,t,i)},h=function(e,t){n(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),pp.set(e,t)},d=function(e){return e.replace(/__Z[\w\d_]+/g,(function(e){return e==e?e:e+" ["+e+"]"}))},f=function(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()},p=function(){var e=f();return Xf.extraStackTrace&&(e+="\n"+Xf.extraStackTrace()),d(e)},_=function(e,t){return e%t>0&&(e+=t-e%t),e},m=function(){Xf.HEAP8=pp=new Int8Array(fp),Xf.HEAP16=mp=new Int16Array(fp),Xf.HEAP32=$p=new Int32Array(fp),Xf.HEAPU8=_p=new Uint8Array(fp),Xf.HEAPU16=new Uint16Array(fp),Xf.HEAPU32=gp=new Uint32Array(fp),Xf.HEAPF32=yp=new Float32Array(fp),Xf.HEAPF64=vp=new Float64Array(fp)},$=function(){n(0==(3&Sp)),gp[(Sp>>2)-1]=34821223,gp[(Sp>>2)-2]=2310721022},g=function(){(34821223!=gp[(Sp>>2)-1]||2310721022!=gp[(Sp>>2)-2])&&de("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+gp[(Sp>>2)-2].toString(16)+" "+gp[(Sp>>2)-1].toString(16)),1668509029!==$p[0]&&de("Runtime error: The application has corrupted its heap memory area (address zero)!")},y=function(e){de("Stack overflow! Attempted to allocate "+e+" bytes on the stack, but stack has only "+(Sp-p_()+e)+" bytes available!")},v=function(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?Xf.dynCall_v(i):Xf.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}},x=function(){if(Xf.preRun)for("function"==typeof Xf.preRun&&(Xf.preRun=[Xf.preRun]);Xf.preRun.length;)C(Xf.preRun.shift());v(Ep)},b=function(){g(),!Ip&&(Ip=!0,v(Ap))},S=function(){g(),v(Lp)},w=function(){if(g(),Xf.postRun)for("function"==typeof Xf.postRun&&(Xf.postRun=[Xf.postRun]);Xf.postRun.length;)T(Xf.postRun.shift());v(Mp)},C=function(e){Ep.unshift(e)},T=function(e){Mp.unshift(e)},P=function(e){Dp++,Xf.monitorRunDependencies&&Xf.monitorRunDependencies(Dp),e&&(n(!Fp[e]),Fp[e]=1,null===Rp&&typeof setInterval<"u"&&(Rp=setInterval((function(){if(hp)return clearInterval(Rp),void(Rp=null)}),1e4)))},E=function(e){if(Dp--,Xf.monitorRunDependencies&&Xf.monitorRunDependencies(Dp),e&&(n(Fp[e]),delete Fp[e]),0==Dp&&(null!==Rp&&(clearInterval(Rp),Rp=null),Np)){var t=Np;Np=null,t()}},A=function(e){return String.prototype.startsWith?e.startsWith(Gp):0===e.indexOf(Gp)},L=function(){try{if(Xf.wasmBinary)return new Uint8Array(Xf.wasmBinary);if(Xf.readBinary)return Xf.readBinary(zp);throw"both async and sync fetching of the wasm failed"}catch(e){de(e)}},M=function(){return Xf.wasmBinary||!Zf&&!Jf||"function"!=typeof fetch?new Promise((function(e,t){e(L())})):fetch(zp,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+zp+"'";return e.arrayBuffer()})).catch((function(){return L()}))},I=function(e){var t={env:e,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:ap};function i(e,t){var i=e.exports;Xf.asm=i,E("wasm-instantiate")}P("wasm-instantiate");var r=Xf;function o(e){n(Xf===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),r=null,i(e.instance)}function a(e){return M().then((function(e){return WebAssembly.instantiate(e,t)})).then(e,(function(e){}))}if(Xf.instantiateWasm)try{return Xf.instantiateWasm(t,i)}catch{return!1}return function(){if(Xf.wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||A(zp)||"function"!=typeof fetch)return a(o);fetch(zp,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(o,(function(e){a(o)}))}))}(),{}},O=function(e){return h_(e)},D=function(e){e&&Vp[e].refcount++},R=function(e){if(!e||Vp[e])return e;for(var t in Vp)for(var i=+t,n=Vp[i].adjusted,r=n.length,o=0;o"u"||!(e instanceof Bp.ErrnoError))&&de(e),-e.errno}},U=function(){var e=Xf._fflush;e&&e(0);var t=Hp.buffers;t[1].length&&Hp.printChar(1,10),t[2].length&&Hp.printChar(2,10)},V=function(e,t){Hp.varargs=t;try{for(var i=Hp.get(),n=Hp.get(),r=Hp.get(),o=0,a=0;a>2],l=$p[n+(8*a+4)>>2],u=0;u"u"||!(e instanceof Bp.ErrnoError))&&de(e),-e.errno}},W=function(e,t){Hp.varargs=t;try{return 0}catch(e){return(typeof Bp>"u"||!(e instanceof Bp.ErrnoError))&&de(e),-e.errno}},H=function(e,t){Hp.varargs=t;try{return Hp.getStreamFromFD(),de("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return(typeof Bp>"u"||!(e instanceof Bp.ErrnoError))&&de(e),-e.errno}},Y=function(){},j=function(){Xf.abort()},q=function(){return pp.length},X=function(e,t,i){_p.set(_p.subarray(t,t+i),e)},K=function(e){if(!Xf.___errno_location)return e;$p[Xf.___errno_location()>>2]=e},Z=function(e){de("Cannot enlarge memory arrays to size "+e+" bytes (OOM). Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+pp.length+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")},J=function(e){e=_(e,65536);var t=fp.byteLength;try{return-1!==cp.grow((e-t)/65536)&&(fp=cp.buffer,!0)}catch(i){return console.error("emscripten_realloc_buffer: Attempted to grow from "+t+" bytes to "+e+" bytes, but got error: "+i),!1}},Q=function(e){var i=q();n(e>i);var r=65536,o=2147418112;if(e>o)return!1;for(var a=Math.max(i,16777216);a0||($(),x(),Dp>0)||Xf.calledRun||(Xf.setStatus?(Xf.setStatus("Running..."),setTimeout((function(){setTimeout((function(){Xf.setStatus("")}),1),t()}),1)):t(),g())},de=function(e){Xf.onAbort&&Xf.onAbort(e),hp=!0;var t="abort("+(e=void 0!==e?'"'+e+'"':"")+") at "+p();throw __&&__.forEach((function(i){t=i(t,e)})),t};var qf,Xf=typeof Xf<"u"?Xf:{},Kf={};for(qf in Xf)Xf.hasOwnProperty(qf)&&(Kf[qf]=Xf[qf]);Xf.arguments=[],Xf.thisProgram="./this.program",Xf.quit=function(e,t){throw t},Xf.preRun=[],Xf.postRun=[];var Zf=!1,Jf=!1,Qf=!1,ep=!1;if(Zf="object"==typeof window,Jf="function"==typeof importScripts,Qf="object"==typeof process&&"function"==typeof require&&!Zf&&!Jf,ep=!Zf&&!Qf&&!Jf,Xf.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var tp,ip,np="";if(Qf)np=__dirname+"/",Xf.read=function(e,t){var i;return tp||(tp=require("fs")),ip||(ip=require("path")),e=ip.normalize(e),i=tp.readFileSync(e),t?i:i.toString()},Xf.readBinary=function(e){var t=Xf.read(e,!0);return t.buffer||(t=new Uint8Array(t)),n(t.buffer),t},process.argv.length>1&&(Xf.thisProgram=process.argv[1].replace(/\\/g,"/")),Xf.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=Xf),process.on("uncaughtException",(function(e){if(!(e instanceof ce))throw e})),process.on("unhandledRejection",de),Xf.quit=function(e){process.exit(e)},Xf.inspect=function(){return"[Emscripten Module object]"};else if(ep)typeof read<"u"&&(Xf.read=function(e){return read(e)}),Xf.readBinary=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),n("object"==typeof t),t)},typeof scriptArgs<"u"?Xf.arguments=scriptArgs:typeof arguments<"u"&&(Xf.arguments=arguments),"function"==typeof quit&&(Xf.quit=function(e){quit(e)});else{if(!Zf&&!Jf)throw new Error("environment detection error");Jf?np=self.location.href:document.currentScript&&(np=document.currentScript.src),np=0!==np.indexOf("blob:")?np.substr(0,np.lastIndexOf("/")+1):"",Xf.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},Jf&&(Xf.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),Xf.readAsync=function(e,t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)},Xf.setWindowTitle=function(e){document.title=e}}var rp=Xf.print||(typeof console<"u"?console.log.bind(console):typeof print<"u"?print:null),op=Xf.printErr||(typeof printErr<"u"?printErr:typeof console<"u"&&console.warn.bind(console)||rp);for(qf in Kf)Kf.hasOwnProperty(qf)&&(Xf[qf]=Kf[qf]);Kf=void 0,n(typeof Xf.memoryInitializerPrefixURL>"u","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof Xf.pthreadMainPrefixURL>"u","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),n(typeof Xf.cdInitializerPrefixURL>"u","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof Xf.filePackagePrefixURL>"u","Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),p_=f_=d_=function(){de("cannot use the stack before compiled code is ready to run, and has provided stack access")};var ap={"f64-rem":function(e,t){return e%t},debugger:function(){}};new Array(0);var sp=0,lp=function(e){sp=e},up=function(){return sp};"object"!=typeof WebAssembly&&de("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");var cp,hp=!1,dp=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;typeof TextDecoder<"u"&&new TextDecoder("utf-16le");var fp,pp,_p,mp,$p,gp,yp,vp,xp=65536,bp=5872,Sp=5248752,wp=5248752,Cp=5840;n(bp%16==0,"stack must start aligned"),n(wp%16==0,"heap must start aligned");var Tp=5242880;Xf.TOTAL_STACK&&n(Tp===Xf.TOTAL_STACK,"the stack size can no longer be determined at runtime");var Pp=Xf.TOTAL_MEMORY||16777216;if(Pp>2]=wp,$p[0]=1668509029,mp[1]=25459,115!==_p[2]||99!==_p[3])throw"Runtime error: expected the system to be little-endian!";var Ep=[],Ap=[],Lp=[],Mp=[],Ip=!1,Op=!1;n(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var Dp=0,Rp=null,Np=null,Fp={};Xf.preloadedImages={},Xf.preloadedAudios={};var Bp={error:function(){de("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -s FORCE_FILESYSTEM=1")},init:function(){Bp.error()},createDataFile:function(){Bp.error()},createPreloadedFile:function(){Bp.error()},createLazyFile:function(){Bp.error()},open:function(){Bp.error()},mkdev:function(){Bp.error()},registerDevice:function(){Bp.error()},analyzePath:function(){Bp.error()},loadFilesFromDB:function(){Bp.error()},ErrnoError:function(){Bp.error()}};Xf.FS_createDataFile=Bp.createDataFile,Xf.FS_createPreloadedFile=Bp.createPreloadedFile;var zp,Gp="data:application/octet-stream;base64,",kp=typeof window>"u"?self:window;zp=kp.location.href.endsWith(".openrealspace")?"../../static/Build/Cesium/ThirdParty/earcut.wasm":"ThirdParty/earcut.wasm",A(zp)||(zp=e(zp)),Xf.asm=function(e,t,i){t.memory=cp,t.table=new WebAssembly.Table({initial:260,maximum:260,element:"anyfunc"}),t.__memory_base=1024,t.__table_base=0;var r=I(t);return n(r,"binaryen setup failed (no wasm support?)"),r};var Up=5856;n(Up%8==0);var Vp={},Wp=[],Hp={buffers:[null,[],[]],printChar:function(e,t){var i=Hp.buffers[e];n(i),0===t||10===t?((1===e?rp:op)(s(i,0)),i.length=0):i.push(t)},varargs:0,get:function(e){return Hp.varargs+=4,$p[Hp.varargs-4>>2]},getStr:function(){return l(Hp.get())},get64:function(){var e=Hp.get(),t=Hp.get();return n(e>=0?0===t:-1===t),e},getZero:function(){n(0===Hp.get())}},Yp={},jp={abort:de,setTempRet0:lp,getTempRet0:up,abortStackOverflow:y,nullFunc_ii:ee,nullFunc_iidiiii:te,nullFunc_iiii:ie,nullFunc_jiji:ne,nullFunc_v:re,nullFunc_vi:oe,nullFunc_vii:ae,nullFunc_viiii:se,nullFunc_viiiii:le,nullFunc_viiiiii:ue,___cxa_allocate_exception:O,___cxa_begin_catch:N,___cxa_throw:F,___cxa_uncaught_exception:B,___exception_addRef:D,___exception_deAdjust:R,___gxx_personality_v0:z,___lock:G,___setErrNo:K,___syscall140:k,___syscall146:V,___syscall54:W,___syscall6:H,___unlock:Y,_abort:j,_emscripten_get_heap_size:q,_emscripten_memcpy_big:X,_emscripten_resize_heap:Q,abortOnCannotGrowMemory:Z,emscripten_realloc_buffer:J,flush_NO_FILESYSTEM:U,tempDoublePtr:Up,DYNAMICTOP_PTR:Cp},qp=Xf.asm(Yp,jp,fp),Xp=qp.__ZSt18uncaught_exceptionv;qp.__ZSt18uncaught_exceptionv=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xp.apply(null,arguments)};var Kp=qp.___cxa_can_catch;qp.___cxa_can_catch=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Kp.apply(null,arguments)};var Zp=qp.___cxa_is_pointer_type;qp.___cxa_is_pointer_type=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Zp.apply(null,arguments)};var Jp=qp.___errno_location;qp.___errno_location=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Jp.apply(null,arguments)};var Qp=qp._earcut;qp._earcut=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Qp.apply(null,arguments)};var e_=qp._fflush;qp._fflush=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),e_.apply(null,arguments)};var t_=qp._free;qp._free=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t_.apply(null,arguments)};var i_=qp._llvm_maxnum_f64;qp._llvm_maxnum_f64=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),i_.apply(null,arguments)};var n_=qp._llvm_minnum_f64;qp._llvm_minnum_f64=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n_.apply(null,arguments)};var r_=qp._malloc;qp._malloc=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),r_.apply(null,arguments)};var o_=qp._sbrk;qp._sbrk=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),o_.apply(null,arguments)};var a_=qp.establishStackSpace;qp.establishStackSpace=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),a_.apply(null,arguments)};var s_=qp.stackAlloc;qp.stackAlloc=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),s_.apply(null,arguments)};var l_=qp.stackRestore;qp.stackRestore=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l_.apply(null,arguments)};var u_=qp.stackSave;qp.stackSave=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u_.apply(null,arguments)},Xf.asm=qp;var c_=Xf.__ZSt18uncaught_exceptionv=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm.__ZSt18uncaught_exceptionv.apply(null,arguments)};Xf.___cxa_can_catch=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm.___cxa_can_catch.apply(null,arguments)},Xf.___cxa_is_pointer_type=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm.___cxa_is_pointer_type.apply(null,arguments)},Xf.___errno_location=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm.___errno_location.apply(null,arguments)},Xf._earcut=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm._earcut.apply(null,arguments)},Xf._emscripten_replace_memory=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm._emscripten_replace_memory.apply(null,arguments)},Xf._fflush=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm._fflush.apply(null,arguments)},Xf._free=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm._free.apply(null,arguments)},Xf._llvm_maxnum_f64=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm._llvm_maxnum_f64.apply(null,arguments)},Xf._llvm_minnum_f64=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm._llvm_minnum_f64.apply(null,arguments)};var h_=Xf._malloc=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm._malloc.apply(null,arguments)};Xf._memcpy=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm._memcpy.apply(null,arguments)},Xf._memset=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm._memset.apply(null,arguments)},Xf._sbrk=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm._sbrk.apply(null,arguments)},Xf.establishStackSpace=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm.establishStackSpace.apply(null,arguments)};var d_=Xf.stackAlloc=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm.stackAlloc.apply(null,arguments)},f_=Xf.stackRestore=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm.stackRestore.apply(null,arguments)},p_=Xf.stackSave=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm.stackSave.apply(null,arguments)};Xf.dynCall_ii=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm.dynCall_ii.apply(null,arguments)},Xf.dynCall_iidiiii=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm.dynCall_iidiiii.apply(null,arguments)},Xf.dynCall_iiii=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm.dynCall_iiii.apply(null,arguments)},Xf.dynCall_jiji=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm.dynCall_jiji.apply(null,arguments)},Xf.dynCall_v=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm.dynCall_v.apply(null,arguments)},Xf.dynCall_vi=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm.dynCall_vi.apply(null,arguments)},Xf.dynCall_vii=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm.dynCall_vii.apply(null,arguments)},Xf.dynCall_viiii=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm.dynCall_viiii.apply(null,arguments)},Xf.dynCall_viiiii=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm.dynCall_viiiii.apply(null,arguments)},Xf.dynCall_viiiiii=function(){return n(Ip,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!Op,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xf.asm.dynCall_viiiiii.apply(null,arguments)},Xf.asm=qp,Xf.intArrayFromString||(Xf.intArrayFromString=function(){de("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.intArrayToString||(Xf.intArrayToString=function(){de("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.ccall=o,Xf.cwrap=a,Xf.setValue||(Xf.setValue=function(){de("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.getValue=i,Xf.allocate||(Xf.allocate=function(){de("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.getMemory||(Xf.getMemory=function(){de("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Xf.AsciiToString||(Xf.AsciiToString=function(){de("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.stringToAscii||(Xf.stringToAscii=function(){de("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.UTF8ArrayToString||(Xf.UTF8ArrayToString=function(){de("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.UTF8ToString||(Xf.UTF8ToString=function(){de("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.stringToUTF8Array||(Xf.stringToUTF8Array=function(){de("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.stringToUTF8||(Xf.stringToUTF8=function(){de("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.lengthBytesUTF8||(Xf.lengthBytesUTF8=function(){de("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.UTF16ToString||(Xf.UTF16ToString=function(){de("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.stringToUTF16||(Xf.stringToUTF16=function(){de("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.lengthBytesUTF16||(Xf.lengthBytesUTF16=function(){de("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.UTF32ToString||(Xf.UTF32ToString=function(){de("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.stringToUTF32||(Xf.stringToUTF32=function(){de("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.lengthBytesUTF32||(Xf.lengthBytesUTF32=function(){de("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.allocateUTF8||(Xf.allocateUTF8=function(){de("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.stackTrace||(Xf.stackTrace=function(){de("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.addOnPreRun||(Xf.addOnPreRun=function(){de("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.addOnInit||(Xf.addOnInit=function(){de("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.addOnPreMain||(Xf.addOnPreMain=function(){de("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.addOnExit||(Xf.addOnExit=function(){de("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.addOnPostRun||(Xf.addOnPostRun=function(){de("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.writeStringToMemory||(Xf.writeStringToMemory=function(){de("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.writeArrayToMemory||(Xf.writeArrayToMemory=function(){de("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.writeAsciiToMemory||(Xf.writeAsciiToMemory=function(){de("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.addRunDependency||(Xf.addRunDependency=function(){de("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Xf.removeRunDependency||(Xf.removeRunDependency=function(){de("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Xf.ENV||(Xf.ENV=function(){de("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.FS||(Xf.FS=function(){de("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.FS_createFolder||(Xf.FS_createFolder=function(){de("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Xf.FS_createPath||(Xf.FS_createPath=function(){de("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Xf.FS_createDataFile||(Xf.FS_createDataFile=function(){de("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Xf.FS_createPreloadedFile||(Xf.FS_createPreloadedFile=function(){de("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Xf.FS_createLazyFile||(Xf.FS_createLazyFile=function(){de("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Xf.FS_createLink||(Xf.FS_createLink=function(){de("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Xf.FS_createDevice||(Xf.FS_createDevice=function(){de("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Xf.FS_unlink||(Xf.FS_unlink=function(){de("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Xf.GL||(Xf.GL=function(){de("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.dynamicAlloc||(Xf.dynamicAlloc=function(){de("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.warnOnce||(Xf.warnOnce=function(){de("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.loadDynamicLibrary||(Xf.loadDynamicLibrary=function(){de("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.loadWebAssemblyModule||(Xf.loadWebAssemblyModule=function(){de("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.getLEB||(Xf.getLEB=function(){de("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.getFunctionTables||(Xf.getFunctionTables=function(){de("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.alignFunctionTables||(Xf.alignFunctionTables=function(){de("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.registerFunctions||(Xf.registerFunctions=function(){de("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.addFunction||(Xf.addFunction=function(){de("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.removeFunction||(Xf.removeFunction=function(){de("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.getFuncWrapper||(Xf.getFuncWrapper=function(){de("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.prettyPrint||(Xf.prettyPrint=function(){de("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.makeBigInt||(Xf.makeBigInt=function(){de("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.dynCall||(Xf.dynCall=function(){de("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.getCompilerSetting||(Xf.getCompilerSetting=function(){de("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.stackSave||(Xf.stackSave=function(){de("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.stackRestore||(Xf.stackRestore=function(){de("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.stackAlloc||(Xf.stackAlloc=function(){de("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.establishStackSpace||(Xf.establishStackSpace=function(){de("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.print||(Xf.print=function(){de("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.printErr||(Xf.printErr=function(){de("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.getTempRet0||(Xf.getTempRet0=function(){de("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.setTempRet0||(Xf.setTempRet0=function(){de("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.Pointer_stringify||(Xf.Pointer_stringify=function(){de("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Xf.ALLOC_NORMAL||Object.defineProperty(Xf,"ALLOC_NORMAL",{get:function(){de("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Xf.ALLOC_STACK||Object.defineProperty(Xf,"ALLOC_STACK",{get:function(){de("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Xf.ALLOC_DYNAMIC||Object.defineProperty(Xf,"ALLOC_DYNAMIC",{get:function(){de("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Xf.ALLOC_NONE||Object.defineProperty(Xf,"ALLOC_NONE",{get:function(){de("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),ce.prototype=new Error,ce.prototype.constructor=ce,Np=function e(){Xf.calledRun||he(),Xf.calledRun||(Np=e)},Xf.run=he;var __=[];if(Xf.abort=de,Xf.preInit)for("function"==typeof Xf.preInit&&(Xf.preInit=[Xf.preInit]);Xf.preInit.length>0;)Xf.preInit.pop()();Xf.noExitRuntime=!0,he()}else Xf=null;var m_,$_=Xf,g_=(m_=!0,function(e,t){var i=m_?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return m_=!1,i}),y_=g_(void 0,(function(){return y_.toString().search("(((.+)+)+)+$").toString().constructor(y_).search("(((.+)+)+)+$")}));y_();var v_=!1;if(Ta($_)){$_.onRuntimeInitialized=function(){v_=!0};var x_=$_.cwrap("earcut","number",["number","number","number","number","number","number"])}var b_=ao([{name:"a_pos",components:2,type:"Int16"}],4),S_=b_.members,w_=500,C_=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new No,this.indexArray=new Jo,this.indexArray2=new Qo,this.programConfigurations=new Sc(S_,e.layers,e.zoom),this.segments=new Ao,this.segments2=new Ao,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};C_.prototype.populate=function(e,t){this.hasPattern=jf("fill",this.layers,t);for(var i=[],n=0,r=e;n0&&(this.layoutCesiumVertexBuffer=Yu.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=Yu.toIndexBuffer(e,this.indexArray),this.cesiumIndexBuffer2=Yu.toIndexBuffer(e,this.indexArray2))}this.programConfigurations.upload(e),this.uploaded=!0},C_.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer?.destroy(),this.cesiumIndexBuffer2?.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},C_.prototype.clear=function(){Ta(this.layoutVertexArray)&&(this.layoutVertexArray=null),Ta(this.indexArray)&&(this.indexArray=null),Ta(this.indexArray2)&&(this.indexArray2=null)},C_.prototype.addFeature=function(e,t,i,n,r){for(var o=0,a=af(t,w_);on.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:i,to:t}},r.prototype.interpolate=function(e){return e},r}(Vc);en.register("DataDrivenProperty",Vc);var P_,E_=new xh({"fill-sort-key":new Vc(Od.layout_fill["fill-sort-key"])}),A_=new xh({"fill-antialias":new zc(Od.paint_fill["fill-antialias"]),"fill-opacity":new Vc(Od.paint_fill["fill-opacity"]),"fill-color":new Vc(Od.paint_fill["fill-color"]),"fill-outline-color":new Vc(Od.paint_fill["fill-outline-color"]),"fill-translate":new zc(Od.paint_fill["fill-translate"]),"fill-translate-anchor":new zc(Od.paint_fill["fill-translate-anchor"]),"fill-pattern":new T_(Od.paint_fill["fill-pattern"])}),L_={paint:A_,layout:E_},M_=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,L_)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.recalculate=function(t,i){e.prototype.recalculate.call(this,t,i);var n=this.paint._values["fill-outline-color"];"constant"===n.value.kind&&void 0===n.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},r.prototype.createBucket=function(e){return new C_(e)},r.prototype.queryRadius=function(){return wh.translateDistance(this.paint.get("fill-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,o,a){var s=wh.translate(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),0,a);return Nd.polygonIntersectsMultiPolygon(s,n)},r.prototype.isTileClipped=function(){return!0},r}(Hh),I_=(P_=!0,function(e,t){var i=P_?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return P_=!1,i}),O_=I_(void 0,(function(){return O_.toString().search("(((.+)+)+)+$").toString().constructor(O_).search("(((.+)+)+)+$")}));O_();var D_=["Unknown","Point","LineString","Polygon"],R_=ao([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),N_=R_.members,F_=63,B_=Math.cos(Math.PI/180*37.5),z_=15,G_=20,k_=15,U_=.5,V_=Math.pow(2,k_-1)/U_,W_=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new zo,this.indexArray=new Jo,this.programConfigurations=new Sc(N_,e.layers,e.zoom),this.segments=new Ao,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};W_.prototype.populate=function(e,t){this.hasPattern=!1;for(var i=this.layers[0].layout.get("line-sort-key"),n=[],r=0,o=e;r0&&(this.layoutCesiumVertexBuffer=Yu.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=Yu.toIndexBuffer(e,this.indexArray))}this.programConfigurations.upload(e),this.uploaded=!0},W_.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer.destroy()),this.programConfigurations.destroy(),this.segments.destroy())},W_.prototype.clear=function(){Ta(this.layoutVertexArray)&&(this.layoutVertexArray=null),Ta(this.indexArray)&&(this.indexArray=null)},W_.prototype.addFeature=function(e,t,i,n){for(var r=this.layers[0].layout,o=r.get("line-join").evaluate(e,{}),a=r.get("line-cap"),s=r.get("line-miter-limit"),l=r.get("line-round-limit"),u=0,c=t;u=2&&e[c-1].equals(e[c-2]);)c--;for(var h=0;h0;if(C&&y>h){var P=d.dist(_);if(P>2*f){var E=d.sub(d.sub(_)._mult(f/P)._round());this.updateDistance(_,E),this.addCurrentVertex(E,$,0,0,p),_=E}}var A=_&&m,L=A?i:u?"butt":n;if(A&&"round"===L&&(Sr&&(L="bevel"),"bevel"===L&&(S>2&&(L="flipbevel"),S100)v=g.mult(-1);else{var M=S*$.add(g).mag()/$.sub(g).mag();v._perp()._mult(M*(T?-1:1))}this.addCurrentVertex(d,v,0,0,p),this.addCurrentVertex(d,v.mult(-1),0,0,p)}else if("bevel"===L||"fakeround"===L){var I=-Math.sqrt(S*S-1),O=T?I:0,D=T?0:I;if(_&&this.addCurrentVertex(d,$,O,D,p),"fakeround"===L)for(var R=Math.round(180*w/Math.PI/G_),N=1;N2*f){var U=d.add(m.sub(d)._mult(f/k)._round());this.updateDistance(d,U),this.addCurrentVertex(U,g,0,0,p),d=U}}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,a,s)}},W_.prototype.addCurrentVertex=function(e,t,i,n,r,o){void 0===o&&(o=!1);var a=t.x+t.y*i,s=t.y-t.x*i,l=-t.x+t.y*n,u=-t.y-t.x*n;this.addHalfVertex(e,a,s,o,!1,i,r),this.addHalfVertex(e,l,u,o,!0,-n,r),this.distance>V_/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(e,t,i,n,r,o))},W_.prototype.addHalfVertex=function(e,t,i,n,r,o,a){var s=e.x,l=e.y,u=this.scaledDistance*U_;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(r?1:0),Math.round(F_*t)+128,Math.round(F_*i)+128,1+(0===o?0:o<0?-1:1)|(63&u)<<2,u>>6);var c=a.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,c),a.primitiveLength++),r?this.e2=c:this.e1=c},W_.prototype.updateDistance=function(e,t){this.distance+=e.dist(t),this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(V_-1):this.distance},en.register("LineBucket",W_,{omit:["layers","patternFeatures"]});var H_,Y_=(H_=!0,function(e,t){var i=H_?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return H_=!1,i}),j_=Y_(void 0,(function(){return j_.toString().search("(((.+)+)+)+$").toString().constructor(j_).search("(((.+)+)+)+$")}));j_();var q_=function(e){this.specification=e};q_.prototype.possiblyEvaluate=function(e,t,i){if(void 0!==e.value){if("constant"===e.expression.kind){var n=e.expression.evaluate(t,null,{},i);return this._calculate(n,n,n,t)}return this._calculate(e.expression.evaluate(new $o(Math.floor(t.zoom-1),t)),e.expression.evaluate(new $o(Math.floor(t.zoom),t)),e.expression.evaluate(new $o(Math.floor(t.zoom+1),t)),t)}},q_.prototype._calculate=function(e,t,i,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:i,to:t}},q_.prototype.interpolate=function(e){return e},en.register("CrossFadedProperty",q_);var X_,K_=(X_=!0,function(e,t){var i=X_?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return X_=!1,i}),Z_=K_(void 0,(function(){return Z_.toString().search("(((.+)+)+)+$").toString().constructor(Z_).search("(((.+)+)+)+$")}));Z_();var J_=function(e){this.specification=e};J_.prototype.possiblyEvaluate=function(e,t,i){return!!e.expression.evaluate(t,null,{},i)},J_.prototype.interpolate=function(){return!1},en.register("ColorRampProperty",J_);var Q_=new xh({"line-cap":new zc(Od.layout_line["line-cap"]),"line-join":new Vc(Od.layout_line["line-join"]),"line-miter-limit":new zc(Od.layout_line["line-miter-limit"]),"line-round-limit":new zc(Od.layout_line["line-round-limit"]),"line-sort-key":new Vc(Od.layout_line["line-sort-key"])}),em=new xh({"line-opacity":new Vc(Od.paint_line["line-opacity"]),"line-color":new Vc(Od.paint_line["line-color"]),"line-translate":new zc(Od.paint_line["line-translate"]),"line-translate-anchor":new zc(Od.paint_line["line-translate-anchor"]),"line-width":new Vc(Od.paint_line["line-width"]),"line-gap-width":new Vc(Od.paint_line["line-gap-width"]),"line-offset":new Vc(Od.paint_line["line-offset"]),"line-blur":new Vc(Od.paint_line["line-blur"]),"line-dasharray":new q_(Od.paint_line["line-dasharray"]),"line-pattern":new T_(Od.paint_line["line-pattern"]),"line-gradient":new J_(Od.paint_line["line-gradient"])}),tm={paint:em,layout:Q_},im=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(){e.apply(this,arguments)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.possiblyEvaluate=function(t,i){return i=new $o(Math.floor(i.zoom),{now:i.now,fadeDuration:i.fadeDuration,zoomHistory:i.zoomHistory,transition:i.transition}),e.prototype.possiblyEvaluate.call(this,t,i)},r.prototype.evaluate=function(t,i,n,r){return i=extend({},i,{zoom:Math.floor(i.zoom)}),e.prototype.evaluate.call(this,t,i,n,r)},r}(Vc),nm=new im(tm.paint.properties["line-width"].specification);nm.useIntegerZoom=!0;var rm=function(e){function t(t){e.call(this,t,tm)}function i(e,t){return t>0?t+2*e:e}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._handleSpecialPaintPropertyUpdate=function(e){"line-gradient"===e&&this._updateGradient()},t.prototype._updateGradient=function(){var e=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=renderColorRamp(e,"lineProgress"),this.gradientTexture=null},t.prototype.recalculate=function(t,i){e.prototype.recalculate.call(this,t,i),this.paint._values["line-floorwidth"]=nm.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)},t.prototype.createBucket=function(e){return new W_(e)},t.prototype.queryRadius=function(e){var t=e,n=i(wh.getMaximumPaintValue("line-width",this,t),wh.getMaximumPaintValue("line-gap-width",this,t)),r=wh.getMaximumPaintValue("line-offset",this,t);return n/2+Math.abs(r)+wh.translateDistance(this.paint.get("line-translate"))},t.prototype.queryIntersectsFeature=function(e,t,n,r,o,a,s){var l=wh.translate(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),0,s),u=i(this.paint.get("line-width")?.evaluate(t,n),this.paint.get("line-gap-width")?.evaluate(t,n)),c=s/2*(u=Math.max(u,5)),h=this.paint.get("line-offset")?.evaluate(t,n);return h&&(r=function(e,t){for(var i=[],n=new to(0,0),r=0;r=128&&e<=255},Arabic:function(e){return e>=1536&&e<=1791},"Arabic Supplement":function(e){return e>=1872&&e<=1919},"Arabic Extended-A":function(e){return e>=2208&&e<=2303},"Hangul Jamo":function(e){return e>=4352&&e<=4607},"Unified Canadian Aboriginal Syllabics":function(e){return e>=5120&&e<=5759},Khmer:function(e){return e>=6016&&e<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(e){return e>=6320&&e<=6399},"General Punctuation":function(e){return e>=8192&&e<=8303},"Letterlike Symbols":function(e){return e>=8448&&e<=8527},"Number Forms":function(e){return e>=8528&&e<=8591},"Miscellaneous Technical":function(e){return e>=8960&&e<=9215},"Control Pictures":function(e){return e>=9216&&e<=9279},"Optical Character Recognition":function(e){return e>=9280&&e<=9311},"Enclosed Alphanumerics":function(e){return e>=9312&&e<=9471},"Geometric Shapes":function(e){return e>=9632&&e<=9727},"Miscellaneous Symbols":function(e){return e>=9728&&e<=9983},"Miscellaneous Symbols and Arrows":function(e){return e>=11008&&e<=11263},"CJK Radicals Supplement":function(e){return e>=11904&&e<=12031},"Kangxi Radicals":function(e){return e>=12032&&e<=12255},"Ideographic Description Characters":function(e){return e>=12272&&e<=12287},"CJK Symbols and Punctuation":function(e){return e>=12288&&e<=12351},Hiragana:function(e){return e>=12352&&e<=12447},Katakana:function(e){return e>=12448&&e<=12543},Bopomofo:function(e){return e>=12544&&e<=12591},"Hangul Compatibility Jamo":function(e){return e>=12592&&e<=12687},Kanbun:function(e){return e>=12688&&e<=12703},"Bopomofo Extended":function(e){return e>=12704&&e<=12735},"CJK Strokes":function(e){return e>=12736&&e<=12783},"Katakana Phonetic Extensions":function(e){return e>=12784&&e<=12799},"Enclosed CJK Letters and Months":function(e){return e>=12800&&e<=13055},"CJK Compatibility":function(e){return e>=13056&&e<=13311},"CJK Unified Ideographs Extension A":function(e){return e>=13312&&e<=19903},"Yijing Hexagram Symbols":function(e){return e>=19904&&e<=19967},"CJK Unified Ideographs":function(e){return e>=19968&&e<=40959},"Yi Syllables":function(e){return e>=40960&&e<=42127},"Yi Radicals":function(e){return e>=42128&&e<=42191},"Hangul Jamo Extended-A":function(e){return e>=43360&&e<=43391},"Hangul Syllables":function(e){return e>=44032&&e<=55215},"Hangul Jamo Extended-B":function(e){return e>=55216&&e<=55295},"Private Use Area":function(e){return e>=57344&&e<=63743},"CJK Compatibility Ideographs":function(e){return e>=63744&&e<=64255},"Arabic Presentation Forms-A":function(e){return e>=64336&&e<=65023},"Vertical Forms":function(e){return e>=65040&&e<=65055},"CJK Compatibility Forms":function(e){return e>=65072&&e<=65103},"Small Form Variants":function(e){return e>=65104&&e<=65135},"Arabic Presentation Forms-B":function(e){return e>=65136&&e<=65279},"Halfwidth and Fullwidth Forms":function(e){return e>=65280&&e<=65519}};const mm=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),$m=mm(void 0,(function(){return $m.toString().search("(((.+)+)+)+$").toString().constructor($m).search("(((.+)+)+)+$")}));function gm(e){for(const t of e)if(bm(t.charCodeAt(0)))return!0;return!1}function ym(e){for(const t of e)if(!vm(t.charCodeAt(0)))return!1;return!0}function vm(e){return!(_m.Arabic(e)||_m["Arabic Supplement"](e)||_m["Arabic Extended-A"](e)||_m["Arabic Presentation Forms-A"](e)||_m["Arabic Presentation Forms-B"](e))}function xm(e){return!(e<11904||!(_m["Bopomofo Extended"](e)||_m.Bopomofo(e)||_m["CJK Compatibility Forms"](e)||_m["CJK Compatibility Ideographs"](e)||_m["CJK Compatibility"](e)||_m["CJK Radicals Supplement"](e)||_m["CJK Strokes"](e)||_m["CJK Symbols and Punctuation"](e)||_m["CJK Unified Ideographs Extension A"](e)||_m["CJK Unified Ideographs"](e)||_m["Enclosed CJK Letters and Months"](e)||_m["Halfwidth and Fullwidth Forms"](e)||_m.Hiragana(e)||_m["Ideographic Description Characters"](e)||_m["Kangxi Radicals"](e)||_m["Katakana Phonetic Extensions"](e)||_m.Katakana(e)||_m["Vertical Forms"](e)||_m["Yi Radicals"](e)||_m["Yi Syllables"](e)))}function bm(e){return!(746!==e&&747!==e&&(e<4352||!(_m["Bopomofo Extended"](e)||_m.Bopomofo(e)||_m["CJK Compatibility Forms"](e)&&!(e>=65097&&e<=65103)||_m["CJK Compatibility Ideographs"](e)||_m["CJK Compatibility"](e)||_m["CJK Radicals Supplement"](e)||_m["CJK Strokes"](e)||!(!_m["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||_m["CJK Unified Ideographs Extension A"](e)||_m["CJK Unified Ideographs"](e)||_m["Enclosed CJK Letters and Months"](e)||_m["Hangul Compatibility Jamo"](e)||_m["Hangul Jamo Extended-A"](e)||_m["Hangul Jamo Extended-B"](e)||_m["Hangul Jamo"](e)||_m["Hangul Syllables"](e)||_m.Hiragana(e)||_m["Ideographic Description Characters"](e)||_m.Kanbun(e)||_m["Kangxi Radicals"](e)||_m["Katakana Phonetic Extensions"](e)||_m.Katakana(e)&&12540!==e||!(!_m["Halfwidth and Fullwidth Forms"](e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||!(!_m["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||_m["Unified Canadian Aboriginal Syllabics"](e)||_m["Unified Canadian Aboriginal Syllabics Extended"](e)||_m["Vertical Forms"](e)||_m["Yijing Hexagram Symbols"](e)||_m["Yi Syllables"](e)||_m["Yi Radicals"](e))))}function Sm(e){return!!(_m["Latin-1 Supplement"](e)&&(167===e||169===e||174===e||177===e||188===e||189===e||190===e||215===e||247===e)||_m["General Punctuation"](e)&&(8214===e||8224===e||8225===e||8240===e||8241===e||8251===e||8252===e||8258===e||8263===e||8264===e||8265===e||8273===e)||_m["Letterlike Symbols"](e)||_m["Number Forms"](e)||_m["Miscellaneous Technical"](e)&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||9003===e||e>=9085&&e<=9114||e>=9150&&e<=9165||9167===e||e>=9169&&e<=9179||e>=9186&&e<=9215)||_m["Control Pictures"](e)&&9251!==e||_m["Optical Character Recognition"](e)||_m["Enclosed Alphanumerics"](e)||_m["Geometric Shapes"](e)||_m["Miscellaneous Symbols"](e)&&!(e>=9754&&e<=9759)||_m["Miscellaneous Symbols and Arrows"](e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||_m["CJK Symbols and Punctuation"](e)||_m.Katakana(e)||_m["Private Use Area"](e)||_m["CJK Compatibility Forms"](e)||_m["Small Form Variants"](e)||_m["Halfwidth and Fullwidth Forms"](e)||8734===e||8756===e||8757===e||e>=9984&&e<=10087||e>=10102&&e<=10131||65532===e||65533===e)}function wm(e){return!(bm(e)||Sm(e))}function Cm(e){return _m.Arabic(e)||_m["Arabic Supplement"](e)||_m["Arabic Extended-A"](e)||_m["Arabic Presentation Forms-A"](e)||_m["Arabic Presentation Forms-B"](e)}function Tm(e){return e>=1424&&e<=2303||_m["Arabic Presentation Forms-A"](e)||_m["Arabic Presentation Forms-B"](e)}function Pm(e){for(const t of e)if(Tm(t.charCodeAt(0)))return!0;return!1}$m();const Em=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Am=Em(void 0,(function(){return Am.toString().search("(((.+)+)+)+$").toString().constructor(Am).search("(((.+)+)+)+$")}));Am();const Lm={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};function Mm(e){let t="";for(let i=0;in.headers.set(t,e)));const r=dh(t.headers.get("Cache-Control")||"");r["no-store"]||(r["max-age"]&&n.headers.set("Expires",new Date(i+1e3*r["max-age"]).toUTCString()),new Date(n.headers.get("Expires")).getTime()-i{const i=new window.Response(t,n);window.caches.open(jm).then((t=>t.put(Jm(e.url),i)))})))}function Jm(e){const t=e.indexOf("?");return t<0?e:e.slice(0,t)}function Qm(e,t){if(!window.caches)return t(null);const i=Jm(e.url);window.caches.open(jm).catch(t).then((e=>{e.match(i).catch(t).then((n=>{const r=e$(n);e.delete(i),r&&e.put(i,n.clone()),t(null,n,r)}))}))}function e$(e){if(!e)return!1;const t=new Date(e.headers.get("Expires")),i=dh(e.headers.get("Cache-Control")||"");return t>Date.now()&&!i["no-cache"]}function t$(e){window.caches&&window.caches.open(jm).then((t=>{t.keys().then((i=>{for(let n=0;nself.worker&&self.worker.referrer:()=>("blob:"===window.location.protocol?window.parent:window).location.href,s$=e=>/^file:/.test(e)||/^file:/.test(a$())&&!/^\w+:/.test(e);function l$(e,t){const i=hh()?self:window,n=new i.AbortController,r=new i.Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,referrer:a$(),signal:n.signal});let o=!1,a=!1;const s=Wm(r.url);"json"===e.type&&r.headers.set("Accept","application/json");const l=(n,o,l)=>{if(a)return;if(n&&"SecurityError"!==n.message&&uh(n),o&&l)return u(o);const c=Date.now();i.fetch(r).then((i=>{if(i.ok){const e=s?i.clone():null;return u(i,e,c)}return t(new o$(i.statusText,i.status,e.url))})).catch((e=>{20!==e.code&&t(new Error(e.message))}))},u=(i,n,s)=>{("arrayBuffer"===e.type?i.arrayBuffer():"json"===e.type?i.json():i.text()).then((e=>{a||(n&&s&&Zm(r,n,s),o=!0,t(null,e,i.headers.get("Cache-Control"),i.headers.get("Expires")))})).catch((e=>t(new Error(e.message))))};return s?Qm(r,l):l(null,null),{cancel:()=>{a=!0,o||n.abort()}}}function u$(e,t){const i=new((hh()?self:window).XMLHttpRequest);i.open(e.method||"GET",e.url,!0),"arrayBuffer"===e.type&&(i.responseType="arraybuffer");for(const t in e.headers)i.setRequestHeader(t,e.headers[t]);return"json"===e.type&&(i.responseType="text",i.setRequestHeader("Accept","application/json")),i.withCredentials="include"===e.credentials,i.onerror=()=>{t(new Error(i.statusText))},i.onload=()=>{if((i.status>=200&&i.status<300||0===i.status)&&null!==i.response){let n=i.response;if("json"===e.type)try{n=JSON.parse(i.response)}catch(e){return t(e)}t(null,n,i.getResponseHeader("Cache-Control"),i.getResponseHeader("Expires"))}else t(new o$(i.statusText,i.status,e.url))},i.send(e.body),{cancel:()=>i.abort()}}const c$=function(e,t){const i=hh()?self:window;if(!s$(e.url)){if(i.fetch&&i.Request&&i.AbortController&&i.Request.prototype.hasOwnProperty("signal"))return l$(e,t);if(hh()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t)}return u$(e,t)},h$=function(e,t){return c$(ih(e,{type:"arrayBuffer"}),t)},d$=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),f$=d$(void 0,(function(){return f$.toString().search("(((.+)+)+)+$").toString().constructor(f$).search("(((.+)+)+)+$")}));f$();const p$=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_$=p$(void 0,(function(){return _$.toString().search("(((.+)+)+)+$").toString().constructor(_$).search("(((.+)+)+)+$")}));_$();const m$={unavailable:"unavailable",deferred:"deferred",loading:"loading",loaded:"loaded",error:"error"};let $$=m$.unavailable,g$=null;const y$={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>$$===m$.loaded||null!=y$.applyArabicShaping,isLoading:()=>$$===m$.loading,setState(e){$$=e.pluginStatus,g$=e.pluginURL},isParsed:()=>null!=y$.applyArabicShaping,getPluginURL:()=>g$};var v$,x$=(v$=!0,function(e,t){var i=v$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return v$=!1,i}),b$=x$(void 0,(function(){return b$.toString().search("(((.+)+)+)+$").toString().constructor(b$).search("(((.+)+)+)+$")}));b$();var S$,w$=24,C$=(S$=!0,function(e,t){var i=S$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return S$=!1,i}),T$=C$(void 0,(function(){return T$.toString().search("(((.+)+)+)+$").toString().constructor(T$).search("(((.+)+)+)+$")}));T$();var P$=function(e,t){E$(this,e,1,t)};function E$(e,t,i,n){var r=t.width,o=t.height;if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==r*o*i)throw new RangeError("mismatched image size")}else n=new Uint8Array(r*o*i);return e.width=r,e.height=o,e.data=n,e}function A$(e,t,i){var n=t.width,r=t.height;if(n!==e.width||r!==e.height){var o=E$({},{width:n,height:r},i);L$(e,o,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,n),height:Math.min(e.height,r)},i),e.width=n,e.height=r,e.data=o.data}}function L$(e,t,i,n,r,o){if(0===r.width||0===r.height)return t;if(r.width>e.width||r.height>e.height||i.x>e.width-r.width||i.y>e.height-r.height)throw new RangeError("out of range source coordinates for image copy");if(r.width>t.width||r.height>t.height||n.x>t.width-r.width||n.y>t.height-r.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=e.data,s=t.data,l=0;l>1,c=-7,h=i?r-1:0,d=i?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+h],h+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+h],h+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},I$=function(e,t,i,n,r,o){var a,s,l,u=8*o-r-1,c=(1<>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(t*l-1)*Math.pow(2,r),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,r),a=0));r>=8;e[i+f]=255&s,f+=p,s/=256,r-=8);for(a=a<0;e[i+f]=255&a,f+=p,a/=256,u-=8);e[i+f-p]|=128*_},O$={read:M$,write:I$};function D$(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}D$.Varint=0,D$.Fixed64=1,D$.Bytes=2,D$.Fixed32=5;var R$=4294967296,N$=1/R$;function F$(e,t,i){var n,r,o=i.buf;if(n=(112&(r=o[i.pos++]))>>4,r<128||(n|=(127&(r=o[i.pos++]))<<3,r<128)||(n|=(127&(r=o[i.pos++]))<<10,r<128)||(n|=(127&(r=o[i.pos++]))<<17,r<128)||(n|=(127&(r=o[i.pos++]))<<24,r<128)||(n|=(1&(r=o[i.pos++]))<<31,r<128))return z$(e,n,t);throw new Error("Expected varint not more than 10 bytes")}function B$(e){return e.type===D$.Bytes?e.readVarint()+e.pos:e.pos+1}function z$(e,t,i){return i?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function G$(e,t){var i,n;if(e>=0?(i=e%4294967296|0,n=e/4294967296|0):(n=~(-e/4294967296),4294967295^(i=~(-e%4294967296))?i=i+1|0:(i=0,n=n+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),k$(i,0,t),U$(n,t)}function k$(e,t,i){i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos]=127&e}function U$(e,t){var i=(7&e)<<4;t.buf[t.pos++]|=i|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}function V$(e,t,i){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.ceil(Math.log(t)/(7*Math.LN2));i.realloc(n);for(var r=i.pos-1;r>=e;r--)i.buf[r+n]=i.buf[r]}function W$(e,t){for(var i=0;i>>8,e[i+2]=t>>>16,e[i+3]=t>>>24}function tg(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function ig(e,t,i){for(var n="",r=t;r239?4:l>223?3:l>191?2:1;if(r+c>i)break;1===c?l<128&&(u=l):2===c?128==(192&(o=e[r+1]))&&(u=(31&l)<<6|63&o)<=127&&(u=null):3===c?(o=e[r+1],a=e[r+2],128==(192&o)&&128==(192&a)&&((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(o=e[r+1],a=e[r+2],s=e[r+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,n+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),n+=String.fromCharCode(u),r+=c}return n}function ng(e,t,i){for(var n,r,o=0;o55295&&n<57344){if(!r){n>56319||o+1===t.length?(e[i++]=239,e[i++]=191,e[i++]=189):r=n;continue}if(n<56320){e[i++]=239,e[i++]=191,e[i++]=189,r=n;continue}n=r-55296<<10|n-56320|65536,r=null}else r&&(e[i++]=239,e[i++]=191,e[i++]=189,r=null);n<128?e[i++]=n:(n<2048?e[i++]=n>>6|192:(n<65536?e[i++]=n>>12|224:(e[i++]=n>>18|240,e[i++]=n>>12&63|128),e[i++]=n>>6&63|128),e[i++]=63&n|128)}return i}D$.prototype={destroy:function(){this.buf=null},readFields:function(e,t,i){for(i=i||this.length;this.pos>3,o=this.pos;this.type=7&n,e(r,t,this),this.pos===o&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=Q$(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=tg(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=Q$(this.buf,this.pos)+Q$(this.buf,this.pos+4)*R$;return this.pos+=8,e},readSFixed64:function(){var e=Q$(this.buf,this.pos)+tg(this.buf,this.pos+4)*R$;return this.pos+=8,e},readFloat:function(){var e=O$.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=O$.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,i,n=this.buf;return t=127&(i=n[this.pos++]),i<128||(t|=(127&(i=n[this.pos++]))<<7,i<128)||(t|=(127&(i=n[this.pos++]))<<14,i<128)||(t|=(127&(i=n[this.pos++]))<<21,i<128)?t:F$(t|=(15&(i=n[this.pos]))<<28,e,this)},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=ig(this.buf,this.pos,e);return this.pos=e,t},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){var i=B$(this);for(e=e||[];this.pos127;);else if(t===D$.Bytes)this.pos=this.readVarint()+this.pos;else if(t===D$.Fixed32)this.pos+=4;else{if(t!==D$.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t268435455||e<0?G$(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=ng(this.buf,e,this.pos);var i=this.pos-t;i>=128&&V$(t,i,this),this.pos=t-1,this.writeVarint(i),this.pos+=i},writeFloat:function(e){this.realloc(4),O$.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),O$.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var i=0;i=128&&V$(i,n,this),this.pos=i-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,i){this.writeTag(e,D$.Bytes),this.writeRawMessage(t,i)},writePackedVarint:function(e,t){this.writeMessage(e,W$,t)},writePackedSVarint:function(e,t){this.writeMessage(e,H$,t)},writePackedBoolean:function(e,t){this.writeMessage(e,q$,t)},writePackedFloat:function(e,t){this.writeMessage(e,Y$,t)},writePackedDouble:function(e,t){this.writeMessage(e,j$,t)},writePackedFixed32:function(e,t){this.writeMessage(e,X$,t)},writePackedSFixed32:function(e,t){this.writeMessage(e,K$,t)},writePackedFixed64:function(e,t){this.writeMessage(e,Z$,t)},writePackedSFixed64:function(e,t){this.writeMessage(e,J$,t)},writeBytesField:function(e,t){this.writeTag(e,D$.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,D$.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,D$.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,D$.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,D$.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,D$.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,D$.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,D$.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,D$.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,D$.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};const rg=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),og=rg(void 0,(function(){return og.toString().search("(((.+)+)+)+$").toString().constructor(og).search("(((.+)+)+)+$")}));og();const ag=3,sg=ag,lg=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),ug=lg(void 0,(function(){return ug.toString().search("(((.+)+)+)+$").toString().constructor(ug).search("(((.+)+)+)+$")}));ug();var cg=1;const hg={horizontal:1,vertical:2,horizontalOnly:3},dg=-17;function fg(e){for(const t of e)if(0!==t.positionedGlyphs.length)return!1;return!0}const pg=57344,_g=63743;class mg{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(e,t){const i=new mg;return i.scale=e||1,i.fontStack=t,i}static forImage(e){const t=new mg;return t.imageName=e,t}}class $g{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(e,t){const i=new $g;for(let n=0;n=0&&i>=e&&vg[this.text.charCodeAt(i)];i--)t--;this.text=this.text.substring(e,t),this.sectionIndex=this.sectionIndex.slice(e,t)}substring(e,t){const i=new $g;return i.text=this.text.substring(e,t),i.sectionIndex=this.sectionIndex.slice(e,t),i.sections=this.sections,i}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce(((e,t)=>Math.max(e,this.sections[t].scale)),0)}addTextSection(e,t){this.text+=e.text,this.sections.push(mg.forText(e.scale,e.fontStack||t));const i=this.sections.length-1;for(let t=0;t=_g?null:++this.imageSectionID:(this.imageSectionID=pg,this.imageSectionID)}}function gg(e,t){const i=[],n=e.text;let r=0;for(const n of t)i.push(e.substring(r,n)),r=n;return r=0;let c=0;for(let i=0;i0&&o>v&&(v=o)}else{const e=i[p.fontStack],n=e&&e[m];if(n&&n.rect)x=n.rect,g=n.metrics;else{const e=t[p.fontStack],i=e&&e[m];if(!i)continue;g=i.metrics}$=(r-p.scale)*w$}w?(e.verticalizable=!0,y.push({glyph:m,imageName:b,x:d,y:f+$,vertical:w,scale:p.scale,fontStack:p.fontStack,sectionIndex:_,metrics:g,rect:x}),d+=S*p.scale+u):(y.push({glyph:m,imageName:b,x:d,y:f+$,vertical:w,scale:p.scale,fontStack:p.fontStack,sectionIndex:_,metrics:g,rect:x}),d+=g.advance*p.scale+u)}if(0!==y.length){const e=d-u;p=Math.max(e,p),Mg(y,0,y.length-1,m,v)}d=0;const x=o*r+v;g.lineOffset=Math.max(v,s),f+=x,_=Math.max(x,_),++$}const g=f-dg,{horizontalAlign:y,verticalAlign:v}=Ag(a);Ig(e.positionedLines,m,y,v,p,_,o,g,r.length),e.top+=-v*g,e.bottom=e.top+g,e.left+=-y*p,e.right=e.left+p}function Mg(e,t,i,n,r){if(!n&&!r)return;const o=e[i],a=o.metrics.advance*o.scale,s=(e[i].x+a)*n;for(let n=t;n<=i;n++)e[n].x-=s,e[n].y+=r}function Ig(e,t,i,n,r,o,a,s,l){const u=(t-i)*r;let c=0;c=o!==a?-s*n-dg:(-n*l+.5)*a;for(const t of e)for(const e of t.positionedGlyphs)e.x+=u,e.y+=c}function Og(e,t,i){const{horizontalAlign:n,verticalAlign:r}=Ag(i),o=t[0],a=t[1],s=o-e.displaySize[0]*n,l=s+e.displaySize[0],u=a-e.displaySize[1]*r;return{image:e,top:u,bottom:u+e.displaySize[1],left:s,right:l}}function Dg(e,t,i,n,r,o){const a=e.image;let s;if(a.content){const e=a.content,t=a.pixelRatio||1;s=[e[0]/t,e[1]/t,a.displaySize[0]-e[2]/t,a.displaySize[1]-e[3]/t]}const l=t.left*o,u=t.right*o;let c,h,d,f;"width"===i||"both"===i?(f=r[0]+l-n[3],h=r[0]+u+n[1]):(f=r[0]+(l+u-a.displaySize[0])/2,h=f+a.displaySize[0]);const p=t.top*o,_=t.bottom*o;return"height"===i||"both"===i?(c=r[1]+p-n[0],d=r[1]+_+n[2]):(c=r[1]+(p+_-a.displaySize[1])/2,d=c+a.displaySize[1]),{image:a,top:c,right:h,bottom:d,left:f,collisionPadding:s}}var Rg,Ng=(Rg=!0,function(e,t){var i=Rg?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Rg=!1,i}),Fg=Ng(void 0,(function(){return Fg.toString().search("(((.+)+)+)+$").toString().constructor(Fg).search("(((.+)+)+)+$")}));Fg();const Bg=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),zg=Bg(void 0,(function(){return zg.toString().search("(((.+)+)+)+$").toString().constructor(zg).search("(((.+)+)+)+$")}));zg();const Gg=128;function kg(e,t){const{expression:i}=t;if("constant"===i.kind)return{kind:"constant",layoutSize:i.evaluate(new $o(e+1))};if("source"===i.kind)return{kind:"source"};{const{zoomStops:t,interpolationType:n}=i;let r=0;for(;r-i/2;){if(--a<0)return!1;s-=e[a].dist(o),o=e[a]}s+=e[a].dist(e[a+1]),a++;for(var l=[],u=0;sn;)u-=l.shift().angleDelta;if(u>r)return!1;a++,s+=h.dist(d)}return!0}Hg();var jg,qg=(jg=!0,function(e,t){var i=jg?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return jg=!1,i}),Xg=qg(void 0,(function(){return Xg.toString().search("(((.+)+)+)+$").toString().constructor(Xg).search("(((.+)+)+)+$")}));function Kg(e,t,i){return e*(1-i)+t*i}Xg();var Zg=function(){};function Jg(e){for(var t=0,i=0;i=0&&v=0&&x=0&&d+u<=c){var b=new Ug(v,x,g,p);b._round(),(!n||Yg(e,b,o,n,r))&&f.push(b)}}h+=$}return!s&&!f.length&&!a&&(f=ty(e,h/2,i,n,r,o,a,!0,l)),f}Zg.getCenterAnchor=function(e,t,i,n,r,o){for(var a=Qg(i,r,o),s=ey(i,n)*o,l=0,u=Jg(e)/2,c=0;cu){var p=(u-l)/f,_=Kg(h.x,d.x,p),m=Kg(h.y,d.y,p),$=new Ug(_,m,d.angleTo(h),c);return $._round(),!a||Yg(e,$,s,a,t)?$:void 0}l+=f}},Zg.getAnchors=function(e,t,i,n,r,o,a,s,l){var u=Qg(n,o,a),c=ey(n,r),h=c*a,d=0===e[0].x||e[0].x===l||0===e[0].y||e[0].y===l;return t-h=n&&h.x>=n||(c.x>=n?c=new to(n,c.y+(h.y-c.y)*((n-c.x)/(h.x-c.x)))._round():h.x>=n&&(h=new to(n,c.y+(h.y-c.y)*((n-c.x)/(h.x-c.x)))._round()),c.y>=r&&h.y>=r||(c.y>=r?c=new to(c.x+(h.x-c.x)*((r-c.y)/(h.y-c.y)),r)._round():h.y>=r&&(h=new to(c.x+(h.x-c.x)*((r-c.y)/(h.y-c.y)),r)._round()),(!l||!c.equals(l[l.length-1]))&&(l=[c],o.push(l)),l.push(h)))))}return o}ry();var ay,sy=(ay=!0,function(e,t){var i=ay?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ay=!1,i}),ly=sy(void 0,(function(){return ly.toString().search("(((.+)+)+)+$").toString().constructor(ly).search("(((.+)+)+)+$")}));ly();var uy=1,cy=-17,hy=3,dy=function(){},fy=uy;function py(e,t,i){for(var n=0,r=0,o=e;r0&&($=Math.max(10*s,$),this._addLineCollisionCircles(e,t,i,i.segment,g,$,n,r,o,c))}else{if(h){var y=new to(p,d),v=new to(_,d),x=new to(p,f),b=new to(_,f),S=h*Math.PI/180;y._rotate(S),v._rotate(S),x._rotate(S),b._rotate(S),p=Math.min(y.x,v.x,x.x,b.x),_=Math.max(y.x,v.x,x.x,b.x),d=Math.min(y.y,v.y,x.y,b.y),f=Math.max(y.y,v.y,x.y,b.y)}e.emplaceBack(i.x,i.y,p,d,_,f,n,r,o,0,0)}this.boxEndIndex=e.length};xy.prototype._addLineCollisionCircles=function(e,t,i,n,r,o,a,s,l,u){var c=o/2,h=Math.floor(r/c)||1,d=1+.4*Math.log(u)/Math.LN2,f=Math.floor(h*d/2),p=-o/2,_=i,m=n+1,$=p,g=-r/2,y=g-r/4;do{if(--m<0){if($>g)return;m=0;break}$-=t[m].dist(_),_=t[m]}while($>y);for(var v=t[m].dist(t[m+1]),x=-f;xr&&(S+=b-r),!(S<$)){for(;$+v=t.length)return;v=t[m].dist(t[m+1])}var w=S-$,C=t[m],T=t[m+1].sub(C)._unit()._mult(w)._add(C)._round(),P=Math.abs(S-p)o)&&(o=u.x),(!l||u.y>a)&&(a=u.y)}var c=o-n,h=a-r,d=Math.min(c,h),f=d/2,p=new TinyQueue([],Ty);if(0===d)return new to(n,r);for(var _=n;_$.d||!$.d)&&($=y,i&&console.log("found best %d after %d probes",Math.round(1e4*y.d)/1e4,g)),y.max-$.d<=t||(f=y.h/2,p.push(new Py(y.p.x-f,y.p.y-f,f,e)),p.push(new Py(y.p.x+f,y.p.y-f,f,e)),p.push(new Py(y.p.x-f,y.p.y+f,f,e)),p.push(new Py(y.p.x+f,y.p.y+f,f,e)),g+=4)}return i&&(console.log("num probes: "+g),console.log("best distance: "+$.d)),$.p}function Ty(e,t){return t.max-e.max}function Py(e,t,i,n){this.p=new to(e,t),this.h=i,this.d=Ey(this.p,n),this.max=this.d+this.h*Math.SQRT2}function Ey(e,t){for(var i=!1,n=1/0,r=0;re.y!=c.y>e.y&&e.x<(c.x-u.x)*(e.y-u.y)/(c.y-u.y)+u.x&&(i=!i),n=Math.min(n,Nd.distToSegmentSquared(e,u,c))}return(i?1:-1)*Math.sqrt(n)}function Ay(e){for(var t=0,i=0,n=0,r=e[0],o=0,a=r.length,s=a-1;o>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|r>>>19))+((5*(r>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,i){case 3:l^=(255&e.charCodeAt(u+2))<<16;case 2:l^=(255&e.charCodeAt(u+1))<<8;case 1:r^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(u)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return r^=e.length,r=2246822507*(65535&(r^=r>>>16))+((2246822507*(r>>>16)&65535)<<16)&4294967295,r=3266489909*(65535&(r^=r>>>13))+((3266489909*(r>>>16)&65535)<<16)&4294967295,(r^=r>>>16)>>>0}Iy();const Dy=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Ry=Dy(void 0,(function(){return Ry.toString().search("(((.+)+)+)+$").toString().constructor(Ry).search("(((.+)+)+)+$")}));Ry();const Ny=7,Fy=Number.POSITIVE_INFINITY;function By(e,t){return t[1]!==Fy?function(e,t,i){let n=0,r=0;switch(t=Math.abs(t),i=Math.abs(i),e){case"top-right":case"top-left":case"top":r=i-Ny;break;case"bottom-right":case"bottom-left":case"bottom":r=-i+Ny}switch(e){case"top-right":case"bottom-right":case"right":n=-t;break;case"top-left":case"bottom-left":case"left":n=t}return[n,r]}(e,t[0],t[1]):function(e,t){let i=0,n=0;t<0&&(t=0);const r=t/Math.sqrt(2);switch(e){case"top-right":case"top-left":n=r-Ny;break;case"bottom-right":case"bottom-left":n=-r+Ny;break;case"bottom":n=-t+Ny;break;case"top":n=t-Ny}switch(e){case"top-right":case"bottom-right":i=-r;break;case"top-left":case"bottom-left":i=r;break;case"left":i=t;break;case"right":i=-t}return[i,n]}(e,t[0])}function zy(e,t,i,n,r,o){e.createArrays();const a=512*e.overscaling;e.tilePixelRatio=xo/a,e.compareText={},e.iconsNeedLinear=!1;const s=e.layers[0].layout,l=e.layers[0]._unevaluatedLayout._values,u={};if("composite"===e.textSizeData.kind){const{minZoom:t,maxZoom:i}=e.textSizeData;u.compositeTextSizes=[l["text-size"].possiblyEvaluate(new $o(t)),l["text-size"].possiblyEvaluate(new $o(i))]}if("composite"===e.iconSizeData.kind){const{minZoom:t,maxZoom:i}=e.iconSizeData;u.compositeIconSizes=[l["icon-size"].possiblyEvaluate(new $o(t)),l["icon-size"].possiblyEvaluate(new $o(i))]}u.layoutTextSize=l["text-size"].possiblyEvaluate(new $o(e.zoom+1)),u.layoutIconSize=l["icon-size"].possiblyEvaluate(new $o(e.zoom+1)),u.textMaxSize=l["text-size"].possiblyEvaluate(new $o(18));const c=s.get("text-line-height")*w$,h="map"===s.get("text-rotation-alignment")&&"point"!==s.get("symbol-placement"),d=s.get("text-keep-upright"),f=s.get("text-size");for(const o of e.features){const a=s.get("text-font").evaluate(o,{}).join(","),l=f.evaluate(o,{}),p=u.layoutTextSize.evaluate(o,{}),_=u.layoutIconSize.evaluate(o,{}),m={horizontal:{},vertical:void 0},$=o.text;let g=[0,0];if($){const n=$.toString(),u=s.get("text-letter-spacing").evaluate(o,{})*w$,f=ym(n)?u:0,_=s.get("text-anchor").evaluate(o,{}),y=s.get("text-variable-anchor");if(!y){const e=s.get("text-radial-offset").evaluate(o,{});g=e?By(_,[e*w$,Fy]):s.get("text-offset").evaluate(o,{}).map((e=>e*w$))}let v=h?"center":s.get("text-justify").evaluate(o,{});const x=s.get("symbol-placement"),b="point"===x?s.get("text-max-width").evaluate(o,{})*w$:0,S=()=>{e.allowVerticalPlacement&&gm(n)&&(m.vertical=yg($,t,i,r,a,b,c,_,"left",f,g,hg.vertical,!0,x,p,l))};if(!h&&y){const e="auto"===v?y.map((e=>Gy(e))):[v];let n=!1;for(let o=0;o{s.x<0||s.x>=xo||s.y<0||s.y>=xo||Yy(e,s,a,i,n,r,P,e.layers[0],e.collisionBoxArray,t.index,t.sourceLayerIndex,e.index,_,y,b,l,$,v,S,d,t,o,u)};if("line"===w)for(const r of oy(t.geometry,0,0,xo,xo)){const t=Zg.getAnchors(r,g,x,i.vertical||f,n,24,m,e.overscaling,xo);for(const i of t){const t=f;(!t||!jy(e,t.text,C,i))&&E(r,i)}}else if("line-center"===w){for(const e of t.geometry)if(e.length>1){const t=Zg.getCenterAnchor(e,x,i.vertical||f,n,24,m);t&&E(e,t)}}else if("Polygon"===t.type)for(const e of af(t.geometry,0)){const t=Cy(e,16);E(e[0],new Ug(t.x,t.y,0))}else if("LineString"===t.type)for(const e of t.geometry)E(e,new Ug(e[0].x,e[0].y,0));else if("Point"===t.type)for(const e of t.geometry)for(const t of e)E([t],new Ug(t.x,t.y,0))}const Uy=255,Vy=Uy*Gg;function Wy(e,t,i,n,r,o,a,s,l,u,c,h,d,f){const p=dy.getGlyphQuads(t,i,s,r,o,a,n,e.allowVerticalPlacement),_=e.textSizeData;let m=null;"source"===_.kind?(m=[Gg*r.layout.get("text-size").evaluate(a,{})],m[0]>Vy&&uh(e.layerIds[0]+': Value for "text-size" is >= '+Uy+'. Reduce your "text-size".')):"composite"===_.kind&&(m=[Gg*f.compositeTextSizes[0].evaluate(a,{}),Gg*f.compositeTextSizes[1].evaluate(a,{})],(m[0]>Vy||m[1]>Vy)&&uh(e.layerIds[0]+': Value for "text-size" is >= '+Uy+'. Reduce your "text-size".')),e.addSymbols(e.text,p,m,s,o,a,u,t,l.lineStartIndex,l.lineLength,d);for(const t of c)h[t]=e.text.placedSymbolArray.length-1;return 4*p.length}function Hy(e){for(const t in e)return e[t];return null}function Yy(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,$,g,y,v,x,b){const S=e.addToLineVertexArray(t,i);let w,C,T,P,E=0,A=0,L=0,M=0,I=-1,O=-1;const D={};let R=Oy(""),N=0,F=0;if(void 0===s._unevaluatedLayout.getValue("text-radial-offset")?[N,F]=s.layout.get("text-offset").evaluate(v,{}).map((e=>e*w$)):(N=s.layout.get("text-radial-offset").evaluate(v,{})*w$,F=Fy),e.allowVerticalPlacement&&n.vertical){const r=s.layout.get("text-rotate").evaluate(v,{})+90,o=n.vertical;T=new xy(l,i,t,u,c,h,o,d,f,p,e.overscaling,r),a&&(P=new xy(l,i,t,u,c,h,a,m,$,p,e.overscaling,r))}if(r){const n=s.layout.get("icon-rotate").evaluate(v,{}),o="none"!==s.layout.get("icon-text-fit"),d=dy.getIconQuads(r,n,b,o),f=a?dy.getIconQuads(a,n,b,o):void 0;C=new xy(l,i,t,u,c,h,r,m,$,!1,e.overscaling,n),E=4*d.length;const p=e.iconSizeData;let _=null;"source"===p.kind?(_=[Gg*s.layout.get("icon-size").evaluate(v,{})],_[0]>Vy&&uh(e.layerIds[0]+': Value for "icon-size" is >= '+Uy+'. Reduce your "icon-size".')):"composite"===p.kind&&(_=[Gg*x.compositeIconSizes[0].evaluate(v,{}),Gg*x.compositeIconSizes[1].evaluate(v,{})],(_[0]>Vy||_[1]>Vy)&&uh(e.layerIds[0]+': Value for "icon-size" is >= '+Uy+'. Reduce your "icon-size".')),e.addSymbols(e.icon,d,_,y,g,v,!1,t,S.lineStartIndex,S.lineLength,-1),I=e.icon.placedSymbolArray.length-1,f&&(A=4*f.length,e.addSymbols(e.icon,f,_,y,g,v,hg.vertical,t,S.lineStartIndex,S.lineLength,-1),O=e.icon.placedSymbolArray.length-1)}for(const r in n.horizontal){const a=n.horizontal[r];if(!w){R=Oy(a.text);const n=s.layout.get("text-rotate").evaluate(v,{});w=new xy(l,i,t,u,c,h,a,d,f,p,e.overscaling,n)}const m=1===a.positionedLines.length;if(L+=Wy(e,t,a,o,s,p,v,_,S,n.vertical?hg.horizontal:hg.horizontalOnly,m?Object.keys(n.horizontal):[r],D,I,x),m)break}n.vertical&&(M+=Wy(e,t,n.vertical,o,s,p,v,_,S,hg.vertical,["vertical"],D,O,x));const B=w?w.boxStartIndex:e.collisionBoxArray.length,z=w?w.boxEndIndex:e.collisionBoxArray.length,G=T?T.boxStartIndex:e.collisionBoxArray.length,k=T?T.boxEndIndex:e.collisionBoxArray.length,U=C?C.boxStartIndex:e.collisionBoxArray.length,V=C?C.boxEndIndex:e.collisionBoxArray.length,W=P?P.boxStartIndex:e.collisionBoxArray.length,H=P?P.boxEndIndex:e.collisionBoxArray.length;e.glyphOffsetArray.length>=uv.MAX_GLYPHS&&uh("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),e.symbolInstances.emplaceBack(t.x,t.y,D.right>=0?D.right:-1,D.center>=0?D.center:-1,D.left>=0?D.left:-1,D.vertical||-1,I,O,R,B,z,G,k,U,V,W,H,u,L,M,E,A,0,d,N,F)}function jy(e,t,i,n){const r=e.compareText;if(t in r){const e=r[t];for(let t=e.length-1;t>=0;t--)if(n.dist(e[t])0&&(this.layoutVertexBuffer=Yu.toVertexBuffer(e,this.layoutVertexArray,sm.members)),this.indexArray.length>0&&(this.indexBuffer=Yu.toIndexBuffer(e,this.indexArray,t)),this.dynamicLayoutVertexArray.length>0&&(this.dynamicLayoutVertexBuffer=Yu.toVertexBuffer(e,this.dynamicLayoutVertexArray,lm.members,!0)),this.opacityVertexArray.length>0&&(this.opacityVertexBuffer=Yu.toVertexBuffer(e,this.opacityVertexArray,nv,!0),this.opacityVertexBuffer.itemSize=1)),(i||n)&&this.programConfigurations.upload(e)},sv.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.layoutVertexBuffer=null),this.indexBuffer&&(this.indexBuffer.destroy(),this.indexBuffer=null),this.dynamicLayoutVertexBuffer&&(this.dynamicLayoutVertexBuffer.destroy(),this.dynamicLayoutVertexBuffer=null),this.opacityVertexBuffer&&(this.opacityVertexBuffer.destroy(),this.opacityVertexBuffer=null),this.programConfigurations.destroy(),this.segments.destroy()},sv.prototype.clear=function(){},en.register("SymbolBuffers",sv);var lv=function(e,t,i){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new i,this.segments=new Ao,this.collisionVertexArray=new Yo};lv.prototype.upload=function(e){this.layoutVertexArray.length>0&&(this.layoutVertexBuffer=Yu.toVertexBuffer(e,this.layoutVertexArray,this.layoutAttributes)),this.indexArray.length>0&&(this.indexBuffer=Yu.toIndexBuffer(e,this.indexArray)),this.collisionVertexArray.length>0&&(this.collisionVertexBuffer=Yu.toVertexBuffer(e,this.collisionVertexArray,um.members,!0))},lv.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.layoutVertexBuffer=null),this.collisionVertexBuffer&&(this.collisionVertexBuffer.destroy(),this.collisionVertexBuffer=null),this.indexBuffer&&(this.indexBuffer.destroy(),this.indexBuffer=null),this.segments.destroy()},en.register("CollisionBuffers",lv);var uv=function(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasPattern=!1,this.hasPaintOverrides=!1,this.hasRTLText=!1;var t=this.layers[0]._unevaluatedLayout._values;this.textSizeData=kg(this.zoom,t["text-size"]),this.iconSizeData=kg(this.zoom,t["icon-size"]);var i=this.layers[0].layout,n=i.get("symbol-sort-key"),r=i.get("symbol-z-order");this.sortFeaturesByKey="viewport-y"!==r&&void 0!==n.constantOr(1);var o="viewport-y"===r||"auto"===r&&!this.sortFeaturesByKey;this.sortFeaturesByY=o&&(i.get("text-allow-overlap")||i.get("icon-allow-overlap")||i.get("text-ignore-placement")||i.get("icon-ignore-placement")),"point"===i.get("symbol-placement")&&(this.writingModes=i.get("text-writing-mode").map((function(e){return hg[e]}))),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id})),this.sourceID=e.sourceID,this.overscaling=1};uv.prototype.createArrays=function(){const e=this.layers[0].layout;this.hasPaintOverrides=xv.hasPaintOverrides(e);var t=sm.members;this.text=new sv(new Sc(t,this.layers,this.zoom,(e=>/^text/.test(e)))),this.icon=new sv(new Sc(t,this.layers,this.zoom,(e=>/^icon/.test(e)))),this.textCollisionBox=new lv(Ho,cm.members,Qo),this.iconCollisionBox=new lv(Ho,cm.members,Qo),this.textCollisionCircle=new lv(Ho,hm.members,Jo),this.iconCollisionCircle=new lv(Ho,hm.members,Jo),this.glyphOffsetArray=new fa,this.lineVertexArray=new _a,this.symbolInstances=new ha},uv.prototype.calculateGlyphDependencies=function(e,t,i,n,r){for(let o=0;o0)&&("constant"!==r.value.kind||r.value.value.length>0),l=("constant"!==a.value.kind||!!a.value.value)&&Object.keys(a.parameters).length>0,u=n.get("symbol-sort-key");if(this.features=[],s||l){for(var c=t.iconDependencies,h=t.glyphDependencies,d=t.availableImages,f=new $o(this.zoom),p=0,_=e;p<_.length;p+=1){var m=_[p],$=m.feature,g=m.index,y=m.sourceLayerIndex;if(i._featureFilter(f,$)){var v=void 0;if(s){var x=i.getValueAndResolveTokens("text-field",$,d),b=ie.factory(x);av(b)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===getRTLTextPluginStatus()||this.hasRTLText&&plugin.isParsed())&&(v=Jy(b,i,$))}var S=void 0;if(l){var w=i.getValueAndResolveTokens("icon-image",$,d);S=w instanceof ae?w:ae.fromString(w)}if(v||S){var C=this.sortFeaturesByKey?u.evaluate($,{}):void 0,T={text:v,icon:S,index:g,sourceLayerIndex:y,geometry:Co($),properties:$.properties,type:iv[$.type],sortKey:C};if(void 0!==$.id&&(T.id=$.id),this.features.push(T),S&&(c[S.name]=!0),v){var P=r.evaluate($,{}).join(","),E="map"===n.get("text-rotation-alignment")&&"point"!==n.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(hg.vertical)>=0;for(var A=0,L=v.sections;A=0;s--)o[s]={x:t[s].x,y:t[s].y,tileUnitDistanceFromAnchor:r},s>0&&(r+=t[s-1].dist(t[s]));for(var l=0;l0;this.addCollisionDebugVertices(a,s,l,u,c?n?this.textCollisionCircle:this.iconCollisionCircle:n?this.textCollisionBox:this.iconCollisionBox,o.anchorPoint,i,c)}},uv.prototype.generateCollisionDebugBuffers=function(){for(var e=0;e0},uv.prototype.hasIconData=function(){return this.icon.segments.get().length>0},uv.prototype.hasTextCollisionBoxData=function(){return this.textCollisionBox.segments.get().length>0},uv.prototype.hasIconCollisionBoxData=function(){return this.iconCollisionBox.segments.get().length>0},uv.prototype.hasTextCollisionCircleData=function(){return this.textCollisionCircle.segments.get().length>0},uv.prototype.hasIconCollisionCircleData=function(){return this.iconCollisionCircle.segments.get().length>0},uv.prototype.addIndicesForPlacedSymbol=function(e,t){for(var i=e.placedSymbolArray.get(t),n=i.vertexStartIndex+4*i.numGlyphs,r=i.vertexStartIndex;r1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var i=0,n=this.symbolInstanceIndexes;i=0&&n.indexOf(e)===i&&t.addIndicesForPlacedSymbol(t.text,e)})),o.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,o.verticalPlacedTextSymbolIndex),o.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.placedIconSymbolIndex),o.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},en.register("SymbolBucket",uv,{omit:["layers","collisionBoxArray","compareText"]}),uv.MAX_GLYPHS=65535,uv.addDynamicAttributes=ov;var cv,hv=(cv=!0,function(e,t){var i=cv?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return cv=!1,i}),dv=hv(void 0,(function(){return dv.toString().search("(((.+)+)+)+$").toString().constructor(dv).search("(((.+)+)+)+$")}));function fv(e,t){return t.replace(/{([^{}]+)}/g,((t,i)=>i in e?String(e[i]):""))}dv();var pv,_v={kind:"color"},mv={kind:"formatted"},$v=new xh({"symbol-placement":new zc(Od.layout_symbol["symbol-placement"]),"symbol-spacing":new zc(Od.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new zc(Od.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Vc(Od.layout_symbol["symbol-sort-key"]),"symbol-z-order":new zc(Od.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new zc(Od.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new zc(Od.layout_symbol["icon-ignore-placement"]),"icon-optional":new zc(Od.layout_symbol["icon-optional"]),"icon-rotation-alignment":new zc(Od.layout_symbol["icon-rotation-alignment"]),"icon-size":new Vc(Od.layout_symbol["icon-size"]),"icon-text-fit":new zc(Od.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new zc(Od.layout_symbol["icon-text-fit-padding"]),"icon-image":new Vc(Od.layout_symbol["icon-image"]),"icon-rotate":new Vc(Od.layout_symbol["icon-rotate"]),"icon-padding":new zc(Od.layout_symbol["icon-padding"]),"icon-keep-upright":new zc(Od.layout_symbol["icon-keep-upright"]),"icon-offset":new Vc(Od.layout_symbol["icon-offset"]),"icon-anchor":new Vc(Od.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new zc(Od.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new zc(Od.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new zc(Od.layout_symbol["text-rotation-alignment"]),"text-field":new Vc(Od.layout_symbol["text-field"]),"text-font":new Vc(Od.layout_symbol["text-font"]),"text-size":new Vc(Od.layout_symbol["text-size"]),"text-max-width":new Vc(Od.layout_symbol["text-max-width"]),"text-line-height":new zc(Od.layout_symbol["text-line-height"]),"text-letter-spacing":new Vc(Od.layout_symbol["text-letter-spacing"]),"text-justify":new Vc(Od.layout_symbol["text-justify"]),"text-radial-offset":new Vc(Od.layout_symbol["text-radial-offset"]),"text-variable-anchor":new zc(Od.layout_symbol["text-variable-anchor"]),"text-anchor":new Vc(Od.layout_symbol["text-anchor"]),"text-max-angle":new zc(Od.layout_symbol["text-max-angle"]),"text-writing-mode":new zc(Od.layout_symbol["text-writing-mode"]),"text-rotate":new Vc(Od.layout_symbol["text-rotate"]),"text-padding":new zc(Od.layout_symbol["text-padding"]),"text-keep-upright":new zc(Od.layout_symbol["text-keep-upright"]),"text-transform":new Vc(Od.layout_symbol["text-transform"]),"text-offset":new Vc(Od.layout_symbol["text-offset"]),"text-allow-overlap":new zc(Od.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new zc(Od.layout_symbol["text-ignore-placement"]),"text-optional":new zc(Od.layout_symbol["text-optional"])}),gv=new xh({"icon-opacity":new Vc(Od.paint_symbol["icon-opacity"]),"icon-color":new Vc(Od.paint_symbol["icon-color"]),"icon-halo-color":new Vc(Od.paint_symbol["icon-halo-color"]),"icon-halo-width":new Vc(Od.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Vc(Od.paint_symbol["icon-halo-blur"]),"icon-translate":new zc(Od.paint_symbol["icon-translate"]),"icon-translate-anchor":new zc(Od.paint_symbol["icon-translate-anchor"]),"text-opacity":new Vc(Od.paint_symbol["text-opacity"]),"text-color":new Vc(Od.paint_symbol["text-color"],{runtimeType:_v,getOverride:function(e){return e.textColor},hasOverride:function(e){return!!e.textColor}}),"text-halo-color":new Vc(Od.paint_symbol["text-halo-color"]),"text-halo-width":new Vc(Od.paint_symbol["text-halo-width"]),"text-halo-blur":new Vc(Od.paint_symbol["text-halo-blur"]),"text-show-background":new Vc(Od.paint_symbol["text-show-background"]),"text-translate":new zc(Od.paint_symbol["text-translate"]),"text-translate-anchor":new zc(Od.paint_symbol["text-translate-anchor"])}),yv={paint:gv,layout:$v},vv=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,yv)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.recalculate=function(t,i){if(e.prototype.recalculate.call(this,t,i),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var n=this.layout.get("text-writing-mode");if(n){for(var r=[],o=0,a=n;o>3}r--,1===n||2===n?(o+=e.readSVarint(),a+=e.readSVarint(),1===n&&(t&&s.push(t),t=[]),t.push(new to(o,a))):7===n?t&&t.push(t[0].clone()):console.log("VectorTileFeature loadGeometry unknown command "+n)}return t&&s.push(t),s},Dv.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,i=1,n=0,r=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;e.pos>3}if(n--,1===i||2===i)(r+=e.readSVarint())s&&(s=r),(o+=e.readSVarint())u&&(u=o);else if(7!==i)throw new Error("unknown command "+i)}return[a,l,s,u]},Dv.prototype.toGeoJSON=function(e,t,i){var n,r,o=this.extent*Math.pow(2,i),a=this.extent*e,s=this.extent*t,l=this.loadGeometry(),u=Dv.types[this.type];function c(e){for(var t=0;t>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}kv(),Uv.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new Dv(this._pbf,t,this.extent,this._keys,this._values)};var Hv,Yv=(Hv=!0,function(e,t){var i=Hv?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Hv=!1,i}),jv=Yv(void 0,(function(){return jv.toString().search("(((.+)+)+)+$").toString().constructor(jv).search("(((.+)+)+)+$")}));function qv(e,t){this.layers=e.readFields(Xv,{},t)}function Xv(e,t,i){if(3===e){var n=new Uv(i,i.readVarint()+i.pos);n.length&&(t[n.name]=n)}}jv();var Kv,Zv=(Kv=!0,function(e,t){var i=Kv?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Kv=!1,i}),Jv=Zv(void 0,(function(){return Jv.toString().search("(((.+)+)+)+$").toString().constructor(Jv).search("(((.+)+)+)+$")}));function Qv(e){this._stringToNumber={},this._numberToString=[];for(var t=0;t=c[f+0]&&n>=c[f+1])?(a[d]=!0,o.push(u[d])):a[d]=!1}}},rx.prototype._forEachCell=function(e,t,i,n,r,o,a,s){for(var l=this._convertToCellCoord(e),u=this._convertToCellCoord(t),c=this._convertToCellCoord(i),h=this._convertToCellCoord(n),d=l;d<=c;d++)for(var f=u;f<=h;f++){var p=this.d*f+d;if((!s||s(this._convertFromCellCoord(d),this._convertFromCellCoord(f),this._convertFromCellCoord(d+1),this._convertFromCellCoord(f+1)))&&r.call(this,e,t,i,n,p,o,a,s))return}},rx.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},rx.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},rx.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=nx+this.cells.length+1+1,i=0,n=0;n=0&&h[3]>=0&&l.insert(s,h[0]-a,h[1]-a,h[2]+a,h[3]+a)}},lx.prototype.loadVTLayers=function(){return!this.vtLayers&&(this.vtLayers=new qv(new D$(this.rawTileData)).layers,this.sourceLayerCoder=new Qv(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},lx.prototype.query=function(e,t,i){var n=this;this.loadVTLayers();var r=e.params||{},o=hx(this.z,e.tileSize,r),a=Nr.createFilter(r.filter),s=e.queryGeometry,l=5,u=ux(s),c=[];Ta(r.selectTolerance)&&(l+=o*r.selectTolerance),(c=this.grid.query(u.minX-l,u.minY-l,u.maxX+l,u.maxY+l)).sort(cx);for(var h,d={},f=function(i){var l=c[i];if(l!==h){h=l;var u=n.featureIndexArray.get(l),f=null;n.loadMatchingFeature(d,u.bucketIndex,u.sourceLayerIndex,u.featureIndex,a,r.layers,t,(function(t,i){return!f&&(f=Co(t)),i.queryIntersectsFeature(s,t,{},f,n.z,e.transform,o,e.pixelPosMatrix,e.adjustScale)}))}},p=0;p=S.maxzoom||"none"===S.visibility)){xx(b,0,n);var w=S.id,C=u[w]=S.createBucket({index:a.bucketLayerIDs.length,layers:b,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:_,webgpu:e.webgpu});Ta(e.indexData)&&Ta(e.indexData[S.id])&&(c.indexData=e.indexData[S.id]),C.populate(m,c),a.bucketLayerIDs.push(b.map((function(e){return e.id})))}}}}}let T,P,E,A;const L=rh(c.glyphDependencies,(e=>Object.keys(e).map(Number)));Object.keys(L).length?r.send("getGlyphs",{uid:0,stacks:L},((e,t)=>{!T&&(T=e,P=t,O.call(this))})):P={};const M=Object.keys(c.iconDependencies);M.length?r.send("getImages",{icons:M,source:this.source,tileID:this.tileID,type:"icons"},((e,t)=>{!T&&(T=e,E=t,O.call(this))})):E={};const I=Object.keys(c.patternDependencies);function O(){if(T)return o(T);if(P&&E&&A){const n=new mx(P),r=new g(E,A);for(var t in u){var i=u[t];i instanceof uv?(i.layers[0].layout,zy(i,P,n.positions,E,r.iconPositions,this.showCollisionBoxes)):i.hasPattern&&(i instanceof W_||i instanceof C_)&&i.addFeatures(c,r.patternPositions)}s.buckets=u,s.imageAtlas=r,s.glyphAtlasImage=n.image,s.featureIndex=a,s.pickId=e.pickId,this.status="done",o(null,s)}}I.length?r.send("getImages",{icons:I,source:this.source,tileID:this.tileID,type:"patterns"},((e,t)=>{!T&&(T=e,A=t,O.call(this))})):A={},O.call(this)}catch(D){console.log(D)}};const bx=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Sx=bx(void 0,(function(){return Sx.toString().search("(((.+)+)+)+$").toString().constructor(Sx).search("(((.+)+)+)+$")}));function wx(e,t){const i=h$(e.request,((e,i,n,r)=>{e?t(e):i&&t(null,{vectorTile:new qv(new D$(i)),rawData:i,cacheControl:n,expires:r})}));return()=>{i.cancel(),t()}}Sx();class Cx{constructor(e,t,i,n){this.actor=e,this.layerIndex=t,this.availableImages=i,this.loadVectorData=n||wx,this.loading={},this.loaded={}}loadTile(e,t){const i=e.uid;this.loading||(this.loading={});const n=this.loading[i]=new vx(e);n.abort=this.loadVectorData(e,((r,o)=>{if(delete this.loading[i],r||!o)return n.status="done",this.loaded[i]=n,t(r);const a=o.rawData,s={};o.expires&&(s.expires=o.expires),o.cacheControl&&(s.cacheControl=o.cacheControl);const l={};n.vectorTile=o.vectorTile,n.parse(e,o.vectorTile,this.layerIndex,this.availableImages,this.actor,((e,i)=>{if(e||!i)return t(e);t(null,ih({rawTileData:a.slice(0)},i,s,l))})),this.loaded=this.loaded||{},this.loaded[i]=n}))}reloadTile(e,t){const i=this.loaded,n=e.uid,r=this;if(i&&i[n]){const o=i[n];o.showCollisionBoxes=e.showCollisionBoxes;const a=(i,n)=>{const a=o.reloadCallback;a&&(delete o.reloadCallback,o.parse(e,o.vectorTile,r.layerIndex,this.availableImages,r.actor,a)),t(i,n)};"parsing"===o.status?o.reloadCallback=a:"done"===o.status&&(o.vectorTile?o.parse(e,o.vectorTile,this.layerIndex,this.availableImages,this.actor,a):a())}}abortTile(e,t){const i=this.loading,n=e.uid;i&&i[n]&&i[n].abort&&(i[n].abort(),delete i[n]),t()}removeTile(e,t){const i=this.loaded,n=e.uid;i&&i[n]&&delete i[n],t()}}const Tx=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Px=Tx(void 0,(function(){return Px.toString().search("(((.+)+)+)+$").toString().constructor(Px).search("(((.+)+)+)+$")}));Px();class Ex{constructor(e){this.self=e,this.actor=new dn(e,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:Cx},this.workerSources={},this.demWorkerSources={}}setReferrer(e,t){this.referrer=t}setImages(e,t,i){this.availableImages[e]=t,i()}setLayers(e,t,i){this.getLayerIndex(e).replace(t),i()}updateLayers(e,t,i){this.getLayerIndex(e).update(t.layers,t.removedIds),i()}loadTile(e,t,i){this.getWorkerSource(e,t.type,t.source).loadTile(t,i)}reloadTile(e,t,i){this.getWorkerSource(e,t.type,t.source).reloadTile(t,i)}abortTile(e,t,i){this.getWorkerSource(e,t.type,t.source).abortTile(t,i)}removeTile(e,t,i){this.getWorkerSource(e,t.type,t.source).removeTile(t,i)}removeSource(e,t,i){if(!this.workerSources[e]||!this.workerSources[e][t.type]||!this.workerSources[e][t.type][t.source])return;const n=this.workerSources[e][t.type][t.source];delete this.workerSources[e][t.type][t.source],void 0!==n.removeSource?n.removeSource(t,i):i()}loadWorkerSource(e,t,i){try{this.self.importScripts(t.url),i()}catch(e){i(e.toString())}}getAvailableImages(e){let t=this.availableImages[e];return!t&&(t=[]),t}getLayerIndex(e){let t=this.layerIndexes[e];return!t&&(t=this.layerIndexes[e]=new Av),t}getWorkerSource(e,t,i){if(this.workerSources[e]||(this.workerSources[e]={}),this.workerSources[e][t]||(this.workerSources[e][t]={}),!this.workerSources[e][t][i]){const n={send:(t,i,n)=>{this.actor.send(t,i,n,e)}};this.workerSources[e][t][i]=new this.workerSourceTypes[t](n,this.getLayerIndex(e),this.getAvailableImages(e))}return this.workerSources[e][t][i]}enforceCacheSizeLimit(e,t){t$(t)}}"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&(self.worker=new Ex(self))},t="("+e+")()",window.mvtWorkerUrl=window.URL.createObjectURL(new Blob([t],{type:"text/javascript"}))},"function"==typeof define&&define.amd?define(factory):factory(),t$$(Object.create)&&(t$_.prototype=Object.create(Error.prototype),t$_.prototype.constructor=t$_),t$_.prototype.toString=function(){var e=this.name+": "+this.message;return t$$(this.stack)&&(e+="\n"+this.stack.toString()),e},t$_.throwInstantiationError=function(){throw new t$_("This function defines an interface and should not be called directly.")};var n$1e={};function p$1o(e){return e+" is required, actual value was undefined"}function r$X(e,t,i){return"Expected "+i+" to be typeof "+t+", actual typeof was "+e}function e$1Y(e,t){return e??t}n$1e.typeOf={},n$1e.defined=function(e,t){if(!t$$(t))throw new t$_(p$1o(e))},n$1e.typeOf.func=function(e,t){if("function"!=typeof t)throw new t$_(r$X(typeof t,"function",e))},n$1e.typeOf.string=function(e,t){if("string"!=typeof t)throw new t$_(r$X(typeof t,"string",e))},n$1e.typeOf.number=function(e,t){if("number"!=typeof t)throw new t$_(r$X(typeof t,"number",e))},n$1e.typeOf.number.lessThan=function(e,t,i){if(n$1e.typeOf.number(e,t),t>=i)throw new t$_("Expected "+e+" to be less than "+i+", actual value was "+t)},n$1e.typeOf.number.lessThanOrEquals=function(e,t,i){if(n$1e.typeOf.number(e,t),t>i)throw new t$_("Expected "+e+" to be less than or equal to "+i+", actual value was "+t)},n$1e.typeOf.number.greaterThan=function(e,t,i){if(n$1e.typeOf.number(e,t),t<=i)throw new t$_("Expected "+e+" to be greater than "+i+", actual value was "+t)},n$1e.typeOf.number.greaterThanOrEquals=function(e,t,i){if(n$1e.typeOf.number(e,t),t>>0,this.mti=1;this.mti>>30;this.mt[this.mti]=(1812433253*((4294901760&e)>>>16)<<16)+1812433253*(65535&e)+this.mti,this.mt[this.mti]>>>=0}},h$1i.prototype.genrand_int32=function(){var e,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var i;for(this.mti==this.N+1&&this.init_genrand(5489),i=0;i>>1^t[1&e];for(;i>>1^t[1&e];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^t[1&e],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,(e^=e>>>18)>>>0},h$1i.prototype.random=function(){return this.genrand_int32()*(1/4294967296)};var n$1d={Radius:6378137,EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,EPSILON21:1e-21,GRAVITATIONALPARAMETER:3986004418e5,SOLAR_RADIUS:6955e5,LUNAR_RADIUS:1737400,SIXTY_FOUR_KILOBYTES:65536};n$1d.sign=e$1Y(Math.sign,(function(e){return 0===(e=+e)||e!=e?e:e>0?1:-1})),n$1d.signNotZero=function(e){return e<0?-1:1},n$1d.toSNorm=function(e,t){return t=e$1Y(t,255),Math.round((.5*n$1d.clamp(e,-1,1)+.5)*t)},n$1d.fromSNorm=function(e,t){return t=e$1Y(t,255),n$1d.clamp(e,0,t)/t*2-1},n$1d.normalize=function(e,t,i){return 0===(i=Math.max(i-t,0))?0:n$1d.clamp((e-t)/i,0,1)},n$1d.sinh=e$1Y(Math.sinh,(function(e){return(Math.exp(e)-Math.exp(-e))/2})),n$1d.cosh=e$1Y(Math.cosh,(function(e){return(Math.exp(e)+Math.exp(-e))/2})),n$1d.lerp=function(e,t,i){return(1-i)*e+i*t},n$1d.PI=Math.PI,n$1d.ONE_OVER_PI=1/Math.PI,n$1d.PI_OVER_TWO=Math.PI/2,n$1d.PI_OVER_THREE=Math.PI/3,n$1d.PI_OVER_FOUR=Math.PI/4,n$1d.PI_OVER_SIX=Math.PI/6,n$1d.THREE_PI_OVER_TWO=3*Math.PI/2,n$1d.TWO_PI=2*Math.PI,n$1d.ONE_OVER_TWO_PI=1/(2*Math.PI),n$1d.RADIANS_PER_DEGREE=Math.PI/180,n$1d.DEGREES_PER_RADIAN=180/Math.PI,n$1d.RADIANS_PER_ARCSECOND=n$1d.RADIANS_PER_DEGREE/3600,n$1d.toRadians=function(e){if(!t$$(e))throw new t$_("degrees is required.");return e*n$1d.RADIANS_PER_DEGREE},n$1d.toDegrees=function(e){if(!t$$(e))throw new t$_("radians is required.");return e*n$1d.DEGREES_PER_RADIAN},n$1d.convertLongitudeRange=function(e){if(!t$$(e))throw new t$_("angle is required.");var t=n$1d.TWO_PI,i=e-Math.floor(e/t)*t;return i<-Math.PI?i+t:i>=Math.PI?i-t:i},n$1d.clampToLatitudeRange=function(e){if(!t$$(e))throw new t$_("angle is required.");return n$1d.clamp(e,-1*n$1d.PI_OVER_TWO,n$1d.PI_OVER_TWO)},n$1d.negativePiToPi=function(e){if(!t$$(e))throw new t$_("angle is required.");return n$1d.zeroToTwoPi(e+n$1d.PI)-n$1d.PI},n$1d.zeroToTwoPi=function(e){if(!t$$(e))throw new t$_("angle is required.");var t=n$1d.mod(e,n$1d.TWO_PI);return Math.abs(t)n$1d.EPSILON14?n$1d.TWO_PI:t},n$1d.mod=function(e,t){if(!t$$(e))throw new t$_("m is required.");if(!t$$(t))throw new t$_("n is required.");return(e%t+t)%t},n$1d.equalsEpsilon=function(e,t,i,n){if(!t$$(e))throw new t$_("left is required.");if(!t$$(t))throw new t$_("right is required.");if(!t$$(i))throw new t$_("relativeEpsilon is required.");n=e$1Y(n,i);var r=Math.abs(e-t);return r<=n||r<=i*Math.max(Math.abs(e),Math.abs(t))},n$1d.lessThan=function(e,t,i){if(!t$$(e))throw new t$_("first is required.");if(!t$$(t))throw new t$_("second is required.");if(!t$$(i))throw new t$_("relativeEpsilon is required.");return e-t<-i},n$1d.lessThanOrEquals=function(e,t,i){if(!t$$(e))throw new t$_("first is required.");if(!t$$(t))throw new t$_("second is required.");if(!t$$(i))throw new t$_("relativeEpsilon is required.");return e-ti},n$1d.greaterThanOrEquals=function(e,t,i){if(!t$$(e))throw new t$_("first is required.");if(!t$$(t))throw new t$_("second is required.");if(!t$$(i))throw new t$_("relativeEpsilon is required.");return e-t>-i};var f$1c=[1];n$1d.factorial=function(e){if("number"!=typeof e||e<0)throw new t$_("A number greater than or equal to 0 is required.");var t=f$1c.length;if(e>=t)for(var i=f$1c[t-1],n=t;n<=e;n++){var r=i*n;f$1c.push(r),i=r}return f$1c[e]},n$1d.incrementWrap=function(e,t,i){if(i=e$1Y(i,0),!t$$(e))throw new t$_("n is required.");if(t<=i)throw new t$_("maximumValue must be greater than minimumValue.");return++e>t&&(e=i),e},n$1d.isPowerOfTwo=function(e){if("number"!=typeof e||e<0)throw new t$_("A number greater than or equal to 0 is required.");return 0!==e&&0==(e&e-1)},n$1d.nextPowerOfTwo=function(e){if("number"!=typeof e||e<0)throw new t$_("A number greater than or equal to 0 is required.");return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e},n$1d.clamp=function(e,t,i){if(!t$$(e))throw new t$_("value is required");if(!t$$(t))throw new t$_("min is required.");if(!t$$(i))throw new t$_("max is required.");return ei?i:e};var I$1f=new h$1i;function a$11(e,t,i){this.x=e$1Y(e,0),this.y=e$1Y(t,0),this.z=e$1Y(i,0)}n$1d.setRandomNumberSeed=function(e){if(!t$$(e))throw new t$_("seed is required.");I$1f=new h$1i(e)},n$1d.nextRandomNumber=function(){return I$1f.random()},n$1d.randomBetween=function(e,t){return n$1d.nextRandomNumber()*(t-e)+e},n$1d.acosClamped=function(e){if(!t$$(e))throw new t$_("value is required.");return Math.acos(n$1d.clamp(e,-1,1))},n$1d.asinClamped=function(e){if(!t$$(e))throw new t$_("value is required.");return Math.asin(n$1d.clamp(e,-1,1))},n$1d.chordLength=function(e,t){if(!t$$(e))throw new t$_("angle is required.");if(!t$$(t))throw new t$_("radius is required.");return 2*t*Math.sin(.5*e)},n$1d.logBase=function(e,t){if(!t$$(e))throw new t$_("number is required.");if(!t$$(t))throw new t$_("base is required.");return Math.log(e)/Math.log(t)},n$1d.cbrt=e$1Y(Math.cbrt,(function(e){var t=Math.pow(Math.abs(e),.3333333333333333);return e<0?-t:t})),n$1d.log2=e$1Y(Math.log2,(function(e){return Math.log(e)*Math.LOG2E})),n$1d.fog=function(e,t){var i=e*t;return 1-Math.exp(-i*i)},n$1d.fastApproximateAtan=function(e){return n$1e.typeOf.number("x",e),e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)},n$1d.fastApproximateAtan2=function(e,t){n$1e.typeOf.number("x",e),n$1e.typeOf.number("y",t);var i,n,r=Math.abs(e);i=Math.abs(t),n=Math.max(r,i);var o=(i=Math.min(r,i))/n;if(isNaN(o))throw new t$_("either x or y must be nonzero");return r=n$1d.fastApproximateAtan(o),r=Math.abs(t)>Math.abs(e)?n$1d.PI_OVER_TWO-r:r,r=e<0?n$1d.PI-r:r,r=t<0?-r:r},a$11.fromSpherical=function(e,t){n$1e.typeOf.object("spherical",e),t$$(t)||(t=new a$11);var i=e.clock,n=e.cone,r=e$1Y(e.magnitude,1),o=r*Math.sin(n);return t.x=o*Math.cos(i),t.y=o*Math.sin(i),t.z=r*Math.cos(n),t},a$11.fromElements=function(e,t,i,n){return t$$(n)?(n.x=e,n.y=t,n.z=i,n):new a$11(e,t,i)},a$11.clone=function(e,t){if(t$$(e))return t$$(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new a$11(e.x,e.y,e.z)},a$11.fromCartesian4=a$11.clone,a$11.packedLength=3,a$11.pack=function(e,t,i){return n$1e.typeOf.object("value",e),n$1e.defined("array",t),i=e$1Y(i,0),t[i++]=e.x,t[i++]=e.y,t[i]=e.z,t},a$11.unpack=function(e,t,i){return n$1e.defined("array",e),t=e$1Y(t,0),t$$(i)||(i=new a$11),i.x=e[t++],i.y=e[t++],i.z=e[t],i},a$11.packArray=function(e,t){n$1e.defined("array",e);var i=e.length;t$$(t)?t.length=3*i:t=new Array(3*i);for(var n=0;nn$1d.EPSILON12);return t$$(r)?(r.x=o*b,r.y=a*S,r.z=s*w,r):new a$11(o*b,a*S,s*w)}function i$1g(e,t,i){this.longitude=e$1Y(e,0),this.latitude=e$1Y(t,0),this.height=e$1Y(i,0)}i$1g.fromRadians=function(e,t,i,n){return n$1e.typeOf.number("longitude",e),n$1e.typeOf.number("latitude",t),i=e$1Y(i,0),t$$(n)?(n.longitude=e,n.latitude=t,n.height=i,n):new i$1g(e,t,i)},i$1g.fromDegrees=function(e,t,i,n){return n$1e.typeOf.number("longitude",e),n$1e.typeOf.number("latitude",t),e=n$1d.toRadians(e),t=n$1d.toRadians(t),i$1g.fromRadians(e,t,i,n)};var q$1l=new a$11,w$1g=new a$11,y$19=new a$11,b$1y=new a$11(1/6378137,1/6378137,1/6356752.314245179),v$1a=new a$11(1/6378137,1/6378137,1/6378137),M$1n=new a$11(1/40680631590769,1/40680631590769,1/40408299984661.445),E$1g=new a$11(1/40680631590769,1/40680631590769,1/40680631590769),S$10=n$1d.EPSILON1;function f$1b(e,t,i,n){t=e$1Y(t,0),i=e$1Y(i,0),n=e$1Y(n,0),n$1e.typeOf.number.greaterThanOrEquals("x",t,0),n$1e.typeOf.number.greaterThanOrEquals("y",i,0),n$1e.typeOf.number.greaterThanOrEquals("z",n,0),n$1d.equalsEpsilon(n,6356752.314245179,n$1d.EPSILON10)&&(n$1d.Radius=n),e._radii=new a$11(t,i,n),e._radiiSquared=new a$11(t*t,i*i,n*n),e._radiiToTheFourth=new a$11(t*t*t*t,i*i*i*i,n*n*n*n),e._oneOverRadii=new a$11(0===t?0:1/t,0===i?0:1/i,0===n?0:1/n),e._oneOverRadiiSquared=new a$11(0===t?0:1/(t*t),0===i?0:1/(i*i),0===n?0:1/(n*n)),e._minimumRadius=Math.min(t,i,n),e._maximumRadius=Math.max(t,i,n),e._centerToleranceSquared=n$1d.EPSILON1,0!==e._radiiSquared.z&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function n$1c(e,t,i){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,f$1b(this,e,t,i)}i$1g.fromCartesian=function(e,t,i){var n=t$$(t)?t.oneOverRadii:v$1a,r=t$$(t)?t.oneOverRadiiSquared:E$1g,o=t$$(t)?t._centerToleranceSquared:S$10;n$1d.equalsEpsilon(n$1d.Radius,6356752.314245179,n$1d.EPSILON10)&&(n=t$$(t)?t.oneOverRadii:b$1y,r=t$$(t)?t.oneOverRadiiSquared:M$1n);var a=b$1z(e,n,r,o,w$1g);if(t$$(a)){var s=a$11.multiplyComponents(a,r,q$1l);s=a$11.normalize(s,s);var l=a$11.subtract(e,a,y$19),u=Math.atan2(s.y,s.x),c=Math.asin(s.z),h=n$1d.sign(a$11.dot(l,e))*a$11.magnitude(l);return t$$(i)?(i.longitude=u,i.latitude=c,i.height=h,i):new i$1g(u,c,h)}},i$1g.toCartesian=function(e,t,i){return n$1e.defined("cartographic",e),a$11.fromRadians(e.longitude,e.latitude,e.height,t,i)},i$1g.sphericalDistance=function(e,t,i,n){if(n$1e.defined("longitudeA",e),n$1e.defined("longitudeB",i),n$1e.defined("latitudeA",t),n$1e.defined("latitudeB",n),e===i&&t===n)return 0;var r=n$1d.toRadians(t),o=n$1d.toRadians(n),a=n$1d.toRadians(e),s=n$1d.toRadians(i),l=a*a+r*r,u=s*s+o*o,c=(l+u-((a-s)*(a-s)+(r-o)*(r-o)))/(2*Math.sqrt(l)*Math.sqrt(u));return c=n$1d.clamp(c,-1,1),Math.acos(c)*n$1d.Radius},i$1g.clone=function(e,t){if(t$$(e))return t$$(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new i$1g(e.longitude,e.latitude,e.height)},i$1g.equals=function(e,t){return e===t||t$$(e)&&t$$(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height},i$1g.equalsEpsilon=function(e,t,i){return n$1e.typeOf.number("epsilon",i),e===t||t$$(e)&&t$$(t)&&Math.abs(e.longitude-t.longitude)<=i&&Math.abs(e.latitude-t.latitude)<=i&&Math.abs(e.height-t.height)<=i},i$1g.ZERO=Object.freeze(new i$1g(0,0,0)),i$1g.prototype.clone=function(e){return i$1g.clone(this,e)},i$1g.prototype.equals=function(e){return i$1g.equals(this,e)},i$1g.prototype.equalsEpsilon=function(e,t){return i$1g.equalsEpsilon(this,e,t)},i$1g.prototype.toString=function(){return"("+this.longitude+", "+this.latitude+", "+this.height+")"},Object.defineProperties(n$1c.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}}),n$1c.clone=function(e,t){if(t$$(e)){var i=e._radii;return t$$(t)?(a$11.clone(i,t._radii),a$11.clone(e._radiiSquared,t._radiiSquared),a$11.clone(e._radiiToTheFourth,t._radiiToTheFourth),a$11.clone(e._oneOverRadii,t._oneOverRadii),a$11.clone(e._oneOverRadiiSquared,t._oneOverRadiiSquared),t._minimumRadius=e._minimumRadius,t._maximumRadius=e._maximumRadius,t._centerToleranceSquared=e._centerToleranceSquared,t):new n$1c(i.x,i.y,i.z)}},n$1c.fromCartesian3=function(e,t){return t$$(t)||(t=new n$1c),t$$(e)&&f$1b(t,e.x,e.y,e.z),t},n$1c.WGS84=Object.freeze(new n$1c(6378137,6378137,n$1d.Radius)),n$1c.XIAN80=Object.freeze(new n$1c(6378140,6378140,6356755.29)),n$1c.CGCS2000=Object.freeze(new n$1c(6378137,6378137,6356752.31)),n$1c.UNIT_SPHERE=Object.freeze(new n$1c(1,1,1)),n$1c.MOON=Object.freeze(new n$1c(n$1d.LUNAR_RADIUS,n$1d.LUNAR_RADIUS,n$1d.LUNAR_RADIUS)),n$1c.prototype.clone=function(e){return n$1c.clone(this,e)},n$1c.packedLength=a$11.packedLength,n$1c.pack=function(e,t,i){return n$1e.typeOf.object("value",e),n$1e.defined("array",t),i=e$1Y(i,0),a$11.pack(e._radii,t,i),t},n$1c.unpack=function(e,t,i){n$1e.defined("array",e),t=e$1Y(t,0);var n=a$11.unpack(e,t);return n$1c.fromCartesian3(n,i)},n$1c.prototype.geocentricSurfaceNormal=a$11.normalize,n$1c.prototype.geodeticSurfaceNormalCartographic=function(e,t){n$1e.typeOf.object("cartographic",e);var i=e.longitude,n=e.latitude,r=Math.cos(n),o=r*Math.cos(i),a=r*Math.sin(i),s=Math.sin(n);return t$$(t)||(t=new a$11),t.x=o,t.y=a,t.z=s,a$11.normalize(t,t)},n$1c.prototype.geodeticSurfaceNormal=function(e,t){return t$$(t)||(t=new a$11),t=a$11.multiplyComponents(e,this._oneOverRadiiSquared,t),a$11.normalize(t,t)};var y$18=new a$11,v$19=new a$11;n$1c.prototype.cartographicToCartesian=function(e,t){var i=y$18,n=v$19;this.geodeticSurfaceNormalCartographic(e,i),a$11.multiplyComponents(this._radiiSquared,i,n);var r=Math.sqrt(a$11.dot(i,n));return a$11.divideByScalar(n,r,n),a$11.multiplyByScalar(i,e.height,i),t$$(t)||(t=new a$11),a$11.add(n,i,t)},n$1c.prototype.cartographicArrayToCartesianArray=function(e,t){n$1e.defined("cartographics",e);var i=e.length;t$$(t)?t.length=i:t=new Array(i);for(var n=0;n=this._radii.z-t))return i},Object.defineProperties(s$1q.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),s$1q.prototype.project=function(e,t){var i=this._semimajorAxis,n=e.longitude*i,r=e.latitude*i,o=e.height;return t$$(t)?(t.x=n,t.y=r,t.z=o,t):new a$11(n,r,o)},s$1q.prototype.unproject=function(e,t){if(!t$$(e))throw new t$_("cartesian is required");var i=this._oneOverSemimajorAxis,n=e.x*i,r=e.y*i,o=e.z;return t$$(t)?(t.longitude=n,t.latitude=r,t.height=o,t):new i$1g(n,r,o)};var e$1X={OUTSIDE:-1,INTERSECTING:0,INSIDE:1},cr$4=Object.freeze(e$1X);function i$1f(e,t){this.start=e$1Y(e,0),this.stop=e$1Y(t,0)}function r$W(e,t,i,n,r,o,a,s,l){this[0]=e$1Y(e,0),this[1]=e$1Y(n,0),this[2]=e$1Y(a,0),this[3]=e$1Y(t,0),this[4]=e$1Y(r,0),this[5]=e$1Y(s,0),this[6]=e$1Y(i,0),this[7]=e$1Y(o,0),this[8]=e$1Y(l,0)}r$W.packedLength=9,r$W.pack=function(e,t,i){return n$1e.typeOf.object("value",e),n$1e.defined("array",t),i=e$1Y(i,0),t[i++]=e[0],t[i++]=e[1],t[i++]=e[2],t[i++]=e[3],t[i++]=e[4],t[i++]=e[5],t[i++]=e[6],t[i++]=e[7],t[i++]=e[8],t},r$W.unpack=function(e,t,i){return n$1e.defined("array",e),t=e$1Y(t,0),t$$(i)||(i=new r$W),i[0]=e[t++],i[1]=e[t++],i[2]=e[t++],i[3]=e[t++],i[4]=e[t++],i[5]=e[t++],i[6]=e[t++],i[7]=e[t++],i[8]=e[t++],i},r$W.clone=function(e,t){if(t$$(e))return t$$(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):new r$W(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])},r$W.fromArray=function(e,t,i){return n$1e.defined("array",e),t=e$1Y(t,0),t$$(i)||(i=new r$W),i[0]=e[t],i[1]=e[t+1],i[2]=e[t+2],i[3]=e[t+3],i[4]=e[t+4],i[5]=e[t+5],i[6]=e[t+6],i[7]=e[t+7],i[8]=e[t+8],i},r$W.fromColumnMajorArray=function(e,t){return n$1e.defined("values",e),r$W.clone(e,t)},r$W.fromRowMajorArray=function(e,t){return n$1e.defined("values",e),t$$(t)?(t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],t):new r$W(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},r$W.fromQuaternion=function(e,t){n$1e.typeOf.object("quaternion",e);var i=e.x*e.x,n=e.x*e.y,r=e.x*e.z,o=e.x*e.w,a=e.y*e.y,s=e.y*e.z,l=e.y*e.w,u=e.z*e.z,c=e.z*e.w,h=e.w*e.w,d=i-a-u+h,f=2*(n-c),p=2*(r+l),_=2*(n+c),m=-i+a-u+h,$=2*(s-o),g=2*(r-l),y=2*(s+o),v=-i-a+u+h;return t$$(t)?(t[0]=d,t[1]=_,t[2]=g,t[3]=f,t[4]=m,t[5]=y,t[6]=p,t[7]=$,t[8]=v,t):new r$W(d,f,p,_,m,$,g,y,v)},r$W.fromHeadingPitchRoll=function(e,t){n$1e.typeOf.object("headingPitchRoll",e);var i=Math.cos(-e.pitch),n=Math.cos(-e.heading),r=Math.cos(e.roll),o=Math.sin(-e.pitch),a=Math.sin(-e.heading),s=Math.sin(e.roll),l=i*n,u=-r*a+s*o*n,c=s*a+r*o*n,h=i*a,d=r*n+s*o*a,f=-s*n+r*o*a,p=-o,_=s*i,m=r*i;return t$$(t)?(t[0]=l,t[1]=h,t[2]=p,t[3]=u,t[4]=d,t[5]=_,t[6]=c,t[7]=f,t[8]=m,t):new r$W(l,u,c,h,d,f,p,_,m)},r$W.fromScale=function(e,t){return n$1e.typeOf.object("scale",e),t$$(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=e.y,t[5]=0,t[6]=0,t[7]=0,t[8]=e.z,t):new r$W(e.x,0,0,0,e.y,0,0,0,e.z)},r$W.fromUniformScale=function(e,t){return n$1e.typeOf.number("scale",e),t$$(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=e,t):new r$W(e,0,0,0,e,0,0,0,e)},r$W.fromCrossProduct=function(e,t){return n$1e.typeOf.object("vector",e),t$$(t)?(t[0]=0,t[1]=e.z,t[2]=-e.y,t[3]=-e.z,t[4]=0,t[5]=e.x,t[6]=e.y,t[7]=-e.x,t[8]=0,t):new r$W(0,-e.z,e.y,e.z,0,-e.x,-e.y,e.x,0)},r$W.fromRotationX=function(e,t){n$1e.typeOf.number("angle",e);var i=Math.cos(e),n=Math.sin(e);return t$$(t)?(t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=i,t[5]=n,t[6]=0,t[7]=-n,t[8]=i,t):new r$W(1,0,0,0,i,-n,0,n,i)},r$W.fromRotationY=function(e,t){n$1e.typeOf.number("angle",e);var i=Math.cos(e),n=Math.sin(e);return t$$(t)?(t[0]=i,t[1]=0,t[2]=-n,t[3]=0,t[4]=1,t[5]=0,t[6]=n,t[7]=0,t[8]=i,t):new r$W(i,0,n,0,1,0,-n,0,i)},r$W.fromRotationZ=function(e,t){n$1e.typeOf.number("angle",e);var i=Math.cos(e),n=Math.sin(e);return t$$(t)?(t[0]=i,t[1]=n,t[2]=0,t[3]=-n,t[4]=i,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new r$W(i,-n,0,n,i,0,0,0,1)},r$W.toArray=function(e,t){return n$1e.typeOf.object("matrix",e),t$$(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},r$W.getElementIndex=function(e,t){return n$1e.typeOf.number.greaterThanOrEquals("row",t,0),n$1e.typeOf.number.lessThanOrEquals("row",t,2),n$1e.typeOf.number.greaterThanOrEquals("column",e,0),n$1e.typeOf.number.lessThanOrEquals("column",e,2),3*e+t},r$W.getColumn=function(e,t,i){n$1e.typeOf.object("matrix",e),n$1e.typeOf.number.greaterThanOrEquals("index",t,0),n$1e.typeOf.number.lessThanOrEquals("index",t,2),n$1e.typeOf.object("result",i);var n=3*t,r=e[n],o=e[n+1],a=e[n+2];return i.x=r,i.y=o,i.z=a,i},r$W.setColumn=function(e,t,i,n){n$1e.typeOf.object("matrix",e),n$1e.typeOf.number.greaterThanOrEquals("index",t,0),n$1e.typeOf.number.lessThanOrEquals("index",t,2),n$1e.typeOf.object("cartesian",i),n$1e.typeOf.object("result",n);var r=3*t;return(n=r$W.clone(e,n))[r]=i.x,n[r+1]=i.y,n[r+2]=i.z,n},r$W.getRow=function(e,t,i){n$1e.typeOf.object("matrix",e),n$1e.typeOf.number.greaterThanOrEquals("index",t,0),n$1e.typeOf.number.lessThanOrEquals("index",t,2),n$1e.typeOf.object("result",i);var n=e[t],r=e[t+3],o=e[t+6];return i.x=n,i.y=r,i.z=o,i},r$W.setRow=function(e,t,i,n){return n$1e.typeOf.object("matrix",e),n$1e.typeOf.number.greaterThanOrEquals("index",t,0),n$1e.typeOf.number.lessThanOrEquals("index",t,2),n$1e.typeOf.object("cartesian",i),n$1e.typeOf.object("result",n),(n=r$W.clone(e,n))[t]=i.x,n[t+3]=i.y,n[t+6]=i.z,n};var w$1f=new a$11;r$W.getScale=function(e,t){return n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("result",t),t.x=a$11.magnitude(a$11.fromElements(e[0],e[1],e[2],w$1f)),t.y=a$11.magnitude(a$11.fromElements(e[3],e[4],e[5],w$1f)),t.z=a$11.magnitude(a$11.fromElements(e[6],e[7],e[8],w$1f)),t};var M$1m=new a$11;r$W.getMaximumScale=function(e){return r$W.getScale(e,M$1m),a$11.maximumComponent(M$1m)},r$W.multiply=function(e,t,i){n$1e.typeOf.object("left",e),n$1e.typeOf.object("right",t),n$1e.typeOf.object("result",i);var n=e[0]*t[0]+e[3]*t[1]+e[6]*t[2],r=e[1]*t[0]+e[4]*t[1]+e[7]*t[2],o=e[2]*t[0]+e[5]*t[1]+e[8]*t[2],a=e[0]*t[3]+e[3]*t[4]+e[6]*t[5],s=e[1]*t[3]+e[4]*t[4]+e[7]*t[5],l=e[2]*t[3]+e[5]*t[4]+e[8]*t[5],u=e[0]*t[6]+e[3]*t[7]+e[6]*t[8],c=e[1]*t[6]+e[4]*t[7]+e[7]*t[8],h=e[2]*t[6]+e[5]*t[7]+e[8]*t[8];return i[0]=n,i[1]=r,i[2]=o,i[3]=a,i[4]=s,i[5]=l,i[6]=u,i[7]=c,i[8]=h,i},r$W.add=function(e,t,i){return n$1e.typeOf.object("left",e),n$1e.typeOf.object("right",t),n$1e.typeOf.object("result",i),i[0]=e[0]+t[0],i[1]=e[1]+t[1],i[2]=e[2]+t[2],i[3]=e[3]+t[3],i[4]=e[4]+t[4],i[5]=e[5]+t[5],i[6]=e[6]+t[6],i[7]=e[7]+t[7],i[8]=e[8]+t[8],i},r$W.subtract=function(e,t,i){return n$1e.typeOf.object("left",e),n$1e.typeOf.object("right",t),n$1e.typeOf.object("result",i),i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],i[3]=e[3]-t[3],i[4]=e[4]-t[4],i[5]=e[5]-t[5],i[6]=e[6]-t[6],i[7]=e[7]-t[7],i[8]=e[8]-t[8],i},r$W.multiplyByVector=function(e,t,i){n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("cartesian",t),n$1e.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z,a=e[0]*n+e[3]*r+e[6]*o,s=e[1]*n+e[4]*r+e[7]*o,l=e[2]*n+e[5]*r+e[8]*o;return i.x=a,i.y=s,i.z=l,i},r$W.multiplyByScalar=function(e,t,i){return n$1e.typeOf.object("matrix",e),n$1e.typeOf.number("scalar",t),n$1e.typeOf.object("result",i),i[0]=e[0]*t,i[1]=e[1]*t,i[2]=e[2]*t,i[3]=e[3]*t,i[4]=e[4]*t,i[5]=e[5]*t,i[6]=e[6]*t,i[7]=e[7]*t,i[8]=e[8]*t,i},r$W.multiplyByScale=function(e,t,i){return n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("scale",t),n$1e.typeOf.object("result",i),i[0]=e[0]*t.x,i[1]=e[1]*t.x,i[2]=e[2]*t.x,i[3]=e[3]*t.y,i[4]=e[4]*t.y,i[5]=e[5]*t.y,i[6]=e[6]*t.z,i[7]=e[7]*t.z,i[8]=e[8]*t.z,i},r$W.negate=function(e,t){return n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t},r$W.transpose=function(e,t){n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("result",t);var i=e[0],n=e[3],r=e[6],o=e[1],a=e[4],s=e[7],l=e[2],u=e[5],c=e[8];return t[0]=i,t[1]=n,t[2]=r,t[3]=o,t[4]=a,t[5]=s,t[6]=l,t[7]=u,t[8]=c,t};var S$$=new a$11(1,1,1);function U$18(e){for(var t=0,i=0;i<9;++i){var n=e[i];t+=n*n}return Math.sqrt(t)}r$W.getRotation=function(e,t){n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("result",t);var i=a$11.divideComponents(S$$,r$W.getScale(e,M$1m),M$1m);return t=r$W.multiplyByScale(e,i,t)};var q$1j=[1,0,0],z$_=[2,2,1];function W$1e(e){for(var t=0,i=0;i<3;++i){var n=e[r$W.getElementIndex(z$_[i],q$1j[i])];t+=2*n*n}return Math.sqrt(t)}function P$16(e,t){for(var i=n$1d.EPSILON15,n=0,r=1,o=0;o<3;++o){var a=Math.abs(e[r$W.getElementIndex(z$_[o],q$1j[o])]);a>n&&(r=o,n=a)}var s=1,l=0,u=q$1j[r],c=z$_[r];if(Math.abs(e[r$W.getElementIndex(c,u)])>i){var h,d=(e[r$W.getElementIndex(c,c)]-e[r$W.getElementIndex(u,u)])/2/e[r$W.getElementIndex(c,u)];l=(h=d<0?-1/(-d+Math.sqrt(1+d*d)):1/(d+Math.sqrt(1+d*d)))*(s=1/Math.sqrt(1+h*h))}return(t=r$W.clone(r$W.IDENTITY,t))[r$W.getElementIndex(u,u)]=t[r$W.getElementIndex(c,c)]=s,t[r$W.getElementIndex(c,u)]=l,t[r$W.getElementIndex(u,c)]=-l,t}var E$1f=new r$W,N$17=new r$W;function a$10(e,t,i,n){this.x=e$1Y(e,0),this.y=e$1Y(t,0),this.z=e$1Y(i,0),this.w=e$1Y(n,0)}r$W.computeEigenDecomposition=function(e,t){n$1e.typeOf.object("matrix",e);var i=n$1d.EPSILON20,n=0,r=0;t$$(t)||(t={});for(var o=t.unitary=r$W.clone(r$W.IDENTITY,t.unitary),a=t.diagonal=r$W.clone(e,t.diagonal),s=i*U$18(a);r<10&&W$1e(a)>s;)P$16(a,E$1f),r$W.transpose(E$1f,N$17),r$W.multiply(a,E$1f,a),r$W.multiply(N$17,a,a),r$W.multiply(o,E$1f,o),++n>2&&(++r,n=0);return t},r$W.abs=function(e,t){return n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t},r$W.determinant=function(e){n$1e.typeOf.object("matrix",e);var t=e[0],i=e[3],n=e[6],r=e[1],o=e[4],a=e[7],s=e[2],l=e[5],u=e[8];return t*(o*u-l*a)+r*(l*n-i*u)+s*(i*a-o*n)},r$W.inverse=function(e,t){n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("result",t);var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=r$W.determinant(e);if(Math.abs(h)<=n$1d.EPSILON15)throw new t$_("matrix is not invertible");t[0]=a*c-u*s,t[1]=u*r-n*c,t[2]=n*s-a*r,t[3]=l*s-o*c,t[4]=i*c-l*r,t[5]=o*r-i*s,t[6]=o*u-l*a,t[7]=l*n-i*u,t[8]=i*a-o*n;var d=1/h;return r$W.multiplyByScalar(t,d,t)},r$W.equals=function(e,t){return e===t||t$$(e)&&t$$(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]},r$W.equalsEpsilon=function(e,t,i){return n$1e.typeOf.number("epsilon",i),e===t||t$$(e)&&t$$(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},r$W.IDENTITY=Object.freeze(new r$W(1,0,0,0,1,0,0,0,1)),r$W.ZERO=Object.freeze(new r$W(0,0,0,0,0,0,0,0,0)),r$W.COLUMN0ROW0=0,r$W.COLUMN0ROW1=1,r$W.COLUMN0ROW2=2,r$W.COLUMN1ROW0=3,r$W.COLUMN1ROW1=4,r$W.COLUMN1ROW2=5,r$W.COLUMN2ROW0=6,r$W.COLUMN2ROW1=7,r$W.COLUMN2ROW2=8,Object.defineProperties(r$W.prototype,{length:{get:function(){return r$W.packedLength}}}),r$W.prototype.clone=function(e){return r$W.clone(this,e)},r$W.prototype.equals=function(e){return r$W.equals(this,e)},r$W.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]},r$W.prototype.equalsEpsilon=function(e,t){return r$W.equalsEpsilon(this,e,t)},r$W.prototype.toString=function(){return"("+this[0]+", "+this[3]+", "+this[6]+")\n("+this[1]+", "+this[4]+", "+this[7]+")\n("+this[2]+", "+this[5]+", "+this[8]+")"},a$10.fromElements=function(e,t,i,n,r){return t$$(r)?(r.x=e,r.y=t,r.z=i,r.w=n,r):new a$10(e,t,i,n)},a$10.fromColor=function(e,t){return n$1e.typeOf.object("color",e),t$$(t)?(t.x=e.red,t.y=e.green,t.z=e.blue,t.w=e.alpha,t):new a$10(e.red,e.green,e.blue,e.alpha)},a$10.clone=function(e,t){if(t$$(e))return t$$(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new a$10(e.x,e.y,e.z,e.w)},a$10.packedLength=4,a$10.pack=function(e,t,i){return n$1e.typeOf.object("value",e),n$1e.defined("array",t),i=e$1Y(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.z,t[i]=e.w,t},a$10.unpack=function(e,t,i){return n$1e.defined("array",e),t=e$1Y(t,0),t$$(i)||(i=new a$10),i.x=e[t++],i.y=e[t++],i.z=e[t++],i.w=e[t],i},a$10.packArray=function(e,t){n$1e.defined("array",e);var i=e.length,n=4*i;if(t$$(t)){if(!Array.isArray(t)&&t.length!==n)throw new t$_("If result is a typed array, it must have exactly array.length * 4 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;r=p$1n)return n<0?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY;var r=n*e.x*h$1g;return r+=n*e.y*O$15,(r+=n*e.z*j$1c)*Math.pow(10,i)},t$$(Object.create)&&(t$Z.prototype=Object.create(Error.prototype),t$Z.prototype.constructor=t$Z),t$Z.prototype.toString=function(){var e=this.name+": "+this.message;return t$$(this.stack)&&(e+="\n"+this.stack.toString()),e},c$1a.packedLength=16,c$1a.pack=function(e,t,i){return n$1e.typeOf.object("value",e),n$1e.defined("array",t),i=e$1Y(i,0),t[i++]=e[0],t[i++]=e[1],t[i++]=e[2],t[i++]=e[3],t[i++]=e[4],t[i++]=e[5],t[i++]=e[6],t[i++]=e[7],t[i++]=e[8],t[i++]=e[9],t[i++]=e[10],t[i++]=e[11],t[i++]=e[12],t[i++]=e[13],t[i++]=e[14],t[i]=e[15],t},c$1a.unpack=function(e,t,i){return n$1e.defined("array",e),t=e$1Y(t,0),t$$(i)||(i=new c$1a),i[0]=e[t++],i[1]=e[t++],i[2]=e[t++],i[3]=e[t++],i[4]=e[t++],i[5]=e[t++],i[6]=e[t++],i[7]=e[t++],i[8]=e[t++],i[9]=e[t++],i[10]=e[t++],i[11]=e[t++],i[12]=e[t++],i[13]=e[t++],i[14]=e[t++],i[15]=e[t],i},c$1a.clone=function(e,t){if(t$$(e))return t$$(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):new c$1a(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])},c$1a.fromArray=c$1a.unpack,c$1a.fromColumnMajorArray=function(e,t){return n$1e.defined("values",e),c$1a.clone(e,t)},c$1a.fromRowMajorArray=function(e,t){return n$1e.defined("values",e),t$$(t)?(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t):new c$1a(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},c$1a.fromRotationTranslation=function(e,t,i){return n$1e.typeOf.object("rotation",e),t=e$1Y(t,a$11.ZERO),t$$(i)?(i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=0,i[4]=e[3],i[5]=e[4],i[6]=e[5],i[7]=0,i[8]=e[6],i[9]=e[7],i[10]=e[8],i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,i):new c$1a(e[0],e[3],e[6],t.x,e[1],e[4],e[7],t.y,e[2],e[5],e[8],t.z,0,0,0,1)},c$1a.fromTranslationQuaternionRotationScale=function(e,t,i,n){n$1e.typeOf.object("translation",e),n$1e.typeOf.object("rotation",t),n$1e.typeOf.object("scale",i),t$$(n)||(n=new c$1a);var r=i.x,o=i.y,a=i.z,s=t.x*t.x,l=t.x*t.y,u=t.x*t.z,c=t.x*t.w,h=t.y*t.y,d=t.y*t.z,f=t.y*t.w,p=t.z*t.z,_=t.z*t.w,m=t.w*t.w,$=s-h-p+m,g=2*(l-_),y=2*(u+f),v=2*(l+_),x=-s+h-p+m,b=2*(d-c),S=2*(u-f),w=2*(d+c),C=-s-h+p+m;return n[0]=$*r,n[1]=v*r,n[2]=S*r,n[3]=0,n[4]=g*o,n[5]=x*o,n[6]=w*o,n[7]=0,n[8]=y*a,n[9]=b*a,n[10]=C*a,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,n},c$1a.fromTranslationRotationScale=function(e,t){return n$1e.typeOf.object("translationRotationScale",e),c$1a.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t)},c$1a.fromTranslation=function(e,t){return n$1e.typeOf.object("translation",e),c$1a.fromRotationTranslation(r$W.IDENTITY,e,t)},c$1a.fromScale=function(e,t){return n$1e.typeOf.object("scale",e),t$$(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e.y,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e.z,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new c$1a(e.x,0,0,0,0,e.y,0,0,0,0,e.z,0,0,0,0,1)},c$1a.fromUniformScale=function(e,t){return n$1e.typeOf.number("scale",e),t$$(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new c$1a(e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1)};var Y$10=new a$11,A$1h=new a$11,Q$18=new a$11;c$1a.fromCamera=function(e,t){n$1e.typeOf.object("camera",e);var i=e.position,n=e.direction,r=e.up;n$1e.typeOf.object("camera.position",i),n$1e.typeOf.object("camera.direction",n),n$1e.typeOf.object("camera.up",r),a$11.normalize(n,Y$10),a$11.normalize(a$11.cross(Y$10,r,A$1h),A$1h),a$11.normalize(a$11.cross(A$1h,Y$10,Q$18),Q$18);var o=A$1h.x,a=A$1h.y,s=A$1h.z,l=Y$10.x,u=Y$10.y,c=Y$10.z,h=Q$18.x,d=Q$18.y,f=Q$18.z,p=i.x,_=i.y,m=i.z,$=o*-p+a*-_+s*-m,g=h*-p+d*-_+f*-m,y=l*p+u*_+c*m;return t$$(t)?(t[0]=o,t[1]=h,t[2]=-l,t[3]=0,t[4]=a,t[5]=d,t[6]=-u,t[7]=0,t[8]=s,t[9]=f,t[10]=-c,t[11]=0,t[12]=$,t[13]=g,t[14]=y,t[15]=1,t):new c$1a(o,a,s,$,h,d,f,g,-l,-u,-c,y,0,0,0,1)},c$1a.computePerspectiveFieldOfView=function(e,t,i,n,r){n$1e.typeOf.number.greaterThan("fovY",e,0),n$1e.typeOf.number.lessThan("fovY",e,Math.PI),n$1e.typeOf.number.greaterThan("near",i,0),n$1e.typeOf.number.greaterThan("far",n,0),n$1e.typeOf.object("result",r);var o=1/Math.tan(.5*e),a=o/t,s=(n+i)/(i-n),l=2*n*i/(i-n);return r[0]=a,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=o,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=s,r[11]=-1,r[12]=0,r[13]=0,r[14]=l,r[15]=0,r},c$1a.computeOrthographicOffCenter=function(e,t,i,n,r,o,a){n$1e.typeOf.number("left",e),n$1e.typeOf.number("right",t),n$1e.typeOf.number("bottom",i),n$1e.typeOf.number("top",n),n$1e.typeOf.number("near",r),n$1e.typeOf.number("far",o),n$1e.typeOf.object("result",a);var s=1/(t-e),l=1/(n-i),u=1/(o-r),c=-(t+e)*s,h=-(n+i)*l,d=-(o+r)*u;return s*=2,l*=2,u*=-2,a[0]=s,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=l,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=u,a[11]=0,a[12]=c,a[13]=h,a[14]=d,a[15]=1,a},c$1a.computePerspectiveOffCenter=function(e,t,i,n,r,o,a){n$1e.typeOf.number("left",e),n$1e.typeOf.number("right",t),n$1e.typeOf.number("bottom",i),n$1e.typeOf.number("top",n),n$1e.typeOf.number("near",r),n$1e.typeOf.number("far",o),n$1e.typeOf.object("result",a);var s=2*r/(t-e),l=2*r/(n-i),u=(t+e)/(t-e),c=(n+i)/(n-i),h=-(o+r)/(o-r),d=-2*o*r/(o-r);return a[0]=s,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=l,a[6]=0,a[7]=0,a[8]=u,a[9]=c,a[10]=h,a[11]=-1,a[12]=0,a[13]=0,a[14]=d,a[15]=0,a},c$1a.computeInfinitePerspectiveOffCenter=function(e,t,i,n,r,o){n$1e.typeOf.number("left",e),n$1e.typeOf.number("right",t),n$1e.typeOf.number("bottom",i),n$1e.typeOf.number("top",n),n$1e.typeOf.number("near",r),n$1e.typeOf.object("result",o);var a=2*r/(t-e),s=2*r/(n-i),l=(t+e)/(t-e),u=(n+i)/(n-i),c=-2*r;return o[0]=a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=s,o[6]=0,o[7]=0,o[8]=l,o[9]=u,o[10]=-1,o[11]=-1,o[12]=0,o[13]=0,o[14]=c,o[15]=0,o},c$1a.computeViewportTransformation=function(e,t,i,n){n$1e.typeOf.object("result",n),e=e$1Y(e,e$1Y.EMPTY_OBJECT);var r=e$1Y(e.x,0),o=e$1Y(e.y,0),a=e$1Y(e.width,0),s=e$1Y(e.height,0);t=e$1Y(t,0);var l=.5*a,u=.5*s,c=.5*((i=e$1Y(i,1))-t),h=l,d=u,f=c,p=r+l,_=o+u,m=t+c;return n[0]=h,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=d,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=f,n[11]=0,n[12]=p,n[13]=_,n[14]=m,n[15]=1,n},c$1a.computeView=function(e,t,i,n,r){return n$1e.typeOf.object("position",e),n$1e.typeOf.object("direction",t),n$1e.typeOf.object("up",i),n$1e.typeOf.object("right",n),n$1e.typeOf.object("result",r),r[0]=n.x,r[1]=i.x,r[2]=-t.x,r[3]=0,r[4]=n.y,r[5]=i.y,r[6]=-t.y,r[7]=0,r[8]=n.z,r[9]=i.z,r[10]=-t.z,r[11]=0,r[12]=-a$11.dot(n,e),r[13]=-a$11.dot(i,e),r[14]=a$11.dot(t,e),r[15]=1,r},c$1a.toArray=function(e,t){return n$1e.typeOf.object("matrix",e),t$$(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]},c$1a.getElementIndex=function(e,t){return n$1e.typeOf.number.greaterThanOrEquals("row",t,0),n$1e.typeOf.number.lessThanOrEquals("row",t,3),n$1e.typeOf.number.greaterThanOrEquals("column",e,0),n$1e.typeOf.number.lessThanOrEquals("column",e,3),4*e+t},c$1a.getColumn=function(e,t,i){n$1e.typeOf.object("matrix",e),n$1e.typeOf.number.greaterThanOrEquals("index",t,0),n$1e.typeOf.number.lessThanOrEquals("index",t,3),n$1e.typeOf.object("result",i);var n=4*t,r=e[n],o=e[n+1],a=e[n+2],s=e[n+3];return i.x=r,i.y=o,i.z=a,i.w=s,i},c$1a.setColumn=function(e,t,i,n){n$1e.typeOf.object("matrix",e),n$1e.typeOf.number.greaterThanOrEquals("index",t,0),n$1e.typeOf.number.lessThanOrEquals("index",t,3),n$1e.typeOf.object("cartesian",i),n$1e.typeOf.object("result",n);var r=4*t;return(n=c$1a.clone(e,n))[r]=i.x,n[r+1]=i.y,n[r+2]=i.z,n[r+3]=i.w,n},c$1a.setTranslation=function(e,t,i){return n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("translation",t),n$1e.typeOf.object("result",i),i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=e[15],i};var c1$1=new a$11;c$1a.setScale=function(e,t,i){n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("scale",t),n$1e.typeOf.object("result",i);var n=c$1a.getScale(e,c1$1),r=a$11.divideComponents(t,n,c1$1);return c$1a.multiplyByScale(e,r,i)},c$1a.getRow=function(e,t,i){n$1e.typeOf.object("matrix",e),n$1e.typeOf.number.greaterThanOrEquals("index",t,0),n$1e.typeOf.number.lessThanOrEquals("index",t,3),n$1e.typeOf.object("result",i);var n=e[t],r=e[t+4],o=e[t+8],a=e[t+12];return i.x=n,i.y=r,i.z=o,i.w=a,i},c$1a.setRow=function(e,t,i,n){return n$1e.typeOf.object("matrix",e),n$1e.typeOf.number.greaterThanOrEquals("index",t,0),n$1e.typeOf.number.lessThanOrEquals("index",t,3),n$1e.typeOf.object("cartesian",i),n$1e.typeOf.object("result",n),(n=c$1a.clone(e,n))[t]=i.x,n[t+4]=i.y,n[t+8]=i.z,n[t+12]=i.w,n};var f1$1=new a$11;c$1a.getScale=function(e,t){return n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("result",t),t.x=a$11.magnitude(a$11.fromElements(e[0],e[1],e[2],f1$1)),t.y=a$11.magnitude(a$11.fromElements(e[4],e[5],e[6],f1$1)),t.z=a$11.magnitude(a$11.fromElements(e[8],e[9],e[10],f1$1)),t};var y1=new a$11;c$1a.getMaximumScale=function(e){return c$1a.getScale(e,y1),a$11.maximumComponent(y1)},c$1a.multiply=function(e,t,i){n$1e.typeOf.object("left",e),n$1e.typeOf.object("right",t),n$1e.typeOf.object("result",i);var n=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=e[9],f=e[10],p=e[11],_=e[12],m=e[13],$=e[14],g=e[15],y=t[0],v=t[1],x=t[2],b=t[3],S=t[4],w=t[5],C=t[6],T=t[7],P=t[8],E=t[9],A=t[10],L=t[11],M=t[12],I=t[13],O=t[14],D=t[15],R=n*y+s*v+h*x+_*b,N=r*y+l*v+d*x+m*b,F=o*y+u*v+f*x+$*b,B=a*y+c*v+p*x+g*b,z=n*S+s*w+h*C+_*T,G=r*S+l*w+d*C+m*T,k=o*S+u*w+f*C+$*T,U=a*S+c*w+p*C+g*T,V=n*P+s*E+h*A+_*L,W=r*P+l*E+d*A+m*L,H=o*P+u*E+f*A+$*L,Y=a*P+c*E+p*A+g*L,j=n*M+s*I+h*O+_*D,q=r*M+l*I+d*O+m*D,X=o*M+u*I+f*O+$*D,K=a*M+c*I+p*O+g*D;return i[0]=R,i[1]=N,i[2]=F,i[3]=B,i[4]=z,i[5]=G,i[6]=k,i[7]=U,i[8]=V,i[9]=W,i[10]=H,i[11]=Y,i[12]=j,i[13]=q,i[14]=X,i[15]=K,i},c$1a.add=function(e,t,i){return n$1e.typeOf.object("left",e),n$1e.typeOf.object("right",t),n$1e.typeOf.object("result",i),i[0]=e[0]+t[0],i[1]=e[1]+t[1],i[2]=e[2]+t[2],i[3]=e[3]+t[3],i[4]=e[4]+t[4],i[5]=e[5]+t[5],i[6]=e[6]+t[6],i[7]=e[7]+t[7],i[8]=e[8]+t[8],i[9]=e[9]+t[9],i[10]=e[10]+t[10],i[11]=e[11]+t[11],i[12]=e[12]+t[12],i[13]=e[13]+t[13],i[14]=e[14]+t[14],i[15]=e[15]+t[15],i},c$1a.subtract=function(e,t,i){return n$1e.typeOf.object("left",e),n$1e.typeOf.object("right",t),n$1e.typeOf.object("result",i),i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],i[3]=e[3]-t[3],i[4]=e[4]-t[4],i[5]=e[5]-t[5],i[6]=e[6]-t[6],i[7]=e[7]-t[7],i[8]=e[8]-t[8],i[9]=e[9]-t[9],i[10]=e[10]-t[10],i[11]=e[11]-t[11],i[12]=e[12]-t[12],i[13]=e[13]-t[13],i[14]=e[14]-t[14],i[15]=e[15]-t[15],i},c$1a.multiplyTransformation=function(e,t,i){n$1e.typeOf.object("left",e),n$1e.typeOf.object("right",t),n$1e.typeOf.object("result",i);var n=e[0],r=e[1],o=e[2],a=e[4],s=e[5],l=e[6],u=e[8],c=e[9],h=e[10],d=e[12],f=e[13],p=e[14],_=t[0],m=t[1],$=t[2],g=t[4],y=t[5],v=t[6],x=t[8],b=t[9],S=t[10],w=t[12],C=t[13],T=t[14],P=n*_+a*m+u*$,E=r*_+s*m+c*$,A=o*_+l*m+h*$,L=n*g+a*y+u*v,M=r*g+s*y+c*v,I=o*g+l*y+h*v,O=n*x+a*b+u*S,D=r*x+s*b+c*S,R=o*x+l*b+h*S,N=n*w+a*C+u*T+d,F=r*w+s*C+c*T+f,B=o*w+l*C+h*T+p;return i[0]=P,i[1]=E,i[2]=A,i[3]=0,i[4]=L,i[5]=M,i[6]=I,i[7]=0,i[8]=O,i[9]=D,i[10]=R,i[11]=0,i[12]=N,i[13]=F,i[14]=B,i[15]=1,i},c$1a.multiplyByMatrix3=function(e,t,i){n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("rotation",t),n$1e.typeOf.object("result",i);var n=e[0],r=e[1],o=e[2],a=e[4],s=e[5],l=e[6],u=e[8],c=e[9],h=e[10],d=t[0],f=t[1],p=t[2],_=t[3],m=t[4],$=t[5],g=t[6],y=t[7],v=t[8],x=n*d+a*f+u*p,b=r*d+s*f+c*p,S=o*d+l*f+h*p,w=n*_+a*m+u*$,C=r*_+s*m+c*$,T=o*_+l*m+h*$,P=n*g+a*y+u*v,E=r*g+s*y+c*v,A=o*g+l*y+h*v;return i[0]=x,i[1]=b,i[2]=S,i[3]=0,i[4]=w,i[5]=C,i[6]=T,i[7]=0,i[8]=P,i[9]=E,i[10]=A,i[11]=0,i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=e[15],i},c$1a.multiplyByTranslation=function(e,t,i){n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("translation",t),n$1e.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z,a=n*e[0]+r*e[4]+o*e[8]+e[12],s=n*e[1]+r*e[5]+o*e[9]+e[13],l=n*e[2]+r*e[6]+o*e[10]+e[14];return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=a,i[13]=s,i[14]=l,i[15]=e[15],i};var G$16=new a$11;c$1a.multiplyByUniformScale=function(e,t,i){return n$1e.typeOf.object("matrix",e),n$1e.typeOf.number("scale",t),n$1e.typeOf.object("result",i),G$16.x=t,G$16.y=t,G$16.z=t,c$1a.multiplyByScale(e,G$16,i)},c$1a.multiplyByScale=function(e,t,i){n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("scale",t),n$1e.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z;return 1===n&&1===r&&1===o?c$1a.clone(e,i):(i[0]=n*e[0],i[1]=n*e[1],i[2]=n*e[2],i[3]=0,i[4]=r*e[4],i[5]=r*e[5],i[6]=r*e[6],i[7]=0,i[8]=o*e[8],i[9]=o*e[9],i[10]=o*e[10],i[11]=0,i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=1,i)},c$1a.multiplyByVector=function(e,t,i){n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("cartesian",t),n$1e.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z,a=t.w,s=e[0]*n+e[4]*r+e[8]*o+e[12]*a,l=e[1]*n+e[5]*r+e[9]*o+e[13]*a,u=e[2]*n+e[6]*r+e[10]*o+e[14]*a,c=e[3]*n+e[7]*r+e[11]*o+e[15]*a;return i.x=s,i.y=l,i.z=u,i.w=c,i},c$1a.multiplyByPointAsVector=function(e,t,i){n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("cartesian",t),n$1e.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z,a=e[0]*n+e[4]*r+e[8]*o,s=e[1]*n+e[5]*r+e[9]*o,l=e[2]*n+e[6]*r+e[10]*o;return i.x=a,i.y=s,i.z=l,i},c$1a.multiplyByPoint=function(e,t,i){n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("cartesian",t),n$1e.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z,a=e[0]*n+e[4]*r+e[8]*o+e[12],s=e[1]*n+e[5]*r+e[9]*o+e[13],l=e[2]*n+e[6]*r+e[10]*o+e[14];return i.x=a,i.y=s,i.z=l,i},c$1a.multiplyByScalar=function(e,t,i){return n$1e.typeOf.object("matrix",e),n$1e.typeOf.number("scalar",t),n$1e.typeOf.object("result",i),i[0]=e[0]*t,i[1]=e[1]*t,i[2]=e[2]*t,i[3]=e[3]*t,i[4]=e[4]*t,i[5]=e[5]*t,i[6]=e[6]*t,i[7]=e[7]*t,i[8]=e[8]*t,i[9]=e[9]*t,i[10]=e[10]*t,i[11]=e[11]*t,i[12]=e[12]*t,i[13]=e[13]*t,i[14]=e[14]*t,i[15]=e[15]*t,i},c$1a.multiplyByPlane=function(e,t,i){n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("plane",t),n$1e.typeOf.object("result",i);var n=new c$1a,r=new c$1a;c$1a.inverse(e,n),c$1a.transpose(n,r);var o=new a$10(t.normal.x,t.normal.y,t.normal.z,t.distance);c$1a.multiplyByVector(r,o,o),i.normal.x=o.x,i.normal.y=o.y,i.normal.z=o.z;var a=a$11.magnitude(i.normal);return a$11.normalize(i.normal,i.normal),i.distance=o.w/a,i},c$1a.negate=function(e,t){return n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t},c$1a.transpose=function(e,t){n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("result",t);var i=e[1],n=e[2],r=e[3],o=e[6],a=e[7],s=e[11];return t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=i,t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=o,t[10]=e[10],t[11]=e[14],t[12]=r,t[13]=a,t[14]=s,t[15]=e[15],t},c$1a.abs=function(e,t){return n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t[9]=Math.abs(e[9]),t[10]=Math.abs(e[10]),t[11]=Math.abs(e[11]),t[12]=Math.abs(e[12]),t[13]=Math.abs(e[13]),t[14]=Math.abs(e[14]),t[15]=Math.abs(e[15]),t},c$1a.equals=function(e,t){return e===t||t$$(e)&&t$$(t)&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[3]===t[3]&&e[7]===t[7]&&e[11]===t[11]&&e[15]===t[15]},c$1a.equalsEpsilon=function(e,t,i){return n$1e.typeOf.number("epsilon",i),e===t||t$$(e)&&t$$(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&&Math.abs(e[9]-t[9])<=i&&Math.abs(e[10]-t[10])<=i&&Math.abs(e[11]-t[11])<=i&&Math.abs(e[12]-t[12])<=i&&Math.abs(e[13]-t[13])<=i&&Math.abs(e[14]-t[14])<=i&&Math.abs(e[15]-t[15])<=i},c$1a.getTranslation=function(e,t){return n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("result",t),t.x=e[12],t.y=e[13],t.z=e[14],t},c$1a.getMatrix3=function(e,t){return n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("result",t),t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},c$1a.getRotation=function(e,t){return n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("result",t),t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t};var m1=new r$W,t1$1=new r$W,r1$1=new a$10,e1$1=new a$10(0,0,0,1);function s$1p(e,t,i,n){this.west=e$1Y(e,0),this.south=e$1Y(t,0),this.east=e$1Y(i,0),this.north=e$1Y(n,0)}c$1a.inverse=function(e,t){n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("result",t);var i=e[0],n=e[4],r=e[8],o=e[12],a=e[1],s=e[5],l=e[9],u=e[13],c=e[2],h=e[6],d=e[10],f=e[14],p=e[3],_=e[7],m=e[11],$=e[15],g=d*$,y=f*m,v=h*$,x=f*_,b=h*m,S=d*_,w=c*$,C=f*p,T=c*m,P=d*p,E=c*_,A=h*p,L=g*s+x*l+b*u-(y*s+v*l+S*u),M=y*a+w*l+P*u-(g*a+C*l+T*u),I=v*a+C*s+E*u-(x*a+w*s+A*u),O=S*a+T*s+A*l-(b*a+P*s+E*l),D=y*n+v*r+S*o-(g*n+x*r+b*o),R=g*i+C*r+T*o-(y*i+w*r+P*o),N=x*i+w*n+A*o-(v*i+C*n+E*o),F=b*i+P*n+E*r-(S*i+T*n+A*r),B=(g=r*u)*_+(x=o*s)*m+(b=n*l)*$-((y=o*l)*_+(v=n*u)*m+(S=r*s)*$),z=y*p+(w=i*u)*m+(P=r*a)*$-(g*p+(C=o*a)*m+(T=i*l)*$),G=v*p+C*_+(E=i*s)*$-(x*p+w*_+(A=n*a)*$),k=S*p+T*_+A*m-(b*p+P*_+E*m),U=v*d+S*f+y*h-(b*f+g*h+x*d),V=T*f+g*c+C*d-(w*d+P*f+y*c),W=w*h+A*f+x*c-(E*f+v*c+C*h),H=E*d+b*c+P*h-(T*h+A*d+S*c),Y=i*L+n*M+r*I+o*O;if(Math.abs(Y)=0?c.longitude:c.longitude+n$1d.TWO_PI;r=Math.min(r,h),o=Math.max(o,h)}return n-i>o-r&&(i=r,(n=o)>n$1d.PI&&(n-=n$1d.TWO_PI),i>n$1d.PI&&(i-=n$1d.TWO_PI)),t$$(t)?(t.west=i,t.south=a,t.east=n,t.north=s,t):new s$1p(i,a,n,s)},s$1p.fromCartesianArray=function(e,t,i){n$1e.defined("cartesians",e),t=e$1Y(t,n$1c.WGS84);for(var n=Number.MAX_VALUE,r=-Number.MAX_VALUE,o=Number.MAX_VALUE,a=-Number.MAX_VALUE,s=Number.MAX_VALUE,l=-Number.MAX_VALUE,u=0,c=e.length;u=0?h.longitude:h.longitude+n$1d.TWO_PI;o=Math.min(o,d),a=Math.max(a,d)}return r-n>a-o&&(n=o,(r=a)>n$1d.PI&&(r-=n$1d.TWO_PI),n>n$1d.PI&&(n-=n$1d.TWO_PI)),t$$(i)?(i.west=n,i.south=s,i.east=r,i.north=l,i):new s$1p(n,s,r,l)},s$1p.clone=function(e,t){if(t$$(e))return t$$(t)?(t.west=e.west,t.south=e.south,t.east=e.east,t.north=e.north,t):new s$1p(e.west,e.south,e.east,e.north)},s$1p.equalsEpsilon=function(e,t,i){return n$1e.typeOf.number("absoluteEpsilon",i),e===t||t$$(e)&&t$$(t)&&Math.abs(e.west-t.west)<=i&&Math.abs(e.south-t.south)<=i&&Math.abs(e.east-t.east)<=i&&Math.abs(e.north-t.north)<=i},s$1p.prototype.clone=function(e){return s$1p.clone(this,e)},s$1p.prototype.equals=function(e){return s$1p.equals(this,e)},s$1p.equals=function(e,t){return e===t||t$$(e)&&t$$(t)&&e.west===t.west&&e.south===t.south&&e.east===t.east&&e.north===t.north},s$1p.prototype.equalsEpsilon=function(e,t){return n$1e.typeOf.number("epsilon",t),s$1p.equalsEpsilon(this,e,t)},s$1p.validate=function(e){n$1e.typeOf.object("rectangle",e);var t=e.north;n$1e.typeOf.number.greaterThanOrEquals("north",t,-n$1d.PI_OVER_TWO),n$1e.typeOf.number.lessThanOrEquals("north",t,n$1d.PI_OVER_TWO);var i=e.south;n$1e.typeOf.number.greaterThanOrEquals("south",i,-n$1d.PI_OVER_TWO),n$1e.typeOf.number.lessThanOrEquals("south",i,n$1d.PI_OVER_TWO);var n=e.west;n$1e.typeOf.number.greaterThanOrEquals("west",n,-Math.PI),n$1e.typeOf.number.lessThanOrEquals("west",n,Math.PI);var r=e.east;n$1e.typeOf.number.greaterThanOrEquals("east",r,-Math.PI),n$1e.typeOf.number.lessThanOrEquals("east",r,Math.PI)},s$1p.southwest=function(e,t){return n$1e.typeOf.object("rectangle",e),t$$(t)?(t.longitude=e.west,t.latitude=e.south,t.height=0,t):new i$1g(e.west,e.south)},s$1p.northwest=function(e,t){return n$1e.typeOf.object("rectangle",e),t$$(t)?(t.longitude=e.west,t.latitude=e.north,t.height=0,t):new i$1g(e.west,e.north)},s$1p.northeast=function(e,t){return n$1e.typeOf.object("rectangle",e),t$$(t)?(t.longitude=e.east,t.latitude=e.north,t.height=0,t):new i$1g(e.east,e.north)},s$1p.southeast=function(e,t){return n$1e.typeOf.object("rectangle",e),t$$(t)?(t.longitude=e.east,t.latitude=e.south,t.height=0,t):new i$1g(e.east,e.south)},s$1p.center=function(e,t){n$1e.typeOf.object("rectangle",e);var i=e.east,n=e.west;i0?n+=n$1d.TWO_PI:o0&&(o+=n$1d.TWO_PI),n=c))return t$$(i)?(i.west=s,i.south=u,i.east=l,i.north=c,i):new s$1p(s,u,l,c)}},s$1p.simpleIntersection=function(e,t,i){n$1e.typeOf.object("rectangle",e),n$1e.typeOf.object("otherRectangle",t);var n=Math.max(e.west,t.west),r=Math.max(e.south,t.south),o=Math.min(e.east,t.east),a=Math.min(e.north,t.north);if(!(r>=a||n>=o))return t$$(i)?(i.west=n,i.south=r,i.east=o,i.north=a,i):new s$1p(n,r,o,a)},s$1p.union=function(e,t,i){n$1e.typeOf.object("rectangle",e),n$1e.typeOf.object("otherRectangle",t),t$$(i)||(i=new s$1p);var n=e.east,r=e.west,o=t.east,a=t.west;n0?n+=n$1d.TWO_PI:o0&&(o+=n$1d.TWO_PI),nr||n$1d.equalsEpsilon(i,r,n$1d.EPSILON14))&&(i=e.south&&n<=e.north};var _$1g=new i$1g;s$1p.subsample=function(e,t,i,n){n$1e.typeOf.object("rectangle",e),t=e$1Y(t,n$1c.WGS84),i=e$1Y(i,0),t$$(n)||(n=[]);var r=0,o=e.north,a=e.south,s=e.east,l=e.west,u=_$1g;u.height=i,u.longitude=l,u.latitude=o,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=s,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.latitude=a,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=l,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.latitude=o<0?o:a>0?a:0;for(var c=1;c<8;++c)u.longitude=-Math.PI+c*n$1d.PI_OVER_TWO,s$1p.contains(e,u)&&(n[r]=t.cartographicToCartesian(u,n[r]),r++);return 0===u.latitude&&(u.longitude=l,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=s,n[r]=t.cartographicToCartesian(u,n[r]),r++),n.length=r,n};var w$1d=new i$1g;function c$19(e,t){this.center=a$11.clone(e$1Y(e,a$11.ZERO)),this.radius=e$1Y(t,0)}s$1p.prototype.contains=function(e){return s$1p.contains(this,s$1p.southwest(e,w$1d))&&s$1p.contains(this,s$1p.northwest(e,w$1d))&&s$1p.contains(this,s$1p.southeast(e,w$1d))&&s$1p.contains(this,s$1p.northeast(e,w$1d))},s$1p.MAX_VALUE=Object.freeze(new s$1p(-Math.PI,-n$1d.PI_OVER_TWO,Math.PI,n$1d.PI_OVER_TWO));var M$1l=new a$11,_$1f=new a$11,L$1c=new a$11,X$Z=new a$11,F$1e=new a$11,J$18=new a$11,K$_=new a$11,O$14=new a$11,Q$17=new a$11,Y$$=new a$11,$$12=new a$11,ee$G=new a$11,se$C=4/3*n$1d.PI;c$19.fromPoints=function(e,t){if(t$$(t)||(t=new c$19),!t$$(e)||0===e.length)return t.center=a$11.clone(a$11.ZERO,t.center),t.radius=0,t;var i,n=a$11.clone(e[0],K$_),r=a$11.clone(n,M$1l),o=a$11.clone(n,_$1f),a=a$11.clone(n,L$1c),s=a$11.clone(n,X$Z),l=a$11.clone(n,F$1e),u=a$11.clone(n,J$18),c=e.length;for(i=1;is.x&&a$11.clone(n,s),dl.y&&a$11.clone(n,l),fu.z&&a$11.clone(n,u)}var p=a$11.magnitudeSquared(a$11.subtract(s,r,O$14)),_=a$11.magnitudeSquared(a$11.subtract(l,o,O$14)),m=a$11.magnitudeSquared(a$11.subtract(u,a,O$14)),$=r,g=s,y=p;_>y&&(y=_,$=o,g=l),m>y&&(y=m,$=a,g=u);var v=Q$17;v.x=.5*($.x+g.x),v.y=.5*($.y+g.y),v.z=.5*($.z+g.z);var x=a$11.magnitudeSquared(a$11.subtract(g,v,O$14)),b=Math.sqrt(x),S=Y$$;S.x=r.x,S.y=o.y,S.z=a.z;var w=$$12;w.x=s.x,w.y=l.y,w.z=u.z;var C=a$11.midpoint(S,w,ee$G),T=0;for(i=0;iT&&(T=P);var E=a$11.magnitudeSquared(a$11.subtract(n,v,O$14));if(E>x){var A=Math.sqrt(E);x=(b=.5*(b+A))*b;var L=A-b;v.x=(b*v.x+L*n.x)/A,v.y=(b*v.y+L*n.y)/A,v.z=(b*v.z+L*n.z)/A}}return bu.x&&a$11.clone(r,u),pc.y&&a$11.clone(r,c),_h.z&&a$11.clone(r,h)}var m=a$11.magnitudeSquared(a$11.subtract(u,a,O$14)),$=a$11.magnitudeSquared(a$11.subtract(c,s,O$14)),g=a$11.magnitudeSquared(a$11.subtract(h,l,O$14)),y=a,v=u,x=m;$>x&&(x=$,y=s,v=c),g>x&&(x=g,y=l,v=h);var b=Q$17;b.x=.5*(y.x+v.x),b.y=.5*(y.y+v.y),b.z=.5*(y.z+v.z);var S=a$11.magnitudeSquared(a$11.subtract(v,b,O$14)),w=Math.sqrt(S),C=Y$$;C.x=a.x,C.y=s.y,C.z=l.z;var T=$$12;T.x=u.x,T.y=c.y,T.z=h.z;var P=a$11.midpoint(C,T,ee$G),E=0;for(o=0;oE&&(E=A);var L=a$11.magnitudeSquared(a$11.subtract(r,b,O$14));if(L>S){var M=Math.sqrt(L);S=(w=.5*(w+M))*w;var I=M-w;b.x=(w*b.x+I*r.x)/M,b.y=(w*b.y+I*r.y)/M,b.z=(w*b.z+I*r.z)/M}}return wl.x&&a$11.clone(n,l),fu.y&&a$11.clone(n,u),pc.z&&a$11.clone(n,c)}var _=a$11.magnitudeSquared(a$11.subtract(l,o,O$14)),m=a$11.magnitudeSquared(a$11.subtract(u,a,O$14)),$=a$11.magnitudeSquared(a$11.subtract(c,s,O$14)),g=o,y=l,v=_;m>v&&(v=m,g=a,y=u),$>v&&(v=$,g=s,y=c);var x=Q$17;x.x=.5*(g.x+y.x),x.y=.5*(g.y+y.y),x.z=.5*(g.z+y.z);var b=a$11.magnitudeSquared(a$11.subtract(y,x,O$14)),S=Math.sqrt(b),w=Y$$;w.x=o.x,w.y=a.y,w.z=s.z;var C=$$12;C.x=l.x,C.y=u.y,C.z=c.z;var T=a$11.midpoint(w,C,ee$G),P=0;for(r=0;rP&&(P=E);var A=a$11.magnitudeSquared(a$11.subtract(n,x,O$14));if(A>b){var L=Math.sqrt(A);b=(S=.5*(S+L))*S;var M=L-S;x.x=(S*x.x+M*n.x)/L,x.y=(S*x.y+M*n.y)/L,x.z=(S*x.z+M*n.z)/L}}return S=l+a)return e.clone(i),i;if(a>=l+r)return t.clone(i),i;var u=.5*(r+l+a),c=a$11.multiplyByScalar(s,(-r+u)/l,he$A);return a$11.add(c,n,c),a$11.clone(c,i.center),i.radius=u,i};var we$q=new a$11;c$19.expand=function(e,t,i){n$1e.typeOf.object("sphere",e),n$1e.typeOf.object("point",t),i=c$19.clone(e,i);var n=a$11.magnitude(a$11.subtract(t,i.center,we$q));return n>i.radius&&(i.radius=n),i},c$19.intersectPlane=function(e,t){n$1e.typeOf.object("sphere",e),n$1e.typeOf.object("plane",t);var i=e.center,n=e.radius,r=t.normal,o=a$11.dot(r,i)+t.distance;return o<-n?cr$4.OUTSIDE:o>>0,o=Math.max(0,Math.min(t,f)),s=[],a=f-o+1,l=[],u=k$1a(),o)for(d=u.progress,h=function(e){l.push(e),--a||(c=h=M$1k,u.reject(l))},c=function(e){s.push(e),--o||(c=h=M$1k,u.resolve(s))},p=0;p>>0,h=e.length>>>0,r=[],o=[],u=(a=k$1a()).progress,l=function(e){o.push(e),--h||(s=l=M$1k,a.resolve(r))},s=function(e,t){r[t]=e,--h||(s=l=M$1k,a.resolve(r))},d=0;d>>0,i=[],s=k$1a(),r)for(o=function(e,n){c$18(e,t).then((function(e){i[n]=e,--r||s.resolve(i)}),s.reject)},a=0;a2;return c$18(e,(function(e){return e=n?i:e,t.resolve(e),e}),(function(e){return t.reject(e),d$19(e)}),t.progress)}function D$1d(e,t){for(var i,n=0;i=e[n++];)i(t)}function S$_(e,t){for(var i,n=t.length;n>e;)if(null!=(i=t[--n])&&"function"!=typeof i)throw new Error("arg "+n+" must be a function")}function M$1k(){}function G$15(e){return e}function e$1W(e,t){if(null===e||"object"!=typeof e)return e;t=e$1Y(t,!1);var i=new e.constructor;for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t&&(r=e$1W(r,t)),i[n]=r}return i}function s$1n(e,t,i){i=e$1Y(i,!1);var n,r,o,a={},s=t$$(e),l=t$$(t);if(s)for(n in e)e.hasOwnProperty(n)&&(r=e[n],l&&i&&"object"==typeof r&&t.hasOwnProperty(n)?(o=t[n],a[n]="object"==typeof o?s$1n(r,o,i):r):a[n]=r);if(l)for(n in t)t.hasOwnProperty(n)&&!a.hasOwnProperty(n)&&(o=t[n],a[n]=o);return a}function o$17(e,t){if(!t$$(e))throw new t$_("uri is required.");var i="",n=e.lastIndexOf("/");return-1!==n&&(i=e.substring(0,n+1)),t&&(t$$((e=new h$1f(e)).query)&&(i+="?"+e.query),t$$(e.fragment)&&(i+="#"+e.fragment)),i}function a$_(e){if(!t$$(e))throw new t$_("uri is required.");var t=new h$1f(e);t.normalize();var i=t.path,n=i.lastIndexOf("/");return-1!==n&&(i=i.substr(n+1)),n=i.lastIndexOf("."),i=-1===n?"":i.substr(n+1)}h$1f.prototype.resolve=function(e){var t=new h$1f;return this.scheme?(t.scheme=this.scheme,t.authority=this.authority,t.path=this.path,t.query=this.query):(t.scheme=e.scheme,this.authority?(t.authority=this.authority,t.path=this.path,t.query=this.query):(t.authority=e.authority,""==this.path?(t.path=e.path,t.query=this.query||e.query):("/"==this.path.charAt(0)?(t.path=this.path,t.removeDotSegments()):(e.authority&&""==e.path?t.path="/"+this.path:t.path=e.path.substring(0,e.path.lastIndexOf("/")+1)+this.path,t.removeDotSegments()),t.query=this.query))),t.fragment=this.fragment,t},h$1f.prototype.removeDotSegments=function(){var e,t=this.path.split("/"),i=[],n=""==t[0];n&&t.shift();for(""==t[0]&&t.shift();t.length;)".."==(e=t.shift())?i.pop():"."!=e&&i.push(e);("."==e||".."==e)&&i.push(""),n&&i.unshift(""),this.path=i.join("/")},h$1f.prototype.toString=function(){var e="";return this.scheme&&(e+=this.scheme+":"),this.authority&&(e+="//"+this.authority),e+=this.path,this.query&&(e+="?"+this.query),this.fragment&&(e+="#"+this.fragment),e},i$1d._implementation=function(e,t,i){if(!t$$(e))throw new t$_("relative uri is required.");if(!t$$(t)){if(typeof i>"u")return e;t=e$1Y(i.baseURI,i.location.href)}var n=new h$1f(t);return new h$1f(e).resolve(n).toString()},c$18.defer=k$1a,c$18.resolve=b$1w,c$18.reject=L$1b,c$18.join=U$17,c$18.all=B$Y,c$18.map=P$15,c$18.reduce=_$1e,c$18.any=R$10,c$18.some=A$1g,c$18.allSettled=Q$16,c$18.chain=C$1b,c$18.isPromise=z$Y,E$1e.prototype={always:function(e,t){return this.then(e,e,t)},otherwise:function(e){return this.then(O$13,e)},yield:function(e){return this.then((function(){return e}))},spread:function(e){return this.then((function(t){return B$Y(t,(function(t){return e.apply(O$13,t)}))}))}},q$1i=[].slice,T$18=[].reduce||function(e){var t,i,n,r,o;if(o=0,r=(t=Object(this)).length>>>0,(i=arguments).length<=1)for(;;){if(o in t){n=t[o++];break}if(++o>=r)throw new TypeError}else n=i[1];for(;o2){var a=i[n].indexOf("=");o=[i[n].substring(0,a),i[n].substring(a+1,i[n].length)]}var s=decodeURIComponent(o[0]),l=o[1];l=t$$(l)?decodeURIComponent(l):"";var u=t[s];"string"==typeof u?t[s]=[u,l]:Array.isArray(u)?u.push(l):t[s]=l}return t}var E$1d={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5},Y$_=Object.freeze(E$1d),e$1T={TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3,PACK:4,BLOCK:5,BLOCKPACK:6},V$_=Object.freeze(e$1T),e$1R;function r$V(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT);var t=e$1Y(e.throttleByServer,!1),i=e$1Y(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=e$1Y(e.priority,0),this.throttle=i,this.throttleByServer=t,this.type=e$1Y(e.type,V$_.OTHER),this.serverKey=void 0,this.state=Y$_.UNISSUED,this.deferred=void 0,this.cancelled=!1}function s$1m(e){var t={};if(!e)return t;for(var i=e.split("\r\n"),n=0;n0){var a=r.substring(0,o),s=r.substring(o+2);t[a]=s}}return t}function e$1S(e,t,i){this.statusCode=e,this.response=t,this.responseHeaders=i,"string"==typeof this.responseHeaders&&(this.responseHeaders=s$1m(this.responseHeaders))}function o$15(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}function f$1a(e,t){return t-e}function o$14(e){n$1e.typeOf.object("options",e),n$1e.defined("options.comparator",e.comparator),this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}function f$19(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}r$V.prototype.cancel=function(){this.cancelled=!0},r$V.prototype.clone=function(e){return t$$(e)?(e.url=this.url,e.requestFunction=this.requestFunction,e.cancelFunction=this.cancelFunction,e.priorityFunction=this.priorityFunction,e.priority=this.priority,e.throttle=this.throttle,e.throttleByServer=this.throttleByServer,e.type=this.type,e.serverKey=this.serverKey,e.state=this.RequestState.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new r$V(this)},e$1S.prototype.toString=function(){var e="Request has failed.";return t$$(this.statusCode)&&(e+=" Status Code: "+this.statusCode),e},Object.defineProperties(o$15.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}}),o$15.prototype.addEventListener=function(e,t){n$1e.typeOf.func("listener",e),this._listeners.push(e),this._scopes.push(t);var i=this;return function(){i.removeEventListener(e,t)}},o$15.prototype.removeEventListener=function(e,t){n$1e.typeOf.func("listener",e);for(var i=this._listeners,n=this._scopes,r=-1,o=0;o0){for(o.sort(f$1a),e=0;ee&&e>0&&(this._length=e,this._array.length=e)}},comparator:{get:function(){return this._comparator}}}),o$14.prototype.reserve=function(e){e=e$1Y(e,this._length),this._array.length=e},o$14.prototype.heapify=function(e){e=e$1Y(e,0);for(var t=this._length,i=this._comparator,n=this._array,r=-1,o=!0;o;){var a=2*(e+1),s=a-1;r=s=0;--t)this.heapify(t)},o$14.prototype.insert=function(e){n$1e.defined("element",e);var t,i=this._array,n=this._comparator,r=this._maximumLength,o=this._length++;for(or&&(t=i[r],i.pop(),this._length=r),t},o$14.prototype.pop=function(e){if(e=e$1Y(e,0),0!==this._length){n$1e.typeOf.number.lessThan("index",e,this._length);var t=this._array,i=t[e];return f$19(t,e,--this._length),t[this._length]=void 0,this.heapify(e),i}},e$1R=typeof performance<"u"&&"function"==typeof performance.now&&isFinite(performance.now())?function(){return performance.now()}:function(){return Date.now()};var yt$9=e$1R;function S$Z(e,t){return e.priority-t.priority}var s$1l={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0,totalRequestTime:0},y$17=20,o$13=new o$14({comparator:S$Z});o$13.maximumLength=y$17,o$13.reserve(y$17);var f$18=[],p$1l={},T$17=typeof document<"u"?new h$1f(document.location.href):new h$1f,K$Z=new o$15;function r$U(){}function A$1f(e){t$$(e.priorityFunction)&&(e.priority=e.priorityFunction())}function C$1a(e){var t=e$1Y(r$U.requestsByServer[e],r$U.maximumRequestsPerServer);return p$1l[e]0||e.type!==V$_.OTHER)&&(s$1l.totalRequestTime+=e.endTime-e.startTime),e.type===V$_.BLOCK||e.type===V$_.BLOCKPACK)){var i=L$1a(e);t$$(r$U.blockDefer[i])&&(r$U.blockDefer[i]=void 0,delete r$U.blockDefer[i])}}}function M$1j(e){return function(t){e.state!==Y$_.CANCELLED&&(++s$1l.numberOfFailedRequests,--s$1l.numberOfActiveRequests,--p$1l[e.serverKey],K$Z.raiseEvent(t),e.state=Y$_.FAILED,e.deferred.reject(t))}}function h$1d(e,t){var i=x$1l(e);return e.state=Y$_.ACTIVE,f$18.push(e),++s$1l.numberOfActiveRequests,++s$1l.numberOfActiveRequestsEver,++p$1l[e.serverKey],e.startTime=yt$9(),e.requestFunction(t).then(_$1d(e)).otherwise(M$1j(e)),i}function q$1h(e){var t=e.state===Y$_.ACTIVE;e.state=Y$_.CANCELLED,++s$1l.numberOfCancelledRequests,e.deferred.reject(),t&&(--s$1l.numberOfActiveRequests,--p$1l[e.serverKey],++s$1l.numberOfCancelledActiveRequests),t$$(e.cancelFunction)&&e.cancelFunction()}function z$X(){for(var e in r$U.packRequestHeap)if(r$U.packRequestHeap.hasOwnProperty(e)){for(var t=r$U.packRequestHeap[e],i=t.internalArray,n=t.length,r=0;r0;){var i=t.pop();i.cancelled?q$1h(i):w$1c(i)}G$14()}function W$1d(e){var t=g$_(e),i=r$U.packRequestHeap[t];return t$$(i)||((i=r$U.packRequestHeap[t]=new o$14({comparator:S$Z})).maximumLength=r$U.perPacketCount,i.reserve(y$17)),i}function X$Y(){!r$U.debugShowStatistics||(0===s$1l.numberOfActiveRequests&&s$1l.lastNumberOfActiveRequests>0&&(s$1l.numberOfAttemptedRequests>0&&(console.log("Number of attempted requests: "+s$1l.numberOfAttemptedRequests),s$1l.numberOfAttemptedRequests=0),s$1l.numberOfCancelledRequests>0&&(console.log("Number of cancelled requests: "+s$1l.numberOfCancelledRequests),s$1l.numberOfCancelledRequests=0),s$1l.numberOfCancelledActiveRequests>0&&(console.log("Number of cancelled active requests: "+s$1l.numberOfCancelledActiveRequests),s$1l.numberOfCancelledActiveRequests=0),s$1l.numberOfFailedRequests>0&&(console.log("Number of failed requests: "+s$1l.numberOfFailedRequests),s$1l.numberOfFailedRequests=0)),s$1l.lastNumberOfActiveRequests=s$1l.numberOfActiveRequests)}r$U.TIMEOUT=5e3,r$U.CANCLE_COUNT=3,r$U.statisticRequestTime=-1,r$U.maximumRequests=50,r$U.maximumRequestsPerServer=6,r$U.perPacketCount=20,r$U.requestsByServer={"api.cesium.com:443":18,"assets.cesium.com:443":18},r$U.throttleRequests=!0,r$U.debugShowStatistics=!1,r$U.requestCompletedEvent=K$Z,Object.defineProperties(r$U,{activeRequestLength:{get:function(){return f$18.length}},statistics:{get:function(){return s$1l}},priorityHeapLength:{get:function(){return y$17},set:function(e){if(ee;){q$1h(o$13.pop())}y$17=e,o$13.maximumLength=e,o$13.reserve(e)}}}),r$U.packRequestGroup={},r$U.packRequestPromise={},r$U.packRequestQuadKey={},r$U.quadKeyIndex={},r$U.packRequestHeap={},r$U.blockDefer={},r$U.blockRequest={},r$U.update=function(){var e,t,i=0,n=f$18.length;for(e=0;e0&&(f$18[e-i]=t):++i;f$18.length-=i;var r=o$13.internalArray,o=o$13.length;for(e=0;e0;)(t=o$13.pop()).cancelled?q$1h(t):!t.throttleByServer||C$1a(t.serverKey)?(h$1d(t),++s):q$1h(t);X$Y()},r$U.getServerKey=function(e){n$1e.typeOf.string("url",e);var t=new h$1f(e).resolve(T$17);t.normalize();var i=t.authority;return/:/.test(i)||(i=i+":"+("https"===t.scheme?"443":"80")),t$$(p$1l[i])||(p$1l[i]=0),i},r$U.request=function(e){if(n$1e.typeOf.object("request",e),n$1e.typeOf.string("request.url",e.url),n$1e.typeOf.func("request.requestFunction",e.requestFunction),a$Z(e.url)||i$1c(e.url))return K$Z.raiseEvent(),e.state=Y$_.RECEIVED,e.requestFunction();if(++s$1l.numberOfAttemptedRequests,t$$(e.serverKey)||(e.serverKey=r$U.getServerKey(e.url)),e.type===V$_.BLOCK)return B$X(e);if(!e.throttleByServer||C$1a(e.serverKey)){if(!r$U.throttleRequests||!e.throttle)return h$1d(e);if(!(f$18.length>=r$U.maximumRequests)){var t;if(A$1f(e),e.type===V$_.PACK||e.type===V$_.BLOCKPACK){var i=W$1d(e),n=!0;if(e.type===V$_.BLOCKPACK)for(var r=0;r0;){q$1h(o$13.pop())}for(var e=f$18.length,t=0;t0}}}),t$X.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;var i=new h$1f(this._url);e&&re$J(i,this);var n=i.toString().replace(/%7B/g,"{").replace(/%7D/g,"}"),r=this._templateValues;return n=n.replace(/{(.*?)}/g,(function(e,t){var i=r[t];return t$$(i)&&"s"==t?encodeURI(i):t$$(i)?encodeURIComponent(i):e})),t&&t$$(this.proxy)&&(n=this.proxy.getURL(n)),n},t$X.prototype.setQueryParameters=function(e,t){this._queryParameters=t?U$15(this._queryParameters,e,!1):U$15(e,this._queryParameters,!1)},t$X.prototype.appendQueryParameters=function(e){this._queryParameters=U$15(e,this._queryParameters,!0)},t$X.prototype.setTemplateValues=function(e,t){this._templateValues=t?s$1n(this._templateValues,e):s$1n(e,this._templateValues)},t$X.prototype.getDerivedResource=function(e){var t=this.clone();if(t._retryCount=0,t$$(e.url)){var i=new h$1f(e.url);M$1i(i,t,!0,e$1Y(e.preserveQueryParameters,!1)),i.fragment=void 0,t._url=i.resolve(new h$1f(i$1d(this._url))).toString()}return t$$(e.queryParameters)&&(t._queryParameters=s$1n(e.queryParameters,t._queryParameters)),t$$(e.templateValues)&&(t._templateValues=s$1n(e.templateValues,t.templateValues)),t$$(e.headers)&&(t.headers=s$1n(e.headers,t.headers)),t$$(e.proxy)&&(t.proxy=e.proxy),t$$(e.request)&&(t.request=e.request),t$$(e.retryCallback)&&(t.retryCallback=e.retryCallback),t$$(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t},t$X.prototype.retryOnError=function(e){var t=this.retryCallback;if("function"!=typeof t||this._retryCount>=this.retryAttempts)return c$18(!1);var i=this;return c$18(t(this,e)).then((function(e){return++i._retryCount,e}))},t$X.prototype.clone=function(e){return t$$(e)||(e=new t$X({url:this._url})),e._url=this._url,e._queryParameters=e$1W(this._queryParameters),e._templateValues=e$1W(this._templateValues),e.headers=e$1W(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e},t$X.prototype.getBaseUri=function(e){return o$17(this.getUrlComponent(e),e)},t$X.prototype.appendForwardSlash=function(){this._url=e$1Z(this._url)},t$X.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},t$X.fetchArrayBuffer=function(e){return new t$X(e).fetchArrayBuffer()},t$X.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},t$X.fetchBlob=function(e){return new t$X(e).fetchBlob()},t$X.prototype.fetchImage=function(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT);var t=e$1Y(e.preferImageBitmap,!1),i=e$1Y(e.preferBlob,!1),n=e$1Y(e.flipY,!1);if(j$1a(this.request),!k$19||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!i)return x$1k({resource:this,flipY:n,preferImageBitmap:t});var r,o,a,s=this.fetchBlob();return t$$(s)?t$X.supportsImageBitmapOptions().then((function(e){return r=e&&t,s})).then((function(e){if(t$$(e)){if(a=e,r)return t$X.createImageBitmapFromBlob(e,{flipY:n,premultiplyAlpha:!1});var t=window.URL.createObjectURL(e);return x$1k({resource:o=new t$X({url:t}),flipY:n,preferImageBitmap:!1})}})).then((function(e){if(t$$(e))return e.blob=a,r||window.URL.revokeObjectURL(o.url),e})).otherwise((function(e){return t$$(o)&&window.URL.revokeObjectURL(o.url),e.blob=a,c$18.reject(e)})):void 0},t$X.fetchImage=function(e){return new t$X(e).fetchImage({flipY:e.flipY,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})},t$X.prototype.fetchText=function(){return this.fetch({responseType:"text"})},t$X.fetchText=function(e){return new t$X(e).fetchText()},t$X.prototype.fetchJson=function(){var e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(t$$(e))return e.then((function(e){if(t$$(e))return JSON.parse(e)}))},t$X.fetchJson=function(e){return new t$X(e).fetchJson()},t$X.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},t$X.fetchXML=function(e){return new t$X(e).fetchXML()},t$X.prototype.fetchJsonp=function(e){var t;e=e$1Y(e,"callback"),j$1a(this.request);do{t="loadJsonp"+Math.random().toString().substring(2,8)}while(t$$(window[t]));return L$19(this,e,t)},t$X.fetchJsonp=function(e){return new t$X(e).fetchJsonp(e.callbackParameterName)},t$X.prototype._makeRequest=function(e){var t=this;j$1a(t.request);var i=t.request;i.url=t.url,i.requestFunction=function(n){var r=e.responseType,o=s$1n(e.headers,t.headers),a=e.overrideMimeType,s=e.method,l=e.data,u=c$18.defer(),c=t$$(n)?n:t.url,h=t$X._Implementations.loadWithXhr(c,r,s,l,o,u,a);return t$$(h)&&t$$(h.abort)&&(i.cancelFunction=function(){h.abort()}),u.promise};var n=r$U.request(i);if(t$$(n))return n.then((function(e){return e})).otherwise((function(n){return i.state!==Y$_.FAILED?c$18.reject(n):t.retryOnError(n).then((function(r){return r?(i.state=Y$_.UNISSUED,i.deferred=void 0,t.fetch(e)):c$18.reject(n)}))}))};var te$G=/^data:(.*?)(;base64)?,(.*)$/;function P$14(e,t){var i=decodeURIComponent(t);return e?atob(i):i}function V$Y(e,t){for(var i=P$14(e,t),n=new ArrayBuffer(i.length),r=new Uint8Array(n),o=0;o=300)o.reject(new e$1S(e.statusCode,e,e.headers));else{var i=[];e.on("data",(function(e){i.push(e)})),e.on("end",(function(){var n=Buffer.concat(i);"gzip"===e.headers["content-encoding"]?u.gunzip(n,(function(e,i){e?o.reject(new t$Z("Error decompressing response.")):o.resolve(J$16(i,t))})):o.resolve(J$16(n,t))}))}})).on("error",(function(e){o.reject(new e$1S)})).end()}t$X.prototype.fetch=function(e){return(e=v$18(e,{})).method="GET",this._makeRequest(e)},t$X.fetch=function(e){return new t$X(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$X.prototype.delete=function(e){return(e=v$18(e,{})).method="DELETE",this._makeRequest(e)},t$X.delete=function(e){return new t$X(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})},t$X.prototype.head=function(e){return(e=v$18(e,{})).method="HEAD",this._makeRequest(e)},t$X.head=function(e){return new t$X(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$X.prototype.options=function(e){return(e=v$18(e,{})).method="OPTIONS",this._makeRequest(e)},t$X.options=function(e){return new t$X(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$X.prototype.post=function(e,t){return n$1e.defined("data",e),(t=v$18(t,{})).method="POST",t.data=e,this._makeRequest(t)},t$X.post=function(e){return new t$X(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$X.prototype.put=function(e,t){return n$1e.defined("data",e),(t=v$18(t,{})).method="PUT",t.data=e,this._makeRequest(t)},t$X.put=function(e){return new t$X(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$X.prototype.patch=function(e,t){return n$1e.defined("data",e),(t=v$18(t,{})).method="PATCH",t.data=e,this._makeRequest(t)},t$X.patch=function(e){return new t$X(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$X._Implementations={},t$X._Implementations.createImage=function(e,t,i,n,r){var o=e.url;t$X.supportsImageBitmapOptions().then((function(a){if(a&&r){var s=c$18.defer(),l=t$X._Implementations.loadWithXhr(o,"blob","GET",void 0,void 0,s,void 0,void 0,void 0);return t$$(l)&&t$$(l.abort)&&(e.cancelFunction=function(){l.abort()}),s.promise.then((function(e){if(t$$(e))return t$X.createImageBitmapFromBlob(e,{flipY:n,premultiplyAlpha:!1});i.reject(new t$Z("Successfully retrieved "+o+" but it contained no content."))})).then(i.resolve)}oe$C(o,t,i)})).otherwise(i.reject)},t$X.createImageBitmapFromBlob=function(e,t){return n$1e.defined("options",t),n$1e.typeOf.bool("options.flipY",t.flipY),n$1e.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none"})};var se$B=typeof XMLHttpRequest>"u";t$X._Implementations.loadWithXhr=function(e,t,i,n,r,o,a){var s=te$G.exec(e);if(null===s){if(!se$B){var l=new XMLHttpRequest;if(a$X.contains(e)&&(l.withCredentials=!0),e=e.replace(/{/g,"%7B").replace(/}/g,"%7D"),l.open(i,e,!0),t$$(a)&&t$$(l.overrideMimeType)&&l.overrideMimeType(a),t$$(r))for(var u in r)r.hasOwnProperty(u)&&l.setRequestHeader(u,r[u]);t$$(t)&&(l.responseType=t);var c=!1;return"string"==typeof e&&(c=0===e.indexOf("file://")||typeof window<"u"&&"file://"===window.location.origin),l.onload=function(){if(!(l.status<200||l.status>=300)||c&&0===l.status){var e=l.response,n=l.responseType;if("HEAD"===i||"OPTIONS"===i){var r=l.getAllResponseHeaders().trim().split(/[\r\n]+/),a={};return r.forEach((function(e){var t=e.split(": "),i=t.shift();a[i]=t.join(": ")})),void o.resolve(a)}if(204===l.status)o.resolve();else if(!t$$(e)||t$$(t)&&n!==t)if("json"===t&&"string"==typeof e)try{o.resolve(JSON.parse(e))}catch(e){o.reject(e)}else(""===n||"document"===n)&&t$$(l.responseXML)&&l.responseXML.hasChildNodes()?o.resolve(l.responseXML):""!==n&&"text"!==n||!t$$(l.responseText)?o.reject(new t$Z("Invalid XMLHttpRequest response type.")):o.resolve(l.responseText);else o.resolve(e)}else o.reject(new e$1S(l.status,l.response,l.getAllResponseHeaders()))},l.onerror=function(e){o.reject(new e$1S)},l.send(n),l}ie$G(e,t,i,n,r,o)}else o.resolve(ne$D(s,t))},t$X._Implementations.loadAndExecuteScript=function(e,t,i){return d$18(e).otherwise(i.reject)},t$X._DefaultImplementations={},t$X._DefaultImplementations.createImage=t$X._Implementations.createImage,t$X._DefaultImplementations.loadWithXhr=t$X._Implementations.loadWithXhr,t$X._DefaultImplementations.loadAndExecuteScript=t$X._Implementations.loadAndExecuteScript,t$X.DEFAULT=Object.freeze(new t$X({url:typeof document>"u"?"":document.location.href.split("?")[0]}));var l$16=/((?:.*\/)|^)Cesium\.js$/,i$1a,n$19,u$17;function g$Z(){for(var e=document.getElementsByTagName("script"),t=0,i=e.length;t"u"?e:(t$$(i$1a)||(i$1a=document.createElement("a")),i$1a.href=e,i$1a.href=i$1a.href,i$1a.href)}function c$17(){if(t$$(n$19))return n$19;var e;if(e=typeof CESIUM_BASE_URL<"u"?CESIUM_BASE_URL:"object"==typeof define&&t$$(define.amd)&&!define.amd.toUrlUndefined&&t$$(require.toUrl)?i$1d("..",o$12("Core/buildModuleUrl.js")):g$Z(),!t$$(e))throw new t$_("Unable to determine Cesium base URL automatically, try defining a global variable called CESIUM_BASE_URL.");return(n$19=new t$X({url:d$17(e)})).appendForwardSlash(),n$19}function b$1v(e){return d$17(require.toUrl("../"+e))}function m$18(e){return c$17().getDerivedResource({url:e}).url}function o$12(e){return t$$(u$17)||(u$17="object"==typeof define&&t$$(define.amd)&&!define.amd.toUrlUndefined&&t$$(require.toUrl)?b$1v:m$18),u$17(e)}function r$T(e,t){this.x=e$1Y(e,0),this.y=e$1Y(t,0)}o$12._cesiumScriptRegex=l$16,o$12._buildModuleUrlFromBaseUrl=m$18,o$12._clearBaseResource=function(){n$19=void 0},o$12.setBaseUrl=function(e){n$19=t$X.DEFAULT.getDerivedResource({url:e})},o$12.getCesiumBaseUrl=c$17,r$T.fromElements=function(e,t,i){return t$$(i)?(i.x=e,i.y=t,i):new r$T(e,t)},r$T.clone=function(e,t){if(t$$(e))return t$$(t)?(t.x=e.x,t.y=e.y,t):new r$T(e.x,e.y)},r$T.fromCartesian3=r$T.clone,r$T.fromCartesian4=r$T.clone,r$T.packedLength=2,r$T.pack=function(e,t,i){return n$1e.typeOf.object("value",e),n$1e.defined("array",t),i=e$1Y(i,0),t[i++]=e.x,t[i]=e.y,t},r$T.unpack=function(e,t,i){return n$1e.defined("array",e),t=e$1Y(t,0),t$$(i)||(i=new r$T),i.x=e[t++],i.y=e[t],i},r$T.packArray=function(e,t){n$1e.defined("array",e);var i=e.length,n=2*i;if(t$$(t)){if(!Array.isArray(t)&&t.length!==n)throw new t$_("If result is a typed array, it must have exactly array.length * 2 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;r=r&&(c=r-1);var h=(n.north-e.latitude)/s|0;return h>=o&&(h=o-1),t$$(i)?(i.x=c,i.y=h,i):new r$T(c,h)}},a$W.prototype.calculateResolution=function(e){var t=.0254*this._scaleDenominators[e-this._beginLevel]/this._customDPI.x,i=.0254*this._scaleDenominators[e-this._beginLevel]/this._customDPI.y,n=n$1c.WGS84.maximumRadius;return new r$T(t/n,i/n)};var T$16=new a$11,M$1h=new a$11,R$$=new i$1g,c$16=new a$11,C$19=new a$11,b$1t=new c$19,D$1c=new a$W,g$Y=[new i$1g,new i$1g,new i$1g,new i$1g],p$1k=new r$T,e$1P={};function y$16(e){i$1g.fromRadians(e.east,e.north,0,g$Y[0]),i$1g.fromRadians(e.west,e.north,0,g$Y[1]),i$1g.fromRadians(e.east,e.south,0,g$Y[2]),i$1g.fromRadians(e.west,e.south,0,g$Y[3]);var t,i=0,n=0,r=0,o=0,a=e$1P._terrainHeightsMaxLevel;for(t=0;t<=a;++t){for(var s=!1,l=0;l<4;++l){var u=g$Y[l];if(D$1c.positionToTileXY(u,t,p$1k),0===l)r=p$1k.x,o=p$1k.y;else if(r!==p$1k.x||o!==p$1k.y){s=!0;break}}if(s)break;i=r,n=o}if(0!==t)return{x:i,y:n,level:t>a?a:t-1}}function I$1e(e){if(e=e$1Y(e,{}),this._ellipsoid=e$1Y(e.ellipsoid,n$1c.WGS84),this._rectangle=e$1Y(e.rectangle,s$1p.MAX_VALUE),this._projection=new s$1q(this._ellipsoid),this._numberOfLevelZeroTilesX=e$1Y(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=e$1Y(e.numberOfLevelZeroTilesY,1),e.hasOwnProperty("tileInfo")&&(this._tileInfo=e.tileInfo),this._tileWidth=e$1Y(e.tileWidth,256),this._tileHeight=e$1Y(e.tileHeight,256),this._beginLevel=0,this._suggest=void 0,t$$(e.resolutions)){this._resolutions=e.resolutions;for(var t=0,i=6378137*Math.PI/this._tileWidth;i>this._resolutions[0];)i*=.5,t++;this._beginLevel=t-1,this._dataBounds=e.dataBounds,this._tileBounds=[];for(var n=this._dataBounds.east-this._tileInfo.origin.x,r=this._tileInfo.origin.y-this._dataBounds.south,o=this._dataBounds.west-this._tileInfo.origin.x,a=this._tileInfo.origin.y-this._dataBounds.north,s=0;s=r&&(d=r-1);var f=((c=t$$(this._resolutions)?this._tileInfo.origin.y:t$$(this._tileInfo)?n$1d.toRadians(this._tileInfo.origin.y):n.north)-e.latitude)/s|0;return t$$(this._resolutions)&&(f=(c-6378137*e.latitude)/s|0,f=n$1d.clamp(f,this._tileBounds[t-this._beginLevel].north,this._tileBounds[t-this._beginLevel].south)),f>=o&&(f=o-1),t$$(i)?(i.x=d,i.y=f,i):new r$T(d,f)}};var pe$v=["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"],fe$w=["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"],he$z=["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"],ge$r=["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmuliscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mpspace","msqrt","mystyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"],ye$t=["#text"],ve$u=["accept","action","align","alt","autocomplete","background","bgcolor","border","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","coords","crossorigin","datetime","default","dir","disabled","download","enctype","face","for","headers","height","hidden","high","href","hreflang","id","integrity","ismap","label","lang","list","loop","low","max","maxlength","media","method","min","multiple","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","type","usemap","valign","value","width","xmlns"],G$13=["accent-height","accumulate","additivive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"],be$x=["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"],O$12=["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"];function i$18(e,t){for(var i=t.length;i--;)"string"==typeof t[i]&&(t[i]=t[i].toLowerCase()),e[t[i]]=!0;return e}function Te$w(e){var t={},i=void 0;for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}var Ue$k=/\{\{[\s\S]*|[\s\S]*\}\}/gm,We$p=/<%[\s\S]*|[\s\S]*%>/gm,je$g=/^data-[\-\w.\u00B7-\uFFFF]/,Be$n=/^aria-[\-\w]+$/,Ge$h=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,qe$j=/^(?:\w+script|data):/i,Ve$m=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,M$1g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function f$17(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t"u"?null:window};function Ae$n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ye$i(),t=function(e){return Ae$n(e)};if(t.version="1.0.8",t.removed=[],!e||!e.document||9!==e.document.nodeType)return t.isSupported=!1,t;var i=e.document,n=!1,r=!1,o=e.document,a=e.DocumentFragment,s=e.HTMLTemplateElement,l=e.Node,u=e.NodeFilter,c=e.NamedNodeMap,h=void 0===c?e.NamedNodeMap||e.MozNamedAttrMap:c,d=e.Text,f=e.Comment,p=e.DOMParser;if("function"==typeof s){var _=o.createElement("template");_.content&&_.content.ownerDocument&&(o=_.content.ownerDocument)}var m=o,$=m.implementation,g=m.createNodeIterator,y=m.getElementsByTagName,v=m.createDocumentFragment,x=i.importNode,b={};t.isSupported=$&&typeof $.createHTMLDocument<"u"&&9!==o.documentMode;var S=Ue$k,w=We$p,C=je$g,T=Be$n,P=qe$j,E=Ve$m,A=Ge$h,L=null,M=i$18({},[].concat(f$17(pe$v),f$17(fe$w),f$17(he$z),f$17(ge$r),f$17(ye$t))),I=null,O=i$18({},[].concat(f$17(ve$u),f$17(G$13),f$17(be$x),f$17(O$12))),D=null,R=null,N=!0,F=!0,B=!1,z=!1,G=!1,k=!1,U=!1,V=!1,W=!1,H=!1,Y=!1,j=!0,q=!0,X=!1,K={},Z=i$18({},["audio","head","math","script","style","template","svg","video"]),J=i$18({},["audio","video","img","source","image"]),Q=i$18({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),ee=null,te=o.createElement("form"),ie=function(e){"object"!==(typeof e>"u"?"undefined":M$1g(e))&&(e={}),L="ALLOWED_TAGS"in e?i$18({},e.ALLOWED_TAGS):M,I="ALLOWED_ATTR"in e?i$18({},e.ALLOWED_ATTR):O,D="FORBID_TAGS"in e?i$18({},e.FORBID_TAGS):{},R="FORBID_ATTR"in e?i$18({},e.FORBID_ATTR):{},K="USE_PROFILES"in e&&e.USE_PROFILES,N=!1!==e.ALLOW_ARIA_ATTR,F=!1!==e.ALLOW_DATA_ATTR,B=e.ALLOW_UNKNOWN_PROTOCOLS||!1,z=e.SAFE_FOR_JQUERY||!1,G=e.SAFE_FOR_TEMPLATES||!1,k=e.WHOLE_DOCUMENT||!1,W=e.RETURN_DOM||!1,H=e.RETURN_DOM_FRAGMENT||!1,Y=e.RETURN_DOM_IMPORT||!1,V=e.FORCE_BODY||!1,j=!1!==e.SANITIZE_DOM,q=!1!==e.KEEP_CONTENT,X=e.IN_PLACE||!1,A=e.ALLOWED_URI_REGEXP||A,G&&(F=!1),H&&(W=!0),K&&(L=i$18({},[].concat(f$17(ye$t))),I=[],!0===K.html&&(i$18(L,pe$v),i$18(I,ve$u)),!0===K.svg&&(i$18(L,fe$w),i$18(I,G$13),i$18(I,O$12)),!0===K.svgFilters&&(i$18(L,he$z),i$18(I,G$13),i$18(I,O$12)),!0===K.mathMl&&(i$18(L,ge$r),i$18(I,be$x),i$18(I,O$12))),e.ADD_TAGS&&(L===M&&(L=Te$w(L)),i$18(L,e.ADD_TAGS)),e.ADD_ATTR&&(I===O&&(I=Te$w(I)),i$18(I,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&i$18(Q,e.ADD_URI_SAFE_ATTR),q&&(L["#text"]=!0),k&&i$18(L,["html","head","body"]),L.table&&i$18(L,["tbody"]),Object&&"freeze"in Object&&Object.freeze(e),ee=e},ne=function(e){t.removed.push({element:e});try{e.parentNode.removeChild(e)}catch{e.outerHTML=""}},re=function(e,i){try{t.removed.push({attribute:i.getAttributeNode(e),from:i})}catch{t.removed.push({attribute:null,from:i})}i.removeAttribute(e)},oe=function(e){var t=void 0,i=void 0;if(V)e=""+e;else{var a=e.match(/^[\s]+/);(i=a&&a[0])&&(e=e.slice(i.length))}if(n)try{t=(new p).parseFromString(e,"text/html")}catch{}if(r&&i$18(D,["title"]),!t||!t.documentElement){var s=(t=$.createHTMLDocument("")).body;s.parentNode.removeChild(s.parentNode.firstElementChild),s.outerHTML=e}return i&&t.body.insertBefore(o.createTextNode(i),t.body.childNodes[0]||null),y.call(t,k?"html":"body")[0]};t.isSupported&&(function(){try{oe('

').querySelector("svg img")&&(n=!0)}catch{}}(),function(){try{oe("</title><img>").querySelector("title").textContent.match(/<\/title/)&&(r=!0)}catch{}}());var ae=function(e){return g.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,(function(){return u.FILTER_ACCEPT}),!1)},se=function(e){return!(e instanceof d||e instanceof f)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof h)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute)},le=function(e){return"object"===(typeof l>"u"?"undefined":M$1g(l))?e instanceof l:e&&"object"===(typeof e>"u"?"undefined":M$1g(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ue=function(e,i,n){!b[e]||b[e].forEach((function(e){e.call(t,i,n,ee)}))},ce=function(e){var i=void 0;if(ue("beforeSanitizeElements",e,null),se(e))return ne(e),!0;var n=e.nodeName.toLowerCase();if(ue("uponSanitizeElement",e,{tagName:n,allowedTags:L}),!L[n]||D[n]){if(q&&!Z[n]&&"function"==typeof e.insertAdjacentHTML)try{e.insertAdjacentHTML("AfterEnd",e.innerHTML)}catch{}return ne(e),!0}return z&&!e.firstElementChild&&(!e.content||!e.content.firstElementChild)&&/</g.test(e.textContent)&&(t.removed.push({element:e.cloneNode()}),e.innerHTML?e.innerHTML=e.innerHTML.replace(/</g,"<"):e.innerHTML=e.textContent.replace(/</g,"<")),G&&3===e.nodeType&&(i=(i=(i=e.textContent).replace(S," ")).replace(w," "),e.textContent!==i&&(t.removed.push({element:e.cloneNode()}),e.textContent=i)),ue("afterSanitizeElements",e,null),!1},he=function(e,t,i){return!(j&&("id"===t||"name"===t)&&(i in o||i in te)||(G&&(i=i.replace(S," "),i=i.replace(w," ")),(!F||!C.test(t))&&(!N||!T.test(t))&&(!I[t]||R[t]||!Q[t]&&!A.test(i.replace(E,""))&&("src"!==t&&"xlink:href"!==t||"script"===e||0!==i.indexOf("data:")||!J[e])&&(!B||P.test(i.replace(E,"")))&&i)))},de=function(e){var i=void 0,n=void 0,r=void 0,o=void 0,a=void 0;ue("beforeSanitizeAttributes",e,null);var s=e.attributes;if(s){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:I};for(a=s.length;a--;){var u=i=s[a],c=u.name,h=u.namespaceURI;if(n=i.value.trim(),r=c.toLowerCase(),l.attrName=r,l.attrValue=n,l.keepAttr=!0,ue("uponSanitizeAttribute",e,l),n=l.attrValue,"name"===r&&"IMG"===e.nodeName&&s.id)o=s.id,s=Array.prototype.slice.apply(s),re("id",e),re(c,e),s.indexOf(o)>a&&e.setAttribute("id",o.value);else{if("INPUT"===e.nodeName&&"type"===r&&"file"===n&&(I[r]||!R[r]))continue;"id"===c&&e.setAttribute(c,""),re(c,e)}if(l.keepAttr){var d=e.nodeName.toLowerCase();if(he(d,r,n))try{h?e.setAttributeNS(h,c,n):e.setAttribute(c,n),t.removed.pop()}catch{}}}ue("afterSanitizeAttributes",e,null)}},fe=function e(t){var i=void 0,n=ae(t);for(ue("beforeSanitizeShadowDOM",t,null);i=n.nextNode();)ue("uponSanitizeShadowNode",i,null),!ce(i)&&(i.content instanceof a&&e(i.content),de(i));ue("afterSanitizeShadowDOM",t,null)};return t.sanitize=function(n,r){var o=void 0,s=void 0,u=void 0,c=void 0,h=void 0;if(n||(n="\x3c!--\x3e"),"string"!=typeof n&&!le(n)){if("function"!=typeof n.toString)throw new TypeError("toString is not a function");if("string"!=typeof(n=n.toString()))throw new TypeError("dirty is not a string, aborting")}if(!t.isSupported){if("object"===M$1g(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof n)return e.toStaticHTML(n);if(le(n))return e.toStaticHTML(n.outerHTML)}return n}if(U||ie(r),t.removed=[],!X)if(n instanceof l)1===(s=(o=oe("\x3c!--\x3e")).ownerDocument.importNode(n,!0)).nodeType&&"BODY"===s.nodeName?o=s:o.appendChild(s);else{if(!W&&!k&&-1===n.indexOf("<"))return n;if(!(o=oe(n)))return W?null:""}o&&V&&ne(o.firstChild);for(var d=ae(X?n:o);u=d.nextNode();)3===u.nodeType&&u===c||ce(u)||(u.content instanceof a&&fe(u.content),de(u),c=u);if(X)return n;if(W){if(H)for(h=v.call(o.ownerDocument);o.firstChild;)h.appendChild(o.firstChild);else h=o;return Y&&(h=x.call(i,h,!0)),h}return k?o.outerHTML:o.innerHTML},t.setConfig=function(e){ie(e),U=!0},t.clearConfig=function(){ee=null,U=!1},t.isValidAttribute=function(e,t,i){ee||ie({});var n=e.toLowerCase(),r=t.toLowerCase();return he(n,r,i)},t.addHook=function(e,t){"function"==typeof t&&(b[e]=b[e]||[],b[e].push(t))},t.removeHook=function(e){b[e]&&b[e].pop()},t.removeHooks=function(e){b[e]&&(b[e]=[])},t.removeAllHooks=function(){b={}},t}var Xe$e=Ae$n(),m$16=0,l$14={};function i$17(e,t){n$1e.typeOf.string("html",e);var i,n=e;t$$(l$14[n])?i=l$14[n]:(i=m$16++,l$14[n]=i),t=e$1Y(t,!1),this._id=i,this._html=e,this._showOnScreen=t,this._element=void 0}Object.defineProperties(i$17.prototype,{html:{get:function(){return this._html}},id:{get:function(){return this._id}},showOnScreen:{get:function(){return this._showOnScreen}},element:{get:function(){if(!t$$(this._element)){var e=Xe$e.sanitize(this._html),t=document.createElement("div");t._creditId=this._id,t.style.display="inline",t.innerHTML=e;for(var i=t.querySelectorAll("a"),n=0;n<i.length;n++)i[n].setAttribute("target","_blank");this._element=t}return this._element}}}),i$17.equals=function(e,t){return e===t||t$$(e)&&t$$(t)&&e._id===t._id},i$17.prototype.equals=function(e){return i$17.equals(this,e)},i$17.getIonCredit=function(e){var t=t$$(e.collapsible)&&!e.collapsible,i=new i$17(e.html,t);return i._isIon=-1!==i.html.indexOf("logo.png"),i},i$17.clone=function(e){if(t$$(e))return new i$17(e.html,e.showOnScreen)};var e$1O={NONE:0,LERC:1},E$1c=Object.freeze(e$1O);function e$1N(e,t,i){this.minimum=a$11.clone(e$1Y(e,a$11.ZERO)),this.maximum=a$11.clone(e$1Y(t,a$11.ZERO)),i=t$$(i)?a$11.clone(i):a$11.midpoint(this.minimum,this.maximum,new a$11),this.center=i}e$1N.fromPoints=function(e,t){if(t$$(t)||(t=new e$1N),!t$$(e)||0===e.length)return t.minimum=a$11.clone(a$11.ZERO,t.minimum),t.maximum=a$11.clone(a$11.ZERO,t.maximum),t.center=a$11.clone(a$11.ZERO,t.center),t;for(var i=e[0].x,n=e[0].y,r=e[0].z,o=e[0].x,a=e[0].y,s=e[0].z,l=e.length,u=1;u<l;u++){var c=e[u],h=c.x,d=c.y,f=c.z;i=Math.min(h,i),o=Math.max(h,o),n=Math.min(d,n),a=Math.max(d,a),r=Math.min(f,r),s=Math.max(f,s)}var p=t.minimum;p.x=i,p.y=n,p.z=r;var _=t.maximum;return _.x=o,_.y=a,_.z=s,t.center=a$11.midpoint(p,_,t.center),t},e$1N.clone=function(e,t){if(t$$(e))return t$$(t)?(t.minimum=a$11.clone(e.minimum,t.minimum),t.maximum=a$11.clone(e.maximum,t.maximum),t.center=a$11.clone(e.center,t.center),t):new e$1N(e.minimum,e.maximum,e.center)},e$1N.equals=function(e,t){return e===t||t$$(e)&&t$$(t)&&a$11.equals(e.center,t.center)&&a$11.equals(e.minimum,t.minimum)&&a$11.equals(e.maximum,t.maximum)};var x$1j=new a$11;function c$15(e,t){n$1e.typeOf.object("ellipsoid",e),this._ellipsoid=e,this._cameraPosition=new a$11,this._cameraPositionInScaledSpace=new a$11,this._distanceToLimbInScaledSpaceSquared=0,t$$(t)&&(this.cameraPosition=t)}e$1N.intersectPlane=function(e,t){n$1e.defined("box",e),n$1e.defined("plane",t),x$1j=a$11.subtract(e.maximum,e.minimum,x$1j);var i=a$11.multiplyByScalar(x$1j,.5,x$1j),n=t.normal,r=i.x*Math.abs(n.x)+i.y*Math.abs(n.y)+i.z*Math.abs(n.z),o=a$11.dot(e.center,n)+t.distance;return o-r>0?cr$4.INSIDE:o+r<0?cr$4.OUTSIDE:cr$4.INTERSECTING},e$1N.prototype.clone=function(e){return e$1N.clone(this,e)},e$1N.prototype.intersectPlane=function(e){return e$1N.intersectPlane(this,e)},e$1N.prototype.equals=function(e){return e$1N.equals(this,e)},Object.defineProperties(c$15.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(e){var t=this._ellipsoid.transformPositionToScaledSpace(e,this._cameraPositionInScaledSpace),i=a$11.magnitudeSquared(t)-1;a$11.clone(e,this._cameraPosition),this._cameraPositionInScaledSpace=t,this._distanceToLimbInScaledSpaceSquared=i}}});var v$17=new a$11;c$15.prototype.isPointVisible=function(e){return P$13(this._ellipsoid.transformPositionToScaledSpace(e,v$17),this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)},c$15.prototype.isScaledSpacePointVisible=function(e){return P$13(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var O$11=new a$11;c$15.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(e,t){var i,n,r=this._ellipsoid;return t$$(t)&&t<0&&r.minimumRadius>-t?((n=O$11).x=this._cameraPosition.x/(r.radii.x+t),n.y=this._cameraPosition.y/(r.radii.y+t),n.z=this._cameraPosition.z/(r.radii.z+t),i=n.x*n.x+n.y*n.y+n.z*n.z-1):(n=this._cameraPositionInScaledSpace,i=this._distanceToLimbInScaledSpaceSquared),P$13(e,n,i)},c$15.prototype.computeHorizonCullingPoint=function(e,t,i){return z$W(this._ellipsoid,e,t,i)};var b$1s=n$1c.clone(n$1c.UNIT_SPHERE);c$15.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(e,t,i,n){return z$W(g$X(this._ellipsoid,i,b$1s),e,t,n)},c$15.prototype.computeHorizonCullingPointFromVertices=function(e,t,i,n,r){return x$1i(this._ellipsoid,e,t,i,n,r)},c$15.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(e,t,i,n,r,o){return x$1i(g$X(this._ellipsoid,r,b$1s),e,t,i,n,o)};var C$18=[];c$15.prototype.computeHorizonCullingPointFromRectangle=function(e,t,i){n$1e.typeOf.object("rectangle",e);var n=s$1p.subsample(e,t,0,C$18),r=c$19.fromPoints(n);if(!(a$11.magnitude(r.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(r.center,n,i)};var H$19=new a$11;function g$X(e,t,i){if(t$$(t)&&t<0&&e.minimumRadius>-t){var n=a$11.fromElements(e.radii.x+t,e.radii.y+t,e.radii.z+t,H$19);e=n$1c.fromCartesian3(n,i)}return e}function z$W(e,t,i,n){n$1e.typeOf.object("directionToPoint",t),n$1e.defined("positions",i),t$$(n)||(n=new a$11);for(var r=q$1f(e,t),o=0,a=0,s=i.length;a<s;++a){var l=I$1d(e,i[a],r);if(l<0)return;o=Math.max(o,l)}return T$15(r,o,n)}var S$Y=new a$11;function x$1i(e,t,i,n,r,o){n$1e.typeOf.object("directionToPoint",t),n$1e.defined("vertices",i),n$1e.typeOf.number("stride",n),t$$(o)||(o=new a$11),n=e$1Y(n,3),r=e$1Y(r,a$11.ZERO);for(var a=q$1f(e,t),s=0,l=0,u=i.length;l<u;l+=n){S$Y.x=i[l]+r.x,S$Y.y=i[l+1]+r.y,S$Y.z=i[l+2]+r.z;var c=I$1d(e,S$Y,a);if(c<0)return;s=Math.max(s,c)}return T$15(a,s,o)}function P$13(e,t,i){var n=t,r=i,o=a$11.subtract(e,n,v$17),a=-a$11.dot(o,n);return!(r<0?a>0:a>r&&a*a/a$11.magnitudeSquared(o)>r)}var R$_=new a$11,M$1f=new a$11;function I$1d(e,t,i){var n=e.transformPositionToScaledSpace(t,R$_),r=a$11.magnitudeSquared(n),o=Math.sqrt(r),a=a$11.divideByScalar(n,o,M$1f);r=Math.max(1,r);var s=1/(o=Math.max(1,o));return 1/(a$11.dot(a,i)*s-a$11.magnitude(a$11.cross(a,i,a))*(Math.sqrt(r-1)*s))}function T$15(e,t,i){if(!(t<=0||t===1/0||t!=t))return a$11.multiplyByScalar(e,t,i)}var y$15=new a$11;function q$1f(e,t){return a$11.equals(t,a$11.ZERO)?t:(e.transformPositionToScaledSpace(t,y$15),a$11.normalize(y$15,y$15))}var o$11={};function h$1c(e,t,i){var n=e+t;return n$1d.sign(e)!==n$1d.sign(t)&&Math.abs(n/Math.max(Math.abs(e),Math.abs(t)))<i?0:n}o$11.computeDiscriminant=function(e,t,i){if("number"!=typeof e)throw new t$_("a is a required number.");if("number"!=typeof t)throw new t$_("b is a required number.");if("number"!=typeof i)throw new t$_("c is a required number.");return t*t-4*e*i},o$11.computeRealRoots=function(e,t,i){if("number"!=typeof e)throw new t$_("a is a required number.");if("number"!=typeof t)throw new t$_("b is a required number.");if("number"!=typeof i)throw new t$_("c is a required number.");var n;if(0===e)return 0===t?[]:[-i/t];if(0===t){if(0===i)return[0,0];var r=Math.abs(i),o=Math.abs(e);if(r<o&&r/o<n$1d.EPSILON14)return[0,0];if(r>o&&o/r<n$1d.EPSILON14)return[];if((n=-i/e)<0)return[];var a=Math.sqrt(n);return[-a,a]}if(0===i)return(n=-t/e)<0?[n,0]:[0,n];var s=h$1c(t*t,-(4*e*i),n$1d.EPSILON14);if(s<0)return[];var l=-.5*h$1c(t,n$1d.sign(t)*Math.sqrt(s),n$1d.EPSILON14);return t>0?[l/e,i/l]:[i/l,l/e]};var P$12={};function Q$14(e,t,i,n){var r,o,a=e,s=t/3,l=i/3,u=n,c=a*l,h=s*u,d=s*s,f=l*l,p=a*l-d,_=a*u-s*l,m=s*u-f,$=4*p*m-_*_;if($<0){var g,y,v;d*h>=c*f?(g=a,y=p,v=-2*s*p+a*_):(g=u,y=m,v=-u*_+2*l*m);var x=-(v<0?-1:1)*Math.abs(g)*Math.sqrt(-$),b=(o=-v+x)/2,S=b<0?-Math.pow(-b,1/3):Math.pow(b,1/3),w=o===x?-S:-y/S;return r=y<=0?S+w:-v/(S*S+w*w+y),d*h>=c*f?[(r-s)/a]:[-u/(r+l)]}var C=p,T=-2*s*p+a*_,P=m,E=-u*_+2*l*m,A=Math.sqrt($),L=Math.sqrt(3)/2,M=Math.abs(Math.atan2(a*A,-T)/3);r=2*Math.sqrt(-C);var I=Math.cos(M);o=r*I;var O=r*(-I/2-L*Math.sin(M)),D=o+O>2*s?o-s:O-s,R=a,N=D/R;M=Math.abs(Math.atan2(u*A,-E)/3);var F=-u,B=(o=(r=2*Math.sqrt(-P))*(I=Math.cos(M)))+(O=r*(-I/2-L*Math.sin(M)))<2*l?o+l:O+l,z=F/B,G=-D*B-R*F,k=(l*G-s*(D*F))/(-s*G+l*(R*B));return N<=k?N<=z?k<=z?[N,k,z]:[N,z,k]:[z,N,k]:N<=z?[k,N,z]:k<=z?[k,z,N]:[z,k,N]}P$12.computeDiscriminant=function(e,t,i,n){if("number"!=typeof e)throw new t$_("a is a required number.");if("number"!=typeof t)throw new t$_("b is a required number.");if("number"!=typeof i)throw new t$_("c is a required number.");if("number"!=typeof n)throw new t$_("d is a required number.");var r=t*t,o=i*i;return 18*e*t*i*n+r*o-27*(e*e)*(n*n)-4*(e*o*i+r*t*n)},P$12.computeRealRoots=function(e,t,i,n){if("number"!=typeof e)throw new t$_("a is a required number.");if("number"!=typeof t)throw new t$_("b is a required number.");if("number"!=typeof i)throw new t$_("c is a required number.");if("number"!=typeof n)throw new t$_("d is a required number.");var r,o;if(0===e)return o$11.computeRealRoots(t,i,n);if(0===t){if(0===i){if(0===n)return[0,0,0];var a=(o=-n/e)<0?-Math.pow(-o,1/3):Math.pow(o,1/3);return[a,a,a]}return 0===n?0===(r=o$11.computeRealRoots(e,0,i)).Length?[0]:[r[0],0,r[1]]:Q$14(e,0,i,n)}return 0===i?0===n?(o=-t/e)<0?[o,0,0]:[0,0,o]:Q$14(e,t,0,n):0===n?0===(r=o$11.computeRealRoots(e,t,i)).length?[0]:r[1]<=0?[r[0],r[1],0]:r[0]>=0?[0,r[0],r[1]]:[r[0],0,r[1]]:Q$14(e,t,i,n)};var A$1e={};function d$16(e,t,i,n){var r=e*e,o=t-3*r/8,a=i-t*e/2+r*e/8,s=n-i*e/4+t*r/16-3*r*r/256,l=P$12.computeRealRoots(1,2*o,o*o-4*s,-a*a);if(l.length>0){var u=-e/4,c=l[l.length-1];if(Math.abs(c)<n$1d.EPSILON14){var h=o$11.computeRealRoots(1,o,s);if(2===h.length){var d,f=h[0],p=h[1];if(f>=0&&p>=0){var _=Math.sqrt(f),m=Math.sqrt(p);return[u-m,u-_,u+_,u+m]}if(f>=0&&p<0)return[u-(d=Math.sqrt(f)),u+d];if(f<0&&p>=0)return[u-(d=Math.sqrt(p)),u+d]}return[]}if(c>0){var $=Math.sqrt(c),g=(o+c-a/$)/2,y=(o+c+a/$)/2,v=o$11.computeRealRoots(1,$,g),x=o$11.computeRealRoots(1,-$,y);return 0!==v.length?(v[0]+=u,v[1]+=u,0!==x.length?(x[0]+=u,x[1]+=u,v[1]<=x[0]?[v[0],v[1],x[0],x[1]]:x[1]<=v[0]?[x[0],x[1],v[0],v[1]]:v[0]>=x[0]&&v[1]<=x[1]?[x[0],v[0],v[1],x[1]]:x[0]>=v[0]&&x[1]<=v[1]?[v[0],x[0],x[1],v[1]]:v[0]>x[0]&&v[0]<x[1]?[x[0],v[0],x[1],v[1]]:[v[0],x[0],v[1],x[1]]):v):0!==x.length?(x[0]+=u,x[1]+=u,x):[]}}return[]}function F$1d(e,t,i,n){var r=e*e,o=-2*t,a=i*e+t*t-4*n,s=r*n-i*t*e+i*i,l=P$12.computeRealRoots(1,o,a,s);if(l.length>0){var u,c,h,d,f,p,_=l[0],m=t-_,$=m*m,g=e/2,y=m/2,v=$-4*n,x=$+4*Math.abs(n),b=r-4*_,S=r+4*Math.abs(_);if(_<0||v*S<b*x){var w=Math.sqrt(b);u=w/2,c=0===w?0:(e*y-i)/w}else{var C=Math.sqrt(v);u=0===C?0:(e*y-i)/C,c=C/2}0===g&&0===u?(h=0,d=0):n$1d.sign(g)===n$1d.sign(u)?d=_/(h=g+u):h=_/(d=g-u),0===y&&0===c?(f=0,p=0):n$1d.sign(y)===n$1d.sign(c)?p=n/(f=y+c):f=n/(p=y-c);var T=o$11.computeRealRoots(1,h,f),P=o$11.computeRealRoots(1,d,p);if(0!==T.length)return 0!==P.length?T[1]<=P[0]?[T[0],T[1],P[0],P[1]]:P[1]<=T[0]?[P[0],P[1],T[0],T[1]]:T[0]>=P[0]&&T[1]<=P[1]?[P[0],T[0],T[1],P[1]]:P[0]>=T[0]&&P[1]<=T[1]?[T[0],P[0],P[1],T[1]]:T[0]>P[0]&&T[0]<P[1]?[P[0],T[0],P[1],T[1]]:[T[0],P[0],T[1],P[1]]:T;if(0!==P.length)return P}return[]}function n$18(e,t){t=a$11.clone(e$1Y(t,a$11.ZERO)),a$11.equals(t,a$11.ZERO)||a$11.normalize(t,t),this.origin=a$11.clone(e$1Y(e,a$11.ZERO)),this.direction=t}A$1e.computeDiscriminant=function(e,t,i,n,r){if("number"!=typeof e)throw new t$_("a is a required number.");if("number"!=typeof t)throw new t$_("b is a required number.");if("number"!=typeof i)throw new t$_("c is a required number.");if("number"!=typeof n)throw new t$_("d is a required number.");if("number"!=typeof r)throw new t$_("e is a required number.");var o=e*e,a=t*t,s=a*t,l=i*i,u=l*i,c=n*n,h=c*n,d=r*r;return a*l*c-4*s*h-4*e*u*c+18*e*t*i*h-27*o*c*c+256*(o*e)*(d*r)+r*(18*s*i*n-4*a*u+16*e*l*l-80*e*t*l*n-6*e*a*c+144*o*i*c)+d*(144*e*a*i-27*a*a-128*o*l-192*o*t*n)},A$1e.computeRealRoots=function(e,t,i,n,r){if("number"!=typeof e)throw new t$_("a is a required number.");if("number"!=typeof t)throw new t$_("b is a required number.");if("number"!=typeof i)throw new t$_("c is a required number.");if("number"!=typeof n)throw new t$_("d is a required number.");if("number"!=typeof r)throw new t$_("e is a required number.");if(Math.abs(e)<n$1d.EPSILON15)return P$12.computeRealRoots(t,i,n,r);var o=t/e,a=i/e,s=n/e,l=r/e,u=o<0?1:0;switch(u+=a<0?u+1:u,u+=s<0?u+1:u,u+=l<0?u+1:u){case 0:case 3:case 4:case 6:case 7:case 9:case 10:case 12:case 13:case 14:case 15:return d$16(o,a,s,l);case 1:case 2:case 5:case 8:case 11:return F$1d(o,a,s,l);default:return}},n$18.clone=function(e,t){if(t$$(e))return t$$(t)?(t.origin=a$11.clone(e.origin),t.direction=a$11.clone(e.direction),t):new n$18(e.origin,e.direction)},n$18.getPoint=function(e,t,i){return n$1e.typeOf.object("ray",e),n$1e.typeOf.number("t",t),t$$(i)||(i=new a$11),i=a$11.multiplyByScalar(e.direction,t,i),a$11.add(e.origin,i,i)};var h$1b={rayPlane:function(e,t,i){if(!t$$(e))throw new t$_("ray is required.");if(!t$$(t))throw new t$_("plane is required.");t$$(i)||(i=new a$11);var n=e.origin,r=e.direction,o=t.normal,a=a$11.dot(o,r);if(!(Math.abs(a)<n$1d.EPSILON15)){var s=(-t.distance-a$11.dot(o,n))/a;if(!(s<0))return i=a$11.multiplyByScalar(r,s,i),a$11.add(n,i,i)}}},or$8=new a$11,sr$6=new a$11,H$18=new a$11,J$15=new a$11,K$Y=new a$11;h$1b.rayTriangleParametric=function(e,t,i,n,r){if(!t$$(e))throw new t$_("ray is required.");if(!t$$(t))throw new t$_("p0 is required.");if(!t$$(i))throw new t$_("p1 is required.");if(!t$$(n))throw new t$_("p2 is required.");r=e$1Y(r,!1);var o,a,s,l,u,c=e.origin,h=e.direction,d=a$11.subtract(i,t,or$8),f=a$11.subtract(n,t,sr$6),p=a$11.cross(h,f,H$18),_=a$11.dot(d,p);if(r){if(_<n$1d.EPSILON6||(o=a$11.subtract(c,t,J$15),(s=a$11.dot(o,p))<0||s>_)||(a=a$11.cross(o,d,K$Y),(l=a$11.dot(h,a))<0||s+l>_))return;u=a$11.dot(f,a)/_}else{if(Math.abs(_)<n$1d.EPSILON6)return;var m=1/_;if(o=a$11.subtract(c,t,J$15),(s=a$11.dot(o,p)*m)<0||s>1||(a=a$11.cross(o,d,K$Y),(l=a$11.dot(h,a)*m)<0||s+l>1))return;u=a$11.dot(f,a)*m}return u},h$1b.rayTriangle=function(e,t,i,n,r,o){var a=h$1b.rayTriangleParametric(e,t,i,n,r);if(t$$(a)&&!(a<0))return t$$(o)||(o=new a$11),a$11.multiplyByScalar(e.direction,a,o),a$11.add(e.origin,o,o)};var ur$4=new n$18;function lr$7(e,t,i,n){var r=t*t-4*e*i;if(!(r<0)){if(r>0){var o=1/(2*e),a=Math.sqrt(r),s=(-t+a)*o,l=(-t-a)*o;return s<l?(n.root0=s,n.root1=l):(n.root0=l,n.root1=s),n}var u=-t/(2*e);if(0!==u)return n.root0=n.root1=u,n}}h$1b.lineSegmentTriangle=function(e,t,i,n,r,o,a){if(!t$$(e))throw new t$_("v0 is required.");if(!t$$(t))throw new t$_("v1 is required.");if(!t$$(i))throw new t$_("p0 is required.");if(!t$$(n))throw new t$_("p1 is required.");if(!t$$(r))throw new t$_("p2 is required.");var s=ur$4;a$11.clone(e,s.origin),a$11.subtract(t,e,s.direction),a$11.normalize(s.direction,s.direction);var l=h$1b.rayTriangleParametric(s,i,n,r,o);if(!(!t$$(l)||l<0||l>a$11.distance(e,t)))return t$$(a)||(a=new a$11),a$11.multiplyByScalar(s.direction,l,a),a$11.add(s.origin,a,a)};var dr$3={root0:0,root1:0};function Q$13(e,t,i){t$$(i)||(i=new i$1f);var n=e.origin,r=e.direction,o=t.center,a=t.radius*t.radius,s=a$11.subtract(n,o,H$18),l=lr$7(a$11.dot(r,r),2*a$11.dot(r,s),a$11.magnitudeSquared(s)-a,dr$3);if(t$$(l))return i.start=l.root0,i.stop=l.root1,i}h$1b.raySphere=function(e,t,i){if(!t$$(e))throw new t$_("ray is required.");if(!t$$(t))throw new t$_("sphere is required.");if(t$$(i=Q$13(e,t,i))&&!(i.stop<0))return i.start=Math.max(i.start,0),i};var fr$7=new n$18;h$1b.lineSegmentSphere=function(e,t,i,n){if(!t$$(e))throw new t$_("p0 is required.");if(!t$$(t))throw new t$_("p1 is required.");if(!t$$(i))throw new t$_("sphere is required.");var r=fr$7;a$11.clone(e,r.origin);var o=a$11.subtract(t,e,r.direction),a=a$11.magnitude(o);if(a$11.normalize(o,o),!(!t$$(n=Q$13(r,i,n))||n.stop<0||n.start>a))return n.start=Math.max(n.start,0),n.stop=Math.min(n.stop,a),n};var wr$3=new a$11,mr$3=new a$11;function I$1c(e,t,i){var n=e+t;return n$1d.sign(e)!==n$1d.sign(t)&&Math.abs(n/Math.max(Math.abs(e),Math.abs(t)))<i?0:n}function cr$3(e,t,i,n,r){var o,a=n*n,s=r*r,l=(e[r$W.COLUMN1ROW1]-e[r$W.COLUMN2ROW2])*s,u=r*(n*I$1c(e[r$W.COLUMN1ROW0],e[r$W.COLUMN0ROW1],n$1d.EPSILON15)+t.y),c=e[r$W.COLUMN0ROW0]*a+e[r$W.COLUMN2ROW2]*s+n*t.x+i,h=s*I$1c(e[r$W.COLUMN2ROW1],e[r$W.COLUMN1ROW2],n$1d.EPSILON15),d=r*(n*I$1c(e[r$W.COLUMN2ROW0],e[r$W.COLUMN0ROW2])+t.z),f=[];if(0===d&&0===h){if(0===(o=o$11.computeRealRoots(l,u,c)).length)return f;var p=o[0],_=Math.sqrt(Math.max(1-p*p,0));if(f.push(new a$11(n,r*p,r*-_)),f.push(new a$11(n,r*p,r*_)),2===o.length){var m=o[1],$=Math.sqrt(Math.max(1-m*m,0));f.push(new a$11(n,r*m,r*-$)),f.push(new a$11(n,r*m,r*$))}return f}var g=d*d,y=h*h,v=d*h,x=l*l+y,b=2*(u*l+v),S=2*c*l+u*u-y+g,w=2*(c*u-v),C=c*c-g;if(0===x&&0===b&&0===S&&0===w)return f;var T=(o=A$1e.computeRealRoots(x,b,S,w,C)).length;if(0===T)return f;for(var P=0;P<T;++P){var E=o[P],A=E*E,L=Math.max(1-A,0),M=Math.sqrt(L),I=(n$1d.sign(l)===n$1d.sign(c)?I$1c(l*A+c,u*E,n$1d.EPSILON12):n$1d.sign(c)===n$1d.sign(u*E)?I$1c(l*A,u*E+c,n$1d.EPSILON12):I$1c(l*A+u*E,c,n$1d.EPSILON12))*I$1c(h*E,d,n$1d.EPSILON15);I<0?f.push(new a$11(n,r*E,r*M)):I>0?f.push(new a$11(n,r*E,r*-M)):0!==M?(f.push(new a$11(n,r*E,r*-M)),f.push(new a$11(n,r*E,r*M)),++P):f.push(new a$11(n,r*E,r*M))}return f}h$1b.rayEllipsoid=function(e,t){if(!t$$(e))throw new t$_("ray is required.");if(!t$$(t))throw new t$_("ellipsoid is required.");var i,n,r,o,a,s=t.oneOverRadii,l=a$11.multiplyComponents(s,e.origin,wr$3),u=a$11.multiplyComponents(s,e.direction,mr$3),c=a$11.magnitudeSquared(l),h=a$11.dot(l,u);if(c>1){if(h>=0)return;var d=h*h;if(i=c-1,d<(r=(n=a$11.magnitudeSquared(u))*i))return;if(d>r){o=h*h-r;var f=(a=-h+Math.sqrt(o))/n,p=i/a;return f<p?new i$1f(f,p):{start:p,stop:f}}var _=Math.sqrt(i/n);return new i$1f(_,_)}return c<1?(i=c-1,o=h*h-(r=(n=a$11.magnitudeSquared(u))*i),new i$1f(0,(a=-h+Math.sqrt(o))/n)):h<0?new i$1f(0,-h/(n=a$11.magnitudeSquared(u))):void 0};var j$19=new a$11,V$X=new a$11,X$X=new a$11,Y$Z=new a$11,pr$3=new a$11,hr$6=new r$W,gr$3=new r$W,vr$6=new r$W,Sr$3=new r$W,yr$4=new r$W,$$11=new r$W,G$12=new r$W,Z$14=new a$11,qr$2=new a$11,Pr$4=new i$1g;h$1b.grazingAltitudeLocation=function(e,t){if(!t$$(e))throw new t$_("ray is required.");if(!t$$(t))throw new t$_("ellipsoid is required.");var i=e.origin,n=e.direction;if(!a$11.equals(i,a$11.ZERO)){var r=t.geodeticSurfaceNormal(i,j$19);if(a$11.dot(n,r)>=0)return i}var o=t$$(this.rayEllipsoid(e,t)),a=t.transformPositionToScaledSpace(n,j$19),s=a$11.normalize(a,a),l=a$11.mostOrthogonalAxis(a,Y$Z),u=a$11.normalize(a$11.cross(l,s,V$X),V$X),c=a$11.normalize(a$11.cross(s,u,X$X),X$X),h=hr$6;h[0]=s.x,h[1]=s.y,h[2]=s.z,h[3]=u.x,h[4]=u.y,h[5]=u.z,h[6]=c.x,h[7]=c.y,h[8]=c.z;var d=r$W.transpose(h,gr$3),f=r$W.fromScale(t.radii,vr$6),p=r$W.fromScale(t.oneOverRadii,Sr$3),_=yr$4;_[0]=0,_[1]=-n.z,_[2]=n.y,_[3]=n.z,_[4]=0,_[5]=-n.x,_[6]=-n.y,_[7]=n.x,_[8]=0;var m,$,g=r$W.multiply(r$W.multiply(d,p,$$11),_,$$11),y=r$W.multiply(r$W.multiply(g,f,G$12),h,G$12),v=r$W.multiplyByVector(g,i,pr$3),x=cr$3(y,a$11.negate(v,j$19),0,0,1),b=x.length;if(b>0){for(var S=a$11.clone(a$11.ZERO,qr$2),w=Number.NEGATIVE_INFINITY,C=0;C<b;++C){m=r$W.multiplyByVector(f,r$W.multiplyByVector(h,x[C],Z$14),Z$14);var T=a$11.normalize(a$11.subtract(m,i,Y$Z),Y$Z),P=a$11.dot(T,n);P>w&&(w=P,S=a$11.clone(m,S))}var E=t.cartesianToCartographic(S,Pr$4);return w=n$1d.clamp(w,0,1),$=a$11.magnitude(a$11.subtract(S,i,Y$Z))*Math.sqrt(1-w*w),$=o?-$:$,E.height=$,t.cartographicToCartesian(E,new a$11)}};var Mr$2=new a$11;function n$17(e,t){if(n$1e.typeOf.object("normal",e),!n$1d.equalsEpsilon(a$11.magnitude(e),1,n$1d.EPSILON6))throw new t$_("normal must be normalized.");n$1e.typeOf.number("distance",t),this.normal=a$11.clone(e),this.distance=t}h$1b.lineSegmentPlane=function(e,t,i,n){if(!t$$(e))throw new t$_("endPoint0 is required.");if(!t$$(t))throw new t$_("endPoint1 is required.");if(!t$$(i))throw new t$_("plane is required.");t$$(n)||(n=new a$11);var r=a$11.subtract(t,e,Mr$2),o=i.normal,a=a$11.dot(o,r);if(!(Math.abs(a)<n$1d.EPSILON6)){var s=a$11.dot(o,e),l=-(i.distance+s)/a;if(!(l<0||l>1))return a$11.multiplyByScalar(r,l,n),a$11.add(e,n,n),n}},h$1b.trianglePlaneIntersection=function(e,t,i,n){if(!(t$$(e)&&t$$(t)&&t$$(i)&&t$$(n)))throw new t$_("p0, p1, p2, and plane are required.");var r,o,a=n.normal,s=n.distance,l=a$11.dot(a,e)+s<0,u=a$11.dot(a,t)+s<0,c=a$11.dot(a,i)+s<0,h=0;if(h+=l?1:0,h+=u?1:0,(1===(h+=c?1:0)||2===h)&&(r=new a$11,o=new a$11),1===h){if(l)return h$1b.lineSegmentPlane(e,t,n,r),h$1b.lineSegmentPlane(e,i,n,o),{positions:[e,t,i,r,o],indices:[0,3,4,1,2,4,1,4,3]};if(u)return h$1b.lineSegmentPlane(t,i,n,r),h$1b.lineSegmentPlane(t,e,n,o),{positions:[e,t,i,r,o],indices:[1,3,4,2,0,4,2,4,3]};if(c)return h$1b.lineSegmentPlane(i,e,n,r),h$1b.lineSegmentPlane(i,t,n,o),{positions:[e,t,i,r,o],indices:[2,3,4,0,1,4,0,4,3]}}else if(2===h){if(!l)return h$1b.lineSegmentPlane(t,e,n,r),h$1b.lineSegmentPlane(i,e,n,o),{positions:[e,t,i,r,o],indices:[1,2,4,1,4,3,0,3,4]};if(!u)return h$1b.lineSegmentPlane(i,t,n,r),h$1b.lineSegmentPlane(e,t,n,o),{positions:[e,t,i,r,o],indices:[2,0,4,2,4,3,1,3,4]};if(!c)return h$1b.lineSegmentPlane(e,i,n,r),h$1b.lineSegmentPlane(t,i,n,o),{positions:[e,t,i,r,o],indices:[0,1,4,0,4,3,2,3,4]}}},n$17.fromPointNormal=function(e,t,i){if(n$1e.typeOf.object("point",e),n$1e.typeOf.object("normal",t),!n$1d.equalsEpsilon(a$11.magnitude(t),1,n$1d.EPSILON6))throw new t$_("normal must be normalized.");var n=-a$11.dot(t,e);return t$$(i)?(a$11.clone(t,i.normal),i.distance=n,i):new n$17(t,n)};var m$15=new a$11;n$17.fromCartesian4=function(e,t){n$1e.typeOf.object("coefficients",e);var i=a$11.fromCartesian4(e,m$15),n=e.w;if(!n$1d.equalsEpsilon(a$11.magnitude(i),1,n$1d.EPSILON6))throw new t$_("normal must be normalized.");return t$$(t)?(a$11.clone(i,t.normal),t.distance=n,t):new n$17(i,n)},n$17.getPointDistance=function(e,t){return n$1e.typeOf.object("plane",e),n$1e.typeOf.object("point",t),a$11.dot(e.normal,t)+e.distance};var O$10=new a$11;n$17.projectPointOntoPlane=function(e,t,i){n$1e.typeOf.object("plane",e),n$1e.typeOf.object("point",t),t$$(i)||(i=new a$11);var n=n$17.getPointDistance(e,t),r=a$11.multiplyByScalar(e.normal,n,O$10);return a$11.subtract(t,r,i)};var f$16=new a$11;function u$16(e,t,i){n$1e.defined("array",e),n$1e.defined("itemToFind",t),n$1e.defined("comparator",i);for(var n,r,o=0,a=e.length-1;o<=a;)if((r=i(e[n=~~((o+a)/2)],t))<0)o=n+1;else{if(!(r>0))return n;a=n-1}return~(a+1)}function n$16(e,t,i,n,r){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=i,this.yPoleOffset=n,this.ut1MinusUtc=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 $$10(){var e=/%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuideEfFgG])/g,t=arguments,i=0,n=t[i++],r=function(e,t,i,n){i||(i=" ");var r=e.length>=t?"":Array(1+t-e.length>>>0).join(i);return n?e+r:r+e},o=function(e,t,i,n,o,a){var s=n-e.length;return s>0&&(e=i||!o?r(e,n,a,i):e.slice(0,t.length)+r("",s,"0",!0)+e.slice(t.length)),e},a=function(e,t,i,n,a,s,l){var u=e>>>0;return e=(i=i&&u&&{2:"0b",8:"0",16:"0x"}[t]||"")+r(u.toString(t),s||0,"0",!1),o(e,i,n,a,l)},s=function(e,t,i,n,r,a){return null!=n&&(e=e.slice(0,n)),o(e,"",t,i,r,a)},l=function(e,n,l,u,c,h,d){var f,p,_,m,$;if("%%"==e)return"%";for(var g=!1,y="",v=!1,x=!1,b=" ",S=l.length,w=0;l&&w<S;w++)switch(l.charAt(w)){case" ":y=" ";break;case"+":y="+";break;case"-":g=!0;break;case"'":b=l.charAt(w+1);break;case"0":v=!0;break;case"#":x=!0}if((u=u?"*"==u?+t[i++]:"*"==u.charAt(0)?+t[u.slice(1,-1)]:+u:0)<0&&(u=-u,g=!0),!isFinite(u))throw new Error("sprintf: (minimum-)width must be finite");switch(h=h?"*"==h?+t[i++]:"*"==h.charAt(0)?+t[h.slice(1,-1)]:+h:"fFeE".indexOf(d)>-1?6:"d"==d?0:void 0,$=n?t[n.slice(0,-1)]:t[i++],d){case"s":return s(String($),g,u,h,v,b);case"c":return s(String.fromCharCode(+$),g,u,h,v);case"b":return a($,2,x,g,u,h,v);case"o":return a($,8,x,g,u,h,v);case"x":return a($,16,x,g,u,h,v);case"X":return a($,16,x,g,u,h,v).toUpperCase();case"u":return a($,10,x,g,u,h,v);case"i":case"d":return f=+$||0,$=(p=(f=Math.round(f-f%1))<0?"-":y)+r(String(Math.abs(f)),h,"0",!1),o($,p,g,u,v);case"e":case"E":case"f":case"F":case"g":case"G":return p=(f=+$)<0?"-":y,_=["toExponential","toFixed","toPrecision"]["efg".indexOf(d.toLowerCase())],m=["toString","toUpperCase"]["eEfFgG".indexOf(d)%2],$=p+Math.abs(f)[_](h),o($,p,g,u,v)[m]();default:return e}};return n.replace(e,l)}function d$15(e,t,i,n,r,o,a,s){this.year=e,this.month=t,this.day=i,this.hour=n,this.minute=r,this.second=o,this.millisecond=a,this.isLeapSecond=s}function i$16(e){if(null===e||isNaN(e))throw new t$_("year is required and must be a number.");return e%4==0&&e%100!=0||e%400==0}function f$15(e,t){this.julianDate=e,this.offset=t}n$17.transform=function(e,t,i){return n$1e.typeOf.object("plane",e),n$1e.typeOf.object("transform",t),c$1a.multiplyByPointAsVector(t,e.normal,m$15),a$11.normalize(m$15,m$15),a$11.multiplyByScalar(e.normal,-e.distance,f$16),c$1a.multiplyByPoint(t,f$16,f$16),n$17.fromPointNormal(f$16,m$15,i)},n$17.clone=function(e,t){return n$1e.typeOf.object("plane",e),t$$(t)?(a$11.clone(e.normal,t.normal),t.distance=e.distance,t):new n$17(e.normal,e.distance)},n$17.equals=function(e,t){return n$1e.typeOf.object("left",e),n$1e.typeOf.object("right",t),e.distance===t.distance&&a$11.equals(e.normal,t.normal)},n$17.ORIGIN_XY_PLANE=Object.freeze(new n$17(a$11.UNIT_Z,0)),n$17.ORIGIN_YZ_PLANE=Object.freeze(new n$17(a$11.UNIT_X,0)),n$17.ORIGIN_ZX_PLANE=Object.freeze(new n$17(a$11.UNIT_Y,0));var E$1b={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},h$1a=Object.freeze(E$1b),e$1M={UTC:0,TAI:1},J$14=Object.freeze(e$1M),x$1h=new d$15,g$W=[31,28,31,30,31,30,31,31,30,31,30,31],q$1e=29;function Y$Y(e,t){return o$10.compare(e.julianDate,t.julianDate)}var C$17=new f$15;function U$14(e){C$17.julianDate=e;var t=o$10.leapSeconds,i=u$16(t,C$17,Y$Y);i<0&&(i=~i),i>=t.length&&(i=t.length-1);var n=t[i].offset;i>0&&(o$10.secondsDifference(t[i].julianDate,e)>n&&(n=t[--i].offset));o$10.addSeconds(e,n,e)}function F$1c(e,t){C$17.julianDate=e;var i=o$10.leapSeconds,n=u$16(i,C$17,Y$Y);if(n<0&&(n=~n),0===n)return o$10.addSeconds(e,-i[0].offset,t);if(n>=i.length)return o$10.addSeconds(e,-i[n-1].offset,t);var r=o$10.secondsDifference(i[n].julianDate,e);return 0===r?o$10.addSeconds(e,-i[n].offset,t):r<=1?void 0:o$10.addSeconds(e,-i[--n].offset,t)}function N$15(e,t,i){var n=t/h$1a.SECONDS_PER_DAY|0;return e+=n,(t-=h$1a.SECONDS_PER_DAY*n)<0&&(e--,t+=h$1a.SECONDS_PER_DAY),i.dayNumber=e,i.secondsOfDay=t,i}function H$17(e,t,i,n,r,o,a){var s=(t-14)/12|0,l=e+4800+s,u=(1461*l/4|0)+(367*(t-2-12*s)/12|0)-(3*((l+100)/100|0)/4|0)+i-32075;(n-=12)<0&&(n+=24);var c=o+(n*h$1a.SECONDS_PER_HOUR+r*h$1a.SECONDS_PER_MINUTE+a*h$1a.SECONDS_PER_MILLISECOND);return c>=43200&&(u-=1),[u,c]}var B$W=/^(\d{4})$/,J$13=/^(\d{4})-(\d{2})$/,K$X=/^(\d{4})-?(\d{3})$/,Q$12=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,V$W=/^(\d{4})-?(\d{2})-?(\d{2})$/,L$18=/([Z+\-])?(\d{2})?:?(\d{2})?$/,X$W=/^(\d{2})(\.\d+)?/.source+L$18.source,ee$F=/^(\d{2}):?(\d{2})(\.\d+)?/.source+L$18.source,re$I=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+L$18.source,v$16="Invalid ISO 8601 date.";function o$10(e,t,i){this.dayNumber=void 0,this.secondsOfDay=void 0,e=e$1Y(e,0),t=e$1Y(t,0),i=e$1Y(i,J$14.UTC);var n=0|e;N$15(n,t+=(e-n)*h$1a.SECONDS_PER_DAY,this),i===J$14.UTC&&U$14(this)}o$10.fromGregorianDate=function(e,t){if(!(e instanceof d$15))throw new t$_("date must be a valid GregorianDate.");var i=H$17(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return t$$(t)?(N$15(i[0],i[1],t),U$14(t),t):new o$10(i[0],i[1],J$14.UTC)},o$10.fromDate=function(e,t){if(!(e instanceof Date)||isNaN(e.getTime()))throw new t$_("date must be a valid JavaScript Date.");var i=H$17(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return t$$(t)?(N$15(i[0],i[1],t),U$14(t),t):new o$10(i[0],i[1],J$14.UTC)},o$10.fromIso8601=function(e,t){if("string"!=typeof e)throw new t$_(v$16);var i,n,r,o,a,s=(e=e.replace(",",".")).split("T"),l=1,u=1,c=0,h=0,d=0,f=0,p=s[0],_=s[1];if(!t$$(p))throw new t$_(v$16);if(null!==(s=p.match(V$W))){if((o=p.split("-").length-1)>0&&2!==o)throw new t$_(v$16);i=+s[1],l=+s[2],u=+s[3]}else if(null!==(s=p.match(J$13)))i=+s[1],l=+s[2];else if(null!==(s=p.match(B$W)))i=+s[1];else{var m;if(null!==(s=p.match(K$X))){if(i=+s[1],m=+s[2],r=i$16(i),m<1||r&&m>366||!r&&m>365)throw new t$_(v$16)}else{if(null===(s=p.match(Q$12)))throw new t$_(v$16);i=+s[1];var $=+s[2],g=+s[3]||0;if((o=p.split("-").length-1)>0&&(!t$$(s[3])&&1!==o||t$$(s[3])&&2!==o))throw new t$_(v$16);m=7*$+g-new Date(Date.UTC(i,0,4)).getUTCDay()-3}(n=new Date(Date.UTC(i,0,1))).setUTCDate(m),l=n.getUTCMonth()+1,u=n.getUTCDate()}if(r=i$16(i),l<1||l>12||u<1||(2!==l||!r)&&u>g$W[l-1]||r&&2===l&&u>q$1e)throw new t$_(v$16);if(t$$(_)){if(null!==(s=_.match(re$I))){if((o=_.split(":").length-1)>0&&2!==o&&3!==o)throw new t$_(v$16);c=+s[1],h=+s[2],d=+s[3],f=1e3*+(s[4]||0),a=5}else if(null!==(s=_.match(ee$F))){if((o=_.split(":").length-1)>2)throw new t$_(v$16);c=+s[1],h=+s[2],d=60*+(s[3]||0),a=4}else{if(null===(s=_.match(X$W)))throw new t$_(v$16);c=+s[1],h=60*+(s[2]||0),a=3}if(h>=60||d>=61||c>24||24===c&&(h>0||d>0||f>0))throw new t$_(v$16);var y=s[a],v=+s[a+1],x=+(s[a+2]||0);switch(y){case"+":c-=v,h-=x;break;case"-":c+=v,h+=x;break;case"Z":break;default:h+=new Date(Date.UTC(i,l-1,u,c,h)).getTimezoneOffset()}}var b=60===d;for(b&&d--;h>=60;)h-=60,c++;for(;c>=24;)c-=24,u++;for(n=r&&2===l?q$1e:g$W[l-1];u>n;)u-=n,++l>12&&(l-=12,i++),n=r&&2===l?q$1e:g$W[l-1];for(;h<0;)h+=60,c--;for(;c<0;)c+=24,u--;for(;u<1;)--l<1&&(l+=12,i--),u+=n=r&&2===l?q$1e:g$W[l-1];var S=H$17(i,l,u,c,h,d,f);return t$$(t)?(N$15(S[0],S[1],t),U$14(t)):t=new o$10(S[0],S[1],J$14.UTC),b&&o$10.addSeconds(t,1,t),t},o$10.now=function(e){return o$10.fromDate(new Date,e)};var b$1r=new o$10(0,0,J$14.TAI);function R$Z(e){if(e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._downloadPromise=void 0,this._dataError=void 0,this._addNewLeapSeconds=e$1Y(e.addNewLeapSeconds,!0),t$$(e.data))E$1a(this,e.data);else if(t$$(e.url)){var t=t$X.createIfNeeded(e.url),i=this;this._downloadPromise=c$18(t.fetchJson(),(function(e){E$1a(i,e)}),(function(){i._dataError="An error occurred while retrieving the EOP data from the URL "+t.url+"."}))}else E$1a(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}function A$1d(e,t){return o$10.compare(e.julianDate,t)}function E$1a(e,t){if(t$$(t.columnNames))if(t$$(t.samples)){var i=t.columnNames.indexOf("modifiedJulianDateUtc"),n=t.columnNames.indexOf("xPoleWanderRadians"),r=t.columnNames.indexOf("yPoleWanderRadians"),o=t.columnNames.indexOf("ut1MinusUtcSeconds"),a=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),s=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),l=t.columnNames.indexOf("taiMinusUtcSeconds");if(i<0||n<0||r<0||o<0||a<0||s<0||l<0)e._dataError="Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns";else{var u=e._samples=t.samples,c=e._dates=[];e._dateColumn=i,e._xPoleWanderRadiansColumn=n,e._yPoleWanderRadiansColumn=r,e._ut1MinusUtcSecondsColumn=o,e._xCelestialPoleOffsetRadiansColumn=a,e._yCelestialPoleOffsetRadiansColumn=s,e._taiMinusUtcSecondsColumn=l,e._columnCount=t.columnNames.length,e._lastIndex=void 0;for(var h,d=e._addNewLeapSeconds,f=0,p=u.length;f<p;f+=e._columnCount){var _=u[f+i],m=u[f+l],$=new o$10(_+h$1a.MODIFIED_JULIAN_DATE_DIFFERENCE,m,J$14.TAI);if(c.push($),d){if(m!==h&&t$$(h)){var g=o$10.leapSeconds,y=u$16(g,$,A$1d);if(y<0){var v=new f$15($,m);g.splice(~y,0,v)}}h=m}}}}else e._dataError="Error in loaded EOP data: The samples property is required.";else e._dataError="Error in loaded EOP data: The columnNames property is required."}function w$1a(e,t,i,n,r){var o=i*n;r.xPoleWander=t[o+e._xPoleWanderRadiansColumn],r.yPoleWander=t[o+e._yPoleWanderRadiansColumn],r.xPoleOffset=t[o+e._xCelestialPoleOffsetRadiansColumn],r.yPoleOffset=t[o+e._yCelestialPoleOffsetRadiansColumn],r.ut1MinusUtc=t[o+e._ut1MinusUtcSecondsColumn]}function O$$(e,t,i){return t+e*(i-t)}function D$1b(e,t,i,n,r,o,a){var s=e._columnCount;if(o>t.length-1)return a.xPoleWander=0,a.yPoleWander=0,a.xPoleOffset=0,a.yPoleOffset=0,a.ut1MinusUtc=0,a;var l=t[r],u=t[o];if(l.equals(u)||n.equals(l))return w$1a(e,i,r,s,a),a;if(n.equals(u))return w$1a(e,i,o,s,a),a;var c=o$10.secondsDifference(n,l)/o$10.secondsDifference(u,l),h=r*s,d=o*s,f=i[h+e._ut1MinusUtcSecondsColumn],p=i[d+e._ut1MinusUtcSecondsColumn],_=p-f;if(_>.5||_<-.5){var m=i[h+e._taiMinusUtcSecondsColumn],$=i[d+e._taiMinusUtcSecondsColumn];m!==$&&(u.equals(n)?f=p:p-=$-m)}return a.xPoleWander=O$$(c,i[h+e._xPoleWanderRadiansColumn],i[d+e._xPoleWanderRadiansColumn]),a.yPoleWander=O$$(c,i[h+e._yPoleWanderRadiansColumn],i[d+e._yPoleWanderRadiansColumn]),a.xPoleOffset=O$$(c,i[h+e._xCelestialPoleOffsetRadiansColumn],i[d+e._xCelestialPoleOffsetRadiansColumn]),a.yPoleOffset=O$$(c,i[h+e._yCelestialPoleOffsetRadiansColumn],i[d+e._yCelestialPoleOffsetRadiansColumn]),a.ut1MinusUtc=O$$(c,f,p),a}function e$1L(e,t,i){this.heading=e$1Y(e,0),this.pitch=e$1Y(t,0),this.roll=e$1Y(i,0)}function s$1j(e,t,i){this.x=e,this.y=t,this.s=i}function w$19(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._xysFileUrlTemplate=t$X.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=e$1Y(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=e$1Y(e.sampleZeroJulianEphemerisDate,2442396.5),this._sampleZeroDateTT=new o$10(this._sampleZeroJulianEphemerisDate,0,J$14.TAI),this._stepSizeDays=e$1Y(e.stepSizeDays,1),this._samplesPerXysFile=e$1Y(e.samplesPerXysFile,1e3),this._totalSamples=e$1Y(e.totalSamples,27426),this._samples=new Array(3*this._totalSamples),this._chunkDownloadsInProgress=[];for(var t=this._interpolationOrder,i=this._denominators=new Array(t+1),n=this._xTable=new Array(t+1),r=Math.pow(this._stepSizeDays,t),o=0;o<=t;++o){i[o]=r,n[o]=o*this._stepSizeDays;for(var a=0;a<=t;++a)a!==o&&(i[o]*=o-a);i[o]=1/i[o]}this._work=new Array(t+1),this._coef=new Array(t+1)}o$10.toGregorianDate=function(e,t){if(!t$$(e))throw new t$_("julianDate is required.");var i=!1,n=F$1c(e,b$1r);t$$(n)||(o$10.addSeconds(e,-1,b$1r),n=F$1c(b$1r,b$1r),i=!0);var r=n.dayNumber,o=n.secondsOfDay;o>=43200&&(r+=1);var a=r+68569|0,s=4*a/146097|0,l=4e3*((a=a-((146097*s+3)/4|0)|0)+1)/1461001|0,u=80*(a=a-(1461*l/4|0)+31|0)/2447|0,c=a-(2447*u/80|0)|0,h=u+2-12*(a=u/11|0)|0,d=100*(s-49)+l+a|0,f=o/h$1a.SECONDS_PER_HOUR|0,p=o-f*h$1a.SECONDS_PER_HOUR,_=p/h$1a.SECONDS_PER_MINUTE|0,m=0|(p-=_*h$1a.SECONDS_PER_MINUTE),$=(p-m)/h$1a.SECONDS_PER_MILLISECOND;return(f+=12)>23&&(f-=24),i&&(m+=1),t$$(t)?(t.year=d,t.month=h,t.day=c,t.hour=f,t.minute=_,t.second=m,t.millisecond=$,t.isLeapSecond=i,t):new d$15(d,h,c,f,_,m,$,i)},o$10.toDate=function(e){if(!t$$(e))throw new t$_("julianDate is required.");var t=o$10.toGregorianDate(e,x$1h),i=t.second;return t.isLeapSecond&&(i-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,i,t.millisecond))},o$10.toIso8601=function(e,t){if(!t$$(e))throw new t$_("julianDate is required.");var i=o$10.toGregorianDate(e,x$1h),n=i.year,r=i.month,o=i.day,a=i.hour,s=i.minute,l=i.second,u=i.millisecond;return 1e4===n&&1===r&&1===o&&0===a&&0===s&&0===l&&0===u&&(n=9999,r=12,o=31,a=24),t$$(t)||0===u?t$$(t)&&0!==t?$$10("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",n,r,o,a,s,l,(.01*u).toFixed(t).replace(".","").slice(0,t)):$$10("%04d-%02d-%02dT%02d:%02d:%02dZ",n,r,o,a,s,l):$$10("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",n,r,o,a,s,l,(.01*u).toString().replace(".",""))},o$10.clone=function(e,t){if(t$$(e))return t$$(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new o$10(e.dayNumber,e.secondsOfDay,J$14.TAI)},o$10.compare=function(e,t){if(!t$$(e))throw new t$_("left is required.");if(!t$$(t))throw new t$_("right is required.");var i=e.dayNumber-t.dayNumber;return 0!==i?i:e.secondsOfDay-t.secondsOfDay},o$10.equals=function(e,t){return e===t||t$$(e)&&t$$(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay},o$10.equalsEpsilon=function(e,t,i){if(!t$$(i))throw new t$_("epsilon is required.");return e===t||t$$(e)&&t$$(t)&&Math.abs(o$10.secondsDifference(e,t))<=i},o$10.totalDays=function(e){if(!t$$(e))throw new t$_("julianDate is required.");return e.dayNumber+e.secondsOfDay/h$1a.SECONDS_PER_DAY},o$10.secondsDifference=function(e,t){if(!t$$(e))throw new t$_("left is required.");if(!t$$(t))throw new t$_("right is required.");return(e.dayNumber-t.dayNumber)*h$1a.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)},o$10.daysDifference=function(e,t){if(!t$$(e))throw new t$_("left is required.");if(!t$$(t))throw new t$_("right is required.");return e.dayNumber-t.dayNumber+(e.secondsOfDay-t.secondsOfDay)/h$1a.SECONDS_PER_DAY},o$10.computeTaiMinusUtc=function(e){C$17.julianDate=e;var t=o$10.leapSeconds,i=u$16(t,C$17,Y$Y);return i<0&&(i=~i,--i<0&&(i=0)),t[i].offset},o$10.addSeconds=function(e,t,i){if(!t$$(e))throw new t$_("julianDate is required.");if(!t$$(t))throw new t$_("seconds is required.");if(!t$$(i))throw new t$_("result is required.");return N$15(e.dayNumber,e.secondsOfDay+t,i)},o$10.addMinutes=function(e,t,i){if(!t$$(e))throw new t$_("julianDate is required.");if(!t$$(t))throw new t$_("minutes is required.");if(!t$$(i))throw new t$_("result is required.");var n=e.secondsOfDay+t*h$1a.SECONDS_PER_MINUTE;return N$15(e.dayNumber,n,i)},o$10.addHours=function(e,t,i){if(!t$$(e))throw new t$_("julianDate is required.");if(!t$$(t))throw new t$_("hours is required.");if(!t$$(i))throw new t$_("result is required.");var n=e.secondsOfDay+t*h$1a.SECONDS_PER_HOUR;return N$15(e.dayNumber,n,i)},o$10.addDays=function(e,t,i){if(!t$$(e))throw new t$_("julianDate is required.");if(!t$$(t))throw new t$_("days is required.");if(!t$$(i))throw new t$_("result is required.");return N$15(e.dayNumber+t,e.secondsOfDay,i)},o$10.lessThan=function(e,t){return o$10.compare(e,t)<0},o$10.lessThanOrEquals=function(e,t){return o$10.compare(e,t)<=0},o$10.greaterThan=function(e,t){return o$10.compare(e,t)>0},o$10.greaterThanOrEquals=function(e,t){return o$10.compare(e,t)>=0},o$10.prototype.clone=function(e){return o$10.clone(this,e)},o$10.prototype.equals=function(e){return o$10.equals(this,e)},o$10.prototype.equalsEpsilon=function(e,t){return o$10.equalsEpsilon(this,e,t)},o$10.prototype.toString=function(){return o$10.toIso8601(this)},o$10.leapSeconds=[new f$15(new o$10(2441317,43210,J$14.TAI),10),new f$15(new o$10(2441499,43211,J$14.TAI),11),new f$15(new o$10(2441683,43212,J$14.TAI),12),new f$15(new o$10(2442048,43213,J$14.TAI),13),new f$15(new o$10(2442413,43214,J$14.TAI),14),new f$15(new o$10(2442778,43215,J$14.TAI),15),new f$15(new o$10(2443144,43216,J$14.TAI),16),new f$15(new o$10(2443509,43217,J$14.TAI),17),new f$15(new o$10(2443874,43218,J$14.TAI),18),new f$15(new o$10(2444239,43219,J$14.TAI),19),new f$15(new o$10(2444786,43220,J$14.TAI),20),new f$15(new o$10(2445151,43221,J$14.TAI),21),new f$15(new o$10(2445516,43222,J$14.TAI),22),new f$15(new o$10(2446247,43223,J$14.TAI),23),new f$15(new o$10(2447161,43224,J$14.TAI),24),new f$15(new o$10(2447892,43225,J$14.TAI),25),new f$15(new o$10(2448257,43226,J$14.TAI),26),new f$15(new o$10(2448804,43227,J$14.TAI),27),new f$15(new o$10(2449169,43228,J$14.TAI),28),new f$15(new o$10(2449534,43229,J$14.TAI),29),new f$15(new o$10(2450083,43230,J$14.TAI),30),new f$15(new o$10(2450630,43231,J$14.TAI),31),new f$15(new o$10(2451179,43232,J$14.TAI),32),new f$15(new o$10(2453736,43233,J$14.TAI),33),new f$15(new o$10(2454832,43234,J$14.TAI),34),new f$15(new o$10(2456109,43235,J$14.TAI),35),new f$15(new o$10(2457204,43236,J$14.TAI),36),new f$15(new o$10(2457754,43237,J$14.TAI),37)],R$Z.NONE=Object.freeze({getPromiseToLoad:function(){return c$18()},compute:function(e,t){return t$$(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new n$16(0,0,0,0,0),t}}),R$Z.prototype.getPromiseToLoad=function(){return c$18(this._downloadPromise)},R$Z.prototype.compute=function(e,t){if(t$$(this._samples)){if(t$$(t)||(t=new n$16(0,0,0,0,0)),0===this._samples.length)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;var i=this._dates,n=this._lastIndex,r=0,o=0;if(t$$(n)){var a=i[n],s=i[n+1],l=o$10.lessThanOrEquals(a,e),u=!t$$(s),c=u||o$10.greaterThanOrEquals(s,e);if(l&&c)return r=n,!u&&s.equals(e)&&++r,o=r+1,D$1b(this,i,this._samples,e,r,o,t),t}var h=u$16(i,e,o$10.compare,this._dateColumn);return h>=0?(h<i.length-1&&i[h+1].equals(e)&&++h,r=h,o=h):(r=(o=~h)-1)<0&&(r=0),this._lastIndex=r,D$1b(this,i,this._samples,e,r,o,t),t}if(t$$(this._dataError))throw new t$Z(this._dataError)},e$1L.fromQuaternion=function(e,t){if(!t$$(e))throw new t$_("quaternion is required");t$$(t)||(t=new e$1L);var i=2*(e.w*e.y-e.z*e.x),n=1-2*(e.x*e.x+e.y*e.y),r=2*(e.w*e.x+e.y*e.z),o=1-2*(e.y*e.y+e.z*e.z),a=2*(e.w*e.z+e.x*e.y);return t.heading=-Math.atan2(a,o),t.roll=Math.atan2(r,n),t.pitch=-n$1d.asinClamped(i),t},e$1L.fromDegrees=function(e,t,i,n){if(!t$$(e))throw new t$_("heading is required");if(!t$$(t))throw new t$_("pitch is required");if(!t$$(i))throw new t$_("roll is required");return t$$(n)||(n=new e$1L),n.heading=e*n$1d.RADIANS_PER_DEGREE,n.pitch=t*n$1d.RADIANS_PER_DEGREE,n.roll=i*n$1d.RADIANS_PER_DEGREE,n},e$1L.clone=function(e,t){if(t$$(e))return t$$(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new e$1L(e.heading,e.pitch,e.roll)},e$1L.equals=function(e,t){return e===t||t$$(e)&&t$$(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll},e$1L.equalsEpsilon=function(e,t,i,n){return e===t||t$$(e)&&t$$(t)&&n$1d.equalsEpsilon(e.heading,t.heading,i,n)&&n$1d.equalsEpsilon(e.pitch,t.pitch,i,n)&&n$1d.equalsEpsilon(e.roll,t.roll,i,n)},e$1L.prototype.clone=function(e){return e$1L.clone(this,e)},e$1L.prototype.equals=function(e){return e$1L.equals(this,e)},e$1L.prototype.equalsEpsilon=function(e,t,i){return e$1L.equalsEpsilon(this,e,t,i)},e$1L.prototype.toString=function(){return"("+this.heading+", "+this.pitch+", "+this.roll+")"};var x$1g=new o$10(0,0,J$14.TAI);function c$14(e,t,i){var n=x$1g;return n.dayNumber=t,n.secondsOfDay=i,o$10.daysDifference(n,e._sampleZeroDateTT)}function P$11(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];var i=c$18.defer();e._chunkDownloadsInProgress[t]=i;var n=e._xysFileUrlTemplate;return c$18((t$$(n)?n.getDerivedResource({templateValues:{0:t}}):new t$X({url:o$12("Assets/IAU2006_XYS/IAU2006_XYS_"+t+".json")})).fetchJson(),(function(n){e._chunkDownloadsInProgress[t]=!1;for(var r=e._samples,o=n.samples,a=t*e._samplesPerXysFile*3,s=0,l=o.length;s<l;++s)r[a+s]=o[s];i.resolve()})),i.promise}w$19.prototype.preload=function(e,t,i,n){var r=c$14(this,e,t),o=c$14(this,i,n),a=r/this._stepSizeDays-this._interpolationOrder/2|0;a<0&&(a=0);var s=o/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;s>=this._totalSamples&&(s=this._totalSamples-1);for(var l=a/this._samplesPerXysFile|0,u=s/this._samplesPerXysFile|0,c=[],h=l;h<=u;++h)c.push(P$11(this,h));return c$18.all(c)},w$19.prototype.computeXysRadians=function(e,t,i){var n=c$14(this,e,t);if(!(n<0)){var r=n/this._stepSizeDays|0;if(!(r>=this._totalSamples)){var o=this._interpolationOrder,a=r-(o/2|0);a<0&&(a=0);var s=a+o;s>=this._totalSamples&&((a=(s=this._totalSamples-1)-o)<0&&(a=0));var l=!1,u=this._samples;if(t$$(u[3*a])||(P$11(this,a/this._samplesPerXysFile|0),l=!0),t$$(u[3*s])||(P$11(this,s/this._samplesPerXysFile|0),l=!0),!l){t$$(i)?(i.x=0,i.y=0,i.s=0):i=new s$1j(0,0,0);var c,h,d=n-a*this._stepSizeDays,f=this._work,p=this._denominators,_=this._coef,m=this._xTable;for(c=0;c<=o;++c)f[c]=d-m[c];for(c=0;c<=o;++c){for(_[c]=1,h=0;h<=o;++h)h!==c&&(_[c]*=f[h]);_[c]*=p[c];var $=3*(a+c);i.x+=_[c]*u[$++],i.y+=_[c]*u[$++],i.s+=_[c]*u[$]}return i}}}};var u$15,l$13={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},n$15={},r$S,f$14,W$1c,l$12,V$V,A$1c,w$18,p$1j,b$1q,d$14,F$1b,v$15,S$X,E$19,C$16,I$1b,k$18,m$14,s$1i,i$15;function a$V(e){for(var t=e.split("."),i=0,n=t.length;i<n;++i)t[i]=parseInt(t[i],10);return t}function h$19(){if(!t$$(f$14)&&(f$14=!1,!c$13())){var e=/ Chrome\/([\.0-9]+)/.exec(r$S.userAgent);null!==e&&(f$14=!0,W$1c=a$V(e[1]))}return f$14}function G$11(){return h$19()&&W$1c}function P$10(){if(!t$$(l$12)&&(l$12=!1,!h$19()&&!c$13()&&/ Safari\/[\.0-9]+/.test(r$S.userAgent))){var e=/ Version\/([\.0-9]+)/.exec(r$S.userAgent);null!==e&&(l$12=!0,V$V=a$V(e[1]))}return l$12}function K$W(){return P$10()&&V$V}function U$13(){if(!t$$(A$1c)){A$1c=!1;var e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(r$S.userAgent);null!==e&&(A$1c=!0,(w$18=a$V(e[1])).isNightly=!!e[2])}return A$1c}function L$17(){return U$13()&&w$18}function B$V(){var e;t$$(p$1j)||(p$1j=!1,"Microsoft Internet Explorer"===r$S.appName?null!==(e=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(r$S.userAgent))&&(p$1j=!0,b$1q=a$V(e[1])):"Netscape"===r$S.appName&&(null!==(e=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(r$S.userAgent))&&(p$1j=!0,b$1q=a$V(e[1]))));return p$1j}function X$V(){return B$V()&&b$1q}function c$13(){if(!t$$(d$14)){d$14=!1;var e=/ Edge\/([\.0-9]+)/.exec(r$S.userAgent);null!==e&&(d$14=!0,F$1b=a$V(e[1]))}return d$14}function Y$X(){return c$13()&&F$1b}function x$1f(){if(!t$$(v$15)){v$15=!1;var e=/Firefox\/([\.0-9]+)/.exec(r$S.userAgent);null!==e&&(v$15=!0,S$X=a$V(e[1]))}return v$15}function q$1d(){return t$$(E$19)||(E$19=/Windows/i.test(r$S.appVersion)),E$19}function H$16(){return x$1f()&&S$X}function Z$13(){return t$$(C$16)||(C$16="object"==typeof process&&"[object process]"===Object.prototype.toString.call(process)),C$16}function _$1c(){return t$$(I$1b)||(I$1b=!x$1f()&&typeof PointerEvent<"u"&&(!t$$(r$S.pointerEnabled)||r$S.pointerEnabled)),I$1b}function N$14(){if(!t$$(m$14)){var e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");var t=e.style.imageRendering;(m$14=t$$(t)&&""!==t)&&(k$18=t)}return m$14}function $$$(){return N$14()?k$18:void 0}function R$Y(){if(t$$(i$15))return i$15.promise;i$15=c$18.defer(),c$13()&&(s$1i=!1,i$15.resolve(s$1i));var e=new Image;return e.onload=function(){s$1i=e.width>0&&e.height>0,i$15.resolve(s$1i)},e.onerror=function(){s$1i=!1,i$15.resolve(s$1i)},e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",i$15.promise}function ee$E(){return t$$(i$15)||R$Y(),s$1i}Object.defineProperties(n$15,{element:{get:function(){if(n$15.supportsFullscreen())return document[l$13.fullscreenElement]}},changeEventName:{get:function(){if(n$15.supportsFullscreen())return l$13.fullscreenchange}},errorEventName:{get:function(){if(n$15.supportsFullscreen())return l$13.fullscreenerror}},enabled:{get:function(){if(n$15.supportsFullscreen())return document[l$13.fullscreenEnabled]}},fullscreen:{get:function(){if(n$15.supportsFullscreen())return null!==n$15.element}}}),n$15.supportsFullscreen=function(){if(t$$(u$15))return u$15;u$15=!1;var e=document.body;if("function"==typeof e.requestFullscreen)return l$13.requestFullscreen="requestFullscreen",l$13.exitFullscreen="exitFullscreen",l$13.fullscreenEnabled="fullscreenEnabled",l$13.fullscreenElement="fullscreenElement",l$13.fullscreenchange="fullscreenchange",l$13.fullscreenerror="fullscreenerror",u$15=!0;for(var t,i=["webkit","moz","o","ms","khtml"],n=0,r=i.length;n<r;++n){var o=i[n];"function"==typeof e[t=o+"RequestFullscreen"]?(l$13.requestFullscreen=t,u$15=!0):"function"==typeof e[t=o+"RequestFullScreen"]&&(l$13.requestFullscreen=t,u$15=!0),t=o+"ExitFullscreen","function"==typeof document[t]?l$13.exitFullscreen=t:(t=o+"CancelFullScreen","function"==typeof document[t]&&(l$13.exitFullscreen=t)),t=o+"FullscreenEnabled",void 0!==document[t]?l$13.fullscreenEnabled=t:(t=o+"FullScreenEnabled",void 0!==document[t]&&(l$13.fullscreenEnabled=t)),t=o+"FullscreenElement",void 0!==document[t]?l$13.fullscreenElement=t:(t=o+"FullScreenElement",void 0!==document[t]&&(l$13.fullscreenElement=t)),t=o+"fullscreenchange",void 0!==document["on"+t]&&("ms"===o&&(t="MSFullscreenChange"),l$13.fullscreenchange=t),t=o+"fullscreenerror",void 0!==document["on"+t]&&("ms"===o&&(t="MSFullscreenError"),l$13.fullscreenerror=t)}return u$15},n$15.requestFullscreen=function(e,t){!n$15.supportsFullscreen()||e[l$13.requestFullscreen]({vrDisplay:t})},n$15.exitFullscreen=function(){!n$15.supportsFullscreen()||document[l$13.exitFullscreen]()},n$15._names=l$13,r$S=typeof navigator<"u"?navigator:{};var y$14=[];typeof ArrayBuffer<"u"&&(y$14.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&y$14.push(Uint8ClampedArray),typeof CanvasPixelArray<"u"&&y$14.push(CanvasPixelArray));var o$$={isChrome:h$19,chromeVersion:G$11,isSafari:P$10,safariVersion:K$W,isWebkit:U$13,webkitVersion:L$17,isInternetExplorer:B$V,internetExplorerVersion:X$V,isEdge:c$13,edgeVersion:Y$X,isFirefox:x$1f,firefoxVersion:H$16,isWindows:q$1d,isNodeJs:Z$13,hardwareConcurrency:e$1Y(r$S.hardwareConcurrency,3),supportsPointerEvents:_$1c,supportsImageRenderingPixelated:N$14,supportsWebP:R$Y,supportsWebPSync:ee$E,imageRenderingValue:$$$,typedArrayTypes:y$14,isPCBroswer:re$H};function re$H(){var e=window.navigator.userAgent.toLowerCase(),t="ipad"==e.match(/ipad/i),i="iphone os"==e.match(/iphone os/i),n="midp"==e.match(/midp/i),r="rv:1.2.3.4"==e.match(/rv:1.2.3.4/i),o="ucweb"==e.match(/ucweb/i),a="android"==e.match(/android/i),s="windows ce"==e.match(/windows ce/i),l="windows mobile"==e.match(/windows mobile/i);return!(t||i||n||r||o||a||s||l)}function a$U(e,t,i,n){this.x=e$1Y(e,0),this.y=e$1Y(t,0),this.z=e$1Y(i,0),this.w=e$1Y(n,0)}o$$.supportsFullscreen=function(){return n$15.supportsFullscreen()},o$$.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"},o$$.supportsWebWorkers=function(){return typeof Worker<"u"},o$$.supportsWebAssembly=function(){return typeof WebAssembly<"u"&&!o$$.isEdge()},o$$.supportsOffscreenCanvas=function(){return typeof OffscreenCanvas<"u"&&!o$$.isEdge()};var M$1e=new a$11;a$U.fromAxisAngle=function(e,t,i){n$1e.typeOf.object("axis",e),n$1e.typeOf.number("angle",t);var n=t/2,r=Math.sin(n),o=(M$1e=a$11.normalize(e,M$1e)).x*r,a=M$1e.y*r,s=M$1e.z*r,l=Math.cos(n);return t$$(i)?(i.x=o,i.y=a,i.z=s,i.w=l,i):new a$U(o,a,s,l)};var J$12=[1,2,0],K$V=new Array(3);a$U.fromRotationMatrix=function(e,t){n$1e.typeOf.object("matrix",e);var i,n,r,o,a,s=e[r$W.COLUMN0ROW0],l=e[r$W.COLUMN1ROW1],u=e[r$W.COLUMN2ROW2],c=s+l+u;if(c>0)a=.5*(i=Math.sqrt(c+1)),i=.5/i,n=(e[r$W.COLUMN1ROW2]-e[r$W.COLUMN2ROW1])*i,r=(e[r$W.COLUMN2ROW0]-e[r$W.COLUMN0ROW2])*i,o=(e[r$W.COLUMN0ROW1]-e[r$W.COLUMN1ROW0])*i;else{var h=J$12,d=0;l>s&&(d=1),u>s&&u>l&&(d=2);var f=h[d],p=h[f];i=Math.sqrt(e[r$W.getElementIndex(d,d)]-e[r$W.getElementIndex(f,f)]-e[r$W.getElementIndex(p,p)]+1);var _=K$V;_[d]=.5*i,i=.5/i,a=(e[r$W.getElementIndex(p,f)]-e[r$W.getElementIndex(f,p)])*i,_[f]=(e[r$W.getElementIndex(f,d)]+e[r$W.getElementIndex(d,f)])*i,_[p]=(e[r$W.getElementIndex(p,d)]+e[r$W.getElementIndex(d,p)])*i,n=-_[0],r=-_[1],o=-_[2]}return t$$(t)?(t.x=n,t.y=r,t.z=o,t.w=a,t):new a$U(n,r,o,a)};var Y$W=new a$U,D$1a=new a$U,T$14=new a$U,F$1a=new a$U;a$U.fromHeadingPitchRoll=function(e,t){return n$1e.typeOf.object("headingPitchRoll",e),F$1a=a$U.fromAxisAngle(a$11.UNIT_X,e.roll,Y$W),T$14=a$U.fromAxisAngle(a$11.UNIT_Y,-e.pitch,t),t=a$U.multiply(T$14,F$1a,T$14),D$1a=a$U.fromAxisAngle(a$11.UNIT_Z,-e.heading,Y$W),a$U.multiply(D$1a,t,t)};var N$13=new a$11,C$15=new a$11,w$17=new a$U,Z$12=new a$U,L$16=new a$U;a$U.packedLength=4,a$U.pack=function(e,t,i){return n$1e.typeOf.object("value",e),n$1e.defined("array",t),i=e$1Y(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.z,t[i]=e.w,t},a$U.unpack=function(e,t,i){return n$1e.defined("array",e),t=e$1Y(t,0),t$$(i)||(i=new a$U),i.x=e[t],i.y=e[t+1],i.z=e[t+2],i.w=e[t+3],i},a$U.packedInterpolationLength=3,a$U.convertPackedArrayForInterpolation=function(e,t,i,n){a$U.unpack(e,4*i,L$16),a$U.conjugate(L$16,L$16);for(var r=0,o=i-t+1;r<o;r++){var a=3*r;a$U.unpack(e,4*(t+r),w$17),a$U.multiply(w$17,L$16,w$17),w$17.w<0&&a$U.negate(w$17,w$17),a$U.computeAxis(w$17,N$13);var s=a$U.computeAngle(w$17);n[a]=N$13.x*s,n[a+1]=N$13.y*s,n[a+2]=N$13.z*s}},a$U.unpackInterpolationResult=function(e,t,i,n,r){t$$(r)||(r=new a$U),a$11.fromArray(e,0,C$15);var o=a$11.magnitude(C$15);return a$U.unpack(t,4*n,Z$12),0===o?a$U.clone(a$U.IDENTITY,w$17):a$U.fromAxisAngle(C$15,o,w$17),a$U.multiply(w$17,Z$12,r)},a$U.clone=function(e,t){if(t$$(e))return t$$(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new a$U(e.x,e.y,e.z,e.w)},a$U.conjugate=function(e,t){return n$1e.typeOf.object("quaternion",e),n$1e.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t},a$U.magnitudeSquared=function(e){return n$1e.typeOf.object("quaternion",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},a$U.magnitude=function(e){return Math.sqrt(a$U.magnitudeSquared(e))},a$U.normalize=function(e,t){n$1e.typeOf.object("result",t);var i=1/a$U.magnitude(e),n=e.x*i,r=e.y*i,o=e.z*i,a=e.w*i;return t.x=n,t.y=r,t.z=o,t.w=a,t},a$U.inverse=function(e,t){n$1e.typeOf.object("result",t);var i=a$U.magnitudeSquared(e);return t=a$U.conjugate(e,t),a$U.multiplyByScalar(t,1/i,t)},a$U.add=function(e,t,i){return n$1e.typeOf.object("left",e),n$1e.typeOf.object("right",t),n$1e.typeOf.object("result",i),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$U.subtract=function(e,t,i){return n$1e.typeOf.object("left",e),n$1e.typeOf.object("right",t),n$1e.typeOf.object("result",i),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$U.negate=function(e,t){return n$1e.typeOf.object("quaternion",e),n$1e.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},a$U.dot=function(e,t){return n$1e.typeOf.object("left",e),n$1e.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},a$U.multiply=function(e,t,i){n$1e.typeOf.object("left",e),n$1e.typeOf.object("right",t),n$1e.typeOf.object("result",i);var n=e.x,r=e.y,o=e.z,a=e.w,s=t.x,l=t.y,u=t.z,c=t.w,h=a*s+n*c+r*u-o*l,d=a*l-n*u+r*c+o*s,f=a*u+n*l-r*s+o*c,p=a*c-n*s-r*l-o*u;return i.x=h,i.y=d,i.z=f,i.w=p,i},a$U.multiplyByVec=function(e,t,i){var n=new a$11,r=new a$11,o=new a$11(e.x,e.y,e.z);n=a$11.cross(o,t,n),r=a$11.cross(o,n,r);var a=new a$11;a=a$11.multiplyByScalar(n,2*e.w,a);var s=new a$11;return s=a$11.multiplyByScalar(n,2,s),i=a$11.add(t,a,i),i=a$11.add(i,s,i)},a$U.multiplyByScalar=function(e,t,i){return n$1e.typeOf.object("quaternion",e),n$1e.typeOf.number("scalar",t),n$1e.typeOf.object("result",i),i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i.w=e.w*t,i},a$U.divideByScalar=function(e,t,i){return n$1e.typeOf.object("quaternion",e),n$1e.typeOf.number("scalar",t),n$1e.typeOf.object("result",i),i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i.w=e.w/t,i},a$U.computeAxis=function(e,t){n$1e.typeOf.object("quaternion",e),n$1e.typeOf.object("result",t);var i=e.w;if(Math.abs(i-1)<n$1d.EPSILON6)return t.x=t.y=t.z=0,t;var n=1/Math.sqrt(1-i*i);return t.x=e.x*n,t.y=e.y*n,t.z=e.z*n,t},a$U.computeAngle=function(e){return n$1e.typeOf.object("quaternion",e),Math.abs(e.w-1)<n$1d.EPSILON6?0:2*Math.acos(e.w)};var k$17=new a$U;a$U.lerp=function(e,t,i,n){return n$1e.typeOf.object("start",e),n$1e.typeOf.object("end",t),n$1e.typeOf.number("t",i),n$1e.typeOf.object("result",n),k$17=a$U.multiplyByScalar(t,i,k$17),n=a$U.multiplyByScalar(e,1-i,n),a$U.add(k$17,n,n)};var H$15=new a$U,W$1b=new a$U,U$12=new a$U;a$U.slerp=function(e,t,i,n){n$1e.typeOf.object("start",e),n$1e.typeOf.object("end",t),n$1e.typeOf.number("t",i),n$1e.typeOf.object("result",n);var r=a$U.dot(e,t),o=t;if(r<0&&(r=-r,o=H$15=a$U.negate(t,H$15)),1-r<n$1d.EPSILON6)return a$U.lerp(e,o,i,n);var a=Math.acos(r);return W$1b=a$U.multiplyByScalar(e,Math.sin((1-i)*a),W$1b),U$12=a$U.multiplyByScalar(o,Math.sin(i*a),U$12),n=a$U.add(W$1b,U$12,n),a$U.multiplyByScalar(n,1/Math.sin(a),n)},a$U.log=function(e,t){n$1e.typeOf.object("quaternion",e),n$1e.typeOf.object("result",t);var i=n$1d.acosClamped(e.w),n=0;return 0!==i&&(n=i/Math.sin(i)),a$11.multiplyByScalar(e,n,t)},a$U.exp=function(e,t){n$1e.typeOf.object("cartesian",e),n$1e.typeOf.object("result",t);var i=a$11.magnitude(e),n=0;return 0!==i&&(n=Math.sin(i)/i),t.x=e.x*n,t.y=e.y*n,t.z=e.z*n,t.w=Math.cos(i),t};var Q$11=new a$11,V$U=new a$11,S$W=new a$U,q$1c=new a$U;a$U.computeInnerQuadrangle=function(e,t,i,n){n$1e.typeOf.object("q0",e),n$1e.typeOf.object("q1",t),n$1e.typeOf.object("q2",i),n$1e.typeOf.object("result",n);var r=a$U.conjugate(t,S$W);a$U.multiply(r,i,q$1c);var o=a$U.log(q$1c,Q$11);a$U.multiply(r,e,q$1c);var a=a$U.log(q$1c,V$U);return a$11.add(o,a,o),a$11.multiplyByScalar(o,.25,o),a$11.negate(o,o),a$U.exp(o,S$W),a$U.multiply(t,S$W,n)},a$U.squad=function(e,t,i,n,r,o){n$1e.typeOf.object("q0",e),n$1e.typeOf.object("q1",t),n$1e.typeOf.object("s0",i),n$1e.typeOf.object("s1",n),n$1e.typeOf.number("t",r),n$1e.typeOf.object("result",o);var a=a$U.slerp(e,t,r,S$W),s=a$U.slerp(i,n,r,q$1c);return a$U.slerp(a,s,2*r*(1-r),o)};for(var $$_=new a$U,_$1b=1.9011074535173003,R$X=o$$.supportsTypedArrays()?new Float32Array(8):[],B$U=o$$.supportsTypedArrays()?new Float32Array(8):[],d$13=o$$.supportsTypedArrays()?new Float32Array(8):[],z$V=o$$.supportsTypedArrays()?new Float32Array(8):[],A$1b=0;A$1b<7;++A$1b){var P$$=A$1b+1,G$10=2*P$$+1;R$X[A$1b]=1/(P$$*G$10),B$U[A$1b]=P$$/G$10}R$X[7]=_$1b/136,B$U[7]=8*_$1b/17,a$U.fastSlerp=function(e,t,i,n){n$1e.typeOf.object("start",e),n$1e.typeOf.object("end",t),n$1e.typeOf.number("t",i),n$1e.typeOf.object("result",n);var r,o=a$U.dot(e,t);o>=0?r=1:(r=-1,o=-o);for(var a=o-1,s=1-i,l=i*i,u=s*s,c=7;c>=0;--c)d$13[c]=(R$X[c]*l-B$U[c])*a,z$V[c]=(R$X[c]*u-B$U[c])*a;var h=r*i*(1+d$13[0]*(1+d$13[1]*(1+d$13[2]*(1+d$13[3]*(1+d$13[4]*(1+d$13[5]*(1+d$13[6]*(1+d$13[7])))))))),d=s*(1+z$V[0]*(1+z$V[1]*(1+z$V[2]*(1+z$V[3]*(1+z$V[4]*(1+z$V[5]*(1+z$V[6]*(1+z$V[7])))))))),f=a$U.multiplyByScalar(e,d,$$_);return a$U.multiplyByScalar(t,h,n),a$U.add(f,n,n)},a$U.fastSquad=function(e,t,i,n,r,o){n$1e.typeOf.object("q0",e),n$1e.typeOf.object("q1",t),n$1e.typeOf.object("s0",i),n$1e.typeOf.object("s1",n),n$1e.typeOf.number("t",r),n$1e.typeOf.object("result",o);var a=a$U.fastSlerp(e,t,r,S$W),s=a$U.fastSlerp(i,n,r,q$1c);return a$U.fastSlerp(a,s,2*r*(1-r),o)},a$U.equals=function(e,t){return e===t||t$$(e)&&t$$(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},a$U.equalsEpsilon=function(e,t,i){return n$1e.typeOf.number("epsilon",i),e===t||t$$(e)&&t$$(t)&&Math.abs(e.x-t.x)<=i&&Math.abs(e.y-t.y)<=i&&Math.abs(e.z-t.z)<=i&&Math.abs(e.w-t.w)<=i},a$U.ZERO=Object.freeze(new a$U(0,0,0,0)),a$U.IDENTITY=Object.freeze(new a$U(0,0,0,1)),a$U.prototype.clone=function(e){return a$U.clone(this,e)},a$U.prototype.equals=function(e){return a$U.equals(this,e)},a$U.prototype.equalsEpsilon=function(e,t){return a$U.equalsEpsilon(this,e,t)},a$U.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};var m$13={},L$15={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},_$1a={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},Y$V={},y$13={east:new a$11,north:new a$11,up:new a$11,west:new a$11,south:new a$11,down:new a$11},v$14=new a$11,F$19=new a$11,E$18=new a$11;m$13.localFrameToFixedFrameGenerator=function(e,t){if(!L$15.hasOwnProperty(e)||!L$15[e].hasOwnProperty(t))throw new t$_("firstAxis and secondAxis must be east, north, up, west, south or down.");var i,n=L$15[e][t],r=e+t;return t$$(Y$V[r])?i=Y$V[r]:(i=function(i,r,o){if(!t$$(i))throw new t$_("origin is required.");if(t$$(o)||(o=new c$1a),a$11.equalsEpsilon(i,a$11.ZERO,n$1d.EPSILON14))a$11.unpack(_$1a[e],0,v$14),a$11.unpack(_$1a[t],0,F$19),a$11.unpack(_$1a[n],0,E$18);else if(n$1d.equalsEpsilon(i.x,0,n$1d.EPSILON14)&&n$1d.equalsEpsilon(i.y,0,n$1d.EPSILON14)){var a=n$1d.sign(i.z);a$11.unpack(_$1a[e],0,v$14),"east"!==e&&"west"!==e&&a$11.multiplyByScalar(v$14,a,v$14),a$11.unpack(_$1a[t],0,F$19),"east"!==t&&"west"!==t&&a$11.multiplyByScalar(F$19,a,F$19),a$11.unpack(_$1a[n],0,E$18),"east"!==n&&"west"!==n&&a$11.multiplyByScalar(E$18,a,E$18)}else{(r=e$1Y(r,n$1c.WGS84)).geodeticSurfaceNormal(i,y$13.up);var s=y$13.up,l=y$13.east;l.x=-i.y,l.y=i.x,l.z=0,a$11.normalize(l,y$13.east),a$11.cross(s,l,y$13.north),a$11.multiplyByScalar(y$13.up,-1,y$13.down),a$11.multiplyByScalar(y$13.east,-1,y$13.west),a$11.multiplyByScalar(y$13.north,-1,y$13.south),v$14=y$13[e],F$19=y$13[t],E$18=y$13[n]}return o[0]=v$14.x,o[1]=v$14.y,o[2]=v$14.z,o[3]=0,o[4]=F$19.x,o[5]=F$19.y,o[6]=F$19.z,o[7]=0,o[8]=E$18.x,o[9]=E$18.y,o[10]=E$18.z,o[11]=0,o[12]=i.x,o[13]=i.y,o[14]=i.z,o[15]=1,o},Y$V[r]=i),i},m$13.eastNorthUpToFixedFrame=m$13.localFrameToFixedFrameGenerator("east","north"),m$13.northEastDownToFixedFrame=m$13.localFrameToFixedFrameGenerator("north","east"),m$13.northUpEastToFixedFrame=m$13.localFrameToFixedFrameGenerator("north","up"),m$13.northWestUpToFixedFrame=m$13.localFrameToFixedFrameGenerator("north","west");var de$y=new a$U,fe$v=new a$11(1,1,1),he$y=new c$1a;m$13.headingPitchRollToFixedFrame=function(e,t,i,n,r){n$1e.typeOf.object("HeadingPitchRoll",t),n=e$1Y(n,m$13.eastNorthUpToFixedFrame);var o=a$U.fromHeadingPitchRoll(t,de$y),a=c$1a.fromTranslationQuaternionRotationScale(a$11.ZERO,o,fe$v,he$y);return r=n(e,i,r),c$1a.multiply(r,a,r)};var ye$s=new c$1a,xe$z=new r$W;m$13.headingPitchRollQuaternion=function(e,t,i,n,r){n$1e.typeOf.object("HeadingPitchRoll",t);var o=m$13.headingPitchRollToFixedFrame(e,t,i,n,ye$s),a=c$1a.getMatrix3(o,xe$z);return a$U.fromRotationMatrix(a,r)};var Te$v=new a$11(1,1,1),ve$t=new a$11,ee$D=new c$1a,Fe$g=new c$1a,Ee$t=new r$W,Pe$q=new a$U;m$13.fixedFrameToHeadingPitchRoll=function(e,t,i,n){n$1e.defined("transform",e),t=e$1Y(t,n$1c.WGS84),i=e$1Y(i,m$13.eastNorthUpToFixedFrame),t$$(n)||(n=new e$1L);var r=c$1a.getTranslation(e,ve$t);if(a$11.equals(r,a$11.ZERO))return n.heading=0,n.pitch=0,n.roll=0,n;var o=c$1a.inverseTransformation(i(r,t,ee$D),ee$D),a=c$1a.setScale(e,Te$v,Fe$g);a=c$1a.setTranslation(a,a$11.ZERO,a),o=c$1a.multiply(o,a,o);var s=a$U.fromRotationMatrix(c$1a.getMatrix3(o,Ee$t),Pe$q);return s=a$U.normalize(s,s),e$1L.fromQuaternion(s,n)};var Oe$s=24110.54841,Me$q=8640184.812866,Se$k=.093104,_e$r=-62e-7,Ne$l=11772758384668e-32,Re$m=72921158553e-15,De$u=n$1d.TWO_PI/86400,W$1a=new o$10;m$13.computeTemeToPseudoFixedMatrix=function(e,t){if(!t$$(e))throw new t$_("date is required.");var i,n=(W$1a=o$10.addSeconds(e,-o$10.computeTaiMinusUtc(e),W$1a)).dayNumber,r=W$1a.secondsOfDay,o=n-2451545;i=r>=43200?(o+.5)/h$1a.DAYS_PER_JULIAN_CENTURY:(o-.5)/h$1a.DAYS_PER_JULIAN_CENTURY;var a=(Oe$s+i*(Me$q+i*(Se$k+i*_e$r)))*De$u%n$1d.TWO_PI+(Re$m+Ne$l*(n-2451545.5))*((r+.5*h$1a.SECONDS_PER_DAY)%h$1a.SECONDS_PER_DAY),s=Math.cos(a),l=Math.sin(a);return t$$(t)?(t[0]=s,t[1]=-l,t[2]=0,t[3]=l,t[4]=s,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new r$W(s,l,0,-l,s,0,0,0,1)},m$13.iau2006XysData=new w$19,m$13.earthOrientationParameters=R$Z.NONE;var j$18=32.184,ge$q=2451545;m$13.preloadIcrfFixed=function(e){var t=e.start.dayNumber,i=e.start.secondsOfDay+j$18,n=e.stop.dayNumber,r=e.stop.secondsOfDay+j$18,o=m$13.iau2006XysData.preload(t,i,n,r),a=m$13.earthOrientationParameters.getPromiseToLoad();return c$18.all([o,a])},m$13.computeIcrfToFixedMatrix=function(e,t){if(!t$$(e))throw new t$_("date is required.");t$$(t)||(t=new r$W);var i=m$13.computeFixedToIcrfMatrix(e,t);if(t$$(i))return r$W.transpose(i,t)};var ze$j=new s$1j(0,0,0),Ie$q=new n$16(0,0,0,0,0,0),Z$11=new r$W,k$16=new r$W;m$13.computeFixedToIcrfMatrix=function(e,t){if(!t$$(e))throw new t$_("date is required.");t$$(t)||(t=new r$W);var i=m$13.earthOrientationParameters.compute(e,Ie$q);if(t$$(i)){var n=e.dayNumber,r=e.secondsOfDay+j$18,o=m$13.iau2006XysData.computeXysRadians(n,r,ze$j);if(t$$(o)){var a=o.x+i.xPoleOffset,s=o.y+i.yPoleOffset,l=1/(1+Math.sqrt(1-a*a-s*s)),u=Z$11;u[0]=1-l*a*a,u[3]=-l*a*s,u[6]=a,u[1]=-l*a*s,u[4]=1-l*s*s,u[7]=s,u[2]=-a,u[5]=-s,u[8]=1-l*(a*a+s*s);var c=r$W.fromRotationZ(-o.s,k$16),h=r$W.multiply(u,c,Z$11),d=e.dayNumber-2451545,f=(e.secondsOfDay-o$10.computeTaiMinusUtc(e)+i.ut1MinusUtc)/h$1a.SECONDS_PER_DAY,p=.779057273264+f+.00273781191135448*(d+f);p=p%1*n$1d.TWO_PI;var _=r$W.fromRotationZ(p,k$16),m=r$W.multiply(h,_,Z$11),$=Math.cos(i.xPoleWander),g=Math.cos(i.yPoleWander),y=Math.sin(i.xPoleWander),v=Math.sin(i.yPoleWander),x=n-ge$q+r/h$1a.SECONDS_PER_DAY,b=-47e-6*(x/=36525)*n$1d.RADIANS_PER_DEGREE/3600,S=Math.cos(b),w=Math.sin(b),C=k$16;return C[0]=$*S,C[1]=$*w,C[2]=y,C[3]=-g*w+v*y*S,C[4]=g*S+v*y*w,C[5]=-v*$,C[6]=-v*w-g*y*S,C[7]=v*S-g*y*w,C[8]=g*$,r$W.multiply(m,C,t)}}};var qe$i=new a$10;m$13.pointToWindowCoordinates=function(e,t,i,n){return(n=m$13.pointToGLWindowCoordinates(e,t,i,n)).y=2*t[5]-n.y,n},m$13.pointToGLWindowCoordinates=function(e,t,i,n){if(!t$$(e))throw new t$_("modelViewProjectionMatrix is required.");if(!t$$(t))throw new t$_("viewportTransformation is required.");if(!t$$(i))throw new t$_("point is required.");t$$(n)||(n=new r$T);var r=qe$i;return c$1a.multiplyByVector(e,a$10.fromElements(i.x,i.y,i.z,1,r),r),a$10.multiplyByScalar(r,1/r.w,r),c$1a.multiplyByVector(t,r,r),r$T.fromCartesian4(r,n)};var Ce$s=new a$11,We$o=new a$11,Ue$j=new a$11;m$13.rotationMatrixFromPositionVelocity=function(e,t,i,n){if(!t$$(e))throw new t$_("position is required.");if(!t$$(t))throw new t$_("velocity is required.");var r=e$1Y(i,n$1c.WGS84).geodeticSurfaceNormal(e,Ce$s),o=a$11.cross(t,r,We$o);a$11.equalsEpsilon(o,a$11.ZERO,n$1d.EPSILON6)&&(o=a$11.clone(a$11.UNIT_X,o));var a=a$11.cross(o,t,Ue$j);return a$11.normalize(a,a),a$11.cross(t,a,o),a$11.negate(o,o),a$11.normalize(o,o),t$$(n)||(n=new r$W),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=o.x,n[4]=o.y,n[5]=o.z,n[6]=a.x,n[7]=a.y,n[8]=a.z,n};var re$G=new c$1a(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),te$F=new i$1g,oe$B=new a$11,be$w=new a$11,Ae$m=new r$W,H$14=new c$1a,ne$C=new c$1a;m$13.basisTo2D=function(e,t,i){if(!t$$(e))throw new t$_("projection is required.");if(!t$$(t))throw new t$_("matrix is required.");if(!t$$(i))throw new t$_("result is required.");var n=c$1a.getTranslation(t,be$w),r=e.ellipsoid,o=r.cartesianToCartographic(n,te$F),a=e.project(o,oe$B);a$11.fromElements(a.z,a.x,a.y,a);var s=m$13.eastNorthUpToFixedFrame(n,r,H$14),l=c$1a.inverseTransformation(s,ne$C),u=c$1a.getMatrix3(t,Ae$m),c=c$1a.multiplyByMatrix3(l,u,i);return c$1a.multiply(re$G,c,i),c$1a.setTranslation(i,a,i),i},m$13.wgs84To2DModelMatrix=function(e,t,i){if(!t$$(e))throw new t$_("projection is required.");if(!t$$(t))throw new t$_("center is required.");if(!t$$(i))throw new t$_("result is required.");var n=e.ellipsoid,r=m$13.eastNorthUpToFixedFrame(t,n,H$14),o=c$1a.inverseTransformation(r,ne$C),a=n.cartesianToCartographic(t,te$F),s=e.project(a,oe$B);a$11.fromElements(s.z,s.x,s.y,s);var l=c$1a.fromTranslation(s,H$14);return c$1a.multiply(re$G,o,i),c$1a.multiply(l,i,i),i},m$13.buildUp=function(e,t){var i=t.clone(),n=e.clone();n=a$11.normalize(n,n),Math.abs(a$11.dot(n,i))>=1&&(n=Math.abs(a$11.dot(i,a$11.UNIT_Y))<1?a$11.clone(a$11.UNIT_Y,n):a$11.clone(a$11.UNIT_Z,n));var r=new a$11;return a$11.cross(n,i,r),r=a$11.normalize(r,r),a$11.cross(i,r,n),n=a$11.normalize(n,n)},m$13.getHeading=function(e,t){var i;return i=n$1d.equalsEpsilon(Math.abs(e.z),1,n$1d.EPSILON3)?Math.atan2(t.y,t.x)-n$1d.PI_OVER_TWO:Math.atan2(e.y,e.x)-n$1d.PI_OVER_TWO,n$1d.TWO_PI-n$1d.zeroToTwoPi(i)},m$13.convertToColumbusCartesian=function(e){var t=new s$1q,i=t.ellipsoid,n=new a$11,r=new i$1g;return i.cartesianToCartographic(e,r),t.project(r,n),a$11.fromElements(n.z,n.x,n.y)},m$13.convertTo3DCartesian=function(e){var t=new s$1q,i=t.ellipsoid,n=new a$11,r=new i$1g;return n=a$11.fromElements(e.y,e.z,e.x),t.unproject(n,r),i.cartographicToCartesian(r,n)};var h$18=new a$10;function s$1h(e,t){if(n$1e.defined("origin",e),!t$$(e=(t=e$1Y(t,n$1c.WGS84)).scaleToGeodeticSurface(e)))throw new t$_("origin must not be at the center of the ellipsoid.");var i=m$13.eastNorthUpToFixedFrame(e,t);this._ellipsoid=t,this._origin=e,this._xAxis=a$11.fromCartesian4(c$1a.getColumn(i,0,h$18)),this._yAxis=a$11.fromCartesian4(c$1a.getColumn(i,1,h$18));var n=a$11.fromCartesian4(c$1a.getColumn(i,2,h$18));this._plane=n$17.fromPointNormal(e,n)}Object.defineProperties(s$1h.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 O$_=new e$1N;s$1h.fromPoints=function(e,t){return n$1e.defined("cartesians",e),new s$1h(e$1N.fromPoints(e,O$_).center,t)};var _$19=new n$18,m$12=new a$11;s$1h.prototype.projectPointOntoPlane=function(e,t){n$1e.defined("cartesian",e);var i=_$19;i.origin=e,a$11.normalize(e,i.direction);var n=h$1b.rayPlane(i,this._plane,m$12);if(t$$(n)||(a$11.negate(i.direction,i.direction),n=h$1b.rayPlane(i,this._plane,m$12)),t$$(n)){var r=a$11.subtract(n,this._origin,n),o=a$11.dot(this._xAxis,r),a=a$11.dot(this._yAxis,r);return t$$(t)?(t.x=o,t.y=a,t):new r$T(o,a)}},s$1h.prototype.projectPointsOntoPlane=function(e,t){n$1e.defined("cartesians",e),t$$(t)||(t=[]);for(var i=0,n=e.length,r=0;r<n;r++){var o=this.projectPointOntoPlane(e[r],t[i]);t$$(o)&&(t[i]=o,i++)}return t.length=i,t},s$1h.prototype.projectPointToNearestOnPlane=function(e,t){n$1e.defined("cartesian",e),t$$(t)||(t=new r$T);var i=_$19;i.origin=e,a$11.clone(this._plane.normal,i.direction);var n=h$1b.rayPlane(i,this._plane,m$12);t$$(n)||(a$11.negate(i.direction,i.direction),n=h$1b.rayPlane(i,this._plane,m$12));var r=a$11.subtract(n,this._origin,n),o=a$11.dot(this._xAxis,r),a=a$11.dot(this._yAxis,r);return t.x=o,t.y=a,t},s$1h.prototype.projectPointsToNearestOnPlane=function(e,t){n$1e.defined("cartesians",e),t$$(t)||(t=[]);var i=e.length;t.length=i;for(var n=0;n<i;n++)t[n]=this.projectPointToNearestOnPlane(e[n],t[n]);return t};var C$14=new a$11;function m$11(e,t,i){i=i||2;var n,r,o,a,s,l,u,c=t&&t.length,h=c?t[0]*i:e.length,d=C$13(e,0,h,i,!0),f=[];if(!d||d.next===d.prev)return f;if(c&&(d=K$U(e,t,d,i)),e.length>80*i){n=o=e[0],r=a=e[1];for(var p=i;p<h;p+=i)(s=e[p])<n&&(n=s),(l=e[p+1])<r&&(r=l),s>o&&(o=s),l>a&&(a=l);u=0!==(u=Math.max(o-n,a-r))?1/u:0}return g$V(d,f,i,n,r,u),f}function C$13(e,t,i,n,r){var o,a;if(r===B$T(e,t,i,n)>0)for(o=t;o<i;o+=n)a=F$18(o,e[o],e[o+1],a);else for(o=i-n;o>=t;o-=n)a=F$18(o,e[o],e[o+1],a);return a&&M$1d(a,a.next)&&(w$16(a),a=a.next),a}function s$1g(e,t){if(!e)return e;t||(t=e);var i,n=e;do{if(i=!1,n.steiner||!M$1d(n,n.next)&&0!==l$11(n.prev,n,n.next))n=n.next;else{if(w$16(n),(n=t=n.prev)===n.next)break;i=!0}}while(i||n!==t);return t}function g$V(e,t,i,n,r,o,a){if(e){!a&&o&&R$W(e,n,r,o);for(var s,l,u=e;e.prev!==e.next;)if(s=e.prev,l=e.next,o?H$13(e,n,r,o):G$$(e))t.push(s.i/i),t.push(e.i/i),t.push(l.i/i),w$16(e),e=l.next,u=l.next;else if((e=l)===u){a?1===a?g$V(e=I$1a(s$1g(e),t,i),t,i,n,r,o,2):2===a&&J$11(e,t,i,n,r,o):g$V(s$1g(e),t,i,n,r,o,1);break}}}function G$$(e){var t=e.prev,i=e,n=e.next;if(l$11(t,i,n)>=0)return!1;for(var r=e.next.next;r!==e.prev;){if(Z$10(t.x,t.y,i.x,i.y,n.x,n.y,r.x,r.y)&&l$11(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function H$13(e,t,i,n){var r=e.prev,o=e,a=e.next;if(l$11(r,o,a)>=0)return!1;for(var s=r.x<o.x?r.x<a.x?r.x:a.x:o.x<a.x?o.x:a.x,l=r.y<o.y?r.y<a.y?r.y:a.y:o.y<a.y?o.y:a.y,u=r.x>o.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,c=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,h=k$15(s,l,t,i,n),d=k$15(u,c,t,i,n),f=e.prevZ,p=e.nextZ;f&&f.z>=h&&p&&p.z<=d;){if(f!==e.prev&&f!==e.next&&Z$10(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&l$11(f.prev,f,f.next)>=0||(f=f.prevZ,p!==e.prev&&p!==e.next&&Z$10(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&l$11(p.prev,p,p.next)>=0))return!1;p=p.nextZ}for(;f&&f.z>=h;){if(f!==e.prev&&f!==e.next&&Z$10(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&l$11(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&Z$10(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&l$11(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function I$1a(e,t,i){var n=e;do{var r=n.prev,o=n.next.next;!M$1d(r,o)&&D$19(r,n,n.next,o)&&d$12(r,o)&&d$12(o,r)&&(t.push(r.i/i),t.push(n.i/i),t.push(o.i/i),w$16(n),w$16(n.next),n=e=o),n=n.next}while(n!==e);return s$1g(n)}function J$11(e,t,i,n,r,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&U$11(a,s)){var l=E$17(a,s);return a=s$1g(a,a.next),l=s$1g(l,l.next),g$V(a,t,i,n,r,o),void g$V(l,t,i,n,r,o)}s=s.next}a=a.next}while(a!==e)}function K$U(e,t,i,n){var r,o,a,s=[];for(r=0,o=t.length;r<o;r++)(a=C$13(e,t[r]*n,r<o-1?t[r+1]*n:e.length,n,!1))===a.next&&(a.steiner=!0),s.push(T$13(a));for(s.sort(L$14),r=0;r<s.length;r++)O$Z(s[r],i),i=s$1g(i,i.next);return i}function L$14(e,t){return e.x-t.x}function O$Z(e,t){if(t=P$_(e,t)){var i=E$17(t,e);s$1g(i,i.next)}}function P$_(e,t){var i,n=t,r=e.x,o=e.y,a=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&s>a){if(a=s,s===r){if(o===n.y)return n;if(o===n.next.y)return n.next}i=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!i)return null;if(r===a)return i;var l,u=i,c=i.x,h=i.y,d=1/0;n=i;do{r>=n.x&&n.x>=c&&r!==n.x&&Z$10(o<h?r:a,o,c,h,o<h?a:r,o,n.x,n.y)&&(l=Math.abs(o-n.y)/(r-n.x),d$12(n,e)&&(l<d||l===d&&(n.x>i.x||n.x===i.x&&Q$10(i,n)))&&(i=n,d=l)),n=n.next}while(n!==u);return i}function Q$10(e,t){return l$11(e.prev,e,t.prev)<0&&l$11(t.next,e,e.next)<0}function R$W(e,t,i,n){var r=e;do{null===r.z&&(r.z=k$15(r.x,r.y,t,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==e);r.prevZ.nextZ=null,r.prevZ=null,S$V(r)}function S$V(e){var t,i,n,r,o,a,s,l,u=1;do{for(i=e,e=null,o=null,a=0;i;){for(a++,n=i,s=0,t=0;t<u&&(s++,n=n.nextZ);t++);for(l=u;s>0||l>0&&n;)0!==s&&(0===l||!n||i.z<=n.z)?(r=i,i=i.nextZ,s--):(r=n,n=n.nextZ,l--),o?o.nextZ=r:e=r,r.prevZ=o,o=r;i=n}o.nextZ=null,u*=2}while(a>1);return e}function k$15(e,t,i,n,r){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function T$13(e){var t=e,i=e;do{(t.x<i.x||t.x===i.x&&t.y<i.y)&&(i=t),t=t.next}while(t!==e);return i}function Z$10(e,t,i,n,r,o,a,s){return(r-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(n-s)-(i-a)*(t-s)>=0&&(i-a)*(o-s)-(r-a)*(n-s)>=0}function U$11(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!V$T(e,t)&&(d$12(e,t)&&d$12(t,e)&&W$19(e,t)&&(l$11(e.prev,e,t.prev)||l$11(e,t.prev,t))||M$1d(e,t)&&l$11(e.prev,e,e.next)>0&&l$11(t.prev,t,t.next)>0)}function l$11(e,t,i){return(t.y-e.y)*(i.x-t.x)-(t.x-e.x)*(i.y-t.y)}function M$1d(e,t){return e.x===t.x&&e.y===t.y}function D$19(e,t,i,n){var r=b$1p(l$11(e,t,i)),o=b$1p(l$11(e,t,n)),a=b$1p(l$11(i,n,e)),s=b$1p(l$11(i,n,t));return!!(r!==o&&a!==s||0===r&&z$U(e,i,t)||0===o&&z$U(e,n,t)||0===a&&z$U(i,e,n)||0===s&&z$U(i,t,n))}function z$U(e,t,i){return t.x<=Math.max(e.x,i.x)&&t.x>=Math.min(e.x,i.x)&&t.y<=Math.max(e.y,i.y)&&t.y>=Math.min(e.y,i.y)}function b$1p(e){return e>0?1:e<0?-1:0}function V$T(e,t){var i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&D$19(i,i.next,e,t))return!0;i=i.next}while(i!==e);return!1}function d$12(e,t){return l$11(e.prev,e,e.next)<0?l$11(e,t,e.next)>=0&&l$11(e,e.prev,t)>=0:l$11(e,t,e.prev)<0||l$11(e,e.next,t)<0}function W$19(e,t){var i=e,n=!1,r=(e.x+t.x)/2,o=(e.y+t.y)/2;do{i.y>o!=i.next.y>o&&i.next.y!==i.y&&r<(i.next.x-i.x)*(o-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==e);return n}function E$17(e,t){var i=new A$1a(e.i,e.x,e.y),n=new A$1a(t.i,t.x,t.y),r=e.next,o=t.prev;return e.next=t,t.prev=e,i.next=r,r.prev=i,n.next=i,i.prev=n,o.next=n,n.prev=o,n}function F$18(e,t,i,n){var r=new A$1a(e,t,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function w$16(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function A$1a(e,t,i){this.i=e,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function B$T(e,t,i,n){for(var r=0,o=t,a=i-n;o<i;o+=n)r+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return r}s$1h.prototype.projectPointOntoEllipsoid=function(e,t){n$1e.defined("cartesian",e),t$$(t)||(t=new a$11);var i=this._ellipsoid,n=this._origin,r=this._xAxis,o=this._yAxis,a=C$14;return a$11.multiplyByScalar(r,e.x,a),t=a$11.add(n,a,t),a$11.multiplyByScalar(o,e.y,a),a$11.add(t,a,t),i.scaleToGeocentricSurface(t,t),t},s$1h.prototype.projectPointsOntoEllipsoid=function(e,t){n$1e.defined("cartesians",e);var i=e.length;t$$(t)?t.length=i:t=new Array(i);for(var n=0;n<i;++n)t[n]=this.projectPointOntoEllipsoid(e[n],t[n]);return t},m$11.deviation=function(e,t,i,n){var r=t&&t.length,o=r?t[0]*i:e.length,a=Math.abs(B$T(e,0,o,i));if(r)for(var s=0,l=t.length;s<l;s++){var u=t[s]*i,c=s<l-1?t[s+1]*i:e.length;a-=Math.abs(B$T(e,u,c,i))}var h=0;for(s=0;s<n.length;s+=3){var d=n[s]*i,f=n[s+1]*i,p=n[s+2]*i;h+=Math.abs((e[d]-e[p])*(e[f+1]-e[d+1])-(e[d]-e[f])*(e[p+1]-e[d+1]))}return 0===a&&0===h?0:Math.abs((h-a)/a)},m$11.flatten=function(e){for(var t=e[0][0].length,i={vertices:[],holes:[],dimensions:t},n=0,r=0;r<e.length;r++){for(var o=0;o<e[r].length;o++)for(var a=0;a<t;a++)i.vertices.push(e[r][o][a]);r>0&&(n+=e[r-1].length,i.holes.push(n))}return i};var E$16={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,COMPILE_STATUS:35713,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,HALF_FLOAT_OES:36193,DOUBLE:5130,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,COLOR:6144,DEPTH:6145,STENCIL:6146,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,MAX_3D_TEXTURE_SIZE:32883,UNSIGNED_INT_2_10_10_10_REV:33640,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,MAX_TEXTURE_LOD_BIAS:34045,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,VERTEX_ATTRIB_ARRAY_INTEGER:35069,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,UNSIGNED_INT_10F_11F_11F_REV:35899,RGB9_E5:35901,UNSIGNED_INT_5_9_9_9_REV:35902,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,RASTERIZER_DISCARD:35977,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,UNSIGNED_INT_24_8:34042,DEPTH24_STENCIL8:35056,UNSIGNED_NORMALIZED:35863,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,MAX_SAMPLES:36183,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,VERTEX_ARRAY_BINDING:34229,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,SIGNED_NORMALIZED:36764,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,INVALID_INDEX:4294967295,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,SAMPLER_BINDING:35097,RGB10_A2UI:36975,INT_2_10_10_10_REV:36255,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497,TEXTURE_IMMUTABLE_FORMAT:37167,MAX_ELEMENT_INDEX:36203,TEXTURE_IMMUTABLE_LEVELS:33503,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047},de$x=Object.freeze(E$16),r$R={BYTE:de$x.BYTE,UNSIGNED_BYTE:de$x.UNSIGNED_BYTE,SHORT:de$x.SHORT,UNSIGNED_SHORT:de$x.UNSIGNED_SHORT,INT:de$x.INT,UNSIGNED_INT:de$x.UNSIGNED_INT,FLOAT:de$x.FLOAT,DOUBLE:de$x.DOUBLE,getSizeInBytes:function(e){if(!t$$(e))throw new t$_("value is required.");switch(e){case r$R.BYTE:return Int8Array.BYTES_PER_ELEMENT;case r$R.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case r$R.SHORT:return Int16Array.BYTES_PER_ELEMENT;case r$R.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case r$R.INT:return Int32Array.BYTES_PER_ELEMENT;case r$R.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case r$R.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case r$R.DOUBLE:return Float64Array.BYTES_PER_ELEMENT;default:throw new t$_("componentDatatype is not a valid value.")}},fromTypedArray:function(e){return e instanceof Int8Array?r$R.BYTE:e instanceof Uint8Array?r$R.UNSIGNED_BYTE:e instanceof Int16Array?r$R.SHORT:e instanceof Uint16Array?r$R.UNSIGNED_SHORT:e instanceof Int32Array?r$R.INT:e instanceof Uint32Array?r$R.UNSIGNED_INT:e instanceof Float32Array?r$R.FLOAT:e instanceof Float64Array?r$R.DOUBLE:void 0},validate:function(e){return t$$(e)&&(e===r$R.BYTE||e===r$R.UNSIGNED_BYTE||e===r$R.SHORT||e===r$R.UNSIGNED_SHORT||e===r$R.INT||e===r$R.UNSIGNED_INT||e===r$R.FLOAT||e===r$R.DOUBLE)},createTypedArray:function(e,t){if(!t$$(e))throw new t$_("componentDatatype is required.");if(!t$$(t))throw new t$_("valuesOrLength is required.");switch(e){case r$R.BYTE:return new Int8Array(t);case r$R.UNSIGNED_BYTE:return new Uint8Array(t);case r$R.SHORT:return new Int16Array(t);case r$R.UNSIGNED_SHORT:return new Uint16Array(t);case r$R.INT:return new Int32Array(t);case r$R.UNSIGNED_INT:return new Uint32Array(t);case r$R.FLOAT:return new Float32Array(t);case r$R.DOUBLE:return new Float64Array(t);default:throw new t$_("componentDatatype is not a valid value.")}},createArrayBufferView:function(e,t,i,n){if(!t$$(e))throw new t$_("componentDatatype is required.");if(!t$$(t))throw new t$_("buffer is required.");switch(i=e$1Y(i,0),n=e$1Y(n,(t.byteLength-i)/r$R.getSizeInBytes(e)),e){case r$R.BYTE:return new Int8Array(t,i,n);case r$R.UNSIGNED_BYTE:return new Uint8Array(t,i,n);case r$R.SHORT:return new Int16Array(t,i,n);case r$R.UNSIGNED_SHORT:return new Uint16Array(t,i,n);case r$R.INT:return new Int32Array(t,i,n);case r$R.UNSIGNED_INT:return new Uint32Array(t,i,n);case r$R.FLOAT:return new Float32Array(t,i,n);case r$R.DOUBLE:return new Float64Array(t,i,n);default:throw new t$_("componentDatatype is not a valid value.")}},fromName:function(e){switch(e){case"BYTE":return r$R.BYTE;case"UNSIGNED_BYTE":return r$R.UNSIGNED_BYTE;case"SHORT":return r$R.SHORT;case"UNSIGNED_SHORT":return r$R.UNSIGNED_SHORT;case"INT":return r$R.INT;case"UNSIGNED_INT":return r$R.UNSIGNED_INT;case"FLOAT":return r$R.FLOAT;case"DOUBLE":return r$R.DOUBLE;default:throw new t$_("name is not a valid value.")}}},C$12=Object.freeze(r$R);function T$12(e,t,i){if(0===e)return t*i;var n=e*e,r=n*n,o=r*n,a=o*n,s=a*n,l=s*n,u=i;return t*((1-n/4-3*r/64-5*o/256-175*a/16384-441*s/65536-4851*l/1048576)*u-(3*n/8+3*r/32+45*o/1024+105*a/4096+2205*s/131072+6237*l/524288)*Math.sin(2*u)+(15*r/256+45*o/1024+525*a/16384+1575*s/65536+155925*l/8388608)*Math.sin(4*u)-(35*o/3072+175*a/12288+3675*s/262144+13475*l/1048576)*Math.sin(6*u)+(315*a/131072+2205*s/524288+43659*l/8388608)*Math.sin(8*u)-(693*s/1310720+6237*l/5242880)*Math.sin(10*u)+1001*l/8388608*Math.sin(12*u))}function C$11(e,t,i){var n=e/i;if(0===t)return n;var r=n*n,o=r*n,a=o*n,s=t*t,l=s*s,u=l*s,c=u*s,h=c*s,d=h*s,f=Math.sin(2*n),p=Math.cos(2*n),_=Math.sin(4*n),m=Math.cos(4*n),$=Math.sin(6*n),g=Math.cos(6*n),y=Math.sin(8*n),v=Math.cos(8*n),x=Math.sin(10*n);return n+n*s/4+7*n*l/64+15*n*u/256+579*n*c/16384+1515*n*h/65536+16837*n*d/1048576+(3*n*l/16+45*n*u/256-n*(32*r-561)*c/4096-n*(232*r-1677)*h/16384+n*(399985-90560*r+512*a)*d/5242880)*p+(21*n*u/256+483*n*c/4096-n*(224*r-1969)*h/16384-n*(33152*r-112599)*d/1048576)*m+(151*n*c/4096+4681*n*h/65536+1479*n*d/16384-453*o*d/32768)*g+(1097*n*h/65536+42783*n*d/1048576)*v+8011*n*d/1048576*Math.cos(10*n)+(3*s/8+3*l/16+213*u/2048-3*r*u/64+255*c/4096-33*r*c/512+20861*h/524288-33*r*h/512+a*h/1024+28273*d/1048576-471*r*d/8192+9*a*d/4096)*f+(21*l/256+21*u/256+533*c/8192-21*r*c/512+197*h/4096-315*r*h/4096+584039*d/16777216-12517*r*d/131072+7*a*d/2048)*_+(151*u/6144+151*c/4096+5019*h/131072-453*r*h/16384+26965*d/786432-8607*r*d/131072)*$+(1097*c/131072+1097*h/65536+225797*d/10485760-1097*r*d/65536)*y+(8011*h/2621440+8011*d/1048576)*x+293393*d/251658240*Math.sin(12*n)}function v$13(e,t){if(0===e)return Math.log(Math.tan(.5*(n$1d.PI_OVER_TWO+t)));var i=e*Math.sin(t);return Math.log(Math.tan(.5*(n$1d.PI_OVER_TWO+t)))-e/2*Math.log((1+i)/(1-i))}function G$_(e,t,i,n,r){var o=v$13(e._ellipticity,i),a=v$13(e._ellipticity,r);return Math.atan2(n$1d.negativePiToPi(n-t),a-o)}function j$17(e,t,i,n,r,o,a){var s=e._heading,l=o-n,u=0;if(n$1d.equalsEpsilon(Math.abs(s),n$1d.PI_OVER_TWO,n$1d.EPSILON8))if(t===i)u=t*Math.cos(r)*n$1d.negativePiToPi(l);else{var c=Math.sin(r);u=t*Math.cos(r)*n$1d.negativePiToPi(l)/Math.sqrt(1-e._ellipticitySquared*c*c)}else{var h=T$12(e._ellipticity,t,r);u=(T$12(e._ellipticity,t,a)-h)/Math.cos(s)}return Math.abs(u)}var H$12=new a$11,R$V=new a$11;function S$U(e,t,i,n){var r=a$11.normalize(n.cartographicToCartesian(t,R$V),H$12),o=a$11.normalize(n.cartographicToCartesian(i,R$V),R$V);n$1e.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(a$11.angleBetween(r,o))-Math.PI),.0125);var a=n.maximumRadius,s=n.minimumRadius,l=a*a,u=s*s;e._ellipticitySquared=(l-u)/l,e._ellipticity=Math.sqrt(e._ellipticitySquared),e._start=i$1g.clone(t,e._start),e._start.height=0,e._end=i$1g.clone(i,e._end),e._end.height=0,e._heading=G$_(e,t.longitude,t.latitude,i.longitude,i.latitude),e._distance=j$17(e,n.maximumRadius,n.minimumRadius,t.longitude,t.latitude,i.longitude,i.latitude)}function q$1b(e,t,i,n,r,o){var a,s,l,u=r*r;if(Math.abs(n$1d.PI_OVER_TWO-Math.abs(t))>n$1d.EPSILON8){s=C$11(T$12(r,n,e.latitude)+i*Math.cos(t),r,n);var c=v$13(r,e.latitude),h=v$13(r,s);l=Math.tan(t)*(h-c),a=n$1d.negativePiToPi(e.longitude+l)}else{var d;if(s=e.latitude,0===r)d=n*Math.cos(e.latitude);else{var f=Math.sin(e.latitude);d=n*Math.cos(e.latitude)/Math.sqrt(1-u*f*f)}l=i/d,a=t>0?n$1d.negativePiToPi(e.longitude+l):n$1d.negativePiToPi(e.longitude-l)}return t$$(o)?(o.longitude=a,o.latitude=s,o.height=0,o):new i$1g(a,s,0)}function M$1c(e,t,i){var n=e$1Y(i,n$1c.WGS84);this._ellipsoid=n,this._start=new i$1g,this._end=new i$1g,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,t$$(e)&&t$$(t)&&S$U(this,e,t,n)}Object.defineProperties(M$1c.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return n$1e.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return n$1e.defined("distance",this._distance),this._heading}}}),M$1c.fromStartHeadingDistance=function(e,t,i,n,r){n$1e.defined("start",e),n$1e.defined("heading",t),n$1e.defined("distance",i),n$1e.typeOf.number.greaterThan("distance",i,0);var o=e$1Y(n,n$1c.WGS84),a=o.maximumRadius,s=o.minimumRadius,l=a*a,u=s*s,c=Math.sqrt((l-u)/l),h=q$1b(e,t=n$1d.negativePiToPi(t),i,o.maximumRadius,c);return!t$$(r)||t$$(n)&&!n.equals(r.ellipsoid)?new M$1c(e,h,o):(r.setEndPoints(e,h),r)},M$1c.prototype.setEndPoints=function(e,t){n$1e.defined("start",e),n$1e.defined("end",t),S$U(this,e,t,this._ellipsoid)},M$1c.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(e*this._distance,t)},M$1c.prototype.interpolateUsingSurfaceDistance=function(e,t){if(n$1e.typeOf.number("distance",e),!t$$(this._distance)||0===this._distance)throw new t$_("EllipsoidRhumbLine must have distinct start and end set.");return q$1b(this._start,this._heading,e,this._ellipsoid.maximumRadius,this._ellipticity,t)},M$1c.prototype.findIntersectionWithLongitude=function(e,t){if(n$1e.typeOf.number("intersectionLongitude",e),!t$$(this._distance)||0===this._distance)throw new t$_("EllipsoidRhumbLine must have distinct start and end set.");var i=this._ellipticity,n=this._heading,r=Math.abs(n),o=this._start;if(e=n$1d.negativePiToPi(e),n$1d.equalsEpsilon(Math.abs(e),Math.PI,n$1d.EPSILON14)&&(e=n$1d.sign(o.longitude)*Math.PI),t$$(t)||(t=new i$1g),Math.abs(n$1d.PI_OVER_TWO-r)<=n$1d.EPSILON8)return t.longitude=e,t.latitude=o.latitude,t.height=0,t;if(n$1d.equalsEpsilon(Math.abs(n$1d.PI_OVER_TWO-r),n$1d.PI_OVER_TWO,n$1d.EPSILON8))return n$1d.equalsEpsilon(e,o.longitude,n$1d.EPSILON12)?void 0:(t.longitude=e,t.latitude=n$1d.PI_OVER_TWO*n$1d.sign(n$1d.PI_OVER_TWO-n),t.height=0,t);var a,s=o.latitude,l=i*Math.sin(s),u=Math.tan(.5*(n$1d.PI_OVER_TWO+s))*Math.exp((e-o.longitude)/Math.tan(n)),c=(1+l)/(1-l),h=o.latitude;do{a=h;var d=i*Math.sin(a),f=(1+d)/(1-d);h=2*Math.atan(u*Math.pow(f/c,i/2))-n$1d.PI_OVER_TWO}while(!n$1d.equalsEpsilon(h,a,n$1d.EPSILON12));return t.longitude=e,t.latitude=h,t.height=0,t},M$1c.prototype.findIntersectionWithLatitude=function(e,t){if(n$1e.typeOf.number("intersectionLatitude",e),!t$$(this._distance)||0===this._distance)throw new t$_("EllipsoidRhumbLine must have distinct start and end set.");var i=this._ellipticity,n=this._heading,r=this._start;if(!n$1d.equalsEpsilon(Math.abs(n),n$1d.PI_OVER_TWO,n$1d.EPSILON8)){var o=v$13(i,r.latitude),a=v$13(i,e),s=Math.tan(n)*(a-o),l=n$1d.negativePiToPi(r.longitude+s);return t$$(t)?(t.longitude=l,t.latitude=e,t.height=0,t):new i$1g(l,e,0)}};var e$1K={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3},_0x348fdd=Object.freeze(e$1K);function u$14(e,t,i,n){this[0]=e$1Y(e,0),this[1]=e$1Y(i,0),this[2]=e$1Y(t,0),this[3]=e$1Y(n,0)}u$14.packedLength=4,u$14.pack=function(e,t,i){return n$1e.typeOf.object("value",e),n$1e.defined("array",t),i=e$1Y(i,0),t[i++]=e[0],t[i++]=e[1],t[i++]=e[2],t[i++]=e[3],t},u$14.unpack=function(e,t,i){return n$1e.defined("array",e),t=e$1Y(t,0),t$$(i)||(i=new u$14),i[0]=e[t++],i[1]=e[t++],i[2]=e[t++],i[3]=e[t++],i},u$14.clone=function(e,t){if(t$$(e))return t$$(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):new u$14(e[0],e[2],e[1],e[3])},u$14.fromArray=function(e,t,i){return n$1e.defined("array",e),t=e$1Y(t,0),t$$(i)||(i=new u$14),i[0]=e[t],i[1]=e[t+1],i[2]=e[t+2],i[3]=e[t+3],i},u$14.fromColumnMajorArray=function(e,t){return n$1e.defined("values",e),u$14.clone(e,t)},u$14.fromRowMajorArray=function(e,t){return n$1e.defined("values",e),t$$(t)?(t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3],t):new u$14(e[0],e[1],e[2],e[3])},u$14.fromScale=function(e,t){return n$1e.typeOf.object("scale",e),t$$(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=e.y,t):new u$14(e.x,0,0,e.y)},u$14.fromUniformScale=function(e,t){return n$1e.typeOf.number("scale",e),t$$(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=e,t):new u$14(e,0,0,e)},u$14.fromRotation=function(e,t){n$1e.typeOf.number("angle",e);var i=Math.cos(e),n=Math.sin(e);return t$$(t)?(t[0]=i,t[1]=n,t[2]=-n,t[3]=i,t):new u$14(i,-n,n,i)},u$14.toArray=function(e,t){return n$1e.typeOf.object("matrix",e),t$$(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]]},u$14.getElementIndex=function(e,t){return n$1e.typeOf.number.greaterThanOrEquals("row",t,0),n$1e.typeOf.number.lessThanOrEquals("row",t,1),n$1e.typeOf.number.greaterThanOrEquals("column",e,0),n$1e.typeOf.number.lessThanOrEquals("column",e,1),2*e+t},u$14.getColumn=function(e,t,i){n$1e.typeOf.object("matrix",e),n$1e.typeOf.number.greaterThanOrEquals("index",t,0),n$1e.typeOf.number.lessThanOrEquals("index",t,1),n$1e.typeOf.object("result",i);var n=2*t,r=e[n],o=e[n+1];return i.x=r,i.y=o,i},u$14.setColumn=function(e,t,i,n){n$1e.typeOf.object("matrix",e),n$1e.typeOf.number.greaterThanOrEquals("index",t,0),n$1e.typeOf.number.lessThanOrEquals("index",t,1),n$1e.typeOf.object("cartesian",i),n$1e.typeOf.object("result",n);var r=2*t;return(n=u$14.clone(e,n))[r]=i.x,n[r+1]=i.y,n},u$14.getRow=function(e,t,i){n$1e.typeOf.object("matrix",e),n$1e.typeOf.number.greaterThanOrEquals("index",t,0),n$1e.typeOf.number.lessThanOrEquals("index",t,1),n$1e.typeOf.object("result",i);var n=e[t],r=e[t+2];return i.x=n,i.y=r,i},u$14.setRow=function(e,t,i,n){return n$1e.typeOf.object("matrix",e),n$1e.typeOf.number.greaterThanOrEquals("index",t,0),n$1e.typeOf.number.lessThanOrEquals("index",t,1),n$1e.typeOf.object("cartesian",i),n$1e.typeOf.object("result",n),(n=u$14.clone(e,n))[t]=i.x,n[t+2]=i.y,n};var l$10=new r$T;u$14.getScale=function(e,t){return n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("result",t),t.x=r$T.magnitude(r$T.fromElements(e[0],e[1],l$10)),t.y=r$T.magnitude(r$T.fromElements(e[2],e[3],l$10)),t};var y$12=new r$T;u$14.getMaximumScale=function(e){return u$14.getScale(e,y$12),r$T.maximumComponent(y$12)},u$14.multiply=function(e,t,i){n$1e.typeOf.object("left",e),n$1e.typeOf.object("right",t),n$1e.typeOf.object("result",i);var n=e[0]*t[0]+e[2]*t[1],r=e[0]*t[2]+e[2]*t[3],o=e[1]*t[0]+e[3]*t[1],a=e[1]*t[2]+e[3]*t[3];return i[0]=n,i[1]=o,i[2]=r,i[3]=a,i},u$14.add=function(e,t,i){return n$1e.typeOf.object("left",e),n$1e.typeOf.object("right",t),n$1e.typeOf.object("result",i),i[0]=e[0]+t[0],i[1]=e[1]+t[1],i[2]=e[2]+t[2],i[3]=e[3]+t[3],i},u$14.subtract=function(e,t,i){return n$1e.typeOf.object("left",e),n$1e.typeOf.object("right",t),n$1e.typeOf.object("result",i),i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],i[3]=e[3]-t[3],i},u$14.multiplyByVector=function(e,t,i){n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("cartesian",t),n$1e.typeOf.object("result",i);var n=e[0]*t.x+e[2]*t.y,r=e[1]*t.x+e[3]*t.y;return i.x=n,i.y=r,i},u$14.multiplyByScalar=function(e,t,i){return n$1e.typeOf.object("matrix",e),n$1e.typeOf.number("scalar",t),n$1e.typeOf.object("result",i),i[0]=e[0]*t,i[1]=e[1]*t,i[2]=e[2]*t,i[3]=e[3]*t,i},u$14.multiplyByScale=function(e,t,i){return n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("scale",t),n$1e.typeOf.object("result",i),i[0]=e[0]*t.x,i[1]=e[1]*t.x,i[2]=e[2]*t.y,i[3]=e[3]*t.y,i},u$14.negate=function(e,t){return n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},u$14.transpose=function(e,t){n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("result",t);var i=e[0],n=e[2],r=e[1],o=e[3];return t[0]=i,t[1]=n,t[2]=r,t[3]=o,t},u$14.abs=function(e,t){return n$1e.typeOf.object("matrix",e),n$1e.typeOf.object("result",t),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},u$14.equals=function(e,t){return e===t||t$$(e)&&t$$(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},u$14.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]},u$14.equalsEpsilon=function(e,t,i){return n$1e.typeOf.number("epsilon",i),e===t||t$$(e)&&t$$(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},u$14.IDENTITY=Object.freeze(new u$14(1,0,0,1)),u$14.ZERO=Object.freeze(new u$14(0,0,0,0)),u$14.COLUMN0ROW0=0,u$14.COLUMN0ROW1=1,u$14.COLUMN1ROW0=2,u$14.COLUMN1ROW1=3,Object.defineProperties(u$14.prototype,{length:{get:function(){return u$14.packedLength}}}),u$14.prototype.clone=function(e){return u$14.clone(this,e)},u$14.prototype.equals=function(e){return u$14.equals(this,e)},u$14.prototype.equalsEpsilon=function(e,t){return u$14.equalsEpsilon(this,e,t)},u$14.prototype.toString=function(){return"("+this[0]+", "+this[2]+")\n("+this[1]+", "+this[3]+")"};var I$19={POINTS:de$x.POINTS,LINES:de$x.LINES,LINE_LOOP:de$x.LINE_LOOP,LINE_STRIP:de$x.LINE_STRIP,TRIANGLES:de$x.TRIANGLES,TRIANGLE_STRIP:de$x.TRIANGLE_STRIP,TRIANGLE_FAN:de$x.TRIANGLE_FAN,validate:function(e){return e===I$19.POINTS||e===I$19.LINES||e===I$19.LINE_LOOP||e===I$19.LINE_STRIP||e===I$19.TRIANGLES||e===I$19.TRIANGLE_STRIP||e===I$19.TRIANGLE_FAN}},H$11=Object.freeze(I$19);function T$11(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),n$1e.typeOf.object("options.attributes",e.attributes),this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=e$1Y(e.primitiveType,H$11.TRIANGLES),this.boundingSphere=e.boundingSphere,this.geometryType=e$1Y(e.geometryType,_0x348fdd.NONE),this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}T$11.computeNumberOfVertices=function(e){n$1e.typeOf.object("geometry",e);var t=-1;for(var i in e.attributes)if(e.attributes.hasOwnProperty(i)&&t$$(e.attributes[i])&&t$$(e.attributes[i].values)){var n=e.attributes[i];if(n.isInstanceAttribute)continue;var r=n.values.length/n.componentsPerAttribute;if(t!==r&&-1!==t)throw new t$_("All attribute lists must have the same number of attributes.");t=r}return t};var q$1a=new i$1g,z$T=new a$11,O$Y=new c$1a,D$18=[new i$1g,new i$1g,new i$1g],H$10=[new r$T,new r$T,new r$T],K$T=[new r$T,new r$T,new r$T],W$18=new a$11,X$U=new a$U,$$Z=new c$1a,tt$m=new u$14;function r$Q(e){if(!t$$((e=e$1Y(e,e$1Y.EMPTY_OBJECT)).componentDatatype))throw new t$_("options.componentDatatype is required.");if(!t$$(e.componentsPerAttribute))throw new t$_("options.componentsPerAttribute is required.");if(e.componentsPerAttribute<1||e.componentsPerAttribute>4)throw new t$_("options.componentsPerAttribute must be between 1 and 4.");if(!t$$(e.values))throw new t$_("options.values is required.");this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=e$1Y(e.normalize,!1),this.values=e.values}T$11._textureCoordinateRotationPoints=function(e,t,i,n){var r,o=s$1p.center(n,q$1a),a=i$1g.toCartesian(o,i,z$T),s=m$13.eastNorthUpToFixedFrame(a,i,O$Y),l=c$1a.inverse(s,O$Y),u=H$10,c=D$18;c[0].longitude=n.west,c[0].latitude=n.south,c[1].longitude=n.west,c[1].latitude=n.north,c[2].longitude=n.east,c[2].latitude=n.south;var h=W$18;for(r=0;r<3;r++)i$1g.toCartesian(c[r],i,h),h=c$1a.multiplyByPointAsVector(l,h,h),u[r].x=h.x,u[r].y=h.y;var d=a$U.fromAxisAngle(a$11.UNIT_Z,-t,X$U),f=r$W.fromQuaternion(d,$$Z),p=e.length,_=Number.POSITIVE_INFINITY,m=Number.POSITIVE_INFINITY,$=Number.NEGATIVE_INFINITY,g=Number.NEGATIVE_INFINITY;for(r=0;r<p;r++)h=c$1a.multiplyByPointAsVector(l,e[r],h),h=r$W.multiplyByVector(f,h,h),_=Math.min(_,h.x),m=Math.min(m,h.y),$=Math.max($,h.x),g=Math.max(g,h.y);var y=u$14.fromRotation(t,tt$m),v=K$T;v[0].x=_,v[0].y=m,v[1].x=_,v[1].y=g,v[2].x=$,v[2].y=m;var x=u[0],b=u[2].x-x.x,S=u[1].y-x.y;for(r=0;r<3;r++){var w=v[r];u$14.multiplyByVector(y,w,w),w.x=(w.x-x.x)/b,w.y=(w.y-x.y)/S}var C=v[0],T=v[1],P=v[2],E=new Array(6);return r$T.pack(C,E),r$T.pack(T,E,2),r$T.pack(P,E,4),E};var e$1J={CLOCKWISE:de$x.CW,COUNTER_CLOCKWISE:de$x.CCW,NONE:de$x.NONE,validate:function(e){return e===e$1J.CLOCKWISE||e===e$1J.COUNTER_CLOCKWISE}},_0x2ee645=Object.freeze(e$1J),nr$8=new a$11,ir$b=new a$11,T$10={computeArea2D:function(e){n$1e.defined("positions",e),n$1e.typeOf.number.greaterThanOrEquals("positions.length",e.length,3);for(var t=e.length,i=0,n=t-1,r=0;r<t;n=r++){var o=e[n],a=e[r];i+=o.x*a.y-a.x*o.y}return.5*i},computeWindingOrder2D:function(e){return T$10.computeArea2D(e)>0?_0x2ee645.COUNTER_CLOCKWISE:_0x2ee645.CLOCKWISE},triangulate:function(e,t){return n$1e.defined("positions",e),m$11(r$T.packArray(e),t,2)}},V$S=new a$11,X$T=new a$11,Y$U=new a$11,Z$$=new a$11,$$Y=new a$11,rr$9=new a$11,S$T=new a$11;T$10.computeSubdivision=function(e,t,i,n,r){r=e$1Y(r,!1),n=e$1Y(n,n$1d.RADIANS_PER_DEGREE),n$1e.typeOf.object("ellipsoid",e),n$1e.defined("positions",t),n$1e.defined("indices",i),n$1e.typeOf.number.greaterThanOrEquals("indices.length",i.length,3),n$1e.typeOf.number.equals("indices.length % 3","0",i.length%3,0),n$1e.typeOf.number.greaterThan("granularity",n,0);var o,a=i.slice(0),s=t.length,l=new Array(3*s),u=0;for(o=0;o<s;o++){var c=t[o];l[u++]=c.x,l[u++]=c.y,l[u++]=c.z}for(var h=[],d={},f=e.maximumRadius,p=n$1d.chordLength(n,f),_=p*p;a.length>0;){var m,$,g=a.pop(),y=a.pop(),v=a.pop(),x=a$11.fromArray(l,3*v,V$S),b=a$11.fromArray(l,3*y,X$T),S=a$11.fromArray(l,3*g,Y$U),w=r?x:a$11.multiplyByScalar(a$11.normalize(x,Z$$),f,Z$$),C=r?b:a$11.multiplyByScalar(a$11.normalize(b,$$Y),f,$$Y),T=r?S:a$11.multiplyByScalar(a$11.normalize(S,rr$9),f,rr$9),P=a$11.magnitudeSquared(a$11.subtract(w,C,S$T)),E=a$11.magnitudeSquared(a$11.subtract(C,T,S$T)),A=a$11.magnitudeSquared(a$11.subtract(T,w,S$T)),L=Math.max(P,E,A);L>_?P===L?(t$$(o=d[m=Math.min(v,y)+" "+Math.max(v,y)])||($=a$11.add(x,b,S$T),a$11.multiplyByScalar($,.5,$),l.push($.x,$.y,$.z),o=l.length/3-1,d[m]=o),a.push(v,o,g),a.push(o,y,g)):E===L?(t$$(o=d[m=Math.min(y,g)+" "+Math.max(y,g)])||($=a$11.add(b,S,S$T),a$11.multiplyByScalar($,.5,$),l.push($.x,$.y,$.z),o=l.length/3-1,d[m]=o),a.push(y,o,v),a.push(o,g,v)):A===L&&(t$$(o=d[m=Math.min(g,v)+" "+Math.max(g,v)])||($=a$11.add(S,x,S$T),a$11.multiplyByScalar($,.5,$),l.push($.x,$.y,$.z),o=l.length/3-1,d[m]=o),a.push(g,o,y),a.push(o,v,y)):(h.push(v),h.push(y),h.push(g))}return new T$11({attributes:{position:new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:l})},indices:h,primitiveType:H$11.TRIANGLES})};var or$7=new i$1g,pr$2=new i$1g,hr$5=new i$1g,H$$=new i$1g;T$10.computeRhumbLineSubdivision=function(e,t,i,n){n=e$1Y(n,n$1d.RADIANS_PER_DEGREE),n$1e.typeOf.object("ellipsoid",e),n$1e.defined("positions",t),n$1e.defined("indices",i),n$1e.typeOf.number.greaterThanOrEquals("indices.length",i.length,3),n$1e.typeOf.number.equals("indices.length % 3","0",i.length%3,0),n$1e.typeOf.number.greaterThan("granularity",n,0);var r,o=i.slice(0),a=t.length,s=new Array(3*a),l=0;for(r=0;r<a;r++){var u=t[r];s[l++]=u.x,s[l++]=u.y,s[l++]=u.z}for(var c=[],h={},d=e.maximumRadius,f=n$1d.chordLength(n,d),p=new M$1c(void 0,void 0,e),_=new M$1c(void 0,void 0,e),m=new M$1c(void 0,void 0,e);o.length>0;){var $=o.pop(),g=o.pop(),y=o.pop(),v=a$11.fromArray(s,3*y,V$S),x=a$11.fromArray(s,3*g,X$T),b=a$11.fromArray(s,3*$,Y$U),S=e.cartesianToCartographic(v,or$7),w=e.cartesianToCartographic(x,pr$2),C=e.cartesianToCartographic(b,hr$5);p.setEndPoints(S,w);var T=p.surfaceDistance;_.setEndPoints(w,C);var P=_.surfaceDistance;m.setEndPoints(C,S);var E,A,L,M,I=m.surfaceDistance,O=Math.max(T,P,I);O>f?T===O?(t$$(r=h[E=Math.min(y,g)+" "+Math.max(y,g)])||(A=p.interpolateUsingFraction(.5,H$$),L=.5*(S.height+w.height),M=a$11.fromRadians(A.longitude,A.latitude,L,e,S$T),s.push(M.x,M.y,M.z),r=s.length/3-1,h[E]=r),o.push(y,r,$),o.push(r,g,$)):P===O?(t$$(r=h[E=Math.min(g,$)+" "+Math.max(g,$)])||(A=_.interpolateUsingFraction(.5,H$$),L=.5*(w.height+C.height),M=a$11.fromRadians(A.longitude,A.latitude,L,e,S$T),s.push(M.x,M.y,M.z),r=s.length/3-1,h[E]=r),o.push(g,r,y),o.push(r,$,y)):I===O&&(t$$(r=h[E=Math.min($,y)+" "+Math.max($,y)])||(A=m.interpolateUsingFraction(.5,H$$),L=.5*(C.height+S.height),M=a$11.fromRadians(A.longitude,A.latitude,L,e,S$T),s.push(M.x,M.y,M.z),r=s.length/3-1,h[E]=r),o.push($,r,g),o.push(r,y,g)):(c.push(y),c.push(g),c.push($))}return new T$11({attributes:{position:new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:s})},indices:c,primitiveType:H$11.TRIANGLES})},T$10.scaleToGeodeticHeight=function(e,t,i,n){i=e$1Y(i,n$1c.WGS84);var r=nr$8,o=ir$b;if(t=e$1Y(t,0),n=e$1Y(n,!0),t$$(e))for(var a=e.length,s=0;s<a;s+=3)a$11.fromArray(e,s,o),n&&(o=i.scaleToGeodeticSurface(o,o)),0!==t&&(r=i.geodeticSurfaceNormal(o,r),a$11.multiplyByScalar(r,t,r),a$11.add(o,r,o)),e[s]=o.x,e[s+1]=o.y,e[s+2]=o.z;return e};var c$12=[];function b$1o(e,t){this.center=a$11.clone(e$1Y(e,a$11.ZERO)),this.halfAxes=r$W.clone(e$1Y(t,r$W.ZERO)),this.areaDirty=1}c$12[0]={num:0,des:"inside"},c$12[1]={num:4,data:[0,4,7,3],des:"left"},c$12[2]={num:4,data:[1,2,6,5],des:"right"},c$12[3]={num:0},c$12[4]={num:4,data:[0,1,5,4],des:"bottom"},c$12[5]={num:6,data:[0,1,5,4,7,3],des:"bottom, left"},c$12[6]={num:6,data:[0,1,2,6,5,4],des:"bottom, right"},c$12[7]={num:0},c$12[8]={num:4,data:[2,3,7,6],des:"top"},c$12[9]={num:6,data:[4,7,6,2,3,0],des:"top, left"},c$12[10]={num:6,data:[2,3,7,6,5,1],des:"top, right"},c$12[11]={num:0},c$12[12]={num:0},c$12[13]={num:0},c$12[14]={num:0},c$12[15]={num:0},c$12[16]={num:4,data:[0,3,2,1],des:"front"},c$12[17]={num:6,data:[0,4,7,3,2,1],des:"front, left"},c$12[18]={num:6,data:[0,3,2,6,5,1],des:"front, right"},c$12[19]={num:0},c$12[20]={num:6,data:[0,3,2,1,5,4],des:"front, bottom"},c$12[21]={num:6,data:[2,1,5,4,7,3],des:"front, bottom, left"},c$12[22]={num:6,data:[0,3,2,6,5,4],des:"front, bottom, right"},c$12[23]={num:0},c$12[24]={num:6,data:[0,3,7,6,2,1],des:"front, top"},c$12[25]={num:6,data:[0,4,7,6,2,1],des:"front, top, left"},c$12[26]={num:6,data:[0,3,7,6,5,1],des:"front, top, right"},c$12[27]={num:0},c$12[28]={num:0},c$12[29]={num:0},c$12[30]={num:0},c$12[31]={num:0},c$12[32]={num:4,data:[4,5,6,7],des:"back"},c$12[33]={num:6,data:[4,5,6,7,3,0],des:"back, left"},c$12[34]={num:6,data:[1,2,6,7,4,5],des:"back, right"},c$12[35]={num:0},c$12[36]={num:6,data:[0,1,5,6,7,4],des:"back, bottom"},c$12[37]={num:6,data:[0,1,5,6,7,3],des:"back, bottom, left"},c$12[38]={num:6,data:[0,1,2,6,7,4],des:"back, bottom, right"},c$12[39]={num:0},c$12[40]={num:6,data:[2,3,7,4,5,6],des:"back, top"},c$12[41]={num:6,data:[0,4,5,6,2,3],des:"back, top, left"},c$12[42]={num:6,data:[1,2,3,7,4,5],des:"back, top, right"},b$1o.packedLength=a$11.packedLength+r$W.packedLength,b$1o.pack=function(e,t,i){return n$1e.typeOf.object("value",e),n$1e.defined("array",t),i=e$1Y(i,0),a$11.pack(e.center,t,i),r$W.pack(e.halfAxes,t,i+a$11.packedLength),t},b$1o.unpack=function(e,t,i){return n$1e.defined("array",e),t=e$1Y(t,0),t$$(i)||(i=new b$1o),a$11.unpack(e,t,i.center),r$W.unpack(e,t+a$11.packedLength,i.halfAxes),i};var Nt$a=new a$11,Pt$8=new a$11,Ct$9=new a$11,At$7=new a$11,Rt$c=new a$11,Tt$a=new a$11,Et$6=new r$W,Lt$c={unitary:new r$W,diagonal:new r$W},B$S=new a$11,A$19=new a$11,x$1e=new a$11;b$1o.fromPoints=function(e,t){if(t$$(t)||(t=new b$1o),!t$$(e)||0===e.length)return t.halfAxes=r$W.ZERO,t.center=a$11.ZERO,t;var i,n=e.length,r=a$11.clone(e[0],Nt$a);for(i=1;i<n;i++)a$11.add(r,e[i],r);var o=1/n;a$11.multiplyByScalar(r,o,r);var a,s=0,l=0,u=0,c=0,h=0,d=0;for(i=0;i<n;i++)s+=(a=a$11.subtract(e[i],r,Pt$8)).x*a.x,l+=a.x*a.y,u+=a.x*a.z,c+=a.y*a.y,h+=a.y*a.z,d+=a.z*a.z;s*=o,l*=o,u*=o,c*=o,h*=o,d*=o;var f=Et$6;f[0]=s,f[1]=l,f[2]=u,f[3]=l,f[4]=c,f[5]=h,f[6]=u,f[7]=h,f[8]=d;var p=r$W.computeEigenDecomposition(f,Lt$c),_=r$W.clone(p.unitary,t.halfAxes),m=r$W.getColumn(_,0,At$7),$=r$W.getColumn(_,1,Rt$c),g=r$W.getColumn(_,2,Tt$a),y=-Number.MAX_VALUE,v=-Number.MAX_VALUE,x=-Number.MAX_VALUE,b=Number.MAX_VALUE,S=Number.MAX_VALUE,w=Number.MAX_VALUE;for(i=0;i<n;i++)a=e[i],y=Math.max(a$11.dot(m,a),y),v=Math.max(a$11.dot($,a),v),x=Math.max(a$11.dot(g,a),x),b=Math.min(a$11.dot(m,a),b),S=Math.min(a$11.dot($,a),S),w=Math.min(a$11.dot(g,a),w);m=a$11.multiplyByScalar(m,.5*(b+y),m),$=a$11.multiplyByScalar($,.5*(S+v),$),g=a$11.multiplyByScalar(g,.5*(w+x),g);var C=a$11.add(m,$,t.center);a$11.add(C,g,C);var T=Ct$9;return T.x=y-b,T.y=v-S,T.z=x-w,a$11.multiplyByScalar(T,.5,T),r$W.multiplyByScale(t.halfAxes,T,t.halfAxes),t};var ct$i=new a$11,qt$a=new a$11;function ht$d(e,t,i,n,r,o,a,s,l,u,c){if(!(t$$(r)&&t$$(o)&&t$$(a)&&t$$(s)&&t$$(l)&&t$$(u)))throw new t$_("all extents (minimum/maximum X/Y/Z) are required.");t$$(c)||(c=new b$1o);var h=c.halfAxes;r$W.setColumn(h,0,t,h),r$W.setColumn(h,1,i,h),r$W.setColumn(h,2,n,h);var d=ct$i;d.x=(r+o)/2,d.y=(a+s)/2,d.z=(l+u)/2;var f=qt$a;f.x=(o-r)/2,f.y=(s-a)/2,f.z=(u-l)/2;var p=c.center;return d=r$W.multiplyByVector(h,d,d),a$11.add(e,d,p),r$W.multiplyByScale(h,f,h),c}var lt$j=new i$1g,It$a=new a$11,St$a=new i$1g,kt$9=new i$1g,Bt$c=new i$1g,_t$c=new i$1g,Ut$9=new i$1g,Xt$9=new a$11,ft$e=new a$11,Vt$b=new a$11,pt$e=new a$11,Wt$a=new a$11,Dt$8=new r$T,jt$b=new r$T,Yt$a=new r$T,Zt$9=new r$T,Gt$b=new r$T,Ft$8=new a$11,Jt$b=new a$11,Kt$a=new a$11,Qt$b=new a$11,$t$a=new r$T,Ht$5=new a$11,te$E=new a$11,ee$C=new a$11,ne$B=new n$17(a$11.UNIT_X,0);b$1o.fromRectangle=function(e,t,i,n,r){if(!t$$(e))throw new t$_("rectangle is required");if(e.width<0||e.width>n$1d.TWO_PI)throw new t$_("Rectangle width must be between 0 and 2*pi");if(e.height<0||e.height>n$1d.PI)throw new t$_("Rectangle height must be between 0 and pi");if(t$$(n)&&!n$1d.equalsEpsilon(n.radii.x,n.radii.y,n$1d.EPSILON15))throw new t$_("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");var o,a,s,l,u,c,h;if(t=e$1Y(t,0),i=e$1Y(i,0),n=e$1Y(n,n$1c.WGS84),e.width<=n$1d.PI){var d=s$1p.center(e,lt$j),f=new s$1h(n.cartographicToCartesian(d,It$a),n);h=f.plane;var p=d.longitude,_=e.south<0&&e.north>0?0:d.latitude,m=i$1g.fromRadians(p,e.north,i,St$a),$=i$1g.fromRadians(e.west,e.north,i,kt$9),g=i$1g.fromRadians(e.west,_,i,Bt$c),y=i$1g.fromRadians(e.west,e.south,i,_t$c),v=i$1g.fromRadians(p,e.south,i,Ut$9),x=n.cartographicToCartesian(m,Xt$9),b=n.cartographicToCartesian($,ft$e),S=n.cartographicToCartesian(g,Vt$b),w=n.cartographicToCartesian(y,pt$e),C=n.cartographicToCartesian(v,Wt$a),T=f.projectPointToNearestOnPlane(x,Dt$8),P=f.projectPointToNearestOnPlane(b,jt$b),E=f.projectPointToNearestOnPlane(S,Yt$a),A=f.projectPointToNearestOnPlane(w,Zt$9),L=f.projectPointToNearestOnPlane(C,Gt$b);return a=-(o=Math.min(P.x,E.x,A.x)),l=Math.max(P.y,T.y),s=Math.min(A.y,L.y),$.height=y.height=t,b=n.cartographicToCartesian($,ft$e),w=n.cartographicToCartesian(y,pt$e),u=Math.min(n$17.getPointDistance(h,b),n$17.getPointDistance(h,w)),c=i,ht$d(f.origin,f.xAxis,f.yAxis,f.zAxis,o,a,s,l,u,c,r)}var M=e.south>0,I=e.north<0,O=M?e.south:I?e.north:0,D=s$1p.center(e,lt$j).longitude,R=a$11.fromRadians(D,O,i,n,Ft$8);R.z=0;var N=Math.abs(R.x)<n$1d.EPSILON10&&Math.abs(R.y)<n$1d.EPSILON10?a$11.UNIT_X:a$11.normalize(R,Jt$b),F=a$11.UNIT_Z,B=a$11.cross(N,F,Kt$a);h=n$17.fromPointNormal(R,N,ne$B);var z=a$11.fromRadians(D+n$1d.PI_OVER_TWO,O,i,n,Qt$b);o=-(a=a$11.dot(n$17.projectPointOntoPlane(h,z,$t$a),B)),l=a$11.fromRadians(0,e.north,I?t:i,n,Ht$5).z,s=a$11.fromRadians(0,e.south,M?t:i,n,te$E).z;var G=a$11.fromRadians(e.east,O,i,n,ee$C);return ht$d(R,B,F,N,o,a,s,l,u=n$17.getPointDistance(h,G),c=0,r)},b$1o.clone=function(e,t){if(t$$(e))return t$$(t)?(a$11.clone(e.center,t.center),r$W.clone(e.halfAxes,t.halfAxes),t.areaDirty=1,t):new b$1o(e.center,e.halfAxes)},b$1o.intersectPlane=function(e,t){if(!t$$(e))throw new t$_("box is required.");if(!t$$(t))throw new t$_("plane is required.");var i=e.center,n=t.normal,r=e.halfAxes,o=n.x,a=n.y,s=n.z,l=Math.abs(o*r[r$W.COLUMN0ROW0]+a*r[r$W.COLUMN0ROW1]+s*r[r$W.COLUMN0ROW2])+Math.abs(o*r[r$W.COLUMN1ROW0]+a*r[r$W.COLUMN1ROW1]+s*r[r$W.COLUMN1ROW2])+Math.abs(o*r[r$W.COLUMN2ROW0]+a*r[r$W.COLUMN2ROW1]+s*r[r$W.COLUMN2ROW2]),u=a$11.dot(n,i)+t.distance;return u<=-l?cr$4.OUTSIDE:u>=l?cr$4.INSIDE:cr$4.INTERSECTING};var et$l=new a$11,nt$i=new a$11,at$g=new a$11,ae$D=new a$11,re$F=new a$11;b$1o.distanceSquaredTo=function(e,t){if(!t$$(e))throw new t$_("box is required.");if(!t$$(t))throw new t$_("cartesian is required.");var i=a$11.subtract(t,e.center,ct$i),n=e.halfAxes,r=r$W.getColumn(n,0,et$l),o=r$W.getColumn(n,1,nt$i),a=r$W.getColumn(n,2,at$g),s=a$11.magnitude(r),l=a$11.magnitude(o),u=a$11.magnitude(a);a$11.normalize(r,r),a$11.normalize(o,o),a$11.normalize(a,a);var c=ae$D;c.x=a$11.dot(i,r),c.y=a$11.dot(i,o),c.z=a$11.dot(i,a);var h,d=0;return c.x<-s?d+=(h=c.x+s)*h:c.x>s&&(d+=(h=c.x-s)*h),c.y<-l?d+=(h=c.y+l)*h:c.y>l&&(d+=(h=c.y-l)*h),c.z<-u?d+=(h=c.z+u)*h:c.z>u&&(d+=(h=c.z-u)*h),d};var wt$7=new a$11,oe$A=new a$11;b$1o.computePlaneDistances=function(e,t,i,n){if(!t$$(e))throw new t$_("box is required.");if(!t$$(t))throw new t$_("position is required.");if(!t$$(i))throw new t$_("direction is required.");t$$(n)||(n=new i$1f);var r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,a=e.center,s=e.halfAxes,l=r$W.getColumn(s,0,et$l),u=r$W.getColumn(s,1,nt$i),c=r$W.getColumn(s,2,at$g),h=a$11.add(l,u,wt$7);a$11.add(h,c,h),a$11.add(h,a,h);var d=a$11.subtract(h,t,oe$A),f=a$11.dot(i,d);return r=Math.min(f,r),o=Math.max(f,o),a$11.add(a,l,h),a$11.add(h,u,h),a$11.subtract(h,c,h),a$11.subtract(h,t,d),f=a$11.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),a$11.add(a,l,h),a$11.subtract(h,u,h),a$11.add(h,c,h),a$11.subtract(h,t,d),f=a$11.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),a$11.add(a,l,h),a$11.subtract(h,u,h),a$11.subtract(h,c,h),a$11.subtract(h,t,d),f=a$11.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),a$11.subtract(a,l,h),a$11.add(h,u,h),a$11.add(h,c,h),a$11.subtract(h,t,d),f=a$11.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),a$11.subtract(a,l,h),a$11.add(h,u,h),a$11.subtract(h,c,h),a$11.subtract(h,t,d),f=a$11.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),a$11.subtract(a,l,h),a$11.subtract(h,u,h),a$11.add(h,c,h),a$11.subtract(h,t,d),f=a$11.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),a$11.subtract(a,l,h),a$11.subtract(h,u,h),a$11.subtract(h,c,h),a$11.subtract(h,t,d),f=a$11.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),n.start=r,n.stop=o,n};var ie$F=new c$19;b$1o.isOccluded=function(e,t){if(!t$$(e))throw new t$_("box is required.");if(!t$$(t))throw new t$_("occluder is required.");var i=c$19.fromOrientedBoundingBox(e,ie$F);return!t.isBoundingSphereVisible(i)},b$1o.prototype.intersectPlane=function(e){return b$1o.intersectPlane(this,e)},b$1o.prototype.distanceSquaredTo=function(e){return b$1o.distanceSquaredTo(this,e)},b$1o.prototype.computePlaneDistances=function(e,t,i){return b$1o.computePlaneDistances(this,e,t,i)},b$1o.prototype.isOccluded=function(e){return b$1o.isOccluded(this,e)},b$1o.equals=function(e,t){return e===t||t$$(e)&&t$$(t)&&a$11.equals(e.center,t.center)&&r$W.equals(e.halfAxes,t.halfAxes)},b$1o.prototype.clone=function(e){return b$1o.clone(this,e)},b$1o.prototype.equals=function(e){return b$1o.equals(this,e)};var xt$c=new a$10;b$1o.prototype._updateBBox=function(){if(1==this.areaDirty){var e=r$W.getColumn(this.halfAxes,0,et$l),t=a$11.clone(a$11.negate(e,B$S)),i=r$W.getColumn(this.halfAxes,1,nt$i),n=a$11.clone(a$11.negate(i,B$S)),r=r$W.getColumn(this.halfAxes,2,at$g),o=a$11.clone(a$11.negate(r,B$S));this.bbox=[],a$11.add(this.center,i,B$S),a$11.add(B$S,o,A$19),a$11.add(A$19,t,x$1e),this.bbox[0]=new a$11(x$1e.x,x$1e.y,x$1e.z),a$11.add(A$19,e,x$1e),this.bbox[1]=new a$11(x$1e.x,x$1e.y,x$1e.z),a$11.add(B$S,r,A$19),a$11.add(A$19,e,x$1e),this.bbox[2]=new a$11(x$1e.x,x$1e.y,x$1e.z),a$11.add(A$19,t,x$1e),this.bbox[3]=new a$11(x$1e.x,x$1e.y,x$1e.z),a$11.add(this.center,n,B$S),a$11.add(B$S,o,A$19),a$11.add(A$19,t,x$1e),this.bbox[4]=new a$11(x$1e.x,x$1e.y,x$1e.z),a$11.add(A$19,e,x$1e),this.bbox[5]=new a$11(x$1e.x,x$1e.y,x$1e.z),a$11.add(B$S,r,A$19),a$11.add(A$19,e,x$1e),this.bbox[6]=new a$11(x$1e.x,x$1e.y,x$1e.z),a$11.add(A$19,t,x$1e),this.bbox[7]=new a$11(x$1e.x,x$1e.y,x$1e.z);var a=a$11.magnitude(e),s=a$11.magnitude(i),l=a$11.magnitude(r),u=new a$11(-a,-s,-l),c=new a$11(a,s,l);if(a*s*l==0)return void(this.areaDirty=-1);a$11.normalize(e,e),a$11.normalize(i,i),a$11.normalize(r,r),this.u=a$11.clone(e),this.v=a$11.clone(i),this.w=a$11.clone(r),this.posMin=u,this.posMaX=c,this.areaDirty=0}};var W$17=[];W$17.push(new r$T),W$17.push(new r$T),W$17.push(new r$T),W$17.push(new r$T),W$17.push(new r$T),W$17.push(new r$T);var se$A=new i$1g,J$10=new a$11;b$1o.prototype.calculateBoxArea=function(e,t,i,n,r,o,a,s){this._updateBBox();var l=e,u=a$11.subtract(l,this.center,re$F);if(-1==this.areaDirty){var c=r/n*(x=-1!=o?o:.5*a$11.distance(this.posMaX,this.posMin))/i;return n$1d.PI*c*c}var h=a$11.fromElements(a$11.dot(u,this.u),a$11.dot(u,this.v),a$11.dot(u,this.w),wt$7),d=(h.x<this.posMin.x?1:0)+((h.x>this.posMaX.x?1:0)<<1)+((h.z<this.posMin.z?1:0)<<2)+((h.z>this.posMaX.z?1:0)<<3)+((h.y>this.posMaX.y?1:0)<<4)+((h.y<this.posMin.y?1:0)<<5);if(d>42)return console.log("area calculation is wrong"),-100;var f=c$12[d];if(0==f.num){c=r/n*(x=-1!=o?o:.5*a$11.distance(this.posMaX,this.posMin))/i;return n$1d.PI*c*c}if(0==f.num)return console.log("area calculation is wrong"),-100;for(var p,_=[],m=a,$=0;$<f.num;$++){var g=W$17[$],y=this.bbox[f.data[$]];p=!1;var v,x,b=n$1d.PI;if(3===t)(v=c$1a.multiplyByVector(m,a$10.fromElements(y.x,y.y,y.z,1),xt$c)).z<0&&(p=!0,-1==x&&(b=n$1d.PI_OVER_FOUR,i=a$11.magnitude(u)));else{var S=s,w=S.ellipsoid.cartesianToCartographic(y,se$A);t$$(w)?(S.project(w,J$10),(v=c$1a.multiplyByVector(m,a$10.fromElements(J$10.z,J$10.x,J$10.y,1),xt$c)).z<0&&(p=!0)):p=!0}if(1==p)return b*(c=r/n*(x=-1!=o?o:.5*a$11.distance(this.posMaX,this.posMin))/i)*c;g.x=v.x/v.w,g.y=r-v.y/v.w,_.push(g)}return Math.abs(T$10.computeArea2D(_))};var b$1n=1/256,M$1b=256,r$P={octEncodeInRange:function(e,t,i){n$1e.defined("vector",e),n$1e.defined("result",i);var n=a$11.magnitudeSquared(e);if(Math.abs(n-1)>n$1d.EPSILON6)throw new t$_("vector must be normalized.");if(i.x=e.x/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),i.y=e.y/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),e.z<0){var r=i.x,o=i.y;i.x=(1-Math.abs(o))*n$1d.signNotZero(r),i.y=(1-Math.abs(r))*n$1d.signNotZero(o)}return i.x=n$1d.toSNorm(i.x,t),i.y=n$1d.toSNorm(i.y,t),i},octEncode:function(e,t){return r$P.octEncodeInRange(e,255,t)}},s$1f=new r$T,p$1i=new Uint8Array(1);function l$$(e){return p$1i[0]=e,p$1i[0]}r$P.octEncodeToCartesian4=function(e,t){return r$P.octEncodeInRange(e,65535,s$1f),t.x=l$$(s$1f.x*b$1n),t.y=l$$(s$1f.x),t.z=l$$(s$1f.y*b$1n),t.w=l$$(s$1f.y),t},r$P.octDecodeInRange=function(e,t,i,n){if(n$1e.defined("result",n),e<0||e>i||t<0||t>i)throw new t$_("x and y must be unsigned normalized integers between 0 and "+i);if(n.x=n$1d.fromSNorm(e,i),n.y=n$1d.fromSNorm(t,i),n.z=1-(Math.abs(n.x)+Math.abs(n.y)),n.z<0){var r=n.x;n.x=(1-Math.abs(n.y))*n$1d.signNotZero(r),n.y=(1-Math.abs(r))*n$1d.signNotZero(n.y)}return a$11.normalize(n,n)},r$P.octDecode=function(e,t,i){return r$P.octDecodeInRange(e,t,255,i)},r$P.octDecodeFromCartesian4=function(e,t){n$1e.typeOf.object("encoded",e),n$1e.typeOf.object("result",t);var i=e.x,n=e.y,r=e.z,o=e.w;if(i<0||i>255||n<0||n>255||r<0||r>255||o<0||o>255)throw new t$_("x, y, z, and w must be unsigned normalized integers between 0 and 255");var a=i*M$1b+n,s=r*M$1b+o;return r$P.octDecodeInRange(a,s,65535,t)},r$P.octPackFloat=function(e){return n$1e.defined("encoded",e),256*e.x+e.y};var m$10=new r$T;function x$1d(e){return e>>1^-(1&e)}r$P.octEncodeFloat=function(e){return r$P.octEncode(e,m$10),r$P.octPackFloat(m$10)},r$P.octDecodeFloat=function(e,t){n$1e.defined("value",e);var i=e/256,n=Math.floor(i),r=256*(i-n);return r$P.octDecode(n,r,t)},r$P.octPack=function(e,t,i,n){n$1e.defined("v1",e),n$1e.defined("v2",t),n$1e.defined("v3",i),n$1e.defined("result",n);var r=r$P.octEncodeFloat(e),o=r$P.octEncodeFloat(t),a=r$P.octEncode(i,m$10);return n.x=65536*a.x+r,n.y=65536*a.y+o,n},r$P.octUnpack=function(e,t,i,n){n$1e.defined("packed",e),n$1e.defined("v1",t),n$1e.defined("v2",i),n$1e.defined("v3",n);var r=e.x/65536,o=Math.floor(r),a=65536*(r-o);r=e.y/65536;var s=Math.floor(r),l=65536*(r-s);r$P.octDecodeFloat(a,t),r$P.octDecodeFloat(l,i),r$P.octDecode(o,s,n)},r$P.compressTextureCoordinates=function(e){return n$1e.defined("textureCoordinates",e),4096*(4095*e.x|0)+(4095*e.y|0)},r$P.decompressTextureCoordinates=function(e,t){n$1e.defined("compressed",e),n$1e.defined("result",t);var i=e/4096,n=Math.floor(i);return t.x=n/4095,t.y=(e-4096*n)/4095,t},r$P.zigZagDeltaDecode=function(e,t,i){n$1e.defined("uBuffer",e),n$1e.defined("vBuffer",t),n$1e.typeOf.number.equals("uBuffer.length","vBuffer.length",e.length,t.length),t$$(i)&&n$1e.typeOf.number.equals("uBuffer.length","heightBuffer.length",e.length,i.length);for(var n=e.length,r=0,o=0,a=0,s=0;s<n;++s)r+=x$1d(e[s]),o+=x$1d(t[s]),e[s]=r,t[s]=o,t$$(i)&&(a+=x$1d(i[s]),i[s]=a)},r$P.octShortToFloat=function(e){return n$1d.clamp(3051850947599719e-20*e,-1,1)},r$P.octShortDecode=function(e,t,i){if(n$1e.defined("result",i),i.x=r$P.octShortToFloat(e),i.y=r$P.octShortToFloat(t),i.z=1-(Math.abs(i.x)+Math.abs(i.y)),i.z<0){var n=i.x;i.x=(1-Math.abs(i.y))*n$1d.signNotZero(n),i.y=(1-Math.abs(n))*n$1d.signNotZero(i.y)}return a$11.normalize(i,i)};var e$1I={NONE:0,BITS12:1},me$D=Object.freeze(e$1I),v$12=new a$11,W$16=new a$11,c$11=new r$T,g$U=new c$1a,P$Z=new c$1a,O$X=Math.pow(2,12);function u$13(e,t,i,n,r,o){var a,s,l,u=me$D.NONE;if(t$$(e)&&t$$(t)&&t$$(i)&&t$$(n)){var c=e.minimum,h=e.maximum,d=a$11.subtract(h,c,W$16),f=i-t;u=Math.max(a$11.maximumComponent(d),f)<O$X-1?me$D.BITS12:me$D.NONE,u=me$D.NONE,a=e.center,s=c$1a.inverseTransformation(n,new c$1a);var p=a$11.negate(c,v$12);c$1a.multiply(c$1a.fromTranslation(p,g$U),s,s);var _=v$12;_.x=1/d.x,_.y=1/d.y,_.z=1/d.z,c$1a.multiply(c$1a.fromScale(_,g$U),s,s),l=c$1a.clone(n),c$1a.setTranslation(l,a$11.ZERO,l),n=c$1a.clone(n,new c$1a);var m=c$1a.fromTranslation(c,g$U),$=c$1a.fromScale(d,P$Z),g=c$1a.multiply(m,$,g$U);c$1a.multiply(n,g,n),c$1a.multiply(l,g,l)}this.quantization=u,this.minimumHeight=t,this.maximumHeight=i,this.center=a,this.toScaledENU=s,this.fromScaledENU=n,this.matrix=l,this.hasVertexNormals=r,this.hasWebMercatorT=e$1Y(o,!1)}u$13.prototype.encode=function(e,t,i,n,r,o,a){var s=n.x,l=n.y;if(this.quantization===me$D.BITS12){(i=c$1a.multiplyByPoint(this.toScaledENU,i,v$12)).x=n$1d.clamp(i.x,0,1),i.y=n$1d.clamp(i.y,0,1),i.z=n$1d.clamp(i.z,0,1);var u=this.maximumHeight-this.minimumHeight,c=n$1d.clamp((r-this.minimumHeight)/u,0,1);r$T.fromElements(i.x,i.y,c$11);var h=r$P.compressTextureCoordinates(c$11);r$T.fromElements(i.z,c,c$11);var d=r$P.compressTextureCoordinates(c$11);r$T.fromElements(s,l,c$11);var f=r$P.compressTextureCoordinates(c$11);if(e[t++]=h,e[t++]=d,e[t++]=f,this.hasWebMercatorT){r$T.fromElements(a,0,c$11);var p=r$P.compressTextureCoordinates(c$11);e[t++]=p}}else a$11.subtract(i,this.center,v$12),e[t++]=v$12.x,e[t++]=v$12.y,e[t++]=v$12.z,e[t++]=r,e[t++]=s,e[t++]=l,this.hasWebMercatorT&&(e[t++]=a);return this.hasVertexNormals&&(e[t++]=r$P.octPackFloat(o)),t},u$13.prototype.decodePosition=function(e,t,i){if(t$$(i)||(i=new a$11),t*=this.getStride(),this.quantization===me$D.BITS12){var n=r$P.decompressTextureCoordinates(e[t],c$11);i.x=n.x,i.y=n.y;var r=r$P.decompressTextureCoordinates(e[t+1],c$11);return i.z=r.x,c$1a.multiplyByPoint(this.fromScaledENU,i,i)}return i.x=e[t],i.y=e[t+1],i.z=e[t+2],a$11.add(i,this.center,i)},u$13.prototype.decodeTextureCoordinates=function(e,t,i){return t$$(i)||(i=new r$T),t*=this.getStride(),this.quantization===me$D.BITS12?r$P.decompressTextureCoordinates(e[t+2],i):r$T.fromElements(e[t+4],e[t+5],i)},u$13.prototype.decodeHeight=function(e,t){return t*=this.getStride(),this.quantization===me$D.BITS12?r$P.decompressTextureCoordinates(e[t+1],c$11).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight:e[t+3]},u$13.prototype.decodeWebMercatorT=function(e,t){return t*=this.getStride(),this.quantization===me$D.BITS12?r$P.decompressTextureCoordinates(e[t+3],c$11).x:e[t+6]},u$13.prototype.getOctEncodedNormal=function(e,t,i){var n=e[t=(t+1)*this.getStride()-1]/256,r=Math.floor(n),o=256*(n-r);return r$T.fromElements(r,o,i)},u$13.prototype.getStride=function(){var e;if(this.quantization===me$D.BITS12)e=3;else e=6;return this.hasWebMercatorT&&++e,this.hasVertexNormals&&++e,e};var I$18={position3DAndHeight:0,textureCoordAndEncodedNormals:1},D$17={compressed0:0,compressed1:1};function e$1H(e){this._ellipsoid=e$1Y(e,n$1c.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}u$13.prototype.getAttributes=function(e){var t,i=C$12.FLOAT,n=C$12.getSizeInBytes(i);if(this.quantization===me$D.NONE){var r=2;this.hasWebMercatorT&&++r,this.hasVertexNormals&&++r,t=(4+r)*n;var o=[{index:I$18.position3DAndHeight,vertexBuffer:e,componentDatatype:i,componentsPerAttribute:4,offsetInBytes:0,strideInBytes:t},{index:I$18.textureCoordAndEncodedNormals,vertexBuffer:e,componentDatatype:i,componentsPerAttribute:r,offsetInBytes:4*n,strideInBytes:t}];return o}var a=3,s=0;return(this.hasWebMercatorT||this.hasVertexNormals)&&++a,this.hasWebMercatorT&&this.hasVertexNormals?(t=(a+ ++s)*n,[{index:o.compressed0,vertexBuffer:e,componentDatatype:i,componentsPerAttribute:a,offsetInBytes:0,strideInBytes:t},{index:o.compressed1,vertexBuffer:e,componentDatatype:i,componentsPerAttribute:s,offsetInBytes:a*n,strideInBytes:t}]):[{index:o.compressed0,vertexBuffer:e,componentDatatype:i,componentsPerAttribute:a}]},u$13.prototype.getAttributeLocations=function(){return this.quantization===me$D.NONE?I$18:D$17},u$13.clone=function(e,t){return t$$(t)||(t=new u$13),t.quantization=e.quantization,t.minimumHeight=e.minimumHeight,t.maximumHeight=e.maximumHeight,t.center=a$11.clone(e.center),t.toScaledENU=c$1a.clone(e.toScaledENU),t.fromScaledENU=c$1a.clone(e.fromScaledENU),t.matrix=c$1a.clone(e.matrix),t.hasVertexNormals=e.hasVertexNormals,t.hasWebMercatorT=e.hasWebMercatorT,t},Object.defineProperties(e$1H.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),e$1H.mercatorAngleToGeodeticLatitude=function(e){return n$1d.PI_OVER_TWO-2*Math.atan(Math.exp(-e))},e$1H.geodeticLatitudeToMercatorAngle=function(e){e>e$1H.MaximumLatitude?e=e$1H.MaximumLatitude:e<-e$1H.MaximumLatitude&&(e=-e$1H.MaximumLatitude);var t=Math.sin(e);return.5*Math.log((1+t)/(1-t))},e$1H.MaximumLatitude=e$1H.mercatorAngleToGeodeticLatitude(Math.PI),e$1H.prototype.project=function(e,t){var i=this._semimajorAxis,n=e.longitude*i,r=e$1H.geodeticLatitudeToMercatorAngle(e.latitude)*i,o=e.height;return t$$(t)?(t.x=n,t.y=r,t.z=o,t):new a$11(n,r,o)},e$1H.prototype.unproject=function(e,t){if(!t$$(e))throw new t$_("cartesian is required");var i=this._oneOverSemimajorAxis,n=e.x*i,r=e$1H.mercatorAngleToGeodeticLatitude(e.y*i),o=e.z;return t$$(t)?(t.longitude=n,t.latitude=r,t.height=o,t):new i$1g(n,r,o)};var m$$={};m$$.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var ve$s=new a$11,sr$5=new c$1a,lr$6=new a$11,Tr$4=new a$11;function n$14(){return!0}function s$1e(e,t){function i(){throw new t$_(t)}for(var n in t=e$1Y(t,"This object was destroyed, i.e., destroy() was called."),e)"function"==typeof e[n]&&(e[n]=i);e.isDestroyed=n$14}function p$1h(){if(!t$$(o$_._canTransferArrayBuffer)){var e=new Worker(v$11("Workers/transferTypedArrayTest.js"));e.postMessage=e$1Y(e.webkitPostMessage,e.postMessage);var t=new Int8Array([99]);try{e.postMessage({array:t},[t.buffer])}catch{return o$_._canTransferArrayBuffer=!1,o$_._canTransferArrayBuffer}var i=c$18.defer();e.onmessage=function(t){var n=t.data.array,r=t$$(n)&&99===n[0];i.resolve(r),e.terminate(),o$_._canTransferArrayBuffer=r},o$_._canTransferArrayBuffer=i.promise}return o$_._canTransferArrayBuffer}m$$.computeVertices=function(e){if(!t$$(e)||!t$$(e.heightmap))throw new t$_("options.heightmap is required.");if(!t$$(e.width)||!t$$(e.height))throw new t$_("options.width and options.height are required.");if(!t$$(e.nativeRectangle))throw new t$_("options.nativeRectangle is required.");if(!t$$(e.skirtHeight))throw new t$_("options.skirtHeight is required.");var t,i,n,r,o=Math.cos,a=Math.sin,s=Math.sqrt,l=Math.atan,u=Math.exp,c=n$1d.PI_OVER_TWO,h=n$1d.toRadians,d=e.heightmap,f=e.width,p=e.height,_=e.skirtHeight,m=e$1Y(e.isGeographic,!0),$=e$1Y(e.ellipsoid,n$1c.WGS84),g=1/$.maximumRadius,y=e.nativeRectangle,v=e.rectangle;t$$(v)?(t=v.west,i=v.south,n=v.east,r=v.north):m?(t=h(y.west),i=h(y.south),n=h(y.east),r=h(y.north)):(t=y.west*g,i=c-2*l(u(-y.south*g)),n=y.east*g,r=c-2*l(u(-y.north*g)));var x=e.relativeToCenter,b=t$$(x);x=b?x:a$11.ZERO;var S=e$1Y(e.exaggeration,1),w=e$1Y(e.includeWebMercatorT,!1),C=e$1Y(e.structure,m$$.DEFAULT_STRUCTURE),T=e$1Y(C.heightScale,m$$.DEFAULT_STRUCTURE.heightScale),P=e$1Y(C.heightOffset,m$$.DEFAULT_STRUCTURE.heightOffset),E=e$1Y(C.elementsPerHeight,m$$.DEFAULT_STRUCTURE.elementsPerHeight),A=e$1Y(C.stride,m$$.DEFAULT_STRUCTURE.stride),L=e$1Y(C.elementMultiplier,m$$.DEFAULT_STRUCTURE.elementMultiplier),M=e$1Y(C.isBigEndian,m$$.DEFAULT_STRUCTURE.isBigEndian),I=s$1p.computeWidth(y),O=s$1p.computeHeight(y),D=I/(f-1),R=O/(p-1);m||(I*=g,O*=g);var N,F,B=$.radiiSquared,z=B.x,G=B.y,k=B.z,U=65536,V=-65536,W=m$13.eastNorthUpToFixedFrame(x,$),H=c$1a.inverseTransformation(W,sr$5);w&&(N=e$1H.geodeticLatitudeToMercatorAngle(i),F=1/(e$1H.geodeticLatitudeToMercatorAngle(r)-N));var Y=lr$6;Y.x=Number.POSITIVE_INFINITY,Y.y=Number.POSITIVE_INFINITY,Y.z=Number.POSITIVE_INFINITY;var j=Tr$4;j.x=Number.NEGATIVE_INFINITY,j.y=Number.NEGATIVE_INFINITY,j.z=Number.NEGATIVE_INFINITY;var q=Number.POSITIVE_INFINITY,X=f*p,K=X+(_>0?2*f+2*p:0),Z=new Array(K),J=new Array(K),Q=new Array(K),ee=w?new Array(K):[],te=0,ie=p,ne=0,re=f;_>0&&(--te,++ie,--ne,++re);for(var oe=1e-5,ae=te;ae<ie;++ae){var se=ae;se<0&&(se=0),se>=p&&(se=p-1);var le=y.north-R*se,ue=((le=m?h(le):c-2*l(u(-le*g)))-i)/(r-i);ue=n$1d.clamp(ue,0,1);var ce=ae===te,he=ae===ie-1;_>0&&(ce?le+=oe*O:he&&(le-=oe*O));var de,fe=o(le),pe=a(le),_e=k*pe;w&&(de=(e$1H.geodeticLatitudeToMercatorAngle(le)-N)*F);for(var me=ne;me<re;++me){var $e=me;$e<0&&($e=0),$e>=f&&($e=f-1);var ge,ye,ve=se*(f*A)+$e*A;if(1===E)ge=d[ve];else if(ge=0,M)for(ye=0;ye<E;++ye)ge=ge*L+d[ve+ye];else for(ye=E-1;ye>=0;--ye)ge=ge*L+d[ve+ye];ge=(ge*T+P)*S,V=Math.max(V,ge),U=Math.min(U,ge);var xe=y.west+D*$e;m?xe=h(xe):xe*=g;var be=(xe-t)/(n-t);be=n$1d.clamp(be,0,1);var Se=se*f+$e;if(_>0){var we=me===ne,Ce=me===re-1,Te=ce||he||we||Ce;if((ce||he)&&(we||Ce))continue;Te&&(ge-=_,we?(Se=X+(p-se-1),xe-=oe*I):he?Se=X+p+(f-$e-1):Ce?(Se=X+p+f+se,xe+=oe*I):ce&&(Se=X+p+f+p+$e))}var Pe=fe*o(xe),Ee=fe*a(xe),Ae=z*Pe,Le=G*Ee,Me=1/s(Ae*Pe+Le*Ee+_e*pe),Ie=Ae*Me,Oe=Le*Me,De=_e*Me,Re=new a$11;Re.x=Ie+Pe*ge,Re.y=Oe+Ee*ge,Re.z=De+pe*ge,Z[Se]=Re,J[Se]=ge,Q[Se]=new r$T(be,ue),w&&(ee[Se]=de),c$1a.multiplyByPoint(H,Re,ve$s),a$11.minimumByComponent(ve$s,Y,Y),a$11.maximumByComponent(ve$s,j,j),q=Math.min(q,ge)}}var Ne,Fe,Be=c$19.fromPoints(Z);(t$$(v)&&(Ne=b$1o.fromRectangle(v,U,V,$)),b)&&(Fe=new c$15($).computeHorizonCullingPointPossiblyUnderEllipsoid(x,Z,U));for(var ze=new u$13(new e$1N(Y,j,x),q,V,W,!1,w),Ge=new Float32Array(K*ze.getStride()),ke=0,Ue=0;Ue<K;++Ue)ke=ze.encode(Ge,ke,Z[Ue],Q[Ue],J[Ue],void 0,ee[Ue]);return{vertices:Ge,maximumHeight:V,minimumHeight:U,encoding:ze,boundingSphere3D:Be,orientedBoundingBox:Ne,occludeePointInScaledSpace:Fe}};var c$10=new o$15,k$14;function w$15(e,t){"indexedDBWorker"===e._workerName?--e._activeIndexedDBTasks:"websocketTaskProcessor"!=e._workerName&&--e._activeTasks;var i=t.id;if(t$$(i)){var n=e._deferreds,r=n[i];if(t$$(t.error)){var o=t.error;"RuntimeError"===o.name?(o=new t$Z(t.error.message)).stack=t.error.stack:"DeveloperError"===o.name&&((o=new t$_(t.error.message)).stack=t.error.stack),c$10.raiseEvent(o),r.reject(o)}else c$10.raiseEvent(),r.resolve(t.result);delete n[i]}}function v$11(e){var t=o$12(e);if(h$1e(t)){var i,n='importScripts("'+t+'");';try{i=new Blob([n],{type:"application/javascript"})}catch{var r=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder);r.append(n),i=r.getBlob("application/javascript")}t=(window.URL||window.webkitURL).createObjectURL(i)}return t}function W$15(){return t$$(k$14)||(k$14=v$11("Workers/cesiumWorkerBootstrapper.js")),k$14}function h$17(e){var t=new Worker(W$15());t.postMessage=e$1Y(t.webkitPostMessage,t.postMessage);var i={loaderConfig:{paths:{Workers:o$12("Workers")},baseUrl:o$12.getCesiumBaseUrl().url},workerModule:o$_._workerModulePrefix+e._workerName};return t.postMessage(i),t.onmessage=function(t){w$15(e,t.data)},t}function P$Y(e,t){var i={modulePath:void 0,wasmBinaryFile:void 0,wasmBinary:void 0};return o$$.supportsWebAssembly()?(i.modulePath=o$12(t.modulePath),i.wasmBinaryFile=o$12(t.wasmBinaryFile),t$X.fetchArrayBuffer({url:i.wasmBinaryFile}).then((function(e){return i.wasmBinary=e,i}))):(i.modulePath=o$12(t.fallbackModulePath),c$18.resolve(i))}function o$_(e,t){this._workerName=e,this._maximumActiveTasks=e$1Y(t,5),this._activeTasks=0,this._deferreds={},this._activeIndexedDBTasks=0,this._nextID=0}var D$16=[];function B$R(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,$,g){this.center=e,this.vertices=t,this.stride=e$1Y(u,6),this.indexCountWithoutSkirts=n,this.vertexCountWithoutSkirts=r,this.indices=i,this.minimumHeight=o,this.maximumHeight=a,this.boundingSphere3D=s,this.occludeePointInScaledSpace=l,this.orientedBoundingBox=c,this.validOrientedBoundingBox=g,this.encoding=h,this.exaggeration=d,this.westIndicesSouthToNorth=f,this.southIndicesEastToWest=p,this.eastIndicesNorthToSouth=_,this.northIndicesWestToEast=m,this.invalid=e$1Y($,!1)}o$_.prototype.scheduleTask=function(e,t){if(t$$(this._worker)||(this._worker=h$17(this)),"indexedDBWorker"===this._workerName){if(this._activeIndexedDBTasks>=this._maximumActiveTasks)return;++this._activeIndexedDBTasks}else{if(this._activeTasks>=this._maximumActiveTasks)return;"websocketTaskProcessor"!=this._workerName&&++this._activeTasks}var i=this;return c$18(p$1h(),(function(n){t$$(t)?n||(t.length=0):t=D$16;var r=i._nextID++,o=c$18.defer();return i._deferreds[r]=o,i._worker.postMessage({id:r,parameters:e,canTransferArrayBuffer:n},t),o.promise}))},o$_.prototype.initWebAssemblyModule=function(e){t$$(this._worker)||(this._worker=h$17(this));var t=c$18.defer(),i=this,n=this._worker;return P$Y(this,e).then((function(e){return c$18(p$1h(),(function(r){var o,a=e.wasmBinary;t$$(a)&&r&&(o=[a]),n.onmessage=function(e){n.onmessage=function(e){w$15(i,e.data)},t.resolve(e.data)},n.postMessage({webAssemblyConfig:e},o)}))})),t},o$_.prototype.isDestroyed=function(){return!1},o$_.prototype.destroy=function(){return t$$(this._worker)&&this._worker.terminate(),s$1e(this)},o$_.taskCompletedEvent=c$10,o$_._defaultWorkerModulePrefix="Workers/",o$_._workerModulePrefix=o$_._defaultWorkerModulePrefix,o$_._canTransferArrayBuffer=void 0;var r$O={UNSIGNED_BYTE:de$x.UNSIGNED_BYTE,UNSIGNED_SHORT:de$x.UNSIGNED_SHORT,UNSIGNED_INT:de$x.UNSIGNED_INT,getSizeInBytes:function(e){switch(e){case r$O.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case r$O.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case r$O.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}throw new t$_("indexDatatype is required and must be a valid IndexDatatype constant.")},fromSizeInBytes:function(e){switch(e){case 2:return r$O.UNSIGNED_SHORT;case 4:return r$O.UNSIGNED_INT;case 1:return r$O.UNSIGNED_BYTE;default:throw new t$_("Size in bytes cannot be mapped to an IndexDatatype")}},validate:function(e){return t$$(e)&&(e===r$O.UNSIGNED_BYTE||e===r$O.UNSIGNED_SHORT||e===r$O.UNSIGNED_INT)},createTypedArray:function(e,t){if(!t$$(e))throw new t$_("numberOfVertices is required.");return e>=n$1d.SIXTY_FOUR_KILOBYTES?new Uint32Array(t):new Uint16Array(t)},createTypedArrayFromArrayBuffer:function(e,t,i,n){if(!t$$(e))throw new t$_("numberOfVertices is required.");if(!t$$(t))throw new t$_("sourceArray is required.");if(!t$$(i))throw new t$_("byteOffset is required.");return e>=n$1d.SIXTY_FOUR_KILOBYTES?new Uint32Array(t,i,n):new Uint16Array(t,i,n)}},fe$u=Object.freeze(r$O);function d$11(){t$_.throwInstantiationError()}Object.defineProperties(d$11.prototype,{errorEvent:{get:t$_.throwInstantiationError},credit:{get:t$_.throwInstantiationError},tilingScheme:{get:t$_.throwInstantiationError},ready:{get:t$_.throwInstantiationError},readyPromise:{get:t$_.throwInstantiationError},hasWaterMask:{get:t$_.throwInstantiationError},hasVertexNormals:{get:t$_.throwInstantiationError},availability:{get:t$_.throwInstantiationError}});var T$$=[];d$11.getRegularGridIndices=function(e,t){if(e*t>=n$1d.FOUR_GIGABYTES)throw new t$_("The total number of vertices (width * height) must be less than 4,294,967,296.");var i=T$$[e];t$$(i)||(T$$[e]=i=[]);var n=i[t];return t$$(n)||l$_(e,t,n=e*t<n$1d.SIXTY_FOUR_KILOBYTES?i[t]=new Uint16Array((e-1)*(t-1)*6+3*(e+t-2)):i[t]=new Uint32Array((e-1)*(t-1)*6+3*(e+t-2)),0),n},d$11.getRegularGridIndicesForReproject=function(e,t){if(e*t>=n$1d.FOUR_GIGABYTES)throw new t$_("The total number of vertices (width * height) must be less than 4,294,967,296.");var i=T$$[e];t$$(i)||(T$$[e]=i=[]);var n=i[t];return t$$(n)||l$_(e,t,n=e*t<n$1d.SIXTY_FOUR_KILOBYTES?i[t]=new Uint16Array((e-1)*(t-1)*6):i[t]=new Uint32Array((e-1)*(t-1)*6),0),n};var A$18=[];d$11.getRegularGridIndicesAndEdgeIndices=function(e,t){if(e*t>=n$1d.FOUR_GIGABYTES)throw new t$_("The total number of vertices (width * height) must be less than 4,294,967,296.");var i=A$18[e];t$$(i)||(A$18[e]=i=[]);var n=i[t];if(!t$$(n)){var r=d$11.getRegularGridIndices(e,t),o=b$1m(e,t),a=o.westIndicesSouthToNorth,s=o.southIndicesEastToWest,l=o.eastIndicesNorthToSouth,u=o.northIndicesWestToEast;n=i[t]={indices:r,westIndicesSouthToNorth:a,southIndicesEastToWest:s,eastIndicesNorthToSouth:l,northIndicesWestToEast:u}}return n};var G$Z=[];function b$1m(e,t){var i,n=new Array(t),r=new Array(e),o=new Array(t),a=new Array(e);for(i=0;i<e;++i)a[i]=i,r[i]=e*t-1-i;for(i=0;i<t;++i)o[i]=(i+1)*e-1,n[i]=(t-i-1)*e;return{westIndicesSouthToNorth:n,southIndicesEastToWest:r,eastIndicesNorthToSouth:o,northIndicesWestToEast:a}}function l$_(e,t,i,n){for(var r=0,o=0;o<t-1;++o){for(var a=0;a<e-1;++a){var s=r,l=s+e,u=l+1,c=s+1;i[n++]=s,i[n++]=l,i[n++]=c,i[n++]=c,i[n++]=l,i[n++]=u,++r}++r}var h=(t-1)/2,d=(e-1)/2;r=0;for(a=0;a<d;a++)i[n++]=r,i[n++]=r+1,i[n++]=r+2,r+=2;r=e*(t-1);for(a=0;a<d;a++)i[n++]=r+1,i[n++]=r,i[n++]=r+2,r+=2;r=0;for(a=0;a<h;a++)i[n++]=r+e,i[n++]=r,i[n++]=r+2*e,r+=2*e;r=e-1;for(a=0;a<h;a++)i[n++]=r,i[n++]=r+e,i[n++]=r+2*e,r+=2*e}function g$T(e,t,i,n,r){for(var o=t$$(r),a=e[0],s=e.length,l=1;l<s;++l){var u=e[l];!o||r[a+"_"+u]?(i[n++]=a,i[n++]=u,i[n++]=t,i[n++]=t,i[n++]=u,i[n++]=t+1,a=u,++t):(a=u,++t)}return n}function M$1a(e){if(!t$$(e)||!t$$(e.buffer))throw new t$_("options.buffer is required.");if(!t$$(e.width))throw new t$_("options.width is required.");if(!t$$(e.height))throw new t$_("options.height is required.");this._buffer=e.buffer,this._width=e.width,this._height=e.height,this._childTileMask=e$1Y(e.childTileMask,15),this._encoding=e$1Y(e.encoding,E$1c.NONE),this._valid=e$1Y(e.valid,!0),t$$(e.childTileMaskExt)&&(this._childTileMaskExt=e.childTileMaskExt,this._level=e.level,this._x=e.x,this._y=e.y);var t=m$$.DEFAULT_STRUCTURE,i=e.structure;t$$(i)?i!==t&&(i.heightScale=e$1Y(i.heightScale,t.heightScale),i.heightOffset=e$1Y(i.heightOffset,t.heightOffset),i.elementsPerHeight=e$1Y(i.elementsPerHeight,t.elementsPerHeight),i.stride=e$1Y(i.stride,t.stride),i.elementMultiplier=e$1Y(i.elementMultiplier,t.elementMultiplier),i.isBigEndian=e$1Y(i.isBigEndian,t.isBigEndian)):i=t,this._structure=i,this._createdByUpsampling=e$1Y(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._skirtHeight=void 0,this._bufferType=this._encoding===E$1c.LERC?Float32Array:this._buffer.constructor,this._mesh=void 0,this._skirtMode=e$1Y(e.skirtMode,!0),this._skirtScale=e$1Y(e.skirtScale,.1),this._releaseBuffer=!0,t$$(e.releaseBuffer)&&(this._releaseBuffer=e.releaseBuffer),this._normalTexture=e.normalTexture}d$11.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){if(e*t>=n$1d.FOUR_GIGABYTES)throw new t$_("The total number of vertices (width * height) must be less than 4,294,967,296.");var i=G$Z[e];t$$(i)||(G$Z[e]=i=[]);var n=i[t];if(!t$$(n)){var r=e*t,o=(e-1)*(t-1)*6,a=2*e+2*t,s=r+a,l=3*(e+t-2),u=o+6*Math.max(0,a-4)+l,c=b$1m(e,t),h=c.westIndicesSouthToNorth,d=c.southIndicesEastToWest,f=c.eastIndicesNorthToSouth,p=c.northIndicesWestToEast,_=fe$u.createTypedArray(s,u);l$_(e,t,_,0),d$11.addSkirtIndices(h,d,f,p,r,_,o+l),n=i[t]={indices:_,westIndicesSouthToNorth:h,southIndicesEastToWest:d,eastIndicesNorthToSouth:f,northIndicesWestToEast:p,indexCountWithoutSkirts:o}}return n},d$11.addSkirtIndices=function(e,t,i,n,r,o,a,s){var l=r;a=g$T(e,l,o,a,s),a=g$T(t,l+=e.length,o,a,s),a=g$T(i,l+=t.length,o,a,s),g$T(n,l+=i.length,o,a,s)},d$11.heightmapTerrainQuality=.25,d$11.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,i){return 2*e.maximumRadius*Math.PI*d$11.heightmapTerrainQuality/(t*i)},d$11.prototype.requestTileGeometry=t$_.throwInstantiationError,d$11.prototype.getLevelMaximumGeometricError=t$_.throwInstantiationError,d$11.prototype.getTileDataAvailable=t$_.throwInstantiationError,d$11.prototype.loadTileDataAvailability=t$_.throwInstantiationError,Object.defineProperties(M$1a.prototype,{credits:{get:function(){}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}},canUpsample:{get:function(){return t$$(this._mesh)}},normalTexture:{get:function(){return this._normalTexture}}});var Q$$=new o$_("createVerticesFromHeightmap");M$1a.prototype.createMesh=function(e,t,i,n,r){if(!t$$(e))throw new t$_("tilingScheme is required.");if(!t$$(t))throw new t$_("x is required.");if(!t$$(i))throw new t$_("y is required.");if(!t$$(n))throw new t$_("level is required.");var o=e.ellipsoid,a=e.tileXYToNativeRectangle(t,i,n),s=e.tileXYToRectangle(t,i,n);r=e$1Y(r,1);var l=o.cartographicToCartesian(s$1p.center(s)),u=this._structure,c=d$11.getEstimatedLevelZeroGeometricErrorForAHeightmap(o,this._width,e.getNumberOfXTilesAtLevel(0))/(1<<n);if(this._skirtMode)if(e.isSct){var h=Math.min.apply(null,this._buffer),d=Math.max.apply(null,this._buffer);this._skirtHeight=this._skirtScale*(d-h),0===this._skirtHeight&&(this._skirtHeight=Math.min(4*c,1e3))}else this._skirtHeight=Math.min(4*c,1e3);else this._skirtHeight=0;var f=Q$$.scheduleTask({heightmap:this._buffer,structure:u,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:a,rectangle:s,relativeToCenter:l,ellipsoid:o,skirtHeight:this._skirtHeight,isGeographic:e.projection instanceof s$1q,exaggeration:r,encoding:this._encoding});if(t$$(f)){var p=this;return c$18(f,(function(e){var t;t=p._skirtHeight>0?d$11.getRegularGridAndSkirtIndicesAndEdgeIndices(e.gridWidth,e.gridHeight):d$11.getRegularGridIndicesAndEdgeIndices(e.gridWidth,e.gridHeight);var i=e.gridWidth*e.gridHeight;return p._mesh=new B$R(l,new Float32Array(e.vertices),t.indices,t.indexCountWithoutSkirts,i,e.minimumHeight,e.maximumHeight,c$19.clone(e.boundingSphere3D),a$11.clone(e.occludeePointInScaledSpace),e.numberOfAttributes,b$1o.clone(e.orientedBoundingBox),u$13.clone(e.encoding),r,t.westIndicesSouthToNorth,t.southIndicesEastToWest,t.eastIndicesNorthToSouth,t.northIndicesWestToEast),p._buffer=void 0,p._mesh}))}},M$1a.prototype._createMeshSync=function(e,t,i,n,r){if(!t$$(e))throw new t$_("tilingScheme is required.");if(!t$$(t))throw new t$_("x is required.");if(!t$$(i))throw new t$_("y is required.");if(!t$$(n))throw new t$_("level is required.");var o=e.ellipsoid,a=e.tileXYToNativeRectangle(t,i,n),s=e.tileXYToRectangle(t,i,n);r=e$1Y(r,1);var l=o.cartographicToCartesian(s$1p.center(s)),u=this._structure,c=d$11.getEstimatedLevelZeroGeometricErrorForAHeightmap(o,this._width,e.getNumberOfXTilesAtLevel(0))/(1<<n);this._skirtHeight=Math.min(4*c,1e3);var h,d=m$$.computeVertices({heightmap:this._buffer,structure:u,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:a,rectangle:s,relativeToCenter:l,ellipsoid:o,skirtHeight:this._skirtHeight,isGeographic:e.projection instanceof s$1q,exaggeration:r});this._buffer=void 0,h=this._skirtHeight>0?d$11.getRegularGridAndSkirtIndicesAndEdgeIndices(this._width,this._height):d$11.getRegularGridIndicesAndEdgeIndices(this._width,this._height);var f=d.gridWidth*d.gridHeight;return new B$R(l,d.vertices,h.indices,h.indexCountWithoutSkirts,f,d.minimumHeight,d.maximumHeight,d.boundingSphere3D,d.occludeePointInScaledSpace,d.encoding.getStride(),d.orientedBoundingBox,d.encoding,r,h.westIndicesSouthToNorth,h.southIndicesEastToWest,h.eastIndicesNorthToSouth,h.northIndicesWestToEast)},M$1a.prototype.interpolateHeight=function(e,t,i){var n,r=this._width,o=this._height,a=this._structure,s=a.stride,l=a.elementsPerHeight,u=a.elementMultiplier,c=a.isBigEndian,h=a.heightOffset,d=a.heightScale;t$$(this._mesh)?n=Y$T(this._mesh.vertices,this._mesh.encoding,h,d,e,r,o,t,i,this._mesh.exaggeration):n=(n=ee$B(this._buffer,l,u,s,c,e,r,o,t,i))*d+h;return n};var S$S=33,$$X=new Float32Array(S$S*S$S);function ee$B(e,t,i,n,r,o,a,s,l,u){var c=(l-o.west)*(a-1)/(o.east-o.west),h=(u-o.south)*(s-1)/(o.north-o.south),d=0|c,f=d+1;f>=a&&(f=a-1,d=a-2);var p=0|h,_=p+1;return _>=s&&(_=s-1,p=s-2),_=s-1-_,P$X(c-d,h-p,A$17(e,t,i,n,r,(p=s-1-p)*a+d),A$17(e,t,i,n,r,p*a+f),A$17(e,t,i,n,r,_*a+d),A$17(e,t,i,n,r,_*a+f))}function Y$T(e,t,i,n,r,o,a,s,l,u){var c=(s-r.west)*(o-1)/(r.east-r.west),h=(l-r.south)*(a-1)/(r.north-r.south),d=0|c,f=d+1;f>=o&&(f=o-1,d=o-2);var p=0|h,_=p+1;_>=a&&(_=a-1,p=a-2);var m=h-p;return p=a-1-p,_=a-1-_,P$X(c-d,m,(t.decodeHeight(e,p*o+d)/u-i)/n,(t.decodeHeight(e,p*o+f)/u-i)/n,(t.decodeHeight(e,_*o+d)/u-i)/n,(t.decodeHeight(e,_*o+f)/u-i)/n)}function P$X(e,t,i,n,r,o){return t<e?i+e*(n-i)+t*(o-n):i+e*(o-r)+t*(r-i)}function A$17(e,t,i,n,r,o){o*=n;var a,s=0;if(r)for(a=0;a<t;++a)s=s*i+e[o+a];else for(a=t-1;a>=0;--a)s=s*i+e[o+a];return s}function te$D(e,t,i,n,r,o,a,s){var l;if(a*=r,o)for(l=0;l<t-1;++l)e[a+l]=s/n|0,s-=e[a+l]*n,n/=i;else for(l=t-1;l>0;--l)e[a+l]=s/n|0,s-=e[a+l]*n,n/=i;e[a+l]=s}function f$13(e,t){this._tilingScheme=e,this._maximumLevel=t,this._rootNodes=[]}M$1a.prototype.upsample=function(e,t,i,n,r,o,a){if(!t$$(e))throw new t$_("tilingScheme is required.");if(!t$$(t))throw new t$_("thisX is required.");if(!t$$(i))throw new t$_("thisY is required.");if(!t$$(n))throw new t$_("thisLevel is required.");if(!t$$(r))throw new t$_("descendantX is required.");if(!t$$(o))throw new t$_("descendantY is required.");if(!t$$(a))throw new t$_("descendantLevel is required.");if(a-n>1)throw new t$_("Upsampling through more than one level at a time is not currently supported.");if(!this._valid){var s=16,l=16;return new M$1a({buffer:new Uint8Array(s*l),width:s,height:l,skirtMode:this._skirtMode,skirtScale:this._skirtScale,childTileMask:0,structure:this._structure,createdByUpsampling:!0,valid:!1})}var u=this._mesh;if(t$$(u)){s=this._width,l=this._height;t$$(this._valid)&&!this._valid&&(s=Math.max(Math.floor(.5*this._width+1),S$S),l=Math.max(Math.floor(.5*this._height+1),S$S));for(var c=this._structure,h=c.stride,d=new this._bufferType(s*l*h),f=u.vertices,p=u.encoding,_=e.tileXYToRectangle(t,i,n),m=e.tileXYToRectangle(r,o,a),$=c.heightOffset,g=c.heightScale,y=u.exaggeration,v=c.elementsPerHeight,x=c.elementMultiplier,b=c.isBigEndian,S=Math.pow(x,v-1),w=0;w<l;++w)for(var C=n$1d.lerp(m.north,m.south,w/(l-1)),T=0;T<s;++T){var P=Y$T(f,p,$,g,_,s,l,n$1d.lerp(m.west,m.east,T/(s-1)),C,y);te$D(d,v,x,S,h,b,w*s+T,P=(P=P<c.lowestEncodedHeight?c.lowestEncodedHeight:P)>c.highestEncodedHeight?c.highestEncodedHeight:P)}if(!this._structure.isBigEndian){var E=!1;for(T=0;T<d.length;T++)if(Math.abs(d[T])>n$1d.EPSILON3){E=!0;break}E||(l=S$S,s=S$S,d=$$X)}return new M$1a({buffer:d,width:s,height:l,skirtMode:this._skirtMode,skirtScale:this._skirtScale,childTileMask:0,structure:this._structure,createdByUpsampling:!0,valid:this._valid})}},M$1a.prototype.isChildAvailable=function(e,t,i,n){if(!t$$(e))throw new t$_("thisX is required.");if(!t$$(t))throw new t$_("thisY is required.");if(!t$$(i))throw new t$_("childX is required.");if(!t$$(n))throw new t$_("childY is required.");var r=2;return i!==2*e&&++r,n!==2*t&&(r-=2),0!=(this._childTileMask&1<<r)},M$1a.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var u$12=new s$1p;function N$12(e,t,i,n){for(var r=n.length,o=0;o<r;++o){var a=n[o];if(a.x===t&&a.y===i&&a.level===e)return!0}return!1}f$13.prototype.addAvailableTileRange=function(e,t,i,n,r){var o=this._tilingScheme,a=this._rootNodes;if(0===e)for(var s=i;s<=r;++s)for(var l=t;l<=n;++l)N$12(e,l,s,a)||a.push(new w$14(o,void 0,0,l,s));o.tileXYToRectangle(t,i,e,u$12);var u=u$12.west,c=u$12.north;o.tileXYToRectangle(n,r,e,u$12);for(var h=u$12.east,d=new I$17(e,u,u$12.south,h,c),f=0;f<a.length;++f){var p=a[f];M$19(p.extent,d)&&O$W(this._maximumLevel,p,d)}},f$13.prototype.computeMaximumLevelAtPosition=function(e){for(var t,i=0;i<this._rootNodes.length;++i){var n=this._rootNodes[i];if(c$$(n.extent,e)){t=n;break}}return t$$(t)?_$18(void 0,t,e):-1};var P$W=[],k$13=[],X$S=new s$1p,Y$S=new s$1p;f$13.prototype.computeBestAvailableLevelOverRectangle=function(e){var t=P$W;t.length=0,e.east<e.west?(t.push(s$1p.fromRadians(-Math.PI,e.south,e.east,e.north,X$S)),t.push(s$1p.fromRadians(e.west,e.south,Math.PI,e.north,Y$S))):t.push(e);var i,n=k$13;for(n.length=0,i=0;i<this._rootNodes.length;++i)g$S(n,this._rootNodes[i],t);for(i=n.length-1;i>=0;--i)if(t$$(n[i])&&0===n[i].length)return i;return 0};var A$16=new i$1g;function w$14(e,t,i,n,r){this.tilingScheme=e,this.parent=t,this.level=i,this.x=n,this.y=r,this.extent=e.tileXYToRectangle(n,r,i),this.rectangles=[],this._sw=void 0,this._se=void 0,this._nw=void 0,this._ne=void 0}function I$17(e,t,i,n,r){this.level=e,this.west=t,this.south=i,this.east=n,this.north=r}function M$19(e,t){var i=Math.max(e.west,t.west),n=Math.max(e.south,t.south),r=Math.min(e.east,t.east);return n<Math.min(e.north,t.north)&&i<r}function O$W(e,t,i){for(;t.level<e;)if(x$1c(t.nw.extent,i))t=t.nw;else if(x$1c(t.ne.extent,i))t=t.ne;else if(x$1c(t.sw.extent,i))t=t.sw;else{if(!x$1c(t.se.extent,i))break;t=t.se}if(0===t.rectangles.length||t.rectangles[t.rectangles.length-1].level<=i.level)t.rectangles.push(i);else{var n=u$16(t.rectangles,i.level,j$16);n<=0&&(n=~n),t.rectangles.splice(n,0,i)}}function j$16(e,t){return e.level-t}function x$1c(e,t){return t.west>=e.west&&t.east<=e.east&&t.south>=e.south&&t.north<=e.north}function c$$(e,t){return t.longitude>=e.west&&t.longitude<=e.east&&t.latitude>=e.south&&t.latitude<=e.north}function _$18(e,t,i){for(var n=0,r=!1;!r;){var o=t._nw&&c$$(t._nw.extent,i),a=t._ne&&c$$(t._ne.extent,i),s=t._sw&&c$$(t._sw.extent,i),l=t._se&&c$$(t._se.extent,i);if(o+a+s+l>1){o&&(n=Math.max(n,_$18(t,t._nw,i))),a&&(n=Math.max(n,_$18(t,t._ne,i))),s&&(n=Math.max(n,_$18(t,t._sw,i))),l&&(n=Math.max(n,_$18(t,t._se,i)));break}o?t=t._nw:a?t=t._ne:s?t=t._sw:l?t=t._se:r=!0}for(;t!==e;){for(var u=t.rectangles,c=u.length-1;c>=0&&u[c].level>n;--c){var h=u[c];c$$(h,i)&&(n=h.level)}t=t.parent}return n}function g$S(e,t,i){if(t){var n,r=!1;for(n=0;n<i.length;++n)r=r||M$19(t.extent,i[n]);if(r){var o=t.rectangles;for(n=0;n<o.length;++n){var a=o[n];e[a.level]||(e[a.level]=i),e[a.level]=F$17(e[a.level],a)}g$S(e,t._nw,i),g$S(e,t._ne,i),g$S(e,t._sw,i),g$S(e,t._se,i)}}}function F$17(e,t){for(var i=[],n=0;n<e.length;++n){var r=e[n];M$19(r,t)?(r.west<t.west&&i.push(new s$1p(r.west,r.south,t.west,r.north)),r.east>t.east&&i.push(new s$1p(t.east,r.south,r.east,r.north)),r.south<t.south&&i.push(new s$1p(Math.max(t.west,r.west),r.south,Math.min(t.east,r.east),t.south)),r.north>t.north&&i.push(new s$1p(Math.max(t.west,r.west),t.north,Math.min(t.east,r.east),r.north))):i.push(r)}return i}function f$12(e){var t,i=e.name,n=e.message;t=t$$(i)&&t$$(n)?i+": "+n:e.toString();var r=e.stack;return t$$(r)&&(t+="\n"+r),t}function c$_(e,t,i,n,r,o,a){this.provider=e,this.message=t,this.x=i,this.y=n,this.level=r,this.timesRetried=e$1Y(o,0),this.retry=!1,this.error=a}function o$Z(e){if(e=e$1Y(e,{}),this._ellipsoid=e$1Y(e.ellipsoid,n$1c.WGS84),this._numberOfLevelZeroTilesX=e$1Y(e.numberOfLevelZeroTilesX,1),this._numberOfLevelZeroTilesY=e$1Y(e.numberOfLevelZeroTilesY,1),this._projection=e$1Y(e.projection,new e$1H(this._ellipsoid)),t$$(e.rectangleSouthwestInMeters)&&t$$(e.rectangleNortheastInMeters))this._rectangleSouthwestInMeters=e.rectangleSouthwestInMeters,this._rectangleNortheastInMeters=e.rectangleNortheastInMeters;else{var t=this._ellipsoid.maximumRadius*Math.PI;this._rectangleSouthwestInMeters=new r$T(-t,-t),this._rectangleNortheastInMeters=new r$T(t,t)}var i=this._projection.unproject(this._rectangleSouthwestInMeters),n=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new s$1p(i.longitude,i.latitude,n.longitude,n.latitude),this._customDPI=e.customDPI,this._scaleDenominators=e.scaleDenominators,this._tileWidth=e$1Y(e.tileWidth,256),this._tileHeight=e$1Y(e.tileHeight,256)}f$13.prototype.isTileAvailable=function(e,t,i){var n=this._tilingScheme.tileXYToRectangle(t,i,e,u$12);return s$1p.center(n,A$16),this.computeMaximumLevelAtPosition(A$16)>=e},f$13.prototype.computeChildMaskForTile=function(e,t,i){var n=e+1;if(n>=this._maximumLevel)return 0;var r=0;return r|=this.isTileAvailable(n,2*t,2*i+1)?1:0,r|=this.isTileAvailable(n,2*t+1,2*i+1)?2:0,r|=this.isTileAvailable(n,2*t,2*i)?4:0,r|=this.isTileAvailable(n,2*t+1,2*i)?8:0},Object.defineProperties(w$14.prototype,{nw:{get:function(){return this._nw||(this._nw=new w$14(this.tilingScheme,this,this.level+1,2*this.x,2*this.y)),this._nw}},ne:{get:function(){return this._ne||(this._ne=new w$14(this.tilingScheme,this,this.level+1,2*this.x+1,2*this.y)),this._ne}},sw:{get:function(){return this._sw||(this._sw=new w$14(this.tilingScheme,this,this.level+1,2*this.x,2*this.y+1)),this._sw}},se:{get:function(){return this._se||(this._se=new w$14(this.tilingScheme,this,this.level+1,2*this.x+1,2*this.y+1)),this._se}}}),c$_.handleError=function(e,t,i,n,r,o,a,s,l){var u=e;return t$$(e)?(u.provider=t,u.message=n,u.x=r,u.y=o,u.level=a,u.retry=!1,u.error=l,++u.timesRetried):u=new c$_(t,n,r,o,a,0,l),i.numberOfListeners>0?i.raiseEvent(u):console.log('An error occurred in "'+t.constructor.name+'": '+f$12(n)),u.retry&&t$$(s)&&s(),u},c$_.handleSuccess=function(e){t$$(e)&&(e.timesRetried=-1)},Object.defineProperties(o$Z.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),o$Z.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e},o$Z.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e},o$Z.prototype.rectangleToNativeRectangle=function(e,t){var i=this._projection,n=i.project(s$1p.southwest(e)),r=i.project(s$1p.northeast(e));return t$$(t)?(t.west=n.x,t.south=n.y,t.east=r.x,t.north=r.y,t):new s$1p(n.x,n.y,r.x,r.y)},o$Z.prototype.tileXYToNativeRectangle=function(e,t,i,n){if(t$$(this._customDPI)&&t$$(this._scaleDenominators)){var r=this.calculateResolution(i),o=this._rectangleSouthwestInMeters.x+e*this._tileWidth*r.x,a=this._rectangleSouthwestInMeters.x+(e+1)*this._tileWidth*r.x,s=this._rectangleNortheastInMeters.y-t*this._tileHeight*r.y,l=this._rectangleNortheastInMeters.y-(t+1)*this._tileHeight*r.y;return t$$(n)?(n.west=o,n.south=l,n.east=a,n.north=s,n):new s$1p(o,l,a,s)}var u=this.getNumberOfXTilesAtLevel(i),c=this.getNumberOfYTilesAtLevel(i),h=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/u,d=(o=this._rectangleSouthwestInMeters.x+e*h,a=this._rectangleSouthwestInMeters.x+(e+1)*h,(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/c);s=this._rectangleNortheastInMeters.y-t*d,l=this._rectangleNortheastInMeters.y-(t+1)*d;return t$$(n)?(n.west=o,n.south=l,n.east=a,n.north=s,n):new s$1p(o,l,a,s)},o$Z.prototype.tileXYToRectangle=function(e,t,i,n){var r=this.tileXYToNativeRectangle(e,t,i,n),o=this._projection,a=o.unproject(new r$T(r.west,r.south)),s=o.unproject(new r$T(r.east,r.north));return r.west=a.longitude,r.south=a.latitude,r.east=s.longitude,r.north=s.latitude,r},o$Z.prototype.positionToTileXY=function(e,t,i){var n=this._rectangle;if(s$1p.contains(n,e)){var r=this.getNumberOfXTilesAtLevel(t),o=this.getNumberOfYTilesAtLevel(t),a=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/r,s=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/o;if(t$$(this._customDPI)&&t$$(this._scaleDenominators)){var l=this.calculateResolution(t);a=this._tileWidth*l.x,s=this._tileHeight*l.y}var u=this._projection.project(e),c=(u.x-this._rectangleSouthwestInMeters.x)/a|0;c>=r&&(c=r-1);var h=(this._rectangleNortheastInMeters.y-u.y)/s|0;return h>=o&&(h=o-1),t$$(i)?(i.x=c,i.y=h,i):new r$T(c,h)}},o$Z.prototype.calculateResolution=function(e){return new r$T(.0254*this._scaleDenominators[e]/this._customDPI.x,.0254*this._scaleDenominators[e]/this._customDPI.y)};var O$V=15;function p$1g(e){if(!t$$(e)||!t$$(e.url))throw new t$_("options.url is required.");this._resource=void 0,this._credit=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._maxLevel=void 0,this._terrainDataStructure=void 0,this._ready=!1,this._width=void 0,this._height=void 0,this._encoding=void 0;var t=e.token;this._hasAvailability=!1,this._tilesAvailable=void 0,this._tilesAvailablityLoaded=void 0,this._availableCache={};var i=this,n=e$1Y(e.ellipsoid,n$1c.WGS84);this._readyPromise=c$18(e.url).then((function(e){var n=t$X.createIfNeeded(e);return n.appendForwardSlash(),t$$(t)&&(n=n.getDerivedResource({queryParameters:{token:t}})),i._resource=n,n.getDerivedResource({queryParameters:{f:"pjson"}}).fetchJson()})).then((function(e){var t=e.copyrightText;t$$(t)&&(i._credit=new i$17(t));var r=e.spatialReference,o=e$1Y(r.latestWkid,r.wkid),a=e.extent,s={ellipsoid:n};if(4326===o)s.rectangle=s$1p.fromDegrees(a.xmin,a.ymin,a.xmax,a.ymax),i._tilingScheme=new a$W(s);else{if(3857!==o)return c$18.reject(new t$Z("Invalid spatial reference"));s.rectangleSouthwestInMeters=new r$T(a.xmin,a.ymin),s.rectangleNortheastInMeters=new r$T(a.xmax,a.ymax),i._tilingScheme=new o$Z(s)}var l=e.tileInfo;return t$$(l)?(i._width=l.rows+1,i._height=l.cols+1,i._encoding="LERC"===l.format?E$1c.LERC:E$1c.NONE,i._lodCount=l.lods.length-1,(i._hasAvailability=-1!==e.capabilities.indexOf("Tilemap"))&&(i._tilesAvailable=new f$13(i._tilingScheme,i._lodCount),i._tilesAvailable.addAvailableTileRange(0,0,0,i._tilingScheme.getNumberOfXTilesAtLevel(0),i._tilingScheme.getNumberOfYTilesAtLevel(0)),i._tilesAvailablityLoaded=new f$13(i._tilingScheme,i._lodCount)),i._levelZeroMaximumGeometricError=d$11.getEstimatedLevelZeroGeometricErrorForAHeightmap(i._tilingScheme.ellipsoid,i._width,i._tilingScheme.getNumberOfXTilesAtLevel(0)),e.bandCount>1&&console.log("ArcGISTiledElevationTerrainProvider: Terrain data has more than 1 band. Using the first one."),i._terrainDataStructure={elementMultiplier:1,lowestEncodedHeight:e.minValues[0],highestEncodedHeight:e.maxValues[0]},i._ready=!0,!0):c$18.reject(new t$Z("tileInfo is required"))})).otherwise((function(e){var t="An error occurred while accessing "+i._resource.url+".";return c$_.handleError(void 0,i,i._errorEvent,t),c$18.reject(e)})),this._errorEvent=new o$15}function x$1b(e,t,i,n){if(e._hasAvailability){var r=e._tilesAvailablityLoaded,o=e._tilesAvailable;if(t>e._lodCount)return!1;if(o.isTileAvailable(t,i,n))return!0;if(r.isTileAvailable(t,i,n))return!1}}function H$_(e,t,i,n){for(var r=t-1,o=i-1,a=n[e.y*t+e.x],s=[],l={startX:e.x,startY:e.y,endX:0,endY:0},u=new r$T(e.x+1,e.y+1),c=!1,h=!1;!c||!h;){var d=u.x,f=h?u.y+1:u.y;if(!c){for(var p=e.y;p<f;++p)if(n[p*t+u.x]!==a){c=!0;break}c?(s.push(new r$T(u.x,e.y)),--u.x,--d,l.endX=u.x):u.x===r?(l.endX=u.x,c=!0):++u.x}if(!h){for(var _=u.y*t,m=e.x;m<=d;++m)if(n[_+m]!==a){h=!0;break}h?(s.push(new r$T(e.x,u.y)),--u.y,l.endY=u.y):u.y===o?(l.endY=u.y,h=!0):++u.y}}return{endingIndices:s,range:l,value:a}}function V$R(e,t,i,n,r){var o=[],a=r.every((function(e){return e===r[0]}));if(a)return 1===r[0]&&o.push({startX:e,startY:t,endX:e+i-1,endY:t+n-1}),o;for(var s=[new r$T(0,0)];s.length>0;){var l=H$_(s.pop(),i,n,r);if(1===l.value){var u=l.range;u.startX+=e,u.endX+=e,u.startY+=t,u.endY+=t,o.push(u)}var c=l.endingIndices;c.length>0&&(s=s.concat(c))}return o}function C$10(e,t,i,n){if(!e._hasAvailability)return{};var r=128*Math.floor(i/128),o=128*Math.floor(n/128),a=Math.min(1<<t,128),s="tilemap/"+t+"/"+o+"/"+r+"/"+a+"/"+a,l=e._availableCache;if(t$$(l[s]))return l[s];var u=new r$V({throttle:!0,throttleByServer:!0,type:V$_.TERRAIN}),c=e._resource.getDerivedResource({url:s,request:u}).fetchJson();return t$$(c)?(c=c.then((function(s){var l=V$R(r,o,a,a,s.data);e._tilesAvailablityLoaded.addAvailableTileRange(r,o,r+a,o+a);for(var u=e._tilesAvailable,c=0;c<l.length;++c){var h=l[c];u.addAvailableTileRange(t,h.startX,h.startY,h.endX,h.endY)}return x$1b(e,t,i,n)})),l[s]={promise:c,request:u},c=c.always((function(e){return delete l[s],e})),{promise:c,request:u}):{}}Object.defineProperties(p$1g.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){if(!this.ready)throw new t$_("credit must not be called before ready returns true.");return this._credit}},tilingScheme:{get:function(){if(!this.ready)throw new t$_("tilingScheme must not be called before ready returns true.");return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}}}),p$1g.prototype.requestTileGeometry=function(e,t,i,n){if(!this._ready)throw new t$_("requestTileGeometry must not be called before the terrain provider is ready.");var r,o=this._resource.getDerivedResource({url:"tile/"+i+"/"+t+"/"+e,request:n}),a=this._hasAvailability,s=c$18.resolve(!0);if(a&&!t$$(x$1b(this,i+1,2*e,2*t))){var l=C$10(this,i+1,2*e,2*t);s=l.promise,r=l.request}var u=o.fetchArrayBuffer();if(t$$(u)&&t$$(s)){var c=this,h=this._tilesAvailable;return c$18.join(u,s).then((function(n){return new M$1a({buffer:n[0],width:c._width,height:c._height,childTileMask:a?h.computeChildMaskForTile(i,e,t):O$V,structure:c._terrainDataStructure,encoding:c._encoding})})).otherwise((function(e){return t$$(r)&&r.state===Y$_.CANCELLED?(n.cancel(),n.deferred.promise.always((function(){return n.state=Y$_.CANCELLED,c$18.reject(e)}))):c$18.reject(e)}))}},p$1g.prototype.getLevelMaximumGeometricError=function(e){if(!this.ready)throw new t$_("getLevelMaximumGeometricError must not be called before ready returns true.");return this._levelZeroMaximumGeometricError/(1<<e)},p$1g.prototype.getTileDataAvailable=function(e,t,i){if(this._hasAvailability){var n=x$1b(this,i,e,t);if(t$$(n))return n;C$10(this,i,e,t)}},p$1g.prototype.loadTileDataAvailability=function(e,t,i){};var e$1G={NONE:0,GEODESIC:1,RHUMB:2},m$_=Object.freeze(e$1G);function d$10(e,t,i,n){if(n$1e.defined("array",e),n$1e.defined("value",t),t$$(i)&&n$1e.typeOf.number("start",i),t$$(n)&&n$1e.typeOf.number("end",n),"function"==typeof e.fill)return e.fill(t,i,n);for(var r=e.length>>>0,o=e$1Y(i,0),a=o<0?Math.max(r+o,0):Math.min(o,r),s=e$1Y(n,r),l=s<0?Math.max(r+s,0):Math.min(s,r);a<l;)e[a]=t,a++;return e}var p$1f=n$1d.EPSILON10;function u$11(e,t,i,n){if(n$1e.defined("equalsEpsilon",t),t$$(e)){n=e$1Y(n,p$1f),i=e$1Y(i,!1);var r,o,a,s=e.length;if(s<2)return e;for(r=1;r<s&&!t(o=e[r-1],a=e[r],n);++r);if(r===s)return i&&t(e[0],e[e.length-1],n)?e.slice(1):e;for(var l=e.slice(0,r);r<s;++r)t(o,a=e[r],n)||(l.push(a),o=a);return i&&l.length>1&&t(l[0],l[l.length-1],n)&&l.shift(),l}}function l$Z(e,t,i){if(n$1e.defined("array",e),t$$(t)&&n$1e.typeOf.number("begin",t),t$$(i)&&n$1e.typeOf.number("end",i),"function"==typeof e.slice)return e.slice(t,i);for(var n=Array.prototype.slice.call(e,t,i),r=o$$.typedArrayTypes,o=r.length,a=0;a<o;++a)if(e instanceof r[a]){n=new r[a](n);break}return n}function e$1F(){this._array=[],this._hash={}}Object.defineProperties(e$1F.prototype,{length:{get:function(){return this._array.length}},values:{get:function(){return this._array}}}),e$1F.prototype.contains=function(e){if("string"!=typeof e&&"number"!=typeof e)throw new t$_("key is required to be a string or number.");return t$$(this._hash[e])},e$1F.prototype.set=function(e,t){if("string"!=typeof e&&"number"!=typeof e)throw new t$_("key is required to be a string or number.");t!==this._hash[e]&&(this.remove(e),this._hash[e]=t,this._array.push(t))},e$1F.prototype.get=function(e){if("string"!=typeof e&&"number"!=typeof e)throw new t$_("key is required to be a string or number.");return this._hash[e]},e$1F.prototype.remove=function(e){if(t$$(e)&&"string"!=typeof e&&"number"!=typeof e)throw new t$_("key is required to be a string or number.");var t=this._hash[e],i=t$$(t);if(i){var n=this._array;n.splice(n.indexOf(t),1),delete this._hash[e]}return i},e$1F.prototype.removeAll=function(){var e=this._array;e.length>0&&(this._hash={},e.length=0)},e$1F.clone=function(e,t){if(t$$(e)){for(var i in t$$(t)?t.removeAll():t=new e$1F,e._hash)e._hash.hasOwnProperty(i)&&t.set(i,e._hash[i]);return t}};var q$19=new a$11,L$13=new a$11,O$U=new a$11;function P$V(e,t,i,n,r){var o,a,s,l,u,c,h,d;if(n$1e.defined("point",e),n$1e.defined("p0",t),n$1e.defined("p1",i),n$1e.defined("p2",n),t$$(r)||(r=new a$11),t$$(t.z)){if(a$11.equalsEpsilon(e,t,n$1d.EPSILON14))return a$11.clone(a$11.UNIT_X,r);if(a$11.equalsEpsilon(e,i,n$1d.EPSILON14))return a$11.clone(a$11.UNIT_Y,r);if(a$11.equalsEpsilon(e,n,n$1d.EPSILON14))return a$11.clone(a$11.UNIT_Z,r);o=a$11.subtract(i,t,q$19),a=a$11.subtract(n,t,L$13),s=a$11.subtract(e,t,O$U),l=a$11.dot(o,o),u=a$11.dot(o,a),c=a$11.dot(o,s),h=a$11.dot(a,a),d=a$11.dot(a,s)}else{if(r$T.equalsEpsilon(e,t,n$1d.EPSILON14))return a$11.clone(a$11.UNIT_X,r);if(r$T.equalsEpsilon(e,i,n$1d.EPSILON14))return a$11.clone(a$11.UNIT_Y,r);if(r$T.equalsEpsilon(e,n,n$1d.EPSILON14))return a$11.clone(a$11.UNIT_Z,r);o=r$T.subtract(i,t,q$19),a=r$T.subtract(n,t,L$13),s=r$T.subtract(e,t,O$U),l=r$T.dot(o,o),u=r$T.dot(o,a),c=r$T.dot(o,s),h=r$T.dot(a,a),d=r$T.dot(a,s)}r.y=h*c-u*d,r.z=l*d-u*c;var f=l*h-u*u;return 0!==r.y&&(r.y/=f),0!==r.z&&(r.z/=f),r.x=1-r.y-r.z,r}var e$1E={defaultKey:void 0,getKey:function(e){return t$$(e)?e:e$1E.defaultKey}},i$14="https://dev.virtualearth.net/REST/v1/Locations";function o$Y(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).key;this._key=e$1E.getKey(t),this._resource=new t$X({url:i$14,queryParameters:{key:this._key}})}function n$13(e,t,i,n){this.x=e$1Y(e,0),this.y=e$1Y(t,0),this.width=e$1Y(i,0),this.height=e$1Y(n,0)}Object.defineProperties(o$Y.prototype,{url:{get:function(){return i$14}},key:{get:function(){return this._key}}}),o$Y.prototype.geocode=function(e){return n$1e.typeOf.string("query",e),this._resource.getDerivedResource({queryParameters:{query:e}}).fetchJsonp("jsonp").then((function(e){return 0===e.resourceSets.length?[]:e.resourceSets[0].resources.map((function(e){var t=e.bbox,i=t[0],n=t[1],r=t[2],o=t[3];return{displayName:e.name,destination:s$1p.fromDegrees(n,i,o,r)}}))}))},n$13.packedLength=4,n$13.pack=function(e,t,i){return n$1e.typeOf.object("value",e),n$1e.defined("array",t),i=e$1Y(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.width,t[i]=e.height,t},n$13.unpack=function(e,t,i){return n$1e.defined("array",e),t=e$1Y(t,0),t$$(i)||(i=new n$13),i.x=e[t++],i.y=e[t++],i.width=e[t++],i.height=e[t],i},n$13.fromPoints=function(e,t){if(t$$(t)||(t=new n$13),!t$$(e)||0===e.length)return t.x=0,t.y=0,t.width=0,t.height=0,t;for(var i=e.length,n=e[0].x,r=e[0].y,o=e[0].x,a=e[0].y,s=1;s<i;s++){var l=e[s],u=l.x,c=l.y;n=Math.min(u,n),o=Math.max(u,o),r=Math.min(c,r),a=Math.max(c,a)}return t.x=n,t.y=r,t.width=o-n,t.height=a-r,t};var j$15=new s$1q,b$1l=new i$1g,v$10=new i$1g;function t$W(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this.position=e.position,this.normal=e.normal,this.st=e.st,this.bitangent=e.bitangent,this.tangent=e.tangent,this.color=e.color}n$13.fromRectangle=function(e,t,i){if(t$$(i)||(i=new n$13),!t$$(e))return i.x=0,i.y=0,i.width=0,i.height=0,i;var n=(t=e$1Y(t,j$15)).project(s$1p.southwest(e,b$1l)),r=t.project(s$1p.northeast(e,v$10));return r$T.subtract(r,n,r),i.x=n.x,i.y=n.y,i.width=r.x,i.height=r.y,i},n$13.clone=function(e,t){if(t$$(e))return t$$(t)?(t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t):new n$13(e.x,e.y,e.width,e.height)},n$13.union=function(e,t,i){n$1e.typeOf.object("left",e),n$1e.typeOf.object("right",t),t$$(i)||(i=new n$13);var n=Math.min(e.x,t.x),r=Math.min(e.y,t.y),o=Math.max(e.x+e.width,t.x+t.width),a=Math.max(e.y+e.height,t.y+t.height);return i.x=n,i.y=r,i.width=o-n,i.height=a-r,i},n$13.expand=function(e,t,i){n$1e.typeOf.object("rectangle",e),n$1e.typeOf.object("point",t),i=n$13.clone(e,i);var n=t.x-i.x,r=t.y-i.y;return n>i.width?i.width=n:n<0&&(i.width-=n,i.x=t.x),r>i.height?i.height=r:r<0&&(i.height-=r,i.y=t.y),i},n$13.intersect=function(e,t){n$1e.typeOf.object("left",e),n$1e.typeOf.object("right",t);var i=e.x,n=e.y,r=t.x,o=t.y;return i>r+t.width||i+e.width<r||n+e.height<o||n>o+t.height?cr$4.OUTSIDE:cr$4.INTERSECTING},n$13.equals=function(e,t){return e===t||t$$(e)&&t$$(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height},n$13.prototype.clone=function(e){return n$13.clone(this,e)},n$13.prototype.intersect=function(e){return n$13.intersect(this,e)},n$13.prototype.equals=function(e){return n$13.equals(this,e)};var e$1D={NONE:0,TOP:1,ALL:2},_0x165ce0=Object.freeze(e$1D);function n$12(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this.position=e$1Y(e.position,!1),this.normal=e$1Y(e.normal,!1),this.st=e$1Y(e.st,!1),this.bitangent=e$1Y(e.bitangent,!1),this.tangent=e$1Y(e.tangent,!1),this.color=e$1Y(e.color,!1)}n$12.POSITION_ONLY=Object.freeze(new n$12({position:!0})),n$12.POSITION_AND_NORMAL=Object.freeze(new n$12({position:!0,normal:!0})),n$12.POSITION_NORMAL_AND_ST=Object.freeze(new n$12({position:!0,normal:!0,st:!0})),n$12.POSITION_AND_ST=Object.freeze(new n$12({position:!0,st:!0})),n$12.POSITION_AND_COLOR=Object.freeze(new n$12({position:!0,color:!0})),n$12.ALL=Object.freeze(new n$12({position:!0,normal:!0,st:!0,tangent:!0,bitangent:!0})),n$12.DEFAULT=n$12.POSITION_NORMAL_AND_ST,n$12.packedLength=6,n$12.pack=function(e,t,i){if(!t$$(e))throw new t$_("value is required");if(!t$$(t))throw new t$_("array is required");return i=e$1Y(i,0),t[i++]=e.position?1:0,t[i++]=e.normal?1:0,t[i++]=e.st?1:0,t[i++]=e.tangent?1:0,t[i++]=e.bitangent?1:0,t[i]=e.color?1:0,t},n$12.unpack=function(e,t,i){if(!t$$(e))throw new t$_("array is required");return t=e$1Y(t,0),t$$(i)||(i=new n$12),i.position=1===e[t++],i.normal=1===e[t++],i.st=1===e[t++],i.tangent=1===e[t++],i.bitangent=1===e[t++],i.color=1===e[t],i},n$12.clone=function(e,t){if(t$$(e))return t$$(t)||(t=new n$12),t.position=e.position,t.normal=e.normal,t.st=e.st,t.tangent=e.tangent,t.bitangent=e.bitangent,t.color=e.color,t};var S$R=new a$11;function c$Z(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).minimum,i=e.maximum;if(n$1e.typeOf.object("min",t),n$1e.typeOf.object("max",i),t$$(e.offsetAttribute)&&e.offsetAttribute===_0x165ce0.TOP)throw new t$_("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");var n=e$1Y(e.vertexFormat,n$12.DEFAULT);this._minimum=a$11.clone(t),this._maximum=a$11.clone(i),this._vertexFormat=n,this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxGeometry"}c$Z.fromDimensions=function(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).dimensions;n$1e.typeOf.object("dimensions",t),n$1e.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),n$1e.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),n$1e.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);var i=a$11.multiplyByScalar(t,.5,new a$11);return new c$Z({minimum:a$11.negate(i,new a$11),maximum:i,vertexFormat:e.vertexFormat,offsetAttribute:e.offsetAttribute})},c$Z.fromAxisAlignedBoundingBox=function(e){return n$1e.typeOf.object("boundingBox",e),new c$Z({minimum:e.minimum,maximum:e.maximum})},c$Z.packedLength=2*a$11.packedLength+n$12.packedLength+1,c$Z.pack=function(e,t,i){return n$1e.typeOf.object("value",e),n$1e.defined("array",t),i=e$1Y(i,0),a$11.pack(e._minimum,t,i),a$11.pack(e._maximum,t,i+a$11.packedLength),n$12.pack(e._vertexFormat,t,i+2*a$11.packedLength),t[i+2*a$11.packedLength+n$12.packedLength]=e$1Y(e._offsetAttribute,-1),t};var h$16=new a$11,F$16=new a$11,k$12=new n$12,L$12={minimum:h$16,maximum:F$16,vertexFormat:k$12,offsetAttribute:void 0},O$T;c$Z.unpack=function(e,t,i){n$1e.defined("array",e),t=e$1Y(t,0);var n=a$11.unpack(e,t,h$16),r=a$11.unpack(e,t+a$11.packedLength,F$16),o=n$12.unpack(e,t+2*a$11.packedLength,k$12),a=e[t+2*a$11.packedLength+n$12.packedLength];return t$$(i)?(i._minimum=a$11.clone(n,i._minimum),i._maximum=a$11.clone(r,i._maximum),i._vertexFormat=n$12.clone(o,i._vertexFormat),i._offsetAttribute=-1===a?void 0:a,i):(L$12.offsetAttribute=-1===a?void 0:a,new c$Z(L$12))},c$Z.createGeometry=function(e){var t=e._minimum,i=e._maximum,n=e._vertexFormat;if(!a$11.equals(t,i)){var r,o,a=new t$W;if(n.position&&(n.st||n.normal||n.tangent||n.bitangent)){if(n.position&&((o=new Float64Array(72))[0]=t.x,o[1]=t.y,o[2]=i.z,o[3]=i.x,o[4]=t.y,o[5]=i.z,o[6]=i.x,o[7]=i.y,o[8]=i.z,o[9]=t.x,o[10]=i.y,o[11]=i.z,o[12]=t.x,o[13]=t.y,o[14]=t.z,o[15]=i.x,o[16]=t.y,o[17]=t.z,o[18]=i.x,o[19]=i.y,o[20]=t.z,o[21]=t.x,o[22]=i.y,o[23]=t.z,o[24]=i.x,o[25]=t.y,o[26]=t.z,o[27]=i.x,o[28]=i.y,o[29]=t.z,o[30]=i.x,o[31]=i.y,o[32]=i.z,o[33]=i.x,o[34]=t.y,o[35]=i.z,o[36]=t.x,o[37]=t.y,o[38]=t.z,o[39]=t.x,o[40]=i.y,o[41]=t.z,o[42]=t.x,o[43]=i.y,o[44]=i.z,o[45]=t.x,o[46]=t.y,o[47]=i.z,o[48]=t.x,o[49]=i.y,o[50]=t.z,o[51]=i.x,o[52]=i.y,o[53]=t.z,o[54]=i.x,o[55]=i.y,o[56]=i.z,o[57]=t.x,o[58]=i.y,o[59]=i.z,o[60]=t.x,o[61]=t.y,o[62]=t.z,o[63]=i.x,o[64]=t.y,o[65]=t.z,o[66]=i.x,o[67]=t.y,o[68]=i.z,o[69]=t.x,o[70]=t.y,o[71]=i.z,a.position=new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:o})),n.normal){var s=new Float32Array(72);s[0]=0,s[1]=0,s[2]=1,s[3]=0,s[4]=0,s[5]=1,s[6]=0,s[7]=0,s[8]=1,s[9]=0,s[10]=0,s[11]=1,s[12]=0,s[13]=0,s[14]=-1,s[15]=0,s[16]=0,s[17]=-1,s[18]=0,s[19]=0,s[20]=-1,s[21]=0,s[22]=0,s[23]=-1,s[24]=1,s[25]=0,s[26]=0,s[27]=1,s[28]=0,s[29]=0,s[30]=1,s[31]=0,s[32]=0,s[33]=1,s[34]=0,s[35]=0,s[36]=-1,s[37]=0,s[38]=0,s[39]=-1,s[40]=0,s[41]=0,s[42]=-1,s[43]=0,s[44]=0,s[45]=-1,s[46]=0,s[47]=0,s[48]=0,s[49]=1,s[50]=0,s[51]=0,s[52]=1,s[53]=0,s[54]=0,s[55]=1,s[56]=0,s[57]=0,s[58]=1,s[59]=0,s[60]=0,s[61]=-1,s[62]=0,s[63]=0,s[64]=-1,s[65]=0,s[66]=0,s[67]=-1,s[68]=0,s[69]=0,s[70]=-1,s[71]=0,a.normal=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:s})}if(n.st){var l=new Float32Array(72),u=0;l[u++]=0,l[u++]=0,l[u++]=-1,l[u++]=1,l[u++]=0,l[u++]=-1,l[u++]=1,l[u++]=1,l[u++]=-1,l[u++]=0,l[u++]=1,l[u++]=-1,l[u++]=1,l[u++]=0,l[u++]=-1,l[u++]=0,l[u++]=0,l[u++]=-1,l[u++]=0,l[u++]=1,l[u++]=-1,l[u++]=1,l[u++]=1,l[u++]=-1,l[u++]=0,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=1,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=0,l[u++]=0,l[u++]=0,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=1,l[u++]=1,l[u++]=1,l[u++]=1,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=1,l[u++]=1,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=1,a.st=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:l})}if(n.tangent){var c=new Float32Array(72);c[0]=1,c[1]=0,c[2]=0,c[3]=1,c[4]=0,c[5]=0,c[6]=1,c[7]=0,c[8]=0,c[9]=1,c[10]=0,c[11]=0,c[12]=-1,c[13]=0,c[14]=0,c[15]=-1,c[16]=0,c[17]=0,c[18]=-1,c[19]=0,c[20]=0,c[21]=-1,c[22]=0,c[23]=0,c[24]=0,c[25]=1,c[26]=0,c[27]=0,c[28]=1,c[29]=0,c[30]=0,c[31]=1,c[32]=0,c[33]=0,c[34]=1,c[35]=0,c[36]=0,c[37]=-1,c[38]=0,c[39]=0,c[40]=-1,c[41]=0,c[42]=0,c[43]=-1,c[44]=0,c[45]=0,c[46]=-1,c[47]=0,c[48]=-1,c[49]=0,c[50]=0,c[51]=-1,c[52]=0,c[53]=0,c[54]=-1,c[55]=0,c[56]=0,c[57]=-1,c[58]=0,c[59]=0,c[60]=1,c[61]=0,c[62]=0,c[63]=1,c[64]=0,c[65]=0,c[66]=1,c[67]=0,c[68]=0,c[69]=1,c[70]=0,c[71]=0,a.tangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:c})}if(n.bitangent){var h=new Float32Array(72);h[0]=0,h[1]=1,h[2]=0,h[3]=0,h[4]=1,h[5]=0,h[6]=0,h[7]=1,h[8]=0,h[9]=0,h[10]=1,h[11]=0,h[12]=0,h[13]=1,h[14]=0,h[15]=0,h[16]=1,h[17]=0,h[18]=0,h[19]=1,h[20]=0,h[21]=0,h[22]=1,h[23]=0,h[24]=0,h[25]=0,h[26]=1,h[27]=0,h[28]=0,h[29]=1,h[30]=0,h[31]=0,h[32]=1,h[33]=0,h[34]=0,h[35]=1,h[36]=0,h[37]=0,h[38]=1,h[39]=0,h[40]=0,h[41]=1,h[42]=0,h[43]=0,h[44]=1,h[45]=0,h[46]=0,h[47]=1,h[48]=0,h[49]=0,h[50]=1,h[51]=0,h[52]=0,h[53]=1,h[54]=0,h[55]=0,h[56]=1,h[57]=0,h[58]=0,h[59]=1,h[60]=0,h[61]=0,h[62]=1,h[63]=0,h[64]=0,h[65]=1,h[66]=0,h[67]=0,h[68]=1,h[69]=0,h[70]=0,h[71]=1,a.bitangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:h})}(r=new Uint16Array(36))[0]=0,r[1]=1,r[2]=2,r[3]=0,r[4]=2,r[5]=3,r[6]=6,r[7]=5,r[8]=4,r[9]=7,r[10]=6,r[11]=4,r[12]=8,r[13]=9,r[14]=10,r[15]=8,r[16]=10,r[17]=11,r[18]=14,r[19]=13,r[20]=12,r[21]=15,r[22]=14,r[23]=12,r[24]=18,r[25]=17,r[26]=16,r[27]=19,r[28]=18,r[29]=16,r[30]=20,r[31]=21,r[32]=22,r[33]=20,r[34]=22,r[35]=23}else(o=new Float64Array(24))[0]=t.x,o[1]=t.y,o[2]=t.z,o[3]=i.x,o[4]=t.y,o[5]=t.z,o[6]=i.x,o[7]=i.y,o[8]=t.z,o[9]=t.x,o[10]=i.y,o[11]=t.z,o[12]=t.x,o[13]=t.y,o[14]=i.z,o[15]=i.x,o[16]=t.y,o[17]=i.z,o[18]=i.x,o[19]=i.y,o[20]=i.z,o[21]=t.x,o[22]=i.y,o[23]=i.z,a.position=new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:o}),(r=new Uint16Array(36))[0]=4,r[1]=5,r[2]=6,r[3]=4,r[4]=6,r[5]=7,r[6]=1,r[7]=0,r[8]=3,r[9]=1,r[10]=3,r[11]=2,r[12]=1,r[13]=6,r[14]=5,r[15]=1,r[16]=2,r[17]=6,r[18]=2,r[19]=3,r[20]=7,r[21]=2,r[22]=7,r[23]=6,r[24]=3,r[25]=0,r[26]=4,r[27]=3,r[28]=4,r[29]=7,r[30]=0,r[31]=1,r[32]=5,r[33]=0,r[34]=5,r[35]=4;var d=a$11.subtract(i,t,S$R),f=.5*a$11.magnitude(d);if(t$$(e._offsetAttribute)){var p=o.length,_=new Uint8Array(p/3);d$10(_,e._offsetAttribute===_0x165ce0.NONE?0:1),a.applyOffset=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}return new T$11({attributes:a,indices:r,primitiveType:H$11.TRIANGLES,boundingSphere:new c$19(a$11.ZERO,f),offsetAttribute:e._offsetAttribute})}},c$Z.getUnitBox=function(){return t$$(O$T)||(O$T=c$Z.createGeometry(c$Z.fromDimensions({dimensions:new a$11(1,1,1),vertexFormat:n$12.POSITION_ONLY}))),O$T};var z$S=new a$11;function a$T(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).minimum,i=e.maximum;if(n$1e.typeOf.object("min",t),n$1e.typeOf.object("max",i),t$$(e.offsetAttribute)&&e.offsetAttribute===_0x165ce0.TOP)throw new t$_("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._min=a$11.clone(t),this._max=a$11.clone(i),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}a$T.fromDimensions=function(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).dimensions;n$1e.typeOf.object("dimensions",t),n$1e.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),n$1e.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),n$1e.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);var i=a$11.multiplyByScalar(t,.5,new a$11);return new a$T({minimum:a$11.negate(i,new a$11),maximum:i,offsetAttribute:e.offsetAttribute})},a$T.fromAxisAlignedBoundingBox=function(e){return n$1e.typeOf.object("boundindBox",e),new a$T({minimum:e.minimum,maximum:e.maximum})},a$T.packedLength=2*a$11.packedLength+1,a$T.pack=function(e,t,i){return n$1e.typeOf.object("value",e),n$1e.defined("array",t),i=e$1Y(i,0),a$11.pack(e._min,t,i),a$11.pack(e._max,t,i+a$11.packedLength),t[i+2*a$11.packedLength]=e$1Y(e._offsetAttribute,-1),t};var d$$=new a$11,x$1a=new a$11,A$15={minimum:d$$,maximum:x$1a,offsetAttribute:void 0},n$11;function a$S(e){n$11(e)}function N$11(){}function i$13(){this.times=void 0,this.points=void 0,t$_.throwInstantiationError()}function o$X(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).points,i=e.times;if(!t$$(t)||!t$$(i))throw new t$_("points and times are required.");if(t.length<2)throw new t$_("points.length must be greater than or equal to 2.");if(i.length!==t.length)throw new t$_("times.length must be equal to points.length.");this._times=i,this._points=t,this._lastTimeIndex=0}a$T.unpack=function(e,t,i){n$1e.defined("array",e),t=e$1Y(t,0);var n=a$11.unpack(e,t,d$$),r=a$11.unpack(e,t+a$11.packedLength,x$1a),o=e[t+2*a$11.packedLength];return t$$(i)?(i._min=a$11.clone(n,i._min),i._max=a$11.clone(r,i._max),i._offsetAttribute=-1===o?void 0:o,i):(A$15.offsetAttribute=-1===o?void 0:o,new a$T(A$15))},a$T.createGeometry=function(e){var t=e._min,i=e._max;if(!a$11.equals(t,i)){var n=new t$W,r=new Uint16Array(24),o=new Float64Array(24);o[0]=t.x,o[1]=t.y,o[2]=t.z,o[3]=i.x,o[4]=t.y,o[5]=t.z,o[6]=i.x,o[7]=i.y,o[8]=t.z,o[9]=t.x,o[10]=i.y,o[11]=t.z,o[12]=t.x,o[13]=t.y,o[14]=i.z,o[15]=i.x,o[16]=t.y,o[17]=i.z,o[18]=i.x,o[19]=i.y,o[20]=i.z,o[21]=t.x,o[22]=i.y,o[23]=i.z,n.position=new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:o}),r[0]=4,r[1]=5,r[2]=5,r[3]=6,r[4]=6,r[5]=7,r[6]=7,r[7]=4,r[8]=0,r[9]=1,r[10]=1,r[11]=2,r[12]=2,r[13]=3,r[14]=3,r[15]=0,r[16]=0,r[17]=4,r[18]=1,r[19]=5,r[20]=2,r[21]=6,r[22]=3,r[23]=7;var a=a$11.subtract(i,t,z$S),s=.5*a$11.magnitude(a);if(t$$(e._offsetAttribute)){var l=o.length,u=new Uint8Array(l/3);d$10(u,e._offsetAttribute===_0x165ce0.NONE?0:1),n.applyOffset=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})}return new T$11({attributes:n,indices:r,primitiveType:H$11.LINES,boundingSphere:new c$19(a$11.ZERO,s),offsetAttribute:e._offsetAttribute})}},typeof cancelAnimationFrame<"u"&&(n$11=cancelAnimationFrame),function(){if(!t$$(n$11)&&typeof window<"u")for(var e=["webkit","moz","ms","o"],t=0,i=e.length;t<i&&!t$$(n$11);)t$$(n$11=window[e[t]+"CancelAnimationFrame"])||(n$11=window[e[t]+"CancelRequestAnimationFrame"]),++t;t$$(n$11)||(n$11=clearTimeout)}(),N$11.prototype.geocode=function(e){n$1e.typeOf.string("query",e);var t=e.match(/[^\s,\n]+/g);if(2===t.length||3===t.length){var i=+t[0],n=+t[1],r=3===t.length?+t[2]:300;if(isNaN(i)&&isNaN(n))for(var o=/^(\d+.?\d*)([nsew])/i,a=0;a<t.length;++a){var s=t[a].match(o);o.test(t[a])&&3===s.length&&(/^[ns]/i.test(s[2])?n=/^[n]/i.test(s[2])?+s[1]:-s[1]:/^[ew]/i.test(s[2])&&(i=/^[e]/i.test(s[2])?+s[1]:-s[1]))}if(!isNaN(i)&&!isNaN(n)&&!isNaN(r)){var l={displayName:e,destination:a$11.fromDegrees(i,n,r)};return c$18.resolve([l])}}return c$18.resolve([])},i$13.prototype.evaluate=t$_.throwInstantiationError,i$13.prototype.findTimeInterval=function(e,t){var i,n=this.times,r=n.length;if(!t$$(e))throw new t$_("time is required.");if(e<n[0]||e>n[r-1])throw new t$_("time is out of range.");if(e>=n[t=e$1Y(t,0)]){if(t+1<r&&e<n[t+1])return t;if(t+2<r&&e<n[t+2])return t+1}else if(t-1>=0&&e>=n[t-1])return t-1;if(e>n[t])for(i=t;i<r-1&&!(e>=n[i]&&e<n[i+1]);++i);else for(i=t-1;i>=0&&!(e>=n[i]&&e<n[i+1]);--i);return i===r-1&&(i=r-2),i},i$13.prototype.wrapTime=function(e){n$1e.typeOf.number("time",e);var t=this.times,i=t[t.length-1],n=t[0],r=i-n;return e<n&&(e+=(Math.floor((n-e)/r)+1)*r),e>i&&(e-=(Math.floor((e-i)/r)+1)*r),e},i$13.prototype.clampTime=function(e){n$1e.typeOf.number("time",e);var t=this.times;return n$1d.clamp(e,t[0],t[t.length-1])},Object.defineProperties(o$X.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),o$X.prototype.findTimeInterval=i$13.prototype.findTimeInterval,o$X.prototype.wrapTime=i$13.prototype.wrapTime,o$X.prototype.clampTime=i$13.prototype.clampTime,o$X.prototype.evaluate=function(e,t){var i=this.points,n=this.times,r=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),o=(e-n[r])/(n[r+1]-n[r]);return t$$(t)||(t=new a$11),a$11.lerp(i[r],i[r+1],o,t)};var w$13={solve:function(e,t,i,n){if(!(t$$(e)&&e instanceof Array))throw new t$_("The array lower is required.");if(!(t$$(t)&&t instanceof Array))throw new t$_("The array diagonal is required.");if(!(t$$(i)&&i instanceof Array))throw new t$_("The array upper is required.");if(!(t$$(n)&&n instanceof Array))throw new t$_("The array right is required.");if(t.length!==n.length)throw new t$_("diagonal and right must have the same lengths.");if(e.length!==i.length)throw new t$_("lower and upper must have the same lengths.");if(e.length!==t.length-1)throw new t$_("lower and upper must be one less than the length of diagonal.");var r,o,a=new Array(i.length),s=new Array(n.length),l=new Array(n.length);for(r=0;r<s.length;r++)s[r]=new a$11,l[r]=new a$11;for(a[0]=i[0]/t[0],s[0]=a$11.multiplyByScalar(n[0],1/t[0],s[0]),r=1;r<a.length;++r)o=1/(t[r]-a[r-1]*e[r-1]),a[r]=i[r]*o,s[r]=a$11.subtract(n[r],a$11.multiplyByScalar(s[r-1],e[r-1],s[r]),s[r]),s[r]=a$11.multiplyByScalar(s[r],o,s[r]);for(o=1/(t[r]-a[r-1]*e[r-1]),s[r]=a$11.subtract(n[r],a$11.multiplyByScalar(s[r-1],e[r-1],s[r]),s[r]),s[r]=a$11.multiplyByScalar(s[r],o,s[r]),l[l.length-1]=s[s.length-1],r=l.length-2;r>=0;--r)l[r]=a$11.subtract(s[r],a$11.multiplyByScalar(l[r+1],a[r],l[r]),l[r]);return l}},v$$=[],b$1k=[],_$17=[],B$Q=[];function C$$(e,t,i){var n,r=v$$,o=_$17,a=b$1k,s=B$Q;r.length=o.length=e.length-1,a.length=s.length=e.length,r[0]=a[0]=1,o[0]=0;var l=s[0];for(t$$(l)||(l=s[0]=new a$11),a$11.clone(t,l),n=1;n<r.length-1;++n)r[n]=o[n]=1,a[n]=4,t$$(l=s[n])||(l=s[n]=new a$11),a$11.subtract(e[n+1],e[n-1],l),a$11.multiplyByScalar(l,3,l);return r[n]=0,o[n]=1,a[n]=4,t$$(l=s[n])||(l=s[n]=new a$11),a$11.subtract(e[n+1],e[n-1],l),a$11.multiplyByScalar(l,3,l),a[n+1]=1,t$$(l=s[n+1])||(l=s[n+1]=new a$11),a$11.clone(i,l),w$13.solve(r,a,o,s)}function S$Q(e){var t,i=v$$,n=_$17,r=b$1k,o=B$Q;i.length=n.length=e.length-1,r.length=o.length=e.length,i[0]=n[0]=1,r[0]=2;var a=o[0];for(t$$(a)||(a=o[0]=new a$11),a$11.subtract(e[1],e[0],a),a$11.multiplyByScalar(a,3,a),t=1;t<i.length;++t)i[t]=n[t]=1,r[t]=4,t$$(a=o[t])||(a=o[t]=new a$11),a$11.subtract(e[t+1],e[t-1],a),a$11.multiplyByScalar(a,3,a);return r[t]=2,t$$(a=o[t])||(a=o[t]=new a$11),a$11.subtract(e[t],e[t-1],a),a$11.multiplyByScalar(a,3,a),w$13.solve(i,r,n,o)}function m$Z(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).points,i=e.times,n=e.inTangents,r=e.outTangents;if(!(t$$(t)&&t$$(i)&&t$$(n)&&t$$(r)))throw new t$_("times, points, inTangents, and outTangents are required.");if(t.length<2)throw new t$_("points.length must be greater than or equal to 2.");if(i.length!==t.length)throw new t$_("times.length must be equal to points.length.");if(n.length!==r.length||n.length!==t.length-1)throw new t$_("inTangents and outTangents must have a length equal to points.length - 1.");this._times=i,this._points=t,this._inTangents=n,this._outTangents=r,this._lastTimeIndex=0}Object.defineProperties(m$Z.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},inTangents:{get:function(){return this._inTangents}},outTangents:{get:function(){return this._outTangents}}}),m$Z.createC1=function(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).times,i=e.points,n=e.tangents;if(!t$$(i)||!t$$(t)||!t$$(n))throw new t$_("points, times and tangents are required.");if(i.length<2)throw new t$_("points.length must be greater than or equal to 2.");if(t.length!==i.length||t.length!==n.length)throw new t$_("times, points and tangents must have the same length.");var r=n.slice(0,n.length-1);return new m$Z({times:t,points:i,inTangents:n.slice(1,n.length),outTangents:r})},m$Z.createNaturalCubic=function(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).times,i=e.points;if(!t$$(i)||!t$$(t))throw new t$_("points and times are required.");if(i.length<2)throw new t$_("points.length must be greater than or equal to 2.");if(t.length!==i.length)throw new t$_("times.length must be equal to points.length.");if(i.length<3)return new o$X({points:i,times:t});var n=S$Q(i),r=n.slice(0,n.length-1);return new m$Z({times:t,points:i,inTangents:n.slice(1,n.length),outTangents:r})},m$Z.createClampedCubic=function(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).times,i=e.points,n=e.firstTangent,r=e.lastTangent;if(!(t$$(i)&&t$$(t)&&t$$(n)&&t$$(r)))throw new t$_("points, times, firstTangent and lastTangent are required.");if(i.length<2)throw new t$_("points.length must be greater than or equal to 2.");if(t.length!==i.length)throw new t$_("times.length must be equal to points.length.");if(i.length<3)return new o$X({points:i,times:t});var o=C$$(i,n,r),a=o.slice(0,o.length-1);return new m$Z({times:t,points:i,inTangents:o.slice(1,o.length),outTangents:a})},m$Z.hermiteCoefficientMatrix=new c$1a(2,-3,0,1,-2,3,0,0,1,-2,1,0,1,-1,0,0),m$Z.prototype.findTimeInterval=i$13.prototype.findTimeInterval;var x$19=new a$10,f$11=new a$11;m$Z.prototype.wrapTime=i$13.prototype.wrapTime,m$Z.prototype.clampTime=i$13.prototype.clampTime,m$Z.prototype.evaluate=function(e,t){t$$(t)||(t=new a$11);var i=this.points,n=this.times,r=this.inTangents,o=this.outTangents,a=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),s=(e-n[a])/(n[a+1]-n[a]),l=x$19;l.z=s,l.y=s*s,l.x=l.y*s,l.w=1;var u=c$1a.multiplyByVector(m$Z.hermiteCoefficientMatrix,l,l);return t=a$11.multiplyByScalar(i[a],u.x,t),a$11.multiplyByScalar(i[a+1],u.y,f$11),a$11.add(t,f$11,t),a$11.multiplyByScalar(o[a],u.z,f$11),a$11.add(t,f$11,t),a$11.multiplyByScalar(r[a],u.w,f$11),a$11.add(t,f$11,t)};var M$18=new a$10,b$1j=new a$11,c$Y=new a$11;function O$S(e){var t=e.points,i=e.times;if(t.length<3){var n=i[0],r=1/(i[1]-n),o=t[0],a=t[1];return function(e,t){t$$(t)||(t=new a$11);var i=(e-n)*r;return a$11.lerp(o,a,i,t)}}return function(n,r){t$$(r)||(r=new a$11);var o,a,s,l,u,c=e._lastTimeIndex=e.findTimeInterval(n,e._lastTimeIndex),h=(n-i[c])/(i[c+1]-i[c]),d=M$18;return d.z=h,d.y=h*h,d.x=d.y*h,d.w=1,0===c?(o=t[0],a=t[1],s=e.firstTangent,l=a$11.subtract(t[2],o,b$1j),a$11.multiplyByScalar(l,.5,l),u=c$1a.multiplyByVector(m$Z.hermiteCoefficientMatrix,d,d)):c===t.length-2?(o=t[c],a=t[c+1],l=e.lastTangent,s=a$11.subtract(a,t[c-1],b$1j),a$11.multiplyByScalar(s,.5,s),u=c$1a.multiplyByVector(m$Z.hermiteCoefficientMatrix,d,d)):(o=t[c-1],a=t[c],s=t[c+1],l=t[c+2],u=c$1a.multiplyByVector(p$1e.catmullRomCoefficientMatrix,d,d)),r=a$11.multiplyByScalar(o,u.x,r),a$11.multiplyByScalar(a,u.y,c$Y),a$11.add(r,c$Y,r),a$11.multiplyByScalar(s,u.z,c$Y),a$11.add(r,c$Y,r),a$11.multiplyByScalar(l,u.w,c$Y),a$11.add(r,c$Y,r)}}var E$15=new a$11,V$Q=new a$11;function p$1e(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).points,i=e.times,n=e.firstTangent,r=e.lastTangent;if(n$1e.defined("points",t),n$1e.defined("times",i),n$1e.typeOf.number.greaterThanOrEquals("points.length",t.length,2),n$1e.typeOf.number.equals("times.length","points.length",i.length,t.length),t.length>2&&(t$$(n)||(n=E$15,a$11.multiplyByScalar(t[1],2,n),a$11.subtract(n,t[2],n),a$11.subtract(n,t[0],n),a$11.multiplyByScalar(n,.5,n)),!t$$(r))){var o=t.length-1;r=V$Q,a$11.multiplyByScalar(t[o-1],2,r),a$11.subtract(t[o],r,r),a$11.add(r,t[o-2],r),a$11.multiplyByScalar(r,.5,r)}this._times=i,this._points=t,this._firstTangent=a$11.clone(n),this._lastTangent=a$11.clone(r),this._evaluateFunction=O$S(this),this._lastTimeIndex=0}function c$X(e,t,i,n){if(!t$$(e))throw new t$_("uint8Array is required.");if(t<0)throw new t$_("byteOffset cannot be negative.");if(i<0)throw new t$_("byteLength cannot be negative.");if(t+i>e.byteLength)throw new t$_("sub-region exceeds array bounds.");return t=e$1Y(t,0),i=e$1Y(i,e.byteLength-t),n=e$1Y(n,"utf-8"),e=e.subarray(t,t+i),c$X.decode(e,n)}function u$10(e,t,i){return t<=e&&e<=i}function p$1d(e){for(var t=0,i=0,n=0,r=128,o=191,a=[],s=e.length,l=0;l<s;++l){var u=e[l];if(0===n){if(u$10(u,0,127)){a.push(u);continue}if(u$10(u,194,223)){n=1,t=31&u;continue}if(u$10(u,224,239)){224===u&&(r=160),237===u&&(o=159),n=2,t=15&u;continue}if(u$10(u,240,244)){240===u&&(r=144),244===u&&(o=143),n=3,t=7&u;continue}throw new t$Z("String decoding failed.")}u$10(u,r,o)?(r=128,o=191,t=t<<6|63&u,++i===n&&(a.push(t),t=n=i=0)):(t=n=i=0,r=128,o=191,--l)}return a}Object.defineProperties(p$1e.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}}}),p$1e.catmullRomCoefficientMatrix=new c$1a(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0),p$1e.prototype.findTimeInterval=i$13.prototype.findTimeInterval,p$1e.prototype.wrapTime=i$13.prototype.wrapTime,p$1e.prototype.clampTime=i$13.prototype.clampTime,p$1e.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)},c$X.decodeWithTextDecoder=function(e,t){return new TextDecoder(t).decode(e)},c$X.decodeWithFromCharCode=function(e){for(var t="",i=p$1d(e),n=i.length,r=0;r<n;++r){var o=i[r];o<=65535?t+=String.fromCharCode(o):(o-=65536,t+=String.fromCharCode(55296+(o>>10),56320+(1023&o)))}return t},typeof TextDecoder<"u"?c$X.decode=c$X.decodeWithTextDecoder:c$X.decode=c$X.decodeWithFromCharCode;var c$W={};function k$11(e){if(!t$$(e)||!t$$(e.quantizedVertices))throw new t$_("options.quantizedVertices is required.");if(!t$$(e.indices))throw new t$_("options.indices is required.");if(!t$$(e.minimumHeight))throw new t$_("options.minimumHeight is required.");if(!t$$(e.maximumHeight))throw new t$_("options.maximumHeight is required.");if(!t$$(e.boundingSphere))throw new t$_("options.boundingSphere is required.");if(!t$$(e.horizonOcclusionPoint))throw new t$_("options.horizonOcclusionPoint is required.");if(!t$$(e.westIndices))throw new t$_("options.westIndices is required.");if(!t$$(e.southIndices))throw new t$_("options.southIndices is required.");if(!t$$(e.eastIndices))throw new t$_("options.eastIndices is required.");if(!t$$(e.northIndices))throw new t$_("options.northIndices is required.");if(!t$$(e.westSkirtHeight))throw new t$_("options.westSkirtHeight is required.");if(!t$$(e.southSkirtHeight))throw new t$_("options.southSkirtHeight is required.");if(!t$$(e.eastSkirtHeight))throw new t$_("options.eastSkirtHeight is required.");if(!t$$(e.northSkirtHeight))throw new t$_("options.northSkirtHeight is required.");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 t=this._quantizedVertices.length/3,i=this._uValues=this._quantizedVertices.subarray(0,t),n=this._vValues=this._quantizedVertices.subarray(t,2*t);function r(e,t){return n[e]-n[t]}function o(e,t){return i[e]-i[t]}this._heightValues=this._quantizedVertices.subarray(2*t,3*t),this._westIndices=B$P(e.westIndices,r,t),this._southIndices=B$P(e.southIndices,o,t),this._eastIndices=B$P(e.eastIndices,r,t),this._northIndices=B$P(e.northIndices,o,t),this._westSkirtHeight=e.westSkirtHeight,this._southSkirtHeight=e.southSkirtHeight,this._eastSkirtHeight=e.eastSkirtHeight,this._northSkirtHeight=e.northSkirtHeight,this._childTileMask=e$1Y(e.childTileMask,15),this._createdByUpsampling=e$1Y(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._mesh=void 0,this._normalTexture=e.normalTexture,this.invalid=e$1Y(e.invalid,!1),0===this._maximumHeight&&(this.invalid=!0),this.rasterIndex=e.rasterIndex,this.rasterVertex=e.rasterVertex,this.modelMatrix=e.modelMatrix,this.hasInvalid=e.hasInvalid,this._validMinimumHeight=e.validMinimumHeight,this._validMaximumHeight=e.validMaximumHeight,this._validOrientedBoundingBox=e.validOrientedBoundingBox}c$W.clipTriangleAtAxisAlignedThreshold=function(e,t,i,n,r,o){if(!t$$(e))throw new t$_("threshold is required.");if(!t$$(t))throw new t$_("keepAbove is required.");if(!t$$(i))throw new t$_("u0 is required.");if(!t$$(n))throw new t$_("u1 is required.");if(!t$$(r))throw new t$_("u2 is required.");var a,s,l;t$$(o)?o.length=0:o=[],t?(a=i<e,s=n<e,l=r<e):(a=i>e,s=n>e,l=r>e);var u,c,h,d,f,p,_=a+s+l;return 1===_?a?(u=(e-i)/(n-i),c=(e-i)/(r-i),o.push(1),o.push(2),1!==c&&(o.push(-1),o.push(0),o.push(2),o.push(c)),1!==u&&(o.push(-1),o.push(0),o.push(1),o.push(u))):s?(h=(e-n)/(r-n),d=(e-n)/(i-n),o.push(2),o.push(0),1!==d&&(o.push(-1),o.push(1),o.push(0),o.push(d)),1!==h&&(o.push(-1),o.push(1),o.push(2),o.push(h))):l&&(f=(e-r)/(i-r),p=(e-r)/(n-r),o.push(0),o.push(1),1!==p&&(o.push(-1),o.push(2),o.push(1),o.push(p)),1!==f&&(o.push(-1),o.push(2),o.push(0),o.push(f))):2===_?a||i===e?s||n===e?!l&&r!==e&&(c=(e-i)/(r-i),h=(e-n)/(r-n),o.push(2),o.push(-1),o.push(0),o.push(2),o.push(c),o.push(-1),o.push(1),o.push(2),o.push(h)):(p=(e-r)/(n-r),u=(e-i)/(n-i),o.push(1),o.push(-1),o.push(2),o.push(1),o.push(p),o.push(-1),o.push(0),o.push(1),o.push(u)):(d=(e-n)/(i-n),f=(e-r)/(i-r),o.push(0),o.push(-1),o.push(1),o.push(0),o.push(d),o.push(-1),o.push(2),o.push(0),o.push(f)):3!==_&&(o.push(0),o.push(1),o.push(2)),o},c$W.computeBarycentricCoordinates=function(e,t,i,n,r,o,a,s,l){if(!t$$(e))throw new t$_("x is required.");if(!t$$(t))throw new t$_("y is required.");if(!t$$(i))throw new t$_("x1 is required.");if(!t$$(n))throw new t$_("y1 is required.");if(!t$$(r))throw new t$_("x2 is required.");if(!t$$(o))throw new t$_("y2 is required.");if(!t$$(a))throw new t$_("x3 is required.");if(!t$$(s))throw new t$_("y3 is required.");var u=i-a,c=a-r,h=o-s,d=n-s,f=1/(h*u+c*d),p=t-s,_=e-a,m=(h*_+c*p)*f,$=(-d*_+u*p)*f,g=1-m-$;return t$$(l)?(l.x=m,l.y=$,l.z=g,l):new a$11(m,$,g)},c$W.computeLineSegmentLineSegmentIntersection=function(e,t,i,n,r,o,a,s,l){n$1e.typeOf.number("x00",e),n$1e.typeOf.number("y00",t),n$1e.typeOf.number("x01",i),n$1e.typeOf.number("y01",n),n$1e.typeOf.number("x10",r),n$1e.typeOf.number("y10",o),n$1e.typeOf.number("x11",a),n$1e.typeOf.number("y11",s);var u=(s-o)*(i-e)-(a-r)*(n-t);if(0!==u){var c=((a-r)*(t-o)-(s-o)*(e-r))/u,h=((i-e)*(t-o)-(n-t)*(e-r))/u;if(c>=0&&c<=1&&h>=0&&h<=1)return t$$(l)||(l=new r$T),l.x=e+c*(i-e),l.y=t+c*(n-t),l}},Object.defineProperties(k$11.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}},canUpsample:{get:function(){return t$$(this._mesh)}},normalTexture:{get:function(){return this._normalTexture}}});var y$11=[];function B$P(e,t,i){y$11.length=e.length;for(var n=!1,r=0,o=e.length;r<o;++r)y$11[r]=e[r],n=n||r>0&&t(e[r-1],e[r])>0;return n?(y$11.sort(t),fe$u.createTypedArray(i,y$11)):e}var F$15=new o$_("createVerticesFromQuantizedTerrainMesh");k$11.prototype.createMesh=function(e,t,i,n,r){if(!t$$(e))throw new t$_("tilingScheme is required.");if(!t$$(t))throw new t$_("x is required.");if(!t$$(i))throw new t$_("y is required.");if(!t$$(n))throw new t$_("level is required.");var o=e.ellipsoid,a=e.tileXYToRectangle(t,i,n);r=e$1Y(r,1);var s=F$15.scheduleTask({minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,validMinimumHeight:this._validMinimumHeight,validMaximumHeight:this._validMaximumHeight,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:a,relativeToCenter:this._boundingSphere.center,ellipsoid:o,exaggeration:r,level:n});if(t$$(s)){var l=this;return c$18(s,(function(e){var t=l._quantizedVertices.length/3,i=t+l._westIndices.length+l._southIndices.length+l._eastIndices.length+l._northIndices.length,n=fe$u.createTypedArray(i,e.indices),o=new Float32Array(e.vertices),a=e.center,s=e.minimumHeight,u=e.maximumHeight,c=e$1Y(c$19.clone(e.boundingSphere),l._boundingSphere),h=e$1Y(b$1o.clone(e.orientedBoundingBox),l._orientedBoundingBox),d=e$1Y(b$1o.clone(e.validOrientedBoundingBox),l._validOrientedBoundingBox),f=e$1Y(a$11.clone(e.occludeePointInScaledSpace),l._horizonOcclusionPoint),p=e.vertexStride,_=u$13.clone(e.encoding),m=0===n.length||0===u||l.invalid;return l._mesh=new B$R(a,o,n,e.indexCountWithoutSkirts,t,s,u,c,f,p,h,_,r,e.westIndicesSouthToNorth,e.southIndicesEastToWest,e.eastIndicesNorthToSouth,e.northIndicesWestToEast,m,d),l._quantizedVertices=void 0,l._encodedNormals=void 0,l._indices=void 0,l._uValues=void 0,l._vValues=void 0,l._heightValues=void 0,l._westIndices=void 0,l._southIndices=void 0,l._eastIndices=void 0,l._northIndices=void 0,l._mesh}))}};var L$11=new o$_("upsampleQuantizedTerrainMesh");k$11.prototype.upsample=function(e,t,i,n,r,o,a){if(!t$$(e))throw new t$_("tilingScheme is required.");if(!t$$(t))throw new t$_("thisX is required.");if(!t$$(i))throw new t$_("thisY is required.");if(!t$$(n))throw new t$_("thisLevel is required.");if(!t$$(r))throw new t$_("descendantX is required.");if(!t$$(o))throw new t$_("descendantY is required.");if(!t$$(a))throw new t$_("descendantLevel is required.");if(a-n>1)throw new t$_("Upsampling through more than one level at a time is not currently supported.");var s=this._mesh;if(t$$(this._mesh)){var l=2*t!==r,u=2*i===o,c=e.ellipsoid,h=e.tileXYToRectangle(r,o,a),d=L$11.scheduleTask({vertices:s.vertices,vertexCountWithoutSkirts:s.vertexCountWithoutSkirts,indices:s.indices,indexCountWithoutSkirts:s.indexCountWithoutSkirts,encoding:s.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,validMinimumHeight:this._validMinimumHeight,validMaximumHeight:this._validMaximumHeight,isEastChild:l,isNorthChild:u,childRectangle:h,ellipsoid:c,exaggeration:s.exaggeration});if(t$$(d)){var f=Math.min(this._westSkirtHeight,this._eastSkirtHeight);f=Math.min(f,this._southSkirtHeight),f=Math.min(f,this._northSkirtHeight);var p=l?.5*f:this._westSkirtHeight,_=u?.5*f:this._southSkirtHeight,m=l?this._eastSkirtHeight:.5*f,$=u?this._northSkirtHeight:.5*f,g=this._credits;return c$18(d).then((function(e){var t,i=new Uint16Array(e.vertices),n=fe$u.createTypedArray(i.length/3,e.indices);if(t$$(e.encodedNormals)&&(t=new Uint8Array(e.encodedNormals)),t$$(e.horizonOcclusionPoint))return new k$11({quantizedVertices:i,indices:n,encodedNormals:t,minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight,boundingSphere:c$19.clone(e.boundingSphere),orientedBoundingBox:b$1o.clone(e.orientedBoundingBox),horizonOcclusionPoint:a$11.clone(e.horizonOcclusionPoint),westIndices:e.westIndices,southIndices:e.southIndices,eastIndices:e.eastIndices,northIndices:e.northIndices,westSkirtHeight:p,southSkirtHeight:_,eastSkirtHeight:m,northSkirtHeight:$,childTileMask:0,credits:g,createdByUpsampling:!0,validMaximumHeight:e.validMaximumHeight,validMinimumHeight:e.validMinimumHeight,validOrientedBoundingBox:e.validOrientedBoundingBox})}))}}};var N$10=32767,X$R=new a$11;function Y$R(e,t,i,n,r,o,a,s){var l=Math.min(i,r,a),u=Math.max(i,r,a),c=Math.min(n,o,s),h=Math.max(n,o,s);return e>=l&&e<=u&&t>=c&&t<=h}k$11.prototype.interpolateHeight=function(e,t,i){var n=n$1d.clamp((t-e.west)/e.width,0,1),r=n*N$10,o=n$1d.clamp((i-e.south)/e.height,0,1),a=o*N$10;return t$$(this._mesh)?G$Y(this,n,o):J$$(this,r,a)};var Q$_=new r$T,j$14=new r$T,D$15=new r$T;function G$Y(e,t,i){for(var n=e._mesh,r=n.vertices,o=n.encoding,a=n.indices,s=0,l=a.length;s<l;s+=3){var u=a[s],c=a[s+1],h=a[s+2],d=o.decodeTextureCoordinates(r,u,Q$_),f=o.decodeTextureCoordinates(r,c,j$14),p=o.decodeTextureCoordinates(r,h,D$15);if(Y$R(t,i,d.x,d.y,f.x,f.y,p.x,p.y)){var _=c$W.computeBarycentricCoordinates(t,i,d.x,d.y,f.x,f.y,p.x,p.y,X$R);if(_.x>=-1e-15&&_.y>=-1e-15&&_.z>=-1e-15){var m=o.decodeHeight(r,u),$=o.decodeHeight(r,c),g=o.decodeHeight(r,h);return _.x*m+_.y*$+_.z*g}}}}function J$$(e,t,i){for(var n=e._uValues,r=e._vValues,o=e._heightValues,a=e._indices,s=0,l=a.length;s<l;s+=3){var u=a[s],c=a[s+1],h=a[s+2],d=n[u],f=n[c],p=n[h],_=r[u],m=r[c],$=r[h];if(Y$R(t,i,d,_,f,m,p,$)){var g=c$W.computeBarycentricCoordinates(t,i,d,_,f,m,p,$,X$R);if(g.x>=-1e-15&&g.y>=-1e-15&&g.z>=-1e-15){var y=g.x*o[u]+g.y*o[c]+g.z*o[h];return n$1d.lerp(e._minimumHeight,e._maximumHeight,y/N$10)}}}}k$11.prototype.isChildAvailable=function(e,t,i,n){if(!t$$(e))throw new t$_("thisX is required.");if(!t$$(t))throw new t$_("thisY is required.");if(!t$$(i))throw new t$_("childX is required.");if(!t$$(n))throw new t$_("childY is required.");var r=2;return i!==2*e&&++r,n!==2*t&&(r-=2),0!=(this._childTileMask&1<<r)},k$11.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var _0x413935=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xcb5d6c=_0x413935(void 0,(function(){return _0xcb5d6c.toString().search("(((.+)+)+)+$").toString().constructor(_0xcb5d6c).search("(((.+)+)+)+$")}));_0xcb5d6c();var _0x3605d5={REST:0,KEY_VALUE:1},di$7=Object.freeze(_0x3605d5);function p$1c(e,t,i){if(!t$$(e))throw new t$_("first is required");if(!t$$(t))throw new t$_("second is required");if(i=e$1Y(i,!0),e instanceof h$1f||(e=new h$1f(e)),t instanceof h$1f||(t=new h$1f(t)),"data"===e.scheme)return e.toString();if("data"===t.scheme)return t.toString();t$$(t.authority)&&!t$$(t.scheme)&&(typeof document<"u"&&t$$(document.location)&&t$$(document.location.href)?t.scheme=new h$1f(document.location.href).scheme:t.scheme=e.scheme);var n=e;t.isAbsolute()&&(n=t);var r="";t$$(n.scheme)&&(r+=n.scheme+":"),t$$(n.authority)&&(r+="//"+n.authority,""!==n.path&&"/"!==n.path&&(r=r.replace(/\/?$/,"/"),n.path=n.path.replace(/^\/?/g,""),""===n.authority&&(r+="/"))),r+=n===e?i?e.path.replace(/\/?$/,"/")+t.path.replace(/^\/?/g,""):e.path+t.path:t.path;var o=t$$(e.query),a=t$$(t.query);o&&a?r+="?"+e.query+"&"+t.query:o&&!a?r+="?"+e.query:!o&&a&&(r+="?"+t.query);var s=t$$(t.fragment);return t$$(e.fragment)&&!s?r+="#"+e.fragment:s&&(r+="#"+t.fragment),r}var e$1C={ISERVER_TOKEN:"token",IPORTAL_KEY:"key"},r$N=Object.freeze(e$1C);function a$R(e,t){this._keymap={},this.addCredential(e,t)}function v$_(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),n$1e.defined("options.url",e.url);var t=e.url,i=e.responseType,n=e$1Y(e.method,"GET"),r=e.data,o=e.headers,a=e.overrideMimeType;t=e$1Y(t,e.url);var s=t$$(e.request)?e.request:new r$V;return s.url=t,s.requestFunction=function(e){var l=c$18.defer(),u=v$_.load(e$1Y(e,t),i,n,r,o,l,a);return t$$(u)&&t$$(u.abort)&&(s.cancelFunction=function(){u.abort()}),l.promise},r$U.request(s)}Object.defineProperties(a$R.prototype,{value:{get:function(){return this._value},set:function(e){this._value=e}},name:{get:function(){return this._name},set:function(e){this._name=e}}}),a$R.addToken=function(e){var t,i=e.substring(0,e.indexOf("/realspace")+10);if(t$$(a$R.CREDENTIAL._keymap[i]))switch(a$R.CREDENTIAL._keymap[i].type){case r$N.ISERVER_TOKEN:t="?"+a$Y({token:a$R.CREDENTIAL._keymap[i].value});break;case r$N.IPORTAL_KEY:t="?"+a$Y({key:a$R.CREDENTIAL._keymap[i].value});break;default:t=""}else switch(a$R.CREDENTIAL.name){case r$N.ISERVER_TOKEN:t="?"+a$Y({token:a$R.CREDENTIAL.value});break;case r$N.IPORTAL_KEY:t="?"+a$Y({key:a$R.CREDENTIAL.value});break;default:t="?"+a$R.CREDENTIAL.name+"="+a$R.CREDENTIAL.value}return p$1c(e,t,!1)},a$R.addTokenWithKey=function(e,t){var i;if(t$$(a$R.CREDENTIAL._keymap[e])){if(a$R.CREDENTIAL._keymap[e].type instanceof Array){var n,r=a$R.CREDENTIAL._keymap[e].type,o=a$R.CREDENTIAL._keymap[e].value;(s={})[r[0]]=o[0],n=p$1c(t,"?"+a$Y(s),!1);for(var a=1;a<r.length;a++){(s={})[r[a]]=o[a],n=n+"&"+a$Y(s)}return n}switch(a$R.CREDENTIAL._keymap[e].type){case r$N.ISERVER_TOKEN:i="?"+a$Y({token:a$R.CREDENTIAL._keymap[e].value});break;case r$N.IPORTAL_KEY:i="?"+a$Y({key:a$R.CREDENTIAL._keymap[e].value});break;default:var s;(s={})[a$R.CREDENTIAL._keymap[e].type]=a$R.CREDENTIAL._keymap[e].value,i="?"+a$Y(s)}}else switch(a$R.CREDENTIAL.name){case r$N.ISERVER_TOKEN:i="?"+a$Y({token:a$R.CREDENTIAL.value});break;case r$N.IPORTAL_KEY:i="?"+a$Y({key:a$R.CREDENTIAL.value});break;default:i="?"+a$R.CREDENTIAL.name+"="+a$R.CREDENTIAL.value}return p$1c(t,i,!1)},a$R.prototype.addCredential=function(e,t){if(e instanceof Array){for(var i=0,n=e.length;i<n;i++)if(this._keymap[e[i].rooturl]={type:e[i].type||r$N.ISERVER_TOKEN,value:e[i].value},-1!==e[i].rooturl.indexOf("/realspace")){var r=e[i].rooturl.substring(0,e[i].rooturl.lastIndexOf("/realspace")+10);this._keymap[r]={type:e[i].type||r$N.ISERVER_TOKEN,value:e[i].value}}}else{if(this._value=e$1Y(e,""),null==e)throw new t$_("Credential.value is necessory.");this._name=e$1Y(t,r$N.ISERVER_TOKEN),this._keymap.default={type:this._name,value:this._value}}},a$R.CREDENTIAL=null;var O$R=/^data:(.*?)(;base64)?,(.*)$/;function y$10(e,t){var i=decodeURIComponent(t);return e?atob(i):i}function h$15(e,t){for(var i=y$10(e,t),n=new ArrayBuffer(i.length),r=new Uint8Array(n),o=0;o<i.length;o++)r[o]=i.charCodeAt(o);return n}function C$_(e,t){t=e$1Y(t,"");var i=e[1],n=!!e[2],r=e[3];switch(t){case"":case"text":return y$10(n,r);case"arraybuffer":return h$15(n,r);case"blob":var o=h$15(n,r);return new Blob([o],{type:i});case"document":return(new DOMParser).parseFromString(y$10(n,r),i);case"json":return JSON.parse(y$10(n,r));default:throw new t$_("Unhandled responseType: "+t)}}function o$W(e,t,i){return v$_({url:e,headers:t,request:i})}v$_.load=function(e,t,i,n,r,o,a){var s=O$R.exec(e);if(null===s){var l=new XMLHttpRequest;if(a$X.contains(e)&&(l.withCredentials=!0),t$$(a)&&t$$(l.overrideMimeType)&&l.overrideMimeType(a),l.open(i,e,!0),t$$(r))for(var u in r)r.hasOwnProperty(u)&&l.setRequestHeader(u,r[u]);t$$(t)&&(l.responseType=t);var c=!1;return"string"==typeof e&&(c=0===e.indexOf("file://")),l.onload=function(){if(!(l.status<200||l.status>=300)||c&&0===l.status){var e=l.response,i=l.responseType;if(!t$$(e)||t$$(t)&&i!==t)if("json"===t&&"string"==typeof e)try{o.resolve(JSON.parse(e))}catch(e){o.reject(e)}else(""===i||"document"===i)&&t$$(l.responseXML)&&l.responseXML.hasChildNodes()?o.resolve(l.responseXML):""!==i&&"text"!==i||!t$$(l.responseText)?o.reject(new t$Z("Invalid XMLHttpRequest response type.")):o.resolve(l.responseText);else o.resolve(e)}else o.reject(new e$1S(l.status,l.response,l.getAllResponseHeaders()))},l.onerror=function(e){o.reject(new e$1S)},l.send(n),l}o.resolve(C$_(s,t))},v$_.defaultLoad=v$_.load;var f$10=function(){this.xmldom=null};f$10.prototype.read=function(e){var t,i=e.indexOf("<");return i>0&&(e=e.substring(i)),DOMParser?(this.xmldom||(this.xmldom=new DOMParser),(t=this.xmldom).parseFromString(e,"text/xml")):(this.xmldom||(this.xmldom=new ActiveXObject("Microsoft.XMLDOM")),(t=this.xmldom).loadXML(e),t)},f$10.getElementsByTagNameNS=function(e,t,i){var n=[];if(e.getElementsByTagNameNS)n=e.getElementsByTagNameNS(t,i);else for(var r,o,a=e.getElementsByTagName("*"),s=0,l=a.length;s<l;++s)o=(r=a[s]).prefix?r.prefix+":"+i:i,("*"===i||o===r.nodeName)&&("*"===t||t===r.namespaceURI)&&n.push(r);return n},f$10.getAttributeNodeNS=function(e,t,i){var n=null;if(e.getAttributeNodeNS)n=e.getAttributeNodeNS(t,i);else for(var r,o=e.attributes,a=0,s=o.length;a<s;++a)if((r=o[a]).namespaceURI===t&&(r.prefix?r.prefix+":"+i:i)===r.nodeName){n=r;break}return n},f$10.getChildValue=function(e,t){var i=t||"";if(e)for(var n=e.firstChild;n;n=n.nextSibling)switch(n.nodeType){case 3:case 4:i+=n.nodeValue}return i},f$10.queryNumericAttribute=function(e,t){if(t$$(e)){var i=e.getAttribute(t);if(null!==i){var n=parseFloat(i);return isNaN(n)?void 0:n}}},f$10.queryStringAttribute=function(e,t){if(t$$(e)){var i=e.getAttribute(t);return null!==i?i:void 0}},f$10.queryBooleanAttribute=function(e,t){if(t$$(e)){var i=e.getAttribute(t);if("false"===(i=i.toLowerCase()))return!1;if("true"===i)return!0}},f$10.queryFirstNode=function(e,t,i){if(t$$(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(i){if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}else if(a.localName===t)return a}},f$10.queryNodes=function(e,t,i){if(t$$(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];i?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}},f$10.queryChildNodes=function(e,t,i){if(!t$$(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];i?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n},f$10.queryNumericValue=function(e,t,i){var n=f$10.queryFirstNode(e,t,i);if(t$$(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}},f$10.queryStringValue=function(e,t,i){var n=f$10.queryFirstNode(e,t,i);if(t$$(n))return n.textContent.trim()},f$10.queryBooleanValue=function(e,t,i){var n=f$10.queryFirstNode(e,t,i);if(t$$(n)){var r=n.textContent.trim();return"1"===r||/^true$/i.test(r)}};var f$$={NONE:0,STORING:1,STORED:2,FAILED:3};function d$_(e){if(!t$$(e.name))throw new t$_("options.name is required.");var t=c$18.defer();this.dbname=e.name;var i=indexedDB.open(this.dbname),n=this;return i.onsuccess=function(e){n.db=e.target.result,n.version=n.db.version,t$$(n.cachestatus)||(n.cachestatus={}),t.resolve(n)},i.onupgradeneeded=function(e){n.db=e.target.result,n.version=n.db.version,t.resolve(n)},i.onerror=function(e){n.db=null,t.reject("create database fail, error code : "+e.target.errorcode)},this.layer=e.layer||null,this.storageType=e.storageType||"arrayBuffer",this.creatingTable=!1,this.cachestatus={},t.promise}function e$1B(e,t){return 0!=(e&t)}d$_.prototype.checkObjectStoreExit=function(e){return!!t$$(this.db)&&this.db.objectStoreNames.contains(e)},d$_.prototype.createObjectStore=function(e){var t=c$18.defer();if(this.creatingTable)t.reject(!1);else{if(this.db.objectStoreNames.contains(e))return t.reject(!1),t.promise;this.creatingTable=!0;var i=this,n=parseInt(i.db.version);i.db.close();var r=indexedDB.open(i.dbname,n+1);r.onupgradeneeded=function(n){var r=n.target.result;i.db=r;var o=r.createObjectStore(e,{keyPath:"id"});t$$(o)?(o.createIndex("value","value",{unique:!1}),i.creatingTable=!1,t$$(i.cachestatus)||(i.cachestatus={}),i.cachestatus[e]={},i.db.close(),indexedDB.open(i.dbname).onsuccess=function(e){var n=e.target.result;i.db=n,t.resolve(!0)}):(i.creatingTable=!1,t.reject(!1))},r.onsuccess=function(e){e.target.result.close(),t.resolve(!0)},r.onerror=function(e){i.creatingTable=!1,t.reject(!1)}}return t.promise},d$_.prototype.putElementInDB=function(e,t,i,n){var r=c$18.defer();if(!t$$(this.db))return r.reject(!1),r.promise;var o,a=this;if(t$$(a.cachestatus[e])&&!t$$(n)&&t$$(a.cachestatus[e][t])&&(a.cachestatus[e][t]===f$$.STORING||a.cachestatus[e][t]===f$$.STORED))return r.resolve(!1),r.promise;if(this.db.objectStoreNames.contains(e)){var s;t$$(a.cachestatus[e])||(a.cachestatus[e]={});try{s=this.db.transaction([e],"readwrite")}catch{return r.reject(null),r.promise}if(o=s.objectStore(e),t$$(n))if(n instanceof Array){for(var l=0,u=n.length;l<u;l++)a.cachestatus[e][n[l].key]!==f$$.STORED&&(o.add({id:n[l].key,value:n[l].value}),a.cachestatus[e][n[l].key]=f$$.STORED);r.resolve(!0)}else{for(var t in n)isNaN(1*t)||o.add({id:t,value:n[t]});r.resolve(!0)}else{if(!t$$(t)||!t$$(i))return;if(t instanceof Array&&i instanceof Array){for(l=0,u=t.length;l<u;l++)a.cachestatus[e][t[l]]!==f$$.STORED&&(o.add({id:t[l],value:i[l]}),a.cachestatus[e][t[l]]=f$$.STORED);s.oncomplete=function(e){r.resolve(!0)},s.onerror=function(e){r.reject(!1)}}else{var c=o.add({id:t,value:i});a.cachestatus[e][t]=f$$.STORING,c.onsuccess=function(i){a.cachestatus[e][t]=f$$.STORED,r.resolve(!0)},c.onerror=function(i){a.cachestatus[e][t]=f$$.FAILED,r.reject(!1)}}}}else this.createObjectStore(e).then((function(s){var l=a.db.transaction([e],"readwrite");if(o=l.objectStore(e),t$$(n)){for(var u=0,c=n.length;u<c;u++)o.add({id:n[u].key,value:n[u].value});r.resolve(!0)}else{var h=o.add({id:t,value:i});h.onsuccess=function(e){r.resolve(!0)},h.onerror=function(e){r.reject(!1)}}}),(function(e){r.reject(!1)}));return r.promise},d$_.prototype.getRangeFromDB=function(e,t){var i,n,r=c$18.defer();if(!t$$(this.db)||!this.db.objectStoreNames.contains(e))return null;try{i=this.db.transaction([e])}catch{return r.reject(null),r.promise}try{n=i.objectStore(e)}catch{r.reject(null)}var o=n.openCursor(IDBKeyRange.bound(t[0],t[1])),a=[];return o.onsuccess=function(e){var t=e.target.result;t$$(t)?(a.push(t.value),t.continue()):r.resolve(a)},o.onerror=function(e){r.reject(null)},r.promise},d$_.prototype.getElementFromDB=function(e,t){var i,n,r=c$18.defer();if(!t$$(this.db)||!this.db.objectStoreNames.contains(e))return null;try{i=this.db.transaction([e])}catch{return r.reject(null),r.promise}try{n=i.objectStore(e)}catch{r.reject(null)}var o=n.get(t);return o.onsuccess=function(e){t$$(e.target.result)?r.resolve(e.target.result.value):r.reject(null)},o.onerror=function(e){r.reject(null)},r.promise},d$_.prototype.getAllElementFromDB=function(e){var t,i,n=c$18.defer();if(!t$$(this.db)||!this.db.objectStoreNames.contains(e))return null;if(null!=this.transaction)t=this.transaction;else try{t=this.db.transaction([e])}catch{return n.reject(null),n.promise}try{i=t.objectStore(e)}catch{n.reject(null)}var r=i.getAll();return r.onsuccess=function(e){t$$(e.target.result)?n.resolve(e.target.result):n.reject(null)},r.onerror=function(e){n.reject(null)},n.promise},d$_.prototype.updateElementInDB=function(e,t,i,n){var r=c$18.defer();if(!t$$(this.db)||!this.db.objectStoreNames.contains(e))return r.resolve(!1),r.promise;var o,a=this.db.transaction([e],"readwrite");try{o=a.objectStore(e)}catch{r.resolve(!1)}var s=o.get(t);return s.onsuccess=function(e){var a=e.target.result;t$$(a)||(a={id:t}),a.value=!0===n?Object.assign(a.value,i):i;var s=o.put(a);s.onsuccess=function(e){r.resolve(!0)},s.onerror=function(e){r.resolve(!1)}},s.onerror=function(e){r.resolve(!1)},r.promise},d$_.prototype.removeElementFromDB=function(e,t){var i=c$18.defer();if(!t$$(this.db)||!this.db.objectStoreNames.contains(e))return i.resolve(!1),i.promise;var n,r=this.db.transaction([e],"readwrite");try{n=r.objectStore(e)}catch{i.resolve(!1)}var o=n.delete(t);return o.onerror=function(e){i.resolve(!1)},o.onsuccess=function(e){i.resolve(!0)},i.promise},d$_.prototype.clear=function(e){var t=c$18.defer();if(!t$$(this.db)||!this.db.objectStoreNames.contains(e))return t.resolve(!1),t.promise;var i,n=this.db.transaction([e],"readwrite");try{i=n.objectStore(e)}catch{t.resolve(!1)}var r=i.clear();return r.onerror=function(e){t.resolve(!1)},r.onsuccess=function(e){t.resolve(!0)},t.promise};var e$1A={None:0,QuadKey:1},J$_=Object.freeze(e$1A),p$1b={Accept:"application/json,*/*;q=0.01"},A$14,S$P,i$12;function u$$(e,t,i){if(!t$$(e))throw new t$_("url is required.");t$$(t)?t$$(t.Accept)||((t=e$1W(t)).Accept=p$1b.Accept):t=p$1b;var n=o$W(e,t,i);if(t$$(n))return n.then((function(e){return JSON.parse(e)}))}function u$_(e,t,i){return v$_({url:e,responseType:"document",headers:t,overrideMimeType:"text/xml",request:i})}function u$Z(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),6*i<1?e+6*(t-e)*i:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function e$1z(e,t,i,n){this.red=e$1Y(e,1),this.green=e$1Y(t,1),this.blue=e$1Y(i,1),this.alpha=e$1Y(n,1)}e$1z.fromCartesian4=function(e,t){return n$1e.typeOf.object("cartesian",e),t$$(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new e$1z(e.x,e.y,e.z,e.w)},e$1z.fromBytes=function(e,t,i,n,r){return e=e$1z.byteToFloat(e$1Y(e,255)),t=e$1z.byteToFloat(e$1Y(t,255)),i=e$1z.byteToFloat(e$1Y(i,255)),n=e$1z.byteToFloat(e$1Y(n,255)),t$$(r)?(r.red=e,r.green=t,r.blue=i,r.alpha=n,r):new e$1z(e,t,i,n)},e$1z.fromAlpha=function(e,t,i){return n$1e.typeOf.object("color",e),n$1e.typeOf.number("alpha",t),t$$(i)?(i.red=e.red,i.green=e.green,i.blue=e.blue,i.alpha=t,i):new e$1z(e.red,e.green,e.blue,t)},o$$.supportsTypedArrays()&&(A$14=new ArrayBuffer(4),S$P=new Uint32Array(A$14),i$12=new Uint8Array(A$14)),e$1z.fromRgba=function(e,t){return S$P[0]=e,e$1z.fromBytes(i$12[0],i$12[1],i$12[2],i$12[3],t)},e$1z.byteToRgba=function(e,t,i,n){return i$12[0]=e,i$12[1]=t,i$12[2]=i,i$12[3]=n,S$P[0]},e$1z.fromHsl=function(e,t,i,n,r){e=e$1Y(e,0)%1,t=e$1Y(t,0),i=e$1Y(i,0),n=e$1Y(n,1);var o=i,a=i,s=i;if(0!==t){var l,u=2*i-(l=i<.5?i*(1+t):i+t-i*t);o=u$Z(u,l,e+1/3),a=u$Z(u,l,e),s=u$Z(u,l,e-1/3)}return t$$(r)?(r.red=o,r.green=a,r.blue=s,r.alpha=n,r):new e$1z(o,a,s,n)},e$1z.fromRandom=function(e,t){var i=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).red;if(!t$$(i)){var n=e$1Y(e.minimumRed,0),r=e$1Y(e.maximumRed,1);n$1e.typeOf.number.lessThanOrEquals("minimumRed",n,r),i=n+n$1d.nextRandomNumber()*(r-n)}var o=e.green;if(!t$$(o)){var a=e$1Y(e.minimumGreen,0),s=e$1Y(e.maximumGreen,1);n$1e.typeOf.number.lessThanOrEquals("minimumGreen",a,s),o=a+n$1d.nextRandomNumber()*(s-a)}var l=e.blue;if(!t$$(l)){var u=e$1Y(e.minimumBlue,0),c=e$1Y(e.maximumBlue,1);n$1e.typeOf.number.lessThanOrEquals("minimumBlue",u,c),l=u+n$1d.nextRandomNumber()*(c-u)}var h=e.alpha;if(!t$$(h)){var d=e$1Y(e.minimumAlpha,0),f=e$1Y(e.maximumAlpha,1);n$1e.typeOf.number.lessThanOrEquals("minumumAlpha",d,f),h=d+n$1d.nextRandomNumber()*(f-d)}return t$$(t)?(t.red=i,t.green=o,t.blue=l,t.alpha=h,t):new e$1z(i,o,l,h)};var R$U=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i,D$14=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,h$14=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,L$10=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;e$1z.fromCssColorString=function(e,t){n$1e.typeOf.string("color",e),t$$(t)||(t=new e$1z);var i=e$1z[e.toUpperCase()];if(t$$(i))return e$1z.clone(i,t),t;var n=R$U.exec(e);return null!==n?(t.red=parseInt(n[1],16)/15,t.green=parseInt(n[2],16)/15,t.blue=parseInt(n[3],16)/15,t.alpha=1,t):null!==(n=D$14.exec(e))?(t.red=parseInt(n[1],16)/255,t.green=parseInt(n[2],16)/255,t.blue=parseInt(n[3],16)/255,t.alpha=1,t):null!==(n=h$14.exec(e))?(t.red=parseFloat(n[1])/("%"===n[1].substr(-1)?100:255),t.green=parseFloat(n[2])/("%"===n[2].substr(-1)?100:255),t.blue=parseFloat(n[3])/("%"===n[3].substr(-1)?100:255),t.alpha=parseFloat(e$1Y(n[4],"1.0")),t):null!==(n=L$10.exec(e))?e$1z.fromHsl(parseFloat(n[1])/360,parseFloat(n[2])/100,parseFloat(n[3])/100,parseFloat(e$1Y(n[4],"1.0")),t):t=void 0},e$1z.packedLength=4,e$1z.pack=function(e,t,i){return n$1e.typeOf.object("value",e),n$1e.defined("array",t),i=e$1Y(i,0),t[i++]=e.red,t[i++]=e.green,t[i++]=e.blue,t[i]=e.alpha,t},e$1z.unpack=function(e,t,i){return n$1e.defined("array",e),t=e$1Y(t,0),t$$(i)||(i=new e$1z),i.red=e[t++],i.green=e[t++],i.blue=e[t++],i.alpha=e[t],i},e$1z.byteToFloat=function(e){return e/255},e$1z.floatToByte=function(e){return 1===e?255:256*e|0},e$1z.clone=function(e,t){if(t$$(e))return t$$(t)?(t.red=e.red,t.green=e.green,t.blue=e.blue,t.alpha=e.alpha,t):new e$1z(e.red,e.green,e.blue,e.alpha)},e$1z.equals=function(e,t){return e===t||t$$(e)&&t$$(t)&&e.red===t.red&&e.green===t.green&&e.blue===t.blue&&e.alpha===t.alpha},e$1z.equalsArray=function(e,t,i){return e.red===t[i]&&e.green===t[i+1]&&e.blue===t[i+2]&&e.alpha===t[i+3]},e$1z.prototype.clone=function(e){return e$1z.clone(this,e)},e$1z.prototype.equals=function(e){return e$1z.equals(this,e)},e$1z.prototype.equalsEpsilon=function(e,t){return this===e||t$$(e)&&Math.abs(this.red-e.red)<=t&&Math.abs(this.green-e.green)<=t&&Math.abs(this.blue-e.blue)<=t&&Math.abs(this.alpha-e.alpha)<=t},e$1z.prototype.toString=function(){return"("+this.red+", "+this.green+", "+this.blue+", "+this.alpha+")"},e$1z.prototype.toCssColorString=function(){var e=e$1z.floatToByte(this.red),t=e$1z.floatToByte(this.green),i=e$1z.floatToByte(this.blue);return 1===this.alpha?"rgb("+e+","+t+","+i+")":"rgba("+e+","+t+","+i+","+this.alpha+")"},e$1z.prototype.toCssHexString=function(){let e=e$1z.floatToByte(this.red).toString(16);e.length<2&&(e=`0${e}`);let t=e$1z.floatToByte(this.green).toString(16);t.length<2&&(t=`0${t}`);let i=e$1z.floatToByte(this.blue).toString(16);if(i.length<2&&(i=`0${i}`),this.alpha<1){let n=e$1z.floatToByte(this.alpha).toString(16);return n.length<2&&(n=`0${n}`),`#${e}${t}${i}${n}`}return`#${e}${t}${i}`},e$1z.prototype.toBytes=function(e){var t=e$1z.floatToByte(this.red),i=e$1z.floatToByte(this.green),n=e$1z.floatToByte(this.blue),r=e$1z.floatToByte(this.alpha);return t$$(e)?(e[0]=t,e[1]=i,e[2]=n,e[3]=r,e):[t,i,n,r]},e$1z.prototype.toRgba=function(){return i$12[0]=e$1z.floatToByte(this.red),i$12[1]=e$1z.floatToByte(this.green),i$12[2]=e$1z.floatToByte(this.blue),i$12[3]=e$1z.floatToByte(this.alpha),S$P[0]},e$1z.prototype.brighten=function(e,t){return n$1e.typeOf.number("magnitude",e),n$1e.typeOf.number.greaterThanOrEquals("magnitude",e,0),n$1e.typeOf.object("result",t),e=1-e,t.red=1-(1-this.red)*e,t.green=1-(1-this.green)*e,t.blue=1-(1-this.blue)*e,t.alpha=this.alpha,t},e$1z.prototype.darken=function(e,t){return n$1e.typeOf.number("magnitude",e),n$1e.typeOf.number.greaterThanOrEquals("magnitude",e,0),n$1e.typeOf.object("result",t),e=1-e,t.red=this.red*e,t.green=this.green*e,t.blue=this.blue*e,t.alpha=this.alpha,t},e$1z.prototype.withAlpha=function(e,t){return e$1z.fromAlpha(this,e,t)},e$1z.add=function(e,t,i){return n$1e.typeOf.object("left",e),n$1e.typeOf.object("right",t),n$1e.typeOf.object("result",i),i.red=e.red+t.red,i.green=e.green+t.green,i.blue=e.blue+t.blue,i.alpha=e.alpha+t.alpha,i},e$1z.subtract=function(e,t,i){return n$1e.typeOf.object("left",e),n$1e.typeOf.object("right",t),n$1e.typeOf.object("result",i),i.red=e.red-t.red,i.green=e.green-t.green,i.blue=e.blue-t.blue,i.alpha=e.alpha-t.alpha,i},e$1z.multiply=function(e,t,i){return n$1e.typeOf.object("left",e),n$1e.typeOf.object("right",t),n$1e.typeOf.object("result",i),i.red=e.red*t.red,i.green=e.green*t.green,i.blue=e.blue*t.blue,i.alpha=e.alpha*t.alpha,i},e$1z.divide=function(e,t,i){return n$1e.typeOf.object("left",e),n$1e.typeOf.object("right",t),n$1e.typeOf.object("result",i),i.red=e.red/t.red,i.green=e.green/t.green,i.blue=e.blue/t.blue,i.alpha=e.alpha/t.alpha,i},e$1z.mod=function(e,t,i){return n$1e.typeOf.object("left",e),n$1e.typeOf.object("right",t),n$1e.typeOf.object("result",i),i.red=e.red%t.red,i.green=e.green%t.green,i.blue=e.blue%t.blue,i.alpha=e.alpha%t.alpha,i},e$1z.lerp=function(e,t,i,n){return n$1e.typeOf.object("start",e),n$1e.typeOf.object("end",t),n$1e.typeOf.number("t",i),n$1e.typeOf.object("result",n),n.red=n$1d.lerp(e.red,t.red,i),n.green=n$1d.lerp(e.green,t.green,i),n.blue=n$1d.lerp(e.blue,t.blue,i),n.alpha=n$1d.lerp(e.alpha,t.alpha,i),n},e$1z.multiplyByScalar=function(e,t,i){return n$1e.typeOf.object("color",e),n$1e.typeOf.number("scalar",t),n$1e.typeOf.object("result",i),i.red=e.red*t,i.green=e.green*t,i.blue=e.blue*t,i.alpha=e.alpha*t,i},e$1z.divideByScalar=function(e,t,i){return n$1e.typeOf.object("color",e),n$1e.typeOf.number("scalar",t),n$1e.typeOf.object("result",i),i.red=e.red/t,i.green=e.green/t,i.blue=e.blue/t,i.alpha=e.alpha/t,i},e$1z.ALICEBLUE=Object.freeze(e$1z.fromCssColorString("#F0F8FF")),e$1z.ANTIQUEWHITE=Object.freeze(e$1z.fromCssColorString("#FAEBD7")),e$1z.AQUA=Object.freeze(e$1z.fromCssColorString("#00FFFF")),e$1z.AQUAMARINE=Object.freeze(e$1z.fromCssColorString("#7FFFD4")),e$1z.AZURE=Object.freeze(e$1z.fromCssColorString("#F0FFFF")),e$1z.BEIGE=Object.freeze(e$1z.fromCssColorString("#F5F5DC")),e$1z.BISQUE=Object.freeze(e$1z.fromCssColorString("#FFE4C4")),e$1z.BLACK=Object.freeze(e$1z.fromCssColorString("#000000")),e$1z.BLANCHEDALMOND=Object.freeze(e$1z.fromCssColorString("#FFEBCD")),e$1z.BLUE=Object.freeze(e$1z.fromCssColorString("#0000FF")),e$1z.BLUEVIOLET=Object.freeze(e$1z.fromCssColorString("#8A2BE2")),e$1z.BROWN=Object.freeze(e$1z.fromCssColorString("#A52A2A")),e$1z.BURLYWOOD=Object.freeze(e$1z.fromCssColorString("#DEB887")),e$1z.CADETBLUE=Object.freeze(e$1z.fromCssColorString("#5F9EA0")),e$1z.CHARTREUSE=Object.freeze(e$1z.fromCssColorString("#7FFF00")),e$1z.CHOCOLATE=Object.freeze(e$1z.fromCssColorString("#D2691E")),e$1z.CORAL=Object.freeze(e$1z.fromCssColorString("#FF7F50")),e$1z.CORNFLOWERBLUE=Object.freeze(e$1z.fromCssColorString("#6495ED")),e$1z.CORNSILK=Object.freeze(e$1z.fromCssColorString("#FFF8DC")),e$1z.CRIMSON=Object.freeze(e$1z.fromCssColorString("#DC143C")),e$1z.CYAN=Object.freeze(e$1z.fromCssColorString("#00FFFF")),e$1z.DARKBLUE=Object.freeze(e$1z.fromCssColorString("#00008B")),e$1z.DARKCYAN=Object.freeze(e$1z.fromCssColorString("#008B8B")),e$1z.DARKGOLDENROD=Object.freeze(e$1z.fromCssColorString("#B8860B")),e$1z.DARKGRAY=Object.freeze(e$1z.fromCssColorString("#A9A9A9")),e$1z.DARKGREEN=Object.freeze(e$1z.fromCssColorString("#006400")),e$1z.DARKGREY=e$1z.DARKGRAY,e$1z.DARKKHAKI=Object.freeze(e$1z.fromCssColorString("#BDB76B")),e$1z.DARKMAGENTA=Object.freeze(e$1z.fromCssColorString("#8B008B")),e$1z.DARKOLIVEGREEN=Object.freeze(e$1z.fromCssColorString("#556B2F")),e$1z.DARKORANGE=Object.freeze(e$1z.fromCssColorString("#FF8C00")),e$1z.DARKORCHID=Object.freeze(e$1z.fromCssColorString("#9932CC")),e$1z.DARKRED=Object.freeze(e$1z.fromCssColorString("#8B0000")),e$1z.DARKSALMON=Object.freeze(e$1z.fromCssColorString("#E9967A")),e$1z.DARKSEAGREEN=Object.freeze(e$1z.fromCssColorString("#8FBC8F")),e$1z.DARKSLATEBLUE=Object.freeze(e$1z.fromCssColorString("#483D8B")),e$1z.DARKSLATEGRAY=Object.freeze(e$1z.fromCssColorString("#2F4F4F")),e$1z.DARKSLATEGREY=e$1z.DARKSLATEGRAY,e$1z.DARKTURQUOISE=Object.freeze(e$1z.fromCssColorString("#00CED1")),e$1z.DARKVIOLET=Object.freeze(e$1z.fromCssColorString("#9400D3")),e$1z.DEEPPINK=Object.freeze(e$1z.fromCssColorString("#FF1493")),e$1z.DEEPSKYBLUE=Object.freeze(e$1z.fromCssColorString("#00BFFF")),e$1z.DIMGRAY=Object.freeze(e$1z.fromCssColorString("#696969")),e$1z.DIMGREY=e$1z.DIMGRAY,e$1z.DODGERBLUE=Object.freeze(e$1z.fromCssColorString("#1E90FF")),e$1z.FIREBRICK=Object.freeze(e$1z.fromCssColorString("#B22222")),e$1z.FLORALWHITE=Object.freeze(e$1z.fromCssColorString("#FFFAF0")),e$1z.FORESTGREEN=Object.freeze(e$1z.fromCssColorString("#228B22")),e$1z.FUCHSIA=Object.freeze(e$1z.fromCssColorString("#FF00FF")),e$1z.GAINSBORO=Object.freeze(e$1z.fromCssColorString("#DCDCDC")),e$1z.GHOSTWHITE=Object.freeze(e$1z.fromCssColorString("#F8F8FF")),e$1z.GOLD=Object.freeze(e$1z.fromCssColorString("#FFD700")),e$1z.GOLDENROD=Object.freeze(e$1z.fromCssColorString("#DAA520")),e$1z.GRAY=Object.freeze(e$1z.fromCssColorString("#808080")),e$1z.GREEN=Object.freeze(e$1z.fromCssColorString("#008000")),e$1z.GREENYELLOW=Object.freeze(e$1z.fromCssColorString("#ADFF2F")),e$1z.GREY=e$1z.GRAY,e$1z.HONEYDEW=Object.freeze(e$1z.fromCssColorString("#F0FFF0")),e$1z.HOTPINK=Object.freeze(e$1z.fromCssColorString("#FF69B4")),e$1z.INDIANRED=Object.freeze(e$1z.fromCssColorString("#CD5C5C")),e$1z.INDIGO=Object.freeze(e$1z.fromCssColorString("#4B0082")),e$1z.IVORY=Object.freeze(e$1z.fromCssColorString("#FFFFF0")),e$1z.KHAKI=Object.freeze(e$1z.fromCssColorString("#F0E68C")),e$1z.LAVENDER=Object.freeze(e$1z.fromCssColorString("#E6E6FA")),e$1z.LAVENDAR_BLUSH=Object.freeze(e$1z.fromCssColorString("#FFF0F5")),e$1z.LAWNGREEN=Object.freeze(e$1z.fromCssColorString("#7CFC00")),e$1z.LEMONCHIFFON=Object.freeze(e$1z.fromCssColorString("#FFFACD")),e$1z.LIGHTBLUE=Object.freeze(e$1z.fromCssColorString("#ADD8E6")),e$1z.LIGHTCORAL=Object.freeze(e$1z.fromCssColorString("#F08080")),e$1z.LIGHTCYAN=Object.freeze(e$1z.fromCssColorString("#E0FFFF")),e$1z.LIGHTGOLDENRODYELLOW=Object.freeze(e$1z.fromCssColorString("#FAFAD2")),e$1z.LIGHTGRAY=Object.freeze(e$1z.fromCssColorString("#D3D3D3")),e$1z.LIGHTGREEN=Object.freeze(e$1z.fromCssColorString("#90EE90")),e$1z.LIGHTGREY=e$1z.LIGHTGRAY,e$1z.LIGHTPINK=Object.freeze(e$1z.fromCssColorString("#FFB6C1")),e$1z.LIGHTSEAGREEN=Object.freeze(e$1z.fromCssColorString("#20B2AA")),e$1z.LIGHTSKYBLUE=Object.freeze(e$1z.fromCssColorString("#87CEFA")),e$1z.LIGHTSLATEGRAY=Object.freeze(e$1z.fromCssColorString("#778899")),e$1z.LIGHTSLATEGREY=e$1z.LIGHTSLATEGRAY,e$1z.LIGHTSTEELBLUE=Object.freeze(e$1z.fromCssColorString("#B0C4DE")),e$1z.LIGHTYELLOW=Object.freeze(e$1z.fromCssColorString("#FFFFE0")),e$1z.LIME=Object.freeze(e$1z.fromCssColorString("#00FF00")),e$1z.LIMEGREEN=Object.freeze(e$1z.fromCssColorString("#32CD32")),e$1z.LINEN=Object.freeze(e$1z.fromCssColorString("#FAF0E6")),e$1z.MAGENTA=Object.freeze(e$1z.fromCssColorString("#FF00FF")),e$1z.MAROON=Object.freeze(e$1z.fromCssColorString("#800000")),e$1z.MEDIUMAQUAMARINE=Object.freeze(e$1z.fromCssColorString("#66CDAA")),e$1z.MEDIUMBLUE=Object.freeze(e$1z.fromCssColorString("#0000CD")),e$1z.MEDIUMORCHID=Object.freeze(e$1z.fromCssColorString("#BA55D3")),e$1z.MEDIUMPURPLE=Object.freeze(e$1z.fromCssColorString("#9370DB")),e$1z.MEDIUMSEAGREEN=Object.freeze(e$1z.fromCssColorString("#3CB371")),e$1z.MEDIUMSLATEBLUE=Object.freeze(e$1z.fromCssColorString("#7B68EE")),e$1z.MEDIUMSPRINGGREEN=Object.freeze(e$1z.fromCssColorString("#00FA9A")),e$1z.MEDIUMTURQUOISE=Object.freeze(e$1z.fromCssColorString("#48D1CC")),e$1z.MEDIUMVIOLETRED=Object.freeze(e$1z.fromCssColorString("#C71585")),e$1z.MIDNIGHTBLUE=Object.freeze(e$1z.fromCssColorString("#191970")),e$1z.MINTCREAM=Object.freeze(e$1z.fromCssColorString("#F5FFFA")),e$1z.MISTYROSE=Object.freeze(e$1z.fromCssColorString("#FFE4E1")),e$1z.MOCCASIN=Object.freeze(e$1z.fromCssColorString("#FFE4B5")),e$1z.NAVAJOWHITE=Object.freeze(e$1z.fromCssColorString("#FFDEAD")),e$1z.NAVY=Object.freeze(e$1z.fromCssColorString("#000080")),e$1z.OLDLACE=Object.freeze(e$1z.fromCssColorString("#FDF5E6")),e$1z.OLIVE=Object.freeze(e$1z.fromCssColorString("#808000")),e$1z.OLIVEDRAB=Object.freeze(e$1z.fromCssColorString("#6B8E23")),e$1z.ORANGE=Object.freeze(e$1z.fromCssColorString("#FFA500")),e$1z.ORANGERED=Object.freeze(e$1z.fromCssColorString("#FF4500")),e$1z.ORCHID=Object.freeze(e$1z.fromCssColorString("#DA70D6")),e$1z.PALEGOLDENROD=Object.freeze(e$1z.fromCssColorString("#EEE8AA")),e$1z.PALEGREEN=Object.freeze(e$1z.fromCssColorString("#98FB98")),e$1z.PALETURQUOISE=Object.freeze(e$1z.fromCssColorString("#AFEEEE")),e$1z.PALEVIOLETRED=Object.freeze(e$1z.fromCssColorString("#DB7093")),e$1z.PAPAYAWHIP=Object.freeze(e$1z.fromCssColorString("#FFEFD5")),e$1z.PEACHPUFF=Object.freeze(e$1z.fromCssColorString("#FFDAB9")),e$1z.PERU=Object.freeze(e$1z.fromCssColorString("#CD853F")),e$1z.PINK=Object.freeze(e$1z.fromCssColorString("#FFC0CB")),e$1z.PLUM=Object.freeze(e$1z.fromCssColorString("#DDA0DD")),e$1z.POWDERBLUE=Object.freeze(e$1z.fromCssColorString("#B0E0E6")),e$1z.PURPLE=Object.freeze(e$1z.fromCssColorString("#800080")),e$1z.RED=Object.freeze(e$1z.fromCssColorString("#FF0000")),e$1z.ROSYBROWN=Object.freeze(e$1z.fromCssColorString("#BC8F8F")),e$1z.ROYALBLUE=Object.freeze(e$1z.fromCssColorString("#4169E1")),e$1z.SADDLEBROWN=Object.freeze(e$1z.fromCssColorString("#8B4513")),e$1z.SALMON=Object.freeze(e$1z.fromCssColorString("#FA8072")),e$1z.SANDYBROWN=Object.freeze(e$1z.fromCssColorString("#F4A460")),e$1z.SEAGREEN=Object.freeze(e$1z.fromCssColorString("#2E8B57")),e$1z.SEASHELL=Object.freeze(e$1z.fromCssColorString("#FFF5EE")),e$1z.SIENNA=Object.freeze(e$1z.fromCssColorString("#A0522D")),e$1z.SILVER=Object.freeze(e$1z.fromCssColorString("#C0C0C0")),e$1z.SKYBLUE=Object.freeze(e$1z.fromCssColorString("#87CEEB")),e$1z.SLATEBLUE=Object.freeze(e$1z.fromCssColorString("#6A5ACD")),e$1z.SLATEGRAY=Object.freeze(e$1z.fromCssColorString("#708090")),e$1z.SLATEGREY=e$1z.SLATEGRAY,e$1z.SNOW=Object.freeze(e$1z.fromCssColorString("#FFFAFA")),e$1z.SPRINGGREEN=Object.freeze(e$1z.fromCssColorString("#00FF7F")),e$1z.STEELBLUE=Object.freeze(e$1z.fromCssColorString("#4682B4")),e$1z.TAN=Object.freeze(e$1z.fromCssColorString("#D2B48C")),e$1z.TEAL=Object.freeze(e$1z.fromCssColorString("#008080")),e$1z.THISTLE=Object.freeze(e$1z.fromCssColorString("#D8BFD8")),e$1z.TOMATO=Object.freeze(e$1z.fromCssColorString("#FF6347")),e$1z.TURQUOISE=Object.freeze(e$1z.fromCssColorString("#40E0D0")),e$1z.VIOLET=Object.freeze(e$1z.fromCssColorString("#EE82EE")),e$1z.WHEAT=Object.freeze(e$1z.fromCssColorString("#F5DEB3")),e$1z.WHITE=Object.freeze(e$1z.fromCssColorString("#FFFFFF")),e$1z.WHITESMOKE=Object.freeze(e$1z.fromCssColorString("#F5F5F5")),e$1z.YELLOW=Object.freeze(e$1z.fromCssColorString("#FFFF00")),e$1z.YELLOWGREEN=Object.freeze(e$1z.fromCssColorString("#9ACD32")),e$1z.TRANSPARENT=Object.freeze(new e$1z(0,0,0,0));const _$16={UNSIGNED_BYTE:de$x.UNSIGNED_BYTE,UNSIGNED_SHORT:de$x.UNSIGNED_SHORT,UNSIGNED_INT:de$x.UNSIGNED_INT,FLOAT:de$x.FLOAT,HALF_FLOAT:de$x.HALF_FLOAT_OES,UNSIGNED_INT_24_8:de$x.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:de$x.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:de$x.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:de$x.UNSIGNED_SHORT_5_6_5,toWebGLConstant:function(e,t){switch(e){case _$16.UNSIGNED_BYTE:return de$x.UNSIGNED_BYTE;case _$16.UNSIGNED_SHORT:return de$x.UNSIGNED_SHORT;case _$16.UNSIGNED_INT:return de$x.UNSIGNED_INT;case _$16.FLOAT:return de$x.FLOAT;case _$16.HALF_FLOAT:return t.webgl2?de$x.HALF_FLOAT:de$x.HALF_FLOAT_OES;case _$16.UNSIGNED_INT_24_8:return de$x.UNSIGNED_INT_24_8;case _$16.UNSIGNED_SHORT_4_4_4_4:return de$x.UNSIGNED_SHORT_4_4_4_4;case _$16.UNSIGNED_SHORT_5_5_5_1:return de$x.UNSIGNED_SHORT_5_5_5_1;case _$16.UNSIGNED_SHORT_5_6_5:return _$16.UNSIGNED_SHORT_5_6_5}},isPacked:function(e){return e===_$16.UNSIGNED_INT_24_8||e===_$16.UNSIGNED_SHORT_4_4_4_4||e===_$16.UNSIGNED_SHORT_5_5_5_1||e===_$16.UNSIGNED_SHORT_5_6_5},sizeInBytes:function(e){switch(e){case _$16.UNSIGNED_BYTE:return 1;case _$16.UNSIGNED_SHORT:case _$16.UNSIGNED_SHORT_4_4_4_4:case _$16.UNSIGNED_SHORT_5_5_5_1:case _$16.UNSIGNED_SHORT_5_6_5:case _$16.HALF_FLOAT:return 2;case _$16.UNSIGNED_INT:case _$16.FLOAT:case _$16.UNSIGNED_INT_24_8:return 4}},validate:function(e){return e===_$16.UNSIGNED_BYTE||e===_$16.UNSIGNED_SHORT||e===_$16.UNSIGNED_INT||e===_$16.FLOAT||e===_$16.HALF_FLOAT||e===_$16.UNSIGNED_INT_24_8||e===_$16.UNSIGNED_SHORT_4_4_4_4||e===_$16.UNSIGNED_SHORT_5_5_5_1||e===_$16.UNSIGNED_SHORT_5_6_5}};var v$Z=Object.freeze(_$16);const _$15={DEPTH_COMPONENT:de$x.DEPTH_COMPONENT,DEPTH_STENCIL:de$x.DEPTH_STENCIL,ALPHA:de$x.ALPHA,RGB:de$x.RGB,RGBA:de$x.RGBA,LUMINANCE:de$x.LUMINANCE,LUMINANCE_ALPHA:de$x.LUMINANCE_ALPHA,RGB_DXT1:de$x.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:de$x.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:de$x.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:de$x.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:de$x.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:de$x.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:de$x.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:de$x.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:de$x.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:de$x.COMPRESSED_RGB_ETC1_WEBGL,RGB8_ETC2:de$x.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:de$x.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:de$x.COMPRESSED_RGBA_BPTC_UNORM,componentsLength:function(e){switch(e){case _$15.RGB:return 3;case _$15.RGBA:return 4;case _$15.LUMINANCE_ALPHA:return 2;case _$15.ALPHA:case _$15.LUMINANCE:default:return 1}},validate:function(e){return e===_$15.DEPTH_COMPONENT||e===_$15.DEPTH_STENCIL||e===_$15.ALPHA||e===_$15.RGB||e===_$15.RGBA||e===_$15.LUMINANCE||e===_$15.LUMINANCE_ALPHA||e===_$15.RGB_DXT1||e===_$15.RGBA_DXT1||e===_$15.RGBA_DXT3||e===_$15.RGBA_DXT5||e===_$15.RGB_PVRTC_4BPPV1||e===_$15.RGB_PVRTC_2BPPV1||e===_$15.RGBA_PVRTC_4BPPV1||e===_$15.RGBA_PVRTC_2BPPV1||e===_$15.RGBA_ASTC||e===_$15.RGB_ETC1||e===_$15.RGB8_ETC2||e===_$15.RGBA8_ETC2_EAC||e===_$15.RGBA_BC7},isColorFormat:function(e){return e===_$15.ALPHA||e===_$15.RGB||e===_$15.RGBA||e===_$15.LUMINANCE||e===_$15.LUMINANCE_ALPHA},isDepthFormat:function(e){return e===_$15.DEPTH_COMPONENT||e===_$15.DEPTH_STENCIL},isCompressedFormat:function(e){return e===_$15.RGB_DXT1||e===_$15.RGBA_DXT1||e===_$15.RGBA_DXT3||e===_$15.RGBA_DXT5||e===_$15.RGB_PVRTC_4BPPV1||e===_$15.RGB_PVRTC_2BPPV1||e===_$15.RGBA_PVRTC_4BPPV1||e===_$15.RGBA_PVRTC_2BPPV1||e===_$15.RGBA_ASTC||e===_$15.RGB_ETC1||e===_$15.RGB8_ETC2||e===_$15.RGBA8_ETC2_EAC||e===_$15.RGBA_BC7},isDXTFormat:function(e){return e===_$15.RGB_DXT1||e===_$15.RGBA_DXT1||e===_$15.RGBA_DXT3||e===_$15.RGBA_DXT5},isPVRTCFormat:function(e){return e===_$15.RGB_PVRTC_4BPPV1||e===_$15.RGB_PVRTC_2BPPV1||e===_$15.RGBA_PVRTC_4BPPV1||e===_$15.RGBA_PVRTC_2BPPV1},isASTCFormat:function(e){return e===_$15.RGBA_ASTC},isETC1Format:function(e){return e===_$15.RGB_ETC1},isETC2Format:function(e){return e===_$15.RGB8_ETC2||e===_$15.RGBA8_ETC2_EAC},isBC7Format:function(e){return e===_$15.RGBA_BC7},compressedTextureSizeInBytes:function(e,t,i){switch(e){case _$15.RGB_DXT1:case _$15.RGBA_DXT1:case _$15.RGB_ETC1:case _$15.RGB8_ETC2:return Math.floor((t+3)/4)*Math.floor((i+3)/4)*8;case _$15.RGBA_DXT3:case _$15.RGBA_DXT5:case _$15.RGBA_ASTC:case _$15.RGBA8_ETC2_EAC:return Math.floor((t+3)/4)*Math.floor((i+3)/4)*16;case _$15.RGB_PVRTC_4BPPV1:case _$15.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8);case _$15.RGB_PVRTC_2BPPV1:case _$15.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8);case _$15.RGBA_BC7:return Math.ceil(t/4)*Math.ceil(i/4)*16;default:return 0}},textureSizeInBytes:function(e,t,i,n){let r=_$15.componentsLength(e);return v$Z.isPacked(t)&&(r=1),r*v$Z.sizeInBytes(t)*i*n},alignmentInBytes:function(e,t,i){const n=_$15.textureSizeInBytes(e,t,i,1)%4;return 0===n?4:2===n?2:1},createTypedArray:function(e,t,i,n){let r;const o=v$Z.sizeInBytes(t);r=o===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:o===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:o===Float32Array.BYTES_PER_ELEMENT&&t===v$Z.FLOAT?Float32Array:Uint32Array;return new r(_$15.componentsLength(e)*i*n)},flipY:function(e,t,i,n,r){if(1===r)return e;const o=_$15.createTypedArray(t,i,n,r),a=_$15.componentsLength(t),s=n*a;for(let t=0;t<r;++t){const i=t*n*a,l=(r-t-1)*n*a;for(let t=0;t<s;++t)o[l+t]=e[i+t]}return o},toInternalFormat:function(e,t,i){if(!i.webgl2)return e;if(e===_$15.DEPTH_STENCIL)return de$x.DEPTH24_STENCIL8;if(e===_$15.DEPTH_COMPONENT){if(t===v$Z.UNSIGNED_SHORT)return de$x.DEPTH_COMPONENT16;if(t===v$Z.UNSIGNED_INT)return de$x.DEPTH_COMPONENT24}if(t===v$Z.FLOAT)switch(e){case _$15.RGBA:return de$x.RGBA32F;case _$15.RGB:return de$x.RGB32F;case _$15.RG:return de$x.RG32F;case _$15.R:return de$x.R32F}if(t===v$Z.HALF_FLOAT)switch(e){case _$15.RGBA:return de$x.RGBA16F;case _$15.RGB:return de$x.RGB16F;case _$15.RG:return de$x.RG16F;case _$15.R:return de$x.R16F}return e}};var Z$_=Object.freeze(_$15),_0x1322d9=(_0x3d351f=!0,function(e,t){var i=_0x3d351f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3d351f=!1,i}),_0x51b9eb=_0x1322d9(void 0,(function(){return _0x51b9eb.toString().search("(((.+)+)+)+$").toString().constructor(_0x51b9eb).search("(((.+)+)+)+$")})),_0x3d351f;_0x51b9eb();var _0x10e17e=8192,_0x5bd0f3=(_0x4e0ba6=!0,function(e,t){var i=_0x4e0ba6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e0ba6=!1,i}),_0x53396a=_0x5bd0f3(void 0,(function(){return _0x53396a.toString().search("(((.+)+)+)+$").toString().constructor(_0x53396a).search("(((.+)+)+)+$")})),_0x4e0ba6;_0x53396a();var _0x184ac2={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function _0x5ad0ad(e){return(e=Math.round(e))<0?0:e>255?255:e}function _0x299e7c(e){return e<0?0:e>1?1:e}function _0x534b09(e){return"%"===e[e.length-1]?_0x5ad0ad(parseFloat(e)/100*255):_0x5ad0ad(parseInt(e))}function _0x505f1f(e){return"%"===e[e.length-1]?_0x299e7c(parseFloat(e)/100):_0x299e7c(parseFloat(e))}function _0x581274(e,t,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?e+(t-e)*i*6:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function _0x3f7a2c(e){var t,i=e.replace(/ /g,"").toLowerCase();if(i in _0x184ac2)return _0x184ac2[i].slice();if("#"===i[0])return 4===i.length?(t=parseInt(i.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===i.length&&(t=parseInt(i.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var n=i.indexOf("("),r=i.indexOf(")");if(-1!==n&&r+1===i.length){var o=i.substr(0,n),a=i.substr(n+1,r-(n+1)).split(","),s=1;switch(o){case"rgba":if(4!==a.length)return null;s=_0x505f1f(a.pop());case"rgb":return 3!==a.length?null:[_0x534b09(a[0]),_0x534b09(a[1]),_0x534b09(a[2]),s];case"hsla":if(4!==a.length)return null;s=_0x505f1f(a.pop());case"hsl":if(3!==a.length)return null;var l=(parseFloat(a[0])%360+360)%360/360,u=_0x505f1f(a[1]),c=_0x505f1f(a[2]),h=c<=.5?c*(u+1):c+u-c*u,d=2*c-h;return[_0x5ad0ad(255*_0x581274(d,h,l+1/3)),_0x5ad0ad(255*_0x581274(d,h,l)),_0x5ad0ad(255*_0x581274(d,h,l-1/3)),s];default:return null}}return null}const _0x5bf79e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x10d268=_0x5bf79e(void 0,(function(){return _0x10d268.toString().search("(((.+)+)+)+$").toString().constructor(_0x10d268).search("(((.+)+)+)+$")}));_0x10d268();class _0x5b501e{constructor(e,t,i,n=1){this.r=e,this.g=t,this.b=i,this.a=n}static parse(e){if(!e)return;if(e instanceof _0x5b501e)return e;if("string"!=typeof e)return;const t=_0x3f7a2c(e);return t?new _0x5b501e(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3]):void 0}toString(){const[e,t,i,n]=this.toArray();return"rgba("+Math.round(e)+","+Math.round(t)+","+Math.round(i)+","+n+")"}toArray(){const{r:e,g:t,b:i,a:n}=this;return 0===n?[0,0,0,0]:[255*e/n,255*t/n,255*i/n,n]}}_0x5b501e.black=new _0x5b501e(0,0,0,1),_0x5b501e.white=new _0x5b501e(1,1,1,1),_0x5b501e.transparent=new _0x5b501e(0,0,0,0),_0x5b501e.red=new _0x5b501e(1,0,0,1);var _0x5d9f0c=(_0x42eda1=!0,function(e,t){var i=_0x42eda1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x42eda1=!1,i}),_0x500093=_0x5d9f0c(void 0,(function(){return _0x500093.toString().search("(((.+)+)+)+$").toString().constructor(_0x500093).search("(((.+)+)+)+$")})),_0x42eda1;_0x500093();var _0x5cbac0=1029,_0x3aa081=2305,_0x5d4b2b=function(e,t,i){this.enable=e,this.mode=t,this.frontFace=i};_0x5d4b2b.disabled=new _0x5d4b2b(!1,_0x5cbac0,_0x3aa081),_0x5d4b2b.backCCW=new _0x5d4b2b(!0,_0x5cbac0,_0x3aa081);var _0xcbbc73=(_0x188b90=!0,function(e,t){var i=_0x188b90?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x188b90=!1,i}),_0x479b32=_0xcbbc73(void 0,(function(){return _0x479b32.toString().search("(((.+)+)+)+$").toString().constructor(_0x479b32).search("(((.+)+)+)+$")})),_0x188b90;_0x479b32();var _0x512b73=519,_0x358f1c=function(e,t,i){this.func=e,this.mask=t,this.range=i};_0x358f1c.ReadOnly=!1,_0x358f1c.ReadWrite=!0,_0x358f1c.disabled=new _0x358f1c(_0x512b73,_0x358f1c.ReadOnly,[0,1]);var _0x268e47=(_0x50f7da=!0,function(e,t){var i=_0x50f7da?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x50f7da=!1,i}),_0x3e20c0=_0x268e47(void 0,(function(){return _0x3e20c0.toString().search("(((.+)+)+)+$").toString().constructor(_0x3e20c0).search("(((.+)+)+)+$")})),_0x50f7da;_0x3e20c0();var _0x54d876=519,_0x104431=7680,_0x4a3404=function(e,t,i,n,r,o){this.test=e,this.ref=t,this.mask=i,this.fail=n,this.depthFail=r,this.pass=o};_0x4a3404.disabled=new _0x4a3404({func:_0x54d876,mask:0},0,0,_0x104431,_0x104431,_0x104431);var _0x2724d0={},_0x517ea1=function(e,t){this.gl=e.gl,this.location=t};_0x2724d0.Uniform1i=function(e){function t(t,i){e.call(this,t,i),this.current=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1i(this.location,e))},t}(_0x517ea1),_0x2724d0.Uniform1f=function(e){function t(t,i){e.call(this,t,i),this.current=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1f(this.location,e))},t}(_0x517ea1),_0x2724d0.Uniform2f=function(e){function t(t,i){e.call(this,t,i),this.current=[0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1])&&(this.current=e,this.gl.uniform2f(this.location,e[0],e[1]))},t}(_0x517ea1),_0x2724d0.Uniform3f=function(e){function t(t,i){e.call(this,t,i),this.current=[0,0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2])&&(this.current=e,this.gl.uniform3f(this.location,e[0],e[1],e[2]))},t}(_0x517ea1),_0x2724d0.Uniform4f=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i){e.call(this,t,i),this.current=[0,0,0,0]}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2]||e[3]!==this.current[3])&&(this.current=e,this.gl.uniform4f(this.location,e[0],e[1],e[2],e[3]))},r}(_0x517ea1),_0x2724d0.UniformColor=function(e){function t(t,i){e.call(this,t,i),this.current=_0x5b501e.transparent}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e.r!==this.current.r||e.g!==this.current.g||e.b!==this.current.b||e.a!==this.current.a)&&(this.current=e,this.gl.uniform4f(this.location,e.r,e.g,e.b,e.a))},t}(_0x517ea1);var _0x3b54a3=new Float32Array(16);_0x2724d0.UniformMatrix4f=function(e){function t(t,i){e.call(this,t,i),this.current=_0x3b54a3}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.gl.uniformMatrix4fv(this.location,!1,e)},t}(_0x517ea1);var _0x4b21ad=(_0xafcf90=!0,function(e,t){var i=_0xafcf90?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xafcf90=!1,i}),_0x2db5b6=_0x4b21ad(void 0,(function(){return _0x2db5b6.toString().search("(((.+)+)+)+$").toString().constructor(_0x2db5b6).search("(((.+)+)+)+$")})),_0xafcf90;function _0x3987cc(e,t,i){if(e.realtime&&t$$(i)&&t$$(i.zoom)){var n=i.zoom;t$$(i.drawFillPattern)&&(n=Math.floor(n+.5));var r=i.zoom-e.level,o=t*(_0x10e17e/(e.targetTileSize*Math.pow(2,r)));o*=e.targetTileSize/512;var a=i.zoom-i.finestRenderLevel;return a>0&&(o*=Math.pow(2,a)),o}return t*(_0x10e17e/e.targetTileSize)}_0x2db5b6();var _0x217d76=(_0x420abf=!0,function(e,t){var i=_0x420abf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x420abf=!1,i}),_0x36ccd5=_0x217d76(void 0,(function(){return _0x36ccd5.toString().search("(((.+)+)+)+$").toString().constructor(_0x36ccd5).search("(((.+)+)+)+$")})),_0x420abf;_0x36ccd5();var _0x158ab2={circleUniforms:function(e,t){return{u_camera_to_center_distance:new _0x2724d0.Uniform1f(e,t.u_camera_to_center_distance),u_scale_with_map:new _0x2724d0.Uniform1i(e,t.u_scale_with_map),u_pitch_with_map:new _0x2724d0.Uniform1i(e,t.u_pitch_with_map),u_extrude_scale:new _0x2724d0.Uniform2f(e,t.u_extrude_scale),u_device_pixel_ratio:new _0x2724d0.Uniform1f(e,t.u_device_pixel_ratio),u_matrix:new _0x2724d0.UniformMatrix4f(e,t.u_matrix)}},circleUniformValues:function(e,t,i){var n,r;if(e.transform,"map"===i.paint.get("circle-pitch-alignment")){var o=_0x3987cc(t,1);n=!0,r=[o,o]}else n=!1,r=_0x3f0aeb(t);return{u_camera_to_center_distance:1,u_scale_with_map:+("map"===i.paint.get("circle-pitch-scale")),u_matrix:_0x3f458e(t),u_pitch_with_map:+n,u_device_pixel_ratio:1,u_extrude_scale:r}},circleUniformMap:function(e,t,i){var n,r;if("map"===i.paint.get("circle-pitch-alignment")){var o=_0x3987cc(t,1);n=!0,r=[o,o]}else n=!1,r=_0x3f0aeb(t);var a={u_camera_to_center_distance:function(){return 1},u_scale_with_map:function(){return+("map"===i.paint.get("circle-pitch-scale"))},u_matrix:function(){return _0x3f458e(t)},u_pitch_with_map:function(){return+n},u_device_pixel_ratio:function(){return 1},u_extrude_scale:function(){return r}};return a}},_0x392feb=new Float32Array(16);function _0x3f458e(e){var t=e.viewProjection;return c$1a.toArray(t,_0x392feb)}function _0x3f0aeb(e){return[2/e.tileSize,-2/e.tileSize]}var _0x61d89d=(_0x8781ba=!0,function(e,t){var i=_0x8781ba?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x8781ba=!1,i}),_0x1c724a=_0x61d89d(void 0,(function(){return _0x1c724a.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c724a).search("(((.+)+)+)+$")})),_0x8781ba;_0x1c724a();var _0x4f7926=1,_0x23b99f=function(e,t){var i=t.pixelRatio,n=t.version,r=t.stretchX,o=t.stretchY,a=t.content;this.paddedRect=e,this.pixelRatio=i,this.stretchX=r,this.stretchY=o,this.content=a,this.version=n},_0xd559d2={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};_0xd559d2.tl.get=function(){return[this.paddedRect.x+_0x4f7926,this.paddedRect.y+_0x4f7926]},_0xd559d2.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-_0x4f7926,this.paddedRect.y+this.paddedRect.h-_0x4f7926]},_0xd559d2.tlbr.get=function(){return this.tl.concat(this.br)},_0xd559d2.displaySize.get=function(){return[(this.paddedRect.w-2*_0x4f7926)/this.pixelRatio,(this.paddedRect.h-2*_0x4f7926)/this.pixelRatio]},Object.defineProperties(_0x23b99f.prototype,_0xd559d2);var _0x166c2b=(_0x1249e6=!0,function(e,t){var i=_0x1249e6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1249e6=!1,i}),_0x1e1b4c=_0x166c2b(void 0,(function(){return _0x1e1b4c.toString().search("(((.+)+)+)+$").toString().constructor(_0x1e1b4c).search("(((.+)+)+)+$")})),_0x1249e6;_0x1e1b4c();var _0x38ad68=function(e,t){_0xbe8ac1(this,e,4,t)};function _0xbe8ac1(e,t,i,n){var r=t.width,o=t.height;if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==r*o*i)throw new RangeError("mismatched image size")}else n=new Uint8Array(r*o*i);return e.width=r,e.height=o,e.data=n,e}function _0x304d98(e,t,i){var n=t.width,r=t.height;if(n!==e.width||r!==e.height){var o=_0xbe8ac1({},{width:n,height:r},i);_0x16e20c(e,o,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,n),height:Math.min(e.height,r)},i),e.width=n,e.height=r,e.data=o.data}}function _0x16e20c(e,t,i,n,r,o){if(0===r.width||0===r.height)return t;if(r.width>e.width||r.height>e.height||i.x>e.width-r.width||i.y>e.height-r.height)return console.log("out of range source coordinates for image copy"),t;if(r.width>t.width||r.height>t.height||n.x>t.width-r.width||n.y>t.height-r.height)return console.log("out of range destination coordinates for image copy"),t;for(var a=e.data,s=t.data,l=0;l<r.height;l++)for(var u=((i.y+l)*e.width+i.x)*o,c=((n.y+l)*t.width+n.x)*o,h=0;h<r.width*o;h++)s[c+h]=a[u+h];return t}function m$Y(e){for(var t=0,i=0,n=0,r=e;n<r.length;n+=1){var o=r[n];t+=o.w*o.h,i=Math.max(i,o.w)}e.sort((function(e,t){return t.h-e.h}));for(var a=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),i),h:1/0}],s=0,l=0,u=0,c=e;u<c.length;u+=1)for(var h=c[u],d=a.length-1;d>=0;d--){var f=a[d];if(!(h.w>f.w||h.h>f.h)){if(h.x=f.x,h.y=f.y,l=Math.max(l,h.y+h.h),s=Math.max(s,h.x+h.w),h.w===f.w&&h.h===f.h){var p=a.pop();d<a.length&&(a[d]=p)}else h.h===f.h?(f.x+=h.w,f.w-=h.w):h.w===f.w?(f.y+=h.h,f.h-=h.h):(a.push({x:f.x+h.w,y:f.y,w:f.w-h.w,h:h.h}),f.y+=h.h,f.h-=h.h);break}}return{w:s,h:l,fill:t/(s*l)||0}}_0x38ad68.prototype.resize=function(e){_0x304d98(this,e,4)},_0x38ad68.prototype.replace=function(e,t){t?this.data.set(e):e instanceof Uint8ClampedArray?this.data=new Uint8Array(e.buffer):this.data=e},_0x38ad68.prototype.clone=function(){return new _0x38ad68({width:this.width,height:this.height},new Uint8Array(this.data))},_0x38ad68.copy=function(e,t,i,n,r){_0x16e20c(e,t,i,n,r,4)};var _0x129933=(_0x4a0231=!0,function(e,t){var i=_0x4a0231?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4a0231=!1,i}),_0x351123=_0x129933(void 0,(function(){return _0x351123.toString().search("(((.+)+)+)+$").toString().constructor(_0x351123).search("(((.+)+)+)+$")})),_0x4a0231;_0x351123();var _0x3fb7bf=1,_0x20e15d=function(e,t){var i={},n={};this.haveRenderCallbacks=[];var r=[];this.addImages(e,i,r),this.addImages(t,n,r);var o=m$Y(r),a=o.w,s=o.h,l=new _0x38ad68({width:a||1,height:s||1});for(var u in e){var c=e[u],h=i[u].paddedRect;_0x38ad68.copy(c.data,l,{x:0,y:0},{x:h.x+_0x3fb7bf,y:h.y+_0x3fb7bf},c.data)}for(var d in t){var f=t[d],p=n[d].paddedRect,_=p.x+_0x3fb7bf,m=p.y+_0x3fb7bf,$=f.data.width,g=f.data.height;_0x38ad68.copy(f.data,l,{x:0,y:0},{x:_,y:m},f.data),_0x38ad68.copy(f.data,l,{x:0,y:g-1},{x:_,y:m-1},{width:$,height:1}),_0x38ad68.copy(f.data,l,{x:0,y:0},{x:_,y:m+g},{width:$,height:1}),_0x38ad68.copy(f.data,l,{x:$-1,y:0},{x:_-1,y:m},{width:1,height:g}),_0x38ad68.copy(f.data,l,{x:0,y:0},{x:_+$,y:m},{width:1,height:g})}this.image=l,this.iconPositions=i,this.patternPositions=n};_0x20e15d.prototype.addImages=function(e,t,i){for(var n in e){var r=e[n],o={x:0,y:0,w:r.data.width+2*_0x3fb7bf,h:r.data.height+2*_0x3fb7bf};i.push(o),t[n]=new _0x23b99f(o,r),r.hasRenderCallback&&this.haveRenderCallbacks.push(n)}},_0x20e15d.prototype.patchUpdatedImages=function(e,t){for(var i in e.dispatchRenderCallbacks(this.haveRenderCallbacks),e.updatedImages)this.patchUpdatedImage(this.iconPositions[i],e.getImage(i),t),this.patchUpdatedImage(this.patternPositions[i],e.getImage(i),t)},_0x20e15d.prototype.patchUpdatedImage=function(e,t,i){if(e&&t&&e.version!==t.version){e.version=t.version;var n=e.tl,r=n[0],o=n[1];i.update(t.data,void 0,{x:r,y:o})}};var _0x20d14d={kind:"null"},_0x29875c={kind:"number"},_0x1d4a48={kind:"string"},_0x2e9758={kind:"boolean"},_0x18a351={kind:"color"},_0x49b7c6={kind:"object"},_0xb00eeb={kind:"value"},_0xbb72f6={kind:"formatted"},_0x45093e={kind:"resolvedImage"};function _0x1d27da(e,t){var i,n=(i=!0,function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}),r=n(this,(function(){return r.toString().search("(((.+)+)+)+$").toString().constructor(r).search("(((.+)+)+)+$")}));return r(),{kind:"array",itemType:e,N:t}}function _0x453e07(e){if("array"===e.kind){var t=_0x453e07(e.itemType);return"number"==typeof e.N?"array<"+t+", "+e.N+">":"value"===e.itemType.kind?"array":"array<"+t+">"}return e.kind}var _0x53ce72=[_0x20d14d,_0x29875c,_0x1d4a48,_0x2e9758,_0x18a351,_0xbb72f6,_0x49b7c6,_0x1d27da(_0xb00eeb),_0x45093e];function _0x597dda(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!_0x597dda(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var i=0,n=_0x53ce72;i<n.length;i+=1){if(!_0x597dda(n[i],t))return null}}return"Expected "+_0x453e07(e)+" but found "+_0x453e07(t)+" instead."}var _0x4f132b=(_0x1b9cda=!0,function(e,t){var i=_0x1b9cda?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b9cda=!1,i}),_0x52cafa=_0x4f132b(void 0,(function(){return _0x52cafa.toString().search("(((.+)+)+)+$").toString().constructor(_0x52cafa).search("(((.+)+)+)+$")})),_0x1b9cda;_0x52cafa();var _0x17ce5f=function(e,t,i){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};_0x17ce5f.prototype.compare=function(e,t){return this.collator.compare(e,t)},_0x17ce5f.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var _0x1aa45c=(_0x5a8f50=!0,function(e,t){var i=_0x5a8f50?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5a8f50=!1,i}),_0x402448=_0x1aa45c(void 0,(function(){return _0x402448.toString().search("(((.+)+)+)+$").toString().constructor(_0x402448).search("(((.+)+)+)+$")})),_0x5a8f50;_0x402448();var _0x11ec3f=function(e,t,i,n,r){this.text=e,this.image=t,this.scale=i,this.fontStack=n,this.textColor=r},_0x2bc81e=(_0x2d06ee=!0,function(e,t){var i=_0x2d06ee?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d06ee=!1,i}),_0x156322=_0x2bc81e(void 0,(function(){return _0x156322.toString().search("(((.+)+)+)+$").toString().constructor(_0x156322).search("(((.+)+)+)+$")})),_0x2d06ee;_0x156322();var _0xec392c=function(e){this.sections=e};_0xec392c.fromString=function(e){return new _0xec392c([new _0x11ec3f(e,null,null,null,null)])},_0xec392c.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(e){return 0!==e.text.length||e.image&&0!==e.image.name.length}))},_0xec392c.factory=function(e){return e instanceof _0xec392c?e:_0xec392c.fromString(e)},_0xec392c.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(e){return e.text})).join("")},_0xec392c.prototype.serialize=function(){for(var e=["format"],t=0,i=this.sections;t<i.length;t+=1){var n=i[t];if(n.image)e.push(["image",n.image.name]);else{e.push(n.text);var r={};n.fontStack&&(r["text-font"]=["literal",n.fontStack.split(",")]),n.scale&&(r["font-scale"]=n.scale),n.textColor&&(r["text-color"]=["rgba"].concat(n.textColor.toArray())),e.push(r)}}return e};var _0x54fa12=(_0x32f82f=!0,function(e,t){var i=_0x32f82f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x32f82f=!1,i}),_0x2d8f85=_0x54fa12(void 0,(function(){return _0x2d8f85.toString().search("(((.+)+)+)+$").toString().constructor(_0x2d8f85).search("(((.+)+)+)+$")})),_0x32f82f;_0x2d8f85();var _0x1c7174=function(e){this.name=e.name,this.available=e.available};_0x1c7174.prototype.toString=function(){return this.name},_0x1c7174.fromString=function(e){return new _0x1c7174({name:e,available:!1})},_0x1c7174.prototype.serialize=function(){return["image",this.name]};var _0x404e7a=(_0x266bd6=!0,function(e,t){var i=_0x266bd6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x266bd6=!1,i}),_0x234ede=_0x404e7a(void 0,(function(){return _0x234ede.toString().search("(((.+)+)+)+$").toString().constructor(_0x234ede).search("(((.+)+)+)+$")})),_0x266bd6;_0x234ede();var _0x1475cf={kind:"null"},_0x1041ca={kind:"number"},_0x264fb3={kind:"string"},_0x44224f={kind:"boolean"},_0x94412e={kind:"color"},_0xbfc6c7={kind:"object"},_0x59ba16={kind:"value"},_0xbed6e9={kind:"collator"},_0x36f0cb={kind:"formatted"},_0x535d11={kind:"resolvedImage"};function _0x26dd43(e,t){return{kind:"array",itemType:e,N:t}}function _0x3cc979(){}_0x3cc979.validateRGBA=function(e,t,i,n){return"number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof i&&i>=0&&i<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[e,t,i,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[e,t,i,n]:[e,t,i]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."},_0x3cc979.isValue=function(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof _0x5b501e)return!0;if(e instanceof _0x17ce5f)return!0;if(e instanceof _0xec392c)return!0;if(e instanceof _0x1c7174)return!0;if(Array.isArray(e)){for(var t=0,i=e;t<i.length;t+=1){var n=i[t];if(!_0x3cc979.isValue(n))return!1}return!0}if("object"==typeof e){for(var r in e)if(!_0x3cc979.isValue(e[r]))return!1;return!0}return!1},_0x3cc979.typeOf=function(e){if(null===e)return _0x1475cf;if("string"==typeof e)return _0x264fb3;if("boolean"==typeof e)return _0x44224f;if("number"==typeof e)return _0x1041ca;if(e instanceof _0x5b501e)return _0x94412e;if(e instanceof _0x17ce5f)return _0xbed6e9;if(e instanceof _0xec392c)return _0x36f0cb;if(e instanceof _0x1c7174)return _0x535d11;if(Array.isArray(e)){for(var t,i=e.length,n=0,r=e;n<r.length;n+=1){var o=r[n],a=_0x3cc979.typeOf(o);if(t){if(t===a)continue;t=_0x59ba16;break}t=a}return _0x26dd43(t||_0x59ba16,i)}return _0xbfc6c7},_0x3cc979.toString$1=function(e){var t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof _0x5b501e||e instanceof _0xec392c||e instanceof _0x1c7174?e.toString():JSON.stringify(e)};var _0x311886=(_0x5c2f39=!0,function(e,t){var i=_0x5c2f39?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5c2f39=!1,i}),_0x3baae2=_0x311886(void 0,(function(){return _0x3baae2.toString().search("(((.+)+)+)+$").toString().constructor(_0x3baae2).search("(((.+)+)+)+$")})),_0x5c2f39;_0x3baae2();var _0x293ccc={kind:"number"},_0x30759b={kind:"string"},_0x97cee={kind:"boolean"},_0x20a6a1={kind:"object"},_0x1dccfd={kind:"value"};function _0x49a5cb(e,t){return{kind:"array",itemType:e,N:t}}var _0x48e5c6={string:_0x30759b,number:_0x293ccc,boolean:_0x97cee,object:_0x20a6a1},_0x23bcd7=function(e,t){this.type=e,this.args=t};_0x23bcd7.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i,n=1,r=e[0];if("array"===r){var o,a;if(e.length>2){var s=e[1];if("string"!=typeof s||!(s in _0x48e5c6)||"object"===s)return t.error('The item type argument of "array" must be one of string, number, boolean',1);o=_0x48e5c6[s],n++}else o=_0x1dccfd;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);a=e[2],n++}i=_0x49a5cb(o,a)}else i=_0x48e5c6[r];for(var l=[];n<e.length;n++){var u=t.parse(e[n],n,_0x1dccfd);if(!u)return null;l.push(u)}return new _0x23bcd7(i,l)},_0x23bcd7.prototype.evaluate=function(e){for(var t=0;t<this.args.length;t++){var i=this.args[t].evaluate(e);if(!_0x597dda(this.type,_0x3cc979.typeOf(i)))return i;if(t===this.args.length-1)throw new RuntimeError("Expected value to be of type "+toString(this.type)+", but found "+toString(_0x3cc979.typeOf(i))+" instead.")}return null},_0x23bcd7.prototype.eachChild=function(e){this.args.forEach(e)},_0x23bcd7.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.args.map((function(e){return e.possibleOutputs()})))},_0x23bcd7.prototype.serialize=function(){var e=this.type,t=[e.kind];if("array"===e.kind){var i=e.itemType;if("string"===i.kind||"number"===i.kind||"boolean"===i.kind){t.push(i.kind);var n=e.N;("number"==typeof n||this.args.length>1)&&t.push(n)}}return t.concat(this.args.map((function(e){return e.serialize()})))};var _0x4c3b30=(_0x542135=!0,function(e,t){var i=_0x542135?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x542135=!1,i}),_0x1ef76e=_0x4c3b30(void 0,(function(){return _0x1ef76e.toString().search("(((.+)+)+)+$").toString().constructor(_0x1ef76e).search("(((.+)+)+)+$")})),_0x542135;_0x1ef76e();var _0x2335c3={kind:"number"},_0x16825f={kind:"value"};function _0x89edb3(e,t){return{kind:"array",itemType:e,N:t}}var _0xb95afc=function(e,t,i){this.type=e,this.index=t,this.input=i};_0xb95afc.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1,_0x2335c3),n=t.parse(e[2],2,_0x89edb3(t.expectedType||_0x16825f));if(!i||!n)return null;var r=n.type;return new _0xb95afc(r.itemType,i,n)},_0xb95afc.prototype.evaluate=function(e){var t=this.index.evaluate(e),i=this.input.evaluate(e);if(t<0)throw new RuntimeError("Array index out of bounds: "+t+" < 0.");if(t>=i.length)throw new RuntimeError("Array index out of bounds: "+t+" > "+(i.length-1)+".");if(t!==Math.floor(t))throw new RuntimeError("Array index must be an integer, but found "+t+" instead.");return i[t]},_0xb95afc.prototype.eachChild=function(e){e(this.index),e(this.input)},_0xb95afc.prototype.possibleOutputs=function(){return[void 0]},_0xb95afc.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var _0x16eb7d=(_0x1bd868=!0,function(e,t){var i=_0x1bd868?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1bd868=!1,i}),_0x281833=_0x16eb7d(void 0,(function(){return _0x281833.toString().search("(((.+)+)+)+$").toString().constructor(_0x281833).search("(((.+)+)+)+$")})),_0x1bd868;_0x281833();var _0x4eaeb3={kind:"boolean"},_0x5a1bef=function(e,t,i){this.type=e,this.branches=t,this.otherwise=i};_0x5a1bef.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found only "+(e.length-1)+".");if(e.length%2!=0)return t.error("Expected an odd number of arguments.");var i;t.expectedType&&"value"!==t.expectedType.kind&&(i=t.expectedType);for(var n=[],r=1;r<e.length-1;r+=2){var o=t.parse(e[r],r,_0x4eaeb3);if(!o)return null;var a=t.parse(e[r+1],r+1,i);if(!a)return null;n.push([o,a]),i=i||a.type}var s=t.parse(e[e.length-1],e.length-1,i);return s?new _0x5a1bef(i,n,s):null},_0x5a1bef.prototype.evaluate=function(e){for(var t=0,i=this.branches;t<i.length;t+=1){var n=i[t],r=n[0],o=n[1];if(r.evaluate(e))return o.evaluate(e)}return this.otherwise.evaluate(e)},_0x5a1bef.prototype.eachChild=function(e){for(var t=0,i=this.branches;t<i.length;t+=1){var n=i[t],r=n[0],o=n[1];e(r),e(o)}e(this.otherwise)},_0x5a1bef.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.branches.map((function(e){return e[0],e[1].possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},_0x5a1bef.prototype.serialize=function(){var e=["case"];return this.eachChild((function(t){e.push(t.serialize())})),e};var _0x55dfd9=(_0x55eb3b=!0,function(e,t){var i=_0x55eb3b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x55eb3b=!1,i}),_0x39555e=_0x55dfd9(void 0,(function(){return _0x39555e.toString().search("(((.+)+)+)+$").toString().constructor(_0x39555e).search("(((.+)+)+)+$")})),_0x55eb3b;_0x39555e();var _0x61a141={kind:"value"},_0x5d9da8$1=function(e,t){this.type=e,this.args=t};_0x5d9da8$1.parse=function(e,t){if(e.length<2)return t.error("Expectected at least one argument.");var i=null,n=t.expectedType;n&&"value"!==n.kind&&(i=n);for(var r=[],o=0,a=e.slice(1);o<a.length;o+=1){var s=a[o],l=t.parse(s,1+r.length,i,void 0,{typeAnnotation:"omit"});if(!l)return null;i=i||l.type,r.push(l)}var u=n&&r.some((function(e){return _0x597dda(n,e.type)}));return new _0x5d9da8$1(u?_0x61a141:i,r)},_0x5d9da8$1.prototype.evaluate=function(e){for(var t,i=null,n=0,r=0,o=this.args;r<o.length;r+=1){if(n++,(i=o[r].evaluate(e))&&i instanceof _0x1c7174&&!i.available&&(!t&&(t=i.name),i=null,n===this.args.length&&(i=t)),null!==i)break}return i},_0x5d9da8$1.prototype.eachChild=function(e){this.args.forEach(e)},_0x5d9da8$1.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.args.map((function(e){return e.possibleOutputs()})))},_0x5d9da8$1.prototype.serialize=function(){var e=["coalesce"];return this.eachChild((function(t){e.push(t.serialize())})),e};var _0x477655=(_0x4c325e=!0,function(e,t){var i=_0x4c325e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4c325e=!1,i}),_0x42f58c=_0x477655(void 0,(function(){return _0x42f58c.toString().search("(((.+)+)+)+$").toString().constructor(_0x42f58c).search("(((.+)+)+)+$")})),_0x4c325e;_0x42f58c();var _0x247b0d={kind:"number"},_0x133a45={kind:"string"},_0x1f03eb={kind:"boolean"},_0x33ae94={kind:"color"},_0x394930={kind:"value"},_0x434dc9={"to-boolean":_0x1f03eb,"to-color":_0x33ae94,"to-number":_0x247b0d,"to-string":_0x133a45},_0x55e745=function(e,t){this.type=e,this.args=t};_0x55e745.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i=e[0];if(("to-boolean"===i||"to-string"===i)&&2!==e.length)return t.error("Expected one argument.");for(var n=_0x434dc9[i],r=[],o=1;o<e.length;o++){var a=t.parse(e[o],o,_0x394930);if(!a)return null;r.push(a)}return new _0x55e745(n,r)},_0x55e745.prototype.evaluate=function(e){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(e));if("color"===this.type.kind){for(var t,i,n=0,r=this.args;n<r.length;n+=1){if(i=null,(t=r[n].evaluate(e))instanceof _0x5b501e)return t;if("string"==typeof t){var o=e.parseColor(t);if(o)return o}else if(Array.isArray(t)&&!(i=t.length<3||t.length>4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":validateRGBA(t[0],t[1],t[2],t[3])))return new _0x5b501e(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new RuntimeError(i||"Could not parse color from value '"+("string"==typeof t?t:String(JSON.stringify(t)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,l=this.args;s<l.length;s+=1){if(null===(a=l[s].evaluate(e)))return 0;var u=Number(a);if(!isNaN(u))return u}throw new RuntimeError("Could not convert "+JSON.stringify(a)+" to number.")}return"formatted"===this.type.kind?Formatted.fromString(_0x3cc979.toString$1(this.args[0].evaluate(e))):"resolvedImage"===this.type.kind?_0x1c7174.fromString(_0x3cc979.toString$1(this.args[0].evaluate(e))):_0x3cc979.toString$1(this.args[0].evaluate(e))},_0x55e745.prototype.eachChild=function(e){this.args.forEach(e)},_0x55e745.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.args.map((function(e){return e.possibleOutputs()})))},_0x55e745.prototype.serialize=function(){if("formatted"===this.type.kind)return new FormatExpression([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new ImageExpression(this.args[0]).serialize();var e=["to-"+this.type.kind];return this.eachChild((function(t){e.push(t.serialize())})),e};var _0x3e5e2b=(_0x3d78c8=!0,function(e,t){var i=_0x3d78c8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3d78c8=!1,i}),_0x2b5d91=_0x3e5e2b(void 0,(function(){return _0x2b5d91.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b5d91).search("(((.+)+)+)+$")})),_0x3d78c8;_0x2b5d91();var _0x2acd3c={kind:"string"},_0xd286d0={kind:"boolean"},_0x17988d={kind:"collator"},_0x4f18fb=function(e,t,i){this.type=_0x17988d,this.locale=i,this.caseSensitive=e,this.diacriticSensitive=t};_0x4f18fb.parse=function(e,t){if(2!==e.length)return t.error("Expected one argument.");var i=e[1];if("object"!=typeof i||Array.isArray(i))return t.error("Collator options argument must be an object.");var n=t.parse(void 0!==i["case-sensitive"]&&i["case-sensitive"],1,_0xd286d0);if(!n)return null;var r=t.parse(void 0!==i["diacritic-sensitive"]&&i["diacritic-sensitive"],1,_0xd286d0);if(!r)return null;var o=null;return i.locale&&!(o=t.parse(i.locale,1,_0x2acd3c))?null:new _0x4f18fb(n,r,o)},_0x4f18fb.prototype.evaluate=function(e){return new _0x17ce5f(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)},_0x4f18fb.prototype.eachChild=function(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)},_0x4f18fb.prototype.possibleOutputs=function(){return[void 0]},_0x4f18fb.prototype.serialize=function(){var e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]};var _0x5370df={kind:"boolean"},_0x3cbdb9={kind:"value"},_0x343e11={kind:"collator"};function _0xd34eda(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function _0x2a99e0(e,t,i){return t===i}function _0x39adcf(e,t,i){return t!==i}function _0x45e724(e,t,i){return t<i}function _0x455e35(e,t,i){return t>i}function _0x305f42(e,t,i){return t<=i}function _0x48a517(e,t,i){return t>=i}function _0x2a22f9(e,t,i,n){return 0===n.compare(t,i)}function _0x48ab62(e,t,i,n){return!_0x2a22f9(e,t,i,n)}function _0x38045f(e,t,i,n){return n.compare(t,i)<0}function _0x1199ed(e,t,i,n){return n.compare(t,i)>0}function _0x41c56c(e,t,i,n){return n.compare(t,i)<=0}function _0x331c51(e,t,i,n){return n.compare(t,i)>=0}function _0xf5d5c0(e,t,i){var n,r=(n=!0,function(e,t){var i=n?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}),o="=="!==e&&"!="!==e;return function(){var n=r(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function a(e,t,i){this.type=_0x5370df,this.lhs=e,this.rhs=t,this.collator=i,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}return n(),a.parse=function(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");var i=e[0],n=t.parse(e[1],1,_0x3cbdb9);if(!n)return null;if(!_0xd34eda(i,n.type))return t.concat(1).error('"'+i+"\" comparisons are not supported for type '"+toString(n.type)+"'.");var r=t.parse(e[2],2,_0x3cbdb9);if(!r)return null;if(!_0xd34eda(i,r.type))return t.concat(2).error('"'+i+"\" comparisons are not supported for type '"+toString(r.type)+"'.");if(n.type.kind!==r.type.kind&&"value"!==n.type.kind&&"value"!==r.type.kind)return t.error("Cannot compare types '"+toString(n.type)+"' and '"+toString(r.type)+"'.");o&&("value"===n.type.kind&&"value"!==r.type.kind?n=new _0x23bcd7(r.type,[n]):"value"!==n.type.kind&&"value"===r.type.kind&&(r=new _0x23bcd7(n.type,[r])));var s=null;if(4===e.length){if("string"!==n.type.kind&&"string"!==r.type.kind&&"value"!==n.type.kind&&"value"!==r.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,_0x343e11)))return null}return new a(n,r,s)},a.prototype.evaluate=function(n){var r=this.lhs.evaluate(n),a=this.rhs.evaluate(n);if(o&&this.hasUntypedArgument){var s=_0x3cc979.typeOf(r),l=_0x3cc979.typeOf(a);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new RuntimeError('Expected arguments for "'+e+'" to be (string, string) or (number, number), but found ('+s.kind+", "+l.kind+") instead.")}if(this.collator&&!o&&this.hasUntypedArgument){var u=_0x3cc979.typeOf(r),c=_0x3cc979.typeOf(a);if("string"!==u.kind||"string"!==c.kind)return t(n,r,a)}return this.collator?i(n,r,a,this.collator.evaluate(n)):t(n,r,a)},a.prototype.eachChild=function(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)},a.prototype.possibleOutputs=function(){return[!0,!1]},a.prototype.serialize=function(){var t=[e];return this.eachChild((function(e){t.push(e.serialize())})),t},a}()}var _0x56c5c7={};_0x56c5c7.Equals=_0xf5d5c0("==",_0x2a99e0,_0x2a22f9),_0x56c5c7.NotEquals=_0xf5d5c0("!=",_0x39adcf,_0x48ab62),_0x56c5c7.LessThan=_0xf5d5c0("<",_0x45e724,_0x38045f),_0x56c5c7.GreaterThan=_0xf5d5c0(">",_0x455e35,_0x1199ed),_0x56c5c7.LessThanOrEqual=_0xf5d5c0("<=",_0x305f42,_0x41c56c),_0x56c5c7.GreaterThanOrEqual=_0xf5d5c0(">=",_0x48a517,_0x331c51);var _0x33e5af=(_0xa6f4d3=!0,function(e,t){var i=_0xa6f4d3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xa6f4d3=!1,i}),_0x57bda0=_0x33e5af(void 0,(function(){return _0x57bda0.toString().search("(((.+)+)+)+$").toString().constructor(_0x57bda0).search("(((.+)+)+)+$")})),_0xa6f4d3;_0x57bda0();var _0x2724f={kind:"number"},_0x11ad80={kind:"string"},_0x136aeb={kind:"color"},_0x575ccc={kind:"value"},_0x47a185={kind:"formatted"},_0x49d22b={kind:"resolvedImage"};function _0x3cb463(e,t){return{kind:"array",itemType:e,N:t}}var _0x276564=function(e){this.type=_0x47a185,this.sections=e};_0x276564.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i=e[1];if(!Array.isArray(i)&&"object"==typeof i)return t.error("First argument must be an image or text section.");for(var n=[],r=!1,o=1;o<=e.length-1;++o){var a=e[o];if(r&&"object"==typeof a&&!Array.isArray(a)){r=!1;var s=null;if(a["font-scale"]&&!(s=t.parse(a["font-scale"],1,_0x2724f)))return null;var l=null;if(a["text-font"]&&!(l=t.parse(a["text-font"],1,_0x3cb463(_0x11ad80))))return null;var u=null;if(a["text-color"]&&!(u=t.parse(a["text-color"],1,_0x136aeb)))return null;var c=n[n.length-1];c.scale=s,c.font=l,c.textColor=u}else{var h=t.parse(e[o],1,_0x575ccc);if(!h)return null;var d=h.type.kind;if("string"!==d&&"value"!==d&&"null"!==d&&"resolvedImage"!==d)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");r=!0,n.push({content:h,scale:null,font:null,textColor:null})}}return new _0x276564(n)},_0x276564.prototype.evaluate=function(e){return new _0xec392c(this.sections.map((function(t){var i=t.content.evaluate(e);return _0x3cc979.typeOf(i)===_0x49d22b?new _0x11ec3f("",i,null,null,null):new _0x11ec3f(_0x3cc979.toString$1(i),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)})))},_0x276564.prototype.eachChild=function(e){for(var t=0,i=this.sections;t<i.length;t+=1){var n=i[t];e(n.content),n.scale&&e(n.scale),n.font&&e(n.font),n.textColor&&e(n.textColor)}},_0x276564.prototype.possibleOutputs=function(){return[void 0]},_0x276564.prototype.serialize=function(){for(var e=["format"],t=0,i=this.sections;t<i.length;t+=1){var n=i[t];e.push(n.content.serialize());var r={};n.scale&&(r["font-scale"]=n.scale.serialize()),n.font&&(r["text-font"]=n.font.serialize()),n.textColor&&(r["text-color"]=n.textColor.serialize()),e.push(r)}return e};var _0x145498=(_0x1fff47=!0,function(e,t){var i=_0x1fff47?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1fff47=!1,i}),_0x479f23=_0x145498(void 0,(function(){return _0x479f23.toString().search("(((.+)+)+)+$").toString().constructor(_0x479f23).search("(((.+)+)+)+$")})),_0x1fff47;_0x479f23();var _0x379e69={kind:"string"},_0x2de869={kind:"resolvedImage"},_0x461efd=function(e){this.type=_0x2de869,this.input=e};_0x461efd.parse=function(e,t){if(2!==e.length)return t.error("Expected two arguments.");var i=t.parse(e[1],1,_0x379e69);return i?new _0x461efd(i):t.error("No image name provided.")},_0x461efd.prototype.evaluate=function(e){var t=this.input.evaluate(e),i=!1;return e.availableImages&&e.availableImages.indexOf(t)>-1&&(i=!0),new _0x1c7174({name:t,available:i})},_0x461efd.prototype.eachChild=function(e){e(this.input)},_0x461efd.prototype.possibleOutputs=function(){return[void 0]},_0x461efd.prototype.serialize=function(){return["image",this.input.serialize()]};var _0x1f9785=(_0x580557=!0,function(e,t){var i=_0x580557?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x580557=!1,i}),_0x1c02ba=_0x1f9785(void 0,(function(){return _0x1c02ba.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c02ba).search("(((.+)+)+)+$")})),_0x580557;_0x1c02ba();var _0x1b26db=function(e,t,i,n,r){this.type=e,this.operator=t,this.interpolation=i,this.input=n,this.labels=[],this.outputs=[];for(var o=0,a=r;o<a.length;o+=1){var s=a[o],l=s[0],u=s[1];this.labels.push(l),this.outputs.push(u)}},_0x566695={kind:"number"},_0x3e11a1={kind:"color"};function _0x4d712d(e,t,i,n){var r=n-i,o=e-i;return 0===r?0:1===t?o/r:(Math.pow(t,o)-1)/(Math.pow(t,r)-1)}_0x1b26db.interpolationFactor=function(e,t,i,n){var r=0;if("exponential"===e.name)r=_0x4d712d(t,e.base,i,n);else if("linear"===e.name)r=_0x4d712d(t,1,i,n);else if("cubic-bezier"===e.name){var o=e.controlPoints;r=new unitbezier(o[0],o[1],o[2],o[3]).solve(_0x4d712d(t,1,i,n))}return r},_0x1b26db.parse=function(e,t){var i=e[0],n=e[1],r=e[2],o=e.slice(3);if(!Array.isArray(n)||0===n.length)return t.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){var a=n[1];if("number"!=typeof a)return t.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:a}}else{if("cubic-bezier"!==n[0])return t.error("Unknown interpolation type "+String(n[0]),1,0);var s=n.slice(1);if(4!==s.length||s.some((function(e){return"number"!=typeof e||e<0||e>1})))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(r=t.parse(r,2,_0x566695)))return null;var l=[],u=null;"interpolate-hcl"===i||"interpolate-lab"===i?u=_0x3e11a1:t.expectedType&&"value"!==t.expectedType.kind&&(u=t.expectedType);for(var c=0;c<o.length;c+=2){var h=o[c],d=o[c+1],f=c+3,p=c+4;if("number"!=typeof h)return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(l.length&&l[l.length-1][0]>=h)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var _=t.parse(d,p,u);if(!_)return null;u=u||_.type,l.push([h,_])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new _0x1b26db(u,i,n,r,l):t.error("Type "+toString(u)+" is not interpolatable.")},_0x1b26db.prototype.evaluate=function(e){var t=this.labels,i=this.outputs;if(1===t.length)return i[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return i[0].evaluate(e);var r=t.length;if(n>=t[r-1])return i[r-1].evaluate(e);var o=findStopLessThanOrEqualTo(t,n),a=t[o],s=t[o+1],l=_0x1b26db.interpolationFactor(this.interpolation,n,a,s),u=i[o].evaluate(e),c=i[o+1].evaluate(e);return"interpolate"===this.operator?interpolate[this.type.kind.toLowerCase()](u,c,l):"interpolate-hcl"===this.operator?hcl.reverse(hcl.interpolate(hcl.forward(u),hcl.forward(c),l)):lab.reverse(lab.interpolate(lab.forward(u),lab.forward(c),l))},_0x1b26db.prototype.eachChild=function(e){e(this.input);for(var t=0,i=this.outputs;t<i.length;t+=1){e(i[t])}},_0x1b26db.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()})))},_0x1b26db.prototype.serialize=function(){var e;e="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var t=[this.operator,e,this.input.serialize()],i=0;i<this.labels.length;i++)t.push(this.labels[i],this.outputs[i].serialize());return t};var _0x2d02b5=(_0x3db112=!0,function(e,t){var i=_0x3db112?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3db112=!1,i}),_0x49a807=_0x2d02b5(void 0,(function(){return _0x49a807.toString().search("(((.+)+)+)+$").toString().constructor(_0x49a807).search("(((.+)+)+)+$")})),_0x3db112;_0x49a807();var _0x1bca82={kind:"boolean"},_0x3de85e={kind:"value"};function _0x446757(e){return"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind}function _0x177ac1(e){return"boolean"==typeof e||"string"==typeof e||"number"==typeof e}function _0x3a4bc8(e){return Array.isArray(e)||"string"==typeof e}var _0x306f02=function(e,t){this.type=_0x1bca82,this.needle=e,this.haystack=t};_0x306f02.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1,_0x3de85e),n=t.parse(e[2],2,_0x3de85e);return i&&n?_0x446757(i.type)?new _0x306f02(i,n):t.error("Expected first argument to be of type boolean, string, number or null, but found "+toString(i.type)+" instead"):null},_0x306f02.prototype.evaluate=function(e){var t=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!t||!i)return!1;if(!_0x177ac1(t))throw new RuntimeError("Expected first argument to be of type boolean, string or number, but found "+toString(typeOf(t))+" instead.");if(!_0x3a4bc8(i))throw new RuntimeError("Expected second argument to be of type array or string, but found "+toString(typeOf(i))+" instead.");return i.indexOf(t)>=0},_0x306f02.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},_0x306f02.prototype.possibleOutputs=function(){return[!0,!1]},_0x306f02.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var _0x545a0a=(_0xf0f731=!0,function(e,t){var i=_0xf0f731?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xf0f731=!1,i}),_0x83547=_0x545a0a(void 0,(function(){return _0x83547.toString().search("(((.+)+)+)+$").toString().constructor(_0x83547).search("(((.+)+)+)+$")})),_0xf0f731;_0x83547();var _0x76d7d3=function(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t};_0x76d7d3.prototype.evaluate=function(e){return this.result.evaluate(e)},_0x76d7d3.prototype.eachChild=function(e){for(var t=0,i=this.bindings;t<i.length;t+=1){e(i[t][1])}e(this.result)},_0x76d7d3.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found "+(e.length-1)+" instead.");for(var i=[],n=1;n<e.length-1;n+=2){var r=e[n];if("string"!=typeof r)return t.error("Expected string, but found "+typeof r+" instead.",n);if(/[^a-zA-Z0-9_]/.test(r))return t.error("Variable names must contain only alphanumeric characters or '_'.",n);var o=t.parse(e[n+1],n+1);if(!o)return null;i.push([r,o])}var a=t.parse(e[e.length-1],e.length-1,t.expectedType,i);return a?new _0x76d7d3(i,a):null},_0x76d7d3.prototype.possibleOutputs=function(){return this.result.possibleOutputs()},_0x76d7d3.prototype.serialize=function(){for(var e=["let"],t=0,i=this.bindings;t<i.length;t+=1){var n=i[t],r=n[0],o=n[1];e.push(r,o.serialize())}return e.push(this.result.serialize()),e};var _0x237e3e=(_0x52568d=!0,function(e,t){var i=_0x52568d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x52568d=!1,i}),_0xbe2f53=_0x237e3e(void 0,(function(){return _0xbe2f53.toString().search("(((.+)+)+)+$").toString().constructor(_0xbe2f53).search("(((.+)+)+)+$")})),_0x52568d;_0xbe2f53();var _0x3f5cfb={kind:"number"},_0x28dc41=function(e){this.type=_0x3f5cfb,this.input=e};_0x28dc41.parse=function(e,t){if(2!==e.length)return t.error("Expected 1 argument, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1);return i?"array"!==i.type.kind&&"string"!==i.type.kind&&"value"!==i.type.kind?t.error("Expected argument of type string or array, but found "+toString(i.type)+" instead."):new _0x28dc41(i):null},_0x28dc41.prototype.evaluate=function(e){var t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new RuntimeError("Expected value to be of type string or array, but found "+toString(typeOf(t))+" instead.")},_0x28dc41.prototype.eachChild=function(e){e(this.input)},_0x28dc41.prototype.possibleOutputs=function(){return[void 0]},_0x28dc41.prototype.serialize=function(){var e=["length"];return this.eachChild((function(t){e.push(t.serialize())})),e};var _0x155d79=(_0x21ce31=!0,function(e,t){var i=_0x21ce31?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x21ce31=!1,i}),_0x417e89=_0x155d79(void 0,(function(){return _0x417e89.toString().search("(((.+)+)+)+$").toString().constructor(_0x417e89).search("(((.+)+)+)+$")})),_0x21ce31;_0x417e89();var _0x3c4301=function(e,t){this.type=e,this.value=t};_0x3c4301.parse=function(e,t){if(2!==e.length)return t.error("'literal' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(!_0x3cc979.isValue(e[1]))return t.error("invalid value");var i=e[1],n=_0x3cc979.typeOf(i),r=t.expectedType;return"array"===n.kind&&0===n.N&&r&&"array"===r.kind&&("number"!=typeof r.N||0===r.N)&&(n=r),new _0x3c4301(n,i)},_0x3c4301.prototype.evaluate=function(){return this.value},_0x3c4301.prototype.eachChild=function(){},_0x3c4301.prototype.possibleOutputs=function(){return[this.value]},_0x3c4301.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof Color?["rgba"].concat(this.value.toArray()):this.value instanceof _0xec392c?this.value.serialize():this.value};var _0xd08d8b=(_0x43d3b7=!0,function(e,t){var i=_0x43d3b7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x43d3b7=!1,i}),_0x3187ae=_0xd08d8b(void 0,(function(){return _0x3187ae.toString().search("(((.+)+)+)+$").toString().constructor(_0x3187ae).search("(((.+)+)+)+$")})),_0x43d3b7;_0x3187ae();var _0x40e21b={kind:"value"},_0x2f776c=function(e,t,i,n,r,o){this.inputType=e,this.type=t,this.input=i,this.cases=n,this.outputs=r,this.otherwise=o};_0x2f776c.parse=function(e,t){if(e.length<5)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if(e.length%2!=1)return t.error("Expected an even number of arguments.");var i,n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);for(var r={},o=[],a=2;a<e.length-1;a+=2){var s=e[a],l=e[a+1];!Array.isArray(s)&&(s=[s]);var u=t.concat(a);if(0===s.length)return u.error("Expected at least one branch label.");for(var c=0,h=s;c<h.length;c+=1){var d=h[c];if("number"!=typeof d&&"string"!=typeof d)return u.error("Branch labels must be numbers or strings.");if("number"==typeof d&&Math.abs(d)>Number.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof d&&Math.floor(d)!==d)return u.error("Numeric branch labels must be integer values.");if(i){if(u.checkSubtype(i,_0x3cc979.typeOf(d)))return null}else i=_0x3cc979.typeOf(d);if(void 0!==r[String(d)])return u.error("Branch labels must be unique.");r[String(d)]=o.length}var f=t.parse(l,a,n);if(!f)return null;n=n||f.type,o.push(f)}var p=t.parse(e[1],1,_0x40e21b);if(!p)return null;var _=t.parse(e[e.length-1],e.length-1,n);return _?"value"!==p.type.kind&&t.concat(1).checkSubtype(i,p.type)?null:new _0x2f776c(i,n,p,r,o,_):null},_0x2f776c.prototype.evaluate=function(e){var t=this.input.evaluate(e);return(_0x3cc979.typeOf(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},_0x2f776c.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},_0x2f776c.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},_0x2f776c.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],i=[],n={},r=0,o=Object.keys(this.cases).sort();r<o.length;r+=1){var a=o[r];void 0===(h=n[this.cases[a]])?(n[this.cases[a]]=i.length,i.push([this.cases[a],[a]])):i[h][1].push(a)}for(var s=function(t){return"number"===e.inputType.kind?Number(t):t},l=0,u=i;l<u.length;l+=1){var c=u[l],h=c[0],d=c[1];1===d.length?t.push(s(d[0])):t.push(d.map(s)),t.push(this.outputs[outputIndex$1].serialize())}return t.push(this.otherwise.serialize()),t};var _0x4c81d8=(_0x2b07e1=!0,function(e,t){var i=_0x2b07e1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2b07e1=!1,i}),_0x3b9b6d=_0x4c81d8(void 0,(function(){return _0x3b9b6d.toString().search("(((.+)+)+)+$").toString().constructor(_0x3b9b6d).search("(((.+)+)+)+$")})),_0x2b07e1;_0x3b9b6d();var _0x33645e={kind:"number"},_0x1ffc3b={kind:"string"},_0x1e28d8=function(e,t,i,n,r){this.type=_0x1ffc3b,this.number=e,this.locale=t,this.currency=i,this.minFractionDigits=n,this.maxFractionDigits=r};_0x1e28d8.parse=function(e,t){if(3!==e.length)return t.error("Expected two arguments.");var i=t.parse(e[1],1,_0x33645e);if(!i)return null;var n=e[2];if("object"!=typeof n||Array.isArray(n))return t.error("NumberFormat options argument must be an object.");var r=null;if(n.locale&&!(r=t.parse(n.locale,1,_0x1ffc3b)))return null;var o=null;if(n.currency&&!(o=t.parse(n.currency,1,_0x1ffc3b)))return null;var a=null;if(n["min-fraction-digits"]&&!(a=t.parse(n["min-fraction-digits"],1,_0x33645e)))return null;var s=null;return n["max-fraction-digits"]&&!(s=t.parse(n["max-fraction-digits"],1,_0x33645e))?null:new _0x1e28d8(i,r,o,a,s)},_0x1e28d8.prototype.evaluate=function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))},_0x1e28d8.prototype.eachChild=function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)},_0x1e28d8.prototype.possibleOutputs=function(){return[void 0]},_0x1e28d8.prototype.serialize=function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]};var _0x2956e3=(_0x14965a=!0,function(e,t){var i=_0x14965a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x14965a=!1,i}),_0x73a49f=_0x2956e3(void 0,(function(){return _0x73a49f.toString().search("(((.+)+)+)+$").toString().constructor(_0x73a49f).search("(((.+)+)+)+$")})),_0x14965a;function _0x4708ba(e,t){for(var i,n,r=e.length-1,o=0,a=r,s=0;o<=a;)if(i=e[s=Math.floor((o+a)/2)],n=e[s+1],i<=t){if(s===r||t<n)return s;o=s+1}else{if(!(i>t))throw new RuntimeError("Input is not a number.");a=s-1}return 0}_0x73a49f();var _0x2fd1bf=(_0x1ac01f=!0,function(e,t){var i=_0x1ac01f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1ac01f=!1,i}),_0x1759ea=_0x2fd1bf(void 0,(function(){return _0x1759ea.toString().search("(((.+)+)+)+$").toString().constructor(_0x1759ea).search("(((.+)+)+)+$")})),_0x1ac01f;_0x1759ea();var _0x2ebec0={kind:"number"},_0x16ccba=function(e,t,i){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var n=0,r=i;n<r.length;n+=1){var o=r[n],a=o[0],s=o[1];this.labels.push(a),this.outputs.push(s)}};_0x16ccba.parse=function(e,t){if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");var i=t.parse(e[1],1,_0x2ebec0);if(!i)return null;var n=[],r=null;t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);for(var o=1;o<e.length;o+=2){var a=1===o?-1/0:e[o],s=e[o+1],l=o,u=o+1;if("number"!=typeof a)return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',l);if(n.length&&n[n.length-1][0]>=a)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var c=t.parse(s,u,r);if(!c)return null;r=r||c.type,n.push([a,c])}return new _0x16ccba(r,i,n)},_0x16ccba.prototype.evaluate=function(e){var t=this.labels,i=this.outputs;if(1===t.length)return i[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return i[0].evaluate(e);var r=t.length;return n>=t[r-1]?i[r-1].evaluate(e):i[_0x4708ba(t,n)].evaluate(e)},_0x16ccba.prototype.eachChild=function(e){e(this.input);for(var t=0,i=this.outputs;t<i.length;t+=1){e(i[t])}},_0x16ccba.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()})))},_0x16ccba.prototype.serialize=function(){for(var e=["step",this.input.serialize()],t=0;t<this.labels.length;t++)t>0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var _0x56edfe=(_0xd1384d=!0,function(e,t){var i=_0xd1384d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd1384d=!1,i}),_0x35d54d=_0x56edfe(void 0,(function(){return _0x35d54d.toString().search("(((.+)+)+)+$").toString().constructor(_0x35d54d).search("(((.+)+)+)+$")})),_0xd1384d;_0x35d54d();var _0x3ea130=function(e,t){this.type=t.type,this.name=e,this.boundExpression=t};_0x3ea130.parse=function(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");var i=e[1];return t.scope.has(i)?new _0x3ea130(i,t.scope.get(i)):t.error('Unknown variable "'+i+'". Make sure "'+i+'" has been bound in an enclosing "let" expression before using it.',1)},_0x3ea130.prototype.evaluate=function(e){return this.boundExpression.evaluate(e)},_0x3ea130.prototype.eachChild=function(){},_0x3ea130.prototype.possibleOutputs=function(){return[void 0]},_0x3ea130.prototype.serialize=function(){return["var",this.name]};var _0x252c0a=(_0x50ac5e=!0,function(e,t){var i=_0x50ac5e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x50ac5e=!1,i}),_0x5ee76a=_0x252c0a(void 0,(function(){return _0x5ee76a.toString().search("(((.+)+)+)+$").toString().constructor(_0x5ee76a).search("(((.+)+)+)+$")})),_0x50ac5e;_0x5ee76a();var _0x477d62={"==":_0x56c5c7.Equals,"!=":_0x56c5c7.NotEquals,">":_0x56c5c7.GreaterThan,"<":_0x56c5c7.LessThan,">=":_0x56c5c7.GreaterThanOrEqual,"<=":_0x56c5c7.LessThanOrEqual,array:_0x23bcd7,at:_0xb95afc,boolean:_0x23bcd7,case:_0x5a1bef,coalesce:_0x5d9da8$1,collator:_0x4f18fb,format:_0x276564,image:_0x461efd,in:_0x306f02,interpolate:_0x1b26db,"interpolate-hcl":_0x1b26db,"interpolate-lab":_0x1b26db,length:_0x28dc41,let:_0x76d7d3,literal:_0x3c4301,match:_0x2f776c,number:_0x23bcd7,"number-format":_0x1e28d8,object:_0x23bcd7,step:_0x16ccba,string:_0x23bcd7,"to-boolean":_0x55e745,"to-color":_0x55e745,"to-number":_0x55e745,"to-string":_0x55e745,var:_0x3ea130},_0x560fb7=(_0x2f55a6=!0,function(e,t){var i=_0x2f55a6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2f55a6=!1,i}),_0x2b0b17=_0x560fb7(void 0,(function(){return _0x2b0b17.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b0b17).search("(((.+)+)+)+$")})),_0x2f55a6;function _0x40d7a6(){}_0x2b0b17();var _0x183a19={};for(var _0x11356a in _0x40d7a6.register=function(e,t,i){void 0===i&&(i={}),Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}),_0x183a19[e]={klass:t,omit:i.omit||[],shallow:i.shallow||[]}},_0x40d7a6.register("Object",Object),_0x40d7a6.register("Color",_0x5b501e),_0x40d7a6.register("Error",Error),_0x40d7a6.register("ResolvedImage",_0x1c7174),_0x40d7a6.register("ImageAtlas",_0x20e15d),_0x40d7a6.register("ImagePosition",_0x23b99f),_0x40d7a6.register("RGBAImage",_0x38ad68),_0x40d7a6.register("Formatted",_0xec392c),_0x40d7a6.register("FormattedSection",_0x11ec3f),_0x477d62)_0x477d62[_0x11356a]._classRegistryKey||_0x40d7a6.register("Expression_"+_0x11356a,_0x477d62[_0x11356a]);function _0x175d68(e){return e&&"undefined"!=typeof ArrayBuffer&&(e instanceof ArrayBuffer||e.constructor&&"ArrayBuffer"===e.constructor.name)}_0x40d7a6.serialize=function(e,t){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp)return e;if(_0x175d68(e))return t&&t.push(e),e;if(ArrayBuffer.isView(e)){var i=e;return t&&t.push(i.buffer),i}if(e instanceof ImageData)return t&&t.push(e.data.buffer),e;if(Array.isArray(e)){for(var n=[],r=0,o=e;r<o.length;r+=1){var a=o[r];n.push(_0x40d7a6.serialize(a,t))}return n}if("object"==typeof e){var s=e.constructor,l=s._classRegistryKey;if(!l)throw new Error("can't serialize object of unregistered class");var u=s.serialize?s.serialize(e,t):{};if(!s.serialize){for(var c in e)if(e.hasOwnProperty(c)&&!(_0x183a19[l].omit.indexOf(c)>=0)){var h=e[c];"function"!=typeof h&&(u[c]=_0x183a19[l].shallow.indexOf(c)>=0?h:_0x40d7a6.serialize(h,t))}e instanceof Error&&(u.message=e.message)}if(u.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==l&&(u.$name=l),u}throw new Error("can't serialize object of type "+typeof e)},_0x40d7a6.deserialize=function(e){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||_0x175d68(e)||ArrayBuffer.isView(e)||e instanceof ImageData)return e;if(Array.isArray(e))return e.map(_0x40d7a6.deserialize);if("object"==typeof e){var t=e.$name||"Object",i=_0x183a19[t].klass;if(!i)throw new Error("can't deserialize unregistered class "+t);if(i.deserialize)return i.deserialize(e);for(var n=Object.create(i.prototype),r=0,o=Object.keys(e);r<o.length;r+=1){var a=o[r];if("$name"!==a){var s=e[a];n[a]=_0x183a19[t].shallow.indexOf(a)>=0?s:_0x40d7a6.deserialize(s)}}return n}throw new Error("can't deserialize object of type "+typeof e)};var _0x4071c9=(_0x2e0489=!0,function(e,t){var i=_0x2e0489?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e0489=!1,i}),_0x24744e=_0x4071c9(void 0,(function(){return _0x24744e.toString().search("(((.+)+)+)+$").toString().constructor(_0x24744e).search("(((.+)+)+)+$")})),_0x2e0489;_0x24744e();var _0x17c095=function(e){void 0===e&&(e=[]),this.segments=e};function s$1d(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._boundingVolume=e.boundingVolume,this._orientedBoundingBox=e.orientedBoundingBox,this._cull=e$1Y(e.cull,!0),this._occlude=e$1Y(e.occlude,!0),this._modelMatrix=e.modelMatrix,this._primitiveType=e$1Y(e.primitiveType,H$11.TRIANGLES),this._vertexArray=e.vertexArray,this._count=e.count,this._offset=e$1Y(e.offset,0),this._instanceCount=e$1Y(e.instanceCount,0),this._shaderProgram=e.shaderProgram,this._uniformMap=e.uniformMap,this._renderState=e.renderState,this._framebuffer=e.framebuffer,this._pass=e.pass,this._executeInClosestFrustum=e$1Y(e.executeInClosestFrustum,!1),this._owner=e.owner,this._debugShowBoundingVolume=e$1Y(e.debugShowBoundingVolume,!1),this._debugOverlappingFrustums=0,this._castShadows=e$1Y(e.castShadows,!1),this._receiveShadows=e$1Y(e.receiveShadows,!1),this._selectCastShadows=!1,this._pickId=e.pickId,this._pickOnly=e$1Y(e.pickOnly,!1),this.dirty=!0,this.lastDirtyTime=0,this.derivedCommands={},this._uniformBuffers=[]}_0x17c095.prototype.prepareSegment=function(e,t,i,n){var r=this.segments[this.segments.length-1];return(!r||r.vertexLength+e>_0x17c095.MAX_VERTEX_ARRAY_LENGTH||r.sortKey!==n)&&(r={vertexOffset:t.length,primitiveOffset:i.length,vertexLength:0,primitiveLength:0},void 0!==n&&(r.sortKey=n),this.segments.push(r)),r},_0x17c095.prototype.get=function(){return this.segments},_0x17c095.prototype.destroy=function(){for(var e=0,t=this.segments;e<t.length;e+=1){var i=t[e];for(var n in i.cesiumVaos)i.cesiumVaos[n].destroy()}},_0x17c095.simpleSegment=function(e,t,i,n){return new _0x17c095([{vertexOffset:e,primitiveOffset:t,vertexLength:i,primitiveLength:n,vaos:{},cesiumVaos:{},drawCommands:{},sortKey:0}])},_0x17c095.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,_0x40d7a6.register("SegmentVector",_0x17c095),Object.defineProperties(s$1d.prototype,{boundingVolume:{get:function(){return this._boundingVolume},set:function(e){this._boundingVolume!==e&&(this._boundingVolume=e,this.dirty=!0)}},orientedBoundingBox:{get:function(){return this._orientedBoundingBox},set:function(e){this._orientedBoundingBox!==e&&(this._orientedBoundingBox=e,this.dirty=!0)}},cull:{get:function(){return this._cull},set:function(e){this._cull!==e&&(this._cull=e,this.dirty=!0)}},occlude:{get:function(){return this._occlude},set:function(e){this._occlude!==e&&(this._occlude=e,this.dirty=!0)}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix!==e&&(this._modelMatrix=e,this.dirty=!0)}},primitiveType:{get:function(){return this._primitiveType},set:function(e){this._primitiveType!==e&&(this._primitiveType=e,this.dirty=!0)}},vertexArray:{get:function(){return this._vertexArray},set:function(e){this._vertexArray!==e&&(this._vertexArray=e,this.dirty=!0)}},count:{get:function(){return this._count},set:function(e){this._count!==e&&(this._count=e,this.dirty=!0)}},offset:{get:function(){return this._offset},set:function(e){this._offset!==e&&(this._offset=e,this.dirty=!0)}},instanceCount:{get:function(){return this._instanceCount},set:function(e){this._instanceCount!==e&&(this._instanceCount=e,this.dirty=!0)}},shaderProgram:{get:function(){return this._shaderProgram},set:function(e){this._shaderProgram!==e&&(this._shaderProgram=e,this.dirty=!0)}},castShadows:{get:function(){return this._castShadows},set:function(e){this._castShadows!==e&&(this._castShadows=e,this.dirty=!0)}},selectCastShadows:{get:function(){return this._selectCastShadows},set:function(e){this._selectCastShadows!==e&&(this._selectCastShadows=e,this.dirty=!0)}},receiveShadows:{get:function(){return this._receiveShadows},set:function(e){this._receiveShadows!==e&&(this._receiveShadows=e,this.dirty=!0)}},uniformMap:{get:function(){return this._uniformMap},set:function(e){this._uniformMap!==e&&(this._uniformMap=e,this.dirty=!0)}},renderState:{get:function(){return this._renderState},set:function(e){this._renderState!==e&&(this._renderState=e,this.dirty=!0)}},framebuffer:{get:function(){return this._framebuffer},set:function(e){this._framebuffer!==e&&(this._framebuffer=e,this.dirty=!0)}},pass:{get:function(){return this._pass},set:function(e){this._pass!==e&&(this._pass=e,this.dirty=!0)}},executeInClosestFrustum:{get:function(){return this._executeInClosestFrustum},set:function(e){this._executeInClosestFrustum!==e&&(this._executeInClosestFrustum=e,this.dirty=!0)}},owner:{get:function(){return this._owner},set:function(e){this._owner!==e&&(this._owner=e,this.dirty=!0)}},debugShowBoundingVolume:{get:function(){return this._debugShowBoundingVolume},set:function(e){this._debugShowBoundingVolume!==e&&(this._debugShowBoundingVolume=e,this.dirty=!0)}},debugOverlappingFrustums:{get:function(){return this._debugOverlappingFrustums},set:function(e){this._debugOverlappingFrustums!==e&&(this._debugOverlappingFrustums=e,this.dirty=!0)}},pickId:{get:function(){return this._pickId},set:function(e){this._pickId!==e&&(this._pickId=e,this.dirty=!0)}},pickOnly:{get:function(){return this._pickOnly},set:function(e){this._pickOnly!==e&&(this._pickOnly=e,this.dirty=!0)}}}),s$1d.prototype.addUniformBuffer=function(e){e.increaseRef(),this._uniformBuffers.push(e)},s$1d.prototype.removeAllUniformBuffer=function(){if(t$$(this._uniformBuffers)){for(var e=0;e<this._uniformBuffers.length;e++)this._uniformBuffers[e].decreaseRef();this._uniformBuffers=[]}},s$1d.shallowClone=function(e,t){if(t$$(e))return t$$(t)||(t=new s$1d),t._boundingVolume=e._boundingVolume,t._orientedBoundingBox=e._orientedBoundingBox,t._cull=e._cull,t._occlude=e._occlude,t._modelMatrix=e._modelMatrix,t._primitiveType=e._primitiveType,t._vertexArray=e._vertexArray,t._count=e._count,t._offset=e._offset,t._instanceCount=e._instanceCount,t._shaderProgram=e._shaderProgram,t._uniformMap=e._uniformMap,t._uniformBuffers=e._uniformBuffers,t._renderState=e._renderState,t._framebuffer=e._framebuffer,t._pass=e._pass,t._executeInClosestFrustum=e._executeInClosestFrustum,t._owner=e._owner,t._debugShowBoundingVolume=e._debugShowBoundingVolume,t._debugOverlappingFrustums=e._debugOverlappingFrustums,t._castShadows=e._castShadows,t._receiveShadows=e._receiveShadows,t._selectCastShadows=e._selectCastShadows,t._pickId=e._pickId,t._pickOnly=e._pickOnly,t._pointCloudEyeDomeLighting=e._pointCloudEyeDomeLighting,t.dirty=!0,t.lastDirtyTime=0,t},s$1d.prototype.execute=function(e,t){e.draw(this,t)};var A$13={STREAM_DRAW:de$x.STREAM_DRAW,STATIC_DRAW:de$x.STATIC_DRAW,DYNAMIC_DRAW:de$x.DYNAMIC_DRAW,validate:function(e){return e===A$13.STREAM_DRAW||e===A$13.STATIC_DRAW||e===A$13.DYNAMIC_DRAW}};function u$Y(e){if(e=e$1Y(e,e$1Y.EMPTY_OBJECT),n$1e.defined("options.context",e.context),!t$$(e.typedArray)&&!t$$(e.sizeInBytes))throw new t$_("Either options.sizeInBytes or options.typedArray is required.");if(t$$(e.typedArray)&&t$$(e.sizeInBytes))throw new t$_("Cannot pass in both options.sizeInBytes and options.typedArray.");if(t$$(e.typedArray)&&(n$1e.typeOf.object("options.typedArray",e.typedArray),n$1e.typeOf.number("options.typedArray.byteLength",e.typedArray.byteLength)),!A$13.validate(e.usage))throw new t$_("usage is invalid.");var t=e.context._gl,i=e.bufferTarget,n=e.typedArray,r=e.sizeInBytes,o=e.usage,a=t$$(n);a&&(r=n.byteLength),n$1e.typeOf.number.greaterThan("sizeInBytes",r,0);var s=t.createBuffer();t.bindBuffer(i,s),t.bufferData(i,a?n:r,o),t.bindBuffer(i,null),this._gl=t,this._webgl2=e.context._webgl2,this._bufferTarget=i,this._sizeInBytes=r,this._usage=o,this._buffer=s,this.vertexArrayDestroyable=!0,this.context=e.context,e.context.memorySize+=r}u$Y.createVertexBuffer=function(e){return n$1e.defined("options.context",e.context),new u$Y({context:e.context,bufferTarget:de$x.ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})},u$Y.createIndexBuffer=function(e){if(n$1e.defined("options.context",e.context),!fe$u.validate(e.indexDatatype))throw new t$_("Invalid indexDatatype.");if(e.indexDatatype===fe$u.UNSIGNED_INT&&!e.context.elementIndexUint)throw new t$_("IndexDatatype.UNSIGNED_INT requires OES_element_index_uint, which is not supported on this system. Check context.elementIndexUint.");var t=e.context,i=e.indexDatatype,n=fe$u.getSizeInBytes(i),r=new u$Y({context:t,bufferTarget:de$x.ELEMENT_ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage}),o=r.sizeInBytes/n;return Object.defineProperties(r,{indexDatatype:{get:function(){return i}},bytesPerIndex:{get:function(){return n}},numberOfIndices:{get:function(){return o}}}),r},Object.defineProperties(u$Y.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}}}),u$Y.prototype._getBuffer=function(){return this._buffer},u$Y.prototype.copyFromArrayView=function(e,t){t=e$1Y(t,0),n$1e.defined("arrayView",e),n$1e.typeOf.number.lessThanOrEquals("offsetInBytes + arrayView.byteLength",t+e.byteLength,this._sizeInBytes);var i=this._gl,n=this._bufferTarget;i.bindBuffer(n,this._buffer),i.bufferSubData(n,t,e),i.bindBuffer(n,null)},u$Y.prototype.copyFromBuffer=function(e,t,i,n){if(!this._webgl2)throw new t$_("A WebGL 2 context is required.");if(!t$$(e))throw new t$_("readBuffer must be defined.");if(!t$$(n)||n<=0)throw new t$_("sizeInBytes must be defined and be greater than zero.");if(!t$$(t)||t<0||t+n>e._sizeInBytes)throw new t$_("readOffset must be greater than or equal to zero and readOffset + sizeInBytes must be less than of equal to readBuffer.sizeInBytes.");if(!t$$(i)||i<0||i+n>this._sizeInBytes)throw new t$_("writeOffset must be greater than or equal to zero and writeOffset + sizeInBytes must be less than of equal to this.sizeInBytes.");if(this._buffer===e._buffer&&(i>=t&&i<t+n||t>i&&t<i+n))throw new t$_("When readBuffer is equal to this, the ranges [readOffset + sizeInBytes) and [writeOffset, writeOffset + sizeInBytes) must not overlap.");if(this._bufferTarget===de$x.ELEMENT_ARRAY_BUFFER&&e._bufferTarget!==de$x.ELEMENT_ARRAY_BUFFER||this._bufferTarget!==de$x.ELEMENT_ARRAY_BUFFER&&e._bufferTarget===de$x.ELEMENT_ARRAY_BUFFER)throw new t$_("Can not copy an index buffer into another buffer type.");var r=de$x.COPY_READ_BUFFER,o=de$x.COPY_WRITE_BUFFER,a=this._gl;a.bindBuffer(o,this._buffer),a.bindBuffer(r,e._buffer),a.copyBufferSubData(r,o,t,i,n),a.bindBuffer(o,null),a.bindBuffer(r,null)},u$Y.prototype.getBufferData=function(e,t,i,n){if(t=e$1Y(t,0),i=e$1Y(i,0),!this._webgl2)throw new t$_("A WebGL 2 context is required.");if(!t$$(e))throw new t$_("arrayView is required.");var r,o,a=e.byteLength;if(t$$(n)?(r=n,t$$(a)?o=1:(a=e.length,o=e.BYTES_PER_ELEMENT)):t$$(a)?(r=a-i,o=1):(r=(a=e.length)-i,o=e.BYTES_PER_ELEMENT),i<0||i>a)throw new t$_("destinationOffset must be greater than zero and less than the arrayView length.");if(i+r>a)throw new t$_("destinationOffset + length must be less than or equal to the arrayViewLength.");if(t<0||t>this._sizeInBytes)throw new t$_("sourceOffset must be greater than zero and less than the buffers size.");if(t+r*o>this._sizeInBytes)throw new t$_("sourceOffset + length must be less than the buffers size.");var s=this._gl,l=de$x.COPY_READ_BUFFER;s.bindBuffer(l,this._buffer),s.getBufferSubData(l,t,e,i,n),s.bindBuffer(l,null)},u$Y.prototype.isDestroyed=function(){return!1},u$Y.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),this.context.memorySize-=this.sizeInBytes,s$1e(this)};var e$1y={_maximumCombinedTextureImageUnits:0,_maximumCubeMapSize:0,_maximumFragmentUniformVectors:0,_maximumTextureImageUnits:0,_maximumRenderbufferSize:0,_maximumTextureSize:0,_maximumVaryingVectors:0,_maximumVertexAttributes:0,_maximumVertexTextureImageUnits:0,_maximumVertexUniformVectors:0,_minimumAliasedLineWidth:0,_maximumAliasedLineWidth:0,_minimumAliasedPointSize:0,_maximumAliasedPointSize:0,_maximumViewportWidth:0,_maximumViewportHeight:0,_maximumTextureFilterAnisotropy:0,_maximumDrawBuffers:0,_maximumColorAttachments:0,_highpFloatSupported:!1,_highpIntSupported:!1,_uniformBufferOffsetAlignment:256,_maxUniformBufferBinding:36,_maxArrayTextureLayers:256};function N$$(e,t,i,n){var r=t$$(t.vertexBuffer),o=t$$(t.value),a=t.value?t.value.length:t.componentsPerAttribute;if(!r&&!o)throw new t$_("attribute must have a vertexBuffer or a value.");if(r&&o)throw new t$_("attribute cannot have both a vertexBuffer and a value. It must have either a vertexBuffer property defining per-vertex data or a value property defining data for all vertices.");if(1!==a&&2!==a&&3!==a&&4!==a)throw new t$_(o?"attribute.value.length must be in the range [1, 4].":"attribute.componentsPerAttribute must be in the range [1, 4].");if(t$$(t.componentDatatype)&&!C$12.validate(t.componentDatatype))throw new t$_("attribute must have a valid componentDatatype or not specify it.");if(t$$(t.strideInBytes)&&t.strideInBytes>255)throw new t$_("attribute must have a strideInBytes less than or equal to 255 or not specify it.");if(t$$(t.instanceDivisor)&&t.instanceDivisor>0&&!n.instancedArrays)throw new t$_("instanced arrays is not supported");if(t$$(t.instanceDivisor)&&t.instanceDivisor<0)throw new t$_("attribute must have an instanceDivisor greater than or equal to zero");if(t$$(t.instanceDivisor)&&o)throw new t$_("attribute cannot have have an instanceDivisor if it is not backed by a buffer");if(t$$(t.instanceDivisor)&&t.instanceDivisor>0&&0===t.index)throw new t$_("attribute zero cannot have an instanceDivisor greater than 0");var s={index:e$1Y(t.index,i),enabled:e$1Y(t.enabled,!0),vertexBuffer:t.vertexBuffer,value:o?t.value.slice(0):void 0,componentsPerAttribute:a,componentDatatype:e$1Y(t.componentDatatype,C$12.FLOAT),normalize:e$1Y(t.normalize,!1),offsetInBytes:e$1Y(t.offsetInBytes,0),strideInBytes:e$1Y(t.strideInBytes,0),instanceDivisor:e$1Y(t.instanceDivisor,0)};if(r)s.vertexAttrib=function(e){var t=this.index;e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer._getBuffer()),e.vertexAttribPointer(t,this.componentsPerAttribute,this.componentDatatype,this.normalize,this.strideInBytes,this.offsetInBytes),e.enableVertexAttribArray(t),this.instanceDivisor>0&&(n.glVertexAttribDivisor(t,this.instanceDivisor),n._vertexAttribDivisors[t]=this.instanceDivisor,n._previousDrawInstanced=!0)},s.disableVertexAttribArray=function(e){e.disableVertexAttribArray(this.index),this.instanceDivisor>0&&n.glVertexAttribDivisor(i,0)};else{switch(s.componentsPerAttribute){case 1:s.vertexAttrib=function(e){e.vertexAttrib1fv(this.index,this.value)};break;case 2:s.vertexAttrib=function(e){e.vertexAttrib2fv(this.index,this.value)};break;case 3:s.vertexAttrib=function(e){e.vertexAttrib3fv(this.index,this.value)};break;case 4:s.vertexAttrib=function(e){e.vertexAttrib4fv(this.index,this.value)}}s.disableVertexAttribArray=function(e){}}e.push(s)}function P$U(e,t,i){for(var n=0;n<t.length;++n){var r=t[n];r.enabled&&r.vertexAttrib(e)}t$$(i)&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,i._getBuffer())}function x$18(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),n$1e.defined("options.context",e.context),n$1e.defined("options.attributes",e.attributes);var t,i=e.context,n=i._gl,r=e.attributes,o=e.indexBuffer,a=[],s=1,l=!1,u=!1,c=r.length;for(t=0;t<c;++t)N$$(a,r[t],t,i);for(c=a.length,t=0;t<c;++t){var h=a[t];if(t$$(h.vertexBuffer)&&0===h.instanceDivisor){var d=h.strideInBytes||h.componentsPerAttribute*C$12.getSizeInBytes(h.componentDatatype);s=h.vertexBuffer.sizeInBytes/d;break}}for(t=0;t<c;++t)a[t].instanceDivisor>0&&(l=!0),t$$(a[t].value)&&(u=!0);var f,p={};for(t=0;t<c;++t){var _=a[t].index;if(p[_])throw new t$_("Index "+_+" is used by more than one attribute.");p[_]=!0}i.vertexArrayObject&&(f=i.glCreateVertexArray(),i.glBindVertexArray(f),P$U(n,a,o),i.glBindVertexArray(null)),this._numberOfVertices=s,this._hasInstancedAttributes=l,this._hasConstantAttributes=u,this._context=i,this._gl=n,this._vao=f,this._attributes=a,this._indexBuffer=o}function E$14(e){return e.values.length/e.componentsPerAttribute}function M$17(e){return C$12.getSizeInBytes(e.componentDatatype)*e.componentsPerAttribute}function k$10(e){var t,i,n,r=[];for(i in e)e.hasOwnProperty(i)&&t$$(e[i])&&t$$(e[i].values)&&(r.push(i),e[i].componentDatatype===C$12.DOUBLE&&(e[i].componentDatatype=C$12.FLOAT,e[i].values=C$12.createTypedArray(C$12.FLOAT,e[i].values)));var o,a=r.length;if(a>0)for(o=E$14(e[r[0]]),t=1;t<a;++t){var s=E$14(e[r[t]]);if(s!==o)throw new t$Z("Each attribute list must have the same number of vertices. Attribute "+r[t]+" has a different number of vertices ("+s.toString()+") than attribute "+r[0]+" ("+o.toString()+").")}r.sort((function(t,i){return C$12.getSizeInBytes(e[i].componentDatatype)-C$12.getSizeInBytes(e[t].componentDatatype)}));var l=0,u={};for(t=0;t<a;++t)i=r[t],n=e[i],u[i]=l,l+=M$17(n);if(l>0){var c=C$12.getSizeInBytes(e[r[0]].componentDatatype),h=l%c;0!==h&&(l+=c-h);var d=new ArrayBuffer(o*l),f={};for(t=0;t<a;++t){i=r[t];var p=C$12.getSizeInBytes(e[i].componentDatatype);f[i]={pointer:C$12.createTypedArray(e[i].componentDatatype,d),index:u[i]/p,strideInComponentType:l/p}}for(t=0;t<o;++t)for(var _=0;_<a;++_){i=r[_];for(var m=(n=e[i]).values,$=f[i],g=$.pointer,y=n.componentsPerAttribute,v=0;v<y;++v)g[$.index+v]=m[t*y+v];$.index+=$.strideInComponentType}return{buffer:d,offsetsInBytes:u,vertexSizeInBytes:l}}}function J$Z(e){var t=e._context,i=e._hasInstancedAttributes;if(i||t._previousDrawInstanced){t._previousDrawInstanced=i;var n,r=t._vertexAttribDivisors,o=e._attributes,a=e$1y.maximumVertexAttributes;if(i){var s=o.length;for(n=0;n<s;++n){var l=o[n];if(l.enabled){var u=l.instanceDivisor,c=l.index;u!==r[c]&&(t.glVertexAttribDivisor(c,u),r[c]=u)}}}else for(n=0;n<a;++n)r[n]>0&&(t.glVertexAttribDivisor(n,0),r[n]=0)}}function G$X(e,t){for(var i=e._attributes,n=i.length,r=0;r<n;++r){var o=i[r];o.enabled&&t$$(o.value)&&o.vertexAttrib(t)}}function o$V(e){if("object"!=typeof e||null===e)return e;for(var t,i=Object.keys(e),n=0;n<i.length;n++)t=i[n],e.hasOwnProperty(t)&&"_applyFunctions"!==t&&(e[t]=o$V(e[t]));return Object.freeze(e)}function N$_(e){return e===de$x.FUNC_ADD||e===de$x.FUNC_SUBTRACT||e===de$x.FUNC_REVERSE_SUBTRACT||e===de$x.MIN||e===de$x.MAX}function k$$(e){return e===de$x.ZERO||e===de$x.ONE||e===de$x.SRC_COLOR||e===de$x.ONE_MINUS_SRC_COLOR||e===de$x.DST_COLOR||e===de$x.ONE_MINUS_DST_COLOR||e===de$x.SRC_ALPHA||e===de$x.ONE_MINUS_SRC_ALPHA||e===de$x.DST_ALPHA||e===de$x.ONE_MINUS_DST_ALPHA||e===de$x.CONSTANT_COLOR||e===de$x.ONE_MINUS_CONSTANT_COLOR||e===de$x.CONSTANT_ALPHA||e===de$x.ONE_MINUS_CONSTANT_ALPHA||e===de$x.SRC_ALPHA_SATURATE}function Q$Z(e){return e===de$x.FRONT||e===de$x.BACK||e===de$x.FRONT_AND_BACK}function G$W(e){return e===de$x.NEVER||e===de$x.LESS||e===de$x.EQUAL||e===de$x.LEQUAL||e===de$x.GREATER||e===de$x.NOTEQUAL||e===de$x.GEQUAL||e===de$x.ALWAYS}function _$14(e){return e===de$x.NEVER||e===de$x.LESS||e===de$x.EQUAL||e===de$x.LEQUAL||e===de$x.GREATER||e===de$x.NOTEQUAL||e===de$x.GEQUAL||e===de$x.ALWAYS}function R$T(e){return e===de$x.ZERO||e===de$x.KEEP||e===de$x.REPLACE||e===de$x.INCR||e===de$x.DECR||e===de$x.INVERT||e===de$x.INCR_WRAP||e===de$x.DECR_WRAP}function p$1a(e){var t=e$1Y(e,{}),i=e$1Y(t.cull,{}),n=e$1Y(t.polygonOffset,{}),r=e$1Y(t.scissorTest,{}),o=e$1Y(r.rectangle,{}),a=e$1Y(t.depthRange,{}),s=e$1Y(t.depthTest,{}),l=e$1Y(t.colorMask,{}),u=e$1Y(t.blending,{}),c=e$1Y(u.color,{}),h=e$1Y(t.stencilTest,{}),d=e$1Y(h.frontOperation,{}),f=e$1Y(h.backOperation,{}),p=e$1Y(t.sampleCoverage,{}),_=t.viewport;if(this.frontFace=e$1Y(t.frontFace,_0x2ee645.COUNTER_CLOCKWISE),this.cull={enabled:e$1Y(i.enabled,!1),face:e$1Y(i.face,de$x.BACK)},this.lineWidth=e$1Y(t.lineWidth,1),this.polygonOffset={enabled:e$1Y(n.enabled,!1),factor:e$1Y(n.factor,0),units:e$1Y(n.units,0)},this.scissorTest={enabled:e$1Y(r.enabled,!1),rectangle:n$13.clone(o)},this.depthRange={near:e$1Y(a.near,0),far:e$1Y(a.far,1)},this.depthTest={enabled:e$1Y(s.enabled,!1),func:e$1Y(s.func,de$x.LESS)},this.colorMask={red:e$1Y(l.red,!0),green:e$1Y(l.green,!0),blue:e$1Y(l.blue,!0),alpha:e$1Y(l.alpha,!0)},this.depthMask=e$1Y(t.depthMask,!0),this.stencilMask=e$1Y(t.stencilMask,-1),this.blending={enabled:e$1Y(u.enabled,!1),color:new e$1z(e$1Y(c.red,0),e$1Y(c.green,0),e$1Y(c.blue,0),e$1Y(c.alpha,0)),equationRgb:e$1Y(u.equationRgb,de$x.FUNC_ADD),equationAlpha:e$1Y(u.equationAlpha,de$x.FUNC_ADD),functionSourceRgb:e$1Y(u.functionSourceRgb,de$x.ONE),functionSourceAlpha:e$1Y(u.functionSourceAlpha,de$x.ONE),functionDestinationRgb:e$1Y(u.functionDestinationRgb,de$x.ZERO),functionDestinationAlpha:e$1Y(u.functionDestinationAlpha,de$x.ZERO)},this.stencilTest={enabled:e$1Y(h.enabled,!1),frontFunction:e$1Y(h.frontFunction,de$x.ALWAYS),backFunction:e$1Y(h.backFunction,de$x.ALWAYS),reference:e$1Y(h.reference,0),mask:e$1Y(h.mask,-1),frontOperation:{fail:e$1Y(d.fail,de$x.KEEP),zFail:e$1Y(d.zFail,de$x.KEEP),zPass:e$1Y(d.zPass,de$x.KEEP)},backOperation:{fail:e$1Y(f.fail,de$x.KEEP),zFail:e$1Y(f.zFail,de$x.KEEP),zPass:e$1Y(f.zPass,de$x.KEEP)}},this.sampleCoverage={enabled:e$1Y(p.enabled,!1),value:e$1Y(p.value,1),invert:e$1Y(p.invert,!1)},this.viewport=t$$(_)?new n$13(_.x,_.y,_.width,_.height):void 0,this.lineWidth<e$1y.minimumAliasedLineWidth||this.lineWidth>e$1y.maximumAliasedLineWidth)throw new t$_("renderState.lineWidth is out of range. Check minimumAliasedLineWidth and maximumAliasedLineWidth.");if(!_0x2ee645.validate(this.frontFace))throw new t$_("Invalid renderState.frontFace.");if(!Q$Z(this.cull.face))throw new t$_("Invalid renderState.cull.face.");if(this.scissorTest.rectangle.width<0||this.scissorTest.rectangle.height<0)throw new t$_("renderState.scissorTest.rectangle.width and renderState.scissorTest.rectangle.height must be greater than or equal to zero.");if(this.depthRange.near>this.depthRange.far)throw new t$_("renderState.depthRange.near can not be greater than renderState.depthRange.far.");if(this.depthRange.near<0)throw new t$_("renderState.depthRange.near must be greater than or equal to zero.");if(this.depthRange.far>1)throw new t$_("renderState.depthRange.far must be less than or equal to one.");if(!G$W(this.depthTest.func))throw new t$_("Invalid renderState.depthTest.func.");if(this.blending.color.red<0||this.blending.color.red>1||this.blending.color.green<0||this.blending.color.green>1||this.blending.color.blue<0||this.blending.color.blue>1||this.blending.color.alpha<0||this.blending.color.alpha>1)throw new t$_("renderState.blending.color components must be greater than or equal to zero and less than or equal to one.");if(!N$_(this.blending.equationRgb))throw new t$_("Invalid renderState.blending.equationRgb.");if(!N$_(this.blending.equationAlpha))throw new t$_("Invalid renderState.blending.equationAlpha.");if(!k$$(this.blending.functionSourceRgb))throw new t$_("Invalid renderState.blending.functionSourceRgb.");if(!k$$(this.blending.functionSourceAlpha))throw new t$_("Invalid renderState.blending.functionSourceAlpha.");if(!k$$(this.blending.functionDestinationRgb))throw new t$_("Invalid renderState.blending.functionDestinationRgb.");if(!k$$(this.blending.functionDestinationAlpha))throw new t$_("Invalid renderState.blending.functionDestinationAlpha.");if(!_$14(this.stencilTest.frontFunction))throw new t$_("Invalid renderState.stencilTest.frontFunction.");if(!_$14(this.stencilTest.backFunction))throw new t$_("Invalid renderState.stencilTest.backFunction.");if(!R$T(this.stencilTest.frontOperation.fail))throw new t$_("Invalid renderState.stencilTest.frontOperation.fail.");if(!R$T(this.stencilTest.frontOperation.zFail))throw new t$_("Invalid renderState.stencilTest.frontOperation.zFail.");if(!R$T(this.stencilTest.frontOperation.zPass))throw new t$_("Invalid renderState.stencilTest.frontOperation.zPass.");if(!R$T(this.stencilTest.backOperation.fail))throw new t$_("Invalid renderState.stencilTest.backOperation.fail.");if(!R$T(this.stencilTest.backOperation.zFail))throw new t$_("Invalid renderState.stencilTest.backOperation.zFail.");if(!R$T(this.stencilTest.backOperation.zPass))throw new t$_("Invalid renderState.stencilTest.backOperation.zPass.");if(t$$(this.viewport)){if(this.viewport.width<0)throw new t$_("renderState.viewport.width must be greater than or equal to zero.");if(this.viewport.height<0)throw new t$_("renderState.viewport.height must be greater than or equal to zero.");if(this.viewport.width>e$1y.maximumViewportWidth)throw new t$_("renderState.viewport.width must be less than or equal to the maximum viewport width ("+e$1y.maximumViewportWidth.toString()+"). Check maximumViewportWidth.");if(this.viewport.height>e$1y.maximumViewportHeight)throw new t$_("renderState.viewport.height must be less than or equal to the maximum viewport height ("+e$1y.maximumViewportHeight.toString()+"). Check maximumViewportHeight.")}this.id=0,this._applyFunctions=[]}Object.defineProperties(e$1y,{maximumCombinedTextureImageUnits:{get:function(){return e$1y._maximumCombinedTextureImageUnits}},maximumCubeMapSize:{get:function(){return e$1y._maximumCubeMapSize}},maximumFragmentUniformVectors:{get:function(){return e$1y._maximumFragmentUniformVectors}},maximumTextureImageUnits:{get:function(){return e$1y._maximumTextureImageUnits}},maximumRenderbufferSize:{get:function(){return e$1y._maximumRenderbufferSize}},maximumTextureSize:{get:function(){return e$1y._maximumTextureSize}},maximumVaryingVectors:{get:function(){return e$1y._maximumVaryingVectors}},maximumVertexAttributes:{get:function(){return e$1y._maximumVertexAttributes}},maximumVertexTextureImageUnits:{get:function(){return e$1y._maximumVertexTextureImageUnits}},maximumVertexUniformVectors:{get:function(){return e$1y._maximumVertexUniformVectors}},minimumAliasedLineWidth:{get:function(){return e$1y._minimumAliasedLineWidth}},maximumAliasedLineWidth:{get:function(){return e$1y._maximumAliasedLineWidth}},minimumAliasedPointSize:{get:function(){return e$1y._minimumAliasedPointSize}},maximumAliasedPointSize:{get:function(){return e$1y._maximumAliasedPointSize}},maximumViewportWidth:{get:function(){return e$1y._maximumViewportWidth}},maximumViewportHeight:{get:function(){return e$1y._maximumViewportHeight}},maximumTextureFilterAnisotropy:{get:function(){return e$1y._maximumTextureFilterAnisotropy}},maximumDrawBuffers:{get:function(){return e$1y._maximumDrawBuffers}},maximumColorAttachments:{get:function(){return e$1y._maximumColorAttachments}},highpFloatSupported:{get:function(){return e$1y._highpFloatSupported}},highpIntSupported:{get:function(){return e$1y._highpIntSupported}},uniformBufferOffsetAlignment:{get:function(){return e$1y._uniformBufferOffsetAlignment}},maxUniformBufferBinding:{get:function(){return e$1y._maxUniformBufferBinding}},maxArrayTextureLayers:{get:function(){return e$1y._maxArrayTextureLayers}}}),x$18.fromGeometry=function(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),n$1e.defined("options.context",e.context);var t,i,n,r=e.context,o=e$1Y(e.geometry,e$1Y.EMPTY_OBJECT),a=e$1Y(e.bufferUsage,A$13.DYNAMIC_DRAW),s=e$1Y(e.attributeLocations,e$1Y.EMPTY_OBJECT),l=e$1Y(e.interleave,!1),u=e.vertexArrayAttributes,c=t$$(u)?u:[],h=o.attributes;if(l){var d=k$10(h);if(t$$(d)){n=u$Y.createVertexBuffer({context:r,typedArray:d.buffer,usage:a});var f=d.offsetsInBytes,p=d.vertexSizeInBytes;for(t in h)h.hasOwnProperty(t)&&t$$(h[t])&&(t$$((i=h[t]).values)?c.push({index:s[t],vertexBuffer:n,componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,offsetInBytes:f[t],strideInBytes:p}):c.push({index:s[t],value:i.value,componentDatatype:i.componentDatatype,normalize:i.normalize}))}}else for(t in h)if(h.hasOwnProperty(t)&&t$$(h[t])){var _=(i=h[t]).componentDatatype;_===C$12.DOUBLE&&(_=C$12.FLOAT),n=void 0,t$$(i.values)&&(n=u$Y.createVertexBuffer({context:r,typedArray:C$12.createTypedArray(_,i.values),usage:a})),c.push({index:s[t],vertexBuffer:n,value:i.value,componentDatatype:_,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize})}var m,$=o.indices;return t$$($)&&(m=T$11.computeNumberOfVertices(o)>=n$1d.SIXTY_FOUR_KILOBYTES&&r.elementIndexUint?u$Y.createIndexBuffer({context:r,typedArray:new Uint32Array($),usage:a,indexDatatype:fe$u.UNSIGNED_INT}):u$Y.createIndexBuffer({context:r,typedArray:new Uint16Array($),usage:a,indexDatatype:fe$u.UNSIGNED_SHORT})),new x$18({context:r,attributes:c,indexBuffer:m})},Object.defineProperties(x$18.prototype,{numberOfAttributes:{get:function(){return this._attributes.length}},numberOfVertices:{get:function(){return this._numberOfVertices}},indexBuffer:{get:function(){return this._indexBuffer}}}),x$18.prototype.getAttribute=function(e){return n$1e.defined("index",e),this._attributes[e]},x$18.prototype._bind=function(){t$$(this._vao)?(this._context.glBindVertexArray(this._vao),this._context.instancedArrays&&J$Z(this),this._hasConstantAttributes&&G$X(this,this._gl)):P$U(this._gl,this._attributes,this._indexBuffer)},x$18.prototype._unBind=function(){if(t$$(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)}},x$18.prototype.isDestroyed=function(){return!1},x$18.prototype.destroy=function(){for(var e=this._attributes,t=0;t<e.length;++t){var i=e[t].vertexBuffer;t$$(i)&&!i.isDestroyed()&&i.vertexArrayDestroyable&&i.destroy()}var n=this._indexBuffer;return t$$(n)&&!n.isDestroyed()&&n.vertexArrayDestroyable&&n.destroy(),t$$(this._vao)&&this._context.glDeleteVertexArray(this._vao),s$1e(this)};var Y$Q=0,b$1i={};function m$X(e,t,i){i?e.enable(t):e.disable(t)}function L$$(e,t){e.frontFace(t.frontFace)}function M$16(e,t){var i=t.cull,n=i.enabled;m$X(e,e.CULL_FACE,n),n&&e.cullFace(i.face)}function z$R(e,t){e.lineWidth(t.lineWidth)}function P$T(e,t){var i=t.polygonOffset,n=i.enabled;m$X(e,e.POLYGON_OFFSET_FILL,n),n&&e.polygonOffset(i.factor,i.units)}function I$16(e,t,i){var n=t.scissorTest,r=t$$(i.scissorTest)?i.scissorTest.enabled:n.enabled;if(m$X(e,e.SCISSOR_TEST,r),r){var o=t$$(i.scissorTest)?i.scissorTest.rectangle:n.rectangle;e.scissor(o.x,o.y,o.width,o.height)}}function D$13(e,t){var i=t.depthRange;e.depthRange(i.near,i.far)}function y$$(e,t){var i=t.depthTest,n=i.enabled;m$X(e,e.DEPTH_TEST,n),n&&e.depthFunc(i.func)}function W$14(e,t){var i=t.colorMask;e.colorMask(i.red,i.green,i.blue,i.alpha)}function q$18(e,t){e.depthMask(t.depthMask)}function U$10(e,t){e.stencilMask(t.stencilMask)}function J$Y(e,t){e.blendColor(t.red,t.green,t.blue,t.alpha)}function x$17(e,t,i){var n=t.blending,r=t$$(i.blendingEnabled)?i.blendingEnabled:n.enabled;m$X(e,e.BLEND,r),r&&(J$Y(e,n.color),e.blendEquationSeparate(n.equationRgb,n.equationAlpha),e.blendFuncSeparate(n.functionSourceRgb,n.functionDestinationRgb,n.functionSourceAlpha,n.functionDestinationAlpha))}function K$S(e,t){var i=t.stencilTest,n=i.enabled;if(m$X(e,e.STENCIL_TEST,n),n){var r=i.frontFunction,o=i.backFunction,a=i.reference,s=i.mask;e.stencilFunc(r,a,s),e.stencilFuncSeparate(e.BACK,o,a,s),e.stencilFuncSeparate(e.FRONT,r,a,s);var l=i.frontOperation,u=l.fail,c=l.zFail,h=l.zPass;e.stencilOpSeparate(e.FRONT,u,c,h);var d=i.backOperation,f=d.fail,p=d.zFail,_=d.zPass;e.stencilOpSeparate(e.BACK,f,p,_)}}function H$Z(e,t){var i=t.sampleCoverage,n=i.enabled;m$X(e,e.SAMPLE_COVERAGE,n),n&&e.sampleCoverage(i.value,i.invert)}p$1a.fromCache=function(e){var t=JSON.stringify(e),i=b$1i[t];if(t$$(i))return++i.referenceCount,i.state;var n=new p$1a(e),r=JSON.stringify(n);return t$$(i=b$1i[r])||(n.id=Y$Q++,i={referenceCount:0,state:n=o$V(n)},b$1i[r]=i),++i.referenceCount,b$1i[t]={referenceCount:1,state:i.state},i.state},p$1a.removeFromCache=function(e){var t=new p$1a(e),i=JSON.stringify(t),n=b$1i[i],r=JSON.stringify(e),o=b$1i[r];t$$(o)&&(--o.referenceCount,0===o.referenceCount&&(delete b$1i[r],t$$(n)&&--n.referenceCount)),t$$(n)&&0===n.referenceCount&&delete b$1i[i]},p$1a.getCache=function(){return b$1i},p$1a.clearCache=function(){b$1i={}};var Z$Z=new n$13;function V$P(e,t,i){var n=e$1Y(t.viewport,i.viewport);t$$(n)||((n=Z$Z).width=i.context.drawingBufferWidth,n.height=i.context.drawingBufferHeight),i.context.uniformState.viewport=n,e.viewport(n.x,n.y,n.width,n.height)}function X$Q(e,t){var i=[];return e.frontFace!==t.frontFace&&i.push(L$$),(e.cull.enabled!==t.cull.enabled||e.cull.face!==t.cull.face)&&i.push(M$16),e.lineWidth!==t.lineWidth&&i.push(z$R),(e.polygonOffset.enabled!==t.polygonOffset.enabled||e.polygonOffset.factor!==t.polygonOffset.factor||e.polygonOffset.units!==t.polygonOffset.units)&&i.push(P$T),(e.depthRange.near!==t.depthRange.near||e.depthRange.far!==t.depthRange.far)&&i.push(D$13),(e.depthTest.enabled!==t.depthTest.enabled||e.depthTest.func!==t.depthTest.func)&&i.push(y$$),(e.colorMask.red!==t.colorMask.red||e.colorMask.green!==t.colorMask.green||e.colorMask.blue!==t.colorMask.blue||e.colorMask.alpha!==t.colorMask.alpha)&&i.push(W$14),e.depthMask!==t.depthMask&&i.push(q$18),e.stencilMask!==t.stencilMask&&i.push(U$10),(e.stencilTest.enabled!==t.stencilTest.enabled||e.stencilTest.frontFunction!==t.stencilTest.frontFunction||e.stencilTest.backFunction!==t.stencilTest.backFunction||e.stencilTest.reference!==t.stencilTest.reference||e.stencilTest.mask!==t.stencilTest.mask||e.stencilTest.frontOperation.fail!==t.stencilTest.frontOperation.fail||e.stencilTest.frontOperation.zFail!==t.stencilTest.frontOperation.zFail||e.stencilTest.backOperation.fail!==t.stencilTest.backOperation.fail||e.stencilTest.backOperation.zFail!==t.stencilTest.backOperation.zFail||e.stencilTest.backOperation.zPass!==t.stencilTest.backOperation.zPass)&&i.push(K$S),(e.sampleCoverage.enabled!==t.sampleCoverage.enabled||e.sampleCoverage.value!==t.sampleCoverage.value||e.sampleCoverage.invert!==t.sampleCoverage.invert)&&i.push(H$Z),i}p$1a.apply=function(e,t,i){L$$(e,t),M$16(e,t),z$R(e,t),P$T(e,t),D$13(e,t),y$$(e,t),W$14(e,t),q$18(e,t),U$10(e,t),K$S(e,t),H$Z(e,t),I$16(e,t,i),x$17(e,t,i),V$P(e,t,i)},p$1a.partialApply=function(e,t,i,n,r,o,a,s){if(t!==i){var l=i._applyFunctions[t.id];t$$(l)||(l=X$Q(t,i),i._applyFunctions[t.id]=l);for(var u=l.length,c=0;c<u;++c)l[c](e,i)}((t$$(n.scissorTest)?n.scissorTest:t.scissorTest)!==(t$$(r.scissorTest)?r.scissorTest:i.scissorTest)||s)&&I$16(e,i,r);var h=t$$(n.blendingEnabled)?n.blendingEnabled:t.blending.enabled,d=t$$(r.blendingEnabled)?r.blendingEnabled:i.blending.enabled;(h!==d||d&&t.blending!==i.blending)&&x$17(e,i,r),(t!==i||n!==r||n.context!==r.context||o!==a)&&V$P(e,i,r)},p$1a.getState=function(e){if(!t$$(e))throw new t$_("renderState is required.");return{frontFace:e.frontFace,cull:{enabled:e.cull.enabled,face:e.cull.face},lineWidth:e.lineWidth,polygonOffset:{enabled:e.polygonOffset.enabled,factor:e.polygonOffset.factor,units:e.polygonOffset.units},scissorTest:{enabled:e.scissorTest.enabled,rectangle:n$13.clone(e.scissorTest.rectangle)},depthRange:{near:e.depthRange.near,far:e.depthRange.far},depthTest:{enabled:e.depthTest.enabled,func:e.depthTest.func},colorMask:{red:e.colorMask.red,green:e.colorMask.green,blue:e.colorMask.blue,alpha:e.colorMask.alpha},depthMask:e.depthMask,stencilMask:e.stencilMask,blending:{enabled:e.blending.enabled,color:e$1z.clone(e.blending.color),equationRgb:e.blending.equationRgb,equationAlpha:e.blending.equationAlpha,functionSourceRgb:e.blending.functionSourceRgb,functionSourceAlpha:e.blending.functionSourceAlpha,functionDestinationRgb:e.blending.functionDestinationRgb,functionDestinationAlpha:e.blending.functionDestinationAlpha},stencilTest:{enabled:e.stencilTest.enabled,frontFunction:e.stencilTest.frontFunction,backFunction:e.stencilTest.backFunction,reference:e.stencilTest.reference,mask:e.stencilTest.mask,frontOperation:{fail:e.stencilTest.frontOperation.fail,zFail:e.stencilTest.frontOperation.zFail,zPass:e.stencilTest.frontOperation.zPass},backOperation:{fail:e.stencilTest.backOperation.fail,zFail:e.stencilTest.backOperation.zFail,zPass:e.stencilTest.backOperation.zPass}},sampleCoverage:{enabled:e.sampleCoverage.enabled,value:e.sampleCoverage.value,invert:e.sampleCoverage.invert},viewport:t$$(e.viewport)?n$13.clone(e.viewport):void 0}};var R$S={ADD:de$x.FUNC_ADD,SUBTRACT:de$x.FUNC_SUBTRACT,REVERSE_SUBTRACT:de$x.FUNC_REVERSE_SUBTRACT,MIN:de$x.MIN,MAX:de$x.MAX},x$16=Object.freeze(R$S),_$13={ZERO:de$x.ZERO,ONE:de$x.ONE,SOURCE_COLOR:de$x.SRC_COLOR,ONE_MINUS_SOURCE_COLOR:de$x.ONE_MINUS_SRC_COLOR,DESTINATION_COLOR:de$x.DST_COLOR,ONE_MINUS_DESTINATION_COLOR:de$x.ONE_MINUS_DST_COLOR,SOURCE_ALPHA:de$x.SRC_ALPHA,ONE_MINUS_SOURCE_ALPHA:de$x.ONE_MINUS_SRC_ALPHA,DESTINATION_ALPHA:de$x.DST_ALPHA,ONE_MINUS_DESTINATION_ALPHA:de$x.ONE_MINUS_DST_ALPHA,CONSTANT_COLOR:de$x.CONSTANT_COLOR,ONE_MINUS_CONSTANT_COLOR:de$x.ONE_MINUS_CONSTANT_COLOR,CONSTANT_ALPHA:de$x.CONSTANT_ALPHA,ONE_MINUS_CONSTANT_ALPHA:de$x.ONE_MINUS_CONSTANT_ALPHA,SOURCE_ALPHA_SATURATE:de$x.SRC_ALPHA_SATURATE},h$13=Object.freeze(_$13),t$V={DISABLED:Object.freeze({enabled:!1}),ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:x$16.ADD,equationAlpha:x$16.ADD,functionSourceRgb:h$13.SOURCE_ALPHA,functionSourceAlpha:h$13.ONE,functionDestinationRgb:h$13.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:h$13.ONE_MINUS_SOURCE_ALPHA}),PRE_MULTIPLIED_ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:x$16.ADD,equationAlpha:x$16.ADD,functionSourceRgb:h$13.ONE,functionSourceAlpha:h$13.ONE,functionDestinationRgb:h$13.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:h$13.ONE_MINUS_SOURCE_ALPHA}),ADDITIVE_BLEND:Object.freeze({enabled:!0,equationRgb:x$16.ADD,equationAlpha:x$16.ADD,functionSourceRgb:h$13.SOURCE_ALPHA,functionSourceAlpha:h$13.ONE,functionDestinationRgb:h$13.ONE,functionDestinationAlpha:h$13.ONE})},Ee$s=Object.freeze(t$V),_0x41a3bc=(_0x5d5be6=!0,function(e,t){var i=_0x5d5be6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d5be6=!1,i}),_0xe53870=_0x41a3bc(void 0,(function(){return _0xe53870.toString().search("(((.+)+)+)+$").toString().constructor(_0xe53870).search("(((.+)+)+)+$")})),_0x5d5be6;function _0xbea57e(){}_0xe53870(),_0xbea57e.toVertexBuffer=function(e,t,i,n){var r=u$Y.createVertexBuffer({context:e,typedArray:t.arrayBuffer,usage:n?A$13.DYNAMIC_DRAW:A$13.STATIC_DRAW});return r.vertexArrayDestroyable=!1,r.bytesPerElement=t.bytesPerElement,r.length=t.length,r.attributes=i,r.itemSize=t.bytesPerElement,r.dynamicDraw=n,!n&&delete t.arrayBuffer,r},_0xbea57e.toIndexBuffer=function(e,t,i){if(0!==t.length){var n=u$Y.createIndexBuffer({context:e,typedArray:t.arrayBuffer,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT});return n.vertexArrayDestroyable=!1,n.dynamicDraw=i,!n.dynamicDraw&&delete t.arrayBuffer,n}},_0xbea57e.toRenderState=function(e,t,i){var n=Ee$s.DISABLED;e.blendFunction[0]==de$x.ONE&&e.blendFunction[1]==de$x.ONE_MINUS_SRC_ALPHA&&(n=Ee$s.ALPHA_BLEND);var r={frontFace:i.frontFace,cull:{enabled:i.enable,face:i.mode},depthRange:{near:t.range[0],far:t.range[1]},depthTest:{enabled:t.func!==de$x.ALWAYS,func:t.func},depthMask:t.mask,colorMask:{red:e.mask[0],green:e.mask[1],blue:e.mask[2],alpha:e.mask[3]},blending:n};return p$1a.fromCache(r)},_0xbea57e.toComponentDatatype=function(e){switch(e){case"Int8":return C$12.BYTE;case"Uint8":return C$12.UNSIGNED_BYTE;case"Int16":return C$12.SHORT;case"Uint16":return C$12.UNSIGNED_SHORT;case"Int32":return C$12.INT;case"Uint32":return C$12.UNSIGNED_INT;default:return C$12.FLOAT}},_0xbea57e.mbxAttributeToCesiumVertexArrtribute=function(e,t,i,n){var r=this.toComponentDatatype(e.type);C$12.getSizeInBytes(r);var o=t.bytesPerElement,a=e.offset+o*(n||0);return{name:e.name,index:i,vertexBuffer:t,componentsPerAttribute:e.components,componentDatatype:r,offsetInBytes:a,strideInBytes:o,normalize:!1}};var _0x2a3074=(_0x5112bd=!0,function(e,t){var i=_0x5112bd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5112bd=!1,i}),_0x551548=_0x2a3074(void 0,(function(){return _0x551548.toString().search("(((.+)+)+)+$").toString().constructor(_0x551548).search("(((.+)+)+)+$")})),_0x5112bd;function _0x3de43b(e,t,i,n){if("translucent"===e.renderPass){var r=i.paint.get("circle-opacity"),o=i.paint.get("circle-stroke-width"),a=i.paint.get("circle-stroke-opacity"),s=void 0!==i.layout.get("circle-sort-key").constantOr(1);if(0!==r.constantOr(1)||0!==o.constantOr(1)&&0!==a.constantOr(1)){e.context.gl;var l=e.depthModeForSublayer(0,_0x358f1c.ReadOnly),u=e.colorModeForRenderPass(),c=[],h=t.getBucket(i);if(h){var d=h.programConfigurations.get(i.id),f=e.useProgram("circle",d),p=f.program,_=h.layoutVertexBuffer,m=h.indexBuffer,$=_0x158ab2.circleUniformValues(e,t,i),g=_0x158ab2.circleUniformMap(e,t,i),y=f.cesiumProgram,v=d.binders;for(var x in v){g=v[x].getUniformMap(g,i.paint.get(x))}var b={programConfiguration:d,program:p,layoutVertexBuffer:_,indexBuffer:m,uniformValues:$};if(s)for(var S=0,w=h.segments.get();S<w.length;S+=1){var C=w[S];c.push({segments:new _0x17c095([C]),sortKey:C.sortKey,state:b})}else c.push({segments:h.segments,sortKey:0,state:b});s&&c.sort((function(e,t){return e.sortKey-t.sortKey}));for(var T=0,P=c;T<P.length;T+=1){var E=P[T],A=E.state;A.programConfiguration,A.program,A.layoutVertexBuffer,A.indexBuffer,A.uniformValues;var L=0;for(w=E.segments.get();L<w.length;L+=1){var M=((C=w[L]).drawCommands||(C.drawCommands={}))[i.id];if(!M){M=new s$1d({cull:!1,primitiveType:H$11.TRIANGLES,count:3*C.primitiveLength,offset:3*C.primitiveOffset}),C.drawCommands[i.id]=M;for(var I=C.cesiumVaos||(C.cesiumVaos={}),O=[],D=0;D<h.layoutCesiumVertexBuffer.attributes.length;D++){var R=h.layoutCesiumVertexBuffer.attributes[D],N=_0xbea57e.toComponentDatatype(R.type),F=C$12.getSizeInBytes(N),B=h.layoutCesiumVertexBuffer.bytesPerElement,z=R.offset+F*(C.vertexOffset||0),G={name:R.name,index:D,vertexBuffer:h.layoutCesiumVertexBuffer,componentsPerAttribute:R.components,componentDatatype:N,offsetInBytes:z,strideInBytes:B,normalize:!1};O.push(G)}var k=I[i.id]||(I[i.id]=new x$18({context:e.cesiumContext,attributes:O,indexBuffer:h.cesiumIndexBuffer}));M.vertexArray=k}g.u_depthRange=function(){return l.range[0]},M.uniformMap=g,M.renderState=_0xbea57e.toRenderState(u,l,_0x5d4b2b.disabled),M.shaderProgram=y,M.execute(e.cesiumContext,n.passState)}}}}}}_0x551548();const _0x51534e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x537414=_0x51534e(void 0,(function(){return _0x537414.toString().search("(((.+)+)+)+$").toString().constructor(_0x537414).search("(((.+)+)+)+$")}));function _0x52c6d3(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!_0x52c6d3(e[i],t[i]))return!1;return!0}if("object"==typeof e&&null!==e&&null!==t){if("object"!=typeof t)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!_0x52c6d3(e[i],t[i]))return!1;return!0}return e===t}function bezier(e,t,i,n){const r=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),o=r(this,(function(){return o.toString().search("(((.+)+)+)+$").toString().constructor(o).search("(((.+)+)+)+$")}));o()}function clamp(e,t,i){return Math.min(i,Math.max(t,e))}function wrap(e,t,i){const n=i-t,r=((e-t)%n+n)%n+t;return r===t?i:r}function asyncAll(e,t,i){if(!e.length)return i(null,[]);let n=e.length;const r=new Array(e.length);let o=null;e.forEach(((e,a)=>{t(e,((e,t)=>{e&&(o=e),r[a]=t,0==--n&&i(o,r)}))}))}function extend$1(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];for(var n=0,r=t;n<r.length;n+=1){var o=r[n];for(var a in o)e[a]=o[a]}return e}_0x537414(),bezier();let _0x90eba5=1;function uniqueId(){return _0x90eba5++}function endsWith(e,t){return-1!==e.indexOf(t,e.length-t.length)}function mapObject(e,t,i){const n={};for(const r in e)n[r]=t.call(i||this,e[r],r,e);return n}function filterObject(e,t,i){const n={};for(const r in e)t.call(i||this,e[r],r,e)&&(n[r]=e[r]);return n}function clone(e){return Array.isArray(e)?e.map(clone):"object"==typeof e&&e?mapObject(e,clone):e}function arraysIntersect(e,t){for(let i=0;i<e.length;i++)if(t.indexOf(e[i])>=0)return!0;return!1}const _0xbfba7e={};function warnOnce$1(e){_0xbfba7e[e]||("undefined"!=typeof console&&console.warn(e),_0xbfba7e[e]=!0)}function isCounterClockwise(e,t,i){return(i.y-e.y)*(t.x-e.x)>(t.y-e.y)*(i.x-e.x)}function isWorker(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function parseCacheControl(e){const t={};if(e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((e,i,n,r)=>{const o=n||r;return t[i]=!o||o.toLowerCase(),""})),t["max-age"]){const e=parseInt(t["max-age"],10);isNaN(e)?delete t["max-age"]:t["max-age"]=e}return t}var _0x10966c=(_0x18ab35=!0,function(e,t){var i=_0x18ab35?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x18ab35=!1,i}),_0x55d0dc=_0x10966c(void 0,(function(){return _0x55d0dc.toString().search("(((.+)+)+)+$").toString().constructor(_0x55d0dc).search("(((.+)+)+)+$")})),_0x18ab35;_0x55d0dc();var _0x3295b6={lineUniforms:function(e,t){return{u_matrix:new _0x2724d0.UniformMatrix4f(e,t.u_matrix),u_ratio:new _0x2724d0.Uniform1f(e,t.u_ratio),u_device_pixel_ratio:new _0x2724d0.Uniform1f(e,t.u_device_pixel_ratio),u_units_to_pixels:new _0x2724d0.Uniform2f(e,t.u_units_to_pixels),u_antialiasing:new _0x2724d0.Uniform1f(e,t.u_antialiasing)}},lineGradientUniforms:function(e,t){return{u_matrix:new _0x2724d0.UniformMatrix4f(e,t.u_matrix),u_ratio:new _0x2724d0.Uniform1f(e,t.u_ratio),u_device_pixel_ratio:new _0x2724d0.Uniform1f(e,t.u_device_pixel_ratio),u_units_to_pixels:new _0x2724d0.Uniform2f(e,t.u_units_to_pixels),u_image:new _0x2724d0.Uniform1i(e,t.u_image)}},linePatternUniforms:function(e,t){return{u_matrix:new _0x2724d0.UniformMatrix4f(e,t.u_matrix),u_texsize:new _0x2724d0.Uniform2f(e,t.u_texsize),u_ratio:new _0x2724d0.Uniform1f(e,t.u_ratio),u_device_pixel_ratio:new _0x2724d0.Uniform1f(e,t.u_device_pixel_ratio),u_image:new _0x2724d0.Uniform1i(e,t.u_image),u_units_to_pixels:new _0x2724d0.Uniform2f(e,t.u_units_to_pixels),u_scale:new _0x2724d0.Uniform4f(e,t.u_scale),u_fade:new _0x2724d0.Uniform1f(e,t.u_fade)}},lineSDFUniforms:function(e,t){return{u_matrix:new _0x2724d0.UniformMatrix4f(e,t.u_matrix),u_ratio:new _0x2724d0.Uniform1f(e,t.u_ratio),u_device_pixel_ratio:new _0x2724d0.Uniform1f(e,t.u_device_pixel_ratio),u_units_to_pixels:new _0x2724d0.Uniform2f(e,t.u_units_to_pixels),u_patternscale_a:new _0x2724d0.Uniform2f(e,t.u_patternscale_a),u_patternscale_b:new _0x2724d0.Uniform2f(e,t.u_patternscale_b),u_sdfgamma:new _0x2724d0.Uniform1f(e,t.u_sdfgamma),u_image:new _0x2724d0.Uniform1i(e,t.u_image),u_tex_y_a:new _0x2724d0.Uniform1f(e,t.u_tex_y_a),u_tex_y_b:new _0x2724d0.Uniform1f(e,t.u_tex_y_b),u_mix:new _0x2724d0.Uniform1f(e,t.u_mix)}},lineUniformValues:function(e,t,i,n){e.transform;var r=_0x36a875(t),o=_0x3987cc(t,1,n);return{u_matrix:_0x3b87fb(e,t),u_ratio:1/o,u_device_pixel_ratio:1,u_units_to_pixels:[1/r[0],1/r[1]],u_antialiasing:n.lineAntialiasing}},lineGradientUniformValues:function(e,t,i,n){return extend$1(_0x3295b6.lineUniformValues(e,t,i,n),{u_image:0})},linePatternUniformValues:function(e,t,i,n,r){e.transform;var o=_0x4130cd(t,r);return{u_matrix:_0x3b87fb(e,t),u_texsize:t.imageAtlasTexture.size,u_ratio:1/_0x3987cc(t,1,r),u_device_pixel_ratio:1,u_image:0,u_scale:[ref_properties.browser.devicePixelRatio,o,n.fromScale,n.toScale],u_fade:n.t,u_units_to_pixels:_0x36a875(t)}},lineSDFUniformValues:function(e,t,i,n,r,o){e.transform;var a=e.lineAtlas,s=_0x4130cd(t,o),l="round"===i.layout.get("line-cap"),u=a.getDash(n.from,l),c=a.getDash(n.to,l),h=u.width*r.fromScale,d=c.width*r.toScale;return extend$1(_0x3295b6.lineUniformValues(e,t,i,o),{u_patternscale_a:[s/h,-u.height/2],u_patternscale_b:[s/d,-c.height/2],u_sdfgamma:a.width/(256*Math.min(h,d))/2,u_image:0,u_tex_y_a:u.y,u_tex_y_b:c.y,u_mix:r.t})}},_0x4283c3=new r$T;_0x3295b6.lineUniformMap=function(e,t,i,n){e.transform;var r=_0x36a875(t),o=_0x3987cc(t,1,n),a={u_matrix:function(){return _0x3b87fb(e,t)},u_ratio:function(){return 1/o},u_device_pixel_ratio:function(){return 1},u_units_to_pixels:function(){return _0x4283c3.x=1/r[0],_0x4283c3.y=1/r[1],_0x4283c3},u_antialiasing:function(){return n.lineAntialiasing}};return a},_0x3295b6.lineGradientUniformMap=function(e,t,i,n){var r=_0x3295b6.lineUniformMap(e,t,i,n);return r.u_image=function(){return n.image},r};var _0x3bb434=new a$10;_0x3295b6.linePatternUniformMap=function(e,t,i,n,r){e.transform;var o=_0x4130cd(t,r),a={u_matrix:function(){return _0x3b87fb(e,t)},u_texsize:function(){return t.imageAtlasTexture.size},u_ratio:function(){return 1/_0x3987cc(t,1,r)},u_device_pixel_ratio:function(){return 1},u_image:function(){return r.image},u_scale:function(){return _0x3bb434.x=ref_properties.browser.devicePixelRatio,_0x3bb434.y=o,_0x3bb434.z=n.fromScale,_0x3bb434.w=n.toScale,_0x3bb434},u_fade:function(){return n.t},u_units_to_pixels:function(){return _0x36a875(t)}};return a};var _0x2cf1e9=new r$T,_0x595ca0=new r$T;function _0x4130cd(e,t){return 1/_0x3987cc(e,1,t)}function _0x36a875(e){return[2/e.tileSize,-2/e.tileSize]}_0x3295b6.lineSDFUniformMap=function(e,t,i,n,r,o){var a=_0x3295b6.lineUniformMap(e,t,i,o);e.transform;var s=e.lineAtlas,l=_0x4130cd(t,o),u="round"===i.layout.get("line-cap"),c=s.getDash(n.from,u),h=s.getDash(n.to,u),d=c.width*r.fromScale,f=h.width*r.toScale;return a.u_patternscale_a=function(){return _0x2cf1e9.x=l/d,_0x2cf1e9.y=-c.height/2,_0x2cf1e9},a.u_patternscale_b=function(){return _0x595ca0.x=l/f,_0x595ca0.y=-h.height/2,_0x595ca0},a.u_sdfgamma=function(){return s.width/(256*Math.min(d,f))/2},a.u_image=function(){return o.image},a.u_tex_y_a=function(){return c.y},a.u_tex_y_b=function(){return h.y},a.u_mix=function(){return r.t},a};var _0x361d93=new Float32Array(16);function _0x3b87fb(e,t,i){var n=t.viewProjection;return c$1a.toArray(n,_0x361d93)}function t$U(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}var T$_={DONT_CARE:de$x.DONT_CARE,FASTEST:de$x.FASTEST,NICEST:de$x.NICEST,validate:function(e){return e===T$_.DONT_CARE||e===T$_.FASTEST||e===T$_.NICEST}},D$12=Object.freeze(T$_),E$13={NEAREST:de$x.NEAREST,LINEAR:de$x.LINEAR,validate:function(e){return e===E$13.NEAREST||e===E$13.LINEAR}},et$k=Object.freeze(E$13),E$12={NEAREST:de$x.NEAREST,LINEAR:de$x.LINEAR,NEAREST_MIPMAP_NEAREST:de$x.NEAREST_MIPMAP_NEAREST,LINEAR_MIPMAP_NEAREST:de$x.LINEAR_MIPMAP_NEAREST,NEAREST_MIPMAP_LINEAR:de$x.NEAREST_MIPMAP_LINEAR,LINEAR_MIPMAP_LINEAR:de$x.LINEAR_MIPMAP_LINEAR,validate:function(e){return e===E$12.NEAREST||e===E$12.LINEAR||e===E$12.NEAREST_MIPMAP_NEAREST||e===E$12.LINEAR_MIPMAP_NEAREST||e===E$12.NEAREST_MIPMAP_LINEAR||e===E$12.LINEAR_MIPMAP_LINEAR}},tt$l=Object.freeze(E$12),E$11={CLAMP_TO_EDGE:de$x.CLAMP_TO_EDGE,REPEAT:de$x.REPEAT,MIRRORED_REPEAT:de$x.MIRRORED_REPEAT,validate:function(e){return e===E$11.CLAMP_TO_EDGE||e===E$11.REPEAT||e===E$11.MIRRORED_REPEAT}},j$13=Object.freeze(E$11);function a$Q(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT);const t=e$1Y(e.wrapS,j$13.CLAMP_TO_EDGE),i=e$1Y(e.wrapT,j$13.CLAMP_TO_EDGE),n=e$1Y(e.minificationFilter,tt$l.LINEAR),r=e$1Y(e.magnificationFilter,et$k.LINEAR),o=t$$(e.maximumAnisotropy)?e.maximumAnisotropy:1;if(!j$13.validate(t))throw new t$_("Invalid sampler.wrapS.");if(!j$13.validate(i))throw new t$_("Invalid sampler.wrapT.");if(!tt$l.validate(n))throw new t$_("Invalid sampler.minificationFilter.");if(!et$k.validate(r))throw new t$_("Invalid sampler.magnificationFilter.");n$1e.typeOf.number.greaterThanOrEquals("maximumAnisotropy",o,1),this._wrapS=t,this._wrapT=i,this._minificationFilter=n,this._magnificationFilter=r,this._maximumAnisotropy=o}function P$S(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),n$1e.defined("options.context",e.context);const t=e.context;let i=e.width,n=e.height;const r=e.source;t$$(r)&&(t$$(i)||(i=e$1Y(r.videoWidth,r.width)),t$$(n)||(n=e$1Y(r.videoHeight,r.height)));const o=e$1Y(e.pixelFormat,Z$_.RGBA),a=e$1Y(e.pixelDatatype,v$Z.UNSIGNED_BYTE),s=Z$_.toInternalFormat(o,a,t),l=Z$_.isCompressedFormat(s);if(!t$$(i)||!t$$(n))throw new t$_("options requires a source field to create an initialized texture or width and height fields to create a blank texture.");if(n$1e.typeOf.number.greaterThan("width",i,0),i>e$1y.maximumTextureSize)throw new t$_(`Width must be less than or equal to the maximum texture size (${e$1y.maximumTextureSize}). Check maximumTextureSize.`);if(n$1e.typeOf.number.greaterThan("height",n,0),n>e$1y.maximumTextureSize)throw new t$_(`Height must be less than or equal to the maximum texture size (${e$1y.maximumTextureSize}). Check maximumTextureSize.`);if(!Z$_.validate(o))throw new t$_("Invalid options.pixelFormat.");if(!l&&!v$Z.validate(a))throw new t$_("Invalid options.pixelDatatype.");if(o===Z$_.DEPTH_COMPONENT&&a!==v$Z.UNSIGNED_SHORT&&a!==v$Z.UNSIGNED_INT)throw new t$_("When options.pixelFormat is DEPTH_COMPONENT, options.pixelDatatype must be UNSIGNED_SHORT or UNSIGNED_INT.");if(o===Z$_.DEPTH_STENCIL&&a!==v$Z.UNSIGNED_INT_24_8)throw new t$_("When options.pixelFormat is DEPTH_STENCIL, options.pixelDatatype must be UNSIGNED_INT_24_8.");if(a===v$Z.FLOAT&&!t.floatingPointTexture)throw new t$_("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension. Check context.floatingPointTexture.");if(a===v$Z.HALF_FLOAT&&!t.halfFloatingPointTexture)throw new t$_("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension. Check context.halfFloatingPointTexture.");if(Z$_.isDepthFormat(o)){if(t$$(r))throw new t$_("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, source cannot be provided.");if(!t.depthTexture)throw new t$_("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, this WebGL implementation must support WEBGL_depth_texture. Check context.depthTexture.")}if(l){if(!t$$(r)||!t$$(r.arrayBufferView))throw new t$_("When options.pixelFormat is compressed, options.source.arrayBufferView must be defined.");if(Z$_.isDXTFormat(s)&&!t.s3tc)throw new t$_("When options.pixelFormat is S3TC compressed, this WebGL implementation must support the WEBGL_compressed_texture_s3tc extension. Check context.s3tc.");if(Z$_.isPVRTCFormat(s)&&!t.pvrtc)throw new t$_("When options.pixelFormat is PVRTC compressed, this WebGL implementation must support the WEBGL_compressed_texture_pvrtc extension. Check context.pvrtc.");if(Z$_.isASTCFormat(s)&&!t.astc)throw new t$_("When options.pixelFormat is ASTC compressed, this WebGL implementation must support the WEBGL_compressed_texture_astc extension. Check context.astc.");if(Z$_.isETC2Format(s)&&!t.etc)throw new t$_("When options.pixelFormat is ETC2 compressed, this WebGL implementation must support the WEBGL_compressed_texture_etc extension. Check context.etc.");if(Z$_.isETC1Format(s)&&!t.etc1)throw new t$_("When options.pixelFormat is ETC1 compressed, this WebGL implementation must support the WEBGL_compressed_texture_etc1 extension. Check context.etc1.");if(Z$_.isBC7Format(s)&&!t.bc7)throw new t$_("When options.pixelFormat is BC7 compressed, this WebGL implementation must support the EXT_texture_compression_bptc extension. Check context.bc7.");if(Z$_.compressedTextureSizeInBytes(s,i,n)!==r.arrayBufferView.byteLength)throw new t$_("The byte length of the array buffer is invalid for the compressed texture with the given width and height.")}const u=e.preMultiplyAlpha||o===Z$_.RGB||o===Z$_.LUMINANCE,c=e$1Y(e.flipY,!0),h=e$1Y(e.skipColorSpaceConversion,!1);let d=!0;const f=t._gl,p=f.TEXTURE_2D,_=f.createTexture();f.activeTexture(f.TEXTURE0),f.bindTexture(p,_);let m,$=4;if(t$$(r)&&t$$(r.arrayBufferView)&&!l&&($=Z$_.alignmentInBytes(o,a,i)),f.pixelStorei(f.UNPACK_ALIGNMENT,$),h?f.pixelStorei(f.UNPACK_COLORSPACE_CONVERSION_WEBGL,f.NONE):f.pixelStorei(f.UNPACK_COLORSPACE_CONVERSION_WEBGL,f.BROWSER_DEFAULT_WEBGL),t$$(r))if(t$$(r.arrayBufferView)){f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,!1);let e,u,h,d=r.arrayBufferView;if(l){if(f.compressedTexImage2D(p,0,s,i,n,0,d),t$$(r.mipLevels))for(u=i,h=n,e=0;e<r.mipLevels.length;++e)u=0|Math.floor(u/2),u<1&&(u=1),h=0|Math.floor(h/2),h<1&&(h=1),f.compressedTexImage2D(p,e+1,s,u,h,0,r.mipLevels[e])}else if(c&&(d=Z$_.flipY(d,o,a,i,n)),f.texImage2D(p,0,s,i,n,0,o,v$Z.toWebGLConstant(a,t),d),t$$(r.mipLevels))for(u=i,h=n,e=0;e<r.mipLevels.length;++e)u=0|Math.floor(u/2),u<1&&(u=1),h=0|Math.floor(h/2),h<1&&(h=1),f.texImage2D(p,e+1,s,u,h,0,o,v$Z.toWebGLConstant(a,t),r.mipLevels[e])}else t$$(r.framebuffer)?(f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,!1),r.framebuffer!==t.defaultFramebuffer&&r.framebuffer._bind(),f.copyTexImage2D(p,0,s,r.xOffset,r.yOffset,i,n,0),r.framebuffer!==t.defaultFramebuffer&&r.framebuffer._unBind()):(f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,c),f.texImage2D(p,0,s,o,v$Z.toWebGLConstant(a,t),r));else f.texImage2D(p,0,s,i,n,0,o,v$Z.toWebGLConstant(a,t),null),d=!1;f.bindTexture(p,null),m=l?Z$_.compressedTextureSizeInBytes(o,i,n):Z$_.textureSizeInBytes(o,a,i,n),this._id=t$U(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=p,this._texture=_,this._internalFormat=s,this._pixelFormat=o,this._pixelDatatype=a,this._width=i,this._height=n,this._dimensions=new r$T(i,n),this._hasMipmap=!1,this._sizeInBytes=m,this._preMultiplyAlpha=u,this._flipY=c,this._initialized=d,this._sampler=void 0,this.sampler=t$$(e.sampler)?e.sampler:new a$Q,t.memorySize+=m}Object.defineProperties(a$Q.prototype,{wrapS:{get:function(){return this._wrapS}},wrapT:{get:function(){return this._wrapT}},minificationFilter:{get:function(){return this._minificationFilter}},magnificationFilter:{get:function(){return this._magnificationFilter}},maximumAnisotropy:{get:function(){return this._maximumAnisotropy}}}),a$Q.equals=function(e,t){return e===t||t$$(e)&&t$$(t)&&e._wrapS===t._wrapS&&e._wrapT===t._wrapT&&e._minificationFilter===t._minificationFilter&&e._magnificationFilter===t._magnificationFilter&&e._maximumAnisotropy===t._maximumAnisotropy},a$Q.NEAREST=Object.freeze(new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST})),P$S.create=function(e){return new P$S(e)},P$S.fromFramebuffer=function(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),n$1e.defined("options.context",e.context);const t=e.context,i=t._gl,n=e$1Y(e.pixelFormat,Z$_.RGB),r=e$1Y(e.framebufferXOffset,0),o=e$1Y(e.framebufferYOffset,0),a=e$1Y(e.width,i.drawingBufferWidth),s=e$1Y(e.height,i.drawingBufferHeight),l=e.framebuffer;if(!Z$_.validate(n))throw new t$_("Invalid pixelFormat.");if(Z$_.isDepthFormat(n)||Z$_.isCompressedFormat(n))throw new t$_("pixelFormat cannot be DEPTH_COMPONENT, DEPTH_STENCIL or a compressed format.");if(n$1e.defined("options.context",e.context),n$1e.typeOf.number.greaterThanOrEquals("framebufferXOffset",r,0),n$1e.typeOf.number.greaterThanOrEquals("framebufferYOffset",o,0),r+a>i.drawingBufferWidth)throw new t$_("framebufferXOffset + width must be less than or equal to drawingBufferWidth");if(o+s>i.drawingBufferHeight)throw new t$_("framebufferYOffset + height must be less than or equal to drawingBufferHeight.");return new P$S({context:t,width:a,height:s,pixelFormat:n,source:{framebuffer:t$$(l)?l:t.defaultFramebuffer,xOffset:r,yOffset:o,width:a,height:s}})},Object.defineProperties(P$S.prototype,{id:{get:function(){return this._id},set:function(e){this._id=e}},sampler:{get:function(){return this._sampler},set:function(e){let t=e.minificationFilter,i=e.magnificationFilter;const n=this._context,r=this._pixelFormat,o=this._pixelDatatype,a=t===tt$l.NEAREST_MIPMAP_NEAREST||t===tt$l.NEAREST_MIPMAP_LINEAR||t===tt$l.LINEAR_MIPMAP_NEAREST||t===tt$l.LINEAR_MIPMAP_LINEAR;(o===v$Z.FLOAT&&!n.textureFloatLinear||o===v$Z.HALF_FLOAT&&!n.textureHalfFloatLinear)&&(t=a?tt$l.NEAREST_MIPMAP_NEAREST:tt$l.NEAREST,i=et$k.NEAREST),n.webgl2&&Z$_.isDepthFormat(r)&&(t=tt$l.NEAREST,i=et$k.NEAREST);const s=n._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,i),s.texParameteri(l,s.TEXTURE_WRAP_S,e.wrapS),s.texParameteri(l,s.TEXTURE_WRAP_T,e.wrapT),t$$(this._textureFilterAnisotropic)&&s.texParameteri(l,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),s.bindTexture(l,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}}),P$S.prototype.copyFrom=function(e,t,i){if(t=e$1Y(t,0),i=e$1Y(i,0),n$1e.defined("source",e),Z$_.isDepthFormat(this._pixelFormat))throw new t$_("Cannot call copyFrom when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");if(Z$_.isCompressedFormat(this._pixelFormat))throw new t$_("Cannot call copyFrom with a compressed texture pixel format.");n$1e.typeOf.number.greaterThanOrEquals("xOffset",t,0),n$1e.typeOf.number.greaterThanOrEquals("yOffset",i,0),n$1e.typeOf.number.lessThanOrEquals("xOffset + source.width",t+e.width,this._width),n$1e.typeOf.number.lessThanOrEquals("yOffset + source.height",i+e.height,this._height);const n=this._context;var r=n._gl,o=this._textureTarget;r.activeTexture(r.TEXTURE0),r.bindTexture(o,this._texture);var a=e.width,s=e.height,l=e.arrayBufferView,u=this._width,c=this._height,h=this._pixelFormat,d=this._pixelDatatype;const f=this._internalFormat;var p=this._preMultiplyAlpha,_=this._flipY,m=4;t$$(l)&&(m=Z$_.alignmentInBytes(h,d,a)),r.pixelStorei(r.UNPACK_ALIGNMENT,m),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,r.BROWSER_DEFAULT_WEBGL);var $=!1;if(!this._initialized){if(0===t&&0===i&&a===u&&s===c)t$$(l)?(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),_&&(l=Z$_.flipY(l,h,d,u,c)),r.texImage2D(o,0,f,u,c,0,h,v$Z.toWebGLConstant(d,n),l)):(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,p),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,_),r.texImage2D(o,0,f,h,v$Z.toWebGLConstant(d,n),e)),$=!0;else{r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1);var g=Z$_.createTypedArray(h,d,u,c);r.texImage2D(o,0,f,u,c,0,h,v$Z.toWebGLConstant(d,n),g)}this._initialized=!0}$||(t$$(l)?(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),_&&(l=Z$_.flipY(l,h,d,a,s)),r.texSubImage2D(o,0,t,i,a,s,h,v$Z.toWebGLConstant(d,n),l)):(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,p),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,_),r.texSubImage2D(o,0,t,i,h,v$Z.toWebGLConstant(d,n),e))),r.bindTexture(o,null)},P$S.prototype.copyFromFramebuffer=function(e,t,i,n,r,o){if(e=e$1Y(e,0),t=e$1Y(t,0),i=e$1Y(i,0),n=e$1Y(n,0),r=e$1Y(r,this._width),o=e$1Y(o,this._height),Z$_.isDepthFormat(this._pixelFormat))throw new t$_("Cannot call copyFromFramebuffer when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");if(this._pixelDatatype===v$Z.FLOAT)throw new t$_("Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.");if(this._pixelDatatype===v$Z.HALF_FLOAT)throw new t$_("Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.");if(Z$_.isCompressedFormat(this._pixelFormat))throw new t$_("Cannot call copyFrom with a compressed texture pixel format.");n$1e.typeOf.number.greaterThanOrEquals("xOffset",e,0),n$1e.typeOf.number.greaterThanOrEquals("yOffset",t,0),n$1e.typeOf.number.greaterThanOrEquals("framebufferXOffset",i,0),n$1e.typeOf.number.greaterThanOrEquals("framebufferYOffset",n,0),n$1e.typeOf.number.lessThanOrEquals("xOffset + width",e+r,this._width),n$1e.typeOf.number.lessThanOrEquals("yOffset + height",t+o,this._height);const a=this._context._gl,s=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(s,this._texture),a.copyTexSubImage2D(s,0,e,t,i,n,r,o),a.bindTexture(s,null),this._initialized=!0},P$S.prototype.generateMipmap=function(e){if(e=e$1Y(e,D$12.DONT_CARE),Z$_.isDepthFormat(this._pixelFormat))throw new t$_("Cannot call generateMipmap when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");if(Z$_.isCompressedFormat(this._pixelFormat))throw new t$_("Cannot call generateMipmap with a compressed pixel format.");if(!this._context.webgl2){if(this._width>1&&!n$1d.isPowerOfTwo(this._width))throw new t$_("width must be a power of two to call generateMipmap() in a WebGL1 context.");if(this._height>1&&!n$1d.isPowerOfTwo(this._height))throw new t$_("height must be a power of two to call generateMipmap() in a WebGL1 context.")}if(!D$12.validate(e))throw new t$_("hint is invalid.");this._hasMipmap=!0;const t=this._context._gl,i=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i),t.bindTexture(i,null)},P$S.prototype.isDestroyed=function(){return!1},P$S.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._context.memorySize-=this._sizeInBytes,s$1e(this)};var _0x174248=(_0x42eebb=!0,function(e,t){var i=_0x42eebb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x42eebb=!1,i}),_0x525f0c=_0x174248(void 0,(function(){return _0x525f0c.toString().search("(((.+)+)+)+$").toString().constructor(_0x525f0c).search("(((.+)+)+)+$")})),_0x42eebb;_0x525f0c();var _0x2d5622=window.HTMLImageElement,_0x187113=window.HTMLCanvasElement,_0x588056=window.HTMLVideoElement,_0x4515c6=window.ImageData,_0x463a8e=function(e,t,i,n,r){this.context=e,this.cesiumContext=t,this.format=n,this.update(i,r)};_0x463a8e.prototype.update=function(e,t,i){var n=e.width,r=e.height;this.useMipmap=Boolean(t&&t.useMipmap),!(this.size&&this.size[0]===n&&this.size[1]===r||i)&&(this.size=[n,r],this.cesiumTexture&&this.cesiumTexture.destroy());var o=e;if(o=e instanceof _0x2d5622||e instanceof _0x187113||e instanceof _0x588056||e instanceof _0x4515c6?e:e.data,this.cesiumTexture){var a=i||{x:0,y:0},s=a.x,l=a.y;this.cesiumTexture.copyFrom({width:n,height:r,arrayBufferView:e},s,l)}else this.cesiumTexture=new P$S({context:this.cesiumContext,source:{arrayBufferView:o},width:n,height:r,pixelFormat:this.format,flipY:!1});this.useMipmap&&this.isSizePowerOfTwo()&&this.cesiumTexture.generateMipmap()},_0x463a8e.prototype.bind=function(e,t,i){i===tt$l.LINEAR_MIPMAP_NEAREST&&!this.isSizePowerOfTwo()&&(i=tt$l.LINEAR),(e!==this.filter||i!==this.minFilter||t!==this.wrap)&&(this.filter=e,this.minFilter=i,this.wrap=t,this.sampler&&this.sampler.destroy(),this.sampler=new a$Q({wrapS:t,wrapT:t,minificationFilter:i,magnificationFilter:e}),this.cesiumTexture.sampler=this.sampler)},_0x463a8e.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},_0x463a8e.prototype.destroy=function(){this.cesiumTexture&&(this.cesiumTexture.destroy(),this.cesiumTexture=null)};var _0x201112=(_0x5f1901=!0,function(e,t){var i=_0x5f1901?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5f1901=!1,i}),_0x19623a=_0x201112(void 0,(function(){return _0x19623a.toString().search("(((.+)+)+)+$").toString().constructor(_0x19623a).search("(((.+)+)+)+$")})),_0x5f1901;function _0x54b6b1(e,t,i,n){if("translucent"===e.renderPass&&t$$(i)&&t$$(i.paint)){var r=i.paint.get("line-opacity"),o=i.paint.get("line-width");if(0!==r.constantOr(1)&&0!==o.constantOr(1)){var a=e.depthModeForSublayer(0,_0x358f1c.ReadOnly),s=e.colorModeForRenderPass(),l=i.paint.get("line-dasharray"),u=i.paint.get("line-pattern"),c=u&&u.constantOr(1),h=i.paint.get("line-gradient"),d=i.getCrossfadeParameters(),f=l?"lineSDF":c?"linePattern":h?"lineGradient":"line",p=e.context,_=e.cesiumContext;if(h){var m=i.gradientTexture;if(!i.gradient)return;!m&&(m=i.gradientTexture=new _0x463a8e(p,_,i.gradient,de$x.RGBA)),m.bind(de$x.LINEAR,de$x.CLAMP_TO_EDGE)}var $=t.getBucket(i);if($){var g=$.programConfigurations.get(i.id),y=e.useProgram(f,g).cesiumProgram,v=u.constantOr(null);if(v&&t.imageAtlas){var x=t.imageAtlas,b=x.patternPositions[v.to.toString()],S=x.patternPositions[v.from.toString()];b&&S&&g.setConstantPatternPositions(b,S)}var w=o.value.value,C=w;C*=e._globalLineWidthScale,i.paint._values["line-width"].value.value=C,l?n.image=e.lineAtlas.getTexture(_):c&&(t.imageAtlasTexture.bind(de$x.LINEAR,de$x.CLAMP_TO_EDGE),n.image=t.imageAtlasTexture.cesiumTexture,g.updatePatternPaintBuffers(d));var T=l?_0x3295b6.lineSDFUniformMap(e,t,i,l,d,n):c?_0x3295b6.linePatternUniformMap(e,t,i,d,n):h?_0x3295b6.lineGradientUniformMap(e,t,i,n):_0x3295b6.lineUniformMap(e,t,i,n),P=y.allUniforms;T=g.getUniformMaps(P,i.paint,T);for(var E=g.getAttributeLocation(),A=0,L=$.segments.get();A<L.length;A+=1){var M=L[A],I=(M.drawCommands||(M.drawCommands={}))[i.id];if(!I){I=new s$1d({cull:!1,primitiveType:H$11.TRIANGLES,count:3*M.primitiveLength,offset:3*M.primitiveOffset}),M.drawCommands[i.id]=I;for(var O=M.cesiumVaos||(M.cesiumVaos={}),D=[],R=0;R<$.layoutCesiumVertexBuffer.attributes.length;R++){var N=$.layoutCesiumVertexBuffer.attributes[R],F=_0xbea57e.mbxAttributeToCesiumVertexArrtribute(N,$.layoutCesiumVertexBuffer,E[N.name],M.vertexOffset);D.push(F)}var B=O[i.id]||(O[i.id]=new x$18({context:_,attributes:D,indexBuffer:$.cesiumIndexBuffer}));I.vertexArray=B}T.u_depthRange=function(){return 1-a.range[0]},I.uniformMap=T,I.renderState=_0xbea57e.toRenderState(s,a,_0x5d4b2b.disabled),I.shaderProgram=y,I.execute(_,n.passState)}i.paint._values["line-width"].value.value=w}}}}_0x19623a();var _0x422a83=(_0x589aa4=!0,function(e,t){var i=_0x589aa4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x589aa4=!1,i}),_0x41a018=_0x422a83(void 0,(function(){return _0x41a018.toString().search("(((.+)+)+)+$").toString().constructor(_0x41a018).search("(((.+)+)+)+$")})),_0x589aa4;function _0x2322a1(e,t,i,n){n.drawFillPattern=!0;var r=1/_0x3987cc(i,1,n);i.realtime&&(r*=2);var o=i.targetTileSize*i.x,a=i.targetTileSize*i.y;return{u_image:0,u_texsize:i.imageAtlasTexture.size,u_scale:[1,r,e.fromScale,e.toScale],u_fade:e.t,u_pixel_coord_upper:[o>>16,a>>16],u_pixel_coord_lower:[65535&o,65535&a]}}_0x41a018();var _0x5008a5=new a$10,_0x59ef1d=new r$T,_0x17b96a=new r$T,_0x39956f=new r$T;function _0x305942(e,t,i,n){n.drawFillPattern=!0;var r=1/_0x3987cc(i,1,n);i.realtime&&(r*=2);var o=i.targetTileSize*i.x,a=i.targetTileSize*i.y;return e.u_image=function(){return n.image},e.u_texsize=function(){return _0x39956f.x=i.imageAtlasTexture.size[0],_0x39956f.y=i.imageAtlasTexture.size[1],_0x39956f},e.u_scale=function(){return _0x5008a5.x=1,_0x5008a5.y=r,_0x5008a5.z=t.fromScale,_0x5008a5.w=t.toScale,_0x5008a5},e.u_fade=function(){return t.t},e.u_pixel_coord_lower=function(){return _0x59ef1d.x=65535&o,_0x59ef1d.y=65535&a,_0x59ef1d},e.u_pixel_coord_upper=function(){return _0x17b96a.x=o>>16,_0x17b96a.y=a>>16,_0x17b96a},e}var _0x2636a7={fillUniforms:function(e,t){return{u_matrix:new _0x2724d0.UniformMatrix4f(e,t.u_matrix)}},fillPatternUniforms:function(e,t){return{u_matrix:new _0x2724d0.UniformMatrix4f(e,t.u_matrix),u_image:new _0x2724d0.Uniform1i(e,t.u_image),u_texsize:new _0x2724d0.Uniform2f(e,t.u_texsize),u_pixel_coord_upper:new _0x2724d0.Uniform2f(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new _0x2724d0.Uniform2f(e,t.u_pixel_coord_lower),u_scale:new _0x2724d0.Uniform4f(e,t.u_scale),u_fade:new _0x2724d0.Uniform1f(e,t.u_fade)}},fillOutlineUniforms:function(e,t){return{u_matrix:new _0x2724d0.UniformMatrix4f(e,t.u_matrix),u_world:new _0x2724d0.Uniform2f(e,t.u_world)}},fillOutlinePatternUniforms:function(e,t){return{u_matrix:new _0x2724d0.UniformMatrix4f(e,t.u_matrix),u_world:new _0x2724d0.Uniform2f(e,t.u_world),u_image:new _0x2724d0.Uniform1i(e,t.u_image),u_texsize:new _0x2724d0.Uniform2f(e,t.u_texsize),u_pixel_coord_upper:new _0x2724d0.Uniform2f(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new _0x2724d0.Uniform2f(e,t.u_pixel_coord_lower),u_scale:new _0x2724d0.Uniform4f(e,t.u_scale),u_fade:new _0x2724d0.Uniform1f(e,t.u_fade)}},fillUniformValues:function(e){return{u_matrix:e}},fillPatternUniformValues:function(e,t,i,n,r){return extend$1(_0x2636a7.fillUniformValues(e),_0x2322a1(i,t,n,r))},fillOutlineUniformValues:function(e,t){return{u_matrix:e,u_world:t}},fillOutlinePatternUniformValues:function(e,t,i,n,r,o){return extend$1(_0x2636a7.fillPatternUniformValues(e,t,i,n,o),{u_world:r})},fillUniformMap:function(e){var t={u_matrix:function(){return e}};return t},fillPatternUniformMap:function(e,t,i,n,r){var o=_0x2636a7.fillUniformMap(e);return o=_0x305942(o,i,n,r)}},_0x54e5c2=new r$T;_0x2636a7.fillOutlineUniformMap=function(e,t){var i={u_matrix:function(){return e},u_world:function(){return _0x54e5c2.x=t[0],_0x54e5c2.y=t[1],_0x54e5c2}};return i},_0x2636a7.fillOutlinePatternUniformMap=function(e,t,i,n,r,o){var a={};return(a=_0x2636a7.fillPatternUniformMap(e,t,i,n,o)).u_world=function(){return _0x54e5c2.x=r[0],_0x54e5c2.y=r[1],_0x54e5c2},a};var _0x14e7ee=(_0x3e2940=!0,function(e,t){var i=_0x3e2940?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3e2940=!1,i}),_0x26df49=_0x14e7ee(void 0,(function(){return _0x26df49.toString().search("(((.+)+)+)+$").toString().constructor(_0x26df49).search("(((.+)+)+)+$")})),_0x3e2940;_0x26df49();var _0x104b82=new Float32Array(16),_0x546c4c={};function _0x51fa86(e,t,i,n,r,o,a){var s,l,u,c,h=i.paint.get("fill-pattern"),d=h&&h.constantOr(1),f=i.getCrossfadeParameters(),p={};o?(l=d&&!i.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",s=H$11.LINES):(l=d?"fillPattern":"fill",s=H$11.TRIANGLES);var _=t.getBucket(i);if(_){var m=_.programConfigurations.get(i.id);d&&(t.imageAtlasTexture.bind(de$x.LINEAR,de$x.CLAMP_TO_EDGE),a.image=t.imageAtlasTexture.cesiumTexture,m.updatePatternPaintBuffers(f));var $=h.constantOr(null);if($&&t.imageAtlas){var g=t.imageAtlas,y=g.patternPositions[$.to.toString()],v=g.patternPositions[$.from.toString()];y&&v&&m.setConstantPatternPositions(y,v)}var x=e.useProgram(l,m).cesiumProgram,b=t.viewProjection,S=c$1a.toArray(b,_0x104b82);if(o){c=_.cesiumIndexBuffer2,u=_.segments2;var w=[t.tileSize,t.tileSize];p="fillOutlinePattern"===l&&d?_0x2636a7.fillOutlinePatternUniformMap(S,e,f,t,w,a):_0x2636a7.fillOutlineUniformMap(S,w)}else c=_.cesiumIndexBuffer,u=_.segments,p=d?_0x2636a7.fillPatternUniformMap(S,e,f,t,a):_0x2636a7.fillUniformMap(S);var C=x.allUniforms;p=m.getUniformMaps(C,i.paint,p);for(var T=m.getPaintVertexBuffers(),P=m.getAttributeLocation(),E=0,A=u.get();E<A.length;E+=1){var L=A[E],M=(L.drawCommands||(L.drawCommands={}))[i.id];if(!M){var I=_0x546c4c[s];M=new s$1d({cull:!1,primitiveType:s,count:L.primitiveLength*I,offset:L.primitiveOffset*I}),L.drawCommands[i.id]=M;for(var O=L.cesiumVaos||(L.cesiumVaos={}),D=[],R=0;R<_.layoutCesiumVertexBuffer.attributes.length;R++){var N=_.layoutCesiumVertexBuffer.attributes[R],F=_0xbea57e.mbxAttributeToCesiumVertexArrtribute(N,_.layoutCesiumVertexBuffer,P[N.name],L.vertexOffset);D.push(F)}D.length;for(var B=0;B<T.length;B++)for(var z=T[B],G=0;G<z.attributes.length;G++){N=z.attributes[G],F=_0xbea57e.mbxAttributeToCesiumVertexArrtribute(N,z,P[N.name]);D.push(F)}var k=O[i.id]||(O[i.id]=new x$18({context:e.cesiumContext,attributes:D,indexBuffer:c}));M.vertexArray=k}p.u_depthRange=function(){return 1-n.range[0]},M.uniformMap=p,M.renderState=_0xbea57e.toRenderState(r,n,_0x5d4b2b.disabled),M.shaderProgram=x,M.execute(e.cesiumContext,a.passState)}}}function _0x16eb79(e,t,i,n){var r=i.paint.get("fill-color"),o=i.paint.get("fill-opacity"),a=o.value.value;if(o.value.value=0!==o.value.value?.5*o.value.value+.5:0,0!==o.constantOr(1)){var s=e.colorModeForRenderPass(),l=i.paint.get("fill-pattern").constantOr(1)||1!==r.constantOr(_0x5b501e.transparent).a||1!==o.constantOr(0)?"translucent":"opaque";if(e.renderPass===l){var u=e.depthModeForSublayer(1,"opaque"===e.renderPass?_0x358f1c.ReadWrite:_0x358f1c.ReadOnly);_0x51fa86(e,t,i,u,s,!1,n)}if("translucent"===e.renderPass&&i.paint.get("fill-antialias")){var c=e.depthModeForSublayer(i.getPaintProperty("fill-outline-color")?2:0,_0x358f1c.ReadOnly);_0x51fa86(e,t,i,c,s,!0,n)}o.value.value=a}}_0x546c4c[H$11.LINES]=2,_0x546c4c[H$11.TRIANGLES]=3,_0x546c4c[H$11.LINE_STRIP]=1;var _0x615024=(_0x274ec1=!0,function(e,t){var i=_0x274ec1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x274ec1=!1,i}),_0x2e1f5f=_0x615024(void 0,(function(){return _0x2e1f5f.toString().search("(((.+)+)+)+$").toString().constructor(_0x2e1f5f).search("(((.+)+)+)+$")})),_0x274ec1;function _0x279c0d(e,t){this.x=e,this.y=t}_0x2e1f5f(),_0x279c0d.prototype={clone:function(){return new _0x279c0d(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,i=e.y-this.y;return t*t+i*i},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,i=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=i,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),i=Math.sin(e),n=t*this.x-i*this.y,r=i*this.x+t*this.y;return this.x=n,this.y=r,this},_rotateAround:function(e,t){var i=Math.cos(e),n=Math.sin(e),r=t.x+i*(this.x-t.x)-n*(this.y-t.y),o=t.y+n*(this.x-t.x)+i*(this.y-t.y);return this.x=r,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},_0x279c0d.convert=function(e){return e instanceof _0x279c0d?e:Array.isArray(e)?new _0x279c0d(e[0],e[1]):e};var _0x5dac8b=(_0x2cb71a=!0,function(e,t){var i=_0x2cb71a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2cb71a=!1,i}),_0x598973=_0x5dac8b(void 0,(function(){return _0x598973.toString().search("(((.+)+)+)+$").toString().constructor(_0x598973).search("(((.+)+)+)+$")})),_0x2cb71a;_0x598973();var _0x5f2e8e={"Latin-1 Supplement":function(e){return e>=128&&e<=255},Arabic:function(e){return e>=1536&&e<=1791},"Arabic Supplement":function(e){return e>=1872&&e<=1919},"Arabic Extended-A":function(e){return e>=2208&&e<=2303},"Hangul Jamo":function(e){return e>=4352&&e<=4607},"Unified Canadian Aboriginal Syllabics":function(e){return e>=5120&&e<=5759},Khmer:function(e){return e>=6016&&e<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(e){return e>=6320&&e<=6399},"General Punctuation":function(e){return e>=8192&&e<=8303},"Letterlike Symbols":function(e){return e>=8448&&e<=8527},"Number Forms":function(e){return e>=8528&&e<=8591},"Miscellaneous Technical":function(e){return e>=8960&&e<=9215},"Control Pictures":function(e){return e>=9216&&e<=9279},"Optical Character Recognition":function(e){return e>=9280&&e<=9311},"Enclosed Alphanumerics":function(e){return e>=9312&&e<=9471},"Geometric Shapes":function(e){return e>=9632&&e<=9727},"Miscellaneous Symbols":function(e){return e>=9728&&e<=9983},"Miscellaneous Symbols and Arrows":function(e){return e>=11008&&e<=11263},"CJK Radicals Supplement":function(e){return e>=11904&&e<=12031},"Kangxi Radicals":function(e){return e>=12032&&e<=12255},"Ideographic Description Characters":function(e){return e>=12272&&e<=12287},"CJK Symbols and Punctuation":function(e){return e>=12288&&e<=12351},Hiragana:function(e){return e>=12352&&e<=12447},Katakana:function(e){return e>=12448&&e<=12543},Bopomofo:function(e){return e>=12544&&e<=12591},"Hangul Compatibility Jamo":function(e){return e>=12592&&e<=12687},Kanbun:function(e){return e>=12688&&e<=12703},"Bopomofo Extended":function(e){return e>=12704&&e<=12735},"CJK Strokes":function(e){return e>=12736&&e<=12783},"Katakana Phonetic Extensions":function(e){return e>=12784&&e<=12799},"Enclosed CJK Letters and Months":function(e){return e>=12800&&e<=13055},"CJK Compatibility":function(e){return e>=13056&&e<=13311},"CJK Unified Ideographs Extension A":function(e){return e>=13312&&e<=19903},"Yijing Hexagram Symbols":function(e){return e>=19904&&e<=19967},"CJK Unified Ideographs":function(e){return e>=19968&&e<=40959},"Yi Syllables":function(e){return e>=40960&&e<=42127},"Yi Radicals":function(e){return e>=42128&&e<=42191},"Hangul Jamo Extended-A":function(e){return e>=43360&&e<=43391},"Hangul Syllables":function(e){return e>=44032&&e<=55215},"Hangul Jamo Extended-B":function(e){return e>=55216&&e<=55295},"Private Use Area":function(e){return e>=57344&&e<=63743},"CJK Compatibility Ideographs":function(e){return e>=63744&&e<=64255},"Arabic Presentation Forms-A":function(e){return e>=64336&&e<=65023},"Vertical Forms":function(e){return e>=65040&&e<=65055},"CJK Compatibility Forms":function(e){return e>=65072&&e<=65103},"Small Form Variants":function(e){return e>=65104&&e<=65135},"Arabic Presentation Forms-B":function(e){return e>=65136&&e<=65279},"Halfwidth and Fullwidth Forms":function(e){return e>=65280&&e<=65519}};const _0x3d2104=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3dbe44=_0x3d2104(void 0,(function(){return _0x3dbe44.toString().search("(((.+)+)+)+$").toString().constructor(_0x3dbe44).search("(((.+)+)+)+$")}));function allowsVerticalWritingMode(e){for(const t of e)if(charHasUprightVerticalOrientation(t.charCodeAt(0)))return!0;return!1}function charHasUprightVerticalOrientation(e){return 746===e||747===e||!(e<4352)&&(!!_0x5f2e8e["Bopomofo Extended"](e)||(!!_0x5f2e8e.Bopomofo(e)||(!(!_0x5f2e8e["CJK Compatibility Forms"](e)||e>=65097&&e<=65103)||(!!_0x5f2e8e["CJK Compatibility Ideographs"](e)||(!!_0x5f2e8e["CJK Compatibility"](e)||(!!_0x5f2e8e["CJK Radicals Supplement"](e)||(!!_0x5f2e8e["CJK Strokes"](e)||(!(!_0x5f2e8e["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||(!!_0x5f2e8e["CJK Unified Ideographs Extension A"](e)||(!!_0x5f2e8e["CJK Unified Ideographs"](e)||(!!_0x5f2e8e["Enclosed CJK Letters and Months"](e)||(!!_0x5f2e8e["Hangul Compatibility Jamo"](e)||(!!_0x5f2e8e["Hangul Jamo Extended-A"](e)||(!!_0x5f2e8e["Hangul Jamo Extended-B"](e)||(!!_0x5f2e8e["Hangul Jamo"](e)||(!!_0x5f2e8e["Hangul Syllables"](e)||(!!_0x5f2e8e.Hiragana(e)||(!!_0x5f2e8e["Ideographic Description Characters"](e)||(!!_0x5f2e8e.Kanbun(e)||(!!_0x5f2e8e["Kangxi Radicals"](e)||(!!_0x5f2e8e["Katakana Phonetic Extensions"](e)||(!(!_0x5f2e8e.Katakana(e)||12540===e)||(!(!_0x5f2e8e["Halfwidth and Fullwidth Forms"](e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||(!(!_0x5f2e8e["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||(!!_0x5f2e8e["Unified Canadian Aboriginal Syllabics"](e)||(!!_0x5f2e8e["Unified Canadian Aboriginal Syllabics Extended"](e)||(!!_0x5f2e8e["Vertical Forms"](e)||(!!_0x5f2e8e["Yijing Hexagram Symbols"](e)||(!!_0x5f2e8e["Yi Syllables"](e)||!!_0x5f2e8e["Yi Radicals"](e))))))))))))))))))))))))))))))}function charInRTLScript(e){return e>=1424&&e<=2303||_0x5f2e8e["Arabic Presentation Forms-A"](e)||_0x5f2e8e["Arabic Presentation Forms-B"](e)}function stringContainsRTLText(e){for(const t of e)if(charInRTLScript(t.charCodeAt(0)))return!0;return!1}_0x3dbe44();const _0x352f13=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x398133=_0x352f13(void 0,(function(){return _0x398133.toString().search("(((.+)+)+)+$").toString().constructor(_0x398133).search("(((.+)+)+)+$")}));_0x398133();const verticalizedCharacterMap={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var _0x3df5a=function(e,t){void 0===t&&(t={}),extend$1(this,t),this.type=e};!function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i){void 0===i&&(i={}),e.call(this,"error",extend$1({error:t},i))}n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r}(_0x3df5a);const _0x56ed6e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x521b2d=_0x56ed6e(void 0,(function(){return _0x521b2d.toString().search("(((.+)+)+)+$").toString().constructor(_0x521b2d).search("(((.+)+)+)+$")}));function _0x3c10d8(e,t){this._transformRequestFn=e,this._customAccessToken=t}function _0x33b13c(e){return 0===e.indexOf("mapbox:")}_0x521b2d(),_0x3c10d8.prototype._createSkuToken=function(){const e=createSkuToken();this._skuToken=e.token,this._skuTokenExpiresAt=e.tokenExpiresAt},_0x3c10d8.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},_0x3c10d8.prototype.transformRequest=function(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}},_0x3c10d8.prototype.normalizeStyleURL=function(e,t){if(!_0x33b13c(e))return e;const i=_0x112478(e);return i.path="/styles/v1"+i.path,this._makeAPIURL(i,this._customAccessToken||t)},_0x3c10d8.prototype.normalizeGlyphsURL=function(e,t){if(!_0x33b13c(e))return e;const i=_0x112478(e);return i.path="/fonts/v1"+i.path,this._makeAPIURL(i,this._customAccessToken||t)},_0x3c10d8.prototype.normalizeSourceURL=function(e,t){if(!_0x33b13c(e))return e;const i=_0x112478(e);return i.path="/v4/"+i.authority+".json",i.params.push("secure"),this._makeAPIURL(i,this._customAccessToken||t)},_0x3c10d8.prototype.normalizeSpriteURL=function(e,t,i,n){const r=_0x112478(e);return _0x33b13c(e)?(r.path="/styles/v1"+r.path+"/sprite"+t+i,this._makeAPIURL(r,this._customAccessToken||n)):(r.path+=""+t+i,_0x349ab2(r))},_0x3c10d8.prototype.normalizeTileURL=function(e,t,i){if(this._isSkuTokenExpired()&&this._createSkuToken(),!t||!_0x33b13c(t))return e;const n=_0x112478(e),r=browser.devicePixelRatio>=2||512===i?"@2x":"",o=webpSupported.supported?".webp":"$1";return n.path=n.path.replace(/(\.(png|jpg)\d*)(?=$)/,""+r+o),n.path=n.path.replace(/^.+\/v4\//,"/"),n.path="/v4"+n.path,config.REQUIRE_ACCESS_TOKEN&&(config.ACCESS_TOKEN||this._customAccessToken)&&this._skuToken&&n.params.push("sku="+this._skuToken),this._makeAPIURL(n,this._customAccessToken)},_0x3c10d8.prototype.canonicalizeTileURL=function(e){const t=_0x112478(e);if(!t.path.match(/(^\/v4\/)/)||!t.path.match(/\.[\w]+$/))return e;let i="mapbox://tiles/";i+=t.path.replace("/v4/","");const n=t.params.filter((e=>!e.match(/^access_token=/)));return n.length&&(i+="?"+n.join("&")),i},_0x3c10d8.prototype.canonicalizeTileset=function(e,t){if(!_0x33b13c(t))return e.tiles||[];const i=[];for(const t of e.tiles){const e=this.canonicalizeTileURL(t);i.push(e)}return i},_0x3c10d8.prototype._makeAPIURL=function(e,t){const i="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",n=_0x112478(config.API_URL);if(e.protocol=n.protocol,e.authority=n.authority,"/"!==n.path&&(e.path=""+n.path+e.path),!config.REQUIRE_ACCESS_TOKEN)return _0x349ab2(e);if(!(t=t||config.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+i);if("s"===t[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+i);return e.params=e.params.filter((e=>-1===e.indexOf("access_token"))),e.params.push("access_token="+t),_0x349ab2(e)};const _0x43205d=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function _0x1208d7(e){return _0x43205d.test(e)}function _0x593f63(e){return e.indexOf("sku=")>0&&_0x1208d7(e)}const _0x2174e7=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function _0x112478(e){const t=e.match(_0x2174e7);if(!t)throw new Error("Unable to parse URL object");return{protocol:t[1],authority:t[2],path:t[3]||"/",params:t[4]?t[4].split("&"):[]}}function _0x349ab2(e){const t=e.params.length?"?"+e.params.join("&"):"";return e.protocol+"://"+e.authority+e.path+t}const _0x4d3a2f=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4aa6fd=_0x4d3a2f(void 0,(function(){return _0x4aa6fd.toString().search("(((.+)+)+)+$").toString().constructor(_0x4aa6fd).search("(((.+)+)+)+$")}));_0x4aa6fd();const _0x3ce9b3="mapbox-tiles",_0x9695c7=42e4;let _0x34d13e;function _0x3cd52b(e,t){if(void 0===_0x34d13e)try{new Response(new ReadableStream),_0x34d13e=!0}catch(e){_0x34d13e=!1}_0x34d13e?t(e.body):e.blob().then(t)}function cachePut(e,t,i){if(!window.caches)return;const n={status:t.status,statusText:t.statusText,headers:new window.Headers};t.headers.forEach(((e,t)=>n.headers.set(t,e)));const r=parseCacheControl(t.headers.get("Cache-Control")||"");if(r["no-store"])return;r["max-age"]&&n.headers.set("Expires",new Date(i+1e3*r["max-age"]).toUTCString());new Date(n.headers.get("Expires")).getTime()-i<_0x9695c7||_0x3cd52b(t,(t=>{const i=new window.Response(t,n);window.caches.open(_0x3ce9b3).then((t=>t.put(_0xab6cfa(e.url),i)))}))}function _0xab6cfa(e){const t=e.indexOf("?");return t<0?e:e.slice(0,t)}function cacheGet(e,t){if(!window.caches)return t(null);const i=_0xab6cfa(e.url);window.caches.open(_0x3ce9b3).catch(t).then((e=>{e.match(i).catch(t).then((n=>{const r=_0x4bb216(n);e.delete(i),r&&e.put(i,n.clone()),t(null,n,r)}))}))}function _0x4bb216(e){if(!e)return!1;const t=new Date(e.headers.get("Expires")),i=parseCacheControl(e.headers.get("Cache-Control")||"");return t>Date.now()&&!i["no-cache"]}const _0xa2f027=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4056f0=_0xa2f027(void 0,(function(){return _0x4056f0.toString().search("(((.+)+)+)+$").toString().constructor(_0x4056f0).search("(((.+)+)+)+$")}));_0x4056f0();const _0x466424={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(_0x466424);class _0x58babd extends Error{constructor(e,t,i){401===t&&_0x1208d7(i)&&(e+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),super(e),this.status=t,this.url=i,this.name=this.constructor.name,this.message=e}toString(){return this.name+": "+this.message+" ("+this.status+"): "+this.url}}const getReferrer=isWorker()?()=>self.worker&&self.worker.referrer:()=>("blob:"===window.location.protocol?window.parent:window).location.href,_0x34bc4c=e=>/^file:/.test(e)||/^file:/.test(getReferrer())&&!/^\w+:/.test(e);function _0x388f0c(e,t){const i=isWorker()?self:window,n=new i.AbortController,r=new i.Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,referrer:getReferrer(),signal:n.signal});let o=!1,a=!1;const s=_0x593f63(r.url);"json"===e.type&&r.headers.set("Accept","application/json");const l=(n,o,l)=>{if(a)return;if(n&&"SecurityError"!==n.message&&warnOnce$1(n),o&&l)return u(o);const c=Date.now();i.fetch(r).then((i=>{if(i.ok){const e=s?i.clone():null;return u(i,e,c)}return t(new _0x58babd(i.statusText,i.status,e.url))})).catch((e=>{20!==e.code&&t(new Error(e.message))}))},u=(i,n,s)=>{("arrayBuffer"===e.type?i.arrayBuffer():"json"===e.type?i.json():i.text()).then((e=>{a||(n&&s&&cachePut(r,n,s),o=!0,t(null,e,i.headers.get("Cache-Control"),i.headers.get("Expires")))})).catch((e=>t(new Error(e.message))))};return s?cacheGet(r,l):l(null,null),{cancel:()=>{a=!0,o||n.abort()}}}function _0x47268c(e,t){const i=new((isWorker()?self:window).XMLHttpRequest);i.open(e.method||"GET",e.url,!0),"arrayBuffer"===e.type&&(i.responseType="arraybuffer");for(const t in e.headers)i.setRequestHeader(t,e.headers[t]);return"json"===e.type&&(i.responseType="text",i.setRequestHeader("Accept","application/json")),i.withCredentials="include"===e.credentials,i.onerror=()=>{t(new Error(i.statusText))},i.onload=()=>{if((i.status>=200&&i.status<300||0===i.status)&&null!==i.response){let n=i.response;if("json"===e.type)try{n=JSON.parse(i.response)}catch(e){return t(e)}t(null,n,i.getResponseHeader("Cache-Control"),i.getResponseHeader("Expires"))}else t(new _0x58babd(i.statusText,i.status,e.url))},i.send(e.body),{cancel:()=>i.abort()}}const makeRequest=function(e,t){const i=isWorker()?self:window;if(!_0x34bc4c(e.url)){if(i.fetch&&i.Request&&i.AbortController&&i.Request.prototype.hasOwnProperty("signal"))return _0x388f0c(e,t);if(isWorker()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t)}return _0x47268c(e,t)},getJSON=function(e,t){return makeRequest(extend$1(e,{type:"json"}),t)},getArrayBuffer=function(e,t){return makeRequest(extend$1(e,{type:"arrayBuffer"}),t)},_0xfc2270="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let _0x2d1d04,_0x98ca35;const resetImageRequestQueue=()=>{_0x2d1d04=[],_0x98ca35=0};resetImageRequestQueue();const _0x22d088=16,getImage=function(e,t){if(_0x98ca35>=_0x22d088){const i={requestParameters:e,callback:t,cancelled:!1,cancel(){this.cancelled=!0}};return _0x2d1d04.push(i),i}_0x98ca35++;let i=!1;const n=()=>{if(!i)for(i=!0,_0x98ca35--;_0x2d1d04.length&&_0x98ca35<_0x22d088;){const e=_0x2d1d04.shift(),{requestParameters:t,callback:i,cancelled:n}=e;!n&&(e.cancel=getImage(t,i).cancel)}},r=getArrayBuffer(e,((e,i,r,o)=>{if(n(),e)t(e);else if(i){const e=new window.Image,n=window.URL||window.webkitURL;e.onload=()=>{t(null,e),n.revokeObjectURL(e.src)},e.onerror=()=>t(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const a=new window.Blob([new Uint8Array(i)],{type:"image/png"});e.cacheControl=r,e.expires=o,e.src=i.byteLength?n.createObjectURL(a):_0xfc2270}}));return{cancel:()=>{r.cancel(),n()}}},_0x3f3a52=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x39fb95=_0x3f3a52(void 0,(function(){return _0x39fb95.toString().search("(((.+)+)+)+$").toString().constructor(_0x39fb95).search("(((.+)+)+)+$")}));let _0x1695cc,_0x3b397c;_0x39fb95();const _0x460f40={getImageData(e,t){const i=window.document.createElement("canvas"),n=i.getContext("2d");if(!n)throw new Error("failed to create canvas 2d context");return i.width=e.width,i.height=e.height,n.drawImage(e,0,0,e.width,e.height),n.getImageData(-t,-t,e.width+2*t,e.height+2*t)},resolveURL:e=>(_0x1695cc||(_0x1695cc=window.document.createElement("a")),_0x1695cc.href=e,_0x1695cc.href),hardwareConcurrency:window.navigator.hardwareConcurrency||4,get devicePixelRatio(){return window.devicePixelRatio},get prefersReducedMotion(){return!!window.matchMedia&&(null==_0x3b397c&&(_0x3b397c=window.matchMedia("(prefers-reduced-motion: reduce)")),_0x3b397c.matches)}},_0x154b7a=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4b418a=_0x154b7a(void 0,(function(){return _0x4b418a.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b418a).search("(((.+)+)+)+$")}));_0x4b418a();var _0xd89de5=(_0x52d0a9=!0,function(e,t){var i=_0x52d0a9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x52d0a9=!1,i}),_0x2a9694=_0xd89de5(void 0,(function(){return _0x2a9694.toString().search("(((.+)+)+)+$").toString().constructor(_0x2a9694).search("(((.+)+)+)+$")})),_0x52d0a9;_0x2a9694();var _0x56a403=(_0x510317=!0,function(e,t){var i=_0x510317?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x510317=!1,i}),_0x4c1148=_0x56a403(void 0,(function(){return _0x4c1148.toString().search("(((.+)+)+)+$").toString().constructor(_0x4c1148).search("(((.+)+)+)+$")})),_0x510317;_0x4c1148();var _0x1c2f41=function(e,t){_0x5ca831(this,e,1,t)};function _0x5ca831(e,t,i,n){var r=t.width,o=t.height;if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==r*o*i)throw new RangeError("mismatched image size")}else n=new Uint8Array(r*o*i);return e.width=r,e.height=o,e.data=n,e}function _0x1d4cd0(e,t,i){var n=t.width,r=t.height;if(n!==e.width||r!==e.height){var o=_0x5ca831({},{width:n,height:r},i);_0x31538d(e,o,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,n),height:Math.min(e.height,r)},i),e.width=n,e.height=r,e.data=o.data}}function _0x31538d(e,t,i,n,r,o){if(0===r.width||0===r.height)return t;if(r.width>e.width||r.height>e.height||i.x>e.width-r.width||i.y>e.height-r.height)throw new RangeError("out of range source coordinates for image copy");if(r.width>t.width||r.height>t.height||n.x>t.width-r.width||n.y>t.height-r.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=e.data,s=t.data,l=0;l<r.height;l++)for(var u=((i.y+l)*e.width+i.x)*o,c=((n.y+l)*t.width+n.x)*o,h=0;h<r.width*o;h++)s[c+h]=a[u+h];return t}_0x1c2f41.prototype.resize=function(e){_0x1d4cd0(this,e,1)},_0x1c2f41.prototype.clone=function(){return new _0x1c2f41({width:this.width,height:this.height},new Uint8Array(this.data))},_0x1c2f41.copy=function(e,t,i,n,r){_0x31538d(e,t,i,n,r,1)},_0x40d7a6.register("AlphaImage",_0x1c2f41);var B$O=function(e,t,i,n,r){var o,a,s=8*r-n-1,l=(1<<s)-1,u=l>>1,c=-7,h=i?r-1:0,d=i?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+h],h+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+h],h+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},k$_=function(e,t,i,n,r,o){var a,s,l,u=8*o-r-1,c=(1<<u)-1,h=c>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(t*l-1)*Math.pow(2,r),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,r),a=0));r>=8;e[i+f]=255&s,f+=p,s/=256,r-=8);for(a=a<<r|s,u+=r;u>0;e[i+f]=255&a,f+=p,a/=256,u-=8);e[i+f-p]|=128*_},b$1h={read:B$O,write:k$_};function h$12(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}h$12.Varint=0,h$12.Fixed64=1,h$12.Bytes=2,h$12.Fixed32=5;var x$15=4294967296,V$O=1/x$15;function P$R(e,t,i){var n,r,o=i.buf;if(n=(112&(r=o[i.pos++]))>>4,r<128||(n|=(127&(r=o[i.pos++]))<<3,r<128)||(n|=(127&(r=o[i.pos++]))<<10,r<128)||(n|=(127&(r=o[i.pos++]))<<17,r<128)||(n|=(127&(r=o[i.pos++]))<<24,r<128)||(n|=(1&(r=o[i.pos++]))<<31,r<128))return T$Z(e,n,t);throw new Error("Expected varint not more than 10 bytes")}function l$Y(e){return e.type===h$12.Bytes?e.readVarint()+e.pos:e.pos+1}function T$Z(e,t,i){return i?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function D$11(e,t){var i,n;if(e>=0?(i=e%4294967296|0,n=e/4294967296|0):(n=~(-e/4294967296),4294967295^(i=~(-e%4294967296))?i=i+1|0:(i=0,n=n+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),N$Z(i,n,t),m$W(n,t)}function N$Z(e,t,i){i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos]=127&e}function m$W(e,t){var i=(7&e)<<4;t.buf[t.pos++]|=i|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}function M$15(e,t,i){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.ceil(Math.log(t)/(7*Math.LN2));i.realloc(n);for(var r=i.pos-1;r>=e;r--)i.buf[r+n]=i.buf[r]}function A$12(e,t){for(var i=0;i<e.length;i++)t.writeVarint(e[i])}function C$Z(e,t){for(var i=0;i<e.length;i++)t.writeSVarint(e[i])}function E$10(e,t){for(var i=0;i<e.length;i++)t.writeFloat(e[i])}function U$$(e,t){for(var i=0;i<e.length;i++)t.writeDouble(e[i])}function L$_(e,t){for(var i=0;i<e.length;i++)t.writeBoolean(e[i])}function R$R(e,t){for(var i=0;i<e.length;i++)t.writeFixed32(e[i])}function G$V(e,t){for(var i=0;i<e.length;i++)t.writeSFixed32(e[i])}function j$12(e,t){for(var i=0;i<e.length;i++)t.writeFixed64(e[i])}function z$Q(e,t){for(var i=0;i<e.length;i++)t.writeSFixed64(e[i])}function g$R(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+16777216*e[t+3]}function F$14(e,t,i){e[i]=t,e[i+1]=t>>>8,e[i+2]=t>>>16,e[i+3]=t>>>24}function S$O(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function H$Y(e,t,i){for(var n="",r=t;r<i;){var o,a,s,l=e[r],u=null,c=l>239?4:l>223?3:l>191?2:1;if(r+c>i)break;1===c?l<128&&(u=l):2===c?128==(192&(o=e[r+1]))&&((u=(31&l)<<6|63&o)<=127&&(u=null)):3===c?(o=e[r+1],a=e[r+2],128==(192&o)&&128==(192&a)&&(((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null))):4===c&&(o=e[r+1],a=e[r+2],s=e[r+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null))),null===u?(u=65533,c=1):u>65535&&(u-=65536,n+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),n+=String.fromCharCode(u),r+=c}return n}function I$15(e,t,i){for(var n,r,o=0;o<t.length;o++){if((n=t.charCodeAt(o))>55295&&n<57344){if(!r){n>56319||o+1===t.length?(e[i++]=239,e[i++]=191,e[i++]=189):r=n;continue}if(n<56320){e[i++]=239,e[i++]=191,e[i++]=189,r=n;continue}n=r-55296<<10|n-56320|65536,r=null}else r&&(e[i++]=239,e[i++]=191,e[i++]=189,r=null);n<128?e[i++]=n:(n<2048?e[i++]=n>>6|192:(n<65536?e[i++]=n>>12|224:(e[i++]=n>>18|240,e[i++]=n>>12&63|128),e[i++]=n>>6&63|128),e[i++]=63&n|128)}return i}h$12.prototype={destroy:function(){this.buf=null},readFields:function(e,t,i){for(i=i||this.length;this.pos<i;){var n=this.readVarint(),r=n>>3,o=this.pos;this.type=7&n,e(r,t,this),this.pos===o&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=g$R(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=S$O(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=g$R(this.buf,this.pos)+g$R(this.buf,this.pos+4)*x$15;return this.pos+=8,e},readSFixed64:function(){var e=g$R(this.buf,this.pos)+S$O(this.buf,this.pos+4)*x$15;return this.pos+=8,e},readFloat:function(){var e=b$1h.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=b$1h.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,i,n=this.buf;return t=127&(i=n[this.pos++]),i<128||(t|=(127&(i=n[this.pos++]))<<7,i<128)||(t|=(127&(i=n[this.pos++]))<<14,i<128)||(t|=(127&(i=n[this.pos++]))<<21,i<128)?t:P$R(t|=(15&(i=n[this.pos]))<<28,e,this)},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=H$Y(this.buf,this.pos,e);return this.pos=e,t},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){var i=l$Y(this);for(e=e||[];this.pos<i;)e.push(this.readVarint(t));return e},readPackedSVarint:function(e){var t=l$Y(this);for(e=e||[];this.pos<t;)e.push(this.readSVarint());return e},readPackedBoolean:function(e){var t=l$Y(this);for(e=e||[];this.pos<t;)e.push(this.readBoolean());return e},readPackedFloat:function(e){var t=l$Y(this);for(e=e||[];this.pos<t;)e.push(this.readFloat());return e},readPackedDouble:function(e){var t=l$Y(this);for(e=e||[];this.pos<t;)e.push(this.readDouble());return e},readPackedFixed32:function(e){var t=l$Y(this);for(e=e||[];this.pos<t;)e.push(this.readFixed32());return e},readPackedSFixed32:function(e){var t=l$Y(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed32());return e},readPackedFixed64:function(e){var t=l$Y(this);for(e=e||[];this.pos<t;)e.push(this.readFixed64());return e},readPackedSFixed64:function(e){var t=l$Y(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed64());return e},skip:function(e){var t=7&e;if(t===h$12.Varint)for(;this.buf[this.pos++]>127;);else if(t===h$12.Bytes)this.pos=this.readVarint()+this.pos;else if(t===h$12.Fixed32)this.pos+=4;else{if(t!==h$12.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t<this.pos+e;)t*=2;if(t!==this.length){var i=new Uint8Array(t);i.set(this.buf),this.buf=i,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(e){this.realloc(4),F$14(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),F$14(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),F$14(this.buf,-1&e,this.pos),F$14(this.buf,Math.floor(e*V$O),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),F$14(this.buf,-1&e,this.pos),F$14(this.buf,Math.floor(e*V$O),this.pos+4),this.pos+=8},writeVarint:function(e){(e=+e||0)>268435455||e<0?D$11(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=I$15(this.buf,e,this.pos);var i=this.pos-t;i>=128&&M$15(t,i,this),this.pos=t-1,this.writeVarint(i),this.pos+=i},writeFloat:function(e){this.realloc(4),b$1h.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),b$1h.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var i=0;i<t;i++)this.buf[this.pos++]=e[i]},writeRawMessage:function(e,t){this.pos++;var i=this.pos;e(t,this);var n=this.pos-i;n>=128&&M$15(i,n,this),this.pos=i-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,i){this.writeTag(e,h$12.Bytes),this.writeRawMessage(t,i)},writePackedVarint:function(e,t){this.writeMessage(e,A$12,t)},writePackedSVarint:function(e,t){this.writeMessage(e,C$Z,t)},writePackedBoolean:function(e,t){this.writeMessage(e,L$_,t)},writePackedFloat:function(e,t){this.writeMessage(e,E$10,t)},writePackedDouble:function(e,t){this.writeMessage(e,U$$,t)},writePackedFixed32:function(e,t){this.writeMessage(e,R$R,t)},writePackedSFixed32:function(e,t){this.writeMessage(e,G$V,t)},writePackedFixed64:function(e,t){this.writeMessage(e,j$12,t)},writePackedSFixed64:function(e,t){this.writeMessage(e,z$Q,t)},writeBytesField:function(e,t){this.writeTag(e,h$12.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,h$12.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,h$12.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,h$12.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,h$12.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,h$12.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,h$12.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,h$12.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,h$12.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,h$12.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};const _0x524cf4=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x348119=_0x524cf4(void 0,(function(){return _0x348119.toString().search("(((.+)+)+)+$").toString().constructor(_0x348119).search("(((.+)+)+)+$")}));_0x348119();const _0x25be3b=3;function _0x3ef388(e,t,i){1===e&&i.readMessage(_0xec456f,t)}function _0xec456f(e,t,i){if(3===e){const{id:e,bitmap:n,width:r,height:o,left:a,top:s,advance:l}=i.readMessage(_0x43f7f9,{});t.push({id:e,bitmap:new _0x1c2f41({width:r+2*_0x25be3b,height:o+2*_0x25be3b},n),metrics:{width:r,height:o,left:a,top:s,advance:l}})}}function _0x43f7f9(e,t,i){1===e?t.id=i.readVarint():2===e?t.bitmap=i.readBytes():3===e?t.width=i.readVarint():4===e?t.height=i.readVarint():5===e?t.left=i.readSVarint():6===e?t.top=i.readSVarint():7===e&&(t.advance=i.readVarint())}function _0x549e95(e){return new h$12(e).readFields(_0x3ef388,[])}const _0x1c3185=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xb90683=_0x1c3185(void 0,(function(){return _0xb90683.toString().search("(((.+)+)+)+$").toString().constructor(_0xb90683).search("(((.+)+)+)+$")}));_0xb90683();const _0x3ef181={horizontal:1,vertical:2,horizontalOnly:3};var _0x1f713e=(_0x145ab5=!0,function(e,t){var i=_0x145ab5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x145ab5=!1,i}),_0x33c0dd=_0x1f713e(void 0,(function(){return _0x33c0dd.toString().search("(((.+)+)+)+$").toString().constructor(_0x33c0dd).search("(((.+)+)+)+$")})),_0x145ab5;function _0x4d2af4(){}_0x33c0dd();var _0x3f5eb4=1e-6,_0x5131a4="undefined"!=typeof Float32Array?Float32Array:Array,_0x2a0656=Math.random;function _0x3811f3(e){_0x5131a4=e}var _0x2cf134=Math.PI/180;function _0x146438(e){return e*_0x2cf134}function _0x5bb21b(e,t){return Math.abs(e-t)<=_0x3f5eb4*Math.max(1,Math.abs(e),Math.abs(t))}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var _0x5253f3=Object.freeze({EPSILON:_0x3f5eb4,get ARRAY_TYPE(){return _0x5131a4},RANDOM:_0x2a0656,setMatrixArrayType:_0x3811f3,toRadian:_0x146438,equals:_0x5bb21b});function _0x14f182(){var e=new _0x5131a4(4);return _0x5131a4!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}function _0x1a6aea(e){var t=new _0x5131a4(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function _0x553ff1(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function _0x83ef32(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e}function _0x5ac598(e,t,i,n){var r=new _0x5131a4(4);return r[0]=e,r[1]=t,r[2]=i,r[3]=n,r}function _0x15b0f2(e,t,i,n,r){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e}function _0x247c4e(e,t){if(e===t){var i=t[1];e[1]=t[2],e[2]=i}else e[0]=t[0],e[1]=t[2],e[2]=t[1],e[3]=t[3];return e}function _0x43cf31(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=i*o-r*n;return a?(a=1/a,e[0]=o*a,e[1]=-n*a,e[2]=-r*a,e[3]=i*a,e):null}function _0x43d071(e,t){var i=t[0];return e[0]=t[3],e[1]=-t[1],e[2]=-t[2],e[3]=i,e}function _0x1cc6bd(e){return e[0]*e[3]-e[2]*e[1]}function _0x9a8796(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=i[0],l=i[1],u=i[2],c=i[3];return e[0]=n*s+o*l,e[1]=r*s+a*l,e[2]=n*u+o*c,e[3]=r*u+a*c,e}function _0x1e28a2(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=Math.sin(i),l=Math.cos(i);return e[0]=n*l+o*s,e[1]=r*l+a*s,e[2]=n*-s+o*l,e[3]=r*-s+a*l,e}function _0x8daff6(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=i[0],l=i[1];return e[0]=n*s,e[1]=r*s,e[2]=o*l,e[3]=a*l,e}function _0x19013a(e,t){var i=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=i,e[2]=-i,e[3]=n,e}function _0x1cc5ae(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e}function _0x10582d(e){return"mat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function _0x2cb2ff(e){return Math.hypot(e[0],e[1],e[2],e[3])}function _0x5a3229(e,t,i,n){return e[2]=n[2]/n[0],i[0]=n[0],i[1]=n[1],i[3]=n[3]-e[2]*i[1],[e,t,i]}function _0x5dd12f(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e}function _0x16e83b(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e[3]=t[3]-i[3],e}function _0x45109f(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function _0x2b1eec(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=t[0],s=t[1],l=t[2],u=t[3];return Math.abs(i-a)<=_0x3f5eb4*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(n-s)<=_0x3f5eb4*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(r-l)<=_0x3f5eb4*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(o-u)<=_0x3f5eb4*Math.max(1,Math.abs(o),Math.abs(u))}function _0x180f55(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e}function _0x543977(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e[3]=t[3]+i[3]*n,e}var _0x281505=_0x9a8796,_0x5781ea=_0x16e83b,_0x99c312=Object.freeze({create:_0x14f182,clone:_0x1a6aea,copy:_0x553ff1,identity:_0x83ef32,fromValues:_0x5ac598,set:_0x15b0f2,transpose:_0x247c4e,invert:_0x43cf31,adjoint:_0x43d071,determinant:_0x1cc6bd,multiply:_0x9a8796,rotate:_0x1e28a2,scale:_0x8daff6,fromRotation:_0x19013a,fromScaling:_0x1cc5ae,str:_0x10582d,frob:_0x2cb2ff,LDU:_0x5a3229,add:_0x5dd12f,subtract:_0x16e83b,exactEquals:_0x45109f,equals:_0x2b1eec,multiplyScalar:_0x180f55,multiplyScalarAndAdd:_0x543977,mul:_0x281505,sub:_0x5781ea});function _0x3fd686(){var e=new _0x5131a4(6);return _0x5131a4!=Float32Array&&(e[1]=0,e[2]=0,e[4]=0,e[5]=0),e[0]=1,e[3]=1,e}function _0x5b25f3(e){var t=new _0x5131a4(6);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function _0xa17d23(e,t){return 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}function _0x225744(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function _0x2df43e(e,t,i,n,r,o){var a=new _0x5131a4(6);return a[0]=e,a[1]=t,a[2]=i,a[3]=n,a[4]=r,a[5]=o,a}function _0x157c93(e,t,i,n,r,o,a){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e[4]=o,e[5]=a,e}function _0x520e9f(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=i*o-n*r;return l?(l=1/l,e[0]=o*l,e[1]=-n*l,e[2]=-r*l,e[3]=i*l,e[4]=(r*s-o*a)*l,e[5]=(n*a-i*s)*l,e):null}function _0x57da96(e){return e[0]*e[3]-e[1]*e[2]}function _0x19a865(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=i[0],c=i[1],h=i[2],d=i[3],f=i[4],p=i[5];return e[0]=n*u+o*c,e[1]=r*u+a*c,e[2]=n*h+o*d,e[3]=r*h+a*d,e[4]=n*f+o*p+s,e[5]=r*f+a*p+l,e}function _0x45a7c5(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=Math.sin(i),c=Math.cos(i);return e[0]=n*c+o*u,e[1]=r*c+a*u,e[2]=n*-u+o*c,e[3]=r*-u+a*c,e[4]=s,e[5]=l,e}function _0x3be478(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=i[0],c=i[1];return e[0]=n*u,e[1]=r*u,e[2]=o*c,e[3]=a*c,e[4]=s,e[5]=l,e}function _0x4488e2(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=i[0],c=i[1];return e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=n*u+o*c+s,e[5]=r*u+a*c+l,e}function _0x479139(e,t){var i=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=i,e[2]=-i,e[3]=n,e[4]=0,e[5]=0,e}function _0x17d265(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e[4]=0,e[5]=0,e}function _0x4b3e75(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=t[0],e[5]=t[1],e}function _0x55bbdb(e){return"mat2d("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+")"}function _0x26da9b(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],1)}function _0x4fc520(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e[4]=t[4]+i[4],e[5]=t[5]+i[5],e}function _0x3fe426(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e[3]=t[3]-i[3],e[4]=t[4]-i[4],e[5]=t[5]-i[5],e}function _0x5a73ab(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*i,e[5]=t[5]*i,e}function _0x28290e(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e[3]=t[3]+i[3]*n,e[4]=t[4]+i[4]*n,e[5]=t[5]+i[5]*n,e}function _0x1be985(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]}function _0x39b902(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=t[0],u=t[1],c=t[2],h=t[3],d=t[4],f=t[5];return Math.abs(i-l)<=_0x3f5eb4*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(n-u)<=_0x3f5eb4*Math.max(1,Math.abs(n),Math.abs(u))&&Math.abs(r-c)<=_0x3f5eb4*Math.max(1,Math.abs(r),Math.abs(c))&&Math.abs(o-h)<=_0x3f5eb4*Math.max(1,Math.abs(o),Math.abs(h))&&Math.abs(a-d)<=_0x3f5eb4*Math.max(1,Math.abs(a),Math.abs(d))&&Math.abs(s-f)<=_0x3f5eb4*Math.max(1,Math.abs(s),Math.abs(f))}var _0xe7bf82=_0x19a865,_0x17ab72=_0x3fe426,_0xb00175=Object.freeze({create:_0x3fd686,clone:_0x5b25f3,copy:_0xa17d23,identity:_0x225744,fromValues:_0x2df43e,set:_0x157c93,invert:_0x520e9f,determinant:_0x57da96,multiply:_0x19a865,rotate:_0x45a7c5,scale:_0x3be478,translate:_0x4488e2,fromRotation:_0x479139,fromScaling:_0x17d265,fromTranslation:_0x4b3e75,str:_0x55bbdb,frob:_0x26da9b,add:_0x4fc520,subtract:_0x3fe426,multiplyScalar:_0x5a73ab,multiplyScalarAndAdd:_0x28290e,exactEquals:_0x1be985,equals:_0x39b902,mul:_0xe7bf82,sub:_0x17ab72});function _0x1e20ad(){var e=new _0x5131a4(9);return _0x5131a4!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function _0x30ebc8(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function _0x328f13(e){var t=new _0x5131a4(9);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function _0x2fc192(e,t){return 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],e}function _0x47a36c(e,t,i,n,r,o,a,s,l){var u=new _0x5131a4(9);return u[0]=e,u[1]=t,u[2]=i,u[3]=n,u[4]=r,u[5]=o,u[6]=a,u[7]=s,u[8]=l,u}function _0x1308ff(e,t,i,n,r,o,a,s,l,u){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e[4]=o,e[5]=a,e[6]=s,e[7]=l,e[8]=u,e}function _0x4760cd(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function _0x187365(e,t){if(e===t){var i=t[1],n=t[2],r=t[5];e[1]=t[3],e[2]=t[6],e[3]=i,e[5]=t[7],e[6]=n,e[7]=r}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function _0x39b5bf(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=c*a-s*u,d=-c*o+s*l,f=u*o-a*l,p=i*h+n*d+r*f;return p?(p=1/p,e[0]=h*p,e[1]=(-c*n+r*u)*p,e[2]=(s*n-r*a)*p,e[3]=d*p,e[4]=(c*i-r*l)*p,e[5]=(-s*i+r*o)*p,e[6]=f*p,e[7]=(-u*i+n*l)*p,e[8]=(a*i-n*o)*p,e):null}function _0x5e856d(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8];return e[0]=a*c-s*u,e[1]=r*u-n*c,e[2]=n*s-r*a,e[3]=s*l-o*c,e[4]=i*c-r*l,e[5]=r*o-i*s,e[6]=o*u-a*l,e[7]=n*l-i*u,e[8]=i*a-n*o,e}function _0x584dcd(e){var t=e[0],i=e[1],n=e[2],r=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=e[8];return t*(u*o-a*l)+i*(-u*r+a*s)+n*(l*r-o*s)}function _0x308922(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=i[0],f=i[1],p=i[2],_=i[3],m=i[4],$=i[5],g=i[6],y=i[7],v=i[8];return e[0]=d*n+f*a+p*u,e[1]=d*r+f*s+p*c,e[2]=d*o+f*l+p*h,e[3]=_*n+m*a+$*u,e[4]=_*r+m*s+$*c,e[5]=_*o+m*l+$*h,e[6]=g*n+y*a+v*u,e[7]=g*r+y*s+v*c,e[8]=g*o+y*l+v*h,e}function _0xd9c7b8(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=i[0],f=i[1];return e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=d*n+f*a+u,e[7]=d*r+f*s+c,e[8]=d*o+f*l+h,e}function _0x3f1837(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=Math.sin(i),f=Math.cos(i);return e[0]=f*n+d*a,e[1]=f*r+d*s,e[2]=f*o+d*l,e[3]=f*a-d*n,e[4]=f*s-d*r,e[5]=f*l-d*o,e[6]=u,e[7]=c,e[8]=h,e}function _0x174f83(e,t,i){var n=i[0],r=i[1];return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=r*t[3],e[4]=r*t[4],e[5]=r*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function _0x4aa364(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e}function _0x17ac8f(e,t){var i=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=i,e[2]=0,e[3]=-i,e[4]=n,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function _0x1df43f(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function _0x531dc7(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e}function _0x48750b(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=i+i,s=n+n,l=r+r,u=i*a,c=n*a,h=n*s,d=r*a,f=r*s,p=r*l,_=o*a,m=o*s,$=o*l;return e[0]=1-h-p,e[3]=c-$,e[6]=d+m,e[1]=c+$,e[4]=1-u-p,e[7]=f-_,e[2]=d-m,e[5]=f+_,e[8]=1-u-h,e}function _0x19a4ce(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],f=t[11],p=t[12],_=t[13],m=t[14],$=t[15],g=i*s-n*a,y=i*l-r*a,v=i*u-o*a,x=n*l-r*s,b=n*u-o*s,S=r*u-o*l,w=c*_-h*p,C=c*m-d*p,T=c*$-f*p,P=h*m-d*_,E=h*$-f*_,A=d*$-f*m,L=g*A-y*E+v*P+x*T-b*C+S*w;return L?(L=1/L,e[0]=(s*A-l*E+u*P)*L,e[1]=(l*T-a*A-u*C)*L,e[2]=(a*E-s*T+u*w)*L,e[3]=(r*E-n*A-o*P)*L,e[4]=(i*A-r*T+o*C)*L,e[5]=(n*T-i*E-o*w)*L,e[6]=(_*S-m*b+$*x)*L,e[7]=(m*v-p*S-$*y)*L,e[8]=(p*b-_*v+$*g)*L,e):null}function _0x21384e(e,t,i){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/i,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e}function _0x406e3d(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"}function _0xd0e946(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])}function _0x290de7(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e[4]=t[4]+i[4],e[5]=t[5]+i[5],e[6]=t[6]+i[6],e[7]=t[7]+i[7],e[8]=t[8]+i[8],e}function _0x35f951(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e[3]=t[3]-i[3],e[4]=t[4]-i[4],e[5]=t[5]-i[5],e[6]=t[6]-i[6],e[7]=t[7]-i[7],e[8]=t[8]-i[8],e}function _0x4b36cc(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*i,e}function _0x3c0a39(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e[3]=t[3]+i[3]*n,e[4]=t[4]+i[4]*n,e[5]=t[5]+i[5]*n,e[6]=t[6]+i[6]*n,e[7]=t[7]+i[7]*n,e[8]=t[8]+i[8]*n,e}function _0x49438d(e,t){return 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]}function _0x5e3f2e(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=t[0],d=t[1],f=t[2],p=t[3],_=t[4],m=t[5],$=t[6],g=t[7],y=t[8];return Math.abs(i-h)<=_0x3f5eb4*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(n-d)<=_0x3f5eb4*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(r-f)<=_0x3f5eb4*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(o-p)<=_0x3f5eb4*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-_)<=_0x3f5eb4*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(s-m)<=_0x3f5eb4*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(l-$)<=_0x3f5eb4*Math.max(1,Math.abs(l),Math.abs($))&&Math.abs(u-g)<=_0x3f5eb4*Math.max(1,Math.abs(u),Math.abs(g))&&Math.abs(c-y)<=_0x3f5eb4*Math.max(1,Math.abs(c),Math.abs(y))}var _0x5a9639=_0x308922,_0x50e400=_0x35f951,_0x14f01b=Object.freeze({create:_0x1e20ad,fromMat4:_0x30ebc8,clone:_0x328f13,copy:_0x2fc192,fromValues:_0x47a36c,set:_0x1308ff,identity:_0x4760cd,transpose:_0x187365,invert:_0x39b5bf,adjoint:_0x5e856d,determinant:_0x584dcd,multiply:_0x308922,translate:_0xd9c7b8,rotate:_0x3f1837,scale:_0x174f83,fromTranslation:_0x4aa364,fromRotation:_0x17ac8f,fromScaling:_0x1df43f,fromMat2d:_0x531dc7,fromQuat:_0x48750b,normalFromMat4:_0x19a4ce,projection:_0x21384e,str:_0x406e3d,frob:_0xd0e946,add:_0x290de7,subtract:_0x35f951,multiplyScalar:_0x4b36cc,multiplyScalarAndAdd:_0x3c0a39,exactEquals:_0x49438d,equals:_0x5e3f2e,mul:_0x5a9639,sub:_0x50e400});function _0x47140d(){var e=new _0x5131a4(16);return _0x5131a4!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function _0xaf1064(e){var t=new _0x5131a4(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function _0x10036a(e,t){return 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],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function _0x34661b(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){var m=new _0x5131a4(16);return m[0]=e,m[1]=t,m[2]=i,m[3]=n,m[4]=r,m[5]=o,m[6]=a,m[7]=s,m[8]=l,m[9]=u,m[10]=c,m[11]=h,m[12]=d,m[13]=f,m[14]=p,m[15]=_,m}function _0x44676f(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e[4]=o,e[5]=a,e[6]=s,e[7]=l,e[8]=u,e[9]=c,e[10]=h,e[11]=d,e[12]=f,e[13]=p,e[14]=_,e[15]=m,e}function _0x41bad6(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _0x4da861(e,t){if(e===t){var i=t[1],n=t[2],r=t[3],o=t[6],a=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=i,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=o,e[11]=t[14],e[12]=r,e[13]=a,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function _0x4e8946(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],f=t[11],p=t[12],_=t[13],m=t[14],$=t[15],g=i*s-n*a,y=i*l-r*a,v=i*u-o*a,x=n*l-r*s,b=n*u-o*s,S=r*u-o*l,w=c*_-h*p,C=c*m-d*p,T=c*$-f*p,P=h*m-d*_,E=h*$-f*_,A=d*$-f*m,L=g*A-y*E+v*P+x*T-b*C+S*w;return L?(L=1/L,e[0]=(s*A-l*E+u*P)*L,e[1]=(r*E-n*A-o*P)*L,e[2]=(_*S-m*b+$*x)*L,e[3]=(d*b-h*S-f*x)*L,e[4]=(l*T-a*A-u*C)*L,e[5]=(i*A-r*T+o*C)*L,e[6]=(m*v-p*S-$*y)*L,e[7]=(c*S-d*v+f*y)*L,e[8]=(a*E-s*T+u*w)*L,e[9]=(n*T-i*E-o*w)*L,e[10]=(p*b-_*v+$*g)*L,e[11]=(h*v-c*b-f*g)*L,e[12]=(s*C-a*P-l*w)*L,e[13]=(i*P-n*C+r*w)*L,e[14]=(_*y-p*x-m*g)*L,e[15]=(c*x-h*y+d*g)*L,e):null}function _0x348a8a(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],f=t[11],p=t[12],_=t[13],m=t[14],$=t[15];return e[0]=s*(d*$-f*m)-h*(l*$-u*m)+_*(l*f-u*d),e[1]=-(n*(d*$-f*m)-h*(r*$-o*m)+_*(r*f-o*d)),e[2]=n*(l*$-u*m)-s*(r*$-o*m)+_*(r*u-o*l),e[3]=-(n*(l*f-u*d)-s*(r*f-o*d)+h*(r*u-o*l)),e[4]=-(a*(d*$-f*m)-c*(l*$-u*m)+p*(l*f-u*d)),e[5]=i*(d*$-f*m)-c*(r*$-o*m)+p*(r*f-o*d),e[6]=-(i*(l*$-u*m)-a*(r*$-o*m)+p*(r*u-o*l)),e[7]=i*(l*f-u*d)-a*(r*f-o*d)+c*(r*u-o*l),e[8]=a*(h*$-f*_)-c*(s*$-u*_)+p*(s*f-u*h),e[9]=-(i*(h*$-f*_)-c*(n*$-o*_)+p*(n*f-o*h)),e[10]=i*(s*$-u*_)-a*(n*$-o*_)+p*(n*u-o*s),e[11]=-(i*(s*f-u*h)-a*(n*f-o*h)+c*(n*u-o*s)),e[12]=-(a*(h*m-d*_)-c*(s*m-l*_)+p*(s*d-l*h)),e[13]=i*(h*m-d*_)-c*(n*m-r*_)+p*(n*d-r*h),e[14]=-(i*(s*m-l*_)-a*(n*m-r*_)+p*(n*l-r*s)),e[15]=i*(s*d-l*h)-a*(n*d-r*h)+c*(n*l-r*s),e}function _0x2ee91a(e){var t=e[0],i=e[1],n=e[2],r=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],h=e[10],d=e[11],f=e[12],p=e[13],_=e[14],m=e[15];return(t*a-i*o)*(h*m-d*_)-(t*s-n*o)*(c*m-d*p)+(t*l-r*o)*(c*_-h*p)+(i*s-n*a)*(u*m-d*f)-(i*l-r*a)*(u*_-h*f)+(n*l-r*s)*(u*p-c*f)}function _0x24b1d7(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=t[9],f=t[10],p=t[11],_=t[12],m=t[13],$=t[14],g=t[15],y=i[0],v=i[1],x=i[2],b=i[3];return e[0]=y*n+v*s+x*h+b*_,e[1]=y*r+v*l+x*d+b*m,e[2]=y*o+v*u+x*f+b*$,e[3]=y*a+v*c+x*p+b*g,y=i[4],v=i[5],x=i[6],b=i[7],e[4]=y*n+v*s+x*h+b*_,e[5]=y*r+v*l+x*d+b*m,e[6]=y*o+v*u+x*f+b*$,e[7]=y*a+v*c+x*p+b*g,y=i[8],v=i[9],x=i[10],b=i[11],e[8]=y*n+v*s+x*h+b*_,e[9]=y*r+v*l+x*d+b*m,e[10]=y*o+v*u+x*f+b*$,e[11]=y*a+v*c+x*p+b*g,y=i[12],v=i[13],x=i[14],b=i[15],e[12]=y*n+v*s+x*h+b*_,e[13]=y*r+v*l+x*d+b*m,e[14]=y*o+v*u+x*f+b*$,e[15]=y*a+v*c+x*p+b*g,e}function _0x8d4b02(e,t,i){var n,r,o,a,s,l,u,c,h,d,f,p,_=i[0],m=i[1],$=i[2];return t===e?(e[12]=t[0]*_+t[4]*m+t[8]*$+t[12],e[13]=t[1]*_+t[5]*m+t[9]*$+t[13],e[14]=t[2]*_+t[6]*m+t[10]*$+t[14],e[15]=t[3]*_+t[7]*m+t[11]*$+t[15]):(n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=t[9],f=t[10],p=t[11],e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=u,e[7]=c,e[8]=h,e[9]=d,e[10]=f,e[11]=p,e[12]=n*_+s*m+h*$+t[12],e[13]=r*_+l*m+d*$+t[13],e[14]=o*_+u*m+f*$+t[14],e[15]=a*_+c*m+p*$+t[15]),e}function _0x209cc8(e,t,i){var n=i[0],r=i[1],o=i[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function _0x3404b0(e,t,i,n){var r,o,a,s,l,u,c,h,d,f,p,_,m,$,g,y,v,x,b,S,w,C,T,P,E=n[0],A=n[1],L=n[2],M=Math.hypot(E,A,L);return M<_0x3f5eb4?null:(E*=M=1/M,A*=M,L*=M,r=Math.sin(i),a=1-(o=Math.cos(i)),s=t[0],l=t[1],u=t[2],c=t[3],h=t[4],d=t[5],f=t[6],p=t[7],_=t[8],m=t[9],$=t[10],g=t[11],y=E*E*a+o,v=A*E*a+L*r,x=L*E*a-A*r,b=E*A*a-L*r,S=A*A*a+o,w=L*A*a+E*r,C=E*L*a+A*r,T=A*L*a-E*r,P=L*L*a+o,e[0]=s*y+h*v+_*x,e[1]=l*y+d*v+m*x,e[2]=u*y+f*v+$*x,e[3]=c*y+p*v+g*x,e[4]=s*b+h*S+_*w,e[5]=l*b+d*S+m*w,e[6]=u*b+f*S+$*w,e[7]=c*b+p*S+g*w,e[8]=s*C+h*T+_*P,e[9]=l*C+d*T+m*P,e[10]=u*C+f*T+$*P,e[11]=c*C+p*T+g*P,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function _0x1fd965(e,t,i){var n=Math.sin(i),r=Math.cos(i),o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],c=t[9],h=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=o*r+u*n,e[5]=a*r+c*n,e[6]=s*r+h*n,e[7]=l*r+d*n,e[8]=u*r-o*n,e[9]=c*r-a*n,e[10]=h*r-s*n,e[11]=d*r-l*n,e}function _0xfde79a(e,t,i){var n=Math.sin(i),r=Math.cos(i),o=t[0],a=t[1],s=t[2],l=t[3],u=t[8],c=t[9],h=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=o*r-u*n,e[1]=a*r-c*n,e[2]=s*r-h*n,e[3]=l*r-d*n,e[8]=o*n+u*r,e[9]=a*n+c*r,e[10]=s*n+h*r,e[11]=l*n+d*r,e}function _0x116226(e,t,i){var n=Math.sin(i),r=Math.cos(i),o=t[0],a=t[1],s=t[2],l=t[3],u=t[4],c=t[5],h=t[6],d=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=o*r+u*n,e[1]=a*r+c*n,e[2]=s*r+h*n,e[3]=l*r+d*n,e[4]=u*r-o*n,e[5]=c*r-a*n,e[6]=h*r-s*n,e[7]=d*r-l*n,e}function _0x5e2e26(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function _0x56acb7(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _0x5d989d(e,t,i){var n,r,o,a=i[0],s=i[1],l=i[2],u=Math.hypot(a,s,l);return u<_0x3f5eb4?null:(a*=u=1/u,s*=u,l*=u,n=Math.sin(t),o=1-(r=Math.cos(t)),e[0]=a*a*o+r,e[1]=s*a*o+l*n,e[2]=l*a*o-s*n,e[3]=0,e[4]=a*s*o-l*n,e[5]=s*s*o+r,e[6]=l*s*o+a*n,e[7]=0,e[8]=a*l*o+s*n,e[9]=s*l*o-a*n,e[10]=l*l*o+r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}function _0x13adc6(e,t){var i=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=i,e[7]=0,e[8]=0,e[9]=-i,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _0x485ca4(e,t){var i=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-i,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=i,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _0x243098(e,t){var i=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=i,e[2]=0,e[3]=0,e[4]=-i,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _0x4d6e92(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=n+n,l=r+r,u=o+o,c=n*s,h=n*l,d=n*u,f=r*l,p=r*u,_=o*u,m=a*s,$=a*l,g=a*u;return e[0]=1-(f+_),e[1]=h+g,e[2]=d-$,e[3]=0,e[4]=h-g,e[5]=1-(c+_),e[6]=p+m,e[7]=0,e[8]=d+$,e[9]=p-m,e[10]=1-(c+f),e[11]=0,e[12]=i[0],e[13]=i[1],e[14]=i[2],e[15]=1,e}function _0x294d93(e,t){var i=new _0x5131a4(3),n=-t[0],r=-t[1],o=-t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=n*n+r*r+o*o+a*a;return h>0?(i[0]=2*(s*a+c*n+l*o-u*r)/h,i[1]=2*(l*a+c*r+u*n-s*o)/h,i[2]=2*(u*a+c*o+s*r-l*n)/h):(i[0]=2*(s*a+c*n+l*o-u*r),i[1]=2*(l*a+c*r+u*n-s*o),i[2]=2*(u*a+c*o+s*r-l*n)),_0x4d6e92(e,t,i),e}function _0x5ccede(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function _0x4d3514(e,t){var i=t[0],n=t[1],r=t[2],o=t[4],a=t[5],s=t[6],l=t[8],u=t[9],c=t[10];return e[0]=Math.hypot(i,n,r),e[1]=Math.hypot(o,a,s),e[2]=Math.hypot(l,u,c),e}function _0x3c804f(e,t){var i=new _0x5131a4(3);_0x4d3514(i,t);var n=1/i[0],r=1/i[1],o=1/i[2],a=t[0]*n,s=t[1]*r,l=t[2]*o,u=t[4]*n,c=t[5]*r,h=t[6]*o,d=t[8]*n,f=t[9]*r,p=t[10]*o,_=a+c+p,m=0;return _>0?(m=2*Math.sqrt(_+1),e[3]=.25*m,e[0]=(h-f)/m,e[1]=(d-l)/m,e[2]=(s-u)/m):a>c&&a>p?(m=2*Math.sqrt(1+a-c-p),e[3]=(h-f)/m,e[0]=.25*m,e[1]=(s+u)/m,e[2]=(d+l)/m):c>p?(m=2*Math.sqrt(1+c-a-p),e[3]=(d-l)/m,e[0]=(s+u)/m,e[1]=.25*m,e[2]=(h+f)/m):(m=2*Math.sqrt(1+p-a-c),e[3]=(s-u)/m,e[0]=(d+l)/m,e[1]=(h+f)/m,e[2]=.25*m),e}function _0x17eca1(e,t,i,n){var r=t[0],o=t[1],a=t[2],s=t[3],l=r+r,u=o+o,c=a+a,h=r*l,d=r*u,f=r*c,p=o*u,_=o*c,m=a*c,$=s*l,g=s*u,y=s*c,v=n[0],x=n[1],b=n[2];return e[0]=(1-(p+m))*v,e[1]=(d+y)*v,e[2]=(f-g)*v,e[3]=0,e[4]=(d-y)*x,e[5]=(1-(h+m))*x,e[6]=(_+$)*x,e[7]=0,e[8]=(f+g)*b,e[9]=(_-$)*b,e[10]=(1-(h+p))*b,e[11]=0,e[12]=i[0],e[13]=i[1],e[14]=i[2],e[15]=1,e}function _0x530cf3(e,t,i,n,r){var o=t[0],a=t[1],s=t[2],l=t[3],u=o+o,c=a+a,h=s+s,d=o*u,f=o*c,p=o*h,_=a*c,m=a*h,$=s*h,g=l*u,y=l*c,v=l*h,x=n[0],b=n[1],S=n[2],w=r[0],C=r[1],T=r[2],P=(1-(_+$))*x,E=(f+v)*x,A=(p-y)*x,L=(f-v)*b,M=(1-(d+$))*b,I=(m+g)*b,O=(p+y)*S,D=(m-g)*S,R=(1-(d+_))*S;return e[0]=P,e[1]=E,e[2]=A,e[3]=0,e[4]=L,e[5]=M,e[6]=I,e[7]=0,e[8]=O,e[9]=D,e[10]=R,e[11]=0,e[12]=i[0]+w-(P*w+L*C+O*T),e[13]=i[1]+C-(E*w+M*C+D*T),e[14]=i[2]+T-(A*w+I*C+R*T),e[15]=1,e}function _0x2ef2b9(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=i+i,s=n+n,l=r+r,u=i*a,c=n*a,h=n*s,d=r*a,f=r*s,p=r*l,_=o*a,m=o*s,$=o*l;return e[0]=1-h-p,e[1]=c+$,e[2]=d-m,e[3]=0,e[4]=c-$,e[5]=1-u-p,e[6]=f+_,e[7]=0,e[8]=d+m,e[9]=f-_,e[10]=1-u-h,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _0x2c969e(e,t,i,n,r,o,a){var s=1/(i-t),l=1/(r-n),u=1/(o-a);return e[0]=2*o*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*o*l,e[6]=0,e[7]=0,e[8]=(i+t)*s,e[9]=(r+n)*l,e[10]=(a+o)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=a*o*2*u,e[15]=0,e}function _0x112ce5(e,t,i,n,r){var o,a=1/Math.tan(t/2);return e[0]=a/i,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=r&&r!==1/0?(o=1/(n-r),e[10]=(r+n)*o,e[14]=2*r*n*o):(e[10]=-1,e[14]=-2*n),e}function _0x2c8cf6(e,t,i,n){var r=Math.tan(t.upDegrees*Math.PI/180),o=Math.tan(t.downDegrees*Math.PI/180),a=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(a+s),u=2/(r+o);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-(a-s)*l*.5,e[9]=(r-o)*u*.5,e[10]=n/(i-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*i/(i-n),e[15]=0,e}function _0x224f37(e,t,i,n,r,o,a){var s=1/(t-i),l=1/(n-r),u=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+i)*s,e[13]=(r+n)*l,e[14]=(a+o)*u,e[15]=1,e}function _0x274523(e,t,i,n){var r,o,a,s,l,u,c,h,d,f,p=t[0],_=t[1],m=t[2],$=n[0],g=n[1],y=n[2],v=i[0],x=i[1],b=i[2];return Math.abs(p-v)<_0x3f5eb4&&Math.abs(_-x)<_0x3f5eb4&&Math.abs(m-b)<_0x3f5eb4?_0x41bad6(e):(c=p-v,h=_-x,d=m-b,r=g*(d*=f=1/Math.hypot(c,h,d))-y*(h*=f),o=y*(c*=f)-$*d,a=$*h-g*c,(f=Math.hypot(r,o,a))?(r*=f=1/f,o*=f,a*=f):(r=0,o=0,a=0),s=h*a-d*o,l=d*r-c*a,u=c*o-h*r,(f=Math.hypot(s,l,u))?(s*=f=1/f,l*=f,u*=f):(s=0,l=0,u=0),e[0]=r,e[1]=s,e[2]=c,e[3]=0,e[4]=o,e[5]=l,e[6]=h,e[7]=0,e[8]=a,e[9]=u,e[10]=d,e[11]=0,e[12]=-(r*p+o*_+a*m),e[13]=-(s*p+l*_+u*m),e[14]=-(c*p+h*_+d*m),e[15]=1,e)}function _0x18a236(e,t,i,n){var r=t[0],o=t[1],a=t[2],s=n[0],l=n[1],u=n[2],c=r-i[0],h=o-i[1],d=a-i[2],f=c*c+h*h+d*d;f>0&&(c*=f=1/Math.sqrt(f),h*=f,d*=f);var p=l*d-u*h,_=u*c-s*d,m=s*h-l*c;return(f=p*p+_*_+m*m)>0&&(p*=f=1/Math.sqrt(f),_*=f,m*=f),e[0]=p,e[1]=_,e[2]=m,e[3]=0,e[4]=h*m-d*_,e[5]=d*p-c*m,e[6]=c*_-h*p,e[7]=0,e[8]=c,e[9]=h,e[10]=d,e[11]=0,e[12]=r,e[13]=o,e[14]=a,e[15]=1,e}function _0x39204a(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}function _0x15cd14(e){return Math.hypot(e[0],e[1],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}function _0xc365f1(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e[4]=t[4]+i[4],e[5]=t[5]+i[5],e[6]=t[6]+i[6],e[7]=t[7]+i[7],e[8]=t[8]+i[8],e[9]=t[9]+i[9],e[10]=t[10]+i[10],e[11]=t[11]+i[11],e[12]=t[12]+i[12],e[13]=t[13]+i[13],e[14]=t[14]+i[14],e[15]=t[15]+i[15],e}function _0x2c214c(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e[3]=t[3]-i[3],e[4]=t[4]-i[4],e[5]=t[5]-i[5],e[6]=t[6]-i[6],e[7]=t[7]-i[7],e[8]=t[8]-i[8],e[9]=t[9]-i[9],e[10]=t[10]-i[10],e[11]=t[11]-i[11],e[12]=t[12]-i[12],e[13]=t[13]-i[13],e[14]=t[14]-i[14],e[15]=t[15]-i[15],e}function _0x175450(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12]*i,e[13]=t[13]*i,e[14]=t[14]*i,e[15]=t[15]*i,e}function _0x3a1315(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e[3]=t[3]+i[3]*n,e[4]=t[4]+i[4]*n,e[5]=t[5]+i[5]*n,e[6]=t[6]+i[6]*n,e[7]=t[7]+i[7]*n,e[8]=t[8]+i[8]*n,e[9]=t[9]+i[9]*n,e[10]=t[10]+i[10]*n,e[11]=t[11]+i[11]*n,e[12]=t[12]+i[12]*n,e[13]=t[13]+i[13]*n,e[14]=t[14]+i[14]*n,e[15]=t[15]+i[15]*n,e}function _0x32a89a(e,t){return 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]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]}function _0x41a101(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=e[9],d=e[10],f=e[11],p=e[12],_=e[13],m=e[14],$=e[15],g=t[0],y=t[1],v=t[2],x=t[3],b=t[4],S=t[5],w=t[6],C=t[7],T=t[8],P=t[9],E=t[10],A=t[11],L=t[12],M=t[13],I=t[14],O=t[15];return Math.abs(i-g)<=_0x3f5eb4*Math.max(1,Math.abs(i),Math.abs(g))&&Math.abs(n-y)<=_0x3f5eb4*Math.max(1,Math.abs(n),Math.abs(y))&&Math.abs(r-v)<=_0x3f5eb4*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(o-x)<=_0x3f5eb4*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(a-b)<=_0x3f5eb4*Math.max(1,Math.abs(a),Math.abs(b))&&Math.abs(s-S)<=_0x3f5eb4*Math.max(1,Math.abs(s),Math.abs(S))&&Math.abs(l-w)<=_0x3f5eb4*Math.max(1,Math.abs(l),Math.abs(w))&&Math.abs(u-C)<=_0x3f5eb4*Math.max(1,Math.abs(u),Math.abs(C))&&Math.abs(c-T)<=_0x3f5eb4*Math.max(1,Math.abs(c),Math.abs(T))&&Math.abs(h-P)<=_0x3f5eb4*Math.max(1,Math.abs(h),Math.abs(P))&&Math.abs(d-E)<=_0x3f5eb4*Math.max(1,Math.abs(d),Math.abs(E))&&Math.abs(f-A)<=_0x3f5eb4*Math.max(1,Math.abs(f),Math.abs(A))&&Math.abs(p-L)<=_0x3f5eb4*Math.max(1,Math.abs(p),Math.abs(L))&&Math.abs(_-M)<=_0x3f5eb4*Math.max(1,Math.abs(_),Math.abs(M))&&Math.abs(m-I)<=_0x3f5eb4*Math.max(1,Math.abs(m),Math.abs(I))&&Math.abs($-O)<=_0x3f5eb4*Math.max(1,Math.abs($),Math.abs(O))}var _0x2be7b5=_0x24b1d7,_0x488364=_0x2c214c,_0x105429=Object.freeze({create:_0x47140d,clone:_0xaf1064,copy:_0x10036a,fromValues:_0x34661b,set:_0x44676f,identity:_0x41bad6,transpose:_0x4da861,invert:_0x4e8946,adjoint:_0x348a8a,determinant:_0x2ee91a,multiply:_0x24b1d7,translate:_0x8d4b02,scale:_0x209cc8,rotate:_0x3404b0,rotateX:_0x1fd965,rotateY:_0xfde79a,rotateZ:_0x116226,fromTranslation:_0x5e2e26,fromScaling:_0x56acb7,fromRotation:_0x5d989d,fromXRotation:_0x13adc6,fromYRotation:_0x485ca4,fromZRotation:_0x243098,fromRotationTranslation:_0x4d6e92,fromQuat2:_0x294d93,getTranslation:_0x5ccede,getScaling:_0x4d3514,getRotation:_0x3c804f,fromRotationTranslationScale:_0x17eca1,fromRotationTranslationScaleOrigin:_0x530cf3,fromQuat:_0x2ef2b9,frustum:_0x2c969e,perspective:_0x112ce5,perspectiveFromFieldOfView:_0x2c8cf6,ortho:_0x224f37,lookAt:_0x274523,targetTo:_0x18a236,str:_0x39204a,frob:_0x15cd14,add:_0xc365f1,subtract:_0x2c214c,multiplyScalar:_0x175450,multiplyScalarAndAdd:_0x3a1315,exactEquals:_0x32a89a,equals:_0x41a101,mul:_0x2be7b5,sub:_0x488364});function _0x53fc71(){var e=new _0x5131a4(3);return _0x5131a4!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function _0x49c9fc(e){var t=new _0x5131a4(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function _0x34b1c6(e){var t=e[0],i=e[1],n=e[2];return Math.hypot(t,i,n)}function _0x151f13(e,t,i){var n=new _0x5131a4(3);return n[0]=e,n[1]=t,n[2]=i,n}function _0x4ee8cd(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function _0x4466e0(e,t,i,n){return e[0]=t,e[1]=i,e[2]=n,e}function _0x265995(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e}function _0x4c334e(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e}function _0x9b0816(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e[2]=t[2]*i[2],e}function _0x51e9a1(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e[2]=t[2]/i[2],e}function _0x4b7d68(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}function _0x3f12fc(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}function _0x3a5a41(e,t,i){return e[0]=Math.min(t[0],i[0]),e[1]=Math.min(t[1],i[1]),e[2]=Math.min(t[2],i[2]),e}function _0x2ec8bb(e,t,i){return e[0]=Math.max(t[0],i[0]),e[1]=Math.max(t[1],i[1]),e[2]=Math.max(t[2],i[2]),e}function _0x141862(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}function _0x4c951b(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e}function _0x2b1b8c(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e}function _0xf2ecc2(e,t){var i=t[0]-e[0],n=t[1]-e[1],r=t[2]-e[2];return Math.hypot(i,n,r)}function _0x8ec448(e,t){var i=t[0]-e[0],n=t[1]-e[1],r=t[2]-e[2];return i*i+n*n+r*r}function _0xd0a307(e){var t=e[0],i=e[1],n=e[2];return t*t+i*i+n*n}function _0x5de63(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function _0x4af5b5(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function _0x5e095b(e,t){var i=t[0],n=t[1],r=t[2],o=i*i+n*n+r*r;return o>0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e}function _0x4981b7(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function _0x5ba6d7(e,t,i){var n=t[0],r=t[1],o=t[2],a=i[0],s=i[1],l=i[2];return e[0]=r*l-o*s,e[1]=o*a-n*l,e[2]=n*s-r*a,e}function _0xa755e1(e,t,i,n){var r=t[0],o=t[1],a=t[2];return e[0]=r+n*(i[0]-r),e[1]=o+n*(i[1]-o),e[2]=a+n*(i[2]-a),e}function _0x1a6893(e,t,i,n,r,o){var a=o*o,s=a*(2*o-3)+1,l=a*(o-2)+o,u=a*(o-1),c=a*(3-2*o);return e[0]=t[0]*s+i[0]*l+n[0]*u+r[0]*c,e[1]=t[1]*s+i[1]*l+n[1]*u+r[1]*c,e[2]=t[2]*s+i[2]*l+n[2]*u+r[2]*c,e}function _0x30ccd1(e,t,i,n,r,o){var a=1-o,s=a*a,l=o*o,u=s*a,c=3*o*s,h=3*l*a,d=l*o;return e[0]=t[0]*u+i[0]*c+n[0]*h+r[0]*d,e[1]=t[1]*u+i[1]*c+n[1]*h+r[1]*d,e[2]=t[2]*u+i[2]*c+n[2]*h+r[2]*d,e}function _0x2a7a23(e,t){t=t||1;var i=2*_0x2a0656()*Math.PI,n=2*_0x2a0656()-1,r=Math.sqrt(1-n*n)*t;return e[0]=Math.cos(i)*r,e[1]=Math.sin(i)*r,e[2]=n*t,e}function _0x1c5851(e,t,i){var n=t[0],r=t[1],o=t[2],a=i[3]*n+i[7]*r+i[11]*o+i[15];return a=a||1,e[0]=(i[0]*n+i[4]*r+i[8]*o+i[12])/a,e[1]=(i[1]*n+i[5]*r+i[9]*o+i[13])/a,e[2]=(i[2]*n+i[6]*r+i[10]*o+i[14])/a,e}function _0x5b537f(e,t,i){var n=t[0],r=t[1],o=t[2];return e[0]=n*i[0]+r*i[3]+o*i[6],e[1]=n*i[1]+r*i[4]+o*i[7],e[2]=n*i[2]+r*i[5]+o*i[8],e}function _0x427d25(e,t,i){var n=i[0],r=i[1],o=i[2],a=i[3],s=t[0],l=t[1],u=t[2],c=r*u-o*l,h=o*s-n*u,d=n*l-r*s,f=r*d-o*h,p=o*c-n*d,_=n*h-r*c,m=2*a;return c*=m,h*=m,d*=m,f*=2,p*=2,_*=2,e[0]=s+c+f,e[1]=l+h+p,e[2]=u+d+_,e}function _0x2901b8(e,t,i,n){var r=[],o=[];return r[0]=t[0]-i[0],r[1]=t[1]-i[1],r[2]=t[2]-i[2],o[0]=r[0],o[1]=r[1]*Math.cos(n)-r[2]*Math.sin(n),o[2]=r[1]*Math.sin(n)+r[2]*Math.cos(n),e[0]=o[0]+i[0],e[1]=o[1]+i[1],e[2]=o[2]+i[2],e}function _0x147b4e(e,t,i,n){var r=[],o=[];return r[0]=t[0]-i[0],r[1]=t[1]-i[1],r[2]=t[2]-i[2],o[0]=r[2]*Math.sin(n)+r[0]*Math.cos(n),o[1]=r[1],o[2]=r[2]*Math.cos(n)-r[0]*Math.sin(n),e[0]=o[0]+i[0],e[1]=o[1]+i[1],e[2]=o[2]+i[2],e}function _0x586623(e,t,i,n){var r=[],o=[];return r[0]=t[0]-i[0],r[1]=t[1]-i[1],r[2]=t[2]-i[2],o[0]=r[0]*Math.cos(n)-r[1]*Math.sin(n),o[1]=r[0]*Math.sin(n)+r[1]*Math.cos(n),o[2]=r[2],e[0]=o[0]+i[0],e[1]=o[1]+i[1],e[2]=o[2]+i[2],e}function _0x56f54c(e,t){var i=_0x151f13(e[0],e[1],e[2]),n=_0x151f13(t[0],t[1],t[2]);_0x5e095b(i,i),_0x5e095b(n,n);var r=_0x4981b7(i,n);return r>1?0:r<-1?Math.PI:Math.acos(r)}function _0x363027(e){return e[0]=0,e[1]=0,e[2]=0,e}function _0x14ab68(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"}function _0x91db10(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function _0x1b20bb(e,t){var i=e[0],n=e[1],r=e[2],o=t[0],a=t[1],s=t[2];return Math.abs(i-o)<=_0x3f5eb4*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(n-a)<=_0x3f5eb4*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-s)<=_0x3f5eb4*Math.max(1,Math.abs(r),Math.abs(s))}var _0x353041=_0x4c334e,_0xebfbf1=_0x9b0816,_0x12d2e7=_0x51e9a1,_0x4d2a08=_0xf2ecc2,_0x1442b9=_0x8ec448,_0x38448b=_0x34b1c6,_0x1b2a00=_0xd0a307,_0x647fa7=(_0x152013=_0x53fc71(),function(e,t,i,n,r,o){var a,s;for(!t&&(t=3),!i&&(i=0),s=n?Math.min(n*t+i,e.length):e.length,a=i;a<s;a+=t)_0x152013[0]=e[a],_0x152013[1]=e[a+1],_0x152013[2]=e[a+2],r(_0x152013,_0x152013,o),e[a]=_0x152013[0],e[a+1]=_0x152013[1],e[a+2]=_0x152013[2];return e}),_0x5a3198=Object.freeze({create:_0x53fc71,clone:_0x49c9fc,length:_0x34b1c6,fromValues:_0x151f13,copy:_0x4ee8cd,set:_0x4466e0,add:_0x265995,subtract:_0x4c334e,multiply:_0x9b0816,divide:_0x51e9a1,ceil:_0x4b7d68,floor:_0x3f12fc,min:_0x3a5a41,max:_0x2ec8bb,round:_0x141862,scale:_0x4c951b,scaleAndAdd:_0x2b1b8c,distance:_0xf2ecc2,squaredDistance:_0x8ec448,squaredLength:_0xd0a307,negate:_0x5de63,inverse:_0x4af5b5,normalize:_0x5e095b,dot:_0x4981b7,cross:_0x5ba6d7,lerp:_0xa755e1,hermite:_0x1a6893,bezier:_0x30ccd1,random:_0x2a7a23,transformMat4:_0x1c5851,transformMat3:_0x5b537f,transformQuat:_0x427d25,rotateX:_0x2901b8,rotateY:_0x147b4e,rotateZ:_0x586623,angle:_0x56f54c,zero:_0x363027,str:_0x14ab68,exactEquals:_0x91db10,equals:_0x1b20bb,sub:_0x353041,mul:_0xebfbf1,div:_0x12d2e7,dist:_0x4d2a08,sqrDist:_0x1442b9,len:_0x38448b,sqrLen:_0x1b2a00,forEach:_0x647fa7}),_0x152013;function _0x34c669(){var e=new _0x5131a4(4);return _0x5131a4!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function _0x5d2e1b(e){var t=new _0x5131a4(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function _0x274da6(e,t,i,n){var r=new _0x5131a4(4);return r[0]=e,r[1]=t,r[2]=i,r[3]=n,r}function _0x474809(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function _0x231745(e,t,i,n,r){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e}function _0x3f09fb(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e}function _0x44227d(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e[3]=t[3]-i[3],e}function _0x1b65aa(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e[2]=t[2]*i[2],e[3]=t[3]*i[3],e}function _0x50f2ae(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e[2]=t[2]/i[2],e[3]=t[3]/i[3],e}function _0x65927a(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e}function _0x284365(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e}function _0xb77fd9(e,t,i){return e[0]=Math.min(t[0],i[0]),e[1]=Math.min(t[1],i[1]),e[2]=Math.min(t[2],i[2]),e[3]=Math.min(t[3],i[3]),e}function _0x5b6772(e,t,i){return e[0]=Math.max(t[0],i[0]),e[1]=Math.max(t[1],i[1]),e[2]=Math.max(t[2],i[2]),e[3]=Math.max(t[3],i[3]),e}function _0x3870d5(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function _0xfba9ac(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e}function _0x4e1b16(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e[3]=t[3]+i[3]*n,e}function _0x3cf016(e,t){var i=t[0]-e[0],n=t[1]-e[1],r=t[2]-e[2],o=t[3]-e[3];return Math.hypot(i,n,r,o)}function _0x306d8c(e,t){var i=t[0]-e[0],n=t[1]-e[1],r=t[2]-e[2],o=t[3]-e[3];return i*i+n*n+r*r+o*o}function _0x179990(e){var t=e[0],i=e[1],n=e[2],r=e[3];return Math.hypot(t,i,n,r)}function _0x28a11d(e){var t=e[0],i=e[1],n=e[2],r=e[3];return t*t+i*i+n*n+r*r}function _0x3662e3(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}function _0x2ddf13(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}function _0x40dc0b(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=i*i+n*n+r*r+o*o;return a>0&&(a=1/Math.sqrt(a)),e[0]=i*a,e[1]=n*a,e[2]=r*a,e[3]=o*a,e}function _0x22290d(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function _0xfc681c(e,t,i,n){var r=i[0]*n[1]-i[1]*n[0],o=i[0]*n[2]-i[2]*n[0],a=i[0]*n[3]-i[3]*n[0],s=i[1]*n[2]-i[2]*n[1],l=i[1]*n[3]-i[3]*n[1],u=i[2]*n[3]-i[3]*n[2],c=t[0],h=t[1],d=t[2],f=t[3];return e[0]=h*u-d*l+f*s,e[1]=-c*u+d*a-f*o,e[2]=c*l-h*a+f*r,e[3]=-c*s+h*o-d*r,e}function _0x111b79(e,t,i,n){var r=t[0],o=t[1],a=t[2],s=t[3];return e[0]=r+n*(i[0]-r),e[1]=o+n*(i[1]-o),e[2]=a+n*(i[2]-a),e[3]=s+n*(i[3]-s),e}function _0x301e48(e,t){var i,n,r,o,a,s;t=t||1;do{a=(i=2*_0x2a0656()-1)*i+(n=2*_0x2a0656()-1)*n}while(a>=1);do{s=(r=2*_0x2a0656()-1)*r+(o=2*_0x2a0656()-1)*o}while(s>=1);var l=Math.sqrt((1-a)/s);return e[0]=t*i,e[1]=t*n,e[2]=t*r*l,e[3]=t*o*l,e}function _0x1d9258(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3];return e[0]=i[0]*n+i[4]*r+i[8]*o+i[12]*a,e[1]=i[1]*n+i[5]*r+i[9]*o+i[13]*a,e[2]=i[2]*n+i[6]*r+i[10]*o+i[14]*a,e[3]=i[3]*n+i[7]*r+i[11]*o+i[15]*a,e}function _0xd83631(e,t,i){var n=t[0],r=t[1],o=t[2],a=i[0],s=i[1],l=i[2],u=i[3],c=u*n+s*o-l*r,h=u*r+l*n-a*o,d=u*o+a*r-s*n,f=-a*n-s*r-l*o;return e[0]=c*u+f*-a+h*-l-d*-s,e[1]=h*u+f*-s+d*-a-c*-l,e[2]=d*u+f*-l+c*-s-h*-a,e[3]=t[3],e}function _0x4a47d8(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}function _0x283fcf(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function _0x564073(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function _0x4d392e(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=t[0],s=t[1],l=t[2],u=t[3];return Math.abs(i-a)<=_0x3f5eb4*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(n-s)<=_0x3f5eb4*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(r-l)<=_0x3f5eb4*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(o-u)<=_0x3f5eb4*Math.max(1,Math.abs(o),Math.abs(u))}var _0x1e8a8c=_0x44227d,_0x1c7d45=_0x1b65aa,_0x239f07=_0x50f2ae,_0x4e52cc=_0x3cf016,_0x55ef7e=_0x306d8c,_0x474477=_0x179990,_0x37c8c5=_0x28a11d,_0x7f0986=(_0xf12bcd=_0x34c669(),function(e,t,i,n,r,o){var a,s;for(!t&&(t=4),!i&&(i=0),s=n?Math.min(n*t+i,e.length):e.length,a=i;a<s;a+=t)_0xf12bcd[0]=e[a],_0xf12bcd[1]=e[a+1],_0xf12bcd[2]=e[a+2],_0xf12bcd[3]=e[a+3],r(_0xf12bcd,_0xf12bcd,o),e[a]=_0xf12bcd[0],e[a+1]=_0xf12bcd[1],e[a+2]=_0xf12bcd[2],e[a+3]=_0xf12bcd[3];return e}),_0x1a4b25=Object.freeze({create:_0x34c669,clone:_0x5d2e1b,fromValues:_0x274da6,copy:_0x474809,set:_0x231745,add:_0x3f09fb,subtract:_0x44227d,multiply:_0x1b65aa,divide:_0x50f2ae,ceil:_0x65927a,floor:_0x284365,min:_0xb77fd9,max:_0x5b6772,round:_0x3870d5,scale:_0xfba9ac,scaleAndAdd:_0x4e1b16,distance:_0x3cf016,squaredDistance:_0x306d8c,length:_0x179990,squaredLength:_0x28a11d,negate:_0x3662e3,inverse:_0x2ddf13,normalize:_0x40dc0b,dot:_0x22290d,cross:_0xfc681c,lerp:_0x111b79,random:_0x301e48,transformMat4:_0x1d9258,transformQuat:_0xd83631,zero:_0x4a47d8,str:_0x283fcf,exactEquals:_0x564073,equals:_0x4d392e,sub:_0x1e8a8c,mul:_0x1c7d45,div:_0x239f07,dist:_0x4e52cc,sqrDist:_0x55ef7e,len:_0x474477,sqrLen:_0x37c8c5,forEach:_0x7f0986}),_0xf12bcd;function _0x303613(){var e=new _0x5131a4(4);return _0x5131a4!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function _0x54f26d(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function _0x389484(e,t,i){i*=.5;var n=Math.sin(i);return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=Math.cos(i),e}function _0x386dc0(e,t){var i=2*Math.acos(t[3]),n=Math.sin(i/2);return n>_0x3f5eb4?(e[0]=t[0]/n,e[1]=t[1]/n,e[2]=t[2]/n):(e[0]=1,e[1]=0,e[2]=0),i}function _0x223db7(e,t){var i=_0x2fd86b(e,t);return Math.acos(2*i*i-1)}function _0x17c19a(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=i[0],l=i[1],u=i[2],c=i[3];return e[0]=n*c+a*s+r*u-o*l,e[1]=r*c+a*l+o*s-n*u,e[2]=o*c+a*u+n*l-r*s,e[3]=a*c-n*s-r*l-o*u,e}function _0x355170(e,t,i){i*=.5;var n=t[0],r=t[1],o=t[2],a=t[3],s=Math.sin(i),l=Math.cos(i);return e[0]=n*l+a*s,e[1]=r*l+o*s,e[2]=o*l-r*s,e[3]=a*l-n*s,e}function _0x1e80dd(e,t,i){i*=.5;var n=t[0],r=t[1],o=t[2],a=t[3],s=Math.sin(i),l=Math.cos(i);return e[0]=n*l-o*s,e[1]=r*l+a*s,e[2]=o*l+n*s,e[3]=a*l-r*s,e}function _0x4960cd(e,t,i){i*=.5;var n=t[0],r=t[1],o=t[2],a=t[3],s=Math.sin(i),l=Math.cos(i);return e[0]=n*l+r*s,e[1]=r*l-n*s,e[2]=o*l+a*s,e[3]=a*l-o*s,e}function _0x578872(e,t){var i=t[0],n=t[1],r=t[2];return e[0]=i,e[1]=n,e[2]=r,e[3]=Math.sqrt(Math.abs(1-i*i-n*n-r*r)),e}function _0x3101f1(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=Math.sqrt(i*i+n*n+r*r),s=Math.exp(o),l=a>0?s*Math.sin(a)/a:0;return e[0]=i*l,e[1]=n*l,e[2]=r*l,e[3]=s*Math.cos(a),e}function _0x223849(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=Math.sqrt(i*i+n*n+r*r),s=a>0?Math.atan2(a,o)/a:0;return e[0]=i*s,e[1]=n*s,e[2]=r*s,e[3]=.5*Math.log(i*i+n*n+r*r+o*o),e}function _0x2d3a7c(e,t,i){return _0x223849(e,t),_0x353e6a(e,e,i),_0x3101f1(e,e),e}function _0x98933a(e,t,i,n){var r,o,a,s,l,u=t[0],c=t[1],h=t[2],d=t[3],f=i[0],p=i[1],_=i[2],m=i[3];return(o=u*f+c*p+h*_+d*m)<0&&(o=-o,f=-f,p=-p,_=-_,m=-m),1-o>_0x3f5eb4?(r=Math.acos(o),a=Math.sin(r),s=Math.sin((1-n)*r)/a,l=Math.sin(n*r)/a):(s=1-n,l=n),e[0]=s*u+l*f,e[1]=s*c+l*p,e[2]=s*h+l*_,e[3]=s*d+l*m,e}function _0x590f83(e){var t=_0x2a0656(),i=_0x2a0656(),n=_0x2a0656(),r=Math.sqrt(1-t),o=Math.sqrt(t);return e[0]=r*Math.sin(2*Math.PI*i),e[1]=r*Math.cos(2*Math.PI*i),e[2]=o*Math.sin(2*Math.PI*n),e[3]=o*Math.cos(2*Math.PI*n),e}function _0x314879(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=i*i+n*n+r*r+o*o,s=a?1/a:0;return e[0]=-i*s,e[1]=-n*s,e[2]=-r*s,e[3]=o*s,e}function _0x42ebb4(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function _0xead965(e,t){var i,n=t[0]+t[4]+t[8];if(n>0)i=Math.sqrt(n+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{var r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);var o=(r+1)%3,a=(r+2)%3;i=Math.sqrt(t[3*r+r]-t[3*o+o]-t[3*a+a]+1),e[r]=.5*i,i=.5/i,e[3]=(t[3*o+a]-t[3*a+o])*i,e[o]=(t[3*o+r]+t[3*r+o])*i,e[a]=(t[3*a+r]+t[3*r+a])*i}return e}function _0x34109c(e,t,i,n){var r=.5*Math.PI/180;t*=r,i*=r,n*=r;var o=Math.sin(t),a=Math.cos(t),s=Math.sin(i),l=Math.cos(i),u=Math.sin(n),c=Math.cos(n);return e[0]=o*l*c-a*s*u,e[1]=a*s*c+o*l*u,e[2]=a*l*u-o*s*c,e[3]=a*l*c+o*s*u,e}function _0x53acb0(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}var _0x3072b4=_0x5d2e1b,_0x5a2a97=_0x274da6,_0x30669d=_0x474809,_0x6065f8=_0x231745,_0x573e9e=_0x3f09fb,_0x3c0b7e=_0x17c19a,_0x353e6a=_0xfba9ac,_0x2fd86b=_0x22290d,_0x443319=_0x111b79,_0x13ba82=_0x179990,_0x7fcdb0=_0x13ba82,_0x12bd9c=_0x28a11d,_0x4a7f90=_0x12bd9c,_0x3a1412=_0x40dc0b,_0x37d794=_0x564073,_0x2834ba=_0x4d392e,_0x5aace6=(_0x3fec6b=_0x53fc71(),_0x59cf60=_0x151f13(1,0,0),_0x4e3193=_0x151f13(0,1,0),function(e,t,i){var n=_0x4981b7(t,i);return n<-.999999?(_0x5ba6d7(_0x3fec6b,_0x59cf60,t),_0x38448b(_0x3fec6b)<1e-6&&_0x5ba6d7(_0x3fec6b,_0x4e3193,t),_0x5e095b(_0x3fec6b,_0x3fec6b),_0x389484(e,_0x3fec6b,Math.PI),e):n>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):(_0x5ba6d7(_0x3fec6b,t,i),e[0]=_0x3fec6b[0],e[1]=_0x3fec6b[1],e[2]=_0x3fec6b[2],e[3]=1+n,_0x3a1412(e,e))}),_0xc017f8=(_0x2f209f=_0x303613(),_0x4e58d1=_0x303613(),function(e,t,i,n,r,o){return _0x98933a(_0x2f209f,t,r,o),_0x98933a(_0x4e58d1,i,n,o),_0x98933a(e,_0x2f209f,_0x4e58d1,2*o*(1-o)),e}),_0x14abfd=(_0x3dc58d=_0x1e20ad(),function(e,t,i,n){return _0x3dc58d[0]=i[0],_0x3dc58d[3]=i[1],_0x3dc58d[6]=i[2],_0x3dc58d[1]=n[0],_0x3dc58d[4]=n[1],_0x3dc58d[7]=n[2],_0x3dc58d[2]=-t[0],_0x3dc58d[5]=-t[1],_0x3dc58d[8]=-t[2],_0x3a1412(e,_0xead965(e,_0x3dc58d))}),_0xea42a5=Object.freeze({create:_0x303613,identity:_0x54f26d,setAxisAngle:_0x389484,getAxisAngle:_0x386dc0,getAngle:_0x223db7,multiply:_0x17c19a,rotateX:_0x355170,rotateY:_0x1e80dd,rotateZ:_0x4960cd,calculateW:_0x578872,exp:_0x3101f1,ln:_0x223849,pow:_0x2d3a7c,slerp:_0x98933a,random:_0x590f83,invert:_0x314879,conjugate:_0x42ebb4,fromMat3:_0xead965,fromEuler:_0x34109c,str:_0x53acb0,clone:_0x3072b4,fromValues:_0x5a2a97,copy:_0x30669d,set:_0x6065f8,add:_0x573e9e,mul:_0x3c0b7e,scale:_0x353e6a,dot:_0x2fd86b,lerp:_0x443319,length:_0x13ba82,len:_0x7fcdb0,squaredLength:_0x12bd9c,sqrLen:_0x4a7f90,normalize:_0x3a1412,exactEquals:_0x37d794,equals:_0x2834ba,rotationTo:_0x5aace6,sqlerp:_0xc017f8,setAxes:_0x14abfd}),_0x3dc58d,_0x2f209f,_0x4e58d1,_0x3fec6b,_0x59cf60,_0x4e3193;function _0x449946(){var e=new _0x5131a4(8);return _0x5131a4!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[4]=0,e[5]=0,e[6]=0,e[7]=0),e[3]=1,e}function _0x1640dd(e){var t=new _0x5131a4(8);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t}function _0x4480d5(e,t,i,n,r,o,a,s){var l=new _0x5131a4(8);return l[0]=e,l[1]=t,l[2]=i,l[3]=n,l[4]=r,l[5]=o,l[6]=a,l[7]=s,l}function _0x54f1a9(e,t,i,n,r,o,a){var s=new _0x5131a4(8);s[0]=e,s[1]=t,s[2]=i,s[3]=n;var l=.5*r,u=.5*o,c=.5*a;return s[4]=l*n+u*i-c*t,s[5]=u*n+c*e-l*i,s[6]=c*n+l*t-u*e,s[7]=-l*e-u*t-c*i,s}function _0x5e0e4c(e,t,i){var n=.5*i[0],r=.5*i[1],o=.5*i[2],a=t[0],s=t[1],l=t[2],u=t[3];return e[0]=a,e[1]=s,e[2]=l,e[3]=u,e[4]=n*u+r*l-o*s,e[5]=r*u+o*a-n*l,e[6]=o*u+n*s-r*a,e[7]=-n*a-r*s-o*l,e}function _0x26de9d(e,t){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e[4]=.5*t[0],e[5]=.5*t[1],e[6]=.5*t[2],e[7]=0,e}function _0xe19bd7(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=0,e[5]=0,e[6]=0,e[7]=0,e}function _0x5c248d(e,t){var i=_0x303613();_0x3c804f(i,t);var n=new _0x5131a4(3);return _0x5ccede(n,t),_0x5e0e4c(e,i,n),e}function _0xbece56(e,t){return 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}function _0x379a6d(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e[6]=0,e[7]=0,e}function _0x101b05(e,t,i,n,r,o,a,s,l){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e[4]=o,e[5]=a,e[6]=s,e[7]=l,e}var _0x128700=_0x30669d;function _0x193597(e,t){return e[0]=t[4],e[1]=t[5],e[2]=t[6],e[3]=t[7],e}var _0x4dca8e=_0x30669d;function _0x38cc2d(e,t){return e[4]=t[0],e[5]=t[1],e[6]=t[2],e[7]=t[3],e}function _0x256d0c(e,t){var i=t[4],n=t[5],r=t[6],o=t[7],a=-t[0],s=-t[1],l=-t[2],u=t[3];return e[0]=2*(i*u+o*a+n*l-r*s),e[1]=2*(n*u+o*s+r*a-i*l),e[2]=2*(r*u+o*l+i*s-n*a),e}function _0x31a541(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=.5*i[0],l=.5*i[1],u=.5*i[2],c=t[4],h=t[5],d=t[6],f=t[7];return e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=a*s+r*u-o*l+c,e[5]=a*l+o*s-n*u+h,e[6]=a*u+n*l-r*s+d,e[7]=-n*s-r*l-o*u+f,e}function _0x557601(e,t,i){var n=-t[0],r=-t[1],o=-t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=s*a+c*n+l*o-u*r,d=l*a+c*r+u*n-s*o,f=u*a+c*o+s*r-l*n,p=c*a-s*n-l*r-u*o;return _0x355170(e,t,i),n=e[0],r=e[1],o=e[2],a=e[3],e[4]=h*a+p*n+d*o-f*r,e[5]=d*a+p*r+f*n-h*o,e[6]=f*a+p*o+h*r-d*n,e[7]=p*a-h*n-d*r-f*o,e}function _0x3e59a5(e,t,i){var n=-t[0],r=-t[1],o=-t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=s*a+c*n+l*o-u*r,d=l*a+c*r+u*n-s*o,f=u*a+c*o+s*r-l*n,p=c*a-s*n-l*r-u*o;return _0x1e80dd(e,t,i),n=e[0],r=e[1],o=e[2],a=e[3],e[4]=h*a+p*n+d*o-f*r,e[5]=d*a+p*r+f*n-h*o,e[6]=f*a+p*o+h*r-d*n,e[7]=p*a-h*n-d*r-f*o,e}function _0x2e74a8(e,t,i){var n=-t[0],r=-t[1],o=-t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=s*a+c*n+l*o-u*r,d=l*a+c*r+u*n-s*o,f=u*a+c*o+s*r-l*n,p=c*a-s*n-l*r-u*o;return _0x4960cd(e,t,i),n=e[0],r=e[1],o=e[2],a=e[3],e[4]=h*a+p*n+d*o-f*r,e[5]=d*a+p*r+f*n-h*o,e[6]=f*a+p*o+h*r-d*n,e[7]=p*a-h*n-d*r-f*o,e}function _0x8fb1b5(e,t,i){var n=i[0],r=i[1],o=i[2],a=i[3],s=t[0],l=t[1],u=t[2],c=t[3];return e[0]=s*a+c*n+l*o-u*r,e[1]=l*a+c*r+u*n-s*o,e[2]=u*a+c*o+s*r-l*n,e[3]=c*a-s*n-l*r-u*o,s=t[4],l=t[5],u=t[6],c=t[7],e[4]=s*a+c*n+l*o-u*r,e[5]=l*a+c*r+u*n-s*o,e[6]=u*a+c*o+s*r-l*n,e[7]=c*a-s*n-l*r-u*o,e}function _0x25cb59(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=i[0],l=i[1],u=i[2],c=i[3];return e[0]=n*c+a*s+r*u-o*l,e[1]=r*c+a*l+o*s-n*u,e[2]=o*c+a*u+n*l-r*s,e[3]=a*c-n*s-r*l-o*u,s=i[4],l=i[5],u=i[6],c=i[7],e[4]=n*c+a*s+r*u-o*l,e[5]=r*c+a*l+o*s-n*u,e[6]=o*c+a*u+n*l-r*s,e[7]=a*c-n*s-r*l-o*u,e}function _0x34c134(e,t,i,n){if(Math.abs(n)<_0x3f5eb4)return _0xbece56(e,t);var r=Math.hypot(i[0],i[1],i[2]);n*=.5;var o=Math.sin(n),a=o*i[0]/r,s=o*i[1]/r,l=o*i[2]/r,u=Math.cos(n),c=t[0],h=t[1],d=t[2],f=t[3];e[0]=c*u+f*a+h*l-d*s,e[1]=h*u+f*s+d*a-c*l,e[2]=d*u+f*l+c*s-h*a,e[3]=f*u-c*a-h*s-d*l;var p=t[4],_=t[5],m=t[6],$=t[7];return e[4]=p*u+$*a+_*l-m*s,e[5]=_*u+$*s+m*a-p*l,e[6]=m*u+$*l+p*s-_*a,e[7]=$*u-p*a-_*s-m*l,e}function _0x48522d(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e[4]=t[4]+i[4],e[5]=t[5]+i[5],e[6]=t[6]+i[6],e[7]=t[7]+i[7],e}function _0x40500c(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=i[4],l=i[5],u=i[6],c=i[7],h=t[4],d=t[5],f=t[6],p=t[7],_=i[0],m=i[1],$=i[2],g=i[3];return e[0]=n*g+a*_+r*$-o*m,e[1]=r*g+a*m+o*_-n*$,e[2]=o*g+a*$+n*m-r*_,e[3]=a*g-n*_-r*m-o*$,e[4]=n*c+a*s+r*u-o*l+h*g+p*_+d*$-f*m,e[5]=r*c+a*l+o*s-n*u+d*g+p*m+f*_-h*$,e[6]=o*c+a*u+n*l-r*s+f*g+p*$+h*m-d*_,e[7]=a*c-n*s-r*l-o*u+p*g-h*_-d*m-f*$,e}var _0x44e86a=_0x40500c;function _0x32356(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e}var _0xe6f796=_0x2fd86b;function _0x312c6f(e,t,i,n){var r=1-n;return _0xe6f796(t,i)<0&&(n=-n),e[0]=t[0]*r+i[0]*n,e[1]=t[1]*r+i[1]*n,e[2]=t[2]*r+i[2]*n,e[3]=t[3]*r+i[3]*n,e[4]=t[4]*r+i[4]*n,e[5]=t[5]*r+i[5]*n,e[6]=t[6]*r+i[6]*n,e[7]=t[7]*r+i[7]*n,e}function _0x103052(e,t){var i=_0x4cc5ff(t);return e[0]=-t[0]/i,e[1]=-t[1]/i,e[2]=-t[2]/i,e[3]=t[3]/i,e[4]=-t[4]/i,e[5]=-t[5]/i,e[6]=-t[6]/i,e[7]=t[7]/i,e}function _0x5353b8(e,t){return 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}var _0x563188=_0x13ba82,_0x1c1e9b=_0x563188,_0x4cc5ff=_0x12bd9c,_0xaf2538=_0x4cc5ff;function _0x2fe12b(e,t){var i=_0x4cc5ff(t);if(i>0){i=Math.sqrt(i);var n=t[0]/i,r=t[1]/i,o=t[2]/i,a=t[3]/i,s=t[4],l=t[5],u=t[6],c=t[7],h=n*s+r*l+o*u+a*c;e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=(s-n*h)/i,e[5]=(l-r*h)/i,e[6]=(u-o*h)/i,e[7]=(c-a*h)/i}return e}function _0x1545c4(e){return"quat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+")"}function _0x5556f0(e,t){return 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]}function _0x285025(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=t[0],h=t[1],d=t[2],f=t[3],p=t[4],_=t[5],m=t[6],$=t[7];return Math.abs(i-c)<=_0x3f5eb4*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(n-h)<=_0x3f5eb4*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(r-d)<=_0x3f5eb4*Math.max(1,Math.abs(r),Math.abs(d))&&Math.abs(o-f)<=_0x3f5eb4*Math.max(1,Math.abs(o),Math.abs(f))&&Math.abs(a-p)<=_0x3f5eb4*Math.max(1,Math.abs(a),Math.abs(p))&&Math.abs(s-_)<=_0x3f5eb4*Math.max(1,Math.abs(s),Math.abs(_))&&Math.abs(l-m)<=_0x3f5eb4*Math.max(1,Math.abs(l),Math.abs(m))&&Math.abs(u-$)<=_0x3f5eb4*Math.max(1,Math.abs(u),Math.abs($))}var _0x58a68f=Object.freeze({create:_0x449946,clone:_0x1640dd,fromValues:_0x4480d5,fromRotationTranslationValues:_0x54f1a9,fromRotationTranslation:_0x5e0e4c,fromTranslation:_0x26de9d,fromRotation:_0xe19bd7,fromMat4:_0x5c248d,copy:_0xbece56,identity:_0x379a6d,set:_0x101b05,getReal:_0x128700,getDual:_0x193597,setReal:_0x4dca8e,setDual:_0x38cc2d,getTranslation:_0x256d0c,translate:_0x31a541,rotateX:_0x557601,rotateY:_0x3e59a5,rotateZ:_0x2e74a8,rotateByQuatAppend:_0x8fb1b5,rotateByQuatPrepend:_0x25cb59,rotateAroundAxis:_0x34c134,add:_0x48522d,multiply:_0x40500c,mul:_0x44e86a,scale:_0x32356,dot:_0xe6f796,lerp:_0x312c6f,invert:_0x103052,conjugate:_0x5353b8,length:_0x563188,len:_0x1c1e9b,squaredLength:_0x4cc5ff,sqrLen:_0xaf2538,normalize:_0x2fe12b,str:_0x1545c4,exactEquals:_0x5556f0,equals:_0x285025});function _0x3c7414(){var e=new _0x5131a4(2);return _0x5131a4!=Float32Array&&(e[0]=0,e[1]=0),e}function _0x49de55(e){var t=new _0x5131a4(2);return t[0]=e[0],t[1]=e[1],t}function _0xa55e3e(e,t){var i=new _0x5131a4(2);return i[0]=e,i[1]=t,i}function _0x1d91e4(e,t){return e[0]=t[0],e[1]=t[1],e}function _0x1bf083(e,t,i){return e[0]=t,e[1]=i,e}function _0x874aea(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e}function _0x5e58fc(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e}function _0x1e02dc(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e}function _0x86e838(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e}function _0x16a052(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e}function _0x4e18d7(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e}function _0x52ca92(e,t,i){return e[0]=Math.min(t[0],i[0]),e[1]=Math.min(t[1],i[1]),e}function _0x5dc9bb(e,t,i){return e[0]=Math.max(t[0],i[0]),e[1]=Math.max(t[1],i[1]),e}function _0x3de311(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e}function _0x3dbf65(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e}function _0x5387a9(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e}function _0x4ab784(e,t){var i=t[0]-e[0],n=t[1]-e[1];return Math.hypot(i,n)}function _0x41d545(e,t){var i=t[0]-e[0],n=t[1]-e[1];return i*i+n*n}function _0x218756(e){var t=e[0],i=e[1];return Math.hypot(t,i)}function _0x3e092b(e){var t=e[0],i=e[1];return t*t+i*i}function _0x4bb777(e,t){return e[0]=-t[0],e[1]=-t[1],e}function _0x826457(e,t){return e[0]=1/t[0],e[1]=1/t[1],e}function _0x2c44a8(e,t){var i=t[0],n=t[1],r=i*i+n*n;return r>0&&(r=1/Math.sqrt(r)),e[0]=t[0]*r,e[1]=t[1]*r,e}function _0x5e298a(e,t){return e[0]*t[0]+e[1]*t[1]}function _0x4d5027(e,t,i){var n=t[0]*i[1]-t[1]*i[0];return e[0]=e[1]=0,e[2]=n,e}function _0x399acc(e,t,i,n){var r=t[0],o=t[1];return e[0]=r+n*(i[0]-r),e[1]=o+n*(i[1]-o),e}function _0x23c929(e,t){t=t||1;var i=2*_0x2a0656()*Math.PI;return e[0]=Math.cos(i)*t,e[1]=Math.sin(i)*t,e}function _0x1af038(e,t,i){var n=t[0],r=t[1];return e[0]=i[0]*n+i[2]*r,e[1]=i[1]*n+i[3]*r,e}function _0x457885(e,t,i){var n=t[0],r=t[1];return e[0]=i[0]*n+i[2]*r+i[4],e[1]=i[1]*n+i[3]*r+i[5],e}function _0x21408c(e,t,i){var n=t[0],r=t[1];return e[0]=i[0]*n+i[3]*r+i[6],e[1]=i[1]*n+i[4]*r+i[7],e}function _0x123a49(e,t,i){var n=t[0],r=t[1];return e[0]=i[0]*n+i[4]*r+i[12],e[1]=i[1]*n+i[5]*r+i[13],e}function _0x17cf53(e,t,i,n){var r=t[0]-i[0],o=t[1]-i[1],a=Math.sin(n),s=Math.cos(n);return e[0]=r*s-o*a+i[0],e[1]=r*a+o*s+i[1],e}function _0x256fdf(e,t){var i=e[0],n=e[1],r=t[0],o=t[1],a=i*i+n*n;a>0&&(a=1/Math.sqrt(a));var s=r*r+o*o;s>0&&(s=1/Math.sqrt(s));var l=(i*r+n*o)*a*s;return l>1?0:l<-1?Math.PI:Math.acos(l)}function _0x597eee(e){return e[0]=0,e[1]=0,e}function _0x2d1696(e){return"vec2("+e[0]+", "+e[1]+")"}function _0x5e1f03(e,t){return e[0]===t[0]&&e[1]===t[1]}function _0x459707(e,t){var i=e[0],n=e[1],r=t[0],o=t[1];return Math.abs(i-r)<=_0x3f5eb4*Math.max(1,Math.abs(i),Math.abs(r))&&Math.abs(n-o)<=_0x3f5eb4*Math.max(1,Math.abs(n),Math.abs(o))}var _0x37c8f2=_0x218756,_0x5e250d=_0x5e58fc,_0x12f083=_0x1e02dc,_0x2e0b59=_0x86e838,_0x3923e7=_0x4ab784,_0x34a959=_0x41d545,_0x1dfd2b=_0x3e092b,_0x3d2e4d=(_0x3e3bf0=_0x3c7414(),function(e,t,i,n,r,o){var a,s;for(!t&&(t=2),!i&&(i=0),s=n?Math.min(n*t+i,e.length):e.length,a=i;a<s;a+=t)_0x3e3bf0[0]=e[a],_0x3e3bf0[1]=e[a+1],r(_0x3e3bf0,_0x3e3bf0,o),e[a]=_0x3e3bf0[0],e[a+1]=_0x3e3bf0[1];return e}),_0x3fbc0b=Object.freeze({create:_0x3c7414,clone:_0x49de55,fromValues:_0xa55e3e,copy:_0x1d91e4,set:_0x1bf083,add:_0x874aea,subtract:_0x5e58fc,multiply:_0x1e02dc,divide:_0x86e838,ceil:_0x16a052,floor:_0x4e18d7,min:_0x52ca92,max:_0x5dc9bb,round:_0x3de311,scale:_0x3dbf65,scaleAndAdd:_0x5387a9,distance:_0x4ab784,squaredDistance:_0x41d545,length:_0x218756,squaredLength:_0x3e092b,negate:_0x4bb777,inverse:_0x826457,normalize:_0x2c44a8,dot:_0x5e298a,cross:_0x4d5027,lerp:_0x399acc,random:_0x23c929,transformMat2:_0x1af038,transformMat2d:_0x457885,transformMat3:_0x21408c,transformMat4:_0x123a49,rotate:_0x17cf53,angle:_0x256fdf,zero:_0x597eee,str:_0x2d1696,exactEquals:_0x5e1f03,equals:_0x459707,len:_0x37c8f2,sub:_0x5e250d,mul:_0x12f083,div:_0x2e0b59,dist:_0x3923e7,sqrDist:_0x34a959,sqrLen:_0x1dfd2b,forEach:_0x3d2e4d}),_0x3e3bf0;_0x4d2af4.glMatrix=_0x5253f3,_0x4d2af4.mat2=_0x99c312,_0x4d2af4.mat2d=_0xb00175,_0x4d2af4.mat3=_0x14f01b,_0x4d2af4.mat4=_0x105429,_0x4d2af4.quat=_0xea42a5,_0x4d2af4.quat2=_0x58a68f,_0x4d2af4.vec2=_0x3fbc0b,_0x4d2af4.vec3=_0x5a3198,_0x4d2af4.vec4=_0x1a4b25;var _0x280597=(_0x31857d=!0,function(e,t){var i=_0x31857d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x31857d=!1,i}),_0x53dcfb=_0x280597(void 0,(function(){return _0x53dcfb.toString().search("(((.+)+)+)+$").toString().constructor(_0x53dcfb).search("(((.+)+)+)+$")})),_0x31857d;function number(e,t,i){return e*(1-i)+t*i}_0x53dcfb();var _0xd8aa4c=(_0x323296=!0,function(e,t){var i=_0x323296?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x323296=!1,i}),_0x2761ad=_0xd8aa4c(void 0,(function(){return _0x2761ad.toString().search("(((.+)+)+)+$").toString().constructor(_0x2761ad).search("(((.+)+)+)+$")})),_0x323296;_0x2761ad();var _0x30acdb=function(){this.first=!0};_0x30acdb.prototype.update=function(e,t){var i=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=i,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=i,!0):(this.lastFloorZoom>i?(this.lastIntegerZoom=i+1,this.lastIntegerZoomTime=t):this.lastFloorZoom<i&&(this.lastIntegerZoom=i,this.lastIntegerZoomTime=t),e!==this.lastZoom&&(this.lastZoom=e,this.lastFloorZoom=i,!0))},_0x40d7a6.register("ZoomHistory",_0x30acdb);var _0x125b10=(_0x5ccf67=!0,function(e,t){var i=_0x5ccf67?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ccf67=!1,i}),_0x161fce=_0x125b10(void 0,(function(){return _0x161fce.toString().search("(((.+)+)+)+$").toString().constructor(_0x161fce).search("(((.+)+)+)+$")})),_0x5ccf67;_0x161fce();var _0x460d5e=function(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new _0x30acdb,this.transition={})};_0x460d5e.prototype.isSupportedScript=function(e){return!1},_0x460d5e.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},_0x460d5e.prototype.getCrossfadeParameters=function(){var e=this.zoom,t=e-Math.floor(e),i=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*i}:{fromScale:.5,toScale:1,t:1-(1-i)*t}},_0x40d7a6.register("EvaluationParameters",_0x460d5e);const _0x209257=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5d6532=_0x209257(void 0,(function(){return _0x5d6532.toString().search("(((.+)+)+)+$").toString().constructor(_0x5d6532).search("(((.+)+)+)+$")}));_0x5d6532();const _0xb8c801=128;function _0x330da2(e,t){const{expression:i}=t;if("constant"===i.kind){return{kind:"constant",layoutSize:i.evaluate(new _0x460d5e(e+1))}}if("source"===i.kind)return{kind:"source"};{const{zoomStops:t,interpolationType:n}=i;let r=0;for(;r<t.length&&t[r]<=e;)r++;r=Math.max(0,r-1);let o=r;for(;o<t.length&&t[o]<e+1;)o++;o=Math.min(t.length-1,o);const a=t[r],s=t[o];if("composite"===i.kind)return{kind:"composite",minZoom:a,maxZoom:s,interpolationType:n};return{kind:"camera",minZoom:a,maxZoom:s,minSize:i.evaluate(new _0x460d5e(a)),maxSize:i.evaluate(new _0x460d5e(s)),interpolationType:n}}}function _0x3dc966(e,{uSize:t,uSizeT:i},{lowerSize:n,upperSize:r}){return"source"===e.kind?n/_0xb8c801:"composite"===e.kind?number(n/_0xb8c801,r/_0xb8c801,i):t}function _0x5ef064(e,t){let i=0,n=0;if("constant"===e.kind)n=e.layoutSize;else if("source"!==e.kind){const{interpolationType:r,minZoom:o,maxZoom:a}=e,s=r?clamp(_0x1b26db.interpolationFactor(r,t,o,a),0,1):0;"camera"===e.kind?n=number(e.minSize,e.maxSize,s):i=s}return{uSizeT:i,uSize:n}}var _0x23415a=(_0x9b05a6=!0,function(e,t){var i=_0x9b05a6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x9b05a6=!1,i}),_0x4b61b9=_0x23415a(void 0,(function(){return _0x4b61b9.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b61b9).search("(((.+)+)+)+$")})),_0x9b05a6;_0x4b61b9();var _0x44172f={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};function _0xb04b18(e,t){void 0===t&&(t=1);var i=0,n=0;return{members:e.map((function(e){var r=_0x1ed770(e.type),o=i=_0x27cd7c(i,Math.max(t,r)),a=e.components||1;return n=Math.max(n,r),i+=r*a,{name:e.name,type:e.type,components:a,offset:o}})),size:_0x27cd7c(i,Math.max(n,t)),alignment:t}}function _0x1ed770(e){return _0x44172f[e].BYTES_PER_ELEMENT}function _0x27cd7c(e,t){return Math.ceil(e/t)*t}const _0x3d6788=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x404248=_0x3d6788(void 0,(function(){return _0x404248.toString().search("(((.+)+)+)+$").toString().constructor(_0x404248).search("(((.+)+)+)+$")}));_0x404248();const symbolLayoutAttributes=_0xb04b18([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),dynamicLayoutAttributes=_0xb04b18([{name:"a_projected_pos",components:3,type:"Float32"}],4);_0xb04b18([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),_0xb04b18([{name:"a_fade_opacity",components:1,type:"Float32"}],4);const collisionVertexAttributes=_0xb04b18([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);_0xb04b18([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"radius"},{type:"Int16",name:"signedDistanceFromAnchor"}]);const collisionBoxLayout=_0xb04b18([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),collisionCircleLayout=_0xb04b18([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4);function _0xcb758a(e,t,i){return Math.min(i,Math.max(t,e))}function _0x3f1360(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));return n(),{min:-1*Math.pow(2,e-1),max:Math.pow(2,e-1)-1}}_0xb04b18([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),_0xb04b18([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"}]),_0xb04b18([{type:"Float32",name:"offsetX"}]),_0xb04b18([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var _0x24c937=_0x3f1360(15);function _0x43a884(e){for(var t=_0x10e17e/e.extent,i=e.loadGeometry(),n=0;n<i.length;n++)for(var r=i[n],o=0;o<r.length;o++){var a=r[o];a.x=Math.round(a.x*t),a.y=_0x10e17e-Math.round(a.y*t),(a.x<_0x24c937.min||a.x>_0x24c937.max||a.y<_0x24c937.min||a.y>_0x24c937.max)&&(a.x=_0xcb758a(a.x,_0x24c937.min,_0x24c937.max),a.y=_0xcb758a(a.y,_0x24c937.min,_0x24c937.max))}return i}var _0x2a6b78=(_0x1c4b25=!0,function(e,t){var i=_0x1c4b25?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1c4b25=!1,i}),_0x2e9a9a=_0x2a6b78(void 0,(function(){return _0x2e9a9a.toString().search("(((.+)+)+)+$").toString().constructor(_0x2e9a9a).search("(((.+)+)+)+$")})),_0x1c4b25;_0x2e9a9a();var _0x145c43=function(e,t,i){this.property=e,this.value=t,this.parameters=i};_0x145c43.prototype.isConstant=function(){return"constant"===this.value.kind},_0x145c43.prototype.constantOr=function(e){return"constant"===this.value.kind?this.value.value:e},_0x145c43.prototype.evaluate=function(e,t,i){return this.property.evaluate(this.value,this.parameters,e,t,i)};var _0x1d0d0d=(_0x47ddba=!0,function(e,t){var i=_0x47ddba?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x47ddba=!1,i}),_0x51745f=_0x1d0d0d(void 0,(function(){return _0x51745f.toString().search("(((.+)+)+)+$").toString().constructor(_0x51745f).search("(((.+)+)+)+$")})),_0x47ddba;function supportsPropertyExpression(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function supportsZoomExpression(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function supportsInterpolation(e){return!!e.expression&&e.expression.interpolated}_0x51745f();const _0x5410ab=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x454da3=_0x5410ab(void 0,(function(){return _0x454da3.toString().search("(((.+)+)+)+$").toString().constructor(_0x454da3).search("(((.+)+)+)+$")}));_0x454da3();var _0x496fba=function(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8};const _0x4bbed7=128,_0x91a751=5;var _0x16f236=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};_0x16f236.serialize=function(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}},_0x16f236.deserialize=function(e){var t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t},_0x16f236.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},_0x16f236.prototype.clear=function(){this.length=0},_0x16f236.prototype.resize=function(e){this.reserve(e),this.length=e},_0x16f236.prototype.reserve=function(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(this.capacity*_0x91a751),_0x4bbed7),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var t=this.uint8;this._refreshViews(),t&&(0==t.length&&console.log("oldUint8Array.length == 0"),this.uint8.set(t))}},_0x16f236.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var _0x8b249f=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.int16[n+0]=t,this.int16[n+1]=i,e},t}(_0x16f236);_0x8b249f.prototype.bytesPerElement=4,_0x40d7a6.register("StructArrayLayout2i4",_0x8b249f);var _0x5e78c7=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=4*e;return this.int16[o+0]=t,this.int16[o+1]=i,this.int16[o+2]=n,this.int16[o+3]=r,e},t}(_0x16f236);_0x5e78c7.prototype.bytesPerElement=8,_0x40d7a6.register("StructArrayLayout4i8",_0x5e78c7);var _0x2c6cec=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(_0x16f236);_0x2c6cec.prototype.bytesPerElement=12,_0x40d7a6.register("StructArrayLayout2i4i12",_0x2c6cec);var _0x31654d=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.uint8[l+4]=n,this.uint8[l+5]=r,this.uint8[l+6]=o,this.uint8[l+7]=a,e},t}(_0x16f236);_0x31654d.prototype.bytesPerElement=8,_0x40d7a6.register("StructArrayLayout2i4ub8",_0x31654d);var _0x50ff73=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(){e.apply(this,arguments)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},r.prototype.emplaceBack=function(e,t,i,n,r,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,e,t,i,n,r,o,a,s)},r.prototype.emplace=function(e,t,i,n,r,o,a,s,l){var u=8*e;return this.uint16[u+0]=t,this.uint16[u+1]=i,this.uint16[u+2]=n,this.uint16[u+3]=r,this.uint16[u+4]=o,this.uint16[u+5]=a,this.uint16[u+6]=s,this.uint16[u+7]=l,e},r}(_0x16f236);_0x50ff73.prototype.bytesPerElement=16,_0x40d7a6.register("StructArrayLayout8ui16",_0x50ff73);var _0x547d2f=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,i,n,r,o,a,s,l,u,c,h)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=12*e;return this.int16[f+0]=t,this.int16[f+1]=i,this.int16[f+2]=n,this.int16[f+3]=r,this.uint16[f+4]=o,this.uint16[f+5]=a,this.uint16[f+6]=s,this.uint16[f+7]=l,this.int16[f+8]=u,this.int16[f+9]=c,this.int16[f+10]=h,this.int16[f+11]=d,e},t}(_0x16f236);_0x547d2f.prototype.bytesPerElement=24,_0x40d7a6.register("StructArrayLayout4i4ui4i24",_0x547d2f);var _0x4b08f4=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.float32[r+0]=t,this.float32[r+1]=i,this.float32[r+2]=n,e},t}(_0x16f236);_0x4b08f4.prototype.bytesPerElement=12,_0x40d7a6.register("StructArrayLayout3f12",_0x4b08f4);var _0x1478ba=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.uint32[i+0]=t,e},t}(_0x16f236);_0x1478ba.prototype.bytesPerElement=4,_0x40d7a6.register("StructArrayLayout1ul4",_0x1478ba);var _0x20c038=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c){var h=this.length;return this.resize(h+1),this.emplace(h,e,t,i,n,r,o,a,s,l,u,c)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=12*e,f=6*e;return this.int16[d+0]=t,this.int16[d+1]=i,this.int16[d+2]=n,this.int16[d+3]=r,this.int16[d+4]=o,this.int16[d+5]=a,this.uint32[f+3]=s,this.uint16[d+8]=l,this.uint16[d+9]=u,this.int16[d+10]=c,this.int16[d+11]=h,e},t}(_0x16f236);_0x20c038.prototype.bytesPerElement=24,_0x40d7a6.register("StructArrayLayout6i1ul2ui2i24",_0x20c038);var _0x3cb7da=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(_0x16f236);_0x3cb7da.prototype.bytesPerElement=12,_0x40d7a6.register("StructArrayLayout2i2i2i12",_0x3cb7da);var _0x1200c6=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=12*e,a=3*e;return this.uint8[o+0]=t,this.uint8[o+1]=i,this.float32[a+1]=n,this.float32[a+2]=r,e},t}(_0x16f236);_0x1200c6.prototype.bytesPerElement=12,_0x40d7a6.register("StructArrayLayout2ub2f12",_0x1200c6);var _0x8b242=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m){var $=this.length;return this.resize($+1),this.emplace($,e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,$){var g=24*e,y=12*e,v=48*e;return this.int16[g+0]=t,this.int16[g+1]=i,this.uint16[g+2]=n,this.uint16[g+3]=r,this.uint32[y+2]=o,this.uint32[y+3]=a,this.uint32[y+4]=s,this.uint16[g+10]=l,this.uint16[g+11]=u,this.uint16[g+12]=c,this.float32[y+7]=h,this.float32[y+8]=d,this.uint8[v+36]=f,this.uint8[v+37]=p,this.uint8[v+38]=_,this.uint32[y+10]=m,this.int16[g+22]=$,e},t}(_0x16f236);_0x8b242.prototype.bytesPerElement=48,_0x40d7a6.register("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",_0x8b242);var _0x30cace=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,$,g,y,v,x,b,S,w,C){var T=this.length;return this.resize(T+1),this.emplace(T,e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,$,g,y,v,x,b,S,w,C)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,$,g,y,v,x,b,S,w,C,T){var P=30*e,E=15*e;return this.int16[P+0]=t,this.int16[P+1]=i,this.int16[P+2]=n,this.int16[P+3]=r,this.int16[P+4]=o,this.int16[P+5]=a,this.int16[P+6]=s,this.int16[P+7]=l,this.uint16[P+8]=u,this.uint16[P+9]=c,this.uint16[P+10]=h,this.uint16[P+11]=d,this.uint16[P+12]=f,this.uint16[P+13]=p,this.uint16[P+14]=_,this.uint16[P+15]=m,this.uint16[P+16]=$,this.uint16[P+17]=g,this.uint16[P+18]=y,this.uint16[P+19]=v,this.uint16[P+20]=x,this.uint16[P+21]=b,this.uint32[E+11]=S,this.float32[E+12]=w,this.float32[E+13]=C,this.float32[E+14]=T,e},t}(_0x16f236);_0x30cace.prototype.bytesPerElement=60,_0x40d7a6.register("StructArrayLayout8i14ui1ul3f60",_0x30cace);var _0x5f0bf6=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.float32[i+0]=t,e},t}(_0x16f236);_0x5f0bf6.prototype.bytesPerElement=4,_0x40d7a6.register("StructArrayLayout1f4",_0x5f0bf6);var _0x1e4d05=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.int16[r+0]=t,this.int16[r+1]=i,this.int16[r+2]=n,e},t}(_0x16f236);_0x1e4d05.prototype.bytesPerElement=6,_0x40d7a6.register("StructArrayLayout3i6",_0x1e4d05);var _0x5e1fb8=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=2*e,o=4*e;return this.uint32[r+0]=t,this.uint16[o+2]=i,this.uint16[o+3]=n,e},t}(_0x16f236);_0x5e1fb8.prototype.bytesPerElement=8,_0x40d7a6.register("StructArrayLayout1ul2ui8",_0x5e1fb8);var _0x239d74=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.uint16[r+0]=t,this.uint16[r+1]=i,this.uint16[r+2]=n,e},t}(_0x16f236);_0x239d74.prototype.bytesPerElement=6,_0x40d7a6.register("StructArrayLayout3ui6",_0x239d74);var _0x13aa79=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.uint16[n+0]=t,this.uint16[n+1]=i,e},t}(_0x16f236);_0x13aa79.prototype.bytesPerElement=4,_0x40d7a6.register("StructArrayLayout2ui4",_0x13aa79);var _0x50ebe5=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.uint16[i+0]=t,e},t}(_0x16f236);_0x50ebe5.prototype.bytesPerElement=2,_0x40d7a6.register("StructArrayLayout1ui2",_0x50ebe5);var _0x4d01f7=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.float32[n+0]=t,this.float32[n+1]=i,e},t}(_0x16f236);_0x4d01f7.prototype.bytesPerElement=8,_0x40d7a6.register("StructArrayLayout2f8",_0x4d01f7);var _0x159489=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=4*e;return this.float32[o+0]=t,this.float32[o+1]=i,this.float32[o+2]=n,this.float32[o+3]=r,e},t}(_0x16f236);_0x159489.prototype.bytesPerElement=16,_0x40d7a6.register("StructArrayLayout4f16",_0x159489);var _0x23e726=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.float32[s+0]=t,this.float32[s+1]=i,this.float32[s+2]=n,this.float32[s+3]=r,this.float32[s+4]=o,this.float32[s+5]=a,e},t}(_0x16f236);_0x23e726.prototype.bytesPerElement=24,_0x40d7a6.register("StructArrayLayout6f24",_0x23e726);var _0x53365f=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,e,t,i,n,r,o,a,s)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l){var u=8*e;return this.float32[u+0]=t,this.float32[u+1]=i,this.float32[u+2]=n,this.float32[u+3]=r,this.float32[u+4]=o,this.float32[u+5]=a,this.float32[u+6]=s,this.float32[u+7]=l,e},t}(_0x16f236);_0x53365f.prototype.bytesPerElement=32,_0x40d7a6.register("StructArrayLayout8f32",_0x53365f);var _0x512210=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,i,n,r,o,a,s,l,u,c,h)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=12*e;return this.float32[f+0]=t,this.float32[f+1]=i,this.float32[f+2]=n,this.float32[f+3]=r,this.float32[f+4]=o,this.float32[f+5]=a,this.float32[f+6]=s,this.float32[f+7]=l,this.float32[f+8]=u,this.float32[f+9]=c,this.float32[f+10]=h,this.float32[f+11]=d,e},t}(_0x16f236);_0x512210.prototype.bytesPerElement=48,_0x40d7a6.register("StructArrayLayout12f48",_0x512210);var _0x2b7fc8=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return i.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorPointX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorPointY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.x1.get=function(){return this._structArray.int16[this._pos2+2]},i.x1.set=function(e){this._structArray.int16[this._pos2+2]=e},i.y1.get=function(){return this._structArray.int16[this._pos2+3]},i.y1.set=function(e){this._structArray.int16[this._pos2+3]=e},i.x2.get=function(){return this._structArray.int16[this._pos2+4]},i.x2.set=function(e){this._structArray.int16[this._pos2+4]=e},i.y2.get=function(){return this._structArray.int16[this._pos2+5]},i.y2.set=function(e){this._structArray.int16[this._pos2+5]=e},i.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},i.featureIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},i.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},i.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+8]=e},i.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},i.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},i.radius.get=function(){return this._structArray.int16[this._pos2+10]},i.radius.set=function(e){this._structArray.int16[this._pos2+10]=e},i.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},i.signedDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+11]=e},i.anchorPoint.get=function(){return new pointGeometry(this.anchorPointX,this.anchorPointY)},Object.defineProperties(t.prototype,i),t}(_0x496fba);_0x2b7fc8.prototype.size=24;var _0x3e3503=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new _0x2b7fc8(this,e)},t}(_0x20c038);_0x40d7a6.register("CollisionBoxArray",_0x3e3503);var _0x4fceea=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return i.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},i.glyphStartIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},i.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},i.numGlyphs.set=function(e){this._structArray.uint16[this._pos2+3]=e},i.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},i.vertexStartIndex.set=function(e){this._structArray.uint32[this._pos4+2]=e},i.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},i.lineStartIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},i.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},i.lineLength.set=function(e){this._structArray.uint32[this._pos4+4]=e},i.segment.get=function(){return this._structArray.uint16[this._pos2+10]},i.segment.set=function(e){this._structArray.uint16[this._pos2+10]=e},i.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},i.lowerSize.set=function(e){this._structArray.uint16[this._pos2+11]=e},i.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},i.upperSize.set=function(e){this._structArray.uint16[this._pos2+12]=e},i.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},i.lineOffsetX.set=function(e){this._structArray.float32[this._pos4+7]=e},i.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},i.lineOffsetY.set=function(e){this._structArray.float32[this._pos4+8]=e},i.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},i.writingMode.set=function(e){this._structArray.uint8[this._pos1+36]=e},i.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},i.placedOrientation.set=function(e){this._structArray.uint8[this._pos1+37]=e},i.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},i.hidden.set=function(e){this._structArray.uint8[this._pos1+38]=e},i.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},i.crossTileID.set=function(e){this._structArray.uint32[this._pos4+10]=e},i.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},i.associatedIconIndex.set=function(e){this._structArray.int16[this._pos2+22]=e},Object.defineProperties(t.prototype,i),t}(_0x496fba);_0x4fceea.prototype.size=48;var _0x28f757=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new _0x4fceea(this,e)},t}(_0x8b242);_0x40d7a6.register("PlacedSymbolArray",_0x28f757);var _0xb88bdc=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0}};return i.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},i.rightJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+2]=e},i.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},i.centerJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+3]=e},i.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},i.leftJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+4]=e},i.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},i.verticalPlacedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+5]=e},i.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},i.placedIconSymbolIndex.set=function(e){this._structArray.int16[this._pos2+6]=e},i.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},i.verticalPlacedIconSymbolIndex.set=function(e){this._structArray.int16[this._pos2+7]=e},i.key.get=function(){return this._structArray.uint16[this._pos2+8]},i.key.set=function(e){this._structArray.uint16[this._pos2+8]=e},i.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},i.textBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},i.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},i.textBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+10]=e},i.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},i.verticalTextBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+11]=e},i.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},i.verticalTextBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+12]=e},i.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},i.iconBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+13]=e},i.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},i.iconBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+14]=e},i.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},i.verticalIconBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+15]=e},i.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},i.verticalIconBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+16]=e},i.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},i.featureIndex.set=function(e){this._structArray.uint16[this._pos2+17]=e},i.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},i.numHorizontalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+18]=e},i.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},i.numVerticalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+19]=e},i.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},i.numIconVertices.set=function(e){this._structArray.uint16[this._pos2+20]=e},i.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},i.numVerticalIconVertices.set=function(e){this._structArray.uint16[this._pos2+21]=e},i.crossTileID.get=function(){return this._structArray.uint32[this._pos4+11]},i.crossTileID.set=function(e){this._structArray.uint32[this._pos4+11]=e},i.textBoxScale.get=function(){return this._structArray.float32[this._pos4+12]},i.textBoxScale.set=function(e){this._structArray.float32[this._pos4+12]=e},i.textOffset0.get=function(){return this._structArray.float32[this._pos4+13]},i.textOffset0.set=function(e){this._structArray.float32[this._pos4+13]=e},i.textOffset1.get=function(){return this._structArray.float32[this._pos4+14]},i.textOffset1.set=function(e){this._structArray.float32[this._pos4+14]=e},Object.defineProperties(t.prototype,i),t}(_0x496fba);_0xb88bdc.prototype.size=60;var _0x119b2a=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new _0xb88bdc(this,e)},t}(_0x30cace);_0x40d7a6.register("SymbolInstanceArray",_0x119b2a);var _0x38c381=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={offsetX:{configurable:!0}};return i.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},i.offsetX.set=function(e){this._structArray.float32[this._pos4+0]=e},Object.defineProperties(t.prototype,i),t}(_0x496fba);_0x38c381.prototype.size=4;var _0x3060fc=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getoffsetX=function(e){return this.float32[1*e+0]},t.prototype.get=function(e){return new _0x38c381(this,e)},t}(_0x5f0bf6);_0x40d7a6.register("GlyphOffsetArray",_0x3060fc);var _0x553367=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return i.x.get=function(){return this._structArray.int16[this._pos2+0]},i.x.set=function(e){this._structArray.int16[this._pos2+0]=e},i.y.get=function(){return this._structArray.int16[this._pos2+1]},i.y.set=function(e){this._structArray.int16[this._pos2+1]=e},i.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},i.tileUnitDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+2]=e},Object.defineProperties(t.prototype,i),t}(_0x496fba);_0x553367.prototype.size=6;var _0xa11616=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getx=function(e){return this.int16[3*e+0]},t.prototype.gety=function(e){return this.int16[3*e+1]},t.prototype.gettileUnitDistanceFromAnchor=function(e){return this.int16[3*e+2]},t.prototype.get=function(e){return new _0x553367(this,e)},t}(_0x1e4d05);_0x40d7a6.register("SymbolLineVertexArray",_0xa11616);var _0x734a6c=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return i.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},i.featureIndex.set=function(e){this._structArray.uint32[this._pos4+0]=e},i.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},i.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},i.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},i.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+3]=e},Object.defineProperties(t.prototype,i),t}(_0x496fba);_0x734a6c.prototype.size=8;var _0x3378e1=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new _0x734a6c(this,e)},t}(_0x5e1fb8);_0x40d7a6.register("FeatureIndexArray",_0x3378e1);var _0x28edab=(_0x458d5a=!0,function(e,t){var i=_0x458d5a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x458d5a=!1,i}),_0x4c33f8=_0x28edab(void 0,(function(){return _0x4c33f8.toString().search("(((.+)+)+)+$").toString().constructor(_0x4c33f8).search("(((.+)+)+)+$")})),_0x458d5a;_0x4c33f8();var _0x1392b6=function(){this.ids=[],this.positions=[],this.indexed=!1};function _0x394511(e,t,i,n){if(!(i>=n)){for(var r=e[i+n>>1],o=i-1,a=n+1;;){do{o++}while(e[o]<r);do{a--}while(e[a]>r);if(o>=a)break;_0x407fd9(e,o,a),_0x407fd9(t,3*o,3*a),_0x407fd9(t,3*o+1,3*a+1),_0x407fd9(t,3*o+2,3*a+2)}_0x394511(e,t,i,a),_0x394511(e,t,a+1,n)}}function _0x407fd9(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}_0x1392b6.prototype.add=function(e,t,i,n){this.ids.push(e),this.positions.push(t,i,n)},_0x1392b6.prototype.getPositions=function(e){for(var t=0,i=this.ids.length-1;t<i;){var n=t+i>>1;this.ids[n]>=e?i=n:t=n+1}for(var r=[];this.ids[t]===e;){var o=this.positions[3*t],a=this.positions[3*t+1],s=this.positions[3*t+2];r.push({index:o,start:a,end:s}),t++}return r},_0x1392b6.serialize=function(e,t){var i=new Float64Array(e.ids),n=new Uint32Array(e.positions);return _0x394511(i,n,0,i.length-1),t&&t.push(i.buffer,n.buffer),{ids:i,positions:n}},_0x1392b6.deserialize=function(e){var t=new _0x1392b6;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t},_0x40d7a6.register("FeaturePositionMap",_0x1392b6);var _0x3928d9=(_0x2866c0=!0,function(e,t){var i=_0x2866c0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2866c0=!1,i}),_0x5ebe67=_0x3928d9(void 0,(function(){return _0x5ebe67.toString().search("(((.+)+)+)+$").toString().constructor(_0x5ebe67).search("(((.+)+)+)+$")})),_0x2866c0;function _0x5f44c4(e,t,i){return Math.min(i,Math.max(t,e))}function _0x55dff6(e,t){return 256*(e=_0x5f44c4(Math.floor(e),0,255))+(t=_0x5f44c4(Math.floor(t),0,255))}function _0x907b25(e){return[_0x55dff6(255*e.r,255*e.g),_0x55dff6(255*e.b,255*e.a)]}_0x5ebe67();var _0x552c30=function(e,t,i){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=i,this.maxValue=-1/0};_0x552c30.prototype.defines=function(){return this.names.map((function(e){return"HAS_UNIFORM_u_"+e}))},_0x552c30.prototype.setConstantPatternPositions=function(){},_0x552c30.prototype.populatePaintArray=function(){},_0x552c30.prototype.updatePaintArray=function(){},_0x552c30.prototype.upload=function(){},_0x552c30.prototype.destroy=function(){},_0x552c30.prototype.setUniforms=function(e,t,i,n){t.set(n.constantOr(this.value))},_0x552c30.prototype.getBinding=function(e,t){return"color"===this.type?new _0x2724d0.UniformColor(e,t):new _0x2724d0.Uniform1f(e,t)},_0x552c30.prototype.setUniformMap=function(e,t,i,n){var r=this;e[t]=function(){var e=n.get(i).constantOr(r.value);return"color"===r.type&&(e.red=e.r,e.green=e.g,e.blue=e.b,e.alpha=e.a),e}},_0x552c30.serialize=function(e){var t=e.value,i=e.names,n=e.type;return{value:_0x40d7a6.serialize(t),names:i,type:n}},_0x552c30.deserialize=function(e){var t=e.value,i=e.names,n=e.type;return new _0x552c30(_0x40d7a6.deserialize(t),i,n)};var _0x180792=function(e,t,i){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=i,this.maxValue=-1/0,this.patternPositions={patternTo:null,patternFrom:null}};_0x180792.prototype.defines=function(){return this.names.map((function(e){return"HAS_UNIFORM_u_"+e}))},_0x180792.prototype.populatePaintArray=function(){},_0x180792.prototype.updatePaintArray=function(){},_0x180792.prototype.upload=function(){},_0x180792.prototype.destroy=function(){},_0x180792.prototype.setConstantPatternPositions=function(e,t){this.patternPositions.patternTo=e.tlbr,this.patternPositions.patternFrom=t.tlbr},_0x180792.prototype.setUniforms=function(e,t,i,n,r){var o=this.patternPositions;"u_pattern_to"===r&&o.patternTo&&t.set(a$10(o.patternTo[0],o.patternTo[1],o.patternTo[2],o.patternTo[3])),"u_pattern_from"===r&&o.patternFrom&&t.set(a$10(o.patternFrom[0],o.patternFrom[1],o.patternFrom[2],o.patternFrom[3]))},_0x180792.prototype.getBinding=function(e,t){return new _0x2724d0.Uniform4f(e,t)},_0x180792.prototype.setUniformMap=function(e,t,i,n){var r=this.patternPositions;e[t]=function(){return"u_pattern_to"===t&&r.patternTo?new a$10(r.patternTo[0],r.patternTo[1],r.patternTo[2],r.patternTo[3]):"u_pattern_from"===t&&r.patternFrom?new a$10(r.patternFrom[0],r.patternFrom[1],r.patternFrom[2],r.patternFrom[3]):void console.log("CrossFadedConstantBinder is not support")}};var _0x108d96=function(e,t,i,n){this.expression=e,this.names=t,this.type=i,this.uniformNames=this.names.map((function(e){return"a_"+e})),this.maxValue=-1/0,this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:"color"===i?2:1,offset:0}})),this.paintVertexArray=new n};_0x108d96.prototype.defines=function(){return[]},_0x108d96.prototype.setConstantPatternPositions=function(){},_0x108d96.prototype.populatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=r.length;r.reserve(e);var a=this.expression.evaluate(new _0x460d5e(0),t,{},[],n);if("color"===this.type)for(var s=_0x907b25(a),l=o;l<e;l++)r.emplaceBack(s[0],s[1]);else{for(var u=o;u<e;u++)r.emplaceBack(a);this.maxValue=Math.max(this.maxValue,a)}},_0x108d96.prototype.updatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=this.expression.evaluate({zoom:0},i,n);if("color"===this.type)for(var a=_0x907b25(o),s=e;s<t;s++)r.emplace(s,a[0],a[1]);else{for(var l=e;l<t;l++)r.emplace(l,o);this.maxValue=Math.max(this.maxValue,o)}},_0x108d96.prototype.upload=function(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=_0xbea57e.toVertexBuffer(e,this.paintVertexArray,this.paintVertexAttributes))},_0x108d96.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},_0x108d96.prototype.setUniforms=function(e,t){t.set(0)},_0x108d96.prototype.getBinding=function(e,t){return new _0x2724d0.Uniform1f(e,t)},_0x108d96.prototype.setUniformMap=function(e,t,i,n){e[t]=function(){return 0}};var _0x12c493=function(e,t,i,n,r,o){this.expression=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e+"_t"})),this.type=i,this.useIntegerZoom=n,this.zoom=r,this.maxValue=-1/0;var a=o;this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:"color"===i?4:2,offset:0}})),this.paintVertexArray=new a};_0x12c493.prototype.defines=function(){return[]},_0x12c493.prototype.setConstantPatternPositions=function(){},_0x12c493.prototype.populatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=r.length;r.reserve(e);var a=this.expression.evaluate(new _0x460d5e(this.zoom),t,{},[],n),s=this.expression.evaluate(new _0x460d5e(this.zoom+1),t,{},[],n);if("color"===this.type)for(var l=_0x907b25(a),u=_0x907b25(s),c=o;c<e;c++)r.emplaceBack(l[0],l[1],u[0],u[1]);else{for(var h=o;h<e;h++)r.emplaceBack(a,s);this.maxValue=Math.max(this.maxValue,a,s)}},_0x12c493.prototype.updatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=this.expression.evaluate({zoom:this.zoom},i,n),a=this.expression.evaluate({zoom:this.zoom+1},i,n);if("color"===this.type)for(var s=_0x907b25(o),l=_0x907b25(a),u=e;u<t;u++)r.emplace(u,s[0],s[1],l[0],l[1]);else{for(var c=e;c<t;c++)r.emplace(c,o,a);this.maxValue=Math.max(this.maxValue,o,a)}},_0x12c493.prototype.upload=function(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=_0xbea57e.toVertexBuffer(e,this.paintVertexArray,this.paintVertexAttributes))},_0x12c493.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},_0x12c493.prototype.interpolationFactor=function(e){return this.useIntegerZoom&&(e=Math.floor(e)),_0x5f44c4(this.expression.interpolationFactor(e,this.zoom,this.zoom+1),0,1)},_0x12c493.prototype.setUniforms=function(e,t,i){t.set(this.interpolationFactor(i.zoom))},_0x12c493.prototype.getBinding=function(e,t){return new _0x2724d0.Uniform1f(e,t)},_0x12c493.prototype.setUniformMap=function(e,t,i,n){var r=this;e[t]=function(){return r.interpolationFactor(0)}};var _0x18c366=function(e,t,i,n,r,o,a){this.expression=e,this.names=t,this.type=i,this.uniformNames=this.names.map((function(e){return"u_"+e+"_t"})),this.useIntegerZoom=n,this.zoom=r,this.maxValue=-1/0,this.layerId=a,this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:4,offset:0}})),this.zoomInPaintVertexArray=new o,this.zoomOutPaintVertexArray=new o};_0x18c366.prototype.defines=function(){return[]},_0x18c366.prototype.setConstantPatternPositions=function(){},_0x18c366.prototype.populatePaintArray=function(e,t,i){var n=this.zoomInPaintVertexArray,r=this.zoomOutPaintVertexArray,o=this.layerId,a=n.length;if(n.reserve(e),r.reserve(e),i&&t.patterns&&t.patterns[o]){var s=t.patterns[o],l=s.min,u=s.mid,c=s.max,h=i[l],d=i[u],f=i[c];if(!h||!d||!f)return;for(var p=a;p<e;p++)n.emplaceBack(d.tl[0],d.tl[1],d.br[0],d.br[1],h.tl[0],h.tl[1],h.br[0],h.br[1]),r.emplaceBack(d.tl[0],d.tl[1],d.br[0],d.br[1],f.tl[0],f.tl[1],f.br[0],f.br[1])}},_0x18c366.prototype.updatePaintArray=function(e,t,i,n,r){var o=this.zoomInPaintVertexArray,a=this.zoomOutPaintVertexArray,s=this.layerId;if(r&&i.patterns&&i.patterns[s]){var l=i.patterns[s],u=l.min,c=l.mid,h=l.max,d=r[u],f=r[c],p=r[h];if(!d||!f||!p)return;for(var _=e;_<t;_++)o.emplace(_,f.tl[0],f.tl[1],f.br[0],f.br[1],d.tl[0],d.tl[1],d.br[0],d.br[1]),a.emplace(_,f.tl[0],f.tl[1],f.br[0],f.br[1],p.tl[0],p.tl[1],p.br[0],p.br[1])}},_0x18c366.prototype.upload=function(e){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=_0xbea57e.toVertexBuffer(e,this.zoomInPaintVertexArray,this.paintVertexAttributes),this.zoomOutPaintVertexBuffer=_0xbea57e.toVertexBuffer(e,this.zoomOutPaintVertexArray,this.paintVertexAttributes))},_0x18c366.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()},_0x18c366.prototype.setUniforms=function(e,t){t.set(0)},_0x18c366.prototype.getBinding=function(e,t){return new Uniform1f(e,t)},_0x18c366.prototype.setUniformMap=function(e,t,i,n){e[t]=function(){return 0}};class _0xd562f6{constructor(){this.binders={},this.cacheKey="",this._buffers=[]}static createDynamic(e,t,i){const n=new _0xd562f6,r=[];for(const o in e.paint._values){if(!i(o))continue;const a=e.paint.get(o);if(!(a instanceof _0x145c43&&supportsPropertyExpression(a.property.specification)))continue;const s=_0x55f0ca(o,e.type),l=a.property.specification.type,u=a.property.useIntegerZoom;if("cross-faded"===a.property.specification["property-type"]||"cross-faded-data-driven"===a.property.specification["property-type"])if("constant"===a.value.kind)n.binders[o]=new _0x180792(a.value.value,s,l),r.push("/u_"+o);else{const i=_0x3ebe11(o,l,"source");n.binders[o]=new _0x18c366(a.value,s,l,u,t,i,e.id),r.push("/a_"+o)}else if("constant"===a.value.kind)n.binders[o]=new _0x552c30(a.value.value,s,l),r.push("/u_"+o);else if("source"===a.value.kind){const e=_0x3ebe11(o,l,"source");n.binders[o]=new _0x108d96(a.value,s,l,e),r.push("/a_"+o)}else{const e=_0x3ebe11(o,l,"composite");n.binders[o]=new _0x12c493(a.value,s,l,u,t,e),r.push("/z_"+o)}}return n.cacheKey=r.sort().join(""),n}populatePaintArrays(e,t,i,n,r){for(const i in this.binders){this.binders[i].populatePaintArray(e,t,n,r)}}setConstantPatternPositions(e,t){for(const i in this.binders){this.binders[i].setConstantPatternPositions(e,t)}}updatePaintArrays(e,t,i,n,r){let o=!1;for(const a in e){const s=t.getPositions(+a);for(const t of s){const s=i.feature(t.index);for(const i in this.binders){const l=this.binders[i];if(!(l instanceof _0x552c30||l instanceof _0x180792)&&!0===l.expression.isStateDependent){const u=n.paint.get(i);l.expression=u.value,l.updatePaintArray(t.start,t.end,s,e[a],r),o=!0}}}}return o}defines(){var e=[];for(var t in this.binders)e.push.apply(e,this.binders[t].defines());return e}getPaintVertexBuffers(){return this._buffers}getUniforms(e,t){const i=[];for(const n in this.binders){const r=this.binders[n];for(const o of r.uniformNames)if(t[o]){const a=r.getBinding(e,t[o]);i.push({name:o,property:n,binding:a})}}return i}setUniforms(e,t,i,n){for(const{name:r,property:o,binding:a}of t)this.binders[o].setUniforms(e,a,n,i.get(o),r)}updatePatternPaintBuffers(e){const t=[];for(const i in this.binders){const n=this.binders[i];if(n instanceof _0x18c366){const i=2===e.fromScale?n.zoomInPaintVertexBuffer:n.zoomOutPaintVertexBuffer;i&&t.push(i)}else(n instanceof _0x108d96||n instanceof _0x12c493)&&n.paintVertexBuffer&&t.push(n.paintVertexBuffer)}this._buffers=t}upload(e){for(const t in this.binders)this.binders[t].upload(e);const t=[];for(const e in this.binders){const i=this.binders[e];(i instanceof _0x108d96||i instanceof _0x12c493)&&i.paintVertexBuffer&&t.push(i.paintVertexBuffer)}this._buffers=t}getAttributeLocation(){for(var e=0,t={},i=0;i<this.layoutAttributes.length;i++){t[this.layoutAttributes[i].name]=i,e++}for(var n=this.getPaintVertexBuffers(),r=0;n&&r<n.length;r++)for(var o=n[r],a=0;a<o.attributes.length;a++){t[o.attributes[a].name]=e++}return t}getUniformMaps(e,t,i){for(var n in this.binders)for(var r=this.binders[n],o=0,a=r.uniformNames;o<a.length;o+=1){var s=a[o];e[s]&&r.setUniformMap(i,s,n,t)}for(var l in e)!i[l]&&l.indexOf("_t")>-1&&(i[l]=function(){return 0});return i}destroy(){for(const e in this.binders)this.binders[e].destroy()}}class ProgramConfigurationSet{constructor(e,t,i,n){void 0===n&&(n=function(){return!0}),this.programConfigurations={};for(const r of t)this.programConfigurations[r.id]=_0xd562f6.createDynamic(r,i,n),this.programConfigurations[r.id].layoutAttributes=e;this.needsUpload=!1,this._featureMap=new _0x1392b6,this._bufferOffset=0}populatePaintArrays(e,t,i,n,r){for(const o in this.programConfigurations)this.programConfigurations[o].populatePaintArrays(e,t,i,n,r);void 0!==t.id&&this._featureMap.add(+t.id,i,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,i,n){for(const r of i)this.needsUpload=this.programConfigurations[r.id].updatePaintArrays(e,this._featureMap,t,r,n)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(const t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(const e in this.programConfigurations)this.programConfigurations[e].destroy()}}function _0x55f0ca(e,t){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"text-show-background":["show-background"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from"],"fill-pattern":["pattern_to","pattern_from"],"fill-extrusion-pattern":["pattern_to","pattern_from"]}[e]||[e.replace(t+"-","").replace(/-/g,"_")]}function _0x193c10(e){return{"line-pattern":{source:_0x53365f,composite:_0x53365f},"fill-pattern":{source:_0x53365f,composite:_0x53365f},"fill-extrusion-pattern":{source:_0x53365f,composite:_0x53365f}}[e]}function _0x3ebe11(e,t,i){var n={color:{source:_0x4d01f7,composite:_0x159489},number:{source:_0x5f0bf6,composite:_0x4d01f7}},r=_0x193c10(e);return r&&r[i]||n[t][i]}_0x40d7a6.register("ConstantBinder",_0x552c30),_0x40d7a6.register("CrossFadedConstantBinder",_0x180792),_0x40d7a6.register("SourceExpressionBinder",_0x108d96),_0x40d7a6.register("CrossFadedCompositeBinder",_0x18c366),_0x40d7a6.register("CompositeExpressionBinder",_0x12c493),_0x40d7a6.register("ProgramConfiguration",_0xd562f6,{omit:["_buffers"]}),_0x40d7a6.register("ProgramConfigurationSet",ProgramConfigurationSet);var _0x13ca9b=(_0x536c00=!0,function(e,t){var i=_0x536c00?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x536c00=!1,i}),_0x2c2671=_0x13ca9b(void 0,(function(){return _0x2c2671.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c2671).search("(((.+)+)+)+$")})),_0x536c00;_0x2c2671();var _0x2fc31d=(_0x574217=!0,function(e,t){var i=_0x574217?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x574217=!1,i}),_0x1f57f3=_0x2fc31d(void 0,(function(){return _0x1f57f3.toString().search("(((.+)+)+)+$").toString().constructor(_0x1f57f3).search("(((.+)+)+)+$")})),_0x574217;function _0x41469e(e){var t={},i={},n=[],r=0;function o(t){n.push(e[t]),r++}function a(e,t,r){var o=i[e];return delete i[e],i[t]=o,n[o].geometry[0].pop(),n[o].geometry[0]=n[o].geometry[0].concat(r[0]),o}function s(e,i,r){var o=t[i];return delete t[i],t[e]=o,n[o].geometry[0].shift(),n[o].geometry[0]=r[0].concat(n[o].geometry[0]),o}function l(e,t,i){var n=i?t[0][t[0].length-1]:t[0][0];return e+":"+n.x+":"+n.y}for(var u=0;u<e.length;u++){var c=e[u],h=c.geometry,d=c.text?c.text.toString():null;if(d){var f=l(d,h),p=l(d,h,!0);if(f in i&&p in t&&i[f]!==t[p]){var _=s(f,p,h),m=a(f,p,n[_].geometry);delete t[f],delete i[p],i[l(d,n[m].geometry,!0)]=m,n[_].geometry=null}else f in i?a(f,p,h):p in t?s(f,p,h):(o(u),t[f]=r-1,i[p]=r-1)}else o(u)}return n.filter((function(e){return e.geometry}))}_0x1f57f3();var _0x4325c3=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i,n,r){e.call(this,t,i),this.angle=n,void 0!==r&&(this.segment=r)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.clone=function(){return new r(this.x,this.y,this.angle,this.segment)},r}(_0x279c0d);_0x40d7a6.register("Anchor",_0x4325c3);var _0x42db96=(_0x5ba715=!0,function(e,t){var i=_0x5ba715?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ba715=!1,i}),_0xec92e3=_0x42db96(void 0,(function(){return _0xec92e3.toString().search("(((.+)+)+)+$").toString().constructor(_0xec92e3).search("(((.+)+)+)+$")})),_0x5ba715;_0xec92e3();var _0x276815=(_0x14e4b5=!0,function(e,t){var i=_0x14e4b5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x14e4b5=!1,i}),_0x5bbb66=_0x276815(void 0,(function(){return _0x5bbb66.toString().search("(((.+)+)+)+$").toString().constructor(_0x5bbb66).search("(((.+)+)+)+$")})),_0x14e4b5;_0x5bbb66();var _0x45974a=(_0x35c4c5=!0,function(e,t){var i=_0x35c4c5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x35c4c5=!1,i}),_0x22ad89=_0x45974a(void 0,(function(){return _0x22ad89.toString().search("(((.+)+)+)+$").toString().constructor(_0x22ad89).search("(((.+)+)+)+$")})),_0x35c4c5;_0x22ad89();var _0x5b6917=(_0x4676fe=!0,function(e,t){var i=_0x4676fe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4676fe=!1,i}),_0x2e2194=_0x5b6917(void 0,(function(){return _0x2e2194.toString().search("(((.+)+)+)+$").toString().constructor(_0x2e2194).search("(((.+)+)+)+$")})),_0x4676fe;_0x2e2194();var _0x137f3b=(_0x39ce81=!0,function(e,t){var i=_0x39ce81?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x39ce81=!1,i}),_0x51b4e8=_0x137f3b(void 0,(function(){return _0x51b4e8.toString().search("(((.+)+)+)+$").toString().constructor(_0x51b4e8).search("(((.+)+)+)+$")})),_0x39ce81;_0x51b4e8();var _0x244695=(_0x457d5c=!0,function(e,t){var i=_0x457d5c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x457d5c=!1,i}),_0x200f43=_0x244695(void 0,(function(){return _0x200f43.toString().search("(((.+)+)+)+$").toString().constructor(_0x200f43).search("(((.+)+)+)+$")})),_0x457d5c;function _0xb019d8(){}function _0x38518d(e,t,i){if(e.length>1){if(_0xec138f(e,t))return!0;for(var n=0;n<t.length;n++)if(_0x1f12f1(t[n],e,i))return!0}for(var r=0;r<e.length;r++)if(_0x1f12f1(e[r],t,i))return!0;return!1}function _0xec138f(e,t){if(0===e.length||0===t.length)return!1;for(var i=0;i<e.length-1;i++)for(var n=e[i],r=e[i+1],o=0;o<t.length-1;o++){if(_0x21b746(n,r,t[o],t[o+1]))return!0}return!1}function _0x21b746(e,t,i,n){return isCounterClockwise(e,i,n)!==isCounterClockwise(t,i,n)&&isCounterClockwise(e,t,i)!==isCounterClockwise(e,t,n)}function _0x1f12f1(e,t,i){var n=i*i;if(1===t.length)return e.distSqr(t[0])<n;for(var r=1;r<t.length;r++){var o=t[r-1],a=t[r];if(_0xb019d8.distToSegmentSquared(e,o,a)<n)return!0}return!1}function _0x59a61a(e,t){for(var i,n,r,o=!1,a=0;a<e.length;a++)for(var s=0,l=(i=e[a]).length-1;s<i.length;l=s++)n=i[s],r=i[l],n.y>t.y!=r.y>t.y&&t.x<(r.x-n.x)*(t.y-n.y)/(r.y-n.y)+n.x&&(o=!o);return o}function _0x337c32(e,t){for(var i=!1,n=0,r=e.length-1;n<e.length;r=n++){var o=e[n],a=e[r];o.y>t.y!=a.y>t.y&&t.x<(a.x-o.x)*(t.y-o.y)/(a.y-o.y)+o.x&&(i=!i)}return i}_0x200f43(),_0xb019d8.polygonIntersectsPolygon=function(e,t){for(var i=0;i<e.length;i++)if(_0x337c32(t,e[i]))return!0;for(var n=0;n<t.length;n++)if(_0x337c32(e,t[n]))return!0;return!!_0xec138f(e,t)},_0xb019d8.polygonIntersectsBufferedPoint=function(e,t,i){return!!_0x337c32(e,t)||!!_0x1f12f1(t,e,i)},_0xb019d8.polygonIntersectsMultiPolygon=function(e,t){if(1===e.length)return _0x59a61a(t,e[0]);for(var i=0;i<t.length;i++)for(var n=t[i],r=0;r<n.length;r++)if(_0x337c32(e,n[r]))return!0;for(var o=0;o<e.length;o++)if(_0x59a61a(t,e[o]))return!0;for(var a=0;a<t.length;a++)if(_0xec138f(e,t[a]))return!0;return!1},_0xb019d8.polygonIntersectsBufferedMultiLine=function(e,t,i){for(var n=0;n<t.length;n++){var r=t[n];if(e.length>=3)for(var o=0;o<r.length;o++)if(_0x337c32(e,r[o]))return!0;if(_0x38518d(e,r,i))return!0}return!1},_0xb019d8.distToSegmentSquared=function(e,t,i){var n=t.distSqr(i);if(0===n)return e.distSqr(t);var r=((e.x-t.x)*(i.x-t.x)+(e.y-t.y)*(i.y-t.y))/n;return r<0?e.distSqr(t):r>1?e.distSqr(i):e.distSqr(i.sub(t)._mult(r)._add(t))};var _0x4e51cd=(_0x5ef5a0=!0,function(e,t){var i=_0x5ef5a0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ef5a0=!1,i}),_0x5d0f57=_0x4e51cd(void 0,(function(){return _0x5d0f57.toString().search("(((.+)+)+)+$").toString().constructor(_0x5d0f57).search("(((.+)+)+)+$")})),_0x5ef5a0;function b$1g(e,t,i,n,r){p$19(e,t,i||0,n||e.length-1,r||i$11)}function p$19(e,t,i,n,r){for(;n>i;){if(n-i>600){var o=n-i+1,a=t-i+1,s=Math.log(o),l=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);p$19(e,t,Math.max(i,Math.floor(t-a*l/o+u)),Math.min(n,Math.floor(t+(o-a)*l/o+u)),r)}var c=e[t],h=i,d=n;for(x$14(e,i,t),r(e[n],c)>0&&x$14(e,i,n);h<d;){for(x$14(e,h,d),h++,d--;r(e[h],c)<0;)h++;for(;r(e[d],c)>0;)d--}0===r(e[i],c)?x$14(e,i,d):x$14(e,++d,n),d<=t&&(i=d+1),t<=d&&(n=d-1)}}function x$14(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function i$11(e,t){return e<t?-1:e>t?1:0}_0x5d0f57();var _0x59c4c9=(_0x105c92=!0,function(e,t){var i=_0x105c92?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x105c92=!1,i}),_0x4376a4=_0x59c4c9(void 0,(function(){return _0x4376a4.toString().search("(((.+)+)+)+$").toString().constructor(_0x4376a4).search("(((.+)+)+)+$")})),_0x105c92;function _0x550949(e){for(var t=0,i=0,n=e.length,r=n-1,o=void 0,a=void 0;i<n;r=i++)o=e[i],t+=((a=e[r]).x-o.x)*(o.y+a.y);return t}function _0x5e01fe(e,t){var i=e.length;if(i<=1)return[e];for(var n,r,o=[],a=0;a<i;a++){var s=_0x550949(e[a]);0!==s&&(e[a].area=Math.abs(s),void 0===r&&(r=s<0),r===s<0?(n&&o.push(n),n=[e[a]]):n.push(e[a]))}if(n&&o.push(n),t>1)for(var l=0;l<o.length;l++)o[l].length<=t||(b$1g(o[l],t,1,o[l].length-1,_0x23df7d),o[l]=o[l].slice(0,t));return o}function _0x23df7d(e,t){return t.area-e.area}_0x4376a4();var _0x31588c=(_0x28a0e9=!0,function(e,t){var i=_0x28a0e9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x28a0e9=!1,i}),_0x5c5295=_0x31588c(void 0,(function(){return _0x5c5295.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c5295).search("(((.+)+)+)+$")})),_0x28a0e9;_0x5c5295();const _0x3544a4=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5015ec=_0x3544a4(void 0,(function(){return _0x5015ec.toString().search("(((.+)+)+)+$").toString().constructor(_0x5015ec).search("(((.+)+)+)+$")}));_0x5015ec();const _0x4620da=255,_0x1359de=_0x4620da*_0xb8c801;var _0x498ba2=(_0x4e0533=!0,function(e,t){var i=_0x4e0533?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e0533=!1,i}),_0x42e264=_0x498ba2(void 0,(function(){return _0x42e264.toString().search("(((.+)+)+)+$").toString().constructor(_0x42e264).search("(((.+)+)+)+$")})),_0x4e0533;function _0x147d0b(e,t,i){var n=t.layout.get("text-transform").evaluate(i,{});return"uppercase"===n?e=e.toLocaleUpperCase():"lowercase"===n&&(e=e.toLocaleLowerCase()),e}function _0x302e47(e,t,i){return e.sections.forEach((function(e){e.text=_0x147d0b(e.text,t,i)})),e}_0x42e264();var _0x2de8dc=(_0x4a822f=!0,function(e,t){var i=_0x4a822f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4a822f=!1,i}),_0xe54d1a=_0x2de8dc(void 0,(function(){return _0xe54d1a.toString().search("(((.+)+)+)+$").toString().constructor(_0xe54d1a).search("(((.+)+)+)+$")})),_0x4a822f;_0xe54d1a();var _0x5f96b6=function(e){this.specification=e};_0x5f96b6.prototype.possiblyEvaluate=function(e,t){return e.expression.evaluate(t)},_0x5f96b6.prototype.interpolate=function(e,t,i){var n=interpolate[this.specification.type];return n?n(e,t,i):e},_0x40d7a6.register("DataConstantProperty",_0x5f96b6);var _0x45cadc=(_0x220b89=!0,function(e,t){var i=_0x220b89?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x220b89=!1,i}),_0x3233d5=_0x45cadc(void 0,(function(){return _0x3233d5.toString().search("(((.+)+)+)+$").toString().constructor(_0x3233d5).search("(((.+)+)+)+$")})),_0x220b89;_0x3233d5();var _0x326e57=function(e,t){this.specification=e,this.overrides=t};_0x326e57.prototype.possiblyEvaluate=function(e,t,i){return"constant"===e.expression.kind||"camera"===e.expression.kind?new _0x145c43(this,{kind:"constant",value:e.expression.evaluate(t,null,{},i)},t):new _0x145c43(this,e.expression,t)},_0x326e57.prototype.interpolate=function(e,t,i){if("constant"!==e.value.kind||"constant"!==t.value.kind)return e;if(void 0===e.value.value||void 0===t.value.value)return new _0x145c43(this,{kind:"constant",value:void 0},e.parameters);var n=interpolate[this.specification.type];return n?new _0x145c43(this,{kind:"constant",value:n(e.value.value,t.value.value,i)},e.parameters):e},_0x326e57.prototype.evaluate=function(e,t,i,n,r){return"constant"===e.kind?e.value:e.evaluate(t,i,n,r)},_0x40d7a6.register("DataDrivenProperty",_0x326e57);var _0x5734c6=(_0x373b0e=!0,function(e,t){var i=_0x373b0e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x373b0e=!1,i}),_0xa439b6=_0x5734c6(void 0,(function(){return _0xa439b6.toString().search("(((.+)+)+)+$").toString().constructor(_0xa439b6).search("(((.+)+)+)+$")})),_0x373b0e;_0xa439b6();var _0x4a540a=function(e,t){void 0===t&&(t=[]),this.parent=e,this.bindings={};for(var i=0,n=t;i<n.length;i+=1){var r=n[i],o=r[0],a=r[1];this.bindings[o]=a}};_0x4a540a.prototype.concat=function(e){return new _0x4a540a(this,e)},_0x4a540a.prototype.get=function(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(e+" not found in scope.")},_0x4a540a.prototype.has=function(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)};var _0x494db3=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i){e.call(this,i),this.message=i,this.key=t}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r}(Error),_0x512674=(_0x14b6b9=!0,function(e,t){var i=_0x14b6b9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x14b6b9=!1,i}),_0x2b8959=_0x512674(void 0,(function(){return _0x2b8959.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b8959).search("(((.+)+)+)+$")})),_0x14b6b9;_0x2b8959();var _0x7dd1f4=["Unknown","Point","LineString","Polygon"],_0x3da6b2=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null};_0x3da6b2.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},_0x3da6b2.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?_0x7dd1f4[this.feature.type]:this.feature.type:null},_0x3da6b2.prototype.properties=function(){return this.feature&&this.feature.properties||{}},_0x3da6b2.prototype.parseColor=function(e){var t=this._parseColorCache[e];return!t&&(t=this._parseColorCache[e]=_0x5b501e.parse(e)),t},_0x40d7a6.register("EvaluationContext",_0x3da6b2);var _0x123eda=(_0x4c70b8=!0,function(e,t){var i=_0x4c70b8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4c70b8=!1,i}),_0x24db9d=_0x123eda(void 0,(function(){return _0x24db9d.toString().search("(((.+)+)+)+$").toString().constructor(_0x24db9d).search("(((.+)+)+)+$")})),_0x4c70b8;function _0x2e716c(){}_0x24db9d(),_0x2e716c.isFeatureConstant=function(e){if(e instanceof _0x9f84.CompoundExpression){if("get"===e.name&&1===e.args.length)return!1;if("feature-state"===e.name)return!1;if("has"===e.name&&1===e.args.length)return!1;if("properties"===e.name||"geometry-type"===e.name||"id"===e.name)return!1;if(/^filter-/.test(e.name))return!1}var t=!0;return e.eachChild((function(e){t&&!_0x2e716c.isFeatureConstant(e)&&(t=!1)})),t},_0x2e716c.isStateConstant=function(e){if(e instanceof _0x9f84.CompoundExpression&&"feature-state"===e.name)return!1;var t=!0;return e.eachChild((function(e){t&&!_0x2e716c.isStateConstant(e)&&(t=!1)})),t},_0x2e716c.isGlobalPropertyConstant=function(e,t){if(e instanceof _0x9f84.CompoundExpression&&t.indexOf(e.name)>=0)return!1;var i=!0;return e.eachChild((function(e){i&&!_0x2e716c.isGlobalPropertyConstant(e,t)&&(i=!1)})),i};var _0x1cc059=(_0x142776=!0,function(e,t){var i=_0x142776?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x142776=!1,i}),_0x3872c4=_0x1cc059(void 0,(function(){return _0x3872c4.toString().search("(((.+)+)+)+$").toString().constructor(_0x3872c4).search("(((.+)+)+)+$")})),_0x142776;_0x3872c4();var _0x9f84=function(e,t,i,n,r){void 0===t&&(t=[]),void 0===n&&(n=new _0x4a540a),void 0===r&&(r=[]),this.registry=e,this.path=t,this.key=t.map((function(e){return"["+e+"]"})).join(""),this.scope=n,this.errors=r,this.expectedType=i};function _0x5bc355(e,t){const i=t[e];return void 0===i?null:i}_0x9f84.prototype.parse=function(e,t,i,n,r){return void 0===r&&(r={}),t?this.concat(t,i,n)._parse(e,r):this._parse(e,r)},_0x9f84.prototype._parse=function(e,t){function i(e,t,i){return"assert"===i?new _0x23bcd7(t,[e]):"coerce"===i?new _0x55e745(t,[e]):e}if((null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e)&&(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=e[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var r=this.registry[n];if(r){var o=r.parse(e,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=i(o,a,t.typeAnnotation||"coerce");else o=i(o,a,t.typeAnnotation||"assert")}if(!(o instanceof _0x3c4301)&&"resolvedImage"!==o.type.kind&&_0x2e716c()){var l=new _0x3da6b2;try{o=new _0x3c4301(o.type,o.evaluate(l))}catch(e){return this.error(e.message),null}}return o}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===e?this.error("'undefined' value invalid. Use null instead."):"object"==typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof e+" instead.")},_0x9f84.prototype.concat=function(e,t,i){var n="number"==typeof e?this.path.concat(e):this.path,r=i?this.scope.concat(i):this.scope;return new _0x9f84(this.registry,n,t||null,r,this.errors)},_0x9f84.prototype.error=function(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];var n=""+this.key+t.map((function(e){return"["+e+"]"})).join("");this.errors.push(new _0x494db3(n,e))},_0x9f84.prototype.checkSubtype=function(e,t){var i=_0x597dda(e,t);return i&&this.error(i),i};var _0x3f910a=function(e,t,i,n){this.name=e,this.type=t,this._evaluate=i,this.args=n};function _0x12c95d(e){return Array.isArray(e)?"("+e.map(toString).join(", ")+")":"("+toString(e.type)+"...)"}_0x3f910a.prototype.evaluate=function(e,t){return this._evaluate(e,this.args,t)},_0x3f910a.prototype.eachChild=function(e){this.args.forEach(e)},_0x3f910a.prototype.possibleOutputs=function(){return[void 0]},_0x3f910a.prototype.serialize=function(){return[this.name].concat(this.args.map((function(e){return e.serialize()})))},_0x3f910a.parse=function(e,t){var i,n=e[0],r=_0x3f910a.definitions[n];if(!r)return t.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(r)?r[0]:r.type,a=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,s=a.filter((function(t){var i=t[0];return!Array.isArray(i)||i.length===e.length-1})),l=null,u=0,c=s;u<c.length;u+=1){var h=c[u],d=h[0],f=h[1];l=new _0x9f84(t.registry,t.path,null,t.scope);for(var p=[],_=!1,m=1;m<e.length;m++){var $=e[m],g=Array.isArray(d)?d[m-1]:d.type,y=l.parse($,1+p.length,g);if(!y){_=!0;break}p.push(y)}if(!_)if(Array.isArray(d)&&d.length!==p.length)l.error("Expected "+d.length+" arguments, but found "+p.length+" instead.");else{for(var v=0;v<p.length;v++){var x=Array.isArray(d)?d[v]:d.type,b=p[v];l.concat(v+1).checkSubtype(x,b.type)}if(0===l.errors.length)return new _0x3f910a(n,o,f,p)}}if(1===s.length)(i=t.errors).push.apply(i,l.errors);else{for(var S=(s.length?s:a).map((function(e){return _0x12c95d(e[0])})).join(" | "),w=[],C=1;C<e.length;C++){var T=t.parse(e[C],1+w.length);if(!T)return null;w.push(toString(T.type))}t.error("Expected arguments of type "+S+", but found ("+w.join(", ")+") instead.")}return null},_0x3f910a.register=function(e,t){for(var i in _0x3f910a.definitions=t,t)e[i]=_0x3f910a},_0x40d7a6.register("CompoundExpression",_0x3f910a);var _0x3547a9={kind:"number"},_0x3d971c={kind:"string"},_0x5cf390={kind:"boolean"},_0x5a5819={kind:"color"},_0x3db350={kind:"object"},_0x387bd5={kind:"value"},_0x614049={kind:"error"},_0x1d5e43={kind:"collator"};function _0x5ba372(e,t){return{kind:"array",itemType:e,N:t}}function _0x345f22(e){return{type:e}}function _0x143030(e,t){var i=t[0],n=t[1],r=t[2],o=t[3];i=i.evaluate(e),n=n.evaluate(e),r=r.evaluate(e);var a=o?o.evaluate(e):1,s=Values.validateRGBA(i,n,r,a);if(s)throw new RuntimeError(s);return new Color(i/255*a,n/255*a,r/255*a,a)}_0x3f910a.register(_0x477d62,{error:[_0x614049,[_0x3d971c],function(e,t){var i=t[0];throw new RuntimeError(i.evaluate(e))}],typeof:[_0x3d971c,[_0x387bd5],function(e,t){var i=t[0];return toString(Values.typeOf(i.evaluate(e)))}],"to-rgba":[_0x5ba372(_0x3547a9,4),[_0x5a5819],function(e,t){return t[0].evaluate(e).toArray()}],rgb:[_0x5a5819,[_0x3547a9,_0x3547a9,_0x3547a9],_0x143030],rgba:[_0x5a5819,[_0x3547a9,_0x3547a9,_0x3547a9,_0x3547a9],_0x143030],has:{type:_0x5cf390,overloads:[[[_0x3d971c],function(e,t){var i=t[0];return has(i.evaluate(e),e.properties())}],[[_0x3d971c,_0x3db350],function(e,t){var i=t[0],n=t[1];return has(i.evaluate(e),n.evaluate(e))}]]},get:{type:_0x387bd5,overloads:[[[_0x3d971c],function(e,t){return _0x5bc355(t[0].evaluate(e),e.properties())}],[[_0x3d971c,_0x3db350],function(e,t){var i=t[0],n=t[1];return _0x5bc355(i.evaluate(e),n.evaluate(e))}]]},"feature-state":[_0x387bd5,[_0x3d971c],function(e,t){return _0x5bc355(t[0].evaluate(e),e.featureState||{})}],properties:[_0x3db350,[],function(e){return e.properties()}],"geometry-type":[_0x3d971c,[],function(e){return e.geometryType()}],id:[_0x387bd5,[],function(e){return e.id()}],zoom:[_0x3547a9,[],function(e){return e.globals.zoom}],"heatmap-density":[_0x3547a9,[],function(e){return e.globals.heatmapDensity||0}],"line-progress":[_0x3547a9,[],function(e){return e.globals.lineProgress||0}],accumulated:[_0x387bd5,[],function(e){return void 0===e.globals.accumulated?null:e.globals.accumulated}],"+":[_0x3547a9,_0x345f22(_0x3547a9),function(e,t){for(var i=0,n=0,r=t;n<r.length;n+=1){i+=r[n].evaluate(e)}return i}],"*":[_0x3547a9,_0x345f22(_0x3547a9),function(e,t){for(var i=1,n=0,r=t;n<r.length;n+=1){i*=r[n].evaluate(e)}return i}],"-":{type:_0x3547a9,overloads:[[[_0x3547a9,_0x3547a9],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)-n.evaluate(e)}],[[_0x3547a9],function(e,t){return-t[0].evaluate(e)}]]},"/":[_0x3547a9,[_0x3547a9,_0x3547a9],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)/n.evaluate(e)}],"%":[_0x3547a9,[_0x3547a9,_0x3547a9],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)%n.evaluate(e)}],ln2:[_0x3547a9,[],function(){return Math.LN2}],pi:[_0x3547a9,[],function(){return Math.PI}],e:[_0x3547a9,[],function(){return Math.E}],"^":[_0x3547a9,[_0x3547a9,_0x3547a9],function(e,t){var i=t[0],n=t[1];return Math.pow(i.evaluate(e),n.evaluate(e))}],sqrt:[_0x3547a9,[_0x3547a9],function(e,t){var i=t[0];return Math.sqrt(i.evaluate(e))}],log10:[_0x3547a9,[_0x3547a9],function(e,t){var i=t[0];return Math.log(i.evaluate(e))/Math.LN10}],ln:[_0x3547a9,[_0x3547a9],function(e,t){var i=t[0];return Math.log(i.evaluate(e))}],log2:[_0x3547a9,[_0x3547a9],function(e,t){var i=t[0];return Math.log(i.evaluate(e))/Math.LN2}],sin:[_0x3547a9,[_0x3547a9],function(e,t){var i=t[0];return Math.sin(i.evaluate(e))}],cos:[_0x3547a9,[_0x3547a9],function(e,t){var i=t[0];return Math.cos(i.evaluate(e))}],tan:[_0x3547a9,[_0x3547a9],function(e,t){var i=t[0];return Math.tan(i.evaluate(e))}],asin:[_0x3547a9,[_0x3547a9],function(e,t){var i=t[0];return Math.asin(i.evaluate(e))}],acos:[_0x3547a9,[_0x3547a9],function(e,t){var i=t[0];return Math.acos(i.evaluate(e))}],atan:[_0x3547a9,[_0x3547a9],function(e,t){var i=t[0];return Math.atan(i.evaluate(e))}],min:[_0x3547a9,_0x345f22(_0x3547a9),function(e,t){return Math.min.apply(Math,t.map((function(t){return t.evaluate(e)})))}],max:[_0x3547a9,_0x345f22(_0x3547a9),function(e,t){return Math.max.apply(Math,t.map((function(t){return t.evaluate(e)})))}],abs:[_0x3547a9,[_0x3547a9],function(e,t){var i=t[0];return Math.abs(i.evaluate(e))}],round:[_0x3547a9,[_0x3547a9],function(e,t){var i=t[0].evaluate(e);return i<0?-Math.round(-i):Math.round(i)}],floor:[_0x3547a9,[_0x3547a9],function(e,t){var i=t[0];return Math.floor(i.evaluate(e))}],ceil:[_0x3547a9,[_0x3547a9],function(e,t){var i=t[0];return Math.ceil(i.evaluate(e))}],"filter-==":[_0x5cf390,[_0x3d971c,_0x387bd5],function(e,t,i){var n=t[0],r=t[1];if(i){var o,a,s=n.value,l=r.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":o=c+d;break;case"-":o=c-d}return o===(a=r.value)}if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(o="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),$=m[1],g=(d=e.properties()[m[2]],m[3]);a="left"==$?d.substring(0,g):d.substring(d.length-g)}else a=r.value;return o===a}return e.properties()[n.value]===e.properties()[r.value]}return e.properties()[n.value]===r.value}],"filter-id-==":[_0x5cf390,[_0x387bd5],function(e,t){var i=t[0];return e.id()===i.value}],"filter-like":[_0x5cf390,[_0x3d971c,_0x3d971c],function(e,t){var i=t[0].value,n=t[1].value,r=e.properties();return i in r&&(/^%.*[^%]$/.test(n)?(n=n.replace("%",""),r[i].endsWith(n)):/^(?!%).+%$/.test(n)?(n=n.replace("%",""),r[i].startsWith(n)):(n=n.replace(/%/g,""),r[i].indexOf(n)>-1))}],"filter-type-==":[_0x5cf390,[_0x3d971c],function(e,t){var i=t[0];return e.geometryType()===i.value}],"filter-<":[_0x5cf390,[_0x3d971c,_0x387bd5],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),$=m[1],g=(d=e.properties()[m[2]],m[3]);r="left"==$?d.substring(0,g):d.substring(d.length-g)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n<r}],"filter-id-<":[_0x5cf390,[_0x387bd5],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n<r}],"filter->":[_0x5cf390,[_0x3d971c,_0x387bd5],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),$=m[1],g=(d=e.properties()[m[2]],m[3]);r="left"==$?d.substring(0,g):d.substring(d.length-g)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n>r}],"filter-id->":[_0x5cf390,[_0x387bd5],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n>r}],"filter-<=":[_0x5cf390,[_0x3d971c,_0x387bd5],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),$=m[1],g=(d=e.properties()[m[2]],m[3]);r="left"==$?d.substring(0,g):d.substring(d.length-g)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n<=r}],"filter-id-<=":[_0x5cf390,[_0x387bd5],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n<=r}],"filter->=":[_0x5cf390,[_0x3d971c,_0x387bd5],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),$=m[1],g=(d=e.properties()[m[2]],m[3]);r="left"==$?d.substring(0,g):d.substring(d.length-g)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n>=r}],"filter-id->=":[_0x5cf390,[_0x387bd5],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n>=r}],"filter-has":[_0x5cf390,[_0x387bd5],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[_0x5cf390,[],function(e){return null!==e.id()}],"filter-type-in":[_0x5cf390,[_0x5ba372(_0x3d971c)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[_0x5cf390,[_0x5ba372(_0x387bd5)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[_0x5cf390,[_0x3d971c,_0x5ba372(_0x387bd5)],function(e,t){var i=t[0];return t[1].value.indexOf(e.properties()[i.value])>=0}],"filter-in-large":[_0x5cf390,[_0x3d971c,_0x5ba372(_0x387bd5)],function(e,t){var i=t[0],n=t[1];return binarySearch(e.properties()[i.value],n.value,0,n.value.length-1)}],all:{type:_0x5cf390,overloads:[[[_0x5cf390,_0x5cf390],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)&&n.evaluate(e)}],[_0x345f22(_0x5cf390),function(e,t){for(var i=0,n=t;i<n.length;i+=1){if(!n[i].evaluate(e))return!1}return!0}]]},crossFields:{type:_0x5cf390,overloads:[[[_0x5cf390,_0x5cf390],function(e,t){var i=t[0],n=t[1];return i.evaluate(e,!0)&&n.evaluate(e,!0)}],[_0x345f22(_0x5cf390),function(e,t){for(var i=0,n=t;i<n.length;i+=1){if(!n[i].evaluate(e,!0))return!1}return!0}]]},any:{type:_0x5cf390,overloads:[[[_0x5cf390,_0x5cf390],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)||n.evaluate(e)}],[_0x345f22(_0x5cf390),function(e,t){for(var i=0,n=t;i<n.length;i+=1){if(n[i].evaluate(e))return!0}return!1}]]},"!":[_0x5cf390,[_0x5cf390],function(e,t,i){return!t[0].evaluate(e,i)}],"is-supported-script":[_0x5cf390,[_0x3d971c],function(e,t){var i=t[0],n=e.globals&&e.globals.isSupportedScript;return!n||n(i.evaluate(e))}],upcase:[_0x3d971c,[_0x3d971c],function(e,t){return t[0].evaluate(e).toUpperCase()}],downcase:[_0x3d971c,[_0x3d971c],function(e,t){return t[0].evaluate(e).toLowerCase()}],concat:[_0x3d971c,_0x345f22(_0x387bd5),function(e,t){return t.map((function(t){return Values.toString$1(t.evaluate(e))})).join("")}],"resolved-locale":[_0x3d971c,[_0x1d5e43],function(e,t){return t[0].evaluate(e).resolvedLocale()}]}),_0x9f84.CompoundExpression=_0x3f910a;var _0x2a5069=(_0x455554=!0,function(e,t){var i=_0x455554?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x455554=!1,i}),_0x230460=_0x2a5069(void 0,(function(){return _0x230460.toString().search("(((.+)+)+)+$").toString().constructor(_0x230460).search("(((.+)+)+)+$")})),_0x455554;_0x230460();var _0x10293b=function(e,t){this.expression=e,this._warningHistory={},this._evaluator=new _0x3da6b2,this._defaultValue=t?_0x2f5371(t):null,this._enumValues=t&&"enum"===t.type?t.values:null};function _0x49fe98(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function _0x2f5371(e){return"color"===e.type&&_0x49fe98(e.default)?new _0x5b501e(0,0,0,0):"color"===e.type?_0x5b501e.parse(e.default)||null:void 0===e.default?null:e.default}_0x10293b.prototype.evaluateWithoutErrorHandling=function(e,t,i,n,r){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=r,this.expression.evaluate(this._evaluator)},_0x10293b.prototype.evaluate=function(e,t,i,n,r){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=i||null,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=r||null;try{var o=this.expression.evaluate(this._evaluator);if(null==o||"number"==typeof o&&o!=o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new RuntimeError("Expected value to be one of "+Object.keys(this._enumValues).map((function(e){return JSON.stringify(e)})).join(", ")+", but found "+JSON.stringify(o)+" instead.");return o}catch(e){return!this._warningHistory[e.message]&&(this._warningHistory[e.message]=!0,"undefined"!=typeof console&&console.warn(e.message)),this._defaultValue}},_0x40d7a6.register("StyleExpression",_0x10293b);var _0x5f1c6a=(_0x139fe5=!0,function(e,t){var i=_0x139fe5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x139fe5=!1,i}),_0x3094e5=_0x5f1c6a(void 0,(function(){return _0x3094e5.toString().search("(((.+)+)+)+$").toString().constructor(_0x3094e5).search("(((.+)+)+)+$")})),_0x139fe5;function _0x1b90fc(){}function _0x495660(e){return{result:"success",value:e}}function _0x479243(e){return{result:"error",value:e}}_0x3094e5(),_0x1b90fc.isExpression=function(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in _0x477d62};var _0x10f075={kind:"number"},_0x55be98={kind:"string"},_0x905ffa={kind:"boolean"},_0x49115b={kind:"color"},_0x10f8a4={kind:"value"},_0x49fd88={kind:"formatted"},_0x264cb0={kind:"resolvedImage"};function _0x366e59(e,t){return{kind:"array",itemType:e,N:t}}function _0x365ccc(e){var t=null;if(e instanceof _0x76d7d3)t=_0x365ccc(e.result);else if(e instanceof _0x5d9da8$1){for(var i of e.args)if(t=_0x365ccc(i))break}else(e instanceof _0x16ccba||e instanceof _0x1b26db)&&e.input instanceof _0x9f84.CompoundExpression&&"zoom"===e.input.name&&(t=e);return t instanceof _0x494db3||e.eachChild((e=>{var i=_0x365ccc(e);i instanceof _0x494db3?t=i:!t&&i?t=new _0x494db3("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&i&&t!==i&&(t=new _0x494db3("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),t}function _0x226b69(e){var t={color:_0x49115b,string:_0x55be98,number:_0x10f075,enum:_0x55be98,boolean:_0x905ffa,formatted:_0x49fd88,resolvedImage:_0x264cb0};return"array"===e.type?_0x366e59(t[e.value]||_0x10f8a4,e.length):t[e.type]}function _0x55fb1c(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function _0x371728(e){return e}function _0x1001cf(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];for(var n=0,r=t;n<r.length;n+=1){var o=r[n];for(var a in o)e[a]=o[a]}return e}function _0x34e24a(e,t,i){var n=void 0!==e.base?e.base:1;if("number"!==_0x67dca2(i))return _0x226e5(e.default,t.default);var r=e.stops.length;if(1===r)return e.stops[0][1];if(i<=e.stops[0][0])return e.stops[0][1];if(i>=e.stops[r-1][0])return e.stops[r-1][1];var o=_0x4708ba(e.stops.map((e=>e[0])),i),a=_0x1d4fc8(i,n,e.stops[o][0],e.stops[o+1][0]),s=e.stops[o][1],l=e.stops[o+1][1],u=interpolate[t.type]||_0x371728;if(e.colorSpace&&"rgb"!==e.colorSpace){var c=colorSpaces[e.colorSpace];u=(e,t)=>c.reverse(c.interpolate(c.forward(e),c.forward(t),a))}return"function"==typeof s.evaluate?{evaluate(...e){var t=s.evaluate.apply(void 0,e),i=l.evaluate.apply(void 0,e);if(void 0!==t&&void 0!==i)return u(t,i,a)}}:u(s,l,a)}function _0x109e1c(e,t,i){return"color"===t.type?i=_0x5b501e.parse(i):"formatted"===t.type?i=Formatted.fromString(i.toString()):"resolvedImage"===t.type?i=ResolvedImage.fromString(i.toString()):_0x67dca2(i)!==t.type&&("enum"!==t.type||!t.values[i])&&(i=void 0),_0x226e5(i,e.default,t.default)}function _0x1103a8(e,t){var i=new _0x9f84(_0x477d62,[],t?_0x226b69(t):void 0),n=i.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?_0x495660(new _0x10293b(n,t)):_0x479243(i.errors)}function _0x32b99b(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!_0x2e716c.isStateConstant(t.expression)}function _0x4dd5bc(e,t,i,n){this.kind=e,this.zoomStops=i,this._styleExpression=t,this.isStateDependent="camera"!==e&&!_0x2e716c.isStateConstant(t.expression),this.interpolationType=n}function _0xed488d(e,t){if("error"===(e=_0x1103a8(e,t)).result)return e;var i=e.value.expression,n=_0x2e716c.isFeatureConstant(i);if(!n&&!supportsPropertyExpression(t))return _0x479243([new _0x494db3("","data expressions not supported")]);var r=_0x2e716c.isGlobalPropertyConstant(i,["zoom"]);if(!r&&!supportsZoomExpression(t))return _0x479243([new _0x494db3("","zoom expressions not supported")]);var o=_0x365ccc(i);if(!o&&!r)return _0x479243([new _0x494db3("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof _0x494db3)return _0x479243([o]);if(o instanceof _0x1b26db&&!supportsInterpolation(t))return _0x479243([new _0x494db3("",'"interpolate" expressions cannot be used with this property')]);if(!o)return _0x495660(new _0x32b99b(n?"constant":"source",e.value));var a=o instanceof _0x1b26db?o.interpolation:void 0;return _0x495660(new _0x4dd5bc(n?"camera":"composite",e.value,o.labels,a))}function _0x57c383(e,t){var i,n,r,o="color"===t.type,a=e.stops&&"object"==typeof e.stops[0][0],s=a||void 0!==e.property,l=a||!s,u=e.type||(supportsInterpolation(t)?"exponential":"interval");if(o&&((e=_0x1001cf({},e)).stops&&(e.stops=e.stops.map((function(e){return[e[0],_0x5b501e.parse(e[1])]}))),e.default?e.default=_0x5b501e.parse(e.default):e.default=_0x5b501e.parse(t.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!colorSpaces[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===u)i=_0x34e24a;else if("interval"===u)i=evaluateIntervalFunction;else if("categorical"===u){i=evaluateCategoricalFunction,n=Object.create(null);for(var c=0,h=e.stops;c<h.length;c+=1){var d=h[c];n[d[0]]=d[1]}r=typeof e.stops[0][0]}else{if("identity"!==u)throw new Error('Unknown function type "'+u+'"');i=_0x109e1c}if(a){for(var f={},p=[],_=0;_<e.stops.length;_++){var m=e.stops[_],$=m[0].zoom;void 0===f[$]&&(f[$]={zoom:$,type:e.type,property:e.property,default:e.default,stops:[]},p.push($)),f[$].stops.push([m[0].value,m[1]])}for(var g=[],y=0,v=p;y<v.length;y+=1){var x=v[y];g.push([f[x].zoom,_0x57c383(f[x],t)])}var b={name:"linear"};return{kind:"composite",interpolationType:b,interpolationFactor:_0x1b26db.interpolationFactor.bind(void 0,b),zoomStops:g.map((function(e){return e[0]})),evaluate:function(i,n){var r=i.zoom;return _0x34e24a({stops:g,base:e.base},t,r).evaluate(r,n)}}}if(l){var S="exponential"===u?{name:"exponential",base:void 0!==e.base?e.base:1}:null;return{kind:"camera",interpolationType:S,interpolationFactor:_0x1b26db.interpolationFactor.bind(void 0,S),zoomStops:e.stops.map((function(e){return e[0]})),evaluate:function(o){var a=o.zoom;return i(e,t,a,n,r)}}}return{kind:"source",evaluate:function(o,a){var s=a&&a.properties?a.properties[e.property]:void 0;return void 0===s?_0x226e5(e.default,t.default):i(e,t,s,n,r)}}}function _0x226e5(e,t,i){return void 0!==e?e:void 0!==t?t:void 0!==i?i:void 0}function _0x1d4fc8(e,t,i,n){var r=n-i,o=e-i;return 0===r?0:1===t?o/r:(Math.pow(t,o)-1)/(Math.pow(t,r)-1)}_0x1b90fc.createExpression=function(e,t){var i=new _0x9f84(_0x477d62,[],t?_0x226b69(t):void 0),n=i.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?_0x495660(new _0x10293b(n,t)):_0x479243(i.errors)},_0x32b99b.prototype.evaluateWithoutErrorHandling=function(e,t,i,n,r,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,i,n,r,o)},_0x32b99b.prototype.evaluate=function(e,t,i,n,r,o){return this._styleExpression.evaluate(e,t,i,n,r,o)},_0x40d7a6.register("ZoomConstantExpression",_0x32b99b),_0x4dd5bc.prototype.evaluateWithoutErrorHandling=function(e,t,i,n,r,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,i,n,r,o)},_0x4dd5bc.prototype.evaluate=function(e,t,i,n,r,o){return this._styleExpression.evaluate(e,t,i,n,r,o)},_0x4dd5bc.prototype.interpolationFactor=function(e,t,i){return this.interpolationType?_0x1b26db.interpolationFactor(this.interpolationType,e,t,i):0},_0x40d7a6.register("ZoomDependentExpression",_0x4dd5bc);var _0x51615c=function(e,t){this._parameters=e,this._specification=t,_0x1001cf(this,_0x57c383(this._parameters,this._specification))};function _0x67dca2(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}_0x51615c.deserialize=function(e){return new _0x51615c(e._parameters,e._specification)},_0x51615c.serialize=function(e){return{_parameters:e._parameters,_specification:e._specification}},_0x40d7a6.register("StylePropertyFunction",_0x51615c),_0x1b90fc.normalizePropertyExpression=function(e,t){if(_0x55fb1c(e))return new _0x51615c(e,t);if(_0x1b90fc.isExpression(e)){var i=_0xed488d(e,t);if("error"===i.result)throw new Error(i.value.map((function(e){return e.key+": "+e.message})).join(", "));return i.value}var n=e;return"string"==typeof e&&"color"===t.type&&(n=_0x5b501e.parse(e)),{kind:"constant",evaluate:function(){return n}}};var _0x5b2382=(_0x38de95=!0,function(e,t){var i=_0x38de95?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x38de95=!1,i}),_0x410424=_0x5b2382(void 0,(function(){return _0x410424.toString().search("(((.+)+)+)+$").toString().constructor(_0x410424).search("(((.+)+)+)+$")})),_0x38de95;_0x410424();var _0x570220=function(e,t){this.property=e,this.value=t,this.expression=_0x1b90fc.normalizePropertyExpression(void 0===t?e.specification.default:t,e.specification)};_0x570220.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},_0x570220.prototype.possiblyEvaluate=function(e,t){return this.property.possiblyEvaluate(this,e,t)};var _0x388f85=(_0x582504=!0,function(e,t){var i=_0x582504?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x582504=!1,i}),_0x1be5aa=_0x388f85(void 0,(function(){return _0x1be5aa.toString().search("(((.+)+)+)+$").toString().constructor(_0x1be5aa).search("(((.+)+)+)+$")})),_0x582504;function _0x79e272(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,i=t*e;return 4*(e<.5?i:3*(e-t)+i-.75)}_0x1be5aa();var _0x263b37=function(e,t,i,n,r){this.property=e,this.value=t,this.begin=r+n.delay||0,this.end=this.begin+n.duration||0,e.specification.transition&&(n.delay||n.duration)&&(this.prior=i)};_0x263b37.prototype.possiblyEvaluate=function(e,t){var i=e.now||0,n=this.value.possiblyEvaluate(e,t),r=this.prior;if(r){if(i>this.end)return this.prior=null,n;if(this.value.isDataDriven())return this.prior=null,n;if(i<this.begin)return r.possiblyEvaluate(e,t);var o=(i-this.begin)/(this.end-this.begin);return this.property.interpolate(r.possiblyEvaluate(e,t),n,_0x79e272(o))}return n};var _0x283807=(_0xb7dea1=!0,function(e,t){var i=_0xb7dea1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb7dea1=!1,i}),_0x8b3481=_0x283807(void 0,(function(){return _0x8b3481.toString().search("(((.+)+)+)+$").toString().constructor(_0x8b3481).search("(((.+)+)+)+$")})),_0xb7dea1;_0x8b3481();var _0x559216=function(e){this.property=e,this.value=new _0x570220(e,void 0)};_0x559216.prototype.transitioned=function(e,t){return new _0x263b37(this.property,this.value,t,extend$1({},e.transition,this.transition),e.now)},_0x559216.prototype.untransitioned=function(){return new _0x263b37(this.property,this.value,null,{},0)};var _0x304347=(_0x1030fe=!0,function(e,t){var i=_0x1030fe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1030fe=!1,i}),_0x27cd7e=_0x304347(void 0,(function(){return _0x27cd7e.toString().search("(((.+)+)+)+$").toString().constructor(_0x27cd7e).search("(((.+)+)+)+$")})),_0x1030fe;_0x27cd7e();var _0xc3e36b=function(e){for(var t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){var i=e[t];i.specification.overridable&&this.overridableProperties.push(t);var n=this.defaultPropertyValues[t]=new _0x570220(i,void 0),r=this.defaultTransitionablePropertyValues[t]=new _0x559216(i);this.defaultTransitioningPropertyValues[t]=r.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=n.possiblyEvaluate({})}},_0x18d976=(_0x5e36d5=!0,function(e,t){var i=_0x5e36d5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5e36d5=!1,i}),_0x10c799=_0x18d976(void 0,(function(){return _0x10c799.toString().search("(((.+)+)+)+$").toString().constructor(_0x10c799).search("(((.+)+)+)+$")})),_0x5e36d5;_0x10c799();var _0x54f1e3=function(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)};_0x54f1e3.prototype.get=function(e){return this._values[e]};var _0x4ea353=(_0x311224=!0,function(e,t){var i=_0x311224?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x311224=!1,i}),_0x11e87a=_0x4ea353(void 0,(function(){return _0x11e87a.toString().search("(((.+)+)+)+$").toString().constructor(_0x11e87a).search("(((.+)+)+)+$")})),_0x311224;_0x11e87a();var _0x24394a=function(e){this._properties=e,this._values=Object.create(e.defaultPropertyValues)};_0x24394a.prototype.getValue=function(e){return clone(this._values[e].value)},_0x24394a.prototype.setValue=function(e,t){this._values[e]=new _0x570220(this._values[e].property,null===t?void 0:clone(t))},_0x24394a.prototype.serialize=function(){for(var e={},t=0,i=Object.keys(this._values);t<i.length;t+=1){var n=i[t],r=this.getValue(n);void 0!==r&&(e[n]=r)}return e},_0x24394a.prototype.possiblyEvaluate=function(e,t){for(var i=new _0x54f1e3(this._properties),n=0,r=Object.keys(this._values);n<r.length;n+=1){var o=r[n];i._values[o]=this._values[o].possiblyEvaluate(e,t)}return i};var _0x502790=(_0x9f5fbd=!0,function(e,t){var i=_0x9f5fbd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x9f5fbd=!1,i}),_0xec2f60=_0x502790(void 0,(function(){return _0xec2f60.toString().search("(((.+)+)+)+$").toString().constructor(_0xec2f60).search("(((.+)+)+)+$")})),_0x9f5fbd;_0xec2f60();var _0x1e287a=function(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)};_0x1e287a.prototype.possiblyEvaluate=function(e,t){for(var i=new _0x54f1e3(this._properties),n=0,r=Object.keys(this._values);n<r.length;n+=1){var o=r[n];i._values[o]=this._values[o].possiblyEvaluate(e,t)}return i},_0x1e287a.prototype.hasTransition=function(){for(var e=0,t=Object.keys(this._values);e<t.length;e+=1){var i=t[e];if(this._values[i].prior)return!0}return!1};var _0x3c2e76=(_0x14260f=!0,function(e,t){var i=_0x14260f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x14260f=!1,i}),_0x13057=_0x3c2e76(void 0,(function(){return _0x13057.toString().search("(((.+)+)+)+$").toString().constructor(_0x13057).search("(((.+)+)+)+$")})),_0x14260f;_0x13057();var _0x306e88=function(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)};_0x306e88.prototype.getValue=function(e){return clone(this._values[e].value.value)},_0x306e88.prototype.setValue=function(e,t){!this._values.hasOwnProperty(e)&&(this._values[e]=new _0x559216(this._values[e].property)),this._values[e].value=new _0x570220(this._values[e].property,null===t?void 0:clone(t))},_0x306e88.prototype.getTransition=function(e){return clone(this._values[e].transition)},_0x306e88.prototype.setTransition=function(e,t){!this._values.hasOwnProperty(e)&&(this._values[e]=new _0x559216(this._values[e].property)),this._values[e].transition=clone(t)||void 0},_0x306e88.prototype.serialize=function(){for(var e={},t=0,i=Object.keys(this._values);t<i.length;t+=1){var n=i[t],r=this.getValue(n);void 0!==r&&(e[n]=r);var o=this.getTransition(n);void 0!==o&&(e[n+"-transition"]=o)}return e},_0x306e88.prototype.transitioned=function(e,t){for(var i=new _0x1e287a(this._properties),n=0,r=Object.keys(this._values);n<r.length;n+=1){var o=r[n];i._values[o]=this._values[o].transitioned(e,t._values[o])}return i},_0x306e88.prototype.untransitioned=function(){for(var e=new _0x1e287a(this._properties),t=0,i=Object.keys(this._values);t<i.length;t+=1){var n=i[t];e._values[n]=this._values[n].untransitioned()}return e};var _0x988995=(_0x4b1bfc=!0,function(e,t){var i=_0x4b1bfc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4b1bfc=!1,i}),_0x523eaa=_0x988995(void 0,(function(){return _0x523eaa.toString().search("(((.+)+)+)+$").toString().constructor(_0x523eaa).search("(((.+)+)+)+$")})),_0x4b1bfc;_0x523eaa();var _0x1009bb="-transition";function _0x40ea12(e,t){if(this.id=e.id,this.type=e.type,"custom"!==e.type&&(e=e,this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),t.layout&&(this._unevaluatedLayout=new _0x24394a(t.layout)),t.paint)){for(var i in this._transitionablePaint=new _0x306e88(t.paint),e.paint)this.setPaintProperty(i,e.paint[i],{validate:!1});for(var n in e.layout)this.setLayoutProperty(n,e.layout[n],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}}_0x40ea12.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},_0x40ea12.prototype.getLayoutProperty=function(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)},_0x40ea12.prototype.setLayoutProperty=function(e,t,i){if(null!=t)this.id;if("visibility"===e)return this.visibility=t,void(this.config&&this.config.layout&&(this.config.layout.visibility=t));this._unevaluatedLayout.setValue(e,t)},_0x40ea12.prototype.getPaintProperty=function(e){return endsWith(e,_0x1009bb)?this._transitionablePaint.getTransition(e.slice(0,-_0x1009bb.length)):this._transitionablePaint.getValue(e)},_0x40ea12.prototype.setPaintProperty=function(e,t,i){if(null!=t)this.id;if(endsWith(e,_0x1009bb))return this._transitionablePaint.setTransition(e.slice(0,-_0x1009bb.length),t||void 0),!1;var n=this._transitionablePaint._values[e],r="cross-faded-data-driven"===n.property.specification["property-type"],o=n.value.isDataDriven(),a=n.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);var s=this._transitionablePaint._values[e].value;return s.isDataDriven()||o||r||this._handleOverridablePaintPropertyUpdate(e,a,s)},_0x40ea12.prototype._handleSpecialPaintPropertyUpdate=function(e){},_0x40ea12.prototype._handleOverridablePaintPropertyUpdate=function(e,t,i){return!1},_0x40ea12.prototype.isHidden=function(e){return!!(this.minzoom&&e<this.minzoom)||(!!(this.maxzoom&&e>=this.maxzoom)||"none"===this.visibility)},_0x40ea12.prototype.updateTransitions=function(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)},_0x40ea12.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},_0x40ea12.prototype.recalculate=function(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,t)},_0x40ea12.prototype.serialize=function(){var e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),filterObject(e,(function(e,t){return!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length)}))},_0x40ea12.prototype._validate=function(e,t,i,n,r){return!0},_0x40ea12.prototype.is3D=function(){return!1},_0x40ea12.prototype.isTileClipped=function(){return!1},_0x40ea12.prototype.hasOffscreenPass=function(){return!1},_0x40ea12.prototype.resize=function(){},_0x40ea12.prototype.isStateDependent=function(){return!0};var _0x2c639b=(_0x446782=!0,function(e,t){var i=_0x446782?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x446782=!1,i}),_0x37d5c1=_0x2c639b(void 0,(function(){return _0x37d5c1.toString().search("(((.+)+)+)+$").toString().constructor(_0x37d5c1).search("(((.+)+)+)+$")})),_0x446782;_0x37d5c1();var _0x4cf73f=8,_0x2c85f4={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},_0x3c26c2={"*":{type:"source"}},_0x96641=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],_0x2c1a0f={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},"*":{type:"*"}},_0x5617d3={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},_0x158a3a={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},_0x8a984a={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1}},_0x338be1={type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},_0x3a4530={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},_0x1c5f25={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},_0x46f4fc=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],_0x5a209b={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x1cd15d={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x80bbd9={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x2b2ef5={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x5c3e97={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x235449={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x1bcb82={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x4c25e6={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x2ecb35={type:"array",value:"*"},_0x3c19f1={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},_0xa9bab3={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},_0x1e49b0={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},_0x1fd5ae={type:"array",value:"*",minimum:1},_0x472e5a={type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},_0x5497a0={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},_0x2effb3=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],_0x59027f={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},_0xf0c2db={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},_0x36fd2e={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},_0x2f4621={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},_0x37ae87={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-show-background":{type:"boolean",default:!1,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},_0x28ac9c={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},_0x1dd888={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},_0x5c8159={"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},_0x10089e={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},_0x3f084c={$version:_0x4cf73f,$root:_0x2c85f4,sources:_0x3c26c2,source:_0x96641,source_vector:_0x2c1a0f,source_raster:_0x5617d3,source_raster_dem:_0x158a3a,source_geojson:_0x8a984a,source_video:_0x338be1,source_image:_0x3a4530,layer:_0x1c5f25,layout:_0x46f4fc,layout_background:_0x5a209b,layout_fill:_0x1cd15d,layout_circle:_0x80bbd9,layout_heatmap:_0x2b2ef5,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:_0x5c3e97,layout_symbol:_0x235449,layout_raster:_0x1bcb82,layout_hillshade:_0x4c25e6,filter:_0x2ecb35,filter_operator:_0x3c19f1,geometry_type:_0xa9bab3,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:_0x1e49b0,expression:_0x1fd5ae,expression_name:_0x472e5a,light:_0x5497a0,paint:_0x2effb3,paint_fill:_0x59027f,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:_0xf0c2db,paint_circle:_0x36fd2e,paint_heatmap:_0x2f4621,paint_symbol:_0x37ae87,paint_raster:_0x28ac9c,paint_hillshade:_0x1dd888,paint_background:_0x5c8159,transition:_0x10089e,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}}},_0x290cd5=(_0x400367=!0,function(e,t){var i=_0x400367?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x400367=!1,i}),_0x3cc639=_0x290cd5(void 0,(function(){return _0x3cc639.toString().search("(((.+)+)+)+$").toString().constructor(_0x3cc639).search("(((.+)+)+)+$")})),_0x400367;function _0x39cf9e(e,t){return t.replace(/{([^{}]+)}/g,((t,i)=>i in e?String(e[i]):""))}_0x3cc639();var _0x47d7a6={kind:"color"},_0x538113={kind:"formatted"},_0x5d023a=new _0xc3e36b({"symbol-placement":new _0x5f96b6(_0x3f084c.layout_symbol["symbol-placement"]),"symbol-spacing":new _0x5f96b6(_0x3f084c.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new _0x5f96b6(_0x3f084c.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new _0x326e57(_0x3f084c.layout_symbol["symbol-sort-key"]),"symbol-z-order":new _0x5f96b6(_0x3f084c.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new _0x5f96b6(_0x3f084c.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new _0x5f96b6(_0x3f084c.layout_symbol["icon-ignore-placement"]),"icon-optional":new _0x5f96b6(_0x3f084c.layout_symbol["icon-optional"]),"icon-rotation-alignment":new _0x5f96b6(_0x3f084c.layout_symbol["icon-rotation-alignment"]),"icon-size":new _0x326e57(_0x3f084c.layout_symbol["icon-size"]),"icon-text-fit":new _0x5f96b6(_0x3f084c.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new _0x5f96b6(_0x3f084c.layout_symbol["icon-text-fit-padding"]),"icon-image":new _0x326e57(_0x3f084c.layout_symbol["icon-image"]),"icon-rotate":new _0x326e57(_0x3f084c.layout_symbol["icon-rotate"]),"icon-padding":new _0x5f96b6(_0x3f084c.layout_symbol["icon-padding"]),"icon-keep-upright":new _0x5f96b6(_0x3f084c.layout_symbol["icon-keep-upright"]),"icon-offset":new _0x326e57(_0x3f084c.layout_symbol["icon-offset"]),"icon-anchor":new _0x326e57(_0x3f084c.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new _0x5f96b6(_0x3f084c.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new _0x5f96b6(_0x3f084c.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new _0x5f96b6(_0x3f084c.layout_symbol["text-rotation-alignment"]),"text-field":new _0x326e57(_0x3f084c.layout_symbol["text-field"]),"text-font":new _0x326e57(_0x3f084c.layout_symbol["text-font"]),"text-size":new _0x326e57(_0x3f084c.layout_symbol["text-size"]),"text-max-width":new _0x326e57(_0x3f084c.layout_symbol["text-max-width"]),"text-line-height":new _0x5f96b6(_0x3f084c.layout_symbol["text-line-height"]),"text-letter-spacing":new _0x326e57(_0x3f084c.layout_symbol["text-letter-spacing"]),"text-justify":new _0x326e57(_0x3f084c.layout_symbol["text-justify"]),"text-radial-offset":new _0x326e57(_0x3f084c.layout_symbol["text-radial-offset"]),"text-variable-anchor":new _0x5f96b6(_0x3f084c.layout_symbol["text-variable-anchor"]),"text-anchor":new _0x326e57(_0x3f084c.layout_symbol["text-anchor"]),"text-max-angle":new _0x5f96b6(_0x3f084c.layout_symbol["text-max-angle"]),"text-writing-mode":new _0x5f96b6(_0x3f084c.layout_symbol["text-writing-mode"]),"text-rotate":new _0x326e57(_0x3f084c.layout_symbol["text-rotate"]),"text-padding":new _0x5f96b6(_0x3f084c.layout_symbol["text-padding"]),"text-keep-upright":new _0x5f96b6(_0x3f084c.layout_symbol["text-keep-upright"]),"text-transform":new _0x326e57(_0x3f084c.layout_symbol["text-transform"]),"text-offset":new _0x326e57(_0x3f084c.layout_symbol["text-offset"]),"text-allow-overlap":new _0x5f96b6(_0x3f084c.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new _0x5f96b6(_0x3f084c.layout_symbol["text-ignore-placement"]),"text-optional":new _0x5f96b6(_0x3f084c.layout_symbol["text-optional"])}),_0x380f4b=new _0xc3e36b({"icon-opacity":new _0x326e57(_0x3f084c.paint_symbol["icon-opacity"]),"icon-color":new _0x326e57(_0x3f084c.paint_symbol["icon-color"]),"icon-halo-color":new _0x326e57(_0x3f084c.paint_symbol["icon-halo-color"]),"icon-halo-width":new _0x326e57(_0x3f084c.paint_symbol["icon-halo-width"]),"icon-halo-blur":new _0x326e57(_0x3f084c.paint_symbol["icon-halo-blur"]),"icon-translate":new _0x5f96b6(_0x3f084c.paint_symbol["icon-translate"]),"icon-translate-anchor":new _0x5f96b6(_0x3f084c.paint_symbol["icon-translate-anchor"]),"text-opacity":new _0x326e57(_0x3f084c.paint_symbol["text-opacity"]),"text-color":new _0x326e57(_0x3f084c.paint_symbol["text-color"],{runtimeType:_0x47d7a6,getOverride:function(e){return e.textColor},hasOverride:function(e){return!!e.textColor}}),"text-halo-color":new _0x326e57(_0x3f084c.paint_symbol["text-halo-color"]),"text-halo-width":new _0x326e57(_0x3f084c.paint_symbol["text-halo-width"]),"text-halo-blur":new _0x326e57(_0x3f084c.paint_symbol["text-halo-blur"]),"text-show-background":new _0x326e57(_0x3f084c.paint_symbol["text-show-background"]),"text-translate":new _0x5f96b6(_0x3f084c.paint_symbol["text-translate"]),"text-translate-anchor":new _0x5f96b6(_0x3f084c.paint_symbol["text-translate-anchor"])}),_0x16f03c={paint:_0x380f4b,layout:_0x5d023a},_0x5c2eff=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,_0x16f03c)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.recalculate=function(t,i){if(e.prototype.recalculate.call(this,t,i),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var n=this.layout.get("text-writing-mode");if(n){for(var r=[],o=0,a=n;o<a.length;o+=1){var s=a[o];r.indexOf(s)<0&&r.push(s)}this.layout._values["text-writing-mode"]=r}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},r.prototype.getValueAndResolveTokens=function(e,t,i){var n=this.layout.get(e).evaluate(t,{},i),r=this._unevaluatedLayout._values[e];return r.isDataDriven()||_0x1b90fc.isExpression(r.value)||!n?n:_0x39cf9e(t.properties,n)},r.prototype.createBucket=function(e){return new _0x20cbaf(e)},r.prototype.queryRadius=function(){return 0},r.prototype.queryIntersectsFeature=function(){return!1},r.prototype._setPaintOverrides=function(){for(var e=0,t=_0x16f03c.paint.overridableProperties;e<t.length;e+=1){var i=t[e];if(r.hasPaintOverride(this.layout,i)){var n=this.paint.get(i);new FormatSectionOverride(n);"constant"===n.value.kind||n.value.kind,this.paint._values[i]=new PossiblyEvaluatedPropertyValue(n.property,null,n.parameters)}}},r.prototype._handleOverridablePaintPropertyUpdate=function(e,t,i){return!(!this.layout||t.isDataDriven()||i.isDataDriven())&&r.hasPaintOverride(this.layout,e)},r.hasPaintOverride=function(e,t){var i=e.get("text-field"),n=_0x16f03c.paint.properties[t],r=!1,o=function(e){for(var t=0,i=e;t<i.length;t+=1){var o=i[t];if(n.overrides&&n.overrides.hasOverride(o))return void(r=!0)}};if("constant"===i.value.kind&&i.value.value instanceof _0xec392c)o(i.value.value.sections);else if("source"===i.value.kind){var a=function(e){if(!r)if(e instanceof _0x3c4301&&_0x3cc979.typeOf(e.value)===_0x538113){var t=e.value;o(t.sections)}else e instanceof _0x276564?o(e.sections):e.eachChild(a)},s=i.value;s._styleExpression&&a(s._styleExpression.expression)}return r},r.hasPaintOverrides=function(e){for(var t=0,i=_0x16f03c.paint.overridableProperties;t<i.length;t+=1){var n=i[t];if(r.hasPaintOverride(e,n))return!0}return!1},r}(_0x40ea12),_0x28537c=(_0x2986d7=!0,function(e,t){var i=_0x2986d7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2986d7=!1,i}),_0x221bbd=_0x28537c(void 0,(function(){return _0x221bbd.toString().search("(((.+)+)+)+$").toString().constructor(_0x221bbd).search("(((.+)+)+)+$")})),_0x2986d7;_0x221bbd();var _0x33852b=["Unknown","Point","LineString","Polygon"],_0x18068f=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function _0xfa2170(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=s?Math.min(_0x1359de,Math.round(s[0])):0,p=s?Math.min(_0x1359de,Math.round(s[1])):0;e.emplaceBack(t,i,Math.round(32*n),Math.round(32*r),o,a,(f<<1)+(l?1:0),p,16*u,16*c,256*h,256*d)}function _0x3eb7ea(e,t,i){e.emplaceBack(t.x,t.y,i),e.emplaceBack(t.x,t.y,i),e.emplaceBack(t.x,t.y,i),e.emplaceBack(t.x,t.y,i)}function _0x45afb9(e){for(var t=0,i=e.sections;t<i.length;t+=1){if(stringContainsRTLText(i[t].text))return!0}return!1}var _0x5d1de2=function(e){this.layoutVertexArray=new _0x547d2f,this.indexArray=new _0x239d74,this.programConfigurations=e,this.segments=new _0x17c095,this.dynamicLayoutVertexArray=new _0x4b08f4,this.opacityVertexArray=new _0x1478ba,this.placedSymbolArray=new _0x28f757};_0x5d1de2.prototype.upload=function(e,t,i,n){i&&(this.layoutVertexArray.length>0&&(this.layoutVertexBuffer=_0xbea57e.toVertexBuffer(e,this.layoutVertexArray,symbolLayoutAttributes.members)),this.indexArray.length>0&&(this.indexBuffer=_0xbea57e.toIndexBuffer(e,this.indexArray,t)),this.dynamicLayoutVertexArray.length>0&&(this.dynamicLayoutVertexBuffer=_0xbea57e.toVertexBuffer(e,this.dynamicLayoutVertexArray,dynamicLayoutAttributes.members,!0)),this.opacityVertexArray.length>0&&(this.opacityVertexBuffer=_0xbea57e.toVertexBuffer(e,this.opacityVertexArray,_0x18068f,!0),this.opacityVertexBuffer.itemSize=1)),(i||n)&&this.programConfigurations.upload(e)},_0x5d1de2.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.layoutVertexBuffer=null),this.indexBuffer&&(this.indexBuffer.destroy(),this.indexBuffer=null),this.dynamicLayoutVertexBuffer&&(this.dynamicLayoutVertexBuffer.destroy(),this.dynamicLayoutVertexBuffer=null),this.opacityVertexBuffer&&(this.opacityVertexBuffer.destroy(),this.opacityVertexBuffer=null),this.programConfigurations.destroy(),this.segments.destroy()},_0x5d1de2.prototype.clear=function(){},_0x40d7a6.register("SymbolBuffers",_0x5d1de2);var _0x5c8b4e=function(e,t,i){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new i,this.segments=new _0x17c095,this.collisionVertexArray=new _0x1200c6};_0x5c8b4e.prototype.upload=function(e){this.layoutVertexArray.length>0&&(this.layoutVertexBuffer=_0xbea57e.toVertexBuffer(e,this.layoutVertexArray,this.layoutAttributes)),this.indexArray.length>0&&(this.indexBuffer=_0xbea57e.toIndexBuffer(e,this.indexArray)),this.collisionVertexArray.length>0&&(this.collisionVertexBuffer=_0xbea57e.toVertexBuffer(e,this.collisionVertexArray,collisionVertexAttributes.members,!0))},_0x5c8b4e.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.layoutVertexBuffer=null),this.collisionVertexBuffer&&(this.collisionVertexBuffer.destroy(),this.collisionVertexBuffer=null),this.indexBuffer&&(this.indexBuffer.destroy(),this.indexBuffer=null),this.segments.destroy()},_0x40d7a6.register("CollisionBuffers",_0x5c8b4e);var _0x378673=function(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasPattern=!1,this.hasPaintOverrides=!1,this.hasRTLText=!1;var t=this.layers[0]._unevaluatedLayout._values;this.textSizeData=_0x330da2(this.zoom,t["text-size"]),this.iconSizeData=_0x330da2(this.zoom,t["icon-size"]);var i=this.layers[0].layout,n=i.get("symbol-sort-key"),r=i.get("symbol-z-order");this.sortFeaturesByKey="viewport-y"!==r&&void 0!==n.constantOr(1);var o="viewport-y"===r||"auto"===r&&!this.sortFeaturesByKey;this.sortFeaturesByY=o&&(i.get("text-allow-overlap")||i.get("icon-allow-overlap")||i.get("text-ignore-placement")||i.get("icon-ignore-placement")),"point"===i.get("symbol-placement")&&(this.writingModes=i.get("text-writing-mode").map((function(e){return _0x3ef181[e]}))),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id})),this.sourceID=e.sourceID,this.overscaling=1};_0x378673.prototype.createArrays=function(){const e=this.layers[0].layout;this.hasPaintOverrides=_0x5c2eff.hasPaintOverrides(e);var t=symbolLayoutAttributes.members;this.text=new _0x5d1de2(new ProgramConfigurationSet(t,this.layers,this.zoom,(e=>/^text/.test(e)))),this.icon=new _0x5d1de2(new ProgramConfigurationSet(t,this.layers,this.zoom,(e=>/^icon/.test(e)))),this.textCollisionBox=new _0x5c8b4e(_0x3cb7da,collisionBoxLayout.members,_0x13aa79),this.iconCollisionBox=new _0x5c8b4e(_0x3cb7da,collisionBoxLayout.members,_0x13aa79),this.textCollisionCircle=new _0x5c8b4e(_0x3cb7da,collisionCircleLayout.members,_0x239d74),this.iconCollisionCircle=new _0x5c8b4e(_0x3cb7da,collisionCircleLayout.members,_0x239d74),this.glyphOffsetArray=new _0x3060fc,this.lineVertexArray=new _0xa11616,this.symbolInstances=new _0x119b2a},_0x378673.prototype.calculateGlyphDependencies=function(e,t,i,n,r){for(let o=0;o<e.length;o++)if(t[e.charCodeAt(o)]=!0,(i||n)&&r){const i=verticalizedCharacterMap[e.charAt(o)];i&&(t[i.charCodeAt(0)]=!0)}},_0x378673.prototype.populate=function(e,t){var i=this.layers[0],n=i.layout,r=n.get("text-font"),o=n.get("text-field"),a=n.get("icon-image"),s=("constant"!==o.value.kind||o.value.value instanceof _0xec392c&&!o.value.value.isEmpty()||o.value.value.toString().length>0)&&("constant"!==r.value.kind||r.value.value.length>0),l=("constant"!==a.value.kind||!!a.value.value)&&Object.keys(a.parameters).length>0,u=n.get("symbol-sort-key");if(this.features=[],s||l){for(var c=t.iconDependencies,h=t.glyphDependencies,d=t.availableImages,f=new _0x460d5e(this.zoom),p=0,_=e;p<_.length;p+=1){var m=_[p],$=m.feature,g=m.index,y=m.sourceLayerIndex;if(i._featureFilter(f,$)){var v=void 0;if(s){var x=i.getValueAndResolveTokens("text-field",$,d),b=_0xec392c.factory(x);_0x45afb9(b)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===getRTLTextPluginStatus()||this.hasRTLText&&plugin.isParsed())&&(v=_0x302e47(b,i,$))}var S=void 0;if(l){var w=i.getValueAndResolveTokens("icon-image",$,d);S=w instanceof _0x1c7174?w:_0x1c7174.fromString(w)}if(v||S){var C=this.sortFeaturesByKey?u.evaluate($,{}):void 0,T={text:v,icon:S,index:g,sourceLayerIndex:y,geometry:_0x43a884($),properties:$.properties,type:_0x33852b[$.type],sortKey:C};if(void 0!==$.id&&(T.id=$.id),this.features.push(T),S&&(c[S.name]=!0),v){var P=r.evaluate($,{}).join(","),E="map"===n.get("text-rotation-alignment")&&"point"!==n.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(_0x3ef181.vertical)>=0;for(var A=0,L=v.sections;A<L.length;A+=1){var M=L[A];if(M.image)c[M.image.name]=!0;else{var I=allowsVerticalWritingMode(v.toString()),O=M.fontStack||P,D=h[O]=h[O]||{};this.calculateGlyphDependencies(M.text,D,E,this.allowVerticalPlacement,I)}}}}}}"line"===n.get("symbol-placement")&&(this.features=_0x41469e(this.features)),this.sortFeaturesByKey&&this.features.sort((function(e,t){return e.sortKey-t.sortKey}))}},_0x378673.prototype.update=function(e,t,i){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,i),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,i))},_0x378673.prototype.isEmpty=function(){return 0===this.symbolInstances.length&&!this.hasRTLText},_0x378673.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},_0x378673.prototype.upload=function(e){this.text&&(!this.uploaded&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e),this.textCollisionCircle.upload(e),this.iconCollisionCircle.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0)},_0x378673.prototype.destroy=function(){this.text&&(this.text.destroy(),this.icon.destroy(),this.textCollisionBox.destroy(),this.iconCollisionBox.destroy(),this.textCollisionCircle.destroy(),this.iconCollisionCircle.destroy())},_0x378673.prototype.clear=function(){},_0x378673.prototype.addToLineVertexArray=function(e,t){var i=this.lineVertexArray.length;if(void 0!==e.segment){for(var n=e.dist(t[e.segment+1]),r=e.dist(t[e.segment]),o={},a=e.segment+1;a<t.length;a++)o[a]={x:t[a].x,y:t[a].y,tileUnitDistanceFromAnchor:n},a<t.length-1&&(n+=t[a+1].dist(t[a]));for(var s=e.segment||0;s>=0;s--)o[s]={x:t[s].x,y:t[s].y,tileUnitDistanceFromAnchor:r},s>0&&(r+=t[s-1].dist(t[s]));for(var l=0;l<t.length;l++){var u=o[l];this.lineVertexArray.emplaceBack(u.x,u.y,u.tileUnitDistanceFromAnchor)}}return{lineStartIndex:i,lineLength:this.lineVertexArray.length-i}},_0x378673.prototype.addSymbols=function(e,t,i,n,r,o,a,s,l,u,c){var h=this,d=e.indexArray,f=e.layoutVertexArray,p=e.dynamicLayoutVertexArray,_=e.segments.prepareSegment(4*t.length,e.layoutVertexArray,e.indexArray,o.sortKey),m=this.glyphOffsetArray.length,$=_.vertexLength,g=this.allowVerticalPlacement&&a===_0x3ef181.vertical?Math.PI/2:0,y=function(e){var t=e.tl,n=e.tr,r=e.bl,o=e.br,a=e.tex,l=e.pixelOffsetTL,u=e.pixelOffsetBR,c=e.minFontScaleX,m=e.minFontScaleY,$=_.vertexLength,y=e.glyphOffset[1];_0xfa2170(f,s.x,s.y,t.x,y+t.y,a.x,a.y+a.h,i,e.isSDF,l.x,l.y,c,m),_0xfa2170(f,s.x,s.y,n.x,y+n.y,a.x+a.w,a.y+a.h,i,e.isSDF,u.x,l.y,c,m),_0xfa2170(f,s.x,s.y,r.x,y+r.y,a.x,a.y,i,e.isSDF,l.x,u.y,c,m),_0xfa2170(f,s.x,s.y,o.x,y+o.y,a.x+a.w,a.y,i,e.isSDF,u.x,u.y,c,m),_0x3eb7ea(p,s,g),d.emplaceBack($,$+1,$+2),d.emplaceBack($+1,$+2,$+3),_.vertexLength+=4,_.primitiveLength+=2,h.glyphOffsetArray.emplaceBack(e.glyphOffset[0])};if(o.text&&o.text.sections){var v=o.text.sections;if(this.hasPaintOverrides){for(var x,b=function(t,i){void 0!==x&&(x!==t||i)&&e.programConfigurations.populatePaintArrays(e.layoutVertexArray.length,o,o.index,{},v[x]),x=t},S=0,w=t;S<w.length;S+=1){var C=w[S];b(C.sectionIndex,!1),y(C)}b(x,!0)}else{for(var T=0,P=t;T<P.length;T+=1){y(P[T])}e.programConfigurations.populatePaintArrays(e.layoutVertexArray.length,o,o.index,{},v[0])}}else{for(var E=0,A=t;E<A.length;E+=1){y(A[E])}e.programConfigurations.populatePaintArrays(e.layoutVertexArray.length,o,o.index,{})}e.placedSymbolArray.emplaceBack(s.x,s.y,m,this.glyphOffsetArray.length-m,$,l,u,s.segment,i?i[0]:0,i?i[1]:0,n[0],n[1],a,0,!1,0,c)},_0x378673.prototype._addCollisionDebugVertex=function(e,t,i,n,r,o){return t.emplaceBack(0,0),e.emplaceBack(i.x,i.y,n,r,Math.round(o.x),Math.round(o.y))},_0x378673.prototype.addCollisionDebugVertices=function(e,t,i,n,r,o,a,s){var l=r.segments.prepareSegment(4,r.layoutVertexArray,r.indexArray),u=l.vertexLength,c=r.layoutVertexArray,h=r.collisionVertexArray,d=a.anchorX,f=a.anchorY;if(this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(e,t)),this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(i,t)),this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(i,n)),this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(e,n)),l.vertexLength+=4,s){var p=r.indexArray;p.emplaceBack(u,u+1,u+2),p.emplaceBack(u,u+2,u+3),l.primitiveLength+=2}else{var _=r.indexArray;_.emplaceBack(u,u+1),_.emplaceBack(u+1,u+2),_.emplaceBack(u+2,u+3),_.emplaceBack(u+3,u),l.primitiveLength+=4}},_0x378673.prototype.addDebugCollisionBoxes=function(e,t,i,n){for(var r=e;r<t;r++){var o=this.collisionBoxArray.get(r),a=o.x1,s=o.y1,l=o.x2,u=o.y2,c=o.radius>0;this.addCollisionDebugVertices(a,s,l,u,c?n?this.textCollisionCircle:this.iconCollisionCircle:n?this.textCollisionBox:this.iconCollisionBox,o.anchorPoint,i,c)}},_0x378673.prototype.generateCollisionDebugBuffers=function(){for(var e=0;e<this.symbolInstances.length;e++){var t=this.symbolInstances.get(e);this.addDebugCollisionBoxes(t.textBoxStartIndex,t.textBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.verticalTextBoxStartIndex,t.verticalTextBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.iconBoxStartIndex,t.iconBoxEndIndex,t,!1),this.addDebugCollisionBoxes(t.verticalIconBoxStartIndex,t.verticalIconBoxEndIndex,t,!1)}},_0x378673.prototype._deserializeCollisionBoxesForSymbol=function(e,t,i,n,r,o,a,s,l){for(var u={},c=t;c<i;c++){var h=e.get(c);if(0===h.radius){u.textBox={x1:h.x1,y1:h.y1,x2:h.x2,y2:h.y2,anchorPointX:h.anchorPointX,anchorPointY:h.anchorPointY},u.textFeatureIndex=h.featureIndex;break}!u.textCircles&&(u.textCircles=[],u.textFeatureIndex=h.featureIndex);u.textCircles.push(h.anchorPointX,h.anchorPointY,h.radius,h.signedDistanceFromAnchor,1)}for(var d=n;d<r;d++){var f=e.get(d);if(0===f.radius){u.verticalTextBox={x1:f.x1,y1:f.y1,x2:f.x2,y2:f.y2,anchorPointX:f.anchorPointX,anchorPointY:f.anchorPointY},u.verticalTextFeatureIndex=f.featureIndex;break}}for(var p=o;p<a;p++){var _=e.get(p);if(0===_.radius){u.iconBox={x1:_.x1,y1:_.y1,x2:_.x2,y2:_.y2,anchorPointX:_.anchorPointX,anchorPointY:_.anchorPointY},u.iconFeatureIndex=_.featureIndex;break}}for(var m=s;m<l;m++){var $=e.get(m);if(0===$.radius){u.verticalIconBox={x1:$.x1,y1:$.y1,x2:$.x2,y2:$.y2,anchorPointX:$.anchorPointX,anchorPointY:$.anchorPointY},u.verticalIconFeatureIndex=$.featureIndex;break}}return u},_0x378673.prototype.deserializeCollisionBoxes=function(e){this.collisionArrays=[];for(var t=0;t<this.symbolInstances.length;t++){var i=this.symbolInstances.get(t);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(e,i.textBoxStartIndex,i.textBoxEndIndex,i.verticalTextBoxStartIndex,i.verticalTextBoxEndIndex,i.iconBoxStartIndex,i.iconBoxEndIndex,i.verticalIconBoxStartIndex,i.verticalIconBoxEndIndex))}},_0x378673.prototype.hasTextData=function(){return this.text.segments.get().length>0},_0x378673.prototype.hasIconData=function(){return this.icon.segments.get().length>0},_0x378673.prototype.hasTextCollisionBoxData=function(){return this.textCollisionBox.segments.get().length>0},_0x378673.prototype.hasIconCollisionBoxData=function(){return this.iconCollisionBox.segments.get().length>0},_0x378673.prototype.hasTextCollisionCircleData=function(){return this.textCollisionCircle.segments.get().length>0},_0x378673.prototype.hasIconCollisionCircleData=function(){return this.iconCollisionCircle.segments.get().length>0},_0x378673.prototype.addIndicesForPlacedSymbol=function(e,t){for(var i=e.placedSymbolArray.get(t),n=i.vertexStartIndex+4*i.numGlyphs,r=i.vertexStartIndex;r<n;r+=4)e.indexArray.emplaceBack(r,r+1,r+2),e.indexArray.emplaceBack(r+1,r+2,r+3)},_0x378673.prototype.getSortedSymbolIndexes=function(e){if(this.sortedAngle===e&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;for(var t=Math.sin(e),i=Math.cos(e),n=[],r=[],o=[],a=0;a<this.symbolInstances.length;++a){o.push(a);var s=this.symbolInstances.get(a);n.push(0|Math.round(t*s.anchorX+i*s.anchorY)),r.push(s.featureIndex)}return o.sort((function(e,t){return n[e]-n[t]||r[t]-r[e]})),o},_0x378673.prototype.sortFeatures=function(e){var t=this;if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var i=0,n=this.symbolInstanceIndexes;i<n.length;i+=1){var r=n[i],o=this.symbolInstances.get(r);this.featureSortOrder.push(o.featureIndex),[o.rightJustifiedTextSymbolIndex,o.centerJustifiedTextSymbolIndex,o.leftJustifiedTextSymbolIndex].forEach((function(e,i,n){e>=0&&n.indexOf(e)===i&&t.addIndicesForPlacedSymbol(t.text,e)})),o.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,o.verticalPlacedTextSymbolIndex),o.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.placedIconSymbolIndex),o.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},_0x40d7a6.register("SymbolBucket",_0x378673,{omit:["layers","collisionBoxArray","compareText"]}),_0x378673.MAX_GLYPHS=65535,_0x378673.addDynamicAttributes=_0x3eb7ea;var _0x20cbaf=_0x378673;const _0x2d7778=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3124cb=_0x2d7778(void 0,(function(){return _0x3124cb.toString().search("(((.+)+)+)+$").toString().constructor(_0x3124cb).search("(((.+)+)+)+$")}));function _0x33582b(e,t,i,n,r){const o=_0x4d2af4.mat4.create();return t?(_0x4d2af4.mat4.scale(o,o,[1/r,1/r,1]),!i&&_0x4d2af4.mat4.rotateZ(o,o,n.angle)):_0x4d2af4.mat4.multiply(o,n.labelPlaneMatrix,e),o}function _0x415a61(e,t,i,n,r){if(t){const t=_0x4d2af4.mat4.clone(e);return _0x4d2af4.mat4.scale(t,t,[r,r,1]),!i&&_0x4d2af4.mat4.rotateZ(t,t,-n.angle),t}return n.glCoordMatrix}function _0xa7fefb(e,t){const i=[e.x,e.y,0,1];_0x532c3f(i,i,t);const n=i[3];return{point:new _0x279c0d(i[0]/n,i[1]/n),signedDistanceFromCamera:n}}function _0x273d66(e,t){const i=e[0]/e[3],n=e[1]/e[3];return i>=-t[0]&&i<=t[0]&&n>=-t[1]&&n<=t[1]}function _0x20c4fc(e,t,i,n,r,o,a,s){const l=n?e.textSizeData:e.iconSizeData,u=_0x5ef064(l,i.transform.zoom),c=[256/i.width*2+1,256/i.height*2+1],h=n?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;h.clear();const d=e.lineVertexArray,f=n?e.text.placedSymbolArray:e.icon.placedSymbolArray,p=i.transform.width/i.transform.height;let _=!1;for(let n=0;n<f.length;n++){const a=f.get(n);if(a.hidden||a.writingMode===_0x3ef181.vertical&&!_){_0x13c587(a.numGlyphs,h);continue}_=!1;const m=[a.anchorX,a.anchorY,0,1];if(_0x4d2af4.vec4.transformMat4(m,m,t),!_0x273d66(m,c)){_0x13c587(a.numGlyphs,h);continue}m[3];i.transform.cameraToCenterDistance;const $=1.5*_0x3dc966(l,u,a),g=new _0x279c0d(a.anchorX,a.anchorY),y=_0xa7fefb(g,r).point,v={},x=_0xff0bce(a,$,!1,s,t,r,o,e.glyphOffsetArray,d,h,y,g,v,p);_=x.useVertical,(x.notEnoughRoom||_||x.needsFlipping&&_0xff0bce(a,$,!0,s,t,r,o,e.glyphOffsetArray,d,h,y,g,v,p).notEnoughRoom)&&_0x13c587(a.numGlyphs,h)}n?e.text.dynamicLayoutVertexBuffer.copyFromArrayView(h.arrayBuffer):e.icon.dynamicLayoutVertexBuffer.copyFromArrayView(h.arrayBuffer)}function _0x44cd20(e,t,i,n,r,o,a,s,l,u,c,h){const d=s.glyphStartIndex+s.numGlyphs,f=s.lineStartIndex,p=s.lineStartIndex+s.lineLength,_=t.getoffsetX(s.glyphStartIndex),m=t.getoffsetX(d-1),$=_0x34d44a(e*_,i,n,r,o,a,s.segment,f,p,l,u,c,h);if(!$)return null;const g=_0x34d44a(e*m,i,n,r,o,a,s.segment,f,p,l,u,c,h);return g?{first:$,last:g}:null}function _0x27535b(e,t,i,n){if(e===_0x3ef181.horizontal){if(Math.abs(i.y-t.y)>Math.abs(i.x-t.x)*n)return{useVertical:!0}}return(e===_0x3ef181.vertical?t.y<i.y:t.x>i.x)?{needsFlipping:!0}:null}function _0xff0bce(e,t,i,n,r,o,a,s,l,u,c,h,d,f){const p=t/24,_=e.lineOffsetX*p,m=e.lineOffsetY*p;let $;if(e.numGlyphs>1){const t=e.glyphStartIndex+e.numGlyphs,r=e.lineStartIndex,u=e.lineStartIndex+e.lineLength,g=_0x44cd20(p,s,_,m,i,c,h,e,l,o,d,!1);if(!g)return{notEnoughRoom:!0};const y=_0xa7fefb(g.first.point,a).point,v=_0xa7fefb(g.last.point,a).point;n&&!i&&_0x27535b(e.writingMode,y,v,f),$=[g.first];for(let n=e.glyphStartIndex+1;n<t-1;n++)$.push(_0x34d44a(p*s.getoffsetX(n),_,m,i,c,h,e.segment,r,u,l,o,d,!1));$.push(g.last)}else{if(n&&!i){const t=_0xa7fefb(h,r).point,i=e.lineStartIndex+e.segment+1,n=new _0x279c0d(l.getx(i),l.gety(i)),o=_0xa7fefb(n,r),a=o.signedDistanceFromCamera>0?o.point:_0x128407(h,n,t,1,r),s=_0x27535b(e.writingMode,t,a,f);if(s)return s}const t=_0x34d44a(p*s.getoffsetX(e.glyphStartIndex),_,m,i,c,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,l,o,d,!1);if(!t)return{notEnoughRoom:!0};$=[t]}for(const e of $){_0x3eb7ea(u,_0xa7fefb(e.point,a).point,e.angle)}return{}}function _0x128407(e,t,i,n,r){const o=_0xa7fefb(e.add(e.sub(t)._unit()),r).point,a=i.sub(o);return i.add(a._mult(n/a.mag()))}function _0x34d44a(e,t,i,n,r,o,a,s,l,u,c,h,d){const f=n?e-t:e+t;let p=f>0?1:-1,_=0;n&&(p*=-1,_=Math.PI),p<0&&(_+=Math.PI);let m=p>0?s+a:s+a+1;const $=m;let g=r,y=r,v=0,x=0;const b=Math.abs(f);for(;v+x<=b;){if(m+=p,m<s||m>=l)return null;if(y=g,g=h[m],void 0===g){const e=new _0x279c0d(u.getx(m),u.gety(m)),t=_0xa7fefb(e,c);if(t.signedDistanceFromCamera>0)g=h[m]=t.point;else{const t=m-p;g=_0x128407(0===v?o:new _0x279c0d(u.getx(t),u.gety(t)),e,y,b-v+1,c)}}v+=x,x=y.dist(g)}const S=(b-v)/x,w=g.sub(y),C=w.mult(S)._add(y);C._add(w._unit()._perp()._mult(i*p));return{point:C,angle:_+Math.atan2(g.y-y.y,g.x-y.x),tileDistance:d?{prevTileDistance:m-p===$?0:u.gettileUnitDistanceFromAnchor(m-p),lastSegmentViewportDistance:b-v}:null}}_0x3124cb();const _0x3f72e3=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function _0x13c587(e,t){for(let i=0;i<e;i++){const e=t.length;t.resize(e+4),t.float32.set(_0x3f72e3,3*e)}}function _0x532c3f(e,t,i){const n=t[0],r=t[1];return e[0]=i[0]*n+i[4]*r+i[12],e[1]=i[1]*n+i[5]*r+i[13],e[3]=i[3]*n+i[7]*r+i[15],e}var _0x21787c=(_0xc4a43a=!0,function(e,t){var i=_0xc4a43a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xc4a43a=!1,i}),_0x24f948=_0x21787c(void 0,(function(){return _0x24f948.toString().search("(((.+)+)+)+$").toString().constructor(_0x24f948).search("(((.+)+)+)+$")})),_0xc4a43a;_0x24f948();var _0x256b9a={symbolIconUniforms:function(e,t){return{u_is_size_zoom_constant:new _0x2724d0.Uniform1i(e,t.u_is_size_zoom_constant),u_is_size_feature_constant:new _0x2724d0.Uniform1i(e,t.u_is_size_feature_constant),u_size_t:new _0x2724d0.Uniform1f(e,t.u_size_t),u_size:new _0x2724d0.Uniform1f(e,t.u_size),u_camera_to_center_distance:new _0x2724d0.Uniform1f(e,t.u_camera_to_center_distance),u_pitch:new _0x2724d0.Uniform1f(e,t.u_pitch),u_rotate_symbol:new _0x2724d0.Uniform1i(e,t.u_rotate_symbol),u_aspect_ratio:new _0x2724d0.Uniform1f(e,t.u_aspect_ratio),u_fade_change:new _0x2724d0.Uniform1f(e,t.u_fade_change),u_matrix:new _0x2724d0.UniformMatrix4f(e,t.u_matrix),u_label_plane_matrix:new _0x2724d0.UniformMatrix4f(e,t.u_label_plane_matrix),u_coord_matrix:new _0x2724d0.UniformMatrix4f(e,t.u_coord_matrix),u_is_text:new _0x2724d0.Uniform1f(e,t.u_is_text),u_pitch_with_map:new _0x2724d0.Uniform1i(e,t.u_pitch_with_map),u_texsize:new _0x2724d0.Uniform2f(e,t.u_texsize),u_texture:new _0x2724d0.Uniform1i(e,t.u_texture)}},symbolSDFUniforms:function(e,t){return{u_is_size_zoom_constant:new _0x2724d0.Uniform1i(e,t.u_is_size_zoom_constant),u_is_size_feature_constant:new _0x2724d0.Uniform1i(e,t.u_is_size_feature_constant),u_size_t:new _0x2724d0.Uniform1f(e,t.u_size_t),u_size:new _0x2724d0.Uniform1f(e,t.u_size),u_camera_to_center_distance:new _0x2724d0.Uniform1f(e,t.u_camera_to_center_distance),u_pitch:new _0x2724d0.Uniform1f(e,t.u_pitch),u_rotate_symbol:new _0x2724d0.Uniform1i(e,t.u_rotate_symbol),u_aspect_ratio:new _0x2724d0.Uniform1f(e,t.u_aspect_ratio),u_fade_change:new _0x2724d0.Uniform1f(e,t.u_fade_change),u_matrix:new _0x2724d0.UniformMatrix4f(e,t.u_matrix),u_label_plane_matrix:new _0x2724d0.UniformMatrix4f(e,t.u_label_plane_matrix),u_coord_matrix:new _0x2724d0.UniformMatrix4f(e,t.u_coord_matrix),u_is_text:new _0x2724d0.Uniform1f(e,t.u_is_text),u_pitch_with_map:new _0x2724d0.Uniform1i(e,t.u_pitch_with_map),u_texsize:new _0x2724d0.Uniform2f(e,t.u_texsize),u_texture:new _0x2724d0.Uniform1i(e,t.u_texture),u_gamma_scale:new _0x2724d0.Uniform1f(e,t.u_gamma_scale),u_device_pixel_ratio:new _0x2724d0.Uniform1f(e,t.u_device_pixel_ratio),u_is_halo:new _0x2724d0.Uniform1f(e,t.u_is_halo)}},symbolTextAndIconUniforms:function(e,t){return{u_is_size_zoom_constant:new _0x2724d0.Uniform1i(e,t.u_is_size_zoom_constant),u_is_size_feature_constant:new _0x2724d0.Uniform1i(e,t.u_is_size_feature_constant),u_size_t:new _0x2724d0.Uniform1f(e,t.u_size_t),u_size:new _0x2724d0.Uniform1f(e,t.u_size),u_camera_to_center_distance:new _0x2724d0.Uniform1f(e,t.u_camera_to_center_distance),u_pitch:new _0x2724d0.Uniform1f(e,t.u_pitch),u_rotate_symbol:new _0x2724d0.Uniform1i(e,t.u_rotate_symbol),u_aspect_ratio:new _0x2724d0.Uniform1f(e,t.u_aspect_ratio),u_fade_change:new _0x2724d0.Uniform1f(e,t.u_fade_change),u_matrix:new _0x2724d0.UniformMatrix4f(e,t.u_matrix),u_label_plane_matrix:new _0x2724d0.UniformMatrix4f(e,t.u_label_plane_matrix),u_coord_matrix:new _0x2724d0.UniformMatrix4f(e,t.u_coord_matrix),u_is_text:new _0x2724d0.Uniform1f(e,t.u_is_text),u_pitch_with_map:new _0x2724d0.Uniform1i(e,t.u_pitch_with_map),u_texsize:new _0x2724d0.Uniform2f(e,t.u_texsize),u_texsize_icon:new _0x2724d0.Uniform2f(e,t.u_texsize_icon),u_texture:new _0x2724d0.Uniform1i(e,t.u_texture),u_texture_icon:new _0x2724d0.Uniform1i(e,t.u_texture_icon),u_gamma_scale:new _0x2724d0.Uniform1f(e,t.u_gamma_scale),u_device_pixel_ratio:new _0x2724d0.Uniform1f(e,t.u_device_pixel_ratio),u_is_halo:new _0x2724d0.Uniform1f(e,t.u_is_halo)}},symbolIconUniformValues:function(e,t,i,n,r,o,a,s,l,u){var c=r.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:c.cameraToCenterDistance,u_pitch:c.pitch/360*2*Math.PI,u_rotate_symbol:+i,u_aspect_ratio:c.width/c.height,u_fade_change:r.options.fadeDuration?r.symbolFadeChange:1,u_matrix:o,u_label_plane_matrix:a,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:u,u_texture:0}},symbolSDFUniformValues:function(e,t,i,n,r,o,a,s,l,u,c){var h=r.transform;return extend$1(_0x256b9a.symbolIconUniformValues(e,t,i,n,r,o,a,s,l,u),{u_gamma_scale:n?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_device_pixel_ratio:1,u_is_halo:+c})},symbolTextAndIconUniformValues:function(e,t,i,n,r,o,a,s,l,u){return extend$1(_0x256b9a.symbolSDFUniformValues(e,t,i,n,r,o,a,s,!0,l,!0),{u_texsize_icon:u,u_texture_icon:1})}},_0xe59c81=new r$T;_0x256b9a.symbolIconUniformMap=function(e,t,i,n,r,o,a,s,l,u){var c={},h=r.transform;return c.u_is_size_zoom_constant=function(){return+("constant"===e||"source"===e)},c.u_is_size_feature_constant=function(){return+("constant"===e||"camera"===e)},c.u_size_t=function(){return t?t.uSizeT:0},c.u_size=function(){return t?t.uSize:0},c.u_camera_to_center_distance=function(){return h.cameraToCenterDistance},c.u_pitch=function(){return h.pitch/360*2*Math.PI},c.u_rotate_symbol=function(){return+i},c.u_aspect_ratio=function(){return h.width/h.height},c.u_fade_change=function(){return r.options.fadeDuration?r.symbolFadeChange:1},c.u_matrix=function(){return o},c.u_label_plane_matrix=function(){return a},c.u_coord_matrix=function(){return s},c.u_is_text=function(){return+l},c.u_pitch_with_map=function(){return+n},c.u_texsize=function(){return _0xe59c81.x=u[0],_0xe59c81.y=u[1],_0xe59c81},c.u_texture=function(){return 0},c},_0x256b9a.symbolSDFUniformMap=function(e,t,i,n,r,o,a,s,l,u,c){var h=_0x256b9a.symbolIconUniformMap(e,t,i,n,r,o,a,s,l,u),d=r.transform;return h.u_gamma_scale=function(){return n?Math.cos(d._pitch)*d.cameraToCenterDistance:1},h.u_device_pixel_ratio=function(){return 1},h.u_is_halo=function(){return+c},h},_0x256b9a.symbolTextAndIconUniformMap=function(e,t,i,n,r,o,a,s,l,u){var c=_0x256b9a.symbolIconUniformMap(e,t,i,n,r,o,a,s,!0,l,!0);return c.u_texsize_icon=function(){return u},c.u_texture_icon=function(){return 1},c};var _0x31592a=_0x100448(new Float32Array(16)),_0x1447ae=new Float32Array(16);function _0x3a135c(e,t,i,n){if("translucent"===e.renderPass){var r=_0x4a3404.disabled,o=e.colorModeForRenderPass();i.layout.get("text-variable-anchor"),0!==i.paint.get("icon-opacity").constantOr(1)&&_0x24f163(e,t,i,!1,i.paint.get("icon-translate"),i.paint.get("icon-translate-anchor"),i.layout.get("icon-rotation-alignment"),i.layout.get("icon-pitch-alignment"),i.layout.get("icon-keep-upright"),r,o,n),0!==i.paint.get("text-opacity").constantOr(1)&&_0x24f163(e,t,i,!0,i.paint.get("text-translate"),i.paint.get("text-translate-anchor"),i.layout.get("text-rotation-alignment"),i.layout.get("text-pitch-alignment"),i.layout.get("text-keep-upright"),r,o,n)}}function _0x31b922(e,t,i){return i.iconsInText&&t?"symbolTextAndIcon":e?"symbolSDF":"symbolIcon"}function _0x24f163(e,t,i,n,r,o,a,s,l,u,c,h){var d="map"===a,f="map"===s,p=d&&"point"!==i.layout.get("symbol-placement");if(p){var _,m=d&&!f&&!p,$=void 0!==i.layout.get("symbol-sort-key").constantOr(1),g=e.depthModeForSublayer(0,_0x358f1c.ReadOnly),y=i.layout.get("text-variable-anchor"),v=[],x=t.getBucket(i);if(x){var b=n?x.text:x.icon;if(b&&b.segments.get().length){for(var S=b.programConfigurations.get(i.id),w=S.getAttributeLocation(),C=Object.keys(w).length,T=0;T<b.dynamicLayoutVertexBuffer.attributes.length;T++){w[b.dynamicLayoutVertexBuffer.attributes[T].name]=C++}var P=n||x.sdfIcons,E=n?x.textSizeData:x.iconSizeData,A=e.useProgram(_0x31b922(P,n,x),S,w).cesiumProgram;_=_0x5ef064(E,t.level);var L=void 0,M=[0,0],I=void 0,O=void 0,D=null,R=void 0;if(n){if(I=t.glyphAtlasTexture,O=de$x.LINEAR,L=t.glyphAtlasTexture.size,x.iconsInText){M=t.imageAtlasTexture.size,D=t.imageAtlasTexture;var N="composite"===E.kind||"camera"===E.kind;R=e.options.rotating||e.options.zooming||N?de$x.LINEAR:de$x.NEAREST}}else{var F=1!==i.layout.get("icon-size").constantOr(0)||x.iconsNeedLinear;I=t.imageAtlasTexture,O=P||e.options.rotating||e.options.zooming||F?de$x.LINEAR:de$x.NEAREST,L=t.imageAtlasTexture.size}var B=_0x3987cc(t,1,t.level),z=c$1a.toArray(t.viewProjection,_0x1447ae);_0x33582b(z,f,d,e.transform,B);var G=_0x415a61(z,f,d,e.transform,B),k=y&&x.hasTextData();if("none"!==i.layout.get("icon-text-fit")&&k&&x.hasIconData(),p)_0x20c4fc(x,z,e,n,_0x33582b(_0x31592a,f,d,e.transform,B),_0x415a61(_0x31592a,f,d,e.transform,B),f,l);var U=c$1a.toArray(z,_0x1447ae),V=_0x31592a,W=e.translatePosMatrix(G,t,r,o,!0),H=P&&0!==i.paint.get(n?"text-halo-width":"icon-halo-width").constantOr(1);_.uSize=512*_.uSize/t.targetTileSize,_.uSizeT=512*_.uSizeT/t.targetTileSize;var Y={},j={program:A,buffers:b,uniformMap:Y=P?x.iconsInText?_0x256b9a.symbolTextAndIconUniformMap(E.kind,_,m,f,e,U,V,W,L,M):_0x256b9a.symbolSDFUniformMap(E.kind,_,m,f,e,U,V,W,n,L,!0):_0x256b9a.symbolIconUniformMap(E.kind,_,m,f,e,U,V,W,n,L),atlasTexture:I,atlasTextureIcon:D,atlasInterpolation:O,atlasInterpolationIcon:R,isSDF:P,hasHalo:H};if($){T=0;for(var q=b.segments.get();T<q.length;T+=1){var X=q[T];v.push({segments:new _0x17c095([X]),sortKey:X.sortKey,state:j})}}else v.push({segments:b.segments,sortKey:0,state:j});$&&v.sort((function(e,t){return e.sortKey-t.sortKey}));for(var K=0,Z=v;K<Z.length;K+=1){var J=Z[K],Q=J.state;if(Q.atlasTexture.bind(Q.atlasInterpolation,de$x.CLAMP_TO_EDGE),Y.u_texture=function(){return Q.atlasTexture.cesiumTexture},Q.atlasTextureIcon&&(Q.atlasTextureIcon.bind(Q.atlasInterpolationIcon,de$x.CLAMP_TO_EDGE),Y.u_texture_icon=function(){return Q.atlasInterpolationIcon.cesiumTexture}),Q.isSDF){Y=Q.uniformMap;Q.hasHalo&&(Y.u_is_halo=function(){return 1},_0x21e6ab(Q.buffers,J.segments,i,e,Q.program,g,u,c,Y,h.passState,w)),Y.u_is_halo=function(){return 0}}_0x21e6ab(Q.buffers,J.segments,i,e,Q.program,g,u,c,Q.uniformMap,h.passState,w)}}}}else t._MVTLabel.drawLayerSymbols(t,i,n)}function _0x21e6ab(e,t,i,n,r,o,a,s,l,u,c){var h=e.programConfigurations.get(i.id),d=r.allUniforms;l=h.getUniformMaps(d,i.paint,l);for(var f=h.getPaintVertexBuffers(),p=0,_=t.get();p<_.length;p+=1){var m=_[p],$=(m.drawCommands||(m.drawCommands={}))[i.id];if(!$){$=new s$1d({cull:!1,primitiveType:de$x.TRIANGLES,count:3*m.primitiveLength,offset:3*m.primitiveOffset}),m.drawCommands[i.id]=$;for(var g=m.cesiumVaos||(m.cesiumVaos={}),y=[],v=0;v<e.layoutVertexBuffer.attributes.length;v++){var x=e.layoutVertexBuffer.attributes[v],b=_0xbea57e.mbxAttributeToCesiumVertexArrtribute(x,e.layoutVertexBuffer,c[x.name],m.vertexOffset);y.push(b)}for(v=0;v<e.dynamicLayoutVertexBuffer.attributes.length;v++){x=e.dynamicLayoutVertexBuffer.attributes[v],b=_0xbea57e.mbxAttributeToCesiumVertexArrtribute(x,e.dynamicLayoutVertexBuffer,c[x.name],m.vertexOffset);y.push(b)}for(var S=0;S<f.length;S++)for(var w=f[S],C=0;C<w.attributes.length;C++){x=w.attributes[C],b=_0xbea57e.mbxAttributeToCesiumVertexArrtribute(x,w,c[x.name]);y.push(b)}var T=g[i.id]||(g[i.id]=new x$18({context:n.cesiumContext,attributes:y,indexBuffer:e.indexBuffer}));$.vertexArray=T}l.u_depthRange=function(){return 1-o.range[0]},$.uniformMap=l,$.renderState=_0xbea57e.toRenderState(s,o,_0x5d4b2b.disabled),$.shaderProgram=r,$.execute(n.cesiumContext,u)}}function _0x100448(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));return n(),e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}var _0x16dbbb=(_0x2a4dfb=!0,function(e,t){var i=_0x2a4dfb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a4dfb=!1,i}),_0x313d33=_0x16dbbb(void 0,(function(){return _0x313d33.toString().search("(((.+)+)+)+$").toString().constructor(_0x313d33).search("(((.+)+)+)+$")})),_0x2a4dfb;_0x313d33();var _0x2ebbba=(_0xfce5f8=!0,function(e,t){var i=_0xfce5f8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xfce5f8=!1,i}),_0x37acfa=_0x2ebbba(void 0,(function(){return _0x37acfa.toString().search("(((.+)+)+)+$").toString().constructor(_0x37acfa).search("(((.+)+)+)+$")})),_0xfce5f8;_0x37acfa();var _0x2a9fc7="\nattribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n",_0x4c1a7a=(_0x3ec203=!0,function(e,t){var i=_0x3ec203?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3ec203=!1,i}),_0x1b47ef=_0x4c1a7a(void 0,(function(){return _0x1b47ef.toString().search("(((.+)+)+)+$").toString().constructor(_0x1b47ef).search("(((.+)+)+)+$")})),_0x3ec203;_0x1b47ef();var _0x4fb264="\nuniform vec4 u_color;\nuniform float u_opacity;\n\nvoid main() {\n gl_FragColor = u_color * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x32406d=(_0x496d1d=!0,function(e,t){var i=_0x496d1d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x496d1d=!1,i}),_0x33450b=_0x32406d(void 0,(function(){return _0x33450b.toString().search("(((.+)+)+)+$").toString().constructor(_0x33450b).search("(((.+)+)+)+$")})),_0x496d1d;_0x33450b();var _0x82d99c="\nuniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\n}\n",_0x36ca80=(_0x37d6c9=!0,function(e,t){var i=_0x37d6c9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x37d6c9=!1,i}),_0x2357f0=_0x36ca80(void 0,(function(){return _0x2357f0.toString().search("(((.+)+)+)+$").toString().constructor(_0x2357f0).search("(((.+)+)+)+$")})),_0x37d6c9;_0x2357f0();var _0x4a1dd4="\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\nuniform float u_opacity;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n gl_FragColor = mix(color1, color2, u_mix) * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x3e6ca3=(_0x1fc44b=!0,function(e,t){var i=_0x1fc44b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1fc44b=!1,i}),_0x27ab8e=_0x3e6ca3(void 0,(function(){return _0x27ab8e.toString().search("(((.+)+)+)+$").toString().constructor(_0x27ab8e).search("(((.+)+)+)+$")})),_0x1fc44b;_0x27ab8e();var _0x428940="\nattribute vec2 a_pos;\nattribute vec2 a_anchor_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_placed;\nattribute vec2 a_shift;\n\nuniform mat4 u_matrix;\nuniform vec2 u_extrude_scale;\nuniform float u_camera_to_center_distance;\n\nvarying float v_placed;\nvarying float v_notUsed;\n\nvoid main() {\n vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n highp float collision_perspective_ratio = clamp(\n 0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\n 0.0, // Prevents oversized near-field boxes in pitched/overzoomed tiles\n 4.0);\n\n gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\n gl_Position.xy += (a_extrude + a_shift) * u_extrude_scale * gl_Position.w * collision_perspective_ratio;\n\n v_placed = a_placed.x;\n v_notUsed = a_placed.y;\n}\n",_0x81e595=(_0x3f2bbd=!0,function(e,t){var i=_0x3f2bbd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3f2bbd=!1,i}),_0x34fcd2=_0x81e595(void 0,(function(){return _0x34fcd2.toString().search("(((.+)+)+)+$").toString().constructor(_0x34fcd2).search("(((.+)+)+)+$")})),_0x3f2bbd;_0x34fcd2();var _0x36da0b="\nvarying float v_placed;\nvarying float v_notUsed;\n\nvoid main() {\n\n float alpha = 0.5;\n\n // Red = collision, hide label\n gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n\n // Blue = no collision, label is showing\n if (v_placed > 0.5) {\n gl_FragColor = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\n }\n\n if (v_notUsed > 0.5) {\n // This box not used, fade it out\n gl_FragColor *= .1;\n }\n}\n",_0x1fe149=(_0x1795c6=!0,function(e,t){var i=_0x1795c6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1795c6=!1,i}),_0x1a2df7=_0x1fe149(void 0,(function(){return _0x1a2df7.toString().search("(((.+)+)+)+$").toString().constructor(_0x1a2df7).search("(((.+)+)+)+$")})),_0x1795c6;_0x1a2df7();var _0x350692="\nattribute vec2 a_pos;\nattribute vec2 a_anchor_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_placed;\n\nuniform mat4 u_matrix;\nuniform vec2 u_extrude_scale;\nuniform float u_camera_to_center_distance;\n\nvarying float v_placed;\nvarying float v_notUsed;\nvarying float v_radius;\n\nvarying vec2 v_extrude;\nvarying vec2 v_extrude_scale;\n\nvoid main() {\n vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n highp float collision_perspective_ratio = clamp(\n 0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\n 0.0, // Prevents oversized near-field circles in pitched/overzoomed tiles\n 4.0);\n\n gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\n\n highp float padding_factor = 1.2; // Pad the vertices slightly to make room for anti-alias blur\n gl_Position.xy += a_extrude * u_extrude_scale * padding_factor * gl_Position.w * collision_perspective_ratio;\n\n v_placed = a_placed.x;\n v_notUsed = a_placed.y;\n v_radius = abs(a_extrude.y); // We don't pitch the circles, so both units of the extrusion vector are equal in magnitude to the radius\n\n v_extrude = a_extrude * padding_factor;\n v_extrude_scale = u_extrude_scale * u_camera_to_center_distance * collision_perspective_ratio;\n}\n",_0x46230b=(_0x3b4b1d=!0,function(e,t){var i=_0x3b4b1d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3b4b1d=!1,i}),_0xb56716=_0x46230b(void 0,(function(){return _0xb56716.toString().search("(((.+)+)+)+$").toString().constructor(_0xb56716).search("(((.+)+)+)+$")})),_0x3b4b1d;_0xb56716();var _0x5a0370="\nuniform float u_overscale_factor;\n\nvarying float v_placed;\nvarying float v_notUsed;\nvarying float v_radius;\nvarying vec2 v_extrude;\nvarying vec2 v_extrude_scale;\n\nvoid main() {\n float alpha = 0.5;\n\n // Red = collision, hide label\n vec4 color = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n\n // Blue = no collision, label is showing\n if (v_placed > 0.5) {\n color = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\n }\n\n if (v_notUsed > 0.5) {\n // This box not used, fade it out\n color *= .2;\n }\n\n float extrude_scale_length = length(v_extrude_scale);\n float extrude_length = length(v_extrude) * extrude_scale_length;\n float stroke_width = 15.0 * extrude_scale_length / u_overscale_factor;\n float radius = v_radius * extrude_scale_length;\n\n float distance_to_edge = abs(extrude_length - radius);\n float opacity_t = smoothstep(-stroke_width, 0.0, -distance_to_edge);\n\n gl_FragColor = opacity_t * color;\n}\n",_0x28f547=(_0x32d1e9=!0,function(e,t){var i=_0x32d1e9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x32d1e9=!1,i}),_0x550b29=_0x28f547(void 0,(function(){return _0x550b29.toString().search("(((.+)+)+)+$").toString().constructor(_0x550b29).search("(((.+)+)+)+$")})),_0x32d1e9;_0x550b29();var _0x166912="uniform mat4 u_matrix;\n uniform bool u_scale_with_map;\n uniform bool u_pitch_with_map;\n uniform vec2 u_extrude_scale;\n uniform lowp float u_device_pixel_ratio;\n uniform highp float u_camera_to_center_distance;\n\n attribute vec2 a_pos;\n\n varying vec3 v_data;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\n\n void main(void) {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize mediump float radius\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize highp vec4 stroke_color\n #pragma mapbox: initialize mediump float stroke_width\n #pragma mapbox: initialize lowp float stroke_opacity\n\n // unencode the extrusion vector that we snuck into the a_pos vector\n vec2 extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\n\n // multiply a_pos by 0.5, since we had it * 2 in order to sneak\n // in extrusion data\n vec2 circle_center = floor(a_pos * 0.5);\n if (u_pitch_with_map) {\n vec2 corner_position = circle_center;\n if (u_scale_with_map) {\n corner_position += extrude * (radius + stroke_width) * u_extrude_scale;\n } else {\n // Pitching the circle with the map effectively scales it with the map\n // To counteract the effect for pitch-scale: viewport, we rescale the\n // whole circle based on the pitch scaling effect at its central point\n vec4 projected_center = u_matrix * vec4(circle_center, 0, 1);\n corner_position += extrude * (radius + stroke_width) * u_extrude_scale * (projected_center.w / u_camera_to_center_distance);\n }\n\n gl_Position = u_matrix * vec4(corner_position, 0, 1);\n } else {\n gl_Position = u_matrix * vec4(circle_center, 0, 1);\n\n if (u_scale_with_map) {\n gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * u_camera_to_center_distance;\n } else {\n gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * gl_Position.w;\n }\n }\n\n // This is a minimum blur distance that serves as a faux-antialiasing for\n // the circle. since blur is a ratio of the circle's size and the intent is\n // to keep the blur at roughly 1px, the two are inversely related.\n lowp float antialiasblur = 1.0 / u_device_pixel_ratio / (radius + stroke_width);\n\n v_data = vec3(extrude.x, extrude.y, antialiasblur);\n }\n",_0x45a8fc=(_0xe32b89=!0,function(e,t){var i=_0xe32b89?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xe32b89=!1,i}),_0x118c7e=_0x45a8fc(void 0,(function(){return _0x118c7e.toString().search("(((.+)+)+)+$").toString().constructor(_0x118c7e).search("(((.+)+)+)+$")})),_0xe32b89;_0x118c7e();var _0x4e4007="varying vec3 v_data;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\n\n void main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize mediump float radius\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize highp vec4 stroke_color\n #pragma mapbox: initialize mediump float stroke_width\n #pragma mapbox: initialize lowp float stroke_opacity\n\n vec2 extrude = v_data.xy;\n float extrude_length = length(extrude);\n\n lowp float antialiasblur = v_data.z;\n float antialiased_blur = -max(blur, antialiasblur);\n\n float opacity_t = smoothstep(0.0, antialiased_blur, extrude_length - 1.0);\n\n float color_t = stroke_width < 0.01 ? 0.0 : smoothstep(\n antialiased_blur,\n 0.0,\n extrude_length - radius / (radius + stroke_width)\n );\n\n gl_FragColor = opacity_t * mix(color * opacity, stroke_color * stroke_opacity, color_t);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0x3988e0=(_0x3686a6=!0,function(e,t){var i=_0x3686a6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3686a6=!1,i}),_0x2c47e4=_0x3988e0(void 0,(function(){return _0x2c47e4.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c47e4).search("(((.+)+)+)+$")})),_0x3686a6;_0x2c47e4();var _0x3da897="\nattribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n",_0x4b8bf7=(_0x54eaeb=!0,function(e,t){var i=_0x54eaeb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x54eaeb=!1,i}),_0x1cd872=_0x4b8bf7(void 0,(function(){return _0x1cd872.toString().search("(((.+)+)+)+$").toString().constructor(_0x1cd872).search("(((.+)+)+)+$")})),_0x54eaeb;_0x1cd872();var _0x199f48="\nvoid main() {\n gl_FragColor = vec4(1.0);\n}\n",_0x15473f=(_0x227b0b=!0,function(e,t){var i=_0x227b0b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x227b0b=!1,i}),_0x511075=_0x15473f(void 0,(function(){return _0x511075.toString().search("(((.+)+)+)+$").toString().constructor(_0x511075).search("(((.+)+)+)+$")})),_0x227b0b;_0x511075();var _0x1f79eb="\nattribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n",_0x3ca7df=(_0x99245d=!0,function(e,t){var i=_0x99245d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x99245d=!1,i}),_0x24608a=_0x3ca7df(void 0,(function(){return _0x24608a.toString().search("(((.+)+)+)+$").toString().constructor(_0x24608a).search("(((.+)+)+)+$")})),_0x99245d;_0x24608a();var _0x44ba17="\nuniform highp vec4 u_color;\n\nvoid main() {\n gl_FragColor = u_color;\n}\n",_0x42b095=(_0x1996a8=!0,function(e,t){var i=_0x1996a8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1996a8=!1,i}),_0xa9ca9=_0x42b095(void 0,(function(){return _0xa9ca9.toString().search("(((.+)+)+)+$").toString().constructor(_0xa9ca9).search("(((.+)+)+)+$")})),_0x1996a8;_0xa9ca9();var _0x306834="\n#ifdef WEBGPU\n attribute ivec2 a_pos;\n#else\n attribute vec2 a_pos;\n#endif\n uniform mat4 u_matrix;\n uniform float u_depthRange;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n void main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\n gl_Position = u_matrix * vec4(float(a_pos.x), float(a_pos.y), u_depthRange, 1);\n }\n",_0x1a8e3c=(_0x2f03cb=!0,function(e,t){var i=_0x2f03cb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2f03cb=!1,i}),_0x4a0bd6=_0x1a8e3c(void 0,(function(){return _0x4a0bd6.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a0bd6).search("(((.+)+)+)+$")})),_0x2f03cb;_0x4a0bd6();var _0x2e0df2="#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n void main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float opacity\n gl_FragColor = color * opacity;\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0x4d3c88=(_0x43baee=!0,function(e,t){var i=_0x43baee?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x43baee=!1,i}),_0xc8ed99=_0x4d3c88(void 0,(function(){return _0xc8ed99.toString().search("(((.+)+)+)+$").toString().constructor(_0xc8ed99).search("(((.+)+)+)+$")})),_0x43baee;_0xc8ed99();var _0x4c6208="\nuniform mat4 u_matrix;\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\nuniform float u_vertical_gradient;\nuniform lowp float u_opacity;\n\nattribute vec2 a_pos;\nattribute vec4 a_normal_ed;\n\nvarying vec4 v_color;\n\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n\n#pragma mapbox: define highp vec4 color\n\nvoid main() {\n #pragma mapbox: initialize highp float base\n #pragma mapbox: initialize highp float height\n #pragma mapbox: initialize highp vec4 color\n\n vec3 normal = a_normal_ed.xyz;\n\n base = max(0.0, base);\n height = max(0.0, height);\n\n float t = mod(normal.x, 2.0);\n\n gl_Position = u_matrix * vec4(a_pos, t > 0.0 ? height : base, 1);\n\n // Relative luminance (how dark/bright is the surface color?)\n float colorvalue = color.r * 0.2126 + color.g * 0.7152 + color.b * 0.0722;\n\n v_color = vec4(0.0, 0.0, 0.0, 1.0);\n\n // Add slight ambient lighting so no extrusions are totally black\n vec4 ambientlight = vec4(0.03, 0.03, 0.03, 1.0);\n color += ambientlight;\n\n // Calculate cos(theta), where theta is the angle between surface normal and diffuse light ray\n float directional = clamp(dot(normal / 16384.0, u_lightpos), 0.0, 1.0);\n\n // Adjust directional so that\n // the range of values for highlight/shading is narrower\n // with lower light intensity\n // and with lighter/brighter surface colors\n directional = mix((1.0 - u_lightintensity), max((1.0 - colorvalue + u_lightintensity), 1.0), directional);\n\n // Add gradient along z axis of side surfaces\n if (normal.y != 0.0) {\n // This avoids another branching statement, but multiplies by a constant of 0.84 if no vertical gradient,\n // and otherwise calculates the gradient based on base + height\n directional *= (\n (1.0 - u_vertical_gradient) +\n (u_vertical_gradient * clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0)));\n }\n\n // Assign final color based on surface + ambient light color, diffuse light directional, and light color\n // with lower bounds adjusted to hue of light\n // so that shading is tinted with the complementary (opposite) color to the light color\n v_color.r += clamp(color.r * directional * u_lightcolor.r, mix(0.0, 0.3, 1.0 - u_lightcolor.r), 1.0);\n v_color.g += clamp(color.g * directional * u_lightcolor.g, mix(0.0, 0.3, 1.0 - u_lightcolor.g), 1.0);\n v_color.b += clamp(color.b * directional * u_lightcolor.b, mix(0.0, 0.3, 1.0 - u_lightcolor.b), 1.0);\n v_color *= u_opacity;\n}\n",_0x184262=(_0x3cb39b=!0,function(e,t){var i=_0x3cb39b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3cb39b=!1,i}),_0x54de42=_0x184262(void 0,(function(){return _0x54de42.toString().search("(((.+)+)+)+$").toString().constructor(_0x54de42).search("(((.+)+)+)+$")})),_0x3cb39b;_0x54de42();var _0x6dac2b="\nvarying vec4 v_color;\n\nvoid main() {\n gl_FragColor = v_color;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x1d3729=(_0x519b11=!0,function(e,t){var i=_0x519b11?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x519b11=!1,i}),_0x98dfdb=_0x1d3729(void 0,(function(){return _0x98dfdb.toString().search("(((.+)+)+)+$").toString().constructor(_0x98dfdb).search("(((.+)+)+)+$")})),_0x519b11;_0x98dfdb();var _0x456d2c="\nuniform mat4 u_matrix;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_height_factor;\nuniform vec4 u_scale;\nuniform float u_vertical_gradient;\nuniform lowp float u_opacity;\n\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\n\nattribute vec2 a_pos;\nattribute vec4 a_normal_ed;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec4 v_lighting;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\nvoid main() {\n #pragma mapbox: initialize lowp float base\n #pragma mapbox: initialize lowp float height\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n float pixelRatio = u_scale.x;\n float tileRatio = u_scale.y;\n float fromScale = u_scale.z;\n float toScale = u_scale.w;\n\n vec3 normal = a_normal_ed.xyz;\n float edgedistance = a_normal_ed.w;\n\n vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio);\n vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio);\n\n base = max(0.0, base);\n height = max(0.0, height);\n\n float t = mod(normal.x, 2.0);\n float z = t > 0.0 ? height : base;\n\n gl_Position = u_matrix * vec4(a_pos, z, 1);\n\n vec2 pos = normal.x == 1.0 && normal.y == 0.0 && normal.z == 16384.0\n ? a_pos // extrusion top\n : vec2(edgedistance, z * u_height_factor); // extrusion side\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, fromScale * display_size_a, tileRatio, pos);\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, toScale * display_size_b, tileRatio, pos);\n\n v_lighting = vec4(0.0, 0.0, 0.0, 1.0);\n float directional = clamp(dot(normal / 16383.0, u_lightpos), 0.0, 1.0);\n directional = mix((1.0 - u_lightintensity), max((0.5 + u_lightintensity), 1.0), directional);\n\n if (normal.y != 0.0) {\n // This avoids another branching statement, but multiplies by a constant of 0.84 if no vertical gradient,\n // and otherwise calculates the gradient based on base + height\n directional *= (\n (1.0 - u_vertical_gradient) +\n (u_vertical_gradient * clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0)));\n }\n\n v_lighting.rgb += clamp(directional * u_lightcolor, mix(vec3(0.0), vec3(0.3), 1.0 - u_lightcolor), vec3(1.0));\n v_lighting *= u_opacity;\n}\n",_0x261f84=(_0x23d0cc=!0,function(e,t){var i=_0x23d0cc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x23d0cc=!1,i}),_0x19f3e6=_0x261f84(void 0,(function(){return _0x19f3e6.toString().search("(((.+)+)+)+$").toString().constructor(_0x19f3e6).search("(((.+)+)+)+$")})),_0x23d0cc;_0x19f3e6();var _0x1577dc="\nuniform vec2 u_texsize;\nuniform float u_fade;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec4 v_lighting;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\nvoid main() {\n #pragma mapbox: initialize lowp float base\n #pragma mapbox: initialize lowp float height\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n vec4 mixedColor = mix(color1, color2, u_fade);\n\n gl_FragColor = mixedColor * v_lighting;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x280b33=(_0x513cb5=!0,function(e,t){var i=_0x513cb5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x513cb5=!1,i}),_0x5541e8=_0x280b33(void 0,(function(){return _0x5541e8.toString().search("(((.+)+)+)+$").toString().constructor(_0x5541e8).search("(((.+)+)+)+$")})),_0x513cb5;_0x5541e8();var _0x29518c="\n#ifdef WEBGPU\n attribute ivec2 a_pos;\n#else\n attribute vec2 a_pos;\n#endif\n uniform mat4 u_matrix;\n uniform vec2 u_world;\n uniform float u_depthRange;\n varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n void main() {\n #pragma mapbox: initialize highp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n gl_Position = u_matrix * vec4(vec2(a_pos), u_depthRange, 1);\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n }\n",_0x196b8e=(_0x280c20=!0,function(e,t){var i=_0x280c20?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x280c20=!1,i}),_0x3942f9=_0x196b8e(void 0,(function(){return _0x3942f9.toString().search("(((.+)+)+)+$").toString().constructor(_0x3942f9).search("(((.+)+)+)+$")})),_0x280c20;_0x3942f9();var _0x3200e1="varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n void main() {\n #pragma mapbox: initialize highp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\n gl_FragColor = outline_color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0x5315c1=(_0x167ac4=!0,function(e,t){var i=_0x167ac4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x167ac4=!1,i}),_0x18e717=_0x5315c1(void 0,(function(){return _0x18e717.toString().search("(((.+)+)+)+$").toString().constructor(_0x18e717).search("(((.+)+)+)+$")})),_0x167ac4;_0x18e717();var _0x1e0b03="uniform mat4 u_matrix;\n uniform vec2 u_pixel_coord_upper;\n uniform vec2 u_pixel_coord_lower;\n uniform vec4 u_scale;\n uniform float u_depthRange;\n\n#ifdef WEBGPU\n attribute ivec2 a_pos;\n#else\n attribute vec2 a_pos;\n#endif\n\n varying vec2 v_pos_a;\n varying vec2 v_pos_b;\n\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\n void main() {\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = vec2(pattern_from.xy);\n vec2 pattern_br_a = vec2(pattern_from.zw);\n vec2 pattern_tl_b = vec2(pattern_to.xy);\n vec2 pattern_br_b = vec2(pattern_to.zw);\n\n float pixelRatio = u_scale.x;\n float tileZoomRatio = u_scale.y;\n float fromScale = u_scale.z;\n float toScale = u_scale.w;\n\n vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio);\n vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio);\n gl_Position = u_matrix * vec4(vec2(a_pos), u_depthRange, 1);\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, fromScale * display_size_a, tileZoomRatio, vec2(a_pos));\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, toScale * display_size_b, tileZoomRatio, vec2(a_pos));\n }\n",_0x5a74c6=(_0x319f88=!0,function(e,t){var i=_0x319f88?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x319f88=!1,i}),_0x1079d0=_0x5a74c6(void 0,(function(){return _0x1079d0.toString().search("(((.+)+)+)+$").toString().constructor(_0x1079d0).search("(((.+)+)+)+$")})),_0x319f88;_0x1079d0();var _0x47290d="uniform vec2 u_texsize;\n uniform float u_fade;\n\n uniform sampler2D u_image;\n\n varying vec2 v_pos_a;\n varying vec2 v_pos_b;\n\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\n void main() {\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n gl_FragColor = mix(color1, color2, u_fade) * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0x3e60f3=(_0x74b329=!0,function(e,t){var i=_0x74b329?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x74b329=!1,i}),_0x325fa0=_0x3e60f3(void 0,(function(){return _0x325fa0.toString().search("(((.+)+)+)+$").toString().constructor(_0x325fa0).search("(((.+)+)+)+$")})),_0x74b329;_0x325fa0();var _0x57b9af="uniform mat4 u_matrix;\n uniform vec2 u_world;\n uniform vec2 u_pixel_coord_upper;\n uniform vec2 u_pixel_coord_lower;\n uniform vec4 u_scale;\n uniform float u_depthRange;\n\n#ifdef WEBGPU\n attribute ivec2 a_pos;\n#else\n attribute vec2 a_pos;\n#endif\n\n varying vec2 v_pos_a;\n varying vec2 v_pos_b;\n varying vec2 v_pos;\n\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\n void main() {\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n float pixelRatio = u_scale.x;\n float tileRatio = u_scale.y;\n float fromScale = u_scale.z;\n float toScale = u_scale.w;\n\n gl_Position = u_matrix * vec4(vec2(a_pos), u_depthRange, 1);\n\n vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio);\n vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio);\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, fromScale * display_size_a, tileRatio, vec2(a_pos));\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, toScale * display_size_b, tileRatio, vec2(a_pos));\n\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n }\n",_0x5e6a77=(_0xced5a2=!0,function(e,t){var i=_0xced5a2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xced5a2=!1,i}),_0x57f773=_0x5e6a77(void 0,(function(){return _0x57f773.toString().search("(((.+)+)+)+$").toString().constructor(_0x57f773).search("(((.+)+)+)+$")})),_0xced5a2;_0x57f773();var _0x1cea35="uniform vec2 u_texsize;\n uniform sampler2D u_image;\n uniform float u_fade;\n\n varying vec2 v_pos_a;\n varying vec2 v_pos_b;\n varying vec2 v_pos;\n\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\n void main() {\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n // find distance to outline for alpha interpolation\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\n gl_FragColor = mix(color1, color2, u_fade) * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0x4ef660=(_0x57b0c8=!0,function(e,t){var i=_0x57b0c8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x57b0c8=!1,i}),_0xe0ee9=_0x4ef660(void 0,(function(){return _0xe0ee9.toString().search("(((.+)+)+)+$").toString().constructor(_0xe0ee9).search("(((.+)+)+)+$")})),_0x57b0c8;_0xe0ee9();var _0x4edec8="\nuniform mat4 u_matrix;\nuniform float u_extrude_scale;\nuniform float u_opacity;\nuniform float u_intensity;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_extrude;\n\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\n\n// Effective \"0\" in the kernel density texture to adjust the kernel size to;\n// this empirically chosen number minimizes artifacts on overlapping kernels\n// for typical heatmap cases (assuming clustered source)\nconst highp float ZERO = 1.0 / 255.0 / 16.0;\n\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\n#define GAUSS_COEF 0.3989422804014327\n\nvoid main(void) {\n #pragma mapbox: initialize highp float weight\n #pragma mapbox: initialize mediump float radius\n\n // unencode the extrusion vector that we snuck into the a_pos vector\n vec2 unscaled_extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\n\n // This 'extrude' comes in ranging from [-1, -1], to [1, 1]. We'll use\n // it to produce the vertices of a square mesh framing the point feature\n // we're adding to the kernel density texture. We'll also pass it as\n // a varying, so that the fragment shader can determine the distance of\n // each fragment from the point feature.\n // Before we do so, we need to scale it up sufficiently so that the\n // kernel falls effectively to zero at the edge of the mesh.\n // That is, we want to know S such that\n // weight * u_intensity * GAUSS_COEF * exp(-0.5 * 3.0^2 * S^2) == ZERO\n // Which solves to:\n // S = sqrt(-2.0 * log(ZERO / (weight * u_intensity * GAUSS_COEF))) / 3.0\n float S = sqrt(-2.0 * log(ZERO / weight / u_intensity / GAUSS_COEF)) / 3.0;\n\n // Pass the varying in units of radius\n v_extrude = S * unscaled_extrude;\n\n // Scale by radius and the zoom-based scale factor to produce actual\n // mesh position\n vec2 extrude = v_extrude * radius * u_extrude_scale;\n\n // multiply a_pos by 0.5, since we had it * 2 in order to sneak\n // in extrusion data\n vec4 pos = vec4(floor(a_pos * 0.5) + extrude, 0, 1);\n\n gl_Position = u_matrix * pos;\n}\n",_0x1e233b=(_0x27ebb4=!0,function(e,t){var i=_0x27ebb4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x27ebb4=!1,i}),_0x27881c=_0x1e233b(void 0,(function(){return _0x27881c.toString().search("(((.+)+)+)+$").toString().constructor(_0x27881c).search("(((.+)+)+)+$")})),_0x27ebb4;_0x27881c();var _0x5473c1="\nuniform highp float u_intensity;\n\nvarying vec2 v_extrude;\n\n#pragma mapbox: define highp float weight\n\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\n#define GAUSS_COEF 0.3989422804014327\n\nvoid main() {\n #pragma mapbox: initialize highp float weight\n\n // Kernel density estimation with a Gaussian kernel of size 5x5\n float d = -0.5 * 3.0 * 3.0 * dot(v_extrude, v_extrude);\n float val = weight * u_intensity * GAUSS_COEF * exp(d);\n\n gl_FragColor = vec4(val, 1.0, 1.0, 1.0);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x1f5e27=(_0x4a3c90=!0,function(e,t){var i=_0x4a3c90?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4a3c90=!1,i}),_0x4acb8a=_0x1f5e27(void 0,(function(){return _0x4acb8a.toString().search("(((.+)+)+)+$").toString().constructor(_0x4acb8a).search("(((.+)+)+)+$")})),_0x4a3c90;_0x4acb8a();var _0x50d1a8="\nuniform mat4 u_matrix;\nuniform vec2 u_world;\nattribute vec2 a_pos;\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);\n\n v_pos.x = a_pos.x;\n v_pos.y = 1.0 - a_pos.y;\n}\n",_0x33682f=(_0x137ced=!0,function(e,t){var i=_0x137ced?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x137ced=!1,i}),_0x6ada32=_0x33682f(void 0,(function(){return _0x6ada32.toString().search("(((.+)+)+)+$").toString().constructor(_0x6ada32).search("(((.+)+)+)+$")})),_0x137ced;_0x6ada32();var _0x397562="\nuniform sampler2D u_image;\nuniform sampler2D u_color_ramp;\nuniform float u_opacity;\nvarying vec2 v_pos;\n\nvoid main() {\n float t = texture2D(u_image, v_pos).r;\n vec4 color = texture2D(u_color_ramp, vec2(t, 0.5));\n gl_FragColor = color * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(0.0);\n#endif\n}\n",_0x5e5a3a=(_0x2f6ad0=!0,function(e,t){var i=_0x2f6ad0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2f6ad0=!1,i}),_0x50da2b=_0x5e5a3a(void 0,(function(){return _0x50da2b.toString().search("(((.+)+)+)+$").toString().constructor(_0x50da2b).search("(((.+)+)+)+$")})),_0x2f6ad0;_0x50da2b();var _0x58f853="\nuniform mat4 u_matrix;\nuniform vec2 u_dimension;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n highp vec2 epsilon = 1.0 / u_dimension;\n float scale = (u_dimension.x - 2.0) / u_dimension.x;\n v_pos = (a_texture_pos / 8192.0) * scale + epsilon;\n}\n",_0x2d9525=(_0x2bfc10=!0,function(e,t){var i=_0x2bfc10?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2bfc10=!1,i}),_0xea85f2=_0x2d9525(void 0,(function(){return _0xea85f2.toString().search("(((.+)+)+)+$").toString().constructor(_0xea85f2).search("(((.+)+)+)+$")})),_0x2bfc10;_0xea85f2();var _0x7f7806="\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform sampler2D u_image;\nvarying vec2 v_pos;\nuniform vec2 u_dimension;\nuniform float u_zoom;\nuniform float u_maxzoom;\nuniform vec4 u_unpack;\n\nfloat getElevation(vec2 coord, float bias) {\n // Convert encoded elevation value to meters\n vec4 data = texture2D(u_image, coord) * 255.0;\n data.a = -1.0;\n return dot(data, u_unpack) / 4.0;\n}\n\nvoid main() {\n vec2 epsilon = 1.0 / u_dimension;\n\n // queried pixels:\n // +-----------+\n // | | | |\n // | a | b | c |\n // | | | |\n // +-----------+\n // | | | |\n // | d | e | f |\n // | | | |\n // +-----------+\n // | | | |\n // | g | h | i |\n // | | | |\n // +-----------+\n\n float a = getElevation(v_pos + vec2(-epsilon.x, -epsilon.y), 0.0);\n float b = getElevation(v_pos + vec2(0, -epsilon.y), 0.0);\n float c = getElevation(v_pos + vec2(epsilon.x, -epsilon.y), 0.0);\n float d = getElevation(v_pos + vec2(-epsilon.x, 0), 0.0);\n float e = getElevation(v_pos, 0.0);\n float f = getElevation(v_pos + vec2(epsilon.x, 0), 0.0);\n float g = getElevation(v_pos + vec2(-epsilon.x, epsilon.y), 0.0);\n float h = getElevation(v_pos + vec2(0, epsilon.y), 0.0);\n float i = getElevation(v_pos + vec2(epsilon.x, epsilon.y), 0.0);\n\n // here we divide the x and y slopes by 8 * pixel size\n // where pixel size (aka meters/pixel) is:\n // circumference of the world / (pixels per tile * number of tiles)\n // which is equivalent to: 8 * 40075016.6855785 / (512 * pow(2, u_zoom))\n // which can be reduced to: pow(2, 19.25619978527 - u_zoom)\n // we want to vertically exaggerate the hillshading though, because otherwise\n // it is barely noticeable at low zooms. to do this, we multiply this by some\n // scale factor pow(2, (u_zoom - u_maxzoom) * a) where a is an arbitrary value\n // Here we use a=0.3 which works out to the expression below. see \n // nickidlugash's awesome breakdown for more info\n // https://github.com/mapbox/mapbox-gl-js/pull/5286#discussion_r148419556\n float exaggeration = u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;\n\n vec2 deriv = vec2(\n (c + f + f + i) - (a + d + d + g),\n (g + h + h + i) - (a + b + b + c)\n ) / pow(2.0, (u_zoom - u_maxzoom) * exaggeration + 19.2562 - u_zoom);\n\n gl_FragColor = clamp(vec4(\n deriv.x / 2.0 + 0.5,\n deriv.y / 2.0 + 0.5,\n 1.0,\n 1.0), 0.0, 1.0);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x145f3a=(_0x4a6972=!0,function(e,t){var i=_0x4a6972?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4a6972=!1,i}),_0x27da36=_0x145f3a(void 0,(function(){return _0x27da36.toString().search("(((.+)+)+)+$").toString().constructor(_0x27da36).search("(((.+)+)+)+$")})),_0x4a6972;_0x27da36();var _0x36aa59="\nuniform mat4 u_matrix;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n v_pos = a_texture_pos / 8192.0;\n}\n",_0x2d8c64=(_0x470824=!0,function(e,t){var i=_0x470824?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x470824=!1,i}),_0x2f14ca=_0x2d8c64(void 0,(function(){return _0x2f14ca.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f14ca).search("(((.+)+)+)+$")})),_0x470824;_0x2f14ca();var _0x25a933="\nuniform sampler2D u_image;\nvarying vec2 v_pos;\n\nuniform vec2 u_latrange;\nuniform vec2 u_light;\nuniform vec4 u_shadow;\nuniform vec4 u_highlight;\nuniform vec4 u_accent;\n\n#define PI 3.141592653589793\n\nvoid main() {\n vec4 pixel = texture2D(u_image, v_pos);\n\n vec2 deriv = ((pixel.rg * 2.0) - 1.0);\n\n // We divide the slope by a scale factor based on the cosin of the pixel's approximate latitude\n // to account for mercator projection distortion. see #4807 for details\n float scaleFactor = cos(radians((u_latrange[0] - u_latrange[1]) * (1.0 - v_pos.y) + u_latrange[1]));\n // We also multiply the slope by an arbitrary z-factor of 1.25\n float slope = atan(1.25 * length(deriv) / scaleFactor);\n float aspect = deriv.x != 0.0 ? atan(deriv.y, -deriv.x) : PI / 2.0 * (deriv.y > 0.0 ? 1.0 : -1.0);\n\n float intensity = u_light.x;\n // We add PI to make this property match the global light object, which adds PI/2 to the light's azimuthal\n // position property to account for 0deg corresponding to north/the top of the viewport in the style spec\n // and the original shader was written to accept (-illuminationDirection - 90) as the azimuthal.\n float azimuth = u_light.y + PI;\n\n // We scale the slope exponentially based on intensity, using a calculation similar to\n // the exponential interpolation function in the style spec:\n // https://github.com/mapbox/mapbox-gl-js/blob/master/src/style-spec/expression/definitions/interpolate.js#L217-L228\n // so that higher intensity values create more opaque hillshading.\n float base = 1.875 - intensity * 1.75;\n float maxValue = 0.5 * PI;\n float scaledSlope = intensity != 0.5 ? ((pow(base, slope) - 1.0) / (pow(base, maxValue) - 1.0)) * maxValue : slope;\n\n // The accent color is calculated with the cosine of the slope while the shade color is calculated with the sine\n // so that the accent color's rate of change eases in while the shade color's eases out.\n float accent = cos(scaledSlope);\n // We multiply both the accent and shade color by a clamped intensity value\n // so that intensities >= 0.5 do not additionally affect the color values\n // while intensity values < 0.5 make the overall color more transparent.\n vec4 accent_color = (1.0 - accent) * u_accent * clamp(intensity * 2.0, 0.0, 1.0);\n float shade = abs(mod((aspect + azimuth) / PI + 0.5, 2.0) - 1.0);\n vec4 shade_color = mix(u_shadow, u_highlight, shade) * sin(scaledSlope) * clamp(intensity * 2.0, 0.0, 1.0);\n gl_FragColor = accent_color * (1.0 - shade_color.a) + shade_color;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x4c8b7a=(_0x2ceeb2=!0,function(e,t){var i=_0x2ceeb2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2ceeb2=!1,i}),_0x360871=_0x4c8b7a(void 0,(function(){return _0x360871.toString().search("(((.+)+)+)+$").toString().constructor(_0x360871).search("(((.+)+)+)+$")})),_0x2ceeb2;_0x360871();var _0x53fd41="// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also special normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n #define scale 0.015873016\n\n#ifdef WEBGPU\n attribute ivec2 a_pos_normal;\n attribute uvec4 a_data;\n#else\n attribute vec2 a_pos_normal;\n attribute vec4 a_data;\n#endif\n\n uniform mat4 u_matrix;\n uniform mediump float u_ratio;\n uniform vec2 u_units_to_pixels;\n uniform lowp float u_device_pixel_ratio;\n uniform float u_depthRange;\n\n varying vec2 v_normal;\n varying vec2 v_width2;\n varying float v_gamma_scale;\n varying highp float v_linesofar;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n\n void main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float width\n\n // the distance over which the line edge fades out.\n // Retina devices need a smaller distance to avoid aliasing.\n float ANTIALIASING = 1.0 / u_device_pixel_ratio / 2.0;\n\n vec2 a_extrude = vec2(a_data.xy) - 128.0;\n float a_direction = mod(float(a_data.z), 4.0) - 1.0;\n\n v_linesofar = (floor(float(a_data.z) / 4.0) + float(a_data.w) * 64.0) * 2.0;\n\n vec2 pos = floor(vec2(a_pos_normal) * 0.5);\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n // We store these in the least significant bit of a_pos_normal\n mediump vec2 normal = vec2(a_pos_normal) - 2.0 * pos;\n normal.y = normal.y * 2.0 - 1.0;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, u_depthRange, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_width2 = vec2(outset, inset);\n }\n",_0x4d877b=(_0xb87504=!0,function(e,t){var i=_0xb87504?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb87504=!1,i}),_0x4e4a74=_0x4d877b(void 0,(function(){return _0x4e4a74.toString().search("(((.+)+)+)+$").toString().constructor(_0x4e4a74).search("(((.+)+)+)+$")})),_0xb87504;_0x4e4a74();var _0x5852c6="uniform lowp float u_device_pixel_ratio;\nuniform lowp float u_antialiasing;\n\n varying vec2 v_width2;\n varying vec2 v_normal;\n varying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\n void main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / u_device_pixel_ratio) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n alpha = max(1.0 - u_antialiasing, alpha);\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0x465c7e=(_0x1add58=!0,function(e,t){var i=_0x1add58?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1add58=!1,i}),_0x591b61=_0x465c7e(void 0,(function(){return _0x591b61.toString().search("(((.+)+)+)+$").toString().constructor(_0x591b61).search("(((.+)+)+)+$")})),_0x1add58;_0x591b61();var _0x4bbcd8="// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also special normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n #define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n #define LINE_DISTANCE_SCALE 2.0\n\n#ifdef WEBGPU\n attribute ivec2 a_pos_normal;\n attribute uvec4 a_data;\n#else\n attribute vec2 a_pos_normal;\n attribute vec4 a_data;\n#endif\n\n uniform mat4 u_matrix;\n uniform mediump float u_ratio;\n uniform lowp float u_device_pixel_ratio;\n uniform vec2 u_patternscale_a;\n uniform float u_tex_y_a;\n uniform vec2 u_patternscale_b;\n uniform float u_tex_y_b;\n uniform vec2 u_units_to_pixels;\n uniform float u_depthRange;\n\n varying vec2 v_normal;\n varying vec2 v_width2;\n varying vec2 v_tex_a;\n varying vec2 v_tex_b;\n varying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n\n void main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float width\n #pragma mapbox: initialize lowp float floorwidth\n\n // the distance over which the line edge fades out.\n // Retina devices need a smaller distance to avoid aliasing.\n float ANTIALIASING = 1.0 / u_device_pixel_ratio / 2.0;\n\n vec2 a_extrude = vec2(a_data.xy) - 128.0;\n float a_direction = mod(float(a_data.z), 4.0) - 1.0;\n float a_linesofar = (floor(float(a_data.z) / 4.0) + float(a_data.w) * 64.0) * LINE_DISTANCE_SCALE;\n\n vec2 pos = floor(vec2(a_pos_normal) * 0.5);\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n // We store these in the least significant bit of a_pos_normal\n mediump vec2 normal = vec2(a_pos_normal) - 2.0 * pos;\n normal.y = normal.y * 2.0 - 1.0;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist =outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, u_depthRange, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_tex_a = vec2(a_linesofar * u_patternscale_a.x / floorwidth, normal.y * u_patternscale_a.y + u_tex_y_a);\n v_tex_b = vec2(a_linesofar * u_patternscale_b.x / floorwidth, normal.y * u_patternscale_b.y + u_tex_y_b);\n #ifndef WEBGPU\n v_tex_a.y = 1.0 - v_tex_a.y;\n v_tex_b.y = 1.0 - v_tex_b.y;\n#endif\n\n v_width2 = vec2(outset, inset);\n }\n",_0x548772=(_0xfa087d=!0,function(e,t){var i=_0xfa087d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xfa087d=!1,i}),_0x5bb1cc=_0x548772(void 0,(function(){return _0x5bb1cc.toString().search("(((.+)+)+)+$").toString().constructor(_0x5bb1cc).search("(((.+)+)+)+$")})),_0xfa087d;_0x5bb1cc();var _0x4f2fd0="uniform lowp float u_device_pixel_ratio;\n uniform sampler2D u_image;\n uniform float u_sdfgamma;\n uniform float u_mix;\n\n varying vec2 v_normal;\n varying vec2 v_width2;\n varying vec2 v_tex_a;\n varying vec2 v_tex_b;\n varying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n\n void main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float width\n #pragma mapbox: initialize lowp float floorwidth\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / u_device_pixel_ratio) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n float sdfdist_a = texture2D(u_image, v_tex_a).a;\n float sdfdist_b = texture2D(u_image, v_tex_b).a;\n\n float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);\n alpha *= smoothstep(0.5 - u_sdfgamma / floorwidth, 0.5 + u_sdfgamma / floorwidth, sdfdist);\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0xc14dc8=(_0xfe900b=!0,function(e,t){var i=_0xfe900b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xfe900b=!1,i}),_0x1ba07a=_0xc14dc8(void 0,(function(){return _0x1ba07a.toString().search("(((.+)+)+)+$").toString().constructor(_0x1ba07a).search("(((.+)+)+)+$")})),_0xfe900b;_0x1ba07a();var _0x55c092="\n// the attribute conveying progress along a line is scaled to [0, 2^15)\n#define MAX_LINE_DISTANCE 32767.0\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\nattribute vec2 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform lowp float u_device_pixel_ratio;\nuniform vec2 u_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_gamma_scale;\nvarying highp float v_lineprogress;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n\nvoid main() {\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float width\n\n // the distance over which the line edge fades out.\n // Retina devices need a smaller distance to avoid aliasing.\n float ANTIALIASING = 1.0 / u_device_pixel_ratio / 2.0;\n\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n\n v_lineprogress = (floor(a_data.z / 4.0) + a_data.w * 64.0) * 2.0 / MAX_LINE_DISTANCE;\n\n vec2 pos = floor(a_pos_normal * 0.5);\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n // We store these in the least significant bit of a_pos_normal\n mediump vec2 normal = a_pos_normal - 2.0 * pos;\n normal.y = normal.y * 2.0 - 1.0;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_width2 = vec2(outset, inset);\n}\n",_0x560e74=(_0x29ee41=!0,function(e,t){var i=_0x29ee41?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x29ee41=!1,i}),_0x26229f=_0x560e74(void 0,(function(){return _0x26229f.toString().search("(((.+)+)+)+$").toString().constructor(_0x26229f).search("(((.+)+)+)+$")})),_0x29ee41;_0x26229f();var _0x3e7561="\nuniform lowp float u_device_pixel_ratio;\nuniform sampler2D u_image;\n\nvarying vec2 v_width2;\nvarying vec2 v_normal;\nvarying float v_gamma_scale;\nvarying highp float v_lineprogress;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / u_device_pixel_ratio) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n // For gradient lines, v_lineprogress is the ratio along the entire line,\n // scaled to [0, 2^15), and the gradient ramp is stored in a texture.\n vec4 color = texture2D(u_image, vec2(v_lineprogress, 0.5));\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x2fb30f=(_0x2b07e5=!0,function(e,t){var i=_0x2b07e5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2b07e5=!1,i}),_0x14a1ac=_0x2fb30f(void 0,(function(){return _0x14a1ac.toString().search("(((.+)+)+)+$").toString().constructor(_0x14a1ac).search("(((.+)+)+)+$")})),_0x2b07e5;_0x14a1ac();var _0x5efb20="\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\n#ifdef WEBGPU\n attribute ivec2 a_pos_normal;\n attribute uvec4 a_data;\n#else\n attribute vec2 a_pos_normal;\n attribute vec4 a_data;\n#endif\n\nuniform mat4 u_matrix;\nuniform vec2 u_units_to_pixels;\nuniform mediump float u_ratio;\nuniform lowp float u_device_pixel_ratio;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\nvoid main() {\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize mediump float width\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n // the distance over which the line edge fades out.\n // Retina devices need a smaller distance to avoid aliasing.\n float ANTIALIASING = 1.0 / u_device_pixel_ratio / 2.0;\n\n vec2 a_extrude = vec2(a_data.xy) - 128.0;\n float a_direction = mod(float(a_data.z), 4.0) - 1.0;\n float a_linesofar = (floor(float(a_data.z) / 4.0) + float(a_data.w) * 64.0) * LINE_DISTANCE_SCALE;\n // float tileRatio = u_scale.y;\n vec2 pos = floor(vec2(a_pos_normal) * 0.5);\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n // We store these in the least significant bit of a_pos_normal\n mediump vec2 normal = vec2(a_pos_normal) - 2.0 * pos;\n normal.y = normal.y * 2.0 - 1.0;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_linesofar = a_linesofar;\n v_width2 = vec2(outset, inset);\n}\n",_0x981030=(_0x32b8b0=!0,function(e,t){var i=_0x32b8b0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x32b8b0=!1,i}),_0x3880d6=_0x981030(void 0,(function(){return _0x3880d6.toString().search("(((.+)+)+)+$").toString().constructor(_0x3880d6).search("(((.+)+)+)+$")})),_0x32b8b0;_0x3880d6();var _0x1016cb="\nuniform lowp float u_device_pixel_ratio;\nuniform vec2 u_texsize;\nuniform float u_fade;\nuniform mediump vec4 u_scale;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n float pixelRatio = u_scale.x;\n float tileZoomRatio = u_scale.y;\n float fromScale = u_scale.z;\n float toScale = u_scale.w;\n\n vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio);\n vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio);\n\n vec2 pattern_size_a = vec2(display_size_a.x * fromScale / tileZoomRatio, display_size_a.y);\n vec2 pattern_size_b = vec2(display_size_b.x * toScale / tileZoomRatio, display_size_b.y);\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / u_device_pixel_ratio) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n float x_a = mod(v_linesofar / pattern_size_a.x, 1.0);\n float x_b = mod(v_linesofar / pattern_size_b.x, 1.0);\n\n // v_normal.y is 0 at the midpoint of the line, -1 at the lower edge, 1 at the upper edge\n // we clamp the line width outset to be between 0 and half the pattern height plus padding (2.0)\n // to ensure we don't sample outside the designated symbol on the sprite sheet.\n // 0.5 is added to shift the component to be bounded between 0 and 1 for interpolation of\n // the texture coordinate\n float y_a = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (pattern_size_a.y + 2.0) / 2.0) / pattern_size_a.y);\n float y_b = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (pattern_size_b.y + 2.0) / 2.0) / pattern_size_b.y);\n vec2 pos_a = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, vec2(x_a, y_a));\n vec2 pos_b = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, vec2(x_b, y_b));\n\n vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\n\n gl_FragColor = color * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x4fdcd2=(_0xd4ca45=!0,function(e,t){var i=_0xd4ca45?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd4ca45=!1,i}),_0x31733d=_0x4fdcd2(void 0,(function(){return _0x31733d.toString().search("(((.+)+)+)+$").toString().constructor(_0x31733d).search("(((.+)+)+)+$")})),_0xd4ca45;_0x31733d();var _0x4079c7="\nconst float PI = 3.141592653589793;\n\n#ifdef WEBGPU\nattribute ivec4 a_pos_offset;\nattribute uvec4 a_data;\nattribute ivec4 a_pixeloffset;\n#else\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec4 a_pixeloffset;\n#endif\nattribute vec3 a_projected_pos;\n//attribute float a_fade_opacity;\n\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\nuniform highp float u_camera_to_center_distance;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform float u_fade_change;\n\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_coord_matrix;\n\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\n\nuniform vec2 u_texsize;\nuniform float u_depthRange;\n\nvarying vec2 v_tex;\nvarying float v_fade_opacity;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n vec2 a_pos = vec2(a_pos_offset.xy);\n vec2 a_offset = vec2(a_pos_offset.zw);\n\n vec2 a_tex = vec2(a_data.xy);\n vec2 a_size = vec2(a_data.zw);\n\n float a_size_min = floor(a_size[0] * 0.5);\n vec2 a_pxoffset = vec2(a_pixeloffset.xy);\n vec2 a_minFontScale = vec2(a_pixeloffset.zw) / 256.0;\n\n highp float segment_angle = -a_projected_pos[2];\n float size;\n\n if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = mix(a_size_min, a_size[1], u_size_t) / 128.0;\n } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = a_size_min / 128.0;\n } else {\n size = u_size;\n }\n\n vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n // See comments in symbol_sdf.vertex\n highp float distance_ratio = u_pitch_with_map ?\n camera_to_anchor_distance / u_camera_to_center_distance :\n u_camera_to_center_distance / camera_to_anchor_distance;\n highp float perspective_ratio = clamp(\n 0.5 + 0.5 * distance_ratio,\n 0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n 4.0);\n\n size *= perspective_ratio;\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n highp float symbol_rotation = 0.0;\n if (u_rotate_symbol) {\n // See comments in symbol_sdf.vertex\n vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n vec2 a = projectedPoint.xy / projectedPoint.w;\n vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n }\n\n highp float angle_sin = sin(segment_angle + symbol_rotation);\n highp float angle_cos = cos(segment_angle + symbol_rotation);\n mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n //gl_Position = u_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * max(a_minFontScale, fontScale) + a_pxoffset / 16.0), 0.0, 1.0);\n gl_Position = u_matrix * vec4(a_projected_pos.xy + rotation_matrix * (a_offset / 32.0 * u_size + a_pxoffset), u_depthRange, 1.0);\n\n v_tex = a_tex / u_texsize;\n // vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n // float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\n // v_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n v_fade_opacity = 1.0;\n}\n",_0x4bb25f=(_0x28b307=!0,function(e,t){var i=_0x28b307?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x28b307=!1,i}),_0xc00700=_0x4bb25f(void 0,(function(){return _0xc00700.toString().search("(((.+)+)+)+$").toString().constructor(_0xc00700).search("(((.+)+)+)+$")})),_0x28b307;_0xc00700();var _0x57d0b8="\nuniform sampler2D u_texture;\n\nvarying vec2 v_tex;\nvarying float v_fade_opacity;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n //lowp float alpha = opacity * v_fade_opacity;\n gl_FragColor = texture2D(u_texture, vec2(v_tex.x, 1.0 - v_tex.y)) * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x1cadb5=(_0x37e6d3=!0,function(e,t){var i=_0x37e6d3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x37e6d3=!1,i}),_0xe1aa42=_0x1cadb5(void 0,(function(){return _0xe1aa42.toString().search("(((.+)+)+)+$").toString().constructor(_0xe1aa42).search("(((.+)+)+)+$")})),_0x37e6d3;_0xe1aa42();var _0x5ebbda="\nconst float PI = 3.141592653589793;\n\n#ifdef WEBGPU\nattribute ivec4 a_pos_offset;\nattribute uvec4 a_data;\nattribute ivec4 a_pixeloffset;\n#else\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec4 a_pixeloffset;\n#endif\nattribute vec3 a_projected_pos;\n//attribute float a_fade_opacity;\n\n// contents of a_size vary based on the type of property value\n// used for {text,icon}-size.\n// For constants, a_size is disabled.\n// For source functions, we bind only one value per vertex: the value of {text,icon}-size evaluated for the current feature.\n// For composite functions:\n// [ text-size(lowerZoomStop, feature),\n// text-size(upperZoomStop, feature) ]\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_coord_matrix;\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform highp float u_camera_to_center_distance;\nuniform float u_fade_change;\nuniform vec2 u_texsize;\nuniform float u_depthRange;\n\nvarying vec2 v_data0;\nvarying vec3 v_data1;\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n vec2 a_pos = vec2(a_pos_offset.xy);\n vec2 a_offset = vec2(a_pos_offset.zw);\n\n vec2 a_tex = vec2(a_data.xy);\n vec2 a_size = vec2(a_data.zw);\n\n float a_size_min = floor(a_size[0] * 0.5);\n vec2 a_pxoffset = vec2(a_pixeloffset.xy);\n\n highp float segment_angle = -a_projected_pos[2];\n float size;\n\n if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = mix(a_size_min, a_size[1], u_size_t) / 128.0;\n } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = a_size_min / 128.0;\n } else {\n size = u_size;\n }\n\n vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n // If the label is pitched with the map, layout is done in pitched space,\n // which makes labels in the distance smaller relative to viewport space.\n // We counteract part of that effect by multiplying by the perspective ratio.\n // If the label isn't pitched with the map, we do layout in viewport space,\n // which makes labels in the distance larger relative to the features around\n // them. We counteract part of that effect by dividing by the perspective ratio.\n highp float distance_ratio = u_pitch_with_map ?\n camera_to_anchor_distance / u_camera_to_center_distance :\n u_camera_to_center_distance / camera_to_anchor_distance;\n highp float perspective_ratio = clamp(\n 0.5 + 0.5 * distance_ratio,\n 0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n 4.0);\n\n size *= perspective_ratio;\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n highp float symbol_rotation = 0.0;\n if (u_rotate_symbol) {\n // Point labels with 'rotation-alignment: map' are horizontal with respect to tile units\n // To figure out that angle in projected space, we draw a short horizontal line in tile\n // space, project it, and measure its angle in projected space.\n vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n vec2 a = projectedPoint.xy / projectedPoint.w;\n vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n }\n highp float angle_sin = sin(segment_angle + symbol_rotation);\n highp float angle_cos = cos(segment_angle + symbol_rotation);\n mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n //vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n //gl_Position = u_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale + a_pxoffset), 0.0, 1.0);\n gl_Position = u_matrix * vec4(a_projected_pos.xy + rotation_matrix * (a_offset / 32.0 * u_size + a_pxoffset), u_depthRange, 1.0);\n float gamma_scale = gl_Position.w;\n\n //vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n //float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\n //float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n\n v_data0 = a_tex / u_texsize;\n v_data1 = vec3(gamma_scale, size, 1.0);\n}\n",_0x485e96=(_0x2c0cd4=!0,function(e,t){var i=_0x2c0cd4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c0cd4=!1,i}),_0x1f7d9d=_0x485e96(void 0,(function(){return _0x1f7d9d.toString().search("(((.+)+)+)+$").toString().constructor(_0x1f7d9d).search("(((.+)+)+)+$")})),_0x2c0cd4;_0x1f7d9d();var _0x16ca9f="\n#define SDF_PX 8.0\n\nuniform bool u_is_halo;\nuniform sampler2D u_texture;\nuniform highp float u_gamma_scale;\nuniform lowp float u_device_pixel_ratio;\nuniform bool u_is_text;\n\nvarying vec2 v_data0;\nvarying vec3 v_data1;\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n float EDGE_GAMMA = 0.105 / u_device_pixel_ratio;\n\n vec2 tex = v_data0.xy;\n float gamma_scale = v_data1.x;\n float size = v_data1.y;\n float fade_opacity = v_data1[2];\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n lowp vec4 color = fill_color;\n highp float gamma = EDGE_GAMMA / (fontScale * u_gamma_scale);\n lowp float buff = (256.0 - 64.0) / 256.0;\n if (u_is_halo) {\n color = halo_color;\n gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale);\n buff = (6.0 - halo_width / fontScale) / SDF_PX;\n }\n\n#ifdef WEBGPU\n float dist = texture2D(u_texture, tex).r;\n#else\n float dist = texture2D(u_texture, tex).a;\n#endif\n highp float gamma_scaled = gamma * gamma_scale;\n highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);\n\n //gl_FragColor = color * (alpha * opacity * fade_opacity);\n gl_FragColor = color * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x46116d=(_0x454656=!0,function(e,t){var i=_0x454656?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x454656=!1,i}),_0x12d64e=_0x46116d(void 0,(function(){return _0x12d64e.toString().search("(((.+)+)+)+$").toString().constructor(_0x12d64e).search("(((.+)+)+)+$")})),_0x454656;_0x12d64e();var _0x1e7e29="\nconst float PI = 3.141592653589793;\n\n#ifdef WEBGPU\nattribute ivec4 a_pos_offset;\nattribute uvec4 a_data;\n#else\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\n#endif\n\nattribute vec3 a_projected_pos;\n//attribute float a_fade_opacity;\n\n// contents of a_size vary based on the type of property value\n// used for {text,icon}-size.\n// For constants, a_size is disabled.\n// For source functions, we bind only one value per vertex: the value of {text,icon}-size evaluated for the current feature.\n// For composite functions:\n// [ text-size(lowerZoomStop, feature),\n// text-size(upperZoomStop, feature) ]\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_coord_matrix;\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform highp float u_camera_to_center_distance;\nuniform float u_fade_change;\nuniform vec2 u_texsize;\nuniform vec2 u_texsize_icon;\nuniform float u_depthRange;\n\nvarying vec4 v_data0;\nvarying vec4 v_data1;\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n vec2 a_pos = vec2(a_pos_offset.xy);\n vec2 a_offset = vec2(a_pos_offset.zw);\n\n vec2 a_tex = vec2(a_data.xy);\n vec2 a_size = vec2(a_data.zw);\n\n float a_size_min = floor(a_size[0] * 0.5);\n float is_sdf = a_size[0] - 2.0 * a_size_min;\n\n highp float segment_angle = -a_projected_pos[2];\n float size;\n\n if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = mix(a_size_min, a_size[1], u_size_t) / 128.0;\n } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = a_size_min / 128.0;\n } else {\n size = u_size;\n }\n\n vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n // If the label is pitched with the map, layout is done in pitched space,\n // which makes labels in the distance smaller relative to viewport space.\n // We counteract part of that effect by multiplying by the perspective ratio.\n // If the label isn't pitched with the map, we do layout in viewport space,\n // which makes labels in the distance larger relative to the features around\n // them. We counteract part of that effect by dividing by the perspective ratio.\n highp float distance_ratio = u_pitch_with_map ?\n camera_to_anchor_distance / u_camera_to_center_distance :\n u_camera_to_center_distance / camera_to_anchor_distance;\n highp float perspective_ratio = clamp(\n 0.5 + 0.5 * distance_ratio,\n 0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n 4.0);\n\n size *= perspective_ratio;\n\n float fontScale = size / 24.0;\n\n highp float symbol_rotation = 0.0;\n if (u_rotate_symbol) {\n // Point labels with 'rotation-alignment: map' are horizontal with respect to tile units\n // To figure out that angle in projected space, we draw a short horizontal line in tile\n // space, project it, and measure its angle in projected space.\n vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n vec2 a = projectedPoint.xy / projectedPoint.w;\n vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n }\n\n highp float angle_sin = sin(segment_angle + symbol_rotation);\n highp float angle_cos = cos(segment_angle + symbol_rotation);\n mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n //gl_Position = u_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale), 0.0, 1.0);\n gl_Position = u_matrix * vec4(a_projected_pos.xy + rotation_matrix * (a_offset / 32.0 * u_size + a_pxoffset), u_depthRange, 1.0);\n float gamma_scale = gl_Position.w;\n\n // vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n // float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\n // float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n\n v_data0.xy = a_tex / u_texsize;\n v_data0.zw = a_tex / u_texsize_icon;\n //v_data1 = vec4(gamma_scale, size, interpolated_fade_opacity, is_sdf);\n v_data1 = vec4(gamma_scale, size, 1.0, is_sdf); \n}\n",_0x335d52=(_0x3d6f03=!0,function(e,t){var i=_0x3d6f03?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3d6f03=!1,i}),_0x45f2b0=_0x335d52(void 0,(function(){return _0x45f2b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x45f2b0).search("(((.+)+)+)+$")})),_0x3d6f03;_0x45f2b0();var _0x27dfee="\n#define SDF_PX 8.0\n\n#define SDF 1.0\n#define ICON 0.0\n\nuniform bool u_is_halo;\nuniform sampler2D u_texture;\nuniform sampler2D u_texture_icon;\nuniform highp float u_gamma_scale;\nuniform lowp float u_device_pixel_ratio;\n\nvarying vec4 v_data0;\nvarying vec4 v_data1;\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n// float fade_opacity = v_data1[2];\n\n// if (v_data1.w == ICON) {\n// vec2 tex_icon = v_data0.zw;\n// lowp float alpha = opacity * fade_opacity;\n// gl_FragColor = texture2D(u_texture_icon, tex_icon) * alpha;\n\n// #ifdef OVERDRAW_INSPECTOR\n// gl_FragColor = vec4(1.0);\n// #endif\n// return;\n// }\n\n// vec2 tex = v_data0.xy;\n\n// float EDGE_GAMMA = 0.105 / u_device_pixel_ratio;\n\n// float gamma_scale = v_data1.x;\n// float size = v_data1.y;\n\n// float fontScale = size / 24.0;\n\n// lowp vec4 color = fill_color;\n// highp float gamma = EDGE_GAMMA / (fontScale * u_gamma_scale);\n// lowp float buff = (256.0 - 64.0) / 256.0;\n// if (u_is_halo) {\n// color = halo_color;\n// gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale);\n// buff = (6.0 - halo_width / fontScale) / SDF_PX;\n// }\n\n// lowp float dist = texture2D(u_texture, tex).a;\n// highp float gamma_scaled = gamma * gamma_scale;\n// highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);\n\n// gl_FragColor = color * (alpha * opacity * fade_opacity);\n\n gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x3c92c3=(_0x4e8f6b=!0,function(e,t){var i=_0x4e8f6b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e8f6b=!1,i}),_0x3ffc3e=_0x3c92c3(void 0,(function(){return _0x3ffc3e.toString().search("(((.+)+)+)+$").toString().constructor(_0x3ffc3e).search("(((.+)+)+)+$")})),_0x4e8f6b;_0x3ffc3e();var _0x5a944c="\n#ifdef GL_ES\nprecision highp float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n\n// Unpack a pair of values that have been packed into a single float.\n// The packed values are assumed to be 8-bit unsigned integers, and are\n// packed like so:\n// packedValue = floor(input[0]) * 256 + input[1],\nvec2 unpack_float(const float packedValue) {\n int packedIntValue = int(packedValue);\n int v0 = packedIntValue / 256;\n return vec2(v0, packedIntValue - v0 * 256);\n}\n\nvec2 unpack_opacity(const float packedOpacity) {\n int intOpacity = int(packedOpacity) / 2;\n return vec2(float(intOpacity) / 127.0, mod(packedOpacity, 2.0));\n}\n\n// To minimize the number of attributes needed, we encode a 4-component\n// color into a pair of floats (i.e. a vec2) as follows:\n// [ floor(color.r * 255) * 256 + color.g * 255,\n// floor(color.b * 255) * 256 + color.g * 255 ]\nvec4 decode_color(const vec2 encodedColor) {\n return vec4(\n unpack_float(encodedColor[0]) / 255.0,\n unpack_float(encodedColor[1]) / 255.0\n );\n}\n\n// Unpack a pair of paint values and interpolate between them.\nfloat unpack_mix_vec2(const vec2 packedValue, const float t) {\n return mix(packedValue[0], packedValue[1], t);\n}\n\n// Unpack a pair of paint values and interpolate between them.\nvec4 unpack_mix_color(const vec4 packedColors, const float t) {\n vec4 minColor = decode_color(vec2(packedColors[0], packedColors[1]));\n vec4 maxColor = decode_color(vec2(packedColors[2], packedColors[3]));\n return mix(minColor, maxColor, t);\n}\n\n// The offset depends on how many pixels are between the world origin and the edge of the tile:\n// vec2 offset = mod(pixel_coord, size)\n//\n// At high zoom levels there are a ton of pixels between the world origin and the edge of the tile.\n// The glsl spec only guarantees 16 bits of precision for highp floats. We need more than that.\n//\n// The pixel_coord is passed in as two 16 bit values:\n// pixel_coord_upper = floor(pixel_coord / 2^16)\n// pixel_coord_lower = mod(pixel_coord, 2^16)\n//\n// The offset is calculated in a series of steps that should preserve this precision:\nvec2 get_pattern_pos(const vec2 pixel_coord_upper, const vec2 pixel_coord_lower,\n const vec2 pattern_size, const float tile_units_to_pixels, const vec2 pos) {\n\n vec2 offset = mod(mod(mod(pixel_coord_upper, pattern_size) * 256.0, pattern_size) * 256.0 + pixel_coord_lower, pattern_size);\n return (tile_units_to_pixels * pos + offset) / pattern_size;\n}\n",_0x11e667=(_0x3cd934=!0,function(e,t){var i=_0x3cd934?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3cd934=!1,i}),_0x26464c=_0x11e667(void 0,(function(){return _0x26464c.toString().search("(((.+)+)+)+$").toString().constructor(_0x26464c).search("(((.+)+)+)+$")})),_0x3cd934;_0x26464c();var _0x43450f="\n#ifdef GL_ES\nprecision mediump float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n",_0x4a9ecc=(_0x1de1d4=!0,function(e,t){var i=_0x1de1d4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1de1d4=!1,i}),_0xcab7ee=_0x4a9ecc(void 0,(function(){return _0xcab7ee.toString().search("(((.+)+)+)+$").toString().constructor(_0xcab7ee).search("(((.+)+)+)+$")})),_0x1de1d4;_0xcab7ee();var _0x319b00="\nuniform mat4 u_matrix;\nuniform vec2 u_tl_parent;\nuniform float u_scale_parent;\nuniform float u_buffer_scale;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n // We are using Int16 for texture position coordinates to give us enough precision for\n // fractional coordinates. We use 8192 to scale the texture coordinates in the buffer\n // as an arbitrarily high number to preserve adequate precision when rendering.\n // This is also the same value as the EXTENT we are using for our tile buffer pos coordinates,\n // so math for modifying either is consistent.\n v_pos0 = (((a_texture_pos / 8192.0) - 0.5) / u_buffer_scale ) + 0.5;\n v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\n}\n",_0x5171b8=(_0x2ed6cd=!0,function(e,t){var i=_0x2ed6cd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2ed6cd=!1,i}),_0x2b7364=_0x5171b8(void 0,(function(){return _0x2b7364.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b7364).search("(((.+)+)+)+$")})),_0x2ed6cd;_0x2b7364();var _0x119b42="\nuniform float u_fade_t;\nuniform float u_opacity;\nuniform sampler2D u_image0;\nuniform sampler2D u_image1;\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nuniform float u_brightness_low;\nuniform float u_brightness_high;\n\nuniform float u_saturation_factor;\nuniform float u_contrast_factor;\nuniform vec3 u_spin_weights;\n\nvoid main() {\n\n // read and cross-fade colors from the main and parent tiles\n vec4 color0 = texture2D(u_image0, v_pos0);\n vec4 color1 = texture2D(u_image1, v_pos1);\n if (color0.a > 0.0) {\n color0.rgb = color0.rgb / color0.a;\n }\n if (color1.a > 0.0) {\n color1.rgb = color1.rgb / color1.a;\n }\n vec4 color = mix(color0, color1, u_fade_t);\n color.a *= u_opacity;\n vec3 rgb = color.rgb;\n\n // spin\n rgb = vec3(\n dot(rgb, u_spin_weights.xyz),\n dot(rgb, u_spin_weights.zxy),\n dot(rgb, u_spin_weights.yzx));\n\n // saturation\n float average = (color.r + color.g + color.b) / 3.0;\n rgb += (average - rgb) * u_saturation_factor;\n\n // contrast\n rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\n\n // brightness\n vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\n vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\n\n gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb) * color.a, color.a);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0xc8ae12=(_0x30f76b=!0,function(e,t){var i=_0x30f76b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x30f76b=!1,i}),_0x3fe8da=_0xc8ae12(void 0,(function(){return _0x3fe8da.toString().search("(((.+)+)+)+$").toString().constructor(_0x3fe8da).search("(((.+)+)+)+$")})),_0x30f76b;_0x3fe8da(),_0xb04b18([{name:"a_pos",type:"Int16",components:2}]);var _0x3bb866=_0x7320f3(_0x43450f,_0x5a944c),_0x1a9942=_0x7320f3(_0x4fb264,_0x2a9fc7),_0x2abf60=_0x7320f3(_0x4a1dd4,_0x82d99c),_0x461d82=_0x7320f3(_0x4e4007,_0x166912),_0x16f2b0=_0x7320f3(_0x199f48,_0x3da897),_0x5021e2=_0x7320f3(_0x5473c1,_0x4edec8),_0xcefe9a=_0x7320f3(_0x397562,_0x50d1a8),_0xb7cde7=_0x7320f3(_0x36da0b,_0x428940),_0xe0901a=_0x7320f3(_0x5a0370,_0x350692),_0x161a5b=_0x7320f3(_0x44ba17,_0x1f79eb),_0x5e93a9=_0x7320f3(_0x2e0df2,_0x306834),_0x21d24a=_0x7320f3(_0x3200e1,_0x29518c),_0x45749c=_0x7320f3(_0x1cea35,_0x57b9af),_0x21d800=_0x7320f3(_0x47290d,_0x1e0b03),_0x439574=_0x7320f3(_0x6dac2b,_0x4c6208),_0x3ca223=_0x7320f3(_0x1577dc,_0x456d2c),_0x2021e2=_0x7320f3(_0x7f7806,_0x58f853),_0x23530c=_0x7320f3(_0x25a933,_0x36aa59),_0x216189=_0x7320f3(_0x5852c6,_0x53fd41),_0xaf2915=_0x7320f3(_0x3e7561,_0x55c092),_0x16ad14=_0x7320f3(_0x1016cb,_0x5efb20),_0x18331c=_0x7320f3(_0x4f2fd0,_0x4bbcd8),_0x4a611b=_0x7320f3(_0x119b42,_0x319b00),_0xa0f866=_0x7320f3(_0x57d0b8,_0x4079c7),_0x54110a=_0x7320f3(_0x16ca9f,_0x5ebbda),_0x59a1a7=_0x7320f3(_0x27dfee,_0x1e7e29);function _0x7320f3(e,t){var i=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n={};return{fragmentSource:e=e.replace(i,(function(e,t,i,r,o){return n[o]=!0,"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nvarying "+i+" "+r+" "+o+";\n#else\nuniform "+i+" "+r+" u_"+o+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+o+"\n "+i+" "+r+" "+o+" = u_"+o+";\n#endif\n"})),vertexSource:t=t.replace(i,(function(e,t,i,r,o){var a="float"===r?"vec2":"vec4",s=o.match(/color/)?"color":a;return n[o]?"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float u_"+o+"_t;\nattribute "+i+" "+a+" a_"+o+";\nvarying "+i+" "+r+" "+o+";\n#else\nuniform "+i+" "+r+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = a_"+o+";\n#else\n "+i+" "+r+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = unpack_mix_"+s+"(a_"+o+", u_"+o+"_t);\n#else\n "+i+" "+r+" "+o+" = u_"+o+";\n#endif\n":"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float u_"+o+"_t;\nattribute "+i+" "+a+" a_"+o+";\n#else\nuniform "+i+" "+r+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+i+" "+r+" "+o+" = a_"+o+";\n#else\n "+i+" "+r+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+i+" "+r+" "+o+" = unpack_mix_"+s+"(a_"+o+", u_"+o+"_t);\n#else\n "+i+" "+r+" "+o+" = u_"+o+";\n#endif\n"}))}}var _0x376566=Object.freeze({__proto__:null,prelude:_0x3bb866,background:_0x1a9942,backgroundPattern:_0x2abf60,circle:_0x461d82,clippingMask:_0x16f2b0,heatmap:_0x5021e2,heatmapTexture:_0xcefe9a,collisionBox:_0xb7cde7,collisionCircle:_0xe0901a,debug:_0x161a5b,fill:_0x5e93a9,fillOutline:_0x21d24a,fillOutlinePattern:_0x45749c,fillPattern:_0x21d800,fillExtrusion:_0x439574,fillExtrusionPattern:_0x3ca223,hillshadePrepare:_0x2021e2,hillshade:_0x23530c,line:_0x216189,lineGradient:_0xaf2915,linePattern:_0x16ad14,lineSDF:_0x18331c,raster:_0x4a611b,symbolIcon:_0xa0f866,symbolSDF:_0x54110a,symbolTextAndIcon:_0x59a1a7}),_0x565c42=(_0x228449=!0,function(e,t){var i=_0x228449?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x228449=!1,i}),_0x2f8a0b=_0x565c42(void 0,(function(){return _0x2f8a0b.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f8a0b).search("(((.+)+)+)+$")})),_0x228449;_0x2f8a0b();var _0x5cad88=(_0x585ac5=!0,function(e,t){var i=_0x585ac5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x585ac5=!1,i}),_0x2c4b4b=_0x5cad88(void 0,(function(){return _0x2c4b4b.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c4b4b).search("(((.+)+)+)+$")})),_0x585ac5;_0x2c4b4b();var _0x3006c1={clippingMaskUniforms:function(e,t){return{u_matrix:new _0x2724d0.UniformMatrix4f(e,t.u_matrix)}},clippingMaskUniformValues:function(e){return{u_matrix:e}}},_0x4db481=(_0x4fd453=!0,function(e,t){var i=_0x4fd453?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4fd453=!1,i}),_0x34c235=_0x4db481(void 0,(function(){return _0x34c235.toString().search("(((.+)+)+)+$").toString().constructor(_0x34c235).search("(((.+)+)+)+$")})),_0x4fd453;_0x34c235();var _0x4d33dd={backgroundUniforms:function(e,t){return{u_matrix:new _0x2724d0.UniformMatrix4f(e,t.u_matrix),u_opacity:new _0x2724d0.Uniform1f(e,t.u_opacity),u_color:new _0x2724d0.UniformColor(e,t.u_color)}},backgroundPatternUniforms:function(e,t){return{u_matrix:new _0x2724d0.UniformMatrix4f(e,t.u_matrix),u_opacity:new _0x2724d0.Uniform1f(e,t.u_opacity),u_image:new _0x2724d0.Uniform1i(e,t.u_image),u_pattern_tl_a:new _0x2724d0.Uniform2f(e,t.u_pattern_tl_a),u_pattern_br_a:new _0x2724d0.Uniform2f(e,t.u_pattern_br_a),u_pattern_tl_b:new _0x2724d0.Uniform2f(e,t.u_pattern_tl_b),u_pattern_br_b:new _0x2724d0.Uniform2f(e,t.u_pattern_br_b),u_texsize:new _0x2724d0.Uniform2f(e,t.u_texsize),u_mix:new _0x2724d0.Uniform1f(e,t.u_mix),u_pattern_size_a:new _0x2724d0.Uniform2f(e,t.u_pattern_size_a),u_pattern_size_b:new _0x2724d0.Uniform2f(e,t.u_pattern_size_b),u_scale_a:new _0x2724d0.Uniform1f(e,t.u_scale_a),u_scale_b:new _0x2724d0.Uniform1f(e,t.u_scale_b),u_pixel_coord_upper:new _0x2724d0.Uniform2f(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new _0x2724d0.Uniform2f(e,t.u_pixel_coord_lower),u_tile_units_to_pixels:new _0x2724d0.Uniform1f(e,t.u_tile_units_to_pixels)}},backgroundUniformValues:function(e,t,i){return{u_matrix:e,u_opacity:t,u_color:i}},backgroundPatternUniformValues:function(e,t,i,n,r,o){return extend$1(bgPatternUniformValues(n,o,i,r),{u_matrix:e,u_opacity:t})}},_0x39e1d3=(_0xd543d5=!0,function(e,t){var i=_0xd543d5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd543d5=!1,i}),_0x154476=_0x39e1d3(void 0,(function(){return _0x154476.toString().search("(((.+)+)+)+$").toString().constructor(_0x154476).search("(((.+)+)+)+$")})),_0xd543d5;_0x154476(),_0x2636a7.fillUniforms,_0x2636a7.fillPatternUniforms,_0x2636a7.fillOutlineUniforms,_0x2636a7.fillOutlinePatternUniforms,_0x158ab2.circleUniforms,_0x3006c1.clippingMaskUniforms,_0x3295b6.lineUniforms,_0x3295b6.lineGradientUniforms,_0x3295b6.linePatternUniforms,_0x3295b6.lineSDFUniforms,_0x256b9a.symbolIconUniforms,_0x256b9a.symbolSDFUniforms,_0x256b9a.symbolTextAndIconUniforms,_0x4d33dd.backgroundUniforms,_0x4d33dd.backgroundPatternUniforms;var _0x581a52=(_0x231b60=!0,function(e,t){var i=_0x231b60?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x231b60=!1,i}),_0x8e515a=_0x581a52(void 0,(function(){return _0x8e515a.toString().search("(((.+)+)+)+$").toString().constructor(_0x8e515a).search("(((.+)+)+)+$")})),_0x231b60;_0x8e515a();var _0x109cfa=0,_0x5dfd42=1,_0x100dea=771,_0x55f9b8=function(e,t,i){this.blendFunction=e,this.blendColor=t,this.mask=i};_0x55f9b8.Replace=[_0x5dfd42,_0x109cfa],_0x55f9b8.disabled=new _0x55f9b8(_0x55f9b8.Replace,_0x5b501e.transparent,[!1,!1,!1,!1]),_0x55f9b8.unblended=new _0x55f9b8(_0x55f9b8.Replace,_0x5b501e.transparent,[!0,!0,!0,!0]),_0x55f9b8.alphaBlended=new _0x55f9b8([_0x5dfd42,_0x100dea],_0x5b501e.transparent,[!0,!0,!0,!0]);var _0x103b25=(_0x5dcd41=!0,function(e,t){var i=_0x5dcd41?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5dcd41=!1,i}),_0x323841=_0x103b25(void 0,(function(){return _0x323841.toString().search("(((.+)+)+)+$").toString().constructor(_0x323841).search("(((.+)+)+)+$")})),_0x5dcd41;_0x323841();var _0x4532a7=function(e,t,i){this.context=e;var n=e.gl;this.buffer=n.createBuffer(),this.dynamicDraw=Boolean(i),this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),n.bufferData(n.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),!this.dynamicDraw&&delete t.arrayBuffer};_0x4532a7.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},_0x4532a7.prototype.updateData=function(e){var t=this.context.gl;this.context.unbindVAO(),this.bind(),t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)},_0x4532a7.prototype.destroy=function(){var e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)};var _0x13707f=(_0x4d762d=!0,function(e,t){var i=_0x4d762d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4d762d=!1,i}),_0xde920=_0x13707f(void 0,(function(){return _0xde920.toString().search("(((.+)+)+)+$").toString().constructor(_0xde920).search("(((.+)+)+)+$")})),_0x4d762d;_0xde920();var _0x2cb44e={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},_0x2bf57d=function(e,t,i,n){this.length=t.length,this.attributes=i,this.itemSize=t.bytesPerElement,this.dynamicDraw=n,this.context=e;var r=e.gl;this.buffer=r.createBuffer(),e.bindVertexBuffer.set(this.buffer),r.bufferData(r.ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?r.DYNAMIC_DRAW:r.STATIC_DRAW),!this.dynamicDraw&&delete t.arrayBuffer};_0x2bf57d.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},_0x2bf57d.prototype.updateData=function(e){var t=this.context.gl;this.bind(),t.bufferSubData(t.ARRAY_BUFFER,0,e.arrayBuffer)},_0x2bf57d.prototype.enableAttributes=function(e,t){for(var i=0;i<this.attributes.length;i++){var n=this.attributes[i],r=t.attributes[n.name];void 0!==r&&e.enableVertexAttribArray(r)}},_0x2bf57d.prototype.setVertexAttribPointers=function(e,t,i){for(var n=0;n<this.attributes.length;n++){var r=this.attributes[n],o=t.attributes[r.name];void 0!==o&&e.vertexAttribPointer(o,r.components,e[_0x2cb44e[r.type]],!1,this.itemSize,r.offset+this.itemSize*(i||0))}},_0x2bf57d.prototype.destroy=function(){var e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)};var _0x51bcca=function(e){this.gl=e.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};_0x51bcca.prototype.get=function(){return this.current},_0x51bcca.prototype.set=function(e){},_0x51bcca.prototype.getDefault=function(){return this.default},_0x51bcca.prototype.setDefault=function(){this.set(this.default)};var _0x24a0c7={};_0x24a0c7.ClearColor=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return _0x5b501e.transparent},t.prototype.set=function(e){this.current,this.gl.clearColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1},t}(_0x51bcca),_0x24a0c7.ClearDepth=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 1},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.clearDepth(e),this.current=e,this.dirty=!1)},t}(_0x51bcca),_0x24a0c7.ClearStencil=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 0},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.clearStencil(e),this.current=e,this.dirty=!1)},t}(_0x51bcca),_0x24a0c7.ColorMask=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return[!0,!0,!0,!0]},t.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.colorMask(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)},t}(_0x51bcca),_0x24a0c7.DepthMask=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!0},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.depthMask(e),this.current=e,this.dirty=!1)},t}(_0x51bcca),_0x24a0c7.StencilMask=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 255},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.stencilMask(e),this.current=e,this.dirty=!1)},t}(_0x51bcca),_0x24a0c7.StencilFunc=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return{func:de$x.ALWAYS,ref:0,mask:255}},t.prototype.set=function(e){var t=this.current;(e.func!==t.func||e.ref!==t.ref||e.mask!==t.mask||this.dirty)&&(this.gl.stencilFunc(e.func,e.ref,e.mask),this.current=e,this.dirty=!1)},t}(_0x51bcca),_0x24a0c7.StencilOp=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return this.gl,[de$x.KEEP,de$x.KEEP,de$x.KEEP]},t.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||this.dirty)&&(this.gl.stencilOp(e[0],e[1],e[2]),this.current=e,this.dirty=!1)},t}(_0x51bcca),_0x24a0c7.StencilTest=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;e?t.enable(de$x.STENCIL_TEST):t.disable(de$x.STENCIL_TEST),this.current=e,this.dirty=!1}},t}(_0x51bcca),_0x24a0c7.DepthRange=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return[0,1]},t.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.depthRange(e[0],e[1]),this.current=e,this.dirty=!1)},t}(_0x51bcca),_0x24a0c7.DepthTest=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;e?t.enable(de$x.DEPTH_TEST):t.disable(de$x.DEPTH_TEST),this.current=e,this.dirty=!1}},t}(_0x51bcca),_0x24a0c7.DepthFunc=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return de$x.LESS},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.depthFunc(e),this.current=e,this.dirty=!1)},t}(_0x51bcca),_0x24a0c7.Blend=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;e?t.enable(de$x.BLEND):t.disable(de$x.BLEND),this.current=e,this.dirty=!1}},t}(_0x51bcca),_0x24a0c7.BlendFunc=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return[de$x.ONE,de$x.ZERO]},t.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.blendFunc(e[0],e[1]),this.current=e,this.dirty=!1)},t}(_0x51bcca),_0x24a0c7.BlendColor=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return _0x5b501e.transparent},t.prototype.set=function(e){var t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.blendColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)},t}(_0x51bcca),_0x24a0c7.BlendEquation=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(){e.apply(this,arguments)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getDefault=function(){return de$x.FUNC_ADD},r.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.blendEquation(e),this.current=e,this.dirty=!1)},r}(_0x51bcca),_0x24a0c7.CullFace=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;e?t.enable(de$x.CULL_FACE):t.disable(de$x.CULL_FACE),this.current=e,this.dirty=!1}},t}(_0x51bcca),_0x24a0c7.CullFaceSide=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return de$x.BACK},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.cullFace(e),this.current=e,this.dirty=!1)},t}(_0x51bcca),_0x24a0c7.FrontFace=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return de$x.CCW},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.frontFace(e),this.current=e,this.dirty=!1)},t}(_0x51bcca),_0x24a0c7.Program=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.useProgram(e),this.current=e,this.dirty=!1)},t}(_0x51bcca),_0x24a0c7.ActiveTextureUnit=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return de$x.TEXTURE0},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.activeTexture(e),this.current=e,this.dirty=!1)},t}(_0x51bcca),_0x24a0c7.Viewport=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return[0,0,1,1]},t.prototype.set=function(e){this.current,this.gl.viewport(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1},t}(_0x51bcca),_0x24a0c7.BindFramebuffer=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,e),this.current=e,this.dirty=!1}},t}(_0x51bcca),_0x24a0c7.BindRenderbuffer=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.bindRenderbuffer(t.RENDERBUFFER,e),this.current=e,this.dirty=!1}},t}(_0x51bcca),_0x24a0c7.BindTexture=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.bindTexture(t.TEXTURE_2D,e),this.current=e,this.dirty=!1}},t}(_0x51bcca),_0x24a0c7.BindVertexBuffer=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.bindBuffer(t.ARRAY_BUFFER,e),this.current=e,this.dirty=!1}},t}(_0x51bcca),_0x24a0c7.BindElementBuffer=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){var t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e),this.current=e,this.dirty=!1},t}(_0x51bcca),_0x24a0c7.BindVertexArrayOES=function(e){function t(t){e.call(this,t),this.vao=t.extVertexArrayObject}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){this.vao&&(e!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(e),this.current=e,this.dirty=!1)},t}(_0x51bcca),_0x24a0c7.BindVertexArray=function(e){function t(t){e.call(this,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.bindVertexArray(e),this.current=e,this.dirty=!1)},t}(_0x51bcca),_0x24a0c7.PixelStoreUnpack=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 4},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.pixelStorei(t.UNPACK_ALIGNMENT,e),this.current=e,this.dirty=!1}},t}(_0x51bcca),_0x24a0c7.PixelStoreUnpackPremultiplyAlpha=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e),this.current=e,this.dirty=!1}},t}(_0x51bcca),_0x24a0c7.PixelStoreUnpackFlipY=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e),this.current=e,this.dirty=!1}},t}(_0x51bcca),_0x24a0c7.FramebufferAttachment=function(e){function t(t,i){e.call(this,t),this.context=t,this.parent=i}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t}(_0x51bcca),_0x24a0c7.ColorAttachment=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setDirty=function(){this.dirty=!0},t.prototype.set=function(e){if(e!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var t=this.gl;t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e,0),this.current=e,this.dirty=!1}},t}(_0x24a0c7.FramebufferAttachment),_0x24a0c7.DepthAttachment=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){if(e!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var t=this.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e),this.current=e,this.dirty=!1}},t}(_0x24a0c7.FramebufferAttachment);var _0x2fbf2d=(_0x5df531=!0,function(e,t){var i=_0x5df531?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5df531=!1,i}),_0x10ab39=_0x2fbf2d(void 0,(function(){return _0x10ab39.toString().search("(((.+)+)+)+$").toString().constructor(_0x10ab39).search("(((.+)+)+)+$")})),_0x5df531;_0x10ab39();var _0x479392=function(e){var t=e._gl;this.webgl2=e.webgl2,this.gl=t,this.clearColor=new _0x24a0c7.ClearColor(this),this.clearDepth=new _0x24a0c7.ClearDepth(this),this.clearStencil=new _0x24a0c7.ClearStencil(this),this.colorMask=new _0x24a0c7.ColorMask(this),this.depthMask=new _0x24a0c7.DepthMask(this),this.stencilMask=new _0x24a0c7.StencilMask(this),this.stencilFunc=new _0x24a0c7.StencilFunc(this),this.stencilOp=new _0x24a0c7.StencilOp(this),this.stencilTest=new _0x24a0c7.StencilTest(this),this.depthRange=new _0x24a0c7.DepthRange(this),this.depthTest=new _0x24a0c7.DepthTest(this),this.depthFunc=new _0x24a0c7.DepthFunc(this),this.blend=new _0x24a0c7.Blend(this),this.blendFunc=new _0x24a0c7.BlendFunc(this),this.blendColor=new _0x24a0c7.BlendColor(this),this.blendEquation=new _0x24a0c7.BlendEquation(this),this.cullFace=new _0x24a0c7.CullFace(this),this.cullFaceSide=new _0x24a0c7.CullFaceSide(this),this.frontFace=new _0x24a0c7.FrontFace(this),this.program=new _0x24a0c7.Program(this),this.activeTexture=new _0x24a0c7.ActiveTextureUnit(this),this.viewport=new _0x24a0c7.Viewport(this),this.bindFramebuffer=new _0x24a0c7.BindFramebuffer(this),this.bindRenderbuffer=new _0x24a0c7.BindRenderbuffer(this),this.bindTexture=new _0x24a0c7.BindTexture(this),this.bindVertexBuffer=new _0x24a0c7.BindVertexBuffer(this),this.bindElementBuffer=new _0x24a0c7.BindElementBuffer(this),this.webgl2?this.bindVertexArray=new _0x24a0c7.BindVertexArray(this):this.bindVertexArray=this.extVertexArrayObject&&new _0x24a0c7.BindVertexArrayOES(this),this.pixelStoreUnpack=new _0x24a0c7.PixelStoreUnpack(this),this.pixelStoreUnpackPremultiplyAlpha=new _0x24a0c7.PixelStoreUnpackPremultiplyAlpha(this),this.pixelStoreUnpackFlipY=new _0x24a0c7.PixelStoreUnpackFlipY(this),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTimerQuery=!1};function _0x40a6d3(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(!_0x40a6d3(e[i],t[i]))return!1;return!0}if("object"==typeof e&&null!==e&&null!==t){if("object"!=typeof t)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!_0x40a6d3(e[n],t[n]))return!1;return!0}return e===t}function r$M(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this.color=e.color,this.depth=e.depth,this.stencil=e.stencil,this.renderState=e.renderState,this.framebuffer=e.framebuffer,this.owner=e.owner,this.pass=e.pass}function A$11(e,t){var i=/#define OUTPUT_DECLARATION/,n=e.split("\n");if(/#version 300 es/g.test(e))return e;var r,o,a=-1;for(r=0;r<n.length;++r)if(o=n[r],i.test(o)){a=r;break}if(-1===a)throw new t$_("Could not find a #define OUTPUT_DECLARATION!");var s=[];for(r=0;r<10;r++){var l="gl_FragData\\["+r+"\\]",u="czm_out"+r;new RegExp(l,"g").test(e)&&(C$Y(u,s),g$Q(l,u,n),n.splice(a,0,"layout(location = "+r+") out vec4 "+u+";"),a+=1)}var c="czm_fragColor";b$1f("gl_FragColor",n)&&(C$Y(c,s),g$Q("gl_FragColor",c,n),n.splice(a,0,"layout(location = 0) out vec4 czm_fragColor;"),a+=1);var h=P$Q(s,n),d={};for(r=0;r<n.length;r++)for(var f in o=n[r],h)if(h.hasOwnProperty(f)){new RegExp("(layout)[^]+(out)[^]+("+f+")[^]+","g").test(o)&&(d[o]=f)}for(var p in d)if(d.hasOwnProperty(p)){var _,m=d[p],$=n.indexOf(p),g=h[m],y=g.length;for(_=0;_<y;_++)n.splice($,0,g[_]);for($+=y+1,_=y-1;_>=0;_--)n.splice($,0,"#endif //"+g[_])}var v="#version 300 es",x=!1;for(r=0;r<n.length;r++)/#version/.test(n[r])&&(n[r]=v,x=!0);return x||n.splice(0,0,v),$$W("EXT_draw_buffers",n),$$W("EXT_frag_depth",n),g$Q("texture2D","texture",n),g$Q("texture3D","texture",n),g$Q("textureCube","texture",n),g$Q("gl_FragDepthEXT","gl_FragDepth",n),t?g$Q("varying","in",n):(g$Q("attribute","in",n),g$Q("varying","out",n)),z$P(n)}function g$Q(e,t,i){for(var n=new RegExp("(^|[^\\w])("+e+")($|[^\\w])","g"),r=i.length,o=0;o<r;++o){var a=i[o];i[o]=a.replace(n,"$1"+t+"$3")}}function F$13(e,t,i){for(var n=i.length,r=0;r<n;++r){var o=i[r];i[r]=o.replace(e,t)}}function b$1f(e,t){for(var i=new RegExp("(^|[^\\w])("+e+")($|[^\\w])","g"),n=t.length,r=0;r<n;++r){var o=t[r];if(i.test(o))return!0}return!1}function z$P(e){for(var t="",i=e.length,n=0;n<i;++n)t+=e[n]+"\n";return t}function C$Y(e,t){-1===t.indexOf(e)&&t.push(e)}function P$Q(e,t){for(var i={},n=e.length,r=[],o=0;o<t.length;++o){var a=t[o],s=/(#ifdef|#if)/g.test(a),l=/#else/g.test(a),u=/#endif/g.test(a);if(s)r.push(a);else if(l){var c=r[r.length-1].replace("ifdef","ifndef");/if/g.test(c)&&(c=c.replace(/(#if\s+)(\S*)([^]*)/,"$1!($2)$3")),r.pop(),r.push(c)}else if(u)r.pop();else if(!/layout/g.test(a))for(var h=0;h<n;++h){var d=e[h];-1!==a.indexOf(d)&&(t$$(i[d])?i[d]=i[d].filter((function(e){return r.indexOf(e)>=0})):i[d]=r.slice())}}return i}function $$W(e,t){F$13(new RegExp("#extension\\s+GL_"+e+"\\s+:\\s+[a-zA-Z0-9]+\\s*$","g"),"",t)}_0x479392.prototype.setDefault=function(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()},_0x479392.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray&&(this.bindVertexArray.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},_0x479392.prototype.createIndexBuffer=function(e,t){return new _0x4532a7(this,e,t)},_0x479392.prototype.createVertexBuffer=function(e,t,i){return new _0x2bf57d(this,e,t,i)},_0x479392.prototype.createRenderbuffer=function(e,t,i){var n=this.gl,r=n.createRenderbuffer();return this.bindRenderbuffer.set(r),n.renderbufferStorage(n.RENDERBUFFER,e,t,i),this.bindRenderbuffer.set(null),r},_0x479392.prototype.createFramebuffer=function(e,t){return new Framebuffer(this,e,t)},_0x479392.prototype.clear=function(e){var t=e.color,i=e.depth,n=this.gl,r=0;t&&(r|=n.COLOR_BUFFER_BIT,this.clearColor.set(t),this.colorMask.set([!0,!0,!0,!0])),void 0!==i&&(r|=n.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(i),this.depthMask.set(!0)),n.clear(r)},_0x479392.prototype.setCullFace=function(e){!1===e.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(e.mode),this.frontFace.set(e.frontFace))},_0x479392.prototype.setDepthMode=function(e){e.func!==this.gl.ALWAYS||e.mask?(this.depthTest.set(!0),this.depthFunc.set(e.func),this.depthMask.set(e.mask),this.depthRange.set(e.range)):this.depthTest.set(!1)},_0x479392.prototype.setStencilMode=function(e){e.test.func!==this.gl.ALWAYS||e.mask?(this.stencilTest.set(!0),this.stencilMask.set(e.mask),this.stencilOp.set([e.fail,e.depthFail,e.pass]),this.stencilFunc.set({func:e.test.func,ref:e.ref,mask:e.test.mask})):this.stencilTest.set(!1)},_0x479392.prototype.setColorMode=function(e){_0x40a6d3(e.blendFunction,_0x55f9b8.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)},_0x479392.prototype.unbindVAO=function(){this.bindVertexArray&&this.bindVertexArray.set(null)},r$M.ALL=Object.freeze(new r$M({color:new e$1z(0,0,0,0),depth:1,stencil:0})),r$M.prototype.execute=function(e,t){e.clear(this,t)};var c$V=new a$11;function n$10(e){this._size=e.size,this._datatype=e.datatype,this.getValue=e.getValue}var i$10={};i$10[de$x.FLOAT]="float",i$10[de$x.FLOAT_VEC2]="vec2",i$10[de$x.FLOAT_VEC3]="vec3",i$10[de$x.FLOAT_VEC4]="vec4",i$10[de$x.INT]="int",i$10[de$x.INT_VEC2]="ivec2",i$10[de$x.INT_VEC3]="ivec3",i$10[de$x.INT_VEC4]="ivec4",i$10[de$x.BOOL]="bool",i$10[de$x.BOOL_VEC2]="bvec2",i$10[de$x.BOOL_VEC3]="bvec3",i$10[de$x.BOOL_VEC4]="bvec4",i$10[de$x.FLOAT_MAT2]="mat2",i$10[de$x.FLOAT_MAT3]="mat3",i$10[de$x.FLOAT_MAT4]="mat4",i$10[de$x.SAMPLER_2D]="sampler2D",i$10[de$x.SAMPLER_CUBE]="samplerCube",n$10.prototype.getDeclaration=function(e){var t="uniform "+i$10[this._datatype]+" "+e,i=this._size;return t+=1===i?";":"["+i.toString()+"];"};var s$1c={czm_viewport:new n$10({size:1,datatype:de$x.FLOAT_VEC4,getValue:function(e){return e.viewportCartesian4}}),czm_viewportOrthographic:new n$10({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.viewportOrthographic}}),czm_viewportTransformation:new n$10({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.viewportTransformation}}),czm_globeDepthTexture:new n$10({size:1,datatype:de$x.SAMPLER_2D,getValue:function(e){return e.globeDepthTexture}}),czm_model:new n$10({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.model}}),czm_inverseModel:new n$10({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.inverseModel}}),czm_view:new n$10({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.view}}),czm_view3D:new n$10({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.view3D}}),czm_viewRotation:new n$10({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.viewRotation}}),czm_viewRotation3D:new n$10({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.viewRotation3D}}),czm_inverseView:new n$10({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.inverseView}}),czm_inverseView3D:new n$10({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.inverseView3D}}),czm_inverseViewRotation:new n$10({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation}}),czm_inverseViewRotation3D:new n$10({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation3D}}),czm_projection:new n$10({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.projection}}),czm_inverseProjection:new n$10({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.inverseProjection}}),czm_infiniteProjection:new n$10({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.infiniteProjection}}),czm_modelView:new n$10({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.modelView}}),czm_modelView3D:new n$10({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.modelView3D}}),czm_modelViewRelativeToEye:new n$10({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.modelViewRelativeToEye}}),czm_inverseModelView:new n$10({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.inverseModelView}}),czm_inverseModelView3D:new n$10({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.inverseModelView3D}}),czm_viewProjection:new n$10({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.viewProjection}}),czm_inverseViewProjection:new n$10({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.inverseViewProjection}}),czm_modelViewProjection:new n$10({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.modelViewProjection}}),czm_inverseModelViewProjection:new n$10({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.inverseModelViewProjection}}),czm_modelViewProjectionRelativeToEye:new n$10({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.modelViewProjectionRelativeToEye}}),czm_modelViewInfiniteProjection:new n$10({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.modelViewInfiniteProjection}}),czm_orthographicIn3D:new n$10({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.orthographicIn3D?1:0}}),czm_normal:new n$10({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.normal}}),czm_normal3D:new n$10({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.normal3D}}),czm_inverseNormal:new n$10({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.inverseNormal}}),czm_inverseNormal3D:new n$10({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.inverseNormal3D}}),czm_eyeHeight2D:new n$10({size:1,datatype:de$x.FLOAT_VEC2,getValue:function(e){return e.eyeHeight2D}}),czm_entireFrustum:new n$10({size:1,datatype:de$x.FLOAT_VEC2,getValue:function(e){return e.entireFrustum}}),czm_currentFrustum:new n$10({size:1,datatype:de$x.FLOAT_VEC2,getValue:function(e){return e.currentFrustum}}),czm_frustumPlanes:new n$10({size:1,datatype:de$x.FLOAT_VEC4,getValue:function(e){return e.frustumPlanes}}),czm_farDepthFromNearPlusOne:new n$10({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.farDepthFromNearPlusOne}}),czm_log2FarDepthFromNearPlusOne:new n$10({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.log2FarDepthFromNearPlusOne}}),czm_oneOverLog2FarDepthFromNearPlusOne:new n$10({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.oneOverLog2FarDepthFromNearPlusOne}}),czm_sunPositionWC:new n$10({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.sunPositionWC}}),czm_sunPositionColumbusView:new n$10({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.sunPositionColumbusView}}),czm_sunDirectionEC:new n$10({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.sunDirectionEC}}),czm_sunDirectionWC:new n$10({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.sunDirectionWC}}),czm_moonDirectionEC:new n$10({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.moonDirectionEC}}),czm_lightDirectionEC:new n$10({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.lightDirectionEC}}),czm_lightDirectionWC:new n$10({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.lightDirectionWC}}),czm_lightColor:new n$10({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.lightColor}}),czm_lightColorHdr:new n$10({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.lightColorHdr}}),czm_encodedCameraPositionMCHigh:new n$10({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCHigh}}),czm_encodedCameraPositionMCLow:new n$10({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCLow}}),czm_cameraPositionWC:new n$10({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e._cameraPosition}}),czm_viewerPositionWC:new n$10({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return c$1a.getTranslation(e.inverseView,c$V)}}),czm_frameNumber:new n$10({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.frameState.frameNumber}}),czm_morphTime:new n$10({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.frameState.morphTime}}),czm_sceneMode:new n$10({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.frameState.mode}}),czm_pass:new n$10({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.pass}}),czm_backgroundColor:new n$10({size:1,datatype:de$x.FLOAT_VEC4,getValue:function(e){return e.backgroundColor}}),czm_brdfLut:new n$10({size:1,datatype:de$x.SAMPLER_2D,getValue:function(e){return e.brdfLut}}),czm_environmentMap:new n$10({size:1,datatype:de$x.SAMPLER_CUBE,getValue:function(e){return e.environmentMap}}),czm_specularEnvironmentMaps:new n$10({size:1,datatype:de$x.SAMPLER_2D,getValue:function(e){return e.specularEnvironmentMaps}}),czm_specularEnvironmentMapSize:new n$10({size:1,datatype:de$x.FLOAT_VEC2,getValue:function(e){return e.specularEnvironmentMapsDimensions}}),czm_specularEnvironmentMapsMaximumLOD:new n$10({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.specularEnvironmentMapsMaximumLOD}}),czm_sphericalHarmonicCoefficients:new n$10({size:9,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.sphericalHarmonicCoefficients}}),czm_temeToPseudoFixed:new n$10({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.temeToPseudoFixedMatrix}}),czm_pixelRatio:new n$10({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.pixelRatio}}),czm_resolutionScale:new n$10({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.resolutionScale}}),czm_fogDensity:new n$10({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.fogDensity}}),czm_imagerySplitPosition:new n$10({size:1,datatype:de$x.FLOAT_VEC2,getValue:function(e){return e.imagerySplitPosition}}),czm_globeSplitPosition:new n$10({size:1,datatype:de$x.FLOAT_VEC2,getValue:function(e){return e.globeSplitPosition}}),czm_geometricToleranceOverMeter:new n$10({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.geometricToleranceOverMeter}}),czm_minimumDisableDepthTestDistance:new n$10({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.minimumDisableDepthTestDistance}}),czm_invertClassificationColor:new n$10({size:1,datatype:de$x.FLOAT_VEC4,getValue:function(e){return e.invertClassificationColor}}),czm_gamma:new n$10({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.gamma}}),czm_sunColor:new n$10({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.sunColor}}),czm_globeDepthTextureDim:new n$10({size:1,datatype:de$x.FLOAT_VEC2,getValue:function(e){return e.globeDepthTextureDim}}),czm_nonSelDepthTexture:new n$10({size:1,datatype:de$x.SAMPLER_2D,getValue:function(e){return e.nonSelDepthTexture}}),czm_maskTexture:new n$10({size:1,datatype:de$x.SAMPLER_2D,getValue:function(e){return e.maskTexture}}),czm_hdrEnvMap:new n$10({size:1,datatype:de$x.SAMPLER_2D,getValue:function(e){return e.hdrEnvMap}}),czm_toneMappingExposure:new n$10({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.toneMappingExposure}})};function p$18(e){}function T$Y(e){return!(e.indexOf("defined",0)>=0||e.indexOf("#if ",0)>=0||e.indexOf("#elif ",0)>=0)}function F$12(e,t,i){var n=e.indexOf("\n",i+t+1),r=i+t+1;return e.substring(r,n)}function v$Y(e){this.ifIndex=t$$(e.ifIndex)?e.ifIndex:void 0,this.elseIndex=t$$(e.elseIndex)?e.elseIndex:void 0,this.endIndex=t$$(e.endIndex)?e.endIndex:void 0,this.ifChildTokens=[],this.elseChildTokens=[],this.parentToken=t$$(e.parentToken)?e.parentToken:void 0,this.type=t$$(e.type)?e.type:void 0}function x$13(e,t){this.Key=e,this.String=t,this.StringLength=t.length}p$18.removeUnuseMacroCode=function(e,t,i){if(!T$Y(i))return i;var n=[];return S$N(e,t,k$Z(i),i,n),C$X(i,n)},v$Y.prototype.addChildToken=function(e){t$$(this.elseIndex)?this.elseChildTokens.push(e):this.ifChildTokens.push(e)},x$13.isEqual=function(e,t){return e.Key===t.Key};var a$P={TK_IFDEF:new x$13(0,"#ifdef"),TK_IFNEF:new x$13(1,"#ifndef"),TK_ELSE:new x$13(2,"#else"),TK_END:new x$13(3,"#endif")};function y$_(e,t){var i=-1,n=a$P.TK_IFDEF;for(var r in a$P){var o=a$P[r],a=e.indexOf(o.String,t);(-1===i||a>=0&&a<i)&&(i=a,n=o)}return{type:n,findIndex:i}}function k$Z(e){for(var t=[],i=0,n=0,r=void 0;-1!==i;){var o=y$_(e,n);if(n=(i=o.findIndex)+o.type.StringLength,-1===i)break;switch(o.type.Key){case a$P.TK_IFDEF.Key:case a$P.TK_IFNEF.Key:var a=new v$Y({type:o.type,ifIndex:i});t$$(r)?t$$(r.endIndex)?(t$$(r.parentToken)||t.push(a),r=a):(r.addChildToken(a),a.parentToken=r,r=a):(r=a,t.push(a));break;case a$P.TK_ELSE.Key:if(!t$$(r))continue;r.elseIndex=i;break;case a$P.TK_END.Key:if(!t$$(r))continue;r.endIndex=i,t$$(r.parentToken)&&(r=r.parentToken)}}return t}function E$$(e,t,i){return!(!x$13.isEqual(i,a$P.TK_IFDEF)||!t$$(e[t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")]))||!(!x$13.isEqual(i,a$P.TK_IFNEF)||t$$(e[t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")]))}function u$X(e,t,i,n){var r=0,o=F$12(i,e.type.StringLength,e.ifIndex);if(E$$(t,o,e.type)){t$$(e.elseIndex)&&(r=e.elseIndex+a$P.TK_ELSE.StringLength+1,n.push({startIndex:r,endIndex:e.endIndex}));for(var a=0;a<e.ifChildTokens.length;a++)u$X(e.ifChildTokens[a],t,i,n)}else{t$$(e.elseIndex)?n.push({startIndex:e.ifIndex+e.type.StringLength+K$R(i,e.ifIndex,e.type.String)+o.length,endIndex:e.elseIndex}):n.push({startIndex:e.ifIndex,endIndex:e.endIndex+a$P.TK_END.StringLength});for(a=0;a<e.elseChildTokens.length;a++)u$X(e.elseChildTokens[a],t,i,n)}}function K$R(e,t,i){for(var n=i.length,r=t+n;r<e.length;r++){if(" "!==e.charAt(r))break}return r-(t+n)}function _$12(e,t,i){var n=t.defines,r={};if(t$$(n))for(var o=0;o<n.length;++o){r[n[o]]=1}if(t$$(e._sysShaderDefines))for(o=0;o<e._sysShaderDefines.length;++o){r[e._sysShaderDefines[o]]=1}for(var a=0,s=0;-1!==a&&-1!==(a=i.indexOf("#define ",s));){var l=a+8,u=i.indexOf("\n",a);r[i.substring(l,u).trim()]=1,s=u}return r}function S$N(e,t,i,n,r){if(0!==i.length)for(var o=_$12(e,t,n),a=0;a<i.length;a++){u$X(i[a],o,n,r)}}function C$X(e,t){for(var i=e,n=0;n<t.length;n++){var r=t[n];if(r.endIndex-r.startIndex>1){var o=e.substring(r.startIndex,r.endIndex);i=i.replace(o,"")}}return i=i.replace(/(#ifdef|#ifndef|#else|#endif).*/gm,"")}var czm_degreesPerRadian="const float czm_degreesPerRadian = 57.29577951308232;\n",czm_depthRange="const czm_depthRangeStruct czm_depthRange = czm_depthRangeStruct(0.0, 1.0);\n",czm_ellipsoidInverseRadii="const vec3 czm_ellipsoidInverseRadii = vec3(1.0 / 6378137.0, 1.0 / 6378137.0, 1.0 / 6356752.314245);\n",czm_ellipsoidRadii="const vec3 czm_ellipsoidRadii = vec3(6378137.0, 6378137.0, 6356752.314245);\n",czm_epsilon1="const float czm_epsilon1 = 0.1;\n",czm_epsilon2="const float czm_epsilon2 = 0.01;\n",czm_epsilon3="const float czm_epsilon3 = 0.001;\n",czm_epsilon4="const float czm_epsilon4 = 0.0001;\n",czm_epsilon5="const float czm_epsilon5 = 0.00001;\n",czm_epsilon6="const float czm_epsilon6 = 0.000001;\n",czm_epsilon7="const float czm_epsilon7 = 0.0000001;\n",czm_infinity="const float czm_infinity = 5906376272000.0;\n",czm_oneOverPi="const float czm_oneOverPi = 0.3183098861837907;\n",czm_oneOverTwoPi="const float czm_oneOverTwoPi = 0.15915494309189535;\n",czm_passCesium3DTile="const float czm_passCesium3DTile = 4.0;\n",czm_passCesium3DTileClassification="const float czm_passCesium3DTileClassification = 5.0;\n",czm_passCesium3DTileClassificationIgnoreShow="const float czm_passCesium3DTileClassificationIgnoreShow = 6.0;\n",czm_passClassification="const float czm_passClassification = 7.0;\n",czm_passCompute="const float czm_passCompute = 1.0;\n",czm_passEnvironment="const float czm_passEnvironment = 0.0;\n",czm_passGlobe="const float czm_passGlobe = 2.0;\n",czm_passGround="const float czm_passGround = 4.0;\n",czm_passOpaque="const float czm_passOpaque = 12.0;\n",czm_passOverlay="const float czm_passOverlay = 20.0;\n",czm_passTerrainClassification="const float czm_passTerrainClassification = 3.0;\n",czm_passTranslucent="const float czm_passTranslucent = 18.0;\n",czm_pi="const float czm_pi = 3.141592653589793;\n",czm_piOverFour="const float czm_piOverFour = 0.7853981633974483;\n",czm_piOverSix="const float czm_piOverSix = 0.5235987755982988;\n",czm_piOverThree="const float czm_piOverThree = 1.0471975511965976;\n",czm_piOverTwo="const float czm_piOverTwo = 1.5707963267948966;\n",czm_radiansPerDegree="const float czm_radiansPerDegree = 0.017453292519943295;\n",czm_sceneMode2D="const float czm_sceneMode2D = 2.0;\n",czm_sceneMode3D="const float czm_sceneMode3D = 3.0;\n",czm_sceneModeColumbusView="const float czm_sceneModeColumbusView = 1.0;\n",czm_sceneModeMorphing="const float czm_sceneModeMorphing = 0.0;\n",czm_solarRadius="const float czm_solarRadius = 695500000.0;\n",czm_threePiOver2="const float czm_threePiOver2 = 4.71238898038469;\n",czm_twoPi="const float czm_twoPi = 6.283185307179586;\n",czm_webMercatorMaxLatitude="const float czm_webMercatorMaxLatitude = 1.4844222297453324;\n",czm_depthRangeStruct="struct czm_depthRangeStruct\n{\nfloat near;\nfloat far;\n};\n",czm_ellipsoid="struct czm_ellipsoid\n{\nvec3 center;\nvec3 radii;\nvec3 inverseRadii;\nvec3 inverseRadiiSquared;\n};\n",czm_material="struct czm_material\n{\nvec3 diffuse;\nfloat specular;\nfloat shininess;\nvec3 normal;\nvec3 emission;\nfloat alpha;\n};\n",czm_materialInput="struct czm_materialInput\n{\nfloat s;\nvec2 st;\nvec3 str;\nvec3 normalEC;\nmat3 tangentToEyeMatrix;\nvec3 positionToEyeEC;\nfloat height;\nfloat slope;\n};\n",czm_ray="struct czm_ray\n{\nvec3 origin;\nvec3 direction;\n};\n",czm_raySegment="struct czm_raySegment\n{\nfloat start;\nfloat stop;\n};\nconst czm_raySegment czm_emptyRaySegment = czm_raySegment(-czm_infinity, -czm_infinity);\nconst czm_raySegment czm_fullRaySegment = czm_raySegment(0.0, czm_infinity);\n",czm_s3mMaterialInput="struct czm_s3mMaterialInput\n{\nvec4 ambientColor;\nvec4 diffuseColor;\nvec4 ambientLightColor;\nvec4 sunLightColor;\nmat4 texMatrix;\nfloat texture0Width;\nfloat texture1Width;\nvec3 sunDirectionEC;\nfloat sunLightON;\n};\n",czm_shadowParameters="struct czm_shadowParameters\n{\n#ifdef USE_CUBE_MAP_SHADOW\nvec3 texCoords;\n#else\nvec2 texCoords;\n#endif\nfloat depthBias;\nfloat depth;\nfloat nDotL;\nvec2 texelStepSize;\nfloat normalShadingSmooth;\nfloat darkness;\n};\n",czm_acesTonemapping="vec3 czm_acesTonemapping(vec3 color) {\nfloat g = 0.985;\nfloat a = 0.065;\nfloat b = 0.0001;\nfloat c = 0.433;\nfloat d = 0.238;\ncolor = (color * (color + a) - b) / (color * (g * color + c) + d);\ncolor = clamp(color, 0.0, 1.0);\nreturn color;\n}\n",czm_adjustColor="uniform float uBrightness;\nuniform float uContrast;\nuniform float uHue;\nuniform float uSaturation;\nuniform float uOneOverGamma;\nvec3 czm_adjustColor(vec3 inputColor)\n{\nvec3 outputColor = inputColor;\noutputColor.rgb = mix(vec3(0.0), outputColor.rgb, uBrightness);\noutputColor.rgb = mix(vec3(0.5), outputColor.rgb, uContrast);\noutputColor.rgb = czm_hue(outputColor.rgb, uHue);\noutputColor.rgb = clamp(outputColor.rgb, 0.0, 1.0);\noutputColor.rgb = czm_saturation(outputColor.rgb, uSaturation);\noutputColor.rgb = pow(outputColor.rgb, vec3(uOneOverGamma));\nreturn outputColor;\n}\n",czm_alphaWeight="float czm_alphaWeight(float a)\n{\nfloat z = (gl_FragCoord.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\nreturn pow(a + 0.01, 4.0) + max(1e-2, min(3.0 * 1e3, 0.003 / (1e-5 + pow(abs(z) / 200.0, 4.0))));\n}\n",czm_antialias="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",czm_approximateSphericalCoordinates="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",czm_branchFreeTernary="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",czm_cascadeColor="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",czm_cascadeDistance="uniform vec4 shadowMap_cascadeDistances;\nfloat czm_cascadeDistance(vec4 weights)\n{\nreturn dot(shadowMap_cascadeDistances, weights);\n}\n",czm_cascadeMatrix="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",czm_cascadeWeights="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",czm_clip="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform float clip_mode;\nuniform vec4 clip_planes[6];\nuniform vec4 clip_line_color;\nconst float clip_lineWidth = 3.0;\nfloat GetClipDistance(vec3 pos, vec3 planeNormal, float disToOrigin)\n{\nreturn dot(planeNormal, pos) + disToOrigin;\n}\nfloat ClipBehindAllPlane(float fBorderWidth, vec4 clip_vertex)\n{\nfloat distance = 0.0;\nfloat result = -1.0;\n#ifdef CLIPPLANE\ndistance = GetClipDistance(clip_vertex.xyz, clip_planes[0].xyz, clip_planes[0].w);\nif (distance < 0.0)\n{\nreturn 1.0;\n}\nelse if (distance < fBorderWidth)\n{\nresult = 0.0;\n}\n#else\nfor(int i = 0; i < 6; i++)\n{\ndistance = GetClipDistance(clip_vertex.xyz, clip_planes[i].xyz, clip_planes[i].w);\nif(distance < 0.0)\n{\nreturn 1.0;\n}\nelse if(distance < fBorderWidth)\n{\nresult = 0.0;\n}\n}\n#endif\nreturn result;\n}\nfloat ClipBehindAnyPlane(float fBorderWidth, vec4 clip_vertex)\n{\nfloat result = 1.0;\nfor(int i = 0; i < 6; i++)\n{\nfloat distance = GetClipDistance(clip_vertex.xyz, clip_planes[i].xyz, clip_planes[i].w);\nif((distance + fBorderWidth) < 0.0)\n{\nreturn -1.0;\n}\nelse if(distance < 0.0)\n{\nresult = 0.0;\n}\n}\nreturn result;\n}\nfloat ClipAnythingButLine(float fBorderWidth, vec4 clip_vertex)\n{\nfloat result = -1.0;\nfor(int i = 0; i < 6; i++)\n{\nfloat distance = GetClipDistance(clip_vertex.xyz, clip_planes[i].xyz, clip_planes[i].w);\nif(distance < 0.0)\n{\nreturn -1.0;\n}\nelse if(distance < fBorderWidth)\n{\nresult = 0.0;\n}\n}\nreturn result;\n}\nvec4 czm_clip(vec4 clip_vertex, float fIsFiltByID)\n{\nif(fIsFiltByID < 0.1)\n{\nreturn vec4(1.0);\n}\nif(clip_mode < 0.5)\n{\nreturn vec4(1.0);\n}\n#ifdef GL_OES_standard_derivatives\nfloat dxc = abs(dFdx(clip_vertex.x));\nfloat dyc = abs(dFdy(clip_vertex.y));\nfloat fBorderWidth = max(dxc, dyc) * clip_lineWidth;\n#else\nfloat fBorderWidth = clip_lineWidth;\n#endif\nfloat clipResult = 1.0;\nif(clip_line_color.a < 0.01)\n{\nfBorderWidth = 0.0;\n}\nif(clip_mode < 1.5)\n{\nclipResult = ClipBehindAnyPlane(fBorderWidth, clip_vertex);\n}\nelse if(clip_mode < 2.5)\n{\nclipResult = ClipBehindAllPlane(fBorderWidth, clip_vertex);\n}\nelse if(clip_mode < 3.5)\n{\nclipResult = ClipAnythingButLine(fBorderWidth, clip_vertex);\n}\nif(clipResult < -0.5)\n{\ndiscard;\n}\nelse if(clipResult < 0.5)\n{\nreturn clip_line_color;\n}\nelse\n{\nreturn vec4(1.0);\n}\n}\n",czm_columbusViewMorph="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",czm_computeLightColorInFP="vec4 czm_computeLightColorInFP(czm_s3mMaterialInput material, vec3 positionMC, float hasNormal, vec3 normal)\n{\nvec3 normalEC;\nif(hasNormal > 0.9)\n{\nnormalEC = normalize(normal);\n}\nelse\n{\nnormalEC = normalize(czm_normal*czm_computeNormal(positionMC));\n}\nvec3 positionEC = vec3(czm_modelView * vec4(positionMC,1.0)).xyz;\nreturn czm_directionLight(material, normalEC, -positionEC, positionMC);\n}\n",czm_computeLightColorInstanceInFP="vec4 czm_computeLightColorInstanceInFP(czm_s3mMaterialInput material, vec3 positionRotateMC, vec3 positionMC, float hasNormal, vec3 normal)\n{\nvec3 normalEC;\nif(hasNormal > 0.9)\n{\nnormalEC = normalize(normal);\n}\nelse\n{\nnormalEC = normalize(czm_normal*czm_computeNormal(positionRotateMC));\n}\nvec3 positionEC = vec3(czm_modelView * vec4(positionMC,1.0)).xyz;\nreturn czm_directionLight(material, normalEC, -positionEC, positionMC);\n}\n",czm_computeNormal="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nvec3 czm_computeNormal(in vec3 oriVertex)\n{\nvec3 normal = cross(vec3(dFdx(oriVertex.x), dFdx(oriVertex.y), dFdx(oriVertex.z)), vec3(dFdy(oriVertex.x), dFdy(oriVertex.y), dFdy(oriVertex.z)));\nnormal = normalize(normal);\nreturn normal;\n}\n",czm_computePosition="vec4 czm_computePosition();\n",czm_cosineAndSine="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;\nfactor = sense * 6.25e-2;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 6.2418809995957350e-2;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 3.125e-2;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 3.1239833430268277e-2;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.5625e-2;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.5623728620476831e-2;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 7.8125e-3;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 7.8123410601011111e-3;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 3.90625e-3;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 3.9062301319669718e-3;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.953125e-3;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.9531225164788188e-3;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 9.765625e-4;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 9.7656218955931946e-4;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 4.8828125e-4;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 4.8828121119489829e-4;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 2.44140625e-4;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 2.4414062014936177e-4;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.220703125e-4;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.2207031189367021e-4;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 6.103515625e-5;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 6.1035156174208773e-5;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 3.0517578125e-5;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 3.0517578115526096e-5;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.52587890625e-5;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.5258789061315762e-5;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 7.62939453125e-6;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 7.6293945311019700e-6;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 3.814697265625e-6;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 3.8146972656064961e-6;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.9073486328125e-6;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.9073486328101870e-6;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 9.5367431640625e-7;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 9.5367431640596084e-7;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 4.76837158203125e-7;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 4.7683715820308884e-7;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 2.384185791015625e-7;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 2.3841857910155797e-7;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.1920928955078125e-7;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nreturn vector;\n}\nvec2 czm_cosineAndSine(float angle)\n{\nif (angle < -czm_piOverTwo || angle > czm_piOverTwo)\n{\nif (angle < 0.0)\n{\nreturn -cordic(angle + czm_pi);\n}\nelse\n{\nreturn -cordic(angle - czm_pi);\n}\n}\nelse\n{\nreturn cordic(angle);\n}\n}\n",czm_decompressTextureCoordinates="vec2 czm_decompressTextureCoordinates(float encoded)\n{\nfloat temp = encoded / 4096.0;\nfloat xZeroTo4095 = floor(temp);\nfloat stx = xZeroTo4095 / 4095.0;\nfloat sty = (encoded - xZeroTo4095 * 4096.0) / 4095.0;\nreturn vec2(stx, sty);\n}\n",czm_depthClampFarPlane="#ifndef LOG_DEPTH\nvarying float v_WindowZ;\n#endif\nvec4 czm_depthClampFarPlane(vec4 coords)\n{\n#ifndef LOG_DEPTH\nv_WindowZ = (0.5 * (coords.z / coords.w) + 0.5) * coords.w;\ncoords.z = min(coords.z, coords.w);\n#endif\nreturn coords;\n}\n",czm_directionLight="const vec3 SideLightColor = vec3(0.0);\nuniform vec4 uSpecularColor;\nuniform float uShininess;\nconst vec3 specular = vec3(0.066666);\nconst float shininess2 = 30.0;\nfloat saturate( in float a ) { return clamp( a, 0.0, 1.0 ); }\nfloat calcLightAttenuation( float lightDistance, float cutoffDistance, float decayExponent ) {\nif ( decayExponent > 0.0 ) {\nreturn pow( saturate( 1.0 - lightDistance / cutoffDistance ), decayExponent );\n}\nreturn 1.0;\n}\n#if POINT_LIGHTS > 0\nuniform vec3 uPointLightPositionEC[POINT_LIGHTS];\nuniform vec3 uPointLightColor[POINT_LIGHTS];\nuniform vec2 uPointLightDistanceAndDecay[POINT_LIGHTS];\n#endif\n#if SPOT_LIGHTS > 0\nuniform vec3 uSpotLightPosition[ SPOT_LIGHTS ];\nuniform vec3 uSpotLightColor[ SPOT_LIGHTS ];\nuniform vec3 uSpotLightPositionEC[ SPOT_LIGHTS ];\nuniform vec3 uSpotLightDirection[ SPOT_LIGHTS ];\nuniform float uSpotLightExponent[ SPOT_LIGHTS ];\nuniform vec4 uSpotLightDistanceDecayCosPenumbra[ SPOT_LIGHTS ];\n#endif\n#if DIR_LIGHTS > 0\nuniform vec3 uDirectionalLightDirection[ DIR_LIGHTS ];\nuniform vec3 uDirectionalLightColor[ DIR_LIGHTS];\n#endif\n#if HEMISPHERE_LIGHTS > 0\nuniform vec3 uSkyColor[ HEMISPHERE_LIGHTS ];\nuniform vec3 uGroundColor[ HEMISPHERE_LIGHTS];\n#endif\nvec4 czm_directionLight(czm_s3mMaterialInput material, vec3 normalEC, vec3 positionToEyeEC, vec3 positionMC)\n{\nvec3 totalDiffuseLight = vec3(0.0);\nvec3 totalSpecularLight = vec3(0.0);\nfloat sunLightDiffuseWeight = max( dot( normalEC, material.sunDirectionEC ), 0.0 );\nfloat sideLightDiffuseWeight = max( dot( normalEC, vec3(0.0,0.0,1.0) ), 0.0 );\ntotalDiffuseLight = material.sunLightColor.rgb * sunLightDiffuseWeight * material.sunLightON + sideLightDiffuseWeight * SideLightColor;\nvec3 positionToEyeECDir = normalize(positionToEyeEC);\n#if HEMISPHERE_LIGHTS > 0\nfor ( int i = 0; i < HEMISPHERE_LIGHTS; i ++ )\n{\nvec3 dirVectorEC = normalize(czm_normal * vec3(0.0, 0.0, 1.0));\nfloat dotProduct = dot( normalEC, dirVectorEC );\nvec3 skyColor = uSkyColor[i];\nvec3 groundColor = uGroundColor[i];\nfloat hemiDiffuseWeight = 0.5 * dotProduct + 0.5;\nvec3 irradiance = mix( groundColor, skyColor, hemiDiffuseWeight );\nirradiance *= 3.141592653589793;\ntotalDiffuseLight += irradiance;\n}\n#endif\n#if DIR_LIGHTS > 0\nfor ( int i = 0; i < DIR_LIGHTS; i ++ )\n{\nvec3 dirVectorEC = normalize((czm_view * vec4(uDirectionalLightDirection[ i ], 0.0)).xyz);\nfloat dotProduct = dot( normalEC, dirVectorEC );\nfloat dirDiffuseWeight = max( dotProduct, 0.0 );\ntotalDiffuseLight += uDirectionalLightColor[ i ] * dirDiffuseWeight;\n}\n#endif\n#if POINT_LIGHTS > 0\nfor ( int i = 0; i < POINT_LIGHTS; i ++ )\n{\nvec3 lVector = uPointLightPositionEC[i] + positionToEyeEC;\nfloat lengthToLight = length( lVector );\nfloat cutoffDis = uPointLightDistanceAndDecay[i].x;\nif(lengthToLight > cutoffDis)\n{\ncontinue;\n}\nfloat attenuation = calcLightAttenuation( lengthToLight, cutoffDis, uPointLightDistanceAndDecay[i].y);\nlVector = normalize( lVector );\nfloat dotProduct = dot( normalEC, lVector );\nfloat pointLightDiffuse = max( dotProduct, 0.0 );\ntotalDiffuseLight += uPointLightColor[i] * pointLightDiffuse * attenuation;\nvec3 pointHalfVector = normalize( lVector + positionToEyeECDir );\nfloat pointDotNormalHalf = max( dot( normalEC, pointHalfVector ), 0.0 );\nfloat pointSpecularWeight = max( pow( pointDotNormalHalf, shininess2 ), 0.0 );\nfloat specularNormalization = ( shininess2 + 2.0 ) / 8.0;\nvec3 schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVector, pointHalfVector ), 0.0 ), 5.0 );\ntotalSpecularLight += schlick * uPointLightColor[ i ] * pointSpecularWeight * pointLightDiffuse * attenuation * specularNormalization;\n}\n#endif\n#if SPOT_LIGHTS > 0\nvec3 positionWC = (czm_model * vec4(positionMC, 1.0)).xyz;\nfor ( int i = 0; i < SPOT_LIGHTS; i ++ )\n{\nvec3 lVector = uSpotLightPositionEC[i] + positionToEyeEC;\nfloat attenuation = calcLightAttenuation( length( lVector ), uSpotLightDistanceDecayCosPenumbra[i].x, uSpotLightDistanceDecayCosPenumbra[i].y);\nlVector = normalize( lVector );\nfloat spotEffect = dot( uSpotLightDirection[ i ], normalize( uSpotLightPosition[ i ] - positionWC ) );\nif ( spotEffect > uSpotLightDistanceDecayCosPenumbra[i].z ) {\nspotEffect = max( pow( max( spotEffect, 0.0 ), uSpotLightExponent[ i ] ), 0.0 );\nfloat dotProduct = dot( normalEC, lVector );\nfloat spotDiffuseWeight = max( dotProduct, 0.0 );\ntotalDiffuseLight += uSpotLightColor[ i ] * spotDiffuseWeight * attenuation * spotEffect;\nvec3 spotHalfVector = normalize( lVector + positionToEyeECDir );\nfloat spotDotNormalHalf = max( dot( normalEC, spotHalfVector ), 0.0 );\nfloat spotSpecularWeight = max( pow( spotDotNormalHalf, shininess2 ), 0.0 );\nfloat specularNormalization = ( shininess2 + 2.0 ) / 8.0;\nvec3 schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVector, spotHalfVector ), 0.0 ), 5.0 );\ntotalSpecularLight += schlick * uSpotLightColor[ i ] * spotSpecularWeight * spotDiffuseWeight * attenuation * specularNormalization * spotEffect;\n}\n}\n#endif\nvec4 color = vec4(material.diffuseColor.rgb * totalDiffuseLight + material.ambientColor.rgb * material.ambientLightColor.rgb * 0.6 + totalSpecularLight, material.diffuseColor.a);\nreturn color;\n}\n",czm_eastNorthUpToEyeCoordinates="mat3 czm_eastNorthUpToEyeCoordinates(vec3 positionMC, vec3 normalEC)\n{\nvec3 tangentMC = normalize(vec3(-positionMC.y, positionMC.x, 0.0));\nvec3 tangentEC = normalize(czm_normal3D * tangentMC);\nvec3 bitangentEC = normalize(cross(normalEC, tangentEC));\nreturn mat3(\ntangentEC.x, tangentEC.y, tangentEC.z,\nbitangentEC.x, bitangentEC.y, bitangentEC.z,\nnormalEC.x, normalEC.y, normalEC.z);\n}\n",czm_ellipsoidContainsPoint="bool czm_ellipsoidContainsPoint(vec3 ellipsoid_inverseRadii, vec3 point)\n{\nvec3 scaled = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(point, 1.0)).xyz;\nreturn (dot(scaled, scaled) <= 1.0);\n}\n",czm_ellipsoidNew="czm_ellipsoid czm_ellipsoidNew(vec3 center, vec3 radii)\n{\nvec3 inverseRadii = vec3(1.0 / radii.x, 1.0 / radii.y, 1.0 / radii.z);\nvec3 inverseRadiiSquared = inverseRadii * inverseRadii;\nczm_ellipsoid temp = czm_ellipsoid(center, radii, inverseRadii, inverseRadiiSquared);\nreturn temp;\n}\n",czm_ellipsoidWgs84TextureCoordinates="vec2 czm_ellipsoidWgs84TextureCoordinates(vec3 normal)\n{\nreturn vec2(atan(normal.y, normal.x) * czm_oneOverTwoPi + 0.5, asin(normal.z) * czm_oneOverPi + 0.5);\n}\n",czm_equalsEpsilon="bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon) {\nreturn all(lessThanEqual(abs(left - right), vec4(epsilon)));\n}\nbool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon) {\nreturn all(lessThanEqual(abs(left - right), vec3(epsilon)));\n}\nbool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon) {\nreturn all(lessThanEqual(abs(left - right), vec2(epsilon)));\n}\nbool czm_equalsEpsilon(float left, float right, float epsilon) {\nreturn (abs(left - right) <= epsilon);\n}\n",czm_executeExcavation="#ifdef EXCAVATION\nuniform sampler2D uExcavationTexture;\nuniform float uExcavationMode;\nuniform vec4 uExcavationRect;\nvarying vec4 vExcavationVertexPos;\nvec2 CalculateExcavationPolyTexCoord(vec4 vertexPos, vec4 rectPos, out float ptInRect)\n{\nvec2 vecRatio = vec2(rectPos.z - rectPos.x, rectPos.w - rectPos.y);\nvec2 texCoord = vec2(vertexPos.x - rectPos.x, vertexPos.y - rectPos.y);\ntexCoord.x = texCoord.x / vecRatio.x;\ntexCoord.y = texCoord.y / vecRatio.y;\nptInRect = step(0.0, texCoord.x) * step(0.0, texCoord.y) * step(0.0, 1.0 - texCoord.x) * step(0.0, 1.0 - texCoord.y);\ntexCoord = clamp(texCoord, vec2(0.0), vec2(1.0));\nreturn texCoord;\n}\nbool czm_executeExcavation()\n{\nfloat hasExcavation = 1.0;\nvec2 vecExcavationTexCoord = CalculateExcavationPolyTexCoord(vExcavationVertexPos, uExcavationRect, hasExcavation);\nbool excavationInside = (uExcavationMode < 0.5);\nif(hasExcavation < 0.1)\n{\nreturn !excavationInside;\n}\nif(excavationInside)\n{\nreturn texture2D(uExcavationTexture, vecExcavationTexCoord.xy).r > 0.5;\n}\nelse\n{\nreturn texture2D(uExcavationTexture, vecExcavationTexCoord.xy).r < 0.5;\n}\n}\n#endif\n",czm_eyeOffset="vec4 czm_eyeOffset(vec4 positionEC, vec3 eyeOffset)\n{\nvec4 p = positionEC;\nvec4 zEyeOffset = normalize(p) * eyeOffset.z;\np.xy += eyeOffset.xy + zEyeOffset.xy;\np.z += zEyeOffset.z;\nreturn p;\n}\n",czm_eyeToWindowCoordinates="vec4 czm_eyeToWindowCoordinates(vec4 positionEC)\n{\nvec4 q = czm_projection * positionEC;\nq.xyz /= q.w;\nq.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz;\nreturn q;\n}\n",czm_fastApproximateAtan="float czm_fastApproximateAtan(float x) {\nreturn x * (-0.1784 * x - 0.0663 * x * x + 1.0301);\n}\nfloat czm_fastApproximateAtan(float x, float y) {\nfloat t = abs(x);\nfloat opposite = abs(y);\nfloat adjacent = max(t, opposite);\nopposite = min(t, opposite);\nt = czm_fastApproximateAtan(opposite / adjacent);\nt = czm_branchFreeTernary(abs(y) > abs(x), czm_piOverTwo - t, t);\nt = czm_branchFreeTernary(x < 0.0, czm_pi - t, t);\nt = czm_branchFreeTernary(y < 0.0, -t, t);\nreturn t;\n}\n",czm_fog="vec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor)\n{\nfloat scalar = distanceToCamera * czm_fogDensity;\nfloat fog = 1.0 - exp(-(scalar * scalar));\nreturn mix(color, fogColor, fog);\n}\nvec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor, float fogModifierConstant)\n{\nfloat scalar = distanceToCamera * czm_fogDensity;\nfloat fog = 1.0 - exp(-((fogModifierConstant * scalar + fogModifierConstant) * (scalar * (1.0 + fogModifierConstant))));\nreturn mix(color, fogColor, fog);\n}\n",czm_gammaCorrect="vec3 czm_gammaCorrect(vec3 color) {\n#ifdef HDR\ncolor = pow(color, vec3(czm_gamma));\n#endif\nreturn color;\n}\nvec4 czm_gammaCorrect(vec4 color) {\n#ifdef HDR\ncolor.rgb = pow(color.rgb, vec3(czm_gamma));\n#endif\nreturn color;\n}\n",czm_geodeticSurfaceNormal="vec3 czm_geodeticSurfaceNormal(vec3 positionOnEllipsoid, vec3 ellipsoidCenter, vec3 oneOverEllipsoidRadiiSquared)\n{\nreturn normalize((positionOnEllipsoid - ellipsoidCenter) * oneOverEllipsoidRadiiSquared);\n}\n",czm_getDefaultMaterial="czm_material czm_getDefaultMaterial(czm_materialInput materialInput)\n{\nczm_material material;\nmaterial.diffuse = vec3(0.0);\nmaterial.specular = 0.0;\nmaterial.shininess = 1.0;\nmaterial.normal = materialInput.normalEC;\nmaterial.emission = vec3(0.0);\nmaterial.alpha = 1.0;\nreturn material;\n}\n",czm_getEmissiveTextureColor="uniform float uMaxCategoryOrHypCeil;\nuniform float uMinCategoryOrHypFloor;\nuniform sampler2D uEmissionTexAtlas;\nuniform vec4 uEmissionTexAtlasTilingAndOffset[EMISSION_TEXTURE_COUNT];\nuniform vec4 uEmissionTexAtlasRects[EMISSION_TEXTURE_COUNT];\nuniform float uLayerCornerLength;\nvarying vec2 vLayerTexCoord;\nvarying vec2 vModIndexAndTexIndex;\nvec3 czm_getEmissiveTextureColor(float w)\n{\nvec3 texColor = vec3(0.0);\nvec2 emissionTexCoord;\nint nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\nvec2 atlasTexCoord;\nfor(int i = 0; i < EMISSION_TEXTURE_COUNT; i++){\nif(nEmissionTexTexIdx == i){\nemissionTexCoord.x = mod(length(vLayerTexCoord) * uLayerCornerLength / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\nemissionTexCoord.y = mod((w - uMinCategoryOrHypFloor) / uEmissionTexAtlasTilingAndOffset[i].y, 1.0) ;\nemissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\nemissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\nemissionTexCoord.xy = fract(emissionTexCoord.xy);\natlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\nbreak;\n}\n}\ntexColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\nreturn texColor;\n}\nvec3 czm_getEmissiveTextureColor(float w, vec2 texCoord)\n{\nvec3 texColor = vec3(0.0);\nvec2 emissionTexCoord;\nint nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\nvec2 atlasTexCoord;\nfor(int i = 0; i < EMISSION_TEXTURE_COUNT; i++){\nif(nEmissionTexTexIdx == i){\nemissionTexCoord.x = mod(texCoord.x / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\nemissionTexCoord.y = mod(texCoord.y / uEmissionTexAtlasTilingAndOffset[i].y, 1.0);\nemissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\nemissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\nemissionTexCoord.xy = fract(emissionTexCoord.xy);\natlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\nbreak;\n}\n}\ntexColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\nreturn texColor;\n}\n",czm_getHorizontalColor="uniform float uHorizontalLine;\nuniform vec4 uHorizontalColor;\nfloat computeContourline(float fValue)\n{\nfloat distanceToContour = uHorizontalLine;\nfloat dxc = abs(dFdx(fValue));\nfloat dyc = abs(dFdy(fValue));\nfloat dF = max(dxc, dyc);\nreturn (abs(distanceToContour-fValue) < dF) ? 1.0 : 0.0;\n}\nvec4 czm_getHorizontalColor(vec4 oriColor, float fValue)\n{\nfloat finalOpacity = computeContourline(fValue);\nreturn mix(oriColor,uHorizontalColor, finalOpacity);\n}\n",czm_getHypsometricColor="uniform sampler2D uHypsometricTexture;\nuniform sampler2D uHypsometricRenderTexture;\nuniform float uHypsometricVisible;\nuniform float uHypOpacity;\nuniform float uHypContourInterval;\nuniform vec4 uHypLineColor;\nuniform float uHypContourFillMode;\nuniform float uHypFloor;\nuniform float uHypCeil;\nuniform float uHypMaxVisibleValue;\nuniform float uHypMinVisibleValue;\nuniform float uHypHasAnalysisRegion;\nvarying vec2 vecHypTexCoord;\nuniform float uMixColorType;\nuniform vec4 uNoValueColor;\n#ifdef Volume\nvarying vec3 vecRotioCoord;\nuniform float uDataFloor;\nuniform float uDataCeil;\nuniform float uVolumeType;\n#endif\n#ifdef Volume2\nuniform float uDataFloor;\nuniform float uDataCeil;\nuniform float uFilterMode;\n#endif\nfloat computeMixCon(float fValue)\n{\nfloat distanceToContour;\nif(abs(uHypMaxVisibleValue - uHypMinVisibleValue) > 0.1)\n{\nif(fValue < 0.5)\n{\ndistanceToContour = mod(fValue - 0.0002, uHypContourInterval);\n}\nelse\n{\nfloat t = floor(fValue / uHypContourInterval);\ndistanceToContour = abs(fValue - (t * uHypContourInterval) - 0.1);\n}\n}\nelse\n{\ndistanceToContour = abs(fValue - uHypMaxVisibleValue);\n}\nfloat dxc = abs(dFdx(fValue));\nfloat dyc = abs(dFdy(fValue));\nfloat dF = max(dxc, dyc);\nreturn (distanceToContour < dF) ? 1.0 : 0.0;\n}\nvec4 computeContourMapColor(float fValue)\n{\nfloat threshold = abs(uHypCeil - uHypFloor);\nfloat contourRate = (fValue - uHypFloor) / threshold;\nfloat finalCoord = clamp(contourRate, 0.0, 1.0);\nfloat count = floor(finalCoord * 16.0);\nfloat y = (count*2.0 + 1.0)/32.0;\nfloat x = fract(finalCoord*16.0);\nif(y > 1.0)\n{\nx = 1.0;\n}\nvec2 contourCoord = vec2(x, y);\nreturn texture2D(uHypsometricTexture, contourCoord).rgba;\n}\n#ifdef Volume2\nvec4 czm_getContourMapColor(vec4 oriColor, vec4 volColor)\n{\nif(uFilterMode > 0.5)\n{\nvec4 finalColor = volColor * oriColor;\nif(uMixColorType > 0.5)\n{\nfinalColor = volColor;\n}\nreturn finalColor;\n}\nvec4 contourMapColor = vec4(0.0);\nfloat finalOpacity = uHypOpacity;\nfloat noValue = volColor.a;\nfloat texTest = clamp(czm_unpackVolume(volColor.zyx),0.0,1.0);\nfloat fValue;\nif(noValue > 0.5)\n{\nfValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n}\nelse\n{\nfValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n}\nfloat extendHeight = czm_branchFreeTernary(uHypContourFillMode > 2.9, 0.0, czm_branchFreeTernary(uHypContourFillMode > 1.9, 5.0, 0.0));\nif(fValue > uHypMaxVisibleValue + extendHeight || fValue < uHypMinVisibleValue - extendHeight)\n{\nreturn uNoValueColor * oriColor;\n}\n#ifdef GL_OES_standard_derivatives\nif(uHypContourFillMode > 2.9)\n{\nfloat mix_con = computeMixCon(fValue);\ncontourMapColor = mix(computeContourMapColor(fValue), uHypLineColor, mix_con);\n}\nelse if(uHypContourFillMode > 1.9)\n{\nfinalOpacity = computeMixCon(fValue);\ncontourMapColor = uHypLineColor;\n}\nelse if(uHypContourFillMode > 0.9)\n#else\nif(uHypContourFillMode > 0.9)\n#endif\n{\ncontourMapColor = computeContourMapColor(fValue);\n}\nelse\n{\nfinalOpacity = 0.0;\n}\nvec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\nvec4 finalColor = mixColor * oriColor;\n#ifdef PT_CLOUD\nfinalColor = mixColor;\n#endif\nif(uMixColorType > 0.5)\n{\nfinalColor = mixColor;\n}\nreturn finalColor;\n}\n#else\nvec4 czm_getContourMapColor(vec4 oriColor, float fValue)\n{\nvec4 contourMapColor = vec4(0.0);\nfloat finalOpacity = uHypOpacity;\n#ifdef Volume\nvec3 aRatioT = vecRotioCoord;\nif((aRatioT.x < 1.0 && aRatioT.x >0.0) && (aRatioT.y < 1.0 && aRatioT.y >0.0) && (aRatioT.z < 1.0 && aRatioT.z >0.0))\n{\nif(uVolumeType > 0.5)\n{\nvec4 volumeColor = czm_getVolumeValue(aRatioT);\nif(uMixColorType > 0.5)\n{\nvolumeColor = volumeColor * oriColor;\n}\nreturn volumeColor;\n}\nfloat noValue;\nfloat texTest = czm_getVolumeValue(aRatioT, noValue);\nif(noValue > 0.5)\n{\nfValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n}\nelse\n{\nfValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n}\n}\nelse\n{\nfValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n}\n#endif\nfloat extendHeight = czm_branchFreeTernary(uHypContourFillMode > 2.9, 0.0, czm_branchFreeTernary(uHypContourFillMode > 1.9, 5.0, 0.0));\nif(fValue > uHypMaxVisibleValue + extendHeight || fValue < uHypMinVisibleValue - extendHeight)\n{\nreturn uNoValueColor * oriColor;\n}\n#ifdef GL_OES_standard_derivatives\nif(uHypContourFillMode > 2.9)\n{\nfloat mix_con = computeMixCon(fValue);\ncontourMapColor = mix(computeContourMapColor(fValue), uHypLineColor, mix_con);\n}\nelse if(uHypContourFillMode > 1.9)\n{\nfinalOpacity = computeMixCon(fValue);\ncontourMapColor = uHypLineColor;\n}\nelse if(uHypContourFillMode > 0.9)\n#else\nif(uHypContourFillMode > 0.9)\n#endif\n{\ncontourMapColor = computeContourMapColor(fValue);\n}\nelse\n{\nfinalOpacity = 0.0;\n}\nvec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\nvec4 finalColor = mix(oriColor, contourMapColor, finalOpacity);\n#ifdef PT_CLOUD\nfinalColor = mixColor;\n#endif\n#ifdef Volume\nif(uMixColorType > 0.5)\n{\nfinalColor = mixColor;\n}\n#endif\nreturn finalColor;\n}\n#endif\n#ifdef Volume2\nvec4 czm_getHypsometricColor(vec4 oriColor, vec4 volColor)\n{\nif(uHypHasAnalysisRegion > 0.1)\n{\nvec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\nif(hypColor.r < 0.1)\n{\nreturn oriColor;\n}\n}\nreturn czm_getContourMapColor(oriColor, volColor);\n}\n#else\nvec4 czm_getHypsometricColor(vec4 oriColor, float wValue)\n{\nfloat fValue = wValue;\nif(uHypHasAnalysisRegion > 0.1)\n{\nvec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\nif(hypColor.r < 0.1)\n{\nreturn oriColor;\n}\n}\nreturn czm_getContourMapColor(oriColor, fValue);\n}\nvec4 czm_getHypsometricColorByGeoBounds(vec4 oriColor, float wValue, vec4 hypRect, vec2 vTexCoord, vec4 geoBounds)\n{\nif(uHypHasAnalysisRegion > 0.1)\n{\nvec2 polyTexCoord = vTexCoord.xy;\npolyTexCoord.x = polyTexCoord.x * (geoBounds.z - geoBounds.x) + geoBounds.x;\npolyTexCoord.y = polyTexCoord.y * (geoBounds.w - geoBounds.y) + geoBounds.y;\nif(polyTexCoord.x < hypRect.x || polyTexCoord.x>hypRect.z || polyTexCoord.y< hypRect.y || polyTexCoord.y > hypRect.w)\n{\nreturn oriColor;\n}\nvec4 hypColor = texture2D(uHypsometricRenderTexture, polyTexCoord);\nif(hypColor.r < 0.1)\n{\nreturn oriColor;\n}\n}\nreturn czm_getContourMapColor(oriColor, wValue);\n}\n#endif\n",czm_getLambertDiffuse="float czm_getLambertDiffuse(vec3 lightDirectionEC, vec3 normalEC)\n{\nreturn max(dot(lightDirectionEC, normalEC), 0.0);\n}\n",czm_getSpecular="float czm_getSpecular(vec3 lightDirectionEC, vec3 toEyeEC, vec3 normalEC, float shininess)\n{\nvec3 toReflectedLight = reflect(-lightDirectionEC, normalEC);\nfloat specular = max(dot(toReflectedLight, toEyeEC), 0.0);\nreturn pow(specular, max(shininess, czm_epsilon2));\n}\n",czm_getTexColorForS3M="void CalculateMipLevel(in vec2 inTexCoord, in float vecTile, in float fMaxMip, inout float mipLevel)\n{\nvec2 dx = dFdx(inTexCoord * vecTile);\nvec2 dy = dFdy(inTexCoord * vecTile);\nfloat dotX = dot(dx, dx);\nfloat dotY = dot(dy, dy);\nfloat dMax = max(dotX, dotY);\nfloat dMin = min(dotX, dotY);\nfloat offset = (dMax - dMin) / (dMax + dMin);\noffset = clamp(offset, 0.0, 1.0);\nfloat d = dMax * (1.0 - offset) + dMin * offset;\nmipLevel = 0.5 * log2(d);\nmipLevel = clamp(mipLevel, 0.0, fMaxMip - 1.62);\n}\nvoid CalculateMipLevel(in vec2 inTexCoord, in vec2 vecTile, in float fMaxMip, inout float mipLevel)\n{\nvec2 dx = dFdx(inTexCoord * vecTile.x);\nvec2 dy = dFdy(inTexCoord * vecTile.y);\nfloat dotX = dot(dx, dx);\nfloat dotY = dot(dy, dy);\nfloat dMax = max(dotX, dotY);\nfloat dMin = min(dotX, dotY);\nfloat offset = (dMax - dMin) / (dMax + dMin);\noffset = clamp(offset, 0.0, 1.0);\nfloat d = dMax * (1.0 - offset) + dMin * offset;\nmipLevel = 0.5 * log2(d);\nmipLevel = clamp(mipLevel, 0.0, fMaxMip - 1.62);\n}\nvoid CalculateTexCoord(in vec3 inTexCoord, in float scale, in float XTran, in float YTran, in float fTile, in float mipLevel, inout vec2 outTexCoord)\n{\nif(inTexCoord.z < -9000.0)\n{\noutTexCoord = inTexCoord.xy;\n}\nelse\n{\nvec2 fTexCoord = fract(inTexCoord.xy);\nfloat offset = 1.0 * pow(2.0, mipLevel) / fTile;\nfTexCoord = clamp(fTexCoord, offset, 1.0 - offset);\noutTexCoord.x = (fTexCoord.x + XTran) * scale;\noutTexCoord.y = (fTexCoord.y + YTran) * scale;\n}\n}\nvec4 czm_getTexColorForS3M(sampler2D curTexture, vec3 oriTexCoord, float texTileWidth, float fMaxMipLev, float fTexCoordScale, vec2 vecTexCoordTranslate,float isRGBA, vec4 texUVoffset, out vec2 outTexCoord)\n{\nvec4 color = vec4(1.0);\nfloat mipLevel = 0.0;\n#ifdef GL_OES_standard_derivatives\nCalculateMipLevel(oriTexCoord.xy, texTileWidth, fMaxMipLev, mipLevel);\n#endif\nvec2 realTexCoord;\nCalculateTexCoord(oriTexCoord, fTexCoordScale, vecTexCoordTranslate.x, vecTexCoordTranslate.y, texTileWidth, mipLevel, realTexCoord);\nif(isRGBA > 0.5)\n{\nvec2 rgbTexCoord;\nrgbTexCoord.x = (realTexCoord.x + vecTexCoordTranslate.x * fTexCoordScale) * 0.5;\nrgbTexCoord.y = (realTexCoord.y + vecTexCoordTranslate.y * fTexCoordScale) * 0.5;\nrgbTexCoord.xy += texUVoffset.xy;\ncolor = texture2D(curTexture, rgbTexCoord.xy, -10.0);\nvec2 vecAlphaTexCoord;\nvecAlphaTexCoord.x = rgbTexCoord.x;\nvecAlphaTexCoord.y = rgbTexCoord.y + fTexCoordScale * 0.5;\nvecAlphaTexCoord.xy += texUVoffset.xy;\ncolor.a = texture2D(curTexture, vecAlphaTexCoord.xy, -10.0).r;\n}\nelse\n{\nrealTexCoord = realTexCoord * texUVoffset.zw + texUVoffset.xy;\nif(oriTexCoord.z < -9000.0)\n{\ncolor = texture2D(curTexture, realTexCoord.xy);\n}\nelse\n{\n#ifdef GL_EXT_shader_texture_lod\ncolor = texture2DLodEXT(curTexture, realTexCoord.xy, mipLevel);\n#else\n#ifdef WEBEL2\ncolor = textureLod(curTexture, realTexCoord.xy, mipLevel);\n#else\ncolor = texture2D(curTexture, realTexCoord.xy, mipLevel);\n#endif\n#endif\n}\n#ifdef RGBTOBGR\ncolor = color.bgra;\n#endif\n}\noutTexCoord = realTexCoord;\nreturn color;\n}\nvec4 czm_getTexColorForS3M(sampler2D texture, vec2 uv, vec2 texDim, vec2 texTran, vec2 texScale, float maxMipLevel, out vec2 outTexCoord)\n{\nif(maxMipLevel < 0.0)\n{\nreturn vec4(1.0);\n}\nvec4 colorCeil = vec4(1.0);\nfloat mipLevel = 0.0;\n#ifdef GL_OES_standard_derivatives\nCalculateMipLevel(uv, texDim, maxMipLevel, mipLevel);\n#endif\nfloat ceilMipLevel = ceil(mipLevel);\nvec2 translate = vec2(texTran.x, texTran.y);\nfloat temp;\nif(ceilMipLevel > 0.0)\n{\ntranslate.x = texTran.x + texScale.x;\ntemp = pow(2.0, ceilMipLevel - 1.0);\ntranslate.y = texTran.y + texScale.y * (temp - 1.0) / temp;\n}\nfloat scale = 1.0 / pow(2.0, ceilMipLevel);\nvec2 texcoord = fract(uv);\nfloat offsetX = pow(2.0, ceilMipLevel) / texDim.x;\nfloat offsetY = pow(2.0, ceilMipLevel) / texDim.y;\ntexcoord.x = clamp(texcoord.x, 0.0 + offsetX, 1.0 - offsetX);\ntexcoord.y = clamp(texcoord.y, 0.0 + offsetY, 1.0 - offsetY);\ntexcoord.x = texcoord.x * texScale.x * scale + translate.x;\ntexcoord.y = texcoord.y * texScale.y * scale + translate.y;\n#ifdef GL_EXT_shader_texture_lod\ncolorCeil = texture2DLodEXT(texture, texcoord.xy, 0.0);\n#else\n#ifdef WEBEL2\ncolorCeil = textureLod(texture, texcoord.xy, 0.0);\n#else\ncolorCeil = texture2D(texture, texcoord.xy, -10.0);\n#endif\n#endif\nvec4 colorFloor = vec4(1.0);\nfloat floorMipLevel = floor(mipLevel);\ntranslate = vec2(texTran.x, texTran.y);\nif(floorMipLevel > 0.0)\n{\ntranslate.x = texTran.x + texScale.x;\ntemp = pow(2.0, floorMipLevel - 1.0);\ntranslate.y = texTran.y + texScale.y * (temp - 1.0) / temp;\n}\nscale = 1.0 / pow(2.0, floorMipLevel);\ntexcoord = fract(uv);\noffsetX = pow(2.0, floorMipLevel) / texDim.x;\noffsetY = pow(2.0, floorMipLevel) / texDim.y;\ntexcoord.x = clamp(texcoord.x, 0.0 + offsetX, 1.0 - offsetX);\ntexcoord.y = clamp(texcoord.y, 0.0 + offsetY, 1.0 - offsetY);\ntexcoord.x = texcoord.x * texScale.x * scale + translate.x;\ntexcoord.y = texcoord.y * texScale.y * scale + translate.y;\n#ifdef GL_EXT_shader_texture_lod\ncolorFloor = texture2DLodEXT(texture, texcoord.xy, 0.0);\n#else\n#ifdef WEBEL2\ncolorFloor = textureLod(texture, texcoord.xy, 0.0);\n#else\ncolorFloor = texture2D(texture, texcoord.xy, -10.0);\n#endif\n#endif\nvec4 color = colorCeil * 0.5 + colorFloor * 0.5;\nreturn color;\n}\n",czm_getTextureMatrixFromZValue="const float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\nconst float SHIFT_RIGHT4 = 1.0 / 16.0;\nconst float SHIFT_LEFT4 = 16.0;\nvoid czm_getTextureMatrixFromZValue(in float nZ, inout float XTran, inout float YTran, inout float scale, inout float isRGBA)\n{\nif(nZ <= 0.0)\n{\nreturn;\n}\nfloat nDel8 = floor(nZ * SHIFT_RIGHT8);\nfloat nDel16 = floor(nDel8 * SHIFT_RIGHT8);\nfloat nDel20 = floor(nDel16 * SHIFT_RIGHT4);\nisRGBA = floor(nDel20);\nYTran = nZ - nDel8 * SHIFT_LEFT8;\nXTran = nDel8 - nDel16 * SHIFT_LEFT8;\nfloat nLevel = nDel16 - nDel20 * SHIFT_LEFT4;\nscale = 1.0 / pow(2.0, nLevel);\n}\n",czm_getVolumeValue="uniform sampler2D uVolumeTexture;\n#ifdef TIME_ORDER\nuniform sampler2D uNextVolumeTexture;\nuniform float uTimeRatio;\n#endif\n#ifdef Volume\nuniform float width;\nuniform float height;\nuniform float depth;\nuniform float sideBlockCount;\nuniform float blockLength;\nuniform float texLength;\nuniform float uFilterMode;\n#endif\nfloat czm_unpackVolume(vec3 packedDepth)\n{\nreturn dot(packedDepth, vec3(1.0, 1.0 / 255.0, 1.0 / 65025.0));\n}\n#ifdef Volume\nvec2 computeVolumeTextureCoord(vec3 texCoord, float fLevel)\n{\nfloat yOffset = floor((fLevel+0.25/sideBlockCount) / sideBlockCount);\nfloat xOffset = fLevel - yOffset * sideBlockCount;\nfloat texCoordV = (texCoord.y * height + yOffset * blockLength) / texLength;\nfloat texCoordU = (texCoord.x * width + xOffset * blockLength) / texLength;\nreturn vec2(texCoordU, texCoordV);\n}\nfloat computeVolumeValue(sampler2D volumeTexture, vec2 topTexCoord, vec2 bottomTexCoord, float ratio, out float noValue)\n{\nvec4 volumeValue1 = texture2D(volumeTexture, topTexCoord);\nvec4 volumeValue2 = texture2D(volumeTexture, bottomTexCoord);\nfloat fValue1 = clamp(czm_unpackVolume(volumeValue1.xyz),0.0,1.0);\nfloat fValue2 = clamp(czm_unpackVolume(volumeValue2.xyz),0.0,1.0);\nif(uFilterMode >0.5)\n{\nif(ratio<0.5)\n{\nratio = 0.0;\n}\nelse\n{\nratio = 1.0;\n}\n}\nnoValue = mix(volumeValue1.a, volumeValue2.a, ratio);\nif(volumeValue1.a < 0.5)\n{\nfValue1 = fValue2;\n}\nif(volumeValue2.a < 0.5)\n{\nfValue2 = fValue1;\n}\nreturn mix(fValue1, fValue2, ratio);\n}\nfloat czm_getVolumeValue(vec3 texCoord, out float noValue)\n{\nfloat fLevel = (depth - 1.0) * texCoord.z;\nfloat bottomLevel= floor(fLevel);\nfloat topLevel = bottomLevel + 1.0;\nfloat ratio = topLevel - fLevel;\nvec2 topTexCoord = computeVolumeTextureCoord(texCoord, topLevel);\nvec2 bottomTexCoord = computeVolumeTextureCoord(texCoord, bottomLevel);\nfloat fResult = computeVolumeValue(uVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n#ifdef TIME_ORDER\nfloat fNextResult = computeVolumeValue(uNextVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\nfResult = mix(fResult, fNextResult, uTimeRatio);\n#endif\nreturn fResult;\n}\nvec4 czm_getVolumeValue(vec3 texCoord)\n{\nfloat fLevel = (depth - 1.0) * texCoord.z;\nfloat bottomLevel= floor(fLevel);\nfloat topLevel = bottomLevel + 1.0;\nfloat ratio = topLevel - fLevel;\nfloat yOffset1 = floor((topLevel+0.25/sideBlockCount) / sideBlockCount);\nfloat xOffset1 = topLevel - yOffset1 * sideBlockCount;\nfloat texCoordV1 = (texCoord.y * height + yOffset1 * blockLength)/texLength;\nfloat texCoordU1 = (texCoord.x * width + xOffset1 * blockLength)/texLength;\nvec4 volumeColor1 = texture2D(uVolumeTexture, vec2(texCoordU1,texCoordV1));\nfloat yOffset2 = floor((bottomLevel+0.25/sideBlockCount) / sideBlockCount);\nfloat xOffset2 = bottomLevel - yOffset2 * sideBlockCount;\nfloat texCoordV2 = (texCoord.y * height + yOffset2 * blockLength)/texLength;\nfloat texCoordU2 = (texCoord.x * width + xOffset2 * blockLength)/texLength;\nvec4 volumeColor2 = texture2D(uVolumeTexture, vec2(texCoordU2, texCoordV2));\nif(uFilterMode >0.5)\n{\nif(ratio<0.5)\n{\nratio = 0.0;\n}\nelse\n{\nratio = 1.0;\n}\n}\nvec4 volumeColor = mix(volumeColor1, volumeColor2, ratio);\nreturn volumeColor;\n}\n#endif\n",czm_getVolumeValueMultiResolution="uniform sampler2D uVolumeTexture1;\nuniform sampler2D uVolumeTexture2;\nuniform sampler2D uVolumeTexture3;\nuniform mat4 uMultiResolutionPara1;\nuniform mat4 uMultiResolutionPara2;\nuniform mat4 uMultiResolutionPara3;\n#ifdef TIME_ORDER\nuniform sampler2D uNextVolumeTexture1;\nuniform sampler2D uNextVolumeTexture2;\nuniform sampler2D uNextVolumeTexture3;\n#endif\n#ifdef Volume\nvec2 computeVolumeTextureCoord(vec2 texCoord, float fLevel, float texWidth, float texHeight, float texSideBlockCount, float texBlockLength, float texTotalLength)\n{\nfloat yOffset = floor((fLevel+0.25/texSideBlockCount) / texSideBlockCount);\nfloat xOffset = fLevel - yOffset * texSideBlockCount;\nfloat texCoordV = (texCoord.y * texHeight + yOffset * texBlockLength) / texTotalLength;\nfloat texCoordU = (texCoord.x * texWidth + xOffset * texBlockLength) / texTotalLength;\nreturn vec2(texCoordU, texCoordV);\n}\nfloat czm_getVolumeValueMultiResolution(vec3 texCoord, out float noValue)\n{\nfloat fLevel = (depth - 1.0) * texCoord.z;\nfloat bottomLevel= floor(fLevel);\nfloat topLevel = bottomLevel + 1.0;\nfloat ratio = topLevel - fLevel;\nvec2 topTexCoord = computeVolumeTextureCoord(texCoord, topLevel);\nvec2 bottomTexCoord = computeVolumeTextureCoord(texCoord, bottomLevel);\nfloat fResult = computeVolumeValue(uVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n#ifdef TIME_ORDER\nfloat fNextResult = computeVolumeValue(uNextVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\nfResult = mix(fResult, fNextResult, uTimeRatio);\n#endif\nfloat width = uMultiResolutionPara1[2].x;\nfloat height = uMultiResolutionPara1[2].y;\nfloat sideBlockCount = uMultiResolutionPara1[2].z;\nfloat blockLength = uMultiResolutionPara1[2].w;\nfloat texLength = uMultiResolutionPara1[3].x;\nvec4 uMultiResolutionTranslation = uMultiResolutionPara1[0];\nvec2 texCoord1 = (texCoord.xy - uMultiResolutionTranslation.xy) * uMultiResolutionTranslation.zw;\nvec2 topTexCoord1 = computeVolumeTextureCoord(texCoord1, topLevel, width, height, sideBlockCount, blockLength, texLength);\nvec2 bottomTexCoord1 = computeVolumeTextureCoord(texCoord1, bottomLevel, width, height, sideBlockCount, blockLength, texLength);\nfloat alpha1 = 5.0 * clamp( max(abs(texCoord1.x - 0.5), abs(texCoord1.y - 0.5)) - 0.3,0.0,0.2);\nfloat fResult1 = computeVolumeValue(uVolumeTexture1, topTexCoord1, bottomTexCoord1, ratio, noValue);\n#ifdef TIME_ORDER\nfloat fNextResult1 = computeVolumeValue(uNextVolumeTexture1, topTexCoord1, bottomTexCoord1, ratio, noValue);\nfResult1 = mix(fResult1, fNextResult1, uTimeRatio);\n#endif\nwidth = uMultiResolutionPara2[2].x;\nheight = uMultiResolutionPara2[2].y;\nsideBlockCount = uMultiResolutionPara2[2].z;\nblockLength = uMultiResolutionPara2[2].w;\ntexLength = uMultiResolutionPara2[3].x;\nuMultiResolutionTranslation = uMultiResolutionPara2[0];\nvec2 texCoord2 = (texCoord.xy - uMultiResolutionTranslation.xy) * uMultiResolutionTranslation.zw;\nvec2 topTexCoord2 = computeVolumeTextureCoord(texCoord2, topLevel, width, height, sideBlockCount, blockLength, texLength);\nvec2 bottomTexCoord2 = computeVolumeTextureCoord(texCoord2, bottomLevel, width, height, sideBlockCount, blockLength, texLength);\nfloat alpha2 = 5.0 * clamp( max(abs(texCoord2.x - 0.5), abs(texCoord2.y - 0.5)) - 0.3,0.0,0.2);\nfloat fResult2 = computeVolumeValue(uVolumeTexture2, topTexCoord2, bottomTexCoord2, ratio, noValue);\n#ifdef TIME_ORDER\nfloat fNextResult2 = computeVolumeValue(uNextVolumeTexture2, topTexCoord2, bottomTexCoord2, ratio, noValue);\nfResult2 = mix(fResult2, fNextResult2, uTimeRatio);\n#endif\nwidth = uMultiResolutionPara3[2].x;\nheight = uMultiResolutionPara3[2].y;\nsideBlockCount = uMultiResolutionPara3[2].z;\nblockLength = uMultiResolutionPara3[2].w;\ntexLength = uMultiResolutionPara3[3].x;\nuMultiResolutionTranslation = uMultiResolutionPara3[0];\nvec2 texCoord3 = (texCoord.xy - uMultiResolutionTranslation.xy) * uMultiResolutionTranslation.zw;\nvec2 topTexCoord3 = computeVolumeTextureCoord(texCoord3, topLevel, width, height, sideBlockCount, blockLength, texLength);\nvec2 bottomTexCoord3 = computeVolumeTextureCoord(texCoord3, bottomLevel, width, height, sideBlockCount, blockLength, texLength);\nfloat alpha3 = 5.0 * clamp( max(abs(texCoord3.x - 0.5), abs(texCoord3.y - 0.5)) - 0.3,0.0,0.2);\nfloat fResult3 = computeVolumeValue(uVolumeTexture3, topTexCoord3, bottomTexCoord3, ratio, noValue);\n#ifdef TIME_ORDER\nfloat fNextResult3 = computeVolumeValue(uNextVolumeTexture3, topTexCoord3, bottomTexCoord3, ratio, noValue);\nfResult3 = mix(fResult3, fNextResult3, uTimeRatio);\n#endif\nreturn mix(fResult3, mix(fResult2, mix(fResult1, fResult, alpha1), alpha2), alpha3);\n}\n#endif\n",czm_getWaterNoise="vec4 czm_getWaterNoise(sampler2D normalMap, vec2 uv, float time, float angleInRadians)\n{\nfloat cosAngle = cos(angleInRadians);\nfloat sinAngle = sin(angleInRadians);\nvec2 s0 = vec2(1.0/17.0, 0.0);\nvec2 s1 = vec2(-1.0/29.0, 0.0);\nvec2 s2 = vec2(1.0/101.0, 1.0/59.0);\nvec2 s3 = vec2(-1.0/109.0, -1.0/57.0);\ns0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));\ns1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));\ns2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));\ns3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));\nvec2 uv0 = (uv/103.0) + (time * s0);\nvec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);\nvec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);\nvec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);\nuv0 = fract(uv0);\nuv1 = fract(uv1);\nuv2 = fract(uv2);\nuv3 = fract(uv3);\nvec4 noise = (texture2D(normalMap, uv0)) +\n(texture2D(normalMap, uv1)) +\n(texture2D(normalMap, uv2)) +\n(texture2D(normalMap, uv3));\nreturn ((noise / 4.0) - 0.5) * 2.0;\n}\n",czm_getWgs84EllipsoidEC="czm_ellipsoid czm_getWgs84EllipsoidEC()\n{\nvec3 radii = vec3(6378137.0, 6378137.0, 6378137.0);\nvec3 inverseRadii = vec3(1.0 / radii.x, 1.0 / radii.y, 1.0 / radii.z);\nvec3 inverseRadiiSquared = inverseRadii * inverseRadii;\nczm_ellipsoid temp = czm_ellipsoid(czm_view[3].xyz, radii, inverseRadii, inverseRadiiSquared);\nreturn temp;\n}\n",czm_HSBToRGB="const vec4 K_HSB2RGB = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\nvec3 czm_HSBToRGB(vec3 hsb)\n{\nvec3 p = abs(fract(hsb.xxx + K_HSB2RGB.xyz) * 6.0 - K_HSB2RGB.www);\nreturn hsb.z * mix(K_HSB2RGB.xxx, clamp(p - K_HSB2RGB.xxx, 0.0, 1.0), hsb.y);\n}\n",czm_HSLToRGB="vec3 hueToRGB(float hue)\n{\nfloat r = abs(hue * 6.0 - 3.0) - 1.0;\nfloat g = 2.0 - abs(hue * 6.0 - 2.0);\nfloat b = 2.0 - abs(hue * 6.0 - 4.0);\nreturn clamp(vec3(r, g, b), 0.0, 1.0);\n}\nvec3 czm_HSLToRGB(vec3 hsl)\n{\nvec3 rgb = hueToRGB(hsl.x);\nfloat c = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y;\nreturn (rgb - 0.5) * c + hsl.z;\n}\n",czm_hue="vec3 czm_hue(vec3 rgb, float adjustment)\n{\nconst mat3 toYIQ = mat3(0.299, 0.587, 0.114,\n0.595716, -0.274453, -0.321263,\n0.211456, -0.522591, 0.311135);\nconst mat3 toRGB = mat3(1.0, 0.9563, 0.6210,\n1.0, -0.2721, -0.6474,\n1.0, -1.107, 1.7046);\nvec3 yiq = toYIQ * rgb;\nfloat hue = atan(yiq.z, yiq.y) + adjustment;\nfloat chroma = sqrt(yiq.z * yiq.z + yiq.y * yiq.y);\nvec3 color = vec3(yiq.x, chroma * cos(hue), chroma * sin(hue));\nreturn toRGB * color;\n}\n",czm_inverseGamma="vec3 czm_inverseGamma(vec3 color) {\nreturn pow(color, vec3(1.0 / czm_gamma));\n}\n",czm_inverseMatrix="mat3 czm_inverseMatrix(mat3 m)\n{\nfloat Determinant =\nm[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2])\n- m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2])\n+ m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]);\nmat3 Inverse;\nInverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]);\nInverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]);\nInverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]);\nInverse[0][1] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]);\nInverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]);\nInverse[2][1] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]);\nInverse[0][2] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]);\nInverse[1][2] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]);\nInverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]);\nInverse /= Determinant;\nreturn Inverse;\n}\nmat4 czm_inverseMatrix(mat4 m)\n{\nfloat Coef00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\nfloat Coef02 = m[1][2] * m[3][3] - m[3][2] * m[1][3];\nfloat Coef03 = m[1][2] * m[2][3] - m[2][2] * m[1][3];\nfloat Coef04 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\nfloat Coef06 = m[1][1] * m[3][3] - m[3][1] * m[1][3];\nfloat Coef07 = m[1][1] * m[2][3] - m[2][1] * m[1][3];\nfloat Coef08 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\nfloat Coef10 = m[1][1] * m[3][2] - m[3][1] * m[1][2];\nfloat Coef11 = m[1][1] * m[2][2] - m[2][1] * m[1][2];\nfloat Coef12 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\nfloat Coef14 = m[1][0] * m[3][3] - m[3][0] * m[1][3];\nfloat Coef15 = m[1][0] * m[2][3] - m[2][0] * m[1][3];\nfloat Coef16 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\nfloat Coef18 = m[1][0] * m[3][2] - m[3][0] * m[1][2];\nfloat Coef19 = m[1][0] * m[2][2] - m[2][0] * m[1][2];\nfloat Coef20 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\nfloat Coef22 = m[1][0] * m[3][1] - m[3][0] * m[1][1];\nfloat Coef23 = m[1][0] * m[2][1] - m[2][0] * m[1][1];\nconst vec4 SignA = vec4( 1.0, -1.0, 1.0, -1.0);\nconst vec4 SignB = vec4(-1.0, 1.0, -1.0, 1.0);\nvec4 Fac0 = vec4(Coef00, Coef00, Coef02, Coef03);\nvec4 Fac1 = vec4(Coef04, Coef04, Coef06, Coef07);\nvec4 Fac2 = vec4(Coef08, Coef08, Coef10, Coef11);\nvec4 Fac3 = vec4(Coef12, Coef12, Coef14, Coef15);\nvec4 Fac4 = vec4(Coef16, Coef16, Coef18, Coef19);\nvec4 Fac5 = vec4(Coef20, Coef20, Coef22, Coef23);\nvec4 Vec0 = vec4(m[1][0], m[0][0], m[0][0], m[0][0]);\nvec4 Vec1 = vec4(m[1][1], m[0][1], m[0][1], m[0][1]);\nvec4 Vec2 = vec4(m[1][2], m[0][2], m[0][2], m[0][2]);\nvec4 Vec3 = vec4(m[1][3], m[0][3], m[0][3], m[0][3]);\nvec4 Inv0 = SignA * (Vec1 * Fac0 - Vec2 * Fac1 + Vec3 * Fac2);\nvec4 Inv1 = SignB * (Vec0 * Fac0 - Vec2 * Fac3 + Vec3 * Fac4);\nvec4 Inv2 = SignA * (Vec0 * Fac1 - Vec1 * Fac3 + Vec3 * Fac5);\nvec4 Inv3 = SignB * (Vec0 * Fac2 - Vec1 * Fac4 + Vec2 * Fac5);\nmat4 Inverse = mat4(Inv0, Inv1, Inv2, Inv3);\nvec4 Row0 = vec4(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]);\nfloat Determinant = dot(m[0], Row0);\nInverse /= Determinant;\nreturn Inverse;\n}\n",czm_isEmpty="bool czm_isEmpty(czm_raySegment interval)\n{\nreturn (interval.stop < 0.0);\n}\n",czm_isFull="bool czm_isFull(czm_raySegment interval)\n{\nreturn (interval.start == 0.0 && interval.stop == czm_infinity);\n}\n",czm_latitudeToWebMercatorFraction="float czm_latitudeToWebMercatorFraction(float latitude, float southMercatorY, float oneOverMercatorHeight)\n{\nfloat sinLatitude = sin(latitude);\nfloat mercatorY = 0.5 * log((1.0 + sinLatitude) / (1.0 - sinLatitude));\nreturn (mercatorY - southMercatorY) * oneOverMercatorHeight;\n}\n",czm_lineDistance="float czm_lineDistance(vec2 point1, vec2 point2, vec2 point) {\nreturn abs((point2.y - point1.y) * point.x - (point2.x - point1.x) * point.y + point2.x * point1.y - point2.y * point1.x) / distance(point2, point1);\n}\n",czm_luminance="float czm_luminance(vec3 rgb)\n{\nconst vec3 W = vec3(0.2125, 0.7154, 0.0721);\nreturn dot(rgb, W);\n}\n",czm_metersPerPixel="float czm_metersPerPixel(vec4 positionEC, float pixelRatio)\n{\nfloat width = czm_viewport.z;\nfloat height = czm_viewport.w;\nfloat pixelWidth;\nfloat pixelHeight;\nfloat top = czm_frustumPlanes.x;\nfloat bottom = czm_frustumPlanes.y;\nfloat left = czm_frustumPlanes.z;\nfloat right = czm_frustumPlanes.w;\nif (czm_sceneMode == czm_sceneMode2D || czm_orthographicIn3D == 1.0)\n{\nfloat frustumWidth = right - left;\nfloat frustumHeight = top - bottom;\npixelWidth = frustumWidth / width;\npixelHeight = frustumHeight / height;\n}\nelse\n{\nfloat distanceToPixel = -positionEC.z;\nfloat inverseNear = 1.0 / czm_currentFrustum.x;\nfloat tanTheta = top * inverseNear;\npixelHeight = 2.0 * distanceToPixel * tanTheta / height;\ntanTheta = right * inverseNear;\npixelWidth = 2.0 * distanceToPixel * tanTheta / width;\n}\nreturn max(pixelWidth, pixelHeight) * pixelRatio;\n}\nfloat czm_metersPerPixel(vec4 positionEC)\n{\nreturn czm_metersPerPixel(positionEC, czm_pixelRatio);\n}\n",czm_modelToWindowCoordinates="vec4 czm_modelToWindowCoordinates(vec4 position)\n{\nvec4 q = czm_modelViewProjection * position;\nq.xyz /= q.w;\nq.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz;\nreturn q;\n}\n",czm_multiplyWithColorBalance="vec3 czm_multiplyWithColorBalance(vec3 left, vec3 right)\n{\nconst vec3 W = vec3(0.2125, 0.7154, 0.0721);\nvec3 target = left * right;\nfloat leftLuminance = dot(left, W);\nfloat rightLuminance = dot(right, W);\nfloat targetLuminance = dot(target, W);\nreturn ((leftLuminance + rightLuminance) / (2.0 * targetLuminance)) * target;\n}\n",czm_nearFarScalar="float czm_nearFarScalar(vec4 nearFarScalar, float cameraDistSq)\n{\nfloat valueAtMin = nearFarScalar.y;\nfloat valueAtMax = nearFarScalar.w;\nfloat nearDistanceSq = nearFarScalar.x * nearFarScalar.x;\nfloat farDistanceSq = nearFarScalar.z * nearFarScalar.z;\nfloat t = (cameraDistSq - nearDistanceSq) / (farDistanceSq - nearDistanceSq);\nt = pow(clamp(t, 0.0, 1.0), 0.2);\nreturn mix(valueAtMin, valueAtMax, t);\n}\n",czm_octDecode="vec3 czm_octDecode(vec2 encoded, float range)\n{\nif (encoded.x == 0.0 && encoded.y == 0.0) {\nreturn vec3(0.0, 0.0, 0.0);\n}\nencoded = encoded / range * 2.0 - 1.0;\nvec3 v = vec3(encoded.x, encoded.y, 1.0 - abs(encoded.x) - abs(encoded.y));\nif (v.z < 0.0)\n{\nv.xy = (1.0 - abs(v.yx)) * czm_signNotZero(v.xy);\n}\nreturn normalize(v);\n}\nvec3 czm_octDecode(vec2 encoded)\n{\nreturn czm_octDecode(encoded, 255.0);\n}\nvec3 czm_octDecode(float encoded)\n{\nfloat temp = encoded / 256.0;\nfloat x = floor(temp);\nfloat y = (temp - x) * 256.0;\nreturn czm_octDecode(vec2(x, y));\n}\nvoid czm_octDecode(vec2 encoded, out vec3 vector1, out vec3 vector2, out vec3 vector3)\n{\nfloat temp = encoded.x / 65536.0;\nfloat x = floor(temp);\nfloat encodedFloat1 = (temp - x) * 65536.0;\ntemp = encoded.y / 65536.0;\nfloat y = floor(temp);\nfloat encodedFloat2 = (temp - y) * 65536.0;\nvector1 = czm_octDecode(encodedFloat1);\nvector2 = czm_octDecode(encodedFloat2);\nvector3 = czm_octDecode(vec2(x, y));\n}\n",czm_packDepth="vec4 czm_packDepth(float depth)\n{\nvec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * depth;\nenc = fract(enc);\nenc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\nreturn enc;\n}\n",czm_packValue="vec4 czm_packValue(float value)\n{\nfloat SHIFT_LEFT8 = 256.0;\nfloat SHIFT_RIGHT8 = 1.0 / 256.0;\nvec4 result;\nresult.a = 255.0;\nfloat fPos = abs(value + 9000.0) * SHIFT_RIGHT8;\nresult.b = (fPos - floor(fPos)) * SHIFT_LEFT8;\nfPos = floor(fPos) * SHIFT_RIGHT8;\nresult.g = (fPos - floor(fPos)) * SHIFT_LEFT8;\nresult.r = floor(fPos);\nresult /= 255.0;\nreturn result;\n}\n",czm_phong="float czm_private_getLambertDiffuseOfMaterial(vec3 lightDirectionEC, czm_material material)\n{\nreturn czm_getLambertDiffuse(lightDirectionEC, material.normal);\n}\nfloat czm_private_getSpecularOfMaterial(vec3 lightDirectionEC, vec3 toEyeEC, czm_material material)\n{\nreturn czm_getSpecular(lightDirectionEC, toEyeEC, material.normal, material.shininess);\n}\nvec4 czm_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\nfloat diffuse = czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 0.0, 1.0), material);\nif (czm_sceneMode == czm_sceneMode3D) {\ndiffuse += czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 1.0, 0.0), material);\n}\nfloat specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\nvec3 materialDiffuse = material.diffuse * 0.5;\nvec3 ambient = materialDiffuse;\nvec3 color = ambient + material.emission;\ncolor += materialDiffuse * diffuse * czm_lightColor;\ncolor += material.specular * specular * czm_lightColor;\nreturn vec4(color, material.alpha);\n}\nvec4 czm_private_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\nfloat diffuse = czm_private_getLambertDiffuseOfMaterial(lightDirectionEC, material);\nfloat specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\nvec3 ambient = vec3(0.0);\nvec3 color = ambient + material.emission;\ncolor += material.diffuse * diffuse * czm_lightColor;\ncolor += material.specular * specular * czm_lightColor;\nreturn vec4(color, material.alpha);\n}\n",czm_planeDistance="float czm_planeDistance(vec4 plane, vec3 point) {\nreturn (dot(plane.xyz, point) + plane.w);\n}\nfloat czm_planeDistance(vec3 planeNormal, float planeDistance, vec3 point) {\nreturn (dot(planeNormal, point) + planeDistance);\n}\n",czm_pointAlongRay="vec3 czm_pointAlongRay(czm_ray ray, float time)\n{\nreturn ray.origin + (time * ray.direction);\n}\n",czm_rayEllipsoidIntersectionInterval="czm_raySegment czm_rayEllipsoidIntersectionInterval(czm_ray ray, vec3 ellipsoid_center, vec3 ellipsoid_inverseRadii)\n{\nvec3 q = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.origin, 1.0)).xyz;\nvec3 w = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.direction, 0.0)).xyz;\nq = q - ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ellipsoid_center, 1.0)).xyz;\nfloat q2 = dot(q, q);\nfloat qw = dot(q, w);\nif (q2 > 1.0)\n{\nif (qw >= 0.0)\n{\nreturn czm_emptyRaySegment;\n}\nelse\n{\nfloat qw2 = qw * qw;\nfloat difference = q2 - 1.0;\nfloat w2 = dot(w, w);\nfloat product = w2 * difference;\nif (qw2 < product)\n{\nreturn czm_emptyRaySegment;\n}\nelse if (qw2 > product)\n{\nfloat discriminant = qw * qw - product;\nfloat temp = -qw + sqrt(discriminant);\nfloat root0 = temp / w2;\nfloat root1 = difference / temp;\nif (root0 < root1)\n{\nczm_raySegment i = czm_raySegment(root0, root1);\nreturn i;\n}\nelse\n{\nczm_raySegment i = czm_raySegment(root1, root0);\nreturn i;\n}\n}\nelse\n{\nfloat root = sqrt(difference / w2);\nczm_raySegment i = czm_raySegment(root, root);\nreturn i;\n}\n}\n}\nelse if (q2 < 1.0)\n{\nfloat difference = q2 - 1.0;\nfloat w2 = dot(w, w);\nfloat product = w2 * difference;\nfloat discriminant = qw * qw - product;\nfloat temp = -qw + sqrt(discriminant);\nczm_raySegment i = czm_raySegment(0.0, temp / w2);\nreturn i;\n}\nelse\n{\nif (qw < 0.0)\n{\nfloat w2 = dot(w, w);\nczm_raySegment i = czm_raySegment(0.0, -qw / w2);\nreturn i;\n}\nelse\n{\nreturn czm_emptyRaySegment;\n}\n}\n}\n",czm_readDepth="float czm_readDepth(sampler2D depthTexture, vec2 texCoords)\n{\nreturn czm_reverseLogDepth(texture2D(depthTexture, texCoords).r);\n}\n",czm_readNonPerspective="float czm_readNonPerspective(float value, float oneOverW) {\nreturn value * oneOverW;\n}\nvec2 czm_readNonPerspective(vec2 value, float oneOverW) {\nreturn value * oneOverW;\n}\nvec3 czm_readNonPerspective(vec3 value, float oneOverW) {\nreturn value * oneOverW;\n}\nvec4 czm_readNonPerspective(vec4 value, float oneOverW) {\nreturn value * oneOverW;\n}\n",czm_reverseLogDepth="float czm_reverseLogDepth(float logZ)\n{\n#ifdef LOG_DEPTH\nfloat near = czm_currentFrustum.x;\nfloat far = czm_currentFrustum.y;\nfloat log2Depth = logZ * czm_log2FarDepthFromNearPlusOne;\nfloat depthFromNear = pow(2.0, log2Depth) - 1.0;\nreturn far * (1.0 - near / (depthFromNear + near)) / (far - near);\n#endif\nreturn logZ;\n}\n",czm_RGBToHSB="const vec4 K_RGB2HSB = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\nvec3 czm_RGBToHSB(vec3 rgb)\n{\nvec4 p = mix(vec4(rgb.bg, K_RGB2HSB.wz), vec4(rgb.gb, K_RGB2HSB.xy), step(rgb.b, rgb.g));\nvec4 q = mix(vec4(p.xyw, rgb.r), vec4(rgb.r, p.yzx), step(p.x, rgb.r));\nfloat d = q.x - min(q.w, q.y);\nreturn vec3(abs(q.z + (q.w - q.y) / (6.0 * d + czm_epsilon7)), d / (q.x + czm_epsilon7), q.x);\n}\n",czm_RGBToHSL="vec3 RGBtoHCV(vec3 rgb)\n{\nvec4 p = (rgb.g < rgb.b) ? vec4(rgb.bg, -1.0, 2.0 / 3.0) : vec4(rgb.gb, 0.0, -1.0 / 3.0);\nvec4 q = (rgb.r < p.x) ? vec4(p.xyw, rgb.r) : vec4(rgb.r, p.yzx);\nfloat c = q.x - min(q.w, q.y);\nfloat h = abs((q.w - q.y) / (6.0 * c + czm_epsilon7) + q.z);\nreturn vec3(h, c, q.x);\n}\nvec3 czm_RGBToHSL(vec3 rgb)\n{\nvec3 hcv = RGBtoHCV(rgb);\nfloat l = hcv.z - hcv.y * 0.5;\nfloat s = hcv.y / (1.0 - abs(l * 2.0 - 1.0) + czm_epsilon7);\nreturn vec3(hcv.x, s, l);\n}\n",czm_RGBToXYZ="vec3 czm_RGBToXYZ(vec3 rgb)\n{\nconst mat3 RGB2XYZ = mat3(0.4124, 0.2126, 0.0193,\n0.3576, 0.7152, 0.1192,\n0.1805, 0.0722, 0.9505);\nvec3 xyz = RGB2XYZ * rgb;\nvec3 Yxy;\nYxy.r = xyz.g;\nfloat temp = dot(vec3(1.0), xyz);\nYxy.gb = xyz.rg / temp;\nreturn Yxy;\n}\n",czm_RollerShutter="void czm_RollerShutter(vec2 coord, vec4 region)\n{\nvec2 f = step(region.xw, coord);\nvec2 s = step(coord, region.zy);\nif (f.x * f.y * s.x * s.y < 1.0)\n{\ndiscard;\n};\n}\n",czm_s3mBatchOperation="void czm_s3mBatchOperation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor, inout vec4 vertexPos, inout vec4 vIsFiltByID, vec3 translation)\n{\nfloat right_2 = operationType.x * 0.5;\nfloat right_4 = right_2 * 0.5;\nfloat right_8 = right_4 * 0.5;\nfloat right_16 = right_8 * 0.5;\nfloat isSetColor = fract(right_2);\nif(isSetColor > 0.1)\n{\nvertexColor *= color;\n}\nfloat isPicked = fract(floor(right_2)* 0.5);\nif(isPicked > 0.1)\n{\nvertexColor *= selectedColor;\n}\nfloat isHide = fract(floor(right_4)* 0.5);\nif(isHide > 0.1)\n{\nvertexColor.a = 0.0;\n}\nfloat isOffset = fract(floor(right_8)* 0.5);\nif(isOffset > 0.1)\n{\nvertexPos.xyz += translation;\n}\nfloat isClip = fract(floor(right_16) * 0.5);\nif(isClip > 0.1)\n{\nvIsFiltByID.x = 1.0;\n}\n}\nvoid czm_s3mBatchOperation(vec4 operationType, vec4 color, inout vec4 vertexColor, inout vec4 vertexPos, inout vec4 vIsFiltByID, vec3 translation, inout float fSelected)\n{\noperationType.x += 0.001;\nfloat right_2 = operationType.x * 0.5;\nfloat right_4 = right_2 * 0.5;\nfloat right_8 = right_4 * 0.5;\nfloat right_16 = right_8 * 0.5;\nfloat isSetColor = fract(right_2);\nif(isSetColor > 0.1)\n{\nvertexColor *= color;\n}\nfloat isPicked = fract(floor(right_2)* 0.5);\nif(isPicked > 0.1)\n{\nfSelected = 1.0;\n}\nfloat isHide = fract(floor(right_4)* 0.5);\nif(isHide > 0.1)\n{\nvertexColor.a = 0.0;\n}\nfloat isOffset = fract(floor(right_8)* 0.5);\nif(isOffset > 0.1)\n{\nvertexPos.xyz += translation;\n}\nfloat isClip = fract(floor(right_16) * 0.5);\nif(isClip > 0.1)\n{\nvIsFiltByID.x = 1.0;\n}\n}\nvoid czm_s3mBatchOperation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor, inout vec4 vertexPos, inout vec4 vIsFiltByID, vec3 translation, inout float fSelected)\n{\noperationType.x += 0.001;\nfloat right_2 = operationType.x * 0.5;\nfloat right_4 = right_2 * 0.5;\nfloat right_8 = right_4 * 0.5;\nfloat right_16 = right_8 * 0.5;\nfloat isSetColor = fract(right_2);\nif(isSetColor > 0.1)\n{\ncolor.a *= vertexColor.a;\nvertexColor = color;\n}\nfloat isPicked = fract(floor(right_2)* 0.5);\nif(isPicked > 0.1)\n{\nfSelected = 1.0;\n#ifdef REPLACE_SELECT_TYPE\nvertexColor = selectedColor;\n#else\nvertexColor *= selectedColor;\n#endif\n}\nfloat isHide = fract(floor(right_4)* 0.5);\nif(isHide > 0.1)\n{\nvertexColor.a = 0.0;\n}\nfloat isOffset = fract(floor(right_8)* 0.5);\nif(isOffset > 0.1)\n{\nvertexPos.xyz += translation;\n}\nfloat isClip = fract(floor(right_16) * 0.5);\nif(isClip > 0.1)\n{\nvIsFiltByID.x = 1.0;\n}\n}\nvoid czm_s3mBatchOperation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor)\n{\noperationType.x += 0.001;\nfloat right_2 = operationType.x * 0.5;\nfloat right_4 = right_2 * 0.5;\nfloat right_8 = right_4 * 0.5;\nfloat right_16 = right_8 * 0.5;\nfloat isSetColor = fract(right_2);\nif(isSetColor > 0.1)\n{\nvertexColor *= color;\n}\nfloat isPicked = fract(floor(right_2)* 0.5);\nif(isPicked > 0.1)\n{\nvertexColor *= selectedColor;\n}\nfloat isHide = fract(floor(right_4)* 0.5);\nif(isHide > 0.1)\n{\nvertexColor.a = 0.0;\n}\n}\nvoid czm_s3mBatchOperation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor, inout float fSelected)\n{\noperationType.x += 0.001;\nfloat right_2 = operationType.x * 0.5;\nfloat right_4 = right_2 * 0.5;\nfloat right_8 = right_4 * 0.5;\nfloat right_16 = right_8 * 0.5;\nfloat isSetColor = fract(right_2);\nif(isSetColor > 0.1)\n{\nfSelected = 1.0;\nvertexColor = color;\n}\nfloat isPicked = fract(floor(right_2)* 0.5);\nif(isPicked > 0.1)\n{\nfSelected = 1.0;\nvertexColor = selectedColor;\n}\nfloat isHide = fract(floor(right_4)* 0.5);\nif(isHide > 0.1)\n{\nvertexColor.a = 0.0;\n}\n}\nvoid czm_s3mBatchOperation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor, inout vec4 vertexPos, inout vec4 vIsFiltByID, vec3 translation, inout vec2 fSelected)\n{\noperationType.x += 0.001;\nfloat right_2 = operationType.x * 0.5;\nfloat right_4 = right_2 * 0.5;\nfloat right_8 = right_4 * 0.5;\nfloat right_16 = right_8 * 0.5;\nfloat isSetColor = fract(right_2);\nif(isSetColor > 0.1)\n{\nfSelected.y = 1.0;\ncolor.a *= vertexColor.a;\nvertexColor = color;\n}\nfloat isPicked = fract(floor(right_2)* 0.5);\nif(isPicked > 0.1)\n{\nfSelected.x = 1.0;\n#ifdef REPLACE_SELECT_TYPE\nvertexColor = selectedColor;\n#else\nvertexColor *= selectedColor;\n#endif\n}\nfloat isHide = fract(floor(right_4)* 0.5);\nif(isHide > 0.1)\n{\nvertexColor.a = 0.0;\n}\nfloat isOffset = fract(floor(right_8)* 0.5);\nif(isOffset > 0.1)\n{\nvertexPos.xyz += translation;\n}\nfloat isClip = fract(floor(right_16) * 0.5);\nif(isClip > 0.1)\n{\nvIsFiltByID.x = 1.0;\n}\n}\n",czm_S3MPBR="uniform float u_metallicFactor;\nuniform float u_roughnessFactor;\nuniform vec4 u_emissiveFactor;\nuniform vec4 u_baseColorFactor;\nuniform float u_alphaCutoff;\nuniform sampler2D u_baseColorTexture;\nuniform sampler2D u_metallicRoughnessTexture;\nuniform sampler2D u_normalTexture;\nuniform sampler2D u_occlusionTexture;\nuniform sampler2D u_emissiveTexture;\nuniform vec4 u_baseColorUVOffsetAndTiling;\nuniform vec4 u_emissiveUVOffsetAndTiling;\nuniform float uSunLightON;\n#if DIR_LIGHTS > 0\nuniform vec3 uDirectionalLightDirectionEC[ DIR_LIGHTS ];\nuniform vec3 uDirectionalLightColor[ DIR_LIGHTS ];\n#endif\n#if POINT_LIGHTS > 0\nuniform vec3 uPointLightPositionEC[ POINT_LIGHTS ];\nuniform vec3 uPointLightColor[ POINT_LIGHTS ];\nuniform vec2 uPointLightDistanceAndDecay[ POINT_LIGHTS ];\n#endif\n#if SPOT_LIGHTS > 0\nuniform vec3 uSpotLightColor[ SPOT_LIGHTS ];\nuniform vec3 uSpotLightPositionEC[ SPOT_LIGHTS ];\nuniform vec3 uSpotLightDirectionEC[ SPOT_LIGHTS ];\nuniform vec3 uSpotLightDistanceDecayCos[ SPOT_LIGHTS ];\nuniform vec3 uSpotLightExponent[ SPOT_LIGHTS ];\n#endif\nconst float M_PI = 3.141592653589793;\nvec3 lambertianDiffuse(vec3 diffuseColor)\n{\nreturn diffuseColor / M_PI;\n}\nvec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH)\n{\nreturn f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\nvec3 fresnelSchlick(float metalness, float VdotH)\n{\nreturn metalness + (vec3(1.0) - metalness) * pow(1.0 - VdotH, 5.0);\n}\nvec3 F_Schlick(float ndv, vec3 spec)\n{\nreturn spec + (vec3(1.0) - spec) * pow(1.0 - ndv, 5.0);\n}\nfloat D_Phong(float g, float ndh)\n{\nfloat a = pow(8192.0, g);\nreturn (a + 2.0) / 8.0 * pow(ndh, a);\n}\nfloat smithVisibilityG1(float NdotV, float roughness)\n{\nfloat k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\nreturn NdotV / (NdotV * (1.0 - k) + k);\n}\nfloat smithVisibilityGGX(float roughness, float NdotL, float NdotV)\n{\nreturn smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n}\nfloat GGX(float roughness, float NdotH)\n{\nfloat roughnessSquared = roughness * roughness;\nfloat f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\nreturn roughnessSquared / (M_PI * f * f);\n}\nvoid getLightColor(vec3 lightDir, vec3 viewDir, vec3 normal, vec3 lightColor, vec3 fresnelTerm, float roughness, out vec3 diffuseTerm, out vec3 specularTerm)\n{\nvec3 h = normalize(viewDir + lightDir);\nfloat NdotL = clamp(dot(normal, lightDir), 0.001, 1.0);\nfloat NdotH = clamp(dot(normal, h), 0.0, 1.0);\nvec3 li = lightColor * NdotL;\ndiffuseTerm = li;\nspecularTerm = li * fresnelTerm * D_Phong(1.0 - roughness, NdotH);\n}\nvec3 SRGBtoLINEAR3(vec3 srgbIn)\n{\nreturn pow(srgbIn, vec3(2.2));\n}\nvec4 SRGBtoLINEAR4(vec4 srgbIn)\n{\nvec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\nreturn vec4(linearOut, srgbIn.a);\n}\nvec3 LINEARtoSRGB(vec3 linearIn)\n{\n#ifndef HDR\nreturn pow(linearIn, vec3(1.0/2.2));\n#else\nreturn linearIn;\n#endif\n}\nfloat calcLightAttenuation(float lightDistance, float cutoffDistance, float decayExponent)\n{\nreturn pow(clamp(1.0 - lightDistance / cutoffDistance, 0.0, 1.0), decayExponent);\n}\nvec4 czm_S3MPBR(vec3 normalEC, vec3 positionEC, vec2 texCoord, vec4 vertexColor)\n{\nvec3 ng = normalize(normalEC);\nvec3 positionWC = (czm_inverseView * vec4(positionEC, 1.0)).xyz;\n#ifdef HAS_NORMAL_TEXTURE\nvec3 pos_dx = dFdx(positionEC);\nvec3 pos_dy = dFdy(positionEC);\nvec3 tex_dx = dFdx(vec3(texCoord, 0.0));\nvec3 tex_dy = dFdy(vec3(texCoord, 0.0));\nvec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\nt = normalize(t - ng * dot(ng, t));\nvec3 b = normalize(cross(ng, t));\nmat3 tbn = mat3(t, b, ng);\nvec3 n = texture2D(u_normalTexture, texCoord).rgb;\nn = normalize(tbn * (2.0 * n - 1.0));\n#else\nvec3 n = ng;\n#endif\nvec3 v = -normalize(positionEC);\n#ifdef DOUBLE_SIDED\nif (dot(n, v) < 0.0) {\nn = -n;\n}\n#endif\n#ifdef HAS_BASECOLOR_TEXTURE\nvec2 baseColorTexCoord = texCoord;\nbaseColorTexCoord = baseColorTexCoord * u_baseColorUVOffsetAndTiling.zw + u_baseColorUVOffsetAndTiling.xy;\nvec4 baseColorWithAlpha = SRGBtoLINEAR4(texture2D(u_baseColorTexture, baseColorTexCoord));\nbaseColorWithAlpha *= u_baseColorFactor;\n#else\nvec4 baseColorWithAlpha = u_baseColorFactor;\n#endif\nbaseColorWithAlpha *= vertexColor;\nvec3 baseColor = baseColorWithAlpha.rgb;\n#ifdef HAS_METALLICROUGHNESS_TEXTURE\nvec3 metallicRoughness = texture2D(u_metallicRoughnessTexture, texCoord).rgb;\nfloat metalness = clamp(metallicRoughness.b, 0.0, 1.0);\nfloat roughness = clamp(metallicRoughness.g, 0.04, 1.0);\nmetalness *= u_metallicFactor;\nroughness *= u_roughnessFactor;\n#else\nfloat metalness = clamp(u_metallicFactor, 0.0, 1.0);\nfloat roughness = clamp(u_roughnessFactor, 0.04, 1.0);\n#endif\nvec3 f0 = vec3(0.04);\nvec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\nvec3 specularColor = mix(f0, baseColor, metalness);\nfloat NdotV = abs(dot(n, v)) + 0.001;\nvec3 diffuseTerm = vec3(0.0);\nvec3 specularTerm = vec3(0.0);\nvec3 fresnelTerm = F_Schlick(NdotV, specularColor);\nvec3 color = vec3(0.0);\nvec3 lightDiffuseTerm = vec3(0.0);\nvec3 lightSpecularTerm = vec3(0.0);\ngetLightColor(czm_sunDirectionEC, v, n, vec3(0.8), fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\ndiffuseTerm +=lightDiffuseTerm * uSunLightON;\nspecularTerm += lightSpecularTerm * uSunLightON;\n#if DIR_LIGHTS > 0\nfor (int i = 0; i < DIR_LIGHTS; i++) {\ngetLightColor(uDirectionalLightDirectionEC[i], v, n, uDirectionalLightColor[i], fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\ndiffuseTerm +=lightDiffuseTerm;\nspecularTerm += lightSpecularTerm;\n}\n#endif\n#if POINT_LIGHTS > 0\nfor (int i = 0; i < POINT_LIGHTS; i++) {\nvec3 lVector = uPointLightPositionEC[i] - v_positionEC;\nfloat lightDistance = length(lVector);\nfloat lightAttenuation = calcLightAttenuation(lightDistance, uPointLightDistanceAndDecay[i].x, uPointLightDistanceAndDecay[i].y);\nif(lightAttenuation < 0.001) {\ncontinue;\n}\nvec3 pointLightColor = uPointLightColor[i] * lightAttenuation;\nvec3 lightDiffuseTerm = vec3(0.0);\nvec3 lightSpecularTerm = vec3(0.0);\ngetLightColor(normalize(lVector), v, n, pointLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\ndiffuseTerm +=lightDiffuseTerm;\nspecularTerm += lightSpecularTerm;\n}\n#endif\n#if SPOT_LIGHTS > 0\nfor (int i = 0; i < SPOT_LIGHTS; i++) {\nvec3 lVector = uSpotLightPositionEC[i] - v_positionEC;\nfloat lightDistance = length(lVector);\nfloat lightAttenuation = calcLightAttenuation(lightDistance, uSpotLightDistanceDecayCos[i].x, uSpotLightDistanceDecayCos[i].y);\nif(lightAttenuation < 0.001) {\ncontinue;\n}\nfloat spotEffect = dot(uSpotLightDirectionEC[i], normalize(lVector));\nif(spotEffect > uSpotLightDistanceDecayCos[i].z) {\nvec3 spotLightColor = uSpotLightColor[i] * lightAttenuation * spotEffect;\nvec3 lightDiffuseTerm = vec3(0.0);\nvec3 lightSpecularTerm = vec3(0.0);\ngetLightColor(normalize(lVector), v, n, spotLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\ndiffuseTerm +=lightDiffuseTerm;\nspecularTerm += lightSpecularTerm;\n}\n}\n#endif\ncolor = baseColor;\ncolor *= max(diffuseTerm, vec3(0.0));\ncolor += max(specularTerm, vec3(0.0));\n#ifdef USE_IBL_LIGHTING\nvec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\nfloat vertexRadius = length(positionWC);\nfloat horizonDotNadir = 1.0 - min(1.0, 6378137.0 / vertexRadius);\nfloat reflectionDotNadir = dot(r, normalize(positionWC));\nr.x = -r.x;\nr = -normalize(czm_temeToPseudoFixed * r);\nr.x = -r.x;\nfloat inverseRoughness = 1.04 - roughness;\ninverseRoughness *= inverseRoughness;\nvec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\nfloat atmosphereHeight = 0.05;\nfloat blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\nfloat blendRegionOffset = roughness * -1.0;\nfloat farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\nfloat aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\nfloat farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\nfloat smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\nvec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\nvec3 nadirColor = belowHorizonColor * 0.5;\nvec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\nvec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\nvec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\nvec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\nfloat diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\nfloat diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\nvec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\nfloat notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\nvec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\nspecularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\nspecularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\nvec2 iblFactor = vec2(1.0);\nfloat luminanceAtZenith = 0.5;\n#ifdef USE_SUN_LUMINANCE\nfloat LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * czm_sunDirectionEC), normalize(positionWC * -1.0)), 0.001, 1.0);\nfloat S = acos(LdotZenith);\nfloat NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\nfloat sunNdotL = clamp(dot(n, czm_sunDirectionEC), 0.001, 1.0);\nfloat gamma = acos(sunNdotL);\nfloat numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(sunNdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\nfloat denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\nfloat luminance = luminanceAtZenith * (numerator / denominator);\n#endif\nvec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, 1.0 - roughness)).rg;\nvec3 IBLColor = (diffuseIrradiance * diffuseColor * iblFactor.x) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * iblFactor.y);\n#ifdef USE_SUN_LUMINANCE\ncolor += IBLColor * luminance;\n#else\ncolor += IBLColor;\n#endif // end of USE_SUN_LUMINANCE\n#endif // end of USE_IBL_LIGHTING\n#ifdef HAS_OCCLUSION_TEXTURE\ncolor *= texture2D(u_occlusionTexture, texCoord).r;\n#endif\n#ifdef HAS_EMISSIVE_TEXTURE\nvec2 emissiveTexCoord = texCoord;\nemissiveTexCoord = emissiveTexCoord * u_emissiveUVOffsetAndTiling.zw + u_emissiveUVOffsetAndTiling.xy;\nvec3 emissive = SRGBtoLINEAR3(texture2D(u_emissiveTexture, emissiveTexCoord).rgb);\nemissive *= u_emissiveFactor.rgb;\ncolor += emissive;\n#else\ncolor += u_emissiveFactor.rgb;\n#endif\ncolor = LINEARtoSRGB(color);\nvec4 resultColor = vec4(color, 1.0);\n#ifdef MASK\nif (baseColorWithAlpha.a < u_alphaCutoff)\n{\ndiscard;\n}\nresultColor = vec4(color, 1.0);\n#endif\n#ifdef BLEND\nresultColor = vec4(color, baseColorWithAlpha.a);\n#endif\nreturn resultColor;\n}\n",czm_sampleAndBlend="uniform float uParentMixDirection;\nuniform vec4 u_pickIDColor;\n#ifdef Apply_ImageryClip\nuniform sampler2D uModifyRasterTexture;\n#endif\nvec4 czm_sampleAndBlend(\nvec4 previousColor,\nsampler2D textureToSample,\nvec2 tileTextureCoordinates,\nvec4 textureCoordinateRectangle,\nvec4 textureCoordinateTranslationAndScale,\nvec4 transparentBackColor,\nbool imageryClipEnable,\nbool flipY,\nfloat textureAlpha,\nfloat textureBrightness,\nfloat textureContrast,\nfloat textureHue,\nfloat textureSaturation,\nfloat textureOneOverGamma,\nvec2 split,\nvec4 swipe)\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;\nif(flipY)\n{\ntextureCoordinates.y = 1.0 - textureCoordinates.y;\n}\nvec4 value = texture2D(textureToSample, textureCoordinates);\nvec3 color = value.rgb;\nfloat alpha = value.a;\nif(transparentBackColor.a > 0.01)\n{\nfloat rDiff = abs(transparentBackColor.r - color.r);\nfloat gDiff = abs(transparentBackColor.g - color.g);\nfloat bDiff = abs(transparentBackColor.b - color.b);\nif(rDiff < transparentBackColor.a && gDiff < transparentBackColor.a && bDiff < transparentBackColor.a)\n{\nalpha = 0.0;\n}\n}\nif(imageryClipEnable)\n{\n#ifdef Apply_ImageryClip\nif(texture2D(uModifyRasterTexture, tileTextureCoordinates).w < 0.1)\n{\nalpha = 0.0;\n}\n#else\nalpha = 0.0;\n#endif\n}\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\nvec2 splitPosition = czm_imagerySplitPosition;\nif (split.x < 0.0 && gl_FragCoord.x > splitPosition.x) {\nalpha = 0.0;\n}\nelse if (split.x > 0.0 && gl_FragCoord.x < splitPosition.x) {\nalpha = 0.0;\n}\nif(split.y < 0.0 && gl_FragCoord.y > splitPosition.y) {\nalpha = 0.0;\n}\nelse if(split.y > 0.0 && gl_FragCoord.y < splitPosition.y) {\nalpha = 0.0;\n}\n#if TEXTURE_UNITS < 2\nif(alpha == 0.0)\n{\ndiscard;\n}\n#endif\n#endif\n#ifdef APPLY_SWIPE\nif (gl_FragCoord.x < swipe.x || gl_FragCoord.y > swipe.y) {\nalpha = 0.0;\n}\nelse if (gl_FragCoord.x > swipe.z || gl_FragCoord.y < swipe.w) {\nalpha = 0.0;\n}\n#if TEXTURE_UNITS < 2\nif(alpha == 0.0)\n{\ndiscard;\n}\n#endif\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 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\nreturn vec4(outColor, outAlpha);\n}\nvec4 sampleAndBlendParent(\nvec4 previousColor,\nsampler2D textureToSample,\nvec2 tileTextureCoordinates,\nvec4 textureCoordinateRectangle,\nvec4 textureCoordinateTranslationAndScale,\nvec4 transparentBackColor,\nbool flipY,\nfloat textureAlpha,\nfloat textureBrightness,\nfloat textureContrast,\nfloat textureHue,\nfloat textureSaturation,\nfloat textureOneOverGamma,\nvec2 split,\nvec4 swipe)\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;\nif(flipY)\n{\ntextureCoordinates.y = 1.0 - textureCoordinates.y;\n}\nvec4 value = texture2D(textureToSample, textureCoordinates);\nif(uParentMixDirection > 0.0 && value.a > 0.01)\n{\nvalue.a = 0.0;\nbool blend = false;\nfloat mixDirection = uParentMixDirection;\nif( mixDirection > 7.0 )\n{\nif(tileTextureCoordinates.y <0.3)\n{\nblend = true;\n}\nmixDirection-=8.0;\n}\nelse if( mixDirection > 3.0)\n{\nif(tileTextureCoordinates.y >0.7)\n{\nblend = true;\n}\nmixDirection-=4.0;\n}\nif(blend)\n{\nfloat mixY = abs(tileTextureCoordinates.y-0.5);\nfloat mixValue = 10.0*mixY;\nmixValue = clamp((mixValue - 4.0), 0.0, 1.0);\nvalue.a = mixValue;\n}\nblend = false;\nif( mixDirection > 1.5)\n{\nif(tileTextureCoordinates.x >0.7)\n{\nblend = true;\n}\nmixDirection-=2.0;\n}\nelse if( mixDirection > 0.5)\n{\nif(tileTextureCoordinates.x <0.3)\n{\nblend = true;\n}\n}\nif(blend)\n{\nfloat mixValue = 10.0*abs(tileTextureCoordinates.x-0.5);\nmixValue = clamp((mixValue - 4.0), 0.0, 1.0);\nvalue.a = max(mixValue, value.a);\n}\n}\nvec3 color = value.rgb;\nfloat alpha = value.a;\nif(transparentBackColor.a > 0.01)\n{\nfloat rDiff = abs(transparentBackColor.r - color.r);\nfloat gDiff = abs(transparentBackColor.g - color.g);\nfloat bDiff = abs(transparentBackColor.b - color.b);\nif(rDiff < transparentBackColor.a && gDiff < transparentBackColor.a && bDiff < transparentBackColor.a)\n{\nalpha = 0.0;\n}\n}\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\nvec2 splitPosition = czm_imagerySplitPosition;\nif (split.x < 0.0 && gl_FragCoord.x > splitPosition.x) {\nalpha = 0.0;\n}\nelse if (split.x > 0.0 && gl_FragCoord.x < splitPosition.x) {\nalpha = 0.0;\n}\nif(split.y < 0.0 && gl_FragCoord.y > splitPosition.y) {\nalpha = 0.0;\n}\nelse if(split.y > 0.0 && gl_FragCoord.y < splitPosition.y) {\nalpha = 0.0;\n}\n#if TEXTURE_UNITS < 2\nif(alpha == 0.0)\n{\ndiscard;\n}\n#endif\n#endif\n#ifdef APPLY_SWIPE\nif (gl_FragCoord.x < swipe.x || gl_FragCoord.y > swipe.y) {\nalpha = 0.0;\n}\nelse if (gl_FragCoord.x > swipe.z || gl_FragCoord.y < swipe.w) {\nalpha = 0.0;\n}\n#if TEXTURE_UNITS < 2\nif(alpha == 0.0)\n{\ndiscard;\n}\n#endif\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 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\nreturn vec4(outColor, outAlpha);\n}\nvec4 mvtTextureSampleAndBlend(\nvec4 previousColor,\nsampler2D textureToSample,\nsampler2D idTextureToSample,\nvec2 tileTextureCoordinates,\nvec4 textureCoordinateRectangle,\nvec4 textureCoordinateTranslationAndScale,\nvec4 selectColor,\nfloat textureAlpha,\nfloat textureOneOverGamma,\nvec4 swipe)\n{\n#ifdef APPLY_SWIPE\nvec2 f = step(swipe.xw, vec2(gl_FragCoord.xy));\nvec2 s = step(vec2(gl_FragCoord.xy), swipe.zy);\nif (f.x * f.y * s.x * s.y < 1.0) {\nreturn previousColor;\n};\n#endif\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);\nvec4 idColor = texture2D(idTextureToSample, textureCoordinates);\nif(idColor.r == u_pickIDColor.r && idColor.g == u_pickIDColor.g && idColor.b == u_pickIDColor.b){\nvalue.rgb = selectColor.rgb;\n}\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\nfloat sourceAlpha = alpha * textureAlpha;\nfloat outAlpha = mix(previousColor.a, 1.0, sourceAlpha);\nvec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\nreturn vec4(outColor, outAlpha);\n}\nvec4 gridTextureSampleAndBlend(\nvec4 previousColor,\nsampler2D textureToSample,\nvec2 tileTextureCoordinates,\nvec4 textureCoordinateRectangle,\nvec4 textureCoordinateTranslationAndScale)\n{\nfloat textureAlpha = 1.0;\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;\nfloat sourceAlpha = alpha * textureAlpha;\nfloat outAlpha = mix(previousColor.a, 1.0, sourceAlpha);\nvec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\nreturn vec4(outColor, outAlpha);\n}\n",czm_sampleOctahedralProjection="vec3 czm_sampleOctahedralProjectionWithFiltering(sampler2D projectedMap, vec2 textureSize, vec3 direction, float lod)\n{\ndirection /= dot(vec3(1.0), abs(direction));\nvec2 rev = abs(direction.zx) - vec2(1.0);\nvec2 neg = vec2(direction.x < 0.0 ? rev.x : -rev.x,\ndirection.z < 0.0 ? rev.y : -rev.y);\nvec2 uv = direction.y < 0.0 ? neg : direction.xz;\nvec2 coord = 0.5 * uv + vec2(0.5);\nvec2 pixel = 1.0 / textureSize;\nif (lod > 0.0)\n{\nfloat scale = 1.0 / pow(2.0, lod);\nfloat offset = ((textureSize.y + 1.0) / textureSize.x);\ncoord.x *= offset;\ncoord *= scale;\ncoord.x += offset + pixel.x;\ncoord.y += (1.0 - (1.0 / pow(2.0, lod - 1.0))) + pixel.y * (lod - 1.0) * 2.0;\n}\nelse\n{\ncoord.x *= (textureSize.y / textureSize.x);\n}\n#ifndef OES_texture_float_linear\nvec3 color1 = texture2D(projectedMap, coord + vec2(0.0, pixel.y)).rgb;\nvec3 color2 = texture2D(projectedMap, coord + vec2(pixel.x, 0.0)).rgb;\nvec3 color3 = texture2D(projectedMap, coord + pixel).rgb;\nvec3 color4 = texture2D(projectedMap, coord).rgb;\nvec2 texturePosition = coord * textureSize;\nfloat fu = fract(texturePosition.x);\nfloat fv = fract(texturePosition.y);\nvec3 average1 = mix(color4, color2, fu);\nvec3 average2 = mix(color1, color3, fu);\nvec3 color = mix(average1, average2, fv);\n#else\nvec3 color = texture2D(projectedMap, coord).rgb;\n#endif\nreturn color;\n}\nvec3 czm_sampleOctahedralProjection(sampler2D projectedMap, vec2 textureSize, vec3 direction, float lod, float maxLod) {\nfloat currentLod = floor(lod + 0.5);\nfloat nextLod = min(currentLod + 1.0, maxLod);\nvec3 colorCurrentLod = czm_sampleOctahedralProjectionWithFiltering(projectedMap, textureSize, direction, currentLod);\nvec3 colorNextLod = czm_sampleOctahedralProjectionWithFiltering(projectedMap, textureSize, direction, nextLod);\nreturn mix(colorNextLod, colorCurrentLod, nextLod - lod);\n}\n",czm_saturation="vec3 czm_saturation(vec3 rgb, float adjustment)\n{\nconst vec3 W = vec3(0.2125, 0.7154, 0.0721);\nvec3 intensity = vec3(dot(rgb, W));\nreturn mix(intensity, rgb, adjustment);\n}\n",czm_shadowDepthCompare="float czm_sampleShadowMap(samplerCube shadowMap, vec3 d)\n{\nreturn czm_unpackDepth(textureCube(shadowMap, d));\n}\nfloat czm_sampleShadowMap(sampler2D shadowMap, vec2 uv)\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\nreturn texture2D(shadowMap, uv).r;\n#else\nreturn czm_unpackDepth(texture2D(shadowMap, uv));\n#endif\n}\nfloat czm_shadowDepthCompare(samplerCube shadowMap, vec3 uv, float depth)\n{\nreturn step(depth, czm_sampleShadowMap(shadowMap, uv));\n}\nfloat czm_shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)\n{\nreturn step(depth, czm_sampleShadowMap(shadowMap, uv));\n}\n",czm_shadowVisibility="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",czm_signNotZero="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",czm_sketchMode="uniform sampler2D uNormalDepthTexture;\nuniform int uFillStyle;\nfloat edgeDetection(float lineWidth)\n{\nvec2 center = gl_FragCoord.xy / czm_globeDepthTextureDim.xy;\nvec2 off = lineWidth / czm_globeDepthTextureDim.xy;\nvec4 tex_nw = vec4(center.x+off.x, center.y+off.y, 1.0, 1.0);\nvec4 val_nw = texture2D(uNormalDepthTexture, tex_nw.xy);\nval_nw.xyz = (val_nw.xyz * 2.0) - 1.0;\nvec4 tex_ne = vec4(center.x-off.x, center.y+off.y, 1.0, 1.0);\nvec4 val_ne = texture2D(uNormalDepthTexture, tex_ne.xy);\nval_ne.xyz = (val_ne.xyz * 2.0) - 1.0;\nvec4 tex_sw = vec4(center.x+off.x, center.y-off.y, 1.0, 1.0);\nvec4 val_sw = texture2D(uNormalDepthTexture, tex_sw.xy);\nval_sw.xyz = (val_sw.xyz * 2.0 ) - 1.0;\nvec4 tex_se = vec4(center.x-off.x, center.y-off.y, 1.0, 1.0);\nvec4 val_se = texture2D(uNormalDepthTexture, tex_se.xy);\nval_se.xyz = (val_se.xyz * 2.0) - 1.0;\nfloat discontinuity = 0.0;\nfloat dot0 = dot(val_nw.xyz, val_se.xyz);\nfloat dot1 = dot(val_ne.xyz, val_sw.xyz);\ndiscontinuity = 0.5*(dot0+dot1);\nreturn discontinuity;\n}\nvec4 czm_sketchMode(vec4 inputColor, vec4 lineColor, float lineWidth)\n{\nvec4 outputColor = inputColor;\nfloat discontinuity = edgeDetection(lineWidth);\ndiscontinuity = clamp(discontinuity, 0.0, 1.0);\nif(uFillStyle == 1)\n{\noutputColor = lineColor;\noutputColor.a = (1.0 - sign(discontinuity - 0.5)) * 0.5;\noutputColor.a *= lineColor.a;\n}\nelse\n{\nvec3 mixLineColor = mix(inputColor.rgb, vec3(lineColor.rgb), lineColor.a);\noutputColor.rgb = mix(mixLineColor, inputColor.rgb, discontinuity);\n}\nreturn outputColor;\n}\n",czm_sphericalHarmonics="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",czm_tangentToEyeSpaceMatrix="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.x , tangent.y , tangent.z,\nbitangent.x, bitangent.y, bitangent.z,\nnormal.x , normal.y , normal.z);\n}\n",czm_transformPlane="vec4 czm_transformPlane(vec4 clippingPlane, mat4 transform) {\nvec3 transformedDirection = normalize((transform * vec4(clippingPlane.xyz, 0.0)).xyz);\nvec3 transformedPosition = (transform * vec4(clippingPlane.xyz * -clippingPlane.w, 1.0)).xyz;\nvec4 transformedPlane;\ntransformedPlane.xyz = transformedDirection;\ntransformedPlane.w = -dot(transformedDirection, transformedPosition);\nreturn transformedPlane;\n}\n",czm_translateRelativeToEye="vec4 czm_translateRelativeToEye(vec3 high, vec3 low)\n{\nvec3 highDifference = high - czm_encodedCameraPositionMCHigh;\nvec3 lowDifference = low - czm_encodedCameraPositionMCLow;\nreturn vec4(highDifference + lowDifference, 1.0);\n}\n",czm_translucentPhong="vec4 czm_translucentPhong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\nfloat diffuse = czm_getLambertDiffuse(vec3(0.0, 0.0, 1.0), material.normal);\nif (czm_sceneMode == czm_sceneMode3D) {\ndiffuse += czm_getLambertDiffuse(vec3(0.0, 1.0, 0.0), material.normal);\n}\ndiffuse = clamp(diffuse, 0.0, 1.0);\nfloat specular = czm_getSpecular(lightDirectionEC, toEye, material.normal, material.shininess);\nvec3 materialDiffuse = material.diffuse * 0.5;\nvec3 ambient = materialDiffuse;\nvec3 color = ambient + material.emission;\ncolor += materialDiffuse * diffuse * czm_lightColor;\ncolor += material.specular * specular * czm_lightColor;\nreturn vec4(color, material.alpha);\n}\n",czm_transpose="mat2 czm_transpose(mat2 matrix)\n{\nreturn mat2(\nmatrix[0][0], matrix[1][0],\nmatrix[0][1], matrix[1][1]);\n}\nmat3 czm_transpose(mat3 matrix)\n{\nreturn mat3(\nmatrix[0][0], matrix[1][0], matrix[2][0],\nmatrix[0][1], matrix[1][1], matrix[2][1],\nmatrix[0][2], matrix[1][2], matrix[2][2]);\n}\nmat4 czm_transpose(mat4 matrix)\n{\nreturn mat4(\nmatrix[0][0], matrix[1][0], matrix[2][0], matrix[3][0],\nmatrix[0][1], matrix[1][1], matrix[2][1], matrix[3][1],\nmatrix[0][2], matrix[1][2], matrix[2][2], matrix[3][2],\nmatrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]);\n}\n",czm_unpackDepth="float czm_unpackDepth(vec4 packedDepth)\n{\nreturn dot(packedDepth, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0));\n}\n",czm_unpackFloat="#define SHIFT_RIGHT_8 0.00390625 //1.0 / 256.0\n#define SHIFT_RIGHT_16 0.00001525878 //1.0 / 65536.0\n#define SHIFT_RIGHT_24 5.960464477539063e-8//1.0 / 16777216.0\n#define BIAS 38.0\nfloat czm_unpackFloat(vec4 packedFloat)\n{\npackedFloat *= 255.0;\nfloat temp = packedFloat.w / 2.0;\nfloat exponent = floor(temp);\nfloat sign = (temp - exponent) * 2.0;\nexponent = exponent - float(BIAS);\nsign = sign * 2.0 - 1.0;\nsign = -sign;\nfloat unpacked = sign * packedFloat.x * float(SHIFT_RIGHT_8);\nunpacked += sign * packedFloat.y * float(SHIFT_RIGHT_16);\nunpacked += sign * packedFloat.z * float(SHIFT_RIGHT_24);\nreturn unpacked * pow(10.0, exponent);\n}\n",czm_unpackValue="float czm_unpackValue(vec4 packedValue)\n{\nfloat SHIFT_LEFT16 = 65536.0;\nfloat SHIFT_LEFT8 = 256.0;\nvec4 value = packedValue * 255.0;\nreturn value.r * SHIFT_LEFT16 + value.g * SHIFT_LEFT8 + value.b - 9000.0;\n}\n",czm_vertexLogDepth="#ifdef LOG_DEPTH\nvarying float v_depthFromNearPlusOne;\n#ifdef SHADOW_MAP\nvarying vec3 v_logPositionEC;\n#endif\n#endif\nvec4 czm_updatePositionDepth(vec4 coords) {\n#if defined(LOG_DEPTH)\n#ifdef SHADOW_MAP\nvec3 logPositionEC = (czm_inverseProjection * coords).xyz;\nv_logPositionEC = logPositionEC;\n#endif\ncoords.z = clamp(coords.z / coords.w, -1.0, 1.0) * coords.w;\n#endif\nreturn coords;\n}\nvoid czm_vertexLogDepth()\n{\n#ifdef LOG_DEPTH\nv_depthFromNearPlusOne = 1.0 - czm_currentFrustum.x + gl_Position.w;\ngl_Position = czm_updatePositionDepth(gl_Position);\n#endif\n}\nvoid czm_vertexLogDepth(vec4 clipCoords)\n{\n#ifdef LOG_DEPTH\nv_depthFromNearPlusOne = 1.0 - czm_currentFrustum.x + clipCoords.w;\nczm_updatePositionDepth(clipCoords);\n#endif\n}\n",czm_windowToEyeCoordinates="vec4 czm_windowToEyeCoordinates(vec4 fragmentCoordinate)\n{\nfloat x = 2.0 * (fragmentCoordinate.x - czm_viewport.x) / czm_viewport.z - 1.0;\nfloat y = 2.0 * (fragmentCoordinate.y - czm_viewport.y) / czm_viewport.w - 1.0;\nfloat z = (fragmentCoordinate.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\nvec4 q = vec4(x, y, z, 1.0);\nq /= fragmentCoordinate.w;\nif (!(czm_inverseProjection == mat4(0.0)))\n{\nq = czm_inverseProjection * q;\n}\nelse\n{\nfloat top = czm_frustumPlanes.x;\nfloat bottom = czm_frustumPlanes.y;\nfloat left = czm_frustumPlanes.z;\nfloat right = czm_frustumPlanes.w;\nfloat near = czm_currentFrustum.x;\nfloat far = czm_currentFrustum.y;\nq.x = (q.x * (right - left) + left + right) * 0.5;\nq.y = (q.y * (top - bottom) + bottom + top) * 0.5;\nq.z = (q.z * (near - far) - near - far) * 0.5;\nq.w = 1.0;\n}\nreturn q;\n}\nvec4 czm_windowToEyeCoordinates(vec2 fragmentCoordinateXY, float depthOrLogDepth)\n{\n#ifdef LOG_DEPTH\nfloat near = czm_currentFrustum.x;\nfloat far = czm_currentFrustum.y;\nfloat log2Depth = depthOrLogDepth * czm_log2FarDepthFromNearPlusOne;\nfloat depthFromNear = pow(2.0, log2Depth) - 1.0;\nfloat depthFromCamera = depthFromNear + near;\nvec4 windowCoord = vec4(fragmentCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(windowCoord);\neyeCoordinate.w = 1.0 / depthFromCamera;\nreturn eyeCoordinate;\n#else\nvec4 windowCoord = vec4(fragmentCoordinateXY, depthOrLogDepth, 1.0);\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(windowCoord);\n#endif\nreturn eyeCoordinate;\n}\n",czm_writeDepthClampedToFarPlane="#ifndef LOG_DEPTH\nvarying float v_WindowZ;\n#endif\nvoid czm_writeDepthClampedToFarPlane()\n{\n#if defined(GL_EXT_frag_depth) && !defined(LOG_DEPTH)\ngl_FragDepthEXT = min(v_WindowZ * gl_FragCoord.w, 1.0);\n#endif\n}\n",czm_writeLogDepth="#ifdef LOG_DEPTH\nvarying float v_depthFromNearPlusOne;\n#ifdef POLYGON_OFFSET\nuniform vec2 u_polygonOffset;\n#endif\n#endif\nvoid czm_writeLogDepth(float depth)\n{\n#if (defined(GL_EXT_frag_depth) || defined(WEBGL2)) && defined(LOG_DEPTH)\nif (depth <= 0.9999999 || depth > czm_farDepthFromNearPlusOne) {\ndiscard;\n}\n#ifdef POLYGON_OFFSET\nfloat factor = u_polygonOffset[0];\nfloat units = u_polygonOffset[1];\n#ifdef GL_OES_standard_derivatives\nfloat x = dFdx(depth);\nfloat y = dFdy(depth);\nfloat m = sqrt(x * x + y * y);\ndepth += m * factor;\n#endif\n#endif\ngl_FragDepthEXT = log2(depth) * czm_oneOverLog2FarDepthFromNearPlusOne;\n#ifdef POLYGON_OFFSET\ngl_FragDepthEXT += czm_epsilon7 * units;\n#endif\n#endif\n}\nvoid czm_writeLogDepth() {\n#ifdef LOG_DEPTH\nczm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}\n",czm_writeNonPerspective="float czm_writeNonPerspective(float value, float w) {\nreturn value * w;\n}\nvec2 czm_writeNonPerspective(vec2 value, float w) {\nreturn value * w;\n}\nvec3 czm_writeNonPerspective(vec3 value, float w) {\nreturn value * w;\n}\nvec4 czm_writeNonPerspective(vec4 value, float w) {\nreturn value * w;\n}\n",czm_XYZToRGB="vec3 czm_XYZToRGB(vec3 Yxy)\n{\nconst mat3 XYZ2RGB = mat3( 3.2405, -0.9693, 0.0556,\n-1.5371, 1.8760, -0.2040,\n-0.4985, 0.0416, 1.0572);\nvec3 xyz;\nxyz.r = Yxy.r * Yxy.g / Yxy.b;\nxyz.g = Yxy.r;\nxyz.b = Yxy.r * (1.0 - Yxy.g - Yxy.b) / Yxy.b;\nreturn XYZ2RGB * xyz;\n}\n",S$M={czm_degreesPerRadian:czm_degreesPerRadian,czm_depthRange:czm_depthRange,czm_ellipsoidInverseRadii:czm_ellipsoidInverseRadii,czm_ellipsoidRadii:czm_ellipsoidRadii,czm_epsilon1:czm_epsilon1,czm_epsilon2:czm_epsilon2,czm_epsilon3:czm_epsilon3,czm_epsilon4:czm_epsilon4,czm_epsilon5:czm_epsilon5,czm_epsilon6:czm_epsilon6,czm_epsilon7:czm_epsilon7,czm_infinity:czm_infinity,czm_oneOverPi:czm_oneOverPi,czm_oneOverTwoPi:czm_oneOverTwoPi,czm_passCesium3DTile:czm_passCesium3DTile,czm_passCesium3DTileClassification:czm_passCesium3DTileClassification,czm_passCesium3DTileClassificationIgnoreShow:czm_passCesium3DTileClassificationIgnoreShow,czm_passClassification:czm_passClassification,czm_passCompute:czm_passCompute,czm_passEnvironment:czm_passEnvironment,czm_passGlobe:czm_passGlobe,czm_passGround:czm_passGround,czm_passOpaque:czm_passOpaque,czm_passOverlay:czm_passOverlay,czm_passTerrainClassification:czm_passTerrainClassification,czm_passTranslucent:czm_passTranslucent,czm_pi:czm_pi,czm_piOverFour:czm_piOverFour,czm_piOverSix:czm_piOverSix,czm_piOverThree:czm_piOverThree,czm_piOverTwo:czm_piOverTwo,czm_radiansPerDegree:czm_radiansPerDegree,czm_sceneMode2D:czm_sceneMode2D,czm_sceneMode3D:czm_sceneMode3D,czm_sceneModeColumbusView:czm_sceneModeColumbusView,czm_sceneModeMorphing:czm_sceneModeMorphing,czm_solarRadius:czm_solarRadius,czm_threePiOver2:czm_threePiOver2,czm_twoPi:czm_twoPi,czm_webMercatorMaxLatitude:czm_webMercatorMaxLatitude,czm_depthRangeStruct:czm_depthRangeStruct,czm_ellipsoid:czm_ellipsoid,czm_material:czm_material,czm_materialInput:czm_materialInput,czm_ray:czm_ray,czm_raySegment:czm_raySegment,czm_s3mMaterialInput:czm_s3mMaterialInput,czm_shadowParameters:czm_shadowParameters,czm_acesTonemapping:czm_acesTonemapping,czm_adjustColor:czm_adjustColor,czm_alphaWeight:czm_alphaWeight,czm_antialias:czm_antialias,czm_approximateSphericalCoordinates:czm_approximateSphericalCoordinates,czm_branchFreeTernary:czm_branchFreeTernary,czm_cascadeColor:czm_cascadeColor,czm_cascadeDistance:czm_cascadeDistance,czm_cascadeMatrix:czm_cascadeMatrix,czm_cascadeWeights:czm_cascadeWeights,czm_clip:czm_clip,czm_columbusViewMorph:czm_columbusViewMorph,czm_computeLightColorInFP:czm_computeLightColorInFP,czm_computeLightColorInstanceInFP:czm_computeLightColorInstanceInFP,czm_computeNormal:czm_computeNormal,czm_computePosition:czm_computePosition,czm_cosineAndSine:czm_cosineAndSine,czm_decompressTextureCoordinates:czm_decompressTextureCoordinates,czm_depthClampFarPlane:czm_depthClampFarPlane,czm_directionLight:czm_directionLight,czm_eastNorthUpToEyeCoordinates:czm_eastNorthUpToEyeCoordinates,czm_ellipsoidContainsPoint:czm_ellipsoidContainsPoint,czm_ellipsoidNew:czm_ellipsoidNew,czm_ellipsoidWgs84TextureCoordinates:czm_ellipsoidWgs84TextureCoordinates,czm_equalsEpsilon:czm_equalsEpsilon,czm_executeExcavation:czm_executeExcavation,czm_eyeOffset:czm_eyeOffset,czm_eyeToWindowCoordinates:czm_eyeToWindowCoordinates,czm_fastApproximateAtan:czm_fastApproximateAtan,czm_fog:czm_fog,czm_gammaCorrect:czm_gammaCorrect,czm_geodeticSurfaceNormal:czm_geodeticSurfaceNormal,czm_getDefaultMaterial:czm_getDefaultMaterial,czm_getEmissiveTextureColor:czm_getEmissiveTextureColor,czm_getHorizontalColor:czm_getHorizontalColor,czm_getHypsometricColor:czm_getHypsometricColor,czm_getLambertDiffuse:czm_getLambertDiffuse,czm_getSpecular:czm_getSpecular,czm_getTexColorForS3M:czm_getTexColorForS3M,czm_getTextureMatrixFromZValue:czm_getTextureMatrixFromZValue,czm_getVolumeValue:czm_getVolumeValue,czm_getVolumeValueMultiResolution:czm_getVolumeValueMultiResolution,czm_getWaterNoise:czm_getWaterNoise,czm_getWgs84EllipsoidEC:czm_getWgs84EllipsoidEC,czm_HSBToRGB:czm_HSBToRGB,czm_HSLToRGB:czm_HSLToRGB,czm_hue:czm_hue,czm_inverseGamma:czm_inverseGamma,czm_inverseMatrix:czm_inverseMatrix,czm_isEmpty:czm_isEmpty,czm_isFull:czm_isFull,czm_latitudeToWebMercatorFraction:czm_latitudeToWebMercatorFraction,czm_lineDistance:czm_lineDistance,czm_luminance:czm_luminance,czm_metersPerPixel:czm_metersPerPixel,czm_modelToWindowCoordinates:czm_modelToWindowCoordinates,czm_multiplyWithColorBalance:czm_multiplyWithColorBalance,czm_nearFarScalar:czm_nearFarScalar,czm_octDecode:czm_octDecode,czm_packDepth:czm_packDepth,czm_packValue:czm_packValue,czm_phong:czm_phong,czm_planeDistance:czm_planeDistance,czm_pointAlongRay:czm_pointAlongRay,czm_rayEllipsoidIntersectionInterval:czm_rayEllipsoidIntersectionInterval,czm_readDepth:czm_readDepth,czm_readNonPerspective:czm_readNonPerspective,czm_reverseLogDepth:czm_reverseLogDepth,czm_RGBToHSB:czm_RGBToHSB,czm_RGBToHSL:czm_RGBToHSL,czm_RGBToXYZ:czm_RGBToXYZ,czm_RollerShutter:czm_RollerShutter,czm_s3mBatchOperation:czm_s3mBatchOperation,czm_S3MPBR:czm_S3MPBR,czm_sampleAndBlend:czm_sampleAndBlend,czm_sampleOctahedralProjection:czm_sampleOctahedralProjection,czm_saturation:czm_saturation,czm_shadowDepthCompare:czm_shadowDepthCompare,czm_shadowVisibility:czm_shadowVisibility,czm_signNotZero:czm_signNotZero,czm_sketchMode:czm_sketchMode,czm_sphericalHarmonics:czm_sphericalHarmonics,czm_tangentToEyeSpaceMatrix:czm_tangentToEyeSpaceMatrix,czm_transformPlane:czm_transformPlane,czm_translateRelativeToEye:czm_translateRelativeToEye,czm_translucentPhong:czm_translucentPhong,czm_transpose:czm_transpose,czm_unpackDepth:czm_unpackDepth,czm_unpackFloat:czm_unpackFloat,czm_unpackValue:czm_unpackValue,czm_vertexLogDepth:czm_vertexLogDepth,czm_windowToEyeCoordinates:czm_windowToEyeCoordinates,czm_writeDepthClampedToFarPlane:czm_writeDepthClampedToFarPlane,czm_writeLogDepth:czm_writeLogDepth,czm_writeNonPerspective:czm_writeNonPerspective,czm_XYZToRGB:czm_XYZToRGB},o$U="\n#ifdef HAS_RAIN\nuniform float uAnimationSpeed;\nuniform sampler2D uRippleTexture;\nuniform float uRippleScale;\nuniform float uWindIntensity;\nuniform float uRain;\nuniform float uCameraDepth;\n \nvoid getTimeInfo(float animationSpeed, out vec2 timeVec)\n{\n\tfloat time = czm_frameNumber * animationSpeed;\n\ttime = floor(30.0 * time);\n\tfloat time_diff = floor(time*0.25);\n\ttime = mod(time, 4.0);\n\ttime_diff = mod(time_diff, 4.0);\n\ttimeVec = vec2(time, time_diff);\n}\n\nvoid getPosInfo(vec4 posMC, out vec2 posMC_frac1, out vec2 posMC_frac2)\n{\n\tfloat ripple_scale = 1.0 / uRippleScale;\n\tvec2 posXY = posMC.xy * ripple_scale;\n\tposMC_frac1 = fract(posXY);\n\tvec2 posStep = vec2(0.5);\n\tposMC_frac2 = fract(posXY + posStep);\n}\n\nfloat getAlpha(vec2 posMC_frac1)\n{\n\tvec2 dist = (posMC_frac1 - vec2(0.5)) * 2.0;\n\tdist = vec2(abs(dist.x), abs(dist.y));\n\tvec2 result = pow(dist, vec2(5.0));\n\treturn result.x + result.y;\n}\n\nvec4 getRippleValue(sampler2D uRippleTexture, vec2 timeVec, vec2 posMC_frac1, vec2 posMC_frac2, float alpha)\n{\n\tvec2 rippleUV_1 = (timeVec + posMC_frac1)*0.25;\n\tvec2 rippleUV_2 = (timeVec + posMC_frac2)*0.25;\n\tvec4 rippleValue_1 = texture2D(uRippleTexture, rippleUV_1.xy);\n\tvec4 rippleValue_2 = texture2D(uRippleTexture, rippleUV_2.xy);\n\treturn mix(rippleValue_1, rippleValue_2, alpha);\n}\n\nvec3 getRippleNormal(vec4 rippleValue, float wind_intensity, float rain, float depthFade)\n{\n\tvec2 rippleValueXY = rippleValue.xy;\n\tvec2 rippleValueZW = rippleValue.zw;\n\tconst vec2 _value = vec2(0.5);\n\tvec2 part_1 = (rippleValueZW - _value) * wind_intensity * 0.13;\n\tvec2 part_2 = (rippleValueXY - _value) * 0.6;\n\tvec2 mergedValue = mix(part_1, part_2, rain) * depthFade;\n\treturn vec3(mergedValue, 1.0);\n}\n\nfloat getNormalAlpha(vec3 normalWS,float wetness)\n{\n\tfloat valueZ = normalWS.z - 0.5;\n\tfloat wet_correction = wetness * clamp(valueZ * 2.5, 0.0, 1.0);\n\treturn pow(wet_correction, 15.0);\n}\n\nvec3 rippleNormalCorrection(vec3 rippleNormal,float normalAlpha)\n{\n\tconst vec3 blueNormal = vec3(0.0, 0.0, 1.0);\n\treturn mix(blueNormal, rippleNormal, normalAlpha);\n}\n\nvec3 rippleGenerator(sampler2D uRippleTexture, float animationSpeed,vec3 normalWS,float wetness)\n{\n\tvec2 timeVec = vec2(1.0);\n\tgetTimeInfo(animationSpeed, timeVec);\n\tvec2 posMC_frac1 = vec2(1.0);\n\tvec2 posMC_frac2 = vec2(1.0);\n\tgetPosInfo(vPositionMC, posMC_frac1, posMC_frac2);\n\tfloat alpha = getAlpha(posMC_frac1);\n\tvec4 rippleValue = getRippleValue(uRippleTexture, timeVec, posMC_frac1, posMC_frac2, alpha);\n\tvec3 rippleNormal = getRippleNormal(rippleValue, uWindIntensity, uRain, uCameraDepth);\n\tfloat normalAlpha = getNormalAlpha(normalWS, wetness);\n\treturn normalize(rippleNormalCorrection(rippleNormal, normalAlpha));\n}\n#endif\n",r$L="\n#ifdef HAS_SNOW\nuniform float uSnowCoverageFactor;\nuniform sampler2D uSnowMaskTexture;\nuniform sampler2D uSnowNormalTexture;\n\nvec3 getSnowMaskValue(sampler2D uSnowMaskTexture, vec2 snowUV)\n{\n\treturn texture2D(uSnowMaskTexture, snowUV).rgb;\n}\n\nfloat getSnowCoverage(float snow_coverage, float max_snow_coverage, vec3 normalWS, float z_mask)\n{\n\tfloat normal_z = normalWS.z;\n\tnormal_z += 1.1 + z_mask;\n\tnormal_z = clamp(normal_z * 0.5, 0.0, 1.0);\n\tfloat final_snow_coverage = clamp(snow_coverage, 0.0, max_snow_coverage);\n\tfinal_snow_coverage = clamp(final_snow_coverage*normal_z, 0.0, 1.0);\n\treturn final_snow_coverage;\n}\n\nfloat getSnowCoverageWithMaskTexture(float finalSnowCoverage, float heightValue, float snow_scatter_value, float snow_scatter_alpha, float tighten_value)\n{\n\tfloat scatter_value = mix(heightValue, snow_scatter_value, snow_scatter_alpha);\n\treturn clamp((tighten_value + 1.0) * finalSnowCoverage - tighten_value * scatter_value, 0.0, 1.0);\n}\n\nfloat getSnowAlpha(vec3 normalWS, float snow_coverage, float z_mask)\n{\n\treturn clamp((normalWS.z + z_mask) * 5.0, 0.0, 1.0) * snow_coverage;\n}\n\nvec3 getFinalBaseColor(vec3 baseColor, vec3 snow_baseColor, float snowAlpha)\n{\n\treturn mix(baseColor, snow_baseColor, snowAlpha);\n}\n\nfloat getFinalRoughness(float roughness, float snow_roughness, float snowAlpha)\n{\n\treturn mix(roughness, snow_roughness, snowAlpha);\n}\n\nvec3 getFinalNormal(vec3 normalWS, vec3 snowNormal, float blendNormalValue, float snow_coverage)\n{\n\tvec3 snowNormal_part2 = vec3(snowNormal.xy - vec2(0.5), 1.0);\n\tfloat normal_alpha = (1.0 - blendNormalValue)* snow_coverage;\n\treturn mix(normalWS, snowNormal_part2, normal_alpha);\n}\n\nvoid snowGenerator(sampler2D uSnowMaskTexture, sampler2D uSnowNormalTexture, vec2 snowUV, float snow_coverage, inout vec3 normalWS, inout vec3 baseColor, inout float roughness)\n{\n\tvec3 snowMaskValue = texture2D(uSnowMaskTexture, snowUV).rgb;\n\tconst float max_snow_coverage = 1.0;\n\tconst float z_mask = 0.0;\n\tfloat snowCoverage = getSnowCoverage(snow_coverage, max_snow_coverage, normalWS, z_mask);\n\tconst float heightValue = 0.5;\n\tfloat snow_scatter_value = snowMaskValue.g;\n\tconst float snow_scatter_alpha = 0.5;\n\tconst float tighten_value = 4.0;\n snowCoverage = getSnowCoverageWithMaskTexture(snowCoverage, heightValue, snow_scatter_value, snow_scatter_alpha, tighten_value);\n\tfloat snow_alpha = getSnowAlpha(normalWS, snowCoverage, z_mask);\n\tbaseColor = getFinalBaseColor(baseColor, vec3(snowMaskValue.r), snow_alpha);\n\troughness = getFinalRoughness(roughness, snowMaskValue.b, snow_alpha);\n\tvec3 snowNormalValue = texture2D(uSnowNormalTexture, snowUV).rgb;\n\tconst float blendNormalValue = 0.3;\n\tnormalWS = getFinalNormal(normalWS, snowNormalValue, blendNormalValue, snowCoverage);\n}\n\n#endif\n",t$T="\n#ifdef HAS_HEMISPHERE_LIGHTS\n\nuniform vec3 uSkyColor[ HEMISPHERE_LIGHTS ];\nuniform vec3 uGroundColor[ HEMISPHERE_LIGHTS ];\nuniform vec3 uHemisphereLightDirectionEC[ HEMISPHERE_LIGHTS ];\n \nstruct HemisphereLight {\n vec3 direction;\n vec3 skyColor;\n vec3 groundColor;\n};\n\nvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n float dotNL = dot( geometry.normal, hemiLight.direction );\n float hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n return irradiance;\n}\n\n#endif\n",e$1x="\n#ifdef HAS_POINT_LIGHTS\n\nuniform vec3 uPointLightPositionEC[ POINT_LIGHTS ];\nuniform vec3 uPointLightColor[ POINT_LIGHTS ];\nuniform vec2 uPointLightDistanceAndDecay[ POINT_LIGHTS ];\n\nstruct PointLight {\n vec3 position;\n vec3 color;\n float distance;\n float decay;\n};\n\nvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n vec3 lVector = pointLight.position - geometry.position;\n directLight.direction = normalize( lVector );\n float lightDistance = length( lVector );\n directLight.color = pointLight.color;\n directLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n directLight.visible = ( directLight.color != vec3( 0.0 ) );\n}\n\n#endif\n",i$$="\n#ifdef HAS_SPOT_LIGHTS\n\nuniform vec3 uSpotLightColor[ SPOT_LIGHTS ];\nuniform vec3 uSpotLightPositionEC[ SPOT_LIGHTS ];\nuniform vec3 uSpotLightDirectionEC[ SPOT_LIGHTS ];\nuniform vec4 uSpotLightDistanceDecayCosPenumbra[ SPOT_LIGHTS ];\nuniform vec3 uSpotLightExponent[ SPOT_LIGHTS ];\n \nstruct SpotLight {\n vec3 position;\n vec3 direction;\n vec3 color;\n float distance;\n float decay;\n float coneCos;\n float penumbraCos;\n};\n\nvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n vec3 lVector = spotLight.position - geometry.position;\n directLight.direction = normalize( lVector );\n float lightDistance = length( lVector );\n float angleCos = dot( directLight.direction, spotLight.direction );\n if ( angleCos > spotLight.coneCos ) {\n float spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n directLight.color = spotLight.color;\n directLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n directLight.visible = true;\n } else {\n directLight.color = vec3( 0.0 );\n directLight.visible = false;\n }\n}\n\n#endif\n",m$V="\n#ifdef HAS_DIR_LIGHTS\n\nuniform vec3 uDirectionalLightDirectionEC[ DIR_LIGHTS ];\nuniform vec3 uDirectionalLightColor[ DIR_LIGHTS ];\n \n#endif\n",p$17="\n\n#ifdef HAS_DIR_LIGHTS\nfor (int i = 0; i < DIR_LIGHTS; i++) {\n directLight.color = uDirectionalLightColor[i];\n directLight.direction = uDirectionalLightDirectionEC[i];\n directLight.visible = true;\n directPhysical( directLight, geometry, material, reflectedLight );\n}\n#endif\n\n#ifdef HAS_POINT_LIGHTS\nPointLight pointLight;\nfor (int i = 0; i < POINT_LIGHTS; i++) {\n pointLight.position = uPointLightPositionEC[i];\n pointLight.color = uPointLightColor[i];\n pointLight.distance = uPointLightDistanceAndDecay[i].x;\n pointLight.decay = uPointLightDistanceAndDecay[i].y;\n getPointDirectLightIrradiance( pointLight, geometry, directLight );\n if(!directLight.visible) continue;\n directPhysical( directLight, geometry, material, reflectedLight );\n}\n#endif\n\n#ifdef HAS_SPOT_LIGHTS\nSpotLight spotLight;\nfor (int i = 0; i < SPOT_LIGHTS; i++) {\n spotLight.position = uSpotLightPositionEC[i];\n spotLight.color = uSpotLightColor[i];\n spotLight.direction = uSpotLightDirectionEC[i];\n spotLight.coneCos = uSpotLightDistanceDecayCosPenumbra[i].z;\n spotLight.penumbraCos = uSpotLightDistanceDecayCosPenumbra[i].w;\n getSpotDirectLightIrradiance( spotLight, geometry, directLight );\n if(!directLight.visible) continue;\n directPhysical( directLight, geometry, material, reflectedLight );\n}\n#endif\n",c$U="\n#ifdef BRDF\n#define RECIPROCAL_PI 0.31830988618\n#define M_PI 3.141592653589793\n#define EPSILON 1e-6\n#define CUBEUV_MAX_MIP 8.0\n#define CUBEUV_TEXEL_WIDTH 0.0013020833333333333\n#define CUBEUV_TEXEL_HEIGHT 0.0009765625\n#define saturate(a) clamp( a, 0.0, 1.0 )\nfloat pow2( const in float x ) { return x * x; }\n\nuniform vec4 uBaseColorFactor;\nuniform vec4 uEmissiveFactor;\nuniform float uMetallicFactor;\nuniform float uRoughnessFactor;\nuniform float uAlphaCutoff;\nuniform float uEnvMapIntensity;\nstruct IncidentLight {\n vec3 direction;\n vec3 color;\n bool visible;\n};\n\nstruct GeometricContext {\n vec3 position;\n vec3 normal;\n vec3 viewDir;\n};\n\nstruct PhysicalMaterial {\n vec3\tdiffuseColor;\n float\troughness;\n vec3\tspecularColor;\n float specularF90;\n};\n\nstruct ReflectedLight {\n vec3 directDiffuse;\n vec3 directSpecular;\n vec3 indirectDiffuse;\n vec3 indirectSpecular;\n};\n\n#ifdef HAS_BASE_TEXTURE\n uniform sampler2D uBaseTexture;\n#endif\n\n#ifdef HAS_NORMAL_TEXTURE\n uniform sampler2D uNormalTexture;\n uniform float uNormalTextureScale;\n#ifdef HAS_ANISOTROPY\n uniform vec4 uAnisotropy;\n#endif\n#endif\n\n#ifdef HAS_EMISSIVE_TEXTURE\n uniform sampler2D uEmissionTexture;\n uniform vec4 uEmissiveUVOffsetAndTiling;\n#endif\n\n#ifdef HAS_MetallicRoughness_TEXTURE\n uniform sampler2D uMetallicRoughnessTexture;\n#endif\n\n#ifdef HAS_OCCLUSION_TEXTURE\n uniform sampler2D uOcclusionTexture;\n#endif\n\n#ifdef REFRACTION\n uniform float uIndexOfRefraction;\n#endif\n\n#ifdef HAS_TRANSMISSION\n uniform float uTransmissionFactor;\n#endif\n\n#ifdef HAS_WETNESS\n uniform float uWetnessFactor;\n#endif\n\n#ifdef HAS_VOLUME\n uniform vec4 uTintColor;\n uniform vec4 uDiffusionDistance;\n uniform float uThickness;\n#endif\n\n#ifdef HAS_CLEARCOAT\n uniform float uClearcoatFactor;\n uniform float uClearcoatRoughnessFactor;\n#endif\n\n//参考UE4.24实现计算精确光源的衰减\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n // float d = lightDistance;\n // float r = cutoffDistance;\n // float d2 = d * d;\n // float attenuation = 1.0 / (d2 + 1.0); \n // float m = saturate(1.0 - pow(d / r, 4.0));\n // float m2 = m * m;\n // return attenuation * m2;\n if ( decayExponent > 0.0 ) {\n return pow( saturate( 1.0 - lightDistance / cutoffDistance ), decayExponent );\n }\n return 1.0;\n}\n\n#include <hemisphereLightDecl>\n#include <directionLightDecl>\n#include <pointLightDecl>\n#include <spotLightDecl>\n#include <snowDecl>\n#include <rainDecl>\n\n#ifdef HAS_ANISOTROPY\nvec3 getAnisotropicBentNormals(const vec3 T, const vec3 B, const vec3 N, const vec3 V, float anisotropy) {\n vec3 anisotropicFrameDirection = anisotropy >= 0.0 ? B : T;\n vec3 anisotropicFrameTangent = cross(normalize(anisotropicFrameDirection), V);\n vec3 anisotropicFrameNormal = cross(anisotropicFrameTangent, anisotropicFrameDirection);\n vec3 anisotropicNormal = normalize(mix(N, anisotropicFrameNormal, abs(anisotropy)));\n return anisotropicNormal;\n}\n#endif\n\n#ifdef HAS_VOLUME\nvec3 computeColorAtDistanceInMedia(vec3 color, float distance) {\n return -log(color) / distance;\n}\nvec3 cocaLambert(vec3 alpha, float distance) {\n return exp(-alpha * distance);\n}\n#endif\n\n\nvec3 sRGBToLinear(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\n\nvec4 sRGBToLinear(vec4 srgbIn)\n{\n srgbIn = srgbIn ;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n\nvec3 LinearTosRGB(vec3 linearIn) \n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else \n return linearIn;\n#endif \n}\n\nvec3 lambertianDiffuse(vec3 diffuseColor) \n{\n return diffuseColor * RECIPROCAL_PI;\n}\n\nvec3 applyTonemapping(vec3 linearIn) \n{\n vec3 color = linearIn * czm_toneMappingExposure;\n return czm_acesTonemapping(color);\n}\n\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\n\nfloat GeometrySchlickGGX(float roughness, float NoV)\n{\n float k = pow(roughness + 1.0, 2.0) / 8.0;\n return NoV / (NoV * (1.0 - k) + k);\n}\n\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n float a2 = pow2( alpha );\n float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n return RECIPROCAL_PI * a2 / pow2( denom );\n}\n\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float roughness ) {\n float alpha = roughness * roughness;\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = clamp( dot( normal, lightDir ), 0.001, 1.0 );\n float dotNV = abs( dot( normal, viewDir ) ) + 0.001;\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotLH = saturate( dot( lightDir, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( f0, f90, dotVH );\n float G = GeometrySchlickGGX(alpha, dotNV) * GeometrySchlickGGX(alpha, dotNL);\n float D = D_GGX( alpha, dotNH );\n return F * ( G * D ) / (4.0 * dotNL * dotNV);\n}\n\nvoid directPhysical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n reflectedLight.directDiffuse += irradiance * lambertianDiffuse( material.diffuseColor );\n}\n\n#ifdef HAS_NORMAL_TEXTURE\nvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n vec2 st0 = dFdx( uv.st );\n vec2 st1 = dFdy( uv.st );\n float scale = sign( st1.t * st0.s - st0.t * st1.s );\n vec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n vec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n vec3 N = normalize( surf_norm );\n mat3 tsn = mat3( S, T, N );\n vec3 mapN = texture2D( uNormalTexture, uv.xy ).xyz * 2.0 - 1.0;\n mapN.xy *= uNormalTextureScale;\n mapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n return normalize( tsn * mapN );\n}\n#endif\n\n#include <cubeUV_reflection>\n\nvec3 inverseTransformDirection( in vec3 dir ) {\n mat3 fixedToENU = mat3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n const mat3 yUpToZUp = mat3(1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0);\n return normalize( yUpToZUp * fixedToENU * dir );\n}\n\nvoid indirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * lambertianDiffuse( material.diffuseColor );\n}\n\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n float dotNV = saturate( dot( normal, viewDir ) );\n const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n vec4 r = roughness * c0 + c1;\n float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n return fab;\n}\n\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n vec2 fab = DFGApprox( normal, viewDir, roughness );\n vec3 Fr = specularColor;\n vec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n float Ess = fab.x + fab.y;\n float Ems = 1.0 - Ess;\n vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\n vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n singleScatter += FssEss;\n multiScatter += Fms * Ems;\n}\n\nvoid indirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n vec3 singleScattering = vec3( 0.0 );\n vec3 multiScattering = vec3( 0.0 );\n vec3 cosineWeightedIrradiance = irradiance;\n computeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n vec3 totalScattering = singleScattering + multiScattering;\n vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n reflectedLight.indirectSpecular += radiance * singleScattering;\n reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n\nvec3 getIBLIrradiance( const in vec3 normal ) {\n vec3 worldNormal = inverseTransformDirection( normal );\n vec4 envMapColor = textureCubeUV( czm_hdrEnvMap, worldNormal, 1.0 );\n return envMapColor.rgb;\n}\n\nvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n vec3 reflectVec = reflect( - viewDir, normal );\n reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n reflectVec = inverseTransformDirection( reflectVec );\n vec4 envMapColor = textureCubeUV( czm_hdrEnvMap, reflectVec, roughness );\n return envMapColor.rgb;\n}\n\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}\n\nuniform float uPbrParTextureWidth;\nvoid calculateMipLevel(in vec2 inTexCoord, in vec2 vecTile, in float fMaxMip, inout float mipLevel)\n{\n\tvec2 dx = dFdx(inTexCoord * vecTile.x);\n\tvec2 dy = dFdy(inTexCoord * vecTile.y);\n\tfloat dotX = dot(dx, dx);\n\tfloat dotY = dot(dy, dy);\n\tfloat dMax = max(dotX, dotY);\n\tfloat dMin = min(dotX, dotY);\n\tfloat offset = (dMax - dMin) / (dMax + dMin);\n\toffset = clamp(offset, 0.0, 1.0);\n\tfloat d = dMax * (1.0 - offset) + dMin * offset;\n\tmipLevel = 0.5 * log2(d);\n\tmipLevel = clamp(mipLevel, 0.0, fMaxMip - 1.62);\n}\n\nvec3 getTexcoordAndMipmapLevel(vec2 uv, vec4 texMatrix, float texCoordZ) {\n vec2 translate = texMatrix.xy;\n float textureWidth = texMatrix.z * uPbrParTextureWidth;\n float scale = texMatrix.z;\n float maxMipmapLevel = texMatrix.w;\n float mipLevel = 0.0;\n calculateMipLevel(uv, vec2(textureWidth), maxMipmapLevel, mipLevel);\n vec2 texCoord;\n if(texCoordZ < -9000.0)\n {\n texCoord = vec2(uv.x, uv.y);\n }\n else\n {\n texCoord = fract(uv);\n float offset = pow(2.0, mipLevel) / textureWidth;\n texCoord = clamp(texCoord, offset, 1.0 - offset);\n texCoord.x = (texCoord.x + translate.x) * scale;\n texCoord.y = (texCoord.y + translate.y) * scale;\n }\n \n return vec3(texCoord.xy, mipLevel);\n}\n\nvec4 brdf(in vec4 baseColorWithAlpha, vec2 texCoord, vec2 oriTexCoord, vec3 posEC, vec3 posMC, vec3 vertexNormalEC, vec4 sunLightColor, float sunLightON) {\n vec2 uv = oriTexCoord;\n float mipmapLevel = 0.0;\n#ifdef USE_BatchPBR\n vec3 uvAndMiplevel = getTexcoordAndMipmapLevel(oriTexCoord, vTexMatrix, vTexCoordZ.x);\n uv = uvAndMiplevel.xy;\n mipmapLevel = uvAndMiplevel.z;\n#endif\n#ifndef USE_BatchPBR\n baseColorWithAlpha = baseColorWithAlpha * uBaseColorFactor;\n#endif\n#ifdef BaseColorReplace\n baseColorWithAlpha = uBaseColorFactor;\n#endif\n float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n vec3 ng = length(vertexNormalEC) < 0.1 ? normalize(czm_normal * czm_computeNormal(posMC.xyz)) : normalize(vertexNormalEC);\n ng = ng * faceDirection;\n#ifdef HAS_BASE_TEXTURE\n #ifdef USE_BatchPBR\n baseColorWithAlpha *= sRGBToLinear(texture2DLodEXT(uBaseTexture, uv, mipmapLevel));\n #else\n baseColorWithAlpha = sRGBToLinear(texture2D(uBaseTexture, oriTexCoord)) * uBaseColorFactor * vColor;\n #endif\n#endif\n#ifdef HAS_NORMAL_TEXTURE\n vec3 n = perturbNormal2Arb(posEC, ng, oriTexCoord);\n#ifdef HAS_ANISOTROPY\n float anisotropy = uAnisotropy.b;\n vec3 anisotropyDirection = vec3(uAnisotropy.xy, 0.0);\n vec3 anisotropicTangent = normalize(tbn * anisotropyDirection);\n vec3 anisotropicBitangent = normalize(cross(tbn[2], anisotropicTangent));\n n = getAnisotropicBentNormals(anisotropicTangent, anisotropicBitangent, n, v, anisotropy);\n#endif\n#else\n vec3 n = ng;\n#endif\n#ifdef HAS_WETNESS\n mat3 fixedToENU_wetness = mat3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n vec3 normalWS_wetness = normalize(fixedToENU_wetness * n);\n#endif\n#ifdef HAS_RAIN\n n = rippleGenerator(uRippleTexture,uAnimationSpeed,normalWS_wetness,uWetnessFactor);\n#endif\n vec3 baseColor = baseColorWithAlpha.rgb;\n float roughness = uRoughnessFactor;\n float metalness = uMetallicFactor;\n vec4 emissiveFactor = uEmissiveFactor;\n vec2 emissiveTexCoord = texCoord.xy;\n#ifdef PBR_THEME\n int pbrIndex = int(vPBRIndex);\n if(vPBRIndex < 0.0)\n {\n return baseColorWithAlpha;\n }\n mat4 pbrPar = mat4(0.0);\n for(int i = 0;i < NUM_PBR_MATERIALS;i++)\n {\n if(i == pbrIndex)\n {\n pbrPar = uPBRMaterials[i];\n break;\n }\n }\n roughness = clamp(pbrPar[0][0], 0.04, 1.0);\n metalness = clamp(pbrPar[0][1], 0.0, 1.0);\n baseColor = (baseColorWithAlpha / uBaseColorFactor * vec4(pbrPar[0][2], pbrPar[0][3], pbrPar[1][0], pbrPar[1][1])).rgb;\n#endif\n#ifdef USE_BatchPBR\n metalness = vMetallicRoughness.x;\n roughness = vMetallicRoughness.y;\n emissiveFactor = vEmissiveFactor;\n emissiveTexCoord = texCoord.xy;\n#endif\n metalness = clamp(metalness, 0.0, 1.0);\n roughness = clamp(roughness, 0.0, 1.0);\n \n#ifdef HAS_MetallicRoughness_TEXTURE\n #ifdef USE_BatchPBR\n vec3 metallicRoughness = texture2DLodEXT(uMetallicRoughnessTexture, uv, mipmapLevel).rgb;\n #else\n vec3 metallicRoughness = texture2D(uMetallicRoughnessTexture, oriTexCoord).rgb;\n #endif\n metalness = clamp(metalness * metallicRoughness.r, 0.0, 1.0);\n roughness = clamp(roughness * metallicRoughness.g, 0.04, 1.0);\n#ifdef HAS_WETNESS\n float fWetness = clamp(uWetnessFactor,0.0,1.0);\n float fWetness_correction = pow(4.0*fWetness,2.0);\n fWetness_correction = clamp(fWetness_correction,clamp(fWetness,0.0,0.9),1.0);\n float fWerness_normalized = fWetness_correction * clamp(normalWS_wetness.z + 0.85,0.0,1.0);\n baseColor = mix(baseColor,baseColor*0.7,fWerness_normalized);\n roughness = mix(roughness,0.05,fWerness_normalized);\n#endif\n#ifdef HAS_SNOW\n mat3 fixedToENU_snow = mat3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n vec3 normalWS_snow = normalize(fixedToENU_snow * n);\n snowGenerator(uSnowMaskTexture,uSnowNormalTexture, oriTexCoord,uSnowCoverageFactor,normalWS_snow,baseColor,roughness);\n#endif\n#endif\n\n vec3 lightColorHdr = vec3(2.0) * uSunLightON; // 太阳光\n vec3 l = normalize(czm_lightDirectionEC);\n vec3 v = -normalize(posEC);\n vec3 h = normalize(v + l);\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n vec3 specularColor = mix(f0, baseColor, metalness);\n \n float alpha = roughness * roughness;\n float dotNL = clamp( dot( n, l ), 0.001, 1.0 );\n float dotNV = abs( dot( n, v ) ) + 0.001;\n float dotNH = saturate( dot( n, h ) );\n float dotLH = saturate( dot( l, h ) );\n float dotVH = saturate( dot( v, h ) );\n float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n float f90 = clamp(reflectance * 25.0, 0.0, 1.0);\n vec3 F = F_Schlick( specularColor, f90, dotVH );\n float G = GeometrySchlickGGX(alpha, dotNV) * GeometrySchlickGGX(alpha, dotNL);\n float D = D_GGX( alpha, dotNH );\n vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n vec3 specularContribution = F * G * D / (4.0 * dotNL * dotNV);\n \n vec3 geometryNormal = ng;\n PhysicalMaterial material;\n material.diffuseColor = diffuseColor;\n vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\n float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\n material.roughness = max( roughness, 0.0525 );\n material.roughness += geometryRoughness;\n material.roughness = min( material.roughness, 1.0 );\n material.specularColor = specularColor;\n material.specularF90 = 1.0;\n \n GeometricContext geometry;\n geometry.position = posEC;\n geometry.normal = n;\n geometry.viewDir = v;\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n reflectedLight.directDiffuse += dotNL * lightColorHdr * diffuseContribution;\n reflectedLight.directSpecular += dotNL * lightColorHdr * specularContribution;\n \n IncidentLight directLight; \n #include <lightSourceImpl>\n \n vec3 irradiance = vec3(0.0);\n vec3 radiance = vec3(0.0);\n \n#ifdef HAS_HEMISPHERE_LIGHTS\n HemisphereLight hemiLight;\n hemiLight.skyColor = uSkyColor[0];\n hemiLight.groundColor = uGroundColor[0];\n hemiLight.direction = normalize(czm_normal * vec3(0.0, 0.0, 1.0));\n irradiance += getHemisphereLightIrradiance( hemiLight, geometry );\n#endif\n\n#ifdef IBL\n\n#ifdef KtxEnvMap\n mat3 fixedToENU = mat3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n const mat3 yUpToZUp = mat3(-1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0);\n vec3 cubeDir = normalize( yUpToZUp * fixedToENU * reflect(-v, n) );\n vec3 worldNormal = normalize( yUpToZUp * fixedToENU * n );\n irradiance += czm_sphericalHarmonics(worldNormal, czm_sphericalHarmonicCoefficients);\n radiance += czm_sampleOctahedralProjection(czm_specularEnvironmentMaps, czm_specularEnvironmentMapSize, cubeDir, roughness * czm_specularEnvironmentMapsMaximumLOD, czm_specularEnvironmentMapsMaximumLOD);\n#else\n irradiance += getIBLIrradiance( geometry.normal );\n radiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n#endif\n \n#else\n vec3 positionWC = vec3(czm_inverseView * vec4(posEC, 1.0));\n vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n float vertexRadius = length(positionWC);\n float horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\n float reflectionDotNadir = dot(r, normalize(positionWC));\n r.x = -r.x;\n r = -normalize(czm_temeToPseudoFixed * r);\n r.x = -r.x;\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n float atmosphereHeight = 0.05;\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n \n float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * czm_sunDirectionEC), normalize(positionWC * -1.0)), 0.001, 1.0);\n float S = acos(LdotZenith);\n float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n float sunNdotL = clamp(dot(n, czm_sunDirectionEC), 0.001, 1.0);\n float gamma = acos(sunNdotL);\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(sunNdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n float luminance = 0.2 * (numerator / denominator);\n irradiance += diffuseIrradiance * luminance;\n radiance += specularIrradiance * luminance;\n#endif\n irradiance *= uEnvMapIntensity;\n radiance *= uEnvMapIntensity;\n\n indirectSpecular_Physical(radiance, irradiance, geometry, material, reflectedLight);\n\n#ifdef HAS_OCCLUSION_TEXTURE\n #ifdef USE_BatchPBR\n float ambientOcclusion = texture2DLodEXT(uOcclusionTexture, uv, mipmapLevel).r;\n #else\n float ambientOcclusion = texture2D(uOcclusionTexture, oriTexCoord.xy).r;\n #endif\n reflectedLight.indirectDiffuse *= ambientOcclusion;\n#ifdef IBL\n reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n#endif\n#endif\n\nvec3 color = reflectedLight.directDiffuse + reflectedLight.directSpecular + reflectedLight.indirectDiffuse + reflectedLight.indirectSpecular;\n\n#ifdef HAS_EMISSIVE_TEXTURE\n emissiveTexCoord = emissiveTexCoord * uEmissiveUVOffsetAndTiling.zw + uEmissiveUVOffsetAndTiling.xy;\n vec3 emissive = texture2D(uEmissionTexture, emissiveTexCoord).rgb;\n emissive *= emissiveFactor.rgb;\n color += emissive;\n#else\n color += emissiveFactor.rgb;\n#endif\n\n color = applyTonemapping(color);\n color = LinearTosRGB(color);\n \n#ifdef MASK\n if (baseColorWithAlpha.a < uAlphaCutoff)\n {\n discard;\n }\n return vec4(color.rgb, 1.0);\n#endif\n return vec4(color.rgb, baseColorWithAlpha.a);\n}\n#endif\n",f$_="\n#ifdef SERVEREXCAVATION\nuniform sampler2D uServerExcavationTexture;\nuniform float uServerExcavationMode;\nuniform vec4 uServerExcavationRect;\nvarying vec4 vServerExcavationVertexPos;\nvec2 CalculateServerExcavationPolyTexCoord(vec4 vertexPos, vec4 rectPos, out float ptInRect)\n{\n vec2 vecRatio = vec2(rectPos.z - rectPos.x, rectPos.w - rectPos.y);\n vec2 texCoord = vec2(vertexPos.x - rectPos.x, vertexPos.y - rectPos.y);\n texCoord.x = texCoord.x / vecRatio.x;\n texCoord.y = texCoord.y / vecRatio.y;\n ptInRect = step(0.0, texCoord.x) * step(0.0, texCoord.y) * step(0.0, 1.0 - texCoord.x) * step(0.0, 1.0 - texCoord.y);\n texCoord = clamp(texCoord, vec2(0.0), vec2(1.0));\n return texCoord;\n}\nbool executeServerExcavation()\n{\n float hasExcavation = 1.0;\n vec2 vecExcavationTexCoord = CalculateServerExcavationPolyTexCoord(vServerExcavationVertexPos, uServerExcavationRect, hasExcavation);\n bool excavationInside = (uServerExcavationMode < 0.5);\n if(hasExcavation < 0.1)\n {\n return !excavationInside;\n }\n if(excavationInside)\n {\n return texture2D(uServerExcavationTexture, vecExcavationTexCoord.xy).r > 0.5;\n }\n else\n {\n return texture2D(uServerExcavationTexture, vecExcavationTexCoord.xy).r < 0.5;\n }\n}\n#endif",l$X="\n #define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\t#ifdef WEBGL2\n\t\t#define texture2DGradEXT textureGrad \n\t#endif\n\n\t// These shader functions convert between the UV coordinates of a single face of\n\t// a cubemap, the 0-5 integer index of a cube face, and the direction vector for\n\t// sampling a textureCube (not generally normalized ).\n\n\tfloat getFace( vec3 direction ) {\n\n\t\tvec3 absDirection = abs( direction );\n\n\t\tfloat face = - 1.0;\n\n\t\tif ( absDirection.x > absDirection.z ) {\n\n\t\t\tif ( absDirection.x > absDirection.y )\n\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t} else {\n\n\t\t\tif ( absDirection.z > absDirection.y )\n\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t}\n\n\t\treturn face;\n\n\t}\n\n\t// RH coordinate system; PMREM face-indexing convention\n\tvec2 getUV( vec3 direction, float face ) {\n\n\t\tvec2 uv;\n\n\t\tif ( face == 0.0 ) {\n\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x ); // pos x\n\n\t\t} else if ( face == 1.0 ) {\n\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y ); // pos y\n\n\t\t} else if ( face == 2.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z ); // pos z\n\n\t\t} else if ( face == 3.0 ) {\n\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x ); // neg x\n\n\t\t} else if ( face == 4.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y ); // neg y\n\n\t\t} else {\n\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z ); // neg z\n\n\t\t}\n\n\t\treturn 0.5 * ( uv + 1.0 );\n\n\t}\n\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\n\t\tfloat face = getFace( direction );\n\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\n\t\tfloat faceSize = exp2( mipInt );\n\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\n\t\tif ( face > 2.0 ) {\n\n\t\t\tuv.y += faceSize;\n\n\t\t\tface -= 3.0;\n\n\t\t}\n\n\t\tuv.x += face * faceSize;\n\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\n\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; // disable anisotropic filtering\n\n\t}\n\n\t// These defines must match with PMREMGenerator\n\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_v0 0.339\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_v1 0.276\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_v4 0.046\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_v5 0.016\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_v6 0.0038\n\t#define cubeUV_m6 4.0\n\n\tfloat roughnessToMip( float roughness ) {\n\n\t\tfloat mip = 0.0;\n\n\t\tif ( roughness >= cubeUV_r1 ) {\n\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\n\t\t} else {\n\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness ); // 1.16 = 1.79^0.25\n\t\t}\n\n\t\treturn mip;\n\n\t}\n\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\n\t\tfloat mipF = fract( mip );\n\n\t\tfloat mipInt = floor( mip );\n\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\n\t\tif ( mipF == 0.0 ) {\n\n\t\t\treturn vec4( color0, 1.0 );\n\n\t\t} else {\n\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\n\t\t}\n\n\t}\n";const h$11={rainDecl:o$U,snowDecl:r$L,hemisphereLightDecl:t$T,pointLightDecl:e$1x,spotLightDecl:i$$,directionLightDecl:m$V,lightSourceImpl:p$17,brdf:c$U,executeServerExcavationDecl:f$_,cubeUV_reflection:l$X};function k$Y(e){return(e=e.replace(/\/\/.*/g,"")).replace(/\/\*\*[\s\S]*?\*\//gm,(function(e){for(var t=e.match(/\n/gm).length,i="",n=0;n<t;++n)i+="\n";return i}))}function E$_(e,t,i){for(var n,r=0;r<i.length;++r)i[r].name===e&&(n=i[r]);return t$$(n)||(n={name:e,glslSource:t=k$Y(t),dependsOn:[],requiredBy:[],evaluated:!1},i.push(n)),n}function P$P(e,t){if(!e.evaluated){e.evaluated=!0;var i=e.glslSource.match(/\bczm_[a-zA-Z0-9_]*/g);t$$(i)&&null!==i&&(i=i.filter((function(e,t){return i.indexOf(e)===t})),i.forEach((function(i){if(i!==e.name&&a$O._czmBuiltinsAndUniforms.hasOwnProperty(i)){var n=E$_(i,a$O._czmBuiltinsAndUniforms[i],t);e.dependsOn.push(n),n.requiredBy.push(e),P$P(n,t)}})))}}function M$14(e){for(var t=[],i=[];e.length>0;){var n=e.pop();i.push(n),0===n.requiredBy.length&&t.push(n)}for(;t.length>0;){var r=t.shift();e.push(r);for(var o=0;o<r.dependsOn.length;++o){var a=r.dependsOn[o],s=a.requiredBy.indexOf(r);a.requiredBy.splice(s,1),0===a.requiredBy.length&&t.push(a)}}for(var l=[],u=0;u<i.length;++u)0!==i[u].requiredBy.length&&l.push(i[u]);if(0!==l.length){for(var c="A circular dependency was found in the following built-in functions/structs/constants: \n",h=0;h<l.length;++h)c=c+l[h].name+"\n";throw new t$_(c)}}function Q$Y(e,t,i){var n=[],r=E$_("main",t,n);P$P(r,n),M$14(n);for(var o="",a=n.length-1;a>=0;--a)x$12(i,e)&&(n[a].glslSource=p$18.removeUnuseMacroCode(i,e,n[a].glslSource)),o=o+n[a].glslSource+"\n";return o.replace(r.glslSource,"")}function x$12(e,t){return!(!t$$(e)||!t$$(t)||!e.shaderPreprocess)}function A$10(e){return e.replace(/^[ \t]*#include +<([\w\d./]+)>/gm,(function(e,t){var i=h$11[t];if(void 0===i)throw new Error("Can not resolve #include <"+t+">");return A$10(i)}))}function I$14(e,t,i){var n,r,o,a="",s=e.sources;if(t$$(s))for(n=0,r=s.length;n<r;++n)a+="\n#line 0\n"+s[n];a=(a=k$Y(a)).replace(/#version\s+(.*?)\n/gm,(function(e,t){if(t$$(o)&&o!==t)throw new t$_("inconsistent versions found: "+o+" and "+t);return o=t,"\n"}));var l=[];a=a.replace(/#extension.*\n/gm,(function(e){return l.push(e),"\n"})),a=a.replace(/precision\s(lowp|mediump|highp)\s(float|int);/,"");var u=e.pickColorQualifier;t$$(u)&&(a=a$O.createPickFragmentShaderSource(a,u));var c="";t$$(o)&&(c="#version "+o+"\n");var h=l.length;for(n=0;n<h;n++)c+=l[n];t&&(c+="#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n\n");var d=e.defines;if(t$$(d))for(n=0,r=d.length;n<r;++n){var f=d[n];0!==f.length&&(c+="#define "+f+"\n")}if(i.webgl2&&(c+="#define OUTPUT_DECLARATION\n\n",c+="#define WEBGL2\n\n"),a=A$10(a),i.textureFloatLinear&&(c+="#define OES_texture_float_linear\n\n"),x$12(i,e)&&(a=p$18.removeUnuseMacroCode(i,e,a)),e.includeBuiltIns){var p=Q$Y(e,a,i);for(l.length=0,p=p.replace(/#extension.*\n/gm,(function(e){return l.push(e),"\n"})),h=l.length,n=0;n<h;n++)c=l[n]+c;c+=p}return c+="\n#line 0\n",c+=a,i.webgl2&&(c=A$11(c,t)),c}function a$O(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).pickColorQualifier;if(t$$(t)&&"uniform"!==t&&"varying"!==t)throw new t$_("options.pickColorQualifier must be 'uniform' or 'varying'.");this.defines=t$$(e.defines)?e.defines.slice(0):[],this.sources=t$$(e.sources)?e.sources.slice(0):[],this.pickColorQualifier=t,this.includeBuiltIns=e$1Y(e.includeBuiltIns,!0),this.name=t$$(e.name)?e.name:void 0}for(var w$12 in a$O.prototype.clone=function(){return new a$O({sources:this.sources,defines:this.defines,name:this.name,pickColorQualifier:this.pickColorQualifier,includeBuiltIns:this.includeBuiltIns})},a$O.replaceMain=function(e,t){return t="void "+t+"()",e.replace(/void\s+main\s*\(\s*(?:void)?\s*\)/g,t)},a$O.prototype.getCacheKey=function(e){const t=this.defines.slice().sort().join(","),i=this.pickColorQualifier||"";this.includeBuiltIns;return`${t}:${i}:${this.sources.join("\n")}`},a$O.prototype.createCombinedVertexShader=function(e){return I$14(this,!1,e)},a$O.prototype.createCombinedFragmentShader=function(e){return I$14(this,!0,e)},a$O._czmBuiltinsAndUniforms={},S$M)S$M.hasOwnProperty(w$12)&&(a$O._czmBuiltinsAndUniforms[w$12]=S$M[w$12]);for(var h$10 in s$1c)if(s$1c.hasOwnProperty(h$10)){var b$1e=s$1c[h$10];"function"==typeof b$1e.getDeclaration&&(a$O._czmBuiltinsAndUniforms[h$10]=b$1e.getDeclaration(h$10))}a$O.createPickVertexShaderSource=function(e){return a$O.replaceMain(e,"czm_old_main")+"\nattribute vec4 pickColor; \nvarying vec4 czm_pickColor; \nvoid main() \n{ \n czm_old_main(); \n czm_pickColor = pickColor; \n}"},a$O.createPickFragmentShaderSource=function(e,t){return a$O.replaceMain(e,"czm_old_main")+"\n"+(t+" vec4 czm_pickColor; \nvoid main() \n{ \n czm_old_main(); \n if (gl_FragColor.a == 0.0) { \n discard; \n } \n gl_FragColor = czm_pickColor; \n}")},a$O.findVarying=function(e,t){for(var i=e.sources,n=t.length,r=0;r<n;++r)for(var o=t[r],a=i.length,s=0;s<a;++s)if(-1!==i[s].indexOf(o))return o};var U$_=["v_normalEC","v_normal","aNormal"];a$O.findNormalVarying=function(e){return a$O.findVarying(e,U$_)};var T$X=["v_positionEC"];function L$Z(e,t,i,n){switch(t.type){case e.FLOAT:return new m$U(e,t,i,n);case e.FLOAT_VEC2:return new p$16(e,t,i,n);case e.FLOAT_VEC3:return new d$Z(e,t,i,n);case e.FLOAT_VEC4:return new g$P(e,t,i,n);case e.SAMPLER_2D:case e.SAMPLER_CUBE:return new _$11(e,t,i,n);case e.SAMPLER_2D_ARRAY:return new c$T(e,t,i,n);case e.INT:case e.BOOL:return new x$11(e,t,i,n);case e.INT_VEC2:case e.BOOL_VEC2:return new y$Z(e,t,i,n);case e.INT_VEC3:case e.BOOL_VEC3:return new w$11(e,t,i,n);case e.INT_VEC4:case e.BOOL_VEC4:return new T$W(e,t,i,n);case e.FLOAT_MAT2:return new A$$(e,t,i,n);case e.FLOAT_MAT3:return new E$Z(e,t,i,n);case e.FLOAT_MAT4:return new I$13(e,t,i,n);default:throw new t$Z("Unrecognized uniform type: "+t.type+' for uniform "'+i+'".')}}function m$U(e,t,i,n){this.name=i,this.value=void 0,this._value=0,this._gl=e,this._location=n}function p$16(e,t,i,n){this.name=i,this.value=void 0,this._value=new r$T,this._gl=e,this._location=n}function d$Z(e,t,i,n){this.name=i,this.value=void 0,this._value=void 0,this._gl=e,this._location=n}function g$P(e,t,i,n){this.name=i,this.value=void 0,this._value=void 0,this._gl=e,this._location=n}function _$11(e,t,i,n){this.name=i,this.value=void 0,this._gl=e,this._location=n,this.textureUnitIndex=void 0}function c$T(e,t,i,n){this.name=i,this.value=void 0,this._gl=e,this._location=n,this.textureUnitIndex=void 0,this.lastBindTextureID=void 0}function x$11(e,t,i,n){this.name=i,this.value=void 0,this._value=0,this._gl=e,this._location=n}function y$Z(e,t,i,n){this.name=i,this.value=void 0,this._value=new r$T,this._gl=e,this._location=n}function w$11(e,t,i,n){this.name=i,this.value=void 0,this._value=new a$11,this._gl=e,this._location=n}function T$W(e,t,i,n){this.name=i,this.value=void 0,this._value=new a$10,this._gl=e,this._location=n}a$O.findPositionVarying=function(e){return a$O.findVarying(e,T$X)},m$U.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1f(this._location,this.value))},p$16.prototype.set=function(){var e=this.value;r$T.equals(e,this._value)||(r$T.clone(e,this._value),this._gl.uniform2f(this._location,e.x,e.y))},d$Z.prototype.set=function(){var e=this.value;if(t$$(e.red))e$1z.equals(e,this._value)||(this._value=e$1z.clone(e,this._value),this._gl.uniform3f(this._location,e.red,e.green,e.blue));else{if(!t$$(e.x))throw new t$_('Invalid vec3 value for uniform "'+this.name+'".');a$11.equals(e,this._value)||(this._value=a$11.clone(e,this._value),this._gl.uniform3f(this._location,e.x,e.y,e.z))}},g$P.prototype.set=function(){var e=this.value;if(t$$(e.red))e$1z.equals(e,this._value)||(this._value=e$1z.clone(e,this._value),this._gl.uniform4f(this._location,e.red,e.green,e.blue,e.alpha));else{if(!t$$(e.x))throw new t$_('Invalid vec4 value for uniform "'+this.name+'".');a$10.equals(e,this._value)||(this._value=a$10.clone(e,this._value),this._gl.uniform4f(this._location,e.x,e.y,e.z,e.w))}},_$11.prototype.set=function(){var e=this._gl;e.activeTexture(e.TEXTURE0+this.textureUnitIndex);var t=this.value;e.bindTexture(t._target,t._texture)},_$11.prototype._setSampler=function(e){return this.textureUnitIndex=e,this._gl.uniform1i(this._location,e),e+1},c$T.prototype.set=function(){var e=this.value;if(!t$$(e.id)||this.lastBindTextureID!==e.id){var t=this._gl;t.activeTexture(t.TEXTURE0+this.textureUnitIndex),t.bindTexture(e._target,e._texture),this.lastBindTextureID=e.id}},c$T.prototype._setSampler=function(e){return this.textureUnitIndex=e,this._gl.uniform1i(this._location,e),e+1},x$11.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1i(this._location,this.value))},y$Z.prototype.set=function(){var e=this.value;r$T.equals(e,this._value)||(r$T.clone(e,this._value),this._gl.uniform2i(this._location,e.x,e.y))},w$11.prototype.set=function(){var e=this.value;a$11.equals(e,this._value)||(a$11.clone(e,this._value),this._gl.uniform3i(this._location,e.x,e.y,e.z))},T$W.prototype.set=function(){var e=this.value;a$10.equals(e,this._value)||(a$10.clone(e,this._value),this._gl.uniform4i(this._location,e.x,e.y,e.z,e.w))};var q$17=new Float32Array(4);function A$$(e,t,i,n){this.name=i,this.value=void 0,this._value=new u$14,this._gl=e,this._location=n}A$$.prototype.set=function(){if(!u$14.equalsArray(this.value,this._value,0)){u$14.clone(this.value,this._value);var e=u$14.toArray(this.value,q$17);this._gl.uniformMatrix2fv(this._location,!1,e)}};var C$W=new Float32Array(9);function E$Z(e,t,i,n){this.name=i,this.value=void 0,this._value=new r$W,this._gl=e,this._location=n}E$Z.prototype.set=function(){if(!r$W.equalsArray(this.value,this._value,0)){r$W.clone(this.value,this._value);var e=r$W.toArray(this.value,C$W);this._gl.uniformMatrix3fv(this._location,!1,e)}};var F$11=new Float32Array(16);function I$13(e,t,i,n){this.name=i,this.value=void 0,this._value=new c$1a,this._gl=e,this._location=n}function k$X(e,t,i,n){switch(t.type){case e.FLOAT:return new y$Y(e,t,i,n);case e.FLOAT_VEC2:return new m$T(e,t,i,n);case e.FLOAT_VEC3:return new A$_(e,t,i,n);case e.FLOAT_VEC4:return new w$10(e,t,i,n);case e.SAMPLER_2D:case e.SAMPLER_CUBE:return new v$X(e,t,i,n);case e.INT:case e.BOOL:return new T$V(e,t,i,n);case e.INT_VEC2:case e.BOOL_VEC2:return new x$10(e,t,i,n);case e.INT_VEC3:case e.BOOL_VEC3:return new F$10(e,t,i,n);case e.INT_VEC4:case e.BOOL_VEC4:return new O$Q(e,t,i,n);case e.FLOAT_MAT2:return new d$Y(e,t,i,n);case e.FLOAT_MAT3:return new E$Y(e,t,i,n);case e.FLOAT_MAT4:return new I$12(e,t,i,n);default:throw new t$Z("Unrecognized uniform type: "+t.type+' for uniform "'+i+'".')}}function y$Y(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r),this._gl=e,this._location=n[0]}function m$T(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(2*r),this._gl=e,this._location=n[0]}function A$_(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(3*r),this._gl=e,this._location=n[0]}function w$10(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(4*r),this._gl=e,this._location=n[0]}function v$X(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r),this._gl=e,this._locations=n,this.textureUnitIndex=void 0}function T$V(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(r),this._gl=e,this._location=n[0]}function x$10(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(2*r),this._gl=e,this._location=n[0]}function F$10(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(3*r),this._gl=e,this._location=n[0]}function O$Q(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(4*r),this._gl=e,this._location=n[0]}function d$Y(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(4*r),this._gl=e,this._location=n[0]}function E$Y(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(9*r),this._gl=e,this._location=n[0]}function I$12(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(16*r),this._gl=e,this._location=n[0]}I$13.prototype.set=function(){if(!c$1a.equalsArray(this.value,this._value,0)){c$1a.clone(this.value,this._value);var e=c$1a.toArray(this.value,F$11);this._gl.uniformMatrix4fv(this._location,!1,e)}},y$Y.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0;r<t;++r){var o=e[r];o!==i[r]&&(i[r]=o,n=!0)}n&&this._gl.uniform1fv(this._location,i)},m$T.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];r$T.equalsArray(a,i,r)||(r$T.pack(a,i,r),n=!0),r+=2}n&&this._gl.uniform2fv(this._location,i)},A$_.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];if(t$$(a.red))(a.red!==i[r]||a.green!==i[r+1]||a.blue!==i[r+2])&&(i[r]=a.red,i[r+1]=a.green,i[r+2]=a.blue,n=!0);else{if(!t$$(a.x))throw new t$_("Invalid vec3 value.");a$11.equalsArray(a,i,r)||(a$11.pack(a,i,r),n=!0)}r+=3}n&&this._gl.uniform3fv(this._location,i)},w$10.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];if(t$$(a.red))e$1z.equalsArray(a,i,r)||(e$1z.pack(a,i,r),n=!0);else{if(!t$$(a.x))throw new t$_("Invalid vec4 value.");a$10.equalsArray(a,i,r)||(a$10.pack(a,i,r),n=!0)}r+=4}n&&this._gl.uniform4fv(this._location,i)},v$X.prototype.set=function(){for(var e=this._gl,t=e.TEXTURE0+this.textureUnitIndex,i=this.value,n=i.length,r=0;r<n;++r){var o=i[r];e.activeTexture(t+r),e.bindTexture(o._target,o._texture)}},v$X.prototype._setSampler=function(e){this.textureUnitIndex=e;for(var t=this._locations,i=t.length,n=0;n<i;++n){var r=e+n;this._gl.uniform1i(t[n],r)}return e+i},T$V.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0;r<t;++r){var o=e[r];o!==i[r]&&(i[r]=o,n=!0)}n&&this._gl.uniform1iv(this._location,i)},x$10.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];r$T.equalsArray(a,i,r)||(r$T.pack(a,i,r),n=!0),r+=2}n&&this._gl.uniform2iv(this._location,i)},F$10.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];a$11.equalsArray(a,i,r)||(a$11.pack(a,i,r),n=!0),r+=3}n&&this._gl.uniform3iv(this._location,i)},O$Q.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];a$10.equalsArray(a,i,r)||(a$10.pack(a,i,r),n=!0),r+=4}n&&this._gl.uniform4iv(this._location,i)},d$Y.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];u$14.equalsArray(a,i,r)||(u$14.pack(a,i,r),n=!0),r+=4}n&&this._gl.uniformMatrix2fv(this._location,!1,i)},E$Y.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];r$W.equalsArray(a,i,r)||(r$W.pack(a,i,r),n=!0),r+=9}n&&this._gl.uniformMatrix3fv(this._location,!1,i)},I$12.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];c$1a.equalsArray(a,i,r)||(c$1a.pack(a,i,r),n=!0),r+=16}n&&this._gl.uniformMatrix4fv(this._location,!1,i)};var V$N=0;function p$15(e){var t=N$Y(e.vertexShaderText,e.fragmentShaderText);this._gl=e.gl,this._logShaderCompilation=e.logShaderCompilation,this._debugShaders=e.debugShaders,this._attributeLocations=e.attributeLocations,this._varyings=e.varyings,this._bufferMode=e.bufferMode,this._program=void 0,this._numberOfVertexAttributes=void 0,this._vertexAttributes=void 0,this._uniformsByName=void 0,this._uniforms=void 0,this._automaticUniforms=void 0,this._manualUniforms=void 0,this._duplicateUniformNames=t.duplicateUniformNames,this._cachedShader=void 0,this._uniformBlockLocation={},this.maximumTextureUnitIndex=void 0,this._vertexShaderSource=e.vertexShaderSource,this._vertexShaderText=e.vertexShaderText,this._fragmentShaderSource=e.fragmentShaderSource,this._fragmentShaderText=t.fragmentShaderText,this.id=V$N++}function y$X(e){var t=[],i=e.match(/uniform.*?(?![^{]*})(?=[=\[;])/g);if(t$$(i))for(var n=i.length,r=0;r<n;r++){var o=i[r].trim(),a=o.slice(o.lastIndexOf(" ")+1);t.push(a)}return t}function N$Y(e,t){var i={};if(!e$1y.highpFloatSupported||!e$1y.highpIntSupported){var n,r,o,a,s=y$X(e),l=y$X(t),u=s.length,c=l.length;for(n=0;n<u;n++)for(r=0;r<c;r++)if(s[n]===l[r]){a="czm_mediump_"+(o=s[n]);var h=new RegExp(o+"\\b","g");t=t.replace(h,a),i[a]=o}}return{fragmentShaderText:t,duplicateUniformNames:i}}p$15.fromCache=function(e){return e=e$1Y(e,e$1Y.EMPTY_OBJECT),n$1e.defined("options.context",e.context),e.context.shaderCache.getShaderProgram(e)},p$15.replaceCache=function(e){return e=e$1Y(e,e$1Y.EMPTY_OBJECT),n$1e.defined("options.context",e.context),e.context.shaderCache.replaceShaderProgram(e)},Object.defineProperties(p$15.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},vertexAttributes:{get:function(){return x$$(this),this._vertexAttributes}},numberOfVertexAttributes:{get:function(){return x$$(this),this._numberOfVertexAttributes}},allUniforms:{get:function(){return x$$(this),this._uniformsByName}}});var d$X="[Cesium WebGL] ";function w$$(e,t){var i=t._vertexShaderText,n=t._fragmentShaderText,r=e.createShader(e.VERTEX_SHADER);e.shaderSource(r,i),e.compileShader(r);var o=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(o,n),e.compileShader(o);var a=e.createProgram();e.attachShader(a,r),e.attachShader(a,o),e.deleteShader(r),e.deleteShader(o);var s=t._attributeLocations;if(t$$(s))for(var l in s)s.hasOwnProperty(l)&&e.bindAttribLocation(a,s[l],l);var u,c=t._varyings,h=t._bufferMode;if(t$$(c)&&t$$(h)&&e.transformFeedbackVaryings(a,c,h),e.linkProgram(a),!e.getProgramParameter(a,e.LINK_STATUS)){var d=t._debugShaders;if(!e.getShaderParameter(o,e.COMPILE_STATUS)){if(u=e.getShaderInfoLog(o),console.error(d$X+"Fragment shader compile log: "+u),t$$(d)){var f=d.getTranslatedShaderSource(o);console.error(""!==f?d$X+"Translated fragment shader source:\n"+f:d$X+"Fragment shader translation failed.")}throw e.deleteProgram(a),new t$Z("Fragment shader failed to compile. Compile log: "+u)}if(!e.getShaderParameter(r,e.COMPILE_STATUS)){if(u=e.getShaderInfoLog(r),console.error(d$X+"Vertex shader compile log: "+u),t$$(d)){var p=d.getTranslatedShaderSource(r);console.error(""!==p?d$X+"Translated vertex shader source:\n"+p:d$X+"Vertex shader translation failed.")}throw e.deleteProgram(a),new t$Z("Vertex shader failed to compile. Compile log: "+u)}throw u=e.getProgramInfoLog(a),console.error(d$X+"Shader program link log: "+u),t$$(d)&&(console.error(d$X+"Translated vertex shader source:\n"+d.getTranslatedShaderSource(r)),console.error(d$X+"Translated fragment shader source:\n"+d.getTranslatedShaderSource(o))),e.deleteProgram(a),new t$Z("Program failed to link. Link log: "+u)}var _=t._logShaderCompilation;return _&&(t$$(u=e.getShaderInfoLog(r))&&u.length>0&&console.log(d$X+"Vertex shader compile log: "+u)),_&&(t$$(u=e.getShaderInfoLog(o))&&u.length>0&&console.log(d$X+"Fragment shader compile log: "+u)),_&&(t$$(u=e.getProgramInfoLog(a))&&u.length>0&&console.log(d$X+"Shader program link log: "+u)),a}function B$N(e,t,i){for(var n={},r=0;r<i;++r){var o=e.getActiveAttrib(t,r),a=e.getAttribLocation(t,o.name);n[o.name]={name:o.name,type:o.type,index:a}}return n}function M$13(e,t){for(var i={},n=[],r=[],o=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),a=0;a<o;++a){var s=e.getActiveUniform(t,a),l=-1!==s.name.indexOf("[0]",s.name.length-"[0]".length)?s.name.slice(0,s.name.length-3):s.name;if(0!==l.indexOf("gl_"))if(s.name.indexOf("[")<0){var u=e.getUniformLocation(t,l);if(null!==u){var c=L$Z(e,s,l,u);i[l]=c,n.push(c),c._setSampler&&r.push(c)}}else{var h,d,f,p,_=l.indexOf("[");if(_>=0){if(!t$$(h=i[l.slice(0,_)]))continue;(d=h._locations).length<=1&&(f=h.value,null!==(p=e.getUniformLocation(t,l))&&(d.push(p),f.push(e.getUniform(t,p))))}else{d=[];for(var m=0;m<s.size;++m)null!==(p=e.getUniformLocation(t,l+"["+m+"]"))&&d.push(p);h=k$X(e,s,l,d),i[l]=h,n.push(h),h._setSampler&&r.push(h)}}}return{uniformsByName:i,uniforms:n,samplerUniforms:r}}function F$$(e,t){var i=[],n=[];for(var r in t)if(t.hasOwnProperty(r)){var o=t[r],a=r,s=e._duplicateUniformNames[a];t$$(s)&&(o.name=s,a=s);var l=s$1c[a];t$$(l)?i.push({uniform:o,automaticUniform:l}):n.push(o)}return{automaticUniforms:i,manualUniforms:n}}function k$W(e,t,i){e.useProgram(t);for(var n=0,r=i.length,o=0;o<r;++o)n=i[o]._setSampler(n);return e.useProgram(null),n}function x$$(e){if(!t$$(e._program)){var t=e._gl,i=w$$(t,e,e._debugShaders),n=t.getProgramParameter(i,t.ACTIVE_ATTRIBUTES),r=M$13(t,i),o=F$$(e,r.uniformsByName);e._program=i,e._numberOfVertexAttributes=n,e._vertexAttributes=B$N(t,i,n),e._uniformsByName=r.uniformsByName,e._uniforms=r.uniforms,e._automaticUniforms=o.automaticUniforms,e._manualUniforms=o.manualUniforms,e.maximumTextureUnitIndex=k$W(t,i,r.samplerUniforms)}}p$15.prototype._bind=function(){x$$(this),this._gl.useProgram(this._program)},p$15.prototype._setUniforms=function(e,t,i){var n,r;if(t$$(e)){var o=this._manualUniforms;for(n=o.length,r=0;r<n;++r){var a=o[r];a.value=e[a.name]()}}var s=this._automaticUniforms;for(n=s.length,r=0;r<n;++r){var l=s[r];l.uniform.value=l.automaticUniform.getValue(t)}var u=this._uniforms;for(n=u.length,r=0;r<n;++r)u[r].set();if(i){var c=this._gl,h=this._program;if(c.validateProgram(h),!c.getProgramParameter(h,c.VALIDATE_STATUS))throw new t$_("Program validation failed. Program info log: "+c.getProgramInfoLog(h))}},p$15.prototype.isDestroyed=function(){return!1},p$15.prototype.destroy=function(){this._cachedShader.cache.releaseShaderProgram(this)},p$15.prototype.finalDestroy=function(){return this._gl.deleteProgram(this._program),s$1e(this)};var _0x29bf00=(_0x3877dc=!0,function(e,t){var i=_0x3877dc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3877dc=!1,i}),_0x4a8695=_0x29bf00(void 0,(function(){return _0x4a8695.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a8695).search("(((.+)+)+)+$")})),_0x3877dc;_0x4a8695();var _0x18c3bb={circle:_0x3de43b,line:_0x54b6b1,fill:_0x16eb79,symbol:_0x3a135c},_0x3833d4=_0xb04b18([{name:"a_pos",type:"Int16",components:2}]),_0x129b65=function(e,t,i){this.cesiumContext=e,this.context=new _0x479392(e),this.width=i,this.height=i,this.transform=t,this.transform.resize(this.width,this.height),this._globalLineWidthScale=1,this.setup(),this.numSublayers=1,this.depthEpsilon=1/Math.pow(2,16),this.depthRboNeedsClear=!0,this.emptyProgramConfiguration=new _0xd562f6,this.clearCommand=new r$M({color:new e$1z(0,0,0,0),depth:1})};function _0x14fb4c(){var e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function _0x293f0d(e,t,i,n,r,o,a){var s=1/(t-i),l=1/(n-r),u=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+i)*s,e[13]=(r+n)*l,e[14]=(a+o)*u,e[15]=1,e}function _0x60ed60(e,t,i){var n=i[0],r=i[1],o=i[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}_0x129b65.prototype.resize=function(e,t){var i=this.context.gl;if(this.width=e,this.height=t,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var n=0,r=this.style._order;n<r.length;n+=1){var o=r[n];this.style._layers[o].resize()}this.depthRbo&&(i.deleteRenderbuffer(this.depthRbo),this.depthRbo=null)},_0x129b65.prototype.setup=function(){this.context;var e=new _0x8b249f;e.emplaceBack(0,0),e.emplaceBack(_0x10e17e,0),e.emplaceBack(0,_0x10e17e),e.emplaceBack(_0x10e17e,_0x10e17e),this.tileExtentBuffer=_0xbea57e.toVertexBuffer(this.cesiumContext,e,_0x3833d4.members),this.tileExtentSegments=_0x17c095.simpleSegment(0,0,4,2);var t=new _0x8b249f;t.emplaceBack(0,0),t.emplaceBack(_0x10e17e,0),t.emplaceBack(0,_0x10e17e),t.emplaceBack(_0x10e17e,_0x10e17e),this.debugBuffer=_0xbea57e.toVertexBuffer(this.cesiumContext,t,_0x3833d4.members),this.debugSegments=_0x17c095.simpleSegment(0,0,4,5);var i=new _0x8b249f;i.emplaceBack(0,0),i.emplaceBack(1,0),i.emplaceBack(0,1),i.emplaceBack(1,1),this.viewportBuffer=_0xbea57e.toVertexBuffer(this.cesiumContext,i,_0x3833d4.members),this.viewportSegments=_0x17c095.simpleSegment(0,0,4,2);var n=new _0x50ebe5;n.emplaceBack(0),n.emplaceBack(1),n.emplaceBack(3),n.emplaceBack(2),n.emplaceBack(0),this.tileBorderIndexBuffer=_0xbea57e.toIndexBuffer(this.cesiumContext,n);var r=new _0x239d74;r.emplaceBack(0,1,2),r.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=_0xbea57e.toIndexBuffer(this.cesiumContext,r),this.context.gl,this.stencilClearMode=new _0x4a3404({func:de$x.ALWAYS,mask:0},0,255,de$x.ZERO,de$x.ZERO,de$x.ZERO)},_0x129b65.prototype.clearStencil=function(){var e=this.context,t=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var i=_0x14fb4c();_0x293f0d(i,0,this.width,this.height,0,0,1),_0x60ed60(i,i,[this.width,this.height,0]),this.useProgram("clippingMask").draw(e,t.TRIANGLES,_0x358f1c.disabled,this.stencilClearMode,_0x55f9b8.disabled,_0x5d4b2b.disabled,_0x3006c1.clippingMaskUniformValues(i),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},_0x129b65.prototype._renderTileClippingMasks=function(e,t){if(this.currentStencilSource!==e.source&&e.isTileClipped()&&t&&t.length){this.currentStencilSource=e.source;var i=this.context,n=i.gl;this.nextStencilID+t.length>256&&this.clearStencil(),i.setColorMode(_0x55f9b8.disabled),i.setDepthMode(_0x358f1c.disabled);var r=this.useProgram("clippingMask").program;this._tileClippingMaskIDs={};for(var o=0,a=t;o<a.length;o+=1){var s=a[o],l=this._tileClippingMaskIDs[s.key]=this.nextStencilID++;r.draw(i,n.TRIANGLES,_0x358f1c.disabled,new _0x4a3404({func:n.ALWAYS,mask:0},l,255,n.KEEP,n.KEEP,n.REPLACE),_0x55f9b8.disabled,_0x5d4b2b.disabled,_0x3006c1.clippingMaskUniformValues(s.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},_0x129b65.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var e=this.nextStencilID++,t=this.context.gl;return new _0x4a3404({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)},_0x129b65.prototype.stencilModeForClipping=function(e){var t=this.context.gl;return new _0x4a3404({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)},_0x129b65.prototype.colorModeForRenderPass=function(){var e=this.context.gl;if(this._showOverdrawInspector){var t=1/8;return new _0x55f9b8([e.CONSTANT_COLOR,e.ONE],new _0x5b501e(t,t,t,0),[!0,!0,!0,!0])}return"opaque"===this.renderPass?_0x55f9b8.unblended:_0x55f9b8.alphaBlended},_0x129b65.prototype.depthModeForSublayer=function(e,t,i){if(!this.opaquePassEnabledForLayer())return _0x358f1c.disabled;var n=1-((1+this.currentLayer)*this.numSublayers+e)*this.depthEpsilon;return new _0x358f1c(i||de$x.LEQUAL,t,[n,n])},_0x129b65.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},_0x129b65.prototype.renderOneTile=function(e,t,i){this.style=e,this.options=i,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager;var n=this.style._order;for(this.clearCommand.execute(this.cesiumContext,i.passState),this._showOverdrawInspector=!1,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],this.opaquePassCutoff=1/0,this.renderPass="opaque",this.currentLayer=n.length-1;this.currentLayer>=0;this.currentLayer--){var r=this.style._layers[n[this.currentLayer]];this.renderLayerForOneTile(this,t,r,i)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<n.length;this.currentLayer++){var o=this.style._layers[n[this.currentLayer]];this.renderLayerForOneTile(this,t,o,i)}},_0x129b65.prototype.render=function(e,t){this.style=e,this.options=t,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(ref_properties.browser.now()),this.imageManager.beginFrame();var i=this.style._order,n=this.style.sourceCaches;for(var r in n){var o=n[r];o.used&&o.prepare(this.context)}var a={},s={},l={};for(var u in n){var c=n[u];a[u]=c.getVisibleCoordinates(),s[u]=a[u].slice().reverse(),l[u]=c.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var h=0;h<i.length;h++){var d=i[h];if(this.style._layers[d].is3D()){this.opaquePassCutoff=h;break}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:t.showOverdrawInspector?_0x5b501e.black:_0x5b501e.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=t.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=i.length-1;this.currentLayer>=0;this.currentLayer--){var f=this.style._layers[i[this.currentLayer]],p=n[f.source],_=a[f.source];this._renderTileClippingMasks(f,_),this.renderLayer(this,p,f,_)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<i.length;this.currentLayer++){var m=this.style._layers[i[this.currentLayer]],$=n[m.source],g=("symbol"===m.type?l:s)[m.source];this._renderTileClippingMasks(m,a[m.source]),this.renderLayer(this,$,m,g)}this.context.setDefault()},_0x129b65.prototype.setupOffscreenDepthRenderbuffer=function(){var e=this.context;!this.depthRbo&&(this.depthRbo=e.createRenderbuffer(e.gl.DEPTH_COMPONENT16,this.width,this.height))},_0x129b65.prototype.renderLayerForOneTile=function(e,t,i,n){null!=i&&(i.isHidden(t.requestZ)||(this.id=i.id,_0x18c3bb[i.type](e,t,i,n)))},_0x129b65.prototype.renderLayer=function(e,t,i,n){i.isHidden(this.transform.zoom)||("background"===i.type||"custom"===i.type||n.length)&&(this.id=i.id,_0x18c3bb[i.type](e,t,i,n,this.style.placement.variableOffsets))},_0x129b65.prototype.translatePosMatrix=function(e,t,i,n,r){if(!i[0]&&!i[1])return e;var o=r?"map"===n?this.transform.angle:0:"viewport"===n?-this.transform.angle:0;if(o){var a=Math.sin(o),s=Math.cos(o);i=[i[0]*s-i[1]*a,i[0]*a+i[1]*s]}var l=[r?i[0]:pixelsToTileUnits(t,i[0],this.transform.zoom),r?i[1]:pixelsToTileUnits(t,i[1],this.transform.zoom),0],u=new Float32Array(16);return _0x4d2af4.mat4.translate(u,e,l),u},_0x129b65.prototype.isPatternMissing=function(e){if(!e)return!1;var t=this.imageManager.getPattern(e.from.toString()),i=this.imageManager.getPattern(e.to.toString());return!t||!i},_0x129b65.prototype.useProgram=function(e,t,i){void 0===t&&(t=this.emptyProgramConfiguration),this.cache=this.cache||{};var n=""+e+(t.cacheKey||"")+(this._showOverdrawInspector?"/overdraw":"");if(!this.cache[n]){var r=_0x376566[e];this.cache[n]={};var o=t.defines(),a=_0x376566.prelude.vertexSource.concat(r.vertexSource),s=_0x376566.prelude.fragmentSource.concat(r.fragmentSource),l=new a$O({name:e+"_vp",defines:o,sources:[a]}),u=new a$O({name:e+"_fp",defines:o,sources:[s]}),c=i||t.getAttributeLocation(),h=p$15.fromCache({name:n,context:this.cesiumContext,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:c});this.cache[n].cesiumProgram=h}return this.cache[n]},_0x129b65.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},_0x129b65.prototype.setBaseState=function(){var e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)};var _0x8d3230=(_0x44df63=!0,function(e,t){var i=_0x44df63?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x44df63=!1,i}),_0x11a52a=_0x8d3230(void 0,(function(){return _0x11a52a.toString().search("(((.+)+)+)+$").toString().constructor(_0x11a52a).search("(((.+)+)+)+$")})),_0x44df63;_0x11a52a();var _0x11273a=_0xb04b18([{name:"a_pos",components:2,type:"Int16"}],4),_0x5eff5f=_0x11273a.members,_0x12bf5b=_0xb04b18([{name:"a_pos",components:2,type:"Float32"}],4),_0x5c1248=_0x12bf5b.members;function _0xefa47a(e,t,i,n,r){e.emplaceBack(2*t+(n+1)/2,2*i+(r+1)/2)}var _0x2d31ba=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this._sourceLayerIds={};var t=this;this.layerIds=this.layers.map((function(e,i){return t._sourceLayerIds[e.sourceLayer]=i,e.sourceLayer})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new _0x8b249f,this.indexArray=new _0x239d74,this.segments=new _0x17c095,this.programConfigurations=new ProgramConfigurationSet(members,e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};_0x2d31ba.prototype.populate=function(e,t){var i=this.layers[0],n=[],r=null;"circle"===i.type&&(r=i.layout.get("circle-sort-key"));for(var o=0,a=e;o<a.length;o+=1){var s=a[o],l=s.feature,u=s.index,c=s.sourceLayerIndex,h=s.sourceLayerId,d=this._sourceLayerIds[h],f=this.layers[d];if(f){var p=_0x10e17e/512,_=f.paint.get("circle-radius").value.value*p;if(this.layers[0]._featureFilter(new _0x460d5e(0),l)){var m=_0x43a884(l),$=r?r.evaluate(l,{}):void 0,g={id:l.id,properties:l.properties,type:l.type,sourceLayerIndex:c,index:u,geometry:m,patterns:{},sortKey:$,circleRadius:_};n.push(g)}}}r&&n.sort((function(e,t){return e.sortKey-t.sortKey}));for(var y=0,v=n;y<v.length;y+=1){var x=v[y],b=x,S=b.geometry,w=b.index,C=b.sourceLayerIndex,T=e[w].feature;this.addFeature(x,S,w),t.featureIndex.insert(T,S,w,C,this.index,void 0,b.circleRadius)}},_0x2d31ba.prototype.update=function(e,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,i)},_0x2d31ba.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},_0x2d31ba.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},_0x2d31ba.prototype.upload=function(e){if(!this.uploaded){if(null==this.layoutVertexArray)return;var t=e.webgpu?_0x5c1248:_0x5eff5f;this.layoutVertexArray.length>0&&(this.layoutCesiumVertexBuffer=_0xbea57e.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=_0xbea57e.toIndexBuffer(e,this.indexArray))}this.programConfigurations.upload(e),this.uploaded=!0},_0x2d31ba.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},_0x2d31ba.prototype.clear=function(){t$$(this.layoutVertexArray)&&(this.layoutVertexArray=null),t$$(this.indexArray)&&(this.indexArray=null)},_0x2d31ba.prototype.addFeature=function(e,t,i){for(var n=0,r=t;n<r.length;n+=1)for(var o=0,a=r[n];o<a.length;o+=1){var s=a[o],l=s.x,u=s.y;if(!(l<0||l>=_0x10e17e||u<0||u>=_0x10e17e)){var c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),h=c.vertexLength;_0xefa47a(this.layoutVertexArray,l,u,-1,-1),_0xefa47a(this.layoutVertexArray,l,u,1,-1),_0xefa47a(this.layoutVertexArray,l,u,1,1),_0xefa47a(this.layoutVertexArray,l,u,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),c.vertexLength+=4,c.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,i,{})},_0x40d7a6.register("CircleBucket",_0x2d31ba,{omit:["layers"]});var _0x31934b=(_0x3723e4=!0,function(e,t){var i=_0x3723e4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3723e4=!1,i}),_0x2248ff=_0x31934b(void 0,(function(){return _0x2248ff.toString().search("(((.+)+)+)+$").toString().constructor(_0x2248ff).search("(((.+)+)+)+$")})),_0x3723e4;function _0x3232c9(){}_0x2248ff(),_0x3232c9.getMaximumPaintValue=function(e,t,i){var n=t.paint.get(e).value;return"constant"===n.kind?n.value:i.programConfigurations.get(t.id).binders[e].maxValue},_0x3232c9.translateDistance=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},_0x3232c9.translate=function(e,t,i,n,r){if(!t||!t[0]&&!t[1])return e;var o=_0x279c0d.convert(t)._mult(r);"viewport"===i&&o._rotate(-n);for(var a=[],s=0;s<e.length;s++){var l=e[s];a.push(l.sub(o))}return a};var _0x1953e7=new _0xc3e36b({"circle-sort-key":new _0x326e57(_0x3f084c.layout_circle["circle-sort-key"])}),_0x5b8c33=new _0xc3e36b({"circle-radius":new _0x326e57(_0x3f084c.paint_circle["circle-radius"]),"circle-color":new _0x326e57(_0x3f084c.paint_circle["circle-color"]),"circle-blur":new _0x326e57(_0x3f084c.paint_circle["circle-blur"]),"circle-opacity":new _0x326e57(_0x3f084c.paint_circle["circle-opacity"]),"circle-translate":new _0x5f96b6(_0x3f084c.paint_circle["circle-translate"]),"circle-translate-anchor":new _0x5f96b6(_0x3f084c.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new _0x5f96b6(_0x3f084c.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new _0x5f96b6(_0x3f084c.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new _0x326e57(_0x3f084c.paint_circle["circle-stroke-width"]),"circle-stroke-color":new _0x326e57(_0x3f084c.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new _0x326e57(_0x3f084c.paint_circle["circle-stroke-opacity"])}),_0x2f0314={paint:_0x5b8c33,layout:_0x1953e7},_0x4b7722=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,_0x2f0314)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.createBucket=function(e){return new _0x2d31ba(e)},r.prototype.queryRadius=function(e){var t=e;return _0x3232c9.getMaximumPaintValue("circle-radius",this,t)+_0x3232c9.getMaximumPaintValue("circle-stroke-width",this,t)+_0x3232c9.translateDistance(this.paint.get("circle-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,o,a,s,l){s=_0x39a1b5();for(var u=_0x3232c9.translate(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),0,a),c=this.paint.get("circle-radius")?.evaluate(t,i),h=this.paint.get("circle-stroke-width")?.evaluate(t,i),d=c+h,f="map"===this.paint.get("circle-pitch-alignment"),p=f?u:_0x21a994(u,s),_=f?d*a:d,m=0,$=n;m<$.length;m+=1)for(var g=0,y=$[m];g<y.length;g+=1){var v=y[g],x=f?v:_0x39ff5e(v,s),b=_;if(_0x2ef3dc([],[v.x,v.y,0,1],s),"viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")||"map"===this.paint.get("circle-pitch-scale")&&this.paint.get("circle-pitch-alignment"),l=t$$(l)?l:10,_0xb019d8.polygonIntersectsBufferedPoint(p,x,b*l))return!0}return!1},r}(_0x40ea12);function _0x39ff5e(e,t){var i=_0x2ef3dc([],[e.x,e.y,0,1],t);return new _0x279c0d(i[0],i[1])}function _0x21a994(e,t){return e.map((function(e){return _0x39ff5e(e,t)}))}function _0x39a1b5(){var e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function _0x2ef3dc(e,t,i){var n=t[0],r=t[1],o=t[2],a=i[3]*n+i[7]*r+i[11]*o+i[15];return a=a||1,e[0]=(i[0]*n+i[4]*r+i[8]*o+i[12])/a,e[1]=(i[1]*n+i[5]*r+i[9]*o+i[13])/a,e[2]=(i[2]*n+i[6]*r+i[10]*o+i[14])/a,e}var _0x5ad848=(_0x2541ae=!0,function(e,t){var i=_0x2541ae?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2541ae=!1,i}),_0x5c74d6=_0x5ad848(void 0,(function(){return _0x5c74d6.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c74d6).search("(((.+)+)+)+$")})),_0x2541ae;function _0x33667d(e,t,i,n,r){for(var o=r.patternDependencies,a=0,s=t;a<s.length;a+=1){var l=s[a],u=l.paint.get(e+"-pattern").value;if("constant"!==u.kind){var c=u.evaluate({zoom:n-1},i,{},r.availableImages),h=u.evaluate({zoom:n},i,{},r.availableImages),d=u.evaluate({zoom:n+1},i,{},r.availableImages);c=c&&c.name?c.name:c,h=h&&h.name?h.name:h,d=d&&d.name?d.name:d,o[c]=!0,o[h]=!0,o[d]=!0,i.patterns[l.id]={min:c,mid:h,max:d}}}return i}_0x5c74d6();var _0x512017=(_0x5028cb=!0,function(e,t){var i=_0x5028cb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5028cb=!1,i}),_0x233fc9=_0x512017(void 0,(function(){return _0x233fc9.toString().search("(((.+)+)+)+$").toString().constructor(_0x233fc9).search("(((.+)+)+)+$")})),_0x5028cb;function _0x551ce8(e,t,i){for(var n=i.patternDependencies,r=!1,o=0,a=t;o<a.length;o+=1){var s=a[o].paint.get(e+"-pattern");!s.isConstant()&&(r=!0);var l=s.constantOr(null);l&&(r=!0,n[l.to]=!0,n[l.from]=!0)}return r}if(_0x233fc9(),typeof WebAssembly<"u"){let e=function(e){return t$S.locateFile?t$S.locateFile(e,O$P):O$P+e},t=function(e){t.shown||(t.shown={}),t.shown[e]||(t.shown[e]=1)},i=function(e,t,i){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return h$$[e>>0];case"i16":return I$11[e>>1];case"i32":case"i64":return w$_[e>>2];case"float":return he$x[e>>2];case"double":return _e$q[e>>3];default:de("invalid type for getValue: "+t)}return null},n=function(e,t){e||de("Assertion failed: "+t)},r=function(e){var t=t$S["_"+e];return n(t,"Cannot call unknown function "+e+", make sure it is exported"),t},o=function(e,t,i,o,a){var s={string:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);t=Z$Y(i),c(e,t,i)}return t},array:function(e){var t=Z$Y(e.length);return h(e,t),t}};var u=r(e),d=[],f=0;if(n("array"!==t,'Return type should not be "array".'),o)for(var p=0;p<o.length;p++){var _=s[i[p]];_?(0===f&&(f=me$C()),d[p]=_(o[p])):d[p]=o[p]}var m=u.apply(null,d);return m=function(e){return"string"===t?l(e):"boolean"===t?Boolean(e):e}(m),0!==f&&ze$i(f),m},a=function(e,t,i,n){return function(){return o(e,t,i,arguments)}},s=function(e,i,n){for(var r=i+n,o=i;e[o]&&!(o>=r);)++o;if(o-i>16&&e.subarray&&Pe$p)return Pe$p.decode(e.subarray(i,o));for(var a="";i<o;){var s=e[i++];if(128&s){var l=63&e[i++];if(192!=(224&s)){var u=63&e[i++];if(224==(240&s)?s=(15&s)<<12|l<<6|u:(240!=(248&s)&&t("Invalid UTF-8 leading byte 0x"+s.toString(16)+" encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!"),s=(7&s)<<18|l<<12|u<<6|63&e[i++]),s<65536)a+=String.fromCharCode(s);else{var c=s-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&s)<<6|l)}else a+=String.fromCharCode(s)}return a},l=function(e,t){return e?s(A$Z,e,t):""},u=function(e,i,n,r){if(!(r>0))return 0;for(var o=n,a=n+r-1,s=0;s<e.length;++s){var l=e.charCodeAt(s);if(l>=55296&&l<=57343)l=65536+((1023&l)<<10)|1023&e.charCodeAt(++s);if(l<=127){if(n>=a)break;i[n++]=l}else if(l<=2047){if(n+1>=a)break;i[n++]=192|l>>6,i[n++]=128|63&l}else if(l<=65535){if(n+2>=a)break;i[n++]=224|l>>12,i[n++]=128|l>>6&63,i[n++]=128|63&l}else{if(n+3>=a)break;l>=2097152&&t("Invalid Unicode code point 0x"+l.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),i[n++]=240|l>>18,i[n++]=128|l>>12&63,i[n++]=128|l>>6&63,i[n++]=128|63&l}}return i[n]=0,n-o},c=function(e,t,i){return n("number"==typeof i,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),u(e,A$Z,t,i)},h=function(e,t){n(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),h$$.set(e,t)},d=function(e){return e.replace(/__Z[\w\d_]+/g,(function(e){return e===e?e:e+" ["+e+"]"}))},f=function(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()},p=function(){var e=f();return t$S.extraStackTrace&&(e+="\n"+t$S.extraStackTrace()),d(e)},_=function(e,t){return e%t>0&&(e+=t-e%t),e},m=function(){t$S.HEAP8=h$$=new Int8Array(R$Q),t$S.HEAP16=I$11=new Int16Array(R$Q),t$S.HEAP32=w$_=new Int32Array(R$Q),t$S.HEAPU8=A$Z=new Uint8Array(R$Q),t$S.HEAPU16=new Uint16Array(R$Q),t$S.HEAPU32=D$10=new Uint32Array(R$Q),t$S.HEAPF32=he$x=new Float32Array(R$Q),t$S.HEAPF64=_e$q=new Float64Array(R$Q)},$=function(){n(0==(3&x$_)),D$10[(x$_>>2)-1]=34821223,D$10[(x$_>>2)-2]=2310721022},g=function(){(34821223!=D$10[(x$_>>2)-1]||2310721022!=D$10[(x$_>>2)-2])&&de("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+D$10[(x$_>>2)-2].toString(16)+" "+D$10[(x$_>>2)-1].toString(16)),1668509029!==w$_[0]&&de("Runtime error: The application has corrupted its heap memory area (address zero)!")},y=function(e){de("Stack overflow! Attempted to allocate "+e+" bytes on the stack, but stack has only "+(x$_-me$C()+e)+" bytes available!")},v=function(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?t$S.dynCall_v(i):t$S.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}},x=function(){if(t$S.preRun)for("function"==typeof t$S.preRun&&(t$S.preRun=[t$S.preRun]);t$S.preRun.length;)C(t$S.preRun.shift());v(Qe$d)},b=function(){g(),!f$Z&&(f$Z=!0,v(Be$m))},S=function(){g(),v(We$n)},w=function(){if(g(),t$S.postRun)for("function"==typeof t$S.postRun&&(t$S.postRun=[t$S.postRun]);t$S.postRun.length;)T(t$S.postRun.shift());v(Ye$h)},C=function(e){Qe$d.unshift(e)},T=function(e){Ye$h.unshift(e)},P=function(e){X$P++,t$S.monitorRunDependencies&&t$S.monitorRunDependencies(X$P),e&&(n(!k$V[e]),k$V[e]=1,null===P$O&&typeof setInterval<"u"&&(P$O=setInterval((function(){if(ne$A)return clearInterval(P$O),void(P$O=null)}),1e4)))},E=function(e){if(X$P--,t$S.monitorRunDependencies&&t$S.monitorRunDependencies(X$P),e&&(n(k$V[e]),delete k$V[e]),0==X$P&&(null!==P$O&&(clearInterval(P$O),P$O=null),q$16)){var t=q$16;q$16=null,t()}},A=function(e){return String.prototype.startsWith?e.startsWith(je$f):0===e.indexOf(je$f)},L=function(){try{if(t$S.wasmBinary)return new Uint8Array(t$S.wasmBinary);if(t$S.readBinary)return t$S.readBinary(S$L);throw"both async and sync fetching of the wasm failed"}catch(e){de(e)}},M=function(){return t$S.wasmBinary||!j$11&&!U$Z||"function"!=typeof fetch?new Promise((function(e,t){e(L())})):fetch(S$L,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+S$L+"'";return e.arrayBuffer()})).catch((function(){return L()}))},I=function(e){var t={env:e,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:Vt$a};function i(e,t){var i=e.exports;t$S.asm=i,E("wasm-instantiate")}P("wasm-instantiate");var r=t$S;function o(e){n(t$S===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),r=null,i(e.instance)}function a(e){return M().then((function(e){return WebAssembly.instantiate(e,t)})).then(e,(function(e){}))}if(t$S.instantiateWasm)try{return t$S.instantiateWasm(t,i)}catch{return!1}return function(){if(t$S.wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||A(S$L)||"function"!=typeof fetch)return a(o);fetch(S$L,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(o,(function(e){a(o)}))}))}(),{}},O=function(e){return re$E(e)},D=function(e){e&&H$X[e].refcount++},R=function(e){if(!e||H$X[e])return e;for(var t in H$X)for(var i=+t,n=H$X[i].adjusted,r=n.length,o=0;o<r;o++)if(n[o]===e)return i;return e},N=function(e){var t=H$X[e];return t&&!t.caught&&(t.caught=!0,J$X.uncaught_exception--),t&&(t.rethrown=!1),rn$4.push(e),D(R(e)),e},F=function(e,t,i){throw H$X[e]={ptr:e,adjusted:[e],type:t,destructor:i,refcount:0,caught:!1,rethrown:!1},"uncaught_exception"in J$X?J$X.uncaught_exception++:J$X.uncaught_exception=1,e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."},B=function(){return!!J$X.uncaught_exception},z=function(){},G=function(){},k=function(e,t){m$S.varargs=t;try{m$S.getStreamFromFD(),m$S.get(),m$S.get(),m$S.get(),m$S.get();return de("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return(typeof g$O>"u"||!(e instanceof g$O.ErrnoError))&&de(e),-e.errno}},U=function(){var e=t$S._fflush;e&&e(0);var t=m$S.buffers;t[1].length&&m$S.printChar(1,10),t[2].length&&m$S.printChar(2,10)},V=function(e,t){m$S.varargs=t;try{for(var i=m$S.get(),n=m$S.get(),r=m$S.get(),o=0,a=0;a<r;a++){for(var s=w$_[n+8*a>>2],l=w$_[n+(8*a+4)>>2],u=0;u<l;u++)m$S.printChar(i,A$Z[s+u]);o+=l}return o}catch(e){return(typeof g$O>"u"||!(e instanceof g$O.ErrnoError))&&de(e),-e.errno}},W=function(e,t){m$S.varargs=t;try{return 0}catch(e){return(typeof g$O>"u"||!(e instanceof g$O.ErrnoError))&&de(e),-e.errno}},H=function(e,t){m$S.varargs=t;try{m$S.getStreamFromFD();return de("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return(typeof g$O>"u"||!(e instanceof g$O.ErrnoError))&&de(e),-e.errno}},Y=function(){},j=function(){t$S.abort()},q=function(){return h$$.length},X=function(e,t,i){A$Z.set(A$Z.subarray(t,t+i),e)},K=function(e){if(!t$S.___errno_location)return e;w$_[t$S.___errno_location()>>2]=e},Z=function(e){de("Cannot enlarge memory arrays to size "+e+" bytes (OOM). Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+h$$.length+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")},J=function(e){e=_(e,65536);var t=R$Q.byteLength;try{return-1!==V$M.grow((e-t)/65536)&&(R$Q=V$M.buffer,!0)}catch(i){return console.error("emscripten_realloc_buffer: Attempted to grow from "+t+" bytes to "+e+" bytes, but got error: "+i),!1}},Q=function(e){var i=q();n(e>i);var r=65536,o=2147418112;if(e>o)return!1;for(var a=Math.max(i,16777216);a<e;)(a=a<=536870912?_(2*a,r):Math.min(_((3*a+2147483648)/4,r),o))===i&&t("Cannot ask for more memory since we reached the practical limit in browsers (which is just below 2GB), so the request would have failed. Requesting only "+h$$.length);return!!J(a)&&(m(),!0)},ee=function(e){p$14("Invalid function pointer called with signature 'ii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),p$14("Build with ASSERTIONS=2 for more info."),de(e)},te=function(e){p$14("Invalid function pointer called with signature 'iidiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),p$14("Build with ASSERTIONS=2 for more info."),de(e)},ie=function(e){p$14("Invalid function pointer called with signature 'iiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),p$14("Build with ASSERTIONS=2 for more info."),de(e)},ne=function(e){p$14("Invalid function pointer called with signature 'jiji'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),p$14("Build with ASSERTIONS=2 for more info."),de(e)},re=function(e){p$14("Invalid function pointer called with signature 'v'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),p$14("Build with ASSERTIONS=2 for more info."),de(e)},oe=function(e){p$14("Invalid function pointer called with signature 'vi'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),p$14("Build with ASSERTIONS=2 for more info."),de(e)},ae=function(e){p$14("Invalid function pointer called with signature 'vii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),p$14("Build with ASSERTIONS=2 for more info."),de(e)},se=function(e){p$14("Invalid function pointer called with signature 'viiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),p$14("Build with ASSERTIONS=2 for more info."),de(e)},le=function(e){p$14("Invalid function pointer called with signature 'viiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),p$14("Build with ASSERTIONS=2 for more info."),de(e)},ue=function(e){p$14("Invalid function pointer called with signature 'viiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),p$14("Build with ASSERTIONS=2 for more info."),de(e)},ce=function(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e},he=function(e){function t(){t$S.calledRun||(t$S.calledRun=!0,!ne$A&&(b(),S(),t$S.onRuntimeInitialized&&t$S.onRuntimeInitialized(),n(!t$S._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),w()))}e=e||t$S.arguments,X$P>0||($(),x(),X$P>0)||t$S.calledRun||(t$S.setStatus?(t$S.setStatus("Running..."),setTimeout((function(){setTimeout((function(){t$S.setStatus("")}),1),t()}),1)):t(),g())},de=function(e){t$S.onAbort&&t$S.onAbort(e),ne$A=!0;var t="abort("+(e=void 0!==e?'"'+e+'"':"")+") at "+p();throw Ve$l&&Ve$l.forEach((function(i){t=i(t,e)})),t};var t$S=typeof t$S<"u"?t$S:{},Y$P={},F$_;for(F$_ in t$S)t$S.hasOwnProperty(F$_)&&(Y$P[F$_]=t$S[F$_]);t$S.arguments=[],t$S.thisProgram="./this.program",t$S.quit=function(e,t){throw t},t$S.preRun=[],t$S.postRun=[];var j$11=!1,U$Z=!1,se$z=!1,Ie$p=!1,xe$y=!1;if(j$11="object"==typeof window,U$Z="function"==typeof importScripts,Ie$p="object"==typeof process&&"function"==typeof require,se$z=Ie$p&&!j$11&&!U$Z,xe$y=!j$11&&!se$z&&!U$Z,t$S.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var O$P="",le$w,ce$t;if(se$z)O$P=__dirname+"/",t$S.read=function(e,t){var i;return le$w||(le$w=require("fs")),ce$t||(ce$t=require("path")),e=ce$t.normalize(e),i=le$w.readFileSync(e),t?i:i.toString()},t$S.readBinary=function(e){var t=t$S.read(e,!0);return t.buffer||(t=new Uint8Array(t)),n(t.buffer),t},process.argv.length>1&&(t$S.thisProgram=process.argv[1].replace(/\\/g,"/")),t$S.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=t$S),process.on("uncaughtException",(function(e){if(!(e instanceof ce))throw e})),process.on("unhandledRejection",de),t$S.quit=function(e){process.exit(e)},t$S.inspect=function(){return"[Emscripten Module object]"};else if(xe$y)typeof read<"u"&&(t$S.read=function(e){return read(e)}),t$S.readBinary=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),n("object"==typeof t),t)},typeof scriptArgs<"u"?t$S.arguments=scriptArgs:typeof arguments<"u"&&(t$S.arguments=arguments),"function"==typeof quit&&(t$S.quit=function(e){quit(e)});else{if(!j$11&&!U$Z)throw new Error("environment detection error");U$Z?O$P=self.location.href:document.currentScript&&(O$P=document.currentScript.src),O$P=0!==O$P.indexOf("blob:")?O$P.substr(0,O$P.lastIndexOf("/")+1):"",t$S.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},U$Z&&(t$S.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),t$S.readAsync=function(e,t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)},t$S.setWindowTitle=function(e){document.title=e}}var z$O=t$S.print||(typeof console<"u"?console.log.bind(console):typeof print<"u"?print:null),p$14=t$S.printErr||(typeof printErr<"u"?printErr:typeof console<"u"&&console.warn.bind(console)||z$O);for(F$_ in Y$P)Y$P.hasOwnProperty(F$_)&&(t$S[F$_]=Y$P[F$_]);Y$P=void 0,n(typeof t$S.memoryInitializerPrefixURL>"u","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$S.pthreadMainPrefixURL>"u","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$S.cdInitializerPrefixURL>"u","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$S.filePackagePrefixURL>"u","Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),me$C=ze$i=Z$Y=function(){de("cannot use the stack before compiled code is ready to run, and has provided stack access")};var Vt$a={"f64-rem":function(e,t){return e%t},debugger:function(){}};new Array(0);var Ue$i=0,Gt$a=function(e){Ue$i=e},qt$9=function(){return Ue$i};"object"!=typeof WebAssembly&&de("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");var V$M,ne$A=!1,Pe$p=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;typeof TextDecoder<"u"&&new TextDecoder("utf-16le");var Ce$r=65536,R$Q,h$$,A$Z,I$11,w$_,D$10,he$x,_e$q,ke$f=5872,x$_=5248752,He$i=5248752,G$U=5840;n(ke$f%16==0,"stack must start aligned"),n(He$i%16==0,"heap must start aligned");var pe$u=5242880;t$S.TOTAL_STACK&&n(pe$u===t$S.TOTAL_STACK,"the stack size can no longer be determined at runtime");var N$X=t$S.TOTAL_MEMORY||16777216;if(N$X<pe$u&&p$14("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+N$X+"! (TOTAL_STACK="+pe$u+")"),n(typeof Int32Array<"u"&&typeof Float64Array<"u"&&void 0!==Int32Array.prototype.subarray&&void 0!==Int32Array.prototype.set,"JS engine does not provide full typed array support"),t$S.buffer?(R$Q=t$S.buffer,n(R$Q.byteLength===N$X,"provided buffer should be "+N$X+" bytes, but it is "+R$Q.byteLength)):("object"==typeof WebAssembly&&"function"==typeof WebAssembly.Memory?(n(N$X%Ce$r==0),V$M=new WebAssembly.Memory({initial:N$X/Ce$r}),R$Q=V$M.buffer):R$Q=new ArrayBuffer(N$X),n(R$Q.byteLength===N$X)),m(),w$_[G$U>>2]=He$i,w$_[0]=1668509029,I$11[1]=25459,115!==A$Z[2]||99!==A$Z[3])throw"Runtime error: expected the system to be little-endian!";var Qe$d=[],Be$m=[],We$n=[],Ye$h=[],f$Z=!1,d$W=!1;n(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var X$P=0,P$O=null,q$16=null,k$V={};t$S.preloadedImages={},t$S.preloadedAudios={};var g$O={error:function(){de("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -s FORCE_FILESYSTEM=1")},init:function(){g$O.error()},createDataFile:function(){g$O.error()},createPreloadedFile:function(){g$O.error()},createLazyFile:function(){g$O.error()},open:function(){g$O.error()},mkdev:function(){g$O.error()},registerDevice:function(){g$O.error()},analyzePath:function(){g$O.error()},loadFilesFromDB:function(){g$O.error()},ErrnoError:function(){g$O.error()}};t$S.FS_createDataFile=g$O.createDataFile,t$S.FS_createPreloadedFile=g$O.createPreloadedFile;var je$f="data:application/octet-stream;base64,",S$L,nn$4=typeof window>"u"?self:window;S$L=nn$4.location.href.endsWith(".openrealspace")?"../../static/Build/Cesium/ThirdParty/earcut.wasm":"ThirdParty/earcut.wasm",A(S$L)||(S$L=e(S$L)),t$S.asm=function(e,t,i){t.memory=V$M,t.table=new WebAssembly.Table({initial:260,maximum:260,element:"anyfunc"}),t.__memory_base=1024,t.__table_base=0;var r=I(t);return n(r,"binaryen setup failed (no wasm support?)"),r};var v$W=5856;n(v$W%8==0);var H$X={},rn$4=[],m$S={buffers:[null,[],[]],printChar:function(e,t){var i=m$S.buffers[e];n(i),0===t||10===t?((1===e?z$O:p$14)(s(i,0)),i.length=0):i.push(t)},varargs:0,get:function(e){return m$S.varargs+=4,w$_[m$S.varargs-4>>2]},getStr:function(){return l(m$S.get())},get64:function(){var e=m$S.get(),t=m$S.get();return n(e>=0?0===t:-1===t),e},getZero:function(){n(0===m$S.get())}},un$2={},sn$2={abort:de,setTempRet0:Gt$a,getTempRet0:qt$9,abortStackOverflow:y,nullFunc_ii:ee,nullFunc_iidiiii:te,nullFunc_iiii:ie,nullFunc_jiji:ne,nullFunc_v:re,nullFunc_vi:oe,nullFunc_vii:ae,nullFunc_viiii:se,nullFunc_viiiii:le,nullFunc_viiiiii:ue,___cxa_allocate_exception:O,___cxa_begin_catch:N,___cxa_throw:F,___cxa_uncaught_exception:B,___exception_addRef:D,___exception_deAdjust:R,___gxx_personality_v0:z,___lock:G,___setErrNo:K,___syscall140:k,___syscall146:V,___syscall54:W,___syscall6:H,___unlock:Y,_abort:j,_emscripten_get_heap_size:q,_emscripten_memcpy_big:X,_emscripten_resize_heap:Q,abortOnCannotGrowMemory:Z,emscripten_realloc_buffer:J,flush_NO_FILESYSTEM:U,tempDoublePtr:v$W,DYNAMICTOP_PTR:G$U},_$10=t$S.asm(un$2,sn$2,R$Q),ln$2=_$10.__ZSt18uncaught_exceptionv;_$10.__ZSt18uncaught_exceptionv=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ln$2.apply(null,arguments)};var cn$2=_$10.___cxa_can_catch;_$10.___cxa_can_catch=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),cn$2.apply(null,arguments)};var fn$2=_$10.___cxa_is_pointer_type;_$10.___cxa_is_pointer_type=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),fn$2.apply(null,arguments)};var dn$2=_$10.___errno_location;_$10.___errno_location=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),dn$2.apply(null,arguments)};var hn$2=_$10._earcut;_$10._earcut=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),hn$2.apply(null,arguments)};var _n$2=_$10._fflush;_$10._fflush=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),_n$2.apply(null,arguments)};var pn$2=_$10._free;_$10._free=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),pn$2.apply(null,arguments)};var mn$2=_$10._llvm_maxnum_f64;_$10._llvm_maxnum_f64=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),mn$2.apply(null,arguments)};var En$1=_$10._llvm_minnum_f64;_$10._llvm_minnum_f64=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),En$1.apply(null,arguments)};var Tn$1=_$10._malloc;_$10._malloc=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Tn$1.apply(null,arguments)};var yn$2=_$10._sbrk;_$10._sbrk=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),yn$2.apply(null,arguments)};var gn$2=_$10.establishStackSpace;_$10.establishStackSpace=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),gn$2.apply(null,arguments)};var wn$2=_$10.stackAlloc;_$10.stackAlloc=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wn$2.apply(null,arguments)};var Rn$1=_$10.stackRestore;_$10.stackRestore=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Rn$1.apply(null,arguments)};var vn$2=_$10.stackSave;_$10.stackSave=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),vn$2.apply(null,arguments)},t$S.asm=_$10;var J$X=t$S.__ZSt18uncaught_exceptionv=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm.__ZSt18uncaught_exceptionv.apply(null,arguments)};t$S.___cxa_can_catch=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm.___cxa_can_catch.apply(null,arguments)},t$S.___cxa_is_pointer_type=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm.___cxa_is_pointer_type.apply(null,arguments)},t$S.___errno_location=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm.___errno_location.apply(null,arguments)},t$S._earcut=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm._earcut.apply(null,arguments)},t$S._emscripten_replace_memory=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm._emscripten_replace_memory.apply(null,arguments)},t$S._fflush=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm._fflush.apply(null,arguments)},t$S._free=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm._free.apply(null,arguments)},t$S._llvm_maxnum_f64=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm._llvm_maxnum_f64.apply(null,arguments)},t$S._llvm_minnum_f64=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm._llvm_minnum_f64.apply(null,arguments)};var re$E=t$S._malloc=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm._malloc.apply(null,arguments)};t$S._memcpy=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm._memcpy.apply(null,arguments)},t$S._memset=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm._memset.apply(null,arguments)},t$S._sbrk=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm._sbrk.apply(null,arguments)},t$S.establishStackSpace=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm.establishStackSpace.apply(null,arguments)};var Z$Y=t$S.stackAlloc=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm.stackAlloc.apply(null,arguments)},ze$i=t$S.stackRestore=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm.stackRestore.apply(null,arguments)},me$C=t$S.stackSave=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm.stackSave.apply(null,arguments)};t$S.dynCall_ii=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm.dynCall_ii.apply(null,arguments)},t$S.dynCall_iidiiii=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm.dynCall_iidiiii.apply(null,arguments)},t$S.dynCall_iiii=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm.dynCall_iiii.apply(null,arguments)},t$S.dynCall_jiji=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm.dynCall_jiji.apply(null,arguments)},t$S.dynCall_v=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm.dynCall_v.apply(null,arguments)},t$S.dynCall_vi=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm.dynCall_vi.apply(null,arguments)},t$S.dynCall_vii=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm.dynCall_vii.apply(null,arguments)},t$S.dynCall_viiii=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm.dynCall_viiii.apply(null,arguments)},t$S.dynCall_viiiii=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm.dynCall_viiiii.apply(null,arguments)},t$S.dynCall_viiiiii=function(){return n(f$Z,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!d$W,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$S.asm.dynCall_viiiiii.apply(null,arguments)},t$S.asm=_$10,t$S.intArrayFromString||(t$S.intArrayFromString=function(){de("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.intArrayToString||(t$S.intArrayToString=function(){de("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.ccall=o,t$S.cwrap=a,t$S.setValue||(t$S.setValue=function(){de("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.getValue=i,t$S.allocate||(t$S.allocate=function(){de("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.getMemory||(t$S.getMemory=function(){de("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$S.AsciiToString||(t$S.AsciiToString=function(){de("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.stringToAscii||(t$S.stringToAscii=function(){de("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.UTF8ArrayToString||(t$S.UTF8ArrayToString=function(){de("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.UTF8ToString||(t$S.UTF8ToString=function(){de("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.stringToUTF8Array||(t$S.stringToUTF8Array=function(){de("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.stringToUTF8||(t$S.stringToUTF8=function(){de("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.lengthBytesUTF8||(t$S.lengthBytesUTF8=function(){de("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.UTF16ToString||(t$S.UTF16ToString=function(){de("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.stringToUTF16||(t$S.stringToUTF16=function(){de("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.lengthBytesUTF16||(t$S.lengthBytesUTF16=function(){de("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.UTF32ToString||(t$S.UTF32ToString=function(){de("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.stringToUTF32||(t$S.stringToUTF32=function(){de("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.lengthBytesUTF32||(t$S.lengthBytesUTF32=function(){de("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.allocateUTF8||(t$S.allocateUTF8=function(){de("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.stackTrace||(t$S.stackTrace=function(){de("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.addOnPreRun||(t$S.addOnPreRun=function(){de("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.addOnInit||(t$S.addOnInit=function(){de("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.addOnPreMain||(t$S.addOnPreMain=function(){de("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.addOnExit||(t$S.addOnExit=function(){de("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.addOnPostRun||(t$S.addOnPostRun=function(){de("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.writeStringToMemory||(t$S.writeStringToMemory=function(){de("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.writeArrayToMemory||(t$S.writeArrayToMemory=function(){de("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.writeAsciiToMemory||(t$S.writeAsciiToMemory=function(){de("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.addRunDependency||(t$S.addRunDependency=function(){de("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$S.removeRunDependency||(t$S.removeRunDependency=function(){de("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$S.ENV||(t$S.ENV=function(){de("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.FS||(t$S.FS=function(){de("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.FS_createFolder||(t$S.FS_createFolder=function(){de("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$S.FS_createPath||(t$S.FS_createPath=function(){de("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$S.FS_createDataFile||(t$S.FS_createDataFile=function(){de("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$S.FS_createPreloadedFile||(t$S.FS_createPreloadedFile=function(){de("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$S.FS_createLazyFile||(t$S.FS_createLazyFile=function(){de("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$S.FS_createLink||(t$S.FS_createLink=function(){de("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$S.FS_createDevice||(t$S.FS_createDevice=function(){de("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$S.FS_unlink||(t$S.FS_unlink=function(){de("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$S.GL||(t$S.GL=function(){de("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.dynamicAlloc||(t$S.dynamicAlloc=function(){de("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.warnOnce||(t$S.warnOnce=function(){de("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.loadDynamicLibrary||(t$S.loadDynamicLibrary=function(){de("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.loadWebAssemblyModule||(t$S.loadWebAssemblyModule=function(){de("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.getLEB||(t$S.getLEB=function(){de("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.getFunctionTables||(t$S.getFunctionTables=function(){de("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.alignFunctionTables||(t$S.alignFunctionTables=function(){de("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.registerFunctions||(t$S.registerFunctions=function(){de("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.addFunction||(t$S.addFunction=function(){de("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.removeFunction||(t$S.removeFunction=function(){de("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.getFuncWrapper||(t$S.getFuncWrapper=function(){de("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.prettyPrint||(t$S.prettyPrint=function(){de("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.makeBigInt||(t$S.makeBigInt=function(){de("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.dynCall||(t$S.dynCall=function(){de("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.getCompilerSetting||(t$S.getCompilerSetting=function(){de("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.stackSave||(t$S.stackSave=function(){de("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.stackRestore||(t$S.stackRestore=function(){de("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.stackAlloc||(t$S.stackAlloc=function(){de("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.establishStackSpace||(t$S.establishStackSpace=function(){de("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.print||(t$S.print=function(){de("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.printErr||(t$S.printErr=function(){de("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.getTempRet0||(t$S.getTempRet0=function(){de("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.setTempRet0||(t$S.setTempRet0=function(){de("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.Pointer_stringify||(t$S.Pointer_stringify=function(){de("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$S.ALLOC_NORMAL||Object.defineProperty(t$S,"ALLOC_NORMAL",{get:function(){de("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),t$S.ALLOC_STACK||Object.defineProperty(t$S,"ALLOC_STACK",{get:function(){de("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),t$S.ALLOC_DYNAMIC||Object.defineProperty(t$S,"ALLOC_DYNAMIC",{get:function(){de("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),t$S.ALLOC_NONE||Object.defineProperty(t$S,"ALLOC_NONE",{get:function(){de("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),ce.prototype=new Error,ce.prototype.constructor=ce,q$16=function e(){t$S.calledRun||he(),t$S.calledRun||(q$16=e)},t$S.run=he;var Ve$l=[];if(t$S.abort=de,t$S.preInit)for("function"==typeof t$S.preInit&&(t$S.preInit=[t$S.preInit]);t$S.preInit.length>0;)t$S.preInit.pop()();t$S.noExitRuntime=!0,he()}else var t$S=null;var _0x53dc63=t$S,_0x5ce71e=(_0x26228d=!0,function(e,t){var i=_0x26228d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x26228d=!1,i}),_0x50a0e1=_0x5ce71e(void 0,(function(){return _0x50a0e1.toString().search("(((.+)+)+)+$").toString().constructor(_0x50a0e1).search("(((.+)+)+)+$")})),_0x26228d;_0x50a0e1();var _0x1f9158=!1;if(t$$(_0x53dc63)){_0x53dc63.onRuntimeInitialized=function(){_0x1f9158=!0};var _0x1722ff=_0x53dc63.cwrap("earcut","number",["number","number","number","number","number","number"])}var _0xb0ff72=_0xb04b18([{name:"a_pos",components:2,type:"Int16"}],4),_0x1c0440=_0xb0ff72.members,_0x2df593=500,_0x4db046=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new _0x8b249f,this.indexArray=new _0x239d74,this.indexArray2=new _0x13aa79,this.programConfigurations=new ProgramConfigurationSet(_0x1c0440,e.layers,e.zoom),this.segments=new _0x17c095,this.segments2=new _0x17c095,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};_0x4db046.prototype.populate=function(e,t){this.hasPattern=_0x551ce8("fill",this.layers,t);for(var i=[],n=0,r=e;n<r.length;n+=1){var o=r[n],a=o.feature,s=o.index,l=o.sourceLayerIndex;if(this.layers[0]._featureFilter(new _0x460d5e(0),a)){var u=_0x43a884(a),c={id:a.id,properties:a.properties,type:a.type,sourceLayerIndex:l,index:s,geometry:u,patterns:{},sortKey:undefined};i.push(c)}}for(var h=0,d=i;h<d.length;h+=1){var f=d[h],p=f,_=p.geometry,m=p.index,$=p.sourceLayerIndex;if(this.hasPattern){var g=_0x33667d("fill",this.layers,f,this.zoom,t);this.patternFeatures.push(g)}else this.addFeature(f,_,m,{},t.indexData);var y=e[m].feature;t.featureIndex.insert(y,_,m,$,this.index)}},_0x4db046.prototype.update=function(e,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,i)},_0x4db046.prototype.addFeatures=function(e,t){for(var i=0,n=this.patternFeatures;i<n.length;i+=1){var r=n[i];this.addFeature(r,r.geometry,r.index,t)}},_0x4db046.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},_0x4db046.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},_0x4db046.prototype.upload=function(e){if(!this.uploaded){if(null==this.layoutVertexArray)return;var t=_0x1c0440;this.layoutVertexArray.length>0&&(this.layoutCesiumVertexBuffer=_0xbea57e.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=_0xbea57e.toIndexBuffer(e,this.indexArray),this.cesiumIndexBuffer2=_0xbea57e.toIndexBuffer(e,this.indexArray2))}this.programConfigurations.upload(e),this.uploaded=!0},_0x4db046.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer?.destroy(),this.cesiumIndexBuffer2?.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},_0x4db046.prototype.clear=function(){t$$(this.layoutVertexArray)&&(this.layoutVertexArray=null),t$$(this.indexArray)&&(this.indexArray=null),t$$(this.indexArray2)&&(this.indexArray2=null)},_0x4db046.prototype.addFeature=function(e,t,i,n,r){for(var o=0,a=_0x5e01fe(t,_0x2df593);o<a.length;o+=1){for(var s=a[o],l=0,u=0,c=s;u<c.length;u+=1){l+=c[u].length}for(var h,d=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray),f=d.vertexLength,p=[],_=[],m=0,$=s;m<$.length;m+=1){var g=$[m];if(0!==g.length){g!==s[0]&&_.push(p.length/2);var y=this.segments2.prepareSegment(g.length,this.layoutVertexArray,this.indexArray2),v=y.vertexLength;this.layoutVertexArray.emplaceBack(g[0].x,g[0].y),this.indexArray2.emplaceBack(v+g.length-1,v),p.push(g[0].x),p.push(g[0].y);for(var x=1;x<g.length;x++)this.layoutVertexArray.emplaceBack(g[x].x,g[x].y),this.indexArray2.emplaceBack(v+x-1,v+x),p.push(g[x].x),p.push(g[x].y);y.vertexLength+=g.length,y.primitiveLength+=g.length}}if(t$$(r)&&t$$(r[e.id]))h=r[e.id];else if(!0===_0x1f9158){var b=new Int32Array(p),S=b.length,w=_0x53dc63._malloc(Int32Array.BYTES_PER_ELEMENT*S);_0x53dc63.HEAP32.set(b,w/Int32Array.BYTES_PER_ELEMENT);var C=new Int32Array(_),T=C.length,P=_0x53dc63._malloc(Int32Array.BYTES_PER_ELEMENT*T);_0x53dc63.HEAP32.set(C,P/Int32Array.BYTES_PER_ELEMENT);var E=new Int32Array(10*S),A=_0x53dc63._malloc(Int32Array.BYTES_PER_ELEMENT*S*10);_0x53dc63.HEAP32.set(E,A/Int32Array.BYTES_PER_ELEMENT);var L=_0x1722ff(w,S,P,T,2,A),M=new Int32Array(_0x53dc63.HEAP32.buffer,A,L);h=new Int32Array(M),_0x53dc63._free(w),_0x53dc63._free(P),_0x53dc63._free(A)}else h=m$11(p,_);for(var I=0;I<h.length;I+=3)this.indexArray.emplaceBack(f+h[I],f+h[I+1],f+h[I+2]);d.vertexLength+=l,d.primitiveLength+=h.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,i,n)},_0x40d7a6.register("FillBucket",_0x4db046,{omit:["layers","patternFeatures"]});var _0xe051da=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(){e.apply(this,arguments)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.possiblyEvaluate=function(e,t,i){if(void 0===e.value)return new _0x145c43(this,{kind:"constant",value:void 0},t);if("constant"===e.expression.kind){var n=e.expression.evaluate(t,null,{},i),r="resolvedImage"===e.property.specification.type&&"string"!=typeof n?n.name:n,o=this._calculate(r,r,r,t);return new _0x145c43(this,{kind:"constant",value:o},t)}if("camera"===e.expression.kind){var a=this._calculate(e.expression.evaluate({zoom:t.zoom-1}),e.expression.evaluate({zoom:t.zoom}),e.expression.evaluate({zoom:t.zoom+1}),t);return new _0x145c43(this,{kind:"constant",value:a},t)}return new _0x145c43(this,e.expression,t)},r.prototype.evaluate=function(e,t,i,n,r){if("source"===e.kind){var o=e.evaluate(t,i,n,r);return this._calculate(o,o,o,t)}return"composite"===e.kind?this._calculate(e.evaluate({zoom:Math.floor(t.zoom)-1},i,n),e.evaluate({zoom:Math.floor(t.zoom)},i,n),e.evaluate({zoom:Math.floor(t.zoom)+1},i,n),t):e.value},r.prototype._calculate=function(e,t,i,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:i,to:t}},r.prototype.interpolate=function(e){return e},r}(_0x326e57);_0x40d7a6.register("DataDrivenProperty",_0x326e57);var _0x3dfa39=new _0xc3e36b({"fill-sort-key":new _0x326e57(_0x3f084c.layout_fill["fill-sort-key"])}),_0x370e15=new _0xc3e36b({"fill-antialias":new _0x5f96b6(_0x3f084c.paint_fill["fill-antialias"]),"fill-opacity":new _0x326e57(_0x3f084c.paint_fill["fill-opacity"]),"fill-color":new _0x326e57(_0x3f084c.paint_fill["fill-color"]),"fill-outline-color":new _0x326e57(_0x3f084c.paint_fill["fill-outline-color"]),"fill-translate":new _0x5f96b6(_0x3f084c.paint_fill["fill-translate"]),"fill-translate-anchor":new _0x5f96b6(_0x3f084c.paint_fill["fill-translate-anchor"]),"fill-pattern":new _0xe051da(_0x3f084c.paint_fill["fill-pattern"])}),_0x14b515={paint:_0x370e15,layout:_0x3dfa39},_0x23f80c=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,_0x14b515)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.recalculate=function(t,i){e.prototype.recalculate.call(this,t,i);var n=this.paint._values["fill-outline-color"];"constant"===n.value.kind&&void 0===n.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},r.prototype.createBucket=function(e){return new _0x4db046(e)},r.prototype.queryRadius=function(){return _0x3232c9.translateDistance(this.paint.get("fill-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,o,a){var s=_0x3232c9.translate(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),0,a);return _0xb019d8.polygonIntersectsMultiPolygon(s,n)},r.prototype.isTileClipped=function(){return!0},r}(_0x40ea12),_0x510fa6=(_0x49b240=!0,function(e,t){var i=_0x49b240?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x49b240=!1,i}),_0x2e7f88=_0x510fa6(void 0,(function(){return _0x2e7f88.toString().search("(((.+)+)+)+$").toString().constructor(_0x2e7f88).search("(((.+)+)+)+$")})),_0x49b240;_0x2e7f88();var _0x37a035=["Unknown","Point","LineString","Polygon"],_0x368c32=_0xb04b18([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),_0x490e1d=_0x368c32.members,_0x21b6fc=63,_0x425386=Math.cos(Math.PI/180*37.5),_0xc10f44=15,_0x3768ee=20,_0x3d2ccd=15,_0x1d6273=.5,_0x1a68ad=Math.pow(2,_0x3d2ccd-1)/_0x1d6273,_0x65552f=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new _0x31654d,this.indexArray=new _0x239d74,this.programConfigurations=new ProgramConfigurationSet(_0x490e1d,e.layers,e.zoom),this.segments=new _0x17c095,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};_0x65552f.prototype.populate=function(e,t){this.hasPattern=!1;for(var i=this.layers[0].layout.get("line-sort-key"),n=[],r=0,o=e;r<o.length;r+=1){var a=o[r],s=a.feature,l=a.index,u=a.sourceLayerIndex;if(this.layers[0]._featureFilter(new _0x460d5e(0),s)){var c=_0x43a884(s),h=i?i.evaluate(s,{}):void 0,d={id:s.id,properties:s.properties,type:s.type,sourceLayerIndex:u,index:l,geometry:c,patterns:{},sortKey:h};n.push(d)}}i&&n.sort((function(e,t){return e.sortKey-t.sortKey}));for(var f=0,p=n;f<p.length;f+=1){var _=p[f],m=_,$=m.geometry,g=m.index,y=m.sourceLayerIndex;if(this.hasPattern){var v=_0x33667d("line",this.layers,_,this.zoom,t);this.patternFeatures.push(v)}else this.addFeature(_,$,g,{});var x=e[g].feature;t.featureIndex.insert(x,$,g,y,this.index)}},_0x65552f.prototype.update=function(e,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,i)},_0x65552f.prototype.addFeatures=function(e,t){for(var i=0,n=this.patternFeatures;i<n.length;i+=1){var r=n[i];this.addFeature(r,r.geometry,r.index,t)}},_0x65552f.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},_0x65552f.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},_0x65552f.prototype.upload=function(e){if(!this.uploaded){if(null==this.layoutVertexArray)return;var t=_0x490e1d;this.layoutVertexArray.length>0&&(this.layoutCesiumVertexBuffer=_0xbea57e.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=_0xbea57e.toIndexBuffer(e,this.indexArray))}this.programConfigurations.upload(e),this.uploaded=!0},_0x65552f.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer.destroy()),this.programConfigurations.destroy(),this.segments.destroy())},_0x65552f.prototype.clear=function(){t$$(this.layoutVertexArray)&&(this.layoutVertexArray=null),t$$(this.indexArray)&&(this.indexArray=null)},_0x65552f.prototype.addFeature=function(e,t,i,n){for(var r=this.layers[0].layout,o=r.get("line-join").evaluate(e,{}),a=r.get("line-cap"),s=r.get("line-miter-limit"),l=r.get("line-round-limit"),u=0,c=t;u<c.length;u+=1){var h=c[u];this.addLine(h,e,o,a,s,l,i,n)}},_0x65552f.prototype.addLine=function(e,t,i,n,r,o,a,s){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,t.properties&&t.properties.hasOwnProperty("mapbox_clip_start")&&t.properties.hasOwnProperty("mapbox_clip_end")){this.clipStart=+t.properties.mapbox_clip_start,this.clipEnd=+t.properties.mapbox_clip_end;for(var l=0;l<e.length-1;l++)this.totalDistance+=e[l].dist(e[l+1])}for(var u="Polygon"===_0x37a035[t.type],c=e.length;c>=2&&e[c-1].equals(e[c-2]);)c--;for(var h=0;h<c-1&&e[h].equals(e[h+1]);)h++;if(!(c<(u?3:2))){"bevel"===i&&(r=1.05);var d,f=this.overscaling<=16?_0xc10f44*_0x10e17e/(512*this.overscaling):0,p=this.segments.prepareSegment(10*c,this.layoutVertexArray,this.indexArray),_=void 0,m=void 0,$=void 0,g=void 0;this.e1=this.e2=-1,u&&(d=e[c-2],g=e[h].sub(d)._unit()._perp());for(var y=h;y<c;y++)if(!(m=u&&y===c-1?e[h+1]:e[y+1])||!e[y].equals(m)){g&&($=g),d&&(_=d),d=e[y],g=m?m.sub(d)._unit()._perp():$;var v=($=$||g).add(g);(0!==v.x||0!==v.y)&&v._unit();var x=$.x*g.x+$.y*g.y,b=v.x*g.x+v.y*g.y,S=0!==b?1/b:1/0,w=2*Math.sqrt(2-2*b),C=b<_0x425386&&_&&m,T=$.x*g.y-$.y*g.x>0;if(C&&y>h){var P=d.dist(_);if(P>2*f){var E=d.sub(d.sub(_)._mult(f/P)._round());this.updateDistance(_,E),this.addCurrentVertex(E,$,0,0,p),_=E}}var A=_&&m,L=A?i:u?"butt":n;if(A&&"round"===L&&(S<o?L="miter":S<=2&&(L="fakeround")),"miter"===L&&S>r&&(L="bevel"),"bevel"===L&&(S>2&&(L="flipbevel"),S<r&&(L="miter")),_&&this.updateDistance(_,d),"miter"===L)v._mult(S),this.addCurrentVertex(d,v,0,0,p);else if("flipbevel"===L){if(S>100)v=g.mult(-1);else{var M=S*$.add(g).mag()/$.sub(g).mag();v._perp()._mult(M*(T?-1:1))}this.addCurrentVertex(d,v,0,0,p),this.addCurrentVertex(d,v.mult(-1),0,0,p)}else if("bevel"===L||"fakeround"===L){var I=-Math.sqrt(S*S-1),O=T?I:0,D=T?0:I;if(_&&this.addCurrentVertex(d,$,O,D,p),"fakeround"===L)for(var R=Math.round(180*w/Math.PI/_0x3768ee),N=1;N<R;N++){var F=N/R;if(.5!==F){var B=F-.5;F+=F*B*(F-1)*((1.0904+x*(x*(3.55645-1.43519*x)-3.2452))*B*B+(.848013+x*(.215638*x-1.06021)))}var z=g.sub($)._mult(F)._add($)._unit()._mult(T?-1:1);this.addHalfVertex(d,z.x,z.y,!1,T,0,p)}m&&this.addCurrentVertex(d,g,-O,-D,p)}else if("butt"===L)this.addCurrentVertex(d,v,0,0,p);else if("square"===L){var G=_?1:-1;this.addCurrentVertex(d,v,G,G,p)}else"round"===L&&(_&&(this.addCurrentVertex(d,$,0,0,p),this.addCurrentVertex(d,$,1,1,p,!0)),m&&(this.addCurrentVertex(d,g,-1,-1,p,!0),this.addCurrentVertex(d,g,0,0,p)));if(C&&y<c-1){var k=d.dist(m);if(k>2*f){var U=d.add(m.sub(d)._mult(f/k)._round());this.updateDistance(d,U),this.addCurrentVertex(U,g,0,0,p),d=U}}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,a,s)}},_0x65552f.prototype.addCurrentVertex=function(e,t,i,n,r,o){void 0===o&&(o=!1);var a=t.x+t.y*i,s=t.y-t.x*i,l=-t.x+t.y*n,u=-t.y-t.x*n;this.addHalfVertex(e,a,s,o,!1,i,r),this.addHalfVertex(e,l,u,o,!0,-n,r),this.distance>_0x1a68ad/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(e,t,i,n,r,o))},_0x65552f.prototype.addHalfVertex=function(e,t,i,n,r,o,a){var s=e.x,l=e.y,u=this.scaledDistance*_0x1d6273;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(r?1:0),Math.round(_0x21b6fc*t)+128,Math.round(_0x21b6fc*i)+128,1+(0===o?0:o<0?-1:1)|(63&u)<<2,u>>6);var c=a.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,c),a.primitiveLength++),r?this.e2=c:this.e1=c},_0x65552f.prototype.updateDistance=function(e,t){this.distance+=e.dist(t),this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(_0x1a68ad-1):this.distance},_0x40d7a6.register("LineBucket",_0x65552f,{omit:["layers","patternFeatures"]});var _0x5c98cd=(_0x1dd452=!0,function(e,t){var i=_0x1dd452?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1dd452=!1,i}),_0x2ba13d=_0x5c98cd(void 0,(function(){return _0x2ba13d.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ba13d).search("(((.+)+)+)+$")})),_0x1dd452;_0x2ba13d();var _0x533e93=function(e){this.specification=e};_0x533e93.prototype.possiblyEvaluate=function(e,t,i){if(void 0!==e.value){if("constant"===e.expression.kind){var n=e.expression.evaluate(t,null,{},i);return this._calculate(n,n,n,t)}return this._calculate(e.expression.evaluate(new _0x460d5e(Math.floor(t.zoom-1),t)),e.expression.evaluate(new _0x460d5e(Math.floor(t.zoom),t)),e.expression.evaluate(new _0x460d5e(Math.floor(t.zoom+1),t)),t)}},_0x533e93.prototype._calculate=function(e,t,i,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:i,to:t}},_0x533e93.prototype.interpolate=function(e){return e},_0x40d7a6.register("CrossFadedProperty",_0x533e93);var _0x3c3af7=(_0x3b4a0d=!0,function(e,t){var i=_0x3b4a0d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3b4a0d=!1,i}),_0x4a0e34=_0x3c3af7(void 0,(function(){return _0x4a0e34.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a0e34).search("(((.+)+)+)+$")})),_0x3b4a0d;_0x4a0e34();var _0x17f2c9=function(e){this.specification=e};_0x17f2c9.prototype.possiblyEvaluate=function(e,t,i){return!!e.expression.evaluate(t,null,{},i)},_0x17f2c9.prototype.interpolate=function(){return!1},_0x40d7a6.register("ColorRampProperty",_0x17f2c9);var _0x2796a4=new _0xc3e36b({"line-cap":new _0x5f96b6(_0x3f084c.layout_line["line-cap"]),"line-join":new _0x326e57(_0x3f084c.layout_line["line-join"]),"line-miter-limit":new _0x5f96b6(_0x3f084c.layout_line["line-miter-limit"]),"line-round-limit":new _0x5f96b6(_0x3f084c.layout_line["line-round-limit"]),"line-sort-key":new _0x326e57(_0x3f084c.layout_line["line-sort-key"])}),_0x3f18ea=new _0xc3e36b({"line-opacity":new _0x326e57(_0x3f084c.paint_line["line-opacity"]),"line-color":new _0x326e57(_0x3f084c.paint_line["line-color"]),"line-translate":new _0x5f96b6(_0x3f084c.paint_line["line-translate"]),"line-translate-anchor":new _0x5f96b6(_0x3f084c.paint_line["line-translate-anchor"]),"line-width":new _0x326e57(_0x3f084c.paint_line["line-width"]),"line-gap-width":new _0x326e57(_0x3f084c.paint_line["line-gap-width"]),"line-offset":new _0x326e57(_0x3f084c.paint_line["line-offset"]),"line-blur":new _0x326e57(_0x3f084c.paint_line["line-blur"]),"line-dasharray":new _0x533e93(_0x3f084c.paint_line["line-dasharray"]),"line-pattern":new _0xe051da(_0x3f084c.paint_line["line-pattern"]),"line-gradient":new _0x17f2c9(_0x3f084c.paint_line["line-gradient"])}),_0x23f5eb={paint:_0x3f18ea,layout:_0x2796a4},_0x47a7ca=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(){e.apply(this,arguments)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.possiblyEvaluate=function(t,i){return i=new _0x460d5e(Math.floor(i.zoom),{now:i.now,fadeDuration:i.fadeDuration,zoomHistory:i.zoomHistory,transition:i.transition}),e.prototype.possiblyEvaluate.call(this,t,i)},r.prototype.evaluate=function(t,i,n,r){return i=extend({},i,{zoom:Math.floor(i.zoom)}),e.prototype.evaluate.call(this,t,i,n,r)},r}(_0x326e57),_0x376088=new _0x47a7ca(_0x23f5eb.paint.properties["line-width"].specification);_0x376088.useIntegerZoom=!0;var _0xd97cec=function(e){function t(t){e.call(this,t,_0x23f5eb)}function i(e,t){return t>0?t+2*e:e}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._handleSpecialPaintPropertyUpdate=function(e){"line-gradient"===e&&this._updateGradient()},t.prototype._updateGradient=function(){var e=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=renderColorRamp(e,"lineProgress"),this.gradientTexture=null},t.prototype.recalculate=function(t,i){e.prototype.recalculate.call(this,t,i),this.paint._values["line-floorwidth"]=_0x376088.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)},t.prototype.createBucket=function(e){return new _0x65552f(e)},t.prototype.queryRadius=function(e){var t=e,n=i(_0x3232c9.getMaximumPaintValue("line-width",this,t),_0x3232c9.getMaximumPaintValue("line-gap-width",this,t)),r=_0x3232c9.getMaximumPaintValue("line-offset",this,t);return n/2+Math.abs(r)+_0x3232c9.translateDistance(this.paint.get("line-translate"))},t.prototype.queryIntersectsFeature=function(e,t,n,r,o,a,s){var l=_0x3232c9.translate(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),0,s),u=i(this.paint.get("line-width")?.evaluate(t,n),this.paint.get("line-gap-width")?.evaluate(t,n)),c=s/2*(u=Math.max(u,5)),h=this.paint.get("line-offset")?.evaluate(t,n);return h&&(r=function(e,t){for(var i=[],n=new _0x279c0d(0,0),r=0;r<e.length;r++){for(var o=e[r],a=[],s=0;s<o.length;s++){var l=o[s-1],u=o[s],c=o[s+1],h=0===s?n:u.sub(l)._unit()._perp(),d=s===o.length-1?n:c.sub(u)._unit()._perp(),f=h._add(d)._unit(),p=f.x*d.x+f.y*d.y;f._mult(1/p),a.push(f._mult(t)._add(u))}i.push(a)}return i}(r,h*s)),_0xb019d8.polygonIntersectsBufferedMultiLine(l,r,c)},t.prototype.isTileClipped=function(){return!0},t}(_0x40ea12),_0x5f2cd2=(_0xb3ed70=!0,function(e,t){var i=_0xb3ed70?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb3ed70=!1,i}),_0x5492f9=_0x5f2cd2(void 0,(function(){return _0x5492f9.toString().search("(((.+)+)+)+$").toString().constructor(_0x5492f9).search("(((.+)+)+)+$")})),_0xb3ed70;_0x5492f9();var _0x14bcb1={circle:_0x4b7722,fill:_0x23f80c,line:_0xd97cec,symbol:_0x5c2eff};function _0x118401(e){return _0x14bcb1[e.type]?new _0x14bcb1[e.type](e):null}const _0x3ec306=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xd43d9=_0x3ec306(void 0,(function(){return _0xd43d9.toString().search("(((.+)+)+)+$").toString().constructor(_0xd43d9).search("(((.+)+)+)+$")}));function _0x3b666a(e,t,i){let n,r,o;const a=_0x460f40.devicePixelRatio>1?"@2x":"";let s=getJSON(t.transformRequest(t.normalizeSpriteURL(e,a,".json"),_0x466424.SpriteJSON),((e,t)=>{s=null,!o&&(o=e,n=t,u())})),l=getImage(t.transformRequest(t.normalizeSpriteURL(e,a,".png"),_0x466424.SpriteImage),((e,t)=>{l=null,!o&&(o=e,r=t,u())}));function u(){if(o)i(o);else if(n&&r){const e=_0x460f40.getImageData(r,0),t={};for(const i in n){const{width:r,height:o,x:a,y:s,sdf:l,pixelRatio:u,stretchX:c,stretchY:h,content:d}=n[i],f=new _0x38ad68({width:r,height:o});_0x38ad68.copy(e,f,{x:a,y:s},{x:0,y:0},{width:r,height:o}),t[i]={data:f,pixelRatio:u,sdf:l,stretchX:c,stretchY:h,content:d}}i(null,t)}}return{cancel(){s&&(s.cancel(),s=null),l&&(l.cancel(),l=null)}}}_0xd43d9();var _0x1b927a=(_0x3654ac=!0,function(e,t){var i=_0x3654ac?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3654ac=!1,i}),_0x1d03f9=_0x1b927a(void 0,(function(){return _0x1d03f9.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d03f9).search("(((.+)+)+)+$")})),_0x3654ac;_0x1d03f9();var _0x5ab325=1;function _0x5451d5(){this.images={},this.imageCount=0,this.imageList=[],this.imagesCanvas={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new _0x38ad68({width:1,height:1}),this.dirty=!0}_0x5451d5.prototype.isLoaded=function(){return this.loaded},_0x5451d5.prototype.setLoaded=function(e){if(this.loaded!==e&&(this.loaded=e,e)){for(var t=0,i=this.requestors;t<i.length;t+=1){var n=i[t],r=n.ids,o=n.callback;this._notify(r,o)}this.requestors=[]}},_0x5451d5.prototype.getImage=function(e){return this.images[e]},_0x5451d5.prototype.addImage=function(e,t){this._validate(e,t)&&(this.images[e]=t,this.imageCount++)},_0x5451d5.prototype.getImageCanvas=function(e){if(!t$$(this.images[e]))return null;if(!t$$(this.imagesCanvas[e])){var t=document.createElement("canvas"),i=this.images[e].data;t.width=i.width,t.height=i.height;for(var n=t.getContext("2d"),r=n.createImageData(i.width,i.height),o=i.width*i.height,a=0;a<o;a++)r.data[4*a]=i.data[4*a],r.data[4*a+1]=i.data[4*a+1],r.data[4*a+2]=i.data[4*a+2],r.data[4*a+3]=i.data[4*a+3];n.putImageData(r,0,0),this.imagesCanvas[e]=t}return this.imagesCanvas[e]},_0x5451d5.prototype._validate=function(e,t){var i=!0;return!this._validateStretch(t.stretchX,t.data&&t.data.width)&&(i=!1),!this._validateStretch(t.stretchY,t.data&&t.data.height)&&(i=!1),!this._validateContent(t.content,t)&&(i=!1),i},_0x5451d5.prototype._validateStretch=function(e,t){if(!e)return!0;for(var i=0,n=0,r=e;n<r.length;n+=1){var o=r[n];if(o[0]<i||o[1]<o[0]||t<o[1])return!1;i=o[1]}return!0},_0x5451d5.prototype._validateContent=function(e,t){return!e||4===e.length&&(!(e[0]<0||t.data.width<e[0])&&(!(e[1]<0||t.data.height<e[1])&&(!(e[2]<0||t.data.width<e[2])&&(!(e[3]<0||t.data.height<e[3])&&(!(e[2]<e[0])&&!(e[3]<e[1]))))))},_0x5451d5.prototype.updateImage=function(e,t){var i=this.images[e];t.version=i.version+1,this.images[e]=t,this.updatedImages[e]=!0},_0x5451d5.prototype.removeImage=function(e){var t=this.images[e];delete this.images[e],delete this.patterns[e],this.imageCount--,this.imageCount<0&&(this.imageCount=0),t.userImage&&t.userImage.onRemove&&t.userImage.onRemove()},_0x5451d5.prototype.listImages=function(){return this.imageList.length!=this.imageCount&&(this.imageList=Object.keys(this.images)),this.imageList},_0x5451d5.prototype.getImages=function(e,t){var i=!0;if(!this.isLoaded())for(var n=0,r=e;n<r.length;n+=1){var o=r[n];!this.images[o]&&(i=!1)}this.isLoaded()||i?this._notify(e,t):this.requestors.push({ids:e,callback:t})},_0x5451d5.prototype._notify=function(e,t){for(var i={},n=0,r=e;n<r.length;n+=1){var o=r[n];!this.images[o]&&console.log("styleimagemissing",{id:o});var a=this.images[o];a?i[o]={data:a.data.clone(),pixelRatio:a.pixelRatio,sdf:a.sdf,version:a.version,stretchX:a.stretchX,stretchY:a.stretchY,content:a.content,hasRenderCallback:Boolean(a.userImage&&a.userImage.render)}:console.warn('Image "'+o+'" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.')}t(null,i)},_0x5451d5.prototype.getAllImages=function(e){var t={};for(var i in this.images){var n=this.images[i],r=n.data.clone();e.push(r.data.buffer),t[i]={data:r,pixelRatio:n.pixelRatio,hasRenderCallback:Boolean(n.userImage&&n.userImage.render)}}return t},_0x5451d5.prototype.getPixelSize=function(){var e=this.atlasImage;return{width:e.width,height:e.height}},_0x5451d5.prototype.getPattern=function(e){var t=this.patterns[e],i=this.getImage(e);if(!i)return null;if(t&&t.position.version===i.version)return t.position;if(t)t.position.version=i.version;else{var n={w:i.data.width+2*_0x5ab325,h:i.data.height+2*_0x5ab325,x:0,y:0},r=new _0x23b99f(n,i);this.patterns[e]={bin:n,position:r}}return this._updatePatternAtlas(),this.patterns[e].position},_0x5451d5.prototype.bind=function(e){e.gl,this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):(console.log("ImageManager.prototype.bind"),this.atlasTexture=new _0x463a8e(e,this.atlasImage,de$x.RGBA)),this.atlasTexture.bind(de$x.LINEAR,de$x.CLAMP_TO_EDGE)},_0x5451d5.prototype._updatePatternAtlas=function(){var e=[];for(var t in this.patterns)e.push(this.patterns[t].bin);var i=m$Y(e),n=i.w,r=i.h,o=this.atlasImage;for(var a in o.resize({width:n||1,height:r||1}),this.patterns){var s=this.patterns[a].bin,l=s.x+_0x5ab325,u=s.y+_0x5ab325,c=this.images[a].data,h=c.width,d=c.height;_0x38ad68.copy(c,o,{x:0,y:0},{x:l,y:u},{width:h,height:d}),_0x38ad68.copy(c,o,{x:0,y:d-1},{x:l,y:u-1},{width:h,height:1}),_0x38ad68.copy(c,o,{x:0,y:0},{x:l,y:u+d},{width:h,height:1}),_0x38ad68.copy(c,o,{x:h-1,y:0},{x:l-1,y:u},{width:1,height:d}),_0x38ad68.copy(c,o,{x:0,y:0},{x:l+h,y:u},{width:1,height:d})}this.dirty=!0},_0x5451d5.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},_0x5451d5.prototype.dispatchRenderCallbacks=function(e){for(var t=0,i=e;t<i.length;t+=1){var n=i[t];if(!this.callbackDispatchedThisFrame[n]){this.callbackDispatchedThisFrame[n]=!0;var r=this.images[n];renderStyleImage(r)&&this.updateImage(n,r)}}};const _0x2335ff=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x6f50a6=_0x2335ff(void 0,(function(){return _0x6f50a6.toString().search("(((.+)+)+)+$").toString().constructor(_0x6f50a6).search("(((.+)+)+)+$")}));function _0x265779(e,t,i,n,r){const o=256*t,a=o+255,s=n.transformRequest(n.normalizeGlyphsURL(i).replace("{fontstack}",e).replace("{range}",o+"-"+a),_0x466424.Glyphs);getArrayBuffer(s,((e,t)=>{if(e)r(e);else if(t){const e={};for(const i of _0x549e95(t))e[i.id]=i;r(null,e)}}))}_0x6f50a6();var _0x1175b9=(_0x4c9b9f=!0,function(e,t){var i=_0x4c9b9f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4c9b9f=!1,i}),_0x4ccf63=_0x1175b9(void 0,(function(){return _0x4ccf63.toString().search("(((.+)+)+)+$").toString().constructor(_0x4ccf63).search("(((.+)+)+)+$")})),_0x4c9b9f;_0x4ccf63();var _0x101725=1e20;function _0x5efbdf(e,t,i,n,r,o){this.fontSize=e||24,this.buffer=void 0===t?3:t,this.cutoff=n||.25,this.fontFamily=r||"sans-serif",this.fontWeight=o||"normal",this.radius=i||8;var a=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=a,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(a*a),this.gridInner=new Float64Array(a*a),this.f=new Float64Array(a),this.d=new Float64Array(a),this.z=new Float64Array(a+1),this.v=new Int16Array(a),this.middle=Math.round(a/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function _0x35c20d(e,t,i,n,r,o,a){for(var s=0;s<t;s++){for(var l=0;l<i;l++)n[l]=e[l*t+s];for(_0x22a465(n,r,o,a,i),l=0;l<i;l++)e[l*t+s]=r[l]}for(l=0;l<i;l++){for(s=0;s<t;s++)n[s]=e[l*t+s];for(_0x22a465(n,r,o,a,t),s=0;s<t;s++)e[l*t+s]=Math.sqrt(r[s])}}function _0x22a465(e,t,i,n,r){i[0]=0,n[0]=-_0x101725,n[1]=+_0x101725;for(var o=1,a=0;o<r;o++){for(var s=(e[o]+o*o-(e[i[a]]+i[a]*i[a]))/(2*o-2*i[a]);s<=n[a];)a--,s=(e[o]+o*o-(e[i[a]]+i[a]*i[a]))/(2*o-2*i[a]);i[++a]=o,n[a]=s,n[a+1]=+_0x101725}for(o=0,a=0;o<r;o++){for(;n[a+1]<o;)a++;t[o]=(o-i[a])*(o-i[a])+e[i[a]]}}_0x5efbdf.prototype.draw=function(e){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(e,this.buffer,this.middle);for(var t=this.ctx.getImageData(0,0,this.size,this.size),i=new Uint8ClampedArray(this.size*this.size),n=0;n<this.size*this.size;n++){var r=t.data[4*n+3]/255;this.gridOuter[n]=1===r?0:0===r?_0x101725:Math.pow(Math.max(0,.5-r),2),this.gridInner[n]=1===r?_0x101725:0===r?0:Math.pow(Math.max(0,r-.5),2)}for(_0x35c20d(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),_0x35c20d(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),n=0;n<this.size*this.size;n++){var o=this.gridOuter[n]-this.gridInner[n];i[n]=Math.max(0,Math.min(255,Math.round(255-255*(o/this.radius+this.cutoff))))}return i};const _0x519134=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x9187a4=_0x519134(void 0,(function(){return _0x9187a4.toString().search("(((.+)+)+)+$").toString().constructor(_0x9187a4).search("(((.+)+)+)+$")}));function _0x4aa7e0(e,t){this.requestManager=e,this.localIdeographFontFamily=t,this.entries={}}_0x9187a4(),_0x4aa7e0.prototype.setURL=function(e){this.url=e},_0x4aa7e0.prototype.getGlyphs=function(e,t){const i=[];for(const t in e)for(const n of e[t])i.push({stack:t,id:n});asyncAll(i,(({stack:e,id:t},i)=>{let n=this.entries[e];!n&&(n=this.entries[e]={glyphs:{},requests:{}});let r=n.glyphs[t];if(void 0!==r)return void i(null,{stack:e,id:t,glyph:r});if(r=this._tinySDF(n,e,t),r)return n.glyphs[t]=r,void i(null,{stack:e,id:t,glyph:r});const o=Math.floor(t/256);if(256*o>65535)return void i(new Error("glyphs > 65535 not supported"));let a=n.requests[o];!a&&(a=n.requests[o]=[],_0x4aa7e0.loadGlyphRange(e,o,this.url,this.requestManager,((e,t)=>{if(t)for(const e in t)!this._doesCharSupportLocalGlyph(+e)&&(n.glyphs[+e]=t[+e]);for(const i of a)i(e,t);delete n.requests[o]}))),a.push(((n,r)=>{n?i(n):r&&i(null,{stack:e,id:t,glyph:r[t]||null})}))}),((e,i)=>{if(e)t(e);else if(i){const e={};for(const{stack:t,id:n,glyph:r}of i)(e[t]||(e[t]={}))[n]=r&&{id:r.id,bitmap:r.bitmap.clone(),metrics:r.metrics};t(null,e)}}))},_0x4aa7e0.prototype._doesCharSupportLocalGlyph=function(e){return!!this.localIdeographFontFamily&&(_0x5f2e8e["CJK Unified Ideographs"](e)||_0x5f2e8e["Hangul Syllables"](e)||_0x5f2e8e.Hiragana(e)||_0x5f2e8e.Katakana(e))},_0x4aa7e0.prototype._tinySDF=function(e,t,i){const n=this.localIdeographFontFamily;if(!n)return;if(!this._doesCharSupportLocalGlyph(i))return;let r=e.tinySDF;if(!r){let i="400";/bold/i.test(t)?i="900":/medium/i.test(t)?i="500":/light/i.test(t)&&(i="200"),r=e.tinySDF=new _0x4aa7e0.TinySDF(24,3,8,.25,n,i)}return{id:i,bitmap:new _0x1c2f41({width:30,height:30},r.draw(String.fromCharCode(i))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}},_0x4aa7e0.loadGlyphRange=_0x265779,_0x4aa7e0.TinySDF=_0x5efbdf;var _0x479d16=(_0x230bb6=!0,function(e,t){var i=_0x230bb6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x230bb6=!1,i}),_0x451d96=_0x479d16(void 0,(function(){return _0x451d96.toString().search("(((.+)+)+)+$").toString().constructor(_0x451d96).search("(((.+)+)+)+$")})),_0x230bb6;_0x451d96();var _0x18b995=function(e,t){this.width=e,this.height=t,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}};_0x18b995.prototype.getDash=function(e,t){var i=e.join(",")+String(t);return!this.positions[i]&&(this.positions[i]=this.addDash(e,t)),this.positions[i]},_0x18b995.prototype.addDash=function(e,t){var i=t?7:0,n=2*i+1;if(this.nextRow+n>this.height)return null;for(var r=0,o=0;o<e.length;o++)r+=e[o];for(var a=this.width/r,s=a/2,l=e.length%2==1,u=-i;u<=i;u++)for(var c=this.nextRow+i+u,h=this.width*c,d=l?-e[e.length-1]:0,f=e[0],p=1,_=0;_<this.width;_++){for(;f<_/a;)d=f,f+=e[p],l&&p===e.length-1&&(f+=e[0]),p++;var m=Math.abs(_-d*a),$=Math.abs(_-f*a),g=Math.min(m,$),y=p%2==1,v=void 0;if(t){var x=i?u/i*(s+1):0;if(y){var b=s-Math.abs(x);v=Math.sqrt(g*g+b*b)}else v=s-Math.sqrt(g*g+x*x)}else v=(y?1:-1)*g;this.data[3+4*(h+_)]=Math.max(0,Math.min(255,v+128))}var S={y:(this.nextRow+i+.5)/this.height,height:2*i/this.height,width:r};return this.nextRow+=n,this.dirty=!0,S},_0x18b995.prototype.bind=function(e){var t=e.gl;this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width,this.height,t.RGBA,t.UNSIGNED_BYTE,this.data))):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.width,this.height,0,t.RGBA,t.UNSIGNED_BYTE,this.data))},_0x18b995.prototype.getTexture=function(e){return this.cesiumTexture?this.dirty&&(this.dirty=!1,this.cesiumTexture.copyFrom({width:this.width,height:this.height,arrayBufferView:this.data})):this.cesiumTexture=new P$S({context:e,source:{arrayBufferView:this.data},width:this.width,height:this.height,sampler:new a$Q({wrapS:j$13.REPEAT,wrapT:j$13.REPEAT})}),this.cesiumTexture};var _0x34b727=(_0x40c17e=!0,function(e,t){var i=_0x40c17e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x40c17e=!1,i}),_0x1ee7ac=_0x34b727(void 0,(function(){return _0x1ee7ac.toString().search("(((.+)+)+)+$").toString().constructor(_0x1ee7ac).search("(((.+)+)+)+$")})),_0x40c17e;function _0xc53fd1(){}_0x1ee7ac(),_0xc53fd1.isExpressionFilter=function(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&Array.isArray(e[2]);case"!in":case"!has":case"none":case"crossFields":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":case"like":case"!like":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,i=e.slice(1);t<i.length;t+=1){var n=i[t];if(!_0xc53fd1.isExpressionFilter(n)&&"boolean"!=typeof n)return!1}return!0;default:return!0}};var _0xa9f5b8={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function _0xcc7fb4(e,t){return e<t?-1:e>t?1:0}function _0x539f11(e){if(!e)return!0;var t=e[0];return e.length<=1?"any"!==t:"=="===t?_0x584863(e[1],e[2],"=="):"!="===t?_0x580a73(_0x584863(e[1],e[2],"==")):"<"===t||">"===t||"<="===t||">="===t?_0x584863(e[1],e[2],t):"any"===t?_0x3cd4c6(e.slice(1)):"all"===t?["all"].concat(e.slice(1).map(_0x539f11)):"crossFields"===t?["crossFields"].concat(e.slice(1).map(_0x539f11)):"none"===t?["all"].concat(e.slice(1).map(_0x539f11).map(_0x580a73)):"in"===t?_0x5d5d26(e[1],e.slice(2)):"!in"===t?_0x580a73(_0x5d5d26(e[1],e.slice(2))):"has"===t?_0x31eeba(e[1]):"!has"===t?_0x580a73(_0x31eeba(e[1])):"like"===t?_0x584863(e[1],e[2],"like"):"!like"!==t||_0x580a73(_0x584863(e[1],e[2],"like"))}function _0x584863(e,t,i){switch(e){case"$type":return["filter-type-"+i,t];case"$id":return["filter-id-"+i,t];default:return["filter-"+i,e,t]}}function _0x3cd4c6(e){return["any"].concat(e.map(_0x539f11))}function _0x5d5d26(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((function(e){return typeof e!=typeof t[0]}))?["filter-in-large",e,["literal",t.sort(_0xcc7fb4)]]:["filter-in-small",e,["literal",t]]}}function _0x31eeba(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function _0x580a73(e){return["!",e]}_0xc53fd1.createFilter=function(e){if(null==e)return function(){return!0};!_0xc53fd1.isExpressionFilter(e)&&(e=_0x539f11(e));var t=_0x1b90fc.createExpression(e,_0xa9f5b8);if("error"===t.result)throw new Error(t.value.map((function(e){return e.key+": "+e.message})).join(", "));return function(e,i){return t.value.evaluate(e,i)}};var _0x2bc91d=(_0x525a17=!0,function(e,t){var i=_0x525a17?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x525a17=!1,i}),_0x4b41b8=_0x2bc91d(void 0,(function(){return _0x4b41b8.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b41b8).search("(((.+)+)+)+$")})),_0x525a17;_0x4b41b8();const _0x477b60=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function _0x1f9a30(e){var t=typeof e;if("number"===t||"boolean"===t||"string"===t||null==e)return JSON.stringify(e);if(Array.isArray(e)){for(var i="[",n=0,r=e;n<r.length;n+=1){i+=_0x1f9a30(r[n])+","}return i+"]"}for(var o=Object.keys(e).sort(),a="{",s=0;s<o.length;s++)a+=JSON.stringify(o[s])+":"+_0x1f9a30(e[o[s]])+",";return a+"}"}function _0x4fffaf(e){for(var t="",i=0,n=_0x477b60;i<n.length;i+=1){t+="/"+_0x1f9a30(e[n[i]])}return t}function _0x127ee7(e,t){for(var i={},n=0;n<e.length;n++){var r=t&&t[e[n].id]||_0x4fffaf(e[n]);t&&(t[e[n].id]=r);var o=i[r];!o&&(o=i[r]=[]),o.push(e[n])}var a=[];for(var s in i)a.push(i[s]);return a}var _0x31890a=(_0x40db0a=!0,function(e,t){var i=_0x40db0a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x40db0a=!1,i}),_0x3f50ee=_0x31890a(void 0,(function(){return _0x3f50ee.toString().search("(((.+)+)+)+$").toString().constructor(_0x3f50ee).search("(((.+)+)+)+$")})),_0x40db0a;_0x3f50ee();var _0x6a5d7e=function(e){this.keyCache={},e&&this.replace(e)};function _0x3be71a(e){var t=[];for(var i in e)t.push(e[i]);return t}_0x6a5d7e.prototype.replace=function(e){this._layerConfigs={},this._layers={},this.update(e,[])},_0x6a5d7e.prototype.update=function(e,t){for(var i=this,n=0,r=e;n<r.length;n+=1){var o=r[n];this._layerConfigs[o.id]=o;var a=_0x118401(o);null!=a&&(this._layers[o.id]=a,a._featureFilter=_0xc53fd1.createFilter(a.filter),this.keyCache[o.id]&&delete this.keyCache[o.id])}for(var s=0,l=t;s<l.length;s+=1){var u=l[s];delete this.keyCache[u],delete this._layerConfigs[u],delete this._layers[u]}this.familiesBySource={};for(var c=0,h=_0x127ee7(_0x3be71a(this._layerConfigs),this.keyCache);c<h.length;c+=1){var d=h[c].map((function(e){return i._layers[e.id]})),f=d[0];if(null!=f&&"none"!==f.visibility){var p=f.source||"",_=this.familiesBySource[p];!_&&(_=this.familiesBySource[p]={});var m=f.sourceLayer,$=_[m];!$&&($=_[m]=[]),$.push(d)}}};var _0x1ce1a0=(_0x4776b=!0,function(e,t){var i=_0x4776b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4776b=!1,i}),_0xa55ae4=_0x1ce1a0(void 0,(function(){return _0xa55ae4.toString().search("(((.+)+)+)+$").toString().constructor(_0xa55ae4).search("(((.+)+)+)+$")})),_0x4776b;function _0x79bf12(e){this._callback=e,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._callback()})}_0xa55ae4(),_0x79bf12.prototype.trigger=function(){!this._triggered&&(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._callback()}),0))};const _0x4e526e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4e1038=_0x4e526e(void 0,(function(){return _0x4e1038.toString().search("(((.+)+)+)+$").toString().constructor(_0x4e1038).search("(((.+)+)+)+$")}));function _0x360075(e,t){e.forEach((function(e){t[e]&&(t[e]=t[e].bind(t))}))}function _0x37e7b0(e,t,i){this.target=e,this.parent=t,this.mapId=i,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},_0x360075(["receive","process"],this),this.invoker=new _0x79bf12(this.process),this.target.addEventListener("message",this.receive,!1)}_0x4e1038(),_0x37e7b0.prototype.send=function(e,t,i,n){const r=++_0x37e7b0.taskId;i&&(this.callbacks[r]=i);const o=[];return this.target.postMessage({id:r,type:e,hasCallback:!!i,targetMapId:n,sourceMapId:this.mapId,data:_0x40d7a6.serialize(t,o)},o),{cancel:()=>{i&&delete this.callbacks[r],this.target.postMessage({id:r,type:"<cancel>",targetMapId:n,sourceMapId:this.mapId})}}},_0x37e7b0.prototype.receive=function(e){const t=e.data,i=t.id;if(i&&(!t.targetMapId||this.mapId===t.targetMapId))if("<cancel>"===t.type){delete this.tasks[i];const e=this.cancelCallbacks[i];delete this.cancelCallbacks[i],e&&e()}else this.tasks[i]=t,this.taskQueue.push(i),this.invoker.trigger()},_0x37e7b0.prototype.process=function(){if(!this.taskQueue.length)return;const e=this.taskQueue.shift(),t=this.tasks[e];if(delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),t)if("<response>"===t.type){const i=this.callbacks[e];delete this.callbacks[e],i&&(t.error?i(_0x40d7a6.deserialize(t.error)):i(null,_0x40d7a6.deserialize(t.data)))}else{let i=!1;const n=t.hasCallback?(t,n)=>{i=!0,delete this.cancelCallbacks[e];const r=[];this.target.postMessage({id:e,type:"<response>",sourceMapId:this.mapId,error:t?_0x40d7a6.serialize(t):null,data:_0x40d7a6.serialize(n,r)},r)}:e=>{i=!0};let r=null;const o=_0x40d7a6.deserialize(t.data);if(this.parent[t.type])r=this.parent[t.type](t.sourceMapId,o,n);else if(this.parent.getWorkerSource){const e=t.type.split(".");r=this.parent.getWorkerSource(t.sourceMapId,e[0],o.source)[e[1]](o,n)}else n(new Error("Could not find function "+t.type));!i&&r&&r.cancel&&(this.cancelCallbacks[e]=r.cancel)}},_0x37e7b0.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)},_0x37e7b0.taskId=0;const _0x152867=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2be9a9=_0x152867(void 0,(function(){return _0x2be9a9.toString().search("(((.+)+)+)+$").toString().constructor(_0x2be9a9).search("(((.+)+)+)+$")}));function _0x4c5cfc(e,t){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=uniqueId();const i=this.workerPool.acquire(this.id);for(let e=0;e<i.length;e++){const n=i[e],r=new _0x4c5cfc.Actor(n,t,this.id);r.name="Worker "+e,this.actors.push(r)}}_0x2be9a9(),_0x4c5cfc.prototype.broadcast=function(e,t,i){i=i||function(){},asyncAll(this.actors,((i,n)=>{i.send(e,t,n)}),i)},_0x4c5cfc.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},_0x4c5cfc.prototype.remove=function(){this.actors.forEach((e=>{e.remove()})),this.actors=[],this.workerPool.release(this.id)},_0x4c5cfc.Actor=_0x37e7b0;const _0x538f5=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4afd2a=_0x538f5(void 0,(function(){return _0x4afd2a.toString().search("(((.+)+)+)+$").toString().constructor(_0x4afd2a).search("(((.+)+)+)+$")}));function _0x6743f5(){this.active={}}_0x4afd2a(),_0x6743f5.prototype.acquire=function(e){if(!this.workers)for(this.workers=[];this.workers.length<_0x6743f5.workerCount;)this.workers.push(new window.Worker(window.mvtWorkerUrl));return this.active[e]=!0,this.workers.slice()},_0x6743f5.prototype.release=function(e){delete this.active[e],0===Object.keys(this.active).length&&(this.workers.forEach((e=>{e.terminate()})),this.workers=[])};const _0x3962a5=Math.floor(o$$.hardwareConcurrency/2);_0x6743f5.workerCount=Math.max(Math.min(_0x3962a5,6),1);const _0x3dce95=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1b6dcb=_0x3dce95(void 0,(function(){return _0x1b6dcb.toString().search("(((.+)+)+)+$").toString().constructor(_0x1b6dcb).search("(((.+)+)+)+$")}));let _0x188aba;function _0x2c2737(){return!_0x188aba&&(_0x188aba=new _0x6743f5),_0x188aba}function e$1w(e,t){e=e$1Y(e,0),this._near=e,t=e$1Y(t,Number.MAX_VALUE),this._far=t}function u$W(e,t,i,n){this.near=e$1Y(e,0),this.nearValue=e$1Y(t,0),this.far=e$1Y(i,1),this.farValue=e$1Y(n,0)}_0x1b6dcb(),Object.defineProperties(e$1w.prototype,{near:{get:function(){return this._near},set:function(e){this._near=e}},far:{get:function(){return this._far},set:function(e){this._far=e}}}),e$1w.packedLength=2,e$1w.pack=function(e,t,i){if(!t$$(e))throw new t$_("value is required");if(!t$$(t))throw new t$_("array is required");return i=e$1Y(i,0),t[i++]=e.near,t[i]=e.far,t},e$1w.unpack=function(e,t,i){if(!t$$(e))throw new t$_("array is required");return t=e$1Y(t,0),t$$(i)||(i=new e$1w),i.near=e[t++],i.far=e[t],i},e$1w.equals=function(e,t){return e===t||t$$(e)&&t$$(t)&&e.near===t.near&&e.far===t.far},e$1w.clone=function(e,t){if(t$$(e))return t$$(t)||(t=new e$1w),t.near=e.near,t.far=e.far,t},e$1w.prototype.clone=function(e){return e$1w.clone(this,e)},e$1w.prototype.equals=function(e){return e$1w.equals(this,e)},u$W.clone=function(e,t){if(t$$(e))return t$$(t)?(t.near=e.near,t.nearValue=e.nearValue,t.far=e.far,t.farValue=e.farValue,t):new u$W(e.near,e.nearValue,e.far,e.farValue)},u$W.packedLength=4,u$W.pack=function(e,t,i){if(!t$$(e))throw new t$_("value is required");if(!t$$(t))throw new t$_("array is required");return i=e$1Y(i,0),t[i++]=e.near,t[i++]=e.nearValue,t[i++]=e.far,t[i]=e.farValue,t},u$W.unpack=function(e,t,i){if(!t$$(e))throw new t$_("array is required");return t=e$1Y(t,0),t$$(i)||(i=new u$W),i.near=e[t++],i.nearValue=e[t++],i.far=e[t++],i.farValue=e[t],i},u$W.equals=function(e,t){return e===t||t$$(e)&&t$$(t)&&e.near===t.near&&e.nearValue===t.nearValue&&e.far===t.far&&e.farValue===t.farValue},u$W.prototype.clone=function(e){return u$W.clone(this,e)},u$W.prototype.equals=function(e){return u$W.equals(this,e)};var e$1v={NONE:0,CLAMP_TO_GROUND:1,RELATIVE_TO_GROUND:2},U$Y=Object.freeze(e$1v),e$1u={CENTER:0,LEFT:1,RIGHT:-1},N$W=Object.freeze(e$1u),e$1t={MORPHING:0,COLUMBUS_VIEW:1,SCENE2D:2,SCENE3D:3,getMorphTime:function(e){return e===e$1t.SCENE3D?1:e===e$1t.MORPHING?void 0:0}},b$1d=Object.freeze(e$1t);function i$_(e){this.planes=e$1Y(e,[])}var d$V=[new a$11,new a$11,new a$11];a$11.clone(a$11.UNIT_X,d$V[0]),a$11.clone(a$11.UNIT_Y,d$V[1]),a$11.clone(a$11.UNIT_Z,d$V[2]);var m$R=new a$11,T$U=new a$11,w$Z=new n$17(new a$11(1,0,0),0);function l$W(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=e$1Y(e.near,1),this._near=this.near,this.far=e$1Y(e.far,5e8),this._far=this.far,this._cullingVolume=new i$_,this._orthographicMatrix=new c$1a}function z$N(e){if(!(t$$(e.right)&&t$$(e.left)&&t$$(e.top)&&t$$(e.bottom)&&t$$(e.near)&&t$$(e.far)))throw new t$_("right, left, top, bottom, near, or far parameters are not set.");if(e.top!==e._top||e.bottom!==e._bottom||e.left!==e._left||e.right!==e._right||e.near!==e._near||e.far!==e._far){if(e.left>e.right)throw new t$_("right must be greater than left.");if(e.bottom>e.top)throw new t$_("top must be greater than bottom.");if(e.near<=0||e.near>e.far)throw new t$_("near must be greater than zero and less than far.");e._left=e.left,e._right=e.right,e._top=e.top,e._bottom=e.bottom,e._near=e.near,e._far=e.far,e._orthographicMatrix=c$1a.computeOrthographicOffCenter(e.left,e.right,e.bottom,e.top,e.near,e.far,e._orthographicMatrix)}}i$_.fromBoundingSphere=function(e,t){if(!t$$(e))throw new t$_("boundingSphere is required.");t$$(t)||(t=new i$_);var i=d$V.length,n=t.planes;n.length=2*i;for(var r=e.center,o=e.radius,a=0,s=0;s<i;++s){var l=d$V[s],u=n[a],c=n[a+1];t$$(u)||(u=n[a]=new a$10),t$$(c)||(c=n[a+1]=new a$10),a$11.multiplyByScalar(l,-o,m$R),a$11.add(r,m$R,m$R),u.x=l.x,u.y=l.y,u.z=l.z,u.w=-a$11.dot(l,m$R),a$11.multiplyByScalar(l,o,m$R),a$11.add(r,m$R,m$R),c.x=-l.x,c.y=-l.y,c.z=-l.z,c.w=-a$11.dot(a$11.negate(l,T$U),m$R),a+=2}return t},i$_.prototype.computeVisibility=function(e){if(!t$$(e))throw new t$_("boundingVolume is required.");for(var t=this.planes,i=!1,n=0,r=t.length;n<r;++n){var o=e.intersectPlane(n$17.fromCartesian4(t[n],w$Z));if(o===cr$4.OUTSIDE)return cr$4.OUTSIDE;o===cr$4.INTERSECTING&&(i=!0)}return i?cr$4.INTERSECTING:cr$4.INSIDE},i$_.prototype.computeVisibilityWithPlaneMask=function(e,t){if(!t$$(e))throw new t$_("boundingVolume is required.");if(!t$$(t))throw new t$_("parentPlaneMask is required.");if(t===i$_.MASK_OUTSIDE||t===i$_.MASK_INSIDE)return t;for(var i=i$_.MASK_INSIDE,n=this.planes,r=0,o=n.length;r<o;++r){var a=r<31?1<<r:0;if(!(r<31&&0==(t&a))){var s=e.intersectPlane(n$17.fromCartesian4(n[r],w$Z));if(s===cr$4.OUTSIDE)return i$_.MASK_OUTSIDE;s===cr$4.INTERSECTING&&(i|=a)}}return i},i$_.MASK_OUTSIDE=4294967295,i$_.MASK_INSIDE=0,i$_.MASK_INDETERMINATE=2147483647,Object.defineProperties(l$W.prototype,{projectionMatrix:{get:function(){return z$N(this),this._orthographicMatrix}}});var B$M=new a$11,E$X=new a$11,M$12=new a$11,b$1c=new a$11;function r$K(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._offCenterFrustum=new l$W,this.width=e.width,this._width=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=e$1Y(e.near,1),this._near=this.near,this.far=e$1Y(e.far,5e8),this._far=this.far}function a$N(e){if(!(t$$(e.width)&&t$$(e.aspectRatio)&&t$$(e.near)&&t$$(e.far)))throw new t$_("width, aspectRatio, near, or far parameters are not set.");var t=e._offCenterFrustum;if(e.width!==e._width||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far){if(e.aspectRatio<0)throw new t$_("aspectRatio must be positive.");if(e.near<0||e.near>e.far)throw new t$_("near must be greater than zero and less than far.");e._aspectRatio=e.aspectRatio,e._width=e.width,e._near=e.near,e._far=e.far;var i=1/e.aspectRatio;t.right=.5*e.width,t.left=-t.right,t.top=i*t.right,t.bottom=-t.top,t.near=e.near,t.far=e.far}}l$W.prototype.computeCullingVolume=function(e,t,i){if(!t$$(e))throw new t$_("position is required.");if(!t$$(t))throw new t$_("direction is required.");if(!t$$(i))throw new t$_("up is required.");var n=this._cullingVolume.planes,r=this.top,o=this.bottom,a=this.right,s=this.left,l=this.near,u=this.far,c=a$11.cross(t,i,B$M);a$11.normalize(c,c);var h=E$X;a$11.multiplyByScalar(t,l,h),a$11.add(e,h,h);var d=M$12;a$11.multiplyByScalar(c,s,d),a$11.add(h,d,d);var f=n[0];return t$$(f)||(f=n[0]=new a$10),f.x=c.x,f.y=c.y,f.z=c.z,f.w=-a$11.dot(c,d),a$11.multiplyByScalar(c,a,d),a$11.add(h,d,d),t$$(f=n[1])||(f=n[1]=new a$10),f.x=-c.x,f.y=-c.y,f.z=-c.z,f.w=-a$11.dot(a$11.negate(c,b$1c),d),a$11.multiplyByScalar(i,o,d),a$11.add(h,d,d),t$$(f=n[2])||(f=n[2]=new a$10),f.x=i.x,f.y=i.y,f.z=i.z,f.w=-a$11.dot(i,d),a$11.multiplyByScalar(i,r,d),a$11.add(h,d,d),t$$(f=n[3])||(f=n[3]=new a$10),f.x=-i.x,f.y=-i.y,f.z=-i.z,f.w=-a$11.dot(a$11.negate(i,b$1c),d),t$$(f=n[4])||(f=n[4]=new a$10),f.x=t.x,f.y=t.y,f.z=t.z,f.w=-a$11.dot(t,h),a$11.multiplyByScalar(t,u,d),a$11.add(e,d,d),t$$(f=n[5])||(f=n[5]=new a$10),f.x=-t.x,f.y=-t.y,f.z=-t.z,f.w=-a$11.dot(a$11.negate(t,b$1c),d),this._cullingVolume},l$W.prototype.getPixelDimensions=function(e,t,i,n,r){if(z$N(this),!t$$(e)||!t$$(t))throw new t$_("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new t$_("drawingBufferWidth must be greater than zero.");if(t<=0)throw new t$_("drawingBufferHeight must be greater than zero.");if(!t$$(i))throw new t$_("distance is required.");if(!t$$(n))throw new t$_("pixelRatio is required.");if(n<=0)throw new t$_("pixelRatio must be greater than zero.");if(!t$$(r))throw new t$_("A result object is required.");var o=n*(this.right-this.left)/e,a=n*(this.top-this.bottom)/t;return r.x=o,r.y=a,r},l$W.prototype.clone=function(e){return t$$(e)||(e=new l$W),e.left=this.left,e.right=this.right,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e},l$W.prototype.equals=function(e){return t$$(e)&&e instanceof l$W&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far},l$W.prototype.equalsEpsilon=function(e,t,i){return e===this||t$$(e)&&e instanceof l$W&&n$1d.equalsEpsilon(this.right,e.right,t,i)&&n$1d.equalsEpsilon(this.left,e.left,t,i)&&n$1d.equalsEpsilon(this.top,e.top,t,i)&&n$1d.equalsEpsilon(this.bottom,e.bottom,t,i)&&n$1d.equalsEpsilon(this.near,e.near,t,i)&&n$1d.equalsEpsilon(this.far,e.far,t,i)},r$K.packedLength=4,r$K.pack=function(e,t,i){return n$1e.typeOf.object("value",e),n$1e.defined("array",t),i=e$1Y(i,0),t[i++]=e.width,t[i++]=e.aspectRatio,t[i++]=e.near,t[i]=e.far,t},r$K.unpack=function(e,t,i){return n$1e.defined("array",e),t=e$1Y(t,0),t$$(i)||(i=new r$K),i.width=e[t++],i.aspectRatio=e[t++],i.near=e[t++],i.far=e[t],i},Object.defineProperties(r$K.prototype,{projectionMatrix:{get:function(){return a$N(this),this._offCenterFrustum.projectionMatrix}}}),r$K.prototype.computeCullingVolume=function(e,t,i){return a$N(this),this._offCenterFrustum.computeCullingVolume(e,t,i)},r$K.prototype.getPixelDimensions=function(e,t,i,n,r){return a$N(this),this._offCenterFrustum.getPixelDimensions(e,t,i,n,r)},r$K.prototype.clone=function(e){return t$$(e)||(e=new r$K),e.aspectRatio=this.aspectRatio,e.width=this.width,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._width=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e},r$K.prototype.equals=function(e){return!!(t$$(e)&&e instanceof r$K)&&(a$N(this),a$N(e),this.width===e.width&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))},r$K.prototype.equalsEpsilon=function(e,t,i){return!!(t$$(e)&&e instanceof r$K)&&(a$N(this),a$N(e),n$1d.equalsEpsilon(this.width,e.width,t,i)&&n$1d.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,i)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,i))};var u$V={},k$U=new a$10(0,0,0,1),s$1b=new a$10,J$W=new n$13,z$M=new r$T,L$Y=new r$T;u$V.wgs84ToWindowCoordinates=function(e,t,i){return u$V.wgs84WithEyeOffsetToWindowCoordinates(e,t,a$11.ZERO,i)};var P$N=new a$10,_$$=new a$11;function B$L(e,t,i,n){var r=i._scene.context.curFusionViewMatrix||i.viewMatrix,o=c$1a.multiplyByVector(r,a$10.fromElements(e.x,e.y,e.z,1,P$N),P$N),a=a$11.multiplyComponents(t,a$11.normalize(o,_$$),_$$);return o.x+=t.x+a.x,o.y+=t.y+a.y,o.z+=a.z,c$1a.multiplyByVector(i.frustum.projectionMatrix,o,n)}var K$Q=new i$1g(Math.PI,n$1d.PI_OVER_TWO),Q$X=new a$11,X$O=new a$11;u$V.wgs84WithEyeOffsetToWindowCoordinates=function(e,t,i,n){if(!t$$(e))throw new t$_("scene is required.");if(!t$$(t))throw new t$_("position is required.");var r=e.frameState,o=u$V.computeActualWgs84Position(r,t,k$U);if(t$$(o)){var a=e.canvas,s=J$W;s.x=0,s.y=0,s.width=a.clientWidth,s.height=a.clientHeight;var l=e.camera,u=!1;if(r.mode===b$1d.SCENE2D){var c=e.mapProjection,h=K$Q,d=c.project(h,Q$X),f=a$11.clone(l.position,X$O),p=l.frustum.clone(),_=c$1a.computeViewportTransformation(s,0,1,new c$1a),m=l.frustum.projectionMatrix,$=l.positionWC.y,g=a$11.fromElements(n$1d.sign($)*d.x-$,0,-l.positionWC.x),y=m$13.pointToGLWindowCoordinates(m,_,g);if(0===$||y.x<=0||y.x>=a.clientWidth)u=!0;else{if(y.x>.5*a.clientWidth){s.width=y.x,l.frustum.right=d.x-$,s$1b=B$L(o,i,l,s$1b),u$V.clipToGLWindowCoordinates(s,s$1b,z$M),s.x+=y.x,l.position.x=-l.position.x;var v=l.frustum.right;l.frustum.right=-l.frustum.left,l.frustum.left=-v,s$1b=B$L(o,i,l,s$1b),u$V.clipToGLWindowCoordinates(s,s$1b,L$Y)}else{s.x+=y.x,s.width-=y.x,l.frustum.left=-d.x-$,s$1b=B$L(o,i,l,s$1b),u$V.clipToGLWindowCoordinates(s,s$1b,z$M),s.x=s.x-s.width,l.position.x=-l.position.x;var x=l.frustum.left;l.frustum.left=-l.frustum.right,l.frustum.right=-x,s$1b=B$L(o,i,l,s$1b),u$V.clipToGLWindowCoordinates(s,s$1b,L$Y)}a$11.clone(f,l.position),l.frustum=p.clone(),((n=r$T.clone(z$M,n)).x<0||n.x>a.clientWidth)&&(n.x=L$Y.x)}}if(r.mode!==b$1d.SCENE2D||u){if((s$1b=B$L(o,i,l,s$1b)).z<0&&!(l.frustum instanceof r$K)&&!(l.frustum instanceof l$W))return;n=u$V.clipToGLWindowCoordinates(s,s$1b,n)}return n.y=a.clientHeight-n.y,n}},u$V.wgs84ToDrawingBufferCoordinates=function(e,t,i){if(t$$(i=u$V.wgs84ToWindowCoordinates(e,t,i)))return u$V.transformWindowToDrawingBuffer(e,i,i)};var x$Z=new a$11,Y$O=new i$1g;u$V.computeActualWgs84Position=function(e,t,i){var n=e.mode;if(n===b$1d.SCENE3D)return a$11.clone(t,i);var r=e.mapProjection,o=r.ellipsoid.cartesianToCartographic(t,Y$O);if(t$$(o)){if(r.project(o,x$Z),n===b$1d.COLUMBUS_VIEW)return a$11.fromElements(x$Z.z,x$Z.x,x$Z.y,i);if(n===b$1d.SCENE2D)return a$11.fromElements(0,x$Z.x,x$Z.y,i);var a=e.morphTime;return a$11.fromElements(n$1d.lerp(x$Z.z,t.x,a),n$1d.lerp(x$Z.x,t.y,a),n$1d.lerp(x$Z.y,t.z,a),i)}};var G$T=new a$11,O$O=new a$11,F$Z=new c$1a;u$V.clipToGLWindowCoordinates=function(e,t,i){return a$11.divideByScalar(t,t.w,G$T),c$1a.computeViewportTransformation(e,0,1,F$Z),c$1a.multiplyByPoint(F$Z,G$T,O$O),r$T.fromCartesian3(O$O,i)},u$V.transformWindowToDrawingBuffer=function(e,t,i){var n=e.canvas,r=e.drawingBufferWidth/n.clientWidth,o=e.drawingBufferHeight/n.clientHeight;return r$T.fromElements(t.x*r,t.y*o,i)};var $$V=new a$10,N$V=new a$10;u$V.drawingBufferToWgs84Coordinates=function(e,t,i,n){var r=e.context.uniformState,o=r.currentFrustum,a=o.x,s=o.y;if(e.frameState.useLogDepth){var l=i*r.log2FarDepthFromNearPlusOne;i=s*(1-a/(Math.pow(2,l)-1+a))/(s-a)}var u=e._view.passState.viewport,c=a$10.clone(a$10.UNIT_W,$$V);c.x=(t.x-u.x)/u.width*2-1,c.y=(t.y-u.y)/u.height*2-1,c.z=2*i-1,c.w=1;var h,d=e.camera.frustum;if(t$$(d.fovy)){var f=1/(h=c$1a.multiplyByVector(r.inverseViewProjection,c,N$V)).w;a$11.multiplyByScalar(h,f,h)}else t$$(d._offCenterFrustum)&&(d=d._offCenterFrustum),(h=N$V).x=.5*(c.x*(d.right-d.left)+d.left+d.right),h.y=.5*(c.y*(d.top-d.bottom)+d.bottom+d.top),h.z=.5*(c.z*(a-s)-a-s),h.w=1,h=c$1a.multiplyByVector(r.inverseView,h,h);return a$11.fromCartesian4(h,n)},u$V.convert2DToCartesian=function(e,t){if(t){var i=t.x,n=t.y;i>20037508.342789244&&(i-=20037508.342789244*Math.floor(i/20037508.342789244)),n>10018754.171394622&&(n-=20037508.342789244*Math.floor((n+10018754.171394622)/20037508.342789244)),t.x=i,t.y=n}var r=e.mapProjection,o=r.ellipsoid,a=new a$11,s=new i$1g,l=r.unproject(t,s);return o.cartographicToCartesian(l,a),a};var e$1s={CENTER:0,BOTTOM:1,BASELINE:2,TOP:-1},j$10=Object.freeze(e$1s);function s$1a(e,t){if(t$$((e=e$1Y(e,e$1Y.EMPTY_OBJECT)).billboardStyle)){var i=e.billboardStyle;e.image=e$1Y(i.image,void 0)}if(t$$(e.disableDepthTestDistance)&&e.disableDepthTestDistance<0)throw new t$_("disableDepthTestDistance must be greater than or equal to 0.0.");var n=e.translucencyByDistance,r=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,a=e.distanceDisplayCondition;if(t$$(n)){if(n.far<=n.near)throw new t$_("translucencyByDistance.far must be greater than translucencyByDistance.near.");n=u$W.clone(n)}if(t$$(r)){if(r.far<=r.near)throw new t$_("pixelOffsetScaleByDistance.far must be greater than pixelOffsetScaleByDistance.near.");r=u$W.clone(r)}if(t$$(o)){if(o.far<=o.near)throw new t$_("scaleByDistance.far must be greater than scaleByDistance.near.");o=u$W.clone(o)}if(t$$(a)){if(a.far<=a.near)throw new t$_("distanceDisplayCondition.far must be greater than distanceDisplayCondition.near.");a=e$1w.clone(a)}this._show=e$1Y(e.show,!0),this._position=a$11.clone(e$1Y(e.position,a$11.ZERO)),this._actualPosition=a$11.clone(this._position),this._volTexCoord=a$11.clone(e$1Y(e.volTexCoord,a$11.ZERO)),this._pixelOffset=r$T.clone(e$1Y(e.pixelOffset,r$T.ZERO)),this._translate=new r$T(0,0),this._eyeOffset=a$11.clone(e$1Y(e.eyeOffset,a$11.ZERO)),this._heightReference=e$1Y(e.heightReference,U$Y.NONE),this._verticalOrigin=e$1Y(e.verticalOrigin,j$10.CENTER),this._horizontalOrigin=e$1Y(e.horizontalOrigin,N$W.CENTER),this._scale=e$1Y(e.scale,1),this._color=e$1z.clone(e$1Y(e.color,e$1z.WHITE)),this._rotation=e$1Y(e.rotation,0),this._alignedAxis=a$11.clone(e$1Y(e.alignedAxis,a$11.ZERO)),this._width=e.width,this._height=e.height,this._scaleByDistance=o,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=r,this._sizeInMeters=e$1Y(e.sizeInMeters,!1),this._distanceDisplayCondition=a,this._disableDepthTestDistance=e.disableDepthTestDistance,this._id=e.id,this._collection=e$1Y(e.collection,t),this._pickId=void 0,this._pickPrimitive=e$1Y(e._pickPrimitive,this),this._billboardCollection=t,this._dirty=!1,this._index=-1,this._batchIndex=void 0,this._imageIndex=-1,this._imageIndexPromise=void 0,this._imageId=void 0,this._image=e$1Y(e.image,void 0),this._imageSubRegion=void 0,this._imageWidth=void 0,this._imageHeight=void 0,this._labelDimensions=void 0,this._labelHorizontalOrigin=void 0,this._labelTranslate=void 0,this._mvtLayerID=e.mvtLayerID,this._mapName=e.mapName,this._mvtProperties=e.mvtProperties,this._associativeMvtLabel=void 0;var s=e.image,l=e.imageId;t$$(s)&&(t$$(l)||(l="string"==typeof s?s:t$$(s.src)?s.src:t$U()),this._imageId=l,this._image=s),t$$(e.imageSubRegion)&&(this._imageId=l,this._imageSubRegion=e.imageSubRegion),t$$(this._billboardCollection._textureAtlas)&&this._loadImage(),this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=b$1d.SCENE3D,this._clusterShow=!0,this._outlineColor=e$1z.clone(e$1Y(e.outlineColor,e$1z.BLACK)),this._outlineWidth=e$1Y(e.outlineWidth,0),this._updateClamping(),this._screenSpacePosition=new r$T,this._opacityState={opacity:0,placed:!1}}var L$X=s$1a.SHOW_INDEX=0,E$W=s$1a.POSITION_INDEX=1,F$Y=s$1a.PIXEL_OFFSET_INDEX=2,j$$=s$1a.EYE_OFFSET_INDEX=3,U$X=s$1a.HORIZONTAL_ORIGIN_INDEX=4,V$L=s$1a.VERTICAL_ORIGIN_INDEX=5,J$V=s$1a.SCALE_INDEX=6,S$K=s$1a.IMAGE_INDEX_INDEX=7,z$L=s$1a.COLOR_INDEX=8,K$P=s$1a.ROTATION_INDEX=9,Q$W=s$1a.ALIGNED_AXIS_INDEX=10,$$U=s$1a.SCALE_BY_DISTANCE_INDEX=11,ii$9=s$1a.TRANSLUCENCY_BY_DISTANCE_INDEX=12,ei$7=s$1a.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX=13,ti$8=s$1a.DISTANCE_DISPLAY_CONDITION=14,si$6=s$1a.DISABLE_DEPTH_DISTANCE=15;s$1a.TEXTURE_COORDINATE_BOUNDS=16;var oi$5=s$1a.VOL_TEXCOORD_INDEX=17,W$13=s$1a.SDF_INDEX=18,ni$6=s$1a.OPACITY_STATE_INDEX=19;function r$J(e,t){var i=e._billboardCollection;t$$(i)&&(i._updateBillboard(e,t),e._dirty=!0)}s$1a.NUMBER_OF_PROPERTIES=20,Object.defineProperties(s$1a.prototype,{show:{get:function(){return this._show},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._show!==e&&(this._show=e,r$J(this,L$X))}},position:{get:function(){return this._position},set:function(e){if(!t$$(e))throw new t$_("value is required.");var t=this._position;a$11.equals(t,e)||(a$11.clone(e,t),a$11.clone(e,this._actualPosition),this._updateClamping(),r$J(this,E$W))}},heightReference:{get:function(){return this._heightReference},set:function(e){if(!t$$(e))throw new t$_("value is required.");e!==this._heightReference&&(this._heightReference=e,this._updateClamping(),r$J(this,E$W))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){if(!t$$(e))throw new t$_("value is required.");var t=this._pixelOffset;r$T.equals(t,e)||(r$T.clone(e,t),r$J(this,F$Y))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){if(t$$(e)&&e.far<=e.near)throw new t$_("far distance must be greater than near distance.");var t=this._scaleByDistance;u$W.equals(t,e)||(this._scaleByDistance=u$W.clone(e,t),r$J(this,$$U))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){if(t$$(e)&&e.far<=e.near)throw new t$_("far distance must be greater than near distance.");var t=this._translucencyByDistance;u$W.equals(t,e)||(this._translucencyByDistance=u$W.clone(e,t),r$J(this,ii$9))}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){if(t$$(e)&&e.far<=e.near)throw new t$_("far distance must be greater than near distance.");var t=this._pixelOffsetScaleByDistance;u$W.equals(t,e)||(this._pixelOffsetScaleByDistance=u$W.clone(e,t),r$J(this,ei$7))}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){if(!t$$(e))throw new t$_("value is required.");var t=this._eyeOffset;a$11.equals(t,e)||(a$11.clone(e,t),r$J(this,j$$))}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._horizontalOrigin!==e&&(this._horizontalOrigin=e,r$J(this,U$X))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._verticalOrigin!==e&&(this._verticalOrigin=e,r$J(this,V$L))}},scale:{get:function(){return this._scale},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._scale!==e&&(this._scale=e,r$J(this,J$V))}},color:{get:function(){return this._color},set:function(e){if(!t$$(e))throw new t$_("value is required.");var t=this._color;e$1z.equals(t,e)||(e$1z.clone(e,t),r$J(this,z$L))}},rotation:{get:function(){return this._rotation},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._rotation!==e&&(this._rotation=e,r$J(this,K$P))}},alignedAxis:{get:function(){return this._alignedAxis},set:function(e){if(!t$$(e))throw new t$_("value is required.");var t=this._alignedAxis;a$11.equals(t,e)||(a$11.clone(e,t),r$J(this,Q$W))}},width:{get:function(){return e$1Y(this._width,this._imageWidth)},set:function(e){this._width!==e&&(this._width=e,r$J(this,S$K))}},height:{get:function(){return e$1Y(this._height,this._imageHeight)},set:function(e){this._height!==e&&(this._height=e,r$J(this,S$K))}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){this._sizeInMeters!==e&&(this._sizeInMeters=e,r$J(this,z$L))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(!e$1w.equals(e,this._distanceDisplayCondition)){if(t$$(e)&&e.far<=e.near)throw new t$_("far distance must be greater than near distance.");this._distanceDisplayCondition=e$1w.clone(e,this._distanceDisplayCondition),r$J(this,ti$8)}}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){if(t$$(e)&&e<0)throw new t$_("disableDepthTestDistance must be greater than or equal to 0.0.");this._disableDepthTestDistance=e,r$J(this,si$6)}}},volTextureCoord:{get:function(){return this._volTexCoord},set:function(e){this._volTexCoord!==e&&(this._volTexCoord=e,r$J(this,oi$5))}},id:{get:function(){return this._id},set:function(e){this._id=e,t$$(this._pickId)&&(this._pickId.object.id=e)}},pickPrimitive:{get:function(){return this._pickPrimitive},set:function(e){this._pickPrimitive=e,t$$(this._pickId)&&(this._pickId.object.primitive=e)}},pickId:{get:function(){return this._pickId}},image:{get:function(){return this._imageId},set:function(e){t$$(e)?"string"==typeof e?this.setImage(e,e):e instanceof t$X?this.setImage(e.url,e):t$$(e.src)?this.setImage(e.src,e):this.setImage(t$U(),e):(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=void 0,this._image=void 0,this._imageIndexPromise=void 0,r$J(this,S$K))}},ready:{get:function(){return-1!==this._imageIndex}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=a$11.clone(e,this._actualClampedPosition),r$J(this,E$W)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,r$J(this,L$X))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!t$$(e))throw new t$_("value is required.");var t=this._outlineColor;e$1z.equals(t,e)||(e$1z.clone(e,t),r$J(this,W$13))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,r$J(this,W$13))}},opacityState:{get:function(){return this._opacityState},set:function(e){(this._opacityState.opacity!==e.opacity||this._opacityState.placed!==e.placed)&&(this._opacityState={opacity:e.opacity,placed:e.placed},r$J(this,ni$6))}}}),s$1a.prototype.getPickId=function(e){return t$$(this._pickId)||(this._pickId=e.createPickId({primitive:this._pickPrimitive,collection:this._collection,id:this._id})),this._pickId},s$1a.prototype._updateClamping=function(){s$1a._updateClamping(this._billboardCollection,this)};var y$W=new i$1g,T$T=new a$11;s$1a._updateClamping=function(e,t){var i=e._scene;if(t$$(i)&&t$$(i.globe)){var n=i.globe,r=n.ellipsoid,o=n._surface,a=i.frameState.mode,s=a!==t._mode;if(t._mode=a,(t._heightReference===U$Y.NONE||s)&&t$$(t._removeCallbackFunc)&&(t._removeCallbackFunc(),t._removeCallbackFunc=void 0,t._clampedPosition=void 0),t._heightReference!==U$Y.NONE&&t$$(t._position)){var l=r.cartesianToCartographic(t._position);if(t$$(l)){t$$(t._removeCallbackFunc)&&t._removeCallbackFunc();e=e$1Y(t._labelCollection,t._billboardCollection);t._removeCallbackFunc=o.updateHeight(l,c,t$$(e)&&e._isMVT?void 0:i),i$1g.clone(l,y$W);var u=n.getHeight(l);t$$(u)&&(y$W.height=u),r.cartographicToCartesian(y$W,T$T),a!==b$1d.SCENE3D&&(T$T=m$13.convertToColumbusCartesian(T$T)),c(T$T)}else t._actualClampedPosition=void 0}}else if(t._heightReference!==U$Y.NONE)throw new t$_("Height reference is not supported without a scene and globe.");function c(e){if(t._heightReference===U$Y.RELATIVE_TO_GROUND)if(t._mode===b$1d.SCENE3D){var i=r.cartesianToCartographic(e,y$W);i.height+=l.height,r.cartographicToCartesian(i,e)}else e.x+=l.height;t._clampedPosition=a$11.clone(e,t._clampedPosition)}},s$1a.prototype._loadImage=function(){var e,t=this._billboardCollection._textureAtlas,i=this._imageId,n=this._image,r=this._imageSubRegion;if(t$$(n)&&(e=t.addImage(i,n)),t$$(r)&&(e=t.addSubRegion(i,r)),this._imageIndexPromise=e,t$$(e)){var o=this;e.then((function(e){if(o._imageId===i&&o._image===n&&n$13.equals(o._imageSubRegion,r)){var a=t.textureCoordinates[e];o._imageWidth=t.texture.width*a.width,o._imageHeight=t.texture.height*a.height,o._imageIndex=e,o._ready=!0,o._image=void 0,o._imageIndexPromise=void 0,r$J(o,S$K)}})).otherwise((function(e){console.error("Error loading image for billboard: "+e),o._imageIndexPromise=void 0}))}},s$1a.prototype.setImage=function(e,t){if(!t$$(e))throw new t$_("id is required.");if(!t$$(t))throw new t$_("image is required.");this._imageId!==e&&(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=e,this._image=t,t$$(this._billboardCollection._textureAtlas)&&this._loadImage())},s$1a.prototype.setImageSubRegion=function(e,t){if(!t$$(e))throw new t$_("id is required.");if(!t$$(t))throw new t$_("subRegion is required.");this._imageId===e&&n$13.equals(this._imageSubRegion,t)||(this._imageIndex=-1,this._imageId=e,this._imageSubRegion=n$13.clone(t),t$$(this._billboardCollection._textureAtlas)&&this._loadImage())},s$1a.prototype._setTranslate=function(e){if(!t$$(e))throw new t$_("value is required.");var t=this._translate;r$T.equals(t,e)||(r$T.clone(e,t),r$J(this,F$Y))},s$1a.prototype._getActualPosition=function(){return t$$(this._clampedPosition)?this._clampedPosition:this._actualPosition},s$1a.prototype._setActualPosition=function(e){t$$(this._clampedPosition)||a$11.clone(e,this._actualPosition),r$J(this,E$W)};var M$11=new a$10;s$1a._computeActualPosition=function(e,t,i,n){return t$$(e._clampedPosition)?(i.mode!==e._mode&&e._updateClamping(),e._clampedPosition):i.mode===b$1d.SCENE3D?t:(c$1a.multiplyByPoint(n,t,M$11),u$V.computeActualWgs84Position(i,M$11))};var H$W=new a$11;s$1a._computeScreenSpacePosition=function(e,t,i,n,r,o){var a=c$1a.multiplyByPoint(e,t,H$W),s=u$V.wgs84WithEyeOffsetToWindowCoordinates(r,a,i,o);if(t$$(s))return r$T.add(s,n,s),s};var N$U=new r$T(0,0);s$1a.prototype.computeScreenSpacePosition=function(e,t){var i=this._billboardCollection;if(t$$(t)||(t=this._screenSpacePosition),!t$$(i))throw new t$_("Billboard must be in a collection. Was it removed?");if(!t$$(e))throw new t$_("scene is required.");r$T.clone(this._pixelOffset,N$U),r$T.add(N$U,this._translate,N$U);var n=i.modelMatrix,r=this._position;if(t$$(this._clampedPosition)&&(r=this._clampedPosition,e.mode!==b$1d.SCENE3D)){var o=e.mapProjection,a=o.ellipsoid,s=o.unproject(r,y$W);r=a.cartographicToCartesian(s,H$W),n=c$1a.IDENTITY}return s$1a._computeScreenSpacePosition(n,r,this._eyeOffset,N$U,e,t)},s$1a.getScreenSpaceBoundingBox=function(e,t,i){var n=e.width,r=e.height,o=e.scale;n*=o,r*=o;var a=t.x;e.horizontalOrigin===N$W.RIGHT?a-=n:e.horizontalOrigin===N$W.CENTER&&(a-=.5*n);var s=t.y;return e.verticalOrigin===j$10.BOTTOM||e.verticalOrigin===j$10.BASELINE?s-=r:e.verticalOrigin===j$10.CENTER&&(s-=.5*r),t$$(i)||(i=new n$13),i.x=a,i.y=s,i.width=n,i.height=r,i},s$1a.prototype.equals=function(e){return this===e||t$$(e)&&this._id===e._id&&a$11.equals(this._position,e._position)&&this._imageId===e._imageId&&this._show===e._show&&this._scale===e._scale&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&n$13.equals(this._imageSubRegion,e._imageSubRegion)&&e$1z.equals(this._color,e._color)&&r$T.equals(this._pixelOffset,e._pixelOffset)&&r$T.equals(this._translate,e._translate)&&a$11.equals(this._eyeOffset,e._eyeOffset)&&u$W.equals(this._scaleByDistance,e._scaleByDistance)&&u$W.equals(this._translucencyByDistance,e._translucencyByDistance)&&u$W.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&e$1w.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance},s$1a.prototype._destroy=function(){t$$(this._customData)&&(this._billboardCollection._scene.globe._surface.removeTileCustomData(this._customData),this._customData=void 0),t$$(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this.image=void 0,this._pickId=this._pickId&&this._pickId.destroy(),this._billboardCollection=void 0},s$1a.prototype.setBillboardStyle=function(e){!t$$(e)||(this.image=e$1Y(e.image,this._image))};const _0x21cc2b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x407a58=_0x21cc2b(void 0,(function(){return _0x407a58.toString().search("(((.+)+)+)+$").toString().constructor(_0x407a58).search("(((.+)+)+)+$")}));_0x407a58();class _0x280229{constructor(e,t,i){const n=this.boxCells=[],r=this.circleCells=[];this.xCellCount=Math.ceil(e/i),this.yCellCount=Math.ceil(t/i);for(let e=0;e<this.xCellCount*this.yCellCount;e++)n.push([]),r.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=e,this.height=t,this.xScale=this.xCellCount/e,this.yScale=this.yCellCount/t,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(e,t,i,n,r){this._forEachCell(t,i,n,r,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(t),this.bboxes.push(i),this.bboxes.push(n),this.bboxes.push(r)}insertCircle(e,t,i,n){this._forEachCell(t-n,i-n,t+n,i+n,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(t),this.circles.push(i),this.circles.push(n)}_insertBoxCell(e,t,i,n,r,o){this.boxCells[r].push(o)}_insertCircleCell(e,t,i,n,r,o){this.circleCells[r].push(o)}_query(e,t,i,n,r,o){if(i<0||e>this.width||n<0||t>this.height)return!r&&[];const a=[];if(e<=0&&t<=0&&this.width<=i&&this.height<=n){if(r)return!0;for(let e=0;e<this.boxKeys.length;e++)a.push({key:this.boxKeys[e],x1:this.bboxes[4*e],y1:this.bboxes[4*e+1],x2:this.bboxes[4*e+2],y2:this.bboxes[4*e+3]});for(let e=0;e<this.circleKeys.length;e++){const t=this.circles[3*e],i=this.circles[3*e+1],n=this.circles[3*e+2];a.push({key:this.circleKeys[e],x1:t-n,y1:i-n,x2:t+n,y2:i+n})}return o?a.filter(o):a}{const s={hitTest:r,seenUids:{box:{},circle:{}}};return this._forEachCell(e,t,i,n,this._queryCell,a,s,o),r?a.length>0:a}}_queryCircle(e,t,i,n,r){const o=e-i,a=e+i,s=t-i,l=t+i;if(a<0||o>this.width||l<0||s>this.height)return!n&&[];const u=[],c={hitTest:n,circle:{x:e,y:t,radius:i},seenUids:{box:{},circle:{}}};return this._forEachCell(o,s,a,l,this._queryCellCircle,u,c,r),n?u.length>0:u}query(e,t,i,n,r){return this._query(e,t,i,n,!1,r)}hitTest(e,t,i,n,r){return this._query(e,t,i,n,!0,r)}hitTestCircle(e,t,i,n){return this._queryCircle(e,t,i,!0,n)}_queryCell(e,t,i,n,r,o,a,s){const l=a.seenUids,u=this.boxCells[r];if(null!==u){const r=this.bboxes;for(const c of u)if(!l.box[c]){l.box[c]=!0;const u=4*c;if(e<=r[u+2]&&t<=r[u+3]&&i>=r[u+0]&&n>=r[u+1]&&(!s||s(this.boxKeys[c]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[c],x1:r[u],y1:r[u+1],x2:r[u+2],y2:r[u+3]})}}}const c=this.circleCells[r];if(null!==c){const r=this.circles;for(const u of c)if(!l.circle[u]){l.circle[u]=!0;const c=3*u;if(this._circleAndRectCollide(r[c],r[c+1],r[c+2],e,t,i,n)&&(!s||s(this.circleKeys[u]))){if(a.hitTest)return o.push(!0),!0;{const e=r[c],t=r[c+1],i=r[c+2];o.push({key:this.circleKeys[u],x1:e-i,y1:t-i,x2:e+i,y2:t+i})}}}}}_queryCellCircle(e,t,i,n,r,o,a,s){const l=a.circle,u=a.seenUids,c=this.boxCells[r];if(null!==c){const e=this.bboxes;for(const t of c)if(!u.box[t]){u.box[t]=!0;const i=4*t;if(this._circleAndRectCollide(l.x,l.y,l.radius,e[i+0],e[i+1],e[i+2],e[i+3])&&(!s||s(this.boxKeys[t])))return o.push(!0),!0}}const h=this.circleCells[r];if(null!==h){const e=this.circles;for(const t of h)if(!u.circle[t]){u.circle[t]=!0;const i=3*t;if(this._circlesCollide(e[i],e[i+1],e[i+2],l.x,l.y,l.radius)&&(!s||s(this.circleKeys[t])))return o.push(!0),!0}}}_forEachCell(e,t,i,n,r,o,a,s){const l=this._convertToXCellCoord(e),u=this._convertToYCellCoord(t),c=this._convertToXCellCoord(i),h=this._convertToYCellCoord(n);for(let d=l;d<=c;d++)for(let l=u;l<=h;l++){const u=this.xCellCount*l+d;if(r.call(this,e,t,i,n,u,o,a,s))return}}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,t,i,n,r,o){const a=n-e,s=r-t,l=i+o;return l*l>a*a+s*s}_circleAndRectCollide(e,t,i,n,r,o,a){const s=(o-n)/2,l=Math.abs(e-(n+s));if(l>s+i)return!1;const u=(a-r)/2,c=Math.abs(t-(r+u));if(c>u+i)return!1;if(l<=s||c<=u)return!0;const h=l-s,d=c-u;return h*h+d*d<=i*i}}const _0x1012a4=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x270c63=_0x1012a4(void 0,(function(){return _0x270c63.toString().search("(((.+)+)+)+$").toString().constructor(_0x270c63).search("(((.+)+)+)+$")}));_0x270c63();const _0x59faf2=100;class _0x59768a{constructor(e,t,i,n,r){this.transform=i,this.grid=n||new _0x280229(e+2*_0x59faf2,t+2*_0x59faf2,25),this.ignoredGrid=r||new _0x280229(e+2*_0x59faf2,t+2*_0x59faf2,25),this.pitchfactor=Math.cos(i._pitch)*i.cameraToCenterDistance,this.screenRightBoundary=e+_0x59faf2,this.screenBottomBoundary=t+_0x59faf2,this.gridRightBoundary=e+2*_0x59faf2,this.gridBottomBoundary=t+2*_0x59faf2}placeCollisionBox(e,t,i){const n=e.x1,r=e.y1,o=e.x2,a=e.y2;return!this.isInsideGrid(n,r,o,a)||!t&&this.grid.hitTest(n,r,o,a,i)?{box:[],offscreen:!1}:{box:[n,r,o,a],offscreen:this.isOffscreen(n,r,o,a)}}approximateTileDistance(e,t,i,n,r){const o=r?1:n/this.pitchfactor,a=e.lastSegmentViewportDistance*i;return e.prevTileDistance+a+(o-1)*a*Math.abs(Math.sin(t))}placeCollisionCircles(e,t,i,n,r,o,a,s,l,u,c,h,d){const f=[],p=this.projectAnchor(l,r.anchorX,r.anchorY),_=s/24,m=r.lineOffsetX*s,$=r.lineOffsetY*s,g=new Point(r.anchorX,r.anchorY),y=projection.project(g,u).point,v=projection.placeFirstAndLastGlyph(_,a,m,$,!1,y,g,r,o,u,{},!0);let x=!1,b=!1,S=!0;const w=p.perspectiveRatio*n,C=1/(n*i);let T=0,P=0;v&&(T=this.approximateTileDistance(v.first.tileDistance,v.first.angle,C,p.cameraDistance,h),P=this.approximateTileDistance(v.last.tileDistance,v.last.angle,C,p.cameraDistance,h));for(let i=0;i<e.length;i+=5){const n=e[i],r=e[i+1],o=e[i+2],a=e[i+3];if(!v||a<-T||a>P){_0x137cdb(e,i,!1);continue}const s=this.projectPoint(l,n,r),u=o*w;if(f.length>0){const t=s.x-f[f.length-4],n=s.y-f[f.length-3];if(u*u*2>t*t+n*n){if(i+8<e.length){const t=e[i+8];if(t>-T&&t<P){_0x137cdb(e,i,!1);continue}}}}const h=i/5;f.push(s.x,s.y,u,h),_0x137cdb(e,i,!0);const p=s.x-u,_=s.y-u,m=s.x+u,$=s.y+u;if(S=S&&this.isOffscreen(p,_,m,$),b=b||this.isInsideGrid(p,_,m,$),!t&&this.grid.hitTestCircle(s.x,s.y,u,d)){if(!c)return{circles:[],offscreen:!1};x=!0}}return{circles:x||!b?[]:f,offscreen:S}}queryRenderedSymbols(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};const t=[];let i=1/0,n=1/0,r=-1/0,o=-1/0;for(const a of e){const e=new Point(a.x+_0x59faf2,a.y+_0x59faf2);i=Math.min(i,e.x),n=Math.min(n,e.y),r=Math.max(r,e.x),o=Math.max(o,e.y),t.push(e)}const a=this.grid.query(i,n,r,o).concat(this.ignoredGrid.query(i,n,r,o)),s={},l={};for(const e of a){const i=e.key;if(void 0===s[i.bucketInstanceId]&&(s[i.bucketInstanceId]={}),s[i.bucketInstanceId][i.featureIndex])continue;(void 0)(t,[new Point(e.x1,e.y1),new Point(e.x2,e.y1),new Point(e.x2,e.y2),new Point(e.x1,e.y2)])&&(s[i.bucketInstanceId][i.featureIndex]=!0,void 0===l[i.bucketInstanceId]&&(l[i.bucketInstanceId]=[]),l[i.bucketInstanceId].push(i.featureIndex))}return l}insertCollisionBox(e,t,i,n,r){const o={bucketInstanceId:i,featureIndex:n,collisionGroupID:r};(t?this.ignoredGrid:this.grid).insert(o,e[0],e[1],e[2],e[3])}insertCollisionCircles(e,t,i,n,r){const o=t?this.ignoredGrid:this.grid,a={bucketInstanceId:i,featureIndex:n,collisionGroupID:r};for(let t=0;t<e.length;t+=4)o.insertCircle(a,e[t],e[t+1],e[t+2])}projectAnchor(e,t,i){const n=[t,i,0,1];return projection.xyTransformMat4(n,n,e),{perspectiveRatio:.5+this.transform.cameraToCenterDistance/n[3]*.5,cameraDistance:n[3]}}projectPoint(e,t,i){const n=[t,i,0,1];return projection.xyTransformMat4(n,n,e),new Point((n[0]/n[3]+1)/2*this.transform.width+_0x59faf2,(-n[1]/n[3]+1)/2*this.transform.height+_0x59faf2)}projectAndGetPerspectiveRatio(e,t,i){const n=[t,i,0,1];projection.xyTransformMat4(n,n,e);return{point:new Point((n[0]/n[3]+1)/2*this.transform.width+_0x59faf2,(-n[1]/n[3]+1)/2*this.transform.height+_0x59faf2),perspectiveRatio:.5+this.transform.cameraToCenterDistance/n[3]*.5}}isOffscreen(e,t,i,n){return i<_0x59faf2||e>=this.screenRightBoundary||n<_0x59faf2||t>this.screenBottomBoundary}isInsideGrid(e,t,i,n){return i>=0&&e<this.gridRightBoundary&&n>=0&&t<this.gridBottomBoundary}}function _0x137cdb(e,t,i){e[t+4]=i?1:0}var _0x23ecf9=(_0x467f9c=!0,function(e,t){var i=_0x467f9c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x467f9c=!1,i}),_0x42f0c0=_0x23ecf9(void 0,(function(){return _0x42f0c0.toString().search("(((.+)+)+)+$").toString().constructor(_0x42f0c0).search("(((.+)+)+)+$")})),_0x467f9c;_0x42f0c0(),new e$1z;class _0x1508d1{constructor(e,t,i,n){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?t:-t))):n&&i?1:0,this.placed=i}isHidden(){return 0===this.opacity&&!this.placed}}class _0x3dcc3a{constructor(e,t,i,n,r){this.text=new _0x1508d1(e?e.text:null,t,i,r),this.icon=new _0x1508d1(e?e.icon:null,t,n,r)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class _0x3516f6{constructor(e,t,i){this.text=e,this.icon=t,this.skipFade=i}}class Placement{constructor(e,t,i,n){this.scene=e,this.transform=t.clone(),this.collisionIndex=new _0x59768a(e.drawingBufferWidth,e.drawingBufferHeight,this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=i,this.prevPlacement=n,n&&(n.prevPlacement=void 0),this.placedOrientations={}}placeLayerTile(e,t){var i=this,n=t._MVTLabel._billboardsByLayers[e.id],r=this.scene.frameState.frameNumber;for(var o in n){for(var a=n[o],s=void 0,l=0;l<a.length;l++){var u=a[l];if(u.collisionFrameNumber!==r){u.collisionFrameNumber=r;var c=u.computeScreenSpacePosition(i.scene);if(c)if(s){var h=s$1a.getScreenSpaceBoundingBox(u,c);n$13.union(s,h,s)}else s=new n$13,s$1a.getScreenSpaceBoundingBox(u,c,s)}}if(!s)continue;var d={x1:s.x,y1:s.y,x2:s.x+s.width,y2:s.y+s.height,anchorPointX:0,anchorPointY:0};const e=i.collisionIndex.placeCollisionBox(d,false);if(e.box&&e.box.length>0&&t._visible){i.collisionIndex.insertCollisionBox(e.box,!1,o),this.placements[o]=new _0x3516f6(!0,!1,e.offscreen)}}}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;const t=this.prevPlacement;let i=!1;this.prevZoomAdjustment=t?t.zoomAdjustment(this.transform.zoom):0;const n=t?t.symbolFadeChange(e):1,r=t?t.opacities:{};for(const e in this.placements){const t=this.placements[e],o=r[e];o?(this.opacities[e]=new _0x3dcc3a(o,n,t.text,t.icon),i=i||t.text!==o.text.placed||t.icon!==o.icon.placed):(this.opacities[e]=new _0x3dcc3a(null,n,t.text,t.icon,t.skipFade),i=i||t.text||t.icon)}for(const e in r){const t=r[e];if(!this.opacities[e]){const r=new _0x3dcc3a(t,n,!1,!1);!r.isHidden()&&(this.opacities[e]=r,i=i||t.text.placed||t.icon.placed)}}i?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)}updateLayerOpacities(e,t){const i=new _0x3dcc3a(null,0,!1,!1,!0);for(var n=0;n<t.length;n++){var r=t[n]._MVTLabel._billboardsByLayers[e.id];if(r)for(var o in r){var a=r[o];let e=this.opacities[o];!e&&(e=i,this.opacities[o]=e);for(var s=0;s<a.length;s++){a[s].opacityState=e.text}}}}symbolFadeChange(e){return 0===this.fadeDuration?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(e,t){let i;if(this.zoomAtLastRecencyCheck===t){i=1-this.zoomAdjustment(t)}else i=1;this.zoomAtLastRecencyCheck=t;return this.commitTime+this.fadeDuration*i>e}setStale(){this.stale=!0}}const _0x18a8dd=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x46570e=_0x18a8dd(void 0,(function(){return _0x46570e.toString().search("(((.+)+)+)+$").toString().constructor(_0x46570e).search("(((.+)+)+)+$")}));_0x46570e();class _0x2613a2{constructor(){this._currentTileIndex=0}continuePlacement(e,t,i,n){for(;this._currentTileIndex<e.length;){const r=e[this._currentTileIndex];if(t.placeLayerTile(i,r),this._currentTileIndex++,n())return!0}}}class _0x1bcae8{constructor(e,t,i,n,r,o){this.placement=new Placement(e,t,r,o),this._currentPlacementIndex=i.length-1,this._forceFullPlacement=n,this._done=!1}isDone(){return this._done}continuePlacement(e,t,i){const n=performance.now(),r=()=>{const e=performance.now()-n;return!this._forceFullPlacement&&e>2};for(;this._currentPlacementIndex>=0;){const n=t[e[this._currentPlacementIndex]];if(n){if(this.placement.collisionIndex.transform.zoom,"symbol"===n.type){if("point"!==n.layout.get("symbol-placement")){this._currentPlacementIndex--;continue}!this._inProgressLayer&&(this._inProgressLayer=new _0x2613a2);if(this._inProgressLayer.continuePlacement(i,this.placement,n,r))return;delete this._inProgressLayer}this._currentPlacementIndex--}else this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}var _0x3e2ec5=(_0x93b60c=!0,function(e,t){var i=_0x93b60c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x93b60c=!1,i}),_0x5468ef=_0x3e2ec5(void 0,(function(){return _0x5468ef.toString().search("(((.+)+)+)+$").toString().constructor(_0x5468ef).search("(((.+)+)+)+$")})),_0x93b60c;function _0x389cea(e){this.dispatcher=new _0x4c5cfc(_0x2c2737(),this),this._layers={},this._order=[],this.sourceCaches={},this._loaded=!1,this.highLighting=!1,this.imageManager=new _0x5451d5,this.glyphManager=new _0x4aa7e0(e._requestManager),this.lineAtlas=new _0x18b995(256,512),this.map=e,this._resetUpdates()}_0x5468ef(),_0x389cea.prototype._load=function(e){for(var t in this._loaded=!0,this.stylesheet=e,e.sources);e.sprite?this._spriteRequest=_0x3b666a(e.sprite,this.map._requestManager,((e,t)=>{if(this._spriteRequest=null,e);else if(t)for(const e in t)this.imageManager.addImage(e,t[e]);this.imageManager.setLoaded(!0),this.dispatcher.broadcast("setImages",this.imageManager.listImages()),this.map._resourceReady=!0})):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var i=this.stylesheet.layers;this._order=i.map((function(e){return e.id})),this._layers={};for(var n=0,r=i;n<r.length;n+=1){var o=d=r[n];if(null!=(d=_0x118401(d))){d.config=o,d.config.originalFilter=clone(d.filter);var a=new _0x460d5e(0);d.recalculate(a),this._layers[d.id]=d}}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order));var s=this._layers,l=new _0x6a5d7e(i);for(var u in l.familiesBySource){var c=l.familiesBySource[u];for(var h in c)for(n=0,r=c[h];n<r.length;n+=1){var d,f=r[n],p=(d=f[0]).id;f.map((function(e){s[e.id].bucketName=p}))}}},_0x389cea.prototype.update=function(e){if(this._loaded){var t=new _0x460d5e(0);if(this._changed,this._changed){var i=Object.keys(this._updatedLayers),n=Object.keys(this._removedLayers);for(var r in(i.length||n.length)&&this._updateWorkerLayers(e,i,n),this._updatedPaintProps)this._layers[r].updateTransitions(t);this._resetUpdates()}for(var o in this.sourceCaches)this.sourceCaches[o].used=!1;for(var a=0,s=this._order;a<s.length;a+=1){var l=s[a],u=this._layers[l];null!=u&&null!=u&&u.recalculate(t,this.imageManager.listImages())}}},_0x389cea.prototype._updateWorkerLayers=function(e,t,i){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(t),removedIds:i});for(var n=[],r=0;r<t.length;r++){var o=t[r],a=this._layers[o];t$$(a)&&n.push(a.config)}for(var s in e){e[s].addRepaintTask(n,i,this.highLighting)}this.highLighting=!1},_0x389cea.prototype.addLayer=function(e,t,i){var n=e.id;if(this.getLayer(n))console.log('Layer with id "'+n+'" already exists on this map');else{var r=_0x118401(e);r.config=e;var o=t?this._order.indexOf(t):this._order.length;t&&-1===o?console.log('Layer with id "'+t+'" does not exist on this map.'):(this._order.splice(o,0,n),this._layerOrderChanged=!0,this._layers[n]=r,this._updateLayer(r))}},_0x389cea.prototype.moveLayer=function(e,t){if(this._changed=!0,this._layers[e]){if(e!==t){var i=this._order.indexOf(e);this._order.splice(i,1);var n=t?this._order.indexOf(t):this._order.length;t&&-1===n?console.log('Layer with id "'+t+'" does not exist on this map.'):(this._order.splice(n,0,e),this._layerOrderChanged=!0)}}else console.log("The layer '"+e+"' does not exist in the map's style and cannot be moved.")},_0x389cea.prototype.loaded=function(){if(!this._loaded)return!1;if(id!==before){var e=this._order.indexOf(id);this._order.splice(e,1);var t=before?this._order.indexOf(before):this._order.length;before&&-1===t||(this._order.splice(t,0,id),this._layerOrderChanged=!0)}},_0x389cea.prototype.removeLayer=function(e){var t=this._layers[e];if(t){var i=this._order.indexOf(e);this._order.splice(i,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=t,delete this._layers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],t.onRemove&&t.onRemove(this.map)}else console.log("The layer '"+e+"' does not exist in the map's style and cannot be removed.")},_0x389cea.prototype.getLayer=function(e){return this._layers[e]},_0x389cea.prototype.setFilter=function(e,t,i){var n=this.getLayer(e);if(n){if(!_0x52c6d3(n.filter,t)){if(null==t)t$$(n.config.originalFilter)?(n.filter=n.config.originalFilter,n.config.filter=n.config.originalFilter):(n.filter=void 0,n.config.filter=null);else if(t$$(n.filter)&&Array.isArray(n.filter)&&"all"===n.filter[0]){var r=!1;if("in"===t[0])for(var o=0;o<n.filter.length;o++)"in"===n.filter[o][0]&&(n.filter[o]=t,r=!0);!r&&(n.filter.push(t),n.config.filter=n.filter)}else n.filter=clone(t),n.config.filter=n.filter;this._updateLayer(n)}}else console.log("The layer '"+e+"' does not exist in the map's style and cannot be filtered.")},_0x389cea.prototype.getFilter=function(e){return clone(this.getLayer(e).filter)},_0x389cea.prototype.setLayoutProperty=function(e,t,i,n){void 0===n&&(n={});var r=this.getLayer(e);r?_0x52c6d3(r.getLayoutProperty(t),i)||(r.setLayoutProperty(t,i,n),this._updateLayer(r)):console.log("The layer '"+e+"' does not exist in the map's style and cannot be styled.")},_0x389cea.prototype.getLayoutProperty=function(e,t){var i=this.getLayer(e);if(i)return i.getLayoutProperty(t);console.log("The layer '"+e+"' does not exist in the map's style.")},_0x389cea.prototype.setPaintProperty=function(e,t,i,n){void 0===n&&(n={});var r=this.getLayer(e);r?_0x52c6d3(r.getPaintProperty(t),i)||(r.setPaintProperty(t,i,n),this._updateLayer(r),this._changed=!0,this._updatedPaintProps[e]=!0):console.log("The layer '"+e+"' does not exist in the map's style and cannot be styled.")},_0x389cea.prototype.getPaintProperty=function(e,t){return this.getLayer(e).getPaintProperty(t)},_0x389cea.prototype._serializeLayers=function(e){for(var t=[],i=0,n=e;i<n.length;i+=1){var r=n[i],o=this._layers[r];t$$(o)&&("custom"!==o.type&&t.push(o.serialize()))}return t},_0x389cea.prototype.serialize=function(){return filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:mapObject(this.sourceCaches,(function(e){return e.serialize()})),layers:this._serializeLayers(this._order)},(function(e){return void 0!==e}))},_0x389cea.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={}},_0x389cea.prototype._updateLayer=function(e){this._updatedLayers[e.id]=!0,this._changed=!0},_0x389cea.prototype.setHighLight=function(e,t){var i=this._findHighLightFeature(e);if(!t$$(i))return t$$(this.lastHighLightLayerID)&&(this.removeLayer(this.lastHighLightLayerID),this.lastHighLightLayerID=null,this.highLighting=!0),void(t._currentPickID=void 0);e.featureID=i.id,e.layerID=i.layer.id;var n=i.layer,r=n["source-layer"]+"_"+n.type+"_highlight",o=this._layers[r];if(t._currentPickID=r+e.featureID,!t$$(o)){var a={};a["source-layer"]=n["source-layer"],a.source=n.source,a.id=r;var s=n.paint["fill-color"]&&0===e$1z.fromCssColorString(n.paint["fill-color"]).alpha||0===n.paint["fill-opacity"],l={};"circle"==n.type?(a.type="circle",l["circle-color"]=t._selectedColor.toCssColorString(),l["circle-radius"]=n.paint["circle-radius"]||5):"fill"!=n.type||s?(a.type="line",l["line-color"]=t._selectedColor.toCssColorString(),l["line-width"]=2):(a.type="fill",l["fill-color"]=t._selectedColor.toCssColorString()),a.paint=l,this.addLayer(a)}var u=["in","$id",i.id];this.setFilter(r,u),t$$(this.lastHighLightLayerID)&&this.lastHighLightLayerID!==r&&this.removeLayer(this.lastHighLightLayerID),this.lastHighLightLayerID=r,this.highLighting=!0},_0x389cea.prototype.cancelHighLight=function(e){t$$(this.lastHighLightLayerID)&&(this.removeLayer(this.lastHighLightLayerID),this.lastHighLightLayerID=null,this.highLighting=!0),e._currentPickID=void 0},_0x389cea.prototype._findHighLightFeature=function(e){for(var t={},i=0;i<this._order.length;i++){t[this._order[i]]=i}var n=null,r=0;for(var o in e)for(var a=e[o],s=0;s<a.length;s++){var l=a[s].feature;if(1==l.type||2==l.type||3==l.type){var u=t[l.layer.id];u>=r&&(n=l,r=u)}}return n},_0x389cea.prototype._updatePlacement=function(e,t,i){let n=!1;var r=this.map.innerLayer._imageryCache,o=[];for(var a in r)o.push(r[a]);o.sort((function(e,t){return t.level-e.level||(e.isTileIDLessThan(t)?-1:1)}));const s=this._layerOrderChanged||0===i;if((s||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(window.performance.now(),t.zoom))&&(this.pauseablePlacement=new _0x1bcae8(e,t,this._order,s,i,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,o),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(window.performance.now()),n=!0)),n)for(const e of this._order){const t=this._layers[e];t&&"symbol"===t.type&&this.placement.updateLayerOpacities(t,o)}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(performance.now())},_0x389cea.prototype.getImages=function(e,t,i){this.imageManager.getImages(t.icons,i)},_0x389cea.prototype.getGlyphs=function(e,t,i){this.glyphManager.getGlyphs(t.stacks,i)},_0x389cea.prototype.getResource=function(e,t,i){return makeRequest(t,i)};const _0x3517f6=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4ffc19=_0x3517f6(void 0,(function(){return _0x4ffc19.toString().search("(((.+)+)+)+$").toString().constructor(_0x4ffc19).search("(((.+)+)+)+$")}));_0x4ffc19();class _0xeba94c{constructor(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1]))}setNorthEast(e){return this._ne=e instanceof _0x551092?new _0x551092(e.lng,e.lat):_0x551092.convert(e),this}setSouthWest(e){return this._sw=e instanceof _0x551092?new _0x551092(e.lng,e.lat):_0x551092.convert(e),this}extend(e){const t=this._sw,i=this._ne;let n,r;if(e instanceof _0x551092)n=e,r=e;else{if(!(e instanceof _0xeba94c))return Array.isArray(e)?e.every(Array.isArray)?this.extend(_0xeba94c.convert(e)):this.extend(_0x551092.convert(e)):this;if(n=e._sw,r=e._ne,!n||!r)return this}return t||i?(t.lng=Math.min(n.lng,t.lng),t.lat=Math.min(n.lat,t.lat),i.lng=Math.max(r.lng,i.lng),i.lat=Math.max(r.lat,i.lat)):(this._sw=new _0x551092(n.lng,n.lat),this._ne=new _0x551092(r.lng,r.lat)),this}getCenter(){return new _0x551092((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new _0x551092(this.getWest(),this.getNorth())}getSouthEast(){return new _0x551092(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"}isEmpty(){return!(this._sw&&this._ne)}contains(e){const{lng:t,lat:i}=_0x551092.convert(e),n=this._sw.lat<=i&&i<=this._ne.lat;let r=this._sw.lng<=t&&t<=this._ne.lng;return this._sw.lng>this._ne.lng&&(r=this._sw.lng>=t&&t>=this._ne.lng),n&&r}static convert(e){return!e||e instanceof _0xeba94c?e:new _0xeba94c(e)}}const _0x33a46b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5810b7=_0x33a46b(void 0,(function(){return _0x5810b7.toString().search("(((.+)+)+)+$").toString().constructor(_0x5810b7).search("(((.+)+)+)+$")}));_0x5810b7();class _0x551092{constructor(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid LngLat object: ("+e+", "+t+")");if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new _0x551092(wrap(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return"LngLat("+this.lng+", "+this.lat+")"}toBounds(e){const t=360*e/40075017,i=t/Math.cos(Math.PI/180*this.lat);return new _0xeba94c(new _0x551092(this.lng-i,this.lat-t),new _0x551092(this.lng+i,this.lat+t))}static convert(e){if(e instanceof _0x551092)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new _0x551092(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return new _0x551092(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}const _0x1438e4=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x579546=_0x1438e4(void 0,(function(){return _0x579546.toString().search("(((.+)+)+)+$").toString().constructor(_0x579546).search("(((.+)+)+)+$")}));_0x579546();const _0x1f00f6=2*Math.PI*6378137;function _0x25d4e9(e){return _0x1f00f6*Math.cos(e*Math.PI/180)}function mercatorXfromLng(e){return(180+e)/360}function mercatorYfromLat(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function mercatorZfromAltitude(e,t){return e/_0x25d4e9(t)}function lngFromMercatorX(e){return 360*e-180}function latFromMercatorY(e){const t=180-360*e;return 360/Math.PI*Math.atan(Math.exp(t*Math.PI/180))-90}function altitudeFromMercatorZ(e,t){return e*_0x25d4e9(latFromMercatorY(t))}function mercatorScale(e){return 1/Math.cos(e*Math.PI/180)}class _0x28486e{constructor(e,t,i=0){this.x=+e,this.y=+t,this.z=+i}static fromLngLat(e,t=0){const i=_0x551092.convert(e);return new _0x28486e(mercatorXfromLng(i.lng),mercatorYfromLat(i.lat),mercatorZfromAltitude(t,i.lat))}toLngLat(){return new _0x551092(lngFromMercatorX(this.x),latFromMercatorY(this.y))}toAltitude(){return altitudeFromMercatorZ(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/_0x1f00f6*mercatorScale(latFromMercatorY(this.y))}}const _0x5a35eb=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x246fbf=_0x5a35eb(void 0,(function(){return _0x246fbf.toString().search("(((.+)+)+)+$").toString().constructor(_0x246fbf).search("(((.+)+)+)+$")}));_0x246fbf();class _0x579531{constructor(e,t,i,n,r){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===r||r,this._minZoom=e||0,this._maxZoom=t||26,this._minPitch=null==i?0:i,this._maxPitch=null==n?60:n,this.setMaxBounds(),this.width=0,this.height=0,this._center=new _0x551092(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._posMatrixCache={},this._alignedPosMatrixCache={}}clone(){const e=new _0x579531(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return e.tileSize=this.tileSize,e.latRange=this.latRange,e.width=this.width,e.height=this.height,e._center=this._center,e.zoom=this.zoom,e.angle=this.angle,e._fov=this._fov,e._pitch=this._pitch,e._unmodified=this._unmodified,e._calcMatrices(),e}get minZoom(){return this._minZoom}set minZoom(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))}get maxZoom(){return this._maxZoom}set maxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))}get minPitch(){return this._minPitch}set minPitch(e){this._minPitch!==e&&(this._minPitch=e,this.pitch=Math.max(this.pitch,e))}get maxPitch(){return this._maxPitch}set maxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.pitch=Math.min(this.pitch,e))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e}get worldSize(){return this.tileSize*this.scale}get centerPoint(){return this.size._div(2)}get size(){return new _0x279c0d(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(e){const t=-wrap(e,-180,180)*Math.PI/180;this.angle!==t&&(this._unmodified=!1,this.angle=t,this._calcMatrices(),this.rotationMatrix=mat2.create(),mat2.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(e){const t=clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==t&&(this._unmodified=!1,this._pitch=t,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(e){e=Math.max(.01,Math.min(60,e)),this._fov!==e&&(this._unmodified=!1,this._fov=e/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(e){const t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this.scale=this.zoomScale(t),this.tileZoom=Math.floor(t),this.zoomFraction=t-this.tileZoom,this._constrain(),this._calcMatrices())}get center(){return this._center}set center(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())}coveringZoomLevel(e){const t=(e.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/e.tileSize));return Math.max(0,t)}getVisibleUnwrappedCoordinates(e){const t=[new UnwrappedTileID(0,e)];if(this._renderWorldCopies){const i=this.pointCoordinate(new _0x279c0d(0,0)),n=this.pointCoordinate(new _0x279c0d(this.width,0)),r=this.pointCoordinate(new _0x279c0d(this.width,this.height)),o=this.pointCoordinate(new _0x279c0d(0,this.height)),a=Math.floor(Math.min(i.x,n.x,r.x,o.x)),s=Math.floor(Math.max(i.x,n.x,r.x,o.x)),l=1;for(let i=a-l;i<=s+l;i++)0!==i&&t.push(new UnwrappedTileID(i,e))}return t}coveringTiles(e){let t=this.coveringZoomLevel(e);const i=t;if(void 0!==e.minzoom&&t<e.minzoom)return[];void 0!==e.maxzoom&&t>e.maxzoom&&(t=e.maxzoom);const n=_0x28486e.fromLngLat(this.center),r=Math.pow(2,t),o=new _0x279c0d(r*n.x-.5,r*n.y-.5),a=[this.pointCoordinate(new _0x279c0d(0,0)),this.pointCoordinate(new _0x279c0d(this.width,0)),this.pointCoordinate(new _0x279c0d(this.width,this.height)),this.pointCoordinate(new _0x279c0d(0,this.height))];return tileCover(t,a,e.reparseOverscaled?i:t,this._renderWorldCopies).sort(((e,t)=>o.dist(e.canonical)-o.dist(t.canonical)))}resize(e,t){this.width=e,this.height=t,this.pixelsToGLUnits=[2/e,-2/t],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(e){return Math.pow(2,e)}scaleZoom(e){return Math.log(e)/Math.LN2}project(e){const t=clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new _0x279c0d(mercatorXfromLng(e.lng)*this.worldSize,mercatorYfromLat(t)*this.worldSize)}unproject(e){return new _0x28486e(e.x/this.worldSize,e.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}setLocationAtPoint(e,t){const i=this.pointCoordinate(t),n=this.pointCoordinate(this.centerPoint),r=this.locationCoordinate(e),o=new _0x28486e(r.x-(i.x-n.x),r.y-(i.y-n.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(e){return this.coordinatePoint(this.locationCoordinate(e))}pointLocation(e){return this.coordinateLocation(this.pointCoordinate(e))}locationCoordinate(e){return _0x28486e.fromLngLat(e)}coordinateLocation(e){return e.toLngLat()}pointCoordinate(e){const t=[e.x,e.y,0,1],i=[e.x,e.y,1,1];vec4.transformMat4(t,t,this.pixelMatrixInverse),vec4.transformMat4(i,i,this.pixelMatrixInverse);const n=t[3],r=i[3],o=t[1]/n,a=i[1]/r,s=t[2]/n,l=i[2]/r,u=s===l?0:(0-s)/(l-s);return new _0x28486e(interpolate(t[0]/n,i[0]/r,u)/this.worldSize,interpolate(o,a,u)/this.worldSize)}coordinatePoint(e){const t=[e.x*this.worldSize,e.y*this.worldSize,0,1];return vec4.transformMat4(t,t,this.pixelMatrix),new _0x279c0d(t[0]/t[3],t[1]/t[3])}getBounds(){return(new _0xeba94c).extend(this.pointLocation(new _0x279c0d(0,0))).extend(this.pointLocation(new _0x279c0d(this.width,0))).extend(this.pointLocation(new _0x279c0d(this.width,this.height))).extend(this.pointLocation(new _0x279c0d(0,this.height)))}getMaxBounds(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new _0xeba94c([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}setMaxBounds(e){e?(this.lngRange=[e.getWest(),e.getEast()],this.latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])}calculatePosMatrix(e,t=!1){const i=e.key,n=t?this._alignedPosMatrixCache:this._posMatrixCache;if(n[i])return n[i];const r=e.canonical,o=this.worldSize/this.zoomScale(r.z),a=r.x+Math.pow(2,r.z)*e.wrap,s=_0x4d2af4.mat4.identity(new Float64Array(16));return _0x4d2af4.mat4.translate(s,s,[a*o,r.y*o,0]),_0x4d2af4.mat4.scale(s,s,[o/_0x10e17e,o/_0x10e17e,1]),_0x4d2af4.mat4.multiply(s,t?this.alignedProjMatrix:this.projMatrix,s),n[i]=new Float32Array(s),n[i]}customLayerMatrix(){return this.mercatorMatrix.slice()}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let e,t,i,n,r=-90,o=90,a=-180,s=180;const l=this.size,u=this._unmodified;if(this.latRange){const t=this.latRange;r=mercatorYfromLat(t[1])*this.worldSize,o=mercatorYfromLat(t[0])*this.worldSize,e=o-r<l.y?l.y/(o-r):0}if(this.lngRange){const e=this.lngRange;a=mercatorXfromLng(e[0])*this.worldSize,s=mercatorXfromLng(e[1])*this.worldSize,t=s-a<l.x?l.x/(s-a):0}const c=this.point,h=Math.max(t||0,e||0);if(h)return this.center=this.unproject(new _0x279c0d(t?(s+a)/2:c.x,e?(o+r)/2:c.y)),this.zoom+=this.scaleZoom(h),this._unmodified=u,void(this._constraining=!1);if(this.latRange){const e=c.y,t=l.y/2;e-t<r&&(n=r+t),e+t>o&&(n=o-t)}if(this.lngRange){const e=c.x,t=l.x/2;e-t<a&&(i=a+t),e+t>s&&(i=s-t)}(void 0!==i||void 0!==n)&&(this.center=this.unproject(new _0x279c0d(void 0!==i?i:c.x,void 0!==n?n:c.y))),this._unmodified=u,this._constraining=!1}_calcMatrices(){if(!this.height)return;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;const e=this._fov/2,t=Math.PI/2+this._pitch,i=Math.sin(e)*this.cameraToCenterDistance/Math.sin(Math.PI-t-e),n=this.point,r=n.x,o=n.y,a=1.01*(Math.cos(Math.PI/2-this._pitch)*i+this.cameraToCenterDistance),s=this.height/50;let l=new Float64Array(16);_0x4d2af4.mat4.perspective(l,this._fov,this.width/this.height,s,a),_0x4d2af4.mat4.scale(l,l,[1,-1,1]),_0x4d2af4.mat4.translate(l,l,[0,0,-this.cameraToCenterDistance]),_0x4d2af4.mat4.rotateX(l,l,this._pitch),_0x4d2af4.mat4.rotateZ(l,l,this.angle),_0x4d2af4.mat4.translate(l,l,[-r,-o,0]),this.mercatorMatrix=_0x4d2af4.mat4.scale([],l,[this.worldSize,this.worldSize,this.worldSize]),_0x4d2af4.mat4.scale(l,l,[1,1,mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=l;const u=this.width%2/2,c=this.height%2/2,h=Math.cos(this.angle),d=Math.sin(this.angle),f=r-Math.round(r)+h*u+d*c,p=o-Math.round(o)+h*c+d*u,_=new Float64Array(l);if(_0x4d2af4.mat4.translate(_,_,[f>.5?f-1:f,p>.5?p-1:p,0]),this.alignedProjMatrix=_,l=_0x4d2af4.mat4.create(),_0x4d2af4.mat4.scale(l,l,[this.width/2,-this.height/2,1]),_0x4d2af4.mat4.translate(l,l,[1,-1,0]),this.labelPlaneMatrix=l,l=_0x4d2af4.mat4.create(),_0x4d2af4.mat4.scale(l,l,[1,-1,1]),_0x4d2af4.mat4.translate(l,l,[-1,-1,0]),_0x4d2af4.mat4.scale(l,l,[2/this.width,2/this.height,1]),this.glCoordMatrix=l,this.pixelMatrix=_0x4d2af4.mat4.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),l=_0x4d2af4.mat4.invert(new Float64Array(16),this.pixelMatrix),!l)throw new Error("failed to invert matrix");this.pixelMatrixInverse=l,this._posMatrixCache={},this._alignedPosMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const e=this.pointCoordinate(new _0x279c0d(0,0)),t=[e.x*this.worldSize,e.y*this.worldSize,0,1];return vec4.transformMat4(t,t,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const e=this._pitch,t=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new _0x279c0d(0,t))}getCameraQueryGeometry(e){const t=this.getCameraPoint();if(1===e.length)return[e[0],t];{let i=t.x,n=t.y,r=t.x,o=t.y;for(const t of e)i=Math.min(i,t.x),n=Math.min(n,t.y),r=Math.max(r,t.x),o=Math.max(o,t.y);return[new _0x279c0d(i,n),new _0x279c0d(r,n),new _0x279c0d(r,o),new _0x279c0d(i,o),new _0x279c0d(i,n)]}}}var e$1r={None:0,FixedZ:1,FixedXYZ:2},Cr$2=Object.freeze(e$1r),We$m=[1.690163571602655e-9,3.3803271432053056e-9,6.760654286410611e-9,1.3521308572821242e-8,2.7042617145642478e-8,5.408523429128511e-8,1.0817046858256998e-7,2.1634093716513974e-7,4.3268187433028044e-7,8.653637486605571e-7,17307274973211203e-22,34614549946422405e-22,69229099892844565e-22,13845819978568952e-21,27691639957137904e-21,553832799142758e-19,.0001107665598285516,.0002215331196571032,.0004430662393142064,.0008861324786284128,.001772264957256826,.003544529914513652],U$W=0;function M$10(e,t){t=e$1Y(t,{}),this._name=t.name,this._tilingScheme=t.tilingScheme,this._owner=void 0,this._hasTileWith=!1,t$$(t.tileWidth)&&t$$(t.tileHeight)&&(this._hasTileWith=!0),this._tileWidth=e$1Y(parseInt(t.tileWidth)||void 0,512),this._tileHeight=e$1Y(parseInt(t.tileHeight)||void 0,512),this._canvasWidth=e$1Y(parseInt(t.canvasWidth)||void 0,512),this._canvasWidth=n$1d.clamp(this._canvasWidth,128,1024),t$$(t.minimumLevel)&&t$$(t.maximumLevel)&&(this._hasLevel=!0),this._minimumLevel=e$1Y(parseInt(t.minimumLevel)||void 0,0),this._maximumLevel=parseInt(t.maximumLevel)||void 0,this.minimumTerrainLevel=parseInt(t.minimumTerrainLevel)||void 0,this.maximumTerrainLevel=parseInt(t.maximumTerrainLevel)||void 0,this._styleName=e$1Y(t.styleName,""),this._mapboxStyle=t.mapboxStyle,this._colDiff=0,this._rowDiff=0,this._ready=!1,this._resourceReady=!1,this._requestMetadataSuccess=!1,this._requestStyleSuccess=!1,this._readyPromise=c$18.defer(),this._layers={},this._selectEnabled=e$1Y(t.selectEnabled,!0),this._selectedColor=e$1Y(t.selectedColor,e$1z.fromCssColorString("#00FFFF")),this._overlapDisplayedThreshold=0,this._key=e$1Y(t.key,""),this._url=e$1Y(t.url,""),this._labelScaleByDistance=t.labelScaleByDistance,this._resource=t$X.createIfNeeded(this._url),this._context=e,this._transform=new _0x579531(0,22,0,60),this._painter=new _0x129b65(e,this._transform,this._canvasWidth),this._requestManager=new _0x3c10d8((e=>({url:e,headers:t.customRequestHeaders}))),this._MVTStyle=new _0x389cea(this),this._viewer=t.viewer,this._iswmts=-1!==this._url.indexOf("wmts"),this._isgeoserver=-1!==this._url.indexOf("/geoserver/"),this._isRealspace=-1!==this._url.indexOf("rest/realspace"),this._isTdt=e$1Y(t.isTdt,!1),this._packingRequest=this._isRealspace?t.packingRequest:void 0,this._hasIndex=t.hasIndex||!1,this._isTdt?(this._urlTiles=this._url+"?t=vt&z={z}&x={x}&y={y}",this.tablename=this._url):this._iswmts?(this._layer=e$1Y(t.layer,""),this._format=e$1Y(t.format,"mvt"),this._tilematrixset=e$1Y(t.tilematrixset,""),this._minimumLevel=e$1Y(parseInt(t.minimumLevel)||void 0,0),this._maximumLevel=e$1Y(parseInt(t.maximumLevel)||void 0,0),this.tablename=this._layer+this._tilematrixset):this._isRealspace?(this._urlTiles=this._url+"/data/index/{y}/{x}.mvt?level={z}",this.tablename=this._url):(this._urlTiles=this._url+"/tiles/{z}/{x}/{y}.mvt",this.tablename=this._url),this._tileCache={},this._scales=e$1Y(t.scales,We$m),this._id=-1,this._errorEvent=new o$15,this._pausing=!1,this._selectEnabled=!0,this._maxImageCacheLevel=0,this.minificationFilter=t.minificationFilter,this.magnificationFilter=t.magnificationFilter,this._renderTextureList={"512_512":new P$S({context:e,width:512,height:512,pixelFormat:Z$_.DEPTH_STENCIL,pixelDatatype:v$Z.UNSIGNED_INT_24_8})},this._isOverlapDisplayed=!1,this._enableMorphing=!1,this.realtime=e$1Y(t.realtime,!1),this._billboardMode=e$1Y(t.billboardMode,Cr$2.None),this.selectTolerance=.2,this._customRequestHeaders=t.customRequestHeaders;var i=this;function n(){if(i._iswmts){var e=t.url+"?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetCapabilities";t$$(a$R.CREDENTIAL)&&(e=t$$(a$R.CREDENTIAL._keymap[i._url])?a$R.addTokenWithKey(i._url,e):a$R.addToken(e)),c$18(u$_(e,i._customRequestHeaders),a,u)}else if(i._isRealspace){e=t.url+"/config";t$$(a$R.CREDENTIAL)&&(e=t$$(a$R.CREDENTIAL._keymap[i._url])?a$R.addTokenWithKey(i._url,e):a$R.addToken(e)),c$18(o$W(e,i._customRequestHeaders),r,u)}else{var n=t.url+".json";t$$(a$R.CREDENTIAL)&&(n=t$$(a$R.CREDENTIAL._keymap[i._url])?a$R.addTokenWithKey(i._url,n):a$R.addToken(n)),c$18(u$$(n,i._customRequestHeaders),l,u)}}function r(e){var t=function(e){e=o.parseFromString(e,"application/xml");for(var t="http://www.supermap.com/SuperMapCache/sci3d",n=e.childNodes[0],r=ze$h(P$M(n,"Levels",t),"Level",t),a=[],s=0,l=r.length;s<l;s++)a.push(parseInt(r[s].textContent,10));var u=P$M(n,"Bounds",t),c=A$Y(u,"Left",t),h=A$Y(u,"Right",t),d=A$Y(u,"Top",t),f=A$Y(u,"Bottom",t),p=ce$s(n,"FileExtentName",t),_=A$Y(n,"CellWidth",t),m=A$Y(n,"CellHeight",t),$=ce$s(n,"CacheName",t);return i._name||(i._name=$||""),{left:c,right:h,top:d,bottom:f,fileExtentName:p,levels:a,imageSizeWidth:_,imageSizeHeight:m}}(e);i._fileExtension=e$1Y(t.fileExtentName,"mvt"),i._tileWidth=e$1Y(t.imageSizeWidth,256),i._tileHeight=e$1Y(t.imageSizeHeight,256),i._coordUnit="DEGREE";var n=t.levels,r=n.length;i._minimumLevel=e$1Y(n[0],0),i._maximumLevel=e$1Y(n[r-1],r-1),t$$(i._tilingScheme)||(i._tilingScheme=new a$W);var a,s,l,u,c=i._tilingScheme;t$$(i._rectangle)||t.left&&t.right&&t.top&&t.bottom&&(a=n$1d.toRadians(t.left),l=n$1d.toRadians(t.right),s=n$1d.toRadians(t.bottom),u=n$1d.toRadians(t.top),i._rectangle=new s$1p(a,s,l,u));i._rectangle.west<c.rectangle.west&&(i._rectangle.west=c.rectangle.west),i._rectangle.east>c.rectangle.east&&(i._rectangle.east=c.rectangle.east),i._rectangle.south<c.rectangle.south&&(i._rectangle.south=c.rectangle.south),i._rectangle.north>c.rectangle.north&&(i._rectangle.north=c.rectangle.north),i._tilingScheme=c,i._urlTemplate=i._url+"data/index/{y}/{x}.{fileExtension}?level={level}",i._ready=!0,i._requestMetadataSuccess=!0,i._requestMetadataSuccess&&i._requestStyleSuccess&&i._readyPromise.resolve(!0)}this._subdomains=t.subdomains,t$$(this._subdomains)&&(t.url=t.url.replace(/({.*?})/g,(function(e,t){if(!t$$(i._subdomains.length))throw new t$_("detected subdomain url scheme, but no subdomain provided.");return"{s}"===t?i._subdomains[0]:e}))),this._isTdt?function(e){if(!e._hasLevel){var t=30,i=-1;if(!t$$(e._mapboxStyle))throw new t$_("tdt mapbox style should be passed.");for(var n in e._mapboxStyle.sources){var r=e._mapboxStyle.sources[n];t=Math.min(r.minZoom,t),i=Math.max(r.maxZoom,i)}e._minimumLevel=t,e._maximumLevel=i}t$$(e._tilingScheme)||(e._tilingScheme=new a$W),e._coordUnit=e._tilingScheme instanceof a$W?"DEGREE":"METER",e._rectangle=s$1p.clone(e._tilingScheme._rectangle),e._urlTemplate=e._url+"?t=vt&z={z}&x={x}&y={y}",e._requestMetadataSuccess=!0,D$$(e,e._mapboxStyle),e._requestStyleSuccess=!0,e._readyPromise.resolve(!0)}(this):(n(),this._isgeoserver||function(){var e;if(t$$(i._mapboxStyle))D$$(i,i._mapboxStyle);else if(i._isRealspace)e=t.url+"/data/path/style.json",t$$(a$R.CREDENTIAL)&&(e=t$$(a$R.CREDENTIAL._keymap[i._url])?a$R.addTokenWithKey(i._url,e):a$R.addToken(e)),n=u$$(e,i._customRequestHeaders);else{var n;e=i._iswmts?t.url+"?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetStyle&STYLENAME="+i._styleName:t.url+"/style.json",t$$(a$R.CREDENTIAL)&&(e=t$$(a$R.CREDENTIAL._keymap[i._url])?a$R.addTokenWithKey(i._url,e):a$R.addToken(e)),n=u$$(e,i._customRequestHeaders)}c$18(n,(function(e){t$$(e)?(i._mapboxStyle=e,D$$(i,e),i._requestStyleSuccess=!0,i._requestMetadataSuccess&&i._requestStyleSuccess&&i._readyPromise.resolve(!0)):console.log("style request failed")}),(function(n){e=t.url+"/tileFeature/vectorstyles.json?type=MapBox_GL&styleonly=true",t$$(a$R.CREDENTIAL)&&(e=t$$(a$R.CREDENTIAL._keymap[i._url])?a$R.addTokenWithKey(i._url,e):a$R.addToken(e)),u$$(e,i._customRequestHeaders).then((function(e){i._mapboxStyle=e,D$$(i,e),i._tileFeature=!0,i._urlTiles=i._url+"/tileFeature.mvt?returnAttributes=true&x={x}&y={y}&width=512&height=512&scale={scale}&origin={'x':-180,'y':90}"})),u()}))}());var o=new DOMParser;function a(e){var n=function(e){var t,n,r=e.firstChild,o=r.namespace,a=f$10.queryFirstNode(r,"Contents",o),s=f$10.queryNodes(a,"Layer",o);if(s.length>1)for(var l=0,u=s.length;l<u;l++){var c=f$10.queryFirstNode(s[l],"Title",o),h=f$10.queryStringValue(c),d=f$10.queryFirstNode(s[l],"Identifier",o),f=f$10.queryStringValue(d);if(h===i._layer||f===i._layer){t=s[l],n=h;break}}else t=f$10.queryFirstNode(a,"Layer",o);var p,_,m,$,g=f$10.queryFirstNode(t,"WGS84BoundingBox",o),y=f$10.queryStringValue(g,"LowerCorner",o),v=f$10.queryStringValue(g,"UpperCorner",o),x=y.split(" "),b=v.split(" ");m=parseFloat(b[0]),$=parseFloat(b[1]),p=parseFloat(x[0]),_=parseFloat(x[1]);var S=f$10.queryFirstNode(a,"TileMatrixSet",o),w=f$10.queryFirstNode(S,"TileMatrix",o),C=f$10.queryNumericValue(w,"TileWidth",o),T=f$10.queryNumericValue(w,"TileHeight",o);return{left:p,right:m,top:$,bottom:_,width:C,height:T,styleName:n}}(e);t$$(i._tilingScheme)||(i._tilingScheme=new a$W);var r={};r.left=n$1d.clamp(n.left,-180,180),r.bottom=n$1d.clamp(n.bottom,-90,90),r.right=n$1d.clamp(n.right,-180,180),r.top=n$1d.clamp(n.top,-90,90),i._rectangle=s$1p.fromDegrees(r.left,r.bottom,r.right,r.top),i._hasTileWith||(i._tileWidth=n.width,i._tileHeight=n.height),i._urlTiles=i._url+"?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER="+i._layer+"&FORMAT="+i._format+"&TILEMATRIXSET="+i._tilematrixset+"&WIDTH="+i._tileWidth+"&HEIGHT="+i._tileHeight+"&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}",i._rectangle||(i._rectangle=e$1Y(t.rectangle,i._tilingScheme.rectangle)),i._ready=!0,i._requestMetadataSuccess=!0,i._isgeoserver&&(t$$(i._mapboxStyle)||(i._mapboxStyle={version:8,name:n.styleName,layers:[{id:n.styleName+"_fill",source:n.styleName,"source-layer":n.styleName,type:"fill",layout:{visibility:"visible"},paint:{"fill-color":"rgba(224,207,226,1.00)","fill-antialias":!0},filter:["all",["==","$type","Polygon"]],metadata:{"layer:name":n.styleName,"layer:caption":n.styleName}},{id:n.styleName+"_outline",source:n.styleName,"source-layer":n.styleName,type:"line",layout:{visibility:"visible"},paint:{"line-width":1,"line-color":"rgba(102,102,102,1.00)"},filter:["all",["==","$type","Polygon"]],metadata:{"layer:name":n.styleName,"layer:caption":n.styleName}},{id:n.styleName+"line",source:n.styleName,"source-layer":n.styleName,type:"line",layout:{visibility:"visible"},paint:{"line-width":.38,"line-color":"rgba(149,55,52,1.00)"},filter:["all",["==","$type","LineString"]],metadata:{"layer:name":n.styleName,"layer:caption":n.styleName}},{id:n.styleName+"point",source:n.styleName,"source-layer":n.styleName,type:"circle",layout:{visibility:"visible"},paint:{"circle-radius":2.27,"circle-color":"rgba(54,96,146,1.00)"},filter:["all",["==","$type","Point"]],metadata:{"layer:name":n.styleName,"layer:caption":n.styleName}}]}),D$$(i,i._mapboxStyle),i._requestStyleSuccess=!0,i._urlTiles=i._url+"?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER="+i._layer+"&FORMAT="+i._format+"&TILEMATRIXSET="+i._tilematrixset+"&WIDTH="+i._tileWidth+"&HEIGHT="+i._tileHeight+"&TILEMATRIX=EPSG:4326:{z}&TILEROW={y}&TILECOL={x}&&STYLE="),i._requestMetadataSuccess&&i._requestStyleSuccess&&i._readyPromise.resolve(!0)}function s(e,t){var i=[],n=Math.abs(e)/512;n=function(e,t,i){var n=e*t*39.37007874015748*Ue$h(i);return 1/n}(n,96,t);for(var r=0;r<22;r++)0!=r?(n*=2,i[r]=n):i[r]=n;return i}function l(e){var n=e.prjCoordSys.coordUnit;i._coordUnit=n;var r=e.bounds,o=e.viewer.width,a=e.viewer.height;if(i._hasTileWith||(i._tileWidth=o,i._tileHeight=a),i._hasLevel||function(e,t){e._minimumLevel=0,e._maximumLevel=22;var i,n=[];if(i=3857==t.prjCoordSys.epsgCode?[1/295829355.454566,1/147914677.727283,1/73957338.8636414,1/36978669.4318207,1/18489334.7159103,1/9244667.35795517,1/4622333.67897759,1/2311166.83948879,1/1155583.4197444,1/577791.709872198,1/288895.854936099,1/144447.92746805,1/72223.9637340248,1/36111.9818670124,1/18055.9909335062,1/9027.9954667531,1/4513.99773337655,1/2256.99886668828,1/1128.49943334414,1/564.249716672069,1/282.124858336034,1/141.062429168017]:"DEGREE"==t.prjCoordSys.coordUnit?s(360,t.prjCoordSys.coordUnit):s(40075016.6855785,t.prjCoordSys.coordUnit),t.visibleScales&&t.visibleScales.length>0){for(var r,o=null,a=null,l=0;l<t.visibleScales.length;l++){for(var u=0;u<=i.length-1;u++)if(0!=u){if(!(a>(r=Math.abs(t.visibleScales[l]-i[u]))))break;a=r,o=u}else a=Math.abs(t.visibleScales[l]-i[u]),o=0;o>=0&&n.push(o)}e._minimumLevel=n[0],e._maximumLevel=n[n.length-1]}}(i,e),"DEGREE"==n)t$$(i._tilingScheme)||(i._tilingScheme=new a$W),r.left=n$1d.clamp(r.left,-180,180),r.bottom=n$1d.clamp(r.bottom,-90,90),r.right=n$1d.clamp(r.right,-180,180),r.top=n$1d.clamp(r.top,-90,90),i._rectangle=s$1p.fromDegrees(r.left,r.bottom,r.right,r.top),i._urlTemplate=i._url+"/tiles/{z}/{x}/{y}.mvt";else{var l=new a$11(r.left,r.bottom,0);l.x=Math.max(-20037508.342789244,l.x),l.y=Math.max(-20037508.342789244,l.y);var u=new a$11(r.right,r.top,0);u.x=Math.min(20037508.342789244,u.x),u.y=Math.min(20037508.342789244,u.y),t$$(i._tilingScheme)||(i._tilingScheme=new o$Z);var c=i._tilingScheme._projection.unproject(l),h=i._tilingScheme._projection.unproject(u);i._rectangle=new s$1p(c.longitude,c.latitude,h.longitude,h.latitude),i._urlTemplate=i._url+"/tiles/{z}/{x}/{y}.mvt"}i._rectangle||(i._rectangle=e$1Y(t.rectangle,i._tilingScheme.rectangle)),i._ready=!0,i._requestMetadataSuccess=!0,i._requestMetadataSuccess&&i._requestStyleSuccess&&i._readyPromise.resolve(!0)}function u(e){var t,r="An error occurred while accessing "+i._url+".";t=c$_.handleError(t,i,i._errorEvent,r,void 0,void 0,void 0,n),i._readyPromise.reject(new RuntimeError(r))}}function ke$e(e,t){if(t$$(t.metadata)&&t$$(t.metadata.indexbounds)){var i=-180,n=-270,r=360;t$$(t.metadata.epsgcode)&&("3857"==t.metadata.epsgcode||t.metadata.indexbounds[0]<-180)&&(i=-20037508.3427892,n="METER"==e._coordUnit?-20037508.3427892:-30056262.5141838,r=40075016.6855784);var o=t.metadata.indexbounds,a=(o[0]-i)/r,s=(o[1]-n)/r;e._colDiff=a,e._rowDiff=s}}function D$$(e,t){e._MVTStyle._load(t),ke$e(e,t)}function oe$z(e,t,i){var n=Math.pow(2,t);return e+Math.round(n*i)}function He$h(e){e.priority=U$W,e.throttle=!0,(U$W+=.001)>100&&(U$W=0)}function me$B(e,t,i){return{mvt:!0,colorTexture:new P$S({context:e._context,width:e._canvasWidth,height:e._canvasWidth,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE,generateMipmap:!0,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:e$1Y(e.minificationFilter,tt$l.LINEAR_MIPMAP_LINEAR),magnificationFilter:e$1Y(e.magnificationFilter,et$k.LINEAR)})}),rawData:t,indexData:i}}Object.defineProperties(M$10.prototype,{name:{get:function(){return this._name}},proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$_("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel>18?this._maximumLevel:18}},minimumLevel:{get:function(){if(!this._ready)throw new t$_("minimumLevel must not be called before the imagery provider is ready.");return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},isOverlapDisplayed:{get:function(){return this._isOverlapDisplayed},set:function(e){this._isOverlapDisplayed=e}},rectangle:{get:function(){if(!this._ready)throw new t$_("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready&&this._resourceReady}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}},mapboxStyle:{get:function(){return this._mapboxStyle},set:function(e){this._mapboxStyle=e,t$$(this._mapboxStyle)&&D$$(this,this._mapboxStyle)}},subdomains:{get:function(){return this._subdomains},set:function(e){if(t$$(e)&&!t$$(e.length))throw new t$_("Excepted MvtProvider.subdomains to be type of Array.");this._subdomains=e}},globalLineWidthScale:{get:function(){return this._painter._globalLineWidthScale},set:function(e){this._painter._globalLineWidthScale=e}},lineAntialiasing:{get:function(){return this._painter._lineAntialiasing},set:function(e){this._painter._lineAntialiasing=e}},enableMorphing:{get:function(){return this._enableMorphing},set:function(e){this._enableMorphing=e}},billboardMode:{get:function(){return this._billboardMode}},selectedColor:{get:function(){return this._selectedColor},set:function(e){this._selectedColor=e}}}),M$10.prototype.getTileCredits=function(e,t,i){},M$10.prototype.resetVisible=function(){var e=this.innerLayer._imageryCache;for(var t in e)e[t]._visible=!1},M$10.prototype.update=function(e,t,i){var n=this.innerLayer._imageryCache;this._MVTStyle.update(n);var r=[];for(var o in n)r.push(n[o]);r.sort((function(e,t){return e.level<t.level?1:e.level>t.level?-1:0})),this._maxImageCacheLevel=0;for(var a=[],s=[],l=r.length,u=0;u<l;u++){var c=r[u];if(this._maxImageCacheLevel=Math.max(this._maxImageCacheLevel,c.level),c.update(),c._visible&&this.realtime&&(c.realtimeRender(),a.push(c)),t.passes.pick||c._visible){var h=c._MVTLabel;h._textCollection&&s.push(h._textCollection),h._iconCollection&&s.push(h._iconCollection)}}var d=1;t.passes.pick||(this._transform.zoom=this._viewer.scene.camera.zoomLevel,this._MVTStyle._updatePlacement(this._viewer.scene,this._transform,500),d=this._MVTStyle.placement.symbolFadeChange(performance.now()));for(u=0;u<s.length;u++)t.passes.pick||(s[u].fadeChage=d),s[u].update(t,e,i)},M$10.prototype.removeTile=function(e,t,i){},M$10.prototype.requestImage=function(e,t,i,n,r,o){He$h(n);var a=this,s=i+1;return this.tilingScheme instanceof o$Z&&(s=i),this._tileFeature&&(s+=1),this._isgeoserver&&(s-=1),i>a._maximumLevel?(o.hasRawData=!1,me$B(a,null)):(o.hasRawData=!0,Oe$r(o,n,e,t,s,a),me$B(a))};var Ve$k=/({.*?})/g;function Oe$r(e,t,i,n,r,o){var a=o._urlTiles;if(o.tilingScheme instanceof o$Z||(i=oe$z(i,r,o._colDiff),n=oe$z(n,r,o._rowDiff)),e.requestX=i,e.requestY=n,e.requestZ=r,t.quadKey=Pe$o(i,n,r),o._packingRequest===J$_.QuadKey&&(t.type=V$_.PACK,t.providerName=o._name,t.throttle=!0),o._tileFeature){var s=o._scales[r];a=a.replace("{x}",i).replace("{y}",n).replace("{scale}",s)}else a=a.replace("{x}",i).replace("{y}",n).replace("{z}",r);if(t$$(o._subdomains)){var l=o._subdomains,u=l[(i+n+r)%l.length];a=a.replace(Ve$k,(function(e,t){return"{s}"===t?u:e}))}t$$(a$R.CREDENTIAL)&&(t$$(a$R.CREDENTIAL._keymap[o._url])?o._isTdt?a+="&tk="+a$R.CREDENTIAL._keymap[o._url]:a=a$R.addTokenWithKey(o._url,a):o._isTdt?a+="&tk="+a$R.CREDENTIAL._value:a=a$R.addToken(a)),e.requestUrl=a}function ue$u(e,t){Array.isArray(e)||(e=[e]);var i=null;for(var n in t){for(var r=t[n],o=!0,a=0;a<e.length;a++)if(!s$1p.contains(r.rectangle,e[a])){o=!1;break}if(o)if(null==i)i=r;else{var s=i.rectangle.width;r.rectangle.width<s&&(i=r)}}for(;t$$(i)&&!t$$(i.featureIndex);)i=i.parent;return i}function he$w(e,t,i){var n=i.rectangle;return new _0x279c0d((e-n.west)/n.width*_0x10e17e,(t-n.south)/n.height*_0x10e17e)}function Ue$h(e){var t;return"METER"==e?t=1:"DEGREE"==e?t=2*Math.PI*6378137/360:"KILOMETER"==e?t=.001:"INCH"==e?t=1/.025399999918:"FOOT"==e&&(t=.3048),t}function Pe$o(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;e$1B(t,o)?e$1B(e,o)&&(a|=1):(a|=2,e$1B(e,o)||(a|=1)),n+=a}return n}function P$M(e,t,i){if(t$$(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}}function ze$h(e,t,i){if(t$$(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}}function A$Y(e,t,i){var n=P$M(e,t,i);if(t$$(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function ce$s(e,t,i){var n=P$M(e,t,i);if(t$$(n))return n.textContent.trim()}M$10.prototype.pick=function(e){var t=ue$u(e,this.innerLayer._imageryCache);if(null!=t&&t$$(t.featureIndex)){var i=[];i.push(he$w(e.longitude,e.latitude,t));var n={};for(var r in this._MVTStyle._layers){var o=this._MVTStyle._layers[r];t$$(o)&&(t$$(o.visibility)?"none"!=o.visibility&&(n[r]=o):n[r]=o)}var a=null;if(t$$(t.frameState)){var s=t.frameState.camera;t$$(s)&&t$$(s.zoomLevel)&&s.zoomLevel!=1/0&&(a=s.zoomLevel)}var l={realtime:this.realtime,zoom:a,selectTolerance:this.selectTolerance},u=t.queryRenderedFeatures(n,i,l);if(this._MVTStyle.setHighLight(u,this),t$$(u))return Object.keys(u).length>0?u:void 0}},M$10.prototype.queryRenderedFeatures=function(e,t){var i=[],n=ue$u(e,this.innerLayer._imageryCache);if(!t$$(n)||!t$$(n.featureIndex))return i;var r,o,a,s=n,l=[];for(r=0,a=e.length;r<a;r++)l.push(he$w(e[r].longitude,e[r].latitude,s));var u=s.queryRenderedFeatures(this._MVTStyle._layers,l,t);t$$(u)&&i.push(u);var c=[];for(r=0,a=i.length;r<a;r++){var h=i[r];for(var d in h){var f=h[d];for(o=0;o<f.length;o++)c.push(f[o])}}return c},M$10.prototype.querySourceFeatures=function(e){var t=[];if("string"==typeof e.filter[2]&&e.filter[2].indexOf("%")>-1){var i=this._viewer.scene.camera.computeViewRectangle();if(!t$$(i))return t;for(var n=s$1p.southwest(i),r=s$1p.southeast(i),o=s$1p.northeast(i),a=s$1p.northwest(i),s=this.queryRenderedFeatures([n,r,o,a],{layers:[e.sourceLayer]}),l=_0xc53fd1.createFilter(e&&e.filter),u=0;u<s.length;u++){var c=s[u].feature;l(new _0x460d5e(0),c)&&t.push(c)}}else{var h=this.innerLayer._imageryCache;for(var d in h){h[d].querySourceFeatures(e,t)}}return t};var e$1q={START:0,LOADING:1,DONE:2,FAILED:3},te$C=Object.freeze(e$1q);function m$Q(){this.head=void 0,this.tail=void 0,this.count=0,this._lastBeforeStartOfFrame=void 0}function n$$(e,t){var i=t.replacementPrevious,n=t.replacementNext;t===e._lastBeforeStartOfFrame&&(e._lastBeforeStartOfFrame=n),t===e.head?e.head=n:i.replacementNext=n,t===e.tail?e.tail=i:n.replacementPrevious=i,t.replacementPrevious=void 0,t.replacementNext=void 0,--e.count}function s$19(){this.head=void 0,this.tail=void 0,this.count=0}function h$_(e,t){var i=t.previous,n=t.next;t===e.head?e.head=n:i.next=n,t===e.tail?e.tail=i:n.previous=i,t.previous=void 0,t.next=void 0,--e.count}function e$1p(e,t,i,n){this.quadKey=t,this.data=i,this.provider=e,this.promise=n}m$Q.prototype.markStartOfRenderFrame=function(){this._lastBeforeStartOfFrame=this.head},m$Q.prototype.trimTiles=function(e,t){for(var i=this.tail,n=!0;n&&t$$(this._lastBeforeStartOfFrame)&&this.count>e&&t$$(i);){n=i!==this._lastBeforeStartOfFrame;var r=i.replacementPrevious;i.eligibleForUnloading&&(i.freeResources(),n$$(this,i)),i=r}for(this._lastBeforeStartOfFrame&&(i=this._lastBeforeStartOfFrame.replacementNext);t&&i;)i=i.replacementNext;for(;i;){if(i&&i.data)for(var o=i.data.imagery,a=0,s=o.length;a<s;++a){var l=o[a];l.readyImagery&&l.readyImagery.imageryLayer._imageryProvider instanceof M$10&&t$$(l.readyImagery)&&(l.imageryLayer=l.readyImagery.imageryLayer,l.readyImagery.releaseReference(),l.readyImagery=void 0,i.state=te$C.LOADING)}i=i.replacementNext}},m$Q.prototype.markTileRendered=function(e){var t=this.head;if(t!==e)return++this.count,t$$(t)?((t$$(e.replacementPrevious)||t$$(e.replacementNext))&&n$$(this,e),e.replacementPrevious=void 0,e.replacementNext=t,t.replacementPrevious=e,void(this.head=e)):(e.replacementPrevious=void 0,e.replacementNext=void 0,this.head=e,void(this.tail=e));e===this._lastBeforeStartOfFrame&&(this._lastBeforeStartOfFrame=e.replacementNext)},s$19.prototype.trim=function(e){for(var t=this.tail;this.count>e&&t$$(t);){var i=t.previous;t.free(),h$_(this,t),t=i}},s$19.prototype.touch=function(e){var t=this.head;if(t!==e){if(++this.count,!t$$(t))return e.previous=void 0,e.next=void 0,this.head=e,void(this.tail=e);(t$$(e.previous)||t$$(e.next))&&h$_(this,e),e.previous=void 0,e.next=t,t.previous=e,this.head=e}},e$1p.prototype.free=function(){delete this.provider.blockCache[this.quadKey]};var De$t=-1;function $e$a(e){this.resource=e.resource,this.version=e.version,this.isHeightmap=e.isHeightmap,this.tileUrlTemplates=e.tileUrlTemplates,this.availability=e.availability,this.hasVertexNormals=e.hasVertexNormals,this.hasWaterMask=e.hasWaterMask,this.hasMetadata=e.hasMetadata,this.availabilityLevels=e.availabilityLevels,this.availabilityTilesLoaded=e.availabilityTilesLoaded,this.littleEndianExtensionSize=e.littleEndianExtensionSize,this.availabilityTilesLoaded=e.availabilityTilesLoaded,this.availabilityPromiseCache={},this.subLevel=e.subLevel}function se$y(e){if(!t$$(e)||!t$$(e.url))throw new t$_("options.url is required.");var t=-1;if(this._isSct=e$1Y(e.isSct,!0),"string"==typeof e.url){this._baseUrl=e.url;var i=e.url;t=i.indexOf("wmts100");var n=i.substring(0,i.indexOf("/datas"));this.tablename=i.substring(i.indexOf("datas/")+6,i.length);var r=this;new d$_({name:n+this.tablename}).then((function(e){e.checkObjectStoreExit(r.tablename)?r._indexedDBScheduler=e:e.createObjectStore(r.tablename).then((function(){r._indexedDBScheduler=e}))})),this._indexedDBSetting={isOpen:!1,clear:function(){t$$(r._indexedDBScheduler)&&r._indexedDBScheduler.clear(r.tablename)},cache:[]}}else this._isSct=!1;this._tilingScheme=new a$W({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid}),this._heightmapWidth=65,this._levelZeroMaximumGeometricError=d$11.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,this._heightmapWidth,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._heightmapStructure=void 0,this._hasWaterMask=!1,this._hasVertexNormals=!1,this._packingRequest=e.packingRequest,this._isBlock=!1,this._extrudeTileBoundingBox=!1,this._blockCache={},this._blockCacheQueue=new s$19,this._blockCacheSize=100,this._blockScale=0,this._subdomains=e.subdomains,this._requestVertexNormals=e$1Y(e.requestVertexNormals,!1),this._requestWaterMask=e$1Y(e.requestWaterMask,!1),this._requestMetadata=e$1Y(e.requestMetadata,!0),this._cacheKey=e$1Y(e.cacheKey,""),this._originOffset=e$1Y(e.originOffset,new r$T(0,0)),this._errorEvent=new o$15;var o=e.credit;"string"==typeof o&&(o=new i$17(o)),this._credit=o,this._availability=void 0;var a=c$18.defer();this._ready=!1,this._readyPromise=a,this._tileCredits=void 0,this._bounds=null,this._isCreateSkirt=e$1Y(e.isCreateSkirt,!0),this._urlType=e$1Y(e.urlType,di$7.REST),this._isShowGlobe=!0,this._isTerrainZ=!1,this._hasNormalBuffer=!1,this._currentVersion=null,this._needRefresh=!1,this._isSct&&(this._isShowGlobe=e$1Y(e.isShowGlobe,!0)),this._isSkirtDirty=!1,this._customRequestHeaders=e.customRequestHeaders,this._invisibility=e$1Y(e.invisibility,!1),this._visible=!0,this._offset={_x:0,_y:0,_level:0},this._enablePrjArea=e$1Y(e.enablePrjArea,!1);var s,l,u;r=this;t$$(this._subdomains)&&(i=i.replace(/({.*?})/g,(function(e,t){if(!t$$(r._subdomains.length))throw new t$_("detected subdomain url scheme, but no subdomain provided.");return"{s}"===t?r._subdomains[0]:e})));var c=this._layers=[],h="",d=[],f=0;if(this._isSct&&-1===t){var p;if(r._hasWaterMask=!0,r._urlType===di$7.KEY_VALUE){var _=e.url,m=_.replace(_.substring(_.indexOf("datas")+5,_.indexOf("scene3DName")),"?");r._tileUrlTemplates=[m+"&tile1={z}&tile2={x}&tile3={y}&ext=terrainz&v=1.16389.0"],p=_}else{r._tileUrlTemplates=[e.url+"/data/path/{z}/{x}/{y}.terrain?v=1.16389.0"];var $=e.url.split("/");$[$.length-1],p=p$1c(i,"config")}t$$(a$R.CREDENTIAL)&&(p=t$$(a$R.CREDENTIAL._keymap[r._baseUrl])?a$R.addTokenWithKey(r._baseUrl,p):a$R.addToken(p)),c$18(o$W(p,this._customRequestHeaders),(function(t){t=t.replace("<SuperMapCache>",'<SuperMapCache xmlns:sml="http://www.supermap.com/SuperMapCache">');var i=(new f$10).read(t).documentElement;if(2===f$10.queryNumericValue(i,"Version",void 0)){var n=f$10.queryFirstNode(i,"StoreType",void 0);r._blockScale=f$10.queryNumericAttribute(n,"BlockScale",void 0),t$$(r._blockScale)&&r._blockScale>0&&(r._isBlock=!0)}var o,a=f$10.queryStringValue(i,"FileExtentName",void 0);if(a=a.toLowerCase(),r._isTerrainZ="terrainz"===a,r._urlType===di$7.KEY_VALUE){var s=e.url;o=s.replace(s.substring(s.indexOf("datas")+5,s.indexOf("scene3DName")),"?"),o+="&tile1={z}&tile2={x}&tile3={y}&ext={fileExtent}&v=1.16389.0"}else o=e.url+"/data/path/{z}/{x}/{y}.{fileExtent}?v=1.16389.0";o=o.replace("{fileExtent}",a),r._tileUrlTemplates=[o];var l=f$10.queryFirstNode(i,"HeightRange",void 0),u=f$10.queryNumericValue(l,"MaxHeight",void 0),h=f$10.queryNumericValue(l,"MinHeight",void 0);r._maxHeight=u,r._minHeight=h;var f=f$10.queryFirstNode(i,"Bounds",void 0),p=f$10.queryNumericValue(f,"Left",void 0),_=f$10.queryNumericValue(f,"Right",void 0),m=f$10.queryNumericValue(f,"Bottom",void 0),$=f$10.queryNumericValue(f,"Top",void 0),g=f$10.queryFirstNode(i,"PlaneBounds",void 0);if(t$$(g)){p>180&&(r._offset._x=Math.floor(p/180)),$>90&&(r._offset._y=Math.floor(($+90)/180));var y=r._offset._x*Math.PI*n$1d.Radius,v=r._offset._y*Math.PI*n$1d.Radius;p=f$10.queryNumericValue(g,"Left",void 0),p-=y,_=f$10.queryNumericValue(g,"Right",void 0),_-=y,m=f$10.queryNumericValue(g,"Bottom",void 0),m-=v,$=f$10.queryNumericValue(g,"Top",void 0),$-=v;var x=new a$11(p,m,0),b=new a$11(_,$,0),S=new s$1q,w=S.unproject(x),C=S.unproject(b);p=n$1d.toDegrees(w.longitude),_=n$1d.toDegrees(C.longitude),m=n$1d.toDegrees(w.latitude),$=n$1d.toDegrees(C.latitude),Math.abs(y)>n$1d.EPSILON1&&(a$11.globalOffset.x=y),Math.abs(v)>n$1d.EPSILON1&&(a$11.globalOffset.y=v)}p&&_&&m&&$&&(r._bounds=new s$1p(p,m,_,$),r._boundsRadians=s$1p.fromDegrees(p,m,_,$));for(var T=f$10.queryFirstNode(i,"Levels",void 0),P=f$10.queryChildNodes(T,"Level",void 0),E=[],A=0,L=P.length;A<L;A++){var M=parseInt(P[A].textContent);E.push(M)}var I=f$10.queryFirstNode(i,"History",void 0);if(null!=I){var O=f$10.queryChildNodes(I,"Version",void 0),D=[];for(A=0,L=O.length;A<L;A++){M=O[A].textContent;D.push(M)}r._historyVersions=D}var R=E[0],N=E[E.length-1],F=f$10.queryFirstNode(i,"Available",void 0);if(t$$(F)){var B=f$10.queryChildNodes(F,"TilesBounds",void 0),z=R>0?E.length+1:E.length,G=new Array(z);for(A=0;A<R;A++)G[A]=[];for(A=0,L=B.length;A<L;A++){var k=B[A],U=[];G[te=f$10.queryNumericAttribute(k,"level",void 0)]=U;for(var V=f$10.queryChildNodes(k,"TileBounds",void 0),W=0,H=V.length;W<H;W++){var Y=V[W],j=f$10.queryNumericValue(Y,"StartCol",void 0),q=f$10.queryNumericValue(Y,"StartRow",void 0),X=f$10.queryNumericValue(Y,"EndCol",void 0),K=f$10.queryNumericValue(Y,"EndRow",void 0);if(te>=r._offset._level){var Z=1<<te-r._offset._level,J=r._offset._x*Z;j-=J,X-=J;var Q=r._offset._y*Z;q-=Q,K-=Q}U.push({startX:j,startY:q,endX:X,endY:K})}}G[0]=[{startX:0,startY:0,endX:1,endY:1}];for(var ee=new f$13(r._tilingScheme,N),te=0;te<G.length;++te){var ie=G[te],ne=r._tilingScheme.getNumberOfYTilesAtLevel(te);if(t$$(d[te])||(d[te]=[]),t$$(ie))for(var re=0;re<ie.length;++re){var oe=ie[re],ae=ne-oe.endY-1,se=ne-oe.startY-1;d[te].push([oe.startX,ae,oe.endX,se]),ee.addAvailableTileRange(te,oe.startX,ae,oe.endX,se)}}r._availability=ee}c.push(new $e$a({resource:t$X.createIfNeeded(e.url),version:"",isHeightmap:!1,tileUrlTemplates:r._tileUrlTemplates,availability:ee,hasVertexNormals:!1,hasWaterMask:!0,hasMetadata:!1,availabilityLevels:0,availabilityTilesLoaded:!1,littleEndianExtensionSize:!0})),r._levels=E,r._ready=!0,r._readyPromise.resolve(!0)}),(function(){r._readyPromise.reject(!1)}))}else if(t>-1){var g=i+"/1.0.0/WMTSCapabilities.xml";r._wmtslayer=e.layer||null,r._wmtsformat=e.format||"binary",r._wmtstileMatrixSet=e.tilematrixset||null,e.blockscale>0&&(r._blockScale=1*e.blockscale,r._isBlock=!0),c$18(o$W(g),(function(t){var i=(new f$10).read(t).documentElement,n=f$10.queryFirstNode(i,"Contents",void 0),o=f$10.queryFirstNode(n,"Layer",void 0);r._tempLayerName=f$10.queryStringValue(o,"Title",void 0);var a=f$10.queryFirstNode(n,"TileMatrixSet",void 0);r._wmtstileMatrixSet=f$10.queryStringValue(a,"Identifier",void 0),r._tileUrlTemplates=[e.url+"?tilematrix={z}&layer="+(r._wmtslayer||r._tempLayerName)+"&tilerow={y}&tilecol={x}&tilematrixset="+r._wmtstileMatrixSet+"&service=WMTS&request=GetTile"];var s=f$10.queryFirstNode(o,"BoundingBox",void 0),l=f$10.queryStringValue(s,"LowerCorner",void 0),u=f$10.queryStringValue(s,"UpperCorner",void 0),h=l.split(" "),d=u.split(" "),f=parseFloat(h[0]),p=parseFloat(d[0]),_=parseFloat(h[1]),m=parseFloat(d[1]);f&&p&&_&&m&&(r._bounds=new s$1p(f,_,p,m),r._boundsRadians=s$1p.fromDegrees(f,_,p,m));var $=f$10.queryFirstNode(n,"TileMatrixSet",void 0),g=(a=f$10.queryChildNodes($,"TileMatrix",void 0),f$10.queryNumericValue(a[0],"ScaleDenominator",void 0)),y=f$10.queryNumericValue(a[a.length-1],"ScaleDenominator",void 0),v=f$10.queryNumericValue(a[0],"Identifier",void 0);g=1/g,y=1/y;var x=[1.690163571602655e-9,3.3803271432053056e-9,6.760654286410611e-9,1.3521308572821242e-8,2.7042617145642484e-8,5.408523429128511e-8,1.0817046858256998e-7,2.1634093716513974e-7,4.3268187433028044e-7,8.653637486605571e-7,17307274973211203e-22,34614549946422405e-22,69229099892844565e-22,13845819978568952e-21,27691639957137904e-21,553832799142758e-19,.0001107665598285516,.0002215331196571032,.0004430662393142064,.0008861324786284128,.001772264957256826,.003544529914513652],b=x.indexOf(g),S=x.indexOf(y);for(let e=0;e<x.length;e++)g>x[e]&&x[e+1]&&g<x[e+1]&&(b=e-1),y>x[e]&&x[e+1]&&y<x[e+1]&&(S=e-1);for(var w=e$1Y((b=Math.max(b,0))-v,0),C=[],T=b;T<=S;T++)C.push(T);r._isTerrainZ="terrainz",c.push(new $e$a({resource:t$X.createIfNeeded(e.url),version:"",isHeightmap:!1,tileUrlTemplates:r._tileUrlTemplates,hasVertexNormals:!1,hasWaterMask:!0,hasMetadata:!1,availabilityLevels:0,availabilityTilesLoaded:!1,littleEndianExtensionSize:!0,subLevel:w})),r._levels=C,r._ready=!0,r._readyPromise.resolve(!0)}),(function(){r._readyPromise.reject(!1)}))}else c$18(e.url).then((function(e){var t=t$X.createIfNeeded(e);t.appendForwardSlash(),l=(s=t).getDerivedResource({url:"layer.json"}),r._tileCredits=t.credits,S()})).otherwise((function(e){a.reject(e)}));function y(e){var t;if(!e.format)return t="The tile format is not specified in the layer.json file.",void(u=c$_.handleError(u,r,r._errorEvent,t,void 0,void 0,void 0,S));if(!e.tiles||0===e.tiles.length)return t="The layer.json file does not specify any tile URL templates.",void(u=c$_.handleError(u,r,r._errorEvent,t,void 0,void 0,void 0,S));var i=!1,n=!1,o=!1,a=!0,p=!1;if("heightmap-1.0"===e.format)p=!0,t$$(r._heightmapStructure)||(r._heightmapStructure={heightScale:.2,heightOffset:-1e3,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1,lowestEncodedHeight:0,highestEncodedHeight:65535}),n=!0,r._requestWaterMask=!0;else if(0!==e.format.indexOf("quantized-mesh-1."))return t='The tile format "'+e.format+'" is invalid or not supported.',void(u=c$_.handleError(u,r,r._errorEvent,t,void 0,void 0,void 0,S));var _,m=e.tiles,$=e.maxzoom;f=Math.max(f,$),t$$(e.extensions)&&-1!==e.extensions.indexOf("octvertexnormals")?i=!0:t$$(e.extensions)&&-1!==e.extensions.indexOf("vertexnormals")&&(i=!0,a=!1),t$$(e.extensions)&&-1!==e.extensions.indexOf("watermask")&&(n=!0),t$$(e.extensions)&&-1!==e.extensions.indexOf("metadata")&&(o=!0);var g,x=e.metadataAvailability,b=e.available;if(t$$(b)&&!t$$(x)){g=new f$13(r._tilingScheme,b.length);for(var w=0;w<b.length;++w){var C=b[w],T=r._tilingScheme.getNumberOfYTilesAtLevel(w);t$$(d[w])||(d[w]=[]);for(var P=0;P<C.length;++P){var E=C[P],A=T-E.endY-1,L=T-E.startY-1;d[w].push([E.startX,A,E.endX,L]),g.addAvailableTileRange(w,E.startX,A,E.endX,L)}}}else t$$(x)&&(_=new f$13(r._tilingScheme,$),g=new f$13(r._tilingScheme,$),d[0]=[[0,0,1,0]],g.addAvailableTileRange(0,0,0,1,0));r._hasWaterMask=r._hasWaterMask||n,r._hasVertexNormals=r._hasVertexNormals||i,r._hasMetadata=r._hasMetadata||o,t$$(e.attribution)&&(h.length>0&&(h+=" "),h+=e.attribution),c.push(new $e$a({resource:s,version:e.version,isHeightmap:p,tileUrlTemplates:m,availability:g,hasVertexNormals:i,hasWaterMask:n,hasMetadata:o,availabilityLevels:x,availabilityTilesLoaded:_,littleEndianExtensionSize:a}));var M=e.parentUrl;return t$$(M)?t$$(g)?((s=s.getDerivedResource({url:M})).appendForwardSlash(),c$18((l=s.getDerivedResource({url:"layer.json"})).fetchJson(),y,v)):(console.log("A layer.json can't have a parentUrl if it does't have an available array."),c$18.resolve()):c$18.resolve()}function v(e){var t="An error occurred while accessing "+l.url+".";u=c$_.handleError(u,r,r._errorEvent,t,void 0,void 0,void 0,S)}function x(e){y(e).then((function(){if(!t$$(u)){var e=d.length;if(e>0)for(var t=r._availability=new f$13(r._tilingScheme,f),i=0;i<e;++i)for(var n=d[i],o=0;o<n.length;++o){var a=n[o];t.addAvailableTileRange(i,a[0],a[1],a[2],a[3])}if(h.length>0){var s=new i$17(h);t$$(r._tileCredits)?r._tileCredits.push(s):r._tileCredits=[s]}r._ready=!0,r._readyPromise.resolve(!0)}}))}function b(e){t$$(e)&&404===e.statusCode?x({tilejson:"2.1.0",format:"heightmap-1.0",version:"1.0.0",scheme:"tms",tiles:["{z}/{x}/{y}.terrain?v={version}"]}):v()}function S(){c$18(l.fetchJson()).then(x).otherwise(b)}}var He$g={OCT_VERTEX_NORMALS:1,WATER_MASK:2,METADATA:4,INVALID_FLAG:127};function vt$a(e){return t$$(e)&&0!==e.length?{Accept:"application/vnd.quantized-mesh;extensions="+e.join("-")+",application/octet-stream;q=0.9,*/*;q=0.01"}:{Accept:"application/vnd.quantized-mesh,application/octet-stream;q=0.9,*/*;q=0.01"}}function et$j(e,t,i,n,r,o){var a=new Uint16Array(t,0,e._heightmapWidth*e._heightmapWidth);return new M$1a({buffer:a,childTileMask:new Uint8Array(t,a.byteLength,1)[0],waterMask:new Uint8Array(t,a.byteLength+1,t.byteLength-a.byteLength-1),width:e._heightmapWidth,height:e._heightmapWidth,structure:e._heightmapStructure,credits:e._tileCredits})}function We$l(e,t,i,n,r,o,a,s){var l=a.littleEndianExtensionSize,u=0,c=3*Float64Array.BYTES_PER_ELEMENT,h=4*Float64Array.BYTES_PER_ELEMENT,d=3*Uint16Array.BYTES_PER_ELEMENT,f=Uint16Array.BYTES_PER_ELEMENT,p=3*f,_=new DataView(t),m=new a$11(_.getFloat64(u,!0),_.getFloat64(u+8,!0),_.getFloat64(u+16,!0));u+=c;var $=_.getFloat32(u,!0);u+=Float32Array.BYTES_PER_ELEMENT;var g=_.getFloat32(u,!0);u+=Float32Array.BYTES_PER_ELEMENT;var y=g,v=$,x=new c$19(new a$11(_.getFloat64(u,!0),_.getFloat64(u+8,!0),_.getFloat64(u+16,!0)),_.getFloat64(u+c,!0));u+=h;var b=new a$11(_.getFloat64(u,!0),_.getFloat64(u+8,!0),_.getFloat64(u+16,!0));u+=c;var S=_.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var w=new Uint16Array(t,u,3*S);u+=S*d,S>65536&&(p=3*(f=Uint32Array.BYTES_PER_ELEMENT));var C=w.subarray(0,S),T=w.subarray(S,2*S),P=w.subarray(2*S,3*S);r$P.zigZagDeltaDecode(C,T,P),u%f!=0&&(u+=f-u%f);var E=_.getUint32(u,!0),A=u+=Uint32Array.BYTES_PER_ELEMENT,L=fe$u.createTypedArrayFromArrayBuffer(S,t,u,3*E);u+=E*p;for(var M=0,I=L.length,O=0;O<I;++O){var D=L[O];L[O]=M-D,0===D&&++M}var R=_.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var N=fe$u.createTypedArrayFromArrayBuffer(S,t,u,R);u+=R*f;var F=_.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var B=fe$u.createTypedArrayFromArrayBuffer(S,t,u,F);u+=F*f;var z=_.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var G=fe$u.createTypedArrayFromArrayBuffer(S,t,u,z);u+=z*f;var k=_.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var U=fe$u.createTypedArrayFromArrayBuffer(S,t,u,k);u+=k*f;var V,W,H,Y,j=!1,q=!1,X=void 0,K=void 0;!1===e._isShowGlobe&&(0===g||u>=_.byteLength)&&(j=!0);for(var Z=0;u<_.byteLength;){var J=_.getUint8(u,!0);if(0!==J){u+=Uint8Array.BYTES_PER_ELEMENT;var Q=_.getUint32(u,l);if(u+=Uint32Array.BYTES_PER_ELEMENT,J===He$g.OCT_VERTEX_NORMALS&&e._requestVertexNormals)V=new Uint8Array(t,u,2*S);else if(J===He$g.WATER_MASK&&e._requestWaterMask)W=new Uint8Array(t,u,Q);else if(J===He$g.METADATA&&e._requestMetadata&&!e._isSct){var ee=_.getUint32(u,!0);if(ee>0){var te=c$X(new Uint8Array(t),u+Uint32Array.BYTES_PER_ELEMENT,ee),ie=JSON.parse(te).available;if(t$$(ie))for(var ne=0;ne<ie.length;++ne)for(var re=i+ne+1,oe=ie[ne],ae=e._tilingScheme.getNumberOfYTilesAtLevel(re),se=0;se<oe.length;++se){var le=oe[se],ue=ae-le.endY-1,ce=ae-le.startY-1;e.availability.addAvailableTileRange(re,le.startX,ue,le.endX,ce),a.availability.addAvailableTileRange(re,le.startX,ue,le.endX,ce)}}a.availabilityTilesLoaded.addAvailableTileRange(i,n,r,n,r)}else if(J===He$g.INVALID_FLAG){if((Z=_.getUint32(u,!0))>0){var he=0,de=32767;for(O=0;O<Z;O++)he=Math.max(he,P[L[O]]),de=Math.min(de,P[L[O]]);he<32767&&(y=$+(g-$)*he/32767),de>0&&(v=$+(g-$)*de/32767)}(!1===e._isShowGlobe||t$$(s))&&(!1===e._isShowGlobe&&(0===Z?j=!0:L=fe$u.createTypedArrayFromArrayBuffer(S,t,A,Z)),(3*E!=Z||0==Z)&&(q=!0),t$$(s)&&Z>0&&(0===(X=fe$u.createTypedArrayFromArrayBuffer(S,t,A,Z)).length&&(X=void 0)))}else if(125===J){var fe=Q/4;H=new Uint8Array(3*fe);var pe=u,_e=new a$11;for(O=0;O<fe;O++){var me=_.getInt16(pe,!0);pe+=Int16Array.BYTES_PER_ELEMENT;var $e=_.getInt16(pe,!0);pe+=Int16Array.BYTES_PER_ELEMENT,r$P.octShortDecode(me,$e,_e),H[3*O]=255*(.5*_e.x+.5),H[3*O+1]=255*(.5*_e.y+.5),H[3*O+2]=255*(.5*_e.z+.5)}}u+=Q}else u+=1}if(t$$(X)){K=new Uint16Array(3*S);for(O=0;O<S;O++)K[3*O]=w[O],K[3*O+1]=w[S+O],K[3*O+2]=w[2*S+O]}!1===e._isShowGlobe&&(Y=0);var ge,ye,ve=e._tilingScheme.tileXYToRectangle(n,r,i);return ve.width<n$1d.PI_OVER_TWO+n$1d.EPSILON5&&(ge=b$1o.fromRectangle(ve,$,g,e._tilingScheme.ellipsoid),ye=b$1o.fromRectangle(ve,v,y,e._tilingScheme.ellipsoid)),Y=e._isCreateSkirt?5*e.getLevelMaximumGeometricError(i):0,e._hasNormalBuffer=t$$(H),new k$11({center:m,minimumHeight:$,maximumHeight:g,boundingSphere:x,orientedBoundingBox:ge,validMinimumHeight:v,validMaximumHeight:y,validOrientedBoundingBox:ye,horizonOcclusionPoint:b,quantizedVertices:w,encodedNormals:V,indices:L,westIndices:N,southIndices:B,eastIndices:G,northIndices:U,westSkirtHeight:Y,southSkirtHeight:Y,eastSkirtHeight:Y,northSkirtHeight:Y,childTileMask:e._isSct||!t$$(e.availability)?15:e.availability.computeChildMaskForTile(i,n,r),waterMask:W,credits:e._tileCredits,normalTexture:H,invalid:j,rasterIndex:X,rasterVertex:K,hasInvalid:q})}function Ne$k(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;e$1B(t,o)?e$1B(e,o)&&(a|=1):(a|=2,e$1B(e,o)||(a|=1)),n+=a}return n}function ft$d(e,t,i,n){var r=Math.min(e._blockScale,n),o=Math.pow(2,r),a=t%o;return{x:Math.floor(t/o),y:Math.floor(i/o),col:a,row:i%o,level:n,blockSize:o}}se$y.prototype.requestTileGeometry=function(e,t,i,n,r){if(!this._ready)throw new t$_("requestTileGeometry must not be called before the terrain provider is ready.");if(0===i&&this._isSct){for(var o=new Uint16Array(12288),a=0;a<64;a++)for(var s=0;s<64;s++)o[64*a+s]=Math.floor(32767*a/63),o[4096+64*a+s]=Math.floor(32767*s/63),o[8192+64*a+s]=0;var l=new Uint16Array(23814);for(a=0;a<63;a++)for(s=0;s<63;s++)l[6*(63*a+s)]=64*a+s,l[6*(63*a+s)+1]=64*(a+1)+s+1,l[6*(63*a+s)+2]=64*a+s+1,l[6*(63*a+s)+3]=64*(a+1)+s,l[6*(63*a+s)+4]=64*(a+1)+s+1,l[6*(63*a+s)+5]=64*a+s;var u=new Uint16Array(0),c=new a$11(NaN,-1/0,NaN),h=new a$11(0,-3189068.5,0);1===e&&(h.y=3189068.5,c.y=1/0);var d=this;return c$18.resolve(new k$11({center:h,minimumHeight:0,maximumHeight:0,boundingSphere:new c$19(h,9567205.5),horizonOcclusionPoint:c,quantizedVertices:o,indices:l,westIndices:u,southIndices:u,eastIndices:u,northIndices:u,westSkirtHeight:0,southSkirtHeight:0,eastSkirtHeight:0,northSkirtHeight:0,childTileMask:d._isSct||!t$$(d.availability)?15:d.availability.computeChildMaskForTile(i,e,t),invalid:!1,hasInvalid:!1}))}var f,p=this._layers,_=p.length;if(1===_)f=p[0];else for(a=0;a<_;++a){var m=p[a];if(!t$$(m.availability)||m.availability.isTileAvailable(i,e,t)){f=m;break}}return mt$e(this,e,t,i,f,n,r)};var Rt$b=/({.*?})/g;function mt$e(e,t,i,n,r,o,a){if(!t$$(r))return c$18.reject(new t$Z("Terrain tile doesn't exist"));var s=r.tileUrlTemplates;if(0!==s.length){var l=e._tilingScheme.getNumberOfYTilesAtLevel(n)-i-1,u=[];e._requestVertexNormals&&r.hasVertexNormals&&u.push(r.littleEndianExtensionSize?"octvertexnormals":"vertexnormals"),e._requestWaterMask&&r.hasWaterMask&&u.push("watermask"),e._requestMetadata&&r.hasMetadata&&u.push("metadata");var c,h,d=s[(t+l+n)%s.length];t$$(e._currentVersion)&&(d+="&dataVersion="+e._currentVersion),e._isSct&&0===n&&(d=o$12("Assets/Terrain/"+n+"/"+t+"/"+i+".terrain"));var f,p=r.resource;if(t$$(p._ionEndpoint)&&!t$$(p._ionEndpoint.externalType)?(0!==u.length&&(h={extensions:u.join("-")}),c=vt$a(void 0)):(c=vt$a(u),t$$(e._customRequestHeaders)&&(c=s$1n(c,e._customRequestHeaders))),0!==n&&(t$$(e._packingRequest)||e._isBlock))if(e._isBlock&&t$$(e._packingRequest)&&e._packingRequest===J$_.QuadKey&&!a){if(o.type=V$_.BLOCKPACK,o.throttle=!0,o.providerName=e.tablename,f=ft$d(e,t,l,n),o.quadKey=Ne$k(f.x,f.y,f.level),o.blockInfo=f,t$$(g=e.blockCache[o.quadKey])&&t$$(g.data))return e.blockCacheQueue.touch(g),t$$(_=Oe$q(g.data,f))?{buffer:_,layerToUse:r,level:n,x:t,y:i,tmsY:l}:"cacheInvalid"}else if(e._packingRequest!==J$_.QuadKey||a){if(e._isBlock){var _;if(o.type=V$_.BLOCK,o.providerName=e.tablename,f=ft$d(e,t,l,n),o.quadKey=Ne$k(f.x,f.y,f.level),o.blockInfo=f,t$$(g=e.blockCache[o.quadKey])&&t$$(g.data)&&!a)return e.blockCacheQueue.touch(g),t$$(_=Oe$q(g.data,f))?{buffer:_,layerToUse:r,level:n,x:t,y:i,tmsY:l}:"cacheInvalid";if(!0===e._indexedDBSetting.isOpen&&t$$(e._indexedDBScheduler)&&!0===o.cacheEnable)return t$$(v=e._indexedDBScheduler.getElementFromDB(e.tablename,o.quadKey))?v.then((function(a){if(t$$(a)){if(a===De$t)return"cacheInvalid";var s=new e$1p(e,o.quadKey,a);e.blockCache[o.quadKey]=s;var u=Oe$q(a,f);return t$$(u)?e._isTerrainZ&&0!==n?{buffer:u,layerToUse:r,level:n,x:t,y:i,tmsY:l}:t$$(e._heightmapStructure)?et$j(e,u):We$l(e,u,n,t,i,l,r):"cacheError"}return"cacheError"}),(function(e){return"cacheError"})):"cacheError"}}else o.type=V$_.PACK,o.providerName=e.tablename,o.quadKey=Ne$k(t,l,n),o.throttle=!0;if(!t$$(e._indexedDBSetting)||!0!==e._indexedDBSetting.isOpen||!0!==o.cacheEnable){let s=function(s){var u;if(t$$(u=0!==e._cacheKey.length?Dt$7(s,e._cacheKey):s)){if(0!==n&&(t$$(e._packingRequest)||e._isBlock)){if(e._isBlock&&t$$(e._packingRequest)&&e._packingRequest===J$_.QuadKey&&!a){!t$$(o.quadKeyIndex)&&t$$(o.blockRequest)&&(o.quadKeyIndex=o.blockRequest.quadKeyIndex);var c=_t$b(s,o.quadKeyIndex);t$$(h=e.blockCache[o.quadKey])&&(h.data=s),e.blockCacheQueue.touch(h),e.blockCacheQueue.trim(e.blockCacheSize),u=Oe$q(c,o.blockInfo)}else if(e._packingRequest!==J$_.QuadKey||a){if(e._isBlock){var h;if(!t$$((h=e.blockCache[o.quadKey]).data)&&(h.data=s,!0===e._indexedDBSetting.isOpen&&t$$(e._indexedDBScheduler)&&!o.cacheEnable)){var d=o.quadKey,f={blob:s.slice(0),key:d,tablename:e.tablename,dbname:e._indexedDBScheduler.dbname,cacheSize:5};Xe$d.scheduleTask(f,[])}e.blockCacheQueue.touch(h),e.blockCacheQueue.trim(e.blockCacheSize),u=Oe$q(s,o.blockInfo)}}else u=_t$b(s,o.quadKeyIndex);if(!t$$(u))return;if(u===De$t){d=Ne$k(t,l,n),f={blob:De$t,key:d,tablename:e.tablename,dbname:e._indexedDBScheduler.dbname};return void Xe$d.scheduleTask(f,[])}}if(t$$(e._indexedDBSetting)&&!0===e._indexedDBSetting.isOpen&&!e._isBlock&&t$$(e._indexedDBScheduler)&&t$$(u)){d=Ne$k(t,l,n),f={blob:u.slice(0),key:d,tablename:e.tablename,dbname:e._indexedDBScheduler.dbname};Xe$d.scheduleTask(f,[])}return e._isTerrainZ&&0!==n?{buffer:u,layerToUse:r,level:n,x:t,y:i,tmsY:l}:t$$(e._heightmapStructure)?et$j(e,u):We$l(e,u,n,t,i,l,r)}};if(t$$(e._subdomains)&&0!==n){var m=e._subdomains,$=m[(t+i+n)%m.length];d=d.replace(Rt$b,(function(e,t){return"{s}"===t?$:e}))}var g,y;return e._isBlock?t$$(g=e.blockCache[o.quadKey||n+""+t+i])?g.promise.then(s):(y=yt$8(p,d,r,n,t,i,l,h,c,o,e,a,f))?(g=new e$1p(e,o.quadKey||n+""+t+i),e.blockCache[o.quadKey]=g,g.promise=y,y.then(s)):void 0:(y=yt$8(p,d,r,n,t,i,l,h,c,o,e,a,f))?y.then(s):void 0}if(t$$(e._indexedDBScheduler)){var v,x=Ne$k(t,l,n);return t$$(v=e._indexedDBScheduler.getElementFromDB(e.tablename,x))?v.then((function(o){return t$$(o)?o===De$t?"cacheInvalid":e._isTerrainZ&&0!==n?{buffer:o,layerToUse:r,level:n,x:t,y:i,tmsY:l}:t$$(e._heightmapStructure)?et$j(e,o):We$l(e,o,n,t,i,l,r):"cacheError"}),(function(e){return"cacheError"})):"cacheError"}}}function _t$b(e,t){var i=new DataView(e),n=0,r=i.getUint32(n,!0);if(t>r-1)throw new t$_("pack imagery index invalid");n+=4;var o,a,s=[];for(o=0;o<r;o++)a=i.getUint32(n,!0),s.push(a),n+=4;for(o=0;o<r;o++){if(a=s[o],o===t)return 0===a?De$t:new Uint8Array(e).slice(n,n+a).buffer;n+=a}}function Oe$q(e,t){var i=new DataView(e),n=0;i.getUint32(n,!0),n+=4;var r=i.getUint32(n,!0);n+=4;for(var o=t.col,a=t.row*t.blockSize+o,s=0,l=0,u=0;u<r;u++){if(u<a)s+=i.getUint32(n,!0);else if(u===a){l=i.getUint32(n,!0),n+=4;break}n+=4}if(n=8+4*r,0!==l)return n+=s,new Uint8Array(e).slice(n,n+l).buffer}var Xe$d=new o$_("indexedDBWorker");function yt$8(e,t,i,n,r,o,a,s,l,u,c,h,d){var f,p=t.substring(0,t.lastIndexOf("/realspace/")+10);if(t$$(a$R.CREDENTIAL)&&(t=t$$(a$R.CREDENTIAL._keymap[p])?a$R.addTokenWithKey(p,t):a$R.addToken(t)),t$$(d)){var _=d.x,m=d.y;if(n>=c._offset._level){var $=1<<n-c._offset._level;_+=c._offset._x*$/d.blockSize,m+=c._offset._y*$/d.blockSize}f=e.getDerivedResource({url:t,templateValues:{version:i.version,z:n,x:_,y:m},queryParameters:s,headers:l,request:u}).fetchArrayBuffer()}else{var g=e$1Y(i.subLevel,0);f=e.getDerivedResource({url:t,templateValues:{version:i.version,z:n-g,x:r,y:a},queryParameters:s,headers:l,request:u}).fetchArrayBuffer()}return f}var Vt$9=new o$_("UnZipTerrainData");se$y.prototype.unzip=function(e){return Vt$9.scheduleTask({data:e},[e])},se$y.prototype.createTerrainData=function(e,t,i){return We$l(this,t,e.level,e.x,e.y,e.tmsY,e.layerToUse,i)},Object.defineProperties(se$y.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){if(!this._ready)throw new t$_("credit must not be called before the terrain provider is ready.");return this._credit}},tilingScheme:{get:function(){if(!this._ready)throw new t$_("tilingScheme must not be called before the terrain provider is ready.");return this._tilingScheme}},isCreateSkirt:{get:function(){return this._isCreateSkirt},set:function(e){e!==this._isCreateSkirt&&(this._isSkirtDirty=!0),this._isCreateSkirt=e}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},hasWaterMask:{get:function(){if(!this._ready)throw new t$_("hasWaterMask must not be called before the terrain provider is ready.");return this._hasWaterMask&&this._requestWaterMask}},hasVertexNormals:{get:function(){if(!this._ready)throw new t$_("hasVertexNormals must not be called before the terrain provider is ready.");return this._hasVertexNormals&&this._requestVertexNormals}},hasMetadata:{get:function(){if(!this._ready)throw new t$_("hasMetadata must not be called before the terrain provider is ready.");return this._hasMetadata&&this._requestMetadata}},requestVertexNormals:{get:function(){return this._requestVertexNormals}},requestWaterMask:{get:function(){return this._requestWaterMask}},requestMetadata:{get:function(){return this._requestMetadata}},availability:{get:function(){if(!this._ready)throw new t$_("availability must not be called before the terrain provider is ready.");return this._availability}},isShowGlobe:{get:function(){return this._isShowGlobe}},customRequestHeaders:{get:function(){return this._customRequestHeaders},set:function(e){this._customRequestHeaders=e}},indexedDBSetting:{get:function(){return this._indexedDBSetting},set:function(e){t$$(e)&&"boolean"==typeof e.isOpen&&(this._indexedDBSetting.isOpen=e.isOpen)}},hasNormalBuffer:{get:function(){return this._hasNormalBuffer}},blockCache:{get:function(){return this._blockCache}},blockCacheQueue:{get:function(){return this._blockCacheQueue}},blockCacheSize:{get:function(){return this._blockCacheSize}},subdomains:{get:function(){return this._subdomains},set:function(e){if(t$$(e)&&!t$$(e.length))throw new t$_("Excepted CesiumTerrainProvider.subdomains to be type of Array.");this._subdomains=e}},currentVersion:{get:function(){return this._currentVersion},set:function(e){this._currentVersion=e,this._blockCache={},this._needRefresh=!0}},historyVersions:{get:function(){return this._historyVersions}},visible:{get:function(){return this._visible},set:function(e){this._visible=e}},extrudeTileBoundingBox:{get:function(){return this._extrudeTileBoundingBox},set:function(e){this._extrudeTileBoundingBox=e}}}),se$y.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};var Ct$8=new s$1p;function tt$k(e,t,i,n){if(0!==n){var r=e.availabilityLevels,o=n%r==0?n-r:(n/r|0)*r,a=1<<n-o;return{level:o,x:t/a|0,y:i/a|0}}}function gt$8(e,t,i,n,r,o){if(!t$$(r.availabilityLevels))return{result:!1};for(var a,s=function(){delete r.availabilityPromiseCache[a]},l=r.availabilityTilesLoaded,u=r.availability,c=tt$k(r,t,i,n);t$$(c);){if(u.isTileAvailable(c.level,c.x,c.y)&&!l.isTileAvailable(c.level,c.x,c.y)){var h;if(!o&&(a=c.level+"-"+c.x+"-"+c.y,!t$$(h=r.availabilityPromiseCache[a]))){var d=new r$V({throttle:!0,throttleByServer:!0,type:V$_.TERRAIN});t$$(h=mt$e(e,c.x,c.y,c.level,r,d))&&(r.availabilityPromiseCache[a]=h,h.then(s))}return{result:!0,promise:h}}c=tt$k(r,c.x,c.y,c.level)}return{result:!1}}function Dt$7(e,t){var i=new Int8Array(e);for(var n=t.split("").map((function(e){return e.charCodeAt(0)})),r=0;r<n.length;r++)i[r]=i[r]^n[r];return i.buffer}se$y.prototype.getTileDataAvailable=function(e,t,i){if(t$$(this._availability)){if(i>this._availability._maximumLevel)return!1;if(this._availability.isTileAvailable(i,e,t))return!0;if(!this._hasMetadata)return!1;for(var n=this._layers,r=n.length,o=0;o<r;++o){if(gt$8(this,e,t,i,n[o],0===o).result)return}return!1}if(this._isSct&&0!==i){if(-1!==this._levels.indexOf(i)){var a=this._tilingScheme.tileXYToRectangle(e,t,i);return t$$(s$1p.intersection(this._boundsRadians,a,Ct$8))}return!1}},se$y.prototype.loadTileDataAvailability=function(e,t,i){if(!(!t$$(this._availability)||i>this._availability._maximumLevel||this._availability.isTileAvailable(i,e,t))&&this._hasMetadata)for(var n=this._layers,r=n.length,o=0;o<r;++o){var a=gt$8(this,e,t,i,n[o],0===o);if(t$$(a.promise))return a.promise}},se$y.prototype.saveLocalCache=function(){if(t$$(this._indexedDBSetting)&&!0===this._indexedDBSetting.isOpen&&t$$(this._indexedDBScheduler)){var e={tablename:this.tablename,dbname:this._indexedDBScheduler.dbname};Xe$d.scheduleTask(e,[])}},se$y._getAvailabilityTile=tt$k;var N$T={},B$K=new a$11,F$X=new a$11,G$S=new a$U,Q$V=new r$W;function W$12(e,t,i,n,r,o,a,s,l,u){var c=e+t;a$11.multiplyByScalar(n,Math.cos(c),B$K),a$11.multiplyByScalar(i,Math.sin(c),F$X),a$11.add(B$K,F$X,B$K);var h=Math.cos(e);h*=h;var d=Math.sin(e);d*=d;var f=o/Math.sqrt(a*h+r*d)/s;return a$U.fromAxisAngle(B$K,f,G$S),r$W.fromQuaternion(G$S,Q$V),r$W.multiplyByVector(Q$V,l,u),a$11.normalize(u,u),a$11.multiplyByScalar(u,s,u),u}var U$V=new a$11,Z$X=new a$11,b$1b=new a$11,C$V=new a$11;N$T.raisePositionsToHeight=function(e,t,i){for(var n=t.ellipsoid,r=t.height,o=t.extrudedHeight,a=i?e.length/3*2:e.length/3,s=new Float64Array(3*a),l=e.length,u=i?l:0,c=0;c<l;c+=3){var h=c+1,d=c+2,f=a$11.fromArray(e,c,U$V);n.scaleToGeodeticSurface(f,f);var p=a$11.clone(f,Z$X),_=n.geodeticSurfaceNormal(f,C$V),m=a$11.multiplyByScalar(_,r,b$1b);a$11.add(f,m,f),i&&(a$11.multiplyByScalar(_,o,m),a$11.add(p,m,p),s[c+u]=p.x,s[h+u]=p.y,s[d+u]=p.z),s[c]=f.x,s[h]=f.y,s[d]=f.z}return s};var D$_=new a$11,J$U=new a$11,K$O=new a$11;function m$P(e){if(!t$$((e=e$1Y(e,e$1Y.EMPTY_OBJECT)).geometry))throw new t$_("options.geometry is required.");this.geometry=e.geometry,this.modelMatrix=c$1a.clone(e$1Y(e.modelMatrix,c$1a.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=e$1Y(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}function t$R(){this.high=a$11.clone(a$11.ZERO),this.low=a$11.clone(a$11.ZERO)}N$T.computeEllipsePositions=function(e,t,i){var n=e.semiMinorAxis,r=e.semiMajorAxis,o=e.rotation,a=e.center,s=8*e.granularity,l=n*n,u=r*r,c=r*n,h=a$11.magnitude(a),d=a$11.normalize(a,D$_),f=a$11.cross(a$11.UNIT_Z,a,J$U);f=a$11.normalize(f,f);var p=a$11.cross(d,f,K$O),_=1+Math.ceil(n$1d.PI_OVER_TWO/s),m=n$1d.PI_OVER_TWO/(_-1),$=n$1d.PI_OVER_TWO-_*m;$<0&&(_-=Math.ceil(Math.abs($)/m));var g,y,v,x,b,S=t?new Array(3*(_*(_+2)*2)):void 0,w=0,C=U$V,T=Z$X,P=4*_*3,E=P-1,A=0,L=i?new Array(P):void 0;for(C=W$12($=n$1d.PI_OVER_TWO,o,p,f,l,c,u,h,d,C),t&&(S[w++]=C.x,S[w++]=C.y,S[w++]=C.z),i&&(L[E--]=C.z,L[E--]=C.y,L[E--]=C.x),$=n$1d.PI_OVER_TWO-m,g=1;g<_+1;++g){if(C=W$12($,o,p,f,l,c,u,h,d,C),T=W$12(Math.PI-$,o,p,f,l,c,u,h,d,T),t){for(S[w++]=C.x,S[w++]=C.y,S[w++]=C.z,v=2*g+2,y=1;y<v-1;++y)x=y/(v-1),b=a$11.lerp(C,T,x,b$1b),S[w++]=b.x,S[w++]=b.y,S[w++]=b.z;S[w++]=T.x,S[w++]=T.y,S[w++]=T.z}i&&(L[E--]=C.z,L[E--]=C.y,L[E--]=C.x,L[A++]=T.x,L[A++]=T.y,L[A++]=T.z),$=n$1d.PI_OVER_TWO-(g+1)*m}for(g=_;g>1;--g){if(C=W$12(-($=n$1d.PI_OVER_TWO-(g-1)*m),o,p,f,l,c,u,h,d,C),T=W$12($+Math.PI,o,p,f,l,c,u,h,d,T),t){for(S[w++]=C.x,S[w++]=C.y,S[w++]=C.z,v=2*(g-1)+2,y=1;y<v-1;++y)x=y/(v-1),b=a$11.lerp(C,T,x,b$1b),S[w++]=b.x,S[w++]=b.y,S[w++]=b.z;S[w++]=T.x,S[w++]=T.y,S[w++]=T.z}i&&(L[E--]=C.z,L[E--]=C.y,L[E--]=C.x,L[A++]=T.x,L[A++]=T.y,L[A++]=T.z)}C=W$12(-($=n$1d.PI_OVER_TWO),o,p,f,l,c,u,h,d,C);var M={};return t&&(S[w++]=C.x,S[w++]=C.y,S[w++]=C.z,M.positions=S,M.numPts=_),i&&(L[E--]=C.z,L[E--]=C.y,L[E--]=C.x,M.outerPositions=L),M},t$R.encode=function(e,t){var i;return n$1e.typeOf.number("value",e),t$$(t)||(t={high:0,low:0}),e>=0?(i=65536*Math.floor(e/65536),t.high=i,t.low=e-i):(i=65536*Math.floor(-e/65536),t.high=-i,t.low=e+i),t};var h$Z={high:0,low:0};t$R.fromCartesian=function(e,t){n$1e.typeOf.object("cartesian",e),t$$(t)||(t=new t$R);var i=t.high,n=t.low;return t$R.encode(e.x,h$Z),i.x=h$Z.high,n.x=h$Z.low,t$R.encode(e.y,h$Z),i.y=h$Z.high,n.y=h$Z.low,t$R.encode(e.z,h$Z),i.z=h$Z.high,n.z=h$Z.low,t};var f$Y=new t$R;t$R.writeElements=function(e,t,i){n$1e.defined("cartesianArray",t),n$1e.typeOf.number("index",i),n$1e.typeOf.number.greaterThanOrEquals("index",i,0),t$R.fromCartesian(e,f$Y);var n=f$Y.high,r=f$Y.low;t[i]=n.x,t[i+1]=n.y,t[i+2]=n.z,t[i+3]=r.x,t[i+4]=r.y,t[i+5]=r.z};var y$V={calculateACMR:function(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).indices,i=e.maximumIndex,n=e$1Y(e.cacheSize,24);if(!t$$(t))throw new t$_("indices is required.");var r=t.length;if(r<3||r%3!=0)throw new t$_("indices length must be a multiple of three.");if(i<=0)throw new t$_("maximumIndex must be greater than zero.");if(n<3)throw new t$_("cacheSize must be greater than two.");if(!t$$(i)){i=0;for(var o=0,a=t[o];o<r;)a>i&&(i=a),a=t[++o]}for(var s=[],l=0;l<i+1;l++)s[l]=0;for(var u=n+1,c=0;c<r;++c)u-s[t[c]]>n&&(s[t[c]]=u,++u);return(u-n+1)/(r/3)}};y$V.tipsify=function(e){var t,i=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).indices,n=e.maximumIndex,r=e$1Y(e.cacheSize,24);function o(e,i,n,r,o,a,s){for(var l,u=-1,c=-1,h=0;h<n.length;){var d=n[h];r[d].numLiveTriangles&&(l=0,o-r[d].timeStamp+2*r[d].numLiveTriangles<=i&&(l=o-r[d].timeStamp),(l>c||-1===c)&&(c=l,u=d)),++h}return-1===u?function(e,i,n,r){for(;i.length>=1;){var o=i[i.length-1];if(i.splice(i.length-1,1),e[o].numLiveTriangles>0)return o}for(;t<r;){if(e[t].numLiveTriangles>0)return++t-1;++t}return-1}(r,a,0,s):u}if(!t$$(i))throw new t$_("indices is required.");var a=i.length;if(a<3||a%3!=0)throw new t$_("indices length must be a multiple of three.");if(n<=0)throw new t$_("maximumIndex must be greater than zero.");if(r<3)throw new t$_("cacheSize must be greater than two.");var s=0,l=0,u=i[l],c=a;if(t$$(n))s=n+1;else{for(;l<c;)u>s&&(s=u),u=i[++l];if(-1===s)return 0;++s}var h,d=[];for(h=0;h<s;h++)d[h]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};l=0;for(var f=0;l<c;)d[i[l]].vertexTriangles.push(f),++d[i[l]].numLiveTriangles,d[i[l+1]].vertexTriangles.push(f),++d[i[l+1]].numLiveTriangles,d[i[l+2]].vertexTriangles.push(f),++d[i[l+2]].numLiveTriangles,++f,l+=3;var p=0,_=r+1;t=1;var m,$,g,y,v=[],x=[],b=0,S=[],w=a/3,C=[];for(h=0;h<w;h++)C[h]=!1;for(;-1!==p;){v=[],y=($=d[p]).vertexTriangles.length;for(var T=0;T<y;++T)if(!C[f=$.vertexTriangles[T]]){C[f]=!0,l=f+f+f;for(var P=0;P<3;++P)g=i[l],v.push(g),x.push(g),S[b]=g,++b,--(m=d[g]).numLiveTriangles,_-m.timeStamp>r&&(m.timeStamp=_,++_),++l}p=o(0,r,v,d,_,x,s)}return S};var F$W={};function Nt$9(e,t,i,n,r){e[t++]=i,e[t++]=n,e[t++]=n,e[t++]=r,e[t++]=r,e[t]=i}function fe$t(e){for(var t=e.length,i=t/3*6,n=fe$u.createTypedArray(t,i),r=0,o=0;o<t;o+=3,r+=6)Nt$9(n,r,e[o],e[o+1],e[o+2]);return n}function ye$r(e){var t=e.length;if(t>=3){var i=6*(t-2),n=fe$u.createTypedArray(t,i);Nt$9(n,0,e[0],e[1],e[2]);for(var r=6,o=3;o<t;++o,r+=6)Nt$9(n,r,e[o-1],e[o],e[o-2]);return n}return new Uint16Array}function he$v(e){if(e.length>0){for(var t=e.length-1,i=6*(t-1),n=fe$u.createTypedArray(t,i),r=e[0],o=0,a=1;a<t;++a,o+=6)Nt$9(n,o,r,e[a],e[a+1]);return n}return new Uint16Array}function Wt$9(e){var t={};for(var i in e)if(e.hasOwnProperty(i)&&t$$(e[i])&&t$$(e[i].values)){var n=e[i];t[i]=new r$Q({componentDatatype:n.componentDatatype,componentsPerAttribute:n.componentsPerAttribute,normalize:n.normalize,values:[]})}return t}function de$w(e,t,i){for(var n in t)if(t.hasOwnProperty(n)&&t$$(t[n])&&t$$(t[n].values))for(var r=t[n],o=0;o<r.componentsPerAttribute;++o)e[n].values.push(r.values[i*r.componentsPerAttribute+o])}F$W.toWireframe=function(e){if(!t$$(e))throw new t$_("geometry is required.");var t=e.indices;if(t$$(t)){switch(e.primitiveType){case H$11.TRIANGLES:e.indices=fe$t(t);break;case H$11.TRIANGLE_STRIP:e.indices=ye$r(t);break;case H$11.TRIANGLE_FAN:e.indices=he$v(t);break;default:throw new t$_("geometry.primitiveType must be TRIANGLES, TRIANGLE_STRIP, or TRIANGLE_FAN.")}e.primitiveType=H$11.LINES}return e},F$W.createLineSegmentsForVectors=function(e,t,i){if(t=e$1Y(t,"normal"),!t$$(e))throw new t$_("geometry is required.");if(!t$$(e.attributes.position))throw new t$_("geometry.attributes.position is required.");if(!t$$(e.attributes[t]))throw new t$_("geometry.attributes must have an attribute with the same name as the attributeName parameter, "+t+".");i=e$1Y(i,1e4);for(var n=e.attributes.position.values,r=e.attributes[t].values,o=n.length,a=new Float64Array(2*o),s=0,l=0;l<o;l+=3)a[s++]=n[l],a[s++]=n[l+1],a[s++]=n[l+2],a[s++]=n[l]+r[l]*i,a[s++]=n[l+1]+r[l+1]*i,a[s++]=n[l+2]+r[l+2]*i;var u,c=e.boundingSphere;return t$$(c)&&(u=new c$19(c.center,c.radius+i)),new T$11({attributes:{position:new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:a})},primitiveType:H$11.LINES,boundingSphere:u})},F$W.createAttributeLocations=function(e){if(!t$$(e))throw new t$_("geometry is required.");var t,i=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],n=e.attributes,r={},o=0,a=i.length;for(t=0;t<a;++t){var s=i[t];t$$(n[s])&&(r[s]=o++)}for(var l in n)n.hasOwnProperty(l)&&!t$$(r[l])&&(r[l]=o++);return r},F$W.reorderForPreVertexCache=function(e){if(!t$$(e))throw new t$_("geometry is required.");var t=T$11.computeNumberOfVertices(e),i=e.indices;if(t$$(i)){for(var n=new Int32Array(t),r=0;r<t;r++)n[r]=-1;for(var o,a=i,s=a.length,l=fe$u.createTypedArray(t,s),u=0,c=0,h=0;u<s;)-1!==(o=n[a[u]])?l[c]=o:(n[o=a[u]]=h,l[c]=h,++h),++u,++c;e.indices=l;var d=e.attributes;for(var f in d)if(d.hasOwnProperty(f)&&t$$(d[f])&&t$$(d[f].values)){for(var p=d[f],_=p.values,m=0,$=p.componentsPerAttribute,g=C$12.createTypedArray(p.componentDatatype,h*$);m<t;){var y=n[m];if(-1!==y)for(var v=0;v<$;v++)g[$*y+v]=_[$*m+v];++m}p.values=g}}return e},F$W.reorderForPostVertexCache=function(e,t){if(!t$$(e))throw new t$_("geometry is required.");var i=e.indices;if(e.primitiveType===H$11.TRIANGLES&&t$$(i)){for(var n=i.length,r=0,o=0;o<n;o++)i[o]>r&&(r=i[o]);e.indices=y$V.tipsify({indices:i,maximumIndex:r,cacheSize:t})}return e},F$W.fitToUnsignedShortIndices=function(e){if(!t$$(e))throw new t$_("geometry is required.");if(t$$(e.indices)&&e.primitiveType!==H$11.TRIANGLES&&e.primitiveType!==H$11.LINES&&e.primitiveType!==H$11.POINTS)throw new t$_("geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS.");var t=[],i=T$11.computeNumberOfVertices(e);if(t$$(e.indices)&&i>=n$1d.SIXTY_FOUR_KILOBYTES){var n,r=[],o=[],a=0,s=Wt$9(e.attributes),l=e.indices,u=l.length;e.primitiveType===H$11.TRIANGLES?n=3:e.primitiveType===H$11.LINES?n=2:e.primitiveType===H$11.POINTS&&(n=1);for(var c=0;c<u;c+=n){for(var h=0;h<n;++h){var d=l[c+h],f=r[d];t$$(f)||(f=a++,r[d]=f,de$w(s,e.attributes,d)),o.push(f)}a+n>=n$1d.SIXTY_FOUR_KILOBYTES&&(t.push(new T$11({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),r=[],o=[],a=0,s=Wt$9(e.attributes))}0!==o.length&&t.push(new T$11({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var Yt$9=new a$11,be$v=new i$1g;F$W.projectTo2D=function(e,t,i,n,r){if(!t$$(e))throw new t$_("geometry is required.");if(!t$$(t))throw new t$_("attributeName is required.");if(!t$$(i))throw new t$_("attributeName3D is required.");if(!t$$(n))throw new t$_("attributeName2D is required.");if(!t$$(e.attributes[t]))throw new t$_("geometry must have attribute matching the attributeName argument: "+t+".");if(e.attributes[t].componentDatatype!==C$12.DOUBLE)throw new t$_("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");for(var o=e.attributes[t],a=(r=t$$(r)?r:new s$1q).ellipsoid,s=o.values,l=new Float64Array(s.length),u=0,c=0;c<s.length;c+=3){var h=a$11.fromArray(s,c,Yt$9),d=a.cartesianToCartographic(h,be$v);if(!t$$(d))throw new t$_("Could not project point ("+h.x+", "+h.y+", "+h.z+") to 2D.");var f=r.project(d,Yt$9);l[u++]=f.x,l[u++]=f.y,l[u++]=f.z}return e.attributes[i]=o,e.attributes[n]=new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:l}),delete e.attributes[t],e};var Dt$6={high:0,low:0};F$W.encodeAttribute=function(e,t,i,n){if(!t$$(e))throw new t$_("geometry is required.");if(!t$$(t))throw new t$_("attributeName is required.");if(!t$$(i))throw new t$_("attributeHighName is required.");if(!t$$(n))throw new t$_("attributeLowName is required.");if(!t$$(e.attributes[t]))throw new t$_("geometry must have attribute matching the attributeName argument: "+t+".");if(e.attributes[t].componentDatatype!==C$12.DOUBLE)throw new t$_("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");for(var r=e.attributes[t],o=r.values,a=o.length,s=new Float32Array(a),l=new Float32Array(a),u=0;u<a;++u)t$R.encode(o[u],Dt$6),s[u]=Dt$6.high,l[u]=Dt$6.low;var c=r.componentsPerAttribute;return e.attributes[i]=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:c,values:s}),e.attributes[n]=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:c,values:l}),delete e.attributes[t],e};var j$_=new a$11;function zt$9(e,t){if(t$$(t))for(var i=t.values,n=i.length,r=0;r<n;r+=3)a$11.unpack(i,r,j$_),c$1a.multiplyByPoint(e,j$_,j$_),a$11.pack(j$_,i,r)}function Gt$9(e,t){if(t$$(t))for(var i=t.values,n=i.length,r=0;r<n;r+=3)a$11.unpack(i,r,j$_),r$W.multiplyByVector(e,j$_,j$_),j$_=a$11.normalize(j$_,j$_),a$11.pack(j$_,i,r)}var xt$b=new c$1a,It$9=new r$W;function we$p(e,t){var i,n=e.length,r={},o=e[0][t].attributes;for(i in o)if(o.hasOwnProperty(i)&&t$$(o[i])&&t$$(o[i].values)){for(var a=o[i],s=a.values.length,l=!0,u=1;u<n;++u){var c=e[u][t].attributes[i];if(!t$$(c)||a.componentDatatype!==c.componentDatatype||a.componentsPerAttribute!==c.componentsPerAttribute||a.normalize!==c.normalize){l=!1;break}s+=c.values.length}l&&(r[i]=new r$Q({componentDatatype:a.componentDatatype,componentsPerAttribute:a.componentsPerAttribute,normalize:a.normalize,values:C$12.createTypedArray(a.componentDatatype,s)}),a.isInstanceAttribute&&(r[i].isInstanceAttribute=!0))}return r}F$W.transformToWorldCoordinates=function(e){if(!t$$(e))throw new t$_("instance is required.");var t=e.modelMatrix;if(c$1a.equals(t,c$1a.IDENTITY))return e;var i=e.geometry.attributes;zt$9(t,i.position),zt$9(t,i.prevPosition),zt$9(t,i.nextPosition),(t$$(i.normal)||t$$(i.tangent)||t$$(i.bitangent))&&(c$1a.inverse(t,xt$b),c$1a.transpose(xt$b,xt$b),c$1a.getRotation(xt$b,It$9),Gt$9(It$9,i.normal),Gt$9(It$9,i.tangent),Gt$9(It$9,i.bitangent));var n=e.geometry.boundingSphere;return t$$(n)&&(e.geometry.boundingSphere=c$19.transform(n,t,n)),e.modelMatrix=c$1a.clone(c$1a.IDENTITY),e};var ge$p=new a$11;function qt$8(e,t){var i,n,r,o,a=e.length,s=e[0].modelMatrix,l=t$$(e[0][t].indices),u=e[0][t].primitiveType;for(n=1;n<a;++n){if(!c$1a.equals(e[n].modelMatrix,s))throw new t$_("All instances must have the same modelMatrix.");if(t$$(e[n][t].indices)!==l)throw new t$_("All instance geometries must have an indices or not have one.");if(e[n][t].primitiveType!==u)throw new t$_("All instance geometries must have the same primitiveType.")}var c,h,d,f,p=we$p(e,t);for(i in p)if(p.hasOwnProperty(i))for(c=p[i].values,o=0,n=0;n<a;++n)for(d=(h=e[n][t].attributes[i].values).length,r=0;r<d;++r)c[o++]=h[r];if(l){var _=0;for(n=0;n<a;++n)_+=e[n][t].indices.length;var m=T$11.computeNumberOfVertices(new T$11({attributes:p,primitiveType:H$11.POINTS})),$=fe$u.createTypedArray(m,_),g=0,y=0;for(n=0;n<a;++n){var v=e[n][t].indices,x=v.length;for(o=0;o<x;++o)$[g++]=y+v[o];y+=T$11.computeNumberOfVertices(e[n][t])}f=$}var b,S=new a$11,w=0;for(n=0;n<a;++n){if(!t$$(b=e[n][t].boundingSphere)){S=void 0;break}a$11.add(b.center,S,S)}if(t$$(S))for(a$11.divideByScalar(S,a,S),n=0;n<a;++n){b=e[n][t].boundingSphere;var C=a$11.magnitude(a$11.subtract(b.center,S,ge$p))+b.radius;C>w&&(w=C)}return new T$11({attributes:p,indices:f,primitiveType:u,boundingSphere:t$$(S)?new c$19(S,w):void 0})}F$W.combineInstances=function(e){if(!t$$(e)||e.length<1)throw new t$_("instances is required and must have length greater than zero.");for(var t=[],i=[],n=e.length,r=0;r<n;++r){var o=e[r];t$$(o.geometry)?t.push(o):t$$(o.westHemisphereGeometry)&&t$$(o.eastHemisphereGeometry)&&i.push(o)}var a=[];return t.length>0&&a.push(qt$8(t,"geometry")),i.length>0&&(a.push(qt$8(i,"westHemisphereGeometry")),a.push(qt$8(i,"eastHemisphereGeometry"))),a};var H$V=new a$11,ft$c=new a$11,st$e=new a$11,ut$f=new a$11;F$W.computeNormal=function(e){if(!t$$(e))throw new t$_("geometry is required.");if(!t$$(e.attributes.position)||!t$$(e.attributes.position.values))throw new t$_("geometry.attributes.position.values is required.");if(!t$$(e.indices))throw new t$_("geometry.indices is required.");if(e.indices.length<2||e.indices.length%3!=0)throw new t$_("geometry.indices length must be greater than 0 and be a multiple of 3.");if(e.primitiveType!==H$11.TRIANGLES)throw new t$_("geometry.primitiveType must be PrimitiveType.TRIANGLES.");var t,i=e.indices,n=e.attributes,r=n.position.values,o=n.position.values.length/3,a=i.length,s=new Array(o),l=new Array(a/3),u=new Array(a);for(t=0;t<o;t++)s[t]={indexOffset:0,count:0,currentCount:0};var c=0;for(t=0;t<a;t+=3){var h=i[t],d=i[t+1],f=i[t+2],p=3*h,_=3*d,m=3*f;ft$c.x=r[p],ft$c.y=r[p+1],ft$c.z=r[p+2],st$e.x=r[_],st$e.y=r[_+1],st$e.z=r[_+2],ut$f.x=r[m],ut$f.y=r[m+1],ut$f.z=r[m+2],s[h].count++,s[d].count++,s[f].count++,a$11.subtract(st$e,ft$c,st$e),a$11.subtract(ut$f,ft$c,ut$f),l[c]=a$11.cross(st$e,ut$f,new a$11),c++}var $,g=0;for(t=0;t<o;t++)s[t].indexOffset+=g,g+=s[t].count;for(c=0,t=0;t<a;t+=3){var y=($=s[i[t]]).indexOffset+$.currentCount;u[y]=c,$.currentCount++,u[y=($=s[i[t+1]]).indexOffset+$.currentCount]=c,$.currentCount++,u[y=($=s[i[t+2]]).indexOffset+$.currentCount]=c,$.currentCount++,c++}var v=new Float32Array(3*o);for(t=0;t<o;t++){var x=3*t;if($=s[t],a$11.clone(a$11.ZERO,H$V),$.count>0){for(c=0;c<$.count;c++)a$11.add(H$V,l[u[$.indexOffset+c]],H$V);a$11.equalsEpsilon(a$11.ZERO,H$V,n$1d.EPSILON10)&&a$11.clone(l[u[$.indexOffset]],H$V)}a$11.equalsEpsilon(a$11.ZERO,H$V,n$1d.EPSILON10)&&(H$V.z=1),a$11.normalize(H$V,H$V),v[x]=H$V.x,v[x+1]=H$V.y,v[x+2]=H$V.z}return e.attributes.normal=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:v}),e};var Ae$l=new a$11,jt$a=new a$11,Ne$j=new a$11;F$W.computeTangentAndBitangent=function(e){if(!t$$(e))throw new t$_("geometry is required.");var t=e.attributes,i=e.indices;if(!t$$(t.position)||!t$$(t.position.values))throw new t$_("geometry.attributes.position.values is required.");if(!t$$(t.normal)||!t$$(t.normal.values))throw new t$_("geometry.attributes.normal.values is required.");if(!t$$(t.st)||!t$$(t.st.values))throw new t$_("geometry.attributes.st.values is required.");if(!t$$(i))throw new t$_("geometry.indices is required.");if(i.length<2||i.length%3!=0)throw new t$_("geometry.indices length must be greater than 0 and be a multiple of 3.");if(e.primitiveType!==H$11.TRIANGLES)throw new t$_("geometry.primitiveType must be PrimitiveType.TRIANGLES.");var n,r,o,a,s=e.attributes.position.values,l=e.attributes.normal.values,u=e.attributes.st.values,c=e.attributes.position.values.length/3,h=i.length,d=new Array(3*c);for(n=0;n<d.length;n++)d[n]=0;for(n=0;n<h;n+=3){var f=i[n],p=i[n+1],_=i[n+2];o=3*p,a=3*_;var m=2*f,$=2*p,g=2*_,y=s[r=3*f],v=s[r+1],x=s[r+2],b=u[m],S=u[m+1],w=u[$+1]-S,C=u[g+1]-S,T=1/((u[$]-b)*C-(u[g]-b)*w),P=(C*(s[o]-y)-w*(s[a]-y))*T,E=(C*(s[o+1]-v)-w*(s[a+1]-v))*T,A=(C*(s[o+2]-x)-w*(s[a+2]-x))*T;d[r]+=P,d[r+1]+=E,d[r+2]+=A,d[o]+=P,d[o+1]+=E,d[o+2]+=A,d[a]+=P,d[a+1]+=E,d[a+2]+=A}var L=new Float32Array(3*c),M=new Float32Array(3*c);for(n=0;n<c;n++){o=(r=3*n)+1,a=r+2;var I=a$11.fromArray(l,r,Ae$l),O=a$11.fromArray(d,r,Ne$j),D=a$11.dot(I,O);a$11.multiplyByScalar(I,D,jt$a),a$11.normalize(a$11.subtract(O,jt$a,O),O),L[r]=O.x,L[o]=O.y,L[a]=O.z,a$11.normalize(a$11.cross(I,O,O),O),M[r]=O.x,M[o]=O.y,M[a]=O.z}return e.attributes.tangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:L}),e.attributes.bitangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:M}),e};var yt$7=new r$T,X$N=new a$11,Xt$8=new a$11,Ut$8=new a$11,Pt$7=new r$T;function xe$x(e){if(t$$(e.indices))return e;var t=T$11.computeNumberOfVertices(e);if(t<3)throw new t$_("The number of vertices must be at least three.");if(t%3!=0)throw new t$_("The number of vertices must be a multiple of three.");for(var i=fe$u.createTypedArray(t,t),n=0;n<t;++n)i[n]=n;return e.indices=i,e}function Ie$o(e){var t=T$11.computeNumberOfVertices(e);if(t<3)throw new t$_("The number of vertices must be at least three.");var i=fe$u.createTypedArray(t,3*(t-2));i[0]=1,i[1]=0,i[2]=2;for(var n=3,r=3;r<t;++r)i[n++]=r-1,i[n++]=0,i[n++]=r;return e.indices=i,e.primitiveType=H$11.TRIANGLES,e}function Pe$n(e){var t=T$11.computeNumberOfVertices(e);if(t<3)throw new t$_("The number of vertices must be at least 3.");var i=fe$u.createTypedArray(t,3*(t-2));i[0]=0,i[1]=1,i[2]=2,t>3&&(i[3]=0,i[4]=2,i[5]=3);for(var n=6,r=3;r<t-1;r+=2)i[n++]=r,i[n++]=r-1,i[n++]=r+1,r+2<t&&(i[n++]=r,i[n++]=r+1,i[n++]=r+2);return e.indices=i,e.primitiveType=H$11.TRIANGLES,e}function Se$j(e){if(t$$(e.indices))return e;var t=T$11.computeNumberOfVertices(e);if(t<2)throw new t$_("The number of vertices must be at least two.");if(t%2!=0)throw new t$_("The number of vertices must be a multiple of 2.");for(var i=fe$u.createTypedArray(t,t),n=0;n<t;++n)i[n]=n;return e.indices=i,e}function Le$i(e){var t=T$11.computeNumberOfVertices(e);if(t<2)throw new t$_("The number of vertices must be at least two.");var i=fe$u.createTypedArray(t,2*(t-1));i[0]=0,i[1]=1;for(var n=2,r=2;r<t;++r)i[n++]=r-1,i[n++]=r;return e.indices=i,e.primitiveType=H$11.LINES,e}function Te$u(e){var t=T$11.computeNumberOfVertices(e);if(t<2)throw new t$_("The number of vertices must be at least two.");var i=fe$u.createTypedArray(t,2*t);i[0]=0,i[1]=1;for(var n=2,r=2;r<t;++r)i[n++]=r-1,i[n++]=r;return i[n++]=t-1,i[n]=0,e.indices=i,e.primitiveType=H$11.LINES,e}function Ee$r(e){switch(e.primitiveType){case H$11.TRIANGLE_FAN:return Ie$o(e);case H$11.TRIANGLE_STRIP:return Pe$n(e);case H$11.TRIANGLES:return xe$x(e);case H$11.LINE_STRIP:return Le$i(e);case H$11.LINE_LOOP:return Te$u(e);case H$11.LINES:return Se$j(e)}return e}function et$i(e,t){Math.abs(e.y)<n$1d.EPSILON6&&(e.y=t?-n$1d.EPSILON6:n$1d.EPSILON6)}function Oe$p(e,t,i){if(0!==e.y&&0!==t.y&&0!==i.y)return et$i(e,e.y<0),et$i(t,t.y<0),void et$i(i,i.y<0);var n=Math.abs(e.y),r=Math.abs(t.y),o=Math.abs(i.y),a=(n>r?n>o?n$1d.sign(e.y):n$1d.sign(i.y):r>o?n$1d.sign(t.y):n$1d.sign(i.y))<0;et$i(e,a),et$i(t,a),et$i(i,a)}F$W.compressVertices=function(e){if(!t$$(e))throw new t$_("geometry is required.");var t,i,n=e.attributes.extrudeDirection;if(t$$(n)){var r=n.values;i=r.length/3;var o=new Float32Array(2*i),a=0;for(t=0;t<i;++t)a$11.fromArray(r,3*t,X$N),a$11.equals(X$N,a$11.ZERO)?a+=2:(Pt$7=r$P.octEncodeInRange(X$N,65535,Pt$7),o[a++]=Pt$7.x,o[a++]=Pt$7.y);return e.attributes.compressedAttributes=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:2,values:o}),delete e.attributes.extrudeDirection,e}var s=e.attributes.normal,l=e.attributes.st,u=t$$(s),c=t$$(l);if(!u&&!c)return e;var h,d,f,p,_=e.attributes.tangent,m=e.attributes.bitangent,$=t$$(_),g=t$$(m);u&&(h=s.values),c&&(d=l.values),$&&(f=_.values),g&&(p=m.values);var y=i=(u?h.length:d.length)/(u?3:2),v=c&&u?2:1;v+=$||g?1:0;var x=new Float32Array(y*=v),b=0;for(t=0;t<i;++t){c&&(r$T.fromArray(d,2*t,yt$7),x[b++]=r$P.compressTextureCoordinates(yt$7));var S=3*t;u&&t$$(f)&&t$$(p)?(a$11.fromArray(h,S,X$N),a$11.fromArray(f,S,Xt$8),a$11.fromArray(p,S,Ut$8),r$P.octPack(X$N,Xt$8,Ut$8,yt$7),x[b++]=yt$7.x,x[b++]=yt$7.y):(u&&(a$11.fromArray(h,S,X$N),x[b++]=r$P.octEncodeFloat(X$N)),$&&(a$11.fromArray(f,S,X$N),x[b++]=r$P.octEncodeFloat(X$N)),g&&(a$11.fromArray(p,S,X$N),x[b++]=r$P.octEncodeFloat(X$N)))}return e.attributes.compressedAttributes=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:v,values:x}),u&&delete e.attributes.normal,c&&delete e.attributes.st,g&&delete e.attributes.bitangent,$&&delete e.attributes.tangent,e};var Qt$a=new a$11;function Z$W(e,t,i,n){a$11.add(e,a$11.multiplyByScalar(a$11.subtract(t,e,Qt$a),e.y/(e.y-t.y),Qt$a),i),a$11.clone(i,n),et$i(i,!0),et$i(n,!1)}var rt$j=new a$11,it$g=new a$11,nt$h=new a$11,at$f=new a$11,Rt$a={positions:new Array(7),indices:new Array(9)};function De$s(e,t,i){if(!(e.x>=0||t.x>=0||i.x>=0)){Oe$p(e,t,i);var n=e.y<0,r=t.y<0,o=i.y<0,a=0;a+=n?1:0,a+=r?1:0,a+=o?1:0;var s=Rt$a.indices;1===a?(s[1]=3,s[2]=4,s[5]=6,s[7]=6,s[8]=5,n?(Z$W(e,t,rt$j,nt$h),Z$W(e,i,it$g,at$f),s[0]=0,s[3]=1,s[4]=2,s[6]=1):r?(Z$W(t,i,rt$j,nt$h),Z$W(t,e,it$g,at$f),s[0]=1,s[3]=2,s[4]=0,s[6]=2):o&&(Z$W(i,e,rt$j,nt$h),Z$W(i,t,it$g,at$f),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,n?r?o||(Z$W(i,e,rt$j,nt$h),Z$W(i,t,it$g,at$f),s[0]=0,s[1]=1,s[3]=0,s[6]=2):(Z$W(t,i,rt$j,nt$h),Z$W(t,e,it$g,at$f),s[0]=2,s[1]=0,s[3]=2,s[6]=1):(Z$W(e,t,rt$j,nt$h),Z$W(e,i,it$g,at$f),s[0]=1,s[1]=2,s[3]=1,s[6]=0));var l=Rt$a.positions;return l[0]=e,l[1]=t,l[2]=i,l.length=3,(1===a||2===a)&&(l[3]=rt$j,l[4]=it$g,l[5]=nt$h,l[6]=at$f,l.length=7),Rt$a}}function $t$9(e,t){var i=e.attributes;if(0!==i.position.values.length){for(var n in i)if(i.hasOwnProperty(n)&&t$$(i[n])&&t$$(i[n].values)){var r=i[n];r.values=C$12.createTypedArray(r.componentDatatype,r.values)}var o=T$11.computeNumberOfVertices(e);return e.indices=fe$u.createTypedArray(o,e.indices),t&&(e.boundingSphere=c$19.fromVertices(i.position.values)),e}}function pt$d(e){var t=e.attributes,i={};for(var n in t)if(t.hasOwnProperty(n)&&t$$(t[n])&&t$$(t[n].values)){var r=t[n];i[n]=new r$Q({componentDatatype:r.componentDatatype,componentsPerAttribute:r.componentsPerAttribute,normalize:r.normalize,values:[]})}return new T$11({attributes:i,indices:[],primitiveType:e.primitiveType})}function Bt$b(e,t,i){var n=t$$(e.geometry.boundingSphere);t=$t$9(t,n),t$$(i=$t$9(i,n))&&!t$$(t)?e.geometry=i:!t$$(i)&&t$$(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=i,e.geometry=void 0)}function Ct$7(e,t){var i=new e,n=new e,r=new e;return function(o,a,s,l,u,c,h,d){var f=e.fromArray(u,o*t,i),p=e.fromArray(u,a*t,n),_=e.fromArray(u,s*t,r);e.multiplyByScalar(f,l.x,f),e.multiplyByScalar(p,l.y,p),e.multiplyByScalar(_,l.z,_);var m=e.add(f,p,f);e.add(m,_,m),d&&e.normalize(m,m),e.pack(m,c,h*t)}}var ze$g=Ct$7(a$10,4),St$9=Ct$7(a$11,3),Kt$9=Ct$7(r$T,2),Ge$g=function(e,t,i,n,r,o,a){var s=r[e]*n.x,l=r[t]*n.y,u=r[i]*n.z;o[a]=s+l+u>n$1d.EPSILON6?1:0},ht$c=new a$11,Ft$7=new a$11,_t$a=new a$11,qe$h=new a$11;function Lt$b(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){if(t$$(o)||t$$(a)||t$$(s)||t$$(l)||t$$(u)||0!==f){var m=P$V(n,a$11.fromArray(r,3*e,ht$c),a$11.fromArray(r,3*t,Ft$7),a$11.fromArray(r,3*i,_t$a),qe$h);if(t$$(o)&&St$9(e,t,i,m,o,h.normal.values,_,!0),t$$(u)){var $,g=a$11.fromArray(u,3*e,ht$c),y=a$11.fromArray(u,3*t,Ft$7),v=a$11.fromArray(u,3*i,_t$a);a$11.multiplyByScalar(g,m.x,g),a$11.multiplyByScalar(y,m.y,y),a$11.multiplyByScalar(v,m.z,v),a$11.equals(g,a$11.ZERO)&&a$11.equals(y,a$11.ZERO)&&a$11.equals(v,a$11.ZERO)?(($=ht$c).x=0,$.y=0,$.z=0):($=a$11.add(g,y,g),a$11.add($,v,$),a$11.normalize($,$)),a$11.pack($,h.extrudeDirection.values,3*_)}if(t$$(c)&&Ge$g(e,t,i,m,c,h.applyOffset.values,_),t$$(a)&&St$9(e,t,i,m,a,h.tangent.values,_,!0),t$$(s)&&St$9(e,t,i,m,s,h.bitangent.values,_,!0),t$$(l)&&Kt$9(e,t,i,m,l,h.st.values,_),f>0)for(var x=0;x<f;x++){var b=d[x];Re$l(e,t,i,m,_,p[b],h[b])}}}function Re$l(e,t,i,n,r,o,a){var s=o.componentsPerAttribute,l=o.values,u=a.values;switch(s){case 4:ze$g(e,t,i,n,l,u,r,!1);break;case 3:St$9(e,t,i,n,l,u,r,!1);break;case 2:Kt$9(e,t,i,n,l,u,r,!1);break;default:u[r]=l[e]*n.x+l[t]*n.y+l[i]*n.z}}function $$T(e,t,i,n,r,o){var a=e.position.values.length/3;if(-1!==r){var s=n[r],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,o.y,o.z),t.push(a),a}var Be$l={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function Jt$a(e){var t=e.geometry,i=t.attributes,n=i.position.values,r=t$$(i.normal)?i.normal.values:void 0,o=t$$(i.bitangent)?i.bitangent.values:void 0,a=t$$(i.tangent)?i.tangent.values:void 0,s=t$$(i.st)?i.st.values:void 0,l=t$$(i.extrudeDirection)?i.extrudeDirection.values:void 0,u=t$$(i.applyOffset)?i.applyOffset.values:void 0,c=t.indices,h=[];for(var d in i)i.hasOwnProperty(d)&&!Be$l[d]&&t$$(i[d])&&h.push(d);var f,p,_,m,$=h.length,g=pt$d(t),y=pt$d(t),v=[];v.length=n.length/3;var x=[];for(x.length=n.length/3,m=0;m<v.length;++m)v[m]=-1,x[m]=-1;var b=c.length;for(m=0;m<b;m+=3){var S=c[m],w=c[m+1],C=c[m+2],T=a$11.fromArray(n,3*S),P=a$11.fromArray(n,3*w),E=a$11.fromArray(n,3*C),A=De$s(T,P,E);if(t$$(A)&&A.positions.length>3)for(var L=A.positions,M=A.indices,I=M.length,O=0;O<I;++O){var D=M[O],R=L[D];R.y<0?(f=y.attributes,p=y.indices,_=v):(f=g.attributes,p=g.indices,_=x),Lt$b(S,w,C,R,n,r,a,o,s,l,u,f,h,$,i,$$T(f,p,_,c,D<3?m+D:-1,R))}else t$$(A)&&(T=A.positions[0],P=A.positions[1],E=A.positions[2]),T.y<0?(f=y.attributes,p=y.indices,_=v):(f=g.attributes,p=g.indices,_=x),Lt$b(S,w,C,T,n,r,a,o,s,l,u,f,h,$,i,$$T(f,p,_,c,m,T)),Lt$b(S,w,C,P,n,r,a,o,s,l,u,f,h,$,i,$$T(f,p,_,c,m+1,P)),Lt$b(S,w,C,E,n,r,a,o,s,l,u,f,h,$,i,$$T(f,p,_,c,m+2,E))}Bt$b(e,y,g)}var te$B=n$17.fromPointNormal(a$11.ZERO,a$11.UNIT_Y),Ce$q=new a$11,Fe$f=new a$11;function lt$i(e,t,i,n,r,o,a){if(t$$(a)){var s=a$11.fromArray(n,3*e,ht$c);a$11.equalsEpsilon(s,i,n$1d.EPSILON10)?o.applyOffset.values[r]=a[e]:o.applyOffset.values[r]=a[t]}}function ee$A(e){var t,i=e.geometry,n=i.attributes,r=n.position.values,o=t$$(n.applyOffset)?n.applyOffset.values:void 0,a=i.indices,s=pt$d(i),l=pt$d(i),u=a.length,c=[];c.length=r.length/3;var h=[];for(h.length=r.length/3,t=0;t<c.length;++t)c[t]=-1,h[t]=-1;for(t=0;t<u;t+=2){var d=a[t],f=a[t+1],p=a$11.fromArray(r,3*d,ht$c),_=a$11.fromArray(r,3*f,Ft$7);Math.abs(p.y)<n$1d.EPSILON6&&(p.y<0?p.y=-n$1d.EPSILON6:p.y=n$1d.EPSILON6),Math.abs(_.y)<n$1d.EPSILON6&&(_.y<0?_.y=-n$1d.EPSILON6:_.y=n$1d.EPSILON6);var m=s.attributes,$=s.indices,g=h,y=l.attributes,v=l.indices,x=c,b=h$1b.lineSegmentPlane(p,_,te$B,_t$a);if(t$$(b)){var S=a$11.multiplyByScalar(a$11.UNIT_Y,5*n$1d.EPSILON9,Ce$q);p.y<0&&(a$11.negate(S,S),m=l.attributes,$=l.indices,g=c,y=s.attributes,v=s.indices,x=h);var w=a$11.add(b,S,Fe$f);lt$i(d,f,p,r,$$T(m,$,g,a,t,p),m,o),lt$i(d,f,w,r,$$T(m,$,g,a,-1,w),m,o),a$11.negate(S,S),a$11.add(b,S,w),lt$i(d,f,w,r,$$T(y,v,x,a,-1,w),y,o),lt$i(d,f,_,r,$$T(y,v,x,a,t+1,_),y,o)}else{var C,T,P;p.y<0?(C=l.attributes,T=l.indices,P=c):(C=s.attributes,T=s.indices,P=h),lt$i(d,f,p,r,$$T(C,T,P,a,t,p),C,o),lt$i(d,f,_,r,$$T(C,T,P,a,t+1,_),C,o)}}Bt$b(e,l,s)}var re$D=new r$T,_e$p=new r$T,ie$E=new a$11,ne$z=new a$11,Mt$9=new a$11,Me$p=new a$11,Ve$j=new a$11,ke$d=new a$11,ae$C=new a$11,oe$y=new a$10;function se$x(e){for(var t=e.attributes,i=t.position.values,n=t.prevPosition.values,r=t.nextPosition.values,o=i.length,a=0;a<o;a+=3){var s=a$11.unpack(i,a,ie$E);if(!(s.x>0)){var l=a$11.unpack(n,a,ne$z);(s.y<0&&l.y>0||s.y>0&&l.y<0)&&(a-3>0?(n[a]=i[a-3],n[a+1]=i[a-2],n[a+2]=i[a-1]):a$11.pack(s,n,a));var u=a$11.unpack(r,a,Mt$9);(s.y<0&&u.y>0||s.y>0&&u.y<0)&&(a+3<o?(r[a]=i[a+3],r[a+1]=i[a+4],r[a+2]=i[a+5]):a$11.pack(s,r,a))}}}var He$f=5*n$1d.EPSILON9,Tt$9=n$1d.EPSILON6;function Ze$b(e){var t,i,n,r=e.geometry,o=r.attributes,a=o.position.values,s=o.prevPosition.values,l=o.nextPosition.values,u=o.expandAndWidth.values,c=t$$(o.st)?o.st.values:void 0,h=t$$(o.color)?o.color.values:void 0,d=t$$(o.dist)?o.dist.values:void 0,f=pt$d(r),p=pt$d(r),_=!1,m=a.length/3;for(t=0;t<m;t+=4){var $=t,g=t+2,y=a$11.fromArray(a,3*$,ie$E),v=a$11.fromArray(a,3*g,ne$z);if(Math.abs(y.y)<Tt$9)for(y.y=Tt$9*(v.y<0?-1:1),a[3*t+1]=y.y,a[3*(t+1)+1]=y.y,i=3*$;i<3*$+12;i+=3)s[i]=a[3*t],s[i+1]=a[3*t+1],s[i+2]=a[3*t+2];if(Math.abs(v.y)<Tt$9)for(v.y=Tt$9*(y.y<0?-1:1),a[3*(t+2)+1]=v.y,a[3*(t+3)+1]=v.y,i=3*$;i<3*$+12;i+=3)l[i]=a[3*(t+2)],l[i+1]=a[3*(t+2)+1],l[i+2]=a[3*(t+2)+2];var x=f.attributes,b=f.indices,S=p.attributes,w=p.indices,C=h$1b.lineSegmentPlane(y,v,te$B,Me$p);if(t$$(C)){_=!0;var T=a$11.multiplyByScalar(a$11.UNIT_Y,He$f,Ve$j);y.y<0&&(a$11.negate(T,T),x=p.attributes,b=p.indices,S=f.attributes,w=f.indices);var P=a$11.add(C,T,ke$d);x.position.values.push(y.x,y.y,y.z,y.x,y.y,y.z),x.position.values.push(P.x,P.y,P.z),x.position.values.push(P.x,P.y,P.z),x.prevPosition.values.push(s[3*$],s[3*$+1],s[3*$+2]),x.prevPosition.values.push(s[3*$+3],s[3*$+4],s[3*$+5]),x.prevPosition.values.push(y.x,y.y,y.z,y.x,y.y,y.z),x.nextPosition.values.push(P.x,P.y,P.z),x.nextPosition.values.push(P.x,P.y,P.z),x.nextPosition.values.push(P.x,P.y,P.z),x.nextPosition.values.push(P.x,P.y,P.z),a$11.negate(T,T),a$11.add(C,T,P),S.position.values.push(P.x,P.y,P.z),S.position.values.push(P.x,P.y,P.z),S.position.values.push(v.x,v.y,v.z,v.x,v.y,v.z),S.prevPosition.values.push(P.x,P.y,P.z),S.prevPosition.values.push(P.x,P.y,P.z),S.prevPosition.values.push(P.x,P.y,P.z),S.prevPosition.values.push(P.x,P.y,P.z),S.nextPosition.values.push(v.x,v.y,v.z,v.x,v.y,v.z),S.nextPosition.values.push(l[3*g],l[3*g+1],l[3*g+2]),S.nextPosition.values.push(l[3*g+3],l[3*g+4],l[3*g+5]);var E=r$T.fromArray(u,2*$,re$D),A=Math.abs(E.y);x.expandAndWidth.values.push(-1,A,1,A),x.expandAndWidth.values.push(-1,-A,1,-A),S.expandAndWidth.values.push(-1,A,1,A),S.expandAndWidth.values.push(-1,-A,1,-A);var L=a$11.magnitudeSquared(a$11.subtract(C,y,Mt$9));if(L/=a$11.magnitudeSquared(a$11.subtract(v,y,Mt$9)),t$$(h)){var M=a$10.fromArray(h,4*$,oe$y),I=a$10.fromArray(h,4*g,oe$y),O=n$1d.lerp(M.x,I.x,L),D=n$1d.lerp(M.y,I.y,L),R=n$1d.lerp(M.z,I.z,L),N=n$1d.lerp(M.w,I.w,L);for(i=4*$;i<4*$+8;++i)x.color.values.push(h[i]);for(x.color.values.push(O,D,R,N),x.color.values.push(O,D,R,N),S.color.values.push(O,D,R,N),S.color.values.push(O,D,R,N),i=4*g;i<4*g+8;++i)S.color.values.push(h[i])}if(t$$(c)){var F=r$T.fromArray(c,2*$,re$D),B=r$T.fromArray(c,2*(t+3),_e$p),z=n$1d.lerp(F.x,B.x,L);for(i=2*$;i<2*$+4;++i)x.st.values.push(c[i]);for(x.st.values.push(z,F.y),x.st.values.push(z,B.y),S.st.values.push(z,F.y),S.st.values.push(z,B.y),i=2*g;i<2*g+4;++i)S.st.values.push(c[i])}if(t$$(d)){var G=a$11.fromArray(d,3*$,ae$C),k=a$11.fromArray(d,3*g,ae$C),U=n$1d.lerp(G.x,k.x,L);for(i=3*$;i<3*$+6;++i)x.dist.values.push(d[i]);for(x.dist.values.push(U,G.y,G.z),x.dist.values.push(U,G.y,G.z),S.dist.values.push(U,k.y,k.z),S.dist.values.push(U,k.y,k.z),i=3*g;i<3*g+6;++i)S.dist.values.push(d[i])}n=x.position.values.length/3-4,b.push(n,n+2,n+1),b.push(n+1,n+2,n+3),n=S.position.values.length/3-4,w.push(n,n+2,n+1),w.push(n+1,n+2,n+3)}else{var V,W;for(y.y<0?(V=p.attributes,W=p.indices):(V=f.attributes,W=f.indices),V.position.values.push(y.x,y.y,y.z),V.position.values.push(y.x,y.y,y.z),V.position.values.push(v.x,v.y,v.z),V.position.values.push(v.x,v.y,v.z),i=3*t;i<3*t+12;++i)V.prevPosition.values.push(s[i]),V.nextPosition.values.push(l[i]);for(i=2*t;i<2*t+8;++i)V.expandAndWidth.values.push(u[i]),t$$(c)&&V.st.values.push(c[i]);if(t$$(h))for(i=4*t;i<4*t+16;++i)V.color.values.push(h[i]);if(t$$(d))for(i=3*t;i<3*t+12;++i)V.dist.values.push(d[i]);n=V.position.values.length/3-4,W.push(n,n+2,n+1),W.push(n+1,n+2,n+3)}}_&&(se$x(p),se$x(f)),Bt$b(e,p,f)}F$W.splitLongitude=function(e){if(!t$$(e))throw new t$_("instance is required.");var t=e.geometry,i=t.boundingSphere;if(t$$(i)&&(i.center.x-i.radius>0||c$19.intersectPlane(i,n$17.ORIGIN_ZX_PLANE)!==cr$4.INTERSECTING))return e;if(t.geometryType!==_0x348fdd.NONE)switch(t.geometryType){case _0x348fdd.POLYLINES:Ze$b(e);break;case _0x348fdd.TRIANGLES:Jt$a(e);break;case _0x348fdd.LINES:ee$A(e)}else Ee$r(t),t.primitiveType===H$11.TRIANGLES?Jt$a(e):t.primitiveType===H$11.LINES&&ee$A(e);return e};var te$A=new a$11,fe$s=new a$11,ge$o=new a$11,Ne$i=new a$11,g$N=new r$T,Me$o=new r$W,He$e=new r$W,_e$o=new a$U,Pe$m=new a$11,Te$t=new a$11,Ie$n=new a$11,de$v=new i$1g,Oe$o=new a$11,Ee$q=new r$T,Se$i=new r$T;function Fe$e(e,t,i){var n=t.vertexFormat,r=t.center,o=t.semiMajorAxis,a=t.semiMinorAxis,s=t.ellipsoid,l=t.stRotation,u=i?e.length/3*2:e.length/3,c=t.shadowVolume,h=n.st?new Float32Array(2*u):void 0,d=n.normal?new Float32Array(3*u):void 0,f=n.tangent?new Float32Array(3*u):void 0,p=n.bitangent?new Float32Array(3*u):void 0,_=c?new Float32Array(3*u):void 0,m=0,$=Pe$m,g=Te$t,y=Ie$n,v=new s$1q(s),x=v.project(s.cartesianToCartographic(r,de$v),Oe$o),b=s.scaleToGeodeticSurface(r,te$A);s.geodeticSurfaceNormal(b,b);var S=Me$o,w=He$e;if(0!==l){var C=a$U.fromAxisAngle(b,l,_e$o);S=r$W.fromQuaternion(C,S),C=a$U.fromAxisAngle(b,-l,_e$o),w=r$W.fromQuaternion(C,w)}else S=r$W.clone(r$W.IDENTITY,S),w=r$W.clone(r$W.IDENTITY,w);for(var T=r$T.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Ee$q),P=r$T.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Se$i),E=e.length,A=i?E:0,L=A/3*2,M=0;M<E;M+=3){var I=M+1,O=M+2,D=a$11.fromArray(e,M,te$A);if(n.st){var R=r$W.multiplyByVector(S,D,fe$s),N=v.project(s.cartesianToCartographic(R,de$v),ge$o);a$11.subtract(N,x,N),g$N.x=(N.x+o)/(2*o),g$N.y=(N.y+a)/(2*a),T.x=Math.min(g$N.x,T.x),T.y=Math.min(g$N.y,T.y),P.x=Math.max(g$N.x,P.x),P.y=Math.max(g$N.y,P.y),i&&(h[m+L]=g$N.x,h[m+1+L]=g$N.y),h[m++]=g$N.x,h[m++]=g$N.y}(n.normal||n.tangent||n.bitangent||c)&&($=s.geodeticSurfaceNormal(D,$),c&&(_[M+A]=-$.x,_[I+A]=-$.y,_[O+A]=-$.z),(n.normal||n.tangent||n.bitangent)&&((n.tangent||n.bitangent)&&(g=a$11.normalize(a$11.cross(a$11.UNIT_Z,$,g),g),r$W.multiplyByVector(w,g,g)),n.normal&&(d[M]=$.x,d[I]=$.y,d[O]=$.z,i&&(d[M+A]=-$.x,d[I+A]=-$.y,d[O+A]=-$.z)),n.tangent&&(f[M]=g.x,f[I]=g.y,f[O]=g.z,i&&(f[M+A]=-g.x,f[I+A]=-g.y,f[O+A]=-g.z)),n.bitangent&&(y=a$11.normalize(a$11.cross($,g,y),y),p[M]=y.x,p[I]=y.y,p[O]=y.z,i&&(p[M+A]=y.x,p[I+A]=y.y,p[O+A]=y.z))))}if(n.st){E=h.length;for(var F=0;F<E;F+=2)h[F]=(h[F]-T.x)/(P.x-T.x),h[F+1]=(h[F+1]-T.y)/(P.y-T.y)}var B=new t$W;if(n.position){var z=N$T.raisePositionsToHeight(e,t,i);B.position=new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:z})}if(n.st&&(B.st=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:2,values:h})),n.normal&&(B.normal=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:d})),n.tangent&&(B.tangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:f})),n.bitangent&&(B.bitangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:p})),c&&(B.extrudeDirection=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:_})),i&&t$$(t.offsetAttribute)){var G=new Uint8Array(u);if(t.offsetAttribute===_0x165ce0.TOP)G=d$10(G,1,0,u/2);else G=d$10(G,t.offsetAttribute===_0x165ce0.NONE?0:1);B.applyOffset=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:G})}return B}function je$e(e){var t,i,n,r,o,a=new Array(e*(e+1)*12-6),s=0;for(t=0,n=1,r=0;r<3;r++)a[s++]=n++,a[s++]=t,a[s++]=n;for(r=2;r<e+1;++r){for(n=r*(r+1)-1,t=(r-1)*r-1,a[s++]=n++,a[s++]=t,a[s++]=n,i=2*r,o=0;o<i-1;++o)a[s++]=n,a[s++]=t++,a[s++]=t,a[s++]=n++,a[s++]=t,a[s++]=n;a[s++]=n++,a[s++]=t,a[s++]=n}for(i=2*e,++n,++t,r=0;r<i-1;++r)a[s++]=n,a[s++]=t++,a[s++]=t,a[s++]=n++,a[s++]=t,a[s++]=n;for(a[s++]=n,a[s++]=t++,a[s++]=t,a[s++]=n++,a[s++]=t++,a[s++]=t,++t,r=e-1;r>1;--r){for(a[s++]=t++,a[s++]=t,a[s++]=n,i=2*r,o=0;o<i-1;++o)a[s++]=n,a[s++]=t++,a[s++]=t,a[s++]=n++,a[s++]=t,a[s++]=n;a[s++]=t++,a[s++]=t++,a[s++]=n++}for(r=0;r<3;r++)a[s++]=t++,a[s++]=t,a[s++]=n;return a}var K$N=new a$11;function Ue$g(e){var t=e.center;K$N=a$11.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,K$N),e.height,K$N);var i=new c$19(K$N=a$11.add(t,K$N,K$N),e.semiMajorAxis),n=N$T.computeEllipsePositions(e,!0,!1),r=n.positions,o=n.numPts,a=Fe$e(r,e,!1),s=je$e(o);return{boundingSphere:i,attributes:a,indices:s=fe$u.createTypedArray(r.length/3,s)}}function ke$c(e,t){var i=t.vertexFormat,n=t.center,r=t.semiMajorAxis,o=t.semiMinorAxis,a=t.ellipsoid,s=t.height,l=t.extrudedHeight,u=t.stRotation,c=e.length/3*2,h=new Float64Array(3*c),d=i.st?new Float32Array(2*c):void 0,f=i.normal?new Float32Array(3*c):void 0,p=i.tangent?new Float32Array(3*c):void 0,_=i.bitangent?new Float32Array(3*c):void 0,m=t.shadowVolume,$=m?new Float32Array(3*c):void 0,g=0,y=Pe$m,v=Te$t,x=Ie$n,b=new s$1q(a),S=b.project(a.cartesianToCartographic(n,de$v),Oe$o),w=a.scaleToGeodeticSurface(n,te$A);a.geodeticSurfaceNormal(w,w);for(var C=a$U.fromAxisAngle(w,u,_e$o),T=r$W.fromQuaternion(C,Me$o),P=r$T.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Ee$q),E=r$T.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Se$i),A=e.length,L=A/3*2,M=0;M<A;M+=3){var I,O=M+1,D=M+2,R=a$11.fromArray(e,M,te$A);if(i.st){var N=r$W.multiplyByVector(T,R,fe$s),F=b.project(a.cartesianToCartographic(N,de$v),ge$o);a$11.subtract(F,S,F),g$N.x=(F.x+r)/(2*r),g$N.y=(F.y+o)/(2*o),P.x=Math.min(g$N.x,P.x),P.y=Math.min(g$N.y,P.y),E.x=Math.max(g$N.x,E.x),E.y=Math.max(g$N.y,E.y),d[g+L]=g$N.x,d[g+1+L]=g$N.y,d[g++]=g$N.x,d[g++]=g$N.y}R=a.scaleToGeodeticSurface(R,R),I=a$11.clone(R,fe$s),y=a.geodeticSurfaceNormal(R,y),m&&($[M+A]=-y.x,$[O+A]=-y.y,$[D+A]=-y.z);var B=a$11.multiplyByScalar(y,s,Ne$i);if(R=a$11.add(R,B,R),B=a$11.multiplyByScalar(y,l,B),I=a$11.add(I,B,I),i.position&&(h[M+A]=I.x,h[O+A]=I.y,h[D+A]=I.z,h[M]=R.x,h[O]=R.y,h[D]=R.z),i.normal||i.tangent||i.bitangent){x=a$11.clone(y,x);var z=a$11.fromArray(e,(M+3)%A,Ne$i);a$11.subtract(z,R,z);var G=a$11.subtract(I,R,ge$o);y=a$11.normalize(a$11.cross(G,z,y),y),i.normal&&(f[M]=y.x,f[O]=y.y,f[D]=y.z,f[M+A]=y.x,f[O+A]=y.y,f[D+A]=y.z),i.tangent&&(v=a$11.normalize(a$11.cross(x,y,v),v),p[M]=v.x,p[O]=v.y,p[D]=v.z,p[M+A]=v.x,p[M+1+A]=v.y,p[M+2+A]=v.z),i.bitangent&&(_[M]=x.x,_[O]=x.y,_[D]=x.z,_[M+A]=x.x,_[O+A]=x.y,_[D+A]=x.z)}}if(i.st){A=d.length;for(var k=0;k<A;k+=2)d[k]=(d[k]-P.x)/(E.x-P.x),d[k+1]=(d[k+1]-P.y)/(E.y-P.y)}var U=new t$W;if(i.position&&(U.position=new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:h})),i.st&&(U.st=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:2,values:d})),i.normal&&(U.normal=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:f})),i.tangent&&(U.tangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:p})),i.bitangent&&(U.bitangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:_})),m&&(U.extrudeDirection=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:$})),t$$(t.offsetAttribute)){var V=new Uint8Array(c);if(t.offsetAttribute===_0x165ce0.TOP)V=d$10(V,1,0,c/2);else V=d$10(V,t.offsetAttribute===_0x165ce0.NONE?0:1);U.applyOffset=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:V})}return U}function Ye$g(e){for(var t=e.length/3,i=fe$u.createTypedArray(t,6*t),n=0,r=0;r<t;r++){var o=r,a=r+t,s=(o+1)%t,l=s+t;i[n++]=o,i[n++]=a,i[n++]=s,i[n++]=s,i[n++]=a,i[n++]=l}return i}var he$u=new c$19,Ae$k=new c$19;function Qe$c(e){var t=e.center,i=e.ellipsoid,n=e.semiMajorAxis,r=a$11.multiplyByScalar(i.geodeticSurfaceNormal(t,te$A),e.height,te$A);he$u.center=a$11.add(t,r,he$u.center),he$u.radius=n,r=a$11.multiplyByScalar(i.geodeticSurfaceNormal(t,r),e.extrudedHeight,r),Ae$k.center=a$11.add(t,r,Ae$k.center),Ae$k.radius=n;var o=N$T.computeEllipsePositions(e,!0,!0),a=o.positions,s=o.numPts,l=o.outerPositions,u=c$19.union(he$u,Ae$k),c=Fe$e(a,e,!0),h=je$e(s),d=h.length;h.length=2*d;for(var f=a.length/3,p=0;p<d;p+=3)h[p+d]=h[p+2]+f,h[p+1+d]=h[p+1]+f,h[p+2+d]=h[p]+f;var _=new T$11({attributes:c,indices:fe$u.createTypedArray(2*f/3,h),primitiveType:H$11.TRIANGLES}),m=ke$c(l,e);h=Ye$g(l);var $=new T$11({attributes:m,indices:fe$u.createTypedArray(2*l.length/3,h),primitiveType:H$11.TRIANGLES}),g=F$W.combineInstances([new m$P({geometry:_}),new m$P({geometry:$})]);return{boundingSphere:u,attributes:g[0].attributes,indices:g[0].indices}}function De$r(e,t,i,n,r,o,a){for(var s=N$T.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:i,rotation:n,granularity:r},!1,!0).outerPositions,l=s.length/3,u=new Array(l),c=0;c<l;++c)u[c]=a$11.fromArray(s,3*c);var h=s$1p.fromCartesianArray(u,o,a);return h.width>n$1d.PI&&(h.north=h.north>0?n$1d.PI_OVER_TWO-n$1d.EPSILON7:h.north,h.south=h.south<0?n$1d.EPSILON7-n$1d.PI_OVER_TWO:h.south,h.east=n$1d.PI,h.west=-n$1d.PI),h}function H$U(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).center,i=e$1Y(e.ellipsoid,n$1c.WGS84),n=e.semiMajorAxis,r=e.semiMinorAxis,o=e$1Y(e.granularity,n$1d.RADIANS_PER_DEGREE),a=e$1Y(e.vertexFormat,n$12.DEFAULT);if(n$1e.defined("options.center",t),n$1e.typeOf.number("options.semiMajorAxis",n),n$1e.typeOf.number("options.semiMinorAxis",r),n<r)throw new t$_("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(o<=0)throw new t$_("granularity must be greater than zero.");var s=e$1Y(e.height,0),l=e$1Y(e.extrudedHeight,s);this._center=a$11.clone(t),this._semiMajorAxis=n,this._semiMinorAxis=r,this._ellipsoid=n$1c.clone(i),this._rotation=e$1Y(e.rotation,0),this._stRotation=e$1Y(e.stRotation,0),this._height=Math.max(l,s),this._granularity=o,this._vertexFormat=n$12.clone(a),this._extrudedHeight=Math.min(l,s),this._shadowVolume=e$1Y(e.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}H$U.packedLength=a$11.packedLength+n$1c.packedLength+n$12.packedLength+9,H$U.pack=function(e,t,i){return n$1e.defined("value",e),n$1e.defined("array",t),i=e$1Y(i,0),a$11.pack(e._center,t,i),i+=a$11.packedLength,n$1c.pack(e._ellipsoid,t,i),i+=n$1c.packedLength,n$12.pack(e._vertexFormat,t,i),i+=n$12.packedLength,t[i++]=e._semiMajorAxis,t[i++]=e._semiMinorAxis,t[i++]=e._rotation,t[i++]=e._stRotation,t[i++]=e._height,t[i++]=e._granularity,t[i++]=e._extrudedHeight,t[i++]=e._shadowVolume?1:0,t[i]=e$1Y(e._offsetAttribute,-1),t};var Le$h=new a$11,ze$f=new n$1c,Re$k=new n$12,U$U={center:Le$h,ellipsoid:ze$f,vertexFormat:Re$k,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};function qe$g(e){var t=-e._stRotation;if(0===t)return[0,0,0,1,1,0];for(var i=N$T.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,n=i.length/3,r=new Array(n),o=0;o<n;++o)r[o]=a$11.fromArray(i,3*o);var a=e._ellipsoid,s=e.rectangle;return T$11._textureCoordinateRotationPoints(r,t,a,s)}function n$_(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).radius;n$1e.typeOf.number("radius",t);var i={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 H$U(i),this._workerName="createCircleGeometry"}H$U.unpack=function(e,t,i){n$1e.defined("array",e),t=e$1Y(t,0);var n=a$11.unpack(e,t,Le$h);t+=a$11.packedLength;var r=n$1c.unpack(e,t,ze$f);t+=n$1c.packedLength;var o=n$12.unpack(e,t,Re$k);t+=n$12.packedLength;var a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t++],f=1===e[t++],p=e[t];return t$$(i)?(i._center=a$11.clone(n,i._center),i._ellipsoid=n$1c.clone(r,i._ellipsoid),i._vertexFormat=n$12.clone(o,i._vertexFormat),i._semiMajorAxis=a,i._semiMinorAxis=s,i._rotation=l,i._stRotation=u,i._height=c,i._granularity=h,i._extrudedHeight=d,i._shadowVolume=f,i._offsetAttribute=-1===p?void 0:p,i):(U$U.height=c,U$U.extrudedHeight=d,U$U.granularity=h,U$U.stRotation=u,U$U.rotation=l,U$U.semiMajorAxis=a,U$U.semiMinorAxis=s,U$U.shadowVolume=f,U$U.offsetAttribute=-1===p?void 0:p,new H$U(U$U))},H$U.computeRectangle=function(e,t){var i=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).center,n=e$1Y(e.ellipsoid,n$1c.WGS84),r=e.semiMajorAxis,o=e.semiMinorAxis,a=e$1Y(e.granularity,n$1d.RADIANS_PER_DEGREE),s=e$1Y(e.rotation,0);if(n$1e.defined("options.center",i),n$1e.typeOf.number("options.semiMajorAxis",r),n$1e.typeOf.number("options.semiMinorAxis",o),r<o)throw new t$_("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(a<=0)throw new t$_("granularity must be greater than zero.");return De$r(i,r,o,s,a,n,t)},H$U.createGeometry=function(e){if(!(e._semiMajorAxis<=0||e._semiMinorAxis<=0)){var t=e._height,i=e._extrudedHeight,n=!n$1d.equalsEpsilon(t,i,0,n$1d.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);var r,o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,vertexFormat:e._vertexFormat,stRotation:e._stRotation};if(n)o.extrudedHeight=i,o.shadowVolume=e._shadowVolume,o.offsetAttribute=e._offsetAttribute,r=Qe$c(o);else if(r=Ue$g(o),t$$(e._offsetAttribute)){var a=r.attributes.position.values.length,s=new Uint8Array(a/3);d$10(s,e._offsetAttribute===_0x165ce0.NONE?0:1),r.attributes.applyOffset=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:s})}return new T$11({attributes:r.attributes,indices:r.indices,primitiveType:H$11.TRIANGLES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})}},H$U.createShadowVolume=function(e,t,i){var n=e._granularity,r=e._ellipsoid,o=t(n,r),a=i(n,r);return new H$U({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:r,rotation:e._rotation,stRotation:e._stRotation,granularity:n,extrudedHeight:o,height:a,vertexFormat:n$12.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(H$U.prototype,{rectangle:{get:function(){return t$$(this._rectangle)||(this._rectangle=De$r(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return t$$(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=qe$g(this)),this._textureCoordinateRotationPoints}}}),n$_.packedLength=H$U.packedLength,n$_.pack=function(e,t,i){return n$1e.typeOf.object("value",e),H$U.pack(e._ellipseGeometry,t,i)};var x$Y=new H$U({center:new a$11,semiMajorAxis:1,semiMinorAxis:1}),t$Q={center:new a$11,radius:void 0,ellipsoid:n$1c.clone(n$1c.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new n$12,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};n$_.unpack=function(e,t,i){var n=H$U.unpack(e,t,x$Y);return t$Q.center=a$11.clone(n._center,t$Q.center),t$Q.ellipsoid=n$1c.clone(n._ellipsoid,t$Q.ellipsoid),t$Q.height=n._height,t$Q.extrudedHeight=n._extrudedHeight,t$Q.granularity=n._granularity,t$Q.vertexFormat=n$12.clone(n._vertexFormat,t$Q.vertexFormat),t$Q.stRotation=n._stRotation,t$Q.shadowVolume=n._shadowVolume,t$$(i)?(t$Q.semiMajorAxis=n._semiMajorAxis,t$Q.semiMinorAxis=n._semiMinorAxis,i._ellipseGeometry=new H$U(t$Q),i):(t$Q.radius=n._semiMajorAxis,new n$_(t$Q))},n$_.createGeometry=function(e){return H$U.createGeometry(e._ellipseGeometry)},n$_.createShadowVolume=function(e,t,i){var n=e._ellipseGeometry._granularity,r=e._ellipseGeometry._ellipsoid,o=t(n,r),a=i(n,r);return new n$_({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:r,stRotation:e._ellipseGeometry._stRotation,granularity:n,extrudedHeight:o,height:a,vertexFormat:n$12.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(n$_.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var W$11=new a$11,b$1a=new a$11;function U$T(e){var t=e.center;b$1a=a$11.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,b$1a),e.height,b$1a);var i=new c$19(b$1a=a$11.add(t,b$1a,b$1a),e.semiMajorAxis),n=N$T.computeEllipsePositions(e,!1,!0).outerPositions,r=e$1Y(e.outlineWidth,1);r>1&&n.push(n[0],n[1],n[2]);var o=new t$W({position:new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:N$T.raisePositionsToHeight(n,e,!1)})});r>1&&(o.sideness=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:2,values:new Float32Array([0,0,0,1,1,1,1,0])}),o.sideness.isInstanceAttribute=!0);for(var a=n.length/3,s=fe$u.createTypedArray(a,2*a),l=0,u=0;u<a;++u)s[l++]=u,s[l++]=(u+1)%a;return{boundingSphere:i,attributes:o,indices:s}}var S$J=new c$19,N$S=new c$19;function R$P(e){var t=e.center,i=e.ellipsoid,n=e.semiMajorAxis,r=a$11.multiplyByScalar(i.geodeticSurfaceNormal(t,W$11),e.height,W$11);S$J.center=a$11.add(t,r,S$J.center),S$J.radius=n,r=a$11.multiplyByScalar(i.geodeticSurfaceNormal(t,r),e.extrudedHeight,r),N$S.center=a$11.add(t,r,N$S.center),N$S.radius=n;var o=N$T.computeEllipsePositions(e,!1,!0).outerPositions,a=new t$W({position:new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:N$T.raisePositionsToHeight(o,e,!0)})});o=a.position.values;var s=c$19.union(S$J,N$S),l=o.length/3;if(t$$(e.offsetAttribute)){var u=new Uint8Array(l);if(e.offsetAttribute===_0x165ce0.TOP)u=d$10(u,1,0,l/2);else u=d$10(u,e.offsetAttribute===_0x165ce0.NONE?0:1);a.applyOffset=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})}var c=e$1Y(e.numberOfVerticalLines,16);c=n$1d.clamp(c,0,l/2);var h=fe$u.createTypedArray(l,2*l+2*c);l/=2;var d,f,p=0;for(d=0;d<l;++d)h[p++]=d,h[p++]=(d+1)%l,h[p++]=d+l,h[p++]=(d+1)%l+l;if(c>0){var _=Math.min(c,l);f=Math.round(l/_);var m=Math.min(f*c,l);for(d=0;d<m;d+=f)h[p++]=d,h[p++]=d+l}return{boundingSphere:s,attributes:a,indices:h}}function w$Y(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).center,i=e$1Y(e.ellipsoid,n$1c.WGS84),n=e.semiMajorAxis,r=e.semiMinorAxis,o=e$1Y(e.granularity,n$1d.RADIANS_PER_DEGREE);if(!t$$(t))throw new t$_("center is required.");if(!t$$(n))throw new t$_("semiMajorAxis is required.");if(!t$$(r))throw new t$_("semiMinorAxis is required.");if(n<r)throw new t$_("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(o<=0)throw new t$_("granularity must be greater than zero.");var a=e$1Y(e.height,0),s=e$1Y(e.extrudedHeight,a);this._center=a$11.clone(t),this._semiMajorAxis=n,this._semiMinorAxis=r,this._ellipsoid=n$1c.clone(i),this._rotation=e$1Y(e.rotation,0),this._height=Math.max(s,a),this._granularity=o,this._extrudedHeight=Math.min(s,a),this._numberOfVerticalLines=Math.max(e$1Y(e.numberOfVerticalLines,16),0),this._offsetAttribute=e.offsetAttribute,this._outlineWidth=e$1Y(e.outlineWidth,1),this._workerName="createEllipseOutlineGeometry"}w$Y.packedLength=a$11.packedLength+n$1c.packedLength+9,w$Y.pack=function(e,t,i){if(!t$$(e))throw new t$_("value is required");if(!t$$(t))throw new t$_("array is required");return i=e$1Y(i,0),a$11.pack(e._center,t,i),i+=a$11.packedLength,n$1c.pack(e._ellipsoid,t,i),i+=n$1c.packedLength,t[i++]=e._semiMajorAxis,t[i++]=e._semiMinorAxis,t[i++]=e._rotation,t[i++]=e._height,t[i++]=e._granularity,t[i++]=e._extrudedHeight,t[i++]=e._numberOfVerticalLines,t[i++]=e$1Y(e._offsetAttribute,-1),t[i]=e._outlineWidth,t};var V$K=new a$11,q$15=new n$1c,p$13={center:V$K,ellipsoid:q$15,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0,outlineWidth:void 0};function s$18(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).radius;n$1e.typeOf.number("radius",t);var i={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new w$Y(i),this._workerName="createCircleOutlineGeometry"}w$Y.unpack=function(e,t,i){if(!t$$(e))throw new t$_("array is required");t=e$1Y(t,0);var n=a$11.unpack(e,t,V$K);t+=a$11.packedLength;var r=n$1c.unpack(e,t,q$15);t+=n$1c.packedLength;var o=e[t++],a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t++],f=e[t];return t$$(i)?(i._center=a$11.clone(n,i._center),i._ellipsoid=n$1c.clone(r,i._ellipsoid),i._semiMajorAxis=o,i._semiMinorAxis=a,i._rotation=s,i._height=l,i._granularity=u,i._extrudedHeight=c,i._numberOfVerticalLines=h,i._offsetAttribute=-1===d?void 0:d,i._outlineWidth=f,i):(p$13.height=l,p$13.extrudedHeight=c,p$13.granularity=u,p$13.rotation=s,p$13.semiMajorAxis=o,p$13.semiMinorAxis=a,p$13.numberOfVerticalLines=h,p$13.offsetAttribute=-1===d?void 0:d,p$13.outlineWidth=f,new w$Y(p$13))},w$Y.createGeometry=function(e){if(!(e._semiMajorAxis<=0||e._semiMinorAxis<=0)){var t=e._height,i=e._extrudedHeight,n=!n$1d.equalsEpsilon(t,i,0,n$1d.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);var r,o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,outlineWidth:e._outlineWidth,numberOfVerticalLines:e._numberOfVerticalLines};if(n)o.extrudedHeight=i,o.offsetAttribute=e._offsetAttribute,r=R$P(o);else if(r=U$T(o),t$$(e._offsetAttribute)){var a=r.attributes.position.values.length,s=new Uint8Array(a/3);d$10(s,e._offsetAttribute===_0x165ce0.NONE?0:1),r.attributes.applyOffset=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:s})}return new T$11({attributes:r.attributes,indices:r.indices,primitiveType:e._outlineWidth>1?H$11.TRIANGLES:H$11.LINES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})}},s$18.packedLength=w$Y.packedLength,s$18.pack=function(e,t,i){return n$1e.typeOf.object("value",e),w$Y.pack(e._ellipseGeometry,t,i)};var d$U=new w$Y({center:new a$11,semiMajorAxis:1,semiMinorAxis:1}),i$Z={center:new a$11,radius:void 0,ellipsoid:n$1c.clone(n$1c.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};s$18.unpack=function(e,t,i){var n=w$Y.unpack(e,t,d$U);return i$Z.center=a$11.clone(n._center,i$Z.center),i$Z.ellipsoid=n$1c.clone(n._ellipsoid,i$Z.ellipsoid),i$Z.height=n._height,i$Z.extrudedHeight=n._extrudedHeight,i$Z.granularity=n._granularity,i$Z.numberOfVerticalLines=n._numberOfVerticalLines,t$$(i)?(i$Z.semiMajorAxis=n._semiMajorAxis,i$Z.semiMinorAxis=n._semiMinorAxis,i._ellipseGeometry=new w$Y(i$Z),i):(i$Z.radius=n._semiMajorAxis,new s$18(i$Z))},s$18.createGeometry=function(e){return w$Y.createGeometry(e._ellipseGeometry)};var e$1o={UNBOUNDED:0,CLAMPED:1,LOOP_STOP:2},tt$j=Object.freeze(e$1o),e$1n={TICK_DEPENDENT:0,SYSTEM_CLOCK_MULTIPLIER:1,SYSTEM_CLOCK:2},g$M=Object.freeze(e$1n);function a$M(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).currentTime,i=e.startTime,n=e.stopTime;if(t=t$$(t)?o$10.clone(t):t$$(i)?o$10.clone(i):t$$(n)?o$10.addDays(n,-1,new o$10):o$10.now(),i=t$$(i)?o$10.clone(i):o$10.clone(t),n=t$$(n)?o$10.clone(n):o$10.addDays(i,1,new o$10),o$10.greaterThan(i,n))throw new t$_("startTime must come before stopTime.");this.startTime=i,this.stopTime=n,this.clockRange=e$1Y(e.clockRange,tt$j.UNBOUNDED),this.canAnimate=e$1Y(e.canAnimate,!0),this.onTick=new o$15,this.onStop=new o$15,this._currentTime=void 0,this._multiplier=void 0,this._clockStep=void 0,this._shouldAnimate=void 0,this._lastSystemTime=yt$9(),this.currentTime=t,this.multiplier=e$1Y(e.multiplier,1),this.shouldAnimate=e$1Y(e.shouldAnimate,!1),this.clockStep=e$1Y(e.clockStep,g$M.SYSTEM_CLOCK_MULTIPLIER)}function r$I(e,t,i,n){e=e$1Y(e,1),t=e$1Y(t,1),i=e$1Y(i,1),n=e$1Y(n,1),this.value=new Uint8Array([e$1z.floatToByte(e),e$1z.floatToByte(t),e$1z.floatToByte(i),e$1z.floatToByte(n)])}function o$T(){this._dictTable=new e$1F,this._imageBuffer=new Uint8Array(262144),this._sortKey=[]}function g$L(e,t){return e-t}function e$1m(e,t,i,n,r){this._format=e,this._width=t,this._height=i,this._buffer=n,this._datatype=r}Object.defineProperties(a$M.prototype,{currentTime:{get:function(){return this._currentTime},set:function(e){o$10.equals(this._currentTime,e)||(this._clockStep===g$M.SYSTEM_CLOCK&&(this._clockStep=g$M.SYSTEM_CLOCK_MULTIPLIER),this._currentTime=e)}},multiplier:{get:function(){return this._multiplier},set:function(e){this._multiplier!==e&&(this._clockStep===g$M.SYSTEM_CLOCK&&(this._clockStep=g$M.SYSTEM_CLOCK_MULTIPLIER),this._multiplier=e)}},clockStep:{get:function(){return this._clockStep},set:function(e){e===g$M.SYSTEM_CLOCK&&(this._multiplier=1,this._shouldAnimate=!0,this._currentTime=o$10.now()),this._clockStep=e}},shouldAnimate:{get:function(){return this._shouldAnimate},set:function(e){this._shouldAnimate!==e&&(this._clockStep===g$M.SYSTEM_CLOCK&&(this._clockStep=g$M.SYSTEM_CLOCK_MULTIPLIER),this._shouldAnimate=e)}}}),a$M.prototype.tick=function(){var e=yt$9(),t=o$10.clone(this._currentTime);if(this.canAnimate&&this._shouldAnimate){var i=this._clockStep;if(i===g$M.SYSTEM_CLOCK)t=o$10.now(t);else{var n=this._multiplier;if(i===g$M.TICK_DEPENDENT)t=o$10.addSeconds(t,n,t);else{var r=e-this._lastSystemTime;t=o$10.addSeconds(t,n*(r/1e3),t)}var o=this.clockRange,a=this.startTime,s=this.stopTime;if(o===tt$j.CLAMPED)o$10.lessThan(t,a)?t=o$10.clone(a,t):o$10.greaterThan(t,s)&&(t=o$10.clone(s,t),this.onStop.raiseEvent(this));else if(o===tt$j.LOOP_STOP)for(o$10.lessThan(t,a)&&(t=o$10.clone(a,t));o$10.greaterThan(t,s);)t=o$10.addSeconds(a,o$10.secondsDifference(t,s),t),this.onStop.raiseEvent(this)}}return this._currentTime=t,this._lastSystemTime=e,this.onTick.raiseEvent(this),t},Object.defineProperties(r$I.prototype,{componentDatatype:{get:function(){return C$12.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 4}},normalize:{get:function(){return!0}}}),r$I.fromColor=function(e){if(!t$$(e))throw new t$_("color is required.");return new r$I(e.red,e.green,e.blue,e.alpha)},r$I.toValue=function(e,t){if(!t$$(e))throw new t$_("color is required.");return t$$(t)?e.toBytes(t):new Uint8Array(e.toBytes())},r$I.equals=function(e,t){return e===t||t$$(e)&&t$$(t)&&e.value[0]===t.value[0]&&e.value[1]===t.value[1]&&e.value[2]===t.value[2]&&e.value[3]===t.value[3]},o$T.prototype.destroy=function(){this._dictTable.removeAll(),this._imageBuffer=null,this._sortKey=null},o$T.prototype.getItem=function(e){if(e>this._dictTable.values.length-1)return null;var t=[];for(var i in this._dictTable._hash)t.push(parseFloat(i));t.sort(g$L);var n=t[e];return t$$(n)?{altitude:n,color:this._dictTable.get(n)}:null},o$T.prototype.count=function(){return this._dictTable.values.length},o$T.prototype.insert=function(e,t){if(!t$$(this._dictTable.get(e))){var i=e$1z.clone(t,i);this._dictTable.set(e,i)}},o$T.prototype.remove=function(e){return this._dictTable.remove(e)},o$T.prototype.clear=function(){this._dictTable.values.length=0},o$T.clone=function(e,t){if(t$$(e)){t$$(t)||(t=new o$T),e$1F.clone(e._dictTable,t._dictTable);for(var i=0;i<e._imageBuffer.length;i++)t._imageBuffer[i]=e._imageBuffer[i];return t}},o$T.prototype.generateBuffer=function(){var e=[],t=0;for(var i in this._dictTable._hash)if(t$$(i)){var n=this._dictTable.get(i);e[t++]={value:parseFloat(i),color:n}}if(!(e.length<2)){for(t=0;t<e.length-1;t++)for(var r=e[t],o=t+1;o<e.length;o++){var a=e[o];if(r.value>a.value){var s=e$1W(e[t],!0);e[t]=e$1W(e[o],!0),e[o]=s,r=e[t]}}var l=e[0].value,u=e[e.length-1].value-l,c=document.createElement("canvas");c.width=16384,c.height=1;var h=c.getContext("2d");h.beginPath();var d=h.createLinearGradient(0,0,16384,0);for(t=0;t<e.length;t++)d.addColorStop((e[t].value-l)/u,e[t].color.toCssColorString());h.fillStyle=d,h.rect(0,0,c.width,c.height),h.fill();var f=h.getImageData(0,0,c.width,1).data;for(o=0;o<16;o++)for(t=0;t<4096;t++)this._imageBuffer[t+1024*o*4*4]=f[t+1024*o*4],this._imageBuffer[t+1024*o*4*4+4096]=f[t+1024*o*4],this._imageBuffer[t+1024*o*4*4+8192]=f[t+1024*o*4],this._imageBuffer[t+1024*o*4*4+12288]=f[t+1024*o*4];for(var i in this._dictTable._hash)this._sortKey.push(parseFloat(i));return this._sortKey.sort(g$L),c}},o$T.prototype.getColor=function(e){for(var t=0;t<this._sortKey.length;t++)if(this._sortKey[t]>=e||Math.abs(this._sortKey[t]-e)<n$1d.EPSILON6)return this._dictTable.get(this._sortKey[t])},Object.defineProperties(e$1m.prototype,{internalFormat:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}},pixelDatatype:{get:function(){return this._datatype}}}),e$1m.clone=function(e){if(t$$(e))return new e$1m(e._format,e._width,e._height,e._buffer,e._datatype)},e$1m.prototype.clone=function(){return e$1m.clone(this)};var p$12={},z$K=new a$11,C$U=new a$11,h$Y=new a$11,x$X=new a$11,j$Z=new b$1o;function D$Z(e,t,i,n,r){var o=a$11.subtract(e,t,z$K),a=a$11.dot(i,o),s=a$11.dot(n,o);return r$T.fromElements(a,s,r)}function i$Y(){this._array=[],this._offset=0,this._length=0}p$12.validOutline=function(e){n$1e.defined("positions",e);var t=b$1o.fromPoints(e,j$Z).halfAxes,i=r$W.getColumn(t,0,C$U),n=r$W.getColumn(t,1,h$Y),r=r$W.getColumn(t,2,x$X),o=a$11.magnitude(i),a=a$11.magnitude(n),s=a$11.magnitude(r);return!(0===o&&(0===a||0===s)||0===a&&0===s)},p$12.computeProjectTo2DArguments=function(e,t,i,n){n$1e.defined("positions",e),n$1e.defined("centerResult",t),n$1e.defined("planeAxis1Result",i),n$1e.defined("planeAxis2Result",n);var r,o,a=b$1o.fromPoints(e,j$Z),s=a.halfAxes,l=r$W.getColumn(s,0,C$U),u=r$W.getColumn(s,1,h$Y),c=r$W.getColumn(s,2,x$X),h=a$11.magnitude(l),d=a$11.magnitude(u),f=a$11.magnitude(c),p=Math.min(h,d,f);return(0!==h||0!==d&&0!==f)&&(0!==d||0!==f)&&((p===d||p===f)&&(r=l),p===h?r=u:p===f&&(o=u),(p===h||p===d)&&(o=c),a$11.normalize(r,i),a$11.normalize(o,n),a$11.clone(a.center,t),!0)},p$12.createProjectPointsTo2DFunction=function(e,t,i){return function(n){for(var r=new Array(n.length),o=0;o<n.length;o++)r[o]=D$Z(n[o],e,t,i);return r}},p$12.createProjectPointTo2DFunction=function(e,t,i){return function(n,r){return D$Z(n,e,t,i,r)}},Object.defineProperties(i$Y.prototype,{length:{get:function(){return this._length}}}),i$Y.prototype.enqueue=function(e){this._array.push(e),this._length++},i$Y.prototype.dequeue=function(){if(0!==this._length){var e=this._array,t=this._offset,i=e[t];return e[t]=void 0,++t>10&&2*t>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,i}},i$Y.prototype.peek=function(){if(0!==this._length)return this._array[this._offset]},i$Y.prototype.contains=function(e){return-1!==this._array.indexOf(e)},i$Y.prototype.clear=function(){this._array.length=this._offset=this._length=0},i$Y.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};var g$K={computeHierarchyPackedLength:function(e){for(var t=0,i=[e];i.length>0;){var n=i.pop();if(t$$(n)){t+=2;var r=n.positions,o=n.holes;if(t$$(r)&&(t+=r.length*a$11.packedLength),t$$(o))for(var a=o.length,s=0;s<a;++s)i.push(o[s])}}return t},packPolygonHierarchy:function(e,t,i){for(var n=[e];n.length>0;){var r=n.pop();if(t$$(r)){var o=r.positions,a=r.holes;if(t[i++]=t$$(o)?o.length:0,t[i++]=t$$(a)?a.length:0,t$$(o))for(var s=o.length,l=0;l<s;++l,i+=3)a$11.pack(o[l],t,i);if(t$$(a))for(var u=a.length,c=0;c<u;++c)n.push(a[c])}}return i},unpackPolygonHierarchy:function(e,t){for(var i=e[t++],n=e[t++],r=new Array(i),o=n>0?new Array(n):void 0,a=0;a<i;++a,t+=a$11.packedLength)r[a]=a$11.unpack(e,t);for(var s=0;s<n;++s)o[s]=g$K.unpackPolygonHierarchy(e,t),t=o[s].startingIndex,delete o[s].startingIndex;return{positions:r,holes:o,startingIndex:t}}},I$10=new a$11;function Z$V(e,t,i,n){return a$11.subtract(t,e,I$10),a$11.multiplyByScalar(I$10,i/n,I$10),a$11.add(e,I$10,I$10),[I$10.x,I$10.y,I$10.z]}g$K.subdivideLineCount=function(e,t,i){var n=a$11.distance(e,t)/i,r=Math.max(0,Math.ceil(n$1d.log2(n)));return Math.pow(2,r)};var W$10=new i$1g,V$J=new i$1g,$$S=new i$1g,rr$8=new a$11;g$K.subdivideRhumbLineCount=function(e,t,i,n){var r=new M$1c(e.cartesianToCartographic(t,W$10),e.cartesianToCartographic(i,V$J),e).surfaceDistance/n,o=Math.max(0,Math.ceil(n$1d.log2(r)));return Math.pow(2,o)},g$K.subdivideLine=function(e,t,i,n){var r=g$K.subdivideLineCount(e,t,i),o=a$11.distance(e,t),a=o/r;t$$(n)||(n=[]);var s=n;s.length=3*r;for(var l=0,u=0;u<r;u++){var c=Z$V(e,t,u*a,o);s[l++]=c[0],s[l++]=c[1],s[l++]=c[2]}return s},g$K.subdivideRhumbLine=function(e,t,i,n,r){var o=new M$1c(e.cartesianToCartographic(t,W$10),e.cartesianToCartographic(i,V$J),e),a=o.surfaceDistance/n,s=Math.max(0,Math.ceil(n$1d.log2(a))),l=Math.pow(2,s),u=o.surfaceDistance/l;t$$(r)||(r=[]);var c=r;c.length=3*l;for(var h=0,d=0;d<l;d++){var f=o.interpolateUsingSurfaceDistance(d*u,$$S),p=e.cartographicToCartesian(f,rr$8);c[h++]=p.x,c[h++]=p.y,c[h++]=p.z}return c};var er$7=new a$11,or$6=new a$11,tr$8=new a$11,nr$7=new a$11;g$K.scaleToGeodeticHeightExtruded=function(e,t,i,n,r){n=e$1Y(n,n$1c.WGS84);var o=er$7,a=or$6,s=tr$8,l=nr$7;if(t$$(e)&&t$$(e.attributes)&&t$$(e.attributes.position))for(var u=e.attributes.position.values,c=u.length/2,h=0;h<c;h+=3)a$11.fromArray(u,h,s),n.geodeticSurfaceNormal(s,o),l=n.scaleToGeodeticSurface(s,l),a=a$11.multiplyByScalar(o,i,a),a=a$11.add(l,a,a),u[h+c]=a.x,u[h+1+c]=a.y,u[h+2+c]=a.z,r&&(l=a$11.clone(s,l)),a=a$11.multiplyByScalar(o,t,a),a=a$11.add(l,a,a),u[h]=a.x,u[h+1]=a.y,u[h+2]=a.z;return e},g$K.polygonOutlinesFromHierarchy=function(e,t,i){var n,r,o,a=[],s=new i$Y;for(s.enqueue(e);0!==s.length;){var l=s.dequeue(),u=l.positions;if(t)for(o=u.length,n=0;n<o;n++)i.scaleToGeodeticSurface(u[n],u[n]);if(!((u=u$11(u,a$11.equalsEpsilon,!0)).length<3)){var c=l.holes?l.holes.length:0;for(n=0;n<c;n++){var h=l.holes[n],d=h.positions;if(t)for(o=d.length,r=0;r<o;++r)i.scaleToGeodeticSurface(d[r],d[r]);if(!((d=u$11(d,a$11.equalsEpsilon,!0)).length<3)){a.push(d);var f=0;for(t$$(h.holes)&&(f=h.holes.length),r=0;r<f;r++)s.enqueue(h.holes[r])}}a.push(u)}}return a};var ir$a=new a$11(6378137,6378137,6378137);g$K.polygonsFromHierarchy=function(e,t,i,n){var r=[],o=[],a=new i$Y;for(a.enqueue(e);0!==a.length;){var s,l,u,c=a.dequeue(),h=c.positions,d=c.holes,f=h.slice();if(i)for(l=h.length,s=0;s<l;s++)n.scaleToGeodeticSurface(h[s],f[s]);if(t$$(n)&&!a$11.equals(n._radii,ir$a)&&(u=n$1d.EPSILON7),!((h=u$11(f,a$11.equalsEpsilon,!0,u)).length<3)){var p=t(h);if(t$$(p)){var _=[],m=T$10.computeWindingOrder2D(p);m===_0x2ee645.CLOCKWISE&&(p.reverse(),h=h.slice().reverse());var $,g=h.slice(),y=t$$(d)?d.length:0,v=[];for(s=0;s<y;s++){var x=d[s],b=x.positions;if(i)for(l=b.length,$=0;$<l;++$)n.scaleToGeodeticSurface(b[$],b[$]);if(!((b=u$11(b,a$11.equalsEpsilon,!0,n$1d.EPSILON7)).length<3)){var S=t(b);if(t$$(S)){(m=T$10.computeWindingOrder2D(S))===_0x2ee645.CLOCKWISE&&(S.reverse(),b=b.slice().reverse()),v.push(b),_.push(g.length),g=g.concat(b),p=p.concat(S);var w=0;for(t$$(x.holes)&&(w=x.holes.length),$=0;$<w;$++)a.enqueue(x.holes[$])}}}r.push({outerRing:h,holes:v}),o.push({positions:g,positions2D:p,holes:_})}}}return{hierarchy:r,polygons:o}};var ar$5=new r$T,sr$4=new a$11,ur$3=new a$U,lr$5=new r$W;g$K.computeBoundingRectangle=function(e,t,i,n,r){for(var o=a$U.fromAxisAngle(e,n,ur$3),a=r$W.fromQuaternion(o,lr$5),s=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,u=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,h=i.length,d=0;d<h;++d){var f=a$11.clone(i[d],sr$4);r$W.multiplyByVector(a,f,f);var p=t(f,ar$5);t$$(p)&&(s=Math.min(s,p.x),l=Math.max(l,p.x),u=Math.min(u,p.y),c=Math.max(c,p.y))}return r.x=s,r.y=u,r.width=l-s,r.height=c-u,r},g$K.createGeometryFromPositions=function(e,t,i,n,r,o){var a=T$10.triangulate(t.positions2D,t.holes);a.length<3&&(a=[0,1,2]);var s=t.positions;if(n){for(var l=s.length,u=new Array(3*l),c=0,h=0;h<l;h++){var d=s[h];u[c++]=d.x,u[c++]=d.y,u[c++]=d.z}var f=new T$11({attributes:{position:new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:u})},indices:a,primitiveType:H$11.TRIANGLES});return r.normal?F$W.computeNormal(f):f}return o===m$_.GEODESIC?T$10.computeSubdivision(e,s,a,i):o===m$_.RHUMB?T$10.computeRhumbLineSubdivision(e,s,a,i):void 0};var _$_=[],fr$6=new a$11,cr$2=new a$11;g$K.computeWallGeometry=function(e,t,i,n,r,o){var a,s,l,u,c,h=o?1:0,d=e.length,f=0;if(n)for(s=3*(d-h)*2,a=new Array(2*s),l=0;l<d-h;l++)u=e[l],c=e[(l+1)%d],a[f]=a[f+s]=u.x,a[++f]=a[f+s]=u.y,a[++f]=a[f+s]=u.z,a[++f]=a[f+s]=c.x,a[++f]=a[f+s]=c.y,a[++f]=a[f+s]=c.z,++f;else{var p=n$1d.chordLength(i,t.maximumRadius),_=0;if(r===m$_.GEODESIC)for(l=0;l<d;l++)_+=g$K.subdivideLineCount(e[l],e[(l+1)%d],p);else if(r===m$_.RHUMB)for(l=0;l<d;l++)_+=g$K.subdivideRhumbLineCount(t,e[l],e[(l+1)%d],p);for(s=3*(_+d),a=new Array(2*s),l=0;l<d;l++){var m;u=e[l],c=e[(l+1)%d],r===m$_.GEODESIC?m=g$K.subdivideLine(u,c,p,_$_):r===m$_.RHUMB&&(m=g$K.subdivideRhumbLine(t,u,c,p,_$_));for(var $=m.length,g=0;g<$;++g,++f)a[f]=m[g],a[f+s]=m[g];a[f]=c.x,a[f+s]=c.x,a[++f]=c.y,a[f+s]=c.y,a[++f]=c.z,a[f+s]=c.z,++f}}d=a.length;var y=fe$u.createTypedArray(d/3,d-6*(e.length-h)),v=0;for(d/=6,l=0;l<d;l++){var x=l,b=x+1,S=x+d,w=S+1;u=a$11.fromArray(a,3*x,fr$6),c=a$11.fromArray(a,3*b,cr$2),!a$11.equalsEpsilon(u,c,n$1d.EPSILON10,n$1d.EPSILON10)&&(y[v++]=x,y[v++]=S,y[v++]=b,y[v++]=b,y[v++]=S,y[v++]=w)}return new T$11({attributes:new t$W({position:new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:a})}),indices:y,primitiveType:H$11.TRIANGLES})};var pe$t=new a$11,me$A=new n$13,se$w=new r$T,le$v=new r$T,ce$r=new a$11,ye$q=new a$11,ge$n=new a$11,O$N=new a$11,ue$t=new a$11,fe$r=new a$11,X$M=new a$U,de$u=new r$W,ve$r=new r$W,he$t=new a$11;function we$o(e,t,i,n,r,o,a,s){var l=e.positions,u=T$10.triangulate(e.positions2D,e.holes);u.length<3&&(u=[0,1,2]);var c=fe$u.createTypedArray(l.length,u.length);c.set(u);var h=de$u;if(0!==n){var d=a$U.fromAxisAngle(o,n,X$M);if(h=r$W.fromQuaternion(d,h),t.tangent||t.bitangent){d=a$U.fromAxisAngle(o,-n,X$M);var f=r$W.fromQuaternion(d,ve$r);a=a$11.normalize(r$W.multiplyByVector(f,a,a),a),t.bitangent&&(s=a$11.normalize(a$11.cross(o,a,s),s))}}else h=r$W.clone(r$W.IDENTITY,h);var p=le$v;t.st&&(p.x=i.x,p.y=i.y);for(var _=l.length,m=3*_,$=new Float64Array(m),g=t.normal?new Float32Array(m):void 0,y=t.tangent?new Float32Array(m):void 0,v=t.bitangent?new Float32Array(m):void 0,x=t.st?new Float32Array(2*_):void 0,b=0,S=0,w=0,C=0,T=0,P=0;P<_;P++){var E=l[P];if($[b++]=E.x,$[b++]=E.y,$[b++]=E.z,t.st){var A=r(r$W.multiplyByVector(h,E,pe$t),se$w);r$T.subtract(A,p,A);var L=n$1d.clamp(A.x/i.width,0,1),M=n$1d.clamp(A.y/i.height,0,1);x[T++]=L,x[T++]=M}t.normal&&(g[S++]=o.x,g[S++]=o.y,g[S++]=o.z),t.tangent&&(y[C++]=a.x,y[C++]=a.y,y[C++]=a.z),t.bitangent&&(v[w++]=s.x,v[w++]=s.y,v[w++]=s.z)}var I=new t$W;return t.position&&(I.position=new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:$})),t.normal&&(I.normal=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:g})),t.tangent&&(I.tangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:y})),t.bitangent&&(I.bitangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:v})),t.st&&(I.st=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:2,values:x})),new T$11({attributes:I,indices:c,primitiveType:H$11.TRIANGLES})}function A$X(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).polygonHierarchy;n$1e.defined("options.polygonHierarchy",t);var i=e$1Y(e.vertexFormat,n$12.DEFAULT);this._vertexFormat=n$12.clone(i),this._polygonHierarchy=t,this._stRotation=e$1Y(e.stRotation,0),this._ellipsoid=n$1c.clone(e$1Y(e.ellipsoid,n$1c.WGS84)),this._workerName="createCoplanarPolygonGeometry",this.packedLength=g$K.computeHierarchyPackedLength(t)+n$12.packedLength+n$1c.packedLength+2}A$X.fromPositions=function(e){return e=e$1Y(e,e$1Y.EMPTY_OBJECT),n$1e.defined("options.positions",e.positions),new A$X({polygonHierarchy:{positions:e.positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid})},A$X.pack=function(e,t,i){return n$1e.typeOf.object("value",e),n$1e.defined("array",t),i=e$1Y(i,0),i=g$K.packPolygonHierarchy(e._polygonHierarchy,t,i),n$1c.pack(e._ellipsoid,t,i),i+=n$1c.packedLength,n$12.pack(e._vertexFormat,t,i),i+=n$12.packedLength,t[i++]=e._stRotation,t[i]=e.packedLength,t};var Ae$j=n$1c.clone(n$1c.UNIT_SPHERE),Fe$d=new n$12,Te$s={polygonHierarchy:{}};function _$Z(e){for(var t=e.length,i=new Float64Array(3*t),n=fe$u.createTypedArray(t,2*t),r=0,o=0,a=0;a<t;a++){var s=e[a];i[r++]=s.x,i[r++]=s.y,i[r++]=s.z,n[o++]=a,n[o++]=(a+1)%t}return new T$11({attributes:new t$W({position:new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:i})}),indices:n,primitiveType:H$11.LINES})}function a$L(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).polygonHierarchy;n$1e.defined("options.polygonHierarchy",t),this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=g$K.computeHierarchyPackedLength(t)+1}A$X.unpack=function(e,t,i){n$1e.defined("array",e),t=e$1Y(t,0);var n=g$K.unpackPolygonHierarchy(e,t);t=n.startingIndex,delete n.startingIndex;var r=n$1c.unpack(e,t,Ae$j);t+=n$1c.packedLength;var o=n$12.unpack(e,t,Fe$d);t+=n$12.packedLength;var a=e[t++],s=e[t];return t$$(i)||(i=new A$X(Te$s)),i._polygonHierarchy=n,i._ellipsoid=n$1c.clone(r,i._ellipsoid),i._vertexFormat=n$12.clone(o,i._vertexFormat),i._stRotation=a,i.packedLength=s,i},A$X.createGeometry=function(e){var t=e._vertexFormat,i=e._polygonHierarchy,n=e._stRotation,r=i.positions;if(!((r=u$11(r,a$11.equalsEpsilon,!0)).length<3)){var o=ce$r,a=ye$q,s=ge$n,l=ue$t,u=fe$r;if(p$12.computeProjectTo2DArguments(r,O$N,l,u)){if(o=a$11.cross(l,u,o),o=a$11.normalize(o,o),!a$11.equalsEpsilon(O$N,a$11.ZERO,n$1d.EPSILON6)){var c=e._ellipsoid.geodeticSurfaceNormal(O$N,he$t);a$11.dot(o,c)<0&&(o=a$11.negate(o,o),l=a$11.negate(l,l))}var h=p$12.createProjectPointsTo2DFunction(O$N,l,u),d=p$12.createProjectPointTo2DFunction(O$N,l,u);t.tangent&&(a=a$11.clone(l,a)),t.bitangent&&(s=a$11.clone(u,s));var f=g$K.polygonsFromHierarchy(i,h,!1),p=f.hierarchy,_=f.polygons;if(0!==p.length){r=p[0].outerRing;for(var m=c$19.fromPoints(r),$=g$K.computeBoundingRectangle(o,d,r,n,me$A),g=[],y=0;y<_.length;y++){var v=new m$P({geometry:we$o(_[y],t,$,n,d,o,a,s)});g.push(v)}var x=F$W.combineInstances(g)[0];x.attributes.position.values=new Float64Array(x.attributes.position.values),x.indices=fe$u.createTypedArray(x.attributes.position.values.length/3,x.indices);var b=x.attributes;return t.position||delete b.position,new T$11({attributes:b,indices:x.indices,primitiveType:x.primitiveType,boundingSphere:m})}}}},a$L.fromPositions=function(e){return e=e$1Y(e,e$1Y.EMPTY_OBJECT),n$1e.defined("options.positions",e.positions),new a$L({polygonHierarchy:{positions:e.positions}})},a$L.pack=function(e,t,i){return n$1e.typeOf.object("value",e),n$1e.defined("array",t),i=e$1Y(i,0),t[i=g$K.packPolygonHierarchy(e._polygonHierarchy,t,i)]=e.packedLength,t};var L$W={polygonHierarchy:{}};a$L.unpack=function(e,t,i){n$1e.defined("array",e),t=e$1Y(t,0);var n=g$K.unpackPolygonHierarchy(e,t);t=n.startingIndex,delete n.startingIndex;var r=e[t];return t$$(i)||(i=new a$L(L$W)),i._polygonHierarchy=n,i.packedLength=r,i},a$L.createGeometry=function(e){var t=e._polygonHierarchy,i=t.positions;if(!((i=u$11(i,a$11.equalsEpsilon,!0)).length<3)&&p$12.validOutline(i)){var n=g$K.polygonOutlinesFromHierarchy(t,!1);if(0!==n.length){for(var r=[],o=0;o<n.length;o++){var a=new m$P({geometry:_$Z(n[o])});r.push(a)}var s=F$W.combineInstances(r)[0],l=c$19.fromPoints(t.positions);return new T$11({attributes:s.attributes,indices:s.indices,primitiveType:s.primitiveType,boundingSphere:l})}}};var e$1l={ROUNDED:0,MITERED:1,BEVELED:2},ie$D=Object.freeze(e$1l);function X$L(e){var t=e._uSquared,i=e._ellipsoid.maximumRadius,n=e._ellipsoid.minimumRadius,r=(i-n)/i,o=Math.cos(e._startHeading),a=Math.sin(e._startHeading),s=(1-r)*Math.tan(e._start.latitude),l=1/Math.sqrt(1+s*s),u=l*s,c=Math.atan2(s,o),h=l*a,d=h*h,f=1-d,p=Math.sqrt(f),_=t/4,m=_*_,$=m*_,g=m*m,y=1+_-3*m/4+5*$/4-175*g/64,v=1-_+15*m/8-35*$/8,x=1-3*_+35*m/4,b=1-5*_,S=y*c-v*Math.sin(2*c)*_/2-x*Math.sin(4*c)*m/16-b*Math.sin(6*c)*$/48-5*Math.sin(8*c)*g/512,w=e._constants;w.a=i,w.b=n,w.f=r,w.cosineHeading=o,w.sineHeading=a,w.tanU=s,w.cosineU=l,w.sineU=u,w.sigma=c,w.sineAlpha=h,w.sineSquaredAlpha=d,w.cosineSquaredAlpha=f,w.cosineAlpha=p,w.u2Over4=_,w.u4Over16=m,w.u6Over64=$,w.u8Over256=g,w.a0=y,w.a1=v,w.a2=x,w.a3=b,w.distanceRatio=S}function Y$N(e,t){return e*t*(4+e*(4-3*t))/16}function F$V(e,t,i,n,r,o,a){var s=Y$N(e,i);return(1-s)*e*t*(n+s*r*(a+s*o*(2*a*a-1)))}function Z$U(e,t,i,n,r,o,a){var s,l,u,c,h,d=(t-i)/t,f=o-n,p=Math.atan((1-d)*Math.tan(r)),_=Math.atan((1-d)*Math.tan(a)),m=Math.cos(p),$=Math.sin(p),g=Math.cos(_),y=Math.sin(_),v=m*g,x=m*y,b=$*y,S=$*g,w=f,C=n$1d.TWO_PI,T=Math.cos(w),P=Math.sin(w);do{T=Math.cos(w),P=Math.sin(w);var E,A=x-S*T;u=Math.sqrt(g*g*P*P+A*A),l=b+v*T,s=Math.atan2(u,l),0===u?(E=0,c=1):c=1-(E=v*P/u)*E,C=w,h=l-2*b/c,isNaN(h)&&(h=0),w=f+F$V(d,E,c,s,u,l,h)}while(Math.abs(w-C)>n$1d.EPSILON12);var L=c*(t*t-i*i)/(i*i),M=L*(256+L*(L*(74-47*L)-128))/1024,I=h*h,O=i*(1+L*(4096+L*(L*(320-175*L)-768))/16384)*(s-M*u*(h+M*(l*(2*I-1)-M*h*(4*u*u-3)*(4*I-3)/6)/4)),D=Math.atan2(g*P,x-S*T),R=Math.atan2(m*P,x*T-S);e._distance=O,e._startHeading=D,e._endHeading=R,e._uSquared=L}var $$R=new a$11,N$R=new a$11;function G$R(e,t,i,n){var r=a$11.normalize(n.cartographicToCartesian(t,N$R),$$R),o=a$11.normalize(n.cartographicToCartesian(i,N$R),N$R);n$1e.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(a$11.angleBetween(r,o))-Math.PI),.0125),Z$U(e,n.maximumRadius,n.minimumRadius,t.longitude,t.latitude,i.longitude,i.latitude),e._start=i$1g.clone(t,e._start),e._end=i$1g.clone(i,e._end),e._start.height=0,e._end.height=0,X$L(e)}function D$Y(e,t,i){var n=e$1Y(i,n$1c.WGS84);this._ellipsoid=n,this._start=new i$1g,this._end=new i$1g,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,t$$(e)&&t$$(t)&&G$R(this,e,t,n)}Object.defineProperties(D$Y.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return n$1e.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return n$1e.defined("distance",this._distance),this._startHeading}},endHeading:{get:function(){return n$1e.defined("distance",this._distance),this._endHeading}}}),D$Y.prototype.setEndPoints=function(e,t){n$1e.defined("start",e),n$1e.defined("end",t),G$R(this,e,t,this._ellipsoid)},D$Y.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)},D$Y.prototype.interpolateUsingSurfaceDistance=function(e,t){n$1e.defined("distance",this._distance);var i=this._constants,n=i.distanceRatio+e/i.b,r=Math.cos(2*n),o=Math.cos(4*n),a=Math.cos(6*n),s=Math.sin(2*n),l=Math.sin(4*n),u=Math.sin(6*n),c=Math.sin(8*n),h=n*n,d=n*h,f=i.u8Over256,p=i.u2Over4,_=i.u6Over64,m=i.u4Over16,$=2*d*f*r/3+n*(1-p+7*m/4-15*_/4+579*f/64-(m-15*_/4+187*f/16)*r-(5*_/4-115*f/16)*o-29*f*a/16)+(p/2-m+71*_/32-85*f/16)*s+(5*m/16-5*_/4+383*f/96)*l-h*((_-11*f/2)*s+5*f*l/2)+(29*_/96-29*f/16)*u+539*f*c/1536,g=Math.asin(Math.sin($)*i.cosineAlpha),y=Math.atan(i.a/i.b*Math.tan(g));$-=i.sigma;var v=Math.cos(2*i.sigma+$),x=Math.sin($),b=Math.cos($),S=i.cosineU*b,w=i.sineU*x,C=Math.atan2(x*i.sineHeading,S-w*i.cosineHeading)-F$V(i.f,i.sineAlpha,i.cosineSquaredAlpha,$,x,b,v);return t$$(t)?(t.longitude=this._start.longitude+C,t.latitude=y,t.height=0,t):new i$1g(this._start.longitude+C,y,0)};var v$V={numberOfPoints:function(e,t,i){var n=a$11.distance(e,t);return Math.ceil(n/i)},numberOfPointsRhumbLine:function(e,t,i){var n=Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2);return Math.ceil(Math.sqrt(n/(i*i)))}},j$Y=new i$1g;v$V.extractHeights=function(e,t){for(var i=e.length,n=new Array(i),r=0;r<i;r++){var o=e[r];n[r]=t.cartesianToCartographic(o,j$Y).height}return n};var F$U=new c$1a,J$T=new a$11,z$J=new a$11,K$M=new n$17(a$11.UNIT_X,0),X$K=new a$11,Q$U=new n$17(a$11.UNIT_X,0),$$Q=new a$11,rr$7=new a$11,G$Q=[];function V$I(e,t,i){var n,r=G$Q;if(r.length=e,t===i){for(n=0;n<e;n++)r[n]=t;return r}var o=(i-t)/e;for(n=0;n<e;n++){var a=t+n*o;r[n]=a}return r}function ar$4(e,t){var i=G$Q;i.length=e;for(var n=0;n<e;n++)i[n]+=t*Math.sin(Math.PI*n/e);return i}var I$$=new i$1g,_$Y=new i$1g,y$U=new a$11,k$T=new a$11,W$$=new a$11,B$J=new D$Y,R$O=new M$1c;function er$6(e,t,i,n,r,o,a,s,l){var u=n.scaleToGeodeticSurface(e,k$T),c=n.scaleToGeodeticSurface(t,W$$),h=v$V.numberOfPoints(e,t,i),d=n.cartesianToCartographic(u,I$$),f=n.cartesianToCartographic(c,_$Y),p=V$I(h,r,o);l>0&&(p=ar$4(h,l)),B$J.setEndPoints(d,f);var _=B$J.surfaceDistance/h,m=s;d.height=r;var $=n.cartographicToCartesian(d,y$U);a$11.pack($,a,m),m+=3;for(var g=1;g<h;g++){var y=B$J.interpolateUsingSurfaceDistance(g*_,_$Y);y.height=p[g],$=n.cartographicToCartesian(y,y$U),a$11.pack($,a,m),m+=3}return m}function nr$6(e,t,i,n,r,o,a,s){var l=n.scaleToGeodeticSurface(e,k$T),u=n.scaleToGeodeticSurface(t,W$$),c=n.cartesianToCartographic(l,I$$),h=n.cartesianToCartographic(u,_$Y),d=v$V.numberOfPointsRhumbLine(c,h,i),f=V$I(d,r,o);R$O.ellipsoid.equals(n)||(R$O=new M$1c(void 0,void 0,n)),R$O.setEndPoints(c,h);var p=R$O.surfaceDistance/d,_=s;c.height=r;var m=n.cartographicToCartesian(c,y$U);a$11.pack(m,a,_),_+=3;for(var $=1;$<d;$++){var g=R$O.interpolateUsingSurfaceDistance($*p,_$Y);g.height=f[$],m=n.cartographicToCartesian(g,y$U),a$11.pack(m,a,_),_+=3}return _}v$V.wrapLongitude=function(e,t){var i=[],n=[];if(t$$(e)&&e.length>0){t=e$1Y(t,c$1a.IDENTITY);var r=c$1a.inverseTransformation(t,F$U),o=c$1a.multiplyByPoint(r,a$11.ZERO,J$T),a=a$11.normalize(c$1a.multiplyByPointAsVector(r,a$11.UNIT_Y,z$J),z$J),s=n$17.fromPointNormal(o,a,K$M),l=a$11.normalize(c$1a.multiplyByPointAsVector(r,a$11.UNIT_X,X$K),X$K),u=n$17.fromPointNormal(o,l,Q$U),c=1;i.push(a$11.clone(e[0]));for(var h=i[0],d=e.length,f=1;f<d;++f){var p=e[f];if(n$17.getPointDistance(u,h)<0||n$17.getPointDistance(u,p)<0){var _=h$1b.lineSegmentPlane(h,p,s,$$Q);if(t$$(_)){var m=a$11.multiplyByScalar(a,5e-9,rr$7);n$17.getPointDistance(s,h)<0&&a$11.negate(m,m),i.push(a$11.add(_,m,new a$11)),n.push(c+1),a$11.negate(m,m),i.push(a$11.add(_,m,new a$11)),c=1}}i.push(a$11.clone(e[f])),c++,h=p}n.push(c)}return{positions:i,lengths:n}},v$V.generateArc=function(e){t$$(e)||(e={});var t=e.positions;if(!t$$(t))throw new t$_("options.positions is required.");var i=t.length,n=e$1Y(e.ellipsoid,n$1c.WGS84),r=e$1Y(e.height,0),o=Array.isArray(r);if(i<1)return[];if(1===i){var a=n.scaleToGeodeticSurface(t[0],k$T);if(0!==(r=o?r[0]:r)){var s=n.geodeticSurfaceNormal(a,y$U);a$11.multiplyByScalar(s,r,s),a$11.add(a,s,a)}return[a.x,a.y,a.z]}var l=e.minDistance;if(!t$$(l)){var u=e$1Y(e.granularity,n$1d.RADIANS_PER_DEGREE);l=n$1d.chordLength(u,n.maximumRadius)}var c,h=0;for(c=0;c<i-1;c++)h+=v$V.numberOfPoints(t[c],t[c+1],l);var d=e.hMax,f=3*(h+1),p=new Array(f),_=0;for(c=0;c<i-1;c++){_=er$6(t[c],t[c+1],l,n,o?r[c]:r,o?r[c+1]:r,p,_,d)}G$Q.length=0;var m=t[i-1],$=n.cartesianToCartographic(m,I$$);$.height=o?r[i-1]:r;var g=n.cartographicToCartesian($,y$U);return a$11.pack(g,p,f-3),p};var Y$M=new i$1g,ir$9=new i$1g;v$V.generateRhumbArc=function(e){t$$(e)||(e={});var t=e.positions;if(!t$$(t))throw new t$_("options.positions is required.");var i=t.length,n=e$1Y(e.ellipsoid,n$1c.WGS84),r=e$1Y(e.height,0),o=Array.isArray(r);if(i<1)return[];if(1===i){var a=n.scaleToGeodeticSurface(t[0],k$T);if(0!==(r=o?r[0]:r)){var s=n.geodeticSurfaceNormal(a,y$U);a$11.multiplyByScalar(s,r,s),a$11.add(a,s,a)}return[a.x,a.y,a.z]}var l,u,c=e$1Y(e.granularity,n$1d.RADIANS_PER_DEGREE),h=0,d=n.cartesianToCartographic(t[0],Y$M);for(l=0;l<i-1;l++)u=n.cartesianToCartographic(t[l+1],ir$9),h+=v$V.numberOfPointsRhumbLine(d,u,c),d=i$1g.clone(u,Y$M);var f=3*(h+1),p=new Array(f),_=0;for(l=0;l<i-1;l++){_=nr$6(t[l],t[l+1],c,n,o?r[l]:r,o?r[l+1]:r,p,_)}G$Q.length=0;var m=t[i-1],$=n.cartesianToCartographic(m,I$$);$.height=o?r[i-1]:r;var g=n.cartographicToCartesian($,y$U);return a$11.pack(g,p,f-3),p},v$V.generateCartesianArc=function(e){for(var t=v$V.generateArc(e),i=t.length/3,n=new Array(i),r=0;r<i;r++)n[r]=a$11.unpack(t,3*r);return n},v$V.generateCartesianRhumbArc=function(e){for(var t=v$V.generateRhumbArc(e),i=t.length/3,n=new Array(i),r=0;r<i;r++)n[r]=a$11.unpack(t,3*r);return n};var v$U=[new a$11,new a$11],fr$5=new a$11,vr$5=new a$11,gr$2=new a$11,hr$4=new a$11,wr$2=new a$11,Br$2=new a$11,Er$3=new a$11,zr$2=new a$11,Sr$2=new a$11,J$S=new a$11,er$5=new a$11,K$L={},yr$3=new i$1g;function Ar$3(e,t){for(var i=new Array(e.length),n=0;n<e.length;n++){var r=e[n];yr$3=t.cartesianToCartographic(r,yr$3),i[n]=yr$3.height,e[n]=t.scaleToGeodeticSurface(r,r)}return i}function $$P(e,t,i,n){var r,o=e[0],a=e[1],s=a$11.angleBetween(o,a),l=Math.ceil(s/n),u=new Array(l);if(t===i){for(r=0;r<l;r++)u[r]=t;return u.push(i),u}var c=(i-t)/l;for(r=1;r<l;r++){var h=t+r*c;u[r]=h}return u[0]=t,u.push(i),u}var tr$7=new a$11,nr$5=new a$11;function xr$3(e,t,i,n){var r=new s$1h(i,n),o=r.projectPointOntoPlane(a$11.add(i,e,tr$7),tr$7),a=r.projectPointOntoPlane(a$11.add(i,t,nr$5),nr$5),s=r$T.angleBetween(o,a);return a.x*o.y-a.y*o.x>=0?-s:s}var Pr$3=new a$11(-1,0,0),F$T=c$1a.clone(c$1a.IDENTITY),Dr$4=new c$1a,L$V=new r$W,Nr$4=r$W.IDENTITY.clone(),Tr$3=new a$11,br$3=new a$10,or$5=new a$11;function j$X(e,t,i,n,r,o,a,s){var l=Tr$3,u=br$3;F$T=m$13.eastNorthUpToFixedFrame(e,r,F$T),l=c$1a.multiplyByPointAsVector(F$T,Pr$3,l);var c=xr$3(l=a$11.normalize(l,l),t,e,r);L$V=r$W.fromRotationZ(c,L$V),or$5.z=o,F$T=c$1a.multiplyTransformation(F$T,c$1a.fromRotationTranslation(L$V,or$5,Dr$4),F$T);var h=Nr$4;h[0]=a;for(var d=0;d<s;d++)for(var f=0;f<i.length;f+=3)u=a$11.fromArray(i,f,u),u=r$W.multiplyByVector(h,u,u),u=c$1a.multiplyByPoint(F$T,u,u),n.push(u.x,u.y,u.z);return n}function k$S(e,t,i,n,r,o,a,s,l){var u=Tr$3,c=br$3;F$T=m$13.eastNorthUpToFixedFrame(e,r,F$T),u=c$1a.multiplyByPointAsVector(F$T,Pr$3,u);var h=xr$3(u=a$11.normalize(u,u),t,e,r);L$V=r$W.fromRotationZ(h,L$V),or$5.z=o,F$T=c$1a.multiplyTransformation(F$T,c$1a.fromRotationTranslation(L$V,or$5,Dr$4),F$T);var d=Nr$4;d[0]=a;for(var f=0;f<s;f++)for(var p=0;p<i.length;p+=3)c=a$11.fromArray(i,p,c),c=r$W.multiplyByVector(d,c,c),c=c$1a.multiplyByPoint(F$T,c,c),c=c$1a.multiplyByPoint(l,c,c),n.push(c.x,c.y,c.z);return n}var Fr$2=new a$11;function rr$6(e,t,i,n,r,o,a){for(var s=0;s<e.length;s+=3){n=j$X(a$11.fromArray(e,s,Fr$2),t,i,n,r,o[s/3],a,1)}return n}function jr$2(e,t,i,n,r,o,a,s){for(var l=0;l<e.length;l+=3){n=k$S(a$11.fromArray(e,l,Fr$2),t,i,n,r,o[l/3],a,1,s)}return n}function Ir$3(e,t){var i=e.length,n=new Array(6*i),r=0,o=t.x+t.width/2,a=t.y+t.height/2,s=e[0];n[r++]=s.x-o,n[r++]=0,n[r++]=s.y-a;for(var l=1;l<i;l++){var u=(s=e[l]).x-o,c=s.y-a;n[r++]=u,n[r++]=0,n[r++]=c,n[r++]=u,n[r++]=0,n[r++]=c}return s=e[0],n[r++]=s.x-o,n[r++]=0,n[r++]=s.y-a,n}function lr$4(e,t){for(var i=e.length,n=new Array(3*i),r=0,o=t.x+t.width/2,a=t.y+t.height/2,s=0;s<i;s++)n[r++]=e[s].x-o,n[r++]=0,n[r++]=e[s].y-a;return n}var Ur$1=new a$U,Gr$1=new a$11,Mr$1=new r$W;function ir$8(e,t,i,n,r,o,a,s,l,u){var c,h,d=a$11.angleBetween(a$11.subtract(t,e,J$S),a$11.subtract(i,e,er$5)),f=n===ie$D.BEVELED?0:Math.ceil(d/n$1d.toRadians(5));if(c=r?r$W.fromQuaternion(a$U.fromAxisAngle(a$11.negate(e,J$S),d/(f+1),Ur$1),Mr$1):r$W.fromQuaternion(a$U.fromAxisAngle(e,d/(f+1),Ur$1),Mr$1),t=a$11.clone(t,Gr$1),f>0)for(var p=u?2:1,_=0;_<f;_++)t=r$W.multiplyByVector(c,t,t),h=a$11.subtract(t,e,J$S),h=a$11.normalize(h,h),r||(h=a$11.negate(h,h)),a=j$X(o.scaleToGeodeticSurface(t,er$5),h,s,a,o,l,1,p);else h=a$11.subtract(t,e,J$S),h=a$11.normalize(h,h),r||(h=a$11.negate(h,h)),a=j$X(o.scaleToGeodeticSurface(t,er$5),h,s,a,o,l,1,1),i=a$11.clone(i,Gr$1),h=a$11.subtract(i,e,J$S),h=a$11.normalize(h,h),r||(h=a$11.negate(h,h)),a=j$X(o.scaleToGeodeticSurface(i,er$5),h,s,a,o,l,1,1);return a}K$L.removeDuplicatesFromShape=function(e){for(var t=e.length,i=[],n=t-1,r=0;r<t;n=r++){var o=e[n],a=e[r];r$T.equals(o,a)||i.push(a)}return i},K$L.angleIsGreaterThanPi=function(e,t,i,n){var r=new s$1h(i,n),o=r.projectPointOntoPlane(a$11.add(i,e,tr$7),tr$7),a=r.projectPointOntoPlane(a$11.add(i,t,nr$5),nr$5);return a.x*o.y-a.y*o.x>=0};var _r$4=new a$11,Vr$2=new a$11;K$L.computePositions=function(e,t,i,n,r){var o=n._ellipsoid,a=Ar$3(e,o),s=n._granularity,l=n._cornerType,u=r?Ir$3(t,i):lr$4(t,i),c=r?lr$4(t,i):void 0,h=i.height/2,d=i.width/2,f=e.length,p=[],_=r?[]:void 0,m=fr$5,$=vr$5,g=gr$2,y=hr$4,v=wr$2,x=Br$2,b=Er$3,S=zr$2,w=Sr$2,C=e[0],T=e[1];y=o.geodeticSurfaceNormal(C,y),m=a$11.subtract(T,C,m),m=a$11.normalize(m,m),S=a$11.cross(y,m,S),S=a$11.normalize(S,S);var P=a[0],E=a[1];r&&(_=j$X(C,S,c,_,o,P+h,1,1)),w=a$11.clone(C,w),C=T,$=a$11.negate(m,$);for(var A,L=1;L<f-1;L++){var M=r?2:1;T=e[L+1],m=a$11.subtract(T,C,m),m=a$11.normalize(m,m),g=a$11.add(m,$,g),g=a$11.normalize(g,g),y=o.geodeticSurfaceNormal(C,y);var I=a$11.multiplyByScalar(y,a$11.dot(m,y),_r$4);a$11.subtract(m,I,I),a$11.normalize(I,I);var O=a$11.multiplyByScalar(y,a$11.dot($,y),Vr$2);if(a$11.subtract($,O,O),a$11.normalize(O,O),!n$1d.equalsEpsilon(Math.abs(a$11.dot(I,O)),1,n$1d.EPSILON7)){g=a$11.cross(g,y,g),g=a$11.cross(y,g,g),g=a$11.normalize(g,g);var D=1/Math.max(.25,a$11.magnitude(a$11.cross(g,$,J$S))),R=K$L.angleIsGreaterThanPi(m,$,C,o);R?(v=a$11.add(C,a$11.multiplyByScalar(g,D*d,g),v),x=a$11.add(v,a$11.multiplyByScalar(S,d,x),x),v$U[0]=a$11.clone(w,v$U[0]),v$U[1]=a$11.clone(x,v$U[1]),A=$$P(v$U,P+h,E+h,s),p=rr$6(v$V.generateArc({positions:v$U,granularity:s,ellipsoid:o}),S,u,p,o,A,1),S=a$11.cross(y,m,S),S=a$11.normalize(S,S),b=a$11.add(v,a$11.multiplyByScalar(S,d,b),b),l===ie$D.ROUNDED||l===ie$D.BEVELED?ir$8(v,x,b,l,R,o,p,u,E+h,r):p=j$X(C,g=a$11.negate(g,g),u,p,o,E+h,D,M),w=a$11.clone(b,w)):(v=a$11.add(C,a$11.multiplyByScalar(g,D*d,g),v),x=a$11.add(v,a$11.multiplyByScalar(S,-d,x),x),v$U[0]=a$11.clone(w,v$U[0]),v$U[1]=a$11.clone(x,v$U[1]),A=$$P(v$U,P+h,E+h,s),p=rr$6(v$V.generateArc({positions:v$U,granularity:s,ellipsoid:o}),S,u,p,o,A,1),S=a$11.cross(y,m,S),S=a$11.normalize(S,S),b=a$11.add(v,a$11.multiplyByScalar(S,-d,b),b),l===ie$D.ROUNDED||l===ie$D.BEVELED?ir$8(v,x,b,l,R,o,p,u,E+h,r):p=j$X(C,g,u,p,o,E+h,D,M),w=a$11.clone(b,w)),$=a$11.negate(m,$)}else p=j$X(w,S,u,p,o,P+h,1,1),w=C;P=E,E=a[L+1],C=T}v$U[0]=a$11.clone(w,v$U[0]),v$U[1]=a$11.clone(C,v$U[1]),A=$$P(v$U,P+h,E+h,s),p=rr$6(v$V.generateArc({positions:v$U,granularity:s,ellipsoid:o}),S,u,p,o,A,1),r&&(_=j$X(C,S,c,_,o,E+h,1,1)),f=p.length;var N=r?f+_.length:f,F=new Float64Array(N);return F.set(p),r&&F.set(_,f),F},K$L.computeLocalPositions=function(e,t,i,n,r,o){var a=n._ellipsoid,s=Ar$3(e,a),l=n._granularity,u=n._cornerType,c=r?Ir$3(t,i):lr$4(t,i),h=r?lr$4(t,i):void 0,d=i.width/2,f=e.length,p=[],_=r?[]:void 0,m=fr$5,$=vr$5,g=gr$2,y=hr$4,v=wr$2,x=Br$2,b=Er$3,S=zr$2,w=Sr$2,C=m$13.eastNorthUpToFixedFrame(o,a,new c$1a),T=c$1a.inverse(C,new c$1a),P=e[0],E=e[1];y=a.geodeticSurfaceNormal(P,y),m=a$11.subtract(E,P,m),m=a$11.normalize(m,m),S=a$11.cross(y,m,S),S=a$11.normalize(S,S);var A=s[0],L=s[1];r&&(_=k$S(P,S,h,_,a,A+0,1,1,T)),w=a$11.clone(P,w),P=E,$=a$11.negate(m,$);for(var M,I=1;I<f-1;I++){var O=r?2:1;E=e[I+1],m=a$11.subtract(E,P,m),m=a$11.normalize(m,m),g=a$11.add(m,$,g),g=a$11.normalize(g,g),y=a.geodeticSurfaceNormal(P,y);var D=a$11.multiplyByScalar(y,a$11.dot(m,y),_r$4);a$11.subtract(m,D,D),a$11.normalize(D,D);var R=a$11.multiplyByScalar(y,a$11.dot($,y),Vr$2);if(a$11.subtract($,R,R),a$11.normalize(R,R),!n$1d.equalsEpsilon(Math.abs(a$11.dot(D,R)),1,n$1d.EPSILON7)){g=a$11.cross(g,y,g),g=a$11.cross(y,g,g),g=a$11.normalize(g,g);var N=1/Math.max(.25,a$11.magnitude(a$11.cross(g,$,J$S))),F=K$L.angleIsGreaterThanPi(m,$,P,a);F?(v=a$11.add(P,a$11.multiplyByScalar(g,N*d,g),v),x=a$11.add(v,a$11.multiplyByScalar(S,d,x),x),v$U[0]=a$11.clone(w,v$U[0]),v$U[1]=a$11.clone(x,v$U[1]),M=$$P(v$U,A+0,L+0,l),p=rr$6(v$V.generateArc({positions:v$U,granularity:l,ellipsoid:a}),S,c,p,a,M,1,fromEnu),S=a$11.cross(y,m,S),S=a$11.normalize(S,S),b=a$11.add(v,a$11.multiplyByScalar(S,d,b),b),u===ie$D.ROUNDED||u===ie$D.BEVELED?ir$8(v,x,b,u,F,a,p,c,L+0,r):p=k$S(P,g=a$11.negate(g,g),c,p,a,L+0,N,O,T),w=a$11.clone(b,w)):(v=a$11.add(P,a$11.multiplyByScalar(g,N*d,g),v),x=a$11.add(v,a$11.multiplyByScalar(S,-d,x),x),v$U[0]=a$11.clone(w,v$U[0]),v$U[1]=a$11.clone(x,v$U[1]),M=$$P(v$U,A+0,L+0,l),p=rr$6(v$V.generateArc({positions:v$U,granularity:l,ellipsoid:a}),S,c,p,a,M,1),S=a$11.cross(y,m,S),S=a$11.normalize(S,S),b=a$11.add(v,a$11.multiplyByScalar(S,-d,b),b),u===ie$D.ROUNDED||u===ie$D.BEVELED?ir$8(v,x,b,u,F,a,p,c,L+0,r):p=k$S(P,g,c,p,a,L+0,N,O,T),w=a$11.clone(b,w)),$=a$11.negate(m,$)}else p=k$S(w,S,c,p,a,A+0,1,1,T),w=P;A=L,L=s[I+1],P=E}v$U[0]=a$11.clone(w,v$U[0]),v$U[1]=a$11.clone(P,v$U[1]),M=$$P(v$U,A+0,L+0,l),p=jr$2(v$V.generateArc({positions:v$U,granularity:l,ellipsoid:a}),S,c,p,a,M,1,T),r&&(_=k$S(P,S,h,_,a,L+0,1,1,T)),f=p.length;var B=r?f+_.length:f,z=new Float64Array(B);return z.set(p),r&&z.set(_,f),z};var T$S={},B$I=new a$11,j$W=new a$11,k$R=new a$11,C$T=new a$11,f$X=[new a$11,new a$11],F$S=new a$11,H$T=new a$11,J$R=new a$11,rr$5=new a$11,ar$3=new a$11,er$4=new a$11,tr$6=new a$11,nr$4=new a$11,lr$3=new a$11,or$4=new a$11,K$K=new a$U,W$_=new r$W;function M$$(e,t,i,n,r){var o,a=a$11.angleBetween(a$11.subtract(t,e,B$I),a$11.subtract(i,e,j$W)),s=n===ie$D.BEVELED?1:Math.ceil(a/n$1d.toRadians(5))+1,l=3*s,u=new Array(l);u[l-3]=i.x,u[l-2]=i.y,u[l-1]=i.z,o=r?r$W.fromQuaternion(a$U.fromAxisAngle(a$11.negate(e,B$I),a/s,K$K),W$_):r$W.fromQuaternion(a$U.fromAxisAngle(e,a/s,K$K),W$_);var c=0;t=a$11.clone(t,B$I);for(var h=0;h<s;h++)t=r$W.multiplyByVector(o,t,t),u[c++]=t.x,u[c++]=t.y,u[c++]=t.z;return u}function ir$7(e){var t=F$S,i=H$T,n=J$R,r=e[1];i=a$11.fromArray(e[1],r.length-3,i),n=a$11.fromArray(e[0],0,n);var o=M$$(t=a$11.midpoint(i,n,t),i,n,ie$D.ROUNDED,!1),a=e.length-1,s=e[a-1];return r=e[a],i=a$11.fromArray(s,s.length-3,i),n=a$11.fromArray(r,0,n),[o,M$$(t=a$11.midpoint(i,n,t),i,n,ie$D.ROUNDED,!1)]}function X$J(e,t,i,n){var r=B$I;return n||(t=a$11.negate(t,t)),[(r=a$11.add(e,t,r)).x,r.y,r.z,i.x,i.y,i.z]}function q$14(e,t,i,n){for(var r=new Array(e.length),o=new Array(e.length),a=a$11.multiplyByScalar(t,i,B$I),s=a$11.negate(a,j$W),l=0,u=e.length-1,c=0;c<e.length;c+=3){var h=a$11.fromArray(e,c,k$R),d=a$11.add(h,s,C$T);r[l++]=d.x,r[l++]=d.y,r[l++]=d.z;var f=a$11.add(h,a,C$T);o[u--]=f.z,o[u--]=f.y,o[u--]=f.x}return n.push(r,o),n}T$S.addAttribute=function(e,t,i,n){var r=t.x,o=t.y,a=t.z;t$$(i)&&(e[i]=r,e[i+1]=o,e[i+2]=a),t$$(n)&&(e[n]=a,e[n-1]=o,e[n-2]=r)};var sr$3=new a$11,ur$2=new a$11;T$S.computePositions=function(e){var t=e.granularity,i=e.positions,n=e.ellipsoid,r=e.width/2,o=e.cornerType,a=e.saveAttributes,s=F$S,l=H$T,u=J$R,c=rr$5,h=ar$3,d=er$4,f=tr$6,p=nr$4,_=lr$3,m=or$4,$=[],g=a?[]:void 0,y=a?[]:void 0,v=i[0],x=i[1];l=a$11.normalize(a$11.subtract(x,v,l),l),s=n.geodeticSurfaceNormal(v,s),c=a$11.normalize(a$11.cross(s,l,c),c),a&&(g.push(c.x,c.y,c.z),y.push(s.x,s.y,s.z)),f=a$11.clone(v,f),v=x,u=a$11.negate(l,u);var b,S,w=[],C=i.length;for(b=1;b<C-1;b++){s=n.geodeticSurfaceNormal(v,s),x=i[b+1],l=a$11.normalize(a$11.subtract(x,v,l),l),h=a$11.normalize(a$11.add(l,u,h),h);var T=a$11.multiplyByScalar(s,a$11.dot(l,s),sr$3);a$11.subtract(l,T,T),a$11.normalize(T,T);var P=a$11.multiplyByScalar(s,a$11.dot(u,s),ur$2);if(a$11.subtract(u,P,P),a$11.normalize(P,P),!n$1d.equalsEpsilon(Math.abs(a$11.dot(T,P)),1,n$1d.EPSILON7)){h=a$11.cross(h,s,h),h=a$11.cross(s,h,h),h=a$11.normalize(h,h);var E=r/Math.max(.25,a$11.magnitude(a$11.cross(h,u,B$I))),A=K$L.angleIsGreaterThanPi(l,u,v,n);h=a$11.multiplyByScalar(h,E,h),A?(p=a$11.add(v,h,p),m=a$11.add(p,a$11.multiplyByScalar(c,r,m),m),_=a$11.add(p,a$11.multiplyByScalar(c,2*r,_),_),f$X[0]=a$11.clone(f,f$X[0]),f$X[1]=a$11.clone(m,f$X[1]),$=q$14(v$V.generateArc({positions:f$X,granularity:t,ellipsoid:n}),c,r,$),a&&(g.push(c.x,c.y,c.z),y.push(s.x,s.y,s.z)),d=a$11.clone(_,d),c=a$11.normalize(a$11.cross(s,l,c),c),_=a$11.add(p,a$11.multiplyByScalar(c,2*r,_),_),f=a$11.add(p,a$11.multiplyByScalar(c,r,f),f),o===ie$D.ROUNDED||o===ie$D.BEVELED?w.push({leftPositions:M$$(p,d,_,o,A)}):w.push({leftPositions:X$J(v,a$11.negate(h,h),_,A)})):(_=a$11.add(v,h,_),m=a$11.add(_,a$11.negate(a$11.multiplyByScalar(c,r,m),m),m),p=a$11.add(_,a$11.negate(a$11.multiplyByScalar(c,2*r,p),p),p),f$X[0]=a$11.clone(f,f$X[0]),f$X[1]=a$11.clone(m,f$X[1]),$=q$14(v$V.generateArc({positions:f$X,granularity:t,ellipsoid:n}),c,r,$),a&&(g.push(c.x,c.y,c.z),y.push(s.x,s.y,s.z)),d=a$11.clone(p,d),c=a$11.normalize(a$11.cross(s,l,c),c),p=a$11.add(_,a$11.negate(a$11.multiplyByScalar(c,2*r,p),p),p),f=a$11.add(_,a$11.negate(a$11.multiplyByScalar(c,r,f),f),f),o===ie$D.ROUNDED||o===ie$D.BEVELED?w.push({rightPositions:M$$(_,d,p,o,A)}):w.push({rightPositions:X$J(v,h,p,A)})),u=a$11.negate(l,u)}v=x}return s=n.geodeticSurfaceNormal(v,s),f$X[0]=a$11.clone(f,f$X[0]),f$X[1]=a$11.clone(v,f$X[1]),$=q$14(v$V.generateArc({positions:f$X,granularity:t,ellipsoid:n}),c,r,$),a&&(g.push(c.x,c.y,c.z),y.push(s.x,s.y,s.z)),o===ie$D.ROUNDED&&(S=ir$7($)),{positions:$,corners:w,lefts:g,normals:y,endPositions:S}};var Rt$9=new a$11,Yt$8=new a$11,xt$a=new a$11,Nt$8=new a$11,Xt$7=new a$11,Bt$a=new a$11,st$d=new a$11,ct$h=new a$11;function Ct$6(e,t){for(var i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}function q$13(e,t,i,n,r,o){var a=e.normals,s=e.tangents,l=e.bitangents,u=a$11.normalize(a$11.cross(i,t,st$d),st$d);o.normal&&T$S.addAttribute(a,t,n,r),o.tangent&&T$S.addAttribute(s,u,n,r),o.bitangent&&T$S.addAttribute(l,i,n,r)}function St$8(e,t,i){var n,r,o,a=e.positions,s=e.corners,l=e.endPositions,u=e.lefts,c=e.normals,h=new t$W,d=0,f=0,p=0;for(r=0;r<a.length;r+=2)d+=o=a[r].length-3,p+=2*o,f+=a[r+1].length-3;for(d+=3,f+=3,r=0;r<s.length;r++){n=s[r];var _=s[r].leftPositions;t$$(_)?(d+=o=_.length,p+=o):(f+=o=s[r].rightPositions.length,p+=o)}var m,$=t$$(l);$&&(d+=m=l[0].length-3,f+=m,p+=6*(m/=3));var g,y,v,x,b,S,w=d+f,C=new Float64Array(w),T={normals:t.normal?new Float32Array(w):void 0,tangents:t.tangent?new Float32Array(w):void 0,bitangents:t.bitangent?new Float32Array(w):void 0},P=0,E=w-1,A=Rt$9,L=Yt$8,M=m/2,I=fe$u.createTypedArray(w/3,p),O=0;if($){S=xt$a,b=Nt$8;var D=l[0];for(A=a$11.fromArray(c,0,A),L=a$11.fromArray(u,0,L),r=0;r<M;r++)S=a$11.fromArray(D,3*(M-1-r),S),b=a$11.fromArray(D,3*(M+r),b),T$S.addAttribute(C,b,P),T$S.addAttribute(C,S,void 0,E),q$13(T,A,L,P,E,t),x=(y=P/3)+1,v=(g=(E-2)/3)-1,I[O++]=g,I[O++]=y,I[O++]=v,I[O++]=v,I[O++]=y,I[O++]=x,P+=3,E-=3}var R,N,F=0,B=0,z=a[F++],G=a[F++];for(C.set(z,P),C.set(G,E-G.length+1),L=a$11.fromArray(u,B,L),o=G.length-3,r=0;r<o;r+=3)R=i.geodeticSurfaceNormal(a$11.fromArray(z,r,st$d),st$d),N=i.geodeticSurfaceNormal(a$11.fromArray(G,o-r,ct$h),ct$h),q$13(T,A=a$11.normalize(a$11.add(R,N,A),A),L,P,E,t),x=(y=P/3)+1,v=(g=(E-2)/3)-1,I[O++]=g,I[O++]=y,I[O++]=v,I[O++]=v,I[O++]=y,I[O++]=x,P+=3,E-=3;for(R=i.geodeticSurfaceNormal(a$11.fromArray(z,o,st$d),st$d),N=i.geodeticSurfaceNormal(a$11.fromArray(G,o,ct$h),ct$h),A=a$11.normalize(a$11.add(R,N,A),A),B+=3,r=0;r<s.length;r++){var k,U,V,W=(n=s[r]).leftPositions,H=n.rightPositions,Y=Bt$a,j=xt$a,q=Nt$8;if(A=a$11.fromArray(c,B,A),t$$(W)){for(q$13(T,A,L,void 0,E,t),E-=3,U=x,V=v,k=0;k<W.length/3;k++)Y=a$11.fromArray(W,3*k,Y),I[O++]=U,I[O++]=V-k-1,I[O++]=V-k,T$S.addAttribute(C,Y,void 0,E),j=a$11.fromArray(C,3*(V-k-1),j),q=a$11.fromArray(C,3*U,q),q$13(T,A,L=a$11.normalize(a$11.subtract(j,q,L),L),void 0,E,t),E-=3;Y=a$11.fromArray(C,3*U,Y),j=a$11.subtract(a$11.fromArray(C,3*V,j),Y,j),q=a$11.subtract(a$11.fromArray(C,3*(V-k),q),Y,q),q$13(T,A,L=a$11.normalize(a$11.add(j,q,L),L),P,void 0,t),P+=3}else{for(q$13(T,A,L,P,void 0,t),P+=3,U=v,V=x,k=0;k<H.length/3;k++)Y=a$11.fromArray(H,3*k,Y),I[O++]=U,I[O++]=V+k,I[O++]=V+k+1,T$S.addAttribute(C,Y,P),j=a$11.fromArray(C,3*U,j),q=a$11.fromArray(C,3*(V+k),q),q$13(T,A,L=a$11.normalize(a$11.subtract(j,q,L),L),P,void 0,t),P+=3;Y=a$11.fromArray(C,3*U,Y),j=a$11.subtract(a$11.fromArray(C,3*(V+k),j),Y,j),q=a$11.subtract(a$11.fromArray(C,3*V,q),Y,q),q$13(T,A,L=a$11.normalize(a$11.negate(a$11.add(q,j,L),L),L),void 0,E,t),E-=3}for(z=a[F++],G=a[F++],z.splice(0,3),G.splice(G.length-3,3),C.set(z,P),C.set(G,E-G.length+1),o=G.length-3,B+=3,L=a$11.fromArray(u,B,L),k=0;k<G.length;k+=3)R=i.geodeticSurfaceNormal(a$11.fromArray(z,k,st$d),st$d),N=i.geodeticSurfaceNormal(a$11.fromArray(G,o-k,ct$h),ct$h),q$13(T,A=a$11.normalize(a$11.add(R,N,A),A),L,P,E,t),y=(x=P/3)-1,g=(v=(E-2)/3)+1,I[O++]=g,I[O++]=y,I[O++]=v,I[O++]=v,I[O++]=y,I[O++]=x,P+=3,E-=3;P-=3,E+=3}if(q$13(T,A=a$11.fromArray(c,c.length-3,A),L,P,E,t),$){P+=3,E-=3,S=xt$a,b=Nt$8;var X=l[1];for(r=0;r<M;r++)S=a$11.fromArray(X,3*(m-r-1),S),b=a$11.fromArray(X,3*r,b),T$S.addAttribute(C,S,void 0,E),T$S.addAttribute(C,b,P),q$13(T,A,L,P,E,t),y=(x=P/3)-1,g=(v=(E-2)/3)+1,I[O++]=g,I[O++]=y,I[O++]=v,I[O++]=v,I[O++]=y,I[O++]=x,P+=3,E-=3}if(h.position=new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:C}),t.st){var K,Z,J=new Float32Array(w/3*2),Q=0;if($){d/=3,f/=3;var ee=Math.PI/(m+1);Z=1/(d-m+1),K=1/(f-m+1);var te,ie=m/2;for(r=ie+1;r<m+1;r++)te=n$1d.PI_OVER_TWO+ee*r,J[Q++]=K*(1+Math.cos(te)),J[Q++]=.5*(1+Math.sin(te));for(r=1;r<f-m+1;r++)J[Q++]=r*K,J[Q++]=0;for(r=m;r>ie;r--)te=n$1d.PI_OVER_TWO-r*ee,J[Q++]=1-K*(1+Math.cos(te)),J[Q++]=.5*(1+Math.sin(te));for(r=ie;r>0;r--)te=n$1d.PI_OVER_TWO-ee*r,J[Q++]=1-Z*(1+Math.cos(te)),J[Q++]=.5*(1+Math.sin(te));for(r=d-m;r>0;r--)J[Q++]=r*Z,J[Q++]=1;for(r=1;r<ie+1;r++)te=n$1d.PI_OVER_TWO+ee*r,J[Q++]=Z*(1+Math.cos(te)),J[Q++]=.5*(1+Math.sin(te))}else{for(Z=1/((d/=3)-1),K=1/((f/=3)-1),r=0;r<f;r++)J[Q++]=r*K,J[Q++]=0;for(r=d;r>0;r--)J[Q++]=(r-1)*Z,J[Q++]=1}h.st=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:2,values:J})}return t.normal&&(h.normal=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:T.normals})),t.tangent&&(h.tangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:T.tangents})),t.bitangent&&(h.bitangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:T.bitangents})),{attributes:h,indices:I}}function Zt$8(e,t){if(!(t.normal||t.tangent||t.bitangent||t.st))return e;var i,n,r=e.position.values;(t.normal||t.bitangent)&&(i=e.normal.values,n=e.bitangent.values);var o,a=e.position.values.length/18,s=3*a,l=2*a,u=2*s;if(t.normal||t.bitangent||t.tangent){var c=t.normal?new Float32Array(6*s):void 0,h=t.tangent?new Float32Array(6*s):void 0,d=t.bitangent?new Float32Array(6*s):void 0,f=Rt$9,p=Yt$8,_=xt$a,m=Nt$8,$=Xt$7,g=Bt$a,y=u;for(o=0;o<s;o+=3){var v=y+u;f=a$11.fromArray(r,o,f),p=a$11.fromArray(r,o+s,p),_=a$11.fromArray(r,(o+3)%s,_),p=a$11.subtract(p,f,p),_=a$11.subtract(_,f,_),m=a$11.normalize(a$11.cross(p,_,m),m),t.normal&&(T$S.addAttribute(c,m,v),T$S.addAttribute(c,m,v+3),T$S.addAttribute(c,m,y),T$S.addAttribute(c,m,y+3)),(t.tangent||t.bitangent)&&(g=a$11.fromArray(i,o,g),t.bitangent&&(T$S.addAttribute(d,g,v),T$S.addAttribute(d,g,v+3),T$S.addAttribute(d,g,y),T$S.addAttribute(d,g,y+3)),t.tangent&&($=a$11.normalize(a$11.cross(g,m,$),$),T$S.addAttribute(h,$,v),T$S.addAttribute(h,$,v+3),T$S.addAttribute(h,$,y),T$S.addAttribute(h,$,y+3))),y+=6}if(t.normal){for(c.set(i),o=0;o<s;o+=3)c[o+s]=-i[o],c[o+s+1]=-i[o+1],c[o+s+2]=-i[o+2];e.normal.values=c}else e.normal=void 0;if(t.bitangent?(d.set(n),d.set(n,s),e.bitangent.values=d):e.bitangent=void 0,t.tangent){var x=e.tangent.values;h.set(x),h.set(x,s),e.tangent.values=h}}if(t.st){var b=e.st.values,S=new Float32Array(6*l);S.set(b),S.set(b,l);for(var w=2*l,C=0;C<2;C++){for(S[w++]=b[0],S[w++]=b[1],o=2;o<l;o+=2){var T=b[o],P=b[o+1];S[w++]=T,S[w++]=P,S[w++]=T,S[w++]=P}S[w++]=b[0],S[w++]=b[1]}e.st.values=S}return e}function It$8(e,t,i){i[t++]=e[0],i[t++]=e[1],i[t++]=e[2];for(var n=3;n<e.length;n+=3){var r=e[n],o=e[n+1],a=e[n+2];i[t++]=r,i[t++]=o,i[t++]=a,i[t++]=r,i[t++]=o,i[t++]=a}return i[t++]=e[0],i[t++]=e[1],i[t++]=e[2],i}function tr$5(e,t){var i=new n$12({position:t.position,normal:t.normal||t.bitangent||e.shadowVolume,tangent:t.tangent,bitangent:t.normal||t.bitangent,st:t.st}),n=e.ellipsoid,r=St$8(T$S.computePositions(e),i,n),o=e.height,a=e.extrudedHeight,s=r.attributes,l=r.indices,u=s.position.values,c=u.length,h=new Float64Array(6*c),d=new Float64Array(c);d.set(u);var f=new Float64Array(4*c);f=It$8(u=T$10.scaleToGeodeticHeight(u,o,n),0,f),f=It$8(d=T$10.scaleToGeodeticHeight(d,a,n),2*c,f),h.set(u),h.set(d,c),h.set(f,2*c),s.position.values=h,s=Zt$8(s,t);var p,_=c/3;if(e.shadowVolume){var m=s.normal.values;c=m.length;var $=new Float32Array(6*c);for(p=0;p<c;p++)m[p]=-m[p];$.set(m,c),$=It$8(m,4*c,$),s.extrudeDirection=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:$}),t.normal||(s.normal=void 0)}if(t$$(e.offsetAttribute)){var g=new Uint8Array(6*_);if(e.offsetAttribute===_0x165ce0.TOP)g=d$10(g,1,0,_),g=d$10(g,1,2*_,4*_);else g=d$10(g,e.offsetAttribute===_0x165ce0.NONE?0:1);s.applyOffset=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:g})}var y=l.length,v=_+_,x=fe$u.createTypedArray(h.length/3,2*y+3*v);x.set(l);var b,S,w,C,T=y;for(p=0;p<y;p+=3){var P=l[p],E=l[p+1],A=l[p+2];x[T++]=A+_,x[T++]=E+_,x[T++]=P+_}for(p=0;p<v;p+=2)w=(b=p+v)+1,C=(S=b+v)+1,x[T++]=b,x[T++]=S,x[T++]=w,x[T++]=w,x[T++]=S,x[T++]=C;return{attributes:s,indices:x}}var jt$9=new a$11,pt$c=new a$11,Q$T=new i$1g;function Wt$8(e,t,i,n,r,o){var a=a$11.subtract(t,e,jt$9);a$11.normalize(a,a);var s=i.geodeticSurfaceNormal(e,pt$c),l=a$11.cross(a,s,jt$9);a$11.multiplyByScalar(l,n,l);var u=r.latitude,c=r.longitude,h=o.latitude,d=o.longitude;a$11.add(e,l,pt$c),i.cartesianToCartographic(pt$c,Q$T);var f=Q$T.latitude,p=Q$T.longitude;u=Math.min(u,f),c=Math.min(c,p),h=Math.max(h,f),d=Math.max(d,p),a$11.subtract(e,l,pt$c),i.cartesianToCartographic(pt$c,Q$T),f=Q$T.latitude,p=Q$T.longitude,u=Math.min(u,f),c=Math.min(c,p),h=Math.max(h,f),d=Math.max(d,p),r.latitude=u,r.longitude=c,o.latitude=h,o.longitude=d}var $$O=new a$11,At$6=new a$11,C$S=new i$1g,S$I=new i$1g;function Kt$8(e,t,i,n,r){var o=u$11(e=Ct$6(e,t),a$11.equalsEpsilon),a=o.length;if(a<2||i<=0)return new s$1p;var s,l,u=.5*i;if(C$S.latitude=Number.POSITIVE_INFINITY,C$S.longitude=Number.POSITIVE_INFINITY,S$I.latitude=Number.NEGATIVE_INFINITY,S$I.longitude=Number.NEGATIVE_INFINITY,n===ie$D.ROUNDED){var c=o[0];a$11.subtract(c,o[1],$$O),a$11.normalize($$O,$$O),a$11.multiplyByScalar($$O,u,$$O),a$11.add(c,$$O,At$6),t.cartesianToCartographic(At$6,Q$T),s=Q$T.latitude,l=Q$T.longitude,C$S.latitude=Math.min(C$S.latitude,s),C$S.longitude=Math.min(C$S.longitude,l),S$I.latitude=Math.max(S$I.latitude,s),S$I.longitude=Math.max(S$I.longitude,l)}for(var h=0;h<a-1;++h)Wt$8(o[h],o[h+1],t,u,C$S,S$I);var d=o[a-1];a$11.subtract(d,o[a-2],$$O),a$11.normalize($$O,$$O),a$11.multiplyByScalar($$O,u,$$O),a$11.add(d,$$O,At$6),Wt$8(d,At$6,t,u,C$S,S$I),n===ie$D.ROUNDED&&(t.cartesianToCartographic(At$6,Q$T),s=Q$T.latitude,l=Q$T.longitude,C$S.latitude=Math.min(C$S.latitude,s),C$S.longitude=Math.min(C$S.longitude,l),S$I.latitude=Math.max(S$I.latitude,s),S$I.longitude=Math.max(S$I.longitude,l));var f=t$$(r)?r:new s$1p;return f.north=S$I.latitude,f.south=C$S.latitude,f.east=S$I.longitude,f.west=C$S.longitude,f}function X$I(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).positions,i=e.width;n$1e.defined("options.positions",t),n$1e.defined("options.width",i);var n=e$1Y(e.height,0),r=e$1Y(e.extrudedHeight,n);this._positions=t,this._ellipsoid=n$1c.clone(e$1Y(e.ellipsoid,n$1c.WGS84)),this._vertexFormat=n$12.clone(e$1Y(e.vertexFormat,n$12.DEFAULT)),this._width=i,this._height=Math.max(n,r),this._extrudedHeight=Math.min(n,r),this._cornerType=e$1Y(e.cornerType,ie$D.ROUNDED),this._granularity=e$1Y(e.granularity,n$1d.RADIANS_PER_DEGREE),this._shadowVolume=e$1Y(e.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this.packedLength=1+t.length*a$11.packedLength+n$1c.packedLength+n$12.packedLength+7}X$I.pack=function(e,t,i){n$1e.defined("value",e),n$1e.defined("array",t),i=e$1Y(i,0);var n=e._positions,r=n.length;t[i++]=r;for(var o=0;o<r;++o,i+=a$11.packedLength)a$11.pack(n[o],t,i);return n$1c.pack(e._ellipsoid,t,i),i+=n$1c.packedLength,n$12.pack(e._vertexFormat,t,i),i+=n$12.packedLength,t[i++]=e._width,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._cornerType,t[i++]=e._granularity,t[i++]=e._shadowVolume?1:0,t[i]=e$1Y(e._offsetAttribute,-1),t};var Qt$9=n$1c.clone(n$1c.UNIT_SPHERE),$t$8=new n$12,Z$T={positions:void 0,ellipsoid:Qt$9,vertexFormat:$t$8,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};X$I.unpack=function(e,t,i){n$1e.defined("array",e),t=e$1Y(t,0);for(var n=e[t++],r=new Array(n),o=0;o<n;++o,t+=a$11.packedLength)r[o]=a$11.unpack(e,t);var a=n$1c.unpack(e,t,Qt$9);t+=n$1c.packedLength;var s=n$12.unpack(e,t,$t$8);t+=n$12.packedLength;var l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t++],f=1===e[t++],p=e[t];return t$$(i)?(i._positions=r,i._ellipsoid=n$1c.clone(a,i._ellipsoid),i._vertexFormat=n$12.clone(s,i._vertexFormat),i._width=l,i._height=u,i._extrudedHeight=c,i._cornerType=h,i._granularity=d,i._shadowVolume=f,i._offsetAttribute=-1===p?void 0:p,i):(Z$T.positions=r,Z$T.width=l,Z$T.height=u,Z$T.extrudedHeight=c,Z$T.cornerType=h,Z$T.granularity=d,Z$T.shadowVolume=f,Z$T.offsetAttribute=-1===p?void 0:p,new X$I(Z$T))},X$I.computeRectangle=function(e,t){var i=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).positions,n=e.width;return n$1e.defined("options.positions",i),n$1e.defined("options.width",n),Kt$8(i,e$1Y(e.ellipsoid,n$1c.WGS84),n,e$1Y(e.cornerType,ie$D.ROUNDED),t)},X$I.createGeometry=function(e){var t=e._positions,i=e._width,n=e._ellipsoid,r=u$11(t=Ct$6(t,n),a$11.equalsEpsilon);if(!(r.length<2||i<=0)){var o,a=e._height,s=e._extrudedHeight,l=!n$1d.equalsEpsilon(a,s,0,n$1d.EPSILON2),u=e._vertexFormat,c={ellipsoid:n,positions:r,width:i,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!0};if(l)c.height=a,c.extrudedHeight=s,c.shadowVolume=e._shadowVolume,c.offsetAttribute=e._offsetAttribute,o=tr$5(c,u);else if((o=St$8(T$S.computePositions(c),u,n)).attributes.position.values=T$10.scaleToGeodeticHeight(o.attributes.position.values,a,n),t$$(e._offsetAttribute)){var h=e._offsetAttribute===_0x165ce0.NONE?0:1,d=o.attributes.position.values.length,f=new Uint8Array(d/3);d$10(f,h),o.attributes.applyOffset=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}var p=o.attributes,_=c$19.fromVertices(p.position.values,void 0,3);return u.position||(o.attributes.position.values=void 0),new T$11({attributes:p,indices:o.indices,primitiveType:H$11.TRIANGLES,boundingSphere:_,offsetAttribute:e._offsetAttribute})}},X$I.createShadowVolume=function(e,t,i){var n=e._granularity,r=e._ellipsoid,o=t(n,r),a=i(n,r);return new X$I({positions:e._positions,width:e._width,cornerType:e._cornerType,ellipsoid:r,granularity:n,extrudedHeight:o,height:a,vertexFormat:n$12.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(X$I.prototype,{rectangle:{get:function(){return t$$(this._rectangle)||(this._rectangle=Kt$8(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});var et$h=new a$11,it$f=new a$11,ht$b=new a$11;function lt$h(e,t){for(var i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}function rt$i(e,t){var i,n,r,o=[],a=e.positions,s=e.corners,l=e.endPositions,u=new t$W,c=0,h=0,d=0;for(n=0;n<a.length;n+=2)c+=r=a[n].length-3,d+=r/3*4,h+=a[n+1].length-3;for(c+=3,h+=3,n=0;n<s.length;n++){i=s[n];var f=s[n].leftPositions;t$$(f)?(c+=r=f.length,d+=r/3*2):(h+=r=s[n].rightPositions.length,d+=r/3*2)}var p,_=t$$(l);_&&(c+=p=l[0].length-3,h+=p,d+=4*(p/=3));var m,$,g,y,v,x,b=c+h,S=new Float64Array(b),w=0,C=b-1,T=p/2,P=fe$u.createTypedArray(b/3,d+4),E=0;if(P[E++]=w/3,P[E++]=(C-2)/3,_){o.push(w/3),x=et$h,v=it$f;var A=l[0];for(n=0;n<T;n++)x=a$11.fromArray(A,3*(T-1-n),x),v=a$11.fromArray(A,3*(T+n),v),T$S.addAttribute(S,v,w),T$S.addAttribute(S,x,void 0,C),y=($=w/3)+1,g=(m=(C-2)/3)-1,P[E++]=m,P[E++]=g,P[E++]=$,P[E++]=y,w+=3,C-=3}var L=0,M=a[L++],I=a[L++];for(S.set(M,w),S.set(I,C-I.length+1),r=I.length-3,o.push(w/3,(C-2)/3),n=0;n<r;n+=3)y=($=w/3)+1,g=(m=(C-2)/3)-1,P[E++]=m,P[E++]=g,P[E++]=$,P[E++]=y,w+=3,C-=3;for(n=0;n<s.length;n++){var O,D,R=(i=s[n]).leftPositions,N=i.rightPositions,F=ht$b;if(t$$(R)){for(C-=3,D=g,o.push(y),O=0;O<R.length/3;O++)F=a$11.fromArray(R,3*O,F),P[E++]=D-O-1,P[E++]=D-O,T$S.addAttribute(S,F,void 0,C),C-=3;o.push(D-Math.floor(R.length/6)),t===ie$D.BEVELED&&o.push((C-2)/3+1),w+=3}else{for(w+=3,D=y,o.push(g),O=0;O<N.length/3;O++)F=a$11.fromArray(N,3*O,F),P[E++]=D+O,P[E++]=D+O+1,T$S.addAttribute(S,F,w),w+=3;o.push(D+Math.floor(N.length/6)),t===ie$D.BEVELED&&o.push(w/3-1),C-=3}for(M=a[L++],I=a[L++],M.splice(0,3),I.splice(I.length-3,3),S.set(M,w),S.set(I,C-I.length+1),r=I.length-3,O=0;O<I.length;O+=3)$=(y=w/3)-1,m=(g=(C-2)/3)+1,P[E++]=m,P[E++]=g,P[E++]=$,P[E++]=y,w+=3,C-=3;w-=3,C+=3,o.push(w/3,(C-2)/3)}if(_){w+=3,C-=3,x=et$h,v=it$f;var B=l[1];for(n=0;n<T;n++)x=a$11.fromArray(B,3*(p-n-1),x),v=a$11.fromArray(B,3*n,v),T$S.addAttribute(S,x,void 0,C),T$S.addAttribute(S,v,w),$=(y=w/3)-1,m=(g=(C-2)/3)+1,P[E++]=m,P[E++]=g,P[E++]=$,P[E++]=y,w+=3,C-=3;o.push(w/3)}else o.push(w/3,(C-2)/3);return P[E++]=w/3,P[E++]=(C-2)/3,u.position=new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:S}),{attributes:u,indices:P,wallIndices:o}}function ut$e(e){var t=e.ellipsoid,i=rt$i(T$S.computePositions(e),e.cornerType),n=i.wallIndices,r=e.height,o=e.extrudedHeight,a=i.attributes,s=i.indices,l=a.position.values,u=l.length,c=new Float64Array(u);c.set(l);var h=new Float64Array(2*u);if(l=T$10.scaleToGeodeticHeight(l,r,t),c=T$10.scaleToGeodeticHeight(c,o,t),h.set(l),h.set(c,u),a.position.values=h,u/=3,t$$(e.offsetAttribute)){var d=new Uint8Array(2*u);if(e.offsetAttribute===_0x165ce0.TOP)d=d$10(d,1,0,u);else d=d$10(d,e.offsetAttribute===_0x165ce0.NONE?0:1);a.applyOffset=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:d})}var f,p=s.length,_=fe$u.createTypedArray(h.length/3,2*(p+n.length));_.set(s);var m,$,g=p;for(f=0;f<p;f+=2){var y=s[f],v=s[f+1];_[g++]=y+u,_[g++]=v+u}for(f=0;f<n.length;f++)$=(m=n[f])+u,_[g++]=m,_[g++]=$;return{attributes:a,indices:_}}function D$X(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).positions,i=e.width;n$1e.typeOf.object("options.positions",t),n$1e.typeOf.number("options.width",i);var n=e$1Y(e.height,0),r=e$1Y(e.extrudedHeight,n);this._positions=t,this._ellipsoid=n$1c.clone(e$1Y(e.ellipsoid,n$1c.WGS84)),this._width=i,this._height=Math.max(n,r),this._extrudedHeight=Math.min(n,r),this._cornerType=e$1Y(e.cornerType,ie$D.ROUNDED),this._granularity=e$1Y(e.granularity,n$1d.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*a$11.packedLength+n$1c.packedLength+6}D$X.pack=function(e,t,i){n$1e.typeOf.object("value",e),n$1e.typeOf.object("array",t),i=e$1Y(i,0);var n=e._positions,r=n.length;t[i++]=r;for(var o=0;o<r;++o,i+=a$11.packedLength)a$11.pack(n[o],t,i);return n$1c.pack(e._ellipsoid,t,i),i+=n$1c.packedLength,t[i++]=e._width,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._cornerType,t[i++]=e._granularity,t[i]=e$1Y(e._offsetAttribute,-1),t};var ot$j=n$1c.clone(n$1c.UNIT_SPHERE),S$H={positions:void 0,ellipsoid:ot$j,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};D$X.unpack=function(e,t,i){n$1e.typeOf.object("array",e),t=e$1Y(t,0);for(var n=e[t++],r=new Array(n),o=0;o<n;++o,t+=a$11.packedLength)r[o]=a$11.unpack(e,t);var a=n$1c.unpack(e,t,ot$j);t+=n$1c.packedLength;var s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return t$$(i)?(i._positions=r,i._ellipsoid=n$1c.clone(a,i._ellipsoid),i._width=s,i._height=l,i._extrudedHeight=u,i._cornerType=c,i._granularity=h,i._offsetAttribute=-1===d?void 0:d,i):(S$H.positions=r,S$H.width=s,S$H.height=l,S$H.extrudedHeight=u,S$H.cornerType=c,S$H.granularity=h,S$H.offsetAttribute=-1===d?void 0:d,new D$X(S$H))},D$X.createGeometry=function(e){var t=e._positions,i=e._width,n=e._ellipsoid,r=u$11(t=lt$h(t,n),a$11.equalsEpsilon);if(!(r.length<2||i<=0)){var o,a=e._height,s=e._extrudedHeight,l=!n$1d.equalsEpsilon(a,s,0,n$1d.EPSILON2),u={ellipsoid:n,positions:r,width:i,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!1};if(l)u.height=a,u.extrudedHeight=s,u.offsetAttribute=e._offsetAttribute,o=ut$e(u);else if((o=rt$i(T$S.computePositions(u),u.cornerType)).attributes.position.values=T$10.scaleToGeodeticHeight(o.attributes.position.values,a,n),t$$(e._offsetAttribute)){var c=o.attributes.position.values.length,h=new Uint8Array(c/3);d$10(h,e._offsetAttribute===_0x165ce0.NONE?0:1),o.attributes.applyOffset=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}var d=o.attributes,f=c$19.fromVertices(d.position.values,void 0,3);return new T$11({attributes:d,indices:o.indices,primitiveType:H$11.LINES,boundingSphere:f,offsetAttribute:e._offsetAttribute})}};var e$1k,s$17="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJhZmRiYzgzMy1hODQ3LTRkMDktYjE0Ni0zNTViMTdmNGEyZWEiLCJpZCI6MjU5LCJzY29wZXMiOlsiYXNyIiwiZ2MiXSwiaWF0IjoxNTgzMTYzMTYwfQ.blu_ATsUNqSYK0fIBrNRvxq9HiCzY5Ul_4v_4-3F5QY",i$X={};function r$H(e,t){n$1e.defined("endpoint",e),n$1e.defined("endpointResource",t);var i,n=e.externalType,r=t$$(n);if(r){if("3DTILES"!==n&&"STK_TERRAIN_SERVER"!==n)throw new t$Z("Ion.createResource does not support external imagery assets; use IonImageryProvider instead.");i={url:e.options.url}}else i={url:e.url,retryAttempts:1,retryCallback:_$X};t$X.call(this,i),this._ionEndpoint=e,this._ionEndpointDomain=r?void 0:new h$1f(e.url).authority,this._ionEndpointResource=t,this._ionRoot=void 0,this._pendingPromise=void 0,this._credits=void 0,this._isExternal=r}function _$X(e,t){var i=e$1Y(e._ionRoot,e),n=i._ionEndpointResource;return t$$(t)&&(401===t.statusCode||t.target instanceof Image)?(t$$(i._pendingPromise)||(i._pendingPromise=n.fetchJson().then((function(e){return i._ionEndpoint=e,e})).always((function(e){return i._pendingPromise=void 0,e}))),i._pendingPromise.then((function(t){return e._ionEndpoint=t,!0}))):c$18.resolve(!1)}function s$16(e){return e=e$1Y(e,e$1Y.EMPTY_OBJECT),new se$y({url:r$H.fromAssetId(1),requestVertexNormals:e$1Y(e.requestVertexNormals,!1),requestWaterMask:e$1Y(e.requestWaterMask,!1)})}i$X.defaultAccessToken=s$17,i$X.defaultServer=new t$X({url:"https://api.cesium.com/"}),i$X.getDefaultTokenCredit=function(e){if(e===s$17){if(!t$$(e$1k)){e$1k=new i$17('<b> This application is using Cesium\'s default ion access token. Please assign <i>Cesium.Ion.defaultAccessToken</i> with an access token from your ion account before making any Cesium API calls. You can sign up for a free ion account at <a href="https://cesium.com">https://cesium.com</a>.</b>',!0)}return e$1k}},t$$(Object.create)&&(r$H.prototype=Object.create(t$X.prototype),r$H.prototype.constructor=r$H),r$H.fromAssetId=function(e,t){var i=r$H._createEndpointResource(e,t);return i.fetchJson().then((function(e){return new r$H(e,i)}))},Object.defineProperties(r$H.prototype,{credits:{get:function(){return t$$(this._ionRoot)?this._ionRoot.credits:(t$$(this._credits)||(this._credits=r$H.getCreditsFromEndpoint(this._ionEndpoint,this._ionEndpointResource)),this._credits)}}}),r$H.getCreditsFromEndpoint=function(e,t){var i=e.attributions.map(i$17.getIonCredit),n=i$X.getDefaultTokenCredit(t.queryParameters.access_token);return t$$(n)&&i.push(i$17.clone(n)),i},r$H.prototype.clone=function(e){var t=e$1Y(this._ionRoot,this);return t$$(e)||(e=new r$H(t._ionEndpoint,t._ionEndpointResource)),(e=t$X.prototype.clone.call(this,e))._ionRoot=t,e._isExternal=this._isExternal,e},r$H.prototype.fetchImage=function(e){if(!this._isExternal){var t=e;e={preferBlob:!0},t$$(t)&&(e.flipY=t.flipY,e.preferImageBitmap=t.preferImageBitmap)}return t$X.prototype.fetchImage.call(this,e)},r$H.prototype._makeRequest=function(e){return this._isExternal||new h$1f(this.url).authority!==this._ionEndpointDomain||(t$$(e.headers)||(e.headers={}),e.headers.Authorization="Bearer "+this._ionEndpoint.accessToken),t$X.prototype._makeRequest.call(this,e)},r$H._createEndpointResource=function(e,t){n$1e.defined("assetId",e),t=e$1Y(t,e$1Y.EMPTY_OBJECT);var i=e$1Y(t.server,i$X.defaultServer),n=e$1Y(t.accessToken,i$X.defaultAccessToken);i=t$X.createIfNeeded(i);var r={url:"v1/assets/"+e+"/endpoint"};return t$$(n)&&(r.queryParameters={access_token:n}),i.getDerivedResource(r)};var Es=function(e){e("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),e("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),e("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),e.WGS84=e["EPSG:4326"],e["EPSG:3785"]=e["EPSG:3857"],e.GOOGLE=e["EPSG:3857"],e["EPSG:900913"]=e["EPSG:3857"],e["EPSG:102113"]=e["EPSG:3857"]},$$N=1,tt$i=2,Ps=4,qt$7=5,ot$i=484813681109536e-20,m$O=Math.PI/2,Ns=.16666666666666666,Ss=.04722222222222222,ks=.022156084656084655,y$T=1e-10,R$N=.017453292519943295,X$H=57.29577951308232,E$V=Math.PI/4,It$7=2*Math.PI,k$Q=3.14159265359,j$V={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},qs={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},Ft$6=/[\s_\-\/\(\)]/g;function K$J(e,t){if(e[t])return e[t];for(var i,n=Object.keys(e),r=t.toLowerCase().replace(Ft$6,""),o=-1;++o<n.length;)if((i=n[o]).toLowerCase().replace(Ft$6,"")===r)return e[i]}var Ot$4=function(e){var t,i,n,r={},o=e.split("+").map((function(e){return e.trim()})).filter((function(e){return e})).reduce((function(e,t){var i=t.split("=");return i.push(!0),e[i[0].toLowerCase()]=i[1],e}),{}),a={proj:"projName",datum:"datumCode",rf:function(e){r.rf=parseFloat(e)},lat_0:function(e){r.lat0=e*R$N},lat_1:function(e){r.lat1=e*R$N},lat_2:function(e){r.lat2=e*R$N},lat_ts:function(e){r.lat_ts=e*R$N},lon_0:function(e){r.long0=e*R$N},lon_1:function(e){r.long1=e*R$N},lon_2:function(e){r.long2=e*R$N},alpha:function(e){r.alpha=parseFloat(e)*R$N},lonc:function(e){r.longc=e*R$N},x_0:function(e){r.x0=parseFloat(e)},y_0:function(e){r.y0=parseFloat(e)},k_0:function(e){r.k0=parseFloat(e)},k:function(e){r.k0=parseFloat(e)},a:function(e){r.a=parseFloat(e)},b:function(e){r.b=parseFloat(e)},r_a:function(){r.R_A=!0},zone:function(e){r.zone=parseInt(e,10)},south:function(){r.utmSouth=!0},towgs84:function(e){r.datum_params=e.split(",").map((function(e){return parseFloat(e)}))},to_meter:function(e){r.to_meter=parseFloat(e)},units:function(e){r.units=e;var t=K$J(qs,e);t&&(r.to_meter=t.to_meter)},from_greenwich:function(e){r.from_greenwich=e*R$N},pm:function(e){var t=K$J(j$V,e);r.from_greenwich=(t||parseFloat(e))*R$N},nadgrids:function(e){"@null"===e?r.datumCode="none":r.nadgrids=e},axis:function(e){var t="ewnsud";3===e.length&&-1!==t.indexOf(e.substr(0,1))&&-1!==t.indexOf(e.substr(1,1))&&-1!==t.indexOf(e.substr(2,1))&&(r.axis=e)}};for(t in o)i=o[t],t in a?"function"==typeof(n=a[t])?n(i):r[n]=i:r[t]=i;return"string"==typeof r.datumCode&&"WGS84"!==r.datumCode&&(r.datumCode=r.datumCode.toLowerCase()),r},lt$g=1,Qt$8=2,Wt$7=3,vt$9=4,Ht$4=5,Rt$8=-1,Is=/\s/,Os=/[A-Za-z]/,Rs=/[A-Za-z84]/,gt$7=/[,\]]/,Xt$6=/[\d\.E\-\+]/;function W$Z(e){if("string"!=typeof e)throw new Error("not a string");this.text=e.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=lt$g}function Gs(e){return new W$Z(e).output()}function Kt$7(e,t,i){Array.isArray(t)&&(i.unshift(t),t=null);var n=t?{}:e,r=i.reduce((function(e,t){return st$c(t,e),e}),n);t&&(e[t]=r)}function st$c(e,t){if(Array.isArray(e)){var i=e.shift();if("PARAMETER"===i&&(i=e.shift()),1===e.length)return Array.isArray(e[0])?(t[i]={},void st$c(e[0],t[i])):void(t[i]=e[0]);if(e.length)if("TOWGS84"!==i){if("AXIS"===i)return i in t||(t[i]=[]),void t[i].push(e);var n;switch(Array.isArray(i)||(t[i]={}),i){case"UNIT":case"PRIMEM":case"VERT_DATUM":return t[i]={name:e[0].toLowerCase(),convert:e[1]},void(3===e.length&&st$c(e[2],t[i]));case"SPHEROID":case"ELLIPSOID":return t[i]={name:e[0],a:e[1],rf:e[2]},void(4===e.length&&st$c(e[3],t[i]));case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":return e[0]=["name",e[0]],void Kt$7(t,i,e);default:for(n=-1;++n<e.length;)if(!Array.isArray(e[n]))return st$c(e,t[i]);return Kt$7(t,i,e)}}else t[i]=e;else t[i]=!0}else t[e]=!0}W$Z.prototype.readCharicter=function(){var e=this.text[this.place++];if(this.state!==vt$9)for(;Is.test(e);){if(this.place>=this.text.length)return;e=this.text[this.place++]}switch(this.state){case lt$g:return this.neutral(e);case Qt$8:return this.keyword(e);case vt$9:return this.quoted(e);case Ht$4:return this.afterquote(e);case Wt$7:return this.number(e);case Rt$8:return}},W$Z.prototype.afterquote=function(e){if('"'===e)return this.word+='"',void(this.state=vt$9);if(gt$7.test(e))return this.word=this.word.trim(),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in afterquote yet, index '+this.place)},W$Z.prototype.afterItem=function(e){return","===e?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=lt$g)):"]"===e?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=lt$g,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=Rt$8))):void 0},W$Z.prototype.number=function(e){if(!Xt$6.test(e)){if(gt$7.test(e))return this.word=parseFloat(this.word),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in number yet, index '+this.place)}this.word+=e},W$Z.prototype.quoted=function(e){'"'!==e?this.word+=e:this.state=Ht$4},W$Z.prototype.keyword=function(e){if(Rs.test(e))this.word+=e;else{if("["===e){var t=[];return t.push(this.word),this.level++,null===this.root?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,void(this.state=lt$g)}if(!gt$7.test(e))throw new Error("havn't handled \""+e+'" in keyword yet, index '+this.place);this.afterItem(e)}},W$Z.prototype.neutral=function(e){if(Os.test(e))return this.word=e,void(this.state=Qt$8);if('"'===e)return this.word="",void(this.state=vt$9);if(Xt$6.test(e))return this.word=e,void(this.state=Wt$7);if(!gt$7.test(e))throw new Error("havn't handled \""+e+'" in neutral yet, index '+this.place);this.afterItem(e)},W$Z.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===Rt$8)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};var Ts=.017453292519943295;function js(e,t){var i=t[0],n=t[1];!(i in e)&&n in e&&(e[i]=e[n],3===t.length&&(e[i]=t[2](e[i])))}function H$S(e){return e*Ts}function zs(e){if("GEOGCS"===e.type?e.projName="longlat":"LOCAL_CS"===e.type?(e.projName="identity",e.local=!0):"object"==typeof e.PROJECTION?e.projName=Object.keys(e.PROJECTION)[0]:e.projName=e.PROJECTION,e.AXIS){for(var t="",i=0,n=e.AXIS.length;i<n;++i){var r=e.AXIS[i][0].toLowerCase();-1!==r.indexOf("north")?t+="n":-1!==r.indexOf("south")?t+="s":-1!==r.indexOf("east")?t+="e":-1!==r.indexOf("west")&&(t+="w")}2===t.length&&(t+="u"),3===t.length&&(e.axis=t)}e.UNIT&&(e.units=e.UNIT.name.toLowerCase(),"metre"===e.units&&(e.units="meter"),e.UNIT.convert&&("GEOGCS"===e.type?e.DATUM&&e.DATUM.SPHEROID&&(e.to_meter=e.UNIT.convert*e.DATUM.SPHEROID.a):e.to_meter=e.UNIT.convert));var o=e.GEOGCS;function a(t){return t*(e.to_meter||1)}"GEOGCS"===e.type&&(o=e),o&&(o.DATUM?e.datumCode=o.DATUM.name.toLowerCase():e.datumCode=o.name.toLowerCase(),"d_"===e.datumCode.slice(0,2)&&(e.datumCode=e.datumCode.slice(2)),("new_zealand_geodetic_datum_1949"===e.datumCode||"new_zealand_1949"===e.datumCode)&&(e.datumCode="nzgd49"),("wgs_1984"===e.datumCode||"world_geodetic_system_1984"===e.datumCode)&&("Mercator_Auxiliary_Sphere"===e.PROJECTION&&(e.sphere=!0),e.datumCode="wgs84"),"_ferro"===e.datumCode.slice(-6)&&(e.datumCode=e.datumCode.slice(0,-6)),"_jakarta"===e.datumCode.slice(-8)&&(e.datumCode=e.datumCode.slice(0,-8)),~e.datumCode.indexOf("belge")&&(e.datumCode="rnb72"),o.DATUM&&o.DATUM.SPHEROID&&(e.ellps=o.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===e.ellps.toLowerCase().slice(0,13)&&(e.ellps="intl"),e.a=o.DATUM.SPHEROID.a,e.rf=parseFloat(o.DATUM.SPHEROID.rf,10)),o.DATUM&&o.DATUM.TOWGS84&&(e.datum_params=o.DATUM.TOWGS84),~e.datumCode.indexOf("osgb_1936")&&(e.datumCode="osgb36"),~e.datumCode.indexOf("osni_1952")&&(e.datumCode="osni52"),(~e.datumCode.indexOf("tm65")||~e.datumCode.indexOf("geodetic_datum_of_1965"))&&(e.datumCode="ire65"),"ch1903+"===e.datumCode&&(e.datumCode="ch1903"),~e.datumCode.indexOf("israel")&&(e.datumCode="isr93")),e.b&&!isFinite(e.b)&&(e.b=e.a);[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_2","Standard_Parallel_2"],["false_easting","False_Easting"],["false_northing","False_Northing"],["central_meridian","Central_Meridian"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",H$S],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",H$S],["x0","false_easting",a],["y0","false_northing",a],["long0","central_meridian",H$S],["lat0","latitude_of_origin",H$S],["lat0","standard_parallel_1",H$S],["lat1","standard_parallel_1",H$S],["lat2","standard_parallel_2",H$S],["azimuth","Azimuth"],["alpha","azimuth",H$S],["srsCode","name"]].forEach((function(t){return js(e,t)})),!e.long0&&e.longc&&("Albers_Conic_Equal_Area"===e.projName||"Lambert_Azimuthal_Equal_Area"===e.projName)&&(e.long0=e.longc),!e.lat_ts&&e.lat1&&("Stereographic_South_Pole"===e.projName||"Polar Stereographic (variant B)"===e.projName)&&(e.lat0=H$S(e.lat1>0?90:-90),e.lat_ts=e.lat1)}var Jt$9=function(e){var t=Gs(e),i=t.shift(),n=t.shift();t.unshift(["name",n]),t.unshift(["type",i]);var r={};return st$c(t,r),zs(r),r};function G$P(e){var t=this;if(2===arguments.length){var i=arguments[1];"string"==typeof i?"+"===i.charAt(0)?G$P[e]=Ot$4(arguments[1]):G$P[e]=Jt$9(arguments[1]):G$P[e]=i}else if(1===arguments.length){if(Array.isArray(e))return e.map((function(e){Array.isArray(e)?G$P.apply(t,e):G$P(e)}));if("string"==typeof e){if(e in G$P)return G$P[e]}else"EPSG"in e?G$P["EPSG:"+e.EPSG]=e:"ESRI"in e?G$P["ESRI:"+e.ESRI]=e:"IAU2000"in e?G$P["IAU2000:"+e.IAU2000]=e:console.log(e);return}}function Ls(e){return"string"==typeof e}function Ds(e){return e in G$P}Es(G$P);var Bs=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function Us(e){return Bs.some((function(t){return e.indexOf(t)>-1}))}var Fs=["3857","900913","3785","102113"];function Qs(e){var t=K$J(e,"authority");if(t){var i=K$J(t,"epsg");return i&&Fs.indexOf(i)>-1}}function Ws(e){var t=K$J(e,"extension");if(t)return K$J(t,"proj4")}function Hs(e){return"+"===e[0]}function Xs(e){if(!Ls(e))return e;if(Ds(e))return G$P[e];if(Us(e)){var t=Jt$9(e);if(Qs(t))return G$P["EPSG:3857"];var i=Ws(t);return i?Ot$4(i):t}return Hs(e)?Ot$4(e):void 0}var Vt$8=function(e,t){var i,n;if(e=e||{},!t)return e;for(n in t)void 0!==(i=t[n])&&(e[n]=i);return e},F$R=function(e,t,i){var n=e*t;return i/Math.sqrt(1-n*n)},Mt$8=function(e){return e<0?-1:1},_$W=function(e){return Math.abs(e)<=k$Q?e:e-Mt$8(e)*It$7},B$H=function(e,t,i){var n=e*i,r=.5*e;return n=Math.pow((1-n)/(1+n),r),Math.tan(.5*(m$O-t))/n},ct$g=function(e,t){for(var i,n,r=.5*e,o=m$O-2*Math.atan(t),a=0;a<=15;a++)if(i=e*Math.sin(o),o+=n=m$O-2*Math.atan(t*Math.pow((1-i)/(1+i),r))-o,Math.abs(n)<=1e-10)return o;return-9999};function Ks(){var e=this.b/this.a;this.es=1-e*e,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=F$R(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function Js(e){var t,i,n=e.x,r=e.y;if(r*X$H>90&&r*X$H<-90&&n*X$H>180&&n*X$H<-180)return null;if(Math.abs(Math.abs(r)-m$O)<=y$T)return null;if(this.sphere)t=this.x0+this.a*this.k0*_$W(n-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(E$V+.5*r));else{var o=Math.sin(r),a=B$H(this.e,r,o);t=this.x0+this.a*this.k0*_$W(n-this.long0),i=this.y0-this.a*this.k0*Math.log(a)}return e.x=t,e.y=i,e}function Vs(e){var t,i,n=e.x-this.x0,r=e.y-this.y0;if(this.sphere)i=m$O-2*Math.atan(Math.exp(-r/(this.a*this.k0)));else{var o=Math.exp(-r/(this.a*this.k0));if(-9999===(i=ct$g(this.e,o)))return null}return t=_$W(this.long0+n/(this.a*this.k0)),e.x=t,e.y=i,e}var Zs=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"],Ys={init:Ks,forward:Js,inverse:Vs,names:Zs};function $s(){}function Zt$7(e){return e}var ta$2=["longlat","identity"],sa$2={init:$s,forward:Zt$7,inverse:Zt$7,names:ta$2},aa$2=[Ys,sa$2],bt$b={},wt$6=[];function Yt$7(e,t){var i=wt$6.length;return e.names?(wt$6[i]=e,e.names.forEach((function(e){bt$b[e.toLowerCase()]=i})),this):(console.log(t),!0)}function ia$2(e){if(!e)return!1;var t=e.toLowerCase();return typeof bt$b[t]<"u"&&wt$6[bt$b[t]]?wt$6[bt$b[t]]:void 0}function ha$2(){aa$2.forEach(Yt$7)}var ea$2={start:ha$2,add:Yt$7,get:ia$2},g$J={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},na$2=g$J.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};function ra$2(e,t,i,n){var r=e*e,o=t*t,a=(r-o)/r,s=0;return n?(r=(e*=1-a*(Ns+a*(Ss+a*ks)))*e,a=0):s=Math.sqrt(a),{es:a,e:s,ep2:(r-o)/o}}function oa$2(e,t,i,n,r){if(!e){var o=K$J(g$J,n);o||(o=na$2),e=o.a,t=o.b,i=o.rf}return i&&!t&&(t=(1-1/i)*e),(0===i||Math.abs(e-t)<y$T)&&(r=!0,t=e),{a:e,b:t,rf:i,sphere:r}}g$J.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var I$_={};function la$2(e,t,i,n,r,o){var a={};return a.datum_type=void 0===e||"none"===e?qt$7:Ps,t&&(a.datum_params=t.map(parseFloat),(0!==a.datum_params[0]||0!==a.datum_params[1]||0!==a.datum_params[2])&&(a.datum_type=$$N),a.datum_params.length>3&&(0!==a.datum_params[3]||0!==a.datum_params[4]||0!==a.datum_params[5]||0!==a.datum_params[6])&&(a.datum_type=tt$i,a.datum_params[3]*=ot$i,a.datum_params[4]*=ot$i,a.datum_params[5]*=ot$i,a.datum_params[6]=a.datum_params[6]/1e6+1)),a.a=i,a.b=n,a.es=r,a.ep2=o,a}function Q$S(e,t){if(!(this instanceof Q$S))return new Q$S(e);t=t||function(e){if(e)throw e};var i=Xs(e);if("object"==typeof i){var n=Q$S.projections.get(i.projName);if(n){if(i.datumCode&&"none"!==i.datumCode){var r=K$J(I$_,i.datumCode);r&&(i.datum_params=r.towgs84?r.towgs84.split(","):null,i.ellps=r.ellipse,i.datumName=r.datumName?r.datumName:i.datumCode)}i.k0=i.k0||1,i.axis=i.axis||"enu",i.ellps=i.ellps||"wgs84";var o=oa$2(i.a,i.b,i.rf,i.ellps,i.sphere),a=ra$2(o.a,o.b,o.rf,i.R_A),s=i.datum||la$2(i.datumCode,i.datum_params,o.a,o.b,a.es,a.ep2);Vt$8(this,i),Vt$8(this,n),this.a=o.a,this.b=o.b,this.rf=o.rf,this.sphere=o.sphere,this.es=a.es,this.e=a.e,this.ep2=a.ep2,this.datum=s,this.init(),t(null,this)}else t(e)}else t(e)}function Ma$3(e,t){return!(e.datum_type!==t.datum_type||e.a!==t.a||Math.abs(e.es-t.es)>5e-11)&&(e.datum_type===$$N?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]:e.datum_type!==tt$i||e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]&&e.datum_params[3]===t.datum_params[3]&&e.datum_params[4]===t.datum_params[4]&&e.datum_params[5]===t.datum_params[5]&&e.datum_params[6]===t.datum_params[6])}function $t$7(e,t,i){var n,r,o,a,s=e.x,l=e.y,u=e.z?e.z:0;if(l<-m$O&&l>-1.001*m$O)l=-m$O;else if(l>m$O&&l<1.001*m$O)l=m$O;else{if(l<-m$O)return{x:-1/0,y:-1/0,z:e.z};if(l>m$O)return{x:1/0,y:1/0,z:e.z}}return s>Math.PI&&(s-=2*Math.PI),r=Math.sin(l),a=Math.cos(l),o=r*r,{x:((n=i/Math.sqrt(1-t*o))+u)*a*Math.cos(s),y:(n+u)*a*Math.sin(s),z:(n*(1-t)+u)*r}}function ts(e,t,i,n){var r,o,a,s,l,u,c,h,d,f,p,_,m,$,g,y=1e-12,v=e.x,x=e.y,b=e.z?e.z:0;if(r=Math.sqrt(v*v+x*x),o=Math.sqrt(v*v+x*x+b*b),r/i<y){if($=0,o/i<y)return m$O,g=-n,{x:e.x,y:e.y,z:e.z}}else $=Math.atan2(x,v);a=b/o,h=(s=r/o)*(1-t)*(l=1/Math.sqrt(1-t*(2-t)*s*s)),d=a*l,m=0;do{m++,u=t*(c=i/Math.sqrt(1-t*d*d))/(c+(g=r*h+b*d-c*(1-t*d*d))),_=(p=a*(l=1/Math.sqrt(1-u*(2-u)*s*s)))*h-(f=s*(1-u)*l)*d,h=f,d=p}while(_*_>1e-24&&m<30);return{x:$,y:Math.atan(p/Math.abs(f)),z:g}}function ca$3(e,t,i){if(t===$$N)return{x:e.x+i[0],y:e.y+i[1],z:e.z+i[2]};if(t===tt$i){var n=i[0],r=i[1],o=i[2],a=i[3],s=i[4],l=i[5],u=i[6];return{x:u*(e.x-l*e.y+s*e.z)+n,y:u*(l*e.x+e.y-a*e.z)+r,z:u*(-s*e.x+a*e.y+e.z)+o}}}function ua$3(e,t,i){if(t===$$N)return{x:e.x-i[0],y:e.y-i[1],z:e.z-i[2]};if(t===tt$i){var n=i[0],r=i[1],o=i[2],a=i[3],s=i[4],l=i[5],u=i[6],c=(e.x-n)/u,h=(e.y-r)/u,d=(e.z-o)/u;return{x:c+l*h-s*d,y:-l*c+h+a*d,z:s*c-a*h+d}}}function At$5(e){return e===$$N||e===tt$i}I$_.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},I$_.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},I$_.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},I$_.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},I$_.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},I$_.potsdam={towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},I$_.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},I$_.hermannskogel={towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},I$_.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},I$_.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},I$_.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},I$_.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},I$_.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},I$_.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},I$_.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},I$_.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},I$_.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},Q$S.projections=ea$2,Q$S.projections.start();var fa$3=function(e,t,i){return Ma$3(e,t)||e.datum_type===qt$7||t.datum_type===qt$7||e.es===t.es&&e.a===t.a&&!At$5(e.datum_type)&&!At$5(t.datum_type)?i:(i=$t$7(i,e.es,e.a),At$5(e.datum_type)&&(i=ca$3(i,e.datum_type,e.datum_params)),At$5(t.datum_type)&&(i=ua$3(i,t.datum_type,t.datum_params)),ts(i,t.es,t.a,t.b))},ss=function(e,t,i){var n,r,o,a=i.x,s=i.y,l=i.z||0,u={};for(o=0;o<3;o++)if(!t||2!==o||void 0!==i.z)switch(0===o?(n=a,r=-1!=="ew".indexOf(e.axis[o])?"x":"y"):1===o?(n=s,r=-1!=="ns".indexOf(e.axis[o])?"y":"x"):(n=l,r="z"),e.axis[o]){case"e":case"w":case"n":case"s":u[r]=n;break;case"u":void 0!==i[r]&&(u.z=n);break;case"d":void 0!==i[r]&&(u.z=-n);break;default:return null}return u},as=function(e){var t={x:e[0],y:e[1]};return e.length>2&&(t.z=e[2]),e.length>3&&(t.m=e[3]),t},pa$3=function(e){is(e.x),is(e.y)};function is(e){if("function"==typeof Number.isFinite){if(Number.isFinite(e))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof e||e!=e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}function ma$3(e,t){return(e.datum.datum_type===$$N||e.datum.datum_type===tt$i)&&"WGS84"!==t.datumCode||(t.datum.datum_type===$$N||t.datum.datum_type===tt$i)&&"WGS84"!==e.datumCode}function Ct$5(e,t,i){var n;return Array.isArray(i)&&(i=as(i)),pa$3(i),e.datum&&t.datum&&ma$3(e,t)&&(i=Ct$5(e,n=new Q$S("WGS84"),i),e=n),"enu"!==e.axis&&(i=ss(e,!1,i)),"longlat"===e.projName?i={x:i.x*R$N,y:i.y*R$N,z:i.z||0}:(e.to_meter&&(i={x:i.x*e.to_meter,y:i.y*e.to_meter,z:i.z||0}),i=e.inverse(i)),e.from_greenwich&&(i.x+=e.from_greenwich),i=fa$3(e.datum,t.datum,i),t.from_greenwich&&(i={x:i.x-t.from_greenwich,y:i.y,z:i.z||0}),"longlat"===t.projName?i={x:i.x*X$H,y:i.y*X$H,z:i.z||0}:(i=t.forward(i),t.to_meter&&(i={x:i.x/t.to_meter,y:i.y/t.to_meter,z:i.z||0})),"enu"!==t.axis?ss(t,!0,i):i}var hs=Q$S("WGS84");function Gt$8(e,t,i){var n,r,o;return Array.isArray(i)?(n=Ct$5(e,t,i)||{x:NaN,y:NaN},i.length>2?typeof e.name<"u"&&"geocent"===e.name||typeof t.name<"u"&&"geocent"===t.name?"number"==typeof n.z?[n.x,n.y,n.z].concat(i.splice(3)):[n.x,n.y,i[2]].concat(i.splice(3)):[n.x,n.y].concat(i.splice(2)):[n.x,n.y]):(r=Ct$5(e,t,i),2===(o=Object.keys(i)).length||o.forEach((function(n){if(typeof e.name<"u"&&"geocent"===e.name||typeof t.name<"u"&&"geocent"===t.name){if("x"===n||"y"===n||"z"===n)return}else if("x"===n||"y"===n)return;r[n]=i[n]})),r)}function es(e){return e instanceof Q$S?e:e.oProj?e.oProj:Q$S(e)}function L$U(e,t,i){e=es(e);var n,r=!1;return typeof t>"u"?(t=e,e=hs,r=!0):(typeof t.x<"u"||Array.isArray(t))&&(i=t,t=e,e=hs,r=!0),t=es(t),i?Gt$8(e,t,i):(n={forward:function(i){return Gt$8(e,t,i)},inverse:function(i){return Gt$8(t,e,i)}},r&&(n.oProj=t),n)}var ns=6,rs="AJSAJS",os="AFAFAF",at$e=65,z$I=73,D$W=79,ut$d=86,ft$b=90,da$2={forward:ls,inverse:ya$2,toPoint:Ms};function ls(e,t){return t=t||5,va$2(_a$3({lat:e[1],lon:e[0]}),t)}function ya$2(e){var t=jt$8(fs$1(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function Ms(e){var t=jt$8(fs$1(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function Tt$8(e){return e*(Math.PI/180)}function cs(e){return e/Math.PI*180}function _a$3(e){var t,i,n,r,o,a,s,l=e.lat,u=e.lon,c=6378137,h=.00669438,d=.9996,f=Tt$8(l),p=Tt$8(u);s=Math.floor((u+180)/6)+1,180===u&&(s=60),l>=56&&l<64&&u>=3&&u<12&&(s=32),l>=72&&l<84&&(u>=0&&u<9?s=31:u>=9&&u<21?s=33:u>=21&&u<33?s=35:u>=33&&u<42&&(s=37)),a=Tt$8(6*(s-1)-180+3),t=h/(1-h),i=c/Math.sqrt(1-h*Math.sin(f)*Math.sin(f)),n=Math.tan(f)*Math.tan(f),r=t*Math.cos(f)*Math.cos(f);var _=d*i*((o=Math.cos(f)*(p-a))+(1-n+r)*o*o*o/6+(5-18*n+n*n+72*r-58*t)*o*o*o*o*o/120)+5e5,m=d*(c*(.9983242984503243*f-.002514607064228144*Math.sin(2*f)+2639046602129982e-21*Math.sin(4*f)-35*h*h*h/3072*Math.sin(6*f))+i*Math.tan(f)*(o*o/2+(5-n+9*r+4*r*r)*o*o*o*o/24+(61-58*n+n*n+600*r-330*t)*o*o*o*o*o*o/720));return l<0&&(m+=1e7),{northing:Math.round(m),easting:Math.round(_),zoneNumber:s,zoneLetter:xa$3(l)}}function jt$8(e){var t=e.northing,i=e.easting,n=e.zoneLetter,r=e.zoneNumber;if(r<0||r>60)return null;var o,a,s,l,u,c,h,d,f,p=.9996,_=6378137,m=.00669438,$=(1-Math.sqrt(1-m))/(1+Math.sqrt(1-m)),g=i-5e5,y=t;n<"N"&&(y-=1e7),h=6*(r-1)-180+3,o=m/(1-m),f=(d=y/p/6367449.145945056)+(3*$/2-27*$*$*$/32)*Math.sin(2*d)+(21*$*$/16-55*$*$*$*$/32)*Math.sin(4*d)+151*$*$*$/96*Math.sin(6*d),a=_/Math.sqrt(1-m*Math.sin(f)*Math.sin(f)),s=Math.tan(f)*Math.tan(f),l=o*Math.cos(f)*Math.cos(f),u=_*(1-m)/Math.pow(1-m*Math.sin(f)*Math.sin(f),1.5),c=g/(a*p);var v=f-a*Math.tan(f)/u*(c*c/2-(5+3*s+10*l-4*l*l-9*o)*c*c*c*c/24+(61+90*s+298*l+45*s*s-252*o-3*l*l)*c*c*c*c*c*c/720);v=cs(v);var x,b=(c-(1+2*s+l)*c*c*c/6+(5-2*l+28*s-3*l*l+8*o+24*s*s)*c*c*c*c*c/120)/Math.cos(f);if(b=h+cs(b),e.accuracy){var S=jt$8({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});x={top:S.lat,right:S.lon,bottom:v,left:b}}else x={lat:v,lon:b};return x}function xa$3(e){var t="Z";return 84>=e&&e>=72?t="X":72>e&&e>=64?t="W":64>e&&e>=56?t="V":56>e&&e>=48?t="U":48>e&&e>=40?t="T":40>e&&e>=32?t="S":32>e&&e>=24?t="R":24>e&&e>=16?t="Q":16>e&&e>=8?t="P":8>e&&e>=0?t="N":0>e&&e>=-8?t="M":-8>e&&e>=-16?t="L":-16>e&&e>=-24?t="K":-24>e&&e>=-32?t="J":-32>e&&e>=-40?t="H":-40>e&&e>=-48?t="G":-48>e&&e>=-56?t="F":-56>e&&e>=-64?t="E":-64>e&&e>=-72?t="D":-72>e&&e>=-80&&(t="C"),t}function va$2(e,t){var i="00000"+e.easting,n="00000"+e.northing;return e.zoneNumber+e.zoneLetter+ga$3(e.easting,e.northing,e.zoneNumber)+i.substr(i.length-5,t)+n.substr(n.length-5,t)}function ga$3(e,t,i){var n=us(i);return ba$3(Math.floor(e/1e5),Math.floor(t/1e5)%20,n)}function us(e){var t=e%ns;return 0===t&&(t=ns),t}function ba$3(e,t,i){var n=i-1,r=rs.charCodeAt(n),o=os.charCodeAt(n),a=r+e-1,s=o+t,l=!1;return a>ft$b&&(a=a-ft$b+at$e-1,l=!0),(a===z$I||r<z$I&&a>z$I||(a>z$I||r<z$I)&&l)&&a++,(a===D$W||r<D$W&&a>D$W||(a>D$W||r<D$W)&&l)&&(++a===z$I&&a++),a>ft$b&&(a=a-ft$b+at$e-1),s>ut$d?(s=s-ut$d+at$e-1,l=!0):l=!1,(s===z$I||o<z$I&&s>z$I||(s>z$I||o<z$I)&&l)&&s++,(s===D$W||o<D$W&&s>D$W||(s>D$W||o<D$W)&&l)&&(++s===z$I&&s++),s>ut$d&&(s=s-ut$d+at$e-1),String.fromCharCode(a)+String.fromCharCode(s)}function fs$1(e){if(e&&0===e.length)throw"MGRSPoint coverting from nothing";for(var t,i=e.length,n=null,r="",o=0;!/[A-Z]/.test(t=e.charAt(o));){if(o>=2)throw"MGRSPoint bad conversion from: "+e;r+=t,o++}var a=parseInt(r,10);if(0===o||o+3>i)throw"MGRSPoint bad conversion from: "+e;var s=e.charAt(o++);if(s<="A"||"B"===s||"Y"===s||s>="Z"||"I"===s||"O"===s)throw"MGRSPoint zone letter "+s+" not handled: "+e;n=e.substring(o,o+=2);for(var l=us(a),u=wa$2(n.charAt(0),l),c=Aa$3(n.charAt(1),l);c<Ca$3(s);)c+=2e6;var h=i-o;if(h%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+e;var d,f,p,_=h/2,m=0,$=0;return _>0&&(d=1e5/Math.pow(10,_),f=e.substring(o,o+_),m=parseFloat(f)*d,p=e.substring(o+_),$=parseFloat(p)*d),{easting:m+u,northing:$+c,zoneLetter:s,zoneNumber:a,accuracy:d}}function wa$2(e,t){for(var i=rs.charCodeAt(t-1),n=1e5,r=!1;i!==e.charCodeAt(0);){if(++i===z$I&&i++,i===D$W&&i++,i>ft$b){if(r)throw"Bad character: "+e;i=at$e,r=!0}n+=1e5}return n}function Aa$3(e,t){if(e>"V")throw"MGRSPoint given invalid Northing "+e;for(var i=os.charCodeAt(t-1),n=0,r=!1;i!==e.charCodeAt(0);){if(++i===z$I&&i++,i===D$W&&i++,i>ut$d){if(r)throw"Bad character: "+e;i=at$e,r=!0}n+=1e5}return n}function Ca$3(e){var t;switch(e){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+e}function it$e(e,t,i){if(!(this instanceof it$e))return new it$e(e,t,i);if(Array.isArray(e))this.x=e[0],this.y=e[1],this.z=e[2]||0;else if("object"==typeof e)this.x=e.x,this.y=e.y,this.z=e.z||0;else if("string"==typeof e&&typeof t>"u"){var n=e.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=e,this.y=t,this.z=i||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}it$e.fromMGRS=function(e){return new it$e(Ms(e))},it$e.prototype.toMGRS=function(e){return ls([this.x,this.y],e)};var Ea$3=1,Pa$2=.25,ps=.046875,ms=.01953125,ds=.01068115234375,Na$3=.75,Sa$3=.46875,ka$3=.013020833333333334,qa$2=.007120768229166667,Ia$4=.3645833333333333,Oa$3=.005696614583333333,Ra$2=.3076171875,ys=function(e){var t=[];t[0]=Ea$3-e*(Pa$2+e*(ps+e*(ms+e*ds))),t[1]=e*(Na$3-e*(ps+e*(ms+e*ds)));var i=e*e;return t[2]=i*(Sa$3-e*(ka$3+e*qa$2)),i*=e,t[3]=i*(Ia$4-e*Oa$3),t[4]=i*e*Ra$2,t},Et$5=function(e,t,i,n){return i*=t,t*=t,n[0]*e-i*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))},Ga$2=20,_s=function(e,t,i){for(var n=1/(1-t),r=e,o=Ga$2;o;--o){var a=Math.sin(r),s=1-t*a*a;if(r-=s=(Et$5(r,a,Math.cos(r),i)-e)*(s*Math.sqrt(s))*n,Math.abs(s)<y$T)return r}return r};function Ta$3(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=ys(this.es),this.ml0=Et$5(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function ja$2(e){var t,i,n,r=e.x,o=e.y,a=_$W(r-this.long0),s=Math.sin(o),l=Math.cos(o);if(this.es){var u=l*a,c=Math.pow(u,2),h=this.ep2*Math.pow(l,2),d=Math.pow(h,2),f=Math.abs(l)>y$T?Math.tan(o):0,p=Math.pow(f,2),_=Math.pow(p,2);t=1-this.es*Math.pow(s,2),u/=Math.sqrt(t);var m=Et$5(o,s,l,this.en);i=this.a*(this.k0*u*(1+c/6*(1-p+h+c/20*(5-18*p+_+14*h-58*p*h+c/42*(61+179*_-_*p-479*p)))))+this.x0,n=this.a*(this.k0*(m-this.ml0+s*a*u/2*(1+c/12*(5-p+9*h+4*d+c/30*(61+_-58*p+270*h-330*p*h+c/56*(1385+543*_-_*p-3111*p))))))+this.y0}else{var $=l*Math.sin(a);if(Math.abs(Math.abs($)-1)<y$T)return 93;if(i=.5*this.a*this.k0*Math.log((1+$)/(1-$))+this.x0,n=l*Math.cos(a)/Math.sqrt(1-Math.pow($,2)),($=Math.abs(n))>=1){if($-1>y$T)return 93;n=0}else n=Math.acos(n);o<0&&(n=-n),n=this.a*this.k0*(n-this.lat0)+this.y0}return e.x=i,e.y=n,e}function za$3(e){var t,i,n,r,o=(e.x-this.x0)*(1/this.a),a=(e.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+a/this.k0,i=_s(t,this.es,this.en),Math.abs(i)<m$O){var s=Math.sin(i),l=Math.cos(i),u=Math.abs(l)>y$T?Math.tan(i):0,c=this.ep2*Math.pow(l,2),h=Math.pow(c,2),d=Math.pow(u,2),f=Math.pow(d,2);t=1-this.es*Math.pow(s,2);var p=o*Math.sqrt(t)/this.k0,_=Math.pow(p,2);n=i-(t*=u)*_/(1-this.es)*.5*(1-_/12*(5+3*d-9*c*d+c-4*h-_/30*(61+90*d-252*c*d+45*f+46*c-_/56*(1385+3633*d+4095*f+1574*f*d)))),r=_$W(this.long0+p*(1-_/6*(1+2*d+c-_/20*(5+28*d+24*f+8*c*d+6*c-_/42*(61+662*d+1320*f+720*f*d))))/l)}else n=m$O*Mt$8(a),r=0;else{var m=Math.exp(o/this.k0),$=.5*(m-1/m),g=this.lat0+a/this.k0,y=Math.cos(g);t=Math.sqrt((1-Math.pow(y,2))/(1+Math.pow($,2))),n=Math.asin(t),a<0&&(n=-n),r=0===$&&0===y?0:_$W(Math.atan2($,y)+this.long0)}return e.x=r,e.y=n,e}var La$3=["Transverse_Mercator","Transverse Mercator","tmerc"],Da$3={init:Ta$3,forward:ja$2,inverse:za$3,names:La$3},xs=function(e){var t=Math.exp(e);return t=(t-1/t)/2},zt$8=function(e,t){e=Math.abs(e),t=Math.abs(t);var i=Math.max(e,t),n=Math.min(e,t)/(i||1);return i*Math.sqrt(1+Math.pow(n,2))},Ba$3=function(e){var t=1+e,i=t-1;return 0===i?e:e*Math.log(t)/i},Ua$2=function(e){var t=Math.abs(e);return t=Ba$3(t*(1+t/(zt$8(1,t)+1))),e<0?-t:t},Lt$a=function(e,t){for(var i,n=2*Math.cos(2*t),r=e.length-1,o=e[r],a=0;--r>=0;)i=n*o-a+e[r],a=o,o=i;return t+i*Math.sin(2*t)},Fa$2=function(e,t){for(var i,n=2*Math.cos(t),r=e.length-1,o=e[r],a=0;--r>=0;)i=n*o-a+e[r],a=o,o=i;return Math.sin(t)*i},Qa$1=function(e){var t=Math.exp(e);return t=(t+1/t)/2},vs=function(e,t,i){for(var n,r,o=Math.sin(t),a=Math.cos(t),s=xs(i),l=Qa$1(i),u=2*a*l,c=-2*o*s,h=e.length-1,d=e[h],f=0,p=0,_=0;--h>=0;)n=p,r=f,d=u*(p=d)-n-c*(f=_)+e[h],_=c*p-r+u*f;return[(u=o*l)*d-(c=a*s)*_,u*_+c*d]};function Wa$1(){if(void 0===this.es||this.es<=0)throw new Error("incorrect elliptical usage");this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var e=this.es/(1+Math.sqrt(1-this.es)),t=e/(2-e),i=t;this.cgb[0]=t*(2+t*(-2/3+t*(t*(116/45+t*(26/45+t*(-2854/675)))-2))),this.cbg[0]=t*(t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))-2),i*=t,this.cgb[1]=i*(7/3+t*(t*(-227/45+t*(2704/315+t*(2323/945)))-1.6)),this.cbg[1]=i*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),i*=t,this.cgb[2]=i*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=i*(-26/15+t*(34/21+t*(1.6+t*(-12686/2835)))),i*=t,this.cgb[3]=i*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=i*(1237/630+t*(t*(-24832/14175)-2.4)),i*=t,this.cgb[4]=i*(4174/315+t*(-144838/6237)),this.cbg[4]=i*(-734/315+t*(109598/31185)),i*=t,this.cgb[5]=i*(601676/22275),this.cbg[5]=i*(444337/155925),i=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+i*(1/4+i*(1/64+i/256))),this.utg[0]=t*(t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))-.5),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=i*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=i*(13/48+t*(t*(557/1440+t*(281/630+t*(-1983433/1935360)))-.6)),i*=t,this.utg[2]=i*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=i*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),i*=t,this.utg[3]=i*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=i*(49561/161280+t*(-179/168+t*(6601661/7257600))),i*=t,this.utg[4]=i*(-4583/161280+t*(108847/3991680)),this.gtu[4]=i*(34729/80640+t*(-3418889/1995840)),i*=t,this.utg[5]=i*(-20648693/638668800),this.gtu[5]=.6650675310896665*i;var n=Lt$a(this.cbg,this.lat0);this.Zb=-this.Qn*(n+Fa$2(this.gtu,2*n))}function Ha$2(e){var t=_$W(e.x-this.long0),i=e.y;i=Lt$a(this.cbg,i);var n=Math.sin(i),r=Math.cos(i),o=Math.sin(t),a=Math.cos(t);i=Math.atan2(n,a*r),t=Math.atan2(o*r,zt$8(n,r*a)),t=Ua$2(Math.tan(t));var s,l,u=vs(this.gtu,2*i,2*t);return i+=u[0],t+=u[1],Math.abs(t)<=2.623395162778?(s=this.a*(this.Qn*t)+this.x0,l=this.a*(this.Qn*i+this.Zb)+this.y0):(s=1/0,l=1/0),e.x=s,e.y=l,e}function Xa$1(e){var t,i,n=(e.x-this.x0)*(1/this.a),r=(e.y-this.y0)*(1/this.a);if(r=(r-this.Zb)/this.Qn,n/=this.Qn,Math.abs(n)<=2.623395162778){var o=vs(this.utg,2*r,2*n);r+=o[0],n+=o[1],n=Math.atan(xs(n));var a=Math.sin(r),s=Math.cos(r),l=Math.sin(n),u=Math.cos(n);r=Math.atan2(a*u,zt$8(l,u*s)),n=Math.atan2(l,u*s),t=_$W(n+this.long0),i=Lt$a(this.cgb,r)}else t=1/0,i=1/0;return e.x=t,e.y=i,e}var Ka$1=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc"],Pt$6={init:Wa$1,forward:Ha$2,inverse:Xa$1,names:Ka$1},Ja$2=function(e,t){if(void 0===e){if((e=Math.floor(30*(_$W(t)+Math.PI)/Math.PI)+1)<0)return 0;if(e>60)return 60}return e},Va$2="etmerc";function Za$1(){var e=Ja$2(this.zone,this.long0);if(void 0===e)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(e)-183)*R$N,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Pt$6.init.apply(this),this.forward=Pt$6.forward,this.inverse=Pt$6.inverse}var Ya$1=["Universal Transverse Mercator System","utm"],$a$1={init:Za$1,names:Ya$1,dependsOn:Va$2},Dt$5=function(e,t){return Math.pow((1-e)/(1+e),t)},ti$7=20;function si$5(){var e=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*e*e),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(e/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+E$V)/(Math.pow(Math.tan(.5*this.lat0+E$V),this.C)*Dt$5(this.e*e,this.ratexp))}function ai$6(e){var t=e.x,i=e.y;return e.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*i+E$V),this.C)*Dt$5(this.e*Math.sin(i),this.ratexp))-m$O,e.x=this.C*t,e}function ii$8(e){for(var t=e.x/this.C,i=e.y,n=Math.pow(Math.tan(.5*i+E$V)/this.K,1/this.C),r=ti$7;r>0&&(i=2*Math.atan(n*Dt$5(this.e*Math.sin(e.y),-.5*this.e))-m$O,!(Math.abs(i-e.y)<1e-14));--r)e.y=i;return r?(e.x=t,e.y=i,e):null}var hi$6=["gauss"],Bt$9={init:si$5,forward:ai$6,inverse:ii$8,names:hi$6};function ei$6(){Bt$9.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function ni$5(e){var t,i,n,r;return e.x=_$W(e.x-this.long0),Bt$9.forward.apply(this,[e]),t=Math.sin(e.y),i=Math.cos(e.y),n=Math.cos(e.x),r=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*i*n),e.x=r*i*Math.sin(e.x),e.y=r*(this.cosc0*t-this.sinc0*i*n),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e}function ri$4(e){var t,i,n,r,o;if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,o=Math.sqrt(e.x*e.x+e.y*e.y)){var a=2*Math.atan2(o,this.R2);t=Math.sin(a),i=Math.cos(a),r=Math.asin(i*this.sinc0+e.y*t*this.cosc0/o),n=Math.atan2(e.x*t,o*this.cosc0*i-e.y*this.sinc0*t)}else r=this.phic0,n=0;return e.x=n,e.y=r,Bt$9.inverse.apply(this,[e]),e.x=_$W(e.x+this.long0),e}var oi$4=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"],li$4={init:ei$6,forward:ni$5,inverse:ri$4,names:oi$4};function Mi$4(e,t,i){return t*=i,Math.tan(.5*(m$O+e))*Math.pow((1-t)/(1+t),.5*i)}function ci$5(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=y$T&&(this.k0=.5*(1+Mt$8(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=y$T&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=y$T&&(this.k0=.5*this.cons*F$R(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/B$H(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=F$R(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-m$O,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function ui$4(e){var t,i,n,r,o,a,s=e.x,l=e.y,u=Math.sin(l),c=Math.cos(l),h=_$W(s-this.long0);return Math.abs(Math.abs(s-this.long0)-Math.PI)<=y$T&&Math.abs(l+this.lat0)<=y$T?(e.x=NaN,e.y=NaN,e):this.sphere?(t=2*this.k0/(1+this.sinlat0*u+this.coslat0*c*Math.cos(h)),e.x=this.a*t*c*Math.sin(h)+this.x0,e.y=this.a*t*(this.coslat0*u-this.sinlat0*c*Math.cos(h))+this.y0,e):(i=2*Math.atan(this.ssfn_(l,u,this.e))-m$O,r=Math.cos(i),n=Math.sin(i),Math.abs(this.coslat0)<=y$T?(o=B$H(this.e,l*this.con,this.con*u),a=2*this.a*this.k0*o/this.cons,e.x=this.x0+a*Math.sin(s-this.long0),e.y=this.y0-this.con*a*Math.cos(s-this.long0),e):(Math.abs(this.sinlat0)<y$T?(t=2*this.a*this.k0/(1+r*Math.cos(h)),e.y=t*n):(t=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*n+this.cosX0*r*Math.cos(h))),e.y=t*(this.cosX0*n-this.sinX0*r*Math.cos(h))+this.y0),e.x=t*r*Math.sin(h)+this.x0,e))}function fi$4(e){e.x-=this.x0,e.y-=this.y0;var t,i,n,r,o,a=Math.sqrt(e.x*e.x+e.y*e.y);if(this.sphere){var s=2*Math.atan(a/(2*this.a*this.k0));return t=this.long0,i=this.lat0,a<=y$T?(e.x=t,e.y=i,e):(i=Math.asin(Math.cos(s)*this.sinlat0+e.y*Math.sin(s)*this.coslat0/a),t=Math.abs(this.coslat0)<y$T?this.lat0>0?_$W(this.long0+Math.atan2(e.x,-1*e.y)):_$W(this.long0+Math.atan2(e.x,e.y)):_$W(this.long0+Math.atan2(e.x*Math.sin(s),a*this.coslat0*Math.cos(s)-e.y*this.sinlat0*Math.sin(s))),e.x=t,e.y=i,e)}if(Math.abs(this.coslat0)<=y$T){if(a<=y$T)return i=this.lat0,t=this.long0,e.x=t,e.y=i,e;e.x*=this.con,e.y*=this.con,n=a*this.cons/(2*this.a*this.k0),i=this.con*ct$g(this.e,n),t=this.con*_$W(this.con*this.long0+Math.atan2(e.x,-1*e.y))}else r=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,a<=y$T?o=this.X0:(o=Math.asin(Math.cos(r)*this.sinX0+e.y*Math.sin(r)*this.cosX0/a),t=_$W(this.long0+Math.atan2(e.x*Math.sin(r),a*this.cosX0*Math.cos(r)-e.y*this.sinX0*Math.sin(r)))),i=-1*ct$g(this.e,Math.tan(.5*(m$O+o)));return e.x=t,e.y=i,e}var pi$6=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],mi$4={init:ci$5,forward:ui$4,inverse:fi$4,names:pi$6,ssfn_:Mi$4};function di$6(){var e=this.lat0;this.lambda0=this.long0;var t=Math.sin(e),i=this.a,n=1/this.rf,r=2*n-Math.pow(n,2),o=this.e=Math.sqrt(r);this.R=this.k0*i*Math.sqrt(1-r)/(1-r*Math.pow(t,2)),this.alpha=Math.sqrt(1+r/(1-r)*Math.pow(Math.cos(e),4)),this.b0=Math.asin(t/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),s=Math.log(Math.tan(Math.PI/4+e/2)),l=Math.log((1+o*t)/(1-o*t));this.K=a-this.alpha*s+this.alpha*o/2*l}function yi$5(e){var t=Math.log(Math.tan(Math.PI/4-e.y/2)),i=this.e/2*Math.log((1+this.e*Math.sin(e.y))/(1-this.e*Math.sin(e.y))),n=-this.alpha*(t+i)+this.K,r=2*(Math.atan(Math.exp(n))-Math.PI/4),o=this.alpha*(e.x-this.lambda0),a=Math.atan(Math.sin(o)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(o))),s=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(o));return e.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,e.x=this.R*a+this.x0,e}function _i$5(e){for(var t=e.x-this.x0,i=e.y-this.y0,n=t/this.R,r=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),o=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(r))),s=this.lambda0+a/this.alpha,l=0,u=o,c=-1e3,h=0;Math.abs(u-c)>1e-7;){if(++h>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+o/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(u))/2)),c=u,u=2*Math.atan(Math.exp(l))-Math.PI/2}return e.x=s,e.y=u,e}var xi$3=["somerc"],vi$5={init:di$6,forward:yi$5,inverse:_i$5,names:xi$3};function gi$4(){this.no_off=this.no_off||!1,this.no_rot=this.no_rot||!1,isNaN(this.k0)&&(this.k0=1);var e=Math.sin(this.lat0),t=Math.cos(this.lat0),i=this.e*e;this.bl=Math.sqrt(1+this.es/(1-this.es)*Math.pow(t,4)),this.al=this.a*this.bl*this.k0*Math.sqrt(1-this.es)/(1-i*i);var n,r,o=B$H(this.e,this.lat0,e),a=this.bl/t*Math.sqrt((1-this.es)/(1-i*i));if(a*a<1&&(a=1),isNaN(this.longc)){var s=B$H(this.e,this.lat1,Math.sin(this.lat1)),l=B$H(this.e,this.lat2,Math.sin(this.lat2));this.lat0>=0?this.el=(a+Math.sqrt(a*a-1))*Math.pow(o,this.bl):this.el=(a-Math.sqrt(a*a-1))*Math.pow(o,this.bl);var u=Math.pow(s,this.bl),c=Math.pow(l,this.bl);r=.5*((n=this.el/u)-1/n);var h=(this.el*this.el-c*u)/(this.el*this.el+c*u),d=(c-u)/(c+u),f=_$W(this.long1-this.long2);this.long0=.5*(this.long1+this.long2)-Math.atan(h*Math.tan(.5*this.bl*f)/d)/this.bl,this.long0=_$W(this.long0);var p=_$W(this.long1-this.long0);this.gamma0=Math.atan(Math.sin(this.bl*p)/r),this.alpha=Math.asin(a*Math.sin(this.gamma0))}else n=this.lat0>=0?a+Math.sqrt(a*a-1):a-Math.sqrt(a*a-1),this.el=n*Math.pow(o,this.bl),r=.5*(n-1/n),this.gamma0=Math.asin(Math.sin(this.alpha)/a),this.long0=this.longc-Math.asin(r*Math.tan(this.gamma0))/this.bl;this.no_off?this.uc=0:this.lat0>=0?this.uc=this.al/this.bl*Math.atan2(Math.sqrt(a*a-1),Math.cos(this.alpha)):this.uc=-1*this.al/this.bl*Math.atan2(Math.sqrt(a*a-1),Math.cos(this.alpha))}function bi$5(e){var t,i,n,r=e.x,o=e.y,a=_$W(r-this.long0);if(Math.abs(Math.abs(o)-m$O)<=y$T)n=o>0?-1:1,i=this.al/this.bl*Math.log(Math.tan(E$V+n*this.gamma0*.5)),t=-1*n*m$O*this.al/this.bl;else{var s=B$H(this.e,o,Math.sin(o)),l=this.el/Math.pow(s,this.bl),u=.5*(l-1/l),c=.5*(l+1/l),h=Math.sin(this.bl*a),d=(u*Math.sin(this.gamma0)-h*Math.cos(this.gamma0))/c;i=Math.abs(Math.abs(d)-1)<=y$T?Number.POSITIVE_INFINITY:.5*this.al*Math.log((1-d)/(1+d))/this.bl,t=Math.abs(Math.cos(this.bl*a))<=y$T?this.al*this.bl*a:this.al*Math.atan2(u*Math.cos(this.gamma0)+h*Math.sin(this.gamma0),Math.cos(this.bl*a))/this.bl}return this.no_rot?(e.x=this.x0+t,e.y=this.y0+i):(t-=this.uc,e.x=this.x0+i*Math.cos(this.alpha)+t*Math.sin(this.alpha),e.y=this.y0+t*Math.cos(this.alpha)-i*Math.sin(this.alpha)),e}function wi$5(e){var t,i;this.no_rot?(i=e.y-this.y0,t=e.x-this.x0):(i=(e.x-this.x0)*Math.cos(this.alpha)-(e.y-this.y0)*Math.sin(this.alpha),t=(e.y-this.y0)*Math.cos(this.alpha)+(e.x-this.x0)*Math.sin(this.alpha),t+=this.uc);var n=Math.exp(-1*this.bl*i/this.al),r=.5*(n-1/n),o=.5*(n+1/n),a=Math.sin(this.bl*t/this.al),s=(a*Math.cos(this.gamma0)+r*Math.sin(this.gamma0))/o,l=Math.pow(this.el/Math.sqrt((1+s)/(1-s)),1/this.bl);return Math.abs(s-1)<y$T?(e.x=this.long0,e.y=m$O):Math.abs(s+1)<y$T?(e.x=this.long0,e.y=-1*m$O):(e.y=ct$g(this.e,l),e.x=_$W(this.long0-Math.atan2(r*Math.cos(this.gamma0)-a*Math.sin(this.gamma0),Math.cos(this.bl*t/this.al))/this.bl)),e}var Ai$5=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","omerc"],Ci$4={init:gi$4,forward:bi$5,inverse:wi$5,names:Ai$5};function Ei$4(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<y$T)){var e=this.b/this.a;this.e=Math.sqrt(1-e*e);var t=Math.sin(this.lat1),i=Math.cos(this.lat1),n=F$R(this.e,t,i),r=B$H(this.e,this.lat1,t),o=Math.sin(this.lat2),a=Math.cos(this.lat2),s=F$R(this.e,o,a),l=B$H(this.e,this.lat2,o),u=B$H(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>y$T?this.ns=Math.log(n/s)/Math.log(r/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(r,this.ns)),this.rh=this.a*this.f0*Math.pow(u,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function Pi$4(e){var t=e.x,i=e.y;Math.abs(2*Math.abs(i)-Math.PI)<=y$T&&(i=Mt$8(i)*(m$O-2*y$T));var n,r,o=Math.abs(Math.abs(i)-m$O);if(o>y$T)n=B$H(this.e,i,Math.sin(i)),r=this.a*this.f0*Math.pow(n,this.ns);else{if((o=i*this.ns)<=0)return null;r=0}var a=this.ns*_$W(t-this.long0);return e.x=this.k0*(r*Math.sin(a))+this.x0,e.y=this.k0*(this.rh-r*Math.cos(a))+this.y0,e}function Ni$3(e){var t,i,n,r,o,a=(e.x-this.x0)/this.k0,s=this.rh-(e.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(a*a+s*s),i=1):(t=-Math.sqrt(a*a+s*s),i=-1);var l=0;if(0!==t&&(l=Math.atan2(i*a,i*s)),0!==t||this.ns>0){if(i=1/this.ns,n=Math.pow(t/(this.a*this.f0),i),-9999===(r=ct$g(this.e,n)))return null}else r=-m$O;return o=_$W(l/this.ns+this.long0),e.x=o,e.y=r,e}var Si$3=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_2SP","lcc"],ki$4={init:Ei$4,forward:Pi$4,inverse:Ni$3,names:Si$3};function qi$3(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function Ii$3(e){var t,i,n,r,o,a,s,l=e.x,u=e.y,c=_$W(l-this.long0);return t=Math.pow((1+this.e*Math.sin(u))/(1-this.e*Math.sin(u)),this.alfa*this.e/2),i=2*(Math.atan(this.k*Math.pow(Math.tan(u/2+this.s45),this.alfa)/t)-this.s45),n=-c*this.alfa,r=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(n)),o=Math.asin(Math.cos(i)*Math.sin(n)/Math.cos(r)),a=this.n*o,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(r/2+this.s45),this.n),e.y=s*Math.cos(a)/1,e.x=s*Math.sin(a)/1,this.czech||(e.y*=-1,e.x*=-1),e}function Oi$4(e){var t,i,n,r,o,a,s,l=e.x;e.x=e.y,e.y=l,this.czech||(e.y*=-1,e.x*=-1),o=Math.sqrt(e.x*e.x+e.y*e.y),r=Math.atan2(e.y,e.x)/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(r)),i=Math.asin(Math.cos(n)*Math.sin(r)/Math.cos(t)),e.x=this.long0-i/this.alfa,a=t,s=0;var u=0;do{e.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-e.y)<1e-10&&(s=1),a=e.y,u+=1}while(0===s&&u<15);return u>=15?null:e}var Ri$4=["Krovak","krovak"],Gi$5={init:qi$3,forward:Ii$3,inverse:Oi$4,names:Ri$4},T$R=function(e,t,i,n,r){return e*r-t*Math.sin(2*r)+i*Math.sin(4*r)-n*Math.sin(6*r)},pt$b=function(e){return 1-.25*e*(1+e/16*(3+1.25*e))},mt$d=function(e){return.375*e*(1+.25*e*(1+.46875*e))},dt$e=function(e){return.05859375*e*e*(1+.75*e)},yt$6=function(e){return e*e*e*(35/3072)},ht$a=function(e,t,i){var n=t*i;return e/Math.sqrt(1-n*n)},et$g=function(e){return Math.abs(e)<m$O?e:e-Mt$8(e)*Math.PI},Nt$7=function(e,t,i,n,r){var o,a;o=e/t;for(var s=0;s<15;s++)if(o+=a=(e-(t*o-i*Math.sin(2*o)+n*Math.sin(4*o)-r*Math.sin(6*o)))/(t-2*i*Math.cos(2*o)+4*n*Math.cos(4*o)-6*r*Math.cos(6*o)),Math.abs(a)<=1e-10)return o;return NaN};function Ti$3(){this.sphere||(this.e0=pt$b(this.es),this.e1=mt$d(this.es),this.e2=dt$e(this.es),this.e3=yt$6(this.es),this.ml0=this.a*T$R(this.e0,this.e1,this.e2,this.e3,this.lat0))}function ji$4(e){var t,i,n=e.x,r=e.y;if(n=_$W(n-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(r)*Math.sin(n)),i=this.a*(Math.atan2(Math.tan(r),Math.cos(n))-this.lat0);else{var o=Math.sin(r),a=Math.cos(r),s=ht$a(this.a,this.e,o),l=Math.tan(r)*Math.tan(r),u=n*Math.cos(r),c=u*u,h=this.es*a*a/(1-this.es);t=s*u*(1-c*l*(1/6-(8-l+8*h)*c/120)),i=this.a*T$R(this.e0,this.e1,this.e2,this.e3,r)-this.ml0+s*o/a*c*(.5+(5-l+6*h)*c/24)}return e.x=t+this.x0,e.y=i+this.y0,e}function zi$4(e){e.x-=this.x0,e.y-=this.y0;var t,i,n=e.x/this.a,r=e.y/this.a;if(this.sphere){var o=r+this.lat0;t=Math.asin(Math.sin(o)*Math.cos(n)),i=Math.atan2(Math.tan(n),Math.cos(o))}else{var a=this.ml0/this.a+r,s=Nt$7(a,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(s)-m$O)<=y$T)return e.x=this.long0,e.y=m$O,r<0&&(e.y*=-1),e;var l=ht$a(this.a,this.e,Math.sin(s)),u=l*l*l/this.a/this.a*(1-this.es),c=Math.pow(Math.tan(s),2),h=n*this.a/l,d=h*h;t=s-l*Math.tan(s)/u*h*h*(.5-(1+3*c)*h*h/24),i=h*(1-d*(c/3+(1+3*c)*c*d/15))/Math.cos(s)}return e.x=_$W(i+this.long0),e.y=et$g(t),e}var Li$3=["Cassini","Cassini_Soldner","cass"],Di$6={init:Ti$3,forward:ji$4,inverse:zi$4,names:Li$3},J$Q=function(e,t){var i;return e>1e-7?(1-e*e)*(t/(1-(i=e*t)*i)-.5/e*Math.log((1-i)/(1+i))):2*t},Bi$4=1,Ui$4=2,Fi$4=3,Qi$2=4;function Wi$4(){var e,t=Math.abs(this.lat0);if(Math.abs(t-m$O)<y$T?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(t)<y$T?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0)switch(this.qp=J$Q(this.e,1),this.mmf=.5/(1-this.es),this.apa=th(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),e=Math.sin(this.lat0),this.sinb1=J$Q(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function Hi$3(e){var t,i,n,r,o,a,s,l,u,c,h=e.x,d=e.y;if(h=_$W(h-this.long0),this.sphere){if(o=Math.sin(d),c=Math.cos(d),n=Math.cos(h),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((i=this.mode===this.EQUIT?1+c*n:1+this.sinph0*o+this.cosph0*c*n)<=y$T)return null;t=(i=Math.sqrt(2/i))*c*Math.sin(h),i*=this.mode===this.EQUIT?o:this.cosph0*o-this.sinph0*c*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(d+this.phi0)<y$T)return null;i=E$V-.5*d,t=(i=2*(this.mode===this.S_POLE?Math.cos(i):Math.sin(i)))*Math.sin(h),i*=n}}else{switch(s=0,l=0,u=0,n=Math.cos(h),r=Math.sin(h),o=Math.sin(d),a=J$Q(this.e,o),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(s=a/this.qp,l=Math.sqrt(1-s*s)),this.mode){case this.OBLIQ:u=1+this.sinb1*s+this.cosb1*l*n;break;case this.EQUIT:u=1+l*n;break;case this.N_POLE:u=m$O+d,a=this.qp-a;break;case this.S_POLE:u=d-m$O,a=this.qp+a}if(Math.abs(u)<y$T)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:u=Math.sqrt(2/u),i=this.mode===this.OBLIQ?this.ymf*u*(this.cosb1*s-this.sinb1*l*n):(u=Math.sqrt(2/(1+l*n)))*s*this.ymf,t=this.xmf*u*l*r;break;case this.N_POLE:case this.S_POLE:a>=0?(t=(u=Math.sqrt(a))*r,i=n*(this.mode===this.S_POLE?u:-u)):t=i=0}}return e.x=this.a*t+this.x0,e.y=this.a*i+this.y0,e}function Xi$4(e){e.x-=this.x0,e.y-=this.y0;var t,i,n,r,o,a,s,l=e.x/this.a,u=e.y/this.a;if(this.sphere){var c,h=0,d=0;if((i=.5*(c=Math.sqrt(l*l+u*u)))>1)return null;switch(i=2*Math.asin(i),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(d=Math.sin(i),h=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(c)<=y$T?0:Math.asin(u*d/c),l*=d,u=h*c;break;case this.OBLIQ:i=Math.abs(c)<=y$T?this.phi0:Math.asin(h*this.sinph0+u*d*this.cosph0/c),l*=d*this.cosph0,u=(h-Math.sin(i)*this.sinph0)*c;break;case this.N_POLE:u=-u,i=m$O-i;break;case this.S_POLE:i-=m$O}t=0!==u||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(l,u):0}else{if(s=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(l/=this.dd,u*=this.dd,(a=Math.sqrt(l*l+u*u))<y$T)return e.x=0,e.y=this.phi0,e;r=2*Math.asin(.5*a/this.rq),n=Math.cos(r),l*=r=Math.sin(r),this.mode===this.OBLIQ?(s=n*this.sinb1+u*r*this.cosb1/a,o=this.qp*s,u=a*this.cosb1*n-u*this.sinb1*r):(s=u*r/a,o=this.qp*s,u=a*n)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(u=-u),!(o=l*l+u*u))return e.x=0,e.y=this.phi0,e;s=1-o/this.qp,this.mode===this.S_POLE&&(s=-s)}t=Math.atan2(l,u),i=sh(Math.asin(s),this.apa)}return e.x=_$W(this.long0+t),e.y=i,e}var Ki$3=.3333333333333333,Ji$2=.17222222222222222,Vi$3=.10257936507936508,Zi$4=.06388888888888888,Yi$3=.0664021164021164,$i$2=.016415012942191543;function th(e){var t,i=[];return i[0]=e*Ki$3,t=e*e,i[0]+=t*Ji$2,i[1]=t*Zi$4,t*=e,i[0]+=t*Vi$3,i[1]+=t*Yi$3,i[2]=t*$i$2,i}function sh(e,t){var i=e+e;return e+t[0]*Math.sin(i)+t[1]*Math.sin(i+i)+t[2]*Math.sin(i+i+i)}var ah=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],ih={init:Wi$4,forward:Hi$3,inverse:Xi$4,names:ah,S_POLE:Bi$4,N_POLE:Ui$4,EQUIT:Fi$4,OBLIQ:Qi$2},V$H=function(e){return Math.abs(e)>1&&(e=e>1?1:-1),Math.asin(e)};function hh(){Math.abs(this.lat1+this.lat2)<y$T||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=F$R(this.e3,this.sin_po,this.cos_po),this.qs1=J$Q(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=F$R(this.e3,this.sin_po,this.cos_po),this.qs2=J$Q(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=J$Q(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>y$T?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function eh(e){var t=e.x,i=e.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var n=J$Q(this.e3,this.sin_phi,this.cos_phi),r=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,o=this.ns0*_$W(t-this.long0),a=r*Math.sin(o)+this.x0,s=this.rh-r*Math.cos(o)+this.y0;return e.x=a,e.y=s,e}function nh(e){var t,i,n,r,o,a;return e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns0>=0?(t=Math.sqrt(e.x*e.x+e.y*e.y),n=1):(t=-Math.sqrt(e.x*e.x+e.y*e.y),n=-1),r=0,0!==t&&(r=Math.atan2(n*e.x,n*e.y)),n=t*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(i=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,i)),o=_$W(r/this.ns0+this.long0),e.x=o,e.y=a,e}function rh(e,t){var i,n,r,o,a=V$H(.5*t);if(e<y$T)return a;for(var s=e*e,l=1;l<=25;l++)if(a+=o=.5*(r=1-(n=e*(i=Math.sin(a)))*n)*r/Math.cos(a)*(t/(1-s)-i/r+.5/e*Math.log((1-n)/(1+n))),Math.abs(o)<=1e-7)return a;return null}var oh=["Albers_Conic_Equal_Area","Albers","aea"],lh={init:hh,forward:eh,inverse:nh,names:oh,phi1z:rh};function Mh(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function ch(e){var t,i,n,r,o,a,s,l=e.x,u=e.y;return n=_$W(l-this.long0),t=Math.sin(u),i=Math.cos(u),r=Math.cos(n),1,(o=this.sin_p14*t+this.cos_p14*i*r)>0||Math.abs(o)<=y$T?(a=this.x0+1*this.a*i*Math.sin(n)/o,s=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*i*r)/o):(a=this.x0+this.infinity_dist*i*Math.sin(n),s=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*i*r)),e.x=a,e.y=s,e}function uh(e){var t,i,n,r,o,a;return e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,(t=Math.sqrt(e.x*e.x+e.y*e.y))?(r=Math.atan2(t,this.rc),i=Math.sin(r),n=Math.cos(r),a=V$H(n*this.sin_p14+e.y*i*this.cos_p14/t),o=Math.atan2(e.x*i,t*this.cos_p14*n-e.y*this.sin_p14*i),o=_$W(this.long0+o)):(a=this.phic0,o=0),e.x=o,e.y=a,e}var fh=["gnom"],ph={init:Mh,forward:ch,inverse:uh,names:fh},mh=function(e,t){var i=1-(1-e*e)/(2*e)*Math.log((1-e)/(1+e));if(Math.abs(Math.abs(t)-i)<1e-6)return t<0?-1*m$O:m$O;for(var n,r,o,a,s=Math.asin(.5*t),l=0;l<30;l++)if(r=Math.sin(s),o=Math.cos(s),a=e*r,s+=n=Math.pow(1-a*a,2)/(2*o)*(t/(1-e*e)-r/(1-a*a)+.5/e*Math.log((1-a)/(1+a))),Math.abs(n)<=1e-10)return s;return NaN};function dh(){this.sphere||(this.k0=F$R(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function yh(e){var t,i,n=e.x,r=e.y,o=_$W(n-this.long0);if(this.sphere)t=this.x0+this.a*o*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(r)/Math.cos(this.lat_ts);else{var a=J$Q(this.e,Math.sin(r));t=this.x0+this.a*this.k0*o,i=this.y0+this.a*a*.5/this.k0}return e.x=t,e.y=i,e}function _h(e){var t,i;return e.x-=this.x0,e.y-=this.y0,this.sphere?(t=_$W(this.long0+e.x/this.a/Math.cos(this.lat_ts)),i=Math.asin(e.y/this.a*Math.cos(this.lat_ts))):(i=mh(this.e,2*e.y*this.k0/this.a),t=_$W(this.long0+e.x/(this.a*this.k0))),e.x=t,e.y=i,e}var xh=["cea"],vh={init:dh,forward:yh,inverse:_h,names:xh};function gh(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function bh(e){var t=e.x,i=e.y,n=_$W(t-this.long0),r=et$g(i-this.lat0);return e.x=this.x0+this.a*n*this.rc,e.y=this.y0+this.a*r,e}function wh(e){var t=e.x,i=e.y;return e.x=_$W(this.long0+(t-this.x0)/(this.a*this.rc)),e.y=et$g(this.lat0+(i-this.y0)/this.a),e}var Ah=["Equirectangular","Equidistant_Cylindrical","eqc"],Ch={init:gh,forward:bh,inverse:wh,names:Ah},gs=20;function Eh(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=pt$b(this.es),this.e1=mt$d(this.es),this.e2=dt$e(this.es),this.e3=yt$6(this.es),this.ml0=this.a*T$R(this.e0,this.e1,this.e2,this.e3,this.lat0)}function Ph(e){var t,i,n,r=e.x,o=e.y,a=_$W(r-this.long0);if(n=a*Math.sin(o),this.sphere)Math.abs(o)<=y$T?(t=this.a*a,i=-1*this.a*this.lat0):(t=this.a*Math.sin(n)/Math.tan(o),i=this.a*(et$g(o-this.lat0)+(1-Math.cos(n))/Math.tan(o)));else if(Math.abs(o)<=y$T)t=this.a*a,i=-1*this.ml0;else{var s=ht$a(this.a,this.e,Math.sin(o))/Math.tan(o);t=s*Math.sin(n),i=this.a*T$R(this.e0,this.e1,this.e2,this.e3,o)-this.ml0+s*(1-Math.cos(n))}return e.x=t+this.x0,e.y=i+this.y0,e}function Nh(e){var t,i,n,r,o,a,s,l,u;if(n=e.x-this.x0,r=e.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=y$T)t=_$W(n/this.a+this.long0),i=0;else{var c;for(a=this.lat0+r/this.a,s=n*n/this.a/this.a+a*a,l=a,o=gs;o;--o)if(l+=u=-1*(a*(l*(c=Math.tan(l))+1)-l-.5*(l*l+s)*c)/((l-a)/c-1),Math.abs(u)<=y$T){i=l;break}t=_$W(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(i))}else if(Math.abs(r+this.ml0)<=y$T)i=0,t=_$W(this.long0+n/this.a);else{var h,d,f,p,_;for(a=(this.ml0+r)/this.a,s=n*n/this.a/this.a+a*a,l=a,o=gs;o;--o)if(_=this.e*Math.sin(l),h=Math.sqrt(1-_*_)*Math.tan(l),d=this.a*T$R(this.e0,this.e1,this.e2,this.e3,l),f=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),l-=u=(a*(h*(p=d/this.a)+1)-p-.5*h*(p*p+s))/(this.es*Math.sin(2*l)*(p*p+s-2*a*p)/(4*h)+(a-p)*(h*f-2/Math.sin(2*l))-f),Math.abs(u)<=y$T){i=l;break}h=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),t=_$W(this.long0+Math.asin(n*h/this.a)/Math.sin(i))}return e.x=t,e.y=i,e}var Sh=["Polyconic","poly"],kh={init:Eh,forward:Ph,inverse:Nh,names:Sh};function qh(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function Ih(e){var t,i=e.x,n=e.y-this.lat0,r=i-this.long0,o=n/ot$i*1e-5,a=r,s=1,l=0;for(t=1;t<=10;t++)s*=o,l+=this.A[t]*s;var u,c=l,h=a,d=1,f=0,p=0,_=0;for(t=1;t<=6;t++)u=f*c+d*h,d=d*c-f*h,f=u,p=p+this.B_re[t]*d-this.B_im[t]*f,_=_+this.B_im[t]*d+this.B_re[t]*f;return e.x=_*this.a+this.x0,e.y=p*this.a+this.y0,e}function Oh(e){var t,i,n=e.x,r=e.y,o=n-this.x0,a=(r-this.y0)/this.a,s=o/this.a,l=1,u=0,c=0,h=0;for(t=1;t<=6;t++)i=u*a+l*s,l=l*a-u*s,u=i,c=c+this.C_re[t]*l-this.C_im[t]*u,h=h+this.C_im[t]*l+this.C_re[t]*u;for(var d=0;d<this.iterations;d++){var f,p=c,_=h,m=a,$=s;for(t=2;t<=6;t++)f=_*c+p*h,p=p*c-_*h,_=f,m+=(t-1)*(this.B_re[t]*p-this.B_im[t]*_),$+=(t-1)*(this.B_im[t]*p+this.B_re[t]*_);p=1,_=0;var g=this.B_re[1],y=this.B_im[1];for(t=2;t<=6;t++)f=_*c+p*h,p=p*c-_*h,_=f,g+=t*(this.B_re[t]*p-this.B_im[t]*_),y+=t*(this.B_im[t]*p+this.B_re[t]*_);var v=g*g+y*y;c=(m*g+$*y)/v,h=($*g-m*y)/v}var x=c,b=h,S=1,w=0;for(t=1;t<=9;t++)S*=x,w+=this.D[t]*S;var C=this.lat0+w*ot$i*1e5,T=this.long0+b;return e.x=T,e.y=C,e}var Rh=["New_Zealand_Map_Grid","nzmg"],Gh={init:qh,forward:Ih,inverse:Oh,names:Rh};function Th(){}function jh(e){var t=e.x,i=e.y,n=_$W(t-this.long0),r=this.x0+this.a*n,o=this.y0+this.a*Math.log(Math.tan(Math.PI/4+i/2.5))*1.25;return e.x=r,e.y=o,e}function zh(e){e.x-=this.x0,e.y-=this.y0;var t=_$W(this.long0+e.x/this.a),i=2.5*(Math.atan(Math.exp(.8*e.y/this.a))-Math.PI/4);return e.x=t,e.y=i,e}var Lh=["Miller_Cylindrical","mill"],Dh={init:Th,forward:jh,inverse:zh,names:Lh},Bh=20;function Uh(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=ys(this.es)}function Fh(e){var t,i,n=e.x,r=e.y;if(n=_$W(n-this.long0),this.sphere){if(this.m)for(var o=this.n*Math.sin(r),a=Bh;a;--a){var s=(this.m*r+Math.sin(r)-o)/(this.m+Math.cos(r));if(r-=s,Math.abs(s)<y$T)break}else r=1!==this.n?Math.asin(this.n*Math.sin(r)):r;t=this.a*this.C_x*n*(this.m+Math.cos(r)),i=this.a*this.C_y*r}else{var l=Math.sin(r),u=Math.cos(r);i=this.a*Et$5(r,l,u,this.en),t=this.a*n*u/Math.sqrt(1-this.es*l*l)}return e.x=t,e.y=i,e}function Qh(e){var t,i,n,r;return e.x-=this.x0,n=e.x/this.a,e.y-=this.y0,t=e.y/this.a,this.sphere?(t/=this.C_y,n/=this.C_x*(this.m+Math.cos(t)),this.m?t=V$H((this.m*t+Math.sin(t))/this.n):1!==this.n&&(t=V$H(Math.sin(t)/this.n)),n=_$W(n+this.long0),t=et$g(t)):(t=_s(e.y/this.a,this.es,this.en),(r=Math.abs(t))<m$O?(r=Math.sin(t),i=this.long0+e.x*Math.sqrt(1-this.es*r*r)/(this.a*Math.cos(t)),n=_$W(i)):r-y$T<m$O&&(n=this.long0)),e.x=n,e.y=t,e}var Wh=["Sinusoidal","sinu"],Hh={init:Uh,forward:Fh,inverse:Qh,names:Wh};function Xh(){}function Kh(e){for(var t=e.x,i=e.y,n=_$W(t-this.long0),r=i,o=Math.PI*Math.sin(i);;){var a=-(r+Math.sin(r)-o)/(1+Math.cos(r));if(r+=a,Math.abs(a)<y$T)break}r/=2,Math.PI/2-Math.abs(i)<y$T&&(n=0);var s=.900316316158*this.a*n*Math.cos(r)+this.x0,l=1.4142135623731*this.a*Math.sin(r)+this.y0;return e.x=s,e.y=l,e}function Jh(e){var t,i;e.x-=this.x0,e.y-=this.y0,i=e.y/(1.4142135623731*this.a),Math.abs(i)>.999999999999&&(i=.999999999999),t=Math.asin(i);var n=_$W(this.long0+e.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),i=(2*t+Math.sin(2*t))/Math.PI,Math.abs(i)>1&&(i=1);var r=Math.asin(i);return e.x=n,e.y=r,e}var Vh=["Mollweide","moll"],Zh={init:Xh,forward:Kh,inverse:Jh,names:Vh};function Yh(){Math.abs(this.lat1+this.lat2)<y$T||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=pt$b(this.es),this.e1=mt$d(this.es),this.e2=dt$e(this.es),this.e3=yt$6(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=F$R(this.e,this.sinphi,this.cosphi),this.ml1=T$R(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<y$T?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=F$R(this.e,this.sinphi,this.cosphi),this.ml2=T$R(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=T$R(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function $h(e){var t,i=e.x,n=e.y;if(this.sphere)t=this.a*(this.g-n);else{var r=T$R(this.e0,this.e1,this.e2,this.e3,n);t=this.a*(this.g-r)}var o=this.ns*_$W(i-this.long0),a=this.x0+t*Math.sin(o),s=this.y0+this.rh-t*Math.cos(o);return e.x=a,e.y=s,e}function te$z(e){var t,i,n,r;e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns>=0?(i=Math.sqrt(e.x*e.x+e.y*e.y),t=1):(i=-Math.sqrt(e.x*e.x+e.y*e.y),t=-1);var o=0;if(0!==i&&(o=Math.atan2(t*e.x,t*e.y)),this.sphere)return r=_$W(this.long0+o/this.ns),n=et$g(this.g-i/this.a),e.x=r,e.y=n,e;var a=this.g-i/this.a;return n=Nt$7(a,this.e0,this.e1,this.e2,this.e3),r=_$W(this.long0+o/this.ns),e.x=r,e.y=n,e}var se$v=["Equidistant_Conic","eqdc"],ae$B={init:Yh,forward:$h,inverse:te$z,names:se$v};function ie$C(){this.R=this.a}function he$s(e){var t,i,n=e.x,r=e.y,o=_$W(n-this.long0);Math.abs(r)<=y$T&&(t=this.x0+this.R*o,i=this.y0);var a=V$H(2*Math.abs(r/Math.PI));(Math.abs(o)<=y$T||Math.abs(Math.abs(r)-m$O)<=y$T)&&(t=this.x0,i=r>=0?this.y0+Math.PI*this.R*Math.tan(.5*a):this.y0+Math.PI*this.R*-Math.tan(.5*a));var s=.5*Math.abs(Math.PI/o-o/Math.PI),l=s*s,u=Math.sin(a),c=Math.cos(a),h=c/(u+c-1),d=h*h,f=h*(2/u-1),p=f*f,_=Math.PI*this.R*(s*(h-p)+Math.sqrt(l*(h-p)*(h-p)-(p+l)*(d-p)))/(p+l);o<0&&(_=-_),t=this.x0+_;var m=l+h;return _=Math.PI*this.R*(f*m-s*Math.sqrt((p+l)*(l+1)-m*m))/(p+l),i=r>=0?this.y0+_:this.y0-_,e.x=t,e.y=i,e}function ee$z(e){var t,i,n,r,o,a,s,l,u,c,h,d;return e.x-=this.x0,e.y-=this.y0,h=Math.PI*this.R,o=(n=e.x/h)*n+(r=e.y/h)*r,h=3*(r*r/(l=-2*(a=-Math.abs(r)*(1+o))+1+2*r*r+o*o)+(2*(s=a-2*r*r+n*n)*s*s/l/l/l-9*a*s/l/l)/27)/(u=(a-s*s/3/l)/l)/(c=2*Math.sqrt(-u/3)),Math.abs(h)>1&&(h=h>=0?1:-1),d=Math.acos(h)/3,i=e.y>=0?(-c*Math.cos(d+Math.PI/3)-s/3/l)*Math.PI:-(-c*Math.cos(d+Math.PI/3)-s/3/l)*Math.PI,t=Math.abs(n)<y$T?this.long0:_$W(this.long0+Math.PI*(o-1+Math.sqrt(1+2*(n*n-r*r)+o*o))/2/n),e.x=t,e.y=i,e}var ne$y=["Van_der_Grinten_I","VanDerGrinten","vandg"],re$C={init:ie$C,forward:he$s,inverse:ee$z,names:ne$y};function oe$x(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function le$u(e){var t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,$,g,y,v,x,b,S=e.x,w=e.y,C=Math.sin(e.y),T=Math.cos(e.y),P=_$W(S-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=y$T?(e.x=this.x0+this.a*(m$O-w)*Math.sin(P),e.y=this.y0-this.a*(m$O-w)*Math.cos(P),e):Math.abs(this.sin_p12+1)<=y$T?(e.x=this.x0+this.a*(m$O+w)*Math.sin(P),e.y=this.y0+this.a*(m$O+w)*Math.cos(P),e):(g=this.sin_p12*C+this.cos_p12*T*Math.cos(P),$=(m=Math.acos(g))/Math.sin(m),e.x=this.x0+this.a*$*T*Math.sin(P),e.y=this.y0+this.a*$*(this.cos_p12*C-this.sin_p12*T*Math.cos(P)),e):(t=pt$b(this.es),i=mt$d(this.es),n=dt$e(this.es),r=yt$6(this.es),Math.abs(this.sin_p12-1)<=y$T?(o=this.a*T$R(t,i,n,r,m$O),a=this.a*T$R(t,i,n,r,w),e.x=this.x0+(o-a)*Math.sin(P),e.y=this.y0-(o-a)*Math.cos(P),e):Math.abs(this.sin_p12+1)<=y$T?(o=this.a*T$R(t,i,n,r,m$O),a=this.a*T$R(t,i,n,r,w),e.x=this.x0+(o+a)*Math.sin(P),e.y=this.y0+(o+a)*Math.cos(P),e):(s=C/T,l=ht$a(this.a,this.e,this.sin_p12),u=ht$a(this.a,this.e,C),c=Math.atan((1-this.es)*s+this.es*l*this.sin_p12/(u*T)),y=0===(h=Math.atan2(Math.sin(P),this.cos_p12*Math.tan(c)-this.sin_p12*Math.cos(P)))?Math.asin(this.cos_p12*Math.sin(c)-this.sin_p12*Math.cos(c)):Math.abs(Math.abs(h)-Math.PI)<=y$T?-Math.asin(this.cos_p12*Math.sin(c)-this.sin_p12*Math.cos(c)):Math.asin(Math.sin(P)*Math.cos(c)/Math.sin(h)),d=this.e*this.sin_p12/Math.sqrt(1-this.es),m=l*y*(1-(v=y*y)*(_=(f=this.e*this.cos_p12*Math.cos(h)/Math.sqrt(1-this.es))*f)*(1-_)/6+(x=v*y)/8*(p=d*f)*(1-2*_)+(b=x*y)/120*(_*(4-7*_)-3*d*d*(1-7*_))-b*y/48*p),e.x=this.x0+m*Math.sin(h),e.y=this.y0+m*Math.cos(h),e))}function Me$n(e){var t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,$,g,y,v,x,b;return e.x-=this.x0,e.y-=this.y0,this.sphere?(t=Math.sqrt(e.x*e.x+e.y*e.y))>2*m$O*this.a?void 0:(i=t/this.a,n=Math.sin(i),r=Math.cos(i),o=this.long0,Math.abs(t)<=y$T?a=this.lat0:(a=V$H(r*this.sin_p12+e.y*n*this.cos_p12/t),s=Math.abs(this.lat0)-m$O,o=Math.abs(s)<=y$T?this.lat0>=0?_$W(this.long0+Math.atan2(e.x,-e.y)):_$W(this.long0-Math.atan2(-e.x,e.y)):_$W(this.long0+Math.atan2(e.x*n,t*this.cos_p12*r-e.y*this.sin_p12*n))),e.x=o,e.y=a,e):(l=pt$b(this.es),u=mt$d(this.es),c=dt$e(this.es),h=yt$6(this.es),Math.abs(this.sin_p12-1)<=y$T?(d=this.a*T$R(l,u,c,h,m$O),t=Math.sqrt(e.x*e.x+e.y*e.y),a=Nt$7((d-t)/this.a,l,u,c,h),o=_$W(this.long0+Math.atan2(e.x,-1*e.y)),e.x=o,e.y=a,e):Math.abs(this.sin_p12+1)<=y$T?(d=this.a*T$R(l,u,c,h,m$O),t=Math.sqrt(e.x*e.x+e.y*e.y),a=Nt$7((t-d)/this.a,l,u,c,h),o=_$W(this.long0+Math.atan2(e.x,e.y)),e.x=o,e.y=a,e):(t=Math.sqrt(e.x*e.x+e.y*e.y),_=Math.atan2(e.x,e.y),f=ht$a(this.a,this.e,this.sin_p12),m=Math.cos(_),g=-($=this.e*this.cos_p12*m)*$/(1-this.es),y=3*this.es*(1-g)*this.sin_p12*this.cos_p12*m/(1-this.es),b=1-g*(x=(v=t/f)-g*(1+g)*Math.pow(v,3)/6-y*(1+3*g)*Math.pow(v,4)/24)*x/2-v*x*x*x/6,p=Math.asin(this.sin_p12*Math.cos(x)+this.cos_p12*Math.sin(x)*m),o=_$W(this.long0+Math.asin(Math.sin(_)*Math.sin(x)/Math.cos(p))),a=Math.atan((1-this.es*b*this.sin_p12/Math.sin(p))*Math.tan(p)/(1-this.es)),e.x=o,e.y=a,e))}var ce$q=["Azimuthal_Equidistant","aeqd"],ue$s={init:oe$x,forward:le$u,inverse:Me$n,names:ce$q};function fe$q(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function pe$s(e){var t,i,n,r,o,a,s,l=e.x,u=e.y;return n=_$W(l-this.long0),t=Math.sin(u),i=Math.cos(u),r=Math.cos(n),1,((o=this.sin_p14*t+this.cos_p14*i*r)>0||Math.abs(o)<=y$T)&&(a=1*this.a*i*Math.sin(n),s=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*i*r)),e.x=a,e.y=s,e}function me$z(e){var t,i,n,r,o,a,s;return e.x-=this.x0,e.y-=this.y0,t=Math.sqrt(e.x*e.x+e.y*e.y),i=V$H(t/this.a),n=Math.sin(i),r=Math.cos(i),a=this.long0,Math.abs(t)<=y$T?(s=this.lat0,e.x=a,e.y=s,e):(s=V$H(r*this.sin_p14+e.y*n*this.cos_p14/t),o=Math.abs(this.lat0)-m$O,Math.abs(o)<=y$T?(a=this.lat0>=0?_$W(this.long0+Math.atan2(e.x,-e.y)):_$W(this.long0-Math.atan2(-e.x,e.y)),e.x=a,e.y=s,e):(a=_$W(this.long0+Math.atan2(e.x*n,t*this.cos_p14*r-e.y*this.sin_p14*n)),e.x=a,e.y=s,e))}var de$t=["ortho"],ye$p={init:fe$q,forward:pe$s,inverse:me$z,names:de$t},S$G={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},C$R={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function _e$n(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=m$O-E$V/2?this.face=S$G.TOP:this.lat0<=-(m$O-E$V/2)?this.face=S$G.BOTTOM:Math.abs(this.long0)<=E$V?this.face=S$G.FRONT:Math.abs(this.long0)<=m$O+E$V?this.face=this.long0>0?S$G.RIGHT:S$G.LEFT:this.face=S$G.BACK,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function xe$w(e){var t,i,n,r,o,a,s={x:0,y:0},l={value:0};if(e.x-=this.long0,t=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(e.y)):e.y,i=e.x,this.face===S$G.TOP)r=m$O-t,i>=E$V&&i<=m$O+E$V?(l.value=C$R.AREA_0,n=i-m$O):i>m$O+E$V||i<=-(m$O+E$V)?(l.value=C$R.AREA_1,n=i>0?i-k$Q:i+k$Q):i>-(m$O+E$V)&&i<=-E$V?(l.value=C$R.AREA_2,n=i+m$O):(l.value=C$R.AREA_3,n=i);else if(this.face===S$G.BOTTOM)r=m$O+t,i>=E$V&&i<=m$O+E$V?(l.value=C$R.AREA_0,n=-i+m$O):i<E$V&&i>=-E$V?(l.value=C$R.AREA_1,n=-i):i<-E$V&&i>=-(m$O+E$V)?(l.value=C$R.AREA_2,n=-i-m$O):(l.value=C$R.AREA_3,n=i>0?-i+k$Q:-i-k$Q);else{var u,c,h,d,f,p;this.face===S$G.RIGHT?i=nt$g(i,+m$O):this.face===S$G.BACK?i=nt$g(i,+k$Q):this.face===S$G.LEFT&&(i=nt$g(i,-m$O)),d=Math.sin(t),f=Math.cos(t),p=Math.sin(i),u=f*Math.cos(i),c=f*p,h=d,this.face===S$G.FRONT?n=St$7(r=Math.acos(u),h,c,l):this.face===S$G.RIGHT?n=St$7(r=Math.acos(c),h,-u,l):this.face===S$G.BACK?n=St$7(r=Math.acos(-u),h,-c,l):this.face===S$G.LEFT?n=St$7(r=Math.acos(-c),h,u,l):(r=n=0,l.value=C$R.AREA_0)}return a=Math.atan(12/k$Q*(n+Math.acos(Math.sin(n)*Math.cos(E$V))-m$O)),o=Math.sqrt((1-Math.cos(r))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(n))))),l.value===C$R.AREA_1?a+=m$O:l.value===C$R.AREA_2?a+=k$Q:l.value===C$R.AREA_3&&(a+=1.5*k$Q),s.x=o*Math.cos(a),s.y=o*Math.sin(a),s.x=s.x*this.a+this.x0,s.y=s.y*this.a+this.y0,e.x=s.x,e.y=s.y,e}function ve$q(e){var t,i,n,r,o,a,s,l,u,c,h,d,f={lam:0,phi:0},p={value:0};if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,i=Math.atan(Math.sqrt(e.x*e.x+e.y*e.y)),t=Math.atan2(e.y,e.x),e.x>=0&&e.x>=Math.abs(e.y)?p.value=C$R.AREA_0:e.y>=0&&e.y>=Math.abs(e.x)?(p.value=C$R.AREA_1,t-=m$O):e.x<0&&-e.x>=Math.abs(e.y)?(p.value=C$R.AREA_2,t=t<0?t+k$Q:t-k$Q):(p.value=C$R.AREA_3,t+=m$O),u=k$Q/12*Math.tan(t),o=Math.sin(u)/(Math.cos(u)-1/Math.sqrt(2)),a=Math.atan(o),(s=1-(n=Math.cos(t))*n*(r=Math.tan(i))*r*(1-Math.cos(Math.atan(1/Math.cos(a)))))<-1?s=-1:s>1&&(s=1),this.face===S$G.TOP)l=Math.acos(s),f.phi=m$O-l,p.value===C$R.AREA_0?f.lam=a+m$O:p.value===C$R.AREA_1?f.lam=a<0?a+k$Q:a-k$Q:p.value===C$R.AREA_2?f.lam=a-m$O:f.lam=a;else if(this.face===S$G.BOTTOM)l=Math.acos(s),f.phi=l-m$O,p.value===C$R.AREA_0?f.lam=-a+m$O:p.value===C$R.AREA_1?f.lam=-a:p.value===C$R.AREA_2?f.lam=-a-m$O:f.lam=a<0?-a-k$Q:-a+k$Q;else{var _,m,$;u=(_=s)*_,m=(u+=($=u>=1?0:Math.sqrt(1-u)*Math.sin(a))*$)>=1?0:Math.sqrt(1-u),p.value===C$R.AREA_1?(u=m,m=-$,$=u):p.value===C$R.AREA_2?(m=-m,$=-$):p.value===C$R.AREA_3&&(u=m,m=$,$=-u),this.face===S$G.RIGHT?(u=_,_=-m,m=u):this.face===S$G.BACK?(_=-_,m=-m):this.face===S$G.LEFT&&(u=_,_=m,m=-u),f.phi=Math.acos(-$)-m$O,f.lam=Math.atan2(m,_),this.face===S$G.RIGHT?f.lam=nt$g(f.lam,-m$O):this.face===S$G.BACK?f.lam=nt$g(f.lam,-k$Q):this.face===S$G.LEFT&&(f.lam=nt$g(f.lam,+m$O))}0!==this.es&&(c=f.phi<0?1:0,h=Math.tan(f.phi),d=this.b/Math.sqrt(h*h+this.one_minus_f_squared),f.phi=Math.atan(Math.sqrt(this.a*this.a-d*d)/(this.one_minus_f*d)),c&&(f.phi=-f.phi));return f.lam+=this.long0,e.x=f.lam,e.y=f.phi,e}function St$7(e,t,i,n){var r;return e<y$T?(n.value=C$R.AREA_0,r=0):(r=Math.atan2(t,i),Math.abs(r)<=E$V?n.value=C$R.AREA_0:r>E$V&&r<=m$O+E$V?(n.value=C$R.AREA_1,r-=m$O):r>m$O+E$V||r<=-(m$O+E$V)?(n.value=C$R.AREA_2,r=r>=0?r-k$Q:r+k$Q):(n.value=C$R.AREA_3,r+=m$O)),r}function nt$g(e,t){var i=e+t;return i<-k$Q?i+=It$7:i>+k$Q&&(i-=It$7),i}var ge$m=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"],be$u={init:_e$n,forward:xe$w,inverse:ve$q,names:ge$m},Ut$7=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],_t$9=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],bs=.8487,ws=1.3523,As=X$H/5,we$n=1/As,rt$h=18,kt$8=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},Ae$i=function(e,t){return e[1]+t*(2*e[2]+3*t*e[3])};function Ce$p(e,t,i,n){for(var r=t;n;--n){var o=e(r);if(r-=o,Math.abs(o)<i)break}return r}function Ee$p(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function Pe$l(e){var t=_$W(e.x-this.long0),i=Math.abs(e.y),n=Math.floor(i*As);n<0?n=0:n>=rt$h&&(n=rt$h-1),i=X$H*(i-we$n*n);var r={x:kt$8(Ut$7[n],i)*t,y:kt$8(_t$9[n],i)};return e.y<0&&(r.y=-r.y),r.x=r.x*this.a*bs+this.x0,r.y=r.y*this.a*ws+this.y0,r}function Ne$h(e){var t={x:(e.x-this.x0)/(this.a*bs),y:Math.abs(e.y-this.y0)/(this.a*ws)};if(t.y>=1)t.x/=Ut$7[rt$h][0],t.y=e.y<0?-m$O:m$O;else{var i=Math.floor(t.y*rt$h);for(i<0?i=0:i>=rt$h&&(i=rt$h-1);;)if(_t$9[i][0]>t.y)--i;else{if(!(_t$9[i+1][0]<=t.y))break;++i}var n=_t$9[i],r=5*(t.y-n[0])/(_t$9[i+1][0]-n[0]);r=Ce$p((function(e){return(kt$8(n,e)-t.y)/Ae$i(n,e)}),r,y$T,100),t.x/=kt$8(Ut$7[i],r),t.y=(5*i+r)*R$N,e.y<0&&(t.y=-t.y)}return t.x=_$W(t.x+this.long0),t}var Se$h=["Robinson","robin"],ke$b={init:Ee$p,forward:Pe$l,inverse:Ne$h,names:Se$h};function qe$f(){this.name="geocent"}function Ie$m(e){return $t$7(e,this.es,this.a)}function Oe$n(e){return ts(e,this.es,this.a,this.b)}var Re$j=["Geocentric","geocentric","geocent","Geocent"],Ge$f={init:qe$f,forward:Ie$m,inverse:Oe$n,names:Re$j},Te$r=function(e){e.Proj.projections.add(Da$3),e.Proj.projections.add(Pt$6),e.Proj.projections.add($a$1),e.Proj.projections.add(li$4),e.Proj.projections.add(mi$4),e.Proj.projections.add(vi$5),e.Proj.projections.add(Ci$4),e.Proj.projections.add(ki$4),e.Proj.projections.add(Gi$5),e.Proj.projections.add(Di$6),e.Proj.projections.add(ih),e.Proj.projections.add(lh),e.Proj.projections.add(ph),e.Proj.projections.add(vh),e.Proj.projections.add(Ch),e.Proj.projections.add(kh),e.Proj.projections.add(Gh),e.Proj.projections.add(Dh),e.Proj.projections.add(Hh),e.Proj.projections.add(Zh),e.Proj.projections.add(ae$B),e.Proj.projections.add(re$C),e.Proj.projections.add(ue$s),e.Proj.projections.add(ye$p),e.Proj.projections.add(be$u),e.Proj.projections.add(ke$b),e.Proj.projections.add(Ge$f)};function _$V(e){e=e$1Y(e,{});var t=e$1Y(e.name,"tmerc"),i=e$1Y(e.centralMeridian,117),n=e$1Y(e.primeMeridian,0),r=e$1Y(e.standardParallel_1,0),o=e$1Y(e.standardParallel_2,0),a=e$1Y(e.eastFalse,5e5),s=e$1Y(e.northFalse,0),l=e$1Y(e.semimajorAxis,6378137),u=e$1Y(e.inverseFlattening,298.257222101),c=(1-1/u)*l,h=e.ellps;if(t$$(h))d="+proj={name} +lon_0={lon_0} +lat_0={lat_0} +lat_1={lat_1} +lat_2={lat_2} +x_0={x_0} +y_0={y_0} +ellps={ellps}",this._projection=d.replace("{name}",t).replace("{lon_0}",i).replace("{lat_0}",n).replace("{lat_1}",r).replace("{lat_2}",o).replace("{x_0}",a).replace("{y_0}",s).replace("{ellps}",h);else{var d="+proj={name} +lon_0={lon_0} +lat_0={lat_0} +lat_1={lat_1} +lat_2={lat_2} +x_0={x_0} +y_0={y_0} +a={a} +b={b} +rf={rf}";this._projection=d.replace("{name}",t).replace("{lon_0}",i).replace("{lat_0}",n).replace("{lat_1}",r).replace("{lat_2}",o).replace("{x_0}",a).replace("{y_0}",s).replace("{a}",l).replace("{b}",c).replace("{rf}",u)}}L$U.defaultDatum="WGS84",L$U.Proj=Q$S,L$U.WGS84=new L$U.Proj("WGS84"),L$U.Point=it$e,L$U.toPoint=as,L$U.defs=G$P,L$U.transform=Ct$5,L$U.mgrs=da$2,L$U.version="2.6.1",Te$r(L$U),Object.defineProperties(_$V.prototype,{projection:{get:function(){return this._projection}}}),_$V.prototype.project=function(e,t){var i=L$U(this._projection,[n$1d.toDegrees(e.longitude),n$1d.toDegrees(e.latitude)]);return t$$(t)?(t.x=i[0],t.y=i[1],t.z=e.height,t):new a$11(i[0],i[1],e.height)},_$V.prototype.unproject=function(e,t){if(!t$$(e))throw new t$_("cartesian is required");var i=L$U(this._projection).inverse([e.x,e.y]),n=n$1d.toRadians(i[0]),r=n$1d.toRadians(i[1]);return t$$(t)?(t.longitude=n,t.latitude=r,t):new i$1g(n,r)};var x$W={computePositions:function(e,t,i,n,r){var o,a=.5*e,s=-a,l=n+n,u=new Float64Array(3*(r?2*l:l)),c=0,h=0,d=r?3*l:0,f=r?3*(l+n):3*n;for(o=0;o<n;o++){var p=o/n*n$1d.TWO_PI,_=Math.cos(p),m=Math.sin(p),$=_*i,g=m*i,y=_*t,v=m*t;u[h+d]=$,u[h+d+1]=g,u[h+d+2]=s,u[h+f]=y,u[h+f+1]=v,u[h+f+2]=a,h+=3,r&&(u[c++]=$,u[c++]=g,u[c++]=s,u[c++]=y,u[c++]=v,u[c++]=a)}return u}},k$P=new r$T,st$b=new a$11,mt$c=new a$11,ft$a=new a$11,ut$c=new a$11;function x$V(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).length,i=e.topRadius,n=e.bottomRadius,r=e$1Y(e.vertexFormat,n$12.DEFAULT),o=e$1Y(e.slices,128);if(!t$$(t))throw new t$_("options.length must be defined.");if(!t$$(i))throw new t$_("options.topRadius must be defined.");if(!t$$(n))throw new t$_("options.bottomRadius must be defined.");if(o<3)throw new t$_("options.slices must be greater than or equal to 3.");if(t$$(e.offsetAttribute)&&e.offsetAttribute===_0x165ce0.TOP)throw new t$_("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=t,this._topRadius=i,this._bottomRadius=n,this._vertexFormat=n$12.clone(r),this._slices=o,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderGeometry"}x$V.packedLength=n$12.packedLength+5,x$V.pack=function(e,t,i){if(!t$$(e))throw new t$_("value is required");if(!t$$(t))throw new t$_("array is required");return i=e$1Y(i,0),n$12.pack(e._vertexFormat,t,i),i+=n$12.packedLength,t[i++]=e._length,t[i++]=e._topRadius,t[i++]=e._bottomRadius,t[i++]=e._slices,t[i]=e$1Y(e._offsetAttribute,-1),t};var H$R=new n$12,E$U={vertexFormat:H$R,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0},P$L;x$V.unpack=function(e,t,i){if(!t$$(e))throw new t$_("array is required");t=e$1Y(t,0);var n=n$12.unpack(e,t,H$R);t+=n$12.packedLength;var r=e[t++],o=e[t++],a=e[t++],s=e[t++],l=e[t];return t$$(i)?(i._vertexFormat=n$12.clone(n,i._vertexFormat),i._length=r,i._topRadius=o,i._bottomRadius=a,i._slices=s,i._offsetAttribute=-1===l?void 0:l,i):(E$U.length=r,E$U.topRadius=o,E$U.bottomRadius=a,E$U.slices=s,E$U.offsetAttribute=-1===l?void 0:l,new x$V(E$U))},x$V.createGeometry=function(e){var t=e._length,i=e._topRadius,n=e._bottomRadius,r=e._vertexFormat,o=e._slices;if(!(t<=0||i<0||n<0||0===i&&0===n)){var a,s=o+o,l=o+s,u=s+s,c=x$W.computePositions(t,i,n,o,!0),h=r.st?new Float32Array(2*u):void 0,d=r.normal?new Float32Array(3*u):void 0,f=r.tangent?new Float32Array(3*u):void 0,p=r.bitangent?new Float32Array(3*u):void 0,_=r.normal||r.tangent||r.bitangent;if(_){var m=r.tangent||r.bitangent,$=0,g=0,y=0,v=Math.atan2(n-i,t),x=st$b;x.z=Math.sin(v);var b=Math.cos(v),S=ft$a,w=mt$c;for(a=0;a<o;a++){var C=a/o*n$1d.TWO_PI,T=b*Math.cos(C),P=b*Math.sin(C);_&&(x.x=T,x.y=P,m&&(S=a$11.normalize(a$11.cross(a$11.UNIT_Z,x,S),S)),r.normal&&(d[$++]=x.x,d[$++]=x.y,d[$++]=x.z,d[$++]=x.x,d[$++]=x.y,d[$++]=x.z),r.tangent&&(f[g++]=S.x,f[g++]=S.y,f[g++]=S.z,f[g++]=S.x,f[g++]=S.y,f[g++]=S.z),r.bitangent&&(w=a$11.normalize(a$11.cross(x,S,w),w),p[y++]=w.x,p[y++]=w.y,p[y++]=w.z,p[y++]=w.x,p[y++]=w.y,p[y++]=w.z))}for(a=0;a<o;a++)r.normal&&(d[$++]=0,d[$++]=0,d[$++]=-1),r.tangent&&(f[g++]=1,f[g++]=0,f[g++]=0),r.bitangent&&(p[y++]=0,p[y++]=-1,p[y++]=0);for(a=0;a<o;a++)r.normal&&(d[$++]=0,d[$++]=0,d[$++]=1),r.tangent&&(f[g++]=1,f[g++]=0,f[g++]=0),r.bitangent&&(p[y++]=0,p[y++]=1,p[y++]=0)}var E=12*o-12,A=fe$u.createTypedArray(u,E),L=0,M=0;for(a=0;a<o-1;a++)A[L++]=M,A[L++]=M+2,A[L++]=M+3,A[L++]=M,A[L++]=M+3,A[L++]=M+1,M+=2;for(A[L++]=s-2,A[L++]=0,A[L++]=1,A[L++]=s-2,A[L++]=1,A[L++]=s-1,a=1;a<o-1;a++)A[L++]=s+a+1,A[L++]=s+a,A[L++]=s;for(a=1;a<o-1;a++)A[L++]=l,A[L++]=l+a,A[L++]=l+a+1;var I=0;if(r.st){var O=Math.max(i,n);for(a=0;a<u;a++){var D=a$11.fromArray(c,3*a,ut$c);h[I++]=(D.x+O)/(2*O),h[I++]=(D.y+O)/(2*O)}}var R=new t$W;r.position&&(R.position=new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:c})),r.normal&&(R.normal=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:d})),r.tangent&&(R.tangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:f})),r.bitangent&&(R.bitangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:p})),r.st&&(R.st=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:2,values:h})),k$P.x=.5*t,k$P.y=Math.max(n,i);var N=new c$19(a$11.ZERO,r$T.magnitude(k$P));if(t$$(e._offsetAttribute)){t=c.length;var F=new Uint8Array(t/3);d$10(F,e._offsetAttribute===_0x165ce0.NONE?0:1),R.applyOffset=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:F})}return new T$11({attributes:R,indices:A,primitiveType:H$11.TRIANGLES,boundingSphere:N,offsetAttribute:e._offsetAttribute})}},x$V.getUnitCylinder=function(){return t$$(P$L)||(P$L=x$V.createGeometry(new x$V({topRadius:1,bottomRadius:1,length:1,vertexFormat:n$12.POSITION_ONLY}))),P$L};var v$T=new r$T;function d$T(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).length,i=e.topRadius,n=e.bottomRadius,r=e$1Y(e.slices,128),o=Math.max(e$1Y(e.numberOfVerticalLines,16),0);if(n$1e.typeOf.number("options.positions",t),n$1e.typeOf.number("options.topRadius",i),n$1e.typeOf.number("options.bottomRadius",n),n$1e.typeOf.number.greaterThanOrEquals("options.slices",r,3),t$$(e.offsetAttribute)&&e.offsetAttribute===_0x165ce0.TOP)throw new t$_("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=t,this._topRadius=i,this._bottomRadius=n,this._slices=r,this._numberOfVerticalLines=o,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}d$T.packedLength=6,d$T.pack=function(e,t,i){return n$1e.typeOf.object("value",e),n$1e.defined("array",t),i=e$1Y(i,0),t[i++]=e._length,t[i++]=e._topRadius,t[i++]=e._bottomRadius,t[i++]=e._slices,t[i++]=e._numberOfVerticalLines,t[i]=e$1Y(e._offsetAttribute,-1),t};var b$19={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};d$T.unpack=function(e,t,i){n$1e.defined("array",e),t=e$1Y(t,0);var n=e[t++],r=e[t++],o=e[t++],a=e[t++],s=e[t++],l=e[t];return t$$(i)?(i._length=n,i._topRadius=r,i._bottomRadius=o,i._slices=a,i._numberOfVerticalLines=s,i._offsetAttribute=-1===l?void 0:l,i):(b$19.length=n,b$19.topRadius=r,b$19.bottomRadius=o,b$19.slices=a,b$19.numberOfVerticalLines=s,b$19.offsetAttribute=-1===l?void 0:l,new d$T(b$19))},d$T.createGeometry=function(e){var t=e._length,i=e._topRadius,n=e._bottomRadius,r=e._slices,o=e._numberOfVerticalLines;if(!(t<=0||i<0||n<0||0===i&&0===n)){var a,s=2*r,l=x$W.computePositions(t,i,n,r,!1),u=2*r;if(o>0){var c=Math.min(o,r);a=Math.round(r/c),u+=c}var h,d=fe$u.createTypedArray(s,2*u),f=0;for(h=0;h<r-1;h++)d[f++]=h,d[f++]=h+1,d[f++]=h+r,d[f++]=h+1+r;if(d[f++]=r-1,d[f++]=0,d[f++]=r+r-1,d[f++]=r,o>0)for(h=0;h<r;h+=a)d[f++]=h,d[f++]=h+r;var p=new t$W;p.position=new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:l}),v$T.x=.5*t,v$T.y=Math.max(n,i);var _=new c$19(a$11.ZERO,r$T.magnitude(v$T));if(t$$(e._offsetAttribute)){t=l.length;var m=new Uint8Array(t/3);d$10(m,e._offsetAttribute===_0x165ce0.NONE?0:1),p.applyOffset=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}return new T$11({attributes:p,indices:d,primitiveType:H$11.LINES,boundingSphere:_,offsetAttribute:e._offsetAttribute})}};var w$X=1953029805,y$S=2917034100;function h$X(e,t){if(h$X.passThroughDataForTesting)return t;n$1e.typeOf.object("key",e),n$1e.typeOf.object("data",t);var i=e.byteLength;if(0===i||i%4!=0)throw new t$Z("The length of key must be greater than 0 and a multiple of 4.");var n=new DataView(t),r=n.getUint32(0,!0);if(r===w$X||r===y$S)return t;for(var o,a=new DataView(e),s=0,l=t.byteLength,u=l-l%8,c=i,h=8;s<u;)for(o=h=(h+8)%24;s<u&&o<c;)n.setUint32(s,n.getUint32(s,!0)^a.getUint32(o,!0),!0),n.setUint32(s+4,n.getUint32(s+4,!0)^a.getUint32(o+4,!0),!0),s+=8,o+=24;if(s<l)for(o>=c&&(o=h=(h+8)%24);s<l;)n.setUint8(s,n.getUint8(s)^a.getUint8(o)),s++,o++}function o$S(e){this.proxy=e}function n$Z(e,t){if(e=e$1Y(e,0),(t=e$1Y(t,Number.MAX_VALUE))<=e)throw new t$_("far distance must be greater than near distance.");this.value=new Float32Array([e,t])}function s$15(){this.head=void 0,this.tail=void 0,this._length=0}function n$Y(e,t,i){this.item=e,this.previous=t,this.next=i}function h$W(e,t){t$$(t.previous)&&t$$(t.next)?(t.previous.next=t.next,t.next.previous=t.previous):t$$(t.previous)?(t.previous.next=void 0,e.tail=t.previous):t$$(t.next)?(t.next.previous=void 0,e.head=t.next):(e.head=void 0,e.tail=void 0),t.next=void 0,t.previous=void 0}h$X.passThroughDataForTesting=!1,o$S.prototype.getURL=function(e){var t=-1===this.proxy.indexOf("?")?"?":"";return this.proxy+t+encodeURIComponent(e)},Object.defineProperties(n$Z.prototype,{componentDatatype:{get:function(){return C$12.FLOAT}},componentsPerAttribute:{get:function(){return 2}},normalize:{get:function(){return!1}}}),n$Z.fromDistanceDisplayCondition=function(e){if(!t$$(e))throw new t$_("distanceDisplayCondition is required.");if(e.far<=e.near)throw new t$_("distanceDisplayCondition.far distance must be greater than distanceDisplayCondition.near distance.");return new n$Z(e.near,e.far)},n$Z.toValue=function(e,t){if(!t$$(e))throw new t$_("distanceDisplayCondition is required.");return t$$(t)?(t[0]=e.near,t[1]=e.far,t):new Float32Array([e.near,e.far])},Object.defineProperties(s$15.prototype,{length:{get:function(){return this._length}}}),s$15.prototype.add=function(e){var t=new n$Y(e,this.tail,void 0);return t$$(this.tail)?(this.tail.next=t,this.tail=t):(this.head=t,this.tail=t),++this._length,t},s$15.prototype.addToHead=function(e){var t=new n$Y(e,void 0,this.head);return t$$(this.head)?(this.head.previous=t,this.head=t):(this.head=t,this.tail=t),++this._length,t},s$15.prototype.remove=function(e){!t$$(e)||(h$W(this,e),--this._length)},s$15.prototype.splice=function(e,t){if(e!==t&&t$$(e)){h$W(this,t);var i=e.next;e.next=t,this.tail===e?this.tail=t:t$$(i)&&(i.previous=t),t.next=i,t.previous=e}},s$15.prototype.moveNodeBefore=function(e,t){if(e!==t){h$W(this,t);var i=e.previous;e.previous=t,this.head===e?this.head=t:i.next=t,t.next=e,t.previous=i}};var _0x4a36f0=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x245a31=_0x4a36f0(void 0,(function(){return _0x245a31.toString().search("(((.+)+)+)+$").toString().constructor(_0x245a31).search("(((.+)+)+)+$")}));_0x245a31();var _0x20e18f={LUMINANCE_8:1,LUMINANCE_16:2,ALPHA:3,ALPHA_4_LUMINANCE_4:4,LUMINANCE_ALPHA:5,RGB_565:6,BGR565:7,RGB:10,BGR:11,ARGB:12,ABGR:13,BGRA:14,WEBP:25,RGBA:28,DXT1:17,DXT2:18,DXT3:19,DXT4:20,DXT5:21,CRN_DXT5:26,STANDARD_CRN:27,KTX2:31},_0x5ce781=Object.freeze(_0x20e18f),G$O=1,P$K=2,H$Q=4,R$M=32;function _$U(e,t,i,n){var r=e|t<<8,o=r>>11&31,a=r>>5&63,s=31&r;return i[n+0]=o<<3|o>>2,i[n+1]=a<<2|a>>4,i[n+2]=s<<3|s>>2,i[n+3]=255,r}function g$I(e,t,i,n){for(var r=new Uint8Array(16),o=_$U(t[i+0],t[i+1],r,0),a=_$U(t[i+2],t[i+3],r,4),s=0;s<3;s++){var l=r[s],u=r[4+s];n&&o<=a?(r[8+s]=(l+u)/2,r[12+s]=0):(r[8+s]=(2*l+u)/3,r[12+s]=(l+2*u)/3)}r[11]=255,r[15]=n&&o<=a?0:255;var c=new Uint8Array(16);for(s=0;s<4;++s){var h=t[i+4+s];c[4*s+0]=3&h,c[4*s+1]=h>>2&3,c[4*s+2]=h>>4&3,c[4*s+3]=h>>6&3}for(s=0;s<16;++s)for(var d=4*c[s],f=0;f<4;++f)e[4*s+f]=r[d+f]}function j$U(e,t,i){for(var n=0;n<8;++n){var r=bytes[i+n],o=15&r,a=240&r;e[8*n+3]=o|o<<4,e[8*n+7]=a|a>>4}}function k$O(e,t,i){var n=t[i+0],r=t[i+1],o=new Uint8Array(8);if(o[0]=n,o[1]=r,n<=r){for(var a=1;a<5;++a)o[1+a]=((5-a)*n+a*r)/5;o[6]=0,o[7]=255}else for(a=1;a<7;++a)o[1+a]=((7-a)*n+a*r)/7;var s=new Uint8Array(16),l=(i=i+2,0);for(a=0;a<2;++a){for(var u=0,c=0;c<3;++c){u|=t[i++]<<8*c}for(c=0;c<8;++c){var h=u>>3*c&7;s[l++]=h}}for(a=0;a<16;++a)e[4*a+3]=o[s[a]]}function q$12(e,t,i,n){var r=0;0!=(n&(P$K|H$Q))&&(r=8),g$I(e,t,i+r,0!=(n&G$O)),0!=(n&P$K)?j$U(e,t,i):0!=(n&H$Q)&&k$O(e,t,i)}function x$U(e,t,i,n){for(var r=new Uint16Array(4),o=e,a=0,s=0,l=0,u=0,c=0,h=0,d=0,f=0,p=0,_=t/4,m=i/4,$=0;$<m;$++)for(var g=0;g<_;g++)l=4*((m-$)*_+g),r[0]=n[l],r[1]=n[l+1],u=31&r[0],c=2016&r[0],h=63488&r[0],d=31&r[1],f=2016&r[1],p=63488&r[1],r[2]=5*u+3*d>>3|5*c+3*f>>3&2016|5*h+3*p>>3&63488,r[3]=5*d+3*u>>3|5*f+3*c>>3&2016|5*p+3*h>>3&63488,a=n[l+2],o[s=4*$*t+4*g]=r[3&a],o[s+1]=r[a>>2&3],o[s+2]=r[a>>4&3],o[s+3]=r[a>>6&3],o[s+=t]=r[a>>8&3],o[s+1]=r[a>>10&3],o[s+2]=r[a>>12&3],o[s+3]=r[a>>14],a=n[l+3],o[s+=t]=r[3&a],o[s+1]=r[a>>2&3],o[s+2]=r[a>>4&3],o[s+3]=r[a>>6&3],o[s+=t]=r[a>>8&3],o[s+1]=r[a>>10&3],o[s+2]=r[a>>12&3],o[s+3]=r[a>>14];return o} /*! @brief Decompresses an image in memory. @param rgba Storage for the decompressed pixels. @param width The width of the source image. @param height The height of the source image. @param blocks The compressed DXT blocks. @param flags Compression flags. The decompressed pixels will be written as a contiguous array of width*height 16 rgba values, with each component as 1 byte each. In memory this is: { r1, g1, b1, a1, .... , rn, gn, bn, an } for n = width*height The flags parameter should specify either kDxt1, kDxt3 or kDxt5 compression, however, DXT1 will be used by default if none is specified. All other flags are ignored. Internally this function calls squish::Decompress for each block. */function z$H(e,t,i,n,r){for(var o=0!=(r&G$O)?8:16,a=0,s=0;s<i;s+=4)for(var l=0;l<t;l+=4){var u=new Uint8Array(64);q$12(u,n,a,r);for(var c=0,h=0;h<4;++h)for(var d=0;d<4;++d){var f=l+d,p=s+h;if(f<t&&p<i)for(var _=4*(t*(i-p)+f),m=0;m<4;++m)e[_++]=u[c++];else c+=4}a+=o}}function d$S(e){}d$S.decode=function(e,t,i,n,r){if(null!=e&&null!=n&&0!=i&&0!=t){var o=0;(o=r>_0x5ce781.BGR||r===_0x5ce781.LUMINANCE_ALPHA?H$Q:G$O|R$M)&G$O&&o&R$M?x$U(e,t,i,n):z$H(e,t,i,n,o)}}, /** @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. */ void 0===Date.now&&(Date.now=function(){return(new Date).valueOf()});var f$W=f$W||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:typeof window<"u"&&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}}}();f$W.Tween=function(e){var t=e,i={},n={},r={},o=1e3,a=0,s=!1,l=!1,u=0,c=null,h=f$W.Easing.Linear.None,d=f$W.Interpolation.Linear,f=[],p=null,_=!1,m=null,$=null,g=null,y=0,v=0;for(var x in e)i[x]=parseFloat(e[x],10);this.to=function(e,t){return void 0!==t&&(o=t),n=e,this},this.start=function(e){for(var o in f$W.add(this),l=!0,_=!1,c=void 0!==e?e:typeof window<"u"&&void 0!==window.performance&&void 0!==window.performance.now?window.performance.now():Date.now(),c+=u,n){if(n[o]instanceof Array){if(0===n[o].length)continue;n[o]=[t[o]].concat(n[o])}i[o]=t[o],i[o]instanceof Array||(i[o]*=1),r[o]=i[o]||0}return this},this.stop=function(){return l?(f$W.remove(this),l=!1,null!==g&&g.call(t),this.stopChainedTweens(),this):this},this.pause=function(){return l?(l=!1,y=typeof window<"u"&&void 0!==window.performance&&void 0!==window.performance.now?window.performance.now():Date.now(),this):this},this.endPause=function(){return l||(l=!0,y=(typeof window<"u"&&void 0!==window.performance&&void 0!==window.performance.now?window.performance.now():Date.now())-y,v+=y),this},this.stopChainedTweens=function(){for(var e=0,t=f.length;e<t;e++)f[e].stop()},this.delay=function(e){return u=e,this},this.repeat=function(e){return a=e,this},this.yoyo=function(e){return s=e,this},this.easing=function(e){return h=e,this},this.interpolation=function(e){return d=e,this},this.chain=function(){return f=arguments,this},this.onStart=function(e){return p=e,this},this.onUpdate=function(e){return m=e,this},this.onComplete=function(e){return $=e,this},this.onStop=function(e){return g=e,this},this.update=function(e){var g;if(e<c||!l)return!0;!1===_&&(null!==p&&p.call(t),_=!0);var y=(e-c-v)/o,x=h(y=y>1?1:y);for(g in n){var b=i[g]||0,S=n[g];S instanceof Array?t[g]=d(S,x):("string"==typeof S&&(S=b+parseFloat(S,10)),"number"==typeof S&&(t[g]=b+(S-b)*x))}if(null!==m&&m.call(t,x),1==y){if(v=0,a>0){for(g in isFinite(a)&&a--,r){if("string"==typeof n[g]&&(r[g]=r[g]+parseFloat(n[g],10)),s){var w=r[g];r[g]=n[g],n[g]=w}i[g]=r[g]}return c=e+u,!0}null!==$&&$.call(t);for(var C=0,T=f.length;C<T;C++)f[C].start(e);return!1}return!0}},f$W.Easing={Linear:{None:function(e){return e}},Quadratic:{In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}},Cubic:{In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Quartic:{In:function(e){return e*e*e*e},Out:function(e){return 1-e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}},Quintic:{In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.cos(Math.PI*e))}},Exponential:{In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}},Circular:{In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}},Elastic:{In:function(e){var t,i=.1;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=.1):t=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))},Out:function(e){var t,i=.1;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=.1):t=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},InOut:function(e){var t,i=.1,n=.4;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=.1):t=n*Math.asin(1/i)/(2*Math.PI),(e*=2)<1?i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)}},Back:{In:function(e){var t=1.70158;return e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}},Bounce:{In:function(e){return 1-f$W.Easing.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*f$W.Easing.Bounce.In(2*e):.5*f$W.Easing.Bounce.Out(2*e-1)+.5}}},f$W.Interpolation={Linear:function(e,t){var i=e.length-1,n=i*t,r=Math.floor(n),o=f$W.Interpolation.Utils.Linear;return t<0?o(e[0],e[1],n):t>1?o(e[i],e[i-1],i-n):o(e[r],e[r+1>i?i:r+1],n-r)},Bezier:function(e,t){var i,n=0,r=e.length-1,o=Math.pow,a=f$W.Interpolation.Utils.Bernstein;for(i=0;i<=r;i++)n+=o(1-t,r-i)*o(t,i)*e[i]*a(r,i);return n},CatmullRom:function(e,t){var i=e.length-1,n=i*t,r=Math.floor(n),o=f$W.Interpolation.Utils.CatmullRom;return e[0]===e[i]?(t<0&&(r=Math.floor(n=i*(1+t))),o(e[(r-1+i)%i],e[r],e[(r+1)%i],e[(r+2)%i],n-r)):t<0?e[0]-(o(e[0],e[0],e[1],e[1],-n)-e[0]):t>1?e[i]-(o(e[i],e[i],e[i-1],e[i-1],n-i)-e[i]):o(e[r?r-1:0],e[r],e[i<r+1?i:r+1],e[i<r+2?i:r+2],n-r)},Utils:{Linear:function(e,t,i){return(t-e)*i+e},Bernstein:function(e,t){var i=f$W.Interpolation.Utils.Factorial;return i(e)/i(t)/i(e-t)},Factorial:function(){var e=[1];return function(t){var i,n=1;if(e[t])return e[t];for(i=t;i>1;i--)n*=i;return e[t]=n}}(),CatmullRom:function(e,t,i,n,r){var o=.5*(i-e),a=.5*(n-t),s=r*r;return(2*t-2*i+o+a)*(r*s)+(-3*t+3*i-2*o-a)*s+o*r+t}}};var n$X={LINEAR_NONE:f$W.Easing.Linear.None,QUADRACTIC_IN:f$W.Easing.Quadratic.In,QUADRACTIC_OUT:f$W.Easing.Quadratic.Out,QUADRACTIC_IN_OUT:f$W.Easing.Quadratic.InOut,CUBIC_IN:f$W.Easing.Cubic.In,CUBIC_OUT:f$W.Easing.Cubic.Out,CUBIC_IN_OUT:f$W.Easing.Cubic.InOut,QUARTIC_IN:f$W.Easing.Quartic.In,QUARTIC_OUT:f$W.Easing.Quartic.Out,QUARTIC_IN_OUT:f$W.Easing.Quartic.InOut,QUINTIC_IN:f$W.Easing.Quintic.In,QUINTIC_OUT:f$W.Easing.Quintic.Out,QUINTIC_IN_OUT:f$W.Easing.Quintic.InOut,SINUSOIDAL_IN:f$W.Easing.Sinusoidal.In,SINUSOIDAL_OUT:f$W.Easing.Sinusoidal.Out,SINUSOIDAL_IN_OUT:f$W.Easing.Sinusoidal.InOut,EXPONENTIAL_IN:f$W.Easing.Exponential.In,EXPONENTIAL_OUT:f$W.Easing.Exponential.Out,EXPONENTIAL_IN_OUT:f$W.Easing.Exponential.InOut,CIRCULAR_IN:f$W.Easing.Circular.In,CIRCULAR_OUT:f$W.Easing.Circular.Out,CIRCULAR_IN_OUT:f$W.Easing.Circular.InOut,ELASTIC_IN:f$W.Easing.Elastic.In,ELASTIC_OUT:f$W.Easing.Elastic.Out,ELASTIC_IN_OUT:f$W.Easing.Elastic.InOut,BACK_IN:f$W.Easing.Back.In,BACK_OUT:f$W.Easing.Back.Out,BACK_IN_OUT:f$W.Easing.Back.InOut,BOUNCE_IN:f$W.Easing.Bounce.In,BOUNCE_OUT:f$W.Easing.Bounce.Out,BOUNCE_IN_OUT:f$W.Easing.Bounce.InOut},_$T=Object.freeze(n$X),zi$3=new a$11,Mi$3=new a$11,Di$5=new a$11,Ei$3=new a$11,Gi$4=new a$11(1,1,1),wi$4=Math.cos,di$5=Math.sin;function b$18(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT);var t=e$1Y(e.radii,Gi$4),i=e$1Y(e.innerRadii,t),n=e$1Y(e.minimumClock,0),r=e$1Y(e.maximumClock,n$1d.TWO_PI),o=e$1Y(e.minimumCone,0),a=e$1Y(e.maximumCone,n$1d.PI),s=Math.round(e$1Y(e.stackPartitions,64)),l=Math.round(e$1Y(e.slicePartitions,64)),u=e$1Y(e.vertexFormat,n$12.DEFAULT);if(l<3)throw new t$_("options.slicePartitions cannot be less than three.");if(s<3)throw new t$_("options.stackPartitions cannot be less than three.");this._radii=a$11.clone(t),this._innerRadii=a$11.clone(i),this._minimumClock=n,this._maximumClock=r,this._minimumCone=o,this._maximumCone=a,this._stackPartitions=s,this._slicePartitions=l,this._vertexFormat=n$12.clone(u),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidGeometry"}b$18.packedLength=2*a$11.packedLength+n$12.packedLength+7,b$18.pack=function(e,t,i){if(!t$$(e))throw new t$_("value is required");if(!t$$(t))throw new t$_("array is required");return i=e$1Y(i,0),a$11.pack(e._radii,t,i),i+=a$11.packedLength,a$11.pack(e._innerRadii,t,i),i+=a$11.packedLength,n$12.pack(e._vertexFormat,t,i),i+=n$12.packedLength,t[i++]=e._minimumClock,t[i++]=e._maximumClock,t[i++]=e._minimumCone,t[i++]=e._maximumCone,t[i++]=e._stackPartitions,t[i++]=e._slicePartitions,t[i]=e$1Y(e._offsetAttribute,-1),t};var hi$5=new a$11,yi$4=new a$11,Ai$4=new n$12,T$Q={radii:hi$5,innerRadii:yi$4,vertexFormat:Ai$4,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0},ni$4;b$18.unpack=function(e,t,i){if(!t$$(e))throw new t$_("array is required");t=e$1Y(t,0);var n=a$11.unpack(e,t,hi$5);t+=a$11.packedLength;var r=a$11.unpack(e,t,yi$4);t+=a$11.packedLength;var o=n$12.unpack(e,t,Ai$4);t+=n$12.packedLength;var a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return t$$(i)?(i._radii=a$11.clone(n,i._radii),i._innerRadii=a$11.clone(r,i._innerRadii),i._vertexFormat=n$12.clone(o,i._vertexFormat),i._minimumClock=a,i._maximumClock=s,i._minimumCone=l,i._maximumCone=u,i._stackPartitions=c,i._slicePartitions=h,i._offsetAttribute=-1===d?void 0:d,i):(T$Q.minimumClock=a,T$Q.maximumClock=s,T$Q.minimumCone=l,T$Q.maximumCone=u,T$Q.stackPartitions=c,T$Q.slicePartitions=h,T$Q.offsetAttribute=-1===d?void 0:d,new b$18(T$Q))},b$18.createGeometry=function(e){var t=e._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var i=e._innerRadii;if(!(i.x<=0||i.y<=0||i.z<=0)){var n=e._minimumClock,r=e._maximumClock,o=e._minimumCone,a=e._maximumCone,s=e._vertexFormat,l=e._slicePartitions+1,u=e._stackPartitions+1;(l=Math.round(l*Math.abs(r-n)/n$1d.TWO_PI))<2&&(l=2),(u=Math.round(u*Math.abs(a-o)/n$1d.PI))<2&&(u=2);var c,h,d=0,f=[o],p=[n];for(c=0;c<u;c++)f.push(o+c*(a-o)/(u-1));for(f.push(a),h=0;h<l;h++)p.push(n+h*(r-n)/(l-1));p.push(r);var _=f.length,m=p.length,$=0,g=1,y=i.x!==t.x||i.y!==t.y||i.z!==t.z,v=!1,x=!1,b=!1;y&&(g=2,o>0&&(v=!0,$+=l-1),a<Math.PI&&(x=!0,$+=l-1),(r-n)%n$1d.TWO_PI?(b=!0,$+=2*(u-1)+1):$+=1);var S=m*_*g,w=new Float64Array(3*S),C=d$10(new Array(S),!1),T=d$10(new Array(S),!1),P=l*u*g,E=6*(P+$+1-(l+u)*g),A=fe$u.createTypedArray(P,E),L=s.normal?new Float32Array(3*S):void 0,M=s.tangent?new Float32Array(3*S):void 0,I=s.bitangent?new Float32Array(3*S):void 0,O=s.st?new Float32Array(2*S):void 0,D=new Array(_),R=new Array(_);for(c=0;c<_;c++)D[c]=di$5(f[c]),R[c]=wi$4(f[c]);var N=new Array(m),F=new Array(m);for(h=0;h<m;h++)F[h]=wi$4(p[h]),N[h]=di$5(p[h]);for(c=0;c<_;c++)for(h=0;h<m;h++)w[d++]=t.x*D[c]*F[h],w[d++]=t.y*D[c]*N[h],w[d++]=t.z*R[c];var B,z,G,k,U=S/2;if(y)for(c=0;c<_;c++)for(h=0;h<m;h++)w[d++]=i.x*D[c]*F[h],w[d++]=i.y*D[c]*N[h],w[d++]=i.z*R[c],C[U]=!0,c>0&&c!==_-1&&0!==h&&h!==m-1&&(T[U]=!0),U++;for(d=0,c=1;c<_-2;c++)for(B=c*m,z=(c+1)*m,h=1;h<m-2;h++)A[d++]=z+h,A[d++]=z+h+1,A[d++]=B+h+1,A[d++]=z+h,A[d++]=B+h+1,A[d++]=B+h;if(y){var V=_*m;for(c=1;c<_-2;c++)for(B=V+c*m,z=V+(c+1)*m,h=1;h<m-2;h++)A[d++]=z+h,A[d++]=B+h,A[d++]=B+h+1,A[d++]=z+h,A[d++]=B+h+1,A[d++]=z+h+1}if(y){if(v)for(k=_*m,c=1;c<m-2;c++)A[d++]=c,A[d++]=c+1,A[d++]=k+c+1,A[d++]=c,A[d++]=k+c+1,A[d++]=k+c;if(x)for(G=_*m-m,k=_*m*g-m,c=1;c<m-2;c++)A[d++]=G+c+1,A[d++]=G+c,A[d++]=k+c,A[d++]=G+c+1,A[d++]=k+c,A[d++]=k+c+1}if(b){for(c=1;c<_-2;c++)k=m*_+m*c,G=m*c,A[d++]=k,A[d++]=G+m,A[d++]=G,A[d++]=k,A[d++]=k+m,A[d++]=G+m;for(c=1;c<_-2;c++)k=m*_+m*(c+1)-1,G=m*(c+1)-1,A[d++]=G+m,A[d++]=k,A[d++]=G,A[d++]=G+m,A[d++]=k+m,A[d++]=k}var W=new t$W;s.position&&(W.position=new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:w}));var H,Y=0,j=0,q=0,X=0,K=S/2,Z=n$1c.fromCartesian3(t),J=n$1c.fromCartesian3(i);if(s.st||s.normal||s.tangent||s.bitangent){for(c=0;c<S;c++){H=C[c]?J:Z;var Q=a$11.fromArray(w,3*c,zi$3),ee=H.geodeticSurfaceNormal(Q,Mi$3);if(s.st){var te=Math.atan2(ee.y,ee.x);te<0&&(te+=n$1d.TWO_PI),O[Y++]=te/n$1d.TWO_PI,O[Y++]=Math.asin(ee.z)/Math.PI+.5}if(s.normal&&(T[c]&&a$11.negate(ee,ee),L[j++]=ee.x,L[j++]=ee.y,L[j++]=ee.z),s.tangent||s.bitangent){var ie,ne=Di$5,re=0;if(C[c]&&(re=K),ie=!v&&c>=re&&c<re+2*m?a$11.UNIT_X:a$11.UNIT_Z,a$11.cross(ie,ee,ne),a$11.normalize(ne,ne),s.tangent&&(M[q++]=ne.x,M[q++]=ne.y,M[q++]=ne.z),s.bitangent){var oe=a$11.cross(ee,ne,Ei$3);a$11.normalize(oe,oe),I[X++]=oe.x,I[X++]=oe.y,I[X++]=oe.z}}}s.st&&(W.st=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:2,values:O})),s.normal&&(W.normal=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:L})),s.tangent&&(W.tangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:M})),s.bitangent&&(W.bitangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:I}))}if(t$$(e._offsetAttribute)){var ae=w.length,se=new Uint8Array(ae/3);d$10(se,e._offsetAttribute===_0x165ce0.NONE?0:1),W.applyOffset=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:se})}return new T$11({attributes:W,indices:A,primitiveType:H$11.TRIANGLES,boundingSphere:c$19.fromEllipsoid(Z),offsetAttribute:e._offsetAttribute})}}},b$18.getUnitEllipsoid=function(){return t$$(ni$4)||(ni$4=b$18.createGeometry(new b$18({radii:new a$11(1,1,1),vertexFormat:n$12.POSITION_ONLY}))),ni$4};var ei$5=new a$11(1,1,1),G$N=Math.cos,B$G=Math.sin;function I$Z(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT);var t=e$1Y(e.radii,ei$5),i=e$1Y(e.innerRadii,t),n=e$1Y(e.minimumClock,0),r=e$1Y(e.maximumClock,n$1d.TWO_PI),o=e$1Y(e.minimumCone,0),a=e$1Y(e.maximumCone,n$1d.PI),s=Math.round(e$1Y(e.stackPartitions,10)),l=Math.round(e$1Y(e.slicePartitions,8)),u=Math.round(e$1Y(e.subdivisions,128));if(s<1)throw new t$_("options.stackPartitions cannot be less than 1");if(l<0)throw new t$_("options.slicePartitions cannot be less than 0");if(u<0)throw new t$_("options.subdivisions must be greater than or equal to zero.");if(t$$(e.offsetAttribute)&&e.offsetAttribute===_0x165ce0.TOP)throw new t$_("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._radii=a$11.clone(t),this._innerRadii=a$11.clone(i),this._minimumClock=n,this._maximumClock=r,this._minimumCone=o,this._maximumCone=a,this._stackPartitions=s,this._slicePartitions=l,this._subdivisions=u,this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}I$Z.packedLength=2*a$11.packedLength+8,I$Z.pack=function(e,t,i){if(!t$$(e))throw new t$_("value is required");if(!t$$(t))throw new t$_("array is required");return i=e$1Y(i,0),a$11.pack(e._radii,t,i),i+=a$11.packedLength,a$11.pack(e._innerRadii,t,i),i+=a$11.packedLength,t[i++]=e._minimumClock,t[i++]=e._maximumClock,t[i++]=e._minimumCone,t[i++]=e._maximumCone,t[i++]=e._stackPartitions,t[i++]=e._slicePartitions,t[i++]=e._subdivisions,t[i]=e$1Y(e._offsetAttribute,-1),t};var Q$R=new a$11,S$F=new a$11,k$N={radii:Q$R,innerRadii:S$F,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};function t$P(e){e=e$1Y(e,{}),this._tilingScheme=e.tilingScheme,t$$(this._tilingScheme)||(this._tilingScheme=new a$W({ellipsoid:e$1Y(e.ellipsoid,n$1c.WGS84)})),this._levelZeroMaximumGeometricError=d$11.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,64,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new o$15,this._isCreateSkirt=e.isCreateSkirt,this._isSkirtDirty=!1,this._readyPromise=c$18.resolve(!0)}function n$W(){this._removalFunctions=[]}I$Z.unpack=function(e,t,i){if(!t$$(e))throw new t$_("array is required");t=e$1Y(t,0);var n=a$11.unpack(e,t,Q$R);t+=a$11.packedLength;var r=a$11.unpack(e,t,S$F);t+=a$11.packedLength;var o=e[t++],a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return t$$(i)?(i._radii=a$11.clone(n,i._radii),i._innerRadii=a$11.clone(r,i._innerRadii),i._minimumClock=o,i._maximumClock=a,i._minimumCone=s,i._maximumCone=l,i._stackPartitions=u,i._slicePartitions=c,i._subdivisions=h,i._offsetAttribute=-1===d?void 0:d,i):(k$N.minimumClock=o,k$N.maximumClock=a,k$N.minimumCone=s,k$N.maximumCone=l,k$N.stackPartitions=u,k$N.slicePartitions=c,k$N.subdivisions=h,k$N.offsetAttribute=-1===d?void 0:d,new I$Z(k$N))},I$Z.createGeometry=function(e){var t=e._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var i=e._innerRadii;if(!(i.x<=0||i.y<=0||i.z<=0)){var n=e._minimumClock,r=e._maximumClock,o=e._minimumCone,a=e._maximumCone,s=e._subdivisions,l=n$1c.fromCartesian3(t),u=e._slicePartitions+1,c=e._stackPartitions+1;(u=Math.round(u*Math.abs(r-n)/n$1d.TWO_PI))<2&&(u=2),(c=Math.round(c*Math.abs(a-o)/n$1d.PI))<2&&(c=2);var h=0,d=1,f=i.x!==t.x||i.y!==t.y||i.z!==t.z,p=!1,_=!1;f&&(d=2,o>0&&(p=!0,h+=u),a<Math.PI&&(_=!0,h+=u));var m,$,g,y,v=s*d*(c+u),x=new Float64Array(3*v),b=2*(v+h-(u+c)*d),S=fe$u.createTypedArray(v,b),w=0,C=new Array(c),T=new Array(c);for(m=0;m<c;m++)y=o+m*(a-o)/(c-1),C[m]=B$G(y),T[m]=G$N(y);var P=new Array(s),E=new Array(s);for(m=0;m<s;m++)g=n+m*(r-n)/(s-1),P[m]=B$G(g),E[m]=G$N(g);for(m=0;m<c;m++)for($=0;$<s;$++)x[w++]=t.x*C[m]*E[$],x[w++]=t.y*C[m]*P[$],x[w++]=t.z*T[m];if(f)for(m=0;m<c;m++)for($=0;$<s;$++)x[w++]=i.x*C[m]*E[$],x[w++]=i.y*C[m]*P[$],x[w++]=i.z*T[m];for(C.length=s,T.length=s,m=0;m<s;m++)y=o+m*(a-o)/(s-1),C[m]=B$G(y),T[m]=G$N(y);for(P.length=u,E.length=u,m=0;m<u;m++)g=n+m*(r-n)/(u-1),P[m]=B$G(g),E[m]=G$N(g);for(m=0;m<s;m++)for($=0;$<u;$++)x[w++]=t.x*C[m]*E[$],x[w++]=t.y*C[m]*P[$],x[w++]=t.z*T[m];if(f)for(m=0;m<s;m++)for($=0;$<u;$++)x[w++]=i.x*C[m]*E[$],x[w++]=i.y*C[m]*P[$],x[w++]=i.z*T[m];for(w=0,m=0;m<c*d;m++){var A=m*s;for($=0;$<s-1;$++)S[w++]=A+$,S[w++]=A+$+1}var L=c*s*d;for(m=0;m<u;m++)for($=0;$<s-1;$++)S[w++]=L+m+$*u,S[w++]=L+m+($+1)*u;if(f)for(L=c*s*d+u*s,m=0;m<u;m++)for($=0;$<s-1;$++)S[w++]=L+m+$*u,S[w++]=L+m+($+1)*u;if(f){var M=c*s*d,I=M+s*u;if(p)for(m=0;m<u;m++)S[w++]=M+m,S[w++]=I+m;if(_)for(M+=s*u-u,I+=s*u-u,m=0;m<u;m++)S[w++]=M+m,S[w++]=I+m}var O=new t$W({position:new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:x})});if(t$$(e._offsetAttribute)){var D=x.length,R=new Uint8Array(D/3);d$10(R,e._offsetAttribute===_0x165ce0.NONE?0:1),O.applyOffset=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:R})}return new T$11({attributes:O,indices:S,primitiveType:H$11.LINES,boundingSphere:c$19.fromEllipsoid(l),offsetAttribute:e._offsetAttribute})}}},Object.defineProperties(t$P.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},isCreateSkirt:{get:function(){return this._isCreateSkirt},set:function(e){e!==this._isCreateSkirt&&(this._isSkirtDirty=!0),this._isCreateSkirt=e}}}),t$P.prototype.requestTileGeometry=function(e,t,i,n){return c$18.resolve(new M$1a({buffer:new Uint8Array(256),width:16,height:16,skirtMode:this._isCreateSkirt}))},t$P.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},t$P.prototype.getTileDataAvailable=function(e,t,i){},t$P.prototype.loadTileDataAvailability=function(e,t,i){},n$W.prototype.add=function(e,t,i){if(!t$$(e))throw new t$_("event is required");var n=e.addEventListener(t,i);this._removalFunctions.push(n);var r=this;return function(){n();var e=r._removalFunctions;e.splice(e.indexOf(n),1)}},n$W.prototype.removeAll=function(){for(var e=this._removalFunctions,t=0,i=e.length;t<i;++t)e[t]();e.length=0};var e$1j={NONE:0,HOLD:1,EXTRAPOLATE:2},_0x2f1e09=Object.freeze(e$1j);function u$U(){this._bounds=new a$10,this._command=void 0,this._geometry=void 0,this.heightBuffer=void 0,this.colorBuffer=void 0}function l$V(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=e$1Y(e.near,1),this._near=this.near,this.far=e$1Y(e.far,5e8),this._far=this.far,this._cullingVolume=new i$_,this._perspectiveMatrix=new c$1a,this._infinitePerspective=new c$1a}function x$T(e){if(!(t$$(e.right)&&t$$(e.left)&&t$$(e.top)&&t$$(e.bottom)&&t$$(e.near)&&t$$(e.far)))throw new t$_("right, left, top, bottom, near, or far parameters are not set.");var t=e.top,i=e.bottom,n=e.right,r=e.left,o=e.near,a=e.far;if(t!==e._top||i!==e._bottom||r!==e._left||n!==e._right||o!==e._near||a!==e._far){if(e.near<=0||e.near>e.far)throw new t$_("near must be greater than zero and less than far.");e._left=r,e._right=n,e._top=t,e._bottom=i,e._near=o,e._far=a,e._perspectiveMatrix=c$1a.computePerspectiveOffCenter(r,n,i,t,o,a,e._perspectiveMatrix),e._infinitePerspective=c$1a.computeInfinitePerspectiveOffCenter(r,n,i,t,o,e._infinitePerspective)}}u$U.prototype.destroy=function(){delete this._bounds,this._bounds=null,t$$(this._command)&&(this._command.vertexArray=this._command.vertexArray&&!this._command.vertexArray.isDestroyed()&&this._command.vertexArray.destroy(),this._command.shaderProgram=this._command.shaderProgram&&!this._command.shaderProgram.isDestroyed()&&this._command.shaderProgram.destroy(),this._command=null);var e=this.colorBuffer;t$$(e)&&e.destroy(),this.colorBuffer=void 0;var t=this.heightBuffer;t$$(t)&&t.destroy(),this.heightBuffer=void 0,this._geometry=null},u$U.updateGeometry=function(e,t,i,n){if(t$$(e))for(var r=new s$1q,o=r.ellipsoid,a=new i$1g,s=e.attributes.position,l=new a$11,u=s.values,c=0;c<u.length;c+=3)l.x=u[c],l.y=u[c+1],l.z=u[c+2],n&&(o.cartesianToCartographic(l,a),r.project(a,l),l=a$11.fromElements(l.z,l.x,l.y)),c$1a.multiplyByPoint(i,l,l),u[c]=l.x,u[c+1]=l.y,u[c+2]=l.z},u$U.updateGeoBounds=function(e){for(var t=e.attributes.position.values,i=new a$10(Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),n=0;n<t.length;n+=3){var r=t[n],o=t[n+1];i.x=Math.min(r,i.x),i.y=Math.min(o,i.y),i.z=Math.max(r,i.z),i.w=Math.max(o,i.w)}return i},Object.defineProperties(l$V.prototype,{projectionMatrix:{get:function(){return x$T(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return x$T(this),this._infinitePerspective}}});var M$_=new a$11,E$T=new a$11,C$Q=new a$11,O$M=new a$11;function f$V(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._offCenterFrustum=new l$V,this.fov=e.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=e$1Y(e.near,1),this._near=this.near,this.far=e$1Y(e.far,5e8),this._far=this.far,this.xOffset=e$1Y(e.xOffset,0),this._xOffset=this.xOffset,this.yOffset=e$1Y(e.yOffset,0),this._yOffset=this.yOffset,this.reflect=!1}function o$R(e){if(!(t$$(e.fov)&&t$$(e.aspectRatio)&&t$$(e.near)&&t$$(e.far)))throw new t$_("fov, aspectRatio, near, or far parameters are not set.");var t=e._offCenterFrustum;if(e.fov!==e._fov||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far||e.xOffset!==e._xOffset||e.yOffset!==e._yOffset){if(e.fov<0||e.fov>=Math.PI)throw new t$_("fov must be in the range [0, PI).");if(e.aspectRatio<0)throw new t$_("aspectRatio must be positive.");if(e.near<0||e.near>e.far)throw new t$_("near must be greater than zero and less than far.");e._aspectRatio=e.aspectRatio,e._fov=e.fov,e._fovy=e.aspectRatio<=1?e.fov:2*Math.atan(Math.tan(.5*e.fov)/e.aspectRatio),e._near=e.near,e._far=e.far,e._sseDenominator=2*Math.tan(.5*e._fovy),e._xOffset=e.xOffset,e._yOffset=e.yOffset,t.top=e.near*Math.tan(.5*e._fovy),t.bottom=-t.top,t.right=e.aspectRatio*t.top,t.left=-t.right,t.near=e.near,t.far=e.far,t.right+=e.xOffset,t.left+=e.xOffset,t.top+=e.yOffset,t.bottom+=e.yOffset}}l$V.prototype.resetProjectionMatrix=function(){if(!(t$$(this.right)&&t$$(this.left)&&t$$(this.top)&&t$$(this.bottom)&&t$$(this.near)&&t$$(this.far)))throw new t$_("right, left, top, bottom, near, or far parameters are not set.");var e=this.top,t=this.bottom,i=this.right,n=this.left,r=this.near,o=this.far;if(this.near<=0||this.near>this.far)throw new t$_("near must be greater than zero and less than far.");this._left=n,this._right=i,this._top=e,this._bottom=t,this._near=r,this._far=o,this._perspectiveMatrix=c$1a.computePerspectiveOffCenter(n,i,t,e,r,o,this._perspectiveMatrix),this._infinitePerspective=c$1a.computeInfinitePerspectiveOffCenter(n,i,t,e,r,this._infinitePerspective)},l$V.prototype.computeCullingVolume=function(e,t,i,n){if(!t$$(e))throw new t$_("position is required.");if(!t$$(t))throw new t$_("direction is required.");if(!t$$(i))throw new t$_("up is required.");var r=this._cullingVolume.planes,o=e$1Y(n,0);o=Math.min(o,.5),o=Math.max(o,0);var a=this.top+this.top*o,s=this.bottom-this.top*o,l=this.right+this.right*o,u=this.left-this.right*o,c=this.near,h=this.far,d=a$11.cross(t,i,M$_),f=E$T;a$11.multiplyByScalar(t,c,f),a$11.add(e,f,f);var p=C$Q;a$11.multiplyByScalar(t,h,p),a$11.add(e,p,p);var _=O$M;a$11.multiplyByScalar(d,u,_),a$11.add(f,_,_),a$11.subtract(_,e,_),a$11.normalize(_,_),a$11.cross(_,i,_),a$11.normalize(_,_);var m=r[0];return t$$(m)||(m=r[0]=new a$10),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-a$11.dot(_,e),a$11.multiplyByScalar(d,l,_),a$11.add(f,_,_),a$11.subtract(_,e,_),a$11.cross(i,_,_),a$11.normalize(_,_),t$$(m=r[1])||(m=r[1]=new a$10),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-a$11.dot(_,e),a$11.multiplyByScalar(i,s,_),a$11.add(f,_,_),a$11.subtract(_,e,_),a$11.cross(d,_,_),a$11.normalize(_,_),t$$(m=r[2])||(m=r[2]=new a$10),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-a$11.dot(_,e),a$11.multiplyByScalar(i,a,_),a$11.add(f,_,_),a$11.subtract(_,e,_),a$11.cross(_,d,_),a$11.normalize(_,_),t$$(m=r[3])||(m=r[3]=new a$10),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-a$11.dot(_,e),t$$(m=r[4])||(m=r[4]=new a$10),m.x=t.x,m.y=t.y,m.z=t.z,m.w=-a$11.dot(t,f),a$11.negate(t,_),t$$(m=r[5])||(m=r[5]=new a$10),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-a$11.dot(_,p),this._cullingVolume},l$V.prototype.getPixelDimensions=function(e,t,i,n,r){if(x$T(this),!t$$(e)||!t$$(t))throw new t$_("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new t$_("drawingBufferWidth must be greater than zero.");if(t<=0)throw new t$_("drawingBufferHeight must be greater than zero.");if(!t$$(i))throw new t$_("distance is required.");if(!t$$(n))throw new t$_("pixelRatio is required");if(n<=0)throw new t$_("pixelRatio must be greater than zero.");if(!t$$(r))throw new t$_("A result object is required.");var o=1/this.near,a=this.top*o,s=2*n*i*a/t,l=2*n*i*(a=this.right*o)/e;return r.x=l,r.y=s,r},l$V.prototype.clone=function(e){return t$$(e)||(e=new l$V),e.right=this.right,e.left=this.left,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e},l$V.prototype.equals=function(e){return t$$(e)&&e instanceof l$V&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far},l$V.prototype.equalsEpsilon=function(e,t,i){return e===this||t$$(e)&&e instanceof l$V&&n$1d.equalsEpsilon(this.right,e.right,t,i)&&n$1d.equalsEpsilon(this.left,e.left,t,i)&&n$1d.equalsEpsilon(this.top,e.top,t,i)&&n$1d.equalsEpsilon(this.bottom,e.bottom,t,i)&&n$1d.equalsEpsilon(this.near,e.near,t,i)&&n$1d.equalsEpsilon(this.far,e.far,t,i)},f$V.packedLength=6,f$V.pack=function(e,t,i){return n$1e.typeOf.object("value",e),n$1e.defined("array",t),i=e$1Y(i,0),t[i++]=e.fov,t[i++]=e.aspectRatio,t[i++]=e.near,t[i++]=e.far,t[i++]=e.xOffset,t[i]=e.yOffset,t},f$V.unpack=function(e,t,i){return n$1e.defined("array",e),t=e$1Y(t,0),t$$(i)||(i=new f$V),i.fov=e[t++],i.aspectRatio=e[t++],i.near=e[t++],i.far=e[t++],i.xOffset=e[t++],i.yOffset=e[t],i},Object.defineProperties(f$V.prototype,{projectionMatrix:{get:function(){return o$R(this),this.reflect&&w$W(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return o$R(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return o$R(this),this._fovy}},sseDenominator:{get:function(){return o$R(this),this._sseDenominator}}}),f$V.prototype.resetProjectionMatrix=function(){return this._offCenterFrustum.resetProjectionMatrix()},f$V.prototype.computeCullingVolume=function(e,t,i,n){return o$R(this),this._offCenterFrustum.computeCullingVolume(e,t,i,n)},f$V.prototype.getPixelDimensions=function(e,t,i,n,r){return o$R(this),this._offCenterFrustum.getPixelDimensions(e,t,i,n,r)},f$V.prototype.clone=function(e){return t$$(e)||(e=new f$V),e.aspectRatio=this.aspectRatio,e.fov=this.fov,e.near=this.near,e.far=this.far,e.reflect=this.reflect,e.clipPlane=this.clipPlane,e.currentViewMatrix=this.currentViewMatrix,e._aspectRatio=void 0,e._fov=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e},f$V.prototype.equals=function(e){return!!(t$$(e)&&e instanceof f$V)&&(o$R(this),o$R(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))},f$V.prototype.equalsEpsilon=function(e,t,i){return!!(t$$(e)&&e instanceof f$V)&&(o$R(this),o$R(e),n$1d.equalsEpsilon(this.fov,e.fov,t,i)&&n$1d.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,i)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,i))};var a$K=new n$17(a$11.UNIT_Z,1),p$11=new a$10,s$14=new a$10,c$S=new a$10;function w$W(e){if(t$$(e.clipPlane)&&t$$(e.currentViewMatrix)){var t=e.currentViewMatrix,i=e._offCenterFrustum.projectionMatrix;c$1a.multiplyByPlane(t,e.clipPlane,a$K),p$11.x=(n$1d.sign(a$K.normal.x)+i[8])/i[0],p$11.y=(n$1d.sign(a$K.normal.y)+i[9])/i[5],p$11.z=-1,p$11.w=(1+i[10])/i[14],s$14.x=a$K.normal.x,s$14.y=a$K.normal.y,s$14.z=a$K.normal.z,s$14.w=a$K.distance,a$10.multiplyByScalar(s$14,2/a$10.dot(s$14,p$11),c$S),i[2]=c$S.x,i[6]=c$S.y,i[10]=c$S.z+1,i[14]=c$S.w}}var q$11=0,K$I=1;function D$V(e){n$1e.typeOf.object("options",e),n$1e.typeOf.object("options.frustum",e.frustum),n$1e.typeOf.object("options.origin",e.origin),n$1e.typeOf.object("options.orientation",e.orientation);var t,i,n=e.frustum,r=e.orientation,o=e.origin,a=e$1Y(e.vertexFormat,n$12.DEFAULT),s=e$1Y(e._drawNearPlane,!0);n instanceof f$V?(t=q$11,i=f$V.packedLength):n instanceof r$K&&(t=K$I,i=r$K.packedLength),this._frustumType=t,this._frustum=n.clone(),this._origin=a$11.clone(o),this._orientation=a$U.clone(r),this._drawNearPlane=s,this._vertexFormat=a,this._workerName="createFrustumGeometry",this.packedLength=2+i+a$11.packedLength+a$U.packedLength+n$12.packedLength}D$V.pack=function(e,t,i){n$1e.typeOf.object("value",e),n$1e.defined("array",t),i=e$1Y(i,0);var n=e._frustumType,r=e._frustum;return t[i++]=n,n===q$11?(f$V.pack(r,t,i),i+=f$V.packedLength):(r$K.pack(r,t,i),i+=r$K.packedLength),a$11.pack(e._origin,t,i),i+=a$11.packedLength,a$U.pack(e._orientation,t,i),i+=a$U.packedLength,n$12.pack(e._vertexFormat,t,i),t[i+=n$12.packedLength]=e._drawNearPlane?1:0,t};var ee$y=new f$V,re$B=new r$K,te$y=new a$U,ne$x=new a$11,ae$A=new n$12;function S$E(e,t,i,n,r,o,a,s){for(var l=e/3*2,u=0;u<4;++u)t$$(t)&&(t[e]=o.x,t[e+1]=o.y,t[e+2]=o.z),t$$(i)&&(i[e]=a.x,i[e+1]=a.y,i[e+2]=a.z),t$$(n)&&(n[e]=s.x,n[e+1]=s.y,n[e+2]=s.z),e+=3;r[l]=0,r[l+1]=0,r[l+2]=1,r[l+3]=0,r[l+4]=1,r[l+5]=1,r[l+6]=0,r[l+7]=1}D$V.unpack=function(e,t,i){n$1e.defined("array",e),t=e$1Y(t,0);var n,r=e[t++];r===q$11?(n=f$V.unpack(e,t,ee$y),t+=f$V.packedLength):(n=r$K.unpack(e,t,re$B),t+=r$K.packedLength);var o=a$11.unpack(e,t,ne$x);t+=a$11.packedLength;var a=a$U.unpack(e,t,te$y);t+=a$U.packedLength;var s=n$12.unpack(e,t,ae$A),l=1===e[t+=n$12.packedLength];if(!t$$(i))return new D$V({frustum:n,origin:o,orientation:a,vertexFormat:s,_drawNearPlane:l});var u=r===i._frustumType?i._frustum:void 0;return i._frustum=n.clone(u),i._frustumType=r,i._origin=a$11.clone(o,i._origin),i._orientation=a$U.clone(a,i._orientation),i._vertexFormat=n$12.clone(s,i._vertexFormat),i._drawNearPlane=l,i};var oe$w=new r$W,me$y=new c$1a,E$S=new c$1a,J$P=new a$11,U$S=new a$11,W$Y=new a$11,ie$B=new a$11,pe$r=new a$11,ue$r=new a$11,b$17=new Array(3),R$L=new Array(4);R$L[0]=new a$10(-1,-1,1,1),R$L[1]=new a$10(1,-1,1,1),R$L[2]=new a$10(1,1,1,1),R$L[3]=new a$10(-1,1,1,1);for(var X$G=new Array(4),H$P=0;H$P<4;++H$P)X$G[H$P]=new a$10;D$V._computeNearFarPlanes=function(e,t,i,n,r,o,a,s){var l=r$W.fromQuaternion(t,oe$w),u=e$1Y(o,J$P),c=e$1Y(a,U$S),h=e$1Y(s,W$Y);u=r$W.getColumn(l,0,u),c=r$W.getColumn(l,1,c),h=r$W.getColumn(l,2,h),a$11.normalize(u,u),a$11.normalize(c,c),a$11.normalize(h,h),a$11.negate(u,u);var d,f,p=c$1a.computeView(e,h,c,u,me$y);if(i===q$11){var _=n.projectionMatrix,m=c$1a.multiply(_,p,E$S);f=c$1a.inverse(m,E$S)}else d=c$1a.inverseTransformation(p,E$S);t$$(f)?(b$17[0]=n.near,b$17[1]=n.far):(b$17[0]=0,b$17[1]=n.near,b$17[2]=n.far);for(var $=0;$<2;++$)for(var g=0;g<4;++g){var y=a$10.clone(R$L[g],X$G[g]);if(t$$(f)){var v=1/(y=c$1a.multiplyByVector(f,y,y)).w;a$11.multiplyByScalar(y,v,y),a$11.subtract(y,e,y),a$11.normalize(y,y);var x=a$11.dot(h,y);a$11.multiplyByScalar(y,b$17[$]/x,y),a$11.add(y,e,y)}else{t$$(n._offCenterFrustum)&&(n=n._offCenterFrustum);var b=b$17[$],S=b$17[$+1];y.x=.5*(y.x*(n.right-n.left)+n.left+n.right),y.y=.5*(y.y*(n.top-n.bottom)+n.bottom+n.top),y.z=.5*(y.z*(b-S)-b-S),y.w=1,c$1a.multiplyByVector(d,y,y)}r[12*$+3*g]=y.x,r[12*$+3*g+1]=y.y,r[12*$+3*g+2]=y.z}},D$V.createGeometry=function(e){var t=e._frustumType,i=e._frustum,n=e._origin,r=e._orientation,o=e._drawNearPlane,a=e._vertexFormat,s=o?6:5,l=new Float64Array(72);D$V._computeNearFarPlanes(n,r,t,i,l);var u=24;l[u]=l[12],l[u+1]=l[13],l[u+2]=l[14],l[u+3]=l[0],l[u+4]=l[1],l[u+5]=l[2],l[u+6]=l[9],l[u+7]=l[10],l[u+8]=l[11],l[u+9]=l[21],l[u+10]=l[22],l[u+11]=l[23],l[u+=12]=l[15],l[u+1]=l[16],l[u+2]=l[17],l[u+3]=l[3],l[u+4]=l[4],l[u+5]=l[5],l[u+6]=l[0],l[u+7]=l[1],l[u+8]=l[2],l[u+9]=l[12],l[u+10]=l[13],l[u+11]=l[14],l[u+=12]=l[3],l[u+1]=l[4],l[u+2]=l[5],l[u+3]=l[15],l[u+4]=l[16],l[u+5]=l[17],l[u+6]=l[18],l[u+7]=l[19],l[u+8]=l[20],l[u+9]=l[6],l[u+10]=l[7],l[u+11]=l[8],l[u+=12]=l[6],l[u+1]=l[7],l[u+2]=l[8],l[u+3]=l[18],l[u+4]=l[19],l[u+5]=l[20],l[u+6]=l[21],l[u+7]=l[22],l[u+8]=l[23],l[u+9]=l[9],l[u+10]=l[10],l[u+11]=l[11],o||(l=l.subarray(12));var c=new t$W({position:new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:l})});if(t$$(a.normal)||t$$(a.tangent)||t$$(a.bitangent)||t$$(a.st)){var h=t$$(a.normal)?new Float32Array(12*s):void 0,d=t$$(a.tangent)?new Float32Array(12*s):void 0,f=t$$(a.bitangent)?new Float32Array(12*s):void 0,p=t$$(a.st)?new Float32Array(8*s):void 0,_=J$P,m=U$S,$=W$Y,g=a$11.negate(_,ie$B),y=a$11.negate(m,pe$r),v=a$11.negate($,ue$r);u=0,o&&(S$E(u,h,d,f,p,v,_,m),u+=12),S$E(u,h,d,f,p,$,g,m),S$E(u+=12,h,d,f,p,g,v,m),S$E(u+=12,h,d,f,p,y,v,g),S$E(u+=12,h,d,f,p,_,$,m),S$E(u+=12,h,d,f,p,m,$,g),t$$(h)&&(c.normal=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:h})),t$$(d)&&(c.tangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:d})),t$$(f)&&(c.bitangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:f})),t$$(p)&&(c.st=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:2,values:p}))}for(var x=new Uint16Array(6*s),b=0;b<s;++b){var S=6*b,w=4*b;x[S]=w,x[S+1]=w+1,x[S+2]=w+2,x[S+3]=w,x[S+4]=w+2,x[S+5]=w+3}return new T$11({attributes:c,indices:x,primitiveType:H$11.TRIANGLES,boundingSphere:c$19.fromVertices(l)})};var y$R=0,A$W=1;function g$H(e){n$1e.typeOf.object("options",e),n$1e.typeOf.object("options.frustum",e.frustum),n$1e.typeOf.object("options.origin",e.origin),n$1e.typeOf.object("options.orientation",e.orientation);var t,i,n=e.frustum,r=e.orientation,o=e.origin,a=e$1Y(e._drawNearPlane,!0);n instanceof f$V?(t=y$R,i=f$V.packedLength):n instanceof r$K&&(t=A$W,i=r$K.packedLength),this._frustumType=t,this._frustum=n.clone(),this._origin=a$11.clone(o),this._orientation=a$U.clone(r),this._drawNearPlane=a,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+i+a$11.packedLength+a$U.packedLength}g$H.pack=function(e,t,i){n$1e.typeOf.object("value",e),n$1e.defined("array",t),i=e$1Y(i,0);var n=e._frustumType,r=e._frustum;return t[i++]=n,n===y$R?(f$V.pack(r,t,i),i+=f$V.packedLength):(r$K.pack(r,t,i),i+=r$K.packedLength),a$11.pack(e._origin,t,i),i+=a$11.packedLength,a$U.pack(e._orientation,t,i),t[i+=a$U.packedLength]=e._drawNearPlane?1:0,t};var F$Q=new f$V,D$U=new r$K,E$R=new a$U,G$M=new a$11;function o$Q(){}g$H.unpack=function(e,t,i){n$1e.defined("array",e),t=e$1Y(t,0);var n,r=e[t++];r===y$R?(n=f$V.unpack(e,t,F$Q),t+=f$V.packedLength):(n=r$K.unpack(e,t,D$U),t+=r$K.packedLength);var o=a$11.unpack(e,t,G$M);t+=a$11.packedLength;var a=a$U.unpack(e,t,E$R),s=1===e[t+=a$U.packedLength];if(!t$$(i))return new g$H({frustum:n,origin:o,orientation:a,_drawNearPlane:s});var l=r===i._frustumType?i._frustum:void 0;return i._frustum=n.clone(l),i._frustumType=r,i._origin=a$11.clone(o,i._origin),i._orientation=a$U.clone(a,i._orientation),i._drawNearPlane=s,i},g$H.createGeometry=function(e){var t=e._frustumType,i=e._frustum,n=e._origin,r=e._orientation,o=e._drawNearPlane,a=new Float64Array(24);D$V._computeNearFarPlanes(n,r,t,i,a);for(var s,l,u=new t$W({position:new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:a})}),c=o?2:1,h=new Uint16Array(8*(c+1)),d=o?0:1;d<2;++d)l=4*d,h[s=o?8*d:0]=l,h[s+1]=l+1,h[s+2]=l+1,h[s+3]=l+2,h[s+4]=l+2,h[s+5]=l+3,h[s+6]=l+3,h[s+7]=l;for(d=0;d<2;++d)l=4*d,h[s=8*(c+d)]=l,h[s+1]=l+4,h[s+2]=l+1,h[s+3]=l+5,h[s+4]=l+2,h[s+5]=l+6,h[s+6]=l+3,h[s+7]=l+7;return new T$11({attributes:u,indices:h,primitiveType:H$11.LINES,boundingSphere:c$19.fromVertices(a)})},o$Q.prototype.geocode=t$_.throwInstantiationError;var e$1i={SEARCH:0,AUTOCOMPLETE:1},d$R=Object.freeze(e$1i);function r$G(e){if(!t$$((e=e$1Y(e,e$1Y.EMPTY_OBJECT)).componentDatatype))throw new t$_("options.componentDatatype is required.");if(!t$$(e.componentsPerAttribute))throw new t$_("options.componentsPerAttribute is required.");if(e.componentsPerAttribute<1||e.componentsPerAttribute>4)throw new t$_("options.componentsPerAttribute must be between 1 and 4.");if(!t$$(e.value))throw new t$_("options.value is required.");this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=e$1Y(e.normalize,!1),this.value=e.value}function a$J(e){if(!t$$(e))throw new t$_("uri is required.");var t=new h$1f(e);t.normalize();var i=t.path,n=i.lastIndexOf("/");return-1!==n&&(i=i.substr(n+1)),i}var n$V={};function i$W(e,t,i){t$$(t)||(t=e.width),t$$(i)||(i=e.height);var n=n$V[t];t$$(n)||(n={},n$V[t]=n);var r=n[i];if(!t$$(r)){var o=document.createElement("canvas");o.width=t,o.height=i,(r=o.getContext("2d")).globalCompositeOperation="copy",n[i]=r}return r.drawImage(e,0,0,t,i),r.getImageData(0,0,t,i).data}function e$1h(e,t){return c$X(e,t=e$1Y(t,0),Math.min(4,e.length))}function D$T(){this.PI=3.14159265358979,this.param_a=0,this.param_d=1e-12,this.p=206264.8062471,this.a=6378137,this.b=6356752.31414036,this.alpha=.003352810681182319,this.e2=.0066943800229,this.e21=.00673949677548,this.c=6399593.62586,this.K0=1.57048761144159e-7,this.K1=.00505250178820567,this.K2=298472900956587e-19,this.K3=2.41626669230084e-7,this.K4=2.22241238938534e-9,this.alpha=1/298.257222101,this.e4=Math.pow(this.e2,2),this.e6=Math.pow(this.e2,3),this.e8=Math.pow(this.e2,4),this.A=1+.5*this.e2+.375*this.e4+.3125*this.e6+630/2304*this.e8,this.B=1/6*this.e2+15/80*this.e4+.1875*this.e6+420/2304*this.e8,this.C=3/80*this.e4+7/112*this.e6+.078125*this.e8,this.D=1/112*this.e6+45/2304*this.e8,this.E=5/2304*this.e8}function d$Q(){this.PI=3.14159265358979,this.param_a=0,this.param_d=1e-12,this.p=206264.8062471,this.a=6378140,this.b=6356755.288157528,this.alpha=.0033528131778969143,this.e2=.00669438499958795,this.e21=.00673950181947292,this.c=6399596.65198801,this.K0=1.57048687472752e-7,this.K1=.00505250559291393,this.K2=298473350966158e-19,this.K3=2.41627215981336e-7,this.K4=2.22241909461273e-9,this.e4=Math.pow(this.e2,2),this.e6=Math.pow(this.e2,3),this.e8=Math.pow(this.e2,4),this.A=1+.5*this.e2+.375*this.e4+.3125*this.e6+630/2304*this.e8,this.B=1/6*this.e2+15/80*this.e4+.1875*this.e6+420/2304*this.e8,this.C=3/80*this.e4+7/112*this.e6+.078125*this.e8,this.D=1/112*this.e6+45/2304*this.e8,this.E=5/2304*this.e8}function C$P(e,t,i,n,r,o){var a=0;a=t>1e6?t-5e5-1e6*r:t-5e5;var s=o.K0*e,l=Math.sin(s),u=s+Math.cos(s)*(o.K1*l-o.K2*Math.pow(l,3)+o.K3*Math.pow(l,5)-o.K4*Math.pow(l,7)),c=Math.tan(u),h=o.e21*Math.pow(Math.cos(u),2),d=Math.sqrt(1+h),f=a/(o.c/d),p=Math.pow(d,2)*c,_=Math.pow(c,2);i.B=u-p*Math.pow(f,2)/2+(5+3*_+h-9*h*_)*p*Math.pow(f,4)/24-(61+90*_+45*Math.pow(_,2))*p*Math.pow(f,6)/720;var m=1/Math.cos(u);i.L=m*f-(1+2*_+h)*m*Math.pow(f,3)/6+(5+28*_+24*Math.pow(_,2)+6*h+8*h*_)*m*Math.pow(f,5)/120+n}function E$Q(e,t,i,n,r,o){var a=(t-e)/2,s=(t+e)/2,l=(n+i)/2,u=2*o.b*o.b*l,c=Math.cos(s),h=Math.sin(a),d=[];return d[0]=u*o.A*h*c,d[1]=u*o.B*Math.sin(3*a)*Math.cos(3*s),d[2]=u*o.C*Math.sin(5*a)*Math.cos(5*s),d[3]=u*o.D*Math.sin(7*a)*Math.cos(7*s),d[4]=u*o.E*Math.sin(9*a)*Math.cos(9*s),d[0]-d[1]+d[2]-d[3]+d[4]}function _$S(e,t,i,n){for(var r=0,o=0;o<e.length-1;o++)for(var a=e[o],s=e[o+1],l=a.x,u=a.y,c=s.x,h=s.y,d=s.x-a.x,f=s.y-a.y,p=Math.pow(Math.abs(d),2),_=Math.pow(Math.abs(f),2),m=Math.sqrt(p+_),$=Math.floor(m/70),g=1;g<=$+1;g++){var y=0,v=0;g<$+1?(y=a.x+d*g/($+1),v=a.y+f*g/($+1)):(y=c,v=h);var x={B:0,L:0},b={B:0,L:0};C$P(u,l,x,t,i,n),C$P(v,y,b,t,i,n),r+=E$Q(x.B,b.B,x.L,b.L,t,n),l=y,u=v}return Math.abs(r)}function g$G(e,t,i,n){for(var r=0,o=0;o<e.length-1;o++){var a={B:0,L:0},s={B:0,L:0};C$P(e[o].y,e[o].x,a,t,i,n),C$P(e[o+1].y,e[o+1].x,s,t,i,n);var l=[],u=(s.B-a.B)/2,c=(s.B+a.B)/2,h=(s.L+a.L)/2,d=2*n.b*n.b*h,f=Math.cos(c),p=Math.sin(u);l[0]=d*n.A*f*p,l[1]=d*n.B*Math.sin(3*u)*Math.cos(3*c),l[2]=d*n.C*Math.sin(5*u)*Math.cos(5*c),l[3]=d*n.D*Math.sin(7*u)*Math.cos(7*c),l[4]=d*n.E*Math.sin(9*u)*Math.cos(9*c),r+=l[0]-l[1]+l[2]-l[3]+l[4]}return Math.abs(r)}function q$10(e,t,i,n,r){var o=0,a=n$1d.toRadians(i);if("China2000"===t)o=_$S(e,a,n,new D$T);else if("Xian1980"===t){o=g$G(e,a,n,new d$Q)}return o}var tmp$1={}; /*! * 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 */(function(global,undefined$1){!function(e,t,i){global.protobuf=function i(n){var r=t[n];return r||e[n][0].call(r=t[n]={exports:{}},i,r,r.exports),r.exports}(7)}({1:[function(e,t,i){t.exports=function(e,t){for(var i=[],n=2;n<arguments.length;)i.push(arguments[n++]);var r=!0;return new Promise((function(n,o){i.push((function(e){if(r)if(r=!1,e)o(e);else{for(var t=[],i=1;i<arguments.length;)t.push(arguments[i++]);n.apply(null,t)}}));try{e.apply(t||this,i)}catch(e){r&&(r=!1,o(e))}}))}},{}],2:[function(e,t,i){var n=i;n.length=function(e){var t=e.length;if(!t)return 0;for(var i=0;--t%4>1&&"="===e.charAt(t);)++i;return Math.ceil(3*e.length)/4-i};for(var r=new Array(64),o=new Array(123),a=0;a<64;)o[r[a]=a<26?a+65:a<52?a+71:a<62?a-4:a-59|43]=a++;n.encode=function(e,t,i){for(var n,o=[],a=0,s=0;t<i;){var l=e[t++];switch(s){case 0:o[a++]=r[l>>2],n=(3&l)<<4,s=1;break;case 1:o[a++]=r[n|l>>4],n=(15&l)<<2,s=2;break;case 2:o[a++]=r[n|l>>6],o[a++]=r[63&l],s=0}}return s&&(o[a++]=r[n],o[a]=61,1===s&&(o[a+1]=61)),String.fromCharCode.apply(String,o)};var s="invalid encoding";n.decode=function(e,t,i){for(var n,r=i,a=0,l=0;l<e.length;){var u=e.charCodeAt(l++);if(61===u&&a>1)break;if((u=o[u])===undefined$1)throw Error(s);switch(a){case 0:n=u,a=1;break;case 1:t[i++]=n<<2|(48&u)>>4,n=u,a=2;break;case 2:t[i++]=(15&n)<<4|(60&u)>>2,n=u,a=3;break;case 3:t[i++]=(3&n)<<6|u,a=0}}if(1===a)throw Error(s);return i-r},n.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},{}],3:[function(e,t,i){function n(){this._listeners={}}t.exports=n,n.prototype.on=function(e,t,i){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:i||this}),this},n.prototype.off=function(e,t){if(e===undefined$1)this._listeners={};else if(t===undefined$1)this._listeners[e]=[];else for(var i=this._listeners[e],n=0;n<i.length;)i[n].fn===t?i.splice(n,1):++n;return this},n.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var i=[],n=1;n<arguments.length;)i.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,i)}return this}},{}],4:[function(require,module,exports){function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},{}],5:[function(e,t,i){t.exports=function(e,t,i){var n=i||8192,r=n>>>1,o=null,a=n;return function(i){if(i<1||i>r)return e(i);a+i>n&&(o=e(n),a=0);var s=t.call(o,a,a+=i);return 7&a&&(a=1+(7|a)),s}}},{}],6:[function(e,t,i){var n=i;n.length=function(e){for(var t=0,i=0,n=0;n<e.length;++n)(i=e.charCodeAt(n))<128?t+=1:i<2048?t+=2:55296==(64512&i)&&56320==(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},n.read=function(e,t,i){if(i-t<1)return"";for(var n,r=null,o=[],a=0;t<i;)(n=e[t++])<128?o[a++]=n:n>191&&n<224?o[a++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[a++]=55296+(n>>10),o[a++]=56320+(1023&n)):o[a++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],a>8191&&((r||(r=[])).push(String.fromCharCode.apply(String,o)),a=0);return r?(a&&r.push(String.fromCharCode.apply(String,o.slice(0,a))),r.join("")):String.fromCharCode.apply(String,o.slice(0,a))},n.write=function(e,t,i){for(var n,r,o=i,a=0;a<e.length;++a)(n=e.charCodeAt(a))<128?t[i++]=n:n<2048?(t[i++]=n>>6|192,t[i++]=63&n|128):55296==(64512&n)&&56320==(64512&(r=e.charCodeAt(a+1)))?(n=65536+((1023&n)<<10)+(1023&r),++a,t[i++]=n>>18|240,t[i++]=n>>12&63|128,t[i++]=n>>6&63|128,t[i++]=63&n|128):(t[i++]=n>>12|224,t[i++]=n>>6&63|128,t[i++]=63&n|128);return i-o}},{}],7:[function(e,t,i){var n=i;function r(){n.Reader._configure(n.BufferReader),n.util._configure()}n.build="minimal",n.roots={},n.Writer=e(14),n.BufferWriter=e(15),n.Reader=e(8),n.BufferReader=e(9),n.util=e(13),n.rpc=e(10),n.configure=r,n.Writer._configure(n.BufferWriter),r()},{10:10,13:13,14:14,15:15,8:8,9:9}],8:[function(e,t,i){t.exports=l;var n,r=e(13),o=r.LongBits,a=r.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function l(e){this.buf=e,this.pos=0,this.len=e.length}var u=typeof Uint8Array<"u"?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new l(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new l(e);throw Error("illegal buffer")};function c(){var e=new o(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function h(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw s(this,8);return new o(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}l.create=r.Buffer?function(e){return(l.create=function(e){return r.Buffer.isBuffer(e)?new n(e):u(e)})(e)}:u,l.prototype._slice=r.Array.prototype.subarray||r.Array.prototype.slice,l.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)||(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)||(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)||(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128))return e;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return e}}(),l.prototype.int32=function(){return 0|this.uint32()},l.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},l.prototype.bool=function(){return 0!==this.uint32()},l.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return h(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|h(this.buf,this.pos+=4)};var f=typeof Float32Array<"u"?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(i,n){return t[0]=i[n],t[1]=i[n+1],t[2]=i[n+2],t[3]=i[n+3],e[0]}:function(i,n){return t[0]=i[n+3],t[1]=i[n+2],t[2]=i[n+1],t[3]=i[n],e[0]}}():function(e,t){var i=h(e,t+4),n=2*(i>>31)+1,r=i>>>23&255,o=8388607&i;return 255===r?o?NaN:n*(1/0):0===r?1401298464324817e-60*n*o:n*Math.pow(2,r-150)*(o+8388608)};l.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=f(this.buf,this.pos);return this.pos+=4,e};var p=typeof Float64Array<"u"?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(i,n){return t[0]=i[n],t[1]=i[n+1],t[2]=i[n+2],t[3]=i[n+3],t[4]=i[n+4],t[5]=i[n+5],t[6]=i[n+6],t[7]=i[n+7],e[0]}:function(i,n){return t[0]=i[n+7],t[1]=i[n+6],t[2]=i[n+5],t[3]=i[n+4],t[4]=i[n+3],t[5]=i[n+2],t[6]=i[n+1],t[7]=i[n],e[0]}}():function(e,t){var i=h(e,t+4),n=h(e,t+8),r=2*(n>>31)+1,o=n>>>20&2047,a=4294967296*(1048575&n)+i;return 2047===o?a?NaN:r*(1/0):0===o?5e-324*r*a:r*Math.pow(2,o-1075)*(a+4503599627370496)};l.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=p(this.buf,this.pos);return this.pos+=8,e},l.prototype.bytes=function(){var e=this.uint32(),t=this.pos,i=this.pos+e;if(i>this.len)throw s(this,e);return this.pos+=e,t===i?new this.buf.constructor(0):this._slice.call(this.buf,t,i)},l.prototype.string=function(){var e=this.bytes();return a.read(e,0,e.length)},l.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},l.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){if(4==(e=7&this.uint32()))break;this.skipType(e)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},l._configure=function(e){n=e;var t=r.Long?"toLong":"toNumber";r.merge(l.prototype,{int64:function(){return c.call(this)[t](!1)},uint64:function(){return c.call(this)[t](!0)},sint64:function(){return c.call(this).zzDecode()[t](!1)},fixed64:function(){return d.call(this)[t](!0)},sfixed64:function(){return d.call(this)[t](!1)}})}},{13:13}],9:[function(e,t,i){t.exports=o;var n=e(8);(o.prototype=Object.create(n.prototype)).constructor=o;var r=e(13);function o(e){n.call(this,e)}r.Buffer&&(o.prototype._slice=r.Buffer.prototype.slice),o.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}},{13:13,8:8}],10:[function(e,t,i){i.Service=e(11)},{11:11}],11:[function(e,t,i){t.exports=r;var n=e(13);function r(e,t,i){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(i)}(r.prototype=Object.create(n.EventEmitter.prototype)).constructor=r,r.prototype.rpcCall=function e(t,i,r,o,a){if(!o)throw TypeError("request must be specified");var s=this;if(!a)return n.asPromise(e,s,t,i,r,o);if(!s.rpcImpl)return setTimeout((function(){a(Error("already ended"))}),0),undefined$1;try{return s.rpcImpl(t,i[s.requestDelimited?"encodeDelimited":"encode"](o).finish(),(function(e,i){if(e)return s.emit("error",e,t),a(e);if(null===i)return s.end(!0),undefined$1;if(!(i instanceof r))try{i=r[s.responseDelimited?"decodeDelimited":"decode"](i)}catch(e){return s.emit("error",e,t),a(e)}return s.emit("data",i,t),a(null,i)}))}catch(e){return s.emit("error",e,t),setTimeout((function(){a(e)}),0),undefined$1}},r.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{13:13}],12:[function(e,t,i){t.exports=r;var n=e(13);function r(e,t){this.lo=e>>>0,this.hi=t>>>0}var o=r.zero=new r(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var a=r.zeroHash="\0\0\0\0\0\0\0\0";r.fromNumber=function(e){if(0===e)return o;var t=e<0;t&&(e=-e);var i=e>>>0,n=(e-i)/4294967296>>>0;return t&&(n=~n>>>0,i=~i>>>0,++i>4294967295&&(i=0,++n>4294967295&&(n=0))),new r(i,n)},r.from=function(e){if("number"==typeof e)return r.fromNumber(e);if(n.isString(e)){if(!n.Long)return r.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new r(e.low>>>0,e.high>>>0):o},r.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,i=~this.hi>>>0;return t||(i=i+1>>>0),-(t+4294967296*i)}return this.lo+4294967296*this.hi},r.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var s=String.prototype.charCodeAt;r.fromHash=function(e){return e===a?o:new r((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},r.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},r.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},r.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},r.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0===i?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:i<128?9:10}},{13:13}],13:[function(e,t,i){var n=i;function r(e,t,i){for(var n=Object.keys(t),r=0;r<n.length;++r)(e[n[r]]===undefined$1||!i)&&(e[n[r]]=t[n[r]]);return e}function o(e){function t(e,i){if(!(this instanceof t))return new t(e,i);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),i&&r(this,i)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return e}}),t.prototype.toString=function(){return this.name+": "+this.message},t}n.asPromise=e(1),n.base64=e(2),n.EventEmitter=e(3),n.inquire=e(4),n.utf8=e(6),n.pool=e(5),n.LongBits=e(12),n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isNode=Boolean(global.process&&global.process.versions&&global.process.versions.node),n.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isObject=function(e){return e&&"object"==typeof e},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch{return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"==typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):typeof Uint8Array>"u"?e:new Uint8Array(e)},n.Array=typeof Uint8Array<"u"?Uint8Array:Array,n.Long=global.dcodeIO&&global.dcodeIO.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var i=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(i.lo,i.hi,t):i.toNumber(Boolean(t))},n.merge=r,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=o,n.ProtocolError=o("ProtocolError"),n.oneOfGetter=function(e){for(var t={},i=0;i<e.length;++i)t[e[i]]=1;return function(){for(var e=Object.keys(this),i=e.length-1;i>-1;--i)if(1===t[e[i]]&&this[e[i]]!==undefined$1&&null!==this[e[i]])return e[i]}},n.oneOfSetter=function(e){return function(t){for(var i=0;i<e.length;++i)e[i]!==t&&delete this[e[i]]}},n.lazyResolve=function(e,t){for(var i=0;i<t.length;++i)for(var n=Object.keys(t[i]),r=0;r<n.length;++r){for(var o=t[i][n[r]].split("."),a=e;o.length;)a=a[o.shift()];t[i][n[r]]=a}},n.toJSONOptions={longs:String,enums:String,bytes:String},n._configure=function(){var e=n.Buffer;e?(n._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,i){return new e(t,i)},n._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):n._Buffer_from=n._Buffer_allocUnsafe=null}},{1:1,12:12,2:2,3:3,4:4,5:5,6:6}],14:[function(e,t,i){t.exports=h;var n,r=e(13),o=r.LongBits,a=r.base64,s=r.utf8;function l(e,t,i){this.fn=e,this.len=t,this.next=undefined$1,this.val=i}function u(){}function c(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function h(){this.len=0,this.head=new l(u,0,0),this.tail=this.head,this.states=null}function d(e,t,i){t[i]=255&e}function f(e,t){this.len=e,this.next=undefined$1,this.val=t}function p(e,t,i){for(;e.hi;)t[i++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[i++]=127&e.lo|128,e.lo=e.lo>>>7;t[i++]=e.lo}function _(e,t,i){t[i++]=255&e,t[i++]=e>>>8&255,t[i++]=e>>>16&255,t[i]=e>>>24}h.create=r.Buffer?function(){return(h.create=function(){return new n})()}:function(){return new h},h.alloc=function(e){return new r.Array(e)},r.Array!==Array&&(h.alloc=r.pool(h.alloc,r.Array.prototype.subarray)),h.prototype.push=function(e,t,i){return this.tail=this.tail.next=new l(e,t,i),this.len+=t,this},f.prototype=Object.create(l.prototype),f.prototype.fn=function(e,t,i){for(;e>127;)t[i++]=127&e|128,e>>>=7;t[i]=e},h.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new f((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},h.prototype.int32=function(e){return e<0?this.push(p,10,o.fromNumber(e)):this.uint32(e)},h.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},h.prototype.uint64=function(e){var t=o.from(e);return this.push(p,t.length(),t)},h.prototype.int64=h.prototype.uint64,h.prototype.sint64=function(e){var t=o.from(e).zzEncode();return this.push(p,t.length(),t)},h.prototype.bool=function(e){return this.push(d,1,e?1:0)},h.prototype.fixed32=function(e){return this.push(_,4,e>>>0)},h.prototype.sfixed32=h.prototype.fixed32,h.prototype.fixed64=function(e){var t=o.from(e);return this.push(_,4,t.lo).push(_,4,t.hi)},h.prototype.sfixed64=h.prototype.fixed64;var m=typeof Float32Array<"u"?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(i,n,r){e[0]=i,n[r++]=t[0],n[r++]=t[1],n[r++]=t[2],n[r]=t[3]}:function(i,n,r){e[0]=i,n[r++]=t[3],n[r++]=t[2],n[r++]=t[1],n[r]=t[0]}}():function(e,t,i){var n=e<0?1:0;if(n&&(e=-e),0===e)_(1/e>0?0:2147483648,t,i);else if(isNaN(e))_(2147483647,t,i);else if(e>34028234663852886e22)_((n<<31|2139095040)>>>0,t,i);else if(e<11754943508222875e-54)_((n<<31|Math.round(e/1401298464324817e-60))>>>0,t,i);else{var r=Math.floor(Math.log(e)/Math.LN2);_((n<<31|r+127<<23|8388607&Math.round(e*Math.pow(2,-r)*8388608))>>>0,t,i)}};h.prototype.float=function(e){return this.push(m,4,e)};var $=typeof Float64Array<"u"?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(i,n,r){e[0]=i,n[r++]=t[0],n[r++]=t[1],n[r++]=t[2],n[r++]=t[3],n[r++]=t[4],n[r++]=t[5],n[r++]=t[6],n[r]=t[7]}:function(i,n,r){e[0]=i,n[r++]=t[7],n[r++]=t[6],n[r++]=t[5],n[r++]=t[4],n[r++]=t[3],n[r++]=t[2],n[r++]=t[1],n[r]=t[0]}}():function(e,t,i){var n=e<0?1:0;if(n&&(e=-e),0===e)_(0,t,i),_(1/e>0?0:2147483648,t,i+4);else if(isNaN(e))_(4294967295,t,i),_(2147483647,t,i+4);else if(e>17976931348623157e292)_(0,t,i),_((n<<31|2146435072)>>>0,t,i+4);else{var r;if(e<22250738585072014e-324)_((r=e/5e-324)>>>0,t,i),_((n<<31|r/4294967296)>>>0,t,i+4);else{var o=Math.floor(Math.log(e)/Math.LN2);1024===o&&(o=1023),_(4503599627370496*(r=e*Math.pow(2,-o))>>>0,t,i),_((n<<31|o+1023<<20|1048576*r&1048575)>>>0,t,i+4)}}};h.prototype.double=function(e){return this.push($,8,e)};var g=r.Array.prototype.set?function(e,t,i){t.set(e,i)}:function(e,t,i){for(var n=0;n<e.length;++n)t[i+n]=e[n]};h.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this.push(d,1,0);if(r.isString(e)){var i=h.alloc(t=a.length(e));a.decode(e,i,0),e=i}return this.uint32(t).push(g,t,e)},h.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t).push(s.write,t,e):this.push(d,1,0)},h.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new l(u,0,0),this.len=0,this},h.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new l(u,0,0),this.len=0),this},h.prototype.ldelim=function(){var e=this.head,t=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=e.next,this.tail=t,this.len+=i),this},h.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),i=0;e;)e.fn(e.val,t,i),i+=e.len,e=e.next;return t},h._configure=function(e){n=e}},{13:13}],15:[function(e,t,i){t.exports=a;var n=e(14);(a.prototype=Object.create(n.prototype)).constructor=a;var r=e(13),o=r.Buffer;function a(){n.call(this)}a.alloc=function(e){return(a.alloc=r._Buffer_allocUnsafe)(e)};var s=o&&o.prototype instanceof Uint8Array&&"set"===o.prototype.set.name?function(e,t,i){t.set(e,i)}:function(e,t,i){if(e.copy)e.copy(t,i,0,e.length);else for(var n=0;n<e.length;)t[i++]=e[n++]};function l(e,t,i){e.length<40?r.utf8.write(e,t,i):t.utf8Write(e,i)}a.prototype.bytes=function(e){r.isString(e)&&(e=r._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this.push(s,t,e),this},a.prototype.string=function(e){var t=o.byteLength(e);return this.uint32(t),t&&this.push(l,t,e),this}},{13:13,14:14}]},{})})(tmp$1);var j$T=tmp$1.protobuf,u$T=[1,2,4,8],n$U=15,d$P=16,p$10=64,y$Q=128;function e$1g(e,t,i,n,r,o){this._bits=e,this.cnodeVersion=t,this.imageryVersion=i,this.terrainVersion=n,this.imageryProvider=r,this.terrainProvider=o,this.ancestorHasTerrain=!1,this.terrainState=void 0}function Y$L(e){for(var t=e.length,i=new ArrayBuffer(t),n=new Uint8Array(i),r=0;r<t;++r)n[r]=e.charCodeAt(r);return i}e$1g.clone=function(e,t){return t$$(t)?(t._bits=e._bits,t.cnodeVersion=e.cnodeVersion,t.imageryVersion=e.imageryVersion,t.terrainVersion=e.terrainVersion,t.imageryProvider=e.imageryProvider,t.terrainProvider=e.terrainProvider):t=new e$1g(e._bits,e.cnodeVersion,e.imageryVersion,e.terrainVersion,e.imageryProvider,e.terrainProvider),t.ancestorHasTerrain=e.ancestorHasTerrain,t.terrainState=e.terrainState,t},e$1g.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()},e$1g.prototype.hasSubtree=function(){return e$1B(this._bits,d$P)},e$1g.prototype.hasImagery=function(){return e$1B(this._bits,p$10)},e$1g.prototype.hasTerrain=function(){return e$1B(this._bits,y$Q)},e$1g.prototype.hasChildren=function(){return e$1B(this._bits,n$U)},e$1g.prototype.hasChild=function(e){return e$1B(this._bits,u$T[e])},e$1g.prototype.getChildBitmask=function(){return this._bits&n$U};var L$T=Y$L('Eô½\vyâjE"’,ÍqøIFgQ\0B%Æèa,f)\bÆ4Üjb%y\nwmiÖðœk“¡½NuàA[ß@V\fÙ»r›|3SîOlÔq°{ÀEVZ­wUe\v3’*¬l5Å0sø3>mF8J´Ýð.ÝuڌDt"úa"\f3"So¯9D\vŒ9Ù9L¹¿«\\ŒP_Ÿ"uxéq‘h;Áěð<VqH‚\'UfYNe˜u£aF}a?A\0Ÿ×´4M·F°Õ¸Š\'{‹Ü+»Mg0ÈÑö\\Pú[/F›n5/\'C.ë\n\f^¥se4ål.jC\'c#U©?q{gC}:¯ÍâTUœýKÆâŸ/(íË\\Æ-fˆ§;/*"N°k.Ý\r•}}GºC²²+>Mª>}æÎI‰Ææx\fa1-¤O¥~q ˆì\r1èN\v\0nPh}=\b\r•¦n£h—$[kó#ó¶s³\r\v@ÀŸØQ]ú".jßI\0¹ wUÆïj¿{GLƒîÜÜF…©­S+S4ÿ”Yä8è1ƒN¹XFkË-#†’p\x005ˆ"Ï1²&/çÃu-6,rt°#G·ÓÑ&…7râ\0ŒDÏÚ3-Þ`†i#i*|ÍKQ\r•T9w.)ê¦P¢joP™\\>TûïP[\vE‰m(w7ێJfJo™ åpâ¹q~\fmI-zþrÇòY0»]såÉ êxì ðŠB|G`°½&·q¶ÇŸÑ3‚=Ó«îc™È+S D\\qÆÌD2O<ÊÀ)=RÓaX©}e´ÜÏ\rô=ñ\b©BÚ#\tØ¿^PIøMÀËGLO÷{+ØÅ1’;µoÜl\r’ˆўÛ?âéÚ_ԄâFaZÞUϤ\0¾ýÎgñJi—æ HØ]~®q N®ÀV©‘<‚rçvì)IÖ]-ƒãÛ6©;f—‡jÕ¶=P^R¹KÇsWxÉô.Y•“oÐKW>\'\'Ç`Û;íšSD>?’mw¢\në?R¨ÆU^1I7…ôÅ&-©¿‹\'TÚÃj å*x°Öprª‹h½ˆ÷_H±~ÀXL?fù>áeÀp§Ï8i¯ðVldIœ\'­xtO‡ÞV9\0Úw\vË-‰û5Oõ\bQ`Á\nZGM&30xÚÀœFGâ[y`In7gS\n>éìF9²ñ4\rƄSuná\fYÙÞ)…{II¥wy¾IV.6ç\v:»Ob{ÒM1•/½8{¨O!áìFpv•})"xˆ\nÝ\\ÚÞQÏðüYRe|3ßóHÚ»*uÛ`²Ôüíì5¨ÿ(1-È܈F|Š["');function f$U(e){n$1e.defined("resourceOrUrl",e);var t=e;"string"!=typeof t&&!(t instanceof t$X)&&(n$1e.typeOf.string("resourceOrUrl.url",e.url),t=e.url);var i=t$X.createIfNeeded(t);i.appendForwardSlash(),this._resource=i,this.imageryPresent=!0,this.protoImagery=void 0,this.terrainPresent=!0,this.negativeAltitudeExponentBias=32,this.negativeAltitudeThreshold=n$1d.EPSILON12,this.providers={},this.key=void 0,this._quadPacketVersion=1,this._tileInfo={},this._subtreePromises={};var n=this;this._readyPromise=M$Z(this).then((function(){return n.getQuadTreePacket("",n._quadPacketVersion)})).then((function(){return!0})).otherwise((function(e){var t="An error occurred while accessing "+S$D(n,"",1).url+".";return c$18.reject(new t$Z(t))}))}Object.defineProperties(f$U.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},resource:{get:function(){return this._resource}},readyPromise:{get:function(){return this._readyPromise}}}),f$U.tileXYToQuadKey=function(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;e$1B(t,o)?e$1B(e,o)&&(a|=1):(a|=2,e$1B(e,o)||(a|=1)),n+=a}return n},f$U.quadKeyToTileXY=function(e){for(var t=0,i=0,n=e.length-1,r=n;r>=0;--r){var o=1<<r,a=+e[n-r];e$1B(a,2)?e$1B(a,1)||(t|=o):(i|=o,e$1B(a,1)&&(t|=o))}return{x:t,y:i,level:n}},f$U.prototype.isValid=function(e){var t=this.getTileInformationFromQuadKey(e);if(t$$(t))return null!==t;for(var i,n=!0,r=e;r.length>1;){if(i=r.substring(r.length-1),r=r.substring(0,r.length-1),t$$(t=this.getTileInformationFromQuadKey(r))){!t.hasSubtree()&&!t.hasChild(parseInt(i))&&(n=!1);break}if(null===t){n=!1;break}}return n};var _$R=new o$_("decodeGoogleEarthEnterprisePacket",Number.POSITIVE_INFINITY),v$S,y$P;function A$V(e,t,i){var n=e._tileInfo,r=t,o=n[r];if(t$$(o)&&(!o.hasSubtree()||o.hasChildren()))return o;for(;void 0===o&&r.length>1;)o=n[r=r.substring(0,r.length-1)];var a,s=e._subtreePromises,l=s[r];return t$$(l)?l.then((function(){return a=new r$V({throttle:i.throttle,throttleByServer:i.throttleByServer,type:i.type,priorityFunction:i.priorityFunction}),A$V(e,t,a)})):t$$(o)&&o.hasSubtree()?t$$(l=e.getQuadTreePacket(r,o.cnodeVersion,i))?(s[r]=l,l.then((function(){return a=new r$V({throttle:i.throttle,throttleByServer:i.throttleByServer,type:i.type,priorityFunction:i.priorityFunction}),A$V(e,t,a)})).always((function(){delete s[r]}))):void 0:c$18.reject(new t$Z("Couldn't load metadata for tile "+t))}function S$D(e,t,i,n){return e._resource.getDerivedResource({url:"flatfile?q2-0"+t+"-q."+i.toString(),request:n})}function M$Z(e){var t=e._resource.getDerivedResource({url:"dbRoot.v5",queryParameters:{output:"proto"}});if(!t$$(y$P)){var i=o$12("ThirdParty/google-earth-dbroot-parser.js"),n=window.cesiumGoogleEarthDbRootParser;y$P=d$18(i).then((function(){v$S=window.cesiumGoogleEarthDbRootParser(j$T),t$$(n)?window.cesiumGoogleEarthDbRootParser=n:delete window.cesiumGoogleEarthDbRootParser}))}return y$P.then((function(){return t.fetchArrayBuffer()})).then((function(t){var i=v$S.EncryptedDbRootProto.decode(new Uint8Array(t)),n=i.encryptionData,r=n.byteOffset,o=r+n.byteLength,a=e.key=n.buffer.slice(r,o);o=(r=(n=i.dbrootData).byteOffset)+n.byteLength;var s=n.buffer.slice(r,o);return _$R.scheduleTask({buffer:s,type:"DbRoot",key:a},[s])})).then((function(t){var i=v$S.DbRootProto.decode(new Uint8Array(t.buffer));if(e.imageryPresent=e$1Y(i.imageryPresent,e.imageryPresent),e.protoImagery=i.protoImagery,e.terrainPresent=e$1Y(i.terrainPresent,e.terrainPresent),t$$(i.endSnippet)&&t$$(i.endSnippet.model)){var n=i.endSnippet.model;e.negativeAltitudeExponentBias=e$1Y(n.negativeAltitudeExponentBias,e.negativeAltitudeExponentBias),e.negativeAltitudeThreshold=e$1Y(n.compressedNegativeAltitudeThreshold,e.negativeAltitudeThreshold)}t$$(i.databaseVersion)&&(e._quadPacketVersion=e$1Y(i.databaseVersion.quadtreeVersion,e._quadPacketVersion));for(var r=e.providers,o=e$1Y(i.providerInfo,[]),a=o.length,s=0;s<a;++s){var l=o[s],u=l.copyrightString;t$$(u)&&(r[l.providerId]=new i$17(u.value))}})).otherwise((function(){console.log("Failed to retrieve "+t.url+". Using defaults."),e.key=L$T}))}function _$Q(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),n$1e.typeOf.object("options.buffer",e.buffer),n$1e.typeOf.number("options.negativeAltitudeExponentBias",e.negativeAltitudeExponentBias),n$1e.typeOf.number("options.negativeElevationThreshold",e.negativeElevationThreshold),this._buffer=e.buffer,this._credits=e.credits,this._negativeAltitudeExponentBias=e.negativeAltitudeExponentBias,this._negativeElevationThreshold=e.negativeElevationThreshold;var t=e$1Y(e.childTileMask,15),i=3&t;i|=4&t?8:0,i|=8&t?4:0,this._childTileMask=i,this._createdByUpsampling=e$1Y(e.createdByUpsampling,!1),this._skirtHeight=void 0,this._bufferType=this._buffer.constructor,this._mesh=void 0,this._minimumHeight=void 0,this._maximumHeight=void 0}f$U.prototype.getQuadTreePacket=function(e,t,i){t=e$1Y(t,1);var n=S$D(this,e=e$1Y(e,""),t,i).fetchArrayBuffer();if(t$$(n)){var r=this._tileInfo,o=this.key;return n.then((function(t){return _$R.scheduleTask({buffer:t,quadKey:e,type:"Metadata",key:o},[t]).then((function(t){var i,n=-1;if(""!==e){n=e.length+1;var o=t[e];(i=r[e])._bits|=o._bits,delete t[e]}var a=Object.keys(t);a.sort((function(e,t){return e.length-t.length}));for(var s=a.length,l=0;l<s;++l){var u=a[l];if(null!==t[u]){var c=e$1g.clone(t[u]),h=u.length;if(h===n)c.setParent(i);else if(h>1){var d=r[u.substring(0,u.length-1)];c.setParent(d)}r[u]=c}else r[u]=null}}))}))}},f$U.prototype.populateSubtree=function(e,t,i,n){return A$V(this,f$U.tileXYToQuadKey(e,t,i),n)},f$U.prototype.getTileInformation=function(e,t,i){var n=f$U.tileXYToQuadKey(e,t,i);return this._tileInfo[n]},f$U.prototype.getTileInformationFromQuadKey=function(e){return this._tileInfo[e]},Object.defineProperties(_$Q.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var te$x=new o$_("createVerticesFromGoogleEarthEnterpriseBuffer"),F$P=new s$1p,U$R=new s$1p;_$Q.prototype.createMesh=function(e,t,i,n,r){n$1e.typeOf.object("tilingScheme",e),n$1e.typeOf.number("x",t),n$1e.typeOf.number("y",i),n$1e.typeOf.number("level",n);var o=e.ellipsoid;e.tileXYToNativeRectangle(t,i,n,F$P),e.tileXYToRectangle(t,i,n,U$R),r=e$1Y(r,1);var a=o.cartographicToCartesian(s$1p.center(U$R)),s=40075.16/(1<<n);this._skirtHeight=Math.min(8*s,1e3);var l=te$x.scheduleTask({buffer:this._buffer,nativeRectangle:F$P,rectangle:U$R,relativeToCenter:a,ellipsoid:o,skirtHeight:this._skirtHeight,exaggeration:r,includeWebMercatorT:!0,negativeAltitudeExponentBias:this._negativeAltitudeExponentBias,negativeElevationThreshold:this._negativeElevationThreshold});if(t$$(l)){var u=this;return l.then((function(e){return u._mesh=new B$R(a,new Float32Array(e.vertices),new Uint16Array(e.indices),e.indexCountWithoutSkirts,e.vertexCountWithoutSkirts,e.minimumHeight,e.maximumHeight,c$19.clone(e.boundingSphere3D),a$11.clone(e.occludeePointInScaledSpace),e.numberOfAttributes,b$1o.clone(e.orientedBoundingBox),u$13.clone(e.encoding),r,e.westIndicesSouthToNorth,e.southIndicesEastToWest,e.eastIndicesNorthToSouth,e.northIndicesWestToEast),u._minimumHeight=e.minimumHeight,u._maximumHeight=e.maximumHeight,u._buffer=void 0,u._mesh}))}},_$Q.prototype.interpolateHeight=function(e,t,i){var n=n$1d.clamp((t-e.west)/e.width,0,1),r=n$1d.clamp((i-e.south)/e.height,0,1);return t$$(this._mesh)?ae$z(this,n,r):ue$q(this,n,r,e)};var ie$A=new o$_("upsampleQuantizedTerrainMesh");_$Q.prototype.upsample=function(e,t,i,n,r,o,a){if(n$1e.typeOf.object("tilingScheme",e),n$1e.typeOf.number("thisX",t),n$1e.typeOf.number("thisY",i),n$1e.typeOf.number("thisLevel",n),n$1e.typeOf.number("descendantX",r),n$1e.typeOf.number("descendantY",o),n$1e.typeOf.number("descendantLevel",a),a-n>1)throw new t$_("Upsampling through more than one level at a time is not currently supported.");var s=this._mesh;if(t$$(this._mesh)){var l=2*t!==r,u=2*i===o,c=e.ellipsoid,h=e.tileXYToRectangle(r,o,a),d=ie$A.scheduleTask({vertices:s.vertices,indices:s.indices,indexCountWithoutSkirts:s.indexCountWithoutSkirts,vertexCountWithoutSkirts:s.vertexCountWithoutSkirts,encoding:s.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:l,isNorthChild:u,childRectangle:h,ellipsoid:c,exaggeration:s.exaggeration});if(t$$(d)){var f=this;return d.then((function(e){var t=new Uint16Array(e.vertices),i=fe$u.createTypedArray(t.length/3,e.indices),n=f._skirtHeight;return new k$11({quantizedVertices:t,indices:i,minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight,boundingSphere:c$19.clone(e.boundingSphere),orientedBoundingBox:b$1o.clone(e.orientedBoundingBox),horizonOcclusionPoint:a$11.clone(e.horizonOcclusionPoint),westIndices:e.westIndices,southIndices:e.southIndices,eastIndices:e.eastIndices,northIndices:e.northIndices,westSkirtHeight:n,southSkirtHeight:n,eastSkirtHeight:n,northSkirtHeight:n,childTileMask:0,createdByUpsampling:!0,credits:f._credits})}))}}},_$Q.prototype.isChildAvailable=function(e,t,i,n){n$1e.typeOf.number("thisX",e),n$1e.typeOf.number("thisY",t),n$1e.typeOf.number("childX",i),n$1e.typeOf.number("childY",n);var r=2;return i!==2*e&&++r,n!==2*t&&(r-=2),0!=(this._childTileMask&1<<r)},_$Q.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var re$A=new r$T,ne$w=new r$T,oe$v=new r$T,L$S=new a$11;function ae$z(e,t,i){for(var n=e._mesh,r=n.vertices,o=n.encoding,a=n.indices,s=0,l=a.length;s<l;s+=3){var u=a[s],c=a[s+1],h=a[s+2],d=o.decodeTextureCoordinates(r,u,re$A),f=o.decodeTextureCoordinates(r,c,ne$w),p=o.decodeTextureCoordinates(r,h,oe$v),_=c$W.computeBarycentricCoordinates(t,i,d.x,d.y,f.x,f.y,p.x,p.y,L$S);if(_.x>=-1e-15&&_.y>=-1e-15&&_.z>=-1e-15){var m=o.decodeHeight(r,u),$=o.decodeHeight(r,c),g=o.decodeHeight(r,h);return _.x*m+_.y*$+_.z*g}}}var se$u=Uint16Array.BYTES_PER_ELEMENT,X$F=Uint32Array.BYTES_PER_ELEMENT,Y$K=Int32Array.BYTES_PER_ELEMENT,he$r=Float32Array.BYTES_PER_ELEMENT,R$K=Float64Array.BYTES_PER_ELEMENT;function ue$q(e,t,i,n){var r=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(r),u=0,c=0;c<o;++c)u+=l.getUint32(u,!0),u+=X$F;u+=X$F,u+=2*R$K;var h=n$1d.toRadians(180*l.getFloat64(u,!0));u+=R$K;var d=n$1d.toRadians(180*l.getFloat64(u,!0));u+=R$K;var f=n.width/h/2,p=n.height/d/2,_=l.getInt32(u,!0);u+=Y$K;var m=3*l.getInt32(u,!0);u+=Y$K,u+=Y$K;var $,g=new Array(_),y=new Array(_),v=new Array(_);for($=0;$<_;++$)g[$]=a+l.getUint8(u++)*f,y[$]=s+l.getUint8(u++)*p,v[$]=6371010*l.getFloat32(u,!0),u+=he$r;var x=new Array(m);for($=0;$<m;++$)x[$]=l.getUint16(u,!0),u+=se$u;for($=0;$<m;$+=3){var b=x[$],S=x[$+1],w=x[$+2],C=g[b],T=g[S],P=g[w],E=y[b],A=y[S],L=y[w],M=c$W.computeBarycentricCoordinates(t,i,C,E,T,A,P,L,L$S);if(M.x>=-1e-15&&M.y>=-1e-15&&M.z>=-1e-15)return M.x*v[b]+M.y*v[S]+M.z*v[w]}}var f$T={UNKNOWN:0,NONE:1,SELF:2,PARENT:3},b$16=new o$10;function I$Y(){this._terrainCache={},this._lastTidy=o$10.now()}function E$P(e){if(!t$$((e=e$1Y(e,e$1Y.EMPTY_OBJECT)).url)&&!t$$(e.metadata))throw new t$_("options.url or options.metadata is required.");var t;if(t$$(e.metadata))t=e.metadata;else{var i=t$X.createIfNeeded(e.url);t=new f$U(i)}this._metadata=t,this._tilingScheme=new a$W({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new s$1p(-n$1d.PI,-n$1d.PI,n$1d.PI,n$1d.PI),ellipsoid:e.ellipsoid});var n=e.credit;"string"==typeof n&&(n=new i$17(n)),this._credit=n,this._levelZeroMaximumGeometricError=40075.16,this._terrainCache=new I$Y,this._terrainPromises={},this._terrainRequests={},this._errorEvent=new o$15,this._ready=!1;var r,o=this;this._readyPromise=t.readyPromise.then((function(e){if(!t.terrainPresent){var i=new t$Z("The server "+t.url+" doesn't have terrain");return r=c$_.handleError(r,o,o._errorEvent,i.message,void 0,void 0,void 0,i),c$18.reject(i)}return c$_.handleSuccess(r),o._ready=e,e})).otherwise((function(e){return r=c$_.handleError(r,o,o._errorEvent,e.message,void 0,void 0,void 0,e),c$18.reject(e)}))}I$Y.prototype.add=function(e,t){this._terrainCache[e]={buffer:t,timestamp:o$10.now()}},I$Y.prototype.get=function(e){var t=this._terrainCache[e];if(t$$(t))return delete this._terrainCache[e],t.buffer},I$Y.prototype.tidy=function(){if(o$10.now(b$16),o$10.secondsDifference(b$16,this._lastTidy)>10){for(var e=this._terrainCache,t=Object.keys(e),i=t.length,n=0;n<i;++n){var r=t[n],o=e[r];o$10.secondsDifference(b$16,o.timestamp)>10&&delete e[r]}o$10.clone(b$16,this._lastTidy)}},Object.defineProperties(E$P.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tilingScheme:{get:function(){if(!this._ready)throw new t$_("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});var z$G=new o$_("decodeGoogleEarthEnterprisePacket",Number.POSITIVE_INFINITY);function R$J(e,t,i){var n=t.getChildBitmask();if(t.terrainState===f$T.PARENT){n=0;for(var r=0;r<4;++r){var o=i.getTileInformationFromQuadKey(e+r.toString());t$$(o)&&o.hasTerrain()&&(n|=1<<r)}}return n}function $$M(e,t,i,n){return i=t$$(i)&&i>0?i:1,e._metadata.resource.getDerivedResource({url:"flatfile?f1c-0"+t+"-t."+i.toString(),request:n})}E$P.prototype.requestTileGeometry=function(e,t,i,n){if(!this._ready)throw new t$_("requestTileGeometry must not be called before the terrain provider is ready.");var r=f$U.tileXYToQuadKey(e,t,i),o=this._terrainCache,a=this._metadata,s=a.getTileInformationFromQuadKey(r);if(!t$$(s))return c$18.reject(new t$Z("Terrain tile doesn't exist"));var l=s.terrainState;t$$(l)||(l=s.terrainState=f$T.UNKNOWN);var u=o.get(r);if(t$$(u)){var c=a.providers[s.terrainProvider];return c$18.resolve(new _$Q({buffer:u,childTileMask:R$J(r,s,a),credits:t$$(c)?[c]:void 0,negativeAltitudeExponentBias:a.negativeAltitudeExponentBias,negativeElevationThreshold:a.negativeAltitudeThreshold}))}if(o.tidy(),!s.ancestorHasTerrain)return c$18.resolve(new M$1a({buffer:new Uint8Array(256),width:16,height:16}));if(l===f$T.NONE)return c$18.reject(new t$Z("Terrain tile doesn't exist"));var h,d=r,f=-1;switch(l){case f$T.SELF:f=s.terrainVersion;break;case f$T.PARENT:d=d.substring(0,d.length-1),f=(h=a.getTileInformationFromQuadKey(d)).terrainVersion;break;case f$T.UNKNOWN:s.hasTerrain()?f=s.terrainVersion:(d=d.substring(0,d.length-1),t$$(h=a.getTileInformationFromQuadKey(d))&&h.hasTerrain()&&(f=h.terrainVersion))}if(f<0)return c$18.reject(new t$Z("Terrain tile doesn't exist"));var p,_,m=this._terrainPromises,$=this._terrainRequests;if(t$$(m[d]))p=m[d],_=$[d];else{var g=$$M(this,d,f,_=n).fetchArrayBuffer();if(!t$$(g))return;p=g.then((function(e){return t$$(e)?z$G.scheduleTask({buffer:e,type:"Terrain",key:a.key},[e]).then((function(e){var t=a.getTileInformationFromQuadKey(d);t.terrainState=f$T.SELF,o.add(d,e[0]);for(var i=t.terrainProvider,n=e.length-1,r=0;r<n;++r){var s=d+r.toString(),l=a.getTileInformationFromQuadKey(s);t$$(l)&&(o.add(s,e[r+1]),l.terrainState=f$T.PARENT,0===l.terrainProvider&&(l.terrainProvider=i))}})):c$18.reject(new t$Z("Failed to load terrain."))})),m[d]=p,$[d]=_,p=p.always((function(){delete m[d],delete $[d]}))}return p.then((function(){var e=o.get(r);if(t$$(e)){var t=a.providers[s.terrainProvider];return new _$Q({buffer:e,childTileMask:R$J(r,s,a),credits:t$$(t)?[t]:void 0,negativeAltitudeExponentBias:a.negativeAltitudeExponentBias,negativeElevationThreshold:a.negativeAltitudeThreshold})}return c$18.reject(new t$Z("Failed to load terrain."))})).otherwise((function(e){return _.state===Y$_.CANCELLED?(n.state=_.state,c$18.reject(e)):(s.terrainState=f$T.NONE,c$18.reject(e))}))},E$P.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},E$P.prototype.getTileDataAvailable=function(e,t,i){var n=this._metadata,r=f$U.tileXYToQuadKey(e,t,i),o=n.getTileInformation(e,t,i);if(null===o)return!1;if(t$$(o)){if(!o.ancestorHasTerrain)return!0;var a=o.terrainState;if(a===f$T.NONE)return!1;if(!(t$$(a)&&a!==f$T.UNKNOWN||(o.terrainState=f$T.UNKNOWN,o.hasTerrain()))){r=r.substring(0,r.length-1);var s=n.getTileInformationFromQuadKey(r);if(!t$$(s)||!s.hasTerrain())return!1}return!0}if(n.isValid(r)){var l=new r$V({throttle:!0,throttleByServer:!0,type:V$_.TERRAIN});n.populateSubtree(e,t,i,l)}return!1},E$P.prototype.loadTileDataAvailability=function(e,t,i){};var Ve$i=[s$1q,e$1H],Qr$2=Ve$i.length,fr$4=Math.cos(n$1d.toRadians(30)),hr$3=Math.cos(n$1d.toRadians(150)),wr$1=0,gr$1=1e3;function ee$x(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).positions;if(!t$$(t)||t.length<2)throw new t$_("At least two positions are required.");if(t$$(e.arcType)&&e.arcType!==m$_.GEODESIC&&e.arcType!==m$_.RHUMB)throw new t$_("Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB.");this.width=e$1Y(e.width,1),this._positions=t,this.granularity=e$1Y(e.granularity,9999),this.loop=e$1Y(e.loop,!1),this.arcType=e$1Y(e.arcType,m$_.GEODESIC),this._ellipsoid=e$1Y(e.ellipsoid,n$1c.WGS84),this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(ee$x.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+n$1c.packedLength+1+1}}}),ee$x.setProjectionAndEllipsoid=function(e,t){for(var i=0,n=0;n<Qr$2;n++)if(t instanceof Ve$i[n]){i=n;break}e._projectionIndex=i,e._ellipsoid=t.ellipsoid};var Kr$2=new a$11,yr$2=new a$11,vr$4=new a$11;function Re$i(e,t,i,n,r){var o=C$O(n,e,0,Kr$2),a=C$O(n,e,i,yr$2),s=C$O(n,t,0,vr$4),l=F$O(a,o,yr$2),u=F$O(s,o,vr$4);return a$11.cross(u,l,r),a$11.normalize(r,r)}var $r$2=new i$1g,ea$1=new a$11,ra$1=new a$11,aa$1=new a$11;function Ze$a(e,t,i,n,r,o,a,s,l,u,c){if(0!==r){var h;o===m$_.GEODESIC?h=new D$Y(e,t,a):o===m$_.RHUMB&&(h=new M$1c(e,t,a));var d=h.surfaceDistance;if(!(d<r))for(var f=Re$i(e,t,n,a,aa$1),p=Math.ceil(d/r),_=d/p,m=_,$=p-1,g=s.length,y=0;y<$;y++){var v=h.interpolateUsingSurfaceDistance(m,$r$2),x=C$O(a,v,i,ea$1),b=C$O(a,v,n,ra$1);a$11.pack(f,s,g),a$11.pack(x,l,g),a$11.pack(b,u,g),c.push(v.latitude),c.push(v.longitude),g+=3,m+=_}}}var Ge$e=new i$1g;function C$O(e,t,i,n){return i$1g.clone(t,Ge$e),Ge$e.height=i,i$1g.toCartesian(Ge$e,e,n)}function F$O(e,t,i){return a$11.subtract(e,t,i),a$11.normalize(i,i),i}ee$x.pack=function(e,t,i){n$1e.typeOf.object("value",e),n$1e.defined("array",t);var n=e$1Y(i,0),r=e._positions,o=r.length;t[n++]=o;for(var a=0;a<o;++a){var s=r[a];a$11.pack(s,t,n),n+=3}return t[n++]=e.granularity,t[n++]=e.loop?1:0,t[n++]=e.arcType,n$1c.pack(e._ellipsoid,t,n),n+=n$1c.packedLength,t[n++]=e._projectionIndex,t[n++]=e._scene3DOnly?1:0,t},ee$x.unpack=function(e,t,i){n$1e.defined("array",e);for(var n=e$1Y(t,0),r=e[n++],o=new Array(r),a=0;a<r;a++)o[a]=a$11.unpack(e,n),n+=3;var s=e[n++],l=1===e[n++],u=e[n++],c=n$1c.unpack(e,n);n+=n$1c.packedLength;var h=e[n++],d=1===e[n++];if(!t$$(i)){var f=new ee$x({positions:o,granularity:s,loop:l,arcType:u,ellipsoid:c});return f._projectionIndex=h,f._scene3DOnly=d,f}return i._positions=o,i.granularity=s,i.loop=l,i.arcType=u,i._ellipsoid=c,i._projectionIndex=h,i._scene3DOnly=d,i};var na$1=new a$11,ia$1=new a$11,ta$1=new a$11,oa$1=new a$11,la$1=new n$17(a$11.UNIT_X,0),Er$2=new a$11,pa$2=0;function Je$9(e,t,i,n,r){var o=F$O(i,t,Er$2),a=F$O(e,t,na$1),s=F$O(n,t,ia$1),l=a$11.cross(o,a,oa$1);l=a$11.normalize(l,l);var u=n$17.fromPointNormal(t,l,la$1),c=n$17.getPointDistance(u,n);if(n$1d.equalsEpsilon(c,0,n$1d.EPSILON7))return a$11.clone(l,r),r;r=a$11.add(s,a,r),r=a$11.normalize(r,r);var h=a$11.cross(o,r,ta$1);return a$11.normalize(h,h),a$11.cross(h,o,r),a$11.normalize(r,r),a$11.dot(s,h)<pa$2&&(r=a$11.negate(r,r)),r}var Oe$m=n$17.fromPointNormal(a$11.ZERO,a$11.UNIT_Y),sa$1=new a$11,ca$2=new a$11,ua$2=new a$11,da$1=new a$11,ma$2=new a$11,Se$g=new a$11,Ce$o=new i$1g,Ir$2=new i$1g,kr$3=new i$1g;ee$x.createGeometry=function(e){var t,i,n=!e._scene3DOnly,r=e.loop,o=e._ellipsoid,a=e.granularity,s=e.arcType,l=new Ve$i[e._projectionIndex](o),u=wr$1,c=gr$1,h=e._positions,d=h.length;2===d&&(r=!1);var f,p,_,m,$,g,y,v=new M$1c(void 0,void 0,o),x=[h[0]];for(i=0;i<d-1;i++)f=h[i],p=h[i+1],t$$($=h$1b.lineSegmentPlane(f,p,Oe$m,Se$g))&&!a$11.equalsEpsilon($,f,n$1d.EPSILON7)&&!a$11.equalsEpsilon($,p,n$1d.EPSILON7)&&(e.arcType===m$_.GEODESIC?x.push(a$11.clone($)):e.arcType===m$_.RHUMB&&(y=o.cartesianToCartographic($,Ce$o).longitude,_=o.cartesianToCartographic(f,Ce$o),m=o.cartesianToCartographic(p,Ir$2),v.setEndPoints(_,m),g=v.findIntersectionWithLongitude(y,kr$3),t$$($=o.cartographicToCartesian(g,Se$g))&&!a$11.equalsEpsilon($,f,n$1d.EPSILON7)&&!a$11.equalsEpsilon($,p,n$1d.EPSILON7)&&x.push(a$11.clone($)))),x.push(p);r&&(f=h[d-1],p=h[0],t$$($=h$1b.lineSegmentPlane(f,p,Oe$m,Se$g))&&!a$11.equalsEpsilon($,f,n$1d.EPSILON7)&&!a$11.equalsEpsilon($,p,n$1d.EPSILON7)&&(e.arcType===m$_.GEODESIC?x.push(a$11.clone($)):e.arcType===m$_.RHUMB&&(y=o.cartesianToCartographic($,Ce$o).longitude,_=o.cartesianToCartographic(f,Ce$o),m=o.cartesianToCartographic(p,Ir$2),v.setEndPoints(_,m),g=v.findIntersectionWithLongitude(y,kr$3),t$$($=o.cartographicToCartesian(g,Se$g))&&!a$11.equalsEpsilon($,f,n$1d.EPSILON7)&&!a$11.equalsEpsilon($,p,n$1d.EPSILON7)&&x.push(a$11.clone($)))));var b=x.length,S=new Array(b);for(i=0;i<b;i++){var w=i$1g.fromCartesian(x[i],o);w.height=0,S[i]=w}if(!((b=(S=u$11(S,i$1g.equalsEpsilon)).length)<2)){var C=[],T=[],P=[],E=[],A=sa$1,L=ca$2,M=ua$2,I=da$1,O=ma$2,D=S[0],R=S[1];for(A=C$O(o,S[b-1],u,A),I=C$O(o,R,u,I),L=C$O(o,D,u,L),M=C$O(o,D,c,M),O=r?Je$9(A,L,M,I,O):Re$i(D,R,c,o,O),a$11.pack(O,T,0),a$11.pack(L,P,0),a$11.pack(M,E,0),C.push(D.latitude),C.push(D.longitude),Ze$a(D,R,u,c,a,s,o,T,P,E,C),i=1;i<b-1;++i){A=a$11.clone(L,A),L=a$11.clone(I,L);var N=S[i];C$O(o,N,c,M),C$O(o,S[i+1],u,I),Je$9(A,L,M,I,O),t=T.length,a$11.pack(O,T,t),a$11.pack(L,P,t),a$11.pack(M,E,t),C.push(N.latitude),C.push(N.longitude),Ze$a(S[i],S[i+1],u,c,a,s,o,T,P,E,C)}var F=S[b-1],B=S[b-2];if(L=C$O(o,F,u,L),M=C$O(o,F,c,M),r){var z=S[0];O=Je$9(A=C$O(o,B,u,A),L,M,I=C$O(o,z,u,I),O)}else O=Re$i(B,F,c,o,O);if(t=T.length,a$11.pack(O,T,t),a$11.pack(L,P,t),a$11.pack(M,E,t),C.push(F.latitude),C.push(F.longitude),r){for(Ze$a(F,D,u,c,a,s,o,T,P,E,C),t=T.length,i=0;i<3;++i)T[t+i]=T[i],P[t+i]=P[i],E[t+i]=E[i];C.push(D.latitude),C.push(D.longitude)}return Ba$2(r,l,P,E,T,C,n)}};var fa$2=new a$11,ha$1=new r$W,wa$1=new a$U;function Tr$2(e,t,i,n){var r=F$O(i,t,fa$2),o=a$11.dot(r,e);if(o>fr$4||o<hr$3){var a=F$O(n,i,Er$2),s=o<hr$3?n$1d.PI_OVER_TWO:-n$1d.PI_OVER_TWO,l=a$U.fromAxisAngle(a,s,wa$1),u=r$W.fromQuaternion(l,ha$1);return r$W.multiplyByVector(u,e,e),!0}return!1}var Pr$2=new i$1g,ga$2=new a$11,_r$3=new a$11;function Ee$o(e,t,i,n,r){var o=i$1g.toCartesian(t,e._ellipsoid,ga$2),a=a$11.add(o,i,_r$3),s=!1,l=e._ellipsoid,u=l.cartesianToCartographic(a,Pr$2);Math.abs(t.longitude-u.longitude)>n$1d.PI_OVER_TWO&&(s=!0,a=a$11.subtract(o,i,_r$3),u=l.cartesianToCartographic(a,Pr$2)),u.height=0;var c=e.project(u,r);return(r=a$11.subtract(c,n,r)).z=0,r=a$11.normalize(r,r),s&&a$11.negate(r,r),r}var ya$1=new a$11,Ar$2=new a$11;function Nr$3(e,t,i,n,r,o){var a=a$11.subtract(t,e,ya$1);a$11.normalize(a,a);var s=i-wr$1,l=a$11.multiplyByScalar(a,s,Ar$2);a$11.add(e,l,r);var u=n-gr$1;l=a$11.multiplyByScalar(a,u,Ar$2),a$11.add(t,l,o)}var va$1=new a$11;function xe$v(e,t){var i=n$17.getPointDistance(Oe$m,e),n=n$17.getPointDistance(Oe$m,t),r=va$1;n$1d.equalsEpsilon(i,0,n$1d.EPSILON2)?(r=F$O(t,e,r),a$11.multiplyByScalar(r,n$1d.EPSILON2,r),a$11.add(e,r,e)):n$1d.equalsEpsilon(n,0,n$1d.EPSILON2)&&(r=F$O(e,t,r),a$11.multiplyByScalar(r,n$1d.EPSILON2,r),a$11.add(t,r,t))}function Ea$2(e,t){var i=Math.abs(e.longitude),n=Math.abs(t.longitude);if(n$1d.equalsEpsilon(i,n$1d.PI,n$1d.EPSILON11)){var r=n$1d.sign(t.longitude);return e.longitude=r*(i-n$1d.EPSILON11),1}if(n$1d.equalsEpsilon(n,n$1d.PI,n$1d.EPSILON11)){var o=n$1d.sign(e.longitude);return t.longitude=o*(n-n$1d.EPSILON11),2}return 0}var Or$4=new i$1g,Sr$1=new i$1g,Cr$1=new a$11,We$k=new a$11,xr$2=new a$11,Lr$1=new a$11,Ia$3=new a$11,br$2=new a$11,ka$2=[Or$4,Sr$1],Ta$2=new s$1p,Pa$1=new a$11,_a$2=new a$11,Aa$2=new a$11,Na$2=new a$11,Oa$2=new a$11,Sa$2=new a$11,Ye$f=new a$11,Xe$c=new a$11,Ca$2=new a$11,xa$2=new a$11,La$2=new a$11,zr$1=new a$11,ba$2=new a$11,za$2=new a$11,Ma$2=new t$R,ja$1=new t$R,Mr=new a$11,Da$2=new a$11,jr$1=new a$11,qa$1=[new c$19,new c$19],Dr$3=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],qr$1=Dr$3.length;function Ba$2(e,t,i,n,r,o,a){var s,l,u,c,h,d,f=t._ellipsoid,p=i.length/3-1,_=8*p,m=4*_,$=36*p,g=_>65535?new Uint32Array($):new Uint16Array($),y=new Float64Array(3*_),v=new Float32Array(m),x=new Float32Array(m),b=new Float32Array(m),S=new Float32Array(m),w=new Float32Array(m);a&&(u=new Float32Array(m),c=new Float32Array(m),h=new Float32Array(m),d=new Float32Array(2*_));var C=o.length/2,T=0,P=Or$4;P.height=0;var E=Sr$1;E.height=0;var A=Cr$1,L=We$k;if(a)for(l=0,s=1;s<C;s++)P.latitude=o[l],P.longitude=o[l+1],E.latitude=o[l+2],E.longitude=o[l+3],A=t.project(P,A),L=t.project(E,L),T+=a$11.distance(A,L),l+=2;var M=n.length/3;L=a$11.unpack(n,0,L);var I,O=0;for(l=3,s=1;s<M;s++)A=a$11.clone(L,A),L=a$11.unpack(n,l,L),O+=a$11.distance(A,L),l+=3;l=3;var D=0,R=0,N=0,F=0,B=!1,z=a$11.unpack(i,0,Lr$1),G=a$11.unpack(n,0,We$k),k=a$11.unpack(r,0,br$2);e&&(Tr$2(k,a$11.unpack(i,i.length-6,xr$2),z,G)&&(k=a$11.negate(k,k)));var U=0,V=0,W=0;for(s=0;s<p;s++){var H,Y,j,q,X=a$11.clone(z,xr$2),K=a$11.clone(G,Cr$1),Z=a$11.clone(k,Ia$3);if(B&&(Z=a$11.negate(Z,Z)),z=a$11.unpack(i,l,Lr$1),G=a$11.unpack(n,l,We$k),B=Tr$2(k=a$11.unpack(r,l,br$2),X,z,G),P.latitude=o[D],P.longitude=o[D+1],E.latitude=o[D+2],E.longitude=o[D+3],a){var J=Ea$2(P,E);H=t.project(P,Oa$2);var Q=F$O(Y=t.project(E,Sa$2),H,Mr);Q.y=Math.abs(Q.y),j=Ye$f,q=Xe$c,0===J||a$11.dot(Q,a$11.UNIT_Y)>fr$4?(j=Ee$o(t,P,Z,H,Ye$f),q=Ee$o(t,E,k,Y,Xe$c)):1===J?(q=Ee$o(t,E,k,Y,Xe$c),j.x=0,j.y=n$1d.sign(P.longitude-Math.abs(E.longitude)),j.z=0):(j=Ee$o(t,P,Z,H,Ye$f),q.x=0,q.y=n$1d.sign(P.longitude-E.longitude),q.z=0)}var ee=a$11.distance(K,G),te=t$R.fromCartesian(X,Ma$2),ie=a$11.subtract(z,X,Ca$2),ne=a$11.normalize(ie,zr$1),re=a$11.subtract(K,X,xa$2);re=a$11.normalize(re,re);var oe=a$11.cross(ne,re,zr$1);oe=a$11.normalize(oe,oe);var ae=a$11.cross(re,Z,ba$2);ae=a$11.normalize(ae,ae);var se=a$11.subtract(G,z,La$2);se=a$11.normalize(se,se);var le=a$11.cross(k,se,za$2);le=a$11.normalize(le,le);var ue,ce,he,de=ee/O,fe=U/O,pe=0,_e=0,me=0;if(a){pe=a$11.distance(H,Y),ue=t$R.fromCartesian(H,ja$1),ce=a$11.subtract(Y,H,Mr);var $e=(he=a$11.normalize(ce,Da$2)).x;he.x=he.y,he.y=-$e,_e=pe/T,me=V/T}for(I=0;I<8;I++){var ge=F+4*I,ye=R+2*I,ve=ge+3,xe=I<4?1:-1,be=2===I||3===I||6===I||7===I?1:-1;a$11.pack(te.high,v,ge),v[ve]=ie.x,a$11.pack(te.low,x,ge),x[ve]=ie.y,a$11.pack(ae,b,ge),b[ve]=ie.z,a$11.pack(le,S,ge),S[ve]=de*xe,a$11.pack(oe,w,ge);var Se=fe*be;0===Se&&be<0&&(Se=Number.POSITIVE_INFINITY),w[ve]=Se,a&&(u[ge]=ue.high.x,u[ge+1]=ue.high.y,u[ge+2]=ue.low.x,u[ge+3]=ue.low.y,h[ge]=-j.y,h[ge+1]=j.x,h[ge+2]=q.y,h[ge+3]=-q.x,c[ge]=ce.x,c[ge+1]=ce.y,c[ge+2]=he.x,c[ge+3]=he.y,d[ye]=_e*xe,0===(Se=me*be)&&be<0&&(Se=Number.POSITIVE_INFINITY),d[ye+1]=Se)}var we=Aa$2,Ce=Na$2,Te=Pa$1,Pe=_a$2,Ee=s$1p.fromCartographicArray(ka$2,Ta$2),Ae=e$1P.getMinimumMaximumHeights(Ee,f),Le=Ae.minimumTerrainHeight,Me=Ae.maximumTerrainHeight;W+=Le,W+=Me,Nr$3(X,K,Le,Me,we,Te),Nr$3(z,G,Le,Me,Ce,Pe);var Ie=a$11.multiplyByScalar(oe,n$1d.EPSILON5,jr$1);a$11.add(we,Ie,we),a$11.add(Ce,Ie,Ce),a$11.add(Te,Ie,Te),a$11.add(Pe,Ie,Pe),xe$v(we,Ce),xe$v(Te,Pe),a$11.pack(we,y,N),a$11.pack(Ce,y,N+3),a$11.pack(Pe,y,N+6),a$11.pack(Te,y,N+9),Ie=a$11.multiplyByScalar(oe,-2*n$1d.EPSILON5,jr$1),a$11.add(we,Ie,we),a$11.add(Ce,Ie,Ce),a$11.add(Te,Ie,Te),a$11.add(Pe,Ie,Pe),xe$v(we,Ce),xe$v(Te,Pe),a$11.pack(we,y,N+12),a$11.pack(Ce,y,N+15),a$11.pack(Pe,y,N+18),a$11.pack(Te,y,N+21),D+=2,l+=3,R+=16,N+=24,F+=32,U+=ee,V+=pe}l=0;var Oe=0;for(s=0;s<p;s++){for(I=0;I<qr$1;I++)g[l+I]=Dr$3[I]+Oe;Oe+=8,l+=qr$1}var De=qa$1;c$19.fromVertices(i,a$11.ZERO,3,De[0]),c$19.fromVertices(n,a$11.ZERO,3,De[1]);var Re=c$19.fromBoundingSpheres(De);Re.radius+=W/(2*p);var Ne={position:new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,normalize:!1,values:y}),startHiAndForwardOffsetX:re$z(v),startLoAndForwardOffsetY:re$z(x),startNormalAndForwardOffsetZ:re$z(b),endNormalAndTextureCoordinateNormalizationX:re$z(S),rightNormalAndTextureCoordinateNormalizationY:re$z(w)};return a&&(Ne.startHiLo2D=re$z(u),Ne.offsetAndRight2D=re$z(c),Ne.startEndNormals2D=re$z(h),Ne.texcoordNormalization2D=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:2,normalize:!1,values:d})),new T$11({attributes:Ne,indices:g,boundingSphere:Re})}function re$z(e){return new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}function h$V(e,t,i){this.heading=e$1Y(e,0),this.pitch=e$1Y(t,0),this.range=e$1Y(i,0)}ee$x._projectNormal=Ee$o,h$V.clone=function(e,t){if(t$$(e))return t$$(t)||(t=new h$V),t.heading=e.heading,t.pitch=e.pitch,t.range=e.range,t};var P$J=n$1d.factorial;function x$S(e,t,i,n,r,o){var a,s,l,u=0;if(n>0){for(s=0;s<r;s++){for(a=!1,l=0;l<o.length&&!a;l++)s===o[l]&&(a=!0);a||(o.push(s),u+=x$S(e,t,i,n-1,r,o),o.splice(o.length-1,1))}return u}for(u=1,s=0;s<r;s++){for(a=!1,l=0;l<o.length&&!a;l++)s===o[l]&&(a=!0);a||(u*=e-i[t[s]])}return u}var Z$S={type:"Hermite",getRequiredDataPoints:function(e,t){if(t=e$1Y(t,0),!t$$(e))throw new t$_("degree is required.");if(e<0)throw new t$_("degree must be 0 or greater.");if(t<0)throw new t$_("inputOrder must be 0 or greater.");return Math.max(Math.floor((e+1)/(t+1)),2)},interpolateOrderZero:function(e,t,i,n,r){t$$(r)||(r=new Array(n));var o,a,s,l,u,c=t.length,h=new Array(n);for(o=0;o<n;o++){r[o]=0;var d=new Array(c);for(h[o]=d,a=0;a<c;a++)d[a]=[]}var f=c,p=new Array(f);for(o=0;o<f;o++)p[o]=o;var _=c-1;for(l=0;l<n;l++){for(a=0;a<f;a++)u=p[a]*n+l,h[l][0].push(i[u]);for(o=1;o<f;o++){var m=!1;for(a=0;a<f-o;a++){var $,g=t[p[a]],y=t[p[a+o]];y-g<=0?($=i[u=p[a]*n+n*o+l],h[l][o].push($/P$J(o))):($=h[l][o-1][a+1]-h[l][o-1][a],h[l][o].push($/(y-g))),m=m||0!==$}m||(_=o-1)}}for(s=0,0;s<=0;s++)for(o=s;o<=_;o++){var v=x$S(e,p,t,s,o,[]);for(l=0;l<n;l++){var x=h[l][o][0];r[l+s*n]+=x*v}}return r}},Q$Q=[];function U$Q(e,t,i,n,r,o){for(var a,s,l=-1,u=t.length,c=u*(u+1)/2,h=0;h<r;h++){var d=Math.floor(h*c);for(a=0;a<u;a++)s=t[a]*r*(o+1)+h,e[d+a]=n[s];for(var f=1;f<u;f++){var p=0,_=Math.floor(f*(1-f)/2)+u*f,m=!1;for(a=0;a<u-f;a++){var $,g,y=i[t[a]],v=i[t[a+f]];if(v-y<=0)g=($=n[s=t[a]*r*(o+1)+r*f+h])/n$1d.factorial(f),e[d+_+p]=g,p++;else{var x=Math.floor((f-1)*(2-f)/2)+u*(f-1);g=($=e[d+x+a+1]-e[d+x+a])/(v-y),e[d+_+p]=g,p++}m=m||0!==$}m&&(l=Math.max(l,f))}}return l}Z$S.interpolate=function(e,t,i,n,r,o,a){var s=n*(o+1);t$$(a)||(a=new Array(s));for(var l=0;l<s;l++)a[l]=0;var u,c=t.length,h=new Array(c*(r+1));for(u=0;u<c;u++)for(var d=0;d<r+1;d++)h[u*(r+1)+d]=u;for(var f=h.length,p=Q$Q,_=U$Q(p,h,t,i,n,r),m=[],$=f*(f+1)/2,g=Math.min(_,o),y=0;y<=g;y++)for(u=y;u<=_;u++){m.length=0;for(var v=x$S(e,h,t,y,u,m),x=Math.floor(u*(1-u)/2)+f*u,b=0;b<n;b++){var S=p[Math.floor(b*$)+x];a[b+y*n]+=S*v}}return a};var e$1f={DisplayMode:{NONE:0,FACE:1,LINE:2,FACE_AND_LINE:3},AnalysisRegionMode:{ARM_NONE:0,ARM_ALL:1,ARM_REGION:2},FilterMode:{LINEAR:0,NEAREST:1}},J$O=Object.freeze(e$1f);function _$P(){this._maxVisibleValue=17976931348623157e292,this._minVisibleValue=-17976931348623157e292,this._floor=0,this._ceiling=0,this._opacity=1,this._updateColorDictTable=!1,this._coverageArea=[],this._linesInterval=100,this._updatePolygon=!0,this._lineColor=new e$1z(0,1,1,1),this._displayMode=J$O.DisplayMode.FACE,this._dictColorTable=void 0,this._emissionTextureUrl="",this._emissionTextureChanged=!1,this._emissionTexCoordSpeed=new a$11(0,0),this._emissionTexCoordScale=new a$11(50,50),this._emissionTextureArray=[],this._loadedEmissionTexture=0,this._noValueColor=new e$1z(1,1,1,1),this._textureFilterMode=J$O.FilterMode.LINEAR,this._visibleDistanceMax=Number.MAX_VALUE,this._visibleDistanceMin=0,this._minVisibleAltitude=0,this._maxVisibleAltitude=Number.MAX_VALUE}_$P.prototype.destroy=function(){this._coverageArea.length=0,t$$(this._dictColorTable)&&this._dictColorTable.destroy()},Object.defineProperties(_$P.prototype,{MinVisibleValue:{get:function(){return this._minVisibleValue},set:function(e){this._minVisibleValue=e}},MaxVisibleValue:{get:function(){return this._maxVisibleValue},set:function(e){this._maxVisibleValue=e}},ColorTableMaxKey:{get:function(){return this._ceiling},set:function(e){this._ceiling=e}},ColorTableMinKey:{get:function(){return this._floor},set:function(e){this._floor=e}},ColorTable:{get:function(){return this._dictColorTable},set:function(e){if(t$$(e)){this._dictColorTable=o$T.clone(e,this._dictColorTable),this._updateColorDictTable=!0;var t=this._dictColorTable.count();if(!(t<1)){new e$1z;var i=0,n=0,r=this._dictColorTable.getItem(0);t$$(r)&&t$$(r.altitude)&&(i=parseFloat(r.altitude)),t$$(r=this._dictColorTable.getItem(t-1))&&t$$(r.altitude)&&(n=parseFloat(r.altitude)),this._ceiling=Math.max(i,n),this._floor=Math.min(i,n)}}else t$$(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null)}},Opacity:{get:function(){return this._opacity},set:function(e){this._opacity=e}},CoverageArea:{get:function(){return this._coverageArea},set:function(e){if(this._updatePolygon=!0,this._coverageArea.length=0,t$$(e))for(var t=0;t<e.length;t++)this._coverageArea[t]=e[t]}},DisplayMode:{get:function(){return this._displayMode},set:function(e){this._displayMode=e}},LineColor:{get:function(){return this._lineColor},set:function(e){e$1z.clone(e,this._lineColor)}},LineInterval:{get:function(){return this._linesInterval},set:function(e){this._linesInterval=e}},UpdateColorDictTable:{get:function(){return this._updateColorDictTable},set:function(e){this._updateColorDictTable=e}},UpdatePolygonRegion:{get:function(){return this._updatePolygon},set:function(e){this._updatePolygon=e}},emissionTextureUrl:{get:function(){return this._emissionTextureUrl},set:function(e){this._emissionTextureUrl=e,this._emissionTextureArray=[];var t={url:e,USpeed:this._emissionTexCoordSpeed.x,VSpeed:this._emissionTexCoordSpeed.y,UTiling:this._emissionTexCoordScale.x,VTiling:this._emissionTexCoordScale.y};this._emissionTextureArray.push(t),this._emissionTextureChanged=!0,this._loadedEmissionTexture=0}},emissionTexCoordUSpeed:{get:function(){return this._emissionTexCoordSpeed.x},set:function(e){t$$(this._emissionTextureArray)&&this._emissionTextureArray.length>0&&(this._emissionTextureArray[0].USpeed=e),this._emissionTexCoordSpeed.x=e}},emissionTexCoordVSpeed:{get:function(){return this._emissionTexCoordSpeed.y},set:function(e){t$$(this._emissionTextureArray)&&this._emissionTextureArray.length>0&&(this._emissionTextureArray[0].VSpeed=e),this._emissionTexCoordSpeed.y=e}},emissionTexCoordScale:{get:function(){return this._emissionTexCoordScale},set:function(e){t$$(this._emissionTextureArray)&&this._emissionTextureArray.length>0&&(this._emissionTextureArray[0].UTiling=e.x,this._emissionTextureArray[0].VTiling=e.y),this._emissionTexCoordScale=e}},emissionTextureArray:{get:function(){return this._emissionTextureArray},set:function(e){this._emissionTextureArray=e,this._emissionTextureChanged=!0,this._loadedEmissionTexture=0}},noValueColor:{get:function(){return this._noValueColor},set:function(e){!t$$(e)||(this._noValueColor=e$1z.clone(e,this._noValueColor))}},filterMode:{get:function(){return this._textureFilterMode},set:function(e){this._textureFilterMode=e}},visibleDistanceMax:{get:function(){return this._visibleDistanceMax},set:function(e){this._visibleDistanceMax=e}},visibleDistanceMin:{get:function(){return this._visibleDistanceMin},set:function(e){this._visibleDistanceMin=e}},minVisibleAltitude:{get:function(){return this._minVisibleAltitude},set:function(e){this._minVisibleAltitude=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){this._maxVisibleAltitude=e}}}),_$P.clone=function(e,t){if(t$$(e)){t$$(t)||(t=new _$P),t._maxVisibleValue=e._maxVisibleValue,t._minVisibleValue=e._minVisibleValue,t._floor=e._floor,t._ceiling=e._ceiling,t._opacity=e._opacity,t._updateColorDictTable=e._updateColorDictTable,t._linesInterval=e._linesInterval,t._updatePolygon=e._updatePolygon,t._displayMode=e._displayMode,t._lineColor=e$1z.clone(e._lineColor,t._lineColor),t._dictColorTable=o$T.clone(e._dictColorTable,t._dictColorTable),t._emissionTexCoordSpeed=a$11.clone(e._emissionTexCoordSpeed,t._emissionTexCoordSpeed),t._emissionTexCoordScale=a$11.clone(e._emissionTexCoordScale,t._emissionTexCoordScale),t._emissionTextureUrl=e._emissionTextureUrl,t._emissionTextureArray=e._emissionTextureArray,t._loadedEmissionTexture=e._loadedEmissionTexture,t._noValueColor=e$1z.clone(e._noValueColor,t._noValueColor),t._coverageArea.length=0;for(var i=0;i<e._coverageArea.length;i++)t._coverageArea[i]=e._coverageArea[i];return t._textureFilterMode=e._textureFilterMode,t._visibleDistanceMax=e._visibleDistanceMax,t._visibleDistanceMin=e._visibleDistanceMin,t._maxVisibleAltitude=e._maxVisibleAltitude,t._minVisibleAltitude=e._minVisibleAltitude,t}};var r$F=[];_$P.prototype._getEmissionAtlasTextureRects=function(){var e=this._emissionTextureAtlas;if(!t$$(e))return r$F;var t,i=this._emissionTextureArray.length;if(r$F.length!=i)for(r$F=[],t=0;t<i;t++)r$F.push(new a$10);for(t=0;t<i;t++){var n=this._emissionTextureArray[t],r=e.textureCoordinates[n.textureAtlasID];t$$(r)&&(r$F[t].x=r.x,r$F[t].y=r.y,r$F[t].z=r.x+r.width,r$F[t].w=r.y+r.height)}return r$F};var l$U=[];function s$13(e,t,i,n){this.rightAscension=e,this.declination=t,this.rotation=i,this.rotationRate=n}_$P.prototype._getEmissionTexAtlasTilingAndOffset=function(){if(!t$$(this._emissionTextureArray))return l$U;var e,t=this._emissionTextureArray.length;if(l$U.length!=t)for(l$U=[],e=0;e<t;e++)l$U.push(new a$10);var i=performance.now()/1e3;for(e=0;e<t;e++){var n=this._emissionTextureArray[e];l$U[e].x=n.UTiling,l$U[e].y=n.VTiling,l$U[e].z=n.USpeed*i,l$U[e].w=n.VSpeed*i}return l$U};var L$R={},N0=32.184,S0=2451545,T$P=-.0529921,b$15=-.1059842,j$S=13.0120009,k$M=13.3407154,q$$=.9856003,z$F=26.4057084,B$F=13.064993,F$N=.3287146,H$O=1.7484877,K$H=-.1589763,O$L=.0036096,Q$P=.1643573,V$G=12.9590088,a$I=new o$10;function s$12(e){(!t$$(e)||"function"!=typeof e)&&(e=L$R.ComputeMoon),this._computeFunction=e}L$R.ComputeMoon=function(e,t){t$$(e)||(e=o$10.now()),a$I=o$10.addSeconds(e,N0,a$I);var i=o$10.totalDays(a$I)-S0,n=i/h$1a.DAYS_PER_JULIAN_CENTURY,r=(125.045+T$P*i)*n$1d.RADIANS_PER_DEGREE,o=(250.089+b$15*i)*n$1d.RADIANS_PER_DEGREE,a=(260.008+j$S*i)*n$1d.RADIANS_PER_DEGREE,s=(176.625+k$M*i)*n$1d.RADIANS_PER_DEGREE,l=(357.529+q$$*i)*n$1d.RADIANS_PER_DEGREE,u=(311.589+z$F*i)*n$1d.RADIANS_PER_DEGREE,c=(134.963+B$F*i)*n$1d.RADIANS_PER_DEGREE,h=(276.617+F$N*i)*n$1d.RADIANS_PER_DEGREE,d=(34.226+H$O*i)*n$1d.RADIANS_PER_DEGREE,f=(15.134+K$H*i)*n$1d.RADIANS_PER_DEGREE,p=(119.743+O$L*i)*n$1d.RADIANS_PER_DEGREE,_=(239.961+Q$P*i)*n$1d.RADIANS_PER_DEGREE,m=(25.053+V$G*i)*n$1d.RADIANS_PER_DEGREE,$=Math.sin(r),g=Math.sin(o),y=Math.sin(a),v=Math.sin(s),x=Math.sin(l),b=Math.sin(u),S=Math.sin(c),w=Math.sin(h),C=Math.sin(d),T=Math.sin(f),P=Math.sin(p),E=Math.sin(_),A=Math.sin(m),L=Math.cos(r),M=Math.cos(o),I=Math.cos(a),O=Math.cos(s),D=Math.cos(l),R=Math.cos(u),N=Math.cos(c),F=Math.cos(h),B=Math.cos(d),z=Math.cos(f),G=Math.cos(p),k=Math.cos(_),U=Math.cos(m),V=(269.9949+.0031*n-3.8787*$-.1204*g+.07*y-.0172*v+.0072*b-.0052*T+.0043*A)*n$1d.RADIANS_PER_DEGREE,W=(66.5392+.013*n+1.5419*L+.0239*M-.0278*I+.0068*O-.0029*R+9e-4*N+8e-4*z-9e-4*U)*n$1d.RADIANS_PER_DEGREE,H=(38.3213+13.17635815*i-14e-13*i*i+3.561*$+.1208*g-.0642*y+.0158*v+.0252*x-.0066*b-.0047*S-.0046*w+.0028*C+.0052*T+.004*P+.0019*E-.0044*A)*n$1d.RADIANS_PER_DEGREE,Y=(13.17635815-2*i*14e-13+3.561*L*T$P+.1208*M*b$15-.0642*I*j$S+.0158*O*k$M+.0252*D*q$$-.0066*R*z$F-.0047*N*B$F-.0046*F*F$N+.0028*B*H$O+.0052*z*K$H+.004*G*O$L+.0019*k*Q$P-.0044*U*V$G)/86400*n$1d.RADIANS_PER_DEGREE;return t$$(t)||(t=new s$13),t.rightAscension=V,t.declination=W,t.rotation=H,t.rotationRate=Y,t};var v$R=new a$11,x$R=new a$11,M$Y=new a$11;function _$O(e,t,i){var n=v$R;n.x=Math.cos(e+n$1d.PI_OVER_TWO),n.y=Math.sin(e+n$1d.PI_OVER_TWO),n.z=0;var r=Math.cos(t),o=M$Y;o.x=r*Math.cos(e),o.y=r*Math.sin(e),o.z=Math.sin(t);var a=a$11.cross(o,n,x$R);return t$$(i)||(i=new r$W),i[0]=n.x,i[1]=a.x,i[2]=o.x,i[3]=n.y,i[4]=a.y,i[5]=o.y,i[6]=n.z,i[7]=a.z,i[8]=o.z,i}var l$T=new r$W,z$E=new a$U;s$12.prototype.evaluate=function(e,t){t$$(e)||(e=o$10.now());var i=this._computeFunction(e),n=_$O(i.rightAscension,i.declination,t),r=n$1d.zeroToTwoPi(i.rotation),o=a$U.fromAxisAngle(a$11.UNIT_Z,r,z$E),a=r$W.fromQuaternion(a$U.conjugate(o,o),l$T);return r$W.multiply(a,n,n)};var t$O={};function i$V(e){n$1e.defined("url",e),this._url=t$X.createIfNeeded(e),this._url.appendForwardSlash()}function p$$(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),n$1e.typeOf.object("options.scene",e.scene);var t=e$1Y(e.accessToken,i$X.defaultAccessToken),i=t$X.createIfNeeded(e$1Y(e.server,i$X.defaultServer));i.appendForwardSlash();var n=i$X.getDefaultTokenCredit(t);t$$(n)&&e.scene.frameState.creditDisplay.addDefaultCredit(i$17.clone(n));var r=i.getDerivedResource({url:"v1/geocode"});t$$(t)&&r.appendQueryParameters({access_token:t}),this._accessToken=t,this._server=i,this._pelias=new i$V(r)}function n$T(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this.start=t$$(e.start)?o$10.clone(e.start):new o$10,this.stop=t$$(e.stop)?o$10.clone(e.stop):new o$10,this.data=e.data,this.isStartIncluded=e$1Y(e.isStartIncluded,!0),this.isStopIncluded=e$1Y(e.isStopIncluded,!0)}t$O.type=void 0,t$O.getRequiredDataPoints=t$_.throwInstantiationError,t$O.interpolateOrderZero=t$_.throwInstantiationError,t$O.interpolate=t$_.throwInstantiationError,Object.defineProperties(i$V.prototype,{url:{get:function(){return this._url}}}),i$V.prototype.geocode=function(e,t){return n$1e.typeOf.string("query",e),this._url.getDerivedResource({url:t===d$R.AUTOCOMPLETE?"autocomplete":"search",queryParameters:{text:e}}).fetchJson().then((function(e){return e.features.map((function(e){var t,i=e.bbox;if(t$$(i))t=s$1p.fromDegrees(i[0],i[1],i[2],i[3]);else{var n=e.geometry.coordinates[0],r=e.geometry.coordinates[1];t=a$11.fromDegrees(n,r)}return{displayName:e.properties.label,destination:t}}))}))},p$$.prototype.geocode=function(e,t){return this._pelias.geocode(e,t)},Object.defineProperties(n$T.prototype,{isEmpty:{get:function(){var e=o$10.compare(this.stop,this.start);return e<0||0===e&&(!this.isStartIncluded||!this.isStopIncluded)}}});var I$X={start:void 0,stop:void 0,isStartIncluded:void 0,isStopIncluded:void 0,data:void 0};n$T.fromIso8601=function(e,t){n$1e.typeOf.object("options",e),n$1e.typeOf.string("options.iso8601",e.iso8601);var i=e.iso8601.split("/");if(2!==i.length)throw new t$_("options.iso8601 is an invalid ISO 8601 interval.");var n=o$10.fromIso8601(i[0]),r=o$10.fromIso8601(i[1]),o=e$1Y(e.isStartIncluded,!0),a=e$1Y(e.isStopIncluded,!0),s=e.data;return t$$(t)?(t.start=n,t.stop=r,t.isStartIncluded=o,t.isStopIncluded=a,t.data=s,t):(I$X.start=n,I$X.stop=r,I$X.isStartIncluded=o,I$X.isStopIncluded=a,I$X.data=s,new n$T(I$X))},n$T.toIso8601=function(e,t){return n$1e.typeOf.object("timeInterval",e),o$10.toIso8601(e.start,t)+"/"+o$10.toIso8601(e.stop,t)},n$T.clone=function(e,t){if(t$$(e))return t$$(t)?(t.start=e.start,t.stop=e.stop,t.isStartIncluded=e.isStartIncluded,t.isStopIncluded=e.isStopIncluded,t.data=e.data,t):new n$T(e)},n$T.equals=function(e,t,i){return e===t||t$$(e)&&t$$(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&o$10.equals(e.start,t.start)&&o$10.equals(e.stop,t.stop)&&(e.data===t.data||t$$(i)&&i(e.data,t.data)))},n$T.equalsEpsilon=function(e,t,i,n){return n$1e.typeOf.number("epsilon",i),e===t||t$$(e)&&t$$(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&o$10.equalsEpsilon(e.start,t.start,i)&&o$10.equalsEpsilon(e.stop,t.stop,i)&&(e.data===t.data||t$$(n)&&n(e.data,t.data)))},n$T.intersect=function(e,t,i,n){if(n$1e.typeOf.object("left",e),n$1e.typeOf.object("result",i),!t$$(t))return n$T.clone(n$T.EMPTY,i);var r=e.start,o=e.stop,a=t.start,s=t.stop,l=o$10.greaterThanOrEquals(a,r)&&o$10.greaterThanOrEquals(o,a),u=!l&&o$10.lessThanOrEquals(a,r)&&o$10.lessThanOrEquals(r,s);if(!l&&!u)return n$T.clone(n$T.EMPTY,i);var c=e.isStartIncluded,h=e.isStopIncluded,d=t.isStartIncluded,f=t.isStopIncluded,p=o$10.lessThan(o,s);return i.start=l?a:r,i.isStartIncluded=c&&d||!o$10.equals(a,r)&&(l&&d||u&&c),i.stop=p?o:s,i.isStopIncluded=p?h:h&&f||!o$10.equals(s,o)&&f,i.data=t$$(n)?n(e.data,t.data):e.data,i},n$T.contains=function(e,t){if(n$1e.typeOf.object("timeInterval",e),n$1e.typeOf.object("julianDate",t),e.isEmpty)return!1;var i=o$10.compare(e.start,t);if(0===i)return e.isStartIncluded;var n=o$10.compare(t,e.stop);return 0===n?e.isStopIncluded:i<0&&n<0},n$T.prototype.clone=function(e){return n$T.clone(this,e)},n$T.prototype.equals=function(e,t){return n$T.equals(this,e,t)},n$T.prototype.equalsEpsilon=function(e,t,i){return n$T.equalsEpsilon(this,e,t,i)},n$T.prototype.toString=function(){return n$T.toIso8601(this)},n$T.EMPTY=Object.freeze(new n$T({start:new o$10,stop:new o$10,isStartIncluded:!1,isStopIncluded:!1}));var r$E=Object.freeze(o$10.fromIso8601("0000-01-01T00:00:00Z")),o$P=Object.freeze(o$10.fromIso8601("9999-12-31T24:00:00Z")),M$X=Object.freeze(new n$T({start:r$E,stop:o$P})),f$S={MINIMUM_VALUE:r$E,MAXIMUM_VALUE:o$P,MAXIMUM_INTERVAL:M$X},e$1e={SHIFT:0,CTRL:1,ALT:2},Ft$5=Object.freeze(e$1e);function t$N(){}function y$O(){var e=t$N._transcodeTaskProcessor.initWebAssemblyModule({modulePath:"ThirdParty/Workers/basis_transcoder.js",wasmBinaryFile:"ThirdParty/basis_transcoder.wasm"}).then((function(){return t$N._transcodeTaskProcessor}));t$N._readyPromise=e}t$N._transcodeTaskProcessor=new o$_("transcodeKTX2",Number.POSITIVE_INFINITY),t$N._readyPromise=void 0,t$N.transcode=function(e,t,i){return n$1e.defined("supportedTargetFormats",t),t$$(t$N._readyPromise)||y$O(),t$N._readyPromise.then((function(n){var r;if(e instanceof ArrayBuffer){var o=new Uint8Array(e);return r={supportedTargetFormats:t,ktx2Buffer:o,testId:i},n.scheduleTask(r,[e])}return r={supportedTargetFormats:t,ktx2Buffer:e},n.scheduleTask(r)})).then((function(e){var t,i=e.length,n=Object.keys(e[0]),r=n.length;for(t=0;t<i;t++)for(var o=e[t],a=0;a<r;a++){var s=o[n[a]];o[n[a]]=new e$1m(s.internalFormat,s.width,s.height,s.levelBuffer,s.datatype)}if(1===r){for(t=0;t<i;++t)e[t]=e[t][n[0]];1===i&&(e=e[0])}return e})).otherwise((function(e){throw e}))};var o$O={type:"Lagrange",getRequiredDataPoints:function(e){return Math.max(e+1,2)},interpolateOrderZero:function(e,t,i,n,r){t$$(r)||(r=new Array(n));var o,a,s=t.length;for(o=0;o<n;o++)r[o]=0;for(o=0;o<s;o++){var l=1;for(a=0;a<s;a++)if(a!==o){var u=t[o]-t[a];l*=(e-t[a])/u}for(a=0;a<n;a++)r[a]+=l*i[o*n+a]}return r}},f$R={type:"Linear"};function u$S(e,t,i){return v$_({url:e,responseType:"arraybuffer",headers:t,request:i})}function u$R(e,t,i){return v$_({url:e,responseType:"blob",headers:t,request:i})}f$R.getRequiredDataPoints=function(e){return 2},f$R.interpolateOrderZero=function(e,t,i,n,r){if(2!==t.length)throw new t$_("The xTable provided to the linear interpolator must have exactly two elements.");if(n<=0)throw new t$_("There must be at least 1 dependent variable for each independent variable.");t$$(r)||(r=new Array(n));var o,a,s,l=t[0],u=t[1];if(l===u)throw new t$_("Divide by zero error: xTable[0] and xTable[1] are equal");for(o=0;o<n;o++)a=i[o],s=i[o+n],r[o]=((s-a)*e+u*a-l*s)/(u-l);return r};var i$U,m$N=!1,v$Q=new o$_("transcodeCRNToDXTprevious",Number.POSITIVE_INFINITY);function I$W(e,t,i){if(i){if(!t$$(e))throw new t$_("resourceOrUrlOrBuffer is required.");if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))n=c$18.resolve(e);else n=t$X.createIfNeeded(e).fetchArrayBuffer();return t$$(n)?n.then((function(e){if(t$$(e)){var t=[];return e instanceof ArrayBuffer?t.push(e):(0===e.byteOffset&&e.byteLength===e.buffer.byteLength||(e=e.slice(0,e.length)),t.push(e.buffer)),v$Q.scheduleTask(e,t)}})).then((function(e){return e$1m.clone(e)})):void 0}if(t$$(i$U)||(i$U=new o$_("transcodeCRNToDXT",Number.POSITIVE_INFINITY)).initWebAssemblyModule({modulePath:"ThirdParty/crunch.js",wasmBinaryFile:"ThirdParty/crunch.wasm"}).then((function(){m$N=!0})),m$N){if(!t$$(e))throw new t$_("resourceOrUrlOrBuffer is required.");var n;return t$$(n=e instanceof ArrayBuffer||ArrayBuffer.isView(e)?c$18.resolve(e):t$X.createIfNeeded(e).fetchArrayBuffer())?n.then((function(e){if(t$$(e)){var i=[];e instanceof ArrayBuffer?i.push(e):(0===e.byteOffset&&e.byteLength===e.buffer.byteLength||(e=e.slice(0,e.length)),i.push(e.buffer));var n=e$1Y(t,!1);return i$U.scheduleTask({data:e,bMipMap:n},i)}})).then((function(e){return e$1m.clone(e)})):void 0}}function l$S(e,t,i){if(!t$$(t))throw new t$_("resourceOrUrlOrBuffer is required.");var n;t instanceof ArrayBuffer||ArrayBuffer.isView(t)?n=c$18.resolve(t):n=t$X.createIfNeeded(t).fetchArrayBuffer();if(t$$(n))return n.then((function(t){if(t$$(t)){var n=[];t instanceof ArrayBuffer?n.push(t):(0===t.byteOffset&&t.byteLength===t.buffer.byteLength||(t=t.slice(0,t.length)),n.push(t.buffer));var r=e$1Y(i,!1);return e.scheduleTask({data:t,bMipMap:r},n)}})).then((function(e){return e$1m.clone(e)}))}var tmp={};tmp=function e(t,i,n){function r(a,s){if(!i[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=i[a]={exports:{}};t[a][0].call(c.exports,(function(e){var i=t[a][1][e];return r(i||e)}),c,c.exports,e,t,i,n)}return i[a].exports}for(var o="function"==typeof require&&require,a=0;a<n.length;a++)r(n[a]);return r}({1:[function(e,t,i){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;i.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var n in i)i.hasOwnProperty(n)&&(e[n]=i[n])}}return e},i.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var r={arraySet:function(e,t,i,n,r){if(t.subarray&&e.subarray)e.set(t.subarray(i,i+n),r);else for(var o=0;o<n;o++)e[r+o]=t[i+o]},flattenChunks:function(e){var t,i,n,r,o,a;for(n=0,t=0,i=e.length;t<i;t++)n+=e[t].length;for(a=new Uint8Array(n),r=0,t=0,i=e.length;t<i;t++)o=e[t],a.set(o,r),r+=o.length;return a}},o={arraySet:function(e,t,i,n,r){for(var o=0;o<n;o++)e[r+o]=t[i+o]},flattenChunks:function(e){return[].concat.apply([],e)}};i.setTyped=function(e){e?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,r)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,o))},i.setTyped(n)},{}],2:[function(e,t,i){var n=e("./common"),r=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var a=new n.Buf8(256),s=0;s<256;s++)a[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function l(e,t){if(t<65537&&(e.subarray&&o||!e.subarray&&r))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var i="",a=0;a<t;a++)i+=String.fromCharCode(e[a]);return i}a[254]=a[254]=1,i.string2buf=function(e){var t,i,r,o,a,s=e.length,l=0;for(o=0;o<s;o++)55296==(64512&(i=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(i=65536+(i-55296<<10)+(r-56320),o++),l+=i<128?1:i<2048?2:i<65536?3:4;for(t=new n.Buf8(l),a=0,o=0;a<l;o++)55296==(64512&(i=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(i=65536+(i-55296<<10)+(r-56320),o++),i<128?t[a++]=i:i<2048?(t[a++]=192|i>>>6,t[a++]=128|63&i):i<65536?(t[a++]=224|i>>>12,t[a++]=128|i>>>6&63,t[a++]=128|63&i):(t[a++]=240|i>>>18,t[a++]=128|i>>>12&63,t[a++]=128|i>>>6&63,t[a++]=128|63&i);return t},i.buf2binstring=function(e){return l(e,e.length)},i.binstring2buf=function(e){for(var t=new n.Buf8(e.length),i=0,r=t.length;i<r;i++)t[i]=e.charCodeAt(i);return t},i.buf2string=function(e,t){var i,n,r,o,s=t||e.length,u=new Array(2*s);for(n=0,i=0;i<s;)if((r=e[i++])<128)u[n++]=r;else if((o=a[r])>4)u[n++]=65533,i+=o-1;else{for(r&=2===o?31:3===o?15:7;o>1&&i<s;)r=r<<6|63&e[i++],o--;o>1?u[n++]=65533:r<65536?u[n++]=r:(r-=65536,u[n++]=55296|r>>10&1023,u[n++]=56320|1023&r)}return l(u,n)},i.utf8border=function(e,t){var i;for((t=t||e.length)>e.length&&(t=e.length),i=t-1;i>=0&&128==(192&e[i]);)i--;return i<0||0===i?t:i+a[e[i]]>t?i:t}},{"./common":1}],3:[function(e,t,i){function n(e,t,i,n){for(var r=65535&e|0,o=e>>>16&65535|0,a=0;0!==i;){i-=a=i>2e3?2e3:i;do{o=o+(r=r+t[n++]|0)|0}while(--a);r%=65521,o%=65521}return r|o<<16|0}t.exports=n},{}],4:[function(e,t,i){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,i){function n(){for(var e,t=[],i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t}var r=n();function o(e,t,i,n){var o=r,a=n+i;e^=-1;for(var s=n;s<a;s++)e=e>>>8^o[255&(e^t[s])];return-1^e}t.exports=o},{}],6:[function(e,t,i){function n(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}t.exports=n},{}],7:[function(e,t,i){var n=30,r=12;t.exports=function(e,t){var i,o,a,s,l,u,c,h,d,f,p,_,m,$,g,y,v,x,b,S,w,C,T,P,E;i=e.state,o=e.next_in,P=e.input,a=o+(e.avail_in-5),s=e.next_out,E=e.output,l=s-(t-e.avail_out),u=s+(e.avail_out-257),c=i.dmax,h=i.wsize,d=i.whave,f=i.wnext,p=i.window,_=i.hold,m=i.bits,$=i.lencode,g=i.distcode,y=(1<<i.lenbits)-1,v=(1<<i.distbits)-1;e:do{m<15&&(_+=P[o++]<<m,m+=8,_+=P[o++]<<m,m+=8),x=$[_&y];t:for(;;){if(_>>>=b=x>>>24,m-=b,0==(b=x>>>16&255))E[s++]=65535&x;else{if(!(16&b)){if(0==(64&b)){x=$[(65535&x)+(_&(1<<b)-1)];continue t}if(32&b){i.mode=r;break e}e.msg="invalid literal/length code",i.mode=n;break e}S=65535&x,(b&=15)&&(m<b&&(_+=P[o++]<<m,m+=8),S+=_&(1<<b)-1,_>>>=b,m-=b),m<15&&(_+=P[o++]<<m,m+=8,_+=P[o++]<<m,m+=8),x=g[_&v];i:for(;;){if(_>>>=b=x>>>24,m-=b,!(16&(b=x>>>16&255))){if(0==(64&b)){x=g[(65535&x)+(_&(1<<b)-1)];continue i}e.msg="invalid distance code",i.mode=n;break e}if(w=65535&x,m<(b&=15)&&(_+=P[o++]<<m,(m+=8)<b&&(_+=P[o++]<<m,m+=8)),(w+=_&(1<<b)-1)>c){e.msg="invalid distance too far back",i.mode=n;break e}if(_>>>=b,m-=b,w>(b=s-l)){if((b=w-b)>d&&i.sane){e.msg="invalid distance too far back",i.mode=n;break e}if(C=0,T=p,0===f){if(C+=h-b,b<S){S-=b;do{E[s++]=p[C++]}while(--b);C=s-w,T=E}}else if(f<b){if(C+=h+f-b,(b-=f)<S){S-=b;do{E[s++]=p[C++]}while(--b);if(C=0,f<S){S-=b=f;do{E[s++]=p[C++]}while(--b);C=s-w,T=E}}}else if(C+=f-b,b<S){S-=b;do{E[s++]=p[C++]}while(--b);C=s-w,T=E}for(;S>2;)E[s++]=T[C++],E[s++]=T[C++],E[s++]=T[C++],S-=3;S&&(E[s++]=T[C++],S>1&&(E[s++]=T[C++]))}else{C=s-w;do{E[s++]=E[C++],E[s++]=E[C++],E[s++]=E[C++],S-=3}while(S>2);S&&(E[s++]=E[C++],S>1&&(E[s++]=E[C++]))}break}}break}}while(o<a&&s<u);o-=S=m>>3,_&=(1<<(m-=S<<3))-1,e.next_in=o,e.next_out=s,e.avail_in=o<a?a-o+5:5-(o-a),e.avail_out=s<u?u-s+257:257-(s-u),i.hold=_,i.bits=m}},{}],8:[function(e,t,i){var n=e("../utils/common"),r=e("./adler32"),o=e("./crc32"),a=e("./inffast"),s=e("./inftrees"),l=0,u=1,c=2,h=4,d=5,f=6,p=0,_=1,m=2,$=-2,g=-3,y=-4,v=-5,x=8,b=1,S=2,w=3,C=4,T=5,P=6,E=7,A=8,L=9,M=10,I=11,O=12,D=13,R=14,N=15,F=16,B=17,z=18,G=19,k=20,U=21,V=22,W=23,H=24,Y=25,j=26,q=27,X=28,K=29,Z=30,J=31,Q=852,ee=592,te=15;function ie(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function ne(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function re(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=b,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(Q),t.distcode=t.distdyn=new n.Buf32(ee),t.sane=1,t.back=-1,p):$}function oe(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,re(e)):$}function ae(e,t){var i,n;return e&&e.state?(n=e.state,t<0?(i=0,t=-t):(i=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?$:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=i,n.wbits=t,oe(e))):$}function se(e,t){var i,n;return e?(n=new ne,e.state=n,n.window=null,(i=ae(e,t))!==p&&(e.state=null),i):$}function le(e){return se(e,te)}var ue,ce,he=!0;function de(e){if(he){var t;for(ue=new n.Buf32(512),ce=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(u,e.lens,0,288,ue,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(c,e.lens,0,32,ce,0,e.work,{bits:5}),he=!1}e.lencode=ue,e.lenbits=9,e.distcode=ce,e.distbits=5}function fe(e,t,i,r){var o,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new n.Buf8(a.wsize)),r>=a.wsize?(n.arraySet(a.window,t,i-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>r&&(o=r),n.arraySet(a.window,t,i-r,o,a.wnext),(r-=o)?(n.arraySet(a.window,t,i-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}function pe(e,t){var i,Q,ee,te,ne,re,oe,ae,se,le,ue,ce,he,pe,_e,me,$e,ge,ye,ve,xe,be,Se,we,Ce=0,Te=new n.Buf8(4),Pe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return $;(i=e.state).mode===O&&(i.mode=D),ne=e.next_out,ee=e.output,oe=e.avail_out,te=e.next_in,Q=e.input,re=e.avail_in,ae=i.hold,se=i.bits,le=re,ue=oe,be=p;e:for(;;)switch(i.mode){case b:if(0===i.wrap){i.mode=D;break}for(;se<16;){if(0===re)break e;re--,ae+=Q[te++]<<se,se+=8}if(2&i.wrap&&35615===ae){i.check=0,Te[0]=255&ae,Te[1]=ae>>>8&255,i.check=o(i.check,Te,2,0),ae=0,se=0,i.mode=S;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&ae)<<8)+(ae>>8))%31){e.msg="incorrect header check",i.mode=Z;break}if((15&ae)!==x){e.msg="unknown compression method",i.mode=Z;break}if(se-=4,xe=8+(15&(ae>>>=4)),0===i.wbits)i.wbits=xe;else if(xe>i.wbits){e.msg="invalid window size",i.mode=Z;break}i.dmax=1<<xe,e.adler=i.check=1,i.mode=512&ae?M:O,ae=0,se=0;break;case S:for(;se<16;){if(0===re)break e;re--,ae+=Q[te++]<<se,se+=8}if(i.flags=ae,(255&i.flags)!==x){e.msg="unknown compression method",i.mode=Z;break}if(57344&i.flags){e.msg="unknown header flags set",i.mode=Z;break}i.head&&(i.head.text=ae>>8&1),512&i.flags&&(Te[0]=255&ae,Te[1]=ae>>>8&255,i.check=o(i.check,Te,2,0)),ae=0,se=0,i.mode=w;case w:for(;se<32;){if(0===re)break e;re--,ae+=Q[te++]<<se,se+=8}i.head&&(i.head.time=ae),512&i.flags&&(Te[0]=255&ae,Te[1]=ae>>>8&255,Te[2]=ae>>>16&255,Te[3]=ae>>>24&255,i.check=o(i.check,Te,4,0)),ae=0,se=0,i.mode=C;case C:for(;se<16;){if(0===re)break e;re--,ae+=Q[te++]<<se,se+=8}i.head&&(i.head.xflags=255&ae,i.head.os=ae>>8),512&i.flags&&(Te[0]=255&ae,Te[1]=ae>>>8&255,i.check=o(i.check,Te,2,0)),ae=0,se=0,i.mode=T;case T:if(1024&i.flags){for(;se<16;){if(0===re)break e;re--,ae+=Q[te++]<<se,se+=8}i.length=ae,i.head&&(i.head.extra_len=ae),512&i.flags&&(Te[0]=255&ae,Te[1]=ae>>>8&255,i.check=o(i.check,Te,2,0)),ae=0,se=0}else i.head&&(i.head.extra=null);i.mode=P;case P:if(1024&i.flags&&((ce=i.length)>re&&(ce=re),ce&&(i.head&&(xe=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),n.arraySet(i.head.extra,Q,te,ce,xe)),512&i.flags&&(i.check=o(i.check,Q,ce,te)),re-=ce,te+=ce,i.length-=ce),i.length))break e;i.length=0,i.mode=E;case E:if(2048&i.flags){if(0===re)break e;ce=0;do{xe=Q[te+ce++],i.head&&xe&&i.length<65536&&(i.head.name+=String.fromCharCode(xe))}while(xe&&ce<re);if(512&i.flags&&(i.check=o(i.check,Q,ce,te)),re-=ce,te+=ce,xe)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=A;case A:if(4096&i.flags){if(0===re)break e;ce=0;do{xe=Q[te+ce++],i.head&&xe&&i.length<65536&&(i.head.comment+=String.fromCharCode(xe))}while(xe&&ce<re);if(512&i.flags&&(i.check=o(i.check,Q,ce,te)),re-=ce,te+=ce,xe)break e}else i.head&&(i.head.comment=null);i.mode=L;case L:if(512&i.flags){for(;se<16;){if(0===re)break e;re--,ae+=Q[te++]<<se,se+=8}if(ae!==(65535&i.check)){e.msg="header crc mismatch",i.mode=Z;break}ae=0,se=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=O;break;case M:for(;se<32;){if(0===re)break e;re--,ae+=Q[te++]<<se,se+=8}e.adler=i.check=ie(ae),ae=0,se=0,i.mode=I;case I:if(0===i.havedict)return e.next_out=ne,e.avail_out=oe,e.next_in=te,e.avail_in=re,i.hold=ae,i.bits=se,m;e.adler=i.check=1,i.mode=O;case O:if(t===d||t===f)break e;case D:if(i.last){ae>>>=7&se,se-=7&se,i.mode=q;break}for(;se<3;){if(0===re)break e;re--,ae+=Q[te++]<<se,se+=8}switch(i.last=1&ae,se-=1,3&(ae>>>=1)){case 0:i.mode=R;break;case 1:if(de(i),i.mode=k,t===f){ae>>>=2,se-=2;break e}break;case 2:i.mode=B;break;case 3:e.msg="invalid block type",i.mode=Z}ae>>>=2,se-=2;break;case R:for(ae>>>=7&se,se-=7&se;se<32;){if(0===re)break e;re--,ae+=Q[te++]<<se,se+=8}if((65535&ae)!=(ae>>>16^65535)){e.msg="invalid stored block lengths",i.mode=Z;break}if(i.length=65535&ae,ae=0,se=0,i.mode=N,t===f)break e;case N:i.mode=F;case F:if(ce=i.length){if(ce>re&&(ce=re),ce>oe&&(ce=oe),0===ce)break e;n.arraySet(ee,Q,te,ce,ne),re-=ce,te+=ce,oe-=ce,ne+=ce,i.length-=ce;break}i.mode=O;break;case B:for(;se<14;){if(0===re)break e;re--,ae+=Q[te++]<<se,se+=8}if(i.nlen=257+(31&ae),ae>>>=5,se-=5,i.ndist=1+(31&ae),ae>>>=5,se-=5,i.ncode=4+(15&ae),ae>>>=4,se-=4,i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=Z;break}i.have=0,i.mode=z;case z:for(;i.have<i.ncode;){for(;se<3;){if(0===re)break e;re--,ae+=Q[te++]<<se,se+=8}i.lens[Pe[i.have++]]=7&ae,ae>>>=3,se-=3}for(;i.have<19;)i.lens[Pe[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,Se={bits:i.lenbits},be=s(l,i.lens,0,19,i.lencode,0,i.work,Se),i.lenbits=Se.bits,be){e.msg="invalid code lengths set",i.mode=Z;break}i.have=0,i.mode=G;case G:for(;i.have<i.nlen+i.ndist;){for(;me=(Ce=i.lencode[ae&(1<<i.lenbits)-1])>>>16&255,$e=65535&Ce,!((_e=Ce>>>24)<=se);){if(0===re)break e;re--,ae+=Q[te++]<<se,se+=8}if($e<16)ae>>>=_e,se-=_e,i.lens[i.have++]=$e;else{if(16===$e){for(we=_e+2;se<we;){if(0===re)break e;re--,ae+=Q[te++]<<se,se+=8}if(ae>>>=_e,se-=_e,0===i.have){e.msg="invalid bit length repeat",i.mode=Z;break}xe=i.lens[i.have-1],ce=3+(3&ae),ae>>>=2,se-=2}else if(17===$e){for(we=_e+3;se<we;){if(0===re)break e;re--,ae+=Q[te++]<<se,se+=8}se-=_e,xe=0,ce=3+(7&(ae>>>=_e)),ae>>>=3,se-=3}else{for(we=_e+7;se<we;){if(0===re)break e;re--,ae+=Q[te++]<<se,se+=8}se-=_e,xe=0,ce=11+(127&(ae>>>=_e)),ae>>>=7,se-=7}if(i.have+ce>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=Z;break}for(;ce--;)i.lens[i.have++]=xe}}if(i.mode===Z)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=Z;break}if(i.lenbits=9,Se={bits:i.lenbits},be=s(u,i.lens,0,i.nlen,i.lencode,0,i.work,Se),i.lenbits=Se.bits,be){e.msg="invalid literal/lengths set",i.mode=Z;break}if(i.distbits=6,i.distcode=i.distdyn,Se={bits:i.distbits},be=s(c,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,Se),i.distbits=Se.bits,be){e.msg="invalid distances set",i.mode=Z;break}if(i.mode=k,t===f)break e;case k:i.mode=U;case U:if(re>=6&&oe>=258){e.next_out=ne,e.avail_out=oe,e.next_in=te,e.avail_in=re,i.hold=ae,i.bits=se,a(e,ue),ne=e.next_out,ee=e.output,oe=e.avail_out,te=e.next_in,Q=e.input,re=e.avail_in,ae=i.hold,se=i.bits,i.mode===O&&(i.back=-1);break}for(i.back=0;me=(Ce=i.lencode[ae&(1<<i.lenbits)-1])>>>16&255,$e=65535&Ce,!((_e=Ce>>>24)<=se);){if(0===re)break e;re--,ae+=Q[te++]<<se,se+=8}if(me&&0==(240&me)){for(ge=_e,ye=me,ve=$e;me=(Ce=i.lencode[ve+((ae&(1<<ge+ye)-1)>>ge)])>>>16&255,$e=65535&Ce,!(ge+(_e=Ce>>>24)<=se);){if(0===re)break e;re--,ae+=Q[te++]<<se,se+=8}ae>>>=ge,se-=ge,i.back+=ge}if(ae>>>=_e,se-=_e,i.back+=_e,i.length=$e,0===me){i.mode=j;break}if(32&me){i.back=-1,i.mode=O;break}if(64&me){e.msg="invalid literal/length code",i.mode=Z;break}i.extra=15&me,i.mode=V;case V:if(i.extra){for(we=i.extra;se<we;){if(0===re)break e;re--,ae+=Q[te++]<<se,se+=8}i.length+=ae&(1<<i.extra)-1,ae>>>=i.extra,se-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=W;case W:for(;me=(Ce=i.distcode[ae&(1<<i.distbits)-1])>>>16&255,$e=65535&Ce,!((_e=Ce>>>24)<=se);){if(0===re)break e;re--,ae+=Q[te++]<<se,se+=8}if(0==(240&me)){for(ge=_e,ye=me,ve=$e;me=(Ce=i.distcode[ve+((ae&(1<<ge+ye)-1)>>ge)])>>>16&255,$e=65535&Ce,!(ge+(_e=Ce>>>24)<=se);){if(0===re)break e;re--,ae+=Q[te++]<<se,se+=8}ae>>>=ge,se-=ge,i.back+=ge}if(ae>>>=_e,se-=_e,i.back+=_e,64&me){e.msg="invalid distance code",i.mode=Z;break}i.offset=$e,i.extra=15&me,i.mode=H;case H:if(i.extra){for(we=i.extra;se<we;){if(0===re)break e;re--,ae+=Q[te++]<<se,se+=8}i.offset+=ae&(1<<i.extra)-1,ae>>>=i.extra,se-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=Z;break}i.mode=Y;case Y:if(0===oe)break e;if(ce=ue-oe,i.offset>ce){if((ce=i.offset-ce)>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=Z;break}ce>i.wnext?(ce-=i.wnext,he=i.wsize-ce):he=i.wnext-ce,ce>i.length&&(ce=i.length),pe=i.window}else pe=ee,he=ne-i.offset,ce=i.length;ce>oe&&(ce=oe),oe-=ce,i.length-=ce;do{ee[ne++]=pe[he++]}while(--ce);0===i.length&&(i.mode=U);break;case j:if(0===oe)break e;ee[ne++]=i.length,oe--,i.mode=U;break;case q:if(i.wrap){for(;se<32;){if(0===re)break e;re--,ae|=Q[te++]<<se,se+=8}if(ue-=oe,e.total_out+=ue,i.total+=ue,ue&&(e.adler=i.check=i.flags?o(i.check,ee,ue,ne-ue):r(i.check,ee,ue,ne-ue)),ue=oe,(i.flags?ae:ie(ae))!==i.check){e.msg="incorrect data check",i.mode=Z;break}ae=0,se=0}i.mode=X;case X:if(i.wrap&&i.flags){for(;se<32;){if(0===re)break e;re--,ae+=Q[te++]<<se,se+=8}if(ae!==(4294967295&i.total)){e.msg="incorrect length check",i.mode=Z;break}ae=0,se=0}i.mode=K;case K:be=_;break e;case Z:be=g;break e;case J:return y;default:return $}return e.next_out=ne,e.avail_out=oe,e.next_in=te,e.avail_in=re,i.hold=ae,i.bits=se,(i.wsize||ue!==e.avail_out&&i.mode<Z&&(i.mode<q||t!==h))&&fe(e,e.output,e.next_out,ue-e.avail_out),le-=e.avail_in,ue-=e.avail_out,e.total_in+=le,e.total_out+=ue,i.total+=ue,i.wrap&&ue&&(e.adler=i.check=i.flags?o(i.check,ee,ue,e.next_out-ue):r(i.check,ee,ue,e.next_out-ue)),e.data_type=i.bits+(i.last?64:0)+(i.mode===O?128:0)+(i.mode===k||i.mode===N?256:0),(0===le&&0===ue||t===h)&&be===p&&(be=v),be}function _e(e){if(!e||!e.state)return $;var t=e.state;return t.window&&(t.window=null),e.state=null,p}function me(e,t){var i;return e&&e.state?0==(2&(i=e.state).wrap)?$:(i.head=t,t.done=!1,p):$}function $e(e,t){var i,n=t.length;return e&&e.state?0!==(i=e.state).wrap&&i.mode!==I?$:i.mode===I&&r(1,t,n,0)!==i.check?g:fe(e,t,n,n)?(i.mode=J,y):(i.havedict=1,p):$}i.inflateReset=oe,i.inflateReset2=ae,i.inflateResetKeep=re,i.inflateInit=le,i.inflateInit2=se,i.inflate=pe,i.inflateEnd=_e,i.inflateGetHeader=me,i.inflateSetDictionary=$e,i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(e,t,i){var n=e("../utils/common"),r=15,o=852,a=592,s=0,l=1,u=2,c=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],d=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],f=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,i,p,_,m,$,g){var y,v,x,b,S,w,C,T,P,E=g.bits,A=0,L=0,M=0,I=0,O=0,D=0,R=0,N=0,F=0,B=0,z=null,G=0,k=new n.Buf16(r+1),U=new n.Buf16(r+1),V=null,W=0;for(A=0;A<=r;A++)k[A]=0;for(L=0;L<p;L++)k[t[i+L]]++;for(O=E,I=r;I>=1&&0===k[I];I--);if(O>I&&(O=I),0===I)return _[m++]=20971520,_[m++]=20971520,g.bits=1,0;for(M=1;M<I&&0===k[M];M++);for(O<M&&(O=M),N=1,A=1;A<=r;A++)if(N<<=1,(N-=k[A])<0)return-1;if(N>0&&(e===s||1!==I))return-1;for(U[1]=0,A=1;A<r;A++)U[A+1]=U[A]+k[A];for(L=0;L<p;L++)0!==t[i+L]&&($[U[t[i+L]]++]=L);if(e===s?(z=V=$,w=19):e===l?(z=c,G-=257,V=h,W-=257,w=256):(z=d,V=f,w=-1),B=0,L=0,A=M,S=m,D=O,R=0,x=-1,b=(F=1<<O)-1,e===l&&F>o||e===u&&F>a)return 1;for(;;){C=A-R,$[L]<w?(T=0,P=$[L]):$[L]>w?(T=V[W+$[L]],P=z[G+$[L]]):(T=96,P=0),y=1<<A-R,M=v=1<<D;do{_[S+(B>>R)+(v-=y)]=C<<24|T<<16|P|0}while(0!==v);for(y=1<<A-1;B&y;)y>>=1;if(0!==y?(B&=y-1,B+=y):B=0,L++,0==--k[A]){if(A===I)break;A=t[i+$[L]]}if(A>O&&(B&b)!==x){for(0===R&&(R=O),S+=M,N=1<<(D=A-R);D+R<I&&!((N-=k[D+R])<=0);)D++,N<<=1;if(F+=1<<D,e===l&&F>o||e===u&&F>a)return 1;_[x=B&b]=O<<24|D<<16|S-m|0}}return 0!==B&&(_[S+B]=A-R<<24|64<<16|0),g.bits=O,0}},{"../utils/common":1}],10:[function(e,t,i){t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(e,t,i){function n(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}t.exports=n},{}],"/lib/inflate.js":[function(e,t,i){var n=e("./zlib/inflate"),r=e("./utils/common"),o=e("./utils/strings"),a=e("./zlib/constants"),s=e("./zlib/messages"),l=e("./zlib/zstream"),u=e("./zlib/gzheader"),c=Object.prototype.toString;function h(e){if(!(this instanceof h))return new h(e);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var i=n.inflateInit2(this.strm,t.windowBits);if(i!==a.Z_OK)throw new Error(s[i]);this.header=new u,n.inflateGetHeader(this.strm,this.header)}function d(e,t){var i=new h(t);if(i.push(e,!0),i.err)throw i.msg||s[i.err];return i.result}function f(e,t){return(t=t||{}).raw=!0,d(e,t)}h.prototype.push=function(e,t){var i,s,l,u,h,d,f=this.strm,p=this.options.chunkSize,_=this.options.dictionary,m=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?f.input=o.binstring2buf(e):"[object ArrayBuffer]"===c.call(e)?f.input=new Uint8Array(e):f.input=e,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new r.Buf8(p),f.next_out=0,f.avail_out=p),(i=n.inflate(f,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&_&&(d="string"==typeof _?o.string2buf(_):"[object ArrayBuffer]"===c.call(_)?new Uint8Array(_):_,i=n.inflateSetDictionary(this.strm,d)),i===a.Z_BUF_ERROR&&!0===m&&(i=a.Z_OK,m=!1),i!==a.Z_STREAM_END&&i!==a.Z_OK)return this.onEnd(i),this.ended=!0,!1;f.next_out&&(0!==f.avail_out&&i!==a.Z_STREAM_END&&(0!==f.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=o.utf8border(f.output,f.next_out),u=f.next_out-l,h=o.buf2string(f.output,l),f.next_out=u,f.avail_out=p-u,u&&r.arraySet(f.output,f.output,l,u,0),this.onData(h)):this.onData(r.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(m=!0)}while((f.avail_in>0||0===f.avail_out)&&i!==a.Z_STREAM_END);return i===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(i=n.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),f.avail_out=0,!0)},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},i.Inflate=h,i.inflate=d,i.inflateRaw=f,i.ungzip=d},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js");var lt$f=tmp;function p$_(e){var t;(n$1e.defined("resourceOrUrlOrBuffer",e),e instanceof ArrayBuffer||ArrayBuffer.isView(e))?t=c$18.resolve(e):t=t$X.createIfNeeded(e).fetchArrayBuffer();if(t$$(t))return t.then((function(e){if(t$$(e))return R$I(e)}))}function R$I(e){var t=new DataView(e),i=0,n=t.getUint32(i,!0);i+=Uint32Array.BYTES_PER_ELEMENT,t.getUint32(i,!0),i+=Uint32Array.BYTES_PER_ELEMENT;var r=32===n?Z$_.RGBA_DXT5:Z$_.RGB_DXT1,o=t.getUint32(i,!0);i+=Uint32Array.BYTES_PER_ELEMENT;var a=t.getUint32(i,!0);i+=Uint32Array.BYTES_PER_ELEMENT,t.getUint32(i,!0),i+=Uint32Array.BYTES_PER_ELEMENT;var s=t.getUint32(i,!0);i+=Uint32Array.BYTES_PER_ELEMENT;var l=new Uint8Array(e,i,s),u=lt$f.inflate(l).buffer;return new e$1m(r,o,a,new Uint8Array(u))}function n$S(e,t,i){return n$1e.defined("url",e),t=e$1Y(t,!0),(i=t$$(i)?i:new r$V).url=e,i.requestFunction=function(){var i;i=!(a$Z(e)||!t)&&h$1e(e);var n=c$18.defer();return n$S.createImage(e,i,n),n.promise},r$U.request(i)}function b$14(e){var t=e.uint8Array,i=e.format,n=e.request,r=e$1Y(e.flipY,!1);n$1e.typeOf.object("uint8Array",t),n$1e.typeOf.string("format",i);var o,a=new Blob([t],{type:i});return t$X.supportsImageBitmapOptions().then((function(e){return e?c$18(t$X.createImageBitmapFromBlob(a,{flipY:r,premultiplyAlpha:!1})):new t$X({url:o=window.URL.createObjectURL(a),request:n}).fetchImage({flipY:r})})).then((function(e){return t$$(o)&&window.URL.revokeObjectURL(o),e})).otherwise((function(e){return t$$(o)&&window.URL.revokeObjectURL(o),c$18.reject(e)}))}n$S.createImage=function(e,t,i){var n=new Image;n.onload=function(){i.resolve(n)},n.onerror=function(e){i.reject(e)},t&&(a$X.contains(e)?n.crossOrigin="use-credentials":n.crossOrigin=""),n.src=e},n$S.defaultCreateImage=n$S.createImage;var b$13=function(){try{var e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob","blob"===e.responseType}catch{return!1}}();function a$H(e,t){if(!b$13||a$Z(e))return n$S(e,void 0,t);var i=u$R(e,void 0,t);return t$$(i)?i.then((function(e){var t=window.URL.createObjectURL(e);return n$S(t,!1).then((function(i){return i.blob=e,window.URL.revokeObjectURL(t),i}),(function(e){return window.URL.revokeObjectURL(t),c$18.reject(e)}))})):void 0}function m$M(e,t,i){if(!t$$(e))throw new t$_("url is required.");var n;t=e$1Y(t,e$1Y.EMPTY_OBJECT);do{n="loadJsonp"+Math.random().toString().substring(2,8)}while(t$$(window[n]));var r=new h$1f(e),o=m$19(e$1Y(r.query,""));t$$(t.parameters)&&(o=s$1n(t.parameters,o)),o[e$1Y(t.callbackParameterName,"callback")]=n,r.query=a$Y(o),e=r.toString();var a=t.proxy;return t$$(a)&&(e=a.getURL(e)),(i=t$$(i)?i:new r$V).url=e,i.requestFunction=function(){var t=c$18.defer();return window[n]=function(e){t.resolve(e);try{delete window[n]}catch{window[n]=void 0}},m$M.loadAndExecuteScript(e,n,t),t.promise},r$U.request(i)}function k$L(e){var t;(n$1e.defined("resourceOrUrlOrBuffer",e),e instanceof ArrayBuffer||ArrayBuffer.isView(e))?t=c$18.resolve(e):t=t$X.createIfNeeded(e).fetchArrayBuffer();if(t$$(t))return t.then((function(e){if(t$$(e))return L$Q(e)}))}m$M.loadAndExecuteScript=function(e,t,i){var n=document.createElement("script");n.async=!0,n.src=e;var r=document.getElementsByTagName("head")[0];n.onload=function(){n.onload=void 0,r.removeChild(n)},n.onerror=function(e){i.reject(e)},r.appendChild(n)},m$M.defaultLoadAndExecuteScript=m$M.loadAndExecuteScript;var T$O=[171,75,84,88,32,49,49,187,13,10,26,10],K$G=67305985,I$V=["positiveX","negativeX","positiveY","negativeY","positiveZ","negativeZ"],a$G=4,c$R;function L$Q(e){var t,i,n,r=new Uint8Array(e),o=!0;for(t=0;t<T$O.length;++t)if(T$O[t]!==r[t]){o=!1;break}if(!o)throw new t$Z("Invalid KTX file.");t$$(e.buffer)?(i=new DataView(e.buffer),n=e.byteOffset):(i=new DataView(e),n=0),n+=12;var a=i.getUint32(n,!0);if(n+=a$G,a!==K$G)throw new t$Z("File is the wrong endianness.");var s=i.getUint32(n,!0);n+=a$G;var l=i.getUint32(n,!0);n+=a$G;var u=i.getUint32(n,!0);n+=a$G;var c=i.getUint32(n,!0);n+=a$G;var h=i.getUint32(n,!0);n+=a$G;var d=i.getUint32(n,!0);n+=a$G;var f=i.getUint32(n,!0);n+=a$G;var p=i.getUint32(n,!0);n+=a$G;var _=i.getUint32(n,!0);n+=a$G;var m=i.getUint32(n,!0);n+=a$G;var $=i.getUint32(n,!0);n+=a$G;var g=i.getUint32(n,!0);n+=a$G,n+=g;var y,v=i.getUint32(n,!0);if(n+=a$G,y=t$$(e.buffer)?new Uint8Array(e.buffer,n,v):new Uint8Array(e,n,v),c===de$x.RGB8?c=Z$_.RGB:c===de$x.RGBA8&&(c=Z$_.RGBA),!Z$_.validate(c))throw new t$Z("glInternalFormat is not a valid format.");if(Z$_.isCompressedFormat(c)){if(0!==s)throw new t$Z("glType must be zero when the texture is compressed.");if(1!==l)throw new t$Z("The type size for compressed textures must be 1.");if(0!==u)throw new t$Z("glFormat must be zero when the texture is compressed.")}else{if(s!==de$x.UNSIGNED_BYTE)throw new t$Z("Only unsigned byte buffers are supported.");if(h!==u)throw new t$Z("The base internal format must be the same as the format for uncompressed textures.")}if(0!==p)throw new t$Z("3D textures are unsupported.");if(0!==_)throw new t$Z("Texture arrays are unsupported.");var x=y.byteOffset,b=new Array($);for(t=0;t<$;++t){for(var S=b[t]={},w=0;w<m;++w){var C=d>>t,T=f>>t,P=Z$_.isCompressedFormat(c)?Z$_.compressedTextureSizeInBytes(c,C,T):Z$_.textureSizeInBytes(c,s,C,T),E=new Uint8Array(y.buffer,x,P);S[I$V[w]]=new e$1m(c,C,T,E),x+=P}x+=3-(x+3)%4+4}var A=b;if(1===m)for(t=0;t<$;++t)A[t]=A[t][I$V[0]];return 1===$&&(A=A[0]),A}function i$T(e,t){var i;(n$1e.defined("resourceOrUrlOrBuffer",e),e instanceof ArrayBuffer||ArrayBuffer.isView(e))?i=c$18.resolve(e):i=t$X.createIfNeeded(e).fetchArrayBuffer();return i.then((function(e){return t$N.transcode(e,c$R,t)}))}function e$1d(e){e=e$1Y(e,0),this._array=new Array(e),this._length=e}i$T.setKTX2SupportedFormats=function(e,t,i,n,r,o){c$R={s3tc:e,pvrtc:t,astc:i,etc:n,etc1:r,bc7:o}},Object.defineProperties(e$1d.prototype,{length:{get:function(){return this._length},set:function(e){this._length=e,e>this._array.length&&(this._array.length=e)}},values:{get:function(){return this._array}}}),e$1d.prototype.get=function(e){return n$1e.typeOf.number.lessThan("index",e,this._array.length),this._array[e]},e$1d.prototype.set=function(e,t){n$1e.typeOf.number("index",e),e>=this.length&&(this.length=e+1),this._array[e]=t},e$1d.prototype.peek=function(){return this._array[this._length-1]},e$1d.prototype.push=function(e){var t=this.length++;this._array[t]=e},e$1d.prototype.pop=function(){return this._array[--this.length]},e$1d.prototype.reserve=function(e){n$1e.typeOf.number.greaterThanOrEquals("length",e,0),e>this._array.length&&(this._array.length=e)},e$1d.prototype.resize=function(e){n$1e.typeOf.number.greaterThanOrEquals("length",e,0),this.length=e},e$1d.prototype.trim=function(e){e=e$1Y(e,this.length),this._array.length=e};var e$1c={defaultAccessToken:void 0},a$F=!1,s$11,i$S="<b>This application is using Cesium's default Mapbox access token. Please create a new access token for the application as soon as possible and prior to deployment by visiting <a href=https://www.mapbox.com/account/apps/>https://www.mapbox.com/account/apps/</a>, and provide your token to Cesium by setting the Cesium.MapboxApi.defaultAccessToken property before constructing the CesiumWidget or any other object that uses the Mapbox API.</b>";function r$D(){t$_.throwInstantiationError()}e$1c.getAccessToken=function(e){return t$$(e)?e:t$$(e$1c.defaultAccessToken)?e$1c.defaultAccessToken:(a$F||(console.log(i$S),a$F=!0),"pk.eyJ1IjoiYW5hbHl0aWNhbGdyYXBoaWNzIiwiYSI6ImNpd204Zm4wejAwNzYyeW5uNjYyZmFwdWEifQ.7i-VIZZWX8pd1bTfxIVj9g")},e$1c.getErrorCredit=function(e){if(!t$$(e)&&!t$$(e$1c.defaultAccessToken))return t$$(s$11)||(s$11=new i$17(i$S,!0)),s$11},Object.defineProperties(r$D.prototype,{ellipsoid:{get:t$_.throwInstantiationError}}),r$D.prototype.project=t$_.throwInstantiationError,r$D.prototype.unproject=t$_.throwInstantiationError;var v$P=[],c$Q=[];function x$Q(e,t,i,n,r,o){var a,s,l=r-n+1,u=o-r,c=v$P,h=c$Q;for(a=0;a<l;++a)c[a]=e[n+a];for(s=0;s<u;++s)h[s]=e[r+s+1];a=0,s=0;for(var d=n;d<=o;++d){var f=c[a],p=h[s];a<l&&(s>=u||t(f,p,i)<=0)?(e[d]=f,++a):s<u&&(e[d]=p,++s)}}function g$F(e,t,i,n,r){if(!(n>=r)){var o=Math.floor(.5*(n+r));g$F(e,t,i,n,o),g$F(e,t,i,o+1,r),x$Q(e,t,i,n,o,r)}}function q$_(e,t,i){if(!t$$(e))throw new t$_("array is required.");if(!t$$(t))throw new t$_("comparator is required.");var n=e.length,r=Math.ceil(.5*n);v$P.length=r,c$Q.length=r,g$F(e,t,i,0,n-1),v$P.length=0,c$Q.length=0}var e$1b={NONE:-1,PARTIAL:0,FULL:1},pe$q=Object.freeze(e$1b);function h$U(e,t){if(!t$$(e))throw new t$_("occluderBoundingSphere is required.");if(!t$$(t))throw new t$_("camera position is required.");this._occluderPosition=a$11.clone(e.center),this._occluderRadius=e.radius,this._horizonDistance=0,this._horizonPlaneNormal=void 0,this._horizonPlanePosition=void 0,this._cameraPosition=void 0,this.cameraPosition=t}var v$O=new a$11;Object.defineProperties(h$U.prototype,{position:{get:function(){return this._occluderPosition}},radius:{get:function(){return this._occluderRadius}},cameraPosition:{set:function(e){if(!t$$(e))throw new t$_("cameraPosition is required.");e=a$11.clone(e,this._cameraPosition);var t,i,n,r=a$11.subtract(this._occluderPosition,e,v$O),o=a$11.magnitudeSquared(r),a=this._occluderRadius*this._occluderRadius;if(o>a){t=Math.sqrt(o-a),o=1/Math.sqrt(o),i=a$11.multiplyByScalar(r,o,v$O);var s=t*t*o;n=a$11.add(e,a$11.multiplyByScalar(i,s,v$O),v$O)}else t=Number.MAX_VALUE;this._horizonDistance=t,this._horizonPlaneNormal=i,this._horizonPlanePosition=n,this._cameraPosition=e}}}),h$U.fromBoundingSphere=function(e,t,i){if(!t$$(e))throw new t$_("occluderBoundingSphere is required.");if(!t$$(t))throw new t$_("camera position is required.");return t$$(i)?(a$11.clone(e.center,i._occluderPosition),i._occluderRadius=e.radius,i.cameraPosition=t,i):new h$U(e,t)};var B$E=new a$11;h$U.prototype.isPointVisible=function(e){if(this._horizonDistance!==Number.MAX_VALUE){var t=a$11.subtract(e,this._occluderPosition,B$E),i=this._occluderRadius;if((i=a$11.magnitudeSquared(t)-i*i)>0)return i=Math.sqrt(i)+this._horizonDistance,t=a$11.subtract(e,this._cameraPosition,t),i*i>a$11.magnitudeSquared(t)}return!1};var X$E=new a$11;h$U.prototype.isBoundingSphereVisible=function(e){var t=a$11.clone(e.center,X$E),i=e.radius;if(this._horizonDistance!==Number.MAX_VALUE){var n=a$11.subtract(t,this._occluderPosition,B$E),r=this._occluderRadius-i;if(r=a$11.magnitudeSquared(n)-r*r,i<this._occluderRadius)return r>0&&(r=Math.sqrt(r)+this._horizonDistance,n=a$11.subtract(t,this._cameraPosition,n),r*r+i*i>a$11.magnitudeSquared(n));if(r>0){n=a$11.subtract(t,this._cameraPosition,n);var o=a$11.magnitudeSquared(n),a=this._occluderRadius*this._occluderRadius,s=i*i;return(this._horizonDistance*this._horizonDistance+a)*s>o*a||(r=Math.sqrt(r)+this._horizonDistance)*r+s>o}return!0}return!1};var F$M=new a$11;h$U.prototype.computeVisibility=function(e){if(!t$$(e))throw new t$_("occludeeBS is required.");var t=a$11.clone(e.center),i=e.radius;if(i>this._occluderRadius)return pe$q.FULL;if(this._horizonDistance!==Number.MAX_VALUE){var n=a$11.subtract(t,this._occluderPosition,F$M),r=this._occluderRadius-i,o=a$11.magnitudeSquared(n);if((r=o-r*r)>0){r=Math.sqrt(r)+this._horizonDistance,n=a$11.subtract(t,this._cameraPosition,n);var a=a$11.magnitudeSquared(n);return r*r+i*i<a?pe$q.NONE:(r=o-(r=this._occluderRadius+i)*r)>0?a<(r=Math.sqrt(r)+this._horizonDistance)*r+i*i?pe$q.FULL:pe$q.PARTIAL:(n=a$11.subtract(t,this._horizonPlanePosition,n),a$11.dot(n,this._horizonPlaneNormal)>-i?pe$q.PARTIAL:pe$q.FULL)}}return pe$q.NONE};var w$V=new a$11;h$U.computeOccludeePoint=function(e,t,i){if(!t$$(e))throw new t$_("occluderBoundingSphere is required.");if(!t$$(i))throw new t$_("positions is required.");if(0===i.length)throw new t$_("positions must contain at least one element");var n=a$11.clone(t),r=a$11.clone(e.center),o=e.radius,a=i.length;if(a$11.equals(r,t))throw new t$_("occludeePosition must be different than occluderBoundingSphere.center");var s=a$11.normalize(a$11.subtract(n,r,w$V),w$V),l=-a$11.dot(s,r),u=h$U._anyRotationVector(r,s,l),c=h$U._horizonToPlaneNormalDotProduct(e,s,l,u,i[0]);if(c){for(var h,d=1;d<a;++d){if(!(h=h$U._horizonToPlaneNormalDotProduct(e,s,l,u,i[d])))return;h<c&&(c=h)}if(!(c<.0017453283658983088)){var f=o/c;return a$11.add(r,a$11.multiplyByScalar(s,f,w$V),w$V)}}};var Z$R=[];h$U.computeOccludeePointFromRectangle=function(e,t){if(!t$$(e))throw new t$_("rectangle is required.");t=e$1Y(t,n$1c.WGS84);var i=s$1p.subsample(e,t,0,Z$R),n=c$19.fromPoints(i),r=a$11.ZERO;if(!a$11.equals(r,n.center))return h$U.computeOccludeePoint(new c$19(r,t.minimumRadius),n.center,i)};var j$R=new a$11;h$U._anyRotationVector=function(e,t,i){var n=a$11.abs(t,j$R),r=n.x>n.y?0:1;(0===r&&n.z>n.x||1===r&&n.z>n.y)&&(r=2);var o,a=new a$11;0===r?(n.x=e.x,n.y=e.y+1,n.z=e.z+1,o=a$11.UNIT_X):1===r?(n.x=e.x+1,n.y=e.y,n.z=e.z+1,o=a$11.UNIT_Y):(n.x=e.x+1,n.y=e.y+1,n.z=e.z,o=a$11.UNIT_Z);var s=(a$11.dot(t,n)+i)/-a$11.dot(t,o);return a$11.normalize(a$11.subtract(a$11.add(n,a$11.multiplyByScalar(o,s,a),n),e,n),n)};var G$L=new a$11;h$U._rotationVector=function(e,t,i,n,r){var o=a$11.subtract(n,e,G$L);if(o=a$11.normalize(o,o),a$11.dot(t,o)<.9999999847691291){var a=a$11.cross(t,o,o);if(a$11.magnitude(a)>n$1d.EPSILON13)return a$11.normalize(a,new a$11)}return r};var g$E=new a$11,W$X=new a$11,q$Z=new a$11,L$P=new a$11;function o$N(e,t,i){e=e$1Y(e,0),t=e$1Y(t,0),i=e$1Y(i,0),this.value=new Float32Array([e,t,i])}function s$10(e,t,i){n$1e.defined("url",e),n$1e.defined("apiKey",t),t$$(i)&&n$1e.typeOf.object("params",i),(e=t$X.createIfNeeded(e)).appendForwardSlash(),e.setQueryParameters({key:t}),this._url=e,this._params=e$1Y(i,{})}h$U._horizonToPlaneNormalDotProduct=function(e,t,i,n,r){var o=a$11.clone(r,g$E),a=a$11.clone(e.center,W$X),s=e.radius,l=a$11.subtract(a,o,q$Z),u=a$11.magnitudeSquared(l),c=s*s;if(u<c)return!1;var h=u-c,d=Math.sqrt(h),f=d*(1/Math.sqrt(u))*d;l=a$11.normalize(l,l);var p=a$11.add(o,a$11.multiplyByScalar(l,f,L$P),L$P),_=Math.sqrt(h-f*f),m=this._rotationVector(a,t,i,o,n),$=a$11.fromElements(m.x*m.x*l.x+(m.x*m.y-m.z)*l.y+(m.x*m.z+m.y)*l.z,(m.x*m.y+m.z)*l.x+m.y*m.y*l.y+(m.y*m.z-m.x)*l.z,(m.x*m.z-m.y)*l.x+(m.y*m.z+m.x)*l.y+m.z*m.z*l.z,g$E);$=a$11.normalize($,$);var g=a$11.multiplyByScalar($,_,g$E);m=a$11.normalize(a$11.subtract(a$11.add(p,g,q$Z),a,q$Z),q$Z);var y=a$11.dot(t,m);m=a$11.normalize(a$11.subtract(a$11.subtract(p,g,m),a,m),m);var v=a$11.dot(t,m);return y<v?y:v},Object.defineProperties(o$N.prototype,{componentDatatype:{get:function(){return C$12.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}}),o$N.fromCartesian3=function(e){return n$1e.defined("offset",e),new o$N(e.x,e.y,e.z)},o$N.toValue=function(e,t){return n$1e.defined("offset",e),t$$(t)||(t=new Float32Array([e.x,e.y,e.z])),t[0]=e.x,t[1]=e.y,t[2]=e.z,t},Object.defineProperties(s$10.prototype,{url:{get:function(){return this._url}},params:{get:function(){return this._params}}}),s$10.prototype.geocode=function(e){return n$1e.typeOf.string("query",e),this._url.getDerivedResource({url:"json",queryParameters:s$1n(this._params,{q:e})}).fetchJson().then((function(e){return e.results.map((function(e){var t,i=e.bounds;if(t$$(i))t=s$1p.fromDegrees(i.southwest.lng,i.southwest.lat,i.northeast.lng,i.northeast.lat);else{var n=e.geometry.lat,r=e.geometry.lng;t=a$11.fromDegrees(n,r)}return{displayName:e.formatted,destination:t}}))}))};var t$M={packedLength:void 0,pack:t$_.throwInstantiationError,unpack:t$_.throwInstantiationError},r$C={packedInterpolationLength:void 0,convertPackedArrayForInterpolation:t$_.throwInstantiationError,unpackInterpolationResult:t$_.throwInstantiationError},_$N={BASECOLOR_UV_OFFSET_AND_TILING:0,EMISSIVE_UV_OFFSET_AND_TILING:1},ie$z=Object.freeze(_$N),m$L=function(e,t){return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)},E$O=function(e,t,i,n){var r=e.measureText(t),o=m$L(e.canvas,"font-family"),a=m$L(e.canvas,"font-size").replace("px",""),s=m$L(e.canvas,"font-style"),l=m$L(e.canvas,"font-weight"),u=!/\S/.test(t);r.fontsize=a;var c=document.createElement("div");c.style.position="absolute",c.style.opacity=0,c.style.font=s+" "+l+" "+a+"px "+o,c.innerHTML=t+"<br/>"+t,document.body.appendChild(c),r.leading=1.2*a;var h=m$L(c,"height");if((h=h.replace("px",""))>=2*a&&(r.leading=h/2|0),document.body.removeChild(c),u)r.ascent=0,r.descent=0,r.bounds={minx:0,maxx:r.width,miny:0,maxy:0},r.height=0;else{var d=document.createElement("canvas"),f=100;d.width=r.width+f,d.height=3*a,d.style.opacity=1,d.style.fontFamily=o,d.style.fontSize=a,d.style.fontStyle=s,d.style.fontWeight=l;var p=d.getContext("2d");p.font=s+" "+l+" "+a+"px "+o;var _=d.width,m=d.height,$=m/2;p.fillStyle="white",p.fillRect(-1,-1,_+2,m+2),i&&(p.strokeStyle="black",p.lineWidth=e.lineWidth,p.strokeText(t,50,$)),n&&(p.fillStyle="black",p.fillText(t,50,$));for(var g=p.getImageData(0,0,_,m).data,y=0,v=4*_,x=g.length;++y<x&&255===g[y];);var b=y/v|0;for(y=x-1;--y>0&&255===g[y];);var S=y/v|0;for(y=0;y<x&&255===g[y];)(y+=v)>=x&&(y=y-x+4);var w=y%v/4|0,C=1;for(y=x-3;y>=0&&255===g[y];)(y-=v)<0&&(y=x-3-4*C++);var T=y%v/4+1|0;r.ascent=$-b,r.descent=S-$,r.bounds={minx:w-50,maxx:T-50,miny:0,maxy:S-b},r.height=S-b+1}return r},o$M;function y$N(e,t){if(!t$$(e))throw new t$_("text is required.");if(""!==e){t=e$1Y(t,e$1Y.EMPTY_OBJECT);var i=e$1Y(t.font,"10px sans-serif"),n=e$1Y(t.stroke,!1),r=e$1Y(t.fill,!0),o=e$1Y(t.strokeWidth,1),a=e$1Y(t.backgroundColor,e$1z.TRANSPARENT),s=e$1Y(t.padding,0),l=2*s,u=document.createElement("canvas");u.width=1,u.height=1,u.style.font=i;var c=u.getContext("2d");t$$(o$M)||(t$$(c.imageSmoothingEnabled)?o$M="imageSmoothingEnabled":t$$(c.mozImageSmoothingEnabled)?o$M="mozImageSmoothingEnabled":t$$(c.webkitImageSmoothingEnabled)?o$M="webkitImageSmoothingEnabled":t$$(c.msImageSmoothingEnabled)&&(o$M="msImageSmoothingEnabled")),c.font=i,c.lineJoin="round",c.lineWidth=o,c[o$M]=!1,c.textBaseline=e$1Y(t.textBaseline,"bottom"),u.style.visibility="hidden",document.body.appendChild(u);var h=E$O(c,e,n,r);u.dimensions=h,document.body.removeChild(u),u.style.visibility="";var d=-h.bounds.minx,f=Math.ceil(h.width)+d+l,p=h.height+l,_=p-(p-h.ascent+s)+l;if(u.width=f,u.height=p,c.font=i,c.lineJoin="round",c.lineWidth=o,c[o$M]=!1,a!==e$1z.TRANSPARENT&&(c.fillStyle=a.toCssColorString(),c.fillRect(0,0,u.width,u.height)),n){var m=e$1Y(t.strokeColor,e$1z.BLACK);c.strokeStyle=m.toCssColorString(),c.strokeText(e,d+s,_)}if(r){var $=e$1Y(t.fillColor,e$1z.WHITE);c.fillStyle=$.toCssColorString(),c.fillText(e,d+s,_)}return u}}function h$T(){this._cache={}}h$T.prototype.fromColor=function(e,t){if(!t$$(e))throw new t$_("color is required");if(!t$$(t))throw new t$_("size is required");return u$Q(void 0,void 0,e,t,this._cache)},h$T.prototype.fromUrl=function(e,t,i){if(!t$$(e))throw new t$_("url is required");if(!t$$(t))throw new t$_("color is required");if(!t$$(i))throw new t$_("size is required");return u$Q(e,void 0,t,i,this._cache)},h$T.prototype.fromMakiIconId=function(e,t,i){if(!t$$(e))throw new t$_("id is required");if(!t$$(t))throw new t$_("color is required");if(!t$$(i))throw new t$_("size is required");return u$Q(o$12("Assets/Textures/maki/"+encodeURIComponent(e)+".png"),void 0,t,i,this._cache)},h$T.prototype.fromText=function(e,t,i){if(!t$$(e))throw new t$_("text is required");if(!t$$(t))throw new t$_("color is required");if(!t$$(i))throw new t$_("size is required");return u$Q(void 0,e,t,i,this._cache)};var I$U=new e$1z;function y$M(e,t,i){e.save(),e.scale(i/24,i/24),e.fillStyle=t.toCssColorString(),e.strokeStyle=t.brighten(.6,I$U).toCssColorString(),e.lineWidth=.846,e.beginPath(),e.moveTo(6.72,.422),e.lineTo(17.28,.422),e.bezierCurveTo(18.553,.422,19.577,1.758,19.577,3.415),e.lineTo(19.577,10.973),e.bezierCurveTo(19.577,12.63,18.553,13.966,17.282,13.966),e.lineTo(14.386,14.008),e.lineTo(11.826,23.578),e.lineTo(9.614,14.008),e.lineTo(6.719,13.965),e.bezierCurveTo(5.446,13.983,4.422,12.629,4.422,10.972),e.lineTo(4.422,3.416),e.bezierCurveTo(4.423,1.76,5.447,.423,6.718,.423),e.closePath(),e.fill(),e.stroke(),e.restore()}function p$Z(e,t,i){var n=i/2.5,r=n,o=n;t.width>t.height?o=n*(t.height/t.width):t.width<t.height&&(r=n*(t.width/t.height));var a=Math.round((i-r)/2),s=Math.round(7/24*i-o/2);e.globalCompositeOperation="destination-out",e.drawImage(t,a-1,s,r,o),e.drawImage(t,a,s-1,r,o),e.drawImage(t,a+1,s,r,o),e.drawImage(t,a,s+1,r,o),e.globalCompositeOperation="destination-over",e.fillStyle=e$1z.BLACK.toCssColorString(),e.fillRect(a-1,s-1,r+2,o+2),e.globalCompositeOperation="destination-out",e.drawImage(t,a,s,r,o),e.globalCompositeOperation="destination-over",e.fillStyle=e$1z.WHITE.toCssColorString(),e.fillRect(a-1,s-2,r+2,o+2)}var d$O=new Array(4);function u$Q(e,t,i,n,r){d$O[0]=e,d$O[1]=t,d$O[2]=i,d$O[3]=n;var o=JSON.stringify(d$O),a=r[o];if(t$$(a))return a;var s=document.createElement("canvas");s.width=n,s.height=n;var l=s.getContext("2d");if(y$M(l,i,n),t$$(e)){var u=t$X.createIfNeeded(e).fetchImage().then((function(e){return p$Z(l,e,n),r[o]=s,s}));return r[o]=u,u}if(t$$(t)){var c=y$N(t,{font:"bold "+n+"px sans-serif"});p$Z(l,c,n)}return r[o]=s,s}function f$Q(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT);var t=e$1Y(e.vertexFormat,n$12.DEFAULT);this._vertexFormat=t,this._workerName="createPlaneGeometry"}f$Q.packedLength=n$12.packedLength,f$Q.pack=function(e,t,i){return n$1e.typeOf.object("value",e),n$1e.defined("array",t),i=e$1Y(i,0),n$12.pack(e._vertexFormat,t,i),t};var l$R=new n$12,O$K={vertexFormat:l$R};f$Q.unpack=function(e,t,i){n$1e.defined("array",e),t=e$1Y(t,0);var n=n$12.unpack(e,t,l$R);return t$$(i)?(i._vertexFormat=n$12.clone(n,i._vertexFormat),i):new f$Q(O$K)};var s$$=new a$11(-.5,-.5,0),w$U=new a$11(.5,.5,0);function o$L(){this._workerName="createPlaneOutlineGeometry"}f$Q.createGeometry=function(e){var t,i,n=e._vertexFormat,r=new t$W;if(n.position){if((i=new Float64Array(12))[0]=s$$.x,i[1]=s$$.y,i[2]=0,i[3]=w$U.x,i[4]=s$$.y,i[5]=0,i[6]=w$U.x,i[7]=w$U.y,i[8]=0,i[9]=s$$.x,i[10]=w$U.y,i[11]=0,r.position=new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:i}),n.normal){var o=new Float32Array(12);o[0]=0,o[1]=0,o[2]=1,o[3]=0,o[4]=0,o[5]=1,o[6]=0,o[7]=0,o[8]=1,o[9]=0,o[10]=0,o[11]=1,r.normal=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:o})}if(n.st){var a=new Float32Array(8);a[0]=0,a[1]=0,a[2]=1,a[3]=0,a[4]=1,a[5]=1,a[6]=0,a[7]=1,r.st=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:2,values:a})}if(n.tangent){var s=new Float32Array(12);s[0]=1,s[1]=0,s[2]=0,s[3]=1,s[4]=0,s[5]=0,s[6]=1,s[7]=0,s[8]=0,s[9]=1,s[10]=0,s[11]=0,r.tangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:s})}if(n.bitangent){var l=new Float32Array(12);l[0]=0,l[1]=1,l[2]=0,l[3]=0,l[4]=1,l[5]=0,l[6]=0,l[7]=1,l[8]=0,l[9]=0,l[10]=1,l[11]=0,r.bitangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:l})}(t=new Uint16Array(6))[0]=0,t[1]=1,t[2]=2,t[3]=0,t[4]=2,t[5]=3}return new T$11({attributes:r,indices:t,primitiveType:H$11.TRIANGLES,boundingSphere:new c$19(a$11.ZERO,Math.sqrt(2))})},o$L.packedLength=0,o$L.pack=function(e,t){return n$1e.defined("value",e),n$1e.defined("array",t),t},o$L.unpack=function(e,t,i){return n$1e.defined("array",e),t$$(i)?i:new o$L};var t$L=new a$11(-.5,-.5,0),i$R=new a$11(.5,.5,0);o$L.createGeometry=function(){var e=new t$W,t=new Uint16Array(8),i=new Float64Array(12);return i[0]=t$L.x,i[1]=t$L.y,i[2]=t$L.z,i[3]=i$R.x,i[4]=t$L.y,i[5]=t$L.z,i[6]=i$R.x,i[7]=i$R.y,i[8]=t$L.z,i[9]=t$L.x,i[10]=i$R.y,i[11]=t$L.z,e.position=new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:i}),t[0]=0,t[1]=1,t[2]=1,t[3]=2,t[4]=2,t[5]=3,t[6]=3,t[7]=0,new T$11({attributes:e,indices:t,primitiveType:H$11.LINES,boundingSphere:new c$19(a$11.ZERO,Math.sqrt(2))})};var r$B=new a$11;function i$Q(e,t,i,n){return P$V(e,t,i,n,r$B),r$B.x>0&&r$B.y>0&&r$B.z>0}var Ve$h=new i$1g,He$d=new i$1g;function ke$a(e,t,i,n){var r=n.cartesianToCartographic(e,Ve$h).height,o=n.cartesianToCartographic(t,He$d);o.height=r,n.cartographicToCartesian(o,t);var a=n.cartesianToCartographic(i,He$d);a.height=r-100,n.cartographicToCartesian(a,i)}var Se$f=new n$13,ze$e=new a$11,Ge$d=new a$11,Me$m=new a$11,Ue$f=new a$11,We$j=new a$11,Ye$e=new a$11,he$q=new a$11,M$W=new a$11,ee$w=new a$11,je$d=new r$T,qe$e=new r$T,Qe$b=new a$11,Ce$n=new a$U,Je$8=new r$W,Xe$b=new r$W;function Te$q(e){var t=e.vertexFormat,i=e.geometry,n=e.shadowVolume,r=i.attributes.position.values,o=r.length,a=e.wall,s=e.top,l=e.bottom;if(t.st||t.normal||t.tangent||t.bitangent||n){var u=e.boundingRectangle,c=e.tangentPlane,h=e.ellipsoid,d=e.stRotation,f=e.perPositionHeight,p=je$d;p.x=u.x,p.y=u.y;var _,m=e.isComputeTexCoord?new Float32Array(o):new Float32Array(o/3*2),$=t.st?m:void 0;t.normal&&(_=f&&s&&!a?i.attributes.normal.values:new Float32Array(o));var g=t.tangent?new Float32Array(o):void 0,y=t.bitangent?new Float32Array(o):void 0,v=n?new Float32Array(o):void 0,x=0,b=0,S=Ge$d,w=Me$m,C=Ue$f,T=!0,P=Je$8,E=Xe$b;if(0!==d){var A=a$U.fromAxisAngle(c._plane.normal,d,Ce$n);P=r$W.fromQuaternion(A,P),A=a$U.fromAxisAngle(c._plane.normal,-d,Ce$n),E=r$W.fromQuaternion(A,E)}else P=r$W.clone(r$W.IDENTITY,P),E=r$W.clone(r$W.IDENTITY,E);var L=0;(s&&l||a)&&(L=o/2,o/=2);var M=1,I=[];if(t.st&&a&&e.isComputeTexCoord){let t=[...e.outerPositions,e.outerPositions[0]];for(let e=1;e<t.length;e++){M+=a$11.distance(t[e-1],t[e]),I.push(M)}}for(var O=0;O<o;O+=3){var D=a$11.fromArray(r,O,Qe$b);if(t.st){var R=r$W.multiplyByVector(P,D,ze$e);R=h.scaleToGeodeticSurface(R,R);var N=c.projectPointOntoPlane(R,qe$e);r$T.subtract(N,p,N);var F=n$1d.clamp(N.x/u.width,0,1),B=n$1d.clamp(N.y/u.height,0,1);if(a&&M>1){let e=Math.ceil(O/6)-1;F=I[e]?I[e]/M:0,$[x]=1-F,$[x+1]=1,$[x+2]=0,$[x+L]=1-F,$[x+1+L]=0,$[x+2+L]=0}l&&($[x+L]=F,$[x+1+L]=B,e.isComputeTexCoord&&($[x+2+L]=-1)),s&&($[x]=F,$[x+1]=B,e.isComputeTexCoord&&($[x+2]=1)),e.isComputeTexCoord?x+=3:x+=2}if(t.normal||t.tangent||t.bitangent||n){var z=b+1,G=b+2;if(a){if(O+3<o){var k=a$11.fromArray(r,O+3,We$j);if(T){var U=a$11.fromArray(r,O+o,Ye$e);f&&ke$a(D,k,U,h),a$11.subtract(k,D,k),a$11.subtract(U,D,U),S=a$11.normalize(a$11.cross(U,k,S),S),T=!1}a$11.equalsEpsilon(k,D,n$1d.EPSILON10)&&(T=!0)}(t.tangent||t.bitangent)&&(C=h.geodeticSurfaceNormal(D,C),t.tangent&&(w=a$11.normalize(a$11.cross(C,S,w),w)))}else S=h.geodeticSurfaceNormal(D,S),(t.tangent||t.bitangent)&&(f&&(he$q=a$11.fromArray(_,b,he$q),M$W=a$11.cross(a$11.UNIT_Z,he$q,M$W),M$W=a$11.normalize(r$W.multiplyByVector(E,M$W,M$W),M$W),t.bitangent&&(ee$w=a$11.normalize(a$11.cross(he$q,M$W,ee$w),ee$w))),w=a$11.cross(a$11.UNIT_Z,S,w),w=a$11.normalize(r$W.multiplyByVector(E,w,w),w),t.bitangent&&(C=a$11.normalize(a$11.cross(S,w,C),C)));t.normal&&(e.wall?(_[b+L]=S.x,_[z+L]=S.y,_[G+L]=S.z):l&&(_[b+L]=-S.x,_[z+L]=-S.y,_[G+L]=-S.z),(s&&!f||a)&&(_[b]=S.x,_[z]=S.y,_[G]=S.z)),n&&(a&&(S=h.geodeticSurfaceNormal(D,S)),v[b+L]=-S.x,v[z+L]=-S.y,v[G+L]=-S.z),t.tangent&&(e.wall?(g[b+L]=w.x,g[z+L]=w.y,g[G+L]=w.z):l&&(g[b+L]=-w.x,g[z+L]=-w.y,g[G+L]=-w.z),s&&(f?(g[b]=M$W.x,g[z]=M$W.y,g[G]=M$W.z):(g[b]=w.x,g[z]=w.y,g[G]=w.z))),t.bitangent&&(l&&(y[b+L]=C.x,y[z+L]=C.y,y[G+L]=C.z),s&&(f?(y[b]=ee$w.x,y[z]=ee$w.y,y[G]=ee$w.z):(y[b]=C.x,y[z]=C.y,y[G]=C.z))),b+=3}}t.st&&(i.attributes.st=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:e.isComputeTexCoord?3:2,values:$})),t.normal&&(i.attributes.normal=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:_})),t.tangent&&(i.attributes.tangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:g})),t.bitangent&&(i.attributes.bitangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:y})),n&&(i.attributes.extrudeDirection=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:v}))}if(e.extrude&&t$$(e.offsetAttribute)){var V=r.length/3,W=new Uint8Array(V);if(e.offsetAttribute===_0x165ce0.TOP)s&&l||a?W=d$10(W,1,0,V/2):s&&(W=d$10(W,1));else W=d$10(W,e.offsetAttribute===_0x165ce0.NONE?0:1);i.attributes.applyOffset=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:W})}return i}var $e$9=new i$1g,Ke$b=new i$1g,q$Y={west:0,east:0},te$w=new D$Y;function Ie$l(e,t,i,n,r){if(r=e$1Y(r,new s$1p),!t$$(e)||e.length<3)return r.west=0,r.north=0,r.south=0,r.east=0,r;if(i===m$_.RHUMB)return s$1p.fromCartesianArray(e,t,r);te$w.ellipsoid.equals(t)||(te$w=new D$Y(void 0,void 0,t)),r.west=Number.POSITIVE_INFINITY,r.east=Number.NEGATIVE_INFINITY,r.south=Number.POSITIVE_INFINITY,r.north=Number.NEGATIVE_INFINITY,q$Y.west=Number.POSITIVE_INFINITY,q$Y.east=Number.NEGATIVE_INFINITY;for(var o,a=1/n$1d.chordLength(n,t.maximumRadius),s=e.length,l=t.cartesianToCartographic(e[0],Ke$b),u=$e$9,c=1;c<s;c++)o=u,u=l,l=t.cartesianToCartographic(e[c],o),te$w.setEndPoints(u,l),Ne$g(te$w,a,r,q$Y);return o=u,u=l,l=t.cartesianToCartographic(e[0],o),te$w.setEndPoints(u,l),Ne$g(te$w,a,r,q$Y),r.east-r.west>q$Y.west-q$Y.east&&(r.east=q$Y.east,r.west=q$Y.west),r}var Ze$9=new i$1g;function Ne$g(e,t,i,n){for(var r=e.surfaceDistance,o=Math.ceil(r*t),a=o>0?r/(o-1):Number.POSITIVE_INFINITY,s=0,l=0;l<o;l++){var u=e.interpolateUsingSurfaceDistance(s,Ze$9);s+=a;var c=u.longitude,h=u.latitude;i.west=Math.min(i.west,c),i.east=Math.max(i.east,c),i.south=Math.min(i.south,h),i.north=Math.max(i.north,h),n.west=c>0?Math.min(c,n.west):n.west,n.east=c<0?Math.max(c,n.east):n.east}}var Oe$l=[];function et$f(e,t,i,n,r,o,a,s,l,u,c){var h,d={walls:[]};if(o||a){var f,p,_=g$K.createGeometryFromPositions(e,t,i,r,s,l),m=_.attributes.position.values,$=_.indices;if(o&&a){var g=m.concat(m);f=g.length/3,(p=fe$u.createTypedArray(f,2*$.length)).set($);var y=$.length,v=f/2;for(h=0;h<y;h+=3){var x=p[h]+v,b=p[h+1]+v,S=p[h+2]+v;p[h+y]=S,p[h+1+y]=b,p[h+2+y]=x}if(_.attributes.position.values=g,r&&s.normal){var w=_.attributes.normal.values;_.attributes.normal.values=new Float32Array(g.length),_.attributes.normal.values.set(w)}_.indices=p}else if(a){for(f=m.length/3,p=fe$u.createTypedArray(f,$.length),h=0;h<$.length;h+=3)p[h]=$[h+2],p[h+1]=$[h+1],p[h+2]=$[h];_.indices=p}d.topAndBottom=new m$P({geometry:_})}var C,T=n.outerRing,P=s$1h.fromPoints(T,e),E=P.projectPointsOntoPlane(T,Oe$l),A=T$10.computeWindingOrder2D(E);A===_0x2ee645.CLOCKWISE&&(T=T.slice().reverse()),u&&(C=g$K.computeWallGeometry(T,e,i,r,l,c),d.walls.push(new m$P({geometry:C})));var L=n.holes;for(h=0;h<L.length;h++){var M=L[h];E=(P=s$1h.fromPoints(M,e)).projectPointsOntoPlane(M,Oe$l),(A=T$10.computeWindingOrder2D(E))===_0x2ee645.COUNTER_CLOCKWISE&&(M=M.slice().reverse()),C=g$K.computeWallGeometry(M,e,i,r,l),d.walls.push(new m$P({geometry:C}))}return d}function S$C(e){if(n$1e.typeOf.object("options",e),n$1e.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),t$$(e.perPositionHeight)&&e.perPositionHeight&&t$$(e.height))throw new t$_("Cannot use both options.perPositionHeight and options.height");if(t$$(e.arcType)&&e.arcType!==m$_.GEODESIC&&e.arcType!==m$_.RHUMB)throw new t$_("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");var t=e.polygonHierarchy,i=e$1Y(e.vertexFormat,n$12.DEFAULT),n=e$1Y(e.ellipsoid,n$1c.WGS84),r=e$1Y(e.granularity,n$1d.RADIANS_PER_DEGREE),o=e$1Y(e.stRotation,0),a=e$1Y(e.perPositionHeight,!1),s=a&&t$$(e.extrudedHeight),l=e$1Y(e.height,0),u=e$1Y(e.extrudedHeight,l);if(!s){var c=Math.max(l,u);u=Math.min(l,u),l=c}this._vertexFormat=n$12.clone(i),this._ellipsoid=n$1c.clone(n),this._granularity=r,this._stRotation=o,this._height=l,this._extrudedHeight=u,this._closeTop=e$1Y(e.closeTop,!0),this._closeBottom=e$1Y(e.closeBottom,!0),this._extrudeOutering=e$1Y(e.extrudeOutering,!0),this._polygonHierarchy=t,this._perPositionHeight=a,this._perPositionHeightExtrude=s,this._shadowVolume=e$1Y(e.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=e.offsetAttribute,this._arcType=e$1Y(e.arcType,m$_.GEODESIC),this._groundBottomAltitude=e$1Y(e.groundBottomAltitude,0),this._groundExtrudedHeight=e$1Y(e.groundExtrudedHeight,0),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._isComputeTexCoord=e.isComputeTexCoord,this._isWall=e$1Y(e.isWall,!1),this.packedLength=g$K.computeHierarchyPackedLength(t)+n$1c.packedLength+n$12.packedLength+12}S$C.fromPositions=function(e){return e=e$1Y(e,e$1Y.EMPTY_OBJECT),n$1e.defined("options.positions",e.positions),new S$C({polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,closeTop:e.closeTop,closeBottom:e.closeBottom,offsetAttribute:e.offsetAttribute,arcType:e.arcType,isComputeTexCoord:e.isComputeTexCoord,isWall:e.isWall})},S$C.pack=function(e,t,i){return n$1e.typeOf.object("value",e),n$1e.defined("array",t),i=e$1Y(i,0),i=g$K.packPolygonHierarchy(e._polygonHierarchy,t,i),n$1c.pack(e._ellipsoid,t,i),i+=n$1c.packedLength,n$12.pack(e._vertexFormat,t,i),i+=n$12.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++]=e$1Y(e._offsetAttribute,-1),t[i++]=e._arcType,t[i]=e.packedLength,t};var tt$h=n$1c.clone(n$1c.UNIT_SPHERE),ot$h=new n$12,rt$g={polygonHierarchy:{}};function it$d(e){var t=-e._stRotation;if(0===t)return[0,0,0,1,1,0];var i=e._ellipsoid,n=e._polygonHierarchy.positions,r=e.rectangle;return T$11._textureCoordinateRotationPoints(n,t,i,r)}function t$K(e,t){this.positions=t$$(e)?e:[],this.holes=t$$(t)?t:[]}S$C.unpack=function(e,t,i){n$1e.defined("array",e),t=e$1Y(t,0);var n=g$K.unpackPolygonHierarchy(e,t);t=n.startingIndex,delete n.startingIndex;var r=n$1c.unpack(e,t,tt$h);t+=n$1c.packedLength;var o=n$12.unpack(e,t,ot$h);t+=n$12.packedLength;var a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=1===e[t++],h=1===e[t++],d=1===e[t++],f=1===e[t++],p=1===e[t++],_=e[t++],m=e[t++],$=e[t];return t$$(i)||(i=new S$C(rt$g)),i._polygonHierarchy=n,i._ellipsoid=n$1c.clone(r,i._ellipsoid),i._vertexFormat=n$12.clone(o,i._vertexFormat),i._height=a,i._extrudedHeight=s,i._granularity=l,i._stRotation=u,i._perPositionHeightExtrude=c,i._perPositionHeight=h,i._closeTop=d,i._closeBottom=f,i._shadowVolume=p,i._offsetAttribute=-1===_?void 0:_,i._arcType=m,i.packedLength=$,i},S$C.computeRectangle=function(e,t){n$1e.typeOf.object("options",e),n$1e.typeOf.object("options.polygonHierarchy",e.polygonHierarchy);var i=e$1Y(e.granularity,n$1d.RADIANS_PER_DEGREE),n=e$1Y(e.arcType,m$_.GEODESIC);if(n!==m$_.GEODESIC&&n!==m$_.RHUMB)throw new t$_("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");var r=e.polygonHierarchy,o=e$1Y(e.ellipsoid,n$1c.WGS84);return Ie$l(r.positions,o,n,i,t)},S$C.createGeometry=function(e){var t=e._vertexFormat,i=e._ellipsoid,n=e._granularity,r=e._stRotation,o=e._polygonHierarchy,a=e._perPositionHeight,s=e._closeTop,l=e._closeBottom,u=e._arcType,c=o.positions;if(!(c.length<3)){var h=s$1h.fromPoints(c,i),d=g$K.polygonsFromHierarchy(o,h.projectPointsOntoPlane.bind(h),!a,i),f=d.hierarchy,p=d.polygons;if(0!==f.length){c=f[0].outerRing;var _,m=g$K.computeBoundingRectangle(h.plane.normal,h.projectPointOntoPlane.bind(h),c,r,Se$f),$=[],g=e._height,y=e._extrudedHeight,v=e._perPositionHeightExtrude||!n$1d.equalsEpsilon(g,y,0,n$1d.EPSILON2),x={perPositionHeight:a,vertexFormat:t,geometry:void 0,tangentPlane:h,boundingRectangle:m,ellipsoid:i,stRotation:r,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:u,outerPositions:c,isComputeTexCoord:e._isComputeTexCoord};if(v)for(x.extrude=!0,x.top=s,x.bottom=l,x.shadowVolume=e._shadowVolume,x.offsetAttribute=e._offsetAttribute,_=0;_<p.length;_++){var b,S=et$f(i,p[_],n,f[_],a,s,l,t,u,e._extrudeOutering,e._isWall);s&&l?(b=S.topAndBottom,x.geometry=g$K.scaleToGeodeticHeightExtruded(b.geometry,g,y,i,a)):s?((b=S.topAndBottom).geometry.attributes.position.values=T$10.scaleToGeodeticHeight(b.geometry.attributes.position.values,g,i,!a),x.geometry=b.geometry):l&&((b=S.topAndBottom).geometry.attributes.position.values=T$10.scaleToGeodeticHeight(b.geometry.attributes.position.values,y,i,!0),x.geometry=b.geometry),(s||l)&&(x.wall=!1,b.geometry=Te$q(x),$.push(b));var w=S.walls;x.wall=!0;for(var C=0;C<w.length;C++){var T=w[C];x.top=!1,x.bottom=!1,x.geometry=g$K.scaleToGeodeticHeightExtruded(T.geometry,g,y,i,a),T.geometry=Te$q(x),$.push(T)}}else for(_=0;_<p.length;_++){var P=new m$P({geometry:g$K.createGeometryFromPositions(i,p[_],n,a,t,u)});if(P.geometry.attributes.position.values=T$10.scaleToGeodeticHeight(P.geometry.attributes.position.values,g,i,!a),x.geometry=P.geometry,P.geometry=Te$q(x),t$$(e._offsetAttribute)){var E=P.geometry.attributes.position.values.length,A=new Uint8Array(E/3);d$10(A,e._offsetAttribute===_0x165ce0.NONE?0:1),P.geometry.attributes.applyOffset=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:A})}$.push(P)}var L=F$W.combineInstances($)[0];L.attributes.position.values=new Float64Array(L.attributes.position.values),L.indices=fe$u.createTypedArray(L.attributes.position.values.length/3,L.indices);var M=L.attributes,I=c$19.fromVertices(M.position.values);return t.position||delete M.position,new T$11({attributes:M,indices:L.indices,primitiveType:L.primitiveType,boundingSphere:I,offsetAttribute:e._offsetAttribute})}}},S$C.createShadowVolume=function(e,t,i){var n=e._granularity,r=e._ellipsoid,o=e._groundBottomAltitude+e._groundExtrudedHeight,a=e._groundBottomAltitude?e._groundBottomAltitude:t(n,r),s=o!==e._groundBottomAltitude?o:i(n,r);return new S$C({polygonHierarchy:e._polygonHierarchy,ellipsoid:r,stRotation:e._stRotation,granularity:n,perPositionHeight:!1,extrudedHeight:a,height:s,vertexFormat:n$12.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})},Object.defineProperties(S$C.prototype,{rectangle:{get:function(){if(!t$$(this._rectangle)){var e=this._polygonHierarchy.positions;this._rectangle=Ie$l(e,this._ellipsoid,this._arcType,this._granularity)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return t$$(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=it$d(this)),this._textureCoordinateRotationPoints}}});var Y$J=[],D$S=[];function q$X(e,t,i,n,r){var o=s$1h.fromPoints(t,e).projectPointsOntoPlane(t,Y$J);T$10.computeWindingOrder2D(o)===_0x2ee645.CLOCKWISE&&(o.reverse(),t=t.slice().reverse());var a,s,l=t.length,u=0;if(n)for(a=new Float64Array(2*l*3),s=0;s<l;s++){var c=t[s],h=t[(s+1)%l];a[u++]=c.x,a[u++]=c.y,a[u++]=c.z,a[u++]=h.x,a[u++]=h.y,a[u++]=h.z}else{var d=0;if(r===m$_.GEODESIC)for(s=0;s<l;s++)d+=g$K.subdivideLineCount(t[s],t[(s+1)%l],i);else if(r===m$_.RHUMB)for(s=0;s<l;s++)d+=g$K.subdivideRhumbLineCount(e,t[s],t[(s+1)%l],i);for(a=new Float64Array(3*d),s=0;s<l;s++){var f;r===m$_.GEODESIC?f=g$K.subdivideLine(t[s],t[(s+1)%l],i,D$S):r===m$_.RHUMB&&(f=g$K.subdivideRhumbLine(e,t[s],t[(s+1)%l],i,D$S));for(var p=f.length,_=0;_<p;++_)a[u++]=f[_]}}var m=2*(l=a.length/3),$=fe$u.createTypedArray(l,m);for(u=0,s=0;s<l-1;s++)$[u++]=s,$[u++]=s+1;return $[u++]=l-1,$[u++]=0,new m$P({geometry:new T$11({attributes:new t$W({position:new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:a})}),indices:$,primitiveType:H$11.LINES})})}function J$N(e,t,i,n,r){var o=s$1h.fromPoints(t,e).projectPointsOntoPlane(t,Y$J);T$10.computeWindingOrder2D(o)===_0x2ee645.CLOCKWISE&&(o.reverse(),t=t.slice().reverse());var a,s,l=t.length,u=new Array(l),c=0;if(n)for(a=new Float64Array(2*l*3*2),s=0;s<l;++s){u[s]=c/3;var h=t[s],d=t[(s+1)%l];a[c++]=h.x,a[c++]=h.y,a[c++]=h.z,a[c++]=d.x,a[c++]=d.y,a[c++]=d.z}else{var f=0;if(r===m$_.GEODESIC)for(s=0;s<l;s++)f+=g$K.subdivideLineCount(t[s],t[(s+1)%l],i);else if(r===m$_.RHUMB)for(s=0;s<l;s++)f+=g$K.subdivideRhumbLineCount(e,t[s],t[(s+1)%l],i);for(a=new Float64Array(3*f*2),s=0;s<l;++s){var p;u[s]=c/3,r===m$_.GEODESIC?p=g$K.subdivideLine(t[s],t[(s+1)%l],i,D$S):r===m$_.RHUMB&&(p=g$K.subdivideRhumbLine(e,t[s],t[(s+1)%l],i,D$S));for(var _=p.length,m=0;m<_;++m)a[c++]=p[m]}}l=a.length/6;var $=u.length,g=2*(2*l+$),y=fe$u.createTypedArray(l,g);for(c=0,s=0;s<l;++s)y[c++]=s,y[c++]=(s+1)%l,y[c++]=s+l,y[c++]=(s+1)%l+l;for(s=0;s<$;s++){var v=u[s];y[c++]=v,y[c++]=v+l}return new m$P({geometry:new T$11({attributes:new t$W({position:new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:a})}),indices:y,primitiveType:H$11.LINES})})}function O$J(e){if(n$1e.typeOf.object("options",e),n$1e.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),e.perPositionHeight&&t$$(e.height))throw new t$_("Cannot use both options.perPositionHeight and options.height");if(t$$(e.arcType)&&e.arcType!==m$_.GEODESIC&&e.arcType!==m$_.RHUMB)throw new t$_("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");var t=e.polygonHierarchy,i=e$1Y(e.ellipsoid,n$1c.WGS84),n=e$1Y(e.granularity,n$1d.RADIANS_PER_DEGREE),r=e$1Y(e.perPositionHeight,!1),o=r&&t$$(e.extrudedHeight),a=e$1Y(e.arcType,m$_.GEODESIC),s=e$1Y(e.height,0),l=e$1Y(e.extrudedHeight,s);if(!o){var u=Math.max(s,l);l=Math.min(s,l),s=u}this._ellipsoid=n$1c.clone(i),this._granularity=n,this._height=s,this._extrudedHeight=l,this._arcType=a,this._polygonHierarchy=t,this._perPositionHeight=r,this._perPositionHeightExtrude=o,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=g$K.computeHierarchyPackedLength(t)+n$1c.packedLength+8}O$J.pack=function(e,t,i){return n$1e.typeOf.object("value",e),n$1e.defined("array",t),i=e$1Y(i,0),i=g$K.packPolygonHierarchy(e._polygonHierarchy,t,i),n$1c.pack(e._ellipsoid,t,i),i+=n$1c.packedLength,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._granularity,t[i++]=e._perPositionHeightExtrude?1:0,t[i++]=e._perPositionHeight?1:0,t[i++]=e._arcType,t[i++]=e$1Y(e._offsetAttribute,-1),t[i]=e.packedLength,t};var Q$O=n$1c.clone(n$1c.UNIT_SPHERE),X$D={polygonHierarchy:{}};O$J.unpack=function(e,t,i){n$1e.defined("array",e),t=e$1Y(t,0);var n=g$K.unpackPolygonHierarchy(e,t);t=n.startingIndex,delete n.startingIndex;var r=n$1c.unpack(e,t,Q$O);t+=n$1c.packedLength;var o=e[t++],a=e[t++],s=e[t++],l=1===e[t++],u=1===e[t++],c=e[t++],h=e[t++],d=e[t];return t$$(i)||(i=new O$J(X$D)),i._polygonHierarchy=n,i._ellipsoid=n$1c.clone(r,i._ellipsoid),i._height=o,i._extrudedHeight=a,i._granularity=s,i._perPositionHeight=u,i._perPositionHeightExtrude=l,i._arcType=c,i._offsetAttribute=-1===h?void 0:h,i.packedLength=d,i},O$J.fromPositions=function(e){return e=e$1Y(e,e$1Y.EMPTY_OBJECT),n$1e.defined("options.positions",e.positions),new O$J({polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,arcType:e.arcType,offsetAttribute:e.offsetAttribute})},O$J.createGeometry=function(e){var t=e._ellipsoid,i=e._granularity,n=e._polygonHierarchy,r=e._perPositionHeight,o=e._arcType,a=g$K.polygonOutlinesFromHierarchy(n,!r,t);if(0!==a.length){var s,l,u=[],c=n$1d.chordLength(i,t.maximumRadius),h=e._height,d=e._extrudedHeight;if(e._perPositionHeightExtrude||!n$1d.equalsEpsilon(h,d,0,n$1d.EPSILON2))for(l=0;l<a.length;l++){if((s=J$N(t,a[l],c,r,o)).geometry=g$K.scaleToGeodeticHeightExtruded(s.geometry,h,d,t,r),t$$(e._offsetAttribute)){var f=s.geometry.attributes.position.values.length/3,p=new Uint8Array(f);e._offsetAttribute===_0x165ce0.TOP?p=d$10(p,1,0,f/2):p=d$10(p,e._offsetAttribute===_0x165ce0.NONE?0:1),s.geometry.attributes.applyOffset=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:p})}u.push(s)}else for(l=0;l<a.length;l++){if((s=q$X(t,a[l],c,r,o)).geometry.attributes.position.values=T$10.scaleToGeodeticHeight(s.geometry.attributes.position.values,h,t,!r),t$$(e._offsetAttribute)){var _=s.geometry.attributes.position.values.length,m=new Uint8Array(_/3);d$10(m,e._offsetAttribute===_0x165ce0.NONE?0:1),s.geometry.attributes.applyOffset=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}u.push(s)}var $=F$W.combineInstances(u)[0],g=c$19.fromVertices($.attributes.position.values);return new T$11({attributes:$.attributes,indices:$.indices,primitiveType:$.primitiveType,boundingSphere:g,offsetAttribute:e._offsetAttribute})}};var mr$2=[];function Or$3(e,t,i,n,r){var o=mr$2;o.length=r;var a,s=i.red,l=i.green,u=i.blue,c=i.alpha,h=n.red,d=n.green,f=n.blue,p=n.alpha;if(e$1z.equals(i,n)){for(a=0;a<r;a++)o[a]=e$1z.clone(i);return o}var _=(h-s)/r,m=(d-l)/r,$=(f-u)/r,g=(p-c)/r;for(a=0;a<r;a++)o[a]=new e$1z(s+a*_,l+a*m,u+a*$,c+a*g);return o}function R$H(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).positions,i=e.colors,n=e$1Y(e.width,1),r=e$1Y(e.hMax,-1),o=e$1Y(e.colorsPerVertex,!1);if(!t$$(t)||t.length<2)throw new t$_("At least two positions are required.");if("number"!=typeof n)throw new t$_("width must be a number");if(t$$(i)&&(o&&i.length<t.length||!o&&i.length<t.length-1))throw new t$_("colors has an invalid length.");this._positions=t,this._colors=i,this._width=n,this._hMax=r,this._colorsPerVertex=o,this._dist=e.dist,this._period=e.period,this._vertexFormat=n$12.clone(e$1Y(e.vertexFormat,n$12.DEFAULT)),this._followSurface=e$1Y(e.followSurface,!0),t$$(e.followSurface)&&(i$1b("PolylineGeometry.followSurface","PolylineGeometry.followSurface is deprecated and will be removed in Cesium 1.55. Use PolylineGeometry.arcType instead."),e.arcType=e.followSurface?m$_.GEODESIC:m$_.NONE),this._arcType=e$1Y(e.arcType,m$_.GEODESIC),this._followSurface=this._arcType!==m$_.NONE,this._granularity=e$1Y(e.granularity,n$1d.RADIANS_PER_DEGREE),this._ellipsoid=n$1c.clone(e$1Y(e.ellipsoid,n$1c.WGS84)),this._workerName="createPolylineGeometry";var a=1+t.length*a$11.packedLength;a+=t$$(i)?1+i.length*e$1z.packedLength:1,this.packedLength=a+n$1c.packedLength+n$12.packedLength+4+2}R$H.pack=function(e,t,i){if(!t$$(e))throw new t$_("value is required");if(!t$$(t))throw new t$_("array is required");i=e$1Y(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=a$11.packedLength)a$11.pack(r[n],t,i);var a=e._colors;for(o=t$$(a)?a.length:0,t[i++]=o,n=0;n<o;++n,i+=e$1z.packedLength)e$1z.pack(a[n],t,i);return n$1c.pack(e._ellipsoid,t,i),i+=n$1c.packedLength,n$12.pack(e._vertexFormat,t,i),i+=n$12.packedLength,t[i++]=e._width,t[i++]=e._colorsPerVertex?1:0,t[i++]=e._arcType,t[i++]=e._granularity,t[i++]=e._hMax,t[i++]=e._dist,t[i]=e._period,t};var hr$2=n$1c.clone(n$1c.UNIT_SPHERE),dr$2=new n$12,w$T={positions:void 0,colors:void 0,ellipsoid:hr$2,vertexFormat:dr$2,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};R$H.unpack=function(e,t,i){if(!t$$(e))throw new t$_("array is required");t=e$1Y(t,0);var n,r=e[t++],o=new Array(r);for(n=0;n<r;++n,t+=a$11.packedLength)o[n]=a$11.unpack(e,t);var a=(r=e[t++])>0?new Array(r):void 0;for(n=0;n<r;++n,t+=e$1z.packedLength)a[n]=e$1z.unpack(e,t);var s=n$1c.unpack(e,t,hr$2);t+=n$1c.packedLength;var l=n$12.unpack(e,t,dr$2);t+=n$12.packedLength;var u=e[t++],c=1===e[t++],h=e[t++],d=e[t++],f=e[t++],p=1==e[t++],_=e[t];return t$$(i)?(i._positions=o,i._colors=a,i._ellipsoid=n$1c.clone(s,i._ellipsoid),i._vertexFormat=n$12.clone(l,i._vertexFormat),i._width=u,i._colorsPerVertex=c,i._arcType=h,i._granularity=d,i._hMax=f,i._dist=p,i._period=_,i):(w$T.positions=o,w$T.colors=a,w$T.width=u,w$T.colorsPerVertex=c,w$T.arcType=h,w$T.granularity=d,w$T.hMax=f,w$T.dist=p,w$T.period=_,new R$H(w$T))};var fr$3=new a$11,vr$3=new a$11,yr$1=new a$11,_r$2=new a$11;function ae$y(e,t,i,n){var r=e.combinedPositions,o=e.combinedLocalPositions,a=new t$W;n.position&&(a.position=new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:r}));var s,l,u,c,h,d,f=t.length,p=r.length/3,_=(p-2*f)/(2*f),m=T$10.triangulate(t),$=(_-1)*f*6+2*m.length,g=fe$u.createTypedArray(p,$),y=2*f,v=0;for(s=0;s<_-1;s++){for(l=0;l<f-1;l++)d=(u=2*l+s*f*2)+y,h=(c=u+1)+y,g[v++]=c,g[v++]=u,g[v++]=h,g[v++]=h,g[v++]=u,g[v++]=d;h=(c=(u=2*f-2+s*f*2)+1)+y,d=u+y,g[v++]=c,g[v++]=u,g[v++]=h,g[v++]=h,g[v++]=u,g[v++]=d}if(n.st||n.tangent||n.bitangent){var x,b,S=new Float32Array(2*p),w=1/(_-1),C=1/i.height,T=i.height/2,P=0;for(s=0;s<_;s++){for(x=s*w,b=C*(t[0].y+T),S[P++]=x,S[P++]=b,l=1;l<f;l++)b=C*(t[l].y+T),S[P++]=x,S[P++]=b,S[P++]=x,S[P++]=b;b=C*(t[0].y+T),S[P++]=x,S[P++]=b}for(l=0;l<f;l++)x=0,b=C*(t[l].y+T),S[P++]=x,S[P++]=b;for(l=0;l<f;l++)x=(_-1)*w,b=C*(t[l].y+T),S[P++]=x,S[P++]=b;a.st=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:2,values:new Float32Array(S)})}var E=p-2*f;for(s=0;s<m.length;s+=3){var A=m[s]+E,L=m[s+1]+E,M=m[s+2]+E;g[v++]=A,g[v++]=L,g[v++]=M,g[v++]=M+f,g[v++]=L+f,g[v++]=A+f}var I=new T$11({attributes:a,indices:g,boundingSphere:c$19.fromVertices(r),primitiveType:H$11.TRIANGLES});if(n.normal&&(I=F$W.computeNormal(I)),n.tangent||n.bitangent){try{I=F$W.computeTangentAndBitangent(I)}catch{e$1Q("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}n.tangent||(I.attributes.tangent=void 0),n.bitangent||(I.attributes.bitangent=void 0),n.st||(I.attributes.st=void 0)}return t$$(o)&&(I.attributes.position.values=o,I.attributes.position.componentDatatype=C$12.FLOAT),I}function N$Q(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).polylinePositions,i=e.shapePositions;if(!t$$(t))throw new t$_("options.polylinePositions is required.");if(!t$$(i))throw new t$_("options.shapePositions is required.");this._positions=t,this._shape=i,this._ellipsoid=n$1c.clone(e$1Y(e.ellipsoid,n$1c.WGS84)),this._cornerType=e$1Y(e.cornerType,ie$D.ROUNDED),this._vertexFormat=n$12.clone(e$1Y(e.vertexFormat,n$12.DEFAULT)),this._granularity=e$1Y(e.granularity,n$1d.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry",this.enuCenter=e$1Y(e.enuCenter,a$11.ZERO);var n=1+t.length*a$11.packedLength;n+=1+i.length*r$T.packedLength+a$11.packedLength,this.packedLength=n+n$1c.packedLength+n$12.packedLength+2}R$H.createGeometry=function(e){var t,i,n,r=e._width,o=e._hMax,a=e._vertexFormat,s=e._colors,l=e._colorsPerVertex,u=e._arcType,c=e._granularity,h=e._ellipsoid,d=e._dist,f=e._period,p=u$11(e._positions,a$11.equalsEpsilon),_=p.length;if(!(_<2||r<=0)){if(u===m$_.GEODESIC||u===m$_.RHUMB){var m,$;u===m$_.GEODESIC?(m=n$1d.chordLength(c,h.maximumRadius),$=v$V.numberOfPoints):(m=c,$=v$V.numberOfPointsRhumbLine);var g=v$V.extractHeights(p,h);if(t$$(s)){var y=1;for(t=0;t<_-1;++t)y+=$(p[t],p[t+1],m);var v=new Array(y),x=0;for(t=0;t<_-1;++t){var b=p[t],S=p[t+1],w=s[t],C=$(b,S,m);if(l&&t<y){var T=Or$3(b,S,w,s[t+1],C),P=T.length;for(i=0;i<P;++i)v[x++]=T[i]}else for(i=0;i<C;++i)v[x++]=e$1z.clone(w)}v[x]=e$1z.clone(s[s.length-1]),s=v,mr$2.length=0}p=u===m$_.GEODESIC?v$V.generateCartesianArc({positions:p,minDistance:m,ellipsoid:h,height:g,hMax:o}):v$V.generateCartesianRhumbArc({positions:p,granularity:m,ellipsoid:h,height:g})}var E,A=4*(_=p.length)-4,L=new Float64Array(3*A),M=new Float64Array(3*A),I=new Float64Array(3*A),O=new Float32Array(2*A),D=a.st?new Float32Array(2*A):void 0,R=t$$(s)?new Uint8Array(4*A):void 0,N=d?new Float32Array(3*A):void 0,F=0,B=0,z=0,G=0,k=0,U=0;for(i=0;i<_;++i){var V,W;0===i?(E=fr$3,a$11.subtract(p[0],p[1],E),a$11.add(p[0],E,E)):E=p[i-1],a$11.clone(E,yr$1),a$11.clone(p[i],vr$3),i===_-1?(E=fr$3,a$11.subtract(p[_-1],p[_-2],E),a$11.add(p[_-1],E,E)):E=p[i+1],a$11.clone(E,_r$2),t$$(R)&&(V=0===i||l?s[i]:s[i-1],i!==_-1&&(W=s[i]));var H=i===_-1?2:4;for(n=0===i?2:0;n<H;++n){a$11.pack(vr$3,L,F),a$11.pack(yr$1,M,F),a$11.pack(_r$2,I,F),F+=3;var Y=n-2<0?-1:1,j=n%2*2-1,q=j*i/_;if(O[B++]=o>0?q:j,O[B++]=Y*r,a.st&&(D[z++]=i/(_-1),D[z++]=Math.max(O[B-2],0)),t$$(R)){var X=n<2?V:W;R[G++]=e$1z.floatToByte(X.red),R[G++]=e$1z.floatToByte(X.green),R[G++]=e$1z.floatToByte(X.blue),R[G++]=e$1z.floatToByte(X.alpha)}d&&(N[3*k]=U,k++)}U+=a$11.distance(E,p[i])}if(d){var K=U,Z=Math.random()*(f>0?f:K);for(i=0;i<A;i++)N[3*i+1]=K,N[3*i+2]=Z}var J=new t$W;J.position=new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:L}),J.prevPosition=new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:M}),J.nextPosition=new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:I}),J.expandAndWidth=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:2,values:O}),a.st&&(J.st=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:2,values:D})),t$$(R)&&(J.color=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:4,values:R,normalize:!0})),d&&(J.dist=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:N}));var Q=fe$u.createTypedArray(A,6*_-6),ee=0,te=0,ie=_-1;for(i=0;i<ie;++i)Q[te++]=ee,Q[te++]=ee+2,Q[te++]=ee+1,Q[te++]=ee+1,Q[te++]=ee+2,Q[te++]=ee+3,ee+=4;return new T$11({attributes:J,indices:Q,primitiveType:H$11.TRIANGLES,boundingSphere:c$19.fromPoints(p),geometryType:_0x348fdd.POLYLINES})}},N$Q.pack=function(e,t,i){if(!t$$(e))throw new t$_("value is required");if(!t$$(t))throw new t$_("array is required");i=e$1Y(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=a$11.packedLength)a$11.pack(r[n],t,i);var a=e._shape;for(o=a.length,t[i++]=o,n=0;n<o;++n,i+=r$T.packedLength)r$T.pack(a[n],t,i);return n$1c.pack(e._ellipsoid,t,i),i+=n$1c.packedLength,n$12.pack(e._vertexFormat,t,i),i+=n$12.packedLength,t[i++]=e._cornerType,t[i++]=e._granularity,a$11.pack(e.enuCenter,t,i),t};var z$D=n$1c.clone(n$1c.UNIT_SPHERE),Q$N=new n$12,F$L={polylinePositions:void 0,shapePositions:void 0,ellipsoid:z$D,vertexFormat:Q$N,cornerType:void 0,granularity:void 0,enuCenter:void 0};N$Q.unpack=function(e,t,i){if(!t$$(e))throw new t$_("array is required");t=e$1Y(t,0);var n,r=e[t++],o=new Array(r);for(n=0;n<r;++n,t+=a$11.packedLength)o[n]=a$11.unpack(e,t);r=e[t++];var a=new Array(r);for(n=0;n<r;++n,t+=r$T.packedLength)a[n]=r$T.unpack(e,t);var s=n$1c.unpack(e,t,z$D);t+=n$1c.packedLength;var l=n$12.unpack(e,t,Q$N);t+=n$12.packedLength;var u,c=e[t++],h=e[t++];return u=a$11.unpack(e,t),t$$(i)?(i._positions=o,i._shape=a,i._ellipsoid=n$1c.clone(s,i._ellipsoid),i._vertexFormat=n$12.clone(l,i._vertexFormat),i._cornerType=c,i._granularity=h,i.enuCenter=u,i):(F$L.polylinePositions=o,F$L.shapePositions=a,F$L.cornerType=c,F$L.granularity=h,F$L.enuCenter=u,new N$Q(F$L))};var pe$p=new n$13;function W$W(e,t){var i=new t$W;i.position=new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:e});var n,r,o=t.length,a=i.position.values.length/3,s=e.length/3/o,l=fe$u.createTypedArray(a,2*o*(s+1)),u=0,c=(n=0)*o;for(r=0;r<o-1;r++)l[u++]=r+c,l[u++]=r+c+1;for(l[u++]=o-1+c,l[u++]=c,c=(n=s-1)*o,r=0;r<o-1;r++)l[u++]=r+c,l[u++]=r+c+1;for(l[u++]=o-1+c,l[u++]=c,n=0;n<s-1;n++){var h=o*n,d=h+o;for(r=0;r<o;r++)l[u++]=r+h,l[u++]=r+d}return new T$11({attributes:i,indices:fe$u.createTypedArray(a,l),boundingSphere:c$19.fromVertices(e),primitiveType:H$11.LINES})}function v$N(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).polylinePositions,i=e.shapePositions;if(!t$$(t))throw new t$_("options.polylinePositions is required.");if(!t$$(i))throw new t$_("options.shapePositions is required.");this._positions=t,this._shape=i,this._ellipsoid=n$1c.clone(e$1Y(e.ellipsoid,n$1c.WGS84)),this._cornerType=e$1Y(e.cornerType,ie$D.ROUNDED),this._granularity=e$1Y(e.granularity,n$1d.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";var n=1+t.length*a$11.packedLength;n+=1+i.length*r$T.packedLength,this.packedLength=n+n$1c.packedLength+2}N$Q.createGeometry=function(e){for(var t=u$11(e._positions,a$11.equalsEpsilon),i=t.length,n=new Array(i),r=0;r<i;r++)n[r]=a$11.clone(t[r]);var o=e._shape;if(o=K$L.removeDuplicatesFromShape(o),!(t.length<2||o.length<3)){T$10.computeWindingOrder2D(o)===_0x2ee645.CLOCKWISE&&o.reverse();var a=n$13.fromPoints(o,pe$p),s={};if(s.combinedPositions=K$L.computePositions(n,o,a,e,!0),!a$11.equals(e.enuCenter,a$11.ZERO)){var l=new Array(i);for(r=0;r<i;r++)l[r]=a$11.clone(t[r]);s.combinedLocalPositions=K$L.computeLocalPositions(l,o,a,e,!0,e.enuCenter)}return ae$y(s,o,a,e._vertexFormat)}},v$N.pack=function(e,t,i){if(!t$$(e))throw new t$_("value is required");if(!t$$(t))throw new t$_("array is required");i=e$1Y(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=a$11.packedLength)a$11.pack(r[n],t,i);var a=e._shape;for(o=a.length,t[i++]=o,n=0;n<o;++n,i+=r$T.packedLength)r$T.pack(a[n],t,i);return n$1c.pack(e._ellipsoid,t,i),i+=n$1c.packedLength,t[i++]=e._cornerType,t[i]=e._granularity,t};var L$O=n$1c.clone(n$1c.UNIT_SPHERE),_$M={polylinePositions:void 0,shapePositions:void 0,ellipsoid:L$O,height:void 0,cornerType:void 0,granularity:void 0};v$N.unpack=function(e,t,i){if(!t$$(e))throw new t$_("array is required");t=e$1Y(t,0);var n,r=e[t++],o=new Array(r);for(n=0;n<r;++n,t+=a$11.packedLength)o[n]=a$11.unpack(e,t);r=e[t++];var a=new Array(r);for(n=0;n<r;++n,t+=r$T.packedLength)a[n]=r$T.unpack(e,t);var s=n$1c.unpack(e,t,L$O);t+=n$1c.packedLength;var l=e[t++],u=e[t];return t$$(i)?(i._positions=o,i._shape=a,i._ellipsoid=n$1c.clone(s,i._ellipsoid),i._cornerType=l,i._granularity=u,i):(_$M.polylinePositions=o,_$M.shapePositions=a,_$M.cornerType=l,_$M.granularity=u,new v$N(_$M))};var B$D=new n$13;v$N.createGeometry=function(e){var t=u$11(e._positions,a$11.equalsEpsilon),i=e._shape;if(i=K$L.removeDuplicatesFromShape(i),!(t.length<2||i.length<3)){T$10.computeWindingOrder2D(i)===_0x2ee645.CLOCKWISE&&i.reverse();var n=n$13.fromPoints(i,B$D);return W$W(K$L.computePositions(t,i,n,e,!1),i)}};var e$1a={TMERC:"tmerc",ALBERS:"aea",LCC:"lcc",UTM:"utm"},ProjectionName=Object.freeze(e$1a);function c$P(e){var t=e.points,i=e.times;return function(n,r){t$$(r)||(r=new a$U);var o=e._lastTimeIndex=e.findTimeInterval(n,e._lastTimeIndex),a=(n-i[o])/(i[o+1]-i[o]),s=t[o],l=t[o+1];return a$U.fastSlerp(s,l,a,r)}}function n$R(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).points,i=e.times;if(!t$$(t)||!t$$(i))throw new t$_("points and times are required.");if(t.length<2)throw new t$_("points.length must be greater than or equal to 2.");if(i.length!==t.length)throw new t$_("times.length must be equal to points.length.");this._times=i,this._points=t,this._evaluateFunction=c$P(this),this._lastTimeIndex=0}function p$Y(e,t){if(!(this instanceof p$Y))return new p$Y(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&this._initFormat(t),this.clear()}function E$N(e,t,i){if(!i)return t.indexOf(e);for(var n=0;n<t.length;n++)if(i(e,t[n]))return n;return-1}function u$P(e,t){x$P(e,0,e.children.length,t,e)}function x$P(e,t,i,n,r){r||(r=f$P(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o,a=t;a<i;a++)o=e.children[a],d$N(r,e.leaf?n(o):o);return r}function d$N(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function B$C(e,t){return e.minX-t.minX}function v$M(e,t){return e.minY-t.minY}function Y$I(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function M$V(e){return e.maxX-e.minX+(e.maxY-e.minY)}function w$S(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function F$K(e,t){var i=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,r-i)*Math.max(0,o-n)}function g$D(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function X$C(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function f$P(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function b$12(e,t,i,n,r){for(var o,a=[t,i];a.length;)!((i=a.pop())-(t=a.pop())<=n)&&(b$1g(e,o=t+Math.ceil((i-t)/n/2)*n,t,i,r),a.push(t,o,o,i))}function o$K(){this._tree=p$Y()}function n$Q(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.id=""}function f$O(e,t){return e.id===t.id}Object.defineProperties(n$R.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),n$R.prototype.findTimeInterval=i$13.prototype.findTimeInterval,n$R.prototype.wrapTime=i$13.prototype.wrapTime,n$R.prototype.clampTime=i$13.prototype.clampTime,n$R.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)},p$Y.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,i=[],n=this.toBBox;if(!X$C(e,t))return i;for(var r,o,a,s,l=[];t;){for(r=0,o=t.children.length;r<o;r++)a=t.children[r],X$C(e,s=t.leaf?n(a):a)&&(t.leaf?i.push(a):g$D(e,s)?this._all(a,i):l.push(a));t=l.pop()}return i},collides:function(e){var t=this.data,i=this.toBBox;if(!X$C(e,t))return!1;for(var n,r,o,a,s=[];t;){for(n=0,r=t.children.length;n<r;n++)if(o=t.children[n],X$C(e,a=t.leaf?i(o):o)){if(t.leaf||g$D(e,a))return!0;s.push(o)}t=s.pop()}return!1},load:function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}var n=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},insert:function(e){return e&&this._insert(e,this.data.height-1),this},clear:function(){return this.data=f$P([]),this},remove:function(e,t){if(!e)return this;for(var i,n,r,o,a=this.data,s=this.toBBox(e),l=[],u=[];a||l.length;){if(a||(a=l.pop(),n=l[l.length-1],i=u.pop(),o=!0),a.leaf&&-1!==(r=E$N(e,a.children,t)))return a.children.splice(r,1),l.push(a),this._condense(l),this;o||a.leaf||!g$D(a,s)?n?(i++,a=n.children[i],o=!1):a=null:(l.push(a),u.push(i),i=0,n=a,a=a.children[0])}return this},toBBox:function(e){return e},compareMinX:B$C,compareMinY:v$M,toJSON:function(){return this.data},fromJSON:function(e){return this.data=e,this},_all:function(e,t){for(var i=[];e;)e.leaf?t.push.apply(t,e.children):i.push.apply(i,e.children),e=i.pop();return t},_build:function(e,t,i,n){var r,o=i-t+1,a=this._maxEntries;if(o<=a)return u$P(r=f$P(e.slice(t,i+1)),this.toBBox),r;n||(n=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,n-1))),(r=f$P([])).leaf=!1,r.height=n;var s,l,u,c,h=Math.ceil(o/a),d=h*Math.ceil(Math.sqrt(a));for(b$12(e,t,i,d,this.compareMinX),s=t;s<=i;s+=d)for(b$12(e,s,u=Math.min(s+d-1,i),h,this.compareMinY),l=s;l<=u;l+=h)c=Math.min(l+h-1,u),r.children.push(this._build(e,l,c,n-1));return u$P(r,this.toBBox),r},_chooseSubtree:function(e,t,i,n){for(var r,o,a,s,l,u,c,h;n.push(t),!t.leaf&&n.length-1!==i;){for(c=h=1/0,r=0,o=t.children.length;r<o;r++)l=Y$I(a=t.children[r]),(u=w$S(e,a)-l)<h?(h=u,c=l<c?l:c,s=a):u===h&&l<c&&(c=l,s=a);t=s||t.children[0]}return t},_insert:function(e,t,i){var n=this.toBBox,r=i?e:n(e),o=[],a=this._chooseSubtree(r,this.data,t,o);for(a.children.push(e),d$N(a,r);t>=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(r,o,t)},_split:function(e,t){var i=e[t],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);var o=this._chooseSplitIndex(i,r,n),a=f$P(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,u$P(i,this.toBBox),u$P(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(e,t){this.data=f$P([e,t]),this.data.height=e.height+1,this.data.leaf=!1,u$P(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,i){var n,r,o,a,s,l,u,c;for(l=u=1/0,n=t;n<=i-t;n++)a=F$K(r=x$P(e,0,n,this.toBBox),o=x$P(e,n,i,this.toBBox)),s=Y$I(r)+Y$I(o),a<l?(l=a,c=n,u=s<u?s:u):a===l&&s<u&&(u=s,c=n);return c},_chooseSplitAxis:function(e,t,i){var n=e.leaf?this.compareMinX:B$C,r=e.leaf?this.compareMinY:v$M;this._allDistMargin(e,t,i,n)<this._allDistMargin(e,t,i,r)&&e.children.sort(n)},_allDistMargin:function(e,t,i,n){e.children.sort(n);var r,o,a=this.toBBox,s=x$P(e,0,t,a),l=x$P(e,i-t,i,a),u=M$V(s)+M$V(l);for(r=t;r<i-t;r++)o=e.children[r],d$N(s,e.leaf?a(o):o),u+=M$V(s);for(r=i-t-1;r>=t;r--)o=e.children[r],d$N(l,e.leaf?a(o):o),u+=M$V(l);return u},_adjustParentBBoxes:function(e,t,i){for(var n=i;n>=0;n--)d$N(t[n],e)},_condense:function(e){for(var t,i=e.length-1;i>=0;i--)0===e[i].children.length?i>0?(t=e[i-1].children).splice(t.indexOf(e[i]),1):this.clear():u$P(e[i],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}},n$Q.fromRectangleAndId=function(e,t,i){return i.minX=t.west,i.minY=t.south,i.maxX=t.east,i.maxY=t.north,i.id=e,i},o$K.prototype.insert=function(e,t){n$1e.typeOf.string("id",e),n$1e.typeOf.object("rectangle",t);var i=n$Q.fromRectangleAndId(e,t,new n$Q);this._tree.insert(i)};var a$E=new n$Q;o$K.prototype.remove=function(e,t){n$1e.typeOf.string("id",e),n$1e.typeOf.object("rectangle",t);var i=n$Q.fromRectangleAndId(e,t,a$E);this._tree.remove(i,f$O)};var m$K=new n$Q;o$K.prototype.collides=function(e){n$1e.typeOf.object("rectangle",e);var t=n$Q.fromRectangleAndId("",e,m$K);return this._tree.collides(t)};var q$W=Math.cos,z$C=Math.sin,F$J=Math.sqrt,W$V={computePosition:function(e,t,i,n,r,o,a){var s=t.radiiSquared,l=e.nwCorner,u=e.boundingRectangle,c=l.latitude-e.granYCos*n+r*e.granXSin,h=q$W(c),d=z$C(c),f=s.z*d,p=l.longitude+n*e.granYSin+r*e.granXCos,_=h*q$W(p),m=h*z$C(p),$=s.x*_,g=s.y*m,y=F$J($*_+g*m+f*d);if(o.x=$/y,o.y=g/y,o.z=f/y,i){var v=e.stNwCorner;t$$(v)?(c=v.latitude-e.stGranYCos*n+r*e.stGranXSin,p=v.longitude+n*e.stGranYSin+r*e.stGranXCos,a.x=(p-e.stWest)*e.lonScalar,a.y=(c-e.stSouth)*e.latScalar):(a.x=(p-u.west)*e.lonScalar,a.y=(c-u.south)*e.latScalar)}}},H$N=new u$14,h$S=new a$11,J$M=new i$1g,P$I=new a$11,b$11=new s$1q;function N$P(e,t,i,n,r,o,a){var s=Math.cos(t),l=n*s,u=i*s,c=Math.sin(t),h=n*c,d=i*c;h$S=b$11.project(e,h$S),h$S=a$11.subtract(h$S,P$I,h$S);var f=u$14.fromRotation(t,H$N);h$S=u$14.multiplyByVector(f,h$S,h$S),h$S=a$11.add(h$S,P$I,h$S),o-=1,a-=1;var p=(e=b$11.unproject(h$S,e)).latitude,_=p+o*d,m=p-l*a,$=p-l*a+o*d,g=Math.max(p,_,m,$),y=Math.min(p,_,m,$),v=e.longitude,x=v+o*u,b=v+a*h,S=v+a*h+o*u;return{north:g,south:y,east:Math.max(v,x,b,S),west:Math.min(v,x,b,S),granYCos:l,granYSin:h,granXCos:u,granXSin:d,nwCorner:e}}W$V.computeOptions=function(e,t,i,n,r,o,a){var s=e.east,l=e.west,u=e.north,c=e.south,h=!1,d=!1;u===n$1d.PI_OVER_TWO&&(h=!0),c===-n$1d.PI_OVER_TWO&&(d=!0);var f,p,_,m,$,g=u-c;_=($=l>s?n$1d.TWO_PI-l+s:s-l)/((f=Math.ceil($/t)+1)-1),m=g/((p=Math.ceil(g/t)+1)-1);var y=s$1p.northwest(e,o),v=s$1p.center(e,J$M);(0!==i||0!==n)&&(v.longitude<y.longitude&&(v.longitude+=n$1d.TWO_PI),P$I=b$11.project(v,P$I));var x=m,b=_,S=s$1p.clone(e,r),w={granYCos:x,granYSin:0,granXCos:b,granXSin:0,nwCorner:y,boundingRectangle:S,width:f,height:p,northCap:h,southCap:d};if(0!==i){var C=N$P(y,i,_,m,v,f,p);if(u=C.north,c=C.south,s=C.east,l=C.west,u<-n$1d.PI_OVER_TWO||u>n$1d.PI_OVER_TWO||c<-n$1d.PI_OVER_TWO||c>n$1d.PI_OVER_TWO)throw new t$_("Rotated rectangle is invalid. It crosses over either the north or south pole.");w.granYCos=C.granYCos,w.granYSin=C.granYSin,w.granXCos=C.granXCos,w.granXSin=C.granXSin,S.north=u,S.south=c,S.east=s,S.west=l}if(0!==n){i-=n;var T=s$1p.northwest(S,a),P=N$P(T,i,_,m,v,f,p);w.stGranYCos=P.granYCos,w.stGranXCos=P.granXCos,w.stGranYSin=P.granYSin,w.stGranXSin=P.granXSin,w.stNwCorner=T,w.stWest=P.west,w.stSouth=P.south}return w};var Dt$4=new a$11,Mt$7=new a$11,zt$7=new a$11,qt$6=new a$11,jt$7=new s$1p,ae$x=new r$T,ne$v=new c$19,ie$y=new c$19;function Yt$6(e,t){var i=new T$11({attributes:new t$W,primitiveType:H$11.TRIANGLES});return i.attributes.position=new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:t.positions}),e.normal&&(i.attributes.normal=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:t.normals})),e.tangent&&(i.attributes.tangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:t.tangents})),e.bitangent&&(i.attributes.bitangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:t.bitangents})),i}function se$t(e,t,i,n){var r=e.length,o=t.normal?new Float32Array(r):void 0,a=t.tangent?new Float32Array(r):void 0,s=t.bitangent?new Float32Array(r):void 0,l=0,u=qt$6,c=zt$7,h=Mt$7;if(t.normal||t.tangent||t.bitangent)for(var d=0;d<r;d+=3){var f=a$11.fromArray(e,d,Dt$4),p=l+1,_=l+2;h=i.geodeticSurfaceNormal(f,h),(t.tangent||t.bitangent)&&(a$11.cross(a$11.UNIT_Z,h,c),r$W.multiplyByVector(n,c,c),a$11.normalize(c,c),t.bitangent&&a$11.normalize(a$11.cross(h,c,u),u)),t.normal&&(o[l]=h.x,o[p]=h.y,o[_]=h.z),t.tangent&&(a[l]=c.x,a[p]=c.y,a[_]=c.z),t.bitangent&&(s[l]=u.x,s[p]=u.y,s[_]=u.z),l+=3}return Yt$6(t,{positions:e,normals:o,tangents:a,bitangents:s})}var Tt$7=new a$11,Bt$8=new a$11;function le$t(e,t,i){var n=e.length,r=t.normal?new Float32Array(n):void 0,o=t.tangent?new Float32Array(n):void 0,a=t.bitangent?new Float32Array(n):void 0,s=0,l=0,u=0,c=!0,h=qt$6,d=zt$7,f=Mt$7;if(t.normal||t.tangent||t.bitangent)for(var p=0;p<n;p+=6){var _=a$11.fromArray(e,p,Dt$4),m=a$11.fromArray(e,(p+6)%n,Tt$7);if(c){var $=a$11.fromArray(e,(p+3)%n,Bt$8);a$11.subtract(m,_,m),a$11.subtract($,_,$),f=a$11.normalize(a$11.cross($,m,f),f),c=!1}a$11.equalsEpsilon(m,_,n$1d.EPSILON10)&&(c=!0),(t.tangent||t.bitangent)&&(h=i.geodeticSurfaceNormal(_,h),t.tangent&&(d=a$11.normalize(a$11.cross(h,f,d),d))),t.normal&&(r[s++]=f.x,r[s++]=f.y,r[s++]=f.z,r[s++]=f.x,r[s++]=f.y,r[s++]=f.z),t.tangent&&(o[l++]=d.x,o[l++]=d.y,o[l++]=d.z,o[l++]=d.x,o[l++]=d.y,o[l++]=d.z),t.bitangent&&(a[u++]=h.x,a[u++]=h.y,a[u++]=h.z,a[u++]=h.x,a[u++]=h.y,a[u++]=h.z)}return Yt$6(t,{positions:e,normals:r,tangents:o,bitangents:a})}function Qt$7(e,t){var i=e._vertexFormat,n=e._ellipsoid,r=t.height,o=t.width,a=t.northCap,s=t.southCap,l=0,u=r,c=r,h=0;a&&(l=1,c-=1,h+=1),s&&(u-=1,c-=1,h+=1),h+=o*c;for(var d=i.position?new Float64Array(3*h):void 0,f=i.st?new Float32Array(2*h):void 0,p=0,_=0,m=Dt$4,$=ae$x,g=Number.MAX_VALUE,y=Number.MAX_VALUE,v=-Number.MAX_VALUE,x=-Number.MAX_VALUE,b=l;b<u;++b)for(var S=0;S<o;++S)W$V.computePosition(t,n,i.st,b,S,m,$),d[p++]=m.x,d[p++]=m.y,d[p++]=m.z,i.st&&(f[_++]=$.x,f[_++]=$.y,g=Math.min(g,$.x),y=Math.min(y,$.y),v=Math.max(v,$.x),x=Math.max(x,$.y));if(a&&(W$V.computePosition(t,n,i.st,0,0,m,$),d[p++]=m.x,d[p++]=m.y,d[p++]=m.z,i.st&&(f[_++]=$.x,f[_++]=$.y,g=$.x,y=$.y,v=$.x,x=$.y)),s&&(W$V.computePosition(t,n,i.st,r-1,0,m,$),d[p++]=m.x,d[p++]=m.y,d[p]=m.z,i.st&&(f[_++]=$.x,f[_]=$.y,g=Math.min(g,$.x),y=Math.min(y,$.y),v=Math.max(v,$.x),x=Math.max(x,$.y))),i.st&&(g<0||y<0||v>1||x>1))for(var w=0;w<f.length;w+=2)f[w]=(f[w]-g)/(v-g),f[w+1]=(f[w+1]-y)/(x-y);var C=se$t(d,i,n,t.tangentRotationMatrix),T=6*(o-1)*(c-1);a&&(T+=3*(o-1)),s&&(T+=3*(o-1));var P,E=fe$u.createTypedArray(h,T),A=0,L=0;for(P=0;P<c-1;++P){for(var M=0;M<o-1;++M){var I=A,O=I+o,D=O+1,R=I+1;E[L++]=I,E[L++]=O,E[L++]=R,E[L++]=R,E[L++]=O,E[L++]=D,++A}++A}if(a||s){var N,F,B=h-1,z=h-1;if(a&&s&&(B=h-2),A=0,a)for(P=0;P<o-1;P++)F=(N=A)+1,E[L++]=B,E[L++]=N,E[L++]=F,++A;if(s)for(A=(c-1)*o,P=0;P<o-1;P++)F=(N=A)+1,E[L++]=N,E[L++]=z,E[L++]=F,++A}return C.indices=E,i.st&&(C.attributes.st=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:2,values:f})),C}function ct$f(e,t,i,n,r){return e[t++]=n[i],e[t++]=n[i+1],e[t++]=n[i+2],e[t++]=r[i],e[t++]=r[i+1],e[t]=r[i+2],e}function ft$9(e,t,i,n){return e[t++]=n[i],e[t++]=n[i+1],e[t++]=n[i],e[t]=n[i+1],e}var Nt$6=new n$12;function ue$p(e,t){var i,n=e._shadowVolume,r=e._offsetAttribute,o=e._vertexFormat,a=e._extrudedHeight,s=e._surfaceHeight,l=e._ellipsoid,u=t.height,c=t.width;if(n){var h=n$12.clone(o,Nt$6);h.normal=!0,e._vertexFormat=h}var d=Qt$7(e,t);n&&(e._vertexFormat=o);var f=T$10.scaleToGeodeticHeight(d.attributes.position.values,s,l,!1),p=(f=new Float64Array(f)).length,_=2*p,m=new Float64Array(_);m.set(f);var $=T$10.scaleToGeodeticHeight(d.attributes.position.values,a,l);m.set($,p),d.attributes.position.values=m;var g,y,v=o.normal?new Float32Array(_):void 0,x=o.tangent?new Float32Array(_):void 0,b=o.bitangent?new Float32Array(_):void 0,S=o.st?new Float32Array(_/3*2):void 0;if(o.normal){for(y=d.attributes.normal.values,v.set(y),i=0;i<p;i++)y[i]=-y[i];v.set(y,p),d.attributes.normal.values=v}if(n){y=d.attributes.normal.values,o.normal||(d.attributes.normal=void 0);var w=new Float32Array(_);for(i=0;i<p;i++)y[i]=-y[i];w.set(y,p),d.attributes.extrudeDirection=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:w})}var C=t$$(r);if(C){var T=p/3*2,P=new Uint8Array(T);r===_0x165ce0.TOP?P=d$10(P,1,0,T/2):P=d$10(P,r===_0x165ce0.NONE?0:1),d.attributes.applyOffset=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:P})}if(o.tangent){var E=d.attributes.tangent.values;for(x.set(E),i=0;i<p;i++)E[i]=-E[i];x.set(E,p),d.attributes.tangent.values=x}if(o.bitangent){var A=d.attributes.bitangent.values;b.set(A),b.set(A,p),d.attributes.bitangent.values=b}o.st&&(g=d.attributes.st.values,S.set(g),S.set(g,p/3*2),d.attributes.st.values=S);var L=d.indices,M=L.length,I=p/3,O=fe$u.createTypedArray(_/3,2*M);for(O.set(L),i=0;i<M;i+=3)O[i+M]=L[i+2]+I,O[i+1+M]=L[i+1]+I,O[i+2+M]=L[i]+I;d.indices=O;var D=t.northCap,R=t.southCap,N=u,F=2,B=0,z=4,G=4;D&&(F-=1,N-=1,B+=1,z-=2,G-=1),R&&(F-=1,N-=1,B+=1,z-=2,G-=1);var k=2*((B+=F*c+2*N-z)+G),U=new Float64Array(3*k),V=n?new Float32Array(3*k):void 0,W=C?new Uint8Array(k):void 0,H=o.st?new Float32Array(2*k):void 0,Y=r===_0x165ce0.TOP;C&&!Y&&(W=d$10(W,r===_0x165ce0.ALL?1:0));var j,q=0,X=0,K=0,Z=0,J=c*N;for(i=0;i<J;i+=c)U=ct$f(U,q,j=3*i,f,$),q+=6,o.st&&(H=ft$9(H,X,2*i,g),X+=4),n&&(K+=3,V[K++]=y[j],V[K++]=y[j+1],V[K++]=y[j+2]),Y&&(W[Z++]=1,Z+=1);if(R){var Q=D?J+1:J;for(j=3*Q,i=0;i<2;i++)U=ct$f(U,q,j,f,$),q+=6,o.st&&(H=ft$9(H,X,2*Q,g),X+=4),n&&(K+=3,V[K++]=y[j],V[K++]=y[j+1],V[K++]=y[j+2]),Y&&(W[Z++]=1,Z+=1)}else for(i=J-c;i<J;i++)U=ct$f(U,q,j=3*i,f,$),q+=6,o.st&&(H=ft$9(H,X,2*i,g),X+=4),n&&(K+=3,V[K++]=y[j],V[K++]=y[j+1],V[K++]=y[j+2]),Y&&(W[Z++]=1,Z+=1);for(i=J-1;i>0;i-=c)U=ct$f(U,q,j=3*i,f,$),q+=6,o.st&&(H=ft$9(H,X,2*i,g),X+=4),n&&(K+=3,V[K++]=y[j],V[K++]=y[j+1],V[K++]=y[j+2]),Y&&(W[Z++]=1,Z+=1);if(D){var ee=J;for(j=3*ee,i=0;i<2;i++)U=ct$f(U,q,j,f,$),q+=6,o.st&&(H=ft$9(H,X,2*ee,g),X+=4),n&&(K+=3,V[K++]=y[j],V[K++]=y[j+1],V[K++]=y[j+2]),Y&&(W[Z++]=1,Z+=1)}else for(i=c-1;i>=0;i--)U=ct$f(U,q,j=3*i,f,$),q+=6,o.st&&(H=ft$9(H,X,2*i,g),X+=4),n&&(K+=3,V[K++]=y[j],V[K++]=y[j+1],V[K++]=y[j+2]),Y&&(W[Z++]=1,Z+=1);var te=le$t(U,o,l);o.st&&(te.attributes.st=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:2,values:H})),n&&(te.attributes.extrudeDirection=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:V})),C&&(te.attributes.applyOffset=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:W}));var ie,ne,re,oe,ae=fe$u.createTypedArray(k,6*B);p=U.length/3;var se=0;for(i=0;i<p-1;i+=2){oe=((ie=i)+2)%p;var le=a$11.fromArray(U,3*ie,Tt$7),ue=a$11.fromArray(U,3*oe,Bt$8);a$11.equalsEpsilon(le,ue,n$1d.EPSILON10)||(re=((ne=(ie+1)%p)+2)%p,ae[se++]=ie,ae[se++]=ne,ae[se++]=oe,ae[se++]=oe,ae[se++]=ne,ae[se++]=re)}return te.indices=ae,(te=F$W.combineInstances([new m$P({geometry:d}),new m$P({geometry:te})]))[0]}var me$x=[new a$11,new a$11,new a$11,new a$11],Xt$5=new i$1g,pe$o=new i$1g;function kt$7(e,t,i,n,r){if(0===i)return s$1p.clone(e,r);var o=W$V.computeOptions(e,t,i,0,jt$7,Xt$5),a=o.height,s=o.width,l=me$x;return W$V.computePosition(o,n,!1,0,0,l[0]),W$V.computePosition(o,n,!1,0,s-1,l[1]),W$V.computePosition(o,n,!1,a-1,0,l[2]),W$V.computePosition(o,n,!1,a-1,s-1,l[3]),s$1p.fromCartesianArray(l,n,r)}function B$B(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).rectangle;if(n$1e.typeOf.object("rectangle",t),s$1p.validate(t),t.north<t.south)throw new t$_("options.rectangle.north must be greater than or equal to options.rectangle.south");var i=e$1Y(e.height,0),n=e$1Y(e.extrudedHeight,i);this._rectangle=s$1p.clone(t),this._granularity=e$1Y(e.granularity,n$1d.RADIANS_PER_DEGREE),this._ellipsoid=n$1c.clone(e$1Y(e.ellipsoid,n$1c.WGS84)),this._surfaceHeight=Math.max(i,n),this._rotation=e$1Y(e.rotation,0),this._stRotation=e$1Y(e.stRotation,0),this._vertexFormat=n$12.clone(e$1Y(e.vertexFormat,n$12.DEFAULT)),this._extrudedHeight=Math.min(i,n),this._shadowVolume=e$1Y(e.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=e.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}B$B.packedLength=s$1p.packedLength+n$1c.packedLength+n$12.packedLength+7,B$B.pack=function(e,t,i){return n$1e.typeOf.object("value",e),n$1e.defined("array",t),i=e$1Y(i,0),s$1p.pack(e._rectangle,t,i),i+=s$1p.packedLength,n$1c.pack(e._ellipsoid,t,i),i+=n$1c.packedLength,n$12.pack(e._vertexFormat,t,i),i+=n$12.packedLength,t[i++]=e._granularity,t[i++]=e._surfaceHeight,t[i++]=e._rotation,t[i++]=e._stRotation,t[i++]=e._extrudedHeight,t[i++]=e._shadowVolume?1:0,t[i]=e$1Y(e._offsetAttribute,-1),t};var Kt$6=new s$1p,Zt$6=n$1c.clone(n$1c.UNIT_SPHERE),tt$g={rectangle:Kt$6,ellipsoid:Zt$6,vertexFormat:Nt$6,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};B$B.unpack=function(e,t,i){n$1e.defined("array",e),t=e$1Y(t,0);var n=s$1p.unpack(e,t,Kt$6);t+=s$1p.packedLength;var r=n$1c.unpack(e,t,Zt$6);t+=n$1c.packedLength;var o=n$12.unpack(e,t,Nt$6);t+=n$12.packedLength;var a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=1===e[t++],d=e[t];return t$$(i)?(i._rectangle=s$1p.clone(n,i._rectangle),i._ellipsoid=n$1c.clone(r,i._ellipsoid),i._vertexFormat=n$12.clone(o,i._vertexFormat),i._granularity=a,i._surfaceHeight=s,i._rotation=l,i._stRotation=u,i._extrudedHeight=c,i._shadowVolume=h,i._offsetAttribute=-1===d?void 0:d,i):(tt$g.granularity=a,tt$g.height=s,tt$g.rotation=l,tt$g.stRotation=u,tt$g.extrudedHeight=c,tt$g.shadowVolume=h,tt$g.offsetAttribute=-1===d?void 0:d,new B$B(tt$g))},B$B.computeRectangle=function(e,t){var i=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).rectangle;if(n$1e.typeOf.object("rectangle",i),s$1p.validate(i),i.north<i.south)throw new t$_("options.rectangle.north must be greater than or equal to options.rectangle.south");var n=e$1Y(e.granularity,n$1d.RADIANS_PER_DEGREE),r=e$1Y(e.ellipsoid,n$1c.WGS84);return kt$7(i,n,e$1Y(e.rotation,0),r,t)};var ce$p=new r$W,Jt$8=new a$U,fe$p=new i$1g;B$B.createGeometry=function(e){if(!n$1d.equalsEpsilon(e._rectangle.north,e._rectangle.south,n$1d.EPSILON10)&&!n$1d.equalsEpsilon(e._rectangle.east,e._rectangle.west,n$1d.EPSILON10)){var t=e._rectangle,i=e._ellipsoid,n=e._rotation,r=e._stRotation,o=e._vertexFormat,a=W$V.computeOptions(t,e._granularity,n,r,jt$7,Xt$5,pe$o),s=ce$p;if(0!==r||0!==n){var l=s$1p.center(t,fe$p),u=i.geodeticSurfaceNormalCartographic(l,Tt$7);a$U.fromAxisAngle(u,-r,Jt$8),r$W.fromQuaternion(Jt$8,s)}else r$W.clone(r$W.IDENTITY,s);var c,h,d=e._surfaceHeight,f=e._extrudedHeight,p=!n$1d.equalsEpsilon(d,f,0,n$1d.EPSILON2);if(a.lonScalar=1/e._rectangle.width,a.latScalar=1/e._rectangle.height,a.tangentRotationMatrix=s,t=e._rectangle,p){c=ue$p(e,a);var _=c$19.fromRectangle3D(t,i,d,ie$y),m=c$19.fromRectangle3D(t,i,f,ne$v);h=c$19.union(_,m)}else{if((c=Qt$7(e,a)).attributes.position.values=T$10.scaleToGeodeticHeight(c.attributes.position.values,d,i,!1),t$$(e._offsetAttribute)){var $=c.attributes.position.values.length,g=new Uint8Array($/3);d$10(g,e._offsetAttribute===_0x165ce0.NONE?0:1),c.attributes.applyOffset=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:g})}h=c$19.fromRectangle3D(t,i,d)}return o.position||delete c.attributes.position,new T$11({attributes:c.attributes,indices:c.indices,primitiveType:c.primitiveType,boundingSphere:h,offsetAttribute:e._offsetAttribute})}},B$B.createShadowVolume=function(e,t,i){var n=e._granularity,r=e._ellipsoid,o=t(n,r),a=i(n,r);return new B$B({rectangle:e._rectangle,rotation:e._rotation,ellipsoid:r,stRotation:e._stRotation,granularity:n,extrudedHeight:a,height:o,vertexFormat:n$12.POSITION_ONLY,shadowVolume:!0})};var $t$6=new s$1p,ve$p=[new r$T,new r$T,new r$T],he$p=new u$14,de$s=new i$1g;function ge$l(e){if(0===e._stRotation)return[0,0,0,1,1,0];var t=s$1p.clone(e._rectangle,$t$6),i=e._granularity,n=e._ellipsoid,r=kt$7(t,i,e._rotation-e._stRotation,n,$t$6),o=ve$p;o[0].x=r.west,o[0].y=r.south,o[1].x=r.west,o[1].y=r.north,o[2].x=r.east,o[2].y=r.south;for(var a=e.rectangle,s=u$14.fromRotation(e._stRotation,he$p),l=s$1p.center(a,de$s),u=0;u<3;++u){var c=o[u];c.x-=l.longitude,c.y-=l.latitude,u$14.multiplyByVector(s,c,c),c.x+=l.longitude,c.y+=l.latitude,c.x=(c.x-a.west)/a.width,c.y=(c.y-a.south)/a.height}var h=o[0],d=o[1],f=o[2],p=new Array(6);return r$T.pack(h,p),r$T.pack(d,p,2),r$T.pack(f,p,4),p}Object.defineProperties(B$B.prototype,{rectangle:{get:function(){return t$$(this._rotatedRectangle)||(this._rotatedRectangle=kt$7(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return t$$(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=ge$l(this)),this._textureCoordinateRotationPoints}}});var K$F=new c$19,Q$M=new c$19,V$F=new a$11,X$B=new s$1p;function M$U(e,t){var i=e._ellipsoid,n=t.height,r=t.width,o=t.northCap,a=t.southCap,s=n,l=2,u=0,c=4;o&&(l-=1,s-=1,u+=1,c-=2),a&&(l-=1,s-=1,u+=1,c-=2),u+=l*r+2*s-c;var h,d=new Float64Array(3*u),f=0,p=0,_=V$F;if(o)W$V.computePosition(t,i,!1,p,0,_),d[f++]=_.x,d[f++]=_.y,d[f++]=_.z;else for(h=0;h<r;h++)W$V.computePosition(t,i,!1,p,h,_),d[f++]=_.x,d[f++]=_.y,d[f++]=_.z;for(h=r-1,p=1;p<n;p++)W$V.computePosition(t,i,!1,p,h,_),d[f++]=_.x,d[f++]=_.y,d[f++]=_.z;if(p=n-1,!a)for(h=r-2;h>=0;h--)W$V.computePosition(t,i,!1,p,h,_),d[f++]=_.x,d[f++]=_.y,d[f++]=_.z;for(h=0,p=n-2;p>0;p--)W$V.computePosition(t,i,!1,p,h,_),d[f++]=_.x,d[f++]=_.y,d[f++]=_.z;for(var m=d.length/3*2,$=fe$u.createTypedArray(d.length/3,m),g=0,y=0;y<d.length/3-1;y++)$[g++]=y,$[g++]=y+1;$[g++]=d.length/3-1,$[g++]=0;var v=new T$11({attributes:new t$W,primitiveType:H$11.LINES});return v.attributes.position=new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:d}),v.indices=$,v}function Z$Q(e,t){var i=e._surfaceHeight,n=e._extrudedHeight,r=e._ellipsoid,o=n,a=i,s=M$U(e,t),l=t.height,u=t.width,c=T$10.scaleToGeodeticHeight(s.attributes.position.values,a,r,!1),h=c.length,d=new Float64Array(2*h);d.set(c);var f=T$10.scaleToGeodeticHeight(s.attributes.position.values,o,r);d.set(f,h),s.attributes.position.values=d;var p=t.northCap,_=t.southCap,m=4;p&&(m-=1),_&&(m-=1);var $,g=2*(d.length/3+m),y=fe$u.createTypedArray(d.length/3,g);h=d.length/6;for(var v=0,x=0;x<h-1;x++)y[v++]=x,y[v++]=x+1,y[v++]=x+h,y[v++]=x+h+1;if(y[v++]=h-1,y[v++]=0,y[v++]=h+h-1,y[v++]=h,y[v++]=0,y[v++]=h,p)$=l-1;else{var b=u-1;y[v++]=b,y[v++]=b+h,$=u+l-2}if(y[v++]=$,y[v++]=$+h,!_){var S=u+$-1;y[v++]=S,y[v]=S+h}return s.indices=y,s}function P$H(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).rectangle,i=e$1Y(e.granularity,n$1d.RADIANS_PER_DEGREE),n=e$1Y(e.ellipsoid,n$1c.WGS84),r=e$1Y(e.rotation,0);if(!t$$(t))throw new t$_("rectangle is required.");if(s$1p.validate(t),t.north<t.south)throw new t$_("options.rectangle.north must be greater than options.rectangle.south");var o=e$1Y(e.height,0),a=e$1Y(e.extrudedHeight,o);this._rectangle=s$1p.clone(t),this._granularity=i,this._ellipsoid=n,this._surfaceHeight=Math.max(o,a),this._rotation=r,this._extrudedHeight=Math.min(o,a),this._offsetAttribute=e.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}P$H.packedLength=s$1p.packedLength+n$1c.packedLength+5,P$H.pack=function(e,t,i){if(!t$$(e))throw new t$_("value is required");if(!t$$(t))throw new t$_("array is required");return i=e$1Y(i,0),s$1p.pack(e._rectangle,t,i),i+=s$1p.packedLength,n$1c.pack(e._ellipsoid,t,i),i+=n$1c.packedLength,t[i++]=e._granularity,t[i++]=e._surfaceHeight,t[i++]=e._rotation,t[i++]=e._extrudedHeight,t[i]=e$1Y(e._offsetAttribute,-1),t};var Y$H=new s$1p,F$I=n$1c.clone(n$1c.UNIT_SPHERE),k$K={rectangle:Y$H,ellipsoid:F$I,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};P$H.unpack=function(e,t,i){if(!t$$(e))throw new t$_("array is required");t=e$1Y(t,0);var n=s$1p.unpack(e,t,Y$H);t+=s$1p.packedLength;var r=n$1c.unpack(e,t,F$I);t+=n$1c.packedLength;var o=e[t++],a=e[t++],s=e[t++],l=e[t++],u=e[t];return t$$(i)?(i._rectangle=s$1p.clone(n,i._rectangle),i._ellipsoid=n$1c.clone(r,i._ellipsoid),i._surfaceHeight=a,i._rotation=s,i._extrudedHeight=l,i._offsetAttribute=-1===u?void 0:u,i):(k$K.granularity=o,k$K.height=a,k$K.rotation=s,k$K.extrudedHeight=l,k$K.offsetAttribute=-1===u?void 0:u,new P$H(k$K))};var $$L=new i$1g;P$H.createGeometry=function(e){var t,i,n=e._rectangle,r=e._ellipsoid,o=W$V.computeOptions(n,e._granularity,e._rotation,0,X$B,$$L);if(!n$1d.equalsEpsilon(n.north,n.south,n$1d.EPSILON10)&&!n$1d.equalsEpsilon(n.east,n.west,n$1d.EPSILON10)){var a=e._surfaceHeight,s=e._extrudedHeight;if(!n$1d.equalsEpsilon(a,s,0,n$1d.EPSILON2)){if(t=Z$Q(e,o),t$$(e._offsetAttribute)){var l=t.attributes.position.values.length/3,u=new Uint8Array(l);e._offsetAttribute===_0x165ce0.TOP?u=d$10(u,1,0,l/2):u=d$10(u,e._offsetAttribute===_0x165ce0.NONE?0:1),t.attributes.applyOffset=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})}var c=c$19.fromRectangle3D(n,r,a,Q$M),h=c$19.fromRectangle3D(n,r,s,K$F);i=c$19.union(c,h)}else{if((t=M$U(e,o)).attributes.position.values=T$10.scaleToGeodeticHeight(t.attributes.position.values,a,r,!1),t$$(e._offsetAttribute)){var d=t.attributes.position.values.length,f=new Uint8Array(d/3);d$10(f,e._offsetAttribute===_0x165ce0.NONE?0:1),t.attributes.applyOffset=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}i=c$19.fromRectangle3D(n,r,a)}return new T$11({attributes:t.attributes,indices:t.indices,primitiveType:H$11.LINES,boundingSphere:i,offsetAttribute:e._offsetAttribute})}};var e$19={FIXED:0,INERTIAL:1},be$t=Object.freeze(e$19),t$J;function s$_(e){return t$J(e)}function S$B(e,t,i){return n$1e.typeOf.object("terrainProvider",e),n$1e.typeOf.number("level",t),n$1e.defined("positions",i),e.readyPromise.then((function(){return x$O(e,t,i)}))}function x$O(e,t,i){var n,r=e.tilingScheme,o=[],a={};for(n=0;n<i.length;++n){var s=r.positionToTileXY(i[n],t),l=s.toString();if(!a.hasOwnProperty(l)){var u={x:s.x,y:s.y,level:t,tilingScheme:r,terrainProvider:e,positions:[]};a[l]=u,o.push(u)}a[l].positions.push(i[n])}var c=[];for(n=0;n<o.length;++n){var h=o[n],d=new r$V({throttle:!1,throttleByServer:!1,type:V$_.TERRAIN}),f=h.terrainProvider.requestTileGeometry(h.x,h.y,h.level,d,!0).then(P$G(h,e)).otherwise(b$10(h));c.push(f)}return c$18.all(c,(function(){return i}))}function P$G(e,t){var i=e.positions,n=e.tilingScheme.tileXYToRectangle(e.x,e.y,e.level);return function(e){if(t._isSct&&t._isTerrainZ)for(var r=lt$f.inflate(e.buffer).buffer,o=t.createTerrainData(e,r),a=0;a<i.length;++a){(s=i[a]).height=o.interpolateHeight(n,s.longitude,s.latitude)}else for(a=0;a<i.length;++a){var s;(s=i[a]).height=e.interpolateHeight(n,s.longitude,s.latitude)}}}function b$10(e){var t=e.positions;return function(){for(var e=0;e<t.length;++e){t[e].height=void 0}}}typeof requestAnimationFrame<"u"&&(t$J=requestAnimationFrame),function(){if(!t$$(t$J)&&typeof window<"u")for(var e=["webkit","moz","ms","o"],t=0,i=e.length;t<i&&!t$$(t$J);)t$J=window[e[t]+"RequestAnimationFrame"],++t;if(!t$$(t$J)){var n=0;t$J=function(e){var t=yt$9(),i=Math.max(16.666666666666668-(t-n),0);return n=t+i,setTimeout((function(){e(n)}),i)}}}();var m$J=new r$T;function g$C(e,t){if(!t$$(e))throw new t$_("terrainProvider is required.");if(!t$$(t))throw new t$_("positions is required.");return e.readyPromise.then((function(){var i=[],n=[],r=e.availability;if(!t$$(r)&&!e._isSct)throw new t$_("sampleTerrainMostDetailed requires a terrain provider that has tile availability.");for(var o=[],a=0;a<t.length;++a){var s=t[a],l=t$$(r)?r.computeMaximumLevelAtPosition(s):e._levels[e._levels.length-1];if(n[a]=l,0===l){e.tilingScheme.positionToTileXY(s,1,m$J);var u=e.loadTileDataAvailability(m$J.x,m$J.y,1);t$$(u)&&o.push(u)}var c=i[l];t$$(c)||(i[l]=c=[]),c.push(s)}return c$18.all(o).then((function(){return c$18.all(i.map((function(t,i){if(t$$(t))return S$B(e,i,t)})))})).then((function(){for(var i=[],o=0;o<t.length;++o){var a=t[o];(t$$(r)?r.computeMaximumLevelAtPosition(a):e._levels[e._levels.length-1])!==n[o]&&i.push(a)}if(i.length>0)return g$C(e,i)})).then((function(){return t}))}))}var E$M={LEFT_DOWN:0,LEFT_UP:1,LEFT_CLICK:2,LEFT_DOUBLE_CLICK:3,RIGHT_DOWN:5,RIGHT_UP:6,RIGHT_CLICK:7,MIDDLE_DOWN:10,MIDDLE_UP:11,MIDDLE_CLICK:12,MOUSE_MOVE:15,WHEEL:16,PINCH_START:17,PINCH_END:18,PINCH_MOVE:19},Q$L=Object.freeze(E$M);function d$M(e,t,i){let n=e._element,r=n.offsetWidth/n.getBoundingClientRect().width,o=n.offsetHeight/n.getBoundingClientRect().height;if(n===document)return i.x=t.clientX*r,i.y=t.clientY*o,i;var a=n.getBoundingClientRect();return i.x=(t.clientX-a.left)*r,i.y=(t.clientY-a.top)*o,i}function A$U(e,t){var i=e;return t$$(t)&&(i+="+"+t),i}function P$F(e){return e.shiftKey?Ft$5.SHIFT:e.ctrlKey?Ft$5.CTRL:e.altKey?Ft$5.ALT:void 0}var l$Q={LEFT:0,MIDDLE:1,RIGHT:2};function v$L(e,t,i,n){function r(t){n(e,t)}i.addEventListener(t,r,!1),e._removalFunctions.push((function(){i.removeEventListener(t,r,!1)}))}function ao$1(e){var t=e._element,i=t$$(t.disableRootEvents)?t:document;o$$.supportsPointerEvents()?(v$L(e,"pointerdown",t,fo$2),v$L(e,"pointerup",t,K$E),v$L(e,"pointermove",t,mo$1),v$L(e,"pointercancel",t,K$E)):(v$L(e,"mousedown",t,Y$G),v$L(e,"mouseup",i,x$N),v$L(e,"mousemove",i,V$E),v$L(e,"touchstart",t,vo$3),v$L(e,"touchend",i,j$Q),v$L(e,"touchmove",i,_o$3),v$L(e,"touchcancel",i,j$Q)),v$L(e,"dblclick",t,lo$1),v$L(e,"onwheel"in t?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",t,po$2)}function co$2(e){for(var t=e._removalFunctions,i=0;i<t.length;++i)t[i]()}var W$U={position:new r$T};function F$H(e){e._lastSeenTouchEvent=yt$9()}function b$$(e){return yt$9()-e._lastSeenTouchEvent>f$N.mouseEmulationIgnoreMilliseconds}function C$N(e,t,i){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)<i}function Y$G(e,t){if(b$$(e)){var i,n=t.button;if(e._buttonDown[n]=!0,n===l$Q.LEFT)i=Q$L.LEFT_DOWN;else if(n===l$Q.MIDDLE)i=Q$L.MIDDLE_DOWN;else{if(n!==l$Q.RIGHT)return;i=Q$L.RIGHT_DOWN}var r=d$M(e,t,e._primaryPosition);r$T.clone(r,e._primaryStartPosition),r$T.clone(r,e._primaryPreviousPosition);var o=P$F(t),a=e.getInputAction(i,o);t$$(a)&&(r$T.clone(r,W$U.position),a(W$U),t.preventDefault())}}var k$J={position:new r$T},B$A={position:new r$T};function R$G(e,t,i,n){var r=P$F(n),o=e.getInputAction(t,r),a=e.getInputAction(i,r);if(t$$(o)||t$$(a)){var s=d$M(e,n,e._primaryPosition);if(t$$(o)&&(r$T.clone(s,k$J.position),o(k$J)),t$$(a))C$N(e._primaryStartPosition,s,e._clickPixelTolerance)&&(r$T.clone(s,B$A.position),a(B$A))}}function x$N(e,t){if(b$$(e)){var i=t.button;i!==l$Q.LEFT&&i!==l$Q.MIDDLE&&i!==l$Q.RIGHT||(e._buttonDown[l$Q.LEFT]&&(R$G(e,Q$L.LEFT_UP,Q$L.LEFT_CLICK,t),e._buttonDown[l$Q.LEFT]=!1),e._buttonDown[l$Q.MIDDLE]&&(R$G(e,Q$L.MIDDLE_UP,Q$L.MIDDLE_CLICK,t),e._buttonDown[l$Q.MIDDLE]=!1),e._buttonDown[l$Q.RIGHT]&&(R$G(e,Q$L.RIGHT_UP,Q$L.RIGHT_CLICK,t),e._buttonDown[l$Q.RIGHT]=!1))}}var S$A={startPosition:new r$T,endPosition:new r$T};function V$E(e,t){if(b$$(e)){var i=P$F(t),n=d$M(e,t,e._primaryPosition),r=e._primaryPreviousPosition,o=e.getInputAction(Q$L.MOUSE_MOVE,i);t$$(o)&&(r$T.clone(r,S$A.startPosition),r$T.clone(n,S$A.endPosition),o(S$A,t)),r$T.clone(n,r),(e._buttonDown[l$Q.LEFT]||e._buttonDown[l$Q.MIDDLE]||e._buttonDown[l$Q.RIGHT])&&t.preventDefault()}}var X$A={position:new r$T};function lo$1(e,t){var i;if(t.button===l$Q.LEFT){i=Q$L.LEFT_DOUBLE_CLICK;var n=P$F(t),r=e.getInputAction(i,n);t$$(r)&&(d$M(e,t,X$A.position),r(X$A))}}function po$2(e,t){var i;if(t$$(t.deltaY)){var n=t.deltaMode;i=n===t.DOM_DELTA_PIXEL?-t.deltaY:n===t.DOM_DELTA_LINE?40*-t.deltaY:120*-t.deltaY}else i=t.detail>0?-120*t.detail:t.wheelDelta;if(t$$(i)){var r=P$F(t),o=e.getInputAction(Q$L.WHEEL,r);t$$(o)&&(o(i),t.preventDefault())}}function vo$3(e,t){F$H(e);var i,n,r,o=t.changedTouches,a=o.length,s=e._positions;for(i=0;i<a;++i)r=(n=o[i]).identifier,s.set(r,d$M(e,n,new r$T));D$R(e,t);var l=e._previousPositions;for(i=0;i<a;++i)r=(n=o[i]).identifier,l.set(r,r$T.clone(s.get(r)))}function j$Q(e,t){F$H(e);var i,n,r=t.changedTouches,o=r.length,a=e._positions;for(i=0;i<o;++i)n=r[i].identifier,a.remove(n);D$R(e,t);var s=e._previousPositions;for(i=0;i<o;++i)n=r[i].identifier,s.remove(n)}var z$B={position:new r$T},O$I={position1:new r$T,position2:new r$T},J$L={position:new r$T},Q$K={position:new r$T},Z$P={position:new r$T};function D$R(e,t){var i,n,r=P$F(t),o=e._positions,a=o.length,s=e._isPinching;if(1!==a&&e._buttonDown[l$Q.LEFT]){if(e._buttonDown[l$Q.LEFT]=!1,t$$(e._touchHoldTimer)&&(clearTimeout(e._touchHoldTimer),e._touchHoldTimer=void 0),t$$(i=e.getInputAction(Q$L.LEFT_UP,r))&&(r$T.clone(e._primaryPosition,J$L.position),i(J$L)),0===a&&!e._isTouchHolding&&t$$(n=e.getInputAction(Q$L.LEFT_CLICK,r)))C$N(e._primaryStartPosition,e._previousPositions.values[0],e._clickPixelTolerance)&&(r$T.clone(e._primaryPosition,Q$K.position),n(Q$K));e._isTouchHolding=!1}if(0===a&&s&&(e._isPinching=!1,t$$(i=e.getInputAction(Q$L.PINCH_END,r))&&i()),1===a&&!s){var l=o.values[0];r$T.clone(l,e._primaryPosition),r$T.clone(l,e._primaryStartPosition),r$T.clone(l,e._primaryPreviousPosition),e._buttonDown[l$Q.LEFT]=!0,t$$(i=e.getInputAction(Q$L.LEFT_DOWN,r))&&(r$T.clone(l,z$B.position),i(z$B)),e._touchHoldTimer=setTimeout((function(){!e.isDestroyed()&&(e._touchHoldTimer=void 0,e._isTouchHolding=!0,t$$(n=e.getInputAction(Q$L.RIGHT_CLICK,r)))&&(C$N(e._primaryStartPosition,e._previousPositions.values[0],e._holdPixelTolerance)&&(r$T.clone(e._primaryPosition,Z$P.position),n(Z$P)))}),f$N.touchHoldDelayMilliseconds),t.preventDefault()}2===a&&!s&&(e._isPinching=!0,t$$(i=e.getInputAction(Q$L.PINCH_START,r))&&(r$T.clone(o.values[0],O$I.position1),r$T.clone(o.values[1],O$I.position2),i(O$I),t.preventDefault()))}function _o$3(e,t){F$H(e);var i,n,r,o=t.changedTouches,a=o.length,s=e._positions;for(i=0;i<a;++i){r=(n=o[i]).identifier;var l=s.get(r);t$$(l)&&d$M(e,n,l)}$$K(e,t);var u=e._previousPositions;for(i=0;i<a;++i)r=(n=o[i]).identifier,r$T.clone(s.get(r),u.get(r))}var G$K={startPosition:new r$T,endPosition:new r$T},w$R={distance:{startPosition:new r$T,endPosition:new r$T},angleAndHeight:{startPosition:new r$T,endPosition:new r$T}};function $$K(e,t){var i,n=P$F(t),r=e._positions,o=e._previousPositions,a=r.length;if(1===a&&e._buttonDown[l$Q.LEFT]){var s=r.values[0];r$T.clone(s,e._primaryPosition);var l=e._primaryPreviousPosition;t$$(i=e.getInputAction(Q$L.MOUSE_MOVE,n))&&(r$T.clone(l,G$K.startPosition),r$T.clone(s,G$K.endPosition),i(G$K)),r$T.clone(s,l),t.preventDefault()}else if(2===a&&e._isPinching&&t$$(i=e.getInputAction(Q$L.PINCH_MOVE,n))){var u=r.values[0],c=r.values[1],h=o.values[0],d=o.values[1],f=c.x-u.x,p=c.y-u.y,_=.25*Math.sqrt(f*f+p*p),m=d.x-h.x,$=d.y-h.y,g=.25*Math.sqrt(m*m+$*$),y=.125*(c.y+u.y),v=.125*(d.y+h.y),x=Math.atan2(p,f),b=Math.atan2($,m);r$T.fromElements(0,g,w$R.distance.startPosition),r$T.fromElements(0,_,w$R.distance.endPosition),r$T.fromElements(b,v,w$R.angleAndHeight.startPosition),r$T.fromElements(x,y,w$R.angleAndHeight.endPosition),i(w$R)}}function fo$2(e,t){if(t.target.setPointerCapture(t.pointerId),"touch"===t.pointerType){var i=e._positions,n=t.pointerId;i.set(n,d$M(e,t,new r$T)),D$R(e,t),e._previousPositions.set(n,r$T.clone(i.get(n)))}else Y$G(e,t)}function K$E(e,t){if("touch"===t.pointerType){var i=e._positions,n=t.pointerId;i.remove(n),D$R(e,t),e._previousPositions.remove(n)}else x$N(e,t)}function mo$1(e,t){if("touch"===t.pointerType){var i=e._positions,n=t.pointerId,r=i.get(n);if(!t$$(r))return;d$M(e,t,r),$$K(e,t);var o=e._previousPositions;r$T.clone(i.get(n),o.get(n))}else V$E(e,t)}function f$N(e){this._inputEvents={},this._buttonDown={LEFT:!1,MIDDLE:!1,RIGHT:!1},this._isPinching=!1,this._isTouchHolding=!1,this._lastSeenTouchEvent=-f$N.mouseEmulationIgnoreMilliseconds,this._primaryStartPosition=new r$T,this._primaryPosition=new r$T,this._primaryPreviousPosition=new r$T,this._positions=new e$1F,this._previousPositions=new e$1F,this._removalFunctions=[],this._touchHoldTimer=void 0,this._clickPixelTolerance=5,this._holdPixelTolerance=25,this._element=e$1Y(e,document),ao$1(this)}function se$s(e){if(!t$$((e=e$1Y(e,e$1Y.EMPTY_OBJECT)).urls))throw new t$_("options.urls is required.");this._urls=e.urls;for(var t=0;t<this._urls.length;t++)this._urls[t].length>0&&"/"!==this._urls[t][this._urls[t].length-1]&&(this._urls[t]+="/");var i=e.urls[0].indexOf("wmts100");this._useConfigFile=e$1Y(e.useConfigFile,!0),this._errorEvent=new o$15,this._ready=!1,this._readyPromise=c$18.defer(),this._isCreateSkirt=e.isCreateSkirt,this._skirtScale=e.skirtScale,this._isSkirtDirty=!1,this._proxy=e.proxy,this._terrainDataStructure={heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1};var n=e.credit;"string"==typeof n&&(n=new i$17({text:n})),this._credit=n,this._tilingScheme=void 0,this._rectangles=[],this._levels=[],this._compressType="NONE",this._quadtree=void 0,this._packingRequest=e.packingRequest,this._combiInfo={},this._isBlock=!1,this._blockCache={},this._blockCacheQueue=new s$19,this._blockCacheSize=100,this._blockScale=0;var r,o=this,a=e$1Y(e.ellipsoid,n$1c.WGS84);this._hasNormalBuffer=!1,this._requestVertexNormals=e$1Y(e.requestVertexNormals,!1);var s=0;function l(e){if(1===parseFloat(e.getElementsByTagName("sml:Version")[0].textContent)){var t=e.getElementsByTagName("sml:StoreType",void 0);o._blockScale=t[0].getAttribute("BlockScale"),t$$(o._blockScale)&&o._blockScale>0&&(o._isBlock=!0)}o._compressType=e.getElementsByTagName("sml:CompressType")[0].textContent,o._heightmapWidth=parseInt(e.getElementsByTagName("sml:CellWidth")[0].textContent),o._heightmapHeight=parseInt(e.getElementsByTagName("sml:CellHeight")[0].textContent),o._tilingScheme=new a$W({ellipsoid:a}),o._tilingScheme.isSct=!0,o._levelZeroMaximumGeometricError=d$11.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,2*Math.min(o._heightmapWidth,o._heightmapHeight),o._tilingScheme.getNumberOfXTilesAtLevel(0));var i=e.getElementsByTagName("sml:Bounds")[0],n=n$1d.toRadians(parseFloat(i.getElementsByTagName("sml:Left")[0].textContent)),r=n$1d.toRadians(parseFloat(i.getElementsByTagName("sml:Bottom")[0].textContent)),u=n$1d.toRadians(parseFloat(i.getElementsByTagName("sml:Right")[0].textContent)),h=n$1d.toRadians(parseFloat(i.getElementsByTagName("sml:Top")[0].textContent));o._rectangles.push(new s$1p(n,r,u,h));for(var d=e.getElementsByTagName("sml:Levels")[0].getElementsByTagName("sml:Level"),f=[],p=0;p<d.length;++p){var _=d[p];f.push(parseInt(_.textContent))}if(o._levels.push(f),o._ready=!0,o._readyPromise.resolve(!0),s<o._urls.length){var m=o._urls[s++],$=m.substring(0,m.length-1),g=m+"config";t$$(a$R.CREDENTIAL)&&(g=t$$(a$R.CREDENTIAL._keymap[$])?a$R.addTokenWithKey($,g):a$R.addToken(g)),c$18(u$_(g),l,c)}}function u(t){var i=(new f$10).read(t).documentElement,n=f$10.queryFirstNode(i,"Contents",void 0),r=f$10.queryFirstNode(n,"Layer",void 0);o._tempLayerName=f$10.queryStringValue(r,"Title",void 0);var h=f$10.queryFirstNode(n,"TileMatrixSet",void 0);o._wmtstileMatrixSet=f$10.queryStringValue(h,"Identifier",void 0);var d=f$10.queryFirstNode(r,"BoundingBox",void 0),f=f$10.queryStringValue(d,"LowerCorner",void 0),p=f$10.queryStringValue(d,"UpperCorner",void 0),_=f.split(" "),m=p.split(" "),$=parseFloat(_[0]),g=parseFloat(m[0]),y=parseFloat(_[1]),v=parseFloat(m[1]);$&&g&&y&&v&&o._rectangles.push(new s$1p($,y,g,v));var x=f$10.queryFirstNode(n,"TileMatrixSet",void 0),b=(h=f$10.queryChildNodes(x,"TileMatrix",void 0),f$10.queryNumericValue(h[0],"ScaleDenominator",void 0)),S=f$10.queryNumericValue(h[h.length-1],"ScaleDenominator",void 0),w=f$10.queryNumericValue(h[0],"Identifier",void 0);b=1/b,S=1/S;var C=[1.690163571602655e-9,3.3803271432053056e-9,6.760654286410611e-9,1.3521308572821242e-8,2.7042617145642484e-8,5.408523429128511e-8,1.0817046858256998e-7,2.1634093716513974e-7,4.3268187433028044e-7,8.653637486605571e-7,17307274973211203e-22,34614549946422405e-22,69229099892844565e-22,13845819978568952e-21,27691639957137904e-21,553832799142758e-19,.0001107665598285516,.0002215331196571032,.0004430662393142064,.0008861324786284128,.001772264957256826,.003544529914513652],T=C.indexOf(b),P=C.indexOf(S);for(let e=0;e<C.length;e++)b>C[e]&&C[e+1]&&b<C[e+1]&&(T=e-1),S>C[e]&&C[e+1]&&S<C[e+1]&&(P=e-1);T=Math.max(T,0),o.wmts_sub=e$1Y(T-w,0);for(var E=[],A=T;A<=P;A++)E.push(A);if(o._levels.push(E),e.blockscale>0&&(o._blockScale=1*e.blockscale,o._isBlock=!0),o._compressType="ZIP",o._heightmapWidth=e.cellWidth||32,o._heightmapHeight=e.cellHeight||32,o._tilingScheme=new a$W({ellipsoid:a}),o._tilingScheme.isSct=!0,o._levelZeroMaximumGeometricError=d$11.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,2*Math.min(o._heightmapWidth,o._heightmapHeight),o._tilingScheme.getNumberOfXTilesAtLevel(0)),o._ready=!0,o._readyPromise.resolve(!0),s<o._urls.length){var L=o._urls[s++];if(-1!==L.indexOf("wmts100")){c$18(o$W(I=L+"1.0.0/WMTSCapabilities.xml"),u,c)}else{var M=L.substring(0,L.length-1),I=L+"config";t$$(a$R.CREDENTIAL)&&(I=t$$(a$R.CREDENTIAL._keymap[M])?a$R.addTokenWithKey(M,I):a$R.addToken(I)),c$18(u$_(I),l,c)}}}function c(e){var t=e$1Y(e,"An error occurred while accessing "+o._url+".");r=c$_.handleError(r,o,o._errorEvent,t,void 0,void 0,void 0,h)}function h(){if(!t$$(e.rectangles)||!t$$(e.levels))throw new t$_("options.rectangles,options.levels is required.");o._compressType=e$1Y(e.compressType,"ZIP"),o._heightmapWidth=e$1Y(e.heightmapWidth,32),o._heightmapHeight=e$1Y(e.heightmapHeight,32),o._tilingScheme=new a$W({ellipsoid:a}),o._tilingScheme.isSct=!0,o._levelZeroMaximumGeometricError=d$11.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,Math.min(o._heightmapWidth,o._heightmapHeight),o._tilingScheme.getNumberOfXTilesAtLevel(0)),o._rectangles=e.rectangles,o._levels=e.levels,o._ready=!0,o._readyPromise.resolve(!0)}this._useConfigFile?function(){if(-1!==i){c$18(o$W(n=(e=o._urls[s++])+"1.0.0/WMTSCapabilities.xml"),u,c)}else{var e,t=(e=o._urls[s++]).substring(0,e.length-1),n=e+"config";t$$(a$R.CREDENTIAL)&&(n=t$$(a$R.CREDENTIAL._keymap[t])?a$R.addTokenWithKey(t,n):a$R.addToken(n)),c$18(u$_(n),l,c)}}():h()}function be$s(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;e$1B(t,o)?e$1B(e,o)&&(a|=1):(a|=2,e$1B(e,o)||(a|=1)),n+=a}return n}function Ee$n(e,t){var i=new DataView(e),n=0,r=i.getUint32(n,!0);if(t>r-1)throw new t$_("pack imagery index invalid");n+=4;var o,a,s=[];for(o=0;o<r;o++)a=i.getUint32(n,!0),s.push(a),n+=4;for(o=0;o<r;o++){if(a=s[o],o===t)return 0===a?void 0:new Uint8Array(e,n,a);n+=a}}function Me$l(e,t,i,n){var r=Math.min(e._blockScale,n),o=Math.pow(2,r),a=t%o;return{x:Math.floor(t/o),y:Math.floor(i/o),col:a,row:i%o,level:n,blockSize:o}}function We$i(e,t){var i=new DataView(e),n=0;i.getUint32(n,!0),n+=4;var r=i.getUint32(n,!0);n+=4;for(var o=t.col,a=t.row*t.blockSize+o,s=0,l=0,u=0;u<r;u++){if(u<a)s+=i.getUint32(n,!0);else if(u===a){l=i.getUint32(n,!0),n+=4;break}n+=4}if(n=8+4*r,0!==l)return n+=s,new Uint8Array(e).slice(n,n+l).buffer}f$N.prototype.setInputAction=function(e,t,i){if(!t$$(e))throw new t$_("action is required.");if(!t$$(t))throw new t$_("type is required.");var n=A$U(t,i);this._inputEvents[n]=e},f$N.prototype.getInputAction=function(e,t){if(!t$$(e))throw new t$_("type is required.");var i=A$U(e,t);return this._inputEvents[i]},f$N.prototype.removeInputAction=function(e,t){if(!t$$(e))throw new t$_("type is required.");var i=A$U(e,t);delete this._inputEvents[i]},f$N.prototype.registerListenersForWindowTop=function(){var e=window.top,t=t$$(e.disableRootEvents)?e:document;o$$.supportsPointerEvents()?v$L(this,"pointerup",e,K$E):v$L(this,"mouseup",t,x$N)},f$N.prototype.isDestroyed=function(){return!1},f$N.prototype.destroy=function(){return co$2(this),s$1e(this)},f$N.mouseEmulationIgnoreMilliseconds=800,f$N.touchHoldDelayMilliseconds=1500,Object.defineProperties(se$s.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){if(!this.ready)throw new t$_("requestTileGeometry must not be called before ready returns true.");return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},isCreateSkirt:{get:function(){return this._isCreateSkirt},set:function(e){e!==this._isCreateSkirt&&(this._isSkirtDirty=!0),this._isCreateSkirt=e}},skirtScale:{get:function(){return this._skirtScale},set:function(e){e!==this._skirtScale&&(this._isSkirtDirty=!0),this._skirtScale=e}},hasNormalBuffer:{get:function(){return this._hasNormalBuffer}},requestVertexNormals:{get:function(){return this._requestVertexNormals}},blockCache:{get:function(){return this._blockCache}},blockCacheQueue:{get:function(){return this._blockCacheQueue}},blockCacheSize:{get:function(){return this._blockCacheSize}}}),se$s.prototype.division=function(e,t,i,n,r){for(var o=[],a=0;a<r;a++)for(var s=0;s<r;s++){var l=(i+n*(r-1-a)/(r-1))*(r-1),u=(t+n*s/(r-1))*(r-1),c=Math.floor(l),h=Math.ceil(l),d=Math.floor(u),f=Math.ceil(u),p=e[(r-1-c)*r+d],_=e[(r-1-c)*r+f],m=e[(r-1-h)*r+d],$=e[(r-1-h)*r+f],g=m*(l-c)+p*(h-l),y=$*(l-c)+_*(h-l);c===h&&(g=m,y=$);var v=y*(u-d)+g*(f-u);d===f&&(v=y),o[a*r+s]=v}return o};var ue$o=new s$1p;function Pe$k(e,t,i,n,r){if(null!=e){for(var o=new Uint8Array(t*i*3),a=6378137,s=n.width,l=n.height,u=e,c=0;c<t;c++)for(var h=0;h<i;h++){var d=h*t+c;u[h*t+c];var f=c,p=h;r>13&&(c=(c=0==c?c+1:c)==t-1?t-2:c,h=(h=0==h?h+1:h)==i-1?i-2:h);var _=Math.max(c-1,0),m=h,$=u[m*t+_],g=u[(m=h)*t+(_=Math.min(c+1,t-1))];_=c;var y=u[(m=Math.min(h+1,i-1))*t+_];_=c;var v=u[(m=Math.max(h-1,0))*t+_];c=f,h=p;var x=n.south+l*(512-2*h-1)/512,b=new a$11(($-g)/(a*Math.cos(x)*s/t),(v-y)/(a*l/i),2);a$11.normalize(b,b),o[3*d+0]=255*(.5*b.x+.5),o[3*d+1]=255*(.5*b.y+.5),o[3*d+2]=255*(.5*b.z+.5)}return o}}se$s.prototype.requestTileGeometry=function(e,t,i,n,r){if(!this.ready)throw new t$_("requestTileGeometry must not be called before ready returns true.");if(0===i){var o=new Array(this._heightmapWidth*this._heightmapHeight);return o.fill(0),this._hasNormalBuffer=!1,new M$1a({buffer:o,width:this._heightmapWidth,height:this._heightmapHeight,skirtMode:this._isCreateSkirt,skirtScale:this._skirtScale,childTileMask:Be$k(this,e,t,i),structure:this._terrainDataStructure,valid:!1})}var a=[],s=this._tilingScheme.tileXYToRectangle(e,t,i),l=this,u=!1,c=this._rectangles.length-1,h=this._levels[c][this._levels[c].length-1];c=0;var d=this._levels[c][this._levels[c].length-1];if(t$$(r)||!(i>d)){var f=this,p=!1;(t$$(f._packingRequest)&&f._packingRequest===J$_.QuadKey||f._isBlock)&&(p=!0);for(var _=0;_<this._rectangles.length;_++){var m=s$1p.intersection(this._rectangles[_],s,ue$o);if(t$$(r)&&!p){var $=r[this._urls[_]];if(t$$($)&&(1===$&&(u=!0),0===$||2===$))continue}if(0===a.length&&_===this._rectangles.length-1&&i>h)break;if(t$$(m)){var g=this._levels[_][0],y=this._levels[_][this._levels[_].length-1],v=!1;if(i>=g&&i<=d&&(v=!0),v){var x=0,b=0,S=1,w=e,C=t,T=i;T>y&&(S=1/Math.pow(2,T-y));for(var P=S;T>y;)w%2==1&&(x+=P),C%2==0&&(b+=P),P*=2,T--,w=Math.floor(.5*w),C=Math.floor(.5*C);var E={srcX:x,srcY:b,width:S,dataName:l._urls[_]},A=i+"_"+e+"_"+t;t$$(l._combiInfo[A])?l._combiInfo[A].push(E):l._combiInfo[A]=[E],function(e){var t,i=l._urls[e];if(-1!==i.indexOf("wmts100")){var n=T-l.wmts_sub;t=i.substring(0,i.lastIndexOf("/"))+"?tilematrix="+n+"&layer="+l._tempLayerName+"&tilerow="+C+"&tilecol="+w+"&tilematrixset="+l._wmtstileMatrixSet+"&service=WMTS&request=GetTile"}else{var r=i.substring(0,i.length-1);t=l._urls[e]+"data/index/"+C+"/"+w+".bil?level="+T}var o=l._proxy;t$$(o)&&(t=o.getURL(t));var s=new r$V({throttle:!0,throttleByServer:!1,type:V$_.TERRAIN}),u=void 0;if(t$$(f._packingRequest)&&f._packingRequest===J$_.QuadKey&&f._isBlock){s.type=V$_.BLOCKPACK;var c=Me$l(f,w,C,T);s.quadKey=be$s(c.x,c.y,c.level),s.blockInfo=c,s.providerName=t.substring(t.indexOf("datas/")+6,t.indexOf("/data/")),t$$(h=f.blockCache[s.quadKey+"_"+s.providerName])&&(f.blockCacheQueue.touch(h),u={buffer:h.data})}else if(t$$(f._packingRequest)&&f._packingRequest===J$_.QuadKey)s.type=V$_.PACK,s.quadKey=be$s(w,C,T),s.providerName=t.substring(t.indexOf("datas/")+6,t.indexOf("/data/"));else if(f._isBlock){s.type=V$_.BLOCK;var h;c=Me$l(f,w,C,T);s.quadKey=be$s(c.x,c.y,c.level),s.blockInfo=c,s.providerName=t.substring(t.indexOf("datas/")+6,t.indexOf("/data/")),t$$(h=f.blockCache[s.quadKey+"_"+s.providerName])&&(f.blockCacheQueue.touch(h),u={buffer:h.data})}if(!t$$(u)){t$$(a$R.CREDENTIAL)&&(t=t$$(a$R.CREDENTIAL._keymap[r])?a$R.addTokenWithKey(r,t):a$R.addToken(t));var d=t$X.createIfNeeded(t),p=t;t$$(s.blockInfo)&&(p=l._urls[e]+"data/index/"+c.y+"/"+c.x+".bil?level="+T),u=d.getDerivedResource({url:p,request:s}).fetchArrayBuffer()}t$$(u)&&(u.id=e,u.url=t,u.subRequest=s),a.push(u)}(_)}if(u)break}}if(!(a.indexOf(void 0)>-1))return this._hasNormalBuffer=!0,c$18.allSettled(a,(function(n){if(!(n.length<1)){for(var r=[],o=0;o<n.length;o++){var u=n[o];if(t$$(u)){if(t$$(u.buffer)&&(u=u.buffer),0!==i){if(f._isBlock&&t$$(f._packingRequest)&&f._packingRequest===J$_.QuadKey)!t$$(a[o].subRequest.quadKeyIndex)&&t$$(a[o].subRequest.blockRequest)&&(a[o].subRequest.quadKeyIndex=a[o].subRequest.blockRequest.quadKeyIndex),t$$(a[o].subRequest.quadKeyIndex)&&(u=Ee$n(u,a[o].subRequest.quadKeyIndex),u=new Uint8Array(u).buffer),t$$(c=f.blockCache[a[o].subRequest.quadKey])||(c=new e$1p(f,a[o].subRequest.quadKey,u),f.blockCache[a[o].subRequest.quadKey+"_"+a[o].subRequest.providerName]=c),f.blockCacheQueue.touch(c),f.blockCacheQueue.trim(f.blockCacheSize),u=We$i(u,a[o].subRequest.blockInfo);else if(t$$(f._packingRequest)&&f._packingRequest===J$_.QuadKey)u=Ee$n(u,a[o].subRequest.quadKeyIndex);else if(f._isBlock){var c;t$$(c=f.blockCache[a[o].subRequest.quadKey])||(c=new e$1p(f,a[o].subRequest.quadKey,u),f.blockCache[a[o].subRequest.quadKey+"_"+a[o].subRequest.providerName]=c),f.blockCacheQueue.touch(c),f.blockCacheQueue.trim(f.blockCacheSize),u=We$i(u,a[o].subRequest.blockInfo)}if(!t$$(u)){if(0===o&&n.length>1){var h=i+"_"+e+"_"+t;if(1!=($=l._combiInfo[h])[o+1].width)return void delete l._combiInfo[h]}continue}}var d,p;if(2===(d="ZIP"===l._compressType?lt$f.inflate(u).buffer:u).byteLength/(l._heightmapWidth*l._heightmapHeight)){var _=new Int16Array(d,0,l._heightmapWidth*l._heightmapHeight);p=[];for(var m=0;m<_.length;m++)p.push(parseFloat(_[m]))}else p=new Float32Array(d,0,l._heightmapWidth*l._heightmapHeight);r.push(p)}else r.push(void 0)}h=i+"_"+e+"_"+t;var $=l._combiInfo[h];if(delete l._combiInfo[h],r.length>1)for(o=0;o<r.length;o++)if(t$$(r[o])&&(0!=$[o].srcX||0!=$[o].srcY||1!=$[o].width)){_=l.division(r[o],$[o].srcX,$[o].srcY,$[o].width,l._heightmapWidth);r[o]=_}var g=[{},{},{},{}];for(o=0;o<r.length;o++)if(t$$(r[o])){var y=$[o].dataName,v=-1,x=-1,b=-1,S=-1;v=0==r[o][0]?2:1,x=0==r[o][l._heightmapWidth-1]?2:1,b=0==r[o][(l._heightmapHeight-1)*l._heightmapWidth]?2:1,S=0==r[o][l._heightmapHeight*l._heightmapWidth-1]?2:1;for(var w=.5*l._heightmapWidth,C=.5*l._heightmapHeight,T=0;T<r[o].length;T++){var P=Math.floor(T/l._heightmapWidth),E=T%l._heightmapWidth;if(P<C&&E<w){var A=r[o][T];if(1===v){if(0==A){v=3;break}}else if(0!=A){v=3;break}}}g[0][y]=v;for(T=0;T<r[o].length;T++){P=Math.floor(T/l._heightmapWidth),E=T%l._heightmapWidth;if(P<C&&E>=w){A=r[o][T];if(1===x){if(0==A){x=3;break}}else if(0!=A){x=3;break}}}g[1][y]=x;for(T=0;T<r[o].length;T++){P=Math.floor(T/l._heightmapWidth),E=T%l._heightmapWidth;if(P>=C&&E<w){A=r[o][T];if(1===b){if(0==A){b=3;break}}else if(0!=A){b=3;break}}}g[2][y]=b;for(T=0;T<r[o].length;T++){P=Math.floor(T/l._heightmapWidth),E=T%l._heightmapWidth;if(P>=C&&E>=w){A=r[o][T];if(1===S){if(0==A){S=3;break}}else if(0!=A){S=3;break}}}if(g[3][y]=S,1===v&&1===x&&1===b&&1===S)break}var L=[];for(o=0;o<r.length;o++)t$$(r[o])&&L.push(r[o]);if(0!==L.length){var M=L[0];if(L.length>1)for(T=0;T<M.length;T++)if(0==M[T])for(o=1;o<L.length;o++)if(0!=L[o][T]){M[T]=L[o][T];break}var I=!1;for(o=0;o<M.length;o++)if(Math.abs(M[o])>n$1d.EPSILON3){I=!0;break}var O=l._heightmapWidth,D=l._heightmapHeight,R=void 0;return l._requestVertexNormals&&(R=Pe$k(M,O,D,s,i)),new M$1a({buffer:M,width:O,height:D,skirtMode:l._isCreateSkirt,skirtScale:l._skirtScale,childTileMask:Be$k(l,e,t,i),structure:l._terrainDataStructure,valid:I,childTileMaskExt:g,normalTexture:R,level:i,x:e,y:t})}}}),(function(e){return c$18.reject(e)}))}},se$s.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};var ue$o=new s$1p;function Be$k(e,t,i,n){for(var r=e._tilingScheme,o=r.tileXYToRectangle(t,i,n),a=0,s=0;s<e._rectangles.length;s++){var l=e._rectangles[s];t$$(s$1p.intersection(l,o,ue$o))&&(_e$m(r,l,2*t,2*i,n+1)&&(a|=4),_e$m(r,l,2*t+1,2*i,n+1)&&(a|=8),_e$m(r,l,2*t,2*i+1,n+1)&&(a|=1),_e$m(r,l,2*t+1,2*i+1,n+1)&&(a|=2))}return a}function _e$m(e,t,i,n,r){var o=e.tileXYToRectangle(i,n,r);return t$$(s$1p.intersection(o,t,ue$o))}function e$18(e){e=e$1Y(e,!0),this.value=e$18.toValue(e)}se$s.prototype.getTileDataAvailable=function(e,t,i){if(0===i)return!0;for(var n=this._tilingScheme.tileXYToRectangle(e,t,i),r=0;r<this._rectangles.length;r++){if(t$$(s$1p.intersection(this._rectangles[r],n,ue$o))&&i>=this._levels[r][0]&&i<=this._levels[r][this._levels[r].length-1])return!0}return!1},se$s.prototype.loadTileDataAvailability=function(e,t,i){},Object.defineProperties(e$18.prototype,{componentDatatype:{get:function(){return C$12.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 1}},normalize:{get:function(){return!1}}}),e$18.toValue=function(e,t){if(!t$$(e))throw new t$_("show is required.");return t$$(t)?(t[0]=e,t):new Uint8Array([e])};var x$M={};function _a$1(e){var t=6.239996+.0172019696544*e;return.001657*Math.sin(t+.01671*Math.sin(t))}var pa$1=32.184,Ia$2=2451545;function G$J(e,t){t=o$10.addSeconds(e,pa$1,t);var i=o$10.totalDays(t)-Ia$2;return t=o$10.addSeconds(t,_a$1(i),t)}var L$N=new o$10(2451545,0,J$14.TAI),Ea$1=1e3,y$L=n$1d.RADIANS_PER_DEGREE,v$K=n$1d.RADIANS_PER_ARCSECOND,f$M=14959787e4,K$D=new r$W;function X$z(e,t,i,n,r,o,a){if(i<0&&(i=-i,r+=n$1d.PI),i<0||i>n$1d.PI)throw new t$_("The inclination is out of range. Inclination must be greater than or equal to zero and less than or equal to Pi radians.");var s=e*(1-t),l=n-r,u=r,c=Aa$1(o-n,t);if("Hyperbolic"===ba$1(t,0)&&Math.abs(n$1d.negativePiToPi(c))>=Math.acos(-1/t))throw new t$_("The true anomaly of the hyperbolic orbit lies outside of the bounds of the hyperbola.");Oa$1(l,i,u,K$D);var h=s*(1+t),d=Math.cos(c),f=Math.sin(c),p=1+t*d;if(p<=n$1d.Epsilon10)throw new t$_("elements cannot be converted to cartesian");var _=h/p;return t$$(a)?(a.x=_*d,a.y=_*f,a.z=0):a=new a$11(_*d,_*f,0),r$W.multiplyByVector(K$D,a,a)}function ba$1(e,t){if(e<0)throw new t$_("eccentricity cannot be negative.");return e<=t?"Circular":e<1-t?"Elliptical":e<=1+t?"Parabolic":"Hyperbolic"}function Aa$1(e,t){if(t<0||t>=1)throw new t$_("eccentricity out of range.");return Na$1(Da$1(e,t),t)}var j$P=50,Ta$1=n$1d.EPSILON8;function Da$1(e,t){if(t<0||t>=1)throw new t$_("eccentricity out of range.");var i,n=Math.floor(e/n$1d.TWO_PI),r=(e-=n*n$1d.TWO_PI)+t*Math.sin(e)/(1-Math.sin(e+t)+Math.sin(e)),o=Number.MAX_VALUE;for(i=0;i<j$P&&Math.abs(o-r)>Ta$1;++i){r=(o=r)-(o-t*Math.sin(o)-e)/(1-t*Math.cos(o))}if(i>=j$P)throw new t$_("Kepler equation did not converge");return o=r+n*n$1d.TWO_PI}function Na$1(e,t){if(t<0||t>=1)throw new t$_("eccentricity out of range.");var i=Math.floor(e/n$1d.TWO_PI);e-=i*n$1d.TWO_PI;var n=Math.cos(e)-t,r=Math.sin(e)*Math.sqrt(1-t*t),o=Math.atan2(r,n);return o=n$1d.zeroToTwoPi(o),e<0&&(o-=n$1d.TWO_PI),o+=i*n$1d.TWO_PI}function Oa$1(e,t,i,n){if(t<0||t>n$1d.PI)throw new t$_("inclination out of range");var r=Math.cos(e),o=Math.sin(e),a=Math.cos(t),s=Math.sin(t),l=Math.cos(i),u=Math.sin(i);return t$$(n)?(n[0]=l*r-u*o*a,n[1]=u*r+l*o*a,n[2]=o*s,n[3]=-l*o-u*r*a,n[4]=-u*o+l*r*a,n[5]=r*s,n[6]=u*s,n[7]=-l*s,n[8]=a):n=new r$W(l*r-u*o*a,-l*o-u*r*a,u*s,u*r+l*o*a,-u*o+l*r*a,-l*s,o*s,r*s,a),n}var Sa$1=1.0000010178*f$M,Ra$1=100.46645683*y$L,ga$1=1295977422.83429*v$K,k$I=16002,Q$J=21863,Z$O=32004,$$J=10931,aa=14529,ta=16368,na=15318,oa=32794,Wa=64*1e-7*f$M,Ca$1=1e-7*-152*f$M,Ya=62*1e-7*f$M,Ua$1=-8e-7*f$M,qa=32*1e-7*f$M,za$1=1e-7*-41*f$M,Ba$1=19*1e-7*f$M,La$1=1e-7*-11*f$M,Va$1=1e-7*-150*f$M,xa$1=1e-7*-46*f$M,Fa$1=68*1e-7*f$M,Ha$1=54*1e-7*f$M,Ja$1=14*1e-7*f$M,Ga$1=24*1e-7*f$M,Ka=1e-7*-28*f$M,Xa=22*1e-7*f$M,ea=10,ha=16002,sa=21863,ia=10931,Ma$1=1473,ra=32004,ca$1=4387,ua$1=73,ja=1e-7*-325,ka$1=1e-7*-322,Qa=1e-7*-79,Za=232*1e-7,$a=1e-7*-52,a1=97*1e-7,t1=55*1e-7,n1=1e-7*-41,o1=1e-7*-105,e1=1e-7*-137,h1=258*1e-7,s1=35*1e-7,i1=1e-7*-116,M1=1e-7*-88,r1=1e-7*-112,c1=1e-7*-80,O$H=new o$10(0,0,J$14.TAI);function u1(e,t){G$J(e,O$H);var i=(O$H.dayNumber-L$N.dayNumber+(O$H.secondsOfDay-L$N.secondsOfDay)/h$1a.SECONDS_PER_DAY)/(10*h$1a.DAYS_PER_JULIAN_CENTURY),n=.3595362*i,r=Sa$1+Wa*Math.cos(k$I*n)+Va$1*Math.sin(k$I*n)+Ca$1*Math.cos(Q$J*n)+xa$1*Math.sin(Q$J*n)+Ya*Math.cos(Z$O*n)+Fa$1*Math.sin(Z$O*n)+Ua$1*Math.cos($$J*n)+Ha$1*Math.sin($$J*n)+qa*Math.cos(aa*n)+Ja$1*Math.sin(aa*n)+za$1*Math.cos(ta*n)+Ga$1*Math.sin(ta*n)+Ba$1*Math.cos(na*n)+Ka*Math.sin(na*n)+La$1*Math.cos(oa*n)+Xa*Math.sin(oa*n),o=Ra$1+ga$1*i+ja*Math.cos(ea*n)+o1*Math.sin(ea*n)+ka$1*Math.cos(ha*n)+e1*Math.sin(ha*n)+Qa*Math.cos(sa*n)+h1*Math.sin(sa*n)+Za*Math.cos(ia*n)+s1*Math.sin(ia*n)+$a*Math.cos(Ma$1*n)+i1*Math.sin(Ma$1*n)+a1*Math.cos(ra*n)+M1*Math.sin(ra*n)+t1*Math.cos(ca$1*n)+r1*Math.sin(ca$1*n)+n1*Math.cos(ua$1*n)+c1*Math.sin(ua$1*n);return X$z(r,.0167086342-.0004203654*i,469.97289*v$K*i,102.93734808*y$L+11612.3529*v$K*i,174.87317577*y$L-8679.27034*v$K*i,o,t)}function fa$1(e,t){G$J(e,O$H);var i=(O$H.dayNumber-L$N.dayNumber+(O$H.secondsOfDay-L$N.secondsOfDay)/h$1a.SECONDS_PER_DAY)/h$1a.DAYS_PER_JULIAN_CENTURY,n=i*i,r=n*i,o=r*i,a=383397.7725+.004*i,s=.055545526-16e-9*i,l=5.15668983*y$L,u=-8e-5*i+.02966*n-42e-6*r-13e-8*o,c=83.35324312*y$L,h=14643420.2669*i-38.2702*n-.045047*r+21301e-8*o,d=125.04455501*y$L,f=-6967919.3631*i+6.3602*n+.007625*r-3586e-8*o,p=218.31664563*y$L,_=1732559343.4847*i-6.391*n+.006588*r-3169e-8*o,m=297.85019547*y$L+v$K*(1602961601.209*i-6.3706*n+.006593*r-3169e-8*o),$=134.96340251*y$L+v$K*(1717915923.2178*i+31.8792*n+.051635*r-2447e-7*o),g=357.52910918*y$L+v$K*(129596581.0481*i-.5532*n+136e-6*r-1149e-8*o),y=310.17137918*y$L-v$K*(6967051.436*i+6.2068*n+.007618*r-3219e-8*o),v=2*m,x=4*m,b=6*m,S=2*$,w=3*$,C=4*$,T=2*(93.27209062*y$L+v$K*(1739527262.8478*i-12.7512*n-.001037*r+417e-8*o));a+=3400.4*Math.cos(v)-635.6*Math.cos(v-$)-235.6*Math.cos($)+218.1*Math.cos(v-g)+181*Math.cos(v+$),s+=.014216*Math.cos(v-$)+.008551*Math.cos(v-S)-.001383*Math.cos($)+.001356*Math.cos(v+$)-.001147*Math.cos(x-w)-914e-6*Math.cos(x-S)+869e-6*Math.cos(v-g-$)-627e-6*Math.cos(v)-394e-6*Math.cos(x-C)+282e-6*Math.cos(v-g-S)-279e-6*Math.cos(m-$)-236e-6*Math.cos(S)+231e-6*Math.cos(x)+229e-6*Math.cos(b-C)-201e-6*Math.cos(S-T),u+=486.26*Math.cos(v-T)-40.13*Math.cos(v)+37.51*Math.cos(T)+25.73*Math.cos(S-T)+19.97*Math.cos(v-g-T),h+=-55609*Math.sin(v-$)-34711*Math.sin(v-S)-9792*Math.sin($)+9385*Math.sin(x-w)+7505*Math.sin(x-S)+5318*Math.sin(v+$)+3484*Math.sin(x-C)-3417*Math.sin(v-g-$)-2530*Math.sin(b-C)-2376*Math.sin(v)-2075*Math.sin(v-w)-1883*Math.sin(S)-1736*Math.sin(b-5*$)+1626*Math.sin(g)-1370*Math.sin(b-w),f+=-5392*Math.sin(v-T)-540*Math.sin(g)-441*Math.sin(v)+423*Math.sin(T)-288*Math.sin(S-T),_+=-3332.9*Math.sin(v)+1197.4*Math.sin(v-$)-662.5*Math.sin(g)+396.3*Math.sin($)-218*Math.sin(v-g);var P=2*y,E=3*y;u+=46.997*Math.cos(y)*i-.614*Math.cos(v-T+y)*i+.614*Math.cos(v-T-y)*i-.0297*Math.cos(P)*n-.0335*Math.cos(y)*n+.0012*Math.cos(v-T+P)*n-16e-5*Math.cos(y)*r+4e-5*Math.cos(E)*r+4e-5*Math.cos(P)*r;var A=2.116*Math.sin(y)*i-.111*Math.sin(v-T-y)*i-.0015*Math.sin(y)*n;return h+=A,_+=A,f+=-520.77*Math.sin(y)*i+13.66*Math.sin(v-T+y)*i+1.12*Math.sin(v-y)*i-1.06*Math.sin(T-y)*i+.66*Math.sin(P)*n+.371*Math.sin(y)*n-.035*Math.sin(v-T+P)*n-.015*Math.sin(v-T+y)*n+.0014*Math.sin(y)*r-.0011*Math.sin(E)*r-9e-4*Math.sin(P)*r,X$z(a*=Ea$1,s,l+u*v$K,c+h*v$K,d+f*v$K,p+_*v$K,t)}var la=.012300034,f1=la/(la+1)*-1;function l1(e,t){return t=fa$1(e,t),a$11.multiplyByScalar(t,f1,t)}var ma$1=new r$W(1.0000000000000002,5619723173785822e-31,4690511510146299e-34,-5154129427414611e-31,.9174820620691819,-.39777715593191376,-223970096136568e-30,.39777715593191376,.9174820620691819),W$T=new a$11;function oe$u(e,t,i,n,r,o,a){var s,l=v$V.numberOfPoints(e,t,r),u=i.red,c=i.green,h=i.blue,d=i.alpha,f=n.red,p=n.green,_=n.blue,m=n.alpha;if(e$1z.equals(i,n)){for(s=0;s<l;s++)o[a++]=e$1z.floatToByte(u),o[a++]=e$1z.floatToByte(c),o[a++]=e$1z.floatToByte(h),o[a++]=e$1z.floatToByte(d);return a}var $=(f-u)/l,g=(p-c)/l,y=(_-h)/l,v=(m-d)/l,x=a;for(s=0;s<l;s++)o[x++]=e$1z.floatToByte(u+s*$),o[x++]=e$1z.floatToByte(c+s*g),o[x++]=e$1z.floatToByte(h+s*y),o[x++]=e$1z.floatToByte(d+s*v);return x}function S$z(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).positions,i=e.colors,n=e$1Y(e.colorsPerVertex,!1);if(!t$$(t)||t.length<2)throw new t$_("At least two positions are required.");if(t$$(i)&&(n&&i.length<t.length||!n&&i.length<t.length-1))throw new t$_("colors has an invalid length.");this._positions=t,this._colors=i,this._colorsPerVertex=n,this._arcType=e$1Y(e.arcType,m$_.GEODESIC),this._granularity=e$1Y(e.granularity,n$1d.RADIANS_PER_DEGREE),this._ellipsoid=e$1Y(e.ellipsoid,n$1c.WGS84),this._workerName="createSimplePolylineGeometry";var r=1+t.length*a$11.packedLength;r+=t$$(i)?1+i.length*e$1z.packedLength:1,this.packedLength=r+n$1c.packedLength+3}x$M.computeSunPositionInEarthInertialFrame=function(e,t){return t$$(e)||(e=o$10.now()),t$$(t)||(t=new a$11),W$T=u1(e,W$T),t=a$11.negate(W$T,t),l1(e,W$T),a$11.subtract(t,W$T,t),r$W.multiplyByVector(ma$1,t,t),t},x$M.computeMoonPositionInEarthInertialFrame=function(e,t){return t$$(e)||(e=o$10.now()),t=fa$1(e,t),r$W.multiplyByVector(ma$1,t,t),t},S$z.pack=function(e,t,i){if(!t$$(e))throw new t$_("value is required");if(!t$$(t))throw new t$_("array is required");i=e$1Y(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=a$11.packedLength)a$11.pack(r[n],t,i);var a=e._colors;for(o=t$$(a)?a.length:0,t[i++]=o,n=0;n<o;++n,i+=e$1z.packedLength)e$1z.pack(a[n],t,i);return n$1c.pack(e._ellipsoid,t,i),i+=n$1c.packedLength,t[i++]=e._colorsPerVertex?1:0,t[i++]=e._arcType,t[i]=e._granularity,t},S$z.unpack=function(e,t,i){if(!t$$(e))throw new t$_("array is required");t=e$1Y(t,0);var n,r=e[t++],o=new Array(r);for(n=0;n<r;++n,t+=a$11.packedLength)o[n]=a$11.unpack(e,t);var a=(r=e[t++])>0?new Array(r):void 0;for(n=0;n<r;++n,t+=e$1z.packedLength)a[n]=e$1z.unpack(e,t);var s=n$1c.unpack(e,t);t+=n$1c.packedLength;var l=1===e[t++],u=e[t++],c=e[t];return t$$(i)?(i._positions=o,i._colors=a,i._ellipsoid=s,i._colorsPerVertex=l,i._arcType=u,i._granularity=c,i):new S$z({positions:o,colors:a,ellipsoid:s,colorsPerVertex:l,arcType:u,granularity:c})};var C$M=new Array(2),O$G=new Array(2),ae$w={positions:C$M,height:O$G,ellipsoid:void 0,minDistance:void 0,granularity:void 0};S$z.createGeometry=function(e){var t,i,n,r,o,a=e._positions,s=e._colors,l=e._colorsPerVertex,u=e._arcType,c=e._granularity,h=e._ellipsoid,d=n$1d.chordLength(c,h.maximumRadius),f=t$$(s)&&!l,p=a.length,_=0;if(u===m$_.GEODESIC||u===m$_.RHUMB){var m,$,g;u===m$_.GEODESIC?(m=n$1d.chordLength(c,h.maximumRadius),$=v$V.numberOfPoints,g=v$V.generateArc):(m=c,$=v$V.numberOfPointsRhumbLine,g=v$V.generateRhumbArc);var y=v$V.extractHeights(a,h),v=ae$w;if(u===m$_.GEODESIC?v.minDistance=d:v.granularity=c,v.ellipsoid=h,f){var x=0;for(t=0;t<p-1;t++)x+=$(a[t],a[t+1],m)+1;i=new Float64Array(3*x),r=new Uint8Array(4*x),v.positions=C$M,v.height=O$G;var b=0;for(t=0;t<p-1;++t){C$M[0]=a[t],C$M[1]=a[t+1],O$G[0]=y[t],O$G[1]=y[t+1];var S=g(v);if(t$$(s)){var w=S.length/3;o=s[t];for(var C=0;C<w;++C)r[b++]=e$1z.floatToByte(o.red),r[b++]=e$1z.floatToByte(o.green),r[b++]=e$1z.floatToByte(o.blue),r[b++]=e$1z.floatToByte(o.alpha)}i.set(S,_),_+=S.length}}else if(v.positions=a,v.height=y,i=new Float64Array(g(v)),t$$(s)){for(r=new Uint8Array(i.length/3*4),t=0;t<p-1;++t){_=oe$u(a[t],a[t+1],s[t],s[t+1],d,r,_)}var T=s[p-1];r[_++]=e$1z.floatToByte(T.red),r[_++]=e$1z.floatToByte(T.green),r[_++]=e$1z.floatToByte(T.blue),r[_++]=e$1z.floatToByte(T.alpha)}}else{n=f?2*p-2:p,i=new Float64Array(3*n),r=t$$(s)?new Uint8Array(4*n):void 0;var P=0,E=0;for(t=0;t<p;++t){var A=a[t];if(f&&t>0&&(a$11.pack(A,i,P),P+=3,o=s[t-1],r[E++]=e$1z.floatToByte(o.red),r[E++]=e$1z.floatToByte(o.green),r[E++]=e$1z.floatToByte(o.blue),r[E++]=e$1z.floatToByte(o.alpha)),f&&t===p-1)break;a$11.pack(A,i,P),P+=3,t$$(s)&&(o=s[t],r[E++]=e$1z.floatToByte(o.red),r[E++]=e$1z.floatToByte(o.green),r[E++]=e$1z.floatToByte(o.blue),r[E++]=e$1z.floatToByte(o.alpha))}}var L=new t$W;L.position=new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:i}),t$$(s)&&(L.color=new r$Q({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:4,values:r,normalize:!0}));var M=2*((n=i.length/3)-1),I=fe$u.createTypedArray(n,M),O=0;for(t=0;t<n-1;++t)I[O++]=t,I[O++]=t+1;return new T$11({attributes:L,indices:I,primitiveType:H$11.LINES,boundingSphere:c$19.fromPoints(a)})};var e$17={DisplayMode:{NONE:0,FACE:1,ARROW:2,FACE_AND_ARROW:3}},_0x55779b=Object.freeze(e$17);function r$A(){this._maxVisibleValue=17976931348623157e292,this._minVisibleValue=-17976931348623157e292,this._floor=0,this._ceiling=0,this._opacity=1,this._updateColorDictTable=!1,this._coverageArea=[],this._updatePolygon=!0,this._displayMode=_0x55779b.DisplayMode.FACE,this._dictColorTable=void 0,this._slopeArrowsColor=new e$1z(1,1,1,1)}function o$J(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).points,i=e.times;if(!t$$(t)||!t$$(i))throw new t$_("points and times are required.");if(t.length<2)throw new t$_("points.length must be greater than or equal to 2.");if(i.length!==t.length)throw new t$_("times.length must be equal to points.length.");this._times=i,this._points=t,this._lastTimeIndex=0}function n$P(e){var t=e$1Y(e.radius,1),i={radii:new a$11(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,vertexFormat:e.vertexFormat};this._ellipsoidGeometry=new b$18(i),this._workerName="createSphereGeometry"}r$A.prototype.destroy=function(){this._coverageArea.length=0,t$$(this._dictColorTable)&&this._dictColorTable.destroy()},Object.defineProperties(r$A.prototype,{MinVisibleValue:{get:function(){return this._minVisibleValue},set:function(e){this._minVisibleValue=e}},MaxVisibleValue:{get:function(){return this._maxVisibleValue},set:function(e){this._maxVisibleValue=e}},ColorTableMaxKey:{get:function(){return this._ceiling},set:function(e){this._ceiling=e}},ColorTableMinKey:{get:function(){return this._floor},set:function(e){this._floor=e}},ColorTable:{get:function(){return this._dictColorTable},set:function(e){if(t$$(e)){this._dictColorTable=o$T.clone(e,this._dictColorTable),this._updateColorDictTable=!0;var t=this._dictColorTable.count();if(!(t<1)){new e$1z;var i=0,n=0,r=this._dictColorTable.getItem(0);t$$(r)&&t$$(r.altitude)&&(i=parseFloat(r.altitude)),t$$(r=this._dictColorTable.getItem(t-1))&&t$$(r.altitude)&&(n=parseFloat(r.altitude)),this._ceiling=Math.max(i,n),this._floor=Math.min(i,n)}}else t$$(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null)}},Opacity:{get:function(){return this._opacity},set:function(e){this._opacity=e}},CoverageArea:{get:function(){return this._coverageArea},set:function(e){if(this._updatePolygon=!0,this._coverageArea.length=0,t$$(e))for(var t=0;t<e.length;t++)this._coverageArea[t]=e[t]}},DisplayMode:{get:function(){return this._displayMode},set:function(e){this._displayMode=e}},UpdateColorDictTable:{get:function(){return this._updateColorDictTable},set:function(e){this._updateColorDictTable=e}},UpdatePolygonRegion:{get:function(){return this._updatePolygon},set:function(e){this._updatePolygon=e}},SlopeArrowsColor:{get:function(){return this._slopeArrowsColor},set:function(e){this._slopeArrowsColor=e}}}),r$A.clone=function(e,t){if(t$$(e)){t$$(t)||(t=new r$A),t._maxVisibleValue=e._maxVisibleValue,t._minVisibleValue=e._minVisibleValue,t._floor=e._floor,t._ceiling=e._ceiling,t._opacity=e._opacity,t._updateColorDictTable=e._updateColorDictTable,t._updatePolygon=e._updatePolygon,t._displayMode=e._displayMode,t._dictColorTable=o$T.clone(e._dictColorTable,t._dictColorTable),t._slopeArrowsColor=e._slopeArrowsColor,t._coverageArea.length=0;for(var i=0;i<e._coverageArea.length;i++)t._coverageArea[i]=e._coverageArea[i];return t}},Object.defineProperties(o$J.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),o$J.prototype.findTimeInterval=i$13.prototype.findTimeInterval,o$J.prototype.wrapTime=i$13.prototype.wrapTime,o$J.prototype.clampTime=i$13.prototype.clampTime,o$J.prototype.evaluate=function(e,t){var i=this.points,n=this.times,r=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),o=(e-n[r])/(n[r+1]-n[r]);return o*=(3-2*o)*o,t$$(t)||(t=new a$11),a$11.lerp(i[r],i[r+1],o,t)},n$P.packedLength=b$18.packedLength,n$P.pack=function(e,t,i){return n$1e.typeOf.object("value",e),b$18.pack(e._ellipsoidGeometry,t,i)};var l$P=new b$18,r$z={radius:void 0,radii:new a$11,vertexFormat:new n$12,stackPartitions:void 0,slicePartitions:void 0};function a$D(e){var t=e$1Y(e.radius,1),i={radii:new a$11(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,subdivisions:e.subdivisions};this._ellipsoidGeometry=new I$Z(i),this._workerName="createSphereOutlineGeometry"}n$P.unpack=function(e,t,i){var n=b$18.unpack(e,t,l$P);return r$z.vertexFormat=n$12.clone(n._vertexFormat,r$z.vertexFormat),r$z.stackPartitions=n._stackPartitions,r$z.slicePartitions=n._slicePartitions,t$$(i)?(a$11.clone(n._radii,r$z.radii),i._ellipsoidGeometry=new b$18(r$z),i):(r$z.radius=n._radii.x,new n$P(r$z))},n$P.createGeometry=function(e){return b$18.createGeometry(e._ellipsoidGeometry)},a$D.packedLength=I$Z.packedLength,a$D.pack=function(e,t,i){return n$1e.typeOf.object("value",e),I$Z.pack(e._ellipsoidGeometry,t,i)};var l$O=new I$Z,s$Z={radius:void 0,radii:new a$11,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};function c$O(e,t,i){this.clock=e$1Y(e,0),this.cone=e$1Y(t,0),this.magnitude=e$1Y(i,1)}function n$O(e,t){if(!t$$(e))throw new t$_("array is required.");if(!t$$(t)||t<1)throw new t$_("numberOfArrays must be greater than 0.");for(var i=[],n=e.length,r=0;r<n;){var o=Math.ceil((n-r)/t--);i.push(e.slice(r,r+o)),r+=o}return i}function u$O(e){this.url=e$1Y(e.url,"")}function t$I(){this._fProgress=0,this._nLocation=-1,this._changeZValue=!0}function r$y(){t$_.throwInstantiationError()}a$D.unpack=function(e,t,i){var n=I$Z.unpack(e,t,l$O);return s$Z.stackPartitions=n._stackPartitions,s$Z.slicePartitions=n._slicePartitions,s$Z.subdivisions=n._subdivisions,t$$(i)?(a$11.clone(n._radii,s$Z.radii),i._ellipsoidGeometry=new I$Z(s$Z),i):(s$Z.radius=n._radii.x,new a$D(s$Z))},a$D.createGeometry=function(e){return I$Z.createGeometry(e._ellipsoidGeometry)},c$O.fromCartesian3=function(e,t){n$1e.typeOf.object("cartesian3",e);var i=e.x,n=e.y,r=e.z,o=i*i+n*n;return t$$(t)||(t=new c$O),t.clock=Math.atan2(n,i),t.cone=Math.atan2(Math.sqrt(o),r),t.magnitude=Math.sqrt(o+r*r),t},c$O.clone=function(e,t){if(t$$(e))return t$$(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=e.magnitude,t):new c$O(e.clock,e.cone,e.magnitude)},c$O.normalize=function(e,t){return n$1e.typeOf.object("spherical",e),t$$(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=1,t):new c$O(e.clock,e.cone,1)},c$O.equals=function(e,t){return e===t||t$$(e)&&t$$(t)&&e.clock===t.clock&&e.cone===t.cone&&e.magnitude===t.magnitude},c$O.equalsEpsilon=function(e,t,i){return i=e$1Y(i,0),e===t||t$$(e)&&t$$(t)&&Math.abs(e.clock-t.clock)<=i&&Math.abs(e.cone-t.cone)<=i&&Math.abs(e.magnitude-t.magnitude)<=i},c$O.prototype.equals=function(e){return c$O.equals(this,e)},c$O.prototype.clone=function(e){return c$O.clone(this,e)},c$O.prototype.equalsEpsilon=function(e,t){return c$O.equalsEpsilon(this,e,t)},c$O.prototype.toString=function(){return"("+this.clock+", "+this.cone+", "+this.magnitude+")"},u$O.checkSptialLicense=function(e){if(!t$$(e))throw new t$_("url is required");if("string"!=typeof e)throw new t$_("url must be a string");var t=e.lastIndexOf("realspace");if(-1===t)return c$18.resolve(!1).then((function(){return!1})).otherwise((function(){return!1}));var i=e.substring(0,t);return e=i+"realspace/spatiallicense.xml",t$$(a$R.CREDENTIAL)&&(e=a$R.addToken(e)),v$_({url:e,responseType:"text"}).then((function(e){return-1!==e.indexOf("<boolean>true</boolean>")})).otherwise((function(e){return!1}))},Object.defineProperties(t$I.prototype,{progress:{get:function(){return this._fProgress},set:function(e){this._fProgress=e}},location:{get:function(){return this._nLocation},set:function(e){this._nLocation=e}},changeZValue:{get:function(){return this._changeZValue},set:function(e){this._changeZValue=e}}}),t$I.clone=function(e,t){if(t$$(e))return t$$(t)||(t=new t$I),t._fTemporalPercentage=e._fTemporalPercentage,t._nTemporalPos=e._nTemporalPos,t},Object.defineProperties(r$y.prototype,{credits:{get:t$_.throwInstantiationError},waterMask:{get:t$_.throwInstantiationError}}),r$y.prototype.interpolateHeight=t$_.throwInstantiationError,r$y.prototype.isChildAvailable=t$_.throwInstantiationError,r$y.prototype.createMesh=t$_.throwInstantiationError,r$y.prototype.upsample=t$_.throwInstantiationError,r$y.prototype.wasCreatedByUpsampling=t$_.throwInstantiationError;var o$I={},c$N=typeof document<"u"?new h$1f(document.location.href):new h$1f;function s$Y(e){var t=new h$1f(e).resolve(c$N);t.normalize();var i=t.authority;return/:/.test(i)||(i=i+":"+("https"===t.scheme?"443":"80")),i}function m$I(e,t){var i=s$Y(e),n=e$1Y(o$I[i],0);if(!(n>=m$I.maximumRequestsPerServer))return o$I[i]=n+1,c$18(t(e),(function(e){return o$I[i]--,e})).otherwise((function(e){return o$I[i]--,c$18.reject(e)}))}m$I.maximumRequestsPerServer=6;var T$N={WEST:0,NORTH:1,EAST:2,SOUTH:3,NORTHWEST:4,NORTHEAST:5,SOUTHWEST:6,SOUTHEAST:7};function o$H(e){throw new t$_("This type should not be instantiated directly. Instead, use WebMercatorTilingScheme or GeographicTilingScheme.")}function q$V(e,t){return o$10.compare(e.start,t.start)}function p$X(e){if(this._intervals=[],this._changedEvent=new o$15,t$$(e))for(var t=e.length,i=0;i<t;i++)this.addInterval(e[i])}Object.defineProperties(o$H.prototype,{ellipsoid:{get:t$_.throwInstantiationError},rectangle:{get:t$_.throwInstantiationError},projection:{get:t$_.throwInstantiationError}}),o$H.prototype.getNumberOfXTilesAtLevel=t$_.throwInstantiationError,o$H.prototype.getNumberOfYTilesAtLevel=t$_.throwInstantiationError,o$H.prototype.rectangleToNativeRectangle=t$_.throwInstantiationError,o$H.prototype.tileXYToNativeRectangle=t$_.throwInstantiationError,o$H.prototype.tileXYToRectangle=t$_.throwInstantiationError,o$H.prototype.positionToTileXY=t$_.throwInstantiationError,Object.defineProperties(p$X.prototype,{changedEvent:{get:function(){return this._changedEvent}},start:{get:function(){var e=this._intervals;return 0===e.length?void 0:e[0].start}},isStartIncluded:{get:function(){var e=this._intervals;return 0!==e.length&&e[0].isStartIncluded}},stop:{get:function(){var e=this._intervals,t=e.length;return 0===t?void 0:e[t-1].stop}},isStopIncluded:{get:function(){var e=this._intervals,t=e.length;return 0!==t&&e[t-1].isStopIncluded}},length:{get:function(){return this._intervals.length}},isEmpty:{get:function(){return 0===this._intervals.length}}}),p$X.prototype.equals=function(e,t){if(this===e)return!0;if(!(e instanceof p$X))return!1;var i=this._intervals,n=e._intervals,r=i.length;if(r!==n.length)return!1;for(var o=0;o<r;o++)if(!n$T.equals(i[o],n[o],t))return!1;return!0},p$X.prototype.get=function(e){if(!t$$(e))throw new t$_("index is required.");return this._intervals[e]},p$X.prototype.removeAll=function(){this._intervals.length>0&&(this._intervals.length=0,this._changedEvent.raiseEvent(this))},p$X.prototype.findIntervalContainingDate=function(e){var t=this.indexOf(e);return t>=0?this._intervals[t]:void 0},p$X.prototype.findDataForIntervalContainingDate=function(e){var t=this.indexOf(e);return t>=0?this._intervals[t].data:void 0},p$X.prototype.contains=function(e){return this.indexOf(e)>=0};var _$L=new n$T;p$X.prototype.indexOf=function(e){if(!t$$(e))throw new t$_("date is required");var t=this._intervals;_$L.start=e,_$L.stop=e;var i=u$16(t,_$L,q$V);return i>=0?t[i].isStartIncluded?i:i>0&&t[i-1].stop.equals(e)&&t[i-1].isStopIncluded?i-1:~i:(i=~i)>0&&i-1<t.length&&n$T.contains(t[i-1],e)?i-1:~i},p$X.prototype.findInterval=function(e){for(var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).start,i=e.stop,n=e.isStartIncluded,r=e.isStopIncluded,o=this._intervals,a=0,s=o.length;a<s;a++){var l=o[a];if((!t$$(t)||l.start.equals(t))&&(!t$$(i)||l.stop.equals(i))&&(!t$$(n)||l.isStartIncluded===n)&&(!t$$(r)||l.isStopIncluded===r))return o[a]}},p$X.prototype.addInterval=function(e,t){if(!t$$(e))throw new t$_("interval is required");if(!e.isEmpty){var i=this._intervals;if(0===i.length||o$10.greaterThan(e.start,i[i.length-1].stop))return i.push(e),void this._changedEvent.raiseEvent(this);var n,r=u$16(i,e,q$V);for(r<0?r=~r:r>0&&e.isStartIncluded&&i[r-1].isStartIncluded&&i[r-1].start.equals(e.start)?--r:r<i.length&&!e.isStartIncluded&&i[r].isStartIncluded&&i[r].start.equals(e.start)&&++r,r>0&&(((n=o$10.compare(i[r-1].stop,e.start))>0||0===n&&(i[r-1].isStopIncluded||e.isStartIncluded))&&((t$$(t)?t(i[r-1].data,e.data):i[r-1].data===e.data)?(e=o$10.greaterThan(e.stop,i[r-1].stop)?new n$T({start:i[r-1].start,stop:e.stop,isStartIncluded:i[r-1].isStartIncluded,isStopIncluded:e.isStopIncluded,data:e.data}):new n$T({start:i[r-1].start,stop:i[r-1].stop,isStartIncluded:i[r-1].isStartIncluded,isStopIncluded:i[r-1].isStopIncluded||e.stop.equals(i[r-1].stop)&&e.isStopIncluded,data:e.data}),i.splice(r-1,1),--r):(((n=o$10.compare(i[r-1].stop,e.stop))>0||0===n&&i[r-1].isStopIncluded&&!e.isStopIncluded)&&i.splice(r,0,new n$T({start:e.stop,stop:i[r-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:i[r-1].isStopIncluded,data:i[r-1].data})),i[r-1]=new n$T({start:i[r-1].start,stop:e.start,isStartIncluded:i[r-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:i[r-1].data}))));r<i.length&&((n=o$10.compare(e.stop,i[r].start))>0||0===n&&(e.isStopIncluded||i[r].isStartIncluded));)if(t$$(t)?t(i[r].data,e.data):i[r].data===e.data)e=new n$T({start:e.start,stop:o$10.greaterThan(i[r].stop,e.stop)?i[r].stop:e.stop,isStartIncluded:e.isStartIncluded,isStopIncluded:o$10.greaterThan(i[r].stop,e.stop)?i[r].isStopIncluded:e.isStopIncluded,data:e.data}),i.splice(r,1);else{if(i[r]=new n$T({start:e.stop,stop:i[r].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:i[r].isStopIncluded,data:i[r].data}),!i[r].isEmpty)break;i.splice(r,1)}i.splice(r,0,e),this._changedEvent.raiseEvent(this)}},p$X.prototype.removeInterval=function(e){if(!t$$(e))throw new t$_("interval is required");if(e.isEmpty)return!1;var t=this._intervals,i=u$16(t,e,q$V);i<0&&(i=~i);var n=!1;for(i>0&&(o$10.greaterThan(t[i-1].stop,e.start)||t[i-1].stop.equals(e.start)&&t[i-1].isStopIncluded&&e.isStartIncluded)&&(n=!0,(o$10.greaterThan(t[i-1].stop,e.stop)||t[i-1].isStopIncluded&&!e.isStopIncluded&&t[i-1].stop.equals(e.stop))&&t.splice(i,0,new n$T({start:e.stop,stop:t[i-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[i-1].isStopIncluded,data:t[i-1].data})),t[i-1]=new n$T({start:t[i-1].start,stop:e.start,isStartIncluded:t[i-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:t[i-1].data})),i<t.length&&!e.isStartIncluded&&t[i].isStartIncluded&&e.start.equals(t[i].start)&&(n=!0,t.splice(i,0,new n$T({start:t[i].start,stop:t[i].start,isStartIncluded:!0,isStopIncluded:!0,data:t[i].data})),++i);i<t.length&&o$10.greaterThan(e.stop,t[i].stop);)n=!0,t.splice(i,1);return i<t.length&&e.stop.equals(t[i].stop)&&(n=!0,!e.isStopIncluded&&t[i].isStopIncluded?i+1<t.length&&t[i+1].start.equals(e.stop)&&t[i].data===t[i+1].data?(t.splice(i,1),t[i]=new n$T({start:t[i].start,stop:t[i].stop,isStartIncluded:!0,isStopIncluded:t[i].isStopIncluded,data:t[i].data})):t[i]=new n$T({start:e.stop,stop:e.stop,isStartIncluded:!0,isStopIncluded:!0,data:t[i].data}):t.splice(i,1)),i<t.length&&(o$10.greaterThan(e.stop,t[i].start)||e.stop.equals(t[i].start)&&e.isStopIncluded&&t[i].isStartIncluded)&&(n=!0,t[i]=new n$T({start:e.stop,stop:t[i].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[i].isStopIncluded,data:t[i].data})),n&&this._changedEvent.raiseEvent(this),n},p$X.prototype.intersect=function(e,t,i){if(!t$$(e))throw new t$_("other is required.");for(var n=new p$X,r=0,o=0,a=this._intervals,s=e._intervals;r<a.length&&o<s.length;){var l=a[r],u=s[o];if(o$10.lessThan(l.stop,u.start))++r;else if(o$10.lessThan(u.stop,l.start))++o;else{if(t$$(i)||t$$(t)&&t(l.data,u.data)||!t$$(t)&&u.data===l.data){var c=n$T.intersect(l,u,new n$T,i);c.isEmpty||n.addInterval(c,t)}o$10.lessThan(l.stop,u.stop)||l.stop.equals(u.stop)&&!l.isStopIncluded&&u.isStopIncluded?++r:++o}}return n},p$X.fromJulianDateArray=function(e,t){if(!t$$(e))throw new t$_("options is required.");if(!t$$(e.julianDates))throw new t$_("options.iso8601Array is required.");t$$(t)||(t=new p$X);var i,n=e.julianDates,r=n.length,o=e.dataCallback,a=e$1Y(e.isStartIncluded,!0),s=e$1Y(e.isStopIncluded,!0),l=e$1Y(e.leadingInterval,!1),u=e$1Y(e.trailingInterval,!1),c=0;l&&(++c,(i=new n$T({start:f$S.MINIMUM_VALUE,stop:n[0],isStartIncluded:!0,isStopIncluded:!a})).data=t$$(o)?o(i,t.length):t.length,t.addInterval(i));for(var h=0;h<r-1;++h){var d=n[h],f=n[h+1];(i=new n$T({start:d,stop:f,isStartIncluded:t.length!==c||a,isStopIncluded:h===r-2&&s})).data=t$$(o)?o(i,t.length):t.length,t.addInterval(i),d=f}return u&&((i=new n$T({start:n[r-1],stop:f$S.MAXIMUM_VALUE,isStartIncluded:!s,isStopIncluded:!0})).data=t$$(o)?o(i,t.length):t.length,t.addInterval(i)),t};var I$T=new d$15,m$H=[0,31,28,31,30,31,30,31,31,30,31,30,31];function D$Q(e,t,i){t$$(i)||(i=new o$10),o$10.toGregorianDate(e,I$T);var n=I$T.millisecond+t.millisecond,r=I$T.second+t.second,o=I$T.minute+t.minute,a=I$T.hour+t.hour,s=I$T.day+t.day,l=I$T.month+t.month,u=I$T.year+t.year;for(n>=1e3&&(r+=Math.floor(n/1e3),n%=1e3),r>=60&&(o+=Math.floor(r/60),r%=60),o>=60&&(a+=Math.floor(o/60),o%=60),a>=24&&(s+=Math.floor(a/24),a%=24),m$H[2]=i$16(u)?29:28;s>m$H[l]||l>=13;)s>m$H[l]&&(s-=m$H[l],++l),l>=13&&(--l,u+=Math.floor(l/12),l%=12,++l),m$H[2]=i$16(u)?29:28;return I$T.millisecond=n,I$T.second=r,I$T.minute=o,I$T.hour=a,I$T.day=s,I$T.month=l,I$T.year=u,o$10.fromGregorianDate(I$T,i)}var N$O=new o$10,j$O=/P(?:([\d.,]+)Y)?(?:([\d.,]+)M)?(?:([\d.,]+)W)?(?:([\d.,]+)D)?(?:T(?:([\d.,]+)H)?(?:([\d.,]+)M)?(?:([\d.,]+)S)?)?/;function C$L(e,t){if(!t$$(e)||0===e.length)return!1;if(t.year=0,t.month=0,t.day=0,t.hour=0,t.minute=0,t.second=0,t.millisecond=0,"P"===e[0]){var i=e.match(j$O);if(!t$$(i))return!1;if(t$$(i[1])&&(t.year=Number(i[1].replace(",","."))),t$$(i[2])&&(t.month=Number(i[2].replace(",","."))),t$$(i[3])&&(t.day=7*Number(i[3].replace(",","."))),t$$(i[4])&&(t.day+=Number(i[4].replace(",","."))),t$$(i[5])&&(t.hour=Number(i[5].replace(",","."))),t$$(i[6])&&(t.minute=Number(i[6].replace(",","."))),t$$(i[7])){var n=Number(i[7].replace(",","."));t.second=Math.floor(n),t.millisecond=n%1*1e3}}else"Z"!==e[e.length-1]&&(e+="Z"),o$10.toGregorianDate(o$10.fromIso8601(e,N$O),t);return t.year||t.month||t.day||t.hour||t.minute||t.second||t.millisecond}var w$Q=new d$15;p$X.fromIso8601=function(e,t){if(!t$$(e))throw new t$_("options is required.");if(!t$$(e.iso8601))throw new t$_("options.iso8601 is required.");var i=e.iso8601.split("/"),n=o$10.fromIso8601(i[0]),r=o$10.fromIso8601(i[1]),o=[];if(C$L(i[2],w$Q)){var a=o$10.clone(n);for(o.push(a);o$10.compare(a,r)<0;){a=D$Q(a,w$Q),o$10.compare(r,a)<=0&&o$10.clone(r,a),o.push(a)}}else o.push(n,r);return p$X.fromJulianDateArray({julianDates:o,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},p$X.fromIso8601DateArray=function(e,t){if(!t$$(e))throw new t$_("options is required.");if(!t$$(e.iso8601Dates))throw new t$_("options.iso8601Dates is required.");return p$X.fromJulianDateArray({julianDates:e.iso8601Dates.map((function(e){return o$10.fromIso8601(e)})),isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},p$X.fromIso8601DurationArray=function(e,t){if(!t$$(e))throw new t$_("options is required.");if(!t$$(e.epoch))throw new t$_("options.epoch is required.");if(!t$$(e.iso8601Durations))throw new t$_("options.iso8601Durations is required.");for(var i,n,r=e.epoch,o=e.iso8601Durations,a=e$1Y(e.relativeToPrevious,!1),s=[],l=o.length,u=0;u<l;++u)(C$L(o[u],w$Q)||0===u)&&(i=a&&t$$(n)?D$Q(n,w$Q):D$Q(r,w$Q),s.push(i),n=i);return p$X.fromJulianDateArray({julianDates:s,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};var l$N=new a$11(1,1,1),c$M=a$11.ZERO,u$N=a$U.IDENTITY,a$C=function(e,t,i){this.translation=a$11.clone(e$1Y(e,c$M)),this.rotation=a$U.clone(e$1Y(t,u$N)),this.scale=a$11.clone(e$1Y(i,l$N))};function n$N(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).points,i=e.times;if(!t$$(t)||!t$$(i))throw new t$_("points and times are required.");if(2!==i.length)throw new t$_("times.length must be equal to 2.");if(2!==t.length)throw new t$_("points.length must be equal to 2.");this._mode=e$1Y(e.mode,0),this._acceleration=2*a$11.distance(t[1],t[0])/((i[1]-i[0])*(i[1]-i[0])),this._points=t,this._times=i,this._direction=a$11.subtract(t[1],t[0],new a$11),this._duration=this._times[1]-this._times[0],a$11.normalize(this._direction,this._direction)}function s$X(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._clock=void 0,this._element=void 0,this._clockSubscription=void 0,this._seekFunction=void 0,this._lastPlaybackRate=void 0,this.clock=e.clock,this.element=e.element,this.epoch=e$1Y(e.epoch,f$S.MINIMUM_VALUE),this.tolerance=e$1Y(e.tolerance,1),this._seeking=!1,this._seekFunction=void 0,this._firstTickAfterSeek=!1}function d$L(e){return function(){e._seeking=!1,e._firstTickAfterSeek=!0}}function I$S(e,t){this.rectangle=e,this.maxLevel=t}function h$R(e){if(!t$$((e=e$1Y(e,e$1Y.EMPTY_OBJECT)).url))throw new t$_("options.url is required.");var t=t$X.createIfNeeded(e.url);this._resource=t,this._errorEvent=new o$15,this._ready=!1,this._readyPromise=c$18.defer(),this._terrainDataStructure={heightScale:.001,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0,lowestEncodedHeight:0,highestEncodedHeight:16777215};var i=e.credit;"string"==typeof i&&(i=new i$17(i)),this._credit=i,this._tilingScheme=void 0,this._rectangles=[];var n,r=this,o=e$1Y(e.ellipsoid,n$1c.WGS84);function a(e){var t=e.getElementsByTagName("SRS")[0].textContent;if("EPSG:4326"===t){r._tilingScheme=new a$W({ellipsoid:o});var i=e.getElementsByTagName("TileFormat")[0];r._heightmapWidth=parseInt(i.getAttribute("width"),10),r._heightmapHeight=parseInt(i.getAttribute("height"),10),r._levelZeroMaximumGeometricError=d$11.getEstimatedLevelZeroGeometricErrorForAHeightmap(o,Math.min(r._heightmapWidth,r._heightmapHeight),r._tilingScheme.getNumberOfXTilesAtLevel(0));for(var n=e.getElementsByTagName("DataExtent"),a=0;a<n.length;++a){var l=n[a],u=n$1d.toRadians(parseFloat(l.getAttribute("minx"))),c=n$1d.toRadians(parseFloat(l.getAttribute("miny"))),h=n$1d.toRadians(parseFloat(l.getAttribute("maxx"))),d=n$1d.toRadians(parseFloat(l.getAttribute("maxy"))),f=parseInt(l.getAttribute("maxlevel"),10);r._rectangles.push(new I$S(new s$1p(u,c,h,d),f))}r._ready=!0,r._readyPromise.resolve(!0)}else s("SRS "+t+" is not supported.")}function s(e){var t=e$1Y(e,"An error occurred while accessing "+r._resource.url+".");n=c$_.handleError(n,r,r._errorEvent,t,void 0,void 0,void 0,l)}function l(){c$18(r._resource.fetchXML(),a,s)}l()}a$C.prototype.equals=function(e){return this===e||t$$(e)&&a$11.equals(this.translation,e.translation)&&a$U.equals(this.rotation,e.rotation)&&a$11.equals(this.scale,e.scale)},Object.defineProperties(n$N.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),n$N.prototype.clampTime=function(e){return e},n$N.prototype.evaluate=function(e,t){t$$(t)||(t=new a$11);var i,n=this._points;(e-=this._times[0],0===this._mode)?i=.5*this._acceleration*e*e:i=this._acceleration*this._duration*e-.5*this._acceleration*e*e;return a$11.multiplyByScalar(this._direction,i,t),a$11.add(n[0],t,t),t},Object.defineProperties(s$X.prototype,{clock:{get:function(){return this._clock},set:function(e){var t=this._clock;t!==e&&(t$$(t)&&(this._clockSubscription(),this._clockSubscription=void 0),t$$(e)&&(this._clockSubscription=e.onTick.addEventListener(s$X.prototype._onTick,this)),this._clock=e)}},element:{get:function(){return this._element},set:function(e){var t=this._element;t!==e&&(t$$(t)&&t.removeEventListener("seeked",this._seekFunction,!1),t$$(e)&&(this._seeking=!1,this._seekFunction=d$L(this),e.addEventListener("seeked",this._seekFunction,!1)),this._element=e,this._seeking=!1,this._firstTickAfterSeek=!1)}}}),s$X.prototype.destroy=function(){return this.element=void 0,this.clock=void 0,s$1e(this)},s$X.prototype.isDestroyed=function(){return!1},s$X.prototype._trySetPlaybackRate=function(e){if(this._lastPlaybackRate!==e.multiplier){var t=this._element;try{t.playbackRate=e.multiplier}catch{t.playbackRate=0}this._lastPlaybackRate=e.multiplier}},s$X.prototype._onTick=function(e){var t=this._element;if(t$$(t)&&!(t.readyState<2)){var i=t.paused,n=e.shouldAnimate;if(n===i&&(n?t.play():t.pause()),this._seeking||this._firstTickAfterSeek)return void(this._firstTickAfterSeek=!1);this._trySetPlaybackRate(e);var r,o=e.currentTime,a=e$1Y(this.epoch,f$S.MINIMUM_VALUE),s=o$10.secondsDifference(o,a),l=t.duration,u=t.currentTime;t.loop?((s%=l)<0&&(s=l-s),r=s):r=s>l?l:s<0?0:s;var c=n?e$1Y(this.tolerance,1):.001;Math.abs(r-u)>c&&(this._seeking=!0,t.currentTime=r)}},Object.defineProperties(h$R.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){if(!this.ready)throw new t$_("requestTileGeometry must not be called before ready returns true.");return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}}}),h$R.prototype.requestTileGeometry=function(e,t,i,n){if(!this.ready)throw new t$_("requestTileGeometry must not be called before ready returns true.");var r=this._tilingScheme.getNumberOfYTilesAtLevel(i),o=this._resource.getDerivedResource({url:i+"/"+e+"/"+(r-t-1)+".tif",queryParameters:{cesium:!0},request:n}).fetchImage({preferImageBitmap:!0});if(t$$(o)){var a=this;return c$18(o).then((function(n){return new M$1a({buffer:i$W(n),width:a._heightmapWidth,height:a._heightmapHeight,childTileMask:W$S(a,e,t,i),structure:a._terrainDataStructure})}))}},h$R.prototype.getLevelMaximumGeometricError=function(e){if(!this.ready)throw new t$_("requestTileGeometry must not be called before ready returns true.");return this._levelZeroMaximumGeometricError/(1<<e)};var b$_=new s$1p;function W$S(e,t,i,n){for(var r=e._tilingScheme,o=e._rectangles,a=r.tileXYToRectangle(t,i,n),s=0,l=0;l<o.length&&15!==s;++l){var u=o[l];if(!(u.maxLevel<=n)){var c=u.rectangle;t$$(s$1p.intersection(c,a,b$_))&&(y$K(r,c,2*t,2*i,n+1)&&(s|=4),y$K(r,c,2*t+1,2*i,n+1)&&(s|=8),y$K(r,c,2*t,2*i+1,n+1)&&(s|=1),y$K(r,c,2*t+1,2*i+1,n+1)&&(s|=2))}}return s}function y$K(e,t,i,n,r){var o=e.tileXYToRectangle(i,n,r);return t$$(s$1p.intersection(o,t,b$_))}h$R.prototype.getTileDataAvailable=function(e,t,i){},h$R.prototype.loadTileDataAvailability=function(e,t,i){};var _$K={VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033},VulkanConstants=Object.freeze(_$K),B$z={};function U$P(e,t){return n$1d.equalsEpsilon(e.latitude,t.latitude,n$1d.EPSILON10)&&n$1d.equalsEpsilon(e.longitude,t.longitude,n$1d.EPSILON10)}var b$Z=new i$1g,G$I=new i$1g;function I$R(e,t,i,n){var r=(t=u$11(t,a$11.equalsEpsilon)).length;if(!(r<2)){var o=t$$(n),a=t$$(i),s=!0,l=new Array(r),u=new Array(r),c=new Array(r),h=t[0];l[0]=h;var d=e.cartesianToCartographic(h,b$Z);a&&(d.height=i[0]),s=s&&0==d.height,u[0]=d.height,c[0]=o?n[0]:0;for(var f=1,p=1;p<r;++p){var _=t[p],m=e.cartesianToCartographic(_,G$I);a&&(m.height=i[p]),s=s&&0==m.height,U$P(d,m)?d.height<m.height&&(u[f-1]=m.height):(l[f]=_,u[f]=m.height,c[f]=o?n[p]:0,i$1g.clone(m,d),++f)}if(!(s||f<2))return l.length=f,u.length=f,c.length=f,{positions:l,topHeights:u,bottomHeights:c}}}var M$T=new Array(2),N$N=new Array(2),O$F={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};function q$U(e,t){for(var i=new Array(e.length),n=0;n<e.length;n+=3){var r=new a$11(e[n],e[n+1],e[n+2]);c$1a.multiplyByPoint(t,r,r),i[n]=r.x,i[n+1]=r.y,i[n+2]=r.z}return i}B$z.computePositions=function(e,t,i,n,r,o,a){var s=I$R(e,t,i,n);if(t$$(s)){var l=m$13.eastNorthUpToFixedFrame(s.positions[0],e,new c$1a),u=c$1a.inverse(l,new c$1a);t=s.positions,i=s.topHeights,n=s.bottomHeights;var c,h,d,f,p=t.length,_=p-2,m=n$1d.chordLength(r,e.maximumRadius),$=O$F;if($.minDistance=m,$.ellipsoid=e,o){var g,y=0;for(g=0;g<p-1;g++)y+=v$V.numberOfPoints(t[g],t[g+1],m)+1;c=new Float64Array(3*y),h=new Float64Array(3*y),t$$(a)&&(d=new Float64Array(3*y),f=new Float64Array(3*y));var v=M$T,x=N$N;$.positions=v,$.height=x;var b=0;for(g=0;g<p-1;g++){v[0]=t[g],v[1]=t[g+1],x[0]=i[g],x[1]=i[g+1];var S=v$V.generateArc($);c.set(S,b),t$$(a)&&d.set(q$U(S,u),b),x[0]=n[g],x[1]=n[g+1],h.set(v$V.generateArc($),b),t$$(a)&&f.set(q$U(v$V.generateArc($),u),b),b+=S.length}}else $.positions=t,$.height=i,c=new Float64Array(v$V.generateArc($)),t$$(a)&&(d=new Float64Array(q$U(v$V.generateArc($)))),$.height=n,h=new Float64Array(v$V.generateArc($)),t$$(a)&&(f=new Float64Array(q$U(v$V.generateArc($))));var w={pos:{bottomPositions:h,topPositions:c,numCorners:_}};return t$$(a)&&(w.localPos={bottomPositions:f,topPositions:d,numCorners:_}),w}};var $$I=new a$11,I$Q=new a$11,rt$f=new a$11,xt$9=new a$11,nt$f=new a$11,Lt$9=new a$11,bt$a=new a$11,Ft$4=new a$11;function H$M(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).positions,i=e.maximumHeights,n=e.minimumHeights;if(!t$$(t))throw new t$_("options.positions is required.");if(t$$(i)&&i.length!==t.length)throw new t$_("options.positions and options.maximumHeights must have the same length.");if(t$$(n)&&n.length!==t.length)throw new t$_("options.positions and options.minimumHeights must have the same length.");var r=e$1Y(e.vertexFormat,n$12.DEFAULT),o=e$1Y(e.granularity,n$1d.RADIANS_PER_DEGREE),a=e$1Y(e.ellipsoid,n$1c.WGS84);this._positions=t,this._minimumHeights=n,this._maximumHeights=i,this._vertexFormat=n$12.clone(r),this._granularity=o,this._ellipsoid=n$1c.clone(a),this._enuCenter=e.enuCenter,this._workerName="createWallGeometry";var s=1+t.length*a$11.packedLength+2;t$$(n)&&(s+=n.length),t$$(i)&&(s+=i.length),this.packedLength=s+n$1c.packedLength+n$12.packedLength+1,this.packedLength+=a$11.packedLength}H$M.pack=function(e,t,i){if(!t$$(e))throw new t$_("value is required");if(!t$$(t))throw new t$_("array is required");i=e$1Y(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=a$11.packedLength)a$11.pack(r[n],t,i);var a=e._minimumHeights;if(o=t$$(a)?a.length:0,t[i++]=o,t$$(a))for(n=0;n<o;++n)t[i++]=a[n];var s=e._maximumHeights;if(o=t$$(s)?s.length:0,t[i++]=o,t$$(s))for(n=0;n<o;++n)t[i++]=s[n];return n$1c.pack(e._ellipsoid,t,i),i+=n$1c.packedLength,n$12.pack(e._vertexFormat,t,i),i+=n$12.packedLength,t[i++]=e._granularity,t$$(e._enuCenter)?a$11.pack(e._enuCenter,t,i):a$11.pack(a$11.ZERO,t,i),t};var ot$g=n$1c.clone(n$1c.UNIT_SPHERE),at$d=new n$12,R$F={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:ot$g,vertexFormat:at$d,granularity:void 0,enuCenter:void 0};H$M.unpack=function(e,t,i){if(!t$$(e))throw new t$_("array is required");t=e$1Y(t,0);var n,r,o,a=e[t++],s=new Array(a);for(n=0;n<a;++n,t+=a$11.packedLength)s[n]=a$11.unpack(e,t);if((a=e[t++])>0)for(r=new Array(a),n=0;n<a;++n)r[n]=e[t++];if((a=e[t++])>0)for(o=new Array(a),n=0;n<a;++n)o[n]=e[t++];var l=n$1c.unpack(e,t,ot$g);t+=n$1c.packedLength;var u=n$12.unpack(e,t,at$d);t+=n$12.packedLength;var c=e[t++],h=a$11.unpack(e,t);return a$11.equals(h,a$11.ZERO)&&(h=void 0),t$$(i)?(i._positions=s,i._minimumHeights=r,i._maximumHeights=o,i._ellipsoid=n$1c.clone(l,i._ellipsoid),i._vertexFormat=n$12.clone(u,i._vertexFormat),i._granularity=c,i._enuCenter=h,i):(R$F.positions=s,R$F.minimumHeights=r,R$F.maximumHeights=o,R$F.granularity=c,R$F.enuCenter=h,new H$M(R$F))},H$M.fromConstantHeights=function(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).positions;if(!t$$(t))throw new t$_("options.positions is required.");var i,n,r=e.minimumHeight,o=e.maximumHeight,a=t$$(r),s=t$$(o);if(a||s){var l=t.length;i=a?new Array(l):void 0,n=s?new Array(l):void 0;for(var u=0;u<l;++u)a&&(i[u]=r),s&&(n[u]=o)}return new H$M({positions:t,maximumHeights:n,minimumHeights:i,ellipsoid:e.ellipsoid,vertexFormat:e.vertexFormat})},H$M.createGeometry=function(e){var t=e._positions,i=e._minimumHeights,n=e._maximumHeights,r=e._vertexFormat,o=e._granularity,a=e._ellipsoid,s=e._enuCenter,l=B$z.computePositions(a,t,n,i,o,!0,s);if(t$$(l.pos)){var u;t$$(s)&&(u=m$13.eastNorthUpToFixedFrame(s));var c,h=l.pos.bottomPositions,d=l.pos.topPositions,f=l.pos.numCorners,p=d.length,_=2*p,m=r.position?new Float64Array(_):void 0,$=r.normal?new Float32Array(_):void 0,g=r.tangent?new Float32Array(_):void 0,y=r.bitangent?new Float32Array(_):void 0,v=r.st?new Float32Array(_/3*2):void 0,x=0,b=0,S=0,w=0,C=0,T=Ft$4,P=bt$a,E=Lt$9,A=!0,L=0,M=1/((p/=3)-t.length+1);for(c=0;c<p;++c){var I=3*c,O=a$11.fromArray(d,I,$$I),D=a$11.fromArray(h,I,I$Q);if(r.position&&(m[x++]=D.x,m[x++]=D.y,m[x++]=D.z,m[x++]=O.x,m[x++]=O.y,m[x++]=O.z),r.st&&(v[C++]=L,v[C++]=0,v[C++]=L,v[C++]=1),r.normal||r.tangent||r.bitangent){var R,N=a$11.clone(a$11.ZERO,nt$f),F=a.scaleToGeodeticSurface(a$11.fromArray(d,I,I$Q),I$Q);if(c+1<p&&(R=a.scaleToGeodeticSurface(a$11.fromArray(d,I+3,rt$f),rt$f),N=a$11.fromArray(d,I+3,nt$f)),A){var B=a$11.subtract(N,O,xt$9),z=a$11.subtract(F,O,$$I);T=a$11.normalize(a$11.cross(z,B,T),T),A=!1}a$11.equalsEpsilon(R,F,n$1d.EPSILON10)?A=!0:(L+=M,r.tangent&&(P=a$11.normalize(a$11.subtract(R,F,P),P)),r.bitangent&&(E=a$11.normalize(a$11.cross(T,P,E),E))),r.normal&&(t$$(s)&&(c$1a.multiplyByPoint(u,T,T),a$11.normalize(T,T)),$[b++]=T.x,$[b++]=T.y,$[b++]=T.z,$[b++]=T.x,$[b++]=T.y,$[b++]=T.z),r.tangent&&(g[w++]=P.x,g[w++]=P.y,g[w++]=P.z,g[w++]=P.x,g[w++]=P.y,g[w++]=P.z),r.bitangent&&(y[S++]=E.x,y[S++]=E.y,y[S++]=E.z,y[S++]=E.x,y[S++]=E.y,y[S++]=E.z)}}var G=new t$W;r.position&&(G.position=new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:m})),r.normal&&(G.normal=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:$})),r.tangent&&(G.tangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:g})),r.bitangent&&(G.bitangent=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:y})),r.st&&(G.st=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:2,values:v}));var k=_/3;_-=6*(f+1);var U=fe$u.createTypedArray(k,_),V=0;for(c=0;c<k-2;c+=2){var W=c,H=c+2,Y=a$11.fromArray(m,3*W,$$I),j=a$11.fromArray(m,3*H,I$Q);if(!a$11.equalsEpsilon(Y,j,n$1d.EPSILON10)){var q=c+1,X=c+3;U[V++]=q,U[V++]=W,U[V++]=X,U[V++]=X,U[V++]=W,U[V++]=H}}var K=new T$11({attributes:G,indices:U,primitiveType:H$11.TRIANGLES,boundingSphere:new c$19.fromVertices(m)});return t$$(e._enuCenter)&&(K.attributes.position.values.set(l.localPos.topPositions,0),K.attributes.position.values.set(l.localPos.bottomPositions,K.attributes.position.values.length/2),K.attributes.position.componentDatatype=C$12.FLOAT),K}};var D$P=new a$11,G$H=new a$11;function d$K(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).positions,i=e.maximumHeights,n=e.minimumHeights;if(!t$$(t))throw new t$_("options.positions is required.");if(t$$(i)&&i.length!==t.length)throw new t$_("options.positions and options.maximumHeights must have the same length.");if(t$$(n)&&n.length!==t.length)throw new t$_("options.positions and options.minimumHeights must have the same length.");var r=e$1Y(e.granularity,n$1d.RADIANS_PER_DEGREE),o=e$1Y(e.ellipsoid,n$1c.WGS84);this._positions=t,this._minimumHeights=n,this._maximumHeights=i,this._granularity=r,this._ellipsoid=n$1c.clone(o),this._workerName="createWallOutlineGeometry";var a=1+t.length*a$11.packedLength+2;t$$(n)&&(a+=n.length),t$$(i)&&(a+=i.length),this.packedLength=a+n$1c.packedLength+1}d$K.pack=function(e,t,i){if(!t$$(e))throw new t$_("value is required");if(!t$$(t))throw new t$_("array is required");i=e$1Y(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=a$11.packedLength)a$11.pack(r[n],t,i);var a=e._minimumHeights;if(o=t$$(a)?a.length:0,t[i++]=o,t$$(a))for(n=0;n<o;++n)t[i++]=a[n];var s=e._maximumHeights;if(o=t$$(s)?s.length:0,t[i++]=o,t$$(s))for(n=0;n<o;++n)t[i++]=s[n];return n$1c.pack(e._ellipsoid,t,i),t[i+=n$1c.packedLength]=e._granularity,t};var O$E=n$1c.clone(n$1c.UNIT_SPHERE),k$H={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:O$E,granularity:void 0};function t$H(e){switch(e){case de$x.FLOAT:return"float";case de$x.FLOAT_VEC2:return"vec2";case de$x.FLOAT_VEC3:return"vec3";case de$x.FLOAT_VEC4:return"vec4";case de$x.FLOAT_MAT2:return"mat2";case de$x.FLOAT_MAT3:return"mat3";case de$x.FLOAT_MAT4:return"mat4";case de$x.SAMPLER_2D:return"sampler2D";case de$x.BOOL:return"bool"}}d$K.unpack=function(e,t,i){if(!t$$(e))throw new t$_("array is required");t=e$1Y(t,0);var n,r,o,a=e[t++],s=new Array(a);for(n=0;n<a;++n,t+=a$11.packedLength)s[n]=a$11.unpack(e,t);if((a=e[t++])>0)for(r=new Array(a),n=0;n<a;++n)r[n]=e[t++];if((a=e[t++])>0)for(o=new Array(a),n=0;n<a;++n)o[n]=e[t++];var l=n$1c.unpack(e,t,O$E),u=e[t+=n$1c.packedLength];return t$$(i)?(i._positions=s,i._minimumHeights=r,i._maximumHeights=o,i._ellipsoid=n$1c.clone(l,i._ellipsoid),i._granularity=u,i):(k$H.positions=s,k$H.minimumHeights=r,k$H.maximumHeights=o,k$H.granularity=u,new d$K(k$H))},d$K.fromConstantHeights=function(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).positions;if(!t$$(t))throw new t$_("options.positions is required.");var i,n,r=e.minimumHeight,o=e.maximumHeight,a=t$$(r),s=t$$(o);if(a||s){var l=t.length;i=a?new Array(l):void 0,n=s?new Array(l):void 0;for(var u=0;u<l;++u)a&&(i[u]=r),s&&(n[u]=o)}return new d$K({positions:t,maximumHeights:n,minimumHeights:i,ellipsoid:e.ellipsoid})},d$K.createGeometry=function(e){var t=e._positions,i=e._minimumHeights,n=e._maximumHeights,r=e._granularity,o=e._ellipsoid,a=B$z.computePositions(o,t,n,i,r,!1);if(t$$(a)){var s,l=a.pos.bottomPositions,u=a.pos.topPositions,c=u.length,h=2*c,d=new Float64Array(h),f=0;for(c/=3,s=0;s<c;++s){var p=3*s,_=a$11.fromArray(u,p,D$P),m=a$11.fromArray(l,p,G$H);d[f++]=m.x,d[f++]=m.y,d[f++]=m.z,d[f++]=_.x,d[f++]=_.y,d[f++]=_.z}var $=new t$W({position:new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:d})}),g=h/3;h=2*g-4+g;var y=fe$u.createTypedArray(g,h),v=0;for(s=0;s<g-2;s+=2){var x=s,b=s+2,S=a$11.fromArray(d,3*x,D$P),w=a$11.fromArray(d,3*b,G$H);if(!a$11.equalsEpsilon(S,w,n$1d.EPSILON10)){var C=s+1,T=s+3;y[v++]=C,y[v++]=x,y[v++]=C,y[v++]=T,y[v++]=x,y[v++]=b}}return y[v++]=g-2,y[v++]=g-1,new T$11({attributes:$,indices:y,primitiveType:H$11.LINES,boundingSphere:new c$19.fromVertices(d)})}};var l$M={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3};function f$L(e,t,i){this._url=e,this._maximumActiveTasks=e$1Y(i.maximumActiveTasks,100),this._activeTasks=0,this._deferreds={},this._nextID=0,this._event=t,this._enableHeartCheck=e$1Y(i.enableHeartCheck,!1),this._heartTimeOut=e$1Y(i.heartTimeOut,1e4),this._createWS(t)}function m$G(e,t){if(t instanceof ArrayBuffer){--e._activeTasks;var i=new DataView(t).getInt32(0,!0);if(!t$$(i))return;var n=e._deferreds,r=n[i];if(t$$(r)){if("blob"===r.binaryType)4===t.byteLength?r.reject(404):r.resolve(new Blob([t.slice(4,t.byteLength)]));else if("arraybuffer"===r.binaryType)if(4===t.byteLength)r.reject(404);else{var o=t.slice(4,t.byteLength);r.extratiles?r.progress(o):r.resolve(o)}else{t=t.slice(4,t.byteLength);var a=c$X(new Uint8Array(t));if("json"===r.binaryType){var s=JSON.parse(a);r.resolve(s)}else r.resolve(a)}!0!==r.extratiles&&delete n[i]}}}function y$J(e,t,i,n){var r;return-1!==t.indexOf("extratiles=")?(n.extratiles=!0,r={id:e,binaryType:e$1Y(i,"blob"),tileName:t.substring(0,t.indexOf("?")),extraTiles:t.substring(t.indexOf("extratiles=")+11)}):(n.extratiles=!1,r={id:e,binaryType:e$1Y(i,"blob"),tileName:t}),JSON.stringify(r)}function r$x(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).weights,i=e.times;if(n$1e.defined("weights",t),n$1e.defined("times",i),n$1e.typeOf.number.greaterThanOrEquals("weights.length",t.length,3),t.length%i.length!=0)throw new t$_("times.length must be a factor of weights.length.");this._times=i,this._weights=t,this._count=t.length/i.length,this._lastTimeIndex=0}function i$P(e,t,i){if("function"!=typeof t)throw new t$_("oldFunction is required to be a function.");if("function"!=typeof i)throw new t$_("oldFunction is required to be a function.");return function(){i.apply(e,arguments),t.apply(e,arguments)}}function i$O(e){this._value=void 0,this._hasClone=!1,this._hasEquals=!1,this._definitionChanged=new o$15,this.setValue(e)}function g$B(e,t,i,n,r){return{configurable:n,get:function(){return this[t]},set:function(n){var o=this[t],a=this[i];t$$(a)&&(a(),this[i]=void 0),void 0!==n&&(!t$$(n)||!t$$(n.getValue))&&t$$(r)&&(n=r(n)),o!==n&&(this[t]=n,this._definitionChanged.raiseEvent(this,e,n,o)),t$$(n)&&t$$(n.definitionChanged)&&(this[i]=n.definitionChanged.addEventListener((function(){this._definitionChanged.raiseEvent(this,e,n,n)}),this))}}}function c$L(e){return new i$O(e)}function v$J(e,t,i){return g$B(e,"_"+e.toString(),"_"+e.toString()+"Subscription",e$1Y(t,!1),e$1Y(i,c$L))}function s$W(e){this._definitionChanged=new o$15,this._show=void 0,this._showSubscription=void 0,this._image=void 0,this._imageSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._alignedAxis=void 0,this._alignedAxisSubscription=void 0,this._sizeInMeters=void 0,this._sizeInMetersSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._imageSubRegion=void 0,this._imageSubRegionSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(e$1Y(e,e$1Y.EMPTY_OBJECT))}f$L.prototype.scheduleTask=function(e,t){var i=this;if(!this.isOpened()){var n=c$18.defer();return this._event.addEventListener((function(r){if(r===l$M.OPEN){++i._activeTasks;var o=i,a=o._nextID++;o._deferreds[a]=n,n.binaryType=t;var s=y$J(a,e,t,n);o._ws.send(s)}})),n.promise}if(!(this._activeTasks>=this._maximumActiveTasks)){++this._activeTasks;var r=this,o=r._nextID++;n=c$18.defer();r._deferreds[o]=n,n.binaryType=t;var a=y$J(o,e,t,n);return r._ws.send(a),n.promise}},f$L.prototype._createWS=function(e){this._ws=new WebSocket(this._url),this._ws.binaryType="arraybuffer";var t=this;this._ws.onopen=function(){e.raiseEvent(l$M.OPEN)},this._ws.onclose=function(){e.raiseEvent(l$M.CLOSED)},this._ws.onerror=function(){error=new t$Z("open failure"),e.raiseEvent(error)},this._ws.onmessage=function(e){m$G(t,e.data)}},f$L.prototype.isOpened=function(){return this._ws&&this._ws.readyState===l$M.OPEN},f$L.prototype.close=function(){this._ws.close()},Object.defineProperties(r$x.prototype,{times:{get:function(){return this._times}},weights:{get:function(){return this._weights}}}),r$x.prototype.findTimeInterval=i$13.prototype.findTimeInterval,r$x.prototype.wrapTime=i$13.prototype.wrapTime,r$x.prototype.clampTime=i$13.prototype.clampTime,r$x.prototype.evaluate=function(e,t){var i=this.weights,n=this.times,r=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),o=(e-n[r])/(n[r+1]-n[r]);t$$(t)||(t=new Array(this._count));for(var a=0;a<this._count;a++){var s=r*this._count+a;t[a]=i[s]*(1-o)+i[s+this._count]*o}return t},Object.defineProperties(i$O.prototype,{isConstant:{value:!0},definitionChanged:{get:function(){return this._definitionChanged}}}),i$O.prototype.getValue=function(e,t){return this._hasClone?this._value.clone(t):this._value},i$O.prototype.setValue=function(e){var t=this._value;if(t!==e){var i=t$$(e),n=i&&"function"==typeof e.clone,r=i&&"function"==typeof e.equals;(!r||!e.equals(t))&&(this._hasClone=n,this._hasEquals=r,this._value=n?e.clone(this._value):e,this._definitionChanged.raiseEvent(this))}},i$O.prototype.equals=function(e){return this===e||e instanceof i$O&&(!this._hasEquals&&this._value===e._value||this._hasEquals&&this._value.equals(e._value))},i$O.prototype.valueOf=function(){return this._value},i$O.prototype.toString=function(){return String(this._value)},Object.defineProperties(s$W.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:v$J("show"),image:v$J("image"),scale:v$J("scale"),pixelOffset:v$J("pixelOffset"),eyeOffset:v$J("eyeOffset"),horizontalOrigin:v$J("horizontalOrigin"),verticalOrigin:v$J("verticalOrigin"),heightReference:v$J("heightReference"),color:v$J("color"),rotation:v$J("rotation"),alignedAxis:v$J("alignedAxis"),sizeInMeters:v$J("sizeInMeters"),width:v$J("width"),height:v$J("height"),scaleByDistance:v$J("scaleByDistance"),translucencyByDistance:v$J("translucencyByDistance"),pixelOffsetScaleByDistance:v$J("pixelOffsetScaleByDistance"),imageSubRegion:v$J("imageSubRegion"),distanceDisplayCondition:v$J("distanceDisplayCondition"),disableDepthTestDistance:v$J("disableDepthTestDistance")}),s$W.prototype.clone=function(e){return t$$(e)?(e.show=this._show,e.image=this._image,e.scale=this._scale,e.pixelOffset=this._pixelOffset,e.eyeOffset=this._eyeOffset,e.horizontalOrigin=this._horizontalOrigin,e.verticalOrigin=this._verticalOrigin,e.heightReference=this._heightReference,e.color=this._color,e.rotation=this._rotation,e.alignedAxis=this._alignedAxis,e.sizeInMeters=this._sizeInMeters,e.width=this._width,e.height=this._height,e.scaleByDistance=this._scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.pixelOffsetScaleByDistance=this._pixelOffsetScaleByDistance,e.imageSubRegion=this._imageSubRegion,e.distanceDisplayCondition=this._distanceDisplayCondition,e.disableDepthTestDistance=this._disableDepthTestDistance,e):new s$W(this)},s$W.prototype.merge=function(e){if(!t$$(e))throw new t$_("source is required.");this.show=e$1Y(this._show,e.show),this.image=e$1Y(this._image,e.image),this.scale=e$1Y(this._scale,e.scale),this.pixelOffset=e$1Y(this._pixelOffset,e.pixelOffset),this.eyeOffset=e$1Y(this._eyeOffset,e.eyeOffset),this.horizontalOrigin=e$1Y(this._horizontalOrigin,e.horizontalOrigin),this.verticalOrigin=e$1Y(this._verticalOrigin,e.verticalOrigin),this.heightReference=e$1Y(this._heightReference,e.heightReference),this.color=e$1Y(this._color,e.color),this.rotation=e$1Y(this._rotation,e.rotation),this.alignedAxis=e$1Y(this._alignedAxis,e.alignedAxis),this.sizeInMeters=e$1Y(this._sizeInMeters,e.sizeInMeters),this.width=e$1Y(this._width,e.width),this.height=e$1Y(this._height,e.height),this.scaleByDistance=e$1Y(this._scaleByDistance,e.scaleByDistance),this.translucencyByDistance=e$1Y(this._translucencyByDistance,e.translucencyByDistance),this.pixelOffsetScaleByDistance=e$1Y(this._pixelOffsetScaleByDistance,e.pixelOffsetScaleByDistance),this.imageSubRegion=e$1Y(this._imageSubRegion,e.imageSubRegion),this.distanceDisplayCondition=e$1Y(this._distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=e$1Y(this._disableDepthTestDistance,e.disableDepthTestDistance)};var e$16={DONE:0,PENDING:1,FAILED:2},A$T=Object.freeze(e$16);function r$w(){t$_.throwInstantiationError()}Object.defineProperties(r$w.prototype,{isConstant:{get:t$_.throwInstantiationError},definitionChanged:{get:t$_.throwInstantiationError}}),r$w.prototype.getValue=t$_.throwInstantiationError,r$w.prototype.equals=t$_.throwInstantiationError,r$w.equals=function(e,t){return e===t||t$$(e)&&e.equals(t)},r$w.arrayEquals=function(e,t){if(e===t)return!0;if(!t$$(e)||!t$$(t)||e.length!==t.length)return!1;for(var i=e.length,n=0;n<i;n++)if(!r$w.equals(e[n],t[n]))return!1;return!0},r$w.isConstant=function(e){return!t$$(e)||e.isConstant},r$w.getValueOrUndefined=function(e,t,i){return t$$(e)?e.getValue(t,i):void 0},r$w.getValueOrDefault=function(e,t,i,n){return t$$(e)?e$1Y(e.getValue(t,n),i):i},r$w.getValueOrClonedDefault=function(e,t,i,n){var r;return t$$(e)&&(r=e.getValue(t,n)),t$$(r)||(r=i.clone(r)),r};var N$M=e$1z.WHITE,I$P=a$11.ZERO,S$y=U$Y.NONE,q$T=r$T.ZERO,T$M=1,z$A=0,A$S=a$11.ZERO,L$M=N$W.CENTER,P$E=j$10.CENTER,Z$N=!1,M$S=new a$11,F$G=new e$1z,G$G=new a$11,H$L=new r$T,W$R=new u$W,j$N=new u$W,k$G=new u$W,J$K=new n$13,K$C=new e$1w;function V$D(e){this.entity=e,this.billboard=void 0,this.textureValue=void 0}function u$M(e,t){if(!t$$(e))throw new t$_("entityCluster is required.");if(!t$$(t))throw new t$_("entityCollection is required.");t.collectionChanged.addEventListener(u$M.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new e$1F,this._onCollectionChanged(t,t.values,[],[])}function y$I(e,t,i){t$$(e)&&(e.billboard=void 0,i.removeBillboard(t))}u$M.prototype.update=function(e){if(!t$$(e))throw new t$_("time is required.");for(var t=this._items.values,i=this._cluster,n=0,r=t.length;n<r;n++){var o,a,s=t[n],l=s.entity,u=l._billboard,c=s.billboard,h=l.isShowing&&l.isAvailable(e)&&r$w.getValueOrDefault(u._show,e,!0);if(h&&(a=r$w.getValueOrUndefined(l._position,e,M$S),o=r$w.getValueOrUndefined(u._image,e),h=t$$(a)&&t$$(o)),h){r$w.isConstant(l._position)||(i._clusterDirty=!0),t$$(c)||((c=i.getBillboard(l)).id=l,c.image=void 0,s.billboard=c),c.show=h,(!t$$(c.image)||s.textureValue!==o)&&(c.image=o,s.textureValue=o),c.position=a,c.color=r$w.getValueOrDefault(u._color,e,N$M,F$G),c.eyeOffset=r$w.getValueOrDefault(u._eyeOffset,e,I$P,G$G),c.heightReference=r$w.getValueOrDefault(u._heightReference,e,S$y),c.pixelOffset=r$w.getValueOrDefault(u._pixelOffset,e,q$T,H$L),c.scale=r$w.getValueOrDefault(u._scale,e,T$M),c.rotation=r$w.getValueOrDefault(u._rotation,e,z$A),c.alignedAxis=r$w.getValueOrDefault(u._alignedAxis,e,A$S),c.horizontalOrigin=r$w.getValueOrDefault(u._horizontalOrigin,e,L$M),c.verticalOrigin=r$w.getValueOrDefault(u._verticalOrigin,e,P$E),c.width=r$w.getValueOrUndefined(u._width,e),c.height=r$w.getValueOrUndefined(u._height,e),c.scaleByDistance=r$w.getValueOrUndefined(u._scaleByDistance,e,W$R),c.translucencyByDistance=r$w.getValueOrUndefined(u._translucencyByDistance,e,j$N),c.pixelOffsetScaleByDistance=r$w.getValueOrUndefined(u._pixelOffsetScaleByDistance,e,k$G),c.sizeInMeters=r$w.getValueOrDefault(u._sizeInMeters,e,Z$N),c.distanceDisplayCondition=r$w.getValueOrUndefined(u._distanceDisplayCondition,e,K$C),c.disableDepthTestDistance=r$w.getValueOrUndefined(u._disableDepthTestDistance,e);var d=r$w.getValueOrUndefined(u._imageSubRegion,e,J$K);t$$(d)&&c.setImageSubRegion(c._imageId,d)}else y$I(s,l,i)}return!0},u$M.prototype.getBoundingSphere=function(e,t){if(!t$$(e))throw new t$_("entity is required.");if(!t$$(t))throw new t$_("result is required.");var i=this._items.get(e.id);if(!t$$(i)||!t$$(i.billboard))return A$T.FAILED;var n=i.billboard;if(n.heightReference===U$Y.NONE)t.center=a$11.clone(n.position,t.center);else{if(!t$$(n._clampedPosition))return A$T.PENDING;t.center=a$11.clone(n._clampedPosition,t.center)}return t.radius=0,A$T.DONE},u$M.prototype.isDestroyed=function(){return!1},u$M.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(u$M.prototype._onCollectionChanged,this);for(var e=this._entityCollection.values,t=0;t<e.length;t++)this._cluster.removeBillboard(e[t]);return s$1e(this)},u$M.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a=this._items,s=this._cluster;for(r=t.length-1;r>-1;r--)t$$((o=t[r])._billboard)&&t$$(o._position)&&a.set(o.id,new V$D(o));for(r=n.length-1;r>-1;r--)t$$((o=n[r])._billboard)&&t$$(o._position)?a.contains(o.id)||a.set(o.id,new V$D(o)):(y$I(a.get(o.id),o,s),a.remove(o.id));for(r=i.length-1;r>-1;r--)o=i[r],y$I(a.get(o.id),o,s),a.remove(o.id)};var p$W="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec3 v_tangentEC;\nvarying vec3 v_bitangentEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec3 positionToEyeEC = -v_positionEC;\nmat3 tangentToEyeMatrix = czm_tangentToEyeSpaceMatrix(v_normalEC, v_tangentEC, v_bitangentEC);\nvec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\nnormalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\nczm_materialInput materialInput;\nmaterialInput.normalEC = normalEC;\nmaterialInput.tangentToEyeMatrix = tangentToEyeMatrix;\nmaterialInput.positionToEyeEC = positionToEyeEC;\nmaterialInput.st = v_st;\nczm_material material = czm_getMaterial(materialInput);\n#ifdef FLAT\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\ngl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",h$Q="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec3 tangent;\nattribute vec3 bitangent;\nattribute vec2 st;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec3 v_tangentEC;\nvarying vec3 v_bitangentEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_positionEC = (czm_modelViewRelativeToEye * p).xyz;\nv_normalEC = czm_normal * normal;\nv_tangentEC = czm_normal * tangent;\nv_bitangentEC = czm_normal * bitangent;\nv_st = st;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",i$N="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvoid main()\n{\nvec3 positionToEyeEC = -v_positionEC;\nvec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\nnormalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\nczm_materialInput materialInput;\nmaterialInput.normalEC = normalEC;\nmaterialInput.positionToEyeEC = positionToEyeEC;\nczm_material material = czm_getMaterial(materialInput);\n#ifdef FLAT\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\ngl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",d$J="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_positionEC = (czm_modelViewRelativeToEye * p).xyz;\nv_normalEC = czm_normal * normal;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",u$L="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec3 positionToEyeEC = -v_positionEC;\nvec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\nnormalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\nczm_materialInput materialInput;\nmaterialInput.normalEC = normalEC;\nmaterialInput.positionToEyeEC = positionToEyeEC;\nmaterialInput.st = v_st;\nczm_material material = czm_getMaterial(materialInput);\n#ifdef FLAT\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\ngl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",s$V="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec2 st;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_positionEC = (czm_modelViewRelativeToEye * p).xyz;\nv_normalEC = czm_normal * normal;\nv_st = st;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",_$J="attribute vec3 position;\nattribute vec3 normal;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec4 p = vec4(position, 1.0);\nv_positionEC = (czm_modelView * p).xyz;\nv_normalEC = czm_normal * normal;\ngl_Position = czm_modelViewProjection * p;\n}\n",g$A="attribute vec3 position;\nattribute vec3 normal;\nattribute vec2 st;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec4 p = vec4(position, 1.0);\nv_positionEC = (czm_modelView * p).xyz;\nv_normalEC = czm_normal * normal;\nv_st = st;\ngl_Position = czm_modelViewProjection * p;\n}\n",A$R={FRONT:de$x.FRONT,BACK:de$x.BACK,FRONT_AND_BACK:de$x.FRONT_AND_BACK},k$F=Object.freeze(A$R);function n$M(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this.material=e.material,this.translucent=e$1Y(e.translucent,!0),this._vertexShaderSource=e.vertexShaderSource,this._fragmentShaderSource=e.fragmentShaderSource,this._renderState=e.renderState,this._closed=e$1Y(e.closed,!1)}function A$Q(e,t,i,n,r,o,a,s,l,u,c){this._context=e,this._texture=t,this._textureTarget=i,this._targetFace=n,this._pixelDatatype=a,this._internalFormat=r,this._pixelFormat=o,this._size=s,this._preMultiplyAlpha=l,this._flipY=u,this._initialized=c}function X$y(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),n$1e.defined("options.context",e.context);const t=e.context,i=e.source;let n,r;if(t$$(i)){const e=[i.positiveX,i.negativeX,i.positiveY,i.negativeY,i.positiveZ,i.negativeZ];if(!(e[0]&&e[1]&&e[2]&&e[3]&&e[4]&&e[5]))throw new t$_("options.source requires positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ faces.");n=e[0].width,r=e[0].height;for(let t=1;t<6;++t)if(Number(e[t].width)!==n||Number(e[t].height)!==r)throw new t$_("Each face in options.source must have the same width and height.")}else n=e.width,r=e.height;const o=n,a=e$1Y(e.pixelDatatype,v$Z.UNSIGNED_BYTE),s=e$1Y(e.pixelFormat,Z$_.RGBA),l=Z$_.toInternalFormat(s,a,t);if(!t$$(n)||!t$$(r))throw new t$_("options requires a source field to create an initialized cube map or width and height fields to create a blank cube map.");if(n!==r)throw new t$_("Width must equal height.");if(o<=0)throw new t$_("Width and height must be greater than zero.");if(o>e$1y.maximumCubeMapSize)throw new t$_(`Width and height must be less than or equal to the maximum cube map size (${e$1y.maximumCubeMapSize}). Check maximumCubeMapSize.`);if(!Z$_.validate(s))throw new t$_("Invalid options.pixelFormat.");if(Z$_.isDepthFormat(s))throw new t$_("options.pixelFormat cannot be DEPTH_COMPONENT or DEPTH_STENCIL.");if(!v$Z.validate(a))throw new t$_("Invalid options.pixelDatatype.");if(a===v$Z.FLOAT&&!t.floatingPointTexture)throw new t$_("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension.");if(a===v$Z.HALF_FLOAT&&!t.halfFloatingPointTexture)throw new t$_("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension.");const u=6*Z$_.textureSizeInBytes(s,a,o,o),c=e.preMultiplyAlpha||s===Z$_.RGB||s===Z$_.LUMINANCE,h=e$1Y(e.flipY,!0),d=e$1Y(e.skipColorSpaceConversion,!1),f=t._gl,p=f.TEXTURE_CUBE_MAP,_=f.createTexture();function m(e,i,r,u,c){let h=i.arrayBufferView;t$$(h)||(h=i.bufferView);let d=4;t$$(h)&&(d=Z$_.alignmentInBytes(s,a,n)),f.pixelStorei(f.UNPACK_ALIGNMENT,d),c?f.pixelStorei(f.UNPACK_COLORSPACE_CONVERSION_WEBGL,f.NONE):f.pixelStorei(f.UNPACK_COLORSPACE_CONVERSION_WEBGL,f.BROWSER_DEFAULT_WEBGL),t$$(h)?(f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,!1),u&&(h=Z$_.flipY(h,s,a,o,o)),f.texImage2D(e,0,l,o,o,0,s,v$Z.toWebGLConstant(a,t),h)):(f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,u),f.texImage2D(e,0,l,s,v$Z.toWebGLConstant(a,t),i))}f.activeTexture(f.TEXTURE0),f.bindTexture(p,_),t$$(i)?(m(f.TEXTURE_CUBE_MAP_POSITIVE_X,i.positiveX,c,h,d),m(f.TEXTURE_CUBE_MAP_NEGATIVE_X,i.negativeX,c,h,d),m(f.TEXTURE_CUBE_MAP_POSITIVE_Y,i.positiveY,c,h,d),m(f.TEXTURE_CUBE_MAP_NEGATIVE_Y,i.negativeY,c,h,d),m(f.TEXTURE_CUBE_MAP_POSITIVE_Z,i.positiveZ,c,h,d),m(f.TEXTURE_CUBE_MAP_NEGATIVE_Z,i.negativeZ,c,h,d)):(f.texImage2D(f.TEXTURE_CUBE_MAP_POSITIVE_X,0,l,o,o,0,s,v$Z.toWebGLConstant(a,t),null),f.texImage2D(f.TEXTURE_CUBE_MAP_NEGATIVE_X,0,l,o,o,0,s,v$Z.toWebGLConstant(a,t),null),f.texImage2D(f.TEXTURE_CUBE_MAP_POSITIVE_Y,0,l,o,o,0,s,v$Z.toWebGLConstant(a,t),null),f.texImage2D(f.TEXTURE_CUBE_MAP_NEGATIVE_Y,0,l,o,o,0,s,v$Z.toWebGLConstant(a,t),null),f.texImage2D(f.TEXTURE_CUBE_MAP_POSITIVE_Z,0,l,o,o,0,s,v$Z.toWebGLConstant(a,t),null),f.texImage2D(f.TEXTURE_CUBE_MAP_NEGATIVE_Z,0,l,o,o,0,s,v$Z.toWebGLConstant(a,t),null)),f.bindTexture(p,null),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=p,this._texture=_,this._pixelFormat=s,this._pixelDatatype=a,this._size=o,this._hasMipmap=!1,this._sizeInBytes=u,this._preMultiplyAlpha=c,this._flipY=h,this._sampler=void 0;const $=t$$(i);this._positiveX=new A$Q(t,_,p,f.TEXTURE_CUBE_MAP_POSITIVE_X,l,s,a,o,c,h,$),this._negativeX=new A$Q(t,_,p,f.TEXTURE_CUBE_MAP_NEGATIVE_X,l,s,a,o,c,h,$),this._positiveY=new A$Q(t,_,p,f.TEXTURE_CUBE_MAP_POSITIVE_Y,l,s,a,o,c,h,$),this._negativeY=new A$Q(t,_,p,f.TEXTURE_CUBE_MAP_NEGATIVE_Y,l,s,a,o,c,h,$),this._positiveZ=new A$Q(t,_,p,f.TEXTURE_CUBE_MAP_POSITIVE_Z,l,s,a,o,c,h,$),this._negativeZ=new A$Q(t,_,p,f.TEXTURE_CUBE_MAP_NEGATIVE_Z,l,s,a,o,c,h,$),this.sampler=t$$(e.sampler)?e.sampler:new a$Q}Object.defineProperties(n$M.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}}}),n$M.prototype.getFragmentShaderSource=function(){var e=[];return this.flat&&e.push("#define FLAT"),this.faceForward&&e.push("#define FACE_FORWARD"),t$$(this.material)&&e.push(this.material.shaderSource),e.push(this.fragmentShaderSource),e.join("\n")},n$M.prototype.isTranslucent=function(){return t$$(this.material)&&this.material.isTranslucent()||!t$$(this.material)&&this.translucent},n$M.prototype.getRenderState=function(){var e=this.isTranslucent(),t=e$1W(this.renderState,!1);return e?(t.depthMask=!1,t.blending=Ee$s.ALPHA_BLEND):t.depthMask=!0,t},n$M.getDefaultRenderState=function(e,t,i){var n={depthTest:{enabled:!0}};return e&&(n.depthMask=!1,n.blending=Ee$s.ALPHA_BLEND),t&&(n.cull={enabled:!0,face:k$F.BACK}),t$$(i)&&(n=s$1n(i,n,!0)),n},Object.defineProperties(A$Q.prototype,{pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},_target:{get:function(){return this._targetFace}}}),A$Q.prototype.copyFrom=function(e){n$1e.defined("options",e);const t=e$1Y(e.xOffset,0),i=e$1Y(e.yOffset,0);if(n$1e.defined("options.source",e.source),n$1e.typeOf.number.greaterThanOrEquals("xOffset",t,0),n$1e.typeOf.number.greaterThanOrEquals("yOffset",i,0),t+e.source.width>this._size)throw new t$_("xOffset + options.source.width must be less than or equal to width.");if(i+e.source.height>this._size)throw new t$_("yOffset + options.source.height must be less than or equal to height.");const n=e.source,r=this._context._gl,o=this._textureTarget,a=this._targetFace;r.activeTexture(r.TEXTURE0),r.bindTexture(o,this._texture);const s=n.width,l=n.height;let u=n.arrayBufferView;const c=this._size,h=this._pixelFormat,d=this._internalFormat,f=this._pixelDatatype,p=this._preMultiplyAlpha,_=this._flipY,m=e$1Y(e.skipColorSpaceConversion,!1);let $=4;t$$(u)&&($=Z$_.alignmentInBytes(h,f,s)),r.pixelStorei(r.UNPACK_ALIGNMENT,$),m?r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,r.NONE):r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,r.BROWSER_DEFAULT_WEBGL);let g=!1;if(!this._initialized){if(0===t&&0===i&&s===c&&l===c)t$$(u)?(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),_&&(u=Z$_.flipY(u,h,f,c,c)),r.texImage2D(a,0,d,c,c,0,h,v$Z.toWebGLConstant(f,this._context),u)):(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,p),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,_),r.texImage2D(a,0,d,h,v$Z.toWebGLConstant(f,this._context),n)),g=!0;else{r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1);const e=Z$_.createTypedArray(h,f,c,c);r.texImage2D(a,0,d,c,c,0,h,v$Z.toWebGLConstant(f,this._context),e)}this._initialized=!0}g||(t$$(u)?(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),_&&(u=Z$_.flipY(u,h,f,s,l)),r.texSubImage2D(a,0,t,i,s,l,h,v$Z.toWebGLConstant(f,this._context),u)):(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,p),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,_),r.texSubImage2D(a,0,t,i,h,v$Z.toWebGLConstant(f,this._context),n))),r.bindTexture(o,null)},A$Q.prototype.copyFromFramebuffer=function(e,t,i,n,r,o){if(e=e$1Y(e,0),t=e$1Y(t,0),i=e$1Y(i,0),n=e$1Y(n,0),r=e$1Y(r,this._size),o=e$1Y(o,this._size),n$1e.typeOf.number.greaterThanOrEquals("xOffset",e,0),n$1e.typeOf.number.greaterThanOrEquals("yOffset",t,0),n$1e.typeOf.number.greaterThanOrEquals("framebufferXOffset",i,0),n$1e.typeOf.number.greaterThanOrEquals("framebufferYOffset",n,0),e+r>this._size)throw new t$_("xOffset + source.width must be less than or equal to width.");if(t+o>this._size)throw new t$_("yOffset + source.height must be less than or equal to height.");if(this._pixelDatatype===v$Z.FLOAT)throw new t$_("Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.");if(this._pixelDatatype===v$Z.HALF_FLOAT)throw new t$_("Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.");const a=this._context._gl,s=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(s,this._texture),a.copyTexSubImage2D(this._targetFace,0,e,t,i,n,r,o),a.bindTexture(s,null),this._initialized=!0},Object.defineProperties(X$y.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){let t=e.minificationFilter,i=e.magnificationFilter;const n=t===tt$l.NEAREST_MIPMAP_NEAREST||t===tt$l.NEAREST_MIPMAP_LINEAR||t===tt$l.LINEAR_MIPMAP_NEAREST||t===tt$l.LINEAR_MIPMAP_LINEAR,r=this._context,o=this._pixelDatatype;(o===v$Z.FLOAT&&!r.textureFloatLinear||o===v$Z.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(t=n?tt$l.NEAREST_MIPMAP_NEAREST:tt$l.NEAREST,i=et$k.NEAREST);const a=r._gl,s=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(s,this._texture),a.texParameteri(s,a.TEXTURE_MIN_FILTER,t),a.texParameteri(s,a.TEXTURE_MAG_FILTER,i),a.texParameteri(s,a.TEXTURE_WRAP_S,e.wrapS),a.texParameteri(s,a.TEXTURE_WRAP_T,e.wrapT),t$$(this._textureFilterAnisotropic)&&a.texParameteri(s,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),a.bindTexture(s,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},width:{get:function(){return this._size}},height:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},_target:{get:function(){return this._textureTarget}}}),X$y.prototype.generateMipmap=function(e){if(e=e$1Y(e,D$12.DONT_CARE),this._size>1&&!n$1d.isPowerOfTwo(this._size))throw new t$_("width and height must be a power of two to call generateMipmap().");if(!D$12.validate(e))throw new t$_("hint is invalid.");this._hasMipmap=!0;const t=this._context._gl,i=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i),t.bindTexture(i,null)},X$y.prototype.isDestroyed=function(){return!1},X$y.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._positiveX=s$1e(this._positiveX),this._negativeX=s$1e(this._negativeX),this._positiveY=s$1e(this._positiveY),this._negativeY=s$1e(this._negativeY),this._positiveZ=s$1e(this._positiveZ),this._negativeZ=s$1e(this._negativeZ),s$1e(this)};var Z$M="uniform sampler2D image;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec4 rampColor = texture2D(image, vec2(materialInput.aspect / (2.0 * czm_pi), 0.5));\nrampColor = czm_gammaCorrect(rampColor);\nmaterial.diffuse = rampColor.rgb;\nmaterial.alpha = rampColor.a;\nreturn material;\n}\n",j$M="uniform sampler2D image;\nuniform float strength;\nuniform vec2 repeat;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nvec2 centerPixel = fract(repeat * st);\nfloat centerBump = texture2D(image, centerPixel).channel;\nfloat imageWidth = float(imageDimensions.x);\nvec2 rightPixel = fract(repeat * (st + vec2(1.0 / imageWidth, 0.0)));\nfloat rightBump = texture2D(image, rightPixel).channel;\nfloat imageHeight = float(imageDimensions.y);\nvec2 leftPixel = fract(repeat * (st + vec2(0.0, 1.0 / imageHeight)));\nfloat topBump = texture2D(image, leftPixel).channel;\nvec3 normalTangentSpace = normalize(vec3(centerBump - rightBump, centerBump - topBump, clamp(1.0 - strength, 0.1, 1.0)));\nvec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;\nmaterial.normal = normalEC;\nmaterial.diffuse = vec3(0.01);\nreturn material;\n}\n",J$J="uniform vec4 lightColor;\nuniform vec4 darkColor;\nuniform vec2 repeat;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nfloat b = mod(floor(repeat.s * st.s) + floor(repeat.t * st.t), 2.0);\nfloat scaledWidth = fract(repeat.s * st.s);\nscaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));\nfloat scaledHeight = fract(repeat.t * st.t);\nscaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\nfloat value = min(scaledWidth, scaledHeight);\nvec4 currentColor = mix(lightColor, darkColor, b);\nvec4 color = czm_antialias(lightColor, darkColor, currentColor, value, 0.03);\ncolor = czm_gammaCorrect(color);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = color.a;\nreturn material;\n}\n",V$C="uniform vec4 lightColor;\nuniform vec4 darkColor;\nuniform vec2 repeat;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat b = smoothstep(0.3, 0.32, length(fract(repeat * materialInput.st) - 0.5));\nvec4 color = mix(lightColor, darkColor, b);\ncolor = czm_gammaCorrect(color);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = color.a;\nreturn material;\n}\n",$$H="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform vec4 color;\nuniform float spacing;\nuniform float width;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat distanceToContour = mod(materialInput.height, spacing);\n#ifdef GL_OES_standard_derivatives\nfloat dxc = abs(dFdx(materialInput.height));\nfloat dyc = abs(dFdy(materialInput.height));\nfloat dF = max(dxc, dyc) * czm_pixelRatio * width;\nfloat alpha = (distanceToContour < dF) ? 1.0 : 0.0;\n#else\nfloat alpha = (distanceToContour < (czm_pixelRatio * width)) ? 1.0 : 0.0;\n#endif\nvec4 outColor = czm_gammaCorrect(vec4(color.rgb, alpha));\nmaterial.diffuse = outColor.rgb;\nmaterial.alpha = outColor.a;\nreturn material;\n}\n",q$S="uniform sampler2D image;\nuniform float minimumHeight;\nuniform float maximumHeight;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat scaledHeight = clamp((materialInput.height - minimumHeight) / (maximumHeight - minimumHeight), 0.0, 1.0);\nvec4 rampColor = texture2D(image, vec2(scaledHeight, 0.5));\nrampColor = czm_gammaCorrect(rampColor);\nmaterial.diffuse = rampColor.rgb;\nmaterial.alpha = rampColor.a;\nreturn material;\n}\n",K$B="uniform vec4 fadeInColor;\nuniform vec4 fadeOutColor;\nuniform float maximumDistance;\nuniform bool repeat;\nuniform vec2 fadeDirection;\nuniform vec2 time;\nfloat getTime(float t, float coord)\n{\nfloat scalar = 1.0 / maximumDistance;\nfloat q = distance(t, coord) * scalar;\nif (repeat)\n{\nfloat r = distance(t, coord + 1.0) * scalar;\nfloat s = distance(t, coord - 1.0) * scalar;\nq = min(min(r, s), q);\n}\nreturn clamp(q, 0.0, 1.0);\n}\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nfloat s = getTime(time.x, st.s) * fadeDirection.s;\nfloat t = getTime(time.y, st.t) * fadeDirection.t;\nfloat u = length(vec2(s, t));\nvec4 color = mix(fadeInColor, fadeOutColor, u);\ncolor = czm_gammaCorrect(color);\nmaterial.emission = color.rgb;\nmaterial.alpha = color.a;\nreturn material;\n}\n",Q$I="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform vec4 color;\nuniform float cellAlpha;\nuniform vec2 lineCount;\nuniform vec2 lineThickness;\nuniform vec2 lineOffset;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nfloat scaledWidth = fract(lineCount.s * st.s - lineOffset.s);\nscaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));\nfloat scaledHeight = fract(lineCount.t * st.t - lineOffset.t);\nscaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\nfloat value;\n#ifdef GL_OES_standard_derivatives\nconst float fuzz = 1.2;\nvec2 thickness = (lineThickness * czm_pixelRatio) - 1.0;\nvec2 dx = abs(dFdx(st));\nvec2 dy = abs(dFdy(st));\nvec2 dF = vec2(max(dx.s, dy.s), max(dx.t, dy.t)) * lineCount;\nvalue = min(\nsmoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth),\nsmoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight));\n#else\nconst float fuzz = 0.05;\nvec2 range = 0.5 - (lineThickness * 0.05);\nvalue = min(\n1.0 - smoothstep(range.s, range.s + fuzz, scaledWidth),\n1.0 - smoothstep(range.t, range.t + fuzz, scaledHeight));\n#endif\nfloat dRim = 1.0 - abs(dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC)));\nfloat sRim = smoothstep(0.8, 1.0, dRim);\nvalue *= (1.0 - sRim);\nvec4 halfColor;\nhalfColor.rgb = color.rgb * 0.5;\nhalfColor.a = color.a * (1.0 - ((1.0 - cellAlpha) * value));\nhalfColor = czm_gammaCorrect(halfColor);\nmaterial.diffuse = halfColor.rgb;\nmaterial.emission = halfColor.rgb;\nmaterial.alpha = halfColor.a;\nreturn material;\n}\n",U$O="uniform sampler2D image;\nuniform float strength;\nuniform vec2 repeat;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec4 textureValue = texture2D(image, fract(repeat * materialInput.st));\nvec3 normalTangentSpace = textureValue.channels;\nnormalTangentSpace.xy = normalTangentSpace.xy * 2.0 - 1.0;\nnormalTangentSpace.z = clamp(1.0 - strength, 0.1, 1.0);\nnormalTangentSpace = normalize(normalTangentSpace);\nvec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;\nmaterial.normal = normalEC;\nreturn material;\n}\n",ee$v="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform vec4 color;\nfloat getPointOnLine(vec2 p0, vec2 p1, float x)\n{\nfloat slope = (p0.y - p1.y) / (p0.x - p1.x);\nreturn slope * (x - p0.x) + p0.y;\n}\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\n#ifdef GL_OES_standard_derivatives\nfloat base = 1.0 - abs(fwidth(st.s)) * 10.0 * czm_pixelRatio;\n#else\nfloat base = 0.975;\n#endif\nvec2 center = vec2(1.0, 0.5);\nfloat ptOnUpperLine = getPointOnLine(vec2(base, 1.0), center, st.s);\nfloat ptOnLowerLine = getPointOnLine(vec2(base, 0.0), center, st.s);\nfloat halfWidth = 0.15;\nfloat s = step(0.5 - halfWidth, st.t);\ns *= 1.0 - step(0.5 + halfWidth, st.t);\ns *= 1.0 - step(base, st.s);\nfloat t = step(base, materialInput.st.s);\nt *= 1.0 - step(ptOnUpperLine, st.t);\nt *= step(ptOnLowerLine, st.t);\nfloat dist;\nif (st.s < base)\n{\nfloat d1 = abs(st.t - (0.5 - halfWidth));\nfloat d2 = abs(st.t - (0.5 + halfWidth));\ndist = min(d1, d2);\n}\nelse\n{\nfloat d1 = czm_infinity;\nif (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)\n{\nd1 = abs(st.s - base);\n}\nfloat d2 = abs(st.t - ptOnUpperLine);\nfloat d3 = abs(st.t - ptOnLowerLine);\ndist = min(min(d1, d2), d3);\n}\nvec4 outsideColor = vec4(0.0);\nvec4 currentColor = mix(outsideColor, color, clamp(s + t, 0.0, 1.0));\nvec4 outColor = czm_antialias(outsideColor, color, currentColor, dist);\noutColor = czm_gammaCorrect(outColor);\nmaterial.diffuse = outColor.rgb;\nmaterial.alpha = outColor.a;\nreturn material;\n}\n",te$v="uniform vec4 color;\nuniform vec4 gapColor;\nuniform float dashLength;\nuniform float dashPattern;\nvarying float v_polylineAngle;\nconst float maskLength = 16.0;\nmat2 rotate(float rad) {\nfloat c = cos(rad);\nfloat s = sin(rad);\nreturn mat2(\nc, s,\n-s, c\n);\n}\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;\nfloat dashPosition = fract(pos.x / (dashLength * czm_pixelRatio));\nfloat maskIndex = floor(dashPosition * maskLength);\nfloat maskTest = floor(dashPattern / pow(2.0, maskIndex));\nvec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;\nif (fragColor.a < 0.005) {\ndiscard;\n}\nfragColor = czm_gammaCorrect(fragColor);\nmaterial.emission = fragColor.rgb;\nmaterial.alpha = fragColor.a;\nreturn material;\n}\n",re$y="uniform vec4 color;\nuniform float glowPower;\nuniform float taperPower;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nfloat glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);\nif (taperPower <= 0.99999) {\nglow *= min(1.0, taperPower / (0.5 - st.s * 0.5) - (taperPower / 0.5));\n}\nglow = clamp(0.0, 2.0, glow);\nvec4 fragColor;\nfragColor.rgb = max(vec3(glow - 1.0 + color.rgb), color.rgb);\nfragColor.a = clamp(0.0, 1.0, glow) * color.a;\nfragColor = czm_gammaCorrect(fragColor);\nmaterial.emission = fragColor.rgb;\nmaterial.alpha = fragColor.a;\nreturn material;\n}\n",O$D="uniform vec4 color;\nuniform vec4 outlineColor;\nuniform float outlineWidth;\nvarying float v_width;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nfloat halfInteriorWidth = 0.5 * (v_width - outlineWidth) / v_width;\nfloat b = step(0.5 - halfInteriorWidth, st.t);\nb *= 1.0 - step(0.5 + halfInteriorWidth, st.t);\nfloat d1 = abs(st.t - (0.5 - halfInteriorWidth));\nfloat d2 = abs(st.t - (0.5 + halfInteriorWidth));\nfloat dist = min(d1, d2);\nvec4 currentColor = mix(outlineColor, color, b);\nvec4 outColor = czm_antialias(outlineColor, color, currentColor, dist);\noutColor = czm_gammaCorrect(outColor);\nmaterial.diffuse = outColor.rgb;\nmaterial.alpha = outColor.a;\nreturn material;\n}\n",ae$v="uniform vec4 color;\nuniform vec4 rimColor;\nuniform float width;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat d = 1.0 - dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC));\nfloat s = smoothstep(1.0 - width, 1.0, d);\nvec4 outColor = czm_gammaCorrect(color);\nvec4 outRimColor = czm_gammaCorrect(rimColor);\nmaterial.diffuse = outColor.rgb;\nmaterial.emission = outRimColor.rgb * s;\nmaterial.alpha = mix(outColor.a, outRimColor.a, s);\nreturn material;\n}\n",ie$x="uniform sampler2D image;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec4 rampColor = texture2D(image, vec2(materialInput.slope / (czm_pi / 2.0), 0.5));\nrampColor = czm_gammaCorrect(rampColor);\nmaterial.diffuse = rampColor.rgb;\nmaterial.alpha = rampColor.a;\nreturn material;\n}\n",ne$u="uniform vec4 evenColor;\nuniform vec4 oddColor;\nuniform float offset;\nuniform float repeat;\nuniform bool horizontal;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat coord = mix(materialInput.st.s, materialInput.st.t, float(horizontal));\nfloat value = fract((coord - offset) * (repeat * 0.5));\nfloat dist = min(value, min(abs(value - 0.5), 1.0 - value));\nvec4 currentColor = mix(evenColor, oddColor, step(0.5, value));\nvec4 color = czm_antialias(evenColor, oddColor, currentColor, dist);\ncolor = czm_gammaCorrect(color);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = color.a;\nreturn material;\n}\n",se$r="uniform sampler2D specularMap;\nuniform sampler2D normalMap;\nuniform vec4 baseWaterColor;\nuniform vec4 blendColor;\nuniform float frequency;\nuniform float animationSpeed;\nuniform float amplitude;\nuniform float specularIntensity;\nuniform float fadeFactor;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat time = czm_frameNumber * animationSpeed;\nfloat fade = max(1.0, (length(materialInput.positionToEyeEC) / 10000000000.0) * frequency * fadeFactor);\nfloat specularMapValue = texture2D(specularMap, materialInput.st).r;\nvec4 noise = czm_getWaterNoise(normalMap, materialInput.st * frequency, time, 0.0);\nvec3 normalTangentSpace = noise.xyz * vec3(1.0, 1.0, (1.0 / amplitude));\nnormalTangentSpace.xy /= fade;\nnormalTangentSpace = mix(vec3(0.0, 0.0, 50.0), normalTangentSpace, specularMapValue);\nnormalTangentSpace = normalize(normalTangentSpace);\nfloat tsPerturbationRatio = clamp(dot(normalTangentSpace, vec3(0.0, 0.0, 1.0)), 0.0, 1.0);\nmaterial.alpha = mix(blendColor.a, baseWaterColor.a, specularMapValue) * specularMapValue;\nmaterial.diffuse = mix(blendColor.rgb, baseWaterColor.rgb, specularMapValue);\nmaterial.diffuse += (0.1 * tsPerturbationRatio);\nmaterial.diffuse = material.diffuse;\nmaterial.normal = normalize(materialInput.tangentToEyeMatrix * normalTangentSpace);\nmaterial.specular = specularIntensity;\nmaterial.shininess = 10.0;\nreturn material;\n}\n",ue$n="uniform vec4 color;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = 1.0;\nreturn material;\n}\n";function r$v(e){this.type=void 0,this.shaderSource=void 0,this.materials=void 0,this.uniforms=void 0,this._uniforms=void 0,this.translucent=void 0,this._minificationFilter=e$1Y(e.minificationFilter,tt$l.LINEAR),this._magnificationFilter=e$1Y(e.magnificationFilter,et$k.LINEAR),this._strict=void 0,this._template=void 0,this._count=void 0,this._texturePaths={},this._loadedImages=[],this._loadedCubeMaps=[],this._textures={},this._updateFunctions=[],this._defaultTexture=void 0,this._wrapS=j$13.CLAMP_TO_EDGE,this._wrapT=j$13.CLAMP_TO_EDGE,me$w(e,this),Object.defineProperties(this,{type:{value:this.type,writable:!1}}),t$$(r$v._uniformList[this.type])||(r$v._uniformList[this.type]=Object.keys(this._uniforms))}function me$w(e,t){e=e$1Y(e,e$1Y.EMPTY_OBJECT),t._strict=e$1Y(e.strict,!1),t._count=e$1Y(e.count,0),t._template=e$1W(e$1Y(e.fabric,e$1Y.EMPTY_OBJECT)),t._template.uniforms=e$1W(e$1Y(t._template.uniforms,e$1Y.EMPTY_OBJECT)),t._template.materials=e$1W(e$1Y(t._template.materials,e$1Y.EMPTY_OBJECT)),t.type=t$$(t._template.type)?t._template.type:t$U(),t.shaderSource="",t.materials={},t.uniforms={},t._uniforms={},t._translucentFunctions=[];var i,n=r$v._materialCache.getMaterial(t.type);if(t$$(n)){var r=e$1W(n.fabric,!0);t._template=s$1n(t._template,r,!0),i=n.translucent}he$o(t),t$$(n)||r$v._materialCache.addMaterial(t.type,t),ye$o(t),we$m(t),Me$k(t);var o=0===t._translucentFunctions.length||void 0;if(i=e$1Y(i,o),t$$(i=e$1Y(e.translucent,i)))if("function"==typeof i){t._translucentFunctions.push((function(){return i(t)}))}else t._translucentFunctions.push(i)}function D$O(e,t,i,n){if(t$$(e))for(var r in e)if(e.hasOwnProperty(r)){var o=-1!==t.indexOf(r);(n&&!o||!n&&o)&&i(r,t)}}function L$L(e,t){for(var i="fabric: property name '"+e+"' is not valid. It should be ",n=0;n<t.length;n++){var r="'"+t[n]+"'";i+=n===t.length-1?"or "+r+".":r+", "}throw new t$_(i)}function pe$n(e,t){throw new t$_("fabric: uniforms and materials cannot share the same property '"+e+"'")}r$v._uniformList={},r$v.fromType=function(e,t){if(!t$$(r$v._materialCache.getMaterial(e)))throw new t$_("material with type '"+e+"' does not exist.");var i=new r$v({fabric:{type:e}});if(t$$(t))for(var n in t)t.hasOwnProperty(n)&&(i.uniforms[n]=t[n]);return i},r$v.prototype.isTranslucent=function(){if(t$$(this.translucent))return"function"==typeof this.translucent?this.translucent():this.translucent;for(var e=!0,t=this._translucentFunctions,i=t.length,n=0;n<i;++n){var r=t[n];if(!(e="function"==typeof r?e&&r():e&&r))break}return e},r$v.prototype.update=function(e){var t,i,n=this._loadedImages,r=n.length;for(t=0;t<r;++t){var o=n[t];i=o.id;var a,s=o.image,l=new a$Q({minificationFilter:this._minificationFilter,magnificationFilter:this._magnificationFilter,wrapS:this._wrapS,wrapT:this._wrapT});a=t$$(s.internalFormat)?new P$S({context:e,pixelFormat:s.internalFormat,width:s.width,height:s.height,source:{arrayBufferView:s.bufferView},sampler:l}):new P$S({context:e,source:s,sampler:l}),this._textures[i]=a;var u=i+"Dimensions";if(this.uniforms.hasOwnProperty(u)){var c=this.uniforms[u];c.x=a._width,c.y=a._height}}n.length=0;var h=this._loadedCubeMaps;for(r=h.length,t=0;t<r;++t){var d=h[t];i=d.id;var f=d.images,p=new X$y({context:e,source:{positiveX:f[0],negativeX:f[1],positiveY:f[2],negativeY:f[3],positiveZ:f[4],negativeZ:f[5]},sampler:new a$Q({minificationFilter:this._minificationFilter,magnificationFilter:this._magnificationFilter})});this._textures[i]=p}h.length=0;var _=this._updateFunctions;for(r=_.length,t=0;t<r;++t)_[t](this,e);var m=this.materials;for(var $ in m)m.hasOwnProperty($)&&m[$].update(e)},r$v.prototype.isDestroyed=function(){return!1},r$v.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 n=this.materials;for(var r in n)n.hasOwnProperty(r)&&n[r].destroy();return s$1e(this)};var ce$o=["type","materials","uniforms","components","source"],fe$o=["diffuse","specular","shininess","normal","emission","alpha"];function he$o(e){var t=e._template,i=t.uniforms,n=t.materials,r=t.components;if(t$$(r)&&t$$(t.source))throw new t$_("fabric: cannot have source and components in the same template.");D$O(t,ce$o,L$L,!0),D$O(r,fe$o,L$L,!0);var o=[];for(var a in n)n.hasOwnProperty(a)&&o.push(a);D$O(i,o,pe$n,!1)}function de$r(e,t){var i=t._template.materials;for(var n in i)if(i.hasOwnProperty(n)&&e.indexOf(n)>-1)return!0;return!1}function ye$o(e){var t=e._template.components,i=e._template.source;if(t$$(i))e.shaderSource+=i+"\n";else{if(e.shaderSource+="czm_material czm_getMaterial(czm_materialInput materialInput)\n{\n",e.shaderSource+="czm_material material = czm_getDefaultMaterial(materialInput);\n",t$$(t)){var n=Object.keys(e._template.materials).length>0;for(var r in t)if(t.hasOwnProperty(r))if("diffuse"===r||"emission"===r){var o=n&&de$r(t[r],e)?t[r]:"czm_gammaCorrect("+t[r]+")";e.shaderSource+="material."+r+" = "+o+"; \n"}else e.shaderSource+="alpha"===r?"material.alpha = "+t.alpha+"; \n":"material."+r+" = "+t[r]+";\n"}e.shaderSource+="return material;\n}\n"}}var k$E={mat2:u$14,mat3:r$W,mat4:c$1a},_e$l=/\.ktx$/i,ge$k=/\.crn$/i;function ve$o(e){var t;return function(i,n){var r=i.uniforms,o=r[e],a=t!==o;t=o;var s,l,u=i._textures[e];if(o instanceof HTMLVideoElement)if(o.readyState>=2){if(a&&t$$(u)&&(u!==n.defaultTexture&&u.destroy(),u=void 0),!t$$(u)||u===n.defaultTexture)return u=new P$S({context:n,source:o,sampler:new a$Q({minificationFilter:i._minificationFilter,magnificationFilter:i._magnificationFilter})}),void(i._textures[e]=u);u.copyFrom(o)}else t$$(u)||(i._textures[e]=n.defaultTexture);else{if(o instanceof P$S&&o!==u){i._texturePaths[e]=void 0;var c=i._textures[e];return c!==i._defaultTexture&&c.destroy(),i._textures[e]=o,s=e+"Dimensions",void(r.hasOwnProperty(s)&&(l=r[s],l.x=o._width,l.y=o._height))}if(t$$(u)||(i._texturePaths[e]=void 0,t$$(i._defaultTexture)||(i._defaultTexture=n.defaultTexture),u=i._textures[e]=i._defaultTexture,s=e+"Dimensions",r.hasOwnProperty(s)&&((l=r[s]).x=u._width,l.y=u._height)),o!==r$v.DefaultImageId){var h=o instanceof t$X;if(!t$$(i._texturePaths[e])||h&&o.url!==i._texturePaths[e].url||!h&&o!==i._texturePaths[e]){if("string"==typeof o||h){var d=h?o:t$X.createIfNeeded(o);c$18(_e$l.test(d.url)?k$L(d):ge$k.test(d.url)?I$W(d):d.fetchImage(),(function(t){i._loadedImages.push({id:e,image:t})}))}else(o instanceof HTMLCanvasElement||o instanceof HTMLImageElement)&&i._loadedImages.push({id:e,image:o});i._texturePaths[e]=o}}}}}function Te$p(e){return function(t,i){var n=t.uniforms[e];if(n instanceof X$y){var r=t._textures[e];return r!==t._defaultTexture&&r.destroy(),t._texturePaths[e]=void 0,void(t._textures[e]=n)}if(t$$(t._textures[e])||(t._texturePaths[e]=void 0,t._textures[e]=i.defaultCubeMap),n!==r$v.DefaultCubeMapId){var o=n.positiveX+n.negativeX+n.positiveY+n.negativeY+n.positiveZ+n.negativeZ;if(o!==t._texturePaths[e]){var a=[t$X.createIfNeeded(n.positiveX).fetchImage(),t$X.createIfNeeded(n.negativeX).fetchImage(),t$X.createIfNeeded(n.positiveY).fetchImage(),t$X.createIfNeeded(n.negativeY).fetchImage(),t$X.createIfNeeded(n.positiveZ).fetchImage(),t$X.createIfNeeded(n.negativeZ).fetchImage()];c$18.all(a).then((function(i){t._loadedCubeMaps.push({id:e,images:i})})),t._texturePaths[e]=o}}}}function we$m(e){var t=e._template.uniforms;for(var i in t)t.hasOwnProperty(i)&&N$L(e,i)}function N$L(e,t){var i=e._strict,n=e._template.uniforms,r=n[t],o=Ce$m(r);if(!t$$(o))throw new t$_("fabric: uniform '"+t+"' has invalid type.");if("channels"===o){if(0===M$R(e,t,r,!1)&&i)throw new t$_("strict: shader source does not use channels '"+t+"'.")}else{if("sampler2D"===o){var a=t+"Dimensions";be$r(e,a)>0&&(n[a]={type:"ivec3",x:1,y:1},N$L(e,a))}if(!new RegExp("uniform\\s+"+o+"\\s+"+t+"\\s*;").test(e.shaderSource)){var s="uniform "+o+" "+t+";";e.shaderSource=s+e.shaderSource}var l=t+"_"+e._count++;if(1===M$R(e,t,l)&&i)throw new t$_("strict: shader source does not use uniform '"+t+"'.");if(e.uniforms[t]=r,"sampler2D"===o)e._uniforms[l]=function(){return e._textures[t]},e._updateFunctions.push(ve$o(t));else if("samplerCube"===o)e._uniforms[l]=function(){return e._textures[t]},e._updateFunctions.push(Te$p(t));else if(-1!==o.indexOf("mat")){var u=new k$E[o];e._uniforms[l]=function(){return k$E[o].fromColumnMajorArray(e.uniforms[t],u)}}else e._uniforms[l]=function(){return e.uniforms[t]}}}function Ce$m(e){var t=e.type;if(!t$$(t)){var i=typeof e;if("number"===i)t="float";else if("boolean"===i)t="bool";else if("string"===i||e instanceof P$S||e instanceof t$X||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement)t=/^([rgba]){1,4}$/i.test(e)?"channels":e===r$v.DefaultCubeMapId?"samplerCube":"sampler2D";else if("object"===i)if(Array.isArray(e))(4===e.length||9===e.length||16===e.length)&&(t="mat"+Math.sqrt(e.length));else{var n=0;for(var r in e)e.hasOwnProperty(r)&&(n+=1);n>=2&&n<=4?t="vec"+n:6===n&&(t="samplerCube")}}return t}function Me$k(e){var t=e._strict,i=e._template.materials;for(var n in i)if(i.hasOwnProperty(n)){var r=new r$v({strict:t,fabric:i[n],count:e._count});e._count=r._count,e._uniforms=s$1n(e._uniforms,r._uniforms,!0),e.materials[n]=r,e._translucentFunctions=e._translucentFunctions.concat(r._translucentFunctions);var o="czm_getMaterial",a=o+"_"+e._count++;if(M$R(r,o,a),e.shaderSource=r.shaderSource+e.shaderSource,0===M$R(e,n,a+"(materialInput)")&&t)throw new t$_("strict: shader source does not use material '"+n+"'.")}}function M$R(e,t,i,n){n=e$1Y(n,!0);var r=0,o=new RegExp("([\\w"+(n?".":"")+"])?"+t+"([\\w])?","g");return e.shaderSource=e.shaderSource.replace(o,(function(e,t,n){return t||n?e:(r+=1,i)})),r}function be$r(e,t,i){return M$R(e,t,t,i)}function t$G(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT);var t=e$1Y(e.translucent,!0),i=e$1Y(e.closed,!1),n=e$1Y(e.materialSupport,t$G.MaterialSupport.TEXTURED);this.material=t$$(e.material)?e.material:r$v.fromType(r$v.ColorType),this.translucent=t,this._vertexShaderSource=e$1Y(e.vertexShaderSource,n.vertexShaderSource),this._fragmentShaderSource=e$1Y(e.fragmentShaderSource,n.fragmentShaderSource),this._renderState=n$M.getDefaultRenderState(t,i,e.renderState),this._closed=i,this._materialSupport=n,this._vertexFormat=n.vertexFormat,this._flat=e$1Y(e.flat,!1),this._faceForward=e$1Y(e.faceForward,!i)}r$v._materialCache={_materials:{},addMaterial:function(e,t){this._materials[e]=t},getMaterial:function(e){return this._materials[e]}},r$v.DefaultImageId="czm_defaultImage",r$v.DefaultCubeMapId="czm_defaultCubeMap",r$v.ColorType="Color",r$v._materialCache.addMaterial(r$v.ColorType,{fabric:{type:r$v.ColorType,uniforms:{color:new e$1z(1,0,0,.5)},components:{diffuse:"color.rgb",alpha:"color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}}),r$v.ImageType="Image",r$v._materialCache.addMaterial(r$v.ImageType,{fabric:{type:r$v.ImageType,uniforms:{image:r$v.DefaultImageId,repeat:new r$T(1,1),color:new e$1z(1,1,1,1)},components:{diffuse:"texture2D(image, fract(repeat * materialInput.st)).rgb * color.rgb",alpha:"texture2D(image, fract(repeat * materialInput.st)).a * color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}}),r$v.DiffuseMapType="DiffuseMap",r$v._materialCache.addMaterial(r$v.DiffuseMapType,{fabric:{type:r$v.DiffuseMapType,uniforms:{image:r$v.DefaultImageId,channels:"rgb",repeat:new r$T(1,1)},components:{diffuse:"texture2D(image, fract(repeat * materialInput.st)).channels"}},translucent:!1}),r$v.AlphaMapType="AlphaMap",r$v._materialCache.addMaterial(r$v.AlphaMapType,{fabric:{type:r$v.AlphaMapType,uniforms:{image:r$v.DefaultImageId,channel:"a",repeat:new r$T(1,1)},components:{alpha:"texture2D(image, fract(repeat * materialInput.st)).channel"}},translucent:!0}),r$v.SpecularMapType="SpecularMap",r$v._materialCache.addMaterial(r$v.SpecularMapType,{fabric:{type:r$v.SpecularMapType,uniforms:{image:r$v.DefaultImageId,channel:"r",repeat:new r$T(1,1)},components:{specular:"texture2D(image, fract(repeat * materialInput.st)).channel"}},translucent:!1}),r$v.EmissionMapType="EmissionMap",r$v._materialCache.addMaterial(r$v.EmissionMapType,{fabric:{type:r$v.EmissionMapType,uniforms:{image:r$v.DefaultImageId,channels:"rgb",repeat:new r$T(1,1)},components:{emission:"texture2D(image, fract(repeat * materialInput.st)).channels"}},translucent:!1}),r$v.BumpMapType="BumpMap",r$v._materialCache.addMaterial(r$v.BumpMapType,{fabric:{type:r$v.BumpMapType,uniforms:{image:r$v.DefaultImageId,channel:"r",strength:.8,repeat:new r$T(1,1)},source:j$M},translucent:!1}),r$v.NormalMapType="NormalMap",r$v._materialCache.addMaterial(r$v.NormalMapType,{fabric:{type:r$v.NormalMapType,uniforms:{image:r$v.DefaultImageId,channels:"rgb",strength:.8,repeat:new r$T(1,1)},source:U$O},translucent:!1}),r$v.GridType="Grid",r$v._materialCache.addMaterial(r$v.GridType,{fabric:{type:r$v.GridType,uniforms:{color:new e$1z(0,1,0,1),cellAlpha:.1,lineCount:new r$T(8,8),lineThickness:new r$T(1,1),lineOffset:new r$T(0,0)},source:Q$I},translucent:function(e){var t=e.uniforms;return t.color.alpha<1||t.cellAlpha<1}}),r$v.StripeType="Stripe",r$v._materialCache.addMaterial(r$v.StripeType,{fabric:{type:r$v.StripeType,uniforms:{horizontal:!0,evenColor:new e$1z(1,1,1,.5),oddColor:new e$1z(0,0,1,.5),offset:0,repeat:5},source:ne$u},translucent:function(e){var t=e.uniforms;return t.evenColor.alpha<1||t.oddColor.alpha<1}}),r$v.CheckerboardType="Checkerboard",r$v._materialCache.addMaterial(r$v.CheckerboardType,{fabric:{type:r$v.CheckerboardType,uniforms:{lightColor:new e$1z(1,1,1,.5),darkColor:new e$1z(0,0,0,.5),repeat:new r$T(5,5)},source:J$J},translucent:function(e){var t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}}),r$v.DotType="Dot",r$v._materialCache.addMaterial(r$v.DotType,{fabric:{type:r$v.DotType,uniforms:{lightColor:new e$1z(1,1,0,.75),darkColor:new e$1z(0,1,1,.75),repeat:new r$T(5,5)},source:V$C},translucent:function(e){var t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}}),r$v.WaterType="Water",r$v._materialCache.addMaterial(r$v.WaterType,{fabric:{type:r$v.WaterType,uniforms:{baseWaterColor:new e$1z(.2,.3,.6,1),blendColor:new e$1z(0,1,.699,1),specularMap:r$v.DefaultImageId,normalMap:r$v.DefaultImageId,frequency:10,animationSpeed:.01,amplitude:1,specularIntensity:.5,fadeFactor:1},source:se$r},translucent:function(e){var t=e.uniforms;return t.baseWaterColor.alpha<1||t.blendColor.alpha<1}}),r$v.RimLightingType="RimLighting",r$v._materialCache.addMaterial(r$v.RimLightingType,{fabric:{type:r$v.RimLightingType,uniforms:{color:new e$1z(1,0,0,.7),rimColor:new e$1z(1,1,1,.4),width:.3},source:ae$v},translucent:function(e){var t=e.uniforms;return t.color.alpha<1||t.rimColor.alpha<1}}),r$v.FadeType="Fade",r$v._materialCache.addMaterial(r$v.FadeType,{fabric:{type:r$v.FadeType,uniforms:{fadeInColor:new e$1z(1,0,0,1),fadeOutColor:new e$1z(0,0,0,0),maximumDistance:.5,repeat:!0,fadeDirection:{x:!0,y:!0},time:new r$T(.5,.5)},source:K$B},translucent:function(e){var t=e.uniforms;return t.fadeInColor.alpha<1||t.fadeOutColor.alpha<1}}),r$v.PolylineArrowType="PolylineArrow",r$v._materialCache.addMaterial(r$v.PolylineArrowType,{fabric:{type:r$v.PolylineArrowType,uniforms:{color:new e$1z(1,1,1,1)},source:ee$v},translucent:!0}),r$v.PolylineDashType="PolylineDash",r$v._materialCache.addMaterial(r$v.PolylineDashType,{fabric:{type:r$v.PolylineDashType,uniforms:{color:new e$1z(1,0,1,1),gapColor:new e$1z(0,0,0,0),dashLength:16,dashPattern:255},source:te$v},translucent:!0}),r$v.PolylineGlowType="PolylineGlow",r$v._materialCache.addMaterial(r$v.PolylineGlowType,{fabric:{type:r$v.PolylineGlowType,uniforms:{color:new e$1z(0,.5,1,1),glowPower:.25,taperPower:1},source:re$y},translucent:!0}),r$v.PolylineOutlineType="PolylineOutline",r$v._materialCache.addMaterial(r$v.PolylineOutlineType,{fabric:{type:r$v.PolylineOutlineType,uniforms:{color:new e$1z(1,1,1,1),outlineColor:new e$1z(1,0,0,1),outlineWidth:1},source:O$D},translucent:function(e){var t=e.uniforms;return t.color.alpha<1||t.outlineColor.alpha<1}}),r$v.ElevationContourType="ElevationContour",r$v._materialCache.addMaterial(r$v.ElevationContourType,{fabric:{type:r$v.ElevationContourType,uniforms:{spacing:100,color:new e$1z(1,0,0,1),width:1},source:$$H},translucent:!1}),r$v.ElevationRampType="ElevationRamp",r$v._materialCache.addMaterial(r$v.ElevationRampType,{fabric:{type:r$v.ElevationRampType,uniforms:{image:r$v.DefaultImageId,minimumHeight:0,maximumHeight:1e4},source:q$S},translucent:!1}),r$v.SlopeRampMaterialType="SlopeRamp",r$v._materialCache.addMaterial(r$v.SlopeRampMaterialType,{fabric:{type:r$v.SlopeRampMaterialType,uniforms:{image:r$v.DefaultImageId},source:ie$x},translucent:!1}),r$v.AspectRampMaterialType="AspectRamp",r$v._materialCache.addMaterial(r$v.AspectRampMaterialType,{fabric:{type:r$v.AspectRampMaterialType,uniforms:{image:r$v.DefaultImageId},source:Z$M},translucent:!1}),r$v.EmissionColorType="EmissionColor",r$v._materialCache.addMaterial(r$v.EmissionColorType,{fabric:{type:r$v.EmissionColorType,uniforms:{color:new e$1z(1,1,1,1)},source:ue$n},translucent:function(e){return e.uniforms.color.alpha<1}}),r$v.PolylineDynamicType="PolylineDynamic",r$v._materialCache.addMaterial(r$v.PolylineDynamicType,{fabric:{type:r$v.PolylineDynamicType,uniforms:{color:new e$1z(1,1,1,1),outlineColor:new e$1z(1,0,0,1),outlineWidth:0,v_time:1,bAsy:1},source:O$D},translucent:function(e){return!0}}),r$v.PolylineTrailType="PolylineTrail",r$v._materialCache.addMaterial(r$v.PolylineTrailType,{fabric:{type:r$v.PolylineTrailType,uniforms:{color:new e$1z(1,0,0,.5),trailTime:0,spotSize:1,trailLength:.03,spotIntensity:5,constantSpeed:0,period:1e3,startTime:0},components:{diffuse:"color.rgb",alpha:"color.a"}},translucent:function(e){return!0}}),Object.defineProperties(t$G.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},materialSupport:{get:function(){return this._materialSupport}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}}),t$G.prototype.getFragmentShaderSource=n$M.prototype.getFragmentShaderSource,t$G.prototype.isTranslucent=n$M.prototype.isTranslucent,t$G.prototype.getRenderState=n$M.prototype.getRenderState,t$G.MaterialSupport={BASIC:Object.freeze({vertexFormat:n$12.POSITION_AND_NORMAL,vertexShaderSource:d$J,fragmentShaderSource:i$N}),BASICMODEL:Object.freeze({vertexFormat:n$12.POSITION_AND_NORMAL,vertexShaderSource:_$J,fragmentShaderSource:i$N}),TEXTURED:Object.freeze({vertexFormat:n$12.POSITION_NORMAL_AND_ST,vertexShaderSource:s$V,fragmentShaderSource:u$L}),TEXTUREDMODEL:Object.freeze({vertexFormat:n$12.POSITION_NORMAL_AND_ST,vertexShaderSource:g$A,fragmentShaderSource:u$L}),ALL:Object.freeze({vertexFormat:n$12.ALL,vertexShaderSource:h$Q,fragmentShaderSource:p$W})};var m$F="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec4 v_color;\nvoid main()\n{\nvec3 positionToEyeEC = -v_positionEC;\nvec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\nnormalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\nvec4 color = czm_gammaCorrect(v_color);\nczm_materialInput materialInput;\nmaterialInput.normalEC = normalEC;\nmaterialInput.positionToEyeEC = positionToEyeEC;\nczm_material material = czm_getDefaultMaterial(materialInput);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = color.a;\ngl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n}\n",s$U="attribute vec3 position;\nattribute vec3 normal;\nattribute float batchId;\nattribute vec4 color;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec4 v_color;\nvoid main()\n{\nvec4 p = vec4(position, 1.0);\nv_positionEC = (czm_modelView * p).xyz;\nv_normalEC = czm_normal * normal;\nv_color = color;\ngl_Position = czm_modelViewProjection * p;\n}\n",_$I="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec4 color;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec4 v_color;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_positionEC = (czm_modelViewRelativeToEye * p).xyz;\nv_normalEC = czm_normal * normal;\nv_color = color;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",d$I="varying vec4 v_color;\nvoid main()\n{\ngl_FragColor = czm_gammaCorrect(v_color);\n}\n",p$V="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec4 color;\nattribute float batchId;\nvarying vec4 v_color;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_color = color;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",O$C="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 position03DHigh;\nattribute vec3 position03DLow;\nattribute vec3 position13DHigh;\nattribute vec3 position13DLow;\nattribute vec2 sideness;\n#ifdef APPLY_SIDENESS\nuniform float uLineWidth;\nattribute float batchId1;\n#endif\nattribute vec4 color;\nattribute float batchId;\nvarying vec4 v_color;\n#ifdef APPLY_SIDENESS\nvec4 resolvePosition(vec4 viewPosV0, vec4 viewPosV1, vec2 sidenessNorm) {\nvec2 sideness = sidenessNorm * 2.0 - 1.0;\nvec4 viewPos = mix(viewPosV0, viewPosV1, sidenessNorm.y);\nviewPos.z = viewPos.z * 0.995;\nvec4 projPosV0 = czm_projection * viewPosV0;\nvec4 projPosV1 = czm_projection * viewPosV1;\nvec4 projPos = czm_projection * viewPos;\nvec3 screenSpaceLineNDC = (projPosV1.xyz / projPosV1.w - projPosV0.xyz / projPosV0.w);\nvec2 uNDCToPixel = vec2(czm_viewport.z / 2.0, czm_viewport.w / 2.0);\nvec2 screenSpaceLinePixels = screenSpaceLineNDC.xy * uNDCToPixel;\nfloat lineLengthPixels = length(screenSpaceLinePixels);\nfloat dzPerPixel = screenSpaceLineNDC.z / lineLengthPixels;\nvec2 screenSpaceDirection = screenSpaceLinePixels / lineLengthPixels;\nvec2 perpendicularScreenSpaceDirection = vec2(screenSpaceDirection.y, -screenSpaceDirection.x) * sideness.x;\nvec2 uPixelToNDC = vec2(2.0 / czm_viewport.z, 2.0 / czm_viewport.w);\nfloat halfLineWidth = max(uLineWidth, 1.0) * 0.5;\nvec2 halfLineWidthNDC = halfLineWidth * uPixelToNDC;\nvec2 ndcOffset = screenSpaceDirection * halfLineWidthNDC + perpendicularScreenSpaceDirection * halfLineWidthNDC;\nprojPos.xy += ndcOffset * projPos.w;\nprojPos.z += (dzPerPixel * halfLineWidth) * sideness.y * projPos.w;\nreturn projPos;\n}\n#endif\nvoid main()\n{\n#ifdef APPLY_SIDENESS\nvec4 p0 = czm_computePosition0();\nvec4 p1 = czm_computePosition1();\nvec4 viewPosV0 = czm_inverseProjection * czm_modelViewProjectionRelativeToEye * p0;\nvec4 viewPosV1 = czm_inverseProjection * czm_modelViewProjectionRelativeToEye * p1;\ngl_Position = resolvePosition(viewPosV0, viewPosV1, sideness) * float(batchId1 == batchId);\n#else\nvec4 p = czm_computePosition();\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n#endif\nv_color = color;\n}\n";function r$u(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT);var t=e$1Y(e.translucent,!0),i=e$1Y(e.closed,!1),n=e$1Y(e.flat,!1),r=e$1Y(e.materialSupport,r$u.MaterialSupport.BASIC),o=r.vertexShaderSource,a=r.fragmentShaderSource,s=r.vertexFormat;n&&(o=p$V,e.hasSideness&&(o=O$C),a=d$I,s=r$u.FLAT_VERTEX_FORMAT),this.material=void 0,this.translucent=t,this._vertexShaderSource=e$1Y(e.vertexShaderSource,o),this._fragmentShaderSource=e$1Y(e.fragmentShaderSource,a),this._renderState=n$M.getDefaultRenderState(t,i,e.renderState),this._closed=i,this._vertexFormat=s,this._flat=n,this._faceForward=e$1Y(e.faceForward,!i)}function t$F(e){this._definitionChanged=new o$15,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(r$u.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}}),r$u.VERTEX_FORMAT=n$12.POSITION_AND_NORMAL,r$u.FLAT_VERTEX_FORMAT=n$12.POSITION_ONLY,r$u.prototype.getFragmentShaderSource=n$M.prototype.getFragmentShaderSource,r$u.prototype.isTranslucent=n$M.prototype.isTranslucent,r$u.prototype.getRenderState=n$M.prototype.getRenderState,r$u.MaterialSupport={BASIC:Object.freeze({vertexFormat:n$12.POSITION_AND_NORMAL,vertexShaderSource:_$I,fragmentShaderSource:m$F}),FLAT:Object.freeze({vertexFormat:n$12.POSITION_ONLY,vertexShaderSource:p$V,fragmentShaderSource:d$I}),FLOAT_POSITION:Object.freeze({vertexFormat:n$12.POSITION_AND_NORMAL,vertexShaderSource:s$U,fragmentShaderSource:m$F})},Object.defineProperties(t$F.prototype,{isConstant:{get:function(){return r$w.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:v$J("color")}),t$F.prototype.getType=function(e){return"Color"},t$F.prototype.getValue=function(e,t){return t$$(t)||(t={}),t.color=r$w.getValueOrClonedDefault(this._color,e,e$1z.WHITE,t.color),t},t$F.prototype.equals=function(e){return this===e||e instanceof t$F&&r$w.equals(this._color,e._color)};var E$L={ENVIRONMENT:0,COMPUTE:1,GLOBE:2,TERRAIN_CLASSIFICATION:3,CESIUM_3D_TILE:4,CESIUM_3D_TILE_CLASSIFICATION:5,CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW:6,S3MTiles:8,S3MTilesClampObjectStencil:9,S3MTilesClampObjectColor:10,ProjectionImage:11,OPAQUE:12,ClampObject:13,NonClampObject:14,Label_Billboard:15,Voxel_Billboard:16,Particle:17,TRANSLUCENT:18,ANALYSIS:19,LOG_DEPTH_OVERLAY:20,OVERLAY:21,OVERLAY_AGAINST_DEPTH:22,NUMBER_OF_PASSES:23},we$l=Object.freeze(E$L),X$x="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute float batchId;\n#ifdef EXTRUDED_GEOMETRY\nattribute vec3 extrudeDirection;\nuniform float u_globeMinimumAltitude;\n#endif // EXTRUDED_GEOMETRY\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif // PER_INSTANCE_COLOR\n#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\nvarying vec4 v_sphericalExtents;\n#else // SPHERICAL\nvarying vec2 v_inversePlaneExtents;\nvarying vec4 v_westPlane;\nvarying vec4 v_southPlane;\n#endif // SPHERICAL\nvarying vec3 v_uvMinAndSphericalLongitudeRotation;\nvarying vec3 v_uMaxAndInverseDistance;\nvarying vec3 v_vMaxAndInverseDistance;\n#endif // TEXTURE_COORDINATES\n#if defined(TEXTURE_COORDINATES) && !defined(SPHERICAL) && defined(UINT8_PACKING)\nvec4 clampAndMagnitude(vec4 sd)\n{\nvec4 d = sd;\nd.x = czm_branchFreeTernary(sd.x < 128.0, d.x, (255.0 - sd.x));\nd.x = floor(0.5 + d.x);\nd.y = floor(0.5 + d.y);\nd.z = floor(0.5 + d.z);\nd.w = floor(0.5 + d.w);\nreturn d;\n}\nfloat unpackLowLessThan100k(vec4 sd)\n{\nvec4 d = clampAndMagnitude(sd);\nreturn (1000.0 * d.x + 10.0 * d.y + 0.1 * d.z + 0.001 * d.w) * czm_branchFreeTernary(sd.x < 128.0, 1.0, -1.0);\n}\nvec3 southwest_LOW(vec4 x, vec4 y, vec4 z)\n{\nvec3 value;\nvalue.x = unpackLowLessThan100k(x);\nvalue.y = unpackLowLessThan100k(y);\nvalue.z = unpackLowLessThan100k(z);\nreturn value;\n}\nfloat unpackHighMagLessThan100Million(vec4 sd)\n{\nvec4 d = clampAndMagnitude(sd);\nreturn (1000000.0 * d.x + 10000.0 * d.y + 100.0 * d.z + d.w) * czm_branchFreeTernary(sd.x < 128.0, 1.0, -1.0);\n}\nvec3 southwest_HIGH(vec4 x, vec4 y, vec4 z)\n{\nvec3 value;\nvalue.x = unpackHighMagLessThan100Million(x);\nvalue.y = unpackHighMagLessThan100Million(y);\nvalue.z = unpackHighMagLessThan100Million(z);\nreturn value;\n}\n#ifdef COLUMBUS_VIEW_2D\nvec4 unpackPlanes2D_HIGH(vec4 x, vec4 y, vec4 z, vec4 w)\n{\nvec4 value;\nvalue.x = unpackHighMagLessThan100Million(x);\nvalue.y = unpackHighMagLessThan100Million(y);\nvalue.z = unpackHighMagLessThan100Million(z);\nvalue.w = unpackHighMagLessThan100Million(w);\nreturn value;\n}\nvec4 unpackPlanes2D_LOW(vec4 x, vec4 y, vec4 z, vec4 w)\n{\nvec4 value;\nvalue.x = unpackLowLessThan100k(x);\nvalue.y = unpackLowLessThan100k(y);\nvalue.z = unpackLowLessThan100k(z);\nvalue.w = unpackLowLessThan100k(w);\nreturn value;\n}\n#else\nfloat unpackLowLessThan1000k(vec4 sd)\n{\nvec4 d = clampAndMagnitude(sd);\nreturn (10000.0 * d.x + 100.0 * d.y + d.z + 0.01 * d.w) * czm_branchFreeTernary(sd.x < 128.0, 1.0, -1.0);\n}\nvec3 unpackExtent(vec4 x, vec4 y, vec4 z)\n{\nvec3 value;\nvalue.x = unpackLowLessThan1000k(x);\nvalue.y = unpackLowLessThan1000k(y);\nvalue.z = unpackLowLessThan1000k(z);\nreturn value;\n}\n#endif\n#endif\nvoid main()\n{\nvec4 position = czm_computePosition();\n#ifdef EXTRUDED_GEOMETRY\nfloat delta = min(u_globeMinimumAltitude, czm_geometricToleranceOverMeter * length(position.xyz));\ndelta *= czm_sceneMode == czm_sceneMode3D ? 1.0 : 0.0;\nposition = position + vec4(extrudeDirection * delta, 0.0);\n#endif\n#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\nv_sphericalExtents = czm_batchTable_sphericalExtents(batchId);\nv_uvMinAndSphericalLongitudeRotation.z = czm_batchTable_longitudeRotation(batchId);\n#else // SPHERICAL\n#ifdef COLUMBUS_VIEW_2D\n#ifdef UINT8_PACKING\nvec4 planes2D_high = unpackPlanes2D_HIGH(czm_batchTable_planes2D_HIGH_x(batchId),\nczm_batchTable_planes2D_HIGH_y(batchId),\nczm_batchTable_planes2D_HIGH_z(batchId),\nczm_batchTable_planes2D_HIGH_w(batchId));\nvec4 planes2D_low = unpackPlanes2D_LOW(czm_batchTable_planes2D_LOW_x(batchId),\nczm_batchTable_planes2D_LOW_y(batchId),\nczm_batchTable_planes2D_LOW_z(batchId),\nczm_batchTable_planes2D_LOW_w(batchId));\n#else // UINT8_PACKING\nvec4 planes2D_high = czm_batchTable_planes2D_HIGH(batchId);\nvec4 planes2D_low = czm_batchTable_planes2D_LOW(batchId);\n#endif // UINT8_PACKING\nvec2 idlSplitNewPlaneHiLow = vec2(EAST_MOST_X_HIGH - (WEST_MOST_X_HIGH - planes2D_high.w), EAST_MOST_X_LOW - (WEST_MOST_X_LOW - planes2D_low.w));\nbool idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y > 0.0;\nplanes2D_high.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.w);\nplanes2D_low.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.w);\nidlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y < 0.0;\nidlSplitNewPlaneHiLow = vec2(WEST_MOST_X_HIGH - (EAST_MOST_X_HIGH - planes2D_high.x), WEST_MOST_X_LOW - (EAST_MOST_X_LOW - planes2D_low.x));\nplanes2D_high.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.x);\nplanes2D_low.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.x);\nvec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.xy), vec3(0.0, planes2D_low.xy))).xyz;\nvec3 northWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.x, planes2D_high.z), vec3(0.0, planes2D_low.x, planes2D_low.z))).xyz;\nvec3 southEastCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.w, planes2D_high.y), vec3(0.0, planes2D_low.w, planes2D_low.y))).xyz;\n#else // COLUMBUS_VIEW_2D\n#ifdef UINT8_PACKING\nvec3 low = southwest_LOW(czm_batchTable_southWest_LOW_x(batchId), czm_batchTable_southWest_LOW_y(batchId), czm_batchTable_southWest_LOW_z(batchId));\nvec3 high = southwest_HIGH(czm_batchTable_southWest_HIGH_x(batchId), czm_batchTable_southWest_HIGH_y(batchId), czm_batchTable_southWest_HIGH_z(batchId));\nvec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(high, low)).xyz;\nvec3 northWestCorner = czm_normal * unpackExtent(\nczm_batchTable_northward_x(batchId),\nczm_batchTable_northward_y(batchId),\nczm_batchTable_northward_z(batchId)) + southWestCorner;\nvec3 southEastCorner = czm_normal * unpackExtent(\nczm_batchTable_eastward_x(batchId),\nczm_batchTable_eastward_y(batchId),\nczm_batchTable_eastward_z(batchId)) + southWestCorner;\n#else // UINT8_PACKING\nvec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(czm_batchTable_southWest_HIGH(batchId), czm_batchTable_southWest_LOW(batchId))).xyz;\nvec3 northWestCorner = czm_normal * czm_batchTable_northward(batchId) + southWestCorner;\nvec3 southEastCorner = czm_normal * czm_batchTable_eastward(batchId) + southWestCorner;\n#endif // UINT8_PACKING\n#endif // COLUMBUS_VIEW_2D\nvec3 eastWard = southEastCorner - southWestCorner;\nfloat eastExtent = length(eastWard);\neastWard /= eastExtent;\nvec3 northWard = northWestCorner - southWestCorner;\nfloat northExtent = length(northWard);\nnorthWard /= northExtent;\nv_westPlane = vec4(eastWard, -dot(eastWard, southWestCorner));\nv_southPlane = vec4(northWard, -dot(northWard, southWestCorner));\nv_inversePlaneExtents = vec2(1.0 / eastExtent, 1.0 / northExtent);\n#endif // SPHERICAL\nvec4 uvMinAndExtents = czm_batchTable_uvMinAndExtents(batchId);\nvec4 uMaxVmax = czm_batchTable_uMaxVmax(batchId);\nv_uMaxAndInverseDistance = vec3(uMaxVmax.xy, uvMinAndExtents.z);\nv_vMaxAndInverseDistance = vec3(uMaxVmax.zw, uvMinAndExtents.w);\nv_uvMinAndSphericalLongitudeRotation.xy = uvMinAndExtents.xy;\n#endif // TEXTURE_COORDINATES\n#ifdef PER_INSTANCE_COLOR\nv_color = czm_batchTable_color(batchId);\n#endif\ngl_Position = czm_depthClampFarPlane(czm_modelViewProjectionRelativeToEye * position);\n}\n",Y$F="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef VECTOR_TILE\nuniform vec4 u_highlightColor;\n#endif\nvoid main(void)\n{\n#ifdef VECTOR_TILE\ngl_FragColor = czm_gammaCorrect(u_highlightColor);\n#else\ngl_FragColor = vec4(1.0);\n#endif\nczm_writeDepthClampedToFarPlane();\n}\n",e$15={TERRAIN:0,CESIUM_3D_TILE:1,S3M_TILE:2,BOTH:3,NUMBER_OF_CLASSIFICATION_TYPES:4},_0x29401c=Object.freeze(e$15),A$P={NEVER:de$x.NEVER,LESS:de$x.LESS,EQUAL:de$x.EQUAL,LESS_OR_EQUAL:de$x.LEQUAL,GREATER:de$x.GREATER,NOT_EQUAL:de$x.NOTEQUAL,GREATER_OR_EQUAL:de$x.GEQUAL,ALWAYS:de$x.ALWAYS},Re$h=Object.freeze(A$P);function p$U(e,t,i){if(!t$$(e))throw new t$_("context is required");if(!t$$(t))throw new t$_("attributes is required");if(!t$$(i))throw new t$_("numberOfInstances is required");if(this._attributes=t,this._numberOfInstances=i,0!==t.length){var n=U$N(t),r=e.floatingPointTexture,o=n===v$Z.FLOAT&&!r,a=G$F(t,o),s=X$w(a,t,o),l=Math.floor(e$1y.maximumTextureSize/s),u=Math.min(i,l),c=s*u,h=Math.ceil(i/u),d=1/c,f=.5*d,p=1/h,_=.5*p;this._textureDimensions=new r$T(c,h),this._textureStep=new a$10(d,f,p,_),this._pixelDatatype=o?v$Z.UNSIGNED_BYTE:n,this._packFloats=o,this._offsets=a,this._stride=s,this._texture=void 0;var m=4*c*h;this._batchValues=n!==v$Z.FLOAT||o?new Uint8Array(m):new Float32Array(m),this._batchValuesDirty=!1,this._suffix=""}}function U$N(e){for(var t=!1,i=e.length,n=0;n<i;++n)if(e[n].componentDatatype!==C$12.UNSIGNED_BYTE){t=!0;break}return t?v$Z.FLOAT:v$Z.UNSIGNED_BYTE}function I$O(e,t){var i=e[t].componentsPerAttribute;return 2===i?r$T:3===i?a$11:4===i?a$10:Number}function G$F(e,t){for(var i=new Array(e.length),n=0,r=e.length,o=0;o<r;++o){var a=e[o].componentDatatype;i[o]=n,a!==C$12.UNSIGNED_BYTE&&t?n+=4:++n}return i}function X$w(e,t,i){var n=e.length,r=e[n-1];return t[n-1].componentDatatype!==C$12.UNSIGNED_BYTE&&i?r+4:r+1}Object.defineProperties(p$U.prototype,{attributes:{get:function(){return this._attributes}},numberOfInstances:{get:function(){return this._numberOfInstances}},suffix:{get:function(){return this._suffix},set:function(e){this._suffix=e}}});var v$I=new a$10;function q$R(e,t,i){var n=a$10.unpack(e,t,v$I),r=a$10.unpackFloat(n);n=a$10.unpack(e,t+4,v$I);var o=a$10.unpackFloat(n);n=a$10.unpack(e,t+8,v$I);var a=a$10.unpackFloat(n);n=a$10.unpack(e,t+12,v$I);var s=a$10.unpackFloat(n);return a$10.fromElements(r,o,a,s,i)}function P$D(e,t,i){var n=a$10.packFloat(e.x,v$I);a$10.pack(n,t,i),n=a$10.packFloat(e.y,n),a$10.pack(n,t,i+4),n=a$10.packFloat(e.z,n),a$10.pack(n,t,i+8),n=a$10.packFloat(e.w,n),a$10.pack(n,t,i+12)}var g$z=new a$10;p$U.prototype.getBatchedAttribute=function(e,t,i){if(e<0||e>=this._numberOfInstances)throw new t$_("instanceIndex is out of range.");if(t<0||t>=this._attributes.length)throw new t$_("attributeIndex is out of range");var n,r=this._attributes,o=this._offsets[t],a=4*this._stride*e+4*o;n=this._packFloats&&r[t].componentDatatype!==v$Z.UNSIGNED_BYTE?q$R(this._batchValues,a,g$z):a$10.unpack(this._batchValues,a,g$z);var s=I$O(r,t);return t$$(s.fromCartesian4)?s.fromCartesian4(n,i):t$$(s.clone)?s.clone(n,i):n.x};var C$K=[void 0,void 0,new r$T,new a$11,new a$10],L$K=new a$10;function M$Q(e,t){var i=e._textureDimensions;e._texture=new P$S({context:t,pixelFormat:Z$_.RGBA,pixelDatatype:e._pixelDatatype,width:i.x,height:i.y,sampler:new a$Q({minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST}),flipY:!1})}function R$E(e){var t=e._textureDimensions;e._texture.copyFrom({width:t.x,height:t.y,arrayBufferView:e._batchValues})}function j$L(e){var t=e._stride;return 1===e._textureDimensions.y?"uniform vec4 batchTextureStep{suffix}; \nvec2 computeSt{suffix}(float batchId) \n{ \n float stepX = batchTextureStep{suffix}.x; \n float centerX = batchTextureStep{suffix}.y; \n float numberOfAttributes = float("+t+"); \n return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5); \n} \n":"uniform vec4 batchTextureStep{suffix}; \nuniform vec2 batchTextureDimensions{suffix}; \nvec2 computeSt{suffix}(float batchId) \n{ \n float stepX = batchTextureStep{suffix}.x; \n float centerX = batchTextureStep{suffix}.y; \n float stepY = batchTextureStep{suffix}.z; \n float centerY = batchTextureStep{suffix}.w; \n float numberOfAttributes = float("+t+"); \n float xId = mod(batchId * numberOfAttributes, batchTextureDimensions{suffix}.x); \n float yId = floor(batchId * numberOfAttributes / batchTextureDimensions{suffix}.x); \n return vec2(centerX + (xId * stepX), centerY + (yId * stepY)); \n} \n"}function H$K(e){return 1===e?"float":"vec"+e}function J$I(e){return 1===e?".x":2===e?".xy":3===e?".xyz":""}function W$Q(e,t){var i=e._attributes[t],n=i.componentsPerAttribute,r=i.functionName,o=H$K(n),a=J$I(n),s=o+" "+r+"(float batchId) \n{ \n vec2 st = computeSt{suffix}(batchId); \n st.x += batchTextureStep{suffix}.x * float("+e._offsets[t]+"); \n";return e._packFloats&&i.componentDatatype!==v$Z.UNSIGNED_BYTE?s+="vec4 textureValue; \ntextureValue.x = czm_unpackFloat(texture2D(batchTexture{suffix}, st)); \ntextureValue.y = czm_unpackFloat(texture2D(batchTexture{suffix}, st + vec2(batchTextureStep{suffix}.x, 0.0))); \ntextureValue.z = czm_unpackFloat(texture2D(batchTexture{suffix}, st + vec2(batchTextureStep{suffix}.x * 2.0, 0.0))); \ntextureValue.w = czm_unpackFloat(texture2D(batchTexture{suffix}, st + vec2(batchTextureStep{suffix}.x * 3.0, 0.0))); \n":s+=" vec4 textureValue = texture2D(batchTexture{suffix}, st); \n",s+=" "+o+" value = textureValue"+a+"; \n",e._pixelDatatype!==v$Z.UNSIGNED_BYTE||i.componentDatatype!==C$12.UNSIGNED_BYTE||i.normalize?e._pixelDatatype===v$Z.FLOAT&&i.componentDatatype===C$12.UNSIGNED_BYTE&&i.normalize&&(s+="value /= 255.0; \n"):s+="value *= 255.0; \n",s+=" return value; \n} \n"}function N$K(e,t,i){var n,r=!i,o=e.length;if(!r&&o>1){var a=e[0].modelMatrix;for(n=1;n<o;++n)if(!c$1a.equals(a,e[n].modelMatrix)){r=!0;break}}if(r)for(n=0;n<o;++n)t$$(e[n].geometry)&&F$W.transformToWorldCoordinates(e[n]);else c$1a.multiplyTransformation(t,e[0].modelMatrix,t)}function V$B(e,t){var i=e.attributes,n=i.position,r=n.values.length/n.componentsPerAttribute;i.batchId=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:1,values:new Float32Array(r)});for(var o=i.batchId.values,a=0;a<r;++a)o[a]=t}function Q$H(e){for(var t=e.length,i=0;i<t;++i){var n=e[i];t$$(n.geometry)?V$B(n.geometry,i):t$$(n.westHemisphereGeometry)&&t$$(n.eastHemisphereGeometry)&&(V$B(n.westHemisphereGeometry,i),V$B(n.eastHemisphereGeometry,i))}}function X$v(e){var t,i,n,r=e.instances,o=e.projection,a=e.elementIndexUintSupported,s=e.scene3DOnly,l=e.vertexCacheOptimize,u=e.compressVertices,c=e.modelMatrix,h=r.length;for(t=0;t<h;++t)if(t$$(r[t].geometry)){n=r[t].geometry.primitiveType;break}for(t=1;t<h;++t)if(t$$(r[t].geometry)&&r[t].geometry.primitiveType!==n)throw new t$_("All instance geometries must have the same primitiveType.");if(N$K(r,c,s),!s)for(t=0;t<h;++t)t$$(r[t].geometry)&&F$W.splitLongitude(r[t]);if(Q$H(r),l)for(t=0;t<h;++t){var d=r[t];t$$(d.geometry)?(F$W.reorderForPostVertexCache(d.geometry),F$W.reorderForPreVertexCache(d.geometry)):t$$(d.westHemisphereGeometry)&&t$$(d.eastHemisphereGeometry)&&(F$W.reorderForPostVertexCache(d.westHemisphereGeometry),F$W.reorderForPreVertexCache(d.westHemisphereGeometry),F$W.reorderForPostVertexCache(d.eastHemisphereGeometry),F$W.reorderForPreVertexCache(d.eastHemisphereGeometry))}var f=F$W.combineInstances(r);for(h=f.length,t=0;t<h;++t){var p,_=(i=f[t]).attributes;if(s)for(p in _)_.hasOwnProperty(p)&&_[p].componentDatatype===C$12.DOUBLE&&F$W.encodeAttribute(i,p,p+"3DHigh",p+"3DLow");else for(p in _)if(_.hasOwnProperty(p)&&_[p].componentDatatype===C$12.DOUBLE){var m=p+"3D",$=p+"2D";F$W.projectTo2D(i,p,m,$,o),t$$(i.boundingSphere)&&"position"===p&&(i.boundingSphereCV=c$19.fromVertices(i.attributes.position2D.values)),F$W.encodeAttribute(i,m,m+"High",m+"Low"),F$W.encodeAttribute(i,$,$+"High",$+"Low")}u&&F$W.compressVertices(i)}if(!a){var g=[];for(h=f.length,t=0;t<h;++t)i=f[t],g=g.concat(F$W.fitToUnsignedShortIndices(i));f=g}return f}function A$O(e,t,i,n){var r,o,a,s=n.length-1;if(s>=0){var l=n[s];r=l.offset+l.count,o=i[a=l.index].indices.length}else r=0,o=i[a=0].indices.length;for(var u=e.length,c=0;c<u;++c){var h=e[c][t];if(t$$(h)){var d=h.indices.length;r+d>o&&(r=0,o=i[++a].indices.length),n.push({index:a,offset:r,count:d}),r+=d}}}function Y$E(e,t){var i=[];return A$O(e,"geometry",t,i),A$O(e,"westHemisphereGeometry",t,i),A$O(e,"eastHemisphereGeometry",t,i),i}p$U.prototype.setBatchedAttribute=function(e,t,i){if(e<0||e>=this._numberOfInstances)throw new t$_("instanceIndex is out of range.");if(t<0||t>=this._attributes.length)throw new t$_("attributeIndex is out of range");if(!t$$(i))throw new t$_("value is required.");var n=this._attributes,r=C$K[n[t].componentsPerAttribute],o=this.getBatchedAttribute(e,t,r),a=I$O(this._attributes,t);if(!(t$$(a.equals)?a.equals(o,i):o===i)){var s=L$K;s.x=t$$(i.x)?i.x:i,s.y=t$$(i.y)?i.y:0,s.z=t$$(i.z)?i.z:0,s.w=t$$(i.w)?i.w:0;var l=this._offsets[t],u=4*this._stride*e+4*l;this._packFloats&&n[t].componentDatatype!==v$Z.UNSIGNED_BYTE?P$D(s,this._batchValues,u):a$10.pack(s,this._batchValues,u),this._batchValuesDirty=!0}},p$U.prototype.update=function(e){t$$(this._texture)&&!this._batchValuesDirty||0===this._attributes.length||(this._batchValuesDirty=!1,t$$(this._texture)||M$Q(this,e.context),R$E(this))},p$U.prototype.getUniformMapCallback=function(){var e=this;return function(t){if(0===e._attributes.length)return t;var i={};return""===e._suffix?s$1n(t,i={batchTexture:function(){return e._texture},batchTextureDimensions:function(){return e._textureDimensions},batchTextureStep:function(){return e._textureStep}}):(i["batchTexture"+e._suffix]=function(){return e._texture},i["batchTextureDimensions"+e._suffix]=function(){return e._textureDimensions},i["batchTextureStep"+e._suffix]=function(){return e._textureStep},s$1n(t,i))}},p$U.prototype.getVertexShaderCallback=function(){var e=this._attributes;if(0===e.length)return function(e){return e};var t="uniform highp sampler2D batchTexture{suffix}; \n";o$$.isPCBroswer()&&(t="uniform sampler2D batchTexture{suffix}; \n"),t+=j$L(this)+"\n";for(var i=e.length,n=0;n<i;++n)t+=W$Q(this,n);return t=t.replace(/\{suffix\}/g,this._suffix),function(e){var i=e.indexOf("void main"),n=e.substring(0,i),r=e.substring(i);return n+"\n"+t+"\n"+r}},p$U.prototype.isDestroyed=function(){return!1},p$U.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),s$1e(this)};var S$x={};function Z$L(e,t){var i=e.attributes;for(var n in i)if(i.hasOwnProperty(n)){var r=i[n];t$$(r)&&t$$(r.values)&&t.push(r.values.buffer)}t$$(e.indices)&&t.push(e.indices.buffer)}function _$H(e,t){for(var i=e.length,n=0;n<i;++n)Z$L(e[n],t)}function $$G(e){for(var t=1,i=e.length,n=0;n<i;n++){var r=e[n];if(++t,t$$(r)){var o=r.attributes;for(var a in t+=7+2*c$19.packedLength+(t$$(r.indices)?r.indices.length:0),o)if(o.hasOwnProperty(a)&&t$$(o[a])){t+=6+o[a].values.length}}}return t}function ee$u(e,t){var i=e.length,n=new Float64Array(1+19*i),r=0;n[r++]=i;for(var o=0;o<i;o++){var a=e[o];if(c$1a.pack(a.modelMatrix,n,r),r+=c$1a.packedLength,t$$(a.attributes)&&t$$(a.attributes.offset)){var s=a.attributes.offset.value;n[r]=s[0],n[r+1]=s[1],n[r+2]=s[2]}r+=3}return t.push(n.buffer),n}function re$x(e){for(var t=e,i=new Array(t[0]),n=0,r=1;r<t.length;){var o,a=c$1a.unpack(t,r);t$$(t[r+=c$1a.packedLength])&&(o={offset:new o$N(t[r],t[r+1],t[r+2])}),r+=3,i[n++]={modelMatrix:a,attributes:o}}return i}function H$J(e){var t=e.length,i=1+(c$19.packedLength+1)*t,n=new Float32Array(i),r=0;n[r++]=t;for(var o=0;o<t;++o){t$$(e[o])?(n[r++]=1,c$19.pack(e[o],n,r)):n[r++]=0,r+=c$19.packedLength}return n}function M$P(e){for(var t=new Array(e[0]),i=0,n=1;n<e.length;)1===e[n++]&&(t[i]=c$19.unpack(e,n)),++i,n+=c$19.packedLength;return t}S$x.combineGeometry=function(e){var t,i,n,r,o=e.instances,a=o.length,s=!1;a>0&&((t=X$v(e)).length>0&&(i=F$W.createAttributeLocations(t[0]),e.createPickOffsets&&(n=Y$E(o,t))),t$$(o[0].attributes)&&t$$(o[0].attributes.offset)&&(r=new Array(a),s=!0));for(var l=new Array(a),u=new Array(a),c=0;c<a;++c){var h=o[c],d=h.geometry;t$$(d)&&(l[c]=d.boundingSphere,u[c]=d.boundingSphereCV,s&&(r[c]=h.geometry.offsetAttribute));var f=h.eastHemisphereGeometry,p=h.westHemisphereGeometry;t$$(f)&&t$$(p)&&(t$$(f.boundingSphere)&&t$$(p.boundingSphere)&&(l[c]=c$19.union(f.boundingSphere,p.boundingSphere)),t$$(f.boundingSphereCV)&&t$$(p.boundingSphereCV)&&(u[c]=c$19.union(f.boundingSphereCV,p.boundingSphereCV)))}return{geometries:t,modelMatrix:e.modelMatrix,attributeLocations:i,pickOffsets:n,offsetInstanceExtend:r,boundingSpheres:l,boundingSpheresCV:u}},S$x.packCreateGeometryResults=function(e,t){var i=new Float64Array($$G(e)),n=[],r={},o=e.length,a=0;i[a++]=o;for(var s=0;s<o;s++){var l=e[s],u=t$$(l);if(i[a++]=u?1:0,u){i[a++]=l.primitiveType,i[a++]=l.geometryType,i[a++]=e$1Y(l.offsetAttribute,-1);var c=t$$(l.boundingSphere)?1:0;i[a++]=c,c&&c$19.pack(l.boundingSphere,i,a),a+=c$19.packedLength;var h=t$$(l.boundingSphereCV)?1:0;i[a++]=h,h&&c$19.pack(l.boundingSphereCV,i,a),a+=c$19.packedLength;var d=l.attributes,f=[];for(var p in d)d.hasOwnProperty(p)&&t$$(d[p])&&(f.push(p),t$$(r[p])||(r[p]=n.length,n.push(p)));i[a++]=f.length;for(var _=0;_<f.length;_++){var m=f[_],$=d[m];i[a++]=r[m],i[a++]=$.componentDatatype,i[a++]=$.componentsPerAttribute,i[a++]=$.normalize?1:0,i[a++]=$.isInstanceAttribute?1:0,i[a++]=$.values.length,i.set($.values,a),a+=$.values.length}var g=t$$(l.indices)?l.indices.length:0;i[a++]=g,g>0&&(i.set(l.indices,a),a+=g)}}return t.push(i.buffer),{stringTable:n,packedData:i}},S$x.unpackCreateGeometryResults=function(e){for(var t,i=e.stringTable,n=e.packedData,r=new Array(n[0]),o=0,a=1;a<n.length;){if(1===n[a++]){var s,l,u=n[a++],c=n[a++],h=n[a++];-1===h&&(h=void 0),1===n[a++]&&(s=c$19.unpack(n,a)),a+=c$19.packedLength,1===n[a++]&&(l=c$19.unpack(n,a)),a+=c$19.packedLength;var d,f,p,_,m=new t$W,$=n[a++];for(t=0;t<$;t++){var g=i[n[a++]],y=n[a++];p=n[a++];var v=0!==n[a++],x=0!==n[a++];d=n[a++],f=C$12.createTypedArray(y,d);for(var b=0;b<d;b++)f[b]=n[a++];m[g]=new r$Q({componentDatatype:y,componentsPerAttribute:p,normalize:v,values:f}),x&&(m[g].isInstanceAttribute=!0)}if((d=n[a++])>0){var S=f.length/p;for(_=fe$u.createTypedArray(S,d),t=0;t<d;t++)_[t]=n[a++]}r[o++]=new T$11({primitiveType:u,geometryType:c,boundingSphere:s,boundingSphereCV:l,indices:_,attributes:m,offsetAttribute:h})}else r[o++]=void 0}return r},S$x.packCombineGeometryParameters=function(e,t){for(var i=e.createGeometryResults,n=i.length,r=0;r<n;r++)t.push(i[r].packedData.buffer);return{createGeometryResults:e.createGeometryResults,packedInstances:ee$u(e.instances,t),ellipsoid:e.ellipsoid,isGeographic:e.projection instanceof s$1q,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e.createPickOffsets}},S$x.unpackCombineGeometryParameters=function(e){for(var t=re$x(e.packedInstances),i=e.createGeometryResults,n=i.length,r=0,o=0;o<n;o++)for(var a=S$x.unpackCreateGeometryResults(i[o]),s=a.length,l=0;l<s;l++){var u=a[l];t[r].geometry=u,++r}var c=n$1c.clone(e.ellipsoid);return{instances:t,ellipsoid:c,projection:e.isGeographic?new s$1q(c):new e$1H(c),elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:c$1a.clone(e.modelMatrix),createPickOffsets:e.createPickOffsets}},S$x.packCombineGeometryResults=function(e,t){t$$(e.geometries)&&_$H(e.geometries,t);var i=H$J(e.boundingSpheres),n=H$J(e.boundingSpheresCV);return t.push(i.buffer,n.buffer),{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:i,boundingSpheresCV:n}},S$x.unpackCombineGeometryResults=function(e){return{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:M$P(e.boundingSpheres),boundingSpheresCV:M$P(e.boundingSpheresCV)}};var E$K={READY:0,CREATING:1,CREATED:2,COMBINING:3,COMBINED:4,COMPLETE:5,FAILED:6},ce$n=Object.freeze(E$K),E$J={DISABLED:0,ENABLED:1,CAST_ONLY:2,RECEIVE_ONLY:3,NUMBER_OF_SHADOW_MODES:4,castShadows:function(e){return e===E$J.ENABLED||e===E$J.CAST_ONLY},receiveShadows:function(e){return e===E$J.ENABLED||e===E$J.RECEIVE_ONLY},fromCastReceive:function(e,t){return e&&t?E$J.ENABLED:e?E$J.CAST_ONLY:t?E$J.RECEIVE_ONLY:E$J.DISABLED}},q$Q=Object.freeze(E$J),E$I={NORMAL:0,REFLECT:1,DEPTH:2,NORMAL_AND_DEPTH:3,POSTEFFECT_FILTER:4,RASTER:5,CLAMP:6,PICKRECT:7,SQRESULT:8},B$y=Object.freeze(E$I),h$P=new r$T(1,1),l$L=!1,_$G=e$1z.WHITE;function i$M(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._definitionChanged=new o$15,this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._transparent=void 0,this._transparentSubscription=void 0,this._unique=!1,this.image=e.image,this.repeat=e.repeat,this.color=e.color,this.transparent=e.transparent,this._unique=e.unique}function p$T(e){if(e instanceof e$1z)return new t$F(e);if("string"==typeof e||e instanceof t$X||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof P$S){var t=new i$M;return t.image=e,t}throw new t$_("Unable to infer material type: "+e)}function c$K(e,t){return v$J(e,t,p$T)}Object.defineProperties(i$M.prototype,{isConstant:{get:function(){return r$w.isConstant(this._image)&&r$w.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},image:v$J("image"),repeat:v$J("repeat"),color:v$J("color"),transparent:v$J("transparent")}),i$M.prototype.getType=function(e){return"Image"},i$M.prototype.getValue=function(e,t){return t$$(t)||(t={}),t.image=r$w.getValueOrUndefined(this._image,e),t.repeat=r$w.getValueOrClonedDefault(this._repeat,e,h$P,t.repeat),t.color=r$w.getValueOrClonedDefault(this._color,e,_$G,t.color),r$w.getValueOrDefault(this._transparent,e,l$L)&&(t.color.alpha=Math.min(.99,t.color.alpha)),t},i$M.prototype.equals=function(e){return this===e||e instanceof i$M&&r$w.equals(this._image,e._image)&&r$w.equals(this._repeat,e._repeat)&&r$w.equals(this._color,e._color)&&r$w.equals(this._transparent,e._transparent)&&!this._unique&&!e._unique};var Z$K="void clipLineSegmentToNearPlane(\nvec3 p0,\nvec3 p1,\nout vec4 positionWC,\nout bool clipped,\nout bool culledByNearPlane,\nout vec4 clippedPositionEC)\n{\nculledByNearPlane = false;\nclipped = false;\nvec3 p0ToP1 = p1 - p0;\nfloat magnitude = length(p0ToP1);\nvec3 direction = normalize(p0ToP1);\nfloat endPoint0Distance = czm_currentFrustum.x + p0.z;\nfloat denominator = -direction.z;\nif (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)\n{\nculledByNearPlane = true;\n}\nelse if (endPoint0Distance > 0.0)\n{\nfloat t = endPoint0Distance / denominator;\nif (t < 0.0 || t > magnitude)\n{\nculledByNearPlane = true;\n}\nelse\n{\np0 = p0 + t * direction;\np0.z = min(p0.z, -czm_currentFrustum.x);\nclipped = true;\n}\n}\nclippedPositionEC = vec4(p0, 1.0);\npositionWC = czm_eyeToWindowCoordinates(clippedPositionEC);\n}\nvec4 getPolylineWindowCoordinatesEC(vec4 positionEC, vec4 prevEC, vec4 nextEC, float expandDirection, float width, bool usePrevious, out float angle)\n{\n#ifdef POLYLINE_DASH\nvec4 positionWindow = czm_eyeToWindowCoordinates(positionEC);\nvec4 previousWindow = czm_eyeToWindowCoordinates(prevEC);\nvec4 nextWindow = czm_eyeToWindowCoordinates(nextEC);\nvec2 lineDir;\nif (usePrevious) {\nlineDir = normalize(positionWindow.xy - previousWindow.xy);\n}\nelse {\nlineDir = normalize(nextWindow.xy - positionWindow.xy);\n}\nangle = atan(lineDir.x, lineDir.y) - 1.570796327;\nangle = floor(angle / czm_piOverFour + 0.5) * czm_piOverFour;\n#endif\nvec4 clippedPrevWC, clippedPrevEC;\nbool prevSegmentClipped, prevSegmentCulled;\nclipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, clippedPrevWC, prevSegmentClipped, prevSegmentCulled, clippedPrevEC);\nvec4 clippedNextWC, clippedNextEC;\nbool nextSegmentClipped, nextSegmentCulled;\nclipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, clippedNextWC, nextSegmentClipped, nextSegmentCulled, clippedNextEC);\nbool segmentClipped, segmentCulled;\nvec4 clippedPositionWC, clippedPositionEC;\nclipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, clippedPositionWC, segmentClipped, segmentCulled, clippedPositionEC);\nif (segmentCulled)\n{\nreturn vec4(0.0, 0.0, 0.0, 1.0);\n}\nvec2 directionToPrevWC = normalize(clippedPrevWC.xy - clippedPositionWC.xy);\nvec2 directionToNextWC = normalize(clippedNextWC.xy - clippedPositionWC.xy);\nif (prevSegmentCulled)\n{\ndirectionToPrevWC = -directionToNextWC;\n}\nelse if (nextSegmentCulled)\n{\ndirectionToNextWC = -directionToPrevWC;\n}\nvec2 thisSegmentForwardWC, otherSegmentForwardWC;\nif (usePrevious)\n{\nthisSegmentForwardWC = -directionToPrevWC;\notherSegmentForwardWC = directionToNextWC;\n}\nelse\n{\nthisSegmentForwardWC = directionToNextWC;\notherSegmentForwardWC = -directionToPrevWC;\n}\nvec2 thisSegmentLeftWC = vec2(-thisSegmentForwardWC.y, thisSegmentForwardWC.x);\nvec2 leftWC = thisSegmentLeftWC;\nfloat expandWidth = width * 0.5;\nif (!czm_equalsEpsilon(prevEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1) && !czm_equalsEpsilon(nextEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1))\n{\nvec2 otherSegmentLeftWC = vec2(-otherSegmentForwardWC.y, otherSegmentForwardWC.x);\nvec2 leftSumWC = thisSegmentLeftWC + otherSegmentLeftWC;\nfloat leftSumLength = length(leftSumWC);\nleftWC = leftSumLength < czm_epsilon6 ? thisSegmentLeftWC : (leftSumWC / leftSumLength);\nvec2 u = -thisSegmentForwardWC;\nvec2 v = leftWC;\nfloat sinAngle = abs(u.x * v.y - u.y * v.x);\nexpandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);\n}\nvec2 offset = leftWC * expandDirection * expandWidth * czm_pixelRatio;\nreturn vec4(clippedPositionWC.xy + offset, -clippedPositionWC.z, 1.0) * (czm_projection * clippedPositionEC).w;\n}\nvec4 getPolylineWindowCoordinates(vec4 position, vec4 previous, vec4 next, float expandDirection, float width, bool usePrevious, out float angle)\n{\nvec4 positionEC = czm_modelViewRelativeToEye * position;\nvec4 prevEC = czm_modelViewRelativeToEye * previous;\nvec4 nextEC = czm_modelViewRelativeToEye * next;\nreturn getPolylineWindowCoordinatesEC(positionEC, prevEC, nextEC, expandDirection, width, usePrevious, angle);\n}\n",h$O="#ifdef VECTOR_TILE\nuniform vec4 u_highlightColor;\n#endif\nvarying vec2 v_st;\nvarying float v_alpha;\n#ifdef TRAIL\nuniform float spotIntensity;\nvarying vec3 v_dist;\nvarying float v_SpotPercent;\n#endif\nvoid main()\n{\nczm_materialInput materialInput;\nvec2 st = v_st;\nst.t = czm_readNonPerspective(st.t, gl_FragCoord.w);\nmaterialInput.s = st.s;\nmaterialInput.st = st;\nmaterialInput.str = vec3(st, 0.0);\nczm_material material = czm_getMaterial(materialInput);\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#ifdef VECTOR_TILE\ngl_FragColor *= u_highlightColor;\n#endif\n#ifdef ENABLE_DYNAMIC\nfloat alpha = v_alpha;\nif(bAsy_4 != 1.0){\nalpha = 0.0;\n}\ngl_FragColor.a = pow(max(0.0, sin(3.14159 * (alpha + (1.0 - 2.0*v_time_3)))), 3.5);\n#endif\n#ifdef TRAIL\nfloat elapsedTime = trailTime_1 - startTime_7;\nfloat t = mod(elapsedTime, period_6) / period_6;\nfloat x = 0.0;\nfloat s1 = t * v_dist.y;\nfloat s2 = (t - trailLength_3) * v_dist.y;\nfloat trailLen = trailLength_3 * v_dist.y;\nif(t < trailLength_3 && v_dist.x > t * v_dist.y){\nx = v_dist.x - v_dist.y;\n}else{\nx = v_dist.x;\n}\nfloat percent = (x - s2) / trailLen;\nif(percent > 1.0 || percent < 0.0)\n{\ndiscard;\n}\nfloat fade = percent;\nif(percent > (1.0 - v_SpotPercent))\n{\ngl_FragColor.rgb *= spotIntensity_4;\n}\ngl_FragColor.a *= fade;\n#endif\n}\n",oe$t="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;\nvarying float v_alpha;\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\nfloat polylineAngle;\nvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, polylineAngle);\ngl_Position = czm_viewportOrthographic * positionWC * show;\nv_st.s = texCoord;\nv_st.t = czm_writeNonPerspective(clamp(expandDir, 0.0, 1.0), gl_Position.w);\nv_width = width;\nv_pickColor = pickColor;\nv_polylineAngle = polylineAngle;\nv_alpha = abs(texCoord);\n}\n";function o$G(e,t){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._show=e$1Y(e.show,!0),this._width=e$1Y(e.width,1),this._loop=e$1Y(e.loop,!1),this._distanceDisplayCondition=e.distanceDisplayCondition,this._material=e.material,t$$(this._material)||(this._material=r$v.fromType(r$v.ColorType,{color:new e$1z(1,1,1,1)}));var i,n=e.positions;t$$(n)||(n=[]),this._positions=n,this._actualPositions=u$11(n,a$11.equalsEpsilon),this._loop&&this._actualPositions.length>2&&(this._actualPositions===this._positions&&(this._actualPositions=n.slice()),this._actualPositions.push(a$11.clone(this._actualPositions[0]))),this._length=this._actualPositions.length,this._id=e.id,t$$(t)&&(i=c$1a.clone(t.modelMatrix)),this._modelMatrix=i,this._segments=v$V.wrapLongitude(this._actualPositions,i),this._actualLength=void 0,this._propertiesChanged=new Uint32Array(w$P),this._polylineCollection=t,this._dirty=!1,this._pickId=void 0,this._boundingVolume=c$19.fromPoints(this._actualPositions),this._boundingVolumeWC=c$19.transform(this._boundingVolume,this._modelMatrix),this._boundingVolume2D=new c$19}var I$N=o$G.POSITION_INDEX=0,C$J=o$G.SHOW_INDEX=1,v$H=o$G.WIDTH_INDEX=2,D$N=o$G.MATERIAL_INDEX=3,u$K=o$G.POSITION_SIZE_INDEX=4,E$H=o$G.DISTANCE_DISPLAY_CONDITION=5,w$P=o$G.NUMBER_OF_PROPERTIES=6;function e$14(e,t){++e._propertiesChanged[t];var i=e._polylineCollection;t$$(i)&&(i._updatePolyline(e,t),e._dirty=!0)}Object.defineProperties(o$G.prototype,{show:{get:function(){return this._show},set:function(e){if(!t$$(e))throw new t$_("value is required.");e!==this._show&&(this._show=e,e$14(this,C$J))}},positions:{get:function(){return this._positions},set:function(e){if(!t$$(e))throw new t$_("value is required.");var t=u$11(e,a$11.equalsEpsilon);this._loop&&t.length>2&&(t===e&&(t=e.slice()),t.push(a$11.clone(t[0]))),(this._actualPositions.length!==t.length||this._actualPositions.length!==this._length)&&e$14(this,u$K),this._positions=e,this._actualPositions=t,this._length=t.length,this._boundingVolume=c$19.fromPoints(this._actualPositions,this._boundingVolume),this._boundingVolumeWC=c$19.transform(this._boundingVolume,this._modelMatrix,this._boundingVolumeWC),e$14(this,I$N),this.update()}},material:{get:function(){return this._material},set:function(e){if(!t$$(e))throw new t$_("material is required.");this._material!==e&&(this._material=e,e$14(this,D$N))}},width:{get:function(){return this._width},set:function(e){if(!t$$(e))throw new t$_("value is required.");e!==this._width&&(this._width=e,e$14(this,v$H))}},loop:{get:function(){return this._loop},set:function(e){if(!t$$(e))throw new t$_("value is required.");if(e!==this._loop){var t=this._actualPositions;e?t.length>2&&!a$11.equals(t[0],t[t.length-1])&&(t.length===this._positions.length&&(this._actualPositions=t=this._positions.slice()),t.push(a$11.clone(t[0]))):t.length>2&&a$11.equals(t[0],t[t.length-1])&&(t.length-1===this._positions.length?this._actualPositions=this._positions:t.pop()),this._loop=e,e$14(this,u$K)}}},id:{get:function(){return this._id},set:function(e){this._id=e,t$$(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(t$$(e)&&e.far<=e.near)throw new t$_("far distance must be greater than near distance.");e$1w.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=e$1w.clone(e,this._distanceDisplayCondition),e$14(this,E$H))}}}),o$G.prototype.update=function(){var e=c$1a.IDENTITY;t$$(this._polylineCollection)&&(e=this._polylineCollection.modelMatrix);var t=this._segments.positions.length,i=this._segments.lengths,n=this._propertiesChanged[I$N]>0||this._propertiesChanged[u$K]>0;if((!c$1a.equals(e,this._modelMatrix)||n)&&(this._segments=v$V.wrapLongitude(this._actualPositions,e),this._boundingVolumeWC=c$19.transform(this._boundingVolume,e,this._boundingVolumeWC)),this._modelMatrix=c$1a.clone(e,this._modelMatrix),this._segments.positions.length!==t)e$14(this,u$K);else for(var r=i.length,o=0;o<r;++o)if(i[o]!==this._segments.lengths[o]){e$14(this,u$K);break}},o$G.prototype.getPickId=function(e){return t$$(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._polylineCollection,id:this._id})),this._pickId},o$G.prototype._clean=function(){this._dirty=!1;for(var e=this._propertiesChanged,t=0;t<w$P-1;++t)e[t]=0},o$G.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._material=this._material&&this._material.destroy(),this._polylineCollection=void 0};var e$13={OCCLUDED:0,OCCLUDED_TRANSLUCENT:1,NON_OCCLUDED:2},q$P=Object.freeze(e$13),re$w=o$G.SHOW_INDEX,se$q=o$G.WIDTH_INDEX,Tt$6=o$G.POSITION_INDEX,ae$u=o$G.MATERIAL_INDEX,Pt$5=o$G.POSITION_SIZE_INDEX,le$s=o$G.DISTANCE_DISPLAY_CONDITION,St$6=o$G.NUMBER_OF_PROPERTIES,L$J={texCoordExpandAndBatchIndex:0,position3DHigh:1,position3DLow:2,position2DHigh:3,position2DLow:4,prevPosition3DHigh:5,prevPosition3DLow:6,prevPosition2DHigh:7,prevPosition2DLow:8,nextPosition3DHigh:9,nextPosition3DLow:10,nextPosition2DHigh:11,nextPosition2DLow:12};function W$P(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this.modelMatrix=c$1a.clone(e$1Y(e.modelMatrix,c$1a.IDENTITY)),this._modelMatrix=c$1a.clone(c$1a.IDENTITY),this.debugShowBoundingVolume=e$1Y(e.debugShowBoundingVolume,!1),this._opaqueRS=e.opaqueRS,this._translucentRS=e.translucentRS,this._colorCommands=[],this._polylinesUpdated=!1,this._polylinesRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(St$6),this._polylines=[],this._polylineBuckets={},this._positionBufferUsage={bufferUsage:A$13.STATIC_DRAW,frameCount:0},this._mode=void 0,this._polylinesToUpdate=[],this._vertexArrays=[],this._positionBuffer=void 0,this._texCoordExpandAndBatchIndexBuffer=void 0,this._batchTable=void 0,this._createBatchTable=!1,this._useHighlightColor=!1,this._highlightColor=e$1z.clone(e$1z.WHITE);var t=this;this._uniformMap={u_highlightColor:function(){return t._highlightColor}},this._lineDisplayType=e.lineDisplayType,this._canAlwaysPick=!1}function pe$m(e,t){t$$(e._batchTable)&&e._batchTable.destroy();var i=[{functionName:"batchTable_getWidthAndShow",componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:2},{functionName:"batchTable_getPickColor",componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"batchTable_getCenterHigh",componentDatatype:C$12.FLOAT,componentsPerAttribute:3},{functionName:"batchTable_getCenterLowAndRadius",componentDatatype:C$12.FLOAT,componentsPerAttribute:4},{functionName:"batchTable_getDistanceDisplayCondition",componentDatatype:C$12.FLOAT,componentsPerAttribute:2}];e._batchTable=new p$U(t,i,e._polylines.length)}Object.defineProperties(W$P.prototype,{length:{get:function(){return vt$8(this),this._polylines.length}},lineDisplayType:{get:function(){return this._lineDisplayType},set:function(e){if(n$1e.typeOf.number.greaterThanOrEquals("PolylineCollection.lineDisplayType",e,0),n$1e.typeOf.number.lessThanOrEquals("PolylineCollection.lineDisplayType",e,2),this._lineDisplayType!==e){this._lineDisplayType=e;for(var t,i=this._polylines.length,n=0;n<i;n++){t=void 0;var r=this._polylines[n];if(t$$(r)){for(var o=n+1;o<i;o++){var a=this._polylines[o];if(t$$(a)&&a.id&&a.id===r._index+"-alpha"){t=a;break}}if(t$$(t)||this._lineDisplayType!==q$P.OCCLUDED_TRANSLUCENT)t$$(t)&&this._lineDisplayType!==q$P.OCCLUDED_TRANSLUCENT&&this.remove(t);else{var s={show:r.show,positions:r.positions,width:r.width,loop:r.loop,distanceDisplayCondition:r._distanceDisplayCondition},l=r$v.fromType(r$v.ColorType,{color:e$1z.clone(r.material.uniforms.color,new e$1z).withAlpha(.2)});l.uniforms.color.alpha=.2,s.material=l;var u=new o$G(s,this);u.material=l,u._index=this._polylines.length,u.id=r._index+"-alpha",this._polylines.push(u),this._createVertexArray=!0,this._createBatchTable=!0}}}this._lineDisplayType===q$P.OCCLUDED_TRANSLUCENT?(this._opaqueRS=p$1a.fromCache({depthMask:!0,depthTest:{enabled:!0}}),this._translucentRS=p$1a.fromCache({depthMask:!1,depthTest:{enabled:!1}})):this._lineDisplayType===q$P.NON_OCCLUDED?this._opaqueRS=p$1a.fromCache({depthMask:!1,depthTest:{enabled:!1}}):this._lineDisplayType===q$P.OCCLUDED&&(this._opaqueRS=p$1a.fromCache({depthMask:!0,depthTest:{enabled:!0}}))}}}}),W$P.prototype.add=function(e){var t=new o$G(e,this);if(t._index=this._polylines.length,this._polylines.push(t),this._lineDisplayType===q$P.OCCLUDED_TRANSLUCENT){this._opaqueRS=p$1a.fromCache({depthMask:!0,depthTest:{enabled:!0}}),this._translucentRS=p$1a.fromCache({depthMask:!1,depthTest:{enabled:!1}});var i=r$v.fromType(r$v.ColorType,{color:e$1z.clone(e.material.uniforms.color,new e$1z).withAlpha(.2)});i.uniforms.color.alpha=.2;var n=new o$G(e,this);n.material=i,n._index=this._polylines.length,n.id=t._index+"-alpha",this._polylines.push(n)}else this._lineDisplayType===q$P.NON_OCCLUDED?this._opaqueRS=p$1a.fromCache({depthMask:!1,depthTest:{enabled:!1}}):this._lineDisplayType===q$P.OCCLUDED&&(this._opaqueRS=p$1a.fromCache({depthMask:!0,depthTest:{enabled:!0}}));return this._createVertexArray=!0,this._createBatchTable=!0,t},W$P.prototype.remove=function(e){if(this.contains(e)){this._polylines[e._index]=void 0;var t=this._polylinesToUpdate.indexOf(e);if(-1!==t&&this._polylinesToUpdate.splice(t,1),this._polylinesRemoved=!0,this._createVertexArray=!0,this._createBatchTable=!0,t$$(e._bucket)){var i=e._bucket;i.shaderProgram=i.shaderProgram&&i.shaderProgram.destroy()}e._destroy();for(var n,r=0,o=this._polylines.length;r<o;r++){var a=this._polylines[r];a&&a.id&&a.id===e._index+"-alpha"&&(n=a)}if(t$$(n)){this._polylines[n._index]=void 0;var s=this._polylinesToUpdate.indexOf(e);-1!==s&&this._polylinesToUpdate.splice(s,1),n._destroy()}return!0}return!1},W$P.prototype.removeAll=function(){bt$9(this),Ut$6(this),this._polylineBuckets={},this._polylinesRemoved=!1,this._polylines.length=0,this._polylinesToUpdate.length=0,this._createVertexArray=!0},W$P.prototype.contains=function(e){return t$$(e)&&e._polylineCollection===this},W$P.prototype.get=function(e){if(!t$$(e))throw new t$_("index is required.");return vt$8(this),this._polylines[e]};var wt$5=new t$R,It$6=new a$10,Bt$7=new r$T;W$P.prototype.update=function(e){if(vt$8(this),0!==this._polylines.length){ce$m(this,e);var t,i=e.context,n=e.mapProjection,r=this._propertiesChanged;if(this._createBatchTable){if(0===e$1y.maximumVertexTextureImageUnits)throw new t$Z("Vertex texture fetch support is required to render polylines. The maximum number of vertex texture image units must be greater than zero.");pe$m(this,i),this._createBatchTable=!1}if(this._createVertexArray||ue$m(this))Ot$3(this,i,n);else if(this._polylinesUpdated){var o=this._polylinesToUpdate;if(this._mode!==b$1d.SCENE3D)for(var a=o.length,s=0;s<a;++s)(t=o[s]).update();if(r[Pt$5]||r[ae$u])Ot$3(this,i,n);else for(var l=o.length,u=this._polylineBuckets,c=0;c<l;++c){r=(t=o[c])._propertiesChanged;var h=t._bucket,d=0;for(var f in u)if(u.hasOwnProperty(f)){if(u[f]===h){r[Tt$6]&&h.writeUpdate(d,t,this._positionBuffer,n);break}d+=u[f].lengthOfPositions}if((r[re$w]||r[se$q])&&this._batchTable.setBatchedAttribute(t._index,0,new r$T(t._width,t._show)),this._batchTable.attributes.length>2){if(r[Tt$6]||r[Pt$5]){var p=e.mode===b$1d.SCENE2D?t._boundingVolume2D:t._boundingVolumeWC,_=t$R.fromCartesian(p.center,wt$5),m=a$10.fromElements(_.low.x,_.low.y,_.low.z,p.radius,It$6);this._batchTable.setBatchedAttribute(t._index,2,_.high),this._batchTable.setBatchedAttribute(t._index,3,m)}if(r[le$s]){var $=Bt$7;$.x=0,$.y=Number.MAX_VALUE;var g=t.distanceDisplayCondition;t$$(g)&&($.x=g.near,$.y=g.far),this._batchTable.setBatchedAttribute(t._index,4,$)}}t._clean()}o.length=0,this._polylinesUpdated=!1}r=this._propertiesChanged;for(var y=0;y<St$6;++y)r[y]=0;var v=c$1a.IDENTITY;e.mode===b$1d.SCENE3D&&(v=this.modelMatrix);var x=e.passes,b=0!==e.morphTime;if(t$$(this._opaqueRS)||(this._opaqueRS=p$1a.fromCache({depthMask:b,depthTest:{enabled:b}})),t$$(this._translucentRS)||(this._translucentRS=p$1a.fromCache({blending:Ee$s.ALPHA_BLEND,depthMask:!b,depthTest:{enabled:b}})),this._batchTable.update(e),x.render||x.pick)he$n(this,e,this._colorCommands,v)}};var ut$b=new c$19,Nt$5=new c$19;function he$n(e,t,i,n){for(var r=t.context,o=t.commandList,a=i.length,s=0,l=!0,u=e._vertexArrays,c=e.debugShowBoundingVolume,h=e._batchTable.getUniformMapCallback(),d=u.length,f=0;f<d;++f)for(var p=u[f],_=p.buckets,m=_.length,$=0;$<m;++$){for(var g,y,v,x,b=_[$],S=b.offset,w=b.bucket.shaderProgram,C=b.bucket.polylines,T=C.length,P=0,E=0;E<T;++E){var A,L=C[E],M=de$q(L._material);if(M!==g){if(t$$(g)&&P>0){var I=y.isTranslucent();s>=a?(v=new s$1d({owner:e}),i.push(v)):v=i[s],++s,x=s$1n(h(y._uniforms),e._uniformMap),v.boundingVolume=c$19.clone(ut$b,v.boundingVolume),v.modelMatrix=n,v.shaderProgram=w,v.vertexArray=p.va,v.renderState=I?e._translucentRS:e._opaqueRS,v.pass=y.isTranslucent()?we$l.TRANSLUCENT:we$l.OPAQUE,v.debugShowBoundingVolume=c,v.pickId="v_pickColor",v.uniformMap=x,v.count=P,v.offset=S,S+=P,P=0,l=!0,t.passes.pick&&e._canAlwaysPick&&(v.pass=we$l.OVERLAY_AGAINST_DEPTH),o.push(v)}(y=L._material).update(r),g=M}for(var O=L._locatorBuckets,D=O.length,R=0;R<D;++R){var N=O[R];N.locator===b&&(P+=N.count)}t.mode===b$1d.SCENE3D?A=L._boundingVolumeWC:t.mode===b$1d.COLUMBUS_VIEW?A=L._boundingVolume2D:t.mode===b$1d.SCENE2D?t$$(L._boundingVolume2D)&&((A=c$19.clone(L._boundingVolume2D,Nt$5)).center.x=0):t$$(L._boundingVolumeWC)&&t$$(L._boundingVolume2D)&&(A=c$19.union(L._boundingVolumeWC,L._boundingVolume2D,Nt$5)),l?(l=!1,c$19.clone(A,ut$b)):c$19.union(A,ut$b,ut$b)}t$$(g)&&P>0&&(s>=a?(v=new s$1d({owner:e}),i.push(v)):v=i[s],++s,x=s$1n(h(y._uniforms),e._uniformMap),v.boundingVolume=c$19.clone(ut$b,v.boundingVolume),v.modelMatrix=n,v.shaderProgram=w,v.vertexArray=p.va,v.renderState=y.isTranslucent()?e._translucentRS:e._opaqueRS,v.pass=y.isTranslucent()?we$l.TRANSLUCENT:we$l.OPAQUE,v.debugShowBoundingVolume=c,v.pickId="v_pickColor",v.uniformMap=x,v.count=P,v.offset=S,t.passes.pick&&e._canAlwaysPick&&(v.pass=we$l.OVERLAY_AGAINST_DEPTH),l=!0,o.push(v)),g=void 0}i.length=s}function ue$m(e){var t=!1,i=e._propertiesChanged,n=e._positionBufferUsage;return i[Tt$6]?(n.bufferUsage!==A$13.STREAM_DRAW&&(t=!0,n.bufferUsage=A$13.STREAM_DRAW),n.frameCount=100):n.bufferUsage!==A$13.STATIC_DRAW&&(0===n.frameCount?(t=!0,n.bufferUsage=A$13.STATIC_DRAW):n.frameCount--),t}W$P.prototype.isDestroyed=function(){return!1},W$P.prototype.destroy=function(){return Rt$7(this),bt$9(this),Ut$6(this),this._batchTable=this._batchTable&&this._batchTable.destroy(),s$1e(this)};var Lt$8=[0,0,0];function Ot$3(e,t,i){e._createVertexArray=!1,bt$9(e),Rt$7(e),fe$n(e);var n,r,o=[[]],a=o[0],s=e._batchTable,l=e._useHighlightColor,u=[0],c=0,h=[[]],d=0,f=e._polylineBuckets;for(n in f)f.hasOwnProperty(n)&&((r=f[n]).updateShader(t,s,l),d+=r.lengthOfPositions);if(d>0){var p,_=e._mode,m=new Float32Array(6*d*3),$=new Float32Array(4*d),g=0,y=0,v=0;for(n in f)if(f.hasOwnProperty(n)){(r=f[n]).write(m,$,g,y,v,s,t,i),_===b$1d.MORPHING&&(t$$(p)||(p=new Float32Array(6*d*3)),r.writeForMorph(p,g));var x=r.lengthOfPositions;g+=6*x*3,y+=4*x,v+=4*x,c=r.updateIndices(o,u,h,c)}var b,S=e._positionBufferUsage.bufferUsage,w=A$13.STATIC_DRAW;e._positionBuffer=u$Y.createVertexBuffer({context:t,typedArray:m,usage:S}),t$$(p)&&(b=u$Y.createVertexBuffer({context:t,typedArray:p,usage:S})),e._texCoordExpandAndBatchIndexBuffer=u$Y.createVertexBuffer({context:t,typedArray:$,usage:w});for(var C=3*Float32Array.BYTES_PER_ELEMENT,T=4*Float32Array.BYTES_PER_ELEMENT,P=0,E=o.length,A=0;A<E;++A)if((a=o[A]).length>0){var L=new Uint16Array(a),M=u$Y.createIndexBuffer({context:t,typedArray:L,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT});P+=u[A];var I,O,D,R,N=6*(A*(C*n$1d.SIXTY_FOUR_KILOBYTES)-P*C),F=C+N,B=C+F,z=C+B,G=C+z,k=C+G,U=A*(T*n$1d.SIXTY_FOUR_KILOBYTES)-P*T,V=[{index:L$J.position3DHigh,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:N,strideInBytes:6*C},{index:L$J.position3DLow,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:F,strideInBytes:6*C},{index:L$J.position2DHigh,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:N,strideInBytes:6*C},{index:L$J.position2DLow,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:F,strideInBytes:6*C},{index:L$J.prevPosition3DHigh,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:B,strideInBytes:6*C},{index:L$J.prevPosition3DLow,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:z,strideInBytes:6*C},{index:L$J.prevPosition2DHigh,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:B,strideInBytes:6*C},{index:L$J.prevPosition2DLow,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:z,strideInBytes:6*C},{index:L$J.nextPosition3DHigh,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:G,strideInBytes:6*C},{index:L$J.nextPosition3DLow,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:k,strideInBytes:6*C},{index:L$J.nextPosition2DHigh,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:G,strideInBytes:6*C},{index:L$J.nextPosition2DLow,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:k,strideInBytes:6*C},{index:L$J.texCoordExpandAndBatchIndex,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,vertexBuffer:e._texCoordExpandAndBatchIndexBuffer,offsetInBytes:U}];_===b$1d.SCENE3D?(I=e._positionBuffer,O="vertexBuffer",D=Lt$8,R="value"):_===b$1d.SCENE2D||_===b$1d.COLUMBUS_VIEW?(I=Lt$8,O="value",D=e._positionBuffer,R="vertexBuffer"):(I=b,O="vertexBuffer",D=e._positionBuffer,R="vertexBuffer"),V[0][O]=I,V[1][O]=I,V[2][R]=D,V[3][R]=D,V[4][O]=I,V[5][O]=I,V[6][R]=D,V[7][R]=D,V[8][O]=I,V[9][O]=I,V[10][R]=D,V[11][R]=D;var W=new x$18({context:t,attributes:V,indexBuffer:M});e._vertexArrays.push({va:W,buckets:h[A]})}}}function _e$k(e,t){return t instanceof P$S?t.id:t}var ct$e=[];function de$q(e){var t=r$v._uniformList[e.type],i=t.length;ct$e.length=2*i;for(var n=0,r=0;r<i;++r){var o=t[r];ct$e[n]=o,ct$e[n+1]=e._uniforms[o](),n+=2}return e.type+":"+JSON.stringify(ct$e,_e$k)}function fe$n(e){for(var t=e._mode,i=e._modelMatrix,n=e._polylineBuckets={},r=e._polylines,o=r.length,a=0;a<o;++a){var s=r[a];if(s._actualPositions.length>1){s.update();var l=s.material,u=n[l.type];t$$(u)||(u=n[l.type]=new Q$G(l,t,i)),u.addPolyline(s)}}}function ce$m(e,t){var i=t.mode;(e._mode!==i||!c$1a.equals(e._modelMatrix,e.modelMatrix))&&(e._mode=i,e._modelMatrix=c$1a.clone(e.modelMatrix),e._createVertexArray=!0)}function vt$8(e){if(e._polylinesRemoved){e._polylinesRemoved=!1;for(var t=[],i=e._polylines.length,n=0,r=0;n<i;++n){var o=e._polylines[n];t$$(o)&&(o._index=r++,t.push(o))}e._polylines=t}}function bt$9(e){for(var t=e._polylines,i=t.length,n=0;n<i;++n)if(t$$(t[n])){var r=t[n]._bucket;t$$(r)&&(r.shaderProgram=r.shaderProgram&&r.shaderProgram.destroy())}}function Rt$7(e){for(var t=e._vertexArrays.length,i=0;i<t;++i)e._vertexArrays[i].va.destroy();e._vertexArrays.length=0}function Ut$6(e){for(var t=e._polylines,i=t.length,n=0;n<i;++n)t$$(t[n])&&t[n]._destroy()}function xt$8(e,t,i){this.count=e,this.offset=t,this.bucket=i}function Q$G(e,t,i){this.polylines=[],this.lengthOfPositions=0,this.material=e,this.shaderProgram=void 0,this.mode=t,this.modelMatrix=i}function Vt$7(e){return a$11.dot(a$11.UNIT_X,e._boundingVolume.center)<0||e._boundingVolume.intersectPlane(n$17.ORIGIN_ZX_PLANE)===cr$4.INTERSECTING}W$P.prototype._updatePolyline=function(e,t){if("string"!=typeof e.id||"alpha"!==e.id.slice(-5)){if(this._polylinesUpdated=!0,e._dirty||this._polylinesToUpdate.push(e),this._lineDisplayType===q$P.OCCLUDED_TRANSLUCENT)for(var i=0;i<this._polylines.length;i++){var n=this._polylines[i];n.id&&n.id===e._index+"-alpha"&&(n._dirty||this._polylinesToUpdate.push(n),n.positions=e.positions,++this._propertiesChanged[t])}++this._propertiesChanged[t]}},Q$G.prototype.addPolyline=function(e){this.polylines.push(e),e._actualLength=this.getPolylinePositionsLength(e),this.lengthOfPositions+=e._actualLength,e._bucket=this},Q$G.prototype.updateShader=function(e,t,i){if(!t$$(this.shaderProgram)){var n=["DISTANCE_DISPLAY_CONDITION"];i&&n.push("VECTOR_TILE"),-1!==this.material.shaderSource.search(/varying\s+float\s+v_polylineAngle;/g)&&n.push("POLYLINE_DASH"),"PolylineDynamic"===this.material.type&&n.push("ENABLE_DYNAMIC"),o$$.isInternetExplorer()||n.push("CLIP_POLYLINE");var r=new a$O({defines:n,sources:["varying vec4 v_pickColor;\n",this.material.shaderSource,h$O]}),o=t.getVertexShaderCallback()(oe$t),a=new a$O({defines:n,sources:[Z$K,o]});this.shaderProgram=p$15.fromCache({context:e,vertexShaderSource:a,fragmentShaderSource:r,attributeLocations:L$J})}},Q$G.prototype.getPolylinePositionsLength=function(e){var t;if(this.mode===b$1d.SCENE3D||!Vt$7(e))return 4*(t=e._actualPositions.length)-4;var i=0,n=e._segments.lengths;t=n.length;for(var r=0;r<t;++r)i+=4*n[r]-4;return i};var P$C=new a$11,F$F=new a$11,H$I=new a$11,mt$b=new a$11,me$v=new a$10,ye$n=new r$T;Q$G.prototype.write=function(e,t,i,n,r,o,a,s){for(var l=this.mode,u=s.ellipsoid.maximumRadius*n$1d.PI,c=this.polylines,h=c.length,d=0;d<h;++d){for(var f,p=c[d],_=p.width,m=p.show&&_>0,$=p._index,g=this.getSegments(p,s),y=g.positions,v=g.lengths,x=y.length,b=p.getPickId(a).color,S=0,w=0,C=0;C<x;++C){0===C?p._loop?f=y[x-2]:(f=mt$b,a$11.subtract(y[0],y[1],f),a$11.add(y[0],f,f)):f=y[C-1],a$11.clone(f,F$F),a$11.clone(y[C],P$C),C===x-1?p._loop?f=y[1]:(f=mt$b,a$11.subtract(y[x-1],y[x-2],f),a$11.add(y[x-1],f,f)):f=y[C+1],a$11.clone(f,H$I);var T=v[S];C===w+T&&(w+=T,++S);var P=C-w==0,E=C===w+v[S]-1;l===b$1d.SCENE2D&&(F$F.z=0,P$C.z=0,H$I.z=0),(l===b$1d.SCENE2D||l===b$1d.MORPHING)&&(P||E)&&u-Math.abs(P$C.x)<1&&((P$C.x<0&&F$F.x>0||P$C.x>0&&F$F.x<0)&&a$11.clone(P$C,F$F),(P$C.x<0&&H$I.x>0||P$C.x>0&&H$I.x<0)&&a$11.clone(P$C,H$I));for(var A=E?2:4,L=P?2:0;L<A;++L){t$R.writeElements(P$C,e,i),t$R.writeElements(F$F,e,i+6),t$R.writeElements(H$I,e,i+12);var M=L-2<0?-1:1;t[r]=C/(x-1),t[r+1]=L%2*2-1,t[r+2]=M,t[r+3]=$,i+=18,r+=4}}var I=me$v;I.x=e$1z.floatToByte(b.red),I.y=e$1z.floatToByte(b.green),I.z=e$1z.floatToByte(b.blue),I.w=e$1z.floatToByte(b.alpha);var O=ye$n;O.x=_,O.y=m?1:0;var D=l===b$1d.SCENE2D?p._boundingVolume2D:p._boundingVolumeWC,R=t$R.fromCartesian(D.center,wt$5),N=R.high,F=a$10.fromElements(R.low.x,R.low.y,R.low.z,D.radius,It$6),B=Bt$7;B.x=0,B.y=Number.MAX_VALUE;var z=p.distanceDisplayCondition;t$$(z)&&(B.x=z.near,B.y=z.far),o.setBatchedAttribute($,0,O),o.setBatchedAttribute($,1,I),o.attributes.length>2&&(o.setBatchedAttribute($,2,N),o.setBatchedAttribute($,3,F),o.setBatchedAttribute($,4,B))}};var ge$j=new a$11,Te$o=new a$11,ve$n=new a$11,Mt$6=new a$11;Q$G.prototype.writeForMorph=function(e,t){for(var i=this.modelMatrix,n=this.polylines,r=n.length,o=0;o<r;++o)for(var a=n[o],s=a._segments.positions,l=a._segments.lengths,u=s.length,c=0,h=0,d=0;d<u;++d){var f;0===d?a._loop?f=s[u-2]:(f=Mt$6,a$11.subtract(s[0],s[1],f),a$11.add(s[0],f,f)):f=s[d-1],f=c$1a.multiplyByPoint(i,f,Te$o);var p,_=c$1a.multiplyByPoint(i,s[d],ge$j);d===u-1?a._loop?p=s[1]:(p=Mt$6,a$11.subtract(s[u-1],s[u-2],p),a$11.add(s[u-1],p,p)):p=s[d+1],p=c$1a.multiplyByPoint(i,p,ve$n);var m=l[c];d===h+m&&(h+=m,++c);for(var $=d-h==0,g=d===h+l[c]-1?2:4,y=$?2:0;y<g;++y)t$R.writeElements(_,e,t),t$R.writeElements(f,e,t+6),t$R.writeElements(p,e,t+12),t+=18}};var be$q=new Array(1);Q$G.prototype.updateIndices=function(e,t,i,n){var r=i.length-1,o=new xt$8(0,n,this);i[r].push(o);var a=0,s=e[e.length-1],l=0;s.length>0&&(l=s[s.length-1]+1);for(var u=this.polylines,c=u.length,h=0;h<c;++h){var d,f=u[h];if(f._locatorBuckets=[],this.mode===b$1d.SCENE3D){d=be$q;var p=f._actualPositions.length;if(!(p>0))continue;d[0]=p}else d=f._segments.lengths;var _=d.length;if(_>0){for(var m=0,$=0;$<_;++$)for(var g=d[$]-1,y=0;y<g;++y)l+4>n$1d.SIXTY_FOUR_KILOBYTES&&(f._locatorBuckets.push({locator:o,count:m}),m=0,t.push(4),s=[],e.push(s),l=0,o.count=a,a=0,n=0,o=new xt$8(0,0,this),i[++r]=[o]),s.push(l,l+2,l+1),s.push(l+1,l+2,l+3),m+=6,a+=6,n+=6,l+=4;f._locatorBuckets.push({locator:o,count:m}),l+4>n$1d.SIXTY_FOUR_KILOBYTES&&(t.push(0),s=[],e.push(s),l=0,o.count=a,n=0,a=0,o=new xt$8(0,0,this),i[++r]=[o])}f._clean()}return o.count=a,n},Q$G.prototype.getPolylineStartIndex=function(e){for(var t=this.polylines,i=0,n=t.length,r=0;r<n;++r){var o=t[r];if(o===e)break;i+=o._actualLength}return i};var pt$a={positions:void 0,lengths:void 0},kt$6=new Array(1),xe$u=new a$11,Ae$h=new i$1g,Ft$3;Q$G.prototype.getSegments=function(e,t){var i=e._actualPositions;if(this.mode===b$1d.SCENE3D)return kt$6[0]=i.length,pt$a.positions=i,pt$a.lengths=kt$6,pt$a;Vt$7(e)&&(i=e._segments.positions);for(var n,r=t.ellipsoid,o=[],a=this.modelMatrix,s=i.length,l=xe$u,u=0;u<s;++u)n=i[u],l=c$1a.multiplyByPoint(a,n,l),o.push(t.project(r.cartesianToCartographic(l,Ae$h)));if(o.length>0){e._boundingVolume2D=c$19.fromPoints(o,e._boundingVolume2D);var c=e._boundingVolume2D.center;e._boundingVolume2D.center=new a$11(c.z,c.x,c.y)}return pt$a.positions=o,pt$a.lengths=e._segments.lengths,pt$a},Q$G.prototype.writeUpdate=function(e,t,i,n){var r=this.mode,o=n.ellipsoid.maximumRadius*n$1d.PI,a=t._actualLength;if(a){e+=this.getPolylineStartIndex(t);var s=Ft$3,l=6*a*3;!t$$(s)||s.length<l?s=Ft$3=new Float32Array(l):s.length>l&&(s=new Float32Array(s.buffer,0,l));var u,c=this.getSegments(t,n),h=c.positions,d=c.lengths,f=0,p=0,_=0;a=h.length;for(var m=0;m<a;++m){0===m?t._loop?u=h[a-2]:(u=mt$b,a$11.subtract(h[0],h[1],u),a$11.add(h[0],u,u)):u=h[m-1],a$11.clone(u,F$F),a$11.clone(h[m],P$C),m===a-1?t._loop?u=h[1]:(u=mt$b,a$11.subtract(h[a-1],h[a-2],u),a$11.add(h[a-1],u,u)):u=h[m+1],a$11.clone(u,H$I);var $=d[p];m===_+$&&(_+=$,++p);var g=m-_==0,y=m===_+d[p]-1;r===b$1d.SCENE2D&&(F$F.z=0,P$C.z=0,H$I.z=0),(r===b$1d.SCENE2D||r===b$1d.MORPHING)&&(g||y)&&o-Math.abs(P$C.x)<1&&((P$C.x<0&&F$F.x>0||P$C.x>0&&F$F.x<0)&&a$11.clone(P$C,F$F),(P$C.x<0&&H$I.x>0||P$C.x>0&&H$I.x<0)&&a$11.clone(P$C,H$I));for(var v=y?2:4,x=g?2:0;x<v;++x)t$R.writeElements(P$C,s,f),t$R.writeElements(F$F,s,f+6),t$R.writeElements(H$I,s,f+12),f+=18}i.copyFromArrayView(s,18*Float32Array.BYTES_PER_ELEMENT*e)}};var j$K="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nvarying vec4 v_startPlaneNormalEcAndHalfWidth;\nvarying vec4 v_endPlaneNormalEcAndBatchId;\nvarying vec4 v_rightPlaneEC;\nvarying vec4 v_endEcAndStartEcX;\nvarying vec4 v_texcoordNormalizationAndStartEcYZ;\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif\nvoid main(void)\n{\nfloat logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_globeDepthTextureDim.xy)));\nvec3 ecStart = vec3(v_endEcAndStartEcX.w, v_texcoordNormalizationAndStartEcYZ.zw);\nif (logDepthOrDepth == 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\ngl_FragColor = vec4(1.0, 0.0, 0.0, 0.5);\nreturn;\n#else // DEBUG_SHOW_VOLUME\ndiscard;\n#endif // DEBUG_SHOW_VOLUME\n}\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\neyeCoordinate /= eyeCoordinate.w;\nfloat halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w * czm_metersPerPixel(eyeCoordinate);\nfloat widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);\nfloat distanceFromStart = czm_planeDistance(v_startPlaneNormalEcAndHalfWidth.xyz, -dot(ecStart, v_startPlaneNormalEcAndHalfWidth.xyz), eyeCoordinate.xyz);\nfloat distanceFromEnd = czm_planeDistance(v_endPlaneNormalEcAndBatchId.xyz, -dot(v_endEcAndStartEcX.xyz, v_endPlaneNormalEcAndBatchId.xyz), eyeCoordinate.xyz);\nif (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\ngl_FragColor = vec4(1.0, 0.0, 0.0, 0.5);\nreturn;\n#else // DEBUG_SHOW_VOLUME\ndiscard;\n#endif // DEBUG_SHOW_VOLUME\n}\nvec3 alignedPlaneNormal;\nalignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_startPlaneNormalEcAndHalfWidth.xyz);\nalignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\ndistanceFromStart = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, ecStart), eyeCoordinate.xyz);\nalignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_endPlaneNormalEcAndBatchId.xyz);\nalignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\ndistanceFromEnd = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, v_endEcAndStartEcX.xyz), eyeCoordinate.xyz);\n#ifdef PER_INSTANCE_COLOR\ngl_FragColor = czm_gammaCorrect(v_color);\n#else // PER_INSTANCE_COLOR\nfloat s = clamp(distanceFromStart / (distanceFromStart + distanceFromEnd), 0.0, 1.0);\ns = (s * v_texcoordNormalizationAndStartEcYZ.x) + v_texcoordNormalizationAndStartEcYZ.y;\nfloat t = (widthwiseDistance + halfMaxWidth) / (2.0 * halfMaxWidth);\nczm_materialInput materialInput;\nmaterialInput.s = s;\nmaterialInput.st = vec2(s, t);\nmaterialInput.str = vec3(s, t, 0.0);\nczm_material material = czm_getMaterial(materialInput);\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#endif // PER_INSTANCE_COLOR\nczm_writeDepthClampedToFarPlane();\n}\n",W$O="varying vec3 v_forwardDirectionEC;\nvarying vec3 v_texcoordNormalizationAndHalfWidth;\nvarying float v_batchId;\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#else\nvarying vec2 v_alignedPlaneDistances;\nvarying float v_texcoordT;\n#endif\nfloat rayPlaneDistanceUnsafe(vec3 origin, vec3 direction, vec3 planeNormal, float planeDistance) {\nreturn (-planeDistance - dot(planeNormal, origin)) / dot(planeNormal, direction);\n}\nvoid main(void)\n{\nvec4 eyeCoordinate = gl_FragCoord;\neyeCoordinate /= eyeCoordinate.w;\n#ifdef PER_INSTANCE_COLOR\ngl_FragColor = czm_gammaCorrect(v_color);\n#else // PER_INSTANCE_COLOR\nfloat distanceFromStart = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, -v_forwardDirectionEC, v_forwardDirectionEC.xyz, v_alignedPlaneDistances.x);\nfloat distanceFromEnd = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, v_forwardDirectionEC, -v_forwardDirectionEC.xyz, v_alignedPlaneDistances.y);\ndistanceFromStart = max(0.0, distanceFromStart);\ndistanceFromEnd = max(0.0, distanceFromEnd);\nfloat s = distanceFromStart / (distanceFromStart + distanceFromEnd);\ns = (s * v_texcoordNormalizationAndHalfWidth.x) + v_texcoordNormalizationAndHalfWidth.y;\nczm_materialInput materialInput;\nmaterialInput.s = s;\nmaterialInput.st = vec2(s, v_texcoordT);\nmaterialInput.str = vec3(s, v_texcoordT, 0.0);\nczm_material material = czm_getMaterial(materialInput);\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#endif // PER_INSTANCE_COLOR\n}\n",Q$F="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 * 0.5;\nv_width = width;\nv_texcoordNormalizationAndHalfWidth.z = halfWidth;\n#else\nfloat halfWidth = 0.5 * czm_batchTable_width(batchId);\nv_texcoordNormalizationAndHalfWidth.z = halfWidth;\n#endif\nvec4 positionEc3D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position3DHigh, position3DLow);\nfloat absStartPlaneDistance = abs(czm_planeDistance(startPlane3D, positionEc3D.xyz));\nfloat absEndPlaneDistance = abs(czm_planeDistance(endPlane3D, positionEc3D.xyz));\nvec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane3D.xyz, endPlane3D.xyz);\nvec3 upOrDown = normalize(cross(rightPlane3D.xyz, planeDirection));\nvec3 normalEC = normalize(cross(planeDirection, upOrDown));\nvec3 geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc3D));\ngeodeticSurfaceNormal *= float(0.0 <= rightNormalAndTextureCoordinateNormalizationY.w && rightNormalAndTextureCoordinateNormalizationY.w <= 1.0);\ngeodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;\npositionEc3D.xyz += geodeticSurfaceNormal;\nnormalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);\npositionEc3D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc3D)) * normalEC;\nvec4 positionEc2D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy);\nabsStartPlaneDistance = abs(czm_planeDistance(startPlane2D, positionEc2D.xyz));\nabsEndPlaneDistance = abs(czm_planeDistance(endPlane2D, positionEc2D.xyz));\nplaneDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane2D.xyz, endPlane2D.xyz);\nupOrDown = normalize(cross(rightPlane2D.xyz, planeDirection));\nnormalEC = normalize(cross(planeDirection, upOrDown));\ngeodeticSurfaceNormal = normalize(cross(normalEC, forwardEc2D));\ngeodeticSurfaceNormal *= float(0.0 <= texcoordNormalization2D.y && texcoordNormalization2D.y <= 1.0);\ngeodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;\npositionEc2D.xyz += geodeticSurfaceNormal;\nnormalEC *= sign(texcoordNormalization2D.x);\n#ifndef PER_INSTANCE_COLOR\nv_texcoordT = clamp(sign(texcoordNormalization2D.x), 0.0, 1.0);\n#endif\npositionEc2D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc2D)) * normalEC;\ngl_Position = czm_projection * mix(positionEc2D, positionEc3D, czm_morphTime);\n#ifdef ANGLE_VARYING\nvec2 approxLineDirection = normalize(vec2(v_forwardDirectionEC.x, -v_forwardDirectionEC.y));\napproxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);\nv_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);\n#endif\n}\n",Y$D="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\n#ifndef COLUMBUS_VIEW_2D\nattribute vec4 startHiAndForwardOffsetX;\nattribute vec4 startLoAndForwardOffsetY;\nattribute vec4 startNormalAndForwardOffsetZ;\nattribute vec4 endNormalAndTextureCoordinateNormalizationX;\nattribute vec4 rightNormalAndTextureCoordinateNormalizationY;\n#else\nattribute vec4 startHiLo2D;\nattribute vec4 offsetAndRight2D;\nattribute vec4 startEndNormals2D;\nattribute vec2 texcoordNormalization2D;\n#endif\nattribute float batchId;\nvarying vec4 v_startPlaneNormalEcAndHalfWidth;\nvarying vec4 v_endPlaneNormalEcAndBatchId;\nvarying vec4 v_rightPlaneEC;\nvarying vec4 v_endEcAndStartEcX;\nvarying vec4 v_texcoordNormalizationAndStartEcYZ;\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#endif\nvoid main()\n{\n#ifdef COLUMBUS_VIEW_2D\nvec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw))).xyz;\nvec3 forwardDirectionEC = czm_normal * vec3(0.0, offsetAndRight2D.xy);\nvec3 ecEnd = forwardDirectionEC + ecStart;\nforwardDirectionEC = normalize(forwardDirectionEC);\nv_rightPlaneEC.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);\nv_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);\nvec4 startPlaneEC;\nstartPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);\nstartPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);\nvec4 endPlaneEC;\nendPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);\nendPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);\nv_texcoordNormalizationAndStartEcYZ.x = abs(texcoordNormalization2D.x);\nv_texcoordNormalizationAndStartEcYZ.y = texcoordNormalization2D.y;\n#else // COLUMBUS_VIEW_2D\nvec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz)).xyz;\nvec3 offset = czm_normal * vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w);\nvec3 ecEnd = ecStart + offset;\nvec3 forwardDirectionEC = normalize(offset);\nvec4 startPlaneEC;\nstartPlaneEC.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;\nstartPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);\nvec4 endPlaneEC;\nendPlaneEC.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;\nendPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);\nv_rightPlaneEC.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;\nv_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);\nv_texcoordNormalizationAndStartEcYZ.x = abs(endNormalAndTextureCoordinateNormalizationX.w);\nv_texcoordNormalizationAndStartEcYZ.y = rightNormalAndTextureCoordinateNormalizationY.w;\n#endif // COLUMBUS_VIEW_2D\nv_endEcAndStartEcX.xyz = ecEnd;\nv_endEcAndStartEcX.w = ecStart.x;\nv_texcoordNormalizationAndStartEcYZ.zw = ecStart.yz;\n#ifdef PER_INSTANCE_COLOR\nv_color = czm_batchTable_color(batchId);\n#endif // PER_INSTANCE_COLOR\nvec4 positionRelativeToEye = czm_computePosition();\nvec4 positionEC = czm_modelViewRelativeToEye * positionRelativeToEye;\nfloat absStartPlaneDistance = abs(czm_planeDistance(startPlaneEC, positionEC.xyz));\nfloat absEndPlaneDistance = abs(czm_planeDistance(endPlaneEC, positionEC.xyz));\nvec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlaneEC.xyz, endPlaneEC.xyz);\nvec3 upOrDown = normalize(cross(v_rightPlaneEC.xyz, planeDirection));\nvec3 normalEC = normalize(cross(planeDirection, upOrDown));\nupOrDown = cross(forwardDirectionEC, normalEC);\nupOrDown = float(czm_sceneMode == czm_sceneMode3D) * upOrDown;\nupOrDown = float(v_texcoordNormalizationAndStartEcYZ.y > 1.0 || v_texcoordNormalizationAndStartEcYZ.y < 0.0) * upOrDown;\nupOrDown = min(GLOBE_MINIMUM_ALTITUDE, czm_geometricToleranceOverMeter * length(positionRelativeToEye.xyz)) * upOrDown;\npositionEC.xyz += upOrDown;\nv_texcoordNormalizationAndStartEcYZ.y = czm_branchFreeTernary(v_texcoordNormalizationAndStartEcYZ.y > 1.0, 0.0, abs(v_texcoordNormalizationAndStartEcYZ.y));\nfloat width = czm_batchTable_width(batchId);\n#ifdef WIDTH_VARYING\nv_width = width;\n#endif\nv_startPlaneNormalEcAndHalfWidth.xyz = startPlaneEC.xyz;\nv_startPlaneNormalEcAndHalfWidth.w = width * 0.5;\nv_endPlaneNormalEcAndBatchId.xyz = endPlaneEC.xyz;\nv_endPlaneNormalEcAndBatchId.w = batchId;\nwidth = width * max(0.0, czm_metersPerPixel(positionEC));\nwidth = width / dot(normalEC, v_rightPlaneEC.xyz);\n#ifdef COLUMBUS_VIEW_2D\nnormalEC *= sign(texcoordNormalization2D.x);\n#else\nnormalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);\n#endif\npositionEC.xyz += width * normalEC;\ngl_Position = czm_depthClampFarPlane(czm_projection * positionEC);\n#ifdef ANGLE_VARYING\nvec2 approxLineDirection = normalize(vec2(forwardDirectionEC.x, -forwardDirectionEC.y));\napproxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);\nv_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);\n#endif\n}\n",m$E="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 prevPosition3DHigh;\nattribute vec3 prevPosition3DLow;\nattribute vec3 nextPosition3DHigh;\nattribute vec3 nextPosition3DLow;\nattribute vec2 expandAndWidth;\nattribute vec4 color;\nattribute float batchId;\nvarying vec4 v_color;\nvoid main()\n{\nfloat expandDir = expandAndWidth.x;\nfloat width = abs(expandAndWidth.y) + 0.5;\nbool usePrev = expandAndWidth.y < 0.0;\nvec4 p = czm_computePosition();\nvec4 prev = czm_computePrevPosition();\nvec4 next = czm_computeNextPosition();\nfloat angle;\nvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);\ngl_Position = czm_viewportOrthographic * positionWC;\nv_color = color;\n}\n",n$L=Z$K+"\n"+m$E,s$T=d$I;function e$12(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT);var t=e$1Y(e.translucent,!0),i=e$12.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=e$1Y(e.vertexShaderSource,n$L),this._fragmentShaderSource=e$1Y(e.fragmentShaderSource,s$T),this._renderState=n$M.getDefaultRenderState(t,false,e.renderState),this._closed=false,this._vertexFormat=i}o$$.isInternetExplorer()||(n$L="#define CLIP_POLYLINE \n"+n$L),Object.defineProperties(e$12.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}}}),e$12.VERTEX_FORMAT=n$12.POSITION_ONLY,e$12.prototype.getFragmentShaderSource=n$M.prototype.getFragmentShaderSource,e$12.prototype.isTranslucent=n$M.prototype.isTranslucent,e$12.prototype.getRenderState=n$M.prototype.getRenderState;var f$K="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 prevPosition3DHigh;\nattribute vec3 prevPosition3DLow;\nattribute vec3 nextPosition3DHigh;\nattribute vec3 nextPosition3DLow;\nattribute vec2 expandAndWidth;\nattribute vec2 st;\nattribute float batchId;\n#ifdef TRAIL\nuniform float spotSize_2;\nattribute vec3 dist;\nvarying vec3 v_dist;\nvarying float v_SpotPercent;\n#endif\nvarying float v_width;\nvarying vec2 v_st;\nvarying float v_polylineAngle;\nvarying float v_alpha;\nvoid main()\n{\nfloat u = abs(expandAndWidth.x);\nfloat expandDir = expandAndWidth.x;\nfloat width = abs(expandAndWidth.y) + 0.5;\nbool usePrev = expandAndWidth.y < 0.0;\nvec4 p = czm_computePosition();\nvec4 prev = czm_computePrevPosition();\nvec4 next = czm_computeNextPosition();\nfloat angle;\nvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);\ngl_Position = czm_viewportOrthographic * positionWC;\nv_width = width;\nv_st.s = st.s;\nv_st.t = czm_writeNonPerspective(st.t, gl_Position.w);\nv_polylineAngle = angle;\nv_alpha = u;\n#ifdef TRAIL\nfloat t = 0.0;\nv_dist = dist;\nv_SpotPercent = spotSize_2 / dist.y;\n#endif\n}\n",i$L=Z$K+"\n"+f$K,c$J=h$O;function t$E(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT);var t=e$1Y(e.translucent,!0),i=t$E.VERTEX_FORMAT;this.material=t$$(e.material)?e.material:r$v.fromType(r$v.ColorType),this.translucent=t,this._vertexShaderSource=e$1Y(e.vertexShaderSource,i$L),this._fragmentShaderSource=e$1Y(e.fragmentShaderSource,c$J),this._renderState=n$M.getDefaultRenderState(t,false,e.renderState),this._closed=false,this._vertexFormat=i}o$$.isInternetExplorer()||(i$L="#define CLIP_POLYLINE \n"+i$L),Object.defineProperties(t$E.prototype,{vertexShaderSource:{get:function(){var e=this._vertexShaderSource;return-1!==this.material.shaderSource.search(/varying\s+float\s+v_polylineAngle;/g)&&(e="#define POLYLINE_DASH\n"+e),"PolylineDynamic"==this.material.type&&(e="#define ENABLE_DYNAMIC\n"+e),"PolylineTrail"==this.material.type&&(e="#define TRAIL\n"+e),e}},fragmentShaderSource:{get:function(){var e=this._fragmentShaderSource;return"PolylineDynamic"==this.material.type&&(e="#define ENABLE_DYNAMIC\n"+e),"PolylineTrail"==this.material.type&&(e="#define TRAIL\n"+e),e}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}}}),t$E.VERTEX_FORMAT=n$12.POSITION_AND_ST,t$E.prototype.getFragmentShaderSource=n$M.prototype.getFragmentShaderSource,t$E.prototype.isTranslucent=n$M.prototype.isTranslucent,t$E.prototype.getRenderState=n$M.prototype.getRenderState;var A$N={NEVER:de$x.NEVER,LESS:de$x.LESS,EQUAL:de$x.EQUAL,LESS_OR_EQUAL:de$x.LEQUAL,GREATER:de$x.GREATER,NOT_EQUAL:de$x.NOTEQUAL,GREATER_OR_EQUAL:de$x.GEQUAL,ALWAYS:de$x.ALWAYS},h$N=Object.freeze(A$N),R$D={ZERO:de$x.ZERO,KEEP:de$x.KEEP,REPLACE:de$x.REPLACE,INCREMENT:de$x.INCR,DECREMENT:de$x.DECR,INVERT:de$x.INVERT,INCREMENT_WRAP:de$x.INCR_WRAP,DECREMENT_WRAP:de$x.DECR_WRAP},o$F=Object.freeze(R$D),e$11={CESIUM_3D_TILE_MASK:128,S3M_TILE:2,MODEL:6,SKIP_LOD_MASK:112,SKIP_LOD_BIT_SHIFT:4,CLASSIFICATION_MASK:15,setCesium3DTileBit:function(){return{enabled:!0,frontFunction:h$N.ALWAYS,frontOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.REPLACE},backFunction:h$N.ALWAYS,backOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.REPLACE},reference:e$11.CESIUM_3D_TILE_MASK,mask:e$11.CESIUM_3D_TILE_MASK}}},Ia$1=Object.freeze(e$11);function C$I(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this.geometryInstances=e.geometryInstances,this._hasPerInstanceColors=!0;var t=e.appearance;t$$(t)||(t=new t$E),this.appearance=t,this.show=e$1Y(e.show,!0),this.classificationType=e$1Y(e.classificationType,_0x29401c.BOTH),this.debugShowBoundingVolume=e$1Y(e.debugShowBoundingVolume,!1),this._debugShowShadowVolume=e$1Y(e.debugShowShadowVolume,!1),this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:!1,interleave:e$1Y(e.interleave,!1),releaseGeometryInstances:e$1Y(e.releaseGeometryInstances,!0),allowPicking:e$1Y(e.allowPicking,!0),asynchronous:e$1Y(e.asynchronous,!0),compressVertices:!1,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0},this._zIndex=void 0,this._ready=!1,this._readyPromise=c$18.defer(),this._primitive=void 0,this._sp=void 0,this._sp2D=void 0,this._spMorph=void 0,this._renderState=N$J(0),this._renderState3DTiles=N$J(1),this._renderStateS3M=N$J(2),this._renderStateMorph=p$1a.fromCache({cull:{enabled:!0,face:k$F.FRONT},depthTest:{enabled:!0},blending:Ee$s.ALPHA_BLEND,depthMask:!1})}function Z$J(e,t,i){var n=t.context,r=e._primitive,o=r._attributeLocations,a=r._batchTable.getVertexShaderCallback()(Y$D);a=y$H._appendShowToShader(r,a),a=y$H._appendDistanceDisplayConditionToShader(r,a),a=y$H._modifyShaderPosition(e,a,t.scene3DOnly);var s=r._batchTable.getVertexShaderCallback()(Q$F);s=y$H._appendShowToShader(r,s),s=y$H._appendDistanceDisplayConditionToShader(r,s),s=y$H._modifyShaderPosition(e,s,t.scene3DOnly);var l=r._batchTable.getVertexShaderCallback()(j$K),u=["GLOBE_MINIMUM_ALTITUDE "+t.mapProjection.ellipsoid.minimumRadius.toFixed(1)],c="",h="";t$$(i.material)?(-1!==(h=t$$(i.material)?i.material.shaderSource:"").search(/varying\s+float\s+v_polylineAngle;/g)&&u.push("ANGLE_VARYING"),-1!==h.search(/varying\s+float\s+v_width;/g)&&u.push("WIDTH_VARYING")):c="PER_INSTANCE_COLOR",u.push(c);var d=e.debugShowShadowVolume?["DEBUG_SHOW_VOLUME",c]:[c],f=new a$O({defines:u,sources:[a]}),p=new a$O({defines:d,sources:[h,l]});e._sp=p$15.replaceCache({context:n,shaderProgram:r._sp,vertexShaderSource:f,fragmentShaderSource:p,attributeLocations:o});var _=n.shaderCache.getDerivedShaderProgram(e._sp,"2dColor");if(!t$$(_)){var m=new a$O({defines:u.concat(["COLUMBUS_VIEW_2D"]),sources:[a]});_=n.shaderCache.createDerivedShaderProgram(e._sp,"2dColor",{context:n,shaderProgram:e._sp2D,vertexShaderSource:m,fragmentShaderSource:p,attributeLocations:o})}e._sp2D=_;var $=n.shaderCache.getDerivedShaderProgram(e._sp,"MorphColor");if(!t$$($)){var g=new a$O({defines:u.concat(["MAX_TERRAIN_HEIGHT "+e$1P._defaultMaxTerrainHeight.toFixed(1)]),sources:[s]}),y=new a$O({defines:d,sources:[h,l=r._batchTable.getVertexShaderCallback()(W$O)]});$=n.shaderCache.createDerivedShaderProgram(e._sp,"MorphColor",{context:n,shaderProgram:e._spMorph,vertexShaderSource:g,fragmentShaderSource:y,attributeLocations:o})}e._spMorph=$}function N$J(e){return p$1a.fromCache({cull:{enabled:!0},blending:Ee$s.ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e>0,frontFunction:h$N.EQUAL,frontOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.KEEP},backFunction:h$N.EQUAL,backOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.KEEP},reference:2===e?Ia$1.S3M_TILE:Ia$1.CESIUM_3D_TILE_MASK,mask:Ia$1.CLASSIFICATION_MASK}})}function $$F(e,t,i,n,r,o){var a=e._primitive,s=a._va.length;r.length=s,o.length=s;for(var l=t instanceof e$12?{}:i._uniforms,u=a._batchTable.getUniformMapCallback()(l),c=0;c<s;c++){var h=a._va[c],d=r[c];t$$(d)||(d=r[c]=new s$1d({owner:e,primitiveType:a._primitiveType})),d.vertexArray=h,d.renderState=e._renderState,d.shaderProgram=e._sp,d.uniformMap=u,d.pass=we$l.TERRAIN_CLASSIFICATION,d.pickId="czm_batchTable_pickColor(v_endPlaneNormalEcAndBatchId.w)";var f=s$1d.shallowClone(d,d.derivedCommands.tileset);f.renderState=e._renderState3DTiles,f.pass=we$l.CESIUM_3D_TILE_CLASSIFICATION,d.derivedCommands.tileset=f;var p=s$1d.shallowClone(d,d.derivedCommands.S3M);p.renderState=e._renderStateS3M,p.pass=we$l.ClampObject,d.derivedCommands.S3M=p;var _=s$1d.shallowClone(d,d.derivedCommands.color2D);_.shaderProgram=e._sp2D,d.derivedCommands.color2D=_;var m=s$1d.shallowClone(f,f.derivedCommands.color2D);m.shaderProgram=e._sp2D,f.derivedCommands.color2D=m;var $=s$1d.shallowClone(p,p.derivedCommands.color2D);$.shaderProgram=e._sp2D,p.derivedCommands.color2D=$;var g=s$1d.shallowClone(d,d.derivedCommands.colorMorph);g.renderState=e._renderStateMorph,g.shaderProgram=e._spMorph,g.pickId="czm_batchTable_pickColor(v_batchId)",d.derivedCommands.colorMorph=g}}function V$A(e,t,i,n,r,o,a){i.mode===b$1d.MORPHING?t=t.derivedCommands.colorMorph:i.mode!==b$1d.SCENE3D&&(t=t.derivedCommands.color2D),t&&(t.modelMatrix=n,t.boundingVolume=o,t.cull=r,t.debugShowBoundingVolume=a,i.commandList.push(t))}function ee$t(e,t,i,n,r,o,a){var s,l=e._primitive;y$H._updateBoundingVolumes(l,t,r),t.mode===b$1d.SCENE3D?s=l._boundingSphereWC:t.mode===b$1d.COLUMBUS_VIEW?s=l._boundingSphereCV:t.mode===b$1d.SCENE2D&&t$$(l._boundingSphere2D)?s=l._boundingSphere2D:t$$(l._boundingSphereMorph)&&(s=l._boundingSphereMorph);var u=t.mode===b$1d.MORPHING,c=e.classificationType,h=c===_0x29401c.TERRAIN,d=c===_0x29401c.S3M_TILE,f=c===_0x29401c.CESIUM_3D_TILE&&!u;c===_0x29401c.BOTH&&(h=!0,d=!0,f=!0);var p=t.passes;if(p.render||p.pick&&l.allowPicking)for(var _=i.length,m=0;m<_;++m){var $=s[m];h&&V$A(e,i[m],t,r,o,$,a),f&&V$A(e,i[m].derivedCommands.tileset,t,r,o,$,a),d&&V$A(e,i[m].derivedCommands.S3M,t,r,o,$,a)}}function n$K(e,t){this._callback=void 0,this._isConstant=void 0,this._definitionChanged=new o$15,this.setCallback(e,t)}function q$O(e){return Array.isArray(e)&&(e=new t$K(e)),new i$O(e)}function u$J(e){this._show=void 0,this._showSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._hierarchy=void 0,this._hierarchySubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._perPositionHeight=void 0,this._perPositionHeightSubscription=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._fill=void 0,this._fillSubscription=void 0,this._closeTop=void 0,this._closeTopSubscription=void 0,this._closeBottom=void 0,this._closeBottomSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._arcType=void 0,this._arcTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this._definitionChanged=new o$15,this._fromDataSource=!1,this.groundBottomAltitude=void 0,this.groundExtrudedHeight=void 0,this.merge(e$1Y(e,e$1Y.EMPTY_OBJECT))}function Y$C(){this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}Object.defineProperties(C$I.prototype,{interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},debugShowShadowVolume:{get:function(){return this._debugShowShadowVolume}}}),C$I.initializeTerrainHeights=function(){return e$1P.initialize()},C$I.prototype.update=function(e){if(t$$(this._primitive)||t$$(this.geometryInstances)){if(!e$1P.initialized){if(!this.asynchronous)throw new t$_("For synchronous GroundPolylinePrimitives, you must call GroundPolylinePrimitives.initializeTerrainHeights() and wait for the returned promise to resolve.");return void C$I.initializeTerrainHeights()}var t,i=this,n=this._primitiveOptions;if(!t$$(this._primitive)){var r,o=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],a=o.length,s=new Array(a);for(t=0;t<a;++t)if(!t$$(r=o[t].attributes)||!t$$(r.color)){this._hasPerInstanceColors=!1;break}for(t=0;t<a;++t){var l=o[t];r={};var u=l.attributes;for(var c in u)u.hasOwnProperty(c)&&(r[c]=u[c]);t$$(r.width)||(r.width=new r$G({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,value:[l.geometry.width]})),l.geometry._scene3DOnly=e.scene3DOnly,ee$x.setProjectionAndEllipsoid(l.geometry,e.mapProjection),s[t]=new m$P({geometry:l.geometry,attributes:r,id:l.id,pickPrimitive:i})}n.geometryInstances=s,n.appearance=this.appearance,n._createShaderProgramFunction=function(e,t,n){Z$J(i,t,n)},n._createCommandsFunction=function(e,t,n,r,o,a,s){$$F(i,t,n,r,a,s)},n._updateAndQueueCommandsFunction=function(e,t,n,r,o,a,s,l){ee$t(i,t,n,r,o,a,s)},this._primitive=new y$H(n),this._primitive.readyPromise.then((function(e){i._ready=!0,i.releaseGeometryInstances&&(i.geometryInstances=void 0);var t=e._error;t$$(t)?i._readyPromise.reject(t):i._readyPromise.resolve(i)}))}if(this.appearance instanceof e$12&&!this._hasPerInstanceColors)throw new t$_("All GeometryInstances must have color attributes to use PolylineColorAppearance with GroundPolylinePrimitive.");this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e)}},C$I.prototype.getGeometryInstanceAttributes=function(e){if(!t$$(this._primitive))throw new t$_("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},C$I.isSupported=function(e){return e.frameState.context.depthTexture},C$I.prototype.isDestroyed=function(){return!1},C$I.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._sp2D=void 0,this._spMorph=void 0,s$1e(this)},Object.defineProperties(n$K.prototype,{isConstant:{get:function(){return this._isConstant}},definitionChanged:{get:function(){return this._definitionChanged}}}),n$K.prototype.getValue=function(e,t){return this._callback(e,t)},n$K.prototype.setCallback=function(e,t){if(!t$$(e))throw new t$_("callback is required.");if(!t$$(t))throw new t$_("isConstant is required.");var i=this._callback!==e||this._isConstant!==t;this._callback=e,this._isConstant=t,i&&this._definitionChanged.raiseEvent(this)},n$K.prototype.equals=function(e){return this===e||e instanceof n$K&&this._callback===e._callback&&this._isConstant===e._isConstant},Object.defineProperties(u$J.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:v$J("show"),material:c$K("material"),hierarchy:v$J("hierarchy",void 0,q$O),height:v$J("height"),heightReference:v$J("heightReference"),extrudedHeight:v$J("extrudedHeight"),extrudedHeightReference:v$J("extrudedHeightReference"),granularity:v$J("granularity"),stRotation:v$J("stRotation"),fill:v$J("fill"),outline:v$J("outline"),outlineColor:v$J("outlineColor"),outlineWidth:v$J("outlineWidth"),perPositionHeight:v$J("perPositionHeight"),closeTop:v$J("closeTop"),closeBottom:v$J("closeBottom"),shadows:v$J("shadows"),distanceDisplayCondition:v$J("distanceDisplayCondition"),classificationType:v$J("classificationType"),arcType:v$J("arcType"),zIndex:v$J("zIndex"),groundBottomAltitude:v$J("groundBottomAltitude"),groundExtrudedHeight:v$J("groundExtrudedHeight")}),u$J.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.arcType=this.arcType,e.zIndex=this.zIndex,e):new u$J(this)},u$J.prototype.merge=function(e){if(!t$$(e))throw new t$_("source is required.");this.show=e$1Y(this.show,e.show),this.material=e$1Y(this.material,e.material),this.hierarchy=e$1Y(this.hierarchy,e.hierarchy),this.height=e$1Y(this.height,e.height),this.heightReference=e$1Y(this.heightReference,e.heightReference),this.extrudedHeight=e$1Y(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=e$1Y(this.extrudedHeightReference,e.extrudedHeightReference),this.granularity=e$1Y(this.granularity,e.granularity),this.stRotation=e$1Y(this.stRotation,e.stRotation),this.fill=e$1Y(this.fill,e.fill),this.outline=e$1Y(this.outline,e.outline),this.outlineColor=e$1Y(this.outlineColor,e.outlineColor),this.outlineWidth=e$1Y(this.outlineWidth,e.outlineWidth),this.perPositionHeight=e$1Y(this.perPositionHeight,e.perPositionHeight),this.closeTop=e$1Y(this.closeTop,e.closeTop),this.closeBottom=e$1Y(this.closeBottom,e.closeBottom),this.shadows=e$1Y(this.shadows,e.shadows),this.distanceDisplayCondition=e$1Y(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=e$1Y(this.classificationType,e.classificationType),this.arcType=e$1Y(this.arcType,e.arcType),this.zIndex=e$1Y(this.zIndex,e.zIndex),this.groundBottomAltitude=e$1Y(this.groundBottomAltitude,e.groundBottomAltitude),this.groundExtrudedHeight=e$1Y(this.groundExtrudedHeight,e.groundExtrudedHeight)},u$J.processWideOutline=function(e,t){for(var i=0;i<t.length;i++){var n=t[i],r=n._polygon;if(r instanceof u$J){if(n.show&&t$$(r._outline)&&r._outline._value&&r._outlineWidth>1&&!t$$(r.outlines)){var o,a={width:r._outlineWidth._value,material:void 0,positions:[],loop:!0,distanceDisplayCondition:new e$1w(0,5e4)};if(r.definitionChanged.addEventListener((function(e,t,i,n){t$$(r.outlines)&&r.outlines.removeAll(),r.outlines=void 0})),r.outlines=e.primitives.add(new W$P),o=t$$(r._hierarchy._value)?Array.isArray(r._hierarchy._value)?r._hierarchy._value:r._hierarchy._value.positions:r._hierarchy instanceof n$K?r._hierarchy.getValue(e.frameState.time).positions:r._hierarchy.polygon._positions._value,!r.perPositionHeight||r._height>0)for(var s=0;s<o.length;s++){(h=i$1g.fromCartesian(o[s])).height=t$$(r._height)?r._height._value:0,o[s]=i$1g.toCartesian(h)}if(Math.abs(r._extrudedHeight)>0){var l=[];for(s=0;s<o.length;s++){(h=i$1g.fromCartesian(o[s])).height=r._extrudedHeight._value;var u=i$1g.toCartesian(h);l.push(u),r.outlines.add(s$1n({positions:[o[s],u],loop:!1,material:r$v.fromType(r$v.ColorType,{color:r._outlineColor._value})},a))}r.outlines.add(s$1n({positions:l,material:r$v.fromType(r$v.ColorType,{color:r._outlineColor._value})},a))}if(r.outlines.add(s$1n({positions:o,material:r$v.fromType(r$v.ColorType,{color:r._outlineColor._value})},a)),t$$(r._hierarchy._value.holes))for(var c=0;c<r._hierarchy._value.holes.length;c++){if(o=r._hierarchy._value.holes[c].positions,!r.perPositionHeight||r._height>0)for(s=0;s<o.length;s++){(h=i$1g.fromCartesian(o[s])).height=t$$(r._height)?r._height._value:0,o[s]=i$1g.toCartesian(h)}if(Math.abs(r._extrudedHeight)>0){for(l=[],s=0;s<o.length;s++){var h;(h=i$1g.fromCartesian(o[s])).height=r._extrudedHeight._value;u=i$1g.toCartesian(h);l.push(u),r.outlines.add(s$1n({positions:[o[s],u],loop:!1,material:r$v.fromType(r$v.ColorType,{color:r._outlineColor._value})},a))}r.outlines.add(s$1n({positions:l,material:r$v.fromType(r$v.ColorType,{color:r._outlineColor._value})},a))}r.outlines.add(s$1n({positions:o,material:r$v.fromType(r$v.ColorType,{color:r._outlineColor._value})},a))}}if(t$$(r.outlines))for(let e=0;e<r.outlines._polylines.length;e++)r.outlines._polylines[e].show=n.show,t$$(n.geometry)&&(t$$(n.geometry.outlineWidth)&&!isNaN(n.geometry.outlineWidth)&&(r.outlines._polylines[e].width=n.geometry.outlineWidth),t$$(n.geometry.outlineColor)&&n.geometry.outlineColor instanceof e$1z&&(r.outlines._polylines[e].material.uniforms.color=n.geometry.outlineColor))}}},u$J.processClampWideOutline=function(e,t){for(var i=0;i<t.length;i++){var n=t[i],r=n._polygon;if(!(r instanceof u$J))return;if(n.show&&t$$(r._outline)&&r._outline._value&&r._outlineWidth>1&&!t$$(r.clampOutlines)){var o;t$$(r.outlineColor)||(r.outlineColor=e$1z.BLACK),r.definitionChanged.addEventListener((function(t,i,n,o){t$$(r.clampOutlines)&&e.primitives.remove(r.clampOutlines),r.clampOutlines=void 0})),o=t$$(r._hierarchy._value)?Array.isArray(r._hierarchy._value)?r._hierarchy._value:r._hierarchy._value.positions:r._hierarchy.polygon._positions._value;var a=new Y$C;a.positions=o,a$11.equals(o[0],o[o.length-1])||(a.loop=!0),a.width=r._outlineWidth._value||1;var s={show:new e$18(!0),color:r$I.fromColor(r._outlineColor._value),width:new r$G({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:1,value:[a.width]})},l=new m$P({id:n,geometry:new ee$x(a),attributes:s});r.clampOutlines=new C$I({show:!0,asynchronous:!0,geometryInstances:l,classificationType:r._classificationType?r._classificationType._value:_0x29401c.BOTH,appearance:new e$12}),e.primitives.add(r.clampOutlines)}t$$(r.clampOutlines)&&(r.clampOutlines.show=n.isShowing)}};var _0x4da8eb=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1c0220=_0x4da8eb(void 0,(function(){return _0x1c0220.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c0220).search("(((.+)+)+)+$")}));function _0x43be0d(){}function y$H(e){if(e=e$1Y(e,e$1Y.EMPTY_OBJECT),this.geometryInstances=e.geometryInstances,this.appearance=e.appearance,this._appearance=void 0,this._material=void 0,this.swipeEnabled=!1,this._swipeEnabled=!1,this._swipeRegion=new a$10(0,0,1,1),this.depthFailAppearance=e.depthFailAppearance,this._depthFailAppearance=void 0,this._depthFailMaterial=void 0,this.modelMatrix=c$1a.clone(e$1Y(e.modelMatrix,c$1a.IDENTITY)),this._modelMatrix=new c$1a,this.updateBoundingSphere=e$1Y(e.updateBoundingSphere,!0),this.show=e$1Y(e.show,!0),this._vertexCacheOptimize=e$1Y(e.vertexCacheOptimize,!1),this._interleave=e$1Y(e.interleave,!1),this._releaseGeometryInstances=e$1Y(e.releaseGeometryInstances,!0),this._allowPicking=e$1Y(e.allowPicking,!0),this._asynchronous=e$1Y(e.asynchronous,!0),this._compressVertices=e$1Y(e.compressVertices,!0),this.cull=e$1Y(e.cull,!0),this.debugShowBoundingVolume=e$1Y(e.debugShowBoundingVolume,!1),this.rtcCenter=e.rtcCenter,t$$(this.rtcCenter)&&(!t$$(this.geometryInstances)||Array.isArray(this.geometryInstances)&&1!==this.geometryInstances))throw new t$_("Relative-to-center rendering only supports one geometry instance.");this.shadows=e$1Y(e.shadows,q$Q.DISABLED),this._translucent=void 0,this._state=ce$n.READY,this._geometries=[],this._error=void 0,this._numberOfInstances=0,this._boundingSpheres=[],this._boundingSphereWC=[],this._boundingSphereCV=[],this._boundingSphere2D=[],this._boundingSphereMorph=[],this._perInstanceAttributeCache=[],this._instanceIds=[],this._lastPerInstanceAttributeIndex=0,this._va=[],this._attributeLocations=void 0,this._primitiveType=void 0,this._frontFaceRS=void 0,this._backFaceRS=void 0,this._sp=void 0,this._depthFailAppearance=void 0,this._spDepthFail=void 0,this._frontFaceDepthFailRS=void 0,this._backFaceDepthFailRS=void 0,this._pickIds=[],this._colorCommands=[],this._pickCommands=[],this._readOnlyInstanceAttributes=e._readOnlyInstanceAttributes,this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._createRenderStatesFunction=e._createRenderStatesFunction,this._createShaderProgramFunction=e._createShaderProgramFunction,this._createCommandsFunction=e._createCommandsFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._createPickOffsets=e._createPickOffsets,this._pickOffsets=void 0,this._createGeometryResults=void 0,this._ready=!1,this._readyPromise=c$18.defer(),this._batchTable=void 0,this._batchTableAttributeIndices=void 0,this._offsetInstanceExtend=void 0,this._batchTableOffsetAttribute2DIndex=void 0,this._batchTableOffsetsUpdated=!1,this._instanceBoundingSpheres=void 0,this._instanceBoundingSpheresCV=void 0,this._tempBoundingSpheres=void 0,this._recomputeBoundingSpheres=!1,this._batchTableBoundingSpheresUpdated=!1,this._batchTableBoundingSphereAttributeIndices=void 0,this._twoPasses=e.twoPasses,this._polygonOffset={enabled:!1,value:new r$T(0,0)}}function Ge$c(e){var t,i=e.length,n=[],r=e[0].attributes;for(t in r)if(r.hasOwnProperty(t)&&t$$(r[t])){for(var o=r[t],a=!0,s=1;s<i;++s){var l=e[s].attributes[t];if(!t$$(l)||o.componentDatatype!==l.componentDatatype||o.componentsPerAttribute!==l.componentsPerAttribute||o.normalize!==l.normalize){a=!1;break}}a&&n.push(t)}return n}_0x1c0220(),_0x43be0d.createClampGroundColorRenderState=function(){return{cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,stencilTest:{enabled:!0,frontFunction:h$N.NOT_EQUAL,frontOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.ZERO},backFunction:h$N.NOT_EQUAL,backOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.ZERO},reference:0,mask:-1},blending:Ee$s.ALPHA_BLEND}},_0x43be0d.createClampGroundAndObjectLineRenderState=function(){return{cull:{enabled:!0},depthMask:!1}},_0x43be0d.createClampGroundStencilRenderState=function(){return{depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0,func:Re$h.GREATER},stencilTest:{enabled:!0,frontFunction:h$N.ALWAYS,frontOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.INCREMENT_WRAP},backFunction:h$N.ALWAYS,backOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.DECREMENT_WRAP},reference:0,mask:-1}}},_0x43be0d.createClampObjectColorRenderState=function(){return{cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,stencilTest:{enabled:!0,frontFunction:h$N.EQUAL,frontOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.DECREMENT_WRAP},backFunction:h$N.EQUAL,backOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.DECREMENT_WRAP},reference:3,mask:3},blending:Ee$s.ALPHA_BLEND}},_0x43be0d.createClampObjectStencilRenderState=function(){return{cull:{enabled:!1},depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0},stencilTest:{enabled:!0,frontFunction:h$N.ALWAYS,frontOperation:{fail:o$F.KEEP,zFail:o$F.DECREMENT_WRAP,zPass:o$F.KEEP},backFunction:h$N.ALWAYS,backOperation:{fail:o$F.KEEP,zFail:o$F.DECREMENT_WRAP,zPass:o$F.KEEP},reference:0,mask:1},stencilMask:1}},_0x43be0d.createClampPickStencilRenderState=function(e){var t=e?this.createClampGroundStencilRenderState():this.createClampObjectStencilRenderState();return t.blending={enabled:!1},t.polygonOffset={enabled:!0,factor:1,units:1},t},_0x43be0d.createClampPickColorRenderState=function(e){var t=e?this.createClampGroundColorRenderState():this.createClampObjectColorRenderState();return t.blending={enabled:!1},t.depthTest={enabled:!0},t.polygonOffset={enabled:!0,factor:1,units:1},t},_0x43be0d.createReceiveClampObjectStencilTest=function(e){return{enabled:e,frontFunction:h$N.ALWAYS,frontOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.REPLACE},backFunction:h$N.ALWAYS,backOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.REPLACE},reference:2,mask:2}},_0x43be0d.createNormalColorRenderState=function(e){return{cull:{enabled:e!==_0x2ee645.NONE},depthTest:{enabled:!0,func:Re$h.LESS_OR_EQUAL},blending:Ee$s.ALPHA_BLEND,frontFace:e!==_0x2ee645.NONE?e:_0x2ee645.COUNTER_CLOCKWISE}},Object.defineProperties(y$H.prototype,{vertexCacheOptimize:{get:function(){return this._vertexCacheOptimize}},interleave:{get:function(){return this._interleave}},releaseGeometryInstances:{get:function(){return this._releaseGeometryInstances}},allowPicking:{get:function(){return this._allowPicking}},asynchronous:{get:function(){return this._asynchronous}},compressVertices:{get:function(){return this._compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}});var Ue$e=new r$T,We$h=new a$11,he$m=new a$10;function de$p(e){var t=e.length;return 1===t?e[0]:2===t?r$T.unpack(e,0,Ue$e):3===t?a$11.unpack(e,0,We$h):4===t?a$10.unpack(e,0,he$m):void 0}function je$c(e,t){var i=e.geometryInstances,n=Array.isArray(i)?i:[i],r=n.length;if(0!==r){var o,a,s,l,u=Ge$c(n),c=u.length,h=[],d={},f={},p=n[0].attributes;for(a=0;a<c;++a)l=p[s=u[a]],d[s]=a,h.push({functionName:"czm_batchTable_"+s,componentDatatype:l.componentDatatype,componentsPerAttribute:l.componentsPerAttribute,normalize:l.normalize});-1!==u.indexOf("distanceDisplayCondition")&&(h.push({functionName:"czm_batchTable_boundingSphereCenter3DHigh",componentDatatype:C$12.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter3DLow",componentDatatype:C$12.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DHigh",componentDatatype:C$12.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DLow",componentDatatype:C$12.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereRadius",componentDatatype:C$12.FLOAT,componentsPerAttribute:1}),f.center3DHigh=h.length-5,f.center3DLow=h.length-4,f.center2DHigh=h.length-3,f.center2DLow=h.length-2,f.radius=h.length-1),-1!==u.indexOf("offset")&&(h.push({functionName:"czm_batchTable_offset2D",componentDatatype:C$12.FLOAT,componentsPerAttribute:3}),o=h.length-1),h.push({functionName:"czm_batchTable_pickColor",componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0});var _=h.length,m=new p$U(t,h,r);for(a=0;a<r;++a){var $=n[a];p=$.attributes;for(var g=0;g<c;++g){var y=de$p((l=p[s=u[g]]).value),v=d[s];m.setBatchedAttribute(a,v,y)}var x={primitive:e$1Y($.pickPrimitive,e)};t$$($.id)&&(x.id=$.id);var b=t.createPickId(x);e._pickIds.push(b);var S=t$$(b)?b.color:e$1z.BLACK,w=he$m;w.x=e$1z.floatToByte(S.red),w.y=e$1z.floatToByte(S.green),w.z=e$1z.floatToByte(S.blue),w.w=e$1z.floatToByte(S.alpha),m.setBatchedAttribute(a,_-1,w)}e._batchTable=m,e._batchTableAttributeIndices=d,e._batchTableBoundingSphereAttributeIndices=f,e._batchTableOffsetAttribute2DIndex=o}}function qe$d(e){var t;return t=Array.isArray(e.values)?e.values.slice(0):new e.values.constructor(e.values),new r$Q({componentDatatype:e.componentDatatype,componentsPerAttribute:e.componentsPerAttribute,normalize:e.normalize,values:t})}function Ye$d(e){var t,i=e.attributes,n=new t$W;for(var r in i)i.hasOwnProperty(r)&&t$$(i[r])&&(n[r]=qe$d(i[r]));if(t$$(e.indices)){var o=e.indices;t=Array.isArray(o)?o.slice(0):new o.constructor(o)}return new T$11({attributes:n,indices:t,primitiveType:e.primitiveType,boundingSphere:c$19.clone(e.boundingSphere)})}function $e$8(e,t){return{geometry:t,attributes:e.attributes,modelMatrix:c$1a.clone(e.modelMatrix),pickPrimitive:e.pickPrimitive,id:e.id}}var Xe$a=/attribute\s+vec(?:3|4)\s+(.*)3DHigh;/g;function ue$l(e){return a$O.replaceMain(e,"czm_non_pick_main")+"\nvarying vec4 v_pickColor; \nvoid main() \n{ \n czm_non_pick_main(); \n v_pickColor = czm_batchTable_pickColor(batchId); \n}"}function me$u(e){return"varying vec4 v_pickColor;\n"+e}function le$r(e,t){if(!e.compressVertices)return t;var i=-1!==t.search(/attribute\s+vec3\s+normal;/g),n=-1!==t.search(/attribute\s+vec2\s+st;/g);if(!i&&!n)return t;var r=-1!==t.search(/attribute\s+vec3\s+tangent;/g),o=-1!==t.search(/attribute\s+vec3\s+bitangent;/g),a=n&&i?2:1,s="compressedAttributes",l="attribute "+((a+=r||o?1:0)>1?"vec"+a:"float")+" "+s+";",u="",c="";n&&(u+="vec2 st;\n",c+=" st = czm_decompressTextureCoordinates("+(a>1?s+".x":s)+");\n");i&&r&&o?(u+="vec3 normal;\nvec3 tangent;\nvec3 bitangent;\n",c+=" czm_octDecode("+s+"."+(n?"yz":"xy")+", normal, tangent, bitangent);\n"):(i&&(u+="vec3 normal;\n",c+=" normal = czm_octDecode("+s+(a>1?"."+(n?"y":"x"):"")+");\n"),r&&(u+="vec3 tangent;\n",c+=" tangent = czm_octDecode("+s+"."+(n&&i?"z":"y")+");\n"),o&&(u+="vec3 bitangent;\n",c+=" bitangent = czm_octDecode("+s+"."+(n&&i?"z":"y")+");\n"));var h=t;return h=(h=(h=(h=h.replace(/attribute\s+vec3\s+normal;/g,"")).replace(/attribute\s+vec2\s+st;/g,"")).replace(/attribute\s+vec3\s+tangent;/g,"")).replace(/attribute\s+vec3\s+bitangent;/g,""),[l,u,h=a$O.replaceMain(h,"czm_non_compressed_main"),"void main() \n{ \n"+c+" czm_non_compressed_main(); \n}"].join("\n")}function Ze$8(e){var t=a$O.replaceMain(e,"czm_non_depth_clamp_main");return t+="varying float v_WindowZ;\nvoid main() {\n czm_non_depth_clamp_main();\n vec4 position = gl_Position;\n v_WindowZ = (0.5 * (position.z / position.w) + 0.5) * position.w;\n position.z = min(position.z, position.w);\n gl_Position = position;\n}\n"}function Qe$a(e){var t=a$O.replaceMain(e,"czm_non_depth_clamp_main");return t="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n"+(t+="varying float v_WindowZ;\nvoid main() {\n czm_non_depth_clamp_main();\n#if defined(GL_EXT_frag_depth) && !defined(LOG_DEPTH)\n gl_FragDepthEXT = min(v_WindowZ * gl_FragCoord.w, 1.0);\n#endif\n}\n")}function _e$j(e,t){var i=e.vertexAttributes;for(var n in i)if(i.hasOwnProperty(n)&&!t$$(t[n]))throw new t$_("Appearance/Geometry mismatch. The appearance requires vertex shader attribute input '"+n+"', which was not computed as part of the Geometry. Use the appearance's vertexFormat property when constructing the geometry.")}function Ke$a(e,t){return function(){return e[t]}}y$H._modifyShaderPosition=function(e,t,i){for(var n,r="",o="",a="";null!==(n=Xe$a.exec(t));){var s=n[1],l="vec4 czm_compute"+s[0].toUpperCase()+s.substr(1)+"()";"vec4 czm_computePosition()"!==l&&(r+=l+";\n"),t$$(e.rtcCenter)?(r+="uniform mat4 u_modifiedModelView;\n",o+="attribute vec4 position;\n",a+=l+"\n{\n return u_modifiedModelView * position;\n}\n\n",t=(t=(t=(t=t.replace(/attribute\s+vec(?:3|4)\s+position3DHigh;/g,"")).replace(/attribute\s+vec(?:3|4)\s+position3DLow;/g,"")).replace(/czm_modelViewRelativeToEye\s+\*\s+/g,"")).replace(/czm_modelViewProjectionRelativeToEye/g,"czm_projection")):i?a+=l+"\n{\n return czm_translateRelativeToEye("+s+"3DHigh, "+s+"3DLow);\n}\n\n":(o+="attribute vec3 "+s+"2DHigh;\nattribute vec3 "+s+"2DLow;\n",a+=l+"\n{\n vec4 p;\n if (czm_morphTime == 1.0)\n {\n p = czm_translateRelativeToEye("+s+"3DHigh, "+s+"3DLow);\n }\n else if (czm_morphTime == 0.0)\n {\n p = czm_translateRelativeToEye("+s+"2DHigh.zxy, "+s+"2DLow.zxy);\n }\n else\n {\n p = czm_columbusViewMorph(\n czm_translateRelativeToEye("+s+"2DHigh.zxy, "+s+"2DLow.zxy),\n czm_translateRelativeToEye("+s+"3DHigh, "+s+"3DLow),\n czm_morphTime);\n }\n return p;\n}\n\n")}return[r,o,t,a].join("\n")},y$H._appendShowToShader=function(e,t){if(!t$$(e._batchTableAttributeIndices.show))return t;return a$O.replaceMain(t,"czm_non_show_main")+"\nvoid main() \n{ \n czm_non_show_main(); \n gl_Position *= czm_batchTable_show(batchId); \n}"},y$H._updateColorAttribute=function(e,t,i){if(!t$$(e._batchTableAttributeIndices.color)&&!t$$(e._batchTableAttributeIndices.depthFailColor)||-1===t.search(/attribute\s+vec4\s+color;/g))return t;if(i&&!t$$(e._batchTableAttributeIndices.depthFailColor))throw new t$_("A depthFailColor per-instance attribute is required when using a depth fail appearance that uses a color attribute.");var n=t;return n=n.replace(/attribute\s+vec4\s+color;/g,""),n=i?n.replace(/(\b)color(\b)/g,"$1czm_batchTable_depthFailColor(batchId)$2"):n.replace(/(\b)color(\b)/g,"$1czm_batchTable_color(batchId)$2")},y$H._updatePickColorAttribute=function(e){var t=e.replace(/attribute\s+vec4\s+pickColor;/g,"");return t=t.replace(/(\b)pickColor(\b)/g,"$1czm_batchTable_pickColor(batchId)$2")},y$H._appendOffsetToShader=function(e,t){if(!t$$(e._batchTableAttributeIndices.offset))return t;var i=t.replace(/attribute\s+float\s+batchId;/g,"attribute float batchId;\nattribute float applyOffset;");return" if (czm_sceneMode == czm_sceneMode3D)\n"," {\n"," $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0);"," }\n"," else\n"," {\n"," $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0);"," }\n",i=i.replace(/vec4\s+([A-Za-z0-9_]+)\s+=\s+czm_computePosition\(\);/g,"vec4 $1 = czm_computePosition();\n if (czm_sceneMode == czm_sceneMode3D)\n {\n $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0); }\n else\n {\n $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0); }\n")},y$H._appendDistanceDisplayConditionToShader=function(e,t,i){if(!t$$(e._batchTableAttributeIndices.distanceDisplayCondition))return t;var n=a$O.replaceMain(t,"czm_non_distanceDisplayCondition_main"),r="void main() \n{ \n czm_non_distanceDisplayCondition_main(); \n vec2 distanceDisplayCondition = czm_batchTable_distanceDisplayCondition(batchId);\n vec3 boundingSphereCenter3DHigh = czm_batchTable_boundingSphereCenter3DHigh(batchId);\n vec3 boundingSphereCenter3DLow = czm_batchTable_boundingSphereCenter3DLow(batchId);\n float boundingSphereRadius = czm_batchTable_boundingSphereRadius(batchId);\n";return e.updateBoundingSphere?r+=i?" vec4 centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);\n":" vec3 boundingSphereCenter2DHigh = czm_batchTable_boundingSphereCenter2DHigh(batchId);\n vec3 boundingSphereCenter2DLow = czm_batchTable_boundingSphereCenter2DLow(batchId);\n vec4 centerRTE;\n if (czm_morphTime == 1.0)\n {\n centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);\n }\n else if (czm_morphTime == 0.0)\n {\n centerRTE = czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy);\n }\n else\n {\n centerRTE = czm_columbusViewMorph(\n czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy),\n czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow),\n czm_morphTime);\n }\n":r+=" vec4 centerRTE = czm_view * vec4(boundingSphereCenter3DHigh + boundingSphereCenter3DLow, 1.0);\n",n+"\n"+(r+=" float radiusSq = boundingSphereRadius * boundingSphereRadius; \n float distanceSq; \n if (czm_sceneMode == czm_sceneMode2D) \n { \n distanceSq = czm_eyeHeight2D.y - radiusSq; \n } \n else \n { \n distanceSq = dot(centerRTE.xyz, centerRTE.xyz) - radiusSq; \n } \n distanceSq = max(distanceSq, 0.0); \n float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x; \n float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y; \n float show = (distanceSq >= nearSq && distanceSq <= farSq) ? 1.0 : 0.0; \n gl_Position *= show; \n}")};var te$u=Math.max(o$$.hardwareConcurrency-1,1),q$N,Je$7=new o$_("combineGeometry",Number.POSITIVE_INFINITY);function et$e(e,t){var i,n,r,o,a=e._instanceIds;if(e._state===ce$n.READY){i=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];var s,l=e._numberOfInstances=i.length,u=[],c=[];for(r=0;r<l;++r){if(n=i[r].geometry,a.push(i[r].id),!t$$(n._workerName))throw new t$_("_workerName must be defined for asynchronous geometry.");c.push({moduleName:n._workerName,geometry:n})}if(!t$$(q$N))for(q$N=new Array(te$u),r=0;r<te$u;r++)q$N[r]=new o$_("createGeometry",Number.POSITIVE_INFINITY);for(c=n$O(c,te$u),r=0;r<c.length;r++){var h,d=0,f=c[r],p=f.length;for(o=0;o<p;++o)t$$((n=(s=f[o]).geometry).constructor.pack)&&(s.offset=d,d+=e$1Y(n.constructor.packedLength,n.packedLength));if(d>0){var _=new Float64Array(d);for(h=[_.buffer],o=0;o<p;++o)t$$((n=(s=f[o]).geometry).constructor.pack)&&(n.constructor.pack(n,_,s.offset),s.geometry=_)}u.push(q$N[r].scheduleTask({subTasks:c[r]},h))}e._state=ce$n.CREATING,c$18.all(u,(function(t){e._createGeometryResults=t,e._state=ce$n.CREATED})).otherwise((function(i){N$I(e,t,ce$n.FAILED,i)}))}else if(e._state===ce$n.CREATED){var m=[];i=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];var $=t.scene3DOnly,g=t.mapProjection,y=Je$7.scheduleTask(S$x.packCombineGeometryParameters({createGeometryResults:e._createGeometryResults,instances:i,ellipsoid:g.ellipsoid,projection:g,elementIndexUintSupported:t.context.elementIndexUint,scene3DOnly:$,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e._createPickOffsets},m),m);e._createGeometryResults=void 0,e._state=ce$n.COMBINING,c$18(y,(function(i){var n=S$x.unpackCombineGeometryResults(i);e._geometries=n.geometries,e._attributeLocations=n.attributeLocations,e.modelMatrix=c$1a.clone(n.modelMatrix,e.modelMatrix),e._pickOffsets=n.pickOffsets,e._offsetInstanceExtend=n.offsetInstanceExtend,e._instanceBoundingSpheres=n.boundingSpheres,e._instanceBoundingSpheresCV=n.boundingSpheresCV,t$$(e._geometries)&&e._geometries.length>0?(e._recomputeBoundingSpheres=!0,e._state=ce$n.COMBINED):N$I(e,t,ce$n.FAILED,void 0)})).otherwise((function(i){N$I(e,t,ce$n.FAILED,i)}))}}function tt$f(e,t){var i,n,r=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances],o=e._numberOfInstances=r.length,a=new Array(o),s=e._instanceIds,l=0;for(n=0;n<o;n++){var u,c=(i=r[n]).geometry;u=t$$(c.attributes)&&t$$(c.primitiveType)?Ye$d(c):c.constructor.createGeometry(c),a[l++]=$e$8(i,u),s.push(i.id)}a.length=l;var h=t.scene3DOnly,d=t.mapProjection,f=S$x.combineGeometry({instances:a,ellipsoid:d.ellipsoid,projection:d,elementIndexUintSupported:t.context.elementIndexUint,scene3DOnly:h,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e._createPickOffsets});e._geometries=f.geometries,e._attributeLocations=f.attributeLocations,e.modelMatrix=c$1a.clone(f.modelMatrix,e.modelMatrix),e._pickOffsets=f.pickOffsets,e._offsetInstanceExtend=f.offsetInstanceExtend,e._instanceBoundingSpheres=f.boundingSpheres,e._instanceBoundingSpheresCV=f.boundingSpheresCV,t$$(e._geometries)&&e._geometries.length>0?(e._recomputeBoundingSpheres=!0,e._state=ce$n.COMBINED):N$I(e,t,ce$n.FAILED,void 0)}function nt$e(e,t){var i=e._batchTableAttributeIndices.offset;if(e._recomputeBoundingSpheres&&t$$(i)){var n,r=e._offsetInstanceExtend,o=e._instanceBoundingSpheres,a=o.length,s=e._tempBoundingSpheres;if(!t$$(s)){for(s=new Array(a),n=0;n<a;n++)s[n]=new c$19;e._tempBoundingSpheres=s}for(n=0;n<a;++n){var l=s[n],u=e._batchTable.getBatchedAttribute(n,i,new a$11);Te$n(l=o[n].clone(l),u,r[n])}var c=[],h=[],d=[];for(n=0;n<a;++n){var f=s[n];f.center.x-f.radius>0||c$19.intersectPlane(f,n$17.ORIGIN_ZX_PLANE)!==cr$4.INTERSECTING?c.push(f):(h.push(f),d.push(f))}var p=c[0],_=d[0],m=h[0];for(n=1;n<c.length;n++)p=c$19.union(p,c[n]);for(n=1;n<d.length;n++)_=c$19.union(_,d[n]);for(n=1;n<h.length;n++)m=c$19.union(m,h[n]);var $=[];for(t$$(p)&&$.push(p),t$$(_)&&$.push(_),t$$(m)&&$.push(m),n=0;n<$.length;n++){var g=$[n].clone(e._boundingSpheres[n]);e._boundingSpheres[n]=g,e._boundingSphereCV[n]=c$19.projectTo2D(g,t.mapProjection,e._boundingSphereCV[n])}y$H._updateBoundingVolumes(e,t,e.modelMatrix,!0),e._recomputeBoundingSpheres=!1}else e._recomputeBoundingSpheres=!1}var fe$m=new t$R,be$p=new i$1g,ge$i=new a$11,ve$m=new c$19;function it$c(e,t){if(t$$(e._batchTableAttributeIndices.distanceDisplayCondition)&&!e._batchTableBoundingSpheresUpdated){for(var i=e._batchTableBoundingSphereAttributeIndices,n=i.center3DHigh,r=i.center3DLow,o=i.center2DHigh,a=i.center2DLow,s=i.radius,l=t.mapProjection,u=l.ellipsoid,c=e._batchTable,h=e._instanceBoundingSpheres,d=h.length,f=0;f<d;++f){var p=h[f];if(t$$(p)){var _=e.modelMatrix;t$$(_)&&e.updateBoundingSphere&&(p=c$19.transform(p,_,ve$m));var m=p.center,$=p.radius,g=t$R.fromCartesian(m,fe$m);if(c.setBatchedAttribute(f,n,g.high),c.setBatchedAttribute(f,r,g.low),!t.scene3DOnly){var y=u.cartesianToCartographic(m,be$p),v=l.project(y,ge$i);g=t$R.fromCartesian(v,fe$m),c.setBatchedAttribute(f,o,g.high),c.setBatchedAttribute(f,a,g.low)}c.setBatchedAttribute(f,s,$)}}e._batchTableBoundingSpheresUpdated=!0}}var ne$t=new a$11,rt$e=new a$11;function ye$m(e,t){if(t$$(e._batchTableAttributeIndices.offset)&&!e._batchTableOffsetsUpdated&&!t.scene3DOnly){for(var i=e._batchTableOffsetAttribute2DIndex,n=t.mapProjection,r=n.ellipsoid,o=e._batchTable,a=e._instanceBoundingSpheres,s=a.length,l=0;l<s;++l){var u=a[l];if(t$$(u)){var c=o.getBatchedAttribute(l,e._batchTableAttributeIndices.offset);if(a$11.equals(c,a$11.ZERO)){o.setBatchedAttribute(l,i,a$11.ZERO);continue}var h=e.modelMatrix;t$$(h)&&(u=c$19.transform(u,h,ve$m));var d=u.center;d=r.scaleToGeodeticSurface(d,rt$e);var f=r.cartesianToCartographic(d,be$p),p=n.project(f,ge$i),_=a$11.add(c,d,ne$t);f=r.cartesianToCartographic(_,f);var m=n.project(f,ne$t),$=a$11.subtract(m,p,ne$t),g=$.x;$.x=$.z,$.z=$.y,$.y=g,o.setBatchedAttribute(l,i,$)}}e._batchTableOffsetsUpdated=!0}}function at$c(e,t){for(var i=e._attributeLocations,n=e._geometries,r=t.scene3DOnly,o=t.context,a=[],s=n.length,l=0;l<s;++l){var u=n[l];if(Se$e(e)){var c=M$O(o,u.attributes.batchId),h=ot$f(o),d=M$O(o,u.attributes.position2DHigh),f=M$O(o,u.attributes.position2DLow),p=M$O(o,u.attributes.position3DHigh),_=M$O(o,u.attributes.position3DLow),m=[];(i={}).sideness=0,m.push({index:i.sideness,vertexBuffer:h,componentsPerAttribute:2,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1}),i.position02DHigh=1,m.push({index:i.position02DHigh,vertexBuffer:d,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position12DHigh=2,m.push({index:i.position12DHigh,vertexBuffer:d,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:12,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position02DLow=3,m.push({index:i.position02DLow,vertexBuffer:f,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position12DLow=4,m.push({index:i.position12DLow,vertexBuffer:f,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:12,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position03DHigh=5,m.push({index:i.position03DHigh,vertexBuffer:p,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position13DHigh=6,m.push({index:i.position13DHigh,vertexBuffer:p,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:12,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position03DLow=7,m.push({index:i.position03DLow,vertexBuffer:_,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position13DLow=8,m.push({index:i.position13DLow,vertexBuffer:_,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:12,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.batchId=9,m.push({index:i.batchId,vertexBuffer:c,componentsPerAttribute:1,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:4,instanceDivisor:1}),i.batchId1=10,m.push({index:i.batchId1,vertexBuffer:c,componentsPerAttribute:1,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:4,strideInBytes:4,instanceDivisor:1});var $=new x$18({context:o,attributes:m,indexBuffer:ct$d(o)});$._instanceCount=u.attributes.position3DHigh.values.length/u.attributes.position3DHigh.componentsPerAttribute-1,e._attributeLocations=i,a.push($)}else a.push(x$18.fromGeometry({context:o,geometry:u,attributeLocations:i,bufferUsage:A$13.STATIC_DRAW,interleave:e._interleave}));if(t$$(e._createBoundingVolumeFunction))e._createBoundingVolumeFunction(t,u);else if(e._boundingSpheres.push(c$19.clone(u.boundingSphere)),e._boundingSphereWC.push(new c$19),!r&&t$$(u.boundingSphereCV)){var g=u.boundingSphereCV.center,y=g.x,v=g.y,x=g.z;g.x=x,g.y=y,g.z=v,e._boundingSphereCV.push(c$19.clone(u.boundingSphereCV)),e._boundingSphere2D.push(new c$19),e._boundingSphereMorph.push(new c$19)}}e._va=a,e._primitiveType=n[0].primitiveType,e.releaseGeometryInstances&&(e.geometryInstances=void 0),e._geometries=void 0,N$I(e,t,ce$n.COMPLETE,void 0)}function Se$e(e){return t$$(e._attributeLocations.sideness)}var ie$w=null;function ot$f(e){var t=new Float32Array(8),i=0;return t[i++]=0,t[i++]=0,t[i++]=0,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=0,(ie$w=u$Y.createVertexBuffer({context:e,typedArray:t,usage:A$13.STATIC_DRAW})).vertexArrayDestroyable=!1,ie$w}function M$O(e,t){return u$Y.createVertexBuffer({context:e,typedArray:t.values,usage:A$13.STATIC_DRAW})}function st$a(){var e=new Uint16Array(6),t=0;return e[t++]=2,e[t++]=1,e[t++]=0,e[t++]=3,e[t++]=2,e[t++]=0,e}var Y$B=null;function ct$d(e){return t$$(Y$B)||((Y$B=u$Y.createIndexBuffer({context:e,typedArray:st$a(),usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT})).vertexArrayDestroyable=!1),Y$B}function pt$9(e,t,i,n,r){var o,a=i.getRenderState();t$$(r)&&r&&(a.stencilTest=_0x43be0d.createReceiveClampObjectStencilTest(!0)),n?((o=e$1W(a,!1)).cull={enabled:!0,face:k$F.BACK},e._frontFaceRS=p$1a.fromCache(o),o.cull.face=k$F.FRONT,e._backFaceRS=p$1a.fromCache(o)):(e._frontFaceRS=p$1a.fromCache(a),e._backFaceRS=e._frontFaceRS),o=e$1W(a,!1),t$$(e._depthFailAppearance)&&(o.depthTest.enabled=!1),t$$(e._depthFailAppearance)&&((o=e$1W(a=e._depthFailAppearance.getRenderState(),!1)).depthTest.func=Re$h.GREATER,n?(o.cull={enabled:!0,face:k$F.BACK},e._frontFaceDepthFailRS=p$1a.fromCache(o),o.cull.face=k$F.FRONT,e._backFaceDepthFailRS=p$1a.fromCache(o)):(e._frontFaceDepthFailRS=p$1a.fromCache(o),e._backFaceDepthFailRS=e._frontFaceRS))}function ht$9(e,t,i){var n=t.context,r=e._attributeLocations,o=Se$e(e),a=e._batchTable.getVertexShaderCallback()(i.vertexShaderSource);a=y$H._appendOffsetToShader(e,a),a=y$H._appendShowToShader(e,a),a=ue$l(a=y$H._appendDistanceDisplayConditionToShader(e,a,t.scene3DOnly)),a=le$r(e,a=y$H._updateColorAttribute(e,a,!1)),a=y$H._modifyShaderPosition(e,a,t.scene3DOnly);var s=i.getFragmentShaderSource();s=me$u(s);var l,u=[];e._polygonOffset.enabled&&u.push("POLYGON_OFFSET"),s=new a$O({sources:[s],defines:u}),e._swipeEnabled&&s.defines.push("APPLY_SWIPE"),o&&(l=new a$O({sources:[a],defines:["APPLY_SIDENESS"]})),e._sp=p$15.replaceCache({context:n,shaderProgram:e._sp,vertexShaderSource:o?l:a,fragmentShaderSource:s,attributeLocations:r}),_e$j(e._sp,r),t$$(e._depthFailAppearance)&&(a=e._batchTable.getVertexShaderCallback()(e._depthFailAppearance.vertexShaderSource),a=y$H._appendShowToShader(e,a),a=ue$l(a=y$H._appendDistanceDisplayConditionToShader(e,a,t.scene3DOnly)),a=le$r(e,a=y$H._updateColorAttribute(e,a,!0)),a=Ze$8(a=y$H._modifyShaderPosition(e,a,t.scene3DOnly)),s=Qe$a(s=me$u(s=e._depthFailAppearance.getFragmentShaderSource())),e._spDepthFail=p$15.replaceCache({context:n,shaderProgram:e._spDepthFail,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:r}),_e$j(e._spDepthFail,r))}var V$z=new c$1a,we$k=new a$11;function De$q(e,t,i,n){var r=t$$(i)?i._uniforms:void 0,o={},a=t.uniforms;if(t$$(a))for(var s in a)if(a.hasOwnProperty(s)){if(t$$(r)&&t$$(r[s]))throw new t$_("Appearance and material have a uniform with the same name: "+s);o[s]=Ke$a(a,s)}var l=s$1n(o,r);return(l=e._batchTable.getUniformMapCallback()(l)).u_polygonOffset=function(){return e._polygonOffset.value},l.uLineWidth=function(){return e$1Y(e._outlineWidth,1)},l.uSwipeRegion=function(){var t=e._swipeRegion,i=new a$10;return a$10.fromElements(t.x,t.y,t.x+t.z,t.y+t.w,i),i.x=i.x*n.context.drawingBufferWidth,i.y=(1-i.y)*n.context.drawingBufferHeight,i.z=i.z*n.context.drawingBufferWidth,i.w=(1-i.w)*n.context.drawingBufferHeight,i},t$$(e.rtcCenter)&&(l.u_modifiedModelView=function(){var t=n.context.uniformState.view;return c$1a.multiply(t,e._modelMatrix,V$z),c$1a.multiplyByPoint(V$z,e.rtcCenter,we$k),c$1a.setTranslation(V$z,we$k,V$z),V$z}),l}function dt$d(e,t,i,n,r,o,a,s){var l,u=De$q(e,t,i,s);t$$(e._depthFailAppearance)&&(l=De$q(e,e._depthFailAppearance,e._depthFailAppearance.material,s));var c=n?we$l.TRANSLUCENT:we$l.OPAQUE,h=r?2:1;h*=t$$(e._depthFailAppearance)?2:1,o.length=e._va.length*h;for(var d=o.length,f=0,p=0;p<d;++p){var _;r&&(t$$(_=o[p])||(_=o[p]=new s$1d({owner:e,primitiveType:e._primitiveType})),_.vertexArray=e._va[f],_.renderState=e._backFaceRS,_.shaderProgram=e._sp,_.uniformMap=u,_.pass=c,++p),t$$(_=o[p])||(_=o[p]=new s$1d({owner:e,primitiveType:e._primitiveType})),_.vertexArray=e._va[f],_.renderState=e._frontFaceRS,_.shaderProgram=e._sp,_.uniformMap=u,_.pass=c,_.instanceCount=e$1Y(_.vertexArray._instanceCount,0),t$$(e._depthFailAppearance)&&(r&&(t$$(_=o[++p])||(_=o[p]=new s$1d({owner:e,primitiveType:e._primitiveType})),_.vertexArray=e._va[f],_.renderState=e._backFaceDepthFailRS,_.shaderProgram=e._spDepthFail,_.uniformMap=l,_.pass=c),t$$(_=o[++p])||(_=o[p]=new s$1d({owner:e,primitiveType:e._primitiveType})),_.vertexArray=e._va[f],_.renderState=e._frontFaceDepthFailRS,_.shaderProgram=e._spDepthFail,_.uniformMap=l,_.pass=c),++f}}function ut$a(e,t,i,n,r,o,a,s){if(t.mode!==b$1d.SCENE3D&&!c$1a.equals(r,c$1a.IDENTITY))throw new t$_("Primitive.modelMatrix is only supported in 3D mode.");var l;y$H._updateBoundingVolumes(e,t,r),t.mode===b$1d.SCENE3D?l=e.updateBoundingSphere?e._boundingSphereWC:e._boundingSpheres:t.mode===b$1d.COLUMBUS_VIEW?l=e._boundingSphereCV:t.mode===b$1d.SCENE2D&&t$$(e._boundingSphere2D)?l=e._boundingSphere2D:t$$(e._boundingSphereMorph)&&(l=e._boundingSphereMorph);var u=!0;t._fboState.frameBufferType===B$y.NORMAL_AND_DEPTH&&(u=!1);var c=t.commandList,h=t.passes;if(u&&(h.render||h.pick)){var d=e.allowPicking,f=q$Q.castShadows(e.shadows),p=q$Q.receiveShadows(e.shadows),_=i.length,m=s?2:1;m*=t$$(e._depthFailAppearance)?2:1;for(var $=0;$<_;++$){var g=Math.floor($/m),y=i[$];y.modelMatrix=r,y.boundingVolume=l[g],y.cull=o,y.debugShowBoundingVolume=a,y.castShadows=f,y.receiveShadows=p,y.pickId=d?"v_pickColor":void 0,c.push(y)}}}y$H._updateBoundingVolumes=function(e,t,i,n){if(e.updateBoundingSphere){var r,o,a;if(n||!c$1a.equals(i,e._modelMatrix))for(c$1a.clone(i,e._modelMatrix),o=e._boundingSpheres.length,r=0;r<o;++r)t$$(a=e._boundingSpheres[r])&&(e._boundingSphereWC[r]=c$19.transform(a,i,e._boundingSphereWC[r]),t.scene3DOnly||(e._boundingSphere2D[r]=c$19.clone(e._boundingSphereCV[r],e._boundingSphere2D[r]),e._boundingSphere2D[r].center.x=0,e._boundingSphereMorph[r]=c$19.union(e._boundingSphereWC[r],e._boundingSphereCV[r])));var s=e.appearance.pixelSize;if(t$$(s))for(o=e._boundingSpheres.length,r=0;r<o;++r){a=e._boundingSpheres[r];var l=e._boundingSphereWC[r],u=t.camera.getPixelSize(a,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*s;l.radius=a.radius+u}}},y$H.prototype.update=function(e){if(!e._fboState||!0!==e._fboState.enabled||6!==e._fboState.frameBufferType){if(e.multiViewportIndex>-1&&this._instanceIds.length>0&&t$$(this._instanceIds[0])&&t$$(this._instanceIds[0].entityCollection)&&t$$(this._instanceIds[0].entityCollection.owner)){var t=this._instanceIds[0].entityCollection.owner;if(typeof t.getVisibleInViewport<"u")if(!t.getVisibleInViewport(e.multiViewportIndex))return}if(!(!t$$(this.geometryInstances)&&0===this._va.length||t$$(this.geometryInstances)&&Array.isArray(this.geometryInstances)&&0===this.geometryInstances.length||!t$$(this.appearance)||e.mode!==b$1d.SCENE3D&&e.scene3DOnly||!e.passes.render&&!e.passes.pick)){if(t$$(this._error))throw this._error;if(t$$(this.rtcCenter)&&!e.scene3DOnly)throw new t$_("RTC rendering is only available for 3D only scenes.");if(this._state!==ce$n.FAILED){var i=e.context;if(t$$(this._batchTable)||je$c(this,i),this._batchTable.attributes.length>0){if(0===e$1y.maximumVertexTextureImageUnits)throw new t$Z("Vertex texture fetch support is required to render primitives with per-instance attributes. The maximum number of vertex texture image units must be greater than zero.");this._batchTable.update(e)}if(this._state!==ce$n.COMPLETE&&this._state!==ce$n.COMBINED&&(this.asynchronous?et$e(this,e):tt$f(this,e)),this._state===ce$n.COMBINED&&(it$c(this,e),ye$m(this,e),at$c(this,e)),this.show&&this._state===ce$n.COMPLETE){this._batchTableOffsetsUpdated||ye$m(this,e),this._recomputeBoundingSpheres&&nt$e(this,e);var n=this.appearance,r=n.material,o=!1,a=!1;this._appearance!==n?(this._appearance=n,this._material=r,o=!0,a=!0):this._material!==r?(this._material=r,a=!0):this._swipeEnabled!==this.swipeEnabled&&(this._swipeEnabled=this.swipeEnabled,a=!0);var s=this.depthFailAppearance,l=t$$(s)?s.material:void 0;this._depthFailAppearance!==s?(this._depthFailAppearance=s,this._depthFailMaterial=l,o=!0,a=!0):this._depthFailMaterial!==l&&(this._depthFailMaterial=l,a=!0);var u=this._appearance.isTranslucent();this._translucent!==u&&(this._translucent=u,o=!0),t$$(this._material)&&this._material.update(i);var c=t$$(this._twoPasses)?this._twoPasses:n.closed&&u,h=!1;if(t$$(this._instanceIds[0])&&t$$(this._instanceIds[0].receiveObjectClamp)&&this._instanceIds[0].receiveObjectClamp&&(h=!0),o)e$1Y(this._createRenderStatesFunction,pt$9)(this,i,n,c,h);if(a)e$1Y(this._createShaderProgramFunction,ht$9)(this,e,n);if(o||a)e$1Y(this._createCommandsFunction,dt$d)(this,n,r,u,c,this._colorCommands,this._pickCommands,e);t$$(this._instanceIds[0])&&(!t$$(this._instanceIds[0].polygon)||t$$(this._instanceIds[0].polygon._perPositionHeight)&&(!t$$(this._instanceIds[0].polygon._perPositionHeight)||this._instanceIds[0].polygon._perPositionHeight._value)||t$$(this._instanceIds[0].polygon._height)?u$J.processWideOutline(e.camera._scene,this._instanceIds):u$J.processClampWideOutline(e.camera._scene,this._instanceIds)),e$1Y(this._updateAndQueueCommandsFunction,ut$a)(this,e,this._colorCommands,this._pickCommands,this.modelMatrix,this.cull,this.debugShowBoundingVolume,c)}}}}};var mt$a=new c$19,lt$e=new c$19;function Te$n(e,t,i){if(i===_0x165ce0.TOP){var n=c$19.clone(e,mt$a),r=c$19.clone(e,lt$e);r.center=a$11.add(r.center,t,r.center),e=c$19.union(n,r,e)}else i===_0x165ce0.ALL&&(e.center=a$11.add(e.center,t,e.center));return e}function _t$8(e,t,i){return function(){var n=e.getBatchedAttribute(t,i),r=e.attributes[i],o=r.componentsPerAttribute,a=C$12.createTypedArray(r.componentDatatype,o);return t$$(n.constructor.pack)?n.constructor.pack(n,a,0):a[0]=n,a}}function ft$8(e,t,i,n,r){return function(o){if(!t$$(o)||!t$$(o.length)||o.length<1||o.length>4)throw new t$_("value must be and array with length between 1 and 4.");var a=de$p(o);e.setBatchedAttribute(t,i,a),"offset"===r&&(n._recomputeBoundingSpheres=!0,n._batchTableOffsetsUpdated=!1)}}var bt$8=new a$11;function gt$6(e,t,i){t.boundingSphere={get:function(){var n=e._instanceBoundingSpheres[i];if(t$$(n)&&e.updateBoundingSphere){n=n.clone();var r=e.modelMatrix,o=t.offset;t$$(o)&&Te$n(n,a$11.fromArray(o.get(),0,bt$8),e._offsetInstanceExtend[i]),t$$(r)&&(n=c$19.transform(n,r))}return n}},t.boundingSphereCV={get:function(){return e._instanceBoundingSpheresCV[i]}}}function vt$7(e,t,i){t.pickId={get:function(){return e._pickIds[i]}}}function N$I(e,t,i,n){e._error=n,e._state=i,t.afterRender.push((function(){e._ready=e._state===ce$n.COMPLETE||e._state===ce$n.FAILED,t$$(n)?e._readyPromise.reject(n):e._readyPromise.resolve(e)}))}y$H.prototype.getGeometryInstanceAttributes=function(e){if(!t$$(e))throw new t$_("id is required");if(!t$$(this._batchTable))throw new t$_("must call update before calling getGeometryInstanceAttributes");for(var t=-1,i=this._lastPerInstanceAttributeIndex,n=this._instanceIds,r=n.length,o=0;o<r;++o){var a=(i+o)%r;if(e===n[a]){t=a;break}}if(-1!==t){var s=this._perInstanceAttributeCache[t];if(t$$(s))return s;var l=this._batchTable,u=this._batchTableAttributeIndices;s={};var c={};for(var h in u)if(u.hasOwnProperty(h)){var d=u[h];c[h]={get:_t$8(l,t,d)};var f=!0,p=this._readOnlyInstanceAttributes;if(f&&t$$(p)){r=p.length;for(var _=0;_<r;++_)if(h===p[_]){f=!1;break}}f&&(c[h].set=ft$8(l,t,d,this,h))}return gt$6(this,c,t),vt$7(this,c,t),Object.defineProperties(s,c),this._lastPerInstanceAttributeIndex=t,this._perInstanceAttributeCache[t]=s,s}},y$H.prototype.isDestroyed=function(){return!1},y$H.prototype.destroy=function(){var e,t;this._sp=this._sp&&this._sp.destroy(),this._pickSP=this._pickSP&&this._pickSP.destroy();var i=this._va;for(e=i.length,t=0;t<e;++t)i[t].destroy();this._va=void 0;var n=this._pickIds;for(e=n.length,t=0;t<e;++t)n[t].destroy();return this._pickIds=void 0,this._batchTable=this._batchTable&&this._batchTable.destroy(),this._instanceIds=void 0,this._perInstanceAttributeCache=void 0,this._attributeLocations=void 0,s$1e(this)},y$H.prototype.setPolygonOffset=function(e,t){0!=e||0!=t?(this._polygonOffset.enabled=!0,r$T.fromElements(e,t,this._polygonOffset.value)):(this._polygonOffset.enabled=!1,r$T.fromElements(0,0,this._polygonOffset.value))};var V$y="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\nvarying vec4 v_sphericalExtents;\n#else // SPHERICAL\nvarying vec2 v_inversePlaneExtents;\nvarying vec4 v_westPlane;\nvarying vec4 v_southPlane;\n#endif // SPHERICAL\nvarying vec3 v_uvMinAndSphericalLongitudeRotation;\nvarying vec3 v_uMaxAndInverseDistance;\nvarying vec3 v_vMaxAndInverseDistance;\n#endif // TEXTURE_COORDINATES\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif\n#ifdef NORMAL_EC\nvec3 getEyeCoordinate3FromWindowCoordinate(vec2 fragCoord, float logDepthOrDepth)\n{\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(fragCoord, logDepthOrDepth);\nreturn eyeCoordinate.xyz / eyeCoordinate.w;\n}\nvec3 vectorFromOffset(vec4 eyeCoordinate, vec2 positiveOffset)\n{\nvec2 glFragCoordXY = gl_FragCoord.xy;\nfloat upOrRightLogDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, (glFragCoordXY + positiveOffset) / czm_viewport.zw));\nfloat downOrLeftLogDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, (glFragCoordXY - positiveOffset) / czm_viewport.zw));\nbvec2 upOrRightInBounds = lessThan(glFragCoordXY + positiveOffset, czm_viewport.zw);\nfloat useUpOrRight = float(upOrRightLogDepth > 0.0 && upOrRightInBounds.x && upOrRightInBounds.y);\nfloat useDownOrLeft = float(useUpOrRight == 0.0);\nvec3 upOrRightEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY + positiveOffset, upOrRightLogDepth);\nvec3 downOrLeftEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY - positiveOffset, downOrLeftLogDepth);\nreturn (upOrRightEC - (eyeCoordinate.xyz / eyeCoordinate.w)) * useUpOrRight + ((eyeCoordinate.xyz / eyeCoordinate.w) - downOrLeftEC) * useDownOrLeft;\n}\n#endif // NORMAL_EC\nvoid main(void)\n{\n#ifdef REQUIRES_EC\nfloat logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_globeDepthTextureDim.xy));\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n#endif\n#ifdef REQUIRES_WC\nvec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;\nvec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;\n#endif\n#ifdef TEXTURE_COORDINATES\nvec2 uv;\n#ifdef SPHERICAL\nvec2 sphericalLatLong = czm_approximateSphericalCoordinates(worldCoordinate);\nsphericalLatLong.y += v_uvMinAndSphericalLongitudeRotation.z;\nsphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);\nuv.x = (sphericalLatLong.y - v_sphericalExtents.y) * v_sphericalExtents.w;\nuv.y = (sphericalLatLong.x - v_sphericalExtents.x) * v_sphericalExtents.z;\n#else // SPHERICAL\nuv.x = czm_planeDistance(v_westPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.x;\nuv.y = czm_planeDistance(v_southPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.y;\n#endif // SPHERICAL\n#endif // TEXTURE_COORDINATES\n#ifdef PICK\n#ifdef CULL_FRAGMENTS\nif (0.0 <= uv.x && uv.x <= 1.0 && 0.0 <= uv.y && uv.y <= 1.0)\n{\ngl_FragColor.a = 1.0;\nczm_writeDepthClampedToFarPlane();\n}\n#else // CULL_FRAGMENTS\ngl_FragColor.a = 1.0;\n#endif // CULL_FRAGMENTS\n#else // PICK\n#ifdef CULL_FRAGMENTS\nif (uv.x <= 0.0 || 1.0 <= uv.x || uv.y <= 0.0 || 1.0 <= uv.y)\n{\ndiscard;\n}\n#endif\n#ifdef NORMAL_EC\nvec3 downUp = vectorFromOffset(eyeCoordinate, vec2(0.0, 1.0));\nvec3 leftRight = vectorFromOffset(eyeCoordinate, vec2(1.0, 0.0));\nvec3 normalEC = normalize(cross(leftRight, downUp));\n#endif\n#ifdef PER_INSTANCE_COLOR\nvec4 color = czm_gammaCorrect(v_color);\n#ifdef FLAT\ngl_FragColor = color;\n#else // FLAT\nczm_materialInput materialInput;\nmaterialInput.normalEC = normalEC;\nmaterialInput.positionToEyeEC = -eyeCoordinate.xyz;\nczm_material material = czm_getDefaultMaterial(materialInput);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = color.a;\ngl_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);\n#endif // FLAT\n#else // PER_INSTANCE_COLOR\nczm_materialInput materialInput;\n#ifdef USES_NORMAL_EC\nmaterialInput.normalEC = normalEC;\n#endif\n#ifdef USES_POSITION_TO_EYE_EC\nmaterialInput.positionToEyeEC = -eyeCoordinate.xyz;\n#endif\n#ifdef USES_TANGENT_TO_EYE\nmaterialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(worldCoordinate, normalEC);\n#endif\n#ifdef USES_ST\nmaterialInput.st.x = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_uMaxAndInverseDistance.xy, uv) * v_uMaxAndInverseDistance.z;\nmaterialInput.st.y = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_vMaxAndInverseDistance.xy, uv) * v_vMaxAndInverseDistance.z;\n#endif\nczm_material material = czm_getMaterial(materialInput);\n#ifdef FLAT\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else // FLAT\ngl_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);\n#endif // FLAT\n#endif // PER_INSTANCE_COLOR\nczm_writeDepthClampedToFarPlane();\n#endif // PICK\n}\n";function T$L(e,t,i,n){n$1e.typeOf.bool("extentsCulling",e),n$1e.typeOf.bool("planarExtents",t),n$1e.typeOf.object("appearance",i),n$1e.typeOf.bool("useFloatBatchTable",n),this._projectionExtentDefines={eastMostYhighDefine:"",eastMostYlowDefine:"",westMostYhighDefine:"",westMostYlowDefine:""},this._useFloatBatchTable=n;var r=new R$C;r.requiresTextureCoordinates=e,r.requiresEC=!i.flat;var o=new R$C;if(o.requiresTextureCoordinates=e,i instanceof r$u)r.requiresNormalEC=!i.flat;else{var a=i.material.shaderSource+"\n"+i.fragmentShaderSource;r.normalEC=-1!==a.indexOf("materialInput.normalEC")||-1!==a.indexOf("czm_getDefaultMaterial"),r.positionToEyeEC=-1!==a.indexOf("materialInput.positionToEyeEC"),r.tangentToEyeMatrix=-1!==a.indexOf("materialInput.tangentToEyeMatrix"),r.st=-1!==a.indexOf("materialInput.st")}this._colorShaderDependencies=r,this._pickShaderDependencies=o,this._appearance=i,this._extentsCulling=e,this._planarExtents=t}T$L.prototype.createFragmentShader=function(e){n$1e.typeOf.bool("columbusView2D",e);var t=this._appearance,i=this._colorShaderDependencies,n=[];!e&&!this._planarExtents&&n.push("SPHERICAL"),i.requiresEC&&n.push("REQUIRES_EC"),i.requiresWC&&n.push("REQUIRES_WC"),i.requiresTextureCoordinates&&n.push("TEXTURE_COORDINATES"),this._extentsCulling&&n.push("CULL_FRAGMENTS"),i.requiresNormalEC&&n.push("NORMAL_EC"),t instanceof r$u&&n.push("PER_INSTANCE_COLOR"),i.normalEC&&n.push("USES_NORMAL_EC"),i.positionToEyeEC&&n.push("USES_POSITION_TO_EYE_EC"),i.tangentToEyeMatrix&&n.push("USES_TANGENT_TO_EYE"),i.st&&n.push("USES_ST"),t.flat&&n.push("FLAT");var r="";return t instanceof r$u||(r=t.material.shaderSource),new a$O({defines:n,sources:[r,V$y]})},T$L.prototype.createPickFragmentShader=function(e){n$1e.typeOf.bool("columbusView2D",e);var t=this._pickShaderDependencies,i=["PICK"];return!e&&!this._planarExtents&&i.push("SPHERICAL"),t.requiresEC&&i.push("REQUIRES_EC"),t.requiresWC&&i.push("REQUIRES_WC"),t.requiresTextureCoordinates&&i.push("TEXTURE_COORDINATES"),this._extentsCulling&&i.push("CULL_FRAGMENTS"),new a$O({defines:i,sources:[V$y],pickColorQualifier:"varying"})},T$L.prototype.createVertexShader=function(e,t,i,n){return n$1e.defined("defines",e),n$1e.typeOf.string("vertexShaderSource",t),n$1e.typeOf.bool("columbusView2D",i),n$1e.defined("mapProjection",n),Q$E(this._colorShaderDependencies,this._planarExtents,i,e,t,this._appearance,n,this._useFloatBatchTable,this._projectionExtentDefines)},T$L.prototype.createPickVertexShader=function(e,t,i,n){return n$1e.defined("defines",e),n$1e.typeOf.string("vertexShaderSource",t),n$1e.typeOf.bool("columbusView2D",i),n$1e.defined("mapProjection",n),Q$E(this._pickShaderDependencies,this._planarExtents,i,e,t,void 0,n,this._useFloatBatchTable,this._projectionExtentDefines)};var B$x=new a$11,k$D=new i$1g,X$u={high:0,low:0};function Q$E(e,t,i,n,r,o,a,s,l){var u=n.slice();if(""===l.eastMostYhighDefine){var c=k$D;c.longitude=n$1d.PI,c.latitude=0,c.height=0;var h=a.project(c,B$x),d=t$R.encode(h.x,X$u);l.eastMostYhighDefine="EAST_MOST_X_HIGH "+d.high.toFixed((d.high+"").length+1),l.eastMostYlowDefine="EAST_MOST_X_LOW "+d.low.toFixed((d.low+"").length+1);var f=k$D;f.longitude=-n$1d.PI,f.latitude=0,f.height=0;var p=a.project(f,B$x);d=t$R.encode(p.x,X$u),l.westMostYhighDefine="WEST_MOST_X_HIGH "+d.high.toFixed((d.high+"").length+1),l.westMostYlowDefine="WEST_MOST_X_LOW "+d.low.toFixed((d.low+"").length+1)}return i&&(u.push(l.eastMostYhighDefine),u.push(l.eastMostYlowDefine),u.push(l.westMostYhighDefine),u.push(l.westMostYlowDefine)),t$$(o)&&o instanceof r$u&&u.push("PER_INSTANCE_COLOR"),e.requiresTextureCoordinates&&(u.push("TEXTURE_COORDINATES"),t||i||u.push("SPHERICAL"),i&&u.push("COLUMBUS_VIEW_2D")),s||u.push("UINT8_PACKING"),new a$O({defines:u,sources:[r]})}function R$C(){this._requiresEC=!1,this._requiresWC=!1,this._requiresNormalEC=!1,this._requiresTextureCoordinates=!1,this._usesNormalEC=!1,this._usesPositionToEyeEC=!1,this._usesTangentToEyeMat=!1,this._usesSt=!1}function K$A(e,t,i){return Math.abs((t.y-e.y)*i.x-(t.x-e.x)*i.y+t.x*e.y-t.y*e.x)/r$T.distance(t,e)}Object.defineProperties(R$C.prototype,{requiresEC:{get:function(){return this._requiresEC},set:function(e){this._requiresEC=e||this._requiresEC}},requiresWC:{get:function(){return this._requiresWC},set:function(e){this._requiresWC=e||this._requiresWC,this.requiresEC=this._requiresWC}},requiresNormalEC:{get:function(){return this._requiresNormalEC},set:function(e){this._requiresNormalEC=e||this._requiresNormalEC,this.requiresEC=this._requiresNormalEC}},requiresTextureCoordinates:{get:function(){return this._requiresTextureCoordinates},set:function(e){this._requiresTextureCoordinates=e||this._requiresTextureCoordinates,this.requiresWC=this._requiresTextureCoordinates}},normalEC:{set:function(e){this.requiresNormalEC=e,this._usesNormalEC=e},get:function(){return this._usesNormalEC}},tangentToEyeMatrix:{set:function(e){this.requiresWC=e,this.requiresNormalEC=e,this._usesTangentToEyeMat=e},get:function(){return this._usesTangentToEyeMat}},positionToEyeEC:{set:function(e){this.requiresEC=e,this._usesPositionToEyeEC=e},get:function(){return this._usesPositionToEyeEC}},st:{set:function(e){this.requiresTextureCoordinates=e,this._usesSt=e},get:function(){return this._usesSt}}});var ie$v=[new r$T,new r$T,new r$T,new r$T];function J$H(e,t){var i=ie$v,n=r$T.unpack(t,0,i[0]),r=r$T.unpack(t,2,i[1]),o=r$T.unpack(t,4,i[2]);e.uMaxVmax=new r$G({componentDatatype:C$12.FLOAT,componentsPerAttribute:4,normalize:!1,value:[r.x,r.y,o.x,o.y]});var a=1/K$A(n,r,o),s=1/K$A(n,o,r);e.uvMinAndExtents=new r$G({componentDatatype:C$12.FLOAT,componentsPerAttribute:4,normalize:!1,value:[n.x,n.y,a,s]})}function M$N(e,t,i){var n=Math.abs(e),r=Math.floor(n/1e3);n-=1e3*r;var o=Math.floor(n/10);n-=10*o;var a=Math.floor(10*n);n-=.1*a;var s=Math.floor(1e3*n);e<0&&(r=255-r),i[t]=new r$G({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!1,value:[r,o,a,s]})}function A$M(e,t,i){var n=Math.abs(e),r=Math.floor(n/1e6);n-=1e6*r;var o=Math.floor(n/1e4);n-=1e4*o;var a=Math.floor(n/100);n-=100*a;var s=Math.floor(n);e<0&&(r=255-r),i[t]=new r$G({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!1,value:[r,o,a,s]})}function b$Y(e,t,i){var n=Math.abs(e),r=Math.floor(n/1e4);n-=1e4*r;var o=Math.floor(n/100);n-=100*o;var a=Math.floor(n);n-=a;var s=Math.floor(n/.001);e<0&&(r=255-r),i[t]=new r$G({componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!1,value:[r,o,a,s]})}var Z$I=new i$1g,$$E=new a$11,se$p=new a$11,ue$k=new a$11,v$G={high:0,low:0};function Y$A(e,t,i,n){var r=Z$I;r.height=0,r.longitude=e.west,r.latitude=e.south;var o=t.project(r,$$E);r.latitude=e.north;var a=t.project(r,se$p);r.longitude=e.east,r.latitude=e.south;var s,l=t.project(r,ue$k);if(!n)return A$M((s=t$R.encode(o.x,v$G)).high,"planes2D_HIGH_x",i),M$N(s.low,"planes2D_LOW_x",i),A$M((s=t$R.encode(o.y,v$G)).high,"planes2D_HIGH_y",i),M$N(s.low,"planes2D_LOW_y",i),A$M((s=t$R.encode(a.y,v$G)).high,"planes2D_HIGH_z",i),M$N(s.low,"planes2D_LOW_z",i),A$M((s=t$R.encode(l.x,v$G)).high,"planes2D_HIGH_w",i),void M$N(s.low,"planes2D_LOW_w",i);var u=[0,0,0,0],c=[0,0,0,0];s=t$R.encode(o.x,v$G),u[0]=s.high,c[0]=s.low,s=t$R.encode(o.y,v$G),u[1]=s.high,c[1]=s.low,s=t$R.encode(a.y,v$G),u[2]=s.high,c[2]=s.low,s=t$R.encode(l.x,v$G),u[3]=s.high,c[3]=s.low,i.planes2D_HIGH=new r$G({componentDatatype:C$12.FLOAT,componentsPerAttribute:4,normalize:!1,value:u}),i.planes2D_LOW=new r$G({componentDatatype:C$12.FLOAT,componentsPerAttribute:4,normalize:!1,value:c})}var he$l=new c$1a,le$q=new c$1a,ee$s=new a$11,pe$l=new i$1g,_e$i=[new i$1g,new i$1g,new i$1g,new i$1g,new i$1g,new i$1g,new i$1g,new i$1g];function ce$l(e,t,i,n,r,o){var a=s$1p.center(e,pe$l);a.height=i;var s=i$1g.toCartesian(a,t,ee$s),l=m$13.eastNorthUpToFixedFrame(s,t,he$l),u=c$1a.inverse(l,le$q),c=e.west,h=e.east,d=e.north,f=e.south,p=_e$i;p[0].latitude=f,p[0].longitude=c,p[1].latitude=d,p[1].longitude=c,p[2].latitude=d,p[2].longitude=h,p[3].latitude=f,p[3].longitude=h;var _=.5*(c+h),m=.5*(d+f);p[4].latitude=f,p[4].longitude=_,p[5].latitude=d,p[5].longitude=_,p[6].latitude=m,p[6].longitude=c,p[7].latitude=m,p[7].longitude=h;for(var $=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,y=Number.POSITIVE_INFINITY,v=Number.NEGATIVE_INFINITY,x=0;x<8;x++){p[x].height=i;var b=i$1g.toCartesian(p[x],t,ee$s);c$1a.multiplyByPoint(u,b,b),b.z=0,$=Math.min($,b.x),g=Math.max(g,b.x),y=Math.min(y,b.y),v=Math.max(v,b.y)}var S=n;S.x=$,S.y=y,S.z=0,c$1a.multiplyByPoint(l,S,S);var w=r;w.x=g,w.y=y,w.z=0,c$1a.multiplyByPoint(l,w,w),a$11.subtract(w,S,r);var C=o;C.x=$,C.y=v,C.z=0,c$1a.multiplyByPoint(l,C,C),a$11.subtract(C,S,o)}var de$o=new a$11,Ee$m=new a$11,fe$l=new t$R;T$L.getPlanarTextureCoordinateAttributes=function(e,t,i,n,r,o){n$1e.typeOf.object("boundingRectangle",e),n$1e.defined("textureCoordinateRotationPoints",t),n$1e.typeOf.object("ellipsoid",i),n$1e.typeOf.object("projection",n),n$1e.typeOf.bool("useFloatBatchTable",r);var a=$$E,s=de$o,l=Ee$m;ce$l(e,i,e$1Y(o,0),a,s,l);var u={};J$H(u,t);var c=t$R.fromCartesian(a,fe$l);if(!r){var h=c.high;A$M(h.x,"southWest_HIGH_x",u),A$M(h.y,"southWest_HIGH_y",u),A$M(h.z,"southWest_HIGH_z",u);var d=c.low;return M$N(d.x,"southWest_LOW_x",u),M$N(d.y,"southWest_LOW_y",u),M$N(d.z,"southWest_LOW_z",u),b$Y(s.x,"eastward_x",u),b$Y(s.y,"eastward_y",u),b$Y(s.z,"eastward_z",u),b$Y(l.x,"northward_x",u),b$Y(l.y,"northward_y",u),b$Y(l.z,"northward_z",u),Y$A(e,n,u,!1),u}return u.southWest_HIGH=new r$G({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,normalize:!1,value:a$11.pack(c.high,[0,0,0])}),u.southWest_LOW=new r$G({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,normalize:!1,value:a$11.pack(c.low,[0,0,0])}),u.eastward=new r$G({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,normalize:!1,value:a$11.pack(s,[0,0,0])}),u.northward=new r$G({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,normalize:!1,value:a$11.pack(l,[0,0,0])}),Y$A(e,n,u,!0),u};var me$t=new a$11;function te$t(e,t,i,n){var r=Z$I;r.latitude=e,r.longitude=t,r.height=0;var o=i$1g.toCartesian(r,i,me$t),a=Math.sqrt(o.x*o.x+o.y*o.y),s=n$1d.fastApproximateAtan2(a,o.z),l=n$1d.fastApproximateAtan2(o.x,o.y);return n.x=s,n.y=l,n}var ne$s=new r$T;function xe$t(e){return Math.max(e.width,e.height)>T$L.MAX_WIDTH_FOR_PLANAR_EXTENTS}function M$M(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).geometryInstances;if(this.geometryInstances=t,this.show=e$1Y(e.show,!0),this.classificationType=e$1Y(e.classificationType,_0x29401c.BOTH),this.debugShowBoundingVolume=e$1Y(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=e$1Y(e.debugShowShadowVolume,!1),this._debugShowShadowVolume=!1,this._extruded=e$1Y(e._extruded,!1),this._uniformMap=e._uniformMap,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._spColor=void 0,this._spPick2D=void 0,this._spColor2D=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._commandsIgnoreShow=[],this._ready=!1,this._readyPromise=c$18.defer(),this._primitive=void 0,this._pickPrimitive=e._pickPrimitive,this._hasSphericalExtentsAttribute=!1,this._hasPlanarExtentsAttributes=!1,this._hasPerColorAttribute=!1,this.appearance=e.appearance,this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._usePickOffsets=!1,this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:e$1Y(e.vertexCacheOptimize,!1),interleave:e$1Y(e.interleave,!1),releaseGeometryInstances:e$1Y(e.releaseGeometryInstances,!0),allowPicking:e$1Y(e.allowPicking,!0),asynchronous:e$1Y(e.asynchronous,!0),compressVertices:e$1Y(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_createRenderStatesFunction:void 0,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0,_createPickOffsets:!0},e.geometryInstances&&e.geometryInstances.length){var i=e.geometryInstances[0].id;t$$(i)&&i._clampToS3M&&(this.classificationType=_0x29401c.S3M_TILE)}}function F$E(e,t){var i=t?h$N.EQUAL:h$N.ALWAYS,n=Ia$1.CESIUM_3D_TILE_MASK;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:e,frontFunction:i,frontOperation:{fail:o$F.KEEP,zFail:o$F.DECREMENT_WRAP,zPass:o$F.KEEP},backFunction:i,backOperation:{fail:o$F.KEEP,zFail:o$F.INCREMENT_WRAP,zPass:o$F.KEEP},reference:n,mask:n},stencilMask:Ia$1.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:Re$h.LESS_OR_EQUAL},depthMask:!1}}function re$v(){return{cull:{enabled:!1},depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0},stencilTest:{enabled:!0,frontFunction:h$N.ALWAYS,frontOperation:{fail:o$F.KEEP,zFail:o$F.DECREMENT_WRAP,zPass:o$F.KEEP},backFunction:h$N.ALWAYS,backOperation:{fail:o$F.KEEP,zFail:o$F.DECREMENT_WRAP,zPass:o$F.KEEP},reference:0,mask:1},stencilMask:1}}function G$E(e,t){var i=t?h$N.EQUAL:h$N.NOT_EQUAL,n=t?Ia$1.S3M_TILE+1:0;return{stencilTest:{enabled:e,frontFunction:i,frontOperation:{fail:o$F.ZERO,zFail:o$F.ZERO,zPass:o$F.ZERO},backFunction:i,backOperation:{fail:o$F.ZERO,zFail:o$F.ZERO,zPass:o$F.ZERO},reference:n,mask:Ia$1.CLASSIFICATION_MASK},stencilMask:Ia$1.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:Ee$s.ALPHA_BLEND}}function ie$u(){return{cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,stencilTest:{enabled:!0,frontFunction:h$N.EQUAL,frontOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.DECREMENT_WRAP},backFunction:h$N.EQUAL,backOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.DECREMENT_WRAP},reference:3,mask:3},blending:Ee$s.ALPHA_BLEND}}T$L.getSphericalExtentGeometryInstanceAttributes=function(e,t,i,n,r){n$1e.typeOf.object("boundingRectangle",e),n$1e.defined("textureCoordinateRotationPoints",t),n$1e.typeOf.object("ellipsoid",i),n$1e.typeOf.object("projection",n),n$1e.typeOf.bool("useFloatBatchTable",r);var o=te$t(e.south,e.west,i,ne$s),a=o.x,s=o.y,l=te$t(e.north,e.east,i,ne$s),u=l.x,c=l.y,h=0;s>c&&(h=n$1d.PI-s,s=-n$1d.PI,c+=h),a-=n$1d.EPSILON5,s-=n$1d.EPSILON5,u+=n$1d.EPSILON5;var d=1/((c+=n$1d.EPSILON5)-s),f=1/(u-a),p={sphericalExtents:new r$G({componentDatatype:C$12.FLOAT,componentsPerAttribute:4,normalize:!1,value:[a,s,f,d]}),longitudeRotation:new r$G({componentDatatype:C$12.FLOAT,componentsPerAttribute:1,normalize:!1,value:[h]})};return J$H(p,t),Y$A(e,n,p,r),p},T$L.hasAttributesForTextureCoordinatePlanes=function(e){var t=t$$(e.southWest_HIGH)&&t$$(e.southWest_LOW)&&t$$(e.northward)&&t$$(e.eastward)&&t$$(e.planes2D_HIGH)&&t$$(e.planes2D_LOW)&&t$$(e.uMaxVmax)&&t$$(e.uvMinAndExtents),i=t$$(e.southWest_HIGH_x)&&t$$(e.southWest_LOW_x)&&t$$(e.southWest_HIGH_y)&&t$$(e.southWest_LOW_y)&&t$$(e.southWest_HIGH_z)&&t$$(e.southWest_LOW_z)&&t$$(e.northward_x)&&t$$(e.eastward_x)&&t$$(e.northward_y)&&t$$(e.eastward_y)&&t$$(e.northward_z)&&t$$(e.eastward_z)&&t$$(e.planes2D_HIGH_x)&&t$$(e.planes2D_LOW_x)&&t$$(e.planes2D_HIGH_y)&&t$$(e.planes2D_LOW_y)&&t$$(e.planes2D_HIGH_z)&&t$$(e.planes2D_LOW_z)&&t$$(e.planes2D_HIGH_w)&&t$$(e.planes2D_LOW_w)&&t$$(e.uMaxVmax)&&t$$(e.uvMinAndExtents);return t||i},T$L.hasAttributesForSphericalExtents=function(e){var t=t$$(e.sphericalExtents)&&t$$(e.longitudeRotation)&&t$$(e.planes2D_HIGH)&&t$$(e.planes2D_LOW)&&t$$(e.uMaxVmax)&&t$$(e.uvMinAndExtents),i=t$$(e.sphericalExtents)&&t$$(e.longitudeRotation)&&t$$(e.planes2D_HIGH_x)&&t$$(e.planes2D_LOW_x)&&t$$(e.planes2D_HIGH_y)&&t$$(e.planes2D_LOW_y)&&t$$(e.planes2D_HIGH_z)&&t$$(e.planes2D_LOW_z)&&t$$(e.planes2D_HIGH_w)&&t$$(e.planes2D_LOW_w)&&t$$(e.uMaxVmax)&&t$$(e.uvMinAndExtents);return t||i},T$L.shouldUseSphericalCoordinates=function(e){return n$1e.typeOf.object("rectangle",e),xe$t(e)},T$L.MAX_WIDTH_FOR_PLANAR_EXTENTS=n$1d.toRadians(1),Object.defineProperties(M$M.prototype,{vertexCacheOptimize:{get:function(){return this._primitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},compressVertices:{get:function(){return this._primitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},_needs2DShader:{get:function(){return this._hasPlanarExtentsAttributes||this._hasSphericalExtentsAttribute}}}),M$M.isSupported=function(e){return e.context.stencilBuffer};var ae$t={stencilTest:{enabled:!0,frontFunction:h$N.NOT_EQUAL,frontOperation:{fail:o$F.ZERO,zFail:o$F.ZERO,zPass:o$F.ZERO},backFunction:h$N.NOT_EQUAL,backOperation:{fail:o$F.ZERO,zFail:o$F.ZERO,zPass:o$F.ZERO},reference:0,mask:Ia$1.CLASSIFICATION_MASK},stencilMask:Ia$1.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function se$o(e,t,i,n){if(!t$$(e._rsColorPass)){var r=!e.debugShowShadowVolume;e._rsStencilDepthPass=p$1a.fromCache(F$E(r,!1)),e._rsStencilDepthPass3DTiles=p$1a.fromCache(F$E(r,!0)),e._rsStencilDepthPassS3M=p$1a.fromCache(re$v()),e._rsColorPass=p$1a.fromCache(G$E(r,!1)),e._rsColorPassS3M=p$1a.fromCache(ie$u()),e._rsPickPass=p$1a.fromCache(ae$t)}}function oe$s(e,t){if(!e.compressVertices)return t;if(-1!==t.search(/attribute\s+vec3\s+extrudeDirection;/g)){var i="compressedAttributes",n="attribute vec2 "+i+";",r="vec3 extrudeDirection;\n",o=t;return o=o.replace(/attribute\s+vec3\s+extrudeDirection;/g,""),[n,r,o=a$O.replaceMain(o,"czm_non_compressed_main"),"void main() \n{ \n extrudeDirection = czm_octDecode(compressedAttributes, 65535.0);\n czm_non_compressed_main(); \n}"].join("\n")}}function ne$r(e,t){var i=t.context,n=e._primitive,r=X$x;r=e._primitive._batchTable.getVertexShaderCallback()(r),r=y$H._appendDistanceDisplayConditionToShader(n,r),r=y$H._modifyShaderPosition(e,r,t.scene3DOnly),r=y$H._updateColorAttribute(n,r);var o=e._hasPlanarExtentsAttributes,a=o||e._hasSphericalExtentsAttribute;e._extruded&&(r=oe$s(n,r));var s=e._extruded?"EXTRUDED_GEOMETRY":"",l=new a$O({defines:[s],sources:[r]}),u=new a$O({sources:[Y$F]});e._primitive._swipeEnabled&&u.defines.push("APPLY_SWIPE");var c=e._primitive._attributeLocations,h=new T$L(a,o,e.appearance,i.floatTextureSixPlaces);if(e._spStencil=p$15.replaceCache({context:i,shaderProgram:e._spStencil,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:c}),e._primitive.allowPicking){var d=a$O.createPickVertexShaderSource(r);d=y$H._appendShowToShader(n,d),d=y$H._updatePickColorAttribute(d);var f=h.createPickFragmentShader(!1),p=h.createPickVertexShader([s],d,!1,t.mapProjection);if(e._spPick=p$15.replaceCache({context:i,shaderProgram:e._spPick,vertexShaderSource:p,fragmentShaderSource:f,attributeLocations:c}),a){var _=i.shaderCache.getDerivedShaderProgram(e._spPick,"2dPick");if(!t$$(_)){var m=h.createPickFragmentShader(!0),$=h.createPickVertexShader([s],d,!0,t.mapProjection);_=i.shaderCache.createDerivedShaderProgram(e._spPick,"2dPick",{vertexShaderSource:$,fragmentShaderSource:m,attributeLocations:c})}e._spPick2D=_}}else e._spPick=p$15.fromCache({context:i,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:c});l=new a$O({defines:[s],sources:[r=y$H._appendShowToShader(n,r)]}),e._sp=p$15.replaceCache({context:i,shaderProgram:e._sp,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:c});var g=h.createFragmentShader(!1),y=h.createVertexShader([s],r,!1,t.mapProjection);if(e._spColor=p$15.replaceCache({context:i,shaderProgram:e._spColor,vertexShaderSource:y,fragmentShaderSource:g,attributeLocations:c}),a){var v=i.shaderCache.getDerivedShaderProgram(e._spColor,"2dColor");if(!t$$(v)){var x=h.createFragmentShader(!0),b=h.createVertexShader([s],r,!0,t.mapProjection);v=i.shaderCache.createDerivedShaderProgram(e._spColor,"2dColor",{vertexShaderSource:b,fragmentShaderSource:x,attributeLocations:c})}e._spColor2D=v}}function ce$k(e,t,i){var n=e._primitive,r=2*n._va.length;t.length=r;var o,a,s,l=0,u=n._batchTable.getUniformMapCallback()(e._uniformMap);u.uSwipeRegion=function(){var t=e._primitive._swipeRegion,n=new a$10;return a$10.fromElements(t.x,t.y,t.x+t.z,t.y+t.w,n),n.x=n.x*i.context.drawingBufferWidth,n.y=(1-n.y)*i.context.drawingBufferHeight,n.z=n.z*i.context.drawingBufferWidth,n.w=(1-n.w)*i.context.drawingBufferHeight,n};var c=e._needs2DShader;for(o=0;o<r;o+=2){var h=n._va[l++];t$$(a=t[o])||(a=t[o]=new s$1d({owner:e,primitiveType:n._primitiveType})),a.vertexArray=h,a.renderState=e._rsStencilDepthPass,a.shaderProgram=e._sp,a.uniformMap=u,a.pass=we$l.TERRAIN_CLASSIFICATION,(s=s$1d.shallowClone(a,a.derivedCommands.tileset)).renderState=e._rsStencilDepthPass3DTiles,s.pass=we$l.CESIUM_3D_TILE_CLASSIFICATION,a.derivedCommands.tileset=s,(s=s$1d.shallowClone(a,a.derivedCommands.s3mtiles)).renderState=e._rsStencilDepthPassS3M,s.pass=we$l.ClampObject,a.derivedCommands.s3mtiles=s,t$$(a=t[o+1])||(a=t[o+1]=new s$1d({owner:e,primitiveType:n._primitiveType})),a.vertexArray=h,a.renderState=e._rsColorPass,a.shaderProgram=e._spColor,a.pass=we$l.TERRAIN_CLASSIFICATION;var d=e.appearance.material;if(t$$(d)&&(u=s$1n(u,d._uniforms)),a.uniformMap=u,(s=s$1d.shallowClone(a,a.derivedCommands.tileset)).pass=we$l.CESIUM_3D_TILE_CLASSIFICATION,a.derivedCommands.tileset=s,(s=s$1d.shallowClone(a,a.derivedCommands.s3mtiles)).pass=we$l.ClampObject,s.renderState=e._rsColorPassS3M,a.derivedCommands.s3mtiles=s,c){var f=s$1d.shallowClone(a,a.derivedCommands.appearance2D);f.shaderProgram=e._spColor2D,a.derivedCommands.appearance2D=f,(f=s$1d.shallowClone(s,s.derivedCommands.appearance2D)).shaderProgram=e._spColor2D,s.derivedCommands.appearance2D=f}}var p=e._commandsIgnoreShow,_=e._spStencil,m=0;r=p.length=r/2;for(var $=0;$<r;++$){var g=p[$]=s$1d.shallowClone(t[m],p[$]);g.shaderProgram=_,g.pass=we$l.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,m+=2}}function de$n(e,t){var i,n,r=e._usePickOffsets,o=we$l.TERRAIN_CLASSIFICATION,a=we$l.CESIUM_3D_TILE_CLASSIFICATION,s=we$l.ClampObject,l=e._primitive,u=2*l._va.length,c=0;r&&(u=2*(i=l._pickOffsets).length),t.length=u;var h,d,f,p=0,_=l._batchTable.getUniformMapCallback()(e._uniformMap),m=e._needs2DShader;for(h=0;h<u;h+=2){var $,g=l._va[p++];if(r&&(n=i[c++],g=l._va[n.index]),t$$(d=t[h])||(d=t[h]=new s$1d({owner:e,primitiveType:l._primitiveType,pickOnly:!0})),d.vertexArray=g,d.renderState=e._rsStencilDepthPass,d.shaderProgram=e._sp,d.uniformMap=_,d.pass=o,r&&(d.offset=n.offset,d.count=n.count),(f=s$1d.shallowClone(d,d.derivedCommands.tileset)).renderState=e._rsStencilDepthPass3DTiles,f.pass=a,d.derivedCommands.tileset=f,(f=s$1d.shallowClone(d,d.derivedCommands.s3mtiles)).renderState=e._rsStencilDepthPassS3M,f.pass=s,d.derivedCommands.s3mtiles=f,t$$(d=t[h+1])||(d=t[h+1]=new s$1d({owner:e,primitiveType:l._primitiveType,pickOnly:!0})),d.vertexArray=g,d.renderState=e._rsPickPass,d.shaderProgram=e._spPick,d.uniformMap=_,d.pass=o,r&&(d.offset=n.offset,d.count=n.count),(f=s$1d.shallowClone(d,d.derivedCommands.tileset)).pass=a,d.derivedCommands.tileset=f,m)($=s$1d.shallowClone(d,d.derivedCommands.pick2D)).shaderProgram=e._spPick2D,d.derivedCommands.pick2D=$,($=s$1d.shallowClone(f,f.derivedCommands.pick2D)).shaderProgram=e._spPick2D,f.derivedCommands.pick2D=$;if((f=s$1d.shallowClone(d,d.derivedCommands.s3mtiles)).pass=s,d.derivedCommands.s3mtiles=f,m)($=s$1d.shallowClone(d,d.derivedCommands.pick2D)).shaderProgram=e._spPick2D,d.derivedCommands.pick2D=$,($=s$1d.shallowClone(f,f.derivedCommands.pick2D)).shaderProgram=e._spPick2D,f.derivedCommands.pick2D=$}}function me$s(e,t,i,n,r,o,a,s){ce$k(e,o,s),de$n(e,a)}function Z$H(e,t){return Math.floor(e%t/3)}function K$z(e,t,i,n,r,o){e.modelMatrix=i,e.boundingVolume=r,e.cull=n,e.debugShowBoundingVolume=o,t.commandList.push(e)}function j$J(e,t,i,n,r){e.modelMatrix=i,e.boundingVolume=r,e.cull=n,t.commandList.push(e)}function he$k(e,t,i,n,r,o,a,s){var l,u=e._primitive;y$H._updateBoundingVolumes(u,t,r),t.mode===b$1d.SCENE3D?l=u._boundingSphereWC:t.mode===b$1d.COLUMBUS_VIEW?l=u._boundingSphereCV:t.mode===b$1d.SCENE2D&&t$$(u._boundingSphere2D)?l=u._boundingSphere2D:t$$(u._boundingSphereMorph)&&(l=u._boundingSphereMorph);var c,h,d=e.classificationType,f=d!==_0x29401c.CESIUM_3D_TILE,p=d!==_0x29401c.TERRAIN,_=t.passes;if(_.render){var m=i.length;for(c=0;c<m;++c)h=l[Z$H(c,m)],f&&K$z(i[c],t,r,o,h,a),p&&K$z(i[c].derivedCommands.tileset,t,r,o,h,a);if(t.invertClassification){var $=e._commandsIgnoreShow,g=$.length;for(c=0;c<g;++c)h=l[Math.floor(c/2)],K$z($[c],t,r,o,h,a)}}if(_.pick){var y=n.length,v=u._pickOffsets;for(c=0;c<y;++c){h=l[v[Z$H(c,y)].index],f&&j$J(n[c],t,r,o,h),p&&j$J(n[c].derivedCommands.tileset,t,r,o,h)}}}M$M.prototype.update=function(e){if(t$$(this._primitive)||t$$(this.geometryInstances)){var t=this.appearance;t$$(t)&&t$$(t.material)&&t.material.update(e.context);var i=this,n=this._primitiveOptions;if(!t$$(this._primitive)){var r,o,a,s,l=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],u=l.length,c=!1,h=!0,d=!1,f=!1;for(u>0&&(a=l[0].attributes,d=T$L.hasAttributesForSphericalExtents(a),f=T$L.hasAttributesForTextureCoordinatePlanes(a),s=a.color),r=0;r<u;r++){var p=(o=l[r]).attributes.color;if(t$$(p))c=!0;else if(c)throw new t$_("All GeometryInstances must have color attributes to use per-instance color.");h=h&&t$$(p)&&r$I.equals(s,p)}if(!h&&!d&&!f)throw new t$_("All GeometryInstances must have the same color attribute except via GroundPrimitives");if(c&&!t$$(t)&&(t=new r$u({flat:!0}),this.appearance=t),!c&&t instanceof r$u)throw new t$_("PerInstanceColorAppearance requires color GeometryInstanceAttributes on all GeometryInstances");if(t$$(t.material)&&!d&&!f)throw new t$_("Materials on ClassificationPrimitives are not supported except via GroundPrimitives");this._usePickOffsets=!d&&!f,this._hasSphericalExtentsAttribute=d,this._hasPlanarExtentsAttributes=f,this._hasPerColorAttribute=c;var _=new Array(u);for(r=0;r<u;++r)o=l[r],_[r]=new m$P({geometry:o.geometry,attributes:o.attributes,modelMatrix:o.modelMatrix,id:o.id,pickPrimitive:e$1Y(this._pickPrimitive,i)});n.appearance=t,n.geometryInstances=_,t$$(this._createBoundingVolumeFunction)&&(n._createBoundingVolumeFunction=function(e,t){i._createBoundingVolumeFunction(e,t)}),n._createRenderStatesFunction=function(e,t,n,r){se$o(i)},n._createShaderProgramFunction=function(e,t,n){ne$r(i,t)},n._createCommandsFunction=function(e,t,n,r,o,a,s,l){me$s(i,void 0,void 0,!0,!1,a,s,l)},t$$(this._updateAndQueueCommandsFunction)?n._updateAndQueueCommandsFunction=function(e,t,n,r,o,a,s,l){i._updateAndQueueCommandsFunction(e,t,n,r,o,a,s,l)}:n._updateAndQueueCommandsFunction=function(e,t,n,r,o,a,s,l){he$k(i,t,n,r,o,a,s)},this._primitive=new y$H(n),this._primitive.readyPromise.then((function(e){i._ready=!0,i.releaseGeometryInstances&&(i.geometryInstances=void 0);var t=e._error;t$$(t)?i._readyPromise.reject(t):i._readyPromise.resolve(i)}))}if(this.debugShowShadowVolume&&!this._debugShowShadowVolume&&this._ready?(this._debugShowShadowVolume=!0,this._rsStencilDepthPass=p$1a.fromCache(F$E(!1,!1)),this._rsStencilDepthPass3DTiles=p$1a.fromCache(F$E(!1,!0)),this._rsColorPass=p$1a.fromCache(G$E(!1))):!this.debugShowShadowVolume&&this._debugShowShadowVolume&&(this._debugShowShadowVolume=!1,this._rsStencilDepthPass=p$1a.fromCache(F$E(!0,!1)),this._rsStencilDepthPass3DTiles=p$1a.fromCache(F$E(!0,!0)),this._rsColorPass=p$1a.fromCache(G$E(!0))),this._primitive.appearance!==t){if(!this._hasSphericalExtentsAttribute&&!this._hasPlanarExtentsAttributes&&t$$(t.material))throw new t$_("Materials on ClassificationPrimitives are not supported except via GroundPrimitive");if(!this._hasPerColorAttribute&&t instanceof r$u)throw new t$_("PerInstanceColorAppearance requires color GeometryInstanceAttribute");this._primitive.appearance=t}this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e)}},M$M.prototype.getGeometryInstanceAttributes=function(e){if(!t$$(this._primitive))throw new t$_("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},M$M.prototype.isDestroyed=function(){return!1},M$M.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._spColor=this._spColor&&this._spColor.destroy(),this._spPick2D=void 0,this._spColor2D=void 0,s$1e(this)};var re$u={u_globeMinimumAltitude:function(){return 55e3}};function f$J(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).appearance,i=e.geometryInstances;if(!t$$(t)&&t$$(i))for(var n=Array.isArray(i)?i:[i],r=n.length,o=0;o<r;o++){var a=n[o].attributes;if(t$$(a)&&t$$(a.color)){t=new r$u({flat:!0});break}}this.appearance=t,this.geometryInstances=e.geometryInstances,this.show=e$1Y(e.show,!0),this.classificationType=e$1Y(e.classificationType,_0x29401c.BOTH),this.debugShowBoundingVolume=e$1Y(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=e$1Y(e.debugShowShadowVolume,!1),this._boundingVolumes=[],this._boundingVolumes2D=[],this._ready=!1,this._readyPromise=c$18.defer(),this._primitive=void 0,this._maxHeight=void 0,this._minHeight=void 0,this._maxTerrainHeight=e$1P._defaultMaxTerrainHeight,this._minTerrainHeight=e$1P._defaultMinTerrainHeight,this._boundingSpheresKeys=[],this._boundingSpheres=[],this._useFragmentCulling=!1,this._zIndex=void 0;this._classificationPrimitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:e$1Y(e.vertexCacheOptimize,!1),interleave:e$1Y(e.interleave,!1),releaseGeometryInstances:e$1Y(e.releaseGeometryInstances,!0),allowPicking:e$1Y(e.allowPicking,!0),asynchronous:e$1Y(e.asynchronous,!0),compressVertices:e$1Y(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_updateAndQueueCommandsFunction:void 0,_pickPrimitive:this,_extruded:!0,_uniformMap:re$u,classificationType:this.classificationType}}function B$w(e){return function(t,i){var n=i.maximumRadius,r=n/Math.cos(.5*t)-n;return e._maxHeight+r}}function z$z(e){return function(t,i){return e._minHeight}}Object.defineProperties(f$J.prototype,{vertexCacheOptimize:{get:function(){return this._classificationPrimitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._classificationPrimitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._classificationPrimitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._classificationPrimitiveOptions.allowPicking}},asynchronous:{get:function(){return this._classificationPrimitiveOptions.asynchronous}},compressVertices:{get:function(){return this._classificationPrimitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}}),f$J.isSupported=M$M.isSupported;var oe$r=new a$11,ne$q=new a$11,se$n=new a$11,ae$s=new i$1g,me$r=new s$1p;function O$B(e,t){var i=e.mapProjection.ellipsoid;if(!t$$(t.attributes)||!t$$(t.attributes.position3DHigh))return t$$(t.rectangle)?t.rectangle:void 0;for(var n=t.attributes.position3DHigh.values,r=t.attributes.position3DLow.values,o=n.length,a=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,u=Number.NEGATIVE_INFINITY,c=0;c<o;c+=3){var h=a$11.unpack(n,c,oe$r),d=a$11.unpack(r,c,ne$q),f=a$11.add(h,d,se$n),p=i.cartesianToCartographic(f,ae$s),_=p.latitude,m=p.longitude;a=Math.min(a,_),s=Math.min(s,m),l=Math.max(l,_),u=Math.max(u,m)}var $=me$r;return $.north=l,$.south=a,$.east=u,$.west=s,$}function ue$j(e,t,i){var n=e$1P.getMinimumMaximumHeights(t,i);e._minTerrainHeight=n.minimumTerrainHeight,e._maxTerrainHeight=n.maximumTerrainHeight}function he$j(e,t,i){var n=t.mapProjection.ellipsoid,r=O$B(t,i);if(e.geometryInstances){var o=Number.MIN_VALUE,a=Number.MAX_VALUE,s=!1;for(let t=0;t<e.geometryInstances.length>0;t++){var l=e.geometryInstances[t].geometry._groundBottomAltitude,u=e.geometryInstances[t].geometry._groundExtrudedHeight;if(t$$(l)&&t$$(u)){var c=l+u;o=Math.max(o,c),a=Math.min(a,l),s=!0}}e._maxHeight=s?o:e._maxHeight,e._minHeight=s?a:e._minHeight}var h=(Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances])[0].geometry._granularity,d=b$1o.fromRectangle(r,z$z(e)(h,n),B$w(e)(h,n),n);if(e._boundingVolumes.push(d),!t.scene3DOnly){var f=t.mapProjection,p=c$19.fromRectangleWithHeights2D(r,f,e._maxHeight,e._minHeight);a$11.fromElements(p.center.z,p.center.x,p.center.y,p.center),e._boundingVolumes2D.push(p)}}function j$I(e,t){return Math.floor(e%t/3)}function C$H(e,t,i,n,r,o,a){var s=e._primitive;i.mode!==b$1d.SCENE3D&&t.shaderProgram===s._spColor&&s._needs2DShader&&t.derivedCommands&&t.derivedCommands.appearance2D&&(t=t.derivedCommands.appearance2D),t.owner=e,t.modelMatrix=n,t.boundingVolume=o,t.cull=r,t.debugShowBoundingVolume=a,i.commandList.push(t)}function R$B(e,t,i,n,r,o){var a=e._primitive;i.mode!==b$1d.SCENE3D&&t.shaderProgram===a._spPick&&a._needs2DShader&&(t=t.derivedCommands.pick2D),t.owner=e,t.modelMatrix=n,t.boundingVolume=o,t.cull=r,i.commandList.push(t)}function ce$j(e,t,i,n,r,o,a,s){var l;l=t.mode===b$1d.SCENE3D?e._boundingVolumes:e._boundingVolumes2D;var u,c,h=e.classificationType,d=h!==_0x29401c.CESIUM_3D_TILE&&h!==_0x29401c.S3M_TILE,f=h!==_0x29401c.TERRAIN&&h!==_0x29401c.S3M_TILE,p=h!==_0x29401c.TERRAIN&&h!==_0x29401c.CESIUM_3D_TILE,_=t.passes,m=e._primitive;if(_.render){var $=i.length;for(u=0;u<$;++u)c=l[j$I(u,$)],d&&C$H(e,i[u],t,r,o,c,a),f&&C$H(e,i[u].derivedCommands.tileset,t,r,o,c,a),p&&C$H(e,i[u].derivedCommands.s3mtiles,t,r,o,c,a);if(t.invertClassification){var g=m._commandsIgnoreShow,y=g.length;for(u=0;u<y;++u)c=l[Math.floor(u/2)],C$H(e,g[u],t,r,o,c,a)}}if(_.pick){var v,x=n.length;for(e._useFragmentCulling||(v=m._primitive._pickOffsets),u=0;u<x;++u){if(c=l[j$I(u,x)],!e._useFragmentCulling)c=l[v[j$I(u,x)].index];d&&R$B(e,n[u],t,r,o,c),f&&R$B(e,n[u].derivedCommands.tileset,t,r,o,c),p&&C$H(e,n[u].derivedCommands.s3mtiles,t,r,o,c,a)}}}function t$D(){t$_.throwInstantiationError()}function a$B(e,t,i){n$1e.defined("geometryUpdater",e),n$1e.defined("primitives",t),n$1e.defined("orderedGroundPrimitives",i),this._primitives=t,this._orderedGroundPrimitives=i,this._primitive=void 0,this._outlinePrimitive=void 0,this._geometryUpdater=e,this._options=e._options,this._entity=e._entity,this._material=void 0}function s$S(e){this._definitionChanged=new o$15,this._show=void 0,this._showSubscription=void 0,this._dimensions=void 0,this._dimensionsSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(e$1Y(e,e$1Y.EMPTY_OBJECT))}function t$C(){t$_.throwInstantiationError()}f$J.initializeTerrainHeights=function(){return e$1P.initialize()},f$J.prototype.update=function(e){if(t$$(this._primitive)||t$$(this.geometryInstances)){if(!e$1P.initialized){if(!this.asynchronous)throw new t$_("For synchronous GroundPrimitives, you must call GroundPrimitive.initializeTerrainHeights() and wait for the returned promise to resolve.");return void f$J.initializeTerrainHeights()}var t=this,i=this._classificationPrimitiveOptions;if(!t$$(this._primitive)){var n,r,o,a,s,l=e.mapProjection.ellipsoid,u=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],c=u.length,h=new Array(c);for(a=0;a<c;++a){var d=O$B(e,r=(n=u[a]).geometry);t$$(s)?t$$(d)&&s$1p.union(s,d,s):s=s$1p.clone(d);var f=n.id;if(t$$(f)&&t$$(d)){var p=e$1P.getBoundingSphere(d,l);this._boundingSpheresKeys.push(f),this._boundingSpheres.push(p)}if(!t$$(o=r.constructor)||!t$$(o.createShadowVolume))throw new t$_("Not all of the geometry instances have GroundPrimitive support.")}ue$j(this,s,l);var _=e.terrainExaggeration;this._minHeight=this._minTerrainHeight*_,this._maxHeight=this._maxTerrainHeight*_;var m=f$J._supportsMaterials(e.context);if(this._useFragmentCulling=m,m){var $,g=!0;for(a=0;a<c;++a)if(s=O$B(e,r=(n=u[a]).geometry),T$L.shouldUseSphericalCoordinates(s)){g=!1;break}for(a=0;a<c;++a){o=(r=(n=u[a]).geometry).constructor;var y=O$B(e,r),v=r.textureCoordinateRotationPoints,x=e.context.floatTextureSixPlaces;$=g?T$L.getPlanarTextureCoordinateAttributes(y,v,l,e.mapProjection,x,this._maxHeight):T$L.getSphericalExtentGeometryInstanceAttributes(y,v,l,e.mapProjection,x);var b=n.attributes;for(var S in b)b.hasOwnProperty(S)&&($[S]=b[S]);n.created?h[a]=new m$P({geometry:n._groundGeometry,attributes:$,id:n.id}):(h[a]=new m$P({geometry:o.createShadowVolume(r,z$z(this),B$w(this)),attributes:$,id:n.id}),n._groundGeometry=h[a].geometry,n.created=!0)}}else for(a=0;a<c;++a)o=(r=(n=u[a]).geometry).constructor,n.created?h[a]=new m$P({geometry:r,attributes:n.attributes,id:n.id}):(h[a]=new m$P({geometry:o.createShadowVolume(r,z$z(this),B$w(this)),attributes:n.attributes,id:n.id}),n._groundGeometry=h[a].geometry,n.created=!0);i.geometryInstances=h,i.appearance=this.appearance,i._createBoundingVolumeFunction=function(e,i){he$j(t,e,i)},i._updateAndQueueCommandsFunction=function(e,i,n,r,o,a,s,l){ce$j(t,i,n,r,o,a,s)},this._primitive=new M$M(i),this._primitive.readyPromise.then((function(e){t._ready=!0,t.releaseGeometryInstances&&(t.geometryInstances=void 0);var i=e._error;t$$(i)?t._readyPromise.reject(i):t._readyPromise.resolve(t)}))}this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowShadowVolume=this.debugShowShadowVolume,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e)}},f$J.prototype.getBoundingSphere=function(e){var t=this._boundingSpheresKeys.indexOf(e);if(-1!==t)return this._boundingSpheres[t]},f$J.prototype.getGeometryInstanceAttributes=function(e){if(!t$$(this._primitive))throw new t$_("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},f$J.prototype.isDestroyed=function(){return!1},f$J.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),s$1e(this)},f$J._supportsMaterials=function(e){return e.depthTexture},f$J.supportsMaterials=function(e){return n$1e.typeOf.object("scene",e),f$J._supportsMaterials(e.frameState.context)},Object.defineProperties(t$D.prototype,{isConstant:{get:t$_.throwInstantiationError},definitionChanged:{get:t$_.throwInstantiationError}}),t$D.prototype.getType=t$_.throwInstantiationError,t$D.prototype.getValue=t$_.throwInstantiationError,t$D.prototype.equals=t$_.throwInstantiationError,t$D.getValue=function(e,t,i){var n;return t$$(t)&&t$$(n=t.getType(e))?((!t$$(i)||i.type!==n)&&(i=r$v.fromType(n)),t.getValue(e,i.uniforms),i):((!t$$(i)||i.type!==r$v.ColorType)&&(i=r$v.fromType(r$v.ColorType)),e$1z.clone(e$1z.WHITE,i.uniforms.color),i)},a$B.prototype._isHidden=function(e,t,i){return!e.isShowing||!e.isAvailable(i)||!r$w.getValueOrDefault(t.show,i,!0)},a$B.prototype._setOptions=t$_.throwInstantiationError,a$B.prototype.update=function(e){n$1e.defined("time",e);var t=this._geometryUpdater,i=t._onTerrain,n=this._primitives,r=this._orderedGroundPrimitives;r.remove(this._primitive),n.removeAndDestroy(this._primitive),n.removeAndDestroy(this._outlinePrimitive),this._outlinePrimitive=void 0,this._primitive=void 0;var o=this._entity,a=o[this._geometryUpdater._geometryPropertyName];if(this._setOptions(o,a,e),!this._isHidden(o,a,e)){var s=this._geometryUpdater.shadowsProperty.getValue(e),l=this._options;if(!t$$(a.fill)||a.fill.getValue(e)){var u,c=t.fillMaterialProperty,h=c instanceof t$F,d=t._getIsClosed(l);if(h)u=new r$u({closed:d,flat:i&&!t._supportsMaterialsforEntitiesOnTerrain});else{var f=t$D.getValue(e,c,this._material);this._material=f,u=new t$G({material:f,translucent:f.isTranslucent(),closed:d})}if(i)l.vertexFormat=r$u.VERTEX_FORMAT,this._primitive=r.add(new f$J({geometryInstances:this._geometryUpdater.createFillGeometryInstance(e),appearance:u,asynchronous:!1,shadows:s,classificationType:this._geometryUpdater.classificationTypeProperty.getValue(e)}),r$w.getValueOrUndefined(this._geometryUpdater.zIndex,e));else{l.vertexFormat=u.vertexFormat;var p=this._geometryUpdater.createFillGeometryInstance(e);h&&(u.translucent=255!==p.attributes.color.value[3]),this._primitive=n.add(new y$H({geometryInstances:p,appearance:u,asynchronous:!1,shadows:s}))}}if(!i&&t$$(a.outline)&&a.outline.getValue(e)){var _=this._geometryUpdater.createOutlineGeometryInstance(e),m=r$w.getValueOrDefault(a.outlineWidth,e,1);this._outlinePrimitive=n.add(new y$H({geometryInstances:_,appearance:new r$u({flat:!0,translucent:255!==_.attributes.color.value[3],renderState:{lineWidth:t._scene.clampLineWidth(m)}}),asynchronous:!1,shadows:s}))}}},a$B.prototype.getBoundingSphere=function(e){if(!t$$(e))throw new t$_("result is required.");var t,i=this._entity,n=this._primitive,r=this._outlinePrimitive;return t$$(n)&&n.show&&n.ready&&(t$$(t=n.getGeometryInstanceAttributes(i))&&t$$(t.boundingSphere))||t$$(r)&&r.show&&r.ready&&(t$$(t=r.getGeometryInstanceAttributes(i))&&t$$(t.boundingSphere))?(c$19.clone(t.boundingSphere,e),A$T.DONE):t$$(n)&&!n.ready||t$$(r)&&!r.ready?A$T.PENDING:A$T.FAILED},a$B.prototype.isDestroyed=function(){return!1},a$B.prototype.destroy=function(){var e=this._primitives;this._orderedGroundPrimitives.remove(this._primitive),e.removeAndDestroy(this._primitive),e.removeAndDestroy(this._outlinePrimitive),s$1e(this)},Object.defineProperties(s$S.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:v$J("show"),dimensions:v$J("dimensions"),heightReference:v$J("heightReference"),fill:v$J("fill"),material:c$K("material"),outline:v$J("outline"),outlineColor:v$J("outlineColor"),outlineWidth:v$J("outlineWidth"),shadows:v$J("shadows"),distanceDisplayCondition:v$J("distanceDisplayCondition")}),s$S.prototype.clone=function(e){return t$$(e)?(e.show=this.show,e.dimensions=this.dimensions,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new s$S(this)},s$S.prototype.merge=function(e){if(!t$$(e))throw new t$_("source is required.");this.show=e$1Y(this.show,e.show),this.dimensions=e$1Y(this.dimensions,e.dimensions),this.heightReference=e$1Y(this.heightReference,e.heightReference),this.fill=e$1Y(this.fill,e.fill),this.material=e$1Y(this.material,e.material),this.outline=e$1Y(this.outline,e.outline),this.outlineColor=e$1Y(this.outlineColor,e.outlineColor),this.outlineWidth=e$1Y(this.outlineWidth,e.outlineWidth),this.shadows=e$1Y(this.shadows,e.shadows),this.distanceDisplayCondition=e$1Y(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(t$C.prototype,{isConstant:{get:t$_.throwInstantiationError},definitionChanged:{get:t$_.throwInstantiationError},referenceFrame:{get:t$_.throwInstantiationError}}),t$C.prototype.getValue=t$_.throwInstantiationError,t$C.prototype.getValueInReferenceFrame=t$_.throwInstantiationError,t$C.prototype.equals=t$_.throwInstantiationError;var f$I=new r$W;function t$B(e,t){this._definitionChanged=new o$15,this._value=a$11.clone(e),this._referenceFrame=e$1Y(t,be$t.FIXED)}function o$E(e){this._definitionChanged=new o$15,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._cornerType=void 0,this._cornerTypeSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(e$1Y(e,e$1Y.EMPTY_OBJECT))}function o$D(e){return e}function u$I(e,t){return v$J(e,t,o$D)}function o$C(e){this._definitionChanged=new o$15,this._show=void 0,this._showSubscription=void 0,this._length=void 0,this._lengthSubscription=void 0,this._topRadius=void 0,this._topRadiusSubscription=void 0,this._bottomRadius=void 0,this._bottomRadiusSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._slices=void 0,this._slicesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(e$1Y(e,e$1Y.EMPTY_OBJECT))}function s$R(e){this._definitionChanged=new o$15,this._show=void 0,this._showSubscription=void 0,this._semiMajorAxis=void 0,this._semiMajorAxisSubscription=void 0,this._semiMinorAxis=void 0,this._semiMinorAxisSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(e$1Y(e,e$1Y.EMPTY_OBJECT))}function s$Q(e){this._definitionChanged=new o$15,this._show=void 0,this._showSubscription=void 0,this._radii=void 0,this._radiiSubscription=void 0,this._innerRadii=void 0,this._innerRadiiSubscription=void 0,this._minimumClock=void 0,this._minimumClockSubscription=void 0,this._maximumClock=void 0,this._maximumClockSubscription=void 0,this._minimumCone=void 0,this._minimumConeSubscription=void 0,this._maximumCone=void 0,this._maximumConeSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._stackPartitions=void 0,this._stackPartitionsSubscription=void 0,this._slicePartitions=void 0,this._slicePartitionsSubscription=void 0,this._subdivisions=void 0,this._subdivisionsSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(e$1Y(e,e$1Y.EMPTY_OBJECT))}function s$P(e){this._definitionChanged=new o$15,this._show=void 0,this._showSubscription=void 0,this._text=void 0,this._textSubscription=void 0,this._font=void 0,this._fontSubscription=void 0,this._style=void 0,this._styleSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._showBackground=void 0,this._showBackgroundSubscription=void 0,this._backgroundColor=void 0,this._backgroundColorSubscription=void 0,this._backgroundPadding=void 0,this._backgroundPaddingSubscription=void 0,this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fillColor=void 0,this._fillColorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(e$1Y(e,e$1Y.EMPTY_OBJECT))}t$C.convertToReferenceFrame=function(e,t,i,n,r){if(!t$$(t))return t;if(t$$(r)||(r=new a$11),i===n)return a$11.clone(t,r);var o=m$13.computeIcrfToFixedMatrix(e,f$I);return t$$(o)||(o=m$13.computeTemeToPseudoFixedMatrix(e,f$I)),i===be$t.INERTIAL?r$W.multiplyByVector(o,t,r):i===be$t.FIXED?r$W.multiplyByVector(r$W.transpose(o,f$I),t,r):void 0},Object.defineProperties(t$B.prototype,{isConstant:{get:function(){return!t$$(this._value)||this._referenceFrame===be$t.FIXED}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}}),t$B.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,be$t.FIXED,t)},t$B.prototype.setValue=function(e,t){var i=!1;a$11.equals(this._value,e)||(i=!0,this._value=a$11.clone(e)),t$$(t)&&this._referenceFrame!==t&&(i=!0,this._referenceFrame=t),i&&this._definitionChanged.raiseEvent(this)},t$B.prototype.getValueInReferenceFrame=function(e,t,i){if(!t$$(e))throw new t$_("time is required.");if(!t$$(t))throw new t$_("referenceFrame is required.");return t$C.convertToReferenceFrame(e,this._value,this._referenceFrame,t,i)},t$B.prototype.equals=function(e){return this===e||e instanceof t$B&&a$11.equals(this._value,e._value)&&this._referenceFrame===e._referenceFrame},Object.defineProperties(o$E.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:v$J("show"),positions:v$J("positions"),width:v$J("width"),height:v$J("height"),heightReference:v$J("heightReference"),extrudedHeight:v$J("extrudedHeight"),extrudedHeightReference:v$J("extrudedHeightReference"),cornerType:v$J("cornerType"),granularity:v$J("granularity"),fill:v$J("fill"),material:c$K("material"),outline:v$J("outline"),outlineColor:v$J("outlineColor"),outlineWidth:v$J("outlineWidth"),shadows:v$J("shadows"),distanceDisplayCondition:v$J("distanceDisplayCondition"),classificationType:v$J("classificationType"),zIndex:v$J("zIndex")}),o$E.prototype.clone=function(e){return t$$(e)?(e.show=this.show,e.positions=this.positions,e.width=this.width,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.cornerType=this.cornerType,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new o$E(this)},o$E.prototype.merge=function(e){if(!t$$(e))throw new t$_("source is required.");this.show=e$1Y(this.show,e.show),this.positions=e$1Y(this.positions,e.positions),this.width=e$1Y(this.width,e.width),this.height=e$1Y(this.height,e.height),this.heightReference=e$1Y(this.heightReference,e.heightReference),this.extrudedHeight=e$1Y(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=e$1Y(this.extrudedHeightReference,e.extrudedHeightReference),this.cornerType=e$1Y(this.cornerType,e.cornerType),this.granularity=e$1Y(this.granularity,e.granularity),this.fill=e$1Y(this.fill,e.fill),this.material=e$1Y(this.material,e.material),this.outline=e$1Y(this.outline,e.outline),this.outlineColor=e$1Y(this.outlineColor,e.outlineColor),this.outlineWidth=e$1Y(this.outlineWidth,e.outlineWidth),this.shadows=e$1Y(this.shadows,e.shadows),this.distanceDisplayCondition=e$1Y(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=e$1Y(this.classificationType,e.classificationType),this.zIndex=e$1Y(this.zIndex,e.zIndex)},Object.defineProperties(o$C.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:v$J("show"),length:v$J("length"),topRadius:v$J("topRadius"),bottomRadius:v$J("bottomRadius"),heightReference:v$J("heightReference"),fill:v$J("fill"),material:c$K("material"),outline:v$J("outline"),outlineColor:v$J("outlineColor"),outlineWidth:v$J("outlineWidth"),numberOfVerticalLines:v$J("numberOfVerticalLines"),slices:v$J("slices"),shadows:v$J("shadows"),distanceDisplayCondition:v$J("distanceDisplayCondition")}),o$C.prototype.clone=function(e){return t$$(e)?(e.show=this.show,e.length=this.length,e.topRadius=this.topRadius,e.bottomRadius=this.bottomRadius,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.numberOfVerticalLines=this.numberOfVerticalLines,e.slices=this.slices,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new o$C(this)},o$C.prototype.merge=function(e){if(!t$$(e))throw new t$_("source is required.");this.show=e$1Y(this.show,e.show),this.length=e$1Y(this.length,e.length),this.topRadius=e$1Y(this.topRadius,e.topRadius),this.bottomRadius=e$1Y(this.bottomRadius,e.bottomRadius),this.heightReference=e$1Y(this.heightReference,e.heightReference),this.fill=e$1Y(this.fill,e.fill),this.material=e$1Y(this.material,e.material),this.outline=e$1Y(this.outline,e.outline),this.outlineColor=e$1Y(this.outlineColor,e.outlineColor),this.outlineWidth=e$1Y(this.outlineWidth,e.outlineWidth),this.numberOfVerticalLines=e$1Y(this.numberOfVerticalLines,e.numberOfVerticalLines),this.slices=e$1Y(this.slices,e.slices),this.shadows=e$1Y(this.shadows,e.shadows),this.distanceDisplayCondition=e$1Y(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(s$R.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:v$J("show"),semiMajorAxis:v$J("semiMajorAxis"),semiMinorAxis:v$J("semiMinorAxis"),height:v$J("height"),heightReference:v$J("heightReference"),extrudedHeight:v$J("extrudedHeight"),extrudedHeightReference:v$J("extrudedHeightReference"),rotation:v$J("rotation"),stRotation:v$J("stRotation"),granularity:v$J("granularity"),fill:v$J("fill"),material:c$K("material"),outline:v$J("outline"),outlineColor:v$J("outlineColor"),outlineWidth:v$J("outlineWidth"),numberOfVerticalLines:v$J("numberOfVerticalLines"),shadows:v$J("shadows"),distanceDisplayCondition:v$J("distanceDisplayCondition"),classificationType:v$J("classificationType"),zIndex:v$J("zIndex")}),s$R.prototype.clone=function(e){return t$$(e)?(e.show=this.show,e.semiMajorAxis=this.semiMajorAxis,e.semiMinorAxis=this.semiMinorAxis,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.rotation=this.rotation,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.numberOfVerticalLines=this.numberOfVerticalLines,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new s$R(this)},s$R.prototype.merge=function(e){if(!t$$(e))throw new t$_("source is required.");this.show=e$1Y(this.show,e.show),this.semiMajorAxis=e$1Y(this.semiMajorAxis,e.semiMajorAxis),this.semiMinorAxis=e$1Y(this.semiMinorAxis,e.semiMinorAxis),this.height=e$1Y(this.height,e.height),this.heightReference=e$1Y(this.heightReference,e.heightReference),this.extrudedHeight=e$1Y(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=e$1Y(this.extrudedHeightReference,e.extrudedHeightReference),this.rotation=e$1Y(this.rotation,e.rotation),this.stRotation=e$1Y(this.stRotation,e.stRotation),this.granularity=e$1Y(this.granularity,e.granularity),this.fill=e$1Y(this.fill,e.fill),this.material=e$1Y(this.material,e.material),this.outline=e$1Y(this.outline,e.outline),this.outlineColor=e$1Y(this.outlineColor,e.outlineColor),this.outlineWidth=e$1Y(this.outlineWidth,e.outlineWidth),this.numberOfVerticalLines=e$1Y(this.numberOfVerticalLines,e.numberOfVerticalLines),this.shadows=e$1Y(this.shadows,e.shadows),this.distanceDisplayCondition=e$1Y(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=e$1Y(this.classificationType,e.classificationType),this.zIndex=e$1Y(this.zIndex,e.zIndex)},Object.defineProperties(s$Q.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:v$J("show"),radii:v$J("radii"),innerRadii:v$J("innerRadii"),minimumClock:v$J("minimumClock"),maximumClock:v$J("maximumClock"),minimumCone:v$J("minimumCone"),maximumCone:v$J("maximumCone"),heightReference:v$J("heightReference"),fill:v$J("fill"),material:c$K("material"),outline:v$J("outline"),outlineColor:v$J("outlineColor"),outlineWidth:v$J("outlineWidth"),stackPartitions:v$J("stackPartitions"),slicePartitions:v$J("slicePartitions"),subdivisions:v$J("subdivisions"),shadows:v$J("shadows"),distanceDisplayCondition:v$J("distanceDisplayCondition")}),s$Q.prototype.clone=function(e){return t$$(e)?(e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e.minimumClock=this.minimumClock,e.maximumClock=this.maximumClock,e.minimumCone=this.minimumCone,e.maximumCone=this.maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.subdivisions=this.subdivisions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new s$Q(this)},s$Q.prototype.merge=function(e){if(!t$$(e))throw new t$_("source is required.");this.show=e$1Y(this.show,e.show),this.radii=e$1Y(this.radii,e.radii),this.innerRadii=e$1Y(this.innerRadii,e.innerRadii),this.minimumClock=e$1Y(this.minimumClock,e.minimumClock),this.maximumClock=e$1Y(this.maximumClock,e.maximumClock),this.minimumCone=e$1Y(this.minimumCone,e.minimumCone),this.maximumCone=e$1Y(this.maximumCone,e.maximumCone),this.heightReference=e$1Y(this.heightReference,e.heightReference),this.fill=e$1Y(this.fill,e.fill),this.material=e$1Y(this.material,e.material),this.outline=e$1Y(this.outline,e.outline),this.outlineColor=e$1Y(this.outlineColor,e.outlineColor),this.outlineWidth=e$1Y(this.outlineWidth,e.outlineWidth),this.stackPartitions=e$1Y(this.stackPartitions,e.stackPartitions),this.slicePartitions=e$1Y(this.slicePartitions,e.slicePartitions),this.subdivisions=e$1Y(this.subdivisions,e.subdivisions),this.shadows=e$1Y(this.shadows,e.shadows),this.distanceDisplayCondition=e$1Y(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(s$P.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:v$J("show"),text:v$J("text"),font:v$J("font"),style:v$J("style"),scale:v$J("scale"),showBackground:v$J("showBackground"),backgroundColor:v$J("backgroundColor"),backgroundPadding:v$J("backgroundPadding"),pixelOffset:v$J("pixelOffset"),eyeOffset:v$J("eyeOffset"),horizontalOrigin:v$J("horizontalOrigin"),verticalOrigin:v$J("verticalOrigin"),heightReference:v$J("heightReference"),fillColor:v$J("fillColor"),outlineColor:v$J("outlineColor"),outlineWidth:v$J("outlineWidth"),translucencyByDistance:v$J("translucencyByDistance"),pixelOffsetScaleByDistance:v$J("pixelOffsetScaleByDistance"),scaleByDistance:v$J("scaleByDistance"),distanceDisplayCondition:v$J("distanceDisplayCondition"),disableDepthTestDistance:v$J("disableDepthTestDistance")}),s$P.prototype.clone=function(e){return t$$(e)?(e.show=this.show,e.text=this.text,e.font=this.font,e.style=this.style,e.scale=this.scale,e.showBackground=this.showBackground,e.backgroundColor=this.backgroundColor,e.backgroundPadding=this.backgroundPadding,e.pixelOffset=this.pixelOffset,e.eyeOffset=this.eyeOffset,e.horizontalOrigin=this.horizontalOrigin,e.verticalOrigin=this.verticalOrigin,e.heightReference=this.heightReference,e.fillColor=this.fillColor,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.translucencyByDistance=this.translucencyByDistance,e.pixelOffsetScaleByDistance=this.pixelOffsetScaleByDistance,e.scaleByDistance=this.scaleByDistance,e.distanceDisplayCondition=this.distanceDisplayCondition,e.disableDepthTestDistance=this.disableDepthTestDistance,e):new s$P(this)},s$P.prototype.merge=function(e){if(!t$$(e))throw new t$_("source is required.");this.show=e$1Y(this.show,e.show),this.text=e$1Y(this.text,e.text),this.font=e$1Y(this.font,e.font),this.style=e$1Y(this.style,e.style),this.scale=e$1Y(this.scale,e.scale),this.showBackground=e$1Y(this.showBackground,e.showBackground),this.backgroundColor=e$1Y(this.backgroundColor,e.backgroundColor),this.backgroundPadding=e$1Y(this.backgroundPadding,e.backgroundPadding),this.pixelOffset=e$1Y(this.pixelOffset,e.pixelOffset),this.eyeOffset=e$1Y(this.eyeOffset,e.eyeOffset),this.horizontalOrigin=e$1Y(this.horizontalOrigin,e.horizontalOrigin),this.verticalOrigin=e$1Y(this.verticalOrigin,e.verticalOrigin),this.heightReference=e$1Y(this.heightReference,e.heightReference),this.fillColor=e$1Y(this.fillColor,e.fillColor),this.outlineColor=e$1Y(this.outlineColor,e.outlineColor),this.outlineWidth=e$1Y(this.outlineWidth,e.outlineWidth),this.translucencyByDistance=e$1Y(this.translucencyByDistance,e.translucencyByDistance),this.pixelOffsetScaleByDistance=e$1Y(this.pixelOffsetScaleByDistance,e.pixelOffsetScaleByDistance),this.scaleByDistance=e$1Y(this.scaleByDistance,e.scaleByDistance),this.distanceDisplayCondition=e$1Y(this.distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=e$1Y(this.disableDepthTestDistance,e.disableDepthTestDistance)};var s$O=new a$C,i$K=function(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._definitionChanged=new o$15,this._translation=void 0,this._translationSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this.translation=e.translation,this.rotation=e.rotation,this.scale=e.scale};Object.defineProperties(i$K.prototype,{isConstant:{get:function(){return r$w.isConstant(this._translation)&&r$w.isConstant(this._rotation)&&r$w.isConstant(this._scale)}},definitionChanged:{get:function(){return this._definitionChanged}},translation:v$J("translation"),rotation:v$J("rotation"),scale:v$J("scale")}),i$K.prototype.getValue=function(e,t){return t$$(t)||(t=new a$C),t.translation=r$w.getValueOrClonedDefault(this._translation,e,s$O.translation,t.translation),t.rotation=r$w.getValueOrClonedDefault(this._rotation,e,s$O.rotation,t.rotation),t.scale=r$w.getValueOrClonedDefault(this._scale,e,s$O.scale,t.scale),t},i$K.prototype.equals=function(e){return this===e||e instanceof i$K&&r$w.equals(this._translation,e._translation)&&r$w.equals(this._rotation,e._rotation)&&r$w.equals(this._scale,e._scale)};var p$S=function(e,t){this._propertyNames=[],this._definitionChanged=new o$15,t$$(e)&&this.merge(e,t)};function v$F(e){return new i$O(e)}function _$F(e,t){var i=e._propertyNames,n=t._propertyNames,r=i.length;if(r!==n.length)return!1;for(var o=0;o<r;++o){var a=i[o];if(-1===n.indexOf(a)||!r$w.equals(e[a],t[a]))return!1}return!0}function l$K(e){return new i$K(e)}function c$I(e){return new p$S(e,l$K)}function e$10(e){this._show=void 0,this._showSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._minimumPixelSize=void 0,this._minimumPixelSizeSubscription=void 0,this._maximumScale=void 0,this._maximumScaleSubscription=void 0,this._incrementallyLoadTextures=void 0,this._incrementallyLoadTexturesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._uri=void 0,this._uriSubscription=void 0,this._runAnimations=void 0,this._clampAnimations=void 0,this._runAnimationsSubscription=void 0,this._nodeTransformations=void 0,this._nodeTransformationsSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._silhouetteColor=void 0,this._silhouetteColorSubscription=void 0,this._silhouetteSize=void 0,this._silhouetteSizeSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._colorBlendMode=void 0,this._colorBlendModeSubscription=void 0,this._colorBlendAmount=void 0,this._colorBlendAmountSubscription=void 0,this._clippingPlanes=void 0,this._clippingPlanesSubscription=void 0,this._imageBasedLightingFactor=void 0,this._imageBasedLightingFactorSubscription=void 0,this._lightColor=void 0,this._lightColorSubscription=void 0,this._definitionChanged=new o$15,this.merge(e$1Y(e,e$1Y.EMPTY_OBJECT))}function e$$(e){this._definitionChanged=new o$15,this._show=void 0,this._showSubscription=void 0,this._uri=void 0,this._uriSubscription=void 0,this._maximumScreenSpaceError=void 0,this._maximumScreenSpaceErrorSubscription=void 0,this.merge(e$1Y(e,e$1Y.EMPTY_OBJECT))}function s$N(e){this._definitionChanged=new o$15,this._show=void 0,this._showSubscription=void 0,this._leadTime=void 0,this._leadTimeSubscription=void 0,this._trailTime=void 0,this._trailTimeSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._resolution=void 0,this._resolutionSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(e$1Y(e,e$1Y.EMPTY_OBJECT))}function s$M(e){this._definitionChanged=new o$15,this._show=void 0,this._showSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._dimensions=void 0,this._dimensionsSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(e$1Y(e,e$1Y.EMPTY_OBJECT))}function s$L(e){this._definitionChanged=new o$15,this._show=void 0,this._showSubscription=void 0,this._pixelSize=void 0,this._pixelSizeSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(e$1Y(e,e$1Y.EMPTY_OBJECT))}function o$B(e){this._definitionChanged=new o$15,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._depthFailMaterial=void 0,this._depthFailMaterialSubscription=void 0,this._arcType=void 0,this._arcTypeSubscription=void 0,this._clampToGround=void 0,this._clampToGroundSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(e$1Y(e,e$1Y.EMPTY_OBJECT))}function s$K(e){this._show=void 0,this._showSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._shape=void 0,this._enuCenter=void 0,this._shapeSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._cornerType=void 0,this._cornerTypeSubscription=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._distanceDisplayConditionSubsription=void 0,this._definitionChanged=new o$15,this.merge(e$1Y(e,e$1Y.EMPTY_OBJECT))}function o$A(e){this._definitionChanged=new o$15,this._show=void 0,this._showSubscription=void 0,this._coordinates=void 0,this._coordinatesSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distancedisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(e$1Y(e,e$1Y.EMPTY_OBJECT))}function s$J(e){this._definitionChanged=new o$15,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._minimumHeights=void 0,this._minimumHeightsSubscription=void 0,this._maximumHeights=void 0,this._maximumHeightsSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._enuCenter=void 0,this.merge(e$1Y(e,e$1Y.EMPTY_OBJECT))}Object.defineProperties(p$S.prototype,{propertyNames:{get:function(){return this._propertyNames}},isConstant:{get:function(){for(var e=this._propertyNames,t=0,i=e.length;t<i;t++)if(!r$w.isConstant(this[e[t]]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}}),p$S.prototype.hasProperty=function(e){return-1!==this._propertyNames.indexOf(e)},p$S.prototype.addProperty=function(e,t,i){var n=this._propertyNames;if(!t$$(e))throw new t$_("propertyName is required.");if(-1!==n.indexOf(e))throw new t$_(e+" is already a registered property.");n.push(e),Object.defineProperty(this,e,v$J(e,!0,e$1Y(i,v$F))),t$$(t)&&(this[e]=t),this._definitionChanged.raiseEvent(this)},p$S.prototype.removeProperty=function(e){var t=this._propertyNames.indexOf(e);if(!t$$(e))throw new t$_("propertyName is required.");if(-1===t)throw new t$_(e+" is not a registered property.");this._propertyNames.splice(t,1),delete this[e],this._definitionChanged.raiseEvent(this)},p$S.prototype.getValue=function(e,t){if(!t$$(e))throw new t$_("time is required.");t$$(t)||(t={});for(var i=this._propertyNames,n=0,r=i.length;n<r;n++){var o=i[n];t[o]=r$w.getValueOrUndefined(this[o],e,t[o])}return t},p$S.prototype.merge=function(e,t){if(!t$$(e))throw new t$_("source is required.");for(var i=this._propertyNames,n=t$$(e._propertyNames)?e._propertyNames:Object.keys(e),r=0,o=n.length;r<o;r++){var a=n[r],s=this[a],l=e[a];void 0===s&&-1===i.indexOf(a)&&this.addProperty(a,void 0,t),void 0!==l&&(void 0!==s?t$$(s)&&t$$(s.merge)&&s.merge(l):t$$(l)&&t$$(l.merge)&&t$$(l.clone)?this[a]=l.clone():this[a]=l)}},p$S.prototype.equals=function(e){return this===e||e instanceof p$S&&_$F(this,e)},Object.defineProperties(e$10.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:v$J("show"),scale:v$J("scale"),minimumPixelSize:v$J("minimumPixelSize"),maximumScale:v$J("maximumScale"),incrementallyLoadTextures:v$J("incrementallyLoadTextures"),shadows:v$J("shadows"),uri:v$J("uri"),runAnimations:v$J("runAnimations"),clampAnimations:v$J("clampAnimations"),nodeTransformations:v$J("nodeTransformations",void 0,c$I),heightReference:v$J("heightReference"),distanceDisplayCondition:v$J("distanceDisplayCondition"),silhouetteColor:v$J("silhouetteColor"),silhouetteSize:v$J("silhouetteSize"),color:v$J("color"),colorBlendMode:v$J("colorBlendMode"),colorBlendAmount:v$J("colorBlendAmount"),clippingPlanes:v$J("clippingPlanes"),imageBasedLightingFactor:v$J("imageBasedLightingFactor"),lightColor:v$J("lightColor")}),e$10.prototype.clone=function(e){return t$$(e)?(e.show=this.show,e.scale=this.scale,e.minimumPixelSize=this.minimumPixelSize,e.maximumScale=this.maximumScale,e.incrementallyLoadTextures=this.incrementallyLoadTextures,e.shadows=this.shadows,e.uri=this.uri,e.runAnimations=this.runAnimations,e.clampAnimations=this.clampAnimations,e.nodeTransformations=this.nodeTransformations,e.heightReference=this._heightReference,e.distanceDisplayCondition=this.distanceDisplayCondition,e.silhouetteColor=this.silhouetteColor,e.silhouetteSize=this.silhouetteSize,e.color=this.color,e.colorBlendMode=this.colorBlendMode,e.colorBlendAmount=this.colorBlendAmount,e.clippingPlanes=this.clippingPlanes,e.imageBasedLightingFactor=this.imageBasedLightingFactor,e.lightColor=this.lightColor,e):new e$10(this)},e$10.prototype.merge=function(e){if(!t$$(e))throw new t$_("source is required.");this.show=e$1Y(this.show,e.show),this.scale=e$1Y(this.scale,e.scale),this.minimumPixelSize=e$1Y(this.minimumPixelSize,e.minimumPixelSize),this.maximumScale=e$1Y(this.maximumScale,e.maximumScale),this.incrementallyLoadTextures=e$1Y(this.incrementallyLoadTextures,e.incrementallyLoadTextures),this.shadows=e$1Y(this.shadows,e.shadows),this.uri=e$1Y(this.uri,e.uri),this.runAnimations=e$1Y(this.runAnimations,e.runAnimations),this.clampAnimations=e$1Y(this.clampAnimations,e.clampAnimations),this.heightReference=e$1Y(this.heightReference,e.heightReference),this.distanceDisplayCondition=e$1Y(this.distanceDisplayCondition,e.distanceDisplayCondition),this.silhouetteColor=e$1Y(this.silhouetteColor,e.silhouetteColor),this.silhouetteSize=e$1Y(this.silhouetteSize,e.silhouetteSize),this.color=e$1Y(this.color,e.color),this.colorBlendMode=e$1Y(this.colorBlendMode,e.colorBlendMode),this.colorBlendAmount=e$1Y(this.colorBlendAmount,e.colorBlendAmount),this.clippingPlanes=e$1Y(this.clippingPlanes,e.clippingPlanes),this.imageBasedLightingFactor=e$1Y(this.imageBasedLightingFactor,e.imageBasedLightingFactor),this.lightColor=e$1Y(this.lightColor,e.lightColor);var t=e.nodeTransformations;if(t$$(t)){var i=this.nodeTransformations;t$$(i)?i.merge(t):this.nodeTransformations=new p$S(t,l$K)}},Object.defineProperties(e$$.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:v$J("show"),uri:v$J("uri"),maximumScreenSpaceError:v$J("maximumScreenSpaceError")}),e$$.prototype.clone=function(e){return t$$(e)?(e.show=this.show,e.uri=this.uri,e.maximumScreenSpaceError=this.maximumScreenSpaceError,e):new e$$(this)},e$$.prototype.merge=function(e){if(!t$$(e))throw new t$_("source is required.");this.show=e$1Y(this.show,e.show),this.uri=e$1Y(this.uri,e.uri),this.maximumScreenSpaceError=e$1Y(this.maximumScreenSpaceError,e.maximumScreenSpaceError)},Object.defineProperties(s$N.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:v$J("show"),leadTime:v$J("leadTime"),trailTime:v$J("trailTime"),width:v$J("width"),resolution:v$J("resolution"),material:c$K("material"),distanceDisplayCondition:v$J("distanceDisplayCondition")}),s$N.prototype.clone=function(e){return t$$(e)?(e.show=this.show,e.leadTime=this.leadTime,e.trailTime=this.trailTime,e.width=this.width,e.resolution=this.resolution,e.material=this.material,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new s$N(this)},s$N.prototype.merge=function(e){if(!t$$(e))throw new t$_("source is required.");this.show=e$1Y(this.show,e.show),this.leadTime=e$1Y(this.leadTime,e.leadTime),this.trailTime=e$1Y(this.trailTime,e.trailTime),this.width=e$1Y(this.width,e.width),this.resolution=e$1Y(this.resolution,e.resolution),this.material=e$1Y(this.material,e.material),this.distanceDisplayCondition=e$1Y(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(s$M.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:v$J("show"),plane:v$J("plane"),dimensions:v$J("dimensions"),fill:v$J("fill"),material:c$K("material"),outline:v$J("outline"),outlineColor:v$J("outlineColor"),outlineWidth:v$J("outlineWidth"),shadows:v$J("shadows"),distanceDisplayCondition:v$J("distanceDisplayCondition")}),s$M.prototype.clone=function(e){return t$$(e)?(e.show=this.show,e.plane=this.plane,e.dimensions=this.dimensions,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new s$M(this)},s$M.prototype.merge=function(e){if(!t$$(e))throw new t$_("source is required.");this.show=e$1Y(this.show,e.show),this.plane=e$1Y(this.plane,e.plane),this.dimensions=e$1Y(this.dimensions,e.dimensions),this.fill=e$1Y(this.fill,e.fill),this.material=e$1Y(this.material,e.material),this.outline=e$1Y(this.outline,e.outline),this.outlineColor=e$1Y(this.outlineColor,e.outlineColor),this.outlineWidth=e$1Y(this.outlineWidth,e.outlineWidth),this.shadows=e$1Y(this.shadows,e.shadows),this.distanceDisplayCondition=e$1Y(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(s$L.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:v$J("show"),pixelSize:v$J("pixelSize"),heightReference:v$J("heightReference"),color:v$J("color"),outlineColor:v$J("outlineColor"),outlineWidth:v$J("outlineWidth"),scaleByDistance:v$J("scaleByDistance"),translucencyByDistance:v$J("translucencyByDistance"),distanceDisplayCondition:v$J("distanceDisplayCondition"),disableDepthTestDistance:v$J("disableDepthTestDistance")}),s$L.prototype.clone=function(e){return t$$(e)?(e.show=this.show,e.pixelSize=this.pixelSize,e.heightReference=this.heightReference,e.color=this.color,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.scaleByDistance=this.scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.distanceDisplayCondition=this.distanceDisplayCondition,e.disableDepthTestDistance=this.disableDepthTestDistance,e):new s$L(this)},s$L.prototype.merge=function(e){if(!t$$(e))throw new t$_("source is required.");this.show=e$1Y(this.show,e.show),this.pixelSize=e$1Y(this.pixelSize,e.pixelSize),this.heightReference=e$1Y(this.heightReference,e.heightReference),this.color=e$1Y(this.color,e.color),this.outlineColor=e$1Y(this.outlineColor,e.outlineColor),this.outlineWidth=e$1Y(this.outlineWidth,e.outlineWidth),this.scaleByDistance=e$1Y(this.scaleByDistance,e.scaleByDistance),this.translucencyByDistance=e$1Y(this._translucencyByDistance,e.translucencyByDistance),this.distanceDisplayCondition=e$1Y(this.distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=e$1Y(this.disableDepthTestDistance,e.disableDepthTestDistance)},Object.defineProperties(o$B.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:v$J("show"),positions:v$J("positions"),width:v$J("width"),hMax:v$J("hMax"),granularity:v$J("granularity"),material:c$K("material"),depthFailMaterial:c$K("depthFailMaterial"),arcType:v$J("arcType"),clampToGround:v$J("clampToGround"),shadows:v$J("shadows"),distanceDisplayCondition:v$J("distanceDisplayCondition"),classificationType:v$J("classificationType"),zIndex:v$J("zIndex")}),o$B.prototype.clone=function(e){return t$$(e)?(e.show=this.show,e.positions=this.positions,e.width=this.width,e.hMax=this.hMax,e.granularity=this.granularity,e.material=this.material,e.depthFailMaterial=this.depthFailMaterial,e.arcType=this.arcType,e.clampToGround=this.clampToGround,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new o$B(this)},o$B.prototype.merge=function(e){if(!t$$(e))throw new t$_("source is required.");this.show=e$1Y(this.show,e.show),this.positions=e$1Y(this.positions,e.positions),this.width=e$1Y(this.width,e.width),this.granularity=e$1Y(this.granularity,e.granularity),this.material=e$1Y(this.material,e.material),this.depthFailMaterial=e$1Y(this.depthFailMaterial,e.depthFailMaterial),this.arcType=e$1Y(this.arcType,e.arcType),this.clampToGround=e$1Y(this.clampToGround,e.clampToGround),this.shadows=e$1Y(this.shadows,e.shadows),this.distanceDisplayCondition=e$1Y(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=e$1Y(this.classificationType,e.classificationType),this.zIndex=e$1Y(this.zIndex,e.zIndex),this.hMax=e$1Y(this.hMax,e.hMax)},Object.defineProperties(s$K.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:v$J("show"),material:c$K("material"),positions:v$J("positions"),shape:v$J("shape"),granularity:v$J("granularity"),fill:v$J("fill"),outline:v$J("outline"),outlineColor:v$J("outlineColor"),outlineWidth:v$J("outlineWidth"),cornerType:v$J("cornerType"),shadows:v$J("shadows"),distanceDisplayCondition:v$J("distanceDisplayCondition"),enuCenter:v$J("enuCenter")}),s$K.prototype.clone=function(e){return t$$(e)?(e.show=this.show,e.material=this.material,e.positions=this.positions,e.shape=this.shape,e.granularity=this.granularity,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.enuCenter=this.enuCenter,e):new s$K(this)},s$K.prototype.merge=function(e){if(!t$$(e))throw new t$_("source is required.");this.show=e$1Y(this.show,e.show),this.material=e$1Y(this.material,e.material),this.positions=e$1Y(this.positions,e.positions),this.shape=e$1Y(this.shape,e.shape),this.granularity=e$1Y(this.granularity,e.granularity),this.fill=e$1Y(this.fill,e.fill),this.outline=e$1Y(this.outline,e.outline),this.outlineColor=e$1Y(this.outlineColor,e.outlineColor),this.outlineWidth=e$1Y(this.outlineWidth,e.outlineWidth),this.cornerType=e$1Y(this.cornerType,e.cornerType),this.shadows=e$1Y(this.shadows,e.shadows),this.distanceDisplayCondition=e$1Y(this.distanceDisplayCondition,e.distanceDisplayCondition),this.enuCenter=e$1Y(this.enuCenter,e.enuCenter)},Object.defineProperties(o$A.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:v$J("show"),coordinates:v$J("coordinates"),height:v$J("height"),heightReference:v$J("heightReference"),extrudedHeight:v$J("extrudedHeight"),extrudedHeightReference:v$J("extrudedHeightReference"),rotation:v$J("rotation"),stRotation:v$J("stRotation"),granularity:v$J("granularity"),fill:v$J("fill"),material:c$K("material"),outline:v$J("outline"),outlineColor:v$J("outlineColor"),outlineWidth:v$J("outlineWidth"),shadows:v$J("shadows"),distanceDisplayCondition:v$J("distanceDisplayCondition"),classificationType:v$J("classificationType"),zIndex:v$J("zIndex")}),o$A.prototype.clone=function(e){return t$$(e)?(e.show=this.show,e.coordinates=this.coordinates,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.rotation=this.rotation,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new o$A(this)},o$A.prototype.merge=function(e){if(!t$$(e))throw new t$_("source is required.");this.show=e$1Y(this.show,e.show),this.coordinates=e$1Y(this.coordinates,e.coordinates),this.height=e$1Y(this.height,e.height),this.heightReference=e$1Y(this.heightReference,e.heightReference),this.extrudedHeight=e$1Y(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=e$1Y(this.extrudedHeightReference,e.extrudedHeightReference),this.rotation=e$1Y(this.rotation,e.rotation),this.stRotation=e$1Y(this.stRotation,e.stRotation),this.granularity=e$1Y(this.granularity,e.granularity),this.fill=e$1Y(this.fill,e.fill),this.material=e$1Y(this.material,e.material),this.outline=e$1Y(this.outline,e.outline),this.outlineColor=e$1Y(this.outlineColor,e.outlineColor),this.outlineWidth=e$1Y(this.outlineWidth,e.outlineWidth),this.shadows=e$1Y(this.shadows,e.shadows),this.distanceDisplayCondition=e$1Y(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=e$1Y(this.classificationType,e.classificationType),this.zIndex=e$1Y(this.zIndex,e.zIndex)},Object.defineProperties(s$J.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:v$J("show"),positions:v$J("positions"),minimumHeights:v$J("minimumHeights"),maximumHeights:v$J("maximumHeights"),granularity:v$J("granularity"),fill:v$J("fill"),material:c$K("material"),outline:v$J("outline"),outlineColor:v$J("outlineColor"),outlineWidth:v$J("outlineWidth"),shadows:v$J("shadows"),distanceDisplayCondition:v$J("distanceDisplayCondition"),enuCenter:v$J("enuCenter")}),s$J.prototype.clone=function(e){return t$$(e)?(e.show=this.show,e.positions=this.positions,e.minimumHeights=this.minimumHeights,e.maximumHeights=this.maximumHeights,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.enuCenter=this.enuCenter,e):new s$J(this)},s$J.prototype.merge=function(e){if(!t$$(e))throw new t$_("source is required.");this.show=e$1Y(this.show,e.show),this.positions=e$1Y(this.positions,e.positions),this.minimumHeights=e$1Y(this.minimumHeights,e.minimumHeights),this.maximumHeights=e$1Y(this.maximumHeights,e.maximumHeights),this.granularity=e$1Y(this.granularity,e.granularity),this.fill=e$1Y(this.fill,e.fill),this.material=e$1Y(this.material,e.material),this.outline=e$1Y(this.outline,e.outline),this.outlineColor=e$1Y(this.outlineColor,e.outlineColor),this.outlineWidth=e$1Y(this.outlineWidth,e.outlineWidth),this.shadows=e$1Y(this.shadows,e.shadows),this.distanceDisplayCondition=e$1Y(this.distanceDisplayCondition,e.distanceDisplayCondition),this.enuCenter=e$1Y(this.enuCenter,e.enuCenter)};var $$D=new i$1g;function ii$7(e){return new t$B(e)}function ti$6(e){return v$J(e,void 0,ii$7)}function n$J(e,t){return v$J(e,void 0,(function(e){return e instanceof t?e:new t(e)}))}function l$J(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).id;t$$(t)||(t=t$U()),this._availability=void 0,this._id=t,this._definitionChanged=new o$15,this._name=e.name,this._show=e$1Y(e.show,!0),this._depthTestEnabled=e$1Y(e.depthTestEnabled,!0),this._parent=void 0,this._propertyNames=["billboard","box","corridor","cylinder","description","ellipse","ellipsoid","label","model","orientation","path","plane","point","polygon","polyline","polylineVolume","position","properties","rectangle","viewFrom","wall"],this._billboard=void 0,this._billboardSubscription=void 0,this._box=void 0,this._boxSubscription=void 0,this._corridor=void 0,this._corridorSubscription=void 0,this._cylinder=void 0,this._cylinderSubscription=void 0,this._description=void 0,this._descriptionSubscription=void 0,this._ellipse=void 0,this._ellipseSubscription=void 0,this._ellipsoid=void 0,this._ellipsoidSubscription=void 0,this._label=void 0,this._labelSubscription=void 0,this._model=void 0,this._modelSubscription=void 0,this._orientation=void 0,this._scale=void 0,this._orientationSubscription=void 0,this._path=void 0,this._pathSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._point=void 0,this._pointSubscription=void 0,this._polygon=void 0,this._polygonSubscription=void 0,this._polyline=void 0,this._polylineSubscription=void 0,this._polylineVolume=void 0,this._polylineVolumeSubscription=void 0,this._position=void 0,this._positionSubscription=void 0,this._properties=void 0,this._propertiesSubscription=void 0,this._rectangle=void 0,this._rectangleSubscription=void 0,this._viewFrom=void 0,this._viewFromSubscription=void 0,this._wall=void 0,this._wallSubscription=void 0,this._children=[],this._polygonOffset={enabled:!1,value:new r$T(0,0)},this.entityCollection=void 0,this.parent=e.parent,this.merge(e)}function w$O(e,t,i){for(var n=t.length,r=0;r<n;r++){var o=t[r],a=i;o._show!==a&&(o.show=a,w$O(o,o._children,i))}e._definitionChanged.raiseEvent(e,"isShowing",i,!i)}Object.defineProperties(l$J.prototype,{availability:u$I("availability"),id:{get:function(){return this._id}},definitionChanged:{get:function(){return this._definitionChanged}},name:u$I("name"),show:{get:function(){return this._show},set:function(e){if(!t$$(e))throw new t$_("value is required.");if(e!==this._show){var t=this.isShowing;this._show=e;var i=this.isShowing;t!==i&&w$O(this,this._children,i),this._definitionChanged.raiseEvent(this,"show",e,!e)}}},isShowing:{get:function(){return this._show&&(!t$$(this.entityCollection)||this.entityCollection.show)&&(!t$$(this._parent)||this._parent.isShowing)}},parent:{get:function(){return this._parent},set:function(e){var t=this._parent;if(t!==e){var i=this.isShowing;if(t$$(t)){var n=t._children.indexOf(this);t._children.splice(n,1)}this._parent=e,t$$(e)&&e._children.push(this);var r=this.isShowing;i!==r&&w$O(this,this._children,r),this._definitionChanged.raiseEvent(this,"parent",e,t)}}},children:{get:function(){return this._children},set:function(e){this._children=e}},propertyNames:{get:function(){return this._propertyNames}},billboard:n$J("billboard",s$W),box:n$J("box",s$S),corridor:n$J("corridor",o$E),cylinder:n$J("cylinder",o$C),description:v$J("description"),ellipse:n$J("ellipse",s$R),ellipsoid:n$J("ellipsoid",s$Q),label:n$J("label",s$P),model:n$J("model",e$10),orientation:v$J("orientation"),scale:v$J("scale"),path:n$J("path",s$N),plane:n$J("plane",s$M),point:n$J("point",s$L),polygon:n$J("polygon",u$J),polyline:n$J("polyline",o$B),polylineVolume:n$J("polylineVolume",s$K),properties:n$J("properties",p$S),position:ti$6("position"),rectangle:n$J("rectangle",o$A),viewFrom:v$J("viewFrom"),wall:n$J("wall",s$J)}),l$J.prototype.isAvailable=function(e){if(!t$$(e))throw new t$_("time is required.");var t=this._availability;return!t$$(t)||t.contains(e)},l$J.prototype.addProperty=function(e){var t=this._propertyNames;if(!t$$(e))throw new t$_("propertyName is required.");if(-1!==t.indexOf(e))throw new t$_(e+" is already a registered property.");if(e in this)throw new t$_(e+" is a reserved property name.");t.push(e),Object.defineProperty(this,e,u$I(e,!0))},l$J.prototype.removeProperty=function(e){var t=this._propertyNames.indexOf(e);if(!t$$(e))throw new t$_("propertyName is required.");if(-1===t)throw new t$_(e+" is not a registered property.");this._propertyNames.splice(t,1),delete this[e]},l$J.prototype.merge=function(e){if(!t$$(e))throw new t$_("source is required.");this.name=e$1Y(this.name,e.name),this.availability=e$1Y(e.availability,this.availability);for(var t=this._propertyNames,i=t$$(e._propertyNames)?e._propertyNames:Object.keys(e),n=i.length,r=0;r<n;r++){var o=i[r];if("parent"!==o){var a=this[o],s=e[o];!t$$(a)&&-1===t.indexOf(o)&&this.addProperty(o),t$$(s)&&(t$$(a)?t$$(a.merge)&&a.merge(s):t$$(s.merge)&&t$$(s.clone)?this[o]=s.clone():this[o]=s)}}};var x$L=new r$W,E$G=new a$11,C$G=new a$U;l$J.prototype.computeModelMatrix=function(e,t){n$1e.typeOf.object("time",e);var i=r$w.getValueOrUndefined(this._position,e,E$G);if(t$$(i)){var n=r$w.getValueOrUndefined(this._orientation,e,C$G);return t=t$$(n)?c$1a.fromRotationTranslation(r$W.fromQuaternion(n,x$L),i,t):m$13.eastNorthUpToFixedFrame(i,void 0,t)}},l$J.prototype.computeModelMatrixForHeightReference=function(e,t,i,n,r){n$1e.typeOf.object("time",e);var o=r$w.getValueOrDefault(t,e,U$Y.NONE),a=r$w.getValueOrUndefined(this._position,e,E$G);if(o===U$Y.NONE||!t$$(a)||a$11.equalsEpsilon(a,a$11.ZERO,n$1d.EPSILON8))return this.computeModelMatrix(e,r);var s=n.cartesianToCartographic(a,$$D);o===U$Y.CLAMP_TO_GROUND?s.height=i:s.height+=i,a=n.cartographicToCartesian(s,a);var l=r$w.getValueOrUndefined(this._orientation,e,C$G);return r=t$$(l)?c$1a.fromRotationTranslation(r$W.fromQuaternion(l,x$L),a,r):m$13.eastNorthUpToFixedFrame(a,void 0,r)},l$J.supportsMaterialsforEntitiesOnTerrain=function(e){return f$J.supportsMaterials(e)},l$J.supportsPolylinesOnTerrain=function(e){return C$I.isSupported(e)},l$J.prototype.setPolygonOffset=function(e,t){0!=e||0!=t?(this._polygonOffset.enabled=!0,r$T.fromElements(e,t,this._polygonOffset.value)):(this._polygonOffset.enabled=!1,r$T.fromElements(0,0,this._polygonOffset.value))};var M$L=new t$F(e$1z.WHITE),N$H=new i$O(!0),D$M=new i$O(!0),V$x=new i$O(!1),U$M=new i$O(e$1z.BLACK),A$L=new i$O(q$Q.DISABLED),L$I=new i$O(new e$1w),W$N=new i$O(_0x29401c.BOTH);function i$J(e){n$1e.defined("options.entity",e.entity),n$1e.defined("options.scene",e.scene),n$1e.defined("options.geometryOptions",e.geometryOptions),n$1e.defined("options.geometryPropertyName",e.geometryPropertyName),n$1e.defined("options.observedPropertyNames",e.observedPropertyNames);var t=e.entity,i=e.geometryPropertyName;this._entity=t,this._scene=e.scene,this._fillEnabled=!1,this._isClosed=!1,this._onTerrain=!1,this._dynamic=!1,this._outlineEnabled=!1,this._geometryChanged=new o$15,this._showProperty=void 0,this._materialProperty=void 0,this._showOutlineProperty=void 0,this._outlineColorProperty=void 0,this._outlineWidth=1,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._options=e.geometryOptions,this._geometryPropertyName=i,this._id=i+"-"+t.id,this._observedPropertyNames=e.observedPropertyNames,this._supportsMaterialsforEntitiesOnTerrain=l$J.supportsMaterialsforEntitiesOnTerrain(e.scene)}Object.defineProperties(i$J.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!t$$(this._entity.availability)&&r$w.isConstant(this._showProperty)&&r$w.isConstant(this._fillProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},outlineEnabled:{get:function(){return this._outlineEnabled}},hasConstantOutline:{get:function(){return!this._outlineEnabled||!t$$(this._entity.availability)&&r$w.isConstant(this._showProperty)&&r$w.isConstant(this._showOutlineProperty)}},outlineColorProperty:{get:function(){return this._outlineColorProperty}},outlineWidth:{get:function(){return this._outlineWidth}},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{get:function(){return this._isClosed}},onTerrain:{get:function(){return this._onTerrain}},geometryChanged:{get:function(){return this._geometryChanged}}}),i$J.prototype.isOutlineVisible=function(e){var t=this._entity;return e$1Y(this._outlineEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e),!1)},i$J.prototype.isFilled=function(e){var t=this._entity;return e$1Y(this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e),!1)},i$J.prototype.createFillGeometryInstance=t$_.throwInstantiationError,i$J.prototype.createOutlineGeometryInstance=t$_.throwInstantiationError,i$J.prototype.isDestroyed=function(){return!1},i$J.prototype.destroy=function(){s$1e(this)},i$J.prototype._isHidden=function(e,t){var i=t.show;return t$$(i)&&i.isConstant&&!i.getValue(f$S.MINIMUM_VALUE)},i$J.prototype._isOnTerrain=function(e,t){return!1},i$J.prototype._getIsClosed=function(e){return!0},i$J.prototype._isDynamic=t$_.throwInstantiationError,i$J.prototype._setStaticOptions=t$_.throwInstantiationError,i$J.prototype._onEntityPropertyChanged=function(e,t,i,n){if(-1!==this._observedPropertyNames.indexOf(t)){var r=this._entity[this._geometryPropertyName];if(!t$$(r))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var o=r.fill,a=!t$$(o)||!o.isConstant||o.getValue(f$S.MINIMUM_VALUE),s=r.outline,l=t$$(s);if(l&&s.isConstant&&(l=s.getValue(f$S.MINIMUM_VALUE)),!a&&!l)return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var u=r.show;if(this._isHidden(e,r))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));this._materialProperty=e$1Y(r.material,M$L),this._fillProperty=e$1Y(o,D$M),this._showProperty=e$1Y(u,N$H),this._showOutlineProperty=e$1Y(r.outline,V$x),this._outlineColorProperty=l?e$1Y(r.outlineColor,U$M):void 0,this._shadowsProperty=e$1Y(r.shadows,A$L),this._distanceDisplayConditionProperty=e$1Y(r.distanceDisplayCondition,L$I),this._classificationTypeProperty=e$1Y(r.classificationType,W$N),this._fillEnabled=a;var c=this._isOnTerrain(e,r)&&(this._supportsMaterialsforEntitiesOnTerrain||this._materialProperty instanceof t$F);if(l&&c&&(e$1Q(e$1Q.geometryOutlines),l=!1),this._onTerrain=c,this._outlineEnabled=l,this._isDynamic(e,r))this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this));else{this._setStaticOptions(e,r),this._isClosed=this._getIsClosed(this._options);var h=r.outlineWidth;this._outlineWidth=t$$(h)?h.getValue(f$S.MINIMUM_VALUE):1,this._dynamic=!1,this._geometryChanged.raiseEvent(this)}}},i$J.prototype.createDynamicUpdater=function(e,t){if(n$1e.defined("primitives",e),n$1e.defined("groundPrimitives",t),!this._dynamic)throw new t$_("This instance does not represent dynamic geometry.");return new this.constructor.DynamicGeometryUpdater(this,e,t)};var g$y=new a$11,H$H=new i$1g;function h$M(e,t,i,n){n$1e.defined("scene",e),n$1e.defined("positionProperty",t),this._scene=e,this._heightReference=i,this._extrudedHeightReference=n,this._positionProperty=t,this._position=new a$11,this._cartographicPosition=new i$1g,this._normal=new a$11,this._definitionChanged=new o$15,this._terrainHeight=0,this._removeCallbackFunc=void 0,this._removeEventListener=void 0,this._removeModeListener=void 0;var r=this;if(t$$(e.globe)&&(this._removeEventListener=e.terrainProviderChanged.addEventListener((function(){r._updateClamping()})),this._removeModeListener=e.morphComplete.addEventListener((function(){r._updateClamping()}))),t.isConstant){var o=t.getValue(f$S.MINIMUM_VALUE,g$y);if(!t$$(o)||a$11.equals(o,a$11.ZERO)||!t$$(e.globe))return;this._position=a$11.clone(o,this._position),this._updateClamping(),this._normal=e.globe.ellipsoid.geodeticSurfaceNormal(o,this._normal)}}function y$G(e,t,i,n){if(i$J.prototype._onEntityPropertyChanged.call(this,e,t,i,n),-1!==this._observedPropertyNames.indexOf(t)){var r=this._entity[this._geometryPropertyName];if(t$$(r)){t$$(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);var o=r.heightReference;if(t$$(o)){var a=new n$K(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new h$M(this._scene,a,o)}}}}Object.defineProperties(h$M.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}}),h$M.prototype._updateClamping=function(){t$$(this._removeCallbackFunc)&&this._removeCallbackFunc();var e=this._scene,t=e.globe,i=this._position;if(t$$(t)&&!a$11.equals(i,a$11.ZERO)){var n=t.ellipsoid,r=t._surface,o=this,a=n.cartesianToCartographic(i,this._cartographicPosition),s=t.getHeight(a);t$$(s)?this._terrainHeight=s:this._terrainHeight=0,this._removeCallbackFunc=r.updateHeight(a,(function(t){if(e.mode===b$1d.SCENE3D){var i=n.cartesianToCartographic(t,H$H);o._terrainHeight=i.height}else o._terrainHeight=t.x;o.definitionChanged.raiseEvent()}))}else this._terrainHeight=0},h$M.prototype.getValue=function(e,t){var i=r$w.getValueOrDefault(this._heightReference,e,U$Y.NONE),n=r$w.getValueOrDefault(this._extrudedHeightReference,e,U$Y.NONE);if(i===U$Y.NONE&&n!==U$Y.RELATIVE_TO_GROUND)return this._position=a$11.clone(a$11.ZERO,this._position),a$11.clone(a$11.ZERO,t);if(this._positionProperty.isConstant)return a$11.multiplyByScalar(this._normal,this._terrainHeight,t);var r=this._scene,o=this._positionProperty.getValue(e,g$y);if(!t$$(o)||a$11.equals(o,a$11.ZERO)||!t$$(r.globe))return a$11.clone(a$11.ZERO,t);if(a$11.equalsEpsilon(this._position,o,n$1d.EPSILON10))return a$11.multiplyByScalar(this._normal,this._terrainHeight,t);this._position=a$11.clone(o,this._position),this._updateClamping();var a=r.globe.ellipsoid.geodeticSurfaceNormal(o,this._normal);return a$11.multiplyByScalar(a,this._terrainHeight,t)},h$M.prototype.isDestroyed=function(){return!1},h$M.prototype.destroy=function(){return t$$(this._removeEventListener)&&this._removeEventListener(),t$$(this._removeModeListener)&&this._removeModeListener(),t$$(this._removeCallbackFunc)&&this._removeCallbackFunc(),s$1e(this)};var E$F=a$11.ZERO,x$K=new a$11,H$G=new a$11,M$K=new e$1z;function I$M(e){this.id=e,this.vertexFormat=void 0,this.dimensions=void 0,this.offsetAttribute=void 0}function i$I(e,t){i$J.call(this,{entity:e,scene:t,geometryOptions:new I$M(e),geometryPropertyName:"box",observedPropertyNames:["availability","position","orientation","box"]}),this._onEntityPropertyChanged(e,"box",e.box,void 0)}function p$R(e,t,i){a$B.call(this,e,t,i)}t$$(Object.create)&&(i$I.prototype=Object.create(i$J.prototype),i$I.prototype.constructor=i$I),Object.defineProperties(i$I.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),i$I.prototype.createFillGeometryInstance=function(e){if(n$1e.defined("time",e),!this._fillEnabled)throw new t$_("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r=new e$18(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),a={show:r,distanceDisplayCondition:n$Z.fromDistanceDisplayCondition(o),color:void 0,offset:void 0};this._materialProperty instanceof t$F&&(t$$(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,M$K)),t$$(t)||(t=e$1z.WHITE),a.color=r$I.fromColor(t));return t$$(this._options.offsetAttribute)&&(a.offset=o$N.fromCartesian3(r$w.getValueOrDefault(this._terrainOffsetProperty,e,E$F,x$K))),new m$P({id:i,geometry:c$Z.fromDimensions(this._options),modelMatrix:i.computeModelMatrixForHeightReference(e,i.box.heightReference,.5*this._options.dimensions.z,this._scene.mapProjection.ellipsoid),attributes:a})},i$I.prototype.createOutlineGeometryInstance=function(e){if(n$1e.defined("time",e),!this._outlineEnabled)throw new t$_("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$w.getValueOrDefault(this._outlineColorProperty,e,e$1z.BLACK,M$K),r=this._distanceDisplayConditionProperty.getValue(e),o={show:new e$18(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:r$I.fromColor(n),distanceDisplayCondition:n$Z.fromDistanceDisplayCondition(r),offset:void 0};return t$$(this._options.offsetAttribute)&&(o.offset=o$N.fromCartesian3(r$w.getValueOrDefault(this._terrainOffsetProperty,e,E$F,x$K))),new m$P({id:t,geometry:a$T.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,.5*this._options.dimensions.z,this._scene.mapProjection.ellipsoid),attributes:o})},i$I.prototype._computeCenter=function(e,t){return r$w.getValueOrUndefined(this._entity.position,e,t)},i$I.prototype._isHidden=function(e,t){return!t$$(t.dimensions)||!t$$(e.position)||i$J.prototype._isHidden.call(this,e,t)},i$I.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&r$w.isConstant(e.orientation)&&t.dimensions.isConstant&&r$w.isConstant(t.outlineWidth))},i$I.prototype._setStaticOptions=function(e,t){var i=r$w.getValueOrDefault(t.heightReference,f$S.MINIMUM_VALUE,U$Y.NONE),n=this._options;n.vertexFormat=this._materialProperty instanceof t$F?r$u.VERTEX_FORMAT:t$G.MaterialSupport.TEXTURED.vertexFormat,n.dimensions=t.dimensions.getValue(f$S.MINIMUM_VALUE,n.dimensions),n.offsetAttribute=i!==U$Y.NONE?_0x165ce0.ALL:void 0},i$I.prototype._onEntityPropertyChanged=y$G,i$I.DynamicGeometryUpdater=p$R,t$$(Object.create)&&(p$R.prototype=Object.create(a$B.prototype),p$R.prototype.constructor=p$R),p$R.prototype._isHidden=function(e,t,i){var n=r$w.getValueOrUndefined(e.position,i,H$G),r=this._options.dimensions;return!t$$(n)||!t$$(r)||a$B.prototype._isHidden.call(this,e,t,i)},p$R.prototype._setOptions=function(e,t,i){var n=r$w.getValueOrDefault(t.heightReference,i,U$Y.NONE),r=this._options;r.dimensions=r$w.getValueOrUndefined(t.dimensions,i,r.dimensions),r.offsetAttribute=n!==U$Y.NONE?_0x165ce0.ALL:void 0};var n$I={X:0,Y:1,Z:2,Y_UP_TO_Z_UP:c$1a.fromRotationTranslation(r$W.fromRotationX(n$1d.PI_OVER_TWO)),Z_UP_TO_Y_UP:c$1a.fromRotationTranslation(r$W.fromRotationX(-n$1d.PI_OVER_TWO)),X_UP_TO_Z_UP:c$1a.fromRotationTranslation(r$W.fromRotationY(-n$1d.PI_OVER_TWO)),Z_UP_TO_X_UP:c$1a.fromRotationTranslation(r$W.fromRotationY(n$1d.PI_OVER_TWO)),X_UP_TO_Y_UP:c$1a.fromRotationTranslation(r$W.fromRotationZ(n$1d.PI_OVER_TWO)),Y_UP_TO_X_UP:c$1a.fromRotationTranslation(r$W.fromRotationZ(-n$1d.PI_OVER_TWO)),fromName:function(e){return n$1e.typeOf.string("name",e),n$I[e]}},z$y=Object.freeze(n$I),A$K={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4"},N$G=Object.freeze(A$K),e$_={HIGHLIGHT:0,REPLACE:1,MIX:2},v$E=Object.freeze(e$_),c$H={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},y$F={SCALAR:void 0,VEC2:r$T,VEC3:a$11,VEC4:a$10,MAT2:u$14,MAT3:r$W,MAT4:c$1a};function M$J(e){var t,i=e.componentType;t="string"==typeof i?C$12.fromName(i):i;var n=c$H[e.type],r=y$F[e.type];return{componentsPerAttribute:n,classType:r,createArrayBufferView:function(e,i,r){return C$12.createArrayBufferView(t,e,i,n*r)}}}var O$A=e$1z.WHITE,W$M=!0;function p$Q(e,t,i,n,r){var o;this.featuresLength=t,this._translucentFeaturesLength=0,t$$(i)&&(o=i.extensions),this._extensions=e$1Y(o,{});var a,s,l=me$q(i);if(this._properties=l,this._batchTableHierarchy=de$m(this,i,n),this._batchTableBinaryProperties=H$F(t,l,n),this._showAlphaProperties=void 0,this._batchValues=void 0,this._batchValuesDirty=!1,this._batchTexture=void 0,this._defaultTexture=void 0,this._pickTexture=void 0,this._pickIds=[],this._content=e,this._colorChangedCallback=r,t>0){var u=Math.min(t,e$1y.maximumTextureSize),c=Math.ceil(t/e$1y.maximumTextureSize),h=1/u,d=.5*h,f=1/c,p=.5*f;a=new r$T(u,c),s=new a$10(h,d,f,p)}this._textureDimensions=a,this._textureStep=s}function me$q(e){var t={};if(!t$$(e))return t;for(var i in e)e.hasOwnProperty(i)&&"HIERARCHY"!==i&&"extensions"!==i&&"extras"!==i&&(t[i]=e$1W(e[i],!0));return t}function de$m(e,t,i){if(t$$(t)){var n=e._extensions["3DTILES_batch_table_hierarchy"],r=t.HIERARCHY;if(t$$(r)&&(p$Q._deprecationWarning("batchTableHierarchyExtension","The batch table HIERARCHY property has been moved to an extension. Use extensions.3DTILES_batch_table_hierarchy instead."),e._extensions["3DTILES_batch_table_hierarchy"]=r,n=r),t$$(n))return ve$l(n,i)}}function ve$l(e,t){var i,n,r,o=e.instancesLength,a=e.classes,s=e.classIds,l=e.parentCounts,u=e.parentIds,c=o;if(t$$(s.byteOffset)&&(s.componentType=e$1Y(s.componentType,C$12.UNSIGNED_SHORT),s.type=N$G.SCALAR,s=M$J(s).createArrayBufferView(t.buffer,t.byteOffset+s.byteOffset,o)),t$$(l))for(t$$(l.byteOffset)&&(l.componentType=e$1Y(l.componentType,C$12.UNSIGNED_SHORT),l.type=N$G.SCALAR,l=M$J(l).createArrayBufferView(t.buffer,t.byteOffset+l.byteOffset,o)),r=new Uint16Array(o),c=0,i=0;i<o;++i)r[i]=c,c+=l[i];t$$(u)&&t$$(u.byteOffset)&&(u.componentType=e$1Y(u.componentType,C$12.UNSIGNED_SHORT),u.type=N$G.SCALAR,u=M$J(u).createArrayBufferView(t.buffer,t.byteOffset+u.byteOffset,c));var h=a.length;for(i=0;i<h;++i){var d=a[i].length,f=a[i].instances,p=H$F(d,f,t);a[i].instances=s$1n(p,f)}var _=d$10(new Array(h),0),m=new Uint16Array(o);for(i=0;i<o;++i)n=s[i],m[i]=_[n],++_[n];var $={classes:a,classIds:s,classIndexes:m,parentCounts:l,parentIndexes:r,parentIds:u};return be$o($),$}p$Q._deprecationWarning=i$1b,Object.defineProperties(p$Q.prototype,{memorySizeInBytes:{get:function(){var e=0;return t$$(this._pickTexture)&&(e+=this._pickTexture.sizeInBytes),t$$(this._batchTexture)&&(e+=this._batchTexture.sizeInBytes),e}}});var ye$l=[];function be$o(e){var t=ye$l;t.length=0;for(var i=e.classIds.length,n=0;n<i;++n)j$H(e,n,t)}function j$H(e,t,i){var n=e.parentCounts,r=e.parentIds,o=e.parentIndexes,a=e.classIds.length;if(t$$(r)){if(t>=a)throw new t$_("Parent index "+t+" exceeds the total number of instances: "+a);if(i.indexOf(t)>-1)throw new t$_("Circular dependency detected in the batch table hierarchy.");i.push(t);for(var s=t$$(n)?n[t]:1,l=t$$(n)?o[t]:t,u=0;u<s;++u){var c=r[l+u];c!==t&&j$H(e,c,i)}i.pop(t)}}function H$F(e,t,i){var n;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r],a=o.byteOffset;if(t$$(a)){var s=o.componentType,l=o.type;if(!t$$(s))throw new t$Z("componentType is required.");if(!t$$(l))throw new t$Z("type is required.");if(!t$$(i))throw new t$Z("Property "+r+" requires a batch table binary.");var u=M$J(o),c=u.componentsPerAttribute,h=u.classType,d=u.createArrayBufferView(i.buffer,i.byteOffset+a,e);t$$(n)||(n={}),n[r]={typedArray:d,componentCount:c,type:h}}}return n}function J$G(e){var t=e._textureDimensions;return t.x*t.y*4}function Z$G(e){if(!t$$(e._batchValues)){var t=J$G(e),i=new Uint8Array(t);d$10(i,255),e._batchValues=i}return e._batchValues}function $$C(e){if(!t$$(e._showAlphaProperties)){var t=2*e.featuresLength,i=new Uint8Array(t);d$10(i,255),e._showAlphaProperties=i}return e._showAlphaProperties}function v$D(e,t){if(!t$$(e)||e<0||e>t)throw new t$_("batchId is required and between zero and featuresLength - 1 ("+t-NaN)}p$Q.getBinaryProperties=function(e,t,i){return H$F(e,t,i)},p$Q.prototype.setShow=function(e,t){if(v$D(e,this.featuresLength),n$1e.typeOf.bool("show",t),!t||t$$(this._showAlphaProperties)){var i=$$C(this),n=2*e,r=t?255:0;if(i[n]!==r)i[n]=r,Z$G(this)[4*e+3]=t?i[n+1]:0,this._batchValuesDirty=!0}},p$Q.prototype.setAllShow=function(e){n$1e.typeOf.bool("show",e);for(var t=this.featuresLength,i=0;i<t;++i)this.setShow(i,e)},p$Q.prototype.getShow=function(e){if(v$D(e,this.featuresLength),!t$$(this._showAlphaProperties))return!0;var t=2*e;return 255===this._showAlphaProperties[t]};var ge$h=new Array(4);p$Q.prototype.setColor=function(e,t){if(v$D(e,this.featuresLength),n$1e.typeOf.object("color",t),!e$1z.equals(t,O$A)||t$$(this._batchValues)){var i=t.toBytes(ge$h),n=i[3],r=Z$G(this),o=4*e,a=$$C(this),s=2*e;if(r[o]!==i[0]||r[o+1]!==i[1]||r[o+2]!==i[2]||a[s+1]!==n){r[o]=i[0],r[o+1]=i[1],r[o+2]=i[2];var l=255!==a[s+1],u=0!==a[s];r[o+3]=u?n:0,a[s+1]=n;var c=255!==n;c&&!l?++this._translucentFeaturesLength:!c&&l&&--this._translucentFeaturesLength,this._batchValuesDirty=!0,t$$(this._colorChangedCallback)&&this._colorChangedCallback(e,t)}}},p$Q.prototype.setAllColor=function(e){n$1e.typeOf.object("color",e);for(var t=this.featuresLength,i=0;i<t;++i)this.setColor(i,e)},p$Q.prototype.getColor=function(e,t){if(v$D(e,this.featuresLength),n$1e.typeOf.object("result",t),!t$$(this._batchValues))return e$1z.clone(O$A,t);var i=this._batchValues,n=4*e,r=this._showAlphaProperties,o=2*e;return e$1z.fromBytes(i[n],i[n+1],i[n+2],r[o+1],t)},p$Q.prototype.getPickColor=function(e){return v$D(e,this.featuresLength),this._pickIds[e]};var Te$m=new e$1z;function ee$r(e,t){var i=e.typedArray,n=e.componentCount;return 1===n?i[t]:e.type.unpack(i,t*n)}function te$s(e,t,i){var n=e.typedArray,r=e.componentCount;1===r?n[t]=i:e.type.pack(i,n,t*r)}p$Q.prototype.applyStyle=function(e){if(!t$$(e))return this.setAllColor(O$A),void this.setAllShow(W$M);for(var t=this._content,i=this.featuresLength,n=0;n<i;++n){var r=t.getFeature(n),o=t$$(e.color)?e.color.evaluateColor(r,Te$m):O$A,a=t$$(e.show)?e.show.evaluate(r):W$M;this.setColor(n,o),this.setShow(n,a)}};var xe$s=[],Se$d=[],Ce$l=0;function Le$g(e,t,i){var n=e.classIds,r=e.parentCounts,o=e.parentIds,a=e.parentIndexes,s=n.length,l=xe$s;l.length=Math.max(l.length,s);var u=++Ce$l,c=Se$d;for(c.length=0,c.push(t);c.length>0;)if(l[t=c.pop()]!==u){l[t]=u;var h=i(e,t);if(t$$(h))return h;for(var d=r[t],f=a[t],p=0;p<d;++p){var _=o[f+p];_!==t&&c.push(_)}}}function Ae$g(e,t,i){for(var n=!0;n;){var r=i(e,t);if(t$$(r))return r;var o=e.parentIds[t];n=o!==t,t=o}}function w$N(e,t,i){var n=e.parentCounts;return t$$(e.parentIds)?t$$(n)?Le$g(e,t,i):Ae$g(e,t,i):i(e,t)}function Ie$k(e,t,i){var n=w$N(e._batchTableHierarchy,t,(function(e,t){var n=e.classIds[t];if(t$$(e.classes[n].instances[i]))return!0}));return t$$(n)}function we$j(e,t,i){w$N(e._batchTableHierarchy,t,(function(e,t){var n=e.classIds[t],r=e.classes[n].instances;for(var o in r)r.hasOwnProperty(o)&&-1===i.indexOf(o)&&i.push(o)}))}function Pe$j(e,t,i){return w$N(e._batchTableHierarchy,t,(function(e,t){var n=e.classIds[t],r=e.classes[n],o=e.classIndexes[t],a=r.instances[i];if(t$$(a))return t$$(a.typedArray)?ee$r(a,o):e$1W(a[o],!0)}))}function De$p(e,t,i,n){var r=w$N(e._batchTableHierarchy,t,(function(e,r){var o=e.classIds[r],a=e.classes[o],s=e.classIndexes[r],l=a.instances[i];if(t$$(l)){if(r!==t)throw new t$_('Inherited property "'+i+'" is read-only.');return t$$(l.typedArray)?te$s(l,s,n):l[s]=e$1W(n,!0),!0}}));return t$$(r)}function Ee$l(e){return 1===e._textureDimensions.y?"uniform vec4 tile_textureStep; \nvec2 computeSt(float batchId) \n{ \n float stepX = tile_textureStep.x; \n float centerX = tile_textureStep.y; \n return vec2(centerX + (batchId * stepX), 0.5); \n} \n":"uniform vec4 tile_textureStep; \nuniform vec2 tile_textureDimensions; \nvec2 computeSt(float batchId) \n{ \n float stepX = tile_textureStep.x; \n float centerX = tile_textureStep.y; \n float stepY = tile_textureStep.z; \n float centerY = tile_textureStep.w; \n float xId = mod(batchId, tile_textureDimensions.x); \n float yId = floor(batchId / tile_textureDimensions.x); \n return vec2(centerX + (xId * stepX), centerY + (yId * stepY)); \n} \n"}function re$t(e,t){return e=a$O.replaceMain(e,"tile_main"),t?e+"uniform float tile_colorBlend; \nvoid tile_color(vec4 tile_featureColor) \n{ \n tile_main(); \n tile_featureColor = czm_gammaCorrect(tile_featureColor); \n gl_FragColor.a *= tile_featureColor.a; \n float highlight = ceil(tile_colorBlend); \n gl_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight); \n} \n":e+"void tile_color(vec4 tile_featureColor) \n{ \n tile_main(); \n} \n"}function Oe$k(e,t){for(var i,n="texture2D("+t,r=0,o=e.indexOf(n,r);o>-1;){for(var a=0,s=o;s<e.length;++s){var l=e.charAt(s);if("("===l)++a;else if(")"===l&&0===--a){i=s+1;break}}var u="tile_diffuse_final("+e.slice(o,i)+", tile_diffuse)";e=e.slice(0,o)+u+e.slice(i),r=o+u.length,o=e.indexOf(n,r)}return e}function ie$t(e,t,i){if(!t$$(t))return re$t(e,i);var n=new RegExp("(uniform|attribute|in)\\s+(vec[34]|sampler2D)\\s+"+t+";"),r=e.match(n);if(!t$$(r))return re$t(e,i);var o=r[0],a=r[2];e=(e=a$O.replaceMain(e,"tile_main")).replace(o,"");var s;if("vec3"===a||"vec4"===a){var l="vec3"===a?"vec4("+t+", 1.0)":t,u="vec3"===a?"tile_diffuse.xyz":"tile_diffuse";n=new RegExp(t,"g"),e=e.replace(n,u),s=" vec4 source = "+l+"; \n tile_diffuse = tile_diffuse_final(source, tile_featureColor); \n tile_main(); \n"}else"sampler2D"===a&&(e=Oe$k(e,t),s=" tile_diffuse = tile_featureColor; \n tile_main(); \n");return e="uniform float tile_colorBlend; \nvec4 tile_diffuse = vec4(1.0); \nbool isWhite(vec3 color) \n{ \n return all(greaterThan(color, vec3(1.0 - czm_epsilon3))); \n} \nvec4 tile_diffuse_final(vec4 sourceDiffuse, vec4 tileDiffuse) \n{ \n vec4 blendDiffuse = mix(sourceDiffuse, tileDiffuse, tile_colorBlend); \n vec4 diffuse = isWhite(tileDiffuse.rgb) ? sourceDiffuse : blendDiffuse; \n return vec4(diffuse.rgb, sourceDiffuse.a); \n} \n"+o+"\n"+e+"\nvoid tile_color(vec4 tile_featureColor) \n{ \n"+s,i&&(e+=" tile_featureColor = czm_gammaCorrect(tile_featureColor); \n gl_FragColor.a *= tile_featureColor.a; \n float highlight = ceil(tile_colorBlend); \n gl_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight); \n"),e+="} \n"}function ke$9(e){var t=e._content.tileset,i=t.colorBlendMode,n=t.colorBlendAmount;if(i===v$E.HIGHLIGHT)return 0;if(i===v$E.REPLACE)return 1;if(i===v$E.MIX)return n$1d.clamp(n,n$1d.EPSILON4,1);throw new t$_('Invalid color blend mode "'+i+'".')}p$Q.prototype.isClass=function(e,t){v$D(e,this.featuresLength),n$1e.typeOf.string("className",t);var i=this._batchTableHierarchy;if(!t$$(i))return!1;var n=w$N(i,e,(function(e,i){var n=e.classIds[i];if(e.classes[n].name===t)return!0}));return t$$(n)},p$Q.prototype.isExactClass=function(e,t){return n$1e.typeOf.string("className",t),this.getExactClassName(e)===t},p$Q.prototype.getExactClassName=function(e){v$D(e,this.featuresLength);var t=this._batchTableHierarchy;if(t$$(t)){var i=t.classIds[e];return t.classes[i].name}},p$Q.prototype.hasProperty=function(e,t){return v$D(e,this.featuresLength),n$1e.typeOf.string("name",t),t$$(this._properties[t])||t$$(this._batchTableHierarchy)&&Ie$k(this,e,t)},p$Q.prototype.getPropertyNames=function(e,t){v$D(e,this.featuresLength),(t=t$$(t)?t:[]).length=0;var i=Object.keys(this._properties);return t.push.apply(t,i),t$$(this._batchTableHierarchy)&&we$j(this,e,t),t},p$Q.prototype.getProperty=function(e,t){if(v$D(e,this.featuresLength),n$1e.typeOf.string("name",t),t$$(this._batchTableBinaryProperties)){var i=this._batchTableBinaryProperties[t];if(t$$(i))return ee$r(i,e)}var n=this._properties[t];if(t$$(n))return e$1W(n[e],!0);if(t$$(this._batchTableHierarchy)){var r=Pe$j(this,e,t);if(t$$(r))return r}},p$Q.prototype.setProperty=function(e,t,i){var n=this.featuresLength;if(v$D(e,n),n$1e.typeOf.string("name",t),t$$(this._batchTableBinaryProperties)){var r=this._batchTableBinaryProperties[t];if(t$$(r))return void te$s(r,e,i)}if(!t$$(this._batchTableHierarchy)||!De$p(this,e,t,i)){var o=this._properties[t];t$$(o)||(this._properties[t]=new Array(n),o=this._properties[t]),o[e]=e$1W(i,!0)}},p$Q.prototype.getVertexShaderCallback=function(e,t,i){if(0!==this.featuresLength){var n=this;return function(r){var o,a=ie$t(r,i,!1);return e$1y.maximumVertexTextureImageUnits>0?(o="",e&&(o+="uniform bool tile_translucentCommand; \n"),o+="uniform sampler2D tile_batchTexture; \nvarying vec4 tile_featureColor; \nvarying vec2 tile_featureSt; \nvoid main() \n{ \n vec2 st = computeSt("+t+"); \n vec4 featureProperties = texture2D(tile_batchTexture, st); \n tile_color(featureProperties); \n float show = ceil(featureProperties.a); \n gl_Position *= show; \n",e&&(o+=" bool isStyleTranslucent = (featureProperties.a != 1.0); \n if (czm_pass == czm_passTranslucent) \n { \n if (!isStyleTranslucent && !tile_translucentCommand) \n { \n gl_Position *= 0.0; \n } \n } \n else \n { \n if (isStyleTranslucent) \n { \n gl_Position *= 0.0; \n } \n } \n"),o+=" tile_featureColor = featureProperties; \n tile_featureSt = st; \n}"):o="varying vec2 tile_featureSt; \nvoid main() \n{ \n tile_color(vec4(1.0)); \n tile_featureSt = computeSt("+t+"); \n}",a+"\n"+Ee$l(n)+o}}},p$Q.prototype.getFragmentShaderCallback=function(e,t){if(0!==this.featuresLength)return function(i){return i=ie$t(i,t,!0),e$1y.maximumVertexTextureImageUnits>0?i+="#ifdef APPLY_SWIPE\n uniform vec4 uSwipeRegion;\n#endif\nuniform sampler2D tile_pickTexture; \nvarying vec2 tile_featureSt; \nvarying vec4 tile_featureColor; \nvoid main() \n{ \n#ifdef APPLY_SWIPE \n czm_RollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\n tile_color(tile_featureColor); \n}":(e&&(i+="uniform bool tile_translucentCommand; \n"),i+="uniform sampler2D tile_pickTexture; \nuniform sampler2D tile_batchTexture; \nvarying vec2 tile_featureSt; \nvoid main() \n{ \n vec4 featureProperties = texture2D(tile_batchTexture, tile_featureSt); \n if (featureProperties.a == 0.0) { \n discard; \n } \n",e&&(i+=" bool isStyleTranslucent = (featureProperties.a != 1.0); \n if (czm_pass == czm_passTranslucent) \n { \n if (!isStyleTranslucent && !tile_translucentCommand) \n { \n discard; \n } \n } \n else \n { \n if (isStyleTranslucent) \n { \n discard; \n } \n } \n"),i+=" tile_color(featureProperties); \n} \n"),i}},p$Q.prototype.getClassificationFragmentShaderCallback=function(){if(0!==this.featuresLength)return function(e){return e=a$O.replaceMain(e,"tile_main"),e$1y.maximumVertexTextureImageUnits>0?e+="uniform sampler2D tile_pickTexture;\nvarying vec2 tile_featureSt; \nvarying vec4 tile_featureColor; \nvoid main() \n{ \n tile_main(); \n gl_FragColor = tile_featureColor; \n}":e+="uniform sampler2D tile_batchTexture; \nuniform sampler2D tile_pickTexture;\nvarying vec2 tile_featureSt; \nvoid main() \n{ \n tile_main(); \n vec4 featureProperties = texture2D(tile_batchTexture, tile_featureSt); \n if (featureProperties.a == 0.0) { \n discard; \n } \n gl_FragColor = featureProperties; \n} \n",e}},p$Q.prototype.getUniformMapCallback=function(){if(0!==this.featuresLength){var e=this;return function(t){var i={tile_batchTexture:function(){return e$1Y(e._batchTexture,e._defaultTexture)},tile_textureDimensions:function(){return e._textureDimensions},tile_textureStep:function(){return e._textureStep},tile_colorBlend:function(){return ke$9(e)},uSwipeRegion:function(){var t=e._content.tileset._swipeRegion,i=e._content.tileset.frameState.context.drawingBufferWidth,n=e._content.tileset.frameState.context.drawingBufferHeight,r=new a$10;return r.x=t.x*i,r.y=(1-t.y)*n,r.z=t.z*i,r.w=(1-t.w)*n,r},tile_pickTexture:function(){return e._pickTexture}};return s$1n(t,i)}}},p$Q.prototype.getPickId=function(){return"texture2D(tile_pickTexture, tile_featureSt)"};var x$J={ALL_OPAQUE:0,ALL_TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2};function Ne$f(e){var t=e._translucentFeaturesLength;return 0===t?x$J.ALL_OPAQUE:t===e.featuresLength?x$J.ALL_TRANSLUCENT:x$J.OPAQUE_AND_TRANSLUCENT}function Be$j(e){var t=s$1d.shallowClone(e),i=t.pass===we$l.TRANSLUCENT;return t.uniformMap=t$$(t.uniformMap)?t.uniformMap:{},t.uniformMap.tile_translucentCommand=function(){return i},t}function Re$g(e){var t=s$1d.shallowClone(e);return t.pass=we$l.TRANSLUCENT,t.renderState=Ve$g(e.renderState),t}function Ue$d(e){var t=s$1d.shallowClone(e);return t.renderState=Ge$b(e.renderState),t}function Me$j(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"zBackfaceLogDepth");if(!t$$(i)){var n=t.fragmentShaderSource.clone();n.defines=t$$(n.defines)?n.defines.slice(0):[],n.defines.push("POLYGON_OFFSET"),n.sources.unshift("#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n"),i=e.shaderCache.createDerivedShaderProgram(t,"zBackfaceLogDepth",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:n,attributeLocations:t._attributeLocations})}return i}function He$c(e,t){var i=s$1d.shallowClone(t),n=e$1W(i.renderState,!0);n.cull.enabled=!0,n.cull.face=k$F.FRONT,n.colorMask={red:!1,green:!1,blue:!1,alpha:!1},n.polygonOffset={enabled:!0,factor:5,units:5},n.stencilTest=Ia$1.setCesium3DTileBit(),n.stencilMask=Ia$1.CESIUM_3D_TILE_MASK,i.renderState=p$1a.fromCache(n),i.castShadows=!1,i.receiveShadows=!1,i.uniformMap=e$1W(t.uniformMap);var r=new r$T(5,5);return i.uniformMap.u_polygonOffset=function(){return r},i.shaderProgram=Me$j(e,t.shaderProgram),i}function ze$d(e,t){var i=s$1d.shallowClone(e),n=e$1W(i.renderState,!0);return n.stencilTest.enabled=!0,n.stencilTest.mask=Ia$1.SKIP_LOD_MASK,n.stencilTest.reference=Ia$1.CESIUM_3D_TILE_MASK|t<<Ia$1.SKIP_LOD_BIT_SHIFT,n.stencilTest.frontFunction=h$N.GREATER_OR_EQUAL,n.stencilTest.frontOperation.zPass=o$F.REPLACE,n.stencilTest.backFunction=h$N.GREATER_OR_EQUAL,n.stencilTest.backOperation.zPass=o$F.REPLACE,n.stencilMask=Ia$1.CESIUM_3D_TILE_MASK|Ia$1.SKIP_LOD_MASK,i.renderState=p$1a.fromCache(n),i}function Fe$c(e){return(e.renderState.stencilTest.reference&Ia$1.SKIP_LOD_MASK)>>>Ia$1.SKIP_LOD_BIT_SHIFT}function Ve$g(e){var t=e$1W(e,!0);return t.cull.enabled=!1,t.depthTest.enabled=!0,t.depthMask=!1,t.blending=Ee$s.ALPHA_BLEND,p$1a.fromCache(t)}function Ge$b(e){var t=e$1W(e,!0);return t.stencilTest=Ia$1.setCesium3DTileBit(),t.stencilMask=Ia$1.CESIUM_3D_TILE_MASK,p$1a.fromCache(t)}function ae$r(e,t,i){var n=e._textureDimensions;return new P$S({context:t,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE,source:{width:n.x,height:n.y,arrayBufferView:i},flipY:!1,sampler:new a$Q({minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST})})}function Ke$9(e,t){var i=e.featuresLength;if(!t$$(e._pickTexture)&&i>0){for(var n=e._pickIds,r=J$G(e),o=new Uint8Array(r),a=e._content,s=0;s<i;++s){var l=t.createPickId(a.getFeature(s));n.push(l);var u=l.color,c=4*s;o[c]=e$1z.floatToByte(u.red),o[c+1]=e$1z.floatToByte(u.green),o[c+2]=e$1z.floatToByte(u.blue),o[c+3]=e$1z.floatToByte(u.alpha)}e._pickTexture=ae$r(e,t,o),a.tileset._statistics.batchTableByteLength+=e._pickTexture.sizeInBytes}}function Ye$c(e){var t=e._textureDimensions;e._batchTexture.copyFrom({width:t.x,height:t.y,arrayBufferView:e._batchValues})}function e$Z(e,t){this._content=e,this._batchId=t,this._color=void 0}function p$P(e,t){this.json=e,this.buffer=t,this._cachedTypedArrays={},this.featuresLength=0}function h$L(e,t,i,n,r,o){var a=e._cachedTypedArrays,s=a[t];return t$$(s)||(s=C$12.createArrayBufferView(i,e.buffer.buffer,e.buffer.byteOffset+o,r*n),a[t]=s),s}function c$G(e,t,i,n){var r=e._cachedTypedArrays,o=r[t];return t$$(o)||(o=C$12.createTypedArray(i,n),r[t]=o),o}function e$Y(e,t,i){if(i=e$1Y(i,!1)){var n=e.indexOf(t);if(n>-1)return n}return e.push(t),e.length-1}function s$I(e,t){return t$$(e.extensionsUsed)&&e.extensionsUsed.indexOf(t)>=0}function t$A(){}function r$t(e){switch(e){case"SCALAR":return 1;case"VEC2":return 2;case"VEC3":return 3;case"VEC4":case"MAT2":return 4;case"MAT3":return 9;case"MAT4":return 16}}function p$O(e,t){var i=t.bufferView;if(t$$(i)){var n=e.bufferViews[i];if(t$$(n.byteStride)&&n.byteStride>0)return n.byteStride}return C$12.getSizeInBytes(t.componentType)*r$t(t.type)}function h$K(e){t$A.accessor(e,(function(e){t$$(e.bufferView)&&(e.byteOffset=e$1Y(e.byteOffset,0))})),t$A.bufferView(e,(function(e){t$$(e.buffer)&&(e.byteOffset=e$1Y(e.byteOffset,0))})),t$A.mesh(e,(function(t){t$A.meshPrimitive(t,(function(t){if(t.mode=e$1Y(t.mode,de$x.TRIANGLES),!t$$(t.material)){t$$(e.materials)||(e.materials=[]);t.material=e$Y(e.materials,{name:"default"})}}))})),t$A.accessorContainingVertexAttributeData(e,(function(t){var i=e.accessors[t],n=i.bufferView;if(i.normalized=e$1Y(i.normalized,!1),t$$(n)){var r=e.bufferViews[n];r.byteStride=p$O(e,i),r.target=de$x.ARRAY_BUFFER}})),t$A.accessorContainingIndexData(e,(function(t){var i=e.accessors[t].bufferView;t$$(i)&&(e.bufferViews[i].target=de$x.ELEMENT_ARRAY_BUFFER)})),t$A.material(e,(function(e){var t=e$1Y(e.extensions,e$1Y.EMPTY_OBJECT),i=t.KHR_materials_common;if(t$$(i)){var n=i.technique,r=t$$(i.values)?i.values:{};return i.values=r,r.ambient=t$$(r.ambient)?r.ambient:[0,0,0,1],r.emission=t$$(r.emission)?r.emission:[0,0,0,1],r.transparency=e$1Y(r.transparency,1),r.transparent=e$1Y(r.transparent,!1),r.doubleSided=e$1Y(r.doubleSided,!1),void("CONSTANT"!==n&&(r.diffuse=t$$(r.diffuse)?r.diffuse:[0,0,0,1],"LAMBERT"!==n&&(r.specular=t$$(r.specular)?r.specular:[0,0,0,1],r.shininess=e$1Y(r.shininess,0))))}e.emissiveFactor=e$1Y(e.emissiveFactor,[0,0,0]),e.alphaMode=e$1Y(e.alphaMode,"OPAQUE"),e.doubleSided=e$1Y(e.doubleSided,!1),"MASK"===e.alphaMode&&(e.alphaCutoff=e$1Y(e.alphaCutoff,.5)),t$$(t.KHR_techniques_webgl)&&t$A.materialValue(e,(function(e){t$$(e.index)&&l$I(e)})),l$I(e.emissiveTexture),l$I(e.normalTexture),l$I(e.occlusionTexture);var o=e.pbrMetallicRoughness;t$$(o)&&(o.baseColorFactor=e$1Y(o.baseColorFactor,[1,1,1,1]),o.metallicFactor=e$1Y(o.metallicFactor,1),o.roughnessFactor=e$1Y(o.roughnessFactor,1),l$I(o.baseColorTexture),l$I(o.metallicRoughnessTexture));var a=t.pbrSpecularGlossiness;t$$(a)&&(a.diffuseFactor=e$1Y(a.diffuseFactor,[1,1,1,1]),a.specularFactor=e$1Y(a.specularFactor,[1,1,1]),a.glossinessFactor=e$1Y(a.glossinessFactor,1),l$I(a.specularGlossinessTexture))})),t$A.animation(e,(function(e){t$A.animationSampler(e,(function(e){e.interpolation=e$1Y(e.interpolation,"LINEAR")}))}));var t=T$K(e);return t$A.node(e,(function(e,i){t$$(t[i])||t$$(e.translation)||t$$(e.rotation)||t$$(e.scale)?(e.translation=e$1Y(e.translation,[0,0,0]),e.rotation=e$1Y(e.rotation,[0,0,0,1]),e.scale=e$1Y(e.scale,[1,1,1])):e.matrix=e$1Y(e.matrix,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])})),t$A.sampler(e,(function(e){e.wrapS=e$1Y(e.wrapS,de$x.REPEAT),e.wrapT=e$1Y(e.wrapT,de$x.REPEAT)})),t$$(e.scenes)&&!t$$(e.scene)&&(e.scene=0),e}function T$K(e){var t={};return t$A.animation(e,(function(e){t$A.animationChannel(e,(function(e){var i=e.target,n=i.node,r=i.path;("translation"===r||"rotation"===r||"scale"===r)&&(t[n]=!0)}))})),t}function l$I(e){t$$(e)&&(e.texCoord=e$1Y(e.texCoord,0))}function f$H(e){return t$A.shader(e,(function(e){i$H(e)})),t$A.buffer(e,(function(e){i$H(e)})),t$A.image(e,(function(e){i$H(e),t$A.compressedImage(e,(function(e){i$H(e)}))})),i$H(e),e}function i$H(e){e.extras=t$$(e.extras)?e.extras:{},e.extras._pipeline=t$$(e.extras._pipeline)?e.extras._pipeline:{}}function t$z(e,t){var i=e.extensionsRequired;if(t$$(i)){var n=i.indexOf(t);n>=0&&i.splice(n,1),0===i.length&&delete e.extensionsRequired}}function f$G(e,t){var i=e.extensionsUsed;if(t$$(i)){var n=i.indexOf(t);n>=0&&i.splice(n,1),t$z(e,t),0===i.length&&delete e.extensionsUsed}}p$Q.prototype.addDerivedCommands=function(e,t){for(var i=e.commandList,n=i.length,r=this._content._tile,o=r._finalResolution,a=r.tileset,s=a._skipLevelOfDetail&&a._hasMixedContent&&e.context.stencilBuffer,l=Ne$f(this),u=t;u<n;++u){var c=i[u],h=c.derivedCommands.tileset;(!t$$(h)||c.dirty)&&(h={},c.derivedCommands.tileset=h,h.originalCommand=Be$j(c),c.dirty=!1);var d=h.originalCommand;l!==x$J.ALL_OPAQUE&&c.pass!==we$l.TRANSLUCENT&&(t$$(h.translucent)||(h.translucent=Re$g(d))),l!==x$J.ALL_TRANSLUCENT&&c.pass!==we$l.TRANSLUCENT&&(t$$(h.opaque)||(h.opaque=Ue$d(d)),s&&(o||(t$$(h.zback)||(h.zback=He$c(e.context,d)),a._backfaceCommands.push(h.zback)),(!t$$(h.stencil)||r._selectionDepth!==Fe$c(h.stencil))&&(c.renderState.depthMask?h.stencil=ze$d(d,r._selectionDepth):h.stencil=h.opaque)));var f=s?h.stencil:h.opaque,p=h.translucent;c.pass!==we$l.TRANSLUCENT?(l===x$J.ALL_OPAQUE&&(i[u]=f),l===x$J.ALL_TRANSLUCENT&&(i[u]=p),l===x$J.OPAQUE_AND_TRANSLUCENT&&(i[u]=f,i.push(p))):i[u]=d}},p$Q.prototype.update=function(e,t){var i=t.context;this._defaultTexture=i.defaultTexture;var n=t.passes;(n.pick||n.postProcess)&&Ke$9(this,i),this._batchValuesDirty&&(this._batchValuesDirty=!1,t$$(this._batchTexture)||(this._batchTexture=ae$r(this,i,this._batchValues),e._statistics.batchTableByteLength+=this._batchTexture.sizeInBytes),Ye$c(this))},p$Q.prototype.isDestroyed=function(){return!1},p$Q.prototype.destroy=function(){this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),this._pickTexture=this._pickTexture&&this._pickTexture.destroy();for(var e=this._pickIds,t=e.length,i=0;i<t;++i)e[i].destroy();return s$1e(this)},Object.defineProperties(e$Z.prototype,{show:{get:function(){return this._content.batchTable.getShow(this._batchId)},set:function(e){this._content.batchTable.setShow(this._batchId,e)}},color:{get:function(){return t$$(this._color)||(this._color=new e$1z),this._content.batchTable.getColor(this._batchId,this._color)},set:function(e){this._content.batchTable.setColor(this._batchId,e)}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},pickId:{get:function(){return this._content.batchTable.getPickColor(this._batchId)}}}),e$Z.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)},e$Z.prototype.getPropertyNames=function(e){return this._content.batchTable.getPropertyNames(this._batchId,e)},e$Z.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)},e$Z.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0},e$Z.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)},e$Z.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)},e$Z.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)},p$P.prototype.getGlobalProperty=function(e,t,i){var n=this.json[e];if(t$$(n))return t$$(n.byteOffset)?h$L(this,e,t=e$1Y(t,C$12.UNSIGNED_INT),i=e$1Y(i,1),1,n.byteOffset):n},p$P.prototype.getPropertyArray=function(e,t,i){var n=this.json[e];if(t$$(n))return t$$(n.byteOffset)?(t$$(n.componentType)&&(t=C$12.fromName(n.componentType)),h$L(this,e,t,i,this.featuresLength,n.byteOffset)):c$G(this,e,t,n)},p$P.prototype.getProperty=function(e,t,i,n,r){if(t$$(this.json[e])){var o=this.getPropertyArray(e,t,i);if(1===i)return o[n];for(var a=0;a<i;++a)r[a]=o[i*n+a];return r}},t$A.objectLegacy=function(e,t){if(t$$(e))for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var n=t(e[i],i);if(t$$(n))return n}},t$A.object=function(e,t){if(t$$(e))for(var i=e.length,n=0;n<i;n++){var r=t(e[n],n);if(t$$(r))return r}},t$A.topLevel=function(e,t,i){var n=e[t];return t$$(n)&&!Array.isArray(n)?t$A.objectLegacy(n,i):t$A.object(n,i)},t$A.accessor=function(e,t){return t$A.topLevel(e,"accessors",t)},t$A.accessorWithSemantic=function(e,t,i){var n={};return t$A.mesh(e,(function(e){return t$A.meshPrimitive(e,(function(e){var r=t$A.meshPrimitiveAttribute(e,(function(e,r){if(0===r.indexOf(t)&&!t$$(n[e])){n[e]=!0;var o=i(e);if(t$$(o))return o}}));return t$$(r)?r:t$A.meshPrimitiveTarget(e,(function(e){return t$A.meshPrimitiveTargetAttribute(e,(function(e,r){if(0===r.indexOf(t)&&!t$$(n[e])){n[e]=!0;var o=i(e);if(t$$(o))return o}}))}))}))}))},t$A.accessorContainingVertexAttributeData=function(e,t){var i={};return t$A.mesh(e,(function(e){return t$A.meshPrimitive(e,(function(e){var n=t$A.meshPrimitiveAttribute(e,(function(e){if(!t$$(i[e])){i[e]=!0;var n=t(e);if(t$$(n))return n}}));return t$$(n)?n:t$A.meshPrimitiveTarget(e,(function(e){return t$A.meshPrimitiveTargetAttribute(e,(function(e){if(!t$$(i[e])){i[e]=!0;var n=t(e);if(t$$(n))return n}}))}))}))}))},t$A.accessorContainingIndexData=function(e,t){var i={};return t$A.mesh(e,(function(e){return t$A.meshPrimitive(e,(function(e){var n=e.indices;if(t$$(n)&&!t$$(i[n])){i[n]=!0;var r=t(n);if(t$$(r))return r}}))}))},t$A.animation=function(e,t){return t$A.topLevel(e,"animations",t)},t$A.animationChannel=function(e,t){var i=e.channels;return t$A.object(i,t)},t$A.animationSampler=function(e,t){var i=e.samplers;return t$A.object(i,t)},t$A.buffer=function(e,t){return t$A.topLevel(e,"buffers",t)},t$A.bufferView=function(e,t){return t$A.topLevel(e,"bufferViews",t)},t$A.camera=function(e,t){return t$A.topLevel(e,"cameras",t)},t$A.image=function(e,t){return t$A.topLevel(e,"images",t)},t$A.compressedImage=function(e,t){if(t$$(e.extras)){var i=e.extras.compressedImage3DTiles;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(t$$(r))return r}}},t$A.material=function(e,t){return t$A.topLevel(e,"materials",t)},t$A.materialValue=function(e,t){var i=e.values;for(var n in t$$(e.extensions)&&t$$(e.extensions.KHR_techniques_webgl)&&(i=e.extensions.KHR_techniques_webgl.values),i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(t$$(r))return r}},t$A.mesh=function(e,t){return t$A.topLevel(e,"meshes",t)},t$A.meshPrimitive=function(e,t){var i=e.primitives;if(t$$(i))for(var n=i.length,r=0;r<n;r++){var o=t(i[r],r);if(t$$(o))return o}},t$A.meshPrimitiveAttribute=function(e,t){var i=e.attributes;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(t$$(r))return r}},t$A.meshPrimitiveTarget=function(e,t){var i=e.targets;if(t$$(i))for(var n=i.length,r=0;r<n;++r){var o=t(i[r],r);if(t$$(o))return o}},t$A.meshPrimitiveTargetAttribute=function(e,t){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var n=t(e[i],i);if(t$$(n))return n}},t$A.node=function(e,t){return t$A.topLevel(e,"nodes",t)},t$A.nodeInTree=function(e,t,i){var n=e.nodes;if(t$$(n))for(var r=t.length,o=0;o<r;o++){var a=t[o],s=n[a];if(t$$(s)){var l=i(s,a);if(t$$(l))return l;var u=s.children;if(t$$(u)&&t$$(l=t$A.nodeInTree(e,u,i)))return l}}},t$A.nodeInScene=function(e,t,i){var n=t.nodes;if(t$$(n))return t$A.nodeInTree(e,n,i)},t$A.program=function(e,t){return s$I(e,"KHR_techniques_webgl")?t$A.object(e.extensions.KHR_techniques_webgl.programs,t):t$A.topLevel(e,"programs",t)},t$A.sampler=function(e,t){return t$A.topLevel(e,"samplers",t)},t$A.scene=function(e,t){return t$A.topLevel(e,"scenes",t)},t$A.shader=function(e,t){return s$I(e,"KHR_techniques_webgl")?t$A.object(e.extensions.KHR_techniques_webgl.shaders,t):t$A.topLevel(e,"shaders",t)},t$A.skin=function(e,t){return t$A.topLevel(e,"skins",t)},t$A.skinJoint=function(e,t){var i=e.joints;if(t$$(i))for(var n=i.length,r=0;r<n;r++){var o=t(i[r]);if(t$$(o))return o}},t$A.techniqueAttribute=function(e,t){var i=e.attributes;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(t$$(r))return r}},t$A.techniqueUniform=function(e,t){var i=e.uniforms;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(t$$(r))return r}},t$A.techniqueParameter=function(e,t){var i=e.parameters;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(t$$(r))return r}},t$A.technique=function(e,t){return s$I(e,"KHR_techniques_webgl")?t$A.object(e.extensions.KHR_techniques_webgl.techniques,t):t$A.topLevel(e,"techniques",t)},t$A.texture=function(e,t){return t$A.topLevel(e,"textures",t)};var _$E=4;function h$J(e){if("glTF"!==e$1h(e))throw new t$Z("File is not valid binary glTF");var t=g$x(e,0,5),i=t[1];if(1!==i&&2!==i)throw new t$Z("Binary glTF version is not 1 or 2");return 1===i?O$z(e,t):x$I(e,t)}function g$x(e,t,i){for(var n=new DataView(e.buffer),r=new Array(i),o=0;o<i;++o)r[o]=n.getUint32(e.byteOffset+t+o*_$E,!0);return r}function O$z(e,t){var i=t[2],n=t[3];if(0!==t[4])throw new t$Z("Binary glTF scene format is not JSON");var r=20+n,o=c$X(e,20,n),a=JSON.parse(o);f$H(a);var s=e.subarray(r,i),l=a.buffers;if(t$$(l)&&Object.keys(l).length>0){var u=e$1Y(l.binary_glTF,l.KHR_binary_glTF);t$$(u)&&(u.extras._pipeline.source=s)}return f$G(a,"KHR_binary_glTF"),a}function x$I(e,t){for(var i,n,r=t[2],o=12;o<r;){var a=g$x(e,o,2),s=a[0],l=a[1];o+=8;var u=e.subarray(o,o+s);if(o+=s,1313821514===l){var c=c$X(u);f$H(i=JSON.parse(c))}else 5130562===l&&(n=u)}if(t$$(i)&&t$$(n)){var h=i.buffers;if(t$$(h)&&h.length>0)h[0].extras._pipeline.source=n}return i}function n$H(e,t){var i=e.extensionsUsed;t$$(i)||(i=[],e.extensionsUsed=i),e$Y(i,t,!0)}function i$G(e){switch(e){case C$12.BYTE:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getInt8(t+o*n)};case C$12.UNSIGNED_BYTE:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getUint8(t+o*n)};case C$12.SHORT:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getInt16(t+o*n,!0)};case C$12.UNSIGNED_SHORT:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getUint16(t+o*n,!0)};case C$12.INT:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getInt32(t+o*n,!0)};case C$12.UNSIGNED_INT:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getUint32(t+o*n,!0)};case C$12.FLOAT:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getFloat32(t+o*n,!0)};case C$12.DOUBLE:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getFloat64(t+o*n,!0)}}}function h$I(e,t){var i=e.bufferViews,n=e.buffers,r=t.bufferView,o=r$t(t.type);if(!t$$(t.bufferView))return{min:d$10(new Array(o),0),max:d$10(new Array(o),0)};for(var a=d$10(new Array(o),Number.POSITIVE_INFINITY),s=d$10(new Array(o),Number.NEGATIVE_INFINITY),l=i[r],u=n[l.buffer].extras._pipeline.source,c=t.count,h=p$O(e,t),d=t.byteOffset+l.byteOffset+u.byteOffset,f=t.componentType,p=C$12.getSizeInBytes(f),_=new DataView(u.buffer),m=new Array(o),$=i$G(f),g=0;g<c;g++){$(_,d,o,p,m);for(var y=0;y<o;y++){var v=m[y];a[y]=Math.min(a[y],v),s[y]=Math.max(s[y],v)}d+=h}return{min:a,max:s}}var d$H=[de$x.FUNC_ADD,de$x.FUNC_ADD],l$H=[de$x.ONE,de$x.ZERO,de$x.ONE,de$x.ZERO];function c$F(e,t){var i=e.enable;return!!t$$(i)&&i.indexOf(t)>-1}var N$F=[de$x.ZERO,de$x.ONE,de$x.SRC_COLOR,de$x.ONE_MINUS_SRC_COLOR,de$x.SRC_ALPHA,de$x.ONE_MINUS_SRC_ALPHA,de$x.DST_ALPHA,de$x.ONE_MINUS_DST_ALPHA,de$x.DST_COLOR,de$x.ONE_MINUS_DST_COLOR];function L$H(e,t){if(!t$$(e))return t;for(var i=0;i<4;i++)if(-1===N$F.indexOf(e[i]))return t;return e}function R$A(e){var t={},i={};return t$$(e.techniques)&&(t$A.technique(e,(function(e,n){var r=e.states;if(t$$(r)){var o=i[n]={};if(c$F(r,de$x.BLEND)){o.alphaMode="BLEND";var a=r.functions;t$$(a)&&(t$$(a.blendEquationSeparate)||t$$(a.blendFuncSeparate))&&(t[n]={blendEquation:e$1Y(a.blendEquationSeparate,d$H),blendFactors:L$H(a.blendFuncSeparate,l$H)})}c$F(r,de$x.CULL_FACE)||(o.doubleSided=!0),delete e.states}})),Object.keys(t).length>0&&(t$$(e.extensions)||(e.extensions={}),n$H(e,"KHR_blend")),t$A.material(e,(function(e){if(t$$(e.technique)){var n=i[e.technique];t$A.objectLegacy(n,(function(t,i){e[i]=t}));var r=t[e.technique];t$$(r)&&(t$$(e.extensions)||(e.extensions={}),e.extensions.KHR_blend=r)}}))),e}function n$G(e,t){var i=e.extensionsRequired;t$$(i)||(i=[],e.extensionsRequired=i),e$Y(i,t,!0),n$H(e,t)}function _$D(e){var t=e.techniques,i={},n={};if(t$$(t)){var r={programs:[],shaders:[],techniques:[]},o=e.glExtensionsUsed;delete e.glExtensionsUsed,t$A.technique(e,(function(t,a){var s,l={name:t.name,program:void 0,attributes:{},uniforms:{}};t$A.techniqueAttribute(t,(function(e,i){s=t.parameters[e],l.attributes[i]={semantic:s.semantic}})),t$A.techniqueUniform(t,(function(e,n){s=t.parameters[e],l.uniforms[n]={count:s.count,node:s.node,type:s.type,semantic:s.semantic,value:s.value},i[e]=n}));var u=e.programs[t.program],c={name:u.name,fragmentShader:void 0,vertexShader:void 0,glExtensions:o},h=e.shaders[u.fragmentShader];c.fragmentShader=e$Y(r.shaders,h,!0);var d=e.shaders[u.vertexShader];c.vertexShader=e$Y(r.shaders,d,!0),l.program=e$Y(r.programs,c),n[a]=e$Y(r.techniques,l)})),r.techniques.length>0&&(t$$(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=r,n$H(e,"KHR_techniques_webgl"),n$G(e,"KHR_techniques_webgl"))}return t$A.material(e,(function(e){if(t$$(e.technique)){var t={technique:n[e.technique]};t$A.objectLegacy(e.values,(function(e,n){t$$(t.values)||(t.values={});var r=i[n];t.values[r]=e})),t$$(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=t}delete e.technique,delete e.values})),delete e.techniques,delete e.programs,delete e.shaders,e}var d$G=["mesh","node","material","accessor","bufferView","buffer"];function p$N(e,t){return t=e$1Y(t,d$G),d$G.forEach((function(i){t.indexOf(i)>-1&&V$w(e,i)})),e}var w$M={accessor:"accessors",buffer:"buffers",bufferView:"bufferViews",node:"nodes",material:"materials",mesh:"meshes"};function V$w(e,t){var i=e[w$M[t]];if(t$$(i))for(var n=0,r=m$D[t](e),o=i.length,a=0;a<o;++a)r[a]||(a$A[t](e,a-n),n++)}function a$A(){}function m$D(){}function b$X(e,t){return!(t$$(t.mesh)||t$$(t.camera)||t$$(t.skin)||t$$(t.weights)||t$$(t.extras)||t$$(t.extensions)&&0!==t.extensions.length)&&(!t$$(t.children)||0===t.children.filter((function(t){return!b$X(e,e.nodes[t])})).length)}function b$W(e,t){var i={byteLength:t.length,extras:{_pipeline:{source:t}}},n={buffer:e$Y(e.buffers,i),byteOffset:0,byteLength:t.length};return e$Y(e.bufferViews,n)}function T$J(e,t){var i=p$O(e,t),n=C$12.getSizeInBytes(t.componentType),r=r$t(t.type),o=t.count,a=new Array(r*o);if(!t$$(t.bufferView))return d$10(a,0),a;for(var s=e.bufferViews[t.bufferView],l=e.buffers[s.buffer].extras._pipeline.source,u=t.byteOffset+s.byteOffset+l.byteOffset,c=new DataView(l.buffer),h=new Array(r),d=i$G(t.componentType),f=0;f<o;++f){d(c,u,r,n,h);for(var p=0;p<r;++p)a[f*r+p]=h[p];u+=i}return a}function p$M(e){var t;return t$A.accessorWithSemantic(e,"JOINTS_0",(function(i){var n=e.accessors[i];(t=n.componentType)===de$x.BYTE?i$F(e,n,C$12.UNSIGNED_BYTE):t!==de$x.UNSIGNED_BYTE&&t!==de$x.UNSIGNED_SHORT&&i$F(e,n,C$12.UNSIGNED_SHORT)})),t$A.accessorWithSemantic(e,"WEIGHTS_0",(function(i){var n=e.accessors[i];(t=n.componentType)===de$x.BYTE?i$F(e,n,C$12.UNSIGNED_BYTE):t===de$x.SHORT&&i$F(e,n,C$12.UNSIGNED_SHORT)})),e}function i$F(e,t,i){var n=C$12.createTypedArray(i,T$J(e,t)),r=new Uint8Array(n.buffer);t.bufferView=b$W(e,r),t.componentType=i,t.byteOffset=0}a$A.accessor=function(e,t){e.accessors.splice(t,1),t$A.mesh(e,(function(e){t$A.meshPrimitive(e,(function(e){t$A.meshPrimitiveAttribute(e,(function(i,n){i>t&&e.attributes[n]--})),t$A.meshPrimitiveTarget(e,(function(e){t$A.meshPrimitiveTargetAttribute(e,(function(i,n){i>t&&e[n]--}))}));var i=e.indices;t$$(i)&&i>t&&e.indices--}))})),t$A.skin(e,(function(e){t$$(e.inverseBindMatrices)&&e.inverseBindMatrices>t&&e.inverseBindMatrices--})),t$A.animation(e,(function(e){t$A.animationSampler(e,(function(e){t$$(e.input)&&e.input>t&&e.input--,t$$(e.output)&&e.output>t&&e.output--}))}))},a$A.buffer=function(e,t){e.buffers.splice(t,1),t$A.bufferView(e,(function(e){t$$(e.buffer)&&e.buffer>t&&e.buffer--}))},a$A.bufferView=function(e,t){e.bufferViews.splice(t,1),t$A.accessor(e,(function(e){t$$(e.bufferView)&&e.bufferView>t&&e.bufferView--})),t$A.shader(e,(function(e){t$$(e.bufferView)&&e.bufferView>t&&e.bufferView--})),t$A.image(e,(function(e){t$$(e.bufferView)&&e.bufferView>t&&e.bufferView--,t$A.compressedImage(e,(function(e){var i=e.bufferView;t$$(i)&&i>t&&e.bufferView--}))})),s$I(e,"KHR_draco_mesh_compression")&&t$A.mesh(e,(function(e){t$A.meshPrimitive(e,(function(e){t$$(e.extensions)&&t$$(e.extensions.KHR_draco_mesh_compression)&&e.extensions.KHR_draco_mesh_compression.bufferView>t&&e.extensions.KHR_draco_mesh_compression.bufferView--}))}))},a$A.mesh=function(e,t){e.meshes.splice(t,1),t$A.node(e,(function(e){t$$(e.mesh)&&(e.mesh>t?e.mesh--:e.mesh===t&&delete e.mesh)}))},a$A.node=function(e,t){e.nodes.splice(t,1),t$A.skin(e,(function(e){t$$(e.skeleton)&&e.skeleton>t&&e.skeleton--,e.joints=e.joints.map((function(e){return e>t?e-1:e}))})),t$A.animation(e,(function(e){t$A.animationChannel(e,(function(e){t$$(e.target)&&t$$(e.target.node)&&e.target.node>t&&e.target.node--}))})),t$A.technique(e,(function(e){t$A.techniqueUniform(e,(function(e){t$$(e.node)&&e.node>t&&e.node--}))})),t$A.node(e,(function(e){!t$$(e.children)||(e.children=e.children.filter((function(e){return e!==t})).map((function(e){return e>t?e-1:e})))})),t$A.scene(e,(function(e){e.nodes=e.nodes.filter((function(e){return e!==t})).map((function(e){return e>t?e-1:e}))}))},a$A.material=function(e,t){e.materials.splice(t,1),t$A.mesh(e,(function(e){t$A.meshPrimitive(e,(function(e){t$$(e.material)&&e.material>t&&e.material--}))}))},m$D.accessor=function(e){var t={};return t$A.mesh(e,(function(e){t$A.meshPrimitive(e,(function(e){t$A.meshPrimitiveAttribute(e,(function(e){t[e]=!0})),t$A.meshPrimitiveTarget(e,(function(e){t$A.meshPrimitiveTargetAttribute(e,(function(e){t[e]=!0}))}));var i=e.indices;t$$(i)&&(t[i]=!0)}))})),t$A.skin(e,(function(e){t$$(e.inverseBindMatrices)&&(t[e.inverseBindMatrices]=!0)})),t$A.animation(e,(function(e){t$A.animationSampler(e,(function(e){t$$(e.input)&&(t[e.input]=!0),t$$(e.output)&&(t[e.output]=!0)}))})),t},m$D.buffer=function(e){var t={};return t$A.bufferView(e,(function(e){t$$(e.buffer)&&(t[e.buffer]=!0)})),t},m$D.bufferView=function(e){var t={};return t$A.accessor(e,(function(e){t$$(e.bufferView)&&(t[e.bufferView]=!0)})),t$A.shader(e,(function(e){t$$(e.bufferView)&&(t[e.bufferView]=!0)})),t$A.image(e,(function(e){t$$(e.bufferView)&&(t[e.bufferView]=!0),t$A.compressedImage(e,(function(e){t$$(e.bufferView)&&(t[e.bufferView]=!0)}))})),s$I(e,"KHR_draco_mesh_compression")&&t$A.mesh(e,(function(e){t$A.meshPrimitive(e,(function(e){t$$(e.extensions)&&t$$(e.extensions.KHR_draco_mesh_compression)&&(t[e.extensions.KHR_draco_mesh_compression.bufferView]=!0)}))})),t},m$D.mesh=function(e){var t={};return t$A.node(e,(function(i){if(t$$(i.mesh&&t$$(e.meshes))){var n=e.meshes[i.mesh];t$$(n)&&t$$(n.primitives)&&n.primitives.length>0&&(t[i.mesh]=!0)}})),t},m$D.node=function(e){var t={};return t$A.node(e,(function(i,n){b$X(e,i)||(t[n]=!0)})),t$A.skin(e,(function(e){t$$(e.skeleton)&&(t[e.skeleton]=!0),t$A.skinJoint(e,(function(e){t[e]=!0}))})),t$A.animation(e,(function(e){t$A.animationChannel(e,(function(e){t$$(e.target)&&t$$(e.target.node)&&(t[e.target.node]=!0)}))})),t$A.technique(e,(function(e){t$A.techniqueUniform(e,(function(e){t$$(e.node)&&(t[e.node]=!0)}))})),t},m$D.material=function(e){var t={};return t$A.mesh(e,(function(e){t$A.meshPrimitive(e,(function(e){t$$(e.material)&&(t[e.material]=!0)}))})),t};var P$B={.8:se$m,"1.0":Ve$f,"2.0":void 0};function te$r(e,t){var i=(t=e$1Y(t,e$1Y.EMPTY_OBJECT)).targetVersion,n=e.version;e.asset=e$1Y(e.asset,{version:"1.0"}),e.asset.version=e$1Y(e.asset.version,"1.0"),n=e$1Y(n,e.asset.version).toString(),Object.prototype.hasOwnProperty.call(P$B,n)||(t$$(n)&&(n=n.substring(0,3)),Object.prototype.hasOwnProperty.call(P$B,n)||(n="1.0"));for(var r=P$B[n];t$$(r)&&n!==i;)r(e,t),n=e.asset.version,r=P$B[n];return e}function H$E(e){var t=e.materials;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i],r=n.instanceTechnique;t$$(r)&&(n.technique=r.technique,n.values=r.values,delete n.instanceTechnique)}}function re$s(e){var t=e.meshes;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i].primitives;if(t$$(n))for(var r=n.length,o=0;o<r;++o){var a=n[o],s=e$1Y(a.primitive,de$x.TRIANGLES);a.mode=e$1Y(a.mode,s),delete a.primitive}}}function ie$s(e){var t=e.nodes,i=new a$11,n=new a$U;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var o=t[r];if(t$$(o.rotation)){var a=o.rotation;a$11.fromArray(a,0,i),a$U.fromAxisAngle(i,a[3],n),o.rotation=[n.x,n.y,n.z,n.w]}var s=o.instanceSkin;t$$(s)&&(o.skeletons=s.skeletons,o.skin=s.skin,o.meshes=s.meshes,delete o.instanceSkin)}}function ne$p(e){var t=e.animations,i=e.accessors,n=e.bufferViews,r=e.buffers,o={},a=new a$11,s=new a$U;for(var l in t)if(Object.prototype.hasOwnProperty.call(t,l)){var u=t[l],c=u.channels,h=u.parameters,d=u.samplers;if(t$$(c))for(var f=c.length,p=0;p<f;++p){var _=c[p];if("rotation"===_.target.path){var m=h[d[_.sampler].output];if(t$$(o[m]))continue;o[m]=!0;for(var $=i[m],g=n[$.bufferView],y=r[g.buffer].extras._pipeline.source,v=y.byteOffset+g.byteOffset+$.byteOffset,x=$.componentType,b=$.count,S=r$t($.type),w=$.count*S,C=C$12.createArrayBufferView(x,y.buffer,v,w),T=0;T<b;T++){var P=T*S;a$11.unpack(C,P,a);var E=C[P+3];a$U.fromAxisAngle(a,E,s),a$U.pack(s,C,P)}}}}}function ae$q(e){var t=e.techniques;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i],r=n.passes;if(t$$(r)){var o=e$1Y(n.pass,"defaultPass");if(Object.prototype.hasOwnProperty.call(r,o)){var a=r[o],s=a.instanceProgram;n.attributes=e$1Y(n.attributes,s.attributes),n.program=e$1Y(n.program,s.program),n.uniforms=e$1Y(n.uniforms,s.uniforms),n.states=e$1Y(n.states,a.states)}delete n.passes,delete n.pass}}}function se$m(e){t$$(e.asset)||(e.asset={});var t=e.asset;if(t.version="1.0","string"==typeof t.profile){var i=t.profile.split(" ");t.profile={api:i[0],version:i[1]}}else t.profile={};if(t$$(e.version)&&delete e.version,H$E(e),re$s(e),ie$s(e),ne$p(e),ae$q(e),t$$(e.allExtensions)&&(e.extensionsUsed=e.allExtensions,delete e.allExtensions),t$$(e.lights)){var n=e$1Y(e.extensions,{});e.extensions=n;var r=e$1Y(n.KHR_materials_common,{});n.KHR_materials_common=r,r.lights=e.lights,delete e.lights,n$H(e,"KHR_materials_common")}}function oe$q(e){var t=e.animations;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i],r=n.parameters;if(t$$(r)){var o=n.samplers;for(var a in o)if(Object.prototype.hasOwnProperty.call(o,a)){var s=o[a];s.input=r[s.input],s.output=r[s.output]}delete n.parameters}}}function L$G(e,t){var i=[];for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=e[n];t[n]=i.length,i.push(r),t$$(r.name)||(r.name=n)}return i}function fe$k(e){var t,i,n={accessors:{},animations:{},buffers:{},bufferViews:{},cameras:{},images:{},materials:{},meshes:{},nodes:{},programs:{},samplers:{},scenes:{},shaders:{},skins:{},textures:{},techniques:{}},r={},o=e.nodes;for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t$$(i=o[a].jointName)&&(r[i]=a));for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t$$(n[s])){var l={},u=e[s];e[s]=L$G(u,l),n[s]=l}for(i in r)Object.prototype.hasOwnProperty.call(r,i)&&(r[i]=n.nodes[r[i]]);t$$(e.scene)&&(e.scene=n.scenes[e.scene]),t$A.bufferView(e,(function(e){t$$(e.buffer)&&(e.buffer=n.buffers[e.buffer])})),t$A.accessor(e,(function(e){t$$(e.bufferView)&&(e.bufferView=n.bufferViews[e.bufferView])})),t$A.shader(e,(function(e){var t=e.extensions;if(t$$(t)){var i=t.KHR_binary_glTF;t$$(i)&&(e.bufferView=n.bufferViews[i.bufferView],delete t.KHR_binary_glTF),0===Object.keys(t).length&&delete e.extensions}})),t$A.program(e,(function(e){t$$(e.vertexShader)&&(e.vertexShader=n.shaders[e.vertexShader]),t$$(e.fragmentShader)&&(e.fragmentShader=n.shaders[e.fragmentShader])})),t$A.technique(e,(function(e){t$$(e.program)&&(e.program=n.programs[e.program]),t$A.techniqueParameter(e,(function(e){t$$(e.node)&&(e.node=n.nodes[e.node]);var t=e.value;"string"==typeof t&&(e.value={index:n.textures[t]})}))})),t$A.mesh(e,(function(e){t$A.meshPrimitive(e,(function(e){t$$(e.indices)&&(e.indices=n.accessors[e.indices]),t$A.meshPrimitiveAttribute(e,(function(t,i){e.attributes[i]=n.accessors[t]})),t$$(e.material)&&(e.material=n.materials[e.material])}))})),t$A.node(e,(function(i){var r=i.children;if(t$$(r)){var o=r.length;for(t=0;t<o;++t)r[t]=n.nodes[r[t]]}if(t$$(i.meshes)){var a=i.meshes,s=a.length;if(s>0)for(i.mesh=n.meshes[a[0]],t=1;t<s;++t){var l={mesh:n.meshes[a[t]]},u=e$Y(e.nodes,l);t$$(r)||(r=[],i.children=r),r.push(u)}delete i.meshes}if(t$$(i.camera)&&(i.camera=n.cameras[i.camera]),t$$(i.skin)&&(i.skin=n.skins[i.skin]),t$$(i.skeletons)){var c=i.skeletons;if(c.length>0&&t$$(i.skin))e.skins[i.skin].skeleton=n.nodes[c[0]];delete i.skeletons}t$$(i.jointName)&&delete i.jointName})),t$A.skin(e,(function(e){t$$(e.inverseBindMatrices)&&(e.inverseBindMatrices=n.accessors[e.inverseBindMatrices]);var i=e.jointNames;if(t$$(i)){var o=[],a=i.length;for(t=0;t<a;++t)o[t]=r[i[t]];e.joints=o,delete e.jointNames}})),t$A.scene(e,(function(e){var i=e.nodes;if(t$$(i)){var r=i.length;for(t=0;t<r;++t)i[t]=n.nodes[i[t]]}})),t$A.animation(e,(function(e){var t={};e.samplers=L$G(e.samplers,t),t$A.animationSampler(e,(function(e){e.input=n.accessors[e.input],e.output=n.accessors[e.output]})),t$A.animationChannel(e,(function(e){e.sampler=t[e.sampler];var i=e.target;t$$(i)&&(i.node=n.nodes[i.id],delete i.id)}))})),t$A.material(e,(function(e){t$$(e.technique)&&(e.technique=n.techniques[e.technique]),t$A.materialValue(e,(function(t,i){"string"==typeof t&&(e.values[i]={index:n.textures[t]})}));var t=e.extensions;if(t$$(t)){var i=t.KHR_materials_common;t$$(i)&&t$A.materialValue(i,(function(e,t){"string"==typeof e&&(i.values[t]={index:n.textures[e]})}))}})),t$A.image(e,(function(e){var t=e.extensions;if(t$$(t)){var i=t.KHR_binary_glTF;t$$(i)&&(e.bufferView=n.bufferViews[i.bufferView],e.mimeType=i.mimeType,delete t.KHR_binary_glTF),0===Object.keys(t).length&&delete e.extensions}t$A.compressedImage(e,(function(e){var i=e.extensions;if(t$$(i)){var r=i.KHR_binary_glTF;t$$(r)&&(e.bufferView=n.bufferViews[r.bufferView],e.mimeType=r.mimeType,delete i.KHR_binary_glTF),0===Object.keys(t).length&&delete e.extensions}}))})),t$A.texture(e,(function(e){t$$(e.sampler)&&(e.sampler=n.samplers[e.sampler]),t$$(e.source)&&(e.source=n.images[e.source])}))}function ce$i(e){t$A.animation(e,(function(e){t$A.animationSampler(e,(function(e){delete e.name}))}))}function ue$i(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var i=e[t];Array.isArray(i)&&0===i.length&&delete e[t]}t$A.node(e,(function(e){t$$(e.children)&&0===e.children.length&&delete e.children}))}function me$p(e){var t=e.asset;delete t.profile,delete t.premultipliedAlpha}var le$p={CESIUM_RTC:!0,KHR_materials_common:!0,WEB3D_quantized_attributes:!0};function pe$k(e){var t=e.extensionsUsed;if(e.extensionsRequired=e$1Y(e.extensionsRequired,[]),t$$(t))for(var i=t.length,n=0;n<i;++n){var r=t[n];t$$(le$p[r])&&e.extensionsRequired.push(r)}}function ve$k(e){t$A.buffer(e,(function(e){delete e.type}))}function he$i(e){t$A.texture(e,(function(e){delete e.format,delete e.internalFormat,delete e.target,delete e.type}))}function de$l(e){t$A.mesh(e,(function(e){t$A.meshPrimitive(e,(function(e){t$A.meshPrimitiveAttribute(e,(function(t,i){"TEXCOORD"===i?e.attributes.TEXCOORD_0=t:"COLOR"===i&&(e.attributes.COLOR_0=t)})),delete e.attributes.TEXCOORD,delete e.attributes.COLOR}))})),t$A.technique(e,(function(e){t$A.techniqueParameter(e,(function(e){var t=e.semantic;t$$(t)&&("TEXCOORD"===t?e.semantic="TEXCOORD_0":"COLOR"===t&&(e.semantic="COLOR_0"))}))}))}var be$n={POSITION:!0,NORMAL:!0,TANGENT:!0},ye$k={COLOR:"COLOR",JOINT:"JOINTS",JOINTS:"JOINTS",TEXCOORD:"TEXCOORD",WEIGHT:"WEIGHTS",WEIGHTS:"WEIGHTS"};function Oe$j(e){var t={};t$A.mesh(e,(function(e){t$A.meshPrimitive(e,(function(e){for(var i in t$A.meshPrimitiveAttribute(e,(function(e,i){if("_"!==i.charAt(0)){var n=i.search(/_[0-9]+/g),r=i,o="_0";n>=0&&(r=i.substring(0,n),o=i.substring(n));var a,s=ye$k[r];t$$(s)?(a=s+o,t[i]=a):t$$(be$n[r])||(a="_"+i,t[i]=a)}})),t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i],r=e.attributes[i];t$$(r)&&(delete e.attributes[i],e.attributes[n]=r)}}))})),t$A.technique(e,(function(e){t$A.techniqueParameter(e,(function(e){var i=t[e.semantic];t$$(i)&&(e.semantic=i)}))}))}function ge$g(e){t$A.camera(e,(function(e){var t=e.perspective;if(t$$(t)){var i=t.aspectRatio;t$$(i)&&0===i&&delete t.aspectRatio;var n=t.yfov;t$$(n)&&0===n&&(t.yfov=1)}}))}function k$C(e,t){return t$$(t.byteStride)&&0!==t.byteStride?t.byteStride:p$O(e,t)}function we$i(e){t$A.buffer(e,(function(e){t$$(e.byteLength)||(e.byteLength=e.extras._pipeline.source.length)})),t$A.accessor(e,(function(t){var i=t.bufferView;if(t$$(i)){var n=e.bufferViews[i],r=k$C(e,t),o=t.byteOffset+t.count*r;n.byteLength=Math.max(e$1Y(n.byteLength,0),o)}}))}function xe$r(e){var t,i,n,r=e.bufferViews,o={};t$A.accessorContainingVertexAttributeData(e,(function(t){var i=e.accessors[t];t$$(i.bufferView)&&(o[i.bufferView]=!0)}));var a={};for(var s in t$A.accessor(e,(function(e){t$$(e.bufferView)&&(a[e.bufferView]=e$1Y(a[e.bufferView],[]),a[e.bufferView].push(e))})),a)if(Object.prototype.hasOwnProperty.call(a,s)){n=r[s];var l=a[s];l.sort((function(e,t){return e.byteOffset-t.byteOffset}));var u=0,c=0,h=l.length;for(t=0;t<h;++t){var d=l[t],f=k$C(e,d),p=d.byteOffset,_=d.count*f;delete d.byteStride;var m=t<h-1;if(f!==(m?k$C(e,l[t+1]):void 0)){var $=e$1W(n,!0);o[s]&&($.byteStride=f),$.byteOffset+=u,$.byteLength=p+_-u;var g=e$Y(r,$);for(i=c;i<=t;++i)(d=l[i]).bufferView=g,d.byteOffset=d.byteOffset-u;u=m?l[t+1].byteOffset:void 0,c=t+1}}}p$N(e,["accessor","bufferView","buffer"])}function Te$l(e){t$A.accessorWithSemantic(e,"POSITION",(function(t){var i=e.accessors[t];if(!t$$(i.min)||!t$$(i.max)){var n=h$I(e,i);i.min=n.min,i.max=n.max}}))}function K$y(e){return(!t$$(e.children)||0===e.children.length)&&(!t$$(e.meshes)||0===e.meshes.length)&&!t$$(e.camera)&&!t$$(e.skin)&&!t$$(e.skeletons)&&!t$$(e.jointName)&&(!t$$(e.translation)||a$11.fromArray(e.translation).equals(a$11.ZERO))&&(!t$$(e.scale)||a$11.fromArray(e.scale).equals(new a$11(1,1,1)))&&(!t$$(e.rotation)||a$10.fromArray(e.rotation).equals(new a$10(0,0,0,1)))&&(!t$$(e.matrix)||c$1a.fromColumnMajorArray(e.matrix).equals(c$1a.IDENTITY))&&!t$$(e.extensions)&&!t$$(e.extras)}function D$L(e,t){t$A.scene(e,(function(e){var i=e.nodes;if(t$$(i))for(var n=i.length;n>=0;--n)if(i[n]===t)return void i.splice(n,1)})),t$A.node(e,(function(i,n){if(t$$(i.children)){var r=i.children.indexOf(t);r>-1&&(i.children.splice(r,1),K$y(i)&&D$L(e,n))}})),delete e.nodes[t]}function _e$h(e){return t$A.node(e,(function(t,i){K$y(t)&&D$L(e,i)})),e}function Re$f(e){t$A.animation(e,(function(t){t$A.animationSampler(t,(function(t){var i=e.accessors[t.input];if(!t$$(i.min)||!t$$(i.max)){var n=h$I(e,i);i.min=n.min,i.max=n.max}}))}))}function Ve$f(e){e.asset=e$1Y(e.asset,{}),e.asset.version="2.0",H$E(e),oe$q(e),_e$h(e),fe$k(e),ce$i(e),me$p(e),pe$k(e),we$i(e),xe$r(e),Te$l(e),Re$f(e),ve$k(e),he$i(e),de$l(e),Oe$j(e),p$M(e),ge$g(e),R$A(e),_$D(e),ue$i(e)}function t$y(){this.initialized=!1,this.resourcesParsed=!1,this.vertexBuffersToCreate=new i$Y,this.indexBuffersToCreate=new i$Y,this.buffers={},this.pendingBufferLoads=0,this.programsToCreate=new i$Y,this.shaders={},this.pendingShaderLoads=0,this.texturesToCreate=new i$Y,this.pendingTextureLoads=0,this.texturesToCreateFromBufferView=new i$Y,this.pendingBufferViewToImage=0,this.createSamplers=!0,this.createSkins=!0,this.createRuntimeAnimations=!0,this.createVertexArrays=!0,this.createRenderStates=!0,this.createUniformMaps=!0,this.createRuntimeNodes=!0,this.createdBufferViews={},this.primitivesToDecode=new i$Y,this.activeDecodingTasks=0,this.pendingDecodingCache=!1,this.skinnedNodesIds=[]}function s$H(e,t,i){return e.subarray(t,t+i)}t$y.prototype.getBuffer=function(e){return s$H(this.buffers[e.buffer],e.byteOffset,e.byteLength)},t$y.prototype.finishedPendingBufferLoads=function(){return 0===this.pendingBufferLoads},t$y.prototype.finishedBuffersCreation=function(){return 0===this.pendingBufferLoads&&0===this.vertexBuffersToCreate.length&&0===this.indexBuffersToCreate.length},t$y.prototype.finishedProgramCreation=function(){return 0===this.pendingShaderLoads&&0===this.programsToCreate.length},t$y.prototype.finishedTextureCreation=function(){var e=0===this.pendingTextureLoads,t=0===this.texturesToCreate.length&&0===this.texturesToCreateFromBufferView.length;return e&&t},t$y.prototype.finishedEverythingButTextureCreation=function(){var e=0===this.pendingBufferLoads&&0===this.pendingShaderLoads,t=0===this.vertexBuffersToCreate.length&&0===this.indexBuffersToCreate.length&&0===this.programsToCreate.length&&0===this.pendingBufferViewToImage;return this.finishedDecoding()&&e&&t},t$y.prototype.finishedDecoding=function(){return 0===this.primitivesToDecode.length&&0===this.activeDecodingTasks&&!this.pendingDecodingCache},t$y.prototype.finished=function(){return this.finishedDecoding()&&this.finishedTextureCreation()&&this.finishedEverythingButTextureCreation()};var s$G={updateForwardAxis:function(e){var t=e.gltf.extras.sourceVersion;(t$$(t)&&"2.0"!==t||"2.0"!==s$G.getAssetVersion(e.gltf))&&(e._gltfForwardAxis=z$y.X)},getAssetVersion:function(e){return t$$(e.asset)&&t$$(e.asset.version)?e.asset.version:"1.0"},splitIncompatibleMaterials:function(e){var t=e.accessors,i=e.materials,n={};return t$A.mesh(e,(function(e){t$A.meshPrimitive(e,(function(e){var r,o,a=e.material,s=i[a],l=e.attributes.JOINTS_0;if(t$$(l)){var u=t[l];r=u.componentType,o=u.type}var c=t$$(l),h=t$$(e.attributes.COLOR_0),d=t$$(e.targets),f=t$$(e.attributes.NORMAL),p=t$$(e.attributes.TANGENT),_=t$$(e.attributes.TEXCOORD_0),m=_&&t$$(e.attributes.TEXCOORD_1),$=n[a];if(t$$($)){if($.skinning.skinned!==c||$.skinning.type!==o||$.hasVertexColors!==h||$.hasMorphTargets!==d||$.hasNormals!==f||$.hasTangents!==p||$.hasTexCoords!==_||$.hasTexCoord1!==m){var g=e$1W(s,!0);a=e$Y(i,g),e.material=a,n[a]={skinning:{skinned:c,componentType:r,type:o},hasVertexColors:h,hasMorphTargets:d,hasNormals:f,hasTangents:p,hasTexCoords:_,hasTexCoord1:m}}}else n[a]={skinning:{skinned:c,componentType:r,type:o},hasVertexColors:h,hasMorphTargets:d,hasNormals:f,hasTangents:p,hasTexCoords:_,hasTexCoord1:m}}))})),n},getShaderVariable:function(e){return"SCALAR"===e?"float":e.toLowerCase()},ModelState:{NEEDS_LOAD:0,LOADING:1,LOADED:2,FAILED:3},getFailedLoadFunction:function(e,t,i){return function(n){e._state=s$G.ModelState.FAILED;var r="Failed to load "+t+": "+i;t$$(n)&&(r+="\n"+n.message),e._readyPromise.reject(new t$Z(r))}},parseBuffers:function(e,t){var i=e._loadResources;t$A.buffer(e.gltf,(function(n,r){if(t$$(n.extras._pipeline.source))i.buffers[r]=n.extras._pipeline.source;else if(t$$(t)){var o=e._resource.getDerivedResource({url:n.uri});++i.pendingBufferLoads,o.fetchArrayBuffer().then(t(e,r)).otherwise(s$G.getFailedLoadFunction(e,"buffer",o.url))}}))}},sr$2=new a$11,cr$1=new a$11;function fr$2(e,t){return t$A.techniqueAttribute(e,(function(e,i){if(e.semantic===t)return i}))}function mr$1(e,t){var i=e.accessors,n=e.materials,r=e.extensions.KHR_techniques_webgl,o=r.techniques,a=r.programs,s=r.shaders,l=t.targets,u=t.attributes;for(var c in l)if(l.hasOwnProperty(c)){var h=l[c];for(var d in h)"extras"!==d&&(u[d+"_"+c]=h[d])}var f=o[n[t.material].extensions.KHR_techniques_webgl.technique],p=s[a[f.program].vertexShader];for(var _ in u)if(u.hasOwnProperty(_)&&!t$$(fr$2(f,_))){var m=i[u[_]],$=_.toLowerCase();"_"===$.charAt(0)&&($=$.slice(1));var g="a_"+$;f.attributes[g]={semantic:_,type:m.componentType};var y=p.extras._pipeline,v=y.source;v="attribute "+s$G.getShaderVariable(m.type)+" "+g+";\n"+v,y.source=v}}function nr$3(e,t,i,n){return s$I(e,"KHR_techniques_webgl")?function(e,t){if(!(e.semantic!==i||n&&t$$(e.node)))return t}:function(e,r){var o=t.parameters[e];if(!(o.semantic!==i||n&&t$$(o.node)))return r}}s$G.computeBoundingSphere=function(e){for(var t=e.gltf,i=t.nodes,n=t.meshes,r=t.scenes[t.scene].nodes,o=r.length,a=[],s=new a$11(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),l=new a$11(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),u=0;u<o;++u){var c=i[r[u]];for(c._transformToRoot=s$G.getTransform(c),a.push(c);a.length>0;){var h=(c=a.pop())._transformToRoot,d=c.mesh;if(t$$(d))for(var f=n[d].primitives,p=f.length,_=0;_<p;++_){var m=f[_].attributes.POSITION;if(t$$(m)){var $=s$G.getAccessorMinMax(t,m),g=a$11.fromArray($.min,0,sr$2),y=a$11.fromArray($.max,0,cr$1);t$$(s)&&t$$(l)&&(c$1a.multiplyByPoint(h,g,g),c$1a.multiplyByPoint(h,y,y),a$11.minimumByComponent(s,g,s),a$11.maximumByComponent(l,y,l))}}var v=c.children;if(t$$(v))for(var x=v.length,b=0;b<x;++b){var S=i[v[b]];S._transformToRoot=s$G.getTransform(S),c$1a.multiplyTransformation(h,S._transformToRoot,S._transformToRoot),a.push(S)}delete c._transformToRoot}}var w=c$19.fromCornerPoints(s,l);return e._minCorner=s,e._maxCorner=l,e._forwardAxis===z$y.Z&&c$19.transformWithoutScale(w,z$y.Z_UP_TO_X_UP,w),e._upAxis===z$y.Y?c$19.transformWithoutScale(w,z$y.Y_UP_TO_Z_UP,w):e._upAxis===z$y.X&&c$19.transformWithoutScale(w,z$y.X_UP_TO_Z_UP,w),w},s$G.ensureSemanticExistence=function(e){return t$A.mesh(e,(function(t){t$A.meshPrimitive(t,(function(t){mr$1(e,t)}))})),e},s$G.createAttributeLocations=function(e,t){var i={},n=!1,r=1;if(t$A.techniqueAttribute(e,(function(e,t){/pos/i.test(t)&&!n?(i[t]=0,n=!0):i[t]=r++})),t$$(t))for(var o in t)t.hasOwnProperty(o)&&(i[o]=r++);return i},s$G.getAccessorMinMax=function(e,t){var i=e.accessors[t],n=i.extensions,r=i.min,o=i.max;if(t$$(n)){var a=n.WEB3D_quantized_attributes;t$$(a)&&(r=a.decodedMin,o=a.decodedMax)}return{min:r,max:o}},s$G.getAttributeOrUniformBySemantic=function(e,t,i,n){return t$A.technique(e,(function(r){if(!t$$(i)||r.program===i){var o=t$A.techniqueAttribute(r,nr$3(e,r,t,n));return t$$(o)?o:t$A.techniqueUniform(r,nr$3(e,r,t,n))}}))},s$G.getDiffuseAttributeOrUniform=function(e,t){var i=s$G.getAttributeOrUniformBySemantic(e,"COLOR_0",t);return t$$(i)||(i=s$G.getAttributeOrUniformBySemantic(e,"_3DTILESDIFFUSE",t)),i};var lr$2=new a$11,_r$1=new a$U,vr$2=new a$11;function J$F(e,t,i){t+="(?!\\w)",t=new RegExp(t,"g");var n=e.search(t);return e.replace(t,(function(e,t){return n===t?e:i}))}function dr$1(e,t){var i=e.accessors[t].extensions;if(t$$(i))return i.WEB3D_quantized_attributes}function or$3(e,t,i){var n=t.material,r=e.materials[n];if(s$I(e,"KHR_techniques_webgl")&&t$$(r.extensions)&&t$$(r.extensions.KHR_techniques_webgl)){var o=r.extensions.KHR_techniques_webgl.technique,a=e.extensions.KHR_techniques_webgl.techniques[o];return t$A.techniqueAttribute(a,(function(e,t){if(e.semantic===i)return t}))}}function R$z(e){var t={value:e,clone:function(e,t){return e},func:function(){return t.value}};return t}function k$B(e){var t={value:r$T.fromArray(e),clone:r$T.clone,func:function(){return t.value}};return t}function H$D(e){var t={value:a$11.fromArray(e),clone:a$11.clone,func:function(){return t.value}};return t}function N$E(e){var t={value:a$10.fromArray(e),clone:a$10.clone,func:function(){return t.value}};return t}function Q$D(e){var t={value:u$14.fromColumnMajorArray(e),clone:u$14.clone,func:function(){return t.value}};return t}function Y$z(e){var t={value:r$W.fromColumnMajorArray(e),clone:r$W.clone,func:function(){return t.value}};return t}function K$x(e){var t={value:c$1a.fromColumnMajorArray(e),clone:c$1a.clone,func:function(){return t.value}};return t}s$G.getTransform=function(e,t){return t$$(e.matrix)?c$1a.fromColumnMajorArray(e.matrix,t):c$1a.fromTranslationQuaternionRotationScale(a$11.fromArray(e.translation,0,lr$2),a$U.unpack(e.rotation,0,_r$1),a$11.fromArray(e.scale,0,vr$2),t)},s$G.getUsedExtensions=function(e){var t=e.extensionsUsed,i={};if(t$$(t))for(var n=t.length,r=0;r<n;r++){i[t[r]]=!0}return i},s$G.getRequiredExtensions=function(e){var t=e.extensionsRequired,i={};if(t$$(t))for(var n=t.length,r=0;r<n;r++){i[t[r]]=!0}return i},s$G.supportedExtensions={AGI_articulations:!0,CESIUM_RTC:!0,EXT_texture_webp:!0,KHR_blend:!0,KHR_binary_glTF:!0,KHR_draco_mesh_compression:!0,KHR_materials_common:!0,KHR_techniques_webgl:!0,KHR_materials_unlit:!0,KHR_materials_pbrSpecularGlossiness:!0,KHR_texture_transform:!0,WEB3D_quantized_attributes:!0},s$G.checkSupportedExtensions=function(e,t){for(var i in e)if(e.hasOwnProperty(i)){if(!s$G.supportedExtensions[i])throw new t$Z("Unsupported glTF Extension: "+i);if("EXT_texture_webp"===i&&!1===t)throw new t$Z("Loaded model requires WebP but browser does not support it.")}},s$G.checkSupportedGlExtensions=function(e,t){if(t$$(e))for(var i=e.length,n=0;n<i;n++){var r=e[n];if("OES_element_index_uint"!==r)throw new t$Z("Unsupported WebGL Extension: "+r);if(!t.elementIndexUint)throw new t$Z("OES_element_index_uint WebGL extension is not enabled.")}},s$G.modifyShaderForDracoQuantizedAttributes=function(e,t,i,n){var r={};for(var o in n)if(n.hasOwnProperty(o)){var a=n[o],s=a.quantization;if(!t$$(s))continue;var l=or$3(e,t,o);"_"===o.charAt(0)&&(o=o.substring(1));var u="gltf_u_dec_"+o.toLowerCase();if(!t$$(r[u])){var c,h="gltf_decoded_"+o,d=l.replace("a_","gltf_a_dec_"),f=a.componentsPerAttribute;i=J$F(i,l,d),i=(c=s.octEncoded?"vec3":f>1?"vec"+f:"float")+" "+d+";\n"+i;var p=3===f&&"COLOR_0"===o;p&&(i=J$F(i,d,"vec4("+d+", 1.0)"));var _="";if(s.octEncoded){var m=u+"_rangeConstant";i="uniform float "+m+";\n"+i,_="\nvoid main() {\n "+d+" = czm_octDecode("+l+".xy, "+m+").zxy;\n "+h+"();\n}\n"}else{var $=u+"_normConstant",g=u+"_min";i="uniform float "+$+";\nuniform "+c+" "+g+";\n"+i,_="\nvoid main() {\n "+d+" = "+g+" + "+l+(p?".xyz":"")+" * "+$+";\n "+h+"();\n}\n"}i=a$O.replaceMain(i,h),i+=_}}return{shader:i}},s$G.modifyShaderForQuantizedAttributes=function(e,t,i){var n={},r=t.attributes;for(var o in r)if(r.hasOwnProperty(o)){var a=or$3(e,t,o),s=t.attributes[o];"_"===o.charAt(0)&&(o=o.substring(1));var l="gltf_u_dec_"+o.toLowerCase(),u=l+"_scale",c=l+"_translate";if(!t$$(n[l])&&!t$$(n[u])){var h=dr$1(e,s);if(t$$(h)){var d,f=h.decodeMatrix,p="gltf_decoded_"+o,_=a.replace("a_","gltf_a_dec_"),m=Math.floor(Math.sqrt(f.length));i=(d=m>2?"vec"+(m-1):"float")+" "+_+";\n"+(i=J$F(i,a,_));var $="";5===m?(i="uniform vec4 "+c+";\n"+(i="uniform mat4 "+u+";\n"+i),$="\nvoid main() {\n "+_+" = "+u+" * "+a+" + "+c+";\n "+p+"();\n}\n",n[u]={mat:4},n[c]={vec:4}):(i="uniform mat"+m+" "+l+";\n"+i,$="\nvoid main() {\n "+_+" = "+d+"("+l+" * vec"+m+"("+a+",1.0));\n "+p+"();\n}\n",n[l]={mat:m}),i=a$O.replaceMain(i,p),i+=$}}}return{shader:i,uniforms:n}},s$G.toClipCoordinatesGLSL=function(e,t){var i=s$G.getAttributeOrUniformBySemantic(e,"POSITION"),n=i.replace("a_","gltf_a_dec_");-1!==t.indexOf(n)&&(i=n);var r=s$G.getAttributeOrUniformBySemantic(e,"MODELVIEWPROJECTION",void 0,!0);if(!t$$(r)||-1===t.indexOf(r)){var o=s$G.getAttributeOrUniformBySemantic(e,"PROJECTION",void 0,!0),a=s$G.getAttributeOrUniformBySemantic(e,"MODELVIEW",void 0,!0);-1!==t.indexOf("czm_instanced_modelView ")?a="czm_instanced_modelView":t$$(a)||(a=s$G.getAttributeOrUniformBySemantic(e,"CESIUM_RTC_MODELVIEW",void 0,!0)),r=o+" * "+a}return r+" * vec4("+i+".xyz, 1.0)"},s$G.modifyFragmentShaderForLogDepth=function(e){return e=a$O.replaceMain(e,"czm_depth_main"),e+="\nvoid main() \n{ \n czm_depth_main(); \n czm_writeLogDepth(); \n} \n"},s$G.modifyVertexShaderForLogDepth=function(e,t){return e=a$O.replaceMain(e,"czm_depth_main"),e+="\nvoid main() \n{ \n czm_depth_main(); \n czm_vertexLogDepth("+t+"); \n} \n"};var I$L=new a$10;function ir$6(e){var t={value:e,clone:a$10.clone,func:function(){var e=performance.now()/1e3,i=t.value[4];if(i>0){var n=e%i;I$L.x=n*t.value[0]+t.value[1],I$L.y=n*t.value[2]+t.value[3]}else I$L.x=t.value[1],I$L.y=t.value[3];var r=t.value[9];if(r>0){var o=e%r;I$L.z=o*t.value[5]+t.value[6],I$L.w=o*t.value[7]+t.value[8]}else I$L.z=t.value[6],I$L.w=t.value[8];return I$L}};return t}function X$t(e,t,i){this._value=void 0,this._textureId=e.index,this._textures=t,this._defaultTexture=i}function pr$1(e,t,i){var n=new X$t(e,t,i);return n.func=function(){return n.value},n}Object.defineProperties(X$t.prototype,{value:{get:function(){if(!t$$(this._value)){var e=this._textures[this._textureId];if(!t$$(e))return this._defaultTexture;this._value=e}return this._value},set:function(e){this._value=e}}}),X$t.prototype.clone=function(e){return e},X$t.prototype.func=void 0;var A$J={};A$J[de$x.FLOAT]=R$z,A$J[de$x.FLOAT_VEC2]=k$B,A$J[de$x.FLOAT_VEC3]=H$D,A$J[de$x.FLOAT_VEC4]=N$E,A$J[de$x.INT]=R$z,A$J[de$x.INT_VEC2]=k$B,A$J[de$x.INT_VEC3]=H$D,A$J[de$x.INT_VEC4]=N$E,A$J[de$x.BOOL]=R$z,A$J[de$x.BOOL_VEC2]=k$B,A$J[de$x.BOOL_VEC3]=H$D,A$J[de$x.BOOL_VEC4]=N$E,A$J[de$x.FLOAT_MAT2]=Q$D,A$J[de$x.FLOAT_MAT3]=Y$z,A$J[de$x.FLOAT_MAT4]=K$x,A$J[de$x.SAMPLER_2D]=pr$1;var Z$F={};function hr$1(e){return[e[0],e[1],e[2],e[3],e[5],e[6],e[7],e[8],e[10],e[11],e[12],e[13],e[15],e[16],e[17],e[18]]}function Er$1(e){return[e[20],e[21],e[22],e[23]]}Z$F[ie$z.BASECOLOR_UV_OFFSET_AND_TILING]=ir$6,Z$F[ie$z.EMISSIVE_UV_OFFSET_AND_TILING]=ir$6,s$G.createUniformFunction=function(e,t,i,n,r){return t$$(r)?Z$F[r](t,i,n):A$J[e](t,i,n)},s$G.createUniformsForDracoQuantizedAttributes=function(e){var t={};for(var i in e)if(e.hasOwnProperty(i)){var n=e[i],r=n.quantization;if(!t$$(r))continue;"_"===i.charAt(0)&&(i=i.substring(1));var o="gltf_u_dec_"+i.toLowerCase();if(r.octEncoded){var a=o+"_rangeConstant",s=(1<<r.quantizationBits)-1;t[a]=R$z(s).func;continue}var l=o+"_normConstant",u=r.range/(1<<r.quantizationBits);t[l]=R$z(u).func;var c=o+"_min";switch(n.componentsPerAttribute){case 1:t[c]=R$z(r.minValues).func;break;case 2:t[c]=k$B(r.minValues).func;break;case 3:t[c]=H$D(r.minValues).func;break;case 4:t[c]=N$E(r.minValues).func}}return t},s$G.createUniformsForQuantizedAttributes=function(e,t,i){var n=e.accessors,r={},o={},a=t.attributes;for(var s in a)if(a.hasOwnProperty(s)){var l=n[a[s]],u=l.extensions;if("_"===s.charAt(0)&&(s=s.substring(1)),t$$(u)){var c=u.WEB3D_quantized_attributes;if(t$$(c)){var h=c.decodeMatrix,d="gltf_u_dec_"+s.toLowerCase();switch(l.type){case N$G.SCALAR:o[d]=Q$D(h).func,r[d]=!0;break;case N$G.VEC2:o[d]=Y$z(h).func,r[d]=!0;break;case N$G.VEC3:o[d]=K$x(h).func,r[d]=!0;break;case N$G.VEC4:var f=d+"_scale",p=d+"_translate";o[f]=K$x(hr$1(h)).func,o[p]=N$E(Er$1(h)).func,r[f]=!0,r[p]=!0}}}}for(var _ in i)if(i.hasOwnProperty(_)&&!r[_]){var m=i[_];t$$(m.mat)&&(2===m.mat?o[_]=Q$D(u$14.IDENTITY).func:3===m.mat?o[_]=Y$z(r$W.IDENTITY).func:4===m.mat&&(o[_]=K$x(c$1a.IDENTITY).func)),t$$(m.vec)&&4===m.vec&&(o[_]=N$E([0,0,0,0]).func)}return o};var D$K=new a$11,Or$2={MODEL:function(e,t){return function(){return e.model}},VIEW:function(e,t){return function(){return e.view}},PROJECTION:function(e,t){return function(){return e.projection}},MODELVIEW:function(e,t){return function(){return e.modelView}},CESIUM_RTC_MODELVIEW:function(e,t){var i=new c$1a;return function(){return t$$(t._rtcCenter)?(c$1a.getTranslation(e.model,D$K),a$11.add(D$K,t._rtcCenter,D$K),c$1a.multiplyByPoint(e.view,D$K,D$K),c$1a.setTranslation(e.modelView,D$K,i)):e.modelView}},MODELVIEWPROJECTION:function(e,t){return function(){return e.modelViewProjection}},MODELINVERSE:function(e,t){return function(){return e.inverseModel}},VIEWINVERSE:function(e,t){return function(){return e.inverseView}},PROJECTIONINVERSE:function(e,t){return function(){return e.inverseProjection}},MODELVIEWINVERSE:function(e,t){return function(){return e.inverseModelView}},MODELVIEWPROJECTIONINVERSE:function(e,t){return function(){return e.inverseModelViewProjection}},MODELINVERSETRANSPOSE:function(e,t){return function(){return e.inverseTransposeModel}},MODELVIEWINVERSETRANSPOSE:function(e,t){return function(){return e.normal}},VIEWPORT:function(e,t){return function(){return e.viewportCartesian4}}};function le$o(e,t){if(t=e$1Y(t,{}),t$$(e)&&s$I(e,"KHR_materials_common")){s$I(e,"KHR_techniques_webgl")||(t$$(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl={programs:[],shaders:[],techniques:[]},e.extensionsUsed.push("KHR_techniques_webgl"),e.extensionsRequired.push("KHR_techniques_webgl"));var i=e.extensions.KHR_techniques_webgl;me$o(e);var n=ue$h(e),r=s$G.splitIncompatibleMaterials(e),o={},a=!1;return t$A.material(e,(function(s,l){if(t$$(s.extensions)&&t$$(s.extensions.KHR_materials_common)){var u=s.extensions.KHR_materials_common,c=r[l],h=ve$j(u,c),d=o[h];t$$(d)||(d=_e$g(e,i,c,u,n,t.addBatchIdToGeneratedShaders),o[h]=d,a=!0);var f={},p=u.values;for(var _ in p)p.hasOwnProperty(_)&&"transparent"!==_&&"doubleSided"!==_&&(f["u_"+_.toLowerCase()]=p[_]);s.extensions.KHR_techniques_webgl={technique:d,values:f},s.alphaMode="OPAQUE",u.transparent&&(s.alphaMode="BLEND"),u.doubleSided&&(s.doubleSided=!0)}})),a&&s$G.ensureSemanticExistence(e),e}}function ue$h(e){var t,i={};if(t$$(e.extensions)&&t$$(e.extensions.KHR_materials_common)&&(t=e.extensions.KHR_materials_common.lights),t$$(t)){var n=e.nodes;for(var r in n)if(n.hasOwnProperty(r)){var o=n[r];if(t$$(o.extensions)&&t$$(o.extensions.KHR_materials_common)){var a=o.extensions.KHR_materials_common.light;t$$(a)&&t$$(t[a])&&(t[a].node=r),delete o.extensions.KHR_materials_common}}var s=0;for(var l in t)if(t.hasOwnProperty(l)){var u=t[l],c=u.type;if("ambient"!==c&&!t$$(u.node)){delete t[l];continue}var h="light"+s.toString();switch(u.baseName=h,c){case"ambient":var d=u.ambient;i[h+"Color"]={type:de$x.FLOAT_VEC3,value:d.color};break;case"directional":var f=u.directional;i[h+"Color"]={type:de$x.FLOAT_VEC3,value:f.color},t$$(u.node)&&(i[h+"Transform"]={node:u.node,semantic:"MODELVIEW",type:de$x.FLOAT_MAT4});break;case"point":var p=u.point;i[h+"Color"]={type:de$x.FLOAT_VEC3,value:p.color},t$$(u.node)&&(i[h+"Transform"]={node:u.node,semantic:"MODELVIEW",type:de$x.FLOAT_MAT4}),i[h+"Attenuation"]={type:de$x.FLOAT_VEC3,value:[p.constantAttenuation,p.linearAttenuation,p.quadraticAttenuation]};break;case"spot":var _=u.spot;i[h+"Color"]={type:de$x.FLOAT_VEC3,value:_.color},t$$(u.node)&&(i[h+"Transform"]={node:u.node,semantic:"MODELVIEW",type:de$x.FLOAT_MAT4},i[h+"InverseTransform"]={node:u.node,semantic:"MODELVIEWINVERSE",type:de$x.FLOAT_MAT4,useInFragment:!0}),i[h+"Attenuation"]={type:de$x.FLOAT_VEC3,value:[_.constantAttenuation,_.linearAttenuation,_.quadraticAttenuation]},i[h+"FallOff"]={type:de$x.FLOAT_VEC2,value:[_.fallOffAngle,_.fallOffExponent]}}++s}}return i}function _e$g(e,t,i,n,r,o){t$$(n)||(n={}),o=e$1Y(o,!1);var a,s=t.techniques,l=t.shaders,u=t.programs,c=n.technique.toUpperCase();t$$(e.extensions)&&t$$(e.extensions.KHR_materials_common)&&(a=e.extensions.KHR_materials_common.lights);var h,d=n.values,f=e$1Y(n.jointCount,0),p=!1,_=!1;t$$(i)&&(p=(h=i.skinning).skinned,_=i.hasVertexColors);var m="precision highp float;\n",$="precision highp float;\n",g="CONSTANT"!==c,y={u_modelViewMatrix:{semantic:s$I(e,"CESIUM_RTC")?"CESIUM_RTC_MODELVIEW":"MODELVIEW",type:de$x.FLOAT_MAT4},u_projectionMatrix:{semantic:"PROJECTION",type:de$x.FLOAT_MAT4}};g&&(y.u_normalMatrix={semantic:"MODELVIEWINVERSETRANSPOSE",type:de$x.FLOAT_MAT3}),p&&(y.u_jointMatrix={count:f,semantic:"JOINTMATRIX",type:de$x.FLOAT_MAT4});var v,x=!1;for(var b in d)if(d.hasOwnProperty(b)&&"transparent"!==b&&"doubleSided"!==b){var S=te$q(b,d[b]);v="u_"+b.toLowerCase(),!x&&S===de$x.SAMPLER_2D&&(x=!0),y[v]={type:S}}if(t$$(y.u_diffuse)&&(y.u_diffuse.semantic="_3DTILESDIFFUSE"),t$$(r))for(var w in r)r.hasOwnProperty(w)&&(y[v="u_"+w]=r[w]);for(v in y)if(y.hasOwnProperty(v)){var C=y[v],T=t$$(C.count)?"["+C.count+"]":"";C.type!==de$x.FLOAT_MAT3&&C.type!==de$x.FLOAT_MAT4||C.useInFragment?($+="uniform "+t$H(C.type)+" "+v+T+";\n",delete C.useInFragment):m+="uniform "+t$H(C.type)+" "+v+T+";\n"}var P="";if(p){var E,A,L=r$t(h.type),M=!1;if(0===h.type.indexOf("MAT")&&(M=!0,L=Math.sqrt(L)),M)for(E=0;E<L;E++)for(A=0;A<L;A++)P+=0===E&&0===A?" mat4 skinMat = ":" skinMat += ",P+="a_weight["+E+"]["+A+"] * u_jointMatrix[int(a_joint["+E+"]["+A+"])];\n";else for(E=0;E<L;E++)P+=0===E?" mat4 skinMat = ":" skinMat += ",P+="a_weight["+E+"] * u_jointMatrix[int(a_joint["+E+"])];\n"}var I,O={a_position:{semantic:"POSITION"}};if(m+="attribute vec3 a_position;\n",m+="varying vec3 v_positionEC;\n",P+=p?" vec4 pos = u_modelViewMatrix * skinMat * vec4(a_position,1.0);\n":" vec4 pos = u_modelViewMatrix * vec4(a_position,1.0);\n",P+=" v_positionEC = pos.xyz;\n",P+=" gl_Position = u_projectionMatrix * pos;\n",$+="varying vec3 v_positionEC;\n",g&&(O.a_normal={semantic:"NORMAL"},m+="attribute vec3 a_normal;\n",m+="varying vec3 v_normal;\n",P+=p?" v_normal = u_normalMatrix * mat3(skinMat) * a_normal;\n":" v_normal = u_normalMatrix * a_normal;\n",$+="varying vec3 v_normal;\n"),x&&(O.a_texcoord_0={semantic:"TEXCOORD_0"},m+="attribute vec2 a_texcoord_0;\n",m+="varying vec2 "+(I="v_texcoord_0")+";\n",P+=" "+I+" = a_texcoord_0;\n",$+="varying vec2 "+I+";\n"),p){var D=s$G.getShaderVariable(h.type);O.a_joint={semantic:"JOINT"},O.a_weight={semantic:"WEIGHT"},m+="attribute "+D+" a_joint;\n",m+="attribute "+D+" a_weight;\n"}_&&(O.a_vertexColor={semantic:"COLOR_0"},m+="attribute vec4 a_vertexColor;\n",m+="varying vec4 v_vertexColor;\n",P+=" v_vertexColor = a_vertexColor;\n",$+="varying vec4 v_vertexColor;\n"),o&&(O.a_batchId={semantic:"_BATCHID"},m+="attribute float a_batchId;\n");var R=g&&("BLINN"===c||"PHONG"===c)&&t$$(y.u_specular)&&t$$(y.u_shininess)&&y.u_shininess>0,N=!1,F=!1,B="";for(var z in a)if(a.hasOwnProperty(z)){var G=a[z],k=G.type.toLowerCase(),U=G.baseName;B+=" {\n";var V,W,H="u_"+U+"Color";"ambient"===k?(F=!0,B+=" ambientLight += "+H+";\n"):g&&(N=!0,V="v_"+U+"Direction",W="v_"+U+"Position","point"!==k&&(m+="varying vec3 "+V+";\n",$+="varying vec3 "+V+";\n",P+=" "+V+" = mat3(u_"+U+"Transform) * vec3(0.,0.,1.);\n","directional"===k&&(B+=" vec3 l = normalize("+V+");\n")),"directional"!==k?(m+="varying vec3 "+W+";\n",$+="varying vec3 "+W+";\n",P+=" "+W+" = u_"+U+"Transform[3].xyz;\n",B+=" vec3 VP = "+W+" - v_positionEC;\n",B+=" vec3 l = normalize(VP);\n",B+=" float range = length(VP);\n",B+=" float attenuation = 1.0 / (u_"+U+"Attenuation.x + ",B+="(u_"+U+"Attenuation.y * range) + ",B+="(u_"+U+"Attenuation.z * range * range));\n"):B+=" float attenuation = 1.0;\n","spot"===k&&(B+=" float spotDot = dot(l, normalize("+V+"));\n",B+=" if (spotDot < cos(u_"+U+"FallOff.x * 0.5))\n",B+=" {\n",B+=" attenuation = 0.0;\n",B+=" }\n",B+=" else\n",B+=" {\n",B+=" attenuation *= max(0.0, pow(spotDot, u_"+U+"FallOff.y));\n",B+=" }\n"),B+=" diffuseLight += "+H+"* max(dot(normal,l), 0.) * attenuation;\n",R&&("BLINN"===c?(B+=" vec3 h = normalize(l + viewDir);\n",B+=" float specularIntensity = max(0., pow(max(dot(normal, h), 0.), u_shininess)) * attenuation;\n"):(B+=" vec3 reflectDir = reflect(-l, normal);\n",B+=" float specularIntensity = max(0., pow(max(dot(reflectDir, viewDir), 0.), u_shininess)) * attenuation;\n"),B+=" specularLight += "+H+" * specularIntensity;\n")),B+=" }\n"}if(F||(B+=" ambientLight += vec3(0.2, 0.2, 0.2);\n"),!N&&"CONSTANT"!==c){B+=" vec3 l = normalize(czm_sunDirectionEC);\n";B+=" diffuseLight += vec3(1.0, 1.0, 1.0) * max(dot(normal,l), 0.2);\n",R&&("BLINN"===c?(B+=" vec3 h = normalize(l + viewDir);\n",B+=" float specularIntensity = max(0., pow(max(dot(normal, h), 0.), u_shininess));\n"):(B+=" vec3 reflectDir = reflect(-l, normal);\n",B+=" float specularIntensity = max(0., pow(max(dot(reflectDir, viewDir), 0.), u_shininess));\n"),B+=" specularLight += vec3(1.0, 1.0, 1.0) * specularIntensity;\n")}m+="void main(void) {\n",m+=P,m+="}\n",$+="void main(void) {\n";var Y,j=" vec3 color = vec3(0.0, 0.0, 0.0);\n";g&&($+=" vec3 normal = normalize(v_normal);\n",n.doubleSided&&($+=" if (gl_FrontFacing == false)\n",$+=" {\n",$+=" normal = -normal;\n",$+=" }\n")),"CONSTANT"!==c?(t$$(y.u_diffuse)&&(y.u_diffuse.type===de$x.SAMPLER_2D?$+=" vec4 diffuse = texture2D(u_diffuse, "+I+");\n":$+=" vec4 diffuse = u_diffuse;\n",$+=" vec3 diffuseLight = vec3(0.0, 0.0, 0.0);\n",j+=" color += diffuse.rgb * diffuseLight;\n"),R&&(y.u_specular.type===de$x.SAMPLER_2D?$+=" vec3 specular = texture2D(u_specular, "+I+").rgb;\n":$+=" vec3 specular = u_specular.rgb;\n",$+=" vec3 specularLight = vec3(0.0, 0.0, 0.0);\n",j+=" color += specular * specularLight;\n"),Y=t$$(y.u_transparency)?" gl_FragColor = vec4(color * diffuse.a * u_transparency, diffuse.a * u_transparency);\n":" gl_FragColor = vec4(color * diffuse.a, diffuse.a);\n"):Y=t$$(y.u_transparency)?" gl_FragColor = vec4(color * u_transparency, u_transparency);\n":" gl_FragColor = vec4(color, 1.0);\n",_&&(j+=" color *= v_vertexColor.rgb;\n"),t$$(y.u_emission)&&(y.u_emission.type===de$x.SAMPLER_2D?$+=" vec3 emission = texture2D(u_emission, "+I+").rgb;\n":$+=" vec3 emission = u_emission.rgb;\n",j+=" color += emission;\n"),(t$$(y.u_ambient)||"CONSTANT"!==c)&&(t$$(y.u_ambient)?y.u_ambient.type===de$x.SAMPLER_2D?$+=" vec3 ambient = texture2D(u_ambient, "+I+").rgb;\n":$+=" vec3 ambient = u_ambient.rgb;\n":$+=" vec3 ambient = diffuse.rgb;\n",j+=" color += ambient * ambientLight;\n"),$+=" vec3 viewDir = -normalize(v_positionEC);\n",$+=" vec3 ambientLight = vec3(0.0, 0.0, 0.0);\n",$+=B,$+=j,$+=Y,$+="}\n";var q=e$Y(l,{type:de$x.VERTEX_SHADER,extras:{_pipeline:{source:m,extension:".glsl"}}}),X=e$Y(l,{type:de$x.FRAGMENT_SHADER,extras:{_pipeline:{source:$,extension:".glsl"}}}),K=e$Y(u,{fragmentShader:X,vertexShader:q});return e$Y(s,{attributes:O,program:K,uniforms:y})}function te$q(e,t){var i;switch(i=t$$(t.value)?t.value:t$$(t.index)?[t.index]:t,e){case"ambient":case"diffuse":case"emission":case"specular":return 1===i.length?de$x.SAMPLER_2D:de$x.FLOAT_VEC4;case"shininess":case"transparency":return de$x.FLOAT;case"transparent":case"doubleSided":return de$x.BOOL}}function ve$j(e,t){var i="";i+="technique:"+e.technique+";";for(var n=e.values,r=Object.keys(n).sort(),o=r.length,a=0;a<o;++a){var s=r[a];n.hasOwnProperty(s)&&(i+=s+":"+te$q(s,n[s]),i+=";")}var l=e$1Y(e.jointCount,0);if(i+=l.toString()+";",t$$(t)){var u=t.skinning;l>0&&(i+=u.type+";"),i+=t.hasVertexColors}return i}function me$o(e){var t=e.extensions.KHR_materials_common;if(t$$(t)&&t$$(t.lights))for(var i=t.lights,n=i.length,r=0;r<n;r++){var o=i[r];if("ambient"===o.type){t$$(o.ambient)||(o.ambient={});var a=o.ambient;t$$(a.color)||(a.color=[1,1,1])}else if("directional"===o.type){t$$(o.directional)||(o.directional={});var s=o.directional;t$$(s.color)||(s.color=[1,1,1])}else if("point"===o.type){t$$(o.point)||(o.point={});var l=o.point;t$$(l.color)||(l.color=[1,1,1]),l.constantAttenuation=e$1Y(l.constantAttenuation,1),l.linearAttenuation=e$1Y(l.linearAttenuation,0),l.quadraticAttenuation=e$1Y(l.quadraticAttenuation,0)}else if("spot"===o.type){t$$(o.spot)||(o.spot={});var u=o.spot;t$$(u.color)||(u.color=[1,1,1]),u.constantAttenuation=e$1Y(u.constantAttenuation,1),u.fallOffAngle=e$1Y(u.fallOffAngle,3.14159265),u.fallOffExponent=e$1Y(u.fallOffExponent,0),u.linearAttenuation=e$1Y(u.linearAttenuation,0),u.quadraticAttenuation=e$1Y(u.quadraticAttenuation,0)}}}function _e$f(e,t){if(t=e$1Y(t,{}),s$I(e,"KHR_techniques_webgl")||!t$$(e.materials)||0===e.materials.length)return e;t$$(e.extensions)||(e.extensions={}),t$$(e.extensionsUsed)||(e.extensionsUsed=[]),t$$(e.extensionsRequired)||(e.extensionsRequired=[]),e.extensions.KHR_techniques_webgl={programs:[],shaders:[],techniques:[]},e.extensionsUsed.push("KHR_techniques_webgl"),e.extensionsRequired.push("KHR_techniques_webgl");var i=s$G.splitIncompatibleMaterials(e);return t$A.material(e,(function(n,r){var o={},a=xe$q(e,n,r,o,i,t);t$$(n.extensions)||(n.extensions={}),n.extensions.KHR_techniques_webgl={values:o,technique:a}})),s$G.ensureSemanticExistence(e),e}function de$k(e){return t$$(e.extensions)&&t$$(e.extensions.KHR_materials_pbrSpecularGlossiness)}function pe$j(e){return t$$(e.textureMotion)}function ne$o(e,t,i){var n=0,r=0,o=0,a=0,s=0,l=0,u=0,c=0,h=0;e.hasOwnProperty("start")&&(n+=e.start[0],o+=e.start[1]),e.hasOwnProperty("range")&&(n+=e.range[0],r=e.range[1],o+=e.range[2],a=e.range[3],c=e.range[0],h=e.range[2]),e.hasOwnProperty("speed")&&0!=e.speed&&(s=(r-c)/(u=1/e.speed),l=(a-h)/u),t[i]=s,t[i+1]=n,t[i+2]=l,t[i+3]=o,t[i+4]=u}function se$l(e,t,i,n){i[n]=[0,0,0,0,1,0,1,0,1,1],t$$(e)&&ne$o(e,i[n],0),t$$(t)&&ne$o(t,i[n],5)}function he$h(e,t){var i=e.textureMotion;(i.hasOwnProperty("baseColorTextureScroll")||i.hasOwnProperty("baseColorTextureScale"))&&se$l(i.baseColorTextureScroll,i.baseColorTextureScale,t,"u_baseColorUVOffsetAndTiling"),(i.hasOwnProperty("emissiveTextureScroll")||i.hasOwnProperty("emissiveTextureScale"))&&se$l(i.emissiveTextureScroll,i.emissiveTextureScale,t,"u_emissiveUVOffsetAndTiling")}function xe$q(e,t,i,n,r,o){var a,s,l=e$1Y(o.addBatchIdToGeneratedShaders,!1),u=e.extensions.KHR_techniques_webgl,c=u.techniques,h=u.shaders,d=u.programs,f=de$k(t),p=pe$j(t),_=t.pbrMetallicRoughness;if(t$$(_)&&!f)for(s in _)_.hasOwnProperty(s)&&(n[a="u_"+s]=_[s]);if(f){var m=t.extensions.KHR_materials_pbrSpecularGlossiness;for(s in m)m.hasOwnProperty(s)&&(n[a="u_"+s]=m[s])}for(var $ in p&&he$h(t,n),t)t.hasOwnProperty($)&&($.indexOf("Texture")>=0||$.indexOf("Factor")>=0)&&(n[a="u_"+$]=t[$]);var g,y="precision highp float;\n",v="precision highp float;\n";t$$(e.skins)&&(g=e.skins[0]);var x,b,S=t$$(g)?g.joints:[],w=S.length,C=r[i],T=!1,P=!1,E=!1,A=!1,L=!1,M=!1,I=!1;t$$(C)&&(T=(x=C.skinning).skinned&&S.length>0,P=C.hasVertexColors,E=C.hasMorphTargets,A=C.hasNormals,L=C.hasTangents,M=C.hasTexCoords),E&&t$A.mesh(e,(function(e){t$A.meshPrimitive(e,(function(e){if(e.material===i){var t=e.targets;t$$(t)&&(b=t)}}))}));var O={u_modelViewMatrix:{semantic:s$I(e,"CESIUM_RTC")?"CESIUM_RTC_MODELVIEW":"MODELVIEW",type:de$x.FLOAT_MAT4},u_projectionMatrix:{semantic:"PROJECTION",type:de$x.FLOAT_MAT4}};t$$(t.extensions)&&t$$(t.extensions.KHR_materials_unlit)&&(I=!0,A=!1,L=!1),A&&(O.u_normalMatrix={semantic:"MODELVIEWINVERSETRANSPOSE",type:de$x.FLOAT_MAT3}),T&&(O.u_jointMatrix={count:w,semantic:"JOINTMATRIX",type:de$x.FLOAT_MAT4}),E&&(O.u_morphWeights={count:b.length,semantic:"MORPHWEIGHTS",type:de$x.FLOAT});var D=t.alphaMode;for(a in t$$(D)&&"MASK"===D&&(O.u_alphaCutoff={semantic:"ALPHACUTOFF",type:de$x.FLOAT}),n)n.hasOwnProperty(a)&&(O[a]={type:Te$k(a),extensionType:Ce$k(a)});var R=e$1Y(O.u_baseColorTexture,O.u_baseColorFactor);for(a in t$$(R)&&(R.semantic="_3DTILESDIFFUSE"),O)if(O.hasOwnProperty(a)){var N=O[a],F=t$$(N.count)?"["+N.count+"]":"";N.type!==de$x.FLOAT_MAT3&&N.type!==de$x.FLOAT_MAT4&&"u_morphWeights"!==a||N.useInFragment?(v+="uniform "+t$H(N.type)+" "+a+F+";\n",delete N.useInFragment):y+="uniform "+t$H(N.type)+" "+a+F+";\n"}var B="";if(T){var z,G,k=r$t(x.type),U=!1;if(0===x.type.indexOf("MAT")&&(U=!0,k=Math.sqrt(k)),U)for(z=0;z<k;z++)for(G=0;G<k;G++)B+=0===z&&0===G?" mat4 skinMatrix = ":" skinMatrix += ",B+="a_weight["+z+"]["+G+"] * u_jointMatrix[int(a_joint["+z+"]["+G+"])];\n";else for(z=0;z<k;z++)B+=0===z?" mat4 skinMatrix = ":" skinMatrix += ",B+="a_weight["+z+"] * u_jointMatrix[int(a_joint["+z+"])];\n"}var V,W={a_position:{semantic:"POSITION"}};if(y+="attribute vec3 a_position;\n",A&&(y+="varying vec3 v_positionEC;\n",y+="varying vec3 v_positionWC;\n"),B+=" vec3 weightedPosition = a_position;\n",A&&(B+=" vec3 weightedNormal = a_normal;\n"),L&&(B+=" vec4 weightedTangent = a_tangent;\n"),E)for(var H=0;H<b.length;H++){var Y=b[H];for(var j in Y)if(Y.hasOwnProperty(j)&&"extras"!==j){var q="a_"+j+"_"+H;W[q]={semantic:j+"_"+H},y+="attribute vec3 "+q+";\n","POSITION"===j?B+=" weightedPosition += u_morphWeights["+H+"] * "+q+";\n":"NORMAL"===j?B+=" weightedNormal += u_morphWeights["+H+"] * "+q+";\n":L&&"TANGENT"===j&&(B+=" weightedTangent.xyz += u_morphWeights["+H+"] * "+q+";\n")}}if(B+=T?" vec4 position = skinMatrix * vec4(weightedPosition, 1.0);\n":" vec4 position = vec4(weightedPosition, 1.0);\n",A&&(B+=" v_positionWC = (czm_model * position).xyz;\n"),B+=" position = u_modelViewMatrix * position;\n",A&&(B+=" v_positionEC = position.xyz;\n"),B+=" gl_Position = u_projectionMatrix * position;\n",A&&(W.a_normal={semantic:"NORMAL"},y+="attribute vec3 a_normal;\n",y+="varying vec3 v_normal;\n",B+=T?" v_normal = u_normalMatrix * mat3(skinMatrix) * weightedNormal;\n":" v_normal = u_normalMatrix * weightedNormal;\n",v+="varying vec3 v_normal;\n",v+="varying vec3 v_positionEC;\n",v+="varying vec3 v_positionWC;\n"),L&&(W.a_tangent={semantic:"TANGENT"},y+="attribute vec4 a_tangent;\n",y+="varying vec4 v_tangent;\n",B+=" v_tangent.xyz = u_normalMatrix * weightedTangent.xyz;\n",B+=" v_tangent.w = weightedTangent.w;\n",v+="varying vec4 v_tangent;\n"),M&&(W.a_texcoord_0={semantic:"TEXCOORD_0"},y+="attribute vec2 a_texcoord_0;\n",y+="varying vec2 "+(V="v_texcoord_0")+";\n",B+=" "+V+" = a_texcoord_0;\n",v+="varying vec2 "+V+";\n"),T){var X=s$G.getShaderVariable(x.type);W.a_joint={semantic:"JOINTS_0"},W.a_weight={semantic:"WEIGHTS_0"},y+="attribute "+X+" a_joint;\n",y+="attribute "+X+" a_weight;\n"}P&&(W.a_vertexColor={semantic:"COLOR_0"},y+="attribute vec4 a_vertexColor;\n",y+="varying vec4 v_vertexColor;\n",B+=" v_vertexColor = a_vertexColor;\n",v+="varying vec4 v_vertexColor;\n"),l&&(W.a_batchId={semantic:"_BATCHID"},y+="attribute float a_batchId;\n"),y+="void main(void) \n{\n",y+=B,y+="}\n",A&&(v+="const float M_PI = 3.141592653589793;\n",v+="vec3 lambertianDiffuse(vec3 diffuseColor) \n{\n return diffuseColor / M_PI;\n}\n\n",v+="vec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH) \n{\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\n\n",v+="vec3 fresnelSchlick(float metalness, float VdotH) \n{\n return metalness + (vec3(1.0) - metalness) * pow(1.0 - VdotH, 5.0);\n}\n\n",v+="vec3 F_Schlick(float ndv, vec3 spec) \n{\n return spec + (vec3(1.0) - spec) * pow(1.0 - ndv, 5.0);\n}\n\n",v+="float D_Phong(float g, float ndh) \n{\n float a = pow(8192.0, g);\n return (a + 2.0) / 8.0 * pow(ndh, a);\n}\n\n",v+="float smithVisibilityG1(float NdotV, float roughness) \n{\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n}\n\n",v+="float smithVisibilityGGX(float roughness, float NdotL, float NdotV) \n{\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n}\n\n",v+="float GGX(float roughness, float NdotH) \n{\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n}\n\n",v+="void getLightColor(vec3 lightDir, vec3 viewDir, vec3 normal, vec3 lightColor, vec3 fresnelTerm, float roughness, out vec3 diffuseTerm, out vec3 specularTerm) \n{\n vec3 h = normalize(viewDir + lightDir);\n float NdotL = clamp(dot(normal, lightDir), 0.001, 1.0);\n float NdotH = clamp(dot(normal, h), 0.0, 1.0);\n vec3 li = lightColor * NdotL;\n diffuseTerm = li;\n specularTerm = li * fresnelTerm * D_Phong(1.0 - roughness, NdotH);\n}\n\n"),v+="vec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\n\n",v+="vec4 SRGBtoLINEAR4(vec4 srgbIn) \n{\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n\n",v+="vec3 applyTonemapping(vec3 linearIn) \n{\n#ifndef HDR \n return czm_acesTonemapping(linearIn);\n#else \n return linearIn;\n#endif \n}\n\n",v+="vec3 LINEARtoSRGB(vec3 linearIn) \n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else \n return linearIn;\n#endif \n}\n\n",v+="float calcLightAttenuation(float lightDistance, float cutoffDistance, float decayExponent) \n{\n return pow(clamp(1.0 - lightDistance / cutoffDistance, 0.0, 1.0), decayExponent);\n}\n\n",v+="#ifdef USE_IBL_LIGHTING \n",v+="uniform vec2 gltf_iblFactor; \n",v+="#endif \n",v+="#ifdef USE_CUSTOM_LIGHT_COLOR \n",v+="uniform vec3 gltf_lightColor; \n",v+="#endif \n",v+="void main(void) \n{\n",A&&(v+=" vec3 ng = normalize(v_normal);\n",t$$(n.u_normalTexture)?L?(v+=" vec3 t = normalize(v_tangent.xyz);\n",v+=" vec3 b = normalize(cross(ng, t) * v_tangent.w);\n",v+=" mat3 tbn = mat3(t, b, ng);\n",v+=" vec3 n = texture2D(u_normalTexture, "+V+").rgb;\n",v+=" n = normalize(tbn * (2.0 * n - 1.0));\n"):(v="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n"+v,v+="#ifdef GL_OES_standard_derivatives\n",v+=" vec3 pos_dx = dFdx(v_positionEC);\n",v+=" vec3 pos_dy = dFdy(v_positionEC);\n",v+=" vec3 tex_dx = dFdx(vec3("+V+",0.0));\n",v+=" vec3 tex_dy = dFdy(vec3("+V+",0.0));\n",v+=" vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n",v+=" t = normalize(t - ng * dot(ng, t));\n",v+=" vec3 b = normalize(cross(ng, t));\n",v+=" mat3 tbn = mat3(t, b, ng);\n",v+=" vec3 n = texture2D(u_normalTexture, "+V+").rgb;\n",v+=" n = normalize(tbn * (2.0 * n - 1.0));\n",v+="#else\n",v+=" vec3 n = ng;\n",v+="#endif\n"):v+=" vec3 n = ng;\n",t.doubleSided&&(v+=" if (!gl_FrontFacing)\n",v+=" {\n",v+=" n = -n;\n",v+=" }\n")),t$$(n.u_baseColorTexture)?(v+=" vec2 uvOffset = vec2(0.0);\n",v+=" vec2 uvTiling = vec2(1.0);\n",t$$(n.u_baseColorUVOffsetAndTiling)&&(v+=" uvOffset = u_baseColorUVOffsetAndTiling.xy;\n",v+=" uvTiling = u_baseColorUVOffsetAndTiling.zw;\n"),v+=" vec4 baseColorWithAlpha = SRGBtoLINEAR4(texture2D(u_baseColorTexture, "+V+" * uvTiling.xy + uvOffset.xy));\n",t$$(n.u_baseColorFactor)&&(v+=" baseColorWithAlpha *= u_baseColorFactor;\n")):t$$(n.u_baseColorFactor)?v+=" vec4 baseColorWithAlpha = u_baseColorFactor;\n":v+=" vec4 baseColorWithAlpha = vec4(1.0);\n",P&&(v+=" baseColorWithAlpha *= v_vertexColor;\n"),v+=" vec3 baseColor = baseColorWithAlpha.rgb;\n",A?(f?(t$$(n.u_specularGlossinessTexture)?(v+=" vec4 specularGlossiness = SRGBtoLINEAR4(texture2D(u_specularGlossinessTexture, "+V+"));\n",v+=" vec3 specular = specularGlossiness.rgb;\n",v+=" float glossiness = specularGlossiness.a;\n",t$$(n.u_specularFactor)&&(v+=" specular *= u_specularFactor;\n"),t$$(n.u_glossinessFactor)&&(v+=" glossiness *= u_glossinessFactor;\n")):(t$$(n.u_specularFactor)?v+=" vec3 specular = clamp(u_specularFactor, vec3(0.0), vec3(1.0));\n":v+=" vec3 specular = vec3(1.0);\n",t$$(n.u_glossinessFactor)?v+=" float glossiness = clamp(u_glossinessFactor, 0.0, 1.0);\n":v+=" float glossiness = 1.0;\n"),t$$(n.u_diffuseTexture)?(t$$(n.u_diffuseTextureUVSpeedFactor)?v+=" vec4 diffuse = SRGBtoLINEAR4(texture2D(u_diffuseTexture, "+V+" + u_diffuseTextureUVSpeedFactor.xy));\n":v+=" vec4 diffuse = SRGBtoLINEAR4(texture2D(u_diffuseTexture, "+V+"));\n",t$$(n.u_diffuseFactor)&&(v+=" diffuse *= u_diffuseFactor;\n")):t$$(n.u_diffuseFactor)?v+=" vec4 diffuse = clamp(u_diffuseFactor, vec4(0.0), vec4(1.0));\n":v+=" vec4 diffuse = vec4(1.0);\n"):t$$(n.u_metallicRoughnessTexture)?(v+=" vec3 metallicRoughness = texture2D(u_metallicRoughnessTexture, "+V+").rgb;\n",v+=" float metalness = clamp(metallicRoughness.b, 0.0, 1.0);\n",v+=" float roughness = clamp(metallicRoughness.g, 0.04, 1.0);\n",t$$(n.u_metallicFactor)&&(v+=" metalness *= u_metallicFactor;\n"),t$$(n.u_roughnessFactor)&&(v+=" roughness *= u_roughnessFactor;\n")):(t$$(n.u_metallicFactor)?v+=" float metalness = clamp(u_metallicFactor, 0.0, 1.0);\n":v+=" float metalness = 1.0;\n",t$$(n.u_roughnessFactor)?v+=" float roughness = clamp(u_roughnessFactor, 0.04, 1.0);\n":v+=" float roughness = 1.0;\n"),v+=" vec3 v = -normalize(v_positionEC);\n",f?(v+=" float roughness = 1.0 - glossiness;\n",v+=" vec3 diffuseColor = diffuse.rgb * (1.0 - max(max(specular.r, specular.g), specular.b));\n",v+=" vec3 specularColor = specular;\n"):(v+=" vec3 f0 = vec3(0.04);\n",v+=" vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n",v+=" vec3 specularColor = mix(f0, baseColor, metalness);\n"),v+=" float NdotV = abs(dot(n, v)) + 0.001;\n",v+=" vec3 diffuseTerm = vec3(0.0);\n",v+=" vec3 specularTerm = vec3(0.0);\n",v+=" vec3 fresnelTerm = F_Schlick(NdotV, specularColor);\n",v+=" vec3 color = vec3(0.0);\n",v+="#if DIR_LIGHTS > 0 \n",v+=" for (int i = 0; i < DIR_LIGHTS; i++) { \n",v+=" vec3 lightDiffuseTerm = vec3(0.0);\n",v+=" vec3 lightSpecularTerm = vec3(0.0);\n",v+=" getLightColor(uDirectionalLightDirectionEC[i], v, n, uDirectionalLightColor[i], fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n",v+=" diffuseTerm +=lightDiffuseTerm;\n",v+=" specularTerm += lightSpecularTerm;\n",v+=" } \n",v+="#endif \n",v+="#if POINT_LIGHTS > 0 \n",v+=" for (int i = 0; i < POINT_LIGHTS; i++) { \n",v+=" vec3 lVector = uPointLightPositionEC[i] - v_positionEC;\n",v+=" float lightDistance = length(lVector);\n",v+=" float lightAttenuation = calcLightAttenuation(lightDistance, uPointLightDistanceAndDecay[i].x, uPointLightDistanceAndDecay[i].y);\n",v+=" if(lightAttenuation < 0.001) {\n",v+=" continue;}\n",v+=" vec3 pointLightColor = uPointLightColor[i] * lightAttenuation;\n",v+=" vec3 lightDiffuseTerm = vec3(0.0);\n",v+=" vec3 lightSpecularTerm = vec3(0.0);\n",v+=" getLightColor(normalize(lVector), v, n, pointLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n",v+=" diffuseTerm +=lightDiffuseTerm;\n",v+=" specularTerm += lightSpecularTerm;\n",v+=" }\n",v+="#endif \n",v+="#if SPOT_LIGHTS > 0 \n",v+=" for (int i = 0; i < SPOT_LIGHTS; i++) { \n",v+=" vec3 lVector = uSpotLightPositionEC[i] - v_positionEC;\n",v+=" float lightDistance = length(lVector);\n",v+=" float lightAttenuation = calcLightAttenuation(lightDistance, uSpotLightDistanceDecayCosPenumbra[i].x, uSpotLightDistanceDecayCosPenumbra[i].y);\n",v+=" if(lightAttenuation < 0.001) {\n",v+=" continue;}\n",v+=" float spotEffect = dot(uSpotLightDirectionEC[i], normalize(lVector));\n",v+=" if(spotEffect > uSpotLightDistanceDecayCosPenumbra[i].z) {\n",v+=" vec3 spotLightColor = uSpotLightColor[i] * lightAttenuation * spotEffect;\n",v+=" vec3 lightDiffuseTerm = vec3(0.0);\n",v+=" vec3 lightSpecularTerm = vec3(0.0);\n",v+=" getLightColor(normalize(lVector), v, n, spotLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n",v+=" diffuseTerm +=lightDiffuseTerm;\n",v+=" specularTerm += lightSpecularTerm;\n",v+=" }\n",v+=" }\n",v+="#endif \n",v+=" color = baseColor; \n",v+=" color *= max(diffuseTerm, vec3(0.0)); \n",v+=" color += max(specularTerm, vec3(0.0)); \n",v+="#ifndef USE_CUSTOM_LIGHT_COLOR \n",v+=" vec3 lightColorHdr = czm_lightColorHdr;\n",v+="#else \n",v+=" vec3 lightColorHdr = gltf_lightColor;\n",v+="#endif \n",v+=" vec3 l = normalize(czm_lightDirectionEC);\n",v+=" vec3 h = normalize(v + l);\n",v+=" float NdotL = clamp(dot(n, l), 0.001, 1.0);\n",v+=" float NdotH = clamp(dot(n, h), 0.0, 1.0);\n",v+=" float LdotH = clamp(dot(l, h), 0.0, 1.0);\n",v+=" float VdotH = clamp(dot(v, h), 0.0, 1.0);\n",v+=" float alpha = roughness * roughness;\n",v+=" float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n",v+=" vec3 r90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\n",v+=" vec3 r0 = specularColor.rgb;\n",v+=" vec3 F = fresnelSchlick2(r0, r90, VdotH);\n",v+=" float G = smithVisibilityGGX(alpha, NdotL, NdotV);\n",v+=" float D = GGX(alpha, NdotH);\n",v+=" vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n",v+=" vec3 specularContribution = F * G * D / (4.0 * NdotL * NdotV);\n",v+=" color += NdotL * lightColorHdr * (diffuseContribution + specularContribution);\n",v+="#if defined(USE_IBL_LIGHTING) && !defined(DIFFUSE_IBL) && !defined(SPECULAR_IBL) \n",v+=" vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n",v+=" czm_ellipsoid ellipsoid = czm_getWgs84EllipsoidEC();\n",v+=" float vertexRadius = length(v_positionWC);\n",v+=" float horizonDotNadir = 1.0 - min(1.0, ellipsoid.radii.x / vertexRadius);\n",v+=" float reflectionDotNadir = dot(r, normalize(v_positionWC));\n",v+=" r.x = -r.x;\n",v+=" r = -normalize(czm_temeToPseudoFixed * r);\n",v+=" r.x = -r.x;\n",v+=" float inverseRoughness = 1.04 - roughness;\n",v+=" inverseRoughness *= inverseRoughness;\n",v+=" vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n",v+=" float atmosphereHeight = 0.05;\n",v+=" float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n",v+=" float blendRegionOffset = roughness * -1.0;\n",v+=" float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n",v+=" float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n",v+=" float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n",v+=" float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n",v+=" vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n",v+=" vec3 nadirColor = belowHorizonColor * 0.5;\n",v+=" vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n",v+=" vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n",v+=" vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n",v+=" vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n",v+=" float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n",v+=" float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n",v+=" vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n",v+=" float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n",v+=" vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n",v+=" specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n",v+=" specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n",v+="#ifdef USE_SUN_LUMINANCE \n",v+=" float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * czm_sunDirectionEC), normalize(v_positionWC * -1.0)), 0.001, 1.0);\n",v+=" float S = acos(LdotZenith);\n",v+=" float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(v_positionWC * -1.0)), 0.001, 1.0);\n",v+=" float sunNdotL = clamp(dot(n, czm_sunDirectionEC), 0.001, 1.0);\n",v+=" float gamma = acos(sunNdotL);\n",v+=" float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(sunNdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n",v+=" float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n",v+=" float luminance = gltf_luminanceAtZenith * (numerator / denominator);\n",v+="#endif \n",v+=" vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n",v+=" vec3 IBLColor = (diffuseIrradiance * diffuseColor * gltf_iblFactor.x) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * gltf_iblFactor.y);\n",v+="#ifdef USE_SUN_LUMINANCE \n",v+=" color += IBLColor * luminance;\n",v+="#else \n",v+=" color += IBLColor; \n",v+="#endif \n",v+="#elif defined(DIFFUSE_IBL) || defined(SPECULAR_IBL) \n",v+=" mat3 fixedToENU = mat3(gltf_clippingPlanesMatrix[0][0], gltf_clippingPlanesMatrix[1][0], gltf_clippingPlanesMatrix[2][0], \n",v+=" gltf_clippingPlanesMatrix[0][1], gltf_clippingPlanesMatrix[1][1], gltf_clippingPlanesMatrix[2][1], \n",v+=" gltf_clippingPlanesMatrix[0][2], gltf_clippingPlanesMatrix[1][2], gltf_clippingPlanesMatrix[2][2]); \n",v+=" const mat3 yUpToZUp = mat3(-1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0); \n",v+=" vec3 cubeDir = normalize(yUpToZUp * fixedToENU * normalize(reflect(-v, n))); \n",v+="#ifdef DIFFUSE_IBL \n",v+="#ifdef CUSTOM_SPHERICAL_HARMONICS \n",v+=" vec3 diffuseIrradiance = czm_sphericalHarmonics(cubeDir, gltf_sphericalHarmonicCoefficients); \n",v+="#else \n",v+=" vec3 diffuseIrradiance = czm_sphericalHarmonics(cubeDir, czm_sphericalHarmonicCoefficients); \n",v+="#endif \n",v+="#else \n",v+=" vec3 diffuseIrradiance = vec3(0.0); \n",v+="#endif \n",v+="#ifdef SPECULAR_IBL \n",v+=" vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n",v+="#ifdef CUSTOM_SPECULAR_IBL \n",v+=" vec3 specularIBL = czm_sampleOctahedralProjection(gltf_specularMap, gltf_specularMapSize, cubeDir, roughness * gltf_maxSpecularLOD, gltf_maxSpecularLOD);\n",v+="#else \n",v+=" vec3 specularIBL = czm_sampleOctahedralProjection(czm_specularEnvironmentMaps, czm_specularEnvironmentMapSize, cubeDir, roughness * czm_specularEnvironmentMapsMaximumLOD, czm_specularEnvironmentMapsMaximumLOD);\n",v+="#endif \n",v+=" specularIBL *= F * brdfLut.x + brdfLut.y;\n",v+="#else \n",v+=" vec3 specularIBL = vec3(0.0); \n",v+="#endif \n",v+=" color += diffuseIrradiance * diffuseColor + specularColor * specularIBL;\n",v+="#endif \n"):v+=" vec3 color = baseColor;\n",I||(t$$(n.u_occlusionTexture)&&(v+=" color *= texture2D(u_occlusionTexture, "+V+").r;\n"),t$$(n.u_emissiveTexture)?(v+=" vec2 uvEmissiveOffset = vec2(0.0);\n",v+=" vec2 uvEmissiveTiling = vec2(1.0);\n",t$$(n.u_emissiveUVOffsetAndTiling)&&(v+=" uvEmissiveOffset = u_emissiveUVOffsetAndTiling.xy;\n",v+=" uvEmissiveTiling = u_emissiveUVOffsetAndTiling.zw;\n"),v+=" vec3 emissive = SRGBtoLINEAR3(texture2D(u_emissiveTexture, "+V+"* uvEmissiveTiling.xy + uvEmissiveOffset.xy).rgb);\n",t$$(n.u_emissiveFactor)&&(v+=" emissive *= u_emissiveFactor;\n"),v+=" color += emissive;\n"):t$$(n.u_emissiveFactor)&&(v+=" color += u_emissiveFactor;\n")),I||(v+=" color = applyTonemapping(color);\n"),v+=" color = LINEARtoSRGB(color);\n",t$$(D)?"MASK"===D?(v+=" if (baseColorWithAlpha.a < u_alphaCutoff) {\n",v+=" discard;\n",v+=" }\n",v+=" gl_FragColor = vec4(color, 1.0);\n"):v+="BLEND"===D?" gl_FragColor = vec4(color, baseColorWithAlpha.a);\n":" gl_FragColor = vec4(color, 1.0);\n":v+=" gl_FragColor = vec4(color, 1.0);\n",v+="}\n";var K=e$Y(h,{type:de$x.VERTEX_SHADER,extras:{_pipeline:{source:y,extension:".glsl"}}}),Z=e$Y(h,{type:de$x.FRAGMENT_SHADER,extras:{_pipeline:{source:v,extension:".glsl"}}}),J=e$Y(d,{fragmentShader:Z,vertexShader:K});return e$Y(c,{attributes:W,program:J,uniforms:O})}function Te$k(e){switch(e){case"u_baseColorFactor":case"u_baseColorUVOffsetAndTiling":case"u_emissiveUVOffsetAndTiling":case"u_diffuseFactor":return de$x.FLOAT_VEC4;case"u_metallicFactor":case"u_roughnessFactor":case"u_glossinessFactor":return de$x.FLOAT;case"u_baseColorTexture":case"u_metallicRoughnessTexture":case"u_normalTexture":case"u_occlusionTexture":case"u_emissiveTexture":case"u_diffuseTexture":case"u_specularGlossinessTexture":return de$x.SAMPLER_2D;case"u_emissiveFactor":case"u_specularFactor":return de$x.FLOAT_VEC3}return-1!==e.indexOf("Offset")?de$x.FLOAT_VEC2:-1!==e.indexOf("Rotation")?de$x.FLOAT:-1!==e.indexOf("Scale")?de$x.FLOAT_VEC2:-1!==e.indexOf("Texture")?de$x.SAMPLER_2D:void 0}function Ce$k(e){switch(e){case"u_baseColorUVOffsetAndTiling":return ie$z.BASECOLOR_UV_OFFSET_AND_TILING;case"u_emissiveUVOffsetAndTiling":return ie$z.EMISSIVE_UV_OFFSET_AND_TILING}}function s$F(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}s$G.getGltfSemanticUniforms=function(){return Or$2};var Q$C="attribute vec3 position;\nattribute float a_batchId;\nuniform mat4 u_modifiedModelViewProjection;\nvoid main()\n{\ngl_Position = czm_depthClampFarPlane(u_modifiedModelViewProjection * vec4(position, 1.0));\n}\n",_$C={};!function(e){var t="Compound",i="MemberExpression",n="Literal",r=function(e,t){var i=new Error(e+" at character "+t);throw i.index=t,i.description=e,i},o=!0,a={"-":o,"!":o,"~":o,"+":o},s={"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},l=function(e){var t,i=0;for(var n in e)(t=n.length)>i&&e.hasOwnProperty(n)&&(i=t);return i},u=l(a),c=l(s),h={true:!0,false:!1,null:null},d=function(e){return s[e]||0},f=function(e,t,i){return{type:"||"===e||"&&"===e?"LogicalExpression":"BinaryExpression",operator:e,left:t,right:i}},p=function(e){return e>=48&&e<=57},_=function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=128&&!s[String.fromCharCode(e)]},m=function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e>=128&&!s[String.fromCharCode(e)]},$=function(e){for(var o,l,$=0,g=e.charAt,y=e.charCodeAt,v=function(t){return g.call(e,t)},x=function(t){return y.call(e,t)},b=e.length,S=function(){for(var e=x($);32===e||9===e;)e=x(++$)},w=function(){var e,t,i=T();return S(),63!==x($)?i:($++,(e=w())||r("Expected expression",$),S(),58===x($)?($++,(t=w())||r("Expected expression",$),{type:"ConditionalExpression",test:i,consequent:e,alternate:t}):void r("Expected :",$))},C=function(){S();for(var t=e.substr($,c),i=t.length;i>0;){if(s.hasOwnProperty(t))return $+=i,t;t=t.substr(0,--i)}return!1},T=function(){var e,t,i,n,o,a,s,l;if(a=P(),!(t=C()))return a;for(o={value:t,prec:d(t)},(s=P())||r("Expected expression after "+t,$),n=[a,o,s];(t=C())&&0!==(i=d(t));){for(o={value:t,prec:i};n.length>2&&i<=n[n.length-2].prec;)s=n.pop(),t=n.pop().value,a=n.pop(),e=f(t,a,s),n.push(e);(e=P())||r("Expected expression after "+t,$),n.push(o,e)}for(e=n[l=n.length-1];l>1;)e=f(n[l-1].value,n[l-2],e),l-=2;return e},P=function(){var t,i,n;if(S(),t=x($),p(t)||46===t)return E();if(39===t||34===t)return A();if(_(t)||40===t)return I();if(91===t)return D();for(n=(i=e.substr($,u)).length;n>0;){if(a.hasOwnProperty(i))return $+=n,{type:"UnaryExpression",operator:i,argument:P(),prefix:!0};i=i.substr(0,--n)}return!1},E=function(){for(var e,t,i="";p(x($));)i+=v($++);if(46===x($))for(i+=v($++);p(x($));)i+=v($++);if("e"===(e=v($))||"E"===e){for(i+=v($++),("+"===(e=v($))||"-"===e)&&(i+=v($++));p(x($));)i+=v($++);p(x($-1))||r("Expected exponent ("+i+v($)+")",$)}return t=x($),_(t)?r("Variable names cannot start with a number ("+i+v($)+")",$):46===t&&r("Unexpected period",$),{type:n,value:parseFloat(i),raw:i}},A=function(){for(var e,t="",i=v($++),o=!1;$<b;){if((e=v($++))===i){o=!0;break}if("\\"===e)switch(e=v($++),e){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+="\\"+e}else t+=e}return o||r('Unclosed quote after "'+t+'"',$),{type:n,value:t,raw:i+t+i}},L=function(){var t,i=x($),o=$;for(_(i)?$++:r("Unexpected "+v($),$);$<b&&(i=x($),m(i));)$++;return t=e.slice(o,$),h.hasOwnProperty(t)?{type:n,value:h[t],raw:t}:"this"===t?{type:"ThisExpression"}:{type:"Identifier",name:t}},M=function(e){for(var i,n,o=[],a=!1;$<b;){if(S(),(i=x($))===e){a=!0,$++;break}44===i?$++:((!(n=w())||n.type===t)&&r("Expected comma",$),o.push(n))}return a||r("Expected "+String.fromCharCode(e),$),o},I=function(){var e,t;for(t=40===(e=x($))?O():L(),S(),e=x($);46===e||91===e||40===e;)$++,46===e?(S(),t={type:i,computed:!1,object:t,property:L()}):91===e?(t={type:i,computed:!0,object:t,property:w()},S(),93!==(e=x($))&&r("Unclosed [",$),$++):40===e&&(t={type:"CallExpression",arguments:M(41),callee:t}),S(),e=x($);return t},O=function(){$++;var e=w();if(S(),41===x($))return $++,e;r("Unclosed (",$)},D=function(){return $++,{type:"ArrayExpression",elements:M(93)}},R=[];$<b;)59===(o=x($))||44===o?$++:(l=w())?R.push(l):$<b&&r('Unexpected "'+v($)+'"',$);return 1===R.length?R[0]:{type:t,body:R}};$.version="0.3.1",$.toString=function(){return"JavaScript Expression Parser (JSEP) v"+$.version},$.addUnaryOp=function(e){return u=Math.max(e.length,u),a[e]=o,this},$.addBinaryOp=function(e,t){return c=Math.max(e.length,c),s[e]=t,this},$.addLiteral=function(e,t){return h[e]=t,this},$.removeUnaryOp=function(e){return delete a[e],e.length===u&&(u=l(a)),this},$.removeAllUnaryOps=function(){return a={},u=0,this},$.removeBinaryOp=function(e){return delete s[e],e.length===c&&(c=l(s)),this},$.removeAllBinaryOps=function(){return s={},c=0,this},$.removeLiteral=function(e){return delete h[e],this},$.removeAllLiterals=function(){return h={},this},e.jsep=$}(_$C);var M$I=_$C.jsep,L$F={VARIABLE:0,UNARY:1,BINARY:2,TERNARY:3,CONDITIONAL:4,MEMBER:5,FUNCTION_CALL:6,ARRAY:7,REGEX:8,VARIABLE_IN_STRING:9,LITERAL_NULL:10,LITERAL_BOOLEAN:11,LITERAL_NUMBER:12,LITERAL_STRING:13,LITERAL_COLOR:14,LITERAL_VECTOR:15,LITERAL_REGEX:16,LITERAL_UNDEFINED:17,BUILTIN_VARIABLE:18},s$E=Object.freeze(L$F);function b$V(e,t){var i;n$1e.typeOf.string("expression",e),this._expression=e,e=fe$j(oe$p(e=se$k(e,t))),M$I.addBinaryOp("=~",0),M$I.addBinaryOp("!~",0);try{i=M$I(e)}catch(e){throw new t$Z(e)}this._runtimeAst=g$w(this,i)}Object.defineProperties(b$V.prototype,{expression:{get:function(){return this._expression}}});var p$L={arrayIndex:0,arrayArray:[[]],cartesian2Index:0,cartesian3Index:0,cartesian4Index:0,cartesian2Array:[new r$T],cartesian3Array:[new a$11],cartesian4Array:[new a$10],reset:function(){this.arrayIndex=0,this.cartesian2Index=0,this.cartesian3Index=0,this.cartesian4Index=0},getArray:function(){this.arrayIndex>=this.arrayArray.length&&this.arrayArray.push([]);var e=this.arrayArray[this.arrayIndex++];return e.length=0,e},getCartesian2:function(){return this.cartesian2Index>=this.cartesian2Array.length&&this.cartesian2Array.push(new r$T),this.cartesian2Array[this.cartesian2Index++]},getCartesian3:function(){return this.cartesian3Index>=this.cartesian3Array.length&&this.cartesian3Array.push(new a$11),this.cartesian3Array[this.cartesian3Index++]},getCartesian4:function(){return this.cartesian4Index>=this.cartesian4Array.length&&this.cartesian4Array.push(new a$10),this.cartesian4Array[this.cartesian4Index++]}};b$V.prototype.evaluate=function(e,t){p$L.reset();var i=this._runtimeAst.evaluate(e);return t instanceof e$1z&&i instanceof a$10?e$1z.fromCartesian4(i,t):i instanceof r$T||i instanceof a$11||i instanceof a$10?i.clone(t):i},b$V.prototype.evaluateColor=function(e,t){p$L.reset();var i=this._runtimeAst.evaluate(e);return e$1z.fromCartesian4(i,t)},b$V.prototype.getShaderFunction=function(e,t,i,n){var r=this.getShaderExpression(t,i);return r=n+" "+e+"() \n{ \n return "+r+"; \n} \n"},b$V.prototype.getShaderExpression=function(e,t){return this._runtimeAst.getShaderExpression(e,t)};var J$E=["!","-","+"],G$D=["+","-","*","/","%","===","!==",">",">=","<","<=","&&","||","!~","=~"],Y$y=/\${(.*?)}/g,K$w=/\\/g,Q$B="@#%",W$L=/@#%/g,N$D=new e$1z,R$y={abs:w$L(Math.abs),sqrt:w$L(Math.sqrt),cos:w$L(Math.cos),sin:w$L(Math.sin),tan:w$L(Math.tan),acos:w$L(Math.acos),asin:w$L(Math.asin),atan:w$L(Math.atan),radians:w$L(n$1d.toRadians),degrees:w$L(n$1d.toDegrees),sign:w$L(n$1d.sign),floor:w$L(Math.floor),ceil:w$L(Math.ceil),round:w$L(Math.round),exp:w$L(Math.exp),exp2:w$L(ee$q),log:w$L(Math.log),log2:w$L(te$p),fract:w$L(Z$E),length:re$r,normalize:ne$n},T$I={atan2:O$y(Math.atan2,!1),pow:O$y(Math.pow,!1),min:O$y(Math.min,!0),max:O$y(Math.max,!0),distance:ae$p,dot:ie$r,cross:ue$g},q$M={clamp:V$v(n$1d.clamp,!0),mix:V$v(n$1d.lerp,!0)};function Z$E(e){return e-Math.floor(e)}function ee$q(e){return Math.pow(2,e)}function te$p(e){return n$1d.log2(e)}function w$L(e){return function(t,i){if("number"==typeof i)return e(i);if(i instanceof r$T)return r$T.fromElements(e(i.x),e(i.y),p$L.getCartesian2());if(i instanceof a$11)return a$11.fromElements(e(i.x),e(i.y),e(i.z),p$L.getCartesian3());if(i instanceof a$10)return a$10.fromElements(e(i.x),e(i.y),e(i.z),e(i.w),p$L.getCartesian4());throw new t$Z('Function "'+t+'" requires a vector or number argument. Argument is '+i+".")}}function O$y(e,t){return function(i,n,r){if(t&&"number"==typeof r){if("number"==typeof n)return e(n,r);if(n instanceof r$T)return r$T.fromElements(e(n.x,r),e(n.y,r),p$L.getCartesian2());if(n instanceof a$11)return a$11.fromElements(e(n.x,r),e(n.y,r),e(n.z,r),p$L.getCartesian3());if(n instanceof a$10)return a$10.fromElements(e(n.x,r),e(n.y,r),e(n.z,r),e(n.w,r),p$L.getCartesian4())}if("number"==typeof n&&"number"==typeof r)return e(n,r);if(n instanceof r$T&&r instanceof r$T)return r$T.fromElements(e(n.x,r.x),e(n.y,r.y),p$L.getCartesian2());if(n instanceof a$11&&r instanceof a$11)return a$11.fromElements(e(n.x,r.x),e(n.y,r.y),e(n.z,r.z),p$L.getCartesian3());if(n instanceof a$10&&r instanceof a$10)return a$10.fromElements(e(n.x,r.x),e(n.y,r.y),e(n.z,r.z),e(n.w,r.w),p$L.getCartesian4());throw new t$Z('Function "'+i+'" requires vector or number arguments of matching types. Arguments are '+n+" and "+r+".")}}function V$v(e,t){return function(i,n,r,o){if(t&&"number"==typeof o){if("number"==typeof n&&"number"==typeof r)return e(n,r,o);if(n instanceof r$T&&r instanceof r$T)return r$T.fromElements(e(n.x,r.x,o),e(n.y,r.y,o),p$L.getCartesian2());if(n instanceof a$11&&r instanceof a$11)return a$11.fromElements(e(n.x,r.x,o),e(n.y,r.y,o),e(n.z,r.z,o),p$L.getCartesian3());if(n instanceof a$10&&r instanceof a$10)return a$10.fromElements(e(n.x,r.x,o),e(n.y,r.y,o),e(n.z,r.z,o),e(n.w,r.w,o),p$L.getCartesian4())}if("number"==typeof n&&"number"==typeof r&&"number"==typeof o)return e(n,r,o);if(n instanceof r$T&&r instanceof r$T&&o instanceof r$T)return r$T.fromElements(e(n.x,r.x,o.x),e(n.y,r.y,o.y),p$L.getCartesian2());if(n instanceof a$11&&r instanceof a$11&&o instanceof a$11)return a$11.fromElements(e(n.x,r.x,o.x),e(n.y,r.y,o.y),e(n.z,r.z,o.z),p$L.getCartesian3());if(n instanceof a$10&&r instanceof a$10&&o instanceof a$10)return a$10.fromElements(e(n.x,r.x,o.x),e(n.y,r.y,o.y),e(n.z,r.z,o.z),e(n.w,r.w,o.w),p$L.getCartesian4());throw new t$Z('Function "'+i+'" requires vector or number arguments of matching types. Arguments are '+n+", "+r+", and "+o+".")}}function re$r(e,t){if("number"==typeof t)return Math.abs(t);if(t instanceof r$T)return r$T.magnitude(t);if(t instanceof a$11)return a$11.magnitude(t);if(t instanceof a$10)return a$10.magnitude(t);throw new t$Z('Function "'+e+'" requires a vector or number argument. Argument is '+t+".")}function ne$n(e,t){if("number"==typeof t)return 1;if(t instanceof r$T)return r$T.normalize(t,p$L.getCartesian2());if(t instanceof a$11)return a$11.normalize(t,p$L.getCartesian3());if(t instanceof a$10)return a$10.normalize(t,p$L.getCartesian4());throw new t$Z('Function "'+e+'" requires a vector or number argument. Argument is '+t+".")}function ae$p(e,t,i){if("number"==typeof t&&"number"==typeof i)return Math.abs(t-i);if(t instanceof r$T&&i instanceof r$T)return r$T.distance(t,i);if(t instanceof a$11&&i instanceof a$11)return a$11.distance(t,i);if(t instanceof a$10&&i instanceof a$10)return a$10.distance(t,i);throw new t$Z('Function "'+e+'" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")}function ie$r(e,t,i){if("number"==typeof t&&"number"==typeof i)return t*i;if(t instanceof r$T&&i instanceof r$T)return r$T.dot(t,i);if(t instanceof a$11&&i instanceof a$11)return a$11.dot(t,i);if(t instanceof a$10&&i instanceof a$10)return a$10.dot(t,i);throw new t$Z('Function "'+e+'" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")}function ue$g(e,t,i){if(t instanceof a$11&&i instanceof a$11)return a$11.cross(t,i,p$L.getCartesian3());throw new t$Z('Function "'+e+'" requires vec3 arguments. Arguments are '+t+" and "+i+".")}function u$H(e,t,i,n,r){this._type=e,this._value=t,this._left=i,this._right=n,this._test=r,this.evaluate=void 0,we$h(this)}function se$k(e,t){if(!t$$(t))return e;for(var i in t)if(t.hasOwnProperty(i)){var n=new RegExp("\\$\\{"+i+"\\}","g"),r="("+t[i]+")";t$$(r)&&(e=e.replace(n,r))}return e}function oe$p(e){return e.replace(K$w,Q$B)}function U$L(e){return e.replace(W$L,"\\")}function fe$j(e){for(var t=e,i="",n=t.indexOf("${");n>=0;){var r,o=t.indexOf("'"),a=t.indexOf('"');if(o>=0&&o<n)r=t.indexOf("'",o+1),i+=t.substr(0,r+1),n=(t=t.substr(r+1)).indexOf("${");else if(a>=0&&a<n)r=t.indexOf('"',a+1),i+=t.substr(0,r+1),n=(t=t.substr(r+1)).indexOf("${");else{i+=t.substr(0,n);var s=t.indexOf("}");if(s<0)throw new t$Z("Unmatched {.");i+="czm_"+t.substr(n+2,s-(n+2)),n=(t=t.substr(s+1)).indexOf("${")}}return i+=t}function le$n(e){var t=typeof e.value;return null===e.value?new u$H(s$E.LITERAL_NULL,null):"boolean"===t?new u$H(s$E.LITERAL_BOOLEAN,e.value):"number"===t?new u$H(s$E.LITERAL_NUMBER,e.value):"string"===t?e.value.indexOf("${")>=0?new u$H(s$E.VARIABLE_IN_STRING,e.value):new u$H(s$E.LITERAL_STRING,U$L(e.value)):void 0}function ce$h(e,t){var i,n,r,o,a=t.arguments,s=a.length;if("MemberExpression"===t.callee.type){i=t.callee.property.name;var l=t.callee.object;if("test"===i||"exec"===i){if("regExp"!==l.callee.name)throw new t$Z(i+" is not a function.");return 0===s?"test"===i?new u$H(s$E.LITERAL_BOOLEAN,!1):new u$H(s$E.LITERAL_NULL,null):(r=g$w(e,l),o=g$w(e,a[0]),new u$H(s$E.FUNCTION_CALL,i,r,o))}if("toString"===i)return n=g$w(e,l),new u$H(s$E.FUNCTION_CALL,i,n);throw new t$Z('Unexpected function call "'+i+'".')}if("color"===(i=t.callee.name)){if(0===s)return new u$H(s$E.LITERAL_COLOR,i);if(n=g$w(e,a[0]),t$$(a[1])){var u=g$w(e,a[1]);return new u$H(s$E.LITERAL_COLOR,i,[n,u])}return new u$H(s$E.LITERAL_COLOR,i,[n])}if("rgb"===i||"hsl"===i){if(s<3)throw new t$Z(i+" requires three arguments.");return n=[g$w(e,a[0]),g$w(e,a[1]),g$w(e,a[2])],new u$H(s$E.LITERAL_COLOR,i,n)}if("rgba"===i||"hsla"===i){if(s<4)throw new t$Z(i+" requires four arguments.");return n=[g$w(e,a[0]),g$w(e,a[1]),g$w(e,a[2]),g$w(e,a[3])],new u$H(s$E.LITERAL_COLOR,i,n)}if("vec2"===i||"vec3"===i||"vec4"===i){n=new Array(s);for(var c=0;c<s;++c)n[c]=g$w(e,a[c]);return new u$H(s$E.LITERAL_VECTOR,i,n)}if("isNaN"===i||"isFinite"===i)return 0===s?new u$H(s$E.LITERAL_BOOLEAN,"isNaN"===i):(n=g$w(e,a[0]),new u$H(s$E.UNARY,i,n));if("isExactClass"===i||"isClass"===i){if(s<1||s>1)throw new t$Z(i+" requires exactly one argument.");return n=g$w(e,a[0]),new u$H(s$E.UNARY,i,n)}if("getExactClassName"===i){if(s>0)throw new t$Z(i+" does not take any argument.");return new u$H(s$E.UNARY,i)}if(t$$(R$y[i])){if(1!==s)throw new t$Z(i+" requires exactly one argument.");return n=g$w(e,a[0]),new u$H(s$E.UNARY,i,n)}if(t$$(T$I[i])){if(2!==s)throw new t$Z(i+" requires exactly two arguments.");return r=g$w(e,a[0]),o=g$w(e,a[1]),new u$H(s$E.BINARY,i,r,o)}if(t$$(q$M[i])){if(3!==s)throw new t$Z(i+" requires exactly three arguments.");r=g$w(e,a[0]),o=g$w(e,a[1]);var h=g$w(e,a[2]);return new u$H(s$E.TERNARY,i,r,o,h)}if("Boolean"===i)return 0===s?new u$H(s$E.LITERAL_BOOLEAN,!1):(n=g$w(e,a[0]),new u$H(s$E.UNARY,i,n));if("Number"===i)return 0===s?new u$H(s$E.LITERAL_NUMBER,0):(n=g$w(e,a[0]),new u$H(s$E.UNARY,i,n));if("String"===i)return 0===s?new u$H(s$E.LITERAL_STRING,""):(n=g$w(e,a[0]),new u$H(s$E.UNARY,i,n));if("regExp"===i)return ve$i(e,t);throw new t$Z('Unexpected function call "'+i+'".')}function ve$i(e,t){var i=t.arguments;if(0===i.length)return new u$H(s$E.LITERAL_REGEX,new RegExp);var n,r=g$w(e,i[0]);if(i.length>1){var o=g$w(e,i[1]);if(z$x(r)&&z$x(o)){try{n=new RegExp(U$L(String(r._value)),o._value)}catch(e){throw new t$Z(e)}return new u$H(s$E.LITERAL_REGEX,n)}return new u$H(s$E.REGEX,r,o)}if(z$x(r)){try{n=new RegExp(U$L(String(r._value)))}catch(e){throw new t$Z(e)}return new u$H(s$E.LITERAL_REGEX,n)}return new u$H(s$E.REGEX,r)}function pe$i(e){if(_e$e(e.name)){var t=ye$j(e.name);return"tiles3d_"===t.substr(0,8)?new u$H(s$E.BUILTIN_VARIABLE,t):new u$H(s$E.VARIABLE,t)}if("NaN"===e.name)return new u$H(s$E.LITERAL_NUMBER,NaN);if("Infinity"===e.name)return new u$H(s$E.LITERAL_NUMBER,1/0);if("undefined"===e.name)return new u$H(s$E.LITERAL_UNDEFINED,void 0);throw new t$Z(e.name+" is not defined.")}function he$g(e){var t=e.property.name;return"PI"===t?new u$H(s$E.LITERAL_NUMBER,Math.PI):"E"===t?new u$H(s$E.LITERAL_NUMBER,Math.E):void 0}function ge$f(e){if("POSITIVE_INFINITY"===e.property.name)return new u$H(s$E.LITERAL_NUMBER,Number.POSITIVE_INFINITY)}function me$n(e,t){if("Math"===t.object.name)return he$g(t);if("Number"===t.object.name)return ge$f(t);var i,n=g$w(e,t.object);return t.computed?(i=g$w(e,t.property),new u$H(s$E.MEMBER,"brackets",n,i)):(i=new u$H(s$E.LITERAL_STRING,t.property.name),new u$H(s$E.MEMBER,"dot",n,i))}function z$x(e){return e._type>=s$E.LITERAL_NULL}function _e$e(e){return"czm_"===e.substr(0,4)}function ye$j(e){return e.substr(4)}function g$w(e,t){var i,n,r,o;if("Literal"===t.type)i=le$n(t);else if("CallExpression"===t.type)i=ce$h(e,t);else if("Identifier"===t.type)i=pe$i(t);else if("UnaryExpression"===t.type){n=t.operator;var a=g$w(e,t.argument);if(!(J$E.indexOf(n)>-1))throw new t$Z('Unexpected operator "'+n+'".');i=new u$H(s$E.UNARY,n,a)}else if("BinaryExpression"===t.type){if(n=t.operator,r=g$w(e,t.left),o=g$w(e,t.right),!(G$D.indexOf(n)>-1))throw new t$Z('Unexpected operator "'+n+'".');i=new u$H(s$E.BINARY,n,r,o)}else if("LogicalExpression"===t.type)n=t.operator,r=g$w(e,t.left),o=g$w(e,t.right),G$D.indexOf(n)>-1&&(i=new u$H(s$E.BINARY,n,r,o));else if("ConditionalExpression"===t.type){var s=g$w(e,t.test);r=g$w(e,t.consequent),o=g$w(e,t.alternate),i=new u$H(s$E.CONDITIONAL,"?",r,o,s)}else if("MemberExpression"===t.type)i=me$n(e,t);else{if("ArrayExpression"!==t.type)throw"Compound"===t.type?new t$Z("Provide exactly one expression."):new t$Z("Cannot parse expression.");for(var l=[],u=0;u<t.elements.length;u++)l[u]=g$w(e,t.elements[u]);i=new u$H(s$E.ARRAY,l)}return i}function we$h(e){e._type===s$E.CONDITIONAL?e.evaluate=e._evaluateConditional:e._type===s$E.FUNCTION_CALL?"test"===e._value?e.evaluate=e._evaluateRegExpTest:"exec"===e._value?e.evaluate=e._evaluateRegExpExec:"toString"===e._value&&(e.evaluate=e._evaluateToString):e._type===s$E.UNARY?"!"===e._value?e.evaluate=e._evaluateNot:"-"===e._value?e.evaluate=e._evaluateNegative:"+"===e._value?e.evaluate=e._evaluatePositive:"isNaN"===e._value?e.evaluate=e._evaluateNaN:"isFinite"===e._value?e.evaluate=e._evaluateIsFinite:"isExactClass"===e._value?e.evaluate=e._evaluateIsExactClass:"isClass"===e._value?e.evaluate=e._evaluateIsClass:"getExactClassName"===e._value?e.evaluate=e._evaluateGetExactClassName:"Boolean"===e._value?e.evaluate=e._evaluateBooleanConversion:"Number"===e._value?e.evaluate=e._evaluateNumberConversion:"String"===e._value?e.evaluate=e._evaluateStringConversion:t$$(R$y[e._value])&&(e.evaluate=de$j(e._value)):e._type===s$E.BINARY?"+"===e._value?e.evaluate=e._evaluatePlus:"-"===e._value?e.evaluate=e._evaluateMinus:"*"===e._value?e.evaluate=e._evaluateTimes:"/"===e._value?e.evaluate=e._evaluateDivide:"%"===e._value?e.evaluate=e._evaluateMod:"==="===e._value?e.evaluate=e._evaluateEqualsStrict:"!=="===e._value?e.evaluate=e._evaluateNotEqualsStrict:"<"===e._value?e.evaluate=e._evaluateLessThan:"<="===e._value?e.evaluate=e._evaluateLessThanOrEquals:">"===e._value?e.evaluate=e._evaluateGreaterThan:">="===e._value?e.evaluate=e._evaluateGreaterThanOrEquals:"&&"===e._value?e.evaluate=e._evaluateAnd:"||"===e._value?e.evaluate=e._evaluateOr:"=~"===e._value?e.evaluate=e._evaluateRegExpMatch:"!~"===e._value?e.evaluate=e._evaluateRegExpNotMatch:t$$(T$I[e._value])&&(e.evaluate=xe$p(e._value)):e._type===s$E.TERNARY?e.evaluate=Ae$f(e._value):e._type===s$E.MEMBER?"brackets"===e._value?e.evaluate=e._evaluateMemberBrackets:e.evaluate=e._evaluateMemberDot:e._type===s$E.ARRAY?e.evaluate=e._evaluateArray:e._type===s$E.VARIABLE?e.evaluate=e._evaluateVariable:e._type===s$E.VARIABLE_IN_STRING?e.evaluate=e._evaluateVariableString:e._type===s$E.LITERAL_COLOR?e.evaluate=e._evaluateLiteralColor:e._type===s$E.LITERAL_VECTOR?e.evaluate=e._evaluateLiteralVector:e._type===s$E.LITERAL_STRING?e.evaluate=e._evaluateLiteralString:e._type===s$E.REGEX?e.evaluate=e._evaluateRegExp:e._type===s$E.BUILTIN_VARIABLE?"tiles3d_tileset_time"===e._value&&(e.evaluate=Ee$k):e.evaluate=e._evaluateLiteral}function Ee$k(e){return t$$(e)?e.content.tileset.timeSinceLoad:0}function de$j(e){var t=R$y[e];return function(i){var n=this._left.evaluate(i);return t(e,n)}}function xe$p(e){var t=T$I[e];return function(i){var n=this._left.evaluate(i),r=this._right.evaluate(i);return t(e,n,r)}}function Ae$f(e){var t=q$M[e];return function(i){var n=this._left.evaluate(i),r=this._right.evaluate(i),o=this._test.evaluate(i);return t(e,n,r,o)}}function B$v(e,t){if(t$$(e))return e.getProperty(t)}function D$J(e){return"feature"===e._value}function P$A(e){for(var t=e._left,i=t.length,n=0;n<i;++n)if(t[n]._type!==s$E.LITERAL_NUMBER)return;var r=t[0]._value,o=t[1]._value,a=t[2]._value,s=4===i?t[3]._value:1;return e$1z.fromHsl(r,o,a,s,N$D)}function X$s(e){for(var t=e._left,i=t.length,n=0;n<i;++n)if(t[n]._type!==s$E.LITERAL_NUMBER)return;var r=N$D;return r.red=t[0]._value/255,r.green=t[1]._value/255,r.blue=t[2]._value/255,r.alpha=4===i?t[3]._value:1,r}function d$F(e){return e%1==0?e.toFixed(1):e.toString()}function be$m(e){return"vec3("+d$F(e.red)+", "+d$F(e.green)+", "+d$F(e.blue)+")"}function S$w(e){return"vec4("+d$F(e.red)+", "+d$F(e.green)+", "+d$F(e.blue)+", "+d$F(e.alpha)+")"}function k$A(e,t,i,n){for(var r=e.length,o=new Array(r),a=0;a<r;++a)o[a]=e[a].getShaderExpression(t,i,n);return o}u$H.prototype._evaluateLiteral=function(){return this._value},u$H.prototype._evaluateLiteralColor=function(e){var t=N$D,i=this._left;if("color"===this._value)t$$(i)?i.length>1?(e$1z.fromCssColorString(i[0].evaluate(e),t),t.alpha=i[1].evaluate(e)):e$1z.fromCssColorString(i[0].evaluate(e),t):e$1z.fromBytes(255,255,255,255,t);else if("rgb"===this._value)e$1z.fromBytes(i[0].evaluate(e),i[1].evaluate(e),i[2].evaluate(e),255,t);else if("rgba"===this._value){var n=255*i[3].evaluate(e);e$1z.fromBytes(i[0].evaluate(e),i[1].evaluate(e),i[2].evaluate(e),n,t)}else"hsl"===this._value?e$1z.fromHsl(i[0].evaluate(e),i[1].evaluate(e),i[2].evaluate(e),1,t):"hsla"===this._value&&e$1z.fromHsl(i[0].evaluate(e),i[1].evaluate(e),i[2].evaluate(e),i[3].evaluate(e),t);return a$10.fromColor(t,p$L.getCartesian4())},u$H.prototype._evaluateLiteralVector=function(e){for(var t=p$L.getArray(),i=this._value,n=this._left,r=n.length,o=0;o<r;++o){var a=n[o].evaluate(e);if("number"==typeof a)t.push(a);else if(a instanceof r$T)t.push(a.x,a.y);else if(a instanceof a$11)t.push(a.x,a.y,a.z);else{if(!(a instanceof a$10))throw new t$Z(i+" argument must be a vector or number. Argument is "+a+".");t.push(a.x,a.y,a.z,a.w)}}var s=t.length,l=parseInt(i.charAt(3));if(0===s)throw new t$Z("Invalid "+i+" constructor. No valid arguments.");if(s<l&&s>1)throw new t$Z("Invalid "+i+" constructor. Not enough arguments.");if(s>l&&r>1)throw new t$Z("Invalid "+i+" constructor. Too many arguments.");if(1===s){var u=t[0];t.push(u,u,u)}return"vec2"===i?r$T.fromArray(t,0,p$L.getCartesian2()):"vec3"===i?a$11.fromArray(t,0,p$L.getCartesian3()):"vec4"===i?a$10.fromArray(t,0,p$L.getCartesian4()):void 0},u$H.prototype._evaluateLiteralString=function(){return this._value},u$H.prototype._evaluateVariableString=function(e){for(var t=this._value,i=Y$y.exec(t);null!==i;){var n=i[0],r=B$v(e,i[1]);t$$(r)||(r=""),t=t.replace(n,r),i=Y$y.exec(t)}return t},u$H.prototype._evaluateVariable=function(e){return B$v(e,this._value)},u$H.prototype._evaluateMemberDot=function(e){if(D$J(this._left))return B$v(e,this._right.evaluate(e));var t=this._left.evaluate(e);if(t$$(t)){var i=this._right.evaluate(e);if(t instanceof r$T||t instanceof a$11||t instanceof a$10){if("r"===i)return t.x;if("g"===i)return t.y;if("b"===i)return t.z;if("a"===i)return t.w}return t[i]}},u$H.prototype._evaluateMemberBrackets=function(e){if(D$J(this._left))return B$v(e,this._right.evaluate(e));var t=this._left.evaluate(e);if(t$$(t)){var i=this._right.evaluate(e);if(t instanceof r$T||t instanceof a$11||t instanceof a$10){if(0===i||"r"===i)return t.x;if(1===i||"g"===i)return t.y;if(2===i||"b"===i)return t.z;if(3===i||"a"===i)return t.w}return t[i]}},u$H.prototype._evaluateArray=function(e){for(var t=[],i=0;i<this._value.length;i++)t[i]=this._value[i].evaluate(e);return t},u$H.prototype._evaluateNot=function(e){var t=this._left.evaluate(e);if("boolean"!=typeof t)throw new t$Z('Operator "!" requires a boolean argument. Argument is '+t+".");return!t},u$H.prototype._evaluateNegative=function(e){var t=this._left.evaluate(e);if(t instanceof r$T)return r$T.negate(t,p$L.getCartesian2());if(t instanceof a$11)return a$11.negate(t,p$L.getCartesian3());if(t instanceof a$10)return a$10.negate(t,p$L.getCartesian4());if("number"==typeof t)return-t;throw new t$Z('Operator "-" requires a vector or number argument. Argument is '+t+".")},u$H.prototype._evaluatePositive=function(e){var t=this._left.evaluate(e);if(!(t instanceof r$T||t instanceof a$11||t instanceof a$10||"number"==typeof t))throw new t$Z('Operator "+" requires a vector or number argument. Argument is '+t+".");return t},u$H.prototype._evaluateLessThan=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t=parseFloat(t),i=parseFloat(i),"number"!=typeof t||"number"!=typeof i)throw new t$Z('Operator "<" requires number arguments. Arguments are '+t+" and "+i+".");return t<i},u$H.prototype._evaluateLessThanOrEquals=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t=parseFloat(t),i=parseFloat(i),"number"!=typeof t||"number"!=typeof i)throw new t$Z('Operator "<=" requires number arguments. Arguments are '+t+" and "+i+".");return t<=i},u$H.prototype._evaluateGreaterThan=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t=parseFloat(t),i=parseFloat(i),"number"!=typeof t||"number"!=typeof i)throw new t$Z('Operator ">" requires number arguments. Arguments are '+t+" and "+i+".");return t>i},u$H.prototype._evaluateGreaterThanOrEquals=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t=parseFloat(t),i=parseFloat(i),"number"!=typeof t||"number"!=typeof i)throw new t$Z('Operator ">=" requires number arguments. Arguments are '+t+" and "+i+".");return t>=i},u$H.prototype._evaluateOr=function(e){var t=this._left.evaluate(e);if("boolean"!=typeof t)throw new t$Z('Operator "||" requires boolean arguments. First argument is '+t+".");if(t)return!0;var i=this._right.evaluate(e);if("boolean"!=typeof i)throw new t$Z('Operator "||" requires boolean arguments. Second argument is '+i+".");return t||i},u$H.prototype._evaluateAnd=function(e){var t=this._left.evaluate(e);if("boolean"!=typeof t)throw new t$Z('Operator "&&" requires boolean arguments. First argument is '+t+".");if(!t)return!1;var i=this._right.evaluate(e);if("boolean"!=typeof i)throw new t$Z('Operator "&&" requires boolean arguments. Second argument is '+i+".");return t&&i},u$H.prototype._evaluatePlus=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof r$T&&t instanceof r$T)return r$T.add(t,i,p$L.getCartesian2());if(i instanceof a$11&&t instanceof a$11)return a$11.add(t,i,p$L.getCartesian3());if(i instanceof a$10&&t instanceof a$10)return a$10.add(t,i,p$L.getCartesian4());if("string"==typeof t||"string"==typeof i||"number"==typeof t&&"number"==typeof i)return t+i;throw new t$Z('Operator "+" requires vector or number arguments of matching types, or at least one string argument. Arguments are '+t+" and "+i+".")},u$H.prototype._evaluateMinus=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof r$T&&t instanceof r$T)return r$T.subtract(t,i,p$L.getCartesian2());if(i instanceof a$11&&t instanceof a$11)return a$11.subtract(t,i,p$L.getCartesian3());if(i instanceof a$10&&t instanceof a$10)return a$10.subtract(t,i,p$L.getCartesian4());if("number"==typeof t&&"number"==typeof i)return t-i;throw new t$Z('Operator "-" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")},u$H.prototype._evaluateTimes=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof r$T&&t instanceof r$T)return r$T.multiplyComponents(t,i,p$L.getCartesian2());if(i instanceof r$T&&"number"==typeof t)return r$T.multiplyByScalar(i,t,p$L.getCartesian2());if(t instanceof r$T&&"number"==typeof i)return r$T.multiplyByScalar(t,i,p$L.getCartesian2());if(i instanceof a$11&&t instanceof a$11)return a$11.multiplyComponents(t,i,p$L.getCartesian3());if(i instanceof a$11&&"number"==typeof t)return a$11.multiplyByScalar(i,t,p$L.getCartesian3());if(t instanceof a$11&&"number"==typeof i)return a$11.multiplyByScalar(t,i,p$L.getCartesian3());if(i instanceof a$10&&t instanceof a$10)return a$10.multiplyComponents(t,i,p$L.getCartesian4());if(i instanceof a$10&&"number"==typeof t)return a$10.multiplyByScalar(i,t,p$L.getCartesian4());if(t instanceof a$10&&"number"==typeof i)return a$10.multiplyByScalar(t,i,p$L.getCartesian4());if("number"==typeof t&&"number"==typeof i)return t*i;throw new t$Z('Operator "*" requires vector or number arguments. If both arguments are vectors they must be matching types. Arguments are '+t+" and "+i+".")},u$H.prototype._evaluateDivide=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof r$T&&t instanceof r$T)return r$T.divideComponents(t,i,p$L.getCartesian2());if(t instanceof r$T&&"number"==typeof i)return r$T.divideByScalar(t,i,p$L.getCartesian2());if(i instanceof a$11&&t instanceof a$11)return a$11.divideComponents(t,i,p$L.getCartesian3());if(t instanceof a$11&&"number"==typeof i)return a$11.divideByScalar(t,i,p$L.getCartesian3());if(i instanceof a$10&&t instanceof a$10)return a$10.divideComponents(t,i,p$L.getCartesian4());if(t instanceof a$10&&"number"==typeof i)return a$10.divideByScalar(t,i,p$L.getCartesian4());if("number"==typeof t&&"number"==typeof i)return t/i;throw new t$Z('Operator "/" requires vector or number arguments of matching types, or a number as the second argument. Arguments are '+t+" and "+i+".")},u$H.prototype._evaluateMod=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof r$T&&t instanceof r$T)return r$T.fromElements(t.x%i.x,t.y%i.y,p$L.getCartesian2());if(i instanceof a$11&&t instanceof a$11)return a$11.fromElements(t.x%i.x,t.y%i.y,t.z%i.z,p$L.getCartesian3());if(i instanceof a$10&&t instanceof a$10)return a$10.fromElements(t.x%i.x,t.y%i.y,t.z%i.z,t.w%i.w,p$L.getCartesian4());if("number"==typeof t&&"number"==typeof i)return t%i;throw new t$Z('Operator "%" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")},u$H.prototype._evaluateEqualsStrict=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);return i instanceof r$T&&t instanceof r$T||i instanceof a$11&&t instanceof a$11||i instanceof a$10&&t instanceof a$10?t.equals(i):("bigint"==typeof t&&(t=Number(t)),t===i)},u$H.prototype._evaluateNotEqualsStrict=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);return i instanceof r$T&&t instanceof r$T||i instanceof a$11&&t instanceof a$11||i instanceof a$10&&t instanceof a$10?!t.equals(i):t!==i},u$H.prototype._evaluateConditional=function(e){var t=this._test.evaluate(e);if("boolean"!=typeof t)throw new t$Z("Conditional argument of conditional expression must be a boolean. Argument is "+t+".");return t?this._left.evaluate(e):this._right.evaluate(e)},u$H.prototype._evaluateNaN=function(e){return isNaN(this._left.evaluate(e))},u$H.prototype._evaluateIsFinite=function(e){return isFinite(this._left.evaluate(e))},u$H.prototype._evaluateIsExactClass=function(e){return!!t$$(e)&&e.isExactClass(this._left.evaluate(e))},u$H.prototype._evaluateIsClass=function(e){return!!t$$(e)&&e.isClass(this._left.evaluate(e))},u$H.prototype._evaluateGetExactClassName=function(e){if(t$$(e))return e.getExactClassName()},u$H.prototype._evaluateBooleanConversion=function(e){return Boolean(this._left.evaluate(e))},u$H.prototype._evaluateNumberConversion=function(e){return Number(this._left.evaluate(e))},u$H.prototype._evaluateStringConversion=function(e){return String(this._left.evaluate(e))},u$H.prototype._evaluateRegExp=function(e){var t,i=this._value.evaluate(e),n="";t$$(this._left)&&(n=this._left.evaluate(e));try{t=new RegExp(i,n)}catch(e){throw new t$Z(e)}return t},u$H.prototype._evaluateRegExpTest=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(!(t instanceof RegExp&&"string"==typeof i))throw new t$Z("RegExp.test requires the first argument to be a RegExp and the second argument to be a string. Arguments are "+t+" and "+i+".");return t.test(i)},u$H.prototype._evaluateRegExpMatch=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t instanceof RegExp&&"string"==typeof i)return t.test(i);if(i instanceof RegExp&&"string"==typeof t)return i.test(t);throw new t$Z('Operator "=~" requires one RegExp argument and one string argument. Arguments are '+t+" and "+i+".")},u$H.prototype._evaluateRegExpNotMatch=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t instanceof RegExp&&"string"==typeof i)return!t.test(i);if(i instanceof RegExp&&"string"==typeof t)return!i.test(t);throw new t$Z('Operator "!~" requires one RegExp argument and one string argument. Arguments are '+t+" and "+i+".")},u$H.prototype._evaluateRegExpExec=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(!(t instanceof RegExp&&"string"==typeof i))throw new t$Z("RegExp.exec requires the first argument to be a RegExp and the second argument to be a string. Arguments are "+t+" and "+i+".");var n=t.exec(i);return t$$(n)?n[1]:null},u$H.prototype._evaluateToString=function(e){var t=this._left.evaluate(e);if(t instanceof RegExp||t instanceof r$T||t instanceof a$11||t instanceof a$10)return String(t);throw new t$Z('Unexpected function call "'+this._value+'".')};var $$B="czm_infinity";function T$H(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._vertexBatchIds=e.vertexBatchIds,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=e.indexOffsets,this._batchedIndices=e.batchedIndices,this._boundingVolume=e.boundingVolume,this._boundingVolumes=e.boundingVolumes,this._center=e$1Y(e.center,a$11.ZERO),this._va=void 0,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._uniformMap=void 0,this._vaSwap=void 0,this._rsStencilPreloadPass=void 0,this._rsStencilPreloadPass3DTiles=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._rsWireframe=void 0,this._commands=[],this._commandsIgnoreShow=[],this._pickCommands=[],this._constantColor=e$1z.clone(e$1z.WHITE),this._highlightColor=this._constantColor,this._batchDirty=!0,this._pickCommandsDirty=!0,this._framesSinceLastRebatch=0,this._updatingAllCommands=!1,this._trianglesLength=this._indices.length/3,this._geometryByteLength=this._indices.byteLength+this._positions.byteLength+this._vertexBatchIds.byteLength,this.debugWireframe=!1,this._debugWireframe=this.debugWireframe,this._wireframeDirty=!1,this.forceRebatch=!1,this.classificationType=e$1Y(e.classificationType,_0x29401c.BOTH),this._vertexShaderSource=e._vertexShaderSource,this._fragmentShaderSource=e._fragmentShaderSource,this._attributeLocations=e._attributeLocations,this._uniformMap=e._uniformMap,this._pickId=e._pickId,this._modelMatrix=e._modelMatrix,this._boundingSphere=e._boundingSphere,this._batchIdLookUp={};for(var t=this._batchIds.length,i=0;i<t;++i){var n=this._batchIds[i];this._batchIdLookUp[n]=i}}u$H.prototype.getShaderExpression=function(e,t,i){var n,r,o,a,s=this._type,l=this._value;switch(t$$(this._left)&&(r=Array.isArray(this._left)?k$A(this._left,e,t,this):this._left.getShaderExpression(e,t,this)),t$$(this._right)&&(o=this._right.getShaderExpression(e,t,this)),t$$(this._test)&&(a=this._test.getShaderExpression(e,t,this)),Array.isArray(this._value)&&(l=k$A(this._value,e,t,this)),s){case s$E.VARIABLE:return e+l;case s$E.UNARY:if("Boolean"===l)return"bool("+r+")";if("Number"===l)return"float("+r+")";if("round"===l)return"floor("+r+" + 0.5)";if(t$$(R$y[l]))return l+"("+r+")";if("isNaN"===l)return"("+r+" != "+r+")";if("isFinite"===l)return"(abs("+r+") < czm_infinity)";if("String"===l||"isExactClass"===l||"isClass"===l||"getExactClassName"===l)throw new t$Z('Error generating style shader: "'+l+'" is not supported.');return t$$(R$y[l])?l+"("+r+")":l+r;case s$E.BINARY:return"%"===l?"mod("+r+", "+o+")":"==="===l?"("+r+" == "+o+")":"!=="===l?"("+r+" != "+o+")":"atan2"===l?"atan("+r+", "+o+")":t$$(T$I[l])?l+"("+r+", "+o+")":"("+r+" "+l+" "+o+")";case s$E.TERNARY:if(t$$(q$M[l]))return l+"("+r+", "+o+", "+a+")";break;case s$E.CONDITIONAL:return"("+a+" ? "+r+" : "+o+")";case s$E.MEMBER:return"r"===o||"x"===o||"0.0"===o?r+"[0]":"g"===o||"y"===o||"1.0"===o?r+"[1]":"b"===o||"z"===o||"2.0"===o?r+"[2]":"a"===o||"w"===o||"3.0"===o?r+"[3]":r+"[int("+o+")]";case s$E.FUNCTION_CALL:throw new t$Z('Error generating style shader: "'+l+'" is not supported.');case s$E.ARRAY:if(4===l.length)return"vec4("+l[0]+", "+l[1]+", "+l[2]+", "+l[3]+")";if(3===l.length)return"vec3("+l[0]+", "+l[1]+", "+l[2]+")";if(2===l.length)return"vec2("+l[0]+", "+l[1]+")";throw new t$Z("Error generating style shader: Invalid array length. Array length should be 2, 3, or 4.");case s$E.REGEX:throw new t$Z("Error generating style shader: Regular expressions are not supported.");case s$E.VARIABLE_IN_STRING:throw new t$Z("Error generating style shader: Converting a variable to a string is not supported.");case s$E.LITERAL_NULL:return $$B;case s$E.LITERAL_BOOLEAN:return l?"true":"false";case s$E.LITERAL_NUMBER:return d$F(l);case s$E.LITERAL_STRING:if(t$$(i)&&i._type===s$E.MEMBER&&("r"===l||"g"===l||"b"===l||"a"===l||"x"===l||"y"===l||"z"===l||"w"===l))return l;if(t$$(n=e$1z.fromCssColorString(l,N$D)))return be$m(n);throw new t$Z("Error generating style shader: String literals are not supported.");case s$E.LITERAL_COLOR:var u=r;if("color"===l){if(!t$$(u))return"vec4(1.0)";if(u.length>1){var c=u[0],h=u[1];return"1.0"!==h&&(t.translucent=!0),"vec4("+c+", "+h+")"}return"vec4("+u[0]+", 1.0)"}if("rgb"===l)return t$$(n=X$s(this))?S$w(n):"vec4("+u[0]+" / 255.0, "+u[1]+" / 255.0, "+u[2]+" / 255.0, 1.0)";if("rgba"===l)return"1.0"!==u[3]&&(t.translucent=!0),t$$(n=X$s(this))?S$w(n):"vec4("+u[0]+" / 255.0, "+u[1]+" / 255.0, "+u[2]+" / 255.0, "+u[3]+")";if("hsl"===l)return t$$(n=P$A(this))?S$w(n):"vec4(czm_HSLToRGB(vec3("+u[0]+", "+u[1]+", "+u[2]+")), 1.0)";if("hsla"===l)return t$$(n=P$A(this))?(1!==n.alpha&&(t.translucent=!0),S$w(n)):("1.0"!==u[3]&&(t.translucent=!0),"vec4(czm_HSLToRGB(vec3("+u[0]+", "+u[1]+", "+u[2]+")), "+u[3]+")");break;case s$E.LITERAL_VECTOR:if(!t$$(r))throw new t$_("left should always be defined for type ExpressionNodeType.LITERAL_VECTOR");for(var d=r.length,f=l+"(",p=0;p<d;++p)f+=r[p],p<d-1&&(f+=", ");return f+=")";case s$E.LITERAL_REGEX:throw new t$Z("Error generating style shader: Regular expressions are not supported.");case s$E.LITERAL_UNDEFINED:return $$B;case s$E.BUILTIN_VARIABLE:if("tiles3d_tileset_time"===l)return"u_time"}},Object.defineProperties(T$H.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}}});var oe$o={position:0,a_batchId:1};function ae$o(e,t){if(!t$$(e._va)){var i=u$Y.createVertexBuffer({context:t,typedArray:e._positions,usage:A$13.STATIC_DRAW}),n=u$Y.createVertexBuffer({context:t,typedArray:e._vertexBatchIds,usage:A$13.STATIC_DRAW}),r=u$Y.createIndexBuffer({context:t,typedArray:e._indices,usage:A$13.DYNAMIC_DRAW,indexDatatype:2===e._indices.BYTES_PER_ELEMENT?fe$u.UNSIGNED_SHORT:fe$u.UNSIGNED_INT}),o=[{index:0,vertexBuffer:i,componentDatatype:C$12.fromTypedArray(e._positions),componentsPerAttribute:3},{index:1,vertexBuffer:n,componentDatatype:C$12.fromTypedArray(e._vertexBatchIds),componentsPerAttribute:1}];e._va=new x$18({context:t,attributes:o,indexBuffer:r}),t.webgl2&&(e._vaSwap=new x$18({context:t,attributes:o,indexBuffer:u$Y.createIndexBuffer({context:t,sizeInBytes:r.sizeInBytes,usage:A$13.DYNAMIC_DRAW,indexDatatype:r.indexDatatype})})),e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0,e._verticesPromise=void 0}}function se$j(e,t){if(!t$$(e._sp)){var i=e._batchTable,n=e$1Y(e._attributeLocations,oe$o),r=e._pickId,o=e._vertexShaderSource,a=e._fragmentShaderSource;if(t$$(o))return e._sp=p$15.fromCache({context:t,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:n}),e._spStencil=e._sp,a=(a=a$O.replaceMain(a,"czm_non_pick_main"))+"void main() \n{ \n czm_non_pick_main(); \n gl_FragColor = "+r+"; \n} \n",void(e._spPick=p$15.fromCache({context:t,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:n}));var s=i.getVertexShaderCallback(!1,"a_batchId",void 0)(Q$C),l=i.getFragmentShaderCallback()(Y$F,!1,void 0);r=i.getPickId();var u=new a$O({sources:[s]}),c=new a$O({defines:["VECTOR_TILE"],sources:[l]});e._sp=p$15.fromCache({context:t,vertexShaderSource:u,fragmentShaderSource:c,attributeLocations:n}),u=new a$O({sources:[Q$C]}),c=new a$O({defines:["VECTOR_TILE"],sources:[Y$F]}),e._spStencil=p$15.fromCache({context:t,vertexShaderSource:u,fragmentShaderSource:c,attributeLocations:n}),l=(l=a$O.replaceMain(l,"czm_non_pick_main"))+"\nvoid main() \n{ \n czm_non_pick_main(); \n gl_FragColor = "+r+"; \n} \n";var h=new a$O({sources:[s]}),d=new a$O({defines:["VECTOR_TILE"],sources:[l]});e._spPick=p$15.fromCache({context:t,vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:n})}}function j$G(e){var t=e?h$N.EQUAL:h$N.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:t,frontOperation:{fail:o$F.KEEP,zFail:o$F.DECREMENT_WRAP,zPass:o$F.DECREMENT_WRAP},backFunction:t,backOperation:{fail:o$F.KEEP,zFail:o$F.INCREMENT_WRAP,zPass:o$F.INCREMENT_WRAP},reference:Ia$1.CESIUM_3D_TILE_MASK,mask:Ia$1.CESIUM_3D_TILE_MASK},stencilMask:Ia$1.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1}}function q$L(e){var t=e?h$N.EQUAL:h$N.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:t,frontOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.INCREMENT_WRAP},backFunction:t,backOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.DECREMENT_WRAP},reference:Ia$1.CESIUM_3D_TILE_MASK,mask:Ia$1.CESIUM_3D_TILE_MASK},stencilMask:Ia$1.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:Re$h.LESS_OR_EQUAL},depthMask:!1}}var ie$q={stencilTest:{enabled:!0,frontFunction:h$N.NOT_EQUAL,frontOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.DECREMENT_WRAP},backFunction:h$N.NOT_EQUAL,backOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.DECREMENT_WRAP},reference:0,mask:Ia$1.CLASSIFICATION_MASK},stencilMask:Ia$1.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:Ee$s.ALPHA_BLEND},ne$m={stencilTest:{enabled:!0,frontFunction:h$N.NOT_EQUAL,frontOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.DECREMENT_WRAP},backFunction:h$N.NOT_EQUAL,backOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.DECREMENT_WRAP},reference:0,mask:Ia$1.CLASSIFICATION_MASK},stencilMask:Ia$1.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function ce$g(e){t$$(e._rsStencilPreloadPass)||(e._rsStencilPreloadPass=p$1a.fromCache(j$G(!1)),e._rsStencilPreloadPass3DTiles=p$1a.fromCache(j$G(!0)),e._rsStencilDepthPass=p$1a.fromCache(q$L(!1)),e._rsStencilDepthPass3DTiles=p$1a.fromCache(q$L(!0)),e._rsColorPass=p$1a.fromCache(ie$q),e._rsPickPass=p$1a.fromCache(ne$m))}var N$C=new c$1a,J$D=new a$11;function de$i(e,t){if(!t$$(e._uniformMap)){var i={u_modifiedModelViewProjection:function(){var i=t.uniformState.view,n=t.uniformState.projection;return c$1a.clone(i,N$C),c$1a.multiplyByPoint(N$C,e._center,J$D),c$1a.setTranslation(N$C,J$D,N$C),c$1a.multiply(n,N$C,N$C),N$C},u_highlightColor:function(){return e._highlightColor}};e._uniformMap=e._batchTable.getUniformMapCallback()(i)}}function F$D(e,t,i,n,r,o,a){for(var s=e.constructor.BYTES_PER_ELEMENT,l=o.length,u=0;u<l;++u){var c=a[o[u]],h=n[c],d=r[c],f=new e.constructor(e.buffer,s*h,d);t.set(f,i),n[c]=i,i+=d}return i}function _e$d(e,t){var i=e._indices,n=e._indexOffsets,r=e._indexCounts,o=e._batchIdLookUp,a=new i.constructor(i.length),s=t.pop(),l=[s],u=F$D(i,a,0,n,r,s.batchIds,o);for(s.offset=0,s.count=u;t.length>0;){var c=t.pop();if(e$1z.equals(c.color,s.color))u=F$D(i,a,u,n,r,c.batchIds,o),s.batchIds=s.batchIds.concat(c.batchIds),s.count=u-s.offset;else{var h=u;u=F$D(i,a,u,n,r,c.batchIds,o),c.offset=h,c.count=u-h,l.push(c),s=c}}e._va.indexBuffer.copyFromArrayView(a),e._indices=a,e._batchedIndices=l}function W$K(e,t,i,n,r,o,a){for(var s=e.bytesPerIndex,l=o.length,u=0;u<l;++u){var c=a[o[u]],h=n[c],d=r[c];t.copyFromBuffer(e,h*s,i*s,d*s),n[c]=i,i+=d}return i}function he$f(e,t){var i=e._indexOffsets,n=e._indexCounts,r=e._batchIdLookUp,o=t.pop(),a=[o],s=e._va.indexBuffer,l=e._vaSwap.indexBuffer,u=W$K(s,l,0,i,n,o.batchIds,r);for(o.offset=0,o.count=u;t.length>0;){var c=t.pop();if(e$1z.equals(c.color,o.color))u=W$K(s,l,u,i,n,c.batchIds,r),o.batchIds=o.batchIds.concat(c.batchIds),o.count=u-o.offset;else{var h=u;u=W$K(s,l,u,i,n,c.batchIds,r),c.offset=h,c.count=u-h,a.push(c),o=c}}var d=e._va;e._va=e._vaSwap,e._vaSwap=d,e._batchedIndices=a}function fe$i(e,t){return t.color.toRgba()-e.color.toRgba()}function le$m(e,t){if(!e._batchDirty)return!1;for(var i=e._batchedIndices,n=i.length,r=!1,o={},a=0;a<n;++a){var s=i[a].color.toRgba();if(t$$(o[s])){r=!0;break}o[s]=!0}return r?r&&!e.forceRebatch&&e._framesSinceLastRebatch<120?void++e._framesSinceLastRebatch:(i.sort(fe$i),t.webgl2?he$f(e,i):_e$d(e,i),e._framesSinceLastRebatch=0,e._batchDirty=!1,e._pickCommandsDirty=!0,e._wireframeDirty=!0,!0):(e._batchDirty=!1,!1)}function me$m(e,t){var i=le$m(e,t),n=e._commands,r=e._batchedIndices,o=r.length,a=3*o;if(!t$$(n)||i||n.length!==a){n.length=a;for(var s=e._va,l=e._sp,u=e$1Y(e._modelMatrix,c$1a.IDENTITY),c=e._uniformMap,h=e._boundingVolume,d=0;d<o;++d){var f=r[d].offset,p=r[d].count,_=n[3*d];t$$(_)||(_=n[3*d]=new s$1d({owner:e})),_.vertexArray=s,_.modelMatrix=u,_.offset=f,_.count=p,_.renderState=e._rsStencilPreloadPass,_.shaderProgram=l,_.uniformMap=c,_.boundingVolume=h,_.cull=!1,_.pass=we$l.TERRAIN_CLASSIFICATION;var m=s$1d.shallowClone(_,_.derivedCommands.tileset);m.renderState=e._rsStencilPreloadPass3DTiles,m.pass=we$l.CESIUM_3D_TILE_CLASSIFICATION,_.derivedCommands.tileset=m;var $=n[3*d+1];t$$($)||($=n[3*d+1]=new s$1d({owner:e})),$.vertexArray=s,$.modelMatrix=u,$.offset=f,$.count=p,$.renderState=e._rsStencilDepthPass,$.shaderProgram=l,$.uniformMap=c,$.boundingVolume=h,$.cull=!1,$.pass=we$l.TERRAIN_CLASSIFICATION;var g=s$1d.shallowClone($,$.derivedCommands.tileset);g.renderState=e._rsStencilDepthPass3DTiles,g.pass=we$l.CESIUM_3D_TILE_CLASSIFICATION,$.derivedCommands.tileset=g;var y=n[3*d+2];t$$(y)||(y=n[3*d+2]=new s$1d({owner:e})),y.vertexArray=s,y.modelMatrix=u,y.offset=f,y.count=p,y.renderState=e._rsColorPass,y.shaderProgram=l,y.uniformMap=c,y.boundingVolume=h,y.cull=!1,y.pass=we$l.TERRAIN_CLASSIFICATION;var v=s$1d.shallowClone(y,y.derivedCommands.tileset);v.pass=we$l.CESIUM_3D_TILE_CLASSIFICATION,y.derivedCommands.tileset=v}e._commandsDirty=!0}}function ue$f(e,t){if(e.classificationType!==_0x29401c.TERRAIN&&t.invertClassification&&(!t$$(e._commandsIgnoreShow)||e._commandsDirty)){for(var i=e._commands,n=e._commandsIgnoreShow,r=e._spStencil,o=i.length,a=n.length=o/3*2,s=0,l=0;l<a;l+=2){var u=n[l]=s$1d.shallowClone(i[s],n[l]);u.shaderProgram=r,u.pass=we$l.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,(u=n[l+1]=s$1d.shallowClone(i[s+1],n[l+1])).shaderProgram=r,u.pass=we$l.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,s+=3}e._commandsDirty=!1}}function pe$h(e){if(e._pickCommandsDirty){var t=e._indexOffsets.length,i=e._pickCommands;i.length=3*t;for(var n=e._va,r=e._spStencil,o=e._spPick,a=e$1Y(e._modelMatrix,c$1a.IDENTITY),s=e._uniformMap,l=0;l<t;++l){var u=e._indexOffsets[l],c=e._indexCounts[l],h=t$$(e._boundingVolumes)?e._boundingVolumes[l]:e.boundingVolume,d=i[3*l];t$$(d)||(d=i[3*l]=new s$1d({owner:e,pickOnly:!0})),d.vertexArray=n,d.modelMatrix=a,d.offset=u,d.count=c,d.renderState=e._rsStencilPreloadPass,d.shaderProgram=r,d.uniformMap=s,d.boundingVolume=h,d.pass=we$l.TERRAIN_CLASSIFICATION;var f=s$1d.shallowClone(d,d.derivedCommands.tileset);f.renderState=e._rsStencilPreloadPass3DTiles,f.pass=we$l.CESIUM_3D_TILE_CLASSIFICATION,d.derivedCommands.tileset=f;var p=i[3*l+1];t$$(p)||(p=i[3*l+1]=new s$1d({owner:e,pickOnly:!0})),p.vertexArray=n,p.modelMatrix=a,p.offset=u,p.count=c,p.renderState=e._rsStencilDepthPass,p.shaderProgram=r,p.uniformMap=s,p.boundingVolume=h,p.pass=we$l.TERRAIN_CLASSIFICATION;var _=s$1d.shallowClone(p,p.derivedCommands.tileset);_.renderState=e._rsStencilDepthPass3DTiles,_.pass=we$l.CESIUM_3D_TILE_CLASSIFICATION,p.derivedCommands.tileset=_;var m=i[3*l+2];t$$(m)||(m=i[3*l+2]=new s$1d({owner:e,pickOnly:!0})),m.vertexArray=n,m.modelMatrix=a,m.offset=u,m.count=c,m.renderState=e._rsPickPass,m.shaderProgram=o,m.uniformMap=s,m.boundingVolume=h,m.pass=we$l.TERRAIN_CLASSIFICATION;var $=s$1d.shallowClone(m,m.derivedCommands.tileset);$.pass=we$l.CESIUM_3D_TILE_CLASSIFICATION,m.derivedCommands.tileset=$}e._pickCommandsDirty=!1}}function Ie$j(e,t){e._updatingAllCommands=!0;var i,n=e._batchIds,r=n.length;for(i=0;i<r;++i){var o=t[n[i]];o.show=!0,o.color=e$1z.WHITE}var a=e._batchedIndices;for(r=a.length,i=0;i<r;++i)a[i].color=e$1z.clone(e$1z.WHITE);e._updatingAllCommands=!1,e._batchDirty=!0}T$H.prototype.createFeatures=function(e,t){for(var i=this._batchIds,n=i.length,r=0;r<n;++r){var o=i[r];t[o]=new e$Z(e,o)}},T$H.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};var Se$c=new e$1z,ve$h=e$1z.WHITE,be$l=!0,Ee$j=/\$/;function Z$D(e,t,i,n){var r,o,a=e.classificationType,s=a!==_0x29401c.CESIUM_3D_TILE,l=a!==_0x29401c.TERRAIN,u=t.commandList,c=i.length;for(o=0;o<c;++o)s&&((r=i[o]).pass=we$l.TERRAIN_CLASSIFICATION,u.push(r)),l&&((r=i[o].derivedCommands.tileset).pass=we$l.CESIUM_3D_TILE_CLASSIFICATION,u.push(r));if(t.invertClassification&&t$$(n))for(c=n.length,o=0;o<c;++o)u.push(n[o])}function Ce$j(e,t){for(var i=e.commandList,n=t.length,r=0;r<n;r+=3){var o=t[r+2];o.pass=we$l.OPAQUE,i.push(o)}}function ge$e(e){var t=e.debugWireframe===e._debugWireframe;if(!(t=t&&!(e.debugWireframe&&e._wireframeDirty))){var i,n;t$$(e._rsWireframe)||(e._rsWireframe=p$1a.fromCache({})),e.debugWireframe?(i=e._rsWireframe,n=H$11.LINES):(i=e._rsColorPass,n=H$11.TRIANGLES);for(var r=e._commands,o=r.length,a=0;a<o;a+=3){var s=r[a+2];s.renderState=i,s.primitiveType=n}e._debugWireframe=e.debugWireframe,e._wireframeDirty=!1}}T$H.prototype.applyStyle=function(e,t){if(t$$(e)){var i=e.color,n=i instanceof b$V&&!Ee$j.test(i.expression);this._updatingAllCommands=n;var r,o=this._batchIds,a=o.length;for(r=0;r<a;++r){var s=t[o[r]];s.color=t$$(e.color)?e.color.evaluateColor(s,Se$c):ve$h,s.show=t$$(e.show)?e.show.evaluate(s):be$l}if(n){var l=this._batchedIndices;for(a=l.length,r=0;r<a;++r)l[r].color=e$1z.clone(e$1z.WHITE);this._updatingAllCommands=!1,this._batchDirty=!0}}else Ie$j(this,t)},T$H.prototype.updateCommands=function(e,t){if(!this._updatingAllCommands){var i=this._batchIdLookUp,n=i[e];if(t$$(n)){var r,o=this._indexOffsets,a=this._indexCounts,s=o[n],l=a[n],u=this._batchedIndices,c=u.length;for(r=0;r<c;++r){var h=u[r].offset,d=u[r].count;if(s>=h&&s<h+d)break}u.push(new s$F({color:e$1z.clone(t),offset:s,count:l,batchIds:[e]}));for(var f=[],p=[],_=u[r].batchIds,m=_.length,$=0;$<m;++$){var g=_[$];if(g!==e)o[i[g]]<s?f.push(g):p.push(g)}0!==p.length&&u.push(new s$F({color:e$1z.clone(u[r].color),offset:s+l,count:u[r].offset+u[r].count-(s+l),batchIds:p})),0!==f.length?(u[r].count=s-u[r].offset,u[r].batchIds=f):u.splice(r,1),this._batchDirty=!0}}},T$H.prototype.update=function(e){var t=e.context;ae$o(this,t),se$j(this,t),ce$g(this),de$i(this,t);var i=e.passes;i.render&&(me$m(this,t),ue$f(this,e),ge$e(this),this._debugWireframe?Ce$j(e,this._commands):Z$D(this,e,this._commands,this._commandsIgnoreShow)),i.pick&&(pe$h(this),Z$D(this,e,this._pickCommands))},T$H.prototype.isDestroyed=function(){return!1},T$H.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaSwap=this._vaSwap&&this._vaSwap.destroy(),s$1e(this)};var Ie$i=new a$11,b$U=s$G.ModelState;function w$K(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).gltf;if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),!(t instanceof Uint8Array))throw new t$Z("Only binary glTF is supported as a classifier.");te$r(t=h$J(t)),h$K(t),le$o(t),_e$f(t),t$A.buffer(t,(function(e){if(!t$$(e.extras._pipeline.source))throw new t$Z("Buffer data must be embedded in the binary gltf.")}));var i=t.nodes,n=t.meshes,r=i[0].mesh;if(1!==i.length||!t$$(r))throw new t$Z("Only one node is supported for classification and it must have a mesh.");if(1!==n.length)throw new t$Z("Only one mesh is supported when using b3dm for classification.");var o=n[0].primitives;if(1!==o.length)throw new t$Z("Only one primitive per mesh is supported when using b3dm for classification.");if(!t$$(o[0].attributes.POSITION))throw new t$Z("The mesh must have a position attribute.");if(!t$$(o[0].attributes._BATCHID))throw new t$Z("The mesh must have a batch id attribute.");this._gltf=t,this.show=e$1Y(e.show,!0),this.modelMatrix=c$1a.clone(e$1Y(e.modelMatrix,c$1a.IDENTITY)),this._modelMatrix=c$1a.clone(this.modelMatrix),this._ready=!1,this._readyPromise=c$18.defer(),this.debugShowBoundingVolume=e$1Y(e.debugShowBoundingVolume,!1),this._debugShowBoundingVolume=!1,this.debugWireframe=e$1Y(e.debugWireframe,!1),this._debugWireframe=!1,this._classificationType=e.classificationType,this._vertexShaderLoaded=e.vertexShaderLoaded,this._classificationShaderLoaded=e.classificationShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._pickIdLoaded=e.pickIdLoaded,this._ignoreCommands=e$1Y(e.ignoreCommands,!1),this._upAxis=e$1Y(e.upAxis,z$y.Y),this._batchTable=e.batchTable,this._computedModelMatrix=new c$1a,this._initialRadius=void 0,this._boundingSphere=void 0,this._scaledBoundingSphere=new c$19,this._state=b$U.NEEDS_LOAD,this._loadResources=void 0,this._mode=void 0,this._dirty=!1,this._nodeMatrix=new c$1a,this._primitive=void 0,this._extensionsUsed=void 0,this._extensionsRequired=void 0,this._quantizedUniforms=void 0,this._buffers={},this._vertexArray=void 0,this._shaderProgram=void 0,this._uniformMap=void 0,this._geometryByteLength=0,this._trianglesLength=0,this._rtcCenter=void 0,this._rtcCenterEye=void 0,this._rtcCenter3D=void 0,this._rtcCenter2D=void 0}function Ce$i(e){var t=e.gltf,i=e._loadResources;t$A.buffer(t,(function(e,t){i.buffers[t]=e.extras._pipeline.source}))}function Oe$i(e){var t=e.gltf.bufferViews,i=e._loadResources.vertexBuffersToCreate;t$A.bufferView(e.gltf,(function(e,t){e.target===de$x.ARRAY_BUFFER&&i.enqueue(t)}));var n=e._loadResources.indexBuffersToCreate,r={};t$A.accessor(e.gltf,(function(e){var i=e.bufferView;t[i].target===de$x.ELEMENT_ARRAY_BUFFER&&!t$$(r[i])&&(r[i]=!0,n.enqueue({id:i,componentType:e.componentType}))}))}function Le$f(e,t){var i=t._loadResources,n=t.gltf.bufferViews[e],r=i.getBuffer(n);t._buffers[e]=r,t._geometryByteLength+=r.byteLength}function Be$i(e,t,i){var n=i._loadResources,r=i.gltf.bufferViews[e],o={typedArray:n.getBuffer(r),indexDatatype:t};i._buffers[e]=o,i._geometryByteLength+=o.typedArray.byteLength}function we$g(e){var t=e._loadResources;if(0===t.pendingBufferLoads){for(var i=t.vertexBuffersToCreate,n=t.indexBuffersToCreate;i.length>0;)Le$f(i.dequeue(),e);for(;n.length>0;){var r=n.dequeue();Be$i(r.id,r.componentType,e)}}}function Ae$e(e,t){var i=t.gltf.meshes[0].primitives[0],n=s$G.modifyShaderForQuantizedAttributes(t.gltf,i,e);return t._quantizedUniforms=n.uniforms,n.shader}function oe$n(e,t){return t$$(t)&&(e=t(e)),e}function De$o(e){var t=e.gltf,i=s$G.getAttributeOrUniformBySemantic(t,"POSITION"),n=s$G.getAttributeOrUniformBySemantic(t,"_BATCHID"),r={};r[i]=0,r[n]=1;var o,a,s=s$G.getAttributeOrUniformBySemantic(t,"MODELVIEWPROJECTION");if(t$$(s))o="uniform mat4 "+s+";\n",a=s+" * vec4("+i+", 1.0)";else{var l=s$G.getAttributeOrUniformBySemantic(t,"PROJECTION"),u=s$G.getAttributeOrUniformBySemantic(t,"MODELVIEW");t$$(u)||(u=s$G.getAttributeOrUniformBySemantic(t,"CESIUM_RTC_MODELVIEW")),o="uniform mat4 "+u+";\nuniform mat4 "+l+";\n",a=l+" * "+u+" * vec4("+i+", 1.0)"}var c="attribute vec3 "+i+";\nattribute float "+n+";\n"+o+"void main() {\n"+(" vec4 positionInClipCoords = "+a+";\n")+" gl_Position = czm_depthClampFarPlane(positionInClipCoords);\n}\n";e.extensionsUsed.WEB3D_quantized_attributes&&(c=Ae$e(c,e));var h=oe$n(c,e._vertexShaderLoaded),d=oe$n("#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nvoid main() \n{ \n gl_FragColor = vec4(1.0); \n czm_writeDepthClampedToFarPlane();\n}\n",e._classificationShaderLoaded);h=s$G.modifyVertexShaderForLogDepth(h,a),d=s$G.modifyFragmentShaderForLogDepth(d),e._shaderProgram={vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:r}}function Me$i(){return{POSITION:0,_BATCHID:1}}function Re$e(e){if(e._loadResources.finishedBuffersCreation()&&!t$$(e._vertexArray)){var t,i=e._buffers,n=e.gltf,r=n.accessors,o=n.meshes[0].primitives[0],a=Me$i(),s={};if(t$A.meshPrimitiveAttribute(o,(function(e,t){var o=a[t];if(t$$(o)){var l=r[e];s[t]={index:o,vertexBuffer:i[l.bufferView],componentsPerAttribute:r$t(l.type),componentDatatype:l.componentType,offsetInBytes:l.byteOffset,strideInBytes:p$O(n,l)}}})),t$$(o.indices)){var l=r[o.indices];t=i[l.bufferView]}e._vertexArray={attributes:s,indexBuffer:t}}}Object.defineProperties(w$K.prototype,{gltf:{get:function(){return this._gltf}},boundingSphere:{get:function(){if(this._state!==b$U.LOADED)throw new t$_("The model is not loaded. Use ClassificationModel.readyPromise or wait for ClassificationModel.ready to be true.");var e=this.modelMatrix,t=c$1a.getScale(e,Ie$i),i=this._scaledBoundingSphere;return i.center=a$11.multiplyComponents(this._boundingSphere.center,t,i.center),i.radius=a$11.maximumComponent(t)*this._initialRadius,t$$(this._rtcCenter)&&a$11.add(this._rtcCenter,i.center,i.center),i}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},dirty:{get:function(){return this._dirty}},extensionsUsed:{get:function(){return t$$(this._extensionsUsed)||(this._extensionsUsed=s$G.getUsedExtensions(this.gltf)),this._extensionsUsed}},extensionsRequired:{get:function(){return t$$(this._extensionsRequired)||(this._extensionsRequired=s$G.getRequiredExtensions(this.gltf)),this._extensionsRequired}},upAxis:{get:function(){return this._upAxis}},trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},texturesByteLength:{get:function(){return 0}},classificationType:{get:function(){return this._classificationType}}});var ne$l={PROJECTION:function(e,t){return s$G.getGltfSemanticUniforms().PROJECTION(e,t)},MODELVIEW:function(e,t){return s$G.getGltfSemanticUniforms().MODELVIEW(e,t)},CESIUM_RTC_MODELVIEW:function(e,t){return s$G.getGltfSemanticUniforms().CESIUM_RTC_MODELVIEW(e,t)},MODELVIEWPROJECTION:function(e,t){return s$G.getGltfSemanticUniforms().MODELVIEWPROJECTION(e,t)}};function Pe$i(e,t){if(!t$$(e._uniformMap)){var i={};t$A.technique(e.gltf,(function(n){t$A.techniqueUniform(n,(function(n,r){!t$$(n.semantic)||!t$$(ne$l[n.semantic])||(i[r]=ne$l[n.semantic](t.uniformState,e))}))})),e._uniformMap=i}}function Ue$c(e,t){return s$G.createUniformsForQuantizedAttributes(e.gltf,t,e._quantizedUniforms)}function Ve$e(e,t){switch(e.mode){case H$11.TRIANGLES:return t/3;case H$11.TRIANGLE_STRIP:case H$11.TRIANGLE_FAN:return Math.max(t-2,0);default:return 0}}function Ne$e(e){var t,i,n=e._batchTable,r=e._uniformMap,o=e._vertexArray,a=e.gltf,s=a.accessors,l=a.meshes[0].primitives[0],u=s[l.indices],c=l.attributes.POSITION,h=s$G.getAccessorMinMax(a,c),d=c$19.fromCornerPoints(a$11.fromArray(h.min),a$11.fromArray(h.max));t$$(u)?(i=u.count,t=u.byteOffset/fe$u.getSizeInBytes(u.componentType)):(i=s[l.attributes.POSITION].count,t=0);(e._trianglesLength+=Ve$e(l,i),t$$(e._uniformMapLoaded)&&(r=e._uniformMapLoaded(r)),e.extensionsUsed.WEB3D_quantized_attributes)&&(r=s$1n(r,Ue$c(e,l)));var f=o.attributes.POSITION,p=f.componentDatatype,_=f.vertexBuffer,m=_.byteOffset,$=_.byteLength/C$12.getSizeInBytes(p),g=C$12.createArrayBufferView(p,_.buffer,m,$);p=(f=o.attributes._BATCHID).componentDatatype,m=(_=f.vertexBuffer).byteOffset,$=_.byteLength/C$12.getSizeInBytes(p);var y,v=C$12.createArrayBufferView(p,_.buffer,m,$),x=o.indexBuffer.typedArray;y=o.indexBuffer.indexDatatype===fe$u.UNSIGNED_SHORT?new Uint16Array(x.buffer,x.byteOffset,x.byteLength/Uint16Array.BYTES_PER_ELEMENT):new Uint32Array(x.buffer,x.byteOffset,x.byteLength/Uint32Array.BYTES_PER_ELEMENT),g=l$Z(g);var b=[],S=[],w=[],C=[],T=(v=l$Z(v))[(y=l$Z(y,t,t+i))[0]];b.push(T),w.push(0);for(var P,E,A,L=y.length,M=1;M<L;++M)(P=v[y[M]])!==T&&(A=M-(E=w[w.length-1]),b.push(P),S.push(A),w.push(M),C.push(new s$F({offset:E,count:A,batchIds:[T],color:e$1z.WHITE})),T=P);A=L-(E=w[w.length-1]),S.push(A),C.push(new s$F({offset:E,count:A,batchIds:[T],color:e$1z.WHITE}));var I=e._shaderProgram,O=I.vertexShaderSource,D=I.fragmentShaderSource,R=I.attributeLocations,N=t$$(e._pickIdLoaded)?e._pickIdLoaded():void 0;e._primitive=new T$H({classificationType:e._classificationType,positions:g,indices:y,indexOffsets:w,indexCounts:S,batchIds:b,vertexBatchIds:v,batchedIndices:C,batchTable:n,boundingVolume:new c$19,_vertexShaderSource:O,_fragmentShaderSource:D,_attributeLocations:R,_uniformMap:r,_pickId:N,_modelMatrix:new c$1a,_boundingSphere:d}),e._buffers=void 0,e._vertexArray=void 0,e._shaderProgram=void 0,e._uniformMap=void 0}function qe$c(e){if(e._loadResources.finished()&&!t$$(e._primitive)){var t=e.gltf.nodes[0];e._nodeMatrix=s$G.getTransform(t,e._nodeMatrix),Ne$e(e)}}function se$i(e,t){var i=t.context;s$G.checkSupportedGlExtensions(e.gltf.glExtensionsUsed,i),we$g(e),De$o(e),Re$e(e),Pe$i(e,i),qe$c(e)}var We$g=new a$10,Z$C=new c$1a;function Fe$b(e,t,i,n){var r=e._computedModelMatrix;if(e._mode!==b$1d.SCENE3D&&!e._ignoreCommands){var o=c$1a.getColumn(r,3,We$g);if(a$10.equals(o,a$10.UNIT_W)){var a=e.boundingSphere.center,s=m$13.wgs84To2DModelMatrix(n,a,Z$C);r=c$1a.multiply(s,r,Z$C),t$$(e._rtcCenter)&&(c$1a.setTranslation(r,a$10.UNIT_W,r),e._rtcCenter=e._rtcCenter2D)}else r=m$13.basisTo2D(n,r,Z$C),e._rtcCenter=e._rtcCenter3D}var l=e._primitive;(t||i)&&(c$1a.multiplyTransformation(r,e._nodeMatrix,l._modelMatrix),c$19.transform(l._boundingSphere,l._modelMatrix,l._boundingVolume),t$$(e._rtcCenter)&&a$11.add(e._rtcCenter,l._boundingVolume.center,l._boundingVolume.center))}function t$x(e,t){n$1e.typeOf.object("normal",e),n$1e.typeOf.number("distance",t),this._distance=t,this._normal=new c$E(e,this),this.onChangeCallback=void 0,this.index=-1}function c$E(e,t){this._clippingPlane=t,this._cartesian3=a$11.clone(e)}function l$G(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._planes=[],this._dirtyIndex=-1,this._multipleDirtyPlanes=!1,this._enabled=e$1Y(e.enabled,!0),this.modelMatrix=c$1a.clone(e$1Y(e.modelMatrix,c$1a.IDENTITY)),this.edgeColor=e$1z.clone(e$1Y(e.edgeColor,e$1z.WHITE)),this.edgeWidth=e$1Y(e.edgeWidth,0),this.planeAdded=new o$15,this.planeRemoved=new o$15,this._owner=void 0;var t=e$1Y(e.unionClippingRegions,!1);this._unionClippingRegions=t,this._testIntersection=t?C$F:I$K,this._uint8View=void 0,this._float32View=void 0,this._clippingPlanesTexture=void 0;var i=e.planes;if(t$$(i))for(var n=i.length,r=0;r<n;++r)this.add(i[r])}function C$F(e){return e===cr$4.OUTSIDE}function I$K(e){return e===cr$4.INSIDE}function D$I(e,t){e._multipleDirtyPlanes=e._multipleDirtyPlanes||-1!==e._dirtyIndex&&e._dirtyIndex!==t,e._dirtyIndex=t}function R$x(e,t){for(var i=e.length,n=0;n<i;++n)if(n$17.equals(e[n],t))return n;return-1}w$K.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},w$K.prototype.update=function(e){if(e.mode!==b$1d.MORPHING){var t=o$$.supportsWebPSync();if(t$$(t)){if(this._state===b$U.NEEDS_LOAD&&t$$(this.gltf)&&(this._state=b$U.LOADING,this._state!==b$U.FAILED)){var i=this.gltf.extensions;if(t$$(i)&&t$$(i.CESIUM_RTC)){var n=a$11.fromArray(i.CESIUM_RTC.center);if(!a$11.equals(n,a$11.ZERO)){this._rtcCenter3D=n;var r=e.mapProjection,o=r.ellipsoid.cartesianToCartographic(this._rtcCenter3D),a=r.project(o);a$11.fromElements(a.z,a.x,a.y,a),this._rtcCenter2D=a,this._rtcCenterEye=new a$11,this._rtcCenter=this._rtcCenter3D}}this._loadResources=new t$y,s$G.parseBuffers(this)}var s=this._loadResources,l=!1;this._state===b$U.LOADING&&(0===s.pendingBufferLoads&&(s$G.checkSupportedExtensions(this.extensionsRequired,t),Ce$i(this),Oe$i(this),this._boundingSphere=s$G.computeBoundingSphere(this),this._initialRadius=this._boundingSphere.radius,se$i(this,e)),s.finished()&&(this._state=b$U.LOADED,l=!0)),t$$(s)&&this._state===b$U.LOADED&&(l||se$i(this,e),s.finished()&&(this._loadResources=void 0));var u=this.show;if(u&&this._state===b$U.LOADED||l){this._dirty=!1;var c=this.modelMatrix,h=e.mode!==this._mode;this._mode=e.mode;var d=!c$1a.equals(this._modelMatrix,c)||h;if(d||l){c$1a.clone(c,this._modelMatrix);var f=this._computedModelMatrix;c$1a.clone(c,f),this._upAxis===z$y.Y?c$1a.multiplyTransformation(f,z$y.Y_UP_TO_Z_UP,f):this._upAxis===z$y.X&&c$1a.multiplyTransformation(f,z$y.X_UP_TO_Z_UP,f)}(d||l)&&(Fe$b(this,d,l,e.mapProjection),this._dirty=!0)}if(l){var p=this;return void e.afterRender.push((function(){p._ready=!0,p._readyPromise.resolve(p)}))}u&&!this._ignoreCommands&&(this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.debugWireframe=this.debugWireframe,this._primitive.update(e))}}},w$K.prototype.isDestroyed=function(){return!1},w$K.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),s$1e(this)},Object.defineProperties(t$x.prototype,{distance:{get:function(){return this._distance},set:function(e){n$1e.typeOf.number("value",e),t$$(this.onChangeCallback)&&e!==this._distance&&this.onChangeCallback(this.index),this._distance=e}},normal:{get:function(){return this._normal},set:function(e){n$1e.typeOf.object("value",e),t$$(this.onChangeCallback)&&!a$11.equals(this._normal._cartesian3,e)&&this.onChangeCallback(this.index),a$11.clone(e,this._normal._cartesian3)}}}),t$x.fromPlane=function(e,t){return n$1e.typeOf.object("plane",e),t$$(t)?(t.normal=e.normal,t.distance=e.distance):t=new t$x(e.normal,e.distance),t},t$x.clone=function(e,t){return t$$(t)?(t.normal=e.normal,t.distance=e.distance,t):new t$x(e.normal,e.distance)},Object.defineProperties(c$E.prototype,{x:{get:function(){return this._cartesian3.x},set:function(e){n$1e.typeOf.number("value",e),t$$(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.x&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.x=e}},y:{get:function(){return this._cartesian3.y},set:function(e){n$1e.typeOf.number("value",e),t$$(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.y&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.y=e}},z:{get:function(){return this._cartesian3.z},set:function(e){n$1e.typeOf.number("value",e),t$$(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.z&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.z=e}}}),Object.defineProperties(l$G.prototype,{length:{get:function(){return this._planes.length}},unionClippingRegions:{get:function(){return this._unionClippingRegions},set:function(e){this._unionClippingRegions!==e&&(this._unionClippingRegions=e,this._testIntersection=e?C$F:I$K)}},enabled:{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(this._enabled=e)}},texture:{get:function(){return this._clippingPlanesTexture}},owner:{get:function(){return this._owner}},clippingPlanesState:{get:function(){return this._unionClippingRegions?this._planes.length:-this._planes.length}}}),l$G.prototype.add=function(e){var t=this._planes.length,i=this;e.onChangeCallback=function(e){D$I(i,e)},e.index=t,D$I(this,t),this._planes.push(e),this.planeAdded.raiseEvent(e,t)},l$G.prototype.get=function(e){return n$1e.typeOf.number("index",e),this._planes[e]},l$G.prototype.contains=function(e){return-1!==R$x(this._planes,e)},l$G.prototype.remove=function(e){var t=this._planes,i=R$x(t,e);if(-1===i)return!1;e instanceof t$x&&(e.onChangeCallback=void 0,e.index=-1);for(var n=t.length-1,r=i;r<n;++r){var o=t[r+1];t[r]=o,o instanceof t$x&&(o.index=r)}return this._multipleDirtyPlanes=!0,t.length=n,this.planeRemoved.raiseEvent(e,i),!0},l$G.prototype.removeAll=function(){for(var e=this._planes,t=e.length,i=0;i<t;++i){var n=e[i];n instanceof t$x&&(n.onChangeCallback=void 0,n.index=-1),this.planeRemoved.raiseEvent(n,i)}this._multipleDirtyPlanes=!0,this._planes=[]};var W$J=new a$10,L$E=new a$10;function V$u(e,t,i){for(var n=e._uint8View,r=e._planes,o=0,a=t;a<i;++a){var s=r[a],l=r$P.octEncodeToCartesian4(s.normal,L$E);n[o]=l.x,n[o+1]=l.y,n[o+2]=l.z,n[o+3]=l.w;var u=a$10.packFloat(s.distance,W$J);n[o+4]=u.x,n[o+5]=u.y,n[o+6]=u.z,n[o+7]=u.w,o+=8}}function F$C(e,t,i){for(var n=e._float32View,r=e._planes,o=0,a=t;a<i;++a){var s=r[a],l=s.normal;n[o]=l.x,n[o+1]=l.y,n[o+2]=l.z,n[o+3]=s.distance,o+=4}}function b$T(e,t){var i=e$1y.maximumTextureSize;return t.x=Math.min(e,i),t.y=Math.ceil(e/t.x),t}var j$F=new r$T;l$G.prototype.update=function(e){var t=this._clippingPlanesTexture,i=e.context,n=l$G.useFloatTexture(i),r=n?this.length:2*this.length;if(t$$(t)){var o=t.width*t.height;(o<r||r<.25*o)&&(t.destroy(),t=void 0,this._clippingPlanesTexture=void 0)}if(0!==this.length){if(!t$$(t)){var a=b$T(r,j$F);a.y*=2;var s=new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST});n?(t=new P$S({context:i,width:a.x,height:a.y,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.FLOAT,sampler:s,flipY:!1}),this._float32View=new Float32Array(a.x*a.y*4)):(t=new P$S({context:i,width:a.x,height:a.y,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE,sampler:s,flipY:!1}),this._uint8View=new Uint8Array(a.x*a.y*4)),this._clippingPlanesTexture=t,this._multipleDirtyPlanes=!0}var l=this._dirtyIndex;if(this._multipleDirtyPlanes||-1!==l){if(this._multipleDirtyPlanes)n?(F$C(this,0,this._planes.length),t.copyFrom({width:t.width,height:t.height,arrayBufferView:this._float32View})):(V$u(this,0,this._planes.length),t.copyFrom({width:t.width,height:t.height,arrayBufferView:this._uint8View}));else{var u=0,c=0;n?(c=Math.floor(l/t.width),u=Math.floor(l-c*t.width),F$C(this,l,l+1),t.copyFrom({width:1,height:1,arrayBufferView:this._float32View},u,c)):(c=Math.floor(2*l/t.width),u=Math.floor(2*l-c*t.width),V$u(this,l,l+1),t.copyFrom({width:2,height:1,arrayBufferView:this._uint8View},u,c))}this._multipleDirtyPlanes=!1,this._dirtyIndex=-1}}};var H$C=new c$1a,A$I=new n$17(a$11.UNIT_X,0);l$G.prototype.computeIntersectionWithBoundingVolume=function(e,t){var i=this._planes,n=i.length,r=this.modelMatrix;t$$(t)&&(r=c$1a.multiply(t,r,H$C));var o=cr$4.INSIDE;!this.unionClippingRegions&&n>0&&(o=cr$4.OUTSIDE);for(var a=0;a<n;++a){var s=i[a];n$17.transform(s,r,A$I);var l=e.intersectPlane(A$I);if(l===cr$4.INTERSECTING)o=l;else if(this._testIntersection(l))return l}return o},l$G.setOwner=function(e,t,i){if(e!==t[i]&&(t[i]=t[i]&&t[i].destroy(),t$$(e))){if(t$$(e._owner))throw new t$_("ClippingPlaneCollection should only be assigned to one object");e._owner=t,t[i]=e}},l$G.useFloatTexture=function(e){return e.floatingPointTexture},l$G.getTextureResolution=function(e,t,i){var n=e.texture;if(t$$(n))return i.x=n.width,i.y=n.height,i;var r=b$T(l$G.useFloatTexture(t)?e.length:2*e.length,i);return r.y*=2,r},l$G.prototype.isDestroyed=function(){return!1},l$G.prototype.destroy=function(){return this._clippingPlanesTexture=this._clippingPlanesTexture&&this._clippingPlanesTexture.destroy(),s$1e(this)};var e$X={HIGHLIGHT:0,REPLACE:1,MIX:2,getColorBlend:function(e,t){return e===e$X.HIGHLIGHT?0:e===e$X.REPLACE?1:e===e$X.MIX?n$1d.clamp(t,n$1d.EPSILON4,1):void 0}},I$J=Object.freeze(e$X);function r$s(){}function b$S(e,t){var i="runtime."+Object.keys(e.createdBufferViews).length,n=e.buffers,r=Object.keys(n).length;return n[r]=t,e.createdBufferViews[i]={buffer:r,byteOffset:0,byteLength:t.byteLength},i}function k$z(e,t,i){var n=t._loadResources,r=b$S(n,e);return n.vertexBuffersToCreate.enqueue(r),r}function P$z(e,t,i){var n=e.typedArray,r=t._loadResources,o=b$S(r,n);return r.indexBuffersToCreate.enqueue({id:o,componentType:C$12.fromTypedArray(n)}),{bufferViewId:o,numberOfIndices:e.numberOfIndices}}function C$E(e,t,i,n){if(r$s._taskProcessorReady){var r=i.primitivesToDecode.peek();if(t$$(r)){var o=e.scheduleTask(r,[r.array.buffer]);if(t$$(o))return i.activeDecodingTasks++,i.primitivesToDecode.dequeue(),o.then((function(e){i.activeDecodingTasks--;var n=P$z(e.indexArray,t),o={},a=e.attributeData;for(var s in a)if(a.hasOwnProperty(s)){var l=a[s],u=k$z(l.array,t),c=l.data;c.bufferView=u,o[s]=c}t._decodedData[r.mesh+".primitive."+r.primitive]={bufferView:n.bufferViewId,numberOfIndices:n.numberOfIndices,attributes:o}}))}}}function a$z(e,t,i){return n$1e.typeOf.string("samplerUniformName",e),n$1e.typeOf.string("matrixUniformName",t),n$1e.typeOf.string("styleUniformName",i)," float clipDistance = clip(gl_FragCoord, "+e+", "+t+"); \n vec4 clippingPlanesEdgeColor = vec4(1.0); \n clippingPlanesEdgeColor.rgb = "+i+".rgb; \n float clippingPlanesEdgeWidth = "+i+".a; \n if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth) \n { \n gl_FragColor = clippingPlanesEdgeColor;\n } \n"}r$s._maxDecodingConcurrency=Math.max(o$$.hardwareConcurrency-1,1),r$s._decoderTaskProcessor=void 0,r$s._taskProcessorReady=!1,r$s._getDecoderTaskProcessor=function(){if(!t$$(r$s._decoderTaskProcessor)){var e=new o$_("decodeDraco",r$s._maxDecodingConcurrency);e.initWebAssemblyModule({modulePath:"ThirdParty/Workers/draco_wasm_wrapper.js",wasmBinaryFile:"ThirdParty/draco_decoder.wasm",fallbackModulePath:"ThirdParty/Workers/draco_decoder.js"}).then((function(){r$s._taskProcessorReady=!0})),r$s._decoderTaskProcessor=e}return r$s._decoderTaskProcessor},r$s.hasExtension=function(e){return t$$(e.extensionsRequired.KHR_draco_mesh_compression)||t$$(e.extensionsUsed.KHR_draco_mesh_compression)},r$s._decodedModelResourceCache=void 0,r$s.parse=function(e,t){if(r$s.hasExtension(e)){var i=e._loadResources,n=e.cacheKey;if(t$$(n)){t$$(r$s._decodedModelResourceCache)||(t$$(t.cache.modelDecodingCache)||(t.cache.modelDecodingCache={}),r$s._decodedModelResourceCache=t.cache.modelDecodingCache);var r=r$s._decodedModelResourceCache[n];if(t$$(r))return r.count++,void(i.pendingDecodingCache=!0)}var o=e._dequantizeInShader,a=e.gltf;t$A.mesh(a,(function(e,t){t$A.meshPrimitive(e,(function(e,n){if(t$$(e.extensions)){var r=e.extensions.KHR_draco_mesh_compression;if(t$$(r)){var s=a.bufferViews[r.bufferView],l=l$Z(a.buffers[s.buffer].extras._pipeline.source,s.byteOffset,s.byteOffset+s.byteLength);i.primitivesToDecode.enqueue({mesh:t,primitive:n,array:l,bufferView:s,compressedAttributes:r.attributes,dequantizeInShader:o})}}}))}))}},r$s.decodeModel=function(e,t){if(!r$s.hasExtension(e))return c$18.resolve();var i=e._loadResources,n=e.cacheKey;if(t$$(n)&&t$$(r$s._decodedModelResourceCache)){var r=r$s._decodedModelResourceCache[n];if(t$$(r)&&i.pendingDecodingCache)return c$18(r.ready,(function(){e._decodedData=r.data,i.pendingDecodingCache=!1}));r$s._decodedModelResourceCache[n]={ready:!1,count:1,data:void 0}}if(0===i.primitivesToDecode.length)return c$18.resolve();for(var o=r$s._getDecoderTaskProcessor(),a=[],s=C$E(o,e,i);t$$(s);)a.push(s),s=C$E(o,e,i);return c$18.all(a)},r$s.decodePointCloud=function(e){var t=r$s._getDecoderTaskProcessor();if(r$s._taskProcessorReady)return t.scheduleTask(e,[e.buffer.buffer])},r$s.cacheDataForModel=function(e){var t=e.cacheKey;if(t$$(t)&&t$$(r$s._decodedModelResourceCache)){var i=r$s._decodedModelResourceCache[t];t$$(i)&&(i.ready=!0,i.data=e._decodedData)}},r$s.destroyCachedDataForModel=function(e){var t=e.cacheKey;if(t$$(t)&&t$$(r$s._decodedModelResourceCache)){var i=r$s._decodedModelResourceCache[t];t$$(i)&&0==--i.count&&delete r$s._decodedModelResourceCache[t]}};var s$D=new r$T;function f$F(e,t){n$1e.typeOf.object("clippingPlaneCollection",e),n$1e.typeOf.object("context",t);var i=e.unionClippingRegions,n=e.length,r=l$G.useFloatTexture(t),o=l$G.getTextureResolution(e,t,s$D),a=o.x,s=o.y,l=r?d$E(a,s):x$H(a,s);return l+="\n",l+=i?g$v(n):P$y(n)}function g$v(e){return"float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)\n{\n vec4 position = czm_windowToEyeCoordinates(fragCoord);\n vec3 clipNormal = vec3(0.0);\n vec3 clipPosition = vec3(0.0);\n float clipAmount;\n float pixelWidth = czm_metersPerPixel(position);\n bool breakAndDiscard = false;\n for (int i = 0; i < "+e+"; ++i)\n {\n vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);\n clipNormal = clippingPlane.xyz;\n clipPosition = -clippingPlane.w * clipNormal;\n float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;\n clipAmount = czm_branchFreeTernary(i == 0, amount, min(amount, clipAmount));\n if (amount <= 0.0)\n {\n breakAndDiscard = true;\n break;\n }\n }\n if (breakAndDiscard) {\n discard;\n }\n return clipAmount;\n}\n"}function P$y(e){return"float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)\n{\n bool clipped = true;\n vec4 position = czm_windowToEyeCoordinates(fragCoord);\n vec3 clipNormal = vec3(0.0);\n vec3 clipPosition = vec3(0.0);\n float clipAmount = 0.0;\n float pixelWidth = czm_metersPerPixel(position);\n for (int i = 0; i < "+e+"; ++i)\n {\n vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);\n clipNormal = clippingPlane.xyz;\n clipPosition = -clippingPlane.w * clipNormal;\n float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;\n clipAmount = max(amount, clipAmount);\n clipped = clipped && (amount <= 0.0);\n }\n if (clipped)\n {\n discard;\n }\n return clipAmount;\n}\n"}function d$E(e,t){var i=1/t,n=1/e+"";-1===n.indexOf(".")&&(n+=".0");var r=i+"";return-1===r.indexOf(".")&&(r+=".0"),"vec4 getClippingPlane(sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)\n{\n int pixY = clippingPlaneNumber / "+e+";\n int pixX = clippingPlaneNumber - (pixY * "+e+");\n float u = (float(pixX) + 0.5) * "+n+";\n float v = (float(pixY) + 0.5) * "+r+";\n vec4 plane = texture2D(packedClippingPlanes, vec2(u, v));\n return czm_transformPlane(plane, transform);\n}\n"}function x$H(e,t){var i=1/t,n=1/e+"";-1===n.indexOf(".")&&(n+=".0");var r=i+"";return-1===r.indexOf(".")&&(r+=".0"),"vec4 getClippingPlane(sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)\n{\n int clippingPlaneStartIndex = clippingPlaneNumber * 2;\n int pixY = clippingPlaneStartIndex / "+e+";\n int pixX = clippingPlaneStartIndex - (pixY * "+e+");\n float u = (float(pixX) + 0.5) * "+n+";\n float v = (float(pixY) + 0.5) * "+r+";\n vec4 oct32 = texture2D(packedClippingPlanes, vec2(u, v)) * 255.0;\n vec2 oct = vec2(oct32.x * 256.0 + oct32.y, oct32.z * 256.0 + oct32.w);\n vec4 plane;\n plane.xyz = czm_octDecode(oct, 65535.0);\n plane.w = czm_unpackFloat(texture2D(packedClippingPlanes, vec2(u + "+n+", v)));\n return czm_transformPlane(plane, transform);\n}\n"}var e$W={TEXTURE:0,PROGRAM:1,BUFFER:2,NUMBER_OF_JOB_TYPES:3},i$E=Object.freeze(e$W);function h$H(){}var P$x=/^data\:/i;function d$D(e,t){var i=e.gltf,n=i.buffers,r=i.bufferViews[t.bufferView],o=n[r.buffer],a=r.byteOffset+t.byteOffset,s=t.count*r$t(t.type),l=P$x.test(o.uri)?"":o.uri;return e.cacheKey+"//"+l+"/"+a+"/"+s}var x$G={};h$H.getAnimationParameterValues=function(e,t){var i=d$D(e,t),n=x$G[i];if(!t$$(n)){var r=e.gltf,o=r.buffers,a=r.bufferViews[t.bufferView],s=o[a.buffer].extras._pipeline.source,l=t.componentType,u=t.type,c=r$t(u),h=t.count,d=p$O(r,t);n=new Array(h);for(var f=e$1Y(t.byteOffset,0),p=a.byteOffset+f,_=0;_<h;_++){var m=C$12.createArrayBufferView(l,s.buffer,s.byteOffset+p,c);"SCALAR"===u?n[_]=m[0]:"VEC3"===u?n[_]=a$11.fromArray(m):"VEC4"===u&&(n[_]=a$U.unpack(m)),p+=d}t$$(e.cacheKey)&&(x$G[i]=n)}return n};var B$u={};function D$H(e,t,i){return e.cacheKey+"//"+t+"/"+i}function O$x(e){this._value=e}O$x.prototype.evaluate=function(e,t){return this._value},O$x.prototype.wrapTime=function(e){return 0},O$x.prototype.clampTime=function(e){return 0},h$H.getAnimationSpline=function(e,t,i,n,r,o,a,s){var l=D$H(e,t,n),u=B$u[l];if(!t$$(u)){var c=o,h=s;1===c.length&&1===h.length?u=new O$x(h[0]):"LINEAR"===r.interpolation&&("translation"===a||"scale"===a?u=new o$X({times:c,points:h}):"rotation"===a?u=new n$R({times:c,points:h}):"weights"===a&&(u=new r$x({times:c,weights:h}))),t$$(e.cacheKey)&&(B$u[l]=u)}return u};var C$D={};h$H.getSkinInverseBindMatrices=function(e,t){var i=d$D(e,t),n=C$D[i];if(!t$$(n)){var r=e.gltf,o=r.buffers,a=r.bufferViews[t.bufferView],s=o[a.buffer].extras._pipeline.source,l=t.componentType,u=t.type,c=t.count,h=p$O(r,t),d=a.byteOffset+t.byteOffset,f=r$t(u);if(n=new Array(c),l===de$x.FLOAT&&u===N$G.MAT4)for(var p=0;p<c;++p){var _=C$12.createArrayBufferView(l,s.buffer,s.byteOffset+d,f);n[p]=c$1a.fromArray(_),d+=h}C$D[i]=n}return n};var e$V={NONE:0,REPEAT:1,MIRRORED_REPEAT:2},_0x1f6ea1=Object.freeze(e$V),c$D=Object.freeze({STOPPED:0,ANIMATING:1});function o$z(e,t,i){this._name=i.name,this._startTime=o$10.clone(e.startTime),this._delay=e$1Y(e.delay,0),this._stopTime=e.stopTime,this.removeOnStop=e$1Y(e.removeOnStop,!1),this._multiplier=e$1Y(e.multiplier,1),this._reverse=e$1Y(e.reverse,!1),this._loop=e$1Y(e.loop,_0x1f6ea1.NONE),this.start=new o$15,this.update=new o$15,this.stop=new o$15,this._state=c$D.STOPPED,this._runtimeAnimation=i,this._computedStartTime=void 0,this._duration=void 0;var n=this;this._raiseStartEvent=function(){n.start.raiseEvent(t,n)},this._updateEventTime=0,this._raiseUpdateEvent=function(){n.update.raiseEvent(t,n,n._updateEventTime)},this._raiseStopEvent=function(){n.stop.raiseEvent(t,n)}}function d$C(e){this.animationAdded=new o$15,this.animationRemoved=new o$15,this._model=e,this._scheduledAnimations=[],this._previousTime=void 0}function w$J(e,t,i){var n=e._model,r=new o$z(i,n,n._runtime.animations[t]);return e._scheduledAnimations.push(r),e.animationAdded.raiseEvent(n,r),r}function N$B(e,t){for(var i=e.channelEvaluators,n=i.length,r=0;r<n;++r)i[r](t)}Object.defineProperties(o$z.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}},reverse:{get:function(){return this._reverse}},loop:{get:function(){return this._loop}}}),Object.defineProperties(d$C.prototype,{length:{get:function(){return this._scheduledAnimations.length}}}),d$C.prototype.add=function(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT);var t=this._model._runtime.animations;if(!t$$(t))throw new t$_("Animations are not loaded. Wait for Model.readyPromise to resolve.");if(!t$$(e.name)&&!t$$(e.index))throw new t$_("Either options.name or options.index must be defined.");if(t$$(e.multiplier)&&e.multiplier<=0)throw new t$_("options.multiplier must be greater than zero.");if(t$$(e.index)&&(e.index>=t.length||e.index<0))throw new t$_("options.index must be a valid animation index.");if(t$$(e.index))return w$J(this,e.index,e);for(var i,n=t.length,r=0;r<n;++r)if(t[r].name===e.name){i=r;break}if(!t$$(i))throw new t$_("options.name must be a valid animation name.");return w$J(this,i,e)},d$C.prototype.addAll=function(e){if(e=e$1Y(e,e$1Y.EMPTY_OBJECT),!t$$(this._model._runtime.animations))throw new t$_("Animations are not loaded. Wait for Model.readyPromise to resolve.");if(t$$(e.multiplier)&&e.multiplier<=0)throw new t$_("options.multiplier must be greater than zero.");for(var t=[],i=this._model._runtime.animations.length,n=0;n<i;++n)t.push(w$J(this,n,e));return t},d$C.prototype.remove=function(e){if(t$$(e)){var t=this._scheduledAnimations,i=t.indexOf(e);if(-1!==i)return t.splice(i,1),this.animationRemoved.raiseEvent(this._model,e),!0}return!1},d$C.prototype.removeAll=function(){var e=this._model,t=this._scheduledAnimations,i=t.length;this._scheduledAnimations=[];for(var n=0;n<i;++n)this.animationRemoved.raiseEvent(e,t[n])},d$C.prototype.contains=function(e){return!!t$$(e)&&-1!==this._scheduledAnimations.indexOf(e)},d$C.prototype.get=function(e){if(!t$$(e))throw new t$_("index is required.");return this._scheduledAnimations[e]};var T$G=[];function q$K(e,t,i){return function(){e.animationRemoved.raiseEvent(t,i)}}function a$y(e,t,i){this._name=t.name,this._id=i,this._uniformMap=e._uniformMaps[i],this._technique=void 0,this._program=void 0,this._values=void 0}function n$F(e,t,i){for(var n=[],r=e.primitives,o=r.length,a=0;a<o;++a){var s=r[a];n[a]=t[s.material]}this._name=e.name,this._materials=n,this._id=i}function r$r(e,t,i,n,r){this._model=e,this._runtimeNode=i,this._name=t.name,this._id=n,this.useMatrix=!1,this._show=!0,this._matrix=c$1a.clone(r),this._originalMatrix=c$1a.clone(r)}function t$w(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this.vertexArray=e.vertexArray,this.fragmentShaderSource=e.fragmentShaderSource,this.shaderProgram=e.shaderProgram,this.uniformMap=e.uniformMap,this.outputTexture=e.outputTexture,this.preExecute=e.preExecute,this.postExecute=e.postExecute,this.persists=e$1Y(e.persists,!1),this.pass=we$l.COMPUTE,this.renderState=e.renderState,this.clear=e$1Y(e.clear,!0),this.owner=e.owner}d$C.prototype.update=function(e){var t=this._scheduledAnimations,i=t.length;if(0===i)return this._previousTime=void 0,!1;if(o$10.equals(e.time,this._previousTime))return!1;this._previousTime=o$10.clone(e.time,this._previousTime);for(var n=!1,r=e.time,o=this._model,a=0;a<i;++a){var s=t[a],l=s._runtimeAnimation;t$$(s._computedStartTime)||(s._computedStartTime=o$10.addSeconds(e$1Y(s.startTime,r),s.delay,new o$10)),t$$(s._duration)||(s._duration=l.stopTime*(1/s.multiplier));var u=s._computedStartTime,c=s._duration,h=s.stopTime,d=0!==c?o$10.secondsDifference(r,u)/c:0,f=d>=0,p=s.loop===_0x1f6ea1.REPEAT||s.loop===_0x1f6ea1.MIRRORED_REPEAT;if((f||p&&!t$$(s.startTime))&&(d<=1||p)&&(!t$$(h)||o$10.lessThanOrEquals(r,h))){if(s._state===c$D.STOPPED&&(s._state=c$D.ANIMATING,s.start.numberOfListeners>0&&e.afterRender.push(s._raiseStartEvent)),s.loop===_0x1f6ea1.REPEAT)d-=Math.floor(d);else if(s.loop===_0x1f6ea1.MIRRORED_REPEAT){var _=Math.floor(d),m=d-_;d=_%2==1?1-m:m}s.reverse&&(d=1-d);var $=d*c*s.multiplier;N$B(l,$=n$1d.clamp($,l.startTime,l.stopTime)),s.update.numberOfListeners>0&&(s._updateEventTime=$,e.afterRender.push(s._raiseUpdateEvent)),n=!0}else f&&s._state===c$D.ANIMATING&&(s._state=c$D.STOPPED,s.stop.numberOfListeners>0&&e.afterRender.push(s._raiseStopEvent),s.removeOnStop&&T$G.push(s))}i=T$G.length;for(var g=0;g<i;++g){var y=T$G[g];t.splice(t.indexOf(y),1),e.afterRender.push(q$K(this,o,y))}return T$G.length=0,n},Object.defineProperties(a$y.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}}}),a$y.prototype.setValue=function(e,t){if(!t$$(e))throw new t$_("name is required.");var i="u_"+e,n=this._uniformMap.values[i];if(!t$$(n))throw new t$_("name must match a parameter name in the material's technique that is targetable and not optimized out.");n.value=n.clone(t,n.value)},a$y.prototype.getValue=function(e){if(!t$$(e))throw new t$_("name is required.");var t="u_"+e,i=this._uniformMap.values[t];if(t$$(i))return i.value},Object.defineProperties(n$F.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},materials:{get:function(){return this._materials}}}),Object.defineProperties(r$r.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,this._model._perNodeShowDirty=!0)}},matrix:{get:function(){return this._matrix},set:function(e){this._matrix=c$1a.clone(e,this._matrix),this.useMatrix=!0;var t=this._model;t._cesiumAnimationsDirty=!0,this._runtimeNode.dirtyNumber=t._maxDirtyNumber}},originalMatrix:{get:function(){return this._originalMatrix}}}),r$r.prototype.setMatrix=function(e){c$1a.clone(e,this._matrix)},t$w.prototype.execute=function(e){e.execute(this)};var z$w="varying vec2 v_textureCoordinates;\nuniform float originalSize;\nuniform sampler2D texture0;\nuniform sampler2D texture1;\nuniform sampler2D texture2;\nuniform sampler2D texture3;\nuniform sampler2D texture4;\nuniform sampler2D texture5;\nconst float yMipLevel1 = 1.0 - (1.0 / pow(2.0, 1.0));\nconst float yMipLevel2 = 1.0 - (1.0 / pow(2.0, 2.0));\nconst float yMipLevel3 = 1.0 - (1.0 / pow(2.0, 3.0));\nconst float yMipLevel4 = 1.0 - (1.0 / pow(2.0, 4.0));\nvoid main()\n{\nvec2 uv = v_textureCoordinates;\nvec2 textureSize = vec2(originalSize * 1.5 + 2.0, originalSize);\nvec2 pixel = 1.0 / textureSize;\nfloat mipLevel = 0.0;\nif (uv.x - pixel.x > (textureSize.y / textureSize.x))\n{\nmipLevel = 1.0;\nif (uv.y - pixel.y > yMipLevel1)\n{\nmipLevel = 2.0;\nif (uv.y - pixel.y * 3.0 > yMipLevel2)\n{\nmipLevel = 3.0;\nif (uv.y - pixel.y * 5.0 > yMipLevel3)\n{\nmipLevel = 4.0;\nif (uv.y - pixel.y * 7.0 > yMipLevel4)\n{\nmipLevel = 5.0;\n}\n}\n}\n}\n}\nif (mipLevel > 0.0)\n{\nfloat scale = pow(2.0, mipLevel);\nuv.y -= (pixel.y * (mipLevel - 1.0) * 2.0);\nuv.x *= ((textureSize.x - 2.0) / textureSize.y);\nuv.x -= 1.0 + pixel.x;\nuv.y -= (1.0 - (1.0 / pow(2.0, mipLevel - 1.0)));\nuv *= scale;\n}\nelse\n{\nuv.x *= (textureSize.x / textureSize.y);\n}\nif(mipLevel == 0.0)\n{\ngl_FragColor = texture2D(texture0, uv);\n}\nelse if(mipLevel == 1.0)\n{\ngl_FragColor = texture2D(texture1, uv);\n}\nelse if(mipLevel == 2.0)\n{\ngl_FragColor = texture2D(texture2, uv);\n}\nelse if(mipLevel == 3.0)\n{\ngl_FragColor = texture2D(texture3, uv);\n}\nelse if(mipLevel == 4.0)\n{\ngl_FragColor = texture2D(texture4, uv);\n}\nelse if(mipLevel == 5.0)\n{\ngl_FragColor = texture2D(texture5, uv);\n}\nelse\n{\ngl_FragColor = vec4(0.0);\n}\n}\n",Z$B="varying vec3 v_cubeMapCoordinates;\nuniform samplerCube cubeMap;\nvoid main()\n{\nvec4 rgba = textureCube(cubeMap, v_cubeMapCoordinates);\n#ifdef RGBA_NORMALIZED\ngl_FragColor = vec4(rgba.rgb, 1.0);\n#else\nfloat m = rgba.a * 16.0;\nvec3 r = rgba.rgb * m;\ngl_FragColor = vec4(r * r, 1.0);\n#endif\n}\n",q$J="attribute vec4 position;\nattribute vec3 cubeMapCoordinates;\nvarying vec3 v_cubeMapCoordinates;\nvoid main()\n{\ngl_Position = position;\nv_cubeMapCoordinates = cubeMapCoordinates;\n}\n";function n$E(e){this._url=e,this._cubeMapBuffers=void 0,this._cubeMaps=void 0,this._texture=void 0,this._mipTextures=void 0,this._va=void 0,this._sp=void 0,this._maximumMipmapLevel=void 0,this._loading=!1,this._ready=!1,this._readyPromise=c$18.defer()}var K$v=/(^data:image\/ktx)|(\.ktx$)/i,Q$A=/(^data:image\/ktx2)|(\.ktx2$)/i;Object.defineProperties(n$E.prototype,{url:{get:function(){return this._url}},texture:{get:function(){return this._texture}},maximumMipmapLevel:{get:function(){return this._maximumMipmapLevel}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}}),n$E.isSupported=function(e){return e.colorBufferHalfFloat&&e.halfFloatingPointTexture||e.floatingPointTexture&&e.colorBufferFloat};for(var ee$p=new a$11(1,0,0),te$o=new a$11(0,0,1),re$q=new a$11(-1,0,0),ie$p=new a$11(0,0,-1),h$G=new a$11(0,1,0),oe$m=new a$11(0,-1,0),P$w=[h$G,re$q,te$o,oe$m,ee$p,h$G,ie$p,h$G,h$G],S$v=P$w.length,D$G=new Float32Array(3*S$v),F$B=0,d$B=0;d$B<S$v;++d$B,F$B+=3)a$11.pack(P$w[d$B],D$G,F$B);var ae$n=new Float32Array([-1,1,-1,0,0,1,0,0,1,0,1,1,0,-1,-1,-1,1,-1]),se$h=new Uint16Array([0,1,2,2,3,1,7,6,1,3,6,1,2,5,4,3,4,2,4,8,6,3,4,6]);function ue$e(e){var t=u$Y.createVertexBuffer({context:e,typedArray:ae$n,usage:A$13.STATIC_DRAW}),i=u$Y.createVertexBuffer({context:e,typedArray:D$G,usage:A$13.STATIC_DRAW}),n=u$Y.createIndexBuffer({context:e,typedArray:se$h,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT});return new x$18({context:e,attributes:[{index:0,vertexBuffer:t,componentsPerAttribute:2,componentDatatype:C$12.FLOAT},{index:1,vertexBuffer:i,componentsPerAttribute:3,componentDatatype:C$12.FLOAT}],indexBuffer:n})}function O$w(e){return function(){return e}}function v$C(e){e._va=e._va&&e._va.destroy(),e._sp=e._sp&&e._sp.destroy();var t,i,n=e._cubeMaps;if(t$$(n))for(i=n.length,t=0;t<i;++t)n[t].destroy();var r=e._mipTextures;if(t$$(r))for(i=r.length,t=0;t<i;++t)r[t].destroy();e._va=void 0,e._sp=void 0,e._cubeMaps=void 0,e._cubeMapBuffers=void 0,e._mipTextures=void 0}function f$E(e){return t$A.shader(e,(function(e){r$q(e)})),t$A.buffer(e,(function(e){r$q(e)})),t$A.image(e,(function(e){r$q(e),t$A.compressedImage(e,(function(e){r$q(e)}))})),r$q(e),e}function r$q(e){!t$$(e.extras)||(t$$(e.extras._pipeline)&&delete e.extras._pipeline,0===Object.keys(e.extras).length&&delete e.extras)}n$E.prototype.update=function(e){var t=e.context;if(!n$E.isSupported(t)||(t$$(this._texture)&&t$$(this._va)&&v$C(this),t$$(this._texture)))return;if(!t$$(this._texture)&&!this._loading){var i=t.textureCache.getTexture(this._url);if(t$$(i))return v$C(this),this._texture=i,this._maximumMipmapLevel=this._texture.maximumMipmapLevel,this._ready=!0,void this._readyPromise.resolve()}var n=this._cubeMapBuffers;if(!t$$(n)&&!this._loading){var r=this;K$v.test(this._url)?k$L(this._url).then((function(e){r._cubeMapBuffers=e,r._loading=!1})).otherwise(this._readyPromise.reject):Q$A.test(this._url)&&i$T(this._url).then((function(e){r._cubeMapBuffers=e,r._loading=!1})).otherwise(this._readyPromise.reject),this._loading=!0}if(!t$$(this._cubeMapBuffers))return;const o=[];let a=n[0].positiveX.pixelDatatype;t$$(a)?o.push("RGBA_NORMALIZED"):a=t.halfFloatingPointTexture?v$Z.HALF_FLOAT:v$Z.FLOAT;const s=Z$_.RGBA,l=new a$O({defines:o,sources:[Z$B]});this._va=ue$e(t),this._sp=p$15.fromCache({context:t,vertexShaderSource:q$J,fragmentShaderSource:l,attributeLocations:{position:0,cubeMapCoordinates:1}});var u=Math.min(n.length,6);this._maximumMipmapLevel=u-1;for(var c=this._cubeMaps=new Array(u),h=this._mipTextures=new Array(u),d=2*n[0].positiveX.width,f={originalSize:function(){return d}},p=0;p<u;++p){var _=n[p].positiveY;n[p].positiveY=n[p].negativeY,n[p].negativeY=_;var m=c[p]=new X$y({context:t,source:n[p],pixelDatatype:a}),$=2*c[p].width,g=h[p]=new P$S({context:t,width:$,height:$,pixelDatatype:a,pixelFormat:s}),y=new t$w({vertexArray:this._va,shaderProgram:this._sp,uniformMap:{cubeMap:O$w(m)},outputTexture:g,persists:!0,owner:this});e.commandList.push(y),f["texture"+p]=O$w(g)}this._texture=new P$S({context:t,width:1.5*d+2,height:d,pixelDatatype:a,pixelFormat:s}),this._texture.maximumMipmapLevel=this._maximumMipmapLevel,t.textureCache.addTexture(this._url,this._texture);var v=new t$w({fragmentShaderSource:z$w,uniformMap:f,outputTexture:this._texture,persists:!1,owner:this});e.commandList.push(v),this._ready=!0,this._readyPromise.resolve()},n$E.prototype.isDestroyed=function(){return!1},n$E.prototype.destroy=function(){return v$C(this),this._texture=this._texture&&this._texture.destroy(),s$1e(this)};var Ar$1=new a$11,F$A=s$G.ModelState,Pt$4="model/gltf-binary,model/gltf+json;q=0.8,application/json;q=0.2,*/*;q=0.01";function Ge$a(e,t){e._cachedGltf=t}function fe$h(e){this._gltf=e.gltf,this.ready=e.ready,this.modelsToLoad=[],this.count=0}Object.defineProperties(fe$h.prototype,{gltf:{set:function(e){this._gltf=e},get:function(){return this._gltf}}}),fe$h.prototype.makeReady=function(e){this.gltf=e;for(var t=this.modelsToLoad,i=t.length,n=0;n<i;++n){var r=t[n];r.isDestroyed()||Ge$a(r,this)}this.modelsToLoad=void 0,this.ready=!0};var U$K={},Ee$i={};function L$D(e){var t,i=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).cacheKey;if(this._cacheKey=i,this._cachedGltf=void 0,this._releaseGltfJson=e$1Y(e.releaseGltfJson,!1),t$$(i)&&t$$(U$K[i])&&U$K[i].ready)++(t=U$K[i]).count;else{var n=e.gltf;if(t$$(n)){if(n instanceof ArrayBuffer&&(n=new Uint8Array(n)),n instanceof Uint8Array)t=new fe$h({gltf:h$J(n),ready:!0});else t=new fe$h({gltf:e.gltf,ready:!0});t.count=1,t$$(i)&&(U$K[i]=t)}}Ge$a(this,t);var r=e$1Y(e.basePath,"");this._resource=t$X.createIfNeeded(r),this.owner=e.owner,this.show=e$1Y(e.show,!0),this.silhouetteColor=e$1Y(e.silhouetteColor,e$1z.RED),this._silhouetteColor=new e$1z,this._silhouetteColorPreviousAlpha=1,this._normalAttributeName=void 0,this.silhouetteSize=e$1Y(e.silhouetteSize,0),this.modelMatrix=c$1a.clone(e$1Y(e.modelMatrix,c$1a.IDENTITY)),this._modelMatrix=c$1a.clone(this.modelMatrix),this._clampedModelMatrix=void 0,this.scale=e$1Y(e.scale,1),this._scale=this.scale,this.minimumPixelSize=e$1Y(e.minimumPixelSize,0),this._minimumPixelSize=this.minimumPixelSize,this.maximumScale=e.maximumScale,this._maximumScale=this.maximumScale,this.id=e.id,this._id=e.id,this.heightReference=e$1Y(e.heightReference,U$Y.NONE),this._heightReference=this.heightReference,this._heightChanged=!1,this._removeUpdateHeightCallback=void 0;var o=e.scene;this._scene=o,t$$(o)&&t$$(o.terrainProviderChanged)&&(this._terrainProviderChangedCallback=o.terrainProviderChanged.addEventListener((function(){this._heightChanged=!0}),this)),this._pickObject=e.pickObject,this._allowPicking=e$1Y(e.allowPicking,!0),this._ready=!1,this._readyPromise=c$18.defer(),this.activeAnimations=new d$C(this),this.clampAnimations=e$1Y(e.clampAnimations,!0),this._defaultTexture=void 0,this._incrementallyLoadTextures=e$1Y(e.incrementallyLoadTextures,!0),this._asynchronous=e$1Y(e.asynchronous,!0),this.shadows=e$1Y(e.shadows,q$Q.ENABLED),this._shadows=this.shadows,this.color=e$1Y(e.color,e$1z.clone(e$1z.WHITE)),this._color=new e$1z,this._colorPreviousAlpha=1,this.colorBlendMode=e$1Y(e.colorBlendMode,I$J.HIGHLIGHT),this.colorBlendAmount=e$1Y(e.colorBlendAmount,.5),this._colorShadingEnabled=!1,this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._clippingPlanesState=0,this.clippingPlanesOriginMatrix=void 0,this.debugShowBoundingVolume=e$1Y(e.debugShowBoundingVolume,!1),this._debugShowBoundingVolume=!1,this.debugWireframe=e$1Y(e.debugWireframe,!1),this._debugWireframe=!1,this._distanceDisplayCondition=e.distanceDisplayCondition,this._addBatchIdToGeneratedShaders=e.addBatchIdToGeneratedShaders,this._precreatedAttributes=e.precreatedAttributes,this._vertexShaderLoaded=e.vertexShaderLoaded,this._fragmentShaderLoaded=e.fragmentShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._pickIdLoaded=e.pickIdLoaded,this._ignoreCommands=e$1Y(e.ignoreCommands,!1),this._requestType=e.requestType,this._upAxis=e$1Y(e.upAxis,z$y.Y),this._gltfForwardAxis=z$y.Z,this._forwardAxis=e.forwardAxis,this.cull=e$1Y(e.cull,!0),this.opaquePass=e$1Y(e.opaquePass,we$l.OPAQUE),this._computedModelMatrix=new c$1a,this._clippingPlaneModelViewMatrix=c$1a.clone(c$1a.IDENTITY),this._initialRadius=void 0,this._boundingSphere=void 0,this._minCorner=void 0,this._maxCorner=void 0,this._scaledBoundingSphere=new c$19,this._state=F$A.NEEDS_LOAD,this._loadResources=void 0,this._mode=void 0,this._perNodeShowDirty=!1,this._cesiumAnimationsDirty=!1,this._dirty=!1,this._maxDirtyNumber=0,this._runtime={animations:void 0,rootNodes:void 0,nodes:void 0,nodesByName:void 0,skinnedNodes:void 0,meshesByName:void 0,materialsByName:void 0,materialsById:void 0},this._uniformMaps={},this._extensionsUsed=void 0,this._extensionsRequired=void 0,this._quantizedUniforms={},this._programPrimitives={},this._rendererResources={buffers:{},vertexArrays:{},programs:{},sourceShaders:{},silhouettePrograms:{},textures:{},samplers:{},renderStates:{}},this._cachedRendererResources=void 0,this._loadRendererResourcesFromCache=!1,this._dequantizeInShader=e$1Y(e.dequantizeInShader,!0),this._decodedData={},this._cachedGeometryByteLength=0,this._cachedTexturesByteLength=0,this._geometryByteLength=0,this._texturesByteLength=0,this._trianglesLength=0,this._sourceTechniques={},this._sourcePrograms={},this._quantizedVertexShaders={},this._nodeCommands=[],this._pickIds=[],this._rtcCenter=void 0,this._rtcCenterEye=void 0,this._rtcCenter3D=void 0,this._rtcCenter2D=void 0,this._sourceVersion=void 0,this._sourceKHRTechniquesWebGL=void 0,this._imageBasedLightingFactor=new r$T(1,1),r$T.clone(e.imageBasedLightingFactor,this._imageBasedLightingFactor),this._lightColor=a$11.clone(e.lightColor),this._luminanceAtZenith=void 0,this.luminanceAtZenith=e$1Y(e.luminanceAtZenith,.2),this._sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._shouldUpdateSpecularMapAtlas=!0,this._specularEnvironmentMapAtlas=void 0,this._useDefaultSphericalHarmonics=!1,this._useDefaultSpecularMaps=!1,this._shouldRegenerateShaders=!1}function At$4(e){return e.stencilBuffer}function rt$d(e){return!e$1z.equals(e.color,e$1z.WHITE)||e.colorBlendMode!==I$J.HIGHLIGHT}function Lt$7(e){var t=e._clippingPlanes;return t$$(t)&&t.enabled&&0!==t.length}function Lr(e){return"glTF"===e$1h(e)}function it$b(e,t,i){if(e._state!==F$A.LOADED)throw new t$_("The model is not loaded. Use Model.readyPromise or wait for Model.ready to be true.");if(!t$$(i))throw new t$_("name is required.");return e._runtime[t][i]}function Ir$1(e){var t=e.gltf,i=e._loadResources;t$A.buffer(t,(function(e,t){i.buffers[t]=e.extras._pipeline.source}))}function Dr$2(e,t){return function(i){var n=e._loadResources,r=new Uint8Array(i);--n.pendingBufferLoads,e.gltf.buffers[t].extras._pipeline.source=r}}function Nr$2(e){var t=e.gltf.bufferViews,i=e._loadResources.vertexBuffersToCreate;t$A.bufferView(e.gltf,(function(e,t){e.target===de$x.ARRAY_BUFFER&&i.enqueue(t)}));var n=e._loadResources.indexBuffersToCreate,r={};t$A.accessor(e.gltf,(function(e){var i=e.bufferView;t$$(i)&&(t[i].target===de$x.ELEMENT_ARRAY_BUFFER&&!t$$(r[i])&&(r[i]=!0,n.enqueue({id:i,componentType:e.componentType})))}))}function Br$1(e){var t=e.gltf;if(s$I(t,"KHR_techniques_webgl")){var i=e._sourcePrograms,n=e._sourceTechniques,r=t.extensions.KHR_techniques_webgl.programs;t$A.technique(t,(function(e,t){n[t]=e$1W(e);var o=e.program;t$$(i[o])||(i[o]=e$1W(r[o]))}))}}function Or$1(e,t,i){return function(n){var r=e._loadResources;r.shaders[i]={source:n,type:t,bufferView:void 0},--r.pendingShaderLoads,e._rendererResources.sourceShaders[i]=n}}function Fr$1(e){var t=e.gltf,i=t.buffers,n=t.bufferViews,r=e._rendererResources.sourceShaders;t$A.shader(t,(function(t,o){if(t$$(t.bufferView)){var a=t.bufferView,s=n[a],l=s.buffer,u=c$X(i[l].extras._pipeline.source,s.byteOffset,s.byteLength);r[o]=u}else if(t$$(t.extras._pipeline.source))r[o]=t.extras._pipeline.source;else{++e._loadResources.pendingShaderLoads;var c=e._resource.getDerivedResource({url:t.uri});c.fetchText().then(Or$1(e,t.type,o)).otherwise(s$G.getFailedLoadFunction(e,"shader",c.url))}}))}function Ur(e){var t=e._sourceTechniques;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];e._loadResources.programsToCreate.enqueue({programId:n.program,techniqueId:i})}}function We$f(e,t){return function(i){const n=e._loadResources;let r;--n.pendingTextureLoads,Array.isArray(i)&&(r=i.slice(1,i.length).map((function(e){return e.bufferView})),i=i[0]),n.texturesToCreate.enqueue({id:t,image:i,bufferView:i.bufferView,width:i.width,height:i.height,internalFormat:i.internalFormat,mipLevels:r})}}Object.defineProperties(L$D.prototype,{gltf:{get:function(){return t$$(this._cachedGltf)?this._cachedGltf.gltf:void 0}},releaseGltfJson:{get:function(){return this._releaseGltfJson}},cacheKey:{get:function(){return this._cacheKey}},basePath:{get:function(){return this._resource.url}},boundingSphere:{get:function(){if(this._state!==F$A.LOADED)throw new t$_("The model is not loaded. Use Model.readyPromise or wait for Model.ready to be true.");var e=this.modelMatrix;this.heightReference!==U$Y.NONE&&this._clampedModelMatrix&&(e=this._clampedModelMatrix);var t,i=c$1a.getScale(e,Ar$1);this.scale instanceof a$11?(t=this.scale,t$$(this.maximumScale)&&(t.x=Math.min(this.maximumScale,t.x),t.y=Math.min(this.maximumScale,t.y),t.z=Math.min(this.maximumScale,t.z)),a$11.multiplyComponents(i,t,i)):(t=t$$(this.maximumScale)?Math.min(this.maximumScale,this.scale):this.scale,a$11.multiplyByScalar(i,t,i));var n=this._scaledBoundingSphere;return n.center=a$11.multiplyComponents(this._boundingSphere.center,i,n.center),n.radius=a$11.maximumComponent(i)*this._initialRadius,t$$(this._rtcCenter)&&a$11.add(this._rtcCenter,n.center,n.center),n}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},asynchronous:{get:function(){return this._asynchronous}},allowPicking:{get:function(){return this._allowPicking}},incrementallyLoadTextures:{get:function(){return this._incrementallyLoadTextures}},pendingTextureLoads:{get:function(){return t$$(this._loadResources)?this._loadResources.pendingTextureLoads:0}},dirty:{get:function(){return this._dirty}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(t$$(e)&&e.far<=e.near)throw new t$_("far must be greater than near");this._distanceDisplayCondition=e$1w.clone(e,this._distanceDisplayCondition)}},extensionsUsed:{get:function(){return t$$(this._extensionsUsed)||(this._extensionsUsed=s$G.getUsedExtensions(this.gltf)),this._extensionsUsed}},extensionsRequired:{get:function(){return t$$(this._extensionsRequired)||(this._extensionsRequired=s$G.getRequiredExtensions(this.gltf)),this._extensionsRequired}},upAxis:{get:function(){return this._upAxis}},forwardAxis:{get:function(){return t$$(this._forwardAxis)?this._forwardAxis:this._gltfForwardAxis}},trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},texturesByteLength:{get:function(){return this._texturesByteLength}},cachedGeometryByteLength:{get:function(){return this._cachedGeometryByteLength}},cachedTexturesByteLength:{get:function(){return this._cachedTexturesByteLength}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){e!==this._clippingPlanes&&l$G.setOwner(e,this,"_clippingPlanes")}},pickIds:{get:function(){return this._pickIds}},imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){n$1e.typeOf.object("imageBasedLightingFactor",e),n$1e.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.x",e.x,0),n$1e.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.x",e.x,1),n$1e.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.y",e.y,0),n$1e.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.y",e.y,1);var t=this._imageBasedLightingFactor;e===t||r$T.equals(e,t)||(this._shouldRegenerateShaders=this._shouldRegenerateShaders||this._imageBasedLightingFactor.x>0&&0===e.x||0===this._imageBasedLightingFactor.x&&e.x>0,this._shouldRegenerateShaders=this._shouldRegenerateShaders||this._imageBasedLightingFactor.y>0&&0===e.y||0===this._imageBasedLightingFactor.y&&e.y>0,r$T.clone(e,this._imageBasedLightingFactor))}},lightColor:{get:function(){return this._lightColor},set:function(e){var t=this._lightColor;e===t||a$11.equals(e,t)||(this._shouldRegenerateShaders=this._shouldRegenerateShaders||t$$(t)&&!t$$(e)||t$$(e)&&!t$$(t),this._lightColor=a$11.clone(e,t))}},luminanceAtZenith:{get:function(){return this._luminanceAtZenith},set:function(e){var t=this._luminanceAtZenith;e!==t&&(this._shouldRegenerateShaders=this._shouldRegenerateShaders||t$$(t)&&!t$$(e)||t$$(e)&&!t$$(t),this._luminanceAtZenith=e)}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients},set:function(e){if(t$$(e)&&(!Array.isArray(e)||9!==e.length))throw new t$_("sphericalHarmonicCoefficients must be an array of 9 Cartesian3 values.");e!==this._sphericalHarmonicCoefficients&&(this._sphericalHarmonicCoefficients=e,this._shouldRegenerateShaders=!0)}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps},set:function(e){this._shouldUpdateSpecularMapAtlas=e!==this._specularEnvironmentMaps,this._specularEnvironmentMaps=e}}}),L$D.silhouetteSupported=function(e){return At$4(e.context)},L$D.fromGltf=function(e){if(!t$$(e)||!t$$(e.url))throw new t$_("options.url is required");var t=e.url;e=e$1W(e);var i=t$X.createIfNeeded(t),n=e$1Y(e.basePath,i.clone()),r=t$X.createIfNeeded(n),o=e$1Y(e.cacheKey,Ee$i[i$1d(i.url)]);t$$(o)||(o=t$U(),Ee$i[i$1d(i.url)]=o),t$$(e.basePath)&&!t$$(e.cacheKey)&&(o+=r.url),e.cacheKey=o,e.basePath=r;var a=new L$D(e),s=U$K[o];return t$$(s)?s.ready||(++s.count,s.modelsToLoad.push(a)):((s=new fe$h({ready:!1})).count=1,s.modelsToLoad.push(a),Ge$a(a,s),U$K[o]=s,t$$(i.headers.Accept)||(i.headers.Accept=Pt$4),i.fetchArrayBuffer().then((function(e){var t=new Uint8Array(e);if(Lr(t)){var i=h$J(t);s.makeReady(i)}else{var n=c$X(t);s.makeReady(JSON.parse(n))}})).otherwise(s$G.getFailedLoadFunction(a,"model",i.url))),a},L$D.fromJson=function(e){if(!(t$$(e)&&t$$(e.url)&&t$$(e.gltfJson)&&t$$(e.gltfJson.constructor)))throw new t$_("options.url or options.gltfJson is required");var t=e.url;e=e$1W(e);var i=t$X.createIfNeeded(t),n=e$1Y(e.basePath,i.clone()),r=t$X.createIfNeeded(n),o=e$1Y(e.cacheKey,Ee$i[i$1d(i.url)]);t$$(o)||(o=t$U(),Ee$i[i$1d(i.url)]=o),t$$(e.basePath)&&!t$$(e.cacheKey)&&(o+=r.url),e.cacheKey=o,e.basePath=r;var a=new L$D(e),s=U$K[o];return t$$(s)?s.ready||(++s.count,s.modelsToLoad.push(a)):((s=new fe$h({ready:!1})).count=1,s.modelsToLoad.push(a),Ge$a(a,s),U$K[o]=s,t$$(i.headers.Accept)||(i.headers.Accept=Pt$4),s.makeReady(e.gltfJson)),a},L$D.getCachedGltfByPath=function(e){const t=Ee$i[e];if(t$$(t)&&""!==t){const e=U$K[t];if(t$$(e)&&t$$(e._gltf))return e._gltf}return null},L$D._gltfCache=U$K,L$D.prototype.getNode=function(e){var t=it$b(this,"nodesByName",e);return t$$(t)?t.publicNode:void 0},L$D.prototype.getMesh=function(e){return it$b(this,"meshesByName",e)},L$D.prototype.getMaterial=function(e){return it$b(this,"materialsByName",e)};var qr=/(^data:image\/ktx)|(\.ktx$)/i,Vr$1=/(^data:image\/crn)|(\.crn$)/i;function zr(e,t,i){var n,r=e.gltf,o=r.images;t$A.texture(r,(function(r,a){var s=r.source;t$$(r.extensions)&&t$$(r.extensions.EXT_texture_webp)&&i&&(s=r.extensions.EXT_texture_webp.source);var l=o[s],u=l.extras,c=l.bufferView,h=l.mimeType;if(n=l.uri,t$$(u)&&t$$(u.compressedImage3DTiles)){var d=u.compressedImage3DTiles.crunch,f=u.compressedImage3DTiles.s3tc,p=u.compressedImage3DTiles.pvrtc1,_=u.compressedImage3DTiles.etc1;t.s3tc&&t$$(d)?(h=d.mimeType,t$$(d.bufferView)?c=d.bufferView:n=d.uri):t.s3tc&&t$$(f)?(h=f.mimeType,t$$(f.bufferView)?c=f.bufferView:n=f.uri):t.pvrtc&&t$$(p)?(h=p.mimeType,t$$(p.bufferView)?c=p.bufferView:n=p.uri):t.etc1&&t$$(_)&&(h=_.mimeType,t$$(_.bufferView)?c=_.bufferView:n=_.uri)}if(t$$(c))e._loadResources.texturesToCreateFromBufferView.enqueue({id:a,image:void 0,bufferView:c,mimeType:h});else{++e._loadResources.pendingTextureLoads;var m=e._resource.getDerivedResource({url:n});(qr.test(n)?k$L(m):Vr$1.test(n)?I$W(m,void 0,!0):m.fetchImage()).then(We$f(e,a)).otherwise(s$G.getFailedLoadFunction(e,"image",m.url))}}))}function Hr(e){var t={},i={},n=[],r=e._loadResources.skinnedNodesIds;t$A.node(e.gltf,(function(o,a){var s={matrix:void 0,translation:void 0,rotation:void 0,scale:void 0,computedShow:!0,transformToRoot:new c$1a,computedMatrix:new c$1a,dirtyNumber:0,commands:[],inverseBindMatrices:void 0,bindShapeMatrix:void 0,joints:[],computedJointMatrices:[],jointName:o.jointName,weights:[],children:[],parents:[],publicNode:void 0};s.publicNode=new r$r(e,o,s,a,s$G.getTransform(o)),t[a]=s,i[o.name]=s,t$$(o.skin)&&(r.push(a),n.push(s))})),e._runtime.nodes=t,e._runtime.nodesByName=i,e._runtime.skinnedNodes=n}function kr$2(e){var t=e.gltf,i=e._sourceTechniques,n={},r={},o=e._uniformMaps;t$A.material(t,(function(t,a){o[a]={uniformMap:void 0,values:void 0,jointMatrixUniformName:void 0,morphWeightsUniformName:void 0};var s=new a$y(e,t,a);if(t$$(t.extensions)&&t$$(t.extensions.KHR_techniques_webgl)){var l=t.extensions.KHR_techniques_webgl.technique;s._technique=l,s._program=i[l].program,t$A.materialValue(t,(function(e,t){t$$(s._values)||(s._values={}),s._values[t]=e$1W(e)}))}n[t.name]=s,r[a]=s})),e._runtime.materialsByName=n,e._runtime.materialsById=r}function Gr(e){var t={},i=e._runtime.materialsById;t$A.mesh(e.gltf,(function(n,r){t[n.name]=new n$F(n,i,r),(t$$(e.extensionsUsed.WEB3D_quantized_attributes)||e._dequantizeInShader)&&t$A.meshPrimitive(n,(function(t,i){var n=at$b(e,t),o=e._programPrimitives[n];t$$(o)||(o={},e._programPrimitives[n]=o),o[r+".primitive."+i]=t}))})),e._runtime.meshesByName=t}var nt$d=function(){this.id=void 0,this.model=void 0,this.context=void 0};function It$5(e,t,i){var n=t._loadResources,r=t.gltf.bufferViews[e];t$$(r)||(r=n.createdBufferViews[e]);var o=u$Y.createVertexBuffer({context:i,typedArray:n.getBuffer(r),usage:A$13.STATIC_DRAW});o.vertexArrayDestroyable=!1,t._rendererResources.buffers[e]=o,t._geometryByteLength+=o.sizeInBytes}nt$d.prototype.set=function(e,t,i){this.id=e,this.model=t,this.context=i},nt$d.prototype.execute=function(){It$5(this.id,this.model,this.context)};var ot$e=function(){this.id=void 0,this.componentType=void 0,this.model=void 0,this.context=void 0};function Dt$3(e,t,i,n){var r=i._loadResources,o=i.gltf.bufferViews[e];t$$(o)||(o=r.createdBufferViews[e]);var a=u$Y.createIndexBuffer({context:n,typedArray:r.getBuffer(o),usage:A$13.STATIC_DRAW,indexDatatype:t});a.vertexArrayDestroyable=!1,i._rendererResources.buffers[e]=a,i._geometryByteLength+=a.sizeInBytes}ot$e.prototype.set=function(e,t,i,n){this.id=e,this.componentType=t,this.model=i,this.context=n},ot$e.prototype.execute=function(){Dt$3(this.id,this.componentType,this.model,this.context)};var Nt$4=new nt$d,Bt$6=new ot$e;function Wr(e,t){var i=e._loadResources;if(0===i.pendingBufferLoads){var n,r=t.context,o=i.vertexBuffersToCreate,a=i.indexBuffersToCreate;if(e.asynchronous){for(;o.length>0&&(Nt$4.set(o.peek(),e,r),t.jobScheduler.execute(Nt$4,i$E.BUFFER));)o.dequeue();for(;a.length>0&&(n=a.peek(),Bt$6.set(n.id,n.componentType,e,r),t.jobScheduler.execute(Bt$6,i$E.BUFFER));)a.dequeue()}else{for(;o.length>0;)It$5(o.dequeue(),e,r);for(;a.length>0;)Dt$3((n=a.dequeue()).id,n.componentType,e,r)}}}function at$b(e,t){var i=e._runtime.materialsById[t.material];if(t$$(i))return i._program}function Ot$2(e,t,i){var n,r,o=i._programPrimitives[t];if(!t$$(o))return e;for(r in o)if(o.hasOwnProperty(r)&&at$b(i,n=o[r])===t)break;var a=e;if(i.extensionsUsed.WEB3D_quantized_attributes)a=s$G.modifyShaderForQuantizedAttributes(i.gltf,n,e),i._quantizedUniforms[t]=a.uniforms;else{var s=i._decodedData[r];if(!t$$(s))return a;a=s$G.modifyShaderForDracoQuantizedAttributes(i.gltf,n,e,s.attributes)}return i._programPrimitives[t]=void 0,a.shader}function Kr$1(e){return e=a$O.replaceMain(e,"gltf_blend_main"),e+="uniform vec4 gltf_color; \nuniform float gltf_colorBlend; \nvoid main() \n{ \n gltf_blend_main(); \n gl_FragColor.rgb = mix(gl_FragColor.rgb, gltf_color.rgb, gltf_colorBlend); \n float highlight = ceil(gltf_colorBlend); \n gl_FragColor.rgb *= mix(gltf_color.rgb, vec3(1.0), highlight); \n gl_FragColor.a *= gltf_color.a; \n} \n"}function Re$d(e,t,i){return t$$(i)&&(e=i(e,t)),e}var st$9=function(){this.programToCreate=void 0,this.model=void 0,this.context=void 0,this.frameState=void 0};function Ft$2(e,t,i){return e.lightSource.directionalLight.length>0&&(i="uniform vec3 uDirectionalLightColor[ DIR_LIGHTS ]; \n"+(i="uniform vec3 uDirectionalLightDirectionEC[ DIR_LIGHTS ]; \n"+i)),e.lightSource.pointLight.length>0&&(i="uniform vec2 uPointLightDistanceAndDecay[ POINT_LIGHTS ]; \n"+(i="uniform vec3 uPointLightColor[ POINT_LIGHTS ]; \n"+(i="uniform vec3 uPointLightPositionEC[ POINT_LIGHTS ]; \n"+i))),e.lightSource.spotLight.length>0&&(i="uniform float uSpotLightExponent[ SPOT_LIGHTS ]; \n"+(i="uniform vec4 uSpotLightDistanceDecayCosPenumbra[ SPOT_LIGHTS ]; \n"+(i="uniform vec3 uSpotLightDirectionEC[ SPOT_LIGHTS ]; \n"+(i="uniform vec3 uSpotLightPositionEC[ SPOT_LIGHTS ]; \n"+(i="uniform vec3 uSpotLightColor[ SPOT_LIGHTS ]; \n"+i))))),t="#define DIR_LIGHTS "+e.lightSource.directionalLight.length+"\n"+t,i="#define DIR_LIGHTS "+e.lightSource.directionalLight.length+"\n"+i,t="#define POINT_LIGHTS "+e.lightSource.pointLight.length+"\n"+t,i="#define POINT_LIGHTS "+e.lightSource.pointLight.length+"\n"+i,{vs:t="#define SPOT_LIGHTS "+e.lightSource.spotLight.length+"\n"+t,fs:i="#define SPOT_LIGHTS "+e.lightSource.spotLight.length+"\n"+i}}function Ut$5(e,t,i,n){var r=e.programId,o=e.techniqueId,a=t._sourcePrograms[r],s=t._rendererResources.sourceShaders,l=s[a.vertexShader],u=s[a.fragmentShader],c=t._quantizedVertexShaders,h=t._toClipCoordinatesGLSL[r];if(t.extensionsUsed.WEB3D_quantized_attributes||t._dequantizeInShader){var d=c[r];t$$(d)||(d=Ot$2(l,r,t),c[r]=d),l=d}var f=Re$d(l,r,t._vertexShaderLoaded),p=Re$d(u,r,t._fragmentShaderLoaded);o$$.isInternetExplorer()||(f=s$G.modifyVertexShaderForLogDepth(f,h),p=s$G.modifyFragmentShaderForLogDepth(p)),t$$(t._uniformMapLoaded)||(p="uniform vec4 czm_pickColor;\n"+p);var _=t._imageBasedLightingFactor.x>0||t._imageBasedLightingFactor.y>0;_&&(p="#define USE_IBL_LIGHTING \n\n"+p),t$$(t._lightColor)&&(p="#define USE_CUSTOM_LIGHT_COLOR \n\n"+p),t$$(t.owner)&&t.owner._swipeEnabled&&(p="#define APPLY_SWIPE \n\n"+p);var m=Ft$2(n,f,p);if(f=m.vs,p=m.fs,("2.0"!==t._sourceVersion||t._sourceKHRTechniquesWebGL)&&(p=a$O.replaceMain(p,"non_gamma_corrected_main"),p+="\nvoid main() { \n non_gamma_corrected_main(); \n gl_FragColor = czm_gammaCorrect(gl_FragColor); \n} \n"),n$E.isSupported(i)){var $=t$$(t._sphericalHarmonicCoefficients)||t._useDefaultSphericalHarmonics,g=t$$(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready||t._useDefaultSpecularMaps;($||g||_)&&(p="uniform mat4 gltf_clippingPlanesMatrix; \n"+p),t$$(t._sphericalHarmonicCoefficients)?p="#define DIFFUSE_IBL \n#define CUSTOM_SPHERICAL_HARMONICS \nuniform vec3 gltf_sphericalHarmonicCoefficients[9]; \n"+p:t._useDefaultSphericalHarmonics&&(p="#define DIFFUSE_IBL \n"+p),t$$(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready?p="#define SPECULAR_IBL \n#define CUSTOM_SPECULAR_IBL \nuniform sampler2D gltf_specularMap; \nuniform vec2 gltf_specularMapSize; \nuniform float gltf_maxSpecularLOD; \n"+p:t._useDefaultSpecularMaps&&(p="#define SPECULAR_IBL \n"+p)}t$$(t._luminanceAtZenith)&&(p="#define USE_SUN_LUMINANCE \nuniform float gltf_luminanceAtZenith;\n"+p),qt$5(r,o,p,f,t,i)}function jr(e,t,i,n){var r=e.programId,o=e.techniqueId,a=t._sourcePrograms[r],s=t._rendererResources.sourceShaders,l=t._quantizedVertexShaders,u=t._toClipCoordinatesGLSL[r],c=t.clippingPlanes,h=Lt$7(t),d=s[a.vertexShader],f=s[a.fragmentShader];(t.extensionsUsed.WEB3D_quantized_attributes||t._dequantizeInShader)&&(d=l[r]);var p=f;rt$d(t)&&(p=L$D._modifyShaderForColor(p)),h&&(p=ji$3(p,c,i));var _=Re$d(d,r,t._vertexShaderLoaded),m=Re$d(p,r,t._fragmentShaderLoaded);o$$.isInternetExplorer()||(_=s$G.modifyVertexShaderForLogDepth(_,u),m=s$G.modifyFragmentShaderForLogDepth(m)),t$$(t._uniformMapLoaded)||(m="uniform vec4 czm_pickColor;\n"+m);var $=t._imageBasedLightingFactor.x>0||t._imageBasedLightingFactor.y>0;$&&(m="#define USE_IBL_LIGHTING \n\n"+m),t$$(t._lightColor)&&(m="#define USE_CUSTOM_LIGHT_COLOR \n\n"+m),t$$(t.owner)&&t.owner._swipeEnabled&&(m="#define APPLY_SWIPE \n\n"+m);var g=Ft$2(n,_,m);if(_=g.vs,m=g.fs,("2.0"!==t._sourceVersion||t._sourceKHRTechniquesWebGL)&&(m=a$O.replaceMain(m,"non_gamma_corrected_main"),m+="\nvoid main() { \n non_gamma_corrected_main(); \n gl_FragColor = czm_gammaCorrect(gl_FragColor); \n} \n"),n$E.isSupported(i)){var y=t$$(t._sphericalHarmonicCoefficients)||t._useDefaultSphericalHarmonics,v=t$$(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready||t._useDefaultSpecularMaps;!h&&(y||v||$)&&(m="uniform mat4 gltf_clippingPlanesMatrix; \n"+m),t$$(t._sphericalHarmonicCoefficients)?m="#define DIFFUSE_IBL \n#define CUSTOM_SPHERICAL_HARMONICS \nuniform vec3 gltf_sphericalHarmonicCoefficients[9]; \n"+m:t._useDefaultSphericalHarmonics&&(m="#define DIFFUSE_IBL \n"+m),t$$(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready?m="#define SPECULAR_IBL \n#define CUSTOM_SPECULAR_IBL \nuniform sampler2D gltf_specularMap; \nuniform vec2 gltf_specularMapSize; \nuniform float gltf_maxSpecularLOD; \n"+m:t._useDefaultSpecularMaps&&(m="#define SPECULAR_IBL \n"+m)}t$$(t._luminanceAtZenith)&&(m="#define USE_SUN_LUMINANCE \nuniform float gltf_luminanceAtZenith;\n"+m),qt$5(r,o,m,_,t,i)}function qt$5(e,t,i,n,r,o){var a=r._sourceTechniques[t],s=s$G.createAttributeLocations(a,r._precreatedAttributes);r._rendererResources.programs[e]=p$15.fromCache({context:o,vertexShaderSource:n,fragmentShaderSource:i,attributeLocations:s})}st$9.prototype.set=function(e,t,i,n){this.programToCreate=e,this.model=t,this.context=i,this.frameState=n},st$9.prototype.execute=function(){Ut$5(this.programToCreate,this.model,this.context,this.frameState)};var Vt$6=new st$9;function Jr$1(e,t){var i=e._loadResources,n=i.programsToCreate;if(0===i.pendingShaderLoads&&0===i.pendingBufferLoads){var r=t.context;if(e.asynchronous)for(;n.length>0&&(Vt$6.set(n.peek(),e,r,t),t.jobScheduler.execute(Vt$6,i$E.PROGRAM));)n.dequeue();else for(;n.length>0;)Ut$5(n.dequeue(),e,r)}}function Zr$2(e,t){return function(i){e.texturesToCreate.enqueue({id:t.id,image:i,bufferView:void 0}),--e.pendingBufferViewToImage}}function Yr$1(e){var t=e._loadResources;if(0===t.pendingBufferLoads)for(;t.texturesToCreateFromBufferView.length>0;){var i=t.texturesToCreateFromBufferView.dequeue(),n=e.gltf,r=n.bufferViews[i.bufferView];n.textures[i.id].source;var o=s$G.getFailedLoadFunction(e,"image","id: "+i.id+", bufferView: "+i.bufferView);if("image/ktx"===i.mimeType)k$L(t.getBuffer(r)).then(We$f(e,i.id)).otherwise(o),++e._loadResources.pendingTextureLoads;else if("image/ktx2"===i.mimeType){i$T(new Uint8Array(t.getBuffer(r))).then(We$f(e,i.id)),++e._loadResources.pendingTextureLoads}else if("image/crn"===i.mimeType){var a=I$W(t.getBuffer(r),void 0,!0);t$$(a)&&a.then(We$f(e,i.id)).otherwise(o),++e._loadResources.pendingTextureLoads}else{var s=Zr$2(t,i);b$14({uint8Array:t.getBuffer(r),format:i.mimeType,flipY:!1}).then(s).otherwise(o),++t.pendingBufferViewToImage}}}function Qr$1(e){var t=e._loadResources;if(t.createSamplers){t.createSamplers=!1;var i=e._rendererResources.samplers;t$A.sampler(e.gltf,(function(e,t){i[t]=new a$Q({wrapS:e.wrapS,wrapT:e.wrapT,minificationFilter:e.minFilter,magnificationFilter:e.magFilter})}))}}var ut$9=function(){this.gltfTexture=void 0,this.model=void 0,this.context=void 0};function zt$6(e,t,i){var n=t.gltf.textures[e.id],r=t._rendererResources.samplers[n.sampler];r=e$1Y(r,new a$Q({wrapS:j$13.REPEAT,wrapT:j$13.REPEAT}));var o,a=e.internalFormat,s=!(t$$(a)&&Z$_.isCompressedFormat(a)||r.minificationFilter!==tt$l.NEAREST_MIPMAP_NEAREST&&r.minificationFilter!==tt$l.NEAREST_MIPMAP_LINEAR&&r.minificationFilter!==tt$l.LINEAR_MIPMAP_NEAREST&&r.minificationFilter!==tt$l.LINEAR_MIPMAP_LINEAR),l=s||r.wrapS===j$13.REPEAT||r.wrapS===j$13.MIRRORED_REPEAT||r.wrapT===j$13.REPEAT||r.wrapT===j$13.MIRRORED_REPEAT,u=e.image;if(t$$(a))o=new P$S({context:i,source:{arrayBufferView:e.bufferView,mipLevels:e.mipLevels},width:e.width,height:e.height,pixelFormat:a,sampler:r});else if(t$$(u)){var c=!n$1d.isPowerOfTwo(u.width)||!n$1d.isPowerOfTwo(u.height);if(l&&c){var h=document.createElement("canvas");h.width=n$1d.nextPowerOfTwo(u.width),h.height=n$1d.nextPowerOfTwo(u.height),h.getContext("2d").drawImage(u,0,0,u.width,u.height,0,0,h.width,h.height),u=h}o=new P$S({context:i,source:u,pixelFormat:n.internalFormat,pixelDatatype:n.type,sampler:r,flipY:!1}),s&&o.generateMipmap()}t$$(o)&&(t._rendererResources.textures[e.id]=o,t._texturesByteLength+=o.sizeInBytes)}ut$9.prototype.set=function(e,t,i){this.gltfTexture=e,this.model=t,this.context=i},ut$9.prototype.execute=function(){zt$6(this.gltfTexture,this.model,this.context)};var Ht$3=new ut$9;function Xr$1(e,t){var i=t.context,n=e._loadResources.texturesToCreate;if(e.asynchronous)for(;n.length>0&&(Ht$3.set(n.peek(),e,i),t.jobScheduler.execute(Ht$3,i$E.TEXTURE));)n.dequeue();else for(;n.length>0;)zt$6(n.dequeue(),e,i)}function $r$1(e,t){var i,n,r=e._sourceTechniques,o={},a=e._runtime.materialsById[t.material];if(!t$$(a))return o;var s=r[a._technique];if(!t$$(s))return o;var l=s.attributes,u=e._rendererResources.programs[s.program],c=u.vertexAttributes,h=u._attributeLocations;for(i in c)if(c.hasOwnProperty(i)){var d=l[i];t$$(d)&&(n=h[i],o[d.semantic]=n)}var f=e._precreatedAttributes;if(t$$(f))for(i in f)f.hasOwnProperty(i)&&(n=h[i],o[i]=n);return o}function ei$4(e,t){for(var i=e.gltf,n=i.skins,r=i.nodes,o=e._runtime.nodes,a=e._loadResources.skinnedNodesIds,s=a.length,l=0;l<s;++l){var u=a[l],c=o[u],h=r[u],d=t[h.skin];c.inverseBindMatrices=d.inverseBindMatrices,c.bindShapeMatrix=d.bindShapeMatrix;for(var f=n[h.skin].joints,p=f.length,_=0;_<p;++_){var m=o[f[_]];c.joints.push(m)}}}function ti$5(e){var t=e._loadResources;if(0===t.pendingBufferLoads&&t.createSkins){t.createSkins=!1;var i=e.gltf,n=i.accessors,r={};t$A.skin(i,(function(t,i){var o,a=n[t.inverseBindMatrices];c$1a.equals(t.bindShapeMatrix,c$1a.IDENTITY)||(o=c$1a.clone(t.bindShapeMatrix)),r[i]={inverseBindMatrices:h$H.getSkinInverseBindMatrices(e,a),bindShapeMatrix:o}})),ei$4(e,r)}}function ri$3(e,t,i,n){return function(r){t$$(n)&&(r=e.clampAnimations?n.clampTime(r):n.wrapTime(r),t[i]=n.evaluate(r,t[i]),t.dirtyNumber=e._maxDirtyNumber)}}function ii$6(e){var t=e._loadResources;if(t.finishedPendingBufferLoads()&&t.createRuntimeAnimations){t.createRuntimeAnimations=!1,e._runtime.animations=[];var i=e._runtime.nodes,n=e.gltf.accessors;t$A.animation(e.gltf,(function(t,r){for(var o=t.channels,a=t.samplers,s=Number.MAX_VALUE,l=-Number.MAX_VALUE,u=o.length,c=new Array(u),h=0;h<u;++h){var d=o[h],f=d.target,p=f.path,_=a[d.sampler],m=h$H.getAnimationParameterValues(e,n[_.input]),$=h$H.getAnimationParameterValues(e,n[_.output]);s=Math.min(s,m[0]),l=Math.max(l,m[m.length-1]);var g=h$H.getAnimationSpline(e,r,t,d.sampler,_,m,p,$);c[h]=ri$3(e,i[f.node],f.path,g)}e._runtime.animations[r]={name:t.name,startTime:s,stopTime:l,channelEvaluators:c}}))}}function kt$5(e,t){var i=e._loadResources;if(i.finishedBuffersCreation()&&i.finishedProgramCreation()&&i.createVertexArrays){i.createVertexArrays=!1;var n=e._rendererResources.buffers,r=e._rendererResources.vertexArrays,o=e.gltf,a=o.accessors;t$A.mesh(o,(function(i,s){t$A.meshPrimitive(i,(function(i,l){var u,c=[],h=$r$1(e,i),d=e._decodedData[s+".primitive."+l];t$A.meshPrimitiveAttribute(i,(function(e,t){if(t$$(u=h[t])){if(t$$(d)){var i=d.attributes;if(i.hasOwnProperty(t)){var r=i[t];return void c.push({index:u,vertexBuffer:n[r.bufferView],componentsPerAttribute:r.componentsPerAttribute,componentDatatype:r.componentDatatype,normalize:r.normalized,offsetInBytes:r.byteOffset,strideInBytes:r.byteStride})}}var s=a[e],l=t$$(s.normalized)&&s.normalized;c.push({index:u,vertexBuffer:n[s.bufferView],componentsPerAttribute:r$t(s.type),componentDatatype:s.componentType,normalize:l,offsetInBytes:s.byteOffset,strideInBytes:p$O(o,s)})}}));var f,p,_,m=e._precreatedAttributes;if(t$$(m))for(p in m)m.hasOwnProperty(p)&&(t$$(u=h[p])&&((f=m[p]).index=u,c.push(f)));if(t$$(i.indices)){var $=a[i.indices].bufferView;t$$(d)&&($=d.bufferView),_=n[$]}r[s+".primitive."+l]=new x$18({context:t,attributes:c,indexBuffer:_})}))}))}}function ni$3(e){var t=e._loadResources;t.createRenderStates&&(t.createRenderStates=!1,t$A.material(e.gltf,(function(t,i){oi$3(e,t,i)})))}function oi$3(e,t,i){var n=e._rendererResources.renderStates,r=[de$x.FUNC_ADD,de$x.FUNC_ADD],o=[de$x.ONE,de$x.ONE_MINUS_SRC_ALPHA,de$x.ONE,de$x.ONE_MINUS_SRC_ALPHA];t$$(t.extensions)&&t$$(t.extensions.KHR_blend)&&(r=t.extensions.KHR_blend.blendEquation,o=t.extensions.KHR_blend.blendFactors);var a=!t.doubleSided,s="BLEND"===t.alphaMode;n[i]=p$1a.fromCache({cull:{enabled:a},depthTest:{enabled:!0},depthMask:!s,blending:{enabled:s,equationRgb:r[0],equationAlpha:r[1],functionSourceRgb:o[0],functionDestinationRgb:o[1],functionSourceAlpha:o[2],functionDestinationAlpha:o[3]},stencilTest:{enabled:!0,frontFunction:h$N.ALWAYS,frontOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.REPLACE},backFunction:h$N.ALWAYS,backOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.REPLACE},reference:Ia$1.MODEL,mask:-1}})}var ai$5={MODEL:function(e,t,i){return function(){return i.computedMatrix}},VIEW:function(e,t,i){return function(){return e.view}},PROJECTION:function(e,t,i){return function(){return e.projection}},MODELVIEW:function(e,t,i){var n=new c$1a;return function(){return c$1a.multiplyTransformation(e.view,i.computedMatrix,n)}},CESIUM_RTC_MODELVIEW:function(e,t,i){var n=new c$1a;return function(){return c$1a.multiplyTransformation(e.view,i.computedMatrix,n),c$1a.setTranslation(n,t._rtcCenterEye,n)}},MODELVIEWPROJECTION:function(e,t,i){var n=new c$1a;return function(){return c$1a.multiplyTransformation(e.view,i.computedMatrix,n),c$1a.multiply(e._projection,n,n)}},MODELINVERSE:function(e,t,i){var n=new c$1a;return function(){return c$1a.inverse(i.computedMatrix,n)}},VIEWINVERSE:function(e,t){return function(){return e.inverseView}},PROJECTIONINVERSE:function(e,t,i){return function(){return e.inverseProjection}},MODELVIEWINVERSE:function(e,t,i){var n=new c$1a,r=new c$1a;return function(){return c$1a.multiplyTransformation(e.view,i.computedMatrix,n),c$1a.inverse(n,r)}},MODELVIEWPROJECTIONINVERSE:function(e,t,i){var n=new c$1a,r=new c$1a;return function(){return c$1a.multiplyTransformation(e.view,i.computedMatrix,n),c$1a.multiply(e._projection,n,n),c$1a.inverse(n,r)}},MODELINVERSETRANSPOSE:function(e,t,i){var n=new c$1a,r=new r$W;return function(){return c$1a.inverse(i.computedMatrix,n),c$1a.getRotation(n,r),r$W.transpose(r,r)}},MODELVIEWINVERSETRANSPOSE:function(e,t,i){var n=new c$1a,r=new c$1a,o=new r$W;return function(){return c$1a.multiplyTransformation(e.view,i.computedMatrix,n),c$1a.inverse(n,r),c$1a.getRotation(r,o),r$W.transpose(o,o)}},VIEWPORT:function(e,t,i){return function(){return e.viewportCartesian4}}};function si$4(e,t,i,n){var r=t._runtime.nodes[e];return ai$5[i](n,t,r)}function ui$3(e,t,i,n,r,o,a){var s,l,u={},c={};return t$A.techniqueUniform(i,(function(i,h){var d;if(t$$(n)&&t$$(n[h]))d=s$G.createUniformFunction(i.type,n[h],o,a,i.extensionType),u[h]=d.func,c[h]=d;else if(t$$(i.node))u[h]=si$4(i.node,e,i.semantic,r.uniformState);else if(t$$(i.semantic))if("JOINTMATRIX"===i.semantic)s=h;else if("MORPHWEIGHTS"===i.semantic)l=h;else if("ALPHACUTOFF"===i.semantic){var f=t.alphaMode;if(t$$(f)&&"MASK"===f){var p=e$1Y(t.alphaCutoff,.5);d=s$G.createUniformFunction(i.type,p,o,a,i.extensionType),u[h]=d.func,c[h]=d}}else u[h]=s$G.getGltfSemanticUniforms()[i.semantic](r.uniformState,e);else if(t$$(i.value)){var _=s$G.createUniformFunction(i.type,i.value,o,a,i.extensionType);u[h]=_.func,c[h]=_}})),{map:u,values:c,jointMatrixUniformName:s,morphWeightsUniformName:l}}function ci$4(e,t){var i=e._loadResources;if(i.finishedProgramCreation()&&i.createUniformMaps){i.createUniformMaps=!1;var n=e.gltf,r=e._sourceTechniques,o=e._uniformMaps,a=e._rendererResources.textures,s=e._defaultTexture;t$A.material(n,(function(i,n){var l=e._runtime.materialsById[n],u=r[l._technique],c=l._values,h=ui$3(e,i,u,c,t,a,s),d=o[n];d.uniformMap=h.map,d.values=h.values,d.jointMatrixUniformName=h.jointMatrixUniformName,d.morphWeightsUniformName=h.morphWeightsUniformName}))}}function li$3(e){return s$G.createUniformsForDracoQuantizedAttributes(e.attributes)}function di$4(e,t){var i=at$b(e,t),n=e._quantizedUniforms[i];return s$G.createUniformsForQuantizedAttributes(e.gltf,t,n)}function hi$4(e){return function(){return e}}function mi$3(e){return function(){return e.computedJointMatrices}}function fi$3(e){return function(){return e.weights}}function pi$5(e){return function(){return e.silhouetteColor}}function _i$4(e){return function(){return e.silhouetteSize}}function gi$3(e){return function(){return e.color}}var vi$4=new c$1a;function xi$2(e){return function(){var t=e.clippingPlanes;if(!t$$(t)&&!t$$(e._sphericalHarmonicCoefficients)&&!t$$(e._specularEnvironmentMaps))return c$1a.IDENTITY;var i=t$$(t)?t.modelMatrix:c$1a.IDENTITY;return c$1a.multiply(e._clippingPlaneModelViewMatrix,i,vi$4)}}function Si$2(e){return function(){var t=e.clippingPlanes;return t$$(t)&&t.enabled?t.texture:e._defaultTexture}}function yi$3(e){return function(){var t=e.clippingPlanes;if(!t$$(t))return e$1z.WHITE.withAlpha(0);var i=e$1z.clone(t.edgeColor);return i.alpha=t.edgeWidth,i}}function Ci$3(e){return function(){return I$J.getColorBlend(e.colorBlendMode,e.colorBlendAmount)}}function wi$3(e){return function(){return e._imageBasedLightingFactor}}function Mi$2(e){return function(){return e._lightColor}}function Ti$2(e){return function(){return e.luminanceAtZenith}}function Ei$2(e){return function(){return e._sphericalHarmonicCoefficients}}function Ri$3(e){return function(){return e._specularEnvironmentMapAtlas.texture}}function bi$4(e){return function(){return e._specularEnvironmentMapAtlas.texture.dimensions}}function Pi$3(e){return function(){return e._specularEnvironmentMapAtlas.maximumMipmapLevel}}function Ai$3(e,t){switch(e.mode){case H$11.TRIANGLES:return t/3;case H$11.TRIANGLE_STRIP:case H$11.TRIANGLE_FAN:return Math.max(t-2,0);default:return 0}}function Li$2(e,t,i,n,r,o){for(var a=e._nodeCommands,s=e._pickIds,l=e.allowPicking,u=e._runtime.meshesByName,c=e._rendererResources,h=c.vertexArrays,d=c.programs,f=c.renderStates,p=e._uniformMaps,_=e.gltf,m=_.accessors,$=_.meshes,g=t.mesh,y=$[g],v=y.primitives,x=v.length,b=0;b<x;++b){var S,w=v[b],C=m[w.indices],T=e._runtime.materialsById[w.material]._program,P=e._decodedData[g+".primitive."+b],E=w.attributes.POSITION;if(t$$(E)){var A=s$G.getAccessorMinMax(_,E);S=c$19.fromCornerPoints(a$11.fromArray(A.min),a$11.fromArray(A.max))}var L,M,I=h[g+".primitive."+b];if(t$$(P))M=P.numberOfIndices,L=0;else if(t$$(C))M=C.count,L=C.byteOffset/fe$u.getSizeInBytes(C.componentType);else{M=m[w.attributes.POSITION].count,L=0}e._trianglesLength+=Ai$3(w,M);var O=p[w.material],D=O.uniformMap;if(t$$(O.jointMatrixUniformName)){var R={};R[O.jointMatrixUniformName]=mi$3(i),D=s$1n(D,R)}if(t$$(O.morphWeightsUniformName)){var N={};N[O.morphWeightsUniformName]=fi$3(i),D=s$1n(D,N)}D=s$1n(D,{gltf_color:gi$3(e),gltf_colorBlend:Ci$3(e),gltf_clippingPlanes:Si$2(e),gltf_clippingPlanesEdgeStyle:yi$3(e),gltf_clippingPlanesMatrix:xi$2(e),gltf_iblFactor:wi$3(e),gltf_lightColor:Mi$2(e),gltf_sphericalHarmonicCoefficients:Ei$2(e),gltf_specularMap:Ri$3(e),gltf_specularMapSize:bi$4(e),gltf_maxSpecularLOD:Pi$3(e),gltf_luminanceAtZenith:Ti$2(e)}),D=s$1n(D,o.lightSource.createUniformMap()),t$$(e._uniformMapLoaded)&&(D=e._uniformMapLoaded(D,T,i));var F={};e.extensionsUsed.WEB3D_quantized_attributes?F=di$4(e,w):e._dequantizeInShader&&t$$(P)&&(F=li$3(P)),D=s$1n(D,F);var B=f[w.material],z=B.blending.enabled,G=e._pickObject;t$$(G)||(G={primitive:e,id:e.id,node:i.publicNode,mesh:u[y.name]});var k,U=q$Q.castShadows(e._shadows),V=q$Q.receiveShadows(e._shadows);if(l&&!t$$(e._uniformMapLoaded))k=n.createPickId(G),s.push(k),D=s$1n(D,{czm_pickColor:hi$4(k.color)});l&&(k=t$$(e._pickIdLoaded)&&t$$(e._uniformMapLoaded)?e._pickIdLoaded():"czm_pickColor");var W,H=new s$1d({boundingVolume:new c$19,cull:e.cull,modelMatrix:new c$1a,primitiveType:w.mode,vertexArray:I,count:M,offset:L,shaderProgram:d[T],castShadows:U,receiveShadows:V,uniformMap:D,renderState:B,owner:G,pass:z?we$l.TRANSLUCENT:e.opaquePass,pickId:k});r||((W=s$1d.shallowClone(H)).boundingVolume=new c$19,W.modelMatrix=new c$1a);var Y={show:!0,boundingSphere:S,command:H,command2D:W,silhouetteModelCommand:void 0,silhouetteModelCommand2D:void 0,silhouetteColorCommand:void 0,silhouetteColorCommand2D:void 0,translucentCommand:void 0,translucentCommand2D:void 0,programId:T};i.commands.push(Y),a.push(Y)}}function Ii$2(e,t,i,n){var r=e._loadResources;if(r.finishedEverythingButTextureCreation()&&r.createRuntimeNodes){r.createRuntimeNodes=!1;for(var o=[],a=e._runtime.nodes,s=e.gltf,l=s.nodes,u=(s.skins,s.scenes[s.scene].nodes),c=u.length,h=[],d={},f=0;f<c;++f)for(h.push({parentRuntimeNode:void 0,gltfNode:l[u[f]],id:u[f]});h.length>0;){var p=h.pop();d[p.id]=!0;var _=p.parentRuntimeNode,m=p.gltfNode,$=a[p.id];if(0===$.parents.length)if(t$$(m.matrix))$.matrix=c$1a.fromColumnMajorArray(m.matrix);else{var g=m.rotation;$.translation=a$11.fromArray(m.translation),$.rotation=a$U.unpack(g),$.scale=a$11.fromArray(m.scale)}t$$(_)?(_.children.push($),$.parents.push(_)):o.push($),t$$(m.mesh)&&Li$2(e,m,$,t,i,n);var y=m.children;if(t$$(y))for(var v=y.length,x=0;x<v;x++){var b=y[x];d[b]||h.push({parentRuntimeNode:$,gltfNode:l[b],id:y[x]})}}e._runtime.rootNodes=o,e._runtime.nodes=a}}function Di$4(e){var t=0;for(var i in e)e.hasOwnProperty(i)&&(t+=e[i].sizeInBytes);return t}function Ni$2(e){var t=0;for(var i in e)e.hasOwnProperty(i)&&(t+=e[i].sizeInBytes);return t}function Gt$7(e,t){var i=t.context,n=t.scene3DOnly,r=e._quantizedVertexShaders,o=e._toClipCoordinatesGLSL={},a=e._sourceTechniques,s=e._sourcePrograms,l=e._rendererResources,u=l.sourceShaders;for(var c in e._loadRendererResourcesFromCache&&(u=l.sourceShaders=e._cachedRendererResources.sourceShaders),a)if(a.hasOwnProperty(c)){var h=a[c].program,d=s[h],f=u[d.vertexShader];if(s$G.checkSupportedGlExtensions(d.glExtensions,i),e.extensionsUsed.WEB3D_quantized_attributes||e._dequantizeInShader){var p=r[h];t$$(p)||(p=Ot$2(f,h,e),r[h]=p),f=p}f=Re$d(f,h,e._vertexShaderLoaded),o[h]=s$G.toClipCoordinatesGLSL(e.gltf,f)}if(e._loadRendererResourcesFromCache){var _=e._cachedRendererResources;l.buffers=_.buffers,l.vertexArrays=_.vertexArrays,l.programs=_.programs,l.silhouettePrograms=_.silhouettePrograms,l.textures=_.textures,l.samplers=_.samplers,l.renderStates=_.renderStates,t$$(e._precreatedAttributes)&&kt$5(e,i),e._cachedGeometryByteLength+=Di$4(_.buffers),e._cachedTexturesByteLength+=Ni$2(_.textures)}else Wr(e,t),Jr$1(e,t),Qr$1(e),Yr$1(e),Xr$1(e,t);ti$5(e),ii$6(e),e._loadRendererResourcesFromCache||(kt$5(e,i),ni$3(e)),ci$4(e,i),Ii$2(e,i,n,t)}function Wt$6(e,t){var i=e.publicNode,n=i.matrix;i.useMatrix&&t$$(n)?c$1a.clone(n,t):t$$(e.matrix)?c$1a.clone(e.matrix,t):(c$1a.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t),i.setMatrix(t))}var Kt$5=[],Bi$3=new a$10,ct$c=new c$1a;function jt$6(e,t,i,n){var r=e._maxDirtyNumber,o=e._runtime.rootNodes,a=o.length,s=Kt$5,l=e._computedModelMatrix;if(e._mode!==b$1d.SCENE3D&&!e._ignoreCommands){var u=c$1a.getColumn(l,3,Bi$3);if(a$10.equals(u,a$10.UNIT_W)){var c=e.boundingSphere.center,h=m$13.wgs84To2DModelMatrix(n,c,ct$c);l=c$1a.multiply(h,l,ct$c),t$$(e._rtcCenter)&&(c$1a.setTranslation(l,a$10.UNIT_W,l),e._rtcCenter=e._rtcCenter2D)}else l=m$13.basisTo2D(n,l,ct$c),e._rtcCenter=e._rtcCenter3D}for(var d=0;d<a;++d){var f=o[d];for(Wt$6(f,f.transformToRoot),s.push(f);s.length>0;){var p=(f=s.pop()).transformToRoot,_=f.commands;if(f.dirtyNumber===r||t||i){var m=c$1a.multiplyTransformation(l,p,f.computedMatrix),$=_.length;if($>0)for(var g=0;g<$;++g){var y=_[g],v=y.command;c$1a.clone(m,v.modelMatrix),c$19.transform(y.boundingSphere,v.modelMatrix,v.boundingVolume),t$$(e._rtcCenter)&&a$11.add(e._rtcCenter,v.boundingVolume.center,v.boundingVolume.center),t$$(v=y.command2D)&&e._mode===b$1d.SCENE2D&&(c$1a.clone(m,v.modelMatrix),v.modelMatrix[13]-=2*n$1d.sign(v.modelMatrix[13])*n$1d.PI*n.ellipsoid.maximumRadius,c$19.transform(y.boundingSphere,v.modelMatrix,v.boundingVolume))}}var x=f.children;if(t$$(x))for(var b=x.length,S=0;S<b;++S){var w=x[S];w.dirtyNumber=Math.max(w.dirtyNumber,f.dirtyNumber),(w.dirtyNumber===r||i)&&(Wt$6(w,w.transformToRoot),c$1a.multiplyTransformation(p,w.transformToRoot,w.transformToRoot)),s.push(w)}}}++e._maxDirtyNumber}var lt$d=new c$1a;function Jt$7(e){for(var t=e._runtime.skinnedNodes,i=t.length,n=0;n<i;++n){var r=t[n];lt$d=c$1a.inverseTransformation(r.transformToRoot,lt$d);for(var o=r.computedJointMatrices,a=r.joints,s=r.bindShapeMatrix,l=r.inverseBindMatrices,u=l.length,c=0;c<u;++c)t$$(o[c])||(o[c]=new c$1a),o[c]=c$1a.multiplyTransformation(lt$d,a[c].transformToRoot,o[c]),o[c]=c$1a.multiplyTransformation(o[c],l[c],o[c]),t$$(s)&&(o[c]=c$1a.multiplyTransformation(o[c],s,o[c]))}}function Oi$3(e){for(var t=e._runtime.rootNodes,i=t.length,n=Kt$5,r=0;r<i;++r){var o=t[r];for(o.computedShow=o.publicNode.show,n.push(o);n.length>0;){for(var a=(o=n.pop()).computedShow,s=o.commands,l=s.length,u=0;u<l;++u)s[u].show=a;var c=o.children;if(t$$(c))for(var h=c.length,d=0;d<h;++d){var f=c[d];f.computedShow=a&&f.publicNode.show,n.push(f)}}}}function Fi$3(e,t){var i=e.id;if(e._id!==i){e._id=i;for(var n=e._pickIds,r=n.length,o=0;o<r;++o)n[o].object.id=i}}function Ui$3(e){if(e._debugWireframe!==e.debugWireframe){e._debugWireframe=e.debugWireframe;for(var t=e.debugWireframe?H$11.LINES:H$11.TRIANGLES,i=e._nodeCommands,n=i.length,r=0;r<n;++r)i[r].command.primitiveType=t}}function qi$2(e){if(e.debugShowBoundingVolume!==e._debugShowBoundingVolume){e._debugShowBoundingVolume=e.debugShowBoundingVolume;for(var t=e.debugShowBoundingVolume,i=e._nodeCommands,n=i.length,r=0;r<n;++r)i[r].command.debugShowBoundingVolume=t}}function Vi$2(e){if(e.shadows!==e._shadows){e._shadows=e.shadows;for(var t=q$Q.castShadows(e.shadows),i=q$Q.receiveShadows(e.shadows),n=e._nodeCommands,r=n.length,o=0;o<r;o++){var a=n[o];a.command.castShadows=t,a.command.receiveShadows=i}}}function zi$2(e){var t=e$1W(e,!0);return t.cull.enabled=!1,t.depthTest.enabled=!0,t.depthMask=!1,t.blending=Ee$s.ALPHA_BLEND,p$1a.fromCache(t)}function Zt$5(e){var t=s$1d.shallowClone(e);return t.pass=we$l.TRANSLUCENT,t.renderState=zi$2(e.renderState),t}function Yt$5(e,t,i){var n=t.scene3DOnly,r=e.color.alpha;if(r>0&&r<1){var o=e._nodeCommands,a=o.length;if(!t$$(o[0].translucentCommand)||i)for(var s=0;s<a;++s){var l=o[s],u=l.command;if(l.translucentCommand=Zt$5(u),!n){var c=l.command2D;l.translucentCommand2D=Zt$5(c)}}}}function Hi$2(e,t){var i=e._rendererResources.programs;for(var n in i)if(i.hasOwnProperty(n)&&i[n]===t)return n}function ki$3(e,t,i){var n=t.vertexShaderSource.sources[0],r=t._attributeLocations,o=e._normalAttributeName;n=a$O.replaceMain(n,"gltf_silhouette_main"),n+="uniform float gltf_silhouetteSize; \nvoid main() \n{ \n gltf_silhouette_main(); \n vec3 n = normalize(czm_normal3D * "+o+"); \n n.x *= czm_projection[0][0]; \n n.y *= czm_projection[1][1]; \n vec4 clip = gl_Position; \n clip.xy += n.xy * clip.w * gltf_silhouetteSize / czm_viewport.z; \n gl_Position = clip; \n}";return p$15.fromCache({context:i.context,vertexShaderSource:n,fragmentShaderSource:"uniform vec4 gltf_silhouetteColor; \nvoid main() \n{ \n gl_FragColor = gltf_silhouetteColor; \n}",attributeLocations:r})}function Qt$6(e,t){return At$4(t.context)&&e.silhouetteSize>0&&e.silhouetteColor.alpha>0&&t$$(e._normalAttributeName)}function Gi$3(e){for(var t=e._nodeCommands,i=t.length,n=0;n<i;++n){if(t[n].command.pass===we$l.TRANSLUCENT)return!0}return!1}function dt$c(e){return e.color.alpha>0&&e.color.alpha<1}function Xt$4(e){return 0===e.color.alpha}function $t$5(e,t){return Math.floor(e)!==Math.floor(t)||Math.ceil(e)!==Math.ceil(t)}var Wi$3=0;function Ki$2(e,t){for(var i=++Wi$3%255,n=Gi$3(e)||dt$c(e)||e.silhouetteColor.alpha<1,r=e._rendererResources.silhouettePrograms,o=t.scene3DOnly,a=e._nodeCommands,s=a.length,l=0;l<s;++l){var u=a[l],c=u.command,h=dt$c(e)?u.translucentCommand:c,d=s$1d.shallowClone(h),f=e$1W(h.renderState);f.stencilTest={enabled:!0,frontFunction:de$x.ALWAYS,backFunction:de$x.ALWAYS,reference:i,mask:-1,frontOperation:{fail:de$x.KEEP,zFail:de$x.KEEP,zPass:de$x.REPLACE},backOperation:{fail:de$x.KEEP,zFail:de$x.KEEP,zPass:de$x.REPLACE}},Xt$4(e)&&(f.colorMask={red:!1,green:!1,blue:!1,alpha:!1},f.depthMask=!1),f=p$1a.fromCache(f),d.renderState=f,u.silhouetteModelCommand=d;var p=s$1d.shallowClone(c);(f=e$1W(c.renderState,!0)).depthTest.enabled=!0,f.cull.enabled=!1,n&&(p.pass=we$l.TRANSLUCENT,f.depthMask=!1,f.blending=Ee$s.ALPHA_BLEND),f.stencilTest={enabled:!0,frontFunction:de$x.NOTEQUAL,backFunction:de$x.NOTEQUAL,reference:i,mask:-1,frontOperation:{fail:de$x.KEEP,zFail:de$x.KEEP,zPass:de$x.KEEP},backOperation:{fail:de$x.KEEP,zFail:de$x.KEEP,zPass:de$x.KEEP}},f=p$1a.fromCache(f);var _=c.shaderProgram,m=Hi$2(e,_),$=r[m];t$$($)||($=ki$3(e,_,t),r[m]=$);var g=s$1n(c.uniformMap,{gltf_silhouetteColor:pi$5(e),gltf_silhouetteSize:_i$4(e)});if(p.renderState=f,p.shaderProgram=$,p.uniformMap=g,p.castShadows=!1,p.receiveShadows=!1,u.silhouetteColorCommand=p,!o){var y=u.command2D,v=s$1d.shallowClone(d);v.boundingVolume=y.boundingVolume,v.modelMatrix=y.modelMatrix,u.silhouetteModelCommand2D=v;var x=s$1d.shallowClone(p);v.boundingVolume=y.boundingVolume,v.modelMatrix=y.modelMatrix,u.silhouetteColorCommand2D=x}}}function ji$3(e,t,i){return e=a$O.replaceMain(e,"gltf_clip_main"),e+=L$D._getClippingFunction(t,i)+"\n",e+="uniform sampler2D gltf_clippingPlanes; \nuniform mat4 gltf_clippingPlanesMatrix; \nuniform vec4 gltf_clippingPlanesEdgeStyle; \nvoid main() \n{ \n gltf_clip_main(); \n"+a$z("gltf_clippingPlanes","gltf_clippingPlanesMatrix","gltf_clippingPlanesEdgeStyle")+"} \n"}function er$3(e,t,i){if(Qt$6(e,t)){var n=e._nodeCommands,r=$t$5(e.color.alpha,e._colorPreviousAlpha)||$t$5(e.silhouetteColor.alpha,e._silhouetteColorPreviousAlpha)||!t$$(n[0].silhouetteModelCommand);e._colorPreviousAlpha=e.color.alpha,e._silhouetteColorPreviousAlpha=e.silhouetteColor.alpha,(r||i)&&Ki$2(e,t)}}function Ji$1(e,t){var i=e._clippingPlanes;t$$(i)&&i.owner===e&&i.enabled&&i.update(t)}var ht$8=new c$19;function Zi$3(e,t,i){return ht$8.center=e,ht$8.radius=t,i.camera.getPixelSize(ht$8,i.context.drawingBufferWidth,i.context.drawingBufferHeight)}var N$A=new a$11,be$k=new i$1g,Yi$2=new a$11;function Qi$1(e,t){var i=e.scale;if(0!==e.minimumPixelSize){var n=t.context,r=Math.max(n.drawingBufferWidth,n.drawingBufferHeight),o=t$$(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix;if(N$A.x=o[12],N$A.y=o[13],N$A.z=o[14],t$$(e._rtcCenter)&&a$11.add(e._rtcCenter,N$A,N$A),e._mode!==b$1d.SCENE3D){var a=t.mapProjection,s=a.ellipsoid.cartesianToCartographic(N$A,be$k);a.project(s,N$A),a$11.fromElements(N$A.z,N$A.x,N$A.y,N$A)}var l=e.boundingSphere.radius,u=Zi$3(N$A,l,t),c=1/u;Math.min(c*(2*l),r)<e.minimumPixelSize&&(i=e.minimumPixelSize*u/(2*e._initialRadius))}return i instanceof a$11?t$$(e.maximumScale)&&(i.x=i.x>e.maximumScale?e.maximumScale:i.x,i.y=i.y>e.maximumScale?e.maximumScale:i.y,i.z=i.z>e.maximumScale?e.maximumScale:i.z):(t$$(e.maximumScale)&&(i=i>e.maximumScale?e.maximumScale:i),i=a$11.fromElements(i,i,i,Yi$2)),i}function tr$4(e){t$$(e._cacheKey)&&t$$(e._cachedGltf)&&0==--e._cachedGltf.count&&delete U$K[e._cacheKey],e._cachedGltf=void 0}function mt$9(e,t){this.buffers=void 0,this.vertexArrays=void 0,this.programs=void 0,this.sourceShaders=void 0,this.silhouettePrograms=void 0,this.textures=void 0,this.samplers=void 0,this.renderStates=void 0,this.ready=!1,this.context=e,this.cacheKey=t,this.count=0}function Q$z(e){for(var t in e)e.hasOwnProperty(t)&&e[t].destroy()}function Xi$3(e){Q$z(e.buffers),Q$z(e.vertexArrays),Q$z(e.programs),Q$z(e.silhouettePrograms),Q$z(e.textures)}function rr$4(e,t,i){return function(n){if(e.heightReference===U$Y.RELATIVE_TO_GROUND){var r=t.cartesianToCartographic(n,be$k);r.height+=i.height,t.cartographicToCartesian(r,n)}var o=e._clampedModelMatrix;c$1a.clone(e.modelMatrix,o),o[12]=n.x,o[13]=n.y,o[14]=n.z,e._heightChanged=!0}}function $i$1(e){t$$(e._removeUpdateHeightCallback)&&(e._removeUpdateHeightCallback(),e._removeUpdateHeightCallback=void 0);var t=e._scene;if(t$$(t)&&t$$(t.globe)&&e.heightReference!==U$Y.NONE){var i=t.globe,n=i.ellipsoid,r=e.modelMatrix;N$A.x=r[12],N$A.y=r[13],N$A.z=r[14];var o=n.cartesianToCartographic(N$A);t$$(e._clampedModelMatrix)||(e._clampedModelMatrix=c$1a.clone(r,new c$1a));var a=i._surface;e._removeUpdateHeightCallback=a.updateHeight(o,rr$4(e,n,o));var s=i.getHeight(o);if(t$$(s)){var l=rr$4(e,n,o);i$1g.clone(o,be$k),be$k.height=s,n.cartographicToCartesian(be$k,N$A),l(N$A)}}else{if(e.heightReference!==U$Y.NONE)throw new t$_("Height reference is not supported without a scene and globe.");e._clampedModelMatrix=void 0}}mt$9.prototype.release=function(){if(0==--this.count)return t$$(this.cacheKey)&&delete this.context.cache.modelRendererResourceCache[this.cacheKey],Xi$3(this),s$1e(this)};var en$4=new a$11,tn$3=new i$1g;function rn$3(e,t){var i,n=e.distanceDisplayCondition,r=n.near*n.near,o=n.far*n.far;if(t.mode===b$1d.SCENE2D){i=.5*(t.camera.frustum.right-t.camera.frustum.left),i*=i}else{var a=c$1a.getTranslation(e.modelMatrix,en$4);if(t.mode===b$1d.COLUMBUS_VIEW){var s=t.mapProjection,l=s.ellipsoid.cartesianToCartographic(a,tn$3);a=s.project(l,a),a$11.fromElements(a.z,a.x,a.y,a)}i=a$11.distanceSquared(a,t.camera.positionWC)}return i>=r&&i<=o}var nn$3=new a$11,pe$g=new a$11,Pe$h=new c$1a;function ir$5(e,t){e.programs!==t.programs&&Q$z(e.programs),e.silhouettePrograms!==t.silhouettePrograms&&Q$z(e.silhouettePrograms)}function on$2(e,t){var i,n=e._rendererResources,r=e._cachedRendererResources;if(ir$5(n,r),Lt$7(e)||rt$d(e)||e._shouldRegenerateShaders){e._shouldRegenerateShaders=!1,n.programs={},n.silhouettePrograms={};var o={},a=e._sourceTechniques;for(var s in a)a.hasOwnProperty(s)&&(o[i=a[s].program]||(o[i]=!0,jr({programId:i,techniqueId:s},e,t.context,t)))}else n.programs=r.programs,n.silhouettePrograms=r.silhouettePrograms;for(var l=n.programs,u=e._nodeCommands,c=u.length,h=0;h<c;++h){var d=u[h],f=l[i=d.programId];d.command.shaderProgram=f,t$$(d.command2D)&&(d.command2D.shaderProgram=f)}Yt$5(e,t,!0),er$3(e,t,!0)}function n$D(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._model=void 0,this._batchTable=void 0,this._features=void 0,this._batchIdAttributeName=void 0,this._diffuseAttributeOrUniformName={},this._rtcCenterTransform=void 0,this._contentModelMatrix=void 0,this.featurePropertiesDirty=!1,re$p(this,n,r)}L$D.prototype.update=function(e){if(e.multiViewportIndex>-1&&t$$(this.id)){var t=this.id.entityCollection;if(t$$(t)){var i=t.owner;if(t$$(i)&&typeof i.getVisibleInViewport<"u")if(!i.getVisibleInViewport(e.multiViewportIndex))return}}if(e.mode!==b$1d.MORPHING){var n=o$$.supportsWebPSync();if(t$$(n)){var r=e.context;if(this._defaultTexture=r.defaultTexture,this._state===F$A.NEEDS_LOAD&&t$$(this.gltf)){var o,a=this.cacheKey;if(t$$(a)){r.cache.modelRendererResourceCache=e$1Y(r.cache.modelRendererResourceCache,{});var s=r.cache.modelRendererResourceCache;if(t$$(o=s[this.cacheKey])){if(!o.ready)return;++o.count,this._loadRendererResourcesFromCache=!0}else(o=new mt$9(r,a)).count=1,s[this.cacheKey]=o;this._cachedRendererResources=o}else(o=new mt$9(r)).count=1,this._cachedRendererResources=o;if(this._state=F$A.LOADING,this._state!==F$A.FAILED){var l=this.gltf.extensions;if(t$$(l)&&t$$(l.CESIUM_RTC)){var u=a$11.fromArray(l.CESIUM_RTC.center);if(!a$11.equals(u,a$11.ZERO)){this._rtcCenter3D=u;var c=e.mapProjection,h=c.ellipsoid.cartesianToCartographic(this._rtcCenter3D),d=c.project(h);a$11.fromElements(d.z,d.x,d.y,d),this._rtcCenter2D=d,this._rtcCenterEye=new a$11,this._rtcCenter=this._rtcCenter3D}}f$H(this.gltf),this._loadResources=new t$y,this._loadRendererResourcesFromCache||s$G.parseBuffers(this,Dr$2)}}var f=this._loadResources,p=this._incrementallyLoadTextures,_=!1;if(this._state===F$A.LOADING){if(0===f.pendingBufferLoads){if(!f.initialized){if(e.brdfLutGenerator.update(e),s$G.checkSupportedExtensions(this.extensionsRequired,n),s$G.updateForwardAxis(this),!this._loadRendererResourcesFromCache){var m=this.gltf;m.extras.sourceVersion=s$G.getAssetVersion(m),m.extras.sourceKHRTechniquesWebGL=t$$(s$G.getUsedExtensions(m).KHR_techniques_webgl),this._sourceVersion=m.extras.sourceVersion,this._sourceKHRTechniquesWebGL=m.extras.sourceKHRTechniquesWebGL,te$r(m),h$K(m);var $={addBatchIdToGeneratedShaders:this._addBatchIdToGeneratedShaders};le$o(m,$),_e$f(m,$)}this._sourceVersion=this.gltf.extras.sourceVersion,this._sourceKHRTechniquesWebGL=this.gltf.extras.sourceKHRTechniquesWebGL,this._dequantizeInShader=this._dequantizeInShader&&r$s.hasExtension(this),Ir$1(this),Br$1(this),this._loadRendererResourcesFromCache||(Nr$2(this),Fr$1(this),Ur(this),zr(this,r,n)),kr$2(this),Gr(this),Hr(this),r$s.parse(this,r),f.initialized=!0}f.finishedDecoding()||r$s.decodeModel(this,r).otherwise(s$G.getFailedLoadFunction(this,"model",this.basePath)),f.finishedDecoding()&&!f.resourcesParsed&&(this._boundingSphere=s$G.computeBoundingSphere(this),this._initialRadius=this._boundingSphere.radius,r$s.cacheDataForModel(this),f.resourcesParsed=!0),f.resourcesParsed&&0===f.pendingShaderLoads&&Gt$7(this,e)}(f.finished()||p&&f.finishedEverythingButTextureCreation())&&(this._state=F$A.LOADED,_=!0)}if(t$$(f)&&this._state===F$A.LOADED&&(p&&!_&&Gt$7(this,e),f.finished())){this._loadResources=void 0;var g=this._rendererResources,y=this._cachedRendererResources;y.buffers=g.buffers,y.vertexArrays=g.vertexArrays,y.programs=g.programs,y.sourceShaders=g.sourceShaders,y.silhouettePrograms=g.silhouettePrograms,y.textures=g.textures,y.samplers=g.samplers,y.renderStates=g.renderStates,y.ready=!0,this._normalAttributeName=s$G.getAttributeOrUniformBySemantic(this.gltf,"NORMAL"),t$$(this._precreatedAttributes)&&(y.vertexArrays={}),this.releaseGltfJson&&tr$4(this)}var v=n$E.isSupported(r);if(this._shouldUpdateSpecularMapAtlas&&v){if(this._shouldUpdateSpecularMapAtlas=!1,this._specularEnvironmentMapAtlas=this._specularEnvironmentMapAtlas&&this._specularEnvironmentMapAtlas.destroy(),this._specularEnvironmentMapAtlas=void 0,t$$(this._specularEnvironmentMaps)){this._specularEnvironmentMapAtlas=new n$E(this._specularEnvironmentMaps);var x=this;this._specularEnvironmentMapAtlas.readyPromise.then((function(){x._shouldRegenerateShaders=!0}))}this._shouldRegenerateShaders=!0}t$$(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.update(e);var b=!t$$(this._specularEnvironmentMapAtlas)&&t$$(e.specularEnvironmentMaps)&&!this._useDefaultSpecularMaps,S=!t$$(e.specularEnvironmentMaps)&&this._useDefaultSpecularMaps,w=!t$$(this._sphericalHarmonicCoefficients)&&t$$(e.sphericalHarmonicCoefficients)&&!this._useDefaultSphericalHarmonics,C=!t$$(e.sphericalHarmonicCoefficients)&&this._useDefaultSphericalHarmonics;this._shouldRegenerateShaders=this._shouldRegenerateShaders||b||S||w||C,this._useDefaultSpecularMaps=!t$$(this._specularEnvironmentMapAtlas)&&t$$(e.specularEnvironmentMaps),this._useDefaultSphericalHarmonics=!t$$(this._sphericalHarmonicCoefficients)&&t$$(e.sphericalHarmonicCoefficients);var T=Qt$6(this,e),P=dt$c(this),E=Xt$4(this),A=!t$$(this.distanceDisplayCondition)||rn$3(this,e),L=this.show&&A&&(this.scale instanceof a$11?!a$11.equals(this._scale,a$11.ZERO):0!==this.scale)&&(!E||T);if(L&&this._state===F$A.LOADED||_){var M=this.activeAnimations.update(e)||this._cesiumAnimationsDirty;this._cesiumAnimationsDirty=!1,this._dirty=!1;var I=this.modelMatrix,O=e.mode!==this._mode;this._mode=e.mode;var D=!c$1a.equals(this._modelMatrix,I)||(this.scale instanceof a$11?!a$11.equals(this._scale,this.scale):this._scale!==this.scale)||this._minimumPixelSize!==this.minimumPixelSize||0!==this.minimumPixelSize||this._maximumScale!==this.maximumScale||this._heightReference!==this.heightReference||this._heightChanged||O;if(D||_){c$1a.clone(I,this._modelMatrix),$i$1(this),t$$(this._clampedModelMatrix)&&(I=this._clampedModelMatrix),this._minimumPixelSize=this.minimumPixelSize,this._maximumScale=this.maximumScale,this._heightReference=this.heightReference,this._heightChanged=!1;var R=Qi$1(this,e),N=this._computedModelMatrix;if(t$$(this._offsetMatrix)){if(!this._lastDefinedOffset){"number"==typeof this._scale?(pe$g.x=this._scale,pe$g.y=this._scale,pe$g.z=this._scale):a$11.clone(this._scale,pe$g);var F=c$1a.getTranslation(this._offsetMatrix,nn$3),B=a$11.divideComponents(F,pe$g,pe$g);a$11.negate(F,F),this._offsetMat4ForScale=this._offsetMat4ForScale||new c$1a,this._realOffsetMat4ForScale=this._realOffsetMat4ForScale||new c$1a,c$1a.fromTranslation(F,this._offsetMat4ForScale),c$1a.fromTranslation(B,this._realOffsetMat4ForScale)}c$1a.multiply(c$1a.fromScale(R),this._realOffsetMat4ForScale,Pe$h),c$1a.multiply(this._offsetMat4ForScale,Pe$h,Pe$h)}else c$1a.fromScale(R,Pe$h);c$1a.multiply(I,Pe$h,N),this._scale=this.scale,this._lastDefinedOffset=t$$(this._offsetMatrix),this._upAxis===z$y.Y?c$1a.multiplyTransformation(N,z$y.Y_UP_TO_Z_UP,N):this._upAxis===z$y.X&&c$1a.multiplyTransformation(N,z$y.X_UP_TO_Z_UP,N),this.forwardAxis===z$y.Z&&c$1a.multiplyTransformation(N,z$y.Z_UP_TO_X_UP,N)}(M||D||_)&&(jt$6(this,D,_,e.mapProjection),this._dirty=!0,(M||_)&&Jt$7(this)),this._perNodeShowDirty&&(this._perNodeShowDirty=!1,Oi$3(this)),Fi$3(this),Ui$3(this),qi$2(this),Vi$2(this),Ji$1(this,e);var z=this._clippingPlanes,G=0,k=t$$(z)&&z.enabled&&z.length>0,U=t$$(this._sphericalHarmonicCoefficients)||this._useDefaultSphericalHarmonics,V=t$$(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.ready||this._useDefaultSpecularMaps;if(k||U||V){var W=e$1Y(this.clippingPlanesOriginMatrix,I);c$1a.multiply(r.uniformState.view3D,W,this._clippingPlaneModelViewMatrix)}k&&(G=z.clippingPlanesState),e.lightSource.hasChange()&&(this._shouldRegenerateShaders=!0);var H=this._shouldRegenerateShaders;H=H||this._clippingPlanesState!==G,this._clippingPlanesState=G;var Y=rt$d(this);Y!==this._colorShadingEnabled&&(this._colorShadingEnabled=Y,H=!0),H?on$2(this,e):(Yt$5(this,e,!1),er$3(this,e,!1))}if(_){var j=this;return void e.afterRender.push((function(){j._ready=!0,j._readyPromise.resolve(j)}))}if(L&&!this._ignoreCommands){var q,X,K,Z=e.commandList,J=e.passes,Q=this._nodeCommands,ee=Q.length,te=e.mapProjection.ellipsoid.maximumRadius*n$1d.PI;if(J.render||J.pick&&this.allowPicking){for(q=0;q<ee;++q)if((X=Q[q]).show){var ie=P?X.translucentCommand:X.command;if(ie=T?X.silhouetteModelCommand:ie,Z.push(ie),K=X.command.boundingVolume,e.mode===b$1d.SCENE2D&&(K.center.y+K.radius>te||K.center.y-K.radius<te)){var ne=P?X.translucentCommand2D:X.command2D;ne=T?X.silhouetteModelCommand2D:ne,Z.push(ne)}}if(T&&!J.pick)for(q=0;q<ee;++q)(X=Q[q]).show&&(Z.push(X.silhouetteColorCommand),K=X.command.boundingVolume,e.mode===b$1d.SCENE2D&&(K.center.y+K.radius>te||K.center.y-K.radius<te)&&Z.push(X.silhouetteColorCommand2D))}}}}},L$D.prototype.updateAnimation=function(e){this._state===F$A.LOADED&&((this.activeAnimations.update(e)||this._cesiumAnimationsDirty)&&(jt$6(this,!0,!0,e.mapProjection),Jt$7(this)))},L$D.prototype.isDestroyed=function(){return!1},L$D.prototype.destroy=function(){t$$(this._precreatedAttributes)&&Q$z(this._rendererResources.vertexArrays),t$$(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),t$$(this._terrainProviderChangedCallback)&&(this._terrainProviderChangedCallback(),this._terrainProviderChangedCallback=void 0),t$$(this._cachedRendererResources)&&ir$5(this._rendererResources,this._cachedRendererResources),this._rendererResources=void 0,this._cachedRendererResources=this._cachedRendererResources&&this._cachedRendererResources.release(),r$s.destroyCachedDataForModel(this);for(var e=this._pickIds,t=e.length,i=0;i<t;++i)e[i].destroy();tr$4(this),this._quantizedVertexShaders=void 0;var n=this._clippingPlanes;return t$$(n)&&!n.isDestroyed()&&n.owner===this&&n.destroy(),this._clippingPlanes=void 0,this._specularEnvironmentMapAtlas=this._specularEnvironmentMapAtlas&&this._specularEnvironmentMapAtlas.destroy(),s$1e(this)},L$D._getClippingFunction=f$F,L$D._modifyShaderForColor=Kr$1,n$D._deprecationWarning=i$1b,Object.defineProperties(n$D.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)}},batchTable:{get:function(){return this._batchTable}}});var l$F=Uint32Array.BYTES_PER_ELEMENT;function $$A(e){var t=s$G.getAttributeOrUniformBySemantic(e,"_BATCHID");return t$$(t)||t$$(t=s$G.getAttributeOrUniformBySemantic(e,"BATCHID"))&&n$D._deprecationWarning("b3dm-legacy-batchid","The glTF in this b3dm uses the semantic `BATCHID`. Application-specific semantics should be prefixed with an underscore: `_BATCHID`."),t}function O$v(e){return function(t,i){var n=e._batchTable,r=!t$$(e._tileset.classificationType),o=e._model.gltf;t$$(o)&&(e._batchIdAttributeName=$$A(o),e._diffuseAttributeOrUniformName[i]=s$G.getDiffuseAttributeOrUniform(o,i));var a=n.getVertexShaderCallback(r,e._batchIdAttributeName,e._diffuseAttributeOrUniformName[i]);return t$$(a)?a(t):t}}function ee$o(e){return function(t,i){var n=e._batchTable,r=!t$$(e._tileset.classificationType),o=e._model.gltf;t$$(o)&&(e._diffuseAttributeOrUniformName[i]=s$G.getDiffuseAttributeOrUniform(o,i));var a=n.getFragmentShaderCallback(r,e._diffuseAttributeOrUniformName[i]);return t$$(a)?a(t):t}}function N$z(e){return function(){return e._batchTable.getPickId()}}function te$n(e){return function(t){var i=e._batchTable.getClassificationFragmentShaderCallback();return t$$(i)?i(t):t}}function ie$o(e){return function(t,i){e._model.updateCommands(t,i)}}function re$p(e,t,i){var n=e._tileset,r=e._tile,o=e._resource,a=e$1Y(i,0);i=a;var s=new Uint8Array(t),l=new DataView(t);i+=l$F;var u=l.getUint32(i,!0);if(1!==u)throw new t$Z("Only Batched 3D Model version 1 is supported. Version "+u+" is not.");i+=l$F;var c=l.getUint32(i,!0);i+=l$F;var h=l.getUint32(i,!0);i+=l$F;var d=l.getUint32(i,!0);i+=l$F;var f=l.getUint32(i,!0);i+=l$F;var p,_,m=l.getUint32(i,!0);if(i+=l$F,f>=570425344?(i-=2*l$F,p=h,f=d,m=0,h=0,d=0,n$D._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchLength] [batchTableByteLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] from https://github.com/CesiumGS/3d-tiles/tree/master/specification/TileFormats/Batched3DModel.")):m>=570425344&&(i-=l$F,p=f,f=h,m=d,h=0,d=0,n$D._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchTableJsonByteLength] [batchTableBinaryByteLength] [batchLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] from https://github.com/CesiumGS/3d-tiles/tree/master/specification/TileFormats/Batched3DModel.")),0===h)_={BATCH_LENGTH:e$1Y(p,0)};else{var $=c$X(s,i,h);_=JSON.parse($),i+=h}var g=new Uint8Array(t,i,d);i+=d;var y,v,x,b=new p$P(_,g);if(p=b.getGlobalProperty("BATCH_LENGTH"),b.featuresLength=p,f>0){var S=c$X(s,i,f);y=JSON.parse(S),i+=f,m>0&&(v=new Uint8Array(t,i,m),v=new Uint8Array(v),i+=m)}t$$(n.classificationType)&&(x=ie$o(e));var w=new p$Q(e,p,y,v,x);e._batchTable=w;var C,T=a+c-i;if(0===T)throw new t$Z("glTF byte length must be greater than 0.");i%4==0?C=new Uint8Array(t,i,T):(n$D._deprecationWarning("b3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),C=new Uint8Array(s.subarray(i,i+T)));var P={content:e,primitive:n};e._rtcCenterTransform=c$1a.IDENTITY;var E=b.getGlobalProperty("RTC_CENTER",C$12.FLOAT,3);t$$(E)&&(e._rtcCenterTransform=c$1a.fromTranslation(a$11.fromArray(E))),e._contentModelMatrix=c$1a.multiply(r.computedTransform,e._rtcCenterTransform,new c$1a),t$$(n.classificationType)?e._model=new w$K({gltf:C,cull:!1,basePath:o,requestType:V$_.TILES3D,modelMatrix:e._contentModelMatrix,upAxis:n._gltfUpAxis,forwardAxis:z$y.X,debugWireframe:n.debugWireframe,vertexShaderLoaded:O$v(e),classificationShaderLoaded:te$n(e),uniformMapLoaded:w.getUniformMapCallback(),pickIdLoaded:N$z(e),classificationType:n._classificationType,batchTable:w}):e._model=new L$D({gltf:C,cull:!1,releaseGltfJson:!0,opaquePass:we$l.CESIUM_3D_TILE,basePath:o,requestType:V$_.TILES3D,modelMatrix:e._contentModelMatrix,upAxis:n._gltfUpAxis,forwardAxis:z$y.X,shadows:n.shadows,debugWireframe:n.debugWireframe,incrementallyLoadTextures:!1,vertexShaderLoaded:O$v(e),fragmentShaderLoaded:ee$o(e),uniformMapLoaded:w.getUniformMapCallback(),pickIdLoaded:N$z(e),addBatchIdToGeneratedShaders:p>0,pickObject:P,imageBasedLightingFactor:n.imageBasedLightingFactor,lightColor:n.lightColor,luminanceAtZenith:n.luminanceAtZenith,sphericalHarmonicCoefficients:n.sphericalHarmonicCoefficients,specularEnvironmentMaps:n.specularEnvironmentMaps,owner:n})}function ae$m(e){var t=e.featuresLength;if(!t$$(e._features)&&t>0){for(var i=new Array(t),n=0;n<t;++n)i[n]=new e$Z(e,n);e._features=i}}function i$D(e,t,i,n,r,o){this._tileset=e,this._tile=t,this._resource=i,this._contents=[],this._readyPromise=c$18.defer(),L$C(this,n,r,o)}n$D.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},n$D.prototype.getFeature=function(e){var t=this.featuresLength;if(!t$$(e)||e<0||e>=t)throw new t$_("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return ae$m(this),this._features[e]},n$D.prototype.applyDebugSettings=function(e,t){t=e?t:e$1z.WHITE,0===this.featuresLength?this._model.color=t:this._batchTable.setAllColor(t)},n$D.prototype.applyStyle=function(e){if(0===this.featuresLength){var t=t$$(e)&&t$$(e.color),i=t$$(e)&&t$$(e.show);this._model.color=t?e.color.evaluateColor(void 0,this._model.color):e$1z.clone(e$1z.WHITE,this._model.color),this._model.show=!i||e.show.evaluate(void 0)}else this._batchTable.applyStyle(e)},n$D.prototype.update=function(e,t){var i=t.commandList.length;this._batchTable.update(e,t),this._contentModelMatrix=c$1a.multiply(this._tile.computedTransform,this._rtcCenterTransform,this._contentModelMatrix),this._model.modelMatrix=this._contentModelMatrix,this._model.shadows=this._tileset.shadows,this._model.imageBasedLightingFactor=this._tileset.imageBasedLightingFactor,this._model.lightColor=this._tileset.lightColor,this._model.luminanceAtZenith=this._tileset.luminanceAtZenith,this._model.sphericalHarmonicCoefficients=this._tileset.sphericalHarmonicCoefficients,this._model.specularEnvironmentMaps=this._tileset.specularEnvironmentMaps,this._model.debugWireframe=this._tileset.debugWireframe;var n=this._tileset.clippingPlanes;this._model.clippingPlanesOriginMatrix=this._tileset.clippingPlanesOriginMatrix,t$$(n)&&this._tile.clippingPlanesDirty&&(this._model._clippingPlanes=n.enabled&&this._tile._isClipped?n:void 0),t$$(n)&&t$$(this._model._clippingPlanes)&&this._model._clippingPlanes!==n&&(this._model._clippingPlanes=n),this._model.update(t),i<t.commandList.length&&(t.passes.render||t.passes.pick)&&!t$$(e.classificationType)&&this._batchTable.addDerivedCommands(t,i)},n$D.prototype.isDestroyed=function(){return!1},n$D.prototype.destroy=function(){return this._model=this._model&&this._model.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),s$1e(this)},Object.defineProperties(i$D.prototype,{featurePropertiesDirty:{get:function(){for(var e=this._contents,t=e.length,i=0;i<t;++i)if(e[i].featurePropertiesDirty)return!0;return!1},set:function(e){for(var t=this._contents,i=t.length,n=0;n<i;++n)t[n].featurePropertiesDirty=e}},featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){return this._contents}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}}});var u$G=Uint32Array.BYTES_PER_ELEMENT;function L$C(e,t,i,n){i=e$1Y(i,0);var r=new Uint8Array(t),o=new DataView(t);i+=u$G;var a=o.getUint32(i,!0);if(1!==a)throw new t$Z("Only Composite Tile version 1 is supported. Version "+a+" is not.");i+=u$G,i+=u$G;var s=o.getUint32(i,!0);i+=u$G;for(var l=[],u=0;u<s;++u){var c=e$1h(r,i),h=o.getUint32(i+2*u$G,!0),d=n[c];if(!t$$(d))throw new t$Z("Unknown tile content type, "+c+", inside Composite tile");var f=d(e._tileset,e._tile,e._resource,t,i);e._contents.push(f),l.push(f.readyPromise),i+=h}c$18.all(l).then((function(){e._readyPromise.resolve(e)})).otherwise((function(t){e._readyPromise.reject(t)}))}function s$C(e){this._boxes=e.boxes,this._boxBatchIds=e.boxBatchIds,this._cylinders=e.cylinders,this._cylinderBatchIds=e.cylinderBatchIds,this._ellipsoids=e.ellipsoids,this._ellipsoidBatchIds=e.ellipsoidBatchIds,this._spheres=e.spheres,this._sphereBatchIds=e.sphereBatchIds,this._modelMatrix=e.modelMatrix,this._batchTable=e.batchTable,this._boundingVolume=e.boundingVolume,this._center=e.center,t$$(this._center)||(t$$(this._boundingVolume)?this._center=a$11.clone(this._boundingVolume.center):this._center=a$11.clone(a$11.ZERO)),this._boundingVolumes=void 0,this._batchedIndices=void 0,this._indices=void 0,this._indexOffsets=void 0,this._indexCounts=void 0,this._positions=void 0,this._vertexBatchIds=void 0,this._batchIds=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._ready=!1,this._readyPromise=c$18.defer(),this._verticesPromise=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=_0x29401c.BOTH}function R$w(e){var t=new Float64Array(c$1a.packedLength+a$11.packedLength),i=0;return a$11.pack(e._center,t,i),i+=a$11.packedLength,c$1a.pack(e._modelMatrix,t,i),t}function S$u(e,t){for(var i=0,n=t[i++],r=t[i++],o=e._boundingVolumes=new Array(r),a=0;a<r;++a)o[a]=c$19.unpack(t,i),i+=c$19.packedLength;for(var s=t[i++],l=e._batchedIndices=new Array(s),u=0;u<s;++u){var c=e$1z.unpack(t,i);i+=e$1z.packedLength;for(var h=t[i++],d=t[i++],f=t[i++],p=new Array(f),_=0;_<f;++_)p[_]=t[i++];l[u]=new s$F({color:c,offset:h,count:d,batchIds:p})}return n}i$D.prototype.hasProperty=function(e,t){return!1},i$D.prototype.getFeature=function(e){},i$D.prototype.applyDebugSettings=function(e,t){for(var i=this._contents,n=i.length,r=0;r<n;++r)i[r].applyDebugSettings(e,t)},i$D.prototype.applyStyle=function(e){for(var t=this._contents,i=t.length,n=0;n<i;++n)t[n].applyStyle(e)},i$D.prototype.update=function(e,t){for(var i=this._contents,n=i.length,r=0;r<n;++r)i[r].update(e,t)},i$D.prototype.isDestroyed=function(){return!1},i$D.prototype.destroy=function(){for(var e=this._contents,t=e.length,i=0;i<t;++i)e[i].destroy();return s$1e(this)},Object.defineProperties(s$C.prototype,{trianglesLength:{get:function(){return t$$(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return t$$(this._primitive)?this._primitive.geometryByteLength:0}},readyPromise:{get:function(){return this._readyPromise.promise}}}),s$C.packedBoxLength=c$1a.packedLength+a$11.packedLength,s$C.packedCylinderLength=c$1a.packedLength+2,s$C.packedEllipsoidLength=c$1a.packedLength+a$11.packedLength,s$C.packedSphereLength=a$11.packedLength+1;var M$H=new o$_("createVectorTileGeometries"),D$F=new e$1z;function W$I(e){if(!t$$(e._primitive)){if(!t$$(e._verticesPromise)){var t=e._boxes,i=e._boxBatchIds,n=e._cylinders,r=e._cylinderBatchIds,o=e._ellipsoids,a=e._ellipsoidBatchIds,s=e._spheres,l=e._sphereBatchIds,u=e._batchTableColors,c=e._packedBuffer;if(!t$$(u)){var h=0;t$$(e._boxes)&&(t=e._boxes=l$Z(t),h+=(i=e._boxBatchIds=l$Z(i)).length),t$$(e._cylinders)&&(n=e._cylinders=l$Z(n),h+=(r=e._cylinderBatchIds=l$Z(r)).length),t$$(e._ellipsoids)&&(o=e._ellipsoids=l$Z(o),h+=(a=e._ellipsoidBatchIds=l$Z(a)).length),t$$(e._spheres)&&(s=e._sphere=l$Z(s),h+=(l=e._sphereBatchIds=l$Z(l)).length),u=e._batchTableColors=new Uint32Array(h);for(var d=e._batchTable,f=0;f<h;++f){var p=d.getColor(f,D$F);u[f]=p.toRgba()}c=e._packedBuffer=R$w(e)}var _=[];t$$(t)&&_.push(t.buffer,i.buffer),t$$(n)&&_.push(n.buffer,r.buffer),t$$(o)&&_.push(o.buffer,a.buffer),t$$(s)&&_.push(s.buffer,l.buffer),_.push(u.buffer,c.buffer);var m={boxes:t$$(t)?t.buffer:void 0,boxBatchIds:t$$(t)?i.buffer:void 0,cylinders:t$$(n)?n.buffer:void 0,cylinderBatchIds:t$$(n)?r.buffer:void 0,ellipsoids:t$$(o)?o.buffer:void 0,ellipsoidBatchIds:t$$(o)?a.buffer:void 0,spheres:t$$(s)?s.buffer:void 0,sphereBatchIds:t$$(s)?l.buffer:void 0,batchTableColors:u.buffer,packedBuffer:c.buffer},$=e._verticesPromise=M$H.scheduleTask(m,_);if(!t$$($))return;$.then((function(t){var i=new Float64Array(t.packedBuffer),n=S$u(e,i);e._indices=2===n?new Uint16Array(t.indices):new Uint32Array(t.indices),e._indexOffsets=new Uint32Array(t.indexOffsets),e._indexCounts=new Uint32Array(t.indexCounts),e._positions=new Float32Array(t.positions),e._vertexBatchIds=new Uint16Array(t.vertexBatchIds),e._batchIds=new Uint16Array(t.batchIds),e._ready=!0}))}e._ready&&!t$$(e._primitive)&&(e._primitive=new T$H({batchTable:e._batchTable,positions:e._positions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center,pickObject:e$1Y(e._pickObject,e)}),e._boxes=void 0,e._boxBatchIds=void 0,e._cylinders=void 0,e._cylinderBatchIds=void 0,e._ellipsoids=void 0,e._ellipsoidBatchIds=void 0,e._spheres=void 0,e._sphereBatchIds=void 0,e._center=void 0,e._modelMatrix=void 0,e._batchTable=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0,e._indices=void 0,e._indexOffsets=void 0,e._indexCounts=void 0,e._positions=void 0,e._vertexBatchIds=void 0,e._batchIds=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._verticesPromise=void 0,e._readyPromise.resolve())}}function l$E(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._geometries=void 0,this._contentReadyPromise=void 0,this._readyPromise=c$18.defer(),this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,K$u(this,n,r)}function j$E(e){return function(t,i){t$$(e._geometries)&&e._geometries.updateCommands(t,i)}}function q$I(e,t){var i,n,r,o,a,s=e$1Y(e.BOXES_LENGTH,0),l=e$1Y(e.CYLINDERS_LENGTH,0),u=e$1Y(e.ELLIPSOIDS_LENGTH,0),c=e$1Y(e.SPHERES_LENGTH,0);if(s>0&&t$$(e.BOX_BATCH_IDS)){var h=t.byteOffset+e.BOX_BATCH_IDS.byteOffset;i=new Uint16Array(t.buffer,h,s)}if(l>0&&t$$(e.CYLINDER_BATCH_IDS)){var d=t.byteOffset+e.CYLINDER_BATCH_IDS.byteOffset;n=new Uint16Array(t.buffer,d,l)}if(u>0&&t$$(e.ELLIPSOID_BATCH_IDS)){var f=t.byteOffset+e.ELLIPSOID_BATCH_IDS.byteOffset;r=new Uint16Array(t.buffer,f,u)}if(c>0&&t$$(e.SPHERE_BATCH_IDS)){var p=t.byteOffset+e.SPHERE_BATCH_IDS.byteOffset;o=new Uint16Array(t.buffer,p,c)}var _=t$$(i)||t$$(n)||t$$(r)||t$$(o),m=s>0&&!t$$(i)||l>0&&!t$$(n)||u>0&&!t$$(r)||c>0&&!t$$(o);if(_&&m)throw new t$Z("If one group of batch ids is defined, then all batch ids must be defined.");if(!(t$$(i)||t$$(n)||t$$(r)||t$$(o))){var $=0;if(!t$$(i)&&s>0)for(i=new Uint16Array(s),a=0;a<s;++a)i[a]=$++;if(!t$$(n)&&l>0)for(n=new Uint16Array(l),a=0;a<l;++a)n[a]=$++;if(!t$$(r)&&u>0)for(r=new Uint16Array(u),a=0;a<u;++a)r[a]=$++;if(!t$$(o)&&c>0)for(o=new Uint16Array(c),a=0;a<c;++a)o[a]=$++}return{boxes:i,cylinders:n,ellipsoids:r,spheres:o}}s$C.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)},s$C.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)},s$C.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)},s$C.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},s$C.prototype.update=function(e){W$I(this),this._ready&&(this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e))},s$C.prototype.isDestroyed=function(){return!1},s$C.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),s$1e(this)},Object.defineProperties(l$E.prototype,{featuresLength:{get:function(){return t$$(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return t$$(this._geometries)?this._geometries.trianglesLength:0}},geometryByteLength:{get:function(){return t$$(this._geometries)?this._geometries.geometryByteLength:0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return t$$(this._batchTable)?this._batchTable.memorySizeInBytes:0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var p$K=Uint32Array.BYTES_PER_ELEMENT;function K$u(e,t,i){i=e$1Y(i,0);var n=new Uint8Array(t),r=new DataView(t);i+=p$K;var o=r.getUint32(i,!0);if(1!==o)throw new t$Z("Only Geometry tile version 1 is supported. Version "+o+" is not.");i+=p$K;var a=r.getUint32(i,!0);if(i+=p$K,0!==a){var s=r.getUint32(i,!0);if(i+=p$K,0===s)throw new t$Z("Feature table must have a byte length greater than zero");var l=r.getUint32(i,!0);i+=p$K;var u=r.getUint32(i,!0);i+=p$K;var c=r.getUint32(i,!0),h=c$X(n,i+=p$K,s),d=JSON.parse(h);i+=s;var f,p,_=new Uint8Array(t,i,l);if(i+=l,u>0){var m=c$X(n,i,u);f=JSON.parse(m),i+=u,c>0&&(p=new Uint8Array(t,i,c),p=new Uint8Array(p))}var $=e$1Y(d.BOXES_LENGTH,0),g=e$1Y(d.CYLINDERS_LENGTH,0),y=e$1Y(d.ELLIPSOIDS_LENGTH,0),v=e$1Y(d.SPHERES_LENGTH,0),x=$+g+y+v,b=new p$Q(e,x,f,p,j$E(e));if(e._batchTable=b,0!==x){var S,w=e.tile.computedTransform;t$$(d.RTC_CENTER)&&(S=a$11.unpack(d.RTC_CENTER),c$1a.multiplyByPoint(w,S,S));var C=q$I(d,_);if($>0||g>0||y>0||v>0){var T,P,E,A;if($>0){var L=_.byteOffset+d.BOXES.byteOffset;T=new Float32Array(_.buffer,L,s$C.packedBoxLength*$)}if(g>0){var M=_.byteOffset+d.CYLINDERS.byteOffset;P=new Float32Array(_.buffer,M,s$C.packedCylinderLength*g)}if(y>0){var I=_.byteOffset+d.ELLIPSOIDS.byteOffset;E=new Float32Array(_.buffer,I,s$C.packedEllipsoidLength*y)}if(v>0){var O=_.byteOffset+d.SPHERES.byteOffset;A=new Float32Array(_.buffer,O,s$C.packedSphereLength*v)}e._geometries=new s$C({boxes:T,boxBatchIds:C.boxes,cylinders:P,cylinderBatchIds:C.cylinders,ellipsoids:E,ellipsoidBatchIds:C.ellipsoids,spheres:A,sphereBatchIds:C.spheres,center:S,modelMatrix:w,batchTable:b,boundingVolume:e.tile.boundingVolume.boundingVolume})}}}else e._readyPromise.resolve(e)}function x$F(e){var t=e.featuresLength;if(!t$$(e._features)&&t>0){var i=new Array(t);t$$(e._geometries)&&e._geometries.createFeatures(e,i),e._features=i}}function e$U(e,t,i){this.primitive=e,this._modelMatrix=c$1a.clone(t),this._instanceId=i}l$E.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},l$E.prototype.getFeature=function(e){var t=this.featuresLength;if(!t$$(e)||e<0||e>=t)throw new t$_("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return x$F(this),this._features[e]},l$E.prototype.applyDebugSettings=function(e,t){t$$(this._geometries)&&this._geometries.applyDebugSettings(e,t)},l$E.prototype.applyStyle=function(e){x$F(this),t$$(this._geometries)&&this._geometries.applyStyle(e,this._features)},l$E.prototype.update=function(e,t){if(t$$(this._geometries)&&(this._geometries.classificationType=this._tileset.classificationType,this._geometries.debugWireframe=this._tileset.debugWireframe,this._geometries.update(t)),t$$(this._batchTable)&&this._geometries._ready&&this._batchTable.update(e,t),!t$$(this._contentReadyPromise)){var i=this;this._contentReadyPromise=this._geometries.readyPromise.then((function(){i._readyPromise.resolve(i)}))}},l$E.prototype.isDestroyed=function(){return!1},l$E.prototype.destroy=function(){return this._geometries=this._geometries&&this._geometries.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),s$1e(this)},Object.defineProperties(e$U.prototype,{instanceId:{get:function(){return this._instanceId}},model:{get:function(){return this.primitive._model}},modelMatrix:{get:function(){return c$1a.clone(this._modelMatrix)},set:function(e){c$1a.clone(e,this._modelMatrix),this.primitive.expandBoundingSphere(this._modelMatrix),this.primitive._dirty=!0}}});var y$E={NEEDS_LOAD:0,LOADING:1,LOADED:2,FAILED:3};function b$R(e){if(!t$$((e=e$1Y(e,e$1Y.EMPTY_OBJECT)).gltf)&&!t$$(e.url))throw new t$_("Either options.gltf or options.url is required.");if(t$$(e.gltf)&&t$$(e.url))throw new t$_("Cannot pass in both options.gltf and options.url.");this.show=e$1Y(e.show,!0),this._instancingSupported=!1,this._dynamic=e$1Y(e.dynamic,!1),this._allowPicking=e$1Y(e.allowPicking,!0),this._ready=!1,this._readyPromise=c$18.defer(),this._state=y$E.NEEDS_LOAD,this._dirty=!1,this._cull=e$1Y(e.cull,!0),this._opaquePass=e$1Y(e.opaquePass,we$l.OPAQUE),this._instances=re$o(this,e.instances),this._batchTable=e.batchTable,this._model=void 0,this._vertexBufferTypedArray=void 0,this._vertexBuffer=void 0,this._batchIdBuffer=void 0,this._instancedUniformsByProgram=void 0,this._drawCommands=[],this._modelCommands=void 0,this._boundingSphere=ie$n(this),this._center=a$11.clone(this._boundingSphere.center),this._rtcTransform=new c$1a,this._rtcModelView=new c$1a,this._mode=void 0,this.modelMatrix=c$1a.clone(c$1a.IDENTITY),this._modelMatrix=c$1a.clone(this.modelMatrix),this._url=t$X.createIfNeeded(e.url),this._requestType=e.requestType,this._gltf=e.gltf,this._basePath=t$X.createIfNeeded(e.basePath),this._asynchronous=e.asynchronous,this._incrementallyLoadTextures=e.incrementallyLoadTextures,this._upAxis=e.upAxis,this._forwardAxis=e.forwardAxis,this.shadows=e$1Y(e.shadows,q$Q.ENABLED),this._shadows=this.shadows,this._pickIdLoaded=e.pickIdLoaded,this.debugShowBoundingVolume=e$1Y(e.debugShowBoundingVolume,!1),this._debugShowBoundingVolume=!1,this.debugWireframe=e$1Y(e.debugWireframe,!1),this._debugWireframe=!1,this._imageBasedLightingFactor=new r$T(1,1),r$T.clone(e.imageBasedLightingFactor,this._imageBasedLightingFactor),this.lightColor=e.lightColor,this.luminanceAtZenith=e.luminanceAtZenith,this.sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,this.specularEnvironmentMaps=e.specularEnvironmentMaps}function re$o(e,t){for(var i=(t=e$1Y(t,[])).length,n=new Array(i),r=0;r<i;++r){var o=t[r],a=o.modelMatrix,s=e$1Y(o.batchId,r);n[r]=new e$U(e,a,s)}return n}function ie$n(e){for(var t=e.length,i=new Array(t),n=0;n<t;++n)i[n]=c$1a.getTranslation(e._instances[n]._modelMatrix,new a$11);return c$19.fromPoints(i)}Object.defineProperties(b$R.prototype,{allowPicking:{get:function(){return this._allowPicking}},length:{get:function(){return this._instances.length}},activeAnimations:{get:function(){return this._model.activeAnimations}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){n$1e.typeOf.object("imageBasedLightingFactor",e),n$1e.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.x",e.x,0),n$1e.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.x",e.x,1),n$1e.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.y",e.y,0),n$1e.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.y",e.y,1),r$T.clone(e,this._imageBasedLightingFactor)}}});var te$m=new a$11,C$C=new c$1a;function ne$k(e,t,i,n){return function(r,o){var a=r.semantic;if(t$$(a)&&e.indexOf(a)>-1){if(!(t.indexOf(a)>-1))throw new t$Z('Shader program cannot be optimized for instancing. Uniform "'+o+'" in program "'+i+'" uses unsupported semantic "'+a+'"');n[o]=a}}}function W$H(e,t){if(t$$(e._instancedUniformsByProgram))return e._instancedUniformsByProgram[t];var i={};e._instancedUniformsByProgram=i;var n=["MODEL","MODELVIEW","CESIUM_RTC_MODELVIEW","MODELVIEWPROJECTION","MODELINVERSE","MODELVIEWINVERSE","MODELVIEWPROJECTIONINVERSE","MODELINVERSETRANSPOSE","MODELVIEWINVERSETRANSPOSE"],r=["MODELVIEW","CESIUM_RTC_MODELVIEW","MODELVIEWPROJECTION","MODELVIEWINVERSETRANSPOSE"],o=e._model._sourceTechniques;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a],l=s.program;if(!t$$(i[l])){var u={};i[l]=u,t$A.techniqueUniform(s,ne$k(n,r,t,u))}}return i[t]}function oe$l(e){return function(t,i){var n=W$H(e,i),r=t$$(e._batchTable),o=a$O.replaceMain(t,"czm_instancing_main"),a="",s="";for(var l in n)if(n.hasOwnProperty(l)){var u,c=n[l];"MODELVIEW"===c||"CESIUM_RTC_MODELVIEW"===c?u="czm_instanced_modelView":"MODELVIEWPROJECTION"===c?(u="czm_instanced_modelViewProjection",a+="mat4 czm_instanced_modelViewProjection;\n",s+="czm_instanced_modelViewProjection = czm_projection * czm_instanced_modelView;\n"):"MODELVIEWINVERSETRANSPOSE"===c&&(u="czm_instanced_modelViewInverseTranspose",a+="mat3 czm_instanced_modelViewInverseTranspose;\n",s+="czm_instanced_modelViewInverseTranspose = mat3(czm_instanced_modelView);\n");var h=new RegExp("uniform.*"+l+".*");o=o.replace(h,""),h=new RegExp(l+"\\b","g"),o=o.replace(h,u)}var d,f,p;r?(d="attribute float a_batchId;\n",f="",p=""):(d="",f="attribute vec4 pickColor;\nvarying vec4 v_pickColor;\n",p=" v_pickColor = pickColor;\n");var _="uniform mat4 czm_instanced_modifiedModelView;\nuniform mat4 czm_instanced_nodeTransform;\n"+a+"mat4 czm_instanced_modelView;\nattribute vec4 czm_modelMatrixRow0;\nattribute vec4 czm_modelMatrixRow1;\nattribute vec4 czm_modelMatrixRow2;\n"+d+f+o+"void main()\n{\n mat4 czm_instanced_model = mat4(czm_modelMatrixRow0.x, czm_modelMatrixRow1.x, czm_modelMatrixRow2.x, 0.0, czm_modelMatrixRow0.y, czm_modelMatrixRow1.y, czm_modelMatrixRow2.y, 0.0, czm_modelMatrixRow0.z, czm_modelMatrixRow1.z, czm_modelMatrixRow2.z, 0.0, czm_modelMatrixRow0.w, czm_modelMatrixRow1.w, czm_modelMatrixRow2.w, 1.0);\n czm_instanced_modelView = czm_instanced_modifiedModelView * czm_instanced_model * czm_instanced_nodeTransform;\n"+s+" czm_instancing_main();\n"+p+"}\n";if(r){var m=e._model.gltf,$=s$G.getDiffuseAttributeOrUniform(m,i);_=e._batchTable.getVertexShaderCallback(!0,"a_batchId",$)(_)}return _}}function ae$l(e){return function(t,i){var n=e._batchTable;if(t$$(n)){var r=e._model.gltf,o=s$G.getDiffuseAttributeOrUniform(r,i);t=n.getFragmentShaderCallback(!0,o)(t)}else t="varying vec4 v_pickColor;\n"+t;return t}}function se$g(e,t){return function(){return c$1a.multiply(t.uniformState.view,e._rtcTransform,e._rtcModelView)}}function de$h(e){return function(){return e.computedMatrix}}function me$l(e,t){return function(i,n,r){(i=e$1W(i)).czm_instanced_modifiedModelView=se$g(e,t),i.czm_instanced_nodeTransform=de$h(r);var o=W$H(e,n);for(var a in o)o.hasOwnProperty(a)&&delete i[a];return t$$(e._batchTable)&&(i=e._batchTable.getUniformMapCallback()(i)),i}}function ce$f(e){return function(t,i){if(t$$(e._batchTable)){var n=e._model.gltf,r=s$G.getDiffuseAttributeOrUniform(n,i);t="uniform float a_batchId\n;"+(t=e._batchTable.getVertexShaderCallback(!0,"a_batchId",r)(t))}return t}}function ue$d(e){return function(t,i){var n=e._batchTable;if(t$$(n)){var r=e._model.gltf,o=s$G.getDiffuseAttributeOrUniform(r,i);t=n.getFragmentShaderCallback(!0,o)(t)}else t="uniform vec4 czm_pickColor;\n"+t;return t}}function le$l(e){return function(t){return t$$(e._batchTable)&&(t=e._batchTable.getUniformMapCallback()(t)),t}}function F$z(e){var t=e._instances,i=e.length,n=e._center,r=e._vertexBufferTypedArray;t$$(r)||(r=new Float32Array(12*i)),e._dynamic&&(e._vertexBufferTypedArray=r);for(var o=0;o<i;++o){var a=t[o]._modelMatrix,s=c$1a.clone(a,C$C);s[12]-=n.x,s[13]-=n.y,s[14]-=n.z;var l=12*o;r[l+0]=s[0],r[l+1]=s[4],r[l+2]=s[8],r[l+3]=s[12],r[l+4]=s[1],r[l+5]=s[5],r[l+6]=s[9],r[l+7]=s[13],r[l+8]=s[2],r[l+9]=s[6],r[l+10]=s[10],r[l+11]=s[14]}return r}function fe$g(e,t){var i,n=e._instances,r=e.length,o=e._dynamic,a=t$$(e._batchTable);if(a){var s=new Uint16Array(r);for(i=0;i<r;++i)s[i]=n[i]._instanceId;e._batchIdBuffer=u$Y.createVertexBuffer({context:t,typedArray:s,usage:A$13.STATIC_DRAW})}if(!a){var l=new Uint8Array(4*r);for(i=0;i<r;++i){var u=e._pickIds[i].color,c=4*i;l[c]=e$1z.floatToByte(u.red),l[c+1]=e$1z.floatToByte(u.green),l[c+2]=e$1z.floatToByte(u.blue),l[c+3]=e$1z.floatToByte(u.alpha)}e._pickIdBuffer=u$Y.createVertexBuffer({context:t,typedArray:l,usage:A$13.STATIC_DRAW})}var h=F$z(e);e._vertexBuffer=u$Y.createVertexBuffer({context:t,typedArray:h,usage:o?A$13.STREAM_DRAW:A$13.STATIC_DRAW})}function he$e(e){var t=F$z(e);e._vertexBuffer.copyFromArrayView(t)}function _e$c(e,t){for(var i=e._instances,n=i.length,r=new Array(n),o=0;o<n;++o)r[o]=t.createPickId(i[o]);return r}function pe$f(e,t){var i=e._instancingSupported,n=t$$(e._batchTable),r=e._allowPicking,o={url:e._url,requestType:e._requestType,gltf:e._gltf,basePath:e._basePath,shadows:e._shadows,cacheKey:void 0,asynchronous:e._asynchronous,allowPicking:r,incrementallyLoadTextures:e._incrementallyLoadTextures,upAxis:e._upAxis,forwardAxis:e._forwardAxis,precreatedAttributes:void 0,vertexShaderLoaded:void 0,fragmentShaderLoaded:void 0,uniformMapLoaded:void 0,pickIdLoaded:e._pickIdLoaded,ignoreCommands:!0,opaquePass:e._opaquePass,imageBasedLightingFactor:e.imageBasedLightingFactor,lightColor:e.lightColor,luminanceAtZenith:e.luminanceAtZenith,sphericalHarmonicCoefficients:e.sphericalHarmonicCoefficients,specularEnvironmentMaps:e.specularEnvironmentMaps};if(n||(e._pickIds=_e$c(e,t)),i){fe$g(e,t);var a=C$12.getSizeInBytes(C$12.FLOAT),s={czm_modelMatrixRow0:{index:0,vertexBuffer:e._vertexBuffer,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:12*a,instanceDivisor:1},czm_modelMatrixRow1:{index:0,vertexBuffer:e._vertexBuffer,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:4*a,strideInBytes:12*a,instanceDivisor:1},czm_modelMatrixRow2:{index:0,vertexBuffer:e._vertexBuffer,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:8*a,strideInBytes:12*a,instanceDivisor:1}};n&&(s.a_batchId={index:0,vertexBuffer:e._batchIdBuffer,componentsPerAttribute:1,componentDatatype:C$12.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0,instanceDivisor:1}),n||(s.pickColor={index:0,vertexBuffer:e._pickIdBuffer,componentsPerAttribute:4,componentDatatype:C$12.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0,instanceDivisor:1}),o.precreatedAttributes=s,o.vertexShaderLoaded=oe$l(e),o.fragmentShaderLoaded=ae$l(e),o.uniformMapLoaded=me$l(e,t),t$$(e._url)&&(o.cacheKey=e._url.getUrlComponent()+"#instanced")}else o.vertexShaderLoaded=ce$f(e),o.fragmentShaderLoaded=ue$d(e),o.uniformMapLoaded=le$l(e);t$$(e._url)?e._model=L$D.fromGltf(o):e._model=new L$D(o)}function ge$d(e){if(e._debugWireframe!==e.debugWireframe){e._debugWireframe=e.debugWireframe;for(var t=e.debugWireframe?H$11.LINES:H$11.TRIANGLES,i=e._drawCommands,n=i.length,r=0;r<n;++r)i[r].primitiveType=t}}function ve$g(e){if(e.debugShowBoundingVolume!==e._debugShowBoundingVolume){e._debugShowBoundingVolume=e.debugShowBoundingVolume;for(var t=e._drawCommands,i=t.length,n=0;n<i;++n)t[n].debugShowBoundingVolume=e.debugShowBoundingVolume}}function we$f(e,t){for(var i=t.length,n=e.length,r=e._boundingSphere,o=e._cull,a=0;a<i;++a){var s=s$1d.shallowClone(t[a]);s.instanceCount=n,s.boundingVolume=r,s.cull=o,t$$(e._batchTable)?s.pickId=e._batchTable.getPickId():s.pickId="v_pickColor",e._drawCommands.push(s)}}function ye$i(e){return function(){return e}}function be$j(e){return function(){return e}}function Ee$h(e,t){for(var i=e._instances,n=t.length,r=e.length,o=t$$(e._batchTable),a=e._cull,s=0;s<n;++s)for(var l=0;l<r;++l){var u=s$1d.shallowClone(t[s]);if(u.modelMatrix=new c$1a,u.boundingVolume=new c$19,u.cull=a,u.uniformMap=e$1W(u.uniformMap),o)u.uniformMap.a_batchId=ye$i(i[l]._instanceId);else{var c=e._pickIds[l];u.uniformMap.czm_pickColor=be$j(c.color)}e._drawCommands.push(u)}}function U$J(e){for(var t=e._modelCommands,i=t.length,n=e.length,r=e._rtcTransform,o=e._center,a=0;a<i;++a)for(var s=t[a],l=0;l<n;++l){var u=a*n+l,c=e._drawCommands[u],h=c$1a.clone(e._instances[l]._modelMatrix,C$C);h[12]-=o.x,h[13]-=o.y,h[14]-=o.z,h=c$1a.multiply(r,h,C$C);var d=s.modelMatrix,f=c.modelMatrix;c$1a.multiply(h,d,f);var p=s.boundingVolume,_=c.boundingVolume;c$19.transform(p,h,_)}}function q$H(e){for(var t=e._nodeCommands,i=t.length,n=[],r=0;r<i;++r){var o=t[r];o.show&&n.push(o.command)}return n}function xe$o(e){for(var t=e._nodeCommands,i=t.length,n=0;n<i;n++){if(t[n].command.dirty)return!0}return!1}function j$D(e,t){e._drawCommands=[];var i=q$H(e._model);t?we$f(e,i):(Ee$h(e,i),U$J(e))}function Ie$h(e){if(e.shadows!==e._shadows){e._shadows=e.shadows;for(var t=q$Q.castShadows(e.shadows),i=q$Q.receiveShadows(e.shadows),n=e._drawCommands,r=n.length,o=0;o<r;++o){var a=n[o];a.castShadows=t,a.receiveShadows=i}}}function h$F(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._modelInstanceCollection=void 0,this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,Ne$d(this,n,r)}function Ee$g(e){return function(){return e._batchTable.getPickId()}}b$R.prototype.expandBoundingSphere=function(e){var t=c$1a.getTranslation(e,te$m);c$19.expand(this._boundingSphere,t,this._boundingSphere)},b$R.prototype.update=function(e){if(e.mode!==b$1d.MORPHING&&this.show&&0!==this.length){var t=e.context;if(this._state===y$E.NEEDS_LOAD){this._state=y$E.LOADING,this._instancingSupported=t.instancedArrays,pe$f(this,t);var i=this;this._model.readyPromise.otherwise((function(e){i._state=y$E.FAILED,i._readyPromise.reject(e)}))}var n=this._instancingSupported,r=this._model;if(r.imageBasedLightingFactor=this.imageBasedLightingFactor,r.lightColor=this.lightColor,r.luminanceAtZenith=this.luminanceAtZenith,r.sphericalHarmonicCoefficients=this.sphericalHarmonicCoefficients,r.specularEnvironmentMaps=this.specularEnvironmentMaps,r.update(e),r.ready&&this._state===y$E.LOADING){this._state=y$E.LOADED,this._ready=!0;var o=r.boundingSphere.radius+a$11.magnitude(r.boundingSphere.center);return this._boundingSphere.radius+=o,this._modelCommands=q$H(r),j$D(this,n),void this._readyPromise.resolve(this)}if(this._state===y$E.LOADED){var a=e.mode!==this._mode,s=this.modelMatrix,l=!c$1a.equals(this._modelMatrix,s);if(a||l){this._mode=e.mode,c$1a.clone(s,this._modelMatrix);var u=c$1a.multiplyByTranslation(this._modelMatrix,this._center,this._rtcTransform);this._mode!==b$1d.SCENE3D&&(u=m$13.basisTo2D(e.mapProjection,u,u)),c$1a.getTranslation(u,this._boundingSphere.center)}n&&this._dirty&&(this._dynamic=!0,this._dirty=!1,he$e(this)),xe$o(r)&&j$D(this,n),!n&&(r.dirty||this._dirty||a||l)&&U$J(this),Ie$h(this),ge$d(this),ve$g(this);var c=e.passes;if(c.render||c.pick)for(var h=e.commandList,d=this._drawCommands,f=d.length,p=0;p<f;++p)h.push(d[p])}}},b$R.prototype.isDestroyed=function(){return!1},b$R.prototype.destroy=function(){this._model=this._model&&this._model.destroy();var e=this._pickIds;if(t$$(e))for(var t=e.length,i=0;i<t;++i)e[i].destroy();return s$1e(this)},h$F._deprecationWarning=i$1b,Object.defineProperties(h$F.prototype,{featuresLength:{get:function(){return this._batchTable.featuresLength}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){var e=this._modelInstanceCollection._model;return t$$(e)?e.trianglesLength:0}},geometryByteLength:{get:function(){var e=this._modelInstanceCollection._model;return t$$(e)?e.geometryByteLength:0}},texturesByteLength:{get:function(){var e=this._modelInstanceCollection._model;return t$$(e)?e.texturesByteLength:0}},batchTableByteLength:{get:function(){return this._batchTable.memorySizeInBytes}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._modelInstanceCollection.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var _$B=Uint32Array.BYTES_PER_ELEMENT,v$B=new Array(4),ie$m=new Array(4);function Ne$d(e,t,i){var n=e$1Y(i,0);i=n;var r=new Uint8Array(t),o=new DataView(t);i+=_$B;var a=o.getUint32(i,!0);if(1!==a)throw new t$Z("Only Instanced 3D Model version 1 is supported. Version "+a+" is not.");i+=_$B;var s=o.getUint32(i,!0);i+=_$B;var l=o.getUint32(i,!0);if(0===l)throw new t$Z("featureTableJsonByteLength is zero, the feature table must be defined.");i+=_$B;var u=o.getUint32(i,!0);i+=_$B;var c=o.getUint32(i,!0);i+=_$B;var h=o.getUint32(i,!0);i+=_$B;var d=o.getUint32(i,!0);if(1!==d&&0!==d)throw new t$Z("Only glTF format 0 (uri) or 1 (embedded) are supported. Format "+d+" is not.");var f=c$X(r,i+=_$B,l),p=JSON.parse(f);i+=l;var _=new Uint8Array(t,i,u);i+=u;var m,$,g=new p$P(p,_),y=g.getGlobalProperty("INSTANCES_LENGTH");if(g.featuresLength=y,!t$$(y))throw new t$Z("Feature table global property: INSTANCES_LENGTH must be defined");if(c>0){var v=c$X(r,i,c);m=JSON.parse(v),i+=c,h>0&&($=new Uint8Array(t,i,h),$=new Uint8Array($),i+=h)}e._batchTable=new p$Q(e,y,m,$);var x,b=n+s-i;if(0===b)throw new t$Z("glTF byte length is zero, i3dm must have a glTF to instance.");i%4==0?x=new Uint8Array(t,i,b):(h$F._deprecationWarning("i3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),x=new Uint8Array(r.subarray(i,i+b)));var S=e._tileset,w={instances:new Array(y),batchTable:e._batchTable,cull:!1,url:void 0,requestType:V$_.TILES3D,gltf:void 0,basePath:void 0,incrementallyLoadTextures:!1,upAxis:S._gltfUpAxis,forwardAxis:z$y.X,opaquePass:we$l.CESIUM_3D_TILE,pickIdLoaded:Ee$g(e),imageBasedLightingFactor:S.imageBasedLightingFactor,lightColor:S.lightColor,luminanceAtZenith:S.luminanceAtZenith,sphericalHarmonicCoefficients:S.sphericalHarmonicCoefficients,specularEnvironmentMaps:S.specularEnvironmentMaps};if(0===d){var C=c$X(x);C=C.replace(/[\s\0]+$/,""),w.url=e._resource.getDerivedResource({url:C})}else w.gltf=x,w.basePath=e._resource.clone();var T,P=g.getGlobalProperty("EAST_NORTH_UP"),E=g.getGlobalProperty("RTC_CENTER",C$12.FLOAT,3);t$$(E)&&(T=a$11.unpack(E));for(var A=w.instances,L=new a$11,M=new Array(3),I=new a$11,O=new a$11,D=new a$11,R=new r$W,N=new a$U,F=new a$11,B=new a$C,z=new c$1a,G=0;G<y;G++){var k=g.getProperty("POSITION",C$12.FLOAT,3,G,v$B);if(!t$$(k)){k=M;var U=g.getProperty("POSITION_QUANTIZED",C$12.UNSIGNED_SHORT,3,G,v$B);if(!t$$(U))throw new t$Z("Either POSITION or POSITION_QUANTIZED must be defined for each instance.");var V=g.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",C$12.FLOAT,3);if(!t$$(V))throw new t$Z("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");var W=g.getGlobalProperty("QUANTIZED_VOLUME_SCALE",C$12.FLOAT,3);if(!t$$(W))throw new t$Z("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");for(var H=0;H<3;H++)k[H]=U[H]/65535*W[H]+V[H]}a$11.unpack(k,0,L),t$$(T)&&a$11.add(L,T,L),B.translation=L;var Y=g.getProperty("NORMAL_UP",C$12.FLOAT,3,G,v$B),j=g.getProperty("NORMAL_RIGHT",C$12.FLOAT,3,G,ie$m),q=!1;if(t$$(Y)){if(!t$$(j))throw new t$Z("To define a custom orientation, both NORMAL_UP and NORMAL_RIGHT must be defined.");a$11.unpack(Y,0,O),a$11.unpack(j,0,I),q=!0}else{var X=g.getProperty("NORMAL_UP_OCT32P",C$12.UNSIGNED_SHORT,2,G,v$B),K=g.getProperty("NORMAL_RIGHT_OCT32P",C$12.UNSIGNED_SHORT,2,G,ie$m);if(t$$(X)){if(!t$$(K))throw new t$Z("To define a custom orientation with oct-encoded vectors, both NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P must be defined.");r$P.octDecodeInRange(X[0],X[1],65535,O),r$P.octDecodeInRange(K[0],K[1],65535,I),q=!0}else P?(m$13.eastNorthUpToFixedFrame(L,n$1c.WGS84,z),c$1a.getMatrix3(z,R)):r$W.clone(r$W.IDENTITY,R)}q&&(a$11.cross(I,O,D),a$11.normalize(D,D),r$W.setColumn(R,0,I,R),r$W.setColumn(R,1,O,R),r$W.setColumn(R,2,D,R)),a$U.fromRotationMatrix(R,N),B.rotation=N,F=a$11.fromElements(1,1,1,F);var Z=g.getProperty("SCALE",C$12.FLOAT,1,G);t$$(Z)&&a$11.multiplyByScalar(F,Z,F);var J=g.getProperty("SCALE_NON_UNIFORM",C$12.FLOAT,3,G,v$B);t$$(J)&&(F.x*=J[0],F.y*=J[1],F.z*=J[2]),B.scale=F;var Q=g.getProperty("BATCH_ID",C$12.UNSIGNED_SHORT,1,G);t$$(Q)||(Q=G),c$1a.fromTranslationRotationScale(B,z);var ee=z.clone();A[G]={modelMatrix:ee,batchId:Q}}e._modelInstanceCollection=new b$R(w)}function Ue$b(e){var t=e.featuresLength;if(!t$$(e._features)&&t>0){for(var i=new Array(t),n=0;n<t;++n)i[n]=new e$Z(e,n);e._features=i}}h$F.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},h$F.prototype.getFeature=function(e){var t=this.featuresLength;if(!t$$(e)||e<0||e>=t)throw new t$_("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return Ue$b(this),this._features[e]},h$F.prototype.applyDebugSettings=function(e,t){t=e?t:e$1z.WHITE,this._batchTable.setAllColor(t)},h$F.prototype.applyStyle=function(e){this._batchTable.applyStyle(e)},h$F.prototype.update=function(e,t){var i=t.commandList.length;this._batchTable.update(e,t),this._modelInstanceCollection.modelMatrix=this._tile.computedTransform,this._modelInstanceCollection.shadows=this._tileset.shadows,this._modelInstanceCollection.lightColor=this._tileset.lightColor,this._modelInstanceCollection.luminanceAtZenith=this._tileset.luminanceAtZenith,this._modelInstanceCollection.sphericalHarmonicCoefficients=this._tileset.sphericalHarmonicCoefficients,this._modelInstanceCollection.specularEnvironmentMaps=this._tileset.specularEnvironmentMaps,this._modelInstanceCollection.debugWireframe=this._tileset.debugWireframe;var n=this._modelInstanceCollection._model;if(t$$(n)){var r=this._tileset.clippingPlanes;n.clippingPlanesOriginMatrix=this._tileset.clippingPlanesOriginMatrix,t$$(r)&&this._tile.clippingPlanesDirty&&(n._clippingPlanes=r.enabled&&this._tile._isClipped?r:void 0),t$$(r)&&t$$(n._clippingPlanes)&&n._clippingPlanes!==r&&(n._clippingPlanes=r)}this._modelInstanceCollection.update(t),i<t.commandList.length&&(t.passes.render||t.passes.pick)&&this._batchTable.addDerivedCommands(t,i,!1)},h$F.prototype.isDestroyed=function(){return!1},h$F.prototype.destroy=function(){return this._modelInstanceCollection=this._modelInstanceCollection&&this._modelInstanceCollection.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),s$1e(this)};var e$T={ADD:0,REPLACE:1},l$D=Object.freeze(e$T),J$C={NEEDS_DECODE:0,DECODING:1,READY:2,FAILED:3};function ie$l(e){n$1e.typeOf.object("options",e),n$1e.typeOf.object("options.arrayBuffer",e.arrayBuffer),this._parsedContent=void 0,this._drawCommand=void 0,this._isTranslucent=!1,this._styleTranslucent=!1,this._constantColor=e$1z.clone(e$1z.DARKGRAY),this._highlightColor=e$1z.clone(e$1z.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$C.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=c$18.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=e$1Y(e.opaquePass,we$l.OPAQUE),this._cull=e$1Y(e.cull,!0),this.style=void 0,this._style=void 0,this.styleDirty=!1,this.modelMatrix=c$1a.clone(c$1a.IDENTITY),this._modelMatrix=c$1a.clone(c$1a.IDENTITY),this.time=0,this.shadows=q$Q.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,We$e(this,e)}Object.defineProperties(ie$l.prototype,{pointsLength:{get:function(){return this._pointsLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},color:{get:function(){return e$1z.clone(this._highlightColor)},set:function(e){this._highlightColor=e$1z.clone(e,this._highlightColor)}},boundingSphere:{get:function(){if(t$$(this._drawCommand))return this._drawCommand.boundingVolume},set:function(e){this._boundingSphere=c$19.clone(e,this._boundingSphere)}}});var $$z=Uint32Array.BYTES_PER_ELEMENT;function We$e(e,t){var i=t.arrayBuffer,n=e$1Y(t.byteOffset,0),r=new Uint8Array(i),o=new DataView(i);n+=$$z;var a=o.getUint32(n,!0);if(1!==a)throw new t$Z("Only Point Cloud tile version 1 is supported. Version "+a+" is not.");n+=$$z,n+=$$z;var s=o.getUint32(n,!0);if(0===s)throw new t$Z("Feature table must have a byte length greater than zero");n+=$$z;var l=o.getUint32(n,!0);n+=$$z;var u=o.getUint32(n,!0);n+=$$z;var c=o.getUint32(n,!0),h=c$X(r,n+=$$z,s),d=JSON.parse(h);n+=s;var f,p,_=new Uint8Array(i,n,l);if(n+=l,u>0){var m=c$X(r,n,u);f=JSON.parse(m),n+=u,c>0&&(p=new Uint8Array(i,n,c),n+=c)}var $=new p$P(d,_),g=$.getGlobalProperty("POINTS_LENGTH");if($.featuresLength=g,!t$$(g))throw new t$Z("Feature table global property: POINTS_LENGTH must be defined");var y=$.getGlobalProperty("RTC_CENTER",C$12.FLOAT,3);t$$(y)&&(e._rtcCenter=a$11.unpack(y));var v,x,b,S,w,C,T,P,E,A=!1,L=!1,M=!1,I=!1,O=!1,D=!1,R=!1,N=!1,F=t$$(d.extensions)?d.extensions["3DTILES_draco_point_compression"]:void 0,B=t$$(f)&&t$$(f.extensions)?f.extensions["3DTILES_draco_point_compression"]:void 0;if(t$$(B)&&(T=B.properties),t$$(F)){C=F.properties;var z=F.byteOffset,G=F.byteLength;if(!t$$(C)||!t$$(z)||!t$$(G))throw new t$Z("Draco properties, byteOffset, and byteLength must be defined");w=l$Z(_,z,z+G),A=t$$(C.POSITION),L=t$$(C.RGB)||t$$(C.RGBA),M=t$$(C.NORMAL),I=t$$(C.BATCH_ID),D=t$$(C.RGBA),e._decodingState=J$C.NEEDS_DECODE}if(t$$(w)&&(P={buffer:w,featureTableProperties:C,batchTableProperties:T,properties:s$1n(C,T),dequantizeInShader:e._dequantizeInShader}),!A)if(t$$(d.POSITION))v=$.getPropertyArray("POSITION",C$12.FLOAT,3),A=!0;else if(t$$(d.POSITION_QUANTIZED)){v=$.getPropertyArray("POSITION_QUANTIZED",C$12.UNSIGNED_SHORT,3),O=!0,A=!0;var k=$.getGlobalProperty("QUANTIZED_VOLUME_SCALE",C$12.FLOAT,3);if(!t$$(k))throw new t$Z("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");e._quantizedVolumeScale=a$11.unpack(k),e._quantizedRange=65535;var U=$.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",C$12.FLOAT,3);if(!t$$(U))throw new t$Z("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");e._quantizedVolumeOffset=a$11.unpack(U)}if(L||(t$$(d.RGBA)?(x=$.getPropertyArray("RGBA",C$12.UNSIGNED_BYTE,4),D=!0,L=!0):t$$(d.RGB)?(x=$.getPropertyArray("RGB",C$12.UNSIGNED_BYTE,3),L=!0):t$$(d.RGB565)&&(x=$.getPropertyArray("RGB565",C$12.UNSIGNED_SHORT,1),R=!0,L=!0)),M||(t$$(d.NORMAL)?(b=$.getPropertyArray("NORMAL",C$12.FLOAT,3),M=!0):t$$(d.NORMAL_OCT16P)&&(b=$.getPropertyArray("NORMAL_OCT16P",C$12.UNSIGNED_BYTE,2),N=!0,M=!0)),I||t$$(d.BATCH_ID)&&(S=$.getPropertyArray("BATCH_ID",C$12.UNSIGNED_SHORT,1),I=!0),!A)throw new t$Z("Either POSITION or POSITION_QUANTIZED must be defined.");if(t$$(d.CONSTANT_RGBA)){var V=$.getGlobalProperty("CONSTANT_RGBA",C$12.UNSIGNED_BYTE,4);e._constantColor=e$1z.fromBytes(V[0],V[1],V[2],V[3],e._constantColor)}if(I){var W=$.getGlobalProperty("BATCH_LENGTH");if(!t$$(W))throw new t$Z("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");t$$(p)&&(p=new Uint8Array(p)),t$$(e._batchTableLoaded)&&e._batchTableLoaded(W,f,p)}!I&&t$$(p)&&(E=p$Q.getBinaryProperties(g,f,p)),e._parsedContent={positions:v,colors:x,normals:b,batchIds:S,styleableProperties:E,draco:P},e._pointsLength=g,e._isQuantized=O,e._isOctEncoded16P=N,e._isRGB565=R,e._isTranslucent=D,e._hasColors=L,e._hasNormals=M,e._hasBatchIds=I}var je$b=new a$11,Xe$9=new a$11,Je$6=new a$11,de$g;function $e$7(e){if(!t$$(de$g)){n$1d.setRandomNumberSeed(0),de$g=new Array(e);for(var t=0;t<e;++t)de$g[t]=n$1d.nextRandomNumber()}return de$g}function Ke$8(e){for(var t=e.length/3,i=Math.min(t,20),n=$e$7(20),r=Number.MAX_VALUE,o=-Number.MAX_VALUE,a=a$11.fromElements(r,r,r,je$b),s=a$11.fromElements(o,o,o,Xe$9),l=0;l<i;++l){var u=Math.floor(n[l]*t),c=a$11.unpack(e,3*u,Je$6);a$11.minimumByComponent(a,c,a),a$11.maximumByComponent(s,c,s)}var h=c$19.fromCornerPoints(a,s);return h.radius+=n$1d.EPSILON2,h}function Pe$g(e,t){var i=C$12.fromTypedArray(e);return i===C$12.INT||i===C$12.UNSIGNED_INT||i===C$12.DOUBLE?(e$1Q("Cast pnts property to floats",'Point cloud property "'+t+'" will be casted to a float array because INT, UNSIGNED_INT, and DOUBLE are not valid WebGL vertex attribute types. Some precision may be lost.'),new Float32Array(e)):e}var et$d=new a$10,tt$e=new a$10,rt$c=new e$1z,Ce$h=0,ce$e=1,pe$e=2,De$n=3,ot$d=4,he$d=new c$1a;function it$a(e,t){var i,n,r=t.context,o=e._parsedContent,a=e._pointsLength,s=o.positions,l=o.colors,u=o.normals,c=o.batchIds,h=o.styleableProperties,d=t$$(h),f=e._isQuantized,p=e._isQuantizedDraco,_=e._isOctEncoded16P,m=e._isOctEncodedDraco,$=e._quantizedRange,g=e._octEncodedRange,y=e._isRGB565,v=e._isTranslucent,x=e._hasColors,b=e._hasNormals,S=e._hasBatchIds,w=[],C={};if(e._styleableShaderAttributes=C,d){var T=ot$d;for(var P in h)if(h.hasOwnProperty(P)){var E=h[P],A=Pe$g(E.typedArray,P);i=E.componentCount,n=C$12.fromTypedArray(A);var L=u$Y.createVertexBuffer({context:r,typedArray:A,usage:A$13.STATIC_DRAW});e._geometryByteLength+=L.sizeInBytes;var M={index:T,vertexBuffer:L,componentsPerAttribute:i,componentDatatype:n,normalize:!1,offsetInBytes:0,strideInBytes:0};w.push(M),C[P]={location:T,componentCount:i},++T}}var I,O,D,R=u$Y.createVertexBuffer({context:r,typedArray:s,usage:A$13.STATIC_DRAW});e._geometryByteLength+=R.sizeInBytes,x&&(I=u$Y.createVertexBuffer({context:r,typedArray:l,usage:A$13.STATIC_DRAW}),e._geometryByteLength+=I.sizeInBytes),b&&(O=u$Y.createVertexBuffer({context:r,typedArray:u,usage:A$13.STATIC_DRAW}),e._geometryByteLength+=O.sizeInBytes),S&&(c=Pe$g(c,"batchIds"),D=u$Y.createVertexBuffer({context:r,typedArray:c,usage:A$13.STATIC_DRAW}),e._geometryByteLength+=D.sizeInBytes);var N=[];if(n=f?C$12.UNSIGNED_SHORT:p?$<=255?C$12.UNSIGNED_BYTE:C$12.UNSIGNED_SHORT:C$12.FLOAT,N.push({index:Ce$h,vertexBuffer:R,componentsPerAttribute:3,componentDatatype:n,normalize:!1,offsetInBytes:0,strideInBytes:0}),e._cull&&(e._boundingSphere=f||p?c$19.fromCornerPoints(a$11.ZERO,e._quantizedVolumeScale):Ke$8(s)),x)if(y)N.push({index:ce$e,vertexBuffer:I,componentsPerAttribute:1,componentDatatype:C$12.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0});else{var F=v?4:3;N.push({index:ce$e,vertexBuffer:I,componentsPerAttribute:F,componentDatatype:C$12.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0})}b&&(_?(i=2,n=C$12.UNSIGNED_BYTE):m?(i=2,n=g<=255?C$12.UNSIGNED_BYTE:C$12.UNSIGNED_SHORT):(i=3,n=C$12.FLOAT),N.push({index:pe$e,vertexBuffer:O,componentsPerAttribute:i,componentDatatype:n,normalize:!1,offsetInBytes:0,strideInBytes:0})),S&&N.push({index:De$n,vertexBuffer:D,componentsPerAttribute:1,componentDatatype:C$12.fromTypedArray(c),normalize:!1,offsetInBytes:0,strideInBytes:0}),d&&(N=N.concat(w));var B=new x$18({context:r,attributes:N}),z={depthTest:{enabled:!0}};e._opaquePass===we$l.CESIUM_3D_TILE&&(z.stencilTest=Ia$1.setCesium3DTileBit(),z.stencilMask=Ia$1.CESIUM_3D_TILE_MASK),e._opaqueRenderState=p$1a.fromCache(z),e._translucentRenderState=p$1a.fromCache({depthTest:{enabled:!0},depthMask:!1,blending:Ee$s.ALPHA_BLEND}),e._drawCommand=new s$1d({boundingVolume:new c$19,cull:e._cull,modelMatrix:new c$1a,primitiveType:H$11.POINTS,vertexArray:B,count:a,shaderProgram:void 0,uniformMap:void 0,renderState:v?e._translucentRenderState:e._opaqueRenderState,pass:v?we$l.TRANSLUCENT:e._opaquePass,owner:e,castShadows:!1,receiveShadows:!1,pickId:e._pickIdLoaded()})}function at$a(e,t){var i=t.context,n=e._isQuantized,r=e._isQuantizedDraco,o=e._isOctEncodedDraco,a={u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier:function(){var n=et$d;if(n.x=e._attenuation?e.maximumAttenuation:e._pointSize,n.x*=t.pixelRatio,n.y=e.time,e._attenuation){var r,o=t.camera.frustum;r=t.mode===b$1d.SCENE2D||o instanceof r$K?Number.POSITIVE_INFINITY:i.drawingBufferHeight/t.camera.frustum.sseDenominator,n.z=e.geometricError*e.geometricErrorScale,n.w=r}return n},u_highlightColor:function(){return e._highlightColor},u_constantColor:function(){return e._constantColor},u_clippingPlanes:function(){var t=e.clippingPlanes;return e.isClipped?t.texture:i.defaultTexture},u_clippingPlanesEdgeStyle:function(){var t=e.clippingPlanes;if(!t$$(t))return e$1z.TRANSPARENT;var i=e$1z.clone(t.edgeColor,rt$c);return i.alpha=t.edgeWidth,i},u_clippingPlanesMatrix:function(){var t=e.clippingPlanes;if(!t$$(t))return c$1a.IDENTITY;var n=e$1Y(e.clippingPlanesOriginMatrix,e._modelMatrix);return c$1a.multiply(i.uniformState.view3D,n,he$d),c$1a.multiply(he$d,t.modelMatrix,he$d)}};(n||r||o)&&(a=s$1n(a,{u_quantizedVolumeScaleAndOctEncodedRange:function(){var t=tt$e;if(t$$(e._quantizedVolumeScale)){var i=a$11.clone(e._quantizedVolumeScale,t);a$11.divideByScalar(i,e._quantizedRange,t)}return t.w=e._octEncodedRange,t}})),t$$(e._uniformMapLoaded)&&(a=e._uniformMapLoaded(a)),e._drawCommand.uniformMap=a}var fe$f=["POSITION","COLOR","NORMAL","POSITION_ABSOLUTE"];function ge$c(e,t){for(var i=/czm_tiles3d_style_(\w+)/g,n=i.exec(e);null!==n;){var r=n[1];-1===t.indexOf(r)&&t.push(r),n=i.exec(e)}}function ye$h(e,t){for(var i=e.numberOfAttributes,n=0;n<i;++n){var r=e.getAttribute(n);if(r.index===t)return r}}function ve$f(e){for(var t=fe$f.length,i=0;i<t;++i){var n=fe$f[i],r="czm_tiles3d_style_"+n,o=n.toLowerCase();e=e.replace(new RegExp(r+"(\\W)","g"),o+"$1")}return e.replace("()","(vec3 position, vec3 position_absolute, vec4 color, vec3 normal)")}function nt$c(e,t,i){var n,r,o,a,s,l,u=t.context,c=t$$(i),h=e._isQuantized,d=e._isQuantizedDraco,f=e._isOctEncoded16P,p=e._isOctEncodedDraco,_=e._isRGB565,m=e._isTranslucent,$=e._hasColors,g=e._hasNormals,y=e._hasBatchIds,v=e._backFaceCulling,x=e._normalShading,b=e._drawCommand.vertexArray,S=e.clippingPlanes,w=e._attenuation,C=m;if(c){var T={translucent:!1};a=i.getColorShaderFunction("getColorFromStyle","czm_tiles3d_style_",T),s=i.getShowShaderFunction("getShowFromStyle","czm_tiles3d_style_",T),l=i.getPointSizeShaderFunction("getPointSizeFromStyle","czm_tiles3d_style_",T),t$$(a)&&T.translucent&&(C=!0)}e._styleTranslucent=C;var P=t$$(a),E=t$$(s),A=t$$(l),L=e.isClipped,M=[];P&&(ge$c(a,M),a=ve$f(a)),E&&(ge$c(s,M),s=ve$f(s)),A&&(ge$c(l,M),l=ve$f(l));var I=M.indexOf("COLOR")>=0,O=M.indexOf("NORMAL")>=0,D=M.filter((function(e){return-1===fe$f.indexOf(e)}));if(O&&!g)throw new t$Z("Style references the NORMAL semantic but the point cloud does not have normals");var R=e._styleableShaderAttributes;for(r in R)if(R.hasOwnProperty(r)){o=R[r];var N=D.indexOf(r)>=0;ye$h(b,o.location).enabled=N}var F=$&&(!P||I);$&&(ye$h(b,ce$e).enabled=F);var B=g&&(x||v||O);g&&(ye$h(b,pe$e).enabled=B);var z={a_position:Ce$h};F&&(z.a_color=ce$e),B&&(z.a_normal=pe$e),y&&(z.a_batchId=De$n);var G="",k=D.length;for(n=0;n<k;++n){if(!t$$(o=R[r=D[n]]))throw new t$Z('Style references a property "'+r+'" that does not exist or is not styleable.');var U=o.componentCount,V="czm_tiles3d_style_"+r;G+="attribute "+(1===U?"float":"vec"+U)+" "+V+"; \n",z[V]=o.location}at$a(e,t);var W="attribute vec3 a_position; \nvarying vec4 v_color; \nuniform vec4 u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier; \nuniform vec4 u_constantColor; \nuniform vec4 u_highlightColor; \n";W+="float u_pointSize; \nfloat u_time; \n",w&&(W+="float u_geometricError; \nfloat u_depthMultiplier; \n"),W+=G,F&&(W+=m?"attribute vec4 a_color; \n":_?"attribute float a_color; \nconst float SHIFT_RIGHT_11 = 1.0 / 2048.0; \nconst float SHIFT_RIGHT_5 = 1.0 / 32.0; \nconst float SHIFT_LEFT_11 = 2048.0; \nconst float SHIFT_LEFT_5 = 32.0; \nconst float NORMALIZE_6 = 1.0 / 64.0; \nconst float NORMALIZE_5 = 1.0 / 32.0; \n":"attribute vec3 a_color; \n"),B&&(W+=f||p?"attribute vec2 a_normal; \n":"attribute vec3 a_normal; \n"),y&&(W+="attribute float a_batchId; \n"),(h||d||p)&&(W+="uniform vec4 u_quantizedVolumeScaleAndOctEncodedRange; \n"),P&&(W+=a),E&&(W+=s),A&&(W+=l),W+="void main() \n{ \n u_pointSize = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.x; \n u_time = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.y; \n",w&&(W+=" u_geometricError = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.z; \n u_depthMultiplier = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.w; \n"),W+=F?m?" vec4 color = a_color; \n":_?" float compressed = a_color; \n float r = floor(compressed * SHIFT_RIGHT_11); \n compressed -= r * SHIFT_LEFT_11; \n float g = floor(compressed * SHIFT_RIGHT_5); \n compressed -= g * SHIFT_LEFT_5; \n float b = compressed; \n vec3 rgb = vec3(r * NORMALIZE_5, g * NORMALIZE_6, b * NORMALIZE_5); \n vec4 color = vec4(rgb, 1.0); \n":" vec4 color = vec4(a_color, 1.0); \n":" vec4 color = u_constantColor; \n",W+=h||d?" vec3 position = a_position * u_quantizedVolumeScaleAndOctEncodedRange.xyz; \n":" vec3 position = a_position; \n",W+=" vec3 position_absolute = vec3(czm_model * vec4(position, 1.0)); \n",B?(W+=f?" vec3 normal = czm_octDecode(a_normal); \n":p?" vec3 normal = czm_octDecode(a_normal, u_quantizedVolumeScaleAndOctEncodedRange.w).zxy; \n":" vec3 normal = a_normal; \n",W+=" vec3 normalEC = czm_normal * normal; \n"):W+=" vec3 normal = vec3(1.0); \n",P&&(W+=" color = getColorFromStyle(position, position_absolute, color, normal); \n"),E&&(W+=" float show = float(getShowFromStyle(position, position_absolute, color, normal)); \n"),W+=A?" gl_PointSize = getPointSizeFromStyle(position, position_absolute, color, normal) * czm_pixelRatio; \n":w?" vec4 positionEC = czm_modelView * vec4(position, 1.0); \n float depth = -positionEC.z; \n gl_PointSize = min((u_geometricError / depth) * u_depthMultiplier, u_pointSize); \n":" gl_PointSize = u_pointSize; \n",W+=" color = color * u_highlightColor; \n",B&&x&&(W+=" float diffuseStrength = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC); \n diffuseStrength = max(diffuseStrength, 0.4); \n color.xyz *= diffuseStrength * czm_lightColor; \n"),W+=" v_color = color; \n gl_Position = czm_modelViewProjection * vec4(position, 1.0); \n",B&&v&&(W+=" float visible = step(-normalEC.z, 0.0); \n gl_Position *= visible; \n gl_PointSize *= visible; \n"),E&&(W+=" gl_Position.w *= float(show); \n gl_PointSize *= float(show); \n"),W+="} \n";var H="varying vec4 v_color; \n";L&&(H+="uniform sampler2D u_clippingPlanes; \nuniform mat4 u_clippingPlanesMatrix; \nuniform vec4 u_clippingPlanesEdgeStyle; \n",H+="\n",H+=f$F(S,u),H+="\n"),H+="void main() \n{ \n gl_FragColor = czm_gammaCorrect(v_color); \n",L&&(H+=a$z("u_clippingPlanes","u_clippingPlanesMatrix","u_clippingPlanesEdgeStyle")),H+="} \n",t$$(e._vertexShaderLoaded)&&(W=e._vertexShaderLoaded(W)),t$$(e._fragmentShaderLoaded)&&(H=e._fragmentShaderLoaded(H));var Y=e._drawCommand;t$$(Y.shaderProgram)&&Y.shaderProgram.destroy(),Y.shaderProgram=p$15.fromCache({context:u,vertexShaderSource:W,fragmentShaderSource:H,attributeLocations:z});try{Y.shaderProgram._bind()}catch{throw new t$Z("Error generating style shader: this may be caused by a type mismatch, index out-of-bounds, or other syntax error.")}}function st$8(e,t){if(e._decodingState===J$C.READY)return!1;if(e._decodingState===J$C.NEEDS_DECODE){var i=e._parsedContent,n=i.draco,r=r$s.decodePointCloud(n,t);t$$(r)&&(e._decodingState=J$C.DECODING,r.then((function(t){e._decodingState=J$C.READY;var r=t$$(t.POSITION)?t.POSITION.array:void 0,o=t$$(t.RGB)?t.RGB.array:void 0,a=t$$(t.RGBA)?t.RGBA.array:void 0,s=t$$(t.NORMAL)?t.NORMAL.array:void 0,l=t$$(t.BATCH_ID)?t.BATCH_ID.array:void 0,u=t$$(r)&&t$$(t.POSITION.data.quantization),c=t$$(s)&&t$$(t.NORMAL.data.quantization);if(u){var h=t.POSITION.data.quantization,d=h.range;e._quantizedVolumeScale=a$11.fromElements(d,d,d),e._quantizedVolumeOffset=a$11.unpack(h.minValues),e._quantizedRange=(1<<h.quantizationBits)-1,e._isQuantizedDraco=!0}c&&(e._octEncodedRange=(1<<t.NORMAL.data.quantization.quantizationBits)-1,e._isOctEncodedDraco=!0);var f=i.styleableProperties,p=n.batchTableProperties;for(var _ in p)if(p.hasOwnProperty(_)){var m=t[_];t$$(f)||(f={}),f[_]={typedArray:m.array,componentCount:m.data.componentsPerAttribute}}i.positions=e$1Y(r,i.positions),i.colors=e$1Y(e$1Y(a,o),i.colors),i.normals=e$1Y(s,i.normals),i.batchIds=e$1Y(l,i.batchIds),i.styleableProperties=f})).otherwise((function(t){e._decodingState=J$C.FAILED,e._readyPromise.reject(t)})))}return!0}var lt$c=new a$10,dt$b=new a$11;function T$F(e,t,i){var n=e._gl;n.framebufferTexture2D(n.FRAMEBUFFER,t,i._target,i._texture,0)}function _$A(e,t,i){var n=e._gl;n.framebufferRenderbuffer(n.FRAMEBUFFER,t,n.RENDERBUFFER,i._getRenderbuffer())}function u$F(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).context;n$1e.defined("options.context",t);var i=t._gl,n=e$1y.maximumColorAttachments;if(this._gl=i,this._framebuffer=i.createFramebuffer(),this._colorTextures=[],this._colorRenderbuffers=[],this._activeColorAttachments=[],this._depthTexture=void 0,this._depthRenderbuffer=void 0,this._stencilRenderbuffer=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this.destroyAttachments=e$1Y(e.destroyAttachments,!0),t$$(e.colorTextures)&&t$$(e.colorRenderbuffers))throw new t$_("Cannot have both color texture and color renderbuffer attachments.");if(t$$(e.depthTexture)&&t$$(e.depthRenderbuffer))throw new t$_("Cannot have both a depth texture and depth renderbuffer attachment.");if(t$$(e.depthStencilTexture)&&t$$(e.depthStencilRenderbuffer))throw new t$_("Cannot have both a depth-stencil texture and depth-stencil renderbuffer attachment.");var r,o,a,s,l,u=t$$(e.depthTexture)||t$$(e.depthRenderbuffer),c=t$$(e.depthStencilTexture)||t$$(e.depthStencilRenderbuffer);if(u&&c)throw new t$_("Cannot have both a depth and depth-stencil attachment.");if(t$$(e.stencilRenderbuffer)&&c)throw new t$_("Cannot have both a stencil and depth-stencil attachment.");if(u&&t$$(e.stencilRenderbuffer))throw new t$_("Cannot have both a depth and stencil attachment.");if(this._bind(),t$$(e.colorTextures)){var h=e.colorTextures;if((s=this._colorTextures.length=this._activeColorAttachments.length=h.length)>n)throw new t$_("The number of color attachments exceeds the number supported.");for(a=0;a<s;++a){if(r=h[a],!Z$_.isColorFormat(r.pixelFormat))throw new t$_("The color-texture pixel-format must be a color format.");if(r.pixelDatatype===v$Z.FLOAT&&!t.colorBufferFloat)throw new t$_("The color texture pixel datatype is FLOAT and the WebGL implementation does not support the EXT_color_buffer_float or WEBGL_color_buffer_float extensions. See Context.colorBufferFloat.");if(r.pixelDatatype===v$Z.HALF_FLOAT&&!t.colorBufferHalfFloat)throw new t$_("The color texture pixel datatype is HALF_FLOAT and the WebGL implementation does not support the EXT_color_buffer_half_float extension. See Context.colorBufferHalfFloat.");T$F(this,l=this._gl.COLOR_ATTACHMENT0+a,r),this._activeColorAttachments[a]=l,this._colorTextures[a]=r}}if(t$$(e.colorRenderbuffers)){var d=e.colorRenderbuffers;if((s=this._colorRenderbuffers.length=this._activeColorAttachments.length=d.length)>n)throw new t$_("The number of color attachments exceeds the number supported.");for(a=0;a<s;++a)o=d[a],_$A(this,l=this._gl.COLOR_ATTACHMENT0+a,o),this._activeColorAttachments[a]=l,this._colorRenderbuffers[a]=o}if(t$$(e.depthTexture)){if((r=e.depthTexture).pixelFormat!==Z$_.DEPTH_COMPONENT)throw new t$_("The depth-texture pixel-format must be DEPTH_COMPONENT.");T$F(this,this._gl.DEPTH_ATTACHMENT,r),this._depthTexture=r}if(t$$(e.depthRenderbuffer)&&(o=e.depthRenderbuffer,_$A(this,this._gl.DEPTH_ATTACHMENT,o),this._depthRenderbuffer=o),t$$(e.stencilRenderbuffer)&&(o=e.stencilRenderbuffer,_$A(this,this._gl.STENCIL_ATTACHMENT,o),this._stencilRenderbuffer=o),t$$(e.depthStencilTexture)){if((r=e.depthStencilTexture).pixelFormat!==Z$_.DEPTH_STENCIL)throw new t$_("The depth-stencil pixel-format must be DEPTH_STENCIL.");T$F(this,this._gl.DEPTH_STENCIL_ATTACHMENT,r),this._depthStencilTexture=r}t$$(e.depthStencilRenderbuffer)&&(o=e.depthStencilRenderbuffer,_$A(this,this._gl.DEPTH_STENCIL_ATTACHMENT,o),this._depthStencilRenderbuffer=o),this._unBind()}ie$l.prototype.update=function(e){if(!st$8(this,e.context)){var t=!1,i=!c$1a.equals(this._modelMatrix,this.modelMatrix);if(this._mode!==e.mode&&(this._mode=e.mode,i=!0),t$$(this._drawCommand)||(it$a(this,e),i=!0,t=!0,this._ready=!0,this._readyPromise.resolve(this),this._parsedContent=void 0),i){c$1a.clone(this.modelMatrix,this._modelMatrix);var n=this._drawCommand.modelMatrix;if(c$1a.clone(this._modelMatrix,n),t$$(this._rtcCenter)&&c$1a.multiplyByTranslation(n,this._rtcCenter,n),t$$(this._quantizedVolumeOffset)&&c$1a.multiplyByTranslation(n,this._quantizedVolumeOffset,n),e.mode!==b$1d.SCENE3D){var r=e.mapProjection,o=c$1a.getColumn(n,3,lt$c);a$10.equals(o,a$10.UNIT_W)||m$13.basisTo2D(r,n,n)}var a=this._drawCommand.boundingVolume;if(c$19.clone(this._boundingSphere,a),this._cull){var s=a.center;c$1a.multiplyByPoint(n,s,s);var l=c$1a.getScale(n,dt$b);a.radius*=a$11.maximumComponent(l)}}this.clippingPlanesDirty&&(this.clippingPlanesDirty=!1,t=!0),this._attenuation!==this.attenuation&&(this._attenuation=this.attenuation,t=!0),this.backFaceCulling!==this._backFaceCulling&&(this._backFaceCulling=this.backFaceCulling,t=!0),this.normalShading!==this._normalShading&&(this._normalShading=this.normalShading,t=!0),(this._style!==this.style||this.styleDirty)&&(this._style=this.style,this.styleDirty=!1,t=!0),t&&nt$c(this,e,this._style),this._drawCommand.castShadows=q$Q.castShadows(this.shadows),this._drawCommand.receiveShadows=q$Q.receiveShadows(this.shadows);var u=this._highlightColor.alpha<1||this._constantColor.alpha<1||this._styleTranslucent;this._drawCommand.renderState=u?this._translucentRenderState:this._opaqueRenderState,this._drawCommand.pass=u?we$l.TRANSLUCENT:this._opaquePass;var c=e.commandList,h=e.passes;(h.render||h.pick)&&c.push(this._drawCommand)}},ie$l.prototype.isDestroyed=function(){return!1},ie$l.prototype.destroy=function(){var e=this._drawCommand;return t$$(e)&&(e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy()),s$1e(this)},Object.defineProperties(u$F.prototype,{status:{get:function(){this._bind();var e=this._gl.checkFramebufferStatus(this._gl.FRAMEBUFFER);return this._unBind(),e}},numberOfColorAttachments:{get:function(){return this._activeColorAttachments.length}},depthTexture:{get:function(){return this._depthTexture}},depthRenderbuffer:{get:function(){return this._depthRenderbuffer}},stencilRenderbuffer:{get:function(){return this._stencilRenderbuffer}},depthStencilTexture:{get:function(){return this._depthStencilTexture}},depthStencilRenderbuffer:{get:function(){return this._depthStencilRenderbuffer}},hasDepthAttachment:{get:function(){return!!(this.depthTexture||this.depthRenderbuffer||this.depthStencilTexture||this.depthStencilRenderbuffer)}}}),u$F.prototype._bind=function(){var e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,this._framebuffer)},u$F.prototype._unBind=function(){var e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,null)},u$F.prototype._getActiveColorAttachments=function(){return this._activeColorAttachments},u$F.prototype.getColorTexture=function(e){if(!t$$(e)||e<0||e>=this._colorTextures.length)throw new t$_("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorTextures[e]},u$F.prototype.getColorRenderbuffer=function(e){if(!t$$(e)||e<0||e>=this._colorRenderbuffers.length)throw new t$_("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorRenderbuffers[e]},u$F.prototype.isDestroyed=function(){return!1},u$F.prototype.destroy=function(){if(this.destroyAttachments){for(var e=0,t=this._colorTextures,i=t.length;e<i;++e){var n=t[e];t$$(n)&&n.destroy()}var r=this._colorRenderbuffers;for(i=r.length,e=0;e<i;++e){var o=r[e];t$$(o)&&o.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),s$1e(this)},u$F.copyFromFramebufferToFramebuffer=function(e,t,i,n,r,o){if(e.webgl2){var a=e._gl,s=0;if(n&&(s|=a.COLOR_BUFFER_BIT),r&&(s|=a.DEPTH_BUFFER_BIT),o&&(s|=a.STENCIL_BUFFER_BIT),0!=s){a.bindFramebuffer(a.READ_FRAMEBUFFER,t._framebuffer),a.bindFramebuffer(a.DRAW_FRAMEBUFFER,i._framebuffer);var l=i.getColorTexture(0),u=l.width,c=l.height;a.blitFramebuffer(0,0,u,c,0,0,u,c,s,a.NEAREST),a.bindFramebuffer(a.READ_FRAMEBUFFER,null),a.bindFramebuffer(a.DRAW_FRAMEBUFFER,null)}}};var M$G="#extension GL_EXT_frag_depth : enable\nuniform sampler2D u_pointCloud_colorGBuffer;\nuniform sampler2D u_pointCloud_depthGBuffer;\nuniform vec2 u_distanceAndEdlStrength;\nvarying vec2 v_textureCoordinates;\nvec2 neighborContribution(float log2Depth, vec2 offset)\n{\nfloat dist = u_distanceAndEdlStrength.x;\nvec2 texCoordOrig = v_textureCoordinates + offset * dist;\nvec2 texCoord0 = v_textureCoordinates + offset * floor(dist);\nvec2 texCoord1 = v_textureCoordinates + offset * ceil(dist);\nfloat depthOrLogDepth0 = czm_unpackDepth(texture2D(u_pointCloud_depthGBuffer, texCoord0));\nfloat depthOrLogDepth1 = czm_unpackDepth(texture2D(u_pointCloud_depthGBuffer, texCoord1));\nif (depthOrLogDepth0 == 0.0 || depthOrLogDepth1 == 0.0) {\nreturn vec2(0.0);\n}\nfloat depthMix = mix(depthOrLogDepth0, depthOrLogDepth1, fract(dist));\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(texCoordOrig, depthMix);\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);\nvec2 texelSize = 1.0 / czm_viewport.zw;\nvec2 responseAndCount = vec2(0.0);\nresponseAndCount += neighborContribution(log2Depth, vec2(-texelSize.x, 0.0));\nresponseAndCount += neighborContribution(log2Depth, vec2(+texelSize.x, 0.0));\nresponseAndCount += neighborContribution(log2Depth, vec2(0.0, -texelSize.y));\nresponseAndCount += neighborContribution(log2Depth, vec2(0.0, +texelSize.y));\nfloat response = responseAndCount.x / responseAndCount.y;\nfloat strength = u_distanceAndEdlStrength.y;\nfloat shade = exp(-response * 300.0 * strength);\ncolor.rgb *= shade;\ngl_FragColor = vec4(color);\n#ifdef LOG_DEPTH\nczm_writeLogDepth(1.0 + (czm_projection * vec4(eyeCoordinate.xyz, 1.0)).w);\n#else\ngl_FragDepthEXT = czm_eyeToWindowCoordinates(vec4(eyeCoordinate.xyz, 1.0)).z;\n#endif\n}\n";function u$E(){this._framebuffer=void 0,this._colorGBuffer=void 0,this._depthGBuffer=void 0,this._depthTexture=void 0,this._drawCommand=void 0,this._clearCommand=void 0,this._strength=1,this._radius=1}function c$C(){return new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST})}function w$I(e){var t=e._framebuffer;!t$$(t)||(e._colorGBuffer.destroy(),e._depthGBuffer.destroy(),e._depthTexture.destroy(),t.destroy(),e._framebuffer=void 0,e._colorGBuffer=void 0,e._depthGBuffer=void 0,e._depthTexture=void 0,e._drawCommand=void 0,e._clearCommand=void 0)}function R$v(e,t){var i=t.drawingBufferWidth,n=t.drawingBufferHeight,r=new P$S({context:t,width:i,height:n,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE,sampler:c$C()}),o=new P$S({context:t,width:i,height:n,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE,sampler:c$C()}),a=new P$S({context:t,width:i,height:n,pixelFormat:Z$_.DEPTH_COMPONENT,pixelDatatype:v$Z.UNSIGNED_INT,sampler:c$C()});e._framebuffer=new u$F({context:t,colorTextures:[r,o],depthTexture:a,destroyAttachments:!1}),e._colorGBuffer=r,e._depthGBuffer=o,e._depthTexture=a}var l$C=new r$T;function U$I(e,t){var i=M$G,n={u_pointCloud_colorGBuffer:function(){return e._colorGBuffer},u_pointCloud_depthGBuffer:function(){return e._depthGBuffer},u_distanceAndEdlStrength:function(){return l$C.x=e._radius,l$C.y=e._strength,l$C}},r=p$1a.fromCache({blending:Ee$s.ALPHA_BLEND,depthMask:!0,depthTest:{enabled:!0},stencilTest:Ia$1.setCesium3DTileBit(),stencilMask:Ia$1.CESIUM_3D_TILE_MASK});e._drawCommand=t.createViewportQuadCommand(i,{uniformMap:n,renderState:r,pass:we$l.CESIUM_3D_TILE,owner:e}),e._clearCommand=new r$M({framebuffer:e._framebuffer,color:new e$1z(0,0,0,0),depth:1,renderState:p$1a.fromCache(),pass:we$l.CESIUM_3D_TILE,owner:e})}function z$v(e,t){var i=t.drawingBufferWidth,n=t.drawingBufferHeight,r=e._colorGBuffer,o=!1,a=t$$(r)&&(r.width!==i||r.height!==n);return(!t$$(r)||a)&&(w$I(e),R$v(e,t),U$I(e,t),o=!0),o}function E$E(e){return e.drawBuffers&&e.fragmentDepth}function H$B(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"EC");if(!t$$(i)){var n=t._attributeLocations,r=t.fragmentShaderSource.clone();r.sources=r.sources.map((function(e){return e=(e=a$O.replaceMain(e,"czm_point_cloud_post_process_main")).replace(/gl_FragColor/g,"gl_FragData[0]")})),r.sources.unshift("#extension GL_EXT_draw_buffers : enable \n"),r.sources.push("void main() \n{ \n czm_point_cloud_post_process_main(); \n#ifdef LOG_DEPTH\n czm_writeLogDepth();\n gl_FragData[1] = czm_packDepth(gl_FragDepthEXT); \n#else\n gl_FragData[1] = czm_packDepth(gl_FragCoord.z);\n#endif\n}"),i=e.shaderCache.createDerivedShaderProgram(t,"EC",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:r,attributeLocations:n})}return i}function n$C(e){var t=e$1Y(e,{});this.attenuation=e$1Y(t.attenuation,!1),this.geometricErrorScale=e$1Y(t.geometricErrorScale,1),this.maximumAttenuation=t.maximumAttenuation,this.baseResolution=t.baseResolution,this.eyeDomeLighting=e$1Y(t.eyeDomeLighting,!0),this.eyeDomeLightingStrength=e$1Y(t.eyeDomeLightingStrength,1),this.eyeDomeLightingRadius=e$1Y(t.eyeDomeLightingRadius,1),this.backFaceCulling=e$1Y(t.backFaceCulling,!1),this.normalShading=e$1Y(t.normalShading,!0)}function a$x(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._pickId=void 0,this._batchTable=void 0,this._styleDirty=!1,this._features=void 0,this.featurePropertiesDirty=!1,this._pointCloud=new ie$l({arrayBuffer:n,byteOffset:r,cull:!1,opaquePass:we$l.CESIUM_3D_TILE,vertexShaderLoaded:v$A(this),fragmentShaderLoaded:D$E(this),uniformMapLoaded:I$I(this),batchTableLoaded:P$v(this),pickIdLoaded:x$E(this)})}function v$A(e){return function(t){return t$$(e._batchTable)?e._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(t):t}}function D$E(e){return function(t){return t$$(e._batchTable)?e._batchTable.getFragmentShaderCallback(!1,void 0)(t):"uniform vec4 czm_pickColor;\n"+t}}function I$I(e){return function(t){return t$$(e._batchTable)?e._batchTable.getUniformMapCallback()(t):s$1n(t,{czm_pickColor:function(){return e._pickId.color}})}}function P$v(e){return function(t,i,n){e._batchTable=new p$Q(e,t,i,n)}}function x$E(e){return function(){return t$$(e._batchTable)?e._batchTable.getPickId():"czm_pickColor"}}function E$D(e){var t=e._tileset.pointCloudShading,i=e._tile.contentBoundingVolume.boundingSphere.volume(),n=n$1d.cbrt(i/e.pointsLength),r=e._tile.geometricError;return 0===r&&(r=t$$(t)&&t$$(t.baseResolution)?t.baseResolution:n),r}function w$H(e){var t=e.featuresLength;if(!t$$(e._features)&&t>0){for(var i=new Array(t),n=0;n<t;++n)i[n]=new e$Z(e,n);e._features=i}}u$E.isSupported=E$E,u$E.prototype.update=function(e,t,i){if(E$E(e.context)){this._strength=i.eyeDomeLightingStrength,this._radius=i.eyeDomeLightingRadius*e.pixelRatio;var n,r=z$v(this,e.context),o=e.commandList,a=o.length;for(n=t;n<a;++n){var s=o[n];if(s.primitiveType===H$11.POINTS&&s.pass!==we$l.TRANSLUCENT){var l=s.derivedCommands.pointCloudProcessor;(!t$$(l)||s.dirty||r||l.framebuffer!==this._framebuffer)&&(l=s$1d.shallowClone(s),s.derivedCommands.pointCloudProcessor=l,l.framebuffer=this._framebuffer,l.shaderProgram=H$B(e.context,s.shaderProgram),l.castShadows=!1,l.receiveShadows=!1),o[n]=l}}var u=this._clearCommand,c=this._drawCommand;o.push(c),o.push(u)}},u$E.prototype.isDestroyed=function(){return!1},u$E.prototype.destroy=function(){return w$I(this),s$1e(this)},n$C.isSupported=function(e){return u$E.isSupported(e.context)},Object.defineProperties(a$x.prototype,{featuresLength:{get:function(){return t$$(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return this._pointCloud.pointsLength}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return this._pointCloud.geometryByteLength}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return t$$(this._batchTable)?this._batchTable.memorySizeInBytes:0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._pointCloud.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}}),a$x.prototype.hasProperty=function(e,t){return!!t$$(this._batchTable)&&this._batchTable.hasProperty(e,t)},a$x.prototype.getFeature=function(e){if(t$$(this._batchTable)){var t=this.featuresLength;if(!t$$(e)||e<0||e>=t)throw new t$_("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return w$H(this),this._features[e]}},a$x.prototype.applyDebugSettings=function(e,t){this._pointCloud.color=e?t:e$1z.WHITE},a$x.prototype.applyStyle=function(e){t$$(this._batchTable)?this._batchTable.applyStyle(e):this._styleDirty=!0};var B$t=new n$C;function e$S(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._readyPromise=c$18.defer(),this.featurePropertiesDirty=!1,a$w(this,n,r)}function a$w(e,t,i){i=e$1Y(i,0);var n,r=c$X(new Uint8Array(t),i);try{n=JSON.parse(r)}catch{return void e._readyPromise.reject(new t$Z("Invalid tile content."))}e._tileset.loadTileset(e._resource,n,e._tile),e._readyPromise.resolve(e)}function u$D(e,t,i,n){if(n$1e.defined("context",e),!t||0===t.length)throw new t$_("At least one attribute is required.");var r=u$D._verifyAttributes(t);i=e$1Y(i,0);for(var o,a,s=[],l={},u=r.length,c=0;c<u;++c){var h=r[c];h.vertexBuffer?s.push(h):(t$$(o=l[a=h.usage])||(o=l[a]=[]),o.push(h))}function d(e,t){return C$12.getSizeInBytes(t.componentDatatype)-C$12.getSizeInBytes(e.componentDatatype)}for(a in this._allBuffers=[],l)if(l.hasOwnProperty(a)){(o=l[a]).sort(d);var f=u$D._vertexSizeInBytes(o),p={vertexSizeInBytes:f,vertexBuffer:void 0,usage:o[0].usage,needsCommit:!1,arrayBuffer:void 0,arrayViews:u$D._createArrayViews(o,f)};this._allBuffers.push(p)}this._size=0,this._instanced=e$1Y(n,!1),this._precreated=s,this._context=e,this.writers=void 0,this.va=void 0,this.resize(i)}a$x.prototype.update=function(e,t){var i,n=this._pointCloud,r=e$1Y(e.pointCloudShading,B$t),o=this._tile,a=this._batchTable,s=t.mode,l=e.clippingPlanes;!t$$(this._pickId)&&!t$$(a)&&(this._pickId=t.context.createPickId({primitive:e,content:this})),t$$(a)&&a.update(e,t),i=t$$(o._contentBoundingVolume)?s===b$1d.SCENE3D?o._contentBoundingVolume.boundingSphere:o._contentBoundingVolume2D.boundingSphere:s===b$1d.SCENE3D?o._boundingVolume.boundingSphere:o._boundingVolume2D.boundingSphere;var u=this._styleDirty;this._styleDirty=!1,n.clippingPlanesOriginMatrix=e.clippingPlanesOriginMatrix,n.style=t$$(a)?void 0:e.style,n.styleDirty=u,n.modelMatrix=o.computedTransform,n.time=e.timeSinceLoad,n.shadows=e.shadows,n.boundingSphere=i,n.clippingPlanes=l,n.isClipped=t$$(l)&&l.enabled&&o._isClipped,n.clippingPlanesDirty=o.clippingPlanesDirty,n.attenuation=r.attenuation,n.backFaceCulling=r.backFaceCulling,n.normalShading=r.normalShading,n.geometricError=E$D(this),n.geometricErrorScale=r.geometricErrorScale,t$$(r)&&t$$(r.maximumAttenuation)?n.maximumAttenuation=r.maximumAttenuation:o.refine===l$D.ADD?n.maximumAttenuation=5:n.maximumAttenuation=e.maximumScreenSpaceError,n.update(t)},a$x.prototype.isDestroyed=function(){return!1},a$x.prototype.destroy=function(){return this._pickId=this._pickId&&this._pickId.destroy(),this._pointCloud=this._pointCloud&&this._pointCloud.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),s$1e(this)},Object.defineProperties(e$S.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}}}),e$S.prototype.hasProperty=function(e,t){return!1},e$S.prototype.getFeature=function(e){},e$S.prototype.applyDebugSettings=function(e,t){},e$S.prototype.applyStyle=function(e){},e$S.prototype.update=function(e,t){},e$S.prototype.isDestroyed=function(){return!1},e$S.prototype.destroy=function(){return s$1e(this)},u$D._verifyAttributes=function(e){for(var t=[],i=0;i<e.length;++i){var n=e[i],r={index:e$1Y(n.index,i),enabled:e$1Y(n.enabled,!0),componentsPerAttribute:n.componentsPerAttribute,componentDatatype:e$1Y(n.componentDatatype,C$12.FLOAT),normalize:e$1Y(n.normalize,!1),vertexBuffer:n.vertexBuffer,usage:e$1Y(n.usage,A$13.STATIC_DRAW)};if(t.push(r),1!==r.componentsPerAttribute&&2!==r.componentsPerAttribute&&3!==r.componentsPerAttribute&&4!==r.componentsPerAttribute)throw new t$_("attribute.componentsPerAttribute must be in the range [1, 4].");var o=r.componentDatatype;if(!C$12.validate(o))throw new t$_("Attribute must have a valid componentDatatype or not specify it.");if(!A$13.validate(r.usage))throw new t$_("Attribute must have a valid usage or not specify it.")}for(var a=new Array(t.length),s=0;s<t.length;++s){var l=t[s].index;if(a[l])throw new t$_("Index "+l+" is used by more than one attribute.");a[l]=!0}return t},u$D._vertexSizeInBytes=function(e){for(var t=0,i=e.length,n=0;n<i;++n){var r=e[n];t+=r.componentsPerAttribute*C$12.getSizeInBytes(r.componentDatatype)}var o=i>0?C$12.getSizeInBytes(e[0].componentDatatype):0,a=o>0?t%o:0;return t+=0===a?0:o-a},u$D._createArrayViews=function(e,t){for(var i=[],n=0,r=e.length,o=0;o<r;++o){var a=e[o],s=a.componentDatatype;i.push({index:a.index,enabled:a.enabled,componentsPerAttribute:a.componentsPerAttribute,componentDatatype:s,normalize:a.normalize,offsetInBytes:n,vertexSizeInComponentType:t/C$12.getSizeInBytes(s),view:void 0}),n+=a.componentsPerAttribute*C$12.getSizeInBytes(s)}return i},u$D.prototype.resize=function(e){this._size=e;var t=this._allBuffers;this.writers=[];for(var i=0,n=t.length;i<n;++i){var r=t[i];u$D._resize(r,this._size),u$D._appendWriters(this.writers,r)}l$B(this)},u$D._resize=function(e,t){if(e.vertexSizeInBytes>0){var i=new ArrayBuffer(t*e.vertexSizeInBytes);if(t$$(e.arrayBuffer))for(var n=new Uint8Array(i),r=new Uint8Array(e.arrayBuffer),o=r.length,a=0;a<o;++a)n[a]=r[a];for(var s=e.arrayViews,l=s.length,u=0;u<l;++u){var c=s[u];c.view=C$12.createArrayBufferView(c.componentDatatype,i,c.offsetInBytes)}e.arrayBuffer=i}};var P$u=[function(e,t,i){return function(n,r){t[n*i]=r,e.needsCommit=!0}},function(e,t,i){return function(n,r,o){var a=n*i;t[a]=r,t[a+1]=o,e.needsCommit=!0}},function(e,t,i){return function(n,r,o,a){var s=n*i;t[s]=r,t[s+1]=o,t[s+2]=a,e.needsCommit=!0}},function(e,t,i){return function(n,r,o,a,s){var l=n*i;t[l]=r,t[l+1]=o,t[l+2]=a,t[l+3]=s,e.needsCommit=!0}}];function T$E(e,t){if(t.needsCommit&&t.vertexSizeInBytes>0){t.needsCommit=!1;var i=t.vertexBuffer,n=e._size*t.vertexSizeInBytes,r=t$$(i);if(!r||i.sizeInBytes<n)return r&&i.destroy(),t.vertexBuffer=u$Y.createVertexBuffer({context:e._context,typedArray:t.arrayBuffer,usage:t.usage}),t.vertexBuffer.vertexArrayDestroyable=!1,!0;t.vertexBuffer.copyFromArrayView(t.arrayBuffer)}return!1}function V$t(e,t,i){if(e.needsCommit&&e.vertexSizeInBytes>0){var n=e.vertexSizeInBytes*t,r=e.vertexSizeInBytes*i;e.vertexBuffer.copyFromArrayView(new Uint8Array(e.arrayBuffer,n,r),n)}}function l$B(e){var t=e.va;if(t$$(t)){for(var i=t.length,n=0;n<i;++n)t[n].va.destroy();e.va=void 0}}u$D._appendWriters=function(e,t){for(var i=t.arrayViews,n=i.length,r=0;r<n;++r){var o=i[r];e[o.index]=P$u[o.componentsPerAttribute-1](t,o.view,o.vertexSizeInComponentType)}},u$D.prototype.commit=function(e){var t,i,n,r=!1,o=this._allBuffers;for(i=0,n=o.length;i<n;++i)r=T$E(this,t=o[i])||r;if(r||!t$$(this.va)){l$B(this);for(var a=this.va=[],s=t$$(e)?Math.ceil(this._size/(n$1d.SIXTY_FOUR_KILOBYTES-1)):1,l=0;l<s;++l){var u=[];for(i=0,n=o.length;i<n;++i){var c=l*((t=o[i]).vertexSizeInBytes*(n$1d.SIXTY_FOUR_KILOBYTES-1));u$D._appendAttributes(u,t,c,this._instanced)}u=u.concat(this._precreated),a.push({va:new x$18({context:this._context,attributes:u,indexBuffer:e}),indicesCount:1.5*(l!==s-1?n$1d.SIXTY_FOUR_KILOBYTES-1:this._size%(n$1d.SIXTY_FOUR_KILOBYTES-1))})}}},u$D._appendAttributes=function(e,t,i,n){for(var r=t.arrayViews,o=r.length,a=0;a<o;++a){var s=r[a];e.push({index:s.index,enabled:s.enabled,componentsPerAttribute:s.componentsPerAttribute,componentDatatype:s.componentDatatype,normalize:s.normalize,vertexBuffer:t.vertexBuffer,offsetInBytes:i+s.offsetInBytes,strideInBytes:t.vertexSizeInBytes,instanceDivisor:n?1:0})}},u$D.prototype.subCommit=function(e,t){if(e<0||e>=this._size)throw new t$_("offsetInVertices must be greater than or equal to zero and less than the vertex array size.");if(e+t>this._size)throw new t$_("offsetInVertices + lengthInVertices cannot exceed the vertex array size.");for(var i=this._allBuffers,n=0,r=i.length;n<r;++n)V$t(i[n],e,t)},u$D.prototype.endSubCommits=function(){for(var e=this._allBuffers,t=0,i=e.length;t<i;++t)e[t].needsCommit=!1},u$D.prototype.isDestroyed=function(){return!1},u$D.prototype.destroy=function(){for(var e=this._allBuffers,t=0,i=e.length;t<i;++t){var n=e[t];n.vertexBuffer=n.vertexBuffer&&n.vertexBuffer.destroy()}return l$B(this),s$1e(this)};var Rt$6="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform sampler2D u_atlas;\n#ifdef APPLY_SWIPE\nuniform vec4 uSwipeRegion;\n#endif\n#ifdef VECTOR_TILE\nuniform vec4 u_highlightColor;\n#endif\nvarying float v_depth;\nvarying vec2 v_textureCoordinates;\nvarying vec4 v_pickColor;\nvarying vec4 v_color;\n#ifdef SDF\nvarying vec4 v_outlineColor;\nvarying float v_outlineWidth;\n#endif\n#ifdef FRAGMENT_DEPTH_CHECK\nvarying vec4 v_textureCoordinateBounds;\nvarying vec4 v_originTextureCoordinateAndTranslate;\nvarying vec4 v_compressed;\nvarying mat2 v_rotationMatrix;\nconst float SHIFT_LEFT12 = 4096.0;\nconst float SHIFT_LEFT1 = 2.0;\nconst float SHIFT_RIGHT12 = 1.0 / 4096.0;\nconst float SHIFT_RIGHT1 = 1.0 / 2.0;\nfloat getGlobeDepth(vec2 adjustedST, vec2 depthLookupST, bool applyTranslate, vec2 dimensions, vec2 imageSize)\n{\nvec2 lookupVector = imageSize * (depthLookupST - adjustedST);\nlookupVector = v_rotationMatrix * lookupVector;\nvec2 labelOffset = (dimensions - imageSize) * (depthLookupST - vec2(0.0, v_originTextureCoordinateAndTranslate.y));\nvec2 translation = v_originTextureCoordinateAndTranslate.zw;\nif (applyTranslate)\n{\ntranslation += (dimensions * v_originTextureCoordinateAndTranslate.xy * vec2(1.0, 0.0));\n}\nvec2 st = ((lookupVector - translation + labelOffset) + gl_FragCoord.xy) / czm_viewport.zw;\nfloat logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, st));\nif (logDepthOrDepth == 0.0)\n{\nreturn 0.0;\n}\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\nreturn eyeCoordinate.z / eyeCoordinate.w;\n}\n#endif\n#ifdef SDF\nfloat getDistance(vec2 position)\n{\n#if defined(MVT) && !defined(WEBGPU)\nreturn texture2D(u_atlas, position).a;\n#else\nreturn texture2D(u_atlas, position).r;\n#endif\n}\nvec4 getSDFColor(vec2 position, float outlineWidth, vec4 outlineColor, float smoothing)\n{\nfloat distance = getDistance(position);\nif (outlineWidth > 0.0)\n{\nfloat outlineEdge = clamp(SDF_EDGE - outlineWidth, 0.0, SDF_EDGE);\nfloat outlineFactor = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);\nvec4 sdfColor = mix(outlineColor, v_color, outlineFactor);\nfloat alpha = smoothstep(outlineEdge - smoothing, outlineEdge + smoothing, distance);\nreturn vec4(sdfColor.rgb, sdfColor.a * alpha);\n}\nelse\n{\nfloat alpha = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);\nreturn vec4(v_color.rgb, v_color.a * alpha);\n}\n}\n#endif\nvoid main()\n{\n#ifdef APPLY_SWIPE\nczm_RollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\nvec4 color = texture2D(u_atlas, v_textureCoordinates);\n#ifdef SDF\nfloat outlineWidth = v_outlineWidth;\nvec4 outlineColor = v_outlineColor;\nfloat distance = getDistance(v_textureCoordinates);\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2) || defined(WEBGPU)\nfloat smoothing = fwidth(distance);\nvec2 sampleOffset = 0.354 * vec2(dFdx(v_textureCoordinates) + dFdy(v_textureCoordinates));\nvec4 center = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);\nvec4 color1 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);\nvec4 color2 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);\nvec4 color3 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);\nvec4 color4 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);\ncolor = (center + color1 + color2 + color3 + color4)/5.0;\n#else\nfloat smoothing = 1.0/32.0;\ncolor = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);\n#endif\ncolor = czm_gammaCorrect(color);\n#else\ncolor = czm_gammaCorrect(color);\ncolor *= czm_gammaCorrect(v_color);\n#endif\n#if !defined(OPAQUE) && !defined(TRANSLUCENT)\nif (color.a < 0.005)\n{\ndiscard;\n}\n#else\n#ifdef OPAQUE\nif (color.a < 0.995)\n{\ndiscard;\n}\n#else\nif (color.a >= 0.995)\n{\ndiscard;\n}\n#endif\n#endif\n#ifdef VECTOR_TILE\ncolor *= u_highlightColor;\n#endif\n#ifdef PARTICLESYSTEM\n#ifdef LOG_DEPTH\nfloat fDepth = log2(v_depth) * czm_oneOverLog2FarDepthFromNearPlusOne;\n#else\nfloat fDepth = gl_FragCoord.z;\n#endif\ngl_FragColor = vec4(fDepth, fDepth * fDepth, 1.0, 1.0);\n#else\ngl_FragColor = color;\n#endif\n#ifdef LOG_DEPTH\nczm_writeLogDepth();\n#endif\n#ifdef FRAGMENT_DEPTH_CHECK\nfloat temp = v_compressed.y;\ntemp = temp * SHIFT_RIGHT1;\nfloat temp2 = (temp - floor(temp)) * SHIFT_LEFT1;\nbool enableDepthTest = temp2 != 0.0;\nbool applyTranslate = floor(temp) != 0.0;\nif (enableDepthTest) {\ntemp = v_compressed.z;\ntemp = temp * SHIFT_RIGHT12;\nvec2 dimensions;\ndimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;\ndimensions.x = floor(temp);\ntemp = v_compressed.w;\ntemp = temp * SHIFT_RIGHT12;\nvec2 imageSize;\nimageSize.y = (temp - floor(temp)) * SHIFT_LEFT12;\nimageSize.x = floor(temp);\nvec2 adjustedST = v_textureCoordinates - v_textureCoordinateBounds.xy;\nadjustedST = adjustedST / vec2(v_textureCoordinateBounds.z - v_textureCoordinateBounds.x, v_textureCoordinateBounds.w - v_textureCoordinateBounds.y);\nfloat epsilonEyeDepth = v_compressed.x + czm_epsilon1;\nfloat globeDepth1 = getGlobeDepth(adjustedST, v_originTextureCoordinateAndTranslate.xy, applyTranslate, dimensions, imageSize);\nif (globeDepth1 != 0.0 && globeDepth1 > epsilonEyeDepth)\n{\nfloat globeDepth2 = getGlobeDepth(adjustedST, vec2(0.0, 1.0), applyTranslate, dimensions, imageSize);\nif (globeDepth2 != 0.0 && globeDepth2 > epsilonEyeDepth)\n{\nfloat globeDepth3 = getGlobeDepth(adjustedST, vec2(1.0, 1.0), applyTranslate, dimensions, imageSize);\nif (globeDepth3 != 0.0 && globeDepth3 > epsilonEyeDepth)\n{\ndiscard;\n}\n}\n}\n}\n#endif\n}\n",Bt$5="#ifdef INSTANCED\nattribute vec2 direction;\n#endif\nattribute vec4 positionHighAndScale;\nattribute vec4 positionLowAndRotation;\nattribute vec4 compressedAttribute0;\nattribute vec4 compressedAttribute1;\nattribute vec4 compressedAttribute2;\nattribute vec4 eyeOffset;\nattribute vec4 scaleByDistance;\nattribute vec4 pixelOffsetScaleByDistance;\nattribute vec4 compressedAttribute3;\nattribute vec2 sdf;\n#if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)\nattribute vec4 textureCoordinateBoundsOrLabelTranslate;\n#endif\n#ifdef VECTOR_TILE\nattribute float a_batchId;\n#endif\n#ifdef MVT\nattribute vec4 a_fade_opacity;\n#endif\nuniform float u_eyeOffsetZ;\nuniform float u_fade_change;\nvarying float v_depth;\nvarying vec2 v_textureCoordinates;\n#ifdef FRAGMENT_DEPTH_CHECK\nvarying vec4 v_textureCoordinateBounds;\nvarying vec4 v_originTextureCoordinateAndTranslate;\nvarying vec4 v_compressed;\nvarying mat2 v_rotationMatrix;\n#endif\nvarying vec4 v_pickColor;\nvarying vec4 v_color;\n#ifdef SDF\nvarying vec4 v_outlineColor;\nvarying float v_outlineWidth;\n#endif\nconst float UPPER_BOUND = 32768.0;\nconst float SHIFT_LEFT16 = 65536.0;\nconst float SHIFT_LEFT12 = 4096.0;\nconst float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_LEFT7 = 128.0;\nconst float SHIFT_LEFT5 = 32.0;\nconst float SHIFT_LEFT3 = 8.0;\nconst float SHIFT_LEFT2 = 4.0;\nconst float SHIFT_LEFT1 = 2.0;\nconst float SHIFT_RIGHT12 = 1.0 / 4096.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\nconst float SHIFT_RIGHT7 = 1.0 / 128.0;\nconst float SHIFT_RIGHT5 = 1.0 / 32.0;\nconst float SHIFT_RIGHT3 = 1.0 / 8.0;\nconst float SHIFT_RIGHT2 = 1.0 / 4.0;\nconst float SHIFT_RIGHT1 = 1.0 / 2.0;\nvec4 addScreenSpaceOffset(vec4 positionEC, vec2 imageSize, float scale, vec2 direction, vec2 origin, vec2 translate, vec2 pixelOffset, vec3 alignedAxis, bool validAlignedAxis, float rotation, bool sizeInMeters, out mat2 rotationMatrix, out float mpp)\n{\nvec2 halfSize = imageSize * scale * 0.5;\nhalfSize *= ((direction * 2.0) - 1.0);\nvec2 originTranslate = origin * abs(halfSize);\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\nif (validAlignedAxis || rotation != 0.0)\n{\nfloat angle = rotation;\nif (validAlignedAxis)\n{\nvec4 projectedAlignedAxis = czm_modelViewProjection * vec4(alignedAxis, 0.0);\nangle += sign(-projectedAlignedAxis.x) * acos(sign(projectedAlignedAxis.y) * (projectedAlignedAxis.y * projectedAlignedAxis.y) /\n(projectedAlignedAxis.x * projectedAlignedAxis.x + projectedAlignedAxis.y * projectedAlignedAxis.y));\n}\nfloat cosTheta = cos(angle);\nfloat sinTheta = sin(angle);\nrotationMatrix = mat2(cosTheta, sinTheta, -sinTheta, cosTheta);\nhalfSize = rotationMatrix * halfSize;\n}\nelse\n{\nrotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);\n}\n#endif\nmpp = czm_metersPerPixel(positionEC);\n#ifdef FixedXYZ\nvec4 origViewPos = czm_view * vec4(0.0, 0.0, 0.0, 1.0);\nvec4 fixedAxis = positionEC - origViewPos;\nvec3 zAxis = normalize(fixedAxis.xyz);\nvec3 upViewVector = vec3(0.0, 1.0, 0.0);\nvec3 xAxis = normalize(cross(upViewVector, zAxis));\nvec3 yAxis = cross(zAxis, xAxis);\nyAxis = normalize(yAxis);\nmat3 matrix = mat3(xAxis,yAxis,zAxis);\nvec3 tmp = matrix * vec3((originTranslate + halfSize + translate + pixelOffset), 0.0);\ntmp *= czm_branchFreeTernary(sizeInMeters, 1.0, mpp);\npositionEC.xy += tmp.xy;\n#else\npositionEC.xy += (originTranslate + halfSize) * czm_branchFreeTernary(sizeInMeters, 1.0, mpp);\npositionEC.xy += (translate + pixelOffset) * mpp;\n#endif\nreturn positionEC;\n}\n#ifdef VERTEX_DEPTH_CHECK\nfloat getGlobeDepth(vec4 positionEC)\n{\nvec4 posWC = czm_eyeToWindowCoordinates(positionEC);\nfloat globeDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));\nif (globeDepth == 0.0)\n{\nreturn 0.0;\n}\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);\nreturn eyeCoordinate.z / eyeCoordinate.w;\n}\n#endif\nvoid main()\n{\nvec3 positionHigh = positionHighAndScale.xyz;\nvec3 positionLow = positionLowAndRotation.xyz;\nfloat scale = positionHighAndScale.w;\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\nfloat rotation = positionLowAndRotation.w;\n#else\nfloat rotation = 0.0;\n#endif\nfloat compressed = compressedAttribute0.x;\nvec2 pixelOffset;\npixelOffset.x = floor(compressed * SHIFT_RIGHT7);\ncompressed -= pixelOffset.x * SHIFT_LEFT7;\npixelOffset.x -= UPPER_BOUND;\nvec2 origin;\norigin.x = floor(compressed * SHIFT_RIGHT5);\ncompressed -= origin.x * SHIFT_LEFT5;\norigin.y = floor(compressed * SHIFT_RIGHT3);\ncompressed -= origin.y * SHIFT_LEFT3;\n#ifdef FRAGMENT_DEPTH_CHECK\nvec2 depthOrigin = origin.xy;\n#endif\norigin -= vec2(1.0);\nfloat show = floor(compressed * SHIFT_RIGHT2);\ncompressed -= show * SHIFT_LEFT2;\n#ifdef INSTANCED\nvec2 textureCoordinatesBottomLeft = czm_decompressTextureCoordinates(compressedAttribute0.w);\nvec2 textureCoordinatesRange = czm_decompressTextureCoordinates(eyeOffset.w);\n#ifdef MVT\nvec2 textureCoordinates;\ntextureCoordinates.x = textureCoordinatesBottomLeft.x + direction.x * textureCoordinatesRange.x;\ntextureCoordinates.y = textureCoordinatesBottomLeft.y - direction.y * textureCoordinatesRange.y;\n#else\nvec2 textureCoordinates = textureCoordinatesBottomLeft + direction * textureCoordinatesRange;\n#endif\n#else\nvec2 direction;\ndirection.x = floor(compressed * SHIFT_RIGHT1);\ndirection.y = compressed - direction.x * SHIFT_LEFT1;\nvec2 textureCoordinates = czm_decompressTextureCoordinates(compressedAttribute0.w);\n#endif\nfloat temp = compressedAttribute0.y * SHIFT_RIGHT8;\npixelOffset.y = -(floor(temp) - UPPER_BOUND);\nvec2 translate;\ntranslate.y = (temp - floor(temp)) * SHIFT_LEFT16;\ntemp = compressedAttribute0.z * SHIFT_RIGHT8;\ntranslate.x = floor(temp) - UPPER_BOUND;\ntranslate.y += (temp - floor(temp)) * SHIFT_LEFT8;\ntranslate.y -= UPPER_BOUND;\ntemp = compressedAttribute1.x * SHIFT_RIGHT8;\nfloat temp2 = floor(compressedAttribute2.w * SHIFT_RIGHT2);\nvec2 imageSize = vec2(floor(temp), temp2);\n#ifdef FRAGMENT_DEPTH_CHECK\nfloat labelHorizontalOrigin = floor(compressedAttribute2.w - (temp2 * SHIFT_LEFT2));\nfloat applyTranslate = 0.0;\nif (labelHorizontalOrigin != 0.0)\n{\napplyTranslate = 1.0;\nlabelHorizontalOrigin -= 2.0;\ndepthOrigin.x = labelHorizontalOrigin + 1.0;\n}\ndepthOrigin = vec2(1.0) - (depthOrigin * 0.5);\n#endif\n#ifdef EYE_DISTANCE_TRANSLUCENCY\nvec4 translucencyByDistance;\ntranslucencyByDistance.x = compressedAttribute1.z;\ntranslucencyByDistance.z = compressedAttribute1.w;\ntranslucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\ntemp = compressedAttribute1.y * SHIFT_RIGHT8;\ntranslucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n#endif\n#if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)\ntemp = compressedAttribute3.w;\ntemp = temp * SHIFT_RIGHT12;\nvec2 dimensions;\ndimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;\ndimensions.x = floor(temp);\n#endif\n#ifdef ALIGNED_AXIS\nvec3 alignedAxis = czm_octDecode(floor(compressedAttribute1.y * SHIFT_RIGHT8));\ntemp = compressedAttribute2.z * SHIFT_RIGHT5;\nbool validAlignedAxis = (temp - floor(temp)) * SHIFT_LEFT1 > 0.0;\n#else\nvec3 alignedAxis = vec3(0.0);\nbool validAlignedAxis = false;\n#endif\nvec4 pickColor;\nvec4 color;\ntemp = compressedAttribute2.y;\ntemp = temp * SHIFT_RIGHT8;\npickColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\npickColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\npickColor.r = floor(temp);\ntemp = compressedAttribute2.x;\ntemp = temp * SHIFT_RIGHT8;\ncolor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\ncolor.g = (temp - floor(temp)) * SHIFT_LEFT8;\ncolor.r = floor(temp);\ntemp = compressedAttribute2.z * SHIFT_RIGHT8;\nbool sizeInMeters = floor((temp - floor(temp)) * SHIFT_LEFT7) > 0.0;\ntemp = floor(temp) * SHIFT_RIGHT8;\npickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\npickColor /= 255.0;\ncolor.a = floor(temp);\ncolor /= 255.0;\nvec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\nvec4 positionEC = czm_modelViewRelativeToEye * p;\n#if defined(FRAGMENT_DEPTH_CHECK) || defined(VERTEX_DEPTH_CHECK)\nfloat eyeDepth = positionEC.z;\n#endif\n#ifdef MVT\nvec2 fade_opacity = a_fade_opacity.xy;\nfloat placed = fade_opacity.x;\nfloat fade_change = placed > 0.5 ? u_fade_change : -u_fade_change;\nfloat interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity.y + fade_change));\ncolor.a = interpolated_fade_opacity;\nvec3 realEyeOffset = eyeOffset.xyz;\nfloat meterPerPixel = czm_metersPerPixel(positionEC);\nrealEyeOffset.y = meterPerPixel * eyeOffset.y;\nrealEyeOffset.z = u_eyeOffsetZ;\npositionEC = czm_eyeOffset(positionEC, realEyeOffset.xyz);\nif (interpolated_fade_opacity == 0.0)\n{\npositionEC.xyz = vec3(0.0);\n}\n#else\npositionEC = czm_eyeOffset(positionEC, eyeOffset.xyz);\n#endif\n#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(EYE_DISTANCE_PIXEL_OFFSET) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)\nfloat lengthSq;\nif (czm_sceneMode == czm_sceneMode2D)\n{\nlengthSq = czm_eyeHeight2D.y;\n}\nelse\n{\nlengthSq = dot(positionEC.xyz, positionEC.xyz);\n}\n#endif\n#ifdef EYE_DISTANCE_SCALING\nfloat distanceScale = czm_nearFarScalar(scaleByDistance, lengthSq);\nscale *= distanceScale;\ntranslate *= distanceScale;\nif (scale == 0.0)\n{\npositionEC.xyz = vec3(0.0);\n}\n#endif\nfloat translucency = 1.0;\n#ifdef EYE_DISTANCE_TRANSLUCENCY\ntranslucency = czm_nearFarScalar(translucencyByDistance, lengthSq);\nif (translucency == 0.0)\n{\npositionEC.xyz = vec3(0.0);\n}\n#endif\n#ifdef EYE_DISTANCE_PIXEL_OFFSET\nfloat pixelOffsetScale = czm_nearFarScalar(pixelOffsetScaleByDistance, lengthSq);\npixelOffset *= pixelOffsetScale;\n#endif\n#ifdef DISTANCE_DISPLAY_CONDITION\nfloat nearSq = compressedAttribute3.x;\nfloat farSq = compressedAttribute3.y;\nif (lengthSq < nearSq || lengthSq > farSq)\n{\npositionEC.xyz = vec3(0.0);\n}\n#endif\nmat2 rotationMatrix;\nfloat mpp;\n#ifdef DISABLE_DEPTH_DISTANCE\nfloat disableDepthTestDistance = compressedAttribute3.z;\n#endif\n#ifdef VERTEX_DEPTH_CHECK\nif (lengthSq < disableDepthTestDistance) {\nfloat depthsilon = 10.0;\nvec2 labelTranslate = textureCoordinateBoundsOrLabelTranslate.xy;\nvec4 pEC1 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\nfloat globeDepth1 = getGlobeDepth(pEC1);\nif (globeDepth1 != 0.0 && pEC1.z + depthsilon < globeDepth1)\n{\nvec4 pEC2 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0, 1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\nfloat globeDepth2 = getGlobeDepth(pEC2);\nif (globeDepth2 != 0.0 && pEC2.z + depthsilon < globeDepth2)\n{\nvec4 pEC3 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\nfloat globeDepth3 = getGlobeDepth(pEC3);\nif (globeDepth3 != 0.0 && pEC3.z + depthsilon < globeDepth3)\n{\npositionEC.xyz = vec3(0.0);\n}\n}\n}\n}\n#endif\npositionEC = addScreenSpaceOffset(positionEC, imageSize, scale, direction, origin, translate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\npositionEC.xyz *= show;\ngl_Position = czm_projection * positionEC;\nv_textureCoordinates = textureCoordinates;\n#ifdef LOG_DEPTH\nczm_vertexLogDepth();\nv_depth = 1.0 - czm_currentFrustum.x + gl_Position.w;\n#endif\n#ifdef DISABLE_DEPTH_DISTANCE\nif (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)\n{\ndisableDepthTestDistance = czm_minimumDisableDepthTestDistance;\n}\nif (disableDepthTestDistance != 0.0)\n{\nfloat zclip = gl_Position.z / gl_Position.w;\nbool clipped = (zclip < -1.0 || zclip > 1.0);\nif (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))\n{\ngl_Position.z = -gl_Position.w;\n#ifdef LOG_DEPTH\nv_depthFromNearPlusOne = 1.0;\n#endif\n}\n}\n#endif\n#ifdef FRAGMENT_DEPTH_CHECK\nif (sizeInMeters) {\ntranslate /= mpp;\ndimensions /= mpp;\nimageSize /= mpp;\n}\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\nv_rotationMatrix = rotationMatrix;\n#else\nv_rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);\n#endif\nfloat enableDepthCheck = 0.0;\nif (lengthSq < disableDepthTestDistance)\n{\nenableDepthCheck = 1.0;\n}\nfloat dw = floor(clamp(dimensions.x, 0.0, SHIFT_LEFT12));\nfloat dh = floor(clamp(dimensions.y, 0.0, SHIFT_LEFT12));\nfloat iw = floor(clamp(imageSize.x, 0.0, SHIFT_LEFT12));\nfloat ih = floor(clamp(imageSize.y, 0.0, SHIFT_LEFT12));\nv_compressed.x = eyeDepth;\nv_compressed.y = applyTranslate * SHIFT_LEFT1 + enableDepthCheck;\nv_compressed.z = dw * SHIFT_LEFT12 + dh;\nv_compressed.w = iw * SHIFT_LEFT12 + ih;\nv_originTextureCoordinateAndTranslate.xy = depthOrigin;\nv_originTextureCoordinateAndTranslate.zw = translate;\nv_textureCoordinateBounds = textureCoordinateBoundsOrLabelTranslate;\n#endif\n#ifdef SDF\nvec4 outlineColor;\nfloat outlineWidth;\ntemp = sdf.x;\ntemp = temp * SHIFT_RIGHT8;\noutlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\noutlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\noutlineColor.r = floor(temp);\ntemp = sdf.y;\ntemp = temp * SHIFT_RIGHT8;\nfloat temp3 = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\noutlineWidth = (temp - floor(temp)) * SHIFT_LEFT8;\noutlineColor.a = floor(temp);\noutlineColor /= 255.0;\nv_outlineWidth = outlineWidth / 255.0;\nv_outlineColor = outlineColor;\n#endif\nv_pickColor = pickColor;\nv_color = color;\nv_color.a *= translucency;\n}\n",e$R={OPAQUE:0,TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2},S$t=Object.freeze(e$R);function c$B(e,t,i,n,r){this.bottomLeft=e$1Y(e,r$T.ZERO),this.topRight=e$1Y(t,r$T.ZERO),this.childNode1=i,this.childNode2=n,this.imageIndex=r}var U$H=new r$T(16,16);function _$z(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT);var t=e$1Y(e.borderWidthInPixels,1),i=e$1Y(e.initialSize,U$H);if(!t$$(e.context))throw new t$_("context is required.");if(t<0)throw new t$_("borderWidthInPixels must be greater than or equal to zero.");if(i.x<1||i.y<1)throw new t$_("initialSize must be greater than zero.");this._context=e.context,this._pixelFormat=e$1Y(e.pixelFormat,Z$_.RGBA),this._borderWidthInPixels=t,this._textureCoordinates=[],this._guid=t$U(),this._idHash={},this._initialSize=i,this._root=void 0}function W$G(e){if(e.validateFramebuffer){var t=e._gl,i=t.checkFramebufferStatus(t.FRAMEBUFFER);if(i!==t.FRAMEBUFFER_COMPLETE){var n;switch(i){case t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:n="Framebuffer is not complete. Incomplete attachment: at least one attachment point with a renderbuffer or texture attached has its attached object no longer in existence or has an attached image with a width or height of zero, or the color attachment point has a non-color-renderable image attached, or the depth attachment point has a non-depth-renderable image attached, or the stencil attachment point has a non-stencil-renderable image attached. Color-renderable formats include GL_RGBA4, GL_RGB5_A1, and GL_RGB565. GL_DEPTH_COMPONENT16 is the only depth-renderable format. GL_STENCIL_INDEX8 is the only stencil-renderable format.";break;case t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:n="Framebuffer is not complete. Incomplete dimensions: not all attached images have the same width and height.";break;case t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:n="Framebuffer is not complete. Missing attachment: no images are attached to the framebuffer.";break;case t.FRAMEBUFFER_UNSUPPORTED:n="Framebuffer is not complete. Unsupported: the combination of internal formats of the attached images violates an implementation-dependent set of restrictions."}throw new t$_(n)}}}function q$G(e,t){if(t!==e._currentFramebuffer&&(e._currentFramebuffer=t,t$$(t))){t._bind(),W$G(e);var i=t._getActiveColorAttachments();e.drawBuffers&&e.glDrawBuffers(i)}}function D$D(e,t){var i=e._context,n=e.numberOfImages,r=e._borderWidthInPixels;if(n>0){for(var o=e._texture.width,a=e._texture.height,s=2*(o+t.width+r),l=2*(a+t.height+r),u=o/s,c=a/l,h=new c$B(new r$T(o+r,r),new r$T(s,a)),d=new c$B(new r$T,new r$T(s,a),e._root,h),f=new c$B(new r$T(r,a+r),new r$T(s,l)),p=new c$B(new r$T,new r$T(s,l),d,f),_=0;_<e._textureCoordinates.length;_++){var m=e._textureCoordinates[_];t$$(m)&&(m.x*=u,m.y*=c,m.width*=u,m.height*=c)}var $=new P$S({context:e._context,width:s,height:l,pixelFormat:e._pixelFormat}),g=new u$F({context:i,colorTextures:[e._texture],destroyAttachments:!1});q$G(i,g),$.copyFromFramebuffer(0,0,0,0,s,l),g.destroy(),e._texture=e._texture&&e._texture.destroy(),e._texture=$,e._root=p}else{var y=2*(t.width+2*r),v=2*(t.height+2*r);y<e._initialSize.x&&(y=e._initialSize.x),v<e._initialSize.y&&(v=e._initialSize.y),e._texture=e._texture&&e._texture.destroy(),e._texture=new P$S({context:e._context,width:y,height:v,pixelFormat:e._pixelFormat}),e._root=new c$B(new r$T(r,r),new r$T(y,v))}}function y$D(e,t,i){if(t$$(t)){if(!t$$(t.childNode1)&&!t$$(t.childNode2)){if(t$$(t.imageIndex))return;var n=t.topRight.x-t.bottomLeft.x,r=t.topRight.y-t.bottomLeft.y,o=n-i.width,a=r-i.height;if(o<0||a<0)return;if(0===o&&0===a)return t;if(o>a){t.childNode1=new c$B(new r$T(t.bottomLeft.x,t.bottomLeft.y),new r$T(t.bottomLeft.x+i.width,t.topRight.y));var s=t.bottomLeft.x+i.width+e._borderWidthInPixels;s<t.topRight.x&&(t.childNode2=new c$B(new r$T(s,t.bottomLeft.y),new r$T(t.topRight.x,t.topRight.y)))}else{t.childNode1=new c$B(new r$T(t.bottomLeft.x,t.bottomLeft.y),new r$T(t.topRight.x,t.bottomLeft.y+i.height));var l=t.bottomLeft.y+i.height+e._borderWidthInPixels;l<t.topRight.y&&(t.childNode2=new c$B(new r$T(t.bottomLeft.x,l),new r$T(t.topRight.x,t.topRight.y)))}return y$D(e,t.childNode1,i)}return y$D(e,t.childNode1,i)||y$D(e,t.childNode2,i)}}function T$D(e,t,i){var n=y$D(e,e._root,t);if(t$$(n)){n.imageIndex=i;var r=e._texture.width,o=e._texture.height,a=n.topRight.x-n.bottomLeft.x,s=n.topRight.y-n.bottomLeft.y,l=n.bottomLeft.x/r,u=n.bottomLeft.y/o,c=a/r,h=s/o;e._textureCoordinates[i]=new n$13(l,u,c,h),e._texture.copyFrom(t,n.bottomLeft.x,n.bottomLeft.y)}else D$D(e,t),T$D(e,t,i);e._guid=t$U()}Object.defineProperties(_$z.prototype,{borderWidthInPixels:{get:function(){return this._borderWidthInPixels}},textureCoordinates:{get:function(){return this._textureCoordinates}},texture:{get:function(){return t$$(this._texture)||(this._texture=new P$S({context:this._context,width:this._initialSize.x,height:this._initialSize.y,pixelFormat:this._pixelFormat})),this._texture}},numberOfImages:{get:function(){return this._textureCoordinates.length}},guid:{get:function(){return this._guid}}}),_$z.prototype.addImage=function(e,t){if(!t$$(e))throw new t$_("id is required.");if(!t$$(t))throw new t$_("image is required.");var i=this._idHash[e];if(t$$(i))return i;if("function"==typeof t){if(!t$$(t=t(e)))throw new t$_("image is required.")}else if("string"==typeof t||t instanceof t$X){t=t$X.createIfNeeded(t).fetchImage()}var n=this;return i=c$18(t,(function(e){if(n.isDestroyed())return-1;var t=n.numberOfImages;return T$D(n,e,t),t})),this._idHash[e]=i,i},_$z.prototype.addSubRegion=function(e,t){if(!t$$(e))throw new t$_("id is required.");if(!t$$(t))throw new t$_("subRegion is required.");var i=this._idHash[e];if(!t$$(i))throw new t$Z('image with id "'+e+'" not found in the atlas.');var n=this;return c$18(i,(function(e){if(-1===e)return-1;var i=n._texture.width,r=n._texture.height,o=n.numberOfImages,a=n._textureCoordinates[e],s=a.x+t.x/i,l=a.y+t.y/r,u=t.width/i,c=t.height/r;return n._textureCoordinates.push(new n$13(s,l,u,c)),n._guid=t$U(),o}))},_$z.prototype.addTextureCoordBounds=function(e){this._textureCoordinates.push(e)},_$z.prototype.isDestroyed=function(){return!1},_$z.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),s$1e(this)};var e$Q={FONT_SIZE:48,PADDING:10,RADIUS:8,CUTOFF:.25},F$y=Object.freeze(e$Q);function N$y(e,t,i,n,r){return new C$B(e,t,i,n,r)}function C$B(e,t,i,n,r){t=t||O$u,i=i||P$t,r=r||Array,this.nodeSize=n||64,this.points=e,this.ids=new r(e.length),this.coords=new r(2*e.length);for(var o=0;o<e.length;o++)this.ids[o]=o,this.coords[2*o]=t(e[o]),this.coords[2*o+1]=i(e[o]);q$F(this.ids,this.coords,this.nodeSize,0,this.ids.length-1,0)}function O$u(e){return e[0]}function P$t(e){return e[1]}function J$B(e,t,i,n,r,o){var a=r-i,s=o-n,l={x:e-.5*a,y:t-.5*s,width:a,height:s},u={x:i,y:n,width:a,height:s},c=l.x,h=l.y,d=u.x,f=u.y;return!(c>d+u.width||c+l.width<d||h+l.height<f||h>f+u.height)}function Q$y(e,t,i,n,r,o,a,s,l,u,c){for(var h,d,f=[0,e.length-1,0],p=[];f.length;){var _=f.pop(),m=f.pop(),$=f.pop(),g=void 0;if(m-$<=a)for(var y=$;y<=m;y++)h=t[2*y],d=t[2*y+1],void 0!==s&&s.length>y&&(g=l(s[e[y]])),void 0!==u?u(h,d,i,n,r,o,s[e[y]],g,c)&&p.push(e[y]):J$B(h,d,i,n,r,o)&&p.push(e[y]);else{var v=Math.floor(($+m)/2);h=t[2*v],d=t[2*v+1],void 0!==s&&s.length>v&&(g=l(s[e[v]])),void 0!==u?u(h,d,i,n,r,o,s[e[v]],g,c)&&p.push(e[v]):J$B(h,d,i,n,r,o)&&p.push(e[v]);var x=(_+1)%2;(0===_?i<=h:n<=d)&&(f.push($),f.push(v-1),f.push(x)),(0===_?r>=h:o>=d)&&(f.push(v+1),f.push(m),f.push(x))}}return p}function R$u(e,t,i,n,r,o,a){for(var s,l,u=[0,e.length-1,0],c=[];u.length;){var h=u.pop(),d=u.pop(),f=u.pop();if(d-f<=a)for(var p=f;p<=d;p++)s=t[2*p],l=t[2*p+1],s>=i&&s<=r&&l>=n&&l<=o&&c.push(e[p]);else{var _=Math.floor((f+d)/2);s=t[2*_],l=t[2*_+1],s>=i&&s<=r&&l>=n&&l<=o&&c.push(e[_]);var m=(h+1)%2;(0===h?i<=s:n<=l)&&(u.push(f),u.push(_-1),u.push(m)),(0===h?r>=s:o>=l)&&(u.push(_+1),u.push(d),u.push(m))}}return c}function q$F(e,t,i,n,r,o){if(!(r-n<=i)){var a=Math.floor((n+r)/2);K$t(e,t,a,n,r,o%2),q$F(e,t,i,n,a-1,o+1),q$F(e,t,i,a+1,r,o+1)}}function K$t(e,t,i,n,r,o){for(;r>n;){if(r-n>600){var a=r-n+1,s=i-n+1,l=Math.log(a),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(a-u)/a)*(s-a/2<0?-1:1);K$t(e,t,i,Math.max(n,Math.floor(i-s*u/a+c)),Math.min(r,Math.floor(i+(a-s)*u/a+c)),o)}var h=t[2*i+o],d=n,f=r;for(z$u(e,t,n,i),t[2*r+o]>h&&z$u(e,t,n,r);d<f;){for(z$u(e,t,d,f),d++,f--;t[2*d+o]<h;)d++;for(;t[2*f+o]>h;)f--}t[2*n+o]===h?z$u(e,t,n,f):z$u(e,t,++f,r),f<=i&&(n=f+1),i<=f&&(r=f-1)}}function z$u(e,t,i,n){y$C(e,i,n),y$C(t,2*i,2*n),y$C(t,2*i+1,2*n+1)}function y$C(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function b$Q(e,t,i,n,r,o){for(var a=[0,e.length-1,0],s=[],l=r*r;a.length;){var u=a.pop(),c=a.pop(),h=a.pop();if(c-h<=o)for(var d=h;d<=c;d++)L$B(t[2*d],t[2*d+1],i,n)<=l&&s.push(e[d]);else{var f=Math.floor((h+c)/2),p=t[2*f],_=t[2*f+1];L$B(p,_,i,n)<=l&&s.push(e[f]);var m=(u+1)%2;(0===u?i-r<=p:n-r<=_)&&(a.push(h),a.push(f-1),a.push(m)),(0===u?i+r>=p:n+r>=_)&&(a.push(f+1),a.push(c),a.push(m))}}return s}function L$B(e,t,i,n){var r=e-i,o=t-n;return r*r+o*o}C$B.prototype={range:function(e,t,i,n){return R$u(this.ids,this.coords,e,t,i,n,this.nodeSize)},within:function(e,t,i){return b$Q(this.ids,this.coords,e,t,i,this.nodeSize)},intersect:function(e,t,i,n,r,o,a,s){return Q$y(this.ids,this.coords,e,t,i,n,this.nodeSize,r,o,a,s)}};var _0x27a496=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x48fd13=_0x27a496(void 0,(function(){return _0x48fd13.toString().search("(((.+)+)+)+$").toString().constructor(_0x48fd13).search("(((.+)+)+)+$")}));_0x48fd13();var U$G="\nattribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nattribute float aColor;\nuniform float uLineWidth;\nvarying float vColor;\n\nfloat computerOnePixelLength()\n{\n\tvec4 viewPos = czm_modelView * vec4(aPosition.xyz, 1.0);\n\tvec4 winPos = czm_projection * viewPos;\n\tfloat dwidth = czm_metersPerPixel(viewPos);\n\twinPos.x = winPos.x - 2.0 * dwidth;\n\tvec4 newViewPos = czm_inverseProjection * winPos;\n\treturn length(viewPos - newViewPos);\n}\nvoid main()\n{\n bool bUsePre = aTexCoord0.x < 0.1;\n float offset = bUsePre ? -uLineWidth : uLineWidth;\n vec4 viewPos1 = czm_modelView * vec4(aPosition.xyz, 1.0);\n\tviewPos1.x = viewPos1.x + offset * computerOnePixelLength();\n\tgl_Position = czm_projection * viewPos1;\n\tvColor = aColor;\n}";function _$y(e){this._point3Ds={},this._points=[],this._style=void 0,this._billboardCollection=void 0,this._isInitialize=!1,this._pointsChanged=!0,this._colorCommand=void 0,this._worldMatrix=c$1a.clone(c$1a.IDENTITY),this._boundingSphere=new c$19,this._isVisible=!1,this._frameState=void 0,this._colors=void 0,this._isUpdateColor=!1}function W$F(e,t,i){g$u(e);var n=G$C(e,i.mode);q$E(e),X$r(e,t,n),e._isInitialize=!0}function g$u(e){t$$(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0)}function X$r(e,t,i){g$u(e);var n=u$Y.createVertexBuffer({context:t,typedArray:i.vertices,usage:A$13.STATIC_DRAW}),r=u$Y.createVertexBuffer({context:t,typedArray:i.texcoords,usage:A$13.STATIC_DRAW}),o=u$Y.createVertexBuffer({context:t,typedArray:i.colors,usage:A$13.STATIC_DRAW}),a=[],s={aPosition:0,aTexCoord0:1,aColor:2};a.push({index:s.aPosition,vertexBuffer:n,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),a.push({index:s.aTexCoord0,vertexBuffer:r,componentsPerAttribute:2,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1}),a.push({index:s.aColor,vertexBuffer:o,componentsPerAttribute:1,componentDatatype:C$12.UNSIGNED_BYTE,offsetInBytes:0,strideInBytes:1,normalize:!1});var l=u$Y.createIndexBuffer({context:t,typedArray:i.indexPackage,usage:A$13.STATIC_DRAW,indexDatatype:i.indexDataType});e._colorCommand=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:we$l.S3MTiles,owner:e}),e._colorCommand.vertexArray=new x$18({context:t,attributes:a,indexBuffer:l});var u=new a$O({sources:[U$G]}),c=new a$O({sources:["uniform vec4 uFillColor;\nvarying float vColor;\nvoid main()\n{\n if(vColor < 0.1)\n {\n discard;\n return;\n }\n gl_FragColor = uFillColor;\n}\n"]});e._colorCommand.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:u,fragmentShaderSource:c,attributeLocations:s}),e._colorCommand.renderState=p$1a.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},blending:Ee$s.ALPHA_BLEND}),e._colorCommand.uniformMap={uLineWidth:function(){return e._style._calloutWidth},uFillColor:function(){return e._style._calloutColor}}}function G$C(e){for(var t=0,i=0,n=0,r=0,o=2*e._points.length,a=C$12.createTypedArray(C$12.FLOAT,3*o),s=C$12.createTypedArray(C$12.FLOAT,2*o),l=new Uint8Array(o),u=o/2*3,c=o>65535?fe$u.UNSIGNED_INT:fe$u.UNSIGNED_SHORT,h=C$12.createTypedArray(c,u),d=0;d<e._points.length/2;d++){var f=e._points[2*d],p=e._points[2*d+1],_=t/3;a[t++]=p.x,a[t++]=p.y,a[t++]=p.z;var m=t/3;a[t++]=p.x,a[t++]=p.y,a[t++]=p.z;var $=t/3;a[t++]=f.x,a[t++]=f.y,a[t++]=f.z;var g=t/3;a[t++]=f.x,a[t++]=f.y,a[t++]=f.z,s[i++]=0,s[i++]=0,s[i++]=1,s[i++]=0,s[i++]=1,s[i++]=1,s[i++]=0,s[i++]=1,h[n++]=_,h[n++]=m,h[n++]=$,h[n++]=_,h[n++]=$,h[n++]=g}for(d=0;d<o;d++)l[r++]=255;return e._colors=l,{vertices:a,texcoords:s,colors:l,indexPackage:h,indexDataType:c}}function q$E(e,t){for(var i=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=Number.MAX_VALUE,o=-Number.MAX_VALUE,a=Number.MAX_VALUE,s=-Number.MAX_VALUE,l=0;l<e._points.length;l++){var u=e._points[l];n=Math.max(n,u.x),i=Math.min(i,u.x),o=Math.max(o,u.y),r=Math.min(r,u.y),s=Math.max(s,u.z),a=Math.min(a,u.z)}Cesium.Math.equalsEpsilon(n,i,Cesium.Math.EPSILON6)&&(n=i+.1),Cesium.Math.equalsEpsilon(o,r,Cesium.Math.EPSILON6)&&(o=r+.1),Cesium.Math.equalsEpsilon(s,a,Cesium.Math.EPSILON6)&&(s=a+.1);var c=new a$11((n+i)/2,(o+r)/2,(s+a)/2),h=Math.max(Math.max(s-a,o-r),n-i);e._boundingSphere=new c$19(c,h/2)}function M$F(e){if(e._pointsChanged){if(e._points=[],e._frameState.mode===b$1d.SCENE3D)for(var t in e._point3Ds)for(var i=e._point3Ds[t],n=0;n<i.length;n++){var r=i[n].position,o=new a$11;a$11.normalize(r,o),a$11.multiplyByScalar(o,6378137,o),i[n].dataIndex=2*e._points.length,e._points.push(r),e._points.push(o)}else for(var t in e._point3Ds)for(i=e._point3Ds[t],n=0;n<i.length;n++){o=new a$11((r=i[n].position).x,r.y,0);i[n].dataIndex=2*e._points.length,e._points.push(r),e._points.push(o)}e._pointsChanged=!1}}function H$A(e){if(e._isUpdateColor&&t$$(e._colors)){for(var t in e._point3Ds)for(var i=e._point3Ds[t],n=0;n<i.length;n++){var r=i[n].dataIndex;e._colors[r]=i[n].show?255:0,e._colors[r+1]=e._colors[r],e._colors[r+2]=e._colors[r],e._colors[r+3]=e._colors[r]}e._colorCommand.vertexArray.getAttribute(2).vertexBuffer.copyFromArrayView(e._colors),e._isUpdateColor=!1}}Object.defineProperties(_$y.prototype,{style:{get:function(){return this._style},set:function(e){this._style=e}},count:{get:function(){return this._points.length}},isVisible:{get:function(){return this._isVisible},set:function(e){this._isVisible=e}}}),_$y.prototype.destroy=function(){return g$u(this),s$1e(this)},_$y.prototype.addPoint=function(e,t,i){var n={id:e,position:a$11.clone(i),index:t,dataIndex:0,show:!0};t$$(this._point3Ds[e])||(this._point3Ds[e]=[]),this._point3Ds[e].push(n),this._isInitialize=!1,this._pointsChanged=!0},_$y.prototype.remove=function(e,t){var i=this.getByID(e);if(null!=i){for(var n=0;n<i.length;n++)i[n].index===t&&(delete i[n],i[n]=null);var r=[];for(n=0;n<i.length;n++)null!==i[n]&&r.push(i[n]);0===r.length?delete this._point3Ds[e]:this._point3Ds[e]=r}this._pointsChanged=!0,this._isInitialize=!0},_$y.prototype.getByID=function(e){return t$$(this._point3Ds[e])?this._point3Ds[e]:null},_$y.prototype._setVisibleByID=function(e,t,i){if(M$F(this),!t$$(this._point3Ds[e])||0===this._point3Ds[e].length)return null;for(var n=this._point3Ds[e],r=0;r<n.length;r++)n[r].index===t&&n[r].show!==i&&(n[r].show=i,this._isUpdateColor=!0)},_$y.prototype._updateIndex=function(e,t,i){var n=this._point3Ds[e];if(t$$(n))for(var r=0;r<n.length;r++)n[r].index===t&&(n[r].index=i)},_$y.prototype.update=function(e,t,i){this._frameState=t,this._pointsChanged&&M$F(this),0!==this._points.length&&this._points.length%2==0&&this._isVisible&&(this._isInitialize||W$F(this,e,t),H$A(this),t$$(this._colorCommand)&&i.push(this._colorCommand))};var et$c=s$1a.SHOW_INDEX,re$n=s$1a.POSITION_INDEX,Re$c=s$1a.PIXEL_OFFSET_INDEX,Be$h=s$1a.EYE_OFFSET_INDEX,tt$d=s$1a.HORIZONTAL_ORIGIN_INDEX,it$9=s$1a.VERTICAL_ORIGIN_INDEX,st$7=s$1a.SCALE_INDEX,ne$j=s$1a.IMAGE_INDEX_INDEX,Pe$f=s$1a.COLOR_INDEX,at$9=s$1a.ROTATION_INDEX,rt$b=s$1a.ALIGNED_AXIS_INDEX,Ve$d=s$1a.SCALE_BY_DISTANCE_INDEX,Le$e=s$1a.TRANSLUCENCY_BY_DISTANCE_INDEX,Ue$a=s$1a.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX,Me$h=s$1a.DISTANCE_DISPLAY_CONDITION,Ht$2=s$1a.DISABLE_DEPTH_DISTANCE,nt$b=s$1a.TEXTURE_COORDINATE_BOUNDS,ot$c=s$1a.SDF_INDEX,ht$7=s$1a.OPACITY_STATE_INDEX,Te$j=s$1a.NUMBER_OF_PROPERTIES,b$P,Wt$5={positionHighAndScale:0,positionLowAndRotation:1,compressedAttribute0:2,compressedAttribute1:3,compressedAttribute2:4,eyeOffset:5,scaleByDistance:6,pixelOffsetScaleByDistance:7,compressedAttribute3:8,textureCoordinateBoundsOrLabelTranslate:9,a_batchId:10,sdf:11,a_fade_opacity:12},Gt$6={direction:0,positionHighAndScale:1,positionLowAndRotation:2,compressedAttribute0:3,compressedAttribute1:4,compressedAttribute2:5,eyeOffset:6,scaleByDistance:7,pixelOffsetScaleByDistance:8,compressedAttribute3:9,textureCoordinateBoundsOrLabelTranslate:10,a_batchId:11,sdf:12,a_fade_opacity:13},zt$5={enabled:!0,equationRgb:x$16.ADD,equationAlpha:x$16.ADD,functionSourceRgb:h$13.SOURCE_ALPHA,functionDestinationRgb:h$13.ONE,functionSourceAlpha:h$13.ONE,functionDestinationAlpha:h$13.ONE},He$b;function O$t(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._scene=e.scene,this._batchTable=e.batchTable,this._textureAtlas=void 0,this._textureAtlasGUID=void 0,this._destroyTextureAtlas=!0,this._sp=void 0,this._spTranslucent=void 0,this._spParticleSystem=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._rsParticleSystem=void 0,this._vaf=void 0,this._billboardsID={},this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!1,this._shaderRotation=!1,this._compiledShaderRotation=!1,this._shaderAlignedAxis=!1,this._compiledShaderAlignedAxis=!1,this._shaderScaleByDistance=!1,this._compiledShaderScaleByDistance=!1,this._shaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistance=!1,this._shaderPixelOffsetScaleByDistance=!1,this._compiledShaderPixelOffsetScaleByDistance=!1,this._shaderDistanceDisplayCondition=!1,this._compiledShaderDistanceDisplayCondition=!1,this._shaderDisableDepthDistance=!1,this._compiledShaderDisableDepthDistance=!1,this._shaderClampToGround=!1,this._compiledShaderClampToGround=!1,this._propertiesChanged=new Uint32Array(Te$j),this._maxSize=0,this._maxEyeOffset=0,this._maxScale=1,this._maxPixelOffset=0,this._allHorizontalCenter=!0,this._allVerticalCenter=!0,this._allSizedInMeters=!0,this._baseVolume=new c$19,this._baseVolumeWC=new c$19,this._baseVolume2D=new c$19,this._boundingVolume=new c$19,this._boundingVolumeDirty=!1,this._colorCommands=[],this._depthTestEnable=e$1Y(e.depthTestEnable,!0),this.modelMatrix=c$1a.clone(e$1Y(e.modelMatrix,c$1a.IDENTITY)),this._modelMatrix=c$1a.clone(c$1a.IDENTITY),this.debugShowBoundingVolume=e$1Y(e.debugShowBoundingVolume,!1),this.debugShowTextureAtlas=e$1Y(e.debugShowTextureAtlas,!1),this.blendOption=e$1Y(e.blendOption,S$t.OPAQUE_AND_TRANSLUCENT),this._blendOption=void 0,this._isParticleSystem=e.particleSystem,this._isMVT=e$1Y(e.isMVT,!1),this._ignoreShow=e.ignoreShow,this._fadeChange=1,this._mode=b$1d.SCENE3D,this._buffersUsage=new Array(Te$j),this._buffersUsage[et$c]=A$13.STATIC_DRAW,this._buffersUsage[re$n]=A$13.STATIC_DRAW,this._buffersUsage[Re$c]=A$13.STATIC_DRAW,this._buffersUsage[Be$h]=A$13.STATIC_DRAW,this._buffersUsage[tt$d]=A$13.STATIC_DRAW,this._buffersUsage[it$9]=A$13.STATIC_DRAW,this._buffersUsage[st$7]=A$13.STATIC_DRAW,this._buffersUsage[ne$j]=A$13.STATIC_DRAW,this._buffersUsage[Pe$f]=A$13.STATIC_DRAW,this._buffersUsage[at$9]=A$13.STATIC_DRAW,this._buffersUsage[rt$b]=A$13.STATIC_DRAW,this._buffersUsage[Ve$d]=A$13.STATIC_DRAW,this._buffersUsage[Le$e]=A$13.STATIC_DRAW,this._buffersUsage[Ue$a]=A$13.STATIC_DRAW,this._buffersUsage[Me$h]=A$13.STATIC_DRAW,this._buffersUsage[nt$b]=A$13.STATIC_DRAW,this._buffersUsage[ht$7]=A$13.DYNAMIC_DRAW,this._highlightColor=e$1z.clone(e$1z.WHITE);var t=this;this._uniforms={u_atlas:function(){return t._textureAtlas.texture},u_highlightColor:function(){return t._highlightColor},u_eyeOffsetZ:function(){if(!t$$(t._scene)||!t$$(t._scene.camera))return 0;var e=t._scene.camera;return.01*e.positionCartographic.height*Math.sin(e.pitch)},u_fade_change:function(){return t._fadeChange}};var i=this._scene;t$$(i)&&t$$(i.terrainProviderChanged)&&(this._removeCallbackFunc=i.terrainProviderChanged.addEventListener((function(){for(var e=this._billboards,t=e.length,i=0;i<t;++i)e[i]._updateClamping()}),this)),this._lineCallout=new _$y,this._style3D=e$1Y(e.style3D,void 0),this._lineCallout.style=this._style3D,this._visibleViewport=4095,this._swipeEnabled=e$1Y(e.swipeEnabled,!1),this._swipeRegion=e$1Y(e.swipeRegion,new n$13(0,0,1,1)),this._compiledSwipeEnabled=!1,this._compiledSwipeRegion=new n$13(0,0,1,1),this._billboardMode=e$1Y(e.billboardMode,Cr$2.None)}function dt$a(e){for(var t=e.length,i=0;i<t;++i)e[i]&&e[i]._destroy()}function Fe$a(e){if(e._billboardsRemoved){e._billboardsRemoved=!1;for(var t=[],i=e._billboards,n=i.length,r=0,o=0;r<n;++r){var a=i[r];if(a){var s=a._index;a._index=o++,t.push(a),e._lineCallout._updateIndex(a.id,s,a._index)}}e._billboards=t}}function Xt$3(e){var t=e.cache.billboardCollection_indexBufferBatched;if(t$$(t))return t;for(var i=new Uint16Array(98298),n=0,r=0;n<98298;n+=6,r+=4)i[n]=r,i[n+1]=r+1,i[n+2]=r+2,i[n+3]=r+0,i[n+4]=r+2,i[n+5]=r+3;return(t=u$Y.createIndexBuffer({context:e,typedArray:i,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT})).vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferBatched=t,t}function Yt$4(e){var t=e.cache.billboardCollection_indexBufferInstanced;return t$$(t)||((t=u$Y.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT})).vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferInstanced=t),t}function kt$4(e){var t=e.cache.billboardCollection_vertexBufferInstanced;return t$$(t)||((t=u$Y.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:A$13.STATIC_DRAW})).vertexArrayDestroyable=!1,e.cache.billboardCollection_vertexBufferInstanced=t),t}function qt$4(e,t,i,n,r,o,a){var s=[{index:b$P.positionHighAndScale,name:"positionHighAndScale",componentsPerAttribute:4,componentDatatype:C$12.FLOAT,usage:i[re$n]},{index:b$P.positionLowAndRotation,name:"positionLowAndRotation",componentsPerAttribute:4,componentDatatype:C$12.FLOAT,usage:i[re$n]},{index:b$P.compressedAttribute0,name:"compressedAttribute0",componentsPerAttribute:4,componentDatatype:C$12.FLOAT,usage:i[Re$c]},{index:b$P.compressedAttribute1,name:"compressedAttribute1",componentsPerAttribute:4,componentDatatype:C$12.FLOAT,usage:i[Le$e]},{index:b$P.compressedAttribute2,name:"compressedAttribute2",componentsPerAttribute:4,componentDatatype:C$12.FLOAT,usage:i[Pe$f]},{index:b$P.eyeOffset,name:"eyeOffset",componentsPerAttribute:4,componentDatatype:C$12.FLOAT,usage:i[Be$h]},{index:b$P.scaleByDistance,name:"scaleByDistance",componentsPerAttribute:4,componentDatatype:C$12.FLOAT,usage:i[Ve$d]},{index:b$P.pixelOffsetScaleByDistance,name:"pixelOffsetScaleByDistance",componentsPerAttribute:4,componentDatatype:C$12.FLOAT,usage:i[Ue$a]},{index:b$P.compressedAttribute3,name:"compressedAttribute3",componentsPerAttribute:4,componentDatatype:C$12.FLOAT,usage:i[Me$h]},{index:b$P.textureCoordinateBoundsOrLabelTranslate,name:"textureCoordinateBoundsOrLabelTranslate",componentsPerAttribute:4,componentDatatype:C$12.FLOAT,usage:i[nt$b]}];return n&&s.push({index:b$P.direction,name:"direction",componentsPerAttribute:2,componentDatatype:C$12.FLOAT,vertexBuffer:kt$4(e)}),t$$(r)&&s.push({index:b$P.a_batchId,name:"a_batchId",componentsPerAttribute:1,componentDatatyps:C$12.FLOAT,bufferUsage:A$13.STATIC_DRAW}),o&&s.push({index:b$P.sdf,name:"sdf",componentsPerAttribute:2,componentDatatype:C$12.FLOAT,usage:i[ot$c]}),a&&s.push({index:b$P.a_fade_opacity,name:"a_fade_opacity",componentsPerAttribute:2,componentDatatype:C$12.FLOAT,usage:A$13.STATIC_DRAW}),new u$D(e,s,n?t:4*t,n)}Object.defineProperties(O$t.prototype,{length:{get:function(){return Fe$a(this),this._billboards.length}},textureAtlas:{get:function(){return this._textureAtlas},set:function(e){this._textureAtlas!==e&&(this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._textureAtlas=e,this._createVertexArray=!0)}},destroyTextureAtlas:{get:function(){return this._destroyTextureAtlas},set:function(e){this._destroyTextureAtlas=e}},style3D:{get:function(){return this._style3D},set:function(e){this._style3D=e,this.setBillboardImage(this._style3D),this._lineCallout.style=e}},showCallout:{get:function(){return this._lineCallout.isVisible},set:function(e){this._lineCallout.isVisible=e}},swipeRegion:{get:function(){return this._swipeRegion},set:function(e){if(!(t$$(e)&&e instanceof n$13))throw new t$_("Expected BillboardCollection.swipeRegion to be type of BoundingRectangle.");n$13.equals(e,this._swipeRegion)||n$13.clone(e,this._swipeRegion)}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){n$1e.typeOf.bool("BillboardCollection.swipeEnabled",e),e!==this._swipeEnabled&&(this._swipeEnabled=e)}},fadeChage:{get:function(){return this._fadeChange},set:function(e){e!==this._fadeChange&&(this._fadeChange=e)}}}),O$t.prototype.add=function(e){var t=new s$1a(e,this);return t._index=this._billboards.length,this._billboards.push(t),this._createVertexArray=!0,t$$(t.id)&&(this._billboardsID[t.id]=t),t$$(e)&&t$$(e.position)&&this._lineCallout.addPoint(t.id,t._index,e.position),t},O$t.prototype.remove=function(e){return!!this.contains(e)&&(t$$(e.id)&&delete this._billboardsID[e.id],this._billboards[e._index]=null,this._billboardsRemoved=!0,this._createVertexArray=!0,this._lineCallout.remove(e.id,e._index),e._destroy(),!0)},O$t.prototype.removeAll=function(){dt$a(this._billboards),this._billboards=[],this._billboardsID={},this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!0},O$t.prototype._updateBillboard=function(e,t){e._dirty||(this._billboardsToUpdate[this._billboardsToUpdateIndex++]=e),++this._propertiesChanged[t]},O$t.prototype.contains=function(e){return t$$(e)&&e._billboardCollection===this},O$t.prototype.containsByID=function(e){return this._billboardsID.hasOwnProperty(e)},O$t.prototype.get=function(e){if(!t$$(e))throw new t$_("index is required.");return Fe$a(this),this._billboards[e]},O$t.prototype.getById=function(e){if(!t$$(e))throw new t$_("id is required.");return t$$(this._billboardsID[e])?this._billboardsID[e]:null},O$t.prototype.computeNewBuffersUsage=function(){for(var e=this._buffersUsage,t=!1,i=this._propertiesChanged,n=0;n<Te$j;++n){var r=0===i[n]?A$13.STATIC_DRAW:A$13.STREAM_DRAW;t=t||e[n]!==r,e[n]=r}return t};var We$d=new t$R;function lt$b(e,t,i,n,r){var o,a=n[b$P.positionHighAndScale],s=n[b$P.positionLowAndRotation],l=r._getActualPosition();e._mode===b$1d.SCENE3D&&(c$19.expand(e._baseVolume,l,e._baseVolume),e._boundingVolumeDirty=!0),t$R.fromCartesian(l,We$d);var u=r.scale,c=r.rotation;0!==c&&(e._shaderRotation=!0),e._maxScale=Math.max(e._maxScale,u);var h=We$d.high,d=We$d.low;e._instanced?(a(o=r._index,h.x,h.y,h.z,u),s(o,d.x,d.y,d.z,c)):(a((o=4*r._index)+0,h.x,h.y,h.z,u),a(o+1,h.x,h.y,h.z,u),a(o+2,h.x,h.y,h.z,u),a(o+3,h.x,h.y,h.z,u),s(o+0,d.x,d.y,d.z,c),s(o+1,d.x,d.y,d.z,c),s(o+2,d.x,d.y,d.z,c),s(o+3,d.x,d.y,d.z,c))}var P$s=new r$T,V$s=32768,Q$x=65536,Ge$9=4096,L$A=256,Qt$5=128,Kt$4=32,Zt$4=8,_t$7=4,jt$5=1/256,ct$b=0,ut$8=2,pt$8=3,ft$7=1;function mt$8(e,t,i,n,r){var o,a=n[b$P.compressedAttribute0],s=r.pixelOffset,l=s.x,u=s.y,c=r._translate,h=c.x,d=c.y;e._maxPixelOffset=Math.max(e._maxPixelOffset,Math.abs(l+h),Math.abs(-u+d));var f=r.horizontalOrigin,p=r._verticalOrigin,_=r.show&&r.clusterShow;0===r.color.alpha&&(_=!1),p===j$10.BASELINE&&(p=j$10.BOTTOM),e._allHorizontalCenter=e._allHorizontalCenter&&f===N$W.CENTER,e._allVerticalCenter=e._allVerticalCenter&&p===j$10.CENTER;var m=0,$=0,g=0,y=0,v=r._imageIndex;if(-1!==v){var x=i[v];if(!t$$(x))throw new t$_("Invalid billboard image index: "+v);m=x.x,$=x.y,g=x.width,y=x.height}var b=m+g,S=$+y,w=Math.floor(n$1d.clamp(l,-V$s,V$s)+V$s)*Qt$5;w+=(f+1)*Kt$4,w+=(p+1)*Zt$4,w+=(_?1:0)*_t$7;var C=Math.floor(n$1d.clamp(u,-V$s,V$s)+V$s)*L$A,T=Math.floor(n$1d.clamp(h,-V$s,V$s)+V$s)*L$A,P=(n$1d.clamp(d,-V$s,V$s)+V$s)*jt$5,E=Math.floor(P);if(C+=E,T+=Math.floor((P-E)*L$A),e._isMVT){var A=S;S=$,$=A}P$s.x=m,P$s.y=$;var L=r$P.compressTextureCoordinates(P$s);P$s.x=b;var M=r$P.compressTextureCoordinates(P$s);P$s.y=S;var I=r$P.compressTextureCoordinates(P$s);P$s.x=m;var O=r$P.compressTextureCoordinates(P$s);e._instanced?a(o=r._index,w,C,T,L):(a((o=4*r._index)+0,w+ct$b,C,T,L),a(o+1,w+ut$8,C,T,M),a(o+2,w+pt$8,C,T,I),a(o+3,w+ft$7,C,T,O))}function bt$7(e,t,i,n,r){var o,a=n[b$P.compressedAttribute1],s=r.alignedAxis;a$11.equals(s,a$11.ZERO)||(e._shaderAlignedAxis=!0);var l=0,u=1,c=1,h=1,d=r.translucencyByDistance;t$$(d)&&(l=d.near,u=d.nearValue,c=d.far,h=d.farValue,(1!==u||1!==h)&&(e._shaderTranslucencyByDistance=!0));var f=0,p=r._imageIndex;if(-1!==p){var _=i[p];if(!t$$(_))throw new t$_("Invalid billboard image index: "+p);f=_.width}var m=e._textureAtlas.texture.width,$=Math.round(e$1Y(r.width,m*f));e._maxSize=Math.max(e._maxSize,$);var g=n$1d.clamp($,0,Q$x),y=0;Math.abs(a$11.magnitudeSquared(s)-1)<n$1d.EPSILON6&&(y=r$P.octEncodeFloat(s)),u=n$1d.clamp(u,0,1),g=g*L$A+(u=1===u?255:255*u|0),h=n$1d.clamp(h,0,1),y=y*L$A+(h=1===h?255:255*h|0),e._instanced?a(o=r._index,g,y,l,c):(a((o=4*r._index)+0,g,y,l,c),a(o+1,g,y,l,c),a(o+2,g,y,l,c),a(o+3,g,y,l,c))}function ze$c(e,t,i,n,r){var o,a=n[b$P.compressedAttribute2],s=r.color,l=t$$(e._batchTable)?e$1z.WHITE:r.getPickId(t).color,u=r.sizeInMeters?1:0,c=Math.abs(a$11.magnitudeSquared(r.alignedAxis)-1)<n$1d.EPSILON6?1:0;e._allSizedInMeters=e._allSizedInMeters&&1===u;var h=0,d=r._imageIndex;if(-1!==d){var f=i[d];if(!t$$(f))throw new t$_("Invalid billboard image index: "+d);h=f.height}var p=e._textureAtlas.texture.dimensions,_=Math.round(e$1Y(r.height,p.y*h));e._maxSize=Math.max(e._maxSize,_);var m=e$1Y(r._labelHorizontalOrigin,-2),$=_*_t$7+(m+=2),g=e$1z.floatToByte(s.red),y=e$1z.floatToByte(s.green),v=e$1z.floatToByte(s.blue),x=g*Q$x+y*L$A+v;g=e$1z.floatToByte(l.red),y=e$1z.floatToByte(l.green),v=e$1z.floatToByte(l.blue);var b=g*Q$x+y*L$A+v,S=e$1z.floatToByte(s.alpha)*Q$x+e$1z.floatToByte(l.alpha)*L$A;S+=2*u+c,e._instanced?a(o=r._index,x,b,S,$):(a((o=4*r._index)+0,x,b,S,$),a(o+1,x,b,S,$),a(o+2,x,b,S,$),a(o+3,x,b,S,$))}function Xe$8(e,t,i,n,r){var o,a=n[b$P.eyeOffset],s=r.eyeOffset,l=s.z;if(r._heightReference!==U$Y.NONE&&(l*=1.005),e._maxEyeOffset=Math.max(e._maxEyeOffset,Math.abs(s.x),Math.abs(s.y),Math.abs(l)),e._instanced){var u=0,c=0,h=r._imageIndex;if(-1!==h){var d=i[h];if(!t$$(d))throw new t$_("Invalid billboard image index: "+h);u=d.width,c=d.height}P$s.x=u,P$s.y=c;var f=r$P.compressTextureCoordinates(P$s);a(o=r._index,s.x,s.y,l,f)}else a((o=4*r._index)+0,s.x,s.y,l,0),a(o+1,s.x,s.y,l,0),a(o+2,s.x,s.y,l,0),a(o+3,s.x,s.y,l,0)}function xt$7(e,t,i,n,r){var o,a=n[b$P.scaleByDistance],s=0,l=1,u=1,c=1,h=r.scaleByDistance;t$$(h)&&(s=h.near,l=h.nearValue,u=h.far,c=h.farValue,(1!==l||1!==c)&&(e._shaderScaleByDistance=!0)),e._instanced?a(o=r._index,s,l,u,c):(a((o=4*r._index)+0,s,l,u,c),a(o+1,s,l,u,c),a(o+2,s,l,u,c),a(o+3,s,l,u,c))}function Tt$5(e,t,i,n,r){var o,a=n[b$P.pixelOffsetScaleByDistance],s=0,l=1,u=1,c=1,h=r.pixelOffsetScaleByDistance;t$$(h)&&(s=h.near,l=h.nearValue,u=h.far,c=h.farValue,(1!==l||1!==c)&&(e._shaderPixelOffsetScaleByDistance=!0)),e._instanced?a(o=r._index,s,l,u,c):(a((o=4*r._index)+0,s,l,u,c),a(o+1,s,l,u,c),a(o+2,s,l,u,c),a(o+3,s,l,u,c))}function At$3(e,t,i,n,r){var o,a=n[b$P.compressedAttribute3],s=0,l=Number.MAX_VALUE,u=r.distanceDisplayCondition;t$$(u)&&(s=u.near,l=u.far,s*=s,l*=l,e._shaderDistanceDisplayCondition=!0);var c,h,d=r.disableDepthTestDistance,f=r.heightReference===U$Y.CLAMP_TO_GROUND&&e._scene.context.depthTexture;if(t$$(d)||(d=f?5e3:0),d*=d,(f||d>0)&&(e._shaderDisableDepthDistance=!0,d===Number.POSITIVE_INFINITY&&(d=-1)),t$$(r._labelDimensions))h=r._labelDimensions.x,c=r._labelDimensions.y;else{var p=0,_=0,m=r._imageIndex;if(-1!==m){var $=i[m];if(!t$$($))throw new t$_("Invalid billboard image index: "+m);p=$.height,_=$.width}c=Math.round(e$1Y(r.height,e._textureAtlas.texture.dimensions.y*p));var g=e._textureAtlas.texture.width;h=Math.round(e$1Y(r.width,g*_))}var y=Math.floor(n$1d.clamp(h,0,Ge$9)),v=Math.floor(n$1d.clamp(c,0,Ge$9)),x=y*Ge$9+v;e._instanced?a(o=r._index,s,l,d,x):(a((o=4*r._index)+0,s,l,d,x),a(o+1,s,l,d,x),a(o+2,s,l,d,x),a(o+3,s,l,d,x))}function Dt$2(e,t,i,n,r){r.heightReference===U$Y.CLAMP_TO_GROUND&&(e._shaderClampToGround=e._scene.context.depthTexture);var o,a=n[b$P.textureCoordinateBoundsOrLabelTranslate];if(e$1y.maximumVertexTextureImageUnits>0){var s=0,l=0;return t$$(r._labelTranslate)&&(s=r._labelTranslate.x,l=r._labelTranslate.y),void(e._instanced?(o=r._index,a(o,s,l,0,0)):(o=4*r._index,a(o+0,s,l,0,0),a(o+1,s,l,0,0),a(o+2,s,l,0,0),a(o+3,s,l,0,0)))}var u=0,c=0,h=0,d=0,f=r._imageIndex;if(-1!==f){var p=i[f];if(!t$$(p))throw new t$_("Invalid billboard image index: "+f);u=p.x,c=p.y,h=p.width,d=p.height}var _=u+h,m=c+d;e._instanced?a(o=r._index,u,c,_,m):(a((o=4*r._index)+0,u,c,_,m),a(o+1,u,c,_,m),a(o+2,u,c,_,m),a(o+3,u,c,_,m))}function $t$4(e,t,i,n,r){if(t$$(e._batchTable)){var o,a=n[b$P.a_batchId],s=r._batchIndex;e._instanced?a(o=r._index,s):(a((o=4*r._index)+0,s),a(o+1,s),a(o+2,s),a(o+3,s))}}function St$5(e,t,i,n,r){if(e._sdf){var o,a,s=n[b$P.sdf],l=r.outlineColor,u=r.outlineWidth,c=e$1z.floatToByte(l.red),h=e$1z.floatToByte(l.green),d=e$1z.floatToByte(l.blue);a=t.webgpu?c+h*L$A+d*Q$x:c*Q$x+h*L$A+d;var f,p=u/F$y.RADIUS;f=t.webgpu?e$1z.floatToByte(l.alpha)*L$A+e$1z.floatToByte(p)*Q$x:e$1z.floatToByte(l.alpha)*Q$x+e$1z.floatToByte(p)*L$A,e._instanced?s(o=r._index,a,f):(o=4*r._index,t.webgpu?(s(o+0,a,f),s(o+1,a,f),s(o+2,a,f),s(o+3,a,f)):(s(o+0,a+ct$b,f),s(o+1,a+ut$8,f),s(o+2,a+pt$8,f),s(o+3,a+ft$7,f)))}}function yt$5(e,t,i,n,r){if(e._isMVT){var o,a=n[b$P.a_fade_opacity],s=r.opacityState,l=s.placed?1:0,u=s.opacity;e._instanced?a(o=r._index,l,u):(a((o=4*r._index)+0,l,u),a(o+1,l,u),a(o+2,l,u),a(o+3,l,u))}}function Jt$6(e,t,i,n,r){lt$b(e,t,i,n,r),mt$8(e,t,i,n,r),bt$7(e,t,i,n,r),ze$c(e,t,i,n,r),Xe$8(e,t,i,n,r),xt$7(e,t,i,n,r),Tt$5(e,t,i,n,r),At$3(e,t,i,n,r),Dt$2(e,t,i,n,r),$t$4(e,t,i,n,r),St$5(e,t,i,n,r),yt$5(e,t,i,n,r)}function Ye$b(e,t,i,n,r,o){var a;n.mode===b$1d.SCENE3D?(a=e._baseVolume,e._boundingVolumeDirty=!0):a=e._baseVolume2D;for(var s=[],l=0;l<i;++l){var u=t[l],c=u.position,h=s$1a._computeActualPosition(u,c,n,r);t$$(h)&&(u._setActualPosition(h),o?s.push(h):c$19.expand(a,h,a))}o&&c$19.fromPoints(s,a)}function ei$3(e,t){var i=t.mode,n=e._billboards,r=e._billboardsToUpdate,o=e._modelMatrix;e._createVertexArray||e._mode!==i||i!==b$1d.SCENE3D&&!c$1a.equals(o,e.modelMatrix)?(e._mode=i,c$1a.clone(e.modelMatrix,o),e._createVertexArray=!0,(i===b$1d.SCENE3D||i===b$1d.SCENE2D||i===b$1d.COLUMBUS_VIEW)&&Ye$b(e,n,n.length,t,o,!0)):i===b$1d.MORPHING?Ye$b(e,n,n.length,t,o,!0):(i===b$1d.SCENE2D||i===b$1d.COLUMBUS_VIEW)&&Ye$b(e,r,e._billboardsToUpdateIndex,t,o,!1)}function ti$4(e,t,i){var n=1;(!e._allSizedInMeters||0!==e._maxPixelOffset)&&(n=t.camera.getPixelSize(i,t.context.drawingBufferWidth,t.context.drawingBufferHeight));var r=n*e._maxScale*e._maxSize*2;e._allHorizontalCenter&&e._allVerticalCenter&&(r*=.5);var o=n*e._maxPixelOffset+e._maxEyeOffset;i.radius+=r+o}function ii$5(e,t){var i=t.createViewportQuadCommand("uniform sampler2D billboard_texture; \nvarying vec2 v_textureCoordinates; \nvoid main() \n{ \n gl_FragColor = texture2D(billboard_texture, v_textureCoordinates); \n} \n",{uniformMap:{billboard_texture:function(){return e._textureAtlas.texture}}});return i.pass=we$l.OVERLAY,i}O$t.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$_("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},O$t.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$_("the index is 0~8");return 1<<e&this._visibleViewport};var si$3=[],q$D=new a$10;function c$A(e,t,i,n,r){return function(){var o=document.createElement("canvas"),a=r+2*n;o.height=o.width=a;var s=o.getContext("2d");return s.clearRect(0,0,a,a),0!==n&&(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,r/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle="black",s.fill(),s.restore())),s.beginPath(),s.arc(a/2,a/2,r/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle=t,s.fill(),o}}function i$C(e,t,i,n,r){this._content=e,this._billboard=i,this._label=n,this._polyline=r,this._batchId=t,this._billboardImage=void 0,this._billboardColor=void 0,this._billboardOutlineColor=void 0,this._billboardOutlineWidth=void 0,this._billboardSize=void 0,this._pointSize=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._heightOffset=void 0,this._pickIds=new Array(3),s$B(this)}O$t.prototype.update=function(e,t,i){if(!e.passes.offscreen&&!e.camera.bReflect){if(this._lineCallout.update(t,e,i),e.multiViewportIndex>-1&&this._billboards.length>0){if(t$$(this._billboards[0])&&t$$(this._billboards[0]._id)&&t$$(this._billboards[0]._id.entityCollection)){var n=this._billboards[0]._id.entityCollection.owner;if(typeof n.getVisibleInViewport<"u")if(!n.getVisibleInViewport(e.multiViewportIndex))return}if(!this.getVisibleInViewport(e.multiViewportIndex))return}Fe$a(this);var r=this._billboards,o=r.length;t=e.context;this._instanced=t.instancedArrays,b$P=this._instanced?Gt$6:Wt$5,He$b=this._instanced?Yt$4:Xt$3;var a=this._textureAtlas;if(!t$$(a)){a=this._textureAtlas=new _$z({context:t});for(var s=0;s<o;++s)r[s]._loadImage()}var l=a.textureCoordinates;if(0!==l.length){ei$3(this,e),o=(r=this._billboards).length;var u=this._billboardsToUpdate,c=this._billboardsToUpdateIndex,h=this._propertiesChanged,d=a.guid,f=this._createVertexArray||this._textureAtlasGUID!==d;this._textureAtlasGUID=d;var p,_=e.passes,m=_.pick;if(f||!m&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(var $=0;$<Te$j;++$)h[$]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),o>0){this._vaf=qt$4(t,o,this._buffersUsage,this._instanced,this._batchTable,this._sdf,this._isMVT),p=this._vaf.writers;for(var g=0;g<o;++g){var y=this._billboards[g];y._dirty=!1,Jt$6(this,t,l,p,y)}this._vaf.commit(He$b(t))}this._billboardsToUpdateIndex=0}else if(c>0){var v=si$3;v.length=0,(h[re$n]||h[at$9]||h[st$7])&&v.push(lt$b),(h[ne$j]||h[Re$c]||h[tt$d]||h[it$9]||h[et$c])&&(v.push(mt$8),this._instanced&&v.push(Xe$8)),(h[ne$j]||h[rt$b]||h[Le$e])&&(v.push(bt$7),v.push(ze$c)),(h[ne$j]||h[Pe$f])&&v.push(ze$c),h[Be$h]&&v.push(Xe$8),h[Ve$d]&&v.push(xt$7),h[Ue$a]&&v.push(Tt$5),(h[Me$h]||h[Ht$2]||h[ne$j]||h[re$n])&&v.push(At$3),(h[ne$j]||h[re$n])&&v.push(Dt$2),h[ot$c]&&v.push(St$5),h[ht$7]&&v.push(yt$5);var x=v.length;if(p=this._vaf.writers,c/o>.1){for(var b=0;b<c;++b){var S=u[b];S._dirty=!1;for(var w=0;w<x;++w)v[w](this,t,l,p,S)}this._vaf.commit(He$b(t))}else{for(var C=0;C<c;++C){var T=u[C];T._dirty=!1;for(var P=0;P<x;++P)v[P](this,t,l,p,T);this._instanced?this._vaf.subCommit(T._index,1):this._vaf.subCommit(4*T._index,4)}this._vaf.endSubCommits()}this._billboardsToUpdateIndex=0}if(c>1.5*o&&(u.length=o),t$$(this._vaf)&&t$$(this._vaf.va)){this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,c$19.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));var E,A=c$1a.IDENTITY;e.mode===b$1d.SCENE3D?(A=this.modelMatrix,E=c$19.clone(this._baseVolumeWC,this._boundingVolume)):E=c$19.clone(this._baseVolume2D,this._boundingVolume),ti$4(this,e,E);var L=this._blendOption!==this.blendOption;if(this._blendOption=this.blendOption,L){this._blendOption===S$t.OPAQUE||this._blendOption===S$t.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=p$1a.fromCache({depthTest:{enabled:this._depthTestEnable,func:de$x.LESS},depthMask:!0}):this._rsOpaque=void 0;var M=this._blendOption===S$t.TRANSLUCENT;this._blendOption===S$t.TRANSLUCENT||this._blendOption===S$t.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=p$1a.fromCache({depthTest:{enabled:this._depthTestEnable,func:M?de$x.LEQUAL:de$x.LESS},depthMask:M,blending:Ee$s.ALPHA_BLEND}):this._rsTranslucent=void 0}this._isParticleSystem&&(this._rsParticleSystem=p$1a.fromCache({depthTest:{enabled:!1,func:de$x.LESS},depthMask:!1,blending:zt$5})),this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||0!==e.minimumDisableDepthTestDistance;var I,O,D,R,N,F=e$1y.maximumVertexTextureImageUnits>0;if(L||this._shaderRotation!==this._compiledShaderRotation||this._shaderAlignedAxis!==this._compiledShaderAlignedAxis||this._shaderScaleByDistance!==this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance!==this._compiledShaderTranslucencyByDistance||this._shaderPixelOffsetScaleByDistance!==this._compiledShaderPixelOffsetScaleByDistance||this._shaderDistanceDisplayCondition!==this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance||this._shaderClampToGround!==this._compiledShaderClampToGround||this._sdf!==this._compiledSDF||this._swipeEnabled!==this._compiledSwipeEnabled||!a$10.equals(this._swipeRegion,this._compiledSwipeRegion)){I=Bt$5,O=Rt$6,N=[],t$$(this._batchTable)&&(N.push("VECTOR_TILE"),I=this._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(I),O=this._batchTable.getFragmentShaderCallback(!1,void 0)(O)),D=new a$O({defines:N,sources:[I],name:"BillboardCollectionVS"}),this._instanced&&D.defines.push("INSTANCED"),this._shaderRotation&&D.defines.push("ROTATION"),this._shaderAlignedAxis&&D.defines.push("ALIGNED_AXIS"),this._billboardMode===Cr$2.FixedXYZ&&D.defines.push("FixedXYZ"),this._shaderScaleByDistance&&D.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&D.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderPixelOffsetScaleByDistance&&D.defines.push("EYE_DISTANCE_PIXEL_OFFSET"),this._shaderDistanceDisplayCondition&&D.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&D.defines.push("DISABLE_DEPTH_DISTANCE"),this._shaderClampToGround&&(F?D.defines.push("VERTEX_DEPTH_CHECK"):D.defines.push("FRAGMENT_DEPTH_CHECK")),this._ignoreShow&&D.defines.push("IGNORE_SHOW"),this._isMVT&&D.defines.push("MVT");var B=1-F$y.CUTOFF;this._sdf&&D.defines.push("SDF");var z=t$$(this._batchTable)?"VECTOR_TILE":"";if(this._blendOption===S$t.OPAQUE_AND_TRANSLUCENT&&(R=new a$O({defines:["OPAQUE",z],sources:[O],name:"BillboardCollectionFS"}),this._shaderClampToGround&&(F?R.defines.push("VERTEX_DEPTH_CHECK"):R.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(R.defines.push("SDF"),R.defines.push("SDF_EDGE "+B)),this._isMVT&&R.defines.push("MVT"),this._swipeEnabled&&R.defines.push("APPLY_SWIPE"),this._sp=p$15.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:D,fragmentShaderSource:R,attributeLocations:b$P}),R=new a$O({defines:["TRANSLUCENT",z],sources:[O],name:"BillboardCollectionFS"}),this._shaderClampToGround&&(F?R.defines.push("VERTEX_DEPTH_CHECK"):R.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(R.defines.push("SDF"),R.defines.push("SDF_EDGE "+B)),this._isMVT&&R.defines.push("MVT"),this._swipeEnabled&&R.defines.push("APPLY_SWIPE"),this._spTranslucent=p$15.replaceCache({context:t,shaderProgram:this._spTranslucent,vertexShaderSource:D,fragmentShaderSource:R,attributeLocations:b$P})),this._blendOption===S$t.OPAQUE&&(R=new a$O({defines:[z],sources:[O],name:"BillboardCollectionFS"}),this._shaderClampToGround&&(F?R.defines.push("VERTEX_DEPTH_CHECK"):R.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(R.defines.push("SDF"),R.defines.push("SDF_EDGE "+B)),this._isMVT&&R.defines.push("MVT"),this._swipeEnabled&&R.defines.push("APPLY_SWIPE"),this._sp=p$15.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:D,fragmentShaderSource:R,attributeLocations:b$P})),this._blendOption===S$t.TRANSLUCENT&&(R=new a$O({defines:[z],sources:[O],name:"BillboardCollectionFS"}),this._shaderClampToGround&&(F?R.defines.push("VERTEX_DEPTH_CHECK"):R.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(R.defines.push("SDF"),R.defines.push("SDF_EDGE "+B)),this._isMVT&&R.defines.push("MVT"),this._swipeEnabled&&R.defines.push("APPLY_SWIPE"),this._spTranslucent=p$15.replaceCache({context:t,shaderProgram:this._spTranslucent,vertexShaderSource:D,fragmentShaderSource:R,attributeLocations:b$P})),this._swipeEnabled&&!t$$(this._uniforms.uSwipeRegion)){var G=this;this._uniforms.uSwipeRegion=function(){var t=G._swipeRegion;return a$10.fromElements(t.x,t.y,t.x+t.width,t.y+t.height,q$D),q$D.x=q$D.x*e.context.drawingBufferWidth,q$D.y=(1-q$D.y)*e.context.drawingBufferHeight,q$D.z=q$D.z*e.context.drawingBufferWidth,q$D.w=(1-q$D.w)*e.context.drawingBufferHeight,q$D}}this._isParticleSystem&&(R=new a$O({defines:[z],sources:[O],name:"BillboardCollectionFS"}),this._spParticleSystem=p$15.replaceCache({context:t,shaderProgram:this._spParticleSystem,vertexShaderSource:D,fragmentShaderSource:R,attributeLocations:b$P})),this._compiledShaderRotation=this._shaderRotation,this._compiledShaderAlignedAxis=this._shaderAlignedAxis,this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderPixelOffsetScaleByDistance=this._shaderPixelOffsetScaleByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance,this._compiledShaderClampToGround=this._shaderClampToGround,this._compiledSDF=this._sdf,this._compiledSwipeEnabled=this._swipeEnabled,n$13.clone(this._swipeRegion,this._compiledSwipeRegion)}i=e.commandList;var k=!0;if(e._fboState.frameBufferType===B$y.NORMAL_AND_DEPTH&&(k=!1),k&&(_.render||_.pick)){var U,V=this._colorCommands,W=this._blendOption===S$t.OPAQUE,H=this._blendOption===S$t.OPAQUE_AND_TRANSLUCENT,Y=this._vaf.va,j=Y.length,q=this._uniforms;t$$(this._batchTable)?(q=this._batchTable.getUniformMapCallback()(q),U=this._batchTable.getPickId()):U="v_pickColor",V.length=j;for(var X=H?2*j:j,K=0;K<X;++K){var Z=V[K];t$$(Z)||(Z=V[K]=new s$1d);var J=W||H&&K%2==0;Z.owner=this;var Q=H?Math.floor(K/2):K;Z.boundingVolume=E,Z.modelMatrix=A,Z.count=Y[Q].indicesCount,Z.uniformMap=q,Z.vertexArray=Y[Q].va,this._isParticleSystem?(Z.pass=we$l.Particle,Z.renderState=this._rsParticleSystem,Z.shaderProgram=this._spParticleSystem,Z.pickId=void 0):(Z.pass=J||!H?we$l.Label_Billboard:we$l.TRANSLUCENT,Z.renderState=J?this._rsOpaque:this._rsTranslucent,Z.shaderProgram=J?this._sp:this._spTranslucent,Z.pickId=U),Z.debugShowBoundingVolume=this.debugShowBoundingVolume,this._instanced&&(Z.count=6,Z.instanceCount=o),i.push(Z)}this.debugShowTextureAtlas&&(t$$(this.debugCommand)||(this.debugCommand=ii$5(this,e.context)),i.push(this.debugCommand))}}}}},O$t.prototype.isDestroyed=function(){return!1},O$t.prototype.destroy=function(){return t$$(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),dt$a(this._billboards),s$1e(this)},O$t.prototype.setBillboardImage=function(e){for(var t=this._billboards.length,i=0;i<t;++i){var n=this._billboards[i];n.isDestroyed()||n.setBillboardStyle(e)}};var m$C=new i$1g;function s$B(e){var t=e._billboard;if(t$$(e._billboardImage)&&e._billboardImage!==t.image)t.image=e._billboardImage;else if(!t$$(e._billboardImage)){var i=e$1Y(e._color,i$C.defaultColor),n=e$1Y(e._pointOutlineColor,i$C.defaultPointOutlineColor),r=e$1Y(e._pointOutlineWidth,i$C.defaultPointOutlineWidth),o=e$1Y(e._pointSize,i$C.defaultPointSize),a=e._billboardColor,s=e._billboardOutlineColor,l=e._billboardOutlineWidth,u=e._billboardSize;if(!e$1z.equals(i,a)||!e$1z.equals(n,s)||r!==l||o!==u){e._billboardColor=e$1z.clone(i,e._billboardColor),e._billboardOutlineColor=e$1z.clone(n,e._billboardOutlineColor),e._billboardOutlineWidth=r,e._billboardSize=o;var c=i.alpha,h=i.toCssColorString(),d=n.toCssColorString(),f=JSON.stringify([h,o,d,r]);t.setImage(f,c$A(c,h,d,r,o))}}}Object.defineProperties(i$C.prototype,{show:{get:function(){return this._label.show},set:function(e){this._label.show=e,this._billboard.show=e,this._polyline.show=e}},color:{get:function(){return this._color},set:function(e){this._color=e$1z.clone(e,this._color),s$B(this)}},pointSize:{get:function(){return this._pointSize},set:function(e){this._pointSize=e,s$B(this)}},pointOutlineColor:{get:function(){return this._pointOutlineColor},set:function(e){this._pointOutlineColor=e$1z.clone(e,this._pointOutlineColor),s$B(this)}},pointOutlineWidth:{get:function(){return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=e,s$B(this)}},labelColor:{get:function(){return this._label.fillColor},set:function(e){this._label.fillColor=e,this._polyline.show=this._label.show&&e.alpha>0}},labelOutlineColor:{get:function(){return this._label.outlineColor},set:function(e){this._label.outlineColor=e}},labelOutlineWidth:{get:function(){return this._label.outlineWidth},set:function(e){this._label.outlineWidth=e}},font:{get:function(){return this._label.font},set:function(e){this._label.font=e}},labelStyle:{get:function(){return this._label.style},set:function(e){this._label.style=e}},labelText:{get:function(){return this._label.text},set:function(e){t$$(e)||(e=""),this._label.text=e}},backgroundColor:{get:function(){return this._label.backgroundColor},set:function(e){this._label.backgroundColor=e}},backgroundPadding:{get:function(){return this._label.backgroundPadding},set:function(e){this._label.backgroundPadding=e}},backgroundEnabled:{get:function(){return this._label.showBackground},set:function(e){this._label.showBackground=e}},scaleByDistance:{get:function(){return this._label.scaleByDistance},set:function(e){this._label.scaleByDistance=e,this._billboard.scaleByDistance=e}},translucencyByDistance:{get:function(){return this._label.translucencyByDistance},set:function(e){this._label.translucencyByDistance=e,this._billboard.translucencyByDistance=e}},distanceDisplayCondition:{get:function(){return this._label.distanceDisplayCondition},set:function(e){this._label.distanceDisplayCondition=e,this._polyline.distanceDisplayCondition=e,this._billboard.distanceDisplayCondition=e}},heightOffset:{get:function(){return this._heightOffset},set:function(e){var t=e$1Y(this._heightOffset,0),i=this._content.tileset.ellipsoid,n=i.cartesianToCartographic(this._billboard.position,m$C);n.height=n.height-t+e;var r=i.cartographicToCartesian(n);this._billboard.position=r,this._label.position=this._billboard.position,this._polyline.positions=[this._polyline.positions[0],r],this._heightOffset=e}},anchorLineEnabled:{get:function(){return this._polyline.show},set:function(e){this._polyline.show=e}},anchorLineColor:{get:function(){return this._polyline.material.uniforms.color},set:function(e){this._polyline.material.uniforms.color=e$1z.clone(e,this._polyline.material.uniforms.color)}},image:{get:function(){return this._billboardImage},set:function(e){var t=this._billboardImage!==e;this._billboardImage=e,t&&s$B(this)}},disableDepthTestDistance:{get:function(){return this._label.disableDepthTestDistance},set:function(e){this._label.disableDepthTestDistance=e,this._billboard.disableDepthTestDistance=e}},horizontalOrigin:{get:function(){return this._billboard.horizontalOrigin},set:function(e){this._billboard.horizontalOrigin=e}},verticalOrigin:{get:function(){return this._billboard.verticalOrigin},set:function(e){this._billboard.verticalOrigin=e}},labelHorizontalOrigin:{get:function(){return this._label.horizontalOrigin},set:function(e){this._label.horizontalOrigin=e}},labelVerticalOrigin:{get:function(){return this._label.verticalOrigin},set:function(e){this._label.verticalOrigin=e}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},pickIds:{get:function(){var e=this._pickIds;return e[0]=this._billboard.pickId,e[1]=this._label.pickId,e[2]=this._polyline.pickId,e}}}),i$C.defaultColor=e$1z.WHITE,i$C.defaultPointOutlineColor=e$1z.BLACK,i$C.defaultPointOutlineWidth=0,i$C.defaultPointSize=8,i$C.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)},i$C.prototype.getPropertyNames=function(e){return this._content.batchTable.getPropertyNames(this._batchId,e)},i$C.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)},i$C.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0},i$C.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)},i$C.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)},i$C.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)};var A$H=1e20;function U$F(e,t,i){return t<i?e<t?t:e>i?i:e:e<i?i:e>t?t:e}function F$x(e,t){t||(t={});var i,n,r,o,a,s,l,u,c,h,d,f=null==t.cutoff?.25:t.cutoff,p=null==t.radius?8:t.radius,_=t.channel||0;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");i=t.width,n=t.height,o=e,s=t.stride?t.stride:Math.floor(e.length/i/n)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(l=(u=e).getContext("2d"),i=u.width,n=u.height,o=(c=l.getImageData(0,0,i,n)).data,s=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(l=e,i=(u=e.canvas).width,n=u.height,o=(c=l.getImageData(0,0,i,n)).data,s=4):window.ImageData&&e instanceof window.ImageData&&(c=e,i=e.width,n=e.height,o=c.data,s=4);if(r=Math.max(i,n),window.Uint8ClampedArray&&o instanceof window.Uint8ClampedArray||window.Uint8Array&&o instanceof window.Uint8Array)for(a=o,o=Array(i*n),h=0,d=a.length;h<d;h++)o[h]=a[h*s+_]/255;else if(1!==s)throw Error("Raw data can have only 1 value per pixel");var m=Array(i*n),$=Array(i*n),g=Array(r),y=Array(r),v=Array(r+1),x=Array(r);for(h=0,d=i*n;h<d;h++){var b=o[h];m[h]=1===b?0:0===b?A$H:Math.pow(Math.max(0,.5-b),2),$[h]=1===b?A$H:0===b?0:Math.pow(Math.max(0,b-.5),2)}E$C(m,i,n,g,y,x,v),E$C($,i,n,g,y,x,v);var S=window.Float32Array?new Float32Array(i*n):new Array(i*n);for(h=0,d=i*n;h<d;h++)S[h]=U$F(1-((m[h]-$[h])/p+f),0,1);return S}function E$C(e,t,i,n,r,o,a){for(var s=0;s<t;s++){for(var l=0;l<i;l++)n[l]=e[l*t+s];for(I$H(n,r,o,a,i),l=0;l<i;l++)e[l*t+s]=r[l]}for(l=0;l<i;l++){for(s=0;s<t;s++)n[s]=e[l*t+s];for(I$H(n,r,o,a,t),s=0;s<t;s++)e[l*t+s]=Math.sqrt(r[s])}}function I$H(e,t,i,n,r){i[0]=0,n[0]=-A$H,n[1]=+A$H;for(var o=1,a=0;o<r;o++){for(var s=(e[o]+o*o-(e[i[a]]+i[a]*i[a]))/(2*o-2*i[a]);s<=n[a];)a--,s=(e[o]+o*o-(e[i[a]]+i[a]*i[a]))/(2*o-2*i[a]);i[++a]=o,n[a]=s,n[a+1]=+A$H}for(o=0,a=0;o<r;o++){for(;n[a+1]<o;)a++;t[o]=(o-i[a])*(o-i[a])+e[i[a]]}}var e$P={FILL:0,OUTLINE:1,FILL_AND_OUTLINE:2},z$t=Object.freeze(e$P),g$t=Object.freeze({LTR:0,RTL:1,WEAK:2,BRACKETS:3});function m$B(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._rebindAllGlyphs=!0}function R$t(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._repositionAllGlyphs=!0}function A$G(e,t){return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)}function L$z(e){var t=document.createElement("div");t.style.position="absolute",t.style.opacity=0,/bold/i.test(e._font)?(e._font=e._font.replace(/\sbold/i,""),t.style.font=e._font,t.style.fontWeight="bold"):t.style.font=e._font,document.body.appendChild(t),e._fontFamily=A$G(t,"font-family"),e._fontSize=(t$$(t.style.fontSize)&&""!==t.style.fontSize&&/\d+px/.test(t.style.fontSize)?t.style.fontSize:A$G(t,"font-size")).replace("px",""),e._fontStyle=A$G(t,"font-style"),e._fontWeight=A$G(t,"font-weight"),document.body.removeChild(t)}function b$O(e,t){if(t$$((e=e$1Y(e,e$1Y.EMPTY_OBJECT)).s3MTilesLabelStyle)){var i=e.s3MTilesLabelStyle;e.font=i.font,e.fillColor=i.fillColor,e.outlineColor=i.outlineColor,e.outlineWidth=i.outlineWidth,e.showBackground=i.showBackground,e.backgroundColor=i.backgroundColor,e.backgroundPadding=i.backgroundPadding,e.style=i.fillStyle,e.verticalOrigin=i.verticalOrigin,e.horizontalOrigin=i.horizontalOrigin,e.pixelOffset=i.pixelOffset,e.eyeOffset=i.eyeOffset,e.scale=i.scale,e.translucencyByDistance=i.translucencyByDistance,e.pixelOffsetScaleByDistance=i.pixelOffsetScaleByDistance,e.scaleByDistance=i.scaleByDistance,e.heightReference=i.heightReference,e.distanceDisplayCondition=i.distanceDisplayCondition,e.disableDepthTestDistance=i.disableDepthTestDistance}if(t$$(e.disableDepthTestDistance)&&e.disableDepthTestDistance<0)throw new t$_("disableDepthTestDistance must be greater than 0.0.");var n=e.translucencyByDistance,r=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,a=e.distanceDisplayCondition;if(t$$(n)){if(n.far<=n.near)throw new t$_("translucencyByDistance.far must be greater than translucencyByDistance.near.");n=u$W.clone(n)}if(t$$(r)){if(r.far<=r.near)throw new t$_("pixelOffsetScaleByDistance.far must be greater than pixelOffsetScaleByDistance.near.");r=u$W.clone(r)}if(t$$(o)){if(o.far<=o.near)throw new t$_("scaleByDistance.far must be greater than scaleByDistance.near.");o=u$W.clone(o)}if(t$$(a)){if(a.far<=a.near)throw new t$_("distanceDisplayCondition.far must be greater than distanceDisplayCondition.near.");a=e$1w.clone(a)}this._renderedText=void 0,this._text=void 0,this._show=e$1Y(e.show,!0),this._font=e$1Y(e.font,"30px sans-serif"),this._fillColor=e$1z.clone(e$1Y(e.fillColor,e$1z.WHITE)),this._oriFillColor=e$1z.clone(this._fillColor),this._outlineColor=e$1z.clone(e$1Y(e.outlineColor,e$1z.BLACK)),this._outlineWidth=e$1Y(e.outlineWidth,1),this._showBackground=e$1Y(e.showBackground,!1),this._backgroundColor=e$1Y(e.backgroundColor,new e$1z(.165,.165,.165,.8)),this._backgroundPadding=e$1Y(e.backgroundPadding,new r$T(7,5)),this._backgroundImage=e$1Y(e.backgroundImage,null),this._style=e$1Y(e.style,z$t.FILL),this._verticalOrigin=e$1Y(e.verticalOrigin,j$10.BASELINE),this._horizontalOrigin=e$1Y(e.horizontalOrigin,N$W.CENTER),this._pixelOffset=r$T.clone(e$1Y(e.pixelOffset,r$T.ZERO)),this._eyeOffset=a$11.clone(e$1Y(e.eyeOffset,a$11.ZERO)),this._position=a$11.clone(e$1Y(e.position,a$11.ZERO)),this._scale=e$1Y(e.scale,1),this._id=e.id,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=r,this._scaleByDistance=o,this._heightReference=e$1Y(e.heightReference,U$Y.NONE),this._distanceDisplayCondition=a,this._disableDepthTestDistance=e.disableDepthTestDistance,this._labelCollection=t,this._glyphs=[],this._backgroundBillboard=void 0,this._batchIndex=void 0,this._rebindAllGlyphs=!0,this._repositionAllGlyphs=!0,this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=void 0,this._clusterShow=!0,this.text=e$1Y(e.text,""),this._relativeSize=1,this._index=e$1Y(e.index,0),this._isPicked=!1,this._screenSpacePosition=new r$T,this._localScreenSpaceBBox=new n$13,this._associativeMvtBillboard=void 0,this._mvtLayerID=e.mvtLayerID,this._mapName=e.mapName,this._mvtMinLevel=void 0,this._mvtMaxLevel=void 0,this._mvtProperties=e.mvtProperties,L$z(this),this._updateClamping(),this.isOverlap=!1}function U$E(e,t){for(var i=/[a-zA-Z0-9]/,n=/[()[\]{}<>]/,r=[],o="",a=g$t.LTR,s="",l=e.length,u=0;u<l;++u){var c=e.charAt(u);s=t.test(c)?g$t.RTL:i.test(c)?g$t.LTR:n.test(c)?g$t.BRACKETS:g$t.WEAK,0===u&&(a=s),a===s&&s!==g$t.BRACKETS?o+=c:(""!==o&&r.push({Type:a,Word:o}),a=s,o=c)}return r.push({Type:s,Word:o}),r}function Z$A(e){return e.split("").reverse().join("")}function P$r(e,t,i){return e.slice(0,t)+i+e.slice(t)}function j$C(e){switch(e){case"(":return")";case")":return"(";case"[":return"]";case"]":return"[";case"{":return"}";case"}":return"{";case"<":return">";case">":return"<"}}Object.defineProperties(b$O.prototype,{show:{get:function(){return this._show},set:function(e){if(!t$$(e))throw new t$_("value is required.");if(this._show!==e){this._show=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i].billboard;t$$(r)&&(r.show=e)}var o=this._backgroundBillboard;t$$(o)&&(o.show=e)}}},position:{get:function(){return this._position},set:function(e){if(!t$$(e))throw new t$_("value is required.");var t=this._position;if(!a$11.equals(t,e)){a$11.clone(e,t);for(var i=this._glyphs,n=0,r=i.length;n<r;n++){var o=i[n].billboard;t$$(o)&&(o.position=e)}var a=this._backgroundBillboard;t$$(a)&&(a.position=e),this._updateClamping()}}},heightReference:{get:function(){return this._heightReference},set:function(e){if(!t$$(e))throw new t$_("value is required.");if(e!==this._heightReference){this._heightReference=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i].billboard;t$$(r)&&(r.heightReference=e)}var o=this._backgroundBillboard;t$$(o)&&(o.heightReference=e),R$t(this),this._updateClamping()}}},text:{get:function(){return this._text},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._text!==e&&(this._text=e,this._renderedText=b$O.enableRightToLeftDetection?Q$w(e):e,m$B(this))}},font:{get:function(){return this._font},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._font!==e&&(this._font=e,m$B(this),L$z(this))}},fillColor:{get:function(){return this._fillColor},set:function(e){if(!t$$(e))throw new t$_("value is required.");var t=this._fillColor;e$1z.equals(t,e)||(this._oriFillColor=e$1z.clone(t),e$1z.clone(e,t),m$B(this))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!t$$(e))throw new t$_("value is required.");var t=this._outlineColor;e$1z.equals(t,e)||(e$1z.clone(e,t),m$B(this))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._outlineWidth!==e&&(this._outlineWidth=e,m$B(this))}},showBackground:{get:function(){return this._showBackground},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._showBackground!==e&&(this._showBackground=e,m$B(this))}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){if(!t$$(e))throw new t$_("value is required.");var t=this._backgroundColor;if(!e$1z.equals(t,e)){e$1z.clone(e,t);var i=this._backgroundBillboard;t$$(i)&&(i.color=t)}}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){if(!t$$(e))throw new t$_("value is required.");var t=this._backgroundPadding;r$T.equals(t,e)||(r$T.clone(e,t),R$t(this))}},style:{get:function(){return this._style},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._style!==e&&(this._style=e,m$B(this))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){if(!t$$(e))throw new t$_("value is required.");var t=this._pixelOffset;if(!r$T.equals(t,e)){r$T.clone(e,t);for(var i=this._glyphs,n=0,r=i.length;n<r;n++){var o=i[n];t$$(o.billboard)&&(o.billboard.pixelOffset=e)}var a=this._backgroundBillboard;t$$(a)&&(a.pixelOffset=e)}}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){if(t$$(e)&&e.far<=e.near)throw new t$_("far distance must be greater than near distance.");var t=this._translucencyByDistance;if(!u$W.equals(t,e)){this._translucencyByDistance=u$W.clone(e,t);for(var i=this._glyphs,n=0,r=i.length;n<r;n++){var o=i[n];t$$(o.billboard)&&(o.billboard.translucencyByDistance=e)}var a=this._backgroundBillboard;t$$(a)&&(a.translucencyByDistance=e)}}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){if(t$$(e)&&e.far<=e.near)throw new t$_("far distance must be greater than near distance.");var t=this._pixelOffsetScaleByDistance;if(!u$W.equals(t,e)){this._pixelOffsetScaleByDistance=u$W.clone(e,t);for(var i=this._glyphs,n=0,r=i.length;n<r;n++){var o=i[n];t$$(o.billboard)&&(o.billboard.pixelOffsetScaleByDistance=e)}var a=this._backgroundBillboard;t$$(a)&&(a.pixelOffsetScaleByDistance=e)}}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){if(t$$(e)&&e.far<=e.near)throw new t$_("far distance must be greater than near distance.");var t=this._scaleByDistance;if(!u$W.equals(t,e)){this._scaleByDistance=u$W.clone(e,t);for(var i=this._glyphs,n=0,r=i.length;n<r;n++){var o=i[n];t$$(o.billboard)&&(o.billboard.scaleByDistance=e)}var a=this._backgroundBillboard;t$$(a)&&(a.scaleByDistance=e)}}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){if(!t$$(e))throw new t$_("value is required.");var t=this._eyeOffset;if(!a$11.equals(t,e)){a$11.clone(e,t);for(var i=this._glyphs,n=0,r=i.length;n<r;n++){var o=i[n];t$$(o.billboard)&&(o.billboard.eyeOffset=e)}var a=this._backgroundBillboard;t$$(a)&&(a.eyeOffset=e)}}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._horizontalOrigin!==e&&(this._horizontalOrigin=e,R$t(this))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){if(!t$$(e))throw new t$_("value is required.");if(this._verticalOrigin!==e){this._verticalOrigin=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];t$$(r.billboard)&&(r.billboard.verticalOrigin=e)}var o=this._backgroundBillboard;t$$(o)&&(o.verticalOrigin=e),R$t(this)}}},scale:{get:function(){return this._scale},set:function(e){if(!t$$(e))throw new t$_("value is required.");if(this._scale!==e){this._scale=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];t$$(r.billboard)&&(r.billboard.scale=e*this._relativeSize)}var o=this._backgroundBillboard;t$$(o)&&(o.scale=e*this._relativeSize),R$t(this)}}},totalScale:{get:function(){return this._scale*this._relativeSize}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(t$$(e)&&e.far<=e.near)throw new t$_("far must be greater than near");if(!e$1w.equals(e,this._distanceDisplayCondition)){this._distanceDisplayCondition=e$1w.clone(e,this._distanceDisplayCondition);for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];t$$(r.billboard)&&(r.billboard.distanceDisplayCondition=e)}var o=this._backgroundBillboard;t$$(o)&&(o.distanceDisplayCondition=e)}}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){if(t$$(e)&&e<0)throw new t$_("disableDepthTestDistance must be greater than 0.0.");this._disableDepthTestDistance=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];t$$(r.billboard)&&(r.billboard.disableDepthTestDistance=e)}var o=this._backgroundBillboard;t$$(o)&&(o.disableDepthTestDistance=e)}}},id:{get:function(){return this._id},set:function(e){if(this._id!==e){this._id=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];t$$(r.billboard)&&(r.billboard.id=e)}var o=this._backgroundBillboard;t$$(o)&&(o.id=e)}}},pickId:{get:function(){if(0!==this._glyphs.length&&t$$(this._glyphs[0].billboard))return this._glyphs[0].billboard.pickId}},isPicked:{get:function(){return this._isPicked},set:function(e){n$1e.defined("value",e),n$1e.typeOf.bool("value",e),this._isPicked=e}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=a$11.clone(e,this._actualClampedPosition),t$$(e)&&this._mode===b$1d.COLUMBUS_VIEW&&(e=m$13.convertToColumbusCartesian(e));for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];t$$(r.billboard)&&(r.billboard._clampedPosition=e)}var o=this._backgroundBillboard;t$$(o)&&(o._clampedPosition=e)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){if(this._clusterShow!==e){this._clusterShow=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];t$$(r.billboard)&&(r.billboard.clusterShow=e)}var o=this._backgroundBillboard;t$$(o)&&(o.clusterShow=e)}}}}),b$O.prototype._updateClamping=function(){s$1a._updateClamping(this._labelCollection,this)},b$O.prototype.computeScreenSpacePosition=function(e,t){if(!t$$(e))throw new t$_("scene is required.");t$$(t)||(t=this._screenSpacePosition);var i=this._labelCollection.modelMatrix,n=t$$(this._actualClampedPosition)?this._actualClampedPosition:this._position;return s$1a._computeScreenSpacePosition(i,n,this._eyeOffset,this._pixelOffset,e,t)},b$O.prototype.computeLocalScreenSpaceBoundingBox=function(e,t){var i=0,n=0,r=0,o=0,a=e.totalScale,s=e._backgroundBillboard;if(t$$(s))i=s._translate.x,n=-s._translate.y,r=s.width*a,o=s.height*a,e.verticalOrigin===j$10.BOTTOM||e.verticalOrigin===j$10.BASELINE?n-=o:e.verticalOrigin===j$10.CENTER&&(n-=.5*o);else{i=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;for(var l=0,u=0,c=e._glyphs,h=c.length,d=0;d<h;++d){var f=c[d],p=f.billboard;if(t$$(p)){var _=p._translate.x,m=-p._translate.y,$=f.dimensions.width*a,g=f.dimensions.height*a;e.verticalOrigin===j$10.BOTTOM||e.verticalOrigin===j$10.BASELINE?m-=g:e.verticalOrigin===j$10.CENTER&&(m-=.5*g),e._verticalOrigin===j$10.TOP?m+=F$y.PADDING*a:(e._verticalOrigin===j$10.BOTTOM||e._verticalOrigin===j$10.BASELINE)&&(m-=F$y.PADDING*a),i=Math.min(i,_),n=Math.min(n,m),l=Math.max(l,_+$),u=Math.max(u,m+g)}}r=l-i,o=u-n}return t$$(t)||(t=new n$13),t.x=i,t.y=n,t.width=r,t.height=o,e._text.indexOf("\n")>-1&&(t.height*=e._text.split("\n").length),t},b$O.prototype.getScreenSpaceBoundingBox=function(e,t,i){return t$$(i)||(i=new n$13),this.computeLocalScreenSpaceBoundingBox(e,i),i.x+=t.x,i.y+=t.y,i},b$O.getScreenSpaceBoundingBox=function(e,t,i){var n=0,r=0,o=0,a=0,s=e.totalScale,l=e._backgroundBillboard;if(t$$(l))n=t.x+l._translate.x,r=t.y-l._translate.y,o=l.width*s,a=l.height*s,e.verticalOrigin===j$10.BOTTOM||e.verticalOrigin===j$10.BASELINE?r-=a:e.verticalOrigin===j$10.CENTER&&(r-=.5*a);else{n=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY;for(var u=0,c=0,h=e._glyphs,d=h.length,f=0;f<d;++f){var p=h[f],_=p.billboard;if(t$$(_)){var m=t.x+_._translate.x,$=t.y-_._translate.y,g=p.dimensions.width*s,y=p.dimensions.height*s;e.verticalOrigin===j$10.BOTTOM||e.verticalOrigin===j$10.BASELINE?$-=y:e.verticalOrigin===j$10.CENTER&&($-=.5*y),e._verticalOrigin===j$10.TOP?$+=F$y.PADDING*s:(e._verticalOrigin===j$10.BOTTOM||e._verticalOrigin===j$10.BASELINE)&&($-=F$y.PADDING*s),n=Math.min(n,m),r=Math.min(r,$),u=Math.max(u,m+g),c=Math.max(c,$+y)}}o=u-n,a=c-r}return t$$(i)||(i=new n$13),i.x=n,i.y=r,i.width=o,i.height=a,i},b$O.prototype.equals=function(e){return this===e||t$$(e)&&this._show===e._show&&this._scale===e._scale&&this._outlineWidth===e._outlineWidth&&this._showBackground===e._showBackground&&this._style===e._style&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&this._renderedText===e._renderedText&&this._font===e._font&&a$11.equals(this._position,e._position)&&e$1z.equals(this._fillColor,e._fillColor)&&e$1z.equals(this._outlineColor,e._outlineColor)&&e$1z.equals(this._backgroundColor,e._backgroundColor)&&r$T.equals(this._backgroundPadding,e._backgroundPadding)&&r$T.equals(this._pixelOffset,e._pixelOffset)&&a$11.equals(this._eyeOffset,e._eyeOffset)&&u$W.equals(this._translucencyByDistance,e._translucencyByDistance)&&u$W.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&u$W.equals(this._scaleByDistance,e._scaleByDistance)&&e$1w.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._id===e._id},b$O.prototype.isDestroyed=function(){return!1},b$O.prototype.restFillColor=function(){var e=e$1z.clone(this._fillColor),t=this._oriFillColor;e$1z.equals(e,t)||(this._fillColor=e$1z.clone(t),m$B(this))},b$O.prototype.setLabelStyle=function(e){!t$$(e)||(this._font=e$1Y(e.font,this._font),this._fillColor=e$1z.clone(e$1Y(e.fillColor,this._fillColor)),this._oriFillColor=e$1z.clone(this._fillColor),this._outlineColor=e$1z.clone(e$1Y(e.outlineColor,this._outlineColor)),this._outlineWidth=e$1Y(e.outlineWidth,this._outlineWidth),this._showBackground=e$1Y(e.showBackground,this._showBackground),this._backgroundColor=e$1z.clone(e$1Y(e.backgroundColor,this._backgroundColor)),this._backgroundPadding=e$1Y(e.backgroundPadding,this._backgroundPadding),this._style=e$1Y(e.fillStyle,this._style),this._verticalOrigin=e$1Y(e.verticalOrigin,this._verticalOrigin),this._horizontalOrigin=e$1Y(e.horizontalOrigin,this._horizontalOrigin),this._pixelOffset=r$T.clone(e$1Y(e.pixelOffset,this._pixelOffset)),this._eyeOffset=a$11.clone(e$1Y(e.eyeOffset,this._eyeOffset)),this._scale=e$1Y(e.scale,this._scale),this._translucencyByDistance=u$W.clone(e$1Y(e.translucencyByDistance,this._translucencyByDistance)),this._pixelOffsetScaleByDistance=u$W.clone(e$1Y(e.pixelOffsetScaleByDistance,this._pixelOffsetScaleByDistance)),this._scaleByDistance=u$W.clone(e$1Y(e.scaleByDistance,this._scaleByDistance)),this._heightReference=e$1Y(e.heightReference,this._heightReference),this._distanceDisplayCondition=e$1w.clone(e$1Y(e.distanceDisplayCondition,this._distanceDisplayCondition)),this._disableDepthTestDistance=e$1Y(e.disableDepthTestDistance,this._disableDepthTestDistance),L$z(this),m$B(this))},b$O.enableRightToLeftDetection=!1;var H$z="א-ת",J$A="؀-ۿݐ-ݿࢠ-ࣿ",M$E=new RegExp("["+H$z+J$A+"]");function Q$w(e){for(var t=e.split("\n"),i="",n=0;n<t.length;n++){for(var r=t[n],o=M$E.test(r.charAt(0)),a=U$E(r,M$E),s=0,l="",u=0;u<a.length;++u){var c=a[u],h=c.Type===g$t.BRACKETS?j$C(c.Word):Z$A(c.Word);o?c.Type===g$t.RTL?(l=h+l,s=0):c.Type===g$t.LTR?(l=P$r(l,s,c.Word),s+=c.Word.length):(c.Type===g$t.WEAK||c.Type===g$t.BRACKETS)&&(c.Type===g$t.WEAK&&a[u-1].Type===g$t.BRACKETS?l=h+l:a[u-1].Type===g$t.RTL?(l=h+l,s=0):a.length>u+1?a[u+1].Type===g$t.RTL?(l=h+l,s=0):(l=P$r(l,s,c.Word),s+=c.Word.length):l=P$r(l,0,h)):c.Type===g$t.RTL?l=P$r(l,s,h):c.Type===g$t.LTR?s=(l+=c.Word).length:(c.Type===g$t.WEAK||c.Type===g$t.BRACKETS)&&(u>0&&a[u-1].Type===g$t.RTL?a.length>u+1?a[u+1].Type===g$t.RTL?l=P$r(l,s,h):s=(l+=c.Word).length:l+=c.Word:s=(l+=c.Word).length)}i+=l,n<t.length-1&&(i+="\n")}return i}function Z$z(){var e=3,t=4,i=12,n=13,r=16,o=17;function a(e,t){return 55296<=e.charCodeAt(t)&&e.charCodeAt(t)<=56319&&56320<=e.charCodeAt(t+1)&&e.charCodeAt(t+1)<=57343}function s(e,t){void 0===t&&(t=0);var i=e.charCodeAt(t);if(55296<=i&&i<=56319&&t<e.length-1){var n=i;return 56320<=(r=e.charCodeAt(t+1))&&r<=57343?1024*(n-55296)+(r-56320)+65536:n}if(56320<=i&&i<=57343&&t>=1){var r=i;return 55296<=(n=e.charCodeAt(t-1))&&n<=56319?1024*(n-55296)+(r-56320)+65536:r}return i}function l(a,s,l){var u=[a].concat(s).concat([l]),c=u[u.length-2],h=l,d=u.lastIndexOf(14);if(d>1&&u.slice(1,d).every((function(t){return t==e}))&&-1==[e,n,o].indexOf(a))return 2;var f=u.lastIndexOf(t);if(f>0&&u.slice(1,f).every((function(e){return e==t}))&&-1==[i,t].indexOf(c))return u.filter((function(e){return e==t})).length%2==1?3:4;if(0==c&&1==h)return 0;if(2==c||0==c||1==c)return 14==h&&s.every((function(t){return t==e}))?2:1;if(2==h||0==h||1==h)return 1;if(6==c&&(6==h||7==h||9==h||10==h)||(9==c||7==c)&&(7==h||8==h)||(10==c||8==c)&&8==h||h==e||15==h||5==h||c==i)return 0;var p=-1!=u.indexOf(e)?u.lastIndexOf(e)-1:u.length-2;return-1!=[n,o].indexOf(u[p])&&u.slice(p+1,-1).every((function(t){return t==e}))&&14==h||15==c&&-1!=[r,o].indexOf(h)?0:-1!=s.indexOf(t)?2:c==t&&h==t?0:1}function u(a){return 1536<=a&&a<=1541||1757==a||1807==a||2274==a||3406==a||69821==a||70082<=a&&a<=70083||72250==a||72326<=a&&a<=72329||73030==a?i:13==a?0:10==a?1:0<=a&&a<=9||11<=a&&a<=12||14<=a&&a<=31||127<=a&&a<=159||173==a||1564==a||6158==a||8203==a||8206<=a&&a<=8207||8232==a||8233==a||8234<=a&&a<=8238||8288<=a&&a<=8292||8293==a||8294<=a&&a<=8303||55296<=a&&a<=57343||65279==a||65520<=a&&a<=65528||65529<=a&&a<=65531||113824<=a&&a<=113827||119155<=a&&a<=119162||917504==a||917505==a||917506<=a&&a<=917535||917632<=a&&a<=917759||918e3<=a&&a<=921599?2:768<=a&&a<=879||1155<=a&&a<=1159||1160<=a&&a<=1161||1425<=a&&a<=1469||1471==a||1473<=a&&a<=1474||1476<=a&&a<=1477||1479==a||1552<=a&&a<=1562||1611<=a&&a<=1631||1648==a||1750<=a&&a<=1756||1759<=a&&a<=1764||1767<=a&&a<=1768||1770<=a&&a<=1773||1809==a||1840<=a&&a<=1866||1958<=a&&a<=1968||2027<=a&&a<=2035||2070<=a&&a<=2073||2075<=a&&a<=2083||2085<=a&&a<=2087||2089<=a&&a<=2093||2137<=a&&a<=2139||2260<=a&&a<=2273||2275<=a&&a<=2306||2362==a||2364==a||2369<=a&&a<=2376||2381==a||2385<=a&&a<=2391||2402<=a&&a<=2403||2433==a||2492==a||2494==a||2497<=a&&a<=2500||2509==a||2519==a||2530<=a&&a<=2531||2561<=a&&a<=2562||2620==a||2625<=a&&a<=2626||2631<=a&&a<=2632||2635<=a&&a<=2637||2641==a||2672<=a&&a<=2673||2677==a||2689<=a&&a<=2690||2748==a||2753<=a&&a<=2757||2759<=a&&a<=2760||2765==a||2786<=a&&a<=2787||2810<=a&&a<=2815||2817==a||2876==a||2878==a||2879==a||2881<=a&&a<=2884||2893==a||2902==a||2903==a||2914<=a&&a<=2915||2946==a||3006==a||3008==a||3021==a||3031==a||3072==a||3134<=a&&a<=3136||3142<=a&&a<=3144||3146<=a&&a<=3149||3157<=a&&a<=3158||3170<=a&&a<=3171||3201==a||3260==a||3263==a||3266==a||3270==a||3276<=a&&a<=3277||3285<=a&&a<=3286||3298<=a&&a<=3299||3328<=a&&a<=3329||3387<=a&&a<=3388||3390==a||3393<=a&&a<=3396||3405==a||3415==a||3426<=a&&a<=3427||3530==a||3535==a||3538<=a&&a<=3540||3542==a||3551==a||3633==a||3636<=a&&a<=3642||3655<=a&&a<=3662||3761==a||3764<=a&&a<=3769||3771<=a&&a<=3772||3784<=a&&a<=3789||3864<=a&&a<=3865||3893==a||3895==a||3897==a||3953<=a&&a<=3966||3968<=a&&a<=3972||3974<=a&&a<=3975||3981<=a&&a<=3991||3993<=a&&a<=4028||4038==a||4141<=a&&a<=4144||4146<=a&&a<=4151||4153<=a&&a<=4154||4157<=a&&a<=4158||4184<=a&&a<=4185||4190<=a&&a<=4192||4209<=a&&a<=4212||4226==a||4229<=a&&a<=4230||4237==a||4253==a||4957<=a&&a<=4959||5906<=a&&a<=5908||5938<=a&&a<=5940||5970<=a&&a<=5971||6002<=a&&a<=6003||6068<=a&&a<=6069||6071<=a&&a<=6077||6086==a||6089<=a&&a<=6099||6109==a||6155<=a&&a<=6157||6277<=a&&a<=6278||6313==a||6432<=a&&a<=6434||6439<=a&&a<=6440||6450==a||6457<=a&&a<=6459||6679<=a&&a<=6680||6683==a||6742==a||6744<=a&&a<=6750||6752==a||6754==a||6757<=a&&a<=6764||6771<=a&&a<=6780||6783==a||6832<=a&&a<=6845||6846==a||6912<=a&&a<=6915||6964==a||6966<=a&&a<=6970||6972==a||6978==a||7019<=a&&a<=7027||7040<=a&&a<=7041||7074<=a&&a<=7077||7080<=a&&a<=7081||7083<=a&&a<=7085||7142==a||7144<=a&&a<=7145||7149==a||7151<=a&&a<=7153||7212<=a&&a<=7219||7222<=a&&a<=7223||7376<=a&&a<=7378||7380<=a&&a<=7392||7394<=a&&a<=7400||7405==a||7412==a||7416<=a&&a<=7417||7616<=a&&a<=7673||7675<=a&&a<=7679||8204==a||8400<=a&&a<=8412||8413<=a&&a<=8416||8417==a||8418<=a&&a<=8420||8421<=a&&a<=8432||11503<=a&&a<=11505||11647==a||11744<=a&&a<=11775||12330<=a&&a<=12333||12334<=a&&a<=12335||12441<=a&&a<=12442||42607==a||42608<=a&&a<=42610||42612<=a&&a<=42621||42654<=a&&a<=42655||42736<=a&&a<=42737||43010==a||43014==a||43019==a||43045<=a&&a<=43046||43204<=a&&a<=43205||43232<=a&&a<=43249||43302<=a&&a<=43309||43335<=a&&a<=43345||43392<=a&&a<=43394||43443==a||43446<=a&&a<=43449||43452==a||43493==a||43561<=a&&a<=43566||43569<=a&&a<=43570||43573<=a&&a<=43574||43587==a||43596==a||43644==a||43696==a||43698<=a&&a<=43700||43703<=a&&a<=43704||43710<=a&&a<=43711||43713==a||43756<=a&&a<=43757||43766==a||44005==a||44008==a||44013==a||64286==a||65024<=a&&a<=65039||65056<=a&&a<=65071||65438<=a&&a<=65439||66045==a||66272==a||66422<=a&&a<=66426||68097<=a&&a<=68099||68101<=a&&a<=68102||68108<=a&&a<=68111||68152<=a&&a<=68154||68159==a||68325<=a&&a<=68326||69633==a||69688<=a&&a<=69702||69759<=a&&a<=69761||69811<=a&&a<=69814||69817<=a&&a<=69818||69888<=a&&a<=69890||69927<=a&&a<=69931||69933<=a&&a<=69940||70003==a||70016<=a&&a<=70017||70070<=a&&a<=70078||70090<=a&&a<=70092||70191<=a&&a<=70193||70196==a||70198<=a&&a<=70199||70206==a||70367==a||70371<=a&&a<=70378||70400<=a&&a<=70401||70460==a||70462==a||70464==a||70487==a||70502<=a&&a<=70508||70512<=a&&a<=70516||70712<=a&&a<=70719||70722<=a&&a<=70724||70726==a||70832==a||70835<=a&&a<=70840||70842==a||70845==a||70847<=a&&a<=70848||70850<=a&&a<=70851||71087==a||71090<=a&&a<=71093||71100<=a&&a<=71101||71103<=a&&a<=71104||71132<=a&&a<=71133||71219<=a&&a<=71226||71229==a||71231<=a&&a<=71232||71339==a||71341==a||71344<=a&&a<=71349||71351==a||71453<=a&&a<=71455||71458<=a&&a<=71461||71463<=a&&a<=71467||72193<=a&&a<=72198||72201<=a&&a<=72202||72243<=a&&a<=72248||72251<=a&&a<=72254||72263==a||72273<=a&&a<=72278||72281<=a&&a<=72283||72330<=a&&a<=72342||72344<=a&&a<=72345||72752<=a&&a<=72758||72760<=a&&a<=72765||72767==a||72850<=a&&a<=72871||72874<=a&&a<=72880||72882<=a&&a<=72883||72885<=a&&a<=72886||73009<=a&&a<=73014||73018==a||73020<=a&&a<=73021||73023<=a&&a<=73029||73031==a||92912<=a&&a<=92916||92976<=a&&a<=92982||94095<=a&&a<=94098||113821<=a&&a<=113822||119141==a||119143<=a&&a<=119145||119150<=a&&a<=119154||119163<=a&&a<=119170||119173<=a&&a<=119179||119210<=a&&a<=119213||119362<=a&&a<=119364||121344<=a&&a<=121398||121403<=a&&a<=121452||121461==a||121476==a||121499<=a&&a<=121503||121505<=a&&a<=121519||122880<=a&&a<=122886||122888<=a&&a<=122904||122907<=a&&a<=122913||122915<=a&&a<=122916||122918<=a&&a<=122922||125136<=a&&a<=125142||125252<=a&&a<=125258||917536<=a&&a<=917631||917760<=a&&a<=917999?e:127462<=a&&a<=127487?t:2307==a||2363==a||2366<=a&&a<=2368||2377<=a&&a<=2380||2382<=a&&a<=2383||2434<=a&&a<=2435||2495<=a&&a<=2496||2503<=a&&a<=2504||2507<=a&&a<=2508||2563==a||2622<=a&&a<=2624||2691==a||2750<=a&&a<=2752||2761==a||2763<=a&&a<=2764||2818<=a&&a<=2819||2880==a||2887<=a&&a<=2888||2891<=a&&a<=2892||3007==a||3009<=a&&a<=3010||3014<=a&&a<=3016||3018<=a&&a<=3020||3073<=a&&a<=3075||3137<=a&&a<=3140||3202<=a&&a<=3203||3262==a||3264<=a&&a<=3265||3267<=a&&a<=3268||3271<=a&&a<=3272||3274<=a&&a<=3275||3330<=a&&a<=3331||3391<=a&&a<=3392||3398<=a&&a<=3400||3402<=a&&a<=3404||3458<=a&&a<=3459||3536<=a&&a<=3537||3544<=a&&a<=3550||3570<=a&&a<=3571||3635==a||3763==a||3902<=a&&a<=3903||3967==a||4145==a||4155<=a&&a<=4156||4182<=a&&a<=4183||4228==a||6070==a||6078<=a&&a<=6085||6087<=a&&a<=6088||6435<=a&&a<=6438||6441<=a&&a<=6443||6448<=a&&a<=6449||6451<=a&&a<=6456||6681<=a&&a<=6682||6741==a||6743==a||6765<=a&&a<=6770||6916==a||6965==a||6971==a||6973<=a&&a<=6977||6979<=a&&a<=6980||7042==a||7073==a||7078<=a&&a<=7079||7082==a||7143==a||7146<=a&&a<=7148||7150==a||7154<=a&&a<=7155||7204<=a&&a<=7211||7220<=a&&a<=7221||7393==a||7410<=a&&a<=7411||7415==a||43043<=a&&a<=43044||43047==a||43136<=a&&a<=43137||43188<=a&&a<=43203||43346<=a&&a<=43347||43395==a||43444<=a&&a<=43445||43450<=a&&a<=43451||43453<=a&&a<=43456||43567<=a&&a<=43568||43571<=a&&a<=43572||43597==a||43755==a||43758<=a&&a<=43759||43765==a||44003<=a&&a<=44004||44006<=a&&a<=44007||44009<=a&&a<=44010||44012==a||69632==a||69634==a||69762==a||69808<=a&&a<=69810||69815<=a&&a<=69816||69932==a||70018==a||70067<=a&&a<=70069||70079<=a&&a<=70080||70188<=a&&a<=70190||70194<=a&&a<=70195||70197==a||70368<=a&&a<=70370||70402<=a&&a<=70403||70463==a||70465<=a&&a<=70468||70471<=a&&a<=70472||70475<=a&&a<=70477||70498<=a&&a<=70499||70709<=a&&a<=70711||70720<=a&&a<=70721||70725==a||70833<=a&&a<=70834||70841==a||70843<=a&&a<=70844||70846==a||70849==a||71088<=a&&a<=71089||71096<=a&&a<=71099||71102==a||71216<=a&&a<=71218||71227<=a&&a<=71228||71230==a||71340==a||71342<=a&&a<=71343||71350==a||71456<=a&&a<=71457||71462==a||72199<=a&&a<=72200||72249==a||72279<=a&&a<=72280||72343==a||72751==a||72766==a||72873==a||72881==a||72884==a||94033<=a&&a<=94078||119142==a||119149==a?5:4352<=a&&a<=4447||43360<=a&&a<=43388?6:4448<=a&&a<=4519||55216<=a&&a<=55238?7:4520<=a&&a<=4607||55243<=a&&a<=55291?8:44032==a||44060==a||44088==a||44116==a||44144==a||44172==a||44200==a||44228==a||44256==a||44284==a||44312==a||44340==a||44368==a||44396==a||44424==a||44452==a||44480==a||44508==a||44536==a||44564==a||44592==a||44620==a||44648==a||44676==a||44704==a||44732==a||44760==a||44788==a||44816==a||44844==a||44872==a||44900==a||44928==a||44956==a||44984==a||45012==a||45040==a||45068==a||45096==a||45124==a||45152==a||45180==a||45208==a||45236==a||45264==a||45292==a||45320==a||45348==a||45376==a||45404==a||45432==a||45460==a||45488==a||45516==a||45544==a||45572==a||45600==a||45628==a||45656==a||45684==a||45712==a||45740==a||45768==a||45796==a||45824==a||45852==a||45880==a||45908==a||45936==a||45964==a||45992==a||46020==a||46048==a||46076==a||46104==a||46132==a||46160==a||46188==a||46216==a||46244==a||46272==a||46300==a||46328==a||46356==a||46384==a||46412==a||46440==a||46468==a||46496==a||46524==a||46552==a||46580==a||46608==a||46636==a||46664==a||46692==a||46720==a||46748==a||46776==a||46804==a||46832==a||46860==a||46888==a||46916==a||46944==a||46972==a||47e3==a||47028==a||47056==a||47084==a||47112==a||47140==a||47168==a||47196==a||47224==a||47252==a||47280==a||47308==a||47336==a||47364==a||47392==a||47420==a||47448==a||47476==a||47504==a||47532==a||47560==a||47588==a||47616==a||47644==a||47672==a||47700==a||47728==a||47756==a||47784==a||47812==a||47840==a||47868==a||47896==a||47924==a||47952==a||47980==a||48008==a||48036==a||48064==a||48092==a||48120==a||48148==a||48176==a||48204==a||48232==a||48260==a||48288==a||48316==a||48344==a||48372==a||48400==a||48428==a||48456==a||48484==a||48512==a||48540==a||48568==a||48596==a||48624==a||48652==a||48680==a||48708==a||48736==a||48764==a||48792==a||48820==a||48848==a||48876==a||48904==a||48932==a||48960==a||48988==a||49016==a||49044==a||49072==a||49100==a||49128==a||49156==a||49184==a||49212==a||49240==a||49268==a||49296==a||49324==a||49352==a||49380==a||49408==a||49436==a||49464==a||49492==a||49520==a||49548==a||49576==a||49604==a||49632==a||49660==a||49688==a||49716==a||49744==a||49772==a||49800==a||49828==a||49856==a||49884==a||49912==a||49940==a||49968==a||49996==a||50024==a||50052==a||50080==a||50108==a||50136==a||50164==a||50192==a||50220==a||50248==a||50276==a||50304==a||50332==a||50360==a||50388==a||50416==a||50444==a||50472==a||50500==a||50528==a||50556==a||50584==a||50612==a||50640==a||50668==a||50696==a||50724==a||50752==a||50780==a||50808==a||50836==a||50864==a||50892==a||50920==a||50948==a||50976==a||51004==a||51032==a||51060==a||51088==a||51116==a||51144==a||51172==a||51200==a||51228==a||51256==a||51284==a||51312==a||51340==a||51368==a||51396==a||51424==a||51452==a||51480==a||51508==a||51536==a||51564==a||51592==a||51620==a||51648==a||51676==a||51704==a||51732==a||51760==a||51788==a||51816==a||51844==a||51872==a||51900==a||51928==a||51956==a||51984==a||52012==a||52040==a||52068==a||52096==a||52124==a||52152==a||52180==a||52208==a||52236==a||52264==a||52292==a||52320==a||52348==a||52376==a||52404==a||52432==a||52460==a||52488==a||52516==a||52544==a||52572==a||52600==a||52628==a||52656==a||52684==a||52712==a||52740==a||52768==a||52796==a||52824==a||52852==a||52880==a||52908==a||52936==a||52964==a||52992==a||53020==a||53048==a||53076==a||53104==a||53132==a||53160==a||53188==a||53216==a||53244==a||53272==a||53300==a||53328==a||53356==a||53384==a||53412==a||53440==a||53468==a||53496==a||53524==a||53552==a||53580==a||53608==a||53636==a||53664==a||53692==a||53720==a||53748==a||53776==a||53804==a||53832==a||53860==a||53888==a||53916==a||53944==a||53972==a||54e3==a||54028==a||54056==a||54084==a||54112==a||54140==a||54168==a||54196==a||54224==a||54252==a||54280==a||54308==a||54336==a||54364==a||54392==a||54420==a||54448==a||54476==a||54504==a||54532==a||54560==a||54588==a||54616==a||54644==a||54672==a||54700==a||54728==a||54756==a||54784==a||54812==a||54840==a||54868==a||54896==a||54924==a||54952==a||54980==a||55008==a||55036==a||55064==a||55092==a||55120==a||55148==a||55176==a?9:44033<=a&&a<=44059||44061<=a&&a<=44087||44089<=a&&a<=44115||44117<=a&&a<=44143||44145<=a&&a<=44171||44173<=a&&a<=44199||44201<=a&&a<=44227||44229<=a&&a<=44255||44257<=a&&a<=44283||44285<=a&&a<=44311||44313<=a&&a<=44339||44341<=a&&a<=44367||44369<=a&&a<=44395||44397<=a&&a<=44423||44425<=a&&a<=44451||44453<=a&&a<=44479||44481<=a&&a<=44507||44509<=a&&a<=44535||44537<=a&&a<=44563||44565<=a&&a<=44591||44593<=a&&a<=44619||44621<=a&&a<=44647||44649<=a&&a<=44675||44677<=a&&a<=44703||44705<=a&&a<=44731||44733<=a&&a<=44759||44761<=a&&a<=44787||44789<=a&&a<=44815||44817<=a&&a<=44843||44845<=a&&a<=44871||44873<=a&&a<=44899||44901<=a&&a<=44927||44929<=a&&a<=44955||44957<=a&&a<=44983||44985<=a&&a<=45011||45013<=a&&a<=45039||45041<=a&&a<=45067||45069<=a&&a<=45095||45097<=a&&a<=45123||45125<=a&&a<=45151||45153<=a&&a<=45179||45181<=a&&a<=45207||45209<=a&&a<=45235||45237<=a&&a<=45263||45265<=a&&a<=45291||45293<=a&&a<=45319||45321<=a&&a<=45347||45349<=a&&a<=45375||45377<=a&&a<=45403||45405<=a&&a<=45431||45433<=a&&a<=45459||45461<=a&&a<=45487||45489<=a&&a<=45515||45517<=a&&a<=45543||45545<=a&&a<=45571||45573<=a&&a<=45599||45601<=a&&a<=45627||45629<=a&&a<=45655||45657<=a&&a<=45683||45685<=a&&a<=45711||45713<=a&&a<=45739||45741<=a&&a<=45767||45769<=a&&a<=45795||45797<=a&&a<=45823||45825<=a&&a<=45851||45853<=a&&a<=45879||45881<=a&&a<=45907||45909<=a&&a<=45935||45937<=a&&a<=45963||45965<=a&&a<=45991||45993<=a&&a<=46019||46021<=a&&a<=46047||46049<=a&&a<=46075||46077<=a&&a<=46103||46105<=a&&a<=46131||46133<=a&&a<=46159||46161<=a&&a<=46187||46189<=a&&a<=46215||46217<=a&&a<=46243||46245<=a&&a<=46271||46273<=a&&a<=46299||46301<=a&&a<=46327||46329<=a&&a<=46355||46357<=a&&a<=46383||46385<=a&&a<=46411||46413<=a&&a<=46439||46441<=a&&a<=46467||46469<=a&&a<=46495||46497<=a&&a<=46523||46525<=a&&a<=46551||46553<=a&&a<=46579||46581<=a&&a<=46607||46609<=a&&a<=46635||46637<=a&&a<=46663||46665<=a&&a<=46691||46693<=a&&a<=46719||46721<=a&&a<=46747||46749<=a&&a<=46775||46777<=a&&a<=46803||46805<=a&&a<=46831||46833<=a&&a<=46859||46861<=a&&a<=46887||46889<=a&&a<=46915||46917<=a&&a<=46943||46945<=a&&a<=46971||46973<=a&&a<=46999||47001<=a&&a<=47027||47029<=a&&a<=47055||47057<=a&&a<=47083||47085<=a&&a<=47111||47113<=a&&a<=47139||47141<=a&&a<=47167||47169<=a&&a<=47195||47197<=a&&a<=47223||47225<=a&&a<=47251||47253<=a&&a<=47279||47281<=a&&a<=47307||47309<=a&&a<=47335||47337<=a&&a<=47363||47365<=a&&a<=47391||47393<=a&&a<=47419||47421<=a&&a<=47447||47449<=a&&a<=47475||47477<=a&&a<=47503||47505<=a&&a<=47531||47533<=a&&a<=47559||47561<=a&&a<=47587||47589<=a&&a<=47615||47617<=a&&a<=47643||47645<=a&&a<=47671||47673<=a&&a<=47699||47701<=a&&a<=47727||47729<=a&&a<=47755||47757<=a&&a<=47783||47785<=a&&a<=47811||47813<=a&&a<=47839||47841<=a&&a<=47867||47869<=a&&a<=47895||47897<=a&&a<=47923||47925<=a&&a<=47951||47953<=a&&a<=47979||47981<=a&&a<=48007||48009<=a&&a<=48035||48037<=a&&a<=48063||48065<=a&&a<=48091||48093<=a&&a<=48119||48121<=a&&a<=48147||48149<=a&&a<=48175||48177<=a&&a<=48203||48205<=a&&a<=48231||48233<=a&&a<=48259||48261<=a&&a<=48287||48289<=a&&a<=48315||48317<=a&&a<=48343||48345<=a&&a<=48371||48373<=a&&a<=48399||48401<=a&&a<=48427||48429<=a&&a<=48455||48457<=a&&a<=48483||48485<=a&&a<=48511||48513<=a&&a<=48539||48541<=a&&a<=48567||48569<=a&&a<=48595||48597<=a&&a<=48623||48625<=a&&a<=48651||48653<=a&&a<=48679||48681<=a&&a<=48707||48709<=a&&a<=48735||48737<=a&&a<=48763||48765<=a&&a<=48791||48793<=a&&a<=48819||48821<=a&&a<=48847||48849<=a&&a<=48875||48877<=a&&a<=48903||48905<=a&&a<=48931||48933<=a&&a<=48959||48961<=a&&a<=48987||48989<=a&&a<=49015||49017<=a&&a<=49043||49045<=a&&a<=49071||49073<=a&&a<=49099||49101<=a&&a<=49127||49129<=a&&a<=49155||49157<=a&&a<=49183||49185<=a&&a<=49211||49213<=a&&a<=49239||49241<=a&&a<=49267||49269<=a&&a<=49295||49297<=a&&a<=49323||49325<=a&&a<=49351||49353<=a&&a<=49379||49381<=a&&a<=49407||49409<=a&&a<=49435||49437<=a&&a<=49463||49465<=a&&a<=49491||49493<=a&&a<=49519||49521<=a&&a<=49547||49549<=a&&a<=49575||49577<=a&&a<=49603||49605<=a&&a<=49631||49633<=a&&a<=49659||49661<=a&&a<=49687||49689<=a&&a<=49715||49717<=a&&a<=49743||49745<=a&&a<=49771||49773<=a&&a<=49799||49801<=a&&a<=49827||49829<=a&&a<=49855||49857<=a&&a<=49883||49885<=a&&a<=49911||49913<=a&&a<=49939||49941<=a&&a<=49967||49969<=a&&a<=49995||49997<=a&&a<=50023||50025<=a&&a<=50051||50053<=a&&a<=50079||50081<=a&&a<=50107||50109<=a&&a<=50135||50137<=a&&a<=50163||50165<=a&&a<=50191||50193<=a&&a<=50219||50221<=a&&a<=50247||50249<=a&&a<=50275||50277<=a&&a<=50303||50305<=a&&a<=50331||50333<=a&&a<=50359||50361<=a&&a<=50387||50389<=a&&a<=50415||50417<=a&&a<=50443||50445<=a&&a<=50471||50473<=a&&a<=50499||50501<=a&&a<=50527||50529<=a&&a<=50555||50557<=a&&a<=50583||50585<=a&&a<=50611||50613<=a&&a<=50639||50641<=a&&a<=50667||50669<=a&&a<=50695||50697<=a&&a<=50723||50725<=a&&a<=50751||50753<=a&&a<=50779||50781<=a&&a<=50807||50809<=a&&a<=50835||50837<=a&&a<=50863||50865<=a&&a<=50891||50893<=a&&a<=50919||50921<=a&&a<=50947||50949<=a&&a<=50975||50977<=a&&a<=51003||51005<=a&&a<=51031||51033<=a&&a<=51059||51061<=a&&a<=51087||51089<=a&&a<=51115||51117<=a&&a<=51143||51145<=a&&a<=51171||51173<=a&&a<=51199||51201<=a&&a<=51227||51229<=a&&a<=51255||51257<=a&&a<=51283||51285<=a&&a<=51311||51313<=a&&a<=51339||51341<=a&&a<=51367||51369<=a&&a<=51395||51397<=a&&a<=51423||51425<=a&&a<=51451||51453<=a&&a<=51479||51481<=a&&a<=51507||51509<=a&&a<=51535||51537<=a&&a<=51563||51565<=a&&a<=51591||51593<=a&&a<=51619||51621<=a&&a<=51647||51649<=a&&a<=51675||51677<=a&&a<=51703||51705<=a&&a<=51731||51733<=a&&a<=51759||51761<=a&&a<=51787||51789<=a&&a<=51815||51817<=a&&a<=51843||51845<=a&&a<=51871||51873<=a&&a<=51899||51901<=a&&a<=51927||51929<=a&&a<=51955||51957<=a&&a<=51983||51985<=a&&a<=52011||52013<=a&&a<=52039||52041<=a&&a<=52067||52069<=a&&a<=52095||52097<=a&&a<=52123||52125<=a&&a<=52151||52153<=a&&a<=52179||52181<=a&&a<=52207||52209<=a&&a<=52235||52237<=a&&a<=52263||52265<=a&&a<=52291||52293<=a&&a<=52319||52321<=a&&a<=52347||52349<=a&&a<=52375||52377<=a&&a<=52403||52405<=a&&a<=52431||52433<=a&&a<=52459||52461<=a&&a<=52487||52489<=a&&a<=52515||52517<=a&&a<=52543||52545<=a&&a<=52571||52573<=a&&a<=52599||52601<=a&&a<=52627||52629<=a&&a<=52655||52657<=a&&a<=52683||52685<=a&&a<=52711||52713<=a&&a<=52739||52741<=a&&a<=52767||52769<=a&&a<=52795||52797<=a&&a<=52823||52825<=a&&a<=52851||52853<=a&&a<=52879||52881<=a&&a<=52907||52909<=a&&a<=52935||52937<=a&&a<=52963||52965<=a&&a<=52991||52993<=a&&a<=53019||53021<=a&&a<=53047||53049<=a&&a<=53075||53077<=a&&a<=53103||53105<=a&&a<=53131||53133<=a&&a<=53159||53161<=a&&a<=53187||53189<=a&&a<=53215||53217<=a&&a<=53243||53245<=a&&a<=53271||53273<=a&&a<=53299||53301<=a&&a<=53327||53329<=a&&a<=53355||53357<=a&&a<=53383||53385<=a&&a<=53411||53413<=a&&a<=53439||53441<=a&&a<=53467||53469<=a&&a<=53495||53497<=a&&a<=53523||53525<=a&&a<=53551||53553<=a&&a<=53579||53581<=a&&a<=53607||53609<=a&&a<=53635||53637<=a&&a<=53663||53665<=a&&a<=53691||53693<=a&&a<=53719||53721<=a&&a<=53747||53749<=a&&a<=53775||53777<=a&&a<=53803||53805<=a&&a<=53831||53833<=a&&a<=53859||53861<=a&&a<=53887||53889<=a&&a<=53915||53917<=a&&a<=53943||53945<=a&&a<=53971||53973<=a&&a<=53999||54001<=a&&a<=54027||54029<=a&&a<=54055||54057<=a&&a<=54083||54085<=a&&a<=54111||54113<=a&&a<=54139||54141<=a&&a<=54167||54169<=a&&a<=54195||54197<=a&&a<=54223||54225<=a&&a<=54251||54253<=a&&a<=54279||54281<=a&&a<=54307||54309<=a&&a<=54335||54337<=a&&a<=54363||54365<=a&&a<=54391||54393<=a&&a<=54419||54421<=a&&a<=54447||54449<=a&&a<=54475||54477<=a&&a<=54503||54505<=a&&a<=54531||54533<=a&&a<=54559||54561<=a&&a<=54587||54589<=a&&a<=54615||54617<=a&&a<=54643||54645<=a&&a<=54671||54673<=a&&a<=54699||54701<=a&&a<=54727||54729<=a&&a<=54755||54757<=a&&a<=54783||54785<=a&&a<=54811||54813<=a&&a<=54839||54841<=a&&a<=54867||54869<=a&&a<=54895||54897<=a&&a<=54923||54925<=a&&a<=54951||54953<=a&&a<=54979||54981<=a&&a<=55007||55009<=a&&a<=55035||55037<=a&&a<=55063||55065<=a&&a<=55091||55093<=a&&a<=55119||55121<=a&&a<=55147||55149<=a&&a<=55175||55177<=a&&a<=55203?10:9757==a||9977==a||9994<=a&&a<=9997||127877==a||127938<=a&&a<=127940||127943==a||127946<=a&&a<=127948||128066<=a&&a<=128067||128070<=a&&a<=128080||128110==a||128112<=a&&a<=128120||128124==a||128129<=a&&a<=128131||128133<=a&&a<=128135||128170==a||128372<=a&&a<=128373||128378==a||128400==a||128405<=a&&a<=128406||128581<=a&&a<=128583||128587<=a&&a<=128591||128675==a||128692<=a&&a<=128694||128704==a||128716==a||129304<=a&&a<=129308||129310<=a&&a<=129311||129318==a||129328<=a&&a<=129337||129341<=a&&a<=129342||129489<=a&&a<=129501?n:127995<=a&&a<=127999?14:8205==a?15:9792==a||9794==a||9877<=a&&a<=9878||9992==a||10084==a||127752==a||127806==a||127859==a||127891==a||127908==a||127912==a||127979==a||127981==a||128139==a||128187<=a&&a<=128188||128295==a||128300==a||128488==a||128640==a||128658==a?r:128102<=a&&a<=128105?o:11}return this.nextBreak=function(e,t){if(void 0===t&&(t=0),t<0)return 0;if(t>=e.length-1)return e.length;for(var i=u(s(e,t)),n=[],r=t+1;r<e.length;r++)if(!a(e,r-1)){var o=u(s(e,r));if(l(i,n,o))return r;n.push(o)}return e.length},this.splitGraphemes=function(e){for(var t,i=[],n=0;(t=this.nextBreak(e,n))<e.length;)i.push(e.slice(n,t)),n=t;return n<e.length&&i.push(e.slice(n)),i},this.iterateGraphemes=function(e){var t=0,i={next:function(){var i,n;return(n=this.nextBreak(e,t))<e.length?(i=e.slice(t,n),t=n,{value:i,done:!1}):t<e.length?(i=e.slice(t),t=e.length,{value:i,done:!1}):{value:void 0,done:!0}}.bind(this)};return typeof Symbol<"u"&&Symbol.iterator&&(i[Symbol.iterator]=function(){return i}),i},this.countGraphemes=function(e){for(var t,i=0,n=0;(t=this.nextBreak(e,n))<e.length;)n=t,i++;return n<e.length&&i++,i},this}function ye$g(){this.textureInfo=void 0,this.dimensions=void 0,this.billboard=void 0}function ve$e(e,t,i){this.labelCollection=e,this.index=t,this.dimensions=i}var xe$n=1.2,le$k="ID_WHITE_PIXEL",Z$y=new r$T(4,4),me$k=new n$13(1,1,1,1);function we$e(e,t){var i=document.createElement("canvas");i.width=Z$y.x,i.height=Z$y.y;var n=i.getContext("2d");n.fillStyle="#fff",n.fillRect(0,0,i.width,i.height),e.addImage(le$k,i).then((function(e){t._whitePixelIndex=e}))}var L$y={};function Ie$g(e,t,i,n,r,o,a){return L$y.font=t,L$y.fillColor=i,L$y.strokeColor=n,L$y.strokeWidth=r,L$y.padding=F$y.PADDING,a===j$10.CENTER?L$y.textBaseline="middle":a===j$10.TOP?L$y.textBaseline="top":L$y.textBaseline="bottom",L$y.fill=o===z$t.FILL||o===z$t.FILL_AND_OUTLINE,L$y.stroke=o===z$t.OUTLINE||o===z$t.FILL_AND_OUTLINE,L$y.backgroundColor=e$1z.BLACK,y$N(e,L$y)}function J$z(e,t){t.textureInfo=void 0,t.dimensions=void 0;var i=t.billboard;t$$(i)&&(i.show=!1,i.image=void 0,t$$(i._removeCallbackFunc)&&(i._removeCallbackFunc(),i._removeCallbackFunc=void 0),e._spareBillboards.push(i),t.billboard=void 0)}function Ce$g(e,t,i,n){e.addImage(t,i).then((function(e){n.index=e}))}var Te$i=new Z$z,q$C=new a$11;function De$m(e,t){var i,n,r,o=t._renderedText,a=Te$i.splitGraphemes(o),s=a.length,l=t._glyphs,u=l.length;if(t._relativeSize=t._fontSize/F$y.FONT_SIZE,s<u)for(n=s;n<u;++n)J$z(e,l[n]);l.length=s;var c=t._showBackground&&o.split("\n").join("").length>0,h=t._backgroundBillboard,d=e._backgroundBillboardCollection;c?(t$$(h)||(h=t$$(t._backgroundImage)?d.add({collection:e,image:t._backgroundImage}):d.add({collection:e,image:le$k,imageSubRegion:me$k}),t._backgroundBillboard=h),t$$(t._backgroundImage)||(h.color=t._backgroundColor),h.show=t._show,h.position=t._position,h.eyeOffset=t._eyeOffset,h.pixelOffset=t._pixelOffset,h.horizontalOrigin=N$W.LEFT,h.verticalOrigin=t._verticalOrigin,h.heightReference=t._heightReference,h.scale=t.totalScale,h.pickPrimitive=t,h.id=t._id,h.translucencyByDistance=t._translucencyByDistance,h.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,h.scaleByDistance=t._scaleByDistance,h.distanceDisplayCondition=t._distanceDisplayCondition,h.disableDepthTestDistance=t._disableDepthTestDistance):t$$(h)&&(d.remove(h),t._backgroundBillboard=h=void 0);var f=e._glyphTextureCache,p=[0],_=0;for(r=0;r<s;++r){var m=a[r],$=t._verticalOrigin,g=JSON.stringify([m,t._fontFamily,t._fontStyle,t._fontWeight,+$]),y=f[g];if(!t$$(y)){var v=Ie$g(m,t._fontStyle+" "+t._fontWeight+" "+F$y.FONT_SIZE+"px "+t._fontFamily,e$1z.WHITE,e$1z.WHITE,0,z$t.FILL,$);if(y=new ve$e(e,-1,v.dimensions),f[g]=y,v.width>0&&v.height>0){for(var x=F$x(v,{cutoff:F$y.CUTOFF,radius:F$y.RADIUS}),b=v.getContext("2d"),S=v.width,w=v.height,C=b.getImageData(0,0,S,w),T=0;T<S;T++)for(var P=0;P<w;P++){var E=P*S+T,A=255*x[E],L=4*E;C.data[L+0]=A,C.data[L+1]=A,C.data[L+2]=A,C.data[L+3]=A}b.putImageData(C,0,0)," "!==m&&Ce$g(e._textureAtlas,g,v,y)}}if("\n"===m?p[++_]=0:p[_]=Math.max(p[_],y.dimensions.height),t$$(i=l[r])?-1===y.index?J$z(e,i):t$$(i.textureInfo)&&(i.textureInfo=void 0):(i=new ye$g,l[r]=i),i.textureInfo=y,i.dimensions=y.dimensions,-1!==y.index){var M=i.billboard,I=e._spareBillboards;t$$(M)||(I.length>0?M=I.pop():((M=e._billboardCollection.add({collection:e}))._labelDimensions=new r$T,M._labelTranslate=new r$T),i.billboard=M),M.show=t._show,M.position=t._position,M.eyeOffset=t._eyeOffset,M.pixelOffset=t._pixelOffset,M.horizontalOrigin=N$W.LEFT,M.verticalOrigin=t._verticalOrigin,M._heightReference=t._heightReference,M.scale=t.totalScale,M.pickPrimitive=t,M.id=t._id,M.image=g,M.translucencyByDistance=t._translucencyByDistance,M.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,M.scaleByDistance=t._scaleByDistance,M.distanceDisplayCondition=t._distanceDisplayCondition,M.disableDepthTestDistance=t._disableDepthTestDistance,M._batchIndex=t._batchIndex,M.outlineColor=t.outlineColor,t.style===z$t.FILL_AND_OUTLINE?(M.color=t._fillColor,M.outlineWidth=t.outlineWidth):t.style===z$t.FILL?(M.color=t._fillColor,M.outlineWidth=0):t.style===z$t.OUTLINE&&(M.color=e$1z.TRANSPARENT,M.outlineWidth=t.outlineWidth)}}e._isMVT&&Oe$h(t,h,l,s,p),t._repositionAllGlyphs=!0}function Oe$h(e,t,i,n,r){for(var o=0,a=0;a<r.length;a++)o+=r[a];for(var s=0;s<n;++s){var l=i[s];if(t$$(l)&&t$$(l.billboard)){var u=l.billboard,c=.2*o;if(q$C.y=c,u.eyeOffset=q$C,t$$(e._associativeMvtBillboard)){var h=Math.max(e._associativeMvtBillboard._eyeOffset.y,q$C.y);e._associativeMvtBillboard.eyeOffset.y=u.eyeOffset.y=h}t$$(t)&&(t.eyeOffset=q$C)}}}function oe$k(e,t,i){return t===N$W.CENTER?-e/2:t===N$W.RIGHT?-(e+i.x):i.x}var y$B=new r$T,Ee$f=new r$T;function Be$g(e){var t,i,n,r=e._glyphs,o=e._renderedText,a=0,s=0,l=[],u=Number.NEGATIVE_INFINITY,c=0,h=1,d=r.length,f=e._backgroundBillboard,p=r$T.clone(t$$(f)?e._backgroundPadding:r$T.ZERO,Ee$f);for(p.x/=e._relativeSize,p.y/=e._relativeSize,n=0;n<d;++n)"\n"===o.charAt(n)?(l.push(a),++h,a=0):(i=(t=r[n]).dimensions,c=Math.max(c,i.height-i.descent),u=Math.max(u,i.descent),a+=i.width-i.bounds.minx,n<d-1&&(a+=r[n+1].dimensions.bounds.minx),s=Math.max(s,a));l.push(a);var _=c+u,m=e.totalScale,$=e._horizontalOrigin,g=e._verticalOrigin,y=0,v=l[y],x=oe$k(v,$,p),b=xe$n*_,S=b*(h-1),w=s,C=_+S;t$$(f)&&(w+=2*p.x,C+=2*p.y,f._labelHorizontalOrigin=$),y$B.x=x*m,y$B.y=0;var T=!0,P=0;for(n=0;n<d;++n)if("\n"===o.charAt(n))P+=b,x=oe$k(v=l[++y],$,p),y$B.x=x*m,T=!0;else if(i=(t=r[n]).dimensions,g===j$10.TOP?(y$B.y=i.height-c-p.y,y$B.y+=F$y.PADDING):g===j$10.CENTER?y$B.y=(S+i.height-c)/2:g===j$10.BASELINE?(y$B.y=S,y$B.y-=F$y.PADDING):(y$B.y=S+u+p.y,y$B.y-=F$y.PADDING),y$B.y=(y$B.y-i.descent-P)*m,T&&(y$B.x-=F$y.PADDING*m,T=!1),t$$(t.billboard)&&(t.billboard._setTranslate(y$B),t.billboard._labelDimensions.x=w,t.billboard._labelDimensions.y=C,t.billboard._labelHorizontalOrigin=$),n<d-1){var E=r[n+1];y$B.x+=(i.width-i.bounds.minx+E.dimensions.bounds.minx)*m}if(t$$(f)&&o.split("\n").join("").length>0&&(x=$===N$W.CENTER?-s/2-p.x:$===N$W.RIGHT?-(s+2*p.x):0,y$B.x=x*m,g===j$10.TOP?y$B.y=_-c-u:g===j$10.CENTER?y$B.y=(_-c)/2-u:g===j$10.BASELINE?y$B.y=-p.y-u:y$B.y=0,y$B.y=y$B.y*m,f.width=w,f.height=C,f._setTranslate(y$B),f._labelTranslate=r$T.clone(y$B,f._labelTranslate)),e.heightReference===U$Y.CLAMP_TO_GROUND)for(n=0;n<d;++n){var A=(t=r[n]).billboard;t$$(A)&&(A._labelTranslate=r$T.clone(y$B,A._labelTranslate))}}function se$f(e,t){for(var i=t._glyphs,n=0,r=i.length;n<r;++n)J$z(e,i[n]);t$$(t._backgroundBillboard)&&(e._backgroundBillboardCollection.remove(t._backgroundBillboard),t._backgroundBillboard=void 0),t._labelCollection=void 0,t$$(t._removeCallbackFunc)&&t._removeCallbackFunc(),s$1e(t)}function m$A(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._id=e.id,this._s3MlayerId=-1,this._scene=e.scene,this._isMVT=e.isMVT,this._batchTable=e.batchTable,this._textureAtlas=void 0,this._backgroundTextureAtlas=void 0,this._whitePixelIndex=void 0,this._swipeEnabled=e$1Y(e.swipeEnabled,!1),this._swipeRegion=e$1Y(e.swipeRegion,new n$13(0,0,1,1)),this._billboardMode=e$1Y(e.billboardMode,Cr$2.None),this._backgroundBillboardCollection=new O$t({scene:this._scene,isMVT:this._isMVT,depthTestEnable:e.depthTestEnable,swipeEnabled:this._swipeEnabled,swipeRegion:this._swipeRegion,billboardMode:this._billboardMode}),this._backgroundBillboardCollection.destroyTextureAtlas=!1,this._billboardCollection=new O$t({scene:this._scene,batchTable:this._batchTable,isMVT:this._isMVT,depthTestEnable:e.depthTestEnable,swipeEnabled:this._swipeEnabled,swipeRegion:this._swipeRegion,billboardMode:this._billboardMode}),this._billboardCollection.destroyTextureAtlas=!1,this._billboardCollection._sdf=!0,this._spareBillboards=[],this._glyphTextureCache={},this._labels=[],this._labelsToUpdate=[],this._totalGlyphCount=0,this._highlightColor=e$1z.clone(e$1z.WHITE),this.modelMatrix=c$1a.clone(e$1Y(e.modelMatrix,c$1a.IDENTITY)),this.debugShowBoundingVolume=e$1Y(e.debugShowBoundingVolume,!1),this.blendOption=e$1Y(e.blendOption,S$t.OPAQUE_AND_TRANSLUCENT),this._isS3MTileLabels=e$1Y(e.isS3MTileLabels,!1),this._labelsID={},this._pickedlabelsID=[],this._isPicked=!1,this._selectedColor=e$1z.clone(e$1Y(e.selectedColor,new e$1z(.7,.7,1,1))),this._labelSelected=new o$15,this._visibleViewport=4095}function ne$i(e){return e.coord.x}function re$m(e){return e.coord.y}function ae$k(e,t,i,n,r,o){var a=e,s=t;return r===j$10.CENTER?s+=n/2:r===j$10.TOP&&(s+=n),o===N$W.CENTER?a-=i/2:o===N$W.RIGHT&&(a-=i),{x:a,y:s}}function d$A(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=c$18.defer(),this._resolvedPromise=!1}function G$B(e,t){var i=e._rectangle,n=e._minHeight,r=e._maxHeight,o=2+s$1p.packedLength+n$1c.packedLength,a=new Float64Array(o),s=0;return a[s++]=n,a[s++]=r,s$1p.pack(i,a,s),s+=s$1p.packedLength,n$1c.pack(t,a,s),a}Object.defineProperties(m$A.prototype,{length:{get:function(){return this._labels.length}},s3MlayerId:{get:function(){return this._s3MlayerId},set:function(e){n$1e.defined("labelCollection Id value",e),this._s3MlayerId=e}},selectedColor:{get:function(){return this._selectedColor},set:function(e){n$1e.defined("selectedColor value",e),e$1z.clone(e,this._selectedColor)}},swipeRegion:{get:function(){return this._swipeRegion},set:function(e){if(!(t$$(e)&&e instanceof n$13))throw new t$_("Expected LabelCollection.swipeRegion to be type of BoundingRectangle.");n$13.equals(e,this._swipeRegion)||(n$13.clone(e,this._swipeRegion),this._billboardCollection.swipeRegion=this._swipeRegion,this._backgroundBillboardCollection.swipeRegion=this._swipeRegion)}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){n$1e.typeOf.bool("LabelCollection.swipeEnabled",e),e!==this._swipeEnabled&&(this._swipeEnabled=e,this._billboardCollection.swipeEnabled=e,this._backgroundBillboardCollection.swipeEnabled=e)}},billboardMode:{get:function(){return this._billboardMode}}}),m$A.prototype.add=function(e){e=e$1Y(e,{});var t=this._labels.length;e.index=t;var i=new b$O(e,this);return this._labels.push(i),this._labelsToUpdate.push(i),t$$(i.id)&&(this._labelsID[i.id]=i),i},m$A.prototype.remove=function(e){if(t$$(e)&&e._labelCollection===this){var t=this._labels.indexOf(e);if(-1!==t)return this._labels.splice(t,1),se$f(this,e),t$$(e.id)&&Object.keys(this._labelsID).length>0&&delete this._labelsID[e.id],!0}return!1},m$A.prototype.removeAll=function(){for(var e=this._labels,t=0,i=e.length;t<i;++t)se$f(this,e[t]);e.length=0,this._labelsID={},this._pickedlabelsID.length=0,this._isPicked=!1},m$A.prototype.contains=function(e){return t$$(e)&&e._labelCollection===this},m$A.prototype.containsLabel=function(e){return this._labelsID.hasOwnProperty(e)},m$A.prototype.get=function(e){if(!t$$(e))throw new t$_("index is required.");return this._labels[e]},m$A.prototype.getById=function(e){if(!t$$(e))throw new t$_("id is required.");return t$$(this._labelsID[e])?this._labelsID[e]:null},m$A.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$_("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},m$A.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$_("the index is 0~8");return 1<<e&this._visibleViewport},m$A.prototype.update=function(e,t,i){if(e.multiViewportIndex>-1&&this._labels.length>0){if(t$$(this._labels[0]._id)&&t$$(this._labels[0]._id.entityCollection)){var n=this._labels[0]._id.entityCollection.owner;if(typeof n.getVisibleInViewport<"u")if(!n.getVisibleInViewport(e.multiViewportIndex))return}if(!this.getVisibleInViewport(e.multiViewportIndex))return}var r=this._billboardCollection,o=this._backgroundBillboardCollection;r.modelMatrix=this.modelMatrix,r.debugShowBoundingVolume=this.debugShowBoundingVolume,o.modelMatrix=this.modelMatrix,o.debugShowBoundingVolume=this.debugShowBoundingVolume;t=e.context;t$$(this._textureAtlas)||(this._textureAtlas=new _$z({context:t}),r.textureAtlas=this._textureAtlas),t$$(this._backgroundTextureAtlas)||(this._backgroundTextureAtlas=new _$z({context:t,initialSize:Z$y}),o.textureAtlas=this._backgroundTextureAtlas,we$e(this._backgroundTextureAtlas,this));for(var a=this._labelsToUpdate.length,s=0;s<a;++s){var l=this._labelsToUpdate[s];if(!l.isDestroyed()){var u=l._glyphs.length;l._rebindAllGlyphs&&(De$m(this,l),l._rebindAllGlyphs=!1),l._repositionAllGlyphs&&(Be$g(l),l._repositionAllGlyphs=!1),l.computeLocalScreenSpaceBoundingBox(l,l._localScreenSpaceBBox);var c=l._glyphs.length-u;this._totalGlyphCount+=c}}var h=o.length>0?S$t.TRANSLUCENT:this.blendOption;r.blendOption=h,o.blendOption=h,r._highlightColor=this._highlightColor,o._highlightColor=this._highlightColor,this._labelsToUpdate.length=0,o.update(e,t,i),r.update(e,t,i)},m$A.prototype.isDestroyed=function(){return!1},m$A.prototype.destroy=function(){return this.removeAll(),this._billboardCollection=this._billboardCollection.destroy(),this._textureAtlas=this._textureAtlas&&this._textureAtlas.destroy(),this._backgroundBillboardCollection=this._backgroundBillboardCollection.destroy(),this._backgroundTextureAtlas=this._backgroundTextureAtlas&&this._backgroundTextureAtlas.destroy(),s$1e(this)},m$A.prototype.setLabelStyle=function(e){for(var t=this._labels.length,i=0;i<t;++i){var n=this._labels[i];n.isDestroyed()||n.setLabelStyle(e)}},m$A.prototype.setLabelVisible=function(e,t){if(!t$$(e))throw new t$_("index is required.");this._labels[e].show=t},m$A.prototype.setAllLabelsVisible=function(e){for(var t=this._labels.length,i=0;i<t;++i){var n=this._labels[i];n.isDestroyed()||(n.show=e)}},m$A.prototype.setVisibleIndex=function(e){for(var t={},i=0,n=e.length;i<n;i++)t[e[i]]=!0;for(var r in this._labelsID)t$$(t[r])?this._labelsID[r].show=!0:this._labelsID[r].show=!1},m$A.prototype.setVisibleLabels=function(e){if(0!==e.length&&0!==this._labels.length){for(var t=this._scene._view.viewport,i=t.x,n=t.x+t.width,r=t.y,o=t.y+t.height,a=[],s=0,l=e.length;s<l;++s){var u=e[s];if(t$$(this._labelsID[u])){var c,h=(_=this._labelsID[u]).computeScreenSpacePosition(this._scene,c);!t$$(h)||h.x>=i&&h.x<=n&&h.y>=r&&h.y<=o&&a.push({index:u,clustered:!0,coord:h})}}var d=N$y(a,ne$i,re$m,4096,Int32Array),f=[],p=a.length;for(s=0;s<p;++s){for(var _,m=a[s],$=m.index,g=m.coord,y=(_=this._labelsID[$]).getScreenSpaceBoundingBox(_,g,c),v=d.intersect(y.x,y.y,y.x+y.width,y.y+y.height),x=v.length,b=0,S=0;S<x;++S){var w=v[S],C=a[w];s!==w&&!C.clustered&&++b}b<1&&(m.clustered=!1,f.push($))}this.setVisibleIndex(f)}},m$A.prototype.meetVisible=function(){var e=this._scene._view.viewport,t=this._scene.mapProjection.ellipsoid,i=this._scene.camera.positionWC,n=new c$15(t,i),r=e.x,o=e.x+e.width,a=e.y,s=e.y+e.height,l=[],u=this;this._labels.map((function(e){e.isOverlap=!1,e.computeScreenSpacePosition(u._scene);var t=e._screenSpacePosition;!!n.isPointVisible(e.position)&&t.x>=r&&t.x<=o&&t.y>=a&&t.y<=s?l.push({label:e,clustered:!1,coord:t}):e.isOverlap=!0})),l.sort(((e,t)=>{var n=e.label,r=t.label;return n._fontSize===r._fontSize?n._mvtMinLevel===r._mvtMinLevel?r$T.distanceSquared(i,n.position)-r$T.distanceSquared(i,r.position):n._mvtMinLevel-r._mvtMinLevel:r._fontSize-n._fontSize}));for(var c=[],h=0;h<l.length;h++){var d=($=l[h]).coord,f=(g=$.label)._localScreenSpaceBBox,p=ae$k(d.x,d.y,f.width,f.height,g.verticalOrigin,g.horizontalOrigin);c.push({label:g,clustered:!1,coord:new r$T(p.x,p.y),center:$}),c.push({label:g,clustered:!1,coord:new r$T(p.x+f.width,p.y),center:$}),c.push({label:g,clustered:!1,coord:new r$T(p.x,p.y+f.height),center:$}),c.push({label:g,clustered:!1,coord:new r$T(p.x+f.width,p.y+f.height),center:$})}var _=N$y(c,ne$i,re$m,512,Float32Array),m=l.length;for(h=0;h<m;++h){var $,g=($=l[h]).label;if(!$.clustered){d=$.coord,f=g._localScreenSpaceBBox,p=ae$k(d.x,d.y,f.width,f.height,g.verticalOrigin,g.horizontalOrigin);for(var y=_.range(p.x,p.y,p.x+f.width,p.y+f.height),v=y.length,x=0;x<v;++x){var b=y[x];if(Math.floor(b/4)!==h){var S=c[b];S.center.clustered=!0,S.center.label.isOverlap=!0}}}}},m$A.prototype.setSelection=function(e){if(this.releaseSelection(),0!==Object.keys(this._labelsID).length){if(this._labelsID.hasOwnProperty(e)){var t=this._labelsID[e];if(t.isDestroyed())return;if(t.id===e){t.isPicked=!0;var i=e$1z.clone(this._selectedColor);t.fillColor=i,this._pickedlabelsID.push(e),this._labelSelected.raiseEvent({id:t.id,text:t.text,scale:t.scale,font:t.font,fillColor:t.fillColor})}}this._isPicked=!0}},m$A.prototype.releaseSelection=function(){if(this._isPicked&&0!==Object.keys(this._labelsID).length){for(var e=this._pickedlabelsID.length,t=0;t<e;++t){var i=this._pickedlabelsID[t];if(this._labelsID.hasOwnProperty(i)){var n=this._labelsID[i];n.isDestroyed()||(n.isPicked&&n.restFillColor(),n.isPicked=!1)}}this._pickedlabelsID=[]}},Object.defineProperties(d$A.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 q$B=new o$_("createVectorTilePoints"),J$y=new a$11;function K$s(e,t){if(!t$$(e._billboardCollection)){var i;if(!t$$(e._verticesPromise)){i=e._positions;var n=e._packedBuffer;t$$(n)||(i=e._positions=l$Z(i),e._batchIds=l$Z(e._batchIds),n=e._packedBuffer=G$B(e,t));var r=[i.buffer,n.buffer],o={positions:i.buffer,packedBuffer:n.buffer},a=e._verticesPromise=q$B.scheduleTask(o,r);if(!t$$(a))return;a.then((function(t){e._positions=new Float64Array(t.positions),e._ready=!0}))}if(e._ready&&!t$$(e._billboardCollection)){i=e._positions;var s=e._batchTable,l=e._batchIds,u=e._billboardCollection=new O$t({batchTable:s}),c=e._labelCollection=new m$A({batchTable:s}),h=e._polylineCollection=new W$P;h._useHighlightColor=!0;for(var d=i.length/3,f=0;f<d;++f){var p=l[f],_=a$11.unpack(i,3*f,J$y),m=u.add();m.position=_,m._batchIndex=p;var $=c.add();$.text=" ",$.position=_,$._batchIndex=p,h.add().positions=[a$11.clone(_),a$11.clone(_)]}e._positions=void 0,e._packedBuffer=void 0}}}function M$D(e,t){for(var i=e._batchIds,n=i.length,r=0;r<n;++r){var o=t[i[r]];o.show=!0,o.pointSize=i$C.defaultPointSize,o.color=i$C.defaultColor,o.pointOutlineColor=i$C.defaultPointOutlineColor,o.pointOutlineWidth=i$C.defaultPointOutlineWidth,o.labelColor=e$1z.WHITE,o.labelOutlineColor=e$1z.WHITE,o.labelOutlineWidth=1,o.font="30px sans-serif",o.labelStyle=z$t.FILL,o.labelText=void 0,o.backgroundColor=new e$1z(.165,.165,.165,.8),o.backgroundPadding=new r$T(7,5),o.backgroundEnabled=!1,o.scaleByDistance=void 0,o.translucencyByDistance=void 0,o.distanceDisplayCondition=void 0,o.heightOffset=0,o.anchorLineEnabled=!1,o.anchorLineColor=e$1z.WHITE,o.image=void 0,o.disableDepthTestDistance=0,o.horizontalOrigin=N$W.CENTER,o.verticalOrigin=j$10.CENTER,o.labelHorizontalOrigin=N$W.RIGHT,o.labelVerticalOrigin=j$10.BASELINE}}d$A.prototype.createFeatures=function(e,t){for(var i=this._billboardCollection,n=this._labelCollection,r=this._polylineCollection,o=this._batchIds,a=o.length,s=0;s<a;++s){var l=o[s],u=i.get(s),c=n.get(s),h=r.get(s);t[l]=new i$C(e,l,u,c,h)}},d$A.prototype.applyDebugSettings=function(e,t){e?(e$1z.clone(t,this._billboardCollection._highlightColor),e$1z.clone(t,this._labelCollection._highlightColor),e$1z.clone(t,this._polylineCollection._highlightColor)):(e$1z.clone(e$1z.WHITE,this._billboardCollection._highlightColor),e$1z.clone(e$1z.WHITE,this._labelCollection._highlightColor),e$1z.clone(e$1z.WHITE,this._polylineCollection._highlightColor))};var Q$v=new e$1z,U$D=new e$1z,X$q=new e$1z,Y$x=new e$1z,Z$x=new e$1z,$$y=new e$1z,p$J=new u$W,f$D=new u$W,D$C=new e$1w;function s$A(e){this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._counts=e.counts,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._batchedPositions=void 0,this._transferrableBatchIds=void 0,this._vertexBatchIds=void 0,this._ellipsoid=e$1Y(e.ellipsoid,n$1c.WGS84),this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._polygonMinimumHeights=e.polygonMinimumHeights,this._polygonMaximumHeights=e.polygonMaximumHeights,this._center=e$1Y(e.center,a$11.ZERO),this._rectangle=e.rectangle,this._center=void 0,this._boundingVolume=e.boundingVolume,this._boundingVolumes=void 0,this._batchedIndices=void 0,this._ready=!1,this._readyPromise=c$18.defer(),this._verticesPromise=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=_0x29401c.BOTH}function U$C(e){var t=new Float64Array(3+a$11.packedLength+n$1c.packedLength+s$1p.packedLength),i=0;return t[i++]=e._indices.BYTES_PER_ELEMENT,t[i++]=e._minimumHeight,t[i++]=e._maximumHeight,a$11.pack(e._center,t,i),i+=a$11.packedLength,n$1c.pack(e._ellipsoid,t,i),i+=n$1c.packedLength,s$1p.pack(e._rectangle,t,i),t}function E$B(e,t){for(var i=1,n=t[i++],r=e._boundingVolumes=new Array(n),o=0;o<n;++o)r[o]=b$1o.unpack(t,i),i+=b$1o.packedLength;for(var a=t[i++],s=e._batchedIndices=new Array(a),l=0;l<a;++l){var u=e$1z.unpack(t,i);i+=e$1z.packedLength;for(var c=t[i++],h=t[i++],d=t[i++],f=new Array(d),p=0;p<d;++p)f[p]=t[i++];s[l]=new s$F({color:u,offset:c,count:h,batchIds:f})}}d$A.prototype.applyStyle=function(e,t){if(t$$(e))for(var i=this._batchIds,n=i.length,r=0;r<n;++r){var o=t[i[r]];if(t$$(e.show)&&(o.show=e.show.evaluate(o)),t$$(e.pointSize)&&(o.pointSize=e.pointSize.evaluate(o)),t$$(e.color)&&(o.color=e.color.evaluateColor(o,Q$v)),t$$(e.pointOutlineColor)&&(o.pointOutlineColor=e.pointOutlineColor.evaluateColor(o,U$D)),t$$(e.pointOutlineWidth)&&(o.pointOutlineWidth=e.pointOutlineWidth.evaluate(o)),t$$(e.labelColor)&&(o.labelColor=e.labelColor.evaluateColor(o,X$q)),t$$(e.labelOutlineColor)&&(o.labelOutlineColor=e.labelOutlineColor.evaluateColor(o,Y$x)),t$$(e.labelOutlineWidth)&&(o.labelOutlineWidth=e.labelOutlineWidth.evaluate(o)),t$$(e.font)&&(o.font=e.font.evaluate(o)),t$$(e.labelStyle)&&(o.labelStyle=e.labelStyle.evaluate(o)),t$$(e.labelText)?o.labelText=e.labelText.evaluate(o):o.labelText=void 0,t$$(e.backgroundColor)&&(o.backgroundColor=e.backgroundColor.evaluateColor(o,Z$x)),t$$(e.backgroundPadding)&&(o.backgroundPadding=e.backgroundPadding.evaluate(o)),t$$(e.backgroundEnabled)&&(o.backgroundEnabled=e.backgroundEnabled.evaluate(o)),t$$(e.scaleByDistance)){var a=e.scaleByDistance.evaluate(o);p$J.near=a.x,p$J.nearValue=a.y,p$J.far=a.z,p$J.farValue=a.w,o.scaleByDistance=p$J}else o.scaleByDistance=void 0;if(t$$(e.translucencyByDistance)){var s=e.translucencyByDistance.evaluate(o);f$D.near=s.x,f$D.nearValue=s.y,f$D.far=s.z,f$D.farValue=s.w,o.translucencyByDistance=f$D}else o.translucencyByDistance=void 0;if(t$$(e.distanceDisplayCondition)){var l=e.distanceDisplayCondition.evaluate(o);D$C.near=l.x,D$C.far=l.y,o.distanceDisplayCondition=D$C}else o.distanceDisplayCondition=void 0;t$$(e.heightOffset)&&(o.heightOffset=e.heightOffset.evaluate(o)),t$$(e.anchorLineEnabled)&&(o.anchorLineEnabled=e.anchorLineEnabled.evaluate(o)),t$$(e.anchorLineColor)&&(o.anchorLineColor=e.anchorLineColor.evaluateColor(o,$$y)),t$$(e.image)?o.image=e.image.evaluate(o):o.image=void 0,t$$(e.disableDepthTestDistance)&&(o.disableDepthTestDistance=e.disableDepthTestDistance.evaluate(o)),t$$(e.horizontalOrigin)&&(o.horizontalOrigin=e.horizontalOrigin.evaluate(o)),t$$(e.verticalOrigin)&&(o.verticalOrigin=e.verticalOrigin.evaluate(o)),t$$(e.labelHorizontalOrigin)&&(o.labelHorizontalOrigin=e.labelHorizontalOrigin.evaluate(o)),t$$(e.labelVerticalOrigin)&&(o.labelVerticalOrigin=e.labelVerticalOrigin.evaluate(o))}else M$D(this,t)},d$A.prototype.update=function(e){K$s(this,e.mapProjection.ellipsoid),this._ready&&(this._polylineCollection.update(e),this._billboardCollection.update(e),this._labelCollection.update(e),this._resolvedPromise||(this._readyPromise.resolve(),this._resolvedPromise=!0))},d$A.prototype.isDestroyed=function(){return!1},d$A.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._polylineCollection=this._polylineCollection&&this._polylineCollection.destroy(),s$1e(this)},Object.defineProperties(s$A.prototype,{trianglesLength:{get:function(){return t$$(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return t$$(this._primitive)?this._primitive.geometryByteLength:0}},readyPromise:{get:function(){return this._readyPromise.promise}}});var R$s=new o$_("createVectorTilePolygons"),F$w=new e$1z;function W$E(e){if(!t$$(e._primitive)){if(!t$$(e._verticesPromise)){var t=e._positions,i=e._counts,n=e._indexCounts,r=e._indices,o=e._transferrableBatchIds,a=e._batchTableColors,s=e._packedBuffer;if(!t$$(a)){t=e._positions=l$Z(e._positions),i=e._counts=l$Z(e._counts),n=e._indexCounts=l$Z(e._indexCounts),r=e._indices=l$Z(e._indices),e._center=e._ellipsoid.cartographicToCartesian(s$1p.center(e._rectangle)),o=e._transferrableBatchIds=new Uint32Array(e._batchIds),a=e._batchTableColors=new Uint32Array(o.length);for(var l=e._batchTable,u=a.length,c=0;c<u;++c){var h=l.getColor(c,F$w);a[c]=h.toRgba()}s=e._packedBuffer=U$C(e)}var d=[t.buffer,i.buffer,n.buffer,r.buffer,o.buffer,a.buffer,s.buffer],f={packedBuffer:s.buffer,positions:t.buffer,counts:i.buffer,indexCounts:n.buffer,indices:r.buffer,batchIds:o.buffer,batchTableColors:a.buffer},p=e._polygonMinimumHeights,_=e._polygonMaximumHeights;t$$(p)&&t$$(_)&&(p=l$Z(p),_=l$Z(_),d.push(p.buffer,_.buffer),f.minimumHeights=p,f.maximumHeights=_);var m=e._verticesPromise=R$s.scheduleTask(f,d);if(!t$$(m))return;c$18(m,(function(t){e._positions=void 0,e._counts=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0;var i=new Float64Array(t.packedBuffer),n=i[0];E$B(e,i),e._indices=2===fe$u.getSizeInBytes(n)?new Uint16Array(t.indices):new Uint32Array(t.indices),e._indexOffsets=new Uint32Array(t.indexOffsets),e._indexCounts=new Uint32Array(t.indexCounts),e._batchedPositions=new Float32Array(t.positions),e._vertexBatchIds=new Uint16Array(t.batchIds),e._ready=!0}))}e._ready&&!t$$(e._primitive)&&(e._primitive=new T$H({batchTable:e._batchTable,positions:e._batchedPositions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center}),e._batchTable=void 0,e._batchIds=void 0,e._positions=void 0,e._counts=void 0,e._indices=void 0,e._indexCounts=void 0,e._indexOffsets=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0,e._center=void 0,e._rectangle=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0,e._verticesPromise=void 0,e._readyPromise.resolve())}}s$A.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)},s$A.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)},s$A.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)},s$A.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},s$A.prototype.update=function(e){W$E(this),this._ready&&(this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e))},s$A.prototype.isDestroyed=function(){return!1},s$A.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),s$1e(this)};var $$x="attribute vec4 currentPosition;\nattribute vec4 previousPosition;\nattribute vec4 nextPosition;\nattribute vec2 expandAndWidth;\nattribute float a_batchId;\nuniform mat4 u_modifiedModelView;\nvoid main()\n{\nfloat expandDir = expandAndWidth.x;\nfloat width = abs(expandAndWidth.y) + 0.5;\nbool usePrev = expandAndWidth.y < 0.0;\nvec4 p = u_modifiedModelView * currentPosition;\nvec4 prev = u_modifiedModelView * previousPosition;\nvec4 next = u_modifiedModelView * nextPosition;\nfloat angle;\nvec4 positionWC = getPolylineWindowCoordinatesEC(p, prev, next, expandDir, width, usePrev, angle);\ngl_Position = czm_viewportOrthographic * positionWC;\n#ifdef LOG_DEPTH\nczm_vertexLogDepth(czm_projection * p);\n#endif\n}\n";function c$z(e){this._positions=e.positions,this._widths=e.widths,this._counts=e.counts,this._batchIds=e.batchIds,this._ellipsoid=e$1Y(e.ellipsoid,n$1c.WGS84),this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._center=e.center,this._rectangle=e.rectangle,this._boundingVolume=e.boundingVolume,this._batchTable=e.batchTable,this._va=void 0,this._sp=void 0,this._rs=void 0,this._uniformMap=void 0,this._command=void 0,this._transferrableBatchIds=void 0,this._packedBuffer=void 0,this._currentPositions=void 0,this._previousPositions=void 0,this._nextPositions=void 0,this._expandAndWidth=void 0,this._vertexBatchIds=void 0,this._indices=void 0,this._constantColor=e$1z.clone(e$1z.WHITE),this._highlightColor=this._constantColor,this._trianglesLength=0,this._geometryByteLength=0,this._ready=!1,this._readyPromise=c$18.defer(),this._verticesPromise=void 0}function ie$k(e){var t=e._rectangle,i=e._minimumHeight,n=e._maximumHeight,r=e._ellipsoid,o=e._center,a=2+s$1p.packedLength+n$1c.packedLength+a$11.packedLength,s=new Float64Array(a),l=0;return s[l++]=i,s[l++]=n,s$1p.pack(t,s,l),l+=s$1p.packedLength,n$1c.pack(r,s,l),l+=n$1c.packedLength,a$11.pack(o,s,l),s}Object.defineProperties(c$z.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},readyPromise:{get:function(){return this._readyPromise.promise}}});var re$l=new o$_("createVectorTilePolylines"),p$I={previousPosition:0,currentPosition:1,nextPosition:2,expandAndWidth:3,a_batchId:4};function oe$j(e,t){if(!t$$(e._va)){if(!t$$(e._verticesPromise)){var i=e._positions,n=e._widths,r=e._counts,o=e._transferrableBatchIds,a=e._packedBuffer;t$$(a)||(i=e._positions=l$Z(i),n=e._widths=l$Z(n),r=e._counts=l$Z(r),o=e._transferrableBatchIds=l$Z(e._batchIds),a=e._packedBuffer=ie$k(e));var s=[i.buffer,n.buffer,r.buffer,o.buffer,a.buffer],l={positions:i.buffer,widths:n.buffer,counts:r.buffer,batchIds:o.buffer,packedBuffer:a.buffer},u=e._verticesPromise=re$l.scheduleTask(l,s);if(!t$$(u))return;c$18(u,(function(t){e._currentPositions=new Float32Array(t.currentPositions),e._previousPositions=new Float32Array(t.previousPositions),e._nextPositions=new Float32Array(t.nextPositions),e._expandAndWidth=new Float32Array(t.expandAndWidth),e._vertexBatchIds=new Uint16Array(t.batchIds);var i=t.indexDatatype;e._indices=i===fe$u.UNSIGNED_SHORT?new Uint16Array(t.indices):new Uint32Array(t.indices),e._ready=!0}))}if(e._ready&&!t$$(e._va)){var c=e._currentPositions,h=e._previousPositions,d=e._nextPositions,f=e._expandAndWidth,p=e._vertexBatchIds,_=e._indices,m=h.byteLength+c.byteLength+d.byteLength;m+=f.byteLength+p.byteLength+_.byteLength,e._trianglesLength=_.length/3,e._geometryByteLength=m;var $=u$Y.createVertexBuffer({context:t,typedArray:h,usage:A$13.STATIC_DRAW}),g=u$Y.createVertexBuffer({context:t,typedArray:c,usage:A$13.STATIC_DRAW}),y=u$Y.createVertexBuffer({context:t,typedArray:d,usage:A$13.STATIC_DRAW}),v=u$Y.createVertexBuffer({context:t,typedArray:f,usage:A$13.STATIC_DRAW}),x=u$Y.createVertexBuffer({context:t,typedArray:p,usage:A$13.STATIC_DRAW}),b=u$Y.createIndexBuffer({context:t,typedArray:_,usage:A$13.STATIC_DRAW,indexDatatype:2===_.BYTES_PER_ELEMENT?fe$u.UNSIGNED_SHORT:fe$u.UNSIGNED_INT}),S=[{index:p$I.previousPosition,vertexBuffer:$,componentDatatype:C$12.FLOAT,componentsPerAttribute:3},{index:p$I.currentPosition,vertexBuffer:g,componentDatatype:C$12.FLOAT,componentsPerAttribute:3},{index:p$I.nextPosition,vertexBuffer:y,componentDatatype:C$12.FLOAT,componentsPerAttribute:3},{index:p$I.expandAndWidth,vertexBuffer:v,componentDatatype:C$12.FLOAT,componentsPerAttribute:2},{index:p$I.a_batchId,vertexBuffer:x,componentDatatype:C$12.UNSIGNED_SHORT,componentsPerAttribute:1}];e._va=new x$18({context:t,attributes:S,indexBuffer:b}),e._positions=void 0,e._widths=void 0,e._counts=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._rectangle=void 0,e._transferrableBatchIds=void 0,e._packedBuffer=void 0,e._currentPositions=void 0,e._previousPositions=void 0,e._nextPositions=void 0,e._expandAndWidth=void 0,e._vertexBatchIds=void 0,e._indices=void 0,e._readyPromise.resolve()}}}var v$z=new c$1a,W$D=new a$11;function ne$h(e,t){t$$(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){var i=t.uniformState.view;return c$1a.clone(i,v$z),c$1a.multiplyByPoint(v$z,e._center,W$D),c$1a.setTranslation(v$z,W$D,v$z),v$z},u_highlightColor:function(){return e._highlightColor}})}function se$e(e){if(!t$$(e._rs)){e._rs=p$1a.fromCache({blending:Ee$s.ALPHA_BLEND,depthMask:!1,depthTest:{enabled:!0},polygonOffset:{enabled:!0,factor:-5,units:-5}})}}var ae$j="uniform vec4 u_highlightColor; \nvoid main()\n{\n gl_FragColor = u_highlightColor;\n}\n";function de$f(e,t){if(!t$$(e._sp)){var i=e._batchTable,n=i.getVertexShaderCallback(!1,"a_batchId",void 0)($$x),r=i.getFragmentShaderCallback()(ae$j,!1,void 0),o=new a$O({defines:["VECTOR_TILE",o$$.isInternetExplorer()?"":"CLIP_POLYLINE"],sources:[Z$K,n]}),a=new a$O({defines:["VECTOR_TILE"],sources:[r]});e._sp=p$15.fromCache({context:t,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:p$I})}}function he$c(e,t){if(!t$$(e._command)){var i=e._batchTable.getUniformMapCallback()(e._uniformMap);e._command=new s$1d({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:i,boundingVolume:e._boundingVolume,pass:we$l.TRANSLUCENT,pickId:e._batchTable.getPickId()})}t.commandList.push(e._command)}function _e$b(e,t){for(var i=e._batchIds,n=i.length,r=0;r<n;++r){var o=t[i[r]];o.show=!0,o.color=e$1z.WHITE}}c$z.prototype.createFeatures=function(e,t){for(var i=this._batchIds,n=i.length,r=0;r<n;++r){var o=i[r];t[o]=new e$Z(e,o)}},c$z.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};var ce$d=new e$1z,fe$e=e$1z.WHITE,ue$c=!0;function u$C(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._polygons=void 0,this._polylines=void 0,this._points=void 0,this._contentReadyPromise=void 0,this._readyPromise=c$18.defer(),this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,ct$a(this,n,r)}function mt$7(e){return function(t,i){t$$(e._polygons)&&e._polygons.updateCommands(t,i)}}function bt$6(e,t){var i,n,r,o,a=e$1Y(e.POLYGONS_LENGTH,0),s=e$1Y(e.POLYLINES_LENGTH,0),l=e$1Y(e.POINTS_LENGTH,0);if(a>0&&t$$(e.POLYGON_BATCH_IDS)){var u=t.byteOffset+e.POLYGON_BATCH_IDS.byteOffset;i=new Uint16Array(t.buffer,u,a)}if(s>0&&t$$(e.POLYLINE_BATCH_IDS)){var c=t.byteOffset+e.POLYLINE_BATCH_IDS.byteOffset;n=new Uint16Array(t.buffer,c,s)}if(l>0&&t$$(e.POINT_BATCH_IDS)){var h=t.byteOffset+e.POINT_BATCH_IDS.byteOffset;r=new Uint16Array(t.buffer,h,l)}var d=t$$(i)||t$$(n)||t$$(r),f=a>0&&!t$$(i)||s>0&&!t$$(n)||l>0&&!t$$(r);if(d&&f)throw new t$Z("If one group of batch ids is defined, then all batch ids must be defined.");if(!t$$(i)&&!t$$(n)&&!t$$(r)){var p=0;if(!t$$(i)&&a>0)for(i=new Uint16Array(a),o=0;o<a;++o)i[o]=p++;if(!t$$(n)&&s>0)for(n=new Uint16Array(s),o=0;o<s;++o)n[o]=p++;if(!t$$(r)&&l>0)for(r=new Uint16Array(l),o=0;o<l;++o)r[o]=p++}return{polygons:i,polylines:n,points:r}}c$z.prototype.applyStyle=function(e,t){if(t$$(e))for(var i=this._batchIds,n=i.length,r=0;r<n;++r){var o=t[i[r]];o.color=t$$(e.color)?e.color.evaluateColor(o,ce$d):fe$e,o.show=t$$(e.show)?e.show.evaluate(o):ue$c}else _e$b(this,t)},c$z.prototype.update=function(e){var t=e.context;if(oe$j(this,t),ne$h(this,t),de$f(this,t),se$e(this),this._ready){var i=e.passes;(i.render||i.pick)&&he$c(this,e)}},c$z.prototype.isDestroyed=function(){return!1},c$z.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),s$1e(this)},Object.defineProperties(u$C.prototype,{featuresLength:{get:function(){return t$$(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return t$$(this._points)?this._points.pointsLength:0}},trianglesLength:{get:function(){var e=0;return t$$(this._polygons)&&(e+=this._polygons.trianglesLength),t$$(this._polylines)&&(e+=this._polylines.trianglesLength),e}},geometryByteLength:{get:function(){var e=0;return t$$(this._polygons)&&(e+=this._polygons.geometryByteLength),t$$(this._polylines)&&(e+=this._polylines.geometryByteLength),e}},texturesByteLength:{get:function(){return t$$(this._points)?this._points.texturesByteLength:0}},batchTableByteLength:{get:function(){return t$$(this._batchTable)?this._batchTable.memorySizeInBytes:0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var M$C=Uint16Array.BYTES_PER_ELEMENT,y$A=Uint32Array.BYTES_PER_ELEMENT;function ct$a(e,t,i){i=e$1Y(i,0);var n=new Uint8Array(t),r=new DataView(t);i+=y$A;var o=r.getUint32(i,!0);if(1!==o)throw new t$Z("Only Vector tile version 1 is supported. Version "+o+" is not.");i+=y$A;var a=r.getUint32(i,!0);if(i+=y$A,0!==a){var s=r.getUint32(i,!0);if(i+=y$A,0===s)throw new t$Z("Feature table must have a byte length greater than zero");var l=r.getUint32(i,!0);i+=y$A;var u=r.getUint32(i,!0);i+=y$A;var c=r.getUint32(i,!0);i+=y$A;var h=r.getUint32(i,!0);i+=y$A;var d=r.getUint32(i,!0);i+=y$A;var f=r.getUint32(i,!0);i+=y$A;var p=r.getUint32(i,!0),_=c$X(n,i+=y$A,s),m=JSON.parse(_);i+=s;var $,g,y=new Uint8Array(t,i,l);if(i+=l,u>0){var v=c$X(n,i,u);$=JSON.parse(v),i+=u,c>0&&(g=new Uint8Array(t,i,c),g=new Uint8Array(g),i+=c)}var x=e$1Y(m.POLYGONS_LENGTH,0),b=e$1Y(m.POLYLINES_LENGTH,0),S=e$1Y(m.POINTS_LENGTH,0),w=x+b+S,C=new p$Q(e,w,$,g,mt$7(e));if(e._batchTable=C,0!==w){var T,P,E;if(!t$$(m.REGION))throw new t$Z("REGION is required in the feature table.");var A=m.REGION;T=s$1p.unpack(A),P=A[4],E=A[5];var L,M=e._tile.computedTransform;t$$(m.RTC_CENTER)?(L=a$11.unpack(m.RTC_CENTER),c$1a.multiplyByPoint(M,L,L)):((L=s$1p.center(T)).height=n$1d.lerp(P,E,.5),L=n$1c.WGS84.cartographicToCartesian(L));var I=bt$6(m,y);if(i+=i%4,x>0){var O=new Uint32Array(t,i,h/y$A);i+=h;var D=new Uint16Array(t,i,d/M$C);i+=d;var R,N,F=y.byteOffset+m.POLYGON_COUNT.byteOffset,B=new Uint32Array(y.buffer,F,x),z=y.byteOffset+m.POLYGON_INDEX_COUNT.byteOffset,G=new Uint32Array(y.buffer,z,x);if(t$$(m.POLYGON_MINIMUM_HEIGHTS)&&t$$(m.POLYGON_MAXIMUM_HEIGHTS)){var k=y.byteOffset+m.POLYGON_MINIMUM_HEIGHTS.byteOffset;R=new Float32Array(y.buffer,k,x);var U=y.byteOffset+m.POLYGON_MAXIMUM_HEIGHTS.byteOffset;N=new Float32Array(y.buffer,U,x)}e._polygons=new s$A({positions:D,counts:B,indexCounts:G,indices:O,minimumHeight:P,maximumHeight:E,polygonMinimumHeights:R,polygonMaximumHeights:N,center:L,rectangle:T,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:C,batchIds:I.polygons,modelMatrix:M})}if(b>0){var V=new Uint16Array(t,i,f/M$C);i+=f;var W,H=y.byteOffset+m.POLYLINE_COUNT.byteOffset,Y=new Uint32Array(y.buffer,H,b);if(t$$(m.POLYLINE_WIDTHS)){var j=y.byteOffset+m.POLYLINE_WIDTHS.byteOffset;W=new Uint16Array(y.buffer,j,b)}else{W=new Uint16Array(b);for(var q=0;q<b;++q)W[q]=2}e._polylines=new c$z({positions:V,widths:W,counts:Y,batchIds:I.polylines,minimumHeight:P,maximumHeight:E,center:L,rectangle:T,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:C})}if(S>0){var X=new Uint16Array(t,i,p/M$C);e._points=new d$A({positions:X,batchIds:I.points,minimumHeight:P,maximumHeight:E,rectangle:T,batchTable:C})}}}else e._readyPromise.resolve(e)}function k$y(e){var t=e.featuresLength;if(!t$$(e._features)&&t>0){var i=new Array(t);t$$(e._polygons)&&e._polygons.createFeatures(e,i),t$$(e._polylines)&&e._polylines.createFeatures(e,i),t$$(e._points)&&e._points.createFeatures(e,i),e._features=i}}u$C.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},u$C.prototype.getFeature=function(e){var t=this.featuresLength;if(!t$$(e)||e<0||e>=t)throw new t$_("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return k$y(this),this._features[e]},u$C.prototype.applyDebugSettings=function(e,t){t$$(this._polygons)&&this._polygons.applyDebugSettings(e,t),t$$(this._polylines)&&this._polylines.applyDebugSettings(e,t),t$$(this._points)&&this._points.applyDebugSettings(e,t)},u$C.prototype.applyStyle=function(e){k$y(this),t$$(this._polygons)&&this._polygons.applyStyle(e,this._features),t$$(this._polylines)&&this._polylines.applyStyle(e,this._features),t$$(this._points)&&this._points.applyStyle(e,this._features)},u$C.prototype.update=function(e,t){var i=!0;if(t$$(this._polygons)&&(this._polygons.classificationType=this._tileset.classificationType,this._polygons.debugWireframe=this._tileset.debugWireframe,this._polygons.update(t),i=i&&this._polygons._ready),t$$(this._polylines)&&(this._polylines.update(t),i=i&&this._polylines._ready),t$$(this._points)&&(this._points.update(t),i=i&&this._points._ready),t$$(this._batchTable)&&i&&this._batchTable.update(e,t),!t$$(this._contentReadyPromise)){var n=t$$(this._points)?this._points.readyPromise:void 0,r=t$$(this._polygons)?this._polygons.readyPromise:void 0,o=t$$(this._polylines)?this._polylines.readyPromise:void 0,a=this;this._contentReadyPromise=c$18.all([n,r,o]).then((function(){a._readyPromise.resolve(a)}))}},u$C.prototype.isDestroyed=function(){return!1},u$C.prototype.destroy=function(){return this._polygons=this._polygons&&this._polygons.destroy(),this._polylines=this._polylines&&this._polylines.destroy(),this._points=this._points&&this._points.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),s$1e(this)};var m$z={b3dm:function(e,t,i,n,r){return new n$D(e,t,i,n,r)},pnts:function(e,t,i,n,r){return new a$x(e,t,i,n,r)},i3dm:function(e,t,i,n,r){return new h$F(e,t,i,n,r)},cmpt:function(e,t,i,n,r){return new i$D(e,t,i,n,r,m$z)},json:function(e,t,i,n,r){return new e$S(e,t,i,n,r)},geom:function(e,t,i,n,r){return new l$E(e,t,i,n,r)},vctr:function(e,t,i,n,r){return new u$C(e,t,i,n,r)}},e$O={UNLOADED:0,LOADING:1,PROCESSING:2,READY:3,EXPIRED:4,FAILED:5},X$p=Object.freeze(e$O),e$N={NOT_COMPUTED:-1,USE_OPTIMIZATION:1,SKIP_OPTIMIZATION:0},s$z=Object.freeze(e$N);function h$E(){}var u$B={stack:new e$1d,stackMaximumLength:0};function m$y(e){return e._visible&&e._inRequestVolume}function f$C(e){return e.hasEmptyContent||e.hasTilesetContent}function _$x(e){return!f$C(e)&&e.contentUnloaded}function g$s(e,t){return 0!==t.children.length&&(t.hasTilesetContent?!t.contentExpired:(t.hasEmptyContent,!0))}function v$y(e,t,i,n){for(var r=t.children,o=r.length,a=0;a<o;++a){var s=r[a];s.updateVisibility(n),m$y(s)&&i.push(s)}}function x$D(e,t){(_$x(t)||t.contentExpired)&&(t._priority=0,e._requestedTiles.push(t))}function b$N(e,t,i){t._touchedFrame!==i.frameNumber&&(e._cache.touch(t),t._touchedFrame=i.frameNumber)}function T$C(e){++e.statistics.visited}function k$x(e,t,i){t.contentAvailable&&t.contentVisibility(i)!==cr$4.OUTSIDE&&e._selectedTiles.push(t)}function R$r(){}function v$x(e){return e._visible&&e._inRequestVolume}h$E.selectTiles=function(e,t){e._selectedTiles.length=0,e._requestedTiles.length=0,e._hasMixedContent=!1;var i=!0,n=e.root;if(n.updateVisibility(t),!m$y(n))return i;var r=u$B.stack;for(r.push(e.root);r.length>0;){u$B.stackMaximumLength=Math.max(u$B.stackMaximumLength,r.length);var o=r.pop(),a=o.refine===l$D.ADD,s=o.refine===l$D.REPLACE,l=g$s(e,o);l&&v$y(e,o,r,t),(a||s&&!l)&&(x$D(e,o),b$N(e,o,t),k$x(e,o,t),!f$C(o)&&!o.contentAvailable&&(i=!1)),T$C(e)}return u$B.stack.trim(u$B.stackMaximumLength),i};var x$C={stack:new e$1d,stackMaximumLength:0},k$w={stack:new e$1d,stackMaximumLength:0},E$A={stack:new e$1d,stackMaximumLength:0},_$w={stack:new e$1d,stackMaximumLength:0,ancestorStack:new e$1d,ancestorStackMaximumLength:0},U$B=2;function I$G(e,t,i){W$C(e,t,e._maximumScreenSpaceError,e._maximumScreenSpaceError,i)}function Z$w(e,t,i){W$C(e,t,Number.MAX_VALUE,e._maximumScreenSpaceError,i),w$G(e,t,i)}function X$o(e,t,i){W$C(e,t,Math.max(e.baseScreenSpaceError,e.maximumScreenSpaceError),e.maximumScreenSpaceError,i),w$G(e,t,i)}function C$A(e){return e._skipLevelOfDetail}function z$s(e,t){e._emptyTiles.push(t)}function L$x(e,t,i){if(t.contentVisibility(i)!==cr$4.OUTSIDE){var n=t.content;n.featurePropertiesDirty?(n.featurePropertiesDirty=!1,t.lastStyleTime=0,e._selectedTilesToStyle.push(t)):t._selectedFrame<i.frameNumber-1&&e._selectedTilesToStyle.push(t),t._selectedFrame=i.frameNumber,e._selectedTiles.push(t)}}function j$B(e,t,i){var n=E$A.stack;for(n.push(t);n.length>0;){E$A.stackMaximumLength=Math.max(E$A.stackMaximumLength,n.length);for(var r=n.pop().children,o=r.length,a=0;a<o;++a){var s=r[a];v$x(s)&&(s.contentAvailable?(P$q(e,s,i),F$v(e,s,i),L$x(e,s,i)):s._depth-t._depth<U$B&&n.push(s))}}}function T$B(e,t,i){if(C$A(e)){var n=t.contentAvailable?t:t._ancestorWithContentAvailable;t$$(n)?n._shouldSelect=!0:j$B(e,t,i)}else t.contentAvailable&&L$x(e,t,i)}function B$s(e,t,i){++e._statistics.visited,t._visitedFrame=i.frameNumber}function F$v(e,t,i){t._touchedFrame!==i.frameNumber&&(e._cache.touch(t),t._touchedFrame=i.frameNumber)}function G$A(e,t){e._maximumPriority.distance=Math.max(t._priorityHolder._distanceToCamera,e._maximumPriority.distance),e._minimumPriority.distance=Math.min(t._priorityHolder._distanceToCamera,e._minimumPriority.distance),e._maximumPriority.depth=Math.max(t._depth,e._maximumPriority.depth),e._minimumPriority.depth=Math.min(t._depth,e._minimumPriority.depth),e._maximumPriority.foveatedFactor=Math.max(t._priorityHolder._foveatedFactor,e._maximumPriority.foveatedFactor),e._minimumPriority.foveatedFactor=Math.min(t._priorityHolder._foveatedFactor,e._minimumPriority.foveatedFactor),e._maximumPriority.reverseScreenSpaceError=Math.max(t._priorityReverseScreenSpaceError,e._maximumPriority.reverseScreenSpaceError),e._minimumPriority.reverseScreenSpaceError=Math.min(t._priorityReverseScreenSpaceError,e._minimumPriority.reverseScreenSpaceError)}function J$x(e,t,i){if(!e._cullRequestsWhileMoving)return!0;var n=t.boundingSphere,r=Math.max(2*n.radius,1),o=i.camera,a=0!==o.positionWCDeltaMagnitude?o.positionWCDeltaMagnitude:o.positionWCDeltaMagnitudeLastFrame;return e.cullRequestsWhileMovingMultiplier*a/r<1}function S$s(e,t,i){if(t._requestedFrame!==i.frameNumber&&(V$r(t)||t.contentExpired)&&J$x(e,t,i)){var n=i.camera.timeSinceMoved<e.foveatedTimeDelay;t.priorityDeferred&&n||(t._requestedFrame=i.frameNumber,e._requestedTiles.push(t))}}function N$x(e,t,i){t._updatedVisibilityFrame!==e._updatedVisibilityFrame&&(t.updateVisibility(i),t._updatedVisibilityFrame=e._updatedVisibilityFrame)}function K$r(e,t,i){for(var n=!1,r=t.children,o=r.length,a=0;a<o;++a){var s=r[a];N$x(e,s,i),n=n||v$x(s)}return n}function Q$u(e,t,i){var n=t.parent;return!(!t$$(n)||n.hasTilesetContent||n.refine!==l$D.ADD)&&t.getScreenSpaceError(i,!0)<=e._maximumScreenSpaceError}function q$A(e,t,i){if(N$x(e,t,i),v$x(t)){var n=t.children.length>0;if(t.hasTilesetContent&&n){var r=t.children[0];return q$A(e,r,i),void(t._visible=r._visible)}if(Q$u(e,t,i))return void(t._visible=!1);var o=t.refine===l$D.REPLACE,a=t._optimChildrenWithinParent===s$z.USE_OPTIMIZATION;if(o&&a&&n&&!K$r(e,t,i))return++e._statistics.numberOfTilesCulledWithChildrenUnion,void(t._visible=!1)}}function P$q(e,t,i){q$A(e,t,i),t.updateExpiration(),t._wasMinPriorityChild=!1,t._priorityHolder=t,G$A(e,t),t._shouldSelect=!1,t._finalResolution=!0}function Y$w(e,t){e._ancestorWithContent=void 0,e._ancestorWithContentAvailable=void 0;var i=e.parent;if(t$$(i)){var n=!V$r(i)||i._requestedFrame===t.frameNumber;e._ancestorWithContent=n?i:i._ancestorWithContent,e._ancestorWithContentAvailable=i.contentAvailable?i:i._ancestorWithContentAvailable}}function b$M(e){return e.hasEmptyContent||e.hasTilesetContent}function V$r(e){return!b$M(e)&&e.contentUnloaded}function $$w(e,t){var i=t._ancestorWithContent;return!e.immediatelyLoadDesiredLevelOfDetail&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf||t$$(i)&&t._screenSpaceError<i._screenSpaceError/e.skipScreenSpaceErrorFactor&&t._depth>i._depth+e.skipLevels)}function ee$n(e,t){return 0===t._distanceToCamera&&0===e._distanceToCamera?t._centerZDepth-e._centerZDepth:t._distanceToCamera-e._distanceToCamera}function re$k(e,t,i,n){var r,o=t.refine===l$D.REPLACE,a=t.children,s=a.length;for(r=0;r<s;++r)P$q(e,a[r],n);a.sort(ee$n);var l,u=!C$A(e)&&o&&!b$M(t),c=!0,h=!1,d=-1,f=Number.MAX_VALUE;for(r=0;r<s;++r)if(v$x(l=a[r])?(i.push(l),l._foveatedFactor<f&&(d=r,f=l._foveatedFactor),h=!0):(u||e.loadSiblings)&&(l._foveatedFactor<f&&(d=r,f=l._foveatedFactor),S$s(e,l,n),F$v(e,l,n)),u){var p;p=!!l._inRequestVolume&&(b$M(l)?ie$j(e,l,n):l.contentAvailable),c=c&&p}if(h||(c=!1),-1!==d&&!C$A(e)&&o){var _=a[d];_._wasMinPriorityChild=!0;var m=(t._wasMinPriorityChild||t===e.root)&&f<=t._priorityHolder._foveatedFactor?t._priorityHolder:t;for(m._foveatedFactor=Math.min(_._foveatedFactor,m._foveatedFactor),m._distanceToCamera=Math.min(_._distanceToCamera,m._distanceToCamera),r=0;r<s;++r)(l=a[r])._priorityHolder=m}return c}function te$l(e,t,i){return!C$A(e)||!e.immediatelyLoadDesiredLevelOfDetail&&(!t$$(t._ancestorWithContent)||(0===t._screenSpaceError?t.parent._screenSpaceError>i:t._screenSpaceError>i))}function A$F(e,t){return 0!==t.children.length&&(t.hasTilesetContent?!t.contentExpired:t._screenSpaceError>e._maximumScreenSpaceError)}function W$C(e,t,i,n,r){var o=x$C.stack;for(o.push(t);o.length>0;){x$C.stackMaximumLength=Math.max(x$C.stackMaximumLength,o.length);var a=o.pop();Y$w(a,r);var s=te$l(e,a,i),l=a.refine===l$D.ADD,u=a.refine===l$D.REPLACE,c=a.parent,h=!t$$(c)||c._refines,d=!1;A$F(e,a)&&(d=re$k(e,a,o,r)&&h);var f=!d&&h;b$M(a)?(z$s(e,a),S$s(e,a,r),f&&T$B(e,a,r)):l?(T$B(e,a,r),S$s(e,a,r)):u&&(s?(S$s(e,a,r),f&&T$B(e,a,r)):f?(T$B(e,a,r),S$s(e,a,r)):$$w(e,a)&&S$s(e,a,r)),B$s(e,a,r),F$v(e,a,r),a._refines=d}}function ie$j(e,t,i){var n=!0,r=k$w.stack;for(r.push(t);r.length>0;){k$w.stackMaximumLength=Math.max(k$w.stackMaximumLength,r.length);var o=r.pop(),a=o.children,s=a.length,l=b$M(o)&&A$F(e,o);if(!l&&!o.contentAvailable&&(n=!1),P$q(e,o,i),v$x(o)||(S$s(e,o,i),F$v(e,o,i)),l)for(var u=0;u<s;++u){var c=a[u];r.push(c)}}return n}function w$G(e,t,i){var n,r=_$w.stack,o=_$w.ancestorStack;for(r.push(t);r.length>0||o.length>0;){if(_$w.stackMaximumLength=Math.max(_$w.stackMaximumLength,r.length),_$w.ancestorStackMaximumLength=Math.max(_$w.ancestorStackMaximumLength,o.length),o.length>0){var a=o.peek();if(a._stackLength===r.length){o.pop(),a!==n&&(a._finalResolution=!1),L$x(e,a,i);continue}}var s=r.pop();if(t$$(s)){var l=s.refine===l$D.ADD,u=s._shouldSelect,c=s.children,h=c.length,d=A$F(e,s);if(u)if(l)L$x(e,s,i);else{if(s._selectionDepth=o.length,s._selectionDepth>0&&(e._hasMixedContent=!0),n=s,!d){L$x(e,s,i);continue}o.push(s),s._stackLength=r.length}if(d)for(var f=0;f<h;++f){var p=c[f];v$x(p)&&r.push(p)}}}}R$r.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(P$q(e,i,t),v$x(i)&&!(i.getScreenSpaceError(t,!0)<=e._maximumScreenSpaceError)){C$A(e)?e.immediatelyLoadDesiredLevelOfDetail?Z$w(e,i,t):X$o(e,i,t):I$G(e,i,t),x$C.stack.trim(x$C.stackMaximumLength),k$w.stack.trim(k$w.stackMaximumLength),E$A.stack.trim(E$A.stackMaximumLength),_$w.stack.trim(_$w.stackMaximumLength),_$w.ancestorStack.trim(_$w.ancestorStackMaximumLength);for(var n=e._requestedTiles,r=n.length,o=0;o<r;++o)n[o].updatePriority()}}};var e$M={RENDER:0,PICK:1,SHADOW:2,PRELOAD:3,PRELOAD_FLIGHT:4,REQUEST_RENDER_MODE_DEFER_CHECK:5,MOST_DETAILED_PRELOAD:6,MOST_DETAILED_PICK:7,NUMBER_OF_PASSES:8},r$p=new Array(e$M.NUMBER_OF_PASSES);r$p[e$M.RENDER]=Object.freeze({traversal:R$r,isRender:!0,requestTiles:!0,ignoreCommands:!1}),r$p[e$M.PICK]=Object.freeze({traversal:R$r,isRender:!1,requestTiles:!1,ignoreCommands:!1}),r$p[e$M.SHADOW]=Object.freeze({traversal:R$r,isRender:!1,requestTiles:!0,ignoreCommands:!1}),r$p[e$M.PRELOAD]=Object.freeze({traversal:R$r,isRender:!1,requestTiles:!0,ignoreCommands:!0}),r$p[e$M.PRELOAD_FLIGHT]=Object.freeze({traversal:R$r,isRender:!1,requestTiles:!0,ignoreCommands:!0}),r$p[e$M.REQUEST_RENDER_MODE_DEFER_CHECK]=Object.freeze({traversal:R$r,isRender:!1,requestTiles:!0,ignoreCommands:!0}),r$p[e$M.MOST_DETAILED_PRELOAD]=Object.freeze({traversal:h$E,isRender:!1,requestTiles:!0,ignoreCommands:!0}),r$p[e$M.MOST_DETAILED_PICK]=Object.freeze({traversal:h$E,isRender:!1,requestTiles:!1,ignoreCommands:!1}),e$M.getPassOptions=function(e){return r$p[e]};var _t$6=Object.freeze(e$M);function t$v(e,t){this._tileset=e,this._tile=t,this.featurePropertiesDirty=!1}function _$v(e){n$1e.typeOf.object("options",e),n$1e.typeOf.object("options.rectangle",e.rectangle),this.rectangle=s$1p.clone(e.rectangle),this.minimumHeight=e$1Y(e.minimumHeight,0),this.maximumHeight=e$1Y(e.maximumHeight,0),this.southwestCornerCartesian=new a$11,this.northeastCornerCartesian=new a$11,this.westNormal=new a$11,this.southNormal=new a$11,this.eastNormal=new a$11,this.northNormal=new a$11;var t=e$1Y(e.ellipsoid,n$1c.WGS84);tt$c(this,e.rectangle,t),e$1Y(e.computeBoundingVolumes,!0)&&(this._orientedBoundingBox=b$1o.fromRectangle(this.rectangle,this.minimumHeight,this.maximumHeight,t),this._boundingSphere=c$19.fromOrientedBoundingBox(this._orientedBoundingBox))}Object.defineProperties(t$v.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},readyPromise:{get:function(){}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){}},batchTable:{get:function(){}}}),t$v.prototype.hasProperty=function(e,t){return!1},t$v.prototype.getFeature=function(e){},t$v.prototype.applyDebugSettings=function(e,t){},t$v.prototype.applyStyle=function(e){},t$v.prototype.update=function(e,t){},t$v.prototype.isDestroyed=function(){return!1},t$v.prototype.destroy=function(){return s$1e(this)},Object.defineProperties(_$v.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}});var j$A=new a$11,I$F=new a$11,V$q=new a$11,L$w=new a$11,Q$t=new a$11,$$v=new a$11,n$B=new i$1g,Z$v=new n$17(a$11.UNIT_X,0),p$H=new n$18;function tt$c(e,t,i){i.cartographicToCartesian(s$1p.southwest(t),e.southwestCornerCartesian),i.cartographicToCartesian(s$1p.northeast(t),e.northeastCornerCartesian),n$B.longitude=t.west,n$B.latitude=.5*(t.south+t.north),n$B.height=0;var n=i.cartographicToCartesian(n$B,Q$t),r=a$11.cross(n,a$11.UNIT_Z,j$A);a$11.normalize(r,e.westNormal),n$B.longitude=t.east;var o=i.cartographicToCartesian(n$B,$$v),a=a$11.cross(a$11.UNIT_Z,o,j$A);a$11.normalize(a,e.eastNormal);var s,l=a$11.subtract(n,o,j$A),u=a$11.normalize(l,L$w),c=t.south;if(c>0){n$B.longitude=.5*(t.west+t.east),n$B.latitude=c;var h=i.cartographicToCartesian(n$B,p$H.origin);a$11.clone(u,p$H.direction);var d=n$17.fromPointNormal(e.southwestCornerCartesian,e.westNormal,Z$v);h$1b.rayPlane(p$H,d,e.southwestCornerCartesian),s=i.geodeticSurfaceNormal(h,I$F)}else s=i.geodeticSurfaceNormalCartographic(s$1p.southeast(t),I$F);var f=a$11.cross(s,l,V$q);a$11.normalize(f,e.southNormal);var p,_=t.north;if(_<0){n$B.longitude=.5*(t.west+t.east),n$B.latitude=_;var m=i.cartographicToCartesian(n$B,p$H.origin);a$11.negate(u,p$H.direction);var $=n$17.fromPointNormal(e.northeastCornerCartesian,e.eastNormal,Z$v);h$1b.rayPlane(p$H,$,e.northeastCornerCartesian),p=i.geodeticSurfaceNormal(m,I$F)}else p=i.geodeticSurfaceNormalCartographic(s$1p.northwest(t),I$F);var g=a$11.cross(l,p,V$q);a$11.normalize(g,e.northNormal)}var et$b=new a$11,rt$a=new a$11,ot$b=new a$11(0,-1,0),it$8=new a$11(0,0,-1),M$B=new a$11;function t$u(e,t){0===t&&(t=n$1d.EPSILON7),this._boundingSphere=new c$19(e,t)}_$v.prototype.distanceToCamera=function(e){n$1e.defined("frameState",e);var t=e.camera,i=new a$11,n=new i$1g;if(t$$(t._sensitivePosition)&&t._sensitivePositionRatio>0){var r=i$1g.fromCartesian(t._sensitivePosition);n.latitude=r.latitude*t._sensitivePositionRatio+t.positionCartographic.latitude*(1-t._sensitivePositionRatio),n.longitude=r.longitude*t._sensitivePositionRatio+t.positionCartographic.longitude*(1-t._sensitivePositionRatio),n.height=t.positionCartographic.height,i=i$1g.toCartesian(n)}else i=t.positionWC,n=t.positionCartographic;var o,a,s,l=0;if(!s$1p.contains(this.rectangle,n)){var u=this.southwestCornerCartesian,c=this.northeastCornerCartesian,h=this.westNormal,d=this.southNormal,f=this.eastNormal,p=this.northNormal;e.mode!==b$1d.SCENE3D&&((u=e.mapProjection.project(s$1p.southwest(this.rectangle),et$b)).z=u.y,u.y=u.x,u.x=0,(c=e.mapProjection.project(s$1p.northeast(this.rectangle),rt$a)).z=c.y,c.y=c.x,c.x=0,h=ot$b,f=a$11.UNIT_Y,d=it$8,p=a$11.UNIT_Z);var _=a$11.subtract(i,u,M$B),m=a$11.dot(_,h),$=a$11.dot(_,d),g=a$11.subtract(i,c,M$B),y=a$11.dot(g,f),v=a$11.dot(g,p);m>0?l+=m*m:y>0&&(l+=y*y),$>0?l+=$*$:v>0&&(l+=v*v)}e.mode===b$1d.SCENE3D?(o=n.height,a=this.minimumHeight,s=this.maximumHeight):(o=i.x,a=this.minimumHeight,s=this.maximumHeight);var x=0;if(o>s){var b=o-s;x=b*b}else if(o<a){var S=a-o;x=S*S}return l>t._sensitiveRegionRatio*x?l+=x:l=x,Math.sqrt(l)},_$v.prototype.intersectPlane=function(e){return n$1e.defined("plane",e),this._orientedBoundingBox.intersectPlane(e)},_$v.prototype.createDebugVolume=function(e){n$1e.defined("color",e);var t=new c$1a.clone(c$1a.IDENTITY);return new y$H({geometryInstances:new m$P({geometry:new P$H({rectangle:this.rectangle,height:this.minimumHeight,extrudedHeight:this.maximumHeight}),id:"outline",modelMatrix:t,attributes:{color:r$I.fromColor(e)}}),appearance:new r$u({translucent:!1,flat:!0}),asynchronous:!1})},Object.defineProperties(t$u.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}}}),t$u.prototype.distanceToCamera=function(e){n$1e.defined("frameState",e);var t=this._boundingSphere;return Math.max(0,a$11.distance(t.center,e.camera.positionWC)-t.radius)},t$u.prototype.intersectPlane=function(e){return n$1e.defined("plane",e),c$19.intersectPlane(this._boundingSphere,e)},t$u.prototype.update=function(e,t){a$11.clone(e,this._boundingSphere.center),this._boundingSphere.radius=t},t$u.prototype.createDebugVolume=function(e){return n$1e.defined("color",e),new y$H({geometryInstances:new m$P({geometry:new a$D({radius:this.radius}),id:"outline",modelMatrix:c$1a.fromTranslation(this.center,new c$1a.clone(c$1a.IDENTITY)),attributes:{color:r$I.fromColor(e)}}),appearance:new r$u({translucent:!1,flat:!0}),asynchronous:!1})};var b$L=new a$11,y$z=new a$11,C$z=new a$11,I$E=new a$11;function u$A(e,t,i){i=a$11.cross(e,t,i);var n=a$11.magnitude(i);return a$11.multiplyByScalar(i,n$1d.EPSILON7/n,i)}function p$G(e,t){var i=a$11.normalize(e,I$E);return u$A(e,a$11.equalsEpsilon(i,a$11.UNIT_X,n$1d.EPSILON6)?a$11.UNIT_Y:a$11.UNIT_X,t)}function g$r(e){var t=r$W.getColumn(e,0,b$L),i=r$W.getColumn(e,1,y$z),n=r$W.getColumn(e,2,C$z),r=a$11.equals(t,a$11.ZERO),o=a$11.equals(i,a$11.ZERO),a=a$11.equals(n,a$11.ZERO);return r||o||a?r&&o&&a?(e[0]=n$1d.EPSILON7,e[4]=n$1d.EPSILON7,e[8]=n$1d.EPSILON7,e):(!r||o||a?r||!o||a?r||o||!a?r?o?a||(i=u$A(n,t=p$G(n,t),i)):n=u$A(i,t=p$G(i,t),n):n=u$A(i=p$G(t,i),t,n):n=u$A(i,t,n):i=u$A(t,n,i):t=u$A(i,n,t),r$W.setColumn(e,0,t,e),r$W.setColumn(e,1,i,e),r$W.setColumn(e,2,n,e),e):e}function s$y(e,t){t=g$r(t),this._orientedBoundingBox=new b$1o(e,t),this._boundingSphere=c$19.fromOrientedBoundingBox(this._orientedBoundingBox)}function c$y(e,t,i,n){this._tileset=e,this._header=i;var r=i.content;this.transform=t$$(i.transform)?c$1a.unpack(i.transform):c$1a.clone(c$1a.IDENTITY);var o,a,s,l,u,c,h,d,f=t$$(n)?n.computedTransform:e.modelMatrix,p=c$1a.multiply(f,this.transform,new c$1a),_=t$$(n)?n._initialTransform:c$1a.IDENTITY;if(this._initialTransform=c$1a.multiply(_,this.transform,new c$1a),this.computedTransform=p,this._boundingVolume=this.createBoundingVolume(i.boundingVolume,p),this._boundingVolume2D=void 0,t$$(r)&&t$$(r.boundingVolume)&&(o=this.createBoundingVolume(r.boundingVolume,p)),this._contentBoundingVolume=o,this._contentBoundingVolume2D=void 0,t$$(i.viewerRequestVolume)&&(a=this.createBoundingVolume(i.viewerRequestVolume,p)),this._viewerRequestVolume=a,this.geometricError=i.geometricError,this._geometricError=i.geometricError,t$$(this._geometricError)||(this._geometricError=t$$(n)?n.geometricError:e._geometricError,c$y._deprecationWarning("geometricErrorUndefined","Required property geometricError is undefined for this tile. Using parent's geometric error instead.")),this.updateGeometricErrorScale(),t$$(i.refine)?(("replace"===i.refine||"add"===i.refine)&&c$y._deprecationWarning("lowercase-refine",'This tile uses a lowercase refine "'+i.refine+'". Instead use "'+i.refine.toUpperCase()+'".'),s="REPLACE"===i.refine.toUpperCase()?l$D.REPLACE:l$D.ADD):s=t$$(n)?n.refine:l$D.REPLACE,this.refine=s,this.children=[],this.parent=n,t=t$X.createIfNeeded(t),t$$(r)){var m=r.uri;t$$(r.url)&&(c$y._deprecationWarning("contentUrl",'This tileset JSON uses the "content.url" property which has been deprecated. Use "content.uri" instead.'),m=r.url),u=!1,c=X$p.UNLOADED,(h=e.isSuperMapiServer?-1!==m.indexOf(".json")?-1===t.url.indexOf("/data/path")?t.getDerivedResource({url:"./data/path/"+m}):t.getDerivedResource({url:m}):-1===t.url.indexOf("/data/path")&&-1!==m.indexOf(".b3dm")?t.getDerivedResource({url:"./data/path/"+m}):t.getDerivedResource({url:m}):t.getDerivedResource({url:m})).url=h.url.replace(/\+/g,"%2B"),d=r$U.getServerKey(h.getUrlComponent())}else l=new t$v(e,this),u=!0,c=X$p.READY;this._content=l,this._contentResource=h,this._contentState=c,this._contentReadyToProcessPromise=void 0,this._contentReadyPromise=void 0,this._expiredContent=void 0,this._serverKey=d,this.hasEmptyContent=u,this.hasTilesetContent=!1,this.cacheNode=void 0;var $,g,y=i.expire;t$$(y)&&($=y.duration,t$$(y.date)&&(g=o$10.fromIso8601(y.date))),this.expireDuration=$,this.expireDate=g,this.lastStyleTime=0,this._optimChildrenWithinParent=s$z.NOT_COMPUTED,this.clippingPlanesDirty=!1,this.priorityDeferred=!1,this._distanceToCamera=0,this._centerZDepth=0,this._screenSpaceError=0,this._screenSpaceErrorProgressiveResolution=0,this._visibilityPlaneMask=0,this._visible=!1,this._inRequestVolume=!1,this._finalResolution=!0,this._depth=0,this._stackLength=0,this._selectionDepth=0,this._updatedVisibilityFrame=0,this._touchedFrame=0,this._visitedFrame=0,this._selectedFrame=0,this._requestedFrame=0,this._ancestorWithContent=void 0,this._ancestorWithContentAvailable=void 0,this._refines=!1,this._shouldSelect=!1,this._isClipped=!0,this._clippingPlanesState=0,this._debugBoundingVolume=void 0,this._debugContentBoundingVolume=void 0,this._debugViewerRequestVolume=void 0,this._debugColor=e$1z.fromRandom({alpha:1}),this._debugColorizeTiles=!1,this._priority=0,this._priorityHolder=this,this._priorityProgressiveResolution=!1,this._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1,this._priorityReverseScreenSpaceError=0,this._foveatedFactor=0,this._wasMinPriorityChild=!1,this._loadTimestamp=new o$10,this._commandsLength=0,this._color=void 0,this._colorDirty=!1,this._request=void 0}Object.defineProperties(s$y.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}}),s$y.prototype.distanceToCamera=function(e){return n$1e.defined("frameState",e),Math.sqrt(this._orientedBoundingBox.distanceSquaredTo(e.camera.positionWC))},s$y.prototype.intersectPlane=function(e){return n$1e.defined("plane",e),this._orientedBoundingBox.intersectPlane(e)},s$y.prototype.update=function(e,t){a$11.clone(e,this._orientedBoundingBox.center),t=g$r(t),r$W.clone(t,this._orientedBoundingBox.halfAxes),c$19.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere)},s$y.prototype.createDebugVolume=function(e){return n$1e.defined("color",e),new y$H({geometryInstances:new m$P({geometry:new a$T({minimum:new a$11(-1,-1,-1),maximum:new a$11(1,1,1)}),id:"outline",modelMatrix:c$1a.fromRotationTranslation(this.boundingVolume.halfAxes,this.boundingVolume.center),attributes:{color:r$I.fromColor(e)}}),appearance:new r$u({translucent:!1,flat:!0}),asynchronous:!1})},c$y._deprecationWarning=i$1b,Object.defineProperties(c$y.prototype,{tileset:{get:function(){return this._tileset}},content:{get:function(){return this._content}},boundingVolume:{get:function(){return this._boundingVolume}},contentBoundingVolume:{get:function(){return e$1Y(this._contentBoundingVolume,this._boundingVolume)}},boundingSphere:{get:function(){return this._boundingVolume.boundingSphere}},extras:{get:function(){return this._header.extras}},color:{get:function(){return t$$(this._color)||(this._color=new e$1z),e$1z.clone(this._color)},set:function(e){this._color=e$1z.clone(e,this._color),this._colorDirty=!0}},contentAvailable:{get:function(){return this.contentReady&&!this.hasEmptyContent&&!this.hasTilesetContent||t$$(this._expiredContent)&&!this.contentFailed}},contentReady:{get:function(){return this._contentState===X$p.READY}},contentUnloaded:{get:function(){return this._contentState===X$p.UNLOADED}},contentExpired:{get:function(){return this._contentState===X$p.EXPIRED}},contentFailed:{get:function(){return this._contentState===X$p.FAILED}},contentReadyToProcessPromise:{get:function(){if(t$$(this._contentReadyToProcessPromise))return this._contentReadyToProcessPromise.promise}},contentReadyPromise:{get:function(){if(t$$(this._contentReadyPromise))return this._contentReadyPromise.promise}},commandsLength:{get:function(){return this._commandsLength}}});var P$p=new a$11;function be$i(e,t){var i=e._tileset,n=t.camera,r=e.boundingSphere,o=r.radius,a=a$11.multiplyByScalar(n.directionWC,e._centerZDepth,P$p),s=a$11.add(n.positionWC,a,P$p),l=a$11.subtract(s,r.center,P$p);if(a$11.magnitude(l)>o){var u=a$11.normalize(l,P$p),c=a$11.multiplyByScalar(u,o,P$p),h=a$11.add(r.center,c,P$p),d=a$11.subtract(h,n.positionWC,P$p),f=a$11.normalize(d,P$p);e._foveatedFactor=1-Math.abs(a$11.dot(n.directionWC,f))}else e._foveatedFactor=0;var p=e.refine===l$D.REPLACE,_=i._skipLevelOfDetail;if(p&&!_||!i.foveatedScreenSpaceError||1===i.foveatedConeSize||e._priorityProgressiveResolution&&p&&_||i._pass===_t$6.PRELOAD_FLIGHT||i._pass===_t$6.PRELOAD)return!1;var m=1-Math.cos(.5*n.frustum.fov),$=i.foveatedConeSize*m;if(e._foveatedFactor<=$)return!1;var g=m-$,y=n$1d.clamp((e._foveatedFactor-$)/g,0,1),v=i.foveatedInterpolationCallback(i.foveatedMinimumScreenSpaceErrorRelaxation,i.maximumScreenSpaceError,y),x=0===e._screenSpaceError&&t$$(e.parent)?.5*e.parent._screenSpaceError:e._screenSpaceError;return i.maximumScreenSpaceError-v<=x}var J$w=new o$10;function Ee$e(e,t){if(e.progressiveResolutionHeightFraction<=0||e.progressiveResolutionHeightFraction>.5)return!1;var i=t._screenSpaceErrorProgressiveResolution>e._maximumScreenSpaceError;t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1;var n=t.parent,r=e._maximumScreenSpaceError,o=t._screenSpaceErrorProgressiveResolution<=r,a=t$$(n)&&n._screenSpaceErrorProgressiveResolution>r;return o&&a&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!0,i=!0),i}function Re$b(e,t){var i=t.parent,n=t$$(i)&&(!e._skipLevelOfDetail||0===t._screenSpaceError||i.hasTilesetContent)?i._screenSpaceError:t._screenSpaceError;return e.root._screenSpaceError-n}function Ce$f(e){if(t$$(e.expireDuration)){var t=o$10.now(J$w);o$10.addSeconds(t,e.expireDuration,t),t$$(e.expireDate)?o$10.lessThan(e.expireDate,t)&&o$10.clone(t,e.expireDate):e.expireDate=o$10.clone(t)}}function De$l(e,t){return function(i){e._contentState===X$p.PROCESSING?--t.statistics.numberOfTilesProcessing:--t.statistics.numberOfPendingRequests,e._contentState=X$p.FAILED,e._contentReadyPromise.reject(i),e._contentReadyToProcessPromise.reject(i)}}function Pe$e(e){return function(){return e._priority}}c$y.prototype.getScreenSpaceError=function(e,t,i){var n=this._tileset,r=e$1Y(i,1),o=t$$(this.parent)?this.parent.geometricError:n._geometricError,a=t?o:this.geometricError;if(0===a)return 0;var s,l=e.camera,u=l.frustum,c=e.context,h=c.drawingBufferWidth,d=c.drawingBufferHeight*r;if(e.mode===b$1d.SCENE2D||u instanceof r$K){t$$(u._offCenterFrustum)&&(u=u._offCenterFrustum),s=a/(Math.max(u.top-u.bottom,u.right-u.left)/Math.max(h,d))}else{var f=Math.max(this._distanceToCamera,n$1d.EPSILON7);if(s=a*d/(f*l.frustum.sseDenominator),n.dynamicScreenSpaceError){var p=n._dynamicScreenSpaceErrorComputedDensity,_=n.dynamicScreenSpaceErrorFactor;s-=n$1d.fog(f,p)*_}}return s/=e.pixelRatio},c$y.prototype.updateVisibility=function(e){var t=this.parent,i=this._tileset,n=t$$(t)?t.computedTransform:i.modelMatrix,r=t$$(t)?t._visibilityPlaneMask:i$_.MASK_INDETERMINATE;this.updateTransform(n),this._distanceToCamera=this.distanceToTile(e),this._centerZDepth=this.distanceToTileCenter(e),this._screenSpaceError=this.getScreenSpaceError(e,!1),this._screenSpaceErrorProgressiveResolution=this.getScreenSpaceError(e,!1,i.progressiveResolutionHeightFraction),this._visibilityPlaneMask=this.visibility(e,r),this._visible=this._visibilityPlaneMask!==i$_.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(e),this._priorityReverseScreenSpaceError=Re$b(i,this),this._priorityProgressiveResolution=Ee$e(i,this),this.priorityDeferred=be$i(this,e)},c$y.prototype.updateExpiration=function(){if(t$$(this.expireDate)&&this.contentReady&&!this.hasEmptyContent){var e=o$10.now(J$w);o$10.lessThan(this.expireDate,e)&&(this._contentState=X$p.EXPIRED,this._expiredContent=this._content)}},c$y.prototype.requestContent=function(){var e=this,t=this._tileset;if(this.hasEmptyContent)return!1;var i=this._contentResource.clone(),n=this.contentExpired;n&&i.setQueryParameters({expired:this.expireDate.toString()});var r=new r$V({throttle:!0,throttleByServer:!0,type:V$_.TILES3D,priorityFunction:Pe$e(this),serverKey:this._serverKey});this._request=r,i.request=r;var o=i.fetchArrayBuffer();if(!t$$(o))return!1;var a=this._contentState;this._contentState=X$p.LOADING,this._contentReadyToProcessPromise=c$18.defer(),this._contentReadyPromise=c$18.defer();var s=De$l(this,t);return o.then((function(i){if(!e.isDestroyed()){var r,o=e$1h(new Uint8Array(i)),a=m$z[o];return t._disableSkipLevelOfDetail=t._disableSkipLevelOfDetail||"vctr"===o||"geom"===o,t$$(a)?r=a(t,e,e._contentResource,i,0):(r=m$z.json(t,e,e._contentResource,i,0),e.hasTilesetContent=!0),n&&(e.expireDate=void 0),e._content=r,e._contentState=X$p.PROCESSING,e._contentReadyToProcessPromise.resolve(r),r.readyPromise.then((function(t){e.isDestroyed()?s():(Ce$f(e),e._selectedFrame=0,e.lastStyleTime=0,o$10.now(e._loadTimestamp),e._contentState=X$p.READY,e._contentReadyPromise.resolve(t))}))}s()})).otherwise((function(i){if(r.state===Y$_.CANCELLED)return e._contentState=a,--t.statistics.numberOfPendingRequests,void++t.statistics.numberOfAttemptedRequests;s(i)})),!0},c$y.prototype.unloadContent=function(){this.hasEmptyContent||this.hasTilesetContent||(this._content=this._content&&this._content.destroy(),this._contentState=X$p.UNLOADED,this._contentReadyToProcessPromise=void 0,this._contentReadyPromise=void 0,this.lastStyleTime=0,this.clippingPlanesDirty=0===this._clippingPlanesState,this._clippingPlanesState=0,this._debugColorizeTiles=!1,this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy())};var Q$s=new c$19;function G$z(e,t){if(t.mode!==b$1d.SCENE3D&&!t$$(e._boundingVolume2D)){var i=e._boundingVolume.boundingSphere,n=c$19.projectTo2D(i,t.mapProjection,Q$s);e._boundingVolume2D=new t$u(n.center,n.radius)}return t.mode!==b$1d.SCENE3D?e._boundingVolume2D:e._boundingVolume}function Te$h(e,t){if(t.mode!==b$1d.SCENE3D&&!t$$(e._contentBoundingVolume2D)){var i=e._contentBoundingVolume.boundingSphere,n=c$19.projectTo2D(i,t.mapProjection,Q$s);e._contentBoundingVolume2D=new t$u(n.center,n.radius)}return t.mode!==b$1d.SCENE3D?e._contentBoundingVolume2D:e._contentBoundingVolume}c$y.prototype.visibility=function(e,t){var i=e.cullingVolume,n=G$z(this,e),r=this._tileset,o=r.clippingPlanes;if(t$$(o)&&o.enabled){var a=o.computeIntersectionWithBoundingVolume(n,r.clippingPlanesOriginMatrix);if(this._isClipped=a!==cr$4.INSIDE,a===cr$4.OUTSIDE)return i$_.MASK_OUTSIDE}return i.computeVisibilityWithPlaneMask(n,t)},c$y.prototype.contentVisibility=function(e){if(!t$$(this._contentBoundingVolume))return cr$4.INSIDE;if(this._visibilityPlaneMask===i$_.MASK_INSIDE)return cr$4.INSIDE;var t=e.cullingVolume,i=Te$h(this,e),n=this._tileset,r=n.clippingPlanes;if(t$$(r)&&r.enabled){var o=r.computeIntersectionWithBoundingVolume(i,n.clippingPlanesOriginMatrix);if(this._isClipped=o!==cr$4.INSIDE,o===cr$4.OUTSIDE)return cr$4.OUTSIDE}return t.computeVisibility(i)},c$y.prototype.distanceToTile=function(e){return G$z(this,e).distanceToCamera(e)};var we$d=new a$11;c$y.prototype.distanceToTileCenter=function(e){var t=G$z(this,e).boundingVolume,i=a$11.subtract(t.center,e.camera.positionWC,we$d);return a$11.dot(e.camera.directionWC,i)},c$y.prototype.insideViewerRequestVolume=function(e){var t=this._viewerRequestVolume;return!t$$(t)||0===t.distanceToCamera(e)};var $$u=new r$W,ee$m=new a$11,Be$f=new r$W,te$k=new a$11,re$j=new s$1p,xe$m=new b$1o,j$z=new c$1a;function Ie$f(e,t,i){var n=a$11.fromElements(e[0],e[1],e[2],te$k),r=r$W.fromArray(e,3,Be$f);n=c$1a.multiplyByPoint(t,n,n);var o=c$1a.getMatrix3(t,$$u);return r=r$W.multiply(o,r,r),t$$(i)?(i.update(n,r),i):new s$y(n,r)}function Le$d(e,t,i,n){var r=s$1p.unpack(e,0,re$j),o=e[4],a=e[5],s=b$1o.fromRectangle(r,o,a,n$1c.WGS84,xe$m),l=s.center,u=s.halfAxes;t=c$1a.multiplyTransformation(t,c$1a.inverseTransformation(i,j$z),j$z),l=c$1a.multiplyByPoint(t,l,l);var c=c$1a.getMatrix3(t,$$u);return u=r$W.multiply(c,u,u),t$$(n)&&n instanceof s$y?(n.update(l,u),n):new s$y(l,u)}function qe$b(e,t,i,n){return c$1a.equalsEpsilon(t,i,n$1d.EPSILON8)?t$$(n)?n:new _$v({rectangle:s$1p.unpack(e,0,re$j),minimumHeight:e[4],maximumHeight:e[5]}):Le$d(e,t,i,n)}function Oe$g(e,t,i){var n=a$11.fromElements(e[0],e[1],e[2],te$k),r=e[3];n=c$1a.multiplyByPoint(t,n,n);var o=c$1a.getScale(t,ee$m);return r*=a$11.maximumComponent(o),t$$(i)?(i.update(n,r),i):new t$u(n,r)}function Ae$d(e,t,i,n){if(n.isRender){var r=t$$(e._header.content)&&t$$(e._header.content.boundingVolume),o=e.hasEmptyContent||e.hasTilesetContent,a=t.debugShowBoundingVolume||t.debugShowContentBoundingVolume&&!r;if(a){var s;s=e._finalResolution?o?e$1z.DARKGRAY:e$1z.WHITE:e$1z.YELLOW,t$$(e._debugBoundingVolume)||(e._debugBoundingVolume=e._boundingVolume.createDebugVolume(s)),e._debugBoundingVolume.update(i);var l=e._debugBoundingVolume.getGeometryInstanceAttributes("outline");l.color=r$I.toValue(s,l.color)}else!a&&t$$(e._debugBoundingVolume)&&(e._debugBoundingVolume=e._debugBoundingVolume.destroy());t.debugShowContentBoundingVolume&&r?(t$$(e._debugContentBoundingVolume)||(e._debugContentBoundingVolume=e._contentBoundingVolume.createDebugVolume(e$1z.BLUE)),e._debugContentBoundingVolume.update(i)):!t.debugShowContentBoundingVolume&&t$$(e._debugContentBoundingVolume)&&(e._debugContentBoundingVolume=e._debugContentBoundingVolume.destroy()),t.debugShowViewerRequestVolume&&t$$(e._viewerRequestVolume)?(t$$(e._debugViewerRequestVolume)||(e._debugViewerRequestVolume=e._viewerRequestVolume.createDebugVolume(e$1z.YELLOW)),e._debugViewerRequestVolume.update(i)):!t.debugShowViewerRequestVolume&&t$$(e._debugViewerRequestVolume)&&(e._debugViewerRequestVolume=e._debugViewerRequestVolume.destroy());var u=t.debugColorizeTiles&&!e._debugColorizeTiles||t$$(t._heatmap.tilePropertyName),c=!t.debugColorizeTiles&&e._debugColorizeTiles;u?(t._heatmap.colorize(e,i),e._debugColorizeTiles=!0,e.color=e._debugColor):c&&(e._debugColorizeTiles=!1,e.color=e$1z.WHITE),e._colorDirty&&(e._colorDirty=!1,e._content.applyDebugSettings(!0,e._color)),c&&t.makeStyleDirty()}}function Me$g(e,t,i){var n=e._content,r=e._expiredContent;if(t$$(r)){if(!e.contentReady)return void r.update(t,i);e._expiredContent.destroy(),e._expiredContent=void 0}n.update(t,i)}function Ne$c(e,t){var i=t.clippingPlanes,n=0;t$$(i)&&e._isClipped&&i.enabled&&(n=i.clippingPlanesState),n!==e._clippingPlanesState&&(e._clippingPlanesState=n,e.clippingPlanesDirty=!0)}c$y.prototype.createBoundingVolume=function(e,t,i){if(!t$$(e))throw new t$Z("boundingVolume must be defined");if(t$$(e.box))return Ie$f(e.box,t,i);if(t$$(e.region))return qe$b(e.region,t,this._initialTransform,i);if(t$$(e.sphere))return Oe$g(e.sphere,t,i);throw new t$Z("boundingVolume must contain a sphere, region, or box")},c$y.prototype.updateTransform=function(e){e=e$1Y(e,c$1a.IDENTITY);var t=c$1a.multiply(e,this.transform,j$z);if(!c$1a.equals(t,this.computedTransform)){c$1a.clone(t,this.computedTransform);var i=this._header,n=this._header.content;this._boundingVolume=this.createBoundingVolume(i.boundingVolume,this.computedTransform,this._boundingVolume),t$$(this._contentBoundingVolume)&&(this._contentBoundingVolume=this.createBoundingVolume(n.boundingVolume,this.computedTransform,this._contentBoundingVolume)),t$$(this._viewerRequestVolume)&&(this._viewerRequestVolume=this.createBoundingVolume(i.viewerRequestVolume,this.computedTransform,this._viewerRequestVolume)),this.updateGeometricErrorScale(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy()}},c$y.prototype.updateGeometricErrorScale=function(){var e=c$1a.getScale(this.computedTransform,ee$m),t=a$11.maximumComponent(e);this.geometricError=this._geometricError*t},c$y.prototype.update=function(e,t,i){var n=t.commandList.length;Ne$c(this,e),Ae$d(this,e,t,i),Me$g(this,e,t),this._commandsLength=t.commandList.length-n,this.clippingPlanesDirty=!1};var ie$i=[];function oe$i(e,t,i){var n=e*Math.pow(10,t);return parseInt(n)*Math.pow(10,i)}function q$z(e,t,i){return Math.max(n$1d.normalize(e,t,i)-n$1d.EPSILON7,0)}c$y.prototype.process=function(e,t){var i=t.commandList;t.commandList=ie$i,this._content.update(e,t),ie$i.length=0,t.commandList=i},c$y.prototype.updatePriority=function(){var e=this.tileset,t=e.preferLeaves,i=e._minimumPriority,n=e._maximumPriority,r=Math.pow(10,8),o=Math.pow(10,9),a=Math.pow(10,10),s=q$z(this._depth,i.depth,n.depth);s=t?1-s:s;var l=oe$i(!e._skipLevelOfDetail&&this.refine===l$D.REPLACE?q$z(this._priorityHolder._distanceToCamera,i.distance,n.distance):q$z(this._priorityReverseScreenSpaceError,i.reverseScreenSpaceError,n.reverseScreenSpaceError),4,0),u=this._priorityProgressiveResolution?0:r,c=oe$i(q$z(this._priorityHolder._foveatedFactor,i.foveatedFactor,n.foveatedFactor),4,4),h=this.priorityDeferred?o:0,d=e._pass===_t$6.PRELOAD_FLIGHT?0:a;this._priority=s+l+u+c+h+d},c$y.prototype.isDestroyed=function(){return!1},c$y.prototype.destroy=function(){return this._content=this._content&&this._content.destroy(),this._expiredContent=this._expiredContent&&!this._expiredContent.isDestroyed()&&this._expiredContent.destroy(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy(),s$1e(this)};var A$E={},p$F=new a$11;function e$L(){this._list=new s$15,this._sentinel=this._list.add(),this._trimTiles=!1}function o$y(e){this.tilePropertyName=e,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE,this._previousMinimum=Number.MAX_VALUE,this._previousMaximum=-Number.MAX_VALUE,this._referenceMinimum={},this._referenceMaximum={}}function p$E(e,t){return"_loadTimestamp"===t?o$10.toDate(e).getTime():e}function d$z(e,t){var i=e.tilePropertyName;if(t$$(i)){var n=p$E(t[i],i);return t$$(n)?(e._maximum=Math.max(n,e._maximum),e._minimum=Math.min(n,e._minimum),n):(e.tilePropertyName=void 0,n)}}A$E.checkChildrenWithinParent=function(e){n$1e.typeOf.object("tile",e);var t=e.children,i=t.length,n=e.boundingVolume;if(n instanceof s$y||n instanceof _$v){var r=n._orientedBoundingBox;e._optimChildrenWithinParent=s$z.USE_OPTIMIZATION;for(var o=0;o<i;++o){var a=t[o].boundingVolume;if(!(a instanceof s$y||a instanceof _$v)){e._optimChildrenWithinParent=s$z.SKIP_OPTIMIZATION;break}var s=a._orientedBoundingBox,l=a$11.subtract(s.center,r.center,p$F),u=a$11.magnitude(l);if(a$11.divideByScalar(l,u,l),Math.abs(r.halfAxes[0]*l.x)+Math.abs(r.halfAxes[1]*l.y)+Math.abs(r.halfAxes[2]*l.z)+Math.abs(r.halfAxes[3]*l.x)+Math.abs(r.halfAxes[4]*l.y)+Math.abs(r.halfAxes[5]*l.z)+Math.abs(r.halfAxes[6]*l.x)+Math.abs(r.halfAxes[7]*l.y)+Math.abs(r.halfAxes[8]*l.z)<=Math.abs(s.halfAxes[0]*l.x)+Math.abs(s.halfAxes[1]*l.y)+Math.abs(s.halfAxes[2]*l.z)+Math.abs(s.halfAxes[3]*l.x)+Math.abs(s.halfAxes[4]*l.y)+Math.abs(s.halfAxes[5]*l.z)+Math.abs(s.halfAxes[6]*l.x)+Math.abs(s.halfAxes[7]*l.y)+Math.abs(s.halfAxes[8]*l.z)+u){e._optimChildrenWithinParent=s$z.SKIP_OPTIMIZATION;break}}}return e._optimChildrenWithinParent===s$z.USE_OPTIMIZATION},e$L.prototype.reset=function(){this._list.splice(this._list.tail,this._sentinel)},e$L.prototype.touch=function(e){var t=e.cacheNode;t$$(t)&&this._list.splice(this._sentinel,t)},e$L.prototype.add=function(e){t$$(e.cacheNode)||(e.cacheNode=this._list.add(e))},e$L.prototype.unloadTile=function(e,t,i){var n=t.cacheNode;!t$$(n)||(this._list.remove(n),t.cacheNode=void 0,i(e,t))},e$L.prototype.unloadTiles=function(e,t){var i=this._trimTiles;this._trimTiles=!1;for(var n=this._list,r=1024*e.maximumMemoryUsage*1024,o=this._sentinel,a=n.head;a!==o&&(e.totalMemoryUsageInBytes>r||i);){var s=a.item;a=a.next,this.unloadTile(e,s,t)}},e$L.prototype.trim=function(){this._trimTiles=!0},o$y.prototype.setReferenceMinimumMaximum=function(e,t,i){this._referenceMinimum[i]=p$E(e,i),this._referenceMaximum[i]=p$E(t,i)};var l$A=[new e$1z(.1,.1,.1,1),new e$1z(.153,.278,.878,1),new e$1z(.827,.231,.49,1),new e$1z(.827,.188,.22,1),new e$1z(1,.592,.259,1),new e$1z(1,.843,0,1)];function s$x(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfPendingRequests=0,this.numberOfTilesProcessing=0,this.numberOfTilesWithContentReady=0,this.numberOfTilesTotal=0,this.numberOfLoadedTilesTotal=0,this.numberOfFeaturesSelected=0,this.numberOfFeaturesLoaded=0,this.numberOfPointsSelected=0,this.numberOfPointsLoaded=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0,this.geometryByteLength=0,this.texturesByteLength=0,this.batchTableByteLength=0}function u$z(e,t,i,n){var r=t.innerContents,o=t.pointsLength,a=t.trianglesLength,s=t.featuresLength,l=t.geometryByteLength,u=t.texturesByteLength,c=t.batchTableByteLength;if(n?(e.numberOfFeaturesLoaded+=i?-s:s,e.numberOfPointsLoaded+=i?-o:o,e.geometryByteLength+=i?-l:l,e.texturesByteLength+=i?-u:u,e.batchTableByteLength+=i?-c:c):(e.numberOfFeaturesSelected+=i?-s:s,e.numberOfPointsSelected+=i?-o:o,e.numberOfTrianglesSelected+=i?-a:a),t$$(r))for(var h=r.length,d=0;d<h;++d)u$z(e,r[d],i,n)}function e$K(){this._style=void 0,this._styleDirty=!1,this._lastStyleTime=0}function f$B(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),n$1e.defined("options.url",e.url),this._url=void 0,this._basePath=void 0,this._root=void 0,this._asset=void 0,this._properties=void 0,this._geometricError=void 0,this._extensionsUsed=void 0,this._gltfUpAxis=void 0,this._cache=new e$L,this._processingQueue=[],this._selectedTiles=[],this._emptyTiles=[],this._requestedTiles=[],this._selectedTilesToStyle=[],this._loadTimestamp=void 0,this._timeSinceLoad=0,this._updatedVisibilityFrame=0,this._updatedModelMatrixFrame=0,this._modelMatrixChanged=!1,this._previousModelMatrix=void 0,this._extras=void 0,this._credits=void 0,this._cullWithChildrenBounds=e$1Y(e.cullWithChildrenBounds,!0),this._allTilesAdditive=!0,this._hasMixedContent=!1,this._stencilClearCommand=void 0,this._backfaceCommands=new e$1d,this._maximumScreenSpaceError=e$1Y(e.maximumScreenSpaceError,16),this._maximumMemoryUsage=e$1Y(e.maximumMemoryUsage,512),this._styleEngine=new e$K,this._modelMatrix=t$$(e.modelMatrix)?c$1a.clone(e.modelMatrix):c$1a.clone(c$1a.IDENTITY),this._statistics=new s$x,this._statisticsLast=new s$x,this._statisticsPerPass=new Array(_t$6.NUMBER_OF_PASSES);for(var t=0;t<_t$6.NUMBER_OF_PASSES;++t)this._statisticsPerPass[t]=new s$x;this._requestedTilesInFlight=[],this._maximumPriority={foveatedFactor:-Number.MAX_VALUE,depth:-Number.MAX_VALUE,distance:-Number.MAX_VALUE,reverseScreenSpaceError:-Number.MAX_VALUE},this._minimumPriority={foveatedFactor:Number.MAX_VALUE,depth:Number.MAX_VALUE,distance:Number.MAX_VALUE,reverseScreenSpaceError:Number.MAX_VALUE},this._heatmap=new o$y(e.debugHeatmapTilePropertyName),this.cullRequestsWhileMoving=e$1Y(e.cullRequestsWhileMoving,!0),this._cullRequestsWhileMoving=!1,this._visibleViewport=4095,this.cullRequestsWhileMovingMultiplier=e$1Y(e.cullRequestsWhileMovingMultiplier,60),this.progressiveResolutionHeightFraction=n$1d.clamp(e$1Y(e.progressiveResolutionHeightFraction,.3),0,.5),this.preferLeaves=e$1Y(e.preferLeaves,!1),this._tilesLoaded=!1,this._initialTilesLoaded=!1,this._tileDebugLabels=void 0,this._readyPromise=c$18.defer(),this._classificationType=e.classificationType,this._ellipsoid=e$1Y(e.ellipsoid,n$1c.WGS84),this._initialClippingPlanesOriginMatrix=c$1a.IDENTITY,this._clippingPlanesOriginMatrix=void 0,this._clippingPlanesOriginMatrixDirty=!0,this.preloadWhenHidden=e$1Y(e.preloadWhenHidden,!1),this.preloadFlightDestinations=e$1Y(e.preloadFlightDestinations,!0),this._pass=void 0,this.dynamicScreenSpaceError=e$1Y(e.dynamicScreenSpaceError,!1),this.foveatedScreenSpaceError=e$1Y(e.foveatedScreenSpaceError,!0),this._foveatedConeSize=e$1Y(e.foveatedConeSize,.1),this._foveatedMinimumScreenSpaceErrorRelaxation=e$1Y(e.foveatedMinimumScreenSpaceErrorRelaxation,0),this.foveatedInterpolationCallback=e$1Y(e.foveatedInterpolationCallback,n$1d.lerp),this.foveatedTimeDelay=e$1Y(e.foveatedTimeDelay,.2),this.dynamicScreenSpaceErrorDensity=.00278,this.dynamicScreenSpaceErrorFactor=4,this.dynamicScreenSpaceErrorHeightFalloff=.25,this._dynamicScreenSpaceErrorComputedDensity=0,this.shadows=e$1Y(e.shadows,q$Q.ENABLED),this.show=e$1Y(e.show,!0),this.colorBlendMode=v$E.HIGHLIGHT,this.colorBlendAmount=.5,this.pointCloudShading=new n$C(e.pointCloudShading),this._pointCloudEyeDomeLighting=new u$E,this.loadProgress=new o$15,this.allTilesLoaded=new o$15,this.initialTilesLoaded=new o$15,this.tileLoad=new o$15,this.tileUnload=new o$15,this.tileFailed=new o$15,this.tileVisible=new o$15,this.skipLevelOfDetail=e$1Y(e.skipLevelOfDetail,!1),this._skipLevelOfDetail=this.skipLevelOfDetail,this._disableSkipLevelOfDetail=!1,this.baseScreenSpaceError=e$1Y(e.baseScreenSpaceError,1024),this.skipScreenSpaceErrorFactor=e$1Y(e.skipScreenSpaceErrorFactor,16),this.skipLevels=e$1Y(e.skipLevels,1),this.immediatelyLoadDesiredLevelOfDetail=e$1Y(e.immediatelyLoadDesiredLevelOfDetail,!1),this.loadSiblings=e$1Y(e.loadSiblings,!1),this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._imageBasedLightingFactor=new r$T(1,1),r$T.clone(e.imageBasedLightingFactor,this._imageBasedLightingFactor),this.lightColor=e.lightColor,this.luminanceAtZenith=e$1Y(e.luminanceAtZenith,.2),this.sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,this.specularEnvironmentMaps=e.specularEnvironmentMaps,this.debugFreezeFrame=e$1Y(e.debugFreezeFrame,!1),this.debugColorizeTiles=e$1Y(e.debugColorizeTiles,!1),this.debugWireframe=e$1Y(e.debugWireframe,!1),this.debugShowBoundingVolume=e$1Y(e.debugShowBoundingVolume,!1),this.debugShowContentBoundingVolume=e$1Y(e.debugShowContentBoundingVolume,!1),this.debugShowViewerRequestVolume=e$1Y(e.debugShowViewerRequestVolume,!1),this._tileDebugLabels=void 0,this.debugPickedTileLabelOnly=!1,this.debugPickedTile=void 0,this.debugPickPosition=void 0,this.debugShowGeometricError=e$1Y(e.debugShowGeometricError,!1),this.debugShowRenderingStatistics=e$1Y(e.debugShowRenderingStatistics,!1),this.debugShowMemoryUsage=e$1Y(e.debugShowMemoryUsage,!1),this.debugShowUrl=e$1Y(e.debugShowUrl,!1),this.isSuperMapiServer=e$1Y(e.isSuperMapiServer,!1),this._swipeRegion=new a$10(0,0,1,1),this._swipeEnabled=!1;var i,n=this;c$18(e.url).then((function(e){var t;return i=t$X.createIfNeeded(e),n._credits=i.credits,"json"===i.extension?t=i.getBaseUri(!0):i.isDataUri&&(t=""),n._url=i.url,n._basePath=t,f$B.loadJson(i)})).then((function(e){n._root=n.loadTileset(i,e);var t=t$$(e.asset.gltfUpAxis)?z$y.fromName(e.asset.gltfUpAxis):z$y.Y,r=e.asset;n._asset=r,n._properties=e.properties,n._geometricError=e.geometricError,n._extensionsUsed=e.extensionsUsed,n._gltfUpAxis=t,n._extras=e.extras;var o=r.extras;if(t$$(o)&&t$$(o.cesium)&&t$$(o.cesium.credits)){var a=o.cesium.credits,s=n._credits;t$$(s)||(s=[],n._credits=s);for(var l=0;l<a.length;++l){var u=a[l];s.push(new i$17(u.html,u.showOnScreen))}}var c=n._root.createBoundingVolume(e.root.boundingVolume,c$1a.IDENTITY).boundingSphere.center,h=n._ellipsoid.cartesianToCartographic(c);t$$(h)&&h.height>e$1P._defaultMinTerrainHeight&&(n._initialClippingPlanesOriginMatrix=m$13.eastNorthUpToFixedFrame(c)),n._clippingPlanesOriginMatrix=c$1a.clone(n._initialClippingPlanesOriginMatrix),n._readyPromise.resolve(n)})).otherwise((function(e){n._readyPromise.reject(e)}))}o$y.prototype.colorize=function(e,t){if(t$$(this.tilePropertyName)&&e.contentAvailable&&e._selectedFrame===t.frameNumber){var i=d$z(this,e),n=this._previousMinimum,r=this._previousMaximum;if(n!==Number.MAX_VALUE&&r!==-Number.MAX_VALUE){var o=r-n+n$1d.EPSILON7,a=n$1d.clamp(i-n,0,o)/o*(l$A.length-1),s=Math.floor(a),l=Math.ceil(a),u=a-s,c=l$A[s],h=l$A[l],d=e$1z.clone(e$1z.WHITE);d.red=n$1d.lerp(c.red,h.red,u),d.green=n$1d.lerp(c.green,h.green,u),d.blue=n$1d.lerp(c.blue,h.blue,u),e._debugColor=d}}},o$y.prototype.resetMinimumMaximum=function(){var e=this.tilePropertyName;if(t$$(e)){var t=this._referenceMinimum[e],i=this._referenceMaximum[e],n=t$$(t)&&t$$(i);this._previousMinimum=n?t:this._minimum,this._previousMaximum=n?i:this._maximum,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE}},s$x.prototype.clear=function(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfFeaturesSelected=0,this.numberOfPointsSelected=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0},s$x.prototype.incrementSelectionCounts=function(e){u$z(this,e,!1,!1)},s$x.prototype.incrementLoadCounts=function(e){u$z(this,e,!1,!0)},s$x.prototype.decrementLoadCounts=function(e){u$z(this,e,!0,!0)},s$x.clone=function(e,t){t.selected=e.selected,t.visited=e.visited,t.numberOfCommands=e.numberOfCommands,t.selected=e.selected,t.numberOfAttemptedRequests=e.numberOfAttemptedRequests,t.numberOfPendingRequests=e.numberOfPendingRequests,t.numberOfTilesProcessing=e.numberOfTilesProcessing,t.numberOfTilesWithContentReady=e.numberOfTilesWithContentReady,t.numberOfTilesTotal=e.numberOfTilesTotal,t.numberOfFeaturesSelected=e.numberOfFeaturesSelected,t.numberOfFeaturesLoaded=e.numberOfFeaturesLoaded,t.numberOfPointsSelected=e.numberOfPointsSelected,t.numberOfPointsLoaded=e.numberOfPointsLoaded,t.numberOfTrianglesSelected=e.numberOfTrianglesSelected,t.numberOfTilesStyled=e.numberOfTilesStyled,t.numberOfFeaturesStyled=e.numberOfFeaturesStyled,t.numberOfTilesCulledWithChildrenUnion=e.numberOfTilesCulledWithChildrenUnion,t.geometryByteLength=e.geometryByteLength,t.texturesByteLength=e.texturesByteLength,t.batchTableByteLength=e.batchTableByteLength},Object.defineProperties(e$K.prototype,{style:{get:function(){return this._style},set:function(e){this._style=e,this._styleDirty=!0}}}),e$K.prototype.makeDirty=function(){this._styleDirty=!0},e$K.prototype.applyStyle=function(e,t){if(e.ready&&(!t$$(this._style)||this._style.ready)){var i=this._styleDirty;t.isRender&&(this._styleDirty=!1),i&&++this._lastStyleTime;for(var n=this._lastStyleTime,r=e._statistics,o=i?e._selectedTiles:e._selectedTilesToStyle,a=o.length,s=0;s<a;++s){var l=o[s];if(l.lastStyleTime!==n){var u=l.content;l.lastStyleTime=n,u.applyStyle(this._style),r.numberOfFeaturesStyled+=u.featuresLength,++r.numberOfTilesStyled}}}},Object.defineProperties(f$B.prototype,{isCesium3DTileset:{get:function(){return!0}},asset:{get:function(){if(!this.ready)throw new t$_("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._asset}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){l$G.setOwner(e,this,"_clippingPlanes")}},properties:{get:function(){if(!this.ready)throw new t$_("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._properties}},ready:{get:function(){return t$$(this._root)}},readyPromise:{get:function(){return this._readyPromise.promise}},tilesLoaded:{get:function(){return this._tilesLoaded}},url:{get:function(){return this._url}},basePath:{get:function(){return i$1b("Cesium3DTileset.basePath","Cesium3DTileset.basePath has been deprecated. All tiles are relative to the url of the tileset JSON file that contains them. Use the url property instead."),this._basePath}},style:{get:function(){return this._styleEngine.style},set:function(e){this._styleEngine.style=e}},maximumScreenSpaceError:{get:function(){return this._maximumScreenSpaceError},set:function(e){n$1e.typeOf.number.greaterThanOrEquals("maximumScreenSpaceError",e,0),this._maximumScreenSpaceError=e}},maximumMemoryUsage:{get:function(){return this._maximumMemoryUsage},set:function(e){n$1e.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumMemoryUsage=e}},root:{get:function(){if(!this.ready)throw new t$_("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._root}},boundingSphere:{get:function(){if(!this.ready)throw new t$_("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._root.updateTransform(this._modelMatrix),this._root.boundingSphere}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=c$1a.clone(e,this._modelMatrix)}},swipeRegion:{get:function(){return new n$13(this._swipeRegion.x,this._swipeRegion.y,this._swipeRegion.z-this._swipeRegion.x,this._swipeRegion.w-this._swipeRegion.y)},set:function(e){if(t$$(e)){if(!(e instanceof n$13))throw new t$_("swipeRegion must be a instance of BoundingRectangle.");a$10.fromElements(e.x,e.y,e.x+e.width,e.y+e.height,this._swipeRegion)}}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){if(e!==this._swipeEnabled){e||a$10.fromElements(0,0,1,1,this._swipeRegion),this._swipeEnabled=e;var t=[];for(t.push(this.root);t.length>0;)for(var i=t.pop().children,n=i.length,r=0;r<n;++r)if(t.push(i[r]),t$$(i[r]._content)){var o=i[r]._content._model;!t$$(o)||(o._shouldRegenerateShaders=!0)}}}},timeSinceLoad:{get:function(){return this._timeSinceLoad}},totalMemoryUsageInBytes:{get:function(){var e=this._statistics;return e.texturesByteLength+e.geometryByteLength+e.batchTableByteLength}},clippingPlanesOriginMatrix:{get:function(){return t$$(this._clippingPlanesOriginMatrix)?(this._clippingPlanesOriginMatrixDirty&&(c$1a.multiply(this.root.computedTransform,this._initialClippingPlanesOriginMatrix,this._clippingPlanesOriginMatrix),this._clippingPlanesOriginMatrixDirty=!1),this._clippingPlanesOriginMatrix):c$1a.IDENTITY}},styleEngine:{get:function(){return this._styleEngine}},statistics:{get:function(){return this._statistics}},classificationType:{get:function(){return this._classificationType}},ellipsoid:{get:function(){return this._ellipsoid}},foveatedConeSize:{get:function(){return this._foveatedConeSize},set:function(e){n$1e.typeOf.number.greaterThanOrEquals("foveatedConeSize",e,0),n$1e.typeOf.number.lessThanOrEquals("foveatedConeSize",e,1),this._foveatedConeSize=e}},foveatedMinimumScreenSpaceErrorRelaxation:{get:function(){return this._foveatedMinimumScreenSpaceErrorRelaxation},set:function(e){n$1e.typeOf.number.greaterThanOrEquals("foveatedMinimumScreenSpaceErrorRelaxation",e,0),n$1e.typeOf.number.lessThanOrEquals("foveatedMinimumScreenSpaceErrorRelaxation",e,this.maximumScreenSpaceError),this._foveatedMinimumScreenSpaceErrorRelaxation=e}},extras:{get:function(){if(!this.ready)throw new t$_("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._extras}},imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){n$1e.typeOf.object("imageBasedLightingFactor",e),n$1e.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.x",e.x,0),n$1e.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.x",e.x,1),n$1e.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.y",e.y,0),n$1e.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.y",e.y,1),r$T.clone(e,this._imageBasedLightingFactor)}}}),f$B.loadJson=function(e){return t$X.createIfNeeded(e).fetchJson()},f$B.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$_("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},f$B.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$_("the index is 0~8");return 1<<e&this._visibleViewport},f$B.prototype.makeStyleDirty=function(){this._styleEngine.makeDirty()},f$B.prototype.loadTileset=function(e,t,i){var n=t.asset;if(!t$$(n))throw new t$Z("Tileset must have an asset property.");if("0.0"!==n.version&&"1.0"!==n.version)throw new t$Z("The tileset must be 3D Tiles version 0.0 or 1.0.");var r=this._statistics,o=n.tilesetVersion;t$$(o)&&(this._basePath+="?v="+o,e.setQueryParameters({v:o}));var a=new c$y(this,e,t.root,i);t$$(i)&&(i.children.push(a),a._depth=i._depth+1);var s=[];for(s.push(a);s.length>0;){var l=s.pop();++r.numberOfTilesTotal,this._allTilesAdditive=this._allTilesAdditive&&l.refine===l$D.ADD;var u=l._header.children;if(t$$(u))for(var c=u.length,h=0;h<c;++h){var d=new c$y(this,e,u[h],l);l.children.push(d),d._depth=l._depth+1,s.push(d)}this._cullWithChildrenBounds&&A$E.checkChildrenWithinParent(l)}return a};var j$y=new a$11,Me$f=new i$1g,Pe$d=new c$1a,xe$l=new a$11,Ce$e=new a$11,Oe$f=new a$11;function De$k(e,t){var i,n,r,o,a,s=t.camera,l=e._root,u=l.contentBoundingVolume;if(u instanceof _$v)i=a$11.normalize(s.positionWC,j$y),n=s.directionWC,r=s.positionCartographic.height,o=u.minimumHeight,a=u.maximumHeight;else{var c=c$1a.inverseTransformation(l.computedTransform,Pe$d),h=t.mapProjection.ellipsoid,d=u.boundingVolume,f=c$1a.multiplyByPoint(c,d.center,xe$l);if(a$11.magnitude(f)>h.minimumRadius){var p=i$1g.fromCartesian(f,h,Me$f);i=a$11.normalize(s.positionWC,j$y),n=s.directionWC,r=s.positionCartographic.height,o=0,a=2*p.height}else{var _=c$1a.multiplyByPoint(c,s.positionWC,Ce$e);if(i=a$11.UNIT_Z,n=c$1a.multiplyByPointAsVector(c,s.directionWC,Oe$f),n=a$11.normalize(n,n),r=_.z,u instanceof s$y){var m=l._header.boundingVolume.box[11];o=f.z-m,a=f.z+m}else if(u instanceof t$u){var $=d.radius;o=f.z-$,a=f.z+$}}}var g=o+(a-o)*e.dynamicScreenSpaceErrorHeightFalloff,y=a,v=n$1d.clamp((r-g)/(y-g),0,1),x=1-Math.abs(a$11.dot(n,i));x*=1-v;var b=e.dynamicScreenSpaceErrorDensity;b*=x,e._dynamicScreenSpaceErrorComputedDensity=b}function Re$a(e,t){if(!t.hasEmptyContent){var i=e._statistics,n=t.contentExpired;if(!t.requestContent())return void++i.numberOfAttemptedRequests;n&&(t.hasTilesetContent?He$a(e,t):(i.decrementLoadCounts(t.content),--i.numberOfTilesWithContentReady)),++i.numberOfPendingRequests,e._requestedTilesInFlight.push(t),t.contentReadyToProcessPromise.then(Fe$9(e,t)),t.contentReadyPromise.then(Ne$b(e,t)).otherwise(Be$e(e,t))}}function Ae$c(e,t){return e._priority-t._priority}function Ue$9(e,t){for(var i=e._requestedTilesInFlight,n=0,r=i.length,o=0;o<r;++o){var a=i[o],s=t.frameNumber-a._touchedFrame>=1;a._contentState===X$p.LOADING?s?(a._request.cancel(),++n):n>0&&(i[o-n]=a):++n}i.length-=n}function Ve$c(e,t){var i=e._requestedTiles,n=i.length;i.sort(Ae$c);for(var r=0;r<n;++r)Re$a(e,i[r])}function Fe$9(e,t){return function(){e._processingQueue.push(t),--e._statistics.numberOfPendingRequests,++e._statistics.numberOfTilesProcessing}}function Be$e(e,t){return function(i){var n=t._contentResource.url,r=t$$(i.message)?i.message:i.toString();e.tileFailed.numberOfListeners>0?e.tileFailed.raiseEvent({url:n,message:r}):(console.log("A 3D tile failed to load: "+n),console.log("Error: "+r))}}function Ne$b(e,t){return function(){--e._statistics.numberOfTilesProcessing,t.hasTilesetContent||(e._statistics.incrementLoadCounts(t.content),++e._statistics.numberOfTilesWithContentReady,++e._statistics.numberOfLoadedTilesTotal,e._cache.add(t)),e.tileLoad.raiseEvent(t)}}function qe$a(e){for(var t=e._processingQueue,i=t.length,n=0,r=0;r<i;++r){var o=t[r];o._contentState===X$p.PROCESSING?n>0&&(t[r-n]=o):++n}t.length-=n}function Ie$e(e,t){qe$a(e);for(var i=e._processingQueue,n=i.length,r=0;r<n;++r)i[r].process(e,t)}f$B.prototype.postPassesUpdate=function(e){!this.ready||(Ue$9(this,e),Ge$8(this,e),this._cache.unloadTiles(this,J$v))},f$B.prototype.prePassesUpdate=function(e){if(this.ready){Ie$e(this,e);var t=this._clippingPlanes;this._clippingPlanesOriginMatrixDirty=!0,t$$(t)&&t.enabled&&t.update(e),t$$(this._loadTimestamp)||(this._loadTimestamp=o$10.clone(e.time)),this._timeSinceLoad=Math.max(1e3*o$10.secondsDifference(e.time,this._loadTimestamp),0),this._skipLevelOfDetail=this.skipLevelOfDetail&&!t$$(this._classificationType)&&!this._disableSkipLevelOfDetail&&!this._allTilesAdditive,this.dynamicScreenSpaceError&&De$k(this,e),e.newFrame&&this._cache.reset()}};var O$s=new a$11,ke$8={maximumFractionDigits:3};function Y$v(e){var t=e/1048576;return t<1?t.toLocaleString(void 0,ke$8):Math.round(t).toLocaleString()}function U$A(e){var t=e.boundingVolume.boundingVolume,i=t.halfAxes,n=t.radius,r=a$11.clone(t.center,O$s);if(t$$(i))r.x+=.75*(i[0]+i[3]+i[6]),r.y+=.75*(i[1]+i[4]+i[7]),r.z+=.75*(i[2]+i[5]+i[8]);else if(t$$(n)){var o=a$11.normalize(t.center,O$s);o=a$11.multiplyByScalar(o,.75*n,O$s),r=a$11.add(o,t.center,O$s)}return r}function V$p(e,t,i){var n="",r=0;(t.debugShowGeometricError&&(n+="\nGeometric error: "+e.geometricError,r++),t.debugShowRenderingStatistics)&&(n+="\nCommands: "+e.commandsLength,r++,e.content.pointsLength>0&&(n+="\nPoints: "+e.content.pointsLength,r++),e.content.trianglesLength>0&&(n+="\nTriangles: "+e.content.trianglesLength,r++),n+="\nFeatures: "+e.content.featuresLength,r++);t.debugShowMemoryUsage&&(n+="\nTexture Memory: "+Y$v(e.content.texturesByteLength),n+="\nGeometry Memory: "+Y$v(e.content.geometryByteLength),r+=2),t.debugShowUrl&&(n+="\nUrl: "+e._header.content.uri,r++);var o={text:n.substring(1),position:i,font:19-r+"px sans-serif",showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY};return t._tileDebugLabels.add(o)}function We$c(e,t){var i,n,r=e._selectedTiles,o=r.length,a=e._emptyTiles,s=a.length;if(e._tileDebugLabels.removeAll(),e.debugPickedTileLabelOnly){if(t$$(e.debugPickedTile)){var l=t$$(e.debugPickPosition)?e.debugPickPosition:U$A(e.debugPickedTile);V$p(e.debugPickedTile,e,l).pixelOffset=new r$T(15,-15)}}else{for(i=0;i<o;++i)V$p(n=r[i],e,U$A(n));for(i=0;i<s;++i)(n=a[i]).hasTilesetContent&&V$p(n,e,U$A(n))}e._tileDebugLabels.update(t)}function ze$b(e,t,i){e._styleEngine.applyStyle(e,i);var n,r,o=i.isRender,a=e._statistics,s=t.commandList,l=s.length,u=e._selectedTiles,c=u.length,h=e._emptyTiles,d=h.length,f=e.tileVisible,p=e._skipLevelOfDetail&&e._hasMixedContent&&t.context.stencilBuffer&&c>0;e._backfaceCommands.length=0,p&&(t$$(e._stencilClearCommand)||(e._stencilClearCommand=new r$M({stencil:0,pass:we$l.CESIUM_3D_TILE,renderState:p$1a.fromCache({stencilMask:Ia$1.SKIP_LOD_MASK})})),s.push(e._stencilClearCommand));var _=s.length;for(n=0;n<c;++n)r=u[n],o&&f.raiseEvent(r),r.update(e,t,i),a.incrementSelectionCounts(r.content),++a.selected;for(n=0;n<d;++n)(r=h[n]).update(e,t,i);var m=s.length-_;if(e._backfaceCommands.trim(),p){var $=e._backfaceCommands.values,g=$.length;for(s.length+=g,n=m-1;n>=0;--n)s[_+g+n]=s[_+n];for(n=0;n<g;++n)s[_+n]=$[n]}m=s.length-l,a.numberOfCommands=m,o&&e.pointCloudShading.attenuation&&e.pointCloudShading.eyeDomeLighting&&m>0&&e._pointCloudEyeDomeLighting.update(t,l,e.pointCloudShading),o&&(e.debugShowGeometricError||e.debugShowRenderingStatistics||e.debugShowMemoryUsage||e.debugShowUrl?(t$$(e._tileDebugLabels)||(e._tileDebugLabels=new m$A),We$c(e,t)):e._tileDebugLabels=e._tileDebugLabels&&e._tileDebugLabels.destroy())}var Q$r=[];function He$a(e,t){var i=t,n=Q$r;for(n.push(t);n.length>0;){for(var r=(t=n.pop()).children,o=r.length,a=0;a<o;++a)n.push(r[a]);t!==i&&(Xe$7(e,t),--e._statistics.numberOfTilesTotal)}i.children=[]}function J$v(e,t){e.tileUnload.raiseEvent(t),e._statistics.decrementLoadCounts(t.content),--e._statistics.numberOfTilesWithContentReady,t.unloadContent()}function Xe$7(e,t){e._cache.unloadTile(e,t,J$v),t.destroy()}function Ge$8(e,t){var i=e._statistics,n=e._statisticsLast,r=i.numberOfPendingRequests,o=i.numberOfTilesProcessing,a=n.numberOfPendingRequests,s=n.numberOfTilesProcessing;s$x.clone(i,n);var l=r!==a||o!==s;l&&t.afterRender.push((function(){e.loadProgress.raiseEvent(r,o)})),e._tilesLoaded=0===i.numberOfPendingRequests&&0===i.numberOfTilesProcessing&&0===i.numberOfAttemptedRequests,l&&e._tilesLoaded&&(t.afterRender.push((function(){e.allTilesLoaded.raiseEvent()})),e._initialTilesLoaded||(e._initialTilesLoaded=!0,t.afterRender.push((function(){e.initialTilesLoaded.raiseEvent()}))))}function je$a(e){e._heatmap.resetMinimumMaximum(),e._minimumPriority.depth=Number.MAX_VALUE,e._maximumPriority.depth=-Number.MAX_VALUE,e._minimumPriority.foveatedFactor=Number.MAX_VALUE,e._maximumPriority.foveatedFactor=-Number.MAX_VALUE,e._minimumPriority.distance=Number.MAX_VALUE,e._maximumPriority.distance=-Number.MAX_VALUE,e._minimumPriority.reverseScreenSpaceError=Number.MAX_VALUE,e._maximumPriority.reverseScreenSpaceError=-Number.MAX_VALUE}function Ye$a(e,t){(t.frameNumber!==e._updatedModelMatrixFrame||!t$$(e._previousModelMatrix))&&(e._updatedModelMatrixFrame=t.frameNumber,e._modelMatrixChanged=!c$1a.equals(e.modelMatrix,e._previousModelMatrix),e._previousModelMatrix=c$1a.clone(e.modelMatrix,e._previousModelMatrix))}function Qe$9(e,t,i,n){if(t.mode===b$1d.MORPHING||!e.ready)return!1;var r=e._statistics;r.clear();var o=n.isRender;++e._updatedVisibilityFrame,je$a(e),Ye$a(e,t),e._cullRequestsWhileMoving=e.cullRequestsWhileMoving&&!e._modelMatrixChanged;var a=n.traversal.selectTiles(e,t),s=t.context;if(n.requestTiles&&s.memorySize<s.memoryThresholdValue&&Ve$c(e),ze$b(e,t,n),s$x.clone(r,i),o){var l=e._credits;if(t$$(l)&&0!==r.selected)for(var u=l.length,c=0;c<u;++c)t.creditDisplay.addCredit(l[c])}return a}f$B.prototype.trimLoadedTiles=function(){this._cache.trim()},f$B.prototype.update=function(e){if(e.multiViewportIndex>-1&&!this.getVisibleInViewport(e.multiViewportIndex))return;this.frameState=e,this.updateForPass(e,e.tilesetPassState)},f$B.prototype.updateForPass=function(e,t){n$1e.typeOf.object("frameState",e),n$1e.typeOf.object("tilesetPassState",t);var i=t.pass;if((i!==_t$6.PRELOAD||this.preloadWhenHidden&&!this.show)&&(i!==_t$6.PRELOAD_FLIGHT||this.preloadFlightDestinations&&(this.show||this.preloadWhenHidden))&&(i!==_t$6.REQUEST_RENDER_MODE_DEFER_CHECK||!(!this._cullRequestsWhileMoving&&this.foveatedTimeDelay<=0||!this.show))){var n=e.commandList,r=e.camera,o=e.cullingVolume;t.ready=!1;var a=_t$6.getPassOptions(i),s=a.ignoreCommands,l=e$1Y(t.commandList,n),u=l.length;e.commandList=l,e.camera=e$1Y(t.camera,r),e.cullingVolume=e$1Y(t.cullingVolume,o);var c=this._statisticsPerPass[i];(this.show||s)&&(this._pass=i,t.ready=Qe$9(this,e,c,a)),s&&(l.length=u),e.commandList=n,e.camera=r,e.cullingVolume=o}},f$B.prototype.hasExtension=function(e){return!!t$$(this._extensionsUsed)&&this._extensionsUsed.indexOf(e)>-1},f$B.prototype.isDestroyed=function(){return!1},f$B.prototype.destroy=function(){if(this._tileDebugLabels=this._tileDebugLabels&&this._tileDebugLabels.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),t$$(this._root)){var e=Q$r;for(e.push(this._root);e.length>0;){var t=e.pop();t.destroy();for(var i=t.children,n=i.length,r=0;r<n;++r)e.push(i[r])}}return this._root=void 0,s$1e(this)};var P$o=new c$1a;function a$v(e,t){if(!t$$(e))throw new t$_("scene is required.");if(!t$$(t))throw new t$_("entityCollection is required.");t.collectionChanged.addEventListener(a$v.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._tilesetHash={},this._entitiesToVisualize=new e$1F,this._onCollectionChanged(t,t.values,[],[])}function _$u(e,t,i,n){var r=i[t.id];t$$(r)&&(n.removeAndDestroy(r.tilesetPrimitive),delete i[t.id])}function V$o(e,t,i){e.readyPromise.otherwise((function(e){console.error(e),i[t.id].loadFail=!0}))}a$v.prototype.update=function(e){if(!t$$(e))throw new t$_("time is required.");for(var t=this._entitiesToVisualize.values,i=this._tilesetHash,n=this._primitives,r=0,o=t.length;r<o;r++){var a,s,l=t[r],u=l._tileset,c=i[l.id],h=l.isShowing&&l.isAvailable(e)&&r$w.getValueOrDefault(u._show,e,!0);if(h&&(s=l.computeModelMatrix(e,P$o),a=t$X.createIfNeeded(r$w.getValueOrUndefined(u._uri,e))),h){var d=t$$(c)?c.tilesetPrimitive:void 0;(!t$$(d)||a.url!==c.url)&&(t$$(d)&&(n.removeAndDestroy(d),delete i[l.id]),(d=new f$B({url:a})).id=l,n.add(d),c={tilesetPrimitive:d,url:a.url,loadFail:!1},i[l.id]=c,V$o(d,l,i)),d.show=!0,t$$(s)&&(d.modelMatrix=s),d.maximumScreenSpaceError=r$w.getValueOrDefault(u.maximumScreenSpaceError,e,d.maximumScreenSpaceError)}else t$$(c)&&(c.tilesetPrimitive.show=!1)}return!0},a$v.prototype.isDestroyed=function(){return!1},a$v.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(a$v.prototype._onCollectionChanged,this);for(var e=this._entitiesToVisualize.values,t=this._tilesetHash,i=this._primitives,n=e.length-1;n>-1;n--)_$u(this,e[n],t,i);return s$1e(this)},a$v.prototype.getBoundingSphere=function(e,t){if(!t$$(e))throw new t$_("entity is required.");if(!t$$(t))throw new t$_("result is required.");var i=this._tilesetHash[e.id];if(!t$$(i)||i.loadFail)return A$T.FAILED;var n=i.tilesetPrimitive;return t$$(n)&&n.show?n.ready?(c$19.clone(n.boundingSphere,t),A$T.DONE):A$T.PENDING:A$T.FAILED},a$v.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a=this._entitiesToVisualize,s=this._tilesetHash,l=this._primitives;for(r=t.length-1;r>-1;r--)t$$((o=t[r])._tileset)&&a.set(o.id,o);for(r=n.length-1;r>-1;r--)t$$((o=n[r])._tileset)?a.set(o.id,o):(_$u(this,o,s,l),a.remove(o.id));for(r=i.length-1;r>-1;r--)_$u(this,o=i[r],s,l),a.remove(o.id)};var a$u=e$1z.WHITE,p$D=e$1z.BLACK,h$D=new r$T(2,2);function r$o(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._definitionChanged=new o$15,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.repeat=e.repeat}Object.defineProperties(r$o.prototype,{isConstant:{get:function(){return r$w.isConstant(this._evenColor)&&r$w.isConstant(this._oddColor)&&r$w.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},evenColor:v$J("evenColor"),oddColor:v$J("oddColor"),repeat:v$J("repeat")}),r$o.prototype.getType=function(e){return"Checkerboard"},r$o.prototype.getValue=function(e,t){return t$$(t)||(t={}),t.lightColor=r$w.getValueOrClonedDefault(this._evenColor,e,a$u,t.lightColor),t.darkColor=r$w.getValueOrClonedDefault(this._oddColor,e,p$D,t.darkColor),t.repeat=r$w.getValueOrDefault(this._repeat,e,h$D),t},r$o.prototype.equals=function(e){return this===e||e instanceof r$o&&r$w.equals(this._evenColor,e._evenColor)&&r$w.equals(this._oddColor,e._oddColor)&&r$w.equals(this._repeat,e._repeat)};var E$z={UNKNOWN:"UNKNOWN",GEOPOINT3D:"POINT3D",GEOLINE3D:"LINE3D",GEOREGION3D:"REGION3D",GEOMODEL3D:"GEOMODEL3D",GEOSPHERE:"GEOSPHERE",GEOBOX:"GEOBOX",GEOBILLBOARD:"GEOBILLBOARD",GEOELLIPSOID:"GEOELLIPSOID",GEOCYLINDER:"GEOCYLINDER",GEOCONE:"GEOCONE",GEOCIRCLE3D:"CIRCLE3D"},b$K=Object.freeze(E$z);function s$w(e,t,i){this.x=parseFloat(e)||0,this.y=parseFloat(t)||0,this.z=parseFloat(i)||0}s$w.equals=function(e,t){return e===t||t$$(e)&&t$$(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z};var e$J={CENTER:0,APEX:1},O$r=Object.freeze(e$J);function o$x(e){this.init(e)}function T$A(e,t,i,n){var r=u$Y.createVertexBuffer({context:n,typedArray:C$12.createTypedArray(t.componentDatatype,t.values),usage:A$13.STATIC_DRAW});e.push({index:i,vertexBuffer:r,componentsPerAttribute:t.componentsPerAttribute,componentDatatype:t.componentDatatype,offsetInBytes:0,strideInBytes:0,normalize:!1})}Object.defineProperties(o$x.prototype,{geoRotationX:{get:function(){return this.rotationX},set:function(e){"number"==typeof e&&(this.rotationX=e,this._isMatrixDirty=!0)}},geoRotationY:{get:function(){return this.rotationY},set:function(e){"number"==typeof e&&(this.rotationY=e,this._isMatrixDirty=!0)}},geoRotationZ:{get:function(){return this.rotationZ},set:function(e){"number"==typeof e&&(this.rotationZ=e,this._isMatrixDirty=!0)}},geoScaleX:{get:function(){return this.scaleX},set:function(e){"number"==typeof e&&(this.scaleX=e,this._isMatrixDirty=!0)}},geoScaleY:{get:function(){return this.scaleY},set:function(e){"number"==typeof e&&(this.scaleY=e,this._isMatrixDirty=!0)}},geoScaleZ:{get:function(){return this.scaleZ},set:function(e){"number"==typeof e&&(this.scaleZ=e,this._isMatrixDirty=!0)}},geoId:{get:function(){return this.id},set:function(e){"number"==typeof e&&(this.id=e,this._isMatrixDirty=!0)}},geoType:{get:function(){return this.type},set:function(e){"number"==typeof e&&(this.type=e)}},geoPosition:{get:function(){return this.position},set:function(e){e instanceof s$w&&!s$w.equals(e,this.position)&&(this.position=e,this._isMatrixDirty=!0,this._isGeometryDirty=!0)}},modelMatrix:{get:function(){return this._isMatrixDirty&&this._computeMatrix(),this._modelMatrix}},isGeometryDirty:{get:function(){return this._isGeometryDirty},set:function(e){this._isGeometryDirty=e}},isLatLon:{get:function(){return this._isLatLon},set:function(e){this._isLatLon=e}}}),o$x.prototype.init=function(e){e=e||{},this.rotationX=e$1Y(e.rotationX,0),this.rotationY=e$1Y(e.rotationY,0),this.rotationZ=e$1Y(e.rotationZ,0),this.scaleX=e$1Y(e.scaleX,1),this.scaleY=e$1Y(e.scaleY,1),this.scaleZ=e$1Y(e.scaleZ,1),this.position=e$1Y(e.position,new s$w(0,0,0)),this.id=e$1Y(e.id,0),this.type=e$1Y(e.type,b$K.UNKNOWN),this.point3Ds=[],this.parts=[],this._geometry=void 0,this._modelMatrix=new c$1a(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this._isMatrixDirty=!0,this._isGeometryDirty=!0,this._isLatLon=!0},o$x.prototype.getBounds=function(){return null},o$x.prototype._getGeometry=function(){return(!t$$(this._geometry)||this._isGeometryDirty)&&this._createGeometry(),this._geometry},o$x.prototype._computeMatrix=function(){if(this._isLatLon){var e=a$11.fromDegrees(this.position.x,this.position.y,this.position.z),t=n$1d.toRadians(this.rotationX),i=n$1d.toRadians(this.rotationY),n=new e$1L(n$1d.toRadians(this.rotationZ),t,i),r=new a$11(this.scaleX,this.scaleY,this.scaleZ),o=new a$U,a=new c$1a,s=a$U.fromHeadingPitchRoll(n,o),l=c$1a.fromTranslationQuaternionRotationScale(a$11.ZERO,s,r,a);if(this._modelMatrix=m$13.eastNorthUpToFixedFrame(e,n$1c.WGS84,this._modelMatrix),"GEOCONE"===this.type&&this._rotateOrigin===O$r.APEX){var u,c,h;if(l=c$1a.fromTranslationQuaternionRotationScale(a$11.ZERO,s,new a$11(1,1,1),a),!t$$(this._vertex))return void(this._isMatrixDirty=!1);var d=new c$1a;c$1a.inverse(this._modelMatrix,d);var f=c$1a.clone(this._modelMatrix),p=new c$1a;c$1a.fromScale(r,p);var _=c$1a.multiplyByPoint(d,this._vertex,new a$11);_=c$1a.multiplyByPoint(p,_,new a$11),_=c$1a.multiplyByPoint(f,_,new a$11);var m=a$11.subtract(_,e,new a$11);u=c$1a.fromTranslation(m),c$1a.multiply(u,this._modelMatrix,this._modelMatrix),c$1a.multiply(l,this._modelMatrix,this._modelMatrix),c$1a.multiplyByScale(this._modelMatrix,r,this._modelMatrix),h=c$1a.multiplyByPoint(u,_,new a$11),h=c$1a.multiplyByPoint(l,h,new a$11);var $=a$11.subtract(_,h,new a$11);c=c$1a.fromTranslation($),c$1a.multiply(c,this._modelMatrix,this._modelMatrix)}else c$1a.multiply(this._modelMatrix,l,this._modelMatrix)}else{e=new a$11(this.position.x,this.position.y,this.position.z);c$1a.fromTranslation(e,this._modelMatrix,this._modelMatrix)}this._isMatrixDirty=!1},o$x.prototype._createGeometry=function(){},o$x.prototype._getVertexBuffer=function(e){let t=this._getGeometry();return(!t$$(this._vertexBuffer)||this._vertexBuffer.isDestroyed())&&(this._vertexBuffer=u$Y.createVertexBuffer({context:e,typedArray:C$12.createTypedArray(C$12.FLOAT,t.attributes.position.values),usage:A$13.STATIC_DRAW})),this._vertexBuffer},o$x.prototype.getVertexArray=function(e){let t=this._getGeometry(),i=[];i.push({index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1});var n=t.attributes.normal;t$$(n)&&T$A(i,n,1,e);var r=t.attributes.st;return t$$(r)&&T$A(i,r,2,e),new x$18({context:e,attributes:i,indexBuffer:u$Y.createIndexBuffer({context:e,typedArray:t.indices,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT})})},o$x.prototype.getOutlineVertexArray=function(e){};var c$x={id:void 0};function g$q(e){if(e._firing)e._refire=!0;else if(0===e._suspendCount){var t=e._addedEntities,i=e._removedEntities,n=e._changedEntities;if(0!==n.length||0!==t.length||0!==i.length){e._firing=!0;do{e._refire=!1;var r=t.values.slice(0),o=i.values.slice(0),a=n.values.slice(0);t.removeAll(),i.removeAll(),n.removeAll(),e._collectionChanged.raiseEvent(e,r,o,a)}while(e._refire);e._firing=!1}}}function r$n(e){this._owner=e,this._entities=new e$1F,this._addedEntities=new e$1F,this._removedEntities=new e$1F,this._changedEntities=new e$1F,this._suspendCount=0,this._collectionChanged=new o$15,this._id=t$U(),this._show=!0,this._firing=!1,this._refire=!1}function b$J(e){if(t$$(e.box))return{position:a$11.fromDegrees(e.position.x,e.position.y,e.position.z+e.height/2),box:{dimensions:new a$11(e.box.dimensions.x,e.box.dimensions.y,e.box.dimensions.z),material:new e$1z(0,0,1,.2)}};if(t$$(e.cylinder))return{position:a$11.fromDegrees(e.position.x,e.position.y,e.position.z+e.height/2),cylinder:{length:e.cylinder.length,topRadius:e.cylinder.topRadius,bottomRadius:e.cylinder.bottomRadius,material:new e$1z(0,0,1,.2)}};if(t$$(e.billboard))return{position:a$11.fromDegrees(e.position.x,e.position.y,e.position.z+e.height/2),billboard:{image:e.imagePath,width:e.width,height:e.height}};if(t$$(e.ellipsoid))return t$$(e.radius)?{position:a$11.fromDegrees(e.position.x,e.position.y,e.position.z+e.radius),ellipsoid:{radii:new a$11(e.radius,e.radius,e.radius),material:new e$1z(0,0,1,.2)}}:{position:a$11.fromDegrees(e.position.x,e.position.y,e.position.z+e.yAxis),ellipsoid:{radii:new a$11(e.ellipsoid.radii.x,e.ellipsoid.radii.y,e.ellipsoid.radii.z),material:new e$1z(0,0,1,.2)}};if(t$$(e.polygon))return{polygon:{hierarchy:e.polygon.points,material:new e$1z(1,0,0,.1),extrudedHeight:e.polygon.extrudedHeight,perPositionHeight:e.polygon.perPositionHeight,height:e.polygon.height}};if(t$$(e.polyline)){for(var t=[],i=0,n=e.polyline.positions.length;i<n;++i)t.push(a$11.fromDegrees(e.polyline.positions[i].x,e.polyline.positions[i].y,e.polyline.positions[i].z));return{polyline:{positions:t,width:5,material:new e$1z(1,0,0,1)}}}return t$$(e.ellipse)?{position:a$11.fromDegrees(e.position.x,e.position.y,e.position.z),ellipse:{semiMinorAxis:e.ellipse.semiMinorAxis,semiMajorAxis:e.ellipse.semiMajorAxis,height:e.position.z,material:new e$1z(0,0,1,.2)}}:"POINT3D"===e.type?{position:a$11.fromDegrees(e.x,e.y,e.z),point:new s$L({color:new e$1z(1,1,0),pixelSize:10,outlineColor:new e$1z(0,1,1)})}:{}}r$n.prototype.suspendEvents=function(){this._suspendCount++},r$n.prototype.resumeEvents=function(){if(0===this._suspendCount)throw new t$_("resumeEvents can not be called before suspendEvents.");this._suspendCount--,g$q(this)},r$n.collectionChangedEventCallback=void 0,Object.defineProperties(r$n.prototype,{collectionChanged:{get:function(){return this._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._entities.values}},show:{get:function(){return this._show},set:function(e){if(!t$$(e))throw new t$_("value is required.");if(e!==this._show){this.suspendEvents();var t,i=[],n=this._entities.values,r=n.length;for(t=0;t<r;t++)i.push(n[t].isShowing);for(this._show=e,t=0;t<r;t++){var o=i[t],a=n[t];o!==a.isShowing&&a.definitionChanged.raiseEvent(a,"isShowing",a.isShowing,o)}this.resumeEvents()}}},owner:{get:function(){return this._owner}}}),r$n.prototype.computeAvailability=function(){for(var e=f$S.MAXIMUM_VALUE,t=f$S.MINIMUM_VALUE,i=this._entities.values,n=0,r=i.length;n<r;n++){var o=i[n].availability;if(t$$(o)){var a=o.start,s=o.stop;o$10.lessThan(a,e)&&!a.equals(f$S.MINIMUM_VALUE)&&(e=a),o$10.greaterThan(s,t)&&!s.equals(f$S.MAXIMUM_VALUE)&&(t=s)}}return f$S.MAXIMUM_VALUE.equals(e)&&(e=f$S.MINIMUM_VALUE),f$S.MINIMUM_VALUE.equals(t)&&(t=f$S.MAXIMUM_VALUE),new n$T({start:e,stop:t})},r$n.prototype.add=function(e){if(!t$$(e))throw new t$_("entity is required.");e instanceof o$x&&(e=b$J(e)),e instanceof l$J||(e=new l$J(e));var t=e.id,i=this._entities;if(i.contains(t))throw new t$Z("An entity with id "+t+" already exists in this collection.");return e.entityCollection=this,i.set(t,e),this._removedEntities.remove(t)||this._addedEntities.set(t,e),e.definitionChanged.addEventListener(r$n.prototype._onEntityDefinitionChanged,this),g$q(this),e},r$n.prototype.remove=function(e){return!!t$$(e)&&this.removeById(e.id)},r$n.prototype.contains=function(e){if(!t$$(e))throw new t$_("entity is required");return!!t$$(e.id)&&this._entities.get(e.id)===e},r$n.prototype.removeById=function(e){if(!t$$(e))return!1;var t=this._entities.get(e);return!!this._entities.remove(e)&&(t$$(t._polygon)&&t$$(t._polygon.outlines)&&t._polygon.outlines.removeAll(),t$$(t._polygon)&&t$$(t._polygon.clampOutlines)&&t.entityCollection._owner._entityCluster._scene._primitives.remove(t._polygon.clampOutlines),this._addedEntities.remove(e)||(this._removedEntities.set(e,t),this._changedEntities.remove(e)),this._entities.remove(e),t.definitionChanged.removeEventListener(r$n.prototype._onEntityDefinitionChanged,this),g$q(this),!0)},r$n.prototype.removeAll=function(){for(var e=this._entities,t=e.length,i=e.values,n=this._addedEntities,r=this._removedEntities,o=0;o<t;o++){var a=i[o];t$$(a._polygon)&&t$$(a._polygon.outlines)&&a._polygon.outlines.removeAll(),t$$(a._polygon)&&t$$(a._polygon.clampOutlines)&&a.entityCollection._owner._entityCluster._scene._primitives.remove(a._polygon.clampOutlines);var s=a.id;t$$(n.get(s))||(a.definitionChanged.removeEventListener(r$n.prototype._onEntityDefinitionChanged,this),r.set(s,a))}e.removeAll(),n.removeAll(),this._changedEntities.removeAll(),g$q(this)},r$n.prototype.getById=function(e){if(!t$$(e))throw new t$_("id is required.");return this._entities.get(e)},r$n.prototype.getOrCreateEntity=function(e){if(!t$$(e))throw new t$_("id is required.");var t=this._entities.get(e);return t$$(t)||(c$x.id=e,t=new l$J(c$x),this.add(t)),t},r$n.prototype._onEntityDefinitionChanged=function(e){var t=e.id;this._addedEntities.contains(t)||this._changedEntities.set(t,e),g$q(this)};var w$F={id:void 0},y$y=new Array(2);function b$I(e){for(var t=e.propertyNames,i=t.length,n=0;n<i;n++)e[t[n]]=void 0;e._name=void 0,e._availability=void 0}function A$D(e,t,i,n){y$y[0]=i,y$y[1]=n.id,t[JSON.stringify(y$y)]=n.definitionChanged.addEventListener(s$v.prototype._onDefinitionChanged,e)}function L$v(e,t,i,n){y$y[0]=i,y$y[1]=n.id;var r=JSON.stringify(y$y);t[r](),t[r]=void 0}function m$x(e){if(e._shouldRecomposite=!0,0===e._suspendCount){var t,i,n,r,o,a,s=e._collections,l=s.length,u=e._collectionsCopy,c=u.length,h=e._composite,d=new r$n(e),f=e._eventHash;for(t=0;t<c;t++)for((o=u[t]).collectionChanged.removeEventListener(s$v.prototype._onCollectionChanged,e),n=o.values,a=o.id,r=n.length-1;r>-1;r--)L$v(e,f,a,i=n[r]);for(t=l-1;t>=0;t--)for((o=s[t]).collectionChanged.addEventListener(s$v.prototype._onCollectionChanged,e),n=o.values,a=o.id,r=n.length-1;r>-1;r--){A$D(e,f,a,i=n[r]);var p=d.getById(i.id);t$$(p)||(t$$(p=h.getById(i.id))?b$I(p):(w$F.id=i.id,p=new l$J(w$F)),d.add(p)),p.merge(i)}e._collectionsCopy=s.slice(0),h.suspendEvents(),h.removeAll();var _=d.values;for(t=0;t<_.length;t++)h.add(_[t]);h.resumeEvents()}}function s$v(e,t){this._owner=t,this._composite=new r$n(this),this._suspendCount=0,this._collections=t$$(e)?e.slice():[],this._collectionsCopy=[],this._id=t$U(),this._eventHash={},m$x(this),this._shouldRecomposite=!1}function E$y(e,t){if(!t$$(t))throw new t$_("collection is required.");var i=e.indexOf(t);if(-1===i)throw new t$_("collection is not in this composite.");return i}function N$w(e,t,i){var n=e._collections;if((t=n$1d.clamp(t,0,n.length-1))!==(i=n$1d.clamp(i,0,n.length-1))){var r=n[t];n[t]=n[i],n[i]=r,m$x(e)}}function _$t(e,t,i,n){function r(){i.raiseEvent(e)}var o=[];t.removeAll();for(var a=n.length,s=0;s<a;s++){var l=n.get(s);t$$(l.data)&&-1===o.indexOf(l.data)&&t.add(l.data.definitionChanged,r)}}function e$I(){this._eventHelper=new n$W,this._definitionChanged=new o$15,this._intervals=new p$X,this._intervals.changedEvent.addEventListener(e$I.prototype._intervalsChanged,this)}function i$B(){this._definitionChanged=new o$15,this._composite=new e$I,this._composite.definitionChanged.addEventListener(i$B.prototype._raiseDefinitionChanged,this)}function t$t(e){this._referenceFrame=e$1Y(e,be$t.FIXED),this._definitionChanged=new o$15,this._composite=new e$I,this._composite.definitionChanged.addEventListener(t$t.prototype._raiseDefinitionChanged,this)}Object.defineProperties(s$v.prototype,{collectionChanged:{get:function(){return this._composite._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._composite.values}},owner:{get:function(){return this._owner}}}),s$v.prototype.addCollection=function(e,t){var i=t$$(t);if(!t$$(e))throw new t$_("collection is required.");if(i){if(t<0)throw new t$_("index must be greater than or equal to zero.");if(t>this._collections.length)throw new t$_("index must be less than or equal to the number of collections.")}i?this._collections.splice(t,0,e):(t=this._collections.length,this._collections.push(e)),m$x(this)},s$v.prototype.removeCollection=function(e){var t=this._collections.indexOf(e);return-1!==t&&(this._collections.splice(t,1),m$x(this),!0)},s$v.prototype.removeAllCollections=function(){this._collections.length=0,m$x(this)},s$v.prototype.containsCollection=function(e){return-1!==this._collections.indexOf(e)},s$v.prototype.contains=function(e){return this._composite.contains(e)},s$v.prototype.indexOfCollection=function(e){return this._collections.indexOf(e)},s$v.prototype.getCollection=function(e){if(!t$$(e))throw new t$_("index is required.","index");return this._collections[e]},s$v.prototype.getCollectionsLength=function(){return this._collections.length},s$v.prototype.raiseCollection=function(e){var t=E$y(this._collections,e);N$w(this,t,t+1)},s$v.prototype.lowerCollection=function(e){var t=E$y(this._collections,e);N$w(this,t,t-1)},s$v.prototype.raiseCollectionToTop=function(e){var t=E$y(this._collections,e);t!==this._collections.length-1&&(this._collections.splice(t,1),this._collections.push(e),m$x(this))},s$v.prototype.lowerCollectionToBottom=function(e){var t=E$y(this._collections,e);0!==t&&(this._collections.splice(t,1),this._collections.splice(0,0,e),m$x(this))},s$v.prototype.suspendEvents=function(){this._suspendCount++,this._composite.suspendEvents()},s$v.prototype.resumeEvents=function(){if(0===this._suspendCount)throw new t$_("resumeEvents can not be called before suspendEvents.");this._suspendCount--,this._shouldRecomposite&&0===this._suspendCount&&(m$x(this),this._shouldRecomposite=!1),this._composite.resumeEvents()},s$v.prototype.computeAvailability=function(){return this._composite.computeAvailability()},s$v.prototype.getById=function(e){return this._composite.getById(e)},s$v.prototype._onCollectionChanged=function(e,t,i){var n=this._collectionsCopy,r=n.length,o=this._composite;o.suspendEvents();var a,s,l,u,c=i.length,h=this._eventHash,d=e.id;for(a=0;a<c;a++){var f=i[a];L$v(this,h,d,f);var p=f.id;for(s=r-1;s>=0;s--)t$$(l=n[s].getById(p))&&(t$$(u)||b$I(u=o.getById(p)),u.merge(l));t$$(u)||o.removeById(p),u=void 0}var _=t.length;for(a=0;a<_;a++){var m=t[a];A$D(this,h,d,m);var $=m.id;for(s=r-1;s>=0;s--)t$$(l=n[s].getById($))&&(t$$(u)||(t$$(u=o.getById($))?b$I(u):(w$F.id=$,u=new l$J(w$F),o.add(u))),u.merge(l));u=void 0}o.resumeEvents()},s$v.prototype._onDefinitionChanged=function(e,t,i,n){for(var r=this._collections,o=this._composite,a=r.length,s=e.id,l=o.getById(s),u=l[t],c=!t$$(u),h=!0,d=a-1;d>=0;d--){var f=r[d].getById(e.id);if(t$$(f)){var p=f[t];if(t$$(p)){if(h){if(h=!1,!t$$(p.merge)||!t$$(p.clone)){u=p;break}u=p.clone(u)}u.merge(p)}}}c&&-1===l.propertyNames.indexOf(t)&&l.addProperty(t),l[t]=u},Object.defineProperties(e$I.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}}),e$I.prototype.getValue=function(e,t){if(!t$$(e))throw new t$_("time is required");var i=this._intervals.findDataForIntervalContainingDate(e);if(t$$(i))return i.getValue(e,t)},e$I.prototype.equals=function(e){return this===e||e instanceof e$I&&this._intervals.equals(e._intervals,r$w.equals)},e$I.prototype._intervalsChanged=function(){_$t(this,this._eventHelper,this._definitionChanged,this._intervals),this._definitionChanged.raiseEvent(this)},Object.defineProperties(i$B.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite._intervals}}}),i$B.prototype.getType=function(e){if(!t$$(e))throw new t$_("time is required");var t=this._composite._intervals.findDataForIntervalContainingDate(e);if(t$$(t))return t.getType(e)},i$B.prototype.getValue=function(e,t){if(!t$$(e))throw new t$_("time is required");var i=this._composite._intervals.findDataForIntervalContainingDate(e);if(t$$(i))return i.getValue(e,t)},i$B.prototype.equals=function(e){return this===e||e instanceof i$B&&this._composite.equals(e._composite,r$w.equals)},i$B.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(t$t.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite.intervals}},referenceFrame:{get:function(){return this._referenceFrame},set:function(e){this._referenceFrame=e}}}),t$t.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,be$t.FIXED,t)},t$t.prototype.getValueInReferenceFrame=function(e,t,i){if(!t$$(e))throw new t$_("time is required.");if(!t$$(t))throw new t$_("referenceFrame is required.");var n=this._composite._intervals.findDataForIntervalContainingDate(e);if(t$$(n))return n.getValueInReferenceFrame(e,t,i)},t$t.prototype.equals=function(e){return this===e||e instanceof t$t&&this._referenceFrame===e._referenceFrame&&this._composite.equals(e._composite,r$w.equals)},t$t.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var x$B=new i$O(0);function i$A(e){i$J.call(this,e),this._zIndex=0,this._terrainOffsetProperty=void 0}t$$(Object.create)&&(i$A.prototype=Object.create(i$J.prototype),i$A.prototype.constructor=i$A),Object.defineProperties(i$A.prototype,{zIndex:{get:function(){return this._zIndex}},terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),i$A.prototype._isOnTerrain=function(e,t){return this._fillEnabled&&!t$$(t.height)&&!t$$(t.extrudedHeight)&&f$J.isSupported(this._scene)},i$A.prototype._getIsClosed=function(e){var t=e.height,i=e.extrudedHeight;return 0===t||t$$(i)&&i!==t},i$A.prototype._computeCenter=t$_.throwInstantiationError,i$A.prototype._onEntityPropertyChanged=function(e,t,i,n){if(i$J.prototype._onEntityPropertyChanged.call(this,e,t,i,n),-1!==this._observedPropertyNames.indexOf(t)){var r=this._entity[this._geometryPropertyName];if(t$$(r)){t$$(r.zIndex)&&(t$$(r.height)||t$$(r.extrudedHeight))&&e$1Q(e$1Q.geometryZIndex),this._zIndex=e$1Y(r.zIndex,x$B),t$$(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);var o=r.heightReference,a=r.extrudedHeightReference;if(t$$(o)||t$$(a)){var s=new n$K(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new h$M(this._scene,s,o,a)}}}},i$A.prototype.destroy=function(){t$$(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0),i$J.prototype.destroy.call(this)},i$A.getGeometryHeight=function(e,t){if(n$1e.defined("heightReference",t),t$$(e))return t!==U$Y.CLAMP_TO_GROUND?e:0;t!==U$Y.NONE&&e$1Q(e$1Q.geometryHeightReference)},i$A.getGeometryExtrudedHeight=function(e,t){if(n$1e.defined("extrudedHeightReference",t),t$$(e))return t!==U$Y.CLAMP_TO_GROUND?e:i$A.CLAMP_TO_GROUND;t!==U$Y.NONE&&e$1Q(e$1Q.geometryExtrudedHeightReference)},i$A.CLAMP_TO_GROUND="clamp",i$A.computeGeometryOffsetAttribute=function(e,t,i,n){(!t$$(e)||!t$$(t))&&(t=U$Y.NONE),(!t$$(i)||!t$$(n))&&(n=U$Y.NONE);var r=0;return t!==U$Y.NONE&&r++,n===U$Y.RELATIVE_TO_GROUND&&r++,2===r?_0x165ce0.ALL:1===r?_0x165ce0.TOP:void 0};var H$y=new e$1z,P$n=a$11.ZERO,D$B=new a$11,I$D=new s$1p;function G$y(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.cornerType=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.offsetAttribute=void 0}function p$C(e,t){i$A.call(this,{entity:e,scene:t,geometryOptions:new G$y(e),geometryPropertyName:"corridor",observedPropertyNames:["availability","corridor"]}),this._onEntityPropertyChanged(e,"corridor",e.corridor,void 0)}function m$w(e,t,i){a$B.call(this,e,t,i)}function o$w(){t$_.throwInstantiationError()}function s$u(e,t){if(t$$((e=e$1Y(e,e$1Y.EMPTY_OBJECT)).disableDepthTestDistance)&&e.disableDepthTestDistance<0)throw new t$_("disableDepthTestDistance must be greater than or equal to 0.0.");var i=e.translucencyByDistance,n=e.scaleByDistance,r=e.distanceDisplayCondition;if(t$$(i)){if(i.far<=i.near)throw new t$_("translucencyByDistance.far must be greater than translucencyByDistance.near.");i=u$W.clone(i)}if(t$$(n)){if(n.far<=n.near)throw new t$_("scaleByDistance.far must be greater than scaleByDistance.near.");n=u$W.clone(n)}if(t$$(r)){if(r.far<=r.near)throw new t$_("distanceDisplayCondition.far must be greater than distanceDisplayCondition.near.");r=e$1w.clone(r)}this._show=e$1Y(e.show,!0),this._position=a$11.clone(e$1Y(e.position,a$11.ZERO)),this._actualPosition=a$11.clone(this._position),this._color=e$1z.clone(e$1Y(e.color,e$1z.WHITE)),this._outlineColor=e$1z.clone(e$1Y(e.outlineColor,e$1z.TRANSPARENT)),this._outlineWidth=e$1Y(e.outlineWidth,0),this._pixelSize=e$1Y(e.pixelSize,10),this._scaleByDistance=n,this._translucencyByDistance=i,this._distanceDisplayCondition=r,this._disableDepthTestDistance=e$1Y(e.disableDepthTestDistance,0),this._id=e.id,this._collection=e$1Y(e.collection,t),this._clusterShow=!0,this._pickId=void 0,this._pointPrimitiveCollection=t,this._dirty=!1,this._index=-1}t$$(Object.create)&&(p$C.prototype=Object.create(i$A.prototype),p$C.prototype.constructor=p$C),p$C.prototype.createFillGeometryInstance=function(e){if(n$1e.defined("time",e),!this._fillEnabled)throw new t$_("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r={show:new e$18(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:n$Z.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};this._materialProperty instanceof t$F&&(t$$(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,H$y)),t$$(t)||(t=e$1z.WHITE),r.color=r$I.fromColor(t));return t$$(this._options.offsetAttribute)&&(r.offset=o$N.fromCartesian3(r$w.getValueOrDefault(this._terrainOffsetProperty,e,P$n,D$B))),new m$P({id:i,geometry:new X$I(this._options),attributes:r})},p$C.prototype.createOutlineGeometryInstance=function(e){if(n$1e.defined("time",e),!this._outlineEnabled)throw new t$_("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$w.getValueOrDefault(this._outlineColorProperty,e,e$1z.BLACK,H$y),r={show:new e$18(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:r$I.fromColor(n),distanceDisplayCondition:n$Z.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0};return t$$(this._options.offsetAttribute)&&(r.offset=o$N.fromCartesian3(r$w.getValueOrDefault(this._terrainOffsetProperty,e,P$n,D$B))),new m$P({id:t,geometry:new D$X(this._options),attributes:r})},p$C.prototype._computeCenter=function(e,t){var i=r$w.getValueOrUndefined(this._entity.corridor.positions,e);if(t$$(i)&&0!==i.length)return a$11.clone(i[Math.floor(i.length/2)],t)},p$C.prototype._isHidden=function(e,t){return!t$$(t.positions)||!t$$(t.width)||i$J.prototype._isHidden.call(this,e,t)},p$C.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!r$w.isConstant(t.height)||!r$w.isConstant(t.extrudedHeight)||!r$w.isConstant(t.granularity)||!r$w.isConstant(t.width)||!r$w.isConstant(t.outlineWidth)||!r$w.isConstant(t.cornerType)||!r$w.isConstant(t.zIndex)||this._onTerrain&&!r$w.isConstant(this._materialProperty)&&!(this._materialProperty instanceof t$F)},p$C.prototype._setStaticOptions=function(e,t){var i=r$w.getValueOrUndefined(t.height,f$S.MINIMUM_VALUE),n=r$w.getValueOrDefault(t.heightReference,f$S.MINIMUM_VALUE,U$Y.NONE),r=r$w.getValueOrUndefined(t.extrudedHeight,f$S.MINIMUM_VALUE),o=r$w.getValueOrDefault(t.extrudedHeightReference,f$S.MINIMUM_VALUE,U$Y.NONE);t$$(r)&&!t$$(i)&&(i=0);var a=this._options;a.vertexFormat=this._materialProperty instanceof t$F?r$u.VERTEX_FORMAT:t$G.MaterialSupport.TEXTURED.vertexFormat,a.positions=t.positions.getValue(f$S.MINIMUM_VALUE,a.positions),a.width=t.width.getValue(f$S.MINIMUM_VALUE),a.granularity=r$w.getValueOrUndefined(t.granularity,f$S.MINIMUM_VALUE),a.cornerType=r$w.getValueOrUndefined(t.cornerType,f$S.MINIMUM_VALUE),a.offsetAttribute=i$A.computeGeometryOffsetAttribute(i,n,r,o),a.height=i$A.getGeometryHeight(i,n),(r=i$A.getGeometryExtrudedHeight(r,o))===i$A.CLAMP_TO_GROUND&&(r=e$1P.getMinimumMaximumHeights(X$I.computeRectangle(a,I$D)).minimumTerrainHeight),a.extrudedHeight=r},p$C.DynamicGeometryUpdater=m$w,t$$(Object.create)&&(m$w.prototype=Object.create(a$B.prototype),m$w.prototype.constructor=m$w),m$w.prototype._isHidden=function(e,t,i){var n=this._options;return!t$$(n.positions)||!t$$(n.width)||a$B.prototype._isHidden.call(this,e,t,i)},m$w.prototype._setOptions=function(e,t,i){var n=this._options,r=r$w.getValueOrUndefined(t.height,i),o=r$w.getValueOrDefault(t.heightReference,i,U$Y.NONE),a=r$w.getValueOrUndefined(t.extrudedHeight,i),s=r$w.getValueOrDefault(t.extrudedHeightReference,i,U$Y.NONE);t$$(a)&&!t$$(r)&&(r=0),n.positions=r$w.getValueOrUndefined(t.positions,i),n.width=r$w.getValueOrUndefined(t.width,i),n.granularity=r$w.getValueOrUndefined(t.granularity,i),n.cornerType=r$w.getValueOrUndefined(t.cornerType,i),n.offsetAttribute=i$A.computeGeometryOffsetAttribute(r,o,a,s),n.height=i$A.getGeometryHeight(r,o),(a=i$A.getGeometryExtrudedHeight(a,s))===i$A.CLAMP_TO_GROUND&&(a=e$1P.getMinimumMaximumHeights(X$I.computeRectangle(n,I$D)).minimumTerrainHeight),n.extrudedHeight=a},Object.defineProperties(o$w.prototype,{name:{get:t$_.throwInstantiationError},clock:{get:t$_.throwInstantiationError},entities:{get:t$_.throwInstantiationError},isLoading:{get:t$_.throwInstantiationError},changedEvent:{get:t$_.throwInstantiationError},errorEvent:{get:t$_.throwInstantiationError},loadingEvent:{get:t$_.throwInstantiationError},show:{get:t$_.throwInstantiationError},clustering:{get:t$_.throwInstantiationError}}),o$w.prototype.update=t$_.throwInstantiationError,o$w.setLoading=function(e,t){e._isLoading!==t&&(t?e._entityCollection.suspendEvents():e._entityCollection.resumeEvents(),e._isLoading=t,e._loading.raiseEvent(e,t))};var m$v=s$u.SHOW_INDEX=0,w$E=s$u.POSITION_INDEX=1,B$r=s$u.COLOR_INDEX=2,N$v=s$u.OUTLINE_COLOR_INDEX=3,b$H=s$u.OUTLINE_WIDTH_INDEX=4,q$y=s$u.PIXEL_SIZE_INDEX=5,x$A=s$u.SCALE_BY_DISTANCE_INDEX=6,O$q=s$u.TRANSLUCENCY_BY_DISTANCE_INDEX=7,A$C=s$u.DISTANCE_DISPLAY_CONDITION_INDEX=8,k$v=s$u.DISABLE_DEPTH_DISTANCE_INDEX=9;function a$t(e,t){var i=e._pointPrimitiveCollection;t$$(i)&&(i._updatePointPrimitive(e,t),e._dirty=!0)}s$u.NUMBER_OF_PROPERTIES=10,Object.defineProperties(s$u.prototype,{show:{get:function(){return this._show},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._show!==e&&(this._show=e,a$t(this,m$v))}},position:{get:function(){return this._position},set:function(e){if(!t$$(e))throw new t$_("value is required.");var t=this._position;a$11.equals(t,e)||(a$11.clone(e,t),a$11.clone(e,this._actualPosition),a$t(this,w$E))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){if(t$$(e)&&e.far<=e.near)throw new t$_("far distance must be greater than near distance.");var t=this._scaleByDistance;u$W.equals(t,e)||(this._scaleByDistance=u$W.clone(e,t),a$t(this,x$A))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){if(t$$(e)&&e.far<=e.near)throw new t$_("far distance must be greater than near distance.");var t=this._translucencyByDistance;u$W.equals(t,e)||(this._translucencyByDistance=u$W.clone(e,t),a$t(this,O$q))}},pixelSize:{get:function(){return this._pixelSize},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._pixelSize!==e&&(this._pixelSize=e,a$t(this,q$y))}},color:{get:function(){return this._color},set:function(e){if(!t$$(e))throw new t$_("value is required.");var t=this._color;e$1z.equals(t,e)||(e$1z.clone(e,t),a$t(this,B$r))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!t$$(e))throw new t$_("value is required.");var t=this._outlineColor;e$1z.equals(t,e)||(e$1z.clone(e,t),a$t(this,N$v))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._outlineWidth!==e&&(this._outlineWidth=e,a$t(this,b$H))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(t$$(e)&&e.far<=e.near)throw new t$_("far must be greater than near");e$1w.equals(this._distanceDisplayCondition,e)||(this._distanceDisplayCondition=e$1w.clone(e,this._distanceDisplayCondition),a$t(this,A$C))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){if(!t$$(e)||e<0)throw new t$_("disableDepthTestDistance must be greater than or equal to 0.0.");this._disableDepthTestDistance=e,a$t(this,k$v)}}},id:{get:function(){return this._id},set:function(e){this._id=e,t$$(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,a$t(this,m$v))}}}),s$u.prototype.getPickId=function(e){return t$$(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._collection,id:this._id})),this._pickId},s$u.prototype._getActualPosition=function(){return this._actualPosition},s$u.prototype._setActualPosition=function(e){a$11.clone(e,this._actualPosition),a$t(this,w$E)};var I$C=new a$10;s$u._computeActualPosition=function(e,t,i){return t.mode===b$1d.SCENE3D?e:(c$1a.multiplyByPoint(i,e,I$C),u$V.computeActualWgs84Position(t,I$C))};var S$r=new a$10;s$u._computeScreenSpacePosition=function(e,t,i,n){var r=c$1a.multiplyByVector(e,a$10.fromElements(t.x,t.y,t.z,1,S$r),S$r);return u$V.wgs84ToWindowCoordinates(i,r,n)},s$u.prototype.computeScreenSpacePosition=function(e,t){var i=this._pointPrimitiveCollection;if(t$$(t)||(t=new r$T),!t$$(i))throw new t$_("PointPrimitive must be in a collection.");if(!t$$(e))throw new t$_("scene is required.");var n=i.modelMatrix,r=s$u._computeScreenSpacePosition(n,this._actualPosition,e,t);if(t$$(r))return r.y=e.canvas.clientHeight-r.y,r},s$u.getScreenSpaceBoundingBox=function(e,t,i){var n=e.pixelSize,r=.5*n,o=t.x-r,a=t.y-r,s=n,l=n;return t$$(i)||(i=new n$13),i.x=o,i.y=a,i.width=s,i.height=l,i},s$u.prototype.equals=function(e){return this===e||t$$(e)&&this._id===e._id&&a$11.equals(this._position,e._position)&&e$1z.equals(this._color,e._color)&&this._pixelSize===e._pixelSize&&this._outlineWidth===e._outlineWidth&&this._show===e._show&&e$1z.equals(this._outlineColor,e._outlineColor)&&u$W.equals(this._scaleByDistance,e._scaleByDistance)&&u$W.equals(this._translucencyByDistance,e._translucencyByDistance)&&e$1w.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance},s$u.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._pointPrimitiveCollection=void 0};var W$B="varying vec4 v_color;\nvarying vec4 v_outlineColor;\nvarying float v_innerPercent;\nvarying float v_pixelDistance;\nvarying vec4 v_pickColor;\nvoid main()\n{\nfloat distanceToCenter = length(gl_PointCoord - vec2(0.5));\nfloat maxDistance = max(0.0, 0.5 - v_pixelDistance);\nfloat wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);\nfloat innerAlpha = 1.0 - smoothstep(maxDistance * v_innerPercent, 0.5 * v_innerPercent, distanceToCenter);\nvec4 color = mix(v_outlineColor, v_color, innerAlpha);\ncolor.a *= wholeAlpha;\n#if !defined(OPAQUE) && !defined(TRANSLUCENT)\nif (color.a < 0.005)\n{\ndiscard;\n}\n#else\n#ifdef OPAQUE\nif (color.a < 0.995)\n{\ndiscard;\n}\n#else\nif (color.a >= 0.995)\n{\ndiscard;\n}\n#endif\n#endif\ngl_FragColor = czm_gammaCorrect(color);\nczm_writeLogDepth();\n}\n",gt$5="uniform float u_maxTotalPointSize;\nattribute vec4 positionHighAndSize;\nattribute vec4 positionLowAndOutline;\nattribute vec4 compressedAttribute0;\nattribute vec4 compressedAttribute1;\nattribute vec4 scaleByDistance;\nattribute vec3 distanceDisplayConditionAndDisableDepth;\nvarying vec4 v_color;\nvarying vec4 v_outlineColor;\nvarying float v_innerPercent;\nvarying float v_pixelDistance;\nvarying vec4 v_pickColor;\nconst float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\nvoid main()\n{\nvec3 positionHigh = positionHighAndSize.xyz;\nvec3 positionLow = positionLowAndOutline.xyz;\nfloat outlineWidthBothSides = 2.0 * positionLowAndOutline.w;\nfloat totalSize = positionHighAndSize.w + outlineWidthBothSides;\nfloat outlinePercent = outlineWidthBothSides / totalSize;\ntotalSize *= czm_pixelRatio;\ntotalSize += 3.0;\nfloat temp = compressedAttribute1.x * SHIFT_RIGHT8;\nfloat show = floor(temp);\n#ifdef EYE_DISTANCE_TRANSLUCENCY\nvec4 translucencyByDistance;\ntranslucencyByDistance.x = compressedAttribute1.z;\ntranslucencyByDistance.z = compressedAttribute1.w;\ntranslucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\ntemp = compressedAttribute1.y * SHIFT_RIGHT8;\ntranslucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n#endif\nvec4 color;\nvec4 outlineColor;\nvec4 pickColor;\ntemp = compressedAttribute0.z * SHIFT_RIGHT8;\npickColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\npickColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\npickColor.r = floor(temp);\ntemp = compressedAttribute0.x * SHIFT_RIGHT8;\ncolor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\ncolor.g = (temp - floor(temp)) * SHIFT_LEFT8;\ncolor.r = floor(temp);\ntemp = compressedAttribute0.y * SHIFT_RIGHT8;\noutlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\noutlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\noutlineColor.r = floor(temp);\ntemp = compressedAttribute0.w * SHIFT_RIGHT8;\npickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\npickColor = pickColor / 255.0;\ntemp = floor(temp) * SHIFT_RIGHT8;\noutlineColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\noutlineColor /= 255.0;\ncolor.a = floor(temp);\ncolor /= 255.0;\nvec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\nvec4 positionEC = czm_modelViewRelativeToEye * p;\n#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)\nfloat lengthSq;\nif (czm_sceneMode == czm_sceneMode2D)\n{\nlengthSq = czm_eyeHeight2D.y;\n}\nelse\n{\nlengthSq = dot(positionEC.xyz, positionEC.xyz);\n}\n#endif\n#ifdef EYE_DISTANCE_SCALING\ntotalSize *= czm_nearFarScalar(scaleByDistance, lengthSq);\n#endif\ntotalSize = min(totalSize, u_maxTotalPointSize);\nif (totalSize < 1.0)\n{\npositionEC.xyz = vec3(0.0);\ntotalSize = 1.0;\n}\nfloat translucency = 1.0;\n#ifdef EYE_DISTANCE_TRANSLUCENCY\ntranslucency = czm_nearFarScalar(translucencyByDistance, lengthSq);\nif (translucency < 0.004)\n{\npositionEC.xyz = vec3(0.0);\n}\n#endif\n#ifdef DISTANCE_DISPLAY_CONDITION\nfloat nearSq = distanceDisplayConditionAndDisableDepth.x;\nfloat farSq = distanceDisplayConditionAndDisableDepth.y;\nif (lengthSq < nearSq || lengthSq > farSq) {\npositionEC.xyz = vec3(0.0, 0.0, 1.0);\n}\n#endif\ngl_Position = czm_projection * positionEC;\nczm_vertexLogDepth();\n#ifdef DISABLE_DEPTH_DISTANCE\nfloat disableDepthTestDistance = distanceDisplayConditionAndDisableDepth.z;\nif (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)\n{\ndisableDepthTestDistance = czm_minimumDisableDepthTestDistance;\n}\nif (disableDepthTestDistance != 0.0)\n{\nfloat zclip = gl_Position.z / gl_Position.w;\nbool clipped = (zclip < -1.0 || zclip > 1.0);\nif (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))\n{\ngl_Position.z = -gl_Position.w;\n#ifdef LOG_DEPTH\nczm_vertexLogDepth(vec4(czm_currentFrustum.x));\n#endif\n}\n}\n#endif\nv_color = color;\nv_color.a *= translucency * show;\nv_outlineColor = outlineColor;\nv_outlineColor.a *= translucency * show;\nv_innerPercent = 1.0 - outlinePercent;\nv_pixelDistance = 2.0 / totalSize;\ngl_PointSize = totalSize * show;\ngl_Position *= show;\nv_pickColor = pickColor;\n}\n",Ot$1=s$u.SHOW_INDEX,j$x=s$u.POSITION_INDEX,pt$7=s$u.COLOR_INDEX,Bt$4=s$u.OUTLINE_COLOR_INDEX,Ut$4=s$u.OUTLINE_WIDTH_INDEX,Lt$6=s$u.PIXEL_SIZE_INDEX,_t$5=s$u.SCALE_BY_DISTANCE_INDEX,dt$9=s$u.TRANSLUCENCY_BY_DISTANCE_INDEX,lt$a=s$u.DISTANCE_DISPLAY_CONDITION_INDEX,Vt$5=s$u.DISABLE_DEPTH_DISTANCE_INDEX,Z$u=s$u.NUMBER_OF_PROPERTIES,d$y={positionHighAndSize:0,positionLowAndOutline:1,compressedAttribute0:2,compressedAttribute1:3,scaleByDistance:4,distanceDisplayConditionAndDisableDepth:5};function f$A(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._sp=void 0,this._spTranslucent=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._vaf=void 0,this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!1,this._shaderScaleByDistance=!1,this._compiledShaderScaleByDistance=!1,this._shaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistance=!1,this._shaderDistanceDisplayCondition=!1,this._compiledShaderDistanceDisplayCondition=!1,this._shaderDisableDepthDistance=!1,this._compiledShaderDisableDepthDistance=!1,this._propertiesChanged=new Uint32Array(Z$u),this._maxPixelSize=1,this._baseVolume=new c$19,this._baseVolumeWC=new c$19,this._baseVolume2D=new c$19,this._boundingVolume=new c$19,this._boundingVolumeDirty=!1,this._colorCommands=[],this.modelMatrix=c$1a.clone(e$1Y(e.modelMatrix,c$1a.IDENTITY)),this._modelMatrix=c$1a.clone(c$1a.IDENTITY),this.debugShowBoundingVolume=e$1Y(e.debugShowBoundingVolume,!1),this.blendOption=e$1Y(e.blendOption,S$t.OPAQUE_AND_TRANSLUCENT),this._blendOption=void 0,this._mode=b$1d.SCENE3D,this._maxTotalPointSize=1,this._buffersUsage=[A$13.STATIC_DRAW,A$13.STATIC_DRAW,A$13.STATIC_DRAW,A$13.STATIC_DRAW,A$13.STATIC_DRAW,A$13.STATIC_DRAW,A$13.STATIC_DRAW,A$13.STATIC_DRAW,A$13.STATIC_DRAW];var t=this;this._uniforms={u_maxTotalPointSize:function(){return t._maxTotalPointSize}},this.depthTestEnabled=e$1Y(e.depthTestEnabled,!0)}function ct$9(e){for(var t=e.length,i=0;i<t;++i)e[i]&&e[i]._destroy()}function K$q(e){if(e._pointPrimitivesRemoved){e._pointPrimitivesRemoved=!1;for(var t=[],i=e._pointPrimitives,n=i.length,r=0,o=0;r<n;++r){var a=i[r];a&&(a._index=o++,t.push(a))}e._pointPrimitives=t}}function wt$4(e,t,i){return new u$D(e,[{index:d$y.positionHighAndSize,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,usage:i[j$x]},{index:d$y.positionLowAndShow,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,usage:i[j$x]},{index:d$y.compressedAttribute0,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,usage:i[pt$7]},{index:d$y.compressedAttribute1,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,usage:i[dt$9]},{index:d$y.scaleByDistance,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,usage:i[_t$5]},{index:d$y.distanceDisplayConditionAndDisableDepth,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,usage:i[lt$a]}],t)}Object.defineProperties(f$A.prototype,{length:{get:function(){return K$q(this),this._pointPrimitives.length}}}),f$A.prototype.add=function(e){var t=new s$u(e,this);return t._index=this._pointPrimitives.length,this._pointPrimitives.push(t),this._createVertexArray=!0,t},f$A.prototype.remove=function(e){return!!this.contains(e)&&(this._pointPrimitives[e._index]=null,this._pointPrimitivesRemoved=!0,this._createVertexArray=!0,e._destroy(),!0)},f$A.prototype.removeAll=function(){ct$9(this._pointPrimitives),this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!0},f$A.prototype._updatePointPrimitive=function(e,t){e._dirty||(this._pointPrimitivesToUpdate[this._pointPrimitivesToUpdateIndex++]=e),++this._propertiesChanged[t]},f$A.prototype.contains=function(e){return t$$(e)&&e._pointPrimitiveCollection===this},f$A.prototype.get=function(e){if(!t$$(e))throw new t$_("index is required.");return K$q(this),this._pointPrimitives[e]},f$A.prototype.computeNewBuffersUsage=function(){for(var e=this._buffersUsage,t=!1,i=this._propertiesChanged,n=0;n<Z$u;++n){var r=0===i[n]?A$13.STATIC_DRAW:A$13.STREAM_DRAW;t=t||e[n]!==r,e[n]=r}return t};var $$t=new t$R;function mt$6(e,t,i,n){var r=n._index,o=n._getActualPosition();e._mode===b$1d.SCENE3D&&(c$19.expand(e._baseVolume,o,e._baseVolume),e._boundingVolumeDirty=!0),t$R.fromCartesian(o,$$t);var a=n.pixelSize,s=n.outlineWidth;e._maxPixelSize=Math.max(e._maxPixelSize,a+s);var l=i[d$y.positionHighAndSize],u=$$t.high;l(r,u.x,u.y,u.z,a);var c=i[d$y.positionLowAndOutline],h=$$t.low;c(r,h.x,h.y,h.z,s)}var z$r=65536,U$z=256;function ut$7(e,t,i,n){var r=n._index,o=n.color,a=n.getPickId(t).color,s=n.outlineColor,l=e$1z.floatToByte(o.red),u=e$1z.floatToByte(o.green),c=e$1z.floatToByte(o.blue),h=l*z$r+u*U$z+c;l=e$1z.floatToByte(s.red),u=e$1z.floatToByte(s.green),c=e$1z.floatToByte(s.blue);var d=l*z$r+u*U$z+c;l=e$1z.floatToByte(a.red),u=e$1z.floatToByte(a.green),c=e$1z.floatToByte(a.blue);var f=l*z$r+u*U$z+c,p=e$1z.floatToByte(o.alpha)*z$r+e$1z.floatToByte(s.alpha)*U$z+e$1z.floatToByte(a.alpha);(0,i[d$y.compressedAttribute0])(r,h,d,f,p)}function Dt$1(e,t,i,n){var r=n._index,o=0,a=1,s=1,l=1,u=n.translucencyByDistance;t$$(u)&&(o=u.near,a=u.nearValue,s=u.far,l=u.farValue,(1!==a||1!==l)&&(e._shaderTranslucencyByDistance=!0));var c=n.show&&n.clusterShow;0===n.color.alpha&&0===n.outlineColor.alpha&&(c=!1),a=n$1d.clamp(a,0,1);var h=(c?1:0)*U$z+(a=1===a?255:255*a|0),d=l=1===(l=n$1d.clamp(l,0,1))?255:255*l|0;(0,i[d$y.compressedAttribute1])(r,h,d,o,s)}function ft$6(e,t,i,n){var r=n._index,o=i[d$y.scaleByDistance],a=0,s=1,l=1,u=1,c=n.scaleByDistance;t$$(c)&&(a=c.near,s=c.nearValue,l=c.far,u=c.farValue,(1!==s||1!==u)&&(e._shaderScaleByDistance=!0)),o(r,a,s,l,u)}function vt$6(e,t,i,n){var r=n._index,o=i[d$y.distanceDisplayConditionAndDisableDepth],a=0,s=Number.MAX_VALUE,l=n.distanceDisplayCondition;t$$(l)&&(a=l.near,s=l.far,a*=a,s*=s,e._shaderDistanceDisplayCondition=!0);var u=n.disableDepthTestDistance;(u*=u)>0&&(e._shaderDisableDepthDistance=!0,u===Number.POSITIVE_INFINITY&&(u=-1)),o(r,a,s,u)}function Rt$5(e,t,i,n){mt$6(e,t,i,n),ut$7(e,t,i,n),Dt$1(e,t,i,n),ft$6(e,t,i,n),vt$6(e,t,i,n)}function J$u(e,t,i,n,r,o){var a;n.mode===b$1d.SCENE3D?(a=e._baseVolume,e._boundingVolumeDirty=!0):a=e._baseVolume2D;for(var s=[],l=0;l<i;++l){var u=t[l],c=u.position,h=s$u._computeActualPosition(c,n,r);t$$(h)&&(u._setActualPosition(h),o?s.push(h):c$19.expand(a,h,a))}o&&c$19.fromPoints(s,a)}function Mt$5(e,t){var i=t.mode,n=e._pointPrimitives,r=e._pointPrimitivesToUpdate,o=e._modelMatrix;e._createVertexArray||e._mode!==i||i!==b$1d.SCENE3D&&!c$1a.equals(o,e.modelMatrix)?(e._mode=i,c$1a.clone(e.modelMatrix,o),e._createVertexArray=!0,(i===b$1d.SCENE3D||i===b$1d.SCENE2D||i===b$1d.COLUMBUS_VIEW)&&J$u(e,n,n.length,t,o,!0)):i===b$1d.MORPHING?J$u(e,n,n.length,t,o,!0):(i===b$1d.SCENE2D||i===b$1d.COLUMBUS_VIEW)&&J$u(e,r,e._pointPrimitivesToUpdateIndex,t,o,!1)}function Wt$4(e,t,i){var n=t.camera.getPixelSize(i,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*e._maxPixelSize;i.radius+=n}var zt$4=[];function a$s(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._enabled=e$1Y(e.enabled,!1),this._pixelRange=e$1Y(e.pixelRange,80),this._minimumClusterSize=e$1Y(e.minimumClusterSize,1),this._clusterBillboards=e$1Y(e.clusterBillboards,!0),this._clusterLabels=e$1Y(e.clusterLabels,!0),this._clusterPoints=e$1Y(e.clusterPoints,!0),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity={},this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._clusterDirty=!1,this._cluster=void 0,this._removeEventListener=void 0,this._clusterEvent=new o$15}function ci$3(e){return e.coord.x}function di$3(e){return e.coord.y}function J$t(e,t){e.x-=t,e.y-=t,e.width+=2*t,e.height+=2*t}f$A.prototype.update=function(e){if(e.multiViewportIndex>-1&&this._pointPrimitives.length>0&&t$$(this._pointPrimitives[0])&&t$$(this._pointPrimitives[0].id)&&t$$(this._pointPrimitives[0].id.entityCollection)&&t$$(this._pointPrimitives[0].id.entityCollection.owner)){var t=this._pointPrimitives[0].id.entityCollection.owner;if(typeof t.getVisibleInViewport<"u")if(!t.getVisibleInViewport(e.multiViewportIndex))return}K$q(this),this._maxTotalPointSize=e$1y.maximumAliasedPointSize,Mt$5(this,e);var i,n=this._pointPrimitives.length,r=this._pointPrimitivesToUpdate,o=this._pointPrimitivesToUpdateIndex,a=this._propertiesChanged,s=this._createVertexArray,l=e.context,u=e.passes,c=u.pick;if(s||!c&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(var h=0;h<Z$u;++h)a[h]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),n>0){this._vaf=wt$4(l,n,this._buffersUsage),i=this._vaf.writers;for(var d=0;d<n;++d){var f=this._pointPrimitives[d];f._dirty=!1,Rt$5(this,l,i,f)}this._vaf.commit()}this._pointPrimitivesToUpdateIndex=0}else if(o>0){var p=zt$4;p.length=0,(a[j$x]||a[Ut$4]||a[Lt$6])&&p.push(mt$6),(a[pt$7]||a[Bt$4])&&p.push(ut$7),(a[Ot$1]||a[dt$9])&&p.push(Dt$1),a[_t$5]&&p.push(ft$6),(a[lt$a]||a[Vt$5])&&p.push(vt$6);var _=p.length;if(i=this._vaf.writers,o/n>.1){for(var m=0;m<o;++m){var $=r[m];$._dirty=!1;for(var g=0;g<_;++g)p[g](this,l,i,$)}this._vaf.commit()}else{for(var y=0;y<o;++y){var v=r[y];v._dirty=!1;for(var x=0;x<_;++x)p[x](this,l,i,v);this._vaf.subCommit(v._index,1)}this._vaf.endSubCommits()}this._pointPrimitivesToUpdateIndex=0}if(o>1.5*n&&(r.length=n),t$$(this._vaf)&&t$$(this._vaf.va)){this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,c$19.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));var b,S=c$1a.IDENTITY;e.mode===b$1d.SCENE3D?(S=this.modelMatrix,b=c$19.clone(this._baseVolumeWC,this._boundingVolume)):b=c$19.clone(this._baseVolume2D,this._boundingVolume),Wt$4(this,e,b);var w,C,T=this._blendOption!==this.blendOption;this._blendOption=this.blendOption,T&&(this._blendOption===S$t.OPAQUE||this._blendOption===S$t.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=p$1a.fromCache({depthTest:{enabled:this.depthTestEnabled,func:de$x.LEQUAL},depthMask:!0}):this._rsOpaque=void 0,this._blendOption===S$t.TRANSLUCENT||this._blendOption===S$t.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=p$1a.fromCache({depthTest:{enabled:!0,func:de$x.LEQUAL},depthMask:!1,blending:Ee$s.ALPHA_BLEND}):this._rsTranslucent=void 0),this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||0!==e.minimumDisableDepthTestDistance,(T||this._shaderScaleByDistance&&!this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance&&!this._compiledShaderTranslucencyByDistance||this._shaderDistanceDisplayCondition&&!this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance)&&(w=new a$O({sources:[gt$5]}),this._shaderScaleByDistance&&w.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&w.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderDistanceDisplayCondition&&w.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&w.defines.push("DISABLE_DEPTH_DISTANCE"),this._blendOption===S$t.OPAQUE_AND_TRANSLUCENT&&(C=new a$O({defines:["OPAQUE"],sources:[W$B]}),this._sp=p$15.replaceCache({context:l,shaderProgram:this._sp,vertexShaderSource:w,fragmentShaderSource:C,attributeLocations:d$y}),C=new a$O({defines:["TRANSLUCENT"],sources:[W$B]}),this._spTranslucent=p$15.replaceCache({context:l,shaderProgram:this._spTranslucent,vertexShaderSource:w,fragmentShaderSource:C,attributeLocations:d$y})),this._blendOption===S$t.OPAQUE&&(C=new a$O({sources:[W$B]}),this._sp=p$15.replaceCache({context:l,shaderProgram:this._sp,vertexShaderSource:w,fragmentShaderSource:C,attributeLocations:d$y})),this._blendOption===S$t.TRANSLUCENT&&(C=new a$O({sources:[W$B]}),this._spTranslucent=p$15.replaceCache({context:l,shaderProgram:this._spTranslucent,vertexShaderSource:w,fragmentShaderSource:C,attributeLocations:d$y})),this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance);var P,E,A,L,M=e.commandList;if(u.render||c){var I=this._colorCommands,O=this._blendOption===S$t.OPAQUE,D=this._blendOption===S$t.OPAQUE_AND_TRANSLUCENT;E=(P=this._vaf.va).length,I.length=E;var R=D?2*E:E;for(L=0;L<R;++L){var N=O||D&&L%2==0;t$$(A=I[L])||(A=I[L]=new s$1d),A.primitiveType=H$11.POINTS,A.pass=N||!D?we$l.OPAQUE:we$l.TRANSLUCENT,A.owner=this;var F=D?Math.floor(L/2):L;A.boundingVolume=b,A.modelMatrix=S,A.shaderProgram=N?this._sp:this._spTranslucent,A.uniformMap=this._uniforms,A.vertexArray=P[F].va,A.renderState=N?this._rsOpaque:this._rsTranslucent,A.debugShowBoundingVolume=this.debugShowBoundingVolume,A.pickId="v_pickColor",M.push(A)}}}},f$A.prototype.isDestroyed=function(){return!1},f$A.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),ct$9(this._pointPrimitives),s$1e(this)};var ai$4=new n$13;function Q$q(e,t,i,n,r){if(t$$(e._labelCollection)&&n._clusterLabels?r=b$O.getScreenSpaceBoundingBox(e,t,r):t$$(e._billboardCollection)&&n._clusterBillboards?r=s$1a.getScreenSpaceBoundingBox(e,t,r):t$$(e._pointPrimitiveCollection)&&n._clusterPoints&&(r=s$u.getScreenSpaceBoundingBox(e,t,r)),J$t(r,i),n._clusterLabels&&!t$$(e._labelCollection)&&t$$(e.id)&&U$y(n,e.id.id)&&t$$(e.id._label)){var o=n._collectionIndicesByEntity[e.id.id].labelIndex,a=n._labelCollection.get(o),s=a.getScreenSpaceBoundingBox(a,t,ai$4);J$t(s,i),r=n$13.union(r,s,r)}return r}function ui$2(e,t){if(e.clusterShow=!0,!t$$(e._labelCollection)&&t$$(e.id)&&U$y(t,e.id.id)&&t$$(e.id._label)){var i=t._collectionIndicesByEntity[e.id.id].labelIndex;t._labelCollection.get(i).clusterShow=!0}}function _i$3(e,t,i,n){var r={billboard:n._clusterBillboardCollection.add(),label:n._clusterLabelCollection.add(),point:n._clusterPointCollection.add()};r.billboard.show=!1,r.point.show=!1,r.label.show=!0,r.label.text=t.toLocaleString(),r.label.id=i,r.billboard.position=r.label.position=r.point.position=e,n._clusterEvent.raiseEvent(i,r)}function U$y(e,t){return t$$(e)&&t$$(e._collectionIndicesByEntity[t])&&t$$(e._collectionIndicesByEntity[t].labelIndex)}function R$q(e,t,i,n,r){if(t$$(e))for(var o=e.length,a=0;a<o;++a){var s=e.get(a);if(s.clusterShow=!1,s.show&&(r._scene.mode!==b$1d.SCENE3D||n.isPointVisible(s.position))){var l=r._clusterLabels&&t$$(s._labelCollection),u=r._clusterBillboards&&t$$(s.id._billboard),c=r._clusterPoints&&t$$(s.id._point);if(!l||!c&&!u){var h=s.computeScreenSpacePosition(i);!t$$(h)||t.push({index:a,collection:e,clustered:!1,coord:h})}}}}var hi$3=new n$13,bi$3=new n$13,pi$4=new n$13;function Ci$2(e){return function(t){if(!(t$$(t)&&t<.05)&&e.enabled){var i=e._scene,n=e._labelCollection,r=e._billboardCollection,o=e._pointCollection;if((t$$(n)||t$$(r)||t$$(o))&&(e._clusterBillboards||e._clusterLabels||e._clusterPoints)){var a=e._clusterLabelCollection,s=e._clusterBillboardCollection,l=e._clusterPointCollection;t$$(a)?a.removeAll():a=e._clusterLabelCollection=new m$A({scene:i}),t$$(s)?s.removeAll():s=e._clusterBillboardCollection=new O$t({scene:i}),t$$(l)?l.removeAll():l=e._clusterPointCollection=new f$A;var u=e._pixelRange,c=e._minimumClusterSize;e._previousClusters;var h=[];e._previousHeight;var d=i.camera.positionCartographic.height,f=i.mapProjection.ellipsoid,p=i.camera.positionWC,_=new c$15(f,p),m=[];e._clusterLabels&&R$q(n,m,i,_,e),e._clusterBillboards&&R$q(r,m,i,_,e),e._clusterPoints&&R$q(o,m,i,_,e);var $,g,y,v,x,b,S,w,C,T,P,E=N$y(m,ci$3,di$3,4096,Int32Array);for(y=m.length,$=0;$<y;++$){var A=m[$];if(!A.clustered){A.clustered=!0,T=A.collection,P=A.index;var L=T.get(P);v=Q$q(L,A.coord,u,e,hi$3);var M=n$13.clone(v,bi$3);b=(x=E.intersect(v.x,v.y,v.x+v.width,v.y+v.height)).length;var I=a$11.clone(L.position);C=1,w=[L.id];var O=a$11.distanceSquared(p,I);for(g=0;g<b;++g)if(!(S=m[x[g]]).clustered){var D=S.collection.get(S.index),R=Q$q(D,S.coord,u,e,pi$4);a$11.distanceSquared(p,D.position)<O&&(I=a$11.clone(D.position)),n$13.union(M,R,M),++C,w.push(D.id)}if(C>=c){var N=a$11.clone(I);for(_i$3(N,C,w,e),h.push({position:N,width:M.width,height:M.height,minimumWidth:v.width,minimumHeight:v.height}),g=0;g<b;++g)m[x[g]].clustered=!0}else ui$2(L,e)}}0===a.length&&(a.destroy(),e._clusterLabelCollection=void 0),0===s.length&&(s.destroy(),e._clusterBillboardCollection=void 0),0===l.length&&(l.destroy(),e._clusterPointCollection=void 0),e._previousClusters=h,e._previousHeight=d}}}}function A$B(e,t,i,n){return function(r){var o=this[e];t$$(this._collectionIndicesByEntity)||(this._collectionIndicesByEntity={});var a=this._collectionIndicesByEntity[r.id];if(t$$(a)||(a=this._collectionIndicesByEntity[r.id]={billboardIndex:void 0,labelIndex:void 0,pointIndex:void 0}),t$$(o)&&t$$(a[n]))return o.get(a[n]);t$$(o)||(o=this[e]=new t({scene:this._scene}));var s,l,u=this[i];return u.length>0?(s=u.pop(),l=o.get(s)):(l=o.add(),s=o.length-1),a[n]=s,this._clusterDirty=!0,l}}function j$w(e,t){var i=e._collectionIndicesByEntity[t];!t$$(i.billboardIndex)&&!t$$(i.labelIndex)&&!t$$(i.pointIndex)&&delete e._collectionIndicesByEntity[t]}function q$x(e){if(t$$(e))for(var t=e.length,i=0;i<t;++i)e.get(i).clusterShow=!0}function vi$3(e){e.enabled||(t$$(e._clusterLabelCollection)&&e._clusterLabelCollection.destroy(),t$$(e._clusterBillboardCollection)&&e._clusterBillboardCollection.destroy(),t$$(e._clusterPointCollection)&&e._clusterPointCollection.destroy(),e._clusterLabelCollection=void 0,e._clusterBillboardCollection=void 0,e._clusterPointCollection=void 0,q$x(e._labelCollection),q$x(e._billboardCollection),q$x(e._pointCollection))}function i$z(e){this._name=e,this._clock=void 0,this._changed=new o$15,this._error=new o$15,this._isLoading=!1,this._loading=new o$15,this._entityCollection=new r$n(this),this._entityCluster=new a$s}a$s.prototype._initialize=function(e){this._scene=e;var t=Ci$2(this);this._cluster=t,this._removeEventListener=e.camera.changed.addEventListener(t)},Object.defineProperties(a$s.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this._enabledDirty=e!==this._enabled,this._enabled=e}},pixelRange:{get:function(){return this._pixelRange},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._pixelRange,this._pixelRange=e}},minimumClusterSize:{get:function(){return this._minimumClusterSize},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._minimumClusterSize,this._minimumClusterSize=e}},clusterEvent:{get:function(){return this._clusterEvent}},clusterBillboards:{get:function(){return this._clusterBillboards},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterBillboards,this._clusterBillboards=e}},clusterLabels:{get:function(){return this._clusterLabels},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterLabels,this._clusterLabels=e}},clusterPoints:{get:function(){return this._clusterPoints},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterPoints,this._clusterPoints=e}}}),a$s.prototype.getLabel=A$B("_labelCollection",m$A,"_unusedLabelIndices","labelIndex"),a$s.prototype.removeLabel=function(e){var t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(t$$(this._labelCollection)&&t$$(t)&&t$$(t.labelIndex)){var i=t.labelIndex;t.labelIndex=void 0,j$w(this,e.id);var n=this._labelCollection.get(i);n.show=!1,n.text="",n.id=void 0,this._unusedLabelIndices.push(i),this._clusterDirty=!0}},a$s.prototype.getBillboard=A$B("_billboardCollection",O$t,"_unusedBillboardIndices","billboardIndex"),a$s.prototype.removeBillboard=function(e){var t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(t$$(this._billboardCollection)&&t$$(t)&&t$$(t.billboardIndex)){var i=t.billboardIndex;t.billboardIndex=void 0,j$w(this,e.id);var n=this._billboardCollection.get(i);n.id=void 0,n.show=!1,n.image=void 0,this._unusedBillboardIndices.push(i),this._clusterDirty=!0}},a$s.prototype.getPoint=A$B("_pointCollection",f$A,"_unusedPointIndices","pointIndex"),a$s.prototype.removePoint=function(e){var t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(t$$(this._pointCollection)&&t$$(t)&&t$$(t.pointIndex)){var i=t.pointIndex;t.pointIndex=void 0,j$w(this,e.id);var n=this._pointCollection.get(i);n.show=!1,n.id=void 0,this._unusedPointIndices.push(i),this._clusterDirty=!0}},a$s.prototype.update=function(e){var t;e._fboState.enabled||(t$$(this._labelCollection)&&this._labelCollection.length>0&&0===this._labelCollection.get(0)._glyphs.length&&(t=e.commandList,e.commandList=[],this._labelCollection.update(e),e.commandList=t),t$$(this._billboardCollection)&&this._billboardCollection.length>0&&!t$$(this._billboardCollection.get(0).width)&&(t=e.commandList,e.commandList=[],this._billboardCollection.update(e),e.commandList=t),this._enabledDirty&&(this._enabledDirty=!1,vi$3(this),this._clusterDirty=!0),this._clusterDirty&&(this._clusterDirty=!1,this._cluster()),t$$(this._clusterLabelCollection)&&this._clusterLabelCollection.update(e),t$$(this._clusterBillboardCollection)&&this._clusterBillboardCollection.update(e),t$$(this._clusterPointCollection)&&this._clusterPointCollection.update(e),t$$(this._labelCollection)&&this._labelCollection.update(e),t$$(this._billboardCollection)&&this._billboardCollection.update(e),t$$(this._pointCollection)&&this._pointCollection.update(e))},a$s.prototype.destroy=function(){this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._pointCollection=this._pointCollection&&this._pointCollection.destroy(),this._clusterLabelCollection=this._clusterLabelCollection&&this._clusterLabelCollection.destroy(),this._clusterBillboardCollection=this._clusterBillboardCollection&&this._clusterBillboardCollection.destroy(),this._clusterPointCollection=this._clusterPointCollection&&this._clusterPointCollection.destroy(),t$$(this._removeEventListener)&&(this._removeEventListener(),this._removeEventListener=void 0),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity=void 0,this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._pixelRangeDirty=!1,this._minimumClusterSizeDirty=!1},Object.defineProperties(i$z.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock},set:function(e){this._clock!==e&&(this._clock=e,this._changed.raiseEvent(this))}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading},set:function(e){o$w.setLoading(this,e)}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!t$$(e))throw new t$_("value must be defined.");this._entityCluster=e}}});var Module$2=void 0!==Module$2?Module$2:{},moduleOverrides$1=Object.assign({},Module$2),thisProgram="./this.program",ENVIRONMENT_IS_WEB$1="object"==typeof window,ENVIRONMENT_IS_WORKER$1="function"==typeof importScripts,ENVIRONMENT_IS_NODE$1="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,ENVIRONMENT_IS_SHELL$1=!ENVIRONMENT_IS_WEB$1&&!ENVIRONMENT_IS_NODE$1&&!ENVIRONMENT_IS_WORKER$1;if(Module$2.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");var scriptDirectory="",read_,readAsync,readBinary;function locateFile(e){return Module$2.locateFile?Module$2.locateFile(e,scriptDirectory):scriptDirectory+e}if(ENVIRONMENT_IS_NODE$1){if("undefined"==typeof process||!process.release||"node"!==process.release.name)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");var fs=require("fs"),nodePath$1=require("path");scriptDirectory=ENVIRONMENT_IS_WORKER$1?nodePath$1.dirname(scriptDirectory)+"/":__dirname+"/",read_=(e,t)=>(e=isFileURI(e)?new URL(e):nodePath$1.normalize(e),fs.readFileSync(e,t?void 0:"utf8")),readBinary=e=>{var t=read_(e,!0);return t.buffer||(t=new Uint8Array(t)),assert$1(t.buffer),t},readAsync=(e,t,i)=>{e=isFileURI(e)?new URL(e):nodePath$1.normalize(e),fs.readFile(e,(function(e,n){e?i(e):t(n.buffer)}))},process.argv.length>1&&(thisProgram=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),"undefined"!=typeof module&&(module.exports=Module$2),process.on("uncaughtException",(function(e){if(!(e instanceof ExitStatus$1))throw e})),process.on("unhandledRejection",(function(e){throw e})),Module$2.inspect=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL$1){if("object"==typeof process&&"function"==typeof require||"object"==typeof window||"function"==typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");"undefined"!=typeof read&&(read_=function(e){return read(e)}),readBinary=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),assert$1("object"==typeof t),t)},readAsync=function(e,t,i){setTimeout((()=>t(readBinary(e))),0)},"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!ENVIRONMENT_IS_WEB$1&&!ENVIRONMENT_IS_WORKER$1)throw new Error("environment detection error");if(ENVIRONMENT_IS_WORKER$1?scriptDirectory=self.location.href:"undefined"!=typeof document&&document.currentScript&&(scriptDirectory=document.currentScript.src),scriptDirectory=0!==scriptDirectory.indexOf("blob:")?scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1):"","object"!=typeof window&&"function"!=typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");read_=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},ENVIRONMENT_IS_WORKER$1&&(readBinary=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),readAsync=(e,t,i)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)}}var out=Module$2.print||console.log.bind(console),err=Module$2.printErr||console.warn.bind(console),wasmBinary,wasmMemory;function legacyModuleProp(e,t){Object.getOwnPropertyDescriptor(Module$2,e)||Object.defineProperty(Module$2,e,{configurable:!0,get:function(){abort$1("Module."+e+" has been replaced with plain "+t+" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}})}function ignoredModuleProp(e){Object.getOwnPropertyDescriptor(Module$2,e)&&abort$1("`Module."+e+"` was supplied but `"+e+"` not included in INCOMING_MODULE_JS_API")}function isExportedByForceFilesystem(e){return"FS_createPath"===e||"FS_createDataFile"===e||"FS_createPreloadedFile"===e||"FS_unlink"===e||"addRunDependency"===e||"FS_createLazyFile"===e||"FS_createDevice"===e||"removeRunDependency"===e}function missingLibrarySymbol(e){"undefined"==typeof globalThis||Object.getOwnPropertyDescriptor(globalThis,e)||Object.defineProperty(globalThis,e,{configurable:!0,get:function(){var t="`"+e+"` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line",i=e;i.startsWith("_")||(i="$"+e),t+=" (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE="+i+")",isExportedByForceFilesystem(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),warnOnce(t)}})}function unexportedRuntimeSymbol(e){Object.getOwnPropertyDescriptor(Module$2,e)||Object.defineProperty(Module$2,e,{configurable:!0,get:function(){var t="'"+e+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)";isExportedByForceFilesystem(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),abort$1(t)}})}Object.assign(Module$2,moduleOverrides$1),moduleOverrides$1=null,checkIncomingModuleAPI(),Module$2.arguments,legacyModuleProp("arguments","arguments_"),Module$2.thisProgram&&(thisProgram=Module$2.thisProgram),legacyModuleProp("thisProgram","thisProgram"),Module$2.quit,legacyModuleProp("quit","quit_"),assert$1(void 0===Module$2.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),assert$1(void 0===Module$2.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),assert$1(void 0===Module$2.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),assert$1(void 0===Module$2.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),assert$1(void 0===Module$2.read,"Module.read option was removed (modify read_ in JS)"),assert$1(void 0===Module$2.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),assert$1(void 0===Module$2.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),assert$1(void 0===Module$2.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),assert$1(void 0===Module$2.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),legacyModuleProp("read","read_"),legacyModuleProp("readAsync","readAsync"),legacyModuleProp("readBinary","readBinary"),legacyModuleProp("setWindowTitle","setWindowTitle"),assert$1(!ENVIRONMENT_IS_SHELL$1,"shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable."),Module$2.wasmBinary&&(wasmBinary=Module$2.wasmBinary),legacyModuleProp("wasmBinary","wasmBinary"),Module$2.noExitRuntime,legacyModuleProp("noExitRuntime","noExitRuntime"),"object"!=typeof WebAssembly&&abort$1("no native wasm support detected");var ABORT$1=!1;function assert$1(e,t){e||abort$1("Assertion failed"+(t?": "+t:""))}var UTF8Decoder$1="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,buffer$1,HEAP8$1,HEAPU8$1,HEAP16$1,HEAP32$1,HEAPU32$1,HEAPF32$1,HEAPF64$1;function UTF8ArrayToString$1(e,t,i){for(var n=t+i,r=t;e[r]&&!(r>=n);)++r;if(r-t>16&&e.buffer&&UTF8Decoder$1)return UTF8Decoder$1.decode(e.subarray(t,r));for(var o="";t<r;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var l=63&e[t++];if(224==(240&a)?a=(15&a)<<12|s<<6|l:(240!=(248&a)&&warnOnce("Invalid UTF-8 leading byte "+ptrToString(a)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),a=(7&a)<<18|s<<12|l<<6|63&e[t++]),a<65536)o+=String.fromCharCode(a);else{var u=a-65536;o+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o}function UTF8ToString$1(e,t){return e?UTF8ArrayToString$1(HEAPU8$1,e,t):""}function stringToUTF8Array$1(e,t,i,n){if(!(n>0))return 0;for(var r=i,o=i+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a);if(s<=127){if(i>=o)break;t[i++]=s}else if(s<=2047){if(i+1>=o)break;t[i++]=192|s>>6,t[i++]=128|63&s}else if(s<=65535){if(i+2>=o)break;t[i++]=224|s>>12,t[i++]=128|s>>6&63,t[i++]=128|63&s}else{if(i+3>=o)break;s>1114111&&warnOnce("Invalid Unicode code point "+ptrToString(s)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),t[i++]=240|s>>18,t[i++]=128|s>>12&63,t[i++]=128|s>>6&63,t[i++]=128|63&s}}return t[i]=0,i-r}function stringToUTF8$1(e,t,i){return assert$1("number"==typeof i,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),stringToUTF8Array$1(e,HEAPU8$1,t,i)}function lengthBytesUTF8$1(e){for(var t=0,i=0;i<e.length;++i){var n=e.charCodeAt(i);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++i):t+=3}return t}function updateGlobalBufferAndViews(e){buffer$1=e,Module$2.HEAP8=HEAP8$1=new Int8Array(e),Module$2.HEAP16=HEAP16$1=new Int16Array(e),Module$2.HEAP32=HEAP32$1=new Int32Array(e),Module$2.HEAPU8=HEAPU8$1=new Uint8Array(e),Module$2.HEAPU16=new Uint16Array(e),Module$2.HEAPU32=HEAPU32$1=new Uint32Array(e),Module$2.HEAPF32=HEAPF32$1=new Float32Array(e),Module$2.HEAPF64=HEAPF64$1=new Float64Array(e)}var STACK_SIZE=65536;Module$2.STACK_SIZE&&assert$1(STACK_SIZE===Module$2.STACK_SIZE,"the stack size can no longer be determined at runtime");var INITIAL_MEMORY=Module$2.INITIAL_MEMORY||16777216,wasmTable;function writeStackCookie(){var e=_emscripten_stack_get_end();assert$1(0==(3&e)),0==e&&(e+=4),HEAPU32$1[e>>2]=34821223,HEAPU32$1[e+4>>2]=2310721022,HEAPU32$1[0]=1668509029}function checkStackCookie(){if(!ABORT$1){var e=_emscripten_stack_get_end();0==e&&(e+=4);var t=HEAPU32$1[e>>2],i=HEAPU32$1[e+4>>2];34821223==t&&2310721022==i||abort$1("Stack overflow! Stack cookie has been overwritten at "+ptrToString(e)+", expected hex dwords 0x89BACDFE and 0x2135467, but received "+ptrToString(i)+" "+ptrToString(t)),1668509029!==HEAPU32$1[0]&&abort$1("Runtime error: The application has corrupted its heap memory area (address zero)!")}}legacyModuleProp("INITIAL_MEMORY","INITIAL_MEMORY"),assert$1(INITIAL_MEMORY>=STACK_SIZE,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+INITIAL_MEMORY+"! (STACK_SIZE="+STACK_SIZE+")"),assert$1("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support"),assert$1(!Module$2.wasmMemory,"Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally"),assert$1(16777216==INITIAL_MEMORY,"Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically"),function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"}();var __ATPRERUN__$1=[],__ATINIT__$1=[],__ATPOSTRUN__$1=[],runtimeInitialized$1=!1;function preRun$1(){if(Module$2.preRun)for("function"==typeof Module$2.preRun&&(Module$2.preRun=[Module$2.preRun]);Module$2.preRun.length;)addOnPreRun$1(Module$2.preRun.shift());callRuntimeCallbacks$1(__ATPRERUN__$1)}function initRuntime(){assert$1(!runtimeInitialized$1),runtimeInitialized$1=!0,checkStackCookie(),Module$2.noFSInit||FS$1.init.initialized||FS$1.init(),FS$1.ignorePermissions=!1,callRuntimeCallbacks$1(__ATINIT__$1)}function postRun$1(){if(checkStackCookie(),Module$2.postRun)for("function"==typeof Module$2.postRun&&(Module$2.postRun=[Module$2.postRun]);Module$2.postRun.length;)addOnPostRun$1(Module$2.postRun.shift());callRuntimeCallbacks$1(__ATPOSTRUN__$1)}function addOnPreRun$1(e){__ATPRERUN__$1.unshift(e)}function addOnInit$1(e){__ATINIT__$1.unshift(e)}function addOnPostRun$1(e){__ATPOSTRUN__$1.unshift(e)}assert$1(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),assert$1(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),assert$1(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),assert$1(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var runDependencies$1=0,runDependencyWatcher=null,dependenciesFulfilled$1=null,runDependencyTracking={};function getUniqueRunDependency(e){for(var t=e;;){if(!runDependencyTracking[e])return e;e=t+Math.random()}}function addRunDependency$1(e){runDependencies$1++,Module$2.monitorRunDependencies&&Module$2.monitorRunDependencies(runDependencies$1),e?(assert$1(!runDependencyTracking[e]),runDependencyTracking[e]=1,null===runDependencyWatcher&&"undefined"!=typeof setInterval&&(runDependencyWatcher=setInterval((function(){if(ABORT$1)return clearInterval(runDependencyWatcher),void(runDependencyWatcher=null);var e=!1;for(var t in runDependencyTracking)e||(e=!0,err("still waiting on run dependencies:")),err("dependency: "+t);e&&err("(end of list)")}),1e4))):err("warning: run dependency added without ID")}function removeRunDependency$1(e){if(runDependencies$1--,Module$2.monitorRunDependencies&&Module$2.monitorRunDependencies(runDependencies$1),e?(assert$1(runDependencyTracking[e]),delete runDependencyTracking[e]):err("warning: run dependency removed without ID"),0==runDependencies$1&&(null!==runDependencyWatcher&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled$1)){var t=dependenciesFulfilled$1;dependenciesFulfilled$1=null,t()}}function abort$1(e){if(Module$2.onAbort&&Module$2.onAbort(e),err(e="Aborted("+e+")"),ABORT$1=!0,"undefined"!=typeof WebAssembly)throw new WebAssembly.RuntimeError(e)}var dataURIPrefix="data:application/octet-stream;base64,",wasmBinaryFile,tempDouble$1,tempI64$1;function isDataURI(e){return e.startsWith(dataURIPrefix)}function isFileURI(e){return e.startsWith("file://")}function createExportWrapper(e,t){return function(){var i=e,n=t;return t||(n=Module$2.asm),assert$1(runtimeInitialized$1,"native function `"+i+"` called before runtime initialization"),n[e]||assert$1(n[e],"exported native function `"+i+"` not found"),n[e].apply(null,arguments)}}function getBinary(e){try{if(e==wasmBinaryFile&&wasmBinary)return new Uint8Array(wasmBinary);if(readBinary)return readBinary(e);throw"both async and sync fetching of the wasm failed"}catch(e){abort$1(e)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB$1||ENVIRONMENT_IS_WORKER$1)){if("function"==typeof fetch&&!isFileURI(wasmBinaryFile))return fetch(wasmBinaryFile,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+wasmBinaryFile+"'";return e.arrayBuffer()})).catch((function(){return getBinary(wasmBinaryFile)}));if(readAsync)return new Promise((function(e,t){readAsync(wasmBinaryFile,(function(t){e(new Uint8Array(t))}),t)}))}return Promise.resolve().then((function(){return getBinary(wasmBinaryFile)}))}function createWasm(){var e={env:asmLibraryArg,wasi_snapshot_preview1:asmLibraryArg};function t(e,t){var i=e.exports;Module$2.asm=i,assert$1(wasmMemory=Module$2.asm.memory,"memory not found in wasm exports"),updateGlobalBufferAndViews(wasmMemory.buffer),assert$1(wasmTable=Module$2.asm.__indirect_function_table,"table not found in wasm exports"),addOnInit$1(Module$2.asm.__wasm_call_ctors),removeRunDependency$1("wasm-instantiate")}addRunDependency$1("wasm-instantiate");var i=Module$2;function n(e){assert$1(Module$2===i,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),i=null,t(e.instance)}function r(t){return getBinaryPromise().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){err("failed to asynchronously prepare wasm: "+e),isFileURI(wasmBinaryFile)&&err("warning: Loading from a file URI ("+wasmBinaryFile+") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing"),abort$1(e)}))}if(Module$2.instantiateWasm)try{return Module$2.instantiateWasm(e,t)}catch(e){return err("Module.instantiateWasm callback failed with error: "+e),!1}return wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||isDataURI(wasmBinaryFile)||isFileURI(wasmBinaryFile)||ENVIRONMENT_IS_NODE$1||"function"!=typeof fetch?r(n):fetch(wasmBinaryFile,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(n,(function(e){return err("wasm streaming compile failed: "+e),err("falling back to ArrayBuffer instantiation"),r(n)}))})),{}}function ExitStatus$1(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function callRuntimeCallbacks$1(e){for(;e.length>0;)e.shift()(Module$2)}function getValue$1(e,t="i8"){switch(t.endsWith("*")&&(t="*"),t){case"i1":case"i8":return HEAP8$1[e>>0];case"i16":return HEAP16$1[e>>1];case"i32":case"i64":return HEAP32$1[e>>2];case"float":return HEAPF32$1[e>>2];case"double":return HEAPF64$1[e>>3];case"*":return HEAPU32$1[e>>2];default:abort$1("invalid type for getValue: "+t)}return null}function ptrToString(e){return assert$1("number"==typeof e),"0x"+e.toString(16).padStart(8,"0")}function setValue$1(e,t,i="i8"){switch(i.endsWith("*")&&(i="*"),i){case"i1":case"i8":HEAP8$1[e>>0]=t;break;case"i16":HEAP16$1[e>>1]=t;break;case"i32":HEAP32$1[e>>2]=t;break;case"i64":tempI64$1=[t>>>0,(tempDouble$1=t,+Math.abs(tempDouble$1)>=1?tempDouble$1>0?(0|Math.min(+Math.floor(tempDouble$1/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble$1-+(~~tempDouble$1>>>0))/4294967296)>>>0:0)],HEAP32$1[e>>2]=tempI64$1[0],HEAP32$1[e+4>>2]=tempI64$1[1];break;case"float":HEAPF32$1[e>>2]=t;break;case"double":HEAPF64$1[e>>3]=t;break;case"*":HEAPU32$1[e>>2]=t;break;default:abort$1("invalid type for setValue: "+i)}}function warnOnce(e){warnOnce.shown||(warnOnce.shown={}),warnOnce.shown[e]||(warnOnce.shown[e]=1,ENVIRONMENT_IS_NODE$1&&(e="warning: "+e),err(e))}function ___assert_fail(e,t,i,n){abort$1("Assertion failed: "+UTF8ToString$1(e)+", at: "+[t?UTF8ToString$1(t):"unknown filename",i,n?UTF8ToString$1(n):"unknown function"])}function ExceptionInfo(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){HEAPU32$1[this.ptr+4>>2]=e},this.get_type=function(){return HEAPU32$1[this.ptr+4>>2]},this.set_destructor=function(e){HEAPU32$1[this.ptr+8>>2]=e},this.get_destructor=function(){return HEAPU32$1[this.ptr+8>>2]},this.set_refcount=function(e){HEAP32$1[this.ptr>>2]=e},this.set_caught=function(e){e=e?1:0,HEAP8$1[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=HEAP8$1[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,HEAP8$1[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=HEAP8$1[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=HEAP32$1[this.ptr>>2];HEAP32$1[this.ptr>>2]=e+1},this.release_ref=function(){var e=HEAP32$1[this.ptr>>2];return HEAP32$1[this.ptr>>2]=e-1,assert$1(e>0),1===e},this.set_adjusted_ptr=function(e){HEAPU32$1[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return HEAPU32$1[this.ptr+16>>2]},this.get_exception_ptr=function(){if(___cxa_is_pointer_type(this.get_type()))return HEAPU32$1[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}function ___cxa_throw(e,t,i){throw new ExceptionInfo(e).init(t,i),e+" - Exception catching is disabled, this exception cannot be caught. Compile with -sNO_DISABLE_EXCEPTION_CATCHING or -sEXCEPTION_CATCHING_ALLOWED=[..] to catch."}wasmBinaryFile="SuModeling.wasm",isDataURI(wasmBinaryFile)||(wasmBinaryFile=locateFile(wasmBinaryFile));var PATH={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var i=0,n=e.length-1;n>=0;n--){var r=e[n];"."===r?e.splice(n,1):".."===r?(e.splice(n,1),i++):i&&(e.splice(n,1),i--)}if(t)for(;i;i--)e.unshift("..");return e},normalize:e=>{var t=PATH.isAbs(e),i="/"===e.substr(-1);return e=PATH.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"),e||t||(e="."),e&&i&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=PATH.splitPath(e),i=t[0],n=t[1];return i||n?(n&&(n=n.substr(0,n.length-1)),i+n):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=PATH.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return PATH.normalize(e.join("/"))},join2:(e,t)=>PATH.normalize(e+"/"+t)};function getRandomDevice(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return()=>(crypto.getRandomValues(e),e[0])}if(ENVIRONMENT_IS_NODE$1)try{var t=require("crypto");return()=>t.randomBytes(1)[0]}catch(e){}return()=>abort$1("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")}var PATH_FS={resolve:function(){for(var e="",t=!1,i=arguments.length-1;i>=-1&&!t;i--){var n=i>=0?arguments[i]:FS$1.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=PATH.isAbs(n)}return e=PATH.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"),(t?"/":"")+e||"."},relative:(e,t)=>{function i(e){for(var t=0;t<e.length&&""===e[t];t++);for(var i=e.length-1;i>=0&&""===e[i];i--);return t>i?[]:e.slice(t,i-t+1)}e=PATH_FS.resolve(e).substr(1),t=PATH_FS.resolve(t).substr(1);for(var n=i(e.split("/")),r=i(t.split("/")),o=Math.min(n.length,r.length),a=o,s=0;s<o;s++)if(n[s]!==r[s]){a=s;break}var l=[];for(s=a;s<n.length;s++)l.push("..");return(l=l.concat(r.slice(a))).join("/")}};function intArrayFromString$1(e,t,i){var n=i>0?i:lengthBytesUTF8$1(e)+1,r=new Array(n),o=stringToUTF8Array$1(e,r,0,r.length);return t&&(r.length=o),r}var TTY={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){TTY.ttys[e]={input:[],output:[],ops:t},FS$1.registerDevice(e,TTY.stream_ops)},stream_ops:{open:function(e){var t=TTY.ttys[e.node.rdev];if(!t)throw new FS$1.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.fsync(e.tty)},fsync:function(e){e.tty.ops.fsync(e.tty)},read:function(e,t,i,n,r){if(!e.tty||!e.tty.ops.get_char)throw new FS$1.ErrnoError(60);for(var o=0,a=0;a<n;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new FS$1.ErrnoError(29)}if(void 0===s&&0===o)throw new FS$1.ErrnoError(6);if(null==s)break;o++,t[i+a]=s}return o&&(e.node.timestamp=Date.now()),o},write:function(e,t,i,n,r){if(!e.tty||!e.tty.ops.put_char)throw new FS$1.ErrnoError(60);try{for(var o=0;o<n;o++)e.tty.ops.put_char(e.tty,t[i+o])}catch(e){throw new FS$1.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),o}},default_tty_ops:{get_char:function(e){if(!e.input.length){var t=null;if(ENVIRONMENT_IS_NODE$1){var i=Buffer.alloc(256),n=0;try{n=fs.readSync(process.stdin.fd,i,0,256,-1)}catch(e){if(!e.toString().includes("EOF"))throw e;n=0}t=n>0?i.slice(0,n).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n");if(!t)return null;e.input=intArrayFromString$1(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(out(UTF8ArrayToString$1(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync:function(e){e.output&&e.output.length>0&&(out(UTF8ArrayToString$1(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(err(UTF8ArrayToString$1(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync:function(e){e.output&&e.output.length>0&&(err(UTF8ArrayToString$1(e.output,0)),e.output=[])}}};function mmapAlloc(e){abort$1("internal error: mmapAlloc called but `emscripten_builtin_memalign` native symbol not exported")}var MEMFS={ops_table:null,mount:function(e){return MEMFS.createNode(null,"/",16895,0)},createNode:function(e,t,i,n){if(FS$1.isBlkdev(i)||FS$1.isFIFO(i))throw new FS$1.ErrnoError(63);MEMFS.ops_table||(MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS$1.chrdev_stream_ops}});var r=FS$1.createNode(e,t,i,n);return FS$1.isDir(r.mode)?(r.node_ops=MEMFS.ops_table.dir.node,r.stream_ops=MEMFS.ops_table.dir.stream,r.contents={}):FS$1.isFile(r.mode)?(r.node_ops=MEMFS.ops_table.file.node,r.stream_ops=MEMFS.ops_table.file.stream,r.usedBytes=0,r.contents=null):FS$1.isLink(r.mode)?(r.node_ops=MEMFS.ops_table.link.node,r.stream_ops=MEMFS.ops_table.link.stream):FS$1.isChrdev(r.mode)&&(r.node_ops=MEMFS.ops_table.chrdev.node,r.stream_ops=MEMFS.ops_table.chrdev.stream),r.timestamp=Date.now(),e&&(e.contents[t]=r,e.timestamp=r.timestamp),r},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){var i=e.contents?e.contents.length:0;if(!(i>=t)){t=Math.max(t,i*(i<1048576?2:1.125)>>>0),0!=i&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var i=e.contents;e.contents=new Uint8Array(t),i&&e.contents.set(i.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=FS$1.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,FS$1.isDir(e.mode)?t.size=4096:FS$1.isFile(e.mode)?t.size=e.usedBytes:FS$1.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&MEMFS.resizeFileStorage(e,t.size)},lookup:function(e,t){throw FS$1.genericErrors[44]},mknod:function(e,t,i,n){return MEMFS.createNode(e,t,i,n)},rename:function(e,t,i){if(FS$1.isDir(e.mode)){var n;try{n=FS$1.lookupNode(t,i)}catch(e){}if(n)for(var r in n.contents)throw new FS$1.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=i,t.contents[i]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var i=FS$1.lookupNode(e,t);for(var n in i.contents)throw new FS$1.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var i in e.contents)e.contents.hasOwnProperty(i)&&t.push(i);return t},symlink:function(e,t,i){var n=MEMFS.createNode(e,t,41471,0);return n.link=i,n},readlink:function(e){if(!FS$1.isLink(e.mode))throw new FS$1.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,i,n,r){var o=e.node.contents;if(r>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-r,n);if(assert$1(a>=0),a>8&&o.subarray)t.set(o.subarray(r,r+a),i);else for(var s=0;s<a;s++)t[i+s]=o[r+s];return a},write:function(e,t,i,n,r,o){if(assert$1(!(t instanceof ArrayBuffer)),t.buffer===HEAP8$1.buffer&&(o=!1),!n)return 0;var a=e.node;if(a.timestamp=Date.now(),t.subarray&&(!a.contents||a.contents.subarray)){if(o)return assert$1(0===r,"canOwn must imply no weird position inside the file"),a.contents=t.subarray(i,i+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===r)return a.contents=t.slice(i,i+n),a.usedBytes=n,n;if(r+n<=a.usedBytes)return a.contents.set(t.subarray(i,i+n),r),n}if(MEMFS.expandFileStorage(a,r+n),a.contents.subarray&&t.subarray)a.contents.set(t.subarray(i,i+n),r);else for(var s=0;s<n;s++)a.contents[r+s]=t[i+s];return a.usedBytes=Math.max(a.usedBytes,r+n),n},llseek:function(e,t,i){var n=t;if(1===i?n+=e.position:2===i&&FS$1.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new FS$1.ErrnoError(28);return n},allocate:function(e,t,i){MEMFS.expandFileStorage(e.node,t+i),e.node.usedBytes=Math.max(e.node.usedBytes,t+i)},mmap:function(e,t,i,n,r){if(!FS$1.isFile(e.node.mode))throw new FS$1.ErrnoError(43);var o,a,s=e.node.contents;if(2&r||s.buffer!==buffer$1){if((i>0||i+t<s.length)&&(s=s.subarray?s.subarray(i,i+t):Array.prototype.slice.call(s,i,i+t)),a=!0,!(o=mmapAlloc()))throw new FS$1.ErrnoError(48);HEAP8$1.set(s,o)}else a=!1,o=s.byteOffset;return{ptr:o,allocated:a}},msync:function(e,t,i,n,r){return MEMFS.stream_ops.write(e,t,0,n,i,!1),0}}};function asyncLoad(e,t,i,n){var r=n?"":getUniqueRunDependency("al "+e);readAsync(e,(i=>{assert$1(i,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(i)),r&&removeRunDependency$1(r)}),(t=>{if(!i)throw'Loading data file "'+e+'" failed.';i()})),r&&addRunDependency$1(r)}var ERRNO_MESSAGES={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},ERRNO_CODES$1={};function demangle$1(e){return warnOnce("warning: build with -sDEMANGLE_SUPPORT to link in libcxxabi demangling"),e}function demangleAll$1(e){return e.replace(/\b_Z[\w\d_]+/g,(function(e){var t=demangle$1(e);return e===t?e:t+" ["+e+"]"}))}var FS$1={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,t={})=>{if(!(e=PATH_FS.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new FS$1.ErrnoError(32);for(var i=e.split("/").filter((e=>!!e)),n=FS$1.root,r="/",o=0;o<i.length;o++){var a=o===i.length-1;if(a&&t.parent)break;if(n=FS$1.lookupNode(n,i[o]),r=PATH.join2(r,i[o]),FS$1.isMountpoint(n)&&(!a||a&&t.follow_mount)&&(n=n.mounted.root),!a||t.follow)for(var s=0;FS$1.isLink(n.mode);){var l=FS$1.readlink(r);if(r=PATH_FS.resolve(PATH.dirname(r),l),n=FS$1.lookupPath(r,{recurse_count:t.recurse_count+1}).node,s++>40)throw new FS$1.ErrnoError(32)}}return{path:r,node:n}},getPath:e=>{for(var t;;){if(FS$1.isRoot(e)){var i=e.mount.mountpoint;return t?"/"!==i[i.length-1]?i+"/"+t:i+t:i}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:(e,t)=>{for(var i=0,n=0;n<t.length;n++)i=(i<<5)-i+t.charCodeAt(n)|0;return(e+i>>>0)%FS$1.nameTable.length},hashAddNode:e=>{var t=FS$1.hashName(e.parent.id,e.name);e.name_next=FS$1.nameTable[t],FS$1.nameTable[t]=e},hashRemoveNode:e=>{var t=FS$1.hashName(e.parent.id,e.name);if(FS$1.nameTable[t]===e)FS$1.nameTable[t]=e.name_next;else for(var i=FS$1.nameTable[t];i;){if(i.name_next===e){i.name_next=e.name_next;break}i=i.name_next}},lookupNode:(e,t)=>{var i=FS$1.mayLookup(e);if(i)throw new FS$1.ErrnoError(i,e);for(var n=FS$1.hashName(e.id,t),r=FS$1.nameTable[n];r;r=r.name_next){var o=r.name;if(r.parent.id===e.id&&o===t)return r}return FS$1.lookup(e,t)},createNode:(e,t,i,n)=>{assert$1("object"==typeof e);var r=new FS$1.FSNode(e,t,i,n);return FS$1.hashAddNode(r),r},destroyNode:e=>{FS$1.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var t=FS$1.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:e=>{var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>FS$1.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>{var t=FS$1.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:(e,t)=>{try{FS$1.lookupNode(e,t);return 20}catch(e){}return FS$1.nodePermissions(e,"wx")},mayDelete:(e,t,i)=>{var n;try{n=FS$1.lookupNode(e,t)}catch(e){return e.errno}var r=FS$1.nodePermissions(e,"wx");if(r)return r;if(i){if(!FS$1.isDir(n.mode))return 54;if(FS$1.isRoot(n)||FS$1.getPath(n)===FS$1.cwd())return 10}else if(FS$1.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?FS$1.isLink(e.mode)?32:FS$1.isDir(e.mode)&&("r"!==FS$1.flagsToPermissionString(t)||512&t)?31:FS$1.nodePermissions(e,FS$1.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,t=FS$1.MAX_OPEN_FDS)=>{for(var i=e;i<=t;i++)if(!FS$1.streams[i])return i;throw new FS$1.ErrnoError(33)},getStream:e=>FS$1.streams[e],createStream:(e,t,i)=>{FS$1.FSStream||(FS$1.FSStream=function(){this.shared={}},FS$1.FSStream.prototype={},Object.defineProperties(FS$1.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new FS$1.FSStream,e);var n=FS$1.nextfd(t,i);return e.fd=n,FS$1.streams[n]=e,e},closeStream:e=>{FS$1.streams[e]=null},chrdev_stream_ops:{open:e=>{var t=FS$1.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new FS$1.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{FS$1.devices[e]={stream_ops:t}},getDevice:e=>FS$1.devices[e],getMounts:e=>{for(var t=[],i=[e];i.length;){var n=i.pop();t.push(n),i.push.apply(i,n.mounts)}return t},syncfs:(e,t)=>{"function"==typeof e&&(t=e,e=!1),FS$1.syncFSRequests++,FS$1.syncFSRequests>1&&err("warning: "+FS$1.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var i=FS$1.getMounts(FS$1.root.mount),n=0;function r(e){return assert$1(FS$1.syncFSRequests>0),FS$1.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,r(e));++n>=i.length&&r(null)}i.forEach((t=>{if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)}))},mount:(e,t,i)=>{if("string"==typeof e)throw e;var n,r="/"===i,o=!i;if(r&&FS$1.root)throw new FS$1.ErrnoError(10);if(!r&&!o){var a=FS$1.lookupPath(i,{follow_mount:!1});if(i=a.path,n=a.node,FS$1.isMountpoint(n))throw new FS$1.ErrnoError(10);if(!FS$1.isDir(n.mode))throw new FS$1.ErrnoError(54)}var s={type:e,opts:t,mountpoint:i,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,r?FS$1.root=l:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),l},unmount:e=>{var t=FS$1.lookupPath(e,{follow_mount:!1});if(!FS$1.isMountpoint(t.node))throw new FS$1.ErrnoError(28);var i=t.node,n=i.mounted,r=FS$1.getMounts(n);Object.keys(FS$1.nameTable).forEach((e=>{for(var t=FS$1.nameTable[e];t;){var i=t.name_next;r.includes(t.mount)&&FS$1.destroyNode(t),t=i}})),i.mounted=null;var o=i.mount.mounts.indexOf(n);assert$1(-1!==o),i.mount.mounts.splice(o,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod:(e,t,i)=>{var n=FS$1.lookupPath(e,{parent:!0}).node,r=PATH.basename(e);if(!r||"."===r||".."===r)throw new FS$1.ErrnoError(28);var o=FS$1.mayCreate(n,r);if(o)throw new FS$1.ErrnoError(o);if(!n.node_ops.mknod)throw new FS$1.ErrnoError(63);return n.node_ops.mknod(n,r,t,i)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,FS$1.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,FS$1.mknod(e,t,0)),mkdirTree:(e,t)=>{for(var i=e.split("/"),n="",r=0;r<i.length;++r)if(i[r]){n+="/"+i[r];try{FS$1.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,i)=>(void 0===i&&(i=t,t=438),t|=8192,FS$1.mknod(e,t,i)),symlink:(e,t)=>{if(!PATH_FS.resolve(e))throw new FS$1.ErrnoError(44);var i=FS$1.lookupPath(t,{parent:!0}).node;if(!i)throw new FS$1.ErrnoError(44);var n=PATH.basename(t),r=FS$1.mayCreate(i,n);if(r)throw new FS$1.ErrnoError(r);if(!i.node_ops.symlink)throw new FS$1.ErrnoError(63);return i.node_ops.symlink(i,n,e)},rename:(e,t)=>{var i,n,r=PATH.dirname(e),o=PATH.dirname(t),a=PATH.basename(e),s=PATH.basename(t);if(i=FS$1.lookupPath(e,{parent:!0}).node,n=FS$1.lookupPath(t,{parent:!0}).node,!i||!n)throw new FS$1.ErrnoError(44);if(i.mount!==n.mount)throw new FS$1.ErrnoError(75);var l,u=FS$1.lookupNode(i,a),c=PATH_FS.relative(e,o);if("."!==c.charAt(0))throw new FS$1.ErrnoError(28);if("."!==(c=PATH_FS.relative(t,r)).charAt(0))throw new FS$1.ErrnoError(55);try{l=FS$1.lookupNode(n,s)}catch(e){}if(u!==l){var h=FS$1.isDir(u.mode),d=FS$1.mayDelete(i,a,h);if(d)throw new FS$1.ErrnoError(d);if(d=l?FS$1.mayDelete(n,s,h):FS$1.mayCreate(n,s))throw new FS$1.ErrnoError(d);if(!i.node_ops.rename)throw new FS$1.ErrnoError(63);if(FS$1.isMountpoint(u)||l&&FS$1.isMountpoint(l))throw new FS$1.ErrnoError(10);if(n!==i&&(d=FS$1.nodePermissions(i,"w")))throw new FS$1.ErrnoError(d);FS$1.hashRemoveNode(u);try{i.node_ops.rename(u,n,s)}catch(e){throw e}finally{FS$1.hashAddNode(u)}}},rmdir:e=>{var t=FS$1.lookupPath(e,{parent:!0}).node,i=PATH.basename(e),n=FS$1.lookupNode(t,i),r=FS$1.mayDelete(t,i,!0);if(r)throw new FS$1.ErrnoError(r);if(!t.node_ops.rmdir)throw new FS$1.ErrnoError(63);if(FS$1.isMountpoint(n))throw new FS$1.ErrnoError(10);t.node_ops.rmdir(t,i),FS$1.destroyNode(n)},readdir:e=>{var t=FS$1.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new FS$1.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var t=FS$1.lookupPath(e,{parent:!0}).node;if(!t)throw new FS$1.ErrnoError(44);var i=PATH.basename(e),n=FS$1.lookupNode(t,i),r=FS$1.mayDelete(t,i,!1);if(r)throw new FS$1.ErrnoError(r);if(!t.node_ops.unlink)throw new FS$1.ErrnoError(63);if(FS$1.isMountpoint(n))throw new FS$1.ErrnoError(10);t.node_ops.unlink(t,i),FS$1.destroyNode(n)},readlink:e=>{var t=FS$1.lookupPath(e).node;if(!t)throw new FS$1.ErrnoError(44);if(!t.node_ops.readlink)throw new FS$1.ErrnoError(28);return PATH_FS.resolve(FS$1.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,t)=>{var i=FS$1.lookupPath(e,{follow:!t}).node;if(!i)throw new FS$1.ErrnoError(44);if(!i.node_ops.getattr)throw new FS$1.ErrnoError(63);return i.node_ops.getattr(i)},lstat:e=>FS$1.stat(e,!0),chmod:(e,t,i)=>{var n;"string"==typeof e?n=FS$1.lookupPath(e,{follow:!i}).node:n=e;if(!n.node_ops.setattr)throw new FS$1.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,t)=>{FS$1.chmod(e,t,!0)},fchmod:(e,t)=>{var i=FS$1.getStream(e);if(!i)throw new FS$1.ErrnoError(8);FS$1.chmod(i.node,t)},chown:(e,t,i,n)=>{var r;"string"==typeof e?r=FS$1.lookupPath(e,{follow:!n}).node:r=e;if(!r.node_ops.setattr)throw new FS$1.ErrnoError(63);r.node_ops.setattr(r,{timestamp:Date.now()})},lchown:(e,t,i)=>{FS$1.chown(e,t,i,!0)},fchown:(e,t,i)=>{var n=FS$1.getStream(e);if(!n)throw new FS$1.ErrnoError(8);FS$1.chown(n.node,t,i)},truncate:(e,t)=>{if(t<0)throw new FS$1.ErrnoError(28);var i;"string"==typeof e?i=FS$1.lookupPath(e,{follow:!0}).node:i=e;if(!i.node_ops.setattr)throw new FS$1.ErrnoError(63);if(FS$1.isDir(i.mode))throw new FS$1.ErrnoError(31);if(!FS$1.isFile(i.mode))throw new FS$1.ErrnoError(28);var n=FS$1.nodePermissions(i,"w");if(n)throw new FS$1.ErrnoError(n);i.node_ops.setattr(i,{size:t,timestamp:Date.now()})},ftruncate:(e,t)=>{var i=FS$1.getStream(e);if(!i)throw new FS$1.ErrnoError(8);if(0==(2097155&i.flags))throw new FS$1.ErrnoError(28);FS$1.truncate(i.node,t)},utime:(e,t,i)=>{var n=FS$1.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,i)})},open:(e,t,i)=>{if(""===e)throw new FS$1.ErrnoError(44);var n;if(i=void 0===i?438:i,i=64&(t="string"==typeof t?FS$1.modeStringToFlags(t):t)?4095&i|32768:0,"object"==typeof e)n=e;else{e=PATH.normalize(e);try{n=FS$1.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var r=!1;if(64&t)if(n){if(128&t)throw new FS$1.ErrnoError(20)}else n=FS$1.mknod(e,i,0),r=!0;if(!n)throw new FS$1.ErrnoError(44);if(FS$1.isChrdev(n.mode)&&(t&=-513),65536&t&&!FS$1.isDir(n.mode))throw new FS$1.ErrnoError(54);if(!r){var o=FS$1.mayOpen(n,t);if(o)throw new FS$1.ErrnoError(o)}512&t&&!r&&FS$1.truncate(n,0),t&=-131713;var a=FS$1.createStream({node:n,path:FS$1.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!Module$2.logReadFiles||1&t||(FS$1.readFiles||(FS$1.readFiles={}),e in FS$1.readFiles||(FS$1.readFiles[e]=1)),a},close:e=>{if(FS$1.isClosed(e))throw new FS$1.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{FS$1.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,t,i)=>{if(FS$1.isClosed(e))throw new FS$1.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new FS$1.ErrnoError(70);if(0!=i&&1!=i&&2!=i)throw new FS$1.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,i),e.ungotten=[],e.position},read:(e,t,i,n,r)=>{if(n<0||r<0)throw new FS$1.ErrnoError(28);if(FS$1.isClosed(e))throw new FS$1.ErrnoError(8);if(1==(2097155&e.flags))throw new FS$1.ErrnoError(8);if(FS$1.isDir(e.node.mode))throw new FS$1.ErrnoError(31);if(!e.stream_ops.read)throw new FS$1.ErrnoError(28);var o=void 0!==r;if(o){if(!e.seekable)throw new FS$1.ErrnoError(70)}else r=e.position;var a=e.stream_ops.read(e,t,i,n,r);return o||(e.position+=a),a},write:(e,t,i,n,r,o)=>{if(n<0||r<0)throw new FS$1.ErrnoError(28);if(FS$1.isClosed(e))throw new FS$1.ErrnoError(8);if(0==(2097155&e.flags))throw new FS$1.ErrnoError(8);if(FS$1.isDir(e.node.mode))throw new FS$1.ErrnoError(31);if(!e.stream_ops.write)throw new FS$1.ErrnoError(28);e.seekable&&1024&e.flags&&FS$1.llseek(e,0,2);var a=void 0!==r;if(a){if(!e.seekable)throw new FS$1.ErrnoError(70)}else r=e.position;var s=e.stream_ops.write(e,t,i,n,r,o);return a||(e.position+=s),s},allocate:(e,t,i)=>{if(FS$1.isClosed(e))throw new FS$1.ErrnoError(8);if(t<0||i<=0)throw new FS$1.ErrnoError(28);if(0==(2097155&e.flags))throw new FS$1.ErrnoError(8);if(!FS$1.isFile(e.node.mode)&&!FS$1.isDir(e.node.mode))throw new FS$1.ErrnoError(43);if(!e.stream_ops.allocate)throw new FS$1.ErrnoError(138);e.stream_ops.allocate(e,t,i)},mmap:(e,t,i,n,r)=>{if(0!=(2&n)&&0==(2&r)&&2!=(2097155&e.flags))throw new FS$1.ErrnoError(2);if(1==(2097155&e.flags))throw new FS$1.ErrnoError(2);if(!e.stream_ops.mmap)throw new FS$1.ErrnoError(43);return e.stream_ops.mmap(e,t,i,n,r)},msync:(e,t,i,n,r)=>e.stream_ops.msync?e.stream_ops.msync(e,t,i,n,r):0,munmap:e=>0,ioctl:(e,t,i)=>{if(!e.stream_ops.ioctl)throw new FS$1.ErrnoError(59);return e.stream_ops.ioctl(e,t,i)},readFile:(e,t={})=>{if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var i,n=FS$1.open(e,t.flags),r=FS$1.stat(e).size,o=new Uint8Array(r);return FS$1.read(n,o,0,r,0),"utf8"===t.encoding?i=UTF8ArrayToString$1(o,0):"binary"===t.encoding&&(i=o),FS$1.close(n),i},writeFile:(e,t,i={})=>{i.flags=i.flags||577;var n=FS$1.open(e,i.flags,i.mode);if("string"==typeof t){var r=new Uint8Array(lengthBytesUTF8$1(t)+1),o=stringToUTF8Array$1(t,r,0,r.length);FS$1.write(n,r,0,o,void 0,i.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");FS$1.write(n,t,0,t.byteLength,void 0,i.canOwn)}FS$1.close(n)},cwd:()=>FS$1.currentPath,chdir:e=>{var t=FS$1.lookupPath(e,{follow:!0});if(null===t.node)throw new FS$1.ErrnoError(44);if(!FS$1.isDir(t.node.mode))throw new FS$1.ErrnoError(54);var i=FS$1.nodePermissions(t.node,"x");if(i)throw new FS$1.ErrnoError(i);FS$1.currentPath=t.path},createDefaultDirectories:()=>{FS$1.mkdir("/tmp"),FS$1.mkdir("/home"),FS$1.mkdir("/home/web_user")},createDefaultDevices:()=>{FS$1.mkdir("/dev"),FS$1.registerDevice(FS$1.makedev(1,3),{read:()=>0,write:(e,t,i,n,r)=>n}),FS$1.mkdev("/dev/null",FS$1.makedev(1,3)),TTY.register(FS$1.makedev(5,0),TTY.default_tty_ops),TTY.register(FS$1.makedev(6,0),TTY.default_tty1_ops),FS$1.mkdev("/dev/tty",FS$1.makedev(5,0)),FS$1.mkdev("/dev/tty1",FS$1.makedev(6,0));var e=getRandomDevice();FS$1.createDevice("/dev","random",e),FS$1.createDevice("/dev","urandom",e),FS$1.mkdir("/dev/shm"),FS$1.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{FS$1.mkdir("/proc");var e=FS$1.mkdir("/proc/self");FS$1.mkdir("/proc/self/fd"),FS$1.mount({mount:()=>{var t=FS$1.createNode(e,"fd",16895,73);return t.node_ops={lookup:(e,t)=>{var i=+t,n=FS$1.getStream(i);if(!n)throw new FS$1.ErrnoError(8);var r={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return r.parent=r,r}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{Module$2.stdin?FS$1.createDevice("/dev","stdin",Module$2.stdin):FS$1.symlink("/dev/tty","/dev/stdin"),Module$2.stdout?FS$1.createDevice("/dev","stdout",null,Module$2.stdout):FS$1.symlink("/dev/tty","/dev/stdout"),Module$2.stderr?FS$1.createDevice("/dev","stderr",null,Module$2.stderr):FS$1.symlink("/dev/tty1","/dev/stderr");var e=FS$1.open("/dev/stdin",0),t=FS$1.open("/dev/stdout",1),i=FS$1.open("/dev/stderr",1);assert$1(0===e.fd,"invalid handle for stdin ("+e.fd+")"),assert$1(1===t.fd,"invalid handle for stdout ("+t.fd+")"),assert$1(2===i.fd,"invalid handle for stderr ("+i.fd+")")},ensureErrnoError:()=>{FS$1.ErrnoError||(FS$1.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){for(var t in this.errno=e,ERRNO_CODES$1)if(ERRNO_CODES$1[t]===e){this.code=t;break}},this.setErrno(e),this.message=ERRNO_MESSAGES[e],this.stack&&(Object.defineProperty(this,"stack",{value:(new Error).stack,writable:!0}),this.stack=demangleAll$1(this.stack))},FS$1.ErrnoError.prototype=new Error,FS$1.ErrnoError.prototype.constructor=FS$1.ErrnoError,[44].forEach((e=>{FS$1.genericErrors[e]=new FS$1.ErrnoError(e),FS$1.genericErrors[e].stack="<generic error, no stack>"})))},staticInit:()=>{FS$1.ensureErrnoError(),FS$1.nameTable=new Array(4096),FS$1.mount(MEMFS,{},"/"),FS$1.createDefaultDirectories(),FS$1.createDefaultDevices(),FS$1.createSpecialDirectories(),FS$1.filesystems={MEMFS:MEMFS}},init:(e,t,i)=>{assert$1(!FS$1.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),FS$1.init.initialized=!0,FS$1.ensureErrnoError(),Module$2.stdin=e||Module$2.stdin,Module$2.stdout=t||Module$2.stdout,Module$2.stderr=i||Module$2.stderr,FS$1.createStandardStreams()},quit:()=>{FS$1.init.initialized=!1,_fflush(0);for(var e=0;e<FS$1.streams.length;e++){var t=FS$1.streams[e];t&&FS$1.close(t)}},getMode:(e,t)=>{var i=0;return e&&(i|=365),t&&(i|=146),i},findObject:(e,t)=>{var i=FS$1.analyzePath(e,t);return i.exists?i.object:null},analyzePath:(e,t)=>{try{e=(n=FS$1.lookupPath(e,{follow:!t})).path}catch(e){}var i={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=FS$1.lookupPath(e,{parent:!0});i.parentExists=!0,i.parentPath=n.path,i.parentObject=n.node,i.name=PATH.basename(e),n=FS$1.lookupPath(e,{follow:!t}),i.exists=!0,i.path=n.path,i.object=n.node,i.name=n.node.name,i.isRoot="/"===n.path}catch(e){i.error=e.errno}return i},createPath:(e,t,i,n)=>{e="string"==typeof e?e:FS$1.getPath(e);for(var r=t.split("/").reverse();r.length;){var o=r.pop();if(o){var a=PATH.join2(e,o);try{FS$1.mkdir(a)}catch(e){}e=a}}return a},createFile:(e,t,i,n,r)=>{var o=PATH.join2("string"==typeof e?e:FS$1.getPath(e),t),a=FS$1.getMode(n,r);return FS$1.create(o,a)},createDataFile:(e,t,i,n,r,o)=>{var a=t;e&&(e="string"==typeof e?e:FS$1.getPath(e),a=t?PATH.join2(e,t):e);var s=FS$1.getMode(n,r),l=FS$1.create(a,s);if(i){if("string"==typeof i){for(var u=new Array(i.length),c=0,h=i.length;c<h;++c)u[c]=i.charCodeAt(c);i=u}FS$1.chmod(l,146|s);var d=FS$1.open(l,577);FS$1.write(d,i,0,i.length,0,o),FS$1.close(d),FS$1.chmod(l,s)}return l},createDevice:(e,t,i,n)=>{var r=PATH.join2("string"==typeof e?e:FS$1.getPath(e),t),o=FS$1.getMode(!!i,!!n);FS$1.createDevice.major||(FS$1.createDevice.major=64);var a=FS$1.makedev(FS$1.createDevice.major++,0);return FS$1.registerDevice(a,{open:e=>{e.seekable=!1},close:e=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(e,t,n,r,o)=>{for(var a=0,s=0;s<r;s++){var l;try{l=i()}catch(e){throw new FS$1.ErrnoError(29)}if(void 0===l&&0===a)throw new FS$1.ErrnoError(6);if(null==l)break;a++,t[n+s]=l}return a&&(e.node.timestamp=Date.now()),a},write:(e,t,i,r,o)=>{for(var a=0;a<r;a++)try{n(t[i+a])}catch(e){throw new FS$1.ErrnoError(29)}return r&&(e.node.timestamp=Date.now()),a}}),FS$1.mkdev(r,o,a)},forceLoadFile:e=>{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!read_)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=intArrayFromString$1(read_(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new FS$1.ErrnoError(29)}},createLazyFile:(e,t,i,n,r)=>{function o(){this.lengthKnown=!1,this.chunks=[]}if(o.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,i=e/this.chunkSize|0;return this.getter(i)[t]}},o.prototype.setDataGetter=function(e){this.getter=e},o.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",i,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+i+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),r=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,o=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;r||(a=n);var s=this;s.setDataGetter((e=>{var t=e*a,r=(e+1)*a-1;if(r=Math.min(r,n-1),void 0===s.chunks[e]&&(s.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var r=new XMLHttpRequest;if(r.open("GET",i,!1),n!==a&&r.setRequestHeader("Range","bytes="+e+"-"+t),r.responseType="arraybuffer",r.overrideMimeType&&r.overrideMimeType("text/plain; charset=x-user-defined"),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+i+". Status: "+r.status);return void 0!==r.response?new Uint8Array(r.response||[]):intArrayFromString$1(r.responseText||"",!0)})(t,r)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!o&&n||(a=n=1,n=this.getter(0).length,a=n,out("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!ENVIRONMENT_IS_WORKER$1)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new o;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:a}}else s={isDevice:!1,url:i};var l=FS$1.createFile(e,t,s,n,r);s.contents?l.contents=s.contents:s.url&&(l.contents=null,l.url=s.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var u={};function c(e,t,i,n,r){var o=e.node.contents;if(r>=o.length)return 0;var a=Math.min(o.length-r,n);if(assert$1(a>=0),o.slice)for(var s=0;s<a;s++)t[i+s]=o[r+s];else for(s=0;s<a;s++)t[i+s]=o.get(r+s);return a}return Object.keys(l.stream_ops).forEach((e=>{var t=l.stream_ops[e];u[e]=function(){return FS$1.forceLoadFile(l),t.apply(null,arguments)}})),u.read=(e,t,i,n,r)=>(FS$1.forceLoadFile(l),c(e,t,i,n,r)),u.mmap=(e,t,i,n,r)=>{FS$1.forceLoadFile(l);var o=mmapAlloc();if(!o)throw new FS$1.ErrnoError(48);return c(e,HEAP8$1,o,t,i),{ptr:o,allocated:!0}},l.stream_ops=u,l},createPreloadedFile:(e,t,i,n,r,o,a,s,l,u)=>{var c=t?PATH_FS.resolve(PATH.join2(e,t)):e,h=getUniqueRunDependency("cp "+c);function d(i){function d(i){u&&u(),s||FS$1.createDataFile(e,t,i,n,r,l),o&&o(),removeRunDependency$1(h)}Browser.handledByPreloadPlugin(i,c,d,(()=>{a&&a(),removeRunDependency$1(h)}))||d(i)}addRunDependency$1(h),"string"==typeof i?asyncLoad(i,(e=>d(e)),a):d(i)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,t,i)=>{t=t||(()=>{}),i=i||(()=>{});var n=FS$1.indexedDB();try{var r=n.open(FS$1.DB_NAME(),FS$1.DB_VERSION)}catch(e){return i(e)}r.onupgradeneeded=()=>{out("creating db"),r.result.createObjectStore(FS$1.DB_STORE_NAME)},r.onsuccess=()=>{var n=r.result.transaction([FS$1.DB_STORE_NAME],"readwrite"),o=n.objectStore(FS$1.DB_STORE_NAME),a=0,s=0,l=e.length;function u(){0==s?t():i()}e.forEach((e=>{var t=o.put(FS$1.analyzePath(e).object.contents,e);t.onsuccess=()=>{++a+s==l&&u()},t.onerror=()=>{s++,a+s==l&&u()}})),n.onerror=i},r.onerror=i},loadFilesFromDB:(e,t,i)=>{t=t||(()=>{}),i=i||(()=>{});var n=FS$1.indexedDB();try{var r=n.open(FS$1.DB_NAME(),FS$1.DB_VERSION)}catch(e){return i(e)}r.onupgradeneeded=i,r.onsuccess=()=>{var n=r.result;try{var o=n.transaction([FS$1.DB_STORE_NAME],"readonly")}catch(e){return void i(e)}var a=o.objectStore(FS$1.DB_STORE_NAME),s=0,l=0,u=e.length;function c(){0==l?t():i()}e.forEach((e=>{var t=a.get(e);t.onsuccess=()=>{FS$1.analyzePath(e).exists&&FS$1.unlink(e),FS$1.createDataFile(PATH.dirname(e),PATH.basename(e),t.result,!0,!0,!0),++s+l==u&&c()},t.onerror=()=>{l++,s+l==u&&c()}})),o.onerror=i},r.onerror=i},absolutePath:()=>{abort$1("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder:()=>{abort$1("FS.createFolder has been removed; use FS.mkdir instead")},createLink:()=>{abort$1("FS.createLink has been removed; use FS.symlink instead")},joinPath:()=>{abort$1("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc:()=>{abort$1("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath:()=>{abort$1("FS.standardizePath has been removed; use PATH.normalize instead")}},SYSCALLS$1={DEFAULT_POLLMASK:5,calculateAt:function(e,t,i){if(PATH.isAbs(t))return t;var n;-100===e?n=FS$1.cwd():n=SYSCALLS$1.getStreamFromFD(e).path;if(0==t.length){if(!i)throw new FS$1.ErrnoError(44);return n}return PATH.join2(n,t)},doStat:function(e,t,i){try{var n=e(t)}catch(e){if(e&&e.node&&PATH.normalize(t)!==PATH.normalize(FS$1.getPath(e.node)))return-54;throw e}HEAP32$1[i>>2]=n.dev,HEAP32$1[i+8>>2]=n.ino,HEAP32$1[i+12>>2]=n.mode,HEAPU32$1[i+16>>2]=n.nlink,HEAP32$1[i+20>>2]=n.uid,HEAP32$1[i+24>>2]=n.gid,HEAP32$1[i+28>>2]=n.rdev,tempI64$1=[n.size>>>0,(tempDouble$1=n.size,+Math.abs(tempDouble$1)>=1?tempDouble$1>0?(0|Math.min(+Math.floor(tempDouble$1/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble$1-+(~~tempDouble$1>>>0))/4294967296)>>>0:0)],HEAP32$1[i+40>>2]=tempI64$1[0],HEAP32$1[i+44>>2]=tempI64$1[1],HEAP32$1[i+48>>2]=4096,HEAP32$1[i+52>>2]=n.blocks;var r=n.atime.getTime(),o=n.mtime.getTime(),a=n.ctime.getTime();return tempI64$1=[Math.floor(r/1e3)>>>0,(tempDouble$1=Math.floor(r/1e3),+Math.abs(tempDouble$1)>=1?tempDouble$1>0?(0|Math.min(+Math.floor(tempDouble$1/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble$1-+(~~tempDouble$1>>>0))/4294967296)>>>0:0)],HEAP32$1[i+56>>2]=tempI64$1[0],HEAP32$1[i+60>>2]=tempI64$1[1],HEAPU32$1[i+64>>2]=r%1e3*1e3,tempI64$1=[Math.floor(o/1e3)>>>0,(tempDouble$1=Math.floor(o/1e3),+Math.abs(tempDouble$1)>=1?tempDouble$1>0?(0|Math.min(+Math.floor(tempDouble$1/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble$1-+(~~tempDouble$1>>>0))/4294967296)>>>0:0)],HEAP32$1[i+72>>2]=tempI64$1[0],HEAP32$1[i+76>>2]=tempI64$1[1],HEAPU32$1[i+80>>2]=o%1e3*1e3,tempI64$1=[Math.floor(a/1e3)>>>0,(tempDouble$1=Math.floor(a/1e3),+Math.abs(tempDouble$1)>=1?tempDouble$1>0?(0|Math.min(+Math.floor(tempDouble$1/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble$1-+(~~tempDouble$1>>>0))/4294967296)>>>0:0)],HEAP32$1[i+88>>2]=tempI64$1[0],HEAP32$1[i+92>>2]=tempI64$1[1],HEAPU32$1[i+96>>2]=a%1e3*1e3,tempI64$1=[n.ino>>>0,(tempDouble$1=n.ino,+Math.abs(tempDouble$1)>=1?tempDouble$1>0?(0|Math.min(+Math.floor(tempDouble$1/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble$1-+(~~tempDouble$1>>>0))/4294967296)>>>0:0)],HEAP32$1[i+104>>2]=tempI64$1[0],HEAP32$1[i+108>>2]=tempI64$1[1],0},doMsync:function(e,t,i,n,r){if(!FS$1.isFile(t.node.mode))throw new FS$1.ErrnoError(43);if(2&n)return 0;var o=HEAPU8$1.slice(e,e+i);FS$1.msync(t,o,r,i,n)},varargs:void 0,get:function(){return assert$1(null!=SYSCALLS$1.varargs),SYSCALLS$1.varargs+=4,HEAP32$1[SYSCALLS$1.varargs-4>>2]},getStr:function(e){return UTF8ToString$1(e)},getStreamFromFD:function(e){var t=FS$1.getStream(e);if(!t)throw new FS$1.ErrnoError(8);return t}};function ___syscall_faccessat(e,t,i,n){try{if(t=SYSCALLS$1.getStr(t),assert$1(0===n),t=SYSCALLS$1.calculateAt(e,t),-8&i)return-28;var r=FS$1.lookupPath(t,{follow:!0}).node;if(!r)return-44;var o="";return 4&i&&(o+="r"),2&i&&(o+="w"),1&i&&(o+="x"),o&&FS$1.nodePermissions(r,o)?-2:0}catch(e){if(void 0===FS$1||!(e instanceof FS$1.ErrnoError))throw e;return-e.errno}}function ___syscall_getdents64(e,t,i){try{var n=SYSCALLS$1.getStreamFromFD(e);n.getdents||(n.getdents=FS$1.readdir(n.path));for(var r=280,o=0,a=FS$1.llseek(n,0,1),s=Math.floor(a/r);s<n.getdents.length&&o+r<=i;){var l,u,c=n.getdents[s];if("."===c)l=n.node.id,u=4;else if(".."===c){l=FS$1.lookupPath(n.path,{parent:!0}).node.id,u=4}else{var h=FS$1.lookupNode(n.node,c);l=h.id,u=FS$1.isChrdev(h.mode)?2:FS$1.isDir(h.mode)?4:FS$1.isLink(h.mode)?10:8}assert$1(l),tempI64$1=[l>>>0,(tempDouble$1=l,+Math.abs(tempDouble$1)>=1?tempDouble$1>0?(0|Math.min(+Math.floor(tempDouble$1/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble$1-+(~~tempDouble$1>>>0))/4294967296)>>>0:0)],HEAP32$1[t+o>>2]=tempI64$1[0],HEAP32$1[t+o+4>>2]=tempI64$1[1],tempI64$1=[(s+1)*r>>>0,(tempDouble$1=(s+1)*r,+Math.abs(tempDouble$1)>=1?tempDouble$1>0?(0|Math.min(+Math.floor(tempDouble$1/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble$1-+(~~tempDouble$1>>>0))/4294967296)>>>0:0)],HEAP32$1[t+o+8>>2]=tempI64$1[0],HEAP32$1[t+o+12>>2]=tempI64$1[1],HEAP16$1[t+o+16>>1]=280,HEAP8$1[t+o+18>>0]=u,stringToUTF8$1(c,t+o+19,256),o+=r,s+=1}return FS$1.llseek(n,s*r,0),o}catch(e){if(void 0===FS$1||!(e instanceof FS$1.ErrnoError))throw e;return-e.errno}}function ___syscall_mkdirat(e,t,i){try{return t=SYSCALLS$1.getStr(t),t=SYSCALLS$1.calculateAt(e,t),"/"===(t=PATH.normalize(t))[t.length-1]&&(t=t.substr(0,t.length-1)),FS$1.mkdir(t,i,0),0}catch(e){if(void 0===FS$1||!(e instanceof FS$1.ErrnoError))throw e;return-e.errno}}function ___syscall_openat(e,t,i,n){SYSCALLS$1.varargs=n;try{t=SYSCALLS$1.getStr(t),t=SYSCALLS$1.calculateAt(e,t);var r=n?SYSCALLS$1.get():0;return FS$1.open(t,i,r).fd}catch(e){if(void 0===FS$1||!(e instanceof FS$1.ErrnoError))throw e;return-e.errno}}function ___syscall_rmdir(e){try{return e=SYSCALLS$1.getStr(e),FS$1.rmdir(e),0}catch(e){if(void 0===FS$1||!(e instanceof FS$1.ErrnoError))throw e;return-e.errno}}function ___syscall_statfs64(e,t,i){try{return e=SYSCALLS$1.getStr(e),assert$1(64===t),HEAP32$1[i+4>>2]=4096,HEAP32$1[i+40>>2]=4096,HEAP32$1[i+8>>2]=1e6,HEAP32$1[i+12>>2]=5e5,HEAP32$1[i+16>>2]=5e5,HEAP32$1[i+20>>2]=FS$1.nextInode,HEAP32$1[i+24>>2]=1e6,HEAP32$1[i+28>>2]=42,HEAP32$1[i+44>>2]=2,HEAP32$1[i+36>>2]=255,0}catch(e){if(void 0===FS$1||!(e instanceof FS$1.ErrnoError))throw e;return-e.errno}}function ___syscall_unlinkat(e,t,i){try{return t=SYSCALLS$1.getStr(t),t=SYSCALLS$1.calculateAt(e,t),0===i?FS$1.unlink(t):512===i?FS$1.rmdir(t):abort$1("Invalid flags passed to unlinkat"),0}catch(e){if(void 0===FS$1||!(e instanceof FS$1.ErrnoError))throw e;return-e.errno}}function __dlinit(e){}var dlopenMissingError="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking";function __dlopen_js(e,t){abort$1(dlopenMissingError)}function __dlsym_js(e,t){abort$1(dlopenMissingError)}function __emscripten_throw_longjmp(){throw 1/0}function readI53FromI64(e){return HEAPU32$1[e>>2]+4294967296*HEAP32$1[e+4>>2]}function __isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}var __MONTH_DAYS_LEAP_CUMULATIVE=[0,31,60,91,121,152,182,213,244,274,305,335],__MONTH_DAYS_REGULAR_CUMULATIVE=[0,31,59,90,120,151,181,212,243,273,304,334];function __yday_from_date(e){return(__isLeapYear(e.getFullYear())?__MONTH_DAYS_LEAP_CUMULATIVE:__MONTH_DAYS_REGULAR_CUMULATIVE)[e.getMonth()]+e.getDate()-1}function __localtime_js(e,t){var i=new Date(1e3*readI53FromI64(e));HEAP32$1[t>>2]=i.getSeconds(),HEAP32$1[t+4>>2]=i.getMinutes(),HEAP32$1[t+8>>2]=i.getHours(),HEAP32$1[t+12>>2]=i.getDate(),HEAP32$1[t+16>>2]=i.getMonth(),HEAP32$1[t+20>>2]=i.getFullYear()-1900,HEAP32$1[t+24>>2]=i.getDay();var n=0|__yday_from_date(i);HEAP32$1[t+28>>2]=n,HEAP32$1[t+36>>2]=-60*i.getTimezoneOffset();var r=new Date(i.getFullYear(),0,1),o=new Date(i.getFullYear(),6,1).getTimezoneOffset(),a=r.getTimezoneOffset(),s=0|(o!=a&&i.getTimezoneOffset()==Math.min(a,o));HEAP32$1[t+32>>2]=s}function allocateUTF8(e){var t=lengthBytesUTF8$1(e)+1,i=_malloc$1(t);return i&&stringToUTF8Array$1(e,HEAP8$1,i,t),i}function __tzset_js(e,t,i){var n=(new Date).getFullYear(),r=new Date(n,0,1),o=new Date(n,6,1),a=r.getTimezoneOffset(),s=o.getTimezoneOffset(),l=Math.max(a,s);function u(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}HEAPU32$1[e>>2]=60*l,HEAP32$1[t>>2]=Number(a!=s);var c=u(r),h=u(o),d=allocateUTF8(c),f=allocateUTF8(h);s<a?(HEAPU32$1[i>>2]=d,HEAPU32$1[i+4>>2]=f):(HEAPU32$1[i>>2]=f,HEAPU32$1[i+4>>2]=d)}function _abort$1(){abort$1("native code called abort()")}function _emscripten_date_now(){return Date.now()}function _emscripten_memcpy_big$1(e,t,i){HEAPU8$1.copyWithin(e,t,t+i)}function getHeapMax(){return 2147483648}function emscripten_realloc_buffer(e){try{return wasmMemory.grow(e-buffer$1.byteLength+65535>>>16),updateGlobalBufferAndViews(wasmMemory.buffer),1}catch(t){err("emscripten_realloc_buffer: Attempted to grow heap from "+buffer$1.byteLength+" bytes to "+e+" bytes, but got error: "+t)}}function _emscripten_resize_heap(e){var t=HEAPU8$1.length;assert$1((e>>>=0)>t);var i=getHeapMax();if(e>i)return err("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is "+i+" bytes!"),!1;let n=(e,t)=>e+(t-e%t)%t;for(var r=1;r<=4;r*=2){var o=t*(1+.2/r);o=Math.min(o,e+100663296);var a=Math.min(i,n(Math.max(e,o),65536));if(emscripten_realloc_buffer(a))return!0}return err("Failed to grow the heap from "+t+" bytes to "+a+" bytes, not enough memory!"),!1}var ENV={};function getExecutableName(){return thisProgram||"./this.program"}function getEnvStrings(){if(!getEnvStrings.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:getExecutableName()};for(var t in ENV)void 0===ENV[t]?delete e[t]:e[t]=ENV[t];var i=[];for(var t in e)i.push(t+"="+e[t]);getEnvStrings.strings=i}return getEnvStrings.strings}function writeAsciiToMemory$1(e,t,i){for(var n=0;n<e.length;++n)assert$1(e.charCodeAt(n)===(255&e.charCodeAt(n))),HEAP8$1[t++>>0]=e.charCodeAt(n);i||(HEAP8$1[t>>0]=0)}function _environ_get(e,t){var i=0;return getEnvStrings().forEach((function(n,r){var o=t+i;HEAPU32$1[e+4*r>>2]=o,writeAsciiToMemory$1(n,o),i+=n.length+1})),0}function _environ_sizes_get(e,t){var i=getEnvStrings();HEAPU32$1[e>>2]=i.length;var n=0;return i.forEach((function(e){n+=e.length+1})),HEAPU32$1[t>>2]=n,0}function _fd_close(e){try{var t=SYSCALLS$1.getStreamFromFD(e);return FS$1.close(t),0}catch(e){if(void 0===FS$1||!(e instanceof FS$1.ErrnoError))throw e;return e.errno}}function doReadv(e,t,i,n){for(var r=0,o=0;o<i;o++){var a=HEAPU32$1[t>>2],s=HEAPU32$1[t+4>>2];t+=8;var l=FS$1.read(e,HEAP8$1,a,s,n);if(l<0)return-1;if(r+=l,l<s)break;void 0!==n&&(n+=l)}return r}function _fd_read(e,t,i,n){try{var r=doReadv(SYSCALLS$1.getStreamFromFD(e),t,i);return HEAPU32$1[n>>2]=r,0}catch(e){if(void 0===FS$1||!(e instanceof FS$1.ErrnoError))throw e;return e.errno}}function convertI32PairToI53Checked(e,t){return assert$1(e==e>>>0||e==(0|e)),assert$1(t===(0|t)),t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN}function _fd_seek(e,t,i,n,r){try{var o=convertI32PairToI53Checked(t,i);if(isNaN(o))return 61;var a=SYSCALLS$1.getStreamFromFD(e);return FS$1.llseek(a,o,n),tempI64$1=[a.position>>>0,(tempDouble$1=a.position,+Math.abs(tempDouble$1)>=1?tempDouble$1>0?(0|Math.min(+Math.floor(tempDouble$1/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble$1-+(~~tempDouble$1>>>0))/4294967296)>>>0:0)],HEAP32$1[r>>2]=tempI64$1[0],HEAP32$1[r+4>>2]=tempI64$1[1],a.getdents&&0===o&&0===n&&(a.getdents=null),0}catch(e){if(void 0===FS$1||!(e instanceof FS$1.ErrnoError))throw e;return e.errno}}function doWritev(e,t,i,n){for(var r=0,o=0;o<i;o++){var a=HEAPU32$1[t>>2],s=HEAPU32$1[t+4>>2];t+=8;var l=FS$1.write(e,HEAP8$1,a,s,n);if(l<0)return-1;r+=l,void 0!==n&&(n+=l)}return r}function _fd_write(e,t,i,n){try{var r=doWritev(SYSCALLS$1.getStreamFromFD(e),t,i);return HEAPU32$1[n>>2]=r,0}catch(e){if(void 0===FS$1||!(e instanceof FS$1.ErrnoError))throw e;return e.errno}}function __arraySum(e,t){for(var i=0,n=0;n<=t;i+=e[n++]);return i}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31],__MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(e,t){for(var i=new Date(e.getTime());t>0;){var n=__isLeapYear(i.getFullYear()),r=i.getMonth(),o=(n?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[r];if(!(t>o-i.getDate()))return i.setDate(i.getDate()+t),i;t-=o-i.getDate()+1,i.setDate(1),r<11?i.setMonth(r+1):(i.setMonth(0),i.setFullYear(i.getFullYear()+1))}return i}function writeArrayToMemory$1(e,t){assert$1(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),HEAP8$1.set(e,t)}function _strftime(e,t,i,n){var r=HEAP32$1[n+40>>2],o={tm_sec:HEAP32$1[n>>2],tm_min:HEAP32$1[n+4>>2],tm_hour:HEAP32$1[n+8>>2],tm_mday:HEAP32$1[n+12>>2],tm_mon:HEAP32$1[n+16>>2],tm_year:HEAP32$1[n+20>>2],tm_wday:HEAP32$1[n+24>>2],tm_yday:HEAP32$1[n+28>>2],tm_isdst:HEAP32$1[n+32>>2],tm_gmtoff:HEAP32$1[n+36>>2],tm_zone:r?UTF8ToString$1(r):""},a=UTF8ToString$1(i),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in s)a=a.replace(new RegExp(l,"g"),s[l]);var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"];function h(e,t,i){for(var n="number"==typeof e?e.toString():e||"";n.length<t;)n=i[0]+n;return n}function d(e,t){return h(e,t,"0")}function f(e,t){function i(e){return e<0?-1:e>0?1:0}var n;return 0===(n=i(e.getFullYear()-t.getFullYear()))&&0===(n=i(e.getMonth()-t.getMonth()))&&(n=i(e.getDate()-t.getDate())),n}function p(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function _(e){var t=__addDays(new Date(e.tm_year+1900,0,1),e.tm_yday),i=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),r=p(i),o=p(n);return f(r,t)<=0?f(o,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var m={"%a":function(e){return u[e.tm_wday].substring(0,3)},"%A":function(e){return u[e.tm_wday]},"%b":function(e){return c[e.tm_mon].substring(0,3)},"%B":function(e){return c[e.tm_mon]},"%C":function(e){return d((e.tm_year+1900)/100|0,2)},"%d":function(e){return d(e.tm_mday,2)},"%e":function(e){return h(e.tm_mday,2," ")},"%g":function(e){return _(e).toString().substring(2)},"%G":function(e){return _(e)},"%H":function(e){return d(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),d(t,2)},"%j":function(e){return d(e.tm_mday+__arraySum(__isLeapYear(e.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,e.tm_mon-1),3)},"%m":function(e){return d(e.tm_mon+1,2)},"%M":function(e){return d(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return d(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=e.tm_yday+7-e.tm_wday;return d(Math.floor(t/7),2)},"%V":function(e){var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var i=(e.tm_wday+371-e.tm_yday)%7;4==i||3==i&&__isLeapYear(e.tm_year)||(t=1)}}else{t=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&__isLeapYear(e.tm_year%400-1))&&t++}return d(t,2)},"%w":function(e){return e.tm_wday},"%W":function(e){var t=e.tm_yday+7-(e.tm_wday+6)%7;return d(Math.floor(t/7),2)},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var t=e.tm_gmtoff,i=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(i?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var l in a=a.replace(/%%/g,"\0\0"),m)a.includes(l)&&(a=a.replace(new RegExp(l,"g"),m[l](o)));var $=intArrayFromString$1(a=a.replace(/\0\0/g,"%"),!1);return $.length>t?0:(writeArrayToMemory$1($,e),$.length-1)}function _strftime_l(e,t,i,n,r){return _strftime(e,t,i,n)}var wasmTableMirror=[];function getWasmTableEntry(e){var t=wasmTableMirror[e];return t||(e>=wasmTableMirror.length&&(wasmTableMirror.length=e+1),wasmTableMirror[e]=t=wasmTable.get(e)),assert$1(wasmTable.get(e)==t,"JavaScript-side Wasm function table mirror is out of date!"),t}function getCFunc$1(e){var t=Module$2["_"+e];return assert$1(t,"Cannot call unknown function "+e+", make sure it is exported"),t}function ccall$1(e,t,i,n,r){var o={string:e=>{var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);stringToUTF8$1(e,t=stackAlloc(i),i)}return t},array:e=>{var t=stackAlloc(e.length);return writeArrayToMemory$1(e,t),t}};var a=getCFunc$1(e),s=[],l=0;if(assert$1("array"!==t,'Return type should not be "array".'),n)for(var u=0;u<n.length;u++){var c=o[i[u]];c?(0===l&&(l=stackSave()),s[u]=c(n[u])):s[u]=n[u]}var h=a.apply(null,s);return h=function(e){return 0!==l&&stackRestore(l),function(e){return"string"===t?UTF8ToString$1(e):"boolean"===t?Boolean(e):e}(e)}(h)}function cwrap$1(e,t,i,n){return function(){return ccall$1(e,t,i,arguments)}}var FSNode=function(e,t,i,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=FS$1.nextInode++,this.name=t,this.mode=i,this.node_ops={},this.stream_ops={},this.rdev=n},readMode=365,writeMode=146;function checkIncomingModuleAPI(){ignoredModuleProp("fetchSettings")}Object.defineProperties(FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(e){e?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(e){e?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS$1.isDir(this.mode)}},isDevice:{get:function(){return FS$1.isChrdev(this.mode)}}}),FS$1.FSNode=FSNode,FS$1.staticInit(),ERRNO_CODES$1={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var asmLibraryArg={__assert_fail:___assert_fail,__cxa_throw:___cxa_throw,__syscall_faccessat:___syscall_faccessat,__syscall_getdents64:___syscall_getdents64,__syscall_mkdirat:___syscall_mkdirat,__syscall_openat:___syscall_openat,__syscall_rmdir:___syscall_rmdir,__syscall_statfs64:___syscall_statfs64,__syscall_unlinkat:___syscall_unlinkat,_dlinit:__dlinit,_dlopen_js:__dlopen_js,_dlsym_js:__dlsym_js,_emscripten_throw_longjmp:__emscripten_throw_longjmp,_localtime_js:__localtime_js,_tzset_js:__tzset_js,abort:_abort$1,emscripten_date_now:_emscripten_date_now,emscripten_memcpy_big:_emscripten_memcpy_big$1,emscripten_resize_heap:_emscripten_resize_heap,environ_get:_environ_get,environ_sizes_get:_environ_sizes_get,fd_close:_fd_close,fd_read:_fd_read,fd_seek:_fd_seek,fd_write:_fd_write,invoke_ii:invoke_ii$1,invoke_iii:invoke_iii,invoke_vi:invoke_vi$1,invoke_vii:invoke_vii,invoke_viii:invoke_viii$1,invoke_viiiii:invoke_viiiii$1,strftime:_strftime,strftime_l:_strftime_l};"undefined"!=typeof WebAssembly&&createWasm(),Module$2.___wasm_call_ctors=createExportWrapper("__wasm_call_ctors"),Module$2._linearExtrude=createExportWrapper("linearExtrude"),Module$2._rotateExtrude=createExportWrapper("rotateExtrude"),Module$2._loft=createExportWrapper("loft"),Module$2._free=createExportWrapper("free");var _malloc$1=Module$2._malloc=createExportWrapper("malloc");Module$2._saveSetjmp=createExportWrapper("saveSetjmp"),Module$2.___errno_location=createExportWrapper("__errno_location"),Module$2.___dl_seterr=createExportWrapper("__dl_seterr");var _fflush=Module$2._fflush=createExportWrapper("fflush"),_setThrew=Module$2._setThrew=createExportWrapper("setThrew"),_emscripten_stack_init=Module$2._emscripten_stack_init=function(){return(_emscripten_stack_init=Module$2._emscripten_stack_init=Module$2.asm.emscripten_stack_init).apply(null,arguments)};Module$2._emscripten_stack_get_free=function(){return(Module$2._emscripten_stack_get_free=Module$2.asm.emscripten_stack_get_free).apply(null,arguments)},Module$2._emscripten_stack_get_base=function(){return(Module$2._emscripten_stack_get_base=Module$2.asm.emscripten_stack_get_base).apply(null,arguments)};var _emscripten_stack_get_end=Module$2._emscripten_stack_get_end=function(){return(_emscripten_stack_get_end=Module$2._emscripten_stack_get_end=Module$2.asm.emscripten_stack_get_end).apply(null,arguments)},stackSave=Module$2.stackSave=createExportWrapper("stackSave"),stackRestore=Module$2.stackRestore=createExportWrapper("stackRestore"),stackAlloc=Module$2.stackAlloc=createExportWrapper("stackAlloc");Module$2._emscripten_stack_get_current=function(){return(Module$2._emscripten_stack_get_current=Module$2.asm.emscripten_stack_get_current).apply(null,arguments)};var ___cxa_is_pointer_type=Module$2.___cxa_is_pointer_type=createExportWrapper("__cxa_is_pointer_type");function invoke_vii(e,t,i){var n=stackSave();try{getWasmTableEntry(e)(t,i)}catch(e){if(stackRestore(n),e!==e+0)throw e;_setThrew(1,0)}}function invoke_vi$1(e,t){var i=stackSave();try{getWasmTableEntry(e)(t)}catch(e){if(stackRestore(i),e!==e+0)throw e;_setThrew(1,0)}}function invoke_ii$1(e,t){var i=stackSave();try{return getWasmTableEntry(e)(t)}catch(e){if(stackRestore(i),e!==e+0)throw e;_setThrew(1,0)}}function invoke_iii(e,t,i){var n=stackSave();try{return getWasmTableEntry(e)(t,i)}catch(e){if(stackRestore(n),e!==e+0)throw e;_setThrew(1,0)}}function invoke_viii$1(e,t,i,n){var r=stackSave();try{getWasmTableEntry(e)(t,i,n)}catch(e){if(stackRestore(r),e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiii$1(e,t,i,n,r,o){var a=stackSave();try{getWasmTableEntry(e)(t,i,n,r,o)}catch(e){if(stackRestore(a),e!==e+0)throw e;_setThrew(1,0)}}Module$2.dynCall_ji=createExportWrapper("dynCall_ji"),Module$2.dynCall_iiji=createExportWrapper("dynCall_iiji"),Module$2.dynCall_jiji=createExportWrapper("dynCall_jiji"),Module$2.dynCall_viijii=createExportWrapper("dynCall_viijii"),Module$2.dynCall_iiiiij=createExportWrapper("dynCall_iiiiij"),Module$2.dynCall_iiiiijj=createExportWrapper("dynCall_iiiiijj"),Module$2.dynCall_iiiiiijj=createExportWrapper("dynCall_iiiiiijj"),Module$2.ccall=ccall$1,Module$2.cwrap=cwrap$1;var unexportedRuntimeSymbols=["run","UTF8ArrayToString","UTF8ToString","stringToUTF8Array","stringToUTF8","lengthBytesUTF8","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","addRunDependency","removeRunDependency","FS_createFolder","FS_createPath","FS_createDataFile","FS_createPreloadedFile","FS_createLazyFile","FS_createLink","FS_createDevice","FS_unlink","getLEB","getFunctionTables","alignFunctionTables","registerFunctions","prettyPrint","getCompilerSetting","out","err","callMain","abort","keepRuntimeAlive","wasmMemory","stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0","writeStackCookie","checkStackCookie","ptrToString","zeroMemory","stringToNewUTF8","exitJS","getHeapMax","emscripten_realloc_buffer","ENV","ERRNO_CODES","ERRNO_MESSAGES","setErrNo","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","DNS","getHostByName","Protocols","Sockets","getRandomDevice","warnOnce","traverseStack","UNWIND_CACHE","convertPCtoSourceLocation","readEmAsmArgsArray","readEmAsmArgs","runEmAsmFunction","runMainThreadEmAsm","jstoi_q","jstoi_s","getExecutableName","listenOnce","autoResumeAudioContext","dynCallLegacy","getDynCaller","dynCall","handleException","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","safeSetTimeout","asmjsMangle","asyncLoad","alignMemory","mmapAlloc","handleAllocator","writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertI32PairToI53Checked","convertU32PairToI53","getCFunc","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","freeTableIndexes","functionsInTableMap","getEmptyTableSlot","updateTableMap","addFunction","removeFunction","reallyNegative","unSign","strLen","reSign","formatString","setValue","getValue","PATH","PATH_FS","intArrayFromString","intArrayToString","AsciiToString","stringToAscii","UTF16Decoder","UTF16ToString","stringToUTF16","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","allocateUTF8","allocateUTF8OnStack","writeStringToMemory","writeArrayToMemory","writeAsciiToMemory","SYSCALLS","getSocketFromFD","getSocketAddress","JSEvents","registerKeyEventCallback","specialHTMLTargets","maybeCStringToJsString","findEventTarget","findCanvasEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","currentFullscreenStrategy","restoreOldWindowedStyle","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","demangle","demangleAll","jsStackTrace","stackTrace","ExitStatus","getEnvStrings","checkWasiClock","doReadv","doWritev","dlopenMissingError","createDyncallWrapper","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","promiseMap","newNativePromise","getPromise","uncaughtExceptionCount","exceptionLast","exceptionCaught","ExceptionInfo","exception_addRef","exception_decRef","Browser","setMainLoop","wget","FS","MEMFS","TTY","PIPEFS","SOCKFS","_setNetworkCallback","tempFixedLengthArray","miniTempWebGLFloatBuffers","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","GL","emscriptenWebGLGet","computeUnpackAlignedImageSize","emscriptenWebGLGetTexPixelData","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","writeGLArray","AL","SDL_unicode","SDL_ttfContext","SDL_audio","SDL","SDL_gfx","GLUT","EGL","GLFW_Window","GLFW","GLEW","IDBStore","runAndAbortIfError","ALLOC_NORMAL","ALLOC_STACK","allocate"];unexportedRuntimeSymbols.forEach(unexportedRuntimeSymbol);var missingLibrarySymbols=["stringToNewUTF8","exitJS","setErrNo","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","getHostByName","traverseStack","convertPCtoSourceLocation","readEmAsmArgs","runEmAsmFunction","runMainThreadEmAsm","jstoi_q","jstoi_s","listenOnce","autoResumeAudioContext","dynCallLegacy","getDynCaller","dynCall","handleException","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","safeSetTimeout","asmjsMangle","handleAllocator","writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromU64","convertI32PairToI53","convertU32PairToI53","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","getEmptyTableSlot","updateTableMap","addFunction","removeFunction","reallyNegative","unSign","strLen","reSign","formatString","intArrayToString","AsciiToString","stringToAscii","UTF16ToString","stringToUTF16","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","allocateUTF8OnStack","writeStringToMemory","getSocketFromFD","getSocketAddress","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","findCanvasEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","jsStackTrace","stackTrace","checkWasiClock","createDyncallWrapper","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","newNativePromise","getPromise","exception_addRef","exception_decRef","setMainLoop","_setNetworkCallback","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","emscriptenWebGLGet","computeUnpackAlignedImageSize","emscriptenWebGLGetTexPixelData","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","writeGLArray","SDL_unicode","SDL_ttfContext","SDL_audio","GLFW_Window","runAndAbortIfError","ALLOC_NORMAL","ALLOC_STACK","allocate"],calledRun;function stackCheckInit(){_emscripten_stack_init(),writeStackCookie()}function run$1(e){function t(){calledRun||(calledRun=!0,Module$2.calledRun=!0,ABORT$1||(initRuntime(),Module$2.onRuntimeInitialized&&Module$2.onRuntimeInitialized(),assert$1(!Module$2._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),postRun$1()))}runDependencies$1>0||(stackCheckInit(),preRun$1(),runDependencies$1>0||(Module$2.setStatus?(Module$2.setStatus("Running..."),setTimeout((function(){setTimeout((function(){Module$2.setStatus("")}),1),t()}),1)):t(),checkStackCookie()))}if(missingLibrarySymbols.forEach(missingLibrarySymbol),dependenciesFulfilled$1=function e(){calledRun||run$1(),calledRun||(dependenciesFulfilled$1=e)},Module$2.preInit)for("function"==typeof Module$2.preInit&&(Module$2.preInit=[Module$2.preInit]);Module$2.preInit.length>0;)Module$2.preInit.pop()();function t$s(){this.pntArray=[]}function i$y(e){e=e||[],this.init(e)}function n$A(e){e=e||[],this._extrudedHeight=void 0,this._closeTop=!0,this._closeBottom=!0,this._isWall=!1,this.init(e)}function c$w(e){for(var t=Number.MAX_VALUE,i=-Number.MAX_VALUE,n=Number.MAX_VALUE,r=-Number.MAX_VALUE,o=0;o<e.length;o++){var a=e[o];t=Math.min(a.x,t),i=Math.max(a.x,i),n=Math.min(a.y,n),r=Math.max(a.y,r)}return{minLon:t,maxLon:i,minLat:n,maxLat:r}}"undefined"!=typeof WebAssembly&&run$1(),t$s.prototype.add=function(e){e instanceof s$w&&this.pntArray.push(e)},t$s.prototype.removeAll=function(){this.pntArray=[]},i$y.prototype=new o$x,i$y.prototype.constructor=i$y,i$y.prototype.parent=o$x.prototype,Object.defineProperties(i$y.prototype,{partCount:{get:function(){return this.parts.length}}}),i$y.prototype.init=function(e){this.parts=[],this.polyline={positions:[],width:10},this.points=[];for(var t=0,i=e.length;t<i;t++){var n=e[t].pntArray.length;if(this.parts.push(n),n>0)for(var r=0;r<n;r++){var o=e[t].pntArray[r];this.points.push(o),this.polyline.positions.push(o)}}this.type=b$K.GEOLINE3D},i$y.prototype.addPart=function(e){if(!(!e instanceof t$s)){for(var t=0,i=e.pntArray.length;t<i;t++)this.points.push(e.pntArray[t]),this.polyline.positions.push(e.pntArray[t]);this.parts.push(e.pntArray.length)}},i$y.prototype.getPart=function(e){if("number"!=typeof e||e>=this.partCount)return null;for(var t=new t$s,i=0,n=0;n<e;n++)i+=this.parts[n];for(n=i;n<this.parts[e];n++)t.add(new s$w(this.points[n].x,this.points[n].y,this.points[n].z));return t},n$A.prototype=new o$x,n$A.prototype.constructor=n$A,n$A.prototype.parent=o$x.prototype,Object.defineProperties(n$A.prototype,{partCount:{get:function(){return this.parts.length}},extrudedHeight:{get:function(){return this._extrudedHeight},set:function(e){this._extrudedHeight=e,this.polygon.extrudedHeight=e,this._isGeometryDirty=!0}},closeTop:{set:function(e){this._closeTop=e,this.polygon.closeTop=e,this._isGeometryDirty=!0}},closeBottom:{set:function(e){this._closeBottom=e,this.polygon.closeBottom=e,this._isGeometryDirty=!0}},isWall:{set:function(e){this._isWall=e,this.polygon.isWall=e,this._isGeometryDirty=!0}},bottomAltitude:{get:function(){return this.polygon.height},set:function(e){this.polygon.height=e,this.polygon.perPositionHeight=!1,this._isGeometryDirty=!0}}}),n$A.prototype.init=function(e){this.type=b$K.GEOREGION3D,this.parts=[],this.points=[],this.polygon={positions:[],extrudedHeight:this.extrudedHeight,closeTop:this._closeTop,closeBottom:this._closeBottom,perPositionHeight:!0,isComputeTexCoord:!0};for(var t=0,i=e.length;t<i;t++){var n=e[t].pntArray.length;if(this.parts.push(n),n>0)for(var r=0;r<n;r++)this.polygon.positions.push(a$11.fromDegrees(e[t].pntArray[r].x,e[t].pntArray[r].y,e[t].pntArray[r].z)),this.points.push(new s$w(e[t].pntArray[r].x,e[t].pntArray[r].y,e[t].pntArray[r].z))}this.type=b$K.GEOREGION3D;var o=c$w(this.points),a=a$11.fromDegrees(o.minLon,o.maxLat,0),s=a$11.fromDegrees(o.maxLon,o.maxLat,0),l=a$11.fromDegrees(o.minLon,o.minLat,0);this.width=a$11.distance(a,s),this.height=a$11.distance(a,l)},n$A.prototype.addPart=function(e){if(!(!e instanceof t$s)){for(var t=0,i=e.pntArray.length;t<i;t++){var n=e.pntArray[t];this.points.push(n),this.polygon.positions.push(a$11.fromDegrees(n.x,n.y,n.z))}this.parts.push(e.pntArray.length)}},n$A.prototype.getPart=function(e){if("number"!=typeof e||e>=this.partCount)return null;for(var t=new t$s,i=0,n=0;n<e;n++)i+=this.parts[n];for(n=i;n<this.parts[e];n++)t.add(new s$w(this.points[n].x,this.points[n].y,this.points[n].z));return t},n$A.prototype._createGeometry=function(){var e=S$C.fromPositions(this.polygon);this._geometry=S$C.createGeometry(e),this._isGeometryDirty=!1};var _0x516656=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x37cace=_0x516656(void 0,(function(){return _0x37cace.toString().search("(((.+)+)+)+$").toString().constructor(_0x37cace).search("(((.+)+)+)+$")}));_0x37cace();var _0x163fa1={};function _0x25d348(e,t=0,i=1,n=1){var r=Module$2._malloc(16);return setValue$1(r,t,"i32"),setValue$1(r+4,e,"i32"),setValue$1(r+8,i,"float"),setValue$1(r+12,n,"float"),r}function _0x3f423a(e,t=4){if(i%t==0)return e;var i=e%t;return 0!=i&&(e+=t-i),e}function _0x262895(e=!1,t=!1,i=!0,n=3,r=!1,o=!1,a=0,s=!0){var l=Module$2._malloc(32);return setValue$1(l,e,"i32"),setValue$1(l+4,t,"i32"),setValue$1(l+8,i,"i32"),setValue$1(l+12,n,"i32"),setValue$1(l+16,r,"i32"),setValue$1(l+20,o,"i32"),setValue$1(l+24,a,"i32"),setValue$1(l+28,s,"i32"),l}function _0x5effb1(e,t=!1,i=!1,n=!0,r=7,o=1,a=1){var s=Module$2._malloc(28);return setValue$1(s,e,"float"),setValue$1(s+4,t,"i32"),setValue$1(s+8,i,"i32"),setValue$1(s+12,n,"i32"),setValue$1(s+16,r,"i32"),setValue$1(s+20,o,"float"),setValue$1(s+24,a,"float"),s}function _0x56e50e(e,t=3){if(t$$(e)){for(var i=e.length,n=0,r=0;r<e.length;r++){n+=(c=e[r]).length}var o=2;(1===t||3===t)&&(o=3);var a=4*(3+i),s=n*o*8+(a=_0x3f423a(a,8)),l=Module$2._malloc(s);setValue$1(l,t,"i32"),setValue$1(l+4,i,"i32"),setValue$1(l+8,8,"i32");for(r=0;r<i;r++){setValue$1(l+8+4*(r+1),(c=e[r]).length,"i32")}var u=0;for(r=0;r<i;r++)for(var c=e[r],h=0;h<c.length;h++)for(var d=c[h],f=0;f<o;f++)setValue$1(l+a+u,d[f],"double"),u+=8;return l}}function _0x3a92c9(e){if(!t$$(e)||0==e)return;var t=0;getValue$1(e,"i32");const i=getValue$1(e+(t+=4),"i32"),n=getValue$1(e+(t+=4),"i32");t+=4;var r=0,o=0,a=0;4==n?(r=getValue$1(e+t,"float"),o=getValue$1(e+(t+=4),"float"),a=getValue$1(e+(t+=n),"float"),t+=n):(r=getValue$1(e+(t=_0x3f423a(t,8)),"double"),o=getValue$1(e+(t+=8),"double"),a=getValue$1(e+(t+=n),"double"),t+=n);for(var s=0;s<i;s++){var l=getValue$1(e+t,"i32");t+=4,t=_0x3f423a(t+=l,4)}var u=[];for(s=0;s<i;s++){var c=[],h=getValue$1(e+t,"i32"),d=getValue$1(e+(t+=4),"i32"),f=getValue$1(e+(t+=4),"i32"),p=getValue$1(e+(t+=4),"i32");t+=4,c[0]=h,c[1]=d,c[2]=f,c[3]=p,u[s]=c}var _=[];for(s=0;s<i;s++){8==n&&(t=_0x3f423a(t,8));h=(c=u[s])[0],d=c[1],f=c[2],p=c[3];for(var m=[],$=0,g=0;g<h;g++)4==n?(m[$++]=getValue$1(e+t,"float"),t+=n,m[$++]=getValue$1(e+t,"float"),t+=n,m[$++]=getValue$1(e+t,"float"),t+=n):(m[$++]=getValue$1(e+t,"double"),t+=n,m[$++]=getValue$1(e+t,"double"),t+=n,m[$++]=getValue$1(e+t,"double"),t+=n);var y=[],v=0;for(g=0;g<d;g++)y[v++]=getValue$1(e+t,"i32"),t+=4,y[v++]=getValue$1(e+t,"i32"),t+=4,y[v++]=getValue$1(e+t,"i32"),t+=4;var x=[],b=0;for(g=0;g<f;g++)x[b++]=getValue$1(e+t,"float"),t+=4,x[b++]=getValue$1(e+t,"float"),t+=4;var S=[],w=0;for(g=0;g<p;g++)S[w++]=getValue$1(e+t,"float"),t+=4,S[w++]=getValue$1(e+t,"float"),t+=4,S[w++]=getValue$1(e+t,"float"),t+=4;_[s]={vertex:{count:c[0],typedArray:m},indices:{typedArray:y,count:c[1]},uv:x,normal:S,position:new a$11(r,o,a)}}return _}function K$p(e){this.id=e,this.vertexFormat=void 0,this.slices=void 0,this.offsetAttribute=void 0}function m$u(e,t){i$J.call(this,{entity:e,scene:t,geometryOptions:new K$p(e),geometryPropertyName:"geometry",observedPropertyNames:["loftParam","geometry","children","orientation","scale","position"]}),this.asynchronous=!1,this.twoPasses=!0,this.wrapS=j$13.REPEAT,this.wrapT=j$13.REPEAT,this.compressVertices=!1;var i=this;t$$(e.geometry)&&(e.geometry.outlineWidth=new i$O(e.geometry.outlineWidth||1),this._outline=new i$O(e.geometry.outline||!1),Object.defineProperties(e.geometry,{outline:{get:function(){return i._outline},set:function(t){if(t!==i._outline)if(!0===t)i._outline=!0,e.geometry.outlineWidth=new i$O(e.geometry.outlineWidth||1),i._onEntityPropertyChanged(e,"geometry",e.geometry,void 0),i.createOutlineGeometryInstance(1);else{i._outline=void 0;var n=e._polygon;t$$(n.outlines)&&n.outlines.removeAll(),n.outlines=void 0,n._outline=!1}}}})),this._onEntityPropertyChanged(e,"geometry",e.geometry,void 0)}_0x163fa1.loft=function(e,t,i,n){if(!(e instanceof i$y))throw new t$_("line3d must be GeoLine3D.");t$$(i)||(i={}),t$$(n)||(n={});for(var r=e$1Y(i.createTexCoord,!0),o=e$1Y(i.generateNormal,!0),a=e$1Y(i.group,!0),s=e$1Y(i.att,3),l=e$1Y(i.splitSegment,!1),u=e$1Y(i.splitSide,!1),c=e$1Y(i.chamferFactor,0),h=e$1Y(i.segmentClosed,!0),d=e$1Y(n.realTexMapSize,!0),f=e$1Y(n.mappingMode,0),p=e$1Y(n.uTiling,1),_=e$1Y(n.vTiling,1),m=[],$=t.parts,g=0,y=0;y<$.length;y++){for(var v=$[y],x=[],b=0;b<v;b++)x.push([t.points[b+g].x,t.points[b+g].y]);m.push(x),g+=v}for(var S=_0x56e50e(m,2),w=[[]],C=0;C<e.points.length;C++)w[0].push([e.points[C].x,e.points[C].y,e.points[C].z]);var T=_0x56e50e(w,1),P=_0x25d348(d,f,p,_),E=_0x262895(r,o,a,s,l,u,c,h),A=Module$2._loft(T,!0,S,E,P);Module$2._free(S),Module$2._free(T),Module$2._free(E),Module$2._free(P);var L=_0x3a92c9(A);return Module$2._free(A),L},_0x163fa1.linearExtrude=function(e,t,i){if(!(e instanceof n$A))throw new t$_("region3d must be GeoRegion3D.");t$$(t)||(t={}),t$$(i)||(i={});for(var n=e$1Y(t.height,10),r=e$1Y(t.createTexCoord,!0),o=e$1Y(t.generateNormal,!0),a=e$1Y(t.group,!0),s=e$1Y(t.att,7),l=e$1Y(t.scaleX,1),u=e$1Y(t.scaleY,1),c=e$1Y(i.realTexMapSize,!0),h=e$1Y(i.mappingMode,0),d=e$1Y(i.uTiling,1),f=e$1Y(i.vTiling,1),p=_0x5effb1(n,r,o,a,s,l,u),_=_0x25d348(c,h,d,f),m=[],$=e.parts,g=0,y=0;y<$.length;y++){for(var v=$[y],x=[],b=0;b<v;b++)x.push([e.points[b+g].x,e.points[b+g].y,e.points[b+g].z]);m.push(x),g+=v}var S=_0x56e50e(m),w=Module$2._linearExtrude(S,p,!0,_);Module$2._free(S),Module$2._free(p),Module$2._free(_);var C=_0x3a92c9(w);return Module$2._free(w),C},t$$(Object.create)&&(m$u.prototype=Object.create(i$J.prototype),m$u.prototype.constructor=m$u),Object.defineProperties(m$u.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),m$u.prototype.createFillGeometryInstance=function(e){if(n$1e.defined("time",e),!this._fillEnabled)throw new t$_("This instance does not represent a filled geometry.");if(this._options.instance instanceof m$P)return this._options.instance;var t,i=this._options.loftParam,n=this._options.linearExtrudeParam;if(t$$(i)?t=_0x163fa1.loft(i.line,i.region,i.buildParam,i.uvwParam):t$$(n)&&(t=_0x163fa1.linearExtrude(n.region,n.buildParam,n.uvwParam)),!t$$(t))return null;var r,o,a=[],s=this._entity;r=t$$(s.orientation)?s.orientation.getValue(e):{heading:0,pitch:0,roll:0},o=t$$(s.scale)?s.scale.getValue(e):{x:1,y:1,z:1};for(var l=0;l<t.length;l++){var u=t[l].vertex.typedArray,c=t[l].indices.typedArray,h=t[l].normal,d=t[l].uv,f=t[l].position,p=s.isAvailable(e);(!t$$(s.position)||!t$$(s.position.getValue(e)))&&(s.position=f);var _=new t$W({position:new r$Q({componentDatatype:C$12.DOUBLE,componentsPerAttribute:3,values:new Float64Array(u)}),normal:new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:new Float32Array(h)}),st:new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:2,values:new Float32Array(d)})}),m=c$19.fromVertices(new Float64Array(u),new a$11(0,0,0),3),$=new T$11({attributes:_,indices:c,primitiveType:H$11.TRIANGLES,boundingSphere:m});f=s.position.getValue(e);var g=m$13.headingPitchRollToFixedFrame(a$11.fromDegrees(f.x,f.y,f.z),new e$1L(r.heading,r.pitch,r.roll),n$1c.WGS84,m$13.eastNorthUpToFixedFrame);c$1a.multiplyByScale(g,o,g),a.push(new m$P({id:s,geometry:$,modelMatrix:g,attributes:{show:new e$18(p&&s.isShowing&&this._showProperty.getValue(e))}}))}if(a.length>1){var y=[];for(l=0;l<a.length;l++){var v=new i$M(s.geometry.material);v._unique=!0;var x=new l$J({geometry:{instance:a[l],material:v}});y.push(x)}return s.children=y,null}return a[0]},m$u.prototype.createOutlineGeometryInstance=function(e){n$1e.defined("time",e);var t=this._options;if(!this._outlineEnabled||!t$$(t.linearExtrudeParam))throw new t$_("This instance does not represent an outlined geometry.");for(var i,n=this._entity,r=(t=this._options).linearExtrudeParam.region,o={},a=r.parts,s=0,l=0;l<a.length;l++){for(var u=a[l],c=[],h=0;h<u;h++)c.push(r.points[h+s].x,r.points[h+s].y);0===l?(o.positions=a$11.fromDegreesArray(c),i=r.points[h+s-1].z):(t$$(o.holes)||(o.holes=[]),o.holes.push({positions:a$11.fromDegreesArray(c)})),s+=u}var d=this.outlineWidth<=1?1.1:this.outlineWidth,f=new u$J({hierarchy:o,extrudedHeight:t.linearExtrudeParam.buildParam.height+i,height:i,show:!0,outline:!0,outlineWidth:d,arcType:1,outlineColor:this.outlineColorProperty,perPositionHeight:!0});return n._polygon=f,null},m$u.prototype._isDynamic=function(e,t){return!1},m$u.prototype.isOutlineVisible=function(e){return!0},m$u.prototype._setStaticOptions=function(e,t){var i=this._options;i.loftParam=t.loftParam,i.linearExtrudeParam=t.linearExtrudeParam,i.instance=t.instance},m$u.prototype._onEntityPropertyChanged=y$G;var U$x=a$11.ZERO,w$D=new a$11,x$z=new a$11,E$x=new e$1z;function j$v(e){this.id=e,this.vertexFormat=void 0,this.length=void 0,this.topRadius=void 0,this.bottomRadius=void 0,this.slices=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function s$t(e,t){i$J.call(this,{entity:e,scene:t,geometryOptions:new j$v(e),geometryPropertyName:"cylinder",observedPropertyNames:["availability","position","orientation","cylinder"]}),this._onEntityPropertyChanged(e,"cylinder",e.cylinder,void 0)}function l$z(e,t,i){a$B.call(this,e,t,i)}function t$r(){this._definitionChanged=new o$15,this._startTime=void 0,this._stopTime=void 0,this._currentTime=void 0,this._clockRange=void 0,this._clockStep=void 0,this._multiplier=void 0}t$$(Object.create)&&(s$t.prototype=Object.create(i$J.prototype),s$t.prototype.constructor=s$t),Object.defineProperties(s$t.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),s$t.prototype.createFillGeometryInstance=function(e){if(n$1e.defined("time",e),!this._fillEnabled)throw new t$_("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r=new e$18(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),a={show:r,distanceDisplayCondition:n$Z.fromDistanceDisplayCondition(o),color:void 0,offset:void 0};this._materialProperty instanceof t$F&&(t$$(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,E$x)),t$$(t)||(t=e$1z.WHITE),a.color=r$I.fromColor(t));return t$$(this._options.offsetAttribute)&&(a.offset=o$N.fromCartesian3(r$w.getValueOrDefault(this._terrainOffsetProperty,e,U$x,w$D))),new m$P({id:i,geometry:new x$V(this._options),modelMatrix:i.computeModelMatrixForHeightReference(e,i.cylinder.heightReference,.5*this._options.length,this._scene.mapProjection.ellipsoid),attributes:a})},s$t.prototype.createOutlineGeometryInstance=function(e){if(n$1e.defined("time",e),!this._outlineEnabled)throw new t$_("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$w.getValueOrDefault(this._outlineColorProperty,e,e$1z.BLACK,E$x),r=this._distanceDisplayConditionProperty.getValue(e),o={show:new e$18(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:r$I.fromColor(n),distanceDisplayCondition:n$Z.fromDistanceDisplayCondition(r),offset:void 0};return t$$(this._options.offsetAttribute)&&(o.offset=o$N.fromCartesian3(r$w.getValueOrDefault(this._terrainOffsetProperty,e,U$x,w$D))),new m$P({id:t,geometry:new d$T(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,.5*this._options.length,this._scene.mapProjection.ellipsoid),attributes:o})},s$t.prototype._computeCenter=function(e,t){return r$w.getValueOrUndefined(this._entity.position,e,t)},s$t.prototype._isHidden=function(e,t){return!t$$(e.position)||!t$$(t.length)||!t$$(t.topRadius)||!t$$(t.bottomRadius)||i$J.prototype._isHidden.call(this,e,t)},s$t.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&r$w.isConstant(e.orientation)&&t.length.isConstant&&t.topRadius.isConstant&&t.bottomRadius.isConstant&&r$w.isConstant(t.slices)&&r$w.isConstant(t.outlineWidth)&&r$w.isConstant(t.numberOfVerticalLines))},s$t.prototype._setStaticOptions=function(e,t){var i=r$w.getValueOrDefault(t.heightReference,f$S.MINIMUM_VALUE,U$Y.NONE),n=this._options;n.vertexFormat=this._materialProperty instanceof t$F?r$u.VERTEX_FORMAT:t$G.MaterialSupport.TEXTURED.vertexFormat,n.length=t.length.getValue(f$S.MINIMUM_VALUE),n.topRadius=t.topRadius.getValue(f$S.MINIMUM_VALUE),n.bottomRadius=t.bottomRadius.getValue(f$S.MINIMUM_VALUE),n.slices=r$w.getValueOrUndefined(t.slices,f$S.MINIMUM_VALUE),n.numberOfVerticalLines=r$w.getValueOrUndefined(t.numberOfVerticalLines,f$S.MINIMUM_VALUE),n.offsetAttribute=i!==U$Y.NONE?_0x165ce0.ALL:void 0},s$t.prototype._onEntityPropertyChanged=y$G,s$t.DynamicGeometryUpdater=l$z,t$$(Object.create)&&(l$z.prototype=Object.create(a$B.prototype),l$z.prototype.constructor=l$z),l$z.prototype._isHidden=function(e,t,i){var n=this._options;return!t$$(r$w.getValueOrUndefined(e.position,i,x$z))||!t$$(n.length)||!t$$(n.topRadius)||!t$$(n.bottomRadius)||a$B.prototype._isHidden.call(this,e,t,i)},l$z.prototype._setOptions=function(e,t,i){var n=r$w.getValueOrDefault(t.heightReference,i,U$Y.NONE),r=this._options;r.length=r$w.getValueOrUndefined(t.length,i),r.topRadius=r$w.getValueOrUndefined(t.topRadius,i),r.bottomRadius=r$w.getValueOrUndefined(t.bottomRadius,i),r.slices=r$w.getValueOrUndefined(t.slices,i),r.numberOfVerticalLines=r$w.getValueOrUndefined(t.numberOfVerticalLines,i),r.offsetAttribute=n!==U$Y.NONE?_0x165ce0.ALL:void 0},Object.defineProperties(t$r.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},startTime:u$I("startTime"),stopTime:u$I("stopTime"),currentTime:u$I("currentTime"),clockRange:u$I("clockRange"),clockStep:u$I("clockStep"),multiplier:u$I("multiplier")}),t$r.prototype.clone=function(e){return t$$(e)||(e=new t$r),e.startTime=this.startTime,e.stopTime=this.stopTime,e.currentTime=this.currentTime,e.clockRange=this.clockRange,e.clockStep=this.clockStep,e.multiplier=this.multiplier,e},t$r.prototype.equals=function(e){return this===e||t$$(e)&&o$10.equals(this.startTime,e.startTime)&&o$10.equals(this.stopTime,e.stopTime)&&o$10.equals(this.currentTime,e.currentTime)&&this.clockRange===e.clockRange&&this.clockStep===e.clockStep&&this.multiplier===e.multiplier},t$r.prototype.merge=function(e){if(!t$$(e))throw new t$_("source is required.");this.startTime=e$1Y(this.startTime,e.startTime),this.stopTime=e$1Y(this.stopTime,e.stopTime),this.currentTime=e$1Y(this.currentTime,e.currentTime),this.clockRange=e$1Y(this.clockRange,e.clockRange),this.clockStep=e$1Y(this.clockStep,e.clockStep),this.multiplier=e$1Y(this.multiplier,e.multiplier)},t$r.prototype.getValue=function(e){return t$$(e)||(e=new a$M),e.startTime=e$1Y(this.startTime,e.startTime),e.stopTime=e$1Y(this.stopTime,e.stopTime),e.currentTime=e$1Y(this.currentTime,e.currentTime),e.clockRange=e$1Y(this.clockRange,e.clockRange),e.multiplier=e$1Y(this.multiplier,e.multiplier),e.clockStep=e$1Y(this.clockStep,e.clockStep),e};var f$z=e$1z.WHITE,u$y=.1,a$r=new r$T(8,8),p$B=new r$T(0,0),_$s=new r$T(1,1);function l$y(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._definitionChanged=new o$15,this._color=void 0,this._colorSubscription=void 0,this._cellAlpha=void 0,this._cellAlphaSubscription=void 0,this._lineCount=void 0,this._lineCountSubscription=void 0,this._lineThickness=void 0,this._lineThicknessSubscription=void 0,this._lineOffset=void 0,this._lineOffsetSubscription=void 0,this.color=e.color,this.cellAlpha=e.cellAlpha,this.lineCount=e.lineCount,this.lineThickness=e.lineThickness,this.lineOffset=e.lineOffset}function t$q(e){this._definitionChanged=new o$15,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(l$y.prototype,{isConstant:{get:function(){return r$w.isConstant(this._color)&&r$w.isConstant(this._cellAlpha)&&r$w.isConstant(this._lineCount)&&r$w.isConstant(this._lineThickness)&&r$w.isConstant(this._lineOffset)}},definitionChanged:{get:function(){return this._definitionChanged}},color:v$J("color"),cellAlpha:v$J("cellAlpha"),lineCount:v$J("lineCount"),lineThickness:v$J("lineThickness"),lineOffset:v$J("lineOffset")}),l$y.prototype.getType=function(e){return"Grid"},l$y.prototype.getValue=function(e,t){return t$$(t)||(t={}),t.color=r$w.getValueOrClonedDefault(this._color,e,f$z,t.color),t.cellAlpha=r$w.getValueOrDefault(this._cellAlpha,e,u$y),t.lineCount=r$w.getValueOrClonedDefault(this._lineCount,e,a$r,t.lineCount),t.lineThickness=r$w.getValueOrClonedDefault(this._lineThickness,e,_$s,t.lineThickness),t.lineOffset=r$w.getValueOrClonedDefault(this._lineOffset,e,p$B,t.lineOffset),t},l$y.prototype.equals=function(e){return this===e||e instanceof l$y&&r$w.equals(this._color,e._color)&&r$w.equals(this._cellAlpha,e._cellAlpha)&&r$w.equals(this._lineCount,e._lineCount)&&r$w.equals(this._lineThickness,e._lineThickness)&&r$w.equals(this._lineOffset,e._lineOffset)},Object.defineProperties(t$q.prototype,{isConstant:{get:function(){return r$w.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:v$J("color")}),t$q.prototype.getType=function(e){return"PolylineArrow"},t$q.prototype.getValue=function(e,t){return t$$(t)||(t={}),t.color=r$w.getValueOrClonedDefault(this._color,e,e$1z.WHITE,t.color),t},t$q.prototype.equals=function(e){return this===e||e instanceof t$q&&r$w.equals(this._color,e._color)};var l$x=e$1z.WHITE,d$x=e$1z.TRANSPARENT,g$p=16,p$A=255;function r$m(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._definitionChanged=new o$15,this._color=void 0,this._colorSubscription=void 0,this._gapColor=void 0,this._gapColorSubscription=void 0,this._dashLength=void 0,this._dashLengthSubscription=void 0,this._dashPattern=void 0,this._dashPatternSubscription=void 0,this.color=e.color,this.gapColor=e.gapColor,this.dashLength=e.dashLength,this.dashPattern=e.dashPattern}Object.defineProperties(r$m.prototype,{isConstant:{get:function(){return r$w.isConstant(this._color)&&r$w.isConstant(this._gapColor)&&r$w.isConstant(this._dashLength)&&r$w.isConstant(this._dashPattern)}},definitionChanged:{get:function(){return this._definitionChanged}},color:v$J("color"),gapColor:v$J("gapColor"),dashLength:v$J("dashLength"),dashPattern:v$J("dashPattern")}),r$m.prototype.getType=function(e){return"PolylineDash"},r$m.prototype.getValue=function(e,t){return t$$(t)||(t={}),t.color=r$w.getValueOrClonedDefault(this._color,e,l$x,t.color),t.gapColor=r$w.getValueOrClonedDefault(this._gapColor,e,d$x,t.gapColor),t.dashLength=r$w.getValueOrDefault(this._dashLength,e,g$p,t.dashLength),t.dashPattern=r$w.getValueOrDefault(this._dashPattern,e,p$A,t.dashPattern),t},r$m.prototype.equals=function(e){return this===e||e instanceof r$m&&r$w.equals(this._color,e._color)&&r$w.equals(this._gapColor,e._gapColor)&&r$w.equals(this._dashLength,e._dashLength)&&r$w.equals(this._dashPattern,e._dashPattern)};var a$q=e$1z.WHITE,p$z=.25,u$x=1;function t$p(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._definitionChanged=new o$15,this._color=void 0,this._colorSubscription=void 0,this._glowPower=void 0,this._glowPowerSubscription=void 0,this._taperPower=void 0,this._taperPowerSubscription=void 0,this.color=e.color,this.glowPower=e.glowPower,this.taperPower=e.taperPower}Object.defineProperties(t$p.prototype,{isConstant:{get:function(){return r$w.isConstant(this._color)&&r$w.isConstant(this._glow)}},definitionChanged:{get:function(){return this._definitionChanged}},color:v$J("color"),glowPower:v$J("glowPower"),taperPower:v$J("taperPower")}),t$p.prototype.getType=function(e){return"PolylineGlow"},t$p.prototype.getValue=function(e,t){return t$$(t)||(t={}),t.color=r$w.getValueOrClonedDefault(this._color,e,a$q,t.color),t.glowPower=r$w.getValueOrDefault(this._glowPower,e,p$z,t.glowPower),t.taperPower=r$w.getValueOrDefault(this._taperPower,e,u$x,t.taperPower),t},t$p.prototype.equals=function(e){return this===e||e instanceof t$p&&r$w.equals(this._color,e._color)&&r$w.equals(this._glowPower,e._glowPower)&&r$w.equals(this._taperPower,e._taperPower)};var h$C=e$1z.WHITE,d$w=e$1z.BLACK,c$v=1;function e$H(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._definitionChanged=new o$15,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}function i$x(e,t){this._value=void 0,this._definitionChanged=new o$15,this._eventHelper=new n$W,this._referenceFrame=e$1Y(t,be$t.FIXED),this.setValue(e)}function n$z(e){this._value=void 0,this._definitionChanged=new o$15,this._eventHelper=new n$W,this.setValue(e)}function s$s(e){var t=e._targetProperty;if(!t$$(t)){var i=e._targetEntity;if(!t$$(i)){if(!t$$(i=e._targetCollection.getById(e._targetId)))return void(e._targetEntity=e._targetProperty=void 0);i.definitionChanged.addEventListener(a$p.prototype._onTargetEntityDefinitionChanged,e),e._targetEntity=i}var n=e._targetPropertyNames;t=e._targetEntity;for(var r=0,o=n.length;r<o&&t$$(t);++r)t=t[n[r]];e._targetProperty=t}return t}function a$p(e,t,i){if(!t$$(e))throw new t$_("targetCollection is required.");if(!t$$(t)||""===t)throw new t$_("targetId is required.");if(!t$$(i)||0===i.length)throw new t$_("targetPropertyNames is required.");for(var n=0;n<i.length;n++){var r=i[n];if(!t$$(r)||""===r)throw new t$_("reference contains invalid properties.")}this._targetCollection=e,this._targetId=t,this._targetPropertyNames=i,this._targetProperty=void 0,this._targetEntity=void 0,this._definitionChanged=new o$15,e.collectionChanged.addEventListener(a$p.prototype._onCollectionChanged,this)}Object.defineProperties(e$H.prototype,{isConstant:{get:function(){return r$w.isConstant(this._color)&&r$w.isConstant(this._outlineColor)&&r$w.isConstant(this._outlineWidth)}},definitionChanged:{get:function(){return this._definitionChanged}},color:v$J("color"),outlineColor:v$J("outlineColor"),outlineWidth:v$J("outlineWidth")}),e$H.prototype.getType=function(e){return"PolylineOutline"},e$H.prototype.getValue=function(e,t){return t$$(t)||(t={}),t.color=r$w.getValueOrClonedDefault(this._color,e,h$C,t.color),t.outlineColor=r$w.getValueOrClonedDefault(this._outlineColor,e,d$w,t.outlineColor),t.outlineWidth=r$w.getValueOrDefault(this._outlineWidth,e,c$v),t},e$H.prototype.equals=function(e){return this===e||e instanceof e$H&&r$w.equals(this._color,e._color)&&r$w.equals(this._outlineColor,e._outlineColor)&&r$w.equals(this._outlineWidth,e._outlineWidth)},Object.defineProperties(i$x.prototype,{isConstant:{get:function(){var e=this._value;if(!t$$(e))return!0;for(var t=e.length,i=0;i<t;i++)if(!r$w.isConstant(e[i]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}}),i$x.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,be$t.FIXED,t)},i$x.prototype.getValueInReferenceFrame=function(e,t,i){if(!t$$(e))throw new t$_("time is required.");if(!t$$(t))throw new t$_("referenceFrame is required.");var n=this._value;if(t$$(n)){var r=n.length;t$$(i)||(i=new Array(r));for(var o=0,a=0;o<r;){var s=n[o].getValueInReferenceFrame(e,t,i[o]);t$$(s)&&(i[a]=s,a++),o++}return i.length=a,i}},i$x.prototype.setValue=function(e){var t=this._eventHelper;if(t.removeAll(),t$$(e)){this._value=e.slice();for(var i=e.length,n=0;n<i;n++){var r=e[n];t$$(r)&&t.add(r.definitionChanged,i$x.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)},i$x.prototype.equals=function(e){return this===e||e instanceof i$x&&this._referenceFrame===e._referenceFrame&&r$w.arrayEquals(this._value,e._value)},i$x.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(n$z.prototype,{isConstant:{get:function(){var e=this._value;if(!t$$(e))return!0;for(var t=e.length,i=0;i<t;i++)if(!r$w.isConstant(e[i]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}}),n$z.prototype.getValue=function(e,t){if(!t$$(e))throw new t$_("time is required.");var i=this._value;if(t$$(i)){var n=i.length;t$$(t)||(t=new Array(n));for(var r=0,o=0;r<n;){var a=this._value[r].getValue(e,t[r]);t$$(a)&&(t[o]=a,o++),r++}return t.length=o,t}},n$z.prototype.setValue=function(e){var t=this._eventHelper;if(t.removeAll(),t$$(e)){this._value=e.slice();for(var i=e.length,n=0;n<i;n++){var r=e[n];t$$(r)&&t.add(r.definitionChanged,n$z.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)},n$z.prototype.equals=function(e){return this===e||e instanceof n$z&&r$w.arrayEquals(this._value,e._value)},n$z.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(a$p.prototype,{isConstant:{get:function(){return r$w.isConstant(s$s(this))}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){var e=s$s(this);return t$$(e)?e.referenceFrame:void 0}},targetId:{get:function(){return this._targetId}},targetCollection:{get:function(){return this._targetCollection}},targetPropertyNames:{get:function(){return this._targetPropertyNames}},resolvedProperty:{get:function(){return s$s(this)}}}),a$p.fromString=function(e,t){if(!t$$(e))throw new t$_("targetCollection is required.");if(!t$$(t))throw new t$_("referenceString is required.");for(var i,n=[],r=!0,o=!1,a="",s=0;s<t.length;++s){var l=t.charAt(s);o?(a+=l,o=!1):"\\"===l?o=!0:r&&"#"===l?(i=a,r=!1,a=""):r||"."!==l?a+=l:(n.push(a),a="")}return n.push(a),new a$p(e,i,n)},a$p.prototype.getValue=function(e,t){var i=s$s(this);return t$$(i)?i.getValue(e,t):void 0},a$p.prototype.getValueInReferenceFrame=function(e,t,i){var n=s$s(this);return t$$(n)?n.getValueInReferenceFrame(e,t,i):void 0},a$p.prototype.getType=function(e){var t=s$s(this);return t$$(t)?t.getType(e):void 0},a$p.prototype.equals=function(e){if(this===e)return!0;var t=this._targetPropertyNames,i=e._targetPropertyNames;if(this._targetCollection!==e._targetCollection||this._targetId!==e._targetId||t.length!==i.length)return!1;for(var n=this._targetPropertyNames.length,r=0;r<n;r++)if(t[r]!==i[r])return!1;return!0},a$p.prototype._onTargetEntityDefinitionChanged=function(e,t,i,n){t$$(this._targetProperty)&&this._targetPropertyNames[0]===t&&(this._targetProperty=void 0,this._definitionChanged.raiseEvent(this))},a$p.prototype._onCollectionChanged=function(e,t,i){var n=this._targetEntity;t$$(n)&&-1!==i.indexOf(n)?(n.definitionChanged.removeEventListener(a$p.prototype._onTargetEntityDefinitionChanged,this),this._targetEntity=this._targetProperty=void 0):t$$(n)||t$$(n=s$s(this))&&this._definitionChanged.raiseEvent(this)};var h$B={packedLength:1,pack:function(e,t,i){if(!t$$(e))throw new t$_("value is required");if(!t$$(t))throw new t$_("array is required");return t[i=e$1Y(i,0)]=e,t},unpack:function(e,t,i){if(!t$$(e))throw new t$_("array is required");return e[t=e$1Y(t,0)]},convertPackedArrayForInterpolation:function(e,t,i,n){if(!t$$(e))throw new t$_("packedArray is required");t=e$1Y(t,0);for(var r,o=0,a=(i=e$1Y(i,e.length))-t+1;o<a;o++){var s=e[t+o];0===o||Math.abs(r-s)<Math.PI?n[o]=s:n[o]=s-n$1d.TWO_PI,r=s}},unpackInterpolationResult:function(e,t,i,n,r){if(!t$$(e))throw new t$_("array is required");if(!t$$(t))throw new t$_("sourceArray is required");return(r=e[0])<0?r+n$1d.TWO_PI:r}},j$u={packedLength:1,pack:function(e,t,i){t[i=e$1Y(i,0)]=e},unpack:function(e,t,i){return e[t=e$1Y(t,0)]}};function q$w(e,t,i){var n,r=e.length,o=i.length,a=r+o;if(e.length=a,r!==t){var s=r-1;for(n=a-1;n>=t;n--)e[n]=e[s--]}for(n=0;n<o;n++)e[t++]=i[n]}function H$x(e,t){return e instanceof o$10?e:"string"==typeof e?o$10.fromIso8601(e):o$10.addSeconds(t,e,new o$10)}var C$y=[],N$u=[];function A$A(e,t,i,n,r){for(var o,a,s,l,u,c,h=0;h<n.length;){var d=0,f=0;if((s=u$16(t,u=H$x(n[h],e),o$10.compare))<0){for(l=(s=~s)*r,a=void 0,c=t[s];h<n.length&&(u=H$x(n[h],e),!(t$$(a)&&o$10.compare(a,u)>=0||t$$(c)&&o$10.compare(u,c)>=0));){for(C$y[d++]=u,h+=1,o=0;o<r;o++)N$u[f++]=n[h],h+=1;a=u}d>0&&(N$u.length=f,q$w(i,l,N$u),C$y.length=d,q$w(t,s,C$y))}else{for(o=0;o<r;o++)h++,i[s*r+o]=n[h];h++}}}function g$o(e,t){n$1e.defined("type",e);var i=e;i===Number&&(i=j$u);var n,r=i.packedLength,o=e$1Y(i.packedInterpolationLength,r),a=0;if(t$$(t)){var s=t.length;n=new Array(s);for(var l=0;l<s;l++){var u=t[l];u===Number&&(u=j$u);var c=u.packedLength;r+=c,o+=e$1Y(u.packedInterpolationLength,c),n[l]=u}a=s}this._type=e,this._innerType=i,this._interpolationDegree=1,this._interpolationAlgorithm=f$R,this._numberOfPoints=0,this._times=[],this._values=[],this._xTable=[],this._yTable=[],this._packedLength=r,this._packedInterpolationLength=o,this._updateTableLength=!0,this._interpolationResult=new Array(o),this._definitionChanged=new o$15,this._derivativeTypes=t,this._innerDerivativeTypes=n,this._inputOrder=a,this._forwardExtrapolationType=_0x2f1e09.NONE,this._forwardExtrapolationDuration=0,this._backwardExtrapolationType=_0x2f1e09.NONE,this._backwardExtrapolationDuration=0}function M$A(e,t,i){var n=e._packedLength;e._times.splice(t,i),e._values.splice(t*n,i*n),e._updateTableLength=!0,e._definitionChanged.raiseEvent(e)}function o$v(e,t){var i;if((t=e$1Y(t,0))>0){i=new Array(t);for(var n=0;n<t;n++)i[n]=a$11}this._numberOfDerivatives=t,this._property=new g$o(a$11,i),this._definitionChanged=new o$15,this._referenceFrame=e$1Y(e,be$t.FIXED),this._property._definitionChanged.addEventListener((function(){this._definitionChanged.raiseEvent(this)}),this)}Object.defineProperties(g$o.prototype,{isConstant:{get:function(){return 0===this._values.length}},definitionChanged:{get:function(){return this._definitionChanged}},type:{get:function(){return this._type}},derivativeTypes:{get:function(){return this._derivativeTypes}},interpolationDegree:{get:function(){return this._interpolationDegree}},interpolationAlgorithm:{get:function(){return this._interpolationAlgorithm}},forwardExtrapolationType:{get:function(){return this._forwardExtrapolationType},set:function(e){this._forwardExtrapolationType!==e&&(this._forwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},forwardExtrapolationDuration:{get:function(){return this._forwardExtrapolationDuration},set:function(e){this._forwardExtrapolationDuration!==e&&(this._forwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationType:{get:function(){return this._backwardExtrapolationType},set:function(e){this._backwardExtrapolationType!==e&&(this._backwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationDuration:{get:function(){return this._backwardExtrapolationDuration},set:function(e){this._backwardExtrapolationDuration!==e&&(this._backwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}}}),g$o.prototype.getValue=function(e,t){n$1e.defined("time",e);var i=this._times,n=i.length;if(0!==n){var r,o=this._innerType,a=this._values,s=u$16(i,e,o$10.compare);if(s<0){if(0===(s=~s)){var l=i[s];if(r=this._backwardExtrapolationDuration,this._backwardExtrapolationType===_0x2f1e09.NONE||0!==r&&o$10.secondsDifference(l,e)>r)return;if(this._backwardExtrapolationType===_0x2f1e09.HOLD)return o.unpack(a,0,t)}if(s>=n){var u=i[s=n-1];if(r=this._forwardExtrapolationDuration,this._forwardExtrapolationType===_0x2f1e09.NONE||0!==r&&o$10.secondsDifference(e,u)>r)return;if(this._forwardExtrapolationType===_0x2f1e09.HOLD)return s=n-1,o.unpack(a,s*o.packedLength,t)}var c=this._xTable,h=this._yTable,d=this._interpolationAlgorithm,f=this._packedInterpolationLength,p=this._inputOrder;if(this._updateTableLength){this._updateTableLength=!1;var _=Math.min(d.getRequiredDataPoints(this._interpolationDegree,p),n);_!==this._numberOfPoints&&(this._numberOfPoints=_,c.length=_,h.length=_*f)}var m=this._numberOfPoints-1;if(m<1)return;var $=0,g=n-1;if(g-$+1>=m+1){var y=s-(m/2|0)-1;y<$&&(y=$);var v=y+m;v>g&&((y=(v=g)-m)<$&&(y=$)),$=y,g=v}for(var x=g-$+1,b=0;b<x;++b)c[b]=o$10.secondsDifference(i[$+b],i[g]);if(t$$(o.convertPackedArrayForInterpolation))o.convertPackedArrayForInterpolation(a,$,g,h);else for(var S=0,w=this._packedLength,C=$*w,T=(g+1)*w;C<T;)h[S]=a[C],C++,S++;var P,E=o$10.secondsDifference(e,i[g]);if(0!==p&&t$$(d.interpolate)){var A=Math.floor(f/(p+1));P=d.interpolate(E,c,h,A,p,p,this._interpolationResult)}else P=d.interpolateOrderZero(E,c,h,f,this._interpolationResult);return t$$(o.unpackInterpolationResult)?o.unpackInterpolationResult(P,a,$,g,t):o.unpack(P,0,t)}return o.unpack(a,s*this._packedLength,t)}},g$o.prototype.setInterpolationOptions=function(e){if(t$$(e)){var t=!1,i=e.interpolationAlgorithm,n=e.interpolationDegree;t$$(i)&&this._interpolationAlgorithm!==i&&(this._interpolationAlgorithm=i,t=!0),t$$(n)&&this._interpolationDegree!==n&&(this._interpolationDegree=n,t=!0),t&&(this._updateTableLength=!0,this._definitionChanged.raiseEvent(this))}},g$o.prototype.addSample=function(e,t,i){var n=this._innerDerivativeTypes,r=t$$(n);n$1e.defined("time",e),n$1e.defined("value",t),r&&n$1e.defined("derivatives",i);var o=this._innerType,a=[];if(a.push(e),o.pack(t,a,a.length),r)for(var s=n.length,l=0;l<s;l++)n[l].pack(i[l],a,a.length);A$A(void 0,this._times,this._values,a,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},g$o.prototype.addSamples=function(e,t,i){var n=this._innerDerivativeTypes,r=t$$(n);if(n$1e.defined("times",e),n$1e.defined("values",t),e.length!==t.length)throw new t$_("times and values must be the same length.");if(r&&(!t$$(i)||i.length!==e.length))throw new t$_("times and derivativeValues must be the same length.");for(var o=this._innerType,a=e.length,s=[],l=0;l<a;l++)if(s.push(e[l]),o.pack(t[l],s,s.length),r)for(var u=i[l],c=n.length,h=0;h<c;h++)n[h].pack(u[h],s,s.length);A$A(void 0,this._times,this._values,s,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},g$o.prototype.addSamplesPackedArray=function(e,t){n$1e.defined("packedSamples",e),A$A(t,this._times,this._values,e,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},g$o.prototype.removeSample=function(e){n$1e.defined("time",e);var t=u$16(this._times,e,o$10.compare);return!(t<0)&&(M$A(this,t,1),!0)},g$o.prototype.removeSamples=function(e){n$1e.defined("timeInterval",e);var t=this._times,i=u$16(t,e.start,o$10.compare);i<0?i=~i:e.isStartIncluded||++i;var n=u$16(t,e.stop,o$10.compare);n<0?n=~n:e.isStopIncluded&&++n,M$A(this,i,n-i)},g$o.prototype.equals=function(e){if(this===e)return!0;if(!t$$(e)||this._type!==e._type||this._interpolationDegree!==e._interpolationDegree||this._interpolationAlgorithm!==e._interpolationAlgorithm)return!1;var t,i,n=this._derivativeTypes,r=t$$(n),o=e._derivativeTypes;if(r!==t$$(o))return!1;if(r){if((i=n.length)!==o.length)return!1;for(t=0;t<i;t++)if(n[t]!==o[t])return!1}var a=this._times,s=e._times;if((i=a.length)!==s.length)return!1;for(t=0;t<i;t++)if(!o$10.equals(a[t],s[t]))return!1;var l=this._values,u=e._values;for(t=0;t<i;t++)if(l[t]!==u[t])return!1;return!0},g$o._mergeNewSamples=A$A,Object.defineProperties(o$v.prototype,{isConstant:{get:function(){return this._property.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}},interpolationDegree:{get:function(){return this._property.interpolationDegree}},interpolationAlgorithm:{get:function(){return this._property.interpolationAlgorithm}},numberOfDerivatives:{get:function(){return this._numberOfDerivatives}},forwardExtrapolationType:{get:function(){return this._property.forwardExtrapolationType},set:function(e){this._property.forwardExtrapolationType=e}},forwardExtrapolationDuration:{get:function(){return this._property.forwardExtrapolationDuration},set:function(e){this._property.forwardExtrapolationDuration=e}},backwardExtrapolationType:{get:function(){return this._property.backwardExtrapolationType},set:function(e){this._property.backwardExtrapolationType=e}},backwardExtrapolationDuration:{get:function(){return this._property.backwardExtrapolationDuration},set:function(e){this._property.backwardExtrapolationDuration=e}}}),o$v.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,be$t.FIXED,t)},o$v.prototype.getValueInReferenceFrame=function(e,t,i){if(n$1e.defined("time",e),n$1e.defined("referenceFrame",t),t$$(i=this._property.getValue(e,i)))return t$C.convertToReferenceFrame(e,i,this._referenceFrame,t,i)},o$v.prototype.setInterpolationOptions=function(e){this._property.setInterpolationOptions(e)},o$v.prototype.addSample=function(e,t,i){var n=this._numberOfDerivatives;if(n>0&&(!t$$(i)||i.length!==n))throw new t$_("derivatives length must be equal to the number of derivatives.");this._property.addSample(e,t,i)},o$v.prototype.addSamples=function(e,t,i){this._property.addSamples(e,t,i)},o$v.prototype.addSamplesPackedArray=function(e,t){this._property.addSamplesPackedArray(e,t)},o$v.prototype.removeSample=function(e){this._property.removeSample(e)},o$v.prototype.removeSamples=function(e){this._property.removeSamples(e)},o$v.prototype.equals=function(e){return this===e||e instanceof o$v&&r$w.equals(this._property,e._property)&&this._referenceFrame===e._referenceFrame};var e$G={HORIZONTAL:0,VERTICAL:1},me$j=Object.freeze(e$G),d$v=me$j.HORIZONTAL,h$A=e$1z.WHITE,C$x=e$1z.BLACK,p$y=0,u$w=1;function i$w(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._definitionChanged=new o$15,this._orientation=void 0,this._orientationSubscription=void 0,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._offset=void 0,this._offsetSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.orientation=e.orientation,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.offset=e.offset,this.repeat=e.repeat}function t$o(e){this._definitionChanged=new o$15,this._intervals=new p$X,this._intervals.changedEvent.addEventListener(t$o.prototype._intervalsChanged,this),this._referenceFrame=e$1Y(e,be$t.FIXED)}function t$n(){this._definitionChanged=new o$15,this._intervals=new p$X,this._intervals.changedEvent.addEventListener(t$n.prototype._intervalsChanged,this)}function s$r(e,t){this._position=void 0,this._subscription=void 0,this._definitionChanged=new o$15,this._normalize=e$1Y(t,!0),this.position=e}Object.defineProperties(i$w.prototype,{isConstant:{get:function(){return r$w.isConstant(this._orientation)&&r$w.isConstant(this._evenColor)&&r$w.isConstant(this._oddColor)&&r$w.isConstant(this._offset)&&r$w.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},orientation:v$J("orientation"),evenColor:v$J("evenColor"),oddColor:v$J("oddColor"),offset:v$J("offset"),repeat:v$J("repeat")}),i$w.prototype.getType=function(e){return"Stripe"},i$w.prototype.getValue=function(e,t){return t$$(t)||(t={}),t.horizontal=r$w.getValueOrDefault(this._orientation,e,d$v)===me$j.HORIZONTAL,t.evenColor=r$w.getValueOrClonedDefault(this._evenColor,e,h$A,t.evenColor),t.oddColor=r$w.getValueOrClonedDefault(this._oddColor,e,C$x,t.oddColor),t.offset=r$w.getValueOrDefault(this._offset,e,p$y),t.repeat=r$w.getValueOrDefault(this._repeat,e,u$w),t},i$w.prototype.equals=function(e){return this===e||e instanceof i$w&&r$w.equals(this._orientation,e._orientation)&&r$w.equals(this._evenColor,e._evenColor)&&r$w.equals(this._oddColor,e._oddColor)&&r$w.equals(this._offset,e._offset)&&r$w.equals(this._repeat,e._repeat)},Object.defineProperties(t$o.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}},referenceFrame:{get:function(){return this._referenceFrame}}}),t$o.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,be$t.FIXED,t)},t$o.prototype.getValueInReferenceFrame=function(e,t,i){if(!t$$(e))throw new t$_("time is required.");if(!t$$(t))throw new t$_("referenceFrame is required.");var n=this._intervals.findDataForIntervalContainingDate(e);if(t$$(n))return t$C.convertToReferenceFrame(e,n,this._referenceFrame,t,i)},t$o.prototype.equals=function(e){return this===e||e instanceof t$o&&this._intervals.equals(e._intervals,r$w.equals)&&this._referenceFrame===e._referenceFrame},t$o.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(t$n.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}}),t$n.prototype.getValue=function(e,t){if(!t$$(e))throw new t$_("time is required");var i=this._intervals.findDataForIntervalContainingDate(e);return t$$(i)&&"function"==typeof i.clone?i.clone(t):i},t$n.prototype.equals=function(e){return this===e||e instanceof t$n&&this._intervals.equals(e._intervals,r$w.equals)},t$n.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(s$r.prototype,{isConstant:{get:function(){return r$w.isConstant(this._position)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._position},set:function(e){var t=this._position;t!==e&&(t$$(t)&&this._subscription(),this._position=e,t$$(e)&&(this._subscription=e._definitionChanged.addEventListener((function(){this._definitionChanged.raiseEvent(this)}),this)),this._definitionChanged.raiseEvent(this))}},normalize:{get:function(){return this._normalize},set:function(e){this._normalize!==e&&(this._normalize=e,this._definitionChanged.raiseEvent(this))}}});var v$w=new a$11,_$r=new a$11,m$t=new o$10,f$y=1/60;function e$F(e,t){this._velocityVectorProperty=new s$r(e,!0),this._subscription=void 0,this._ellipsoid=void 0,this._definitionChanged=new o$15,this.ellipsoid=e$1Y(t,n$1c.WGS84);var i=this;this._velocityVectorProperty.definitionChanged.addEventListener((function(){i._definitionChanged.raiseEvent(i)}))}s$r.prototype.getValue=function(e,t){return this._getValue(e,t)},s$r.prototype._getValue=function(e,t,i){if(!t$$(e))throw new t$_("time is required");t$$(t)||(t=new a$11);var n=this._position;if(r$w.isConstant(n))return this._normalize?void 0:a$11.clone(a$11.ZERO,t);var r=n.getValue(e,v$w),o=n.getValue(o$10.addSeconds(e,f$y,m$t),_$r);if(t$$(r)&&(t$$(o)||(o=r,t$$(r=n.getValue(o$10.addSeconds(e,-f$y,m$t),_$r))))){if(a$11.equals(r,o))return this._normalize?void 0:a$11.clone(a$11.ZERO,t);t$$(i)&&r.clone(i);var a=a$11.subtract(o,r,t);return this._normalize?a$11.normalize(a,t):a$11.divideByScalar(a,f$y,t)}},s$r.prototype.equals=function(e){return this===e||e instanceof s$r&&r$w.equals(this._position,e._position)},Object.defineProperties(e$F.prototype,{isConstant:{get:function(){return r$w.isConstant(this._velocityVectorProperty)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._velocityVectorProperty.position},set:function(e){this._velocityVectorProperty.position=e}},ellipsoid:{get:function(){return this._ellipsoid},set:function(e){this._ellipsoid!==e&&(this._ellipsoid=e,this._definitionChanged.raiseEvent(this))}}});var s$q=new a$11,m$s=new a$11,p$x=new r$W,Ne$a;function H$w(){}function $$s(e,t){return"#"===t[0]&&(t=Ne$a+t),a$p.fromString(e,t)}function qe$9(e,t,i){if(t$$(i.reference))return $$s(t,i.reference);if(t$$(i.velocityReference)){var n=$$s(t,i.velocityReference);switch(e){case a$11:case H$w:return new s$r(n,e===H$w);case a$U:return new e$F(n)}}throw new t$Z(JSON.stringify(i)+" is not valid CZML.")}function Gt$5(e,t){return new n$K((function(i,n){return t(e.getValue(i,n))}),e.isConstant)}e$F.prototype.getValue=function(e,t){var i=this._velocityVectorProperty._getValue(e,m$s,s$q);if(t$$(i))return m$13.rotationMatrixFromPositionVelocity(s$q,i,this._ellipsoid,p$x),a$U.fromRotationMatrix(p$x,t)},e$F.prototype.equals=function(e){return this===e||e instanceof e$F&&r$w.equals(this._velocityVectorProperty,e._velocityVectorProperty)&&(this._ellipsoid===e._ellipsoid||this._ellipsoid.equals(e._ellipsoid))},H$w.packedLength=a$11.packedLength,H$w.unpack=a$11.unpack,H$w.pack=a$11.pack;var h$z=new a$11,D$A=new c$O,N$t=new i$1g,G$x=new n$T,de$e=new a$U;function qt$3(e){var t=e.rgbaf;if(t$$(t))return t;var i=e.rgba;if(t$$(i)){var n=i.length;if(n===e$1z.packedLength)return[e$1z.byteToFloat(i[0]),e$1z.byteToFloat(i[1]),e$1z.byteToFloat(i[2]),e$1z.byteToFloat(i[3])];t=new Array(n);for(var r=0;r<n;r+=5)t[r]=i[r],t[r+1]=e$1z.byteToFloat(i[r+1]),t[r+2]=e$1z.byteToFloat(i[r+2]),t[r+3]=e$1z.byteToFloat(i[r+3]),t[r+4]=e$1z.byteToFloat(i[r+4]);return t}}function Xe$6(e,t){var i=e$1Y(e.uri,e);return t$$(t)?t.getDerivedResource({url:i}):t$X.createIfNeeded(i)}function Xt$2(e){var t=e.wsen;if(t$$(t))return t;var i=e.wsenDegrees;if(t$$(i)){var n=i.length;if(n===s$1p.packedLength)return[n$1d.toRadians(i[0]),n$1d.toRadians(i[1]),n$1d.toRadians(i[2]),n$1d.toRadians(i[3])];t=new Array(n);for(var r=0;r<n;r+=5)t[r]=i[r],t[r+1]=n$1d.toRadians(i[r+1]),t[r+2]=n$1d.toRadians(i[r+2]),t[r+3]=n$1d.toRadians(i[r+3]),t[r+4]=n$1d.toRadians(i[r+4]);return t}}function Zt$3(e){var t=e.length;if(D$A.magnitude=1,2===t)return D$A.clock=e[0],D$A.cone=e[1],a$11.fromSpherical(D$A,h$z),[h$z.x,h$z.y,h$z.z];for(var i=new Array(t/3*4),n=0,r=0;n<t;n+=3,r+=4)i[r]=e[n],D$A.clock=e[n+1],D$A.cone=e[n+2],a$11.fromSpherical(D$A,h$z),i[r+1]=h$z.x,i[r+2]=h$z.y,i[r+3]=h$z.z;return i}function Jt$5(e){var t=e.length;if(3===t)return D$A.clock=e[0],D$A.cone=e[1],D$A.magnitude=e[2],a$11.fromSpherical(D$A,h$z),[h$z.x,h$z.y,h$z.z];for(var i=new Array(t),n=0;n<t;n+=4)i[n]=e[n],D$A.clock=e[n+1],D$A.cone=e[n+2],D$A.magnitude=e[n+3],a$11.fromSpherical(D$A,h$z),i[n+1]=h$z.x,i[n+2]=h$z.y,i[n+3]=h$z.z;return i}function Yt$3(e){var t=e.length;if(3===t)return N$t.longitude=e[0],N$t.latitude=e[1],N$t.height=e[2],n$1c.WGS84.cartographicToCartesian(N$t,h$z),[h$z.x,h$z.y,h$z.z];for(var i=new Array(t),n=0;n<t;n+=4)i[n]=e[n],N$t.longitude=e[n+1],N$t.latitude=e[n+2],N$t.height=e[n+3],n$1c.WGS84.cartographicToCartesian(N$t,h$z),i[n+1]=h$z.x,i[n+2]=h$z.y,i[n+3]=h$z.z;return i}function Kt$3(e){var t=e.length;if(3===t)return N$t.longitude=n$1d.toRadians(e[0]),N$t.latitude=n$1d.toRadians(e[1]),N$t.height=e[2],n$1c.WGS84.cartographicToCartesian(N$t,h$z),[h$z.x,h$z.y,h$z.z];for(var i=new Array(t),n=0;n<t;n+=4)i[n]=e[n],N$t.longitude=n$1d.toRadians(e[n+1]),N$t.latitude=n$1d.toRadians(e[n+2]),N$t.height=e[n+3],n$1c.WGS84.cartographicToCartesian(N$t,h$z),i[n+1]=h$z.x,i[n+2]=h$z.y,i[n+3]=h$z.z;return i}function _e$a(e){var t=e.cartesian;if(t$$(t))return t;var i=e.cartesianVelocity;if(t$$(i))return i;var n=e.unitCartesian;if(t$$(n))return n;var r=e.unitSpherical;if(t$$(r))return Zt$3(r);var o=e.spherical;if(t$$(o))return Jt$5(o);var a=e.cartographicRadians;if(t$$(a))return Yt$3(a);var s=e.cartographicDegrees;if(t$$(s))return Kt$3(s);throw new t$Z(JSON.stringify(e)+" is not a valid CZML interval.")}function Ze$7(e,t){a$11.unpack(e,t,h$z),a$11.normalize(h$z,h$z),a$11.pack(h$z,e,t)}function Qt$4(e){var t=_e$a(e);if(3===t.length)return Ze$7(t,0),t;for(var i=1;i<t.length;i+=4)Ze$7(t,i);return t}function Je$5(e,t){a$U.unpack(e,t,de$e),a$U.normalize(de$e,de$e),a$U.pack(de$e,e,t)}function $t$3(e){var t=e.unitQuaternion;if(t$$(t)){if(4===t.length)return Je$5(t,0),t;for(var i=1;i<t.length;i+=5)Je$5(t,i)}return t}function Ye$9(e){return"boolean"==typeof e?Boolean:"number"==typeof e?Number:"string"==typeof e?String:e.hasOwnProperty("array")?Array:e.hasOwnProperty("boolean")?Boolean:e.hasOwnProperty("boundingRectangle")?n$13:e.hasOwnProperty("cartesian2")?r$T:e.hasOwnProperty("cartesian")||e.hasOwnProperty("spherical")||e.hasOwnProperty("cartographicRadians")||e.hasOwnProperty("cartographicDegrees")?a$11:e.hasOwnProperty("unitCartesian")||e.hasOwnProperty("unitSpherical")?H$w:e.hasOwnProperty("rgba")||e.hasOwnProperty("rgbaf")?e$1z:e.hasOwnProperty("arcType")?m$_:e.hasOwnProperty("classificationType")?_0x29401c:e.hasOwnProperty("colorBlendMode")?I$J:e.hasOwnProperty("cornerType")?ie$D:e.hasOwnProperty("heightReference")?U$Y:e.hasOwnProperty("horizontalOrigin")?N$W:e.hasOwnProperty("date")?o$10:e.hasOwnProperty("labelStyle")?z$t:e.hasOwnProperty("number")?Number:e.hasOwnProperty("nearFarScalar")?u$W:e.hasOwnProperty("distanceDisplayCondition")?e$1w:e.hasOwnProperty("object")||e.hasOwnProperty("value")?Object:e.hasOwnProperty("unitQuaternion")?a$U:e.hasOwnProperty("shadowMode")?q$Q:e.hasOwnProperty("string")?String:e.hasOwnProperty("stripeOrientation")?me$j:e.hasOwnProperty("wsen")||e.hasOwnProperty("wsenDegrees")?s$1p:e.hasOwnProperty("uri")?h$1f:e.hasOwnProperty("verticalOrigin")?j$10:Object}function er$2(e,t,i){switch(e){case m$_:return m$_[e$1Y(t.arcType,t)];case Array:return t.array;case Boolean:return e$1Y(t.boolean,t);case n$13:return t.boundingRectangle;case r$T:return t.cartesian2;case a$11:return _e$a(t);case H$w:return Qt$4(t);case e$1z:return qt$3(t);case _0x29401c:return _0x29401c[e$1Y(t.classificationType,t)];case I$J:return I$J[e$1Y(t.colorBlendMode,t)];case ie$D:return ie$D[e$1Y(t.cornerType,t)];case U$Y:return U$Y[e$1Y(t.heightReference,t)];case N$W:return N$W[e$1Y(t.horizontalOrigin,t)];case Image:return Xe$6(t,i);case o$10:return o$10.fromIso8601(e$1Y(t.date,t));case z$t:return z$t[e$1Y(t.labelStyle,t)];case Number:return e$1Y(t.number,t);case u$W:return t.nearFarScalar;case e$1w:return t.distanceDisplayCondition;case Object:return e$1Y(e$1Y(t.object,t.value),t);case a$U:return $t$3(t);case h$B:return e$1Y(t.number,t);case q$Q:return q$Q[e$1Y(e$1Y(t.shadowMode,t.shadows),t)];case String:return e$1Y(t.string,t);case me$j:return me$j[e$1Y(t.stripeOrientation,t)];case s$1p:return Xt$2(t);case h$1f:return Xe$6(t,i);case j$10:return j$10[e$1Y(t.verticalOrigin,t)];default:throw new t$Z(e)}}var tr$3={HERMITE:Z$S,LAGRANGE:o$O,LINEAR:f$R};function pe$d(e,t){var i=e.interpolationAlgorithm,n=e.interpolationDegree;(t$$(i)||t$$(n))&&t.setInterpolationOptions({interpolationAlgorithm:tr$3[i],interpolationDegree:n});var r=e.forwardExtrapolationType;t$$(r)&&(t.forwardExtrapolationType=_0x2f1e09[r]);var o=e.forwardExtrapolationDuration;t$$(o)&&(t.forwardExtrapolationDuration=o);var a=e.backwardExtrapolationType;t$$(a)&&(t.backwardExtrapolationType=_0x2f1e09[a]);var s=e.backwardExtrapolationDuration;t$$(s)&&(t.backwardExtrapolationDuration=s)}var Ke$7={iso8601:void 0};function w$C(e){if(t$$(e))return Ke$7.iso8601=e,n$T.fromIso8601(Ke$7)}function De$j(e){var t=f$S.MAXIMUM_INTERVAL.clone();return t.data=e,t}function Qe$8(e){var t=new e$I;return t.intervals.addInterval(De$j(e)),t}function $e$6(e){var t=new t$t(e.referenceFrame);return t.intervals.addInterval(De$j(e)),t}function he$b(e,t,i,n,r,o,a){var s=w$C(n.interval);t$$(r)&&(s=t$$(s)?n$T.intersect(s,r,G$x):r);var l,u,c,h=!t$$(n.reference)&&!t$$(n.velocityReference),d=t$$(s)&&!s.equals(f$S.MAXIMUM_INTERVAL);if(!0===n.delete)return d?et$a(t[i],s):void(t[i]=void 0);var f=!1;if(h){if(!t$$(u=er$2(e,n,o)))return;l=e$1Y(e.packedLength,1),c=e$1Y(u.length,1),f=!t$$(n.array)&&"string"!=typeof u&&c>l&&e!==Object}var p="function"==typeof e.unpack&&e!==h$B;if(f||d){var _,m,$=t[i],g=n.epoch;if(t$$(g)&&(_=o$10.fromIso8601(g)),f&&!d)return $ instanceof g$o||(t[i]=$=new g$o(e)),$.addSamplesPackedArray(u,_),void pe$d(n,$);if(!f&&d)return(s=s.clone()).data=h?p?e.unpack(u,0):u:qe$9(e,a,n),t$$($)||(t[i]=$=h?new t$n:new e$I),void(h&&$ instanceof t$n?$.intervals.addInterval(s):$ instanceof e$I?(h&&(s.data=new i$O(s.data)),$.intervals.addInterval(s)):(t[i]=$=Qe$8($),h&&(s.data=new i$O(s.data)),$.intervals.addInterval(s)));t$$($)||(t[i]=$=new e$I),$ instanceof e$I||(t[i]=$=Qe$8($));var y=$.intervals;(!t$$(m=y.findInterval(s))||!(m.data instanceof g$o))&&((m=s.clone()).data=new g$o(e),y.addInterval(m)),m.data.addSamplesPackedArray(u,_),pe$d(n,m.data)}else t[i]=h?new i$O(p?e.unpack(u,0):u):qe$9(e,a,n)}function et$a(e,t){if(e instanceof g$o)e.removeSamples(t);else if(e instanceof t$n)e.intervals.removeInterval(t);else if(e instanceof e$I){for(var i=e.intervals,n=0;n<i.length;++n){var r=n$T.intersect(i.get(n),t,G$x);r.isEmpty||et$a(r.data,t)}i.removeInterval(t)}else;}function l$w(e,t,i,n,r,o,a){if(t$$(n))if(Array.isArray(n))for(var s=0,l=n.length;s<l;++s)he$b(e,t,i,n[s],r,o,a);else he$b(e,t,i,n,r,o,a)}function tt$b(e,t,i,n,r,o){var a=w$C(i.interval);t$$(n)&&(a=t$$(a)?n$T.intersect(a,n,G$x):n);var s,l=t$$(i.cartesianVelocity)?1:0,u=a$11.packedLength*(l+1),c=!t$$(i.reference),h=t$$(a)&&!a.equals(f$S.MAXIMUM_INTERVAL);if(!0===i.delete)return h?rt$9(e[t],a):void(e[t]=void 0);var d,f=!1;if(c&&(t$$(i.referenceFrame)&&(d=be$t[i.referenceFrame]),d=e$1Y(d,be$t.FIXED),f=e$1Y((s=_e$a(i)).length,1)>u),f||h){var p,_,m=e[t],$=i.epoch;if(t$$($)&&(p=o$10.fromIso8601($)),f&&!h)return(!(m instanceof o$v)||t$$(d)&&m.referenceFrame!==d)&&(e[t]=m=new o$v(d,l)),m.addSamplesPackedArray(s,p),void pe$d(i,m);if(!f&&h)return(a=a.clone()).data=c?a$11.unpack(s):$$s(o,i.reference),t$$(m)||(m=c?new t$o(d):new t$t(d),e[t]=m),void(c&&m instanceof t$o&&t$$(d)&&m.referenceFrame===d?m.intervals.addInterval(a):m instanceof t$t?(c&&(a.data=new t$B(a.data,d)),m.intervals.addInterval(a)):(e[t]=m=$e$6(m),c&&(a.data=new t$B(a.data,d)),m.intervals.addInterval(a)));t$$(m)?m instanceof t$t||(e[t]=m=$e$6(m)):e[t]=m=new t$t(d);var g=m.intervals;(!t$$(_=g.findInterval(a))||!(_.data instanceof o$v)||t$$(d)&&_.data.referenceFrame!==d)&&((_=a.clone()).data=new o$v(d,l),g.addInterval(_)),_.data.addSamplesPackedArray(s,p),pe$d(i,_.data)}else e[t]=c?new t$B(a$11.unpack(s),d):$$s(o,i.reference)}function rt$9(e,t){if(e instanceof o$v)e.removeSamples(t);else if(e instanceof t$o)e.intervals.removeInterval(t);else if(e instanceof t$t){for(var i=e.intervals,n=0;n<i.length;++n){var r=n$T.intersect(i.get(n),t,G$x);r.isEmpty||rt$9(r.data,t)}i.removeInterval(t)}else;}function it$7(e,t,i,n,r,o){if(t$$(i))if(Array.isArray(i))for(var a=0,s=i.length;a<s;++a)tt$b(e,t,i[a],n,r,o);else tt$b(e,t,i,n,r,o)}function nt$a(e,t,i,n,r,o){var a=w$C(i.interval);t$$(n)&&(a=t$$(a)?n$T.intersect(a,n,G$x):n);var s,l,u,c=e[t];if(t$$(a)){c instanceof i$B||(c=new i$B,e[t]=c);var h=c.intervals;t$$(l=h.findInterval({start:a.start,stop:a.stop}))?s=l.data:(l=a.clone(),h.addInterval(l))}else s=c;t$$(i.solidColor)?(s instanceof t$F||(s=new t$F),l$w(e$1z,s,"color",(u=i.solidColor).color,void 0,void 0,o)):t$$(i.grid)?(s instanceof l$y||(s=new l$y),l$w(e$1z,s,"color",(u=i.grid).color,void 0,r,o),l$w(Number,s,"cellAlpha",u.cellAlpha,void 0,r,o),l$w(r$T,s,"lineCount",u.lineCount,void 0,r,o),l$w(r$T,s,"lineThickness",u.lineThickness,void 0,r,o),l$w(r$T,s,"lineOffset",u.lineOffset,void 0,r,o)):t$$(i.image)?(s instanceof i$M||(s=new i$M),u=i.image,l$w(Image,s,"image",u.image,void 0,r,o),l$w(r$T,s,"repeat",u.repeat,void 0,r,o),l$w(e$1z,s,"color",u.color,void 0,r,o),l$w(Boolean,s,"transparent",u.transparent,void 0,r,o)):t$$(i.stripe)?(s instanceof i$w||(s=new i$w),u=i.stripe,l$w(me$j,s,"orientation",u.orientation,void 0,r,o),l$w(e$1z,s,"evenColor",u.evenColor,void 0,r,o),l$w(e$1z,s,"oddColor",u.oddColor,void 0,r,o),l$w(Number,s,"offset",u.offset,void 0,r,o),l$w(Number,s,"repeat",u.repeat,void 0,r,o)):t$$(i.polylineOutline)?(s instanceof e$H||(s=new e$H),l$w(e$1z,s,"color",(u=i.polylineOutline).color,void 0,r,o),l$w(e$1z,s,"outlineColor",u.outlineColor,void 0,r,o),l$w(Number,s,"outlineWidth",u.outlineWidth,void 0,r,o)):t$$(i.polylineGlow)?(s instanceof t$p||(s=new t$p),l$w(e$1z,s,"color",(u=i.polylineGlow).color,void 0,r,o),l$w(Number,s,"glowPower",u.glowPower,void 0,r,o),l$w(Number,s,"taperPower",u.taperPower,void 0,r,o)):t$$(i.polylineArrow)?(s instanceof t$q||(s=new t$q),l$w(e$1z,s,"color",(u=i.polylineArrow).color,void 0,void 0,o)):t$$(i.polylineDash)?(s instanceof r$m||(s=new r$m),l$w(e$1z,s,"color",(u=i.polylineDash).color,void 0,void 0,o),l$w(e$1z,s,"gapColor",u.gapColor,void 0,void 0,o),l$w(Number,s,"dashLength",u.dashLength,void 0,r,o),l$w(Number,s,"dashPattern",u.dashPattern,void 0,r,o)):t$$(i.checkerboard)&&(s instanceof r$o||(s=new r$o),l$w(e$1z,s,"evenColor",(u=i.checkerboard).evenColor,void 0,r,o),l$w(e$1z,s,"oddColor",u.oddColor,void 0,r,o),l$w(r$T,s,"repeat",u.repeat,void 0,r,o)),t$$(l)?l.data=s:e[t]=s}function x$y(e,t,i,n,r,o){if(t$$(i))if(Array.isArray(i))for(var a=0,s=i.length;a<s;++a)nt$a(e,t,i[a],n,r,o);else nt$a(e,t,i,n,r,o)}function rr$3(e,t,i,n){t$$(t.name)&&(e.name=t.name)}function ir$4(e,t,i,n){var r=t.description;t$$(r)&&l$w(String,e,"description",r,void 0,n,i)}function nr$2(e,t,i,n){var r=t.position;t$$(r)&&it$7(e,"position",r,void 0,n,i)}function or$2(e,t,i,n){var r=t.viewFrom;t$$(r)&&l$w(a$11,e,"viewFrom",r,void 0,n,i)}function ar$2(e,t,i,n){var r=t.orientation;t$$(r)&&l$w(a$U,e,"orientation",r,void 0,n,i)}function lr$1(e,t,i,n){var r=t.properties;if(t$$(r))for(var o in t$$(e.properties)||(e.properties=new p$S),r)if(r.hasOwnProperty(o)){e.properties.hasProperty(o)||e.properties.addProperty(o);var a=r[o];if(Array.isArray(a))for(var s=0,l=a.length;s<l;++s)he$b(Ye$9(a[s]),e.properties,o,a[s],void 0,n,i);else he$b(Ye$9(a),e.properties,o,a,void 0,n,i)}}function ke$7(e,t,i,n,r,o,a){var s=i.map((function(e){return $$s(r,e)}));if(t$$(n)){n=w$C(n);var l=e[t];if(!(l instanceof a)){var u=new a;u.intervals.addInterval(De$j(l)),e[t]=l=u}n.data=new o(s),l.intervals.addInterval(n)}else e[t]=new o(s)}function ot$a(e,t,i,n){var r=i.references;t$$(r)?ke$7(e,t,r,i.interval,n,n$z,e$I):l$w(Array,e,t,i,void 0,void 0,n)}function at$8(e,t,i,n){if(t$$(i))if(Array.isArray(i))for(var r=0,o=i.length;r<o;++r)ot$a(e,t,i[r],n);else ot$a(e,t,i,n)}function lt$9(e,t,i,n){var r=i.references;t$$(r)?ke$7(e,t,r,i.interval,n,i$x,t$t):(t$$(i.cartesian)?i.array=a$11.unpackArray(i.cartesian):t$$(i.cartographicRadians)?i.array=a$11.fromRadiansArrayHeights(i.cartographicRadians):t$$(i.cartographicDegrees)&&(i.array=a$11.fromDegreesArrayHeights(i.cartographicDegrees)),t$$(i.array)&&l$w(Array,e,t,i,void 0,void 0,n))}function ve$d(e,t,i,n){if(t$$(i))if(Array.isArray(i))for(var r=0,o=i.length;r<o;++r)lt$9(e,t,i[r],n);else lt$9(e,t,i,n)}function sr$1(e){return a$11.unpackArray(e)}function cr(e){return a$11.fromRadiansArrayHeights(e)}function ur$1(e){return a$11.fromDegreesArrayHeights(e)}function st$6(e,t,i,n){var r=i.references;if(t$$(r)){var o=r.map((function(e){var t={};return ke$7(t,"positions",e,i.interval,n,i$x,t$t),t.positions}));e[t]=new i$x(o)}else t$$(i.cartesian)?i.array=i.cartesian.map(sr$1):t$$(i.cartographicRadians)?i.array=i.cartographicRadians.map(cr):t$$(i.cartographicDegrees)&&(i.array=i.cartographicDegrees.map(ur$1)),t$$(i.array)&&l$w(Array,e,t,i,void 0,void 0,n)}function fr$1(e,t,i,n){if(t$$(i))if(Array.isArray(i))for(var r=0,o=i.length;r<o;++r)st$6(e,t,i[r],n);else st$6(e,t,i,n)}function mr(e,t,i,n){var r=t.availability;if(t$$(r)){var o;if(Array.isArray(r))for(var a=0,s=r.length;a<s;++a)t$$(o)||(o=new p$X),o.addInterval(w$C(r[a]));else(o=new p$X).addInterval(w$C(r));e.availability=o}}function dr(e,t,i,n,r){!t$$(t)||l$w(H$w,e,"alignedAxis",t,i,n,r)}function pr(e,t,i,n){var r=t.billboard;if(t$$(r)){var o=w$C(r.interval),a=e.billboard;t$$(a)||(e.billboard=a=new s$W),l$w(Boolean,a,"show",r.show,o,n,i),l$w(Image,a,"image",r.image,o,n,i),l$w(Number,a,"scale",r.scale,o,n,i),l$w(r$T,a,"pixelOffset",r.pixelOffset,o,n,i),l$w(a$11,a,"eyeOffset",r.eyeOffset,o,n,i),l$w(N$W,a,"horizontalOrigin",r.horizontalOrigin,o,n,i),l$w(j$10,a,"verticalOrigin",r.verticalOrigin,o,n,i),l$w(U$Y,a,"heightReference",r.heightReference,o,n,i),l$w(e$1z,a,"color",r.color,o,n,i),l$w(h$B,a,"rotation",r.rotation,o,n,i),dr(a,r.alignedAxis,o,n,i),l$w(Boolean,a,"sizeInMeters",r.sizeInMeters,o,n,i),l$w(Number,a,"width",r.width,o,n,i),l$w(Number,a,"height",r.height,o,n,i),l$w(u$W,a,"scaleByDistance",r.scaleByDistance,o,n,i),l$w(u$W,a,"translucencyByDistance",r.translucencyByDistance,o,n,i),l$w(u$W,a,"pixelOffsetScaleByDistance",r.pixelOffsetScaleByDistance,o,n,i),l$w(n$13,a,"imageSubRegion",r.imageSubRegion,o,n,i),l$w(e$1w,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),l$w(Number,a,"disableDepthTestDistance",r.disableDepthTestDistance,o,n,i)}}function hr(e,t,i,n){var r=t.box;if(t$$(r)){var o=w$C(r.interval),a=e.box;t$$(a)||(e.box=a=new s$S),l$w(Boolean,a,"show",r.show,o,n,i),l$w(a$11,a,"dimensions",r.dimensions,o,n,i),l$w(U$Y,a,"heightReference",r.heightReference,o,n,i),l$w(Boolean,a,"fill",r.fill,o,n,i),x$y(a,"material",r.material,o,n,i),l$w(Boolean,a,"outline",r.outline,o,n,i),l$w(e$1z,a,"outlineColor",r.outlineColor,o,n,i),l$w(Number,a,"outlineWidth",r.outlineWidth,o,n,i),l$w(q$Q,a,"shadows",r.shadows,o,n,i),l$w(e$1w,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i)}}function vr$1(e,t,i,n){var r=t.corridor;if(t$$(r)){var o=w$C(r.interval),a=e.corridor;t$$(a)||(e.corridor=a=new o$E),l$w(Boolean,a,"show",r.show,o,n,i),ve$d(a,"positions",r.positions,i),l$w(Number,a,"width",r.width,o,n,i),l$w(Number,a,"height",r.height,o,n,i),l$w(U$Y,a,"heightReference",r.heightReference,o,n,i),l$w(Number,a,"extrudedHeight",r.extrudedHeight,o,n,i),l$w(U$Y,a,"extrudedHeightReference",r.extrudedHeightReference,o,n,i),l$w(ie$D,a,"cornerType",r.cornerType,o,n,i),l$w(Number,a,"granularity",r.granularity,o,n,i),l$w(Boolean,a,"fill",r.fill,o,n,i),x$y(a,"material",r.material,o,n,i),l$w(Boolean,a,"outline",r.outline,o,n,i),l$w(e$1z,a,"outlineColor",r.outlineColor,o,n,i),l$w(Number,a,"outlineWidth",r.outlineWidth,o,n,i),l$w(q$Q,a,"shadows",r.shadows,o,n,i),l$w(e$1w,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),l$w(_0x29401c,a,"classificationType",r.classificationType,o,n,i),l$w(Number,a,"zIndex",r.zIndex,o,n,i)}}function yr(e,t,i,n){var r=t.cylinder;if(t$$(r)){var o=w$C(r.interval),a=e.cylinder;t$$(a)||(e.cylinder=a=new o$C),l$w(Boolean,a,"show",r.show,o,n,i),l$w(Number,a,"length",r.length,o,n,i),l$w(Number,a,"topRadius",r.topRadius,o,n,i),l$w(Number,a,"bottomRadius",r.bottomRadius,o,n,i),l$w(U$Y,a,"heightReference",r.heightReference,o,n,i),l$w(Boolean,a,"fill",r.fill,o,n,i),x$y(a,"material",r.material,o,n,i),l$w(Boolean,a,"outline",r.outline,o,n,i),l$w(e$1z,a,"outlineColor",r.outlineColor,o,n,i),l$w(Number,a,"outlineWidth",r.outlineWidth,o,n,i),l$w(Number,a,"numberOfVerticalLines",r.numberOfVerticalLines,o,n,i),l$w(Number,a,"slices",r.slices,o,n,i),l$w(q$Q,a,"shadows",r.shadows,o,n,i),l$w(e$1w,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i)}}function gr(e,t){var i=e.version;if(t$$(i)&&"string"==typeof i){var n=i.split(".");if(2===n.length){if("1"!==n[0])throw new t$Z("Cesium only supports CZML version 1.");t._version=i}}if(!t$$(t._version))throw new t$Z("CZML version information invalid. It is expected to be a property on the document object in the <Major>.<Minor> version format.");var r=t._documentPacket;t$$(e.name)&&(r.name=e.name);var o=e.clock;if(t$$(o)){var a=r.clock;t$$(a)?(a.interval=e$1Y(o.interval,a.interval),a.currentTime=e$1Y(o.currentTime,a.currentTime),a.range=e$1Y(o.range,a.range),a.step=e$1Y(o.step,a.step),a.multiplier=e$1Y(o.multiplier,a.multiplier)):r.clock={interval:o.interval,currentTime:o.currentTime,range:o.range,step:o.step,multiplier:o.multiplier}}}function wr(e,t,i,n){var r=t.ellipse;if(t$$(r)){var o=w$C(r.interval),a=e.ellipse;t$$(a)||(e.ellipse=a=new s$R),l$w(Boolean,a,"show",r.show,o,n,i),l$w(Number,a,"semiMajorAxis",r.semiMajorAxis,o,n,i),l$w(Number,a,"semiMinorAxis",r.semiMinorAxis,o,n,i),l$w(Number,a,"height",r.height,o,n,i),l$w(U$Y,a,"heightReference",r.heightReference,o,n,i),l$w(Number,a,"extrudedHeight",r.extrudedHeight,o,n,i),l$w(U$Y,a,"extrudedHeightReference",r.extrudedHeightReference,o,n,i),l$w(h$B,a,"rotation",r.rotation,o,n,i),l$w(h$B,a,"stRotation",r.stRotation,o,n,i),l$w(Number,a,"granularity",r.granularity,o,n,i),l$w(Boolean,a,"fill",r.fill,o,n,i),x$y(a,"material",r.material,o,n,i),l$w(Boolean,a,"outline",r.outline,o,n,i),l$w(e$1z,a,"outlineColor",r.outlineColor,o,n,i),l$w(Number,a,"outlineWidth",r.outlineWidth,o,n,i),l$w(Number,a,"numberOfVerticalLines",r.numberOfVerticalLines,o,n,i),l$w(q$Q,a,"shadows",r.shadows,o,n,i),l$w(e$1w,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),l$w(_0x29401c,a,"classificationType",r.classificationType,o,n,i),l$w(Number,a,"zIndex",r.zIndex,o,n,i)}}function br$1(e,t,i,n){var r=t.ellipsoid;if(t$$(r)){var o=w$C(r.interval),a=e.ellipsoid;t$$(a)||(e.ellipsoid=a=new s$Q),l$w(Boolean,a,"show",r.show,o,n,i),l$w(a$11,a,"radii",r.radii,o,n,i),l$w(a$11,a,"innerRadii",r.innerRadii,o,n,i),l$w(Number,a,"minimumClock",r.minimumClock,o,n,i),l$w(Number,a,"maximumClock",r.maximumClock,o,n,i),l$w(Number,a,"minimumCone",r.minimumCone,o,n,i),l$w(Number,a,"maximumCone",r.maximumCone,o,n,i),l$w(U$Y,a,"heightReference",r.heightReference,o,n,i),l$w(Boolean,a,"fill",r.fill,o,n,i),x$y(a,"material",r.material,o,n,i),l$w(Boolean,a,"outline",r.outline,o,n,i),l$w(e$1z,a,"outlineColor",r.outlineColor,o,n,i),l$w(Number,a,"outlineWidth",r.outlineWidth,o,n,i),l$w(Number,a,"stackPartitions",r.stackPartitions,o,n,i),l$w(Number,a,"slicePartitions",r.slicePartitions,o,n,i),l$w(Number,a,"subdivisions",r.subdivisions,o,n,i),l$w(q$Q,a,"shadows",r.shadows,o,n,i),l$w(e$1w,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i)}}function Cr(e,t,i,n){var r=t.label;if(t$$(r)){var o=w$C(r.interval),a=e.label;t$$(a)||(e.label=a=new s$P),l$w(Boolean,a,"show",r.show,o,n,i),l$w(String,a,"text",r.text,o,n,i),l$w(String,a,"font",r.font,o,n,i),l$w(z$t,a,"style",r.style,o,n,i),l$w(Number,a,"scale",r.scale,o,n,i),l$w(Boolean,a,"showBackground",r.showBackground,o,n,i),l$w(e$1z,a,"backgroundColor",r.backgroundColor,o,n,i),l$w(r$T,a,"backgroundPadding",r.backgroundPadding,o,n,i),l$w(r$T,a,"pixelOffset",r.pixelOffset,o,n,i),l$w(a$11,a,"eyeOffset",r.eyeOffset,o,n,i),l$w(N$W,a,"horizontalOrigin",r.horizontalOrigin,o,n,i),l$w(j$10,a,"verticalOrigin",r.verticalOrigin,o,n,i),l$w(U$Y,a,"heightReference",r.heightReference,o,n,i),l$w(e$1z,a,"fillColor",r.fillColor,o,n,i),l$w(e$1z,a,"outlineColor",r.outlineColor,o,n,i),l$w(Number,a,"outlineWidth",r.outlineWidth,o,n,i),l$w(u$W,a,"translucencyByDistance",r.translucencyByDistance,o,n,i),l$w(u$W,a,"pixelOffsetScaleByDistance",r.pixelOffsetScaleByDistance,o,n,i),l$w(u$W,a,"scaleByDistance",r.scaleByDistance,o,n,i),l$w(e$1w,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),l$w(Number,a,"disableDepthTestDistance",r.disableDepthTestDistance,o,n,i)}}function Or(e,t,i,n){var r=t.model;if(t$$(r)){var o=w$C(r.interval),a=e.model;t$$(a)||(e.model=a=new e$10),l$w(Boolean,a,"show",r.show,o,n,i),l$w(h$1f,a,"uri",r.gltf,o,n,i),l$w(Number,a,"scale",r.scale,o,n,i),l$w(Number,a,"minimumPixelSize",r.minimumPixelSize,o,n,i),l$w(Number,a,"maximumScale",r.maximumScale,o,n,i),l$w(Boolean,a,"incrementallyLoadTextures",r.incrementallyLoadTextures,o,n,i),l$w(Boolean,a,"runAnimations",r.runAnimations,o,n,i),l$w(Boolean,a,"clampAnimations",r.clampAnimations,o,n,i),l$w(q$Q,a,"shadows",r.shadows,o,n,i),l$w(U$Y,a,"heightReference",r.heightReference,o,n,i),l$w(e$1z,a,"silhouetteColor",r.silhouetteColor,o,n,i),l$w(Number,a,"silhouetteSize",r.silhouetteSize,o,n,i),l$w(e$1z,a,"color",r.color,o,n,i),l$w(I$J,a,"colorBlendMode",r.colorBlendMode,o,n,i),l$w(Number,a,"colorBlendAmount",r.colorBlendAmount,o,n,i),l$w(e$1w,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i);var s,l,u=r.nodeTransformations;if(t$$(u))if(Array.isArray(u))for(s=0,l=u.length;s<l;++s)ct$8(a,u[s],o,n,i);else ct$8(a,u,o,n,i);var c=r.articulations;if(t$$(c))if(Array.isArray(c))for(s=0,l=c.length;s<l;++s)ut$6(a,c[s],o,n,i);else ut$6(a,c,o,n,i)}}function ct$8(e,t,i,n,r){var o=w$C(t.interval);t$$(i)&&(o=t$$(o)?n$T.intersect(o,i,G$x):i);for(var a=e.nodeTransformations,s=Object.keys(t),l=0,u=s.length;l<u;++l){var c=s[l];if("interval"!==c){var h=t[c];if(t$$(h)){t$$(a)||(e.nodeTransformations=a=new p$S),a.hasProperty(c)||a.addProperty(c);var d=a[c];t$$(d)||(a[c]=d=new i$K),l$w(a$11,d,"translation",h.translation,o,n,r),l$w(a$U,d,"rotation",h.rotation,o,n,r),l$w(a$11,d,"scale",h.scale,o,n,r)}}}}function ut$6(e,t,i,n,r){var o=w$C(t.interval);t$$(i)&&(o=t$$(o)?n$T.intersect(o,i,G$x):i);for(var a=e.articulations,s=Object.keys(t),l=0,u=s.length;l<u;++l){var c=s[l];if("interval"!==c){var h=t[c];!t$$(h)||(t$$(a)||(e.articulations=a=new p$S),a.hasProperty(c)||a.addProperty(c),l$w(Number,a,c,h,o,n,r))}}}function Tr$1(e,t,i,n){var r=t.path;if(t$$(r)){var o=w$C(r.interval),a=e.path;t$$(a)||(e.path=a=new s$N),l$w(Boolean,a,"show",r.show,o,n,i),l$w(Number,a,"leadTime",r.leadTime,o,n,i),l$w(Number,a,"trailTime",r.trailTime,o,n,i),l$w(Number,a,"width",r.width,o,n,i),l$w(Number,a,"resolution",r.resolution,o,n,i),x$y(a,"material",r.material,o,n,i),l$w(e$1w,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i)}}function Nr$1(e,t,i,n){var r=t.point;if(t$$(r)){var o=w$C(r.interval),a=e.point;t$$(a)||(e.point=a=new s$L),l$w(Boolean,a,"show",r.show,o,n,i),l$w(Number,a,"pixelSize",r.pixelSize,o,n,i),l$w(U$Y,a,"heightReference",r.heightReference,o,n,i),l$w(e$1z,a,"color",r.color,o,n,i),l$w(e$1z,a,"outlineColor",r.outlineColor,o,n,i),l$w(Number,a,"outlineWidth",r.outlineWidth,o,n,i),l$w(u$W,a,"scaleByDistance",r.scaleByDistance,o,n,i),l$w(u$W,a,"translucencyByDistance",r.translucencyByDistance,o,n,i),l$w(e$1w,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),l$w(Number,a,"disableDepthTestDistance",r.disableDepthTestDistance,o,n,i)}}function ee$l(e){this.polygon=e,this._definitionChanged=new o$15}function _r(e,t,i,n){var r=t.polygon;if(t$$(r)){var o=w$C(r.interval),a=e.polygon;t$$(a)||(e.polygon=a=new u$J),l$w(Boolean,a,"show",r.show,o,n,i),ve$d(a,"_positions",r.positions,i),fr$1(a,"_holes",r.holes,i),(t$$(a._positions)||t$$(a._holes))&&(a.hierarchy=new ee$l(a)),l$w(Number,a,"height",r.height,o,n,i),l$w(U$Y,a,"heightReference",r.heightReference,o,n,i),l$w(Number,a,"extrudedHeight",r.extrudedHeight,o,n,i),l$w(U$Y,a,"extrudedHeightReference",r.extrudedHeightReference,o,n,i),l$w(h$B,a,"stRotation",r.stRotation,o,n,i),l$w(Number,a,"granularity",r.granularity,o,n,i),l$w(Boolean,a,"fill",r.fill,o,n,i),x$y(a,"material",r.material,o,n,i),l$w(Boolean,a,"outline",r.outline,o,n,i),l$w(e$1z,a,"outlineColor",r.outlineColor,o,n,i),l$w(Number,a,"outlineWidth",r.outlineWidth,o,n,i),l$w(Boolean,a,"perPositionHeight",r.perPositionHeight,o,n,i),l$w(Boolean,a,"closeTop",r.closeTop,o,n,i),l$w(Boolean,a,"closeBottom",r.closeBottom,o,n,i),l$w(m$_,a,"arcType",r.arcType,o,n,i),l$w(q$Q,a,"shadows",r.shadows,o,n,i),l$w(e$1w,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),l$w(_0x29401c,a,"classificationType",r.classificationType,o,n,i),l$w(Number,a,"zIndex",r.zIndex,o,n,i)}}function Dr$1(e){return e?m$_.GEODESIC:m$_.NONE}function kr$1(e,t,i,n){var r=t.polyline;if(t$$(r)){var o=w$C(r.interval),a=e.polyline;if(t$$(a)||(e.polyline=a=new o$B),l$w(Boolean,a,"show",r.show,o,n,i),ve$d(a,"positions",r.positions,i),l$w(Number,a,"width",r.width,o,n,i),l$w(Number,a,"granularity",r.granularity,o,n,i),x$y(a,"material",r.material,o,n,i),x$y(a,"depthFailMaterial",r.depthFailMaterial,o,n,i),l$w(m$_,a,"arcType",r.arcType,o,n,i),l$w(Boolean,a,"clampToGround",r.clampToGround,o,n,i),l$w(q$Q,a,"shadows",r.shadows,o,n,i),l$w(e$1w,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),l$w(_0x29401c,a,"classificationType",r.classificationType,o,n,i),l$w(Number,a,"zIndex",r.zIndex,o,n,i),t$$(r.followSurface)&&!t$$(r.arcType)){var s={};l$w(Boolean,s,"followSurface",r.followSurface,o,n,i),a.arcType=Gt$5(s.followSurface,Dr$1)}}}function Pr$1(e,t,i,n){var r=t.rectangle;if(t$$(r)){var o=w$C(r.interval),a=e.rectangle;t$$(a)||(e.rectangle=a=new o$A),l$w(Boolean,a,"show",r.show,o,n,i),l$w(s$1p,a,"coordinates",r.coordinates,o,n,i),l$w(Number,a,"height",r.height,o,n,i),l$w(U$Y,a,"heightReference",r.heightReference,o,n,i),l$w(Number,a,"extrudedHeight",r.extrudedHeight,o,n,i),l$w(U$Y,a,"extrudedHeightReference",r.extrudedHeightReference,o,n,i),l$w(h$B,a,"rotation",r.rotation,o,n,i),l$w(h$B,a,"stRotation",r.stRotation,o,n,i),l$w(Number,a,"granularity",r.granularity,o,n,i),l$w(Boolean,a,"fill",r.fill,o,n,i),x$y(a,"material",r.material,o,n,i),l$w(Boolean,a,"outline",r.outline,o,n,i),l$w(e$1z,a,"outlineColor",r.outlineColor,o,n,i),l$w(Number,a,"outlineWidth",r.outlineWidth,o,n,i),l$w(q$Q,a,"shadows",r.shadows,o,n,i),l$w(e$1w,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),l$w(_0x29401c,a,"classificationType",r.classificationType,o,n,i),l$w(Number,a,"zIndex",r.zIndex,o,n,i)}}function Rr$1(e,t,i,n){var r=t.tileset;if(t$$(r)){var o=w$C(r.interval),a=e.tileset;t$$(a)||(e.tileset=a=new e$$),l$w(Boolean,a,"show",r.show,o,n,i),l$w(h$1f,a,"uri",r.uri,o,n,i),l$w(Number,a,"maximumScreenSpaceError",r.maximumScreenSpaceError,o,n,i)}}function xr$1(e,t,i,n){var r=t.wall;if(t$$(r)){var o=w$C(r.interval),a=e.wall;t$$(a)||(e.wall=a=new s$J),l$w(Boolean,a,"show",r.show,o,n,i),ve$d(a,"positions",r.positions,i),at$8(a,"minimumHeights",r.minimumHeights,i),at$8(a,"maximumHeights",r.maximumHeights,i),l$w(Number,a,"granularity",r.granularity,o,n,i),l$w(Boolean,a,"fill",r.fill,o,n,i),x$y(a,"material",r.material,o,n,i),l$w(Boolean,a,"outline",r.outline,o,n,i),l$w(e$1z,a,"outlineColor",r.outlineColor,o,n,i),l$w(Number,a,"outlineWidth",r.outlineWidth,o,n,i),l$w(q$Q,a,"shadows",r.shadows,o,n,i),l$w(e$1w,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i)}}function ft$5(e,t,i,n,r){var o=e.id;if(t$$(o)||(o=t$U()),Ne$a=o,!t$$(r._version)&&"document"!==o)throw new t$Z("The first CZML packet is required to be the document object.");if(!0===e.delete)t.removeById(o);else if("document"===o)gr(e,r);else{var a=t.getOrCreateEntity(o),s=e.parent;t$$(s)&&(a.parent=t.getOrCreateEntity(s));for(var l=i.length-1;l>-1;l--)i[l](a,e,t,n)}Ne$a=void 0}function Ar(e){var t,i=e._documentPacket.clock;if(!t$$(i)){if(!t$$(e._clock)){var n=e._entityCollection.computeAvailability();if(!n.start.equals(f$S.MINIMUM_VALUE)){var r=n.start,o=n.stop,a=o$10.secondsDifference(o,r),s=Math.round(a/120);return(t=new t$r).startTime=o$10.clone(r),t.stopTime=o$10.clone(o),t.clockRange=tt$j.LOOP_STOP,t.multiplier=s,t.currentTime=o$10.clone(r),t.clockStep=g$M.SYSTEM_CLOCK_MULTIPLIER,e._clock=t,!0}}return!1}t$$(e._clock)?t=e._clock.clone():((t=new t$r).startTime=f$S.MINIMUM_VALUE.clone(),t.stopTime=f$S.MAXIMUM_VALUE.clone(),t.currentTime=f$S.MINIMUM_VALUE.clone(),t.clockRange=tt$j.LOOP_STOP,t.clockStep=g$M.SYSTEM_CLOCK_MULTIPLIER,t.multiplier=1);var l=w$C(i.interval);return t$$(l)&&(t.startTime=l.start,t.stopTime=l.stop),t$$(i.currentTime)&&(t.currentTime=o$10.fromIso8601(i.currentTime)),t$$(i.range)&&(t.clockRange=e$1Y(tt$j[i.range],tt$j.LOOP_STOP)),t$$(i.step)&&(t.clockStep=e$1Y(g$M[i.step],g$M.SYSTEM_CLOCK_MULTIPLIER)),t$$(i.multiplier)&&(t.multiplier=i.multiplier),!t.equals(e._clock)&&(e._clock=t.clone(e._clock),!0)}function mt$5(e,t,i,n){if(!t$$(t))throw new t$_("czml is required.");var r=t,o=(i=e$1Y(i,e$1Y.EMPTY_OBJECT)).sourceUri,a=i.credit;if("string"==typeof a&&(a=new i$17(a)),e._credit=a,"string"==typeof t||t instanceof t$X){r=(t=t$X.createIfNeeded(t)).fetchJson(),o=e$1Y(o,t.clone());var s=e._resourceCredits,l=t.credits;if(t$$(l))for(var u=l.length,c=0;c<u;c++)s.push(l[c])}return o=t$X.createIfNeeded(o),o$w.setLoading(e,!0),c$18(r,(function(t){return Br(e,t,o,n)})).otherwise((function(t){return o$w.setLoading(e,!1),e._error.raiseEvent(e,t),console.log(t),c$18.reject(t)}))}function Br(e,t,i,n){o$w.setLoading(e,!0);var r=e._entityCollection;n&&(e._version=void 0,e._documentPacket=new dt$8,r.removeAll()),P$m._processCzml(t,r,i,void 0,e);var o=Ar(e),a=e._documentPacket;return t$$(a.name)&&e._name!==a.name?(e._name=a.name,o=!0):!t$$(e._name)&&t$$(i)&&(e._name=a$J(i.getUrlComponent()),o=!0),o$w.setLoading(e,!1),o&&e._changed.raiseEvent(e),e}function dt$8(){this.name=void 0,this.clock=void 0}function P$m(e){this._name=e,this._changed=new o$15,this._error=new o$15,this._isLoading=!1,this._loading=new o$15,this._clock=void 0,this._documentPacket=new dt$8,this._version=void 0,this._entityCollection=new r$n(this),this._entityCluster=new a$s,this._credit=void 0,this._resourceCredits=[]}function i$v(){this._dataSources=[],this._dataSourceAdded=new o$15,this._dataSourceRemoved=new o$15,this._dataSourceMoved=new o$15}function d$u(e,t){if(!t$$(t))throw new t$_("dataSource is required.");var i=e.indexOf(t);if(-1===i)throw new t$_("dataSource is not in this collection.");return i}function h$y(e,t,i){var n=e._dataSources,r=n.length-1;if((t=n$1d.clamp(t,0,r))!==(i=n$1d.clamp(i,0,r))){var o=n[t];n[t]=n[i],n[i]=o,e.dataSourceMoved.raiseEvent(o,i,t)}}function r$l(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._primitives=[],this._guid=t$U(),this._zIndex=void 0,this.show=e$1Y(e.show,!0),this.destroyPrimitives=e$1Y(e.destroyPrimitives,!0)}function n$y(e,t){if(!e.contains(t))throw new t$_("primitive is not in this collection.");return e._primitives.indexOf(t)}function o$u(){this._length=0,this._collections={},this._collectionsArray=[],this.show=!0}function r$k(e,t){this._primitives=e,this._orderedGroundPrimitives=t,this._dynamicUpdaters=new e$1F}Object.defineProperties(ee$l.prototype,{isConstant:{get:function(){var e=this.polygon._positions,t=this.polygon._holes;return(!t$$(e)||e.isConstant)&&(!t$$(t)||t.isConstant)}},definitionChanged:{get:function(){return this._definitionChanged}}}),ee$l.prototype.getValue=function(e,t){var i,n;return t$$(this.polygon._positions)&&(i=this.polygon._positions.getValue(e)),t$$(this.polygon._holes)&&(t$$(n=this.polygon._holes.getValue(e))&&(n=n.map((function(e){return new t$K(e)})))),t$$(t)?(t.positions=i,t.holes=n,t):new t$K(i,n)},ee$l.prototype.equals=function(e){return this===e||e instanceof ee$l&&r$w.equals(this.polygon._positions,e.polygon._positions)&&r$w.equals(this.polygon._holes,e.polygon._holes)},P$m.load=function(e,t){return(new P$m).load(e,t)},Object.defineProperties(P$m.prototype,{name:{get:function(){return this._name}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!t$$(e))throw new t$_("value must be defined.");this._entityCluster=e}},credit:{get:function(){return this._credit}}}),P$m.updaters=[pr,hr,vr$1,yr,wr,br$1,Cr,Or,rr$3,ir$4,Tr$1,Nr$1,_r,kr$1,lr$1,Pr$1,nr$2,Rr$1,or$2,xr$1,ar$2,mr],P$m.prototype.process=function(e,t){return mt$5(this,e,t,!1)},P$m.prototype.load=function(e,t){return mt$5(this,e,t,!0)},P$m.processPacketData=l$w,P$m.processPositionPacketData=it$7,P$m.processMaterialPacketData=x$y,P$m._processCzml=function(e,t,i,n,r){if(n=e$1Y(n,P$m.updaters),Array.isArray(e))for(var o=0,a=e.length;o<a;++o)ft$5(e[o],t,n,i,r);else ft$5(e,t,n,i,r)},Object.defineProperties(i$v.prototype,{length:{get:function(){return this._dataSources.length}},dataSourceAdded:{get:function(){return this._dataSourceAdded}},dataSourceRemoved:{get:function(){return this._dataSourceRemoved}},dataSourceMoved:{get:function(){return this._dataSourceMoved}}}),i$v.prototype.add=function(e){if(!t$$(e))throw new t$_("dataSource is required.");var t=this,i=this._dataSources;return c$18(e,(function(e){return i===t._dataSources&&(t._dataSources.push(e),t._dataSourceAdded.raiseEvent(t,e)),e}))},i$v.prototype.remove=function(e,t){t=e$1Y(t,!1);var i=this._dataSources.indexOf(e);if(-1!==i){this._dataSources.splice(i,1),this._dataSourceRemoved.raiseEvent(this,e);for(var n=0;n<e._entityCollection.values.length;n++){var r=e._entityCollection.values[n];t$$(r._polygon)&&t$$(r._polygon.outlines)&&r._polygon.outlines.removeAll(),t$$(r._polygon)&&t$$(r._polygon.clampOutlines)&&r.entityCollection._owner._entityCluster._scene._primitives.remove(r._polygon.clampOutlines)}return t&&"function"==typeof e.destroy&&e.destroy(),!0}return!1},i$v.prototype.removeAll=function(e){e=e$1Y(e,!1);for(var t=this._dataSources,i=0,n=t.length;i<n;++i){var r=t[i];this._dataSourceRemoved.raiseEvent(this,r);for(var o=0;o<r._entityCollection.values.length;o++){var a=r._entityCollection.values[o];t$$(a._polygon)&&t$$(a._polygon.outlines)&&a._polygon.outlines.removeAll(),t$$(a._polygon)&&t$$(a._polygon.clampOutlines)&&a.entityCollection._owner._entityCluster._scene._primitives.remove(a._polygon.clampOutlines)}e&&"function"==typeof r.destroy&&r.destroy()}this._dataSources=[]},i$v.prototype.contains=function(e){return-1!==this.indexOf(e)},i$v.prototype.indexOf=function(e){return this._dataSources.indexOf(e)},i$v.prototype.get=function(e){if(!t$$(e))throw new t$_("index is required.");return this._dataSources[e]},i$v.prototype.getByName=function(e){if(!t$$(e))throw new t$_("name is required.");return this._dataSources.filter((function(t){return t.name===e}))},i$v.prototype.raise=function(e){var t=d$u(this._dataSources,e);h$y(this,t,t+1)},i$v.prototype.lower=function(e){var t=d$u(this._dataSources,e);h$y(this,t,t-1)},i$v.prototype.raiseToTop=function(e){var t=d$u(this._dataSources,e);t!==this._dataSources.length-1&&(this._dataSources.splice(t,1),this._dataSources.push(e),this.dataSourceMoved.raiseEvent(e,this._dataSources.length-1,t))},i$v.prototype.lowerToBottom=function(e){var t=d$u(this._dataSources,e);0!==t&&(this._dataSources.splice(t,1),this._dataSources.splice(0,0,e),this.dataSourceMoved.raiseEvent(e,0,t))},i$v.prototype.isDestroyed=function(){return!1},i$v.prototype.destroy=function(){return this.removeAll(!0),s$1e(this)},Object.defineProperties(r$l.prototype,{length:{get:function(){return this._primitives.length}}}),r$l.prototype.add=function(e){if(!t$$(e))throw new t$_("primitive is required.");var t=e._external=e._external||{};return(t._composites=t._composites||{})[this._guid]={collection:this},this._primitives.push(e),e},r$l.prototype.remove=function(e){if(this.contains(e)){var t=this._primitives.indexOf(e);if(-1!==t)return this._primitives.splice(t,1),delete e._external._composites[this._guid],this.destroyPrimitives&&e.destroy(),!0}return!1},r$l.prototype.removeAndDestroy=function(e){var t=this.remove(e);return t&&!this.destroyPrimitives&&e.destroy(),t},r$l.prototype.removeAll=function(){for(var e=this._primitives,t=e.length,i=0;i<t;++i)delete e[i]._external._composites[this._guid],this.destroyPrimitives&&e[i].destroy();this._primitives=[]},r$l.prototype.contains=function(e){return!!(t$$(e)&&e._external&&e._external._composites&&e._external._composites[this._guid])},r$l.prototype.raise=function(e){if(t$$(e)){var t=n$y(this,e),i=this._primitives;if(t!==i.length-1){var n=i[t];i[t]=i[t+1],i[t+1]=n}}},r$l.prototype.raiseToTop=function(e){if(t$$(e)){var t=n$y(this,e),i=this._primitives;t!==i.length-1&&(i.splice(t,1),i.push(e))}},r$l.prototype.lower=function(e){if(t$$(e)){var t=n$y(this,e),i=this._primitives;if(0!==t){var n=i[t];i[t]=i[t-1],i[t-1]=n}}},r$l.prototype.lowerToBottom=function(e){if(t$$(e)){var t=n$y(this,e),i=this._primitives;0!==t&&(i.splice(t,1),i.unshift(e))}},r$l.prototype.get=function(e){if(!t$$(e))throw new t$_("index is required.");return this._primitives[e]},r$l.prototype.update=function(e){if(this.show)for(var t=this._primitives,i=0;i<t.length;++i)t[i].update(e)},r$l.prototype.prePassesUpdate=function(e){for(var t=this._primitives,i=0;i<t.length;++i){var n=t[i];t$$(n.prePassesUpdate)&&n.prePassesUpdate(e)}},r$l.prototype.updateForPass=function(e,t){for(var i=this._primitives,n=0;n<i.length;++n){var r=i[n];t$$(r.updateForPass)&&r.updateForPass(e,t)}},r$l.prototype.postPassesUpdate=function(e){for(var t=this._primitives,i=0;i<t.length;++i){var n=t[i];t$$(n.postPassesUpdate)&&n.postPassesUpdate(e)}},r$l.prototype.isDestroyed=function(){return!1},r$l.prototype.destroy=function(){return this.removeAll(),s$1e(this)},Object.defineProperties(o$u.prototype,{length:{get:function(){return this._length}}}),o$u.prototype.add=function(e,t){n$1e.defined("primitive",e),t$$(t)&&n$1e.typeOf.number("zIndex",t),t=e$1Y(t,0);var i=this._collections[t];if(!t$$(i)){(i=new r$l({destroyPrimitives:!1}))._zIndex=t,this._collections[t]=i;for(var n=this._collectionsArray,r=0;r<n.length&&n[r]._zIndex<t;)r++;n.splice(r,0,i)}return i.add(e),this._length++,e._zIndex=t,e},o$u.prototype.set=function(e,t){return n$1e.defined("primitive",e),n$1e.typeOf.number("zIndex",t),t===e._zIndex||(this.remove(e,!0),this.add(e,t)),e},o$u.prototype.remove=function(e,t){if(this.contains(e)){var i,n=e._zIndex,r=this._collections[n];return(i=t?r.remove(e):r.removeAndDestroy(e))&&this._length--,0===r.length&&(this._collectionsArray.splice(this._collectionsArray.indexOf(r),1),this._collections[n]=void 0,r.destroy()),i}return!1},o$u.prototype.removeAll=function(){for(var e=this._collectionsArray,t=0;t<e.length;t++){var i=e[t];i.destroyPrimitives=!0,i.destroy()}this._collections={},this._collectionsArray=[],this._length=0},o$u.prototype.contains=function(e){if(!t$$(e))return!1;var t=this._collections[e._zIndex];return t$$(t)&&t.contains(e)},o$u.prototype.update=function(e){if(this.show)for(var t=this._collectionsArray,i=0;i<t.length;i++)t[i].update(e)},o$u.prototype.isDestroyed=function(){return!1},o$u.prototype.destroy=function(){return this.removeAll(),s$1e(this)},r$k.prototype.add=function(e,t){this._dynamicUpdaters.set(t.id,t.createDynamicUpdater(this._primitives,this._orderedGroundPrimitives))},r$k.prototype.remove=function(e){var t=e.id,i=this._dynamicUpdaters.get(t);t$$(i)&&(this._dynamicUpdaters.remove(t),i.destroy())},r$k.prototype.update=function(e){for(var t=this._dynamicUpdaters.values,i=0,n=t.length;i<n;i++)t[i].update(e);return!0},r$k.prototype.removeAllPrimitives=function(){for(var e=this._dynamicUpdaters.values,t=0,i=e.length;t<i;t++)e[t].destroy();this._dynamicUpdaters.removeAll()},r$k.prototype.getBoundingSphere=function(e,t){return t$$(e=this._dynamicUpdaters.get(e.id))&&t$$(e.getBoundingSphere)?e.getBoundingSphere(t):A$T.FAILED};var I$B=new e$1z,b$G=a$11.ZERO,N$s=new a$11,w$B=new s$1p;function j$t(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 l$v(e,t){i$A.call(this,{entity:e,scene:t,geometryOptions:new j$t(e),geometryPropertyName:"ellipse",observedPropertyNames:["availability","position","ellipse"]}),this._onEntityPropertyChanged(e,"ellipse",e.ellipse,void 0)}function p$w(e,t,i){a$B.call(this,e,t,i)}t$$(Object.create)&&(l$v.prototype=Object.create(i$A.prototype),l$v.prototype.constructor=l$v),l$v.prototype.createFillGeometryInstance=function(e){if(n$1e.defined("time",e),!this._fillEnabled)throw new t$_("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r={show:new e$18(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:n$Z.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};this._materialProperty instanceof t$F&&(t$$(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,I$B)),t$$(t)||(t=e$1z.WHITE),r.color=r$I.fromColor(t));return t$$(this._options.offsetAttribute)&&(r.offset=o$N.fromCartesian3(r$w.getValueOrDefault(this._terrainOffsetProperty,e,b$G,N$s))),new m$P({id:i,geometry:new H$U(this._options),attributes:r})},l$v.prototype.createOutlineGeometryInstance=function(e){if(n$1e.defined("time",e),!this._outlineEnabled)throw new t$_("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$w.getValueOrDefault(this._outlineColorProperty,e,e$1z.BLACK,I$B),r=this._distanceDisplayConditionProperty.getValue(e),o={show:new e$18(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:r$I.fromColor(n),distanceDisplayCondition:n$Z.fromDistanceDisplayCondition(r),offset:void 0};return t$$(this._options.offsetAttribute)&&(o.offset=o$N.fromCartesian3(r$w.getValueOrDefault(this._terrainOffsetProperty,e,b$G,N$s))),new m$P({id:t,geometry:new w$Y(this._options),attributes:o})},l$v.prototype._computeCenter=function(e,t){return r$w.getValueOrUndefined(this._entity.position,e,t)},l$v.prototype._isHidden=function(e,t){return!t$$(e.position)||!t$$(t.semiMajorAxis)||!t$$(t.semiMinorAxis)||i$J.prototype._isHidden.call(this,e,t)},l$v.prototype._isDynamic=function(e,t){return!e.position.isConstant||!t.semiMajorAxis.isConstant||!t.semiMinorAxis.isConstant||!r$w.isConstant(t.rotation)||!r$w.isConstant(t.height)||!r$w.isConstant(t.extrudedHeight)||!r$w.isConstant(t.granularity)||!r$w.isConstant(t.stRotation)||!r$w.isConstant(t.outlineWidth)||!r$w.isConstant(t.numberOfVerticalLines)||!r$w.isConstant(t.zIndex)||this._onTerrain&&!r$w.isConstant(this._materialProperty)&&!(this._materialProperty instanceof t$F)},l$v.prototype._setStaticOptions=function(e,t){var i=r$w.getValueOrUndefined(t.height,f$S.MINIMUM_VALUE),n=r$w.getValueOrDefault(t.heightReference,f$S.MINIMUM_VALUE,U$Y.NONE),r=r$w.getValueOrUndefined(t.extrudedHeight,f$S.MINIMUM_VALUE),o=r$w.getValueOrDefault(t.extrudedHeightReference,f$S.MINIMUM_VALUE,U$Y.NONE);t$$(r)&&!t$$(i)&&(i=0);var a=this._options;a.vertexFormat=this._materialProperty instanceof t$F?r$u.VERTEX_FORMAT:t$G.MaterialSupport.TEXTURED.vertexFormat,a.center=e.position.getValue(f$S.MINIMUM_VALUE,a.center),a.semiMajorAxis=t.semiMajorAxis.getValue(f$S.MINIMUM_VALUE,a.semiMajorAxis),a.semiMinorAxis=t.semiMinorAxis.getValue(f$S.MINIMUM_VALUE,a.semiMinorAxis),a.rotation=r$w.getValueOrUndefined(t.rotation,f$S.MINIMUM_VALUE),a.granularity=r$w.getValueOrUndefined(t.granularity,f$S.MINIMUM_VALUE),a.stRotation=r$w.getValueOrUndefined(t.stRotation,f$S.MINIMUM_VALUE),a.numberOfVerticalLines=r$w.getValueOrUndefined(t.numberOfVerticalLines,f$S.MINIMUM_VALUE),a.offsetAttribute=i$A.computeGeometryOffsetAttribute(i,n,r,o),a.height=i$A.getGeometryHeight(i,n),a.outlineWidth=t.outlineWidth?t.outlineWidth.getValue():1,(r=i$A.getGeometryExtrudedHeight(r,o))===i$A.CLAMP_TO_GROUND&&(r=e$1P.getMinimumMaximumHeights(H$U.computeRectangle(a,w$B)).minimumTerrainHeight),a.extrudedHeight=r},l$v.DynamicGeometryUpdater=p$w,t$$(Object.create)&&(p$w.prototype=Object.create(a$B.prototype),p$w.prototype.constructor=p$w),p$w.prototype._isHidden=function(e,t,i){var n=this._options;return!t$$(n.center)||!t$$(n.semiMajorAxis)||!t$$(n.semiMinorAxis)||a$B.prototype._isHidden.call(this,e,t,i)},p$w.prototype._setOptions=function(e,t,i){var n=this._options,r=r$w.getValueOrUndefined(t.height,i),o=r$w.getValueOrDefault(t.heightReference,i,U$Y.NONE),a=r$w.getValueOrUndefined(t.extrudedHeight,i),s=r$w.getValueOrDefault(t.extrudedHeightReference,i,U$Y.NONE);t$$(a)&&!t$$(r)&&(r=0),n.center=r$w.getValueOrUndefined(e.position,i,n.center),n.semiMajorAxis=r$w.getValueOrUndefined(t.semiMajorAxis,i),n.semiMinorAxis=r$w.getValueOrUndefined(t.semiMinorAxis,i),n.rotation=r$w.getValueOrUndefined(t.rotation,i),n.granularity=r$w.getValueOrUndefined(t.granularity,i),n.stRotation=r$w.getValueOrUndefined(t.stRotation,i),n.numberOfVerticalLines=r$w.getValueOrUndefined(t.numberOfVerticalLines,i),n.offsetAttribute=i$A.computeGeometryOffsetAttribute(r,o,a,s),n.height=i$A.getGeometryHeight(r,o),(a=i$A.getGeometryExtrudedHeight(a,s))===i$A.CLAMP_TO_GROUND&&(a=e$1P.getMinimumMaximumHeights(H$U.computeRectangle(n,w$B)).minimumTerrainHeight),n.extrudedHeight=a};var ct$7=new t$F(e$1z.WHITE),L$u=a$11.ZERO,F$u=new a$11,_t$4=new a$11,yt$4=new a$11,W$A=new e$1z,vt$5=new a$11(1,1,1);function Ct$4(e){this.id=e,this.vertexFormat=void 0,this.radii=void 0,this.innerRadii=void 0,this.minimumClock=void 0,this.maximumClock=void 0,this.minimumCone=void 0,this.maximumCone=void 0,this.stackPartitions=void 0,this.slicePartitions=void 0,this.subdivisions=void 0,this.offsetAttribute=void 0}function l$u(e,t){i$J.call(this,{entity:e,scene:t,geometryOptions:new Ct$4(e),geometryPropertyName:"ellipsoid",observedPropertyNames:["availability","position","orientation","ellipsoid"]}),this._onEntityPropertyChanged(e,"ellipsoid",e.ellipsoid,void 0)}function M$z(e,t,i){a$B.call(this,e,t,i),this._scene=e._scene,this._modelMatrix=new c$1a,this._attributes=void 0,this._outlineAttributes=void 0,this._lastSceneMode=void 0,this._lastShow=void 0,this._lastOutlineShow=void 0,this._lastOutlineWidth=void 0,this._lastOutlineColor=void 0,this._lastOffset=new a$11,this._material={}}t$$(Object.create)&&(l$u.prototype=Object.create(i$J.prototype),l$u.prototype.constructor=l$u),Object.defineProperties(l$u.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),l$u.prototype.createFillGeometryInstance=function(e,t,i){n$1e.defined("time",e);var n,r,o=this._entity,a=o.isAvailable(e),s=new e$18(a&&o.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),l=this._distanceDisplayConditionProperty.getValue(e),u={show:s,distanceDisplayCondition:n$Z.fromDistanceDisplayCondition(l),color:void 0,offset:void 0};this._materialProperty instanceof t$F&&(t$$(this._materialProperty.color)&&(this._materialProperty.color.isConstant||a)&&(r=this._materialProperty.color.getValue(e,W$A)),t$$(r)||(r=e$1z.WHITE),n=r$I.fromColor(r),u.color=n);return t$$(this._options.offsetAttribute)&&(u.offset=o$N.fromCartesian3(r$w.getValueOrDefault(this._terrainOffsetProperty,e,L$u,F$u))),new m$P({id:o,geometry:new b$18(this._options),modelMatrix:t?void 0:o.computeModelMatrixForHeightReference(e,o.ellipsoid.heightReference,.5*this._options.radii.z,this._scene.mapProjection.ellipsoid,i),attributes:u})},l$u.prototype.createOutlineGeometryInstance=function(e,t,i){n$1e.defined("time",e);var n=this._entity,r=n.isAvailable(e),o=r$w.getValueOrDefault(this._outlineColorProperty,e,e$1z.BLACK,W$A),a=this._distanceDisplayConditionProperty.getValue(e),s={show:new e$18(r&&n.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:r$I.fromColor(o),distanceDisplayCondition:n$Z.fromDistanceDisplayCondition(a),offset:void 0};return t$$(this._options.offsetAttribute)&&(s.offset=o$N.fromCartesian3(r$w.getValueOrDefault(this._terrainOffsetProperty,e,L$u,F$u))),new m$P({id:n,geometry:new I$Z(this._options),modelMatrix:t?void 0:n.computeModelMatrixForHeightReference(e,n.ellipsoid.heightReference,.5*this._options.radii.z,this._scene.mapProjection.ellipsoid,i),attributes:s})},l$u.prototype._computeCenter=function(e,t){return r$w.getValueOrUndefined(this._entity.position,e,t)},l$u.prototype._isHidden=function(e,t){return!t$$(e.position)||!t$$(t.radii)||i$J.prototype._isHidden.call(this,e,t)},l$u.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&r$w.isConstant(e.orientation)&&t.radii.isConstant&&r$w.isConstant(t.innerRadii)&&r$w.isConstant(t.stackPartitions)&&r$w.isConstant(t.slicePartitions)&&r$w.isConstant(t.outlineWidth)&&r$w.isConstant(t.minimumClock)&&r$w.isConstant(t.maximumClock)&&r$w.isConstant(t.minimumCone)&&r$w.isConstant(t.maximumCone)&&r$w.isConstant(t.subdivisions))},l$u.prototype._setStaticOptions=function(e,t){var i=r$w.getValueOrDefault(t.heightReference,f$S.MINIMUM_VALUE,U$Y.NONE),n=this._options;n.vertexFormat=this._materialProperty instanceof t$F?r$u.VERTEX_FORMAT:t$G.MaterialSupport.TEXTURED.vertexFormat,n.radii=t.radii.getValue(f$S.MINIMUM_VALUE,n.radii),n.innerRadii=r$w.getValueOrUndefined(t.innerRadii,n.radii),n.minimumClock=r$w.getValueOrUndefined(t.minimumClock,f$S.MINIMUM_VALUE),n.maximumClock=r$w.getValueOrUndefined(t.maximumClock,f$S.MINIMUM_VALUE),n.minimumCone=r$w.getValueOrUndefined(t.minimumCone,f$S.MINIMUM_VALUE),n.maximumCone=r$w.getValueOrUndefined(t.maximumCone,f$S.MINIMUM_VALUE),n.stackPartitions=r$w.getValueOrUndefined(t.stackPartitions,f$S.MINIMUM_VALUE),n.slicePartitions=r$w.getValueOrUndefined(t.slicePartitions,f$S.MINIMUM_VALUE),n.subdivisions=r$w.getValueOrUndefined(t.subdivisions,f$S.MINIMUM_VALUE),n.offsetAttribute=i!==U$Y.NONE?_0x165ce0.ALL:void 0},l$u.prototype._onEntityPropertyChanged=y$G,l$u.DynamicGeometryUpdater=M$z,t$$(Object.create)&&(M$z.prototype=Object.create(a$B.prototype),M$z.prototype.constructor=M$z),M$z.prototype.update=function(e){n$1e.defined("time",e);var t=this._entity,i=t.ellipsoid;if(!t.isShowing||!t.isAvailable(e)||!r$w.getValueOrDefault(i.show,e,!0))return t$$(this._primitive)&&(this._primitive.show=!1),void(t$$(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1));var n=r$w.getValueOrUndefined(i.radii,e,_t$4),r=t$$(n)?t.computeModelMatrixForHeightReference(e,i.heightReference,.5*n.z,this._scene.mapProjection.ellipsoid,this._modelMatrix):void 0;if(!t$$(r)||!t$$(n))return t$$(this._primitive)&&(this._primitive.show=!1),void(t$$(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1));var o=r$w.getValueOrDefault(i.fill,e,!0),a=r$w.getValueOrDefault(i.outline,e,!1),s=r$w.getValueOrClonedDefault(i.outlineColor,e,e$1z.BLACK,W$A),l=t$D.getValue(e,e$1Y(i.material,ct$7),this._material),u=r$w.getValueOrUndefined(i.innerRadii,e,yt$4),c=r$w.getValueOrUndefined(i.minimumClock,e),h=r$w.getValueOrUndefined(i.maximumClock,e),d=r$w.getValueOrUndefined(i.minimumCone,e),f=r$w.getValueOrUndefined(i.maximumCone,e),p=r$w.getValueOrUndefined(i.stackPartitions,e),_=r$w.getValueOrUndefined(i.slicePartitions,e),m=r$w.getValueOrUndefined(i.subdivisions,e),$=r$w.getValueOrDefault(i.outlineWidth,e,1),g=r$w.getValueOrDefault(i.heightReference,e,U$Y.NONE),y=g!==U$Y.NONE?_0x165ce0.ALL:void 0,v=this._scene.mode,x=v===b$1d.SCENE3D&&g===U$Y.NONE,b=this._options,S=this._geometryUpdater.shadowsProperty.getValue(e),w=this._geometryUpdater.distanceDisplayConditionProperty.getValue(e),C=r$w.getValueOrDefault(this._geometryUpdater.terrainOffsetProperty,e,L$u,F$u);if(!x||this._lastSceneMode!==v||!t$$(this._primitive)||b.stackPartitions!==p||b.slicePartitions!==_||t$$(u)&&!a$11.equals(b.innerRadii!==u)||b.minimumClock!==c||b.maximumClock!==h||b.minimumCone!==d||b.maximumCone!==f||b.subdivisions!==m||this._lastOutlineWidth!==$||b.offsetAttribute!==y){var T=this._primitives;if(T.removeAndDestroy(this._primitive),T.removeAndDestroy(this._outlinePrimitive),this._primitive=void 0,this._outlinePrimitive=void 0,this._lastSceneMode=v,this._lastOutlineWidth=$,b.stackPartitions=p,b.slicePartitions=_,b.subdivisions=m,b.offsetAttribute=y,b.radii=a$11.clone(x?vt$5:n,b.radii),t$$(u))if(x){var P=a$11.magnitude(n);b.innerRadii=a$11.fromElements(u.x/P,u.y/P,u.z/P,b.innerRadii)}else b.innerRadii=a$11.clone(u,b.innerRadii);else b.innerRadii=void 0;b.minimumClock=c,b.maximumClock=h,b.minimumCone=d,b.maximumCone=f;var E=new t$G({material:l,translucent:l.isTranslucent(),closed:!0});b.vertexFormat=E.vertexFormat;var A=this._geometryUpdater.createFillGeometryInstance(e,x,this._modelMatrix);this._primitive=T.add(new y$H({geometryInstances:A,appearance:E,asynchronous:!1,shadows:S}));var L=this._geometryUpdater.createOutlineGeometryInstance(e,x,this._modelMatrix);this._outlinePrimitive=T.add(new y$H({geometryInstances:L,appearance:new r$u({flat:!0,translucent:255!==L.attributes.color.value[3],renderState:{lineWidth:this._geometryUpdater._scene.clampLineWidth($)}}),asynchronous:!1,shadows:S})),this._lastShow=o,this._lastOutlineShow=a,this._lastOutlineColor=e$1z.clone(s,this._lastOutlineColor),this._lastDistanceDisplayCondition=w,this._lastOffset=a$11.clone(C,this._lastOffset)}else if(this._primitive.ready){var M=this._primitive,I=this._outlinePrimitive;M.show=!0,I.show=!0,M.appearance.material=l;var O=this._attributes;t$$(O)||(O=M.getGeometryInstanceAttributes(t),this._attributes=O),o!==this._lastShow&&(O.show=e$18.toValue(o,O.show),this._lastShow=o);var D=this._outlineAttributes;t$$(D)||(D=I.getGeometryInstanceAttributes(t),this._outlineAttributes=D),a!==this._lastOutlineShow&&(D.show=e$18.toValue(a,D.show),this._lastOutlineShow=a),e$1z.equals(s,this._lastOutlineColor)||(D.color=r$I.toValue(s,D.color),e$1z.clone(s,this._lastOutlineColor)),e$1w.equals(w,this._lastDistanceDisplayCondition)||(O.distanceDisplayCondition=n$Z.toValue(w,O.distanceDisplayCondition),D.distanceDisplayCondition=n$Z.toValue(w,D.distanceDisplayCondition),e$1w.clone(w,this._lastDistanceDisplayCondition)),a$11.equals(C,this._lastOffset)||(O.offset=o$N.toValue(C,O.offset),D.offset=o$N.toValue(C,O.offset),a$11.clone(C,this._lastOffset))}x&&(n.x=Math.max(n.x,.001),n.y=Math.max(n.y,.001),n.z=Math.max(n.z,.001),r=c$1a.multiplyByScale(r,n,r),this._primitive.modelMatrix=r,this._outlinePrimitive.modelMatrix=r)};var z$q=new a$11,A$z=new e$1z;function B$q(e){this.id=e,this.vertexFormat=void 0,this.plane=void 0,this.dimensions=void 0}function p$v(e,t){i$J.call(this,{entity:e,scene:t,geometryOptions:new B$q(e),geometryPropertyName:"plane",observedPropertyNames:["availability","position","orientation","plane"]}),this._onEntityPropertyChanged(e,"plane",e.plane,void 0)}function h$x(e,t,i){a$B.call(this,e,t,i)}t$$(Object.create)&&(p$v.prototype=Object.create(i$J.prototype),p$v.prototype.constructor=p$v),p$v.prototype.createFillGeometryInstance=function(e){if(n$1e.defined("time",e),!this._fillEnabled)throw new t$_("This instance does not represent a filled geometry.");var t,i,n=this._entity,r=n.isAvailable(e),o=new e$18(r&&n.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e),s=n$Z.fromDistanceDisplayCondition(a);this._materialProperty instanceof t$F?(t$$(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(i=this._materialProperty.color.getValue(e,A$z)),t$$(i)||(i=e$1z.WHITE),t={show:o,distanceDisplayCondition:s,color:r$I.fromColor(i)}):t={show:o,distanceDisplayCondition:s};var l=n.plane,u=this._options,c=n.computeModelMatrix(e),h=r$w.getValueOrDefault(l.plane,e,u.plane),d=r$w.getValueOrUndefined(l.dimensions,e,u.dimensions);return u.plane=h,u.dimensions=d,c=M$y(h,d,c,this._scene.mapProjection.ellipsoid,c),new m$P({id:n,geometry:new f$Q(this._options),modelMatrix:c,attributes:t})},p$v.prototype.createOutlineGeometryInstance=function(e){if(n$1e.defined("time",e),!this._outlineEnabled)throw new t$_("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$w.getValueOrDefault(this._outlineColorProperty,e,e$1z.BLACK,A$z),r=this._distanceDisplayConditionProperty.getValue(e),o=t.plane,a=this._options,s=t.computeModelMatrix(e),l=r$w.getValueOrDefault(o.plane,e,a.plane),u=r$w.getValueOrUndefined(o.dimensions,e,a.dimensions);return a.plane=l,a.dimensions=u,s=M$y(l,u,s,this._scene.mapProjection.ellipsoid,s),new m$P({id:t,geometry:new o$L,modelMatrix:s,attributes:{show:new e$18(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:r$I.fromColor(n),distanceDisplayCondition:n$Z.fromDistanceDisplayCondition(r)}})},p$v.prototype._isHidden=function(e,t){return!t$$(t.plane)||!t$$(t.dimensions)||!t$$(e.position)||i$J.prototype._isHidden.call(this,e,t)},p$v.prototype._getIsClosed=function(e){return!1},p$v.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&r$w.isConstant(e.orientation)&&t.plane.isConstant&&t.dimensions.isConstant&&r$w.isConstant(t.outlineWidth))},p$v.prototype._setStaticOptions=function(e,t){var i=this._materialProperty instanceof t$F,n=this._options;n.vertexFormat=i?r$u.VERTEX_FORMAT:t$G.MaterialSupport.TEXTURED.vertexFormat,n.plane=t.plane.getValue(f$S.MINIMUM_VALUE,n.plane),n.dimensions=t.dimensions.getValue(f$S.MINIMUM_VALUE,n.dimensions)},p$v.DynamicGeometryUpdater=h$x,t$$(Object.create)&&(h$x.prototype=Object.create(a$B.prototype),h$x.prototype.constructor=h$x),h$x.prototype._isHidden=function(e,t,i){var n=this._options;return!t$$(r$w.getValueOrUndefined(e.position,i,z$q))||!t$$(n.plane)||!t$$(n.dimensions)||a$B.prototype._isHidden.call(this,e,t,i)},h$x.prototype._setOptions=function(e,t,i){var n=this._options;n.plane=r$w.getValueOrDefault(t.plane,i,n.plane),n.dimensions=r$w.getValueOrUndefined(t.dimensions,i,n.dimensions)};var G$w=new a$11,X$n=new a$11,q$v=new a$11,W$z=new a$11,K$o=new a$11,Q$p=new a$U,k$u=new r$W;function M$y(e,t,i,n,r){var o=e.normal,a=e.distance,s=a$11.multiplyByScalar(o,-a,q$v);s=c$1a.multiplyByPoint(i,s,s);var l=c$1a.multiplyByPointAsVector(i,o,W$z);a$11.normalize(l,l);var u=n.geodeticSurfaceNormal(s,X$n);n$1d.equalsEpsilon(Math.abs(a$11.dot(u,l)),1,n$1d.EPSILON8)&&(u=a$11.clone(a$11.UNIT_Z,u),n$1d.equalsEpsilon(Math.abs(a$11.dot(u,l)),1,n$1d.EPSILON8)&&(u=a$11.clone(a$11.UNIT_X,u)));var c=a$11.cross(u,l,G$w);u=a$11.cross(l,c,u),a$11.normalize(c,c),a$11.normalize(u,u);var h=k$u;r$W.setColumn(h,0,c,h),r$W.setColumn(h,1,u,h),r$W.setColumn(h,2,l,h);var d=a$U.fromRotationMatrix(h,Q$p),f=r$T.clone(t,K$o);return f.z=1,c$1a.fromTranslationQuaternionRotationScale(s,d,f,r)}p$v.createPrimitiveMatrix=M$y;var G$v="Entity polygons cannot have both height and perPositionHeight. height will be ignored",S$q="heightReference is not supported for entity polygons with perPositionHeight. heightReference will be ignored",j$s=new e$1z,F$t=a$11.ZERO,W$y=new a$11,X$m=new s$1p,et$9=[],ot$9=new r$T;function it$6(e){this.id=e,this.vertexFormat=void 0,this.polygonHierarchy=void 0,this.perPositionHeight=void 0,this.closeTop=void 0,this.closeBottom=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.offsetAttribute=void 0,this.arcType=void 0,this.depthTestEnabled=void 0,this.groundBottomAltitude=void 0,this.groundExtrudedHeight=void 0}function d$t(e,t){i$A.call(this,{entity:e,scene:t,geometryOptions:new it$6(e),geometryPropertyName:"polygon",observedPropertyNames:["availability","polygon"]}),this._onEntityPropertyChanged(e,"polygon",e.polygon,void 0)}function _$q(e,t,i){a$B.call(this,e,t,i)}t$$(Object.create)&&(d$t.prototype=Object.create(i$A.prototype),d$t.prototype.constructor=d$t),d$t.prototype.createFillGeometryInstance=function(e){if(n$1e.defined("time",e),!this._fillEnabled)throw new t$_("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r=this._options,o={show:new e$18(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:n$Z.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};this._materialProperty instanceof t$F&&(t$$(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,j$s)),t$$(t)||(t=e$1z.WHITE),o.color=r$I.fromColor(t));return t$$(r.offsetAttribute)&&(o.offset=o$N.fromCartesian3(r$w.getValueOrDefault(this._terrainOffsetProperty,e,F$t,W$y))),new m$P({id:i,geometry:r.perPositionHeight&&!t$$(r.extrudedHeight)?new A$X(r):new S$C(r),attributes:o})},d$t.prototype.createOutlineGeometryInstance=function(e){if(n$1e.defined("time",e),!this._outlineEnabled)throw new t$_("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=this._options,r=r$w.getValueOrDefault(this._outlineColorProperty,e,e$1z.BLACK,j$s),o=this._distanceDisplayConditionProperty.getValue(e),a={show:new e$18(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:r$I.fromColor(r),distanceDisplayCondition:n$Z.fromDistanceDisplayCondition(o),offset:void 0};return t$$(n.offsetAttribute)&&(a.offset=o$N.fromCartesian3(r$w.getValueOrDefault(this._terrainOffsetProperty,e,F$t,W$y))),new m$P({id:t,geometry:n.perPositionHeight&&!t$$(n.extrudedHeight)?new a$L(n):new O$J(n),attributes:a})},d$t.prototype._computeCenter=function(e,t){var i=r$w.getValueOrUndefined(this._entity.polygon.hierarchy,e);if(t$$(i)){var n=i.positions;if(0!==n.length){for(var r=this._scene.mapProjection.ellipsoid,o=s$1h.fromPoints(n,r),a=o.projectPointsOntoPlane(n,et$9),s=a.length,l=0,u=s-1,c=new r$T,h=0;h<s;u=h++){var d=a[h],f=a[u],p=d.x*f.y-f.x*d.y,_=r$T.add(d,f,ot$9);_=r$T.multiplyByScalar(_,p,_),c=r$T.add(c,_,c),l+=p}var m=1/(3*l);return c=r$T.multiplyByScalar(c,m,c),o.projectPointOntoEllipsoid(c,t)}}},d$t.prototype._isHidden=function(e,t){return!t$$(t.hierarchy)||i$J.prototype._isHidden.call(this,e,t)},d$t.prototype._isOnTerrain=function(e,t){var i=i$A.prototype._isOnTerrain.call(this,e,t),n=t.perPositionHeight,r=t$$(n)&&(!n.isConstant||n.getValue(f$S.MINIMUM_VALUE));return i&&!r},d$t.prototype._isDynamic=function(e,t){return!t.hierarchy.isConstant||!r$w.isConstant(t.height)||!r$w.isConstant(t.extrudedHeight)||!r$w.isConstant(t.granularity)||!r$w.isConstant(t.stRotation)||!r$w.isConstant(t.outlineWidth)||!r$w.isConstant(t.perPositionHeight)||!r$w.isConstant(t.closeTop)||!r$w.isConstant(t.closeBottom)||!r$w.isConstant(t.zIndex)||!r$w.isConstant(t.arcType)||this._onTerrain&&!r$w.isConstant(this._materialProperty)&&!(this._materialProperty instanceof t$F)},d$t.prototype._setStaticOptions=function(e,t){var i=this._materialProperty instanceof t$F,n=this._options;n.vertexFormat=i?r$u.VERTEX_FORMAT:t$G.MaterialSupport.TEXTURED.vertexFormat;var r,o=t.hierarchy.getValue(f$S.MINIMUM_VALUE),a=r$w.getValueOrUndefined(t.height,f$S.MINIMUM_VALUE),s=r$w.getValueOrDefault(t.heightReference,f$S.MINIMUM_VALUE,U$Y.NONE),l=r$w.getValueOrUndefined(t.extrudedHeight,f$S.MINIMUM_VALUE),u=r$w.getValueOrDefault(t.extrudedHeightReference,f$S.MINIMUM_VALUE,U$Y.NONE),c=r$w.getValueOrDefault(t.perPositionHeight,f$S.MINIMUM_VALUE,!1);a=i$A.getGeometryHeight(a,s),c?(t$$(a)&&(a=void 0,e$1Q(G$v)),s!==U$Y.NONE&&c&&(a=void 0,e$1Q(S$q))):(t$$(l)&&!t$$(a)&&(a=0),r=i$A.computeGeometryOffsetAttribute(a,s,l,u)),n.polygonHierarchy=o,n.granularity=r$w.getValueOrUndefined(t.granularity,f$S.MINIMUM_VALUE),n.stRotation=r$w.getValueOrUndefined(t.stRotation,f$S.MINIMUM_VALUE),n.perPositionHeight=c,n.closeTop=r$w.getValueOrDefault(t.closeTop,f$S.MINIMUM_VALUE,!0),n.closeBottom=r$w.getValueOrDefault(t.closeBottom,f$S.MINIMUM_VALUE,!0),n.offsetAttribute=r,n.height=a,n.arcType=r$w.getValueOrDefault(t.arcType,f$S.MINIMUM_VALUE,m$_.GEODESIC),n.depthTestEnabled=!t$$(e._depthTestEnabled)||e._depthTestEnabled,(l=i$A.getGeometryExtrudedHeight(l,u))===i$A.CLAMP_TO_GROUND&&(l=e$1P.getMinimumMaximumHeights(S$C.computeRectangle(n,X$m)).minimumTerrainHeight),n.extrudedHeight=l,n.groundBottomAltitude=r$w.getValueOrUndefined(t.groundBottomAltitude,f$S.MINIMUM_VALUE),n.groundExtrudedHeight=r$w.getValueOrUndefined(t.groundExtrudedHeight,f$S.MINIMUM_VALUE)},d$t.prototype._getIsClosed=function(e){var t=e.height,i=e.extrudedHeight,n=t$$(i)&&i!==t;return!e.perPositionHeight&&(!n&&0===t||n&&e.closeTop&&e.closeBottom)},d$t.DynamicGeometryUpdater=_$q,t$$(Object.create)&&(_$q.prototype=Object.create(a$B.prototype),_$q.prototype.constructor=_$q),_$q.prototype._isHidden=function(e,t,i){return!t$$(this._options.polygonHierarchy)||a$B.prototype._isHidden.call(this,e,t,i)},_$q.prototype._setOptions=function(e,t,i){var n=this._options;n.polygonHierarchy=r$w.getValueOrUndefined(t.hierarchy,i),Array.isArray(n.polygonHierarchy)&&(n.polygonHierarchy=new t$K(n.polygonHierarchy));var r,o=r$w.getValueOrUndefined(t.height,i),a=r$w.getValueOrDefault(t.heightReference,i,U$Y.NONE),s=r$w.getValueOrDefault(t.extrudedHeightReference,i,U$Y.NONE),l=r$w.getValueOrUndefined(t.extrudedHeight,i),u=r$w.getValueOrUndefined(t.perPositionHeight,i);o=i$A.getGeometryHeight(o,s),u?(t$$(o)&&(o=void 0,e$1Q(G$v)),a!==U$Y.NONE&&u&&(o=void 0,e$1Q(S$q))):(t$$(l)&&!t$$(o)&&(o=0),r=i$A.computeGeometryOffsetAttribute(o,a,l,s)),n.granularity=r$w.getValueOrUndefined(t.granularity,i),n.stRotation=r$w.getValueOrUndefined(t.stRotation,i),n.perPositionHeight=r$w.getValueOrUndefined(t.perPositionHeight,i),n.closeTop=r$w.getValueOrDefault(t.closeTop,i,!0),n.closeBottom=r$w.getValueOrDefault(t.closeBottom,i,!0),n.offsetAttribute=r,n.height=o,n.arcType=r$w.getValueOrDefault(t.arcType,i,m$_.GEODESIC),(l=i$A.getGeometryExtrudedHeight(l,s))===i$A.CLAMP_TO_GROUND&&(l=e$1P.getMinimumMaximumHeights(S$C.computeRectangle(n,X$m)).minimumTerrainHeight),n.extrudedHeight=l};var M$x=new e$1z;function b$F(e){this.id=e,this.vertexFormat=void 0,this.polylinePositions=void 0,this.shapePositions=void 0,this.cornerType=void 0,this.granularity=void 0,this.enuCenter=void 0}function s$p(e,t){i$J.call(this,{entity:e,scene:t,geometryOptions:new b$F(e),geometryPropertyName:"polylineVolume",observedPropertyNames:["availability","polylineVolume"]}),this._onEntityPropertyChanged(e,"polylineVolume",e.polylineVolume,void 0)}function l$t(e,t,i){a$B.call(this,e,t,i)}t$$(Object.create)&&(s$p.prototype=Object.create(i$J.prototype),s$p.prototype.constructor=s$p),s$p.prototype.createFillGeometryInstance=function(e){if(n$1e.defined("time",e),!this._fillEnabled)throw new t$_("This instance does not represent a filled geometry.");var t,i,n=this._entity,r=n.isAvailable(e),o=new e$18(r&&n.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e),s=n$Z.fromDistanceDisplayCondition(a);this._materialProperty instanceof t$F?(t$$(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(i=this._materialProperty.color.getValue(e,M$x)),t$$(i)||(i=e$1z.WHITE),t={show:o,distanceDisplayCondition:s,color:r$I.fromColor(i)}):t={show:o,distanceDisplayCondition:s};return new m$P({id:n,geometry:new N$Q(this._options),attributes:t})},s$p.prototype.createOutlineGeometryInstance=function(e){if(n$1e.defined("time",e),!this._outlineEnabled)throw new t$_("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$w.getValueOrDefault(this._outlineColorProperty,e,e$1z.BLACK,M$x),r=this._distanceDisplayConditionProperty.getValue(e);return new m$P({id:t,geometry:new v$N(this._options),attributes:{show:new e$18(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:r$I.fromColor(n),distanceDisplayCondition:n$Z.fromDistanceDisplayCondition(r)}})},s$p.prototype._isHidden=function(e,t){return!t$$(t.positions)||!t$$(t.shape)||i$J.prototype._isHidden.call(this,e,t)},s$p.prototype._isDynamic=function(e,t){return!(t.positions.isConstant&&t.shape.isConstant&&r$w.isConstant(t.granularity)&&r$w.isConstant(t.outlineWidth)&&r$w.isConstant(t.cornerType))},s$p.prototype._setStaticOptions=function(e,t){var i=t.granularity,n=t.cornerType,r=t.enuCenter,o=this._options,a=this._materialProperty instanceof t$F;o.vertexFormat=a?r$u.VERTEX_FORMAT:t$G.MaterialSupport.TEXTURED.vertexFormat,o.polylinePositions=t.positions.getValue(f$S.MINIMUM_VALUE,o.polylinePositions),o.shapePositions=t.shape.getValue(f$S.MINIMUM_VALUE,o.shape),o.granularity=t$$(i)?i.getValue(f$S.MINIMUM_VALUE):void 0,o.cornerType=t$$(n)?n.getValue(f$S.MINIMUM_VALUE):void 0,o.enuCenter=t$$(r)?r.getValue(f$S.MINIMUM_VALUE):void 0},s$p.DynamicGeometryUpdater=l$t,t$$(Object.create)&&(l$t.prototype=Object.create(a$B.prototype),l$t.prototype.constructor=l$t),l$t.prototype._isHidden=function(e,t,i){var n=this._options;return!t$$(n.polylinePositions)||!t$$(n.shapePositions)||a$B.prototype._isHidden.call(this,e,t,i)},l$t.prototype._setOptions=function(e,t,i){var n=this._options;n.polylinePositions=r$w.getValueOrUndefined(t.positions,i,n.polylinePositions),n.shapePositions=r$w.getValueOrUndefined(t.shape,i),n.granularity=r$w.getValueOrUndefined(t.granularity,i),n.cornerType=r$w.getValueOrUndefined(t.cornerType,i)};var D$z=new e$1z,I$A=a$11.ZERO,N$r=new a$11,b$E=new s$1p,F$s=new s$1p,S$p=new i$1g;function j$r(e){this.id=e,this.vertexFormat=void 0,this.rectangle=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.rotation=void 0,this.offsetAttribute=void 0}function m$r(e,t){i$A.call(this,{entity:e,scene:t,geometryOptions:new j$r(e),geometryPropertyName:"rectangle",observedPropertyNames:["availability","rectangle"]}),this._onEntityPropertyChanged(e,"rectangle",e.rectangle,void 0)}function u$v(e,t,i){a$B.call(this,e,t,i)}t$$(Object.create)&&(m$r.prototype=Object.create(i$A.prototype),m$r.prototype.constructor=m$r),m$r.prototype.createFillGeometryInstance=function(e){if(n$1e.defined("time",e),!this._fillEnabled)throw new t$_("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r={show:new e$18(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:n$Z.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};this._materialProperty instanceof t$F&&(t$$(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,D$z)),t$$(t)||(t=e$1z.WHITE),r.color=r$I.fromColor(t));return t$$(this._options.offsetAttribute)&&(r.offset=o$N.fromCartesian3(r$w.getValueOrDefault(this._terrainOffsetProperty,e,I$A,N$r))),new m$P({id:i,geometry:new B$B(this._options),attributes:r})},m$r.prototype.createOutlineGeometryInstance=function(e){if(n$1e.defined("time",e),!this._outlineEnabled)throw new t$_("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$w.getValueOrDefault(this._outlineColorProperty,e,e$1z.BLACK,D$z),r=this._distanceDisplayConditionProperty.getValue(e),o={show:new e$18(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:r$I.fromColor(n),distanceDisplayCondition:n$Z.fromDistanceDisplayCondition(r),offset:void 0};return t$$(this._options.offsetAttribute)&&(o.offset=o$N.fromCartesian3(r$w.getValueOrDefault(this._terrainOffsetProperty,e,I$A,N$r))),new m$P({id:t,geometry:new P$H(this._options),attributes:o})},m$r.prototype._computeCenter=function(e,t){var i=r$w.getValueOrUndefined(this._entity.rectangle.coordinates,e,F$s);if(t$$(i)){var n=s$1p.center(i,S$p);return i$1g.toCartesian(n,n$1c.WGS84,t)}},m$r.prototype._isHidden=function(e,t){return!t$$(t.coordinates)||i$J.prototype._isHidden.call(this,e,t)},m$r.prototype._isDynamic=function(e,t){return!t.coordinates.isConstant||!r$w.isConstant(t.height)||!r$w.isConstant(t.extrudedHeight)||!r$w.isConstant(t.granularity)||!r$w.isConstant(t.stRotation)||!r$w.isConstant(t.rotation)||!r$w.isConstant(t.outlineWidth)||!r$w.isConstant(t.zIndex)||this._onTerrain&&!r$w.isConstant(this._materialProperty)&&!(this._materialProperty instanceof t$F)},m$r.prototype._setStaticOptions=function(e,t){var i=this._materialProperty instanceof t$F,n=r$w.getValueOrUndefined(t.height,f$S.MINIMUM_VALUE),r=r$w.getValueOrDefault(t.heightReference,f$S.MINIMUM_VALUE,U$Y.NONE),o=r$w.getValueOrUndefined(t.extrudedHeight,f$S.MINIMUM_VALUE),a=r$w.getValueOrDefault(t.extrudedHeightReference,f$S.MINIMUM_VALUE,U$Y.NONE);t$$(o)&&!t$$(n)&&(n=0);var s=this._options;s.vertexFormat=i?r$u.VERTEX_FORMAT:t$G.MaterialSupport.TEXTURED.vertexFormat,s.rectangle=t.coordinates.getValue(f$S.MINIMUM_VALUE,s.rectangle),s.granularity=r$w.getValueOrUndefined(t.granularity,f$S.MINIMUM_VALUE),s.stRotation=r$w.getValueOrUndefined(t.stRotation,f$S.MINIMUM_VALUE),s.rotation=r$w.getValueOrUndefined(t.rotation,f$S.MINIMUM_VALUE),s.offsetAttribute=i$A.computeGeometryOffsetAttribute(n,r,o,a),s.height=i$A.getGeometryHeight(n,r),(o=i$A.getGeometryExtrudedHeight(o,a))===i$A.CLAMP_TO_GROUND&&(o=e$1P.getMinimumMaximumHeights(B$B.computeRectangle(s,b$E)).minimumTerrainHeight),s.extrudedHeight=o},m$r.DynamicGeometryUpdater=u$v,t$$(Object.create)&&(u$v.prototype=Object.create(a$B.prototype),u$v.prototype.constructor=u$v),u$v.prototype._isHidden=function(e,t,i){return!t$$(this._options.rectangle)||a$B.prototype._isHidden.call(this,e,t,i)},u$v.prototype._setOptions=function(e,t,i){var n=this._options,r=r$w.getValueOrUndefined(t.height,i),o=r$w.getValueOrDefault(t.heightReference,i,U$Y.NONE),a=r$w.getValueOrUndefined(t.extrudedHeight,i),s=r$w.getValueOrDefault(t.extrudedHeightReference,i,U$Y.NONE);t$$(a)&&!t$$(r)&&(r=0),n.rectangle=r$w.getValueOrUndefined(t.coordinates,i,n.rectangle),n.granularity=r$w.getValueOrUndefined(t.granularity,i),n.stRotation=r$w.getValueOrUndefined(t.stRotation,i),n.rotation=r$w.getValueOrUndefined(t.rotation,i),n.offsetAttribute=i$A.computeGeometryOffsetAttribute(r,o,a,s),n.height=i$A.getGeometryHeight(r,o),(a=i$A.getGeometryExtrudedHeight(a,s))===i$A.CLAMP_TO_GROUND&&(a=e$1P.getMinimumMaximumHeights(B$B.computeRectangle(n,b$E)).minimumTerrainHeight),n.extrudedHeight=a};var L$t=new e$1z,Z$t=new e$1w,$$r=new e$1w,tt$a=a$11.ZERO,et$8=new a$11;function u$u(e,t,i,n,r,o,a){var s;this.translucent=t,this.appearanceType=i,this.depthFailAppearanceType=n,this.depthFailMaterialProperty=r,this.depthFailMaterial=void 0,this.closed=o,this.shadows=a,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1F,this.updaters=new e$1F,this.updatersWithAttributes=new e$1F,this.attributes=new e$1F,this.subscriptions=new e$1F,this.showsUpdated=new e$1F,this.itemsToRemove=[],this.invalidated=!1,t$$(r)&&(s=r.definitionChanged.addEventListener(u$u.prototype.onMaterialChanged,this)),this.removeMaterialSubscription=s}function y$x(e,t,i,n,r){this._solidItems=[],this._translucentItems=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=i,this._closed=n,this._shadows=r}function U$w(e,t){for(var i=e.length-1;i>=0;i--){var n=e[i];if(n.remove(t))return 0===n.updaters.length&&(e.splice(i,1),n.destroy()),!0}return!1}function q$u(e,t,i){for(var n=!1,r=t.length,o=0;o<r;++o){var a=t[o],s=a.itemsToRemove,l=s.length;if(l>0)for(o=0;o<l;o++){var u=s[o];a.remove(u),e.add(i,u),n=!0}}return n}function C$w(e,t,i,n){var r,o=t.length;for(r=o-1;r>=0;r--){var a=t[r];if(a.invalidated){t.splice(r,1);for(var s=a.updaters.values,l=s.length,u=0;u<l;u++)e.add(i,s[u]);a.destroy()}}for(o=t.length,r=0;r<o;++r)n=t[r].update(i)&&n;return n}function N$q(e,t,i){for(var n=e.length,r=0;r<n;r++){var o=e[r];if(o.contains(t))return o.getBoundingSphere(t,i)}return A$T.FAILED}function B$p(e){for(var t=e.length,i=0;i<t;i++)e[i].destroy();e.length=0}u$u.prototype.onMaterialChanged=function(){this.invalidated=!0},u$u.prototype.isMaterial=function(e){var t=this.depthFailMaterialProperty,i=e.depthFailMaterialProperty;return i===t||!!t$$(t)&&t.equals(i)},u$u.prototype.add=function(e,t){var i=e.id;if(this.createPrimitive=!0,this.enuCenter=e._options&&e._options.enuCenter,t$$(this.enuCenter)&&(this.materialSupport=r$u.MaterialSupport.FLOAT_POSITION),this.geometry.set(i,t),this.updaters.set(i,e),e.hasConstantFill&&e.fillMaterialProperty.isConstant&&r$w.isConstant(e.distanceDisplayConditionProperty)&&r$w.isConstant(e.terrainOffsetProperty)){var n=this;this.subscriptions.set(i,e.entity.definitionChanged.addEventListener((function(t,i,r,o){"isShowing"===i&&n.showsUpdated.set(e.id,e)})))}else this.updatersWithAttributes.set(i,e)},u$u.prototype.remove=function(e){var t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);var i=this.subscriptions.get(t);return t$$(i)&&(i(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1},u$u.prototype.update=function(e){var t,i=!0,n=0,r=this.primitive,o=this.primitives;if(this.createPrimitive){var a=this.geometry.values;if(a.length>0){var s;t$$(r)&&(t$$(this.oldPrimitive)?o.remove(r):this.oldPrimitive=r),t$$(this.depthFailAppearanceType)&&(t$$(this.depthFailMaterialProperty)&&(this.depthFailMaterial=t$D.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial)),s=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.translucent,closed:this.closed})),(r=new y$H({show:!1,asynchronous:!0,geometryInstances:a,appearance:new this.appearanceType({translucent:this.translucent,closed:this.closed,materialSupport:this.materialSupport,renderState:{depthTest:{enabled:this._depthTestEnabled}}}),depthFailAppearance:s,shadows:this.shadows,updateBoundingSphere:!t$$(this.enuCenter),modelMatrix:t$$(this.enuCenter)?m$13.eastNorthUpToFixedFrame(this.enuCenter,n$1c.WGS84,new c$1a):void 0}))._polygonOffset=this.polygonOffset,o.add(r),i=!1}else{t$$(r)&&(o.remove(r),r=void 0);var l=this.oldPrimitive;t$$(l)&&(o.remove(l),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=r,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(t$$(r)&&r.ready){r.show=!0,t$$(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0),t$$(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof t$F)&&(this.depthFailMaterial=t$D.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);var u=this.updatersWithAttributes.values,c=u.length,h=this.waitingOnCreate;for(t=0;t<c;t++){var d=u[t],f=this.geometry.get(d.id),p=this.attributes.get(f.id.id);if(t$$(p)||(p=r.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,p)),!d.fillMaterialProperty.isConstant||h){var _=d.fillMaterialProperty.color,m=r$w.getValueOrDefault(_,e,e$1z.WHITE,L$t);e$1z.equals(p._lastColor,m)||(p._lastColor=e$1z.clone(m,p._lastColor),p.color=r$I.toValue(m,p.color),(this.translucent&&255===p.color[3]||!this.translucent&&255!==p.color[3])&&(this.itemsToRemove[n++]=d))}if(t$$(this.depthFailAppearanceType)&&d.depthFailMaterialProperty instanceof t$F&&(!d.depthFailMaterialProperty.isConstant||h)){var $=d.depthFailMaterialProperty.color,g=r$w.getValueOrDefault($,e,e$1z.WHITE,L$t);e$1z.equals(p._lastDepthFailColor,g)||(p._lastDepthFailColor=e$1z.clone(g,p._lastDepthFailColor),p.depthFailColor=r$I.toValue(g,p.depthFailColor))}var y=d.entity.isShowing&&(d.hasConstantFill||d.isFilled(e));y!==(1===p.show[0])&&(p.show=e$18.toValue(y,p.show));var v=d.distanceDisplayConditionProperty;if(!r$w.isConstant(v)){var x=r$w.getValueOrDefault(v,e,$$r,Z$t);e$1w.equals(x,p._lastDistanceDisplayCondition)||(p._lastDistanceDisplayCondition=e$1w.clone(x,p._lastDistanceDisplayCondition),p.distanceDisplayCondition=n$Z.toValue(x,p.distanceDisplayCondition))}var b=d.terrainOffsetProperty;if(!r$w.isConstant(b)){var S=r$w.getValueOrDefault(b,e,tt$a,et$8);a$11.equals(S,p._lastOffset)||(p._lastOffset=a$11.clone(S,p._lastOffset),p.offset=o$N.toValue(S,p.offset))}}this.updateShows(r),this.waitingOnCreate=!1}else t$$(r)&&!r.ready&&(i=!1);return this.itemsToRemove.length=n,i},u$u.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=this.geometry.get(r.id),a=this.attributes.get(o.id.id);t$$(a)||(a=e.getGeometryInstanceAttributes(o.id),this.attributes.set(o.id.id,a));var s=r.entity.isShowing;s!==(1===a.show[0])&&(a.show=e$18.toValue(s,a.show),o.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()},u$u.prototype.contains=function(e){return this.updaters.contains(e.id)},u$u.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return A$T.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!t$$(n)||!t$$(n.boundingSphere)||t$$(n.show)&&0===n.show[0]?A$T.FAILED:(n.boundingSphere.clone(t),A$T.DONE)},u$u.prototype.destroy=function(){var e=this.primitive,t=this.primitives;t$$(e)&&t.remove(e);var i=this.oldPrimitive;t$$(i)&&t.remove(i),t$$(this.removeMaterialSubscription)&&this.removeMaterialSubscription()},y$x.prototype.add=function(e,t){var i,n,r=t.createFillGeometryInstance(e);255===r.attributes.color.value[3]?(i=this._solidItems,n=!1):(i=this._translucentItems,n=!0);for(var o=i.length,a=0;a<o;a++){var s=i[a];if(this.enuCenter)break;if(!s._hasEnuCenter&&s.isMaterial(t))return void s.add(t,r)}var l=new u$u(this._primitives,n,this._appearanceType,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows);l._hasEnuCenter=t._options&&!!t._options.enuCenter,l._depthTestEnabled=!t$$(t._options)||!t$$(t._options.depthTestEnabled)||t._options.depthTestEnabled,l.polygonOffset=t._entity._polygonOffset,l.add(t,r),i.push(l)},y$x.prototype.remove=function(e){U$w(this._solidItems,e)||U$w(this._translucentItems,e)},y$x.prototype.update=function(e){var t=C$w(this,this._solidItems,e,!0);t=C$w(this,this._translucentItems,e,t)&&t;var i=q$u(this,this._solidItems,e),n=q$u(this,this._translucentItems,e);return(i||n)&&(t=C$w(this,this._solidItems,e,t)&&t,t=C$w(this,this._translucentItems,e,t)&&t),t},y$x.prototype.getBoundingSphere=function(e,t){var i=N$q(this._solidItems,e,t);return i===A$T.FAILED?N$q(this._translucentItems,e,t):i},y$x.prototype.removeAllPrimitives=function(){B$p(this._solidItems),B$p(this._translucentItems)};var X$l=new e$1w,Z$s=new e$1w,j$q=a$11.ZERO,z$p=new a$11;function l$s(e,t,i,n,r,o,a){this.primitives=e,this.appearanceType=t,this.materialProperty=i,this.depthFailAppearanceType=n,this.depthFailMaterialProperty=r,this.closed=o,this.shadows=a,this.updaters=new e$1F,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1F,this.material=void 0,this.depthFailMaterial=void 0,this.updatersWithAttributes=new e$1F,this.attributes=new e$1F,this.invalidated=!1,this.removeMaterialSubscription=i.definitionChanged.addEventListener(l$s.prototype.onMaterialChanged,this),this.subscriptions=new e$1F,this.showsUpdated=new e$1F,this.materialSupport=void 0,this.asynchronous=!0,this.wrapS=j$13.CLAMP_TO_EDGE,this.wrapT=j$13.CLAMP_TO_EDGE,this.compressVertices=!0}l$s.prototype.onMaterialChanged=function(){this.invalidated=!0},l$s.prototype.isMaterial=function(e){var t=this.materialProperty,i=e.fillMaterialProperty,n=this.depthFailMaterialProperty,r=e.depthFailMaterialProperty;if(i===t&&r===n)return!0;var o=t$$(t)&&t.equals(i);return o=(!t$$(n)&&!t$$(r)||t$$(n)&&n.equals(r))&&o},l$s.prototype.add=function(e,t){var i=t.id;if(this.updaters.set(i,t),this.geometry.set(i,t.createFillGeometryInstance(e)),this.enuCenter=t$$(t._options)?t._options.enuCenter:void 0,t$$(this.enuCenter)&&(this.materialSupport=t$G.MaterialSupport.TEXTUREDMODEL),t$$(t.asynchronous)&&(this.asynchronous=t.asynchronous),t$$(t.wrapS)&&(this.wrapS=t.wrapS),t$$(t.wrapT)&&(this.wrapT=t.wrapT),t$$(t.compressVertices)&&(this.compressVertices=t.compressVertices),this.twoPasses=t.twoPasses,t.hasConstantFill&&t.fillMaterialProperty.isConstant&&r$w.isConstant(t.distanceDisplayConditionProperty)&&r$w.isConstant(t.terrainOffsetProperty)){var n=this;this.subscriptions.set(i,t.entity.definitionChanged.addEventListener((function(e,i,r,o){"isShowing"===i&&n.showsUpdated.set(t.id,t)})))}else this.updatersWithAttributes.set(i,t);this.createPrimitive=!0},l$s.prototype.remove=function(e){var t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);var i=this.subscriptions.get(t);return t$$(i)&&(i(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};var J$s=new e$1z;function c$u(e,t,i,n,r){this._items=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=i,this._closed=n,this._shadows=r}l$s.prototype.update=function(e){var t,i=!0,n=this.primitive,r=this.primitives,o=this.geometry.values;if(1===o.length&&null===o[0]&&(this.createPrimitive=!1),this.createPrimitive){if(o.length>0){var a;t$$(n)&&(t$$(this.oldPrimitive)?r.remove(n):this.oldPrimitive=n),this.material=t$D.getValue(e,this.materialProperty,this.material),this.material._wrapS=this.wrapS,this.material._wrapT=this.wrapT,t$$(this.depthFailMaterialProperty)&&(this.depthFailMaterial=t$D.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),a=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.depthFailMaterial.isTranslucent(),closed:this.closed})),n=new y$H({show:!1,asynchronous:this.asynchronous,geometryInstances:o,appearance:new this.appearanceType({material:this.material,translucent:this.material.isTranslucent(),closed:this.closed,materialSupport:this.materialSupport}),depthFailAppearance:a,shadows:this.shadows,updateBoundingSphere:!t$$(this.enuCenter),modelMatrix:t$$(this.enuCenter)?m$13.eastNorthUpToFixedFrame(this.enuCenter,n$1c.WGS84,new c$1a):void 0,twoPasses:this.twoPasses,compressVertices:this.compressVertices}),r.add(n),i=!1}else{t$$(n)&&(r.remove(n),n=void 0);var s=this.oldPrimitive;t$$(s)&&(r.remove(s),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(t$$(n)&&n.ready){n.show=!0,t$$(this.oldPrimitive)&&(r.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=t$D.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material,t$$(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof t$F)&&(this.depthFailMaterial=t$D.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);var l=this.updatersWithAttributes.values,u=l.length;for(t=0;t<u;t++){var c=l[t],h=c.entity,d=this.geometry.get(c.id),f=this.attributes.get(d.id.id);if(t$$(f)||(f=n.getGeometryInstanceAttributes(d.id),this.attributes.set(d.id.id,f)),t$$(this.depthFailAppearanceType)&&this.depthFailMaterialProperty instanceof t$F&&!c.depthFailMaterialProperty.isConstant){var p=c.depthFailMaterialProperty.color,_=r$w.getValueOrDefault(p,e,e$1z.WHITE,J$s);e$1z.equals(f._lastDepthFailColor,_)||(f._lastDepthFailColor=e$1z.clone(_,f._lastDepthFailColor),f.depthFailColor=r$I.toValue(_,f.depthFailColor))}var m=h.isShowing&&(c.hasConstantFill||c.isFilled(e));m!==(1===f.show[0])&&(f.show=e$18.toValue(m,f.show));var $=c.distanceDisplayConditionProperty;if(!r$w.isConstant($)){var g=r$w.getValueOrDefault($,e,Z$s,X$l);e$1w.equals(g,f._lastDistanceDisplayCondition)||(f._lastDistanceDisplayCondition=e$1w.clone(g,f._lastDistanceDisplayCondition),f.distanceDisplayCondition=n$Z.toValue(g,f.distanceDisplayCondition))}var y=c.terrainOffsetProperty;if(!r$w.isConstant(y)){var v=r$w.getValueOrDefault(y,e,j$q,z$p);a$11.equals(v,f._lastOffset)||(f._lastOffset=a$11.clone(v,f._lastOffset),f.offset=o$N.toValue(v,f.offset))}}this.updateShows(n)}else t$$(n)&&!n.ready&&(i=!1);return i},l$s.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=r.entity,a=this.geometry.get(r.id),s=this.attributes.get(a.id.id);t$$(s)||(s=e.getGeometryInstanceAttributes(a.id),this.attributes.set(a.id.id,s));var l=o.isShowing;l!==(1===s.show[0])&&(s.show=e$18.toValue(l,s.show),a.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()},l$s.prototype.contains=function(e){return this.updaters.contains(e.id)},l$s.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!t$$(i)||!i.ready)return A$T.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!t$$(n)||!t$$(n.boundingSphere)||t$$(n.show)&&0===n.show[0]?A$T.FAILED:(n.boundingSphere.clone(t),A$T.DONE)},l$s.prototype.destroy=function(){var e=this.primitive,t=this.primitives;t$$(e)&&t.remove(e);var i=this.oldPrimitive;t$$(i)&&t.remove(i),this.removeMaterialSubscription()},c$u.prototype.add=function(e,t){var i=this._items,n=i.length;if(t instanceof s$p&&t$$(t.entity._polylineVolume.enuCenter))if(0===i.length){(a=new l$s(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows)).add(e,t),a.enuCenter=t.entity._polylineVolume.enuCenter._value,i.push(a)}else{for(var r=0;r<n;r++){var o=i[r];if(a$11.equals(o.enuCenter,t.entity._polylineVolume.enuCenter._value))return void o.add(e,t)}(a=new l$s(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows)).add(e,t),a.enuCenter=t.entity._polylineVolume.enuCenter._value,i.push(a)}else{for(r=0;r<n;r++){if((o=i[r]).isMaterial(t))return void o.add(e,t)}var a;(a=new l$s(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows)).add(e,t),i.push(a)}},c$u.prototype.remove=function(e){for(var t=this._items,i=t.length-1;i>=0;i--){var n=t[i];if(n.remove(e)){0===n.updaters.length&&(t.splice(i,1),n.destroy());break}}},c$u.prototype.update=function(e){var t,i=this._items;for(t=i.length-1;t>=0;t--){var n=i[t];if(n.invalidated){i.splice(t,1);for(var r=n.updaters.values,o=r.length,a=0;a<o;a++)this.add(e,r[a]);n.destroy()}}var s=!0;for(t=0;t<i.length;t++)s=i[t].update(e)&&s;return s},c$u.prototype.getBoundingSphere=function(e,t){for(var i=this._items,n=i.length,r=0;r<n;r++){var o=i[r];if(o.contains(e))return o.getBoundingSphere(e,t)}return A$T.FAILED},c$u.prototype.removeAllPrimitives=function(){for(var e=this._items,t=e.length,i=0;i<t;i++)e[i].destroy();this._items.length=0};var x$x=new e$1z,U$v=new e$1w,W$x=new e$1w;function p$u(e,t,i,n){this.primitives=e,this.zIndex=n,this.classificationType=t,this.color=i,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1F,this.updaters=new e$1F,this.updatersWithAttributes=new e$1F,this.attributes=new e$1F,this.subscriptions=new e$1F,this.showsUpdated=new e$1F,this.itemsToRemove=[],this.isDirty=!1,this.rectangleCollisionCheck=new o$K}function c$t(e,t){this._batches=[],this._primitives=e,this._classificationType=t}p$u.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)},p$u.prototype.add=function(e,t){var i=e.id;if(this.createPrimitive=!0,this.geometry.set(i,t),this.updaters.set(i,e),this.rectangleCollisionCheck.insert(i,t.geometry.rectangle),e.hasConstantFill&&e.fillMaterialProperty.isConstant&&r$w.isConstant(e.distanceDisplayConditionProperty)){var n=this;this.subscriptions.set(i,e.entity.definitionChanged.addEventListener((function(t,i,r,o){"isShowing"===i&&n.showsUpdated.set(e.id,e)})))}else this.updatersWithAttributes.set(i,e)},p$u.prototype.remove=function(e){var t=e.id,i=this.geometry.get(t);if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.rectangleCollisionCheck.remove(t,i.geometry.rectangle),this.updatersWithAttributes.remove(t);var n=this.subscriptions.get(t);return t$$(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1},p$u.prototype.update=function(e){var t,i=!0,n=this.primitive,r=this.primitives;if(this.createPrimitive){var o=this.geometry.values;if(o.length>0)t$$(n)&&(t$$(this.oldPrimitive)?r.remove(n):this.oldPrimitive=n),n=new f$J({show:!1,asynchronous:!0,geometryInstances:o.slice(),classificationType:this.classificationType}),r.add(n,this.zIndex),i=!1;else{t$$(n)&&(r.remove(n),n=void 0);var a=this.oldPrimitive;t$$(a)&&(r.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(t$$(n)&&n.ready){n.show=!0,t$$(this.oldPrimitive)&&(r.remove(this.oldPrimitive),this.oldPrimitive=void 0);var s=this.updatersWithAttributes.values,l=s.length,u=this.waitingOnCreate;for(t=0;t<l;t++){var c=s[t],h=this.geometry.get(c.id),d=this.attributes.get(h.id.id);if(t$$(d)||(d=n.getGeometryInstanceAttributes(h.id),this.attributes.set(h.id.id,d)),!c.fillMaterialProperty.isConstant||u){var f=c.fillMaterialProperty.color,p=r$w.getValueOrDefault(f,e,e$1z.WHITE,x$x);e$1z.equals(d._lastColor,p)||(d._lastColor=e$1z.clone(p,d._lastColor),d.color=r$I.toValue(p,d.color))}var _=c.entity.isShowing&&(c.hasConstantFill||c.isFilled(e));_!==(1===d.show[0])&&(d.show=e$18.toValue(_,d.show));var m=c.distanceDisplayConditionProperty;if(!r$w.isConstant(m)){var $=r$w.getValueOrDefault(m,e,W$x,U$v);e$1w.equals($,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=e$1w.clone($,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=n$Z.toValue($,d.distanceDisplayCondition))}}this.updateShows(n),this.waitingOnCreate=!1}else t$$(n)&&!n.ready&&(i=!1);return this.itemsToRemove.length=0,i},p$u.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=this.geometry.get(r.id),a=this.attributes.get(o.id.id);t$$(a)||(a=e.getGeometryInstanceAttributes(o.id),this.attributes.set(o.id.id,a));var s=r.entity.isShowing;s!==(1===a.show[0])&&(a.show=e$18.toValue(s,a.show),o.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()},p$u.prototype.contains=function(e){return this.updaters.contains(e.id)},p$u.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return A$T.PENDING;var n=i.getBoundingSphere(e.entity);return t$$(n)?(n.clone(t),A$T.DONE):A$T.FAILED},p$u.prototype.removeAllPrimitives=function(){var e=this.primitives,t=this.primitive;t$$(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());var i=this.oldPrimitive;t$$(i)&&(e.remove(i),this.oldPrimitive=void 0)},c$t.prototype.add=function(e,t){for(var i,n=t.createFillGeometryInstance(e),r=this._batches,o=r$w.getValueOrDefault(t.zIndex,0),a=r.length,s=0;s<a;++s){var l=r[s];if(l.zIndex===o&&!l.overlapping(n.geometry.rectangle)){i=l;break}}return t$$(i)||(i=new p$u(this._primitives,this._classificationType,n.attributes.color.value,o),r.push(i)),i.add(t,n),i},c$t.prototype.remove=function(e){for(var t=this._batches,i=t.length,n=0;n<i;++n)if(t[n].remove(e))return},c$t.prototype.update=function(e){var t,i,n=!0,r=this._batches,o=r.length;for(t=0;t<o;++t)n=r[t].update(e)&&n;for(t=0;t<o;++t)for(var a=r[t],s=a.itemsToRemove,l=s.length,u=0;u<l;u++){i=s[u],a.remove(i);var c=this.add(e,i);a.isDirty=!0,c.isDirty=!0}for(t=o-1;t>=0;--t){var h=r[t];h.isDirty&&(n=r[t].update(e)&&n,h.isDirty=!1),0===h.geometry.length&&r.splice(t,1)}return n},c$t.prototype.getBoundingSphere=function(e,t){for(var i=this._batches,n=i.length,r=0;r<n;++r){var o=i[r];if(o.contains(e))return o.getBoundingSphere(e,t)}return A$T.FAILED},c$t.prototype.removeAllPrimitives=function(){for(var e=this._batches,t=e.length,i=0;i<t;++i)e[i].removeAllPrimitives()};var E$w=new e$1w,F$r=new e$1w;function l$r(e,t,i,n,r,o){this.primitives=e,this.classificationType=t,this.appearanceType=i,this.materialProperty=n,this.updaters=new e$1F,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1F,this.material=void 0,this.updatersWithAttributes=new e$1F,this.attributes=new e$1F,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(l$r.prototype.onMaterialChanged,this),this.subscriptions=new e$1F,this.showsUpdated=new e$1F,this.usingSphericalTextureCoordinates=r,this.zIndex=o,this.rectangleCollisionCheck=new o$K}function u$t(e,t,i){this._items=[],this._primitives=e,this._classificationType=t,this._appearanceType=i}l$r.prototype.onMaterialChanged=function(){this.invalidated=!0},l$r.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)},l$r.prototype.isMaterial=function(e){var t=this.materialProperty,i=e.fillMaterialProperty;return i===t||i instanceof t$F&&t instanceof t$F||t$$(t)&&t.equals(i)},l$r.prototype.add=function(e,t,i){var n=t.id;if(this.updaters.set(n,t),this.geometry.set(n,i),this.rectangleCollisionCheck.insert(n,i.geometry.rectangle),t.hasConstantFill&&t.fillMaterialProperty.isConstant&&r$w.isConstant(t.distanceDisplayConditionProperty)){var r=this;this.subscriptions.set(n,t.entity.definitionChanged.addEventListener((function(e,i,n,o){"isShowing"===i&&r.showsUpdated.set(t.id,t)})))}else this.updatersWithAttributes.set(n,t);this.createPrimitive=!0},l$r.prototype.remove=function(e){var t=e.id,i=this.geometry.get(t);if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.rectangleCollisionCheck.remove(t,i.geometry.rectangle),this.updatersWithAttributes.remove(t);var n=this.subscriptions.get(t);return t$$(n)&&(n(),this.subscriptions.remove(t)),!0}return!1},l$r.prototype.update=function(e){var t,i=!0,n=this.primitive,r=this.primitives,o=this.geometry.values;if(this.createPrimitive){if(o.length>0)t$$(n)&&(t$$(this.oldPrimitive)?r.remove(n):this.oldPrimitive=n),this.material=t$D.getValue(e,this.materialProperty,this.material),n=new f$J({show:!1,asynchronous:!0,geometryInstances:o.slice(),appearance:new this.appearanceType({material:this.material}),classificationType:this.classificationType}),r.add(n,this.zIndex),i=!1;else{t$$(n)&&(r.remove(n),n=void 0);var a=this.oldPrimitive;t$$(a)&&(r.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(t$$(n)&&n.ready){n.show=!0,t$$(this.oldPrimitive)&&(r.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=t$D.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material;var s=this.updatersWithAttributes.values,l=s.length;for(t=0;t<l;t++){var u=s[t],c=u.entity,h=this.geometry.get(u.id),d=this.attributes.get(h.id.id);t$$(d)||(d=n.getGeometryInstanceAttributes(h.id),this.attributes.set(h.id.id,d));var f=c.isShowing&&(u.hasConstantFill||u.isFilled(e));f!==(1===d.show[0])&&(d.show=e$18.toValue(f,d.show));var p=u.distanceDisplayConditionProperty;if(!r$w.isConstant(p)){var _=r$w.getValueOrDefault(p,e,F$r,E$w);e$1w.equals(_,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=e$1w.clone(_,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=n$Z.toValue(_,d.distanceDisplayCondition))}}this.updateShows(n)}else t$$(n)&&!n.ready&&(i=!1);return i},l$r.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=r.entity,a=this.geometry.get(r.id),s=this.attributes.get(a.id.id);t$$(s)||(s=e.getGeometryInstanceAttributes(a.id),this.attributes.set(a.id.id,s));var l=o.isShowing;l!==(1===s.show[0])&&(s.show=e$18.toValue(l,s.show),a.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()},l$r.prototype.contains=function(e){return this.updaters.contains(e.id)},l$r.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return A$T.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!t$$(n)||!t$$(n.boundingSphere)||t$$(n.show)&&0===n.show[0]?A$T.FAILED:(n.boundingSphere.clone(t),A$T.DONE)},l$r.prototype.destroy=function(){var e=this.primitive,t=this.primitives;t$$(e)&&t.remove(e);var i=this.oldPrimitive;t$$(i)&&t.remove(i),this.removeMaterialSubscription()},u$t.prototype.add=function(e,t){for(var i=this._items,n=i.length,r=t.createFillGeometryInstance(e),o=T$L.shouldUseSphericalCoordinates(r.geometry.rectangle),a=r$w.getValueOrDefault(t.zIndex,0),s=0;s<n;++s){var l=i[s];if(l.isMaterial(t)&&l.usingSphericalTextureCoordinates===o&&l.zIndex===a&&!l.overlapping(r.geometry.rectangle))return void l.add(e,t,r)}var u=new l$r(this._primitives,this._classificationType,this._appearanceType,t.fillMaterialProperty,o,a);u.add(e,t,r),i.push(u)},u$t.prototype.remove=function(e){for(var t=this._items,i=t.length-1;i>=0;i--){var n=t[i];if(n.remove(e)){0===n.updaters.length&&(t.splice(i,1),n.destroy());break}}},u$t.prototype.update=function(e){var t,i=this._items;for(t=i.length-1;t>=0;t--){var n=i[t];if(n.invalidated){i.splice(t,1);for(var r=n.updaters.values,o=r.length,a=0;a<o;a++)this.add(e,r[a]);n.destroy()}}var s=!0;for(t=0;t<i.length;t++)s=i[t].update(e)&&s;return s},u$t.prototype.getBoundingSphere=function(e,t){for(var i=this._items,n=i.length,r=0;r<n;r++){var o=i[r];if(o.contains(e))return o.getBoundingSphere(e,t)}return A$T.FAILED},u$t.prototype.removeAllPrimitives=function(){for(var e=this._items,t=e.length,i=0;i<t;i++)e[i].destroy();this._items.length=0};var N$p=new e$1z,F$q=new e$1w,x$w=new e$1w,H$v=a$11.ZERO,Z$r=new a$11;function m$q(e,t,i,n){this.translucent=t,this.width=i,this.shadows=n,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1F,this.updaters=new e$1F,this.updatersWithAttributes=new e$1F,this.attributes=new e$1F,this.itemsToRemove=[],this.subscriptions=new e$1F,this.showsUpdated=new e$1F}function w$A(e,t,i){this._primitives=e,this._scene=t,this._shadows=i,this._solidBatches=new e$1F,this._translucentBatches=new e$1F}m$q.prototype.add=function(e,t){var i=e.id;if(this.createPrimitive=!0,this.geometry.set(i,t),this.updaters.set(i,e),e.hasConstantOutline&&e.outlineColorProperty.isConstant&&r$w.isConstant(e.distanceDisplayConditionProperty)&&r$w.isConstant(e.terrainOffsetProperty)){var n=this;this.subscriptions.set(i,e.entity.definitionChanged.addEventListener((function(t,i,r,o){"isShowing"===i&&n.showsUpdated.set(e.id,e)})))}else this.updatersWithAttributes.set(i,e)},m$q.prototype.remove=function(e){var t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);var i=this.subscriptions.get(t);return t$$(i)&&(i(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1},m$q.prototype.update=function(e){var t,i=!0,n=0,r=this.primitive,o=this.primitives;if(this.createPrimitive){var a=this.geometry.values;if(a.length>0)t$$(r)&&(t$$(this.oldPrimitive)?o.remove(r):this.oldPrimitive=r),r=new y$H({show:!1,asynchronous:!0,geometryInstances:a,appearance:new r$u({flat:!0,translucent:this.translucent,renderState:{lineWidth:this.width},hasSideness:t$$(this.outlineWidth)}),shadows:this.shadows}),t$$(this.outlineWidth)&&(r._outlineWidth=this.outlineWidth),o.add(r),i=!1;else{t$$(r)&&(o.remove(r),r=void 0);var s=this.oldPrimitive;t$$(s)&&(o.remove(s),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=r,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(t$$(r)&&r.ready){r.show=!0,t$$(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0);var l=this.updatersWithAttributes.values,u=l.length,c=this.waitingOnCreate;for(t=0;t<u;t++){var h=l[t],d=this.geometry.get(h.id),f=this.attributes.get(d.id.id);if(t$$(f)||(f=r.getGeometryInstanceAttributes(d.id),this.attributes.set(d.id.id,f)),!h.outlineColorProperty.isConstant||c){var p=h.outlineColorProperty,_=r$w.getValueOrDefault(p,e,e$1z.WHITE,N$p);e$1z.equals(f._lastColor,_)||(f._lastColor=e$1z.clone(_,f._lastColor),f.color=r$I.toValue(_,f.color),(this.translucent&&255===f.color[3]||!this.translucent&&255!==f.color[3])&&(this.itemsToRemove[n++]=h))}var m=h.entity.isShowing&&(h.hasConstantOutline||h.isOutlineVisible(e));m!==(1===f.show[0])&&(f.show=e$18.toValue(m,f.show));var $=h.distanceDisplayConditionProperty;if(!r$w.isConstant($)){var g=r$w.getValueOrDefault($,e,x$w,F$q);e$1w.equals(g,f._lastDistanceDisplayCondition)||(f._lastDistanceDisplayCondition=e$1w.clone(g,f._lastDistanceDisplayCondition),f.distanceDisplayCondition=n$Z.toValue(g,f.distanceDisplayCondition))}var y=h.terrainOffsetProperty;if(!r$w.isConstant(y)){var v=r$w.getValueOrDefault(y,e,H$v,Z$r);a$11.equals(v,f._lastOffset)||(f._lastOffset=a$11.clone(v,f._lastOffset),f.offset=o$N.toValue(v,f.offset))}}this.updateShows(r),this.waitingOnCreate=!1}else t$$(r)&&!r.ready&&(i=!1);return this.itemsToRemove.length=n,i},m$q.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=this.geometry.get(r.id),a=this.attributes.get(o.id.id);t$$(a)||(a=e.getGeometryInstanceAttributes(o.id),this.attributes.set(o.id.id,a));var s=r.entity.isShowing;s!==(1===a.show[0])&&(a.show=e$18.toValue(s,a.show),o.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()},m$q.prototype.contains=function(e){return this.updaters.contains(e.id)},m$q.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return A$T.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!t$$(n)||!t$$(n.boundingSphere)||t$$(n.show)&&0===n.show[0]?A$T.FAILED:(n.boundingSphere.clone(t),A$T.DONE)},m$q.prototype.removeAllPrimitives=function(){var e=this.primitives,t=this.primitive;t$$(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());var i=this.oldPrimitive;t$$(i)&&(e.remove(i),this.oldPrimitive=void 0)},w$A.prototype.add=function(e,t){var i=t.createOutlineGeometryInstance(e);if(t$$(i)){var n,r,o,a=this._scene.clampLineWidth(t.outlineWidth);if(255===i.attributes.color.value[3])n=this._solidBatches,t instanceof l$v?(o=t.outlineWidth,r=n.get(o)):r=n.get(a),t$$(r)||(r=new m$q(this._primitives,!1,a,this._shadows),t$$(o)?(n.set(o,r),r.outlineWidth=o):n.set(a,r)),r.add(t,i);else n=this._translucentBatches,t instanceof l$v?(o=t.outlineWidth,r=n.get(o)):r=n.get(a),t$$(r)||(r=new m$q(this._primitives,!0,a,this._shadows),n.set(a,r),t$$(o)&&(r.outlineWidth=o)),r.add(t,i)}},w$A.prototype.remove=function(e){var t,i=this._solidBatches.values,n=i.length;for(t=0;t<n;t++)if(i[t].remove(e))return;var r=this._translucentBatches.values,o=r.length;for(t=0;t<o;t++)if(r[t].remove(e))return},w$A.prototype.update=function(e){var t,i,n,r,o,a=this._solidBatches.values,s=a.length,l=this._translucentBatches.values,u=l.length,c=!0,h=!1;do{for(h=!1,i=0;i<s;i++){c=(r=a[i]).update(e);var d=(o=r.itemsToRemove).length;if(d>0)for(h=!0,t=0;t<d;t++)n=o[t],r.remove(n),this.add(e,n)}for(i=0;i<u;i++){c=(r=l[i]).update(e);var f=(o=r.itemsToRemove).length;if(f>0)for(h=!0,t=0;t<f;t++)n=o[t],r.remove(n),this.add(e,n)}}while(h);return c},w$A.prototype.getBoundingSphere=function(e,t){var i,n=this._solidBatches.values,r=n.length;for(i=0;i<r;i++){var o=n[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 A$T.FAILED},w$A.prototype.removeAllPrimitives=function(){var e,t=this._solidBatches.values,i=t.length;for(e=0;e<i;e++)t[e].removeAllPrimitives();var n=this._translucentBatches.values,r=n.length;for(e=0;e<r;e++)n[e].removeAllPrimitives()};var M$w=new e$1z;function D$y(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.minimumHeights=void 0,this.maximumHeights=void 0,this.granularity=void 0,this.enuCenter=void 0}function n$x(e,t){i$J.call(this,{entity:e,scene:t,geometryOptions:new D$y(e),geometryPropertyName:"wall",observedPropertyNames:["availability","wall"]}),this._onEntityPropertyChanged(e,"wall",e.wall,void 0)}function p$t(e,t,i){a$B.call(this,e,t,i)}t$$(Object.create)&&(n$x.prototype=Object.create(i$J.prototype),n$x.prototype.constructor=n$x),n$x.prototype.createFillGeometryInstance=function(e){if(n$1e.defined("time",e),!this._fillEnabled)throw new t$_("This instance does not represent a filled geometry.");var t,i,n=this._entity,r=n.isAvailable(e),o=new e$18(r&&n.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e),s=n$Z.fromDistanceDisplayCondition(a);this._materialProperty instanceof t$F?(t$$(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(i=this._materialProperty.color.getValue(e,M$w)),t$$(i)||(i=e$1z.WHITE),t={show:o,distanceDisplayCondition:s,color:r$I.fromColor(i)}):t={show:o,distanceDisplayCondition:s};return new m$P({id:n,geometry:new H$M(this._options),attributes:t})},n$x.prototype.createOutlineGeometryInstance=function(e){if(n$1e.defined("time",e),!this._outlineEnabled)throw new t$_("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$w.getValueOrDefault(this._outlineColorProperty,e,e$1z.BLACK,M$w),r=this._distanceDisplayConditionProperty.getValue(e);return new m$P({id:t,geometry:new d$K(this._options),attributes:{show:new e$18(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:r$I.fromColor(n),distanceDisplayCondition:n$Z.fromDistanceDisplayCondition(r)}})},n$x.prototype._isHidden=function(e,t){return!t$$(t.positions)||i$J.prototype._isHidden.call(this,e,t)},n$x.prototype._getIsClosed=function(e){return!1},n$x.prototype._isDynamic=function(e,t){return!(t.positions.isConstant&&r$w.isConstant(t.minimumHeights)&&r$w.isConstant(t.maximumHeights)&&r$w.isConstant(t.outlineWidth)&&r$w.isConstant(t.granularity))},n$x.prototype._setStaticOptions=function(e,t){var i=t.minimumHeights,n=t.maximumHeights,r=t.granularity,o=this._materialProperty instanceof t$F,a=t.enuCenter,s=this._options;s.vertexFormat=o?r$u.VERTEX_FORMAT:t$G.MaterialSupport.TEXTURED.vertexFormat,s.positions=t.positions.getValue(f$S.MINIMUM_VALUE,s.positions),s.minimumHeights=t$$(i)?i.getValue(f$S.MINIMUM_VALUE,s.minimumHeights):void 0,s.maximumHeights=t$$(n)?n.getValue(f$S.MINIMUM_VALUE,s.maximumHeights):void 0,s.granularity=t$$(r)?r.getValue(f$S.MINIMUM_VALUE):void 0,s.enuCenter=t$$(a)?a.getValue(f$S.MINIMUM_VALUE):void 0},n$x.DynamicGeometryUpdater=p$t,t$$(Object.create)&&(p$t.prototype=Object.create(a$B.prototype),p$t.prototype.constructor=p$t),p$t.prototype._isHidden=function(e,t,i){return!t$$(this._options.positions)||a$B.prototype._isHidden.call(this,e,t,i)},p$t.prototype._setOptions=function(e,t,i){var n=this._options;n.positions=r$w.getValueOrUndefined(t.positions,i,n.positions),n.minimumHeights=r$w.getValueOrUndefined(t.minimumHeights,i,n.minimumHeights),n.maximumHeights=r$w.getValueOrUndefined(t.maximumHeights,i,n.maximumHeights),n.granularity=r$w.getValueOrUndefined(t.granularity,i)};var ee$k=[],I$z=[i$I,s$t,p$C,l$v,l$u,p$v,d$t,s$p,m$r,n$x,m$u];function u$s(e,t){this.entity=e,this.scene=t;var i=new Array(I$z.length),n=new o$15;function r(e){n.raiseEvent(e)}for(var o=new n$W,a=0;a<i.length;a++){var s=new I$z[a](e,t);o.add(s.geometryChanged,r),i[a]=s}this.updaters=i,this.geometryChanged=n,this.eventHelper=o,this._removeEntitySubscription=e.definitionChanged.addEventListener(u$s.prototype._onEntityPropertyChanged,this)}function c$s(e,t,i,n){n$1e.defined("scene",e),n$1e.defined("entityCollection",t),i=e$1Y(i,e.primitives),n=e$1Y(n,e.groundPrimitives),this._scene=e,this._primitives=i,this._groundPrimitives=n,this._entityCollection=void 0,this._addedObjects=new e$1F,this._removedObjects=new e$1F,this._changedObjects=new e$1F;var r=q$Q.NUMBER_OF_SHADOW_MODES;this._outlineBatches=new Array(2*r),this._closedColorBatches=new Array(2*r),this._closedMaterialBatches=new Array(2*r),this._openColorBatches=new Array(2*r),this._openMaterialBatches=new Array(2*r);var o,a=l$J.supportsMaterialsforEntitiesOnTerrain(e);for(this._supportsMaterialsforEntitiesOnTerrain=a,o=0;o<r;++o)this._outlineBatches[o]=new w$A(i,e,o,!1),this._outlineBatches[r+o]=new w$A(i,e,o,!0),this._closedColorBatches[o]=new y$x(i,r$u,void 0,!0,o,!0),this._closedColorBatches[r+o]=new y$x(i,r$u,void 0,!0,o,!1),this._closedMaterialBatches[o]=new c$u(i,t$G,void 0,!0,o,!0),this._closedMaterialBatches[r+o]=new c$u(i,t$G,void 0,!0,o,!1),this._openColorBatches[o]=new y$x(i,r$u,void 0,!1,o,!0),this._openColorBatches[r+o]=new y$x(i,r$u,void 0,!1,o,!1),this._openMaterialBatches[o]=new c$u(i,t$G,void 0,!1,o,!0),this._openMaterialBatches[r+o]=new c$u(i,t$G,void 0,!1,o,!1);var s=_0x29401c.NUMBER_OF_CLASSIFICATION_TYPES,l=new Array(s),u=[];if(a)for(o=0;o<s;++o)u.push(new u$t(n,o,t$G)),l[o]=new c$t(n,o);else for(o=0;o<s;++o)l[o]=new c$t(n,o);this._groundColorBatches=l,this._groundMaterialBatches=u,this._dynamicBatch=new r$k(i,n),this._batches=this._outlineBatches.concat(this._closedColorBatches,this._closedMaterialBatches,this._openColorBatches,this._openMaterialBatches,this._groundColorBatches,this._groundMaterialBatches,this._dynamicBatch),this._subscriptions=new e$1F,this._updaterSets=new e$1F,this._entityCollection=t,t.collectionChanged.addEventListener(c$s.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,ee$k)}u$s.prototype._onEntityPropertyChanged=function(e,t,i,n){for(var r=this.updaters,o=0;o<r.length;o++)r[o]._onEntityPropertyChanged(e,t,i,n)},u$s.prototype.forEach=function(e){for(var t=this.updaters,i=0;i<t.length;i++)e(t[i])},u$s.prototype.destroy=function(){this.eventHelper.removeAll();for(var e=this.updaters,t=0;t<e.length;t++)e[t].destroy();this._removeEntitySubscription(),s$1e(this)},c$s.prototype.update=function(e){n$1e.defined("time",e);var t,i,n,r,o=this._addedObjects,a=o.values,s=this._removedObjects,l=s.values,u=this._changedObjects,c=u.values,h=this;for(t=c.length-1;t>-1;t--)n=(i=c[t]).id,(r=this._updaterSets.get(n)).entity===i?r.forEach((function(t){h._removeUpdater(t),h._insertUpdaterIntoBatch(e,t)})):(l.push(i),a.push(i));for(t=l.length-1;t>-1;t--)if(n=(i=l[t]).id,t$$(r=this._updaterSets.get(n))&&(r.forEach(this._removeUpdater.bind(this)),r.destroy(),this._updaterSets.remove(n),this._subscriptions.get(n)(),this._subscriptions.remove(n),i.children.length>0))for(var d=0;d<i.children.length;d++){n=(f=i.children[d]).id,t$$(r=this._updaterSets.get(n))&&(r.forEach(this._removeUpdater.bind(this)),r.destroy(),this._updaterSets.remove(n),this._subscriptions.get(n)(),this._subscriptions.remove(n))}for(t=a.length-1;t>-1;t--)if(n=(i=a[t]).id,r=new u$s(i,this._scene),this._updaterSets.set(n,r),r.forEach((function(t){h._insertUpdaterIntoBatch(e,t)})),this._subscriptions.set(n,r.geometryChanged.addEventListener(c$s._onGeometryChanged,this)),i.children.length>0)for(d=0;d<i.children.length;d++){var f=i.children[d];i.entityCollection.contains(f)||(n=f.id,r=new u$s(f,this._scene),this._updaterSets.set(n,r),r.forEach((function(t){h._insertUpdaterIntoBatch(e,t)})),this._subscriptions.set(n,r.geometryChanged.addEventListener(c$s._onGeometryChanged,this)))}o.removeAll(),s.removeAll(),u.removeAll();var p=!0,_=this._batches,m=_.length;for(t=0;t<m;t++)p=_[t].update(e)&&p;return p};var te$j=[],re$i=new c$19;c$s.prototype.getBoundingSphere=function(e,t){n$1e.defined("entity",e),n$1e.defined("result",t);for(var i=te$j,n=re$i,r=0,o=A$T.DONE,a=this._batches,s=a.length,l=e.id,u=this._updaterSets.get(l).updaters,c=0;c<u.length;c++)for(var h=u[c],d=0;d<s;d++){if((o=a[d].getBoundingSphere(h,n))===A$T.PENDING)return A$T.PENDING;o===A$T.DONE&&(i[r]=c$19.clone(n,i[r]),r++)}return 0===r?A$T.FAILED:(i.length=r,c$19.fromBoundingSpheres(i,t),A$T.DONE)},c$s.prototype.isDestroyed=function(){return!1},c$s.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(c$s.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();var e,t=this._batches,i=t.length;for(e=0;e<i;e++)t[e].removeAllPrimitives();var n=this._subscriptions.values;for(i=n.length,e=0;e<i;e++)n[e]();this._subscriptions.removeAll();var r=this._updaterSets.values;for(i=r.length,e=0;e<i;e++)r[e].destroy();return this._updaterSets.removeAll(),s$1e(this)},c$s.prototype._removeUpdater=function(e){for(var t=this._batches,i=t.length,n=0;n<i;n++)t[n].remove(e)},c$s.prototype._insertUpdaterIntoBatch=function(e,t){if(t.isDynamic)this._dynamicBatch.add(e,t);else{var i;(t.outlineEnabled||t.fillEnabled)&&(i=t.shadowsProperty.getValue(e));var n=q$Q.NUMBER_OF_SHADOW_MODES;if(t.outlineEnabled&&(t$$(t.terrainOffsetProperty)?this._outlineBatches[n+i].add(e,t):this._outlineBatches[i].add(e,t)),t.fillEnabled)if(t.onTerrain){var r=t.classificationTypeProperty.getValue(e);t.fillMaterialProperty instanceof t$F?this._groundColorBatches[r].add(e,t):this._groundMaterialBatches[r].add(e,t)}else t.isClosed?t.fillMaterialProperty instanceof t$F?t$$(t.terrainOffsetProperty)?this._closedColorBatches[n+i].add(e,t):this._closedColorBatches[i].add(e,t):t$$(t.terrainOffsetProperty)?this._closedMaterialBatches[n+i].add(e,t):this._closedMaterialBatches[i].add(e,t):t.fillMaterialProperty instanceof t$F?t$$(t.terrainOffsetProperty)?this._openColorBatches[n+i].add(e,t):this._openColorBatches[i].add(e,t):t$$(t.terrainOffsetProperty)?this._openMaterialBatches[n+i].add(e,t):this._openMaterialBatches[i].add(e,t)}},c$s._onGeometryChanged=function(e){var t=this._removedObjects,i=this._changedObjects,n=e.entity,r=n.id;!t$$(t.get(r))&&!t$$(i.get(r))&&i.set(r,n)},c$s.prototype._onCollectionChanged=function(e,t,i){var n,r,o,a=this._addedObjects,s=this._removedObjects,l=this._changedObjects;for(n=i.length-1;n>-1;n--)r=(o=i[n]).id,a.remove(r)||(s.set(r,o),l.remove(r));for(n=t.length-1;n>-1;n--)r=(o=t[n]).id,s.remove(r)?l.set(r,o):a.set(r,o)};var q$t=1,N$o="30px sans-serif",T$z=z$t.FILL,S$o=e$1z.WHITE,A$y=e$1z.BLACK,I$y=1,P$l=!1,W$w=new e$1z(.165,.165,.165,.8),z$o=new r$T(7,5),F$p=r$T.ZERO,Z$q=a$11.ZERO,H$u=U$Y.NONE,K$n=N$W.CENTER,j$p=j$10.CENTER,G$u=new a$11,J$r=new e$1z,M$v=new e$1z,Q$o=new e$1z,X$k=new r$T,Y$u=new a$11,$$q=new r$T,ee$j=new u$W,te$i=new u$W,ie$h=new u$W,ne$g=new e$1w;function V$n(e){this.entity=e,this.label=void 0,this.index=void 0}function d$s(e,t){if(!t$$(e))throw new t$_("entityCluster is required.");if(!t$$(t))throw new t$_("entityCollection is required.");t.collectionChanged.addEventListener(d$s.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new e$1F,this._onCollectionChanged(t,t.values,[],[])}function y$w(e,t,i){t$$(e)&&(e.label=void 0,i.removeLabel(t))}d$s.prototype.update=function(e){if(!t$$(e))throw new t$_("time is required.");for(var t=this._items.values,i=this._cluster,n=0,r=t.length;n<r;n++){var o,a,s=t[n],l=s.entity,u=l._label,c=s.label,h=l.isShowing&&l.isAvailable(e)&&r$w.getValueOrDefault(u._show,e,!0);if(h&&(a=r$w.getValueOrUndefined(l._position,e,G$u),o=r$w.getValueOrUndefined(u._text,e),h=t$$(a)&&t$$(o)),h){r$w.isConstant(l._position)||(i._clusterDirty=!0);var d=!1,f=r$w.getValueOrDefault(u._heightReference,e,H$u);t$$(c)||((c=i.getLabel(l)).id=l,s.label=c,d=a$11.equals(c.position,a)&&c.heightReference===f),c.show=!0,c.position=a,c.text=o,c.scale=r$w.getValueOrDefault(u._scale,e,q$t),c.font=r$w.getValueOrDefault(u._font,e,N$o),c.style=r$w.getValueOrDefault(u._style,e,T$z),c.fillColor=r$w.getValueOrDefault(u._fillColor,e,S$o,J$r),c.outlineColor=r$w.getValueOrDefault(u._outlineColor,e,A$y,M$v),c.outlineWidth=r$w.getValueOrDefault(u._outlineWidth,e,I$y),c.showBackground=r$w.getValueOrDefault(u._showBackground,e,P$l),c.backgroundColor=r$w.getValueOrDefault(u._backgroundColor,e,W$w,Q$o),c.backgroundPadding=r$w.getValueOrDefault(u._backgroundPadding,e,z$o,X$k),c.pixelOffset=r$w.getValueOrDefault(u._pixelOffset,e,F$p,$$q),c.eyeOffset=r$w.getValueOrDefault(u._eyeOffset,e,Z$q,Y$u),c.heightReference=f,c.horizontalOrigin=r$w.getValueOrDefault(u._horizontalOrigin,e,K$n),c.verticalOrigin=r$w.getValueOrDefault(u._verticalOrigin,e,j$p),c.translucencyByDistance=r$w.getValueOrUndefined(u._translucencyByDistance,e,ee$j),c.pixelOffsetScaleByDistance=r$w.getValueOrUndefined(u._pixelOffsetScaleByDistance,e,te$i),c.scaleByDistance=r$w.getValueOrUndefined(u._scaleByDistance,e,ie$h),c.distanceDisplayCondition=r$w.getValueOrUndefined(u._distanceDisplayCondition,e,ne$g),c.disableDepthTestDistance=r$w.getValueOrUndefined(u._disableDepthTestDistance,e),d&&c._updateClamping()}else y$w(s,l,i)}return!0},d$s.prototype.getBoundingSphere=function(e,t){if(!t$$(e))throw new t$_("entity is required.");if(!t$$(t))throw new t$_("result is required.");var i=this._items.get(e.id);if(!t$$(i)||!t$$(i.label))return A$T.FAILED;var n=i.label;return t.center=a$11.clone(e$1Y(n._clampedPosition,n.position),t.center),t.radius=0,A$T.DONE},d$s.prototype.isDestroyed=function(){return!1},d$s.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(d$s.prototype._onCollectionChanged,this);for(var e=this._entityCollection.values,t=0;t<e.length;t++)this._cluster.removeLabel(e[t]);return s$1e(this)},d$s.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a=this._items,s=this._cluster;for(r=t.length-1;r>-1;r--)t$$((o=t[r])._label)&&t$$(o._position)&&a.set(o.id,new V$n(o));for(r=n.length-1;r>-1;r--)t$$((o=n[r])._label)&&t$$(o._position)?a.contains(o.id)||a.set(o.id,new V$n(o)):(y$w(a.get(o.id),o,s),a.remove(o.id));for(r=i.length-1;r>-1;r--)o=i[r],y$w(a.get(o.id),o,s),a.remove(o.id)};var G$t=1,b$D=0,j$o=!0,k$t=!0,W$v=q$Q.ENABLED,J$q=U$Y.NONE,K$m=e$1z.RED,Q$n=0,X$j=e$1z.WHITE,Y$t=I$J.HIGHLIGHT,Z$p=.5,$$p=new r$T(1,1),ee$i=new c$1a,ie$g=new c$1a;function h$w(e,t){if(!t$$(e))throw new t$_("scene is required.");if(!t$$(t))throw new t$_("entityCollection is required.");t.collectionChanged.addEventListener(h$w.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._modelHash={},this._entitiesToVisualize=new e$1F,this._onCollectionChanged(t,t.values,[],[])}function x$v(e,t,i,n){var r=i[t.id];t$$(r)&&(n.removeAndDestroy(r.modelPrimitive),delete i[t.id])}function oe$h(e,t){var i=t[e.id];t$$(i)&&(i.nodeTransformationsScratch={})}function te$h(e,t,i){e.readyPromise.otherwise((function(e){console.error(e),i[t.id].loadFail=!0}))}function i$u(e){this._definitionChanged=new o$15,this._value=void 0,this._removeSubscription=void 0,this.setValue(e)}h$w.prototype.update=function(e){if(!t$$(e))throw new t$_("time is required.");for(var t=this._entitiesToVisualize.values,i=this._modelHash,n=this._primitives,r=0,o=t.length;r<o;r++){var a,s,l=t[r],u=l._model,c=i[l.id],h=l.isShowing&&l.isAvailable(e)&&r$w.getValueOrDefault(u._show,e,!0);if(h&&(s=l.computeModelMatrix(e,ee$i),a=t$X.createIfNeeded(r$w.getValueOrUndefined(u._uri,e)),h=t$$(s)&&t$$(a)),h){var d=t$$(c)?c.modelPrimitive:void 0;if((!t$$(d)||a.url!==c.url)&&(t$$(d)&&(n.removeAndDestroy(d),delete i[l.id]),(d=L$D.fromGltf({url:a,incrementallyLoadTextures:r$w.getValueOrDefault(u._incrementallyLoadTextures,e,j$o),scene:this._scene})).id=l,n.add(d),c={modelPrimitive:d,url:a.url,animationsRunning:!1,nodeTransformationsScratch:{},originalNodeMatrixHash:{},loadFail:!1},i[l.id]=c,te$h(d,l,i)),d.show=!0,d.scale=r$w.getValueOrDefault(u._scale,e,G$t),d._offsetMatrix=u._offsetMatrix,d.minimumPixelSize=r$w.getValueOrDefault(u._minimumPixelSize,e,b$D),d.maximumScale=r$w.getValueOrUndefined(u._maximumScale,e),d.modelMatrix=c$1a.clone(s,d.modelMatrix),d.shadows=r$w.getValueOrDefault(u._shadows,e,W$v),d.heightReference=r$w.getValueOrDefault(u._heightReference,e,J$q),d.distanceDisplayCondition=r$w.getValueOrUndefined(u._distanceDisplayCondition,e),d.silhouetteColor=r$w.getValueOrDefault(u._silhouetteColor,e,K$m,d._silhouetteColor),d.silhouetteSize=r$w.getValueOrDefault(u._silhouetteSize,e,Q$n),d.color=r$w.getValueOrDefault(u._color,e,X$j,d._color),d.colorBlendMode=r$w.getValueOrDefault(u._colorBlendMode,e,Y$t),d.colorBlendAmount=r$w.getValueOrDefault(u._colorBlendAmount,e,Z$p),d.clippingPlanes=r$w.getValueOrUndefined(u._clippingPlanes,e),d.clampAnimations=r$w.getValueOrDefault(u._clampAnimations,e,k$t),d.imageBasedLightingFactor=r$w.getValueOrDefault(u._imageBasedLightingFactor,e,$$p),d.lightColor=r$w.getValueOrUndefined(u._lightColor,e),d.ready){var f=r$w.getValueOrDefault(u._runAnimations,e,!0);c.animationsRunning!==f&&(f?d.activeAnimations.addAll({loop:_0x1f6ea1.REPEAT}):d.activeAnimations.removeAll(),c.animationsRunning=f);var p=r$w.getValueOrUndefined(u._nodeTransformations,e,c.nodeTransformationsScratch);if(t$$(p))for(var _=c.originalNodeMatrixHash,m=Object.keys(p),$=0,g=m.length;$<g;++$){var y=m[$],v=p[y];if(t$$(v)){var x=d.getNode(y);if(t$$(x)){var b=_[y];t$$(b)||(b=x.matrix.clone(),_[y]=b);var S=c$1a.fromTranslationRotationScale(v,ie$g);x.matrix=c$1a.multiply(b,S,S)}}}}}else t$$(c)&&(c.modelPrimitive.show=!1)}return!0},h$w.prototype.isDestroyed=function(){return!1},h$w.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(h$w.prototype._onCollectionChanged,this);for(var e=this._entitiesToVisualize.values,t=this._modelHash,i=this._primitives,n=e.length-1;n>-1;n--)x$v(this,e[n],t,i);return s$1e(this)},h$w.prototype.getBoundingSphere=function(e,t){if(!t$$(e))throw new t$_("entity is required.");if(!t$$(t))throw new t$_("result is required.");var i=this._modelHash[e.id];if(!t$$(i)||i.loadFail)return A$T.FAILED;var n=i.modelPrimitive;if(!t$$(n)||!n.show)return A$T.FAILED;if(!n.ready)return A$T.PENDING;if(n.heightReference===U$Y.NONE)c$19.transform(n.boundingSphere,n.modelMatrix,t);else{if(!t$$(n._clampedModelMatrix))return A$T.PENDING;c$19.transform(n.boundingSphere,n._clampedModelMatrix,t)}return A$T.DONE},h$w.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a=this._entitiesToVisualize,s=this._modelHash,l=this._primitives;for(r=t.length-1;r>-1;r--)t$$((o=t[r])._model)&&t$$(o._position)&&a.set(o.id,o);for(r=n.length-1;r>-1;r--)t$$((o=n[r])._model)&&t$$(o._position)?(oe$h(o,s),a.set(o.id,o)):(x$v(this,o,s,l),a.remove(o.id));for(r=i.length-1;r>-1;r--)x$v(this,o=i[r],s,l),a.remove(o.id)},Object.defineProperties(i$u.prototype,{isConstant:{get:function(){return r$w.isConstant(this._value)}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return t$$(this._value)?this._value.referenceFrame:be$t.FIXED}}}),i$u.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,be$t.FIXED,t)},i$u.prototype.setValue=function(e){this._value!==e&&(this._value=e,t$$(this._removeSubscription)&&(this._removeSubscription(),this._removeSubscription=void 0),t$$(e)&&(this._removeSubscription=e.definitionChanged.addEventListener(this._raiseDefinitionChanged,this)),this._definitionChanged.raiseEvent(this))},i$u.prototype.getValueInReferenceFrame=function(e,t,i){if(!t$$(e))throw new t$_("time is required.");if(!t$$(t))throw new t$_("referenceFrame is required.");if(t$$(this._value))return t$$(i=this._value.getValueInReferenceFrame(e,t,i))?n$1c.WGS84.scaleToGeodeticSurface(i,i):void 0},i$u.prototype.equals=function(e){return this===e||e instanceof i$u&&this._value===e._value},i$u.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var Y$s=60,$$o=1,j$n=new n$T,R$p=new n$T,b$C=new n$T;function M$u(e){this.entity=e,this.polyline=void 0,this.index=void 0,this.updater=void 0}function ee$h(e,t,i,n,r,o,a,s,l){var u,c=s;t$$(u=e.getValueInReferenceFrame(t,o,l[c]))&&(l[c++]=u);for(var h,d,f,p=!t$$(r)||o$10.lessThanOrEquals(r,t)||o$10.greaterThanOrEquals(r,i),_=0,m=n.length,$=n[_],g=i,y=!1;_<m;){if(!p&&o$10.greaterThanOrEquals($,r)&&(t$$(u=e.getValueInReferenceFrame(r,o,l[c]))&&(l[c++]=u),p=!0),o$10.greaterThan($,t)&&o$10.lessThan($,g)&&!$.equals(r)&&(t$$(u=e.getValueInReferenceFrame($,o,l[c]))&&(l[c++]=u)),_<m-1){if(a>0&&!y){var v=n[_+1],x=o$10.secondsDifference(v,$);(y=x>a)&&(h=Math.ceil(x/a),d=0,f=x/Math.max(h,2),h=Math.max(h-1,1))}if(y&&d<h){$=o$10.addSeconds($,f,new o$10),d++;continue}}y=!1,$=n[++_]}return t$$(u=e.getValueInReferenceFrame(i,o,l[c]))&&(l[c++]=u),c}function te$g(e,t,i,n,r,o,a,s){for(var l,u=0,c=a,h=t,d=Math.max(o,60),f=!t$$(n)||o$10.lessThanOrEquals(n,t)||o$10.greaterThanOrEquals(n,i);o$10.lessThan(h,i);)!f&&o$10.greaterThanOrEquals(h,n)&&(f=!0,t$$(l=e.getValueInReferenceFrame(n,r,s[c]))&&(s[c]=l,c++)),t$$(l=e.getValueInReferenceFrame(h,r,s[c]))&&(s[c]=l,c++),u++,h=o$10.addSeconds(t,d*u,new o$10);return t$$(l=e.getValueInReferenceFrame(i,r,s[c]))&&(s[c]=l,c++),c}function ne$f(e,t,i,n,r,o,a,s){b$C.start=t,b$C.stop=i;for(var l=a,u=e.intervals,c=0;c<u.length;c++){var h=u.get(c);if(!n$T.intersect(h,b$C,j$n).isEmpty){var d=h.start;h.isStartIncluded||(d=h.isStopIncluded?h.stop:o$10.addSeconds(h.start,o$10.secondsDifference(h.stop,h.start)/2,new o$10));var f=e.getValueInReferenceFrame(d,r,s[l]);t$$(f)&&(s[l]=f,l++)}}return l}function re$h(e,t,i,n,r,o,a,s){var l=e.getValueInReferenceFrame(t,r,s[a]);return t$$(l)&&(s[a++]=l),a}function ie$f(e,t,i,n,r,o,a,s){R$p.start=t,R$p.stop=i;for(var l=a,u=e.intervals,c=0;c<u.length;c++){var h=u.get(c);if(!n$T.intersect(h,R$p,j$n).isEmpty){var d=h.start,f=h.stop,p=t;o$10.greaterThan(d,p)&&(p=d);var _=i;o$10.lessThan(f,_)&&(_=f),l=P$k(h.data,p,_,n,r,o,l,s)}}return l}function P$k(e,t,i,n,r,o,a,s){for(;e instanceof a$p;)e=e.resolvedProperty;e instanceof o$v?a=ee$h(e,t,i,e._property._times,n,r,o,a,s):a=e instanceof t$t?ie$f(e,t,i,n,r,o,a,s):e instanceof t$o?ne$f(e,t,i,n,r,o,a,s):e instanceof t$B||e instanceof i$u&&r$w.isConstant(e)?re$h(e,t,i,n,r,o,a,s):te$g(e,t,i,n,r,o,a,s);return a}function L$s(e,t,i,n,r,o,a){t$$(a)||(a=[]);var s=P$k(e,t,i,n,r,o,0,a);return a.length=s,a}var U$u=new r$W;function T$y(e,t){this._unusedIndexes=[],this._polylineCollection=new W$P,this._scene=e,this._referenceFrame=t,e.primitives.add(this._polylineCollection)}function w$z(e,t){if(!t$$(e))throw new t$_("scene is required.");if(!t$$(t))throw new t$_("entityCollection is required.");t.collectionChanged.addEventListener(w$z.prototype._onCollectionChanged,this),this._scene=e,this._updaters={},this._entityCollection=t,this._items=new e$1F,this._onCollectionChanged(t,t.values,[],[])}T$y.prototype.update=function(e){if(this._referenceFrame===be$t.INERTIAL){var t=m$13.computeIcrfToFixedMatrix(e,U$u);t$$(t)||(t=m$13.computeTemeToPseudoFixedMatrix(e,U$u)),c$1a.fromRotationTranslation(t,a$11.ZERO,this._polylineCollection.modelMatrix)}},T$y.prototype.updateObject=function(e,t){var i,n,r=t.entity,o=r._path,a=r._position,s=o._show,l=t.polyline,u=r.isShowing&&(!t$$(s)||s.getValue(e));if(u){var c=r$w.getValueOrUndefined(o._leadTime,e),h=r$w.getValueOrUndefined(o._trailTime,e),d=r._availability,f=t$$(d),p=t$$(c),_=t$$(h);if(u=f||p&&_){if(_&&(i=o$10.addSeconds(e,-h,new o$10)),p&&(n=o$10.addSeconds(e,c,new o$10)),f){var m=d.start,$=d.stop;(!_||o$10.greaterThan(m,i))&&(i=m),(!p||o$10.lessThan($,n))&&(n=$)}u=o$10.lessThan(i,n)}}if(u){if(!t$$(l)){var g=this._unusedIndexes;if(g.length>0){var y=g.pop();l=this._polylineCollection.get(y),t.index=y}else t.index=this._polylineCollection.length,l=this._polylineCollection.add();l.id=r,t.polyline=l}var v=r$w.getValueOrDefault(o._resolution,e,Y$s);l.show=!0,l.positions=L$s(a,i,n,e,this._referenceFrame,v,l.positions.slice()),l.material=t$D.getValue(e,o._material,l.material),l.width=r$w.getValueOrDefault(o._width,e,$$o),l.distanceDisplayCondition=r$w.getValueOrUndefined(o._distanceDisplayCondition,e,l.distanceDisplayCondition)}else t$$(l)&&(this._unusedIndexes.push(t.index),t.polyline=void 0,l.show=!1,t.index=void 0)},T$y.prototype.removeObject=function(e){var t=e.polyline;t$$(t)&&(this._unusedIndexes.push(e.index),e.polyline=void 0,t.show=!1,t.id=void 0,e.index=void 0)},T$y.prototype.destroy=function(){return this._scene.primitives.remove(this._polylineCollection),s$1e(this)},w$z.prototype.update=function(e){if(!t$$(e))throw new t$_("time is required.");var t=this._updaters;for(var i in t)t.hasOwnProperty(i)&&t[i].update(e);var n=this._items.values;if(0===n.length&&t$$(this._updaters)&&Object.keys(this._updaters).length>0){for(var r in t)t.hasOwnProperty(r)&&t[r].destroy();this._updaters={}}for(var o=0,a=n.length;o<a;o++){var s=n[o],l=s.entity._position,u=s.updater,c=be$t.FIXED;this._scene.mode===b$1d.SCENE3D&&(c=l.referenceFrame);var h=this._updaters[c];u===h&&t$$(h)?h.updateObject(e,s):(t$$(u)&&u.removeObject(s),t$$(h)||((h=new T$y(this._scene,c)).update(e),this._updaters[c]=h),s.updater=h,t$$(h)&&h.updateObject(e,s))}return!0},w$z.prototype.isDestroyed=function(){return!1},w$z.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(w$z.prototype._onCollectionChanged,this);var e=this._updaters;for(var t in e)e.hasOwnProperty(t)&&e[t].destroy();return s$1e(this)},w$z.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a,s=this._items;for(r=t.length-1;r>-1;r--)t$$((o=t[r])._path)&&t$$(o._position)&&s.set(o.id,new M$u(o));for(r=n.length-1;r>-1;r--)t$$((o=n[r])._path)&&t$$(o._position)?s.contains(o.id)||s.set(o.id,new M$u(o)):t$$(a=s.get(o.id))&&(t$$(a.updater)&&a.updater.removeObject(a),s.remove(o.id));for(r=i.length-1;r>-1;r--)o=i[r],t$$(a=s.get(o.id))&&(t$$(a.updater)&&a.updater.removeObject(a),s.remove(o.id))},w$z._subSample=L$s;var N$n=e$1z.WHITE,W$u=e$1z.BLACK,E$v=0,U$t=1,z$n=0,T$x=new e$1z,H$t=new a$11,I$x=new e$1z,L$r=new u$W,A$x=new u$W,M$t=new e$1w;function R$o(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 f$x(e,t){if(!t$$(e))throw new t$_("entityCluster is required.");if(!t$$(t))throw new t$_("entityCollection is required.");t.collectionChanged.addEventListener(f$x.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new e$1F,this._onCollectionChanged(t,t.values,[],[])}function C$v(e,t,i){if(t$$(e)){if(t$$(e.pointPrimitive))return e.pointPrimitive=void 0,void i.removePoint(t);t$$(e.billboard)&&(e.billboard=void 0,i.removeBillboard(t))}}f$x.prototype.update=function(e){if(!t$$(e))throw new t$_("time is required.");for(var t=this._items.values,i=this._cluster,n=0,r=t.length;n<r;n++){var o,a=t[n],s=a.entity,l=s._point,u=a.pointPrimitive,c=a.billboard,h=r$w.getValueOrDefault(l._heightReference,e,U$Y.NONE),d=s.isShowing&&s.isAvailable(e)&&r$w.getValueOrDefault(l._show,e,!0);if(d&&(d=t$$(o=r$w.getValueOrUndefined(s._position,e,H$t))),d){r$w.isConstant(s._position)||(i._clusterDirty=!0);var f=!1,p=!1;if(h===U$Y.NONE||t$$(c)?h===U$Y.NONE&&!t$$(u)&&(t$$(c)&&(C$v(a,s,i),c=void 0),(u=i.getPoint(s)).id=s,a.pointPrimitive=u):(t$$(u)&&(C$v(a,s,i),u=void 0),(c=i.getBillboard(s)).id=s,c.image=void 0,a.billboard=c,f=!0,p=a$11.equals(c.position,o)&&c.heightReference===h),t$$(u))u.show=!0,u.position=o,u.scaleByDistance=r$w.getValueOrUndefined(l._scaleByDistance,e,L$r),u.translucencyByDistance=r$w.getValueOrUndefined(l._translucencyByDistance,e,A$x),u.color=r$w.getValueOrDefault(l._color,e,N$n,T$x),u.outlineColor=r$w.getValueOrDefault(l._outlineColor,e,W$u,I$x),u.outlineWidth=r$w.getValueOrDefault(l._outlineWidth,e,E$v),u.pixelSize=r$w.getValueOrDefault(l._pixelSize,e,U$t),u.distanceDisplayCondition=r$w.getValueOrUndefined(l._distanceDisplayCondition,e,M$t),u.disableDepthTestDistance=r$w.getValueOrDefault(l._disableDepthTestDistance,e,z$n);else if(t$$(c)){c.show=!0,c.position=o,c.scaleByDistance=r$w.getValueOrUndefined(l._scaleByDistance,e,L$r),c.translucencyByDistance=r$w.getValueOrUndefined(l._translucencyByDistance,e,A$x),c.distanceDisplayCondition=r$w.getValueOrUndefined(l._distanceDisplayCondition,e,M$t),c.disableDepthTestDistance=r$w.getValueOrDefault(l._disableDepthTestDistance,e,z$n),c.heightReference=h;var _=r$w.getValueOrDefault(l._color,e,N$n,T$x),m=r$w.getValueOrDefault(l._outlineColor,e,W$u,I$x),$=Math.round(r$w.getValueOrDefault(l._outlineWidth,e,E$v)),g=Math.max(1,Math.round(r$w.getValueOrDefault(l._pixelSize,e,U$t)));if($>0?(c.scale=1,f=f||$!==a.outlineWidth||g!==a.pixelSize||!e$1z.equals(_,a.color)||!e$1z.equals(m,a.outlineColor)):(c.scale=g/50,g=50,f=f||$!==a.outlineWidth||!e$1z.equals(_,a.color)||!e$1z.equals(m,a.outlineColor)),f){a.color=e$1z.clone(_,a.color),a.outlineColor=e$1z.clone(m,a.outlineColor),a.pixelSize=g,a.outlineWidth=$;var y=_.alpha,v=_.toCssColorString(),x=m.toCssColorString(),b=JSON.stringify([v,g,x,$]);c.setImage(b,c$A(y,v,x,$,g))}p&&c._updateClamping()}}else C$v(a,s,i)}return!0},f$x.prototype.getBoundingSphere=function(e,t){if(!t$$(e))throw new t$_("entity is required.");if(!t$$(t))throw new t$_("result is required.");var i=this._items.get(e.id);if(!t$$(i)||!t$$(i.pointPrimitive)&&!t$$(i.billboard))return A$T.FAILED;if(t$$(i.pointPrimitive))t.center=a$11.clone(i.pointPrimitive.position,t.center);else{var n=i.billboard;if(!t$$(n._clampedPosition))return A$T.PENDING;t.center=a$11.clone(n._clampedPosition,t.center)}return t.radius=0,A$T.DONE},f$x.prototype.isDestroyed=function(){return!1},f$x.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(f$x.prototype._onCollectionChanged,this);for(var e=this._entityCollection.values,t=0;t<e.length;t++)this._cluster.removePoint(e[t]);return s$1e(this)},f$x.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a=this._items,s=this._cluster;for(r=t.length-1;r>-1;r--)t$$((o=t[r])._point)&&t$$(o._position)&&a.set(o.id,new R$o(o));for(r=n.length-1;r>-1;r--)t$$((o=n[r])._point)&&t$$(o._position)?a.contains(o.id)||a.set(o.id,new R$o(o)):(C$v(a.get(o.id),o,s),a.remove(o.id));for(r=i.length-1;r>-1;r--)o=i[r],C$v(a.get(o.id),o,s),a.remove(o.id)};var h$v=e$1z.WHITE,l$q=1,d$r=.3,_$p=5,u$r=0,c$r=1e3;function s$o(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._definitionChanged=new o$15,this._color=void 0,this._colorSubscription=void 0,this._spotSize=void 0,this._trailLength=void 0,this._spotIntensity=void 0,this._constantSpeed=void 0,this._period=void 0,this.color=e.color,this.spotSize=e.spotSize,this.trailLength=e.trailLength,this.spotIntensity=e.spotIntensity,this.constantSpeed=e.constantSpeed/1e3,this.period=1e3*e.period,this.trailTime=void 0,this._startTime=performance.now(),this._bAsy=e$1Y(e.bAsy,!0)}Object.defineProperties(s$o.prototype,{isConstant:{get:function(){return r$w.isConstant(this._trailLength)&&r$w.isConstant(this._constantSpeed)&&r$w.isConstant(this._period)}},definitionChanged:{get:function(){return this._definitionChanged}},color:v$J("color"),spotSize:v$J("spotSize"),trailLength:v$J("trailLength"),spotIntensity:v$J("spotIntensity"),constantSpeed:v$J("constantSpeed"),period:v$J("period")}),s$o.prototype.getType=function(e){return"PolylineTrail"},s$o.prototype.getValue=function(e,t){return t$$(t)||(t={}),t.color=r$w.getValueOrClonedDefault(this._color,e,h$v,t.color),t.trailTime=performance.now(),t.spotSize=r$w.getValueOrDefault(this._spotSize,e,l$q),t.constantSpeed=r$w.getValueOrDefault(this._constantSpeed,e,u$r),t.trailLength=r$w.getValueOrDefault(this._trailLength,e,d$r),t.period=r$w.getValueOrDefault(this._period,e,c$r),t.spotIntensity=r$w.getValueOrDefault(this._spotIntensity,e,_$p),t.startTime=this._startTime,t},s$o.prototype.equals=function(e){return this===e||e instanceof s$o&&r$w.equals(this._color,e._color)&&r$w.equals(this._spotSize,e._spotSize)&&r$w.equals(this._constantSpeed,e._constantSpeed)&&r$w.equals(this._trailLength,e._trailLength)&&r$w.equals(this._period,e._period)&&r$w.equals(this._spotIntensity,e._spotIntensity)};var ot$8=new i$O(0),b$B={},B$o=new e$1z,nt$9=new t$F(e$1z.WHITE),st$5=new i$O(!0),at$7=new i$O(q$Q.DISABLED),lt$8=new i$O(new e$1w),pt$6=new i$O(_0x29401c.BOTH);function dt$7(){this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.hMax=void 0,this.followSurface=void 0,this.arcType=void 0,this.granularity=void 0}function ht$6(){this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function y$v(e,t){if(!t$$(e))throw new t$_("entity is required");if(!t$$(t))throw new t$_("scene is required");this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(y$v.prototype._onEntityPropertyChanged,this),this._fillEnabled=!1,this._dynamic=!1,this._geometryChanged=new o$15,this._showProperty=void 0,this._materialProperty=void 0,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._depthFailMaterialProperty=void 0,this._geometryOptions=new dt$7,this._groundGeometryOptions=new ht$6,this._id="polyline-"+e.id,this._clampToGround=!1,this._supportsPolylinesOnTerrain=l$J.supportsPolylinesOnTerrain(t),this._zIndex=0,this._onEntityPropertyChanged(e,"polyline",e.polyline,void 0)}Object.defineProperties(y$v.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!t$$(this._entity.availability)&&r$w.isConstant(this._showProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},depthFailMaterialProperty:{get:function(){return this._depthFailMaterialProperty}},outlineEnabled:{value:!1},hasConstantOutline:{value:!0},outlineColorProperty:{value:void 0},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{value:!1},geometryChanged:{get:function(){return this._geometryChanged}},arcType:{get:function(){return this._arcType}},clampToGround:{get:function(){return this._clampToGround&&this._supportsPolylinesOnTerrain}},zIndex:{get:function(){return this._zIndex}}}),y$v.prototype.isOutlineVisible=function(e){return!1},y$v.prototype.isFilled=function(e){var t=this._entity;return e$1Y(this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e),!1)},y$v.prototype.createFillGeometryInstance=function(e){if(!t$$(e))throw new t$_("time is required.");if(!this._fillEnabled)throw new t$_("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r=new e$18(n&&i.isShowing&&this._showProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),a={show:r,distanceDisplayCondition:n$Z.fromDistanceDisplayCondition(o)};return this._materialProperty instanceof t$F&&(t$$(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,B$o)),t$$(t)||(t=e$1z.WHITE),a.color=r$I.fromColor(t)),this.clampToGround||this.entity.clampToS3M?new m$P({id:i,geometry:new ee$x(this._groundGeometryOptions),attributes:a}):(this._materialProperty instanceof s$o?(this._geometryOptions.dist=1,t$$(this._materialProperty.constantSpeed)&&this._materialProperty.constantSpeed>0?this._geometryOptions.period=-1:this._geometryOptions.period=t$$(this._materialProperty.period)?this._materialProperty.period:1e3):(this._geometryOptions.dist=0,this._geometryOptions.period=-1),t$$(this._depthFailMaterialProperty)&&this._depthFailMaterialProperty instanceof t$F&&(t$$(this._depthFailMaterialProperty.color)&&(this._depthFailMaterialProperty.color.isConstant||n)&&(t=this._depthFailMaterialProperty.color.getValue(e,B$o)),t$$(t)||(t=e$1z.WHITE),a.depthFailColor=r$I.fromColor(t)),new m$P({id:i,geometry:new R$H(this._geometryOptions),attributes:a}))},y$v.prototype.createOutlineGeometryInstance=function(e){throw new t$_("This instance does not represent an outlined geometry.")},y$v.prototype.isDestroyed=function(){return!1},y$v.prototype.destroy=function(){this._entitySubscription(),s$1e(this)},y$v.prototype._onEntityPropertyChanged=function(e,t,i,n){if("availability"===t||"polyline"===t){var r=this._entity.polyline;if(!t$$(r))return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));var o=r.positions,a=r.show;if(t$$(a)&&a.isConstant&&!a.getValue(f$S.MINIMUM_VALUE)||!t$$(o))return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));var s=r.zIndex,l=e$1Y(r.material,nt$9),u=l instanceof t$F;this._materialProperty=l,this._depthFailMaterialProperty=r.depthFailMaterial,this._showProperty=e$1Y(a,st$5),this._shadowsProperty=e$1Y(r.shadows,at$7),this._distanceDisplayConditionProperty=e$1Y(r.distanceDisplayCondition,lt$8),this._classificationTypeProperty=e$1Y(r.classificationType,pt$6),this._fillEnabled=!0,this._zIndex=e$1Y(s,ot$8);var c=r.width,h=r.hMax,d=r.followSurface,f=r.arcType,p=r.clampToGround,_=r.granularity;if(o.isConstant&&r$w.isConstant(c)&&r$w.isConstant(d)&&r$w.isConstant(f)&&r$w.isConstant(_)&&r$w.isConstant(p)&&r$w.isConstant(s)){var m,$=this._geometryOptions,g=o.getValue(f$S.MINIMUM_VALUE,$.positions);if(!t$$(g)||g.length<2)return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));m=u&&(!t$$(this._depthFailMaterialProperty)||this._depthFailMaterialProperty instanceof t$F)?e$12.VERTEX_FORMAT:t$E.VERTEX_FORMAT,$.vertexFormat=m,$.positions=g,$.width=t$$(c)?c.getValue(f$S.MINIMUM_VALUE):void 0,$.hMax=t$$(h)?h.getValue(f$S.MINIMUM_VALUE):void 0,$.followSurface=t$$(d)?d.getValue(f$S.MINIMUM_VALUE):void 0,$.arcType=t$$(f)?f.getValue(f$S.MINIMUM_VALUE):void 0,$.granularity=t$$(_)?_.getValue(f$S.MINIMUM_VALUE):void 0;var y=this._groundGeometryOptions;y.positions=g,y.width=$.width,y.arcType=$.arcType,y.granularity=$.granularity,this._clampToGround=!!t$$(p)&&p.getValue(f$S.MINIMUM_VALUE),!this._clampToGround&&t$$(s)&&e$1Q("Entity polylines must have clampToGround: true when using zIndex. zIndex will be ignored."),this._dynamic=!1,this._geometryChanged.raiseEvent(this)}else this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this))}},y$v.prototype.createDynamicUpdater=function(e,t){if(n$1e.defined("primitives",e),n$1e.defined("groundPrimitives",t),!this._dynamic)throw new t$_("This instance does not represent dynamic geometry.");return new C$u(e,t,this)};var w$y={positions:void 0,granularity:void 0,height:void 0,ellipsoid:void 0};function C$u(e,t,i){this._line=void 0,this._primitives=e,this._groundPrimitives=t,this._groundPolylinePrimitive=void 0,this._material=void 0,this._geometryUpdater=i,this._positions=[]}function W$t(e){if(t$$(e._line))return e._line;var t=e._geometryUpdater._scene.id,i=b$B[t],n=e._primitives;!t$$(i)||i.isDestroyed()?(i=new W$P,b$B[t]=i,n.add(i)):n.contains(i)||n.add(i);var r=i.add();return r.id=e._geometryUpdater._entity,e._line=r,r}C$u.prototype.update=function(e){var t=this._geometryUpdater,i=t._entity,n=i.polyline,r=n.positions,o=r$w.getValueOrUndefined(r,e,this._positions);t._clampToGround=r$w.getValueOrDefault(n._clampToGround,e,!1),t._groundGeometryOptions.positions=o,t._groundGeometryOptions.width=r$w.getValueOrDefault(n._width,e,1),t._groundGeometryOptions.arcType=r$w.getValueOrDefault(n._arcType,e,m$_.GEODESIC),t._groundGeometryOptions.granularity=r$w.getValueOrDefault(n._granularity,e,9999);var a=this._groundPrimitives;if(t$$(this._groundPolylinePrimitive)&&(a.remove(this._groundPolylinePrimitive),this._groundPolylinePrimitive=void 0),t.clampToGround){if(!i.isShowing||!i.isAvailable(e)||!r$w.getValueOrDefault(n._show,e,!0)||!t$$(o)||o.length<2)return;var s,l=t.fillMaterialProperty;if(l instanceof t$F)s=new e$12;else{var u=t$D.getValue(e,l,this._material);s=new t$E({material:u,translucent:u.isTranslucent()}),this._material=u}return this._groundPolylinePrimitive=a.add(new C$I({geometryInstances:t.createFillGeometryInstance(e),appearance:s,classificationType:t.classificationTypeProperty.getValue(e),asynchronous:!1}),r$w.getValueOrUndefined(t.zIndex,e)),void(t$$(this._line)&&(this._line.show=!1))}var c=W$t(this);if(i.isShowing&&i.isAvailable(e)&&r$w.getValueOrDefault(n._show,e,!0))if(!t$$(o)||o.length<2)c.show=!1;else{var h=r$w.getValueOrUndefined(n._followSurface,e),d=m$_.GEODESIC;t$$(h)&&(d=h?m$_.GEODESIC:m$_.NONE),d=r$w.getValueOrDefault(n._arcType,e,d);var f=t._scene.globe;d!==m$_.NONE&&t$$(f)&&(w$y.ellipsoid=f.ellipsoid,w$y.positions=o,w$y.granularity=r$w.getValueOrUndefined(n._granularity,e),w$y.height=v$V.extractHeights(o,f.ellipsoid),w$y.hMax=r$w.getValueOrUndefined(n._hMax,e),o=v$V.generateCartesianArc(w$y)),c.show=!0,c.positions=o.slice(),c.material=t$D.getValue(e,t.fillMaterialProperty,c.material),c.width=r$w.getValueOrDefault(n._width,e,1),c.distanceDisplayCondition=r$w.getValueOrUndefined(n._distanceDisplayCondition,e,c.distanceDisplayCondition)}else c.show=!1},C$u.prototype.getBoundingSphere=function(e){if(n$1e.defined("result",e),this._geometryUpdater.clampToGround){var t=this._groundPolylinePrimitive;if(t$$(t)&&t.show&&t.ready){var i=t.getGeometryInstanceAttributes(this._geometryUpdater._entity);if(t$$(i)&&t$$(i.boundingSphere))return c$19.clone(i.boundingSphere,e),A$T.DONE}return t$$(t)&&!t.ready?A$T.PENDING:A$T.DONE}var n=W$t(this);return n.show&&n.positions.length>0?(c$19.fromPoints(n.positions,e),A$T.DONE):A$T.FAILED},C$u.prototype.isDestroyed=function(){return!1},C$u.prototype.destroy=function(){var e=this._geometryUpdater._scene.id,t=b$B[e];t$$(t)&&(t.remove(this._line),0===t.length&&(this._primitives.removeAndDestroy(t),delete b$B[e])),t$$(this._groundPolylinePrimitive)&&this._groundPrimitives.remove(this._groundPolylinePrimitive),s$1e(this)};var L$q=new e$1z,O$p=new e$1w,U$s=new e$1w;function l$p(e,t,i,n,r){var o;o=i instanceof t$F?e$12:t$E,this.orderedGroundPrimitives=e,this.classificationType=t,this.appearanceType=o,this.materialProperty=i,this.updaters=new e$1F,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1F,this.material=void 0,this.updatersWithAttributes=new e$1F,this.attributes=new e$1F,this.invalidated=!1,this.removeMaterialSubscription=i.definitionChanged.addEventListener(l$p.prototype.onMaterialChanged,this),this.subscriptions=new e$1F,this.showsUpdated=new e$1F,this.zIndex=n,this._asynchronous=r}function v$v(e,t,i){this._items=[],this._orderedGroundPrimitives=e,this._classificationType=t,this._asynchronous=e$1Y(i,!0)}l$p.prototype.onMaterialChanged=function(){this.invalidated=!0},l$p.prototype.isMaterial=function(e){var t=this.materialProperty,i=e.fillMaterialProperty;return i===t||i instanceof t$F&&t instanceof t$F||t$$(t)&&t.equals(i)},l$p.prototype.add=function(e,t,i){var n=t.id;if(this.updaters.set(n,t),this.geometry.set(n,i),t.hasConstantFill&&t.fillMaterialProperty.isConstant&&r$w.isConstant(t.distanceDisplayConditionProperty)){var r=this;this.subscriptions.set(n,t.entity.definitionChanged.addEventListener((function(e,i,n,o){"isShowing"===i&&r.showsUpdated.set(t.id,t)})))}else this.updatersWithAttributes.set(n,t);this.createPrimitive=!0},l$p.prototype.remove=function(e){var t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);var i=this.subscriptions.get(t);return t$$(i)&&(i(),this.subscriptions.remove(t)),!0}return!1},l$p.prototype.update=function(e){var t,i=!0,n=this.primitive,r=this.orderedGroundPrimitives,o=this.geometry.values;if(this.createPrimitive){if(o.length>0)t$$(n)&&(t$$(this.oldPrimitive)?r.remove(n):this.oldPrimitive=n),n=new C$I({show:!1,asynchronous:this._asynchronous,geometryInstances:o.slice(),appearance:new this.appearanceType,classificationType:this.classificationType}),this.appearanceType===t$E&&(this.material=t$D.getValue(e,this.materialProperty,this.material),n.appearance.material=this.material),r.add(n,this.zIndex),i=!1;else{t$$(n)&&(r.remove(n),n=void 0);var a=this.oldPrimitive;t$$(a)&&(r.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(t$$(n)&&n.ready){n.show=!0,t$$(this.oldPrimitive)&&(r.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.appearanceType===t$E&&(this.material=t$D.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material);var s=this.updatersWithAttributes.values,l=s.length;for(t=0;t<l;t++){var u=s[t],c=u.entity,h=this.geometry.get(u.id),d=this.attributes.get(h.id.id);if(t$$(d)||(d=n.getGeometryInstanceAttributes(h.id),this.attributes.set(h.id.id,d)),!u.fillMaterialProperty.isConstant){var f=u.fillMaterialProperty.color,p=r$w.getValueOrDefault(f,e,e$1z.WHITE,L$q);e$1z.equals(d._lastColor,p)||(d._lastColor=e$1z.clone(p,d._lastColor),d.color=r$I.toValue(p,d.color))}var _=c.isShowing&&(u.hasConstantFill||u.isFilled(e));_!==(1===d.show[0])&&(d.show=e$18.toValue(_,d.show));var m=u.distanceDisplayConditionProperty;if(!r$w.isConstant(m)){var $=r$w.getValueOrDefault(m,e,U$s,O$p);e$1w.equals($,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=e$1w.clone($,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=n$Z.toValue($,d.distanceDisplayCondition))}}this.updateShows(n)}else t$$(n)&&!n.ready&&(i=!1);return i},l$p.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=r.entity,a=this.geometry.get(r.id),s=this.attributes.get(a.id.id);t$$(s)||(s=e.getGeometryInstanceAttributes(a.id),this.attributes.set(a.id.id,s));var l=o.isShowing;l!==(1===s.show[0])&&(s.show=e$18.toValue(l,s.show),a.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()},l$p.prototype.contains=function(e){return this.updaters.contains(e.id)},l$p.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return A$T.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!t$$(n)||!t$$(n.boundingSphere)||t$$(n.show)&&0===n.show[0]?A$T.FAILED:(n.boundingSphere.clone(t),A$T.DONE)},l$p.prototype.destroy=function(){var e=this.primitive,t=this.orderedGroundPrimitives;t$$(e)&&t.remove(e);var i=this.oldPrimitive;t$$(i)&&t.remove(i),this.removeMaterialSubscription()},v$v.prototype.add=function(e,t){for(var i=this._items,n=i.length,r=t.createFillGeometryInstance(e),o=r$w.getValueOrDefault(t.zIndex,0),a=0;a<n;++a){var s=i[a];if(s.isMaterial(t)&&s.zIndex===o)return void s.add(e,t,r)}var l=new l$p(this._orderedGroundPrimitives,this._classificationType,t.fillMaterialProperty,o,this._asynchronous);l.add(e,t,r),i.push(l)},v$v.prototype.remove=function(e){for(var t=this._items,i=t.length-1;i>=0;i--){var n=t[i];if(n.remove(e)){0===n.updaters.length&&(t.splice(i,1),n.destroy());break}}},v$v.prototype.update=function(e){var t,i=this._items;for(t=i.length-1;t>=0;t--){var n=i[t];if(n.invalidated){i.splice(t,1);for(var r=n.updaters.values,o=r.length,a=0;a<o;a++)this.add(e,r[a]);n.destroy()}}var s=!0;for(t=0;t<i.length;t++)s=i[t].update(e)&&s;return s},v$v.prototype.getBoundingSphere=function(e,t){for(var i=this._items,n=i.length,r=0;r<n;r++){var o=i[r];if(o.contains(e))return o.getBoundingSphere(e,t)}return A$T.FAILED},v$v.prototype.removeAllPrimitives=function(){for(var e=this._items,t=e.length,i=0;i<t;i++)e[i].destroy();this._items.length=0};var I$w=[];function j$m(e,t){for(var i=e._batches,n=i.length,r=0;r<n;r++)i[r].remove(t)}function S$n(e,t,i,n){if(i.isDynamic)e._dynamicBatch.add(t,i);else{if((i.clampToGround||i.entity.clampToS3M)&&i.fillEnabled){var r=i.classificationTypeProperty.getValue(t);return i.entity.clampToS3M&&(r=_0x29401c.S3M_TILE),void e._groundBatches[r].add(t,i)}var o;i.fillEnabled&&(o=i.shadowsProperty.getValue(t));var a,s=0;t$$(i.depthFailMaterialProperty)&&(s=i.depthFailMaterialProperty instanceof t$F?1:2),t$$(o)&&(a=o+s*q$Q.NUMBER_OF_SHADOW_MODES),i.fillEnabled&&(i.fillMaterialProperty instanceof t$F?e._colorBatches[a].add(t,i):e._materialBatches[a].add(t,i))}}function l$o(e,t,i,n){n$1e.defined("scene",e),n$1e.defined("entityCollection",t),n=e$1Y(n,e.groundPrimitives),i=e$1Y(i,e.primitives),this._scene=e,this._primitives=i,this._entityCollection=void 0,this._addedObjects=new e$1F,this._removedObjects=new e$1F,this._changedObjects=new e$1F;var r,o=q$Q.NUMBER_OF_SHADOW_MODES;for(this._colorBatches=new Array(3*o),this._materialBatches=new Array(3*o),r=0;r<o;++r)this._colorBatches[r]=new y$x(i,e$12,void 0,!1,r),this._materialBatches[r]=new c$u(i,t$E,void 0,!1,r),this._colorBatches[r+o]=new y$x(i,e$12,e$12,!1,r),this._materialBatches[r+o]=new c$u(i,t$E,e$12,!1,r),this._colorBatches[r+2*o]=new y$x(i,e$12,t$E,!1,r),this._materialBatches[r+2*o]=new c$u(i,t$E,t$E,!1,r);this._dynamicBatch=new r$k(i,n);var a=_0x29401c.NUMBER_OF_CLASSIFICATION_TYPES;for(this._groundBatches=new Array(a),r=0;r<a;++r)this._groundBatches[r]=new v$v(n,r);this._batches=this._colorBatches.concat(this._materialBatches,this._dynamicBatch,this._groundBatches),this._subscriptions=new e$1F,this._updaters=new e$1F,this._entityCollection=t,t.collectionChanged.addEventListener(l$o.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,I$w)}l$o.prototype.update=function(e){n$1e.defined("time",e);var t,i,n,r,o=this._addedObjects,a=o.values,s=this._removedObjects,l=s.values,u=this._changedObjects,c=u.values;for(t=c.length-1;t>-1;t--)n=(i=c[t]).id,(r=this._updaters.get(n)).entity===i?(j$m(this,r),S$n(this,e,r)):(l.push(i),a.push(i));for(t=l.length-1;t>-1;t--)n=(i=l[t]).id,j$m(this,r=this._updaters.get(n)),r.destroy(),this._updaters.remove(n),this._subscriptions.get(n)(),this._subscriptions.remove(n);for(t=a.length-1;t>-1;t--)n=(i=a[t]).id,r=new y$v(i,this._scene),this._updaters.set(n,r),S$n(this,e,r),this._subscriptions.set(n,r.geometryChanged.addEventListener(l$o._onGeometryChanged,this));o.removeAll(),s.removeAll(),u.removeAll();var h=!0,d=this._batches,f=d.length;for(t=0;t<f;t++)h=d[t].update(e)&&h;return h};var T$w=[],G$s=new c$19;function l$n(e){n$1e.typeOf.object("options",e),n$1e.typeOf.object("options.scene",e.scene),n$1e.typeOf.object("options.dataSourceCollection",e.dataSourceCollection),f$J.initializeTerrainHeights(),C$I.initializeTerrainHeights();var t=e.scene,i=e.dataSourceCollection;this._eventHelper=new n$W,this._eventHelper.add(i.dataSourceAdded,this._onDataSourceAdded,this),this._eventHelper.add(i.dataSourceRemoved,this._onDataSourceRemoved,this),this._eventHelper.add(i.dataSourceMoved,this._onDataSourceMoved,this),this._eventHelper.add(t.postRender,this._postRender,this),this._dataSourceCollection=i,this._scene=t,this._visualizersCallback=e$1Y(e.visualizersCallback,l$n.defaultVisualizersCallback);var n=!1,r=new r$l,o=new r$l;i.length>0&&(t.primitives.add(r),t.groundPrimitives.add(o),n=!0),this._primitives=r,this._groundPrimitives=o;for(var a=0,s=i.length;a<s;a++)this._onDataSourceAdded(i,i.get(a));var l,u,c=new i$z;if(this._onDataSourceAdded(void 0,c),this._defaultDataSource=c,!n){var h=this,d=function(){t.primitives.add(r),t.groundPrimitives.add(o),l(),u(),h._removeDefaultDataSourceListener=void 0,h._removeDataSourceCollectionListener=void 0};l=c.entities.collectionChanged.addEventListener(d),u=i.dataSourceAdded.addEventListener(d)}this._removeDefaultDataSourceListener=l,this._removeDataSourceCollectionListener=u,this._ready=!1}l$o.prototype.getBoundingSphere=function(e,t){n$1e.defined("entity",e),n$1e.defined("result",t);for(var i=T$w,n=G$s,r=0,o=A$T.DONE,a=this._batches,s=a.length,l=this._updaters.get(e.id),u=0;u<s;u++){if((o=a[u].getBoundingSphere(l,n))===A$T.PENDING)return A$T.PENDING;o===A$T.DONE&&(i[r]=c$19.clone(n,i[r]),r++)}return 0===r?A$T.FAILED:(i.length=r,c$19.fromBoundingSpheres(i,t),A$T.DONE)},l$o.prototype.isDestroyed=function(){return!1},l$o.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(l$o.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();var e,t=this._batches,i=t.length;for(e=0;e<i;e++)t[e].removeAllPrimitives();var n=this._subscriptions.values;for(i=n.length,e=0;e<i;e++)n[e]();return this._subscriptions.removeAll(),s$1e(this)},l$o._onGeometryChanged=function(e){var t=this._removedObjects,i=this._changedObjects,n=e.entity,r=n.id;!t$$(t.get(r))&&!t$$(i.get(r))&&i.set(r,n)},l$o.prototype._onCollectionChanged=function(e,t,i){var n,r,o,a=this._addedObjects,s=this._removedObjects,l=this._changedObjects;for(n=i.length-1;n>-1;n--)r=(o=i[n]).id,a.remove(r)||(s.set(r,o),l.remove(r));for(n=t.length-1;n>-1;n--)r=(o=t[n]).id,s.remove(r)?l.set(r,o):a.set(r,o)},l$n.defaultVisualizersCallback=function(e,t,i){var n=i.entities;return[new u$M(t,n),new c$s(e,n,i._primitives,i._groundPrimitives),new d$s(t,n),new h$w(e,n),new a$v(e,n),new f$x(t,n),new w$z(e,n),new l$o(e,n,i._primitives,i._groundPrimitives)]},Object.defineProperties(l$n.prototype,{scene:{get:function(){return this._scene}},dataSources:{get:function(){return this._dataSourceCollection}},defaultDataSource:{get:function(){return this._defaultDataSource}},ready:{get:function(){return this._ready}}}),l$n.prototype.isDestroyed=function(){return!1},l$n.prototype.destroy=function(){this._eventHelper.removeAll();for(var e=this._dataSourceCollection,t=0,i=e.length;t<i;++t)this._onDataSourceRemoved(this._dataSourceCollection,e.get(t));return this._onDataSourceRemoved(void 0,this._defaultDataSource),t$$(this._removeDefaultDataSourceListener)?(this._removeDefaultDataSourceListener(),this._removeDataSourceCollectionListener()):(this._scene.primitives.remove(this._primitives),this._scene.groundPrimitives.remove(this._groundPrimitives)),s$1e(this)},l$n.prototype.update=function(e){if(n$1e.defined("time",e),!e$1P.initialized)return this._ready=!1,!1;var t,i,n,r,o=!0,a=this._dataSourceCollection,s=a.length;for(t=0;t<s;t++){var l=a.get(t);for(t$$(l.update)&&(o=l.update(e)&&o),r=(n=l._visualizers).length,i=0;i<r;i++)o=n[i].update(e)&&o}for(r=(n=this._defaultDataSource._visualizers).length,i=0;i<r;i++)o=n[i].update(e)&&o;return this._ready=o,o},l$n.prototype._postRender=function(){for(var e=this._scene.frameState,t=this._dataSourceCollection,i=t.length,n=0;n<i;n++){var r=t.get(n),o=r.credit;t$$(o)&&e.creditDisplay.addCredit(o);var a=r._resourceCredits;if(t$$(a))for(var s=a.length,l=0;l<s;l++)e.creditDisplay.addCredit(a[l])}};var B$n=[],j$l=new c$19;function a$o(e,t,i,n){if(!t$$(e))throw new t$_("entity is required.");if(!t$$(n))throw new t$_("result is required.");var r;return t$$(t)&&t.show&&t.ready&&(t$$(r=t.getGeometryInstanceAttributes(e))&&t$$(r.boundingSphere))||t$$(i)&&i.show&&i.ready&&(t$$(r=i.getGeometryInstanceAttributes(e))&&t$$(r.boundingSphere))?(c$19.clone(r.boundingSphere,n),A$T.DONE):t$$(t)&&!t.ready||t$$(i)&&!i.ready?A$T.PENDING:A$T.FAILED}l$n.prototype.getBoundingSphere=function(e,t,i){if(n$1e.defined("entity",e),n$1e.typeOf.bool("allowPartial",t),n$1e.defined("result",i),!this._ready)return A$T.PENDING;var n,r,o=this._defaultDataSource;if(!o.entities.contains(e)){o=void 0;var a=this._dataSourceCollection;for(r=a.length,n=0;n<r;n++){var s=a.get(n);if(s.entities.contains(e)){o=s;break}}}if(!t$$(o))return A$T.FAILED;var l=B$n,u=j$l,c=0,h=A$T.DONE,d=o._visualizers,f=d.length;for(n=0;n<f;n++){if(t$$(d[n].getBoundingSphere)){if(h=d[n].getBoundingSphere(e,u),!t&&h===A$T.PENDING)return A$T.PENDING;h===A$T.DONE&&(l[c]=c$19.clone(u,l[c]),c++)}}return 0===c?A$T.FAILED:(l.length=c,c$19.fromBoundingSpheres(l,i),A$T.DONE)},l$n.prototype._onDataSourceAdded=function(e,t){var i=this._scene,n=this._primitives,r=this._groundPrimitives,o=n.add(new r$l),a=r.add(new o$u);t._primitives=o,t._groundPrimitives=a;var s=t.clustering;s._initialize(i),o.add(s),t._visualizers=this._visualizersCallback(i,s,t)},l$n.prototype._onDataSourceRemoved=function(e,t){var i=this._primitives,n=this._groundPrimitives,r=t._primitives,o=t._groundPrimitives,a=t.clustering;r.remove(a);for(var s=r._primitives,l=0;l<s.length;l++)if(t$$(s[l]._instanceIds))for(var u=s[l]._instanceIds,c=0;c<u.length;c++)t$$(u[c]._polygon)&&t$$(u[c]._polygon.outlines)&&this._scene._primitives.remove(u[c]._polygon.outlines);var h=t._visualizers,d=h.length;for(c=0;c<d;c++)h[c].destroy();i.remove(r),n.remove(o),t._visualizers=void 0},l$n.prototype._onDataSourceMoved=function(e,t,i){var n=this._primitives,r=this._groundPrimitives,o=e._primitives,a=e._groundPrimitives;t===i+1?(n.raise(o),r.raise(a)):t===i-1?(n.lower(o),r.lower(a)):0===t?(n.lowerToBottom(o),r.lowerToBottom(a),n.raise(o),r.raise(a)):(n.raiseToTop(o),r.raiseToTop(a))};var f$w=new e$1z(1,1,1,1);function t$m(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._definitionChanged=new o$15,this._color=new e$1z(1,1,1,1),this._colorSubscription=void 0,this.color=e.color}Object.defineProperties(t$m.prototype,{isConstant:{get:function(){return r$w.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:v$J("color")}),t$m.prototype.getType=function(e){return"EmissionColor"},t$m.prototype.getValue=function(e,t){return t$$(t)||(t={}),t.color=r$w.getValueOrClonedDefault(this._color,e,f$w,t.color),t},t$m.prototype.equals=function(e){return this===e||e instanceof t$m&&r$w.equals(this._color,e._color)};var j$k=new r$W,k$s=new r$W,q$s=new r$W,$$n=new c$1a,R$n=new a$11,H$s=new a$11,b$A=new a$11,C$t=new a$11,U$r=new a$11,W$s=new a$11,v$u=new o$10,J$p=1.25;function ee$g(e,t,i,n,r,o,a){var s=e.scene.mode,l=r.getValue(o,e._lastCartesian);if(t$$(l)){var u,c,h,d,f,p,_=!1,m=!1;if(s===b$1d.SCENE3D){o$10.addSeconds(o,.001,v$u);var $=r.getValue(v$u,R$n);if(t$$($)||(o$10.addSeconds(o,-.001,v$u),$=r.getValue(v$u,R$n),m=!0),t$$($)){var g,y=m$13.computeFixedToIcrfMatrix(o,j$k),v=m$13.computeFixedToIcrfMatrix(v$u,k$s);t$$(y)&&t$$(v)?g=r$W.transpose(y,q$s):(g=m$13.computeTemeToPseudoFixedMatrix(o,q$s),y=r$W.transpose(g,j$k),v=m$13.computeTemeToPseudoFixedMatrix(v$u,k$s),r$W.transpose(v,v));var x=r$W.multiplyByVector(y,l,U$r),b=r$W.multiplyByVector(v,$,W$s);a$11.subtract(x,b,C$t);var S=1e3*a$11.magnitude(C$t),w=n$1d.GRAVITATIONALPARAMETER,C=-w/(S*S-2*w/a$11.magnitude(x));C<0||C>J$p*a.maximumRadius?(u=H$s,a$11.normalize(l,u),a$11.negate(u,u),h=a$11.clone(a$11.UNIT_Z,b$A),c=a$11.cross(h,u,R$n),a$11.magnitude(c)>n$1d.EPSILON7&&(a$11.normalize(u,u),a$11.normalize(c,c),h=a$11.cross(u,c,b$A),a$11.normalize(h,h),_=!0)):a$11.equalsEpsilon(l,$,n$1d.EPSILON7)||(h=H$s,a$11.normalize(x,h),a$11.normalize(b,b),c=a$11.cross(h,b,b$A),m&&(c=a$11.multiplyByScalar(c,-1,c)),a$11.equalsEpsilon(c,a$11.ZERO,n$1d.EPSILON7)||(u=a$11.cross(c,h,R$n),r$W.multiplyByVector(g,u,u),r$W.multiplyByVector(g,c,c),r$W.multiplyByVector(g,h,h),a$11.normalize(u,u),a$11.normalize(c,c),a$11.normalize(h,h),_=!0))}}t$$(e.boundingSphere)&&(l=e.boundingSphere.center),n&&(d=a$11.clone(t.position,C$t),f=a$11.clone(t.direction,U$r),p=a$11.clone(t.up,W$s));var T=$$n;_?(T[0]=u.x,T[1]=u.y,T[2]=u.z,T[3]=0,T[4]=c.x,T[5]=c.y,T[6]=c.z,T[7]=0,T[8]=h.x,T[9]=h.y,T[10]=h.z,T[11]=0,T[12]=l.x,T[13]=l.y,T[14]=l.z,T[15]=0):m$13.eastNorthUpToFixedFrame(l,a,T),t._setTransform(T),n&&(a$11.clone(d,t.position),a$11.clone(f,t.direction),a$11.clone(p,t.up),a$11.cross(f,p,t.right))}if(i){var P=s===b$1d.SCENE2D||a$11.equals(e._offset3D,a$11.ZERO)?void 0:e._offset3D;t.lookAtTransform(t.transform,P)}}function x$u(e,t,i){n$1e.defined("entity",e),n$1e.defined("scene",t),this.entity=e,this.scene=t,this.ellipsoid=e$1Y(i,n$1c.WGS84),this.boundingSphere=void 0,this._lastEntity=void 0,this._mode=void 0,this._lastCartesian=new a$11,this._defaultOffset3D=void 0,this._offset3D=new a$11}Object.defineProperties(x$u,{defaultOffset3D:{get:function(){return this._defaultOffset3D},set:function(e){this._defaultOffset3D=a$11.clone(e,new a$11)}}}),x$u.defaultOffset3D=new a$11(-14e3,3500,3500);var T$v=new h$V,te$f=new a$11;x$u.prototype.update=function(e,t){n$1e.defined("time",e);var i=this.scene,n=this.ellipsoid,r=i.mode;if(r!==b$1d.MORPHING){var o=this.entity,a=o.position;if(t$$(a)){var s=o!==this._lastEntity,l=r!==this._mode,u=i.camera,c=s||l,h=!0;if(s){var d=o.viewFrom,f=t$$(d);if(!f&&t$$(t)){T$v.pitch=-n$1d.PI_OVER_FOUR,T$v.range=0;var p=a.getValue(e,te$f);if(t$$(p)){var _=2-1/Math.max(1,a$11.magnitude(p)/n.maximumRadius);T$v.pitch*=_}u.viewBoundingSphere(t,T$v),this.boundingSphere=t,c=!1,h=!1}else(!f||!t$$(d.getValue(e,this._offset3D)))&&a$11.clone(x$u._defaultOffset3D,this._offset3D)}else!l&&this._mode!==b$1d.SCENE2D&&a$11.clone(u.position,this._offset3D);this._lastEntity=o,this._mode=r,ee$g(this,u,c,h,a,e,n)}}};var X$i={};!function(e){var t,i,n="File format is not recognized.",r="Error while reading zip file.",o="Error while reading file data.",a=524288,s="text/plain",l="message";try{t=0===new Blob([new DataView(new ArrayBuffer(0))]).size}catch{}function u(){var e=-1,t=this;t.append=function(i){var n,r=t.table;for(n=0;n<i.length;n++)e=e>>>8^r[255&(e^i[n])]},t.get=function(){return~e}}function c(e,t){var i,n;return i=new ArrayBuffer(e),n=new Uint8Array(i),t&&n.set(t,0),{buffer:i,array:n,view:new DataView(i)}}function h(){}function d(e){var t,i=this;i.size=0,i.init=function(n,r){var o=new Blob([e],{type:s});(t=new p(o)).init((function(){i.size=t.size,n()}),r)},i.readUint8Array=function(e,i,n,r){t.readUint8Array(e,i,n,r)}}function f(e){var t,i=this;i.size=0,i.init=function(n){for(var r=e.length;"="==e.charAt(r-1);)r--;t=e.indexOf(",")+1,i.size=Math.floor(.75*(r-t)),n()},i.readUint8Array=function(i,n,r){var o,a=c(n),s=4*Math.floor(i/3),l=4*Math.ceil((i+n)/3),u=window.atob(e.substring(s+t,l+t)),h=i-3*Math.floor(s/4);for(o=h;o<h+n;o++)a.array[o-h]=u.charCodeAt(o);r(a.array)}}function p(e){var t=this;t.size=0,t.init=function(t){this.size=e.size,t()},t.readUint8Array=function(t,i,n,r){var o=new FileReader;o.onload=function(e){n(new Uint8Array(e.target.result))},o.onerror=r,o.readAsArrayBuffer(function(e,t,i){return e.slice?e.slice(t,t+i):e.webkitSlice?e.webkitSlice(t,t+i):e.mozSlice?e.mozSlice(t,t+i):e.msSlice?e.msSlice(t,t+i):void 0}(e,t,i))}}function _(){}function m(e){var i,n=this;n.init=function(e){i=new Blob([],{type:s}),e()},n.writeUint8Array=function(e,n){i=new Blob([i,t?e:e.buffer],{type:s}),n()},n.getData=function(t,n){var r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=n,r.readAsText(i,e)}}function $(e){var t=this,i="",n="";t.init=function(t){i+="data:"+(e||"")+";base64,",t()},t.writeUint8Array=function(e,t){var r,o=n.length,a=n;for(n="",r=0;r<3*Math.floor((o+e.length)/3)-o;r++)a+=String.fromCharCode(e[r]);for(;r<e.length;r++)n+=String.fromCharCode(e[r]);a.length>2?i+=window.btoa(a):n=a,t()},t.getData=function(e){e(i+window.btoa(n))}}function g(e){var i,n=this;n.init=function(t){i=new Blob([],{type:e}),t()},n.writeUint8Array=function(n,r){i=new Blob([i,t?n:n.buffer],{type:e}),r()},n.getData=function(e){e(i)}}function y(e,t,i,n,r,o,s,u,c,h){var d,f,p=0;function _(){e.removeEventListener(l,m,!1),u(f)}function m(e){var t=e.data,n=t.data;t.onappend&&(f+=n.length,i.writeUint8Array(n,(function(){o(!1,n),$()}),h)),t.onflush&&(n?(f+=n.length,i.writeUint8Array(n,(function(){o(!1,n),_()}),h)):_()),t.progress&&s&&s(d+t.current,r)}function $(){(d=p*a)<r?t.readUint8Array(n+d,Math.min(a,r-d),(function(t){e.postMessage({append:!0,data:t}),p++,s&&s(d,r),o(!0,t)}),c):e.postMessage({flush:!0})}f=0,e.addEventListener(l,m,!1),$()}function v(e,t,i,n,r,o,s,l,u,c){var h,d=0,f=0;!function p(){var _;(h=d*a)<r?t.readUint8Array(n+h,Math.min(a,r-h),(function(t){var a=e.append(t,(function(){s&&s(n+h,r)}));f+=a.length,o(!0,t),i.writeUint8Array(a,(function(){o(!1,a),d++,setTimeout(p,1)}),c),s&&s(h,r)}),u):(_=e.flush())?(f+=_.length,i.writeUint8Array(_,(function(){o(!1,_),l(f)}),c)):l(f)}()}function x(e,t,i,n,r,o,s,l,c){var h=0,d=new u;!function u(){var f=h*a;f<n?e.readUint8Array(i+f,Math.min(a,n-f),(function(e){r&&d.append(e),s&&s(f,n,e),t.writeUint8Array(e,(function(){h++,u()}),c)}),l):o(n,d.get())}()}function b(e){var t,i,n="",r=["Ç","ü","é","â","ä","à","å","ç","ê","ë","è","ï","î","ì","Ä","Å","É","æ","Æ","ô","ö","ò","û","ù","ÿ","Ö","Ü","ø","£","Ø","×","ƒ","á","í","ó","ú","ñ","Ñ","ª","º","¿","®","¬","½","¼","¡","«","»","_","_","_","¦","¦","Á","Â","À","©","¦","¦","+","+","¢","¥","+","+","-","-","+","-","+","ã","Ã","+","+","-","-","¦","-","+","¤","ð","Ð","Ê","Ë","È","i","Í","Î","Ï","+","+","_","_","¦","Ì","_","Ó","ß","Ô","Ò","õ","Õ","µ","þ","Þ","Ú","Û","Ù","ý","Ý","¯","´","­","±","_","¾","¶","§","÷","¸","°","¨","·","¹","³","²","_"," "];for(t=0;t<e.length;t++)n+=(i=255&e.charCodeAt(t))>127?r[i-128]:String.fromCharCode(i);return n}function S(e){return decodeURIComponent(escape(e))}function w(e){var t,i="";for(t=0;t<e.length;t++)i+=String.fromCharCode(e[t]);return i}function C(e,t,i,n,r){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=function(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.lastModDateRaw),1!=(1&e.bitFlag)?((n||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?(e.filenameLength=t.view.getUint16(i+22,!0),e.extraFieldLength=t.view.getUint16(i+24,!0)):r("File is using Zip64 (4gb+ file size).")):r("File contains encrypted entry.")}function T(t,i){function a(){}function s(e,n){t.readUint8Array(t.size-e,e,(function(t){var i=c(t.length,t).view;1347093766!=i.getUint32(0)?s(e+1,n):n(i)}),(function(){i(r)}))}return a.prototype.getData=function(r,a,s,l){var h,d=this;function f(e,t){h&&h.terminate(),h=null,e&&e(t)}function p(e,t){l&&!function(e){var t=c(4);return t.view.setUint32(0,e),d.crc32==t.view.getUint32(0)}(t)?_():r.getData((function(e){f(a,e)}))}function _(){f(i,o)}function m(){f(i,"Error while writing file data.")}t.readUint8Array(d.offset,30,(function(o){var a,f=c(o.length,o);1347093252==f.view.getUint32(0)?(C(d,f,4,!1,i),a=d.offset+30+d.filenameLength+d.extraFieldLength,r.init((function(){0===d.compressionMethod?x(t,r,a,d.compressedSize,l,p,s,_,m):h=function(t,i,n,r,o,a,s,l,c){var h,d=new u;function f(e,t){o&&!e&&d.append(t)}function p(e){a(e,d.get())}return e.zip.useWebWorkers?y(h=new Worker(e.zip.workerScriptsPath+"inflate.js"),t,i,n,r,f,s,p,l,c):v(new e.zip.Inflater,t,i,n,r,f,s,p,l,c),h}(t,r,a,d.compressedSize,l,p,s,_,m)}),m)):i(n)}),_)},{getEntries:function(e){t.size<22?i(n):s(22,(function(o){var s,l;s=o.getUint32(16,!0),l=o.getUint16(8,!0),t.readUint8Array(s,t.size-s,(function(t){var r,o,s,u,h=0,d=[],f=c(t.length,t);for(r=0;r<l;r++){if(o=new a,1347092738!=f.view.getUint32(h))return void i(n);C(o,f,h+6,!0,i),o.commentLength=f.view.getUint16(h+32,!0),o.directory=16==(16&f.view.getUint8(h+38)),o.offset=f.view.getUint32(h+42,!0),s=w(f.array.subarray(h+46,h+46+o.filenameLength)),o.filename=2048==(2048&o.bitFlag)?S(s):b(s),!o.directory&&"/"==o.filename.charAt(o.filename.length-1)&&(o.directory=!0),u=w(f.array.subarray(h+46+o.filenameLength+o.extraFieldLength,h+46+o.filenameLength+o.extraFieldLength+o.commentLength)),o.comment=2048==(2048&o.bitFlag)?S(u):b(u),d.push(o),h+=46+o.filenameLength+o.extraFieldLength+o.commentLength}e(d)}),(function(){i(r)}))}))},close:function(e){e&&e()}}}function P(e){return unescape(encodeURIComponent(e))}function E(e){var t,i=[];for(t=0;t<e.length;t++)i.push(e.charCodeAt(t));return i}function A(t,i,n){var r,a={},s=[],h=0;function d(e,t){r&&r.terminate(),r=null,e&&e(t)}function f(){d(i,"Error while writing zip file.")}function p(){d(i,o)}return{add:function(o,_,m,$,g){var b,S,w;function C(e,i){var n=c(16);h+=e||0,n.view.setUint32(0,1347094280),typeof i<"u"&&(b.view.setUint32(10,i,!0),n.view.setUint32(4,i,!0)),_&&(n.view.setUint32(8,e,!0),b.view.setUint32(14,e,!0),n.view.setUint32(12,_.size,!0),b.view.setUint32(18,_.size,!0)),t.writeUint8Array(n.array,(function(){h+=16,d(m)}),f)}function T(){g=g||{},o=o.trim(),g.directory&&"/"!=o.charAt(o.length-1)&&(o+="/"),a.hasOwnProperty(o)?i("File already exists."):(S=E(P(o)),s.push(o),function(e){var i;w=g.lastModDate||new Date,b=c(26),a[o]={headerArray:b.array,directory:g.directory,filename:S,offset:h,comment:E(P(g.comment||""))},b.view.setUint32(0,335546376),g.version&&b.view.setUint8(0,g.version),!n&&0!==g.level&&!g.directory&&b.view.setUint16(4,2048),b.view.setUint16(6,(w.getHours()<<6|w.getMinutes())<<5|w.getSeconds()/2,!0),b.view.setUint16(8,(w.getFullYear()-1980<<4|w.getMonth()+1)<<5|w.getDate(),!0),b.view.setUint16(22,S.length,!0),(i=c(30+S.length)).view.setUint32(0,1347093252),i.array.set(b.array,4),i.array.set(S,30),h+=i.array.length,t.writeUint8Array(i.array,e,f)}((function(){_?n||0===g.level?x(_,t,0,_.size,!0,C,$,p,f):r=function(t,i,n,r,o,a,s){var c,h=new u;function d(e,t){e&&h.append(t)}function f(e){r(e,h.get())}return e.zip.useWebWorkers?((c=new Worker(e.zip.workerScriptsPath+"deflate.js")).addEventListener(l,(function e(){c.removeEventListener(l,e,!1),y(c,t,i,0,t.size,d,o,f,a,s)}),!1),c.postMessage({init:!0,level:n})):v(new e.zip.Deflater,t,i,0,t.size,d,o,f,a,s),c}(_,t,g.level,C,$,p,f):C()})))}_?_.init(T,p):T()},close:function(e){var i,n,r,o=0,l=0;for(n=0;n<s.length;n++)o+=46+(r=a[s[n]]).filename.length+r.comment.length;for(i=c(o+22),n=0;n<s.length;n++)r=a[s[n]],i.view.setUint32(l,1347092738),i.view.setUint16(l+4,5120),i.array.set(r.headerArray,l+6),i.view.setUint16(l+32,r.comment.length,!0),r.directory&&i.view.setUint8(l+38,16),i.view.setUint32(l+42,r.offset,!0),i.array.set(r.filename,l+46),i.array.set(r.comment,l+46+r.filename.length),l+=46+r.filename.length+r.comment.length;i.view.setUint32(l,1347093766),i.view.setUint16(l+8,s.length,!0),i.view.setUint16(l+10,s.length,!0),i.view.setUint32(l+12,o,!0),i.view.setUint32(l+16,h,!0),t.writeUint8Array(i.array,(function(){d((function(){t.getData(e)}))}),f)}}}u.prototype.table=function(){var e,t,i,n=[];for(e=0;e<256;e++){for(i=e,t=0;t<8;t++)1&i?i=i>>>1^3988292384:i>>>=1;n[e]=i}return n}(),d.prototype=new h,d.prototype.constructor=d,f.prototype=new h,f.prototype.constructor=f,p.prototype=new h,p.prototype.constructor=p,_.prototype.getData=function(e){e(this.data)},m.prototype=new _,m.prototype.constructor=m,$.prototype=new _,$.prototype.constructor=$,g.prototype=new _,g.prototype.constructor=g,e.zip={Reader:h,Writer:_,BlobReader:p,Data64URIReader:f,TextReader:d,BlobWriter:g,Data64URIWriter:$,TextWriter:m,createReader:function(e,t,i){e.init((function(){t(T(e,i))}),i)},createWriter:function(e,t,i,n){e.init((function(){t(A(e,i,n))}),i)},useWebWorkers:!0},Object.defineProperties(e.zip,{workerScriptsPath:{get:function(){return typeof i>"u"&&(i=o$12("ThirdParty/Workers/")),i}}})}(X$i);var he$a=X$i.zip,ae$i=32,He$9="http://www.opengis.net/kml/2.2",I$v="http://www.google.com/kml/ext/2.2",Be$d="http://www.w3.org/2000/xmlns/";function K$l(e){this._files={},this._promises=[],this._count=0,this._modelCallback=e}var ze$a=/^data:image\/([^,;]+)/;function je$9(e,t){return function(i){e._files[t]=i}}function $$m(e){this._time=e}function ne$e(){this._ids={},this._styles={},this._count=0}function fe$d(){this._ids={}}function oe$g(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).entities,i=e$1Y(e.kmz,!1);if(!t$$(t))throw new t$_("entities is required.");var n=oe$g._createState(e),r=t.values.filter((function(e){return!t$$(e.parent)})),o=n.kmlDoc,a=o.documentElement;a.setAttributeNS(Be$d,"xmlns:gx",I$v);var s=o.createElement("Document");a.appendChild(s),ge$b(n,s,r),n.styleCache.save(s);var l=n.externalFileHandler;return l.promise.then((function(){var e=(new XMLSerializer).serializeToString(n.kmlDoc);return i?We$b(e,l.files):{kml:e,externalFiles:l.files}}))}function We$b(e,t){var i=c$18.defer();return he$a.createWriter(new he$a.BlobWriter,(function(n){qe$8(n,e).then((function(){var e=Object.keys(t);return ve$c(n,e,t,0)})).then((function(){n.close((function(e){i.resolve({kmz:e})}))}))})),i.promise}function qe$8(e,t){var i=c$18.defer();return e.add("doc.kml",new he$a.TextReader(t),(function(){i.resolve()})),i.promise}function ve$c(e,t,i,n){if(t.length!==n){var r=t[n],o=c$18.defer();return e.add(r,new he$a.BlobReader(i[r]),(function(){o.resolve()})),o.promise.then((function(){return ve$c(e,t,i,n+1)}))}}function ge$b(e,t,i){for(var n,r,o,a=e.kmlDoc,s=e.styleCache,l=e.valueGetter,u=e.idManager,c=i.length,h=0;h<c;++h){var d=i[h];n=[],Qe$7(e,d,r=[],o=[]),Xe$5(e,d.polyline,r,o),_e$9(e,d.rectangle,r,o,n),_e$9(e,d.polygon,r,o,n),tt$9(e,d,d.model,r,o);var f,p=d.availability;t$$(p)&&(f=a.createElement("TimeSpan"),o$10.equals(p.start,f$S.MINIMUM_VALUE)||f.appendChild(l$m(a,"begin",o$10.toIso8601(p.start))),o$10.equals(p.stop,f$S.MAXIMUM_VALUE)||f.appendChild(l$m(a,"end",o$10.toIso8601(p.stop))));for(var _=0;_<n.length;++_){var m=n[_];m.setAttribute("id",u.get(d.id)),m.appendChild(l$m(a,"name",d.name)),m.appendChild(l$m(a,"visibility",d.show)),m.appendChild(l$m(a,"description",d.description)),t$$(f)&&m.appendChild(f),t.appendChild(m)}var $=r.length;if($>0){var g=a.createElement("Placemark");g.setAttribute("id",u.get(d.id));var y=d.name,v=d.label;if(t$$(v)){var x=a.createElement("LabelStyle"),b=l.get(v.text);y=t$$(b)&&b.length>0?b:y;var S=l.getColor(v.fillColor);t$$(S)&&(x.appendChild(l$m(a,"color",S)),x.appendChild(l$m(a,"colorMode","normal")));var w=l.get(v.scale);t$$(w)&&x.appendChild(l$m(a,"scale",w)),o.push(x)}g.appendChild(l$m(a,"name",y)),g.appendChild(l$m(a,"visibility",d.show)),g.appendChild(l$m(a,"description",d.description)),t$$(f)&&g.appendChild(f),t.appendChild(g);var C=o.length;if(C>0){for(var T=a.createElement("Style"),P=0;P<C;++P)T.appendChild(o[P]);g.appendChild(l$m(a,"styleUrl",s.get(T)))}if(1===r.length)g.appendChild(r[0]);else if(r.length>1){for(var E=a.createElement("MultiGeometry"),A=0;A<$;++A)E.appendChild(r[A]);g.appendChild(E)}}var L=d._children;if(L.length>0){var M=a.createElement("Folder");M.setAttribute("id",u.get(d.id)),M.appendChild(l$m(a,"name",d.name)),M.appendChild(l$m(a,"visibility",d.show)),M.appendChild(l$m(a,"description",d.description)),t.appendChild(M),ge$b(e,M,L)}}}K$l.prototype.texture=function(e){var t,i=this;if("string"==typeof e||e instanceof t$X){if(!(e=t$X.createIfNeeded(e)).isDataUri)return e.url;var n=e.url.match(ze$a);t="texture_"+ ++this._count,t$$(n)&&(t+="."+n[1]);var r=e.fetchBlob().then((function(e){i._files[t]=e}));return this._promises.push(r),t}if(e instanceof HTMLCanvasElement){var o=c$18.defer();return this._promises.push(o.promise),t="texture_"+ ++this._count+".png",e.toBlob((function(e){i._files[t]=e,o.resolve()})),t}return""},K$l.prototype.model=function(e,t){var i=this._modelCallback;if(!t$$(i))throw new t$Z("Encountered a model entity while exporting to KML, but no model callback was supplied.");var n={},r=i(e,t,n);for(var o in n)if(n.hasOwnProperty(o)){var a=c$18(n[o]);this._promises.push(a),a.then(je$9(this,o))}return r},Object.defineProperties(K$l.prototype,{promise:{get:function(){return c$18.all(this._promises)}},files:{get:function(){return this._files}}}),$$m.prototype.get=function(e,t,i){var n;return t$$(e)&&(n=t$$(e.getValue)?e.getValue(this._time,i):e),e$1Y(n,t)},$$m.prototype.getColor=function(e,t){var i=this.get(e,t);if(t$$(i))return U$q(i)},$$m.prototype.getMaterialType=function(e){if(t$$(e))return e.getType(this._time)},ne$e.prototype.get=function(e){var t=this._ids,i=e.innerHTML;if(t$$(t[i]))return t[i];var n="style-"+ ++this._count;return e.setAttribute("id",n),n="#"+n,t[i]=n,this._styles[i]=e,n},ne$e.prototype.save=function(e){var t=this._styles,i=e.childNodes[0];for(var n in t)t.hasOwnProperty(n)&&e.insertBefore(t[n],i)},fe$d.prototype.get=function(e){if(!t$$(e))return this.get(t$U());var t=this._ids;return t$$(t[e])?e.toString()+"-"+ ++t[e]:(t[e]=0,e)},oe$g._createState=function(e){var t=e.entities,i=new ne$e,n=t.computeAvailability(),r=t$$(e.time)?e.time:n.start,o=e$1Y(e.defaultAvailability,n),a=e$1Y(e.sampleDuration,60);o.start===f$S.MINIMUM_VALUE?o.stop===f$S.MAXIMUM_VALUE?o=new n$T:o$10.addSeconds(o.stop,-10*a,o.start):o.stop===f$S.MAXIMUM_VALUE&&o$10.addSeconds(o.start,10*a,o.stop);var s=new K$l(e.modelCallback);return{kmlDoc:document.implementation.createDocument(He$9,"kml"),ellipsoid:e$1Y(e.ellipsoid,n$1c.WGS84),idManager:new fe$d,styleCache:i,externalFileHandler:s,time:r,valueGetter:new $$m(r),sampleDuration:a,defaultAvailability:new p$X([o])}};var T$u=new a$11,D$x=new i$1g,b$z=new o$10;function Qe$7(e,t,i,n){var r=e.kmlDoc,o=e.ellipsoid,a=e.valueGetter,s=e$1Y(t.billboard,t.point);if(t$$(s)||t$$(t.path)){var l=t.position;if(!l.isConstant)return void Ce$d(e,t,s,i,n);a.get(l,void 0,T$u);var u=l$m(r,"coordinates",O$o(T$u,o)),c=r.createElement("Point"),h=r.createElement("altitudeMode");h.appendChild(R$m(e,s.heightReference)),c.appendChild(h),c.appendChild(u),i.push(c);var d=s instanceof s$W?Ee$d(e,s):ye$f(e,s);n.push(d)}}function Ce$d(e,t,i,n,r){var o,a=e.kmlDoc,s=e.ellipsoid,l=e.valueGetter,u=t.position,c=!0;u instanceof t$t?(o=u.intervals,c=!1):o=e$1Y(t.availability,e.defaultAvailability);var h,d,f,p=i instanceof e$10,_=[];for(h=0;h<o.length;++h){var m=o.get(h),$=c?u:m.data,g=a.createElement("altitudeMode");$ instanceof i$u?($=$._value,g.appendChild(R$m(e,U$Y.CLAMP_TO_GROUND))):t$$(i)?g.appendChild(R$m(e,i.heightReference)):g.appendChild(R$m(e,U$Y.NONE));var y=[],v=[];if($.isConstant){l.get($,void 0,T$u);var x=l$m(a,"coordinates",O$o(T$u,s));y.push(o$10.toIso8601(m.start)),v.push(x),y.push(o$10.toIso8601(m.stop)),v.push(x)}else if($ instanceof o$v)for(f=$._property._times,d=0;d<f.length;++d)y.push(o$10.toIso8601(f[d])),$.getValueInReferenceFrame(f[d],be$t.FIXED,T$u),v.push(O$o(T$u,s));else if($ instanceof g$o){f=$._times;var b=$._values;for(d=0;d<f.length;++d)y.push(o$10.toIso8601(f[d])),a$11.fromArray(b,3*d,T$u),v.push(O$o(T$u,s))}else{var S=e.sampleDuration;m.start.clone(b$z),m.isStartIncluded||o$10.addSeconds(b$z,S,b$z);for(var w=m.stop;o$10.lessThan(b$z,w);)$.getValue(b$z,T$u),y.push(o$10.toIso8601(b$z)),v.push(O$o(T$u,s)),o$10.addSeconds(b$z,S,b$z);m.isStopIncluded&&o$10.equals(b$z,w)&&($.getValue(b$z,T$u),y.push(o$10.toIso8601(b$z)),v.push(O$o(T$u,s)))}var C=a.createElementNS(I$v,"Track");C.appendChild(g);for(var T=0;T<y.length;++T){var P=l$m(a,"when",y[T]),E=l$m(a,"coord",v[T],I$v);C.appendChild(P),C.appendChild(E)}p&&C.appendChild(De$i(e,i)),_.push(C)}if(1===_.length)n.push(_[0]);else if(_.length>1){var A=a.createElementNS(I$v,"MultiTrack");for(h=0;h<_.length;++h)A.appendChild(_[h]);n.push(A)}if(t$$(i)&&!p){var L=i instanceof s$W?Ee$d(e,i):ye$f(e,i);r.push(L)}var M=t.path;if(t$$(M)){var I=l.get(M.width),O=M.material;if(t$$(O)||t$$(I)){var D=a.createElement("LineStyle");t$$(I)&&D.appendChild(l$m(a,"width",I)),de$d(e,O,D),r.push(D)}}}function ye$f(e,t){var i=e.kmlDoc,n=e.valueGetter,r=i.createElement("IconStyle"),o=n.getColor(t.color);t$$(o)&&(r.appendChild(l$m(i,"color",o)),r.appendChild(l$m(i,"colorMode","normal")));var a=n.get(t.pixelSize);return t$$(a)&&r.appendChild(l$m(i,"scale",a/ae$i)),r}function Ee$d(e,t){var i=e.kmlDoc,n=e.valueGetter,r=e.externalFileHandler,o=i.createElement("IconStyle"),a=n.get(t.image);if(t$$(a)){a=r.texture(a);var s=i.createElement("Icon");s.appendChild(l$m(i,"href",a));var l=n.get(t.imageSubRegion);t$$(l)&&(s.appendChild(l$m(i,"x",l.x,I$v)),s.appendChild(l$m(i,"y",l.y,I$v)),s.appendChild(l$m(i,"w",l.width,I$v)),s.appendChild(l$m(i,"h",l.height,I$v))),o.appendChild(s)}var u=n.getColor(t.color);t$$(u)&&(o.appendChild(l$m(i,"color",u)),o.appendChild(l$m(i,"colorMode","normal")));var c=n.get(t.scale);t$$(c)&&o.appendChild(l$m(i,"scale",c));var h=n.get(t.pixelOffset);if(t$$(h)){c=e$1Y(c,1),r$T.divideByScalar(h,c,h);var d=n.get(t.width,ae$i),f=n.get(t.height,ae$i),p=n.get(t.horizontalOrigin,N$W.CENTER);p===N$W.CENTER?h.x-=.5*d:p===N$W.RIGHT&&(h.x-=d);var _=n.get(t.verticalOrigin,j$10.CENTER);_===j$10.TOP?h.y+=f:_===j$10.CENTER&&(h.y+=.5*f);var m=i.createElement("hotSpot");m.setAttribute("x",-h.x),m.setAttribute("y",h.y),m.setAttribute("xunits","pixels"),m.setAttribute("yunits","pixels"),o.appendChild(m)}var $=n.get(t.rotation),g=n.get(t.alignedAxis);return t$$($)&&a$11.equals(a$11.UNIT_Z,g)&&(0===($=n$1d.toDegrees(-$))&&($=360),o.appendChild(l$m(i,"heading",$))),o}function Xe$5(e,t,i,n){var r=e.kmlDoc,o=e.ellipsoid,a=e.valueGetter;if(t$$(t)){var s,l=r.createElement("LineString"),u=r.createElement("altitudeMode"),c=a.get(t.clampToGround,!1);c?(l.appendChild(l$m(r,"tessellate",!0)),s=r.createTextNode("clampToGround")):s=r.createTextNode("absolute"),u.appendChild(s),l.appendChild(u);var h=t.positions,d=l$m(r,"coordinates",O$o(a.get(h),o));l.appendChild(d);var f=a.get(t.zIndex);c&&t$$(f)&&l.appendChild(l$m(r,"drawOrder",f,I$v)),i.push(l);var p=r.createElement("LineStyle"),_=a.get(t.width);t$$(_)&&p.appendChild(l$m(r,"width",_)),de$d(e,t.material,p),n.push(p)}}function Ye$8(e,t,i){var n,r=e.kmlDoc,o=e.valueGetter,a=o.get(t.height,0);i>0&&(a=i);for(var s=t.coordinates,l=o.get(s),u=[],c=[s$1p.northeast,s$1p.southeast,s$1p.southwest,s$1p.northwest],h=0;h<4;++h)c[h](l,D$x),u.push(n$1d.toDegrees(D$x.longitude)+","+n$1d.toDegrees(D$x.latitude)+","+a);n=l$m(r,"coordinates",u.join(" "));var d=r.createElement("outerBoundaryIs"),f=r.createElement("LinearRing");return f.appendChild(n),d.appendChild(f),[d]}function we$c(e,t,i,n){for(var r=e.kmlDoc,o=e.ellipsoid,a=[],s=t.length,l=0;l<s;++l)i$1g.fromCartesian(t[l],o,D$x),a.push(n$1d.toDegrees(D$x.longitude)+","+n$1d.toDegrees(D$x.latitude)+","+(n?D$x.height:i));var u=l$m(r,"coordinates",a.join(" ")),c=r.createElement("LinearRing");return c.appendChild(u),c}function Ze$6(e,t,i){var n=e.kmlDoc,r=e.valueGetter,o=r.get(t.height,0),a=r.get(t.perPositionHeight,!1);!a&&i>0&&(o=i);var s=[],l=t.hierarchy,u=r.get(l),c=Array.isArray(u)?u:u.positions,h=n.createElement("outerBoundaryIs");h.appendChild(we$c(e,c,o,a)),s.push(h);var d=u.holes;if(t$$(d))for(var f=d.length,p=0;p<f;++p){var _=n.createElement("innerBoundaryIs");_.appendChild(we$c(e,d[p].positions,o,a)),s.push(_)}return s}function _e$9(e,t,i,n,r){var o=e.kmlDoc,a=e.valueGetter;if(t$$(t)){var s=t instanceof o$A;if(s&&"Image"===a.getMaterialType(t.material))return void Je$4(e,t,r);var l=o.createElement("Polygon"),u=a.get(t.extrudedHeight,0);u>0&&l.appendChild(l$m(o,"extrude",!0));for(var c=s?Ye$8(e,t,u):Ze$6(e,t,u),h=c.length,d=0;d<h;++d)l.appendChild(c[d]);var f=o.createElement("altitudeMode");f.appendChild(R$m(e,t.heightReference)),l.appendChild(f),i.push(l);var p=o.createElement("PolyStyle"),_=a.get(t.fill,!1);_&&p.appendChild(l$m(o,"fill",_)),de$d(e,t.material,p);var m=a.get(t.outline,!1);if(m){p.appendChild(l$m(o,"outline",m));var $=o.createElement("LineStyle"),g=a.get(t.outlineWidth,1);$.appendChild(l$m(o,"width",g));var y=a.getColor(t.outlineColor,e$1z.BLACK);$.appendChild(l$m(o,"color",y)),$.appendChild(l$m(o,"colorMode","normal")),n.push($)}n.push(p)}}function Je$4(e,t,i){var n=e.kmlDoc,r=e.valueGetter,o=e.externalFileHandler,a=n.createElement("GroundOverlay"),s=n.createElement("altitudeMode");s.appendChild(R$m(e,t.heightReference)),a.appendChild(s);var l=r.get(t.height);t$$(l)&&a.appendChild(l$m(n,"altitude",l));var u=r.get(t.coordinates),c=n.createElement("LatLonBox");c.appendChild(l$m(n,"north",n$1d.toDegrees(u.north))),c.appendChild(l$m(n,"south",n$1d.toDegrees(u.south))),c.appendChild(l$m(n,"east",n$1d.toDegrees(u.east))),c.appendChild(l$m(n,"west",n$1d.toDegrees(u.west))),a.appendChild(c);var h=r.get(t.material),d=o.texture(h.image),f=n.createElement("Icon");f.appendChild(l$m(n,"href",d)),a.appendChild(f),t$$(h.color)&&a.appendChild(l$m(n,"color",U$q(h.color))),i.push(a)}var Ke$6=new a$11;function De$i(e,t){var i=e.kmlDoc,n=e.valueGetter,r=e.externalFileHandler,o=i.createElement("Model"),a=n.get(t.scale);if(t$$(a)){a instanceof a$11||(a=a$11.fromElements(a,a,a,Ke$6));var s=i.createElement("Scale");s.appendChild(l$m(i,"x",a.x)),s.appendChild(l$m(i,"y",a.y)),s.appendChild(l$m(i,"z",a.z)),o.appendChild(s)}var l=i.createElement("Link"),u=r.model(t,e.time);return l.appendChild(l$m(i,"href",u)),o.appendChild(l),o}var Me$e=new r$W,$e$5=new c$1a,le$j=new c$1a;function et$7(e,t){var i=m$13.eastNorthUpToFixedFrame(e,void 0,le$j),n=r$W.fromQuaternion(t,Me$e),r=c$1a.fromRotationTranslation(n,a$11.ZERO,$e$5),o=c$1a.inverse(i,le$j),a=c$1a.multiply(o,r,le$j),s=c$1a.getMatrix3(a,Me$e);return e$1L.fromQuaternion(a$U.fromRotationMatrix(s))}function tt$9(e,t,i,n,r){var o=e.kmlDoc,a=e.ellipsoid,s=e.valueGetter;if(t$$(i)){var l=t.position;if(!l.isConstant)return void Ce$d(e,t,i,n,r);var u=De$i(e,i),c=o.createElement("altitudeMode");c.appendChild(R$m(e,i.heightReference)),u.appendChild(c),s.get(l,void 0,T$u),i$1g.fromCartesian(T$u,a,D$x);var h=o.createElement("Location");h.appendChild(l$m(o,"longitude",n$1d.toDegrees(D$x.longitude))),h.appendChild(l$m(o,"latitude",n$1d.toDegrees(D$x.latitude))),h.appendChild(l$m(o,"altitude",D$x.height)),u.appendChild(h);var d=a$U.IDENTITY;t$$(t.orientation)&&(d=t.orientation.getValue(e.time));var f=et$7(t.position.getValue(e.time),d),p=o.createElement("Orientation");p.appendChild(l$m(o,"heading",n$1d.toDegrees(f.heading))),p.appendChild(l$m(o,"tilt",n$1d.toDegrees(f.pitch))),p.appendChild(l$m(o,"roll",n$1d.toDegrees(f.roll))),u.appendChild(p),n.push(u)}}function de$d(e,t,i){var n=e.kmlDoc,r=e.valueGetter;if(t$$(t)){var o=r.get(t);if(t$$(o)){var a;switch(r.getMaterialType(t)){case"Image":a=U$q(e$1z.WHITE);break;case"Color":case"Grid":case"PolylineGlow":case"PolylineArrow":case"PolylineDash":a=U$q(o.color);break;case"PolylineOutline":a=U$q(o.color);var s=U$q(o.outlineColor),l=o.outlineWidth;i.appendChild(l$m(n,"outerColor",s,I$v)),i.appendChild(l$m(n,"outerWidth",l,I$v));break;case"Stripe":a=U$q(o.oddColor)}t$$(a)&&(i.appendChild(l$m(n,"color",a)),i.appendChild(l$m(n,"colorMode","normal")))}}}function R$m(e,t){var i,n=e.kmlDoc;switch(e.valueGetter.get(t,U$Y.NONE)){case U$Y.NONE:i=n.createTextNode("absolute");break;case U$Y.CLAMP_TO_GROUND:i=n.createTextNode("clampToGround");break;case U$Y.RELATIVE_TO_GROUND:i=n.createTextNode("relativeToGround")}return i}function O$o(e,t){Array.isArray(e)||(e=[e]);for(var i=e.length,n=[],r=0;r<i;++r)i$1g.fromCartesian(e[r],t,D$x),n.push(n$1d.toDegrees(D$x.longitude)+","+n$1d.toDegrees(D$x.latitude)+","+D$x.height);return n.join(" ")}function l$m(e,t,i,n){"boolean"==typeof(i=e$1Y(i,""))&&(i=i?"1":"0");var r=t$$(n)?e.createElementNS(n,t):e.createElement(t),o="string"===i&&-1!==i.indexOf("<")?e.createCDATASection(i):e.createTextNode(i);return r.appendChild(o),r}function U$q(e){for(var t="",i=e.toBytes(),n=3;n>=0;--n)t+=i[n]<16?"0"+i[n].toString(16):i[n].toString(16);return t} /** @license topojson - https://github.com/topojson/topojson Copyright (c) 2012-2016, 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. **/var fr={};!function(e,t){!function(e){var t=function(e){return e},i=function(e){if(null==e)return t;var i,n,r=e.scale[0],o=e.scale[1],a=e.translate[0],s=e.translate[1];return function(e,t){t||(i=n=0);var l=2,u=e.length,c=new Array(u);for(c[0]=(i+=e[0])*r+a,c[1]=(n+=e[1])*o+s;l<u;)c[l]=e[l],++l;return c}},n=function(e){var t,n=i(e.transform),r=1/0,o=r,a=-r,s=-r;function l(e){(e=n(e))[0]<r&&(r=e[0]),e[0]>a&&(a=e[0]),e[1]<o&&(o=e[1]),e[1]>s&&(s=e[1])}function u(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(u);break;case"Point":l(e.coordinates);break;case"MultiPoint":e.coordinates.forEach(l)}}for(t in e.arcs.forEach((function(e){for(var t,i=-1,l=e.length;++i<l;)(t=n(e[i],i))[0]<r&&(r=t[0]),t[0]>a&&(a=t[0]),t[1]<o&&(o=t[1]),t[1]>s&&(s=t[1])})),e.objects)u(e.objects[t]);return[r,o,a,s]},r=function(e,t){for(var i,n=e.length,r=n-t;r<--n;)i=e[r],e[r++]=e[n],e[n]=i},o=function(e,t){return"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map((function(t){return a(e,t)}))}:a(e,t)};function a(e,t){var i=t.id,n=t.bbox,r=null==t.properties?{}:t.properties,o=s(e,t);return null==i&&null==n?{type:"Feature",properties:r,geometry:o}:null==n?{type:"Feature",id:i,properties:r,geometry:o}:{type:"Feature",id:i,bbox:n,properties:r,geometry:o}}function s(e,t){var n=i(e.transform),o=e.arcs;function a(e,t){t.length&&t.pop();for(var i=o[e<0?~e:e],a=0,s=i.length;a<s;++a)t.push(n(i[a],a));e<0&&r(t,s)}function s(e){return n(e)}function l(e){for(var t=[],i=0,n=e.length;i<n;++i)a(e[i],t);return t.length<2&&t.push(t[0]),t}function u(e){for(var t=l(e);t.length<4;)t.push(t[0]);return t}function c(e){return e.map(u)}function h(e){var t,i=e.type;switch(i){case"GeometryCollection":return{type:i,geometries:e.geometries.map(h)};case"Point":t=s(e.coordinates);break;case"MultiPoint":t=e.coordinates.map(s);break;case"LineString":t=l(e.arcs);break;case"MultiLineString":t=e.arcs.map(l);break;case"Polygon":t=c(e.arcs);break;case"MultiPolygon":t=e.arcs.map(c);break;default:return null}return{type:i,coordinates:t}}return h(t)}var l=function(e,t){var i={},n={},r={},o=[],a=-1;function s(t){var i,n=e.arcs[t<0?~t:t],r=n[0];return e.transform?(i=[0,0],n.forEach((function(e){i[0]+=e[0],i[1]+=e[1]}))):i=n[n.length-1],t<0?[i,r]:[r,i]}function l(e,t){for(var n in e){var r=e[n];delete t[r.start],delete r.start,delete r.end,r.forEach((function(e){i[e<0?~e:e]=1})),o.push(r)}}return t.forEach((function(i,n){var r,o=e.arcs[i<0?~i:i];o.length<3&&!o[1][0]&&!o[1][1]&&(r=t[++a],t[a]=i,t[n]=r)})),t.forEach((function(e){var t,i,o=s(e),a=o[0],l=o[1];if(t=r[a])if(delete r[t.end],t.push(e),t.end=l,i=n[l]){delete n[i.start];var u=i===t?t:t.concat(i);n[u.start=t.start]=r[u.end=i.end]=u}else n[t.start]=r[t.end]=t;else if(t=n[l])if(delete n[t.start],t.unshift(e),t.start=a,i=r[a]){delete r[i.end];var c=i===t?t:i.concat(t);n[c.start=i.start]=r[c.end=t.end]=c}else n[t.start]=r[t.end]=t;else n[(t=[e]).start=a]=r[t.end=l]=t})),l(r,n),l(n,r),t.forEach((function(e){i[e<0?~e:e]||o.push([e])})),o},u=function(e){return s(e,c.apply(this,arguments))};function c(e,t,i){var n,r,o;if(arguments.length>1)n=h(e,t,i);else for(r=0,n=new Array(o=e.arcs.length);r<o;++r)n[r]=r;return{type:"MultiLineString",arcs:l(e,n)}}function h(e,t,i){var n,r=[],o=[];function a(e){var t=e<0?~e:e;(o[t]||(o[t]=[])).push({i:e,g:n})}function s(e){e.forEach(a)}function l(e){e.forEach(s)}function u(e){e.forEach(l)}function c(e){switch(n=e,e.type){case"GeometryCollection":e.geometries.forEach(c);break;case"LineString":s(e.arcs);break;case"MultiLineString":case"Polygon":l(e.arcs);break;case"MultiPolygon":u(e.arcs)}}return c(t),o.forEach(null==i?function(e){r.push(e[0].i)}:function(e){i(e[0].g,e[e.length-1].g)&&r.push(e[0].i)}),r}function d(e){for(var t,i=-1,n=e.length,r=e[n-1],o=0;++i<n;)t=r,r=e[i],o+=t[0]*r[1]-t[1]*r[0];return Math.abs(o)}var f=function(e){return s(e,p.apply(this,arguments))};function p(e,t){var i={},n=[],r=[];function o(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(o);break;case"Polygon":a(e.arcs);break;case"MultiPolygon":e.arcs.forEach(a)}}function a(e){e.forEach((function(t){t.forEach((function(t){(i[t=t<0?~t:t]||(i[t]=[])).push(e)}))})),n.push(e)}function u(t){return d(s(e,{type:"Polygon",arcs:[t]}).coordinates[0])}return t.forEach(o),n.forEach((function(e){if(!e._){var t=[],n=[e];for(e._=1,r.push(t);e=n.pop();)t.push(e),e.forEach((function(e){e.forEach((function(e){i[e<0?~e:e].forEach((function(e){e._||(e._=1,n.push(e))}))}))}))}})),n.forEach((function(e){delete e._})),{type:"MultiPolygon",arcs:r.map((function(t){var n,r=[];if(t.forEach((function(e){e.forEach((function(e){e.forEach((function(e){i[e<0?~e:e].length<2&&r.push(e)}))}))})),(n=(r=l(e,r)).length)>1)for(var o,a,s=1,c=u(r[0]);s<n;++s)(o=u(r[s]))>c&&(a=r[0],r[0]=r[s],r[s]=a,c=o);return r}))}}var _=function(e,t){for(var i=0,n=e.length;i<n;){var r=i+n>>>1;e[r]<t?i=r+1:n=r}return i},m=function(e){var t={},i=e.map((function(){return[]}));function n(e,i){e.forEach((function(e){e<0&&(e=~e);var n=t[e];n?n.push(i):t[e]=[i]}))}function r(e,t){e.forEach((function(e){n(e,t)}))}function o(e,t){"GeometryCollection"===e.type?e.geometries.forEach((function(e){o(e,t)})):e.type in a&&a[e.type](e.arcs,t)}var a={LineString:n,MultiLineString:r,Polygon:r,MultiPolygon:function(e,t){e.forEach((function(e){r(e,t)}))}};for(var s in e.forEach(o),t)for(var l=t[s],u=l.length,c=0;c<u;++c)for(var h=c+1;h<u;++h){var d,f=l[c],p=l[h];(d=i[f])[s=_(d,p)]!==p&&d.splice(s,0,p),(d=i[p])[s=_(d,f)]!==f&&d.splice(s,0,f)}return i},$=function(e){if(null==e)return t;var i,n,r=e.scale[0],o=e.scale[1],a=e.translate[0],s=e.translate[1];return function(e,t){t||(i=n=0);var l=2,u=e.length,c=new Array(u),h=Math.round((e[0]-a)/r),d=Math.round((e[1]-s)/o);for(c[0]=h-i,i=h,c[1]=d-n,n=d;l<u;)c[l]=e[l],++l;return c}},g=function(e,t){if(e.transform)throw new Error("already quantized");if(t&&t.scale)l=e.bbox;else{if(!((i=Math.floor(t))>=2))throw new Error("n must be ≥2");var i,r=(l=e.bbox||n(e))[0],o=l[1],a=l[2],s=l[3];t={scale:[a-r?(a-r)/(i-1):1,s-o?(s-o)/(i-1):1],translate:[r,o]}}var l,u,c=$(t),h=e.objects,d={};function f(e){return c(e)}function p(e){var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(p)};break;case"Point":t={type:"Point",coordinates:f(e.coordinates)};break;case"MultiPoint":t={type:"MultiPoint",coordinates:e.coordinates.map(f)};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}function _(e){var t,i=0,n=1,r=e.length,o=new Array(r);for(o[0]=c(e[0],0);++i<r;)((t=c(e[i],i))[0]||t[1])&&(o[n++]=t);return 1===n&&(o[n++]=[0,0]),o.length=n,o}for(u in h)d[u]=p(h[u]);return{type:"Topology",bbox:l,transform:t,objects:d,arcs:e.arcs.map(_)}},y=function(e){var t=1/0,i=1/0,n=-1/0,r=-1/0;function o(e){null!=e&&a.hasOwnProperty(e.type)&&a[e.type](e)}var a={GeometryCollection:function(e){e.geometries.forEach(o)},Point:function(e){s(e.coordinates)},MultiPoint:function(e){e.coordinates.forEach(s)},LineString:function(e){l(e.arcs)},MultiLineString:function(e){e.arcs.forEach(l)},Polygon:function(e){e.arcs.forEach(l)},MultiPolygon:function(e){e.arcs.forEach(u)}};function s(e){var o=e[0],a=e[1];o<t&&(t=o),o>n&&(n=o),a<i&&(i=a),a>r&&(r=a)}function l(e){e.forEach(s)}function u(e){e.forEach(l)}for(var c in e)o(e[c]);return n>=t&&r>=i?[t,i,n,r]:void 0},v=function(e,t,i,n,r){3===arguments.length&&(n=Array,r=null);for(var o=new n(e=1<<Math.max(4,Math.ceil(Math.log(e)/Math.LN2))),a=e-1,s=0;s<e;++s)o[s]=r;function l(n){for(var s=t(n)&a,l=o[s],u=0;l!=r;){if(i(l,n))return!0;if(++u>=e)throw new Error("full hashset");l=o[s=s+1&a]}return o[s]=n,!0}function u(n){for(var s=t(n)&a,l=o[s],u=0;l!=r;){if(i(l,n))return!0;if(++u>=e)break;l=o[s=s+1&a]}return!1}function c(){for(var e=[],t=0,i=o.length;t<i;++t){var n=o[t];n!=r&&e.push(n)}return e}return{add:l,has:u,values:c}},x=function(e,t,i,n,r,o){3===arguments.length&&(n=o=Array,r=null);for(var a=new n(e=1<<Math.max(4,Math.ceil(Math.log(e)/Math.LN2))),s=new o(e),l=e-1,u=0;u<e;++u)a[u]=r;function c(n,o){for(var u=t(n)&l,c=a[u],h=0;c!=r;){if(i(c,n))return s[u]=o;if(++h>=e)throw new Error("full hashmap");c=a[u=u+1&l]}return a[u]=n,s[u]=o,o}function h(n,o){for(var u=t(n)&l,c=a[u],h=0;c!=r;){if(i(c,n))return s[u];if(++h>=e)throw new Error("full hashmap");c=a[u=u+1&l]}return a[u]=n,s[u]=o,o}function d(n,o){for(var u=t(n)&l,c=a[u],h=0;c!=r;){if(i(c,n))return s[u];if(++h>=e)break;c=a[u=u+1&l]}return o}function f(){for(var e=[],t=0,i=a.length;t<i;++t){var n=a[t];n!=r&&e.push(n)}return e}return{set:c,maybeSet:h,get:d,keys:f}},b=function(e,t){return e[0]===t[0]&&e[1]===t[1]},S=new ArrayBuffer(16),w=new Uint32Array(S),C=function(e){var t=w[0]^w[1];return 2147483647&(t=t<<5^t>>7^w[2]^w[3])},T=function(e){var t,i,n,r,o=e.coordinates,a=e.lines,s=e.rings,l=w(),u=new Int32Array(o.length),c=new Int32Array(o.length),h=new Int32Array(o.length),d=new Int8Array(o.length),f=0;for(t=0,i=o.length;t<i;++t)u[t]=c[t]=h[t]=-1;for(t=0,i=a.length;t<i;++t){var p=a[t],_=p[0],m=p[1];for(n=l[_],r=l[++_],++f,d[n]=1;++_<=m;)S(t,n,n=r,r=l[_]);++f,d[r]=1}for(t=0,i=o.length;t<i;++t)u[t]=-1;for(t=0,i=s.length;t<i;++t){var $=s[t],g=$[0]+1,y=$[1];for(S(t,l[y-1],n=l[g-1],r=l[g]);++g<=y;)S(t,n,n=r,r=l[g])}function S(e,t,i,n){if(u[i]!==e){u[i]=e;var r=c[i];if(r>=0){var o=h[i];(r!==t||o!==n)&&(r!==n||o!==t)&&(++f,d[i]=1)}else c[i]=t,h[i]=n}}function w(){for(var e=x(1.4*o.length,T,P,Int32Array,-1,Int32Array),t=new Int32Array(o.length),i=0,n=o.length;i<n;++i)t[i]=e.maybeSet(i,i);return t}function T(e){return C(o[e])}function P(e,t){return b(o[e],o[t])}u=c=h=null;var E,A=v(1.4*f,C,b);for(t=0,i=o.length;t<i;++t)d[E=l[t]]&&A.add(o[E]);return A},P=function(e){var t,i,n,r=T(e),o=e.coordinates,a=e.lines,s=e.rings;for(i=0,n=a.length;i<n;++i)for(var l=a[i],u=l[0],c=l[1];++u<c;)r.has(o[u])&&(t={0:u,1:l[1]},l[1]=u,l=l.next=t);for(i=0,n=s.length;i<n;++i)for(var h=s[i],d=h[0],f=d,p=h[1],_=r.has(o[d]);++f<p;)r.has(o[f])&&(_?(t={0:f,1:h[1]},h[1]=f,h=h.next=t):(E(o,d,p,p-f),o[p]=o[d],_=!0,f=d));return e};function E(e,t,i,n){A(e,t,i),A(e,t,t+n),A(e,t+n,i)}function A(e,t,i){for(var n,r=t+(i---t>>1);t<r;++t,--i)n=e[t],e[t]=e[i],e[i]=n}var L=function(e){var t,i,n,r,o=e.coordinates,a=e.lines,s=e.rings,l=a.length+s.length;for(delete e.lines,delete e.rings,n=0,r=a.length;n<r;++n)for(t=a[n];t=t.next;)++l;for(n=0,r=s.length;n<r;++n)for(i=s[n];i=i.next;)++l;var u=x(2*l*1.4,C,b),c=e.arcs=[];for(n=0,r=a.length;n<r;++n){t=a[n];do{h(t)}while(t=t.next)}for(n=0,r=s.length;n<r;++n)if((i=s[n]).next)do{h(i)}while(i=i.next);else d(i);function h(e){var t,i,n,r,a,s,l,h;if(n=u.get(t=o[e[0]]))for(l=0,h=n.length;l<h;++l)if(f(r=n[l],e))return e[0]=r[0],void(e[1]=r[1]);if(a=u.get(i=o[e[1]]))for(l=0,h=a.length;l<h;++l)if(p(s=a[l],e))return e[1]=s[0],void(e[0]=s[1]);n?n.push(e):u.set(t,[e]),a?a.push(e):u.set(i,[e]),c.push(e)}function d(e){var t,i,n,r,a;if(i=u.get(t=o[e[0]]))for(r=0,a=i.length;r<a;++r){if(_(n=i[r],e))return e[0]=n[0],void(e[1]=n[1]);if(m(n,e))return e[0]=n[1],void(e[1]=n[0])}if(i=u.get(t=o[e[0]+$(e)]))for(r=0,a=i.length;r<a;++r){if(_(n=i[r],e))return e[0]=n[0],void(e[1]=n[1]);if(m(n,e))return e[0]=n[1],void(e[1]=n[0])}i?i.push(e):u.set(t,[e]),c.push(e)}function f(e,t){var i=e[0],n=t[0],r=e[1];if(i-r!=n-t[1])return!1;for(;i<=r;++i,++n)if(!b(o[i],o[n]))return!1;return!0}function p(e,t){var i=e[0],n=t[0],r=e[1],a=t[1];if(i-r!=n-a)return!1;for(;i<=r;++i,--a)if(!b(o[i],o[a]))return!1;return!0}function _(e,t){var i=e[0],n=t[0],r=e[1]-i;if(r!==t[1]-n)return!1;for(var a=$(e),s=$(t),l=0;l<r;++l)if(!b(o[i+(l+a)%r],o[n+(l+s)%r]))return!1;return!0}function m(e,t){var i=e[0],n=t[0],r=e[1],a=t[1],s=r-i;if(s!==a-n)return!1;for(var l=$(e),u=s-$(t),c=0;c<s;++c)if(!b(o[i+(c+l)%s],o[a-(c+u)%s]))return!1;return!0}function $(e){for(var t=e[0],i=e[1],n=t,r=n,a=o[n];++n<i;){var s=o[n];(s[0]<a[0]||s[0]===a[0]&&s[1]<a[1])&&(r=n,a=s)}return r-t}return e},M=function(e){for(var t=-1,i=e.length;++t<i;){for(var n,r,o=e[t],a=0,s=1,l=o.length,u=o[0],c=u[0],h=u[1];++a<l;)n=(u=o[a])[0],r=u[1],(n!==c||r!==h)&&(o[s++]=[n-c,r-h],c=n,h=r);1===s&&(o[s++]=[0,0]),o.length=s}return e},I=function(e){var t=-1,i=[],n=[],r=[];function o(e){e&&a.hasOwnProperty(e.type)&&a[e.type](e)}var a={GeometryCollection:function(e){e.geometries.forEach(o)},LineString:function(e){e.arcs=s(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(s)},Polygon:function(e){e.arcs=e.arcs.map(l)},MultiPolygon:function(e){e.arcs=e.arcs.map(u)}};function s(e){for(var n=0,o=e.length;n<o;++n)r[++t]=e[n];var a={0:t-o+1,1:t};return i.push(a),a}function l(e){for(var i=0,o=e.length;i<o;++i)r[++t]=e[i];var a={0:t-o+1,1:t};return n.push(a),a}function u(e){return e.map(l)}for(var c in e)o(e[c]);return{type:"Topology",coordinates:r,lines:i,rings:n,objects:e}},O=function(e){var t,i={};for(t in e)i[t]=D(e[t]);return i};function D(e){return null==e?{type:null}:("FeatureCollection"===e.type?R:"Feature"===e.type?N:F)(e)}function R(e){var t={type:"GeometryCollection",geometries:e.features.map(N)};return null!=e.bbox&&(t.bbox=e.bbox),t}function N(e){var t,i=F(e.geometry);for(t in null!=e.id&&(i.id=e.id),null!=e.bbox&&(i.bbox=e.bbox),e.properties){i.properties=e.properties;break}return i}function F(e){if(null==e)return{type:null};var t="GeometryCollection"===e.type?{type:"GeometryCollection",geometries:e.geometries.map(F)}:"Point"===e.type||"MultiPoint"===e.type?{type:e.type,coordinates:e.coordinates}:{type:e.type,arcs:e.coordinates};return null!=e.bbox&&(t.bbox=e.bbox),t}var B=function(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=o-n?(i-1)/(o-n):1,l=a-r?(i-1)/(a-r):1;function u(e){return[Math.round((e[0]-n)*s),Math.round((e[1]-r)*l)]}function c(e,t){for(var i,o,a,u,c,h=-1,d=0,f=e.length,p=new Array(f);++h<f;)i=e[h],u=Math.round((i[0]-n)*s),c=Math.round((i[1]-r)*l),(u!==o||c!==a)&&(p[d++]=[o=u,a=c]);for(p.length=d;d<t;)d=p.push([p[0][0],p[0][1]]);return p}function h(e){return c(e,2)}function d(e){return c(e,4)}function f(e){return e.map(d)}function p(e){null!=e&&_.hasOwnProperty(e.type)&&_[e.type](e)}var _={GeometryCollection:function(e){e.geometries.forEach(p)},Point:function(e){e.coordinates=u(e.coordinates)},MultiPoint:function(e){e.coordinates=e.coordinates.map(u)},LineString:function(e){e.arcs=h(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(h)},Polygon:function(e){e.arcs=f(e.arcs)},MultiPolygon:function(e){e.arcs=e.arcs.map(f)}};for(var m in e)p(e[m]);return{scale:[1/s,1/l],translate:[n,r]}},z=function(e,t){var i=y(e=O(e)),n=t>0&&i&&B(e,i,t),r=L(P(I(e))),o=r.coordinates,a=x(1.4*r.arcs.length,G,k);function s(e){e&&l.hasOwnProperty(e.type)&&l[e.type](e)}e=r.objects,r.bbox=i,r.arcs=r.arcs.map((function(e,t){return a.set(e,t),o.slice(e[0],e[1]+1)})),delete r.coordinates,o=null;var l={GeometryCollection:function(e){e.geometries.forEach(s)},LineString:function(e){e.arcs=u(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(u)},Polygon:function(e){e.arcs=e.arcs.map(u)},MultiPolygon:function(e){e.arcs=e.arcs.map(c)}};function u(e){var t=[];do{var i=a.get(e);t.push(e[0]<e[1]?i:~i)}while(e=e.next);return t}function c(e){return e.map(u)}for(var h in e)s(e[h]);return n&&(r.transform=n,r.arcs=M(r.arcs)),r};function G(e){var t,i=e[0],n=e[1];return n<i&&(t=i,i=n,n=t),i+31*n}function k(e,t){var i,n=e[0],r=e[1],o=t[0],a=t[1];return r<n&&(i=n,n=r,r=i),a<o&&(i=o,o=a,a=i),n===o&&r===a}var U=function(e){var t,i,n=e.objects,r={},o=e.arcs,a=o.length,s=-1,l=new Array(a),u=0,c=-1;function h(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(h);break;case"LineString":f(e.arcs);break;case"MultiLineString":case"Polygon":e.arcs.forEach(f);break;case"MultiPolygon":e.arcs.forEach(p)}}function d(e){e<0&&(e=~e),l[e]||(l[e]=1,++u)}function f(e){e.forEach(d)}function p(e){e.forEach(f)}function _(e){var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(_)};break;case"LineString":t={type:"LineString",arcs:$(e.arcs)};break;case"MultiLineString":t={type:"MultiLineString",arcs:e.arcs.map($)};break;case"Polygon":t={type:"Polygon",arcs:e.arcs.map($)};break;case"MultiPolygon":t={type:"MultiPolygon",arcs:e.arcs.map(g)};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}function m(e){return e<0?~l[~e]:l[e]}function $(e){return e.map(m)}function g(e){return e.map($)}for(i in n)h(n[i]);for(t=new Array(u);++s<a;)l[s]&&(l[s]=++c,t[c]=o[s]);for(i in n)r[i]=_(n[i]);return{type:"Topology",bbox:e.bbox,transform:e.transform,objects:r,arcs:t}},V=function(e,t){var i,n=e.objects,r={};function o(e){var t,i;switch(e.type){case"Polygon":t=(i=a(e.arcs))?{type:"Polygon",arcs:i}:{type:null};break;case"MultiPolygon":t=(i=e.arcs.map(a).filter(H)).length?{type:"MultiPolygon",arcs:i}:{type:null};break;case"GeometryCollection":t=(i=e.geometries.map(o).filter(Y)).length?{type:"GeometryCollection",geometries:i}:{type:null};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}function a(e){return e.length&&s(e[0])?[e[0]].concat(e.slice(1).filter(l)):null}function s(e){return t(e,!1)}function l(e){return t(e,!0)}for(i in null==t&&(t=W),n)r[i]=o(n[i]);return U({type:"Topology",bbox:e.bbox,transform:e.transform,objects:r,arcs:e.arcs})};function W(){return!0}function H(e){return e}function Y(e){return null!=e.type}var j=function(e){var t,i=new Array(e.arcs.length),n=0;function r(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(r);break;case"Polygon":o(e.arcs);break;case"MultiPolygon":e.arcs.forEach(o)}}function o(e){for(var t=0,r=e.length;t<r;++t,++n)for(var o=e[t],a=0,s=o.length;a<s;++a){var l=o[a];l<0&&(l=~l);var u=i[l];null==u?i[l]=n:u!==n&&(i[l]=-1)}}for(t in e.objects)r(e.objects[t]);return function(e){for(var t,n=0,r=e.length;n<r;++n)if(-1===i[(t=e[n])<0?~t:t])return!0;return!1}};function q(e){var t=e[0],i=e[1],n=e[2];return Math.abs((t[0]-n[0])*(i[1]-t[1])-(t[0]-i[0])*(n[1]-t[1]))/2}function X(e){for(var t,i=-1,n=e.length,r=e[n-1],o=0;++i<n;)t=r,r=e[i],o+=t[0]*r[1]-t[1]*r[0];return Math.abs(o)/2}var K=function(e,t,i){return t=null==t?Number.MIN_VALUE:+t,null==i&&(i=X),function(n,r){return i(o(e,{type:"Polygon",arcs:[n]}).geometry.coordinates[0],r)>=t}},Z=function(e,t,i){var n=j(e),r=K(e,t,i);return function(e,t){return n(e,t)||r(e,t)}};function J(e,t){return e[1][2]-t[1][2]}var Q=function(){var e={},t=[],i=0;function n(e,i){for(;i>0;){var n=(i+1>>1)-1,r=t[n];if(J(e,r)>=0)break;t[r._=i]=r,t[e._=i=n]=e}}function r(e,n){for(;;){var r=n+1<<1,o=r-1,a=n,s=t[a];if(o<i&&J(t[o],s)<0&&(s=t[a=o]),r<i&&J(t[r],s)<0&&(s=t[a=r]),a===n)break;t[s._=n]=s,t[e._=n=a]=e}}return e.push=function(e){return n(t[e._=i]=e,i++),i},e.pop=function(){if(!(i<=0)){var e,n=t[0];return--i>0&&(e=t[i],r(t[e._=0]=e,0)),n}},e.remove=function(e){var o,a=e._;if(t[a]===e)return a!==--i&&(J(o=t[i],e)<0?n:r)(t[o._=a]=o,a),a},e};function ee(e){return[e[0],e[1],0]}var te=function(e,t){var n=e.transform?i(e.transform):ee,r=Q();null==t&&(t=q);var o=e.arcs.map((function(e){var i,o,s,l=[],u=0;for(o=1,s=(e=e.map(n)).length-1;o<s;++o)(i=[e[o-1],e[o],e[o+1]])[1][2]=t(i),l.push(i),r.push(i);for(e[0][2]=e[s][2]=1/0,o=0,s=l.length;o<s;++o)(i=l[o]).previous=l[o-1],i.next=l[o+1];for(;i=r.pop();){var c=i.previous,h=i.next;i[1][2]<u?i[1][2]=u:u=i[1][2],c&&(c.next=h,c[2]=i[2],a(c)),h&&(h.previous=c,h[0]=i[0],a(h))}return e}));function a(e){r.remove(e),e[1][2]=t(e),r.push(e)}return{type:"Topology",bbox:e.bbox,objects:e.objects,arcs:o}},ie=function(e,t){var i=[];return e.arcs.forEach((function(e){e.forEach((function(e){isFinite(e[2])&&i.push(e[2])}))})),i.length&&ne(i.sort(re),t)};function ne(e,t){if(i=e.length){if((t=+t)<=0||i<2)return e[0];if(t>=1)return e[i-1];var i,n=(i-1)*t,r=Math.floor(n),o=e[r];return o+(e[r+1]-o)*(n-r)}}function re(e,t){return t-e}var oe=function(e,t){t=null==t?Number.MIN_VALUE:+t;var i=e.arcs.map((function(e){for(var i,n=-1,r=0,o=e.length,a=new Array(o);++n<o;)(i=e[n])[2]>=t&&(a[r++]=[i[0],i[1]]);return a.length=r,a}));return{type:"Topology",transform:e.transform,bbox:e.bbox,objects:e.objects,arcs:i}},ae=Math.PI,se=2*ae,le=ae/4,ue=ae/180,ce=Math.abs,he=Math.atan2,de=Math.cos,fe=Math.sin;function pe(e,t){for(var i,n,r=0,o=e.length,a=0,s=e[t?r++:o-1],l=s[0]*ue,u=s[1]*ue/2+le,c=de(u),h=fe(u);r<o;++r){i=l,l=(s=e[r])[0]*ue,u=s[1]*ue/2+le,n=c,c=de(u);var d=l-i,f=d>=0?1:-1,p=f*d,_=h*(h=fe(u)),m=n*c+_*de(p),$=_*f*fe(p);a+=he($,m)}return a}function _e(e,t){var i=pe(e,!0);return t&&(i*=-1),2*(i<0?se+i:i)}function me(e){return 2*ce(pe(e,!1))}e.bbox=n,e.feature=o,e.mesh=u,e.meshArcs=c,e.merge=f,e.mergeArcs=p,e.neighbors=m,e.quantize=g,e.transform=i,e.untransform=$,e.topology=z,e.filter=V,e.filterAttached=j,e.filterAttachedWeight=Z,e.filterWeight=K,e.planarRingArea=X,e.planarTriangleArea=q,e.presimplify=te,e.quantile=ie,e.simplify=oe,e.sphericalRingArea=_e,e.sphericalTriangleArea=me,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof exports&&typeof module<"u"?exports:e.topojson=e.topojson||{})}(fr);var Ce$c=fr.topojson;function T$t(e){return a$11.fromDegrees(e[0],e[1],e[2])}var I$u={"urn:ogc:def:crs:OGC:1.3:CRS84":T$t,"EPSG:4326":T$t,"urn:ogc:def:crs:EPSG::4326":T$t},X$h={},K$k={},M$s=48,R$l,L$p=e$1z.ROYALBLUE,O$n=e$1z.YELLOW,G$r=2,U$p=e$1z.fromBytes(255,255,0,100),V$m=!1,Oe$e={small:24,medium:48,large:64},Ge$7=["title","description","marker-size","marker-symbol","marker-color","stroke","stroke-opacity","stroke-width","fill","fill-opacity"];function Q$m(e,t){var i="";for(var n in e)if(e.hasOwnProperty(n)){if(n===t||-1!==Ge$7.indexOf(n))continue;var r=e[n];t$$(r)&&(i+="object"==typeof r?"<tr><th>"+n+"</th><td>"+Q$m(r)+"</td></tr>":"<tr><th>"+n+"</th><td>"+r+"</td></tr>")}return i.length>0&&(i='<table class="cesium-infoBox-defaultTable"><tbody>'+i+"</tbody></table>"),i}function Ue$8(e,t,i){var n;return function(r,o){return t$$(n)||(n=e(t,i)),n}}function Z$o(e,t){return new n$K(Ue$8(Q$m,e,t),!0)}function B$m(e,t,i){var n=e.id;if(t$$(n)&&"Feature"===e.type){for(var r=2,o=n;t$$(t.getById(o));)o=n+"_"+r,r++;n=o}else n=t$U();var a=t.getOrCreateEntity(n),s=e.properties;if(t$$(s)){a.properties=s;var l,u=s.title;if(t$$(u))a.name=u,l="title";else{var c=Number.MAX_VALUE;for(var h in s)if(s.hasOwnProperty(h)&&s[h]){var d=h.toLowerCase();if(c>1&&"title"===d){c=1,l=h;break}c>2&&"name"===d?(c=2,l=h):c>3&&/title/i.test(h)?(c=3,l=h):c>4&&/name/i.test(h)&&(c=4,l=h)}t$$(l)&&(a.name=s[l])}var f=s.description;null!==f&&(a.description=t$$(f)?new i$O(f):i(s,l))}return a}function W$r(e,t){for(var i=new Array(e.length),n=0;n<e.length;n++)i[n]=t(e[n]);return i}var $$l={Feature:ie$e,FeatureCollection:Be$c,GeometryCollection:re$g,LineString:le$i,MultiLineString:ae$h,MultiPoint:ne$d,MultiPolygon:ce$c,Point:oe$f,Polygon:me$i,Topology:pe$c},ee$f={GeometryCollection:re$g,LineString:le$i,MultiLineString:ae$h,MultiPoint:ne$d,MultiPolygon:ce$c,Point:oe$f,Polygon:me$i,Topology:pe$c};function ie$e(e,t,i,n,r){if(null!==t.geometry){if(!t$$(t.geometry))throw new t$Z("feature.geometry is required.");var o=t.geometry.type,a=ee$f[o];if(!t$$(a))throw new t$Z("Unknown geometry type: "+o);a(e,t,t.geometry,n,r)}else B$m(t,e._entityCollection,r.describe)}function Be$c(e,t,i,n,r){for(var o=t.features,a=0,s=o.length;a<s;a++)ie$e(e,o[a],void 0,n,r)}function re$g(e,t,i,n,r){for(var o=i.geometries,a=0,s=o.length;a<s;a++){var l=o[a],u=l.type,c=ee$f[u];if(!t$$(c))throw new t$Z("Unknown geometry type: "+u);c(e,t,l,n,r)}}function te$e(e,t,i,n,r){var o,a=r.markerSymbol,s=r.markerColor,l=r.markerSize,u=t.properties;if(t$$(u)){var c=u["marker-color"];t$$(c)&&(s=e$1z.fromCssColorString(c)),l=e$1Y(Oe$e[u["marker-size"]],l);var h=u["marker-symbol"];t$$(h)&&(a=h)}o=t$$(a)?1===a.length?e._pinBuilder.fromText(a.toUpperCase(),s,l):e._pinBuilder.fromMakiIconId(a,s,l):e._pinBuilder.fromColor(s,l);var d=new s$W;d.verticalOrigin=new i$O(j$10.BOTTOM),2===n.length&&r.clampToGround&&(d.heightReference=U$Y.CLAMP_TO_GROUND);var f=B$m(t,e._entityCollection,r.describe);f.billboard=d,f.position=new t$B(i(n));var p=c$18(o).then((function(e){d.image=new i$O(e)})).otherwise((function(){d.image=new i$O(e._pinBuilder.fromColor(s,l))}));e._promises.push(p)}function oe$f(e,t,i,n,r){te$e(e,t,n,i.coordinates,r)}function ne$d(e,t,i,n,r){for(var o=i.coordinates,a=0;a<o.length;a++)te$e(e,t,n,o[a],r)}function se$d(e,t,i,n,r){var o=r.strokeMaterialProperty,a=r.strokeWidthProperty,s=t.properties;if(t$$(s)){var l=s["stroke-width"];t$$(l)&&(a=new i$O(l));var u,c=s.stroke;t$$(c)&&(u=e$1z.fromCssColorString(c));var h=s["stroke-opacity"];t$$(h)&&1!==h&&(t$$(u)||(u=o.color.clone()),u.alpha=h),t$$(u)&&(o=new t$F(u))}var d=B$m(t,e._entityCollection,r.describe),f=new o$B;d.polyline=f,f.clampToGround=r.clampToGround,f.material=o,f.width=a,f.positions=new i$O(W$r(n,i)),f.arcType=m$_.RHUMB}function le$i(e,t,i,n,r){se$d(e,t,n,i.coordinates,r)}function ae$h(e,t,i,n,r){for(var o=i.coordinates,a=0;a<o.length;a++)se$d(e,t,n,o[a],r)}function fe$c(e,t,i,n,r){if(0!==n.length&&0!==n[0].length){var o=r.strokeMaterialProperty.color,a=r.fillMaterialProperty,s=r.strokeWidthProperty,l=t.properties;if(t$$(l)){var u=l["stroke-width"];t$$(u)&&(s=new i$O(u));var c,h=l.stroke;t$$(h)&&(c=e$1z.fromCssColorString(h));var d=l["stroke-opacity"];t$$(d)&&1!==d&&(t$$(c)||(c=r.strokeMaterialProperty.color.clone()),c.alpha=d),t$$(c)&&(o=new i$O(c));var f,p=l.fill;t$$(p)&&((f=e$1z.fromCssColorString(p)).alpha=a.color.alpha),t$$(d=l["fill-opacity"])&&d!==a.color.alpha&&(t$$(f)||(f=a.color.clone()),f.alpha=d),t$$(f)&&(a=new t$F(f))}var _=new u$J;_.outline=new i$O(!0),_.outlineColor=o,_.outlineWidth=s,_.material=a,_.arcType=m$_.GEODESIC,_._fromDataSource=!0;for(var m=[],$=1,g=n.length;$<g;$++)m.push(new t$K(W$r(n[$],i)));var y=n[0];_.hierarchy=new i$O(new t$K(W$r(y,i),m)),y[0].length>2?_.perPositionHeight=new i$O(!0):r.clampToGround||(_.height=0);var v=B$m(t,e._entityCollection,r.describe);r.clampToGround&&(_.classificationType=_0x29401c.TERRAIN),r.clampToS3M&&(_.classificationType=_0x29401c.S3M_TILE),v.polygon=_}}function me$i(e,t,i,n,r){fe$c(e,t,n,i.coordinates,r)}function ce$c(e,t,i,n,r){for(var o=i.coordinates,a=0;a<o.length;a++)fe$c(e,t,n,o[a],r)}function pe$c(e,t,i,n,r){for(var o in i.objects)if(i.objects.hasOwnProperty(o)){var a=Ce$c.feature(i,i.objects[o]);(0,$$l[a.type])(e,a,a,n,r)}}function y$u(e){this._name=e,this._changed=new o$15,this._error=new o$15,this._isLoading=!1,this._loading=new o$15,this._entityCollection=new r$n(this),this._promises=[],this._pinBuilder=new h$T,this._entityCluster=new a$s,this._credit=void 0,this._resourceCredits=[],this._visibleViewport=4095,this._swipeRegion=new a$10(0,0,1,1),this._swipeEnabled=!1}function ue$b(e,t,i,n){var r;t$$(n)&&(r=a$J(n)),t$$(r)&&e._name!==r&&(e._name=r,e._changed.raiseEvent(e));var o=$$l[t.type];if(!t$$(o))throw new t$Z("Unsupported GeoJSON object type: "+t.type);var a=t.crs,s=null!==a?T$t:null;if(t$$(a)){if(!t$$(a.properties))throw new t$Z("crs.properties is undefined.");var l=a.properties;if("name"===a.type){if(!t$$(s=I$u[l.name]))throw new t$Z("Unknown crs name: "+l.name)}else if("link"===a.type){var u=X$h[l.href];if(t$$(u)||(u=K$k[l.type]),!t$$(u))throw new t$Z("Unable to resolve crs link: "+JSON.stringify(l));s=u(l)}else{if("EPSG"!==a.type)throw new t$Z("Unknown crs type: "+a.type);if(!t$$(s=I$u["EPSG:"+l.code]))throw new t$Z("Unknown crs EPSG code: "+l.code)}}return c$18(s,(function(n){return e._entityCollection.removeAll(),null!==n&&o(e,t,t,n,i),c$18.all(e._promises,(function(){return e._promises.length=0,o$w.setLoading(e,!1),e}))}))}function o$t(e,t){this.position=e,this.headingPitchRoll=t}y$u.load=function(e,t){return(new y$u).load(e,t)},Object.defineProperties(y$u,{markerSize:{get:function(){return M$s},set:function(e){M$s=e}},markerSymbol:{get:function(){return R$l},set:function(e){R$l=e}},markerColor:{get:function(){return L$p},set:function(e){L$p=e}},stroke:{get:function(){return O$n},set:function(e){O$n=e}},strokeWidth:{get:function(){return G$r},set:function(e){G$r=e}},fill:{get:function(){return U$p},set:function(e){U$p=e}},clampToGround:{get:function(){return V$m},set:function(e){V$m=e}},crsNames:{get:function(){return I$u}},crsLinkHrefs:{get:function(){return X$h}},crsLinkTypes:{get:function(){return K$k}}}),Object.defineProperties(y$u.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{value:void 0,writable:!1},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!t$$(e))throw new t$_("value must be defined.");this._entityCluster=e}},credit:{get:function(){return this._credit}},swipeRegion:{get:function(){return new n$13(this._swipeRegion.x,this._swipeRegion.y,this._swipeRegion.z-this._swipeRegion.x,this._swipeRegion.w-this._swipeRegion.y)},set:function(e){if(t$$(e)){if(!(e instanceof n$13))throw new t$_("swipeRegion must be a instance of BoundingRectangle.");if(a$10.fromElements(e.x,e.y,e.x+e.width,e.y+e.height,this._swipeRegion),t$$(this._entityCluster._billboardCollection)&&(this._entityCluster._billboardCollection._swipeRegion=a$10.clone(this._swipeRegion,new a$10)),t$$(this._primitives))for(var t=0;t<this._primitives._primitives.length;t++)this._primitives._primitives[t]instanceof y$H&&(this._primitives._primitives[t]._swipeRegion=a$10.clone(this._swipeRegion,new a$10));if(t$$(this._groundPrimitives)){var i=this._groundPrimitives._collectionsArray;for(t=0;t<i.length;t++)if(i[t]instanceof r$l)for(var n=0;n<i[t]._primitives.length;n++)i[t]._primitives[n]._primitive._primitive._swipeRegion=a$10.clone(this._swipeRegion,new a$10)}}}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){if(e!==this._swipeEnabled){if(e||a$10.fromElements(0,0,1,1,this._swipeRegion),this._swipeEnabled=e,t$$(this._entityCluster._billboardCollection)&&(this._entityCluster._billboardCollection._swipeEnabled=e),t$$(this._primitives))for(var t=0;t<this._primitives._primitives.length;t++)this._primitives._primitives[t]instanceof y$H&&(this._primitives._primitives[t].swipeEnabled=e);if(t$$(this._groundPrimitives)){var i=this._groundPrimitives._collectionsArray;for(t=0;t<i.length;t++)if(i[t]instanceof r$l)for(var n=0;n<i[t]._primitives.length;n++)i[t]._primitives[n]._primitive._primitive.swipeEnabled=e}}}}}),y$u.prototype.load=function(e,t){if(!t$$(e))throw new t$_("data is required.");o$w.setLoading(this,!0);var i=(t=e$1Y(t,e$1Y.EMPTY_OBJECT)).credit;"string"==typeof i&&(i=new i$17(i)),this._credit=i;var n=e,r=t.sourceUri;if("string"==typeof e||e instanceof t$X){n=(e=t$X.createIfNeeded(e)).fetchJson(),r=e$1Y(r,e.getUrlComponent());var o=this._resourceCredits,a=e.credits;if(t$$(a))for(var s=a.length,l=0;l<s;l++)o.push(a[l])}t={describe:e$1Y(t.describe,Z$o),markerSize:e$1Y(t.markerSize,M$s),markerSymbol:e$1Y(t.markerSymbol,R$l),markerColor:e$1Y(t.markerColor,L$p),strokeWidthProperty:new i$O(e$1Y(t.strokeWidth,G$r)),strokeMaterialProperty:new t$F(e$1Y(t.stroke,O$n)),fillMaterialProperty:new t$F(e$1Y(t.fill,U$p)),clampToGround:e$1Y(t.clampToGround,V$m),clampToS3M:e$1Y(t.clampToS3M,!1)};var u=this;return c$18(n,(function(e){return ue$b(u,e,t,r)})).otherwise((function(e){return o$w.setLoading(u,!1),u._error.raiseEvent(u,e),console.log(e),c$18.reject(e)}))},y$u.prototype.loadPoiJsonData=function(e,t){if(!t$$(e))throw new t$_("data is required.");o$w.setLoading(this,!0);var i=(t=e$1Y(t,e$1Y.EMPTY_OBJECT)).sourceUri;return ue$b(this,e,t={describe:e$1Y(t.describe,Z$o),markerSize:e$1Y(t.markerSize,M$s),markerSymbol:e$1Y(t.markerSymbol,R$l),markerColor:e$1Y(t.markerColor,L$p),strokeWidthProperty:new i$O(e$1Y(t.strokeWidth,G$r)),strokeMaterialProperty:new t$F(e$1Y(t.stroke,O$n)),fillMaterialProperty:new t$F(e$1Y(t.fill,U$p))},i)},y$u.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$_("the index is 0~8");return 1<<e&this._visibleViewport},y$u.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$_("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport};var xe$k={}; /*! * Autolinker.js * 3.11.0 * * Copyright(c) 2019 Gregory Jacobs <greg@greg-jacobs.com> * MIT License * * https://github.com/gregjacobs/Autolinker.js */!function(e,t){e.Autolinker=function(){function e(e,t){for(var i in t)t.hasOwnProperty(i)&&void 0===e[i]&&(e[i]=t[i]);return e}function t(e,t,i){var n;return e.length>t&&(null==i?(i="…",n=3):n=i.length,e=e.substring(0,t-n)+i),e}function i(e,t){if(Array.prototype.indexOf)return e.indexOf(t);for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1}function n(e,t){for(var i=e.length-1;i>=0;i--)!0===t(e[i])&&e.splice(i,1)}function r(e,t){if(!t.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var i,n=[],r=0;i=t.exec(e);)n.push(e.substring(r,i.index)),n.push(i[0]),r=i.index+i[0].length;return n.push(e.substring(r)),n}function o(e){throw new Error("Unhandled case for value: '"+e+"'")}var a=function(){function e(e){void 0===e&&(e={}),this.tagName="",this.attrs={},this.innerHTML="",this.whitespaceRegex=/\s+/,this.tagName=e.tagName||"",this.attrs=e.attrs||{},this.innerHTML=e.innerHtml||e.innerHTML||""}return e.prototype.setTagName=function(e){return this.tagName=e,this},e.prototype.getTagName=function(){return this.tagName||""},e.prototype.setAttr=function(e,t){return this.getAttrs()[e]=t,this},e.prototype.getAttr=function(e){return this.getAttrs()[e]},e.prototype.setAttrs=function(e){return Object.assign(this.getAttrs(),e),this},e.prototype.getAttrs=function(){return this.attrs||(this.attrs={})},e.prototype.setClass=function(e){return this.setAttr("class",e)},e.prototype.addClass=function(e){for(var t,n=this.getClass(),r=this.whitespaceRegex,o=n?n.split(r):[],a=e.split(r);t=a.shift();)-1===i(o,t)&&o.push(t);return this.getAttrs().class=o.join(" "),this},e.prototype.removeClass=function(e){for(var t,n=this.getClass(),r=this.whitespaceRegex,o=n?n.split(r):[],a=e.split(r);o.length&&(t=a.shift());){var s=i(o,t);-1!==s&&o.splice(s,1)}return this.getAttrs().class=o.join(" "),this},e.prototype.getClass=function(){return this.getAttrs().class||""},e.prototype.hasClass=function(e){return-1!==(" "+this.getClass()+" ").indexOf(" "+e+" ")},e.prototype.setInnerHTML=function(e){return this.innerHTML=e,this},e.prototype.setInnerHtml=function(e){return this.setInnerHTML(e)},e.prototype.getInnerHTML=function(){return this.innerHTML||""},e.prototype.getInnerHtml=function(){return this.getInnerHTML()},e.prototype.toAnchorString=function(){var e=this.getTagName(),t=this.buildAttrsStr();return["<",e,t=t?" "+t:"",">",this.getInnerHtml(),"</",e,">"].join("")},e.prototype.buildAttrsStr=function(){if(!this.attrs)return"";var e=this.getAttrs(),t=[];for(var i in e)e.hasOwnProperty(i)&&t.push(i+'="'+e[i]+'"');return t.join(" ")},e}();function s(e,t,i){var n,r;null==i?(i="…",r=3,n=8):(r=i.length,n=i.length);var o=function(e){var t={},i=e,n=i.match(/^([a-z]+):\/\//i);return n&&(t.scheme=n[1],i=i.substr(n[0].length)),(n=i.match(/^(.*?)(?=(\?|#|\/|$))/i))&&(t.host=n[1],i=i.substr(n[0].length)),(n=i.match(/^\/(.*?)(?=(\?|#|$))/i))&&(t.path=n[1],i=i.substr(n[0].length)),(n=i.match(/^\?(.*?)(?=(#|$))/i))&&(t.query=n[1],i=i.substr(n[0].length)),(n=i.match(/^#(.*?)$/i))&&(t.fragment=n[1]),t},a=function(e){var t="";return e.scheme&&e.host&&(t+=e.scheme+"://"),e.host&&(t+=e.host),e.path&&(t+="/"+e.path),e.query&&(t+="?"+e.query),e.fragment&&(t+="#"+e.fragment),t},s=function(e,t){var n=t/2,r=Math.ceil(n),o=-1*Math.floor(n),a="";return o<0&&(a=e.substr(o)),e.substr(0,r)+i+a};if(e.length<=t)return e;var l=t-r,u=o(e);if(u.query){var c=u.query.match(/^(.*?)(?=(\?|\#))(.*?)$/i);c&&(u.query=u.query.substr(0,c[1].length),e=a(u))}if(e.length<=t||(u.host&&(u.host=u.host.replace(/^www\./,""),e=a(u)),e.length<=t))return e;var h="";if(u.host&&(h+=u.host),h.length>=l)return u.host.length==t?(u.host.substr(0,t-r)+i).substr(0,l+n):s(h,l).substr(0,l+n);var d="";if(u.path&&(d+="/"+u.path),u.query&&(d+="?"+u.query),d){if((h+d).length>=l)return(h+d).length==t?(h+d).substr(0,t):(h+s(d,l-h.length)).substr(0,l+n);h+=d}if(u.fragment){var f="#"+u.fragment;if((h+f).length>=l)return(h+f).length==t?(h+f).substr(0,t):(h+s(f,l-h.length)).substr(0,l+n);h+=f}if(u.scheme&&u.host){var p=u.scheme+"://";if((h+p).length<l)return(p+h).substr(0,t)}if(h.length<=t)return h;var _="";return l>0&&(_=h.substr(-1*Math.floor(l/2))),(h.substr(0,Math.ceil(l/2))+i+_).substr(0,l+n)}function l(e,t,i){if(e.length<=t)return e;var n,r;null==i?(i="…",n=8,r=3):(n=i.length,r=i.length);var o=t-r,a="";return o>0&&(a=e.substr(-1*Math.floor(o/2))),(e.substr(0,Math.ceil(o/2))+i+a).substr(0,o+n)}function u(e,i,n){return t(e,i,n)}var c=function(){function e(e){void 0===e&&(e={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=e.newWindow||!1,this.truncate=e.truncate||{},this.className=e.className||""}return e.prototype.build=function(e){return new a({tagName:"a",attrs:this.createAttrs(e),innerHtml:this.processAnchorText(e.getAnchorText())})},e.prototype.createAttrs=function(e){var t={href:e.getAnchorHref()},i=this.createCssClass(e);return i&&(t.class=i),this.newWindow&&(t.target="_blank",t.rel="noopener noreferrer"),this.truncate&&this.truncate.length&&this.truncate.length<e.getAnchorText().length&&(t.title=e.getAnchorHref()),t},e.prototype.createCssClass=function(e){var t=this.className;if(t){for(var i=[t],n=e.getCssClassSuffixes(),r=0,o=n.length;r<o;r++)i.push(t+"-"+n[r]);return i.join(" ")}return""},e.prototype.processAnchorText=function(e){return e=this.doTruncate(e)},e.prototype.doTruncate=function(e){var t=this.truncate;if(!t||!t.length)return e;var i=t.length,n=t.location;return"smart"===n?s(e,i):"middle"===n?l(e,i):u(e,i)},e}(),h=function(){function e(e){this.__jsduckDummyDocProp=null,this.matchedText="",this.offset=0,this.tagBuilder=e.tagBuilder,this.matchedText=e.matchedText,this.offset=e.offset}return e.prototype.getMatchedText=function(){return this.matchedText},e.prototype.setOffset=function(e){this.offset=e},e.prototype.getOffset=function(){return this.offset},e.prototype.getCssClassSuffixes=function(){return[this.getType()]},e.prototype.buildTag=function(){return this.tagBuilder.build(this)},e}(),d=function(e,t){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},d(e,t)}; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. 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 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */function f(e,t){function i(){this.constructor=e}d(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var p=function(){return p=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},p.apply(this,arguments)},_=function(e){function t(t){var i=e.call(this,t)||this;return i.email="",i.email=t.email,i}return f(t,e),t.prototype.getType=function(){return"email"},t.prototype.getEmail=function(){return this.email},t.prototype.getAnchorHref=function(){return"mailto:"+this.email},t.prototype.getAnchorText=function(){return this.email},t}(h),m=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="",i.hashtag="",i.serviceName=t.serviceName,i.hashtag=t.hashtag,i}return f(t,e),t.prototype.getType=function(){return"hashtag"},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getHashtag=function(){return this.hashtag},t.prototype.getAnchorHref=function(){var e=this.serviceName,t=this.hashtag;switch(e){case"twitter":return"https://twitter.com/hashtag/"+t;case"facebook":return"https://www.facebook.com/hashtag/"+t;case"instagram":return"https://instagram.com/explore/tags/"+t;default:throw new Error("Unknown service name to point hashtag to: "+e)}},t.prototype.getAnchorText=function(){return"#"+this.hashtag},t}(h),$=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="twitter",i.mention="",i.mention=t.mention,i.serviceName=t.serviceName,i}return f(t,e),t.prototype.getType=function(){return"mention"},t.prototype.getMention=function(){return this.mention},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getAnchorHref=function(){switch(this.serviceName){case"twitter":return"https://twitter.com/"+this.mention;case"instagram":return"https://instagram.com/"+this.mention;case"soundcloud":return"https://soundcloud.com/"+this.mention;default:throw new Error("Unknown service name to point mention to: "+this.serviceName)}},t.prototype.getAnchorText=function(){return"@"+this.mention},t.prototype.getCssClassSuffixes=function(){var t=e.prototype.getCssClassSuffixes.call(this),i=this.getServiceName();return i&&t.push(i),t},t}(h),g=function(e){function t(t){var i=e.call(this,t)||this;return i.number="",i.plusSign=!1,i.number=t.number,i.plusSign=t.plusSign,i}return f(t,e),t.prototype.getType=function(){return"phone"},t.prototype.getPhoneNumber=function(){return this.number},t.prototype.getNumber=function(){return this.getPhoneNumber()},t.prototype.getAnchorHref=function(){return"tel:"+(this.plusSign?"+":"")+this.number},t.prototype.getAnchorText=function(){return this.matchedText},t}(h),y=function(e){function t(t){var i=e.call(this,t)||this;return i.url="",i.urlMatchType="scheme",i.protocolUrlMatch=!1,i.protocolRelativeMatch=!1,i.stripPrefix={scheme:!0,www:!0},i.stripTrailingSlash=!0,i.decodePercentEncoding=!0,i.schemePrefixRegex=/^(https?:\/\/)?/i,i.wwwPrefixRegex=/^(https?:\/\/)?(www\.)?/i,i.protocolRelativeRegex=/^\/\//,i.protocolPrepended=!1,i.urlMatchType=t.urlMatchType,i.url=t.url,i.protocolUrlMatch=t.protocolUrlMatch,i.protocolRelativeMatch=t.protocolRelativeMatch,i.stripPrefix=t.stripPrefix,i.stripTrailingSlash=t.stripTrailingSlash,i.decodePercentEncoding=t.decodePercentEncoding,i}return f(t,e),t.prototype.getType=function(){return"url"},t.prototype.getUrlMatchType=function(){return this.urlMatchType},t.prototype.getUrl=function(){var e=this.url;return!this.protocolRelativeMatch&&!this.protocolUrlMatch&&!this.protocolPrepended&&(e=this.url="http://"+e,this.protocolPrepended=!0),e},t.prototype.getAnchorHref=function(){return this.getUrl().replace(/&/g,"&")},t.prototype.getAnchorText=function(){var e=this.getMatchedText();return this.protocolRelativeMatch&&(e=this.stripProtocolRelativePrefix(e)),this.stripPrefix.scheme&&(e=this.stripSchemePrefix(e)),this.stripPrefix.www&&(e=this.stripWwwPrefix(e)),this.stripTrailingSlash&&(e=this.removeTrailingSlash(e)),this.decodePercentEncoding&&(e=this.removePercentEncoding(e)),e},t.prototype.stripSchemePrefix=function(e){return e.replace(this.schemePrefixRegex,"")},t.prototype.stripWwwPrefix=function(e){return e.replace(this.wwwPrefixRegex,"$1")},t.prototype.stripProtocolRelativePrefix=function(e){return e.replace(this.protocolRelativeRegex,"")},t.prototype.removeTrailingSlash=function(e){return"/"===e.charAt(e.length-1)&&(e=e.slice(0,-1)),e},t.prototype.removePercentEncoding=function(e){var t=e.replace(/%22/gi,""").replace(/%26/gi,"&").replace(/%27/gi,"'").replace(/%3C/gi,"<").replace(/%3E/gi,">");try{return decodeURIComponent(t)}catch{return t}},t}(h),v=function(){function e(e){this.__jsduckDummyDocProp=null,this.tagBuilder=e.tagBuilder}return e}(),x=/[A-Za-z]/,b=/[0-9]/,S=/\s/,w=/['"]/,C=/[\x00-\x1F\x7F]/,T=/A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source,P=T+/\u00a9\u00ae\u2000-\u3300\ud83c\ud000-\udfff\ud83d\ud000-\udfff\ud83e\ud000-\udfff/.source+/\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F/.source,E=/0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19/.source,A=P+E,L=P+E,M="(?:["+E+"]{1,3}\\.){3}["+E+"]{1,3}",I="["+L+"](?:["+L+"\\-]{0,61}["+L+"])?",O=function(e){return"(?=("+I+"))\\"+e},D=function(e){return"(?:"+O(e)+"(?:\\."+O(e+1)+"){0,126}|"+M+")"},R=new RegExp("["+L+"]"),N=/(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|vermögensberatung|xn--3oq18vl8pn36a|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|afamilycompany|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbb9fbpob|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|spreadbetting|travelchannel|wolterskluwer|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|rightathome|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--estv75g|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--kpu716f|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pbt977c|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nationwide|newholland|nextdirect|onyourside|properties|protection|prudential|realestate|republican|restaurant|schaeffler|swiftcover|tatamotors|technology|telefonica|university|vistaprint|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|fujixerox|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|honeywell|institute|insurance|kuokgroup|ladbrokes|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|scjohnson|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--tckwe|xn--vhquv|yodobashi|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|budapest|builders|business|capetown|catering|catholic|chrysler|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|esurance|etisalat|everbank|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|movistar|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|symantec|training|uconnect|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|cartier|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|iselect|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lancome|lanxess|lasalle|latrobe|leclerc|liaison|limited|lincoln|markets|metlife|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|shriram|singles|staples|starhub|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|католик|اتصالات|الجزائر|العليان|پاکستان|كاثوليك|موبايلي|இந்தியா|abarth|abbott|abbvie|active|africa|agency|airbus|airtel|alipay|alsace|alstom|anquan|aramco|author|bayern|beauty|berlin|bharti|blanco|bostik|boston|broker|camera|career|caseih|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|mobily|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|piaget|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|warman|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|dodge|drive|dubai|earth|edeka|email|epost|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glade|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|intel|irish|iveco|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|lixil|loans|locus|lotte|lotto|lupin|macys|mango|media|miami|money|mopar|movie|nadex|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|zippo|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|adac|aero|aigo|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|doha|duck|duns|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|raid|read|reit|rent|rest|rich|rmit|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scor|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|グーグル|クラウド|ポイント|大众汽车|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bnl|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceb|ceo|cfa|cfd|com|crs|csc|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jcp|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|off|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|qvc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|srl|srt|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ストア|セール|みんな|中文网|天主教|我爱你|新加坡|淡马锡|诺基亚|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|工行|广东|微博|慈善|手机|手表|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|珠宝|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)/,F=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.localPartCharRegex=new RegExp("["+L+"!#$%&'*+/=?^_`{|}~-]"),t.strictTldRegex=new RegExp("^"+N.source+"$"),t}return f(t,e),t.prototype.parseMatches=function(e){for(var t=this.tagBuilder,i=this.localPartCharRegex,n=this.strictTldRegex,r=[],a=e.length,s=new B,l={m:"a",a:"i",i:"l",l:"t",t:"o",o:":"},u=0,c=0,h=s;u<a;){var d=e.charAt(u);switch(c){case 0:f(d);break;case 1:m(e.charAt(u-1),d);break;case 2:$(d);break;case 3:g(d);break;case 4:y(d);break;case 5:v(d);break;case 6:x(d);break;case 7:b(d);break;default:o(c)}u++}return C(),r;function f(e){"m"===e?S(1):i.test(e)&&S()}function m(e,t){":"===e?i.test(t)?(c=2,h=new B(p({},h,{hasMailtoPrefix:!0}))):w():l[e]===t||(i.test(t)?c=2:"."===t?c=3:"@"===t?c=4:w())}function $(e){"."===e?c=3:"@"===e?c=4:i.test(e)||w()}function g(e){"."===e||"@"===e?w():i.test(e)?c=2:w()}function y(e){R.test(e)?c=5:w()}function v(e){"."===e?c=7:"-"===e?c=6:R.test(e)||C()}function x(e){"-"===e||"."===e?C():R.test(e)?c=5:C()}function b(e){"."===e||"-"===e?C():R.test(e)?(c=5,h=new B(p({},h,{hasDomainDot:!0}))):C()}function S(e){void 0===e&&(e=2),c=e,h=new B({idx:u})}function w(){c=0,h=s}function C(){if(h.hasDomainDot){var i=e.slice(h.idx,u);/[-.]$/.test(i)&&(i=i.slice(0,-1));var o=h.hasMailtoPrefix?i.slice(7):i;a(o)&&r.push(new _({tagBuilder:t,matchedText:i,offset:h.idx,email:o}))}function a(e){var t=(e.split(".").pop()||"").toLowerCase();return n.test(t)}w()}},t}(v),B=function(){function e(e){void 0===e&&(e={}),this.idx=void 0!==e.idx?e.idx:-1,this.hasMailtoPrefix=!!e.hasMailtoPrefix,this.hasDomainDot=!!e.hasDomainDot}return e}(),z=function(){function e(){}return e.isValid=function(e,t){return!(t&&!this.isValidUriScheme(t)||this.urlMatchDoesNotHaveProtocolOrDot(e,t)||this.urlMatchDoesNotHaveAtLeastOneWordChar(e,t)&&!this.isValidIpAddress(e)||this.containsMultipleDots(e))},e.isValidIpAddress=function(e){var t=new RegExp(this.hasFullProtocolRegex.source+this.ipRegex.source);return null!==e.match(t)},e.containsMultipleDots=function(e){var t=e;return this.hasFullProtocolRegex.test(e)&&(t=e.split("://")[1]),t.split("/")[0].indexOf("..")>-1},e.isValidUriScheme=function(e){var t=e.match(this.uriSchemeRegex),i=t&&t[0].toLowerCase();return"javascript:"!==i&&"vbscript:"!==i},e.urlMatchDoesNotHaveProtocolOrDot=function(e,t){return!(!e||t&&this.hasFullProtocolRegex.test(t)||-1!==e.indexOf("."))},e.urlMatchDoesNotHaveAtLeastOneWordChar=function(e,t){return!(!e||!t)&&!this.hasWordCharAfterProtocolRegex.test(e)},e.hasFullProtocolRegex=/^[A-Za-z][-.+A-Za-z0-9]*:\/\//,e.uriSchemeRegex=/^[A-Za-z][-.+A-Za-z0-9]*:/,e.hasWordCharAfterProtocolRegex=new RegExp(":[^\\s]*?["+T+"]"),e.ipRegex=/[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?(:[0-9]*)?\/?$/,e}(),G=function(e){function t(t){var i=e.call(this,t)||this;return i.stripPrefix={scheme:!0,www:!0},i.stripTrailingSlash=!0,i.decodePercentEncoding=!0,i.matcherRegex=function(){var e=/(?:[A-Za-z][-.+A-Za-z0-9]{0,63}:(?![A-Za-z][-.+A-Za-z0-9]{0,63}:\/\/)(?!\d+\/?)(?:\/\/)?)/,t=/(?:www\.)/,i=new RegExp("[/?#](?:["+L+"\\-+&@#/%=~_()|'$*\\[\\]?!:,.;✓]*["+L+"\\-+&@#/%=~_()|'$*\\[\\]✓])?");return new RegExp(["(?:","(",e.source,D(2),")","|","(","(//)?",t.source,D(6),")","|","(","(//)?",D(10)+"\\.",N.source,"(?![-"+A+"])",")",")","(?::[0-9]+)?","(?:"+i.source+")?"].join(""),"gi")}(),i.wordCharRegExp=new RegExp("["+L+"]"),i.stripPrefix=t.stripPrefix,i.stripTrailingSlash=t.stripTrailingSlash,i.decodePercentEncoding=t.decodePercentEncoding,i}return f(t,e),t.prototype.parseMatches=function(e){for(var t,i=this.matcherRegex,n=this.stripPrefix,r=this.stripTrailingSlash,o=this.decodePercentEncoding,a=this.tagBuilder,s=[],l=function(){var i=t[0],l=t[1],c=t[4],h=t[5],d=t[9],f=t.index,p=h||d,_=e.charAt(f-1);if(!z.isValid(i,l)||f>0&&"@"===_||f>0&&p&&u.wordCharRegExp.test(_))return"continue";if(/\?$/.test(i)&&(i=i.substr(0,i.length-1)),u.matchHasUnbalancedClosingParen(i))i=i.substr(0,i.length-1);else{var m=u.matchHasInvalidCharAfterTld(i,l);m>-1&&(i=i.substr(0,m))}var $=["http://","https://"].find((function(e){return!!l&&-1!==l.indexOf(e)}));if($){var g=i.indexOf($);i=i.substr(g),l=l.substr(g),f+=g}var v=l?"scheme":c?"www":"tld",x=!!l;s.push(new y({tagBuilder:a,matchedText:i,offset:f,urlMatchType:v,url:i,protocolUrlMatch:x,protocolRelativeMatch:!!p,stripPrefix:n,stripTrailingSlash:r,decodePercentEncoding:o}))},u=this;null!==(t=i.exec(e));)l();return s},t.prototype.matchHasUnbalancedClosingParen=function(e){var t,i=e.charAt(e.length-1);if(")"===i)t="(";else{if("]"!==i)return!1;t="["}for(var n=0,r=0,o=e.length-1;r<o;r++){var a=e.charAt(r);a===t?n++:a===i&&(n=Math.max(n-1,0))}return 0===n},t.prototype.matchHasInvalidCharAfterTld=function(e,t){if(!e)return-1;var i=0;t&&(i=e.indexOf(":"),e=e.slice(i));var n=new RegExp("^((.?//)?[-."+L+"]*[-"+L+"]\\.[-"+L+"]+)").exec(e);return null===n?-1:(i+=n[1].length,e=e.slice(n[1].length),/^[^-.A-Za-z0-9:\/?#]/.test(e)?i:-1)},t}(v),k=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="twitter",i.matcherRegex=new RegExp("#[_"+L+"]{1,139}(?![_"+L+"])","g"),i.nonWordCharRegex=new RegExp("[^"+L+"]"),i.serviceName=t.serviceName,i}return f(t,e),t.prototype.parseMatches=function(e){for(var t,i=this.matcherRegex,n=this.nonWordCharRegex,r=this.serviceName,o=this.tagBuilder,a=[];null!==(t=i.exec(e));){var s=t.index,l=e.charAt(s-1);if(0===s||n.test(l)){var u=t[0],c=t[0].slice(1);a.push(new m({tagBuilder:o,matchedText:u,offset:s,serviceName:r,hashtag:c}))}}return a},t}(v),U=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.matcherRegex=/(?:(?:(?:(\+)?\d{1,3}[-\040.]?)?\(?\d{3}\)?[-\040.]?\d{3}[-\040.]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-\040.]?(?:\d[-\040.]?){6,12}\d+))([,;]+[0-9]+#?)*/g,t}return f(t,e),t.prototype.parseMatches=function(e){for(var t,i=this.matcherRegex,n=this.tagBuilder,r=[];null!==(t=i.exec(e));){var o=t[0],a=o.replace(/[^0-9,;#]/g,""),s=!(!t[1]&&!t[2]),l=0==t.index?"":e.substr(t.index-1,1),u=e.substr(t.index+o.length,1),c=!l.match(/\d/)&&!u.match(/\d/);this.testMatch(t[3])&&this.testMatch(o)&&c&&r.push(new g({tagBuilder:n,matchedText:o,offset:t.index,number:a,plusSign:s}))}return r},t.prototype.testMatch=function(e){return/\D/.test(e)},t}(v),V=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="twitter",i.matcherRegexes={twitter:new RegExp("@[_"+L+"]{1,50}(?![_"+L+"])","g"),instagram:new RegExp("@[_."+L+"]{1,30}(?![_"+L+"])","g"),soundcloud:new RegExp("@[-_."+L+"]{1,50}(?![-_"+L+"])","g")},i.nonWordCharRegex=new RegExp("[^"+L+"]"),i.serviceName=t.serviceName,i}return f(t,e),t.prototype.parseMatches=function(e){var t,i=this.serviceName,n=this.matcherRegexes[this.serviceName],r=this.nonWordCharRegex,o=this.tagBuilder,a=[];if(!n)return a;for(;null!==(t=n.exec(e));){var s=t.index,l=e.charAt(s-1);if(0===s||r.test(l)){var u=t[0].replace(/\.+$/g,""),c=u.slice(1);a.push(new $({tagBuilder:o,matchedText:u,offset:s,serviceName:i,mention:c}))}}return a},t}(v);function W(e,t){for(var i=t.onOpenTag,n=t.onCloseTag,r=t.onText,a=t.onComment,s=t.onDoctype,l=new H,u=0,c=e.length,h=0,d=0,f=l;u<c;){var _=e.charAt(u);switch(h){case 0:m(_);break;case 1:$(_);break;case 2:y(_);break;case 3:g(_);break;case 4:v(_);break;case 5:T(_);break;case 6:P(_);break;case 7:E(_);break;case 8:A(_);break;case 9:L(_);break;case 10:M(_);break;case 11:I(_);break;case 12:O(_);break;case 13:D();break;case 14:R(_);break;case 15:N(_);break;case 16:F(_);break;case 17:B(_);break;case 18:z(_);break;case 19:G(_);break;case 20:k(_);break;default:o(h)}u++}function m(e){"<"===e&&V()}function $(e){"!"===e?h=13:"/"===e?(h=2,f=new H(p({},f,{isClosing:!0}))):"<"===e?V():x.test(e)?(h=3,f=new H(p({},f,{isOpening:!0}))):(h=0,f=l)}function g(e){S.test(e)?(f=new H(p({},f,{name:j()})),h=4):"<"===e?V():"/"===e?(f=new H(p({},f,{name:j()})),h=12):">"===e?(f=new H(p({},f,{name:j()})),W()):!x.test(e)&&!b.test(e)&&":"!==e&&U()}function y(e){">"===e?U():x.test(e)?h=3:U()}function v(e){S.test(e)||("/"===e?h=12:">"===e?W():"<"===e?V():"="===e||w.test(e)||C.test(e)?U():h=5)}function T(e){S.test(e)?h=6:"/"===e?h=12:"="===e?h=7:">"===e?W():"<"===e?V():w.test(e)&&U()}function P(e){S.test(e)||("/"===e?h=12:"="===e?h=7:">"===e?W():"<"===e?V():w.test(e)?U():h=5)}function E(e){S.test(e)||('"'===e?h=8:"'"===e?h=9:/[>=`]/.test(e)?U():"<"===e?V():h=10)}function A(e){'"'===e&&(h=11)}function L(e){"'"===e&&(h=11)}function M(e){S.test(e)?h=4:">"===e?W():"<"===e&&V()}function I(e){S.test(e)?h=4:"/"===e?h=12:">"===e?W():"<"===e?V():(h=4,q())}function O(e){">"===e?(f=new H(p({},f,{isClosing:!0})),W()):h=4}function D(t){"--"===e.substr(u,2)?(u+=2,f=new H(p({},f,{type:"comment"})),h=14):"DOCTYPE"===e.substr(u,7).toUpperCase()?(u+=7,f=new H(p({},f,{type:"doctype"})),h=20):U()}function R(e){"-"===e?h=15:">"===e?U():h=16}function N(e){"-"===e?h=18:">"===e?U():h=16}function F(e){"-"===e&&(h=17)}function B(e){h="-"===e?18:16}function z(e){">"===e?W():"!"===e?h=19:"-"===e||(h=16)}function G(e){"-"===e?h=17:">"===e?W():h=16}function k(e){">"===e?W():"<"===e&&V()}function U(){h=0,f=l}function V(){h=1,f=new H({idx:u})}function W(){var t=e.slice(d,f.idx);t&&r(t,d),"comment"===f.type?a(f.idx):"doctype"===f.type?s(f.idx):(f.isOpening&&i(f.name,f.idx),f.isClosing&&n(f.name,f.idx)),U(),d=u+1}function Y(){var t=e.slice(d,u);r(t,d),d=u+1}function j(){var t=f.idx+(f.isClosing?2:1);return e.slice(t,u).toLowerCase()}function q(){u--}d<u&&Y()}var H=function(){function e(e){void 0===e&&(e={}),this.idx=void 0!==e.idx?e.idx:-1,this.type=e.type||"tag",this.name=e.name||"",this.isOpening=!!e.isOpening,this.isClosing=!!e.isClosing}return e}(),Y=function(){function t(e){void 0===e&&(e={}),this.version=t.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:"end"},this.className="",this.replaceFn=null,this.context=void 0,this.matchers=null,this.tagBuilder=null,this.urls=this.normalizeUrlsCfg(e.urls),this.email="boolean"==typeof e.email?e.email:this.email,this.phone="boolean"==typeof e.phone?e.phone:this.phone,this.hashtag=e.hashtag||this.hashtag,this.mention=e.mention||this.mention,this.newWindow="boolean"==typeof e.newWindow?e.newWindow:this.newWindow,this.stripPrefix=this.normalizeStripPrefixCfg(e.stripPrefix),this.stripTrailingSlash="boolean"==typeof e.stripTrailingSlash?e.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding="boolean"==typeof e.decodePercentEncoding?e.decodePercentEncoding:this.decodePercentEncoding;var i=this.mention;if(!1!==i&&"twitter"!==i&&"instagram"!==i&&"soundcloud"!==i)throw new Error("invalid `mention` cfg - see docs");var n=this.hashtag;if(!1!==n&&"twitter"!==n&&"facebook"!==n&&"instagram"!==n)throw new Error("invalid `hashtag` cfg - see docs");this.truncate=this.normalizeTruncateCfg(e.truncate),this.className=e.className||this.className,this.replaceFn=e.replaceFn||this.replaceFn,this.context=e.context||this}return t.link=function(e,i){return new t(i).link(e)},t.parse=function(e,i){return new t(i).parse(e)},t.prototype.normalizeUrlsCfg=function(e){return null==e&&(e=!0),"boolean"==typeof e?{schemeMatches:e,wwwMatches:e,tldMatches:e}:{schemeMatches:"boolean"!=typeof e.schemeMatches||e.schemeMatches,wwwMatches:"boolean"!=typeof e.wwwMatches||e.wwwMatches,tldMatches:"boolean"!=typeof e.tldMatches||e.tldMatches}},t.prototype.normalizeStripPrefixCfg=function(e){return null==e&&(e=!0),"boolean"==typeof e?{scheme:e,www:e}:{scheme:"boolean"!=typeof e.scheme||e.scheme,www:"boolean"!=typeof e.www||e.www}},t.prototype.normalizeTruncateCfg=function(t){return"number"==typeof t?{length:t,location:"end"}:e(t||{},{length:Number.POSITIVE_INFINITY,location:"end"})},t.prototype.parse=function(e){var t=this,i=["a","style","script"],n=0,o=[];return W(e,{onOpenTag:function(e){i.indexOf(e)>=0&&n++},onText:function(e,i){if(0===n){var a=r(e,/( | |<|<|>|>|"|"|')/gi),s=i;a.forEach((function(e,i){if(i%2==0){var n=t.parseText(e,s);o.push.apply(o,n)}s+=e.length}))}},onCloseTag:function(e){i.indexOf(e)>=0&&(n=Math.max(n-1,0))},onComment:function(e){},onDoctype:function(e){}}),o=this.compactMatches(o),o=this.removeUnwantedMatches(o)},t.prototype.compactMatches=function(e){e.sort((function(e,t){return e.getOffset()-t.getOffset()}));for(var t=0;t<e.length-1;t++){var i=e[t],n=i.getOffset(),r=i.getMatchedText().length,o=n+r;if(t+1<e.length){if(e[t+1].getOffset()===n){var a=e[t+1].getMatchedText().length>r?t:t+1;e.splice(a,1);continue}e[t+1].getOffset()<o&&e.splice(t+1,1)}}return e},t.prototype.removeUnwantedMatches=function(e){return this.hashtag||n(e,(function(e){return"hashtag"===e.getType()})),this.email||n(e,(function(e){return"email"===e.getType()})),this.phone||n(e,(function(e){return"phone"===e.getType()})),this.mention||n(e,(function(e){return"mention"===e.getType()})),this.urls.schemeMatches||n(e,(function(e){return"url"===e.getType()&&"scheme"===e.getUrlMatchType()})),this.urls.wwwMatches||n(e,(function(e){return"url"===e.getType()&&"www"===e.getUrlMatchType()})),this.urls.tldMatches||n(e,(function(e){return"url"===e.getType()&&"tld"===e.getUrlMatchType()})),e},t.prototype.parseText=function(e,t){void 0===t&&(t=0),t=t||0;for(var i=this.getMatchers(),n=[],r=0,o=i.length;r<o;r++){for(var a=i[r].parseMatches(e),s=0,l=a.length;s<l;s++)a[s].setOffset(t+a[s].getOffset());n.push.apply(n,a)}return n},t.prototype.link=function(e){if(!e)return"";for(var t=this.parse(e),i=[],n=0,r=0,o=t.length;r<o;r++){var a=t[r];i.push(e.substring(n,a.getOffset())),i.push(this.createMatchReturnVal(a)),n=a.getOffset()+a.getMatchedText().length}return i.push(e.substring(n)),i.join("")},t.prototype.createMatchReturnVal=function(e){var t;return this.replaceFn&&(t=this.replaceFn.call(this.context,e)),"string"==typeof t?t:!1===t?e.getMatchedText():t instanceof a?t.toAnchorString():e.buildTag().toAnchorString()},t.prototype.getMatchers=function(){if(this.matchers)return this.matchers;var e=this.getTagBuilder(),t=[new k({tagBuilder:e,serviceName:this.hashtag}),new F({tagBuilder:e}),new U({tagBuilder:e}),new V({tagBuilder:e,serviceName:this.mention}),new G({tagBuilder:e,stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding})];return this.matchers=t},t.prototype.getTagBuilder=function(){var e=this.tagBuilder;return e||(e=this.tagBuilder=new c({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),e},t.version="3.11.0",t.AnchorTagBuilder=c,t.HtmlTag=a,t.matcher={Email:F,Hashtag:k,Matcher:v,Mention:V,Phone:U,Url:G},t.match={Email:_,Hashtag:m,Match:h,Mention:$,Phone:g,Url:y},t}();return Y}()}(xe$k);var zt$3=xe$k.Autolinker;function n$w(e,t){this.position=e,this.headingPitchRange=t}function l$l(e,t){this.id=t,this.name=e,this.playlistIndex=0,this.playlist=[],this.tourStart=new o$15,this.tourEnd=new o$15,this.entryStart=new o$15,this.entryEnd=new o$15,this._activeEntries=[]}function p$s(e){for(var t=e.pop();void 0!==t;t=e.pop())t.stop()}function h$u(e,t,i){var n=this.playlist[this.playlistIndex];if(n){var r=y$t.bind(this,e,t,i);if(this._activeEntries.push(n),this.entryStart.raiseEvent(n),n.blocking)n.play(r,e.scene.camera,t);else{var o=this;n.play((function(){o.entryEnd.raiseEvent(n);var e=o._activeEntries.indexOf(n);e>=0&&o._activeEntries.splice(e,1)})),r(e,t,i)}}else t$$(i)&&i(!1)}function y$t(e,t,i,n){var r=this.playlist[this.playlistIndex];if(this.entryEnd.raiseEvent(r,n),n)i(n);else{var o=this._activeEntries.indexOf(r);o>=0&&this._activeEntries.splice(o,1),this.playlistIndex++,h$u.call(this,e,t,i)}}function a$n(e,t,i){this.type="KmlTourFlyTo",this.blocking=!0,this.activeCamera=null,this.activeCallback=null,this.duration=e,this.view=i,this.flyToMode=t}function i$t(e){this.type="KmlTourWait",this.blocking=!0,this.duration=e,this.timeout=null}l$l.prototype.addPlaylistEntry=function(e){this.playlist.push(e)},l$l.prototype.play=function(e,t){this.tourStart.raiseEvent();var i=this;h$u.call(this,e,t,(function(e){i.playlistIndex=0,e||p$s(i._activeEntries),i.tourEnd.raiseEvent(e)}))},l$l.prototype.stop=function(){p$s(this._activeEntries)},a$n.prototype.play=function(e,t,i){if(this.activeCamera=t,t$$(e)&&null!==e){var n=this;this.activeCallback=function(t){delete n.activeCallback,delete n.activeCamera,e(!t$$(t)&&t)}}var r=this.getCameraOptions(i);if(this.view.headingPitchRoll)t.flyTo(r);else if(this.view.headingPitchRange){var o=new c$19(this.view.position);t.flyToBoundingSphere(o,r)}},a$n.prototype.stop=function(){t$$(this.activeCamera)&&this.activeCamera.cancelFlight(),t$$(this.activeCallback)&&this.activeCallback(!0)},a$n.prototype.getCameraOptions=function(e){var t={duration:this.duration};return t$$(this.activeCallback)&&(t.complete=this.activeCallback),"smooth"===this.flyToMode&&(t.easingFunction=_$T.LINEAR_NONE),this.view.headingPitchRoll?(t.destination=this.view.position,t.orientation=this.view.headingPitchRoll):this.view.headingPitchRange&&(t.offset=this.view.headingPitchRange),t$$(e)&&(t=s$1n(t,e)),t},i$t.prototype.play=function(e){var t=this;this.activeCallback=e,this.timeout=setTimeout((function(){delete t.activeCallback,e(!1)}),1e3*this.duration)},i$t.prototype.stop=function(){clearTimeout(this.timeout),t$$(this.activeCallback)&&this.activeCallback(!0)};var _0x3d862b=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x5209df=_0x3d862b(void 0,(function(){return _0x5209df.toString().search("(((.+)+)+)+$").toString().constructor(_0x5209df).search("(((.+)+)+)+$")}));_0x5209df();var _0x2b4a17="attribute vec4 aPosition;\n#ifdef HAS_NORMAL\n attribute vec3 aNormal;\n#endif\nuniform vec4 uFillColor;\nattribute vec4 aTexCoord0;\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\nattribute vec3 aPosHigh;\nattribute vec3 aPosLow;\nattribute vec4 aQuaternion;\nattribute vec4 aScaleAndRadius;\nattribute vec4 aColor2;\nattribute vec4 aPickColor;\nattribute vec3 aOffset;\n#ifdef LocalTransform\nattribute vec4 aLocalTranslation;\nattribute vec4 aLocalQuaternion;\n#endif\nuniform mat4 uGeoMat;\nuniform float uRangeMode;\nuniform vec2 uVisibleDistance;\nuniform float uFilterPixel;\nuniform float uMixColorType;\nvarying vec4 vPositionMC;\nvarying vec3 vPositionEC;\nvarying vec4 vPositionWC;\nvarying vec3 vNormalEC;\nvarying vec2 vTexCoord;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvarying mat4 vModelMatrix;\n#ifdef Volume\n attribute vec3 aRatio;\n varying vec3 vecRotioCoord;\n varying vec2 vecHypTexCoord;\n#endif\n\nmat4 transfromFromQuaternion(vec4 q, vec4 translation)\n{\n float x2 = q.x * q.x;\n float xy = q.x * q.y;\n float xz = q.x * q.z;\n float xw = q.x * q.w;\n float y2 = q.y * q.y;\n float yz = q.y * q.z;\n float yw = q.y * q.w;\n float z2 = q.z * q.z;\n float zw = q.z * q.w;\n float w2 = q.w * q.w;\n float m00 = x2 - y2 - z2 + w2;\n float m01 = 2.0 * (xy - zw);\n float m02 = 2.0 * (xz + yw);\n float m10 = 2.0 * (xy + zw);\n float m11 = -x2 + y2 - z2 + w2;\n float m12 = 2.0 * (yz - xw);\n float m20 = 2.0 * (xz - yw);\n float m21 = 2.0 * (yz + xw);\n float m22 = -x2 - y2 + z2 + w2;\n return mat4(m00, m10, m20, 0.0, m01, m11, m21, 0.0, m02, m12, m22, 0.0, translation.x, translation.y, translation.z, 1.0);\n}\nfloat filterTest(vec3 rte, float radius)\n{\n if(uRangeMode > 0.0)\n {\n float distance = length(rte);\n float theta = czm_piOverFour * 0.5;\n float screenPix = max(czm_globeDepthTextureDim.x, czm_globeDepthTextureDim.y) * 0.5;\n float lamat = screenPix / tan(theta);\n return lamat * radius / distance > uFilterPixel ? 1.0 : 0.0;\n }\n return length(rte) < uVisibleDistance.x && length(rte) > uVisibleDistance.y ? 1.0 : 0.0;\n}\nvoid main()\n{\n vec4 vertexPos = vec4(aPosition.xyz, 1.0) - vec4(aOffset.xyz,0.0);\n vec4 positionMC = uGeoMat*vertexPos;\n vec4 rte = czm_translateRelativeToEye(aPosHigh,aPosLow);\n vTexCoord = aTexCoord0.xy;\n float show = filterTest(rte.xyz, aScaleAndRadius.w);\n mat4 rotationMat = transfromFromQuaternion(aQuaternion, vec4(0.0));\n mat4 worldMatrix;\n worldMatrix[0] = vec4(rotationMat[0].xyz,0.0);\n worldMatrix[1] = vec4(rotationMat[1].xyz,0.0);\n worldMatrix[2] = vec4(rotationMat[2].xyz,0.0);\n worldMatrix[3] = vec4(rte.x,rte.y,rte.z,1.0);\n mat4 scaleMatrix;\n vec3 scale = aScaleAndRadius.xyz;\n scaleMatrix[0] = vec4(scale.x,0,0,0.0);\n scaleMatrix[1] = vec4(0,scale.y,0,0.0);\n scaleMatrix[2] = vec4(0,0,scale.z,0.0);\n scaleMatrix[3] = vec4(0,0,0,1.0);\n mat4 modelMatrix = worldMatrix;\n#ifdef LocalTransform\n mat4 localTransformMat = transfromFromQuaternion(aLocalQuaternion, aLocalTranslation);\n modelMatrix *= localTransformMat;\n#endif\n modelMatrix *= scaleMatrix;\n mat3 rotationMatrix = mat3(modelMatrix);\n positionMC = modelMatrix * vec4(positionMC.xyz, 1.0);\n positionMC.w = 1.0;\n gl_Position = show * czm_modelViewProjectionRelativeToEye * positionMC;\n vPositionMC.xyz = positionMC.xyz;\n vPositionWC = modelMatrix * positionMC;\n vPositionMC.w = 0.0;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n if(abs(uMixColorType) < 0.1)\n {\n vColor = vertexColor * aColor2;\n }\n else\n {\n vColor = aColor2;\n }\n vPickColor = aPickColor / 255.0;\n vModelMatrix = modelMatrix * uGeoMat;\n#ifdef HAS_NORMAL\n if(length(aNormal) > 0.8)\n {\n mat4 modelView = czm_view * vModelMatrix;\n mat4 invModelView = czm_inverseMatrix(modelView);\n mat3 invModelViewRotation = mat3(invModelView);\n mat3 normalMatrix = czm_transpose(invModelViewRotation);\n vNormalEC = normalize(normalMatrix * aNormal);\n vPositionMC.w = 1.0;\n vPositionEC = (czm_modelViewRelativeToEye * vPositionMC).xyz;\n }\n#endif\n#ifdef Volume\nvecRotioCoord = aRatio;\n#endif\n#ifdef ClampObject\n gl_Position = czm_depthClampFarPlane(czm_modelViewProjectionRelativeToEye*positionMC);\n vColor = vColor * uFillColor;\n#endif\n}",_0x4777c9=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2d6f08=_0x4777c9(void 0,(function(){return _0x2d6f08.toString().search("(((.+)+)+)+$").toString().constructor(_0x2d6f08).search("(((.+)+)+)+$")}));_0x2d6f08();var _0x21df49=273;function _0x16c4db(e,t,i){switch(e){case de$x.COMPRESSED_RGB_S3TC_DXT1_EXT:case de$x.COMPRESSED_RGB_ETC1_WEBGL:return(t+3>>2)*(i+3>>2)*8;case de$x.COMPRESSED_RGBA_S3TC_DXT5_EXT:return(t+3>>2)*(i+3>>2)*16;case de$x.COMPRESSED_RGB_PVRTC_4BPPV1_IMG:case de$x.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8);case de$x.COMPRESSED_RGB_PVRTC_2BPPV1_IMG:case de$x.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8);case _0x21df49:return t*i*2;case Z$_.RGBA:return t*i*4;case Z$_.LUMINANCE_ALPHA:return t*i*2;default:return 0}}var _0x389226=function(e,t,i,n,r,o,a,s,l,u,c,h){this._context=t,this._gl=t._gl,this._width=i,this._height=n,this._imageBuffer=o,this._oriCompressType=h,this._texture=null,this._internalFormat=r,this._isCompressed=Z$_.isCompressedFormat(r),this._wrapS=e$1Y(s,j$13.CLAMP_TO_EDGE),this._wrapT=e$1Y(l,j$13.CLAMP_TO_EDGE),this._pixelDataType=e$1Y(u,v$Z.UNSIGNED_BYTE),this._pixelDataType===v$Z.FLOAT&&(this._wrapS=j$13.CLAMP_TO_EDGE,this._wrapT=j$13.CLAMP_TO_EDGE),this.ready=!1,this.is3D=a,this.id=e,this._target=this._gl.TEXTURE_2D,this._size=o.length,this._mipmapEnabled=e$1Y(c,!0),1==this.is3D?this.init3DTexture():(this._target=this._gl.TEXTURE_2D,this.initTexture()),this._sizeInBytes=this._size,this._context.memorySize+=this._sizeInBytes};function _0x2d5dfd(e,t,i,n){var r=1;if(!n$1d.isPowerOfTwo(i)||!n$1d.isPowerOfTwo(n))return 1;for(var o=e.length,a=i,s=n,l=0;;){if(l+=Z$_.compressedTextureSizeInBytes(t,a,s),s>>=1,0==(a>>=1)&&0==s)break;r++,a=Math.max(a,1),s=Math.max(s,1)}return l==o?r:1}function _0x1fc772(e,t,i){var n=e.length,r=Math.ceil(Math.sqrt(n)),o=document.createElement("canvas");o.width=t*r,o.height=i*r;var a=o.getContext("2d");a.fillStyle="#00f",a.fillRect(0,0,o.width,o.height);for(var s=0;s<n;s++){var l=e[s%n],u=s%r,c=Math.floor(s/r);a.drawImage(l,u*t,c*i)}return a.getImageData(0,0,t*r,i*r)}_0x389226.prototype.initTexture=function(){var e=this._gl;this._texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this._texture),this.ext;var t=this._internalFormat,i=this._width,n=this._height,r=this._imageBuffer,o=0,a=0;t===Z$_.LUMINANCE_ALPHA||0===this._oriCompressType?e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!1):(t==Z$_.RGB||t==Z$_.RGBA)&&e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!0);var s=_0x2d5dfd(r,t,i,n);this._context.webgl2&&e.texStorage2D(e.TEXTURE_2D,s,t,i,n);var l=s>1&&this._mipmapEnabled;do{var u,c=_0x16c4db(t,i,n);u=t==Z$_.RGBA&&this._pixelDataType===v$Z.FLOAT?new Float32Array(r.buffer,r.byteOffset+o,c):new Uint8Array(r.buffer,r.byteOffset+o,c),this._isCompressed?this._context.webgl2?e.compressedTexSubImage2D(e.TEXTURE_2D,a++,0,0,i,n,t,u):e.compressedTexImage2D(e.TEXTURE_2D,a++,t,i,n,0,u):this._context.webgl2?t===_0x21df49?(e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!0),e.texSubImage2D(e.TEXTURE_2D,0,0,0,i,n,e.RGB,e.UNSIGNED_SHORT_5_6_5,r),c/=2):e.texSubImage2D(e.TEXTURE_2D,a++,0,0,i,n,t,this._pixelDataType,u):t===_0x21df49?(e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGB,i,n,0,e.RGB,e.UNSIGNED_SHORT_5_6_5,r),c/=2):e.texImage2D(e.TEXTURE_2D,a++,t,i,n,0,t,this._pixelDataType,u),i=Math.max(i>>1,1),n=Math.max(n>>1,1),o+=c}while(o<r.length&&l);a>1?(e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),n$1d.isPowerOfTwo(this._width)&&n$1d.isPowerOfTwo(this._height)?e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_LINEAR):e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR)):this._context.webgl2&&t==Z$_.RGBA||n$1d.isPowerOfTwo(this._width)&&n$1d.isPowerOfTwo(this._height)&&t==Z$_.RGBA?(this.generateMipmap(),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_LINEAR)):(e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR)),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,this._wrapS),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,this._wrapT),e.bindTexture(e.TEXTURE_2D,null),delete this._imageBuffer,this._imageBuffer=null,this.ready=!0},_0x389226.prototype.generateMipmap=function(){var e=D$12.NICEST;if(!this._context.webgl2){if(this._width>1&&!n$1d.isPowerOfTwo(this._width))throw new DeveloperError("width must be a power of two to call generateMipmap().");if(this._height>1&&!n$1d.isPowerOfTwo(this._height))throw new DeveloperError("height must be a power of two to call generateMipmap().")}var t=this._gl,i=this._target;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i)},_0x389226.prototype.updateTexture=function(e,t){this.id=e,this._size=t.length;var i=this._gl;i.bindTexture(i.TEXTURE_2D,this._texture),this.ext;var n=this._internalFormat,r=this._width,o=this._height;this._imageBuffer=t;var a=0,s=0;n===Z$_.LUMINANCE_ALPHA||0===this._oriCompressType?i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1):(n==Z$_.RGB||n==Z$_.RGBA)&&i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!0);var l=_0x2d5dfd(t,n,r,o)>1;do{var u,c=_0x16c4db(n,r,o);u=n==Z$_.RGBA&&this._pixelDataType===v$Z.FLOAT?new Float32Array(t.buffer,t.byteOffset+a,c):new Uint8Array(t.buffer,t.byteOffset+a,c),this._isCompressed?this._context.webgl2?i.compressedTexSubImage2D(i.TEXTURE_2D,s++,0,0,r,o,n,u):i.compressedTexImage2D(i.TEXTURE_2D,s++,n,r,o,0,u):this._context.webgl2?n===_0x21df49?(i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!0),i.texSubImage2D(i.TEXTURE_2D,0,0,0,r,o,i.RGB,i.UNSIGNED_SHORT_5_6_5,t),c/=2):i.texSubImage2D(i.TEXTURE_2D,s++,0,0,r,o,n,this._pixelDataType,u):n===_0x21df49?(i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!0),i.texImage2D(i.TEXTURE_2D,0,i.RGB,r,o,0,i.RGB,i.UNSIGNED_SHORT_5_6_5,t),c/=2):i.texImage2D(i.TEXTURE_2D,s++,n,r,o,0,n,this._pixelDataType,u),r=Math.max(r>>1,1),o=Math.max(o>>1,1),a+=c}while(a<t.length&&l);s>1?(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),n$1d.isPowerOfTwo(this._width)&&n$1d.isPowerOfTwo(this._height)?i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR_MIPMAP_LINEAR):i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR)):(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR)),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,this._wrapS),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,this._wrapT),i.bindTexture(i.TEXTURE_2D,null),delete this._imageBuffer,this._imageBuffer=null,this.ready=!0},_0x389226.prototype.init3DTexture=function(){for(var e=this._imageBuffer,t=this._gl,i=_0x1fc772(e,this._width,this._height),n=i.width*i.height*4,r=new Uint8Array(n),o=0;o<n;o++)r[o]=i.data[o];t=this._gl;this._texture=t.createTexture(),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,this._texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),e.length,t.texImage2D(t.TEXTURE_2D,0,t.RGBA,i.width,i.height,0,t.RGBA,t.UNSIGNED_BYTE,r),t.bindTexture(t.TEXTURE_2D,null),this.ready=!0},_0x389226.prototype.dxtToRgb565=function(e,t,i,n){for(var r=new Uint16Array(4),o=new Uint16Array(i*n),a=0,s=0,l=0,u=0,c=0,h=0,d=0,f=0,p=0,_=i/4,m=n/4,$=0;$<m;$++)for(var g=0;g<_;g++)l=t+4*($*_+g),r[0]=e[l],r[1]=e[l+1],u=31&r[0],c=2016&r[0],h=63488&r[0],d=31&r[1],f=2016&r[1],p=63488&r[1],r[2]=5*u+3*d>>3|5*c+3*f>>3&2016|5*h+3*p>>3&63488,r[3]=5*d+3*u>>3|5*f+3*c>>3&2016|5*p+3*h>>3&63488,a=e[l+2],o[s=4*$*i+4*g]=r[3&a],o[s+1]=r[a>>2&3],o[s+2]=r[a>>4&3],o[s+3]=r[a>>6&3],o[s+=i]=r[a>>8&3],o[s+1]=r[a>>10&3],o[s+2]=r[a>>12&3],o[s+3]=r[a>>14],a=e[l+3],o[s+=i]=r[3&a],o[s+1]=r[a>>2&3],o[s+2]=r[a>>4&3],o[s+3]=r[a>>6&3],o[s+=i]=r[a>>8&3],o[s+1]=r[a>>10&3],o[s+2]=r[a>>12&3],o[s+3]=r[a>>14];return o},_0x389226.prototype.destroy=function(){this._gl.deleteTexture(this._texture),this._texture=null,this.ready=!1,this.id=0,this._context.memorySize-=this._sizeInBytes},_0x389226.prototype.enable=function(){this.ready&&(this._gl.activeTexture(this._gl.TEXTURE0),this._gl.bindTexture(this._target,this._texture))},_0x389226.prototype.disable=function(){this.ready&&this._gl.bindTexture(this._target,null)};var _0x139477=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x57c18b=_0x139477(void 0,(function(){return _0x57c18b.toString().search("(((.+)+)+)+$").toString().constructor(_0x57c18b).search("(((.+)+)+)+$")}));_0x57c18b();var _0x133997={encNONE:0,enrS3TCDXTN:14,enrPVRTPF_PVRTC2:19,enrPVRTPF_PVRTC:20,enrPVRTPF_PVRTC_4bpp:21,enrPVRTPF_ETC1:22},_0x415d95=Object.freeze(_0x133997),_0x21c2af=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3ccb98=_0x21c2af(void 0,(function(){return _0x3ccb98.toString().search("(((.+)+)+)+$").toString().constructor(_0x3ccb98).search("(((.+)+)+)+$")}));_0x3ccb98();var _0x25c76c={MIX:0,REPLACE:1,SILHOUETTE:2,ALWAYS_SHOW_SILHOUETTE:3,SILHOUETTE_EDGE:4,WIREFRAME:5},Ja=Object.freeze(_0x25c76c),_0x51cc98=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1881ba=_0x51cc98(void 0,(function(){return _0x1881ba.toString().search("(((.+)+)+)+$").toString().constructor(_0x1881ba).search("(((.+)+)+)+$")}));_0x1881ba();var _0x38a169="attribute vec4 position;\n\nuniform vec4 uRect;\n\nvoid main()\n{\n vec4 vPos = position;\n vec2 vBounds = uRect.zw - uRect.xy;\n vPos.xy = (vPos.xy - uRect.xy) / vBounds.xy * 2.0 - 1.0;\n gl_Position = vec4(vPos.xy, 0.0, 1.0);\n}",e$E={Fill:0,WireFrame:1,Fill_And_WireFrame:2},vr=Object.freeze(e$E),e$D=function(){this._fillForeColor=new e$1z,this._fillStyle=vr.Fill,this._lineColor=new e$1z,this._lineWidth=1,this._bottomAltitude=0,this._pointSize=1,this._pointColor=new e$1z,this._altitudeMode=U$Y.NONE,this._emissionColor=new e$1z(1,1,1,1),this._owner=void 0,this._dirty=!1,this._image=void 0,this._imageReady=!0,this._calloutColor=e$1z.RED,this._calloutWidth=1,this._billboardMode=Cr$2.SCREEN_ALIGNED};Object.defineProperties(e$D.prototype,{fillForeColor:{get:function(){return this._fillForeColor},set:function(e){n$1e.typeOf.object("fillForeColor value",e),e$1z.clone(e,this._fillForeColor)}},bottomAltitude:{get:function(){return this._bottomAltitude},set:function(e){n$1e.typeOf.number("bottomAltitude value",e),this._bottomAltitude!==e&&(this._bottomAltitude=e,this._dirty=!0)}},altitudeMode:{get:function(){return this._altitudeMode},set:function(e){n$1e.typeOf.number("altitudeMode value",e),this._altitudeMode=e}},fillStyle:{get:function(){return this._fillStyle},set:function(e){n$1e.typeOf.number("fillStyle value",e),this._fillStyle=e}},lineColor:{get:function(){return this._lineColor},set:function(e){n$1e.typeOf.object("line color",e),e$1z.clone(e,this._lineColor)}},lineWidth:{get:function(){return this._lineWidth},set:function(e){n$1e.typeOf.number("line width",e),this._lineWidth=e}},pointSize:{get:function(){return this._pointSize},set:function(e){n$1e.typeOf.number("point size",e),this._pointSize=e}},pointColor:{get:function(){return this._pointColor},set:function(e){n$1e.typeOf.object("point color",e),e$1z.clone(e,this._pointColor)}},emissionColor:{get:function(){return this._emissionColor},set:function(e){n$1e.typeOf.object("emission color",e),e$1z.clone(e,this._emissionColor)}},image:{get:function(){return this._image},set:function(e){this._imageReady=!1,this._image=e,"string"==typeof e?this._loadImage():this._imageReady=!0}},imageReady:{get:function(){return this._imageReady}},calloutColor:{get:function(){return this._calloutColor},set:function(e){this._calloutColor!==e&&(this._calloutColor=e)}},calloutWidth:{get:function(){return this._calloutWidth},set:function(e){this._calloutWidth!==e&&(this._calloutWidth=e)}},billboardMode:{get:function(){return this._billboardMode},set:function(e){this._billboardMode!==e&&(this._billboardMode=e)}}}),e$D.prototype._loadImage=function(){var e=this._image;e=t$X.createIfNeeded(e).fetchImage();var t=this;c$18(e,(function(e){t._image=e,t._imageReady=!0}))};var _0x5c32f9=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x457478=_0x5c32f9(void 0,(function(){return _0x457478.toString().search("(((.+)+)+)+$").toString().constructor(_0x457478).search("(((.+)+)+)+$")}));_0x457478();var _0x37c24d="attribute vec4 position;\n\nuniform vec4 uRect;\n\nvarying float fHeight;\n\nvoid main()\n{\n vec4 vPos = position;\n vec2 vBounds = uRect.zw - uRect.xy;\n vPos.xy = (vPos.xy - uRect.xy) / vBounds.xy * 2.0 - 1.0;\n gl_Position = vec4(vPos.xy, 0.5, 1.0);\n fHeight = vPos.z;\n}",_0x4d32b3=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1fafd3=_0x4d32b3(void 0,(function(){return _0x1fafd3.toString().search("(((.+)+)+)+$").toString().constructor(_0x1fafd3).search("(((.+)+)+)+$")}));_0x1fafd3();var _0x4ee30e="#ifdef Mode_Height\nvarying float fHeight;\n#endif\n#ifdef OVERLAY\n varying vec2 vTexCoord;\n uniform sampler2D uTexture;\n#endif\n\nvoid main()\n{\n gl_FragColor = vec4(1.0);\n#ifdef Mode_Height\n #ifdef UseFloatTexture\n gl_FragColor = vec4(fHeight, 0.0, 0.0, 1.0);\n #else\n gl_FragColor = czm_packValue(fHeight);\n #endif\n#endif\n#ifdef OVERLAY\n gl_FragColor = texture2D(uTexture,vTexCoord);\n#endif\n}",e$C={Triangle:0,Quad:1,Sketch:2,EffectOutline:3},_0x39abaa=Object.freeze(e$C),_0x3b1f12=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1d71e6=_0x3b1f12(void 0,(function(){return _0x1d71e6.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d71e6).search("(((.+)+)+)+$")}));_0x1d71e6();var _0x3e9562={OSGBFile:0,OSGBCacheFile:1,ClampGroundPolygon:2,ClampObjectPolygon:3,ClampGroundLine:4,ClampObjectLine:5,IconPoint:6,Text:7,PointCloudFile:8,ExtendRegion3D:9,ExtendClampPolygonCache:10,PolylineEffect:11,RegionEffect:12,ClampGroundAndObjectLineCache:13,ClampGroundRealtimeRasterCache:14},c$q=Object.freeze(_0x3e9562),_0x486eea=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x23487d=_0x486eea(void 0,(function(){return _0x23487d.toString().search("(((.+)+)+)+$").toString().constructor(_0x23487d).search("(((.+)+)+)+$")}));_0x23487d();var _0x4a4600={UNLOAD:0,LOADING:1,LOADED:2,VOLLOADED:3,PARSING:4,PARSED:5,TRANSFORMING:6,TRANSFORMED:7,LOST:8,LOADVOL:9,FAILED:10,VOLFAILED:11},W$q=Object.freeze(_0x4a4600),E$u={UNLOADED:0,TRANSITIONING:1,RECEIVED:2,TEXTURE_LOADED:3,READY:4,FAILED:5,INVALID:6,PLACEHOLDER:7,RENDERING:8,RENDERED:9},Tt$4=Object.freeze(E$u);function n$v(e,t,i,n,r){if(this.imageryLayer=e,this.x=t,this.y=i,this.level=n,this.request=void 0,0!==n){var o=t/2|0,a=i/2|0,s=n-1;this.parent=e.getImageryFromCache(o,a,s)}(this.state=Tt$4.UNLOADED,this.imageUrl=void 0,this.image=void 0,this.texture=void 0,this.textureWebMercator=void 0,this.credits=void 0,this.referenceCount=0,this.isMvtTexture=!1,this.cancelCount=0,!t$$(r)&&e.imageryProvider.ready)&&(r=e.imageryProvider.tilingScheme.tileXYToRectangle(t,i,n));this.rectangle=r,this.discard=!1}function E$t(e,t,i,n){var r=t.getGeometry().getFlatCoordinates(),o=r[0],a=r[1],s=i[0]*o+i[2]*a+i[4],l=i[1]*o+i[3]*a+i[5],u=s/e._canvasWidth,c=l/e._canvasWidth,h=n.west+n.width*u,d=n.south+n.height*(1-c);return a$11.fromRadians(h,d,100)}n$v.createPlaceholder=function(e){var t=new n$v(e,0,0,0);return t.addReference(),t.state=Tt$4.PLACEHOLDER,t},n$v.prototype.addReference=function(){++this.referenceCount},n$v.prototype.releaseReference=function(){if(--this.referenceCount,0===this.referenceCount){if(this.imageryLayer.removeImageryFromCache(this),t$$(this.parent)&&this.parent.releaseReference(),t$$(this.image)&&t$$(this.image.destroy)&&this.image.destroy(),t$$(this.idTexture)&&(this.imageryLayer.imageryProvider.removeTile(this.x,this.y,this.level),this.idTexture.destroy()),this.release(),t$$(this.texture)&&this.texture.destroy(),t$$(this.textureWebMercator)&&this.texture!==this.textureWebMercator&&this.textureWebMercator.destroy(),t$$(this.labelParent)){this.imageryLayer.kmlLayer.entities.remove(this.labelParent);for(var e=0,t=this.labelParent._children.length;e<t;e++)this.imageryLayer.kmlLayer.entities.remove(this.labelParent._children[e]);this.labelParent=void 0}if(t$$(this.billboardParent)){this.imageryLayer.kmlLayer.entities.remove(this.billboardParent);for(e=0,t=this.billboardParent._children.length;e<t;e++)this.imageryLayer.kmlLayer.entities.remove(this.billboardParent._children[e]);this.billboardParent=void 0}return s$1e(this),0}return this.referenceCount},new r$T,new a$11;var b$y=new u$W;n$v.prototype.createLabel=function(e,t){for(var i=this.rectangle,n=this.transform,r=(t.length,0),o=t.length;r<o;r++){var a=t[r],s=a.feature,l=a.style,u=l.getText(),c=l.textSize,h=u.getText();if(""!==h){var d,f,p,_,m=u.getFont(m),$=c+"px "+m,g=u.getFill(),y=u.getStroke();t$$(g)&&(d=g.getColor(),(d=e$1z.unpack(d)).alpha=1),t$$(y)&&(f=y.getColor(),f=e$1z.unpack(f),p=y.getWidth(),_=z$t.FILL_AND_OUTLINE);var v=this.labelParent;t$$(v)||(this.labelParent=v=new l$J,this.labelParent.show=!1,e.kmlLayer.entities.add(v)),b$y.near=15e3,b$y.nearValue=2,b$y.far=1e7,b$y.farValue=0,e.kmlLayer.entities.add({parent:v,position:E$t(e.imageryProvider,s,n,i),label:{text:h,font:$,verticalOrigin:j$10.TOP,horizontalOrigin:N$W.LEFT,fillColor:d,outlineColor:f,outlineWidth:p,style:_,pixelOffset:new r$T(0,2*-c),heightReference:U$Y.CLAMP_TO_GROUND,scaleByDistance:b$y}})}}},n$v.prototype.createBillboard=function(e,t){for(var i=this.rectangle,n=this.transform,r=(t.length,0),o=t.length;r<o;r++){var a,s=t[r],l=s.feature,u=s.style.layout;if(t$$(u)&&t$$(u["icon-image"])){var c=u["icon-image"],h=e$1Y(u["icon-size"],1);if(t$$(e._imageCanvas[c]))a=e._imageCanvas[c];else{var d=e.imageryProvider._subSpriteImage[c];if(!t$$(d))continue;(a=document.createElement("canvas")).width=d.width,a.height=d.height,a.getContext("2d").putImageData(d,0,0),e._imageCanvas[c]=a}var f=this.billboardParent;t$$(f)||(this.billboardParent=f=new l$J,e.kmlLayer.entities.add(f)),e.kmlLayer.entities.add({parent:f,position:E$t(e.imageryProvider,l,n,i),billboard:{image:a,scale:h,heightReference:U$Y.CLAMP_TO_GROUND,pixelOffset:new r$T(0,-a.height),scaleByDistance:new u$W(1500,1.5,8e6,0)}})}}},n$v.prototype.processStateMachine=function(e,t,i){this.state===Tt$4.UNLOADED&&!i&&!this.imageryLayer._pausing&&(this.state=Tt$4.TRANSITIONING,this.imageryLayer._requestImagery(this)),this.state===Tt$4.TRANSITIONING&&t$$(this.request)&&t$$(this.beginRequestTime)&&performance.now()-this.beginRequestTime>r$U.TIMEOUT&&this.request.cancel(),this.state===Tt$4.RECEIVED&&(this.state=Tt$4.TRANSITIONING,this.image,this.imageryLayer._createTexture(e.context,this,e));var n=this.state===Tt$4.READY&&t&&!this.texture;(this.state===Tt$4.TEXTURE_LOADED||n)&&(this.state=Tt$4.TRANSITIONING,this.imageryLayer._reprojectTexture(e,this,t))},n$v.prototype.isDestroyed=function(){return!1},n$v.prototype.showLabelAndIcon=function(e){},n$v.prototype.setVisible=function(e){},n$v.prototype.release=function(){};var _0x38f5f3=(_0x51d92f=!0,function(e,t){var i=_0x51d92f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x51d92f=!1,i}),_0x55b41d=_0x38f5f3(void 0,(function(){return _0x55b41d.toString().search("(((.+)+)+)+$").toString().constructor(_0x55b41d).search("(((.+)+)+)+$")})),_0x51d92f;function _0x430eae(){this.text={},this.icon={}}function _0x3425c4(e){this._provider=e,this._billboardsByLayers={},this._symbolInstancesInfoByLayers={}}_0x55b41d(),_0x430eae.prototype.init=function(e,t,i,n){for(var r={},o=0;o<t.length;o++){r[t[o].index]=t[o]}for(o=0;o<e.length;o++){var a=e.get(o),s=a.rightJustifiedTextSymbolIndex;const t=r[a.featureIndex];var l;l=n?a.key+" "+i:t.icon.name+" "+t.id+" "+i,s>=0&&(this.text[s]={key:l,feature:t}),(s=a.centerJustifiedTextSymbolIndex)>=0&&(this.text[s]={key:l,feature:t}),(s=a.leftJustifiedTextSymbolIndex)>=0&&(this.text[s]={key:l,feature:t}),(s=a.verticalPlacedTextSymbolIndex)>=0&&(this.text[s]={key:l,feature:t}),(s=a.placedIconSymbolIndex)>=0&&(this.icon[s]={key:l,feature:t}),(s=a.verticalPlacedIconSymbolIndex)>=0&&(this.icon[s]={key:l,feature:t})}};var _0x190de8=new a$11,_0x1b45ac=new e$1z,_0xca6f5b=new e$1z,_0x653834=new r$T,_0x2ad399=new r$T,_0x307260=new r$T,_0x54f674=new r$T,_0x3ace90=new r$T,_0x54d5d3=new r$T,_0x2c3f25=new r$T,_0x1af070=new r$T,_0x206461=new r$T,_0x44808d=new r$T;function _0x1102f1(e,t,i,n){var r=Math.floor(.5*n.x);return t||i?t&&!i?r/128:e.uSize:mix(r,n.y,e?e.uSizeT:0)/128}function _0x19d950(e,t,i,n){const r=e.layoutVertexArray.bytesPerElement/2,o=t+4*i+n;return{tileX:e.layoutVertexArray.int16[o*r],tileY:e.layoutVertexArray.int16[o*r+1],offsetX:e.layoutVertexArray.int16[o*r+2]/32,offsetY:e.layoutVertexArray.int16[o*r+3]/32,texCoordX:e.layoutVertexArray.uint16[o*r+4],texCoordY:e.layoutVertexArray.uint16[o*r+5],sizeX:e.layoutVertexArray.uint16[o*r+6],sizeY:e.layoutVertexArray.uint16[o*r+7],pixeloffsetX:e.layoutVertexArray.int16[o*r+8],pixeloffsetY:e.layoutVertexArray.int16[o*r+9]}}function _0x629229(e){var t=N$W.LEFT,i=j$10.CENTER;return"center"===e?(t=N$W.CENTER,i=j$10.CENTER):"left"===e?(t=N$W.LEFT,i=j$10.CENTER):"right"===e?(t=N$W.RIGHT,i=j$10.CENTER):"top"===e||"bottom"===e?(t=N$W.CENTER,i=j$10.TOP):"top-left"==e?(t=N$W.LEFT,i=j$10.TOP):"top-right"==e?(t=N$W.RIGHT,i=j$10.TOP):"bottom-left"==e?(t=N$W.LEFT,i=j$10.BOTTOM):"bottom-right"==e&&(t=N$W.RIGHT,i=j$10.BOTTOM),{horizontalOrigin:t,verticalOrigin:i}}function _0x3c9316(e,t,i){var n=i.rectangle;return{longtitude:e*n.width/_0x10e17e+n.west,lattitude:t*n.height/_0x10e17e+n.south}}_0x3425c4.prototype.drawLayerSymbols=function(e,t,i){var n=e.getBucket(t);if(!n)return;var r,o,a=i?n.text:n.icon;if(!a||!a.segments.get().length)return;r=this._billboardsByLayers[t.bucketName]?this._billboardsByLayers[t.bucketName]:this._billboardsByLayers[t.bucketName]={},this._symbolInstancesInfoByLayers[t.bucketName]?o=this._symbolInstancesInfoByLayers[t.bucketName]:(o=this._symbolInstancesInfoByLayers[t.bucketName]=new _0x430eae).init(n.symbolInstances,n.features,e.level,i),i?(this._textCollection=this._textCollection||this._provider._billboardCollectionPool.getOne(),this._textCollection.destroyTextureAtlas=!1,this._textCollection._sdf=!0,this._textCollection.textureAtlas=e.cesiumGlyphAtlas):(this._iconCollection=this._iconCollection||this._provider._billboardCollectionPool.getOne(),this._iconCollection.destroyTextureAtlas=!1,this._iconCollection._sdf=!1,this._iconCollection.textureAtlas=e.cesiumImageAtlas);var s=t.paint,l=t.layout,u=s.get("text-color").value.value;u=t$$(u)?u:s.get("text-color").value.evaluate(),_0x1b45ac.red=u.r,_0x1b45ac.green=u.g,_0x1b45ac.blue=u.b;var c=s.get("text-halo-color").value.value,h=s.get("text-halo-width").value.value;s.get("text-halo-blur").value.value,s.get("text-show-background").value.value;var d=i?s.get("text-translate"):s.get("icon-translate");_0xca6f5b.red=c.r,_0xca6f5b.green=c.g,_0xca6f5b.blue=c.b,_0xca6f5b.alpha=c.a,_0x629229(l.get("text-anchor").value.value);(i||n.sdfIcons)&&t.paint.get(i?"text-halo-width":"icon-halo-width").constantOr(1);var f,p,_=i?n.textSizeData:n.iconSizeData,m=_0x5ef064(_,e.level),$=_.kind,g="constant"===$||"source"===$,y="constant"===$||"camera"===$,v=void 0;i?(f=this._textCollection,p=e.cesiumGlyphAtlas,v=e.glyphAtlasTexture.size,n.iconsInText&&(e.imageAtlasTexture.size,e.imageAtlasTexture)):(f=this._iconCollection,p=e.cesiumImageAtlas,v=e.imageAtlasTexture.size);for(var x=a.placedSymbolArray.length,b=0;b<x;b++){var S,w=a.placedSymbolArray.get(b),C=i?o.text[b]:o.icon[b],T=C.feature,P=C.key,E=T.id;!r[P]&&(r[P]=[]),S=r[P];for(var A=w.numGlyphs,L=w.vertexStartIndex,M=0;M<A;M++){var I,O,D=_0x19d950(a,L,M,0);_0x307260.x=D.texCoordX/v[0],_0x307260.y=D.texCoordY/v[1],_0x2c3f25.x=D.offsetX,_0x2c3f25.y=D.offsetY,_0x44808d.x=D.sizeX,_0x44808d.y=D.sizeY,I=_0x3c9316(D.tileX,D.tileY,e),O=a$11.fromRadians(I.longtitude,I.lattitude,0);D=_0x19d950(a,L,M,1);_0x54f674.x=D.texCoordX/v[0],_0x54f674.y=D.texCoordY/v[1],_0x1af070.x=D.offsetX,_0x1af070.y=D.offsetY;D=_0x19d950(a,L,M,2);_0x653834.x=D.texCoordX/v[0],_0x653834.y=D.texCoordY/v[1],_0x3ace90.x=D.offsetX,_0x3ace90.y=D.offsetY;D=_0x19d950(a,L,M,3);_0x2ad399.x=D.texCoordX/v[0],_0x2ad399.y=D.texCoordY/v[1],_0x54d5d3.x=D.offsetX,_0x54d5d3.y=D.offsetY;var R=_0x54f674.y-_0x2ad399.y,N=_0x2ad399.x-_0x653834.x;p.addTextureCoordBounds(new n$13(_0x653834.x,_0x653834.y,N,R));var F=_0x1102f1(m,g,y,_0x44808d),B=i?F/24:F,z=_0x54d5d3.x-_0x3ace90.x,G=_0x3ace90.y-_0x2c3f25.y;z*=B,G*=B,_0x206461.x=_0x3ace90.x*B+.5*z+d[0],_0x206461.y=_0x3ace90.y*B-.5*G+d[1];var k=f.add({id:E,scale:1,position:O,heightReference:U$Y.NONE,eyeOffset:_0x190de8,width:z,height:G,pixelOffset:_0x206461,verticalOrigin:j$10.CENTER,horizontalOrigin:N$W.CENTER,isMVT:!0,color:i?e$1z.clone(_0x1b45ac):null,outlineColor:_0xca6f5b,outlineWidth:h,mvtLayerID:this._layerID,mapName:this._provider._owner._name,mvtProperties:T.properties,show:!0});k._imageIndex=p.numberOfImages-1,k._billboardsBySymbol=S,S.push(k)}}},_0x3425c4.prototype._setNeedReRender=function(e){if(e){for(var t in this._billboardsByLayers){var i=this._billboardsByLayers[t];for(var n in i)for(var r=i[n],o=0;o<r.length;o++){var a=r[o];a._billboardCollection.remove(a)}}this._billboardsByLayers={}}},_0x3425c4.prototype.release=function(){this._iconCollection&&!this._iconCollection.isDestroyed()&&(this._iconCollection.removeAll(),this._provider._billboardCollectionPool.pushBack(this._iconCollection)),this._textCollection&&!this._textCollection.isDestroyed()&&(this._textCollection.removeAll(),this._provider._billboardCollectionPool.pushBack(this._textCollection))};var _0x15fd98=(_0x1a090d=!0,function(e,t){var i=_0x1a090d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1a090d=!1,i}),_0x30a1f9=_0x15fd98(void 0,(function(){return _0x30a1f9.toString().search("(((.+)+)+)+$").toString().constructor(_0x30a1f9).search("(((.+)+)+)+$")})),_0x1a090d;function _0x2ba9a4(e){this._stringToNumber={},this._numberToString=[];for(var t=0;t<e.length;t++){var i=e[t];this._stringToNumber[i]=t,this._numberToString[t]=i}}_0x30a1f9(),_0x2ba9a4.prototype.encode=function(e){return this._stringToNumber[e]},_0x2ba9a4.prototype.decode=function(e){return this._numberToString[e]};var _0x32ef07=(_0x208b1f=!0,function(e,t){var i=_0x208b1f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x208b1f=!1,i}),_0x5db4f2=_0x32ef07(void 0,(function(){return _0x5db4f2.toString().search("(((.+)+)+)+$").toString().constructor(_0x5db4f2).search("(((.+)+)+)+$")})),_0x208b1f;function _0x379ecf(e,t,i,n,r){this.properties={},this.extent=i,this.type=0,this._pbf=e,this._geometry=-1,this._keys=n,this._values=r,e.readFields(_0x86f0f7,this,t)}function _0x86f0f7(e,t,i){1==e?t.id=i.readVarint():2==e?_0x42f48a(i,t):3==e?t.type=i.readVarint():4==e&&(t._geometry=i.pos)}function _0x42f48a(e,t){for(var i=e.readVarint()+e.pos;e.pos<i;){var n=t._keys[e.readVarint()],r=t._values[e.readVarint()];t.properties[n]=r}}function _0x1529a3(e){var t=e.length;if(t<=1)return[e];for(var i,n,r=[],o=0;o<t;o++){var a=_0x498f0c(e[o]);0!==a&&(void 0===n&&(n=a<0),n===a<0?(i&&r.push(i),i=[e[o]]):i.push(e[o]))}return i&&r.push(i),r}function _0x498f0c(e){for(var t,i,n=0,r=0,o=e.length,a=o-1;r<o;a=r++)t=e[r],n+=((i=e[a]).x-t.x)*(t.y+i.y);return n}_0x5db4f2(),_0x379ecf.types=["Unknown","Point","LineString","Polygon"],_0x379ecf.prototype.loadGeometry=function(){var e=this._pbf;e.pos=this._geometry;for(var t,i=e.readVarint()+e.pos,n=1,r=0,o=0,a=0,s=[];e.pos<i;){if(r<=0){var l=e.readVarint();n=7&l,r=l>>3}r--,1===n||2===n?(o+=e.readSVarint(),a+=e.readSVarint(),1===n&&(t&&s.push(t),t=[]),t.push(new _0x279c0d(o,a))):7===n?t&&t.push(t[0].clone()):console.log("VectorTileFeature loadGeometry unknown command "+n)}return t&&s.push(t),s},_0x379ecf.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,i=1,n=0,r=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;e.pos<t;){if(n<=0){var c=e.readVarint();i=7&c,n=c>>3}if(n--,1===i||2===i)(r+=e.readSVarint())<a&&(a=r),r>s&&(s=r),(o+=e.readSVarint())<l&&(l=o),o>u&&(u=o);else if(7!==i)throw new Error("unknown command "+i)}return[a,l,s,u]},_0x379ecf.prototype.toGeoJSON=function(e,t,i){var n,r,o=this.extent*Math.pow(2,i),a=this.extent*e,s=this.extent*t,l=this.loadGeometry(),u=_0x379ecf.types[this.type];function c(e){for(var t=0;t<e.length;t++){var i=e[t],n=180-360*(i.y+s)/o;e[t]=[360*(i.x+a)/o-180,360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90]}}switch(this.type){case 1:var h=[];for(n=0;n<l.length;n++)h[n]=l[n][0];c(l=h);break;case 2:for(n=0;n<l.length;n++)c(l[n]);break;case 3:for(l=_0x1529a3(l),n=0;n<l.length;n++)for(r=0;r<l[n].length;r++)c(l[n][r])}1===l.length?l=l[0]:u="Multi"+u;var d={type:"Feature",geometry:{type:u,coordinates:l},properties:this.properties};return"id"in this&&(d.id=this.id),d};var _0x1c4e07=(_0x3af294=!0,function(e,t){var i=_0x3af294?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3af294=!1,i}),_0x1becfb=_0x1c4e07(void 0,(function(){return _0x1becfb.toString().search("(((.+)+)+)+$").toString().constructor(_0x1becfb).search("(((.+)+)+)+$")})),_0x3af294;function _0x22bfef(e,t){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(_0x51fdf0,this,t),this.length=this._features.length}function _0x51fdf0(e,t,i){15===e?t.version=i.readVarint():1===e?t.name=i.readString():5===e?t.extent=i.readVarint():2===e?t._features.push(i.pos):3===e?t._keys.push(i.readString()):4===e&&t._values.push(_0x37e48e(i))}function _0x37e48e(e){for(var t=null,i=e.readVarint()+e.pos;e.pos<i;){var n=e.readVarint()>>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}_0x1becfb(),_0x22bfef.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new _0x379ecf(this._pbf,t,this.extent,this._keys,this._values)};var _0x23bab1=(_0x3103a7=!0,function(e,t){var i=_0x3103a7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3103a7=!1,i}),_0x33bf10=_0x23bab1(void 0,(function(){return _0x33bf10.toString().search("(((.+)+)+)+$").toString().constructor(_0x33bf10).search("(((.+)+)+)+$")})),_0x3103a7;function _0x463c47(e,t){this.layers=e.readFields(_0x3037d0,{},t)}function _0x3037d0(e,t,i){if(3===e){var n=new _0x22bfef(i,i.readVarint()+i.pos);n.length&&(t[n.name]=n)}}_0x33bf10();var _0x5b0248=(_0xc7b639=!0,function(e,t){var i=_0xc7b639?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xc7b639=!1,i}),_0x43d5ae=_0x5b0248(void 0,(function(){return _0x43d5ae.toString().search("(((.+)+)+)+$").toString().constructor(_0x43d5ae).search("(((.+)+)+)+$")})),_0xc7b639;_0x43d5ae();var _0x1103b1=3;function _0x2b3682(e,t,i){var n=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;var r=new Int32Array(this.arrayBuffer);e=r[0],t=r[1],i=r[2],this.d=t+2*i;for(var o=0;o<this.d*this.d;o++){var a=r[_0x1103b1+o],s=r[_0x1103b1+o+1];n.push(a===s?null:r.subarray(a,s))}var l=r[_0x1103b1+n.length],u=r[_0x1103b1+n.length+1];this.keys=r.subarray(l,u),this.bboxes=r.subarray(u),this.insert=this._insertReadonly}else{this.d=t+2*i;for(var c=0;c<this.d*this.d;c++)n.push([]);this.keys=[],this.bboxes=[]}this.n=t,this.extent=e,this.padding=i,this.scale=t/e,this.uid=0;var h=i/t*e;this.min=-h,this.max=e+h}_0x2b3682.prototype.insert=function(e,t,i,n,r){this._forEachCell(t,i,n,r,this._insertCell,this.uid++),this.keys.push(e),this.bboxes.push(t),this.bboxes.push(i),this.bboxes.push(n),this.bboxes.push(r)},_0x2b3682.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},_0x2b3682.prototype._insertCell=function(e,t,i,n,r,o){this.cells[r].push(o)},_0x2b3682.prototype.query=function(e,t,i,n,r){var o=this.min,a=this.max;if(e<=o&&t<=o&&a<=i&&a<=n&&!r)return Array.prototype.slice.call(this.keys);var s=[];return this._forEachCell(e,t,i,n,this._queryCell,s,{},r),s},_0x2b3682.prototype._queryCell=function(e,t,i,n,r,o,a,s){var l=this.cells[r];if(null!==l)for(var u=this.keys,c=this.bboxes,h=0;h<l.length;h++){var d=l[h];if(void 0===a[d]){var f=4*d;(s?s(c[f+0],c[f+1],c[f+2],c[f+3]):e<=c[f+2]&&t<=c[f+3]&&i>=c[f+0]&&n>=c[f+1])?(a[d]=!0,o.push(u[d])):a[d]=!1}}},_0x2b3682.prototype._forEachCell=function(e,t,i,n,r,o,a,s){for(var l=this._convertToCellCoord(e),u=this._convertToCellCoord(t),c=this._convertToCellCoord(i),h=this._convertToCellCoord(n),d=l;d<=c;d++)for(var f=u;f<=h;f++){var p=this.d*f+d;if((!s||s(this._convertFromCellCoord(d),this._convertFromCellCoord(f),this._convertFromCellCoord(d+1),this._convertFromCellCoord(f+1)))&&r.call(this,e,t,i,n,p,o,a,s))return}},_0x2b3682.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},_0x2b3682.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},_0x2b3682.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=_0x1103b1+this.cells.length+1+1,i=0,n=0;n<this.cells.length;n++)i+=this.cells[n].length;var r=new Int32Array(t+i+this.keys.length+this.bboxes.length);r[0]=this.extent,r[1]=this.n,r[2]=this.padding;for(var o=t,a=0;a<e.length;a++){var s=e[a];r[_0x1103b1+a]=o,r.set(s,o),o+=s.length}return r[_0x1103b1+e.length]=o,r.set(this.keys,o),o+=this.keys.length,r[_0x1103b1+e.length+1]=o,r.set(this.bboxes,o),o+=this.bboxes.length,r.buffer},_0x40d7a6.register("GridIndex",_0x2b3682,{omit:["layers","patternFeatures"]});var _0x2e1c48=(_0x48087b=!0,function(e,t){var i=_0x48087b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x48087b=!1,i}),_0x6547e7=_0x2e1c48(void 0,(function(){return _0x6547e7.toString().search("(((.+)+)+)+$").toString().constructor(_0x6547e7).search("(((.+)+)+)+$")})),_0x48087b;_0x6547e7();var _0x4bf85f=function(e,t,i){this.x=e.x,this.y=e.y,this.z=e.z,this.grid=t||new _0x2b3682(_0x10e17e,16,0),this.featureIndexArray=i||new _0x3378e1};function _0x12fb7a(e){for(var t=1/0,i=1/0,n=-1/0,r=-1/0,o=0,a=e;o<a.length;o+=1){var s=a[o];t=Math.min(t,s.x),i=Math.min(i,s.y),n=Math.max(n,s.x),r=Math.max(r,s.y)}return{minX:t,minY:i,maxX:n,maxY:r}}function _0x4c915c(e,t){return t-e}function _0x2e7889(e,t,i){if(t$$(i)&&i.realtime&&t$$(i.zoom)){var n=i.zoom-e,r=_0x10e17e/(t*Math.pow(2,n));return r*=t/512}return _0x10e17e/t}function t$l(e){this.context=e,this.framebuffer=void 0,this.blendingEnabled=void 0,this.scissorTest=void 0,this.viewport=void 0}_0x4bf85f.prototype.insert=function(e,t,i,n,r,o,a){var s=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(i,n,r);var l=this.grid;a=a||0;for(var u=0;u<t.length;u++){for(var c=t[u],h=[1/0,1/0,-1/0,-1/0],d=0;d<c.length;d++){var f=c[d];h[0]=Math.min(h[0],f.x),h[1]=Math.min(h[1],f.y),h[2]=Math.max(h[2],f.x),h[3]=Math.max(h[3],f.y)}h[0]<_0x10e17e&&h[1]<_0x10e17e&&h[2]>=0&&h[3]>=0&&l.insert(s,h[0]-a,h[1]-a,h[2]+a,h[3]+a)}},_0x4bf85f.prototype.loadVTLayers=function(){return!this.vtLayers&&(this.vtLayers=new _0x463c47(new h$12(this.rawTileData)).layers,this.sourceLayerCoder=new _0x2ba9a4(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},_0x4bf85f.prototype.query=function(e,t,i){var n=this;this.loadVTLayers();var r=e.params||{},o=_0x2e7889(this.z,e.tileSize,r),a=_0xc53fd1.createFilter(r.filter),s=e.queryGeometry,l=5,u=_0x12fb7a(s),c=[];t$$(r.selectTolerance)&&(l+=o*r.selectTolerance),(c=this.grid.query(u.minX-l,u.minY-l,u.maxX+l,u.maxY+l)).sort(_0x4c915c);for(var h,d={},f=function(i){var l=c[i];if(l!==h){h=l;var u=n.featureIndexArray.get(l),f=null;n.loadMatchingFeature(d,u.bucketIndex,u.sourceLayerIndex,u.featureIndex,a,r.layers,t,(function(t,i){!f&&(f=_0x43a884(t));return i.queryIntersectsFeature(s,t,{},f,n.z,e.transform,o,e.pixelPosMatrix,e.adjustScale)}))}},p=0;p<c.length;p++)f(p);return d},_0x4bf85f.prototype.loadMatchingFeature=function(e,t,i,n,r,o,a,s){if(t$$(t)&&t$$(i)&&t$$(n)){var l=this.bucketLayerIDs[t];if(!o||arraysIntersect(o,l)){var u=this.sourceLayerCoder.decode(i),c=this.vtLayers[u].feature(n);if(r(new _0x460d5e(this.z),c))for(var h=0;h<l.length;h++){var d=l[h];if(!(o&&o.indexOf(d)<0)){var f=a[d];if(f){var p=!s||s(c,f);if(p){c.layer=f.serialize();var _=e[d];void 0===_&&(_=e[d]=[]),_.push({featureIndex:n,feature:c,intersectionZ:p})}}}}}}},_0x4bf85f.prototype.lookupSymbolFeatures=function(e,t,i,n,r,o){var a={};this.loadVTLayers();for(var s=createFilter(n),l=0,u=e;l<u.length;l+=1){var c=u[l];this.loadMatchingFeature(a,t,i,c,s,r,o)}return a},_0x4bf85f.prototype.hasLayer=function(e){for(var t=0,i=this.bucketLayerIDs;t<i.length;t+=1)for(var n=0,r=i[t];n<r.length;n+=1){if(e===r[n])return!0}return!1},_0x40d7a6.register("FeatureIndex",_0x4bf85f,{omit:["rawTileData","sourceLayerCoder","vtLayers"]});var _0x270cfb=!1,_0x1aa457=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i,n,r,o){this.isMVT=!0,this.mvtProvider=t.imageryProvider,this.tileSize=this.mvtProvider._canvasWidth,this._painter=this.mvtProvider._painter,this._MVTStyle=this.mvtProvider._MVTStyle,this.dispatcher=this._MVTStyle.dispatcher,this._MVTLabel=new _0x3425c4(this.mvtProvider),this.highLighting=!1,this._visible=!1,this.working=!1,this.repaintWorking=!1,this.layersToUpdate=[],this.removedIds=[],this.imageryNeedToRender={},e.call(this,t,i,n,r,o),this._isToReRender=!1,this.frameState=null,this.realtime=this.mvtProvider.realtime,this.zoomLevel=-1,this.lastCameraZoomLevel=-1,this._passState=new t$l,this._passState.viewport=new n$13,this.hasRawData=!1,this.uid=uniqueId()}function o(e){var t=e.mvtProvider._maxImageCacheLevel-e.level,i=0,n=!1,r=e.imageryLayer._detailLevelOffset;if(t<r&&(n=!0,i=r-t),!e.hasRawData||n){var o=function(e,t){var i=e.parent,n=1,r=e.hasRawData;t>0&&(r=!1);var o=null;for(;!r&&t$$(i);)n>=t&&((r=i.hasRawData)&&(o=i)),i=i.parent,n++;return o}(e,i);return!t$$(o)&&e.hasRawData?e:o}return e}function a(e){return{param:{featureIndex:e.featureIndex,tileID:{x:e.requestX,y:e.requestY,z:e.requestZ},indexData:e.indexData,pickId:e.pickId,webgpu:_0x270cfb,type:"vector",source:e.mvtProvider.name,uid:e.uid,request:e.mvtProvider._requestManager.transformRequest(e.requestUrl,_0x466424.Tile)},transferableObjects:[]}}function s(e,t,i){e.setBuckets(t.buckets),e.imageAtlas=t.imageAtlas,e.featureIndex=t.featureIndex,e.featureIndex.rawTileData=t.rawTileData,e.glyphAtlasImage=t.glyphAtlasImage,i?e.repaintWorking=!1:e.working=!1}function l(e,t){var i=m(e.rectangle,t.rectangle),n=e.level,r=1;if(t.realtime){var o=t.frameState.camera;t$$(o.zoomLevel)&&o.zoomLevel!=1/0&&(n=o.zoomLevel,t.zoomLevel=n)}else r=Math.pow(2,t.level-e.level);e.targetTileSize=e.tileSize*r,u(e,t,i,n),t.state!=Tt$4.READY&&(t.state=Tt$4.RENDERED),c(t)}function u(e,t,i,n){var r=e._painter;for(var o in e.buckets){var a=e.buckets[o];if(a instanceof _0x20cbaf)if(!("point"!==e._MVTStyle._layers[o].layout.get("symbol-placement")))continue;a.upload(r.cesiumContext)}t$$(e.imageAtlas)&&!t$$(e.imageAtlasTexture)&&(e.imageAtlasTexture=new _0x463a8e(r.context,r.cesiumContext,e.imageAtlas.image,Z$_.RGBA),e.cesiumImageAtlas=new _$z({pixelFormat:Z$_.RGBA,context:r.cesiumContext}),e.cesiumImageAtlas._texture=e.imageAtlasTexture.cesiumTexture),e.glyphAtlasImage&&(e.glyphAtlasTexture=new _0x463a8e(r.context,r.cesiumContext,e.glyphAtlasImage,r.cesiumContext.webgpu?Z$_.RED:Z$_.ALPHA),e.glyphAtlasImage=null,e.cesiumGlyphAtlas=new _$z({pixelFormat:Z$_.ALPHA,context:r.cesiumContext}),e.cesiumGlyphAtlas._texture=e.glyphAtlasTexture.cesiumTexture),e.viewProjection=i;var s=t$$(e.context)?e.context:t.context,l=t.level,u=t.texture||t.textureWebMercator;t._passState.context=s,t._passState.viewport.x=0,t._passState.viewport.y=0,t._passState.viewport.width=u.width,t._passState.viewport.height=u.height;var c=u.width+"_"+u.height;!t$$(e.mvtProvider._renderTextureList[c])&&(e.mvtProvider._renderTextureList[c]=new P$S({context:s,width:u.width,height:u.height,pixelFormat:Z$_.DEPTH_STENCIL,pixelDatatype:v$Z.UNSIGNED_INT_24_8}));var h=e.mvtProvider._renderTextureList[c];!t._framebuffer&&(t._framebuffer=new u$F({context:s,colorTextures:[u],depthStencilTexture:h})),t._passState.framebuffer=t._framebuffer;try{r.renderOneTile(e._MVTStyle,e,{targetTileLevel:l,finestRenderLevel:e.mvtProvider.maximumLevel,zoom:n,lineAntialiasing:e.mvtProvider.lineAntialiasing?1:0,passState:t._passState})}catch(e){console.log(e)}s.webgpu&&s.engine.flushFramebuffer()}function c(e){e.highLighting=!1,e.imageryLayer._finalizeReprojectTexture(e.context,e.texture||e.textureWebMercator)}n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.processStateMachine=function(e,t,i){this.frameState=e,this.context=e.context,_0x270cfb=e.context.webgpu,this.state===Tt$4.UNLOADED&&!i&&!this.imageryLayer._pausing&&(this.state=Tt$4.TRANSITIONING,this.imageryLayer._requestImagery(this)),this.state===Tt$4.RECEIVED&&(this.state=Tt$4.TRANSITIONING,this.indexData=this.image.indexData,this.image,this.imageryLayer._createTexture(e.context,this,e)),this.state===Tt$4.TEXTURE_LOADED&&function(e){var t=o(e);if(!t$$(t))return e.highLighting=!1,void console.log("MVTImagery has no rawData.");var i=$(e.x,e.y,e.level);if(t.imageryNeedToRender[i]=e,t$$(t.buckets)&&!t.repaintWorking&&!t._isToReRender)return void l(t,e);if(!t.working){if(t.repaintWorking||t._isToReRender)return;var n=a(t);function r(e,i){delete t.request,e?(console.log("loadTile tile error in worker"),t.state=Tt$4.FAILED):s(t,i,!1)}t.working=!0,!t.actor&&(t.actor=t.dispatcher.getActor()),t.request=t.actor.send("loadTile",n.param,r.bind(this))}}(this);var n=this.state===Tt$4.READY&&t&&!this.texture;(this.state===Tt$4.RENDERED||n)&&(this.state=Tt$4.TRANSITIONING,this.imageryLayer._reprojectTexture(e,this,t))},r.prototype.addRepaintTask=function(e,t,i){var n={};this.layersToUpdate.map((function(e){n[e.id]=!0}));var r=this;e.map((function(e){!t$$(n[e.id])&&r.layersToUpdate.push(e)})),this.removedIds=t,this.highLighting=i},r.prototype.clearRepaintTask=function(){this.layersToUpdate=[],this.removedIds=[]},r.prototype.update=function(){this.repaint()},r.prototype.setBuckets=function(e){var t=this.buckets;if(t$$(t))for(var i in e){if(t$$(t[i]))t[i].destroy(),t[i]=e[i];else t[i]=e[i]}else this.buckets=e},r.prototype.repaint=function(){this.state===Tt$4.READY&&(this._isToReRender&&function(e){var t=o(e);if(!t$$(t))return;var i=$(e.x,e.y,e.level);if(e._isToReRender&&!e.working&&(l(t,e),e._setNeedReRender(!1),t$$(t.imageryNeedToRender[i])&&delete t.imageryNeedToRender[i],0==Object.getOwnPropertyNames(t.imageryNeedToRender).length&&t$$(t.buckets)))for(var n in t.buckets){t.buckets[n].clear()}}(this),(this.layersToUpdate.length>0||this.removedIds.length>0)&&function(e){var t=o(e);if(!t$$(t))return e.clearRepaintTask(),void(e.highLighting=!1);var i=$(e.x,e.y,e.level),n=e.layersToUpdate;if(t.imageryNeedToRender[i]=e,t.repaintWorking){if(!t.IsPickIdSameWithCurrentPickID())return;e.clearRepaintTask()}else{if(t.working)return;n.length>0&&n[0].id.indexOf("_highlight")>-1?t.pickId=n[0].id+n[0].filter[2]:t.pickId=void 0;var r=a(t);e.clearRepaintTask(),t.repaintWorking=!0,!t.actor&&(t.actor=t.dispatcher.getActor());var l=t.featureIndex.rawTileData;function u(i,n){if(delete t.request,i)console.log("reloadTile tile error in worker");else{if(s(t,n,!0),e.featureIndex.rawTileData=l,!t.IsPickIdSameWithCurrentPickID())return;if(!t.isDestroyed())for(var r in t.imageryNeedToRender)t.imageryNeedToRender[r]._setNeedReRender(!0)}}t.request=t.actor.send("reloadTile",r.param,u.bind(this))}}(this))},r.prototype._setNeedReRender=function(e){this._isToReRender=e,this._MVTLabel._setNeedReRender(e)},r.prototype.realtimeRender=function(){if(this.state===Tt$4.READY&&this.realtime&&function(e){var t=e.frameState.camera;if(!t$$(t.zoomLevel)||t.zoomLevel==1/0)return!1;var i=!1;e.lastCameraZoomLevel!=t.zoomLevel&&(i=!0),e.lastCameraZoomLevel=t.zoomLevel;var n=Math.abs(e.zoomLevel-t.zoomLevel);return!(n<.2&&i)&&0!=n}(this)){var e=o(this);t$$(e)&&t$$(e.buckets)&&!this.working&&function(e,t){var i=t.frameState.camera,n=void 0;if(!t$$(i.zoomLevel))return;n=i.zoomLevel;var r=m(e.rectangle,t.rectangle);e.mvtProvider._context,e.targetTileSize=e.tileSize,u(e,t,r,n),c(t),t.zoomLevel=n}(e,this)}},r.prototype.IsPickIdSameWithCurrentPickID=function(){return!t$$(this.mvtProvider._currentPickID)||!t$$(this.pickId)||this.mvtProvider._currentPickID===this.pickId},r.prototype.setVisible=function(e){this._visible=e},r.prototype.getBucket=function(e){return t$$(e.bucketName)?this.buckets[e.bucketName]:this.buckets[e.id]};var h=new c$1a,d=new c$1a,f=new a$11(0,0,-1),p=new a$11(0,1,0),_=new a$11;function m(e,t){var i=t.width/e.width;t.height,e.height;var n=_0x10e17e*i,r=.5*-n,o=.5*n,a=.5*-n,s=.5*n;h=c$1a.computeOrthographicOffCenter(r,o,a,s,-1,400,h);var l=new a$11(.5*((t.west-e.west)/e.width*_0x10e17e+(t.east-e.west)/e.width*_0x10e17e),.5*((t.north-e.south)/e.height*_0x10e17e+(t.south-e.south)/e.height*_0x10e17e),200);d=c$1a.computeView(l,f,p,_,d);var u=new c$1a;return c$1a.multiply(h,d,u),u}function $(e,t,i){return JSON.stringify([e,t,i])}return _=a$11.cross(f,p,_),r.prototype.queryRenderedFeatures=function(e,t,i){if(!t$$(this.featureIndex)||!t$$(this.featureIndex.rawTileData))return null;var n=this.featureIndex.query({queryGeometry:t,tileSize:this.tileSize,params:i},e,null),r=!1;for(var o in n)if(e[o]instanceof _0x4b7722&&n[o].length>1){r=!0;break}return r&&(n=this.featureIndex.query({queryGeometry:t,tileSize:this.tileSize,params:i,adjustScale:.1},e,null)),n},r.prototype.querySourceFeatures=function(e,t){if(t$$(this.featureIndex)&&t$$(this.featureIndex.rawTileData)){var i=this.featureIndex.loadVTLayers(),n=e?e.sourceLayer:"";""!==n&&(n=n.replace(/(.*)(#\d.*)/,"$1"),e.sourceLayer=n);var r=i[n];if(r)for(var o=_0xc53fd1.createFilter(e&&e.filter),a=0;a<r.length;a++){var s=r.feature(a);o(new _0x460d5e(0),s)&&t.push(s)}}},r.prototype.isTileIDLessThan=function(e){return this.level<e.level||!(this.level>e.level)&&(this.x<e.x||!(this.x>e.x)&&this.y<e.y)},r.prototype.release=function(){if(this.request&&(this.request.cancel(),delete this.request),this.actor&&(this.actor.send("abortTile",{type:"vector",source:this.mvtProvider.name,uid:this.uid},void 0),this.actor.send("removeTile",{type:"vector",source:this.mvtProvider.name,uid:this.uid},void 0)),t$$(this.buckets)){for(var e in this.buckets){this.buckets[e].destroy()}this.buckets=null}t$$(this.imageAtlasTexture)&&(this.imageAtlasTexture.destroy(),this.imageAtlasTexture=null),t$$(this.glyphAtlasTexture)&&(this.glyphAtlasTexture.destroy(),this.glyphAtlasTexture=null),this._MVTLabel.release()},r}(n$v),_0x15a820=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x5812ee=_0x15a820(void 0,(function(){return _0x5812ee.toString().search("(((.+)+)+)+$").toString().constructor(_0x5812ee).search("(((.+)+)+)+$")}));function _0xb658ed(){}_0x5812ee();var _0x43c44a=20;function _0xdebe36(e,t){return e.priority-t.priority}o$$.supportsWebAssembly();var _0x33651f=new o$14({comparator:_0xdebe36});function _0x1b8f5d(e){t$$(e.priorityFunction)&&(e.priority=e.priorityFunction())}_0x33651f.maximumLength=_0x43c44a,_0x33651f.reserve(_0x43c44a);var _0x56b5d4={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5};function _0x194664(e){return e.state===_0x56b5d4.UNISSUED&&(e.state=_0x56b5d4.ISSUED,e.deferred=c$18.defer()),e.deferred.promise}function _0x3a3e58(e){var t=_0xb658ed.taskProcessorMap[e.processorName];if(!_0xb658ed.taskProcessorReady)return!1;var i=t.scheduleTask(e.data);return!!t$$(i)&&(e.state=_0x56b5d4.ACTIVE,i.then((function(t){e.state!==_0x56b5d4.CANCELLED&&(e.state=_0x56b5d4.RECEIVED,e.deferred.resolve(t))})).otherwise((function(t){e.state!==_0x56b5d4.CANCELLED&&(e.state=_0x56b5d4.FAILED,e.deferred.reject(t))})),!0)}_0xb658ed.cancelTask=function(e){e.state=_0x56b5d4.CANCELLED,t$$(e.deferred)&&e.deferred.reject()},_0xb658ed.startTask=function(e){_0x1b8f5d(e);var t=_0x33651f.insert(e);if(t$$(t)){if(t===e)return;_0xb658ed.cancelTask(t)}return _0x194664(e)},_0xb658ed.processTasks=function(){for(var e=_0x33651f.internalArray,t=_0x33651f.length,i=0;i<t;++i)_0x1b8f5d(e[i]);_0x33651f.resort();for(var n;_0x33651f.length>0;)if((n=_0x33651f.pop()).state!==_0x56b5d4.CANCELLED&&!_0x3a3e58(n))return void _0x33651f.insert(n)},_0xb658ed.initWebAssembly=function(){_0xb658ed.init=!0,_0xb658ed.S3MBTaskProcessor.initWebAssemblyModule({modulePath:"ThirdParty/Workers/draco_wasm_wrapper_new.js",wasmBinaryFile:"ThirdParty/draco_decoder_new.wasm",fallbackModulePath:"ThirdParty/Workers/draco_decoder.js"}).then((function(e){_0xb658ed.taskProcessorReady=e})),!1!==o$$.supportsWebAssembly()?(_0xb658ed.S3MBTaskProcessor.initWebAssemblyModule({modulePath:"ThirdParty/crunch.js",wasmBinaryFile:"ThirdParty/crunch.wasm"}).then((function(e){_0xb658ed.taskProcessorReady=e})),_0xb658ed.CRNProcessor.initWebAssemblyModule({modulePath:"ThirdParty/crunch.js",wasmBinaryFile:"ThirdParty/crunch.wasm"}).then((function(){setTimeout((()=>{_0xb658ed.CRNTaskProcessorReady=!0}),1e3)})),_0xb658ed.unzipDataTaskProcessor.initWebAssemblyModule({modulePath:"ThirdParty/crunch.js",wasmBinaryFile:"ThirdParty/crunch.wasm"}).then((function(){_0xb658ed.CRNTaskProcessorReady=!0}))):_0xb658ed.CRNTaskProcessorReady=!0},_0xb658ed.S3MTaskProcessor=new o$_("S3MTilesParser"),_0xb658ed.S3MBTaskProcessor=new o$_("S3MBTilesParser"),_0xb658ed.indexTaskProcessor=new o$_("indexedDBWorker"),_0xb658ed.CRNProcessor=new o$_("transcodeCRNToDXT",Number.POSITIVE_INFINITY),_0xb658ed.unzipDataTaskProcessor=new o$_("UnZipData"),_0xb658ed.taskProcessorReady=!1,_0xb658ed.CRNTaskProcessorReady=!1,_0xb658ed.init=!1,_0xb658ed.taskProcessorMap={UnZipData:_0xb658ed.unzipDataTaskProcessor,S3MBTilesParser:_0xb658ed.S3MBTaskProcessor};var _0x4b5743=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x597ce9=_0x4b5743(void 0,(function(){return _0x597ce9.toString().search("(((.+)+)+)+$").toString().constructor(_0x597ce9).search("(((.+)+)+)+$")}));function _0x56ff2(){this._fileName=void 0,this._relativePath=void 0,this._orientedBoundingBox=void 0,this._boundingSphere=void 0,this._childrenPageLod=[],this._pagelodMap={},this._isLeafTile=!1,this._isRootTile=!1,this._hasLeafChild=!1,this._isEmptyTree=!0,this._s3mLoadState=W$q.UNLOAD,this._attrLoadState=W$q.UNLOAD,this._leafAttrLoadState=W$q.UNLOAD,this._attrAppend=[],this._isParsed=!1,this._configLoadState=W$q.UNLOAD,this._avgPix=0,this._disFromCamera=0,this._nLODLev=0,this._ready=!1,this._configReady=!1,this._isVisible=!0,this._owner=void 0,this.s3mBuffer=null,this.volBuffer=null,this.volImage=null,this._texturesByteLength=0,this._replacementNode=null,this._volObj=null,this._volTexture=null,this._volTextures={},this.skeletonState=void 0,this.skeletonPackages=void 0,this.instancePackage=void 0,this._reloadVol=!1,this._oriBoundingSphere=null,this._isAncestorBlock=!1,this._isChildBlock=!1,this._blockKey=void 0,this._priority=1e3,this._rootBatchIdMap={},this._ancestorMap={},this._shouldSelect=!1,this._stackLength=0,this._needRefine=!0,this._selected=!1,this._readyAncestor=void 0,this._parent=void 0,this._depth=1,this._needRequest=!0,this._parentPagelod=void 0,this._leafChildren=[],this._centerZDepth=0,this._foveatedFactor=0,this._priority=0,this._hasConfig=!1,this._needLoad=!1,this._skipLevel=0,this._subdomainIndex=0,this._prepareLoad=!1,this._tmpMaterialArr=[],this.hasTranslate=!1,this.isFlatten=!1}function _0x3af8c2(e,t,i){return Math.max(n$1d.normalize(e,t,i)-n$1d.EPSILON7,0)}function _0x4a849e(e,t,i){var n=e*Math.pow(10,t);return parseInt(n)*Math.pow(10,i)}_0x597ce9(),_0x56ff2.prototype.updatePriority=function(e){var t=e._minimumPriority,i=e._maximumPriority,n=4,r=_0x4a849e(_0x3af8c2(this._foveatedFactor,t.foveatedFactor,i.foveatedFactor),4,n);n=8;var o=_0x4a849e(1-_0x3af8c2(this._avgPix,t.pixel,i.pixel),4,n);n=0;var a=_0x4a849e(_0x3af8c2(this._disFromCamera,t.distance,i.distance),4,n);this._priority=r+o+a},_0x56ff2.prototype.memoryUsage=function(){for(var e=this._texturesByteLength,t=0;t<this._childrenPageLod.length;t++)for(var i=0;i<this._childrenPageLod[t]._renderEntityList.length;i++)e+=this._childrenPageLod[t]._renderEntityList[i]._geometryByteLength,t$$(this._childrenPageLod[t]._entity)&&this._childrenPageLod[t]._entity._isChildBlock&&(e+=this._childrenPageLod[t]._entity.memoryUsage());return e},_0x56ff2.prototype.memoryUsageEx=function(e){e.texSize+=this._texturesByteLength;for(var t=0;t<this._childrenPageLod.length;t++)for(var i=0;i<this._childrenPageLod[t]._renderEntityList.length;i++)e.geoSize+=this._childrenPageLod[t]._renderEntityList[i]._geometryByteLength,t$$(this._childrenPageLod[t]._entity)&&this._childrenPageLod[t]._entity._isChildBlock&&this._childrenPageLod[t]._entity.memoryUsageEx(e);return e.geoSize+e.texSize},Object.defineProperties(_0x56ff2.prototype,{attrLoadState:{get:function(){return this._attrLoadState},set:function(e){this._attrLoadState=e}},leafAttrLoadState:{get:function(){return this._leafAttrLoadState},set:function(e){this._leafAttrLoadState=e}}}),_0x56ff2.prototype.setEmptyTreeFlag=function(e){for(var t=[this];t.length;){var i=t.pop();i._isEmptyTree=e;for(var n=0,r=i._childrenPageLod.length;n<r;n++){var o=i._childrenPageLod[n];t$$(o._entity)&&o._entity._isEmptyTree&&t.push(o._entity)}}},_0x56ff2.prototype.traverse=function(e){for(var t=0,i=this._childrenPageLod.length;t<i;t++){var n=this._childrenPageLod[t];e(n),n._entity&&(n._entity._s3mLoadState===W$q.LOADING||n._entity._s3mLoadState===W$q.LOADVOL?n._entity._s3mLoadState=W$q.LOST:n._entity.traverse(e))}},_0x56ff2.prototype.transformResource=function(e,t,i){var n=e.context,r=!0;let o=!1;for(var a=0,s=this._childrenPageLod.length;a<s;a++){for(var l=!0,u=0,c=(d=this._childrenPageLod[a])._renderEntityList.length;u<c;u++){var h=d._renderEntityList[u];if(n.memorySize>i)return o=!0,o;if(!h.renderable){r=!1,l=!1;try{h.transformResource(e,t)}catch(e){console.log(e)}}}d._ready=l}for(a=0,s=this._leafChildren.length;a<s;a++){var d;for(l=!0,u=0,c=(d=this._leafChildren[a])._renderEntityList.length;u<c;u++){h=d._renderEntityList[u];if(n.memorySize>i)return o=!0,o;if(!h.renderable){r=!1,l=!1;try{h.transformResource(e,t)}catch(e){console.log(e)}}}d._ready=l}return r&&(this._ready=!0,this._s3mLoadState=W$q.TRANSFORMED),o},_0x56ff2.prototype.freeResource=function(e){for(var t=0,i=this._childrenPageLod.length;t<i;t++){this._childrenPageLod[t].freeResource(e)}for(t=0,i=this._leafChildren.length;t<i;t++){this._leafChildren[t].freeResource(e)}this._leafChildren.length=0,this._ready=!1,this._s3mLoadState=W$q.UNLOAD,this._replacementNode=void 0},_0x56ff2.prototype.isDestroyed=function(){return!1},_0x56ff2.prototype.destroy=function(e,t){for(var i=0,n=this._childrenPageLod.length;i<n;i++)this._childrenPageLod[i]=this._childrenPageLod[i]&&!this._childrenPageLod[i].isDestroyed()&&this._childrenPageLod[i].destroy(e,t);for(var r in this._childrenPageLod.length=0,this._ready=!1,this._s3mLoadState=W$q.UNLOAD,this._avgPix=0,this._disFromCamera=0,this.s3mBuffer=null,this.volBuffer=null,this.volImage=null,this._replacementNode=null,this.skeletonState=void 0,this.skeletonPackage=void 0,this.instancePackage=void 0,t$$(this._volObj)&&De$e.DestroyTexture(this._volObj.id),this._volObj=null,t$$(this._volTexture)&&this._volTexture.destroy(),this._volTexture=null,this._volTextures)if(this._volTextures.hasOwnProperty(r)){var o=this._volTextures[r];t$$(o)&&o.destroy()}this._volTextures={},this.request=void 0,t$$(this.task)&&_0xb658ed.cancelTask(this.task),this.task=void 0;for(i=0,n=this._tmpMaterialArr.length;i<n;i++){var a=this._tmpMaterialArr[i];a.isDestroyed()||a.destroy()}},_0x56ff2.prototype.isImageryLoaded=function(e){if(!t$$(e._imageryLayer))return!0;for(var t=!0,i=this._childrenPageLod.length,n=0;n<i;n++)for(var r=this._childrenPageLod[n]._renderEntityList,o=r.length,a=0;a<o;a++){var s=r[a]._imagerys;if(t$$(s))for(var l=s.length,u=0;u<l;u++)s[u]instanceof _0x1aa457?s[u].state===Tt$4.RENDERED||s[u].state===Tt$4.READY||s[u].state===Tt$4.FAILED||(t=!1):s[u].state<Tt$4.TEXTURE_LOADED&&(t=!1)}return t},_0x56ff2.prototype.extendRadius=function(e){e*=1.5,t$$(this._oriBoundingSphere)||(this._oriBoundingSphere=this._boundingSphere.clone()),this._boundingSphere.radius=this._oriBoundingSphere.radius+e;for(var t=0,i=this._childrenPageLod.length;t<i;t++){var n=this._childrenPageLod[t];n._boundingSphere.radius=this._oriBoundingSphere.radius+e;for(var r=0;r<n._renderEntityList.length;r++){var o=n._renderEntityList[r];o._boundingVolume.radius=this._oriBoundingSphere.radius+e,t$$(o._colorCommand)&&(o._colorCommand._boundingVolume.radius=this._oriBoundingSphere.radius+e)}}},_0x56ff2.prototype.loadImagery=function(e,t){if(t$$(e._imageryLayer))for(var i=this._childrenPageLod.length,n=0;n<i;n++)for(var r=this._childrenPageLod[n]._renderEntityList,o=r.length,a=0;a<o;a++){var s=r[a]._imagerys;if(t$$(s))for(var l=s.length,u=0;u<l;u++)s[u].processStateMachine(t,!1)}};var _0x4257e0=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x52002a=_0x4257e0(void 0,(function(){return _0x52002a.toString().search("(((.+)+)+)+$").toString().constructor(_0x52002a).search("(((.+)+)+)+$")}));_0x52002a();var _0x7a17d5={DISTANCE_FROM_EYE_POINT:0,PIXEL_SIZE_ON_SCREEN:1,GEOMETRY_ERROR:2},_0x2b4bc7=Object.freeze(_0x7a17d5),_0x1a5350=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xeb8fda=_0x1a5350(void 0,(function(){return _0xeb8fda.toString().search("(((.+)+)+)+$").toString().constructor(_0xeb8fda).search("(((.+)+)+)+$")}));_0xeb8fda();var _0x2c6cd9={Root_Priority:0,Child_Priority:1,UsePagedLodInfo:2,Child_Priority_NonLinear:3},_0x271348=Object.freeze(_0x2c6cd9),_0x1c0f9d=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x5e30e3=_0x1c0f9d(void 0,(function(){return _0x5e30e3.toString().search("(((.+)+)+)+$").toString().constructor(_0x5e30e3).search("(((.+)+)+)+$")}));function _0x10562c(){this._orientedBoundingBox=void 0,this._boundingSphere=void 0,this._rangeList=0,this._rangeDataList=void 0,this._isLeafNode=!1,this._isLessLodDis=!0,this._entity=null,this._renderEntityList=[],this._ready=!1,this._pix=0,this._rangeMode=_0x2b4bc7.DISTANCE_FROM_EYE_POINT,this._processFileType=0,this._renderEntityVisible={},this._fileType=c$q.OSGBFile,this._shouldSelect=!1,this._selectionDepth=0,this._stackLength=0,this._finalResolution=!0,this._isVisible=!0,this._centerZDepth=0,this._needRefine=!0}function _0x4b53eb(e,t,i,n){var r=i._boundingSphere,o=r.radius,a=r.center,s=t.drawingBufferHeight,l=t$$(i._orientedBoundingBox)?Math.sqrt(i._orientedBoundingBox.distanceSquaredTo(e.positionWC)):Math.max(a$11.distance(e.positionWC,a)-o,1e-5),u=i._rangeList*s/(l*e.frustum.sseDenominator);if(t$$(n)&&(n===_0x271348.Child_Priority_NonLinear||n===_0x271348.UsePagedLodInfo)){var c=i._fileType===c$q.OSGBFile?800:300,h=Math.max(o,c);if(t$$(i._orientedBoundingBox)&&(a=i._orientedBoundingBox.center),(l=a$11.distance(e.positionWC,a))>h){var d=2*h/l;d<1&&(u*=d)}}return u}function _0x330e65(e,t,i,n,r){var o=0,a=i._boundingSphere,s=a.radius,l=a.center,u=a$11.distance(e.positionWC,l);if(u=Math.max(1e-5,u),e._mode===b$1d.SCENE2D&&(u=e.positionCartographic.height),o=t.drawingBufferHeight/(2*Math.tan(.5*n$1d.PI_OVER_FOUR))*s/u,t$$(n)&&(n==_0x271348.Child_Priority_NonLinear||n===_0x271348.UsePagedLodInfo)){var c=Math.max(a.radius,r);u>c&&(o*=c/u)}return Math.ceil(o)}_0x5e30e3(),_0x10562c.prototype.calcPixFromCam=function(e,t,i,n,r){if(this._boundingSphere){var o=e.positionWC,a=a$11.clone(this._boundingSphere.center),s=a$11.distance(a,o);e._mode==b$1d.SCENE2D&&(s=e.positionCartographic.height),this._disFromCamera=s-this._boundingSphere.radius;var l=0;if(i/=oo$1.getQuality(),this._rangeMode==_0x2b4bc7.DISTANCE_FROM_EYE_POINT)l=s-this._boundingSphere.radius,this._isLessLodDis=l>this._rangeList*i,l=-l;else if(this._rangeMode===_0x2b4bc7.GEOMETRY_ERROR)l=_0x4b53eb(e,t,this,r),this._isLessLodDis=l<=16*i;else l=2*_0x330e65(e,t,this,r,this._fileType===c$q.OSGBFile?800:300),this._isLessLodDis=l<=this._rangeList*i;this._pix=l,this._entity&&(this._entity._avgPix=l,this._entity._disFromCamera=this._disFromCamera,this._entity._isRootTile||(this._entity._disFromCamera*=n))}},_0x10562c.prototype.calcImageryScaleLevel=function(e,t,i,n,r){if(this._boundingSphere){var o=e.positionWC,a=a$11.clone(this._boundingSphere.center),s=a$11.distance(a,o);e._mode==b$1d.SCENE2D&&(s=e.positionCartographic.height),this._disFromCamera=s-this._boundingSphere.radius;var l=0;return i/=oo$1.getQuality(),r==_0x2b4bc7.DISTANCE_FROM_EYE_POINT?(l=s-this._boundingSphere.radius,this._isLessLodDis=l>this._rangeList*i,l=-l,this._pix=l,Math.sqrt(this._rangeList*i/l)):r===_0x2b4bc7.GEOMETRY_ERROR?(this._rangeList=16*this._boundingSphere.radius/256,l=_0x4b53eb(e,t,this,n),this._isLessLodDis=l<=16*i,this._pix=l,Math.sqrt(l/(16*i))):(l=2*_0x330e65(e,t,this,n,this._fileType===c$q.OSGBFile?800:300),this._isLessLodDis=l<=this._rangeList*i,this._pix=l,Math.sqrt(l/(this._rangeList*i)))}},_0x10562c.prototype.freeResource=function(e){for(var t=0,i=this._renderEntityList.length;t<i;t++){this._renderEntityList[t].destroy(!0)}this._renderEntityList.length=0,this._ready=!1},_0x10562c.prototype.isDestroyed=function(){return!1},_0x10562c.prototype.destroy=function(e,t){for(var i=0,n=this._renderEntityList.length;i<n;i++)t$$(e)&&this._renderEntityList[i].refreshRaster(e),this._renderEntityList[i]=this._renderEntityList[i]&&!this._renderEntityList[i].isDestroyed()&&this._renderEntityList[i].destroy();return this._renderEntityList.length=0,t$$(this._entity)&&(t||this._entity._isChildBlock)&&this._entity.destroy(e,t),this._entity=void 0,s$1e(this)};var _0x48bc89=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x19e062=_0x48bc89(void 0,(function(){return _0x19e062.toString().search("(((.+)+)+)+$").toString().constructor(_0x19e062).search("(((.+)+)+)+$")}));_0x19e062();var _0x2ce9d5=function(){this.context=void 0,this.model=void 0,this.index=void 0};_0x2ce9d5.prototype.set=function(e,t,i){this.context=e,this.model=t,this.index=i},_0x2ce9d5.prototype.execute=function(){var e=this.context,t=this.model._layer,i=this.index,n=this.model._vertexPackage,r=n.vertexAttributes[i];if(!t$$(r))throw new t$_("attribute is not exit");if(-1!==n.instanceIndex&&!t$$(this.model._instanceBuffer)){if(!t$$(n.instanceBuffer))throw new t$_("instance buffer is null");this.model._instanceBuffer=u$Y.createVertexBuffer({context:e,typedArray:n.instanceBuffer,usage:A$13.STATIC_DRAW}),this.model._geometryByteLength+=this.model._instanceBuffer.sizeInBytes,oo$1._memGeometryAdded(this.model._instanceBuffer.sizeInBytes)}1!==r.instanceDivisor||t$$(r.typedArray)?t$$(r.vertexBuffer)||(t$$(r.vertexBuffer)||(r.vertexBuffer=u$Y.createVertexBuffer({context:e,typedArray:r.typedArray,usage:A$13.STATIC_DRAW})),t._totalMemoryUsageInBytes+=r.vertexBuffer.sizeInBytes,this.model._geometryByteLength+=r.vertexBuffer.sizeInBytes,oo$1._memGeometryAdded(r.vertexBuffer.sizeInBytes),r.typedArray=null,delete r.typedArray):r.vertexBuffer=this.model._instanceBuffer};var _0x4948bc=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x48c336=_0x4948bc(void 0,(function(){return _0x48c336.toString().search("(((.+)+)+)+$").toString().constructor(_0x48c336).search("(((.+)+)+)+$")}));_0x48c336();var _0x289f7f=function(){this.model=void 0,this.context=void 0,this.index=0};_0x289f7f.prototype.set=function(e,t,i,n){this.model=t,this.context=e,this.index=i,this.verticesCount=n},_0x289f7f.prototype.execute=function(){var e=this.context,t=this.model._layer,i=this.model._arrIndexPackage[this.index];if(!t$$(i))throw new t$_("index package is null");if(!t$$(i.indexBuffer)){if(!t$$(i.indicesTypedArray))throw new t$_("index buffer is null");var n=fe$u.UNSIGNED_SHORT;(1===i.indexType||this.verticesCount>=n$1d.SIXTY_FOUR_KILOBYTES)&&this.context.elementIndexUint&&(n=fe$u.UNSIGNED_INT),t$$(i.indexBuffer)||(i.indexBuffer=u$Y.createIndexBuffer({context:e,typedArray:i.indicesTypedArray,usage:A$13.STATIC_DRAW,indexDatatype:n}),t._totalMemoryUsageInBytes+=i.indexBuffer.sizeInBytes,this.model._geometryByteLength+=i.indexBuffer.sizeInBytes,oo$1._memGeometryAdded(i.indexBuffer.sizeInBytes)),i.indicesTypedArray=null,delete i.indicesTypedArray}};var _0x3c9767=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x597687=_0x3c9767(void 0,(function(){return _0x597687.toString().search("(((.+)+)+)+$").toString().constructor(_0x597687).search("(((.+)+)+)+$")}));function _0x51a186(){this.textures={},this.textureRefCounts={},this._context=void 0}_0x597687(),_0x51a186.createTexture=function(e){var t=e.imageUrl,i=e$1Y(e.wrapS,j$13.REPEAT),n=e$1Y(e.wrapT,j$13.REPEAT),r=e$1Y(e.minificationFilter,tt$l.LINEAR),o=e$1Y(e.magnificationFilter,et$k.LINEAR),a=e$1Y(e.pixelFormat,Z$_.RGBA),s=e$1Y(e.pixelDatatype,v$Z.UNSIGNED_BYTE);if(t$$(t)){var l=t;_0xd29e9e.textureRefCounts[l]?_0xd29e9e.textureRefCounts[l]++:(_0xd29e9e.textureRefCounts[l]=1,c$18(n$S(t),(function(e){var t=new a$Q({wrapS:i,wrapT:n,minificationFilter:r,magnificationFilter:o}),u=new P$S({context:_0xd29e9e._context,source:e,pixelFormat:a,pixelDatatype:s,sampler:t});u.generateMipmap(),_0xd29e9e.textures[l]=u})))}},_0x51a186.getTexture=function(e){if(t$$(e))return _0xd29e9e.textures[e]},_0x51a186.removeTexture=function(e){t$$(e)&&(t$$(_0xd29e9e.textureRefCounts[e])&&(_0xd29e9e.textureRefCounts[e]--,0===_0xd29e9e.textureRefCounts[e])&&(_0xd29e9e.textures[e].destroy(),delete _0xd29e9e.textures[e],delete _0xd29e9e.textureRefCounts[e]))},_0x51a186.update=function(e){_0xd29e9e._context=e};var _0xd29e9e=new _0x51a186,_0x4960e9=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x4372f3=_0x4960e9(void 0,(function(){return _0x4372f3.toString().search("(((.+)+)+)+$").toString().constructor(_0x4372f3).search("(((.+)+)+)+$")}));_0x4372f3();var _0x13425c={SVC_Vertex:1,SVC_Normal:2,SVC_VertexColor:4,SVC_SecondColor:8,SVC_TexutreCoord:16,SVC_TexutreCoordIsW:32},_0x107fdf=Object.freeze(_0x13425c),_0x4804f6=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1dd454=_0x4804f6(void 0,(function(){return _0x1dd454.toString().search("(((.+)+)+)+$").toString().constructor(_0x1dd454).search("(((.+)+)+)+$")}));_0x1dd454();var _0x10e4c3={NONE:0,SELECTION:1,ALL:2},_0x3df1e1=Object.freeze(_0x10e4c3),_0x4acb5e=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x58e14d=_0x4acb5e(void 0,(function(){return _0x58e14d.toString().search("(((.+)+)+)+$").toString().constructor(_0x58e14d).search("(((.+)+)+)+$")}));function _0x1aa62d(){}_0x58e14d();var _0x27b3fd=[];_0x1aa62d.createUniformMapsForCompressAttributes=function(e,t){var i=e._vertexPackage,n=i.nCompressOptions;(n&_0x107fdf.SVC_Vertex)==_0x107fdf.SVC_Vertex&&(t.decode_position_min=function(){return i.minVerticesValue},t.decode_position_normConstant=function(){return i.vertCompressConstant}),(n&_0x107fdf.SVC_Normal)==_0x107fdf.SVC_Normal&&(t.normal_rangeConstant=function(){return i.normalRangeConstant}),(n&_0x107fdf.SVC_TexutreCoord)==_0x107fdf.SVC_TexutreCoord&&(i.texCoordCompressConstant.length>0&&(t.decode_texCoord0_min=function(){return i.minTexCoordValue[0]},t.decode_texCoord0_normConstant=function(){return i.texCoordCompressConstant[0]},t.decode_texCoord0_vNormConstant=function(){return i.texCoordCompressConstant[0]}),i.texCoordCompressConstant.length>1&&(t.decode_texCoord1_min=function(){return i.minTexCoordValue[1]},t.decode_texCoord1_normConstant=function(){return i.texCoordCompressConstant[1]},t.decode_texCoord1_vNormConstant=function(){return i.texCoordCompressConstant[1]}),i.texCoordCompressConstant.length>2&&(t.decode_texCoord2_min=function(){return i.minTexCoordValue[2]},t.decode_texCoord2_normConstant=function(){return i.texCoordCompressConstant[2]}),i.texCoordCompressConstant.length>3&&(t.decode_texCoord3_min=function(){return i.minTexCoordValue[3]},t.decode_texCoord3_normConstant=function(){return i.texCoordCompressConstant[3]}),i.texCoordCompressConstant.length>4&&(t.decode_texCoord4_min=function(){return i.minTexCoordValue[4]},t.decode_texCoord4_normConstant=function(){return i.texCoordCompressConstant[4]}),i.texCoordCompressConstant.length>5&&(t.decode_texCoord5_min=function(){return i.minTexCoordValue[5]},t.decode_texCoord5_normConstant=function(){return i.texCoordCompressConstant[5]}),i.texCoordCompressConstant.length>6&&(t.decode_texCoord6_min=function(){return i.minTexCoordValue[6]},t.decode_texCoord6_normConstant=function(){return i.texCoordCompressConstant[6]}),i.texCoordCompressConstant.length>7&&(t.decode_texCoord7_min=function(){return i.minTexCoordValue[7]},t.decode_texCoord7_normConstant=function(){return i.texCoordCompressConstant[7]}))};var _0x2f1636=new r$T,_0x9edfa2=new r$T;_0x1aa62d.createCommonLayerUniform=function(e,t){t.uPolygonOffset=function(){var t=e._rsColor.polygonOffset;return t$$(t)?(_0x9edfa2.x=t.factor,_0x9edfa2.y=t.units):(_0x9edfa2.x=0,_0x9edfa2.y=0),_0x9edfa2},t.u_polygonOffset=function(){var t=0,i=0,n=e._rsColor.polygonOffset;return t$$(n)?(t=n.factor,i=n.units):(t=0,i=0),{x:t,y:i}},t.uPointSize=function(){return e.style3D.pointSize},t.uTranslation=function(){return e.selectedTranslate},t.uSelColor=function(){return e.selectedColor},t.uMinMaxTransparent=function(){return _0x2f1636.x=e.minTransparentAlpha,_0x2f1636.y=e.maxTransparentAlpha,_0x2f1636},t.uBottom=function(){return e.style3D.bottomAltitude}},_0x1aa62d.createMaterialUniform=function(e,t){t.uAmbientColor=function(){return e._ambientColor},t.uDiffuseColor=function(){return e._diffuseColor},t.uTexMatrix=function(){return e._texMatrix},t.uTexture0Width=function(){return t$$(e._textures[0])?e._textures[0]._width:1},t.uTexture1Width=function(){return t$$(e._textures[1])?e._textures[1]._width:1}},_0x1aa62d.createDynamicMaterialUniform=function(e,t,i,n){n.uFillForeColor=function(){return t.style3D.fillForeColor};var r=new a$10;n.uTexUVOffset=function(){r.x=0,r.y=0,r.z=1,r.w=1;var e=i._baseColorTextureMotion;if(t$$(e)){var n=e.OffsetPeriod,o=e.OffsetSpeedU,a=e.OffsetSpeedV,s=e.TilingPeriod,l=e.TilingSpeedU,u=e.TilingSpeedV,c=performance.now()/1e3;if(n>0){var h=c%n;r.x=h*o,r.y=h*a}if(s>0){var d=c%s;r.z=1+d*l,r.w=1+d*u}}else if(0!==t._textureUVSpeed.x||0!==t._textureUVSpeed.y){var f=performance.now()/1e3;r.x=t._textureUVSpeed.x*f,r.y=t._textureUVSpeed.y*f}return r},n.uEnvMapIntensity=function(){return t._envMapIntensity}};var _0x53c45d=new c$1a;function o$s(){this._uniformDataArray={},this._needUpdate=!1}_0x1aa62d.create=function(e,t,i,n){var r=t._fileType,o=r===c$q.PolylineEffect||r===c$q.ClampGroundRealtimeRasterCache&&t$$(i._attributeLocations.aTexCoord1),a=r===c$q.RegionEffect,s=r===c$q.ClampGroundRealtimeRasterCache&&!t$$(i._attributeLocations.aTexCoord1),l=r===c$q.PointCloudFile,u=i.materialPass;r===c$q.OSGBFile||c$q.OSGBCacheFile,_0x1aa62d.createCommonLayerUniform(t,n),_0x1aa62d.createMaterialUniform(u,n),_0x1aa62d.createDynamicMaterialUniform(i,t,u,n),n.uEmissionColor=function(){return t.style3D.emissionColor},n.uSelectCastShadow=function(){return t.shadowType==_0x3df1e1.SELECTION},n.uPixels=function(){return a$10.fromArray(t._context.pixels)},n.uLayerID=function(){return t._id/255},n.uTransparentFilter=function(){return t.selectionFiltrateByTransparency},n.uGeoMatrix=function(){return i._geoMatrix},n.uInverseGeoMatrix=function(){return i._inverseGeoMatrix},n.s3m_iblReferenceFrameMatrix=function(){return i._iblReferenceFrameMatrix},n.uSkeletonMatrix=function(){return i._instanceSkeletonMatrix},n.uTexture=function(){var e;return t$$(i._symbolTextureUrl)?t$$(e=_0x51a186.getTexture(i._symbolTextureUrl))?e:t._context.defaultTexture:t$$(u._textures[0])?(e=u._textures[0]).isTexBlock?e.renderable&&e.ready?e:t$$(u._ancestorTexture)?u._ancestorTexture:e:e:t._context.defaultTexture},n.uMapTexture=function(){if(t$$(u._textures[0])){var e=u._textures[0],i=u._mapTextures[e.id];return t$$(i)?i:e}return t._context.defaultTexture},n.uSecTexture=function(){var e=u._textures[1];return e.isTexBlock?e.renderable&&e.ready?e:t$$(u._ancestorTextureBake)?u._ancestorTextureBake:t._context.defaultTexture:e},n.uSkeletonCount=function(){return i.skeletonCount};var c=new a$10;n.uLayerBounds=function(){return c.x=t._layerModelBounds.x,c.y=t._layerModelBounds.y,c.z=t._layerModelBounds.z-t._layerModelBounds.x,c.w=t._layerModelBounds.w-t._layerModelBounds.y,c},n.uLayerCornerLength=function(){return Math.sqrt(t._layerModelBounds.z*t._layerModelBounds.z+t._layerModelBounds.w*t._layerModelBounds.w)},n.uMaxCategoryOrHypCeil=function(){var e=t._hypMaxCategory;return t$$(t._hypsometricSetting)&&(0!=t._hypsometricSetting._floor||0!=t._hypsometricSetting._ceiling)&&(e=t._hypsometricSetting._ceiling),t$$(e)||(e=100),e},n.uMinCategoryOrHypFloor=function(){var e=t._hypMinCategory;return t$$(t._hypsometricSetting)&&(0!=t._hypsometricSetting._floor||0!=t._hypsometricSetting._ceiling)&&(e=t._hypsometricSetting._floor),t$$(e)||(e=0),e},n.uRect=function(){return t._flattenBounds},n.uCameraHeight=function(){return t._frameState.camera.positionCartographic.height},n.uFlattenTexture=function(){return e.multiViewportIndex>-1?1<<e.multiViewportIndex&t._flattenVisibleViewport?t._flattenTexture:t._context.defaultTexture:t._flattenTexture},n.uHypHasColorByHeight=function(){return i.useWValue},n.fMultiTemporalFactor=function(){return i._fMultiTemporalFactor};var h=new a$10;n.uTextureDim=function(){var e=u._textures[0].renderable?u._textures[0]:t$$(u._ancestorTexture)?u._ancestorTexture:u._textures[0];if(h.x=e._width,h.y=e._height,t$$(u._textures[1])){var t=u._textures[1].renderable?u._textures[1]:t$$(u._ancestorTextureBake)?u._ancestorTextureBake:u._textures[1];h.z=t._width,h.w=t._height}return h},n.uHypHasAnalysisRegion=function(){return t._bUseHypRegion},n.uMixColorType=function(){return t$$(t._mixColorType)?t._mixColorType:0},n.uDataFloor=function(){return t._fMinValue===t._fMaxValue?0:t._fMinValue},n.uDataCeil=function(){return t._fMinValue===t._fMaxValue?1:t._fMaxValue},n.uEmissionTexAtlas=function(){return t$$(t._hypsometricSetting._emissionTextureAtlas)?t._hypsometricSetting._emissionTextureAtlas.texture:t._context.defaultTexture},n.uEmissionTexAtlasRects=function(){return t$$(t._hypsometricSetting)?t._hypsometricSetting._getEmissionAtlasTextureRects():_0x27b3fd},n.uEmissionTexAtlasTilingAndOffset=function(){return t$$(t._hypsometricSetting)?t._hypsometricSetting._getEmissionTexAtlasTilingAndOffset():_0x27b3fd},n.uHypsometricTexture=function(){return t._hypsometricTexture},n.uHypsometricRenderTexture=function(){return t._hypsometricRenderTexture},n.uHypOpacity=function(){return t$$(t._hypsometricSetting)?t._hypsometricSetting.Opacity:1},n.uHypContourInterval=function(){return t$$(t._hypsometricSetting)?t._hypsometricSetting.LineInterval:100};var d=new a$10;n.uHypLineColor=function(){return t$$(t._hypsometricSetting)?(d.x=t._hypsometricSetting.LineColor.red,d.y=t._hypsometricSetting.LineColor.green,d.z=t._hypsometricSetting.LineColor.blue,d.w=t._hypsometricSetting.LineColor.alpha,d):a$10.ZERO},n.uHypContourFillMode=function(){var e=1;if(t$$(t._hypsometricSetting))switch(t._hypsometricSetting.DisplayMode){case J$O.DisplayMode.NONE:e=0;break;case J$O.DisplayMode.FACE:e=1;break;case J$O.DisplayMode.LINE:e=2;break;case J$O.DisplayMode.FACE_AND_LINE:e=3}return e},n.uHypFloor=function(){return t$$(t._hypsometricSetting)?t._hypsometricSetting.ColorTableMinKey:0},n.uHypCeil=function(){return t$$(t._hypsometricSetting)?t._hypsometricSetting.ColorTableMaxKey:0},n.uHypMaxVisibleValue=function(){return(t$$(t._hypsometricSetting)?t._hypsometricSetting.MaxVisibleValue:0)+n$1d.EPSILON5},n.uHypMinVisibleValue=function(){return(t$$(t._hypsometricSetting)?t._hypsometricSetting.MinVisibleValue:0)+n$1d.EPSILON5},n.uHypRect=function(){return t._hypsometricBound},n.uNoValueColor=function(){return t$$(t._hypsometricSetting)?t._hypsometricSetting.noValueColor:e$1z.WHITE},n.uHypsometricVisible=function(){return i._isLeaf&&i._isHypsometricVisible||t._hypsometricSetting._visibleDistanceMax===Number.MAX_VALUE&&0===t._hypsometricSetting._visibleDistanceMin&&t._hypsometricSetting._maxVisibleAltitude===Number.MAX_VALUE&&0===t._hypsometricSetting._minVisibleAltitude?1:0},n.uVisibleDistanceMax=function(){return t._visibleDistanceMax},n.uOverlayRect=function(){return t._overlayBounds},n.uOverlayTexture=function(){return t._overlayTexture},n.uTriangleFiltratePixel=function(){return t._triangleFiltratePixel},n.uMaxCategory=function(){return t._hypMaxCategory},n.uMinCategory=function(){return t._hypMinCategory},n.uCategoryWidht=function(){return t._categorieTexture&&t._categorieTexture.width||256},n.uCategoryHeight=function(){return t._categorieTexture&&t._categorieTexture.height||1},n.uCategorieTexture=function(){return t._categorieTexture},n.uSelectColorType=function(){return t.selectColorType},n.uLineColor=function(){return t.style3D.lineColor},n.uLineWidth=function(){return t.style3D.lineWidth},n.uFillStyle=function(){return t.style3D.fillStyle},n.uNormalDepthTexture=function(){return t._frameState._framebufferList.normalAndDepth.renderTexture._fb.getColorTexture(0)},n.uBrightness=function(){return t._brightness},n.uContrast=function(){return t._contrast},n.uHue=function(){return t._hue},n.uSaturation=function(){return t._saturation},n.uOneOverGamma=function(){return 1/t._gamma},n.uTransparentBackColor=function(){return t._transparentBackColor},n.uTransparentBackColorTolerance=function(){return t._transparentBackColorTolerance},n.uExcavationTexture=function(){return t._excavationTexture},n.uExcavationMode=function(){return t._excavationMode},n.uExcavationRect=function(){return t._excavationBounds},n.uServerExcavationMode=function(){return t._serverExcavationMode},n.uServerExcavationRect=function(){return t._serverExcavationBounds},n.uServerExcavationTexture=function(){return t._excavationTexture},n.clip_mode=function(){return t._clipMode},n.clip_planes=function(){return t._clipPlane},n.clip_line_color=function(){return t._clipLineColor},n.uSplitDirection=function(){return t.splitDirection},n.uSplitPosition=function(){return t.splitPosition};var f=new a$10;if(n.uSwipeRegion=function(){return f.x=t._swipeRegion.x*t._frameState.context.drawingBufferWidth,f.y=(1-t._swipeRegion.y)*t._frameState.context.drawingBufferHeight,f.z=t._swipeRegion.z*t._frameState.context.drawingBufferWidth,f.w=(1-t._swipeRegion.w)*t._frameState.context.drawingBufferHeight,f},n.uHorizontalLine=function(){return t$$(t._fHorizontalLine)?t._fHorizontalLine:0},n.uHorizontalColor=function(){return t$$(t$$(t._HorizontalColor))?t._HorizontalColor:new a$10(1,1,0,0)},n.uImgTexture=function(){return t$$(i._rasterImageTexture)?i._rasterImageTexture:t._context.defaultTransparentTexture},n.uImgTextureAlpha=function(){return t$$(t._imageryLayer)?t._imageryLayer instanceof Array?t._imageryLayer[t._imageryLayer.length-1].alpha:t._imageryLayer.show&&i._showImagerysImmediate?t._imageryLayer.alpha:0:1},n.uImgTextureBound=function(){return i._imageryTextureBound},n.u_dayTextures=function(){return i._dayTextures},n.u_dayTextureUseWebMercatorT=function(){return i._dayTextureUseWebMercatorT},n.u_dayTextureTexCoordsRectangle=function(){return i._dayTextureTexCoordsRectangle},n.u_dayTextureTranslationAndScale=function(){return i._dayTextureTranslationAndScale},n.u_transparentBackColor=function(){return i._transparentBackColor},n.u_imageryClipEnable=function(){return i._imageryClipEnable},n.u_dayTextureFlipY=function(){return i._dayTextureFlipY},n.u_dayTextureAlpha=function(){return i._dayTextureAlpha},n.uVolumeTexture=function(){return"png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt?i._volTexture:i._volObj.volTexture},n.sideBlockCount=function(){return i._volObj.nSideBlockCount},n.blockLength=function(){return i._volObj.nBlockLength},n.texLength=function(){return i._volObj.nLength},n.width=function(){return i._volObj.nWidth},n.height=function(){return i._volObj.nHeight},n.depth=function(){return i._volObj.nDepth},n.uVolumeWidth=function(){return i._volObj.nWidth},n.uVolumeHeight=function(){return i._volObj.nHeight},n.uFilterMode=function(){var e=0;return t$$(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===J$O.FilterMode.NEAREST&&(e=1),e},n.uVolumeType=function(){return t$$(i._volObj.nFormat)?3200===i._volObj.nFormat||t$$(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===J$O.FilterMode.LINEAR?0:1:0},n.uFloodFlagTexture=function(){if(t$$(t._floodFlagTexture))return t._floodFlagTexture},n.uFloodRect=function(){if(t$$(t._floodRect))return t._floodRect},n.uFloodMatrixInvert=function(){var e=new c$1a;return c$1a.multiply(t._matFloodInvertMatrix,i._matModel,e),e},o&&(n.uEffectLineWidth=function(){return t$$(t._effect)?t._effect._lineWidth:t.style3D.lineWidth},n.uColor=function(){return t$$(t._effect)?t._effect._color:t.style3D.lineColor},n.uType=function(){return t$$(t._effect)?t._effect._type:0},n.uOutlineColor=function(){return t$$(t._effect)?t._effect._outlineColor:t.style3D.lineColor},n.uOutlineWidth=function(){return t$$(t._effect)?t._effect._outlineWidth:0},n.uGapColor=function(){return t$$(t._effect)?t._effect._gapColor:t.style3D.lineColor},n.uDashLength=function(){return t$$(t._effect)?t._effect._dashLength:0},n.uDashPattern=function(){if(t$$(t._effect)){if(t._effect._isMove){t._effect._frame>159&&(t._effect._frame=0);var e=Math.floor(t._effect._frame/10),i=t._effect._dashPattern<<e,n=t._effect._dashPattern>>16-e;return t._effect._frame++,i+n}return t._effect._dashPattern}return 0},n.uGlowPower=function(){return t$$(t._effect)?t._effect._glowPower:0},n.uIsArrow=function(){return!!t$$(t._effect)&&t._effect._isArrow}),a&&(n.uRotationAngle=function(){return t._effect._rotationAngle},n.uType=function(){return t._effect._type},n.uForeColor=function(){return t._effect._foreColor},n.uBackColor=function(){return t._effect._backColor},n.uLineWidthX=function(){return t._effect._lineWidthX},n.uLineWidthY=function(){return t._effect._lineWidthY},n.uRepeatX=function(){return t._effect._repeatX},n.uRepeatY=function(){return t._effect._repeatY},n.uOffsetX=function(){return t._effect._offsetX},n.uOffsetY=function(){return t._effect._offsetY}),_0x1aa62d.createUniformMapsForCompressAttributes(i,n),l&&(n.uPointCloudSize=function(){var e=t._context.uniformState;return t._pointCloudShading.eyeDomeLighting||t._pointCloudShading.performance?t._pointCloudEyeDomeLighting.textureScale*t.style3D.pointSize*e.resolutionScale:t.style3D.pointSize*e.resolutionScale}),s&&(n.textureRepeat=function(){return i._symbolTextureRepeat}),i._isClamp){n.uIsPicking=function(){return t._picking};var p=new r$T;n.uMinMaxTerrainHeight=function(){return p.x=t._shadowVolumeBottomHeight,p.y=t._shadowVolumeTopHeight,p},n.uLineWidth=function(){return t.style3D.lineWidth};var _=new c$1a;n.uMatrixInvert=function(){return c$1a.inverse(t._matModel,_),_},n.uPickPosition=function(){return t._pickPosition},n.uPickPositionHeight=function(){return t._context._pickPositionHeight},n.uSouthWest=function(){return i._southWestCorner},n.uNorthDir=function(){return i._northVector},n.uEastDir=function(){return i._eastVector},n.uTexture=function(){if(t$$(i._symbolTextureUrl)){var e=_0x51a186.getTexture(i._symbolTextureUrl);return t$$(e)?e:t._context.defaultTexture}return t$$(u._textures[0])?u._textures[0]:t._context.defaultTexture};var m=new r$T;n.uLevelScale=function(){var e=t._frameState.globeBottomLevel,i=4*Math.PI/(1*(1<<e));return m.x=t._layerBounds.width/i,m.y=t._layerBounds.height/i,m};var $=new r$T;n.uRepeatTimes=function(){return $.x=a$11.magnitude(i._eastVector)/t._layerRange,$.y=a$11.magnitude(i._northVector)/t._layerRange,$}}t$$(t.waterEffectSet)&&(n.uReflectMap=function(){return t._frameState._framebufferList.water.renderTexture._fb.getColorTexture(0)},n.uNoiseMap=function(){return t._frameState._framebufferList.water._waterNormalMap},n.uTimeVal=function(){var e=.01*t._waterParamter.timeVal;return i._waterTime=i._waterTime>1?e:i._waterTime+e,i._waterTime},n.uScale=function(){return t._waterParamter.scale},n.uScroll=function(){return t._waterParamter.scroll},n.uNoise=function(){return t._waterParamter.noise},n.uBumpSpeed=function(){return t._waterParamter.bumpSpeed},n.uFresnelPower=function(){return t._waterParamter.fresnelPower},n.uMinFresnel=function(){return t._waterParamter.minFresnel},n.uMaxFresnel=function(){return t._waterParamter.maxFresnel},n.uTintColour=function(){return t._waterParamter.tintColour},n.uNoiseScale=function(){return t._waterParamter.noiseScale},n.uWaterColour=function(){return t._waterParamter.waterColour},n.uWaterBrightness=function(){return t._waterParamter.waterBrightness}),n.uBaseColorTextureIndex=function(){return u._baseColorTextureIndex>-1?u._baseColorTextureIndex:t._PBRMaterialParams.pbrMetallicRoughness.baseColorTextureIndex},n.uBaseColorFactor=function(){return u._baseColor||t._PBRMaterialParams.pbrMetallicRoughness.baseColor},n.uMetallicFactor=function(){return u._metallicFactor||t._PBRMaterialParams.pbrMetallicRoughness.metallicFactor},n.uRoughnessFactor=function(){return e$1Y(u._roughnessFactor,t._PBRMaterialParams.pbrMetallicRoughness.roughnessFactor)},n.uEmissiveFactor=function(){return u._emissiveFactor||t._PBRMaterialParams.pbrMetallicRoughness.emissiveFactor},n.uEmissionTexture=function(){if(t$$(u.emissiveTexture))return u.emissiveTexture;var e=u._emissiveTextureIndex;return e>-1&&t$$(u._textures[e])?u._textures[e]:t._PBRMaterialParams.pbrMetallicRoughness.emissiveTexture},n.uMetallicRoughnessTexture=function(){return t$$(u._metallicRoughnessTextureIndex)&&u._metallicRoughnessTextureIndex>-1?t$$(u.metallicRoughnessTexture)?u.metallicRoughnessTexture:u._textures[u._metallicRoughnessTextureIndex]:t._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture},n.uNormalTexture=function(){return t$$(u._normalTextureIndex)&&u._normalTextureIndex>-1?u.normalTexture?u.normalTexture:u._textures[u._normalTextureIndex]:t._PBRMaterialParams.pbrMetallicRoughness.normalTexture},n.uNormalTextureScale=function(){return t$$(u._normalTextureScale)?u._normalTextureScale:t._PBRMaterialParams.pbrMetallicRoughness.normalTextureScale},n.uOcclusionTexture=function(){return t$$(u._occlusionTextureIndex)&&u._occlusionTextureIndex>-1?u.occlusionTexture?u.occlusionTexture:t$$(u._textures[u._occlusionTextureIndex])?u._textures[u._occlusionTextureIndex]:t._context.defaultTexture:t._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture},n.uIndexOfRefraction=function(){return t$$(u._indexOfRefraction)&&u._indexOfRefraction>0?u._indexOfRefraction:t._PBRMaterialParams.pbrMetallicRoughness.indexOfRefraction},n.uTransmissionFactor=function(){return t$$(u._transmissionFactor)&&u._transmissionFactor>0?u._transmissionFactor:t$$(t._PBRMaterialParams.pbrMetallicRoughness.volume)&&t$$(t._PBRMaterialParams.pbrMetallicRoughness.volume.transmissionFactor)?t._PBRMaterialParams.pbrMetallicRoughness.volume.transmissionFactor:1},n.uThickness=function(){return t$$(u._volume)?u._volume._thickness:t._PBRMaterialParams.pbrMetallicRoughness.volume.thickness},n.uSnowCoverageFactor=function(){return t$$(u.snowEffect)&&u.snowEffect._snow_coverage>0?u.snowEffect._snow_coverage:t$$(t._PBRMaterialParams.pbrMetallicRoughness.snowEffect)&&t$$(t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snow_coverage)&&t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snow_coverage>0?t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snow_coverage:.5},n.uSnowMaskTexture=function(){return t$$(u.snowEffect)&&t$$(u.snowEffect._snowMaskTexture)?u.snowEffect._snowMaskTexture:t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture},n.uSnowNormalTexture=function(){return t$$(u.snowEffect)&&t$$(u.snowEffect._snowNormalTexture)?u.snowEffect._snowNormalTexture:t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture},n.uIntensityScale=function(){return t$$(u._intensityScale)&&u.rainEffect._intensityScale>0?u._intensityScale:t$$(t._PBRMaterialParams.pbrMetallicRoughness.intensityScale)&&t._PBRMaterialParams.pbrMetallicRoughness.intensityScale>0?t._PBRMaterialParams.pbrMetallicRoughness.intensityScale:1},n.uAnimationSpeed=function(){return t$$(u.rainEffect)&&t$$(u.rainEffect._animationSpeed)?u.rainEffect._animationSpeed:t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.animationSpeed},n.uRippleTexture=function(){return t$$(u.rainEffect)&&t$$(u.rainEffect._rippleTexture)?u.rainEffect._rippleTexture:t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture},n.uWetnessFactor=function(){return t$$(u.rainEffect)&&u.rainEffect._wetnessFactor>0?u.rainEffect._wetnessFactor:t$$(t._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&t$$(t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wetnessFactor)&&t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wetnessFactor>0?t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wetnessFactor:0},n.uRippleScale=function(){return t$$(u.rainEffect)&&u.rainEffect._ripple_scale>0?u.rainEffect._ripple_scale:t$$(t._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&t$$(t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.ripple_scale)&&t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.ripple_scale>0?t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.ripple_scale:5},n.uWindIntensity=function(){return t$$(u.rainEffect)&&u.rainEffect._wind_intensity>0?u.rainEffect._wind_intensity:t$$(t._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&t$$(t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wind_intensity)&&t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wind_intensity>0?t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wind_intensity:0},n.uRain=function(){return t$$(u.rainEffect)&&u.rainEffect._rain>0?u.rainEffect._rain:t$$(t._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&t$$(t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rain)&&t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rain>0?t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rain:200},n.uCameraDepth=function(){return t$$(u.rainEffect)&&u.rainEffect._cameraDepth>0?u.rainEffect._cameraDepth:t$$(t._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&t$$(t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.cameraDepth)&&t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.cameraDepth>0?t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.cameraDepth:.8},n.uTintColor=function(){return t$$(u._volume)?u._volume._tintColor:t$$(t._PBRMaterialParams.pbrMetallicRoughness.volume)?t._PBRMaterialParams.pbrMetallicRoughness.volume.tintColor:e$1z.WHITE},n.uDiffusionDistance=function(){return t$$(u._volume)?u._volume._diffusionDistance:t$$(t._PBRMaterialParams.pbrMetallicRoughness.volume)?t._PBRMaterialParams.pbrMetallicRoughness.volume.diffusionDistance:e$1z.WHITE},n.uClearcoatFactor=function(){return t$$(u._clearcoat)?u._clearcoat._clearcoatFactor:t._PBRMaterialParams.pbrMetallicRoughness.clearcoat.clearcoatFactor},n.uClearcoatRoughnessFactor=function(){return t$$(u._clearcoat)?u._clearcoat._clearcoatRoughnessFactor:t._PBRMaterialParams.pbrMetallicRoughness.clearcoat.clearcoatRoughnessFactor},n.uAnisotropy=function(){return t$$(u._anisotropy)?u._anisotropy:t._PBRMaterialParams.pbrMetallicRoughness.anisotropy},n.uBaseTexture=function(){return t$$(u._baseColorTextureIndex)&&u._baseColorTextureIndex>-1?u.baseColorTexture:t._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture};var g=u._emissiveTextureMotion||t._PBRMaterialParams.pbrMetallicRoughness.emissiveTextureMotion,y=new a$10;if(n.uEmissiveUVOffsetAndTiling=function(){var e=performance.now()/1e3,t=g.OffsetPeriod,i=g.OffsetSpeedU,n=g.OffsetSpeedV,r=g.TilingPeriod,o=g.TilingSpeedU,a=g.TilingSpeedV;if(g&&t>0){var s=e%t;y.x=s*i,y.y=s*n}else y.x=0,y.y=0;if(g&&r>0){var l=e%g._tilingPeriod;y.z=1+l*o,y.w=1+l*a}else y.z=1,y.w=1;return y},u._usePBRTextureBatch){var v=new r$T;n.uPBRTexture=function(){return u.pbrParamTexture},n.uPBRTexWH=function(){var e=u.pbrParamTexture;return v.x=e._width,v.y=e._height,v}}n.uAlphaCutoff=function(){return u._alphaCutoff},n.uPBRMaterials=function(){return e.pbrMaterialsArr},n.uPbrParTextureWidth=function(){return t$$(u.baseColorTexture)?u.baseColorTexture.width:t$$(u.normalTexture)?u.normalTexture.width:t$$(u.metallicRoughnessTexture)?u.metallicRoughnessTexture.width:t$$(u.emissiveTexture)?u.emissiveTexture.width:t$$(u.pbrParamTexture)?u.pbrParamTexture.width:1};var x={x:0,y:0};n.uPanOffset=function(){return t$$(t._context.curFusionViewMatrix)?(t$$(t.panOffset)&&(x.x=t.panOffset.x/t._context.drawingBufferWidth,x.y=t.panOffset.y/t._context.drawingBufferHeight),x):(x.x=0,x.y=0,x)},n.uModelView=function(){return t$$(t._context.curFusionViewMatrix)?c$1a.multiply(t._context.curFusionViewMatrix,i._matModel,_0x53c45d):c$1a.multiply(t._context.uniformState.view3D,i._matModel,_0x53c45d)},t$$(i._batchTable)&&(n=i._batchTable.getUniformMapCallback()(n)),t$$(u._batchTable)&&(u._batchTable.update(e),n=u._batchTable.getUniformMapCallback()(n)),t$$(u._batchTableBake)&&(u._batchTableBake.update(e),n=u._batchTableBake.getUniformMapCallback()(n)),n=s$1n(n,e.lightSource.createUniformMap()),i._uniformMap=n},Object.defineProperties(o$s.prototype,{needUpdate:{set:function(){this._needUpdate=value},get:function(){return this._needUpdate}}}),o$s.prototype.set=function(e,t){this._uniformDataArray[e]=t,t.listener=this,this._needUpdate=!0},o$s.prototype.removeAt=function(e){delete this._uniformDataArray[e],this._needUpdate=!0},o$s.prototype.update=function(e,t){for(var i in this._uniformDataArray){var n=this._uniformDataArray[i],r=e*parseInt(i);n.writeToFloat32Array(t,r)}};var s$n=[],u$q=0;function l$k(e){s$n=[];for(var t=e-1,i=0;i<e;++i,--t)s$n.push(t);u$q=e-1}function c$p(){0==s$n.length&&l$k(e$1y.maxUniformBufferBinding);var e=s$n[u$q];return u$q--,e}function p$r(e){u$q++,s$n[u$q]=e}function f$v(){this.cache={}}function i$s(e,t){this._context=e,this._collection=new o$s,this._gpuBuffer=null,this._lastOffsetInByte=-1,this._uniformBlockSizeInByte=0,this._arrayWriteToGPU=new Float32Array(64),this._bindingPoint=c$p(),this._dataChanged=!1,this._bufferSizeChanged=!1,this._isDynamic=t,this._dataCountInBuffer=0,this._allIndex=[],this._nextUnusedIndex=-1,this._initAllIndex(0)}function B$l(e){for(var t=e$1y.uniformBufferOffsetAlignment;e>t;)t+=e$1y.uniformBufferOffsetAlignment;return t}f$v.get=function(e){return a$m.cache[e]},f$v.create=function(e,t,i){var n=new i$s(e,i);return a$m.cache[t]=n,n},f$v.update=function(e){for(var t in a$m.context=e,a$m.cache)a$m.cache[t].update()},Object.defineProperties(i$s.prototype,{bindingPoint:{get:function(){return this._bindingPoint}}}),i$s.prototype._initAllIndex=function(e){this._allIndex=[];for(var t=e-1,i=0;i<e;++i,--t)this._allIndex.push(t);this._nextUnusedIndex=e-1},i$s.prototype._getUnusedIndex=function(){if(this._nextUnusedIndex<0){var e=this._dataCountInBuffer;this._dataCountInBuffer=0==e?1:2*e,this._initAllIndex(this._dataCountInBuffer),this._nextUnusedIndex-=e,this._bufferSizeChanged=!0}var t=this._allIndex[this._nextUnusedIndex];return this._nextUnusedIndex--,t},i$s.prototype._markIndexAsUnused=function(e){this._nextUnusedIndex++,this._allIndex[this._nextUnusedIndex]=e},i$s.prototype.add=function(e){0==this._uniformBlockSizeInByte&&(this._uniformBlockSizeInByte=B$l(e.sizeInByte));var t=this._getUnusedIndex();return this._collection.set(t,e),this._dataChanged=!0,t},i$s.prototype.removeAt=function(e){this._markIndexAsUnused(e),this._dataChanged=!0,this._collection.removeAt(e)},i$s.prototype.update=function(){var e=this._dataCountInBuffer;if(this._bufferSizeChanged&&(this._reallocateGPUBuffer(e),this._bufferSizeChanged=!1),t$$(this._gpuBuffer)&&(this._dataChanged||this._isDynamic)){var t=this._uniformBlockSizeInByte/Float32Array.BYTES_PER_ELEMENT;this._collection.update(t,this._arrayWriteToGPU);var i=this._context._gl;i.bindBuffer(i.UNIFORM_BUFFER,this._gpuBuffer),i.bufferData(i.UNIFORM_BUFFER,this._arrayWriteToGPU,i.DYNAMIC_DRAW),i.bindBuffer(i.UNIFORM_BUFFER,null),this._dataChanged=!1}this._nextUnusedIndex==this._dataCountInBuffer-1&&this._release()},i$s.prototype._reallocateGPUBuffer=function(e){var t=this._context._gl;t$$(this._gpuBuffer)&&t.deleteBuffer(this._gpuBuffer);var i=e*this._uniformBlockSizeInByte;this._gpuBuffer=t.createBuffer(),t.bindBuffer(t.UNIFORM_BUFFER,this._gpuBuffer),t.bufferData(t.UNIFORM_BUFFER,i,t.DYNAMIC_DRAW),t.bindBuffer(t.UNIFORM_BUFFER,null);var n=this._uniformBlockSizeInByte/Float32Array.BYTES_PER_ELEMENT;this._arrayWriteToGPU=new Float32Array(n*e)},i$s.prototype.bindBufferRange=function(e,t){var i=this._uniformBlockSizeInByte*e;if(this._lastOffsetInByte!=i){var n=this._context._gl;n.bindBufferRange(n.UNIFORM_BUFFER,this._bindingPoint,this._gpuBuffer,i,t),this._lastOffsetInByte=i}},i$s.prototype.isDestroyed=function(){return!1},i$s.prototype.destroy=function(){return this._release(),p$r(this._bindingPoint),destroyObject(this)},i$s.prototype._release=function(){var e=this._context._gl;t$$(this._gpuBuffer)&&(e.deleteBuffer(this._gpuBuffer),this._gpuBuffer=null),this._dataCountInBuffer=0,this._arrayWriteToGPU=null,this._lastOffsetInByte=-1,this._allIndex=[],this._nextUnusedIndex=-1,this._initAllIndex(0)};var a$m=new f$v;function r$j(e,t){this._uniformStructName=t.name,this._context=e;var i=f$v.get(this._uniformStructName);t$$(i)||(i=f$v.create(e,this._uniformStructName,t.isDynamic)),this._index=i.add(t),this._sizeInByte=0,this._refCount=0}f$v.manager=a$m,Object.defineProperties(r$j.prototype,{}),r$j.prototype.bindProgram=function(e){var t=e._program,i=this._context._gl,n=f$v.get(this._uniformStructName),r=e._uniformBlockLocation[this._uniformStructName];if(!t$$(r)){if((r=i.getUniformBlockIndex(t,this._uniformStructName))==i.INVALID_INDEX)return;i.uniformBlockBinding(t,r,n.bindingPoint),e._uniformBlockLocation[this._uniformStructName]=r}0==this._sizeInByte&&(this._sizeInByte=i.getActiveUniformBlockParameter(t,r,i.UNIFORM_BLOCK_DATA_SIZE)),n.bindBufferRange(this._index,this._sizeInByte)},r$j.prototype.increaseRef=function(){this._refCount++},r$j.prototype.decreaseRef=function(){(this._refCount--,0==this._refCount)&&f$v.get(this._uniformStructName).removeAt(this._index);this._refCount<0&&(this._refCount=0)},r$j.prototype.isDestroyed=function(){return!1},r$j.prototype.destroy=function(){return s$1e(this)};var t$k=function(){this._isDynamic=!0,this._name="UniformDataBase",this._sizeInByte=0};function _0x35487f(){}Object.defineProperties(t$k.prototype,{name:{get:function(){return this._name}},sizeInByte:{get:function(){return this._sizeInByte}},isDynamic:{get:function(){return this._isDynamic}}}),t$k.prototype.writeToFloat32Array=function(e,t){};var _0x276d51=function(e){function t(t){e.apply(this,arguments),this.layer=t,this._isDynamic=!0,this._name="LayerParameter",this._sizeInByte=64}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.writeToFloat32Array=function(e,t){a$11.pack(this.layer.selectedTranslate,e,t),e[t+3]=this.layer.style3D.bottomAltitude,e[t+4]=this.layer.minTransparentAlpha,e[t+5]=this.layer.maxTransparentAlpha;var i=this.layer._rsColor.polygonOffset;t$$(i)?(e[t+6]=i.factor,e[t+7]=i.units):(e[t+6]=0,e[t+7]=0),e$1z.pack(this.layer.selectedColor,e,t+8),e[t+12]=this.layer.style3D.pointSize},t}(t$k),_0x2cacf3=function(e){function t(t,i){e.apply(this,arguments),this.lightSource=i,this._isDynamic=!0,this._name="LightParameter",this._sizeInByte=48,this.uniformState=t.uniformState}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.writeToFloat32Array=function(e,t){e$1z.pack(this.lightSource.ambientLightColor,e,t),t+=4,e$1z.pack(this.lightSource.sunLightColor,e,t),t+=4,a$11.pack(this.uniformState.sunDirectionEC,e,t),t+=3,e[t++]=this.lightSource.sunLightON},t}(t$k),_0x142137=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.apply(this,arguments),this.materialPass=t,this._isDynamic=!1,this._name="MaterialParameter",this._sizeInByte=104}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.writeToFloat32Array=function(e,t){this.materialPass.isDestroyed()||(e$1z.pack(this.materialPass._ambientColor,e,t),t+=4,e$1z.pack(this.materialPass._diffuseColor,e,t),t+=4,c$1a.pack(this.materialPass._texMatrix,e,t),t+=16,e[t++]=t$$(this.materialPass._textures[0])?this.materialPass._textures[0]._width:1,e[t++]=t$$(this.materialPass._textures[1])?this.materialPass._textures[1]._width:1)},r}(t$k),_0x3b14e0=new a$10,_0x4c73c3=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i,n){e.apply(this,arguments),this.materialPass=n,this.layer=i,this.useLineColor=t.useLineColor,this._isDynamic=!1,this._name="MaterialDynamicParameter",this._sizeInByte=32}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.writeToFloat32Array=function(e,t){_0x3b14e0.x=0,_0x3b14e0.y=0,_0x3b14e0.z=1,_0x3b14e0.w=1;var i=this.layer,n=this.materialPass._baseColorTextureMotion;if(t$$(n)){var r=performance.now()/1e3;if(n._offsetPeriod>0){var o=r%n._offsetPeriod;_0x3b14e0.x=o*n._offsetSpeedU,_0x3b14e0.y=o*n._offsetSpeedV}if(n._tilingPeriod>0){var a=r%n._tilingPeriod;_0x3b14e0.z=1+a*n._tilingSpeedU,_0x3b14e0.w=1+a*n._tilingSpeedV}}else if(0!==i._textureUVSpeed.x||0!==i._textureUVSpeed.y){var s=performance.now()/1e3;_0x3b14e0.x=i._textureUVSpeed.x*s,_0x3b14e0.y=i._textureUVSpeed.y*s}a$10.pack(_0x3b14e0,e,t),this.useLineColor?e$1z.pack(i.style3D.lineColor,e,t+4):e$1z.pack(i.style3D.fillForeColor,e,t+4)},r}(t$k),_0xe6dbf2=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i){e.apply(this,arguments),this.layer=i,this._isDynamic=!1,this._name="WaterParameter",this._sizeInByte=64}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.writeToFloat32Array=function(e,t){r$T.pack(this.layer._waterParamter.bumpSpeed,e,t),t+=2,e[t++]=this.layer._waterParamter.scale,e[t++]=this.layer._waterParamter.fresnelPower,e[t++]=this.layer._waterParamter.minFresnel,e[t++]=this.layer._waterParamter.maxFresnel,e[t++]=this.layer._waterParamter.noiseScale,e[t++]=this.layer._waterParamter.waterBrightness,a$10.pack(this.layer._waterParamter.tintColour,e,t),t+=4,a$10.pack(this.layer._waterParamter.waterColour,e,t),t+=4},r}(t$k);_0x35487f.createCommonLayerUniformBuffer=function(e){if(!e._context.webgl2)return null;var t=new _0x276d51(e);return new r$j(e._context,t)},_0x35487f.createMaterialUniformBuffer=function(e,t){if(!e._context.webgl2)return null;var i=new _0x142137(t);return new r$j(e._context,i)},_0x35487f.createMaterialDynamicUniformBuffer=function(e,t,i){if(!t._context.webgl2)return null;var n=new _0x4c73c3(e,t,i);return new r$j(t._context,n)},_0x35487f.createLightSourceUniformBuffer=function(e,t){return e.webgl2?new r$j(e,new _0x2cacf3(e,t)):null},_0x35487f.createWaterUniformBuffer=function(e,t){return e.webgl2?new r$j(e,new _0xe6dbf2(e,t)):null};var _0x5c8c3d=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x262927=_0x5c8c3d(void 0,(function(){return _0x262927.toString().search("(((.+)+)+)+$").toString().constructor(_0x262927).search("(((.+)+)+)+$")}));_0x262927();var _0x2f4415="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nuniform float uTransparentFilter;\n\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying vec4 vPositionMC;\n#ifdef DepthEXT\nvarying float vWindowZ;\n#endif\n\nvoid main()\n{\n#ifdef GL_EXT_frag_depth\n #ifdef DepthEXT\n\t gl_FragDepthEXT = min(vWindowZ * gl_FragCoord.w, 1.0);\n #endif\n#endif\n#ifdef WEBGL2\n #ifdef DepthEXT\n\t gl_FragDepthEXT = min(vWindowZ * gl_FragCoord.w, 1.0);\n #endif\n#endif\n\tif(vColor.a < uTransparentFilter)\n\t{\n\t\tdiscard;\n\t}\n#ifdef CLIP\n\tgl_FragColor *= czm_clip(czm_modelView * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n gl_FragColor = vSecondColor;\n}",_0x403f8a=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x4b41f2=_0x403f8a(void 0,(function(){return _0x4b41f2.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b41f2).search("(((.+)+)+)+$")}));_0x4b41f2();var _0x1a40d2="uniform float uTransparentFilter; \nvarying vec4 vSecondColor; \nvarying vec4 vColor;\nvoid main() \n{\n\tif(vColor.a < uTransparentFilter)\n\t{\n\t\tdiscard;\n\t}\n gl_FragColor = vSecondColor; \n}",_0x21b5a8=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x56fc83=_0x21b5a8(void 0,(function(){return _0x56fc83.toString().search("(((.+)+)+)+$").toString().constructor(_0x56fc83).search("(((.+)+)+)+$")}));_0x56fc83();var _0x31ab53="precision highp float;\nconst float uPixelRatio = 1.0;\n// Inputs\nattribute vec3 aPosition0;\nattribute vec3 aPosition1;\nattribute float batchId;\n// attribute float aVariantOffset;\nattribute float aVariantStroke;\nattribute float aVariantExtension;\n\n#ifdef SILHOUETTE\nattribute vec3 aNormalA;\nattribute vec3 aNormalB;\n#else /* SILHOUETTE */\nattribute vec3 aNormal;\n#endif /* SILHOUETTE */\n\nattribute vec2 aSideness;\n//attribute vec2 aPackedAttributes;\n\nstruct UnpackedAttributes\n{\n vec2 sideness;\n vec2 sidenessNorm;\n float lineWidthPixels;\n float extensionLengthPixels;\n#if (MODE == 2)\n float type;\n#endif\n};\n\n// Output required to compute color\nvarying vec4 vColor;\n// Output required to compute distance to line/caps\nvarying vec3 vPosition; \nvarying vec3 vViewPosition;\nvarying float vRadius;\nvarying float vLineLengthPixels;\nvarying float vSizeFalloffFactor;\nvarying float vDistanceFromEye;\n\nvarying vec2 vStrokeUV;\nuniform vec2 uStrokesTextureScale;\nuniform float uStrokesLog2Resolution;\n\nuniform float uLineWidth;\nuniform vec4 uLineColor;\nuniform vec3 uTranslation;\nconst vec2 uDepthBias = vec2(0.5, -4e-4);\n\n// Utility function to check for NaN values\nbool isNaN(float val)\n{\n return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;\n // important: some nVidias failed to cope with version below.\n // Probably wrong optimization.\n /*return ( val <= 0.0 || 0.0 <= val ) ? false : true;*/\n}\n\nvec2 calculateProjectedBiasXY(vec4 projPos, vec3 worldNormal)\n{\n float offsetXY = uDepthBias.x;\n float offsetZ = uDepthBias.y;\n vec4 projNormal = czm_projection * czm_view * vec4(worldNormal, 0.0);\n return offsetXY * projPos.w * 2.0 / czm_viewport.zw * normalize(projNormal.xyz).xy;\n}\n\n// A z-offset, using a depth based heuristic.\nfloat calculateProjectedBiasZ(vec4 projPos)\n{\n float fProjZ = projPos.z / projPos.w;\n if(fProjZ < 0.1)\n {\n return 0.0;\n }\n float offsetZ = uDepthBias.y;\n return sqrt(projPos.z) * offsetZ;\n}\n\nvec4 adjustProjectedPosition(vec4 projPos, vec3 worldNormal, float lineWidth)\n{\n vec2 offsetXY = calculateProjectedBiasXY(projPos, worldNormal);\n // we currently have to do this check because some geometries come with 0 length edge normals.\n if (!isNaN(offsetXY.x) && !isNaN(offsetXY.y))\n {\n projPos.xy += offsetXY;\n }\n#ifdef LOG_DEPTH\n vDistanceFromEye = projPos.w;\n#else\n projPos.z += calculateProjectedBiasZ(projPos);\n#endif\n return projPos;\n}\n\n#if (MODE == 0)\nvoid calculateStyleOutputs(UnpackedAttributes unpackedAttributes)\n{}\n#elif (MODE == 1)\nfloat strokeVariants = 6.0;\nvoid calculateStyleOutputsSketch(float lineLength, UnpackedAttributes unpackedAttributes) {\n vec2 sidenessNorm = unpackedAttributes.sidenessNorm;\n float lineIndex = clamp(ceil(log2(lineLength)), 0.0, uStrokesLog2Resolution);\n vStrokeUV = vec2(exp2(lineIndex) * sidenessNorm.y, lineIndex * strokeVariants + aVariantStroke + 0.5) * uStrokesTextureScale;\n}\nvoid calculateStyleOutputs(UnpackedAttributes unpackedAttributes)\n{\n calculateStyleOutputsSketch(vLineLengthPixels, unpackedAttributes);\n}\n#elif (MODE == 2)\nvarying float vType;\nvoid calculateStyleOutputs(vec4 viewPosV0, vec4 viewPosV1, vec4 worldPosV0, vec4 worldPosV1, vec4 projPos, vec3 worldNormal, UnpackedAttributes unpackedAttributes)\n{\n vType = unpackedAttributes.type;\n if (unpackedAttributes.type <= 0.0)\n {\n calculateStyleOutputsSketch(vLineLengthPixels, unpackedAttributes);\n }\n}\n#endif\n\n\n// Solid\n#if (MODE == 2 || MODE == 0)\nfloat calculateLineAmplitudeSolid()\n{\n return 0.0;\n}\n#endif\n#if (MODE == 0)\nfloat calculateLineAmplitude(UnpackedAttributes unpackedAttributes)\n{\n return calculateLineAmplitudeSolid();\n}\n#endif\n// Sketch\n#if (MODE == 2 || MODE == 1)\nfloat calculateLineAmplitudeSketch()\n{\n float strokesAmplitude = 6.0;\n return strokesAmplitude;\n}\n#endif\n#if (MODE == 1)\nfloat calculateLineAmplitude(UnpackedAttributes unpackedAttributes)\n{\n return calculateLineAmplitudeSketch();\n}\n#endif\n// Uber\n#if (MODE == 2)\nfloat calculateLineAmplitude(UnpackedAttributes unpackedAttributes)\n{\n float type = unpackedAttributes.type;\n if (type <= 0.0)\n {\n return calculateLineAmplitudeSketch();\n }\n else\n {\n return calculateLineAmplitudeSolid();\n }\n}\n#endif\n\n\nuniform float uDistanceFalloffFactor;\nfloat distanceBasedPerspectiveFactor(float distance)\n{\n return clamp(sqrt(uDistanceFalloffFactor / distance), 0.0, 1.0);\n}\n\n#define COMPONENT_COLOR_FIELD_OFFSET 0.0\n#define COMPONENT_OTHER_FIELDS_OFFSET 1.0\n#define COMPONENT_FIELD_COUNT 2.0\n#define LINE_WIDTH_FRACTION_FACTOR 8.0\n#define EXTENSION_LENGTH_OFFSET 128.0\n#define COMPONENT_TEX_WIDTH 4096.0\n\nstruct ComponentData\n{\n float lineWidth;\n float extensionLength;\n float type;\n};\n\n\nComponentData readComponentData()\n{\n return ComponentData(uLineWidth, 0.0, 0.0);\n}\n\nvec3 modelToWorldNormal(vec3 normal)\n{\n return (czm_model * vec4(normal, 0.0)).xyz;\n}\n\nvec3 silhouetteWorldNormal(vec3 normalA, vec3 normalB)\n{\n return modelToWorldNormal(normalize(normalA + normalB));\n}\n\n// Fall-off extension length for shorter strokes, starting from strokes that are 256 size,\n// fall-off exponentially\nfloat calculateExtensionLength(float extensionLength, float lineLength)\n{\n return extensionLength / (log2(max(1.0, 256.0 / lineLength)) * 0.2 + 1.0);\n}\n\n#ifdef SILHOUETTE\n// #uniforms: czm_view, czm_model\nbool isSilhouetteEdge(vec4 viewPos, vec3 normalA, vec3 normalB)\n{\n// transform the two face normals\n vec3 viewNormalA = (czm_view * czm_model * vec4(normalA, 0.0)).xyz;\n vec3 viewNormalB = (czm_view * czm_model * vec4(normalB, 0.0)).xyz;\n// compute the direction from the edge to the camera\n vec3 viewDir = -viewPos.xyz;\n// check which of the two faces are visible\n// display the edge if exactly one of the two is visible\n float faceAVisible = dot(viewDir, viewNormalA);\n// positive if visible\n float faceBVisible = dot(viewDir, viewNormalB);\n// positive if visible\n// 1 if exactly one face visible, 0 otherwise\n return faceAVisible * faceBVisible < 0.0;\n}\n#endif /* SILHOUETTE */\n\nvoid clipLineSegmentToNearPlane(vec3 p0,vec3 p1,out bool clipped,out bool culledByNearPlane,out vec4 clippedPositionEC)\n{\n culledByNearPlane = false;\n clipped = false;\n vec3 p0ToP1 = p1 - p0;\n float magnitude = length(p0ToP1);\n vec3 direction = normalize(p0ToP1);\n float endPoint0Distance = czm_currentFrustum.x + p0.z;\n float denominator = -direction.z;\n if (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)\n {\n culledByNearPlane = true;\n }\n else if (endPoint0Distance > 0.0)\n {\n float t = endPoint0Distance / denominator;\n if (t < 0.0 || t > magnitude)\n {\n culledByNearPlane = true;\n }\n else\n {\n p0 = p0 + t * direction;\n p0.z = min(p0.z, -czm_currentFrustum.x);\n clipped = true;\n }\n }\n clippedPositionEC = vec4(p0, 1.0);\n}\n\nvec4 calculateGeometricOutputs(vec4 viewPosV0, vec4 viewPosV1, vec4 worldPosV0, vec4 worldPosV1, vec3 worldNormal, UnpackedAttributes unpackedAttributes)\n{\n vec2 sideness = unpackedAttributes.sideness;\n vec2 sidenessNorm = unpackedAttributes.sidenessNorm;\n vec4 clippedViewPosV0; bool clippedV0,culledV0; clipLineSegmentToNearPlane(viewPosV0.xyz, viewPosV1.xyz, clippedV0, culledV0, clippedViewPosV0); vec4 clippedViewPosV1; bool clippedV1, culledV1; clipLineSegmentToNearPlane(viewPosV1.xyz, viewPosV0.xyz, clippedV1, culledV1, clippedViewPosV1); vec4 viewPos = mix(clippedViewPosV0, clippedViewPosV1, sidenessNorm.y);\n vViewPosition = viewPos.xyz / viewPos.w;\n vec4 projPosV0 = czm_projection * clippedViewPosV0;\n vec4 projPosV1 = czm_projection * clippedViewPosV1;\n vec4 projPos = czm_projection * viewPos;\n vec3 screenSpaceLineNDC = (projPosV1.xyz / projPosV1.w - projPosV0.xyz / projPosV0.w);\n vec2 uNDCToPixel = vec2(czm_viewport.z / 2.0, czm_viewport.w / 2.0);\n vec2 screenSpaceLinePixels = screenSpaceLineNDC.xy * uNDCToPixel;\n float lineLengthPixels = length(screenSpaceLinePixels);\n float dzPerPixel = screenSpaceLineNDC.z / lineLengthPixels;\n vec2 screenSpaceDirection = screenSpaceLinePixels / lineLengthPixels;\n vec2 perpendicularScreenSpaceDirection = vec2(screenSpaceDirection.y, -screenSpaceDirection.x) * sideness.x;\n float falloffFactor = distanceBasedPerspectiveFactor(-viewPos.z) * uPixelRatio;\n float lineWidthPixels = unpackedAttributes.lineWidthPixels * falloffFactor;\n float extensionLengthPixels = calculateExtensionLength(unpackedAttributes.extensionLengthPixels, lineLengthPixels) * falloffFactor;\n float lineAmplitudePixels = calculateLineAmplitude(unpackedAttributes) * uPixelRatio;\n vSizeFalloffFactor = falloffFactor;\n float lineWidthAndAmplitudePixels = lineWidthPixels + lineAmplitudePixels + lineAmplitudePixels;\n float extendedLineLengthPixels = lineLengthPixels + extensionLengthPixels + extensionLengthPixels;\n#ifdef ANTIALIASING\n const float aaPaddingPixels = 1.0;\n // Line size with padding\n float halfAAPaddedLineWidthAndAmplitudePixels = lineWidthAndAmplitudePixels * 0.5 + aaPaddingPixels;\n float aaPaddedRoundedCapSizePixels = lineWidthPixels * 0.5 + aaPaddingPixels;\n // Line length with padding\n float aaPaddedLineLengthPixels = extendedLineLengthPixels + aaPaddingPixels + aaPaddingPixels;\n float halfAAPaddedLineLengthPixels = aaPaddedLineLengthPixels * 0.5;\n#else /* ANTIALIASING */\n // Even if there is no AA, we still want to do proper <1px rendering,\n // so we effectively clamp the pixel sizes to minimum of 1px and compute\n // coverage in the fragment shader \n float halfAAPaddedLineWidthAndAmplitudePixels = max(lineWidthAndAmplitudePixels, 1.0) * 0.5;\n float aaPaddedRoundedCapSizePixels = max(lineWidthPixels, 1.0) * 0.5;\n float halfAAPaddedLineLengthPixels = max(extendedLineLengthPixels, 1.0) * 0.5;\n#endif /* ANTIALIASING */\n // Half line width in NDC including padding for anti aliasing\n vec2 uPixelToNDC = vec2(2.0 / czm_viewport.z, 2.0 / czm_viewport.w);\n vec2 halfAAPaddedLineWidthAndAmplitudeNDC = halfAAPaddedLineWidthAndAmplitudePixels * uPixelToNDC;\n vec2 aaPaddedRoundedCapSizeNDC = aaPaddedRoundedCapSizePixels * uPixelToNDC;\n vec2 extensionLengthNDC = extensionLengthPixels * uPixelToNDC;\n // Compute screen space position of vertex, offsetting for line size and end caps\n vec2 ndcOffset = (screenSpaceDirection * sideness.y * (aaPaddedRoundedCapSizeNDC + extensionLengthNDC) + perpendicularScreenSpaceDirection * halfAAPaddedLineWidthAndAmplitudeNDC);\n projPos.xy += ndcOffset * projPos.w;\n projPos.z += (dzPerPixel * (aaPaddedRoundedCapSizePixels + extensionLengthPixels)) * sideness.y * projPos.w;\n projPos = adjustProjectedPosition(projPos, worldNormal, 1.0 + max((lineWidthAndAmplitudePixels - 1.0) * 0.5, 0.0));\n // Line length with end caps\n float aaPaddedLineWithCapsLengthPixels = extendedLineLengthPixels + aaPaddedRoundedCapSizePixels + aaPaddedRoundedCapSizePixels;\n float pixelPositionAlongLine = aaPaddedLineWithCapsLengthPixels * sidenessNorm.y - aaPaddedRoundedCapSizePixels;\n // Position in pixels with origin at first vertex of line segment\n // The line width radius in pixels\n vRadius = lineWidthPixels * 0.5;\n vLineLengthPixels = extendedLineLengthPixels;\n vPosition = czm_writeNonPerspective(vec3(halfAAPaddedLineWidthAndAmplitudePixels * sideness.x, pixelPositionAlongLine, pixelPositionAlongLine / extendedLineLengthPixels), projPos.w);\n#ifdef SILHOUETTE\n gl_Position = isSilhouetteEdge(viewPosV0, aNormalA, aNormalB) ? projPos : vec4(10.0, 10.0, 10.0, 1.0);\n#else /* SILHOUETTE */\n gl_Position = projPos;\n#endif /* SILHOUETTE */\n\n#if (MODE == 2)\n if (unpackedAttributes.type <= 0.0 && lineLengthPixels <= 3.0)\n {\n gl_Position = vec4(10.0, 10.0, 10.0, 1.0);\n }\n#elif (MODE == 1)\n if (lineLengthPixels <= 3.0)\n {\n gl_Position = vec4(10.0, 10.0, 10.0, 1.0); \n }\n#endif\n return projPos;\n}\n\n\n#if (MODE == 2)\nUnpackedAttributes unpackAttributes(ComponentData component)\n{\n vec2 sidenessNorm = aSideness;\n vec2 sideness = sidenessNorm * 2.0 - 1.0;\n float fType = component.type;\n float extensionLengthPixels = component.extensionLength;\n float lineWidth = component.lineWidth;\n if (fType <= 0.0)\n {\n extensionLengthPixels *= aVariantExtension * 2.0 - 1.0;\n }\n return UnpackedAttributes(sideness, sidenessNorm, lineWidth, extensionLengthPixels, fType);\n}\n#else /* (MODE == 2) */\nUnpackedAttributes unpackAttributes(ComponentData component)\n{\n vec2 sidenessNorm = aSideness;\n vec2 sideness = sidenessNorm * 2.0 - 1.0;\n float extensionLengthPixels = component.extensionLength;\n#if (MODE == 1)\n // extensionLengthPixels = 0.05 * aVariantExtension * 2.0 - 1.0;\n extensionLengthPixels = 5.0;\n#endif\n float lineWidth = component.lineWidth;\n return UnpackedAttributes(sideness, sidenessNorm, lineWidth, extensionLengthPixels);\n}\n#endif /* (MODE == 2) */\n\nvarying float fSelected;\n#ifdef BatchTable\nuniform sampler2D batchTexture; \nuniform vec4 batchTextureStep;\nvec2 computeSt(float batchId)\n{\n float stepX = batchTextureStep.x;\n float centerX = batchTextureStep.y;\n float numberOfAttributes = float(5);\n return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5);\n}\nvec4 czm_batchTable_operation(float batchId)\n{\n vec2 st = computeSt(batchId);\n st.x += batchTextureStep.x * float(1);\n vec4 textureValue = texture2D(batchTexture, st);\n vec4 value = textureValue;\n return value;\n}\nvec3 czm_batchTable_translate(float batchId) \n{\n vec2 st = computeSt(batchId); \n st.x += batchTextureStep.x * float(3); \n vec4 textureValue = texture2D(batchTexture, st); \n vec3 value = textureValue.xyz; \n return value; \n} \n#endif\n#ifdef EXCAVATION\n varying vec4 vExcavationVertexPos;\n uniform mat4 uGeoMatrix;\n#endif\nvoid s3mBatchOperation(vec4 operationType, inout vec4 vertexColor, inout vec4 vertexPos_0, inout vec4 vertexPos_1, vec3 translation,inout float fSelected)\n{\n operationType.x += 0.001;\n float right_2 = operationType.x * 0.5;\n float right_4 = right_2 * 0.5;\n float right_8 = right_4 * 0.5;\n float right_16 = right_8 * 0.5;\n float isSetColor = fract(right_2);\n if(isSetColor > 0.1)\n {\n fSelected = 1.0;\n }\n float isPicked = fract(floor(right_2)* 0.5);\n if(isPicked > 0.1)\n {\n fSelected = 1.0;\n }\n float isHide = fract(floor(right_4)* 0.5);\n if(isHide > 0.1)\n {\n vertexColor.a = 0.0;\n }\n float isOffset = fract(floor(right_8)* 0.5);\n if(isOffset > 0.1)\n {\n vertexPos_0.xyz += translation;\n vertexPos_1.xyz += translation;\n }\n}\nvoid main()\n{\n fSelected = 0.0;\n ComponentData component = readComponentData();\n UnpackedAttributes unpackedAttributes = unpackAttributes(component);\n vec4 vertexPos0 = vec4(aPosition0, 1.0);\n vec4 vertexPos1 = vec4(aPosition1, 1.0);\n vec3 translate = uTranslation;\n#ifdef BatchTable\n #ifdef Translation\n translate = czm_batchTable_translate(batchId);\n #endif\n vColor = uLineColor;\n vec4 operationType = czm_batchTable_operation(batchId);\n s3mBatchOperation(operationType, vColor, vertexPos0, vertexPos1, translate, fSelected);\n#endif\n vec4 worldPosV0 = czm_model * vertexPos0;\n vec4 worldPosV1 = czm_model * vertexPos1;\n vec4 viewPosV0 = czm_modelView * vertexPos0;\n vec4 viewPosV1 = czm_modelView * vertexPos1;\n#ifdef SILHOUETTE\n vec3 worldNormal = silhouetteWorldNormal(aNormalA, aNormalB);\n#else /* SILHOUETTE */\n vec3 worldNormal = modelToWorldNormal(aNormal);\n#endif /* SILHOUETTE */\n // General geometric computation for all types of edges\n vec4 projPos = calculateGeometricOutputs(viewPosV0, viewPosV1, worldPosV0, worldPosV1, worldNormal, unpackedAttributes);\n calculateStyleOutputs(unpackedAttributes);\n#ifdef EXCAVATION\n vec3 vertexPos = mix(aPosition0.xyz, aPosition1.xyz, aSideness.y);\n vExcavationVertexPos = uGeoMatrix * vec4(vertexPos.xyz, 1.0);\n#endif\n}",_0x503dc2=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2f994f=_0x503dc2(void 0,(function(){return _0x2f994f.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f994f).search("(((.+)+)+)+$")}));_0x2f994f();var _0x4d1076="precision highp float;\n\nvarying vec4 vColor;\nvarying float vRadius;\nvarying vec3 vPosition;\nvarying vec3 vViewPosition;\nvarying float vLineLengthPixels;\nvarying float vSizeFalloffFactor;\nvarying float vDistanceFromEye;\nvarying vec2 vStrokeUV;\nuniform sampler2D uStrokesTexture;\nvarying float vVariantExtension;\nvarying float fSelected;\n\n#ifdef APPLY_SWIPE\n uniform vec4 uSwipeRegion;\n#endif\n// At which coverage threshold we discard a fragment completely\n#define COVERAGE_TEST_THRESHOLD 0.01\nconst float nearRange = 1000.0;\nconst float farRange = 20000.0;\n\n// Sketch\n#if (MODE == 1)\nconst vec4 RGBA_2_FLOAT_FACTORS = vec4(\n 255.0 / (256.0),\n 255.0 / (256.0 * 256.0),\n 255.0 / (256.0 * 256.0 * 256.0),\n 255.0 / (256.0 * 256.0 * 256.0 * 256.0)\n);\nfloat rgba2float(vec4 rgba) {\n return dot(rgba, RGBA_2_FLOAT_FACTORS);\n}\nfloat calculateLineOffsetSketch()\n{\n float strokesNormalizationScale = 16.0;\n float offsetNorm = rgba2float(texture2D(uStrokesTexture, vStrokeUV));\n return (offsetNorm - 0.5) * strokesNormalizationScale;\n}\nfloat calculateLineOffset()\n{\n return calculateLineOffsetSketch();\n}\nfloat calculateLinePressureSketch() {\n return rgba2float(texture2D(uStrokesTexture, vStrokeUV + vec2(0.0, 0.5)));\n}\nfloat calculateLinePressure()\n{\n return calculateLinePressureSketch();\n}\n#endif\n\n// Solid\n#if (MODE == 2 || MODE == 0)\nfloat calculateLineOffsetSolid()\n{\n return 0.0;\n}\nfloat calculateLinePressureSolid()\n{\n return 1.0;\n}\n#endif\n\n#if (MODE == 0)\nfloat calculateLineOffset()\n{\n return calculateLineOffsetSolid();\n}\nfloat calculateLinePressure()\n{\n return calculateLinePressureSolid();\n}\n#endif\n\n// Uber\n#if (MODE == 2)\nvarying float vType;\nfloat calculateLineOffset()\n{\n if (vType <= 0.0)\n {\n return calculateLineOffsetSketch();\n }\n else\n {\n return calculateLineOffsetSolid();\n }\n}\n\nfloat calculateLinePressure()\n{\n if (vType <= 0.0)\n {\n return calculateLinePressureSketch();\n }\n else\n {\n return calculateLinePressureSolid();\n }\n}\n#endif\n\nvec2 lineWithCapsDistance(float radius, vec2 position, float lineLength)\n{\n float lineOffset = calculateLineOffset();\n float positionX = position.x - lineOffset;\n if (radius < 1.0)\n {\n float coverageX = clamp(min(radius, positionX + 0.5) - max(-radius, positionX - 0.5), 0.0, 1.0);\n float coverageY = clamp(min(lineLength, position.y + 0.5) - max(0.0, position.y - 0.5), 0.0, 1.0);\n float coverage = min(coverageX, coverageY);\n return vec2(0.5 - coverage, 0.0);\n }\n else\n {\n // Between -radius -> 0 for start cap, 0 for line, 0 -> radius\n float positionOnCap = position.y - clamp(position.y, 0.0, lineLength);\n vec2 lineToPosition = vec2(positionX, positionOnCap);\n return vec2(length(lineToPosition) - radius, positionOnCap / radius);\n }\n}\n\nvoid main()\n{\n#ifdef EXCAVATION\n if(czm_executeExcavation())\n {\n discard;\n }\n#endif\n vec3 realPosition = czm_readNonPerspective(vPosition, gl_FragCoord.w);\n float radius = vRadius * calculateLinePressure();\n vec2 distance = lineWithCapsDistance(radius, realPosition.xy, vLineLengthPixels);\n float coverage = clamp(0.5 - distance.x, 0.0, 1.0);\n#ifdef ANTIALIASING\n const float coverageLimit = COVERAGE_TEST_THRESHOLD;\n#else\n /* ANTIALIASING */\n // Use subpixel coverage computation when lines get subpixel widths\n // so we still render them appropriately. Otherwise discard anything\n // that is not fully within the line\n float coverageLimit = radius <= 0.5 ? COVERAGE_TEST_THRESHOLD : 0.75;\n#endif /* ANTIALIASING */\n if (coverage < coverageLimit || vColor.a < 0.1)\n {\n discard;\n }\n#ifdef WIREFRAME_SELECT_TYPE\n if(fSelected < 0.1)\n {\n discard;\n }\n#endif\n float alpha = vColor.a * coverage;\n gl_FragColor = vec4(vColor.rgb, alpha);\n#ifdef CLIP\n gl_FragColor *= czm_clip(vec4(vViewPosition, 1.0), 1.0);\n#endif\n#ifdef APPLY_SWIPE\n czm_RollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\n float attenuation = 1.0 - smoothstep(nearRange, farRange, vDistanceFromEye);\n gl_FragColor.a *= attenuation;\n czm_writeLogDepth();\n}",_0x1c03ff=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1ad019=_0x1c03ff(void 0,(function(){return _0x1ad019.toString().search("(((.+)+)+)+$").toString().constructor(_0x1ad019).search("(((.+)+)+)+$")}));function _0x42161c(e){this._ambientColor=new e$1z(1,1,1,1),this._diffuseColor=new e$1z(1,1,1,1),this._specularColor=new e$1z(0,0,0,0),this._shininess=50,this._bTransparentSorting=!1,this._textures=[],this._texMatrix=new c$1a,this._usePBR=!1,this._isInvalidOblique=!1,this._usePBRTextureBatch=!1,this._alphaMode=void 0,this._isKTK2=!1,this._RGBTOBGR=!1,t$$(e)&&(t$$(e.ambient)&&(this._ambientColor=a$10.clone(e.ambient)),t$$(e.diffuse)&&(this._diffuseColor=a$10.clone(e.diffuse)),t$$(e.specular)&&(this._specularColor=a$10.clone(e.specular)),this._shininess=e.shininess||50,this._bTransparentSorting=e.bTransparentSorting||!1,this._textures=e.textures||[]),this._mapTextures={}}_0x1ad019(),Object.defineProperties(_0x42161c.prototype,{hasTexture:{get:function(){return this._textures.length>0||(t$$(this.baseColorTexture)||t$$(this.normalTexture)||t$$(this.emissiveTexture)||t$$(this.metallicRoughnessTexture)||t$$(this.occlusionTexture)||t$$(this.pbrParamTexture))}}}),_0x42161c.prototype.clone=function(e){for(var t in t$$(e)||(e=new _0x42161c({})),e._ambientColor=e$1z.clone(this._ambientColor),e._diffuseColor=e$1z.clone(this._diffuseColor),e._specularColor=e$1z.clone(this._specularColor),e._bTransparentSorting=this._bTransparentSorting,e._shininess=this._shininess,e._texMatrix=c$1a.clone(this._texMatrix),e._usePBR=this._usePBR,e._alphaMode=this._alphaMode,e._isInvalidOblique=this._isInvalidOblique,e._isKTK2=this._isKTK2,e._RGBTOBGR=this._RGBTOBGR,this._usePBR&&(e._alphaCutoff=this._alphaCutoff,e._baseColor=e$1z.clone(this._baseColor),e._baseColorTextureIndex=this._baseColorTextureIndex,e._baseColorTextureCoordIndex=this._baseColorTextureCoordIndex,e._doubleSided=this._doubleSided,e._emissiveFactor=e$1z.clone(this._emissiveFactor),e._emissiveTextureIndex=this._emissiveTextureIndex,e._emissiveTextureCoordIndex=this._emissiveTextureCoordIndex,e._roughnessFactor=this._roughnessFactor,e._metallicFactor=this._metallicFactor,e._metallicRoughnessTextureIndex=this._metallicRoughnessTextureIndex,e._metallicRoughnessTextureCoordIndex=this._metallicRoughnessTextureCoordIndex,e._normalTextureIndex=this._normalTextureIndex,e._normalTextureCoordIndex=this._normalTextureCoordIndex,e._normalTextureScale=this._normalTextureScale,e._occlusionTextureIndex=this._occlusionTextureIndex,e._occlusionTextureCoordIndex=this._occlusionTextureCoordIndex,e._occlusionTextureStrength=this._occlusionTextureStrength,e._baseColorTextureMotion=new _0x57e68c,e._baseColorTextureMotion.clone(this._baseColorTextureMotion),e._emissiveTextureMotion=new _0x57e68c,e._emissiveTextureMotion.clone(this._emissiveTextureMotion),e._usePBRTextureBatch=this._usePBRTextureBatch,e.baseColorTexture=this.baseColorTexture,e.normalTexture=this.normalTexture,e.emissiveTexture=this.emissiveTexture,e.metallicRoughnessTexture=this.metallicRoughnessTexture,e.occlusionTexture=this.occlusionTexture,e.pbrParamTexture=this.pbrParamTexture),this._textures){!t$$(i=this._textures[t])||(this._isKTK2?i._context._textureCache.getTexture(i.keyword):De$e.AddRef(i.id),e._textures[t]=this._textures[t])}for(var t in this._mapTextures){var i;!t$$(i=this._mapTextures[t])||(De$e.AddRef(i.id),e._mapTextures[t]=this._mapTextures[t])}},_0x42161c.prototype.requestSharedTexture=function(e,t,i,n,r,o,a,s){var l=De$e._shareTexturePromiseCache[e];t$$(l)||(l=u$S(e,o),De$e._shareTexturePromiseCache[e]=l);var u=this;return c$18(l,(function(i){var o,l,c=new Uint32Array(i,0,6),h=c[0],d=c[1],f=c[2],p=c[3],_=c[4],m=c[5],$=new Uint8Array(i,24,m);try{var g=lt$f.inflate($).buffer;l=new Uint8Array(g,0,_)}catch{m===_&&(l=$)}o=De$e.CreateTexture(t,n,d,f,p,h,l,!1,a,s);var y=u._baseColorTextureIndex===r,v=u._emissiveTextureIndex===r,x=u._normalTextureIndex===r,b=u._metallicRoughnessTextureIndex===r,S=u._occlusionTextureIndex===r;y?u.baseColorTexture=o:v?u.emissiveTexture=o:x?u.normalTexture=o:b?u.metallicRoughnessTexture=o:S&&(u.occlusionTexture=o),0===r&&u._textures.length>0?u._textures.splice(0,0,o):u._textures.push(o),delete De$e._shareTexturePromiseCache[e]})),l},_0x42161c.prototype.createWebp=function(e,t,i,n,r,o,a,s,l,u,c){var h=De$e.textureManager.textures[e];if(c=e$1Y(c,!0),t$$(h))return this._textures.push(h),De$e.textureManager.refCounts[e]++,h;for(var d=r.length,f=r.byteOffset,p=new DataView(r.buffer),_=0,m=[];_<d;){var $=p.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT,_+=Uint32Array.BYTES_PER_ELEMENT;var g=r.subarray(_,_+$);f+=$,_+=$;var y=b$14({uint8Array:g,format:"image/webp"});m.push(y)}var v=this;return c$18.all(m,(function(t){var r=t[0];if(t$$(r)){var o=!0;(!n$1d.isPowerOfTwo(r.width)||!n$1d.isPowerOfTwo(r.height))&&(s=j$13.CLAMP_TO_EDGE,l=j$13.CLAMP_TO_EDGE,o=!1),o=o&&c;var a=new P$S({context:i,source:r,pixelFormat:Z$_.RGBA,flipY:!1,sampler:new a$Q({wrapS:s,wrapT:l,minificationFilter:0!==t.length&&o?tt$l.LINEAR_MIPMAP_LINEAR:tt$l.LINEAR,magnificationFilter:et$k.LINEAR})});a.id=e,De$e.textureManager.textures[e]=a,De$e.textureManager.refCounts[e]=1,0===n&&v._textures.length>0?v._textures.splice(0,0,a):v._textures.push(a)}var u=i._gl;if(t.length>1&&c){u.activeTexture(u.TEXTURE0),u.bindTexture(u.TEXTURE_2D,a._texture);for(var h=1,d=t.length;h<d;h++){var f=t[h];u.texImage2D(u.TEXTURE_2D,h,u.RGBA,u.RGBA,u.UNSIGNED_BYTE,f)}u.bindTexture(u.TEXTURE_2D,null)}})).otherwise((function(e){console.error(e)}))},_0x42161c.prototype.createJPGPNG=function(e,t,i,n,r,o,a){var s=De$e.textureManager.textures[e];if(t$$(s))return this._textures.push(s),De$e.textureManager.refCounts[e]++,s;var l=[],u="image/jpeg";"png"===a&&(u="image/png");var c=b$14({uint8Array:n,format:u});l.push(c);var h=this,d=c$18.defer();return c$18.all(l,(function(n){var a=n[0];if(t$$(a)){(!n$1d.isPowerOfTwo(a.width)||!n$1d.isPowerOfTwo(a.height))&&(r=j$13.CLAMP_TO_EDGE,o=j$13.CLAMP_TO_EDGE);var s=new P$S({context:t,source:a,pixelFormat:Z$_.RGBA,flipY:!0,sampler:new a$Q({wrapS:r,wrapT:o,minificationFilter:(n.length,tt$l.LINEAR),magnificationFilter:et$k.LINEAR})});s.id=e,De$e.textureManager.textures[e]=s,De$e.textureManager.refCounts[e]=1,oo$1._memTextureAdded(s._sizeInBytes),0===i&&h._textures.length>0?h._textures.splice(0,0,s):h._textures.push(s),d.resolve(s)}})).otherwise((function(e){console.error(e)})),d.promise},_0x42161c.prototype.createPBRParamter=function(e){if(t$$(e.pbrMetallicRoughness)){var t=e.pbrMetallicRoughness;this._usePBR=!0,this._alphaCutoff=e$1Y(t.alphaCutoff,e.alphaCutoff),this._alphaMode=e$1Y(t.alphaMode,e.alphaMode),this._baseColor=new e$1z(t.baseColor.x,t.baseColor.y,t.baseColor.z,t.baseColor.w),this._baseColorTextureIndex=t.baseColorTextureIndex,this._baseColorTextureCoordIndex=t.baseColorTextureCoordIndex,this._doubleSided=t.doubleSided,this._emissiveFactor=new e$1z(t.emissiveFactor.x,t.emissiveFactor.y,t.emissiveFactor.z,1),this._emissiveTextureIndex=t.emissiveTextureIndex,this._emissiveTextureCoordIndex=t.emissiveTextureCoordIndex,this._roughnessFactor=t.roughnessFactor,this._metallicFactor=t.metallicFactor,this._metallicRoughnessTextureIndex=t.metallicRoughnessTextureIndex,this._metallicRoughnessTextureCoordIndex=t.metallicRoughnessTextureCoordIndex,this._normalTextureIndex=t.normalTextureIndex,this._normalTextureCoordIndex=t.normalTextureCoordIndex,this._normalTextureScale=t.normalTextureScale,this._occlusionTextureIndex=t.occlusionTextureIndex,this._occlusionTextureCoordIndex=t.occlusionTextureCoordIndex,this._occlusionTextureStrength=t.occlusionTextureStrength,this._baseColorTextureMotion=new _0x57e68c(t.baseColorTextureMotion),this._emissiveTextureMotion=new _0x57e68c(t.emissiveTextureMotion),this.baseColorTexture=t.baseColorTexture,this.normalTexture=t.normalTexture,this.emissiveTexture=t.emissiveTexture,this.metallicRoughnessTexture=t.metallicRoughnessTexture,this.occlusionTexture=t.occlusionTexture}},_0x42161c.prototype.createCRN=function(e,t,i,n,r,o,a,s,l,u){var c;if(l=e$1Y(l,!0),s?c=I$W(r.imageBuffer,!0,!0):_0xb658ed.CRNTaskProcessorReady&&(c=l$S(_0xb658ed.CRNProcessor,r.imageBuffer,!0)),t$$(c)){var h=this;return c.then((function(t){if(!h.isDestroyed()){u=e$1Y(u,{});var s=De$e.CreateTexture(e,i,r.width,r.height,r.nFormat,_0x415d95.enrS3TCDXTN,t.bufferView,!1,o,a,l);u.isEmissiveTex?h.emissiveTexture=s:u.isNormalTexture?h.normalTexture=s:u.isMetallicRoughnessTexture?h.metallicRoughnessTexture=s:u.isBaseColorTexture?h.baseColorTexture=s:0===n&&h._textures.length>0?h._textures.splice(0,0,s):h._textures.push(s)}})),c}},_0x42161c.prototype.createKTX2=function(e,t,i,n,r,o,a,s,l){this._isKTK2=!0;var u=i._textureCache.getTexture(e);if(s=e$1Y(s,!0),t$$(u))return this._textures.push(u),u;var c=i$T(r.imageBuffer,r.id);if(t$$(c)){var h=this;return c.then((function(t){l=e$1Y(l,{});var r=i._textureCache.getTexture(e);if(t$$(r))h._textures.push(r);else{var u,c=0;Array.isArray(t)&&(c=t.length,u=t.slice(1,t.length).map((function(e){return e.bufferView})),t=t[0]);var d=!0;(!n$1d.isPowerOfTwo(t.width)||!n$1d.isPowerOfTwo(t.height))&&(o=j$13.CLAMP_TO_EDGE,a=j$13.CLAMP_TO_EDGE,d=!1),s||(c=0,u=void 0,d=!1);var f=new a$Q({wrapS:o,wrapT:a,minificationFilter:0!==c&&d?tt$l.LINEAR_MIPMAP_LINEAR:tt$l.LINEAR,magnificationFilter:tt$l.LINEAR});(r=t$$(t.internalFormat)?new P$S({context:i,pixelFormat:t.internalFormat,width:t.width,height:t.height,source:{arrayBufferView:t.bufferView,mipLevels:u},sampler:f}):new P$S({context:i,source:t,sampler:f})).keyword=e,l.isEmissiveTex?h.emissiveTexture=r:l.isNormalTexture?h.normalTexture=r:l.isMetallicRoughnessTexture?h.metallicRoughnessTexture=r:l.isBaseColorTexture?h.baseColorTexture=r:0===n&&h._textures.length>0?h._textures.splice(0,0,r):h._textures.push(r),i._textureCache.addTexture(e,r)}})).otherwise((function(e){console.log(e)})),c}},_0x42161c.prototype.createCommonParamter=function(e){var t=e$1Y(e.ambient,e$1z.WHITE);this._ambientColor=new e$1z(t.r,t.g,t.b,t.a);var i=e$1Y(e.diffuse,e$1z.WHITE);this._diffuseColor=new e$1z(i.r,i.g,i.b,i.a);var n=e$1Y(e.specular,e$1z.WHITE);this._specularColor=new e$1z(n.r,n.g,n.b,n.a),this._shininess=e$1Y(e.shininess,10),this._bTransparentSorting=e$1Y(e.transparentsorting,!1)};var _0x58b316=new a$10;function _0x57e68c(e){if(!t$$(e))return this.OffsetPeriod=0,this.OffsetSpeedU=0,this.OffsetSpeedV=0,this.TilingPeriod=0,this.TilingSpeedU=0,void(this.TilingSpeedV=0);this.OffsetPeriod=e.OffsetPeriod,this.OffsetSpeedU=e.OffsetSpeedU,this.OffsetSpeedV=e.OffsetSpeedV,this.TilingPeriod=e.TilingPeriod,this.TilingSpeedU=e.TilingSpeedU,this.TilingSpeedV=e.TilingSpeedV}_0x42161c.prototype.createPBRUniformMap=function(){var e={};if(!this._usePBR)return e;var t=this;e.u_metallicFactor=function(){return t._metallicFactor},e.u_roughnessFactor=function(){return t._roughnessFactor},e.u_emissiveFactor=function(){return t._emissiveFactor},e.u_baseColorFactor=function(){return t._baseColor},e.u_alphaCutoff=function(){return t._alphaCutoff},e.u_baseColorTexture=function(){return t._textures[t._baseColorTextureIndex]},e.u_metallicRoughnessTexture=function(){return t._textures[t._metallicRoughnessTextureIndex]},e.u_normalTexture=function(){return t._textures[t._normalTextureIndex]},e.u_occlusionTexture=function(){return t._textures[t._occlusionTextureIndex]},e.u_emissiveTexture=function(){return t._textures[t._emissiveTextureIndex]};var i=t._emissiveTextureMotion;e.u_emissiveUVOffsetAndTiling=function(){var e=performance.now()/1e3;if(i._offsetPeriod>0){var t=e%i._offsetPeriod;_0x58b316.x=t*i._offsetSpeedU,_0x58b316.y=t*i._offsetSpeedV}else _0x58b316.x=0,_0x58b316.y=0;if(i._tilingPeriod>0){var n=e%i._tilingPeriod;_0x58b316.z=1+n*i._tilingSpeedU,_0x58b316.w=1+n*i._tilingSpeedV}else _0x58b316.z=1,_0x58b316.w=1;return _0x58b316};var n=t._baseColorTextureMotion;return e.u_baseColorUVOffsetAndTiling=function(){var e=performance.now()/1e3;if(n._offsetPeriod>0){var t=e%n._offsetPeriod;_0x58b316.x=t*n._offsetSpeedU,_0x58b316.y=t*n._offsetSpeedV}else _0x58b316.x=0,_0x58b316.y=0;if(n._tilingPeriod>0){var i=e%n._tilingPeriod;_0x58b316.z=1+i*n._tilingSpeedU,_0x58b316.w=1+i*n._tilingSpeedV}else _0x58b316.z=1,_0x58b316.w=1;return _0x58b316},e},_0x42161c.prototype.appendPBRMacroToShader=function(e,t){!this._usePBR||(e.defines.push("USE_PBR"),t.defines.push("USE_PBR"),this._baseColorTextureIndex>=0&&t.defines.push("HAS_BASECOLOR_TEXTURE"),this._normalTextureIndex>=0&&t.defines.push("HAS_NORMAL_TEXTURE"),this._metallicRoughnessTextureIndex>=0&&t.defines.push("HAS_METALLICROUGHNESS_TEXTURE"),this._occlusionTextureIndex>=0&&t.defines.push("HAS_OCCLUSION_TEXTURE"),this._emissiveTextureIndex>=0&&t.defines.push("HAS_EMISSIVE_TEXTURE"),this._doubleSided&&t.defines.push("DOUBLE_SIDED"))},_0x42161c.Default=new _0x42161c,_0x42161c.prototype.isDestroyed=function(){return!1},_0x42161c.prototype.destroy=function(){for(var e in this._ambientColor=null,this._diffuseColor=null,this._specularColor=null,this._textures){t$$(t=this._textures[e])&&(this._isKTK2?t.destroy():De$e.DestroyTexture(t.id))}for(var e in this._mapTextures){var t;t$$(t=this._mapTextures[e])&&De$e.DestroyTexture(t.id)}return s$1e(this)},_0x57e68c.prototype.clone=function(e){this.OffsetPeriod=e.OffsetPeriod,this.OffsetSpeedU=e.OffsetSpeedU,this.OffsetSpeedV=e.OffsetSpeedV,this.TilingPeriod=e.TilingPeriod,this.TilingSpeedU=e.TilingSpeedU,this.TilingSpeedV=e.TilingSpeedV};var _0x660d27=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x4c7fbd=_0x660d27(void 0,(function(){return _0x4c7fbd.toString().search("(((.+)+)+)+$").toString().constructor(_0x4c7fbd).search("(((.+)+)+)+$")}));_0x4c7fbd();var _0x521788={EXCAVATION:"EXCAVATION",FALTTEN:"FALTTEN",OVERLAY:"OVERLAY",HYPSOMETRIC:"HYPSOMETRIC",ADJUST_COLOR:"ADJUST_COLOR",TRANSPARENT_BACK_COLOR:"TRANSPARENT_BACK_COLOR",HORIZONTAL_LINE:"HORIZONTAL_LINE",COMPUTE_W_VALUE:"COMPUTE_W_VALUE",COMPUTE_TEXCOORD:"COMPUTE_TEXCOORD",HAS_LIGHT:"HAS_LIGHT",HAS_NORMAL:"HAS_NORMAL",REPLACE_SELECT_TYPE:"REPLACE_SELECT_TYPE",SILHOUETTE_SELECT_TYPE:"SILHOUETTE_SELECT_TYPE",MULTI_TEX:"MULTI_TEX",APPLY_SPLIT:"APPLY_SPLIT",APPLY_SWIPE:"APPLY_SWIPE",TEXCOORD:"TexCoord",TEXCOORD2:"TexCoord2",COMPRESS_VERTEX:"COMPRESS_VERTEX",COMPRESS_NORMAL:"COMPRESS_NORMAL",COMPRESS_COLOR:"COMPRESS_COLOR",COMPRESS_TEXCOORD:"COMPRESS_TEXCOORD",SKETCH_MODE:"SKETCH_MODE",NORMAL_AND_DEPTH:"NORMAL_AND_DEPTH",POST_EFFECT:"POST_EFFECT",CLIP_FILT_BY_ID:"CLIP_FILT_BY_ID",CLIP:"CLIP",CLIPPLANE:"CLIPPLANE",PBR:"PBR",PT_CLOUD:"PT_CLOUD",DIR_LIGHTS:"DIR_LIGHTS ",POINT_LIGHTS:"POINT_LIGHTS ",SPOT_LIGHTS:"SPOT_LIGHTS ",HEMISPHERE_LIGHTS:"HEMISPHERE_LIGHTS ",W_VISIBLE:"W_VISIBLE",EMISSION_TEXTURE:"EMISSION_TEXTURE",EMISSION_TEXTURE_COUNT:"EMISSION_TEXTURE_COUNT ",TEXTURE_MOVE:"TEXTURE_MOVE",VOLUME:"Volume",VOLUME2:"Volume2",TEXTURE_COORD_ONE_IS_W:"TEXTURE_COORD_ONE_IS_W",TRIANGLE_FILTRATE:"TRIANGLE_FILTRATE",UseInstanceSkeletonMatrix:"UseInstanceSkeletonMatrix",RGBTOBGR:"RGBTOBGR",HAS_SKELETONSELECTED:"HAS_SKELETONSELECTED",SKELETONSELECT_ENABLE:"SKELETONSELECT_ENABLE",REPLACE_COLOR_TYPE:"REPLACE_COLOR_TYPE",INVALID_OBLIQUE:"INVALID_OBLIQUE",IGNORE_NORMAL:"IGNORE_NORMAL",TextureBatch:"TextureBatch",Translation:"Translation",VOL_AND_HYP:"VOL_AND_HYP",VERTEX_CAPTURE:"VERTEX_CAPTURE",SEC_TEX_EMISSION:"SEC_TEX_EMISSION",BRDF:"BRDF",PBR_THEME:"PBR_THEME",IBL:"IBL",POINT:"POINT",HAS_BASE_TEXTURE:"HAS_BASE_TEXTURE",HAS_NORMAL_TEXTURE:"HAS_NORMAL_TEXTURE",HAS_OCCLUSION_TEXTURE:"HAS_OCCLUSION_TEXTURE",HAS_EMISSIVE_TEXTURE:"HAS_EMISSIVE_TEXTURE",REFRACTION:"REFRACTION",HAS_ANISOTROPY:"HAS_ANISOTROPY",HAS_CLEARCOAT:"HAS_CLEARCOAT",HAS_VOLUME:"HAS_VOLUME",HAS_TRANSMISSION:"HAS_TRANSMISSION",USE_BatchPBR:"USE_BatchPBR",HAS_DIR_LIGHTS:"HAS_DIR_LIGHTS",HAS_POINT_LIGHTS:"HAS_POINT_LIGHTS",HAS_SPOT_LIGHTS:"HAS_SPOT_LIGHTS",HAS_HEMISPHERE_LIGHTS:"HAS_HEMISPHERE_LIGHTS",NO_TEXCOORD:"NO_TEXCOORD",FLOOD_ANALYSIS:"FLOOD_ANALYSIS",HAS_RAIN:"HAS_RAIN",HAS_WETNESS:"HAS_WETNESS",HAS_SNOW:"HAS_SNOW",HAS_MetallicRoughness_TEXTURE:"HAS_MetallicRoughness_TEXTURE",FusionMode:"FusionMode",VISIBLEDISTANCEMAX:"VISIBLEDISTANCEMAX",MASK:"MASK",LineVector:"LineVector",KtxEnvMap:"KtxEnvMap",WIREFRAME_SELECT_TYPE:"WIREFRAME_SELECT_TYPE",UseFloatTexture:"UseFloatTexture"},H$r=Object.freeze(_0x521788),_0x52bf01=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3a91a0=_0x52bf01(void 0,(function(){return _0x3a91a0.toString().search("(((.+)+)+)+$").toString().constructor(_0x3a91a0).search("(((.+)+)+)+$")}));_0x3a91a0();var _0x4ef676={S3M:49,S3M4:1},_0x335bbd=Object.freeze(_0x4ef676),_0x43ff11=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x37ea9d=_0x43ff11(void 0,(function(){return _0x37ea9d.toString().search("(((.+)+)+)+$").toString().constructor(_0x37ea9d).search("(((.+)+)+)+$")}));_0x37ea9d();var _0xdf4367={RESET:0,SetColor:1,SELECTED:2,HIDE:4,OFFSET:8,CLIP:16,BLOOM:32,ALL:255},_0x24b8f6=Object.freeze(_0xdf4367),_0x208b68=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x4aaa86=_0x208b68(void 0,(function(){return _0x4aaa86.toString().search("(((.+)+)+)+$").toString().constructor(_0x4aaa86).search("(((.+)+)+)+$")}));_0x4aaa86();var _0x2a152a={MIX:0,REPLACE:1},_0x28ce18=Object.freeze(_0x2a152a),_0x11103a=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3f9f37=_0x11103a(void 0,(function(){return _0x3f9f37.toString().search("(((.+)+)+)+$").toString().constructor(_0x3f9f37).search("(((.+)+)+)+$")}));_0x3f9f37();var _0x45dde4={DIRECTIONAL:0,POINT:1,SPOT:2,HEMISPHERE:3},w$x=Object.freeze(_0x45dde4),_0xb328d=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x34c46d=_0xb328d(void 0,(function(){return _0x34c46d.toString().search("(((.+)+)+)+$").toString().constructor(_0x34c46d).search("(((.+)+)+)+$")}));_0x34c46d();var _0x2e7731={POINT:0,VOXEL:1},_0x595b1d=Object.freeze(_0x2e7731),_0x3283a4=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x42ea57=_0x3283a4(void 0,(function(){return _0x42ea57.toString().search("(((.+)+)+)+$").toString().constructor(_0x42ea57).search("(((.+)+)+)+$")}));_0x42ea57();var _0x56829f={NONE:0,TITANIUM_SCUFFED:1,METAL_PLATE:2,EMISSION:4,ROUGHNESS:8},We$a=Object.freeze(_0x56829f),_0x2189ca=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x4e8dc4=_0x2189ca(void 0,(function(){return _0x4e8dc4.toString().search("(((.+)+)+)+$").toString().constructor(_0x4e8dc4).search("(((.+)+)+)+$")}));_0x4e8dc4();var z$m="uniform float uTransparentFilter; \n#ifdef SQRESULT\nuniform sampler2D uFrontColorTexture;\nuniform sampler2D uFrontDepthTexture;\nuniform sampler2D uBackDepthTexture;\nuniform float uSQMode; \nvarying vec4 vSecondColor; \nvarying vec4 vColor;\nvarying vec4 vPrjPos; \n#endif\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef SQRESULT\nbool isPointInObject(vec4 xyPos)\n{\n bool bIn = false;\n vec4 color = texture2D(uFrontColorTexture,xyPos.xy);\n if(color.r > 0.99 && color.g < 0.01 && color.b < 0.01)\n {\n float depthNear = czm_unpackDepth(texture2D(uFrontDepthTexture,xyPos.xy));\n depthNear = czm_reverseLogDepth(depthNear);\n float depthFar = czm_unpackDepth(texture2D(uBackDepthTexture,xyPos.xy));\n depthFar = czm_reverseLogDepth(depthFar);\n if(xyPos.z - depthNear > -0.0000001 && depthFar - xyPos.z > -0.0000001)\n {\n bIn = true;\n }\n }\n return uSQMode < 0.5 ? !bIn : bIn;\n}\n#endif\nvoid main() \n{\n#ifdef SQRESULT\n vec4 xyPos = vPrjPos / vPrjPos.w; \n xyPos.xyz = xyPos.xyz * 0.5 + 0.5; \n if(!isPointInObject(xyPos)) \n { \n discard; \n } \n if(vColor.a < uTransparentFilter)\n\t{\n\t\tdiscard;\n\t}\n\tgl_FragColor = vSecondColor; \n#endif\n#ifdef DEPTH\n #ifdef LOG_DEPTH\n czm_writeLogDepth();\n gl_FragColor = czm_packDepth(gl_FragDepthEXT);\n #else\n gl_FragColor = czm_packDepth(gl_FragCoord.z);\n #endif\n#endif\n#ifdef COLOR\n gl_FragColor = vec4(1.0,0.0,0.0,1.0);\n#endif\n}",_0x26348c=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x50b759=_0x26348c(void 0,(function(){return _0x50b759.toString().search("(((.+)+)+)+$").toString().constructor(_0x50b759).search("(((.+)+)+)+$")}));function _0x15900a(e,t){this._content=e,this._id=t,this._batchId=t,this._color=new e$1z(1,1,1,1),this._imageUrl="",this._vertexOffset=[],this._instanceIds=void 0,this._pbrMaterialIndex=void 0}_0x50b759(),Object.defineProperties(_0x15900a.prototype,{show:{get:function(){return!0},set:function(e){}},color:{get:function(){return t$$(this._color)||(this._color=new e$1z),this._color},set:function(e){this._color=e}},pbrMaterialIndex:{get:function(){return t$$(this._pbrMaterialIndex)||(this._pbrMaterialIndex=0),this._pbrMaterialIndex},set:function(e){this._pbrMaterialIndex=e}},imageUrl:{get:function(){return this._imageUrl},set:function(e){this._imageUrl=e}},id:{get:function(){return this._id},set:function(e){this._id=e}},batchId:{get:function(){return this._batchId},set:function(e){this._batchId=e}},instanceIds:{get:function(){return this._instanceIds},set:function(e){this._instanceIds=e}}}),_0x15900a.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)},_0x15900a.prototype.getPropertyNames=function(e){return this._content.batchTable.getPropertyNames(this._batchId,e)},_0x15900a.prototype.getProperty=function(e){return this[e]},_0x15900a.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0},_0x15900a.prototype.addVertexOffset=function(e,t){this._vertexOffset.push({vertexCount:e,vertexOffset:t})},_0x15900a.prototype.getVertexOffset=function(){return this._vertexOffset},_0x15900a.prototype.getRenderBatchKey=function(){var e=this._color.toCssColorString();return this._imageUrl+"_"+e};var _0x413be2=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x198247=_0x413be2(void 0,(function(){return _0x198247.toString().search("(((.+)+)+)+$").toString().constructor(_0x198247).search("(((.+)+)+)+$")}));_0x198247();var _0x28fcbd=function(){this.model=void 0,this.context=void 0,this.texture=void 0,this.subTextureInfo=void 0};_0x28fcbd.prototype.set=function(e,t,i,n,r){this.model=t,this.context=e,this.texture=i,this.subTextureInfo=n,this.textureLod=r},_0x28fcbd.prototype.execute=function(){var e=this.subTextureInfo;if(!this.texture.ready){if(!this.textureLod)return this.texture.arrayBufferView=e.arrayBufferView,void this.texture.init();this.texture.init()}this.texture.copyFrom({xOffset:e.xOffset,yOffset:e.yOffset,width:e.width,height:e.height,arrayBufferView:e.arrayBufferView})};var _0x29ccdc=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3d13aa=_0x29ccdc(void 0,(function(){return _0x3d13aa.toString().search("(((.+)+)+)+$").toString().constructor(_0x3d13aa).search("(((.+)+)+)+$")}));_0x3d13aa();var _0xcda09f="attribute vec4 aPosition;\n#ifdef USE_VertexWeight\n attribute float aVertexWeight;\n #ifdef MultiTemporalWeight\n attribute float aVertexWeight_1;\n uniform float fMultiTemporalFactor;\n #endif\n#endif\n#ifdef HAS_NORMAL\n attribute vec3 aNormal;\n#endif\n#ifdef TexCoord\n attribute vec4 aTexCoord0;\n#endif\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\nuniform mat4 uGeoMatrix;\nuniform float uPointCloudSize;\nvarying float v_pixelDistance;\nvarying vec4 vPosition;\n#ifdef COMPRESS_TEXCOORD\n#ifdef TexCoord\n attribute vec4 aTexCoordZ0;\n uniform float decode_texCoord0_normConstant;\n uniform vec2 decode_texCoord0_min;\n#endif\n#endif\n#ifdef COMPRESS_VERTEX\n uniform vec4 decode_position_min;\n uniform float decode_position_normConstant;\n#endif\n#ifdef COMPRESS_NORMAL\n uniform float normal_rangeConstant;\n#endif\n#ifdef COMPUTE_W_VALUE\n uniform float uHypHasColorByHeight;\n varying float wValue;\n#endif\n#ifdef HYPSOMETRIC\n uniform sampler2D uHypsometricTexture;\n uniform float uHypOpacity;\n uniform float uHypContourFillMode;\n uniform float uHypFloor;\n uniform float uHypCeil;\n uniform float uHypMaxVisibleValue;\n uniform float uHypMinVisibleValue;\n uniform vec4 uNoValueColor;\n#endif\n#ifdef EXCAVATION\n varying vec4 vExcavationVertexPos;\n#endif\n uniform float uBottom;\n uniform vec4 uFillForeColor;\n varying vec4 vColor;\n varying vec4 vPositionMC;\n#ifdef W_VISIBLE\n uniform sampler2D uCategorieTexture;\n uniform float uMaxCategory;\n uniform float uMinCategory;\n uniform float uCategoryWidht;\n#endif\nfloat computeWValue(vec4 vertexPos){\n float realWValue = vertexPos.w;\n#ifdef TEXTURE_COORD_ONE_IS_W\n realWValue = aTexCoord0.x;\n#endif\n#ifdef USE_VertexWeight\n realWValue = aVertexWeight;\n #ifdef MultiTemporalWeight\n realWValue = mix(aVertexWeight, aVertexWeight_1, fMultiTemporalFactor);\n\t\tvertexPos.z += realWValue;\n\t#endif\n#endif\n#ifdef COMPUTE_W_VALUE\n if(uHypHasColorByHeight > 0.1)\n {\n wValue = realWValue + uBottom;\n }\n else\n {\n wValue = vertexPos.z + uBottom;\n }\n#endif\n return realWValue;\n}\n#ifdef HYPSOMETRIC\nvec4 computeContourMapColor(float fValue)\n{\n float threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n float contourRate = (fValue - uHypFloor) / threshold;\n float finalCoord = clamp(contourRate, 0.0, 1.0);\n float count = floor(finalCoord * 16.0);\n float y = (count*2.0 + 1.0)/32.0;\n float x = fract(finalCoord*16.0);\n if(y > 1.0)\n {\n x = 1.0;\n }\n vec2 contourCoord = vec2(x, y);\n return texture2D(uHypsometricTexture, contourCoord).rgba;\n}\nvec4 getHypsometricColor(vec4 oriColor, float fValue)\n{\n vec4 contourMapColor = vec4(0.0);\n float finalOpacity = uHypOpacity;\n if(fValue > uHypMaxVisibleValue || fValue < uHypMinVisibleValue)\n {\n return uNoValueColor * oriColor;\n }\n contourMapColor = computeContourMapColor(fValue);\n finalOpacity *= sign(uHypContourFillMode);\n vec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n return mixColor;\n}\n#endif\n\nvec3 realNormal;\nvoid main()\n{\n#ifdef COMPRESS_VERTEX\n vec4 vertexPos = vec4(1.0);\n vertexPos = decode_position_min + aPosition * decode_position_normConstant;\n#else\n vec4 vertexPos = aPosition;\n#endif\n#ifdef HAS_NORMAL\n realNormal = aNormal;\n #ifdef COMPRESS_NORMAL\n realNormal = czm_octDecode(aNormal.xy, normal_rangeConstant).zxy;\n #endif\n#endif\n float oriVertexW = computeWValue(vertexPos);\n vertexPos.w = 1.0;\n#ifdef EXCAVATION\n vExcavationVertexPos = uGeoMatrix * vertexPos;\n#endif\nvec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n #ifdef COMPRESS_COLOR\n #ifdef MeshOPT_Compress\n vertexColor = aColor;\n #else\n vertexColor = aColor / 255.0;\n #endif\n #endif\n#endif\n vColor = vertexColor*uFillForeColor;\n vPositionMC.xyz = vertexPos.xyz;\n vPositionMC.w = 0.0;\n gl_Position = czm_modelViewProjection * vertexPos;\n#ifdef HYPSOMETRIC\n vColor = getHypsometricColor(vColor, wValue);\n#endif\n#ifdef W_VISIBLE\n vec2 categoryTexCoord = vec2(abs(oriVertexW - uMinCategory) / uCategoryWidht + 0.5 /uCategoryWidht , 0.5);\n float category = texture2D(uCategorieTexture, categoryTexCoord).a;\n vColor.a *= 1.0 - category;\n#endif\n v_pixelDistance = 2.0 / uPointCloudSize;\n gl_PointSize = uPointCloudSize;\n vPosition = czm_modelView * vertexPos;\n}",_0x124362=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x47eec4=_0x124362(void 0,(function(){return _0x47eec4.toString().search("(((.+)+)+)+$").toString().constructor(_0x47eec4).search("(((.+)+)+)+$")}));_0x47eec4();var _0x2dcba9="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n#ifdef COMPUTE_W_VALUE\n varying float wValue;\n#endif\nvarying vec4 vColor;\nvarying vec4 vPositionMC;\nvarying vec4 vPosition;\nvarying float v_pixelDistance;\n#ifdef APPLY_SPLIT\nuniform float uSplitDirection;\nuniform float uSplitPosition;\n#endif\n#ifdef APPLY_SWIPE\n uniform vec4 uSwipeRegion;\n#endif\nvoid main()\n{\n#ifdef APPLY_SPLIT\n if (uSplitDirection > 1.5)\n {\n if(gl_FragCoord.x > uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection > 0.5)\n {\n if(gl_FragCoord.x < uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection < -1.5)\n {\n if(gl_FragCoord.y < uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection < -0.5)\n {\n if(gl_FragCoord.y > uSplitPosition)\n {\n discard;\n }\n }\n#endif\n#ifdef APPLY_SWIPE \n czm_RollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\n#ifdef EXCAVATION\n if(czm_executeExcavation())\n {\n discard;\n }\n#endif\n\tif(vColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n gl_FragColor = vColor;\n#ifdef ADJUST_COLOR\n\tgl_FragColor.rgb = czm_adjustColor(gl_FragColor.rgb);\n#endif\n float distanceToCenter = length(gl_PointCoord - vec2(0.5));\n float maxDistance = max(0.0, 0.5 - v_pixelDistance);\n float wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);\n gl_FragColor.a *= wholeAlpha;\n\tif(gl_FragColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n#ifdef CLIP\n gl_FragColor *= czm_clip(czm_modelView * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n}",_0x428953=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x24bc4b=_0x428953(void 0,(function(){return _0x24bc4b.toString().search("(((.+)+)+)+$").toString().constructor(_0x24bc4b).search("(((.+)+)+)+$")}));_0x24bc4b();var _0x4b8bdf="attribute vec4 aPosition;\n#ifdef TexCoord\n attribute vec4 aTexCoord0;\n#endif\nattribute vec4 aColor;\nvarying float v_pixelDistance;\nvarying vec4 vPosition;\nuniform mat4 uGeoMatrix;\n#ifdef EXCAVATION\n varying vec4 vExcavationVertexPos;\n#endif\n#ifdef HYPSOMETRIC\n uniform sampler2D uHypsometricTexture;\n uniform float uHypOpacity;\n uniform float uHypContourFillMode;\n uniform float uHypFloor;\n uniform float uHypCeil;\n uniform float uHypMaxVisibleValue;\n uniform float uHypMinVisibleValue;\n uniform vec4 uNoValueColor;\n#endif\n uniform float uPointCloudSize;\n uniform vec4 uFillForeColor;\n varying vec4 vColor;\n varying vec4 vPositionMC;\n#ifdef HYPSOMETRIC\nvec4 computeContourMapColor(float fValue)\n{\n float threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n float contourRate = (fValue - uHypFloor) / threshold;\n float finalCoord = clamp(contourRate, 0.0, 1.0);\n float count = floor(finalCoord * 16.0);\n float y = (count*2.0 + 1.0)/32.0;\n float x = fract(finalCoord*16.0);\n if(y > 1.0)\n {\n x = 1.0;\n }\n vec2 contourCoord = vec2(x, y);\n return texture2D(uHypsometricTexture, contourCoord).rgba;\n}\nvec4 getHypsometricColor(vec4 oriColor, float fValue)\n{\n vec4 contourMapColor = vec4(0.0);\n float finalOpacity = uHypOpacity;\n contourMapColor = computeContourMapColor(fValue);\n finalOpacity *= sign(uHypContourFillMode);\n vec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n return mixColor;\n}\n#endif\n\nfloat getGlobeDepth(vec4 positionEC)\n{\n vec4 posWC = czm_eyeToWindowCoordinates(positionEC);\n float globeDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));\n if (globeDepth == 0.0)\n {\n return 0.0; // not on the globe\n }\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);\n return eyeCoordinate.z / eyeCoordinate.w;\n}\n\nvoid main()\n{\n vec4 vertexPos = aPosition;\n vertexPos.w = 1.0;\n vPositionMC.xyz = vertexPos.xyz;\n vPositionMC.w = 0.0;\n vColor = aColor;\n float wValue = aTexCoord0.x;\n gl_Position = czm_modelViewProjection * vertexPos;\n#ifdef HYPSOMETRIC\n if(wValue > uHypMaxVisibleValue || wValue < uHypMinVisibleValue)\n {\n gl_Position = czm_projection * vec4(0.0, 0.0, 0.0, 1.0);\n }\n vColor = getHypsometricColor(vColor, wValue);\n#endif\n#ifdef EXCAVATION\n vExcavationVertexPos = uGeoMatrix * vertexPos;\n#endif\n vColor *= uFillForeColor;\n vPosition = czm_modelView * vertexPos;\n float depthsilon = 10.0;\n float globeDepth = getGlobeDepth(vPosition);\n if (globeDepth != 0.0 && vPosition.z + depthsilon < globeDepth)\n {\n gl_Position = czm_projection * vec4(0.0, 0.0, 0.0, 1.0);\n }\n float mpp = czm_metersPerPixel(vPosition);\n float pointSize = uPointCloudSize / mpp;\n v_pixelDistance = 2.0 / pointSize;\n gl_PointSize = pointSize;\n}",_0x1c5674=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2b995d=_0x1c5674(void 0,(function(){return _0x2b995d.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b995d).search("(((.+)+)+)+$")}));_0x2b995d();var _0x40386e="#extension GL_EXT_draw_buffers : enable\nvarying vec4 vColor;\nvarying vec4 vPosition;\nvarying vec4 vPositionMC;\nvarying float v_pixelDistance;\nvoid main()\n{\n#ifdef CLIP\n czm_clip(czm_modelView * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n vec4 color = vColor;\n float distanceToCenter = length(gl_PointCoord - vec2(0.5));\n float maxDistance = max(0.0, 0.5 - v_pixelDistance);\n float wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);\n color.a *= wholeAlpha;\n\tcolor = czm_gammaCorrect(color);\n#ifdef EXCAVATION\n if(czm_executeExcavation())\n {\n discard;\n }\n#endif\n#ifdef OIT\n vec3 Ci = color.rgb * color.a;\n float ai = color.a;\n float wzi = czm_alphaWeight(ai);\n gl_FragData[0] = vec4(Ci * wzi, ai);\n gl_FragData[1] = vec4(ai * wzi);\n#else\n gl_FragColor = color;\n#endif\n}",_0x491dee=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x267bcc=_0x491dee(void 0,(function(){return _0x267bcc.toString().search("(((.+)+)+)+$").toString().constructor(_0x267bcc).search("(((.+)+)+)+$")}));_0x267bcc();var _0x3edf32="attribute vec4 aPosition;\n#ifdef USE_VertexWeight\n attribute float aVertexWeight;\n #ifdef MultiTemporalWeight\n attribute float aVertexWeight_1;\n uniform float fMultiTemporalFactor;\n #endif\n#endif\n#ifdef USE_TextureCoordMatrix\n attribute vec2 aTextureCoordMatrix;\n#endif\n#ifdef HAS_NORMAL\n attribute vec3 aNormal;\n#endif\n#ifdef TexCoord\n attribute vec4 aTexCoord0;\n varying vec2 vTexCoordZ;\n#endif\nvarying vec4 vTexCoord;\n#ifdef IMAGERY\n attribute vec2 img;\n varying vec2 imgCoord;\n#endif\n#ifdef TexCoord2\n attribute vec4 aTexCoord1;\n#endif\n#ifdef TextureBatch\n attribute float aTextureBatchId0;\n#ifdef MULTI_TEX\n attribute float aTextureBatchId1;\n#endif\n#endif\n uniform float uPointSize;\n uniform vec4 uSelColor;\n uniform vec3 uTranslation;\n struct LayerParameter{\n vec4 translationAndBottom;\n vec4 minMaxTransparentAndPolygonOffset;\n vec4 selColor;\n float pointSize;\n };\n \n uniform mat4 uTexMatrix;\n uniform float uTexture0Width;\n uniform float uTexture1Width;\n struct MaterialParameter{\n vec4 ambientColor;\n vec4 diffuseColor;\n mat4 texMatrix;\n vec2 textureWidth;\n };\n uniform vec4 uFillForeColor;\n struct MaterialDynamicParameter{\n vec4 texUVOffset;\n vec4 fillForeColor;\n };\n LayerParameter u_LayerParam;\n MaterialParameter u_MaterialParam;\n MaterialDynamicParameter u_MaterialDynamicParameter;\n#ifdef FINAL_RESOLUTION_CLIP\nvarying vec3 vertexClip;\n#endif\nuniform mat4 uGeoMatrix;\nuniform mat4 uInverseGeoMatrix;\n#ifdef UseInstanceSkeletonMatrix\nuniform mat4 uSkeletonMatrix;\n#endif\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\n#ifdef Instance\n#ifdef InstanceModel\nattribute float batchId;\nuniform float uSkeletonCount;\n#endif\nattribute float instanceId;\n#else\nattribute float batchId;\n#endif\n#endif\nvarying vec4 vSecondColor;\nconst float POW_24 = 16777216.0;\nconst float POW_16 = 65536.0;\nconst float POW_8 = 256.0;\n#ifdef Volume\n attribute vec3 aRatio;\n varying vec3 vecRotioCoord;\n#endif\n#ifdef InstanceRenderBIM\n attribute vec4 uv2;\n attribute vec4 uv3;\n attribute vec4 uv4;\n attribute vec4 secondary_colour;\n attribute vec4 uv6;\n#endif\n#ifdef InstanceRenderPipeline\n attribute vec4 uv1;\n attribute vec4 uv2;\n attribute vec4 uv3;\n attribute vec4 uv4;\n attribute vec4 uv5;\n attribute vec4 uv6;\n attribute vec4 uv7;\n attribute vec4 secondary_colour;\n attribute vec4 uv9;\n#endif\n#ifdef QUAD_OUTLINE\n varying float vDistanceFromEye;\n#endif\n#ifdef EMISSION_TEXTURE\n uniform vec4 uLayerBounds;\n varying vec2 vLayerTexCoord;\n varying vec2 vModIndexAndTexIndex;\n#endif\n#ifdef COMPRESS_TEXCOORD\n#ifdef TexCoord\n attribute vec4 aTexCoordZ0;\n uniform vec2 decode_texCoord0_min;\n#endif\n#ifdef TexCoord2\n attribute vec4 aTexCoordZ1;\n uniform vec2 decode_texCoord1_min;\n#endif\n#ifdef MeshOPT_Compress\n uniform vec3 decode_texCoord0_vNormConstant;\n uniform vec3 decode_texCoord1_vNormConstant;\n#else\n uniform float decode_texCoord0_normConstant;\n uniform float decode_texCoord1_normConstant;\n#endif\n#endif\n#ifdef COMPRESS_VERTEX\n uniform vec4 decode_position_min;\n uniform float decode_position_normConstant;\n#endif\n#ifdef COMPRESS_NORMAL\n uniform float normal_rangeConstant;\n#endif\n#ifdef FALTTEN\n#ifdef VertexTextureSupport\n uniform sampler2D uFlattenTexture;\n#endif\n uniform vec4 uRect;\n uniform float uCameraHeight;\n#endif\n#ifdef COMPUTE_W_VALUE\n uniform float uHypHasColorByHeight;\n varying float wValue;\n#endif\n#ifdef COMPUTE_TEXCOORD\n#ifdef TextureBatch\n uniform vec4 uTextureDim;\n varying vec4 vTexTran;\n varying vec4 vTexScale;\n varying vec4 vTexSize;\n varying vec2 vMaxMipLevel;\n#else\n varying vec4 vTexMatrix;\n varying vec2 vIsRGBA;\n#endif\n#ifdef TexCoord2\n varying vec4 vTexMatrix2;\n#endif\n#endif\n#ifdef HYPSOMETRIC\n uniform float uHypHasAnalysisRegion;\n uniform vec4 uHypRect;\n varying vec2 vecHypTexCoord;\n#endif\n#ifdef SERVEREXCAVATION\n varying vec4 vServerExcavationVertexPos;\n#endif\n#ifdef EXCAVATION\n varying vec4 vExcavationVertexPos;\n#endif\n#ifdef OVERLAY\n uniform vec4 uOverlayRect;\n#endif\n#ifdef NORMAL_AND_DEPTH\n varying vec4 oriVertex;\n varying vec3 perVertexNormals;\n varying float depthInCamera;\n#endif\nvarying vec2 fSelected;\n#ifdef SILHOUETTE_SELECT_TYPE\n varying float fSelectedForSilh;\n#endif\n varying vec4 vIsFiltByID;\n varying vec3 v_positionEC;\n#ifdef PBR\n varying vec3 v_positionWC;\n varying vec4 pbrVertex;\n#endif\n#ifdef TRIANGLE_FILTRATE\n uniform float uTriangleFiltratePixel;\n#endif\n#ifdef POINT\n varying float v_pixelDistance;\n#endif\n uniform float uBottom;\n varying vec4 vColor;\n varying vec4 vPositionMC;\n#ifdef PBR_THEME\n varying float vPBRIndex;\n#endif\n#ifdef Instance\n varying vec3 vPositionRotateMC;\n#endif\n#ifdef W_VISIBLE\n uniform sampler2D uCategorieTexture;\n uniform float uMaxCategory;\n uniform float uMinCategory;\n uniform float uCategoryWidht;\n uniform float uCategoryHeight;\n#endif\n#ifdef SQRESULT\nuniform mat4 uSQViewProj;\nvarying vec4 vPrjPos;\n#endif\n vec2 CalculatePolyTexCoord(vec4 vertexPos, vec4 rectPos, out float ptInRect)\n {\n vec4 realVertexPos = uGeoMatrix * vertexPos;\n vec2 vecRatio = vec2(rectPos.z - rectPos.x, rectPos.w - rectPos.y);\n vec2 texCoord = vec2(realVertexPos.x - rectPos.x, realVertexPos.y - rectPos.y);\n texCoord.x = texCoord.x / vecRatio.x;\n texCoord.y = texCoord.y / vecRatio.y;\n ptInRect = step(0.0, texCoord.x) * step(0.0, texCoord.y) * step(0.0, 1.0 - texCoord.x) * step(0.0, 1.0 - texCoord.y);\n texCoord = clamp(texCoord, vec2(0.0), vec2(1.0));\n return texCoord;\n }\n#ifdef FALTTEN\n#ifdef VertexTextureSupport\n vec4 CalculateHeight(vec4 vertexPos)\n {\n vec4 vecPos = uGeoMatrix * vec4(vertexPos.xyz, 1.0);\n vec2 vecRatio = vec2(uRect.z - uRect.x, uRect.w - uRect.y);\n vec2 vecTexCoord = vec2(vecPos.x - uRect.x, vecPos.y - uRect.y);\n vecTexCoord.x = vecTexCoord.x / vecRatio.x;\n vecTexCoord.y = vecTexCoord.y / vecRatio.y;\n if(vecTexCoord.x > 1.0 || vecTexCoord.x < 0.0 || vecTexCoord.y > 1.0 || vecTexCoord.y < 0.0)\n {\n return vertexPos;\n }\n vec4 value = texture2D(uFlattenTexture, vecTexCoord.xy);\n #ifdef UseFloatTexture\n float fHeight = value.r;\n #else\n float fHeight = czm_unpackValue(value);\n #endif\n if(vecPos.z > fHeight && value.a > 0.5)\n {\n float fDepthOffset = clamp((uCameraHeight - fHeight - uBottom) * 0.0001 * (vecPos.z + uBottom - fHeight), 0.001, 3.0);\n vecPos.z = fHeight + fDepthOffset;\n vecPos.w = vecPos.z;\n }\n return uInverseGeoMatrix * vec4(vecPos.xyz, 1.0);\n }\n#endif\n#endif\nfloat computeWValue(inout vec4 vertexPos){\n float realWValue = vertexPos.w;\n#ifdef TEXTURE_COORD_ONE_IS_W\n realWValue = aTexCoord0.x;\n#endif\n#ifdef USE_VertexWeight\n realWValue = aVertexWeight;\n #ifdef MultiTemporalWeight\n realWValue = mix(aVertexWeight, aVertexWeight_1, fMultiTemporalFactor);\n #ifdef ChangeZValue\n\t\tvertexPos.z += realWValue;\n\t\t#endif\n\t#endif\n#endif\n#ifdef COMPUTE_W_VALUE\n if(uHypHasColorByHeight > 0.1)\n {\n wValue = realWValue + uBottom;\n }\n else\n {\n wValue = vertexPos.z + uBottom;\n }\n#endif\n return realWValue;\n}\n#ifdef TextureBatch\nvoid getTextureParameter(in vec4 xywh, in vec2 textureDim, inout vec2 translate, inout vec2 scale, inout vec2 texSize, inout float maxMipLevel)\n{\n float width = xywh.z;\n float height = xywh.w;\n width *= 2.0 / 3.0;\n maxMipLevel = log2(min(width, height));\n scale.x = width / textureDim.x;\n scale.y = height / textureDim.y;\n translate.x = xywh.x;\n translate.y = xywh.y;\n translate /= textureDim;\n texSize.x = width;\n texSize.y = height;\n}\n#endif\nvec3 realNormal;\nconst float RIGHT_8 = 65280.0;\nconst float RIGHT_16 = 16711680.0;\nvarying vec3 vNormalEC;\n#ifdef USE_BatchPBR\n uniform vec2 uPBRTexWH;\n uniform sampler2D uPBRTexture;\n varying vec4 vMetallicRoughness;\n varying vec4 vEmissiveFactor;\n varying vec3 vAlphaCutoffAndModeAndDoubleSide;\n#endif\nvoid InitUniformStructParameter(){\n#ifdef UNIFORM_BUFFER\n#else\n u_LayerParam.translationAndBottom.xyz = uTranslation;\n u_LayerParam.translationAndBottom.w = uBottom;\n u_LayerParam.selColor = uSelColor;\n u_LayerParam.pointSize = uPointSize;\n u_MaterialParam.textureWidth.x = uTexture0Width;\n u_MaterialParam.textureWidth.y = uTexture1Width;\n u_MaterialParam.texMatrix = uTexMatrix;\n u_MaterialDynamicParameter.fillForeColor = uFillForeColor;\n#endif\n}\nvarying vec4 vFloodPos;\n#ifdef FLOOD_ANALYSIS\nuniform mat4 uFloodMatrixInvert;\n#endif\n#ifdef FusionMode\n uniform mat4 uModelView;\n uniform vec2 uPanOffset;\n#endif\nvoid main()\n{\n InitUniformStructParameter();\n#ifdef COMPRESS_VERTEX\n vec4 vertexPos = vec4(1.0);\n vertexPos = decode_position_min + vec4(aPosition.xyz, 1.0) * decode_position_normConstant;\n#else\n vec4 vertexPos = aPosition;\n#endif\n#ifdef FINAL_RESOLUTION_CLIP\nvertexClip = (uGeoMatrix * vec4(vertexPos.xyz, 1.0)).xyz;\n#endif\n#ifdef UseInstanceSkeletonMatrix\n vertexPos = uSkeletonMatrix * vec4(vertexPos.xyz, 1.0);\n#endif\n#ifdef TexCoord\n#ifdef COMPRESS_TEXCOORD\n #ifdef MeshOPT_Compress\n vec2 texCoord0;\n texCoord0.x = aTexCoord0.x * decode_texCoord0_vNormConstant.x;\n texCoord0.y = aTexCoord0.y * decode_texCoord0_vNormConstant.y;\n vTexCoord.xy = decode_texCoord0_min + texCoord0.xy;\n #else\n vTexCoord.xy = decode_texCoord0_min.xy + aTexCoord0.xy * decode_texCoord0_normConstant;\n #endif\n#else\n vTexCoord.xy = aTexCoord0.xy;\n#endif\n#endif\n#ifdef TexCoord2\n#ifdef COMPRESS_TEXCOORD\n #ifdef MeshOPT_Compress\n vec2 texCoord1;\n texCoord1.x = aTexCoord1.x * decode_texCoord1_vNormConstant.x;\n texCoord1.y = aTexCoord1.y * decode_texCoord1_vNormConstant.y;\n vTexCoord.zw = decode_texCoord1_min + texCoord1.xy;\n #else\n vTexCoord.zw = decode_texCoord1_min.xy + aTexCoord1.xy * decode_texCoord1_normConstant;\n #endif\n#else\n vTexCoord.zw = aTexCoord1.xy;\n#endif\n#ifdef USE_BatchPBR\n float x = (aTexCoord1.x * 2.0 + 0.5)/ uPBRTexWH.x;\n float y = (aTexCoord1.x * 2.0 + 1.5)/ uPBRTexWH.x;\n vec4 pbrParam = texture2D(uPBRTexture, vec2(x, 0.5));\n vMetallicRoughness.xy = pbrParam.rg;\n vAlphaCutoffAndModeAndDoubleSide.x = pbrParam.b;\n float temp = pbrParam.a / 65536.0;\n vAlphaCutoffAndModeAndDoubleSide.y = floor(temp);\n vAlphaCutoffAndModeAndDoubleSide.z = (temp- vAlphaCutoffAndModeAndDoubleSide.y) * 65536.0;\n vEmissiveFactor = texture2D(uPBRTexture, vec2(y, 0.5));\n#endif\n#endif\n#ifdef HAS_NORMAL\n realNormal = aNormal;\n#ifdef COMPRESS_NORMAL\n #ifdef MeshOPT_Compress\n realNormal.x = aNormal.x / 127.0;\n realNormal.y = aNormal.y / 127.0;\n realNormal.z = 1.0 - abs(realNormal.x) - abs(realNormal.y);\n realNormal = normalize(realNormal);\n #else\n realNormal = czm_octDecode(aNormal.xy, normal_rangeConstant).zxy;\n #endif\n#endif\n#endif\n#ifdef InstanceRenderBIM\n mat4 worldMatrix;\n worldMatrix[0] = uv2;\n worldMatrix[1] = uv3;\n worldMatrix[2] = uv4;\n worldMatrix[3] = vec4( 0, 0, 0, 1 );\n vPositionRotateMC = vertexPos.xyz * mat3(worldMatrix);\n vertexPos = vec4(vertexPos.xyz, 1.0) * worldMatrix;\n#endif\n#ifdef InstanceRenderPipeline\n mat4 worldMatrix;\n mat4 worldMatrix0;\n mat4 worldMatrix1;\n vec4 worldPos0;\n vec4 worldPos1;\n worldMatrix0[0] = uv1;\n worldMatrix0[1] = uv2;\n worldMatrix0[2] = uv3;\n worldMatrix0[3] = vec4( 0, 0, 0, 1 );\n worldMatrix1[0] = uv4;\n worldMatrix1[1] = uv5;\n worldMatrix1[2] = uv6;\n worldMatrix1[3] = vec4( 0, 0, 0, 1 );\n vec4 realVertex = vec4(vertexPos.xyz, 1.0);\n realVertex.x = realVertex.x * uv7.z;\n worldPos0 = realVertex * worldMatrix0;\n worldPos1 = realVertex * worldMatrix1;\n#ifdef TexCoord\n if(aTexCoord0.y > 0.5)\n {\n vec4 tex4Vec = u_MaterialParam.texMatrix * vec4(uv7.y, aTexCoord0.x, 0.0, 1.0);\n vTexCoord.xy = tex4Vec.xy;\n vertexPos = worldPos1;\n worldMatrix = worldMatrix1;\n }\n else\n {\n vec4 tex4Vec = u_MaterialParam.texMatrix * vec4(uv7.x, aTexCoord0.x, 0.0, 1.0);\n vTexCoord.xy = tex4Vec.xy;\n vertexPos = worldPos0;\n worldMatrix = worldMatrix0;\n }\n#ifdef HAS_NORMAL\n realNormal.x = realNormal.x * uv7.z;\n#endif\n#endif\n vPositionRotateMC = vertexPos.xyz;\n#endif\n#ifdef Volume\n vecRotioCoord = aRatio;\n#endif\n#ifdef FALTTEN\n#ifdef VertexTextureSupport\n vertexPos = CalculateHeight(vertexPos);\n#endif\n#endif\n vec4 vLocalPos = uGeoMatrix * vertexPos;\n vec4 vTempPos = vLocalPos;\n float oriVertexW = computeWValue(vLocalPos);\n #ifdef MultiTemporalWeight\n vertexPos.z += vLocalPos.z - vTempPos.z;\n #endif\n vertexPos.w = 1.0;\n#ifdef HYPSOMETRIC\n if(uHypHasAnalysisRegion > 0.1)\n {\n float ptInRect = 1.0;\n vecHypTexCoord = CalculatePolyTexCoord(vertexPos, uHypRect, ptInRect);\n }\n#endif\n#ifdef EXCAVATION\n vExcavationVertexPos = uGeoMatrix * vertexPos;\n#endif\n#ifdef SERVEREXCAVATION\n vServerExcavationVertexPos = uGeoMatrix * vertexPos;\n#endif\nvec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef InstanceRenderBIM\n vertexColor *= secondary_colour;\n#endif\n#ifdef InstanceRenderPipeline\n vertexColor *= secondary_colour;\n#endif\n#ifdef REPLACE_COLOR_TYPE\n vertexColor = u_MaterialDynamicParameter.fillForeColor;\n#else\n vertexColor *= u_MaterialDynamicParameter.fillForeColor;\n#endif\n vIsFiltByID = vec4(0.0);\n#ifdef BatchTable\n#ifdef Instance\nfloat index = instanceId;\n#else\nfloat index = batchId;\n#endif\n#ifdef InstanceModel\n index = instanceId * uSkeletonCount + batchId;\n#endif\n vSecondColor = czm_batchTable_pickColor(index);\n vec4 operationType = czm_batchTable_operation(index);\n vec4 objsColor = czm_batchTable_color(index);\n vec3 translate = u_LayerParam.translationAndBottom.xyz;\n#ifdef PBR_THEME\n vPBRIndex = czm_batchTable_pbrMaterialIndex(index).x + 0.1;\n#endif\n#ifdef Translation\n translate = czm_batchTable_translate(index);\n#endif\n#ifdef EMISSION_TEXTURE\n float pickId = vSecondColor.r * 255.0 + vSecondColor.g * RIGHT_8 + vSecondColor.b * RIGHT_16;\n vModIndexAndTexIndex.x = mod(pickId, 10.0) * 0.1;\n vModIndexAndTexIndex.y = mod(pickId, float(EMISSION_TEXTURE_COUNT));\n vec4 realVertexPos = uGeoMatrix * vertexPos;\n vLayerTexCoord = (realVertexPos.xy - uLayerBounds.xy) / uLayerBounds.zw;\n#endif\n#ifdef SILHOUETTE_SELECT_TYPE\n fSelectedForSilh = 0.0;\n czm_s3mBatchOperation(operationType, objsColor, vertexColor, vertexPos, vIsFiltByID, translate, fSelectedForSilh);\n#endif\n#ifndef SILHOUETTE_SELECT_TYPE\n fSelected = vec2(0.0);\n czm_s3mBatchOperation(operationType, objsColor, u_LayerParam.selColor, vertexColor, vertexPos, vIsFiltByID, translate, fSelected);\n#endif\n#endif\n vColor = vertexColor;\n vPositionMC.xyz = vertexPos.xyz;\n vPositionMC.w = 0.0;\n#ifdef TRIANGLE_FILTRATE\n vec4 positionEC = czm_modelView * vertexPos;\n float minEdgeLength = max(aPosition.w, 2.0);\n float pixelLength = minEdgeLength / czm_metersPerPixel(positionEC);\n if(pixelLength < uTriangleFiltratePixel){\n positionEC = vec4(0.0, 0.0, 0.0, 1.0);\n }\n gl_Position = czm_projection * positionEC;\n#else\n#ifdef FusionMode\n vec4 positionCC = czm_projection * uModelView * vertexPos;\n positionCC.x += (2.0 * uPanOffset.x * positionCC.w);\n positionCC.y += (-2.0 * uPanOffset.y * positionCC.w);\n gl_Position = positionCC;\n#else\n gl_Position = czm_modelViewProjection * vertexPos;\n#endif\n#endif\n#ifdef COMPUTE_TEXCOORD\n vTexCoordZ.x = aTexCoord0.z;\n #ifdef USE_TextureCoordMatrix\n vTexCoordZ.x = aTextureCoordMatrix.x;\n #endif\n#ifdef TextureBatch\n if(aTextureBatchId0 < 0.0)\n {\n vMaxMipLevel.x = -1.0;\n }\n else\n {\n vec4 xywh = czm_batchTable_xywh(aTextureBatchId0);\n getTextureParameter(xywh, uTextureDim.xy, vTexTran.xy, vTexScale.xy, vTexSize.xy, vMaxMipLevel.x);\n }\n#ifdef MULTI_TEX\n if(aTextureBatchId1 < 0.0)\n {\n vMaxMipLevel.y = -1.0;\n }\n else\n {\n vec4 xywh2 = czm_batchTable_xywh2(aTextureBatchId1);\n getTextureParameter(xywh2, uTextureDim.zw, vTexTran.zw, vTexScale.zw, vTexSize.zw, vMaxMipLevel.y);\n }\n#endif\n#else\n vec2 vecTexTileWidth;\n vTexMatrix = vec4(0.0,0.0,1.0,0.0);\n vIsRGBA.x = 0.0;\n if(vTexCoordZ.x < -90000.0)\n {\n vTexMatrix.z = -1.0;\n }\n#ifndef Instance\n czm_getTextureMatrixFromZValue(floor(vTexCoordZ.x), vTexMatrix.x, vTexMatrix.y, vTexMatrix.z, vIsRGBA.x);\n#ifdef TexCoord2\n vTexMatrix2 = vec4(0.0,0.0,1.0,0.0);\n vIsRGBA.y = 0.0;\n vTexCoordZ.y = aTexCoord1.z;\n#ifdef COMPRESS_TEXCOORD\n vTexCoordZ.y = aTexCoordZ1.x;\n#endif\n#ifdef USE_TextureCoordMatrix\n vTexCoordZ.y = aTextureCoordMatrix.y;\n#endif\n czm_getTextureMatrixFromZValue(floor(vTexCoordZ.y), vTexMatrix2.x, vTexMatrix2.y, vTexMatrix2.z, vIsRGBA.y);\n#endif\n#endif\n vTexMatrix.w = log2(u_MaterialParam.textureWidth.x * vTexMatrix.z);\n#ifdef TexCoord2\n vTexMatrix2.w = log2(u_MaterialParam.textureWidth.y * vTexMatrix.z);\n#endif\n#endif\n#endif\n v_positionEC = (czm_modelView * vertexPos).xyz;\n vNormalEC = vec3(0.0);\n#ifdef HAS_LIGHT\n #ifdef PBR\n v_positionWC = (czm_model * vertexPos).xyz;\n pbrVertex = vertexPos;\n #else\n #if defined(HAS_NORMAL) && !defined(IS_SQUARE_PIPE)\n if(length(realNormal) > 0.8)\n {\n vPositionMC.w = 1.0;\n vec3 positionEC = (czm_modelView * vertexPos).xyz;\n vec3 normalEC = vec3(1.0);\n #ifdef Instance\n vec3 normalWC = realNormal.xyz * mat3(worldMatrix);\n normalEC = czm_normal * normalWC;\n #else\n normalEC = czm_normal * realNormal;\n #endif\n vNormalEC = normalEC;\n }\n #endif\n #endif\n#endif\n#ifdef NORMAL_AND_DEPTH\n oriVertex = vertexPos;\n vec4 position = czm_modelView * vertexPos;\n depthInCamera = (position.z - czm_depthRange.near) / (czm_depthRange.far - czm_depthRange.near);\n perVertexNormals = vec3(0.0,0.0,0.0);\n#ifdef HAS_NORMAL\n if(length(realNormal) > 0.8)\n {\n perVertexNormals = normalize(czm_normal * realNormal);\n }\n#endif\n#endif\n#ifdef W_VISIBLE\n float category_u = abs(oriVertexW - uMinCategory);\n float category_y = ceil(category_u / uCategoryWidht) / uCategoryHeight - 0.5 / uCategoryHeight;\n float category_x = mod(category_u, uCategoryWidht) / uCategoryWidht + 0.5 / uCategoryWidht ;\n vec2 categoryTexCoord = vec2(category_x , category_y);\n float category = texture2D(uCategorieTexture, categoryTexCoord).a;\n vColor.a *= 1.0 - category;\n#endif\n#ifdef SQRESULT\n vPrjPos = uSQViewProj * vec4(vertexPos.xyz, 1.0);\n#endif\n#ifdef IMAGERY\n imgCoord = img;\n#endif\n gl_PointSize = u_LayerParam.pointSize;\n#ifdef POINT\n v_pixelDistance = 2.0 / u_LayerParam.pointSize;\n#endif\n#ifdef QUAD_OUTLINE\n vDistanceFromEye = gl_Position.z;\n#endif\n#ifdef VERTEX_CAPTURE\n vSecondColor = czm_modelView * vertexPos;\n gl_PointSize = 12.0;\n#endif\n vFloodPos = vec4(1.0,1.0,1.0,1.0);\n#ifdef FLOOD_ANALYSIS\n vFloodPos = uFloodMatrixInvert * vec4(vertexPos.xyz, 1.0);\n#endif\n}",_0x498dff=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x273d04=_0x498dff(void 0,(function(){return _0x273d04.toString().search("(((.+)+)+)+$").toString().constructor(_0x273d04).search("(((.+)+)+)+$")}));_0x273d04();var _0x580916="\n#ifdef GL_EXT_shader_texture_lod\n#extension GL_EXT_shader_texture_lod : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n#ifdef TRANSPARENT_BACK_COLOR\n uniform vec4 uTransparentBackColor;\n uniform float uTransparentBackColorTolerance;\n#endif\n#ifdef FINAL_RESOLUTION_CLIP\nvarying vec3 vertexClip;\nuniform vec3 uMaxClip;\nuniform vec3 uMinClip;\n#endif\n#ifdef TexCoord\n uniform sampler2D uTexture;\n#ifdef Map\n\tuniform sampler2D uMapTexture;\n#endif\n varying vec4 vTexCoord;\n varying vec2 vTexCoordZ;\n#endif\n#ifdef SEC_TEX_EMISSION\n uniform vec3 uEmissionFactor;\n#endif\n#ifdef COMPUTE_TEXCOORD\n#ifdef TextureBatch\n uniform vec4 uTextureDim;\n varying vec4 vTexTran;\n varying vec4 vTexScale;\n varying vec4 vTexSize;\n varying vec2 vMaxMipLevel;\n#else\n varying vec4 vTexMatrix;\n varying vec2 vIsRGBA;\n#endif\n#endif\n#ifdef COMPUTE_W_VALUE\n varying float wValue;\n#endif\n#ifdef MULTI_TEX\n uniform sampler2D uSecTexture;\n varying vec4 vTexMatrix2;\n#endif\n#ifdef USE_BatchPBR\n varying vec4 vMetallicRoughness;\n varying vec4 vEmissiveFactor;\n varying vec3 vAlphaCutoffAndModeAndDoubleSide;\n#endif\n#ifdef OVERLAY\n uniform vec4 uOverlayRect;\n uniform sampler2D uOverlayTexture;\n#endif\n#ifdef NORMAL_AND_DEPTH\n varying vec4 oriVertex;\n varying vec3 perVertexNormals;\n varying float depthInCamera;\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#endif\n#ifdef APPLY_SPLIT\n uniform float uSplitDirection;\n uniform float uSplitPosition;\n#endif\n#ifdef APPLY_SWIPE\n uniform vec4 uSwipeRegion;\n#endif\nvarying vec2 fSelected;\n#ifdef SILHOUETTE_SELECT_TYPE\n uniform vec4 uSelColor;\n uniform int uSelectColorType;\n varying float fSelectedForSilh;\n#endif\n#ifdef SKETCH_MODE\n uniform vec4 uLineColor;\n uniform float uLineWidth;\n#endif\n#ifdef Only_LineColor\n uniform vec4 uLineColor;\n#endif\n uniform vec4 uEmissionColor;\n#ifdef POST_EFFECT\n uniform float uMaxBloomHeight;\n#endif\nuniform vec2 uPolygonOffset;\n uniform vec2 uMinMaxTransparent;\n struct LayerParameter{\n vec4 translationAndBottom;\n vec4 minMaxTransparentAndPolygonOffset;\n vec4 selColor;\n float pointSize;\n };\n uniform vec4 uAmbientColor;\n uniform vec4 uDiffuseColor;\n uniform float uTexture0Width;\n uniform float uTexture1Width;\n struct MaterialParameter{\n vec4 ambientColor;\n vec4 diffuseColor;\n mat4 texMatrix;\n vec2 textureWidth;\n };\n uniform vec4 uTexUVOffset;\n uniform vec4 uFillForeColor;\n struct MaterialDynamicParameter{\n vec4 texUVOffset;\n vec4 fillForeColor;\n };\n \n uniform vec3 uAmbientLightColor;\n uniform vec4 uSunLightColor;\n uniform float uSunLightON;\n struct LightParameter{\n vec4 ambientLightColor;\n vec4 sunLightColor;\n vec4 sunDirECAndSunLightON;\n };\n LayerParameter u_LayerParam;\n MaterialParameter u_MaterialParam;\n MaterialDynamicParameter u_MaterialDynamicParameter;\n LightParameter u_LightParam;\n#ifdef PBR_THEME\n uniform mat4 uPBRMaterials[NUM_PBR_MATERIALS];\n varying float vPBRIndex;\n#endif\n varying vec4 vIsFiltByID;\n varying vec4 vColor;\n varying vec4 vPositionMC;\n varying vec3 v_positionEC;\n varying vec4 vSecondColor;\n varying vec3 vNormalEC;\n#ifdef Instance\n varying vec3 vPositionRotateMC;\n#endif\nuniform float uShadowDarkness;\n#ifdef IMAGERY\nvarying vec2 imgCoord;\nuniform sampler2D uImgTexture;\nuniform float uImgTextureAlpha;\nuniform vec2 uImgTextureBound;\n\n\n\n//#if TEXTURE_UNITS > 0\nuniform sampler2D u_dayTextures[TEXTURE_UNITS];\nuniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];\nuniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];\nuniform bool u_dayTextureFlipY[TEXTURE_UNITS];\n//过滤颜色,rgb代表过滤的颜色,a表示Tolerance\nuniform vec4 u_transparentBackColor[TEXTURE_UNITS];\nuniform bool u_imageryClipEnable[TEXTURE_UNITS];\n\n#ifdef APPLY_ALPHA\nuniform float u_dayTextureAlpha[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SPLIT\nuniform vec2 u_dayTextureSplit[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SWIPE\nuniform vec4 u_dayTextureSwipeRegion[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GLOBESPLIT\nuniform vec2 u_GlobeSplitDirection;\n#endif\n\n#ifdef APPLY_GLOBESWIPE\nuniform vec4 u_GlobeSwipeRegion;\n#endif\n\n#ifdef APPLY_BRIGHTNESS\nuniform float u_dayTextureBrightness[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_CONTRAST\nuniform float u_dayTextureContrast[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_HUE\nuniform float u_dayTextureHue[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SATURATION\nuniform float u_dayTextureSaturation[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GAMMA\nuniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_IMAGERY_CUTOUT\nuniform vec4 u_dayTextureCutoutRectangles[TEXTURE_UNITS];\n#endif\n\nuniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];\n//#endif\n\n\n/*\n//#if GRIDTEXTURE_UNITS > 0\nuniform sampler2D u_gridTextures[GRIDTEXTURE_UNITS];\nuniform vec4 u_gridTextureTranslationAndScale[GRIDTEXTURE_UNITS];\nuniform bool u_gridTextureUseWebMercatorT[GRIDTEXTURE_UNITS];\nuniform vec4 u_gridTextureTexCoordsRectangle[GRIDTEXTURE_UNITS];\n//#endif\n*/\n\n\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates);\n\n#endif\n\n\n\nuniform mat4 uGeoMatrix;\nvec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\nvec4 SRGBtoLINEAR4(vec4 srgbIn)\n{\n#ifndef HDR \n srgbIn = srgbIn ;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n#else\n return srgbIn;\n#endif\n}\n vec3 LINEARtoSRGB(vec3 linearIn)\n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n}\n#ifndef INVALID_OBLIQUE\n vec4 getTextureColor(out vec4 outTexCoord, out vec4 firstColor, out vec4 secColor)\n {\n#ifdef TextureBatch\n vec4 FColor = czm_getTexColorForS3M(uTexture, vTexCoord.xy, vTexSize.xy, vTexTran.xy, vTexScale.xy, vMaxMipLevel.x, outTexCoord.xy);\n#else\n if(vTexMatrix.z < 0.0)\n {\n return vec4(1.0);\n }\n float texTileWidth0 = vTexMatrix.z * u_MaterialParam.textureWidth.x;\n vec3 realTexCoord = vec3(vTexCoord.xy, vTexCoordZ.x);\n vec4 FColor = czm_getTexColorForS3M(uTexture, realTexCoord, texTileWidth0, vTexMatrix.w, vTexMatrix.z, vTexMatrix.xy, vIsRGBA.x, u_MaterialDynamicParameter.texUVOffset, outTexCoord.xy);\n#ifdef Map\n\t\tvec4 FMapColor = czm_getTexColorForS3M(uMapTexture, realTexCoord, texTileWidth0, vTexMatrix.w, vTexMatrix.z, vTexMatrix.xy, vIsRGBA.x, u_MaterialDynamicParameter.texUVOffset, outTexCoord.xy);\n\t\tif(FMapColor.a > 0.9)\n\t\t{\n FColor.rgb = FMapColor.bgr;\n }\n#endif\n#endif\n firstColor = FColor;\n#ifdef MULTI_TEX\n#ifdef TextureBatch\n vec4 SColor = czm_getTexColorForS3M(uSecTexture, vTexCoord.zw, vTexSize.zw, vTexTran.zw, vTexScale.zw, vMaxMipLevel.y, outTexCoord.zw);\n#else\n float texTileWidth1 = vTexMatrix2.z * u_MaterialParam.textureWidth.y;\n realTexCoord = vec3(vTexCoord.zw, vTexCoordZ.y);\n vec4 SColor = czm_getTexColorForS3M(uSecTexture, realTexCoord, texTileWidth1, vTexMatrix2.w, vTexMatrix2.z, vTexMatrix2.xy, vIsRGBA.y, u_MaterialDynamicParameter.texUVOffset, outTexCoord.zw);\n#endif\n#ifdef SEC_TEX_EMISSION\n secColor = SColor;\n return FColor;\n#else\n return SRGBtoLINEAR4(FColor) * SRGBtoLINEAR4(SColor);\n#endif\n#else\n return SRGBtoLINEAR4(FColor);\n#endif\n }\n#endif\n#ifdef SQCLIP\nuniform sampler2D uFrontColorTexture;\nuniform sampler2D uFrontDepthTexture;\nuniform sampler2D uBackDepthTexture;\nuniform float uSQMode; \nfloat computeDepth()\n{\n#ifdef LOG_DEPTH\n return log2(v_depthFromNearPlusOne) * czm_oneOverLog2FarDepthFromNearPlusOne;\n#else\n return gl_FragCoord.z;\n#endif\n}\nbool isPointInObject(vec2 texCoord)\n{\n bool bIn = false;\n vec4 colorInClipTexture = texture2D(uFrontColorTexture,texCoord.xy);\n if(colorInClipTexture.r > 0.99 && colorInClipTexture.g < 0.01 && colorInClipTexture.b < 0.01)\n {\n float depthNear = czm_unpackDepth(texture2D(uFrontDepthTexture, texCoord.xy)) - 0.00001;\n float depthFar = czm_unpackDepth(texture2D(uBackDepthTexture, texCoord.xy)) + 0.00001;\n float currentDepth = computeDepth();\n if(currentDepth > depthNear && currentDepth < depthFar){\n bIn = true;\n }\n }\n return uSQMode < 0.5 ? !bIn : bIn;\n}\n#endif\n\n\nvec2 calculatePolyTexCoord(vec4 vertexPos, vec4 rectPos, out float ptInRect){\n vec4 realVertexPos = vertexPos;\n vec2 vecRatio = vec2(rectPos.z - rectPos.x, rectPos.w - rectPos.y);\n vec2 texCoord = vec2(realVertexPos.x - rectPos.x, realVertexPos.y - rectPos.y);\n texCoord.x = texCoord.x / vecRatio.x;\n texCoord.y = texCoord.y / vecRatio.y;\n ptInRect = step(0.0, texCoord.x) * step(0.0, texCoord.y) * step(0.0, 1.0 - texCoord.x) * step(0.0, 1.0 - texCoord.y);\n texCoord = clamp(texCoord, vec2(0.0), vec2(1.0));\n return texCoord;\n}\n\n#include <brdf>\nvoid InitUniformStructParameter(){\n#ifdef UNIFORM_BUFFER\n#else\n u_LayerParam.minMaxTransparentAndPolygonOffset.x = uMinMaxTransparent.x;\n u_LayerParam.minMaxTransparentAndPolygonOffset.y = uMinMaxTransparent.y;\n u_LayerParam.minMaxTransparentAndPolygonOffset.z = uPolygonOffset.x;\n u_LayerParam.minMaxTransparentAndPolygonOffset.w = uPolygonOffset.y;\n u_MaterialParam.textureWidth.x = uTexture0Width;\n u_MaterialParam.textureWidth.y = uTexture1Width;\n u_MaterialParam.ambientColor = uAmbientColor;\n u_MaterialParam.diffuseColor = uDiffuseColor;\n u_MaterialDynamicParameter.texUVOffset = uTexUVOffset;\n u_MaterialDynamicParameter.fillForeColor = uFillForeColor;\n u_LightParam.ambientLightColor.rgb = uAmbientLightColor;\n u_LightParam.sunLightColor = uSunLightColor;\n u_LightParam.ambientLightColor.a = 1.0;\n u_LightParam.sunDirECAndSunLightON.xyz = czm_sunDirectionEC;\n u_LightParam.sunDirECAndSunLightON.w = uSunLightON;\n#endif\n}\n#ifdef FLOOD_ANALYSIS\nuniform sampler2D uFloodFlagTexture;\nuniform vec4 uFloodRect;\nvarying vec4 vFloodPos;\nbool GetWaterColor(out vec4 color)\n{\n float width = uFloodRect.z - uFloodRect.x;\n float height = uFloodRect.w - uFloodRect.y;\n if(vFloodPos.x < uFloodRect.x || vFloodPos.x > uFloodRect.z || vFloodPos.y < uFloodRect.y || vFloodPos.y > uFloodRect.w)\n {\n return false;\n }\n vec2 floodTexcoord = vec2((vFloodPos.x - uFloodRect.x) / width, (vFloodPos.y - uFloodRect.y) / height);\n vec4 flagColor = texture2D(uFloodFlagTexture, floodTexcoord);\n if(flagColor.r < 0.5)\n {\n return false;\n }\n color = vec4(40.0/255.0,150.0/255.0,200.0/255.0,1.0);\n return true;\n}\n#endif\n#ifdef VISIBLEDISTANCEMAX\n uniform float uVisibleDistanceMax;\n#endif\n#include <executeServerExcavationDecl>\nvoid main()\n{\n InitUniformStructParameter();\n czm_s3mMaterialInput material;\n material.ambientColor = u_MaterialParam.ambientColor;\n material.diffuseColor = u_MaterialParam.diffuseColor;\n material.ambientLightColor = u_LightParam.ambientLightColor;\n material.sunLightColor = u_LightParam.sunLightColor;\n material.sunLightON = u_LightParam.sunDirECAndSunLightON.w;\n material.sunDirectionEC = u_LightParam.sunDirECAndSunLightON.xyz;\n#ifdef FINAL_RESOLUTION_CLIP\n\tif(vertexClip.x > uMaxClip.x || vertexClip.y > uMaxClip.y || vertexClip.z > uMaxClip.z \n\t|| vertexClip.x < uMinClip.x || vertexClip.y < uMinClip.y || vertexClip.z < uMinClip.z) \n { \n discard; \n } \n#endif\n#ifdef Height_Map\n gl_FragColor = czm_packValue(wValue);\n return;\n#endif\nif(vColor.a == 0.0)\n{\n discard;\n}\n#ifdef SQCLIP\n vec2 texCoord = vec2(gl_FragCoord.x / czm_viewport.z, gl_FragCoord.y / czm_viewport.w);\n if(!isPointInObject(texCoord)) \n { \n discard; \n } \n#endif\n#ifdef NORMAL\n vec3 normalMC = normalize(czm_computeNormal(vPositionMC.xyz));\n normalMC = normalMC * 0.5 + vec3(0.5);\n gl_FragColor = vec4(normalMC, 1.0);\n #ifdef GL_EXT_frag_depth\n gl_FragDepthEXT = gl_FragCoord.z;\n #endif\n #ifdef WEBGL2\n gl_FragDepthEXT = gl_FragCoord.z;\n #endif\n return;\n#endif\n#ifdef NORMAL_AND_DEPTH\n#ifdef SILHOUETTE_SELECT_TYPE\n if(fSelectedForSilh < 0.9)\n {\n discard;\n }\n#endif\n vec3 normal = normalize(perVertexNormals);\n float dLength = length(perVertexNormals);\n if(dLength <= 0.9)\n {\n normal = vec3(czm_normal*czm_computeNormal(oriVertex.xyz));\n }\n normal = (normal + 1.0) * 0.5;\n gl_FragColor = vec4(normal, 1.0);\n#ifdef GL_EXT_frag_depth\n gl_FragDepthEXT = gl_FragCoord.z;\n#endif\n#ifdef WEBGL2\n gl_FragDepthEXT = gl_FragCoord.z;\n#endif\n return;\n#endif\n#ifdef APPLY_SPLIT\n if (uSplitDirection > 1.5)\n {\n if(gl_FragCoord.x > uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection > 0.5)\n {\n if(gl_FragCoord.x < uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection < -1.5)\n {\n if(gl_FragCoord.y < uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection < -0.5)\n {\n if(gl_FragCoord.y > uSplitPosition)\n {\n discard;\n }\n }\n#endif\n#ifdef APPLY_SWIPE \n czm_RollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\n#ifdef SERVEREXCAVATION\n if(executeServerExcavation())\n {\n discard;\n }\n#endif\n#ifdef EXCAVATION\n if(czm_executeExcavation())\n {\n discard;\n }\n#endif\n vec4 realTexCoord = vec4(0.0);\n vec4 baseColor = vColor;\n#ifdef INVALID_OBLIQUE\n baseColor *= vec4(0.5,0.5,0.5,1.0);\n#else\n vec4 firstColor;\n vec4 secColor;\n #ifdef InstanceRenderPipeline\n vec4 outTexColor = texture2D(uTexture, (vTexCoord.xy * uTexUVOffset.zw + uTexUVOffset.xy));\n realTexCoord.xy = vTexCoord.xy;\n #else\n vec4 outTexColor = getTextureColor(realTexCoord, firstColor, secColor);\n #endif\n \n baseColor = baseColor * outTexColor;\n#endif\n gl_FragColor = baseColor;\n#ifdef BRDF\n gl_FragColor = brdf(baseColor, realTexCoord.xy, vTexCoord.xy, v_positionEC, vPositionMC.xyz, vNormalEC, uSunLightColor, u_LightParam.sunDirECAndSunLightON.w);\n#endif\n#ifdef ADJUST_COLOR\n gl_FragColor.rgb = czm_adjustColor(gl_FragColor.rgb);\n#endif\n#ifdef TRANSPARENT_BACK_COLOR\n if(uTransparentBackColorTolerance > 0.01)\n {\n float rDiff = abs(uTransparentBackColor.r - gl_FragColor.r);\n float gDiff = abs(uTransparentBackColor.g - gl_FragColor.g);\n float bDiff = abs(uTransparentBackColor.b - gl_FragColor.b);\n if(rDiff < uTransparentBackColorTolerance && gDiff < uTransparentBackColorTolerance && bDiff < uTransparentBackColorTolerance)\n {\n discard;\n }\n }\n#endif\n#ifdef REPLACE_COLOR_TYPE\n if(fSelected.y > 0.9)\n {\n gl_FragColor = vColor;\n }\n#endif\n#ifdef REPLACE_SELECT_TYPE\n if(fSelected.x > 0.9)\n {\n gl_FragColor = vColor;\n }\n#endif\n#ifdef VISIBLEDISTANCEMAX\n if(length(v_positionEC) > uVisibleDistanceMax)\n {\n float minAlphl = min(1.0, (length(v_positionEC) - uVisibleDistanceMax) / 2000.0);\n gl_FragColor.a = 1.0 - minAlphl;\n }\n#endif\n#ifdef HAS_LIGHT\n#ifdef PBR\n czm_S3MPBR(gl_FragColor, realTexCoord);\n#else\n#ifndef BRDF\n#ifdef Instance\n gl_FragColor *= czm_computeLightColorInstanceInFP(material, vPositionRotateMC, vPositionMC.xyz, vPositionMC.w, vNormalEC);\n#else\n #ifndef IGNORE_NORMAL\n gl_FragColor *= czm_computeLightColorInFP(material, vPositionMC.xyz, vPositionMC.w, vNormalEC);\n #endif\n #ifdef IS_SQUARE_PIPE\n gl_FragColor *= czm_computeLightColorInFP(material, vPositionMC.xyz, 0.0, vNormalEC);\n #endif\n#endif\n#endif\n#endif\n#endif\n#ifdef OVERLAY\n float ptInOveralyRect = 1.0;\n vec4 vertexPos = uGeoMatrix * vec4(vPositionMC.xyz, 1.0);\n vec2 vecOverlayTexCoord = calculatePolyTexCoord(vertexPos, uOverlayRect, ptInOveralyRect);\n if(ptInOveralyRect > 0.5)\n {\n vec4 overlayColor = texture2D(uOverlayTexture, vecOverlayTexCoord.xy);\n if(!(overlayColor.r > 0.999 && overlayColor.g > 0.999 && overlayColor.b > 0.999) && !(overlayColor.r < 0.001 && overlayColor.g < 0.001 && overlayColor.b < 0.001))\n {\n vec4 mixColor = mix(gl_FragColor, overlayColor, overlayColor.a);\n gl_FragColor = vec4(mixColor.r, mixColor.g, mixColor.b, gl_FragColor.a);\n }\n }\n#endif\n#ifdef HORIZONTAL_LINE\n gl_FragColor = czm_getHorizontalColor(gl_FragColor, wValue);\n#endif \n\tif(gl_FragColor.a == 0.0)\n\t{\n\t\tdiscard;\n\t}\n#ifdef CLIP\n#ifdef CLIP_FILT_BY_ID\n gl_FragColor *= czm_clip(czm_modelView * vec4(vPositionMC.xyz, 1.0), vIsFiltByID.x);\n#else\n gl_FragColor *= czm_clip(czm_modelView * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n#endif\n#ifdef SILHOUETTE_SELECT_TYPE\n if(uSelectColorType == 2)\n {\n if(fSelectedForSilh > 0.9)\n {\n gl_FragColor = czm_sketchMode(gl_FragColor, uSelColor, 3.0);\n }\n }\n else\n {\n gl_FragColor = czm_sketchMode(gl_FragColor, uSelColor, 3.0);\n }\n#endif\n#ifdef SKETCH_MODE\n gl_FragColor = czm_sketchMode(gl_FragColor, uLineColor, uLineWidth);\n if(gl_FragColor.a < u_LayerParam.minMaxTransparentAndPolygonOffset.x)\n\t{\n\t\tdiscard;\n\t}\n#endif\n#ifdef Only_LineColor\n\tgl_FragColor = uLineColor;\n#endif\n#ifdef EMISSION_TEXTURE\n vec3 normalMC = normalize(czm_computeNormal(vPositionMC.xyz));\n float isNotTopFace = 1.0 - step(0.95, normalMC.z);\n float dayTime = 1.0 - czm_RGBToHSL(uAmbientLightColor.rgb).z;\n vec3 emissionTexColor = czm_getEmissiveTextureColor(wValue) * dayTime;\n gl_FragColor.rgb += uEmissionColor.rgb * emissionTexColor * isNotTopFace;\n#endif\n#ifdef SEC_TEX_EMISSION\n gl_FragColor.rgb += uEmissionColor.rgb * secColor.rgb;\n#endif\n#ifdef TEXTURE_MOVE\n gl_FragColor.rgb = uEmissionColor.rgb * baseColor.rgb;\n#endif\n#ifdef LOG_DEPTH\n if(u_LayerParam.minMaxTransparentAndPolygonOffset.z != 0.0 || u_LayerParam.minMaxTransparentAndPolygonOffset.w != 0.0){\n float logZ = 1.0 / gl_FragCoord.w + 1.0;\n float DZ = max(dFdx(logZ), dFdy(logZ));\n logZ += DZ * u_LayerParam.minMaxTransparentAndPolygonOffset.z + 0.0000001 * u_LayerParam.minMaxTransparentAndPolygonOffset.w;\n czm_writeLogDepth(logZ);\n }\n else{\n czm_writeLogDepth(v_depthFromNearPlusOne);\n }\n#endif\n#ifdef PARTLY_TRANSPARENT\n #ifdef TRANSPARENT_PASS\n if(gl_FragColor.a > 0.95){\n discard;\n }\n #else\n if(gl_FragColor.a <= 0.95){\n discard;\n }\n #endif\n#endif\n gl_FragColor.rgb = LINEARtoSRGB(gl_FragColor.rgb);\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n#ifdef HYPSOMETRIC\n\tif(uHypsometricVisible>0.5)\n\t{\n #ifdef Volume2\n vec4 volColor = texture2D(uVolumeTexture, vec2(vTexCoord.x, 1.0 - vTexCoord.y));\n gl_FragColor = czm_getHypsometricColor(gl_FragColor, volColor);\n #else\n gl_FragColor = czm_getHypsometricColor(gl_FragColor, wValue);\n #endif\n }\n#endif\n#ifdef IMAGERY\nvec2 texcood = vec2(imgCoord.x/uImgTextureBound.x, imgCoord.y/uImgTextureBound.y);\n/*\nvec4 imageColor = texture2D(uImgTexture, texcood);\nif(imageColor.a > 0.9 && uImgTextureAlpha > 0.9)\n{\n gl_FragColor = imageColor;\n}\nelse\n{\n gl_FragColor.rgb = mix(gl_FragColor.rgb, imageColor.rgb, uImgTextureAlpha*imageColor.a);\n}\n*/\n#ifdef MULTIBATCH\n\tgl_FragColor = computeDayColor(vec4(1.0,1.0,1.0,0.0), clamp(vec3(texcood,0.0), 0.0, 1.0));\n#else\n\tgl_FragColor = computeDayColor(gl_FragColor, clamp(vec3(texcood,0.0), 0.0, 1.0));\n#endif\n#endif\n#ifdef FLOOD_ANALYSIS\n vec4 floodColor = vec4(1.0,1.0,1.0,1.0);\n if(GetWaterColor(floodColor))\n {\n gl_FragColor = floodColor;\n return;\n }\n#endif\n}",_0x2b0c8f=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x367e9b=_0x2b0c8f(void 0,(function(){return _0x367e9b.toString().search("(((.+)+)+)+$").toString().constructor(_0x367e9b).search("(((.+)+)+)+$")}));_0x367e9b();var _0x2d1fa9="attribute vec4 aPosition;\n#endif\n#ifdef TexCoord\n varying vec4 vTexCoord;\n#endif\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\nvarying vec4 vSecondColor;\n#ifdef REPLACE_SELECT_TYPE\nvarying float fSelected;\n#endif\nuniform vec4 uSelColor;\nuniform vec2 textureRepeat;\n#ifdef LineVector\nuniform vec4 uLineColor;\n#endif\n#ifdef COMPRESS_VERTEX\n uniform vec4 decode_position_min;\n uniform float decode_position_normConstant;\n#endif\nuniform vec4 uFillForeColor;\nvarying vec4 vColor;\nvoid main()\n{\n#ifdef COMPRESS_VERTEX\n vec4 vertexPos = vec4(1.0);\n vertexPos = decode_position_min + aPosition * decode_position_normConstant;\n#else\n vec4 vertexPos = aPosition;\n#endif\n#ifdef TexCoord\n vTexCoord.xy = vertexPos.xy * textureRepeat;\n#endif\n vertexPos.w = 1.0;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n#ifdef REPLACE_SELECT_TYPE\n fSelected = 0.0;\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor, fSelected);\n#else\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n#endif\n#ifdef LineVector\n vColor = vertexColor * uLineColor;\n#else \n vColor = vertexColor*uFillForeColor;\n#endif\n gl_Position = czm_modelViewProjection * vertexPos;\n}",_0x520f9a=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2cf8e3=_0x520f9a(void 0,(function(){return _0x2cf8e3.toString().search("(((.+)+)+)+$").toString().constructor(_0x2cf8e3).search("(((.+)+)+)+$")}));_0x2cf8e3();var _0xc718bd="#ifdef TexCoord\n uniform sampler2D uTexture;\n varying vec4 vTexCoord;\n#endif\n uniform vec4 uEmissionColor;\n varying vec4 vColor;\n varying vec4 vSecondColor;\n#ifdef REPLACE_SELECT_TYPE\n varying float fSelected;\n#endif\nvoid main()\n{\n\tif(vColor.a == 0.0)\n\t{\n\t\tdiscard;\n\t}\n#ifdef TexCoord\n vec4 texColor = texture2D(uTexture, vTexCoord.xy);\n gl_FragColor = texColor * vColor;\n#else\n gl_FragColor = vColor;\n#endif\n#ifdef REPLACE_SELECT_TYPE\n if(fSelected > 0.9)\n {\n gl_FragColor = vColor;\n }\n#endif\n\tif(gl_FragColor.a == 0.0)\n\t{\n\t\tdiscard;\n\t}\n gl_FragColor.rgb *= uEmissionColor.rgb;\n}",_0x30158c=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3fb7e1=_0x30158c(void 0,(function(){return _0x3fb7e1.toString().search("(((.+)+)+)+$").toString().constructor(_0x3fb7e1).search("(((.+)+)+)+$")}));_0x3fb7e1();var _0x422fc8="\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n#extension GL_EXT_shader_texture_lod : enable\n#ifdef COMPUTE_W_VALUE\n varying float wValue;\n#endif\n#ifdef TexCoord\n varying vec4 vTexCoord;\n varying vec2 vTexCoordZ;\n#endif\n#ifdef NO_TEXCOORD\n uniform sampler2D uTexture;\n#endif\n#ifdef COMPUTE_TEXCOORD\n varying vec4 vTexMatrix;\n varying vec2 vIsRGBA;\n#endif\n#ifdef PBR_THEME\n uniform mat4 uPBRMaterials[NUM_PBR_MATERIALS];\n varying float vPBRIndex;\n#endif\nvarying vec4 vColor;\nvarying vec4 vPositionMC;\nvarying vec3 v_positionEC;\nvarying vec4 vSecondColor;\nvarying vec3 vNormalEC;\n#ifdef Instance\n varying vec3 vPositionRotateMC;\n#endif\n#ifdef IMAGERY\nvarying vec2 imgCoord;\nuniform sampler2D uImgTexture;\nuniform float uImgTextureAlpha;\nuniform vec2 uImgTextureBound;\n#endif\n#ifdef USE_BatchPBR\n varying vec4 vMetallicRoughness;\n varying vec4 vEmissiveFactor;\n varying vec3 vAlphaCutoffAndModeAndDoubleSide;\n#endif\n#ifdef OVERLAY\n uniform vec4 uOverlayRect;\n uniform sampler2D uOverlayTexture;\n#endif\n#ifdef NORMAL_AND_DEPTH\n varying vec4 oriVertex;\n varying vec3 perVertexNormals;\n varying float depthInCamera;\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#endif\n#ifdef QUAD_OUTLINE\n varying float vDistanceFromEye;\n#endif\n#ifdef APPLY_SPLIT\nuniform float uSplitDirection;\nuniform float uSplitPosition;\n#endif\n#ifdef APPLY_SWIPE\n uniform vec4 uSwipeRegion;\n#endif\nvarying vec4 vIsFiltByID;\n#ifdef SILHOUETTE_SELECT_TYPE\nuniform vec4 uSelColor;\nuniform int uSelectColorType;\nvarying float fSelectedForSilh;\n#endif\n#ifdef SKETCH_MODE\n uniform vec4 uLineColor;\n uniform float uLineWidth;\n#endif\n#ifdef POINT\n varying float v_pixelDistance;\n#endif\n#ifdef Only_LineColor\n uniform vec4 uLineColor;\n#endif\n uniform vec4 uEmissionColor;\n#ifdef POST_EFFECT\n uniform float uMaxBloomHeight;\n#endif\n uniform vec2 uPolygonOffset;\n uniform vec2 uMinMaxTransparent;\n struct LayerParameter{\n vec4 translationAndBottom;\n vec4 minMaxTransparentAndPolygonOffset;\n vec4 selColor;\n float pointSize;\n };\n uniform vec4 uAmbientColor;\n uniform vec4 uDiffuseColor;\n struct MaterialParameter{\n vec4 ambientColor;\n vec4 diffuseColor;\n mat4 texMatrix;\n vec2 textureWidth;\n };\n uniform vec4 uFillForeColor;\n uniform vec4 uTexUVOffset;\n struct MaterialDynamicParameter{\n vec4 texUVOffset;\n vec4 fillForeColor;\n };\n \n uniform vec3 uAmbientLightColor;\n uniform vec4 uSunLightColor;\n uniform float uSunLightON;\n struct LightParameter{\n vec4 ambientLightColor;\n vec4 sunLightColor;\n vec4 sunDirECAndSunLightON;\n };\n LayerParameter u_LayerParam;\n MaterialParameter u_MaterialParam;\n MaterialDynamicParameter u_MaterialDynamicParameter;\n LightParameter u_LightParam;\n#ifdef SQCLIP\nuniform sampler2D uFrontColorTexture;\nuniform sampler2D uFrontDepthTexture;\nuniform sampler2D uBackDepthTexture;\nuniform float uSQMode; \nfloat computeDepth()\n{\n#ifdef LOG_DEPTH\n return log2(v_depthFromNearPlusOne) * czm_oneOverLog2FarDepthFromNearPlusOne;\n#else\n return gl_FragCoord.z;\n#endif\n}\nbool isPointInObject(vec2 texCoord)\n{\n bool bIn = false;\n vec4 colorInClipTexture = texture2D(uFrontColorTexture,texCoord.xy);\n if(colorInClipTexture.r > 0.99 && colorInClipTexture.g < 0.01 && colorInClipTexture.b < 0.01)\n {\n float depthNear = czm_unpackDepth(texture2D(uFrontDepthTexture, texCoord.xy)) - 0.00001;\n float depthFar = czm_unpackDepth(texture2D(uBackDepthTexture, texCoord.xy)) + 0.00001;\n float currentDepth = computeDepth();\n if(currentDepth > depthNear && currentDepth < depthFar){\n bIn = true;\n }\n }\n return uSQMode < 0.5 ? !bIn : bIn;\n}\n#endif\n\nvec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\nvec4 SRGBtoLINEAR4(vec4 srgbIn)\n{\n srgbIn = srgbIn;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n vec3 LINEARtoSRGB(vec3 linearIn)\n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n}\n\n#include <brdf>\n\nvoid InitUniformStructParameter(){\n#ifdef UNIFORM_BUFFER\n#else\n u_LayerParam.minMaxTransparentAndPolygonOffset.x = uMinMaxTransparent.x;\n u_LayerParam.minMaxTransparentAndPolygonOffset.y = uMinMaxTransparent.y;\n u_LayerParam.minMaxTransparentAndPolygonOffset.z = uPolygonOffset.x;\n u_LayerParam.minMaxTransparentAndPolygonOffset.w = uPolygonOffset.y;\n u_MaterialParam.ambientColor = uAmbientColor;\n u_MaterialParam.diffuseColor = uDiffuseColor;\n u_MaterialDynamicParameter.fillForeColor = uFillForeColor;\n u_MaterialDynamicParameter.texUVOffset = uTexUVOffset;\n u_LightParam.ambientLightColor.rgb = uAmbientLightColor;\n u_LightParam.ambientLightColor.a = 1.0;\n u_LightParam.sunLightColor = uSunLightColor;\n u_LightParam.sunDirECAndSunLightON.xyz = czm_sunDirectionEC;\n u_LightParam.sunDirECAndSunLightON.w = uSunLightON;\n#endif\n}\n#ifdef VISIBLEDISTANCEMAX\n uniform float uVisibleDistanceMax;\n#endif\n uniform mat4 uGeoMatrix;\nvec2 calculatePolyTexCoord(vec4 vertexPos, vec4 rectPos, out float ptInRect){\n vec4 realVertexPos = vertexPos;\n vec2 vecRatio = vec2(rectPos.z - rectPos.x, rectPos.w - rectPos.y);\n vec2 texCoord = vec2(realVertexPos.x - rectPos.x, realVertexPos.y - rectPos.y);\n texCoord.x = texCoord.x / vecRatio.x;\n texCoord.y = texCoord.y / vecRatio.y;\n ptInRect = step(0.0, texCoord.x) * step(0.0, texCoord.y) * step(0.0, 1.0 - texCoord.x) * step(0.0, 1.0 - texCoord.y);\n texCoord = clamp(texCoord, vec2(0.0), vec2(1.0));\n return texCoord;\n}\nvoid main()\n{\n InitUniformStructParameter();\n czm_s3mMaterialInput material;\n material.ambientColor = u_MaterialParam.ambientColor;\n material.diffuseColor = u_MaterialParam.diffuseColor;\n material.ambientLightColor = u_LightParam.ambientLightColor;\n material.sunLightColor = u_LightParam.sunLightColor;\n material.sunLightON = u_LightParam.sunDirECAndSunLightON.w;\n material.sunDirectionEC = u_LightParam.sunDirECAndSunLightON.xyz;\n#ifdef SQCLIP\n vec2 texCoord = vec2(gl_FragCoord.x / czm_viewport.z, gl_FragCoord.y / czm_viewport.w);\n if(!isPointInObject(texCoord)) \n { \n discard; \n } \n#endif\n#ifdef NORMAL\n vec3 normalMC = normalize(czm_computeNormal(vPositionMC.xyz));\n normalMC = normalMC * 0.5 + vec3(0.5);\n gl_FragColor = vec4(normalMC, 1.0);\n #ifdef GL_EXT_frag_depth\n gl_FragDepthEXT = gl_FragCoord.z;\n #endif\n #ifdef WEBGL2\n gl_FragDepthEXT = gl_FragCoord.z;\n #endif\n return;\n#endif\n#ifdef NORMAL_AND_DEPTH\n#ifdef SILHOUETTE_SELECT_TYPE\n if(fSelectedForSilh < 0.9)\n {\n discard;\n }\n#endif\n vec3 normal = normalize(perVertexNormals);\n float dLength = length(perVertexNormals);\n if(dLength <= 0.5)\n {\n normal = vec3(czm_normal*czm_computeNormal(oriVertex.xyz));\n }\n normal = vec3(czm_normal*czm_computeNormal(oriVertex.xyz));\n normal = (normal + 1.0) * 0.5;\n gl_FragColor = vec4(normal, 1.0);\n#ifdef GL_EXT_frag_depth\n gl_FragDepthEXT = gl_FragCoord.z;\n#endif\n#ifdef WEBGL2\n gl_FragDepthEXT = gl_FragCoord.z;\n#endif\n#endif\n return;\n#endif\n#ifdef APPLY_SPLIT\n if (uSplitDirection > 1.5)\n {\n if(gl_FragCoord.x > uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection > 0.5)\n {\n if(gl_FragCoord.x < uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection < -1.5)\n {\n if(gl_FragCoord.y < uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection < -0.5)\n {\n if(gl_FragCoord.y > uSplitPosition)\n {\n discard;\n }\n }\n#endif\n#ifdef APPLY_SWIPE\n czm_RollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\n#ifdef EXCAVATION\n if(czm_executeExcavation())\n {\n discard;\n }\n#endif\n\tif(vColor.a == 0.0)\n\t{\n\t discard;\n\t}\n gl_FragColor = vColor;\n#ifdef LineVector\n gl_FragColor = vColor * uDiffuseColor;\n#endif\n#ifdef NO_TEXCOORD\n#ifndef REPLACE_COLOR_TYPE\n gl_FragColor *= texture2D(uTexture, vec2(0.5));\n#endif\n#endif\n#ifdef BRDF\n vec2 texCoord = vec2(0.0);\n #ifdef TexCoord\n texCoord = vTexCoord.xy;\n #endif\n gl_FragColor = brdf(gl_FragColor, texCoord, texCoord, v_positionEC, vPositionMC.xyz, vNormalEC, uSunLightColor, u_LightParam.sunDirECAndSunLightON.w);\n#endif\n#ifdef ADJUST_COLOR\n\tgl_FragColor.rgb = czm_adjustColor(gl_FragColor.rgb);\n#endif\n#ifdef POINT\n float distanceToCenter = length(gl_PointCoord - vec2(0.5));\n float maxDistance = max(0.0, 0.5 - v_pixelDistance);\n float wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);\n gl_FragColor.a *= wholeAlpha;\n if(gl_FragColor.a < 0.1)\n {\n discard;\n }\n#endif\n#ifdef VISIBLEDISTANCEMAX\n if(length(v_positionEC) > uVisibleDistanceMax)\n {\n float minAlphl = min(1.0, (length(v_positionEC) - uVisibleDistanceMax) / 2000.0);\n gl_FragColor.a = 1.0 - minAlphl;\n }\n#endif\n#ifdef HYPSOMETRIC\n\tif(uHypsometricVisible>0.5)\n\t{\n #ifdef Volume2\n vec4 volColor = texture2D(uVolumeTexture, vec2(vTexCoord.x, 1.0 - vTexCoord.y));\n gl_FragColor = czm_getHypsometricColor(gl_FragColor, volColor);\n #else\n gl_FragColor = czm_getHypsometricColor(gl_FragColor, wValue);\n #ifdef MultiTemporalWeight\n if(gl_FragColor.a < 0.1)\n {\n discard;\n }\n #endif\n #endif\n }\n#endif\n#ifdef HAS_LIGHT\n#ifdef PBR\n czm_S3MPBR(gl_FragColor, vec2(0.0));\n#else\n#ifndef BRDF\n#ifndef POINT\n#ifdef Instance\n gl_FragColor *= czm_computeLightColorInstanceInFP(material, vPositionRotateMC, vPositionMC.xyz, vPositionMC.w, vNormalEC);\n#else\n gl_FragColor *= czm_computeLightColorInFP(material, vPositionMC.xyz, vPositionMC.w, vNormalEC);\n#endif\n#endif\n#endif\n#endif\n#endif\n\n#ifdef OVERLAY\n float ptInOveralyRect = 1.0;\n vec4 vertexPos = uGeoMatrix * vec4(vPositionMC.xyz, 1.0);\n vec2 vecOverlayTexCoord = calculatePolyTexCoord(vertexPos, uOverlayRect, ptInOveralyRect);\n if(ptInOveralyRect > 0.5)\n {\n vec4 overlayColor = texture2D(uOverlayTexture, vecOverlayTexCoord.xy);\n if(!(overlayColor.r > 0.999 && overlayColor.g > 0.999 && overlayColor.b > 0.999) && !(overlayColor.r < 0.001 && overlayColor.g < 0.001 && overlayColor.b < 0.001))\n {\n vec4 mixColor = mix(gl_FragColor, overlayColor, overlayColor.a);\n gl_FragColor = vec4(mixColor.r, mixColor.g, mixColor.b, gl_FragColor.a);\n }\n }\n#endif\n#ifdef HORIZONTAL_LINE\n gl_FragColor = czm_getHorizontalColor(gl_FragColor, wValue);\n#endif\n\tif(gl_FragColor.a == 0.0)\n\t{\n\t\tdiscard;\n\t}\n#ifdef CLIP\n#ifdef CLIP_FILT_BY_ID\n gl_FragColor *= czm_clip(czm_modelView * vec4(vPositionMC.xyz, 1.0), vIsFiltByID.x);\n#else\n gl_FragColor *= czm_clip(czm_modelView * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n#endif\n#ifdef SILHOUETTE_SELECT_TYPE\n if(uSelectColorType == 2)\n {\n if(fSelectedForSilh > 0.9)\n {\n gl_FragColor = czm_sketchMode(gl_FragColor, uSelColor, 3.0);\n }\n }\n else\n {\n gl_FragColor = czm_sketchMode(gl_FragColor, uSelColor, 3.0);\n }\n#endif\n#ifdef SKETCH_MODE\n\tgl_FragColor = czm_sketchMode(gl_FragColor, uLineColor, uLineWidth);\n\tif(gl_FragColor.a < u_LayerParam.minMaxTransparentAndPolygonOffset.x)\n\t{\n\t\tdiscard;\n\t}\n#endif\n#ifdef Only_LineColor\n\tgl_FragColor = uLineColor;\n#endif\n#ifdef LOG_DEPTH\n#ifndef QUAD_OUTLINE\n if(u_LayerParam.minMaxTransparentAndPolygonOffset.z != 0.0 || u_LayerParam.minMaxTransparentAndPolygonOffset.w != 0.0){\n float logZ = 1.0 / gl_FragCoord.w + 1.0;\n float DZ = max(dFdx(logZ), dFdy(logZ));\n logZ += DZ * u_LayerParam.minMaxTransparentAndPolygonOffset.z + 0.0000001 * u_LayerParam.minMaxTransparentAndPolygonOffset.w;\n czm_writeLogDepth(logZ);\n }\n else{\n czm_writeLogDepth(v_depthFromNearPlusOne);\n }\n#else\n czm_writeLogDepth(v_depthFromNearPlusOne - 0.8);\n#endif\n#endif\n#ifdef EMISSION_TEXTURE\n vec3 normalMC = normalize(czm_computeNormal(vPositionMC.xyz));\n float isNotTopFace = 1.0 - step(0.95, normalMC.z);\n float dayTime = 1.0 - czm_RGBToHSL(uAmbientLightColor.rgb).z;\n vec3 emissionTexColor;\n #ifdef TexCoord\n emissionTexColor = czm_getEmissiveTextureColor(wValue, vTexCoord.xy) * dayTime;\n #else\n emissionTexColor = czm_getEmissiveTextureColor(wValue) * dayTime;\n #endif\n gl_FragColor.rgb += uEmissionColor.rgb * emissionTexColor * isNotTopFace;\n#else\n gl_FragColor.rgb *= uEmissionColor.rgb;\n#endif\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n#ifdef QUAD_OUTLINE\n float attenuation = 1.0;\n if (vDistanceFromEye > 0.0 && vDistanceFromEye <= 500.0) {\n attenuation = clamp(1.0 - smoothstep(0.0, 500.0, vDistanceFromEye), 0.6, 1.0); }\n else if (vDistanceFromEye > 500.0 && vDistanceFromEye <= 20000.0) {\n attenuation = clamp(1.0 - smoothstep(500.0, 10000.0, vDistanceFromEye), 0.0, 0.6); }\n else {\n attenuation = 0.0;\n }\n gl_FragColor.a *= attenuation;\n#endif\n#ifdef IMAGERY\n vec2 texcood = vec2(imgCoord.x/uImgTextureBound.x, imgCoord.y/uImgTextureBound.y);\n vec4 imageColor = texture2D(uImgTexture, texcood);\n if(imageColor.a > 0.9 && uImgTextureAlpha > 0.9)\n {\n gl_FragColor = imageColor;\n }\n else\n {\n gl_FragColor.rgb = mix(gl_FragColor.rgb, imageColor.rgb, uImgTextureAlpha*imageColor.a);\n }\n#endif\n}",_0x5ecc3a=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1aba25=_0x5ecc3a(void 0,(function(){return _0x1aba25.toString().search("(((.+)+)+)+$").toString().constructor(_0x1aba25).search("(((.+)+)+)+$")}));_0x1aba25();var _0xf24962="attribute vec3 aPosition;\n\nattribute vec3 aNormal;\n\nattribute vec4 aTexCoord0;\n\nattribute vec4 aTexCoord1;\n\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\n\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying vec4 vTexCoord;\nvarying vec4 clip_vertex;\nuniform vec4 uSelColor;\nuniform vec4 uDiffuseColor;\n\nfloat computerOnePixelLength()\n{\n\tvec4 viewPos = czm_modelView * vec4(aPosition, 1.0);\n\tviewPos.xyz *= 0.9;\n\tvec4 winPos = czm_projection * viewPos;\n\tfloat dwidth = czm_metersPerPixel(viewPos);\n\t#ifdef EYE_DISTANCE_SCALING\n\t dwidth = 1.0;\n\t#endif\n\twinPos.x = winPos.x - 2.0 * dwidth;\n\tvec4 newViewPos = czm_inverseProjection * winPos;\n\treturn length(viewPos - newViewPos);\n}\n\nvec4 computePos(vec3 v3Normal)\n{\n vec4 viewPos = czm_modelView * vec4(aPosition, 1.0);\n\tviewPos.xyz = viewPos.xyz + v3Normal * computerOnePixelLength();\n\tviewPos.xyz = viewPos.xyz * 0.9;\n\tclip_vertex = viewPos;\n\tvec4 pos = czm_projection * viewPos;\n\treturn pos;\n}\n\nvoid main()\n{\n vTexCoord.xy = aTexCoord0.xy;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n vColor = vertexColor * uDiffuseColor;\n#ifdef ICON\n gl_Position = computePos(aTexCoord1.xyz);\n#else\n vTexCoord.zw = aTexCoord1.xy;\n gl_Position = computePos(aNormal);\n#endif\n}",_0x52d603=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x319c3e=_0x52d603(void 0,(function(){return _0x319c3e.toString().search("(((.+)+)+)+$").toString().constructor(_0x319c3e).search("(((.+)+)+)+$")}));_0x319c3e();var _0xdfcd48="attribute vec3 aPosition;\n\nattribute vec3 aNormal;\n\nattribute vec4 aTexCoord0;\n\nattribute vec4 aTexCoord1;\nattribute vec4 uv0;\n\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\n\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying vec4 vTexCoord;\nvarying vec4 clip_vertex;\nuniform vec4 uSelColor;\nuniform vec4 uDiffuseColor;\n\nfloat computerOnePixelLength()\n{\n\tvec4 viewPos = czm_modelView * vec4(aPosition, 1.0);\n\tvec4 winPos = czm_projection * viewPos;\n\tfloat dwidth = czm_metersPerPixel(viewPos);\n\twinPos.x = winPos.x - 2.0 * dwidth;\n\tvec4 newViewPos = czm_inverseProjection * winPos;\n\treturn length(viewPos - newViewPos);\n}\nmat3 RotateZ(in float angle)\n{\n float sina = sin(angle);\n float cosa = cos(angle);\n mat3 rotMatrix = mat3(cosa, sina, 0, -sina, cosa, 0, 0, 0, 1);\n return rotMatrix;\n}\n\nvec4 computePos(vec3 v3Normal)\n{\n vec4 viewPos = czm_modelView * vec4(aPosition, 1.0);\n vec4 origViewPos = czm_view * vec4(0.0, 0.0, 0.0, 1.0);\n vec4 cameraViewPos = vec4(0.0, 0.0, 0.0, 1.0);\n vec4 fixedAxis = vec4(1.0);\n vec3 xAxis = vec3(1.0);\n vec3 yAxis = vec3(1.0);\n vec3 zAxis = vec3(1.0);\n vec4 cameraViewVector = vec4(1.0);\n if (czm_sceneMode != czm_sceneMode3D)\n {\n fixedAxis = czm_view * vec4(1.0, 0.0, 0.0, 1.0);\n fixedAxis = fixedAxis - origViewPos;\n zAxis = normalize(fixedAxis.xyz);\n cameraViewVector = viewPos - cameraViewPos;\n yAxis = normalize(cameraViewVector.xyz);\n xAxis = normalize(cross(yAxis, zAxis));\n yAxis = cross(zAxis, xAxis);\n }\n else\n {\n fixedAxis = viewPos - origViewPos;\n yAxis = normalize(fixedAxis.xyz);\n cameraViewVector = cameraViewPos - viewPos;\n zAxis = normalize(cameraViewVector.xyz);\n xAxis = normalize(cross(yAxis, zAxis));\n zAxis = cross(xAxis, yAxis);\n }\n mat3 matrix = mat3(xAxis, yAxis, zAxis) * RotateZ(aTexCoord0.z);\n vec3 offset = czm_sceneMode != czm_sceneMode3D ? v3Normal.xzy : v3Normal;\n offset = matrix * offset;\n\tviewPos.xyz = viewPos.xyz + offset;\n\tclip_vertex = viewPos;\n\tvec4 pos = czm_projection * viewPos;\n\treturn pos;\n}\n\nvoid main()\n{\n vTexCoord.xy = aTexCoord0.xy;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n vColor = vertexColor * uDiffuseColor;\n#ifdef ICON\n gl_Position = computePos(aTexCoord1.xyz);\n#else\n vTexCoord.zw = aTexCoord1.xy;\n gl_Position = computePos(aNormal);\n#endif\n}",_0xba012e=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x41a84b=_0xba012e(void 0,(function(){return _0x41a84b.toString().search("(((.+)+)+)+$").toString().constructor(_0x41a84b).search("(((.+)+)+)+$")}));_0x41a84b();var _0x3c7572="attribute vec3 aPosition;\n\nattribute vec3 aNormal;\n\nattribute vec4 aTexCoord0;\n\nattribute vec4 aTexCoord1;\n\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\n\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying vec4 vTexCoord;\nvarying vec4 clip_vertex;\nuniform vec4 uSelColor;\nuniform vec4 uDiffuseColor;\n\nfloat computerOnePixelLength()\n{\n\tvec4 viewPos = czm_modelView * vec4(aPosition, 1.0);\n\tvec4 winPos = czm_projection * viewPos;\n\tfloat dwidth = czm_metersPerPixel(viewPos);\n\twinPos.x = winPos.x - 2.0 * dwidth;\n\tvec4 newViewPos = czm_inverseProjection * winPos;\n\treturn length(viewPos - newViewPos);\n}\n\nmat3 rotateZ(in float angle)\n{\n float sina = sin(angle);\n float cosa = cos(angle);\n mat3 rotMatrix = mat3(cosa, sina, 0.0, -sina, cosa, 0.0, 0.0, 0.0, 1.0);\n return rotMatrix;\n}\nvec4 computePos(vec3 v3Normal)\n{\n vec4 viewPos = czm_modelView * vec4(aPosition, 1.0);\n vec4 origViewPos = czm_view * vec4(0.0, 0.0, 0.0, 1.0);\n vec4 fixedAxis = viewPos - origViewPos;\n vec3 zAxis = normalize(fixedAxis.xyz);\n vec4 upView = vec4(0.0, 1.0, 0.0, 1.0);\n upView = czm_view * upView;\n vec3 upViewVector = normalize(upView.xyz - origViewPos.xyz);\n vec3 xAxis = normalize(cross(upViewVector, zAxis));\n vec3 yAxis = cross(zAxis, xAxis);\n yAxis = normalize(yAxis);\n mat3 matrix = mat3(xAxis,yAxis,zAxis);\n vec3 offset = matrix * rotateZ(-czm_piOverFour * 3.0 + aTexCoord0.z) * v3Normal;\n\tviewPos.xyz = viewPos.xyz + offset * computerOnePixelLength();\n\tclip_vertex = viewPos;\n\tvec4 pos = czm_projection * viewPos;\n\treturn pos;\n}\n\nvoid main()\n{\n vTexCoord.xy = aTexCoord0.xy;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n vColor = vertexColor * uDiffuseColor;\n#ifdef ICON\n gl_Position = computePos(aTexCoord1.xyz);\n#else\n vTexCoord.zw = aTexCoord1.xy;\n gl_Position = computePos(aNormal);\n#endif\n}",_0x568f12=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1eefc2=_0x568f12(void 0,(function(){return _0x1eefc2.toString().search("(((.+)+)+)+$").toString().constructor(_0x1eefc2).search("(((.+)+)+)+$")}));_0x1eefc2();var _0x31bf11="uniform sampler2D uTexture;\nuniform sampler2D uSecTexture;\nuniform vec4 uAmbientColor;\n\nvarying vec4 vColor;\nvarying vec4 vTexCoord;\nvarying vec4 clip_vertex;\nvarying vec4 vSecondColor;\n#ifdef APPLY_SPLIT\nuniform float uSplitDirection;\nuniform float uSplitPosition;\n#endif\n#ifdef APPLY_SWIPE\n uniform vec4 uSwipeRegion;\n#endif\nvoid main()\n{\n#ifdef APPLY_SPLIT\n if (uSplitDirection > 1.5)\n {\n if(gl_FragCoord.x > uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection > 0.5)\n {\n if(gl_FragCoord.x < uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection < -1.5)\n {\n if(gl_FragCoord.y < uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection < -0.5)\n {\n if(gl_FragCoord.y > uSplitPosition)\n {\n discard;\n }\n }\n#endif\n#ifdef APPLY_SWIPE \n czm_RollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\n\tif(vColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n\tvec4 texColor = vec4(vColor.rgb, min(texture2D(uTexture, vTexCoord.xy).a, vColor.a));\n\tvec4 haloTexColor = vec4(uAmbientColor.rgb, min(texture2D(uSecTexture, vTexCoord.zw).a, uAmbientColor.a));\n\tif(texColor.a + haloTexColor.a < 0.2)\n\t{\n\t\tdiscard;\n\t}\n\tvec3 v3Color = mix(haloTexColor.rgb, texColor.rgb, texColor.a + 0.2);\n\tgl_FragColor = vec4(v3Color.rgb, min(1.0, texColor.a + haloTexColor.a));\n\tif(gl_FragColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n#ifdef CLIP\n\tgl_FragColor *= czm_clip(clip_vertex, 1.0);\n\tgl_FragColor = czm_gammaCorrect(gl_FragColor);\n#endif\n}",_0x2c6a38=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x41cf96=_0x2c6a38(void 0,(function(){return _0x41cf96.toString().search("(((.+)+)+)+$").toString().constructor(_0x41cf96).search("(((.+)+)+)+$")}));_0x41cf96();var _0x138417="uniform sampler2D uTexture;\nvarying vec4 vColor;\nvarying vec4 vTexCoord;\nvarying vec4 clip_vertex;\nvarying vec4 vSecondColor;\n#ifdef APPLY_SPLIT\n uniform float uSplitDirection;\n uniform float uSplitPosition;\n#endif\n#ifdef APPLY_SWIPE\n uniform vec4 uSwipeRegion;\n#endif\n\nvoid main()\n{\n\tif(vColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n\tvec4 texColor = texture2D(uTexture, vTexCoord.xy);\n#ifdef RGBTOBGR\n texColor = vec4(texColor.b, texColor.g, texColor.r, texColor.a);\n#endif\n\tgl_FragColor = vColor * texColor;\n\tif(gl_FragColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n#ifdef CLIP\n\tgl_FragColor *= czm_clip(clip_vertex, 1.0);\n#endif\n#ifdef APPLY_SPLIT\n if (uSplitDirection > 1.5)\n {\n if(gl_FragCoord.x > uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection > 0.5)\n {\n if(gl_FragCoord.x < uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection < -1.5)\n {\n if(gl_FragCoord.y < uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection < -0.5)\n {\n if(gl_FragCoord.y > uSplitPosition)\n {\n discard;\n }\n }\n#endif\n#ifdef APPLY_SWIPE \n czm_RollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n}",_0x36c81d=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x4a2930=_0x36c81d(void 0,(function(){return _0x4a2930.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a2930).search("(((.+)+)+)+$")}));_0x4a2930();var _0x4e3bb1="attribute vec4 aPosition;\n\nattribute vec4 aTexCoord0;\n\nattribute vec4 aTexCoord1;\n\nattribute vec4 aTexCoord2;\n\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\n\nuniform float uLineWidth;\nuniform float uIsPicking;\nuniform vec4 uPickPosition;\nuniform mat4 uMatrixInvert;\nuniform vec4 uDiffuseColor;\nuniform vec4 uSelColor;\n#ifdef SELECTED\nvarying float fSelected;\n#endif\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying float vWindowZ;\n\nconst float SCREEN_VALUE = 1.0 / (2.0 * 1236.077);\n\nfloat ComputerLineWidth()\n{\n\tvec4 worldPos = czm_model * aPosition;\n\treturn uLineWidth * length(czm_viewerPositionWC - worldPos.xyz) * SCREEN_VALUE;\n}\n\nvoid main()\n{\n float shadowVolumeWidth = ComputerLineWidth();\n vec4 vertexPos = aPosition;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n if(uIsPicking > 0.0)\n {\n\t\tshadowVolumeWidth = shadowVolumeWidth * 3.0;\n\t\tvertexPos.xyz = vertexPos.xyz + aTexCoord2.xyz * shadowVolumeWidth + normalize(aTexCoord1.xyz) * uPickPosition.z;\n }\n else\n {\n\t\tvertexPos.xyz = vertexPos.xyz + aTexCoord2.xyz * shadowVolumeWidth + aTexCoord1.xyz;\n }\n vec4 v_Position = czm_modelViewProjection * vertexPos;\n vColor = vertexColor * uDiffuseColor;\n#ifdef SELECTED\n vColor = uSelColor;\n fSelected = aTexCoord0.x;\n#endif\n vWindowZ = (0.5 * (v_Position.z / v_Position.w) + 0.5) * v_Position.w;\n v_Position.z = min(v_Position.z, v_Position.w);\n gl_Position = v_Position;\n}",_0x3b1fe6=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x5261ab=_0x3b1fe6(void 0,(function(){return _0x5261ab.toString().search("(((.+)+)+)+$").toString().constructor(_0x5261ab).search("(((.+)+)+)+$")}));_0x5261ab();var _0x11528e="attribute vec4 aPosition;\nattribute vec3 aNormal;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\n\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying float vWindowZ;\nvarying float vPositionMC;\n\nuniform vec2 uMinMaxTerrainHeight;\nuniform vec3 uSouthWest;\nuniform vec3 uNorthDir;\nuniform vec3 uEastDir;\nvarying vec4 v_westPlane;\nvarying vec4 v_southPlane;\nvarying vec2 v_inversePlaneExtents;\nuniform vec4 uSelColor;\nuniform vec4 uFillForeColor;\nvarying float fSelected;\n\nuniform float uIsPicking;\nuniform float uPickPositionHeight;\nuniform mat4 uMatrixInvert;\nuniform vec4 uPickPosition;\nuniform vec4 uDiffuseColor;\n\n#ifdef COMPRESS_VERTEX\n uniform vec4 decode_position_min;\n uniform float decode_position_normConstant;\n#endif\n#ifdef COMPRESS_TEXCOORD\n uniform float decode_texCoord0_normConstant;\n uniform float decode_texCoord1_normConstant;\n uniform vec4 decode_texCoord0_min;\n uniform vec4 decode_texCoord1_min;\n#endif\n\nvoid ComputeBounds()\n{\n vec3 southWestCorner = (czm_modelView * vec4(uSouthWest, 1.0)).xyz;\n vec3 northWestCorner = czm_normal * uNorthDir + southWestCorner;\n vec3 southEastCorner = czm_normal * uEastDir + southWestCorner;\n vec3 eastWard = southEastCorner - southWestCorner;\n float eastExtent = length(eastWard);\n eastWard /= eastExtent;\n vec3 northWard = northWestCorner - southWestCorner;\n float northExtent = length(northWard);\n northWard /= northExtent;\n v_westPlane = vec4(eastWard, -dot(eastWard, southWestCorner));\n v_southPlane = vec4(northWard, -dot(northWard, southWestCorner));\n v_inversePlaneExtents = vec2(1.0 / eastExtent, 1.0 / northExtent);\n}\nvoid main()\n{\n#ifdef HAS_TEXTURE\n ComputeBounds();\n#endif\n vec4 uncompress = vec4(1.0);\n vec4 realPosition = aPosition;\n#ifdef COMPRESS_VERTEX\n uncompress = decode_position_min + aPosition * decode_position_normConstant;\n realPosition = uncompress;\n#endif\n vec3 vertexPos = realPosition.xyz;\n vec3 zDir = aTexCoord1.xyz;\n bool hasBaseHeight = false;\n if(length(realPosition) > 0.1){\n hasBaseHeight = true;\n }\n float topOrBottom = dot(zDir, vec3(0.0, 0.0, 1.0)) > 0.0 ? 1.0 : -1.0;\n vec3 upDir = zDir * topOrBottom;\n float fExtendHeight = 0.0;\n if(uIsPicking > 0.0){\n // 顶点保存了高度,在拾取时在原始的顶点高度附近进行上下拉伸\n if(hasBaseHeight){\n fExtendHeight = czm_branchFreeTernary(topOrBottom < 0.0, -50.0, 100.0);\n }\n else{\n fExtendHeight = czm_branchFreeTernary(topOrBottom < 0.0, uPickPositionHeight - 2.0, uPickPositionHeight + 10.0);\n }\n }\n else{\n fExtendHeight = czm_branchFreeTernary(topOrBottom < 0.0, uMinMaxTerrainHeight.x, uMinMaxTerrainHeight.y);\n }\n vertexPos.xyz = realPosition.xyz + upDir * fExtendHeight;\n vec4 v_Position = czm_modelViewProjection * vec4(vertexPos, 1.0);\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\nfSelected = 0.0;\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, vec4(1.0), vertexColor, fSelected);\n#endif\n#ifdef SELECTED\n vColor = uSelColor;\n#else\n vColor = vertexColor * uDiffuseColor * uFillForeColor;\n#endif\n vWindowZ = (0.5 * (v_Position.z / v_Position.w) + 0.5) * v_Position.w;\n v_Position.z = min(v_Position.z, v_Position.w);\n gl_Position = v_Position;\n}",_0x5e4a13=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x868ad0=_0x5e4a13(void 0,(function(){return _0x868ad0.toString().search("(((.+)+)+)+$").toString().constructor(_0x868ad0).search("(((.+)+)+)+$")}));_0x868ad0();var _0x13fac9="attribute vec3 aPosition;\nattribute vec3 aNormal;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\n\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying float vWindowZ;\n\nuniform float uIsPicking;\nuniform mat4 uMatrixInvert;\nuniform vec4 uPickPosition;\nuniform vec4 uDiffuseColor;\nuniform vec4 uSelColor;\n#ifdef SELECTED\nvarying float fSelected;\n#endif\n\nvoid main()\n{\n vec3 vertexPos = aPosition;\n vertexPos.xyz = vertexPos.xyz + aTexCoord1.xyz;\n vec4 v_Position = czm_modelViewProjection * vec4(vertexPos, 1.0);\n if(uIsPicking > 0.0)\n {\n#ifdef EXTEND_OBJECT\n\t\tvec4 modelBottomPos = uMatrixInvert * czm_model * vec4(aPosition, 1.0);\n\t\tvec4 modelTopPos = uMatrixInvert * czm_model * vec4(vertexPos, 1.0);\n\t\tif(uPickPosition.z < modelBottomPos.z || uPickPosition.z > modelTopPos.z)\n\t\t{\n\t\t\tvColor.a = 0.0;\n\t\t}\n#else\n\t\tvertexPos.xyz = aPosition.xyz + normalize(aTexCoord1.xyz) * (uPickPosition.z + 10.0);\n\t\tvec4 v_Position = czm_modelViewProjection * vec4(vertexPos, 1.0);\n#endif\n }\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n#ifdef SELECTED\n vColor = uSelColor;\n fSelected = aTexCoord0.x;\n#else\n vColor = vertexColor * uDiffuseColor;\n#endif\n vWindowZ = (0.5 * (v_Position.z / v_Position.w) + 0.5) * v_Position.w;\n v_Position.z = min(v_Position.z, v_Position.w);\n gl_Position = v_Position;\n}",_0x568d3a=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x23bae9=_0x568d3a(void 0,(function(){return _0x23bae9.toString().search("(((.+)+)+)+$").toString().constructor(_0x23bae9).search("(((.+)+)+)+$")}));_0x23bae9();var _0x5cfb95="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nvarying vec4 vColor;\nvarying float vWindowZ;\nvarying float fSelected;\nvarying vec4 vSecondColor;\n\n#ifdef HAS_TEXTURE\nuniform sampler2D uTexture;\nuniform vec2 uLevelScale;\nuniform vec2 uRepeatTimes;\nvarying vec4 v_westPlane;\nvarying vec4 v_southPlane;\nvarying vec2 v_inversePlaneExtents;\n#endif\n\n#ifdef APPLY_SPLIT\nuniform float uSplitDirection;\nuniform float uSplitPosition;\n#endif\n#ifdef APPLY_SWIPE\n uniform vec4 uSwipeRegion;\n#endif\n#ifdef HAS_TEXTURE\nvec4 getTextureColor()\n{\n float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw));\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n vec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;\n vec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;\n vec2 uv;\n uv.x = czm_planeDistance(v_westPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.x;\n uv.y = czm_planeDistance(v_southPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.y;\n vec2 st;\n st.x = czm_lineDistance(vec2(0.0), vec2(0.0, 1.0), uv);\n st.y = czm_lineDistance(vec2(0.0), vec2(1.0, 0.0), uv);\n st.xy *= uLevelScale * uRepeatTimes;\n vec4 texColor = texture2D(uTexture, st);\n if(texColor.a < 0.01) {\n texColor.a = 1.0;\n }\n return texColor;\n}\n#endif\n\nvoid main()\n{\n#ifdef APPLY_SPLIT\n if (uSplitDirection > 1.5)\n {\n if(gl_FragCoord.x > uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection > 0.5)\n {\n if(gl_FragCoord.x < uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection < -1.5)\n {\n if(gl_FragCoord.y < uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection < -0.5)\n {\n if(gl_FragCoord.y > uSplitPosition)\n {\n discard;\n }\n }\n#endif\n#ifdef APPLY_SWIPE \n czm_RollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\n#ifdef SELECTED\n if(fSelected < 0.5)\n {\n discard;\n }\n#endif\n#ifdef GL_EXT_frag_depth\n gl_FragDepthEXT = min(vWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef WEBGL2\n gl_FragDepthEXT = min(vWindowZ * gl_FragCoord.w, 1.0);\n#endif\n vec4 texColor = vec4(1.0);\n#ifdef HAS_TEXTURE\n texColor = getTextureColor();\n#endif\n gl_FragColor = vColor * texColor;\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n}",_0xbb409=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x171a88=_0xbb409(void 0,(function(){return _0x171a88.toString().search("(((.+)+)+)+$").toString().constructor(_0x171a88).search("(((.+)+)+)+$")}));_0x171a88();var _0x1d4945="attribute vec4 aPosition;\n\nattribute vec3 aNormal;\n\nattribute vec4 aTexCoord0;\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\nattribute float batchId;\nuniform sampler2D batchTexture; \nuniform vec4 batchTextureStep;\nvec2 computeSt(float batchId)\n{\n float stepX = batchTextureStep.x;\n float centerX = batchTextureStep.y;\n float numberOfAttributes = float(5);\n return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5);\n}\nvec4 czm_batchTable_pickColor(float batchId)\n{\n vec2 st = computeSt(batchId);\n st.x += batchTextureStep.x * float(2);\n vec4 textureValue = texture2D(batchTexture, st);\n vec4 value = textureValue;\n value /= 255.0;\n return value;\n}\nvec4 czm_batchTable_operation(float batchId)\n{\n vec2 st = computeSt(batchId);\n st.x += batchTextureStep.x * float(1);\n vec4 textureValue = texture2D(batchTexture, st);\n vec4 value = textureValue;\n return value;\n}\nvoid s3mBatchOperation(vec4 operationType, inout vec4 vertexColor)\n{\n operationType.x += 0.001;\n float right_2 = operationType.x * 0.5;\n float right_4 = right_2 * 0.5;\n float right_8 = right_4 * 0.5;\n float right_16 = right_8 * 0.5;\n float isHide = fract(floor(right_4)* 0.5);\n if(isHide > 0.1)\n {\n vertexColor.a = 0.0;\n }\n}\n#endif\n\n#ifdef UNIFORM_BUFFER\n uniform WaterParameter{\n vec4 bumpSpeedAndScaleAndFresnelPower;\n vec4 minmaxFresnelAndNoiseScaleAndBrightness;\n vec4 tintColour;\n vec4 waterColour;\n } u_WaterParam;\n#else\n uniform float uScale;\n uniform vec2 uBumpSpeed;\n struct WaterParameter {\n vec4 bumpSpeedAndScaleAndFresnelPower;\n };\n WaterParameter u_WaterParam;\n#endif\nuniform float uTimeVal;\nuniform mat4 uGeoMatrix;\nvarying vec2 vNoiseCoord;\nvarying vec3 vProjectionCoord;\nvarying vec3 vEyeDir;\nvarying vec3 vNormal;\nvarying vec4 vColor;\nvarying float fVertexColor;\nvarying vec4 vSecondColor;\nvarying vec4 clip_vertex;\nvarying vec4 vPositionMC;\nvarying vec2 fSelected;\n#ifdef EXCAVATION\n varying vec4 vExcavationVertexPos;\n#endif\n\nvoid InitUniformStructParameter(){\n#ifndef UNIFORM_BUFFER\n u_WaterParam.bumpSpeedAndScaleAndFresnelPower.z = uScale;\n u_WaterParam.bumpSpeedAndScaleAndFresnelPower.xy = uBumpSpeed;\n#endif\n}\nvoid main()\n{\n InitUniformStructParameter();\n#ifdef EXCAVATION\n vExcavationVertexPos = uGeoMatrix * vec4(aPosition.xyz, 1.0);\n#endif\n\tvec4 oPos = czm_modelViewProjection * aPosition;\n\tvPositionMC = uGeoMatrix * aPosition;\n\tmat4 scalemat = mat4(0.5, 0.0, 0.0, 0.0,\n\t\t\t0.0, 0.5, 0.0, 0.0,\n\t\t\t0.0, 0.0, 0.5, 0.0,\n\t\t\t0.5, 0.5, 0.5, 1.0);\n\tvec4 proj = scalemat * oPos;\n\tvProjectionCoord = proj.xyw;\n\tfloat scale = u_WaterParam.bumpSpeedAndScaleAndFresnelPower.z;\n\tvec2 bumpSpeed = u_WaterParam.bumpSpeedAndScaleAndFresnelPower.xy;\n\tvNoiseCoord.xy = aTexCoord0.xy * scale + bumpSpeed * uTimeVal;\n\tvec4 cameraPos = czm_inverseModel * vec4(czm_cameraPositionWC, 1.0);\n\tvEyeDir = aPosition.xyz - cameraPos.xyz;\n\tvNormal = aNormal.xyz;\n\tgl_Position = oPos;\n\tclip_vertex = czm_modelView * aPosition;\n\tvec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n s3mBatchOperation(operationType, vertexColor);\n#endif\n vColor = vertexColor;\n\tfVertexColor = vColor.a;\n}",_0x983ad0=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3b4752=_0x983ad0(void 0,(function(){return _0x3b4752.toString().search("(((.+)+)+)+$").toString().constructor(_0x3b4752).search("(((.+)+)+)+$")}));_0x3b4752();var _0x20558b="uniform sampler2D uReflectMap;\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform sampler2D uNoiseMap;\n#ifdef UNIFORM_BUFFER\n uniform WaterParameter{\n vec4 bumpSpeedAndScaleAndFresnelPower;\n vec4 minmaxFresnelAndNoiseScaleAndBrightness;\n vec4 tintColour;\n vec4 waterColour;\n } u_WaterParam;\n#else\n uniform vec4 uTintColour;\n uniform vec4 uWaterColour;\n uniform float uFresnelPower;\n uniform float uMinFresnel;\n uniform float uMaxFresnel;\n uniform float uNoiseScale;\n uniform float uWaterBrightness;\n struct WaterParameter {\n vec4 bumpSpeedAndScaleAndFresnelPower;\n vec4 minmaxFresnelAndNoiseScaleAndBrightness;\n vec4 tintColour;\n vec4 waterColour;\n };\n WaterParameter u_WaterParam;\n#endif\nvarying vec2 vNoiseCoord;\nvarying vec3 vProjectionCoord;\nvarying vec3 vEyeDir;\nvarying vec3 vNormal;\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying vec4 vPositionMC;\nuniform vec2 uPolygonOffset;\n\nvec4 AdjSaturation(in vec4 inputColor, in float saturation)\n{\n\tvec3 lumCoeff = vec3(0.2125, 0.7154, 0.0721);\n\tvec3 intensity = vec3(dot(inputColor.rgb, lumCoeff));\n\tvec3 tempColor = mix(intensity, inputColor.rgb, saturation);\n\treturn vec4(tempColor, 1.0);\n}\n\n#ifdef APPLY_SPLIT\nuniform float uSplitDirection;\nuniform float uSplitPosition;\n#endif\n#ifdef APPLY_SWIPE\n uniform vec4 uSwipeRegion;\n#endif\nvoid InitUniformStructParameter(){\n#ifndef UNIFORM_BUFFER\n u_WaterParam.tintColour = uTintColour;\n u_WaterParam.waterColour = uWaterColour;\n u_WaterParam.bumpSpeedAndScaleAndFresnelPower.w = uFresnelPower;\n u_WaterParam.minmaxFresnelAndNoiseScaleAndBrightness.x = uMinFresnel;\n u_WaterParam.minmaxFresnelAndNoiseScaleAndBrightness.y = uMaxFresnel;\n u_WaterParam.minmaxFresnelAndNoiseScaleAndBrightness.z = uNoiseScale;\n u_WaterParam.minmaxFresnelAndNoiseScaleAndBrightness.w = uWaterBrightness;\n#endif\n}\nvoid main()\n{\n InitUniformStructParameter();\n if(vColor.a < 0.1)\n {\n discard;\n }\n#ifdef EXCAVATION\n if(czm_executeExcavation())\n {\n discard;\n }\n#endif\n#ifdef LOG_DEPTH\n czm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n float fresnelPower = u_WaterParam.bumpSpeedAndScaleAndFresnelPower.w;\n float noiseScale = u_WaterParam.minmaxFresnelAndNoiseScaleAndBrightness.z;\n float waterBrightness = u_WaterParam.minmaxFresnelAndNoiseScaleAndBrightness.w;\n float minFresnel = u_WaterParam.minmaxFresnelAndNoiseScaleAndBrightness.x;\n float maxFresnel = u_WaterParam.minmaxFresnelAndNoiseScaleAndBrightness.y;\n vec4 tintColour = u_WaterParam.tintColour;\n vec4 waterColour = u_WaterParam.waterColour;\n gl_FragColor = vColor;\n vec2 final = vProjectionCoord.xy / vProjectionCoord.z;\n vec3 noiseNormal = (texture2D(uNoiseMap, (vNoiseCoord.xy / 5.0)).rgb - 0.5).rbg * noiseScale;\n final += noiseNormal.xz;\n float realMinFresnel, realMaxFresnel;\n if(minFresnel < maxFresnel)\n {\n realMinFresnel = minFresnel;\n realMaxFresnel = maxFresnel;\n }\n else\n {\n realMinFresnel = maxFresnel;\n realMaxFresnel = minFresnel;\n }\n float fresnelBias = realMinFresnel;\n float fresnelScale = (realMaxFresnel - realMinFresnel) / 1.0;\n float fresnel = fresnelBias + fresnelScale * pow(1.0 + dot(normalize(vEyeDir), vNormal), fresnelPower);\n fresnel = clamp(fresnel, 0.05, 0.95);\n vec4 reflectionColour = texture2D(uReflectMap, final);\n vec4 refractionColour = reflectionColour + tintColour;\n vec4 resultColour = mix(waterColour, reflectionColour, fresnel);\n resultColour = AdjSaturation(resultColour, 1.0);\n resultColour = resultColour * waterBrightness;\n resultColour.a = waterColour.a;\n //resultColour *= fillForeColor;\n gl_FragColor = gl_FragColor * resultColour;\n if(gl_FragColor.a < 0.1)\n {\n discard;\n }\n #ifdef APPLY_SPLIT\n if (uSplitDirection > 1.5)\n {\n if(gl_FragCoord.x > uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection > 0.5)\n {\n if(gl_FragCoord.x < uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection < -1.5)\n {\n if(gl_FragCoord.y < uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection < -0.5)\n {\n if(gl_FragCoord.y > uSplitPosition)\n {\n discard;\n }\n }\n #endif\n#ifdef APPLY_SWIPE \n czm_RollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\n //gl_FragColor = czm_gammaCorrect(gl_FragColor);\n}",_0x1a7b61=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x326842=_0x1a7b61(void 0,(function(){return _0x326842.toString().search("(((.+)+)+)+$").toString().constructor(_0x326842).search("(((.+)+)+)+$")}));_0x326842();var _0x46e9c0="\nattribute vec4 aPosition;\nattribute vec3 aNormal;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\nvarying vec4 vSecondColor;\nvarying vec2 oUV;\nvarying vec4 vColor;\nvarying vec4 vPositionMC;\nuniform mat4 uTexMatrix;\nvoid main()\n{\n float fExtendHeight = aTexCoord1.x;\n\tvec3 Postion = aPosition.xyz + (aNormal.xyz * fExtendHeight).xyz;\n\tfloat u = aTexCoord0.x;\n\tfloat v = aTexCoord0.y;\n if ( aTexCoord1.y > 0.2 && aTexCoord1.y < 0.8)\n {\n if (uTexMatrix[0].x > 0.0)\n {\n float fRealSize = uTexMatrix[1].y;\n v = fExtendHeight / fRealSize;\n }\n else\n {\n float fRepeatNum = uTexMatrix[1].y;\n v = fRepeatNum;\n }\n }\n oUV = vec2(u, v);\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n vColor = vertexColor;\n\tgl_Position = czm_modelViewProjection * vec4(Postion, 1.0);\n\tvPositionMC = vec4(Postion, 0.0);\n}",_0x5a8a16=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x5963de=_0x5a8a16(void 0,(function(){return _0x5963de.toString().search("(((.+)+)+)+$").toString().constructor(_0x5963de).search("(((.+)+)+)+$")}));_0x5963de();var _0x4425c8="\n#ifdef HAS_TEXTURE\nuniform sampler2D uTexture;\n#endif\nvarying vec2 oUV;\nvarying vec4 vColor;\nvarying vec4 vPositionMC;\nvoid main()\n{\n\tvec4 mixColor = vec4(1.0);\n#ifdef HAS_TEXTURE\n mixColor = mixColor * texture2D( uTexture, oUV );\n#endif\n gl_FragColor = mixColor * vColor;\n#ifdef HAS_LIGHT\n\tgl_FragColor *= czm_computeLightColorInFP(vPositionMC.xyz, vPositionMC.w, vec3(0.0));\n#endif\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n}",_0x4dc446=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1051f9=_0x4dc446(void 0,(function(){return _0x1051f9.toString().search("(((.+)+)+)+$").toString().constructor(_0x1051f9).search("(((.+)+)+)+$")}));_0x1051f9();var _0x49a401="\nattribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nattribute vec4 aColor;\nvarying vec2 vTexCoord;\nvarying vec4 selectionColor;\nvarying vec3 oriVertex;\nvarying vec3 vPositionToEyeEC;\nvoid main()\n{\n vTexCoord = aTexCoord0.xy;\n oriVertex = aPosition.xyz;\n\tvec4 vVertex = vec4(aPosition.xyz, 1.0);\n\tgl_Position = czm_modelViewProjection * vVertex;\n\tselectionColor = vec4(aColor.rgb, 1.0);\n\tvec4 positionEC = czm_modelView * vVertex;\n vPositionToEyeEC = -normalize(positionEC.xyz);\n}",_0x97aa7b=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1417d6=_0x97aa7b(void 0,(function(){return _0x1417d6.toString().search("(((.+)+)+)+$").toString().constructor(_0x1417d6).search("(((.+)+)+)+$")}));_0x1417d6();var _0x3427e2="\nuniform float uRotationAngle;\nuniform int uType;\nuniform vec4 uForeColor;\nuniform vec4 uBackColor;\nuniform float uLineWidthX;\nuniform float uLineWidthY;\nuniform float uOffsetX;\nuniform float uOffsetY;\nuniform float uRepeatX;\nuniform float uRepeatY;\n\nvarying vec3 oriVertex;\nvarying vec2 vTexCoord;\nvarying vec4 selectionColor;\nvarying vec3 vPositionToEyeEC;\nconst float horizontal = 0.0;\nconst float PI = 3.1415926535897932384626;\nvec2 rotateTexCoord(vec2 oriTexCoord)\n{\n\tfloat rotationRadian = uRotationAngle * PI;\n\tvec2 n = vec2(cos(rotationRadian),-sin(rotationRadian));\n\tvec2 t = vec2(sin(rotationRadian),cos(rotationRadian));\n\tmat2 rotateZMatrix = mat2(n,t);\n\treturn rotateZMatrix * oriTexCoord;\n}\nvec4 czm_getGridMaterial(vec2 texCoord)\n{\n\tvec2 lineCount = vec2(uRepeatX, uRepeatY);\n\tvec2 lineOffset = vec2(uOffsetX, uOffsetY);\n\tvec2 lineThickness = vec2(uLineWidthX, uLineWidthY);\n\n float scaledWidth = fract(lineCount.s * texCoord.s - lineOffset.s);\n scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));\n\n float scaledHeight = fract(lineCount.t * texCoord.t - lineOffset.t);\n scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\n\n float value;\n\n const float fuzz = 1.2;\n vec2 thickness = (lineThickness * 1.0) - 1.0;\n\n vec2 dx = abs(dFdx(texCoord));\n vec2 dy = abs(dFdy(texCoord));\n vec2 dF = vec2(max(dx.s, dy.s), max(dx.t, dy.t)) * lineCount;\n\n\tif(uRepeatX < 0.5)\n\t{\n\t\tvalue = smoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight);\n\t}\n\telse if(uRepeatY < 0.5)\n\t{\n\t\tvalue = smoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth);\n\t}\n\telse\n\t{\n\t\tvalue = min(\n\t\t\tsmoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth),\n\t\t\tsmoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight));\n\t}\n\n\tif(value < 0.5)\n\t{\n\t\treturn uForeColor;\n\t}\n\treturn uBackColor;\n}\nvec4 czm_getStripMaterial(vec2 texCoord)\n{\n\tfloat repeat = uRepeatX;\n\tfloat offset = uOffsetX;\n\n float coord = mix(texCoord.s, texCoord.t, horizontal);\n float value = fract((coord - offset) * (repeat * 0.5));\n\n vec4 currentColor = mix(uForeColor, uBackColor, step(0.5, value)); \n\n return currentColor;\n}\nvec4 czm_getDotMaterial(vec2 texCoord)\n{\n\tfloat dotRepeat = uRepeatX;\n\n float b = smoothstep(0.3, 0.32, length(fract(dotRepeat * texCoord.st) - 0.5));\n vec4 color = mix(uForeColor, uBackColor, b);\n return color;\n}\nvec4 czm_getCheckBoardMaterial(vec2 texCoord)\n{\n\tvec2 checkBoardRepeat = vec2(uRepeatX, uRepeatY); \n\n float b = mod(floor(checkBoardRepeat.s * texCoord.s) + floor(checkBoardRepeat.t * texCoord.t), 2.0);\n vec4 currentColor = mix(uForeColor, uBackColor, b);\n return currentColor;\n}\n\nvoid main()\n{\n vec3 newNormal = vec3( czm_normal * czm_computeNormal( oriVertex ) );\n newNormal = normalize( newNormal );\n\tvec4 mixColor = czm_directionLight(newNormal,vPositionToEyeEC,oriVertex);\n\n\tvec2 rotateCoord = rotateTexCoord(vTexCoord);\n\n vec4 color = uForeColor;\n if(uType == 1)\n {\n \tcolor = czm_getStripMaterial(rotateCoord);\n }\n else if(uType == 2)\n {\n \tcolor = czm_getDotMaterial(rotateCoord);\n }\n else if(uType == 3)\n {\n \tcolor = czm_getCheckBoardMaterial(rotateCoord);\n }\n else if(uType == 4)\n {\n \tcolor = czm_getGridMaterial(rotateCoord);\n }\n gl_FragColor = color * mixColor * selectionColor;\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n}",_0x2391d5=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x480c9c=_0x2391d5(void 0,(function(){return _0x480c9c.toString().search("(((.+)+)+)+$").toString().constructor(_0x480c9c).search("(((.+)+)+)+$")}));_0x480c9c();var _0x5f03b2="\nuniform float uEffectLineWidth;\n\nattribute vec4 aPosition;\nattribute vec3 aNormal;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\nuniform vec4 uSelColor;\nuniform mat4 uGeoMatrix;\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying float v_width;\nvarying vec2 v_st;\nvarying float v_polylineAngle;\nvarying float v_alpha;\nvarying vec4 vPositionMC;\n#ifdef EXCAVATION\n varying vec4 vExcavationVertexPos;\n#endif\nvoid clipLineSegmentToNearPlane(\n vec3 p0,\n vec3 p1,\n out vec4 positionWC,\n out bool clipped,\n out bool culledByNearPlane,\n out vec4 clippedPositionEC)\n {\n culledByNearPlane = false;\n clipped = false;\n vec3 p0ToP1 = p1 - p0;\n float magnitude = length(p0ToP1);\n vec3 direction = normalize(p0ToP1);\n float endPoint0Distance = czm_currentFrustum.x + p0.z;\n float denominator = -direction.z;\n if (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)\n {\n culledByNearPlane = true;\n }\n else if (endPoint0Distance > 0.0)\n {\n float t = endPoint0Distance / denominator;\n if (t < 0.0 || t > magnitude)\n {\n culledByNearPlane = true;\n }\n else\n {\n p0 = p0 + t * direction;\n p0.z = min(p0.z, -czm_currentFrustum.x);\n clipped = true;\n }\n }\n clippedPositionEC = vec4(p0, 1.0);\n positionWC = czm_eyeToWindowCoordinates(clippedPositionEC);\n }\n vec4 getPolylineWindowCoordinates(vec4 positionEC, vec4 prevEC, vec4 nextEC, float expandDirection, float width, bool usePrevious, out float angle)\n {\n #ifdef POLYLINE_DASH\n vec4 positionWindow = czm_eyeToWindowCoordinates(positionEC);\n vec4 previousWindow = czm_eyeToWindowCoordinates(prevEC);\n vec4 nextWindow = czm_eyeToWindowCoordinates(nextEC);\n vec2 lineDir;\n if (usePrevious) {\n lineDir = normalize(positionWindow.xy - previousWindow.xy);\n }\n else {\n lineDir = normalize(nextWindow.xy - positionWindow.xy);\n }\n angle = atan(lineDir.x, lineDir.y) - 1.570796327;\n angle = floor(angle / czm_piOverFour + 0.5) * czm_piOverFour;\n #endif\n vec4 clippedPrevWC, clippedPrevEC;\n bool prevSegmentClipped, prevSegmentCulled;\n clipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, clippedPrevWC, prevSegmentClipped, prevSegmentCulled, clippedPrevEC);\n vec4 clippedNextWC, clippedNextEC;\n bool nextSegmentClipped, nextSegmentCulled;\n clipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, clippedNextWC, nextSegmentClipped, nextSegmentCulled, clippedNextEC);\n bool segmentClipped, segmentCulled;\n vec4 clippedPositionWC, clippedPositionEC;\n clipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, clippedPositionWC, segmentClipped, segmentCulled, clippedPositionEC);\n if (segmentCulled)\n {\n return vec4(0.0, 0.0, 0.0, 1.0);\n }\n vec2 directionToPrevWC = normalize(clippedPrevWC.xy - clippedPositionWC.xy);\n vec2 directionToNextWC = normalize(clippedNextWC.xy - clippedPositionWC.xy);\n if (prevSegmentCulled)\n {\n directionToPrevWC = -directionToNextWC;\n }\n else if (nextSegmentCulled)\n {\n directionToNextWC = -directionToPrevWC;\n }\n vec2 thisSegmentForwardWC, otherSegmentForwardWC;\n if (usePrevious)\n {\n thisSegmentForwardWC = -directionToPrevWC;\n otherSegmentForwardWC = directionToNextWC;\n }\n else\n {\n thisSegmentForwardWC = directionToNextWC;\n otherSegmentForwardWC = -directionToPrevWC;\n }\n vec2 thisSegmentLeftWC = vec2(-thisSegmentForwardWC.y, thisSegmentForwardWC.x);\n vec2 leftWC = thisSegmentLeftWC;\n float expandWidth = width * 0.5;\n if (!czm_equalsEpsilon(prevEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1) && !czm_equalsEpsilon(nextEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1))\n {\n vec2 otherSegmentLeftWC = vec2(-otherSegmentForwardWC.y, otherSegmentForwardWC.x);\n vec2 leftSumWC = thisSegmentLeftWC + otherSegmentLeftWC;\n float leftSumLength = length(leftSumWC);\n leftWC = leftSumLength < czm_epsilon6 ? thisSegmentLeftWC : (leftSumWC / leftSumLength);\n vec2 u = -thisSegmentForwardWC;\n vec2 v = leftWC;\n float sinAngle = abs(u.x * v.y - u.y * v.x);\n expandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);\n }\n vec2 offset = leftWC * expandDirection * expandWidth * czm_pixelRatio;\n return vec4(clippedPositionWC.xy + offset, -clippedPositionWC.z, 1.0) * (czm_projection * clippedPositionEC).w;\n }\nvoid main()\n{\n\tvec2 expandAndWidth = aTexCoord1.zw;\n\texpandAndWidth.y = expandAndWidth.y * uEffectLineWidth;\n\tfloat u = abs(expandAndWidth.x);\n\tfloat expandDir = sign(expandAndWidth.x);\n#ifdef ENABLE_DYNAMIC\n\tfloat w = 0.2 + 0.3*(1.0 - pow(2.0*abs(u - 0.5), 2.0));\n\tfloat width = abs(expandAndWidth.y*w) + 0.5;\n#else\n\tfloat width = abs(expandAndWidth.y) + 0.5;\n#endif\n\tbool usePrev = expandAndWidth.y < 0.0;\n\tvPositionMC.xyz = aPosition.xyz;\n vPositionMC.w = 0.0;\n#ifdef EXCAVATION\n vExcavationVertexPos = uGeoMatrix * vec4(aPosition.xyz, 1.0);\n#endif\n\tvec4 p = czm_modelView * aPosition;\n\tvec4 prev = czm_modelView * vec4(aNormal, 1.0);\n\tvec4 next = czm_modelView * aTexCoord0;\n\tv_st.s = aTexCoord1.x;\n\tv_width = width;\n\tv_alpha = u;\n\tfloat polylineAngle;\n\tvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, polylineAngle);\n\tv_polylineAngle = polylineAngle;\n\tgl_Position = czm_viewportOrthographic * positionWC;\n\tv_st.t = czm_writeNonPerspective(clamp(aTexCoord1.y, 0.0, 1.0), gl_Position.w);\n\tvec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n\tvColor = vertexColor;\n}",_0x20c26d=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3af31f=_0x20c26d(void 0,(function(){return _0x3af31f.toString().search("(((.+)+)+)+$").toString().constructor(_0x3af31f).search("(((.+)+)+)+$")}));_0x3af31f();var _0xe94b2="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nvarying vec4 vColor;\nvarying vec2 v_st;\nvarying float v_width;\nvarying float v_polylineAngle;\nvarying vec4 vSecondColor;\nconst float maskLength = 16.0;\nuniform vec4 uColor;\nuniform int uType;\nuniform vec4 uOutlineColor;\nuniform float uOutlineWidth;\nuniform vec4 uGapColor;\nuniform float uDashLength;\nuniform float uDashPattern;\nuniform float uGlowPower;\nuniform int uIsArrow;\nvarying vec4 vPositionMC;\nuniform vec2 uPolygonOffset;\n#ifdef APPLY_SWIPE\n uniform vec4 uSwipeRegion;\n#endif\n\nmat2 rotate(float rad)\n{\n\tfloat c = cos(rad);\n\tfloat s = sin(rad);\n\treturn mat2(\n\t\tc, s,\n\t\t-s, c\n\t);\n}\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nfloat getPointOnLine(vec2 p0, vec2 p1, float x)\n{\n\tfloat slope = (p0.y - p1.y) / (p0.x - p1.x);\n\treturn slope * (x - p0.x) + p0.y;\n}\nvoid main()\n{\n vec2 st = v_st;\n st.t = czm_readNonPerspective(st.t, gl_FragCoord.w);\n#ifdef APPLY_SWIPE\n czm_RollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\n#ifdef GL_OES_standard_derivatives\n\tfloat base = 1.0 - abs(fwidth(st.s)) * 10.0;\n#else\n\tfloat base = 0.99;\n#endif\n\tvec2 center = vec2(1.0, 0.5);\n\tfloat ptOnUpperLine = getPointOnLine(vec2(base, 1.0), center, st.s);\n\tfloat ptOnLowerLine = getPointOnLine(vec2(base, 0.0), center, st.s);\n\tfloat halfWidth = 0.15;\n\tfloat s = step(0.5 - halfWidth, st.t);\n\ts *= 1.0 - step(0.5 + halfWidth, st.t);\n\ts *= 1.0 - step(base, st.s);\n\tfloat t = step(base, st.s);\n\tt *= 1.0 - step(ptOnUpperLine, st.t);\n\tt *= step(ptOnLowerLine, st.t);\n\tfloat dist;\n\n\tvec4 outsideColor = vec4(0.0);\n\tvec4 currentColor;\n\tif (uIsArrow == 0 || st.s < base)\n\t{\n\t\tif(uType == 3)\n\t\t{\n\t\t\tfloat glow = uGlowPower / abs(st.t - 0.3) - (uGlowPower / 0.5);\n\t\t\tvec3 emission = max(vec3(glow - 1.0 + uColor.rgb), uColor.rgb);\n\t\t\tfloat alpha = clamp(0.0, 1.0, glow) * uColor.a;\n\t\t\tvec4 fragColor = vec4(emission, alpha);\n\t\t\tif(uIsArrow != 0)\n\t\t\t{\n\t\t\t\tfloat d1 = abs(st.t - (0.5 - halfWidth));\n\t\t\t\tfloat d2 = abs(st.t - (0.5 + halfWidth));\n\t\t\t\tdist = min(d1, d2);\n\t\t\t\tcurrentColor = mix(outsideColor, fragColor, clamp(s + t, 0.0, 1.0));\n\t\t\t\tgl_FragColor = czm_antialias(outsideColor, fragColor, currentColor, dist, 0.1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgl_FragColor = fragColor;\n\t\t\t}\n\t\t}\n\t\telse if(uType == 1)\n\t\t{\n\t\t\tvec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;\n\t\t\tfloat dashPosition = fract(pos.x / uDashLength);\n\t\t\tfloat maskIndex = floor(dashPosition * maskLength);\n\t\t\tfloat maskTest = floor(uDashPattern / pow(2.0, maskIndex));\n\t\t\tvec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? uGapColor : uColor;\n\t\t\tif (fragColor.a < 0.005)\n\t\t\t{\n\t\t\t\tdiscard;\n\t\t\t}\n\t\t\tif(uIsArrow != 0)\n\t\t\t{\n\t\t\t\tfloat d1 = abs(st.t - (0.5 - halfWidth));\n\t\t\t\tfloat d2 = abs(st.t - (0.5 + halfWidth));\n\t\t\t\tdist = min(d1, d2);\n\t\t\t\tcurrentColor = mix(outsideColor, fragColor, clamp(s + t, 0.0, 1.0));\n\t\t\t\tgl_FragColor = czm_antialias(outsideColor, fragColor, currentColor, dist, 0.1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgl_FragColor = fragColor;\n\t\t\t}\n\t\t}\n\t\telse if(uType == 2)\n\t\t{\n\t\t\tfloat halfInteriorWidth = 0.5 * (v_width - uOutlineWidth) / v_width;\n\t\t\tfloat b = step(0.5 - halfInteriorWidth, st.t);\n\t\t\tb *= 1.0 - step(0.5 + halfInteriorWidth, st.t);\n\t\t\tfloat d1 = abs(st.t - (0.5 - halfInteriorWidth));\n\t\t\tfloat d2 = abs(st.t - (0.5 + halfInteriorWidth));\n\t\t\tfloat dist = min(d1, d2);\n\t\t\tcurrentColor = mix(uOutlineColor, uColor, b);\n\t\t\tgl_FragColor = czm_antialias(uOutlineColor, uColor, currentColor, dist, 0.1);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(uIsArrow != 0)\n\t\t\t{\n\t\t\t\tfloat d1 = abs(st.t - (0.5 - halfWidth));\n\t\t\t\tfloat d2 = abs(st.t - (0.5 + halfWidth));\n\t\t\t\tdist = min(d1, d2);\n\t\t\t\tcurrentColor = mix(outsideColor, uColor, clamp(s + t, 0.0, 1.0));\n\t\t\t\tgl_FragColor = czm_antialias(outsideColor, uColor, currentColor, dist, 0.1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgl_FragColor = uColor;\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tfloat d1 = czm_infinity;\n\t\tif (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)\n\t\t{\n\t\t\td1 = abs(st.s - base);\n\t\t}\n\t\tfloat d2 = abs(st.t - ptOnUpperLine);\n\t\tfloat d3 = abs(st.t - ptOnLowerLine);\n\t\tdist = min(min(d1, d2), d3);\n\t\tcurrentColor = mix(outsideColor, uColor, clamp(s + t, 0.0, 1.0));\n\t\tgl_FragColor = czm_antialias(outsideColor, uColor, currentColor, dist, 0.1);\n\t}\n#ifndef REPLACE_COLOR_TYPE\n gl_FragColor = gl_FragColor * vColor;\n#endif\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n if(gl_FragColor.a < 0.1){discard;}\n#ifdef CLIP\ngl_FragColor *= czm_clip(czm_modelView * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n#ifdef EXCAVATION\n if(czm_executeExcavation())\n {\n discard;\n }\n#endif\n#ifdef LOG_DEPTH\n if(uPolygonOffset.x != 0.0 || uPolygonOffset.y != 0.0){\n float logZ = 1.0 / gl_FragCoord.w + 1.0;\n float DZ = max(dFdx(logZ), dFdy(logZ));\n logZ += DZ * uPolygonOffset.x + 0.0000001 * uPolygonOffset.y;\n czm_writeLogDepth(logZ);\n }\n else{\n czm_writeLogDepth();\n }\n#endif\n}",_0x3e48ba=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x38488d=_0x3e48ba(void 0,(function(){return _0x38488d.toString().search("(((.+)+)+)+$").toString().constructor(_0x38488d).search("(((.+)+)+)+$")}));_0x38488d();var _0x5740ab="\nuniform float uEffectLineWidth;\n\nattribute vec4 aPosition;\nattribute vec3 aNormal;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\nuniform vec4 uSelColor;\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying float v_width;\nvarying vec2 v_st;\nvarying float v_polylineAngle;\nvarying float v_alpha;\nvarying float fWindowZ;\nvarying vec4 vPositionMC;\nvoid clipLineSegmentToNearPlane(\n vec3 p0,\n vec3 p1,\n out vec4 positionWC,\n out bool clipped,\n out bool culledByNearPlane)\n{\n culledByNearPlane = false;\n clipped = false;\n vec3 p1ToP0 = p1 - p0;\n float magnitude = length(p1ToP0);\n vec3 direction = normalize(p1ToP0);\n float endPoint0Distance = -(czm_currentFrustum.x + p0.z);\n float denominator = -direction.z;\n if (endPoint0Distance < 0.0 && abs(denominator) < czm_epsilon7)\n {\n culledByNearPlane = true;\n }\n else if (endPoint0Distance < 0.0 && abs(denominator) > czm_epsilon7)\n {\n float t = (czm_currentFrustum.x + p0.z) / denominator;\n if (t < 0.0 || t > magnitude)\n {\n culledByNearPlane = true;\n }\n else\n {\n p0 = p0 + t * direction;\n clipped = true;\n }\n }\n positionWC = czm_eyeToWindowCoordinates(vec4(p0, 1.0));\n}\nvec4 getPolylineWindowCoordinates(vec4 position, vec4 previous, vec4 next, float expandDirection, float width, bool usePrevious, out float angle)\n{\n\tvec4 endPointWC, p0, p1;\n\tbool culledByNearPlane, clipped;\n\tvec4 positionEC = position;\n\tvec4 prevEC = previous;\n\tvec4 nextEC = next;\n\tvec4 positionWindow = czm_eyeToWindowCoordinates(positionEC);\n\tvec4 previousWindow = czm_eyeToWindowCoordinates(prevEC);\n\tvec4 nextWindow = czm_eyeToWindowCoordinates(nextEC);\n\n\tvec2 lineDir;\n\tif (usePrevious)\n\t{\n\t\tlineDir = normalize(positionWindow.xy - previousWindow.xy);\n\t}\n\telse\n\t{\n\t\tlineDir = normalize(nextWindow.xy - positionWindow.xy);\n\t}\n\tangle = atan(lineDir.x, lineDir.y) - 1.570796327;\n\tangle = floor(angle / czm_piOverFour + 0.5) * czm_piOverFour;\n\n\tclipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, p0, clipped, culledByNearPlane);\n\tclipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, p1, clipped, culledByNearPlane);\n\tclipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, endPointWC, clipped, culledByNearPlane);\n\tif (culledByNearPlane)\n\t{\n\t\treturn vec4(0.0, 0.0, 0.0, 1.0);\n\t}\n\tvec2 prevWC = normalize(p0.xy - endPointWC.xy);\n\tvec2 nextWC = normalize(p1.xy - endPointWC.xy);\n\tfloat expandWidth = width * 0.5;\n\tvec2 direction;\n\tif (czm_equalsEpsilon(previous.xyz - position.xyz, vec3(0.0), czm_epsilon7) || czm_equalsEpsilon(prevWC, -nextWC, czm_epsilon7))\n\t{\n\t\tdirection = vec2(-nextWC.y, nextWC.x);\n\t}\n\telse if (czm_equalsEpsilon(next.xyz - position.xyz, vec3(0.0), czm_epsilon7) || clipped)\n\t{\n\t\tdirection = vec2(prevWC.y, -prevWC.x);\n\t}\n\telse\n\t{\n\t\tvec2 normal = vec2(-nextWC.y, nextWC.x);\n\t\tdirection = normalize((nextWC + prevWC) * 0.5);\n\t\tif (dot(direction, normal) < 0.0)\n\t\t{\n\t\t\tdirection = -direction;\n\t\t}\n\t\tfloat sinAngle = abs(direction.x * nextWC.y - direction.y * nextWC.x);\n\t\texpandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);\n\t}\n\tvec2 offset = direction * expandDirection * expandWidth * czm_resolutionScale;\n\treturn vec4(endPointWC.xy + offset, -endPointWC.z, 1.0);\n}\nvoid main()\n{\n\tvec2 expandAndWidth = aTexCoord1.zw;\n\texpandAndWidth.y = expandAndWidth.y * uEffectLineWidth;\n\tfloat u = abs(expandAndWidth.x);\n\tfloat expandDir = sign(expandAndWidth.x);\n#ifdef ENABLE_DYNAMIC\n\tfloat w = 0.2 + 0.3*(1.0 - pow(2.0*abs(u - 0.5), 2.0));\n\tfloat width = abs(expandAndWidth.y*w) + 0.5;\n#else\n\tfloat width = abs(expandAndWidth.y) + 0.5;\n#endif\n\tbool usePrev = expandAndWidth.y < 0.0;\n\tvPositionMC.xyz = aPosition.xyz;\n vPositionMC.w = 0.0;\n\tvec4 p = czm_modelView * aPosition;\n\tvec4 prev = czm_modelView * vec4(aNormal, 1.0);\n\tvec4 next = czm_modelView * aTexCoord0;\n\tv_st = aTexCoord1.xy;\n\tv_width = width;\n\tv_alpha = u;\n\tvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, v_polylineAngle);\n\tvec4 pos = czm_projection * p;\n\tfWindowZ = (0.5 * (pos.z / pos.w) + 0.5);\n\tgl_Position = czm_viewportOrthographic * positionWC;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n float right_2 = operationType.x * 0.5;\n float isPicked = fract(floor(right_2)* 0.5);\n if(isPicked > 0.1)\n {\n fWindowZ = -1.0;\n }\n#endif\n\tvColor = vertexColor;\n}",_0x1051c5=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x4d9d8f=_0x1051c5(void 0,(function(){return _0x4d9d8f.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d9d8f).search("(((.+)+)+)+$")}));_0x4d9d8f();var _0x26644a="attribute vec4 aPosition;\n#ifdef VertexColor\n attribute vec4 aColor;\n#endif\n#ifdef BatchTable\n attribute float batchId;\n#endif\n attribute vec4 aTexCoord0;\n attribute vec4 aTexCoord1;\n attribute vec4 aTexCoord2;\n attribute vec4 aTexCoord3;\n attribute vec4 aTexCoord4;\n attribute vec4 aTexCoord5;\n uniform vec4 uSelColor;\n varying vec4 v_startPlaneNormalEcAndHalfWidth;\n varying vec4 v_endPlaneNormalEcAndBatchId;\n varying vec4 v_rightPlaneEC;\n varying vec4 v_endEcAndStartEcX;\n varying vec4 v_texcoordNormalizationAndStartEcYZ;\n varying vec4 v_vertexColor;\n varying vec4 vSecondColor;\n uniform float uLineWidth;\n uniform vec4 uLineColor;\n#ifdef COMPRESS_VERTEX\n uniform vec4 decode_position_min;\n uniform float decode_position_normConstant;\n#endif\n#ifdef COMPRESS_TEXCOORD\n uniform float decode_texCoord0_normConstant;\n uniform float decode_texCoord1_normConstant;\n uniform float decode_texCoord2_normConstant;\n uniform float decode_texCoord3_normConstant;\n uniform float decode_texCoord4_normConstant;\n uniform float decode_texCoord5_normConstant;\n uniform vec4 decode_texCoord0_min;\n uniform vec4 decode_texCoord1_min;\n uniform vec4 decode_texCoord2_min;\n uniform vec4 decode_texCoord3_min;\n uniform vec4 decode_texCoord4_min;\n uniform vec4 decode_texCoord5_min;\n#endif\n void main()\n {\n vec3 position3DHigh = aPosition.xyz;\n vec4 uncompress = vec4(1.0);\n#ifdef COMPRESS_VERTEX\n uncompress = decode_position_min + aPosition * decode_position_normConstant;\n position3DHigh = uncompress.xyz;\n#endif\n vec3 position3DLow = aTexCoord5.xyz;\n#ifdef COMPRESS_TEXCOORD\n uncompress = decode_texCoord5_min + aTexCoord5 * decode_texCoord5_normConstant;\n position3DLow = uncompress.xyz;\n#endif\n vec4 startHiAndForwardOffsetX = aTexCoord0;\n vec4 startLoAndForwardOffsetY = aTexCoord1;\n vec4 startNormalAndForwardOffsetZ = aTexCoord2;\n vec4 endNormalAndTextureCoordinateNormalizationX = aTexCoord3;\n vec4 rightNormalAndTextureCoordinateNormalizationY = aTexCoord4;\n#ifdef COMPRESS_TEXCOORD\n uncompress = decode_texCoord0_min + aTexCoord0 * decode_texCoord0_normConstant;\n startHiAndForwardOffsetX = uncompress;\n uncompress = decode_texCoord1_min + aTexCoord1 * decode_texCoord1_normConstant;\n startLoAndForwardOffsetY = uncompress;\n uncompress = decode_texCoord2_min + aTexCoord2 * decode_texCoord2_normConstant;\n startNormalAndForwardOffsetZ = uncompress;\n uncompress = decode_texCoord3_min + aTexCoord3 * decode_texCoord3_normConstant;\n endNormalAndTextureCoordinateNormalizationX = uncompress;\n uncompress = decode_texCoord4_min + aTexCoord4 * decode_texCoord4_normConstant;\n rightNormalAndTextureCoordinateNormalizationY = uncompress;\n#endif\n vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz)).xyz;\n vec3 forwardOffset = vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w);\n vec3 offset = czm_normal * forwardOffset;\n vec3 ecEnd = ecStart + offset;\n vec3 forwardDirectionEC = normalize(offset);\n // start plane\n vec4 startPlaneEC;\n startPlaneEC.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;\n startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);\n // end plane\n vec4 endPlaneEC;\n endPlaneEC.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;\n endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);\n // Right plane\n v_rightPlaneEC.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;\n v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);\n v_texcoordNormalizationAndStartEcYZ.x = abs(endNormalAndTextureCoordinateNormalizationX.w);\n v_texcoordNormalizationAndStartEcYZ.y = rightNormalAndTextureCoordinateNormalizationY.w;\n v_endEcAndStartEcX.xyz = ecEnd;\n v_endEcAndStartEcX.w = ecStart.x;\n v_texcoordNormalizationAndStartEcYZ.zw = ecStart.yz;\n vec4 positionRelativeToEye = czm_translateRelativeToEye(position3DHigh, position3DLow);\n // Check distance to the end plane and start plane, pick the plane that is closer\n vec4 positionEC = czm_modelViewRelativeToEye * positionRelativeToEye;\n float absStartPlaneDistance = abs(czm_planeDistance(startPlaneEC, positionEC.xyz));\n float absEndPlaneDistance = abs(czm_planeDistance(endPlaneEC, positionEC.xyz));\n vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlaneEC.xyz, endPlaneEC.xyz);\n vec3 upOrDown = normalize(cross(v_rightPlaneEC.xyz, planeDirection));\n vec3 normalEC = normalize(cross(planeDirection, upOrDown));\n upOrDown = cross(forwardDirectionEC, normalEC);\n upOrDown = float(v_texcoordNormalizationAndStartEcYZ.y > 1.0 || v_texcoordNormalizationAndStartEcYZ.y < 0.0) * upOrDown;\n positionEC.xyz += upOrDown;\n v_texcoordNormalizationAndStartEcYZ.y = czm_branchFreeTernary(v_texcoordNormalizationAndStartEcYZ.y > 1.0, 0.0, abs(v_texcoordNormalizationAndStartEcYZ.y));\n float width = uLineWidth;\n v_startPlaneNormalEcAndHalfWidth.xyz = startPlaneEC.xyz;\n v_startPlaneNormalEcAndHalfWidth.w = width * 0.5;\n v_endPlaneNormalEcAndBatchId.xyz = endPlaneEC.xyz;\n v_endPlaneNormalEcAndBatchId.w = 0.0;\n width = width * max(0.0, czm_metersPerPixel(positionEC));\n width = width / dot(normalEC, v_rightPlaneEC.xyz);\n normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);\n positionEC.xyz += width * normalEC;\n gl_Position = czm_depthClampFarPlane(czm_projection * positionEC);\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n v_vertexColor = vertexColor * uLineColor;\n }",_0xc39dc2=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2f9103=_0xc39dc2(void 0,(function(){return _0x2f9103.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f9103).search("(((.+)+)+)+$")}));_0x2f9103();var _0xf4d6c4="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n varying vec4 v_startPlaneNormalEcAndHalfWidth;\n varying vec4 v_endPlaneNormalEcAndBatchId;\n varying vec4 v_rightPlaneEC; // Technically can compute distance for this here\n varying vec4 v_endEcAndStartEcX;\n varying vec4 v_texcoordNormalizationAndStartEcYZ;\n varying vec4 v_vertexColor;\n varying vec4 vSecondColor;\n void main(void)\n {\n float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw));\n vec3 ecStart = vec3(v_endEcAndStartEcX.w, v_texcoordNormalizationAndStartEcYZ.zw);\n // Discard for sky\n if (logDepthOrDepth == 0.0) {\n discard;\n }\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n eyeCoordinate /= eyeCoordinate.w;\n float halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w * czm_metersPerPixel(eyeCoordinate);\n // Check distance of the eye coordinate against the right-facing plane\n float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);\n // Check eye coordinate against the mitering planes\n float distanceFromStart = czm_planeDistance(v_startPlaneNormalEcAndHalfWidth.xyz, -dot(ecStart, v_startPlaneNormalEcAndHalfWidth.xyz), eyeCoordinate.xyz);\n float distanceFromEnd = czm_planeDistance(v_endPlaneNormalEcAndBatchId.xyz, -dot(v_endEcAndStartEcX.xyz, v_endPlaneNormalEcAndBatchId.xyz), eyeCoordinate.xyz);\n if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0)\n {\n discard;\n }\n gl_FragColor = v_vertexColor;\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n// vec3 alignedPlaneNormal;\n// // start aligned plane\n// alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_startPlaneNormalEcAndHalfWidth.xyz);\n// alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\n// distanceFromStart = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, ecStart), eyeCoordinate.xyz);\n// // end aligned plane\n// alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_endPlaneNormalEcAndBatchId.xyz);\n// alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\n// distanceFromEnd = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, v_endEcAndStartEcX.xyz), eyeCoordinate.xyz);\n// // Clamp - distance to aligned planes may be negative due to mitering,\n// // so fragment texture coordinate might be out-of-bounds.\n// float s = clamp(distanceFromStart / (distanceFromStart + distanceFromEnd), 0.0, 1.0);\n// s = (s * v_texcoordNormalizationAndStartEcYZ.x) + v_texcoordNormalizationAndStartEcYZ.y;\n// float t = (widthwiseDistance + halfMaxWidth) / (2.0 * halfMaxWidth);\n// czm_writeDepthClampedToFarPlane();\n }\n ",_0xb4f9d9=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x180145=_0xb4f9d9(void 0,(function(){return _0x180145.toString().search("(((.+)+)+)+$").toString().constructor(_0x180145).search("(((.+)+)+)+$")}));_0x180145();var _0x2ee370={SIZE_PER_INSTANCE:20,SIZE_PER_DM_INSTANCE:35,S3MB_BIM_INSTANCE:17,S3MB_BIM_INSTANCE_2:16,S3MB_PIPE_INSTANCE:29},_0x1b51a8=Object.freeze(_0x2ee370),_0xcbc936=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xefac3f=_0xcbc936(void 0,(function(){return _0xefac3f.toString().search("(((.+)+)+)+$").toString().constructor(_0xefac3f).search("(((.+)+)+)+$")}));_0xefac3f();var _0x3b7d5d={NONE:0,LEFT:1,RIGHT:2,TOP:-1,BOTTOM:-2},_0x324096=Object.freeze(_0x3b7d5d),_0x4bc869=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x212358=_0x4bc869(void 0,(function(){return _0x212358.toString().search("(((.+)+)+)+$").toString().constructor(_0x212358).search("(((.+)+)+)+$")}));_0x212358();var _0x536916={DatasetField:0,EdgeLengthMin:1},_0x4e00e3=Object.freeze(_0x536916),_0x39868e=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x382d37=_0x39868e(void 0,(function(){return _0x382d37.toString().search("(((.+)+)+)+$").toString().constructor(_0x382d37).search("(((.+)+)+)+$")}));_0x382d37();var _0x5ba9f3={OPAQUE:"opaque",BLEND:"blend",MASK:"mask"},_0x841277=Object.freeze(_0x5ba9f3),_0x280637=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x352262=_0x280637(void 0,(function(){return _0x352262.toString().search("(((.+)+)+)+$").toString().constructor(_0x352262).search("(((.+)+)+)+$")}));function _0x15d634(e){}function _0x9a25e6(e){return e.verticesCount<=8||16==e.verticesCount}function _0x32b0a5(e){return 1!==e._brightness||1!==e._contrast||0!==e._hue||1!==e._saturation||1!==e._gamma}_0x352262(),_0x15d634.createShaderProgram=function(e,t,i){var n=t.layer,r=n._style3D,o="S3MTilesVectex_"+n.id,a="S3MTilesNormalFP_"+n.id,s=new a$O({name:o,sources:[_0x3edf32]}),l=new a$O({name:a,sources:[_0x422fc8]});switch(t.fileType){case c$q.PointCloudFile:if(o="S3MPointCloudVp_"+n.id,a="S3MPointCloudFp_"+n.id,n._pointCloudShading.renderMode==_0x595b1d.VOXEL){s=new a$O({name:o,sources:[_0x4b8bdf]}),l=new a$O({name:a,sources:[_0x40386e]}),n._bUseHypColorTable&&(s.defines.push(H$r.COMPUTE_W_VALUE),s.defines.push(H$r.HYPSOMETRIC),l.defines.push(H$r.HYPSOMETRIC),l.defines.push(H$r.COMPUTE_W_VALUE)),n._style3D.fillForeColor.alpha<.95&&l.defines.push("OIT")}else{s=new a$O({name:o,sources:[_0xcda09f]}),(l=new a$O({name:a,sources:[_0x2dcba9]})).defines.push(H$r.PT_CLOUD),s.defines.push(H$r.PT_CLOUD);var u=t.volTexture||t.volObj;if((n._bUseHypColorTable||u&&n._bUseHypColorTable)&&(s.defines.push(H$r.COMPUTE_W_VALUE),s.defines.push(H$r.HYPSOMETRIC),s.defines.push(H$r.VOL_AND_HYP),l.defines.push(H$r.HYPSOMETRIC),l.defines.push(H$r.COMPUTE_W_VALUE),l.defines.push(H$r.VOL_AND_HYP)),t$$((f=t.vertexPackage).nCompressOptions))((p=f.nCompressOptions)&_0x107fdf.SVC_Vertex)==_0x107fdf.SVC_Vertex&&s.defines.push(H$r.COMPRESS_VERTEX),(p&_0x107fdf.SVC_Normal)==_0x107fdf.SVC_Normal&&s.defines.push(H$r.COMPRESS_NORMAL),((p&_0x107fdf.SVC_VertexColor)==_0x107fdf.SVC_VertexColor||"MESHOPT"===n._vertexCompressionType)&&s.defines.push(H$r.COMPRESS_COLOR),(p&_0x107fdf.SVC_TexutreCoord)==_0x107fdf.SVC_TexutreCoord&&s.defines.push(H$r.COMPRESS_TEXCOORD);t$$(f.textureCoordIsW)&&t.hasTexCoord&&s.defines.push(H$r.TEXTURE_COORD_ONE_IS_W)}n._clipping&&l.defines.push("CLIP"),n._section&&l.defines.push("CLIPPLANE");break;case c$q.OSGBFile:case c$q.OSGBCacheFile:var c=t.materialPass._textures.length;if(t.materialPass._isInvalidOblique)(l=new a$O({name:a="S3MTilesFragment_"+n.id,sources:[_0x580916]})).defines.push(H$r.INVALID_OBLIQUE);else if(t.hasTexCoord){if(c>0){if(l=new a$O({name:a="S3MTilesFragment_"+n.id,sources:[_0x580916]}),t$$(t.materialPass._batchTable)){var h=t.materialPass._batchTable.getVertexShaderCallback()(_0x3edf32);(s=new a$O({name:o,sources:[h]})).defines.push(H$r.TextureBatch),l.defines.push(H$r.TextureBatch)}c>1&&t.hasTexCoord2&&(t$$(t.materialPass._batchTableBake)&&(s=new a$O({name:o,sources:[h=t.materialPass._batchTableBake.getVertexShaderCallback()(h)]})).defines.push(H$r.TextureBatch),s.defines.push(H$r.MULTI_TEX),l.defines.push(H$r.MULTI_TEX),2===n.textureEmissionUnit&&l.defines.push(H$r.SEC_TEX_EMISSION))}t.materialPass.hasTexture&&(s.defines.push(H$r.COMPUTE_TEXCOORD),l.defines.push(H$r.COMPUTE_TEXCOORD))}!t.hasTexCoord&&c>0&&l.defines.push(H$r.NO_TEXCOORD),t.materialPass._usePBRTextureBatch&&(s.defines.push(H$r.USE_BatchPBR),l.defines.push(H$r.USE_BatchPBR)),t.materialPass._RGBTOBGR&&l.defines.push(H$r.RGBTOBGR),n.shadowType===_0x3df1e1.NONE&&(s.defines.push("NormalVertex"),l.defines.push("NormalVertex")),e$1y.maximumVertexTextureImageUnits>0&&s.defines.push("VertexTextureSupport"),n._isS3MB?((t.instanceMode===_0x1b51a8.S3MB_BIM_INSTANCE||t.instanceMode===_0x1b51a8.S3MB_BIM_INSTANCE_2)&&(s.defines.push("InstanceRenderBIM"),s.defines.push("InstanceS3MB")),t.instanceMode===_0x1b51a8.S3MB_PIPE_INSTANCE&&(s.defines.push("InstanceRenderPipeline"),l.defines.push("InstanceRenderPipeline"),s.defines.push("InstanceS3MB"),_0x9a25e6(i._vertexPackage)&&(s.defines.push("IS_SQUARE_PIPE"),l.defines.push("IS_SQUARE_PIPE"))),(t.instanceMode===_0x1b51a8.S3MB_BIM_INSTANCE||t.instanceMode===_0x1b51a8.S3MB_BIM_INSTANCE_2||t.instanceMode===_0x1b51a8.S3MB_PIPE_INSTANCE)&&(s.defines.push("Instance"),l.defines.push("Instance"))):(t.instanceMode===_0x1b51a8.SIZE_PER_INSTANCE&&s.defines.push("InstanceRenderBIM"),t.instanceMode===_0x1b51a8.SIZE_PER_DM_INSTANCE&&(s.defines.push("InstanceRenderPipeline"),_0x9a25e6(i._vertexPackage)&&(s.defines.push("IS_SQUARE_PIPE"),l.defines.push("IS_SQUARE_PIPE"))),(t.instanceMode===_0x1b51a8.SIZE_PER_DM_INSTANCE||t.instanceMode===_0x1b51a8.SIZE_PER_INSTANCE)&&(s.defines.push("Instance"),l.defines.push("Instance"))),n._clipping&&l.defines.push("CLIP"),n._section&&l.defines.push("CLIPPLANE"),t.volObj?(s.defines.push(H$r.VOLUME),l.defines.push(H$r.VOLUME)):t.volTexture&&(s.defines.push(H$r.VOLUME2),l.defines.push(H$r.VOLUME2)),t$$(t.materialPass._mapTextures)&&Object.getOwnPropertyNames(t.materialPass._mapTextures).length>0&&l.defines.push("Map"),_0x32b0a5(n)&&l.defines.push(H$r.ADJUST_COLOR),n._hasLight&&(s.defines.push(H$r.HAS_LIGHT),l.defines.push(H$r.HAS_LIGHT)),t.hasNormal&&!t.ignoreNormal&&(s.defines.push(H$r.HAS_NORMAL),l.defines.push(H$r.HAS_NORMAL)),t.ignoreNormal&&l.defines.push(H$r.IGNORE_NORMAL),n._selectColorType===Ja.REPLACE?(s.defines.push(H$r.REPLACE_SELECT_TYPE),l.defines.push(H$r.REPLACE_SELECT_TYPE)):n.isSilhouette()&&(s.defines.push(H$r.SILHOUETTE_SELECT_TYPE),l.defines.push(H$r.SILHOUETTE_SELECT_TYPE)),(n._operationType&_0x24b8f6.CLIP)===_0x24b8f6.CLIP&&l.defines.push(H$r.CLIP_FILT_BY_ID),n._PBRMaterialType!==We$a.NONE&&(s.defines.push(H$r.PBR),l.defines.push(H$r.PBR)),n._flattening&&(s.defines.push(H$r.FALTTEN),t.context.floatingPointTexture&&s.defines.push(H$r.UseFloatTexture)),n._hasOverlay&&(s.defines.push(H$r.OVERLAY),l.defines.push(H$r.OVERLAY));u=t.volTexture||t.volObj;if((!n._bVolume&&n._bUseHypColorTable||u&&n._bUseHypColorTable)&&(s.defines.push(H$r.COMPUTE_W_VALUE),l.defines.push(H$r.COMPUTE_W_VALUE),s.defines.push(H$r.HYPSOMETRIC),l.defines.push(H$r.HYPSOMETRIC),s.defines.push(H$r.VOL_AND_HYP),l.defines.push(H$r.VOL_AND_HYP)),t$$(n._hypsometricSetting)&&t$$(n._hypsometricSetting._emissionTextureArray)&&n._hypsometricSetting._emissionTextureArray.length>0&&n._hypsometricSetting._emissionTextureArray.length===n._hypsometricSetting._loadedEmissionTexture?(s.defines.push(H$r.COMPUTE_W_VALUE),l.defines.push(H$r.COMPUTE_W_VALUE),s.defines.push(H$r.EMISSION_TEXTURE),l.defines.push(H$r.EMISSION_TEXTURE),s.defines.push(H$r.EMISSION_TEXTURE_COUNT+n._hypsometricSetting._emissionTextureArray.length),l.defines.push(H$r.EMISSION_TEXTURE_COUNT+n._hypsometricSetting._emissionTextureArray.length)):(s.defines.push(H$r.EMISSION_TEXTURE_COUNT+0),l.defines.push(H$r.EMISSION_TEXTURE_COUNT+0)),t.nVertexDim>3&&t$$(n._categorieTexture)&&s.defines.push(H$r.W_VISIBLE),t$$(n._vertexWeightMode)&&n._vertexWeightMode===_0x4e00e3.EdgeLengthMin&&n._triangleFiltratePixel>0&&s.defines.push(H$r.TRIANGLE_FILTRATE),t$$((f=t.vertexPackage).nCompressOptions))((p=f.nCompressOptions)&_0x107fdf.SVC_Vertex)==_0x107fdf.SVC_Vertex&&s.defines.push(H$r.COMPRESS_VERTEX),(p&_0x107fdf.SVC_Normal)==_0x107fdf.SVC_Normal&&s.defines.push(H$r.COMPRESS_NORMAL),((p&_0x107fdf.SVC_VertexColor)==_0x107fdf.SVC_VertexColor||"MESHOPT"===n._vertexCompressionType)&&s.defines.push(H$r.COMPRESS_COLOR),(p&_0x107fdf.SVC_TexutreCoord)==_0x107fdf.SVC_TexutreCoord&&s.defines.push(H$r.COMPRESS_TEXCOORD);n._lastSelectSkeletonId>-1&&s.defines.push("HAS_SKELETONSELECTED"),(t$$(n._imageryLayer)||n._needCoverImageryLayer)&&t$$(i._imagerys)&&i._imagerys.length>0&&t$$(t.attributeLocations.img)&&(s.defines.push("IMAGERY"),l.defines.push("IMAGERY")),n.partlyTransparent&&t$$(t.materialPass._bTransparentSorting)&&l.defines.push("PARTLY_TRANSPARENT"),n._scene.pickPointEnabled&&(s.defines.push(H$r.VERTEX_CAPTURE),l.defines.push(H$r.VERTEX_CAPTURE));var d=t$$(n.themeStyle)&&t$$(n.themeStyle.pbrMaterialIndex);((t.materialPass._usePBR||n._pbrParameter&We$a.ROUGHNESS)>0||t$$(n._PBRMaterialParams.loadingTexture)&&!n._PBRMaterialParams.loadingTexture||d)&&(l.defines.push(H$r.BRDF),t.context.textureFloatLinear&&l.defines.push("OES_texture_float_linear"),d&&(s.defines.push(H$r.PBR_THEME),l.defines.push(H$r.PBR_THEME),l.defines.push("NUM_PBR_MATERIALS "+e.pbrMaterialsArr.length)),(t.materialPass._baseColorTextureIndex>-1&&t$$(t.materialPass.baseColorTexture)||t$$(n._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture))&&t.hasTexCoord&&l.defines.push(H$r.HAS_BASE_TEXTURE),(t.materialPass._metallicRoughnessTextureIndex>-1&&t$$(t.materialPass.metallicRoughnessTexture)||t$$(n._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture))&&t.hasTexCoord&&l.defines.push(H$r.HAS_MetallicRoughness_TEXTURE),(t.materialPass._normalTextureIndex>-1&&t$$(t.materialPass.normalTexture)||t$$(n._PBRMaterialParams.pbrMetallicRoughness.normalTexture))&&t.hasTexCoord&&l.defines.push(H$r.HAS_NORMAL_TEXTURE),(t.materialPass._emissiveTextureIndex>-1&&t$$(t.materialPass.emissiveTexture)||t$$(n._PBRMaterialParams.pbrMetallicRoughness.emissiveTexture))&&l.defines.push(H$r.HAS_EMISSIVE_TEXTURE),(t$$(e.specularEnvironmentMaps)||t$$(e.hdrEnvMap))&&(l.defines.push(H$r.IBL),t$$(e.specularEnvironmentMaps)&&l.defines.push(H$r.KtxEnvMap)),(t.materialPass._occlusionTextureIndex>-1||t$$(n._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture)&&n._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture instanceof P$S)&&t.hasTexCoord&&l.defines.push(H$r.HAS_OCCLUSION_TEXTURE),(t$$(t.materialPass._anisotropy)||t$$(n._PBRMaterialParams.pbrMetallicRoughness.anisotropy))&&t.hasTexCoord&&l.defines.push(H$r.HAS_ANISOTROPY),(t$$(t.materialPass._subsurface)||t$$(n._PBRMaterialParams.pbrMetallicRoughness.subsurface))&&t.hasTexCoord&&l.defines.push(H$r.HAS_SUBSURFACE),(t$$(t.materialPass._clearcoat)||t$$(n._PBRMaterialParams.pbrMetallicRoughness.clearcoat))&&t.hasTexCoord&&l.defines.push(H$r.HAS_CLEARCOAT),(t.materialPass._indexOfRefraction>-1||t$$(n._PBRMaterialParams.pbrMetallicRoughness.indexOfRefraction)&&n._PBRMaterialParams.pbrMetallicRoughness.indexOfRefraction>0)&&l.defines.push(H$r.REFRACTION),t$$(n._PBRMaterialParams.pbrMetallicRoughness.snowEffect)&&n._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture&&n._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture instanceof P$S&&t$$(n._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture)&&n._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture instanceof P$S&&l.defines.push(H$r.HAS_SNOW),t$$(n._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&n._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wetnessFactor&&l.defines.push(H$r.HAS_WETNESS),t$$(n._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&n._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture&&n._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture instanceof P$S&&l.defines.push(H$r.HAS_RAIN),t$$(t.materialPass._alphaMode)&&t.materialPass._alphaMode===_0x841277.MASK&&l.defines.push(H$r.MASK)),n._PBRMaterialParams.pbrMetallicRoughness.emissionTextureIndex>0&&l.defines.push(H$r.SEC_TEX_EMISSION),n.visibleDistanceMax<6378137&&n.translucencyByDistance&&l.defines.push(H$r.VISIBLEDISTANCEMAX),t$$(t.unFinalResolution)&&t.unFinalResolution&&(s.defines.push("FINAL_RESOLUTION_CLIP"),l.defines.push("FINAL_RESOLUTION_CLIP"));break;case c$q.ClampGroundPolygon:case c$q.ClampObjectPolygon:var f,p;if(t$$((f=t.vertexPackage).clampRegionEdge))o="S3MTilesLineShadowVectex_"+n.id,a="S3MTilesShadowVolumeFP_"+n.id,s=new a$O({name:o,sources:[_0x26644a]}),l=new a$O({name:a,sources:[_0xf4d6c4]});else{var _=t.materialPass._textures.length>0||t.hasSymbolTexture;o="S3MTilesRegionShadowVectex_"+n.id,a="S3MTilesShadowVolumeFP_"+n.id,s=new a$O({name:o,sources:[_0x11528e]}),l=new a$O({name:a,sources:[_0x5cfb95]}),_&&(s.defines.push("HAS_TEXTURE"),l.defines.push("HAS_TEXTURE"))}if(t$$(f.nCompressOptions))((p=f.nCompressOptions)&_0x107fdf.SVC_Vertex)==_0x107fdf.SVC_Vertex&&s.defines.push(H$r.COMPRESS_VERTEX),(p&_0x107fdf.SVC_Normal)==_0x107fdf.SVC_Normal&&s.defines.push(H$r.COMPRESS_NORMAL),(p&_0x107fdf.SVC_TexutreCoord)==_0x107fdf.SVC_TexutreCoord&&s.defines.push(H$r.COMPRESS_TEXCOORD);break;case c$q.ExtendClampPolygonCache:o="S3MTilesExtendPolygonShadowVP_"+n.id,a="S3MTilesShadowVolumeFP_"+n.id,s=new a$O({name:o,sources:[_0x13fac9]}),l=new a$O({name:a,sources:[_0x5cfb95]});break;case c$q.ClampGroundLine:o="S3MTilesClampGroundLineVectex_"+n.id,a="S3MTilesClampGroundLineFP_"+n.id,s=new a$O({name:o,sources:[_0x4e3bb1]}),l=new a$O({name:a,sources:[_0x5cfb95]});break;case c$q.ClampGroundAndObjectLineCache:o="S3MTilesLineShadowVectex_"+n.id,a="S3MTilesShadowVolumeFP_"+n.id,s=new a$O({name:o,sources:[_0x26644a]}),l=new a$O({name:a,sources:[_0xf4d6c4]});break;case c$q.ClampObjectLine:o="S3MTilesLineShadowVectex_"+n.id,a="S3MTilesShadowVolumeFP_"+n.id,s=new a$O({name:o,sources:[_0x4e3bb1]}),l=new a$O({name:a,sources:[_0x5cfb95]});break;case c$q.IconPoint:r.billboardMode===Cr$2.FixedZ?s=new a$O({name:o="BillboardAxialVp_"+n.id,sources:[_0xdfcd48]}):r.billboardMode===Cr$2.FixedXYZ?s=new a$O({name:o="BillboardPixelSizeWithAngleVp_"+n.id,sources:[_0x3c7572]}):s=new a$O({name:o="S3MTilesBillboardPixelSizeVp_"+n.id,sources:[_0xf24962]}),l=new a$O({name:a="S3MTilesCommonOntTextureFP_"+n.id,sources:[_0x138417]}),s.defines.push("ICON"),t$$(r.fixedPixelSize)&&!r.fixedPixelSize&&s.defines.push("EYE_DISTANCE_SCALING"),n._clipping&&l.defines.push("CLIP"),n._section&&l.defines.push("CLIPPLANE");break;case c$q.Text:o="S3MTilesBillboardPixelSizeVp_"+n.id,s=r.billboardMode===Cr$2.FixedXYZ?new a$O({name:o,sources:[_0x3c7572]}):new a$O({name:o,sources:[_0xf24962]}),t.materialPass._textures.length>1?l=new a$O({name:a="S3MTilesFontWithHaloFp_"+n.id,sources:[_0x31bf11]}):t.materialPass._textures.length>0&&(l=new a$O({name:a="S3MTilesCommonOntTextureFP_"+n.id,sources:[_0x138417]})),t$$(r.fixedPixelSize)&&!r.fixedPixelSize&&s.defines.push("EYE_DISTANCE_SCALING"),n._clipping&&l.defines.push("CLIP"),t.layer._section&&l.defines.push("CLIPPLANE");break;case c$q.ExtendRegion3D:o="DynamicExtendRegionVp_"+n.id,a="DynamicExtendRegionFp_"+n.id,s=new a$O({name:o,sources:[_0x46e9c0]}),l=new a$O({name:a,sources:[_0x4425c8]}),t.materialPass._textures.length>0&&l.defines.push("HAS_TEXTURE"),n._hasLight&&(s.defines.push(H$r.HAS_LIGHT),l.defines.push(H$r.HAS_LIGHT));break;case c$q.RegionEffect:o="RegionMaterialVp_"+n.id,a="RegionMaterialFp_"+n.id,s=new a$O({name:o,sources:[_0x49a401]}),l=new a$O({name:a,sources:[_0x3427e2]}),n._clipping&&l.defines.push("CLIP"),n._hasExcavation&&(s.defines.push(H$r.EXCAVATION),l.defines.push(H$r.EXCAVATION)),n._hasServerExcavation&&(s.defines.push("SERVEREXCAVATION"),l.defines.push("SERVEREXCAVATION"));break;case c$q.PolylineEffect:o="PolylineVp_"+n.id,a="PolylineFp_"+n.id,s=new a$O({name:o,sources:[_0x5f03b2]}),l=new a$O({name:a,sources:[_0xe94b2]}),n._clipping&&l.defines.push("CLIP"),n._hasExcavation&&(s.defines.push(H$r.EXCAVATION),l.defines.push(H$r.EXCAVATION)),n._hasServerExcavation&&(s.defines.push("SERVEREXCAVATION"),l.defines.push("SERVEREXCAVATION"));break;case c$q.ClampGroundRealtimeRasterCache:l=new a$O({name:a="S3MTilesFragmentRaster_"+n.id,sources:[_0xc718bd]}),s=new a$O({name:o="S3MTilesVectexRaster_"+n.id,sources:[_0x2d1fa9]}),n._selectColorType===Ja.REPLACE&&(s.defines.push(H$r.REPLACE_SELECT_TYPE),l.defines.push(H$r.REPLACE_SELECT_TYPE)),(t.hasSymbolTexture||t.materialPass._textures.length>0)&&(s.defines.push(H$r.TEXCOORD),l.defines.push(H$r.TEXCOORD))}if(t.fileType===c$q.ClampGroundRealtimeRasterCache&&t.hasTexCoord2&&(o="PolylineVp_"+n.id,a="PolylineFp_"+n.id,s=new a$O({name:o,sources:[_0x5740ab]}),l=new a$O({name:a,sources:[_0xe94b2]})),t.hasTexCoord&&(s.defines.push(H$r.TEXCOORD),l.defines.push(H$r.TEXCOORD)),t.hasTexCoord2&&(s.defines.push(H$r.TEXCOORD2),l.defines.push(H$r.TEXCOORD2)),n.horizontalline&&(s.defines.push(H$r.COMPUTE_W_VALUE),l.defines.push(H$r.COMPUTE_W_VALUE),l.defines.push(H$r.HORIZONTAL_LINE)),n._transparentBackColorTolerance>0&&l.defines.push(H$r.TRANSPARENT_BACK_COLOR),n.splitDirection!==_0x324096.NONE&&l.defines.push(H$r.APPLY_SPLIT),n.swipeEnabled&&l.defines.push(H$r.APPLY_SWIPE),"MESHOPT"===n._vertexCompressionType&&s.defines.push("MeshOPT_Compress"),t$$(t.vertexPackage.customVertexAttribute)&&t$$(t.vertexPackage.customVertexAttribute.TextureCoordMatrix)&&s.defines.push("USE_TextureCoordMatrix"),t$$(t.vertexPackage.customVertexAttribute)&&t$$(t.vertexPackage.customVertexAttribute.VertexWeight)&&s.defines.push("USE_VertexWeight"),i._bMultiTemporalWeight&&(s.defines.push("MultiTemporalWeight"),l.defines.push("MultiTemporalWeight"),n.temporalSetting.changeZValue&&s.defines.push("ChangeZValue")),t$$(e.lightSource)){var m=e.lightSource.directionalLight;s.defines.push(H$r.DIR_LIGHTS+m.length),l.defines.push(H$r.DIR_LIGHTS+m.length),m.length>0&&l.defines.push(H$r.HAS_DIR_LIGHTS);var $=e.lightSource._visibleLightList[w$x.POINT];s.defines.push(H$r.POINT_LIGHTS+$.length),l.defines.push(H$r.POINT_LIGHTS+$.length),$.length>0&&l.defines.push(H$r.HAS_POINT_LIGHTS);var g=e.lightSource._visibleLightList[w$x.SPOT];s.defines.push(H$r.SPOT_LIGHTS+g.length),l.defines.push(H$r.SPOT_LIGHTS+g.length),g.length>0&&l.defines.push(H$r.HAS_SPOT_LIGHTS);var y=e.lightSource.hemisphereLight;l.defines.push(H$r.HEMISPHERE_LIGHTS+y.length),y.length>0&&l.defines.push(H$r.HAS_HEMISPHERE_LIGHTS)}return n._hasExcavation&&(s.defines.push(H$r.EXCAVATION),l.defines.push(H$r.EXCAVATION)),n._hasServerExcavation&&(s.defines.push("SERVEREXCAVATION"),l.defines.push("SERVEREXCAVATION")),t.hasInstanceSkeletonMatrix&&s.defines.push(H$r.UseInstanceSkeletonMatrix),n.mixColorType===_0x28ce18.REPLACE&&(s.defines.push(H$r.REPLACE_COLOR_TYPE),l.defines.push(H$r.REPLACE_COLOR_TYPE)),t.hasVertexColor&&s.defines.push("VertexColor"),t.isInstanceModel&&s.defines.push("InstanceModel"),t.hasTranslation&&s.defines.push(H$r.Translation),1===t.primitiveType&&(s.defines.push(H$r.POINT),l.defines.push(H$r.POINT)),2===t.primitiveType&&(l.defines.push(H$r.LineVector),s.defines.push(H$r.LineVector)),n.enableFusion&&s.defines.push(H$r.FusionMode),t$$(i._batchTable)&&s.defines.push("BatchTable"),t$$(n._floodFlagTexture)&&(s.defines.push(H$r.FLOOD_ANALYSIS),l.defines.push(H$r.FLOOD_ANALYSIS)),t$$(i._batchTable)&&(h=i._batchTable.getVertexShaderCallback()(s.sources[0]),s=new a$O({defines:s.defines,sources:[h]})),t$$(n._effect)&&1===n._effect._type&&s.defines.push("POLYLINE_DASH"),t$$(n._associateMaterialUrl)&&l.defines.push("BaseColorReplace"),t.context.webgl2&&l.defines.push("WEBGL2"),i._createImageryShader(n,l),p$15.fromCache({context:t.context,vertexShaderSource:s,fragmentShaderSource:l,attributeLocations:t.attributeLocations})},_0x15d634.createWaterShaderProgram=function(e,t,i,n){var r=new a$O({name:"FresnelVp",sources:[_0x1d4945]}),o=new a$O({name:"FresnelFp",sources:[_0x20558b]});return t._clipping&&o.defines.push("CLIP"),t._section&&o.defines.push("CLIPPLANE"),t$$(n._batchTable)&&r.defines.push("BatchTable"),t$$(t._rsColor.polygonOffset)&&t._rsColor.polygonOffset.enabled&&o.defines.push("POLYGON_OFFSET"),t._hasExcavation&&(r.defines.push(H$r.EXCAVATION),o.defines.push(H$r.EXCAVATION)),t._hasServerExcavation&&(r.defines.push("SERVEREXCAVATION"),o.defines.push("SERVEREXCAVATION")),t.splitDirection!==_0x324096.NONE&&o.defines.push(H$r.APPLY_SPLIT),t.swipeEnabled&&o.defines.push(H$r.APPLY_SWIPE),t$$(t._effect)&&1===t._effect._type&&r.defines.push("POLYLINE_DASH"),p$15.fromCache({context:e,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:i})};var _0x24c2b9=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2b122f=_0x24c2b9(void 0,(function(){return _0x2b122f.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b122f).search("(((.+)+)+)+$")}));_0x2b122f();var _0x2322b3=function(){this.model=void 0,this.frameState=void 0,this.layer=void 0};_0x2322b3.prototype.set=function(e,t,i){this.frameState=e,this.layer=t,this.model=i},_0x2322b3.prototype.execute=function(){var e=this.frameState,t=e.context,i=this.model,n=this.layer,r=i._vertexPackage,o=r.vertexAttributes,a=r.attrLocation,s=n._fileType,l=i._arrIndexPackage[0];t$$(l)&&"string"==typeof l.materialCode&&(l.materialCode=l.materialCode.replace(/\0/,""));var u=t$$(l)&&t$$(l.materialCode)?i._mapPass[l.materialCode]:_0x42161c.Default,c={};c.primitiveType=s===c$q.PointCloudFile?H$11.POINTS:t$$(l)?l.primitiveType:H$11.TRIANGLES,c.context=t,c.fileType=s,c.layer=n,c.instanceMode=r.instanceMode,c.volObj=i._volObj,c.volTexture=i._volTexture,c.materialPass=u,c.attributeLocations=a,c.nVertexDim=o[0].componentsPerAttribute,c.vertexPackage=r,c.hasNormal=t$$(a.aNormal)&&!n._ignoreNormal,c.hasTexCoord=t$$(a.aTexCoord0),c.hasTexCoord2=t$$(a.aTexCoord1),c.hasSymbolTexture=t$$(i._symbolTextureUrl),c.hasInstanceSkeletonMatrix=t$$(i._instanceSkeletonMatrix),c.hasVertexColor=t$$(a.aColor),c.isInstanceModel=i._isInstanceModel,c.hasTranslation=i._idsTranslateMap.length>0,t$$(n.waterEffectSet)?i._sp=_0x15d634.createWaterShaderProgram(t,n,a,i):(i._sp=_0x15d634.createShaderProgram(e,c,i),n.LoadingPriority===_0x271348.UsePagedLodInfo&&(c.unFinalResolution=!0,i._spUnFinalResolution=_0x15d634.createShaderProgram(e,c,i)))};var _0x7eafc2=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2fd6bf=_0x7eafc2(void 0,(function(){return _0x2fd6bf.toString().search("(((.+)+)+)+$").toString().constructor(_0x2fd6bf).search("(((.+)+)+)+$")}));function _0x427a19(){}function _0xf118f3(e){--e;for(var t=1;32>t;t<<=1)e|=e>>t;return e+1}_0x2fd6bf(),_0x427a19.computeNeighbors=function(e,t){for(var i=e.length/3,n=new Uint32Array(t+1),r=new Uint32Array(t+1),o=function(e,t){e<t?n[e+1]++:r[t+1]++},a=0;a<i;a++){var s=e[3*a],l=e[3*a+1],u=e[3*a+2];o(s,l),o(l,u),o(u,s)}for(a=l=s=0;a<t;a++)u=n[a+1],o=r[a+1],n[a+1]=s,r[a+1]=l,s+=u,l+=o;var c=new Uint32Array(6*i),h=n[t];for(o=function(e,t,i){if(e<t){var o=n[e+1]++;c[2*o]=t,c[2*o+1]=i}else o=r[t+1]++,c[2*h+2*o]=e,c[2*h+2*o+1]=i},a=0;a<i;a++)s=e[3*a],l=e[3*a+1],u=e[3*a+2],o(s,l,a),o(l,u,a),o(u,s,a);for(s=function(e,t){var i=2*e;for(e=t-e,t=1;t<e;t++){for(var n=c[i+2*t],r=c[i+2*t+1],o=t-1;0<=o&&c[i+2*o]>n;o--)c[i+2*o+2]=c[i+2*o],c[i+2*o+3]=c[i+2*o+1];c[i+2*o+2]=n,c[i+2*o+3]=r}},a=0;a<t;a++)s(n[a],n[a+1]),s(h+r[a],h+r[a+1]);var d=new Int32Array(3*i),f=function(t,i){return t===e[3*i]?0:t===e[3*i+1]?1:t===e[3*i+2]?2:-1};for(i=function(e,t){e=f(e,t),d[3*t+e]=-1},s=function(e,t,i,n){e=f(e,t),d[3*t+e]=n,i=f(i,n),d[3*n+i]=t},a=0;a<t;a++){l=n[a],u=n[a+1],o=r[a];for(var p=r[a+1];l<u&&o<p;){var _=c[2*l],m=c[2*h+2*o];_===m?(s(a,c[2*l+1],m,c[2*h+2*o+1]),l++,o++):_<m?(i(a,c[2*l+1]),l++):(i(m,c[2*h+2*o+1]),o++)}for(;l<u;)i(a,c[2*l+1]),l++;for(;o<p;)i(m=c[2*h+2*o],c[2*h+2*o+1]),o++}return d};var _0x278fa8=null;function _0x128acc(){}function _0x3b8d89(e){return Math.acos(1<e?1:-1>e?-1:e)}function _0x4db261(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=function(){var e=i(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var t=!0;return function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}}(),r=function(){var e=n(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var t=!0;return function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}}(),o=r(this,(function(){return o.toString().search("(((.+)+)+)+$").toString().constructor(o).search("(((.+)+)+)+$")}));return o(),e*Math.PI/180}_0x427a19.deduplicate=function(e,t,i,n,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=e.byteLength/(4*t)),e=new Uint32Array(e,n,r*t),n=new Uint32Array(r);var o=Math.floor(1.1*r)+1;(null==_0x278fa8||_0x278fa8.length<2*o)&&(_0x278fa8=new Uint32Array(_0xf118f3(2*o)));for(var a=0;a<2*o;a++)_0x278fa8[a]=0;var s=0,l=0!==i?Math.ceil(7.84*1.96/(i*i)*i*(1-i)):r;for(a=0;a<r;a++){if(a===l){if((c=1-s/a)+1.96*Math.sqrt(c*(1-c)/a)<i)return null;l*=2}for(var u,c=a*t,h=u=0;h<t;h++)u=(u=e[c+h]+u|0)+(u<<11)+(u>>>2)|0;h=(u>>>=0)%o;for(var d=s;0!==_0x278fa8[2*h+1];){if(_0x278fa8[2*h]===u){var f=_0x278fa8[2*h+1]-1,p=f*t;e:{for(var _=0;_<t;_++)if(e[c+_]!==e[p+_]){p=!1;break e}p=!0}if(p){d=n[f];break}}++h>=o&&(h-=o)}d===s&&(_0x278fa8[2*h]=u,_0x278fa8[2*h+1]=a+1,s++),n[a]=d}if(0!==i&&1-s/r<i)return null;for(i=new Uint32Array(t*s),a=s=0;a<r;a++)if(n[a]===s){for(o=e,l=a*t,c=i,u=s*t,h=t,d=0;d<h;d++)c[u+d]=o[l+d];s++}return{buffer:i.buffer,indices:n,uniqueCount:s}};var _0x56f215=4,_0x107d5c=35,_0x47bdf3=_0x4db261(_0x56f215),_0x194969=_0x4db261(_0x107d5c),_0x1d266e=Math.cos(_0x194969),_0x56e876=Math.cos(_0x47bdf3);function _0x32364f(e,t,i){var n=i.x-t.x,r=i.y-t.y;return(i=n*n+r*r+(t=i.z-t.z)*t)?(i=1/Math.sqrt(i),e.x=n*i,e.y=r*i,e.z=t*i,e):(e.x=0,e.y=0,e.z=0,e)}var _0xcbc24={position0:new a$11,position1:new a$11,faceNormal0:new a$11,faceNormal1:new a$11,cosAngle:0},_0x2d0a4b=new a$11,_0x575b36=new a$11;function _0x468e1d(e,t){var i=_0x3b8d89(e.cosAngle);return _0x32364f(_0x575b36,e.position1,e.position0),a$11.cross(e.faceNormal0,e.faceNormal1,_0x2d0a4b),i*(0<a$11.dot(_0x2d0a4b,_0x575b36)?-1:1)>t}function _0x3200e9(e){var t=e.faces.length/3,i=e.faces,n=e.neighbors,r=0,o=0;for(o=0;o<t;o++){var a=n[3*o+0],s=n[3*o+1],l=n[3*o+2],u=i[3*o+0],c=i[3*o+1],h=i[3*o+2];r+=-1===a||u<c?1:0,r+=-1===s||c<h?1:0,r+=-1===l||h<u?1:0}var d=new Int32Array(4*r),f=0;for(o=0;o<t;o++){a=n[3*o+0],s=n[3*o+1],l=n[3*o+2],u=i[3*o+0],c=i[3*o+1],h=i[3*o+2];(-1===a||u<c)&&(d[f++]=u,d[f++]=c,d[f++]=o,d[f++]=a),(-1===s||c<h)&&(d[f++]=c,d[f++]=h,d[f++]=o,d[f++]=s),(-1===l||h<u)&&(d[f++]=h,d[f++]=u,d[f++]=o,d[f++]=l)}return d}var _0x315773=new a$11,_0x12723d=new a$11,_0x42f8e8=new a$11;function _0x5d3e4e(e){var t=e.x*e.x+e.y*e.y+e.z*e.z;t>0&&(t=1/Math.sqrt(t),e.x*=t,e.y*=t,e.z*=t)}function _0x3d6f3a(e){for(var t=e.faces.length/3,i=e.vertices,n=e.dim,r=e.faces,o=new Float32Array(3*t),a=0;a<t;a++){var s=r[3*a+0],l=r[3*a+1],u=r[3*a+2];_0x315773.x=i[n*s],_0x315773.y=i[n*s+1],_0x315773.z=i[n*s+2],_0x12723d.x=i[n*l],_0x12723d.y=i[n*l+1],_0x12723d.z=i[n*l+2],_0x42f8e8.x=i[n*u],_0x42f8e8.y=i[n*u+1],_0x42f8e8.z=i[n*u+2],a$11.subtract(_0x12723d,_0x315773,_0x12723d),a$11.subtract(_0x42f8e8,_0x315773,_0x42f8e8),a$11.cross(_0x12723d,_0x42f8e8,_0x315773),_0x5d3e4e(_0x315773),o[3*a+0]=_0x315773.x,o[3*a+1]=_0x315773.y,o[3*a+2]=_0x315773.z}return o}function _0x1be5bd(e,t){0===t&&(t=e,e=0);for(var i=Array(t-e),n=e;n<t;n++)i[n-e]=n;return i}_0x128acc.extractEdges=function(e){var t=e.vertices,i=e.dim,n=_0xcbc24,r=n.position0,o=n.position1,a=n.faceNormal0,s=n.faceNormal1,l=_0x3d6f3a(e),u=_0x3200e9(e),c=u.length/4,h=new Float32Array(9*c),d=0,f=new Float32Array(12*c),p=0,_=0,m=0,$=_0x1be5bd(0,c),g=new Float32Array(c);g.forEach((function(e,n,a){var s=u[4*n+0],l=u[4*n+1];r.x=t[s*i],r.y=t[s*i+1],r.z=t[s*i+2],o.x=t[l*i],o.y=t[l*i+1],o.z=t[l*i+2],a[n]=a$11.distance(r,o)})),$.sort((function(e,t){return g[t]-g[e]}));for(var y=[],v=[],x=0;x<c;x++){var b=$[x],S=g[b],w=u[4*b+0],C=u[4*b+1],T=u[4*b+2],P=u[4*b+3],E=-1===P;if(r.x=t[w*i],r.y=t[w*i+1],r.z=t[w*i+2],o.x=t[C*i],o.y=t[C*i+1],o.z=t[C*i+2],E)a.x=l[3*T],a.y=l[3*T+1],a.z=l[3*T+2],s.x=a.x,s.y=a.y,s.z=a.z,n.cosAngle=a$11.dot(a,s);else if(a.x=l[3*T],a.y=l[3*T+1],a.z=l[3*T+2],s.x=l[3*P],s.y=l[3*P+1],s.z=l[3*P+2],n.cosAngle=a$11.dot(a,s),n.cosAngle>_0x56e876)continue;_+=S,m++,E||n.cosAngle<_0x1d266e?(h[d++]=n.position0.x,h[d++]=n.position0.y,h[d++]=n.position0.z,h[d++]=n.position1.x,h[d++]=n.position1.y,h[d++]=n.position1.z,h[d++]=n.faceNormal0.x,h[d++]=n.faceNormal0.y,h[d++]=n.faceNormal0.z,y.push(S)):_0x468e1d(n,_0x47bdf3)&&(f[p++]=n.position0.x,f[p++]=n.position0.y,f[p++]=n.position0.z,f[p++]=n.position1.x,f[p++]=n.position1.y,f[p++]=n.position1.z,f[p++]=n.faceNormal0.x,f[p++]=n.faceNormal0.y,f[p++]=n.faceNormal0.z,f[p++]=n.faceNormal1.x,f[p++]=n.faceNormal1.y,f[p++]=n.faceNormal1.z,v.push(S))}h=h.slice(0,d),f=f.slice(0,p);var A=_/m,L=y.length,M=v.length;return{regular:{instancesData:h,instanceCount:L,edgeLength:L*A},silhouette:{instancesData:f,instanceCount:M,edgeLength:M*A},averageEdgeLength:A}};var _0x47a212=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x31a0b3=_0x47a212(void 0,(function(){return _0x31a0b3.toString().search("(((.+)+)+)+$").toString().constructor(_0x31a0b3).search("(((.+)+)+)+$")}));function _0x5d8d50(e){}function _0x2149e8(e){if(t$$(e.cachedSidenessVertexBuffer))return e.cachedSidenessVertexBuffer;var t=new Float32Array(8),i=0;return t[i++]=0,t[i++]=0,t[i++]=0,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=0,e.cachedSidenessVertexBuffer=u$Y.createVertexBuffer({context:e,typedArray:t,usage:A$13.STATIC_DRAW}),e.cachedSidenessVertexBuffer.vertexArrayDestroyable=!1,e.cachedSidenessVertexBuffer}function _0x156c8a(){var e=new Uint16Array(6),t=0;return e[t++]=2,e[t++]=1,e[t++]=0,e[t++]=3,e[t++]=2,e[t++]=0,e}function _0x51ccce(e,t){for(var i,n,r,o=t.componentsPerAttribute,a=e.vertCompressConstant,s=new a$11(e.minVerticesValue.x,e.minVerticesValue.y,e.minVerticesValue.z),l=new Uint16Array(t.typedArray.buffer,t.typedArray.byteOffset,t.typedArray.byteLength/2),u=new Float32Array(3*e.verticesCount),c=0;c<e.verticesCount;c++)i=l[o*c]*a+s.x,n=l[o*c+1]*a+s.y,r=l[o*c+2]*a+s.z,u[3*c]=i,u[3*c+1]=n,u[3*c+2]=r;return u}_0x31a0b3(),_0x5d8d50.RegularInstanceStride=12,_0x5d8d50.SilhouetteInstanceStride=15,_0x5d8d50.createEdgeData=function(e,t,i){if(0==t.length)return null;var n,r=t[0];n=0===r.indexType?new Uint16Array(r.indicesTypedArray.buffer,r.indicesTypedArray.byteOffset,r.indicesTypedArray.byteLength/2):new Uint32Array(r.indicesTypedArray.buffer,r.indicesTypedArray.byteOffset,r.indicesTypedArray.byteLength/4);var o=_0x5d8d50.extractEdgeInformation(e,!1,n),a=_0x128acc.extractEdges(o);return t$$(i)&&(t$$(a.regular.instancesData)&&i.push(a.regular.instancesData.buffer),t$$(a.silhouette.instancesData)&&i.push(a.silhouette.instancesData.buffer)),a},_0x5d8d50.createIndexBuffer=function(e){return t$$(e.cachedSidenessIndexBuffer)||(e.cachedSidenessIndexBuffer=u$Y.createIndexBuffer({context:e,typedArray:_0x156c8a(),usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT}),e.cachedSidenessIndexBuffer.vertexArrayDestroyable=!1),e.cachedSidenessIndexBuffer},_0x5d8d50.createRegularEdgeAttributes=function(e,t){if(t$$(t.instancesData)&&0!=t.instancesData.length){var i={},n=[];t.attributeLocations=i,t.attributes=n;var r=u$Y.createVertexBuffer({context:e,typedArray:t.instancesData,usage:A$13.STATIC_DRAW});t.instancesData=null;var o=C$12.getSizeInBytes(C$12.FLOAT),a=_0x2149e8(e),s=0;i.aSideness=s++,n.push({index:i.aSideness,vertexBuffer:a,componentsPerAttribute:2,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:2*C$12.getSizeInBytes(C$12.FLOAT),normalize:!1});var l=_0x5d8d50.RegularInstanceStride,u=0;i.aPosition0=s++,n.push({index:i.aPosition0,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:o*u,strideInBytes:o*l,instanceDivisor:1}),u+=3,i.aPosition1=s++,n.push({index:i.aPosition1,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:o*u,strideInBytes:o*l,instanceDivisor:1}),u+=3,i.aNormal=s++,n.push({index:i.aNormal,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,normalize:!0,offsetInBytes:o*u,strideInBytes:o*l,instanceDivisor:1}),u+=3,i.batchId=s++,n.push({index:i.batchId,vertexBuffer:r,componentsPerAttribute:1,componentDatatype:C$12.FLOAT,normalize:!0,offsetInBytes:o*u,strideInBytes:o*l,instanceDivisor:1}),u+=1,i.aVariantStroke=s++,n.push({index:i.aVariantStroke,vertexBuffer:r,componentsPerAttribute:1,componentDatatype:C$12.FLOAT,normalize:!0,offsetInBytes:o*u,strideInBytes:o*l,instanceDivisor:1}),u+=1,i.aVariantExtension=s++,n.push({index:i.aVariantExtension,vertexBuffer:r,componentsPerAttribute:1,componentDatatype:C$12.FLOAT,normalize:!0,offsetInBytes:o*u,strideInBytes:o*l,instanceDivisor:1}),u+=1}},_0x5d8d50.createSilhouetteEdgeAttributes=function(e,t){if(t$$(t.instancesData)&&0!=t.instancesData.length){var i={},n=[];t.attributeLocations=i,t.attributes=n;var r=u$Y.createVertexBuffer({context:e,typedArray:t.instancesData,usage:A$13.STATIC_DRAW});t.instancesData=null;var o=C$12.getSizeInBytes(C$12.FLOAT),a=0;i.aSideness=a++,n.push({index:i.aSideness,vertexBuffer:_0x2149e8(e),componentsPerAttribute:2,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:2*o,normalize:!1});var s=_0x5d8d50.SilhouetteInstanceStride,l=0;i.aPosition0=a++,n.push({index:i.aPosition0,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=3,i.aPosition1=a++,n.push({index:i.aPosition1,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=3,i.aNormalA=a++,n.push({index:i.aNormalA,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,normalize:!0,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=3,i.aNormalB=a++,n.push({index:i.aNormalB,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,normalize:!0,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=3,i.batchId=a++,n.push({index:i.batchId,vertexBuffer:r,componentsPerAttribute:1,componentDatatype:C$12.FLOAT,normalize:!0,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=1,i.aVariantStroke=a++,n.push({index:i.aVariantStroke,vertexBuffer:r,componentsPerAttribute:1,componentDatatype:C$12.FLOAT,normalize:!0,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=1,i.aVariantExtension=a++,n.push({index:i.aVariantExtension,vertexBuffer:r,componentsPerAttribute:1,componentDatatype:C$12.FLOAT,normalize:!0,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=1}},_0x5d8d50.extractEdgeInformation=function(e,t,i){var n,r=e.attrLocation.aPosition,o=e.vertexAttributes[r],a=t$$(e.nCompressOptions)&&(e.nCompressOptions&_0x107fdf.SVC_Vertex)===_0x107fdf.SVC_Vertex,s=o.componentsPerAttribute;a?(s=3,n=_0x51ccce(e,o)):n=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4);var l=n.length/s;if(t&&i)return{faces:i,neighbors:_0x427a19.computeNeighbors(i,l),vertices:n,dim:s};var u,c=o.typedArray.buffer;u=a?n.buffer:c.slice(o.typedArray.byteOffset,o.typedArray.byteOffset+o.typedArray.byteLength);var h=_0x427a19.deduplicate(u,s),d=_0x5d8d50.selectIndexData(h.indices,i);return{faces:d,neighbors:_0x427a19.computeNeighbors(d,h.uniqueCount),vertices:new Float32Array(h.buffer),dim:s}},_0x5d8d50.selectIndexData=function(e,t){if(t){t=t.slice();for(var i=0;i<t.length;i++)t[i]=e[t[i]];return t}return e};var _0x4450d2=new a$11,_0x51ee62=new a$11,_0x3bf475=new a$11,_0x3d6b69=new a$11,_0xa07775=new a$11,_0xe41d1=new a$11,_0x1295b8=new a$11,_0x5416c5=new a$11;function _0x51bb1c(e,t){function i(e,t,i){var n=48217*e%2147483647,r=t+n/2147483647*(i-=t);return{seed:n,result:Math.round(r)}}var n=function(e,t){var i=new Float32Array(6),n=new Uint32Array(i.buffer),r=new Uint32Array(1);i[0]=e.x,i[1]=e.y,i[2]=e.z,i[3]=t.x,i[4]=t.y,i[5]=t.z,r[0]=5381;for(var o=0;o<n.length;o++)r[0]=31*r[0]+n[o];return r[0]}(e,t);t$$(n)||(n=2147483647*Math.random());var r=i(n,0,255);n=r.seed,r.result,n=(r=i(n,0,5)).seed;var o,a=r.result;n=(r={seed:o=48217*n%2147483647,result:o/2147483646}).seed;var s=r.result;return s=-(1-Math.min(s/.7,1))+Math.max(0,s-.7)/(1-.7),{variantStroke:a,variantExtension:s=255*(Math.abs(s)**1.2*(0>s?-1:1)*.5+.5)}}_0x5d8d50.createEdgeDataByIndices=function(e,t){var i,n,r=e.attrLocation.aPosition,o=e.vertexAttributes[r],a=t$$(e.nCompressOptions)&&(e.nCompressOptions&_0x107fdf.SVC_Vertex)===_0x107fdf.SVC_Vertex,s=o.componentsPerAttribute;a?(s=3,i=_0x51ccce(e,o)):i=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4);for(var l=[],u=[],c=(n=0===t.indexType?new Uint16Array(t.indicesTypedArray.buffer,t.indicesTypedArray.byteOffset,t.indicesTypedArray.byteLength/2):new Uint32Array(t.indicesTypedArray.buffer,t.indicesTypedArray.byteOffset,t.indicesTypedArray.byteLength/4)).length,h=0,d=0,f=4*Math.floor(c/4);d<f;d+=4){var p=n[d],_=n[d+1],m=n[d+2],$=n[d+3];if(_0x4450d2.x=i[s*p],_0x4450d2.y=i[s*p+1],_0x4450d2.z=i[s*p+2],_0x51ee62.x=i[s*_],_0x51ee62.y=i[s*_+1],_0x51ee62.z=i[s*_+2],_0x3bf475.x=i[s*m],_0x3bf475.y=i[s*m+1],_0x3bf475.z=i[s*m+2],_0x3d6b69.x=i[s*$],_0x3d6b69.y=i[s*$+1],_0x3d6b69.z=i[s*$+2],!(a$11.equals(_0x51ee62,_0x3bf475)||a$11.equals(_0x51ee62,_0x3d6b69)||a$11.equals(_0x51ee62,_0x4450d2)||a$11.equals(_0x3bf475,_0x4450d2)||a$11.equals(_0x3d6b69,_0x4450d2))){if(m===$){if(a$11.subtract(_0x51ee62,_0x4450d2,_0xa07775),a$11.subtract(_0x3bf475,_0x4450d2,_0xe41d1),a$11.cross(_0xa07775,_0xe41d1,_0xa07775),a$11.equals(_0xa07775,a$11.ZERO))continue;a$11.normalize(_0xa07775,_0xa07775),l.push(_0x4450d2.x),l.push(_0x4450d2.y),l.push(_0x4450d2.z),l.push(_0x51ee62.x),l.push(_0x51ee62.y),l.push(_0x51ee62.z),l.push(_0xa07775.x),l.push(_0xa07775.y),l.push(_0xa07775.z),l.push(p);var g=(v=_0x51bb1c(_0x4450d2,_0x51ee62)).variantStroke,y=v.variantExtension;l.push(g),l.push(y)}else{if(a$11.subtract(_0x51ee62,_0x4450d2,_0xa07775),a$11.subtract(_0x3bf475,_0x4450d2,_0xe41d1),a$11.cross(_0xa07775,_0xe41d1,_0xa07775),a$11.equals(_0xa07775,a$11.ZERO)||(a$11.normalize(_0xa07775,_0xa07775),a$11.subtract(_0x51ee62,_0x4450d2,_0x1295b8),a$11.subtract(_0x3d6b69,_0x4450d2,_0x5416c5),a$11.cross(_0x5416c5,_0x1295b8,_0x1295b8),a$11.equals(_0x1295b8,a$11.ZERO)))continue;a$11.normalize(_0x1295b8,_0x1295b8),u.push(_0x4450d2.x),u.push(_0x4450d2.y),u.push(_0x4450d2.z),u.push(_0x51ee62.x),u.push(_0x51ee62.y),u.push(_0x51ee62.z),u.push(_0xa07775.x),u.push(_0xa07775.y),u.push(_0xa07775.z),u.push(_0x1295b8.x),u.push(_0x1295b8.y),u.push(_0x1295b8.z),u.push(p);var v;g=(v=_0x51bb1c(_0x4450d2,_0x51ee62)).variantStroke,y=v.variantExtension;u.push(g),u.push(y)}h+=a$11.distance(_0x4450d2,_0x51ee62)}}var x=h/(c/4),b=l.length/_0x5d8d50.RegularInstanceStride,S=u.length/_0x5d8d50.SilhouetteInstanceStride;return{regular:{instancesData:new Float32Array(l),instanceCount:b,edgeLength:b*x},silhouette:{instancesData:new Float32Array(u),instanceCount:S,edgeLength:S},averageEdgeLength:x}};var _0x2635e9=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x504785=_0x2635e9(void 0,(function(){return _0x504785.toString().search("(((.+)+)+)+$").toString().constructor(_0x504785).search("(((.+)+)+)+$")}));function _0x53605a(e,t){this._id=e,this._worldPosLeftBottom=void 0,this._windowCoordRect=new s$1p,this._weight=1e3,this._heigtRangeMax=-1,this._distanceRangeSquare=Number.POSITIVE_INFINITY,this._pixelWidth=-1,this._pixelHeight=-1,this._layer=t,this._visible=void 0}_0x504785(),Object.defineProperties(_0x53605a.prototype,{windowCoordRect:{get:function(){return this._windowCoordRect}},heigtRangeMax:{get:function(){return this._heigtRangeMax},set:function(e){this._heigtRangeMax=e;var t=e*e;this._distanceRangeSquare=Math.max(1e4,t)}},weight:{get:function(){return this._weight},set:function(e){this._weight=e}},pixelWidth:{get:function(){return this._pixelWidth},set:function(e){this._pixelWidth=e}},pixelHeight:{get:function(){return this._pixelHeight},set:function(e){this._pixelHeight=e}},worldPosLeftBottom:{set:function(e){this._worldPosLeftBottom=e}},layerName:{get:function(){return this._layer.name}},layer:{get:function(){return this._layer}},id:{get:function(){return this._id}},visible:{get:function(){return this._visible},set:function(e){_0x53605a.addToChangeQueue(this,e),this._visible=e}}});var _0x4e02cc=new r$T;_0x53605a.prototype.calcWindowCoordRect=function(e,t){m$13.pointToWindowCoordinates(e,t,this._worldPosLeftBottom,_0x4e02cc),this._windowCoordRect.west=_0x4e02cc.x,this._windowCoordRect.east=_0x4e02cc.x+this._pixelWidth,this._windowCoordRect.south=_0x4e02cc.y,this._windowCoordRect.north=_0x4e02cc.y-this._pixelHeight},_0x53605a.prototype.isInViewport=function(e,t){return this._windowCoordRect.west+200>0&&this._windowCoordRect.east<e+this._pixelWidth&&this._windowCoordRect.north+200>0&&this._windowCoordRect.south-50<t+this._pixelHeight},_0x53605a.prototype.isInHeightRange=function(e){return!this._layer._hasHeightRangeAttributeName||e<this._heigtRangeMax},_0x53605a.prototype.isInVisibleRange=function(e){return!this._layer._hasHeightRangeAttributeName||a$11.distanceSquared(e,this._worldPosLeftBottom)<this._distanceRangeSquare};var _0x2d3b67=new s$1p,_0x462ef9=new s$1p;function _0x58942c(e,t){e.east+=t,e.west-=t,e.south+=t,e.north-=t}_0x53605a.isIntersectionTest=function(e,t,i){s$1p.clone(e,_0x2d3b67),s$1p.clone(t,_0x462ef9),_0x58942c(_0x2d3b67,i),_0x58942c(_0x462ef9,i);var n=Math.max(_0x2d3b67.west,_0x462ef9.west),r=Math.min(_0x2d3b67.south,_0x462ef9.south),o=Math.min(_0x2d3b67.east,_0x462ef9.east);return!(r<=Math.max(_0x2d3b67.north,_0x462ef9.north)||n>=o)};var _0x57e5da=[],_0x579a5a=[];function _0x1e2719(e,t){for(var i=0,n=e._layerQueue.length;i<n;i++){var r=e._layerQueue[i];if(r.id===t)return r}}function _0x238928(e,t){for(var i in t){var n=e.find(i),r=n?n.iconRelatedTextLayerID:void 0;if(r){var o=i,a=_0x1e2719(e,r);if(a){var s=t[a.name];s&&s.length>0&&(t[o]=s)}}}}_0x53605a.meetVisible=function(e,t,i){_0x57e5da.length=0,_0x579a5a.length=0;e.sort((function(e,t){return e.weight-t.weight}));for(var n=[],r=0,o=e.length;r<o;r++){(p=e[r]).layerName;var a=p.layer;if(!a.iconRelatedTextLayerID||!i){var s=p.id;if(a._hasObjsVisibleMap&&!0===a._objsVisibleMap[s]){n.push(p),p.visible=!0;continue}if(a._hasObjsVisibleMap&&!1===a._objsVisibleMap[s]){p.visible=!1;continue}for(var l=p.windowCoordRect,u=!1,c=0,h=_0x57e5da.length;c<h;c++){var d=_0x57e5da[c],f=d.windowCoordRect;if(!(p.id===d.id&&p.layer.id===d.layer.id)&&_0x53605a.isIntersectionTest(l,f,t)){u=!0;break}}u?p.visible=!1:(_0x57e5da.push(p),p.visible=!0)}}if(n.length>0)for(o=0;o<n.length;o++){(p=n[o]).layerName,l=p.windowCoordRect,u=!1;for(var p,_=0;_<_0x579a5a.length;_++){f=_0x579a5a[_];if(_0x53605a.isIntersectionTest(l,f,t)){s=p.id;p.visible=!1,u=!0;break}}u||_0x579a5a.push(l)}},_0x53605a._visibleChangedQueue={},_0x53605a._invisibleChangedQueue={},_0x53605a.addToChangeQueue=function(e,t){var i,n=e.layerName;(i=t?_0x53605a._visibleChangedQueue:_0x53605a._invisibleChangedQueue)[n]||(i[n]=[]),i[n].push(e.id)},_0x53605a.addPotentialVisibiltyChangedLayer=function(e){_0x53605a._visibleChangedQueue[e]||(_0x53605a._visibleChangedQueue[e]=[]),_0x53605a._invisibleChangedQueue[e]||(_0x53605a._invisibleChangedQueue[e]=[])},_0x53605a.setVisibiltyChangedToLayer=function(e,t){for(var i in t&&(_0x238928(e,_0x53605a._visibleChangedQueue),_0x238928(e,_0x53605a._invisibleChangedQueue)),_0x53605a._visibleChangedQueue){var n=e.find(i);(r=_0x53605a._visibleChangedQueue[i]).length>0&&n.setOnlyObjsVisible(r,!0,!1)}for(var i in _0x53605a._invisibleChangedQueue){var r;n=e.find(i);(r=_0x53605a._invisibleChangedQueue[i]).length>0&&n.setOnlyObjsVisible(r,!1,!1)}},_0x53605a.resetVisibleChangedQueue=function(){_0x53605a._visibleChangedQueue={},_0x53605a._invisibleChangedQueue={}},_0x53605a.prototype.isDestroyed=function(){return!1},_0x53605a.prototype.destroy=function(){return s$1e(this)};var _0x23b651=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x33fe61=_0x23b651(void 0,(function(){return _0x33fe61.toString().search("(((.+)+)+)+$").toString().constructor(_0x33fe61).search("(((.+)+)+)+$")}));function _0x38aae9(e){var t=(e=e||{}).arrIndexPackage,i=e.vertexPackage,n=e.mapPass;if(!(e.arrIndexPackage&&e.vertexPackage&&e.mapPass&&t$$(e.context)))throw new t$_("gl texture indexes vertexes is required to create RenderEntityPagelod");if(this._layer=e.layer,this._entity=e.entity,this._context=e.context,this._arrIndexPackage=t,this._vertexPackage=i,this._attributeLocations=this._vertexPackage.attrLocation,this._edgeGeometry=e.edgeGeometry,this._pickInfo=e$1Y(e.pickInfo,{}),this._ids=Object.keys(this._pickInfo),this._vertexBufferToCreate=new i$Y,this._vertexWeightBuffers=[],this._bMultiTemporalWeight=!1,this._fMultiTemporalFactor=0,this._fMultiTemporalPercentage=0,this._nFirstMultiTemporalPos=-1,this._nSecondMultiTemporalPos=-1,this._nSpecificTemporalPos=-1,this._layer._temporalCount>0&&(this._bMultiTemporalWeight=!0),this._bMultiTemporalWeight){for(var r=[],o=Object.keys(i.attrLocation),a=o.length,s=0;s<a;++s){var l=o[s];r.push(i.attrLocation[l])}r.sort((function(e,t){return e-t})),this._nFirstMultiTemporalPos=i.attrLocation.aVertexWeight,this._nSecondMultiTemporalPos=i.attrLocation.aVertexWeight_1;var u=[],c=r.length;for(s=0;s<this._vertexPackage.vertexAttributes.length;s++){if(s===i.attrLocation.aVertexWeight||s===i.attrLocation.aVertexWeight_1||s>r[c-1]){var h=new Uint8Array(this._vertexPackage.vertexAttributes[s].typedArray,0,this._vertexPackage.vertexAttributes[s].byteLength);if(this._vertexWeightBuffers.push(h),s>r[c-1])continue}u.push(this._vertexPackage.vertexAttributes[s]),this._vertexBufferToCreate.enqueue(s)}this._vertexPackage.vertexAttributes=u}else for(s=0;s<this._vertexPackage.vertexAttributes.length;s++)this._vertexBufferToCreate.enqueue(s);for(this._indexBufferToCreate=new i$Y,s=0;s<this._arrIndexPackage.length;s++)13!==this._arrIndexPackage[s].primitiveType&&this._arrIndexPackage[s].indicesCount>0&&this._indexBufferToCreate.enqueue(s);if(this._subTexturesToUpload=new i$Y,this._shaderProgramToCreate=new i$Y,this._shaderProgramToCreate.enqueue(0),this._version=e.version||_0x335bbd.S3M,this._isS3MBlock=e$1Y(e.isS3MBlock,!1),this._initialize=!1,this._matModel=e.matModel,this._iblReferenceFrameMatrix=r$W.clone(r$W.IDENTITY),this._tranlateMatrix=c$1a.clone(c$1a.IDENTITY),this._mapPass=n,this._colorCommand=void 0,this._pickCommand=void 0,this._wireFrameCommands={},this._stencilCommand=void 0,this._clampColorCommand=void 0,this._clipStencilCommand=void 0,this._pickRectCommand=void 0,this._spatialQueryCommand=void 0,this._waterIndex=-1,this._waterTime=0,this._boundingVolume=e.boundingVolume,this._instanceCount=i.instanceCount,this._instanceMode=i.instanceMode,this._isS3MB=e$1Y(e.isS3MB,!1),this._volObj=e.volObj,this._volTexture=e.volTexture,this._geoMatrix=e$1Y(e.geoMatrix,c$1a.IDENTITY),this._inverseGeoMatrix=c$1a.inverse(this._geoMatrix,new c$1a),this._instanceSkeletonMatrix=e.instanceSkeletonMatrix,this._wireFrameIndexBuffers=void 0,this._bufferPrepared=!1,this._fileType=e.fileType,e.fileType===c$q.ExtendRegion3D&&t$$(i.attrLocation.aTexCoord1)){var d=i.vertexAttributes[i.attrLocation.aTexCoord1].typedArray,f=d.slice(d.buffer,d.byteOffset,d.byteLength);this._texCoord1=new Float32Array(f.buffer,0,f.byteLength/4)}this._selectionInforMap=void 0,this._geometryByteLength=0,this._intersectWithClipPlane=!1,this._boundingRectangle=e.boundingRectangle,this._symbolTextureUrl=e.symbolTextureUrl,this._symbolColor=e.symbolColor,this._symbolTextureRepeat=e.symbolTextureRepeat,t$$(this._symbolTextureRepeat)||(this._symbolTextureRepeat=new r$T(600,600)),this._clampRegionEdge=e$1Y(i.clampRegionEdge,!1),t$$(e.level)&&(this._level=e.level,this._row=e.row,this._col=e.col),this._rasterized=!1,this._groupName=e.groupName,this._ptIndexGroup=e.ptIndexGroup,this._geoName=e.geoName,this.oriPassGroup=we$l.S3MTiles,this._labelPosArray=[],this._labelTextArray=[],this._pickIDArray=[],this._labelsCreated={},this._labelIndexs={},this._labelPromiseArr=[],this._labelReady=!1,this._batchTable=void 0,this._updateBatchTable=!0,this._idsOperationMap=new e$1F,this._idsColorMap=new e$1F,this._idsTranslateMap=new e$1F,this._idsPBRIndexMap=new e$1F,this._hasBloomOperation=!1,this._isInstanceModel=this._layer.skeletonSelectEnable&&"InstanceModel"===this._layer._dataType&&i.skeletonCount>0,this.skeletonCount=i.skeletonCount,this._imagerys=[],this._imageryLevels=[],this._showImagerysImmediate=!0,this._imageryTextureBound=new r$T,this._isLeaf=!1,this._isHypsometricVisible=!0,this._themeDirty=!1,this._passIncrement=0,this._clipCommand=void 0,this._disFromCamera=0,this.materialPass=void 0,this.useWValue=!1,this.useLineColor=!1,this._polygons=void 0,this._polygonId=void 0,this._polygonCommands=[],this._imageRasterFinish=!1,this._isSelected=!1,this._clipBounds=[],this._scaleImagerys=[],this._visibleScaleImageryIndex=void 0,this._plusRoArray=[]}_0x33fe61(),Object.defineProperties(_0x38aae9.prototype,{renderable:{get:function(){if(!this._isS3MBlock||!t$$(this._mapPass))return this._bufferPrepared;for(var e in this._mapPass)if(this._mapPass.hasOwnProperty(e)){var t=this._mapPass[e],i=t._textures[0];return t$$(i)?this._bufferPrepared&&(i.renderable&&i.ready||t$$(t._ancestorTexture)):this._bufferPrepared}return this._bufferPrepared}}}),_0x38aae9.prototype.initialize=function(){if(!this._initialize){if(this.createSelectionMap(),this.createBoundingBoxForInstance(),this._fileType===c$q.Text||this._fileType===c$q.IconPoint?this.createBillboardsBounds(this._layer):this._fileType===c$q.ClampGroundPolygon&&this.createClampGroundBounds(),t$$(this._symbolTextureUrl)&&_0x51a186.createTexture({imageUrl:this._symbolTextureUrl}),this.prepareLabels(),!t$$(this._batchTable)&&this._ids.length>0){var e=this._layer,t=e._context;_0x1f534c(t,this),_0x18e23f(t,this,e)}this._initialize=!0}},_0x38aae9.prototype.createSelectionMap=function(){var e=this._pickInfo;if(t$$(e)&&_0x335bbd.S3M4===this._version)for(var t in this._selectionInforMap=new e$1F,e)!e.hasOwnProperty(t)||-1===this._vertexPackage.instanceIndex&&"0"===t||this._selectionInforMap.set(t,e[t])},_0x38aae9.prototype.createBoundingBoxForInstance=function(){var e=this._vertexPackage;if(t$$(e)&&-1!==e.instanceIndex&&t$$(e.instanceBounds)){var t=e.instanceBounds,i=new a$11(t[0],t[1],t[2]),n=new a$11(t[3],t[4],t[5]),r=a$11.lerp(i,n,.5,new a$11),o=a$11.distance(r,i),a=new a$11;c$1a.multiplyByPoint(this._matModel,r,a),this._boundingVolume.center=a,this._boundingVolume.radius=o>this._boundingVolume.radius?o:this._boundingVolume.radius,e.instanceBounds=void 0}},_0x38aae9.prototype.createClampGroundBounds=function(){var e=this._boundingRectangle.x,t=this._boundingRectangle.y,i=this._boundingRectangle.x+this._boundingRectangle.width,n=this._boundingRectangle.y+this._boundingRectangle.height,r=new a$11(i,t,0),o=new a$11(e,n,0);this._southWestCorner=new a$11(e,t,0),this._eastVector=new a$11,this._northVector=new a$11,a$11.subtract(r,this._southWestCorner,this._eastVector),a$11.subtract(o,this._southWestCorner,this._northVector)},_0x38aae9.prototype.createBillboardsBounds=function(e){this._arrtextOverlapInfo=[];var t=this._matModel,i=this._selectionInforMap.values,n=this._vertexPackage.vertexAttributes[0].typedArray;if(t$$(n)&&t$$(n.buffer)){var r,o,a=new Float32Array(n.buffer,n.byteOffset,n.byteLength/4);this._fileType===c$q.Text?(r=this._vertexPackage.vertexAttributes[1].typedArray,o=new Float32Array(r.buffer,r.byteOffset,r.byteLength/4)):(r=this._vertexPackage.vertexAttributes[3].typedArray,o=new Float32Array(r.buffer,r.byteOffset,r.byteLength/4));for(var s=Number.MAX_VALUE,l=Number.MIN_VALUE,u=Number.MAX_VALUE,c=Number.MIN_VALUE,h=new a$11,d=[],f=0;f<this._vertexPackage.verticesCount;f++)a$11.fromArray(o,3*f,h),d.push(a$11.clone(h));for(var p,_,m,$=t$$(e._overlapWeightAttributeName),g=t$$(e._heightRangeAttributeName),y=0,v=i.length;y<v;y++){var x=new _0x53605a(this._ids[y],e);_=(p=i[y]).vertexColorOffset,m=e$1Y(p.vertexCount,p.vertexColorCount);for(var b=_;b<_+m;b++){var S=d[b];s=Math.min(S.x,s),l=Math.max(S.x,l),u=Math.min(S.y,u),c=Math.max(S.y,c)}x.pixelWidth=l-s,x.pixelHeight=c-u;var w=new a$11(a[3*_],a[3*_+1],a[3*_+2]);if(c$1a.multiplyByPoint(t,w,w),x.worldPosLeftBottom=w,$||g){var C=this._ids[y],T=e.getAttributesById(C);t$$(T)&&t$$(T.then)&&this._getLabelWeightOrHeight(x,T,e._overlapWeightAttributeName,e._heightRangeAttributeName)}this._arrtextOverlapInfo.push(x)}}else console.log("createBillboardsBounds")},_0x38aae9.prototype._getLabelWeightOrHeight=function(e,t,i,n){t.then((t=>{if(i&&(e.weight=e$1Y(t[i],1e3),e.heigtRangeMax=-1),n){var r=parseInt(t[n].split(",")[0]);e.heigtRangeMax=e$1Y(r,-1)}}))},_0x38aae9.prototype.updateBillboardsBounds=function(e,t,i){if(!e.isOverlapDisplayed)for(var n=this._arrtextOverlapInfo,r=i.camera._positionCartographic.height,o=i.camera.positionWC,a=t.viewProjection,s=t.viewportTransformation,l=t.viewport.width,u=t.viewport.height,c=0,h=n.length;c<h;c++){var d=n[c];d.isInHeightRange(r)?d.isInVisibleRange(o)?(d.calcWindowCoordRect(a,s),d.isInViewport(l,u)?e._scene.layers._allTextOverlap.push(d):d.visible=!1):d.visible=!1:d.visible=!1}};var _0x1c4169=new a$10;function _0x2ff46c(e){var t,i,n,r=e._idsColorMap,o=[];if(r.length>0)for(t=0,i=r.length;t<i;t++)(n=r.values[t]).dirty&&(n.dirty=!1,o=n.color.toBytes(),_0x1c4169.x=o[0],_0x1c4169.y=o[1],_0x1c4169.z=o[2],_0x1c4169.w=o[3],t$$(n.batchId)?e._batchTable.setBatchedAttribute(n.batchId,0,_0x1c4169):Array.isArray(n.instanceIds)&&n.instanceIds.map((function(t){e._batchTable.setBatchedAttribute(t,0,_0x1c4169)})));var a=e._idsTranslateMap;if(a.length>0)for(var s in a._hash)(n=a._hash[s]).dirty&&(n.dirty=!1,t$$(n.batchId)?e._batchTable.setBatchedAttribute(n.batchId,3,n.translate):Array.isArray(n.instanceIds)&&n.instanceIds.map((function(t){e._batchTable.setBatchedAttribute(t,3,n.translate)})),a$11.equals(n.translate,a$11.ZERO)&&a.remove(s));var l=e._idsPBRIndexMap;if(l.length>0)for(t=0,i=l.length;t<i;t++)(n=l.values[t]).dirty&&(n.dirty=!1,t$$(n.batchId)?e._batchTable.setBatchedAttribute(n.batchId,4,n.pbrMaterialIndex):Array.isArray(n.instanceIds)&&n.instanceIds.map((function(t){e._batchTable.setBatchedAttribute(t,4,n.pbrMaterialIndex)})));var u=e._idsOperationMap;if(u.length>0)for(t=0,i=u.length;t<i;t++)if((n=u.values[t]).dirty)if(n.dirty=!1,e._isInstanceModel){if(n.skeletonId>-1){var c=n.instanceIds[0]*e.skeletonCount+n.skeletonId;e._batchTable.setBatchedAttribute(c,1,n.operationValue)}}else e._instanceCount>0?Array.isArray(n.instanceIds)&&n.instanceIds.map((function(t){e._batchTable.setBatchedAttribute(t,1,n.operationValue)})):t$$(n.batchId)&&e._batchTable.setBatchedAttribute(n.batchId,1,n.operationValue)}function _0x1f534c(e,t){var i=[];i.push({functionName:"czm_batchTable_color",componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"czm_batchTable_operation",componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:4},{functionName:"czm_batchTable_pickColor",componentDatatype:C$12.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"czm_batchTable_translate",componentDatatype:C$12.FLOAT,componentsPerAttribute:3,normalize:!0},{functionName:"czm_batchTable_pbrMaterialIndex",componentDatatype:C$12.FLOAT,componentsPerAttribute:3,normalize:!0});var n=t._pickInfo,r=Object.keys(n),o=new p$U(e,i,t._isInstanceModel?t._instanceCount*t.skeletonCount:t._instanceCount>0?t._instanceCount:r.length);t._batchTable=o}function _0x18e23f(e,t,i){var n=t._batchTable,r=t._selectionInforMap,o=t._selectionInforMap._hash;for(var a in o)if(o.hasOwnProperty(a)){var s=r.get(a);if(t._isInstanceModel){var l=s.instanceIds[0],u=Object.keys(s.skeletonIds).length;for(var c in s.skeletonIds)if(s.skeletonIds.hasOwnProperty(c)){var h=l*u+Number(c),d=(f=e.createPickId({primitive:i,id:a,skeletonId:Number(c)})).color;_0x1c4169.x=e$1z.floatToByte(d.red),_0x1c4169.y=e$1z.floatToByte(d.green),_0x1c4169.z=e$1z.floatToByte(d.blue),_0x1c4169.w=e$1z.floatToByte(d.alpha),n.setBatchedAttribute(h,2,_0x1c4169)}}else{var f;t$$(f=i._pickObjs[a])||(f=e.createPickId({primitive:i,id:a}),i._pickObjs[a]=f);d=f.color;if(_0x1c4169.x=e$1z.floatToByte(d.red),_0x1c4169.y=e$1z.floatToByte(d.green),_0x1c4169.z=e$1z.floatToByte(d.blue),_0x1c4169.w=e$1z.floatToByte(d.alpha),t._instanceCount>0){s.instanceIds.map((function(e){n.setBatchedAttribute(e,2,_0x1c4169)}))}else{var p=s.batchId;n.setBatchedAttribute(p,2,_0x1c4169)}}}}function _0x3a3620(e,t){for(var i=e.position.values,n=e.position.componentsPerAttribute,r=i.length/n,o=new Float32Array(3*r),a=0;a<r;a++){var s=new a$11(i[a*n],i[a*n+1],i[a*n+2]),l=i$1g.fromCartesian(s),u=n$1d.toDegrees(l.longitude),c=n$1d.toDegrees(l.latitude),h=l.height,d=(u-t.left)/t.width,f=(c-t.bottom)/t.length,p=(h-t.minHeight)/t.height;o[3*a]=d,o[3*a+1]=f,o[3*a+2]=p}e.aRatio=new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:o})}_0x38aae9.prototype.updateBatchTable=function(e,t,i){_0x2ff46c(this),this._batchTable.update(e),this._updateBatchTable=!1},_0x38aae9.prototype.transformResource=function(e,t){this.initialize(),this.createResources(e,t)&&this._bufferPrepared&&t$$(this._sp)&&(this.createAllCommands(e,t),this.createNormalAndDepthCommand(t),this.createPostEffectCommand(t),this.createClampColorCommand(t),this.createTransparentCommand(t),(t._fileType===c$q.ClampGroundPolygon||t._fileType===c$q.ClampObjectPolygon||t._fileType===c$q.ClampGroundLine||t._fileType===c$q.ExtendClampPolygonCache)&&this.cloneSelectCommand(t))},_0x38aae9.prototype.createLazyCommand=function(e,t){if(this._bufferPrepared&&(this.createPickRectCommand(t),t.LoadingPriority===_0x271348.UsePagedLodInfo&&t._hasMixedContent&&e.context.stencilBuffer)){var i=this._colorCommand;if(!t$$(i))return;var n=i.derivedCommands;t$$(n)||(n=i.derivedCommands={}),this.ownerPagelod._finalResolution||(t$$(n.zback)||(n.zback=_0x5cff0f(e.context,i)),t._backfaceCommands.push(n.zback)),(!t$$(n.stencil)||this.ownerPagelod._selectionDepth!==_0x5d3a20(n.stencil))&&(n.stencil=_0xe35564(i,this.ownerPagelod._selectionDepth))}};var _0x45f838=new a$11(0,0,0);_0x38aae9.prototype.setPolygonOffset=function(e){for(var t=this,i=function(){return t$$(t._layer._polygonsTranslate[t._polygonId])?t._layer._polygonsTranslate[t._polygonId]:_0x45f838},n=function(){return _0x45f838},r=0;r<this._polygonCommands.length;r++){var o=this._polygonCommands[r];o.uniformMap.uTranslate=i,o.uniformMap.uTranslate=r==e?i:n}},_0x38aae9.prototype.updatePolygons=function(e,t,i){if(t$$(this._polygons)){this._polygonCommands=[];for(var n=this,r=0;r<this._polygons.length;r++)!function(){var t=S$C.createGeometry(n._polygons[r]);t$$(n._volObj)&&_0x3a3620(t.attributes,n._volObj.volBounds);for(var o=new a$10,a=new a$10,s=c$1a.inverse(n._matModel,new c$1a),l=t.attributes.position.values.length/t.attributes.position.componentsPerAttribute,u=0;u<l;u++)o.x=t.attributes.position.values[3*u],o.y=t.attributes.position.values[3*u+1],o.z=t.attributes.position.values[3*u+2],o.w=1,c$1a.multiplyByVector(s,o,a),t.attributes.position.values[3*u]=a.x,t.attributes.position.values[3*u+1]=a.y,t.attributes.position.values[3*u+2]=a.z;var c=new s$1d({primitiveType:t.primitiveType,modelMatrix:n._matModel,boundingVolume:t.boundingSphere,pass:we$l.S3MTiles,cull:!0}),h=n._polygonId+"_"+r,d=e.createPickId({primitive:n,id:h}).color;c.pickId="vSecondColor";c.uniformMap=e$1W(n._uniformMap),t$$(c.uniformMap)&&(c.uniformMap.uSecondColor=function(){return d},c.uniformMap.uTranslate=function(){return _0x45f838}),c.vertexArray=x$18.fromGeometry({context:e,geometry:t,attributeLocations:{aPosition:0,aTexCoord0:1,aNormal:2,aRatio:3},bufferUsage:A$13.STATIC_DRAW,interleave:!0});var f=["attribute vec4 aPosition;","attribute vec3 aRatio;","uniform vec4 uSecondColor;","uniform vec3 uTranslate;","varying vec4 vSecondColor;","varying vec3 vecRotioCoord;","varying vec2 vecHypTexCoord;","varying vec4 vPositionMC;","void main()","{"," vPositionMC.xyz = aPosition.xyz;"," vPositionMC.w = 0.0;"," vSecondColor = uSecondColor;"," vecRotioCoord = aRatio;"," vec4 pos = aPosition;"," pos.xyz += uTranslate;"," gl_Position = czm_modelViewProjection * pos;","}"].join("\n"),p=["#extension GL_EXT_shader_texture_lod : enable","#extension GL_OES_standard_derivatives : enable","varying vec4 vSecondColor;","varying vec4 vPositionMC;","vec4 LinearTosRGB( in vec4 value )","{"," return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );","}","void main()","{"," gl_FragColor = czm_getHypsometricColor(vec4(1.0,1.0,1.0,1.0), 0.0);"," gl_FragColor *= czm_computeLightColorInFP(vPositionMC.xyz, vPositionMC.w, vec3(0.0,0.0,0.0));"," gl_FragColor = LinearTosRGB(gl_FragColor);","}"].join("\n"),_=new a$O({sources:[f]}),m=new a$O({sources:[p]});_.defines.push("Volume"),m.defines.push("Volume"),_.defines.push("HYPSOMETRIC"),m.defines.push("HYPSOMETRIC"),m.defines.push(H$r.DIR_LIGHTS+0),m.defines.push(H$r.POINT_LIGHTS+0),m.defines.push(H$r.SPOT_LIGHTS+0),m.defines.push(H$r.HEMISPHERE_LIGHTS+0),c.shaderProgram=p$15.fromCache({context:e,vertexShaderSource:_,fragmentShaderSource:m,attributeLocations:{aPosition:0,aTexCoord0:1,aNormal:2,aRatio:3}}),c.renderState=i._rsColor,n._polygonCommands.push(c)}();this._polygons=void 0}if(this._polygonCommands.length>0){var o={};o[this._polygonId]=4,this.updateObjsOperation(o)}for(r=0;r<this._polygonCommands.length;r++)t.push(this._polygonCommands[r])},_0x38aae9.prototype.updateVertexWeight=function(){if(this._bMultiTemporalWeight&&t$$(this._layer._temporalSetting)){var e=this._layer._temporalSetting;if(!(this._fMultiTemporalPercentage===e.progress&&e.location<0)){var t=this._vertexWeightBuffers,i=t.length,n=this._colorCommand;if(this._nSpecificTemporalPos!==e.location){var r=t[n$1d.clamp(0,e.location,i-1)],o=0*(c=n.vertexArray.getAttribute(this._attributeLocations.aVertexWeight)).strideInBytes+c.offsetInBytes;return c.vertexBuffer.copyFromArrayView(r,o),this._fMultiTemporalFactor=0,void(this._nSpecificTemporalPos=e.location)}if(this._nSpecificTemporalPos>-1)return;this._fMultiTemporalPercentage=e.progress;var a=this._fMultiTemporalPercentage,s=a*i,l=Math.floor(s);a=s-(l=n$1d.clamp(0,l,i-1)),this._fMultiTemporalFactor=n$1d.clamp(0,a,1);var u=Math.ceil(s);if(u=n$1d.clamp(0,u,i-1),this._nFirstMultiTemporalPos!==l){r=t[l],o=0*(c=n.vertexArray.getAttribute(this._attributeLocations.aVertexWeight)).strideInBytes+c.offsetInBytes;c.vertexBuffer.copyFromArrayView(r,o),this._nFirstMultiTemporalPos=l}if(this._nSecondMultiTemporalPos!==u){var c;r=t[u],o=0*(c=n.vertexArray.getAttribute(this._attributeLocations.aVertexWeight_1)).strideInBytes+c.offsetInBytes;c.vertexBuffer.copyFromArrayView(r,o),this._nSecondMultiTemporalPos=u}}}};var _0x3bb828=new c$1a;_0x38aae9.prototype.update=function(e,t,i,n){if(this.transformResource(t,n),this._bufferPrepared&&this.createPickRectCommand(n),n._fileType===c$q.PointCloudFile&&t$$(n._pointCloudLayerVisible))if(t$$(this._ptIndexGroup)){for(var r in this._ptIndexGroup)if(this._ptIndexGroup.hasOwnProperty(r)&&n._pointCloudLayerVisible[n._pointCloudLayerNames[r]]){this.pushCommands(t,i,n);break}}else t$$(this._groupName)&&n._pointCloudLayerVisible[this._groupName]&&this.pushCommands(t,i,n);else this.pushCommands(t,i,n);n._fileType===c$q.PointCloudFile&&t$$(this._colorCommand)&&(n._pointCloudShading.renderMode==_0x595b1d.VOXEL?this._colorCommand.renderState=p$1a.fromCache({depthTest:{enabled:!1}}):(n._pointCloudShading.eyeDomeLighting||n._pointCloudShading.performance)&&(this._colorCommand.renderState=p$1a.fromCache({depthTest:{enabled:!0}}))),(n._fileType===c$q.Text||n._fileType===c$q.IconPoint)&&this.updateBillboardsBounds(n,e.uniformState,t),this._themeDirty&&_0x34696c(n,this),this._layer._showLabel&&this.updateLabels(t),this._updateBatchTable&&this._ids.length>0&&this.updateBatchTable(t,t.context,n),this.updatePolygons(e,i,n),t$$(t.specularEnvironmentMaps)&&(_0x3bb828=c$1a.multiply(n._context.uniformState.view3D,this._matModel,_0x3bb828),this._iblReferenceFrameMatrix=c$1a.getMatrix3(_0x3bb828,this._iblReferenceFrameMatrix),this._iblReferenceFrameMatrix=r$W.getRotation(this._iblReferenceFrameMatrix,this._iblReferenceFrameMatrix),this._iblReferenceFrameMatrix=r$W.transpose(this._iblReferenceFrameMatrix,this._iblReferenceFrameMatrix)),this.updateVertexWeight()};var _0x51aed5=new _0x2322b3;function _0x458edc(e,t,i){for(var n=i._shaderProgramToCreate;n.length&&(n.peek(),_0x51aed5.set(e,t,i),e.jobScheduler.execute(_0x51aed5,i$E.PROGRAM));)n.dequeue()}function _0x35f036(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"zBackfaceLogDepth");if(!t$$(i)){var n=t.fragmentShaderSource.clone();n.defines=t$$(n.defines)?n.defines.slice(0):[],n.defines.push("POLYGON_OFFSET"),n.sources.unshift("#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n"),i=e.shaderCache.createDerivedShaderProgram(t,"zBackfaceLogDepth",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:n,attributeLocations:t._attributeLocations})}return i}function _0x5cff0f(e,t){var i=s$1d.shallowClone(t),n=e$1W(i.renderState,!0);n.cull.enabled=!0,n.cull.face=k$F.FRONT,n.colorMask={red:!1,green:!1,blue:!1,alpha:!1},n.polygonOffset={enabled:!0,factor:5,units:5},n.stencilTest=Ia$1.setCesium3DTileBit(),n.stencilMask=Ia$1.CESIUM_3D_TILE_MASK,i.renderState=p$1a.fromCache(n),i.castShadows=!1,i.receiveShadows=!1,i.uniformMap=e$1W(t.uniformMap);var r=new r$T(5,5);return i.uniformMap.u_polygonOffset=function(){return r},i.shaderProgram=_0x35f036(e,t.shaderProgram),i}function _0x5d3a20(e){return(e.renderState.stencilTest.reference&Ia$1.SKIP_LOD_MASK)>>>Ia$1.SKIP_LOD_BIT_SHIFT}function _0xe35564(e,t){var i=s$1d.shallowClone(e),n=e$1W(i.renderState,!0);return n.cull.enabled=!0,n.stencilTest.enabled=!0,n.stencilTest.mask=Ia$1.SKIP_LOD_MASK,n.stencilTest.reference=Ia$1.CESIUM_3D_TILE_MASK|t<<Ia$1.SKIP_LOD_BIT_SHIFT|2,n.stencilTest.frontFunction=h$N.GREATER_OR_EQUAL,n.stencilTest.frontOperation.zPass=o$F.REPLACE,n.stencilTest.backFunction=h$N.GREATER_OR_EQUAL,n.stencilTest.backOperation.zPass=o$F.REPLACE,n.stencilMask=Ia$1.CESIUM_3D_TILE_MASK|Ia$1.SKIP_LOD_MASK|2,i.renderState=p$1a.fromCache(n),i}function _0x404c0e(e,t){return{uMaxClip:function(){return e},uMinClip:function(){return t}}}function _0x55af88(e,t){var i=e._selections,n=e._objsColorList,r=e._objsOnlyVisibleList,o=new e$1F;for(var a in e$1F.clone(n,o),r._hash)if(r._hash.hasOwnProperty(a)){var s=r.get(a),l=e$1Y(o.get(a),new e$1z),u=e$1z.multiply(l,s,new e$1z);o.set(a,u)}for(var a in i._hash)if(i._hash.hasOwnProperty(a)){var c=i._hash[a],h=(l=e$1Y(o.get(a),new e$1z),e$1z.multiply(c,l,new e$1z));o.set(a,h)}o.length>0&&t.updateObjsColor(o,e.selectColorType,!0)}function _0x44ed7f(e,t){var i=e._selections,n=e._objsColorList,r=e._objsOnlyVisibleList,o=new e$1F,a=e$1F.clone(r);for(var s in n._hash)if(n._hash.hasOwnProperty(s)){var l=n._hash[s];e$1z.equals(e$1z.WHITE,l)?a.set(s,l):o.set(s,l)}for(var s in i._hash)if(i._hash.hasOwnProperty(s)){l=i._hash[s];e$1z.equals(e$1z.WHITE,l)?a.set(s,l):o.set(s,l)}for(var s in o._hash)if(o._hash.hasOwnProperty(s)&&r.contains(s)){var u=o.get(s),c=(l=r.get(s),e$1z.multiply(u,l,new e$1z));o.set(s,c),a.remove(s)}a.length>0&&t.updateObjsColor(a,Ja.MIX,!0),o.length>0&&t.updateObjsColor(o,Ja.REPLACE,!0)}function _0x317dfd(e,t){var i=e._selections,n=e._objsColorList,r=e._objsOnlyVisibleList,o=new e$1F;for(var a in e$1F.clone(n,o),r._hash)if(r._hash.hasOwnProperty(a)){var s=r.get(a),l=e$1Y(o.get(a),new e$1z),u=e$1z.multiply(l,s,new e$1z);o.set(a,u)}o.length>0&&t.updateObjsColor(o,Ja.MIX,!0),i.length>0&&t.updateObjsColor(i,e.selectColorType,!0)}function _0x43d40d(e,t){var i=t._pickInfo,n=[];for(var r in i)if(i.hasOwnProperty(r)&&"0"!==r){var o=new _0x15900a(t,r);Object.assign(o,e._layerScheduler._attributes[r]),o.id=r,o.batchId=i[r].batchId,o.instanceIds=i[r].instanceIds,n.push(o)}return n}_0x38aae9.prototype.createResources=function(e,t){var i=this._bufferPrepared;return this._bufferPrepared||_0x47b5b8(this,e,t,t._context),t$$(this._sp)||_0x458edc(e,t,this),_0x2174c7(this,e,t),t._fileType===c$q.ClampGroundRealtimeRasterCache?this._bufferPrepared:i&this._bufferPrepared},_0x38aae9.prototype.pushClampCommands=function(e,t,i){var n=this._colorCommand;t$$(this._clampSelected)&&this._clampSelected?(i._fileType===c$q.ClampGroundPolygon||i._fileType===c$q.ClampGroundLine?(n.pass=we$l.GLOBE+1,this._stencilCommand.pass=we$l.GLOBE+1,t$$(this._selectedStencilCommand)&&t$$(this._selectedColorCommand)&&(this._selectedStencilCommand.pass=we$l.GLOBE+1,this._selectedColorCommand.pass=we$l.GLOBE+1)):i._fileType===c$q.ClampObjectPolygon&&(n.pass=we$l.ClampObject,this._stencilCommand.pass=we$l.ClampObject,t$$(this._selectedStencilCommand)&&t$$(this._selectedColorCommand)&&(this._selectedStencilCommand.pass=we$l.ClampObject,this._selectedColorCommand.pass=we$l.ClampObject)),t.push(this._stencilCommand),t.push(n),t$$(this._selectedStencilCommand)&&t$$(this._selectedColorCommand)&&(t.push(this._selectedStencilCommand),t.push(this._selectedColorCommand))):(i._fileType===c$q.ClampGroundPolygon||i._fileType===c$q.ClampGroundLine?(n.pass=we$l.GLOBE+1,this._stencilCommand.pass=we$l.GLOBE+1):i._fileType===c$q.ClampObjectPolygon&&(n.pass=we$l.ClampObject,this._stencilCommand.pass=we$l.ClampObject),t.push(this._stencilCommand),t.push(n))},_0x38aae9.prototype.isTransparent=function(e){return e._style3D.fillForeColor.alpha<e.maxTransparentAlpha&&e._pointCloudShading.renderMode!==_0x595b1d.VOXEL&&e.orderIndependentTranslucency},_0x38aae9.prototype.pushCommandsForNormalAndDepthFrameBuffer=function(e,t){!t$$(this._normalAndDepthCommand)||(e.isSilhouette()?t$$(this._hasSilhouette)&&this._hasSilhouette&&t.push(this._normalAndDepthCommand):t.push(this._normalAndDepthCommand))},_0x38aae9.prototype.pushCommandsForPostEffectFrameBuffer=function(e,t){!e.bloomEnable||!t$$(this._postEffectCommand)||(e.bloomEnable&&t$$(this._postEffectCommand)||this._hasBloomOperation)&&t.push(this._postEffectCommand)},_0x38aae9.prototype.pushCommandsForClampFrameBuffer=function(e,t){!this._intersectWithClipPlane||!t$$(this._clampColorCommand)||(t.push(this._clipStencilCommand),t.push(this._clampColorCommand))},_0x38aae9.prototype.pushCommandsForFrameBuffer=function(e,t,i,n){t==B$y.NORMAL_AND_DEPTH?this.pushCommandsForNormalAndDepthFrameBuffer(e,i):t==B$y.POSTEFFECT_FILTER?this.pushCommandsForPostEffectFrameBuffer(e,i):t==B$y.CLAMP?this.pushCommandsForClampFrameBuffer(e,i):t==B$y.PICKRECT?this.pushCommandsForPickRectBuffer(e,i):t==B$y.SQRESULT?this.pushCommandsForSpatialQueryBuffer(e,i):t==B$y.RASTER&&this.pushCommandsForRasterHeightMap(n,e,i)},_0x38aae9.prototype.isNeedRasterized=function(e){for(var t in e){if(!t$$(this._layerImagerys[t])||this._layerImagerys[t].length!=e[t].length)return!0;for(var i=0;i<e[t].length;i++)if(this._layerImagerys[t][i].level!=e[t][i].level||this._layerImagerys[t][i].x!=e[t][i].x||this._layerImagerys[t][i].y!=e[t][i].y)return!0}return!1},_0x38aae9.prototype.pushCommands=function(e,t,i){if(t$$(this._colorCommand)){if(t$$(i._imageryLayer)&&t$$(this._cartographic)&&t$$(this._imagerys)&&!this._imageRasterFinish&&this.updateImageryTexture(i,e),t$$(this._dayTextureAlpha)&&t$$(this._imagerys))for(var n=0;n<this._imagerys.length;n++){var r=this._imagerys[n].imageryLayer;this._dayTextureAlpha[n]=r.alpha}if(e.passes.pick&&t$$(this._stencilCommand))return t.push(this._stencilCommand),void(this._pickCommand&&t.push(this._pickCommand));if(i._spatialClipEnable)return t$$(this._clipCommand)||this.createSpatialClipCommand(e,i),void t.push(this._clipCommand);if(!e.passes.depth||i._fileType!==c$q.IconPoint&&i._fileType!==c$q.Text){var o=e._fboState.frameBufferType;if(t$$(o)&&(o===B$y.NORMAL_AND_DEPTH||o===B$y.POSTEFFECT_FILTER||o===B$y.CLAMP||o===B$y.PICKRECT||o===B$y.SQRESULT||o===B$y.RASTER&&(4&e.useType)>0))return void this.pushCommandsForFrameBuffer(i,o,t,e);if(i._style3D.fillStyle!==vr.WireFrame||i._fileType===c$q.ClampGroundPolygon){i.LoadingPriority,_0x271348.UsePagedLodInfo;var a=this._colorCommand,s=we$l.S3MTiles,l=this._mapPass,u=!1;if(a.renderState=i._rsColor,t$$(this.materialPass)&&this.materialPass._alphaMode===_0x841277.BLEND)u=!0;else if(i._isTransparencyOptimization){for(var c in l)if(l[c]._bTransparentSorting){u=!0;break}}else for(var c in l)if(l[c]._bTransparentSorting){s+=1;break}if(this._isSelected&&i.selectedColor.alpha<1&&(u=!0),!(e.passes.pick&&i._scene.pickPointEnabled)&&(this.isTransparent(i)||u)&&(i.partlyTransparent?t.push(this._transparentCommand):s=i.orderIndependentTranslucency?we$l.TRANSLUCENT:s),i._fileType===c$q.IconPoint||i._fileType===c$q.Text?s=we$l.Label_Billboard:i._pointCloudShading.renderMode==_0x595b1d.VOXEL&&(s=we$l.Voxel_Billboard),t$$(this._stencilCommand))this.pushClampCommands(e,t,i);else if(this.oriPassGroup!==we$l.OVERLAY&&(a.pass=i.receiveObjectClamp?s:we$l.NonClampObject,a.pass+=this._passIncrement),i._fileType===c$q.ClampGroundRealtimeRasterCache)t$$(this._level)&&(a._globeIndex={level:this._level,row:this._row,col:this._col}),t$$(a)&&this._updateBatchTable&&this._ids.length>0&&this.updateBatchTable(e,e.context,i),a&&e.commandListRealtimeRaster.push(a);else if(this._clipBounds.length>0)for(n=0;n<this._clipBounds.length;n++){var h=this._clipBounds[n].max,d=this._clipBounds[n].min,f=s$1d.shallowClone(a);if(void 0!==h&&void 0!==d){var p=_0x404c0e(h,d);f._uniformMap=s$1n(p,a._uniformMap),f.shaderProgram=this._spUnFinalResolution,t.push(f)}}else if(this._plusRoArray.length>0){var _=this._plusRoArray.length-1,m=this._plusRoArray[_];for(n=0;n<m.length;n++)t.push(m[n].command)}else a&&t.push(a)}i._style3D.fillStyle!==vr.Fill?i.wireFrameMode===_0x39abaa.EffectOutline||i.wireFrameMode===_0x39abaa.Sketch?(t$$(this._regularEdgeCommand)&&(t.push(this._regularEdgeCommand),i._addRenderedEdge(this._regularEdgeCommand.edgeTotalLength,this._regularEdgeCommand.edgeCount)),t$$(this._silhouetteEdgeCommand)&&(t.push(this._silhouetteEdgeCommand),i._addRenderedEdge(this._silhouetteEdgeCommand.edgeTotalLength,this._silhouetteEdgeCommand.edgeCount))):i.wireFrameMode===_0x39abaa.Quad?t$$(this._wireFrameCommands.quad)&&t.push(this._wireFrameCommands.quad):i.wireFrameMode===_0x39abaa.Triangle&&t$$(this._wireFrameCommands.triangle)&&t.push(this._wireFrameCommands.triangle):t$$(this._regularEdgeCommand)&&this._isSelected&&i._selectColorType===Ja.WIREFRAME&&(t.push(this._regularEdgeCommand),i._addRenderedEdge(this._regularEdgeCommand.edgeTotalLength,this._regularEdgeCommand.edgeCount)),this._rasterized||i._fileType===c$q.ClampGroundRealtimeRasterCache&&this.refreshRaster(e),this._rasterized=!0}}};var _0x3f6aad=new e$1z;function _0x34696c(e,t){var i=e.themeStyle;if(t$$(i)){if(!t$$(i.color)&&t$$(i.pbrMaterialIndex)){t$$(t._featureArray)||(t._featureArray=_0x43d40d(e,t));for(var n=t._featureArray,r=0;r<n.length;r++){var o=n[r];Object.assign(o,e._layerScheduler._attributes[o.id]);var a=i.pbrMaterialIndex.evaluate(o);t$$(a)||(a=-1),t._idsPBRIndexMap.set(o.id,{batchId:o.batchId,instanceIds:o.instanceIds,pbrMaterialIndex:a,dirty:!0})}t._updateBatchTable=!0,t._themeDirty=!1}t$$(t._featureArray)||(t._featureArray=_0x43d40d(e,t));for(n=t._featureArray,r=0;r<n.length;r++){o=n[r];Object.assign(o,e._layerScheduler._attributes[o.id]);var s=void 0;t$$(i.color)&&(s=i.color.evaluateColor(o,_0x3f6aad));var l=void 0;t$$(i.show)&&(l=i.show.evaluate(o));var u=t._idsOperationMap.get(o.id);if(t$$(u)||(u={batchId:o.batchId,instanceIds:o.instanceIds,skeletonId:-1,operationValue:new a$10,dirty:!0},t._idsOperationMap.set(o.id,u)),t$$(s)&&(t._idsColorMap.set(o.id,{batchId:o.batchId,instanceIds:o.instanceIds,color:e$1z.clone(s),dirty:!0}),u.operationValue.x=1&u.operationValue.x|_0x24b8f6.SetColor,u.dirty=!0),t$$(l)){if(l){var c=_0x24b8f6.ALL^_0x24b8f6.HIDE;u.operationValue.x&=c}else u.operationValue.x=1&u.operationValue.x|_0x24b8f6.HIDE;u.dirty=!0}}t._updateBatchTable=!0,t._themeDirty=!1}}function _0x47b5b8(e,t,i,n){_0x4d5863(e,t,n),_0x51475d(e,t,i,n),0===e._vertexBufferToCreate.length&&0===e._indexBufferToCreate.length&&(e._bufferPrepared=!0,e._instanceBuffer=void 0)}_0x38aae9.prototype.initLayerSetting=function(e){if(this._isClamp=_0x5be543(e,this),t$$(e.waterEffectSet)){var t={boundingVolume:this._boundingVolume,distance:e.height+e.style3D.bottomAltitude+e.waterEffectSet[0].averageHeight};this._waterIndex=e.addWaterPlane(t)}e.allObjsHide&&this.updateAllObjsVisible(e,!e.allObjsHide),Object.keys(e._objsOperationList).length>0&&this.updateObjsOperation(e._objsOperationList),e.themeStyle&&_0x34696c(e,this),Object.keys(e._objsColorList).length>0&&this.updateObjsColor(e._objsColorList),Object.keys(e._objsOffsetList).length>0&&this.updateObjsTranslate(e._objsOffsetList)},_0x38aae9.prototype.initLayerSettingBak=function(e){if(this._isClamp=_0x5be543(e,this),t$$(e.waterEffectSet)){var t={boundingVolume:this._boundingVolume,distance:e.height+e.style3D.bottomAltitude+e.waterEffectSet[0].averageHeight};this._waterIndex=e.addWaterPlane(t)}if(e.allObjsHide&&this.updateAllObjsVisible(!e.allObjsHide),e.selectColorType===Ja.REPLACE?_0x44ed7f(e,this):e.selectColorType===Ja.MIX?_0x55af88(e,this):(this.updateObjsColor(e._selections,e.selectColorType,!0),_0x317dfd(e,this)),e._objsVisibleList.length>0&&this.updateObjsVisible(e._objsVisibleList,e._objsVisibleList.values[0]),t$$(e._objsHeightList)&&e._objsHeightList.length>0&&this.updateExtendHeight(e._objsHeightList),Object.keys(e._objsOperationList).length>0){var i=Math.max(Math.abs(e.selectedTranslate.x),Math.abs(e.selectedTranslate.y),Math.abs(e.selectedTranslate.z));this.updateObjsOperation(e._objsOperationList,i)}},_0x38aae9.prototype.createAllCommands=function(e,t){t$$(this._colorCommand)||(t$$(t.waterEffectSet)?this.createWater(t):this.createCommand(e,t),this.initLayerSetting(t))};var _0xd43bd0=new _0x2ce9d5,_0x2a27ef=new _0x289f7f;function _0x4d5863(e,t,i){for(var n=e._vertexBufferToCreate;n.length;){var r=n.peek();if(_0xd43bd0.set(i,e,r),!t.jobScheduler.execute(_0xd43bd0,i$E.BUFFER))break;n.dequeue()}}function _0x51475d(e,t,i,n){for(var r=e._vertexPackage.verticesCount,o=e._indexBufferToCreate;o.length;){var a=o.peek();if(_0x2a27ef.set(n,e,a,r),!t.jobScheduler.execute(_0x2a27ef,i$E.BUFFER))break;o.dequeue()}}var _0x222574=new _0x28fcbd;function _0x2174c7(e,t,i){if(i._isS3MBlock){for(var n in e._mapPass)if(e._mapPass.hasOwnProperty(n)){(l=e._mapPass[n]).initTexture(),l.initBakeTexture(),l.requestSubTextures(t,t.context,i,e._subTexturesToUpload),l.requestBakeSubTextures(t,t.context,i,e._subTexturesToUpload)}for(var r=e._subTexturesToUpload;r.length;){var o=r.peek(),a=o.texture,s=o.subTextureInfo;if(_0x222574.set(t.context,e,a,s,i._textureLod),!t.jobScheduler.execute(_0x222574,i$E.TEXTURE))break;r.dequeue()}if(0===r.length)for(var n in e._mapPass)if(e._mapPass.hasOwnProperty(n)){var l;(l=e._mapPass[n]).enableTextureRenderable(),l.enableBakeTextureRenderable()}}}function _0x234fda(e){var t=e._fileType;return e.shadowType!=_0x3df1e1.NONE&&(t===c$q.OSGBFile||t===c$q.OSGBCacheFile||t===c$q.PointCloudFile)}function _0x5be543(e,t){var i=e._fileType,n=i==c$q.ClampGroundPolygon||i==c$q.ClampObjectPolygon||i==c$q.ExtendClampPolygonCache||i==c$q.ClampGroundLine||i==c$q.ClampObjectLine;return t._clampRegionEdge&&(n=!1),n}_0x38aae9.prototype.createWater=function(e){var t=e._context,i=this._vertexPackage,n=i.vertexAttributes;this._instanceCount=i.instanceCount,this._instanceMode=i.instanceMode,this._attributeLocations=i.attrLocation;var r=we$l.S3MTiles,o=this._arrIndexPackage[0];if(t$$(o)){var a=this._mapPass[o.materialCode],s=H$11.TRIANGLES;switch(o.primitiveType){case 1:s=H$11.POINTS;break;case 2:s=H$11.LINES;break;case 4:s=H$11.TRIANGLES}var l=new s$1d({primitiveType:s,modelMatrix:this._matModel,boundingVolume:this._boundingVolume,pass:r,count:o.indicesCount,cull:!0});t$$(e._waterUniformBuffer)&&l.addUniformBuffer(e._waterUniformBuffer),l.pickId="vSecondColor",l.vertexArray=new x$18({context:t,attributes:n,indexBuffer:o.indexBuffer}),this.materialPass=a,l.shaderProgram=this._sp,l.renderState=e._rsColor,l.castShadows=!1,l.receiveShadows=!1,l.selectCastShadows=!1,this._uniformMap={},_0x1aa62d.create(e._frameState,e,this,this._uniformMap),l.uniformMap=this._uniformMap,this._colorCommand=l}this._vertexPackage=null,this._arrIndexPackage.length=0},_0x38aae9.prototype.createWireframeIndexBuffer=function(e){var t,i,n;if(t$$(t=this._arrIndexPackage[0])&&t$$(t.indicesTypedArray)){i={indices:0===t.indexType?new Uint16Array(t.indicesTypedArray.buffer,t.indicesTypedArray.byteOffset,t.indicesCount):new Uint32Array(t.indicesTypedArray),primitiveType:H$11.TRIANGLES},F$W.toWireframe(i),n=i.indices;var r=fe$u.UNSIGNED_SHORT;return this._vertexPackage.verticesCount>n$1d.SIXTY_FOUR_KILOBYTES?(r=fe$u.UNSIGNED_INT,n=new Uint32Array(n)):n=new Uint16Array(n),u$Y.createIndexBuffer({context:e,typedArray:n,usage:A$13.STATIC_DRAW,indexDatatype:r})}},_0x38aae9.prototype.createStencilCommandForClampLayer=function(e,t){var i=void 0;(i=s$1d.shallowClone(e)).renderState=t,this._stencilCommand=i},_0x38aae9.prototype.createClampColorCommand=function(e){e._context;var t=this._colorCommand;if(t$$(t)&&e.isRenderClipSection()&&!t$$(this._clampColorCommand)){this._intersectWithClipPlane=this.isIntersectWithClipPlane(e);var i=s$1d.shallowClone(t);i.renderState=e._rsClampColor,this._clampColorCommand=i;var n=s$1d.shallowClone(t);n.renderState=e._rsStencil,this._clipStencilCommand=n}};var _0x5b300b=new s$1p;_0x38aae9.prototype.refreshRasterTile=function(e,t){var i=e._rectangle;t$$(s$1p.intersection(t,i,_0x5b300b))&&(e._rasterized=!1),t$$(e._southwestChild)&&this.refreshRasterTile(e._southwestChild,t),t$$(e._southeastChild)&&this.refreshRasterTile(e._southeastChild,t),t$$(e._northwestChild)&&this.refreshRasterTile(e._northwestChild,t),t$$(e._northeastChild)&&this.refreshRasterTile(e._northeastChild,t)},_0x38aae9.prototype.refreshRasterTile2=function(e,t,i,n){var r=!1;if(e._level>=t){var o=Math.pow(2,e._level-t),a=Math.floor(e.y/o),s=Math.floor(e.x/o);a===i&&s===n&&(r=!0)}else{o=Math.pow(2,t-e._level),a=Math.floor(i/o),s=Math.floor(n/o);a===e.y&&s===e.x&&(r=!0)}r&&(e._rasterized=!1,t$$(e._southwestChild)&&this.refreshRasterTile2(e._southwestChild,t,i,n),t$$(e._southeastChild)&&this.refreshRasterTile2(e._southeastChild,t,i,n),t$$(e._northwestChild)&&this.refreshRasterTile2(e._northwestChild,t,i,n),t$$(e._northeastChild)&&this.refreshRasterTile2(e._northeastChild,t,i,n))},_0x38aae9.prototype.refreshRaster=function(e,t){if(this._layer._fileType===c$q.ClampGroundRealtimeRasterCache)if(t$$(this._level)&&!t$$(t))this.refreshRasterTile2(e._quadtree._levelZeroTiles[0],this._level,this._row,this._col),this.refreshRasterTile2(e._quadtree._levelZeroTiles[1],this._level,this._row,this._col);else if(t$$(e._quadtree._levelZeroTiles)){var i=new s$1p(this._boundingVolume.center.x-this._boundingVolume.radius,this._boundingVolume.center.y-this._boundingVolume.radius,this._boundingVolume.center.x+this._boundingVolume.radius,this._boundingVolume.center.y+this._boundingVolume.radius);i.west=n$1d.toRadians(i.west),i.north=n$1d.toRadians(i.north),i.east=n$1d.toRadians(i.east),i.south=n$1d.toRadians(i.south),this.refreshRasterTile(e._quadtree._levelZeroTiles[0],i),this.refreshRasterTile(e._quadtree._levelZeroTiles[1],i)}},_0x38aae9.prototype.createSpatialClipCommand=function(e,t){if(!t$$(this._clipCommand)){var i=this._colorCommand,n=i.shaderProgram.vertexShaderSource.clone(),r=i.shaderProgram.fragmentShaderSource.clone();n.defines.push("SQCLIP"),r.defines.push("SQCLIP"),e.useLogDepth&&r.defines.push("LOG_DEPTH");var o=s$1d.shallowClone(i);o.uniformMap.uFrontDepthTexture=function(){return t._sqTextures[0]},o.uniformMap.uBackDepthTexture=function(){return t._sqTextures[1]},o.uniformMap.uFrontColorTexture=function(){return t._sqTextures[2]},o.uniformMap.uSQMode=function(){return t._sqMode},o.shaderProgram=p$15.fromCache({context:t._context,vertexShaderSource:n,fragmentShaderSource:r,attributeLocations:this._attributeLocations}),this._clipCommand=o}},_0x38aae9.prototype.createCommand=function(e,t){if(t$$(this._sp)){var i=t._context,n=this._vertexPackage,r=n.vertexAttributes;this._instanceCount=n.instanceCount,this._instanceMode=n.instanceMode,this._attributeLocations=n.attrLocation;var o=we$l.S3MTiles,a=this._clampRegionEdge?t._rsClampLineColor:t._rsColor,s=t._fileType,l=this._arrIndexPackage[0];t._hasWireframe||this._arrIndexPackage.length>1&&(t._hasWireframe=!0);var u,c=_0x42161c.Default,h=n.verticesCount,d=H$11.POINTS;if(t$$(l))switch(!0===(c=e$1Y(this._mapPass[l.materialCode],_0x42161c.Default))._bTransparentSorting&&(o=we$l.S3MTiles+1),u=l.indexBuffer,l.primitiveType){case 1:d=H$11.POINTS;break;case 2:d=H$11.LINES;break;case 4:d=H$11.TRIANGLES}else if(t$$(this._ptIndexGroup)){var f,p,_,m,$,g=0;for($ in this._ptIndexGroup)this._ptIndexGroup.hasOwnProperty($)&&(p=t._pointCloudLayerNames[$],t._pointCloudLayerVisible[p]&&(_=this._ptIndexGroup[$].start,g+=(m=this._ptIndexGroup[$].end)-_+1));if(g>0){var y=fe$u.createTypedArray(n.verticesCount,g),v=0;for($ in this._ptIndexGroup)if(this._ptIndexGroup.hasOwnProperty($)&&(p=t._pointCloudLayerNames[$],t._pointCloudLayerVisible[p]))for(_=this._ptIndexGroup[$].start,m=this._ptIndexGroup[$].end,f=_;f<=m;)y[v++]=f++;var x=n.verticesCount>=n$1d.SIXTY_FOUR_KILOBYTES&&i.elementIndexUint?fe$u.UNSIGNED_INT:fe$u.UNSIGNED_SHORT;u=u$Y.createIndexBuffer({context:i,typedArray:y,usage:A$13.STATIC_DRAW,indexDatatype:x})}else h=1}this.materialPass=c,this.useWValue=4===r[0].componentsPerAttribute,t$$(this._attributeLocations.aVertexWeight)&&(this.useWValue=1),(1===d||s===c$q.ClampGroundRealtimeRasterCache&&t$$(this._attributeLocations.aTexCoord1))&&(this.useLineColor=!0),this.oriPassGroup=o;var b=new s$1d({primitiveType:d,modelMatrix:this._matModel,boundingVolume:this._boundingVolume,pass:o,count:t$$(u)?void 0:h,cull:!0,occlude:!1});this._entity&&this._entity.isFlatten&&(b.cull=!1),b.opaquePass=we$l.S3MTiles,t._fileType===c$q.ClampGroundRealtimeRasterCache&&(b.layerId=t.id),b.pickId="vSecondColor",s===c$q.PointCloudFile&&(b.pickId="vPosition"),b.instanceCount=this._instanceCount,b.vertexArray=new x$18({context:i,attributes:r,indexBuffer:u}),b.shaderProgram=this._sp,_0x5be543(t,this)&&((t._fileType===c$q.ClampGroundPolygon||t._fileType===c$q.ClampObjectPolygon||t._fileType===c$q.ClampGroundLine||t._fileType===c$q.ExtendClampPolygonCache)&&(b.pickId=void 0),this._isClamp=!0),b.renderState=a,this._uniformMap={},_0x1aa62d.create(e,t,this,this._uniformMap),b.uniformMap=this._uniformMap,t$$(t._commonLayerUniformBuffer)&&(b.addUniformBuffer(t._commonLayerUniformBuffer),b.addUniformBuffer(e.lightSource._uniformBuffer),b.addUniformBuffer(_0x35487f.createMaterialUniformBuffer(t,c)),b.addUniformBuffer(_0x35487f.createMaterialDynamicUniformBuffer(this,t,c))),_0x5be543(t,this)&&this.createStencilCommandForClampLayer(b,t._rsStencil);var S=_0x234fda(t);b.castShadows=S,b.receiveShadows=S,b.selectCastShadows=!0,b.owner=this,(s==c$q.IconPoint||s===c$q.Text)&&(b.cull=!1),this._colorCommand=b,this.createWireFrameCommand(t,r),this._vertexPackage=null,this._arrIndexPackage=null}},_0x38aae9.prototype.createOneEdgeCommand=function(e,t,i,n,r){if(!t$$(i.attributes)||0==i.attributes.length||!t$$(i.instanceCount)||0==i.instanceCount)return null;var o,a,s=we$l.OPAQUE+1,l=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:this._matModel,boundingVolume:this._boundingVolume,pass:s,owner:this,cull:!0});if(l.vertexArray=new x$18({context:e,attributes:i.attributes,indexBuffer:n}),l.instanceCount=i.instanceCount,r){var u="RegularEdge_"+t.id,c="RegularEdge_"+t.id;o=new a$O({name:u,sources:[_0x31ab53]}),a=new a$O({name:c,sources:[_0x4d1076]})}else{u="SilhouetteEdge_"+t.id,c="SilhouetteEdge_"+t.id;o=new a$O({name:u,sources:[_0x31ab53]}),a=new a$O({name:c,sources:[_0x4d1076]}),o.defines.push("SILHOUETTE"),a.defines.push("SILHOUETTE")}o.defines.push("ANTIALIASING"),a.defines.push("ANTIALIASING"),o.defines.push("POLYGON_OFFSET"),a.defines.push("POLYGON_OFFSET"),t._hasExcavation&&(o.defines.push(H$r.EXCAVATION),a.defines.push(H$r.EXCAVATION)),t._hasServerExcavation&&(o.defines.push("SERVEREXCAVATION"),a.defines.push("SERVEREXCAVATION")),t.swipeEnabled&&a.defines.push(H$r.APPLY_SWIPE),t._clipping&&a.defines.push("CLIP"),t._section&&a.defines.push("CLIPPLANE"),this._batchTable&&o.defines.push("BatchTable"),t._selectColorType===Ja.WIREFRAME&&t._style3D.fillStyle===vr.Fill&&a.defines.push(H$r.WIREFRAME_SELECT_TYPE);var h=0;t.wireFrameMode===_0x39abaa.Sketch&&(h=1),o.defines.push("MODE "+h),a.defines.push("MODE "+h),l.shaderProgram=p$15.fromCache({context:e,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:i.attributeLocations}),l.renderState=p$1a.fromCache({depthTest:{enabled:!0,func:Re$h.LESS_OR_EQUAL},cull:{enabled:!0},blending:Ee$s.ALPHA_BLEND});var d={uLineColor:function(){return t.style3D.lineColor},uLineWidth:function(){return t.style3D.lineWidth},uDistanceFalloffFactor:function(){return t._edgeDistanceFalloffFactor},u_polygonOffset:function(){return new r$T(-5,-5)},uStrokesTexture:function(){return t$$(t._edgeStrokesTexture)||t._initEdgeTexture(),t._edgeStrokesTexture},uStrokesTextureScale:function(){return t$$(t._edgeStrokesTexture)||t._initEdgeTexture(),r$T.fromElements(1/t._edgeStrokesTexture._width,1/t._edgeStrokesTexture._height)},uStrokesLog2Resolution:function(){return t$$(t._edgeStrokesTexture)||t._initEdgeTexture(),n$1d.log2(t._edgeStrokesTexture.width)}};return l.uniformMap=s$1n(d,this._colorCommand.uniformMap),l.edgeTotalLength=i.edgeLength,l.edgeCount=i.instanceCount,l.wireframeType=t.wireFrameMode,l},_0x38aae9.prototype.createEdgeCommands=function(e){if(t$$(this._edgeGeometry)){var t=e._context,i=this._edgeGeometry;_0x5d8d50.createRegularEdgeAttributes(t,i.regular),_0x5d8d50.createSilhouetteEdgeAttributes(t,i.silhouette);var n=_0x5d8d50.createIndexBuffer(t);this._regularEdgeCommand=this.createOneEdgeCommand(t,e,i.regular,n,!0),this._silhouetteEdgeCommand=this.createOneEdgeCommand(t,e,i.silhouette,n,!1),(t$$(this._regularEdgeCommand)||t$$(this._silhouetteEdgeCommand))&&e.wireFrameMode===_0x39abaa.Quad&&(e.wireFrameMode=_0x39abaa.EffectOutline)}},_0x38aae9.prototype.createTrangleWireFrameCommand=function(e,t){if(t$$(this._arrIndexPackage[0])){var i=e._context;this._arrIndexPackage[0].indicesCount;var n=new s$1d({primitiveType:H$11.LINES,modelMatrix:this._matModel,boundingVolume:this._boundingVolume,pass:we$l.OPAQUE+1,owner:this,cull:!0});n.vertexArray=new x$18({context:i,attributes:t,indexBuffer:this._wireFrameIndexBuffers});var r=this._colorCommand.shaderProgram.vertexShaderSource.clone(),o=this._colorCommand.shaderProgram.fragmentShaderSource.clone();o.defines.push("Only_LineColor"),n.shaderProgram=p$15.fromCache({context:i,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:this._attributeLocations}),n.renderState=this._colorCommand.renderState,n.uniformMap=s$1n(this._colorCommand.uniformMap,{uLineColor:function(){return e.style3D.lineColor}}),this._wireFrameCommands.triangle=n}},_0x38aae9.prototype.createQuadWireFrameCommand=function(e,t,i){var n=e._context;n.webgl2||!n.depthTexture||n.webglOptions.preserveDrawingBuffer?we$l.OPAQUE:we$l.OVERLAY,this._mapPass[i.materialCode]||_0x42161c.Default;var r=new s$1d({primitiveType:2===i.primitiveType?H$11.LINES:H$11.LINE_STRIP,modelMatrix:this._matModel,boundingVolume:this._boundingVolume,pass:we$l.LOG_DEPTH_OVERLAY,owner:this,cull:!0});r.vertexArray=new x$18({context:n,attributes:t,indexBuffer:i.indexBuffer});var o=this._colorCommand.shaderProgram.vertexShaderSource.clone(),a=this._colorCommand.shaderProgram.fragmentShaderSource.clone(),s=o.defines.indexOf(H$r.SKETCH_MODE);s>0&&o.defines.splice(s,1),(s=o.defines.indexOf(H$r.COMPUTE_W_VALUE))>0&&o.defines.splice(s,1),(s=o.defines.indexOf(H$r.EMISSION_TEXTURE))>0&&o.defines.splice(s,1),(s=a.defines.indexOf(H$r.SKETCH_MODE))>0&&a.defines.splice(s,1),(s=a.defines.indexOf(H$r.COMPUTE_W_VALUE))>0&&a.defines.splice(s,1),(s=a.defines.indexOf(H$r.EMISSION_TEXTURE))>0&&a.defines.splice(s,1),o.defines.push("QUAD_OUTLINE"),a.defines.push("QUAD_OUTLINE"),a.defines.push("Only_LineColor"),r.shaderProgram=p$15.fromCache({context:n,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:this._attributeLocations}),r.renderState=p$1a.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$s.ALPHA_BLEND});var l={uLineColor:function(){return e.style3D.lineColor}};r.uniformMap=s$1n(l,this._colorCommand.uniformMap),this._wireFrameCommands.quad=r},_0x38aae9.prototype.createWireFrameCommand=function(e,t){if(!this._isClamp&&e._fileType!==c$q.ClampGroundPolygon&&this._arrIndexPackage.length>1)if(13==this._arrIndexPackage[1].primitiveType)this.createEdgeCommands(e);else if(2==this._arrIndexPackage[1].primitiveType){var i=this._arrIndexPackage[1];this.createQuadWireFrameCommand(e,t,i)}},_0x38aae9.prototype.updateTheme=function(e){_0x34696c(e,this)},_0x38aae9.prototype.updateObjsColor=function(e){if(this._initialize&&t$$(this._selectionInforMap)&&_0x335bbd.S3M!==this._version&&(!(this._selectionInforMap.length<1)&&t$$(this._colorCommand))){var t=this._selectionInforMap._hash;for(var i in t)if(t.hasOwnProperty(i)){var n=e[i];if(t$$(n)){var r=t[i];this._updateBatchTable=!0;var o=r.batchId,a=r.instanceIds;this._idsColorMap.set(i,{batchId:o,instanceIds:a,color:n,dirty:!0});var s=this._idsOperationMap.get(i);t$$(s)||(s={batchId:o,instanceIds:a,operationValue:new a$10,dirty:!0}),s.dirty=!0,s.operationValue.x=n===e$1z.TRANSPARENT?254&s.operationValue.x:1|s.operationValue.x,this._passIncrement=n.alpha<1?1:0,this._idsOperationMap.set(i,s)}}}},_0x38aae9.prototype._radiusToExpand=function(e){if(!this._selectionInforMap||!this._initialize||!t$$(this._colorCommand))return 0;var t=this._selectionInforMap._hash,i=0;for(var n in t)!t.hasOwnProperty(n)||!e[n]||(i=Math.max(a$11.magnitude(e[n]),i),this._oriBoundingSphere||(this._oriBoundingSphere=this._boundingVolume.clone()),this._colorCommand.boundingVolume.radius=this._oriBoundingSphere.radius+i,this._boundingVolume.radius=this._oriBoundingSphere.radius+i);return i},_0x38aae9.prototype.updateObjsTranslate=function(e){if(this._initialize&&t$$(this._selectionInforMap)&&_0x335bbd.S3M!==this._version){var t=this._selectionInforMap.length,i=this._colorCommand;if(!(t<1)&&t$$(i)){var n=this._selectionInforMap._hash,r=this._idsTranslateMap.length,o=!1;for(var a in n)if(n.hasOwnProperty(a)){var s=e[a];if(s){var l=n[a];this._updateBatchTable=!0;var u=l.batchId,c=l.instanceIds;this._idsTranslateMap.set(a,{batchId:u,instanceIds:c,translate:s,dirty:!0});var h=this._idsOperationMap.get(a);t$$(h)||(h={batchId:u,instanceIds:c,operationValue:new a$11,dirty:!0}),h.dirty=!0,a$11.equals(s,a$11.ZERO)?(h.operationValue.x=h.operationValue.x&(_0x24b8f6.ALL^_0x24b8f6.OFFSET),this._idsOperationMap.set(a,h)):(h.operationValue.x=h.operationValue.x|_0x24b8f6.OFFSET,o=!0)}}t$$(this._entity)&&(this._entity.hasTranslate=o),i.cull=!o;var d=this._idsTranslateMap.length;(d>0&&0===r||r>0&&0===d)&&d>0&&0===r&&this.appendProgramDefine({layer:this._layer},!0,!1,H$r.Translation,!0,!1)}}},_0x38aae9.prototype.updateAllObjsVisible=function(e,t){if(this._initialize&&t$$(this._selectionInforMap)&&_0x335bbd.S3M!==this._version&&(!(this._selectionInforMap.length<1)&&t$$(this._colorCommand))){var i=this._selectionInforMap._hash;for(var n in i)if(i.hasOwnProperty(n)&&!e._objsVisibleList.contains(n)){var r=i[n];this._updateBatchTable=!0;var o=r.batchId,a=r.instanceIds,s=this._idsOperationMap.get(n);t$$(s)||(s={batchId:o,instanceIds:a,operationValue:new a$10,dirty:!0}),s.dirty=!0,s.operationValue.x=t?s.operationValue.x&(_0x24b8f6.ALL^_0x24b8f6.HIDE):s.operationValue.x|_0x24b8f6.HIDE,this._idsOperationMap.set(n,s),s.operationValue.x===_0x24b8f6.RESET?delete e._objsOperationList[n]:(e._objsOperationList[n]=s.operationValue.x,e._objsHideList.set(n,!0))}}},_0x38aae9.prototype.removeAllExtendHeight=function(){this._initialize&&t$$(this._texCoord1)&&t$$(this._colorCommand)&&this._colorCommand.vertexArray.getAttribute(this._attributeLocations.aTexCoord1).vertexBuffer.copyFromArrayView(this._texCoord1)},_0x38aae9.prototype.removeExtendHeight=function(e){if(this._initialize&&t$$(this._texCoord1)&&(!(this._selectionInforMap.length<1)&&t$$(this._colorCommand))){var t=this._selectionInforMap._hash;for(var i in t)if(t.hasOwnProperty(i)&&-1!=e.indexOf(parseInt(i))){var n,r,o,a,s=t[i];n=this._colorCommand.vertexArray.getAttribute(this._attributeLocations.aTexCoord1),r=(a=s.vertexColorOffset*n.componentsPerAttribute)*C$12.getSizeInBytes(n.componentDatatype),o=s.vertexColorCount*n.componentsPerAttribute;var l=this._texCoord1.slice(a,o);n.vertexBuffer.copyFromArrayView(l,r)}}},_0x38aae9.prototype.updateExtendHeight=function(e){if(this._initialize&&t$$(this._texCoord1)&&(!(this._selectionInforMap.length<1)&&t$$(this._colorCommand))){var t=this._selectionInforMap._hash;for(var i in t)if(t.hasOwnProperty(i)&&e.contains(i)){var n,r,o,a,s=t[i],l=e.get(i);n=this._colorCommand.vertexArray.getAttribute(this._attributeLocations.aTexCoord1),r=(a=s.vertexColorOffset*n.componentsPerAttribute)*C$12.getSizeInBytes(n.componentDatatype),o=s.vertexColorCount*n.componentsPerAttribute;for(var u=C$12.createTypedArray(n.componentDatatype,o),c=0;c<s.vertexColorCount;c++)this._texCoord1[2*c+1+a]>.3&&this._texCoord1[2*c+1+a]<.8?(u[2*c]=l,u[2*c+1]=.5):this._texCoord1[2*c+1+a]>.8?(u[2*c]=l,u[2*c+1]=1):(u[2*c]=this._texCoord1[2*c+a],u[2*c+1]=0);n.vertexBuffer.copyFromArrayView(u,r)}}},_0x38aae9.prototype.updateObjsOperation=function(e,t){if(this._initialize&&t$$(this._selectionInforMap)&&_0x335bbd.S3M!==this._version&&(!(this._selectionInforMap.length<1)&&t$$(this._colorCommand))){var i=this._selectionInforMap._hash,n=!1,r=_0x5be543(this._layer,this),o=!1,a=this._layer.isSilhouette(),s=!1,l=!1;for(var u in i)if(i.hasOwnProperty(u)){var c=e[u];if(t$$(c)){var h=i[u];this._updateBatchTable=!0;var d=this._layer._lastSelectSkeletonId,f=d>-1?u+"_"+d:u,p=h.batchId,_=h.instanceIds,m=this._idsOperationMap.get(f);t$$(m)||(m={batchId:p,instanceIds:_,skeletonId:d,operationValue:new a$10,dirty:!0}),m.dirty=!0,m.operationValue.x=1&m.operationValue.x|c,this._idsOperationMap.set(f,m),(m.operationValue.x&_0x24b8f6.BLOOM)>0&&(n=!0),r&&(m.operationValue.x&_0x24b8f6.SELECTED)>0&&(o=!0),a&&(m.operationValue.x&_0x24b8f6.SELECTED)>0&&(s=!0),(m.operationValue.x&_0x24b8f6.SELECTED)>0&&(l=!0)}}this._hasBloomOperation=n,this._clampSelected=o,this._hasSilhouette=s,this._isSelected=l}};var _0x5e0bf4=new n$17(new a$11(1,0,0),0);function _0x37fff2(e,t){return a$11.distance(e.center,t.center)<=e.radius+t.radius}function _0x62d113(e,t){var i=!1,n=t.split(" "),r=!1;if(n.length>1){var o=n[0],a=n[1];for(var s in e.defines)if(-1!==e.defines[s].indexOf(o))return e.defines[s]=o+" "+a,!0;r=!0,e.defines.push(t)}else{for(var l=0,u=e.defines.length;l<u;l++)if(e.defines[l]===t){i=!0;break}i||(r=!0,e.defines.push(t))}return r}function _0x5f5171(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function _0x2d116e(e,t){t$$(t)&&(t.vertexArray=t.vertexArray&&!t.vertexArray.isDestroyed()&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&!t.shaderProgram.isDestroyed()&&t.shaderProgram.destroy(),t.renderState=void 0,t.uniformMap=void 0,t.removeAllUniformBuffer())}function _0x216a1b(e,t,i,n){if(!t$$(i._labelPromiseArr[n])){var r=e._s3MTilesLabelStyle._textField;e.getAttributesById(t).then((function(e){if(i._labelPromiseArr[n]=void 0,e.hasOwnProperty(r)){var o=e[r];i._labelTextArray[n]=o,i._labelsCreated[t]=!0}}))}}_0x38aae9.prototype.isIntersectWithClipPlane=function(e){return!!e.isRenderClipSection()&&this._boundingVolume.intersectPlane(n$17.fromCartesian4(e._oriClipPlane[0],_0x5e0bf4))===cr$4.INTERSECTING},_0x38aae9.prototype.setCustomClipBox=function(e,t){var i={layer:e};t?(this.appendProgramDefine(i,!1,!0,H$r.CLIP),e._section&&this.appendProgramDefine(i,!1,!0,H$r.CLIPPLANE)):(this.removeProgramDefine(i,!1,!0,H$r.CLIP),e._section&&this.removeProgramDefine(i,!1,!0,H$r.CLIPPLANE)),t$$(this._clampColorCommand)&&(!this._clampColorCommand.shaderProgram.isDestroyed()&&this._clampColorCommand.shaderProgram.destroy(),this._clampColorCommand=void 0),t$$(this._clipStencilCommand)&&(!this._clipStencilCommand.shaderProgram.isDestroyed()&&this._clipStencilCommand.shaderProgram.destroy(),this._clipStencilCommand=void 0)},_0x38aae9.prototype.updateShadow=function(e){var t=_0x234fda(this),i=this._colorCommand;!t$$(i)||(i.castShadows=t,i.receiveShadows=t,i.selectCastShadows=!t$$(e.waterEffectSet))},_0x38aae9.prototype.cloneSelectCommand=function(e){var t=e._context,i=new a$O({name:"S3MTilesSelection",sources:[_0x2f4415]});e._clipping&&i.defines.push("CLIP"),i.defines.push("DepthEXT");var n=this._colorCommand;if(t$$(n)){var r=n.shaderProgram.vertexShaderSource.clone(),o=void 0;if((o=s$1d.shallowClone(n,o)).uniformMap.uTransparentFilter=function(){return e.selectionFiltrateByTransparency},o.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:i,attributeLocations:this._attributeLocations}),this._pickCommand=o,this._pickCommand.pass=we$l.ClampObject,t$$(this._stencilCommand)){var a=this._stencilCommand.shaderProgram.vertexShaderSource.clone(),s=this._stencilCommand.shaderProgram.fragmentShaderSource.clone();a.defines.push("SELECTED"),s.defines.push("SELECTED"),this._selectedStencilCommand=s$1d.shallowClone(this._stencilCommand),this._selectedStencilCommand.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:this._attributeLocations}),this._selectedColorCommand=s$1d.shallowClone(this._colorCommand),this._selectedColorCommand.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:this._attributeLocations})}}},_0x38aae9.prototype.createNormalAndDepthCommand=function(e){var t=e._context,i=this._colorCommand;if(e.isSilhouette()&&t$$(i)&&!t$$(this._normalAndDepthCommand)){var n=i.shaderProgram.vertexShaderSource.clone(),r=i.shaderProgram.fragmentShaderSource.clone();n.defines.push(H$r.NORMAL_AND_DEPTH),r.defines.push(H$r.NORMAL_AND_DEPTH),e.isSilhouette()&&(n.defines.push(H$r.SILHOUETTE_SELECT_TYPE),r.defines.push(H$r.SILHOUETTE_SELECT_TYPE));var o=void 0;(o=s$1d.shallowClone(i,o)).shaderProgram=p$15.fromCache({context:t,vertexShaderSource:n,fragmentShaderSource:r,attributeLocations:this._attributeLocations}),o.uniformMap.uNormalDepthTexture=function(){return e._frameState._framebufferList.normalAndDepth.renderTexture._fb.getColorTexture(0)},this._normalAndDepthCommand=o}},_0x38aae9.prototype.createTransparentCommand=function(e){var t=e._context,i=this._colorCommand;if(e.partlyTransparent&&t$$(i)&&!t$$(this._transparentCommand)){var n=i.shaderProgram.vertexShaderSource.clone(),r=i.shaderProgram.fragmentShaderSource.clone();r.defines.push("TRANSPARENT_PASS");var o=void 0;(o=s$1d.shallowClone(i,o)).shaderProgram=p$15.fromCache({context:t,vertexShaderSource:n,fragmentShaderSource:r,attributeLocations:this._attributeLocations}),o.pass=we$l.TRANSLUCENT,this._transparentCommand=o}},_0x38aae9.prototype.createPostEffectCommand=function(e){var t=e._context,i=this._colorCommand;if(e.bloomEnable&&t$$(i)&&!t$$(this._postEffectCommand)){var n=i.shaderProgram.vertexShaderSource.clone(),r=i.shaderProgram.fragmentShaderSource.clone();n.defines.push(H$r.POST_EFFECT),r.defines.push(H$r.POST_EFFECT);var o=void 0;(o=s$1d.shallowClone(i,o)).shaderProgram=p$15.fromCache({context:t,vertexShaderSource:n,fragmentShaderSource:r,attributeLocations:this._attributeLocations}),o.pass=we$l.S3MTiles,this._postEffectCommand=o}},_0x38aae9.prototype.enableAjustTransparentBackColor=function(e){this.appendProgramDefine(e,!1,!0,H$r.TRANSPARENT_BACK_COLOR)},_0x38aae9.prototype.disableAjustTransparentBackColor=function(e){this.removeProgramDefine(e,!1,!0,H$r.TRANSPARENT_BACK_COLOR)},_0x38aae9.prototype.enableAdjustColor=function(e){this.appendProgramDefine(e,!1,!0,H$r.ADJUST_COLOR)},_0x38aae9.prototype.enableVertexCapture=function(e){this.appendProgramDefine(e,!0,!0,H$r.VERTEX_CAPTURE)},_0x38aae9.prototype.disableVertexCapture=function(e){this.removeProgramDefine(e,!0,!0,H$r.VERTEX_CAPTURE)},_0x38aae9.prototype.enableExcavation=function(e){this.appendProgramDefine(e,!0,!0,H$r.EXCAVATION)},_0x38aae9.prototype.disableExcavation=function(e){this.removeProgramDefine(e,!0,!0,H$r.EXCAVATION)},_0x38aae9.prototype.enableServerExcavation=function(e){this.appendProgramDefine(e,!0,!0,"SERVEREXCAVATION")},_0x38aae9.prototype.disableServerExcavation=function(e){this.removeProgramDefine(e,!0,!0,"SERVEREXCAVATION")},_0x38aae9.prototype.enableFlatten=function(e){t$$(e.entity)&&t$$(e.entity._boundingSphere)&&t$$(e.boundingSphere)&&(_0x37fff2(e.entity._boundingSphere,e.boundingSphere)&&(e.entity.isFlatten=!0,t$$(this._colorCommand)&&(this._colorCommand.cull=!1)));this.appendProgramDefine(e,!0,!1,H$r.FALTTEN),this.appendProgramDefine(e,!0,!1,H$r.UseFloatTexture)},_0x38aae9.prototype.enableOverlay=function(e){this.appendProgramDefine(e,!0,!0,H$r.OVERLAY)},_0x38aae9.prototype.disableOverlay=function(e){this.removeProgramDefine(e,!0,!1,H$r.OVERLAY)},_0x38aae9.prototype.disableFlatten=function(e){t$$(e.entity)&&(e.entity.isFlatten=!1),t$$(this._colorCommand)&&(this._colorCommand.cull=!0),this.removeProgramDefine(e,!0,!1,H$r.FALTTEN),this.removeProgramDefine(e,!0,!1,H$r.UseFloatTexture)},_0x38aae9.prototype.enableHypsometric=function(e){this.appendProgramDefine(e,!0,!0,H$r.COMPUTE_W_VALUE),this.appendProgramDefine(e,!0,!0,H$r.HYPSOMETRIC)},_0x38aae9.prototype.disableHypsometric=function(e){this.removeProgramDefine(e,!0,!0,H$r.COMPUTE_W_VALUE),this.removeProgramDefine(e,!0,!0,H$r.EMISSION_TEXTURE),this.removeProgramDefine(e,!0,!0,H$r.HYPSOMETRIC)},_0x38aae9.prototype.hasLightChange=function(e){e.enable?this.appendProgramDefine(e,!0,!0,H$r.HAS_LIGHT):this.removeProgramDefine(e,!0,!0,H$r.HAS_LIGHT)},_0x38aae9.prototype.skeletonSelectedChange=function(e){e.enable?this.appendProgramDefine(e,!0,!0,H$r.HAS_SKELETONSELECTED):this.removeProgramDefine(e,!0,!0,H$r.HAS_SKELETONSELECTED)},_0x38aae9.prototype.skeletonSelectEnable=function(e){e.enable?this.appendProgramDefine(e,!0,!0,H$r.SKELETONSELECT_ENABLE):this.removeProgramDefine(e,!0,!0,H$r.SKELETONSELECT_ENABLE)},_0x38aae9.prototype.selectColorTypeChange=function(e){e.selectColorType==Ja.REPLACE?(this.appendProgramDefine(e,!0,!0,H$r.REPLACE_SELECT_TYPE),this.removeProgramDefine(e,!0,!0,H$r.SILHOUETTE_SELECT_TYPE)):e.selectColorType==Ja.SILHOUETTE||e.selectColorType==Ja.ALWAYS_SHOW_SILHOUETTE?(this.appendProgramDefine(e,!0,!0,H$r.SILHOUETTE_SELECT_TYPE),this.removeProgramDefine(e,!0,!0,H$r.REPLACE_SELECT_TYPE)):(this.removeProgramDefine(e,!0,!0,H$r.REPLACE_SELECT_TYPE),this.removeProgramDefine(e,!0,!0,H$r.SILHOUETTE_SELECT_TYPE))},_0x38aae9.prototype.mixColorTypeChange=function(e){e.mixColorType===_0x28ce18.REPLACE?this.appendProgramDefine(e,!0,!0,H$r.REPLACE_COLOR_TYPE):this.removeProgramDefine(e,!0,!0,H$r.REPLACE_COLOR_TYPE)},_0x38aae9.prototype.splitDirectionChange=function(e){e.enableSplit?this.appendProgramDefine(e,!1,!0,H$r.APPLY_SPLIT):this.removeProgramDefine(e,!1,!0,H$r.APPLY_SPLIT)},_0x38aae9.prototype.swipeStateChange=function(e){e.enableSwipe?this.appendProgramDefine(e,!1,!0,H$r.APPLY_SWIPE):this.removeProgramDefine(e,!1,!0,H$r.APPLY_SWIPE)},_0x38aae9.prototype.edgeWireFrameModeChange=function(e){this.appendProgramDefineForCommand(this._regularEdgeCommand,e,!0,!0,"MODE "+e.edgeMode,!1),this.appendProgramDefineForCommand(this._silhouetteEdgeCommand,e,!0,!0,"MODE "+e.edgeMode,!1)},_0x38aae9.prototype.PBRMaterialTypeChange=function(e){e.PBRType===We$a.NONE?this.removeProgramDefine(e,!0,!0,H$r.PBR):this.appendProgramDefine(e,!0,!0,H$r.PBR)},_0x38aae9.prototype.emissionTextureChange=function(e){e.enable?(this.appendProgramDefine(e,!0,!0,H$r.COMPUTE_W_VALUE),this.appendProgramDefine(e,!0,!0,H$r.EMISSION_TEXTURE),this.appendProgramDefine(e,!0,!0,H$r.EMISSION_TEXTURE_COUNT+e.textureCount)):this.removeProgramDefine(e,!0,!0,H$r.EMISSION_TEXTURE)},_0x38aae9.prototype.enableTextureMove=function(e){e.enable?this.appendProgramDefine(e,!0,!0,H$r.TEXTURE_MOVE):this.removeProgramDefine(e,!0,!0,H$r.TEXTURE_MOVE)},_0x38aae9.prototype.enableTriangleFiltrate=function(e){e.enable?this.appendProgramDefine(e,!0,!1,H$r.TRIANGLE_FILTRATE):this.removeProgramDefine(e,!0,!1,H$r.TRIANGLE_FILTRATE)},_0x38aae9.prototype.enableClipFilt=function(e){e.enable?this.appendProgramDefine(e,!1,!0,H$r.CLIP_FILT_BY_ID):this.removeProgramDefine(e,!1,!0,H$r.CLIP_FILT_BY_ID)},_0x38aae9.prototype.enableFlood=function(e){this.appendProgramDefine(e,!0,!0,H$r.FLOOD_ANALYSIS)},_0x38aae9.prototype.disableFlood=function(e){this.removeProgramDefine(e,!0,!0,H$r.FLOOD_ANALYSIS)},_0x38aae9.prototype.emissionTextureUnitChange=function(e){e.enable?this.appendProgramDefine(e,!0,!1,H$r.SEC_TEX_EMISSION):this.removeProgramDefine(e,!0,!1,H$r.SEC_TEX_EMISSION)},_0x38aae9.prototype.pbrParameterChange=function(e){if(e.enable){var t=e.layer,i=(t._pbrParameter&We$a.ROUGHNESS)>0||t._PBRMaterialParams.loadingTexture,n=t$$(t.themeStyle)&&t$$(t.themeStyle.pbrMaterialIndex),r=[];if(i||n){r.push(H$r.BRDF);var o=t$$(this._attributeLocations.aTexCoord0);n&&(r.push(H$r.PBR_THEME),r.push("NUM_PBR_MATERIALS "+t._frameState.pbrMaterialsArr.length)),t$$(t._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture instanceof P$S&&o&&r.push(H$r.HAS_BASE_TEXTURE),o&&t$$(t._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&t$$(t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wetnessFactor)&&(r.push(H$r.HAS_WETNESS),t$$(t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture instanceof P$S&&r.push(H$r.HAS_RAIN)),o&&t$$(t._PBRMaterialParams.pbrMetallicRoughness.snowEffect)&&t$$(t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture instanceof P$S&&t$$(t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture instanceof P$S&&r.push(H$r.HAS_SNOW),(t$$(this.materialPass)&&this.materialPass._metallicRoughnessTextureIndex>-1||t$$(t._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture instanceof P$S)&&o&&r.push(H$r.HAS_MetallicRoughness_TEXTURE),(t$$(this.materialPass)&&this.materialPass._normalTextureIndex>-1||t$$(t._PBRMaterialParams.pbrMetallicRoughness.normalTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.normalTexture instanceof P$S)&&o&&r.push(H$r.HAS_NORMAL_TEXTURE),(t$$(this.materialPass)&&this.materialPass._occlusionTextureIndex>-1||t$$(t._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture instanceof P$S)&&o&&r.push(H$r.HAS_OCCLUSION_TEXTURE),(t$$(this.materialPass)&&t$$(this.materialPass._anisotropy)||t$$(t._PBRMaterialParams.pbrMetallicRoughness.anisotropy))&&r.push(H$r.HAS_ANISOTROPY),(t$$(this.materialPass)&&t$$(this.materialPass._volume)||t$$(t._PBRMaterialParams.pbrMetallicRoughness.volume))&&(r.push(H$r.HAS_VOLUME),r.push(H$r.HAS_TRANSMISSION)),(t$$(this.materialPass)&&t$$(this.materialPass._clearcoat)||t$$(t._PBRMaterialParams.pbrMetallicRoughness.clearcoat))&&r.push(H$r.HAS_CLEARCOAT),(t$$(this.materialPass)&&this.materialPass._indexOfRefraction>-1||t$$(t._PBRMaterialParams.pbrMetallicRoughness.indexOfRefraction)&&t._PBRMaterialParams.pbrMetallicRoughness.indexOfRefraction>0)&&r.push(H$r.REFRACTION),t$$(this.materialPass)&&this.materialPass._emissiveTextureIndex>-1&&r.push(H$r.HAS_EMISSIVE_TEXTURE),t$$(t._frameState.specularEnvironmentMaps)&&r.push(H$r.IBL),this.appendProgramDefinesForCommand(this._colorCommand,e,!1,!0,r,!0,!0)}else r=[H$r.BRDF,"NUM_PBR_MATERIALS "+t._frameState.pbrMaterialsArr.length,H$r.HAS_BASE_TEXTURE,H$r.HAS_NORMAL_TEXTURE,H$r.HAS_EMISSIVE_TEXTURE,H$r.IBL,H$r.HAS_MetallicRoughness_TEXTURE,H$r.HAS_SNOW,H$r.HAS_RAIN],this.removeProgramDefinesForCommand(this._colorCommand,e,!1,!0,r)}},_0x38aae9.prototype.enableFusionChange=function(e){e.enable?this.appendProgramDefine(e,!0,!1,H$r.FusionMode):this.removeProgramDefine(e,!0,!1,H$r.FusionMode)},_0x38aae9.prototype.appendProgramDefine=function(e,t,i,n,r,o){r=e$1Y(r,!0),o=e$1Y(o,!0),this.appendProgramDefineForCommand(this._colorCommand,e,t,i,n,r,o),this.appendProgramDefineForCommand(this._regularEdgeCommand,e,t,i,n,!1,o),this.appendProgramDefineForCommand(this._silhouetteEdgeCommand,e,t,i,n,!1,o),this.appendProgramDefineForCommand(this._wireFrameCommands.quad,e,!1,!0,n,!1,o),this.appendProgramDefineForCommand(this._wireFrameCommands.triangle,e,!1,!0,n,!1,o)},_0x38aae9.prototype.appendProgramDefineForCommand=function(e,t,i,n,r,o,a){if(o=e$1Y(o,!0),a=e$1Y(a,!0),t$$(e)){l=t.layer._context,u=e.shaderProgram.fragmentShaderSource.clone(),c=e.shaderProgram.vertexShaderSource.clone();t$$(u.name)||(u.name="fpCustomName"+t.layer.id),t$$(c.name)||(c.name="vpCustomName"+t.layer.id),i&&_0x62d113(c,r),n&&_0x62d113(u,r);h=e.shaderProgram._attributeLocations;a&&(e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy());var s=p$15.fromCache({context:l,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:h});o&&(this._sp=s),e.shaderProgram=s,t$$(this._stencilCommand)&&(this._stencilCommand.shaderProgram=e.shaderProgram),t$$(e.derivedCommands)&&t$$(e.derivedCommands.stencil)&&(e.derivedCommands.stencil.shaderProgram=e.shaderProgram),t$$(e.derivedCommands)&&t$$(e.derivedCommands.zback)&&(e.derivedCommands.zback.shaderProgram=_0x35f036(l,e.shaderProgram))}else if(o&&t$$(this._sp)){var l=t.layer._context,u=this._sp.fragmentShaderSource.clone(),c=this._sp.vertexShaderSource.clone();t$$(u.name)||(u.name="fpCustomName"+t.layer.id),t$$(c.name)||(c.name="vpCustomName"+t.layer.id),i&&_0x62d113(c,r),n&&_0x62d113(u,r);var h=this._attributeLocations;this._sp.destroy(),this._sp=p$15.fromCache({context:l,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:h})}},_0x38aae9.prototype.appendProgramDefinesForCommand=function(e,t,i,n,r,o,a){o=e$1Y(o,!0),a=e$1Y(a,!0);var s=t.layer._context;if(t$$(e)){u=e.shaderProgram.fragmentShaderSource.clone(),c=e.shaderProgram.vertexShaderSource.clone();t$$(u.name)||(u.name="fpCustomName"+t.layer.id),t$$(c.name)||(c.name="vpCustomName"+t.layer.id),r.forEach((function(e){i&&_0x62d113(c,e),n&&_0x62d113(u,e)}));h=e.shaderProgram._attributeLocations;a&&(e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy());var l=p$15.fromCache({context:s,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:h});o&&(this._sp=l),e.shaderProgram=l,t$$(this._stencilCommand)&&(this._stencilCommand.shaderProgram=e.shaderProgram),t$$(e.derivedCommands)&&t$$(e.derivedCommands.stencil)&&(e.derivedCommands.stencil.shaderProgram=e.shaderProgram),t$$(e.derivedCommands)&&t$$(e.derivedCommands.zback)&&(e.derivedCommands.zback.shaderProgram=_0x35f036(s,e.shaderProgram))}else if(o&&t$$(this._sp)){var u=this._sp.fragmentShaderSource.clone(),c=this._sp.vertexShaderSource.clone();t$$(u.name)||(u.name="fpCustomName"+t.layer.id),t$$(c.name)||(c.name="vpCustomName"+t.layer.id),r.forEach((function(e){i&&_0x62d113(c,e),n&&_0x62d113(u,e)}));var h=this._attributeLocations;this._sp.destroy(),this._sp=p$15.fromCache({context:s,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:h})}},_0x38aae9.prototype.removeProgramDefine=function(e,t,i,n){this.removeProgramDefineForCommand(this._colorCommand,e,t,i,n),t$$(this._regularEdgeCommand)&&this.removeProgramDefineForCommand(this._regularEdgeCommand,e,t,i,n,!1),t$$(this._silhouetteEdgeCommand)&&this.removeProgramDefineForCommand(this._silhouetteEdgeCommand,e,t,i,n,!1),t$$(this._wireFrameCommands.quad)&&this.removeProgramDefineForCommand(this._wireFrameCommands.quad,e,!1,!0,n,!1),t$$(this._wireFrameCommands.triangle)&&this.removeProgramDefineForCommand(this._wireFrameCommands.triangle,e,!1,!0,n,!1)},_0x38aae9.prototype.removeProgramDefineForCommand=function(e,t,i,n,r,o){if(o=e$1Y(o,!0),t$$(e)){s=t.layer._context,l=e.shaderProgram.fragmentShaderSource.clone(),u=e.shaderProgram.vertexShaderSource.clone();t$$(l.name)||(l.name="fpCustomName"+t.layer.id),t$$(u.name)||(u.name="vpCustomName"+t.layer.id),i&&_0x5f5171(u,r),n&&_0x5f5171(l,r);c=e.shaderProgram._attributeLocations;e.shaderProgram.destroy();var a=p$15.fromCache({context:s,vertexShaderSource:u,fragmentShaderSource:l,attributeLocations:c});e.shaderProgram=a,o&&(this._sp=a),t$$(this._stencilCommand)&&(this._stencilCommand.shaderProgram=e.shaderProgram),t$$(e.derivedCommands)&&t$$(e.derivedCommands.stencil)&&(e.derivedCommands.stencil.shaderProgram=e.shaderProgram),t$$(e.derivedCommands)&&t$$(e.derivedCommands.zback)&&(e.derivedCommands.zback.shaderProgram=_0x35f036(s,e.shaderProgram))}else if(o&&t$$(this._sp)){var s=t.layer._context,l=this._sp.fragmentShaderSource.clone(),u=this._sp.vertexShaderSource.clone();t$$(l.name)||(l.name="fpCustomName"+t.layer.id),t$$(u.name)||(u.name="vpCustomName"+t.layer.id),i&&_0x5f5171(u,r),n&&_0x5f5171(l,r);var c=this._attributeLocations;this._sp.destroy(),this._sp=p$15.fromCache({context:s,vertexShaderSource:u,fragmentShaderSource:l,attributeLocations:c})}},_0x38aae9.prototype.removeProgramDefinesForCommand=function(e,t,i,n,r,o){var a=t.layer._context;if(o=e$1Y(o,!0),t$$(e)){l=e.shaderProgram.fragmentShaderSource.clone(),u=e.shaderProgram.vertexShaderSource.clone();t$$(l.name)||(l.name="fpCustomName"+t.layer.id),t$$(u.name)||(u.name="vpCustomName"+t.layer.id),r.forEach((function(e){i&&_0x5f5171(u,e),n&&_0x5f5171(l,e)}));c=e.shaderProgram._attributeLocations;e.shaderProgram.destroy();var s=p$15.fromCache({context:a,vertexShaderSource:u,fragmentShaderSource:l,attributeLocations:c});e.shaderProgram=s,o&&(this._sp=s),t$$(this._stencilCommand)&&(this._stencilCommand.shaderProgram=e.shaderProgram),t$$(e.derivedCommands)&&t$$(e.derivedCommands.stencil)&&(e.derivedCommands.stencil.shaderProgram=e.shaderProgram),t$$(e.derivedCommands)&&t$$(e.derivedCommands.zback)&&(e.derivedCommands.zback.shaderProgram=_0x35f036(a,e.shaderProgram))}else if(o&&t$$(this._sp)){var l=this._sp.fragmentShaderSource.clone(),u=this._sp.vertexShaderSource.clone();t$$(l.name)||(l.name="fpCustomName"+t.layer.id),t$$(u.name)||(u.name="vpCustomName"+t.layer.id),r.forEach((function(e){i&&_0x5f5171(u,e),n&&_0x5f5171(l,e)}));var c=this._attributeLocations;this._sp.destroy(),this._sp=p$15.fromCache({context:a,vertexShaderSource:u,fragmentShaderSource:l,attributeLocations:c})}},_0x38aae9.prototype.lightSourceChanged=function(e){if(t$$(this._colorCommand)){var t=e.changedList,i=this._layer._scene._lightSource;for(var n in t)if(t.hasOwnProperty(n)){var r=t[n],o=r.type,a=r.count;switch(o){case w$x.DIRECTIONAL:this.appendProgramDefineForCommand(this._colorCommand,e,!0,!0,H$r.DIR_LIGHTS+a),i.directionalLight.length>0&&a>0?this.appendProgramDefineForCommand(this._colorCommand,e,!0,!0,H$r.HAS_DIR_LIGHTS):this.removeProgramDefineForCommand(this._colorCommand,e,!0,!0,H$r.HAS_DIR_LIGHTS);break;case w$x.POINT:this.appendProgramDefineForCommand(this._colorCommand,e,!0,!0,H$r.POINT_LIGHTS+a),i.pointLight.length>0&&a>0?this.appendProgramDefineForCommand(this._colorCommand,e,!0,!0,H$r.HAS_POINT_LIGHTS):this.removeProgramDefineForCommand(this._colorCommand,e,!0,!0,H$r.HAS_POINT_LIGHTS);break;case w$x.SPOT:this.appendProgramDefineForCommand(this._colorCommand,e,!0,!0,H$r.SPOT_LIGHTS+a),i.spotLight.length>0&&a>0?this.appendProgramDefineForCommand(this._colorCommand,e,!0,!0,H$r.HAS_SPOT_LIGHTS):this.removeProgramDefineForCommand(this._colorCommand,e,!0,!0,H$r.HAS_SPOT_LIGHTS);break;case w$x.HEMISPHERE:this.appendProgramDefineForCommand(this._colorCommand,e,!0,!0,H$r.HEMISPHERE_LIGHTS+a),i.hemisphereLight.length>0&&a>0?this.appendProgramDefineForCommand(this._colorCommand,e,!0,!0,H$r.HAS_HEMISPHERE_LIGHTS):this.removeProgramDefineForCommand(this._colorCommand,e,!0,!0,H$r.HAS_HEMISPHERE_LIGHTS)}}}},_0x38aae9.prototype.enableCategoryVisible=function(e){this.appendProgramDefine(e,!0,!1,H$r.W_VISIBLE)},_0x38aae9.prototype.isDestroyed=function(){return!1},_0x38aae9.prototype.destroy=function(){var e=t$$(this._layer.instanceSkeletonManager)&&"InstanceModel"===this._layer._dataType;if(t$$(this._vertexPackage)&&!e)for(var t=this._vertexPackage.vertexAttributes,i=0,n=t.length;i<n;i++){var r=t[i];t$$(r.vertexBuffer)&&!r.vertexBuffer.isDestroyed()&&!r.vertexBuffer.isDestroyed()&&r.vertexBuffer.destroy()}if(t$$(this._arrIndexPackage)&&!e)for(i=0,n=this._arrIndexPackage.length;i<n;i++){var o=this._arrIndexPackage[i];t$$(o.indexBuffer)&&!o.indexBuffer.isDestroyed()&&o.indexBuffer.destroy()}t$$(this._wireFrameIndexBuffers)&&this._wireFrameIndexBuffers.destroy();var a=this._context,s=this._layer;if(s._isS3MBlock)for(var l in this._mapPass)this._mapPass.hasOwnProperty(l)&&s.materialManager.free(s,l);else for(var l in this._mapPass)if(this._mapPass.hasOwnProperty(l)){var u=this._mapPass[l];!u.isDestroyed()&&u.destroy()}if(this._mapPass=void 0,this._sp=void 0,this._instanceMode>0){if(t$$(this._colorCommand)){var c=this._colorCommand;c.vertexArray=c.vertexArray&&!c.vertexArray.isDestroyed()&&c.vertexArray.destroy(),c.shaderProgram=c.shaderProgram&&!c.shaderProgram.isDestroyed()&&c.shaderProgram.destroy(),c.renderState=void 0,c.uniformMap=void 0,this._colorCommand=void 0}}else _0x2d116e(a,this._colorCommand),this._colorCommand=void 0,this._wireFrameCommands.triangle&&_0x2d116e(a,this._wireFrameCommands.triangle),this._wireFrameCommands.quad&&_0x2d116e(this._wireFrameCommands.quad),this._wireFrameCommands={},_0x2d116e(a,this._pickCommand),this._pickCommand=void 0,this._stencilCommand=void 0,_0x2d116e(a,this._selectedStencilCommand),this._selectedStencilCommand=void 0,_0x2d116e(a,this._selectedColorCommand),this._selectedColorCommand=void 0,_0x2d116e(a,this._normalAndDepthCommand),this._normalAndDepthCommand=void 0,_0x2d116e(a,this._postEffectCommand),this._postEffectCommand=void 0,_0x2d116e(a,this._pickRectCommand),this._pickRectCommand=void 0,_0x2d116e(a,this._clipCommand),this._clipCommand=void 0,_0x2d116e(a,this._regularEdgeCommand),this._regularEdgeCommand=void 0,_0x2d116e(a,this._silhouetteEdgeCommand),this._silhouetteEdgeCommand=void 0;if(this._clampColorCommand=void 0,this._clipStencilCommand=void 0,t$$(this._selectionInforMap)&&this._selectionInforMap.removeAll(),this._vertexPackage=void 0,this._vertexColor=void 0,this._texCoord1=void 0,this._vertexColorInstance=void 0,this._arrIndexPackage=void 0,t$$(this._volObj)&&(this._volObj=void 0),t$$(this._volTexture)&&(this._volTexture=void 0),t$$(this._symbolTextureUrl)&&_0x51a186.removeTexture(this._symbolTextureUrl),this._waterIndex,this.s3mbuffer&&(this.s3mbuffer=null),t$$(this._batchTable)&&(this._batchTable=this._batchTable.destroy()),t$$(this._imagerys)){for(var h=this._imagerys,d=(i=0,h.length);i<d;++i)h[i].releaseReference();this._imagerys.length=0}if(t$$(this._scaleImagerys)){for(i=0;i<this._scaleImagerys.length;i++){var f=this._scaleImagerys[i];if(t$$(f))for(n=0;n<f.length;n++)f[n].releaseReference()}this._scaleImagerys.length=0}if(t$$(this._plusRoArray)){for(i=0;i<this._plusRoArray.length;i++){var p=this._plusRoArray[i];if(t$$(p))for(n=0;n<p.length;n++)p[n].shaderProgram.destroy(),p[n].uniformMap=void 0}this._plusRoArray.length=0}return this._vertexWeightBuffers.length=0,this._layer._totalMemoryUsageInBytes-=this._geometryByteLength,s$1e(this)},_0x38aae9.prototype.createPickRectCommand=function(e){if(t$$(this._colorCommand)&&!t$$(this._pickRectCommand)&&"FresnelVp"!==this._colorCommand.shaderProgram.vertexShaderSource.name&&"FresnelFp"!==this._colorCommand.shaderProgram.fragmentShaderSource.name&&e._selectUpdate){var t=e._context,i=new a$O({name:"S3MTilesRectSelection",sources:[_0x1a40d2]}),n=this._colorCommand;if(!t$$(n))return;var r=n.shaderProgram.vertexShaderSource.clone(),o=void 0;(o=s$1d.shallowClone(n,o)).uniformMap.uTransparentFilter=function(){return e.selectionFiltrateByTransparency},o.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:i,attributeLocations:this._attributeLocations}),this._pickRectCommand=o}},_0x38aae9.prototype.prepareLabels=function(){if(!this._labelReady){var e=this._pickInfo,t=this._vertexPackage;if(t$$(e)&&Object.keys(e).length===t.verticesCount&&"InstanceModel"!==this._layer._dataType){for(var i in e)!e.hasOwnProperty(i)||"0"===i||(this._pickIDArray.push(i),this._labelsCreated[i]=!1);this._layer._labelCollection;var n,r,o=new a$11,a=t.vertexAttributes[0],s=a.componentsPerAttribute,l=t$$(t.nCompressOptions)&&(t.nCompressOptions&_0x107fdf.SVC_Vertex)===_0x107fdf.SVC_Vertex,u=1;if(t$$(a.typedArray)){l?(u=t.vertCompressConstant,n=new a$11(t.minVerticesValue.x,t.minVerticesValue.y,t.minVerticesValue.z),r=new Uint16Array(a.typedArray.buffer,a.typedArray.byteOffset,a.typedArray.byteLength/2)):r=new Float32Array(a.typedArray.buffer,a.typedArray.byteOffset,a.typedArray.byteLength/4);for(var c=this._matModel,h=0;h<t.verticesCount;h++)a$11.fromArray(r,s*h,o),l&&(o=a$11.multiplyByScalar(o,u,o),o=a$11.add(o,n,o)),c$1a.multiplyByPoint(c,o,o),this._labelPosArray.push(a$11.clone(o));this._labelTextArray=new Array(this._labelPosArray.length),this._labelReady=!0}}}},_0x38aae9.prototype.isNoExistAllLabels=function(){var e=this._layer._labelCollection;if(0===e._labels.length)return!0;for(var t=!0,i=0;i<this._labelPosArray.length;i++){var n=this._pickIDArray[i];if(e._labelsID.hasOwnProperty(n)){t=!1;break}}return t};var _0x491652=new r$T;_0x38aae9.prototype.updateLabels=function(e){if(e.camera,this.isNoExistAllLabels()&&t$$(this._labelIndexs)&&Object.keys(this._labelIndexs).length>0&&(this._labelIndexs={}),t$$(this._layer._layerScheduler._indexedDBScheduler)&&0!==this._pickIDArray.length&&0!==this._labelPosArray.length&&!(this._labelPosArray.length<=Object.keys(this._labelIndexs).length)){var t=this._layer,i=t._labelCollection,n=[],r=t._iconCollection,o=[],a=U$Y.RELATIVE_TO_GROUND;if(t.showIcon){if(!t$$(t.style3D)||!t.style3D.imageReady)return;a=t.style3D.altitudeMode,t._showLabel&&(_0x491652.y=-t.style3D.image.height/2,a=t._s3MTilesLabelStyle.heightReference)}t._s3MTilesLabelStyle._textField;for(var s=0;s<this._labelPosArray.length;s++){var l=this._pickIDArray[s];if(l=Number(l),this._labelsCreated[l]){var u=this._labelPosArray[s],c=this._labelTextArray[s];if(i.containsLabel(l))this._labelIndexs.hasOwnProperty(l)||(this._labelIndexs[l]=!0);else{var h=r.add({position:u,id:l,image:t.style3D.image,billboardStyle:t.style3D,heightReference:a,show:!0});o.push(h._index);var d=i.add({position:u,id:l,text:c,s3MTilesLabelStyle:t._s3MTilesLabelStyle,pixelOffset:_0x491652,show:!1});n.push(d._index)}}else _0x216a1b(t,l,this,s)}for(var f=0,p=n.length;f<p;f++)this._labelIndexs[l]=!0}},_0x38aae9.prototype.pushCommandsForPickRectBuffer=function(e,t){"FresnelVp"===this._colorCommand.shaderProgram.vertexShaderSource.name||"FresnelFp"===this._colorCommand.shaderProgram.fragmentShaderSource.name||!t$$(this._pickRectCommand)||t.push(this._pickRectCommand)},_0x38aae9.prototype.pushCommandsForSpatialQueryBuffer=function(e,t,i){if(e._spatialQueryEnable&&"FresnelVp"!==this._colorCommand.shaderProgram.vertexShaderSource.name&&"FresnelFp"!==this._colorCommand.shaderProgram.fragmentShaderSource.name){if(!t$$(this._spatialQueryCommand)){var n=this._colorCommand,r=n.shaderProgram.vertexShaderSource.clone();r.defines.push("SQRESULT");var o=new a$O({name:"SpatialQueryFp",sources:[z$m]});o.defines.push("SQRESULT");var a=s$1d.shallowClone(n);a.uniformMap.uTransparentFilter=function(){return e.selectionFiltrateByTransparency},a.uniformMap.uFrontDepthTexture=function(){return e._sqTextures[0]},a.uniformMap.uBackDepthTexture=function(){return e._sqTextures[1]},a.uniformMap.uFrontColorTexture=function(){return e._sqTextures[2]},a.uniformMap.uSQMode=function(){return e._sqMode};var s=new c$1a,l=this._matModel;a.uniformMap.uSQViewProj=function(){var t=new c$1a;return c$1a.multiply(e._sqViewMatirx,l,t),c$1a.multiply(e._sqPrjMatirx,t,s),s},a.shaderProgram=p$15.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:this._attributeLocations}),this._spatialQueryCommand=a,a.owner="sqResultTexture"}t.push(this._spatialQueryCommand)}},_0x38aae9.prototype.pushCommandsForRasterHeightMap=function(e,t,i){if(t$$(this._colorCommand)){if(!t$$(this._rasterHeightCommand)){var n=s$1d.shallowClone(this._colorCommand,new s$1d),r=this._colorCommand.shaderProgram.vertexShaderSource.clone(),o=this._colorCommand.shaderProgram.fragmentShaderSource.clone();r.defines.push("Height_Map"),o.defines.push("Height_Map"),r.defines.push("COMPUTE_W_VALUE"),o.defines.push("COMPUTE_W_VALUE"),n.shaderProgram=p$15.fromCache({context:e.context,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:this._attributeLocations}),this._rasterHeightCommand=n}i.push(this._rasterHeightCommand)}},_0x38aae9.prototype.setImagerys=function(e,t){if(this._cartographic=t,this._imagerys=e,t$$(e))if(t$$(this._sp)){for(var i=this._sp.fragmentShaderSource,n=-1,r=0;r<i.defines.length;r++)if(i.defines[r].includes("TEXTURE_UNITS")){n=r;break}n<0&&this._imagerys.length>0||t$$(this._dayTextures)&&e.length>this._dayTextures.length||!t$$(this._dayTextures)?this._refreshImageryShader():this._computeImageryParameter(this._layer)}else this._computeImageryParameter(this._layer)},_0x38aae9.prototype.hasScaleImagerys=function(e){return t$$(this._scaleImagerys[e-1])},_0x38aae9.prototype.setScaleImagerys=function(e,t){!t$$(e)||t<1||(this._scaleImagerys[t-1]=e)},_0x38aae9.prototype.resetScaleImagerys=function(e,t){if(this._imageRasterFinish&&t$$(this._sp)){if(this._scaleImagerys.length>e){for(var i=e;i<this._scaleImagerys.length;i++){if(t$$(a=this._scaleImagerys[i]))for(var n=0;n<a.length;n++)a[n].releaseReference()}this._scaleImagerys.length=e}if(this._plusRoArray.length>e){for(i=e;i<this._plusRoArray.length;i++){if(t$$(W=this._plusRoArray[i]))for(n=0;n<W.length;n++)W[n].uniformMap=void 0,W[n].shaderProgram.destroy()}this._plusRoArray.length=e}var r=void 0;for(i=0;i<this._scaleImagerys.length;i++){if(t$$(a=this._scaleImagerys[i])){var o=!0;for(n=0;n<a.length;n++)a[n].processStateMachine(t,!1),a[n]instanceof _0x1aa457?a[n].state===Tt$4.RENDERED||a[n].state===Tt$4.READY||a[n].state===Tt$4.FAILED||(o=!1):a[n].state<Tt$4.TEXTURE_LOADED&&(o=!1);o&&(r=i)}}if(r!=this._visibleScaleImageryIndex){var a=void 0;if(t$$(r)&&(a=this._scaleImagerys[r]),t$$(r)&&t$$(a)&&a.length>0){if(this._visibleScaleImageryIndex=r,!t$$(this._plusRoArray[r])){var s=this._layer,l=this._sp.fragmentShaderSource.clone();for(i=0;i<l.defines.length;i++)if(l.defines[i].includes("GRIDTEXTURE_UNITS")){l.defines.splice(i,1);break}for(i=0;i<l.defines.length;i++)if(l.defines[i].includes("TEXTURE_UNITS")){l.defines.splice(i,1);break}for(i=0;i<l.defines.length;i++)if(l.defines[i].includes("APPLY_ALPHA")){l.defines.splice(i,1);break}for(i=0;i<l.sources.length;i++)if(l.sources[i].includes("czm_sampleAndBlend")){l.sources.splice(i,1);break}var u=this._sp.vertexShaderSource.clone(),c=!1;for(i=0;i<u.defines.length;i++)if(u.defines[i].includes("IMAGERY")){c=!0;break}c||u.defines.push("IMAGERY");for(var h=0,d=a.length,f=0;d>0;){var p,_=d;p=0===(d-=_=Math.min(_,e$1y._maximumTextureImageUnits-2))?l:l.clone(),h>0&&p.defines.push("MULTIBATCH");var m=[],$=[],g=[],y=[],v=[],x=[],b=[],S=[],w=!1;t$$(_0x1f6e1c)||(_0x1f6e1c=new s$1p),_0x1f6e1c.west=this._cartographic.min.longitude,_0x1f6e1c.east=this._cartographic.max.longitude,_0x1f6e1c.north=this._cartographic.max.latitude,_0x1f6e1c.south=this._cartographic.min.latitude,this._imageryTextureBound.x=this._cartographic.max.longitude-this._cartographic.min.longitude,this._imageryTextureBound.y=this._cartographic.max.latitude-this._cartographic.min.latitude;for(i=0;i<_;i++){var C=a[f+i],T=C.imageryLayer,P=T._imageryProvider.tilingScheme.projection instanceof e$1H&&_0x1f6e1c.north<e$1H.MaximumLatitude&&_0x1f6e1c.south>-e$1H.MaximumLatitude;$.push(P);var E=P?C.textureWebMercator:C.texture;t$$(E)||(E=s._context.defaultTransparentTexture),m.push(E);var A=e$1Y(T._imageryProvider.flipY,!1);b.push(A);var L=this._calculateTextureTranslationAndScale(_0x1f6e1c,C.rectangle,P,T._imageryProvider._tilingScheme),M=this._calculateTextureTexCoordsRectangle(_0x1f6e1c,C.rectangle,P,T._imageryProvider._tilingScheme);g.push(M),y.push(L);var I=new a$10;I.x=T.transparentBackColor.red,I.y=T.transparentBackColor.green,I.z=T.transparentBackColor.blue,I.w=T.transparentBackColorTolerance,v.push(I),x.push(T.enableImageryClip),S.push(T.alpha),w=w||T.alpha<.999}f+=_;var O="",D="";(R=!1)&&(D="APPLY_IMAGERY_CUTOUT");var R,N=[],F={mixIndex:!0,mixDirection:0},B="#ifdef IMAGERY\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates)\n{\nvec4 color = initialColor;\n";(R=!1)&&(B+="vec4 cutoutAndColorResult;\nbool texelUnclipped;\n");for(i=0;i<_;++i){var z=_0x40a13d(N,i);if(t$$(z)){var G=i+1;G==_&&(G=i),B+="color = mvtTextureSampleAndBlend(\ncolor,\nu_dayTextures["+i+"],\nu_dayTextures["+G+"],\nu_dayTextureUseWebMercatorT["+i+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_dayTextureTexCoordsRectangle["+i+"],\nu_dayTextureTranslationAndScale["+i+"],\n"+converColorToVec4(z)+",\n"+(this._applyAlpha?"u_dayTextureAlpha["+i+"]":"1.0")+",\n0.0,\nvec4(0.0,0.0,0.0,0.0)\n);\n",i++}else B+=R?"cutoutAndColorResult = u_dayTextureCutoutRectangles["+i+"];\ntexelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;\ncutoutAndColorResult = czm_sampleAndBlend(\n":i===F.mixIndex&&F.mixDirection>0?"color = sampleAndBlendParent(\n":"color = czm_sampleAndBlend(\n",B+="color,\nu_dayTextures["+i+"],\nu_dayTextureUseWebMercatorT["+i+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_dayTextureTexCoordsRectangle["+i+"],\nu_dayTextureTranslationAndScale["+i+"],\nu_transparentBackColor["+i+"],\nu_imageryClipEnable["+i+"],\nu_dayTextureFlipY["+i+"],\n"+(this._applyAlpha?"u_dayTextureAlpha["+i+"]":"1.0")+",\n0.0,\n0.0,\n0.0,\n0.0,\n0.0,\nvec2(0.0,0.0),\nvec4(0.0,0.0,0.0,0.0)\n);\n",R&&(B+="color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n")}for(i=0;i<0;++i)B+="color = gridTextureSampleAndBlend(\ncolor,\nu_gridTextures["+i+"],\nu_gridTextureUseWebMercatorT["+i+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_gridTextureTexCoordsRectangle["+i+"],\nu_gridTextureTranslationAndScale["+i+"]);\n";B+="return color;\n}\n#endif",p.sources.push(B);for(c=!1,i=0;i<p.defines.length;i++)if(p.defines[i].includes("IMAGERY")){c=!0;break}c||p.defines.push("IMAGERY"),this._applyAlpha&&p.defines.push("APPLY_ALPHA"),p.defines.push("TEXTURE_UNITS "+_),""!=O&&p.defines.push(O),""!=D&&p.defines.push(D),p.defines.push("GRIDTEXTURE_UNITS 0");var k=this._sp._attributeLocations,U=p$15.fromCache({context:s._context,vertexShaderSource:u,fragmentShaderSource:p,attributeLocations:k}),V=this;(function(e){var t=e$1W(V._colorCommand._uniformMap),i=V._plusRoArray;t.u_dayTextures=function(){return i[r][e].dayTextures},t.u_dayTextureUseWebMercatorT=function(){return i[r][e].dayTextureUseWebMercatorT},t.u_dayTextureTexCoordsRectangle=function(){return i[r][e].dayTextureTexCoordsRectangle},t.u_dayTextureTranslationAndScale=function(){return i[r][e].dayTextureTranslationAndScale},t.u_transparentBackColor=function(){return i[r][e].transparentBackColor},t.u_imageryClipEnable=function(){return i[r][e].imageryClipEnable},t.u_dayTextureFlipY=function(){return i[r][e].dayTextureFlipY},t.u_dayTextureAlpha=function(){return i[r][e].dayTextureAlpha};var n=s$1d.shallowClone(V._colorCommand);n.shaderProgram=U,n._uniformMap=t;var o={command:n,shaderProgram:U,uniformMap:t,dayTextures:m,dayTextureUseWebMercatorT:$,dayTextureTexCoordsRectangle:g,dayTextureTranslationAndScale:y,transparentBackColor:I,imageryClipEnable:x,dayTextureFlipY:b,dayTextureAlpha:S};t$$(V._plusRoArray[r])||(V._plusRoArray[r]=[]),V._plusRoArray[r].push(o)})(h),h+=1}}}else{this._visibleScaleImageryIndex=void 0;for(i=0;i<this._plusRoArray.length;i++){var W;if(t$$(W=this._plusRoArray[i]))for(n=0;n<W.length;n++)W[n].shaderProgram.destroy(),W[n].uniformMap=void 0}this._plusRoArray=[];l=this._sp.fragmentShaderSource;var H=-1;for(i=0;i<l.defines.length;i++)if(l.defines[i].includes("TEXTURE_UNITS")){H=i;break}H<0&&this._imagerys.length>0||t$$(this._dayTextures)&&this._imagerys.length>this._dayTextures.length||!t$$(this._dayTextures)?this._refreshImageryShader():this._computeImageryParameter(this._layer)}}}};var _0x400d05=new a$11,_0x1ce328=new a$11,_0x56e58a=new a$11;_0x38aae9.prototype.setRealtimeRasterCamera=function(e,t){var i=n$13.clone(t.context.uniformState._viewport);this._imageryTextureBound.x=e.max.longitude-e.min.longitude,this._imageryTextureBound.y=e.max.latitude-e.min.latitude;var n=n$1d.toDegrees(e.min.longitude),r=n$1d.toDegrees(e.max.longitude),o=n$1d.toDegrees(e.max.latitude),a=n$1d.toDegrees(e.min.latitude),s=r-n,l=o-a,u=t.camera,c=u.frustum.clipPlane;1===t._fboState.frameBufferType&&u.disableReflection(),a$11.clone(u.position,_0x400d05),a$11.clone(u.direction,_0x1ce328),a$11.clone(u.up,_0x56e58a);var h=u._scene._mode;u._mode=b$1d.SCENE3D,u._scene._mode=b$1d.SCENE3D,u.setView({destination:new a$11(.5*(n+r),.5*(o+a),50),orientation:{direction:new a$11(0,0,-1),up:new a$11(0,1,0)},convert:!1}),u._mode=h,u._scene._mode=h;var d=new r$K({width:s,aspectRatio:s/l,near:1,far:100});return t.context.uniformState.update(t),t.context.uniformState.updateFrustum(d),{position:_0x400d05,direction:_0x1ce328,upDirection:_0x56e58a,viewport:i,waterPlane:c}},_0x38aae9.prototype.resetCamera=function(e,t){var i=t.camera;1===t._fboState.frameBufferType&&e.waterPlane&&i.enableReflection(e.waterPlane),i.setView({destination:e.position,orientation:{direction:e.direction,up:e.upDirection},convert:!1}),t.context.uniformState.update(t),t.context.uniformState.updateFrustum(i.frustum),t.context.uniformState.viewport=e.viewport},_0x38aae9.prototype.isImageryLoaded=function(e){for(var t=!0,i=this._imagerys.length,n=0;n<i;n++)this._imagerys[n]instanceof _0x1aa457?this._imagerys[n].state===Tt$4.RENDERED||this._imagerys[n].state===Tt$4.READY||this._imagerys[n].state===Tt$4.FAILED||(t=!1):this._imagerys[n].state<Tt$4.TEXTURE_LOADED&&(t=!1);return t},_0x38aae9.prototype.updateImageryTexture=function(e,t){if(this.isImageryLoaded(t)){for(var i=[],n=0;n<this._imagerys.length;n++)t$$(this._imagerys[n].texture)&&i.push(this._imagerys[n]);i.length>0&&(this._imageRasterFinish=!0,this._computeImageryParameter(e))}else{this._imageryLevels.length!=this._imagerys.length&&(this._imageryLevels.length=this._imagerys.length);i=[];var r=[];for(n=0;n<this._imagerys.length;n++){for(var o=this._imagerys[n],a=o.rectangle;o.state!=Tt$4.READY&&t$$(o.parent)&&o.imageryLayer._imageryProvider.minimumLevel<o.level;)o=o.parent;t$$(o.texture)&&o.state==Tt$4.READY&&(i.push(o),r.push(a))}var s=!1;if(i.length==this._imagerys.length)for(n=0;n<i.length;n++)i[n].level!=this._imageryLevels[n]&&(s=!0,this._imageryLevels[n]=i[n].level);s&&i.length>0&&this._computeImageryParameter(e,i,r)}};var _0x1e471a=new s$1p,_0x1368a9=new s$1p;_0x38aae9.prototype._calculateTextureTranslationAndScale=function(e,t,i,n){var r=t,o=e;i&&(r=n.rectangleToNativeRectangle(r,_0x1e471a),o=n.rectangleToNativeRectangle(o,_0x1368a9));var a=o.width,s=o.height,l=a/r.width,u=s/r.height;return new a$10(l*(o.west-r.west)/a,u*(o.south-r.south)/s,l,u)},_0x38aae9.prototype._calculateTextureTexCoordsRectangle=function(e,t,i,n){var r=t,o=e;i&&(r=n.rectangleToNativeRectangle(r,_0x1e471a),o=n.rectangleToNativeRectangle(o,_0x1368a9));var a=o.width,s=o.height;return new a$10((r.west-o.west)/a,(r.south-o.south)/s,(r.east-o.west)/a,(r.north-o.south)/s)};var _0x1f6e1c=void 0,_0x38b2c8=new a$10;function _0x40a13d(e,t){if(!t$$(e)||0==e.length)return null;for(var i=e.length,n=0;n<i;n++)if(e[n].textureIndex===t)return e[n].selectColor;return null}_0x38aae9.prototype._computeImageryParameter=function(e,t,i){var n=t;t$$(n)||(n=this._imagerys);var r=0;t$$(this._dayTextures)&&this._dayTextures.length>0&&(r=this._dayTextures.length-n.length),this._dayTextures=[],this._dayTextureUseWebMercatorT=[],this._dayTextureTexCoordsRectangle=[],this._dayTextureTranslationAndScale=[],this._transparentBackColor=[],this._imageryClipEnable=[],this._dayTextureFlipY=[],this._dayTextureAlpha=[],this._applyAlpha=!1,t$$(_0x1f6e1c)||(_0x1f6e1c=new s$1p),_0x1f6e1c.west=this._cartographic.min.longitude,_0x1f6e1c.east=this._cartographic.max.longitude,_0x1f6e1c.north=this._cartographic.max.latitude,_0x1f6e1c.south=this._cartographic.min.latitude,this._imageryTextureBound.x=this._cartographic.max.longitude-this._cartographic.min.longitude,this._imageryTextureBound.y=this._cartographic.max.latitude-this._cartographic.min.latitude;for(var o=0;o<n.length;o++){var a=n[o].imageryLayer,s=a._imageryProvider.tilingScheme.projection instanceof e$1H&&_0x1f6e1c.north<e$1H.MaximumLatitude&&_0x1f6e1c.south>-e$1H.MaximumLatitude;this._dayTextureUseWebMercatorT.push(s);var l=s?n[o].textureWebMercator:n[o].texture;t$$(l)||(l=e._context.defaultTransparentTexture),this._dayTextures.push(l);var u=e$1Y(a._imageryProvider.flipY,!1);this._dayTextureFlipY.push(u);var c,h=this._calculateTextureTranslationAndScale(_0x1f6e1c,n[o].rectangle,s,a._imageryProvider._tilingScheme);c=t$$(i)?this._calculateTextureTexCoordsRectangle(_0x1f6e1c,i[o],s,a._imageryProvider._tilingScheme):this._calculateTextureTexCoordsRectangle(_0x1f6e1c,n[o].rectangle,s,a._imageryProvider._tilingScheme),this._dayTextureTexCoordsRectangle.push(c),this._dayTextureTranslationAndScale.push(h);var d=new a$10;d.x=a.transparentBackColor.red,d.y=a.transparentBackColor.green,d.z=a.transparentBackColor.blue,d.w=a.transparentBackColorTolerance,this._transparentBackColor.push(d),this._imageryClipEnable.push(a.enableImageryClip),this._dayTextureAlpha.push(a.alpha),this._applyAlpha=this._applyAlpha||a.alpha<.999}if(r>0)for(o=0;o<r;o++)this._dayTextures.push(e._context.defaultTransparentTexture),this._dayTextureUseWebMercatorT.push(!1),this._dayTextureTexCoordsRectangle.push(_0x38b2c8),this._dayTextureTranslationAndScale.push(_0x38b2c8),this._transparentBackColor.push(_0x38b2c8),this._imageryClipEnable.push(!1),this._dayTextureFlipY.push(!1),this._dayTextureAlpha.push(1)},_0x38aae9.prototype._createImageryShader=function(e,t){if(t$$(this._imagerys)&&this._imagerys.length>0){this._computeImageryParameter(e);var i="",n="";(o=!1)&&(n="APPLY_IMAGERY_CUTOUT");var r=this._imagerys.length;r=Math.min(r,e$1y._maximumTextureImageUnits-2);var o,a=[],s={mixIndex:!0,mixDirection:0},l="#ifdef IMAGERY\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates)\n{\n vec4 color = initialColor;\n";(o=!1)&&(l+=" vec4 cutoutAndColorResult;\n bool texelUnclipped;\n");for(var u=0;u<r;++u){var c=_0x40a13d(a,u);if(t$$(c)){var h=u+1;h==r&&(h=u),l+=" color = mvtTextureSampleAndBlend(\n color,\n u_dayTextures["+u+"],\n u_dayTextures["+h+"],\n u_dayTextureUseWebMercatorT["+u+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_dayTextureTexCoordsRectangle["+u+"],\n u_dayTextureTranslationAndScale["+u+"],\n "+converColorToVec4(c)+",\n "+(this._applyAlpha?"u_dayTextureAlpha["+u+"]":"1.0")+",\n 0.0,\n vec4(0.0,0.0,0.0,0.0)\n );\n",u++}else l+=o?" cutoutAndColorResult = u_dayTextureCutoutRectangles["+u+"];\n texelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;\n cutoutAndColorResult = czm_sampleAndBlend(\n":u===s.mixIndex&&s.mixDirection>0?" color = sampleAndBlendParent(\n":" color = czm_sampleAndBlend(\n",l+=" color,\n u_dayTextures["+u+"],\n u_dayTextureUseWebMercatorT["+u+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_dayTextureTexCoordsRectangle["+u+"],\n u_dayTextureTranslationAndScale["+u+"],\n u_transparentBackColor["+u+"],\n u_imageryClipEnable["+u+"],\n u_dayTextureFlipY["+u+"],\n "+(this._applyAlpha?"u_dayTextureAlpha["+u+"]":"1.0")+",\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n vec2(0.0,0.0),\n vec4(0.0,0.0,0.0,0.0)\n );\n",o&&(l+=" color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n")}for(u=0;u<0;++u)l+=" color = gridTextureSampleAndBlend(\n color,\n u_gridTextures["+u+"],\n u_gridTextureUseWebMercatorT["+u+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_gridTextureTexCoordsRectangle["+u+"],\n u_gridTextureTranslationAndScale["+u+"]);\n";l+=" return color;\n}\n#endif",t.sources.push(l);var d=!1;for(u=0;u<t.defines.length;u++)if(t.defines[u].includes("IMAGERY")){d=!0;break}d||t.defines.push("IMAGERY"),this._applyAlpha&&t.defines.push("APPLY_ALPHA"),t.defines.push("TEXTURE_UNITS "+r),""!=i&&t.defines.push(i),""!=n&&t.defines.push(n),t.defines.push("GRIDTEXTURE_UNITS 0")}},_0x38aae9.prototype._refreshImageryShader=function(){for(var e=this._layer,t=this._sp.fragmentShaderSource.clone(),i=this._sp.vertexShaderSource.clone(),n=0;n<t.defines.length;n++)if(t.defines[n].includes("GRIDTEXTURE_UNITS")){t.defines.splice(n,1);break}for(n=0;n<t.defines.length;n++)if(t.defines[n].includes("TEXTURE_UNITS")){t.defines.splice(n,1);break}for(n=0;n<t.defines.length;n++)if(t.defines[n].includes("APPLY_ALPHA")){t.defines.splice(n,1);break}for(n=0;n<t.sources.length;n++)if(t.sources[n].includes("czm_sampleAndBlend")){t.sources.splice(n,1);break}this._createImageryShader(e,t);var r=!1;for(n=0;n<i.defines.length;n++)if(i.defines[n].includes("IMAGERY")){r=!0;break}r||i.defines.push("IMAGERY");var o=this._sp._attributeLocations;this._sp=this._sp&&this._sp.destroy();var a=p$15.fromCache({context:e._context,vertexShaderSource:i,fragmentShaderSource:t,attributeLocations:o});this._sp=a,t$$(this._colorCommand)&&(this._colorCommand.shaderProgram=a)};var _0x579378=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x49ea6c=_0x579378(void 0,(function(){return _0x49ea6c.toString().search("(((.+)+)+)+$").toString().constructor(_0x49ea6c).search("(((.+)+)+)+$")}));function _0x1af262(){}function _0x57b052(e){var t=new c$19,i=e.instanceBounds;if(!t$$(i))return t;var n=new a$11(i[0],i[1],i[2]),r=new a$11(i[3],i[4],i[5]),o=a$11.lerp(n,r,.5,new a$11),a=a$11.distance(o,n);return t.center=o,t.radius=a,t}function _0x2bdca2(e){var t,i,n=new c$19,r=new a$11,o=e.vertexAttributes[0],a=o.componentsPerAttribute,s=t$$(e.nCompressOptions)&&(e.nCompressOptions&_0x107fdf.SVC_Vertex)===_0x107fdf.SVC_Vertex,l=1;s?(l=e.vertCompressConstant,t=new a$11(e.minVerticesValue.x,e.minVerticesValue.y,e.minVerticesValue.z),i=new Uint16Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/2)):i=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4);for(var u=[],c=0;c<e.verticesCount;c++)a$11.fromArray(i,a*c,r),s&&(r=a$11.multiplyByScalar(r,l,r),r=a$11.add(r,t,r)),u.push(a$11.clone(r));return c$19.fromPoints(u,n),u.length=0,n}function _0x3e65a4(e){var t,i,n=new c$19,r=new a$11,o=t$$(e.nCompressOptions)&&(e.nCompressOptions&_0x107fdf.SVC_Vertex)===_0x107fdf.SVC_Vertex,a=e.vertexAttributes[0],s=a.componentsPerAttribute,l=1;o?(l=e.vertCompressConstant,i=new a$11(e.minVerticesValue.x,e.minVerticesValue.y,e.minVerticesValue.z),t=new Uint16Array(a.typedArray.buffer,a.typedArray.byteOffset,a.typedArray.byteLength/2)):t=new Float32Array(a.typedArray.buffer,a.typedArray.byteOffset,a.typedArray.byteLength/4);for(var u=[],c=0;c<e.verticesCount;c++)a$11.fromArray(t,s*c,r),o&&(r=a$11.multiplyByScalar(r,l,r),r=a$11.add(r,i,r)),u.push(a$11.clone(r));return c$19.fromPoints(u,n),u.length=0,n}function _0x3aeba1(e){var t,i,n=t$$(e.nCompressOptions)&&(e.nCompressOptions&_0x107fdf.SVC_Vertex)===_0x107fdf.SVC_Vertex,r=new n$13,o=e.vertexAttributes[0],a=o.componentsPerAttribute,s=1;n?(s=e.vertCompressConstant,i=new a$11(e.minVerticesValue.x,e.minVerticesValue.y,e.minVerticesValue.z),t=new Uint16Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/2)):t=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4);for(var l=[],u=0;u<e.verticesCount;u++){var c=t[a*u],h=t[a*u+1];n&&(c=s*c+i.x,h=s*h+i.y),l.push(new r$T(c,h))}return n$13.fromPoints(l,r),l.length=0,r}function _0x280d73(e){var t,i,n=t$$(e.nCompressOptions)&&(e.nCompressOptions&_0x107fdf.SVC_Vertex)===_0x107fdf.SVC_Vertex,r=new c$19,o=new a$11,a=new a$11,s=e.vertexAttributes[0],l=s.componentsPerAttribute,u=e.attrLocation.aPosition,c=e.vertexAttributes[u],h=e.attrLocation.aTexCoord5,d=e.vertexAttributes[h],f=d.componentsPerAttribute;n?(l=3,f=3,t=_0x1486a9(e,c),i=_0x534f32(e,d,5)):(t=new Float32Array(s.typedArray.buffer,s.typedArray.byteOffset,s.typedArray.byteLength/4),i=new Float32Array(d.typedArray.buffer,d.typedArray.byteOffset,d.typedArray.byteLength/4));for(var p=[],_=0;_<e.verticesCount;_++)a$11.fromArray(t,l*_,o),a$11.fromArray(i,f*_,a),a$11.add(o,a,o),p.push(a$11.clone(o));return c$19.fromPoints(p,r),p.length=0,r}function _0x12cc0f(e){var t=H$11.TRIANGLES;switch(e){case 1:t=H$11.POINTS;break;case 2:t=H$11.LINES;break;case 3:t=H$11.LINE_STRIP;break;case 4:t=H$11.TRIANGLES}return t}function _0x3a7df9(e,t,i,n){var r,o={};o.indicesCount=6*(e-t),o.indexType=n>65535?1:0,o.primitiveType=H$11.TRIANGLES,r=0===o.indexType?new Uint16Array(o.indicesCount):new Uint32Array(o.indicesCount);for(var a=0,s=0;s<t;s++){for(var l=0;l<i[s]-1;l++)r[6*(a-s+l)]=4*(a-s+l),r[6*(a-s+l)+1]=4*(a-s+l)+2,r[6*(a-s+l)+2]=4*(a-s+l)+1,r[6*(a-s+l)+3]=4*(a-s+l)+1,r[6*(a-s+l)+4]=4*(a-s+l)+2,r[6*(a-s+l)+5]=4*(a-s+l)+3;a+=i[s]}return o.indicesTypedArray=r,o}function _0x1486a9(e,t){for(var i,n,r,o=t.componentsPerAttribute,a=e.vertCompressConstant,s=new a$11(e.minVerticesValue.x,e.minVerticesValue.y,e.minVerticesValue.z),l=new Uint16Array(t.typedArray.buffer,t.typedArray.byteOffset,t.typedArray.byteLength/2),u=new Float32Array(3*e.verticesCount),c=0;c<e.verticesCount;c++)i=l[o*c]*a+s.x,n=l[o*c+1]*a+s.y,r=l[o*c+2]*a+s.z,u[3*c]=i,u[3*c+1]=n,u[3*c+2]=r;return u}function _0x534f32(e,t,i){for(var n,r,o,a=t.componentsPerAttribute,s=e.texCoordCompressConstant[i],l=new a$10(e.minTexCoordValue[i].x,e.minTexCoordValue[i].y,e.minTexCoordValue[i].z,e.minTexCoordValue[i].w),u=new Uint16Array(t.typedArray.buffer,t.typedArray.byteOffset,t.typedArray.byteLength/2),c=new Float32Array(3*e.verticesCount),h=0;h<e.verticesCount;h++)n=u[a*h]*s+l.x,r=u[a*h+1]*s+l.y,o=u[a*h+2]*s+l.z,c[3*h]=n,c[3*h+1]=r,c[3*h+2]=o;return c}function _0x1d6e0c(e){for(var t=[],i=e.length,n=0;n<i;n++){var r=_0x12cc0f(e[n].primitiveType);(r===H$11.LINES||r===H$11.LINE_STRIP)&&t.push(e[n])}return t}function _0x5e1ab6(e){for(var t=0,i=e.length,n=0;n<i;n++){var r=e[n],o=_0x12cc0f(r.primitiveType);o==H$11.LINES?t+=r.indicesCount/2:o==H$11.LINE_STRIP&&t++}return t}function _0x4a3294(e){for(var t=0,i=e.length,n=0;n<i;n++){t+=e[n].indicesCount}return t}function _0x5dd7a4(e,t,i){for(var n,r=[],o=i.length,a=0;a<o;a++){var s,l=i[a];s=0===l.indexType?new Uint16Array(l.indicesTypedArray.buffer,l.indicesTypedArray.byteOffset,l.indicesTypedArray.byteLength/2):new Uint32Array(l.indicesTypedArray.buffer,l.indicesTypedArray.byteOffset,l.indicesTypedArray.byteLength/4);var u=_0x12cc0f(l.primitiveType);if(u==H$11.LINES)for(n=0;n<l.indicesCount;n+=2){var c=[],h=new a$11;h.x=e[s[n]*t],h.y=e[s[n]*t+1],h.z=e[s[n]*t+2],c.push(h);var d=new a$11;d.x=e[s[n+1]*t],d.y=e[s[n+1]*t+1],d.z=e[s[n+1]*t+2],c.push(d),r.push(c)}else if(u==H$11.LINE_STRIP){c=[];for(n=0;n<l.indicesCount;n++){var f=new a$11;f.x=e[s[n]*t],f.y=e[s[n]*t+1],f.z=e[s[n]*t+2],c.push(f)}r.push(c)}}return r}_0x49ea6c(),_0x1af262.calcBoundingSphereInWorker=function(e,t){return t.instanceIndex>-1?_0x57b052(t):t$$(t.clampRegionEdge)?_0x280d73(t):e>=c$q.ClampGroundPolygon&&e<=c$q.ClampObjectLine?_0x3e65a4(t):e==c$q.ClampGroundAndObjectLineCache?_0x280d73(t):_0x2bdca2(t)},_0x1af262.calcBoundingSphere=function(e,t,i){var n,r=e._fileType;return n=t.instanceIndex>-1?_0x57b052(t):t$$(t.clampRegionEdge)?_0x280d73(t):r>=c$q.ClampGroundPolygon&&r<=c$q.ClampObjectLine?_0x3e65a4(t):r==c$q.ClampGroundAndObjectLineCache?_0x280d73(t):_0x2bdca2(t),c$19.transform(n,i,n),n},_0x1af262.calcBoundingRectangle=function(e,t){var i;return e._fileType===c$q.ClampGroundPolygon&&(i=_0x3aeba1(t)),i},_0x1af262.createEdge=function(e,t){if(!(t.length<1)){var i=_0x1d6e0c(t);if(0!=i.length){var n,r=_0x5e1ab6(i),o=e.attrLocation.aPosition,a=e.vertexAttributes[o],s=t$$(e.nCompressOptions)&&(e.nCompressOptions&_0x107fdf.SVC_Vertex)===_0x107fdf.SVC_Vertex,l=a.componentsPerAttribute;s?(l=3,n=_0x1486a9(e,a)):n=new Float32Array(a.typedArray.buffer,a.typedArray.byteOffset,a.typedArray.byteLength/4);for(var u=_0x4a3294(i),c=_0x5dd7a4(n,l,i),h=4*u-4*r,d=new Float32Array(3*h),f=new Float32Array(3*h),p=new Float32Array(3*h),_=new Int8Array(2*h),m=0,$=0;$<r;$++){for(var g=c[$].length,y=0;y<g;y++){var v=4*m-4*$,x=3*v+12*y,b=c[$][y];0!=y&&(d[x-6]=b.x,d[x-5]=b.y,d[x-4]=b.z,d[x-3]=b.x,d[x-2]=b.y,d[x-1]=b.z),y!=g-1&&(d[x]=b.x,d[x+1]=b.y,d[x+2]=b.z,d[x+3]=b.x,d[x+4]=b.y,d[x+5]=b.z);var S=b;y+1<g&&(S=c[$][y+1]),0!=y&&(p[x-6]=S.x,p[x-5]=S.y,p[x-4]=S.z,p[x-3]=S.x,p[x-2]=S.y,p[x-1]=S.z),y!=g-1&&(p[x]=S.x,p[x+1]=S.y,p[x+2]=S.z,p[x+3]=S.x,p[x+4]=S.y,p[x+5]=S.z);var w=b;y>=1&&(w=c[$][y-1]),0!=y&&(f[x-6]=w.x,f[x-5]=w.y,f[x-4]=w.z,f[x-3]=w.x,f[x-2]=w.y,f[x-1]=w.z),y!=g-1&&(f[x]=w.x,f[x+1]=w.y,f[x+2]=w.z,f[x+3]=w.x,f[x+4]=w.y,f[x+5]=w.z),x=2*v+8*y,0!=y&&(_[x-4]=-1,_[x-3]=-1,_[x-2]=1,_[x-1]=-1),y!=g-1&&(_[x]=-1,_[x+1]=1,_[x+2]=1,_[x+3]=1)}m+=c[$].length}var C={vertexAttributes:[],attrLocation:{}},T=C.vertexAttributes,P=C.attrLocation;C.instanceCount=0,C.instanceMode=0,P.aPosition=0,T.push({index:P.aPosition,typedArray:d,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),P.aNormal=1,T.push({index:P.aNormal,typedArray:f,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),P.aTexCoord0=2,T.push({index:P.aTexCoord0,typedArray:p,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),P.aTexCoord1=3,T.push({index:P.aTexCoord1,typedArray:_,componentsPerAttribute:2,componentDatatype:C$12.BYTE,offsetInBytes:0,strideInBytes:2*Int8Array.BYTES_PER_ELEMENT,normalize:!1});for(var E=[],A=0;A<c.length;A++)E.push(c[A].length);return{vertexPackage:C,indexPackage:_0x3a7df9(u,r,E,h)}}}};var _0x252638=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x32e40b=_0x252638(void 0,(function(){return _0x32e40b.toString().search("(((.+)+)+)+$").toString().constructor(_0x32e40b).search("(((.+)+)+)+$")}));function _0x4f5be5(){}_0x32e40b(),Object.defineProperties(_0x4f5be5.prototype,{});var _0x308352=new e$1z,_0x61df56=e$1z.WHITE,_0x8c68ad=void 0,_0x44b743=600;function _0x3551b3(e,t){var i=[];for(var n in e)if(e.hasOwnProperty(n)&&"0"!==n){var r=new _0x15900a(this,n);Object.assign(r,t._layerScheduler._attributes[n]);var o=e[n];Array.isArray(o)||(o=[o]);for(var a=0,s=o.length;a<s;a++)r.addVertexOffset(o[a].vertexColorCount,o[a].vertexColorOffset);i.push(r)}return i}function _0x4f1266(e,t){for(var i=t.length,n=!1,r=0;r<i&&!n;r++)for(var o=t[r],a=o.span,s=0;s<a.length;s++){var l=a[s],u=l.vertexOffset,c=l.vertexOffset+l.vertexCount;if(e>=u&&e<c){o.indexValue.push(e),n=!0;break}}}function _0x39ac6e(e,t){if(1!=t.length){var i=0,n=e.indicesCount,r=0===e.indexType?Uint16Array:Uint32Array,o=new r(e.indicesTypedArray.buffer,e.indicesTypedArray.byteOffset,n);for(i=0;i<n;i++){_0x4f1266(o[i],t)}for(i=0;i<t.length;i++){var a,s=t[i],l=s.indexValue.length;a=new r(l);for(var u=0;u<l;u++)a[u]=s.indexValue[u];s.indexPackage={indexType:e.indexType,indicesCount:l,indicesTypedArray:a,materialCode:e.materialCode,primitiveType:e.primitiveType}}}else t[0].indexPackage=e}function _0x47e7f7(e){for(var t=e._array,i=0;i<t.length;i++){var n=t[i],r=n.batchFeatures;if(t$$(r)&&!(r.length<1))for(var o=0;o<r.length;o++){var a=r[o];n.span=n.span.concat(a.getVertexOffset())}}}if(_0x4f5be5.createRenderEntityPageLOD=function(e,t){var i=t.themeStyle,n=e.pickInfo,r=e.arrIndexPackage;if(this._fileType===c$q.Text&&this.createBillboardsBounds(),!t$$(i)||!t$$(n))return[new _0x38aae9(e)];if(t$$(i.image)){for(var o=_0x3551b3(n,t),a=new e$1F,s=0;s<o.length;s++){var l=o[s],u=t$$(i.color)?i.color.evaluateColor(l,_0x308352):_0x61df56,c=t$$(i.image)?i.image.evaluate(l):_0x8c68ad,h=t$$(i.imageRepeatX)?i.imageRepeatX.evaluate(l):_0x44b743,d=t$$(i.imageRepeatY)?i.imageRepeatY.evaluate(l):_0x44b743;t$$(h)||(h=_0x44b743),t$$(d)||(d=_0x44b743);var f=new r$T(h,d);l.color=u,l.imageUrl=c;var p=l.getRenderBatchKey();if(!a.contains(p)){var _=new e$1z;_=e$1z.clone(u),a.set(p,{color:_,imageUrl:c,imageRepeat:f,batchFeatures:[],span:[],indexValue:[]})}a.get(p).batchFeatures.push(l)}var m=a._array;_0x47e7f7(a),_0x39ac6e(r[0],m);for(var $=[],g=0;g<m.length;g++){e.symbolTextureUrl=m[g].imageUrl,e.symbolColor=m[g].color,e.arrIndexPackage=[m[g].indexPackage],e.symbolTextureRepeat=m[g].imageRepeat;var y=new _0x38aae9(e);$.push(y)}return $}},typeof WebAssembly<"u"){let e=function(e){return n$u.locateFile?n$u.locateFile(e,p$q):p$q+e},t=function(e,t){e||I("Assertion failed: "+t)},i=function(e){var i=n$u["_"+e];return t(i,"Cannot call unknown function "+e+", make sure it is exported"),i},n=function(e,t,n,r,o){var s={string:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);t=rn$2(i),l(e,t,i)}return t},array:function(e){var t=rn$2(e.length);return u(e,t),t}};var c=i(e),h=[],d=0;if(r)for(var f=0;f<r.length;f++){var p=s[n[f]];p?(0===d&&(d=Nn$1()),h[f]=p(r[f])):h[f]=r[f]}var _=c.apply(null,h);return _=function(e){return"string"===t?a(e):"boolean"===t?Boolean(e):e}(_),0!==d&&Gn$1(d),_},r=function(e,t,r,o){var a=(r=r||[]).every((function(e){return"number"===e}));return"string"!==t&&a&&!o?i(e):function(){return n(e,t,r,arguments)}},o=function(e,t,i){for(var n=t+i,r=t;e[r]&&!(r>=n);)++r;if(r-t>16&&e.subarray&&J$o)return J$o.decode(e.subarray(t,r));for(var o="";t<r;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var l=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|l:(7&a)<<18|s<<12|l<<6|63&e[t++])<65536)o+=String.fromCharCode(a);else{var u=a-65536;o+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o},a=function(e,t){return e?o(k$r,e,t):""},s=function(e,t,i,n){if(!(n>0))return 0;for(var r=i,o=i+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a);if(s<=127){if(i>=o)break;t[i++]=s}else if(s<=2047){if(i+1>=o)break;t[i++]=192|s>>6,t[i++]=128|63&s}else if(s<=65535){if(i+2>=o)break;t[i++]=224|s>>12,t[i++]=128|s>>6&63,t[i++]=128|63&s}else{if(i+3>=o)break;t[i++]=240|s>>18,t[i++]=128|s>>12&63,t[i++]=128|s>>6&63,t[i++]=128|63&s}}return t[i]=0,i-r},l=function(e,t,i){return s(e,k$r,t,i)},u=function(e,t){U$o.set(e,t)},c=function(e,t){return e%t>0&&(e+=t-e%t),e},h=function(){n$u.HEAP8=U$o=new Int8Array(s$m),n$u.HEAP16=new Int16Array(s$m),n$u.HEAP32=q$r=new Int32Array(s$m),n$u.HEAPU8=k$r=new Uint8Array(s$m),n$u.HEAPU16=new Uint16Array(s$m),n$u.HEAPU32=new Uint32Array(s$m),n$u.HEAPF32=new Float32Array(s$m),n$u.HEAPF64=new Float64Array(s$m)},d=function(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?n$u.dynCall_v(i):n$u.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}},f=function(){if(n$u.preRun)for("function"==typeof n$u.preRun&&(n$u.preRun=[n$u.preRun]);n$u.preRun.length;)$(n$u.preRun.shift());d(Z$n)},p=function(){nn$2||(nn$2=!0,d(Hn$1))},_=function(){d(Ln$1)},m=function(){if(n$u.postRun)for("function"==typeof n$u.postRun&&(n$u.postRun=[n$u.postRun]);n$u.postRun.length;)g(n$u.postRun.shift());d($$k)},$=function(e){Z$n.unshift(e)},g=function(e){$$k.unshift(e)},y=function(e){h$t++,n$u.monitorRunDependencies&&n$u.monitorRunDependencies(h$t)},v=function(e){if(h$t--,n$u.monitorRunDependencies&&n$u.monitorRunDependencies(h$t),0==h$t&&(null!==D$w&&(clearInterval(D$w),D$w=null),T$s)){var t=T$s;T$s=null,t()}},x=function(e){return String.prototype.startsWith?e.startsWith(en$3):0===e.indexOf(en$3)},b=function(){try{if(n$u.wasmBinary)return new Uint8Array(n$u.wasmBinary);if(n$u.readBinary)return n$u.readBinary(m$p);throw"both async and sync fetching of the wasm failed"}catch(e){I(e)}},S=function(){return n$u.wasmBinary||!R$k&&!v$t||"function"!=typeof fetch?new Promise((function(e,t){e(b())})):fetch(m$p,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+m$p+"'";return e.arrayBuffer()})).catch((function(){return b()}))},w=function(e){var t={env:e,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:In$1};function i(e,t){var i=e.exports;n$u.asm=i,v()}function n(e){i(e.instance)}function r(e){return S().then((function(e){return WebAssembly.instantiate(e,t)})).then(e,(function(e){}))}if(y(),n$u.instantiateWasm)try{return n$u.instantiateWasm(t,i)}catch{return!1}return function(){if(n$u.wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||x(m$p)||"function"!=typeof fetch)return r(n);fetch(m$p,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(n,(function(e){r(n)}))}))}(),{}},C=function(){return U$o.length},T=function(e){return n$u.___errno_location&&(q$r[n$u.___errno_location()>>2]=e),e},P=function(e){I("OOM")},E=function(e){e=c(e,65536);var t=s$m.byteLength;try{return-1!==_$o.grow((e-t)/65536)&&(s$m=_$o.buffer,!0)}catch{return!1}},A=function(e){var t=C(),i=65536,n=2147418112;if(e>n)return!1;for(var r=Math.max(t,16777216);r<e;)r=r<=536870912?c(2*r,i):Math.min(c((3*r+2147483648)/4,i),n);return!!E(r)&&(h(),!0)},L=function(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e},M=function(e){function t(){n$u.calledRun||(n$u.calledRun=!0,!Y$r&&(p(),_(),n$u.onRuntimeInitialized&&n$u.onRuntimeInitialized(),m()))}e=e||n$u.arguments,h$t>0||(f(),h$t>0)||n$u.calledRun||(n$u.setStatus?(n$u.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n$u.setStatus("")}),1),t()}),1)):t())},I=function(e){n$u.onAbort&&n$u.onAbort(e),e=void 0!==e?'"'+e+'"':"",Y$r=!0};var n$u=typeof n$u<"u"?n$u:{},A$w={},y$s;for(y$s in n$u)n$u.hasOwnProperty(y$s)&&(A$w[y$s]=n$u[y$s]);n$u.arguments=[],n$u.thisProgram="./this.program",n$u.quit=function(e,t){throw t},n$u.preRun=[],n$u.postRun=[];var R$k=!1,v$t=!1,P$j=!1,X$g=!1,K$j=!1;R$k="object"==typeof window,v$t="function"==typeof importScripts,X$g="object"==typeof process&&"function"==typeof require,P$j=X$g&&!R$k&&!v$t,K$j=!R$k&&!P$j&&!v$t;var p$q="",W$p,O$m;if(P$j)p$q=__dirname+"/",n$u.read=function(e,t){var i;return W$p||(W$p=require("fs")),O$m||(O$m=require("path")),e=O$m.normalize(e),i=W$p.readFileSync(e),t?i:i.toString()},n$u.readBinary=function(e){var i=n$u.read(e,!0);return i.buffer||(i=new Uint8Array(i)),t(i.buffer),i},process.argv.length>1&&(n$u.thisProgram=process.argv[1].replace(/\\/g,"/")),n$u.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=n$u),process.on("uncaughtException",(function(e){if(!(e instanceof L))throw e})),process.on("unhandledRejection",I),n$u.quit=function(e){process.exit(e)},n$u.inspect=function(){return"[Emscripten Module object]"};else K$j?(typeof read<"u"&&(n$u.read=function(e){return read(e)}),n$u.readBinary=function(e){var i;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(i=read(e,"binary"),t("object"==typeof i),i)},typeof scriptArgs<"u"?n$u.arguments=scriptArgs:typeof arguments<"u"&&(n$u.arguments=arguments),"function"==typeof quit&&(n$u.quit=function(e){quit(e)})):(R$k||v$t)&&(v$t?p$q=self.location.href:document.currentScript&&(p$q=document.currentScript.src),p$q=0!==p$q.indexOf("blob:")?p$q.substr(0,p$q.lastIndexOf("/")+1):"",n$u.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},v$t&&(n$u.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),n$u.readAsync=function(e,t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)},n$u.setWindowTitle=function(e){document.title=e});var Cn=n$u.print||(typeof console<"u"?console.log.bind(console):typeof print<"u"?print:null),Mn$1=n$u.printErr||(typeof printErr<"u"?printErr:typeof console<"u"&&console.warn.bind(console)||Cn);for(y$s in A$w)A$w.hasOwnProperty(y$s)&&(n$u[y$s]=A$w[y$s]);A$w=void 0;var In$1={"f64-rem":function(e,t){return e%t},debugger:function(){}};new Array(0);var _$o,Y$r=!1,J$o=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;typeof TextDecoder<"u"&&new TextDecoder("utf-16le");var Pn$1=65536,s$m,U$o,k$r,q$r,Dn$1=5246e3,Q$l=3088,V$l=5242880,C$s=n$u.TOTAL_MEMORY||16777216;C$s<V$l&&Mn$1("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+C$s+"! (TOTAL_STACK="+V$l+")"),n$u.buffer?s$m=n$u.buffer:"object"==typeof WebAssembly&&"function"==typeof WebAssembly.Memory?(_$o=new WebAssembly.Memory({initial:C$s/Pn$1}),s$m=_$o.buffer):s$m=new ArrayBuffer(C$s),h(),q$r[Q$l>>2]=Dn$1;var Z$n=[],Hn$1=[],Ln$1=[],$$k=[],nn$2=!1,h$t=0,D$w=null,T$s=null;n$u.preloadedImages={},n$u.preloadedAudios={};var en$3="data:application/octet-stream;base64,",m$p,Fn$1=typeof window>"u"?self:window;m$p=Fn$1.location.href.endsWith(".openrealspace")?"../../static/Build/Cesium/ThirdParty/Module.wasm":"ThirdParty/Module.wasm",x(m$p)||(m$p=e(m$p)),n$u.asm=function(e,t,i){return t.memory=_$o,t.table=new WebAssembly.Table({initial:23,maximum:23,element:"anyfunc"}),t.__memory_base=1024,t.__table_base=0,w(t)};var jn$1={},zn$1={b:I,c:T,f:C,e:A,d:P,a:Q$l},tn$2=n$u.asm(jn$1,zn$1,s$m);n$u.asm=tn$2,n$u.___errno_location=function(){return n$u.asm.g.apply(null,arguments)},n$u._floatToTextureColor=function(){return n$u.asm.h.apply(null,arguments)},n$u._free=function(){return n$u.asm.i.apply(null,arguments)},n$u._free_result=function(){return n$u.asm.j.apply(null,arguments)},n$u._malloc=function(){return n$u.asm.k.apply(null,arguments)};var rn$2=n$u.stackAlloc=function(){return n$u.asm.n.apply(null,arguments)},Gn$1=n$u.stackRestore=function(){return n$u.asm.o.apply(null,arguments)},Nn$1=n$u.stackSave=function(){return n$u.asm.p.apply(null,arguments)};if(n$u.dynCall_v=function(){return n$u.asm.l.apply(null,arguments)},n$u.dynCall_vi=function(){return n$u.asm.m.apply(null,arguments)},n$u.asm=tn$2,n$u.cwrap=r,L.prototype=new Error,L.prototype.constructor=L,T$s=function e(){n$u.calledRun||M(),n$u.calledRun||(T$s=e)},n$u.run=M,n$u.abort=I,n$u.preInit)for("function"==typeof n$u.preInit&&(n$u.preInit=[n$u.preInit]);n$u.preInit.length>0;)n$u.preInit.pop()();n$u.noExitRuntime=!0,M()}else var n$u=null;var _0x4c1f6f=n$u,Ke$5="uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\ngl_FragColor = texture2D(u_texture, v_textureCoordinates);\n}\n",Ve$b="attribute vec4 position;\nattribute float webMercatorT;\nuniform vec2 u_textureDimensions;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nv_textureCoordinates = vec2(position.x, webMercatorT);\ngl_Position = czm_viewportOrthographic * (position * vec4(u_textureDimensions, 1.0, 1.0));\n}\n",e$B={LEFT:-1,BOTTOM:-1,NONE:0,RIGHT:1,TOP:1},Xe$4=Object.freeze(e$B);function h$s(e,t,i,n){this.readyImagery=void 0,this.loadingImagery=e,this.textureCoordinateRectangle=t,this.textureTranslationAndScale=void 0,this.useWebMercatorT=i,this.flipY=n,this.imageryLayer=void 0,this.morphingAlpha=void 0}h$s.prototype.freeResources=function(){t$$(this.readyImagery)&&this.readyImagery.releaseReference(),t$$(this.loadingImagery)&&this.loadingImagery.releaseReference()},h$s.prototype.processStateMachine=function(e,t,i){var n=this.loadingImagery,r=n.imageryLayer;if(n.processStateMachine(t,!this.useWebMercatorT,i),n.state===Tt$4.READY)return t$$(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=this.loadingImagery,this.loadingImagery=void 0,this.textureTranslationAndScale=r._calculateTextureTranslationAndScale(e,this),this.morphingBeginTime=performance.now(),!0;for(var o,a=n.parent;t$$(a)&&(a.state!==Tt$4.READY||!this.useWebMercatorT&&!t$$(a.texture));)a.state!==Tt$4.FAILED&&a.state!==Tt$4.INVALID&&(o=o||a),a=a.parent;return this.readyImagery!==a&&(t$$(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=a,t$$(a)&&(a.addReference(),this.textureTranslationAndScale=r._calculateTextureTranslationAndScale(e,this))),(n.state===Tt$4.FAILED||n.state===Tt$4.INVALID)&&(t$$(o)?(o.processStateMachine(t,!this.useWebMercatorT,i),!1):(n.imageryLayer&&!1===n.imageryLayer.enableUpsample&&(this.discard=!0),!0))};const _0x246b4c=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xc9da3c=_0x246b4c(void 0,(function(){return _0xc9da3c.toString().search("(((.+)+)+)+$").toString().constructor(_0xc9da3c).search("(((.+)+)+)+$")}));function BillboardCollectionPool(e,t){this._use=[],this._unUse=[],this._owner=t,this._scene=e.scene,this._showCallout=e$1Y(e.showCallout,!1)}function i$r(e){if(!t$$(e.provider))throw new t$_("options.provder and options.viewer is required.");this._layerConfig=e.layerConfig,this._provider=e.provider,this._inner=e.layer,this._imagelayerCollection=e.imagelayerCollection,this._name=e.name,t$$(e.layerConfig)&&t$$(e.layerConfig.id)&&(this._name=e.layerConfig.id),this._style3D=e$1Y(e.style3D,new e$D),this._swipeEnabled=e$1Y(e.swipeEnabled,!1),this._billboardMode=e$1Y(e.billboardMode,Cr$2.None),this._labelDepthTestEnabled=e$1Y(e.labelDepthTestEnabled,!0),this._swipeRegion=e$1Y(e.swipeRegion,new n$13(0,0,1,1)),this._provider.enableMorphing=e$1Y(e.enableMorphing,!1),this._isTdt=!1,this._inner.swipeEnabled=this._swipeEnabled,this._inner.swipeRegion=this._swipeRegion,this._provider._style3D=this._style3D,this.labelSelected=new o$15,this._visibleViewport=4095,this._selectedColor=this._provider._selectedColor,this._overlapDisplayedThreshold=this._provider._overlapDisplayedThreshold,this._billboardCollectionPool=new BillboardCollectionPool(e,this),this._provider._billboardCollectionPool=this._billboardCollectionPool}function h$r(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),n$1e.typeOf.object("options.clock",e.clock),n$1e.typeOf.object("options.times",e.times),n$1e.typeOf.func("options.requestImageFunction",e.requestImageFunction),n$1e.typeOf.func("options.reloadFunction",e.reloadFunction),this._tileCache={},this._tilesRequestedForInterval=[];var t=this._clock=e.clock;this._times=e.times,this._requestImageFunction=e.requestImageFunction,this._reloadFunction=e.reloadFunction,this._currentIntervalIndex=-1,t.onTick.addEventListener(this._clockOnTick,this),this._clockOnTick(t)}function d$q(e,t,i){return e+"-"+t+"-"+i}function g$n(e){var t=e.split("-");if(3===t.length)return{x:Number(t[0]),y:Number(t[1]),level:Number(t[2])}}function k$q(e){var t=e._times;if(t$$(t)){var i=e._clock,n=i.currentTime,r=i.canAnimate&&i.shouldAnimate,o=i.multiplier;if(r||0===o){var a,s=t.indexOf(n);if(!(s<0)){var l=t.get(s);return o>0?(a=o$10.secondsDifference(l.stop,n),++s):(a=o$10.secondsDifference(l.start,n),--s),a/=o,s>=0&&a<=5?t.get(s):void 0}}}}function I$t(e,t,i){var n=e._times.indexOf(i.start),r=e._tileCache,o=r[n];t$$(o)||(o=r[n]={});var a=t.key;if(t$$(o[a]))return!0;var s=g$n(a),l=new r$V({throttle:!0,throttleByServer:!0,type:V$_.IMAGERY,priorityFunction:t.priorityFunction}),u=e._requestImageFunction(s.x,s.y,s.level,l,i);return!!t$$(u)&&(o[a]={promise:u,request:l},!0)}_0xc9da3c(),Object.defineProperties(BillboardCollectionPool.prototype,{showCallout:{get:function(){return!1},set:function(e){}},swipeRegion:{get:function(){return!1},set:function(e){}},swipeEnabled:{get:function(){return!1},set:function(e){}}}),BillboardCollectionPool.prototype.pushBack=function(e){let t=this._use.indexOf(e);-1!=t&&(this._use.splice(t,1),this._unUse.push(e))},BillboardCollectionPool.prototype.getOne=function(){let e;return this._unUse.length>0?(e=this._unUse[0],this._unUse.splice(0,1),this._use.push(e),e):(e=new O$t({scene:this._scene,style3D:this._owner._style3D,isMVT:!0,swipeEnabled:this._owner._swipeEnabled,swipeRegion:this._owner._swipeRegion,billboardMode:this._owner._billboardMode,depthTestEnable:!1}),e.showCallout=this._showCallout,this._use.push(e),e)},BillboardCollectionPool.prototype.setVisibleInViewport=function(e,t){},BillboardCollectionPool.prototype.getVisibleInViewport=function(e){return 0},BillboardCollectionPool.prototype.destroy=function(){for(var e=0;e<this._use.length;e++)this._use[e].destroy();for(e=0;e<this._unUse.length;e++)this._unUse[e].destroy();this._use=[],this._unUse=[]},Object.defineProperties(i$r.prototype,{detailLevelOffset:{get:function(){return this._inner._detailLevelOffset},set:function(e){t$$(e)&&"number"==typeof e&&(this._inner._detailLevelOffset=e)}},tileWidth:{get:function(){return this._provider._tileWidth}},tileHeight:{get:function(){return this._provider._tileHeight}},maximumLevel:{get:function(){return this._provider._ready?this._provider._maximumLevel:-1}},minimumLevel:{get:function(){return this._provider._ready?this._provider._minimumLevel:-1}},tilingScheme:{get:function(){return this._provider._tilingScheme}},rectangle:{get:function(){return this._provider._ready?this._provider._rectangle:null}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._provider._errorEvent}},ready:{get:function(){return this._provider._ready}},readyPromise:{get:function(){return this._provider.readyPromise}},hasAlphaChannel:{get:function(){return!0}},show:{get:function(){return this._inner.show},set:function(e){this._inner.show=e}},mapboxStyle:{get:function(){return this._provider instanceof M$10?this._provider._MVTStyle.serialize():this._provider.mapboxStyle},set:function(e){this._provider.mapboxStyle=e}},alpha:{get:function(){return this._inner.alpha},set:function(e){this._inner.alpha=e}},selectedColor:{get:function(){return this._provider._selectedColor},set:function(e){e instanceof e$1z&&(this._provider._selectedColor=e)}},overlapDisplayedThreshold:{get:function(){return this._provider._overlapDisplayedThreshold},set:function(e){n$1e.typeOf.number("vectortilesmap overlapDisplayedThreshold",e),this._provider._overlapDisplayedThreshold=e}},name:{get:function(){return this._name},set:function(e){this._name=e}},pausing:{get:function(){return this._inner._pausing},set:function(e){this._inner._pausing=e,this._provider._pausing=e}},indexedDBSetting:{get:function(){return this._provider._indexedDBSetting},set:function(e){t$$(e)&&"boolean"==typeof e.isOpen&&(this._provider._indexedDBSetting.isOpen=e.isOpen)}},layerConfig:{get:function(){return this._layerConfig}},selectEnabled:{get:function(){return this._selectEnabled},set:function(e){this._selectEnabled=e,this._provider._selectEnabled=e}},showCallout:{get:function(){return this._showCallout},set:function(e){this._billboardCollectionPool.showCallout=e}},style3D:{get:function(){return this._style3D},set:function(e){this._style3D=e,this._provider._style3D=this._style3D,this._billboardCollectionPool.style3D=this._style3D}},globalLineWidthExpand:{get:function(){return 0},set:function(e){}},globalLineWidthScale:{get:function(){return this._provider.globalLineWidthScale},set:function(e){e<=0&&(e=.01),e>100&&(e=100),this._provider.globalLineWidthScale=e}},lineAntialiasing:{get:function(){return this._provider.lineAntialiasing},set:function(e){this._provider.lineAntialiasing=e}},swipeRegion:{get:function(){return this._swipeRegion},set:function(e){if(!(t$$(e)&&e instanceof n$13))throw new t$_("Expected VectorTilesMap.swipeRegion to be type of BoundingRectangle.");n$13.equals(e,this._swipeRegion)||(n$13.clone(e,this._swipeRegion),this._billboardCollectionPool.swipeRegion=this._swipeRegion,this._inner.swipeRegion=this._swipeRegion)}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){n$1e.typeOf.bool("VectorTilesMap.swipeEnabled",e),e!==this._swipeEnabled&&(this._swipeEnabled=e,this._billboardCollectionPool.swipeEnabled=e,this._inner.swipeEnabled=this._swipeEnabled)}},isOverlapDisplayed:{get:function(){return this._provider.isOverlapDisplayed},set:function(e){this._provider.isOverlapDisplayed=e}},enableMorphing:{get:function(){return this._provider.enableMorphing},set:function(e){this._provider.enableMorphing=e}},queryTolerance:{get:function(){return this._provider.selectTolerance},set:function(e){this._provider.selectTolerance=e}},imageryLayer:{get:function(){return this._inner}}}),i$r.prototype.addLayer=function(e,t,i){this._provider._MVTStyle.addLayer(e,t,i)},i$r.prototype.removeLayer=function(e){this._provider._MVTStyle.removeLayer(e)},i$r.prototype.setFilter=function(e,t,i){if(!0===i){var n=[],r=this._provider._viewer.scene.camera.computeViewRectangle();if(t$$(r)){var o=s$1p.southwest(r),a=s$1p.southeast(r),s=s$1p.northeast(r),l=s$1p.northwest(r);n=this._provider.queryRenderedFeatures([o,a,s,l],{layers:[e.replace(/(.*)(_highlight)/,"$1")]});for(var u=["in","$id"],c=(t=_0xc53fd1.createFilter(t),0);c<n.length;c++){var h=n[c].feature;t(new _0x460d5e(0),h)&&u.push(h.id)}this.setFilter(e,u)}}else this._provider._currentPickID=void 0,this._provider._MVTStyle.setFilter(e,t)},i$r.prototype.getFilter=function(e){return this._provider._MVTStyle.getFilter(e)},i$r.prototype.setLayoutProperty=function(e,t,i,n){this._provider._MVTStyle.setLayoutProperty(e,t,i,n)},i$r.prototype.getLayoutProperty=function(e,t){return this._provider._MVTStyle.getLayoutProperty(e,t)},i$r.prototype.setPaintProperty=function(e,t,i,n){this._provider._MVTStyle.setPaintProperty(e,t,i,n)},i$r.prototype.getPaintProperty=function(e,t){return this._provider._MVTStyle.getPaintProperty(e,t)},i$r.prototype.queryRenderedFeatures=function(e,t){for(var i=[],n=0,r=e.length;n<r;n++){var o=e[n],a=i$1g.fromCartesian(o);i.push(a)}return this._provider.queryRenderedFeatures(i,t)},i$r.prototype.querySourceFeatures=function(e){return this._provider.querySourceFeatures(e)},i$r.prototype.update=function(e,t){},i$r.prototype.getProperty=function(e){return this._provider.getProperty(e)},i$r.prototype.setVisibleInViewport=function(e,t){t$$(this._inner)&&this._inner.setVisibleInViewport(e,t),this._billboardCollectionPool.setVisibleInViewport(e,t)},i$r.prototype.getVisibleInViewport=function(e){t$$(this._inner)&&this._inner.getVisibleInViewport(e),this._billboardCollectionPool.getVisibleInViewport(e)},i$r.prototype.refresh=function(){var e=this._inner._imageryCache;for(var t in e)e[t].isRendered=!1;for(var i of(this._imagelayerCollection.remove(this._inner,!0,!0),this._inner=this._imagelayerCollection.addImageryProvider(this._provider),this._provider.innerLayer=this._inner,this._provider._viewer.scene.layers.layerQueue))i._imageryLayer===this&&(i._removeCoverImageryLayer(),i.coverImageryLayer=this)},i$r.prototype.isDestroyed=function(){return!1},i$r.prototype.destroy=function(){return this._provider._billboardCollectionPool=null,t$$(this._billboardCollectionPool)&&(this._billboardCollectionPool.destroy(),this._billboardCollectionPool=null),this._imagelayerCollection.remove(this._inner,!0,!0),s$1e(this)},i$r.prototype.releaseSelection=function(){this._provider._MVTStyle.cancelHighLight(this._provider)},Object.defineProperties(h$r.prototype,{clock:{get:function(){return this._clock},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._clock!==e&&(this._clock=e,this._clockOnTick(e),this._reloadFunction())}},times:{get:function(){return this._times},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._times!==e&&(this._times=e,this._clockOnTick(this._clock),this._reloadFunction())}},currentInterval:{get:function(){return this._times.get(this._currentIntervalIndex)}}}),h$r.prototype.getFromCache=function(e,t,i,n){var r,o=d$q(e,t,i),a=this._tileCache[this._currentIntervalIndex];if(t$$(a)&&t$$(a[o])){var s=a[o];r=s.promise.otherwise((function(e){throw n.state=s.request.state,e})),delete a[o]}return r},h$r.prototype.checkApproachingInterval=function(e,t,i,n){var r=d$q(e,t,i),o=this._tilesRequestedForInterval,a=k$q(this),s={key:r,priorityFunction:n.priorityFunction};(!t$$(a)||!I$t(this,s,a))&&o.push(s),o.length>=512&&o.splice(0,256)},h$r.prototype._clockOnTick=function(e){var t=e.currentTime,i=this._times.indexOf(t),n=this._currentIntervalIndex;if(i!==n){var r=this._tileCache[n];for(var o in r)r.hasOwnProperty(o)&&r[o].request.cancel();return delete this._tileCache[n],this._tilesRequestedForInterval=[],this._currentIntervalIndex=i,void this._reloadFunction()}var a=k$q(this);if(t$$(a))for(var s=this._tilesRequestedForInterval,l=!0;l&&0!==s.length;){var u=s.pop();(l=I$t(this,u,a))||s.push(u)}};var I$s=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetTile"});function g$m(e){if(!t$$((e=e$1Y(e,e$1Y.EMPTY_OBJECT)).url))throw new t$_("options.url is required.");if(!t$$(e.layer))throw new t$_("options.layer is required.");if(!t$$(e.style))throw new t$_("options.style is required.");if(!t$$(e.tileMatrixSetID))throw new t$_("options.tileMatrixSetID is required.");if(t$$(e.times)&&!t$$(e.clock))throw new t$_("options.times was specified, so options.clock is required.");this._baseUrl=e.url;var t=t$X.createIfNeeded(e.url),i=e.style,n=e.tileMatrixSetID;if(t.url.indexOf("{")>=0){var r={style:i,Style:i,TileMatrixSet:n};t.setTemplateValues(r),t.setQueryParameters(I$s),this._useKvp=!1}else t.setQueryParameters(I$s),this._useKvp=!0;this._resource=t,this._layer=e.layer,this._style=i,this._tileMatrixSetID=n,this._tileMatrixLabels=e.tileMatrixLabels,this._format=e$1Y(e.format,"image/jpeg"),this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=t$$(e.tilingScheme)?e.tilingScheme:new o$Z({ellipsoid:e.ellipsoid}),this._tileWidth=e$1Y(e.tileWidth,256),this._tileHeight=e$1Y(e.tileHeight,256),this._minimumLevel=e$1Y(e.minimumLevel,0),this._maximumLevel=e.maximumLevel,this._rectangle=e$1Y(e.rectangle,this._tilingScheme.rectangle),this._dimensions=e.dimensions;var o=this;this._reload=void 0;var a=this._baseUrl;this.tablename=this._layer,new d$_({name:a}).then((function(e){e.checkObjectStoreExit(o.tablename)?o._indexedDBScheduler=e:e.createObjectStore(o.tablename).then((function(){o._indexedDBScheduler=e}))})),this._indexedDBSetting={isOpen:!1,clear:function(){o._indexedDBScheduler.clear(o.tablename)},cache:[]},t$$(e.times)&&(this._timeDynamicImagery=new h$r({clock:e.clock,times:e.times,requestImageFunction:function(e,t,i,n,r){return v$s(o,e,t,i,n,r)},reloadFunction:function(){t$$(o._reload)&&o._reload()}})),this._readyPromise=c$18.resolve(!0);var s=this._tilingScheme.positionToTileXY(s$1p.southwest(this._rectangle),this._minimumLevel),l=this._tilingScheme.positionToTileXY(s$1p.northeast(this._rectangle),this._minimumLevel);Math.abs(l.x-s.x),Math.abs(l.y-s.y),e$1Y(e.limitLevelZeroTilesCount,!0),this._errorEvent=new o$15;var u=e.credit;this._credit="string"==typeof u?new i$17(u):u,this._subdomains=e.subdomains,Array.isArray(this._subdomains)?this._subdomains=this._subdomains.slice():t$$(this._subdomains)&&this._subdomains.length>0?this._subdomains=this._subdomains.split(""):this._subdomains=["a","b","c"],this._customRequestHeaders=e.customRequestHeaders}function v$s(e,t,i,n,r,o){var a,s=e._tileMatrixLabels,l=t$$(s)?s[n]:n.toString(),u=e._subdomains,c=e._dimensions,h=t$$(o)?o.data:void 0,d={};if(e._useKvp)t$$(c)&&(d=s$1n(d,c)),t$$(h)&&(d=s$1n(d,h));else{var f={TileMatrix:l,TileRow:i.toString(),TileCol:t.toString(),s:u[(t+i+n)%u.length]};(a=e._resource.getDerivedResource({request:r})).setTemplateValues(f),t$$(c)&&a.setTemplateValues(c),t$$(h)&&a.setTemplateValues(h)}return d.tilematrix=l,d.layer=e._layer,d.style=e._style,d.tilerow=i,d.tilecol=t,d.tilematrixset=e._tileMatrixSetID,d.format=e._format,t$$(a)?a.setQueryParameters(d):a=e._resource.getDerivedResource({queryParameters:d,request:r}),t$$(a$R.CREDENTIAL)&&(t$$(a$R.CREDENTIAL._keymap[e._baseUrl])?a.url=a$R.addTokenWithKey(e._baseUrl,a.url):a.url=a$R.addToken(a.url)),F$o(e,a)}function K$i(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;e$1B(t,o)?e$1B(e,o)&&(a|=1):(a|=2,e$1B(e,o)||(a|=1)),n+=a}return n}Object.defineProperties(g$m.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},format:{get:function(){return this._format}},ready:{value:!0},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},dimensions:{get:function(){return this._dimensions},set:function(e){this._dimensions!==e&&(this._dimensions=e,t$$(this._reload)&&this._reload())}}}),g$m.prototype.getTileCredits=function(e,t,i){},g$m.prototype.requestImage=function(e,t,i,n){var r,o,a=this._timeDynamicImagery;if(t$$(a)&&(o=a.currentInterval,r=a.getFromCache(e,t,i,n)),n.quadKey=K$i(e,t,i),!0===this._indexedDBSetting.isOpen&&!t$$(r)&&!0===n.cacheEnable){if(t$$(this._indexedDBScheduler)){var s=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey);return t$$(s)?s.then((function(e){return t$$(e)?e:"cacheError"}),(function(e){return"cacheError"})):v$s(this,e,t,i,n,o)}return v$s(this,e,t,i,n,o)}return t$$(r)||(n.cacheEnable=!1,r=v$s(this,e,t,i,n,o)),t$$(r)&&t$$(a)&&a.checkApproachingInterval(e,t,i,n),r},g$m.prototype.pickFeatures=function(e,t,i,n,r){};var W$o=/\.ktx$/i,Y$q=/\.crn$/i,j$j=/\.dxtz$/i;function F$o(e,t){n$1e.defined("url",t);var i=t$X.createIfNeeded(t);return W$o.test(i.url)?k$L(i):Y$q.test(i.url)?I$W(i):j$j.test(i.url)?(e.flipY=!0,p$_(i)):t$$(e.tileDiscardPolicy)?i.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):(t$$(e._customRequestHeaders)&&(i.headers=s$1n(i.headers,e._customRequestHeaders)),!0===e._indexedDBSetting.isOpen?i.fetchBlob():i.fetchImage({preferImageBitmap:!0,flipY:!0}))}var X$f=new o$_("indexedDBWorker"),we$b=-1;function u$p(e,t){this._imageryProvider=e,t=e$1Y(t,{}),this.alpha=e$1Y(t.alpha,e$1Y(e.defaultAlpha,1)),this.brightness=e$1Y(t.brightness,e$1Y(e.defaultBrightness,u$p.DEFAULT_BRIGHTNESS)),this.contrast=e$1Y(t.contrast,e$1Y(e.defaultContrast,u$p.DEFAULT_CONTRAST)),this.hue=e$1Y(t.hue,e$1Y(e.defaultHue,u$p.DEFAULT_HUE)),this.saturation=e$1Y(t.saturation,e$1Y(e.defaultSaturation,u$p.DEFAULT_SATURATION)),this.gamma=e$1Y(t.gamma,e$1Y(e.defaultGamma,u$p.DEFAULT_GAMMA)),this.transparentBackColor=e$1Y(t.transparentBackColor,e$1Y(e.defaultTransparentBackColor,u$p.DEFAULT_TRANSPARENTBACKCOLOR)),this.transparentBackColorTolerance=e$1Y(t.transparentBackColorTolerance,e$1Y(e.defaultTransparentBackColorTolerance,u$p.DEFAULT_TRANSPARENTBACKCOLORTOLERANCE));var i=e$1Y(t.splitDirection,e$1Y(e.defaultSplit,u$p.DEFAULT_SPLIT)),n=e$1Y(t.splitDirection,e$1Y(e.defaultSplit,u$p.DEFAULT_SPLIT));this.splitDirection=new r$T(i,n),this.minificationFilter=e$1Y(t.minificationFilter,e$1Y(e.defaultMinificationFilter,u$p.DEFAULT_MINIFICATION_FILTER)),this.magnificationFilter=e$1Y(t.magnificationFilter,e$1Y(e.defaultMagnificationFilter,u$p.DEFAULT_MAGNIFICATION_FILTER)),this.show=e$1Y(t.show,!0),this._minimumTerrainLevel=t.minimumTerrainLevel,this._maximumTerrainLevel=t.maximumTerrainLevel,this._rectangle=e$1Y(t.rectangle,s$1p.MAX_VALUE),this._maximumAnisotropy=t.maximumAnisotropy,this._imageryCache={},this._skeletonPlaceholder=new h$s(n$v.createPlaceholder(this)),this._show=!0,this._layerIndex=-1,this._isBaseLayer=!1,this._requestImageError=void 0,this._reprojectComputeCommands=[],this.cutoutRectangle=t.cutoutRectangle,this._visibleViewport=4095,this.colorToAlpha=t.colorToAlpha,this._selectColor=new e$1z(0,0,1,1),this.colorToAlphaThreshold=e$1Y(t.colorToAlphaThreshold,u$p.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD),this._pausing=!1,t$$(e._indexedDBSetting)?this._indexedDBSetting=e._indexedDBSetting:this._indexedDBSetting={isOpen:!1},this._imageCanvas={},this._swipeRegion=new a$10(0,0,1,1),this._swipeEnabled=!1,this._lodOffset=0,this._detailLevelOffset=0,this._featherEdgesEnabled=!1,this._minHeight=Number.NEGATIVE_INFINITY,this._maxHeight=1/0,this._inVisibleHeightRange=1,this.enableUpsample=!0,this.enableImageryClip=!1}Object.defineProperties(u$p.prototype,{featherEdgesEnabled:{get:function(){return this._featherEdgesEnabled},set:function(e){t$$(e)&&"boolean"==typeof e&&(this._featherEdgesEnabled=e)}},lodOffset:{get:function(){return this._lodOffset},set:function(e){t$$(e)&&"number"==typeof e&&(this._lodOffset=e)}},imageryProvider:{get:function(){return this._imageryProvider}},rectangle:{get:function(){return this._rectangle}},indexedDBSetting:{get:function(){return this._indexedDBSetting},set:function(e){t$$(e)&&"boolean"==typeof e.isOpen&&(this._indexedDBSetting.isOpen=e.isOpen)}},swipeRegion:{get:function(){return new n$13(this._swipeRegion.x,this._swipeRegion.y,this._swipeRegion.z-this._swipeRegion.x,this._swipeRegion.w-this._swipeRegion.y)},set:function(e){if(t$$(e)){if(!(e instanceof n$13))throw new t$_("swipeRegion must be a instance of BoundingRectangle.");a$10.fromElements(e.x,e.y,e.x+e.width,e.y+e.height,this._swipeRegion)}}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){e!==this._swipeEnabled&&(e?r$T.fromElements(0,0,this.splitDirection):a$10.fromElements(0,0,1,1,this._swipeRegion),this._swipeEnabled=e)}},minHeight:{get:function(){return this._minHeight},set:function(e){this._minHeight=e}},maxHeight:{get:function(){return this._maxHeight},set:function(e){return this._maxHeight=e}}}),u$p.DEFAULT_BRIGHTNESS=1,u$p.DEFAULT_CONTRAST=1,u$p.DEFAULT_HUE=0,u$p.DEFAULT_SATURATION=1,u$p.DEFAULT_GAMMA=1,u$p.DEFAULT_TRANSPARENTBACKCOLOR=e$1z.BLACK,u$p.DEFAULT_TRANSPARENTBACKCOLORTOLERANCE=0,u$p.DEFAULT_SPLIT=Xe$4.NONE,u$p.DEFAULT_MINIFICATION_FILTER=tt$l.LINEAR,u$p.DEFAULT_MAGNIFICATION_FILTER=et$k.LINEAR,u$p.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD=.004,u$p.prototype.isBaseLayer=function(){return this._isBaseLayer&&!t$$(this._imageryProvider._scales)},u$p.prototype.isDestroyed=function(){return!1},u$p.prototype.destroy=function(){return s$1e(this)};var Te$g=new s$1p,xe$j=new s$1p,se$c=new s$1p,Ae$b=new s$1p;function Le$c(e,t,i){if(t$$(e._imageryProvider._indexedDBScheduler)){var n={blob:i,key:t.quadKey,tablename:e._imageryProvider.tablename,dbname:e._imageryProvider._indexedDBScheduler.dbname};X$f.scheduleTask(n,[])}}function be$h(e,t,i,n,r){var o=new DataView(e),a=0,s=o.getUint32(a,!0);if(t>s-1||s>256)throw new t$_("pack imagery index invalid");a+=4;var l,u,c=[];for(l=0;l<s;l++)u=o.getUint32(a,!0),c.push(u),a+=4;for(l=0;l<s;l++){if(u=c[l],l===t){if(0===u)return void(!0===i._indexedDBSetting.isOpen&&Le$c(i,n,we$b));if(!t$$(r)){var h=new Uint8Array(e,a,u);return new Uint8Array(h).buffer}return et$6({uint8Array:new Uint8Array(e,a,u),format:r,flipY:!0,layer:i,imagery:n})}a+=u}}u$p.prototype.getViewableRectangle=function(){var e=this._imageryProvider,t=this._rectangle;return e.readyPromise.then((function(){return s$1p.intersection(e.rectangle,t)}))},u$p.prototype._createTileImagerySkeletons=function(e,t,i){var n=e.data;if(t$$(this._minimumTerrainLevel)&&e.level<this._minimumTerrainLevel||t$$(this._maximumTerrainLevel)&&e.level>this._maximumTerrainLevel)return!1;var r=this._imageryProvider;if(t$$(i)||(i=n.imagery.length),!r.ready)return this._skeletonPlaceholder.loadingImagery.addReference(),n.imagery.splice(i,0,this._skeletonPlaceholder),!0;var o=r.tilingScheme.projection instanceof e$1H&&e.rectangle.north<e$1H.MaximumLatitude&&e.rectangle.south>-e$1H.MaximumLatitude,a=s$1p.intersection(r.rectangle,this._rectangle,Te$g),s=s$1p.intersection(e.rectangle,a,xe$j);if(!t$$(s)){if(!this.isBaseLayer())return!1;var l=a,u=e.rectangle;s=xe$j,u.south>=l.north?s.north=s.south=l.north:u.north<=l.south?s.north=s.south=l.south:(s.south=Math.max(u.south,l.south),s.north=Math.min(u.north,l.north)),u.west>=l.east?s.west=s.east=l.east:u.east<=l.west?s.west=s.east=l.west:(s.west=Math.max(u.west,l.west),s.east=Math.min(u.east,l.east))}var c=0;s.south>0?c=s.south:s.north<0&&(c=s.north);var h=nt$8(this,1*t.getLevelMaximumGeometricError(e.level),c,t$$(this._imageryProvider.resolution)?this._imageryProvider.resolution:1);h=Math.max(0,h);var d=r.maximumLevel;if(h>d&&(h=d),t$$(r.minimumLevel)&&!(r instanceof M$10)){var f=r.minimumLevel;h<f&&(h=f)}var p=r.tilingScheme,_=p.positionToTileXY(s$1p.northwest(s),h),m=p.positionToTileXY(s$1p.southeast(s),h),$=e.rectangle.width/512,g=e.rectangle.height/512,y=p.tileXYToRectangle(_.x,_.y,h);Math.abs(y.south-e.rectangle.north)<g&&_.y<m.y&&++_.y,Math.abs(y.east-e.rectangle.west)<$&&_.x<m.x&&++_.x;var v=p.tileXYToRectangle(m.x,m.y,h);Math.abs(v.north-e.rectangle.south)<g&&m.y>_.y&&--m.y,Math.abs(v.west-e.rectangle.east)<$&&m.x>_.x&&--m.x,y.east<r.rectangle.west&&++_.x,y.south>r.rectangle.north&&++_.y,v.west>r.rectangle.east&&--m.x,v.north<r.rectangle.south&&--m.y;var x,b=s$1p.clone(e.rectangle,Ae$b),S=p.tileXYToRectangle(_.x,_.y,h),w=s$1p.intersection(S,a,se$c);o?(p.rectangleToNativeRectangle(b,b),p.rectangleToNativeRectangle(S,S),p.rectangleToNativeRectangle(w,w),p.rectangleToNativeRectangle(a,a),x=p.tileXYToNativeRectangle.bind(p),$=b.width/512,g=b.height/512):x=p.tileXYToRectangle.bind(p);var C,T,P=0,E=1;!this.isBaseLayer()&&Math.abs(w.west-b.west)>=$&&(P=Math.min(1,(w.west-b.west)/b.width)),!this.isBaseLayer()&&Math.abs(w.north-b.north)>=g&&(E=Math.max(0,(w.north-b.south)/b.height));for(var A=E,L=e$1Y(this._imageryProvider.flipY,!1),M=_.x;M<=m.x;M++)if(C=P,S=x(M,_.y,h),t$$(w=s$1p.simpleIntersection(S,a,se$c))){P=Math.min(1,(w.east-b.west)/b.width),M===m.x&&(this.isBaseLayer()||Math.abs(w.east-b.east)<$)&&(P=1),E=A;for(var I=_.y;I<=m.y;I++)if(T=E,S=x(M,I,h),t$$(w=s$1p.simpleIntersection(S,a,se$c))){E=Math.max(0,(w.south-b.south)/b.height),I===m.y&&(this.isBaseLayer()||Math.abs(w.south-b.south)<g)&&(E=0);var O=new a$10(C,E,P,T),D=this.getImageryFromCache(M,I,h);if(n.imagery.splice(i,0,new h$s(D,O,o,L)),++i,this._imageryProvider.enableMorphing&&t$$(D.mvtProvider)&&t$$(D.parent)){var R=new h$s(this.getImageryFromCache(D.parent.x,D.parent.y,D.parent.level),O,o,L);R.morphingAlpha=.9,n.imagery.splice(i,0,R),++i}}}return!0},u$p.prototype._calculateTextureTranslationAndScale=function(e,t){var i=t.readyImagery.rectangle,n=e.rectangle;if(t.useWebMercatorT){var r=t.readyImagery.imageryLayer.imageryProvider.tilingScheme;i=r.rectangleToNativeRectangle(i,Te$g),n=r.rectangleToNativeRectangle(n,Ae$b)}var o=n.width,a=n.height,s=o/i.width,l=a/i.height;return new a$10(s*(n.west-i.west)/o,l*(n.south-i.south)/a,s,l)};var Ze$5=/\.dxtz/i;function Re$9(e,t,i){var n=new DataView(e),r=0;n.getUint32(r,!0),r+=4;var o=n.getUint32(r,!0);r+=4;for(var a=t.col,s=t.row*t.blockSize+a,l=0,u=0,c=0;c<o;c++){if(c<s)l+=n.getUint32(r,!0);else if(c===s){u=n.getUint32(r,!0),r+=4;break}r+=4}if(r=8+4*o,0!==u){r+=l;var h=c$18.defer(),d=t.url;return Ze$5.test(d)?h.resolve($e$4(e,r,u)):b$14({uint8Array:new Uint8Array(e,r,u),format:i,flipY:!0})}}function $e$4(e,t,i){var n=new DataView(e,t,i),r=0,o=n.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT,n.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT;var a=32===o?Z$_.RGBA_DXT5:Z$_.RGB_DXT1,s=n.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;var l=n.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT,n.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT;var u=n.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;var c=new Uint8Array(e,r+t,u),h=lt$f.inflate(c).buffer;return new e$1m(a,s,l,new Uint8Array(h))}function et$6(e){var t=e.uint8Array,i=e.format,n=e.request,r=e$1Y(e.flipY,!1),o=e.layer,a=e.imagery;n$1e.typeOf.object("uint8Array",t),n$1e.typeOf.string("format",i);var s,l=new Blob([t],{type:i});return!0===o._indexedDBSetting.isOpen&&Le$c(o,a,l),t$X.supportsImageBitmapOptions().then((function(e){return e?c$18(t$X.createImageBitmapFromBlob(l,{flipY:r,premultiplyAlpha:!1})):new t$X({url:s=window.URL.createObjectURL(l),request:n}).fetchImage({flipY:r})})).then((function(e){return t$$(s)&&window.URL.revokeObjectURL(s),e})).otherwise((function(e){return t$$(s)&&window.URL.revokeObjectURL(s),c$18.reject(e)}))}function tt$8(e,t){var i=document.createElement("canvas");i.getContext("bitmaprenderer").transferFromImageBitmap(e),i.toBlob(t)}function Ie$d(e,t){var i=e.slice(0),n=new Int8Array(i);for(var r=t.split("").map((function(e){return e.charCodeAt(0)})),o=0;o<r.length;o++)n[o]=n[o]^r[o];return n.buffer}var rt$8={webp:"image/webp",png:"image/png"};function De$h(e,t,i){return e+":"+t+":"+i}function me$h(e,t,i){return JSON.stringify([e,t,i])}u$p.prototype._requestImagery=function(e){var t=this._imageryProvider,i=this;function n(n){if(!e.isDestroyed()){if(!t$$(n))return r();if(n===we$b)return void(e.state=Tt$4.FAILED);if("cacheError"===n)return void o(!1);if(n instanceof ArrayBuffer&&t$$(t._cacheKey)&&t._cacheKey.length>0&&e.request.type!==V$_.BLOCK){var a=Ie$d(n,t._cacheKey);n=e.request.type===V$_.PACK?a:new Blob([new Uint8Array(a,0,a.byteLength)],{type:t._fileExtension||"image/png"})}if(e.request.type!==V$_.PACK&&!n.mvt&&e.request.type!==V$_.BLOCK&&e.request.type!==V$_.BLOCKPACK){if(n instanceof Blob){if(!0===i._indexedDBSetting.isOpen&&!e.request.cacheEnable&&t$$(i._imageryProvider._indexedDBScheduler)){e.quadKey=e.request.quadKey;var s={blob:n,key:e.quadKey,tablename:i._imageryProvider.tablename,dbname:i._imageryProvider._indexedDBScheduler.dbname,cacheSize:30};X$f.scheduleTask(s,[])}return void t$X.supportsImageBitmapOptions().then((function(t){if(t)t$X.createImageBitmapFromBlob(n,{flipY:!0,premultiplyAlpha:!1}).then((function(t){e.image=t,e.state=Tt$4.RECEIVED,e.request=void 0,c$_.handleSuccess(i._requestImageError)}));else{var r=window.URL.createObjectURL(n);n$S(r,!1).then((function(e){return window.URL.revokeObjectURL(r),e}),(function(e){return window.URL.revokeObjectURL(r),c$18.reject(e)})).then((function(t){e.image=t,e.state=Tt$4.RECEIVED,e.request=void 0,c$_.handleSuccess(i._requestImageError)}))}}))}!0===i._indexedDBSetting.isOpen&&!e.request.cacheEnable&&t$$(i._imageryProvider._indexedDBScheduler)&&(e.quadKey=e.request.quadKey,createImageBitmap(n,{imageOrientation:"flipY",premultiplyAlpha:"none"}).then((function(t){tt$8(t,(function(t){var n={blob:t,key:e.quadKey,tablename:i._imageryProvider.tablename,dbname:i._imageryProvider._indexedDBScheduler.dbname,cacheSize:30};X$f.scheduleTask(n,[])}))})))}var l=rt$8[t._fileExtension];if(e.request.type!==V$_.BLOCKPACK||n.mvt)if(e.request.type!==V$_.PACK||n.mvt)if(e.request.type===V$_.BLOCK){if(!t$$((c=t.blockCache[e.request.quadKey]).data)&&(c.data=n,!0===i._indexedDBSetting.isOpen&&!e.request.cacheEnable&&t$$(i._imageryProvider._indexedDBScheduler))){s={blob:n.slice(0),key:e.request.quadKey,tablename:i._imageryProvider.tablename,dbname:i._imageryProvider._indexedDBScheduler.dbname,cacheSize:30};X$f.scheduleTask(s,[])}t.blockCacheQueue.touch(c),t.blockCacheQueue.trim(t.blockCacheSize),t$$(t._cacheKey)&&t._cacheKey.length>0&&(n=Ie$d(n,t._cacheKey)),t$$(h=Re$9(n,e.request.blockInfo,l))||(e.state=Tt$4.FAILED),h.then((function(t){e.image=t,e.state=Tt$4.RECEIVED})).otherwise((function(t){e.state=Tt$4.FAILED}))}else e.image=n,e.state=Tt$4.RECEIVED;else{if(n instanceof Blob&&e.request.cacheEnable&&!0===i._indexedDBSetting.isOpen)return void t$X.supportsImageBitmapOptions().then((function(t){if(t)t$X.createImageBitmapFromBlob(n,{flipY:!0,premultiplyAlpha:!1}).then((function(t){e.image=t,e.state=Tt$4.RECEIVED,e.request=void 0,c$_.handleSuccess(i._requestImageError)}));else{var r=window.URL.createObjectURL(n);n$S(r,!1).then((function(e){return window.URL.revokeObjectURL(r),e}),(function(e){return window.URL.revokeObjectURL(r),c$18.reject(e)})).then((function(t){e.image=t,e.state=Tt$4.RECEIVED,e.request=void 0,c$_.handleSuccess(i._requestImageError)}))}}));e.quadKey=e.request.quadKey,l=e$1Y(l,"image/png");var u=be$h(n,e.request.quadKeyIndex,i,e,l);if(!t$$(u))return void(e.state=Tt$4.FAILED);u.then((function(t){e.image=t,e.state=Tt$4.RECEIVED})).otherwise((function(t){e.state=Tt$4.FAILED}))}else if(!t$$(e.request.quadKeyIndex)&&t$$(e.request.blockRequest)&&(e.request.quadKeyIndex=e.request.blockRequest.quadKeyIndex),t$$(e.request.quadKeyIndex)&&(n=be$h(n,e.request.quadKeyIndex,i,e)),t$$(n)){var c,h;if(!t$$(c=t.blockCache[e.request.quadKey])&&(c=new e$1p(t,e.request.quadKey,n),t.blockCache[e.request.quadKey]=c,!0===i._indexedDBSetting.isOpen&&!e.request.cacheEnable&&t$$(i._imageryProvider._indexedDBScheduler))){var s={blob:n.slice(0),key:e.request.quadKey,tablename:i._imageryProvider.tablename,dbname:i._imageryProvider._indexedDBScheduler.dbname,cacheSize:5};X$f.scheduleTask(s,[])}t.blockCacheQueue.touch(c),t.blockCacheQueue.trim(t.blockCacheSize),t$$(h=Re$9(n,e.request.blockInfo,l))||(e.state=Tt$4.FAILED),h.then((function(t){e.image=t,e.state=Tt$4.RECEIVED})).otherwise((function(t){e.state=Tt$4.FAILED}))}else e.state=Tt$4.FAILED;e.request=void 0,c$_.handleSuccess(i._requestImageError)}}function r(n){if(!e.isDestroyed()){if(e.request.state===Y$_.CANCELLED)return e.state=Tt$4.UNLOADED,void(e.request=void 0);e.state=Tt$4.FAILED,e.request=void 0;var r="Failed to obtain image tile X: "+e.x+" Y: "+e.y+" Level: "+e.level+".";i._requestImageError=c$_.handleError(i._requestImageError,t,t.errorEvent,r,e.x,e.y,e.level,o,n)}}function o(i){var o=new r$V({throttle:!1,throttleByServer:!0,type:V$_.IMAGERY});o.cacheEnable=i,e.request=o,e.state=Tt$4.TRANSITIONING;var a=t.requestImage(e.x,e.y,e.level,o,e.rectangle,e);if(!t$$(a))return e.state=Tt$4.UNLOADED,void(e.request=void 0);t$$(t.getTileCredits)&&(e.credits=t.getTileCredits(e.x,e.y,e.level)),e.beginRequestTime=performance.now(),c$18(a,n,r)}o(!0)},u$p.prototype._createTextureWebGL=function(e,t){var i=new a$Q({minificationFilter:this.minificationFilter,magnificationFilter:this.magnificationFilter}),n=t.image;return t$$(n.internalFormat)?new P$S({context:e,pixelFormat:n.internalFormat,width:n.width,height:n.height,source:{arrayBufferView:n.bufferView},sampler:i}):t$$(n.mvt)?n.colorTexture:new P$S({context:e,source:n,pixelFormat:this._imageryProvider.hasAlphaChannel?Z$_.RGBA:Z$_.RGB,sampler:i})},u$p.prototype._createTexture=function(e,t,i){var n=this._imageryProvider,r=t.image;if(t$$(n.tileDiscardPolicy)){var o=n.tileDiscardPolicy;if(t$$(o)){if(!o.isReady())return void(t.state=Tt$4.RECEIVED);if(o.shouldDiscardImage(r))return void(t.state=Tt$4.INVALID)}}if(this.minificationFilter!==tt$l.NEAREST&&this.minificationFilter!==tt$l.LINEAR)throw new t$_("ImageryLayer minification filter must be NEAREST or LINEAR");var a=this._createTextureWebGL(e,t);t$$(r.mvt)&&(t.isMvtTexture=!0,t.idTexture=r.idTexture,t.iconImageObjects=r.iconImageObjects,t.textObjects=r.textObjects,t.tile=r.tile,t.transform=r.transform,t.isRendered=!1,t.rawData=r.rawData),n.tilingScheme.projection instanceof e$1H?t.textureWebMercator=a:t.texture=a,t.image=void 0,t.state=Tt$4.TEXTURE_LOADED},u$p.prototype._finalizeReprojectTexture=function(e,t){var i=this.minificationFilter,n=this.magnificationFilter;if(i===tt$l.LINEAR&&n===et$k.LINEAR&&!Z$_.isCompressedFormat(t.pixelFormat)&&n$1d.isPowerOfTwo(t.width)&&n$1d.isPowerOfTwo(t.height)){i=tt$l.LINEAR_MIPMAP_LINEAR;var r=e$1y.maximumTextureFilterAnisotropy,o=Math.min(r,e$1Y(this._maximumAnisotropy,r)),a=De$h(i,n,o),s=e.cache.imageryLayerMipmapSamplers;t$$(s)||(s={},e.cache.imageryLayerMipmapSamplers=s);var l=s[a];t$$(l)||(l=s[a]=new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:i,magnificationFilter:n,maximumAnisotropy:o})),t.generateMipmap(D$12.NICEST),t.sampler=l}else{var u=De$h(i,n,0),c=e.cache.imageryLayerNonMipmapSamplers;t$$(c)||(c={},e.cache.imageryLayerNonMipmapSamplers=c);var h=c[u];t$$(h)||(h=c[u]=new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:i,magnificationFilter:n})),t.sampler=h}},u$p.prototype._reprojectTexture=function(e,t,i){var n=t.textureWebMercator||t.texture,r=t.rectangle,o=e.context;if((i=e$1Y(i,!0))&&!(this._imageryProvider.tilingScheme.projection instanceof s$1q)&&r.width/n.width>1e-5){var a=this;t.addReference();var s=new t$w({persists:!0,owner:this,preExecute:function(e){at$6(e,o,n,t.rectangle)},postExecute:function(e){t.texture=e,a._finalizeReprojectTexture(o,e),t.state=Tt$4.READY,t.releaseReference()}});this._reprojectComputeCommands.push(s)}else i&&(t.texture=n),this._finalizeReprojectTexture(o,n),t.state=Tt$4.READY},u$p.prototype.queueReprojectionCommands=function(e){for(var t=this._reprojectComputeCommands,i=t.length,n=0;n<i;++n)e.commandList.push(t[n]);t.length=0},u$p.prototype.cancelReprojections=function(){this._reprojectComputeCommands.length=0},u$p.prototype.getImageryFromCache=function(e,t,i,n){var r=me$h(e,t,i),o=this._imageryCache[r];return t$$(o)||(o=this._imageryProvider instanceof M$10?new _0x1aa457(this,e,t,i,n):new n$v(this,e,t,i,n),this._imageryCache[r]=o),o.addReference(),o},u$p.prototype.getReadyImageryFromCache=function(e,t,i){for(var n=void 0,r=i;r>0&&!t$$(n);){r--;var o=me$h(e,t,i);t$$(n=this._imageryCache[o])&&n.state!=Tt$4.READY&&(n=void 0)}return n},u$p.prototype.removeImageryFromCache=function(e){var t=me$h(e.x,e.y,e.level);delete this._imageryCache[t]};var te$d={u_textureDimensions:function(){return this.textureDimensions},u_texture:function(){return this.texture},textureDimensions:new r$T,texture:void 0},it$5=o$$.supportsTypedArrays()?new Float32Array(128):void 0;function at$6(e,t,i,n){var r=t.cache.imageryLayer_reproject;if(!t$$(r)){r=t.cache.imageryLayer_reproject={vertexArray:void 0,shaderProgram:void 0,sampler:void 0,destroy:function(){t$$(this.framebuffer)&&this.framebuffer.destroy(),t$$(this.vertexArray)&&this.vertexArray.destroy(),t$$(this.shaderProgram)&&this.shaderProgram.destroy()}};for(var o=new Float32Array(256),a=0,s=0;s<64;++s){var l=s/63;o[a++]=0,o[a++]=l,o[a++]=1,o[a++]=l}var u={position:0,webMercatorT:1},c=d$11.getRegularGridIndicesForReproject(2,64),h=u$Y.createIndexBuffer({context:t,typedArray:c,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT});r.vertexArray=new x$18({context:t,attributes:[{index:u.position,vertexBuffer:u$Y.createVertexBuffer({context:t,typedArray:o,usage:A$13.STATIC_DRAW}),componentsPerAttribute:2},{index:u.webMercatorT,vertexBuffer:u$Y.createVertexBuffer({context:t,sizeInBytes:512,usage:A$13.STREAM_DRAW}),componentsPerAttribute:1}],indexBuffer:h});var d=new a$O({sources:[Ve$b]});r.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:d,fragmentShaderSource:Ke$5,attributeLocations:u}),r.sampler=new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.LINEAR,magnificationFilter:et$k.LINEAR})}i.sampler=r.sampler;var f=i.width,p=i.height;te$d.textureDimensions.x=f,te$d.textureDimensions.y=p,te$d.texture=i;var _=Math.sin(n.south),m=.5*Math.log((1+_)/(1-_));_=Math.sin(n.north);var $=1/(.5*Math.log((1+_)/(1-_))-m),g=new P$S({context:t,width:f,height:p,pixelFormat:i.pixelFormat,pixelDatatype:i.pixelDatatype,preMultiplyAlpha:i.preMultiplyAlpha});n$1d.isPowerOfTwo(f)&&n$1d.isPowerOfTwo(p)&&g.generateMipmap(D$12.NICEST);for(var y=n.south,v=n.north,x=it$5,b=0,S=0;S<64;++S){var w=S/63,C=n$1d.lerp(y,v,w);_=Math.sin(C);var T=(.5*Math.log((1+_)/(1-_))-m)*$;x[b++]=T,x[b++]=T}r.vertexArray.getAttribute(1).vertexBuffer.copyFromArrayView(x),e.shaderProgram=r.shaderProgram,e.outputTexture=g,e.uniformMap=te$d,e.vertexArray=r.vertexArray}function nt$8(e,t,i,n){var r=e._imageryProvider,o=r.tilingScheme,a=o.ellipsoid,s=e._imageryProvider.tilingScheme.projection instanceof s$1q?1:Math.cos(i),l=o.rectangle,u=o.getNumberOfXTilesAtLevel(0);t$$(o._suggest)&&o._suggest?u=o._numberOfLevelZeroTilesX:0!==e._lodOffset&&(e._lodOffset>0?u/=1<<Math.floor(e._lodOffset):u*=1<<Math.floor(-e._lodOffset));var c=l.width,h=a.maximumRadius*c*s/(r.tileWidth*u/n);if(t$$(o._scaleDenominators)&&o._scaleDenominators.length>0){var d;d=o.tileXYToRectangle(0,0,0,d);var f=o.getNumberOfXTilesAtLevel(0)*d.width;h=a.maximumRadius*c*s/(c/f*r.tileWidth*u/n)}var p=h/t,_=Math.log(p)/Math.log(2);return 0|Math.round(_)}u$p.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$_("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},u$p.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$_("the index is 0~8");return 1<<e&this._visibleViewport},u$p.prototype.saveLocalCache=function(){if(!0===this._indexedDBSetting.isOpen&&t$$(this._imageryProvider._indexedDBScheduler)){var e={tablename:this._imageryProvider.tablename,dbname:this._imageryProvider._indexedDBScheduler.dbname};X$f.scheduleTask(e,[])}};var A$v=void 0,R$j=void 0;u$p.prototype.getImagery=function(e,t){var i=1;t$$(t)&&(i<<=t);var n=[],r=this._imageryProvider;if(t$$(R$j)||(R$j=new s$1p),R$j.west=e.min.longitude,R$j.south=e.min.latitude,R$j.east=e.max.longitude,R$j.north=e.max.latitude,!t$$(s$1p.intersection(r.rectangle,R$j)))return n;var o,a,s=0,l=23;for(t$$(r._maximumLevel)&&(l=r._maximumLevel);s<=l&&(o=r._tilingScheme.positionToTileXY(e.max,s),a=r._tilingScheme.positionToTileXY(e.min,s),t$$(o)||(o=new r$T(r._tilingScheme.getNumberOfXTilesAtLevel(s),0)),t$$(a)||(a=new r$T(0,r._tilingScheme.getNumberOfYTilesAtLevel(s))),s!==l&&(t$$(A$v)||(A$v=new s$1p),r._tilingScheme.tileXYToRectangle(a.x,a.y,s,A$v),!t$$(A$v)||!(A$v.width*i<2*(e.max.longitude-e.min.longitude)||A$v.height*i<2*(e.max.latitude-e.min.latitude))));s++);for(var u=a.x;u<=o.x;u++)for(var c=a.y;c>=o.y;c--)t$$(A$v)||(A$v=new s$1p),r._tilingScheme.tileXYToRectangle(u,c,s,A$v),t$$(s$1p.intersection(A$v,r.rectangle))&&t$$(s$1p.intersection(A$v,R$j))&&n.push(this.getImageryFromCache(u,c,s));return n},u$p.prototype.getMaxScaleLevel=function(e){var t=1,i=0,n=this._imageryProvider;if(t$$(R$j)||(R$j=new s$1p),R$j.west=e.min.longitude,R$j.south=e.min.latitude,R$j.east=e.max.longitude,R$j.north=e.max.latitude,!t$$(s$1p.intersection(n.rectangle,R$j)))return[];var r,o,a=0,s=23;for(t$$(n._maximumLevel)&&(s=n._maximumLevel);a<=s&&(r=n._tilingScheme.positionToTileXY(e.max,a),o=n._tilingScheme.positionToTileXY(e.min,a),t$$(r)||(r=new r$T(n._tilingScheme.getNumberOfXTilesAtLevel(a),0)),t$$(o)||(o=new r$T(0,n._tilingScheme.getNumberOfYTilesAtLevel(a))),a!==s);a++)t$$(A$v)||(A$v=new s$1p),n._tilingScheme.tileXYToRectangle(o.x,o.y,a,A$v),t$$(A$v)&&(A$v.width*t<2*(e.max.longitude-e.min.longitude)||A$v.height*t<2*(e.max.latitude-e.min.latitude))&&(i+=1,t*=2);return i},u$p.prototype.refresh=function(){var e=this._imageryLayers;if(t$$(e)){for(var t in this._imageryCache){var i=this._imageryCache[t];this.removeImageryFromCache(i)}var n=e.indexOf(this);e.remove(this,!1,!0),e.add(this,n)}},u$p.prototype.setLayerStatusParameters=function(e){var t=c$18.defer();return this._imageryProvider.setLayerStatusParameters(e).then((e=>{this.refresh(),t.resolve(e)})).otherwise((e=>{t.reject(e)})),t.promise};var _0x5cc68a=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x19f143=_0x5cc68a(void 0,(function(){return _0x19f143.toString().search("(((.+)+)+)+$").toString().constructor(_0x19f143).search("(((.+)+)+)+$")}));_0x19f143();var _0x11336a=null,_0x560ebb=null;function _0x18a717(){}null!==_0x4c1f6f&&(_0x11336a=_0x4c1f6f.cwrap("floatToTextureColor","number",["number","number","number","number","number","number","number"]),_0x560ebb=_0x4c1f6f.cwrap("free_result",null,["number"]));var _0x27c047=new f$10;function _0x247c00(e,t){for(var i=new Uint8Array(4*e.length),n=t._ceiling-t._floor,r=0,o=e.length;r<o;r++){var a=e[r],s=4*r;if(a<0||a>1)i[s+0]=255,i[s+1]=255,i[s+2]=255,i[s+3]=255;else{a=a*n+t._floor;var l=t._dictColorTable.getColor(a);i[s+0]=255*l.red,i[s+1]=255*l.green,i[s+2]=255*l.blue,i[s+3]=255*l.alpha}}return i}function _0x37e8af(e,t){var i=e,n=i.length,r=_0x4c1f6f._malloc(Float32Array.BYTES_PER_ELEMENT*n);_0x4c1f6f.HEAPF32.set(i,r/Float32Array.BYTES_PER_ELEMENT);var o=t._ceiling,a=t._floor,s=t._dictColorTable._dictTable._hash,l=[],u=[];for(var c in s)l.push(parseFloat(c));l.sort((function(e,t){return e-t}));for(var h=0,d=l.length;h<d;h++)u.push(s[l[h]]);var f=new ArrayBuffer(4*l.length),p=new Uint8Array(f),_=0;for(d=l.length;_<d;_++){var m=u[_];p[4*_]=255*m.red,p[4*_+1]=255*m.green,p[4*_+2]=255*m.blue,p[4*_+3]=255*m.alpha}var $=new Float32Array(f),g=(c=new Float32Array(l)).length,y=_0x4c1f6f._malloc(Float32Array.BYTES_PER_ELEMENT*g);_0x4c1f6f.HEAPF32.set(c,y/Float32Array.BYTES_PER_ELEMENT);var v=_0x4c1f6f._malloc(Float32Array.BYTES_PER_ELEMENT*g);_0x4c1f6f.HEAPF32.set($,v/Float32Array.BYTES_PER_ELEMENT);var x=_0x11336a(r,n,o,a,y,v,g),b=new Uint8Array(_0x4c1f6f.HEAPU8.buffer,x,4*n);return _0x560ebb(x),_0x4c1f6f._free(r),_0x4c1f6f._free(y),_0x4c1f6f._free(v),b}function _0x2d3387(e,t){var i=e.length/4;return _0x37e8af(new Float32Array(e.buffer,e.byteOffset,i),t)}function _0x267d96(e,t){for(var i=e.length/4,n=new Float32Array(e.buffer,e.byteOffset,i),r=0;r<n.length;r++){var o=n[r],a=4*r;if(o<0||o>1)e[a+0]=255,e[a+1]=255,e[a+2]=255,e[a+3]=255;else{o=o*(t._ceiling-t._floor)+t._floor;var s=t._dictColorTable.getColor(o);e[a+0]=255*s.red,e[a+1]=255*s.green,e[a+2]=255*s.blue,e[a+3]=255*s.alpha}}return new Uint8Array(e.buffer,0,e.length)}function _0x478c4c(e){var t=new a$11(1,255,65025);(t=a$11.multiplyByScalar(t,e,t)).x=t.x-Math.floor(t.x),t.y=t.y-Math.floor(t.y),t.z=t.z-Math.floor(t.z);var i=new a$11,n=new a$11(1/255,1/255,0);return i.x=t.y*n.x,i.y=t.z*n.y,i.z=t.z*n.z,t=a$11.subtract(t,i,t)}function _0x4c6abd(e,t,i){for(var n=new Uint8Array(4*e.length),r=0;r<e.length;r++){var o,a,s,l,u=e[r],c=4*r,h=new a$10(0,0,0,0);if(u>=0&&u<=1){var d=_0x478c4c(u);h.x=d.x,h.y=d.y,h.z=d.z,h.w=1}o=255*h.x,a=255*h.y,s=255*h.z,l=255*h.w,t$$(i)&&!0===i?(n[c+0]=parseInt(s),n[c+1]=parseInt(a),n[c+2]=parseInt(o),n[c+3]=parseInt(l)):(n[c+0]=parseInt(o),n[c+1]=parseInt(a),n[c+2]=parseInt(s),n[c+3]=parseInt(l))}return n}function _0x1328bc(e,t,i){for(var n=e.length/4,r=new Float32Array(e.buffer,e.byteOffset,n),o=0;o<r.length;o++){var a,s,l,u,c=r[o],h=4*o,d=new a$10(0,0,0,0);if(c>=0&&c<=1){c<n$1d.EPSILON9?c=n$1d.EPSILON9:1-c<n$1d.EPSILON9&&(c=1-n$1d.EPSILON9);var f=_0x478c4c(c);d.x=f.x,d.y=f.y,d.z=f.z,d.w=1}a=255*d.x,s=255*d.y,l=255*d.z,u=255*d.w,t$$(i)&&!0===i?(e[h+0]=l,e[h+1]=s,e[h+2]=a,e[h+3]=u):(e[h+0]=a,e[h+1]=s,e[h+2]=l,e[h+3]=u)}return new Uint8Array(e.buffer,0,e.length)}function _0x5b9f22(e,t,i){if(t$$(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(t$$(i)){if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}else if(a.localName===t)return a}}function _0x29a4b6(e,t,i){if(!t$$(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];t$$(i)?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}function _0x2304eb(e,t,i){var n=_0x5b9f22(e,t,i);if(t$$(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function _0x1e48ac(e,t,i){var n=_0x5b9f22(e,t,i);if(t$$(n))return n.textContent.trim()}function _0x21887a(e,t,i){var n=_0x5b9f22(e,t,i);if(t$$(n)){var r=n.textContent.trim();return"1"===r||/^true$/i.test(r)}}function _0x59c3aa(e,t,i,n){var r=c$1a.multiply(t,i,new c$1a),o=e.vertexAttributes[0],a=o.typedArray,s=new Float32Array(a.buffer,a.byteOffset,a.byteLength/4),l=o.componentsPerAttribute,u=e.verticesCount,c=new Float32Array(3*u),h=e.attrLocation;h.aRatio=Object.keys(h).length;for(var d=0;d<u;d++){var f=new a$11(s[d*l],s[d*l+1],s[d*l+2]),p=new a$11;c$1a.multiplyByPoint(r,f,p);var _=i$1g.fromCartesian(p),m=n$1d.toDegrees(_.longitude),$=n$1d.toDegrees(_.latitude),g=_.height,y=(m-n.left)/n.width,v=($-n.bottom)/n.length,x=(g-n.minHeight)/n.height;c[3*d]=y,c[3*d+1]=v,c[3*d+2]=x}e.vertexAttributes.push({index:h.aRatio,typedArray:c,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1})}function _0x59f4b8(e,t){for(var i=[],n=Math.max(t.max.longitude-t.min.longitude,t.max.latitude-t.min.latitude),r=0,o=Math.PI;r<23&&!(n>o);)o*=.5,r++;r--;var a=e,s=a._imageryProvider;e instanceof i$r&&(s=a._provider,a=a._inner);var l=new a$W,u=l.positionToTileXY(t.max,r),c=l.positionToTileXY(t.min,r);if(!t$$(s._minimumLevel)||r>s._minimumLevel){var h=s._maximumLevel;if(e instanceof i$r&&h--,t$$(h)){var d=r-h;d>0&&(c.x=Math.floor(c.x/Math.pow(2,d)),c.y=Math.floor(c.y/Math.pow(2,d)),u.x=Math.floor(u.x/Math.pow(2,d)),u.y=Math.floor(u.y/Math.pow(2,d)),r=h)}for(var f=c.x;f<=u.x;f++)for(var p=c.y;p>=u.y;p--)i.push(a.getImageryFromCache(f,p,r))}return i}_0x18a717.convertFloat=function(e,t,i){i===J$O.FilterMode.NEAREST?null===_0x11336a?_0x267d96(e.imageArray,t):e.imageArray=_0x2d3387(e.imageArray,t):_0x1328bc(e.imageArray)},_0x18a717.convertFloatTexture=function(e,t,i){return i===J$O.FilterMode.LINEAR?_0x4c6abd(e.imageArray,t,!0):null===_0x11336a?_0x247c00(e.imageArray,t):_0x37e8af(e.imageArray,t)},_0x18a717.parseResult=function(e,t,i,n){if(i.isDestroyed())return i.s3mBuffer=null,i.volBuffer=null,void(i.task=void 0);var r=i._fileName.split("_"),o=parseInt(r[1]),a=parseInt(r[2]);o=Math.pow(2,t._level)-o-1,t._version=e.version;for(var s=t._gl,l=_0x27c047.read(e.xmlDoc).firstChild,u=l.namespaceURI,c=_0x29a4b6(_0x5b9f22(l,"Material3Ds",u),"material",u),h={},d=[],f=t._context,p=0,_=c.length;p<_;p++){var m=c[p],$=_0x1e48ac(m,"name",u),g=new _0x42161c({});h[$]=g;var y=_0x5b9f22(m,"Ambient",u),v=e$1Y(_0x2304eb(y,"AmbientR",u),_0x2304eb(y,"R",u)),x=e$1Y(_0x2304eb(y,"AmbientG",u),_0x2304eb(y,"G",u)),b=e$1Y(_0x2304eb(y,"AmbientB",u),_0x2304eb(y,"B",u)),S=e$1Y(_0x2304eb(y,"AmbientA",u),_0x2304eb(y,"A",u));g._ambientColor=new e$1z(v,x,b,S);var w=_0x5b9f22(m,"Diffuse",u);v=e$1Y(_0x2304eb(w,"DiffuseR",u),_0x2304eb(w,"R",u)),x=e$1Y(_0x2304eb(w,"DiffuseG",u),_0x2304eb(w,"G",u)),b=e$1Y(_0x2304eb(w,"DiffuseB",u),_0x2304eb(w,"B",u)),S=e$1Y(_0x2304eb(w,"DiffuseA",u),_0x2304eb(w,"A",u)),g._diffuseColor=new e$1z(v,x,b,S);var C=_0x5b9f22(m,"Specular",u);v=e$1Y(_0x2304eb(C,"SpecularR",u),_0x2304eb(C,"R",u)),x=e$1Y(_0x2304eb(C,"SpecularG",u),_0x2304eb(C,"G",u)),b=e$1Y(_0x2304eb(C,"SpecularB",u),_0x2304eb(C,"B",u)),S=e$1Y(_0x2304eb(C,"SpecularA",u),_0x2304eb(C,"A",u)),g._specularColor=new e$1z(v,x,b,S);var T=_0x2304eb(m,"Shininess",u);g._shininess=T,g._bTransparentSorting=_0x21887a(m,"TransparentSorting",u);var P=_0x29a4b6(m,"texture",u);0===P.length&&t._fileType===c$q.OSGBFile&&(g._isInvalidOblique=!0);for(var E=0;E<P.length;E++){var A=P[E],L=_0x1e48ac(A,"name",u),M=_0x1e48ac(A,"TextureName",u),I=_0x5b9f22(A,"AddressMode",u),O=_0x1e48ac(I,"u",u),D=_0x1e48ac(I,"v",u);O="TAM_WRAP"===O?j$13.REPEAT:j$13.CLAMP_TO_EDGE,D="TAM_WRAP"===D?j$13.REPEAT:j$13.CLAMP_TO_EDGE;for(var R=_0x1e48ac(A,"TexModMatrix",u).split(","),N=16;N--;)R[N]=parseFloat(R[N]);g._texMatrix=c$1a.unpack(R);var F=e.texturePackage[L],B=L+t._id+f._id+i._relativePath.path;if(t$$(F)&&(B+=F.imageBuffer.length),t$$(F)&&F.width>0&&F.height>0&&t$$(F.imageBuffer)&&F.imageBuffer.byteLength>0)switch(0===F.compressType&&(t._supportCompressType=0),i._texturesByteLength+=F.imageBuffer.length,F.compressType){case _0x5ce781.WEBP:var z=g.createWebp(B,M,f,E,F.imageBuffer,F.width,F.height,t.mipmapEnabled);d.push(z),g._isWEBP=!0;break;case _0x5ce781.CRN_DXT5:var G=g.createCRN(B,M,f,E,F,O,D,t.mipmapEnabled);d.push(G);break;default:var k=De$e.CreateTexture(B,f,F.width,F.height,F.nFormat,F.compressType,F.imageBuffer,!1,O,D,t.mipmapEnabled);g._textures.push(k)}else if(t._isTextureShare){var U=t._baseUri+"Texture/"+M;t$$(a$R.CREDENTIAL)&&(U=a$R.addToken(U));var V=g.requestSharedTexture(U,B,M,f,E,t.customRequestHeaders,O,D);d.push(V)}if("png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt){var W=L+"_"+i._fileName;W=""!==t._volName?W+"_"+t._volName:W,"vol_texture_mapping"===t._strVolumeExt?W+=".vol":W+=".png";var H=i._relativePath.resolve(t._baseUri)+W;if(0!=t.urlType){var Y=t._urlArguments,j=H.indexOf("datas")+5,q=Y.layer3DName,X=H.substring(H.indexOf("/path/")+6).split("/"),K=Y.scene3DName,Z=X[0],J=X[1].substring(0,X[1].indexOf(".")),Q=X[1].substring(X[1].indexOf(".")+1,X[1].length);H=H.substring(0,j)+"?layerName="+q+"&rootTile="+Z+"&tile="+J+"&suffix="+Q+"&scene3DName="+K+"&layer3DName="+q}var ee=void 0;"vol_texture_mapping"===t._strVolumeExt?t$$(ee=u$S(H,void 0))&&function(e,n,r){e.then((function(e){var o;if(t$$(e)){var a=void 0,s=new Uint8Array(e,8),l=lt$f.inflate(s).buffer;if(1===new Float64Array(l,0,1)[0]){var u=new Uint32Array(l,8,4),c=u[0],h=u[1],d=u[2];a={nFormat:c,nWidth:h,nHeight:d,nPixelSize:u[3],imageArray:new Float32Array(l,24,h*d)}}if(t$$(a)){var f,p=tt$l.LINEAR,_=et$k.LINEAR;t$$(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===J$O.FilterMode.NEAREST&&(p=tt$l.NEAREST,_=et$k.NEAREST),f=t._hypsometricSetting.filterMode===J$O.FilterMode.LINEAR?_0x4c6abd(a.imageArray,t._hypsometricSetting,!0):null===_0x11336a?_0x247c00(a.imageArray,t._hypsometricSetting):_0x37e8af(a.imageArray,t._hypsometricSetting),(o=new P$S({context:t._context,width:a.nWidth,height:a.nHeight,pixelFormat:Z$_.RGBA,flipY:!1,sampler:new a$Q({minificationFilter:p,magnificationFilter:_})})).copyFrom({width:a.nWidth,height:a.nHeight,arrayBufferView:f}),i._volTextures[n]=o,r.texID2Vol=n}e=null}}),(function(e){}))}(ee,B,g):"png"===t._strVolumeExt&&(t$$(ee=n$S(H))&&function(e,n,r){e.then((function(e){var o;if(t$$(e)){var a,s=tt$l.LINEAR,l=et$k.LINEAR;t$$(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===J$O.FilterMode.NEAREST&&(s=tt$l.NEAREST,l=et$k.NEAREST),a=t._hypsometricSetting.filterMode===J$O.FilterMode.LINEAR?_0x1328bc(i$W(e),t._hypsometricSetting,!0):null===_0x11336a?_0x267d96(i$W(e),t._hypsometricSetting):_0x2d3387(i$W(e),t._hypsometricSetting),(o=new P$S({context:t._context,width:e.width,height:e.height,pixelFormat:Z$_.RGBA,flipY:!1,sampler:new a$Q({minificationFilter:s,magnificationFilter:l})})).copyFrom({width:e.width,height:e.height,arrayBufferView:a}),e=null,i._volTextures[n]=o,r.texID2Vol=n}}),(function(e){}))}(ee,B,g)),d.push(ee)}}}c$18.all(d,(function(){var n,r;if(t$$(t._volData)){n=t._volData._volBounds;var c=t._context._id+"_"+t.id+"_layerVol",d=J$O.FilterMode.LINEAR;t$$(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===J$O.FilterMode.NEAREST&&(d=J$O.FilterMode.NEAREST),t$$(t._hypsometricSetting)&&t$$(t._volData._buffer)&&(d===J$O.FilterMode.NEAREST?null===_0x11336a?_0x267d96(t._volData._buffer,t._hypsometricSetting):t._volData._buffer=_0x2d3387(t._volData._buffer,t._hypsometricSetting):_0x1328bc(t._volData._buffer,t._hypsometricSetting));var f={};f.nLength=t._volData._nLength,f.imageArray=t._volData._buffer;var p=De$e.CreateVolumeTexture(c,s,t._context,f,d);delete t._volData._buffer,t._volData._buffer=void 0,r={volTexture:p,nFormat:3201,nSideBlockCount:t._volData._nSideBlockCount,nBlockLength:t._volData._nBlockLength,nLength:t._volData._nLength,nWidth:t._volData._width,nHeight:t._volData._height,nDepth:t._volData._depth,id:c,dataFloor:t._volData._minValue,dataCeil:t._volData._maxValue,volBounds:n},i._volObj=r}else if("vol"===t._strVolumeExt)if(e.volImageBuffer){n=e.volBounds;c=t._context._id+"_"+t.id+"_"+i._relativePath.resolve(t._baseUri)+"_"+i._fileName,d=J$O.FilterMode.LINEAR;t$$(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===J$O.FilterMode.NEAREST&&(d=J$O.FilterMode.NEAREST),3201===e.volImageBuffer.nFormat&&t$$(t._hypsometricSetting)&&(d===J$O.FilterMode.NEAREST?null===_0x11336a?_0x267d96(e.volImageBuffer.imageArray,t._hypsometricSetting):e.volImageBuffer.imageArray=_0x2d3387(e.volImageBuffer.imageArray,t._hypsometricSetting):_0x1328bc(e.volImageBuffer.imageArray,t._hypsometricSetting)),r={volTexture:p=De$e.CreateVolumeTexture(c,s,t._context,e.volImageBuffer,d),nFormat:e.volImageBuffer.nFormat,nSideBlockCount:e.volImageBuffer.nSideBlockCount,nBlockLength:e.volImageBuffer.nBlockLength,nLength:e.volImageBuffer.nLength,nWidth:e.volImageBuffer.nWidth,nHeight:e.volImageBuffer.nHeight,nDepth:e.volImageBuffer.nDepth,id:c,dataFloor:t._fMinValue,dataCeil:t._fMaxValue,volBounds:n},delete e.volImageBuffer.imageArray,e.volImageBuffer.imageArray=null,t$$(i._volObj)&&De$e.DecRef(i._volObj.id),i._volObj=r}else t._bVolume&&(t$$(r=i._volObj)&&(n=i._volObj.volBounds));var _=_0x5b9f22(l,"PageLods",u),m=_0x29a4b6(_,"PagedLOD",u),$=t._matModel;if(m.length>0){for(var g=0;g<m.length;g++){(re=new _0x10562c)._fileType=t._fileType;var y=m[g],v=_0x1e48ac(y,"RangeDataList",u);v?v=v.replace(/.osgb$/,"").replace(/.s3m$/,""):i._isLeafTile=!0;var x=_0x1e48ac(y,"RangeMode",u),b=_0x2304eb(y,"RangeList",u),S=_0x5b9f22(y,"BoundingSphere",u),w=_0x2304eb(S,"x",u),C=_0x2304eb(S,"y",u),T=_0x2304eb(S,"z",u),P=_0x2304eb(S,"radius",u),E=new a$11(w,C,T);re._rangeMode="DISTANCE_FROM_EYE_POINT"==x?_0x2b4bc7.DISTANCE_FROM_EYE_POINT:_0x2b4bc7.PIXEL_SIZE_ON_SCREEN,re._rangeDataList=v,0===re._rangeDataList.indexOf("Root")&&(re._processFileType=1),re._rangeList=b,re._boundingSphere=new c$19(E,P),re._originalBS=new c$19(E,P),c$19.transform(re._boundingSphere,t._matModel,re._boundingSphere);for(var A=_0x29a4b6(y,"Geode",u),L=[],M=[],I=0;I<A.length;I++){for(var O=_0x1e48ac(ae=A[I],"GeoDeModMatrix",u).split(","),D=0;D<16;D++)O[D]=parseFloat(O[D]);if(1===t._heightScale)se=c$1a.multiply($,O,new c$1a);else{var R=c$1a.multiplyByScale(O,new a$11(1,1,t._heightScale),new c$1a);se=c$1a.multiply($,R,new c$1a)}for(var N=_0x29a4b6(ae,"GeoName"),F=0;F<N.length;F++){var B=N[F].textContent.trim();if(!((ue=(le=e.geoPackage[B]).vertexPackage).verticesCount<1)){var z=le.arrIndexPackage,G=le.pickInfo,k={};for(I=0;I<z.length;I++){if(t$$(ce=z[I])){var U=ce.materialCode,V=h[U],W=new _0x42161c({});t$$(V)&&V.clone(W),k[U]=W,("png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt)&&t$$(V.texID2Vol)&&(p=i._volTextures[V.texID2Vol])}}r&&(_0x59c3aa(ue,t._oriMatModel,O,n),De$e.AddRef(i._fileName));var H=re._boundingSphere;if(re._boundingSphere.radius<0){H=_0x1af262.calcBoundingSphere(t,ue,se);var Y=c$19.transform(H,c$1a.inverse(se,new c$1a),new c$19);c$19.transform(Y,O,Y),L.push(H),M.push(Y)}var j={context:t._context,vertexPackage:ue,arrIndexPackage:z,edgeGeometry:le.edgeGeometry,pickInfo:G,version:e.version,mapPass:k,layer:t,matModel:se,boundingVolume:H,volObj:r,volTexture:p,fileType:t._fileType,geoMatrix:O,level:t._level,row:o,col:a,geoName:B,entity:i};if(t$$(t.themeStyle)&&t$$(t.themeStyle._image)){var q=_0x4f5be5.createRenderEntityPageLOD(j,t);re._renderEntityList=re._renderEntityList.concat(q)}else{var X=new _0x38aae9(j);if(t._imageryLayer instanceof Array){for(var K=[],Z=0;Z<t._imageryLayer.length;Z++){if(t$$(he=t._imageryLayer[Z])&&(he instanceof u$p||he instanceof i$r)){var J=_0x59f4b8(he,le.cartographicBounds);K=K.concat(J)}}K.length>0&&X.setImagerys(K,le.cartographicBounds)}else{if(t$$(t._imageryLayer)&&(t._imageryLayer instanceof u$p||t._imageryLayer instanceof i$r))(K=_0x59f4b8(t._imageryLayer,le.cartographicBounds)).length>0&&X.setImagerys(K,le.cartographicBounds)}re._renderEntityList.push(X)}}}}re._boundingSphere.radius<0&&(re._boundingSphere=c$19.fromBoundingSpheres(L,new c$19),re._originalBS=c$19.fromBoundingSpheres(M,new c$19)),t$$(i._pagelodMap[v])?(i._pagelodMap[v]._renderEntityList=re._renderEntityList,i._pagelodMap[v]._ready=!0):(i._childrenPageLod.push(re),t.LoadingPriority===_0x271348.UsePagedLodInfo&&(re._isLeafNode=!0))}if((A=_0x29a4b6(_,"Geode",u)).length>0){L=[],M=[];(re=new _0x10562c)._fileType=t._fileType,re._isLeafNode=!0;for(I=0;I<A.length;I++){for(O=_0x1e48ac(ae=A[I],"GeoDeModMatrix",u).split(","),D=0;D<16;D++)O[D]=parseFloat(O[D]);if(1===t._heightScale)se=c$1a.multiply($,O,new c$1a);else{R=c$1a.multiplyByScale(O,new a$11(1,1,t._heightScale),new c$1a);se=c$1a.multiply($,R,new c$1a)}for(var Q=_0x29a4b6(ae,"GeoName",u),ee=0;ee<Q.length;ee++){B=Q[ee].textContent.trim();if(!((ue=(le=e.geoPackage[B]).vertexPackage).verticesCount<1)){G=le.pickInfo;var te=_0x1af262.calcBoundingSphere(t,ue,se);Y=c$19.transform(te,c$1a.inverse(se,new c$1a),new c$19);c$19.transform(Y,O,Y),L.push(te),M.push(Y);var ie=_0x1af262.calcBoundingRectangle(t,ue);z=le.arrIndexPackage,k={};for(var ne in z){if(t$$(ce=z[ne])){U=ce.materialCode,V=h[U],W=new _0x42161c({});t$$(V)&&V.clone(W),k[U]=W,("png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt)&&t$$(V.texID2Vol)&&(p=i._volTextures[V.texID2Vol])}}r&&(_0x59c3aa(ue,t._oriMatModel,O,n),De$e.AddRef(i._fileName));j={context:t._context,vertexPackage:ue,arrIndexPackage:z,edgeGeometry:le.edgeGeometry,pickInfo:G,version:e.version,mapPass:k,layer:t,matModel:se,boundingVolume:te,boundingRectangle:ie,volObj:r,volTexture:p,fileType:t._fileType,geoMatrix:O,level:t._level,row:o,col:a,geoName:B,entity:i};if(t$$(t.themeStyle)){q=_0x4f5be5.createRenderEntityPageLOD(j,t);re._renderEntityList=re._renderEntityList.concat(q)}else{X=new _0x38aae9(j);if(t._imageryLayer instanceof Array){for(K=[],Z=0;Z<t._imageryLayer.length;Z++){if(t$$(he=t._imageryLayer[Z])&&(he instanceof u$p||he instanceof i$r)){J=_0x59f4b8(he,le.cartographicBounds);K=K.concat(J)}}K.length>0&&X.setImagerys(K,le.cartographicBounds)}else{if(t$$(t._imageryLayer)&&(t._imageryLayer instanceof u$p||t._imageryLayer instanceof i$r))(K=_0x59f4b8(t._imageryLayer,le.cartographicBounds)).length>0&&X.setImagerys(K,le.cartographicBounds)}re._renderEntityList.push(X)}}}}re._boundingSphere=c$19.fromBoundingSpheres(L,new c$19),re._originalBS=c$19.fromBoundingSpheres(M,new c$19),re._ready=!0,i._childrenPageLod.push(re)}}else{var re;i._isLeafTile=!0,(re=new _0x10562c)._fileType=t._fileType;var oe=_0x29a4b6(_,"Geode");for(L=[],M=[],g=0;g<oe.length;g++){var ae;for(O=_0x1e48ac(ae=oe[g],"GeoDeModMatrix",u).split(","),D=0;D<16;D++)O[D]=parseFloat(O[D]);var se;if(1===t._heightScale)se=c$1a.multiply($,O,new c$1a);else{R=c$1a.multiplyByScale(O,new a$11(1,1,t._heightScale),new c$1a);se=c$1a.multiply($,R,new c$1a)}for(Q=_0x29a4b6(ae,"GeoName",u),ee=0;ee<Q.length;ee++){var le,ue;B=Q[ee].textContent.trim();if(!((ue=(le=e.geoPackage[B]).vertexPackage).verticesCount<1)){G=le.pickInfo,te=_0x1af262.calcBoundingSphere(t,ue,se),Y=c$19.transform(te,c$1a.inverse(se,new c$1a),new c$19);c$19.transform(Y,O,Y),L.push(te),M.push(te);for(ie=_0x1af262.calcBoundingRectangle(t,ue),z=le.arrIndexPackage,k={},I=0;I<z.length;I++){var ce;if(t$$(ce=z[I])){U=ce.materialCode,V=h[U],W=new _0x42161c({});t$$(V)&&V.clone(W),k[U]=W,("png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt)&&t$$(V.texID2Vol)&&(p=i._volTextures[V.texID2Vol])}}r&&(_0x59c3aa(ue,t._oriMatModel,O,n),De$e.AddRef(i._fileName));j={context:t._context,vertexPackage:ue,arrIndexPackage:z,edgeGeometry:le.edgeGeometry,pickInfo:G,version:e.version,mapPass:k,layer:t,matModel:se,boundingVolume:te,boundingRectangle:ie,volObj:r,volTexture:p,fileType:t._fileType,geoMatrix:O,level:t._level,row:o,col:a,geoName:B,entity:i};if(t$$(t.themeStyle)&&t$$(t.themeStyle._image)){q=_0x4f5be5.createRenderEntityPageLOD(j,t);re._renderEntityList=re._renderEntityList.concat(q)}else{X=new _0x38aae9(j);if(t._imageryLayer instanceof Array){for(K=[],Z=0;Z<t._imageryLayer.length;Z++){var he;if(t$$(he=t._imageryLayer[Z])&&(he instanceof u$p||he instanceof i$r)){J=_0x59f4b8(he,le.cartographicBounds);K=K.concat(J)}}K.length>0&&X.setImagerys(K,le.cartographicBounds)}else{if(t$$(t._imageryLayer)&&(t._imageryLayer instanceof u$p||t._imageryLayer instanceof i$r))(K=_0x59f4b8(t._imageryLayer,le.cartographicBounds)).length>0&&X.setImagerys(K,le.cartographicBounds)}re._renderEntityList.push(X)}}}}re._boundingSphere=c$19.fromBoundingSpheres(L,new c$19),re._originalBS=c$19.fromBoundingSpheres(M,new c$19),re._ready=!0,i._childrenPageLod.push(re)}if(!t$$(i._boundingSphere)||i._isLeafTile){for(var de=[],fe=0;fe<i._childrenPageLod.length;fe++)de.push(i._childrenPageLod[fe]._boundingSphere);i._boundingSphere=c$19.fromBoundingSpheres(de),i._oriBoundingSphere=c$19.clone(i._boundingSphere)}if(!a$11.equals(t._boundingSphereOffset,a$11.ZERO)){var pe=Math.max(Math.abs(t._boundingSphereOffset.x),Math.abs(t._boundingSphereOffset.y),Math.abs(t._boundingSphereOffset.z));i.extendRadius(pe)}for(var _e in h){var me=h[_e];!t$$(me)||(me.destroy(),h[_e]=null)}r&&De$e.DecRef(i._fileName),i._s3mLoadState=W$q.PARSED,i._isParsed=!0,t.LoadingPriority===_0x271348.UsePagedLodInfo&&i._isEmptyTree&&i.setEmptyTreeFlag(!1)}))},_0x18a717.binaryDataParser=function(e,t,i,n){if(t._s3mLoadState===W$q.UNLOAD)return t.s3mBuffer=null,t.volBuffer=null,void(t.task=void 0);var r;t$$(e._imageryLayer)&&(r=e._fileType!==c$q.OSGBFile&&e._fileType!==c$q.OSGBCacheFile||t$$(e.waterEffectSet)?void 0:c$1a.pack(e._matModel,new Array(16)));var o={buffer:i,supportCompressType:e._supportCompressType,ignoreNormal:e._ignoreNormal,bVolume:!1,modelMatrix:r,isCoverImageryLayer:t$$(e._imageryLayer)},a=[i];t$$(n)&&"vol"===e._strVolumeExt&&(o.bVolume=!0,o.volbuffer=n,a.push(n)),_0xb658ed.init||_0xb658ed.initWebAssembly();var s=_0xb658ed.S3MTaskProcessor.scheduleTask(o,a);!t$$(s)||(t._s3mLoadState=W$q.PARSING,e._layerScheduler._statistics.numberOfProcessingAttempted=0,e._layerScheduler._statistics.numberOfTilesProcessing++,t.s3mBuffer=null,t.volBuffer=null,s.then((function(i){if(t$$(window.Proxy)){var r=t._relativePath.toString()+t._fileName;if((!0===e._indexedDBSetting.isGeoTilesSave||e._indexedDBSetting.isGeoTilesRootNodeSave&&e._layerScheduler._isRootNode(r))&&t$$(e._layerScheduler._indexedDBScheduler)){if(t$$(e._layerScheduler._indexedDBScheduler.cachestatus)&&t$$(e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename])&&(1===e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename][r]||2===e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename][r]))return;var o={blob:i,key:r,tablename:e._layerScheduler.tablename,dbname:e._layerScheduler._indexedDBScheduler.dbname};_0xb658ed.indexTaskProcessor.scheduleTask(o,[])}}e._layerScheduler._statistics.numberOfTilesProcessing--,_0x18a717.parseResult(i,e,t,n)})).otherwise((function(i){if(e._layerScheduler._statistics.numberOfTilesProcessing--,t.task=void 0,t._s3mLoadState==W$q.UNLOAD)return t.s3mBuffer=null,void(t.volBuffer=null);t$$(i)?(t.s3mBuffer=null,t.volBuffer=null,t._s3mLoadState=W$q.FAILED,console.log(i)):t._s3mLoadState=W$q.LOADED})))};var _0x209dcd=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x55c9b9=_0x209dcd(void 0,(function(){return _0x55c9b9.toString().search("(((.+)+)+)+$").toString().constructor(_0x55c9b9).search("(((.+)+)+)+$")}));function _0x35bc68(){this.skeletons=new e$1F,this.bufferCache={},this.vertexJob=new _0x488c28,this.indexJob=new _0x2f251d}_0x55c9b9(),_0x35bc68.STATE={SkeletonParsing:0,SkeletonReady:1};var _0xed135f={UNLOAD:0,LOADING:1,LOADED:2,PARSING:3,PARSED:4,CREATING:5,READY:6,LOADFAILED:7,PARSFAILED:8};function _0x488c28(){this.context=void 0,this.geoPackage=void 0,this.index=0}function _0x2f251d(){this.geoPackage=void 0,this.context=void 0,this.index=0}function _0x227b21(e,t,i){if(!t$$(t.request)){let o=i.split("#");var n=new h$1f("./ModelFile/"+(encodeURIComponent(o[0])+(o[1]?"#"+o[1]:""))).resolve(e._baseUri).toString();t$$(a$R.CREDENTIAL)&&(n=a$R.addToken(n));var r=new r$V({url:n,throttle:!0,throttleByServer:!0,serverKey:r$U.getServerKey(n),priorityFunction:function(){return 1e3}});t.request=r}var o=u$S(t.request.url,void 0,t.request);!t$$(o)||(t.state=_0xed135f.LOADING,o.then((function(e){t.request=void 0,t.buffer=e,t.state=_0xed135f.LOADED})).otherwise((function(e){t$$(e)?t.state=_0xed135f.LOADFAILED:(t.state=_0xed135f.UNLOAD,t.request=void 0)})))}function _0x339bfe(e,t,i){var n={buffer:i,isS3MZ:!1,supportCompressType:e._supportCompressType,ignoreNormal:e._ignoreNormal,isJsonScp:e._isJsonScp,createEdge:!1},r=[i];if(_0xb658ed.init||_0xb658ed.initWebAssembly(),_0xb658ed.taskProcessorReady){var o=_0xb658ed.S3MBTaskProcessor.scheduleTask(n,r);!t$$(o)||(t.buffer=void 0,t.state=_0xed135f.PARSING,o.then((function(e){t.state=_0xed135f.PARSED,t.skeletonPackage=e})).otherwise((function(e){t.state=_0xed135f.PARSFAILED})))}}function _0x12aa52(e,t,i,n){var r=e._context,o=i.skeletonPackage.geoPackage;for(var a in delete o.ignoreNormal,o)if(o.hasOwnProperty(a)){for(var s=o[a],l=s.vertexPackage.vertexAttributes.length,u=new i$Y,c=0;c<l;c++)u.enqueue(c);i.vertexBufferToCreate.set(a,u);var h=s.arrIndexPackage[0];if(t$$(h)){fe$u.UNSIGNED_SHORT,(1===h.indexType||s.vertexPackage.verticesCount>=n$1d.SIXTY_FOUR_KILOBYTES)&&r.elementIndexUint&&fe$u.UNSIGNED_INT;var d=new i$Y;d.enqueue(0),i.indexBufferToCreate.set(a,d)}t.bufferCache[n+"_"+a]=1}i.state=_0xed135f.CREATING}function _0x4230d4(e,t,i,n){var r=!0;for(var o in i.vertexBufferToCreate._hash){for(var a=i.vertexBufferToCreate._hash[o];a.length;){var s=a.peek();if(t.vertexJob.set(e._context,i.skeletonPackage.geoPackage[o],s),!e._frameState.jobScheduler.execute(t.vertexJob,i$E.BUFFER))break;a.dequeue()}r=r&&0===a.length}for(var o in i.indexBufferToCreate._hash){for(a=i.indexBufferToCreate._hash[o];a.length;){s=a.peek();if(t.indexJob.set(e._context,i.skeletonPackage.geoPackage[o],s),!e._frameState.jobScheduler.execute(t.indexJob,i$E.BUFFER))break;a.dequeue()}r=r&&0===a.length}r&&(i.vertexBufferToCreate=void 0,i.indexBufferToCreate=void 0,i.state=_0xed135f.READY)}_0x488c28.prototype.set=function(e,t,i){this.context=e,this.geoPackage=t,this.index=i},_0x488c28.prototype.execute=function(){var e=this.context,t=this.index,i=this.geoPackage.vertexPackage.vertexAttributes[t];t$$(i.vertexBuffer)||(i.vertexBuffer=u$Y.createVertexBuffer({context:e,typedArray:i.typedArray,usage:A$13.STATIC_DRAW}),delete i.typedArray,i.vertexBuffer.vertexArrayDestroyable=!1)},_0x2f251d.prototype.set=function(e,t,i){this.geoPackage=t,this.context=e,this.index=i},_0x2f251d.prototype.execute=function(){var e=this.context;this.index;var t=this.geoPackage.arrIndexPackage[0],i=this.geoPackage.vertexPackage.verticesCount,n=fe$u.UNSIGNED_SHORT;(1===t.indexType||i>=n$1d.SIXTY_FOUR_KILOBYTES)&&e.elementIndexUint&&(n=fe$u.UNSIGNED_INT);var r=u$Y.createIndexBuffer({context:e,typedArray:t.indicesTypedArray,usage:A$13.STATIC_DRAW,indexDatatype:n});r.vertexArrayDestroyable=!1,delete t.indicesTypedArray,t.indexBuffer=r},_0x35bc68.prototype.getSkeleton=function(e,t,i){var n=t.skeletonPackages,r=i.indexOf("#"),o=i;r>-1&&(o=i.substring(0,r));var a=this.skeletons.get(o);return t$$(a)||(a={state:_0xed135f.UNLOAD,skeletonPackage:void 0,vertexBufferToCreate:new e$1F,indexBufferToCreate:new e$1F},this.skeletons.set(o,a)),a.state===_0xed135f.UNLOAD?_0x227b21(e,a,i):a.state===_0xed135f.LOADED?_0x339bfe(e,a,a.buffer):a.state===_0xed135f.PARSED?_0x12aa52(e,this,a,o):a.state===_0xed135f.CREATING&&_0x4230d4(e,this,a),a.state===_0xed135f.READY&&(n.contains(o)||n.set(o,a.skeletonPackage)),a},_0x35bc68.prototype.remove=function(e){var t=this.skeletons.get(e);if(t$$(t)&&t$$(t.skeletonPackage)){var i=t.skeletonPackage.geoPackage;for(var n in i)if(i.hasOwnProperty(n)){for(var r=i[n],o=r.vertexPackage.vertexAttributes,a=o.length,s=0;s<a;s++){var l=o[s];if(t$$(l.vertexBuffer)){var u=l.vertexBuffer;l.vertexBuffer.vertexArrayDestroyable=!0,t$$(u)&&!u.isDestroyed()&&u.vertexArrayDestroyable&&u.destroy(),l.vertexBuffer=void 0}}var c=r.arrIndexPackage[0];if(t$$(c)){var h=c.indexBuffer;h.vertexArrayDestroyable=!0,t$$(h)&&!h.isDestroyed()&&h.vertexArrayDestroyable&&h.destroy(),c.indexBuffer=void 0}delete this.bufferCache[e+"_"+n]}this.skeletons.remove(e)}},_0x35bc68.parse=function(e,t){var i=t.instancePackage.geoPackage;delete i.ignoreNormal;var n=!0;for(var r in t$$(t.skeletonPackages)||(t.skeletonPackages=new e$1F),i)if(i.hasOwnProperty(r)){n=e.instanceSkeletonManager.getSkeleton(e,t,r).state===_0xed135f.READY&&n}n&&(t.skeletonState=_0x35bc68.STATE.SkeletonReady)};var _0x16db4f=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x46e026=_0x16db4f(void 0,(function(){return _0x46e026.toString().search("(((.+)+)+)+$").toString().constructor(_0x46e026).search("(((.+)+)+)+$")}));_0x46e026();var _0x3a844f=4369,_0x66e6fb=6410;function _0x248355(e){this.context=e.context,this.gl=e.context._gl,this.contextId=e.context.id,this.layerId=e.layerId,this.rootName=e.rootName,this.textureId=e.textureId,this._width=e.width,this._height=e.height,this._compressType=e.compressType,this._supportCompressType=e.supportCompressType,this._pixelFormat=e.pixelFormat,this._internalFormat=e.internalFormat,this.wrapS=e$1Y(e.wrapS,j$13.CLAMP_TO_EDGE),this.wrapT=e$1Y(e.wrapT,j$13.CLAMP_TO_EDGE),this.arrayBufferView=e.arrayBufferView,this._texture=void 0,this._target=this.gl.TEXTURE_2D,this.size=this._width*this._height,this.refCount=1,this.ready=!1,this.renderable=!1,this.isTexBlock=!0,t$$(this.arrayBufferView)&&this.init(),this._sizeInBytes=Z$_.compressedTextureSizeInBytes(this._internalFormat,this._width,this._height),this.context.memorySize+=this._sizeInBytes}function _0x203fcb(e,t,i,n){var r=1;if(!n$1d.isPowerOfTwo(i)||!n$1d.isPowerOfTwo(n))return!1;for(var o=e.length,a=i,s=n,l=0;;){if(l+=Z$_.compressedTextureSizeInBytes(t,a,s),s>>=1,0==(a>>=1)&&0==s)break;r++,a=Math.max(a,1),s=Math.max(s,1)}return l===o?r:1}_0x248355.prototype.init=function(){if(this._compressType===_0x415d95.enrS3TCDXTN&&1!=this._supportCompressType){if(t$$(this.arrayBufferView)){var e=null;d$S.decode(e,this._width,this._height,this.arrayBufferView,this._pixelFormat),e=this._pixelFormat>_0x5ce781.BGR||this._pixelFormat===_0x5ce781.LUMINANCE_ALPHA?new Uint8Array(this._width*this._height*4):new Uint16Array(this._width*this._height),d$S.decode(e,this._width,this._height,this.arrayBufferView,this._pixelFormat),this.arrayBufferView=e}this._internalFormat=_0x3a844f}var t=this.gl;t$$(this._texture)||(this._texture=t.createTexture()),t.bindTexture(t.TEXTURE_2D,this._texture);var i=this._internalFormat,n=0;if(t$$(this.arrayBufferView)){var r=this._width,o=this._height,a=_0x203fcb(this.arrayBufferView,i,this._width,this._height)>1,s=this.arrayBufferView.byteLength,l=0;(i===_0x66e6fb||i===_0x3a844f)&&t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,!0);do{var u=Z$_.compressedTextureSizeInBytes(i,r,o),c=new Uint8Array(this.arrayBufferView.buffer,this.arrayBufferView.byteOffset+l,u);i===_0x3a844f?t.texImage2D(t.TEXTURE_2D,n++,t.RGBA,r,o,0,t.RGBA,t.UNSIGNED_BYTE,c):t.compressedTexImage2D(t.TEXTURE_2D,n++,i,r,o,0,c),r=Math.max(r>>1,1),o=Math.max(o>>1,1),l+=u}while(a&&l<s)}else{var h=Z$_.compressedTextureSizeInBytes(i,this._width,this._height);i===_0x3a844f?t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this._width,this._height,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(this._width*this._height*4)):t.compressedTexImage2D(t.TEXTURE_2D,0,i,this._width,this._height,0,new Uint8Array(h))}n>1?(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),n$1d.isPowerOfTwo(this._width)&&n$1d.isPowerOfTwo(this._height)?t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_LINEAR):t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR)):(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR)),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,this.wrapS),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,this.wrapT),t.texParameteri(this._target,this.context._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,1),t.bindTexture(t.TEXTURE_2D,null),this.arrayBufferView=void 0,this.ready=!0},_0x248355.prototype.copyFrom=function(e){var t=this.gl,i=this._target;t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture);var n=e.xOffset,r=e.yOffset,o=e.width,a=e.height,s=e.arrayBufferView,l=this._internalFormat,u=t.UNSIGNED_BYTE;if(t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),this._compressType===_0x415d95.enrS3TCDXTN&&1!=this._supportCompressType){t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,!0);var c=null;l=this._pixelFormat;d$S.decode(c,o,a,s,l),c=l>_0x5ce781.BGR||l===_0x5ce781.LUMINANCE_ALPHA?new Uint8Array(o*a*4):new Uint16Array(o*a),d$S.decode(c,o,a,s,l),s=c,this._internalFormat=_0x3a844f,t.texSubImage2D(t.TEXTURE_2D,0,n,r,o,a,t.RGBA,u,s)}else{t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,!1);var h=Z$_.compressedTextureSizeInBytes(l,o,a),d=new Uint8Array(s.buffer,s.byteOffset,h);t.compressedTexSubImage2D(i,0,n,r,o,a,l,d)}t.bindTexture(i,null)},_0x248355.prototype.update=function(e){this.context=e.context,this.gl=e.context._gl,this.contextId=e.context.id,this.layerId=e.layerId,this.rootName=e.rootName,this.textureId=e.textureId,this._width=e.width,this._height=e.height,this._internalFormat=e.internalFormat,this.arrayBufferView=e.arrayBufferView,this.refCount=1,this.ready=!1,this.renderable=!1,t$$(this.arrayBufferView)&&this.init()},_0x248355.prototype.destroy=function(){this.gl.deleteTexture(this._texture),this._texture=null,this.refCount=0,this.ready=!1,this.renderable=!1,this.context.memorySize-=this._sizeInBytes};var _0x4f68cd=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1a0bc4=_0x4f68cd(void 0,(function(){return _0x1a0bc4.toString().search("(((.+)+)+)+$").toString().constructor(_0x1a0bc4).search("(((.+)+)+)+$")}));_0x1a0bc4();var _0x33811f={cache:{},cacheSize:0,freeCache:{},freeQueue:new i$Y,freeCacheSize:0,throttleSize:52428800,getCache:function(e,t,i){var n=this.cache[e];t$$(n)||(n=this.cache[e]={});var r=n[t];t$$(r)||(r=n[t]={});var o=r[i];return t$$(o)||(o=r[i]={}),o},get:function(e,t,i,n){var r=this.getCache(e,t,i)[n];if(t$$(r))return r.refCount++,r},create:function(e){var t=e.context,i=t.id,n=e.layerId,r=e.rootName,o=e.textureId,a=this.getCache(i,n,r),s=a[o];if(t$$(s))return s.refCount++,s;var l=e.width,u=e.height,c=e.compressType,h=e.supportCompressType,d=e.pixelFormat,f=e.arrayBufferView;return s=new _0x248355({context:t,layerId:n,rootName:r,textureId:o,width:l,height:u,compressType:c,supportCompressType:h,pixelFormat:d,internalFormat:e.internalFormat,arrayBufferView:f}),a[o]=s,s},del:function(e){if(t$$(e.contextId)){var t=this.getCache(e.contextId,e.layerId,e.rootName);!t$$(t[e.textureId])||0==--e.refCount&&(delete t[e.textureId],e.destroy())}}},_0x50c0b1=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x534739=_0x50c0b1(void 0,(function(){return _0x534739.toString().search("(((.+)+)+)+$").toString().constructor(_0x534739).search("(((.+)+)+)+$")}));function _0x3ce42d(){this.isRoot=!1,this.isLeaf=!1,this.ownerLayerName=void 0,this._refCount=0,this.ownerEntity=void 0,this._ambientColor=new a$10(1,1,1,1),this._diffuseColor=new a$10(1,1,1,1),this._specularColor=new a$10(0),this._texMatrix=c$1a.clone(c$1a.IDENTITY,new c$1a),this._shininess=50,this._bTransparentSorting=!1,this._textures=[],this._created=!1,this._createdBaker=!1,this._subRequested=!1,this._subRequestedBaker=!1,this._subRequestNames=void 0,this._subRequestNamesBake=void 0,this._subTextureNames=void 0,this._subTextureNamesBake=void 0,this._subBatchValues=void 0,this._oriTextureBake=void 0,this._batchTable=void 0,this._batchTableBake=void 0,this._ancestorTexture=void 0,this._oriTexture=void 0,this.textureParameter=void 0,this.textureParameterBake=void 0,this.textureInitilized=!1,this.textureBakeInitilized=!1,this.textureRenderableFlag=!1,this.textureBakeRenderableFlag=!1,this.isCrnTexture=!1,this.hasTexture=!0,this.taskMap={},this._usePBR=!1}function _0x5d4695(e){if(!t$$(e))return this._offsetPeriod=0,this._offsetSpeedU=0,this._offsetSpeedV=0,this._tilingPeriod=0,this._tilingSpeedU=0,void(this._tilingSpeedV=0);this._offsetPeriod=e.OffsetPeriod,this._offsetSpeedU=e.OffsetSpeedU,this._offsetSpeedV=e.OffsetSpeedV,this._tilingPeriod=e.TilingPeriod,this._tilingSpeedU=e.TilingSpeedU,this._tilingSpeedV=e.TilingSpeedV}_0x534739(),_0x3ce42d.prototype.createPBRParamter=function(e){if(t$$(e.pbrMetallicRoughness)&&!this._usePBR){var t=e.pbrMetallicRoughness;this._usePBR=!0,this._alphaCutoff=e$1Y(t.alphaCutoff,e.alphaCutoff),this._alphaMode=e$1Y(t.alphaMode,e.alphaMode),this._baseColor=new e$1z(t.baseColor.x,t.baseColor.y,t.baseColor.z,t.baseColor.w),this._baseColorTextureIndex=t.baseColorTextureIndex,this._baseColorTextureCoordIndex=t.baseColorTextureCoordIndex,this._doubleSided=t.doubleSided,this._emissiveFactor=new e$1z(t.emissiveFactor.x,t.emissiveFactor.y,t.emissiveFactor.z,1),this._emissiveTextureIndex=t.emissiveTextureIndex,this._emissiveTextureCoordIndex=t.emissiveTextureCoordIndex,this._roughnessFactor=t.roughnessFactor,this._metallicFactor=t.metallicFactor,this._metallicRoughnessTextureIndex=t.metallicRoughnessTextureIndex,this._metallicRoughnessTextureCoordIndex=t.metallicRoughnessTextureCoordIndex,this._normalTextureIndex=t.normalTextureIndex,this._normalTextureCoordIndex=t.normalTextureCoordIndex,this._normalTextureScale=t.normalTextureScale,this._occlusionTextureIndex=t.occlusionTextureIndex,this._occlusionTextureCoordIndex=t.occlusionTextureCoordIndex,this._occlusionTextureStrength=t.occlusionTextureStrength,this._baseColorTextureMotion=new _0x5d4695(t.baseColorTextureMotion),this._emissiveTextureMotion=new _0x5d4695(t.emissiveTextureMotion)}};var _0x5824eb={};function _0x3b263c(e,t,i){for(var n in i)if(i.hasOwnProperty(n)){var r=i[n],o=Number(n);t.setBatchedAttribute(o,0,r)}t.update(e)}function _0x4194e5(e,t,i,n,r,o){var a=r[n];if(t$$(a)){for(var s=_0x33811f.get(e,t,i,a);t$$(a)&&t$$(s)&&!s.renderable;)s.refCount--,a=r[a],s=_0x33811f.get(e,t,i,a);return o.name=a,s}}function _0x2cb297(e){var t=e.indexOf(".");return e.substr(0,t)}_0x3ce42d.prototype.createBakeTexture=function(e,t,i,n,r,o,a,s){if(!this._createdBaker){this.textureParameterBake={context:e,layer:t,isRoot:i,rootName:n,curTextureName:r,textureInfo:o,rootBatchIdMap:a,ancestorMap:s};var l=t._textureLod;this._createdBaker=!0,this._subRequestedBaker=i&&l;var u=o.textureData,c=Z$_.RGBA_DXT5,h=_0x33811f.create({context:e,layerId:t.id,rootName:n,textureId:o.id,width:o.width,height:o.height,compressType:o.compressType,supportCompressType:t._supportCompressType,pixelFormat:o.format,internalFormat:c,arrayBufferView:u});h.renderable=i&&l;var d=o.subTexInfos.length,f=a[o.rootTextureName];if(this._textures.push(h),l){var p=[{functionName:"czm_batchTable_xywh2",componentDatatype:C$12.FLOAT,componentsPerAttribute:4}],_=t$$(f)?Object.keys(f).length:d;this._batchTableBake=new p$U(e,p,_),this._batchTableBake.suffix="_2";var m=_0x5824eb[t.name];t$$(m)||(m=_0x5824eb[t.name]={});var $=m[n];t$$($)||($=m[n]={});var g=$[r];t$$(g)||(g=$[r]={});for(var y=o.subTexInfos,v=0;v<d;v++){var x=y[v],b=x.subName.split("_")[0],S=new a$10(x.offsetX,x.offsetY,x.width,x.height);g[b]=S}}if(!i||!l){this._subRequestNamesBake=[];for(v=0;v<o.requestNames.length;v++){var w=o.requestNames[v],C=_0x2cb297(w);if("Tex"===C.split("_")[0]){var T=w.split("#"),P=_0x2cb297(T[0]);if(T.length>1)for(var E=T[1],A=E.length,L=0;L<A;L+=3){var M=P+"_"+E.substring(L,L+3);this._subRequestNamesBake.push(M)}}else this._subRequestNamesBake.push(C)}}return this._oriTextureBake=h,h}},_0x3ce42d.prototype.initTexture=function(){if(!this.textureInitilized&&t$$(this.textureParameter)){this.textureInitilized=!0;var e=this.textureParameter.context,t=this.textureParameter.layer,i=this.textureParameter.isRoot,n=this.textureParameter.rootName,r=this.textureParameter.curTextureName,o=this.textureParameter.textureInfo,a=this.textureParameter.rootBatchIdMap,s=this.textureParameter.ancestorMap;this.textureParameter=void 0;var l={},u=a[o.rootTextureName],c=i||!t._textureLod?void 0:_0x4194e5(e.id,t.id,n,r,s,l),h=_0x5824eb[t.name];t$$(h)||(h=_0x5824eb[t.name]={});var d=h[n];t$$(d)||(d=h[n]={});var f=d[r];t$$(f)||(f=d[r]={});for(var p=i?void 0:t$$(l.name)?d[l.name]:void 0,_={},m=o.subTexInfos,$=[],g=o.subTexInfos.length,y=0;y<g;y++){var v=m[y];if($.push(v.subName),t._textureLod){var x=v.subName.split("_")[0],b=new a$10(v.offsetX,v.offsetY,v.width,v.height),S=t$$(u)?u[x]:y,w=i?void 0:t$$(p)?p[x]:void 0,C=t$$(w)?w:b;this._batchTable.setBatchedAttribute(S,0,C),_[S]=b,f[x]=b}}this._subTexInfos=m,this._subTextureNames=$,this._subBatchValues=_,this._ancestorTexture=c}},_0x3ce42d.prototype.initBakeTexture=function(){if(!this.textureBakeInitilized&&t$$(this.textureParameterBake)){this.textureBakeInitilized=!0;var e=this.textureParameterBake.context,t=this.textureParameterBake.layer,i=this.textureParameterBake.isRoot,n=this.textureParameterBake.rootName,r=this.textureParameterBake.curTextureName,o=this.textureParameterBake.textureInfo,a=this.textureParameterBake.rootBatchIdMap,s=this.textureParameterBake.ancestorMap;this.textureParameterBake=void 0;var l={},u=a[o.rootTextureName],c=i||!t._textureLod?void 0:_0x4194e5(e.id,t.id,n,r,s,l),h=_0x5824eb[t.name];t$$(h)||(h=_0x5824eb[t.name]={});var d=h[n];t$$(d)||(d=h[n]={});var f=d[r];t$$(f)||(f=d[r]={});for(var p=i?void 0:t$$(l.name)?d[l.name]:void 0,_={},m=o.subTexInfos,$=[],g=o.subTexInfos.length,y=0;y<g;y++){var v=m[y];if($.push(v.subName),t._textureLod){var x=v.subName.split("_")[0],b=new a$10(v.offsetX,v.offsetY,v.width,v.height),S=t$$(u)?u[x]:y,w=i?void 0:t$$(p)?p[x]:void 0,C=t$$(w)?w:b;this._batchTableBake.setBatchedAttribute(S,0,C),_[S]=b,f[x]=b}}this._subTexInfosBake=m,this._subTextureNamesBake=$,this._subBatchValuesBake=_,this._ancestorTextureBake=c}},_0x3ce42d.prototype.createTexture=function(e,t,i,n,r,o,a,s){if(!this._created){this.isCrnTexture=o.compressType===_0x5ce781.CRN_DXT5,this.textureParameter={context:e,layer:t,isRoot:i,rootName:n,curTextureName:r,textureInfo:o,rootBatchIdMap:a,ancestorMap:s};var l=t._textureLod;this.isRoot=i&&l,this._created=!0,this._subRequested=i&&l;var u=o.textureData,c=Z$_.RGBA_DXT5,h=_0x33811f.create({context:e,layerId:t.id,rootName:n,textureId:o.id,width:o.width,height:o.height,compressType:o.compressType,supportCompressType:t._supportCompressType,pixelFormat:o.format,internalFormat:c,arrayBufferView:u});h.renderable=i&&l;var d=o.subTexInfos.length,f=a[o.rootTextureName];if(this._textures.push(h),l){var p=[{functionName:"czm_batchTable_xywh",componentDatatype:C$12.FLOAT,componentsPerAttribute:4}],_=t$$(f)?Object.keys(f).length:d;this._batchTable=new p$U(e,p,_),this._batchTable.suffix="_1";var m=_0x5824eb[t.name];t$$(m)||(m=_0x5824eb[t.name]={});var $=m[n];t$$($)||($=m[n]={});var g=$[r];t$$(g)||(g=$[r]={});for(var y=o.subTexInfos,v=0;v<d;v++){var x=y[v],b=x.subName.split("_")[0],S=new a$10(x.offsetX,x.offsetY,x.width,x.height);g[b]=S}}if(!i||!l){this._subRequestNames=[];for(v=0;v<o.requestNames.length;v++){var w=o.requestNames[v],C=_0x2cb297(w);if("Tex"===C.split("_")[0]){var T=w.split("#"),P=_0x2cb297(T[0]);if(T.length>1)for(var E=T[1],A=E.length,L=0;L<A;L+=3){var M=P+"_"+E.substring(L,L+3);this._subRequestNames.push(M)}}else this._subRequestNames.push(C)}}return this.isLeaf=!(i&&l||1===o.requestNames.length&&o.requestNames[0]===r),this._oriTexture=h,h}},_0x3ce42d.prototype.requestSubTextures=function(e,t,i,n){if(!this._subRequested&&t$$(this._subRequestNames)){for(var r=this._subRequestNames,o=this._subTexInfos,a=this._subTextureNames,s=this._subBatchValues,l=this._oriTexture,u=[],c=i._baseUri,h=t._subTextureManager,d=0,f=r.length;d<f;d++){var p=r[d];if(t$$($=h.get(i._id,c,p,this))){var _=$.result;for(var m in u.push(d),_)if(_.hasOwnProperty(m)){var $=_[m],g=a.indexOf(m);if(g<0&&this.isLeaf)continue;var y=0,v=0,x=$.width,b=$.height;if(g>=0){var S=o[g];y=S.offsetX,v=S.offsetY}this.isLeaf?n.enqueue({texture:l,subTextureInfo:{xOffset:y,yOffset:v,width:x,height:b,arrayBufferView:$.arrayBufferView}}):l.arrayBufferView=$.arrayBufferView}}}if(u.length===r.length)r.length=0;else{var w=0;for(d=0,f=u.length;d<f;d++)r.splice(u[d]-w,1),w++}0===r.length&&(this.textureRenderableFlag=!0,this.isLeaf||l.init(),i._textureLod&&_0x3b263c(e,this._batchTable,s),this._subRequested=!0,this._subRequestNames=void 0,this._subTextureNames=void 0,this._subBatchValues=void 0,this._subTexInfos=void 0)}},_0x3ce42d.prototype.requestBakeSubTextures=function(e,t,i,n){if(!this._subRequestedBaker&&t$$(this._subRequestNamesBake)){for(var r=this._subRequestNamesBake,o=this._subTexInfosBake,a=this._subTextureNamesBake,s=this._subBatchValuesBake,l=this._oriTextureBake,u=[],c=i._baseUri,h=t._subTextureManager,d=0,f=r.length;d<f;d++){var p=r[d];if(t$$($=h.get(i._id,c,p,this))){var _=$.result;for(var m in u.push(d),_)if(_.hasOwnProperty(m)){var $=_[m],g=a.indexOf(m);if(g<0&&this.isLeaf)continue;var y=0,v=0,x=$.width,b=$.height;if(g>=0){var S=o[g];y=S.offsetX,v=S.offsetY}n.enqueue({texture:l,subTextureInfo:{xOffset:y,yOffset:v,width:x,height:b,arrayBufferView:$.arrayBufferView}})}}}if(u.length===r.length)r.length=0;else{var w=0;for(d=0,f=u.length;d<f;d++)r.splice(u[d]-w,1),w++}0===r.length&&(this.textureBakeRenderableFlag=!0,this.isLeaf||l.init(),this._subRequestedBaker=!0,this._subRequestNamesBake=void 0,this._subTextureNamesBake=void 0,this._subBatchValuesBake=void 0,this._subTexInfosBake=void 0,i._textureLod&&_0x3b263c(e,this._batchTableBake,s))}},_0x3ce42d.prototype.enableTextureRenderable=function(){if(this.textureRenderableFlag){this.textureRenderableFlag=!1;var e=this._oriTexture;e.renderable=!0,t$$(this._ancestorTexture)&&this._ancestorTexture.textureId!==e.textureId&&_0x33811f.del(this._ancestorTexture),this._textures[0]=e,this._oriTexture=void 0,this._ancestorTexture=void 0}},_0x3ce42d.prototype.enableBakeTextureRenderable=function(){if(this.textureBakeRenderableFlag){this.textureBakeRenderableFlag=!1;var e=this._oriTextureBake;e.renderable=!0,t$$(this._ancestorTextureBake)&&this._ancestorTextureBake.textureId!==e.textureId&&_0x33811f.del(this._ancestorTextureBake),this._textures[1]=e,this._oriTextureBake=void 0,this._ancestorTextureBake=void 0}},_0x3ce42d.prototype.isDestroyed=function(){return!1},_0x3ce42d.prototype.destroy=function(e){this._ambientColor=null,this._diffuseColor=null,this._specularColor=null;for(var t=0,i=this._textures.length;t<i;t++){var n=this._textures[t];_0x33811f.del(n)}this._textures.length=0,this._batchTable=this._batchTable&&this._batchTable.destroy(),this._batchTableBake=this._batchTableBake&&this._batchTableBake.destroy(),this._subTexInfos=void 0,this._subTextureNames=void 0,this._subBatchValues=void 0,this._subTextureNamesBake=void 0,this._subTexInfosBake=void 0,t$$(this._ancestorTexture)&&this._ancestorTexture.textureId!==this._oriTexture.textureId&&_0x33811f.del(this._ancestorTexture),this._oriTexture=void 0,this._ancestorTexture=void 0,this.ownerEntity=void 0,this.textureParameter=void 0,this._oriTextureBake=void 0;var r=e._context;if(t$$(this._subRequestNames)){for(t=0,i=this._subRequestNames.length;t<i;t++){var o=(a=this._subRequestNames[t]).split(".")[0];o=(s=a.indexOf("%23"))>-1?o+a.substring(s):o,r._subTextureManager.del(e._id,o)}this._subRequestNames=void 0}if(t$$(this._subRequestNamesBake)){for(t=0,i=this._subRequestNamesBake.length;t<i;t++){var a,s;o=(a=this._subRequestNamesBake[t]).split(".")[0];o=(s=a.indexOf("%23"))>-1?o+a.substring(s):o,r._subTextureManager.del(e._id,o)}this._subRequestNames=void 0}if(t$$(this.taskMap))for(var l in this.taskMap)if(this.taskMap.hasOwnProperty(l)){var u=this.taskMap[l];_0xb658ed.cancelTask(u)}return this.taskMap=void 0,s$1e(this)};var _0x48f00c=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x59143f=_0x48f00c(void 0,(function(){return _0x59143f.toString().search("(((.+)+)+)+$").toString().constructor(_0x59143f).search("(((.+)+)+)+$")}));function _0x2b7210(){this.cache={}}_0x59143f(),_0x2b7210.prototype.create=function(e){var t=this.cache[e];return t$$(t)?t._refCount++:(t=new _0x3ce42d,this.cache[e]=t),t},_0x2b7210.prototype.free=function(e,t){var i=this.cache[t];!t$$(i)||0==--i._refCount&&(delete this.cache[t],i.destroy(e))};var _0x2e0892=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x109860=_0x2e0892(void 0,(function(){return _0x109860.toString().search("(((.+)+)+)+$").toString().constructor(_0x109860).search("(((.+)+)+)+$")}));_0x109860();var _0x2e64b6={UnLoad:0,Loading:1,Loaded:2,Parsing:3,Ready:4,Failed:5};function _0x59fce4(){this.state={},this.cache={},this.zipBufferCache={},this.list=new s$15,this.requests=[],this.requestPriorityMap={},this.requestMap={},this.parseTaskMap={},this.tablenames=[],this.indexedDBSchedulers=[]}var _0x1c8f78=0,_0x551e2e=209715200;_0x59fce4.prototype.prepareRequest=function(e,t,i,n,r){var o=e+"_"+i;if(!t$$(this.requestMap[o])){var a=t+i+".texblock",s=new r$V({url:a,throttle:!0,throttleByServer:!0,type:4,priorityFunction:function(){return n._disFromCamera}});s.quadKey=i,s.providerName=r.ownerLayerName;var l=this.requestPriorityMap[n._priority];t$$(l)||(l=this.requestPriorityMap[n._priority]=[]),l.push({request:s,url:a,keyWord:o,priority:s.priorityFunction()}),this.requestMap[o]=s}};var _0x444f71=function(e,t){return e.priority-t.priority};function _0x219712(e,t){var i=new DataView(e),n=0,r=i.getUint32(n,!0);if(!(t>r-1||r>256)){n+=4;var o,a,s=[];for(o=0;o<r;o++)a=i.getUint32(n,!0),s.push(a),n+=4;for(o=0;o<r;o++){if(a=s[o],o===t)return 0===a?void 0:new Uint8Array(e).slice(n,n+a).buffer;n+=a}}}function _0x3de483(e){return function(){return e._disFromCamera}}_0x59fce4.prototype.processRequests=function(e){var t=0;for(var i in this.requestPriorityMap)if(this.requestPriorityMap.hasOwnProperty(i)){if(t===r$U.perPacketCount){for(var n=0,r=(a=this.requestPriorityMap[i]).length;n<r;n++){var o=a[n];delete this.requestMap[o.keyWord]}continue}var a;(a=this.requestPriorityMap[i]).sort(_0x444f71);for(n=0,r=a.length;n<r;n++){o=a[n];if(this.load(o,e),++t===r$U.perPacketCount)break}for(;n<r;n++){o=a[n];delete this.requestMap[o.keyWord]}}this.requestPriorityMap={}},_0x59fce4.prototype.load=function(e,t){var i=this.tablenames[t.id];if(!t$$(i))return this.request(e,t);var n=e.keyWord,r=this,o=n.indexOf("_"),a=this.indexedDBSchedulers[t.id].getElementFromDB(i,n.slice(o+1));return t$$(a)?a.then((function(i){if(!t$$(i))return r.request(e,t);var o={keyWord:t.id+"_"+i.keyWord,result:i.result,byteLength:i.byteLength},a=r.list.add(o);r.cache[n]=a,r.state[n]=_0x2e64b6.Ready,delete r.state[n],delete r.parseTaskMap[n],_0x1c8f78+=i.byteLength;for(var s=r.list.head;_0x1c8f78>_0x551e2e;){var l=s,u=s.item.keyWord,c=r.cache[u].item;_0x1c8f78-=c.byteLength,delete r.cache[u],s=s.next,r.list.remove(l)}}),(function(i){return r.request(e,t)})):r.request(e,t)},_0x59fce4.prototype.request=function(e,t){var i=e.keyWord,n=e.request,r=u$S(e.url,void 0,n);if(t$$(r)){this.state[i]=_0x2e64b6.Loading;var o=this;r.then((function(e){if(t._layerScheduler._prepareLoaded||t._layerScheduler.dealWithPrepareLoad(e.byteLength),delete o.requestMap[i],t$$(o.state[i])){o.state[i]=_0x2e64b6.Loaded;var r=_0x219712(e,n.quadKeyIndex);if(!t$$(r))return delete o.requestMap[i],void(o.state[i]=_0x2e64b6.Failed);var a=new Uint8Array(r),s=new DataView(r),l=0,u=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT,o.zipBufferCache[i]=[];for(var c=0;c<u;c++){var h=s.getUint32(l,!0),d=c$X(a,l+=Uint32Array.BYTES_PER_ELEMENT,h);l+=h;var f=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;var p=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;var _=new Uint8Array(r).slice(l,l+p);o.zipBufferCache[i].push({unzipLength:f,zippedLength:p,zipBuffer:_,name:d}),l+=p}}}),(function(e){delete o.requestMap[i],o.state[i]=t$$(e)?_0x2e64b6.Failed:_0x2e64b6.UnLoad}))}else delete this.requestMap[i]},_0x59fce4.prototype.parse=function(e,t){if(!this.parseTaskMap[e]){var i=this.zipBufferCache[e];if(!t$$(i))return void(this.state[e]=_0x2e64b6.UnLoad);var n=t.taskMap[e];t$$(n)||(n=t.taskMap[e]={data:{data:i,isCRN:t.isCrnTexture},priority:t.ownerEntity._disFromCamera,state:0,priorityFunction:_0x3de483(t.ownerEntity),processorName:"UnZipData"});var r=_0xb658ed.startTask(n);if(t$$(r)){this.parseTaskMap[e]=!0,this.state[e]=_0x2e64b6.Parsing;var o=this;r.then((function(i){try{delete o.zipBufferCache[e],delete t.taskMap[e];for(var n=i.data,r={},a=0;a<n.length;a++){var s=n[a],l=s.name,u=new Uint8Array(s.unzipBuffer).buffer,c=new DataView(u),h=0;c.getUint32(h,!0);h+=Uint32Array.BYTES_PER_ELEMENT;var d=c.getUint32(h,!0);h+=Uint32Array.BYTES_PER_ELEMENT;var f=c.getUint32(h,!0);h+=Uint32Array.BYTES_PER_ELEMENT;c.getUint32(h,!0);h+=Uint32Array.BYTES_PER_ELEMENT;var p=c.getUint32(h,!0);h+=Uint32Array.BYTES_PER_ELEMENT;var _=new Uint8Array(u,h,p);h+=p,r[l]={width:d,height:f,arrayBufferView:_}}var m={keyWord:e,result:r,byteLength:u.byteLength},$=o.list.add(m);o.cache[e]=$,o.state[e]=_0x2e64b6.Ready;var g=e.indexOf("_"),y=e.slice(0,g),v=e.slice(g+1);if(t$$(o.indexedDBSchedulers[y])){var x={blob:{keyWord:v,result:r,byteLength:u.byteLength},key:v,tablename:o.tablenames[y],dbname:o.indexedDBSchedulers[y].dbname};_0xb658ed.indexTaskProcessor.scheduleTask(x,[])}delete o.state[e],delete t.taskMap[e],delete o.parseTaskMap[e],_0x1c8f78+=u.byteLength;for(var b=o.list.head;_0x1c8f78>_0x551e2e;){var S=b.item,w=b,C=S.keyWord,T=o.cache[C].item;_0x1c8f78-=T.byteLength,delete o.cache[C],b=b.next,o.list.remove(w)}}catch(e){console.log(e),console.log(t.ownerEntity)}})).otherwise((function(i){delete t.taskMap[e],delete o.parseTaskMap[e],t$$(o.state)&&(t$$(i)?(console.log(i),o.state[e]=_0x2e64b6.Failed):o.state[e]=_0x2e64b6.Loaded)}))}}},_0x59fce4.prototype.get=function(e,t,i,n){var r=e+"_"+i,o=this.cache[r];if(t$$(o))return this.list.splice(this.list.tail,o),o.item;var a=this.state[r];t$$(a)||(a=this.state[r]=_0x2e64b6.UnLoad),a===_0x2e64b6.UnLoad&&this.prepareRequest(e,t,i,n.ownerEntity,n),a===_0x2e64b6.Loaded&&this.parse(r,n)},_0x59fce4.prototype.del=function(e,t){var i=e+"_"+t;delete this.state[i],delete this.zipBufferCache[i];var n=this.requestMap[i];t$$(n)&&(n.cancelled=!0,delete this.requestMap[i])};var _0x35962d=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x45cacd=_0x35962d(void 0,(function(){return _0x45cacd.toString().search("(((.+)+)+)+$").toString().constructor(_0x45cacd).search("(((.+)+)+)+$")}));_0x45cacd();var _0x2ca94e=null,_0x598b22=null;function _0x3065fa(){this._taskProcessorReady=!1}function _0x2df198(e,t,i){for(var n=e.length/4,r=new Float32Array(e.buffer,e.byteOffset,n),o=0;o<r.length;o++){var a,s,l,u,c=r[o],h=4*o,d=new a$10(0,0,0,0);if(c>=0&&c<=1){c<n$1d.EPSILON9?c=n$1d.EPSILON9:1-c<n$1d.EPSILON9&&(c=1-n$1d.EPSILON9);var f=_0x2fb833(c);d.x=f.x,d.y=f.y,d.z=f.z,d.w=1}a=255*d.x,s=255*d.y,l=255*d.z,u=255*d.w,t$$(i)&&!0===i?(e[h+0]=l,e[h+1]=s,e[h+2]=a,e[h+3]=u):(e[h+0]=a,e[h+1]=s,e[h+2]=l,e[h+3]=u)}return new Uint8Array(e.buffer,0,e.length)}function _0x2e64a7(e,t,i){for(var n=new Uint8Array(4*e.length),r=0;r<e.length;r++){var o,a,s,l,u=e[r],c=4*r,h=new a$10(0,0,0,0);if(u>=0&&u<=1){var d=_0x2fb833(u);h.x=d.x,h.y=d.y,h.z=d.z,h.w=1}o=255*h.x,a=255*h.y,s=255*h.z,l=255*h.w,t$$(i)&&!0===i?(n[c+0]=parseInt(s),n[c+1]=parseInt(a),n[c+2]=parseInt(o),n[c+3]=parseInt(l)):(n[c+0]=parseInt(o),n[c+1]=parseInt(a),n[c+2]=parseInt(s),n[c+3]=parseInt(l))}return n}function _0x5b82bf(e,t){for(var i=e.length/4,n=new Float32Array(e.buffer,e.byteOffset,i),r=0;r<n.length;r++){var o=n[r],a=4*r;if(o<0||o>1)e[a+0]=255,e[a+1]=255,e[a+2]=255,e[a+3]=255;else{o=o*(t._ceiling-t._floor)+t._floor;var s=t._dictColorTable.getColor(o);e[a+0]=255*s.red,e[a+1]=255*s.green,e[a+2]=255*s.blue,e[a+3]=255*s.alpha}}return new Uint8Array(e.buffer,0,e.length)}function _0x285815(e,t){var i=e.length/4;return _0x3123b4(new Float32Array(e.buffer,e.byteOffset,i),t)}function _0x2fb833(e){var t=new a$11(1,255,65025);(t=a$11.multiplyByScalar(t,e,t)).x=t.x-Math.floor(t.x),t.y=t.y-Math.floor(t.y),t.z=t.z-Math.floor(t.z);var i=new a$11,n=new a$11(1/255,1/255,0);return i.x=t.y*n.x,i.y=t.z*n.y,i.z=t.z*n.z,t=a$11.subtract(t,i,t)}function _0x5a3142(e,t){for(var i=new Uint8Array(4*e.length),n=t._ceiling-t._floor,r=0,o=e.length;r<o;r++){var a=e[r],s=4*r;if(a<0||a>1)i[s+0]=255,i[s+1]=255,i[s+2]=255,i[s+3]=255;else{a=a*n+t._floor;var l=t._dictColorTable.getColor(a);i[s+0]=255*l.red,i[s+1]=255*l.green,i[s+2]=255*l.blue,i[s+3]=255*l.alpha}}return i}function _0x3123b4(e,t){var i=e,n=i.length,r=_0x4c1f6f._malloc(Float32Array.BYTES_PER_ELEMENT*n);_0x4c1f6f.HEAPF32.set(i,r/Float32Array.BYTES_PER_ELEMENT);var o=t._ceiling,a=t._floor,s=t._dictColorTable._dictTable._hash,l=[],u=[];for(var c in s)l.push(parseFloat(c));l.sort((function(e,t){return e-t}));for(var h=0,d=l.length;h<d;h++)u.push(s[l[h]]);var f=new ArrayBuffer(4*l.length),p=new Uint8Array(f),_=0;for(d=l.length;_<d;_++){var m=u[_];p[4*_]=255*m.red,p[4*_+1]=255*m.green,p[4*_+2]=255*m.blue,p[4*_+3]=255*m.alpha}var $=new Float32Array(f),g=(c=new Float32Array(l)).length,y=_0x4c1f6f._malloc(Float32Array.BYTES_PER_ELEMENT*g);_0x4c1f6f.HEAPF32.set(c,y/Float32Array.BYTES_PER_ELEMENT);var v=_0x4c1f6f._malloc(Float32Array.BYTES_PER_ELEMENT*g);_0x4c1f6f.HEAPF32.set($,v/Float32Array.BYTES_PER_ELEMENT);var x=_0x2ca94e(r,n,o,a,y,v,g),b=new Uint8Array(_0x4c1f6f.HEAPU8.buffer,x,4*n);return _0x598b22(x),_0x4c1f6f._free(r),_0x4c1f6f._free(y),_0x4c1f6f._free(v),b}function _0x3a4d52(e,t,i,n){var r=c$1a.multiply(t,i,new c$1a),o=e.vertexAttributes[0],a=o.typedArray,s=new Float32Array(a.buffer,a.byteOffset,a.byteLength/4),l=o.componentsPerAttribute,u=e.verticesCount,c=new Float32Array(3*u),h=e.attrLocation;h.aRatio=Object.keys(h).length;for(var d=0;d<u;d++){var f=new a$11(s[d*l],s[d*l+1],s[d*l+2]),p=new a$11;c$1a.multiplyByPoint(r,f,p);var _=i$1g.fromCartesian(p),m=n$1d.toDegrees(_.longitude),$=n$1d.toDegrees(_.latitude),g=_.height,y=(m-n.left)/n.width,v=($-n.bottom)/n.length,x=(g-n.minHeight)/n.height;c[3*d]=y,c[3*d+1]=v,c[3*d+2]=x}e.vertexAttributes.push({index:h.aRatio,typedArray:c,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1})}async function _0x59f5b6(e,t,i){e._version=i.version,e._dataVersion=i.dataVersion,e._gl;var n=i.groupNode,r=i.geoPackage,o=i.matrials.material,a=e._context,s=e.materialManager;if(t$$(s)||(s=e.materialManager=new _0x2b7210),t$$(a._subTextureManager)||(a._subTextureManager=new _0x59fce4),e.indexedDBSetting.isGeoTilesSave&&!t$$(a._subTextureManager.indexedDBSchedulers[e.id])&&t$$(e._layerScheduler._indexedDBScheduler)&&(a._subTextureManager.indexedDBSchedulers[e.id]=e._layerScheduler._indexedDBScheduler,a._subTextureManager.tablenames[e.id]=e._layerScheduler.tablename+"Texture"),e._layerScheduler._prepareLoaded||!t._prepareLoad)for(var l=0,u=o.length;l<u;l++){var c=o[l].material,h=c.id,d=s.create(h);d.createPBRParamter(c),d.ownerLayerName=e.name,d.ownerEntity=t;var f=c.ambient;t$$(f)&&(d._ambientColor=new e$1z(f.r,f.g,f.b,f.a));var p=c.diffuse;t$$(p)&&(d._diffuseColor=new e$1z(p.r,p.g,p.b,p.a));var _=c.specular;t$$(_)&&(d._specularColor=new e$1z(_.r,_.g,_.b,_.a)),d._shininess=e$1Y(c.shininess,d._shininess),d._bTransparentSorting=e$1Y(c.transparentsorting,!1),d.id=h;for(var m=c.textureunitstates,$=0;$<m.length;$++){var g=m[$].textureunitstate,y=g.id;0===g.addressmode.u?j$13.REPEAT:j$13.CLAMP_TO_EDGE,0===g.addressmode.v?j$13.REPEAT:j$13.CLAMP_TO_EDGE;var v=i.texturePackage[y];if(t$$(v)){if(t$$(v.textureData))switch(v.compressType){case _0x5ce781.CRN_DXT5:if(_0xb658ed.CRNTaskProcessorReady&&!v.isDXT){var x=l$S(_0xb658ed.CRNProcessor,v.textureData,!0);await x.then((e=>{v.textureData=e._buffer}))}break;case _0x5ce781.STANDARD_CRN:x=I$W(v.textureData,!0,!0);await x.then((e=>{v.textureData=e._buffer}))}var b;t$$(b=0===$?d.createTexture(a,e,t._isRootTile,t._rootName,y,v,i.rootBatchIdMap,i.ancestorMap):d.createBakeTexture(a,e,t._isRootTile,t._rootName,y,v,i.rootBatchIdMap,i.ancestorMap))&&(t._texturesByteLength+=b._sizeInBytes)}}}var S=e._matModel,w=n.pageLods,C=!0;for(l=0;l<w.length;l++){var T=new _0x10562c;T._fileType=e._fileType;var P=w[l];if(""===P.childTile?T._isLeafNode=!0:C=!1,T._rangeMode=P.rangeMode,T._rangeDataList=P.childTile,T._rangeList=P.rangeList,-1===P.boundingSphere.radius&&(P.boundingSphere.radius=6378137),T._isLeafNode||(T._boundingSphere=new c$19(P.boundingSphere.center,P.boundingSphere.radius),c$19.transform(T._boundingSphere,e._matModel,T._boundingSphere)),t$$(P._obb)){var E=a$11.fromElements(P._obb.obbCenter.x,P._obb.obbCenter.y,P._obb.obbCenter.z);c$1a.multiplyByPoint(e._matModel,E,E);var A=a$10.fromElements(P._obb.xExtent.x,P._obb.xExtent.y,P._obb.xExtent.z,0),L=a$10.fromElements(P._obb.yExtent.x,P._obb.yExtent.y,P._obb.yExtent.z,0),M=a$10.fromElements(P._obb.zExtent.x,P._obb.zExtent.y,P._obb.zExtent.z,0);c$1a.multiplyByVector(e._matModel,A,A),c$1a.multiplyByVector(e._matModel,L,L),c$1a.multiplyByVector(e._matModel,M,M);var I=new r$W(A.x,L.x,M.x,A.y,L.y,M.y,A.z,L.z,M.z);T._orientedBoundingBox=new b$1o(E,I)}var O=P.geodes,D=[];if(e._layerScheduler._prepareLoaded||!t._prepareLoad)for(var R=0;R<O.length;R++){var N,F=O[R],B=F.matrix;if(1===e._heightScale)N=c$1a.multiply(S,B,new c$1a);else{var z=c$1a.multiplyByScale(B,new a$11(1,1,e._heightScale),new c$1a);N=c$1a.multiply(S,z,new c$1a)}for(var G=F.skeletonNames,k=0;k<G.length;k++){var U=G[k],V=r[U],W=V.vertexPackage;if(_0x120aaa(V,e)){var H;if(T._isLeafNode){var Y=W.boundingSphere;t$$(Y)?(H=new c$19(Y.center,Y.radius),c$19.transform(H,N,H)):H=_0x1af262.calcBoundingSphere(e,W,N),D.push(H)}var j=_0x1af262.calcBoundingRectangle(e,W),q=V.arrIndexPackage,X=V.pickInfo,K={};for(u=0;u<q.length&&u<1;u++){var Z=q[u];if(t$$(Z)){h=Z.materialCode;var J=s.create(h);K[h]=J}}var Q={context:e._context,vertexPackage:W,arrIndexPackage:q,edgeGeometry:V.edgeGeometry,pickInfo:X,version:i.version,mapPass:K,layer:e,entity:t,matModel:N,boundingVolume:T._boundingSphere?T._boundingSphere:H,boundingRectangle:j,volObj:null,fileType:e._fileType,isS3MB:e._isS3MB,geoMatrix:B,dataType:e._dataType,level:e._level,geoName:U,isS3MBlock:!0};if(t$$(e.themeStyle)){var ee=_0x4f5be5.createRenderEntityPageLOD(Q,e);T._renderEntityList=T._renderEntityList.concat(ee)}else{var te=new _0x38aae9(Q);if(e._imageryLayer instanceof Array){for(var ie=[],ne=0;ne<e._imageryLayer.length;ne++){var re=e._imageryLayer[ne];if(t$$(re)&&(re instanceof u$p||re instanceof i$r)){var oe=re.getImagery(V.cartographicBounds);ie=ie.concat(oe)}}ie.length>0&&te.setImagerys(ie,V.cartographicBounds)}else{if(t$$(e._imageryLayer)&&(e._imageryLayer instanceof u$p||e._imageryLayer instanceof i$r))(ie=e._imageryLayer.getImagery(V.cartographicBounds)).length>0&&te.setImagerys(ie,V.cartographicBounds);else e._needCoverImageryLayer&&te.setImagerys(ie,V.cartographicBounds)}T._renderEntityList.push(te)}}}}T._isLeafNode&&(T._boundingSphere=c$19.fromBoundingSpheres(D,new c$19)),t$$(t._pagelodMap[P.childTile])?(t._pagelodMap[P.childTile]._renderEntityList=T._renderEntityList,t._pagelodMap[P.childTile]._ready=!0):(t._childrenPageLod.push(T),e.LoadingPriority===_0x271348.UsePagedLodInfo&&(T._ready=!0,t._childrenPageLod.shift(),T._isLeafNode=!0))}if(t._isLeafTile=C,!t$$(t._boundingSphere)||t._isLeafTile){for(var ae=[],se=t._childrenPageLod.length;se--;)ae.push(t._childrenPageLod[se]._boundingSphere);t._boundingSphere=c$19.fromBoundingSpheres(ae),t._oriBoundingSphere=c$19.clone(t._boundingSphere)}t._s3mLoadState=W$q.PARSED}async function _0x38ac3a(e,t,i){var n=e[i._fileName];if(t$$(n)){i._blockKey=i._fileName,i._isAncestorBlock=!0,i._rootBatchIdMap=n.rootBatchIdMap,i._ancestorMap=n.ancestorMap,await _0x59f5b6(t,i,n);for(var r=[i];r.length;)for(var o=r.pop(),a=o._childrenPageLod,s=0,l=a.length;s<l;s++){var u=a[s],c=u._rangeDataList;if(""!==c){var h=new _0x56ff2;if(h.layer=o.layer,h._subdomainIndex=o._subdomainIndex+s+1,h._priority=o._priority-1,h._rootBatchIdMap=t$$(n)?n.rootBatchIdMap:o._rootBatchIdMap,h._ancestorMap=t$$(n)?n.ancestorMap:o._ancestorMap,h._rootName=o._rootName,c.indexOf("/")>-1){var d=c.lastIndexOf("/"),f=c.substring(0,d+1);h._fileName=c.substring(d+1),h._relativePath=new Uri(f).resolve(o._relativePath)}else h._relativePath=o._relativePath,h._fileName=c;u._entity=h,t$$(n=e[h._fileName])?(h._blockKey=o._blockKey,h._isChildBlock=!0,await _0x59f5b6(t,h,n),r.push(h)):(h._isAncestorBlock=!0,h._blockKey=h._fileName)}}}}function _0x1e5e5e(e){return function(){return e._disFromCamera}}function _0x45a244(e){return t$$(e.clampRegionEdge)&&e.clampRegionEdge}function _0x120aaa(e,t){var i=e.vertexPackage;if(i.verticesCount<1)return!1;if(t._fileType===c$q.ClampGroundPolygon){var n=t.style3D.fillStyle;return n===vr.WireFrame?_0x45a244(i):n!==vr.Fill||!_0x45a244(i)}return!0}if(null!==_0x4c1f6f&&(_0x2ca94e=_0x4c1f6f.cwrap("floatToTextureColor","number",["number","number","number","number","number","number","number"]),_0x598b22=_0x4c1f6f.cwrap("free_result",null,["number"])),_0x3065fa.parseResult=function(e,t,i,n){t._version=e.version,t._dataVersion=e.dataVersion;var r=t._gl,o=e.groupNode,a=e.geoPackage,s=e.matrials.material,l={},u=[],c=t._context;t._RGBTOBGR;var h=i._fileName.split("_"),d=parseInt(h[1]),f=parseInt(h[2]);if(d=Math.pow(2,t._level)-d-1,t._layerScheduler._prepareLoaded||!i._prepareLoad){if(t$$(t._imageryLayer))if(t._imageryLayer instanceof Array)for(var p=0;p<t._imageryLayer.length;p++)u.push(t._imageryLayer[p]._imageryProvider._readyPromise);else(t._imageryLayer instanceof u$p||t._imageryLayer instanceof i$r)&&u.push(t._imageryLayer._imageryProvider._readyPromise);for(var _=0,m=s.length;_<m;_++){var $=s[_].material,g=$.id;if(t$$(t._materialMap)){var y=t._materialMap[g];t$$(y)&&($=y.material)}var v=new _0x42161c({});i._tmpMaterialArr.push(v),v.createPBRParamter($),l[g]=v;var x=e$1Y($.ambient,e$1z.WHITE);v._ambientColor=new e$1z(x.r,x.g,x.b,x.a);var b=e$1Y($.diffuse,e$1z.WHITE);v._diffuseColor=new e$1z(b.r,b.g,b.b,b.a);var S=e$1Y($.specular,e$1z.WHITE);v._specularColor=new e$1z(S.r,S.g,S.b,S.a),v._shininess=e$1Y($.shininess,10),v._bTransparentSorting=e$1Y($.transparentsorting,!1),v._alphaMode=$.alphaMode;var w=$.textureunitstates;0===w.length&&t._fileType===c$q.OSGBFile&&(v._isInvalidOblique=!0);for(var C=0;C<w.length;C++){var T=w[C].textureunitstate,P=T.id,E=P.indexOf("PBRMaterialParam")>-1,A=v._baseColorTextureIndex===C;v._baseColorTextureIndex;var L=v._emissiveTextureIndex===C,M=v._normalTextureIndex===C,I=v._metallicRoughnessTextureIndex===C,O=v._occlusionTextureIndex===C;E&&(v._usePBRTextureBatch=!0);var D=0===T.addressmode.u?j$13.REPEAT:j$13.CLAMP_TO_EDGE,R=0===T.addressmode.v?j$13.REPEAT:j$13.CLAMP_TO_EDGE;v._texMatrix=c$1a.unpack(T.texmodmatrix);var N=e.texturePackage[P]||e.texturePackage[P+"\0"],F=P+t._id+t._context._id+i._relativePath.path+i._fileName;if(t$$(N)&&(F+=N.imageBuffer.length),t$$(N)&&N.width>0&&N.height>0&&N.imageBuffer.length>0){var B={isPBRMaterialParam:E,isEmissiveTex:L,isNormalTexture:M,isMetallicRoughnessTexture:I,isBaseColorTexture:A};switch(N.compressType){case _0x5ce781.WEBP:v._RGBTOBGR=N.nFormat===_0x5ce781.ABGR;var z=v.createWebp(F,P,c,C,N.imageBuffer,N.width,N.height,D,R,N.mipmapLevel,t.mipmapEnabled);u.push(z);break;case _0x5ce781.CRN_DXT5:if(!t$$(G=v.createCRN(F,P,c,C,N,D,R,!1,t.mipmapEnabled,B)))return void(i.parsingResult=e);i.parsingResult=null,u.push(G);break;case _0x5ce781.STANDARD_CRN:var G;if(!t$$(G=v.createCRN(F,P,c,C,N,D,R,!0,t.mipmapEnabled)))return void(i.parsingResult=e);i.parsingResult=null,u.push(G);break;case _0x5ce781.KTX2:var k=v.createKTX2(F,P,c,C,N,D,R,t.mipmapEnabled,B);t$$(k)&&u.push(k);break;default:var U=De$e.CreateTexture(F,c,N.width,N.height,N.nFormat,N.compressType,N.imageBuffer,!1,D,R,t.mipmapEnabled,N.oriCompressType);E?v.pbrParamTexture=U:L?v.emissiveTexture=U:M?v.normalTexture=U:I?v.metallicRoughnessTexture=U:O?v.occlusionTexture=U:A?v.baseColorTexture=U:v._textures.push(U)}}else if(t._isTextureShare&&!t$$(t._materialMap)){F=P+t._id+t._context._id,P.lastIndexOf("\\")>-1&&(P=a$J(P.replace(/\\/g,"/").replace("png","dxtz"))),P.lastIndexOf("/")>-1&&(P=a$J(P.replace("png","dxtz")));var V=t._baseUri+"Texture/"+P;t$$(a$R.CREDENTIAL)&&(V=a$R.addToken(V));var W=v.requestSharedTexture(V,F,P,c,C,t.customRequestHeaders,D,R);u.push(W)}if(t$$(t._maps)&&t._maps.mapNames.length>0){var H=P.substring(0,P.indexOf("."))+"_"+i._fileName+"."+t._maps.mapExts[0],Y=i._relativePath.path;i._relativePath.path=t._maps.mapNames[0]+"/"+i._relativePath.path;var j=i._relativePath.resolve(t._baseUri)+H;i._relativePath.path=Y,j=j.replace(/\+/g,"%2b");var q=c$18.defer(),X=q.promise;u.push(X);var K=u$S(j,void 0);t$$(K)?function(e,t,i,n){e.then((function(e){if(t$$(e)){var r=b$14({uint8Array:e,format:"image/webp"});t$$(r)?(o=t,a=i,s=n,r.then((function(e){if(t$$(e)){var t=new P$S({context:c,source:e,pixelFormat:Z$_.RGBA,flipY:!1,sampler:new a$Q({wrapS:D,wrapT:R,minificationFilter:tt$l.LINEAR,magnificationFilter:et$k.LINEAR})});t.id=o+"map",a._mapTextures[o]=t,De$e.textureManager.textures[t.id]=t,De$e.textureManager.refCounts[t.id]=1}s.resolve(j)}),(function(e){s.resolve()}))):n.resolve(),e=null}else n.resolve();var o,a,s}),(function(e){n.resolve()}))}(K,F,v,q):q.resolve()}if("png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt){var Z=g+"_"+i._fileName;Z=""!==t._volName?Z+"_"+t._volName:Z,"vol_texture_mapping"===t._strVolumeExt?Z+=".vol":Z+=".png";var J=i._relativePath.resolve(t._baseUri)+Z;if(0!==t.urlType){var Q=t._urlArguments,ee=J.indexOf("datas")+5,te=Q.layer3DName,ie=J.substring(J.indexOf("/path/")+6).split("/"),ne=Q.scene3DName,re=ie[0],oe=ie[1].substring(0,ie[1].indexOf(".")),ae=ie[1].substring(ie[1].indexOf(".")+1,ie[1].length);J=J.substring(0,ee)+"?layerName="+te+"&rootTile="+re+"&tile="+oe+"&suffix="+ae+"&scene3DName="+ne+"&layer3DName="+te}var se=void 0;"vol_texture_mapping"===t._strVolumeExt?t$$(se=u$S(J,void 0))&&function(e,n,r){e.then((function(e){var o;if(t$$(e)){var a=void 0,s=new Uint8Array(e,8),l=lt$f.inflate(s).buffer;if(1===new Float64Array(l,0,1)[0]){var u=new Uint32Array(l,8,4),c=u[0],h=u[1];u[2];var d=u[3];a={nFormat:c,nWidth:h,nHeight:d,nPixelSize:d,imageArray:new Float32Array(l,24,nCount)}}if(t$$(a)){var f,p=tt$l.LINEAR,_=et$k.LINEAR;t$$(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===J$O.FilterMode.NEAREST&&(p=tt$l.NEAREST,_=et$k.NEAREST),t._hypsometricSetting.filterMode===J$O.FilterMode.LINEAR?f=_0x2e64a7(a.imageArray,t._hypsometricSetting,!0):(f=null===_0x2ca94e?_0x5a3142(a.imageArray,t._hypsometricSetting):_0x3123b4(a.imageArray,t._hypsometricSetting),(o=new P$S({context:t._context,width:a.nWidth,height:a.nHeight,pixelFormat:Z$_.RGBA,flipY:!1,sampler:new a$Q({minificationFilter:p,magnificationFilter:_})})).copyForm({width:a.nWidth,height:a.nHeight,arrayBufferView:f}),i._volTexures[n]=o,r.texID2Vol=texureId),e=null}}}),(function(e){}))}(se,F,v):"png"===t._strVolumeExt&&(t$$(se=n$S(J))&&(t$$(se=n$S(J))&&function(e,n,r){e.then((function(e){var o;if(t$$(e)){var a,s=tt$l.LINEAR,l=et$k.LINEAR;t$$(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===J$O.FilterMode.NEAREST&&(s=tt$l.NEAREST,l=et$k.NEAREST),a=t._hypsometricSetting.filterMode===J$O.FilterMode.LINEAR?_0x2e64a7(i$W(e),t._hypsometricSetting,!0):null==_0x2ca94e?_0x5b82bf(i$W(e),t._hypsometricSetting):_0x285815(i$W(e),t._hypsometricSetting),(o=new P$S({context:t._context,width:e.width,height:e.height,pixelFormat:Z$_.RGBA,flipY:!1,sampler:new a$Q({minificationFilter:s,magnificationFilter:l})})).copyFrom({width:e.width,height:e.height,arrayBufferView:a}),e=null,i._volTextures[n]=o,r.texID2Vol=n}}),(function(e){}))}(se,F,v)))}}}}c$18.all(u,(function(){if(i._tmpMaterialArr.length=0,i._s3mLoadState!==W$q.UNLOAD){var n,s;if(t$$(t._volData)){n=t._volData._volBounds;var u=t._context._id+"_"+t.id+"_layerVol",c=J$O.FilterMode.LINEAR;t$$(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===J$O.FilterMode.NEAREST&&(c=J$O.FilterMode.NEAREST),t$$(t._hypsometricSetting)&&t$$(t._volData._buffer)&&(c===J$O.FilterMode.NEAREST?null===_0x2ca94e?_0x5b82bf(t._volData._buffer,t._hypsometricSetting):t._volData._buffer=_0x285815(t._volData._buffer,t._hypsometricSetting):_0x2df198(t._volData._buffer,t._hypsometricSetting));var h={};h.nLength=t._volData._nLength,h.imageArray=t._volData._buffer;var p=De$e.CreateVolumeTexture(u,r,t._context,h,c);delete t._volData._buffer,t._volData._buffer=void 0,s={volTexture:p,nFormat:3201,nSideBlockCount:t._volData._nSideBlockCount,nBlockLength:t._volData._nBlockLength,nLength:t._volData._nLength,nWidth:t._volData._width,nHeight:t._volData._height,nDepth:t._volData._depth,id:u,dataFloor:t._volData._minValue,dataCeil:t._volData._maxValue,volBounds:n},i._volObj=s}else if("vol"===t._strVolumeExt)if(e.volImageBuffer){n=e.volBounds;u=t._context._id+"_"+t.id+"_"+i._relativePath.resolve(t._baseUri)+"_"+i._fileName,c=J$O.FilterMode.LINEAR;t$$(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===J$O.FilterMode.NEAREST&&(c=J$O.FilterMode.NEAREST),3201===e.volImageBuffer.nFormat&&t$$(t._hypsometricSetting)&&(c===J$O.FilterMode.NEAREST?null===_0x2ca94e?_0x5b82bf(e.volImageBuffer.imageArray,t._hypsometricSetting):e.volImageBuffer.imageArray=_0x285815(e.volImageBuffer.imageArray,t._hypsometricSetting):_0x2df198(e.volImageBuffer.imageArray,t._hypsometricSetting)),s={volTexture:p=De$e.CreateVolumeTexture(u,r,t._context,e.volImageBuffer,c),nFormat:e.volImageBuffer.nFormat,nSideBlockCount:e.volImageBuffer.nSideBlockCount,nBlockLength:e.volImageBuffer.nBlockLength,nLength:e.volImageBuffer.nLength,nWidth:e.volImageBuffer.nWidth,nHeight:e.volImageBuffer.nHeight,nDepth:e.volImageBuffer.nDepth,id:u,dataFloor:t._fMinValue,dataCeil:t._fMaxValue,volBounds:n},delete e.volImageBuffer.imageArray,e.volImageBuffer.imageArray=null,t$$(i._volObj)&&De$e.DecRef(i._volObj.id),i._volObj=s}else t._bVolume&&(t$$(s=i._volObj)&&(n=i._volObj.volBounds));for(var _=t._matModel,m=o.pageLods,$=!0,g=0;g<m.length;g++){var y=new _0x10562c;y._fileType=t._fileType;var v=m[g];if(""===v.childTile?y._isLeafNode=!0:$=!1,y._rangeMode=v.rangeMode,y._rangeDataList=v.childTile,y._rangeList=v.rangeList,-1===v.boundingSphere.radius&&(v.boundingSphere.radius=6378137),v.boundingSphere&&(t._dataVersion>2||!y._isLeafNode||14===t._fileType)&&(y._boundingSphere=new c$19(v.boundingSphere.center,v.boundingSphere.radius),y._originalBS=new c$19(v.boundingSphere.center,v.boundingSphere.radius),c$19.transform(y._boundingSphere,t._matModel,y._boundingSphere)),t$$(v._obb)){var x=a$11.fromElements(v._obb.obbCenter.x,v._obb.obbCenter.y,v._obb.obbCenter.z),b=a$10.fromElements(v._obb.xExtent.x,v._obb.xExtent.y,v._obb.xExtent.z,0),S=a$10.fromElements(v._obb.yExtent.x,v._obb.yExtent.y,v._obb.yExtent.z,0),w=a$10.fromElements(v._obb.zExtent.x,v._obb.zExtent.y,v._obb.zExtent.z,0),C=new r$W(b.x,S.x,w.x,b.y,S.y,w.y,b.z,S.z,w.z);y._orientedBoundingBox=new b$1o(x,C),y._orientedBoundingBox._updateBBox(),y.min=y._orientedBoundingBox.bbox[0].clone(),y.max=y._orientedBoundingBox.bbox[0].clone();for(var T,P=1;P<8;P++)T=y._orientedBoundingBox.bbox[P],y.min.x>T.x&&(y.min.x=T.x),y.min.y>T.y&&(y.min.y=T.y),y.min.z>T.z&&(y.min.z=T.z),y.max.x<T.x&&(y.max.x=T.x),y.max.y<T.y&&(y.max.y=T.y),y.max.z<T.z&&(y.max.z=T.z);c$1a.multiplyByPoint(t._matModel,x,x),c$1a.multiplyByVector(t._matModel,b,b),c$1a.multiplyByVector(t._matModel,S,S),c$1a.multiplyByVector(t._matModel,w,w),C[0]=b.x,C[1]=b.y,C[2]=b.z,C[3]=S.x,C[4]=S.y,C[5]=S.z,C[6]=w.x,C[7]=w.y,C[8]=w.z,y._orientedBoundingBox.center=x,y._orientedBoundingBox.halfAxes=C,y._orientedBoundingBox.areaDirty=1}else if(t$$(v.min)){var E=[];E.push(new a$11(v.min.x,v.min.y,v.min.z)),E.push(new a$11(v.min.x,v.min.y,v.max.z)),E.push(new a$11(v.min.x,v.max.y,v.min.z)),E.push(new a$11(v.min.x,v.max.y,v.max.z)),E.push(new a$11(v.max.x,v.min.y,v.min.z)),E.push(new a$11(v.max.x,v.min.y,v.max.z)),E.push(new a$11(v.max.x,v.max.y,v.min.z)),E.push(new a$11(v.max.x,v.max.y,v.max.z)),y.obbMin=v.min,y.obbMax=v.max;for(var A=0;A<8;A++)E[A]=c$1a.multiplyByPoint(t._matModel,E[A],E[A]);y._orientedBoundingBox=b$1o.fromPoints(E,y._orientedBoundingBox)}var L=v.geodes,M=[],I=[];if(t._layerScheduler._prepareLoaded||!i._prepareLoad)for(var O=0;O<L.length;O++){var D,R=L[O],N=R.matrix;if(1===t._heightScale)D=c$1a.multiply(_,N,new c$1a);else{var F=c$1a.multiplyByScale(N,new a$11(1,1,t._heightScale),new c$1a);D=c$1a.multiply(_,F,new c$1a)}for(var B=R.skeletonNames,z=0;z<B.length;z++){var G=B[z],k=a[G],U=k.vertexPackage;if(_0x120aaa(k,t)){var V,W;if(y._isLeafNode&&!t$$(y._boundingSphere)){var H=U.boundingSphere;t$$(H)?(W=new c$19(H.center,H.radius),V=c$19.transform(W,D,new c$19),W=c$19.transform(W,N,W)):(V=_0x1af262.calcBoundingSphere(t,U,D),W=c$19.transform(V,c$1a.inverse(D,new c$1a),new c$19),c$19.transform(W,N,W)),M.push(V),I.push(W)}for(var Y=_0x1af262.calcBoundingRectangle(t,U),j=k.arrIndexPackage,q=k.pickInfo,X={},K=0;K<j.length;K++){var Z=j[K];if(t$$(Z)){var J=Z.materialCode;if(t$$(J)){var Q=new _0x42161c({});J=J.replace(/\0/,"");var ee=l[J];t$$(ee)&&ee.clone(Q),X[J]=Q;for(let e=0;e<Q._textures.length;e++){let t=Q._textures[e];i._texturesByteLength+=t._sizeInBytes,t$$(Q.normalTexture)&&(i._texturesByteLength+=Q.normalTexture._sizeInBytes),t$$(Q.baseColorTexture)&&(i._texturesByteLength+=Q.baseColorTexture._sizeInBytes),t$$(Q.emissiveTexture)&&(i._texturesByteLength+=Q.emissiveTexture._sizeInBytes),t$$(Q.metallicRoughnessTexture)&&(i._texturesByteLength+=Q.metallicRoughnessTexture._sizeInBytes),t$$(Q.occlusionTexture)&&(i._texturesByteLength+=Q.occlusionTexture._sizeInBytes)}}}}s&&(_0x3a4d52(U,t._oriMatModel,N,n),De$e.AddRef(i._fileName));var te=e$1Y(b$1o.clone(y._orientedBoundingBox),c$19.clone(y._boundingSphere));te=e$1Y(te,V);var ie={context:t._context,vertexPackage:U,arrIndexPackage:j,edgeGeometry:k.edgeGeometry,pickInfo:q,version:e.version,mapPass:X,layer:t,entity:i,matModel:D,boundingVolume:te,boundingRectangle:Y,volObj:s,volTexture:p,fileType:t._fileType,isS3MB:t._isS3MB,geoMatrix:N,dataType:t._dataType,level:t._level,row:d,col:f,geoName:G};if(t._fileType===c$q.PointCloudFile){var ne=G.split("#");if(ne.length>0&&"SupermapPointCloud"===ne[0]){for(var re={},oe=1;oe<ne.length;oe++){var ae=ne[oe].split("%");if(2===ae.length){var se=ae[0],le=ae[1].split("_");if(2===le.length){var ue=le[0],ce=le[1];re[se]={start:parseInt(ue),end:parseInt(ce)}}}}ie.ptIndexGroup=re}else if(G.lastIndexOf("_")>-1){var he=G.substring(0,G.lastIndexOf("_"));ie.groupName=he}}if(t$$(t.themeStyle)&&t$$(t.themeStyle._image)){var de=_0x4f5be5.createRenderEntityPageLOD(ie,t);y._renderEntityList=y._renderEntityList.concat(de)}else if(U.vertexAttributes.length>0){var fe=new _0x38aae9(ie);if(t._imageryLayer instanceof Array){for(var pe=[],_e=0;_e<t._imageryLayer.length;_e++){var me=t._imageryLayer[_e];if(t$$(me)&&(me instanceof u$p||me instanceof i$r)){var $e=me.getImagery(k.cartographicBounds);pe=pe.concat($e)}}pe.length>0&&fe.setImagerys(pe,k.cartographicBounds)}else{if(t$$(t._imageryLayer)&&(t._imageryLayer instanceof u$p||t._imageryLayer instanceof i$r))(pe=t._imageryLayer.getImagery(k.cartographicBounds)).length>0&&fe.setImagerys(pe,k.cartographicBounds);else t._needCoverImageryLayer&&fe.setImagerys(pe,k.cartographicBounds)}y._renderEntityList.push(fe)}}}}if(y._isLeafNode&&!t$$(y._boundingSphere)&&(y._boundingSphere=c$19.fromBoundingSpheres(M,new c$19),y._originalBS=c$19.fromBoundingSpheres(I,new c$19)),t.LoadingPriority===_0x271348.UsePagedLodInfo){var ge=i._fileName;0===ge.indexOf("./")&&(ge=ge.substring(2));_e=ge.lastIndexOf("/");var ye=v.childTile;_e>0&&""!=ye&&(ye=ge.substring(0,_e+1)+ye),t$$(i._pagelodMap[ye])?i._pagelodMap[ye]._renderEntityList=y._renderEntityList:(i._leafChildren.push(y),y._isLeafNode=!0)}else i._childrenPageLod.push(y)}if(i._isLeafTile=$,!t$$(i._boundingSphere)||i._isLeafTile||i._hasLeafChild){for(var ve=[],xe=i._childrenPageLod.length;xe--;)ve.push(i._childrenPageLod[xe]._boundingSphere);for(var be=i._leafChildren.length;be--;)ve.push(i._leafChildren[be]._boundingSphere);i._boundingSphere=c$19.fromBoundingSpheres(ve),i._oriBoundingSphere=c$19.clone(i._boundingSphere)}for(var Se in l)if(l.hasOwnProperty(Se)){var we=l[Se];if(!t$$(we))continue;we.destroy(),l[Se]=null}i._s3mLoadState=W$q.PARSED}}))},_0x3065fa.parseResultInstance=async function(e,t){var i=t.instancePackage,n=t.skeletonPackages;e._version=i.version,e._gl;var r={},o=e._context,a=i.groupNode;for(M=0;M<n.length;M++){var s=(J=n.values[M]).matrials.material;for(H=0;H<s.length;H++){var l=s[H].material,u=l.id;(Ie=new _0x42161c({})).createPBRParamter(l),r[u]=Ie;var c=l.ambient;t$$(c)&&(Ie._ambientColor=new e$1z(c.r,c.g,c.b,c.a));var h=l.diffuse;t$$(h)&&(Ie._diffuseColor=new e$1z(h.r,h.g,h.b,h.a));var d=l.specular;t$$(d)&&(Ie._specularColor=new e$1z(d.r,d.g,d.b,d.a)),Ie._shininess=e$1Y(l.shininess,Ie._shininess),Ie._bTransparentSorting=e$1Y(l.transparentsorting,Ie._bTransparentSorting);var f=l.textureunitstates;for(te=0;te<f.length;te++){var p=f[te].textureunitstate,_=p.id,m=_.indexOf("PBRMaterialParam")>-1,$=Ie._baseColorTextureIndex===te,g=Ie._emissiveTextureIndex===te,y=Ie._normalTextureIndex===te,v=Ie._metallicRoughnessTextureIndex===te,x=Ie._occlusionTextureIndex===te;m&&(Ie._usePBRTextureBatch=!0);var b=0===p.addressmode.u?j$13.REPEAT:j$13.CLAMP_TO_EDGE,S=0===p.addressmode.v?j$13.REPEAT:j$13.CLAMP_TO_EDGE;Ie._texMatrix=c$1a.unpack(p.texmodmatrix);var w=J.texturePackage[_],C=_+e._id+e._context._id;if(t$$(w)&&w.width>0&&w.height>0&&w.imageBuffer.length>0){var T={isPBRMaterialParam:m,isEmissiveTex:g,isNormalTexture:y,isMetallicRoughnessTexture:v,isBaseColorTexture:$};switch(0===w.compressType&&(e._supportCompressType=0),w.compressType){case _0x5ce781.WEBP:Ie._RGBTOBGR=w.nFormat===_0x5ce781.ABGR,await Ie.createWebp(C,_,o,te,w.imageBuffer,w.width,w.height,b,S,w.mipmapLevel,e.mipmapEnabled);break;case _0x5ce781.CRN_DXT5:if(!t$$(await Ie.createCRN(C,_,o,te,w,b,S,!1,e.mipmapEnabled,T)))return void(t.parsingResult=J);t.parsingResult=null;break;case _0x5ce781.STANDARD_CRN:if(!t$$(await Ie.createCRN(C,_,o,te,w,b,S,!0,e.mipmapEnabled)))return void(t.parsingResult=J);t.parsingResult=null;break;case _0x5ce781.KTX2:await Ie.createKTX2(C,_,o,te,w,b,S,e.mipmapEnabled,T);break;default:var P=De$e.CreateTexture(C,o,w.width,w.height,w.nFormat,w.compressType,w.imageBuffer,!1,b,S,e.mipmapEnabled,w.oriCompressType);m?Ie.pbrParamTexture=P:g?Ie.emissiveTexture=P:y?Ie.normalTexture=P:v?Ie.metallicRoughnessTexture=P:x?Ie.occlusionTexture=P:$?Ie.baseColorTexture=P:Ie._textures.push(P)}}}}}for(var E=e._matModel,A=a.pageLods,L=!0,M=0;M<A.length;M++){var I=new _0x10562c;I._fileType=e._fileType;var O=A[M];if(""===O.childTile?I._isLeafNode=!0:L=!1,I._rangeMode=O.rangeMode,I._rangeDataList=O.childTile,I._rangeList=O.rangeList,-1===O.boundingSphere.radius&&(O.boundingSphere.radius=6378137),O.boundingSphere&&(I._boundingSphere=new c$19(O.boundingSphere.center,O.boundingSphere.radius),I._originalBS=new c$19(O.boundingSphere.center,O.boundingSphere.radius),c$19.transform(I._boundingSphere,e._matModel,I._boundingSphere)),t$$(O._obb)){var D=a$11.fromElements(O._obb.obbCenter.x,O._obb.obbCenter.y,O._obb.obbCenter.z),R=a$10.fromElements(O._obb.xExtent.x,O._obb.xExtent.y,O._obb.xExtent.z,0),N=a$10.fromElements(O._obb.yExtent.x,O._obb.yExtent.y,O._obb.yExtent.z,0),F=a$10.fromElements(O._obb.zExtent.x,O._obb.zExtent.y,O._obb.zExtent.z,0),B=new r$W(R.x,N.x,F.x,R.y,N.y,F.y,R.z,N.z,F.z);if(a$11.equals(a$11.ZERO,R)||a$11.equals(a$11.ZERO,N)||a$11.equals(a$11.ZERO,F))I._orientedBoundingBox=void 0;else{I._orientedBoundingBox=new b$1o(D,B),I._orientedBoundingBox._updateBBox(),I.min=I._orientedBoundingBox.bbox[0].clone(),I.max=I._orientedBoundingBox.bbox[0].clone();for(var z,G=1;G<8;G++)z=I._orientedBoundingBox.bbox[G],I.min.x>z.x&&(I.min.x=z.x),I.min.y>z.y&&(I.min.y=z.y),I.min.z>z.z&&(I.min.z=z.z),I.max.x<z.x&&(I.max.x=z.x),I.max.y<z.y&&(I.max.y=z.y),I.max.z<z.z&&(I.max.z=z.z);c$1a.multiplyByPoint(e._matModel,D,D),c$1a.multiplyByVector(e._matModel,R,R),c$1a.multiplyByVector(e._matModel,N,N),c$1a.multiplyByVector(e._matModel,F,F),B[0]=R.x,B[1]=R.y,B[2]=R.z,B[3]=N.x,B[4]=N.y,B[5]=N.z,B[6]=F.x,B[7]=F.y,B[8]=F.z,I._orientedBoundingBox.center=D,I._orientedBoundingBox.halfAxes=B,I._orientedBoundingBox.areaDirty=1}}else if(t$$(O.min)){var k=[];k.push(new a$11(O.min.x,O.min.y,O.min.z)),k.push(new a$11(O.min.x,O.min.y,O.max.z)),k.push(new a$11(O.min.x,O.max.y,O.min.z)),k.push(new a$11(O.min.x,O.max.y,O.max.z)),k.push(new a$11(O.max.x,O.min.y,O.min.z)),k.push(new a$11(O.max.x,O.min.y,O.max.z)),k.push(new a$11(O.max.x,O.max.y,O.min.z)),k.push(new a$11(O.max.x,O.max.y,O.max.z)),I.obbMin=O.min,I.obbMax=O.max;for(var U=0;U<8;U++)k[U]=c$1a.multiplyByPoint(e._matModel,k[U],k[U]);I._orientedBoundingBox=b$1o.fromPoints(k,I._orientedBoundingBox)}I._isLeafNode||(I._boundingSphere=new c$19(O.boundingSphere.center,O.boundingSphere.radius),c$19.transform(I._boundingSphere,e._matModel,I._boundingSphere));for(var V=O.geodes,W=[],H=0;H<V.length;H++){var Y,j=V[H],q=j.matrix;if(1===e._heightScale)Y=c$1a.multiply(E,q,new c$1a);else{var X=c$1a.multiplyByScale(q,new a$11(1,1,e._heightScale),new c$1a);Y=c$1a.multiply(E,X,new c$1a)}for(var K=j.skeletonNames,Z=0;Z<K.length;Z++){var J,Q=K[Z],ee=Q;if((Be=Q.indexOf("#"))>-1&&(ee=Q.substring(0,Be)),t$$(J=n.get(ee))){var te,ie,ne=[],re={};for(te=0;te<J.groupNode.pageLods.length;te++){var oe=J.groupNode.pageLods[te].geodes;for(ie=0;ie<oe.length;ie++)for(var ae=oe[ie],se=c$1a.unpack(ae.matrix,0,new c$1a),le=0;le<ae.skeletonNames.length;le++){var ue=ae.skeletonNames[le];re[ue]=se,ne.push(ue)}}for(te=0;te<ne.length;te++){var ce=ne[te],he=re[ce],de=J.geoPackage[ce];if(t$$(de)){var fe=i.geoPackage[Q],pe=e$1W(fe.pickInfo),_e=t$$(de.pickInfo)?Object.keys(de.pickInfo):[],me=_e.length;for(var $e in pe)pe.hasOwnProperty($e)&&(pe[$e].skeletonIds=_e);var ge=fe.vertexPackage,ye=de.vertexPackage,ve={},xe=[],be=ye.vertexAttributes.length;for(ie=0;ie<ye.vertexAttributes.length;ie++){var Se=s$1n({},we=ye.vertexAttributes[ie]);xe.push(Se)}for(ie=0;ie<ge.vertexAttributes.length;ie++){var we;if((we=ge.vertexAttributes[ie]).instanceDivisor>0)(Se=s$1n({},we)).index=be++,xe.push(Se)}for(var Ce in be=ye.vertexAttributes.length,delete ge.attrLocation.aColor,ve=s$1n({},ye.attrLocation),ge.attrLocation)ve[Ce]=ge.attrLocation[Ce]+be;var Te,Pe={attrLocation:ve,minVerticesValue:ye.minVerticesValue,nCompressOptions:ye.nCompressOptions,vertCompressConstant:ye.vertCompressConstant,vertexAttributes:xe,vertexColor:ye.vertexColor,verticesCount:ye.verticesCount,skeletonCount:me,texCoordCompressConstant:ye.texCoordCompressConstant,minTexCoordValue:ye.minTexCoordValue};if(Pe.instanceIndex=ge.instanceIndex,Pe.instanceCount=ge.instanceCount,Pe.instanceMode=ge.instanceMode,Pe.instanceBuffer=ge.instanceBuffer,Pe.instanceBounds=ge.instanceBounds,delete ge.attrLocation.aColor,I._isLeafNode&&!t$$(I._boundingSphere)){var Ee=Pe.boundingSphere;t$$(Ee)?(Te=new c$19(Ee.center,Ee.radius),c$19.transform(Te,Y,Te)):Te=_0x1af262.calcBoundingSphere(e,Pe,Y),W.push(Te),_0x1af262.calcBoundingRectangle(e,Pe)}var Ae=e$1Y(t$$(I._orientedBoundingBox)?b$1o.clone(I._orientedBoundingBox):void 0,c$19.clone(I._boundingSphere));Ae=e$1Y(Ae,Te);var Le=de.arrIndexPackage,Me={},Ie=r[u=Le[0].materialCode],Oe=new _0x42161c({});t$$(Ie)&&Ie.clone(Oe),Me[u]=Oe;var De={context:e._context,version:i.version,vertexPackage:Pe,arrIndexPackage:Le,pickInfo:pe,mapPass:Me,layer:e,entity:t,matModel:Y,boundingVolume:Ae,fileType:e._fileType,isS3MB:e._isS3MB,geoMatrix:q,instanceSkeletonMatrix:he,dataType:e._dataType,instanceSkeletonManager:e.instanceSkeletonManager,geoName:ce,skeletonUrl:ee};if(t$$(e.themeStyle)){var Re=_0x4f5be5.createRenderEntityPageLOD(De,e);I._renderEntityList=I._renderEntityList.concat(Re)}else{var Ne=new _0x38aae9(De);if(e._imageryLayer instanceof Array){for(var Fe=[],Be=0;Be<e._imageryLayer.length;Be++){var ze=e._imageryLayer[Be];if(t$$(ze)&&(ze instanceof u$p||ze instanceof i$r)){var Ge=ze.getImagery(de.cartographicBounds);Fe=Fe.concat(Ge)}}Fe.length>0&&Ne.setImagerys(Fe,de.cartographicBounds)}else{if(t$$(e._imageryLayer)&&(e._imageryLayer instanceof u$p||e._imageryLayer instanceof i$r))(Fe=e._imageryLayer.getImagery(de.cartographicBounds)).length>0&&Ne.setImagerys(Fe,de.cartographicBounds);else e._needCoverImageryLayer&&Ne.setImagerys(Fe,de.cartographicBounds)}I._renderEntityList.push(Ne)}}}}}}if(I._isLeafNode&&!t$$(I._boundingSphere)){I._boundingSphere=c$19.fromBoundingSpheres(W,new c$19);for(var ke=0;ke<I._renderEntityList.length;ke++)I._renderEntityList[ke]._boundingVolume=I._boundingSphere}t._childrenPageLod.push(I)}if(t._isLeafTile=L,!t$$(t._boundingSphere)||t._isLeafTile){for(var Ue=[],Ve=t._childrenPageLod.length;Ve--;)Ue.push(t._childrenPageLod[Ve]._boundingSphere);t._boundingSphere=c$19.fromBoundingSpheres(Ue)}if(!a$11.equals(e._boundingSphereOffset,a$11.ZERO)){var We=Math.max(Math.abs(e._boundingSphereOffset.x),Math.abs(e._boundingSphereOffset.y),Math.abs(e._boundingSphereOffset.z));t.extendRadius(We)}for(var He in r)if(r.hasOwnProperty(He)){var Ye=r[He];if(!t$$(Ye))continue;Ye.destroy(),r[He]=null}t._s3mLoadState=W$q.PARSED,t.instancePackage=void 0,t.skeletonPackages=void 0,t.skeletonState=void 0},_0x3065fa.parseChildGroup=_0x38ac3a,_0x3065fa.binaryDataParser=function(e,t,i,n){if(t._s3mLoadState===W$q.UNLOAD)return t.s3mBuffer=null,t.volBuffer=null,void(t.task=void 0);var r;(e._computeHeight||e._needCoverImageryLayer)&&(r=e._fileType!==c$q.OSGBFile&&e._fileType!==c$q.OSGBCacheFile||t$$(e.waterEffectSet)?void 0:c$1a.pack(e._matModel,new Array(16)));var o,a=e._fileType!=c$q.ClampGroundRealtimeRasterCache&&e._fileType!=c$q.PolylineEffect;if(6378137!==n$1c.WGS84.radii.z&&"Ellipsoid_WGS84"!==e._globeType&&a&&!t$$(e._animationInfo.duration)){var s=new n$1c(6378137,6378137,6378137),l=a$11.fromDegrees(e.lon,e.lat,e.height+e.style3D.bottomAltitude,s);o={sphereMatrix:m$13.eastNorthUpToFixedFrame(l,s),ellipsoidMatrix:e._matModel}}var u={buffer:i,isS3MZ:e._isS3MZ,fileType:e._fileType,supportCompressType:e._supportCompressType,ignoreNormal:e._ignoreNormal,isJsonScp:e._isJsonScp,isRoot:t._isRootTile,rootBatchIdMap:t._rootBatchIdMap,ancestorMap:t._ancestorMap,isS3MBlock:e._isS3MBlock,modelMatrix:r,materialType:e._materialType,isOSGB:e._isOSGB,isCoverImageryLayer:e._needCoverImageryLayer,fileName:t._fileName,transformPar:o,ellipsoid:6378137!==n$1c.WGS84.radii.z&&"Ellipsoid_WGS84"===e._globeType},c=[i];if(t$$(n)&&(u.bVolume=!0,u.volbuffer=n,c.push(n)),_0xb658ed.init||_0xb658ed.initWebAssembly(),_0xb658ed.taskProcessorReady){t$$(t.task)||(t.task={data:u,transferableObjects:e._isS3MBlock?void 0:c,priority:t._disFromCamera,state:0,priorityFunction:_0x1e5e5e(t),processorName:"S3MBTilesParser"});var h=_0xb658ed.startTask(t.task);!t$$(h)||(t._s3mLoadState=W$q.PARSING,e._layerScheduler._statistics.numberOfProcessingAttempted=0,e._layerScheduler._statistics.numberOfTilesProcessing++,h.then((function(i){if(t.s3mBuffer=null,t.volBuffer=null,t.task=void 0,t._s3mLoadState!==W$q.UNLOAD){if(t$$(window.Proxy)){var r=t._relativePath.toString()+t._fileName;if((!0===e._indexedDBSetting.isGeoTilesSave||e._indexedDBSetting.isGeoTilesRootNodeSave&&e._layerScheduler._isRootNode(r))&&t$$(e._layerScheduler._indexedDBScheduler)){if(t$$(e._layerScheduler._indexedDBScheduler.cachestatus)&&t$$(e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename])&&(1===e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename][r]||2===e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename][r]))return;var o={blob:i,key:r,tablename:e._layerScheduler.tablename,dbname:e._layerScheduler._indexedDBScheduler.dbname,reserveCount:e._localCacheMemoryReserveCount};_0xb658ed.indexTaskProcessor.scheduleTask(o,[])}e.offlineDownload&&t$$(e._layerScheduler._indexedDBScheduler)&&(sumEntity++,e._layerScheduler._indexedDBScheduler.putElementInDB(e._layerScheduler.tablename,r,i).then((function(){savedEntity++,sumEntity===savedEntity&&console.log("complete")})).otherwise((function(e){})))}e._layerScheduler._statistics.numberOfTilesProcessing--,null==i&&(t._s3mLoadState,W$q.UNLOAD),"InstanceModel"===e._dataType?(t.skeletonState=_0x35bc68.STATE.SkeletonParsing,t.instancePackage=i):e._isS3MBlock?_0x38ac3a(i,e,t):_0x3065fa.parseResult(i,e,t,n)}})).otherwise((function(i){if(e._layerScheduler._statistics.numberOfTilesProcessing--,t.task=void 0,t._s3mLoadState==W$q.UNLOAD)return t.s3mBuffer=null,void(t.volBuffer=null);t$$(i)?(t.s3mBuffer=null,t.volBuffer=null,t._s3mLoadState=W$q.FAILED,console.log(i)):t._s3mLoadState=W$q.LOADED})))}},_0x3065fa.saveLocalCache=function(e,t){var i={tablename:e,dbname:t};_0xb658ed.indexTaskProcessor.scheduleTask(i,[])},typeof WebAssembly<"u"&&"object"!=typeof window){let e=function(e){return t$j.locateFile?t$j.locateFile(e,v$r):v$r+e},t=function(e){t.shown||(t.shown={}),t.shown[e]||(t.shown[e]=1)},i=function(e,t,i){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return f$u[e>>0];case"i16":return F$n[e>>1];case"i32":case"i64":return g$l[e>>2];case"float":return ce$b[e>>2];case"double":return fe$b[e>>3];default:J("invalid type for getValue: "+t)}return null},n=function(e,t){e||J("Assertion failed: "+t)},r=function(e){var t=t$j["_"+e];return n(t,"Cannot call unknown function "+e+", make sure it is exported"),t},o=function(e,t,i,o,a){var s={string:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);t=J$n(i),c(e,t,i)}return t},array:function(e){var t=J$n(e.length);return h(e,t),t}};var u=r(e),d=[],f=0;if(n("array"!==t,'Return type should not be "array".'),o)for(var p=0;p<o.length;p++){var _=s[i[p]];_?(0===f&&(f=Te$f()),d[p]=_(o[p])):d[p]=o[p]}var m=u.apply(null,d);return m=function(e){return"string"===t?l(e):"boolean"===t?Boolean(e):e}(m),0!==f&&Be$b(f),m},a=function(e,t,i,n){return function(){return o(e,t,i,arguments)}},s=function(e,i,n){for(var r=i+n,o=i;e[o]&&!(o>=r);)++o;if(o-i>16&&e.subarray&&Ne$9)return Ne$9.decode(e.subarray(i,o));for(var a="";i<o;){var s=e[i++];if(128&s){var l=63&e[i++];if(192!=(224&s)){var u=63&e[i++];if(224==(240&s)?s=(15&s)<<12|l<<6|u:(240!=(248&s)&&t("Invalid UTF-8 leading byte 0x"+s.toString(16)+" encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!"),s=(7&s)<<18|l<<12|u<<6|63&e[i++]),s<65536)a+=String.fromCharCode(s);else{var c=s-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&s)<<6|l)}else a+=String.fromCharCode(s)}return a},l=function(e,t){return e?s(b$x,e,t):""},u=function(e,i,n,r){if(!(r>0))return 0;for(var o=n,a=n+r-1,s=0;s<e.length;++s){var l=e.charCodeAt(s);if(l>=55296&&l<=57343)l=65536+((1023&l)<<10)|1023&e.charCodeAt(++s);if(l<=127){if(n>=a)break;i[n++]=l}else if(l<=2047){if(n+1>=a)break;i[n++]=192|l>>6,i[n++]=128|63&l}else if(l<=65535){if(n+2>=a)break;i[n++]=224|l>>12,i[n++]=128|l>>6&63,i[n++]=128|63&l}else{if(n+3>=a)break;l>=2097152&&t("Invalid Unicode code point 0x"+l.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),i[n++]=240|l>>18,i[n++]=128|l>>12&63,i[n++]=128|l>>6&63,i[n++]=128|63&l}}return i[n]=0,n-o},c=function(e,t,i){return n("number"==typeof i,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),u(e,b$x,t,i)},h=function(e,t){n(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),f$u.set(e,t)},d=function(e){return e.replace(/__Z[\w\d_]+/g,(function(e){return e===e?e:e+" ["+e+"]"}))},f=function(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()},p=function(){var e=f();return t$j.extraStackTrace&&(e+="\n"+t$j.extraStackTrace()),d(e)},_=function(e,t){return e%t>0&&(e+=t-e%t),e},m=function(){t$j.HEAP8=f$u=new Int8Array(w$w),t$j.HEAP16=F$n=new Int16Array(w$w),t$j.HEAP32=g$l=new Int32Array(w$w),t$j.HEAPU8=b$x=new Uint8Array(w$w),t$j.HEAPU16=new Uint16Array(w$w),t$j.HEAPU32=D$v=new Uint32Array(w$w),t$j.HEAPF32=ce$b=new Float32Array(w$w),t$j.HEAPF64=fe$b=new Float64Array(w$w)},$=function(){n(0==(3&I$r)),D$v[(I$r>>2)-1]=34821223,D$v[(I$r>>2)-2]=2310721022},g=function(){(34821223!=D$v[(I$r>>2)-1]||2310721022!=D$v[(I$r>>2)-2])&&J("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+D$v[(I$r>>2)-2].toString(16)+" "+D$v[(I$r>>2)-1].toString(16)),1668509029!==g$l[0]&&J("Runtime error: The application has corrupted its heap memory area (address zero)!")},y=function(e){J("Stack overflow! Attempted to allocate "+e+" bytes on the stack, but stack has only "+(I$r-Te$f()+e)+" bytes available!")},v=function(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?t$j.dynCall_v(i):t$j.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}},x=function(){if(t$j.preRun)for("function"==typeof t$j.preRun&&(t$j.preRun=[t$j.preRun]);t$j.preRun.length;)C(t$j.preRun.shift());v(ke$6)},b=function(){g(),!d$p&&(d$p=!0,v(Le$b))},S=function(){g(),v(Ce$b)},w=function(){if(g(),t$j.postRun)for("function"==typeof t$j.postRun&&(t$j.postRun=[t$j.postRun]);t$j.postRun.length;)T(t$j.postRun.shift());v(He$8)},C=function(e){ke$6.unshift(e)},T=function(e){He$8.unshift(e)},P=function(e){X$e++,t$j.monitorRunDependencies&&t$j.monitorRunDependencies(X$e),e&&(n(!C$r[e]),C$r[e]=1,null===P$i&&typeof setInterval<"u"&&(P$i=setInterval((function(){if(ee$e)return clearInterval(P$i),void(P$i=null)}),1e4)))},E=function(e){if(X$e--,t$j.monitorRunDependencies&&t$j.monitorRunDependencies(X$e),e?(n(C$r[e]),delete C$r[e]):R$i("warning: run dependency removed without ID"),0==X$e&&(null!==P$i&&(clearInterval(P$i),P$i=null),G$q)){var t=G$q;G$q=null,t()}},A=function(e){return String.prototype.startsWith?e.startsWith(Qe$6):0===e.indexOf(Qe$6)},L=function(){try{if(t$j.wasmBinary)return new Uint8Array(t$j.wasmBinary);if(t$j.readBinary)return t$j.readBinary(N$m);throw"both async and sync fetching of the wasm failed"}catch(e){J(e)}},M=function(){return t$j.wasmBinary||!Y$p&&!U$n||"function"!=typeof fetch?new Promise((function(e,t){e(L())})):fetch(N$m,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+N$m+"'";return e.arrayBuffer()})).catch((function(){return L()}))},I=function(e){var t={env:e,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:xt$6};function i(e,t){var i=e.exports;t$j.asm=i,E("wasm-instantiate")}P("wasm-instantiate");var r=t$j;function o(e){n(t$j===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),r=null,i(e.instance)}function a(e){return M().then((function(e){return WebAssembly.instantiate(e,t)})).then(e,(function(e){}))}if(t$j.instantiateWasm)try{return t$j.instantiateWasm(t,i)}catch{return!1}return function(){if(t$j.wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||A(N$m)||"function"!=typeof fetch)return a(o);fetch(N$m,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(o,(function(e){a(o)}))}))}(),{}},O=function(){},D=function(e,t){E$s.varargs=t;try{E$s.getStreamFromFD(),E$s.get(),E$s.get(),E$s.get(),E$s.get();return J("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return(typeof y$r>"u"||!(e instanceof y$r.ErrnoError))&&J(e),-e.errno}},R=function(){var e=t$j._fflush;e&&e(0);var t=E$s.buffers;t[1].length&&E$s.printChar(1,10),t[2].length&&E$s.printChar(2,10)},N=function(e,t){E$s.varargs=t;try{for(var i=E$s.get(),n=E$s.get(),r=E$s.get(),o=0,a=0;a<r;a++){for(var s=g$l[n+8*a>>2],l=g$l[n+(8*a+4)>>2],u=0;u<l;u++)E$s.printChar(i,b$x[s+u]);o+=l}return o}catch(e){return(typeof y$r>"u"||!(e instanceof y$r.ErrnoError))&&J(e),-e.errno}},F=function(e,t){E$s.varargs=t;try{return 0}catch(e){return(typeof y$r>"u"||!(e instanceof y$r.ErrnoError))&&J(e),-e.errno}},B=function(e,t){E$s.varargs=t;try{E$s.getStreamFromFD();return J("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return(typeof y$r>"u"||!(e instanceof y$r.ErrnoError))&&J(e),-e.errno}},z=function(){},G=function(){return f$u.length},k=function(e,t,i){b$x.set(b$x.subarray(t,t+i),e)},U=function(e){return t$j.___errno_location?g$l[t$j.___errno_location()>>2]=e:R$i("failed to set errno from JS"),e},V=function(e){J("Cannot enlarge memory arrays to size "+e+" bytes (OOM). Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+f$u.length+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")},W=function(e){e=_(e,65536);var t=w$w.byteLength;try{return-1!==j$i.grow((e-t)/65536)&&(w$w=j$i.buffer,!0)}catch(i){return console.error("emscripten_realloc_buffer: Attempted to grow from "+t+" bytes to "+e+" bytes, but got error: "+i),!1}},H=function(e){var i=G();n(e>i);var r=65536,o=2147418112;if(e>o)return R$i("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is "+o+" bytes!"),!1;for(var a=Math.max(i,16777216);a<e;)(a=a<=536870912?_(2*a,r):Math.min(_((3*a+2147483648)/4,r),o))===i&&t("Cannot ask for more memory since we reached the practical limit in browsers (which is just below 2GB), so the request would have failed. Requesting only "+f$u.length);return W(a)?(m(),!0):(R$i("Failed to grow the heap from "+i+" bytes to "+a+" bytes, not enough memory!"),!1)},Y=function(e){R$i("Invalid function pointer called with signature 'ii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),R$i("Build with ASSERTIONS=2 for more info."),J(e)},j=function(e){R$i("Invalid function pointer called with signature 'iiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),R$i("Build with ASSERTIONS=2 for more info."),J(e)},q=function(e){R$i("Invalid function pointer called with signature 'jiji'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),R$i("Build with ASSERTIONS=2 for more info."),J(e)},X=function(e){R$i("Invalid function pointer called with signature 'vii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),R$i("Build with ASSERTIONS=2 for more info."),J(e)},K=function(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e},Z=function(e){function t(){t$j.calledRun||(t$j.calledRun=!0,!ee$e&&(b(),S(),t$j.onRuntimeInitialized&&t$j.onRuntimeInitialized(),n(!t$j._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),w()))}e=e||t$j.arguments,X$e>0||($(),x(),X$e>0)||t$j.calledRun||(t$j.setStatus?(t$j.setStatus("Running..."),setTimeout((function(){setTimeout((function(){t$j.setStatus("")}),1),t()}),1)):t(),g())},J=function(e){t$j.onAbort&&t$j.onAbort(e),ee$e=!0;var t="abort("+(e=void 0!==e?'"'+e+'"':"")+") at "+p();throw We$9&&We$9.forEach((function(i){t=i(t,e)})),t};var t$j=typeof t$j<"u"?t$j:{},W$n={},S$m;for(S$m in t$j)t$j.hasOwnProperty(S$m)&&(W$n[S$m]=t$j[S$m]);t$j.arguments=[],t$j.thisProgram="./this.program",t$j.quit=function(e,t){throw t},t$j.preRun=[],t$j.postRun=[];var Y$p=!1,U$n=!1,oe$e=!1,Oe$d=!1,ve$b=!1;if(Y$p="object"==typeof window,U$n="function"==typeof importScripts,Oe$d="object"==typeof process&&"function"==typeof require,oe$e=Oe$d&&!Y$p&&!U$n,ve$b=!Y$p&&!oe$e&&!U$n,t$j.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var v$r="",ae$g,ue$a;if(oe$e)v$r=__dirname+"/",t$j.read=function(e,t){var i;return ae$g||(ae$g=require("fs")),ue$a||(ue$a=require("path")),e=ue$a.normalize(e),i=ae$g.readFileSync(e),t?i:i.toString()},t$j.readBinary=function(e){var t=t$j.read(e,!0);return t.buffer||(t=new Uint8Array(t)),n(t.buffer),t},process.argv.length>1&&(t$j.thisProgram=process.argv[1].replace(/\\/g,"/")),t$j.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=t$j),process.on("uncaughtException",(function(e){if(!(e instanceof K))throw e})),process.on("unhandledRejection",J),t$j.quit=function(e){process.exit(e)},t$j.inspect=function(){return"[Emscripten Module object]"};else if(ve$b)typeof read<"u"&&(t$j.read=function(e){return read(e)}),t$j.readBinary=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),n("object"==typeof t),t)},typeof scriptArgs<"u"?t$j.arguments=scriptArgs:typeof arguments<"u"&&(t$j.arguments=arguments),"function"==typeof quit&&(t$j.quit=function(e){quit(e)});else{if(!Y$p&&!U$n)throw new Error("environment detection error");U$n?v$r=self.location.href:document.currentScript&&(v$r=document.currentScript.src),v$r=0!==v$r.indexOf("blob:")?v$r.substr(0,v$r.indexOf("/Workers")+1):"",t$j.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},U$n&&(t$j.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),t$j.readAsync=function(e,t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)},t$j.setWindowTitle=function(e){document.title=e}}var z$l=t$j.print||(typeof console<"u"?console.log.bind(console):typeof print<"u"?print:null),R$i=t$j.printErr||(typeof printErr<"u"?printErr:typeof console<"u"&&console.warn.bind(console)||z$l);for(S$m in W$n)W$n.hasOwnProperty(S$m)&&(t$j[S$m]=W$n[S$m]);W$n=void 0,n(typeof t$j.memoryInitializerPrefixURL>"u","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$j.pthreadMainPrefixURL>"u","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$j.cdInitializerPrefixURL>"u","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$j.filePackagePrefixURL>"u","Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),Te$f=Be$b=J$n=function(){J("cannot use the stack before compiled code is ready to run, and has provided stack access")};var xt$6={"f64-rem":function(e,t){return e%t},debugger:function(){}};new Array(0);var Fe$8=0,Nt$3=function(e){Fe$8=e},Ut$3=function(){return Fe$8};"object"!=typeof WebAssembly&&J("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");var j$i,ee$e=!1,Ne$9=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;typeof TextDecoder<"u"&&new TextDecoder("utf-16le");var De$g=65536,w$w,f$u,b$x,F$n,g$l,D$v,ce$b,fe$b,Xe$3=15104,I$r=5257984,Pe$c=5257984,V$k=15072;n(Xe$3%16==0,"stack must start aligned"),n(Pe$c%16==0,"heap must start aligned");var de$c=5242880;t$j.TOTAL_STACK&&n(de$c===t$j.TOTAL_STACK,"the stack size can no longer be determined at runtime");var x$t=t$j.TOTAL_MEMORY||16777216;if(x$t<de$c&&R$i("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+x$t+"! (TOTAL_STACK="+de$c+")"),n(typeof Int32Array<"u"&&typeof Float64Array<"u"&&void 0!==Int32Array.prototype.subarray&&void 0!==Int32Array.prototype.set,"JS engine does not provide full typed array support"),t$j.buffer?(w$w=t$j.buffer,n(w$w.byteLength===x$t,"provided buffer should be "+x$t+" bytes, but it is "+w$w.byteLength)):("object"==typeof WebAssembly&&"function"==typeof WebAssembly.Memory?(n(x$t%De$g==0),j$i=new WebAssembly.Memory({initial:x$t/De$g}),w$w=j$i.buffer):w$w=new ArrayBuffer(x$t),n(w$w.byteLength===x$t)),m(),g$l[V$k>>2]=Pe$c,g$l[0]=1668509029,F$n[1]=25459,115!==b$x[2]||99!==b$x[3])throw"Runtime error: expected the system to be little-endian!";var ke$6=[],Le$b=[],Ce$b=[],He$8=[],d$p=!1,p$p=!1;n(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var X$e=0,P$i=null,G$q=null,C$r={};t$j.preloadedImages={},t$j.preloadedAudios={};var y$r={error:function(){J("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -s FORCE_FILESYSTEM=1")},init:function(){y$r.error()},createDataFile:function(){y$r.error()},createPreloadedFile:function(){y$r.error()},createLazyFile:function(){y$r.error()},open:function(){y$r.error()},mkdev:function(){y$r.error()},registerDevice:function(){y$r.error()},analyzePath:function(){y$r.error()},loadFilesFromDB:function(){y$r.error()},ErrnoError:function(){y$r.error()}};t$j.FS_createDataFile=y$r.createDataFile,t$j.FS_createPreloadedFile=y$r.createPreloadedFile;var Qe$6="data:application/octet-stream;base64,",N$m="ThirdParty/unzip.wasm";A(N$m)||(N$m=e(N$m)),t$j.asm=function(e,t,i){t.memory=j$i,t.table=new WebAssembly.Table({initial:22,maximum:22,element:"anyfunc"}),t.__memory_base=1024,t.__table_base=0;var r=I(t);return n(r,"binaryen setup failed (no wasm support?)"),r};var A$u=15088;n(A$u%8==0);var E$s={buffers:[null,[],[]],printChar:function(e,t){var i=E$s.buffers[e];n(i),0===t||10===t?((1===e?z$l:R$i)(s(i,0)),i.length=0):i.push(t)},varargs:0,get:function(e){return E$s.varargs+=4,g$l[E$s.varargs-4>>2]},getStr:function(){return l(E$s.get())},get64:function(){var e=E$s.get(),t=E$s.get();return n(e>=0?0===t:-1===t),e},getZero:function(){n(0===E$s.get())}},Qt$3={},Bt$3={abort:J,setTempRet0:Nt$3,getTempRet0:Ut$3,abortStackOverflow:y,nullFunc_ii:Y,nullFunc_iiii:j,nullFunc_jiji:q,nullFunc_vii:X,___lock:O,___setErrNo:U,___syscall140:D,___syscall146:N,___syscall54:F,___syscall6:B,___unlock:z,_emscripten_get_heap_size:G,_emscripten_memcpy_big:k,_emscripten_resize_heap:H,abortOnCannotGrowMemory:V,emscripten_realloc_buffer:W,flush_NO_FILESYSTEM:R,tempDoublePtr:A$u,DYNAMICTOP_PTR:V$k},T$r=t$j.asm(Qt$3,Bt$3,w$w),Wt$3=T$r.___errno_location;T$r.___errno_location=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Wt$3.apply(null,arguments)};var Yt$2=T$r._fflush;T$r._fflush=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Yt$2.apply(null,arguments)};var zt$2=T$r._free;T$r._free=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),zt$2.apply(null,arguments)};var jt$4=T$r._freePointer;T$r._freePointer=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),jt$4.apply(null,arguments)};var Vt$4=T$r._llvm_bswap_i32;T$r._llvm_bswap_i32=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Vt$4.apply(null,arguments)};var Gt$4=T$r._malloc;T$r._malloc=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Gt$4.apply(null,arguments)};var qt$2=T$r._sbrk;T$r._sbrk=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),qt$2.apply(null,arguments)};var Jt$4=T$r._unzip;T$r._unzip=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Jt$4.apply(null,arguments)};var Kt$2=T$r.establishStackSpace;T$r.establishStackSpace=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Kt$2.apply(null,arguments)};var Zt$2=T$r.stackAlloc;T$r.stackAlloc=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Zt$2.apply(null,arguments)};var $t$2=T$r.stackRestore;T$r.stackRestore=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),$t$2.apply(null,arguments)};var en$2=T$r.stackSave;T$r.stackSave=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),en$2.apply(null,arguments)},t$j.asm=T$r,t$j.___errno_location=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$j.asm.___errno_location.apply(null,arguments)},t$j._emscripten_replace_memory=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$j.asm._emscripten_replace_memory.apply(null,arguments)},t$j._fflush=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$j.asm._fflush.apply(null,arguments)},t$j._free=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$j.asm._free.apply(null,arguments)},t$j._freePointer=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$j.asm._freePointer.apply(null,arguments)},t$j._llvm_bswap_i32=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$j.asm._llvm_bswap_i32.apply(null,arguments)},t$j._malloc=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$j.asm._malloc.apply(null,arguments)},t$j._memcpy=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$j.asm._memcpy.apply(null,arguments)},t$j._memset=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$j.asm._memset.apply(null,arguments)},t$j._sbrk=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$j.asm._sbrk.apply(null,arguments)},t$j._unzip=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$j.asm._unzip.apply(null,arguments)},t$j.establishStackSpace=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$j.asm.establishStackSpace.apply(null,arguments)};var J$n=t$j.stackAlloc=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$j.asm.stackAlloc.apply(null,arguments)},Be$b=t$j.stackRestore=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$j.asm.stackRestore.apply(null,arguments)},Te$f=t$j.stackSave=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$j.asm.stackSave.apply(null,arguments)};t$j.dynCall_ii=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$j.asm.dynCall_ii.apply(null,arguments)},t$j.dynCall_iiii=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$j.asm.dynCall_iiii.apply(null,arguments)},t$j.dynCall_jiji=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$j.asm.dynCall_jiji.apply(null,arguments)},t$j.dynCall_vii=function(){return n(d$p,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!p$p,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$j.asm.dynCall_vii.apply(null,arguments)},t$j.asm=T$r,t$j.intArrayFromString||(t$j.intArrayFromString=function(){J("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.intArrayToString||(t$j.intArrayToString=function(){J("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.ccall=o,t$j.cwrap=a,t$j.setValue||(t$j.setValue=function(){J("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.getValue=i,t$j.allocate||(t$j.allocate=function(){J("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.getMemory||(t$j.getMemory=function(){J("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$j.AsciiToString||(t$j.AsciiToString=function(){J("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.stringToAscii||(t$j.stringToAscii=function(){J("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.UTF8ArrayToString||(t$j.UTF8ArrayToString=function(){J("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.UTF8ToString||(t$j.UTF8ToString=function(){J("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.stringToUTF8Array||(t$j.stringToUTF8Array=function(){J("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.stringToUTF8||(t$j.stringToUTF8=function(){J("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.lengthBytesUTF8||(t$j.lengthBytesUTF8=function(){J("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.UTF16ToString||(t$j.UTF16ToString=function(){J("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.stringToUTF16||(t$j.stringToUTF16=function(){J("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.lengthBytesUTF16||(t$j.lengthBytesUTF16=function(){J("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.UTF32ToString||(t$j.UTF32ToString=function(){J("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.stringToUTF32||(t$j.stringToUTF32=function(){J("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.lengthBytesUTF32||(t$j.lengthBytesUTF32=function(){J("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.allocateUTF8||(t$j.allocateUTF8=function(){J("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.stackTrace||(t$j.stackTrace=function(){J("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.addOnPreRun||(t$j.addOnPreRun=function(){J("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.addOnInit||(t$j.addOnInit=function(){J("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.addOnPreMain||(t$j.addOnPreMain=function(){J("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.addOnExit||(t$j.addOnExit=function(){J("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.addOnPostRun||(t$j.addOnPostRun=function(){J("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.writeStringToMemory||(t$j.writeStringToMemory=function(){J("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.writeArrayToMemory||(t$j.writeArrayToMemory=function(){J("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.writeAsciiToMemory||(t$j.writeAsciiToMemory=function(){J("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.addRunDependency||(t$j.addRunDependency=function(){J("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$j.removeRunDependency||(t$j.removeRunDependency=function(){J("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$j.ENV||(t$j.ENV=function(){J("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.FS||(t$j.FS=function(){J("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.FS_createFolder||(t$j.FS_createFolder=function(){J("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$j.FS_createPath||(t$j.FS_createPath=function(){J("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$j.FS_createDataFile||(t$j.FS_createDataFile=function(){J("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$j.FS_createPreloadedFile||(t$j.FS_createPreloadedFile=function(){J("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$j.FS_createLazyFile||(t$j.FS_createLazyFile=function(){J("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$j.FS_createLink||(t$j.FS_createLink=function(){J("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$j.FS_createDevice||(t$j.FS_createDevice=function(){J("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$j.FS_unlink||(t$j.FS_unlink=function(){J("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$j.GL||(t$j.GL=function(){J("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.dynamicAlloc||(t$j.dynamicAlloc=function(){J("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.warnOnce||(t$j.warnOnce=function(){J("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.loadDynamicLibrary||(t$j.loadDynamicLibrary=function(){J("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.loadWebAssemblyModule||(t$j.loadWebAssemblyModule=function(){J("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.getLEB||(t$j.getLEB=function(){J("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.getFunctionTables||(t$j.getFunctionTables=function(){J("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.alignFunctionTables||(t$j.alignFunctionTables=function(){J("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.registerFunctions||(t$j.registerFunctions=function(){J("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.addFunction||(t$j.addFunction=function(){J("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.removeFunction||(t$j.removeFunction=function(){J("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.getFuncWrapper||(t$j.getFuncWrapper=function(){J("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.prettyPrint||(t$j.prettyPrint=function(){J("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.makeBigInt||(t$j.makeBigInt=function(){J("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.dynCall||(t$j.dynCall=function(){J("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.getCompilerSetting||(t$j.getCompilerSetting=function(){J("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.stackSave||(t$j.stackSave=function(){J("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.stackRestore||(t$j.stackRestore=function(){J("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.stackAlloc||(t$j.stackAlloc=function(){J("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.establishStackSpace||(t$j.establishStackSpace=function(){J("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.print||(t$j.print=function(){J("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.printErr||(t$j.printErr=function(){J("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.getTempRet0||(t$j.getTempRet0=function(){J("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.setTempRet0||(t$j.setTempRet0=function(){J("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.Pointer_stringify||(t$j.Pointer_stringify=function(){J("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$j.ALLOC_NORMAL||Object.defineProperty(t$j,"ALLOC_NORMAL",{get:function(){J("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),t$j.ALLOC_STACK||Object.defineProperty(t$j,"ALLOC_STACK",{get:function(){J("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),t$j.ALLOC_DYNAMIC||Object.defineProperty(t$j,"ALLOC_DYNAMIC",{get:function(){J("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),t$j.ALLOC_NONE||Object.defineProperty(t$j,"ALLOC_NONE",{get:function(){J("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),K.prototype=new Error,K.prototype.constructor=K,G$q=function e(){t$j.calledRun||Z(),t$j.calledRun||(G$q=e)},t$j.run=Z;var We$9=[];if(t$j.abort=J,t$j.preInit)for("function"==typeof t$j.preInit&&(t$j.preInit=[t$j.preInit]);t$j.preInit.length>0;)t$j.preInit.pop()();t$j.noExitRuntime=!0,Z()}else var t$j=null;var _0x2a83d3=t$j,_0x3e1892=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x55f994=_0x3e1892(void 0,(function(){return _0x55f994.toString().search("(((.+)+)+)+$").toString().constructor(_0x55f994).search("(((.+)+)+)+$")}));_0x55f994();var _0x416cc2={Normal:0,Add:1},_0x17401e={LOD_Loading:0,All_Loading:1};function _0x57a4f2(e){return function(){return e._disFromCamera}}function _0xe3541a(e){return function(){return e._priority}}function _0x26e96b(e,t){return function(){var i=t._currentMaxLevel,n=1/Math.pow(2,i-e._nLODLev);return e._disFromCamera*n}}var _0x2063a0=function(e){e=e||{},this._gl=e.gl,this._layer=e.layer,this._customRequestHeaders=e.customRequestHeaders,this._renderQueue=[],this._cache=new e$1F,this._rootEntities=[],this._cameraPos=new a$11,this._cameraDir=new a$11,this._cameraUp=new a$11,this._cacheEntityCount=e$1Y(e.cacheEntityCount,0),this._sceneMode=b$1d.SCENE3D,this._projection=null,this._oriRootEntities=e.rootEntities,this._initializeRootEntities(e.rootEntities),this._nLoadingPriority=this._layer._isS3MBlock?_0x271348.Child_Priority_NonLinear:_0x271348.Child_Priority,this.createPriorityFunction=_0x57a4f2,this._currentMaxLevel=0,this._replacementList=new s$15,this._replacementSentinel=this._replacementList.add(),this._cacheKey=e.cacheKey;var t=this._layer._baseUri.toString(),i=t.substring(0,t.indexOf("/datas"));this.tablename=t.substring(t.indexOf("datas/")+6,t.indexOf("/data/")),this._indexedDBSetting=this._layer._indexedDBSetting;var n=this,r=c$18.defer();if(n._attributes={_errorNum:0,_reStoreTimes:0,_memoryCache:0,_redownload:!1,status:{promise:r.promise,needDownload:void 0}},this._scpUrl=e.scpUrl,t$$(window.Proxy)){var o=c$18.defer();n._dpPromise=o.promise,new d$_({name:i+this.tablename}).then((function(e){e.checkObjectStoreExit(n.tablename)?e.checkObjectStoreExit(n.tablename+"Texture")?(_0x3b4b93(e,n,r),n._indexedDBScheduler=e,o.resolve(!0)):e.createObjectStore(n.tablename+"Texture").then((function(){_0x3b4b93(e,n,r),n._indexedDBScheduler=e,o.resolve(!0)})):e.createObjectStore(n.tablename).then((function(){e.checkObjectStoreExit(n.tablename+"Texture")?(_0x3b4b93(e,n,r),n._indexedDBScheduler=e,o.resolve(!0)):e.createObjectStore(n.tablename+"Texture").then((function(){_0x3b4b93(e,n,r),n._indexedDBScheduler=e,o.resolve(!0)}))}))}))}this._rasterFrequency=0,this._statistics={numberOfPendingRequests:0,numberOfAttemptedRequests:0,numberOfTilesProcessing:0,numberOfProcessingAttempted:0,lastLoadedTrigger:{time:Date.now(),done:!1},numberOfColorChangePending:0,numberOfColorChangeAttempted:0,numberOfColorChangeProcessing:0,lastColorChangeTrigger:{time:Date.now(),done:!1}},this._statisticsLastRender=s$1n({},this._statistics),this._packingRequest=!1,this._packRequestEntities=[],this._parsingEntities=[],this._attrloaded=!1,this._selectEntities=[],this._requestEntities=[],this.attrsave=!1,this._extrudedId=void 0,this._polygons=void 0,this._indexedDBRequestNum=0,this._indexedDBRequestLimit=3,this._requestByteLength=0,this._prepareLoaded=!0,this._prepareRatio=0,this._associatedFieldName=void 0,this._entityObjectId={},this._objectIdChange=!1,this._isFineLayer=!1,this._entityModelId={},this._stopLoadImagery=!1,this._rangeMode=_0x2b4bc7.DISTANCE_FROM_EYE_POINT};function _0x3b4b93(e,t,i){e.checkObjectStoreExit("attributes")?!0===t._indexedDBSetting.isAttributesSave&&e.getElementFromDB("attributes","queryFieldNames").then((function(n){if("ALL"===n&&(t._attributes.status.needDownload=!1,i.resolve(!0)),t$$(t._layer.queryFieldNames)){for(var r=0;r<t._layer.queryFieldNames.length;r++)if(-1===n.indexOf(t._layer.queryFieldNames[r]))return t._attributes.status.needDownload=!0,e.updateElementInDB("attributes","queryFieldNames",n.concat(t._layer.queryFieldNames)),void i.resolve(!0);t._attributes.status.needDownload=!1,i.resolve(!0)}})).otherwise((function(){!0===t._indexedDBSetting.isAttributesSave&&(t$$(t._layer.queryFieldNames)?e.putElementInDB("attributes","queryFieldNames",t._layer.queryFieldNames):e.putElementInDB("attributes","queryFieldNames","ALL"),t._attributes.status.needDownload=!0,i.resolve(!0))})):e.createObjectStore("attributes").then((function(){i.resolve(!0),!0===t._indexedDBSetting.isAttributesSave&&(t$$(t._layer.queryFieldNames)?e.putElementInDB("attributes","queryFieldNames",t._layer.queryFieldNames):e.putElementInDB("attributes","queryFieldNames","ALL"),t._attributes.status.needDownload=!0)}))}function _0x15dfcf(e){!e._indexedDBSetting.isAttributesSave||(t$$(e._indexedDBScheduler)?_0x248e07(e):e._dpPromise.then((function(){_0x248e07(e)})))}function _0x248e07(e){var t=new TextEncoder("utf-8"),i=[];if(e._indexedDBScheduler.checkObjectStoreExit("attributes")){for(var n in e._attributes){var r=JSON.stringify(e._attributes[n]);r=t.encode(r).join(256),i.push(e._indexedDBScheduler.putElementInDB("attributes",n,r))}c$18.all(i,(function(t){e._indexedDBScheduler.putElementInDB("attributes","saved",!0)}),(function(t){e._attributes._reStoreTimes<=3&&(e._attributes._reStoreTimes++,setTimeout((function(){_0x15dfcf(e)}),2e3))}))}else e._indexedDBScheduler.createObjectStore("attributes").then((function(){for(var n in e._attributes){var r=JSON.stringify(e._attributes[n]);r=t.encode(r).join(256),i.push(e._indexedDBScheduler.putElementInDB("attributes",n,r))}c$18.all(i,(function(t){e._indexedDBScheduler.putElementInDB("attributes","saved",!0)}),(function(t){e._attributes._reStoreTimes<=3&&(e._attributes._reStoreTimes++,setTimeout((function(){_0x15dfcf(e)}),2e3))}))}))}function _0x43262c(e,t){if(Array.isArray(e))for(var i=0,n=e.length;i<n;i++){var r=e[i].SmID||e[i].SMID||e[i].smid||e[i].id;t._attributes.hasOwnProperty(r)||(t._attributes[r]=e[i])}else t$$(r=e.id||e.SmID||e.SMID)&&(t._attributes[r]=e);t._attributes._memoryCache=1}function _0x5bf15e(e,t){for(var i=[],n="attribute"===e._layer._attributeExtentName?".attribute":e._layer._isS3MB?".s3md":".scvd",r=0,o=e._rootEntities.length;r<o;r++){var a;if(a=e._layer._isS3MBlock?e._rootEntities[r]._relativePath.resolve(e._layer._baseUri).toString()+e._rootEntities[r]._fileName+n:e._rootEntities[r]._relativePath.resolve(e._layer._baseUri).toString()+a$J(e._rootEntities[r]._relativePath.toString().replace(/\/$/,""))+n,".attribute"===n){var s=Object.keys(e._layer._fieldsInfo._hash).join(";");e._layer._fieldsInfo._hash.hasOwnProperty("smid")?a=a+"?fields=smid;"+(s=s.replace("smid;","")):a=a+"?fields=SmID;"+(s=s.replace("SmID;",""))}t$$(a$R.CREDENTIAL)&&(a=t$$(a$R.CREDENTIAL._keymap[e._scpUrl])?a$R.addTokenWithKey(e._scpUrl,a):a$R.addToken(a)),i.push(u$S(a))}c$18.all(i,(function(t){for(var i=[],r=0,o=t.length;r<o;r++)i.push(_0x4ef96f(t[r],n,e._layer._fieldsInfo));for(var a=0;a<i.length;a++)_0x43262c(i[a],e);e._attrloaded||(e._attrloaded=!0,e._layer.attributeDownloaded.raiseEvent(e._layer.name+" attribute downloaded.")),_0x15dfcf(e)}),(function(t){for(var i=0,r=e._rootEntities.length;i<r;i++){var o;if(o=e._layer._isS3MBlock?e._rootEntities[i]._relativePath.resolve(e._layer._baseUri).toString()+e._rootEntities[i]._fileName+n:e._rootEntities[i]._relativePath.resolve(e._layer._baseUri).toString()+a$J(e._rootEntities[i]._relativePath.toString().replace(/\/$/,""))+n,".attribute"===n){var a=Object.keys(e._layer._fieldsInfo._hash).join(";");e._layer._fieldsInfo._hash.hasOwnProperty("smid")?o=o+"?fields=smid;"+(a=a.replace("smid;","")):o=o+"?fields=SmID;"+(a=a.replace("SmID;",""))}t$$(a$R.CREDENTIAL)&&(o=t$$(a$R.CREDENTIAL._keymap[e._scpUrl])?a$R.addTokenWithKey(e._scpUrl,o):a$R.addToken(o)),u$S(o).then((function(t){var i=[];i.push(_0x4ef96f(t,n,e._layer._fieldsInfo)),_0x43262c(i[0],e),_0x15dfcf(e)}))}}))}Object.defineProperties(_0x2063a0.prototype,{LoadingPriority:{get:function(){return this._nLoadingPriority},set:function(e){this._nLoadingPriority=e,this.createPriorityFunction=this._nLoadingPriority===_0x271348.Root_Priority?_0x26e96b:_0x57a4f2,this._nLoadingPriority===_0x271348.UsePagedLodInfo&&(this.createPriorityFunction=_0xe3541a)}}}),_0x2063a0.prototype._updatingTiles=function(){return this._statistics.numberOfPendingRequests+this._statistics.numberOfAttemptedRequests+this._statistics.numberOfTilesProcessing},_0x2063a0.prototype._requestAllScvd=function(e){var t=this;if(t$$(this._indexedDBScheduler)){if(!t._indexedDBScheduler.checkObjectStoreExit("attributes")&&!e)return;_0x5bf15e(t,t._layer._isS3MB)}else this._dpPromise.then((function(){t$$(t._indexedDBScheduler)&&t._indexedDBScheduler.checkObjectStoreExit("attributes")||_0x5bf15e(t,t._layer._isS3MB)}))},_0x2063a0.prototype.getAttributesById=function(e){var t=new TextDecoder("utf-8"),i=c$18.defer();if(t$$(this._attributes[e]))return i.resolve(this._attributes[e]),i.promise;if(!this._indexedDBSetting.isAttributesSave&&!this._layer._showLabel||!t$$(this._indexedDBScheduler)||!this._indexedDBScheduler.checkObjectStoreExit("attributes"))return i.resolve(null),i.promise;var n=this;return this._indexedDBScheduler.getElementFromDB("attributes",e.toString()).then((function(r){if(null!==r){r=r.split(256);var o=new Uint8Array(r);r=t.decode(o),r=JSON.parse(r)}else n._attributes._errorNum++,n._attributes._errorNum>3&&(_0x5bf15e(n,n._layer._isS3MB),n._attributes._errorNum=0);n._attributes[e]=r,i.resolve(r)}),(function(e){n._attributes._errorNum++,n._attributes._errorNum>3&&!n._attributes._redownload&&(_0x5bf15e(n,n._layer._isS3MB),n._attributes._redownload=!0),i.resolve(null)})),i.promise},_0x2063a0.prototype._downloadAttributes=function(){for(var e=[],t=c$18.defer(),i="attribute"===this._layer._attributeExtentName?".attribute":this._layer._isS3MB?".s3md":".scvd",n=this,r=this._layer,o=0,a=this._rootEntities.length;o<a;o++){var s=this._rootEntities[o];if(t$$(r._indexInfoMap)){var l=s._fileName,u=r._indexInfoMap[l];if(t$$(u))for(var c=0;c<u.length;c++){var h=new h$1f(u[c].url).resolve(r._baseUri).toString(),d=Object.keys(this._layer._fieldsInfo._hash).join(";");r._fieldsInfo._hash.hasOwnProperty("smid")?h=h+"?fields=smid;"+(d=d.replace("smid;","")):h=h+"?fields=SmID;"+(d=d.replace("SmID;","")),t$$(a$R.CREDENTIAL)&&(h=t$$(a$R.CREDENTIAL._keymap[this._scpUrl])?a$R.addTokenWithKey(this._scpUrl,h):a$R.addToken(h)),e.push(u$S(h))}}else{h=this._rootEntities[o]._relativePath.resolve(this._layer._baseUri).toString()+a$J(this._rootEntities[o]._relativePath.toString().replace(/\/$/,""))+i,d=Object.keys(this._layer._fieldsInfo._hash).join(";");this._layer._fieldsInfo._hash.hasOwnProperty("smid")?h=h+"?fields=smid;"+(d=d.replace("smid;","")):h=h+"?fields=SmID;"+(d=d.replace("SmID;","")),t$$(a$R.CREDENTIAL)&&(h=t$$(a$R.CREDENTIAL._keymap[this._scpUrl])?a$R.addTokenWithKey(this._scpUrl,h):a$R.addToken(h)),e.push(u$S(h))}}return c$18.all(e,(function(e){for(var r=[],o=0,a=e.length;o<a;o++)r.push(_0x4ef96f(e[o],i,n._layer._fieldsInfo));for(var s=0;s<r.length;s++)_0x43262c(r[s],n);n._attrloaded||(n._attrloaded=!0,n._layer.attributeDownloaded.raiseEvent(n._layer.name+" attribute downloaded.")),t.resolve(!0)}),(function(e){for(var r=0,o=n._rootEntities.length;r<o;r++){var a=n._rootEntities[r]._relativePath.resolve(n._layer._baseUri).toString()+a$J(n._rootEntities[r]._relativePath.toString().replace(/\/$/,""))+i;t$$(a$R.CREDENTIAL)&&(a=t$$(a$R.CREDENTIAL._keymap[n._scpUrl])?a$R.addTokenWithKey(n._scpUrl,a):a$R.addToken(a)),u$S(a).then((function(e){var r=[];r.push(_0x4ef96f(e,i,n._layer._fieldsInfo)),_0x43262c(r[0],n),t.resolve(!0)}))}})),t.promise};var _0x1c6c68=null,_0x3da666=null,_0x4f2a57=!1;function _0x1fe1c8(e){var t=4*e.length,i=_0x2a83d3._malloc(Uint8Array.BYTES_PER_ELEMENT*t),n=new Uint8Array(t);_0x2a83d3.HEAPU8.set(n,i/Uint8Array.BYTES_PER_ELEMENT);var r,o=_0x2a83d3._malloc(Uint8Array.BYTES_PER_ELEMENT*e.length);for(_0x2a83d3.HEAPU8.set(e,o/Uint8Array.BYTES_PER_ELEMENT);0==(r=_0x1c6c68(i,t,o,e.length));)_0x3da666(i),t*=4,i=_0x2a83d3._malloc(Uint8Array.BYTES_PER_ELEMENT*t),n=new Uint8Array(t),_0x2a83d3.HEAPU8.set(n,i/Uint8Array.BYTES_PER_ELEMENT);var a=new Uint8Array(_0x2a83d3.HEAPU8.buffer,i,r);e=null,n=null;var s=new Uint8Array(a).buffer;return _0x3da666(i),_0x3da666(o),s}function _0x4ef96f(e,t,i){if(".attribute"===t){var n=new Int32Array(e,0,1);n=n[0];for(var r=new Int32Array(e,4,n),o=[],a=0;a<n;a++)o.push(r[a]);var s=Math.floor(o[0]/4.125),l=$=Math.ceil(s/8),u=new Int8Array(e,4*(n+1)+$,4*s),c=u.subarray(0,4*s),h=new Int8Array(c);u=new Int32Array(h.buffer);var d=4*(n+1)+o[0],f=[];for(a=1;a<n;a++){var p=(i=i)._array[a],_=p.type,m=Number(p.size);s=Math.floor(o[a]/(m+.125));var $=Math.ceil(s/8);(10==_||"ntext"===_||"text"===_)&&(m=1,$=l,s=o[a]-$);var g=new Int8Array(e,d+$,s*m).subarray(0,s*m);h=new Int8Array(g);if(4==_||"int32"===_)g=new Int32Array(h.buffer);else if(16==_||"int64"===_)g=new BigInt64Array(h.buffer);else if(6==_||"float"===_)g=new Float32Array(h.buffer);else if(7==_||"double"===_)g=new Float64Array(h.buffer);else if(10==_||"ntext"===_||"text"===_){for(var y=new DataView(g.buffer),v=0,x=[];v+g.byteOffset<y.byteLength;){var b=y.getInt32(v+g.byteOffset,!0);if((v+=4)+b>h.buffer.byteLength||b<0)break;var S=new Uint8Array(h.buffer,v,b);v+=b;var w=c$X(S,void 0,void 0,"gbk");x.push(w)}g=x}d+=o[a],f.push(g)}var C=Object.keys(i._hash),T=[];for(a=0;a<u.length;a++){(O={})[C[0]]=u[a];for(var P=0;P<f.length;P++)O[C[P+1]]=f[P][a];T.push(O)}return T}var E,A=new Uint8Array(e,8);if(null!==_0x1c6c68&&!0===_0x4f2a57)try{E=_0x1fe1c8(A)}catch{return[]}else E=lt$f.inflate(A).buffer;h=new Uint8Array(E);var L=new TextDecoder("utf-8").decode(h);if(".s3md"===t){var M,I=L.substring(4);try{M=JSON.parse(I)}catch{I=L.substring(L.indexOf("{")),M=JSON.parse(I)}for(var O=[],D=0,R=M.layerInfos.length;D<R;D++)for(var N=M.layerInfos[D].records,F=(a=0,N.length);a<F;a++){for(var B={},z=(P=0,(k=N[a]).values.length);P<z;P++)B[k.values[P].name]=k.values[P].field,B[k.values[P].name]=!isNaN(1*B[k.values[P].name])&1*B[k.values[P].name]<Number.MAX_SAFE_INTEGER?1*B[k.values[P].name]:B[k.values[P].name];O.push(B)}return O}O=[];var G=(new f$10).read(L).getElementsByTagName("Record");for(a=0,F=G.length;a<F;a++){for(B={},h=G[a].innerHTML.split("\n"),P=0;P<h.length;P++){var k;if(""!==(k=h[P]))if(-1!==k.indexOf("<ID>"))B.id=k.substring(k.indexOf(">")+1,k.indexOf("</"));else{var U=k.indexOf('"');U=k.indexOf('"',U+1);var V=k.substring(k.indexOf("Name=")+6,U);-1!==k.indexOf("/>")?B[V]="":B[V]=k.substring(k.indexOf(">")+1,k.indexOf("</"))}}O.push(B)}return O}function _0x5e8554(e,t){var i=new Int8Array(e);for(var n=t.split("").map((function(e){return e.charCodeAt(0)})),r=0;r<n.length;r++)i[r]=i[r]^n[r];return i.buffer}typeof WebAssembly<"u"&&t$$(_0x2a83d3)&&(_0x2a83d3.onRuntimeInitialized=function(){_0x4f2a57=!0},_0x1c6c68=_0x2a83d3.cwrap("unzip","number",["number","number","number","number"]),_0x3da666=_0x2a83d3.cwrap("freePointer",null,["number"])),_0x2063a0.prototype._updateRootBoundingSphere=function(e,t){for(var i=0,n=e.length;i<n;i++){var r=e[i],o=this._rootEntities[i];if(t$$(r.bSphere)&&r.bSphere.radius>0&&(o._boundingSphere=c$19.transform(r.bSphere,t,new c$19),t$$(r.min))){var a=[];a.push(new a$11(r.min.x,r.min.y,r.min.z)),a.push(new a$11(r.min.x,r.min.y,r.max.z)),a.push(new a$11(r.min.x,r.max.y,r.min.z)),a.push(new a$11(r.min.x,r.max.y,r.max.z)),a.push(new a$11(r.max.x,r.min.y,r.min.z)),a.push(new a$11(r.max.x,r.min.y,r.max.z)),a.push(new a$11(r.max.x,r.max.y,r.min.z)),a.push(new a$11(r.max.x,r.max.y,r.max.z));for(var s=0;s<8;s++)a[s]=c$1a.multiplyByPoint(t,a[s],a[s]);o._orientedBoundingBox=b$1o.fromPoints(a,o._orientedBoundingBox)}}},_0x2063a0.prototype._initializeRootEntities=function(e){if(t$$(e)){this._rootNodeNameList=[];for(var t=this._layer,i=t._fileType,n=i===c$q.ClampGroundPolygon||i===c$q.ClampObjectPolygon||i===c$q.ClampGroundLine||i===c$q.ClampObjectLine,r=new a$11,o=new a$11,a=!1,s=[],l=0,u=e.length;l<u;l++){var c=e[l],h=new _0x56ff2;h.layer=t,h._isAncestorBlock=t._isS3MBlock,h._fileName=c.name,h._relativePath=c.relativePath,h._isRootTile=!0,h._nLODLev=0;var d=h._relativePath.toString()+h._fileName;if(this._rootNodeNameList.push(d),t$$(c.bSphere)&&c.bSphere.radius>0){if(h._originalBS=c.bSphere,h._boundingSphere=c$19.transform(c.bSphere,t._matModel,new c$19),h._oriBoundingSphere=c$19.clone(h._boundingSphere),s.push(h._boundingSphere),t$$(c.min)&&!t._isS3MBlock){var f=[];f.push(new a$11(c.min.x,c.min.y,c.min.z)),f.push(new a$11(c.min.x,c.min.y,c.max.z)),f.push(new a$11(c.min.x,c.max.y,c.min.z)),f.push(new a$11(c.min.x,c.max.y,c.max.z)),f.push(new a$11(c.max.x,c.min.y,c.min.z)),f.push(new a$11(c.max.x,c.min.y,c.max.z)),f.push(new a$11(c.max.x,c.max.y,c.min.z)),f.push(new a$11(c.max.x,c.max.y,c.max.z));for(var p=0;p<8;p++)f[p]=c$1a.multiplyByPoint(t._matModel,f[p],f[p]);h._orientedBoundingBox=b$1o.fromPoints(f,h._orientedBoundingBox),h.obbMin=c.min,h.obbMax=c.max,0==l?(r=c.max.clone(),o=c.min.clone()):(r.x=Math.max(r.x,c.max.x),r.y=Math.max(r.y,c.max.y),r.z=Math.max(r.z,c.max.z),o.x=Math.min(o.x,c.min.x),o.y=Math.min(o.y,c.min.y),o.z=Math.min(o.z,c.min.z),a=!0)}}else if(t$$(c.obb)){var _=c.obb,m=new r$W,$=new a$11(_.center.x,_.center.y,_.center.z),g=new a$10(_.xExtent.x,_.xExtent.y,_.xExtent.z,0),y=new a$10(_.yExtent.x,_.yExtent.y,_.yExtent.z,0),v=new a$10(_.zExtent.x,_.zExtent.y,_.zExtent.z,0);r$W.setColumn(m,0,g,m),r$W.setColumn(m,1,y,m),r$W.setColumn(m,2,v,m);var x=new b$1o($,m);h._oriBoundingSphere=c$19.fromOrientedBoundingBox(x,new c$19),h._boundingSphere=c$19.transform(h._oriBoundingSphere,t._matModel,new c$19),$=c$1a.multiplyByPoint(t._matModel,$,$),g=c$1a.multiplyByVector(t._matModel,g,g),y=c$1a.multiplyByVector(t._matModel,y,y),v=c$1a.multiplyByVector(t._matModel,v,v),r$W.setColumn(m,0,g,m),r$W.setColumn(m,1,y,m),r$W.setColumn(m,2,v,m),h._orientedBoundingBox=new b$1o($,m),h.obbMin=g,h.obbMax=y}n&&t$$(h._boundingSphere)&&(h._boundingSphere.radius+=9e3),h._subdomainIndex=l,this._rootEntities.push(h)}this._layer.max=r,this._layer.min=o,t._oriBoundingSphere=new c$19,a?c$19.fromCornerPoints(o,r,t._oriBoundingSphere):s.length>0&&c$19.fromBoundingSpheres(s,t._oriBoundingSphere),t._boundingSphere=c$19.transform(t._oriBoundingSphere,t._matModel,new c$19)}},_0x2063a0.prototype._isRootNode=function(e){return!!t$$(this._rootNodeNameList)&&-1!==this._rootNodeNameList.indexOf(e)},_0x2063a0.prototype.appendQueryFieldName=function(e){for(var t=[],i=0,n=this._rootEntities.length;i<n;i++){var r=this._rootEntities[i],o="attribute"===e._attributeExtentName?".attribute":this._layer._isS3MB?".s3md":".scvd",a=r._relativePath.resolve(this._layer._baseUri).toString()+a$J(r._relativePath.toString().replace(/\/$/,""))+o,s=e._queryFieldNames,l=s.join(";"),u=this;if("attribute"===e._attributeExtentName){var c;if(e._fieldsInfo._hash.hasOwnProperty("smid")?(a=a+"?fields=smid;"+l,c="smid"):(a=a+"?fields=SmID;"+l,c="SmID"),e._urlType===di$7.KEY_VALUE){var h=r._relativePath.path.replace(/\//g,"").replace(".",""),d=e._urlArguments,f={layerName:e.name,rootTile:h,tile:r._fileName,suffix:"attribute",fields:c+";"+l},p=a$Y(f=Object.assign(f,d),!0);(m=a.match(/(\S*)\/datas/)).length>0&&(a=m[0]+"?"+p)}t$$(a$R.CREDENTIAL)&&(a=t$$(a$R.CREDENTIAL._keymap[this._scpUrl])?a$R.addTokenWithKey(this._scpUrl,a):a$R.addToken(a));var _=new r$V({url:a,throttle:!1,throttleByServer:!1,serverKey:r$U.getServerKey(a)});t$$($=u$S(a,this._customRequestHeaders,_))&&($.then((function(e){var t=new Int32Array(e,0,1);t=t[0];for(var i=new Int32Array(e,4,t),n=[],r=0;r<t;r++)n.push(i[r]);var o=Math.floor(n[0]/4.125),a=Math.ceil(o/8),l=new Int8Array(e,4*(t+1)+a,4*o),c=l.subarray(0,4*o),h=new Int8Array(c);l=new Int32Array(h.buffer);var d=4*(t+1)+n[0],f=[];for(r=1;r<t;r++){var p=u._layer._fieldsInfo._array[r],_=p.type,m=Number(p.size);o=Math.floor(n[r]/(m+.125));a=Math.ceil(o/8);var $=new Int8Array(e,d+a,o*m).subarray(0,o*m);h=new Int8Array($);4==_||16==_?$=new Int32Array(h.buffer):6==_?$=new Float32Array(h.buffer):7==_&&($=new Float64Array(h.buffer)),d+=n[r],f.push($)}for(r=0;r<l.length;r++){for(var g={},y=0;y<f.length;y++)g[s[y]]=f[y][r];Object.assign(u._attributes[l[r]],g)}})),t.push($))}else{if(a=a+"?fields="+l,e._urlType===di$7.KEY_VALUE){var m;h=r._relativePath.path.replace(/\//g,"").replace(".",""),d=e._urlArguments,f={layerName:e.name,rootTile:h,tile:r._fileName,suffix:e._attributeExtentName,fields:l},p=a$Y(f=Object.assign(f,d),!0);(m=a.match(/(\S*)\/datas/)).length>0&&(a=m[0]+"?"+p)}t$$(a$R.CREDENTIAL)&&(a=t$$(a$R.CREDENTIAL._keymap[this._scpUrl])?a$R.addTokenWithKey(this._scpUrl,a):a$R.addToken(a));var $=u$$(a,this._customRequestHeaders).then((function(e){for(var t=e.Records,i=0;i<t.length;i++){var n=t[i].ID||t[i].id||t[i].SmID||t[i].SMID;u._attributes.hasOwnProperty(n)||Object.assign(u._attributes[n],t[i])}}));t.push($)}}return t};var _0x462f90=void 0;function _0x1ecf01(e,t){if(t$$(e.xExtent)){var i=a$11.fromElements(e.center.x,e.center.y,e.center.z),n=a$10.fromElements(e.xExtent.x,e.xExtent.y,e.xExtent.z,0),r=a$10.fromElements(e.yExtent.x,e.yExtent.y,e.yExtent.z,0),o=a$10.fromElements(e.zExtent.x,e.zExtent.y,e.zExtent.z,0);if(c$1a.multiplyByPoint(t,i,i),c$1a.multiplyByVector(t,n,n),c$1a.multiplyByVector(t,r,r),c$1a.multiplyByVector(t,o,o),t$$(_0x462f90))_0x462f90.center=i,_0x462f90.halfAxes[0]=n.x,_0x462f90.halfAxes[1]=n.y,_0x462f90.halfAxes[2]=n.z,_0x462f90.halfAxes[3]=r.x,_0x462f90.halfAxes[4]=r.y,_0x462f90.halfAxes[5]=r.z,_0x462f90.halfAxes[6]=o.x,_0x462f90.halfAxes[7]=o.y,_0x462f90.halfAxes[8]=o.z,_0x462f90.areaDirty=1;else{var a=new r$W(n.x,r.x,o.x,n.y,r.y,o.y,n.z,r.z,o.z);_0x462f90=new b$1o(i,a)}_0x462f90._updateBBox();var s=a$11.distance(_0x462f90.center,_0x462f90.bbox[0]);return m=new c$19(_0x462f90.center,s)}var l=e.min.x,u=e.min.y,c=e.min.z,h=e.max.x,d=e.max.y,f=e.max.z,p=new a$11(l,u,c),_=new a$11(h,d,f),m=new c$19;return c$19.fromCornerPoints(p,_,m),c$19.transform(m,t,m),m}function _0x1cfc7d(e,t){var i,n=[];n.push(new a$11(e.min.x,e.min.y,e.min.z)),n.push(new a$11(e.min.x,e.min.y,e.max.z)),n.push(new a$11(e.min.x,e.max.y,e.min.z)),n.push(new a$11(e.min.x,e.max.y,e.max.z)),n.push(new a$11(e.max.x,e.min.y,e.min.z)),n.push(new a$11(e.max.x,e.min.y,e.max.z)),n.push(new a$11(e.max.x,e.max.y,e.min.z)),n.push(new a$11(e.max.x,e.max.y,e.max.z));for(var r=0;r<8;r++)n[r]=c$1a.multiplyByPoint(t,n[r],n[r]);return i=b$1o.fromPoints(n,i)}function _0x5c07ad(e,t,i,n,r,o){if(t$$(n)){var a=new _0x56ff2;if(i._entity=a,a._parent=t,a._relativePath=o,a._boundingSphere=i._boundingSphere,a._orientedBoundingBox=i._orientedBoundingBox,a._fileName=n.modelPath,a._fileName=a._fileName.replace(/.s3mb*|.s3m*../g,""),a._parentPagelod=i,a._depth=i._depth+1,a._index=t._childrenPageLod.length-1,a._rootName=t._rootName,a._subdomainIndex=t._subdomainIndex+a._index+1,a._indexFilePath=n.indexFilePath,t$$(n.state)&&"PartLeaf"===n.state&&(a._hasLeafChild=!0),t$$(n.indexFilePath))return void(a._hasConfig=!0);var s=n.children;if(!t$$(s))return a._isLeafTile=!0,void(a._boundingSphere=void 0);for(var l=0,u=s.length;l<u;l++){var c=s[l];if(t$$(c.tileInfo)){if(""===c.tileInfo.modelPath){a._hasLeafChild=!0;continue}var h=new _0x10562c;if(h._fileType=e._fileType,h._rangeList=c.tileInfo.rangeValue,h._rangeDataList=c.tileInfo.modelPath,h._rangeDataList=h._rangeDataList.replace(/.s3mb*|.s3m*../g,""),0===h._rangeDataList.indexOf("./")&&(h._rangeDataList=h._rangeDataList.substring(2)),"pixelSizeOnScreen"===c.tileInfo.rangeMode?h._rangeMode=_0x2b4bc7.PIXEL_SIZE_ON_SCREEN:"geometricError"===c.tileInfo.rangeMode&&(h._rangeMode=_0x2b4bc7.GEOMETRY_ERROR),c.tileInfo.boundingBox.xExtent){var d=c.tileInfo.boundingBox,f=a$11.fromElements(d.center.x,d.center.y,d.center.z),p=a$10.fromElements(d.xExtent.x,d.xExtent.y,d.xExtent.z,0),_=a$10.fromElements(d.yExtent.x,d.yExtent.y,d.yExtent.z,0),m=a$10.fromElements(d.zExtent.x,d.zExtent.y,d.zExtent.z,0),$=new r$W(p.x,_.x,m.x,p.y,_.y,m.y,p.z,_.z,m.z);h._orientedBoundingBox=new b$1o(f,$),h._orientedBoundingBox._updateBBox(),h.min=h._orientedBoundingBox.bbox[0].clone(),h.max=h._orientedBoundingBox.bbox[0].clone();for(var g,y=1;y<8;y++)g=h._orientedBoundingBox.bbox[y],h.min.x>g.x&&(h.min.x=g.x),h.min.y>g.y&&(h.min.y=g.y),h.min.z>g.z&&(h.min.z=g.z),h.max.x<g.x&&(h.max.x=g.x),h.max.y<g.y&&(h.max.y=g.y),h.max.z<g.z&&(h.max.z=g.z);var v=a$11.distance(h._orientedBoundingBox.center,h._orientedBoundingBox.bbox[0]);c$1a.multiplyByPoint(r,f,f),c$1a.multiplyByVector(r,p,p),c$1a.multiplyByVector(r,_,_),c$1a.multiplyByVector(r,m,m),h._orientedBoundingBox.center=f,h._orientedBoundingBox.halfAxes[0]=p.x,h._orientedBoundingBox.halfAxes[1]=p.y,h._orientedBoundingBox.halfAxes[2]=p.z,h._orientedBoundingBox.halfAxes[3]=_.x,h._orientedBoundingBox.halfAxes[4]=_.y,h._orientedBoundingBox.halfAxes[5]=_.z,h._orientedBoundingBox.halfAxes[6]=m.x,h._orientedBoundingBox.halfAxes[7]=m.y,h._orientedBoundingBox.halfAxes[8]=m.z,h._orientedBoundingBox.areaDirty=1,h._boundingSphere=new c$19(f,v)}else h._boundingSphere=_0x1ecf01(c.tileInfo.boundingBox,r),h._orientedBoundingBox=_0x1cfc7d(c.tileInfo.boundingBox,r),h.max=a$11.fromElements(c.tileInfo.boundingBox.max.x,c.tileInfo.boundingBox.max.y,c.tileInfo.boundingBox.max.z),h.min=a$11.fromElements(c.tileInfo.boundingBox.min.x,c.tileInfo.boundingBox.min.y,c.tileInfo.boundingBox.min.z);h._parent=a._parentPagelod,h._depth=a._depth,(!t$$(n.state)||"AllLeaf"!=n.state)&&(a._childrenPageLod.push(h),a._pagelodMap[h._rangeDataList]=h,_0x5c07ad(e,a,h,c.tileInfo,r,o))}}}}function _0xac518f(e,t,i){for(var n=[],r=0;r<e._childrenPageLod.length;r++)e._childrenPageLod[r]._entity._skipLevel=i,n.push(e._childrenPageLod[r]._entity);for(;n.length<t&&n.length>0;){for(var o=[],a=0;a<n.length;a++)for(var s=0;s<n[a]._childrenPageLod.length;s++)n[a]._childrenPageLod[s]._entity._skipLevel=i,o.push(n[a]._childrenPageLod[s]._entity);n=o}if(n.length>0)for(s=0;s<n.length;s++)n[s]._needLoad=!0,_0xac518f(n[s],t,i+1)}function _0x1c710e(e){1==e._childrenPageLod.length?_0x1c710e(e._childrenPageLod[0]._entity):e._needLoad=!0}function _0x4e99f5(e,t,i){var n=i._matModel;t._configReady=!0,t._configLoadState=W$q.LOADED;var r=t._relativePath;if(t$$(e.lodTreeExport.tileInfo.children))for(var o=0,a=e.lodTreeExport.tileInfo.children.length;o<a;o++){t._boundingSphere=_0x1ecf01(e.lodTreeExport.tileInfo.boundingBox,n);var s=e.lodTreeExport.tileInfo.children[o];if(t$$(s.tileInfo)&&(""===s.tileInfo.modelPath&&(t._hasLeafChild=!0),""!==s.tileInfo.modelPath)){var l=new _0x10562c;if(l._fileType=i._fileType,l._rangeList=s.tileInfo.rangeValue,l._rangeDataList=s.tileInfo.modelPath,l._rangeDataList=l._rangeDataList.replace(/.s3mb*/g,""),0===l._rangeDataList.indexOf("./")&&(l._rangeDataList=l._rangeDataList.substring(2)),"pixelSizeOnScreen"===s.tileInfo.rangeMode?l._rangeMode=_0x2b4bc7.PIXEL_SIZE_ON_SCREEN:"geometricError"===s.tileInfo.rangeMode&&(l._rangeMode=_0x2b4bc7.GEOMETRY_ERROR),s.tileInfo.boundingBox.xExtent){var u=s.tileInfo.boundingBox,c=a$11.fromElements(u.center.x,u.center.y,u.center.z),h=a$10.fromElements(u.xExtent.x,u.xExtent.y,u.xExtent.z,0),d=a$10.fromElements(u.yExtent.x,u.yExtent.y,u.yExtent.z,0),f=a$10.fromElements(u.zExtent.x,u.zExtent.y,u.zExtent.z,0),p=new r$W(h.x,d.x,f.x,h.y,d.y,f.y,h.z,d.z,f.z);l._orientedBoundingBox=new b$1o(c,p),l._orientedBoundingBox._updateBBox(),l.min=l._orientedBoundingBox.bbox[0].clone(),l.max=l._orientedBoundingBox.bbox[0].clone();for(var _,m=1;m<8;m++)_=l._orientedBoundingBox.bbox[m],l.min.x>_.x&&(l.min.x=_.x),l.min.y>_.y&&(l.min.y=_.y),l.min.z>_.z&&(l.min.z=_.z),l.max.x<_.x&&(l.max.x=_.x),l.max.y<_.y&&(l.max.y=_.y),l.max.z<_.z&&(l.max.z=_.z);var $=a$11.distance(l._orientedBoundingBox.center,l._orientedBoundingBox.bbox[0]);c$1a.multiplyByPoint(n,c,c),c$1a.multiplyByVector(n,h,h),c$1a.multiplyByVector(n,d,d),c$1a.multiplyByVector(n,f,f),l._orientedBoundingBox.center=c,l._orientedBoundingBox.halfAxes[0]=h.x,l._orientedBoundingBox.halfAxes[1]=h.y,l._orientedBoundingBox.halfAxes[2]=h.z,l._orientedBoundingBox.halfAxes[3]=d.x,l._orientedBoundingBox.halfAxes[4]=d.y,l._orientedBoundingBox.halfAxes[5]=d.z,l._orientedBoundingBox.halfAxes[6]=f.x,l._orientedBoundingBox.halfAxes[7]=f.y,l._orientedBoundingBox.halfAxes[8]=f.z,l._orientedBoundingBox.areaDirty=1,l._boundingSphere=new c$19(c,$)}else l._boundingSphere=_0x1ecf01(s.tileInfo.boundingBox,n),l._orientedBoundingBox=_0x1cfc7d(s.tileInfo.boundingBox,n),l.max=a$11.fromElements(s.tileInfo.boundingBox.max.x,s.tileInfo.boundingBox.max.y,s.tileInfo.boundingBox.max.z),l.min=a$11.fromElements(s.tileInfo.boundingBox.min.x,s.tileInfo.boundingBox.min.y,s.tileInfo.boundingBox.min.z);l._parent=void 0,l._depth=t._depth,t._childrenPageLod.push(l),t._pagelodMap[l._rangeDataList]=l,t$$(t._parent)?t._rootName=t._parent._rootName:t._rootName=t._fileName,l._rootName=t._rootName,_0x5c07ad(i,t,l,s.tileInfo,n,r)}}_0xac518f(t,i._maxSkipNum,t._skipLevel),t._isRootTile&&_0x1c710e(t)}function _0x1adb94(e,t){var i=e$1Y(e._indexFilePath,e._fileName);i=i.replace(".json","");var n,r,o=e._relativePath.resolve(t._baseUri)+i+".json";(o=o.replace(/\+/g,"%2B"),t$$(t._wstTaskProcessor))?(r=t._isS3MBlock?o.substring(o.indexOf("data/path/")+9):o.substring(o.indexOf("/data/")+5),r=decodeURIComponent(r),n=t._wstTaskProcessor.scheduleTask({data:r,dataType:"json"})):(t$$(a$R.CREDENTIAL)&&(o=t$$(a$R.CREDENTIAL._keymap[this._scpUrl])?a$R.addTokenWithKey(this._scpUrl,o):a$R.addToken(o)),n=u$$(o,void 0,new r$V({url:o,throttle:!1,throttleByServer:!0,serverKey:r$U.getServerKey(o)})));t$$(n)&&(e._configLoadState=W$q.LOADING,n.then((function(i){e._needLoad=!1,_0x4e99f5(i,e,t);var n={blob:i,key:e._relativePath.toString()+e._fileName+".json",tablename:t._layerScheduler.tablename,dbname:t._layerScheduler._indexedDBScheduler.dbname};_0xb658ed.indexTaskProcessor.scheduleTask(n,[])}),(function(t){t$$(t)?e._configLoadState=W$q.FAILED:e._configLoadState=W$q.UNLOAD})))}_0x2063a0.prototype.loadConfig=function(e){if(e._configLoadState===W$q.UNLOAD){var t=this._layer,i=e$1Y(e._indexFilePath,e._fileName);i=i.replace(".json","");var n=e._relativePath.toString()+i+".json";if(t$$(window.Proxy)&&(!0===this._indexedDBSetting.isGeoTilesSave||this._indexedDBSetting.isGeoTilesRootNodeSave&&this._isRootNode(n)))if(t$$(this._indexedDBScheduler)){var r=this._indexedDBScheduler.getElementFromDB(this.tablename,n);t$$(r)?(e._configLoadState=W$q.LOADING,r.then((function(i){t$$(i)?_0x4e99f5(i,e,t):(e._configLoadState=W$q.UNLOAD,_0x1adb94(e,t))}),(function(i){e._configLoadState=W$q.UNLOAD,_0x1adb94(e,t)}))):(e._configLoadState=W$q.UNLOAD,_0x1adb94(e,t))}else _0x1adb94(e,t);else _0x1adb94(e,t)}},_0x2063a0.prototype.loadEntity=function(e){var t=e._s3mLoadState,i=this._layer;this._cacheKey;var n,r,o,a,s=this;if(_0x1bdeff(e,i._frameState)){if(W$q.UNLOAD===t)if(i._isS3MBlock&&i._blockCache.contains(i._id,e._blockKey))e.s3mBuffer=i._blockCache.get(i._id,e._blockKey),t=e._s3mLoadState=W$q.LOADED;else{if(!t$$(e.request)){var l=".s3m",u="s3m";i._isS3MBlock?l=".s3mblock":i._isS3MB?(l=i._isS3MZ?".s3mbz":".s3mb",u=i._isS3MZ?"s3mbz":"s3mb"):i._isOSGB&&(l=".osgb",l=".osgb"),e._fileName=e._fileName.replace(/\0/,"");var c=e._relativePath.resolve(i._baseUri)+e._fileName+l;if(i.subdomains&&(c=c.replace(/(.*realspace)/,i._subdomainsUrlScheme)),c=c.replace(/\+/g,"%2B"),i._urlType===di$7.KEY_VALUE){n=e._relativePath.path.replace(/^\.*/,"").replace(/^\//,"").replace(/\/$/,""),r=i._urlArguments;var h={layerName:i.name,rootTile:n,tile:e._fileName,suffix:u};o=a$Y(h=Object.assign(h,r),!0),(a=c.match(/(\S*)\/datas/)).length>0&&(c=a[0]+"?"+o)}e.request=new r$V({url:c,throttle:!0,throttleByServer:!0,serverKey:r$U.getServerKey(c),priorityFunction:this.createPriorityFunction(e,this)})}var d=e._relativePath.toString()+e._fileName;if(t$$(window.Proxy)&&(!0===this._indexedDBSetting.isGeoTilesSave||this._indexedDBSetting.isGeoTilesRootNodeSave&&this._isRootNode(d)))if(t$$(this._indexedDBScheduler)&&this._indexedDBRequestNum<this._indexedDBRequestLimit){this._indexedDBRequestNum++;s=this;var f=this._indexedDBScheduler.getElementFromDB(this.tablename,d);t$$(f)?(e._s3mLoadState=W$q.LOADING,f.then((function(t){s._indexedDBRequestNum--,t$$(t)?(e._s3mLoadState=W$q.PARSING,e.s3mBuffer=null,e.volBuffer=null,i._isS3MB?i._isS3MBlock?_0x3065fa.parseChildGroup(t,s._layer,e):_0x3065fa.parseResult(t,s._layer,e):_0x18a717.parseResult(t,s._layer,e,e.volBuffer)):(e._s3mLoadState=W$q.UNLOAD,_0x4f9c11(e,s))}),(function(t){s._indexedDBRequestNum--,e._s3mLoadState=W$q.UNLOAD,_0x4f9c11(e,s)}))):(this._indexedDBRequestNum--,e._s3mLoadState=W$q.UNLOAD,_0x4f9c11(e,s))}else _0x4f9c11(e,s);else this._packingRequest?this._packRequestEntities.push(e):_0x4f9c11(e,s)}if(W$q.PARSING===t&&"InstanceModel"===i._dataType&&(e.skeletonState===_0x35bc68.STATE.SkeletonParsing?_0x35bc68.parse(i,e):e.skeletonState===_0x35bc68.STATE.SkeletonReady&&_0x3065fa.parseResultInstance(i,e)),W$q.PARSING===t&&t$$(e.parsingResult)&&(i._isS3MB?i._isS3MBlock?_0x3065fa.parseChildGroup(e.parsingResult,i,e):_0x3065fa.parseResult(e.parsingResult,i,e):_0x18a717.parseResult(e.parsingResult,i,e,e.volBuffer)),W$q.LOADED===t&&(!1!==i._bVolume&&i.loadVolumeData?e._s3mLoadState===W$q.LOST?e._s3mLoadState=W$q.UNLOAD:e._s3mLoadState=W$q.LOADVOL:this._packingRequest?this._parsingEntities.push(e):i._isS3MB||i._isOSGB?_0x3065fa.binaryDataParser(i,e,e.s3mBuffer,e.volBuffer):_0x18a717.binaryDataParser(i,e,e.s3mBuffer,e.volBuffer),i._S3MTileLoadedEvent.raiseEvent(e._boundingSphere)),W$q.LOADVOL===t&&"vol"===i._strVolumeExt){var p,_,m;if(""===i._volName?(p=e._relativePath.resolve(i._baseUri)+e._fileName+"."+i._strVolumeExt,_=e._fileName):(p=e._relativePath.resolve(i._baseUri)+e._fileName+"_"+i._volName+"."+i._strVolumeExt,_=e._fileName+"_"+i._volName),i._urlType===di$7.KEY_VALUE){n=e._relativePath.path.replace(/^\.*/,"").replace(/^\//,"").replace(/\/$/,""),r=i._urlArguments;h={layerName:i.name,rootTile:n,tile:_,suffix:i._strVolumeExt};o=a$Y(h=Object.assign(h,r),!0),(a=p.match(/(\S*)\/datas/)).length>0&&(p=a[0]+"?"+o)}t$$(a$R.CREDENTIAL)&&(p=t$$(a$R.CREDENTIAL._keymap[this._scpUrl])?a$R.addTokenWithKey(this._scpUrl,p):a$R.addToken(p)),t$$(e.request)||(e.request=new r$V({url:p,throttle:!0,throttleByServer:!0,serverKey:r$U.getServerKey(p),priorityFunction:this.createPriorityFunction(e,this)})),t$$(m="png"===i._strVolumeExt?n$S(e.request.url,this._customRequestHeaders,e.request):u$S(e.request.url,this._customRequestHeaders,e.request))&&(e._s3mLoadState=W$q.LOADING,this._statistics.numberOfPendingRequests++,e.request=null,m.then((function(t){e._s3mLoadState=W$q.VOLLOADED,"png"===i._strVolumeExt?e.volImage=t:e.volBuffer=t,s._statistics.numberOfPendingRequests--,s._statistics.numberOfProcessingAttempted++}),(function(t){t$$(t)?(s._statistics.numberOfPendingRequests--,e._s3mLoadState=W$q.VOLFAILED):(s._statistics.numberOfAttemptedRequests++,s._statistics.numberOfPendingRequests--,e._s3mLoadState=W$q.LOADVOL)})))}else W$q.LOADVOL===t&&("png"===i._strVolumeExt||"vol_texture_mapping"===i._strVolumeExt)&&(e._s3mLoadState=W$q.VOLLOADED);(W$q.VOLLOADED===t||W$q.VOLFAILED===t)&&t$$(e.s3mBuffer)&&("png"===i._strVolumeExt||"vol_texture_mapping"===i._strVolumeExt?i._isS3MB?_0x3065fa.binaryDataParser(i,e,e.s3mBuffer,e.volImage):_0x18a717.binaryDataParser(i,e,e.s3mBuffer,e.volImage):i._isS3MB?_0x3065fa.binaryDataParser(i,e,e.s3mBuffer,e.volBuffer):_0x18a717.binaryDataParser(i,e,e.s3mBuffer,e.volBuffer))}},_0x2063a0.prototype.reloadVol=function(e){var t,i,n,r,o=this._layer;if(this._cacheKey,"vol"===o._strVolumeExt){var a,s,l;if(""===o._volName?(a=e._relativePath.resolve(o._baseUri)+e._fileName+"."+o._strVolumeExt,s=e._fileName):(a=e._relativePath.resolve(o._baseUri)+e._fileName+"_"+o._volName+"."+o._strVolumeExt,s=e._fileName+"_"+o._volName),o._urlType===di$7.KEY_VALUE){t=e._relativePath.path.replace(/\//g,"").replace(".",""),i=o._urlArguments;var u={layerName:o.name,rootTile:t,tile:s,suffix:o._strVolumeExt};n=a$Y(u=Object.assign(u,i),!0),(r=a.match(/(\S*)\/datas/)).length>0&&(a=r[0]+"?"+n)}if(t$$(a$R.CREDENTIAL)&&(a=t$$(a$R.CREDENTIAL._keymap[this._scpUrl])?a$R.addTokenWithKey(this._scpUrl,a):a$R.addToken(a)),t$$(e.request)||(e.request=new r$V({url:a,throttle:!0,throttleByServer:!0,serverKey:r$U.getServerKey(a),priorityFunction:this.createPriorityFunction(e,this)})),l="png"===o._strVolumeExt?n$S(e.request.url,this._customRequestHeaders,e.request):u$S(e.request.url,this._customRequestHeaders,e.request),this._statistics.numberOfColorChangeProcessing++,t$$(l)){e.request=null,e._reloadVol=!1,this._statistics.numberOfColorChangePending++;var c=this;l.then((function(t){if(c._statistics.numberOfColorChangePending--,"vol"===o._strVolumeExt&&t$$(t)&&t.byteLength>7&&t$$(e._volObj)){var i,n=new Uint8Array(t,8);i=null!=_0x1c6c68?_0x1fe1c8(n):lt$f.inflate(n).buffer;var r=new Float64Array(i,0,1),a=new Uint32Array(i,48,1);if(0===r[0]||3200===a[0]||3201===a[0]){var s=0;0===r[0]&&(s=8);var l=new Float64Array(i,s,6),u=l[0],h=l[1],d=l[2],f=l[3],p=l[4]<l[5]?l[4]:l[5],_=l[4]>l[5]?l[4]:l[5],m={left:u,top:h,right:d,bottom:f,minHeight:p,maxHeight:_,width:d-u,length:h-f,height:_-p},$=new Uint32Array(i,48+s,7),g=$[0],y=$[1],v=$[2],x=$[3],b={nFormat:g,nSideBlockCount:y,nBlockLength:v,nLength:x,nWidth:$[4],nHeight:$[5],nDepth:$[6],imageArray:new Uint8Array(i,76+s,x*x*4)},S=o._context._id+"_"+o.id+"_"+e._relativePath.resolve(o._baseUri)+"_"+e._fileName,w=J$O.FilterMode.LINEAR;t$$(o._hypsometricSetting)&&o._hypsometricSetting.filterMode===J$O.FilterMode.NEAREST&&(w=J$O.FilterMode.NEAREST),3201===b.nFormat&&t$$(o._hypsometricSetting)&&_0x18a717.convertFloat(b,o._hypsometricSetting,w);var C=De$e.ReloadVolumeTexture(S,o._gl,o._context,b,w);e._volObj.volTexture=C,e._volObj.nFormat=b.nFormat,e._volObj.nSideBlockCount=b.nSideBlockCount,e._volObj.nBlockLength=b.nBlockLength,e._volObj.nLength=b.nLength,e._volObj.nWidth=b.nWidth,e._volObj.nHeight=b.nHeight,e._volObj.nDepth=b.nDepth,e._volObj.id=S,e._volObj.dataFloor=o._fMinValue,e._volObj.dataCeil=o._fMaxValue,e._volObj.volBounds=m}}c._statistics.numberOfColorChangeProcessing--}),(function(t){t$$(t)||(c._statistics.numberOfColorChangeAttempted++,e._reloadVol=!0),c._statistics.numberOfColorChangePending--,c._statistics.numberOfColorChangeProcessing--}))}else this._statistics.numberOfColorChangeProcessing--}},_0x2063a0.prototype.reloadVolMapping=function(e){var t=this._layer;if("vol_texture_mapping"===t._strVolumeExt){var i=t._context;for(var n in e._volTextures){this._statistics.numberOfColorChangeProcessing++;var r=n,o=e._volTextures[r],a=t._id+i._id,s=r.substring(0,r.length-a.length)+"_"+e._fileName;s=""!==t._volName?s+"_"+t._volName:s,s+=".vol";var l=e._relativePath.resolve(t._baseUri)+s;if(0!=t.urlType){var u=t._urlArguments,c=l.indexOf("datas")+5,h=u.layer3DName,d=l.substring(l.indexOf("/path/")+6).split("/"),f=d[0],p=d[1].substring(0,d[1].indexOf(".")),_=d[1].substring(d[1].indexOf(".")+1,d[1].length);for(var n in l=l.substring(0,c)+"?layerName="+h+"&rootTile="+f+"&tile="+p+"&suffix="+_,u)l=l+"&"+n+"="+u[n]}var m=u$S(l,this._customRequestHeaders);if(t$$(m)){this._statistics.numberOfColorChangePending++;var $=this;m.then((function(i){if($._statistics.numberOfColorChangePending--,t$$(i)){var n,r=void 0,a=new Uint8Array(i,8);if(n=null!=_0x1c6c68?_0x1fe1c8(a):lt$f.inflate(a).buffer,1===new Float64Array(n,0,1)[0]){var s=new Uint32Array(n,8,4),l=s[0],u=s[1],c=s[2];r={nFormat:l,nWidth:u,nHeight:c,nPixelSize:s[3],imageArray:new Float32Array(n,24,u*c)}}if(t$$(r)){var h=_0x18a717.convertFloatTexture(r,t._hypsometricSetting,t._hypsometricSetting.filterMode);o.copyFrom({width:r.nWidth,height:r.nHeight,arrayBufferView:h})}$._statistics.numberOfColorChangeProcessing--,i=null,e._reloadVol=!1}}),(function(e){$._statistics.numberOfColorChangePending--,$._statistics.numberOfColorChangeAttempted++,$._statistics.numberOfColorChangeProcessing--}))}else this._statistics.numberOfColorChangeProcessing--}}},_0x2063a0.prototype.dealWithPrepareLoad=function(e){if(this._requestByteLength+=e,this._requestByteLength>this._layer._prepareLoadSize)this._layer._prepareLoadEvent.raiseEvent(100),this._prepareLoaded=!0,this.refreshPrepareLoad();else{var t=Math.floor(100*this._requestByteLength/this._layer._prepareLoadSize);t>this._prepareRatio&&(this._prepareRatio=t,this._layer._prepareLoadEvent.raiseEvent(t))}};var _0x1bd107=/({.*?})/g;function _0x4f9c11(e,t){var i,n=e.request.url;if(t$$(t._layer._wstTaskProcessor)){var r;r=t._layer._isS3MBlock?e.request.url.substring(e.request.url.indexOf("data/path/")+9):e.request.url.substring(e.request.url.indexOf("/data/")+5),r=decodeURIComponent(r),i=t._layer._wstTaskProcessor.scheduleTask({dataType:"arraybuffer",data:r})}else{if(t$$(t._layer._subdomains)){var o=t._layer._subdomains,a=o[e._subdomainIndex%o.length];n=n.replace(_0x1bd107,(function(e,t){return"{s}"===t?a:e}))}t$$(a$R.CREDENTIAL)&&(n=t$$(a$R.CREDENTIAL._keymap[n])?a$R.addTokenWithKey(t._scpUrl,n):a$R.addToken(n)),i=u$S(n,t._customRequestHeaders,e.request)}t$$(i)?(e._s3mLoadState=W$q.LOADING,t._statistics.numberOfPendingRequests++,i.then((function(i){if(t$$(t._layer._wstTaskProcessor)&&(!t$$(i)||!e._isVisible||!oo$1.update(t._layer._context.memorySize)))return e._s3mLoadState=W$q.UNLOAD,void(e.request=null);t._prepareLoaded||t.dealWithPrepareLoad(i.byteLength),e.request=null,t._statistics.numberOfPendingRequests--,e._s3mLoadState===W$q.LOADING&&(t._layer._isS3MBlock&&t._layer._blockCache.set(t._layer._id,e._blockKey,i),0!=t._cacheKey.length?e.s3mBuffer=_0x5e8554(i,t._cacheKey):e.s3mBuffer=i,e._s3mLoadState=W$q.LOADED,t._statistics.numberOfProcessingAttempted++)}),(function(i){e.request=null,t$$(i)?(t._statistics.numberOfPendingRequests--,e._s3mLoadState=W$q.FAILED):(t._statistics.numberOfAttemptedRequests++,t._statistics.numberOfPendingRequests--,e._s3mLoadState=W$q.UNLOAD)}))):e.request=null}function _0x236bfd(e,t,i){var n=t._layer;if(n.hasAttributeIndex&&i){if(e.leafAttrLoadState===W$q.LOADED)return}else if(t.attrsave||e.attrLoadState===W$q.LOADED)return;var r=t;t$$(n._queryFieldNames)&&"attribute"===n._attributeExtentName&&(r._indexedDBSetting.isAttributesSave?r._indexedDBScheduler.checkObjectStoreExit(e._fileName)?r._indexedDBScheduler.getElementFromDB(e._fileName,"saved").then((function(i){1==i?r._indexedDBScheduler.db.transaction(e._fileName).objectStore(e._fileName).get("obj").onsuccess=function(i){var n=i.target.result.value,r=new FileReader;r.onload=function(){var i=JSON.parse(r.result);t._attributes=Object.assign(t._attributes,i),e.attrLoadState=W$q.LOADED},r.readAsText(n)}:_0x285256(e,t)})).otherwise((function(){_0x285256(e,t)})):_0x285256(e,t):_0x285256(e,t,i))}function _0x285256(e,t,i){var n=t._layer;if((!t.attrsave||n.hasAttributeIndex)&&t$$(n._queryFieldNames)){var r,o,a="attribute"===n._attributeExtentName?".attribute":t._layer._isS3MB?".s3md":".scvd";r=""===e._relativePath.toString()?t._layer._baseUri.toString()+e._rootName:e._relativePath.resolve(t._layer._baseUri).toString()+a$J(e._relativePath.toString().replace(/\/$/,"")),n.hasAttributeIndex&&i&&(r+="_1"),r+=a;var s=(o=e.attrLoadState===W$q.UNLOAD?n._queryFieldNames:e._attrAppend.length>0?e._attrAppend:n._queryFieldNames).join(";"),l=t;if("attribute"===n._attributeExtentName){if(n._fieldsInfo._hash.hasOwnProperty("smid")?r=r+"?fields=smid;"+s:r=r+"?fields=SmID;"+s,n._urlType===di$7.KEY_VALUE){var u=e._relativePath.path.replace(/^\.*/,"").replace(/^\//,"").replace(/\/$/,""),c=n._urlArguments,h={layerName:n.name,rootTile:u,tile:e._fileName,suffix:"attribute",fields:s},d=a$Y(h=Object.assign(h,c),!0),f=r.match(/(\S*)\/datas/);f.length>0&&(r=f[0]+"?"+d)}t$$(a$R.CREDENTIAL)&&(r=t$$(a$R.CREDENTIAL._keymap[t._scpUrl])?a$R.addTokenWithKey(t._scpUrl,r):a$R.addToken(r));var p=new r$V({url:r,throttle:!0,throttleByServer:!0,serverKey:r$U.getServerKey(r),priorityFunction:t.createPriorityFunction(e,t)}),_=u$S(r,t._customRequestHeaders,p);t$$(_)?(t.attrsave=!0,n.hasAttributeIndex&&i?e.leafAttrLoadState=W$q.LOADING:e.attrLoadState=W$q.LOADING,_.then((function(r){n.hasAttributeIndex&&i?e.leafAttrLoadState=W$q.LOADED:e.attrLoadState=W$q.LOADED,e._attrAppend=[];var a=new Int32Array(r,0,1);a=a[0];for(var s=new Int32Array(r,4,a),u=[],c=0;c<a;c++)u.push(s[c]);var h=Math.floor(u[0]/4.125),d=w=Math.ceil(h/8),f=new Int8Array(r,4*(a+1)+w,4*h),p=f.subarray(0,4*h),_=new Int8Array(p);f=new Int32Array(_.buffer);var m=4*(a+1)+u[0],$=[],g=[];for(c=1;c<=o.length;c++){var y=l._layer._fieldsInfo,v=o[c-1],x=y.get(v),b=x.type,S=Number(x.size);h=Math.floor(u[c]/(S+.125));var w=Math.ceil(h/8);(10==b||"ntext"===b||"text"===b)&&(S=1,w=d,h=u[c]-w);var C=new Uint8Array(r,m,w);$.push(C);var T=new Int8Array(r,m+w,h*S).subarray(0,h*S);_=new Int8Array(T);if(4==b||"int32"===b)T=new Int32Array(_.buffer);else if("int16"===b)T=new Int16Array(_.buffer);else if(16==b||"int64"===b)T=new BigInt64Array(_.buffer);else if(6==b||"float"===b)T=new Float32Array(_.buffer);else if(7==b||"double"===b)T=new Float64Array(_.buffer);else if(10==b||"ntext"===b||"text"===b){for(var P=new DataView(T.buffer.slice(m+w,m+w+h*S)),E=0,A=[];E<P.byteLength;){var L=P.getInt32(E,!0);if((E+=4)+L>_.buffer.byteLength||L<0)break;var M=new Uint8Array(_.buffer,E,L);E+=L;var I=c$X(M,void 0,void 0,"gbk");A.push(I)}T=A}m+=u[c],g.push(T)}var O={};for(c=0;c<f.length;c++){for(var D={},R=0;R<g.length;R++){0!=($[R][Math.floor(c/8)]>>7-c%8&1)?D[o[R]]=g[R][c]:D[o[R]]=null}t$$(l._attributes[f[c]])&&(D=s$1n(D,l._attributes[f[c]])),l._attributes[f[c]]=D,O[f[c]]=D}if(l._indexedDBSetting.isAttributesSave){var N=new Blob([JSON.stringify(O)],{type:"application/json"});if(l._indexedDBScheduler.checkObjectStoreExit(e._fileName))l._indexedDBScheduler.putElementInDB(e._fileName,"obj",N).then((function(){l.attrsave=!1,l._indexedDBScheduler.putElementInDB(e._fileName,"saved",!0),f=null})).otherwise((function(){l._indexedDBScheduler.clear(e._fileName),l.attrsave=!1,f=null}));else l._indexedDBScheduler.createObjectStore(e._fileName).then((function(){l._indexedDBScheduler.putElementInDB(e._fileName,"obj",N).then((function(){l.attrsave=!1,l._indexedDBScheduler.putElementInDB(e._fileName,"saved",!0),f=null})).otherwise((function(){l.attrsave=!1,f=null}))})).otherwise((function(e){l.attrsave=!1,f=null}))}else t.attrsave=!1;if(t$$(n.themeStyle))for(var F,B=[e];F=B.pop();)for(var z=0;z<F._childrenPageLod.length;z++)for(var G=F._childrenPageLod[z],k=0;k<G._renderEntityList.length;k++){G._renderEntityList[k].updateTheme(n),t$$(G._entity)&&B.push(G._entity)}t$$(e.s3mBuffer)&&(e._s3mLoadState=W$q.LOADED)})).otherwise((function(r){t.attrsave=!1,t$$(r)?n.hasAttributeIndex&&i?e.leafAttrLoadState=W$q.FAILED:e.attrLoadState=W$q.FAILED:n.hasAttributeIndex&&i?e.leafAttrLoadState=W$q.UNLOAD:e.attrLoadState=W$q.UNLOAD}))):n.hasAttributeIndex&&i?e.leafAttrLoadState=W$q.UNLOAD:e.attrLoadState=W$q.UNLOAD}}}function _0x1b1b2b(e,t){if(t$$(t._cartographic))if(e instanceof Array){for(var i=[],n=0;n<e.length;n++){var r=e[n];if(t$$(r)&&(r instanceof u$p||r instanceof i$r)){var o=r.getImagery(t._cartographic);i=i.concat(o)}}i.length>0&&(t.setImagerys(i,t._cartographic),t._imageRasterFinish=!1,t._imageryLevels=[])}else{if(t$$(e)&&(e instanceof u$p||e instanceof i$r))(i=e.getImagery(t._cartographic)).length>0&&(t.setImagerys(i,t._cartographic),t._imageRasterFinish=!1,t._imageryLevels=[])}}function _0x433718(e,t){var i=e._statistics,n=e._statisticsLastRender,r=i.numberOfPendingRequests,o=i.numberOfTilesProcessing,a=n.numberOfPendingRequests,s=n.numberOfTilesProcessing,l=r!==a||o!==s,u=0===i.numberOfPendingRequests&&0===i.numberOfTilesProcessing&&0===i.numberOfAttemptedRequests&&0===i.numberOfProcessingAttempted,c=i.numberOfColorChangePending,h=n.numberOfColorChangePending,d=i.numberOfColorChangeProcessing,f=n.numberOfColorChangeProcessing,p=(c!==h||d!==f)&&0===i.numberOfColorChangeAttempted&&0===c&&0===d;Date.now()-i.lastLoadedTrigger.time>2e3&&i.lastLoadedTrigger.done&&t.afterRender.push((function(){e._layer._allTilesLoaded.raiseEvent(),i.lastLoadedTrigger.done=!1})),l&&u&&(i.lastLoadedTrigger.done=!0,i.lastLoadedTrigger.time=Date.now()),Date.now()-i.lastColorChangeTrigger.time>2e3&&i.lastColorChangeTrigger.done&&t.afterRender.push((function(){e._layer._colorTableChanged.raiseEvent(),i.lastColorChangeTrigger.done=!1})),p&&u&&(i.lastColorChangeTrigger.done=!0,i.lastColorChangeTrigger.time=Date.now())}_0x2063a0.prototype._clearIndexedDBCache=function(){t$$(this._indexedDBScheduler)&&this._indexedDBScheduler.clear(this.tablename)},_0x2063a0.prototype._refreshVolume=function(){if(this._layer._bVolume){var e=[],t={};if("vol"===this._layer._strVolumeExt){for(var i=0,n=this._rootEntities.length;i<n;i++){t$$(r=this._rootEntities[i])&&t$$(r._fileName)&&(t[r._relativePath.resolve(this._layer._baseUri)+r._fileName]=r,e.push(r))}for(;s=e.pop();)for(i=0,n=s._childrenPageLod.length;i<n;i++){if(t$$((o=s._childrenPageLod[i])._entity)&&t$$(o._entity._fileName))t$$(t[u=o._entity._relativePath.resolve(this._layer._baseUri)+o._entity._fileName])||(t[u]=o._entity),e.push(o._entity)}}else if("vol_texture_mapping"===this._layer._strVolumeExt){for(i=0,n=this._rootEntities.length;i<n;i++){var r;t$$((r=this._rootEntities[i])._volTextures)&&(t[r.name]=r,e.push(r))}for(;s=e.pop();)for(i=0,n=s._childrenPageLod.length;i<n;i++){var o;t$$((o=s._childrenPageLod[i])._entity)&&t$$(o._entity._volTextures)&&(t[r.name]=o._entity,e.push(o._entity))}}if(this._layer._refreshVolume)for(var a in this._layer._refreshVolume=!1,t)t[a]._reloadVol=!0;if("vol"===this._layer._strVolumeExt)for(var a in t){var s;if(t$$(s=t[a])&&s._isParsed&&t$$(s._volObj)&&s._reloadVol){var l=this._layer,u=l._context._id+"_"+l.id+"_"+s._relativePath.resolve(l._baseUri)+"_"+s._fileName;s._volObj.id==u&&this.reloadVol(s)}}else if("vol_texture_mapping"===this._layer._strVolumeExt)for(var a in t)t[a]._reloadVol&&this.reloadVolMapping(t[a]);e.length=0,t=[]}},_0x2063a0.prototype._refreshImage=function(){if(t$$(this._layer._imageryLayer)){for(var e=[],t={},i=0;i<this._rootEntities.length;i++){var n=this._rootEntities[i];if(t$$(n)&&t$$(n._fileName))for(var r=0;r<n._childrenPageLod.length;r++)for(var o=n._childrenPageLod[r],a=0;a<o._renderEntityList.length;a++){_0x1b1b2b(this._layer._imageryLayer,o._renderEntityList[a]);for(var s=o._renderEntityList[a]._imagerys.length,l=0;l<s;l++){for(var u=o._renderEntityList[a]._imagerys[l];t$$(u.parent)&&u.level>u.imageryLayer._imageryProvider.minimumLevel&&!(u=u.parent).rectangle.contains(this._layer.layerBounds););t[JSON.stringify([u.x,u.y,u.level,u.imageryLayer._layerIndex])]=u}t$$(o._entity)&&t$$(o._entity._fileName)&&e.push(o._entity)}}for(var c in t)t[c].processStateMachine(this._layer._frameState,!1);for(var h;h=e.pop();)for(i=0,r=h._childrenPageLod.length;i<r;i++){for(o=h._childrenPageLod[i],a=0;a<o._renderEntityList.length;a++)_0x1b1b2b(this._layer._imageryLayer,o._renderEntityList[a]);t$$(o._entity)&&t$$(o._entity._fileName)&&e.push(o._entity)}e.length=0}},_0x2063a0.prototype._hideImage=function(e){if(t$$(this._layer._imageryLayer)){for(var t=[],i=0,n=this._rootEntities.length;i<n;i++){var r=this._rootEntities[i];t$$(r)&&t$$(r._fileName)&&t.push(r)}for(var o;o=t.pop();)for(i=0,n=o._childrenPageLod.length;i<n;i++){for(var a=o._childrenPageLod[i],s=0;s<a._renderEntityList.length;s++)a._renderEntityList[s]._showImagerysImmediate=!1;t$$(a._entity)&&t$$(a._entity._fileName)&&t.push(a._entity)}t.length=0}},_0x2063a0.prototype.update=function(e,t,i){this._updateSceneMode(t.camera);var n=t.passes.pick;this._statistics.numberOfAttemptedRequests=0,this._statistics.numberOfColorChangeAttempted=0,!n&&!t._fboState.enabled&&(this.LoadingPriority===_0x271348.UsePagedLodInfo?this._scheduleSkip(t):this._schedule(t)),this._refreshVolume(),this._updatePolygons(),this._updateRenderQueue(e,t,i),t.passes.render&&_0x433718(this,t),this._statisticsLastRender=s$1n({},this._statistics),this.traverseRenderEntityRecursionForObjsTranslate()},_0x2063a0.prototype._updateRenderQueue=function(e,t,i){if(this.LoadingPriority,_0x271348.UsePagedLodInfo,i.length,this._layer._fileType===c$q.ClampGroundRealtimeRasterCache){var n=!1;this._rasterFrequency++,40==this._rasterFrequency&&(n=!0,this._rasterFrequency=0),t.rasterPerFrame=this._layer.rasterPerFrame;for(var r=0,o=this._renderQueue.length;r<o;r++){(a=this._renderQueue[r]).initialize(),a.createResources(t,this._layer),(a._rasterized||n)&&a.pushCommands(t,i,this._layer)}}else for(r=0,o=this._renderQueue.length;r<o;r++){var a;(a=this._renderQueue[r]).isDestroyed()||a.update(e,t,i,this._layer)}},_0x2063a0.prototype._updatePolygons=function(){if(t$$(this._extrudedId)&&t$$(this._polygons)){for(var e=0,t=this._renderQueue.length;e<t;e++){var i=this._renderQueue[e],n=i._selectionInforMap._hash;if(t$$(i._polygonId)){var r={};r[i._polygonId]=0,i.updateObjsOperation(r)}t$$(n[this._extrudedId])?(i._polygons=this._polygons,i._polygonId=this._extrudedId):(i._polygons=void 0,i._polygonId=void 0,i._polygonCommands=[])}this._polygons=void 0}},_0x2063a0.prototype.saveLocalCache=function(e){if((!0===this._layer._indexedDBSetting.isGeoTilesSave||!0===this._layer._indexedDBSetting.isGeoTilesRootNodeSave||!0===this._layer._indexedDBSetting.isAttributesSave)&&t$$(this._indexedDBScheduler)){var t={tablename:this.tablename,dbname:this._indexedDBScheduler.dbname};if(e.push(t),this._layer._isS3MBlock){t={tablename:this.tablename+"Texture",dbname:this._indexedDBScheduler.dbname};e.push(t)}}};var _0x51476f=function(e,t){return e._disFromCamera-t._disFromCamera};function _0x458ac6(e){e._readyAncestor=void 0;var t=e._parentPagelod;if(t$$(t)){e._readyAncestor=t._ready?t:t._readyAncestor;for(var i=e._childrenPageLod,n=i.length,r=0;r<n;r++){i[r]._readyAncestor=e._readyAncestor}var o=e._leafChildren;for(n=o.length,r=0;r<n;r++){o[r]._readyAncestor=e._readyAncestor}}}function _0xd92299(e){return!e._isLeafTile&&e._needRefine}var _0x4a8c7b=new a$11,_0x227254=new a$11;function _0x36881b(e,t,i){if(t$$(i._boundingSphere)){var n=i._boundingSphere,r=e.cullingVolume.computeVisibility(n)!==cr$4.OUTSIDE,o=a$11.distance(n.center,e.camera.position)-n.radius;o=Math.max(0,o),i._disFromCamera=o;var a=a$11.subtract(n.center,e.camera.positionWC,_0x4a8c7b);i._centerZDepth=a$11.dot(e.camera.directionWC,a),i._isVisible=r&&o<=t._visibleDistanceMax&&o>=t._visibleDistanceMin;var s=e.camera,l=n.radius,u=a$11.multiplyByScalar(s.directionWC,i._centerZDepth,_0x227254),c=a$11.add(s.positionWC,u,_0x227254),h=a$11.subtract(c,n.center,_0x227254);if(a$11.magnitude(h)>l){var d=a$11.normalize(h,_0x227254),f=a$11.multiplyByScalar(d,l,_0x227254),p=a$11.add(n.center,f,_0x227254),_=a$11.subtract(p,s.positionWC,_0x227254),m=a$11.normalize(_,_0x227254);i._foveatedFactor=1-Math.abs(a$11.dot(s.directionWC,m))}else i._foveatedFactor=0}else i._isVisible=!0}function _0x25856e(e,t,i){if(t$$(i._boundingSphere)){var n=t$$(i._orientedBoundingBox)?i._orientedBoundingBox:i._boundingSphere,r=e.cullingVolume.computeVisibility(n)!==cr$4.OUTSIDE,o=a$11.subtract(i._boundingSphere.center,e.camera.positionWC,_0x4a8c7b);i._centerZDepth=a$11.dot(e.camera.directionWC,o),i._isVisible=r}else i._isVisible=!0}function _0xc83b37(e,t){e._maximumPriority.distance=Math.max(t._disFromCamera,e._maximumPriority.distance),e._minimumPriority.distance=Math.min(t._disFromCamera,e._minimumPriority.distance),e._maximumPriority.depth=Math.max(t._skipLevel,e._maximumPriority.depth),e._minimumPriority.depth=Math.min(t._skipLevel,e._minimumPriority.depth),e._maximumPriority.foveatedFactor=Math.max(t._foveatedFactor,e._maximumPriority.foveatedFactor),e._minimumPriority.foveatedFactor=Math.min(t._foveatedFactor,e._minimumPriority.foveatedFactor),e._maximumPriority.pixel=Math.max(t._avgPix,e._maximumPriority.pixel),e._minimumPriority.pixel=Math.min(t._avgPix,e._minimumPriority.pixel)}function _0x52b76d(e,t,i){var n=e.positionWC,r=t.radius,o=t.center,a=a$11.distance(o,n),s=.5*n$1d.PI_OVER_FOUR;return 2*(.5*i/Math.tan(s)*r/a)}function _0x473708(e,t,i){_0x36881b(e,t,i),i._shouldSelect=!1,i._selected=!1,i._needRequest=!0,i._needRefine=!1;for(var n=i._childrenPageLod,r=n.length,o=0;o<r;o++){(s=n[o])._selected=!1,s._shouldSelect=!1,s._selectionDepth=0,s._stackLength=0,s._finalResolution=!0,s._needRefine=!1,_0x25856e(e,t,s),s._isVisible&&(s.calcPixFromCam(e.camera,t._gl,t._lodRangeScale,t._fileType,t.LoadingPriority),t._layerScheduler._prepareLoaded||(pageLod._isLessLodDis&&(i._prepareLoad=!0),pageLod._isLessLodDis=!1),s._isLessLodDis||(i._needRefine=!0,s._needRefine=!0))}i._isRootTile&&(i._avgPix=_0x52b76d(e.camera,i._boundingSphere,t._context.drawingBufferHeight));var a=i._leafChildren;for(r=a.length,o=0;o<r;o++){var s;(s=a[o])._shouldSelect=!1,_0x25856e(e,t,s),s._selected=!1,s._needRefine=!1}_0xc83b37(t,i)}function _0x4d8d9a(e){return e._isVisible}function _0x130027(e,t,i,n){var r=t._layer;if(n._depth>r._maxSkipLevel&&!n._ready)return!0;var o,a=n._childrenPageLod,s=a.length,l=[],u=!1;for(o=0;o<s;o++){if(_0x25856e(e,r,h=a[o]),h._isVisible){var c=h._entity;t$$(c)?(_0x473708(e,r,c),h._isLessLodDis?u=!0:l.push(c)):u=!0}}for(n._childrenPageLod.sort(_0x33cb46),s=(a=n._leafChildren).length,o=0;o<s;o++){var h;_0x25856e(e,r,h=a[o])}n._leafChildren.sort(_0x33cb46),(n._hasLeafChild||n._leafChildren.length>0)&&(u=!0),s=l.length;var d,f=!1;for(o=0;o<s;o++)_0x4d8d9a(d=l[o])&&(i.push(d),f=!0);return!f||u}function _0x1301ae(e,t,i){var n=i._boundingVolume;i._isVisible=e.cullingVolume.computeVisibility(n)!==cr$4.OUTSIDE}function _0x2a4822(e){if(e._renderEntityList.length>0&&e._ready)return{state:0};var t=[];if(_0x359a9f(e)){for(var i=!1,n=e._entity._childrenPageLod,r=n.length,o=0,a=0,s=0;s<r;++s){if((u=n[s])._isVisible)1===(c=_0x2a4822(u)).state?(t=t.concat(c.clipBounds),o++):2===c.state&&(t=t.concat(c.clipBounds),i=!0);else o++,a++}var l=(n=e._entity._leafChildren).length;for(s=0;s<l;++s){var u,c;if((u=n[s])._isVisible)0===r&&!t$$(u.max)&&(u.max=e.max,u.min=e.min),1===(c=_0x2a4822(u)).state?(t=t.concat(c.clipBounds),o++):2===c.state&&(t=t.concat(c.clipBounds),i=!0);else o++,a++}var h=l+r;return 0===l&&0===r||h===a?((t=[]).push({max:e.max,min:e.min,name:e._rangeDataList}),{state:1,clipBounds:t}):0===t.length?{state:0}:i||o!==h?{state:2,clipBounds:t}:((t=[]).push({max:e.max,min:e.min,name:e._rangeDataList}),{state:1,clipBounds:t})}return t.push({max:e.max,min:e.min,name:e._rangeDataList}),{state:1,clipBounds:t}}function _0x480e45(e,t,i){if(!i._selected){i._selected=!0;for(var n=i._renderEntityList,r=n.length,o=0;o<r;o++){var a=n[o];if(a.ownerPagelod=i,_0x1301ae(e,t,a),a._isVisible)if(a._clipBounds=[],i._finalResolution)t._renderQueue.push(a);else{for(var s=i._entity._childrenPageLod,l=s.length,u=0;u<l;++u){var c=s[u];if(c._isVisible){var h=_0x2a4822(c);0!=h.state&&(a._clipBounds=a._clipBounds.concat(h.clipBounds))}}a._clipBounds.length>0&&t._renderQueue.push(a)}}}}function _0x644663(e,t,i){var n=t._layer,r=[];r.push(i);for(var o=!1;r.length>0;)for(var a=r.pop()._childrenPageLod,s=a.length,l=0;l<s;++l){_0x25856e(e,n,a[l]);var u=a[l]._entity;t$$(u)&&_0x4d8d9a(a[l])&&(a[l]._needRefine=!0,_0x334e63(t,u),u._ready?(o=!0,_0x473708(e,n,u),_0x305354(e,t,u)):r.push(u))}return o}function _0x305354(e,t,i){if(!i._selected){i._selected=!0;for(var n=i._childrenPageLod,r=n.length,o=0;o<r;o++){!(s=n[o])._isVisible||(s._isLessLodDis||!t$$(s._entity)||s._shouldSelect)&&(s._shouldSelect=!0)}var a=i._leafChildren;for(r=a.length,o=0;o<r;o++){var s;(s=a[o])._isVisible&&(s._shouldSelect=!0)}}}function _0x80d958(e,t,i){if(i._ready)_0x305354(e,t,i);else{var n=i._readyAncestor;t$$(n)&&(n._shouldSelect=!0),_0x644663(e,t,i)}}function _0x1bdeff(e,t){var i=e._boundingSphere;if(!t$$(i))return!0;!t$$(i)&&t$$(e._orientedBoundingBox)&&(i=e._boundingSphere=c$19.fromOrientedBoundingBox(e._orientedBoundingBox));var n=Math.max(2*i.radius,1),r=t.camera;return 60*(0!==r.positionWCDeltaMagnitude?r.positionWCDeltaMagnitude:r.positionWCDeltaMagnitudeLastFrame)/n<1}function _0x2c0923(e,t,i){!i._ready&&i._needRequest&&_0x1bdeff(i,e)&&(i._hasConfig&&!i._configReady&&(i._needLoad=!0,t.loadConfig(i)),t$$(i._parent)&&0==i._skipLevel&&(i._parent._hasConfig?i._skipLevel=i._parent._skipLevel+1:i._skipLevel=i._parent._skipLevel),i._needRequest=!1,t._requestEntities.push({entity:i,priority:i._priority,owner:t}))}function _0x334e63(e,t){var i=e._replacementList,n=e._replacementSentinel;t$$(t._replacementNode)?i.splice(n,t._replacementNode):t._replacementNode=i.add(t)}function _0x359a9f(e){if(t$$(e._entity)&&e._entity._hasLeafChild)for(var t=0;t<e._entity._leafChildren.length;t++){if(!e._entity._leafChildren[t]._ready)return!1}return e._needRefine&&!e._isLeafNode}var _0x3c8daa={stack:new e$1d,stackMaximumLength:0,ancestorStack:new e$1d,ancestorStackMaximumLength:0};function _0x5656ae(e,t,i){var n,r=e._layer,o=_0x3c8daa.stack,a=_0x3c8daa.ancestorStack;for(o.push(i);o.length>0||a.length>0;){if(_0x3c8daa.stackMaximumLength=Math.max(_0x3c8daa.stackMaximumLength,o.length),_0x3c8daa.ancestorStackMaximumLength=Math.max(_0x3c8daa.ancestorStackMaximumLength,a.length),a.length>0){var s=a.peek();if(s._stackLength===o.length){a.pop(),s!==n&&(s._finalResolution=!1),_0x480e45(t,e,s);continue}}var l=o.pop(),u=l._shouldSelect,c=_0x359a9f(l);if(u){if(l._selectionDepth=a.length,l._selectionDepth>0&&(r._hasMixedContent=!0),n=l,!c){_0x480e45(t,e,l);continue}a.push(l),l._stackLength=o.length}if(c){for(var h=l._entity._childrenPageLod,d=h.length,f=0;f<d;++f){(p=h[f])._isVisible&&o.push(p)}d=(h=l._entity._leafChildren).length;for(f=0;f<d;++f){var p;(p=h[f])._isVisible&&o.push(p)}}}}var _0x33cb46=function(e,t){return 0===e._disFromCamera&&0===t._disFromCamera?e._centerZDepth-t._centerZDepth:e._disFromCamera-t._disFromCamera};function _0x48b747(e,t,i){if(t$$(e)&&e._processFileType===_0x416cc2.Add){var n=e._entity;if(t$$(n)&&n._ready){var r=t.camera,o=r.positionWC,a=t.cullingVolume,s=i._layer,l=i._gl;if(t$$(n._boundingSphere)&&!n._isRootTile&&(n._isVisible=a.computeVisibility(n._boundingSphere)!==cr$4.OUTSIDE,!n._isVisible)){for(var u=0,c=n._childrenPageLod.length;u<c;u++)for(var h=n._childrenPageLod[u],d=0;d<h._renderEntityList.length;d++){var f=h._renderEntityList[d];h._renderEntityVisible[f._geoName]=!1}return}for(u=0,c=n._childrenPageLod.length;u<c;u++){if(_0x2ca88e(h=n._childrenPageLod[u],s,o))if(a.computeVisibility(h._boundingSphere)!==cr$4.OUTSIDE||s._fileType==c$q.ClampGroundRealtimeRasterCache){if(h.calcPixFromCam(r,l,s._lodRangeScale,s._priorityScale,this._nLoadingPriority),i._prepareLoaded||(t$$(h._entity)&&h._isLessLodDis&&(h._entity._prepareLoad=!0),h._isLessLodDis=!1),!h._isLessLodDis&&t$$(h._entity))if(h._entity._s3mLoadState===W$q.PARSED){for(d=0;d<h._renderEntityList.length;d++){f=h._renderEntityList[d];h._renderEntityVisible[f._geoName]=!1}_0x48b747(h,t,i),_0xde1eeb(h);continue}for(d=0;d<h._renderEntityList.length;d++){f=h._renderEntityList[d];h._renderEntityVisible[f._geoName]=!0}}else for(var d=0;d<h._renderEntityList.length;d++){var f=h._renderEntityList[d];h._renderEntityVisible[f._geoName]=!1}else for(var d=0;d<h._renderEntityList.length;d++){var f=h._renderEntityList[d];h._renderEntityVisible[f._geoName]=!1}}}}}function _0xde1eeb(e){if(t$$(e)&&t$$(e._entity)){for(var t=e._entity,i={},n=0,r=t._childrenPageLod.length;n<r;n++){var o=t._childrenPageLod[n];if(0===Object.keys(o._renderEntityVisible).length)for(var a=0;a<o._renderEntityList.length;a++){i[(s=o._renderEntityList[a])._geoName]=!0}else for(a=0;a<o._renderEntityList.length;a++){i[(s=o._renderEntityList[a])._geoName]=o._renderEntityVisible[s._geoName]}}if(0!==Object.keys(i).length)for(a=0;a<e._renderEntityList.length;a++){var s;i[(s=e._renderEntityList[a])._geoName]?e._renderEntityVisible[s._geoName]=!0:e._renderEntityVisible[s._geoName]=!1}}}function _0xe1c813(e,t){if(t$$(e)&&t$$(e._entity)){for(var i=e._entity,n={},r=0,o=i._childrenPageLod.length;r<o;r++){var a=i._childrenPageLod[r];if(0===Object.keys(a._renderEntityVisible).length)for(var s=0;s<a._renderEntityList.length;s++){n[(l=a._renderEntityList[s])._geoName]=!0}else for(s=0;s<a._renderEntityList.length;s++){n[(l=a._renderEntityList[s])._geoName]=a._renderEntityVisible[l._geoName]}}if(0!==Object.keys(n).length)for(s=0;s<e._renderEntityList.length;s++){var l;n[(l=e._renderEntityList[s])._geoName]?(t.push(l),e._renderEntityVisible[l._geoName]=!0):e._renderEntityVisible[l._geoName]=!1}}}function _0x3615e9(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;e$1B(t,o)?e$1B(e,o)&&(a|=1):(a|=2,e$1B(e,o)||(a|=1)),n+=a}return n}function _0x35e460(e,t){var i=new DataView(e),n=0,r=i.getUint32(n,!0);if(!(t>r-1)){n+=4;var o,a,s=[];for(o=0;o<r;o++)a=i.getUint32(n,!0),s.push(a),n+=4;for(o=0;o<r;o++){if(a=s[o],o===t)return 0===a?void 0:new Uint8Array(e,n,a);n+=a}}}function _0x17fc6d(e,t){var i=t._fileName.split("_"),n=t.request.url;t.request.throttle=!0,t.request.throttleByServer=!0,t.request.type=V$_.PACK,t.request.quadKey=_0x3615e9(i[2],i[1],i[0]),t.request.providerName=n.substring(n.indexOf("datas/")+6,n.indexOf("/data/"));var r=t$X.createIfNeeded(n).getDerivedResource({url:n,request:t.request}).fetchArrayBuffer();t$$(r)?(t._s3mLoadState=W$q.LOADING,e._statistics.numberOfPendingRequests++,r.then((function(i){var n=_0x35e460(i,t.request.quadKeyIndex);t$$(n)?(i=new Uint8Array(n).buffer,0!=e._cacheKey.length?t.s3mBuffer=_0x5e8554(i,e._cacheKey):t.s3mBuffer=i,t._s3mLoadState=W$q.LOADED,e._statistics.numberOfPendingRequests--,e._statistics.numberOfProcessingAttempted++,t.request=null):t._s3mLoadState=W$q.FAILED}),(function(i){t$$(i)?(e._statistics.numberOfPendingRequests--,t._s3mLoadState=W$q.FAILED):(e._statistics.numberOfAttemptedRequests++,e._statistics.numberOfPendingRequests--,t._s3mLoadState=W$q.UNLOAD,t.request=null)}))):t.request=null}function _0x17c933(e,t){t$$(t._replacementNode)?e.splice(e.tail,t._replacementNode):t._replacementNode=e.add(t)}function _0x3c183c(e,t){return a$11.distance(e.center,t.center)<=e.radius+t.radius}function _0x530a86(e,t){if(e._flattening){var i=t._boundingSphere;if(t$$(i))for(var n=e._flattenRegions.values,r=0,o=n.length;r<o;r++){var a=n[r].boundingSphere;if(t$$(a)&&_0x3c183c(i,a)){t.isFlatten=!0;break}}}}function _0x5b186f(e,t,i,n){var r,o=[];if(t instanceof Array)for(var a=0;a<t.length;a++){var s=t[a].getMaxScaleLevel(e._cartographic);o.push(s),r=0===a?s:Math.max(r,s)}else r=t.getMaxScaleLevel(e._cartographic);var l=Math.min(i,r);if(l>0&&!e.hasScaleImagerys(l)){var u=[];if(t instanceof Array)for(a=0;a<t.length;a++){var c=t[a].getImagery(e._cartographic,Math.min(o[a],l));u=u.concat(c)}else u=t.getImagery(e._cartographic,l);u.length>0&&e.setScaleImagerys(u,l)}e.resetScaleImagerys(l,n)}function _0x23079b(e,t){if(!e)return 0;for(var i=0,n=0,r=e._childrenPageLod.length;n<r;n++){var o=e._childrenPageLod[n],a=_0x5f3d2c(o,t);o._oriBoundingSphere||(o._oriBoundingSphere=o._boundingSphere.clone()),o._boundingSphere.radius=o._oriBoundingSphere.radius+a,i+=a=Math.max(a,_0x23079b(o._entity,t))}return i}function _0x5f3d2c(e,t){for(var i=0,n=0;n<e._renderEntityList.length;n++)if(t$$(e._renderEntityList[n])){var r=e._renderEntityList[n];i=Math.max(r._radiusToExpand(t),i)}return i}function _0x56d05f(e,t){var i=t.positionCartographic.height;return(i=i<0?0:i)<=e._maxVisibleAltitude&&i>=e._minVisibleAltitude}function _0x2ca88e(e,t,i){var n;if(t._fileType===c$q.ClampGroundRealtimeRasterCache){var r=e._boundingSphere.center,o=e._boundingSphere.radius,a=a$11.fromRadians(n$1d.toRadians(r.x),n$1d.toRadians(r.y),r.z),s=a$11.fromRadians(n$1d.toRadians(r.x),n$1d.toRadians(r.y-o),r.z),l=a$11.distance(a,s);n=a$11.distance(a,i)-l}else n=a$11.distance(e._boundingSphere.center,i)-e._boundingSphere.radius;return(n=n<0?0:n)<=t._visibleDistanceMax&&n>=t._visibleDistanceMin}function _0x3bfc88(e,t,i){var n=a$11.distance(e._boundingSphere.center,i)-e._boundingSphere.radius;return(n=n<0?0:n)<=t._visibleDistanceMax&&n>=t._visibleDistanceMin}function _0x17bb00(e,t){var i=t.positionCartographic.height;return(i=i<0?0:i)<=e._maxVisibleAltitude&&i>=e._minVisibleAltitude}function _0x2f458f(e,t,i){var n,r=e._boundingSphere,o=e._orientedBoundingBox;if(t._fileType===c$q.ClampGroundRealtimeRasterCache){var a=r.center,s=r.radius,l=a$11.fromRadians(n$1d.toRadians(a.x),n$1d.toRadians(a.y),a.z),u=a$11.fromRadians(n$1d.toRadians(a.x),n$1d.toRadians(a.y-s),a.z),c=a$11.distance(l,u);n=a$11.distance(l,i)-c}else n=t$$(r)?a$11.distance(r.center,i)-r.radius:Math.sqrt(b$1o.distanceSquaredTo(o,i));n=n<0?0:n,e._disFromCamera=n;var h=t._translucencyByDistance?t._visibleDistanceMax+2e3:t._visibleDistanceMax;return n>=t._visibleDistanceMin&&n<=h}_0x2063a0.prototype._scheduleSkip=function(e){var t=this._layer;this._selectEntities.length=0,this._renderQueue.length=0,this._replacementList.splice(this._replacementList.tail,this._replacementSentinel);var i,n,r,o=[],a=[];for(i=0,n=this._rootEntities.length;i<n;i++){var s=this._rootEntities[i];if(_0x473708(e,t,s),t.residentRootTile||_0x4d8d9a(s)){if(!s._configReady){this.loadConfig(s);continue}o.push(s),a.push(s)}}for(a.sort(_0x33cb46),o.sort(_0x51476f);r=o.pop();){_0x458ac6(r);var l=!0;_0xd92299(r)&&(l=_0x130027(e,this,o,r)),r._isLeafTile&&_0x473708(e,t,r),(l||r._needLoad||t.residentRootTile&&r._isRootTile)&&(_0x80d958(e,this,r),_0x2c0923(e,this,r)),_0x334e63(this,r)}for(i=0,n=a.length;i<n;i++){for(var u=a[i],c=0,h=u._childrenPageLod.length;c<h;c++){_0x5656ae(this,e,u._childrenPageLod[c])}for(var d=0,f=u._leafChildren.length;d<f;d++){_0x5656ae(this,e,u._leafChildren[d])}}this.freeResource(e);var p=this._requestEntities.length;for(i=0;i<p;i++)this._requestEntities[i].entity.updatePriority(t),e.requests.push(this._requestEntities[i]);this._requestEntities.length=0},_0x2063a0.prototype._processPackRequests=function(){var e=this._packRequestEntities,t=e.length;if(!(t<1)){e.sort(_0x51476f);for(var i=0;i<t;i++){_0x17fc6d(this,e[i])}this._packRequestEntities.length=0}},_0x2063a0.prototype._processParsingEntities=function(){var e=this._parsingEntities,t=e.length;if(!(t<1)){e.sort(_0x51476f);for(var i=this._layer,n=i._isS3MB?_0x3065fa.binaryDataParser:_0x18a717.binaryDataParser,r=0;r<t;r++){var o=e[r];n(i,o,o.s3mBuffer,o.volBuffer)}this._parsingEntities.length=0}},_0x2063a0.prototype._schedule=function(e){var t=e.camera,i=t.positionWC,n=e.cullingVolume,r=this._layer,o=this._gl,a=_0x56d05f(r,t),s=[],l=e.requests;const u=e.processingTiles,c=e.replacementList;this._renderQueue.length=0;var h=this;if(a){for(var d=0,f=[],p=0,_=this._rootEntities.length;p<_;p++){if((N=this._rootEntities[p])._rootName=N._fileName,N._blockKey=N._fileName,t$$(N._boundingSphere)||t$$(N._orientedBoundingBox)){var m=t$$(N._orientedBoundingBox)?N._orientedBoundingBox:N._boundingSphere;if(N.isVisible=N.isFlatten||N.hasTranslate||n.computeVisibility(m)!==cr$4.OUTSIDE,r._fileType===c$q.ClampGroundRealtimeRasterCache&&(N.isVisible=!0),!_0x2f458f(N,r,i)){t$$(this._entityObjectId[N._fileName])&&(this._entityObjectId[N._fileName]=void 0,this._objectIdChange=!0),t$$(this._entityModelId[N._fileName])&&(this._entityModelId[N._fileName]=void 0,this._objectIdChange=!0);continue}if(!N.isVisible){t$$(this._entityObjectId[N._fileName])&&(this._entityObjectId[N._fileName]=void 0,this._objectIdChange=!0),t$$(this._entityModelId[N._fileName])&&(this._entityModelId[N._fileName]=void 0,this._objectIdChange=!0);continue}}if(t$$(r._queryFieldNames)&&N.attrLoadState!=W$q.LOADED&&N.attrLoadState!=W$q.LOADING&&(!0===h._indexedDBSetting.isAttributesSave?h._attributes.status.promise.then((function(){N.attrLoadState!=W$q.LOADED&&N.attrLoadState!=W$q.LOADING&&_0x236bfd(N,h)})):f.push(N)),N.attrLoadState==W$q.LOADED&&d++,N.attrLoadState!=W$q.LOADED&&t$$(r.themeStyle)&&t$$(r.queryFieldNames))N.isVisible=!1;else if(_0x17c933(c,N),N._s3mLoadState!==W$q.PARSED)if(N._ready){if(s.push(N),t$$(this._associatedFieldName)&&!t$$(this._entityObjectId[N._fileName])){for(var $={},g=0;g<N._childrenPageLod.length;g++)for(var y=0;y<N._childrenPageLod[g]._renderEntityList.length;y++){var v=N._childrenPageLod[g]._renderEntityList[y];for(var x in v._selectionInforMap._hash)$[x]=this._attributes[x][this._associatedFieldName]}this._entityObjectId[N._fileName]=$,this._objectIdChange=!0}if(this._isFineLayer&&!t$$(this._entityModelId[N._fileName])){for($={},g=0;g<N._childrenPageLod.length;g++)for(y=0;y<N._childrenPageLod[g]._renderEntityList.length;y++){v=N._childrenPageLod[g]._renderEntityList[y];for(var x in v._selectionInforMap._hash)$[x]=x}this._entityModelId[N._fileName]=$,this._objectIdChange=!0}}else l.push({entity:N,priority:N._disFromCamera,owner:this}),t$$(this._entityObjectId[N._fileName])&&(this._entityObjectId[N._fileName]=void 0,this._objectIdChange=!0),t$$(this._entityModelId[N._fileName])&&(this._entityModelId[N._fileName]=void 0,this._objectIdChange=!0);else u.push(N)}d==_&&!this._attrloaded&&(this._attrloaded=!0,r.attributeDownloaded.raiseEvent(r.name+" attribute downloaded.")),r._nProcessType==_0x416cc2.Add&&r._nLoadingMode==_0x17401e.All_Loading&&this._getCameraChanged(t),s.sort(_0x51476f);for(var b,S=[];b=s.pop();){if(t$$(b._boundingSphere)&&!b._isRootTile){m=t$$(b._orientedBoundingBox)?b._orientedBoundingBox:b._boundingSphere;if(b._isVisible=b.isFlatten||b.hasTranslate||n.computeVisibility(m)!==cr$4.OUTSIDE,this._prepareLoaded||(b._isVisible||(b._prepareLoad=!0),b._isVisible=!0),!b._isVisible){this._layer._clearMemoryImmediately&&(!r._isS3MBlock||b._isAncestorBlock)&&(null!=b._replacementNode?this._replacementList.moveNodeBefore(this._replacementList.head,b._replacementNode):b._replacementNode=this._replacementList.addToHead(b));for(p=0,_=b._childrenPageLod.length;p<_;p++){var w=b._childrenPageLod[p];for(y=0;y<w._renderEntityList.length;y++){v=w._renderEntityList[y];w._renderEntityVisible[v._geoName]=!1}}continue}this._beginToLoadLeaf=!0}(!r._isS3MBlock||b._isAncestorBlock)&&_0x17c933(c,b);var C=b._nLODLev;for(p=0,_=b._childrenPageLod.length;p<_;p++){w=b._childrenPageLod[p];if(t$$(r._hypsometricSetting)){var T=_0x3bfc88(w,r._hypsometricSetting,i)&&_0x17bb00(r._hypsometricSetting,t);for(y=0;y<w._renderEntityList.length;y++){(v=w._renderEntityList[y])._isHypsometricVisible=T}}m=t$$(w._orientedBoundingBox)?w._orientedBoundingBox:w._boundingSphere;if(b.isFlatten||b.hasTranslate||n.computeVisibility(m)!==cr$4.OUTSIDE||r._fileType==c$q.ClampGroundRealtimeRasterCache)if(b._isLeafTile){var P=void 0;t$$(r._imageryLayer)&&(P=w.calcImageryScaleLevel(t,o,r._lodRangeScale,this._nLoadingPriority,this._rangeMode),P=Math.ceil(P)-1);for(y=0;y<w._renderEntityList.length;y++){var E=w._renderEntityList[y];if(b.isFlatten||b.hasTranslate||n.computeVisibility(E._boundingVolume)!==cr$4.OUTSIDE||r._fileType==c$q.ClampGroundRealtimeRasterCache)for(var A in E._isLeaf=!0,t$$(P)&&t$$(E._cartographic)&&_0x5b186f(E,r._imageryLayer,P,e),this._renderQueue.push(E),E._labelIndexs)if(E._labelIndexs.hasOwnProperty(A)){var L=A;S.push(L)}}}else{if(w._isLeafNode){P=void 0;t$$(r._imageryLayer)&&(P=w.calcImageryScaleLevel(t,o,r._lodRangeScale,this._nLoadingPriority,this._rangeMode),P=Math.ceil(P)-1);for(y=0;y<w._renderEntityList.length;y++){E=w._renderEntityList[y];if(n.computeVisibility(E._boundingVolume)!=cr$4.OUTSIDE)for(var A in t$$(P)&&t$$(E._cartographic)&&_0x5b186f(E,r._imageryLayer,P,e),this._renderQueue.push(E),E._labelIndexs)if(E._labelIndexs.hasOwnProperty(A)){L=A;S.push(L)}}continue}if(this._rangeMode=w._rangeMode,w.calcPixFromCam(t,o,r._adjustedLodRangeScale,r._priorityScale,this._nLoadingPriority),this._prepareLoaded||(w._isLessLodDis&&t$$(w._entity)&&(w._entity._prepareLoad=!0),w._isLessLodDis=!1),w._isLessLodDis)for(y=0;y<w._renderEntityList.length;y++){this._renderQueue.push(w._renderEntityList[y]);v=w._renderEntityList[y];w._renderEntityVisible[v._geoName]=!0}else if(t$$(w._entity)){if(w._entity._s3mLoadState===W$q.TRANSFORMED){if(r._nProcessType===_0x416cc2.Add)for(y=0;y<w._renderEntityList.length;y++)this._renderQueue.push(w._renderEntityList[y]);else{for(y=0;y<w._renderEntityList.length;y++){v=w._renderEntityList[y];w._renderEntityVisible[v._geoName]=!1}w._processFileType===_0x416cc2.Add&&(_0x48b747(w,e,this),_0xe1c813(w,this._renderQueue))}s.push(w._entity)}else{(!r._isS3MBlock||w._entity._isAncestorBlock)&&_0x17c933(c,w._entity),w._entity._s3mLoadState===W$q.PARSED&&u.push(w._entity);for(y=0;y<w._renderEntityList.length;y++){this._renderQueue.push(w._renderEntityList[y]);v=w._renderEntityList[y];w._renderEntityVisible[v._geoName]=!0}if(!t$$(w._entity._volObj)&&t$$(b._volObj)&&(w._entity._volObj=b._volObj,De$e.AddRef(b._volObj.id)),t$$(w._entity._boundingSphere)){m=t$$(w._entity._orientedBoundingBox)?w._entity._orientedBoundingBox:w._entity._boundingSphere;var M=w._entity.isFlatten||w._entity.hasTranslate||n.computeVisibility(m)!==cr$4.OUTSIDE;this._prepareLoaded||(M||(w._entity._prepareLoad=!0),M=!0),M&&l.push({entity:w._entity,priority:w._entity._disFromCamera,owner:this})}else l.push({entity:w._entity,priority:w._entity._disFromCamera,owner:this})}}else{var I=new _0x56ff2;I.layer=b.layer,I._subdomainIndex=b._subdomainIndex+p+1,!t$$(I._volObj)&&t$$(b._volObj)&&(I._volObj=b._volObj,De$e.AddRef(b._volObj.id));var O=w._rangeDataList;if(O.indexOf("/")>-1){var D=O.lastIndexOf("/"),R=O.substring(0,D+1);I._fileName=O.substring(D+1),I._relativePath=new h$1f(R).resolve(b._relativePath)}else I._relativePath=b._relativePath,I._fileName=O;I._avgPix=w._pix,I._disFromCamera=w._disFromCamera,I._nLODLev=C+1,I._boundingSphere=w._boundingSphere,I._originalBS=w._originalBS,I._orientedBoundingBox=w._orientedBoundingBox,_0x530a86(r,I),this._currentMaxLevel=Math.max(this._currentMaxLevel,I._nLODLev),w._entity=I;for(y=0;y<w._renderEntityList.length;y++){this._renderQueue.push(w._renderEntityList[y]);v=w._renderEntityList[y];w._renderEntityVisible[v._geoName]=!0}_0x17c933(c,I)}}else for(var y=0;y<w._renderEntityList.length;y++){var v=w._renderEntityList[y];w._renderEntityVisible[v._geoName]=!1}}}if(!this._indexedDBSetting.isAttributesSave){for(f.sort(_0x51476f),p=0;p<f.length;p++)f[p].attrLoadState===W$q.UNLOAD&&_0x236bfd(f[p],this,!1);if(this._beginToLoadLeaf&&r.hasAttributeIndex)for(p=0,_=this._rootEntities.length;p<_;p++){var N;((N=this._rootEntities[p]).leafAttrLoadState===W$q.UNLOAD||N.leafAttrLoadState===W$q.FAILED)&&_0x236bfd(N,this,!0)}}r._showLabel&&this._layer._labelCollection.setVisibleLabels(S),r._showIcon&&this._layer._iconCollection.setVisibleIcons(S),this._packingRequest&&(this._processPackRequests(),this._processParsingEntities())}else r._fileType===c$q.ClampGroundRealtimeRasterCache&&this.refreshRaster(e)},_0x2063a0.prototype.loadImagery=function(e,t){if(!this._stopLoadImagery){for(var i=[],n=0,r=this._rootEntities.length;n<r;n++){var o=this._rootEntities[n];i.push(o)}for(var a;a=i.pop();){a.loadImagery(e,t);for(n=0,r=a._childrenPageLod.length;n<r;n++){var s=a._childrenPageLod[n];t$$(s._entity)&&(s._entity.loadImagery(e,t),i.push(s._entity))}}}},_0x2063a0.prototype._getCameraChanged=function(e){var t=!a$11.equals(this._cameraPos,e.positionWC)||!a$11.equals(this._cameraDir,e.directionWC)||!a$11.equals(this._cameraUp,e.upWC);(this._cameraPos=a$11.clone(e.position,this._cameraPos),this._cameraDir=a$11.clone(e.direction,this._cameraDir),this._cameraUp=a$11.clone(e.up,this._cameraUp),t)?e._clockStart=(new Date).getTime():(new Date).getTime()-e._clockStart<200&&(t=!0);return t},_0x2063a0.prototype.refresh=function(){this._renderQueue.length=0;for(var e=0,t=this._rootEntities.length;e<t;e++){for(var i=this._rootEntities[e],n=0;n<i._childrenPageLod.length;n++){var r=i._childrenPageLod[n];r=r&&!r.isDestroyed()&&r.destroy()}i._childrenPageLod.length=0,i.attributeBuffer=i.attributeBuffer&&!i.attributeBuffer.isDestroyed()&&i.attributeBuffer.destroy(),i._ready=!1,i._s3mLoadState=W$q.UNLOAD}},_0x2063a0.prototype.refreshPrepareLoad=function(){for(var e=[],t=0,i=this._rootEntities.length;t<i;t++){var n=this._rootEntities[t];n._ready&&e.push(n)}for(var r;r=e.pop();)if(r._prepareLoad){for(var o=0;o<r._childrenPageLod.length;o++){var a=r._childrenPageLod[o];a=a&&!a.isDestroyed()&&a.destroy()}r._childrenPageLod.length=0,r.attributeBuffer=r.attributeBuffer&&!r.attributeBuffer.isDestroyed()&&r.attributeBuffer.destroy(),r._ready=!1,r._s3mLoadState=W$q.UNLOAD}else for(t=0,i=r._childrenPageLod.length;t<i;t++){var s=r._childrenPageLod[t];r._isLeafTile||s._entity&&e.push(s._entity)}},_0x2063a0.prototype.getRenderQueueSize=function(){return this._renderQueue.length},_0x2063a0.prototype._updateSceneMode=function(e){if(e._mode!==this._sceneMode){var t=this._layer,i=new c$1a;c$1a.inverse(t._matModel,i),this._sceneMode=e._mode,this._projection=e._projection,t.refresh();for(var n=0,r=this._rootEntities.length;n<r;n++){var o=this._rootEntities[n];!t$$(o)||!t$$(o._boundingSphere)||(c$19.transform(o._boundingSphere,i,o._boundingSphere),c$19.transform(o._boundingSphere,t._matModel,o._boundingSphere),t$$(o._orientedBoundingBox)&&(c$1a.multiplyByPoint(i,o._orientedBoundingBox.center,o._orientedBoundingBox.center),c$1a.multiplyByPoint(t._matModel,o._orientedBoundingBox.center,o._orientedBoundingBox.center)))}}},_0x2063a0.prototype.traverseRenderEntity=function(e,t){for(var i=[],n=0,r=this._rootEntities.length;n<r;n++){var o=this._rootEntities[n];i.push(o)}for(var a;a=i.pop();)for(n=0,r=a._childrenPageLod.length;n<r;n++){for(var s=a._childrenPageLod[n],l=0;l<s._renderEntityList.length;l++)!t$$(s._renderEntityList[l])||(e.entity=a,t(s._renderEntityList[l],e));s._entity&&i.push(s._entity)}},_0x2063a0.prototype.traverseRenderEntityRecursionForObjsTranslate=function(){if(!(Object.keys(this._layer._objsOffsetList).length<1))for(var e=0,t=this._rootEntities.length;e<t;e++){var i=this._rootEntities[e];if(i._ready){var n=_0x23079b(i,this._layer._objsOffsetList);i._oriBoundingSphere||(i._oriBoundingSphere=i._boundingSphere.clone()),i._boundingSphere.radius=i._oriBoundingSphere.radius+n}}},_0x2063a0.prototype.refreshRasterById=function(e,t){for(var i=[],n=0,r=this._rootEntities.length;n<r;n++){var o=this._rootEntities[n];o._ready&&i.push(o)}for(var a;a=i.pop();)for(n=0,r=a._childrenPageLod.length;n<r;n++){for(var s=a._childrenPageLod[n],l=0;l<s._renderEntityList.length;l++)if(t$$(s._renderEntityList[l])){var u=s._renderEntityList[l]._selectionInforMap;if(t$$(u))for(var c in u._hash){if(parseInt(c)===parseInt(e)){s._renderEntityList[l].refreshRaster(t,!0);break}}}a._isLeafTile||s._entity&&i.push(s._entity)}},_0x2063a0.prototype.refreshRaster=function(e){for(var t=[],i=0,n=this._rootEntities.length;i<n;i++){var r=this._rootEntities[i];r._ready&&t.push(r)}for(var o;o=t.pop();)for(i=0,n=o._childrenPageLod.length;i<n;i++){for(var a=o._childrenPageLod[i],s=0;s<a._renderEntityList.length;s++)!t$$(a._renderEntityList[s])||a._renderEntityList[s].refreshRaster(e,!0);o._isLeafTile||a._entity&&t.push(a._entity)}},_0x2063a0.prototype._getMemoryUsageInBytes=function(){for(var e=0,t=this._replacementList.head;t$$(t)&&(t$$(t.item)||t$$(t.next));){var i=t.item;t$$(i)&&(e+=i.memoryUsage()),t=t.next}return e},_0x2063a0.prototype._getCacheMemoryUsageInBytes=function(){for(var e=0,t=this._replacementList.head;t!==this._replacementSentinel;){var i=t.item;t$$(i)&&(e+=i.memoryUsage()),t=t.next}return e},_0x2063a0.prototype.freeResource=function(e){for(var t=this._getCacheMemoryUsageInBytes(),i=1024*oo$1.getCacheSize()*1024,n=this._replacementList.head;t$$(n)&&n!==this._replacementSentinel&&(this._layer._clearMemoryImmediately||t>i);){var r=n.item;if(n=n.next,t$$(r)&&(this._replacementList.remove(r._replacementNode),r._replacementNode=null,!r._isRootTile||!this._layer.residentRootTile)){var o={geoSize:0,texSize:0},a=r.memoryUsageEx(o);oo$1._memGeometryRemoved(o.geoSize),r.freeResource(e),t-=a}}},_0x2063a0.prototype.isDestroyed=function(){return!1},_0x2063a0.prototype.destroy=function(){this._renderQueue.length=0,this._replacementList.splice(this._replacementList.tail,this._replacementSentinel);var e=this._layer,t=void 0;e._fileType===c$q.ClampGroundRealtimeRasterCache&&(t=e._frameState);for(var i=this._replacementList.head;i!==this._replacementSentinel;){var n=i.item,r={geoSize:0,texSize:0};n.memoryUsageEx(r),oo$1._memGeometryRemoved(r.geoSize),i=i.next,this._replacementList.remove(n._replacementNode),n.destroy(t)}return s$1e(this)};var _0x91724a=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1c93d5=_0x91724a(void 0,(function(){return _0x1c93d5.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c93d5).search("(((.+)+)+)+$")}));_0x1c93d5();var _0x50e9a0="attribute vec4 position;\nuniform vec4 uRect;\nuniform vec4 uSingleRegion;\nvarying float fHeight;\nvarying vec2 vTexCoord;\n\nvoid main()\n{\n vec4 vPos = position;\n vec2 vBounds = uRect.zw - uRect.xy;\n vTexCoord = (vPos.xy - uSingleRegion.xy) / (uSingleRegion.zw - uSingleRegion.xy);\n vPos.xy = (vPos.xy - uRect.xy) / vBounds.xy * 2.0 - 1.0;\n gl_Position = vec4(vPos.xy, 0.5, 1.0);\n fHeight = vPos.z;\n}",_0x47f387=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xf10669=_0x47f387(void 0,(function(){return _0xf10669.toString().search("(((.+)+)+)+$").toString().constructor(_0xf10669).search("(((.+)+)+)+$")}));function _0x42f3a3(e){e=e||{},this._font=e$1Y(e.font,"30px sans-serif"),this._fillColor=e$1Y(e.fillColor,e$1z.WHITE),this._outlineColor=e$1Y(e.outlineColor,e$1z.BLACK),this._outlineWidth=e$1Y(e.outlineWidth,1),this._showBackground=e$1Y(e.showBackground,!1),this._backgroundColor=e$1Y(e.backgroundColor,new e$1z(.165,.165,.165,.8)),this._style=e$1Y(e.fillStyle,z$t.FILL),this._pixelOffset=r$T.clone(e$1Y(e.pixelOffset,r$T.ZERO)),this._scale=e$1Y(e.scale,1),this._textField=e$1Y(e.textField,"Name"),this._heightReference=e$1Y(e.heightReference,U$Y.NONE),this._distanceDisplayCondition=e.distanceDisplayCondition,this._textFieldChanged=!1}_0xf10669(),Object.defineProperties(_0x42f3a3.prototype,{font:{get:function(){return this._font},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._font!==e&&(this._font=e)}},fillColor:{get:function(){return this._fillColor},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._fillColor=e}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._outlineColor=e}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._outlineWidth!==e&&(this._outlineWidth=e)}},showBackground:{get:function(){return this._showBackground},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._showBackground!==e&&(this._showBackground=e)}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._backgroundColor=e}},fillStyle:{get:function(){return this._style},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._style!==e&&(this._style=e)}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._pixelOffset=e}},scale:{get:function(){return this._scale},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._scale!==e&&(this._scale=e)}},textField:{get:function(){return this._textField},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._textField!==e?(this._textField=e,this._textFieldChanged=!0):this._textFieldChanged=!1}},heightReference:{get:function(){return this._heightReference},set:function(e){this._heightReference=e}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=e}}});var _0x568a4c=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x23501f=_0x568a4c(void 0,(function(){return _0x23501f.toString().search("(((.+)+)+)+$").toString().constructor(_0x23501f).search("(((.+)+)+)+$")}));_0x23501f();var _0x5d9da8={Hide:0,Visible:1,ResetAll:2},_0x49e724=Object.freeze(_0x5d9da8),_0x252a47=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xa08fb8=_0x252a47(void 0,(function(){return _0xa08fb8.toString().search("(((.+)+)+)+$").toString().constructor(_0xa08fb8).search("(((.+)+)+)+$")}));function _0x4e912a(e,t,i){this._id=e,this._type=t,this._pointCounts=i}_0xa08fb8(),Object.defineProperties(_0x4e912a.prototype,{id:{get:function(){return this._id},set:function(e){n$1e.defined("PointCloudClassificationInfo id",e),this._id=e}},type:{get:function(){return this._type},set:function(e){n$1e.defined("PointCloudClassificationInfo type",e),this._type=e}},pointCounts:{get:function(){return this._pointCounts},set:function(e){n$1e.defined("PointCloudClassificationInfo pointCounts",e),this._pointCounts=e}}}),_0x4e912a.prototype.isDestroyed=function(){return!1},_0x4e912a.prototype.destroy=function(){return s$1e(this)};var _0x583e26=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2e620c=_0x583e26(void 0,(function(){return _0x2e620c.toString().search("(((.+)+)+)+$").toString().constructor(_0x2e620c).search("(((.+)+)+)+$")}));_0x2e620c();var _0x47b341={CLIP_INSIDE:0,CLIP_OUTSIDE:1},je$8=Object.freeze(_0x47b341),_0x1e9bf4=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x15697e=_0x1e9bf4(void 0,(function(){return _0x15697e.toString().search("(((.+)+)+)+$").toString().constructor(_0x15697e).search("(((.+)+)+)+$")}));_0x15697e();var _0x4e23d0={NONE:0,COLOR:1,MODEL_COLOR:2},_0xaa965=Object.freeze(_0x4e23d0),_0x520bbd=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x50259d=_0x520bbd(void 0,(function(){return _0x50259d.toString().search("(((.+)+)+)+$").toString().constructor(_0x50259d).search("(((.+)+)+)+$")}));_0x50259d();var _0x461978={NONE:0,STRIP:1,DOT:2,CHECKBOARD:3,GRID:4};function _0x4f5b3a(){this._rotationAngle=0,this._foreColor=new a$10(1,1,0,1),this._backColor=new a$10(1,0,1,1),this._type=_0x461978.DOT,this._lineWidthX=2,this._lineWidthY=2,this._offsetX=0,this._offsetY=0,this._repeatX=20,this._repeatY=20}_0x4f5b3a.prototype.setValue=function(e,t){"ForeColor"===e&&(this._foreColor=t),"BackColor"===e&&(this._backColor=t),"RegionType"===e&&(this._type=t),"RotationAngle"===e&&(this._rotationAngle=t),"WidthX"===e&&(this._lineWidthX=t),"WidthY"===e&&(this._lineWidthY=t),"OffsetX"===e&&(this._offsetX=t),"OffsetY"===e&&(this._offsetY=t),"RepeatX"===e&&(this._repeatX=t),"RepeatY"===e&&(this._repeatY=t)},_0x4f5b3a.prototype.getEffectSetting=function(){return[{name:"ForeColor",value:new a$10(1,1,0,1),description:"Region Fore Color",max:new a$10(1,1,1,1),min:new a$10(0,0,0,0),type:a$10},{name:"BackColor",value:new a$10(1,0,1,1),description:"Region Back Color",max:new a$10(1,1,1,1),min:new a$10(0,0,0,0),type:a$10},{name:"RegionType",value:_0x461978.DOT,description:"Region Effect Type",max:4,min:0,type:_0x461978},{name:"RotationAngle",value:0,description:"Region RotationAngle",max:0,min:1,type:Number},{name:"WidthX",value:2,description:"Region horizontal Line Width",max:20,min:1,type:Number},{name:"WidthY",value:2,description:"Region vertical Line Width",max:20,min:1,type:Number},{name:"OffsetX",value:0,description:"Region horizontal Offset",max:20,min:0,type:Number},{name:"OffsetY",value:0,description:"Region vertical Offset",max:20,min:0,type:Number},{name:"RepeatX",value:20,description:"Region horizontal Repeat",max:20,min:1,type:Number},{name:"RepeatY",value:20,description:"Region vertical Repeat",max:20,min:1,type:Number}]};var _0x26d48c=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x17bc82=_0x26d48c(void 0,(function(){return _0x17bc82.toString().search("(((.+)+)+)+$").toString().constructor(_0x17bc82).search("(((.+)+)+)+$")}));_0x17bc82();var _0x78666={NONE:0,DASH:1,OUTLINE:2,GLOW:3};function _0x840433(){this._lineWidth=1,this._color=new a$10(1,1,1,1),this._type=_0x78666.NONE,this._outlineColor=new a$10(0,0,0,1),this._outlineWidth=1,this._gapColor=new a$10(1,1,1,0),this._dashLength=16,this._dashPattern=255,this._glowPower=.25,this._isArrow=!1,this._isMove=!1,this._frame=0}_0x840433.prototype.setValue=function(e,t){"Color"===e&&(this._color=t),"Width"===e&&(this._lineWidth=t),"PolylineType"===e&&(this._type=t),"OutlineColor"===e&&(this._outlineColor=t),"OutlineWidth"===e&&(this._outlineWidth=t),"GapColor"===e&&(this._gapColor=t),"DashLength"===e&&(this._dashLength=t),"DashPattern"===e&&(this._dashPattern=t),"GlowPower"===e&&(this._glowPower=t),"IsArrow"===e&&(this._isArrow=t),"IsMove"===e&&(this._isMove=t)},_0x840433.prototype.getEffectSetting=function(){return[{name:"Color",value:new a$10(1,1,1,1),description:"Polyline Color",max:new a$10(1,1,1,1),min:new a$10(0,0,0,0),type:a$10},{name:"Width",value:5,description:"Polyline Width",max:20,min:1,type:Number},{name:"PolylineType",value:_0x78666.DASH,description:"Polyline Type",max:3,min:0,type:_0x78666},{name:"OutlineColor",value:new a$10(0,0,0,1),description:"Polyline Outline Color",max:new a$10(1,1,1,1),min:new a$10(0,0,0,0),type:a$10},{name:"OutlineWidth",value:1,description:"Polyline Outline Width",max:10,min:1,type:Number},{name:"GapColor",value:new a$10(1,1,1,0),description:"Polyline Gap Color",max:new a$10(1,1,1,1),min:new a$10(0,0,0,0),type:a$10},{name:"DashLength",value:16,description:"Polyline Gap Dash Length",max:64,min:1,type:Number},{name:"DashPattern",value:255,description:"Polyline Gap Dash Pattern",max:65535,min:0,type:Number},{name:"GlowPower",value:.25,description:"Polyline Glow Power",max:1,min:0,type:Number},{name:"IsArrow",value:!1,description:"Polyline Is Have Arrow",max:!0,min:!1,type:Boolean},{name:"IsMove",value:!1,description:"Polyline Is Moving",max:!0,min:!1,type:Boolean}]};var _0xb61f2b=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3d6ab2=_0xb61f2b(void 0,(function(){return _0x3d6ab2.toString().search("(((.+)+)+)+$").toString().constructor(_0x3d6ab2).search("(((.+)+)+)+$")}));function _0x20df78(){}_0x3d6ab2();var _0x24fc0a="Assets/Textures/PBR_Material/",_0x24e7b2="",_0x28079e="",_0x21c8b3="",_0x50b611="",_0x2a5bab="",_0x40c5b9="";_0x20df78.getMaterial=function(e){return e===We$a.TITANIUM_SCUFFED?(_0x24e7b2="titanium_scuffed/Titanium-Scuffed_metallic.png",_0x28079e="titanium_scuffed/Titanium-Scuffed_roughness.png",_0x21c8b3="titanium_scuffed/Titanium-Scuffed_basecolor.png"):e===We$a.METAL_PLATE&&(_0x24e7b2="metal_plate/metal_plate_disp_1k.jpg",_0x28079e="metal_plate/metal_plate_rough_1k.jpg",_0x21c8b3="metal_plate/metal_plate_diff_1k.jpg"),_0x50b611=o$12(_0x24fc0a+_0x24e7b2),_0x2a5bab=o$12(_0x24fc0a+_0x28079e),_0x40c5b9=o$12(_0x24fc0a+_0x21c8b3),{metalTextureUrl:_0x50b611,roughTextureUrl:_0x2a5bab,albedoTextureUrl:_0x40c5b9}};var _0x32acd2=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xce2048=_0x32acd2(void 0,(function(){return _0xce2048.toString().search("(((.+)+)+)+$").toString().constructor(_0xce2048).search("(((.+)+)+)+$")}));_0xce2048();var _0x25da3e="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nuniform sampler2D u_pointCloud_colorGBuffer;\nuniform sampler2D u_pointCloud_depthTexture;\nuniform vec3 u_distancesAndEdlStrength;\nvarying vec2 v_textureCoordinates;\n\nvec2 neighborContribution(float log2Depth, vec2 padding)\n{\nfloat depthOrLogDepth = texture2D(u_pointCloud_depthTexture, v_textureCoordinates + padding).r;\nif (depthOrLogDepth == 1.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 = texture2D(u_pointCloud_depthTexture, v_textureCoordinates).r;\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depthOrLogDepth);\neyeCoordinate /= eyeCoordinate.w;\nfloat log2Depth = log2(-eyeCoordinate.z);\nif (depthOrLogDepth == 1.0)\n{\ndiscard;\n}\nvec4 color = texture2D(u_pointCloud_colorGBuffer, v_textureCoordinates);\n#ifdef EDL_SHADING\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.y;\nfloat shade = exp(-response * 300.0 * u_distancesAndEdlStrength.z);\ncolor.rgb *= shade;\n#endif\ngl_FragColor = vec4(color);\ngl_FragColor.a = 1.0;\n#ifdef LOG_DEPTH\nczm_writeLogDepth(1.0 + (czm_projection * vec4(eyeCoordinate.xyz, 1.0)).w);\n#else\ngl_FragDepthEXT = czm_eyeToWindowCoordinates(vec4(eyeCoordinate.xyz, 1.0)).z;\n#endif\n}\n",P$h="#define SAMPLES 8\nuniform float delta;\nuniform float sigma;\nuniform float direction;\nuniform sampler2D colorTexture;\n#ifdef USE_STEP_SIZE\nuniform float stepSize;\n#else\nuniform vec2 step;\n#endif\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec2 st = v_textureCoordinates;\nvec2 dir = vec2(1.0 - direction, direction);\n#ifdef USE_STEP_SIZE\nvec2 step = vec2(stepSize * (czm_pixelRatio / czm_viewport.zw));\n#else\nvec2 step = step;\n#endif\nvec3 g;\ng.x = 1.0 / (sqrt(czm_twoPi) * sigma);\ng.y = exp((-0.5 * delta * delta) / (sigma * sigma));\ng.z = g.y * g.y;\nvec4 result = texture2D(colorTexture, st) * g.x;\nfor (int i = 1; i < SAMPLES; ++i)\n{\ng.xy *= g.yz;\nvec2 offset = float(i) * dir * step;\nresult += texture2D(colorTexture, st - offset) * g.x;\nresult += texture2D(colorTexture, st + offset) * g.x;\n}\ngl_FragColor = result;\n}\n",_0x3de818=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x5b8699=_0x3de818(void 0,(function(){return _0x5b8699.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b8699).search("(((.+)+)+)+$")})),_0x197c43;function _0x6fcd31(e){return new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:e,magnificationFilter:e})}function _0x21f1aa(){this._framebuffer=void 0,this._colorGBuffer=void 0,this._depthTexture=void 0,this._blurXFrameBuffer=void 0,this._blurXTexture=void 0,this._blurYFrameBuffer=void 0,this._blurYTexture=void 0,this._useCount=0}_0x5b8699(),_0x21f1aa._useCount=0,_0x21f1aa.addRef=function(){this._useCount++},_0x21f1aa.removeRef=function(){if(this._useCount--,0==this._useCount){var e=_0x197c43._framebuffer;if(!t$$(e))return;_0x197c43._colorGBuffer.destroy(),_0x197c43._depthTexture.destroy(),e.destroy()}this._useCount=Math.max(0,this._useCount)},_0x21f1aa.setCurrentFrameBuffer=function(e){_0x197c43=e},_0x21f1aa.createFrameBuffer=function(e,t){var i=e.drawingBufferWidth*t,n=e.drawingBufferHeight*t,r=new P$S({context:e,width:i,height:n,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE,sampler:_0x6fcd31(tt$l.LINEAR)});new P$S({context:e,width:i,height:n,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE,sampler:_0x6fcd31(tt$l.NEAREST)});var o=new P$S({context:e,width:i,height:n,pixelFormat:Z$_.DEPTH_STENCIL,pixelDatatype:v$Z.UNSIGNED_INT_24_8,sampler:_0x6fcd31(tt$l.NEAREST)});_0x197c43._framebuffer=new u$F({context:e,colorTextures:[r],depthStencilTexture:o,destroyAttachments:!1}),_0x197c43._colorGBuffer=r,_0x197c43._depthTexture=o,_0x197c43._blurXTexture=new P$S({context:e,width:i,height:n,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE,sampler:_0x6fcd31(tt$l.LINEAR)}),_0x197c43._blurXFrameBuffer=new u$F({context:e,colorTextures:[_0x197c43._blurXTexture],destroyAttachments:!1}),_0x197c43._blurYTexture=new P$S({context:e,width:i,height:n,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE,sampler:_0x6fcd31(tt$l.LINEAR)}),_0x197c43._blurYFrameBuffer=new u$F({context:e,colorTextures:[_0x197c43._blurYTexture],destroyAttachments:!1})},_0x21f1aa.getColorGBuffer=function(){return _0x197c43._colorGBuffer},_0x21f1aa.getDepthTexture=function(){return _0x197c43._depthTexture},_0x21f1aa.getFrameBuffer=function(){return _0x197c43._framebuffer},_0x21f1aa.getBlurXFrameBuffer=function(){return _0x197c43._blurXFrameBuffer},_0x21f1aa.getBlurYFrameBuffer=function(){return _0x197c43._blurYFrameBuffer},_0x21f1aa.getBlurXTexture=function(){return _0x197c43._blurXTexture},_0x21f1aa.getBlurYTexture=function(){return _0x197c43._blurYTexture},_0x21f1aa.destroyFrameBuffer=function(){var e=_0x197c43._framebuffer;!t$$(e)||(_0x197c43._colorGBuffer.destroy(),_0x197c43._depthTexture.destroy(),e.destroy(),_0x197c43._blurXTexture.destroy(),_0x197c43._blurYTexture.destroy(),_0x197c43._blurXFrameBuffer.destroy(),_0x197c43._blurYFrameBuffer.destroy())};var _0x406044=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x4e5f14=_0x406044(void 0,(function(){return _0x4e5f14.toString().search("(((.+)+)+)+$").toString().constructor(_0x4e5f14).search("(((.+)+)+)+$")}));_0x4e5f14();var _0x353754=.5;function _0x2e7394(e){this._framebuffer=void 0,this._colorGBuffer=void 0,this._depthTexture=void 0,this._blurXFrameBuffer=void 0,this._blurXTexture=void 0,this._blurYFrameBuffer=void 0,this._blurYTexture=void 0,this._blurXCommand=void 0,this._blurYCommand=void 0,this._drawCommand=void 0,this._clearCommand=void 0,this.edlShading=!1,this._edlShading=!1,this._performance=!1,this._strength=1,this._radius=1,this._passType=we$l.S3MTiles,this._screenWidth=0,this._screenHeight=0,this._renderStateCache={},_0x21f1aa.addRef(),this.textureScale=_0x353754}var _0x501d0e=new a$11,_0x13a46c=new r$T;function _0x3d4d46(e,t){_0x13a46c.x=1/e._colorGBuffer.width,_0x13a46c.y=1/e._colorGBuffer.height;var i={delta:function(){return 1},sigma:function(){return 2},stepSize:function(){return 1},direction:function(){return 0},colorTexture:function(){return e._colorGBuffer}},n={delta:function(){return 1},sigma:function(){return 2},stepSize:function(){return 1},direction:function(){return 1},colorTexture:function(){return e._blurXTexture}},r="#define USE_STEP_SIZE\n"+P$h;e._blurXCommand=t.createViewportQuadCommand(r,{uniformMap:i,pass:e._passType,owner:e}),e._blurXCommand.framebuffer=e._blurXFrameBuffer,e._blurXCommand.renderState=p$1a.fromCache({viewport:_0x53d043}),e._blurYCommand=t.createViewportQuadCommand(r,{uniformMap:n,pass:e._passType,owner:e}),e._blurYCommand.framebuffer=e._blurYFrameBuffer,e._blurYCommand.renderState=p$1a.fromCache({viewport:_0x53d043});var o={u_pointCloud_colorGBuffer:function(){return e._performance?e._blurYTexture:e._colorGBuffer},u_pointCloud_depthTexture:function(){return e._depthTexture},u_distancesAndEdlStrength:function(){return _0x501d0e.x=e._radius/(t.drawingBufferWidth*_0x353754),_0x501d0e.y=e._radius/(t.drawingBufferHeight*_0x353754),_0x501d0e.z=e._strength,_0x501d0e}},a=p$1a.fromCache({blending:Ee$s.ALPHA_BLEND,depthMask:!0,depthTest:{enabled:!0}}),s=new a$O({name:"S3MPointCloudEDLFp",sources:[_0x25da3e]});e._edlShading&&s.defines.push("EDL_SHADING"),e._drawCommand=t.createViewportQuadCommand(s,{uniformMap:o,renderState:a,pass:e._passType,owner:e}),e._clearCommand=new r$M({framebuffer:e._framebuffer,color:new e$1z(0,0,0,0),depth:1,renderState:p$1a.fromCache(),pass:e._passType,owner:e})}function _0x2be090(e,t){var i=t.drawingBufferWidth*_0x353754,n=t.drawingBufferHeight*_0x353754;_0x53d043.width=i,_0x53d043.height=n;var r=_0x21f1aa.getColorGBuffer(),o=!1,a=t$$(r)&&(r.width!==i||r.height!==n);(!t$$(r)||a)&&(_0x21f1aa.destroyFrameBuffer(),_0x21f1aa.createFrameBuffer(t,_0x353754));var s=e._edlShading!=e.edlShading;e._edlShading=e.edlShading;var l=e._colorGBuffer;return a=e._screenWidth!==i||e._screenHeight!==n,(!t$$(l)||a||s)&&(e._colorGBuffer=_0x21f1aa.getColorGBuffer(),e._depthTexture=_0x21f1aa.getDepthTexture(),e._framebuffer=_0x21f1aa.getFrameBuffer(),e._blurXFrameBuffer=_0x21f1aa.getBlurXFrameBuffer(),e._blurYFrameBuffer=_0x21f1aa.getBlurYFrameBuffer(),e._blurXTexture=_0x21f1aa.getBlurXTexture(),e._blurYTexture=_0x21f1aa.getBlurYTexture(),_0x3d4d46(e,t),o=!0),e._screenWidth=i,e._screenHeight=n,o}function _0x5de4e2(e){return e.drawBuffers&&e.fragmentDepth}_0x2e7394.isSupported=_0x5de4e2;var _0x53d043=new n$13;function _0x102db3(e,t){var i=e[t.id];if(!t$$(i)||i.viewport.width!=_0x53d043.width||i.viewport.height!=_0x53d043.height){var n=p$1a.getState(t);n.viewport=_0x53d043,i=p$1a.fromCache(n),e[t.id]=i}return i}_0x2e7394.prototype.update=function(e,t,i){if(_0x5de4e2(e.context)){_0x21f1aa.setCurrentFrameBuffer(e.context._sharedEDL),this._strength=i.eyeDomeLightingStrength,this._radius=i.eyeDomeLightingRadius,this._performance=i.performance,this.edlShading=i.eyeDomeLighting,_0x353754=i.performance?.5:1,this.textureScale=_0x353754;var n,r=_0x2be090(this,e.context),o=e.commandList,a=o.length;for(n=t;n<a;++n){var s=o[n];if(s.primitiveType===H$11.POINTS&&s.pass!==we$l.TRANSLUCENT){var l=s.derivedCommands.pointCloudProcessor;(!t$$(l)||s.dirty||r||l.framebuffer!==this._framebuffer)&&(l=s$1d.shallowClone(s),s.derivedCommands.pointCloudProcessor=l,l.framebuffer=this._framebuffer,l.renderState=_0x102db3(this._renderStateCache,l.renderState),l.castShadows=!1,l.receiveShadows=!1,l._pointCloudEyeDomeLighting=!0),o[n]=l}}var u=this._clearCommand,c=this._drawCommand;i.performance&&(o.push(this._blurXCommand),o.push(this._blurYCommand)),o.push(c),o.push(u)}},_0x2e7394.prototype.isDestroyed=function(){return!1},_0x2e7394.prototype.destroy=function(){return _0x21f1aa.removeRef(),s$1e(this)};var _0x163397=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3388a5=_0x163397(void 0,(function(){return _0x3388a5.toString().search("(((.+)+)+)+$").toString().constructor(_0x3388a5).search("(((.+)+)+)+$")}));_0x3388a5();var V$j="attribute vec4 aPosition;\nattribute vec3 aTexCoord;\n#ifdef Volume\n attribute vec3 aRatio;\n varying vec3 vecRotioCoord;\n\tvarying vec2 vecHypTexCoord;\n#endif\nuniform float uGeometryHeight;\nvarying vec2 v_texCoord;\nvarying float v_face;\nvoid main()\n{\n v_texCoord = aTexCoord.xy;\n v_face = aTexCoord.z;\n#ifdef GEOCYLINDER\n v_texCoord.y = aPosition.z / uGeometryHeight;\n#endif\n#ifdef Volume\nvecRotioCoord = aRatio;\n#endif\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}",_0x48dbda=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x482104=_0x48dbda(void 0,(function(){return _0x482104.toString().search("(((.+)+)+)+$").toString().constructor(_0x482104).search("(((.+)+)+)+$")}));_0x482104();var _0x3f5e7a="uniform sampler2D uClampTexture;\nuniform vec4 uClipPlaneColor;\nuniform float uUseColor;\nvoid main()\n{\nvec2 center = vec2(gl_FragCoord.x / czm_viewport.z, gl_FragCoord.y / czm_viewport.w);\nvec4 clampColor = texture2D(uClampTexture, center);\nif(clampColor.r < 0.01 && clampColor.g < 0.01 && clampColor.b < 0.01)\n{\n discard;\n}\ngl_FragColor = mix(clampColor, uClipPlaneColor, uUseColor);\n}",_0x27583f=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1b6ad1=_0x27583f(void 0,(function(){return _0x1b6ad1.toString().search("(((.+)+)+)+$").toString().constructor(_0x1b6ad1).search("(((.+)+)+)+$")}));_0x1b6ad1();var _0x54b635="void main()\n{\ngl_FragColor = vec4(1.0);\n}",_0x5340be=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xa1938=_0x5340be(void 0,(function(){return _0xa1938.toString().search("(((.+)+)+)+$").toString().constructor(_0xa1938).search("(((.+)+)+)+$")}));function _0x53c87f(e){this._layer=e,this._colorCommand=void 0,this._depthCommand=void 0,this._firstPoint=void 0,this._secondPoint=void 0,this._thirdPoint=void 0,this._boundingSphere=new c$19(new a$11(0,0,0),6378137),this._matModel=c$1a.IDENTITY,this._attributeLocations={}}_0xa1938(),Object.defineProperties(_0x53c87f.prototype,{}),_0x53c87f.prototype.initialize=function(e,t){this._initialize||(this.createCommand(e,t),this._initialize=!0)},_0x53c87f.prototype.update=function(e,t,i){if(this.initialize(e,t),!t.passes.pick&&!t.passes.depth){if(t._fboState.frameBufferType==B$y.CLAMP)return void(t$$(this._depthCommand)&&i.push(this._depthCommand));t$$(this._colorCommand)&&i.push(this._colorCommand)}};var _0x5d9862=new a$11;function _0x7ef15e(e){t$$(e)&&(e.vertexArray=e.vertexArray&&!e.vertexArray.isDestroyed()&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),e.renderState=void 0,e.uniformMap=void 0)}_0x53c87f.prototype.createVertices=function(e){var t=C$12.createTypedArray(C$12.FLOAT,9),i=0,n=1e3;return t[i++]=(this._firstPoint.x-e.x)*n,t[i++]=(this._firstPoint.y-e.y)*n,t[i++]=(this._firstPoint.z-e.z)*n,t[i++]=(this._secondPoint.x-e.x)*n,t[i++]=(this._secondPoint.y-e.y)*n,t[i++]=(this._secondPoint.z-e.z)*n,t[i++]=(this._thirdPoint.x-e.x)*n,t[i++]=(this._thirdPoint.y-e.y)*n,t[i++]=(this._thirdPoint.z-e.z)*n,t},_0x53c87f.prototype.createCommand=function(e,t){_0x7ef15e(this._colorCommand),_0x7ef15e(this._depthCommand);var i=C$12.createTypedArray(C$12.UNSIGNED_SHORT,3);i[0]=0,i[1]=1,i[2]=2,_0x5d9862.x=(this._firstPoint.x+this._secondPoint.x+this._thirdPoint.x)/3,_0x5d9862.y=(this._firstPoint.y+this._secondPoint.y+this._thirdPoint.y)/3,_0x5d9862.z=(this._firstPoint.z+this._secondPoint.z+this._thirdPoint.z)/3;var n=this.createVertices(_0x5d9862),r=u$Y.createVertexBuffer({context:e,typedArray:n,usage:A$13.STATIC_DRAW}),o=[];this._attributeLocations.aPosition=0,o.push({index:this._attributeLocations.aPosition,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var a=u$Y.createIndexBuffer({context:e,typedArray:i,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT}),s={};c$1a.fromRotationTranslation(r$W.IDENTITY,_0x5d9862,s),this._matModel=s,this._depthCommand=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:this._matModel,boundingVolume:this._boundingSphere,pass:we$l.S3MTiles,cull:!1}),this._depthCommand.vertexArray=new x$18({context:e,attributes:o,indexBuffer:a}),this._depthCommand.shaderProgram=p$15.fromCache({context:e,vertexShaderSource:V$j,fragmentShaderSource:_0x54b635,attributeLocations:this._attributeLocations}),this._depthCommand.renderState=p$1a.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!0,colorMask:{red:!1,green:!1,blue:!1,alpha:!1}}),this.createColorCommand(e,t)},_0x53c87f.prototype.createColorCommand=function(e,t){var i=s$1d.shallowClone(this._depthCommand),n=this._depthCommand.shaderProgram.vertexShaderSource.clone();i.shaderProgram=p$15.fromCache({context:e,vertexShaderSource:n,fragmentShaderSource:_0x3f5e7a,attributeLocations:this._attributeLocations});var r=this;i.uniformMap={uClampTexture:function(){var i=t._framebufferList.clampTexture;return t$$(i)?i.renderTexture._fb.getColorTexture(0):e.defaultTexture},uClipPlaneColor:function(){return r._layer._clipPlaneColor},uUseColor:function(){return r._layer._clipPlaneMode===_0xaa965.COLOR?1:(_0xaa965.MODEL_COLOR,0)}},i.renderState=p$1a.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!0}),i.pass=we$l.S3MTiles-1,this._colorCommand=i},_0x53c87f.prototype.setPoints=function(e,t,i){this._initialize=!1,this._firstPoint=e,this._secondPoint=t,this._thirdPoint=i},_0x53c87f.prototype.destroy=function(){return _0x7ef15e(this._colorCommand),this._colorCommand=void 0,_0x7ef15e(this._depthCommand),this._depthCommand=void 0,s$1e(this)};var _0x4a679b=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x43dd15=_0x4a679b(void 0,(function(){return _0x43dd15.toString().search("(((.+)+)+)+$").toString().constructor(_0x43dd15).search("(((.+)+)+)+$")}));function _0x2d12d7(e){this._enable=!1,this._speed=100,this._period=0,this._layer=e}_0x43dd15(),Object.defineProperties(_0x2d12d7.prototype,{enable:{get:function(){return this._enable},set:function(e){e!=this._enable&&(this._enable=e,this._layer.bloomEnableChange(e))}},speed:{get:function(){return this._speed},set:function(e){this._speed=e}},period:{get:function(){return this._period/1e3},set:function(e){this._period=1e3*e}},maxBloomHeight:{get:function(){if(0==this._period)return Number.MAX_VALUE;var e=performance.now()%this._period;return this._speed*e/1e3}}});var e$A={Disjoint:0,Intersects:1,Contains:2},k$p=Object.freeze(e$A),_0x323551=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x57b3c6=_0x323551(void 0,(function(){return _0x57b3c6.toString().search("(((.+)+)+)+$").toString().constructor(_0x57b3c6).search("(((.+)+)+)+$")}));function _0x127a17(){this._cache={},this._queue=new i$Y}_0x57b3c6();var _0x2c15b9=0,_0x261b90=104857600;_0x127a17.prototype.set=function(e,t,i){var n=e+"_"+t;if(!t$$(this._cache[n])){var r={id:n,buffer:i};for(this._cache[n]=r,this._queue.enqueue(n),_0x2c15b9+=i.byteLength;_0x2c15b9>_0x261b90;){var o=this._queue.dequeue(),a=this._cache[o];_0x2c15b9-=a.buffer.byteLength,delete this._cache[o]}}},_0x127a17.prototype.get=function(e,t){var i=e+"_"+t,n=this._cache[i];if(t$$(n))return n.buffer},_0x127a17.prototype.contains=function(e,t){var i=e+"_"+t;return t$$(this._cache[i])},_0x127a17._singleInstance=void 0,_0x127a17.getSingleInstance=function(){return t$$(_0x127a17._singleInstance)||(_0x127a17._singleInstance=new _0x127a17),_0x127a17._singleInstance};var e$z={KeepOutside:1,KeepInside:2},L$o=Object.freeze(e$z),_0x391726=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x4aabd4=_0x391726(void 0,(function(){return _0x4aabd4.toString().search("(((.+)+)+)+$").toString().constructor(_0x4aabd4).search("(((.+)+)+)+$")}));_0x4aabd4();var Y$o="attribute vec4 aPosition;\nattribute vec3 aTexCoord0;\nattribute vec2 aTexCoord1;\nvarying float vHeight;\nvarying float regionHeight;\nvarying vec2 vTexCoord0;\nvarying vec2 vTexCoord1;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\nvoid main()\n{\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n vHeight = aPosition.w;\n vTexCoord0 = aTexCoord0.xy;\n vTexCoord1 = aTexCoord1;\n regionHeight = aTexCoord0.z;\n gl_Position = pos;\n v_positionMC = vec4(aPosition.xyz, 1.0);\n v_positionEC = (czm_modelView * vec4(aPosition.xyz, 1.0)).xyz;\n}",_0x4ed76e=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3a0c94=_0x4ed76e(void 0,(function(){return _0x3a0c94.toString().search("(((.+)+)+)+$").toString().constructor(_0x3a0c94).search("(((.+)+)+)+$")}));_0x3a0c94();var Z$m="uniform sampler2D uColorTexture;\nuniform sampler2D uRasterTexture;\nuniform float uExtractHeight;\nvarying float vHeight;\nvarying vec2 vTexCoord0;\nvarying vec2 vTexCoord1;\nvarying float regionHeight;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\n#ifdef NormalTexture\n uniform sampler2D uNormalTexture;\n#endif\nvec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\nvec4 SRGBtoLINEAR4(vec4 srgbIn)\n{\n srgbIn = srgbIn;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n vec3 LINEARtoSRGB(vec3 linearIn)\n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n}\nconst float M_PI = 3.141592653589793;\nvec3 lambertianDiffuse(vec3 diffuseColor) \n{\n return diffuseColor / M_PI;\n}\nvec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH) \n{\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\nfloat smithVisibilityG1(float NdotV, float roughness) \n{\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n}\nfloat smithVisibilityGGX(float roughness, float NdotL, float NdotV) \n{\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n}\nfloat GGX(float roughness, float NdotH) \n{\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n}\nvec3 applyTonemapping(vec3 linearIn) \n{\n#ifndef HDR\n return czm_acesTonemapping(linearIn);\n#else\n return linearIn;\n#endif\n}\nvoid main()\n{\n float terrainHeight = czm_unpackValue(texture2D(uRasterTexture, vTexCoord0));\n if(terrainHeight < -10000.0 || terrainHeight > 20000.0){\n terrainHeight = 0.0;\n }\n if (vHeight > terrainHeight || vHeight < regionHeight) { \n discard;\n }\n#ifdef IsExtract\n if (vHeight < uExtractHeight) { \n discard;\n }\n#endif\n vec4 baseColorWithAlpha = texture2D(uColorTexture, vTexCoord1);\n baseColorWithAlpha = SRGBtoLINEAR4(baseColorWithAlpha);\n vec3 ng = normalize(czm_normal * czm_computeNormal(v_positionMC.xyz));\n#ifdef NormalTexture\n vec3 pos_dx = dFdx(v_positionEC);\n vec3 pos_dy = dFdy(v_positionEC);\n vec3 tex_dx = dFdx(vec3(vTexCoord1.xy, 0.0));\n vec3 tex_dy = dFdy(vec3(vTexCoord1.xy, 0.0));\n vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n t = normalize(t - ng * dot(ng, t));\n vec3 b = normalize(cross(ng, t));\n mat3 tbn = mat3(t, b, ng);\n vec3 n = texture2D(uNormalTexture, vTexCoord1.xy).rgb;\n n = normalize(tbn * (2.0 * n - 1.0));\n#else\n vec3 n = ng;\n#endif\n if(gl_FrontFacing)\n {\n n = -n;\n }\n vec3 baseColor = baseColorWithAlpha.rgb;\n float roughness = 1.0;\n float metalness = 0.0;\n vec3 v = -normalize(v_positionEC);\n vec3 lightColorHdr = vec3(5.0);\n vec3 l = normalize(czm_lightDirectionEC);\n vec3 h = normalize(v + l);\n float NdotL = clamp(dot(n, l), 0.001, 1.0);\n float NdotV = abs(dot(n, v)) + 0.001;\n float NdotH = clamp(dot(n, h), 0.0, 1.0);\n float LdotH = clamp(dot(l, h), 0.0, 1.0);\n float VdotH = clamp(dot(v, h), 0.0, 1.0);\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n vec3 specularColor = mix(f0, baseColor, metalness);\n float alpha = roughness * roughness;\n float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n vec3 r90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\n vec3 r0 = specularColor.rgb;\n vec3 F = fresnelSchlick2(r0, r90, VdotH);\n float G = smithVisibilityGGX(alpha, NdotL, NdotV);\n float D = GGX(alpha, NdotH);\n vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n vec3 specularContribution = F * G * D / (4.0 * NdotL * NdotV);\n vec3 color = NdotL * lightColorHdr * (diffuseContribution + specularContribution);\n vec3 positionWC = vec3(czm_inverseView * vec4(v_positionEC, 1.0));\n vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n float vertexRadius = length(positionWC);\n float horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\n float reflectionDotNadir = dot(r, normalize(positionWC));\n r.x = -r.x;\n r = -normalize(czm_temeToPseudoFixed * r);\n r.x = -r.x;\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n float atmosphereHeight = 0.05;\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * l), normalize(positionWC * -1.0)), 0.001, 1.0);\n float S = acos(LdotZenith);\n float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n float gamma = acos(NdotL);\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(NdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n float luminance = 0.2 * (numerator / denominator);\n vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n vec3 IBLColor = (diffuseIrradiance * diffuseColor * 1.0) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * 1.0);\n float maximumComponent = max(max(lightColorHdr.x, lightColorHdr.y), lightColorHdr.z);\n vec3 lightColor = lightColorHdr / max(maximumComponent, 1.0);\n IBLColor *= lightColor;\n color += IBLColor * luminance;\n color = applyTonemapping(color);\n color = LINEARtoSRGB(color);\n gl_FragColor = vec4(color, 1.0);\n}",E$q={RGBA4:de$x.RGBA4,RGBA:de$x.RGBA,RGB5_A1:de$x.RGB5_A1,RGB565:de$x.RGB565,DEPTH_COMPONENT16:de$x.DEPTH_COMPONENT16,DEPTH_COMPONENT24:de$x.DEPTH_COMPONENT24,STENCIL_INDEX8:de$x.STENCIL_INDEX8,DEPTH_STENCIL:de$x.DEPTH_STENCIL,validate:function(e){return e===E$q.RGBA4||e===E$q.RGBA||e===E$q.RGB5_A1||e===E$q.RGB565||e===E$q.DEPTH_COMPONENT16||e===E$q.DEPTH_COMPONENT24||e===E$q.STENCIL_INDEX8||e===E$q.DEPTH_STENCIL}},E$r=Object.freeze(E$q);function h$q(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),n$1e.defined("options.context",e.context);var t=e.context,i=t._gl,n=e$1y.maximumRenderbufferSize,r=e$1Y(e.format,E$r.RGBA4),o=e$1Y(e.pixelDatatype,v$Z.UNSIGNED_BYTE),a=t$$(e.width)?e.width:i.drawingBufferWidth,s=t$$(e.height)?e.height:i.drawingBufferHeight,l=!1,u=e$1Y(e.samples,0);u>0&&t.webgl2&&(l=!0);var c=N$l(t,r,o);if(!E$r.validate(r))throw new t$_("Invalid format.");if(n$1e.typeOf.number.greaterThan("width",a,0),a>n)throw new t$_("Width must be less than or equal to the maximum renderbuffer size ("+n+"). Check maximumRenderbufferSize.");if(n$1e.typeOf.number.greaterThan("height",s,0),s>n)throw new t$_("Height must be less than or equal to the maximum renderbuffer size ("+n+"). Check maximumRenderbufferSize.");this._gl=i,this._format=r,this._width=a,this._height=s,this._renderbuffer=this._gl.createRenderbuffer(),i.bindRenderbuffer(i.RENDERBUFFER,this._renderbuffer),l?i.renderbufferStorageMultisample(i.RENDERBUFFER,u,c,a,s):i.renderbufferStorage(i.RENDERBUFFER,c,a,s),i.bindRenderbuffer(i.RENDERBUFFER,null)}function N$l(e,t,i){if(!e.webgl2)return t;var n=t;return t===de$x.RED&&(i===de$x.FLOAT&&(n=de$x.R32F),i===de$x.HALF_FLOAT&&(n=de$x.R16F),i===de$x.UNSIGNED_BYTE&&(n=de$x.R8)),t===de$x.RGB&&(i===de$x.FLOAT&&(n=de$x.RGB32F),i===de$x.HALF_FLOAT&&(n=de$x.RGB16F),i===de$x.UNSIGNED_BYTE&&(n=de$x.RGB8)),t===de$x.RGBA&&(i===de$x.FLOAT&&(n=de$x.RGBA32F),i===de$x.HALF_FLOAT&&(n=de$x.RGBA16F),i===de$x.UNSIGNED_BYTE&&(n=de$x.RGBA8)),n===de$x.R16F||n===de$x.R32F||n===de$x.RGBA16F||n===de$x.RGBA32F?e.colorBufferFloat:(n===de$x.RGB16F||n===de$x.RGB32F)&&console.warn("WebGLRenderer: Floating point textures with RGB format not supported. Please use RGBA instead."),n===de$x.DEPTH_STENCIL?n=de$x.DEPTH24_STENCIL8:n===de$x.DEPTH_COMPONENT&&(i===de$x.UNSIGNED_SHORT?n=de$x.DEPTH_COMPONENT16:i===de$x.UNSIGNED_INT&&(n=de$x.DEPTH_COMPONENT24)),n}function h$p(e){var t=new t$l(e);t.blendingEnabled=!0,t.viewport=new n$13,this._context=e,this._pixelDatatype=v$Z.UNSIGNED_BYTE,this._fb=new u$F({context:e,colorTextures:[new P$S({context:e,width:1,height:1})],depthStencilRenderbuffer:new h$q({context:e,format:E$r.DEPTH_STENCIL})}),this._passState=t,this.mrtSupport=e.drawBuffers&&e.colorBufferFloat&&e.depthTexture,this.mrt=!1,this._mrt=!1,this._width=1,this._height=1,this._clearCommand=new r$M({color:new e$1z(0,0,0,0),stencil:0,depth:1}),this._clearCommand.framebuffer=this._fb}function t$i(e){this._renderTexture=new h$p(e),this._context=e,this._isUpdate=!0,this._beginFunc=void 0,this._endFunc=void 0,this._useColor=!0,this._useHeight=!0,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!1,isUnderGlobeVisible:!1,isOnlyS3MObjectVisible:!1};var t=e._gl,i=t$$(e._currentFramebuffer)?e._currentFramebuffer._framebuffer:null;t.bindFramebuffer(t.FRAMEBUFFER,i)}Object.defineProperties(h$q.prototype,{format:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}}),h$q.prototype._getRenderbuffer=function(){return this._renderbuffer},h$q.prototype.isDestroyed=function(){return!1},h$q.prototype.destroy=function(){return this._gl.deleteRenderbuffer(this._renderbuffer),s$1e(this)},h$p.prototype.update=function(e){var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight,r=de$x.FRAMEBUFFER_COMPLETE;if(!t$$(this._fb)||this._width!==i||this._height!==n||this.mrt!==this._mrt){this._width=i,this._height=n,this._fb=this._fb&&this._fb.destroy();var o=[new P$S({context:t,width:i,height:n,pixelDatatype:this._pixelDatatype,sampler:new a$Q({minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST})})];this.mrt!==this._mrt&&this.mrt&&this.mrtSupport&&o.push(new P$S({context:t,width:i,height:n,pixelDatatype:this._pixelDatatype,sampler:new a$Q({minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST})})),this._fb=new u$F({context:t,colorTextures:o,depthStencilRenderbuffer:new h$q({context:t,format:E$r.DEPTH_STENCIL})}),this._clearCommand.framebuffer=this._fb,this._passState.framebuffer=this._fb,this._mrt=this.mrt,this._fb.status!==r&&(this._fb=this._fb&&this._fb.destroy())}this._clearCommand.execute(t,this._passState)},h$p.prototype.destroy=function(){return this._fb=this._fb&&this._fb.destroy(),s$1e(this)},Object.defineProperties(t$i.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},useType:{get:function(){return this._useHeight<<2|this._useColor<<1|this._isDepth},set:function(e){this._useHeight=(4&e)>0?1:0,this._useColor=(2&e)>0?1:0,this._isDepth=1&e}},frameBufferType:{get:function(){return B$y.RASTER}}}),t$i.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this._beginFunc&&this._beginFunc(e),this._renderTexture._passState},t$i.prototype.end=function(e){this._endFunc&&this._endFunc(e)},t$i.prototype.update=function(e,t){},t$i.prototype.isDestroyed=function(){return!1},t$i.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),s$1e(this)};var pe$b="attribute vec4 position;\nattribute vec2 textureCoordinates;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\ngl_Position = position;\nv_textureCoordinates = textureCoordinates;\n}\n",Ki$1="uniform sampler2D u_LineTexture;\nuniform float u_texelOffset;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 maxValues = vec4(0.0);\nfloat halfCoreSize = float(CORESIZE) / 2.0;\nfor(int y = 0; y < CORESIZE; y++){\nfor(int x = 0; x < CORESIZE; x++){\nfloat offsetX = (-halfCoreSize + float(x)) * u_texelOffset;\nfloat offsetY = (-halfCoreSize + float(y)) * u_texelOffset;\nvec2 realTexCoord = v_textureCoordinates + vec2(offsetX, offsetY);\nif(realTexCoord.x > 1.0 || realTexCoord.x < 0.0 || realTexCoord.y > 1.0 || realTexCoord.y < 0.0){\ncontinue;\n}\nvec4 color = texture2D(u_LineTexture, realTexCoord);\nmaxValues = max(maxValues, color);\n}\n}\nif(maxValues.a < 0.01){\ndiscard;\n}\ngl_FragColor = maxValues;\n}\n",Zi$2="varying vec2 v_textureCoordinates;\nuniform sampler2D colorTexture;\nconst float fxaaQualitySubpix = 0.5;\nconst float fxaaQualityEdgeThreshold = 0.125;\nconst float fxaaQualityEdgeThresholdMin = 0.0833;\nvoid main()\n{\nvec2 fxaaQualityRcpFrame = vec2(1.0) / czm_viewport.zw;\nvec4 color = FxaaPixelShader(\nv_textureCoordinates,\ncolorTexture,\nfxaaQualityRcpFrame,\nfxaaQualitySubpix,\nfxaaQualityEdgeThreshold,\nfxaaQualityEdgeThresholdMin);\nfloat alpha = texture2D(colorTexture, v_textureCoordinates).a;\ngl_FragColor = vec4(color.rgb, alpha);\n}\n",j$h="#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 FXAA_QUALITY_P7 2.0\n#define FXAA_QUALITY_P8 2.0\n#define FXAA_QUALITY_P9 2.0\n#define FXAA_QUALITY_P10 4.0\n#define FXAA_QUALITY_P11 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 39)\n#define FXAA_QUALITY_PS 12\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.0\n#define FXAA_QUALITY_P2 1.0\n#define FXAA_QUALITY_P3 1.0\n#define FXAA_QUALITY_P4 1.0\n#define FXAA_QUALITY_P5 1.5\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 2.0\n#define FXAA_QUALITY_P10 4.0\n#define FXAA_QUALITY_P11 8.0\n#endif\n#define FxaaBool bool\n#define FxaaFloat float\n#define FxaaFloat2 vec2\n#define FxaaFloat3 vec3\n#define FxaaFloat4 vec4\n#define FxaaHalf float\n#define FxaaHalf2 vec2\n#define FxaaHalf3 vec3\n#define FxaaHalf4 vec4\n#define FxaaInt2 vec2\n#define FxaaTex sampler2D\n#define FxaaSat(x) clamp(x, 0.0, 1.0)\n#define FxaaTexTop(t, p) texture2D(t, p)\n#define FxaaTexOff(t, p, o, r) texture2D(t, p + (o * r))\nFxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; }\nFxaaFloat4 FxaaPixelShader(\nFxaaFloat2 pos,\nFxaaTex tex,\nFxaaFloat2 fxaaQualityRcpFrame,\nFxaaFloat fxaaQualitySubpix,\nFxaaFloat fxaaQualityEdgeThreshold,\nFxaaFloat fxaaQualityEdgeThresholdMin\n) {\nFxaaFloat2 posM;\nposM.x = pos.x;\nposM.y = pos.y;\nFxaaFloat4 rgbyM = FxaaTexTop(tex, posM);\n#define lumaM rgbyM.y\nFxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0, 1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 0), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0,-1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 0), fxaaQualityRcpFrame.xy));\nFxaaFloat maxSM = max(lumaS, lumaM);\nFxaaFloat minSM = min(lumaS, lumaM);\nFxaaFloat maxESM = max(lumaE, maxSM);\nFxaaFloat minESM = min(lumaE, minSM);\nFxaaFloat maxWN = max(lumaN, lumaW);\nFxaaFloat minWN = min(lumaN, lumaW);\nFxaaFloat rangeMax = max(maxWN, maxESM);\nFxaaFloat rangeMin = min(minWN, minESM);\nFxaaFloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;\nFxaaFloat range = rangeMax - rangeMin;\nFxaaFloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);\nFxaaBool earlyExit = range < rangeMaxClamped;\nif(earlyExit)\nreturn rgbyM;\nFxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1,-1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1,-1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaNS = lumaN + lumaS;\nFxaaFloat lumaWE = lumaW + lumaE;\nFxaaFloat subpixRcpRange = 1.0/range;\nFxaaFloat subpixNSWE = lumaNS + lumaWE;\nFxaaFloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;\nFxaaFloat edgeVert1 = (-2.0 * lumaM) + lumaWE;\nFxaaFloat lumaNESE = lumaNE + lumaSE;\nFxaaFloat lumaNWNE = lumaNW + lumaNE;\nFxaaFloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;\nFxaaFloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;\nFxaaFloat lumaNWSW = lumaNW + lumaSW;\nFxaaFloat lumaSWSE = lumaSW + lumaSE;\nFxaaFloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);\nFxaaFloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);\nFxaaFloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;\nFxaaFloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;\nFxaaFloat edgeHorz = abs(edgeHorz3) + edgeHorz4;\nFxaaFloat edgeVert = abs(edgeVert3) + edgeVert4;\nFxaaFloat subpixNWSWNESE = lumaNWSW + lumaNESE;\nFxaaFloat lengthSign = fxaaQualityRcpFrame.x;\nFxaaBool horzSpan = edgeHorz >= edgeVert;\nFxaaFloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;\nif(!horzSpan) lumaN = lumaW;\nif(!horzSpan) lumaS = lumaE;\nif(horzSpan) lengthSign = fxaaQualityRcpFrame.y;\nFxaaFloat subpixB = (subpixA * (1.0/12.0)) - lumaM;\nFxaaFloat gradientN = lumaN - lumaM;\nFxaaFloat gradientS = lumaS - lumaM;\nFxaaFloat lumaNN = lumaN + lumaM;\nFxaaFloat lumaSS = lumaS + lumaM;\nFxaaBool pairN = abs(gradientN) >= abs(gradientS);\nFxaaFloat gradient = max(abs(gradientN), abs(gradientS));\nif(pairN) lengthSign = -lengthSign;\nFxaaFloat subpixC = FxaaSat(abs(subpixB) * subpixRcpRange);\nFxaaFloat2 posB;\nposB.x = posM.x;\nposB.y = posM.y;\nFxaaFloat2 offNP;\noffNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;\noffNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;\nif(!horzSpan) posB.x += lengthSign * 0.5;\nif( horzSpan) posB.y += lengthSign * 0.5;\nFxaaFloat2 posN;\nposN.x = posB.x - offNP.x * FXAA_QUALITY_P0;\nposN.y = posB.y - offNP.y * FXAA_QUALITY_P0;\nFxaaFloat2 posP;\nposP.x = posB.x + offNP.x * FXAA_QUALITY_P0;\nposP.y = posB.y + offNP.y * FXAA_QUALITY_P0;\nFxaaFloat subpixD = ((-2.0)*subpixC) + 3.0;\nFxaaFloat lumaEndN = FxaaLuma(FxaaTexTop(tex, posN));\nFxaaFloat subpixE = subpixC * subpixC;\nFxaaFloat lumaEndP = FxaaLuma(FxaaTexTop(tex, posP));\nif(!pairN) lumaNN = lumaSS;\nFxaaFloat gradientScaled = gradient * 1.0/4.0;\nFxaaFloat lumaMM = lumaM - lumaNN * 0.5;\nFxaaFloat subpixF = subpixD * subpixE;\nFxaaBool lumaMLTZero = lumaMM < 0.0;\nlumaEndN -= lumaNN * 0.5;\nlumaEndP -= lumaNN * 0.5;\nFxaaBool doneN = abs(lumaEndN) >= gradientScaled;\nFxaaBool doneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P1;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P1;\nFxaaBool doneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P1;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P1;\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P2;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P2;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P2;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P2;\n#if (FXAA_QUALITY_PS > 3)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P3;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P3;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P3;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P3;\n#if (FXAA_QUALITY_PS > 4)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P4;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P4;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P4;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P4;\n#if (FXAA_QUALITY_PS > 5)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P5;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P5;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P5;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P5;\n#if (FXAA_QUALITY_PS > 6)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P6;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P6;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P6;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P6;\n#if (FXAA_QUALITY_PS > 7)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P7;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P7;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P7;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P7;\n#if (FXAA_QUALITY_PS > 8)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P8;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P8;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P8;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P8;\n#if (FXAA_QUALITY_PS > 9)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P9;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P9;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P9;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P9;\n#if (FXAA_QUALITY_PS > 10)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P10;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P10;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P10;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P10;\n#if (FXAA_QUALITY_PS > 11)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P11;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P11;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P11;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P11;\n#if (FXAA_QUALITY_PS > 12)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P12;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P12;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P12;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P12;\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\nFxaaFloat dstN = posM.x - posN.x;\nFxaaFloat dstP = posP.x - posM.x;\nif(!horzSpan) dstN = posM.y - posN.y;\nif(!horzSpan) dstP = posP.y - posM.y;\nFxaaBool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;\nFxaaFloat spanLength = (dstP + dstN);\nFxaaBool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;\nFxaaFloat spanLengthRcp = 1.0/spanLength;\nFxaaBool directionN = dstN < dstP;\nFxaaFloat dst = min(dstN, dstP);\nFxaaBool goodSpan = directionN ? goodSpanN : goodSpanP;\nFxaaFloat subpixG = subpixF * subpixF;\nFxaaFloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;\nFxaaFloat subpixH = subpixG * fxaaQualitySubpix;\nFxaaFloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;\nFxaaFloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);\nif(!horzSpan) posM.x += pixelOffsetSubpix * lengthSign;\nif( horzSpan) posM.y += pixelOffsetSubpix * lengthSign;\nreturn FxaaFloat4(FxaaTexTop(tex, posM).xyz, lumaM);\n}\n",I$q={FAILED:0,UNLOADED:1,RECEIVING:2,UNZIP:3,UNZIPING:4,RECEIVED:5,TRANSFORMING:6,TRANSFORMED:7,READY:8,INVALID:9},Ie$c=Object.freeze(I$q),D$u={NONE:0,CULLED:1,RENDERED:2,REFINED:3,RENDERED_AND_KICKED:6,REFINED_AND_KICKED:7,CULLED_BUT_NEEDED:9,wasKicked:function(e){return e>=D$u.RENDERED_AND_KICKED},originalResult:function(e){return 3&e},kick:function(e){return 4|e}},I$p=32767,U$m=I$p/2|0,ie$d=new a$11,rt$7=new a$11,nt$7=new a$11,s$l=new i$1g,Ke$4=new r$T,ot$7=[],Oe$c=[],at$5=[],ht$5=[],st$4=[],dt$6=[],ut$5=[],lt$7=new a$11,gt$4=new c$19,ct$6=new b$1o,ft$4=new r$T;function Ne$8(){}function pt$5(e){var t,i=e.length,n=0;for(t=0;t<i;t++){n+=(s=e[t]).indices.length}var r=new Uint16Array(n),o=0,a=0;for(t=0;t<i;t++){for(var s,l=(s=e[t]).indices.length,u=0;u<l;u++)r[o+u]=s.indices[u]+a;o+=l,a+=s.attributes.position.values.length/3}return r}function Ve$a(e,t){var i;return"function"==typeof e.slice&&("function"!=typeof(i=e.slice()).sort&&(i=void 0)),t$$(i)||(i=Array.prototype.slice.call(e)),i.sort(t),i}function be$g(e,t,i,n,r,o,a,s,l,u,c){var h=s.north,d=s.south,f=s.east,p=s.west;f<p&&(f+=n$1d.TWO_PI);for(var _=i.length,m=0;m<_;++m){var $=i[m],g=r[$],y=o[$];s$l.longitude=n$1d.lerp(p,f,y.x)+u,s$l.latitude=n$1d.lerp(d,h,y.y)+c,s$l.height=g-l;var v=a.cartographicToCartesian(s$l,ie$d);t=n.encode(e,t,v,y,s$l.height,Ke$4,0)}}function x$s(){this.vertexBuffer=void 0,this.index=void 0,this.first=void 0,this.second=void 0,this.ratio=void 0}x$s.prototype.clone=function(e){return t$$(e)||(e=new x$s),e.uBuffer=this.uBuffer,e.vBuffer=this.vBuffer,e.heightBuffer=this.heightBuffer,e.index=this.index,e.first=this.first,e.second=this.second,e.ratio=this.ratio,e},x$s.prototype.initializeIndexed=function(e,t,i,n){this.uBuffer=e,this.vBuffer=t,this.heightBuffer=i,this.index=n,this.first=void 0,this.second=void 0,this.ratio=void 0},x$s.prototype.initializeFromClipResult=function(e,t,i){var n=t+1;return-1!==e[t]?i[e[t]].clone(this):(this.vertexBuffer=void 0,this.index=void 0,this.first=i[e[n]],++n,this.second=i[e[n]],++n,this.ratio=e[n],++n),n},x$s.prototype.getKey=function(){return this.isIndexed()?this.index:JSON.stringify({first:this.first.getKey(),second:this.second.getKey(),ratio:this.ratio})},x$s.prototype.isIndexed=function(){return t$$(this.index)},x$s.prototype.getH=function(){return t$$(this.index)?this.heightBuffer[this.index]:n$1d.lerp(this.first.getH(),this.second.getH(),this.ratio)},x$s.prototype.getU=function(){return t$$(this.index)?this.uBuffer[this.index]:n$1d.lerp(this.first.getU(),this.second.getU(),this.ratio)},x$s.prototype.getV=function(){return t$$(this.index)?this.vBuffer[this.index]:n$1d.lerp(this.first.getV(),this.second.getV(),this.ratio)};var N$k=[];function De$f(e,t,i,n,r,o,a){if(0!==o.length){for(var s=0,l=0;l<o.length;)l=N$k[s++].initializeFromClipResult(o,l,a);for(var u=0;u<s;++u){var c=N$k[u];if(c.isIndexed())c.newIndex=r[c.index],c.uBuffer=e,c.vBuffer=t,c.heightBuffer=i;else{var h=c.getKey();if(t$$(r[h]))c.newIndex=r[h];else{var d=e.length;e.push(c.getU()),t.push(c.getV()),i.push(c.getH()),c.newIndex=d,r[h]=d}}}3===s?(n.push(N$k[0].newIndex),n.push(N$k[1].newIndex),n.push(N$k[2].newIndex)):4===s&&(n.push(N$k[0].newIndex),n.push(N$k[1].newIndex),n.push(N$k[2].newIndex),n.push(N$k[0].newIndex),n.push(N$k[2].newIndex),n.push(N$k[3].newIndex))}}N$k.push(new x$s),N$k.push(new x$s),N$k.push(new x$s),N$k.push(new x$s),Ne$8.createTerrainMesh=function(e,t){var i=e.tilingScheme.ellipsoid,n=e.rectangle,r=t._quantizedVertices,o=r.length/3,a=t._westIndices.length+t._eastIndices.length+t._southIndices.length+t._northIndices.length,s=n.west,l=n.south,u=n.east,c=n.north,h=1*t._minimumHeight,d=1*t._maximumHeight,f=e$1H.geodeticLatitudeToMercatorAngle(l),p=1/(e$1H.geodeticLatitudeToMercatorAngle(c)-f),_=t._boundingSphere.center,m=r.subarray(0,o),$=r.subarray(o,2*o),g=r.subarray(2*o,3*o),y=new Array(o),v=new Array(o),x=new Array(o),b=new Array(o),S=rt$7;S.x=Number.POSITIVE_INFINITY,S.y=Number.POSITIVE_INFINITY,S.z=Number.POSITIVE_INFINITY;var w=nt$7;w.x=Number.NEGATIVE_INFINITY,w.y=Number.NEGATIVE_INFINITY,w.z=Number.NEGATIVE_INFINITY;for(var C=Number.POSITIVE_INFINITY,T=Number.NEGATIVE_INFINITY,P=Number.POSITIVE_INFINITY,E=Number.NEGATIVE_INFINITY,A=0;A<o;++A){var L,M;if(t.wasCreatedByUpsampling()){var I=m[A],O=$[A];L=I/I$p,M=O/I$p,s$l.longitude=n$1d.lerp(s,u,L),s$l.latitude=n$1d.lerp(l,c,M),s$l.height=g[A]}else s$l.longitude=m[A],s$l.latitude=$[A],s$l.height=g[A],L=(s$l.longitude-s)/n.width,M=(s$l.latitude-l)/n.height;C=Math.min(s$l.longitude,C),T=Math.max(s$l.longitude,T),P=Math.min(s$l.latitude,P),E=Math.max(s$l.latitude,E);var D=i.cartographicToCartesian(s$l);y[A]=new r$T(L,M),v[A]=s$l.height,x[A]=D,b[A]=(e$1H.geodeticLatitudeToMercatorAngle(s$l.latitude)-f)*p}var R,N,F=Ve$a(t._westIndices,(function(e,t){return y[e].y-y[t].y})),B=Ve$a(t._eastIndices,(function(e,t){return y[t].y-y[e].y})),z=Ve$a(t._southIndices,(function(e,t){return y[t].x-y[e].x})),G=Ve$a(t._northIndices,(function(e,t){return y[e].x-y[t].x}));N=c$19.fromPoints(x),R=b$1o.fromRectangle(n,h,d,i),_=a$11.clone(N.center);var k=m$13.eastNorthUpToFixedFrame(_,i),U=c$1a.inverseTransformation(k,new c$1a);for(A=0;A<o;A++){D=x[A];c$1a.multiplyByPoint(U,D,ie$d),a$11.minimumByComponent(ie$d,S,S),a$11.maximumByComponent(ie$d,w,w)}for(var V=new u$13(new e$1N(S,w,_),h,d,k,!1,!0),W=V.getStride(),H=new Float32Array(o*W+a*W),Y=0,j=0;j<o;++j)Y=V.encode(H,Y,x[j],y[j],v[j],Ke$4,b[j]);var q=Math.max(0,2*(a-4)),X=t._indices.length+3*q,K=fe$u.createTypedArray(o+a,X);K.set(t._indices,0);var Z=1e-4,J=(T-C)*Z,Q=(E-P)*Z,ee=-J,te=J,ie=Q,ne=-Q,re=o*W;be$g(H,re,F,V,v,y,i,n,t._westSkirtHeight,ee,0),be$g(H,re+=t._westIndices.length*W,z,V,v,y,i,n,t._southSkirtHeight,0,ne),be$g(H,re+=t._southIndices.length*W,B,V,v,y,i,n,t._eastSkirtHeight,te,0),be$g(H,re+=t._eastIndices.length*W,G,V,v,y,i,n,t._northSkirtHeight,0,ie),d$11.addSkirtIndices(F,z,B,G,o,K,t._indices.length,void 0);var oe=t._quantizedVertices.length/3,ae=oe+t._westIndices.length+t._southIndices.length+t._eastIndices.length+t._northIndices.length,se=fe$u.createTypedArray(ae,K.buffer),le=0===se.length;return t._mesh=new B$R(_,H,se,t._indices.length,oe,h,d,N,void 0,W,R,V,1,F,z,B,G,le),t._quantizedVertices=void 0,t._encodedNormals=void 0,t._indices=void 0,t._uValues=void 0,t._vValues=void 0,t._heightValues=void 0,t._westIndices=void 0,t._southIndices=void 0,t._eastIndices=void 0,t._northIndices=void 0,t._mesh},Ne$8.upsampleTerrainData=function(e){var t=e.parent;if(t$$(t)&&t$$(t.data)&&t$$(t.data.modifyTerrainData)){var i=t.data.modifyTerrainData,n=t.x,r=t.y;t.level;var o=i._mesh;if(t$$(o)){var a=2*n!==e.x,s=2*r===e.y,l=e.tilingScheme,u=l.ellipsoid,c=l.tileXYToRectangle(e.x,e.y,e.level),h=a?U$m:0,d=a?I$p:U$m,f=s?U$m:0,p=s?I$p:U$m,_=ht$5,m=st$4,$=dt$6;_.length=0,m.length=0,$.length=0;var g=ut$5;g.length=0;var y={},v=o.vertices,x=o.indices;x=x.subarray(0,o.indexCountWithoutSkirts);var b=o.encoding,S=o.exaggeration,w=0,C=o.vertexCountWithoutSkirts;i._minimumHeight,i._maximumHeight;var T,P,E,A,L,M=new Array(C),I=new Array(C),O=new Array(C);for(P=0,E=0;P<C;++P,E+=2){var D=b.decodeTextureCoordinates(v,P,ft$4);T=b.decodeHeight(v,P)/S,A=n$1d.clamp(D.x*I$p|0,0,I$p),L=n$1d.clamp(D.y*I$p|0,0,I$p),O[P]=T,A<20&&(A=0),L<20&&(L=0),I$p-A<20&&(A=I$p),I$p-L<20&&(L=I$p),M[P]=A,I[P]=L,(a&&A>=U$m||!a&&A<=U$m)&&(s&&L>=U$m||!s&&L<=U$m)&&(y[P]=w,_.push(A),m.push(L),$.push(O[P]),++w)}var R=[];R.push(new x$s),R.push(new x$s),R.push(new x$s);var N,F=[];for(F.push(new x$s),F.push(new x$s),F.push(new x$s),P=0;P<x.length;P+=3){var B=x[P],z=x[P+1],G=x[P+2],k=M[B],U=M[z],V=M[G];R[0].initializeIndexed(M,I,O,B),R[1].initializeIndexed(M,I,O,z),R[2].initializeIndexed(M,I,O,G);var W=c$W.clipTriangleAtAxisAlignedThreshold(U$m,a,k,U,V,ot$7);!((N=0)>=W.length)&&(!((N=F[0].initializeFromClipResult(W,N,R))>=W.length)&&(!((N=F[1].initializeFromClipResult(W,N,R))>=W.length)&&(N=F[2].initializeFromClipResult(W,N,R),De$f(_,m,$,g,y,c$W.clipTriangleAtAxisAlignedThreshold(U$m,s,F[0].getV(),F[1].getV(),F[2].getV(),Oe$c),F),N<W.length&&(F[2].clone(F[1]),F[2].initializeFromClipResult(W,N,R),De$f(_,m,$,g,y,c$W.clipTriangleAtAxisAlignedThreshold(U$m,s,F[0].getV(),F[1].getV(),F[2].getV(),Oe$c),F)))))}var H=a?-I$p:0,Y=s?-I$p:0,j=[],q=[],X=[],K=[],Z=Number.MAX_VALUE,J=-Z,Q=at$5;Q.length=0;var ee=c,te=ee.north,ie=ee.south,ne=ee.east,re=ee.west;for(ne<re&&(ne+=n$1d.TWO_PI),P=0;P<_.length;++P)(A=Math.round(_[P]))<=h?(j.push(P),A=0):A>=d?(X.push(P),A=I$p):A=2*A+H,_[P]=A,(L=Math.round(m[P]))<=f?(q.push(P),L=0):L>=p?(K.push(P),L=I$p):L=2*L+Y,m[P]=L,(T=$[P])<Z&&(Z=T),T>J&&(J=T),$[P]=T,s$l.longitude=n$1d.lerp(re,ne,A/I$p),s$l.latitude=n$1d.lerp(ie,te,L/I$p),s$l.height=T,u.cartographicToCartesian(s$l,ie$d),Q.push(ie$d.x),Q.push(ie$d.y),Q.push(ie$d.z);var oe=c$19.fromVertices(Q,a$11.ZERO,3,gt$4),ae=b$1o.fromRectangle(ee,Z,J,u,ct$6),se=new c$15(u).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(oe.center,Q,3,oe.center,Z,lt$7),le=new Float64Array(_.length+m.length+$.length);for(P=0;P<_.length;++P)le[P]=_[P];var ue=_.length;for(P=0;P<m.length;++P)le[ue+P]=m[P];for(ue+=m.length,P=0;P<$.length;++P)le[ue+P]=$[P];var ce=fe$u.createTypedArray(_.length,g),he=new Float64Array(le.buffer),de=fe$u.createTypedArray(he.length/3,ce.buffer),fe=Math.min(i._westSkirtHeight,i._eastSkirtHeight);fe=Math.min(fe,i._southSkirtHeight),fe=Math.min(fe,i._northSkirtHeight);var pe=i._credits;if(0!==he.length)return new k$11({quantizedVertices:he,indices:de,minimumHeight:Z,maximumHeight:J,boundingSphere:oe,orientedBoundingBox:ae,horizonOcclusionPoint:se,westIndices:j,southIndices:q,eastIndices:X,northIndices:K,westSkirtHeight:100,southSkirtHeight:100,eastSkirtHeight:100,northSkirtHeight:100,childTileMask:0,credits:pe,createdByUpsampling:!0})}}},Ne$8.createTerrainData=function(e,t,i,n,r){var o=t.length;if(!(o<1)){e.data,e.rectangle;for(var a=[],s=0;s<o;s++){var l=t[s].attributes;a=a.concat(a$11.unpackArray(l.position.values))}var u=a.length,c=new Float64Array(3*u);for(s=0;s<u;s++){var h=a[s];i$1g.fromCartesian(h,void 0,s$l);var d=s$l.height;if(t$$(r)){var f=It$4(e,s$l);d=r+(f>0?f:0)}c[s]=s$l.longitude,c[u+s]=s$l.latitude,c[2*u+s]=d}return new k$11({quantizedVertices:c,indices:o>1?pt$5(t):t[0].indices,encodedNormals:void 0,minimumHeight:i,maximumHeight:n,boundingSphere:new c$19,orientedBoundingBox:new b$1o,horizonOcclusionPoint:new a$11,westIndices:[],southIndices:[],eastIndices:[],northIndices:[],westSkirtHeight:0,southSkirtHeight:0,eastSkirtHeight:0,northSkirtHeight:0,childTileMask:0,credits:void 0,createdByUpsampling:!1})}};var mt$4=new a$11,qe$7=new a$11,vt$4=new i$1g,wt$3=new n$18;function It$4(e,t){if(!t$$(t))throw new DeveloperError("cartographic is required");for(;e._lastSelectionResult===D$u.REFINED;)e=We$8(e.southwestChild,t)||We$8(e.southeastChild,t)||We$8(e.northwestChild,t)||e.northeastChild;if(t$$(e.data)&&t$$(e.data.renderedMesh)){var i=e.tilingScheme.ellipsoid,n=a$11.fromRadians(t.longitude,t.latitude,0,i,mt$4),r=wt$3,o=i.geodeticSurfaceNormal(n,r.direction);if(!t$$(i.getSurfaceNormalIntersectionWithZAxis(n,11500,r.origin))){var a=Math.min(defaultValue(e.data.minimumHeight,0),-11500),s=a$11.multiplyByScalar(o,Math.abs(a)+1,qe$7);a$11.subtract(n,s,r.origin)}if(t$$(e.data.terrainData)&&e.data.terrainData instanceof k$11)return e.data.terrainData.interpolateHeight(e.rectangle,t.longitude,t.latitude);var l=e.data.pick(r,void 0,void 0,!1,qe$7);if(t$$(l))return i.cartesianToCartographic(l,vt$4).height}}function We$8(e,t){return s$1p.contains(e.rectangle,t)?e:void 0}function l$j(e){this.terrainLayer=e,this.terrainData=void 0,this.vertexArray=void 0,this.terrainState=Ie$c.UNLOADED,this.mesh=void 0,this.orientedBoundingBox=void 0,this.occludeePointInScaledSpace=new a$11,this._rasterTerrainFBO=void 0,this._rasterTerrainTexture=void 0,this._rasterized=!1,this._rasterTextureSize=256}function $$j(e,t,i,n,r){function o(i){e.request=void 0,t$$(i)?"cacheError"!==i?"cacheInvalid"!==i?(e.terrainData=i,e.terrainState=Ie$c.RECEIVED,t._isTerrainZ&&0!==r&&(e.terrainState=Ie$c.UNZIP,e.zipTerrainData=i,e.terrainData=void 0)):e.terrainState=Ie$c.FAILED:s(!1):e.terrainState=Ie$c.FAILED}function a(){if(e.request.state===Y$_.CANCELLED)return e.terrainData=void 0,e.terrainState=Ie$c.UNLOADED,void(e.request=void 0);e.terrainState=Ie$c.FAILED,e.request=void 0;var o="Failed to obtain terrain tile X: "+i+" Y: "+n+" Level: "+r+".";t._requestError=c$_.handleError(t._requestError,t,t.errorEvent,o,i,n,r,s)}function s(s){var l=new r$V({throttle:!1,throttleByServer:!0,type:V$_.TERRAIN});l.cacheEnable=s,e.request=l;var u=t.requestTileGeometry(i,n,r,l);t$$(u)?(e.terrainState=Ie$c.RECEIVING,c$18(u,o,a)):(e.terrainState=Ie$c.UNLOADED,e.request=void 0)}s(!0)}function ee$d(e,t,i,n,r,o,a){var s=t.parent;if(s){var l=s.data.terrain[e.terrainLayer.terrainProvider.tablename];if(t$$(l)){var u=l.terrainData,c=s.x,h=s.y,d=s.level;if(t$$(u)){var f=u.upsample(n.tilingScheme,c,h,d,r,o,a);!t$$(f)||(e.terrainState=Ie$c.RECEIVING,c$18(f,(function(t){if(t$$(t)){var i=u.rasterVertex,n=u.rasterIndex,a=void 0,s=u.hasInvalid;if(t$$(i)){var l=new c$1a(2,0,0,0,0,2,0,0,0,0,1,0,0,0,0,1);r%c==1&&(l[12]=-32767),o%h==0&&(l[13]=-32767),t$$(u.modelMatrix)?(a=new c$1a,a=c$1a.multiply(l,u.modelMatrix,a)):a=l,t.rasterVertex=i,t.rasterIndex=n,t.modelMatrix=a,t.hasInvalid=s}e.terrainData=t,e.terrainState=Ie$c.RECEIVED}else e.terrainState=Ie$c.INVALID}),(function(){e.terrainState=Ie$c.FAILED})))}}}else t.state=QuadtreeTileLoadState.FAILED}function te$c(e,t,i,n,r){var o=t.unzip(e.zipTerrainData.buffer);t$$(o)&&(e.terrainState=Ie$c.UNZIPING,c$18(o,(function(i){if(!t$$(i))return e.terrainState=Ie$c.FAILED,e.zipTerrainData=void 0,void(e.terrainData=void 0);e.terrainState=Ie$c.RECEIVED,e.terrainData=t.createTerrainData(e.zipTerrainData,i.data.buffer,!0),e.zipTerrainData=void 0}),(function(t){e.terrainState=Ie$c.FAILED})))}function re$f(e,t,i,n,r,o){var a=i.tilingScheme,s=e.terrainData.createMesh(a,n,r,o,t.terrainExaggeration);!t$$(s)||(e.terrainState=Ie$c.TRANSFORMING,c$18(s,(function(t){e.mesh=t,e.orientedBoundingBox=b$1o.clone(t.orientedBoundingBox,e.orientedBoundingBox),e.occludeePointInScaledSpace=a$11.clone(t.occludeePointInScaledSpace,e.occludeePointInScaledSpace),e.terrainState=Ie$c.TRANSFORMED}),(function(){e.terrainState=Ie$c.FAILED})))}function B$k(){this.context=void 0,this.tileTerrain=void 0,this.mesh=void 0}l$j.prototype.freeResources=function(){this._rasterTerrainTexture=this._rasterTerrainTexture&&!this._rasterTerrainTexture.isDestroyed()&&this._rasterTerrainTexture.destroy(),this._rasterTerrainFBO=this._rasterTerrainFBO&&!this._rasterTerrainFBO.isDestroyed()&&this._rasterTerrainFBO.destroy(),this._rasterTerrainFBO=void 0},Object.defineProperties(l$j.prototype,{name:{get:function(){return this.terrainLayer.terrainProvider.tablename}}}),l$j.prototype.processStateMachine=function(e,t){var i=this.terrainLayer.terrainProvider;if(i._ready){var n=e.parent;if(t$$(n)&&t$$(n.data)){var r=n.data.terrain[i.tablename];if(t$$(r)&&this.terrainState===Ie$c.FAILED)void 0!==r.terrainData&&!1!==r.terrainData.canUpsample||r.processStateMachine(n,t)}this.terrainState===Ie$c.FAILED&&ee$d(this,e,t,i,e.x,e.y,e.level),this.terrainState===Ie$c.UNLOADED&&$$j(this,i,e.x,e.y,e.level),this.terrainState===Ie$c.UNZIP&&te$c(this,i,e.x,e.y,e.level),this.terrainState===Ie$c.RECEIVED&&re$f(this,t,i,e.x,e.y,e.level),this.terrainState===Ie$c.TRANSFORMED&&ae$f(t,this,t.context,i,e.x,e.y,e.level),this.terrainState,Ie$c.INVALID}},B$k.prototype.set=function(e,t,i,n){this.context=e,this.tileTerrain=t,this.mesh=i,this.terrainProvider=n},B$k.prototype.execute=function(){var e=this.context,t=this.mesh,i=this.tileTerrain;!1===this.terrainProvider.isShowGlobe&&t.invalid?i.vertexArray=void 0:i.vertexArray=f$t._createVertexArrayForMesh(e,t)};var C$q=new B$k;function ae$f(e,t,i,n,r,o,a){C$q.set(i,t,t.mesh,n),e.jobScheduler.execute(C$q,2)&&(t.terrainState=Ie$c.READY)}l$j.prototype.createRealtimeRasterTerrainFBO=function(e){this._rasterTerrainTexture=new P$S({context:e.context,width:this._rasterTextureSize,height:this._rasterTextureSize,pixelFormat:Z$_.RGBA,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.LINEAR,magnificationFilter:et$k.LINEAR})}),this._rasterTerrainFBO=new u$F({context:e.context,colorTextures:[this._rasterTerrainTexture],destroyAttachments:!1})};var ie$c=new n$13(0,0,256,256);function f$t(){this.terrain={},this.imagery=[],this.gridImagery=[],this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new a$10(0,0,1,1),this.terrainData=void 0,this.vertexArray=void 0,this.orientedBoundingBox=void 0,this.boundingVolumeSourceTile=void 0,this.tileBoundingRegion=void 0,this.occludeePointInScaledSpace=new a$11,this.tileTerrainOrientedBoundingBox=void 0,this.terrainState=Ie$c.UNLOADED,this.mesh=void 0,this.fill=void 0,this.pickBoundingSphere=new c$19,this.surfaceShader=void 0,this.isClipped=!0,this.clippedByBoundaries=!1,this.normalTexture=void 0,this.normalTextureTranslationAndScale=new a$10(0,0,1,1),this.modifyTerrainData=void 0,this.modifyTerrainMesh=void 0,this.modifyTerrainVertexArray=void 0,this.modifyOrientedBoundingBox=void 0,this.subDivisionMesh=void 0,this.subDivisionVertexArray=void 0,this.invalid=!1,this.invalidMesh=void 0,this.invalidOrientedBoundingBox=void 0,this.invalidOccludeePointInScaledSpace=void 0,this.invalidVertexArray=void 0,this.invalidTerrainData=void 0}function C$p(e,t,i,n,r,o){if(e.decodePosition(n,r,o),t$$(t)&&t!==b$1d.SCENE3D){var a=i.ellipsoid.cartesianToCartographic(o);i.project(a,o),a$11.fromElements(o.z,o.x,o.y,o)}return o}l$j.prototype.realtimeRasterValidTerrain=function(e,t,i){if(!(this._rasterized||i.level<2)&&t$$(this.terrainData)){this._rasterized=!0;var n=void 0,r=void 0,o=c$1a.IDENTITY;if(t$$(this.terrainData)){n=this.terrainData.rasterIndex,r=this.terrainData.rasterVertex;t$$(this.terrainData.modelMatrix)&&(o=this.terrainData.modelMatrix)}if(!t$$(r))return void(t$$(this._rasterTerrainFBO)&&(i._clearCommand.framebuffer=this._rasterTerrainFBO,i._clearCommand.execute(e.context)));t$$(this._rasterTerrainTexture)||this.createRealtimeRasterTerrainFBO(e);var a=t._rasterAAFBOs[0];i._clearCommand.framebuffer=a,i._clearCommand.execute(e.context),i._clearCommand.framebuffer=this._rasterTerrainFBO,i._clearCommand.execute(e.context);var s=i.setRasterValidTerrainCamera(i,e);if(t$$(r)){var l=u$Y.createVertexBuffer({context:e.context,typedArray:r,usage:A$13.STATIC_DRAW}),u=u$Y.createIndexBuffer({context:e.context,typedArray:n,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.fromSizeInBytes(n.BYTES_PER_ELEMENT)});u.vertexArrayDestroyable=!1,u.referenceCount=1;var c,h=[{index:0,vertexBuffer:l,componentDatatype:C$12.SHORT,componentsPerAttribute:3,offsetInBytes:0,strideInBytes:3*C$12.getSizeInBytes(C$12.SHORT)}],d=new x$18({context:e.context,attributes:h,indexBuffer:u}),f=["attribute vec4 position;","void main()","{"," gl_Position = czm_modelViewProjection * vec4(position.xy, 0.0, 1.0);","}"].join("\n"),p=["void main()","{"," gl_FragColor = czm_packValue(0.0);","}"].join("\n"),_=new a$O({sources:[f]}),m=new a$O({sources:[p]});(c=new s$1d).cull=!1,c.boundingVolume=new c$19(a$11.ZERO,65535),c.shaderProgram=p$15.fromCache({context:e.context,vertexShaderSource:_,fragmentShaderSource:m,attributeLocations:{position:0}}),c.modelMatrix=o,c.primitiveType=H$11.TRIANGLES,c.vertexArray=d,c.count=n.length,c.pass=2,c.renderState=p$1a.fromCache({viewport:ie$c}),c.framebuffer=this._rasterTerrainFBO,c.execute(e.context)}i.resetCamera(e,s)}},Object.defineProperties(f$t.prototype,{eligibleForUnloading:{get:function(){for(var e=this.terrainState,t=!(e===Ie$c.RECEIVING||e===Ie$c.TRANSFORMING),i=this.imagery,n=0,r=i.length;t&&n<r;++n){var o=i[n];t=!t$$(o.loadingImagery)||o.loadingImagery.state!==Tt$4.TRANSITIONING}return t}},renderedMesh:{get:function(){return t$$(this.subDivisionVertexArray)?this.subDivisionMesh:t$$(this.vertexArray)?this.mesh:t$$(this.fill)?this.fill.mesh:void 0}}});var ie$b=new a$11,te$b=new a$11,ae$e=new a$11;function ne$c(e,t,i,n){var r=t.getTileDataAvailable(e.x,e.y,e.level);if(!t$$(r)&&t$$(e.parent)){var o=e.parent,a=o.data;t$$(a)&&t$$(a.terrainData)&&(r=a.terrainData.isChildAvailable(o.x,o.y,e.x,e.y))}!1===r&&(e.data.terrainState=Ie$c.FAILED);for(var s=0,l=n.length;s<l;++s){var u=n.get(s);u.show&&u._createTileImagerySkeletons(e,t)}}function oe$d(e){var t=void 0;return t$$(e.parent)&&t$$(e.parent._childTileMaskExt)&&(t=e.x%e.parent.x==0?e.y%e.parent.y==0?e.parent._childTileMaskExt[0]:e.parent._childTileMaskExt[2]:e.y%e.parent.y==0?e.parent._childTileMaskExt[1]:e.parent._childTileMaskExt[3]),t}function se$b(e,t,i,n,r,o){var a=e.data,s=e.parent,l=!1;for(var u in a.terrain)a.terrain[u].processStateMachine(e,t),a.terrain[u].terrainState===Ie$c.FAILED&&(l=!0);if((a.terrainState===Ie$c.FAILED||l)&&void 0!==s)if(void 0!==s.data&&void 0!==s.data.terrainData&&!1!==s.data.terrainData.canUpsample){if(l)for(var u in s.data.terrain)(!t$$(s.data.terrain[u].terrainData)||0==s.data.terrain[u].terrainData.canUpsample)&&s.data.terrain[u].processStateMachine(s,t)}else f$t.processStateMachine(s,t,i,n,r,!0);if(a.terrainState===Ie$c.FAILED&&de$b(a,e,t,i,e.x,e.y,e.level),a.terrainState===Ie$c.UNLOADED){var c=oe$d(e);le$h(a,i,e.x,e.y,e.level,c)}if(a.terrainState===Ie$c.UNZIP&&he$9(a,i,e.x,e.y,e.level),a.terrainState===Ie$c.RECEIVED&&(t$$(a.terrainData)&&(e._childTileMaskExt=a.terrainData._childTileMaskExt),e.showInvalid&&!a.invalid&&a.setShowInvalid(),ue$9(a,t,i,e.x,e.y,e.level)),a.terrainState===Ie$c.TRANSFORMED&&ce$a(t,a,t.context,i,e.x,e.y,e.level,o),a.terrainState!==Ie$c.INVALID){var h;if(a.terrainState>=Ie$c.RECEIVED&&void 0===a.waterMaskTexture&&i.hasWaterMask)if(void 0!==a.terrainData.waterMask)ve$a(t.context,a);else t$$(h=a._findAncestorTileWithTerrainData(e))&&t$$(h.data.waterMaskTexture)&&(a.waterMaskTexture=h.data.waterMaskTexture,++a.waterMaskTexture.referenceCount,a._computeWaterMaskTranslationAndScale(e,h,a.waterMaskTranslationAndScale));if(a.terrainState>=Ie$c.RECEIVED&&void 0===a.normalTexture&&i.hasNormalBuffer)if(void 0!==a.terrainData._normalTexture)ye$e(t.context,a);else t$$(h=a._findAncestorTileWithTerrainData(e))&&t$$(h.data.normalTexture)&&(a.normalTexture=h.data.normalTexture,++a.normalTexture.referenceCount,a._computeNormalTextureTranslationAndScale(e,h,a.normalTextureTranslationAndScale))}}function de$b(e,t,i,n,r,o,a){var s=t.parent;if(s){var l=s.data.terrainData,u=s.x,c=s.y,h=s.level;if(t$$(l)){var d=l.upsample(n.tilingScheme,u,c,h,r,o,a);!t$$(d)||(e.terrainState=Ie$c.RECEIVING,c$18(d,(function(t){if(t$$(t)){e.terrainData=t;var i=s.data.invalidTerrainData;if(t$$(i)){var l=i.upsample(n.tilingScheme,u,c,h,r,o,a);if(!t$$(l))return void(e.terrainState=Ie$c.FAILED);c$18(l,(function(t){t$$(t)?(e.invalidTerrainData=t,e.terrainState=Ie$c.RECEIVED,e.invalid=s.data.invalid):e.terrainState=Ie$c.INVALID}))}else e.terrainState=Ie$c.RECEIVED,e.invalid=s.data.invalid}else e.terrainState=Ie$c.INVALID}),(function(){e.terrainState=Ie$c.FAILED})))}}else t.state=te$C.FAILED}function le$h(e,t,i,n,r,o){function a(i){e.request=void 0,t$$(i)?"cacheError"!==i?"cacheInvalid"!==i?(e.terrainData=i,e.terrainState=Ie$c.RECEIVED,t._isTerrainZ&&0!==r&&(e.terrainState=Ie$c.UNZIP,e.zipTerrainData=i,e.terrainData=void 0)):e.terrainState=Ie$c.FAILED:l(!1):e.terrainState=Ie$c.FAILED}function s(){if(e.request.state===Y$_.CANCELLED)return e.terrainData=void 0,e.terrainState=Ie$c.UNLOADED,void(e.request=void 0);e.terrainState=Ie$c.FAILED,e.request=void 0;var o="Failed to obtain terrain tile X: "+i+" Y: "+n+" Level: "+r+".";t._requestError=c$_.handleError(t._requestError,t,t.errorEvent,o,i,n,r,l)}function l(l){var u=new r$V({throttle:!1,throttleByServer:!0,type:V$_.TERRAIN});u.cacheEnable=l,e.request=u;var c=t.requestTileGeometry(i,n,r,u,o);t$$(c)?(e.terrainState=Ie$c.RECEIVING,c$18(c,a,s)):(e.terrainState=Ie$c.UNLOADED,e.request=void 0)}l(!0)}function he$9(e,t,i,n,r){var o=t.unzip(e.zipTerrainData.buffer);t$$(o)&&(e.terrainState=Ie$c.UNZIPING,c$18(o,(function(i){if(!t$$(i))return e.terrainState=Ie$c.FAILED,e.zipTerrainData=void 0,void(e.terrainData=void 0);e.terrainState=Ie$c.RECEIVED,e.terrainData=t.createTerrainData(e.zipTerrainData,i.data.buffer),t._invisibility&&(e.invalidTerrainData=new M$1a({buffer:new Uint8Array(256),width:16,height:16,skirtMode:!0,valid:!1})),e.zipTerrainData=void 0}),(function(t){e.terrainState=Ie$c.FAILED})))}function ue$9(e,t,i,n,r,o){var a=i.tilingScheme,s=e.terrainData.createMesh(a,n,r,o,t.terrainExaggeration);!t$$(s)||(e.terrainState=Ie$c.TRANSFORMING,c$18(s,(function(s){if(i._isSct&&i._extrudeTileBoundingBox&&i._levels[0]>12&&s.maximumHeight<1&&(s.maximumHeight=Math.max(i._maxHeight,s.maximumHeight)),e.mesh=s,e.orientedBoundingBox=b$1o.clone(s.orientedBoundingBox,e.orientedBoundingBox),e.occludeePointInScaledSpace=a$11.clone(s.occludeePointInScaledSpace,e.occludeePointInScaledSpace),i._enablePrjArea&&(t$$(s.validOrientedBoundingBox)?e.tileBoundingRegion._orientedBoundingBox=b$1o.clone(s.validOrientedBoundingBox,e.tileBoundingRegion._orientedBoundingBox):e.tileBoundingRegion._orientedBoundingBox=b$1o.clone(e.orientedBoundingBox,e.tileBoundingRegion._orientedBoundingBox),e.tileBoundingRegion._boundingSphere=c$19.fromOrientedBoundingBox(e.tileBoundingRegion._orientedBoundingBox)),t$$(e.invalidTerrainData)){var l=e.invalidTerrainData.createMesh(a,n,r,o,t.terrainExaggeration);if(!t$$(l))return void(e.terrainState=Ie$c.RECEIVED);c$18(l,(function(t){e.invalidMesh=t,e.invalidOrientedBoundingBox=b$1o.clone(t.orientedBoundingBox,e.invalidOrientedBoundingBox),e.invalidOccludeePointInScaledSpace=a$11.clone(t.occludeePointInScaledSpace,e.invalidOccludeePointInScaledSpace),e.terrainState=Ie$c.TRANSFORMED}))}else e.terrainState=Ie$c.TRANSFORMED}),(function(){e.terrainState=Ie$c.FAILED})))}function O$l(){this.context=void 0,this.surfaceTile=void 0,this.mesh=void 0}f$t.prototype.pick=function(e,t,i,n,r){var o=this.renderedMesh;if(t$$(o)){for(var a=o.vertices,s=o.indices,l=o.encoding,u=s.length,c=Number.MAX_VALUE,h=0;h<u;h+=3){var d=s[h],f=s[h+1],p=s[h+2],_=C$p(l,t,i,a,d,ie$b),m=C$p(l,t,i,a,f,te$b),$=C$p(l,t,i,a,p,ae$e),g=h$1b.rayTriangleParametric(e,_,m,$,n);t$$(g)&&g<c&&g>=0&&(c=g)}return c!==Number.MAX_VALUE?n$18.getPoint(e,c,r):void 0}},f$t.prototype.freeResources=function(){t$$(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,0===this.waterMaskTexture.referenceCount&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0),t$$(this.normalTexture)&&(--this.normalTexture.referenceCount,0===this.normalTexture.referenceCount&&this.normalTexture.destroy(),this.normalTexture=void 0),this.terrainData=void 0,this.modifyTerrainData=void 0,this.terrainState=Ie$c.UNLOADED,this.mesh=void 0,this.modifyTerrainMesh=void 0,this.subDivisionMesh=void 0,this.fill=this.fill&&this.fill.destroy();for(var e=this.imagery,t=0,i=e.length;t<i;++t)e[t].freeResources();for(var n in this.imagery.length=0,this.terrain)this.terrain[n].freeResources();this.terrain={};var r=this.gridImagery;for(t=0,i=r.length;t<i;++t)r[t].freeResources();this.gridImagery.length=0,this.freeVertexArray(),this.invalid=!1,this.invalidMesh=void 0,this.invalidOrientedBoundingBox=void 0,this.invalidOccludeePointInScaledSpace=void 0,this.invalidVertexArray=void 0,this.invalidTerrainData=void 0},f$t.prototype.freeVertexArray=function(){f$t._freeVertexArray(this.vertexArray),this.vertexArray=void 0,f$t._freeVertexArray(this.wireframeVertexArray),this.wireframeVertexArray=void 0,f$t._freeVertexArray(this.modifyTerrainVertexArray),this.modifyTerrainVertexArray=void 0,f$t._freeVertexArray(this.subDivisionVertexArray),this.subDivisionVertexArray=void 0},f$t.initialize=function(e,t,i,n){var r=e.data;t$$(r)||(r=e.data=new f$t),e.state===te$C.START&&(ne$c(e,t,i,n),e.state=te$C.LOADING)},f$t.processStateMachine=function(e,t,i,n,r,o,a){f$t.initialize(e,i,n,r);var s=e.data;if(e.state===te$C.LOADING&&se$b(e,t,i,n,r,o),!a||0==e.level){var l=e.renderable;e.renderable=t$$(s.vertexArray)||!1===i.isShowGlobe&&t$$(s.mesh)&&s.mesh.invalid;var u=s.terrainState===Ie$c.READY;for(var c in s.terrain)if(s.terrain[c].terrainState!==Ie$c.READY){u=!1;break}e.upsampledFromParent=t$$(s.terrainData)&&s.terrainData.wasCreatedByUpsampling();var h=!0,d=r._maxDetailLevelOffset();if(d>0){var f=e.level-d;f=Math.max(0,f);for(var p=e.level,_=e;p>f&&t$$(_);)t$$(_=_.parent)&&(f$t.initialize(_,i,n,r),h=s.processImagery(_,i,t)&&h),p=_.level}var m=s.processImagery(e,i,t)&&h,$=s.processGridTile(e,t);if(u&&m&&$||s.terrainState===Ie$c.INVALID){var g=e._loadedCallbacks,y={};for(var v in g)g.hasOwnProperty(v)&&(g[v](e)||(y[v]=g[v]));e._loadedCallbacks=y,e.state=te$C.DONE}l&&(e.renderable=!0)}},f$t.prototype.processImagery=function(e,t,i,n){var r,o,a=e.data,s=e.upsampledFromParent,l=!1,u=!0,c=a.imagery,h=!1,d=!1;for(r=0,o=c.length;r<o;++r){var f=c[r];if(!t$$(f.loadingImagery)&&!t$$(f.readyImagery)&&t$$(f.imageryLayer)&&(f.loadingImagery=f.imageryLayer.getImageryFromCache(e.x,e.y,e.level),f.imageryLayer=void 0),t$$(f.loadingImagery)){if(f.loadingImagery.state===Tt$4.PLACEHOLDER){var p=f.loadingImagery.imageryLayer;if(p.imageryProvider.ready){f.freeResources(),c.splice(r,1),p._createTileImagerySkeletons(e,t,r),--r,o=c.length;continue}s=!1}var _,m=void 0;if(f.loadingImagery.imageryLayer._imageryProvider instanceof M$10&&(m=f.loadingImagery.imageryLayer._imageryProvider,h=!0),i.camera._scene._mvtVisibleControl){var $=i.camera._scene._mvtVisibleLevel;!t$$(m)||e._level>i.camera._endLevel-$?(_=f.processStateMachine(e,i,n))&&t$$(m)&&(d=!0):_=!0}else _=f.processStateMachine(e,i,n);u=u&&_,l=l||_||t$$(f.readyImagery),s=s&&t$$(f.loadingImagery)&&(f.loadingImagery.state===Tt$4.FAILED||f.loadingImagery.state===Tt$4.INVALID)}else s=!1}return(!h||d)&&(e._mvtLoaded=!0),e.upsampledFromParent=s,e.renderable=e.renderable&&(l||u),u},new s$1p,O$l.prototype.set=function(e,t,i,n){this.context=e,this.surfaceTile=t,this.mesh=i,this.terrainProvider=n},O$l.prototype.execute=function(){var e=this.context,t=this.mesh,i=this.surfaceTile;!1===this.terrainProvider.isShowGlobe&&t.invalid?i.vertexArray=void 0:(i.vertexArray=f$t._createVertexArrayForMesh(e,t),t$$(i.invalidMesh)&&(i.invalidVertexArray=f$t._createVertexArrayForMesh(e,i.invalidMesh)))};var q$q=new O$l;function ce$a(e,t,i,n,r,o,a,s){q$q.set(i,t,t.mesh,n),e.jobScheduler.execute(q$q,2)&&(t.terrainState=Ie$c.READY,t.fill=t.fill&&t.fill.destroy(s))}function fe$a(e){var t=e.cache.tile_waterMaskData;if(!t$$(t)){var i=P$S.create({context:e,pixelFormat:Z$_.LUMINANCE,pixelDatatype:v$Z.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([255]),width:1,height:1}});i.referenceCount=1,t={allWaterTexture:i,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.LINEAR,magnificationFilter:et$k.LINEAR}),destroy:function(){this.allWaterTexture.destroy()}},e.cache.tile_waterMaskData=t}return t}function ve$a(e,t){var i,n=t.terrainData.waterMask,r=fe$a(e),o=n.length;if(1===o){if(0===n[0])return;i=r.allWaterTexture}else{var a=Math.sqrt(o);(i=P$S.create({context:e,pixelFormat:Z$_.LUMINANCE,pixelDatatype:v$Z.UNSIGNED_BYTE,source:{width:a,height:a,arrayBufferView:n},sampler:r.sampler,flipY:!1})).referenceCount=0}++i.referenceCount,t.waterMaskTexture=i,a$10.fromElements(0,0,1,1,t.waterMaskTranslationAndScale)}function me$g(e){var t=e.cache.tile_normalTextureData;if(!t$$(t)){var i=new P$S({context:e,pixelFormat:Z$_.RGB,pixelDatatype:v$Z.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([0,0,255]),width:1,height:1}});i.referenceCount=1,t={allNormalTexture:i,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.LINEAR,magnificationFilter:et$k.LINEAR}),destroy:function(){this.allNormalTexture.destroy()}},e.cache.tile_normalTextureData=t}return t}function ye$e(e,t){var i=t.normalTexture;if(t$$(i)&&(--i.referenceCount,0===i.referenceCount&&i.destroy(),t.normalTexture=void 0),t$$(t.terrainData)){var n=t.terrainData.normalTexture;if(t$$(n)){var r,o=me$g(e),a=n.length/3,s=Math.sqrt(a);(r=new P$S({context:e,pixelFormat:Z$_.RGB,pixelDatatype:v$Z.UNSIGNED_BYTE,source:{width:s,height:s,arrayBufferView:n},sampler:o.sampler})).referenceCount=0,++r.referenceCount,t.normalTexture=r,a$10.fromElements(0,0,1,1,t.normalTextureTranslationAndScale)}}}function xe$i(e,t){for(var i=(t=e.data).modifyTerrainMesh.minimumHeight,n=t.modifyTerrainMesh.maximumHeight,r=t.mesh,o=e.parent;!t$$(r)&&t$$(o)&&t$$(o.data);)r=(t=o.data).mesh,o=o.parent;if(!t$$(r))return t.modifyTerrainMesh.orientedBoundingBox;var a=Math.min(r.minimumHeight,i),s=Math.max(r.maximumHeight,n);return b$1o.fromRectangle(e.rectangle,a,s)}function pe$a(e,t){var i=t.data;i.modifyTerrainVertexArray=f$t._createVertexArrayForMesh(e,i.modifyTerrainMesh),i.modifyOrientedBoundingBox=xe$i(t,i),t.isModified=!0}function Y$n(e){this.tile=e,this.frameLastUpdated=void 0,this.westMeshes=[],this.westTiles=[],this.southMeshes=[],this.southTiles=[],this.eastMeshes=[],this.eastTiles=[],this.northMeshes=[],this.northTiles=[],this.southwestMesh=void 0,this.southwestTile=void 0,this.southeastMesh=void 0,this.southeastTile=void 0,this.northwestMesh=void 0,this.northwestTile=void 0,this.northeastMesh=void 0,this.northeastTile=void 0,this.changedThisFrame=!0,this.visitedFrame=void 0,this.enqueuedFrame=void 0,this.mesh=void 0,this.vertexArray=void 0,this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new a$10}f$t.prototype.processGridTile=function(e,t,i){for(var n=!0,r=e.data.gridImagery,o=0;o<r.length;o++){var a=r[o]._processStateMachine(e,t,i);n=n&&a}return n},f$t._createVertexArrayForMesh=function(e,t){var i=t.vertices,n=u$Y.createVertexBuffer({context:e,typedArray:i,usage:A$13.STATIC_DRAW}),r=t.encoding.getAttributes(n),o=t.indices.indexBuffers||{},a=o[e.id];if(!t$$(a)||a.isDestroyed()){var s=t.indices;(a=u$Y.createIndexBuffer({context:e,typedArray:s,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.fromSizeInBytes(s.BYTES_PER_ELEMENT)})).vertexArrayDestroyable=!1,a.referenceCount=1,o[e.id]=a,t.indices.indexBuffers=o}else++a.referenceCount;return new x$18({context:e,attributes:r,indexBuffer:a})},f$t._freeVertexArray=function(e){if(t$$(e)){var t=e.indexBuffer;e.destroy(),t$$(t)&&!t.isDestroyed()&&t$$(t.referenceCount)&&(--t.referenceCount,0===t.referenceCount&&t.destroy())}},f$t.prototype._findAncestorTileWithTerrainData=function(e){for(var t=e.parent;t$$(t)&&(!t$$(t.data)||!t$$(t.data.terrainData)||t.data.terrainData.wasCreatedByUpsampling());)t=t.parent;return t},f$t.prototype._computeWaterMaskTranslationAndScale=function(e,t,i){var n=t.rectangle,r=e.rectangle,o=r.width,a=r.height,s=o/n.width,l=a/n.height;return i.x=s*(r.west-n.west)/o,i.y=l*(r.south-n.south)/a,i.z=s,i.w=l,i},f$t.prototype._computeNormalTextureTranslationAndScale=function(e,t,i){var n=t.rectangle,r=e.rectangle,o=r.width,a=r.height,s=o/n.width,l=a/n.height;return i.x=s*(r.west-n.west)/o,i.y=l*(r.south-n.south)/a,i.z=s,i.w=l,i},f$t.prototype.createModifyVertexArray=function(e,t,i,n,r,o,a){var s;if(t$$(this.modifyTerrainVertexArray)&&(this.modifyTerrainData=void 0,this.modifyTerrainMesh=void 0,this.modifyTerrainVertexArray=!this.modifyTerrainVertexArray.isDestroyed()&&this.modifyTerrainVertexArray.destroy()),t$$(s=a?Ne$8.upsampleTerrainData(i):Ne$8.createTerrainData(i,n,r,o,t._extractExtendHeight))){this.modifyTerrainData=s,this.modifyTerrainMesh=Ne$8.createTerrainMesh(i,s),pe$a(e,i);var l=i._level+" "+i._x+i._y;t._modifyTilesMap[l]=i}},f$t.prototype.freeModifyResource=function(){f$t._freeVertexArray(this.modifyTerrainVertexArray),this.modifyTerrainVertexArray=void 0,f$t._freeVertexArray(this.subDivisionVertexArray),this.subDivisionVertexArray=void 0,this.modifyTerrainData=void 0,this.modifyOrientedBoundingBox=void 0,this.subDivisionMesh=void 0},f$t.prototype.setShowInvalid=function(e){if(this.invalid!==e){if(t$$(this.vertexArray)&&t$$(this.invalidVertexArray)){var t=this.invalidOrientedBoundingBox,i=this.invalidOccludeePointInScaledSpace,n=this.invalidVertexArray,r=this.invalidMesh,o=this.invalidTerrainData;this.invalidOrientedBoundingBox=this.orientedBoundingBox,this.invalidOccludeePointInScaledSpace=this.occludeePointInScaledSpace,this.invalidVertexArray=this.vertexArray,this.invalidMesh=this.mesh,this.invalidTerrainData=this.terrainData,this.orientedBoundingBox=t,this.occludeePointInScaledSpace=i,this.vertexArray=n,this.mesh=r,this.terrainData=o,this.invalid=e}else if(this.terrainState===Ie$c.RECEIVED){if(t$$(this.terrainData)&&t$$(this.invalidTerrainData)){o=this.invalidTerrainData;this.invalidTerrainData=this.terrainData,this.terrainData=o,this.invalid=e}}else if(this.terrainState===Ie$c.TRANSFORMED&&t$$(this.mesh)&&t$$(this.invalidMesh)){t=this.invalidOrientedBoundingBox,i=this.invalidOccludeePointInScaledSpace,r=this.invalidMesh,o=this.invalidTerrainData;this.invalidOrientedBoundingBox=this.orientedBoundingBox,this.invalidOccludeePointInScaledSpace=this.occludeePointInScaledSpace,this.invalidMesh=this.mesh,this.invalidTerrainData=this.terrainData,this.orientedBoundingBox=t,this.occludeePointInScaledSpace=i,this.mesh=r,this.terrainData=o,this.invalid=e}this.boundingVolumeSourceTile=void 0}},Y$n.prototype.update=function(e,t,i){this.changedThisFrame&&(We$7(e,t,this.tile,i),this.changedThisFrame=!1)},Y$n.prototype.destroy=function(e){t$$(this.vertexArray)&&(t$$(e)?e.push(this.vertexArray):f$t._freeVertexArray(this.vertexArray,e),this.vertexArray=void 0),t$$(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,0===this.waterMaskTexture.referenceCount&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0)};var Ye$7=new i$Y;function p$o(e,t,i,n,r,o,a,s,l){if(void 0!==n){for(var u=n;u&&(u._lastSelectionResultFrame!==r||D$u.wasKicked(u._lastSelectionResult)||D$u.originalResult(u._lastSelectionResult)===D$u.CULLED);){if(a)return;var c=u.parent;if(o>=T$N.NORTHWEST&&void 0!==c)switch(o){case T$N.NORTHWEST:u=u===c.northwestChild?c:void 0;break;case T$N.NORTHEAST:u=u===c.northeastChild?c:void 0;break;case T$N.SOUTHWEST:u=u===c.southwestChild?c:void 0;break;case T$N.SOUTHEAST:u=u===c.southeastChild?c:void 0}else u=c}if(void 0!==u){if(u._lastSelectionResult===D$u.RENDERED){if(t$$(u.data.vertexArray))return;return void $e$3(e,t,i,u,o,r,s,l)}if(D$u.originalResult(n._lastSelectionResult)!==D$u.CULLED)switch(o){case T$N.WEST:p$o(e,t,i,n.northwestChild,r,o,!0,s,l),p$o(e,t,i,n.southwestChild,r,o,!0,s,l);break;case T$N.EAST:p$o(e,t,i,n.southeastChild,r,o,!0,s,l),p$o(e,t,i,n.northeastChild,r,o,!0,s,l);break;case T$N.SOUTH:p$o(e,t,i,n.southwestChild,r,o,!0,s,l),p$o(e,t,i,n.southeastChild,r,o,!0,s,l);break;case T$N.NORTH:p$o(e,t,i,n.northeastChild,r,o,!0,s,l),p$o(e,t,i,n.northwestChild,r,o,!0,s,l);break;case T$N.NORTHWEST:p$o(e,t,i,n.northwestChild,r,o,!0,s,l);break;case T$N.NORTHEAST:p$o(e,t,i,n.northeastChild,r,o,!0,s,l);break;case T$N.SOUTHWEST:p$o(e,t,i,n.southwestChild,r,o,!0,s,l);break;case T$N.SOUTHEAST:p$o(e,t,i,n.southeastChild,r,o,!0,s,l);break;default:throw new t$_("Invalid edge")}}}}function $e$3(e,t,i,n,r,o,a,s){var l=n.data;if(void 0===l.fill)l.fill=new Y$n(n);else if(l.fill.visitedFrame===o)return;l.fill.enqueuedFrame!==o&&(l.fill.enqueuedFrame=o,l.fill.changedThisFrame=!1,a.enqueue(n)),ze$9(e,t,i,n,r,s)}function ze$9(e,t,i,n,r,o){var a,s,l,u=n.data.fill,c=i.data.fill;switch(t$$(c)?(c.visitedFrame=t.frameNumber,c.changedThisFrame&&(We$7(e,t,i,o),c.changedThisFrame=!1),a=i.data.fill.mesh):a=i.data.mesh,r){case T$N.WEST:s=u.westMeshes,l=u.westTiles;break;case T$N.SOUTH:s=u.southMeshes,l=u.southTiles;break;case T$N.EAST:s=u.eastMeshes,l=u.eastTiles;break;case T$N.NORTH:s=u.northMeshes,l=u.northTiles;break;case T$N.NORTHWEST:return u.changedThisFrame=u.changedThisFrame||u.northwestMesh!==a,u.northwestMesh=a,void(u.northwestTile=i);case T$N.NORTHEAST:return u.changedThisFrame=u.changedThisFrame||u.northeastMesh!==a,u.northeastMesh=a,void(u.northeastTile=i);case T$N.SOUTHWEST:return u.changedThisFrame=u.changedThisFrame||u.southwestMesh!==a,u.southwestMesh=a,void(u.southwestTile=i);case T$N.SOUTHEAST:return u.changedThisFrame=u.changedThisFrame||u.southeastMesh!==a,u.southeastMesh=a,void(u.southeastTile=i)}if(i.level<=n.level)return u.changedThisFrame=u.changedThisFrame||s[0]!==a||1!==s.length,s[0]=a,l[0]=i,s.length=1,void(l.length=1);var h,d,f,p,_=i.rectangle,m=n.rectangle;switch(r){case T$N.WEST:for(p=(m.north-m.south)*n$1d.EPSILON5,h=0;h<l.length&&(f=l[h].rectangle,!n$1d.greaterThan(_.north,f.south,p));++h);for(d=h;d<l.length&&(f=l[d].rectangle,!n$1d.greaterThanOrEquals(_.south,f.north,p));++d);break;case T$N.SOUTH:for(p=(m.east-m.west)*n$1d.EPSILON5,h=0;h<l.length&&(f=l[h].rectangle,!n$1d.lessThan(_.west,f.east,p));++h);for(d=h;d<l.length&&(f=l[d].rectangle,!n$1d.lessThanOrEquals(_.east,f.west,p));++d);break;case T$N.EAST:for(p=(m.north-m.south)*n$1d.EPSILON5,h=0;h<l.length&&(f=l[h].rectangle,!n$1d.lessThan(_.south,f.north,p));++h);for(d=h;d<l.length&&(f=l[d].rectangle,!n$1d.lessThanOrEquals(_.north,f.south,p));++d);break;case T$N.NORTH:for(p=(m.east-m.west)*n$1d.EPSILON5,h=0;h<l.length&&(f=l[h].rectangle,!n$1d.greaterThan(_.east,f.west,p));++h);for(d=h;d<l.length&&(f=l[d].rectangle,!n$1d.greaterThanOrEquals(_.west,f.east,p));++d);}d-h==1?(u.changedThisFrame=u.changedThisFrame||s[h]!==a,s[h]=a,l[h]=i):(u.changedThisFrame=!0,s.splice(h,d-h,a),l.splice(h,d-h,i))}Y$n.updateFillTiles=function(e,t,i,n){var r=e._quadtree,o=r._levelZeroTiles,a=r._lastSelectionFrameNumber,s=Ye$7;s.clear();for(var l=0;l<t.length;++l){t$$(t[l].data.vertexArray)&&s.enqueue(t[l])}for(var u=s.dequeue();void 0!==u;){var c=u.findTileToWest(o),h=u.findTileToSouth(o),d=u.findTileToEast(o),f=u.findTileToNorth(o);p$o(e,i,u,c,a,T$N.EAST,!1,s,n),p$o(e,i,u,h,a,T$N.NORTH,!1,s,n),p$o(e,i,u,d,a,T$N.WEST,!1,s,n),p$o(e,i,u,f,a,T$N.SOUTH,!1,s,n);var p=c.findTileToNorth(o),_=c.findTileToSouth(o),m=d.findTileToNorth(o),$=d.findTileToSouth(o);p$o(e,i,u,p,a,T$N.SOUTHEAST,!1,s,n),p$o(e,i,u,m,a,T$N.SOUTHWEST,!1,s,n),p$o(e,i,u,_,a,T$N.NORTHEAST,!1,s,n),p$o(e,i,u,$,a,T$N.NORTHWEST,!1,s,n),u=s.dequeue()}};var B$j=new i$1g,Ge$6=new i$1g,Q$k=new a$11,pe$9=new a$11,Te$e=new r$T,me$f=new r$T,y$q=new r$T;function ae$d(){this.height=0,this.encodedNormal=new r$T}function ie$a(e,t,i,n,r,o,a,s,l){if(t$$(r))return r;var u;if(t$$(o)&&t$$(a))u=.5*(o.height+a.height);else if(t$$(o))u=o.height;else if(t$$(a))u=a.height;else if(t$$(s))u=s.height;else{var c=e.tile.data.tileBoundingRegion,h=0,d=0;t$$(c)&&(h=c.minimumHeight,d=c.maximumHeight),u=.5*(h+d)}return ye$d(e,t,i,n,u,l),l}var et$5={minimumHeight:0,maximumHeight:0},He$7=new ae$d,be$f=new ae$d,Ie$b=new ae$d,Ae$a=new ae$d,tt$7=typeof Uint8Array<"u"?new Uint8Array(81):void 0;function We$7(e,t,i,n){f$t.initialize(i,e.terrainProvider,e._terrainLayers,e._imageryLayers);var r=i.data,o=r.fill,a=i.rectangle,s=i.tilingScheme.ellipsoid,l=ne$b(o,s,0,1,o.northwestTile,o.northwestMesh,o.northTiles,o.northMeshes,o.westTiles,o.westMeshes,Ie$b),u=ne$b(o,s,0,0,o.southwestTile,o.southwestMesh,o.westTiles,o.westMeshes,o.southTiles,o.southMeshes,He$7),c=ne$b(o,s,1,0,o.southeastTile,o.southeastMesh,o.southTiles,o.southMeshes,o.eastTiles,o.eastMeshes,be$f),h=ne$b(o,s,1,1,o.northeastTile,o.northeastMesh,o.eastTiles,o.eastMeshes,o.northTiles,o.northMeshes,Ae$a);l=ie$a(o,s,0,1,l,u,h,c,Ie$b),u=ie$a(o,s,0,0,u,l,c,h,He$7),c=ie$a(o,s,1,1,c,u,h,l,be$f),h=ie$a(o,s,1,1,h,c,l,u,Ae$a);var d,f,p=u.height,_=c.height,m=l.height,$=h.height,g=Math.min(p,_,m,$),y=Math.max(p,_,m,$),v=.5*(g+y),x=e.getLevelMaximumGeometricError(i.level),b=s.maximumRadius-x,S=4*Math.acos(b/s.maximumRadius);if(S*=1.5,a.width>S&&y-g<=x){var w=new M$1a({width:9,height:9,buffer:tt$7,structure:{heightOffset:y}});o.mesh=w._createMeshSync(i.tilingScheme,i.x,i.y,i.level,1)}else{var C=new u$13(void 0,void 0,void 0,void 0,!0,!0),T=Ge$6;T.longitude=.5*(a.east+a.west),T.latitude=.5*(a.north+a.south),T.height=v,C.center=s.cartographicToCartesian(T,C.center);var P,E=5;for(d=0,f=(P=o.westMeshes).length;d<f;++d)t$$(P[d])&&(E+=P[d].eastIndicesNorthToSouth.length);for(d=0,f=(P=o.southMeshes).length;d<f;++d)t$$(P[d])&&(E+=P[d].northIndicesWestToEast.length);for(d=0,f=(P=o.eastMeshes).length;d<f;++d)t$$(P[d])&&(E+=P[d].westIndicesSouthToNorth.length);for(d=0,f=(P=o.northMeshes).length;d<f;++d)t$$(P[d])&&(E+=P[d].southIndicesEastToWest.length);var A=et$5;A.minimumHeight=g,A.maximumHeight=y;var L=C.getStride(),M=new Float32Array(E*L),I=0,O=I;t$$(l.height)&&!isNaN(l.height)&&(I=ce$9(o,s,C,M,I=he$8(s,a,C,M,I,0,1,l.height,l.encodedNormal,1,A),o.westTiles,o.westMeshes,T$N.EAST,A));var D=I;t$$(u.height)&&!isNaN(u.height)&&(I=ce$9(o,s,C,M,I=he$8(s,a,C,M,I,0,0,u.height,u.encodedNormal,0,A),o.southTiles,o.southMeshes,T$N.NORTH,A));var R=I;t$$(c.height)&&!isNaN(c.height)&&(I=ce$9(o,s,C,M,I=he$8(s,a,C,M,I,1,0,c.height,c.encodedNormal,0,A),o.eastTiles,o.eastMeshes,T$N.WEST,A));var N=I;t$$(h.height)&&!isNaN(h.height)&&(I=ce$9(o,s,C,M,I=he$8(s,a,C,M,I,1,1,h.height,h.encodedNormal,1,A),o.northTiles,o.northMeshes,T$N.SOUTH,A)),g=isNaN(A.minimumHeight)?0:A.minimumHeight,y=isNaN(A.maximumHeight)?0:A.maximumHeight;var F=b$1o.fromRectangle(a,g,y,i.tilingScheme.ellipsoid),B=e$1H.geodeticLatitudeToMercatorAngle(a.south),z=1/(e$1H.geodeticLatitudeToMercatorAngle(a.north)-B),G=(e$1H.geodeticLatitudeToMercatorAngle(T.latitude)-B)*z;s.geodeticSurfaceNormalCartographic(B$j,pe$9);var k=r$P.octEncode(pe$9,Te$e),U=I;C.encode(M,I*L,F.center,r$T.fromElements(.5,.5,y$q),v,k,G);var V,W=++I,H=3*(W-1),Y=H*(W<256?1:2);if((M.length-W*L)*Float32Array.BYTES_PER_ELEMENT>=Y){var j=W*L*Float32Array.BYTES_PER_ELEMENT;V=W<256?new Uint8Array(M.buffer,j,H):new Uint16Array(M.buffer,j,H)}else V=W<256?new Uint8Array(H):new Uint16Array(H);M=new Float32Array(M.buffer,0,W*L);var q=0;for(d=0;d<W-2;++d)V[q++]=U,V[q++]=d,V[q++]=d+1;V[q++]=U,V[q++]=d,V[q++]=0;var X=[];for(d=D;d>=O;--d)X.push(d);var K=[];for(d=R;d>=D;--d)K.push(d);var Z=[];for(d=N;d>=R;--d)Z.push(d);var J=[];for(J.push(0),d=U-1;d>=N;--d)J.push(d);o.mesh=new B$R(C.center,M,V,H,W,g,y,c$19.fromOrientedBoundingBox(F),nt$6(e,F.center,a,g,y),C.getStride(),F,C,t.terrainExaggeration,X,K,Z,J)}var Q=t.context;t$$(o.vertexArray)&&(t$$(n)?0!==o.mesh.vertices.length&&0!==o.mesh.indices.length&&n.push(o.vertexArray):f$t._freeVertexArray(o.vertexArray)),0!==o.mesh.vertices.length&&0!==o.mesh.indices.length&&(o.vertexArray=f$t._createVertexArrayForMesh(Q,o.mesh)),r.processImagery(i,e.terrainProvider,t,!0);var ee=o.waterMaskTexture;if(o.waterMaskTexture=void 0,e.terrainProvider.hasWaterMask){var te=r._findAncestorTileWithTerrainData(i);t$$(te)&&t$$(te.data.waterMaskTexture)&&(o.waterMaskTexture=te.data.waterMaskTexture,++o.waterMaskTexture.referenceCount,r._computeWaterMaskTranslationAndScale(i,te,o.waterMaskTranslationAndScale))}t$$(ee)&&(--ee.referenceCount,0===ee.referenceCount&&ee.destroy())}function he$8(e,t,i,n,r,o,a,s,l,u,c){var h=B$j;h.longitude=n$1d.lerp(t.west,t.east,o),h.latitude=n$1d.lerp(t.south,t.north,a),h.height=s;var d=e.cartographicToCartesian(h,Q$k),f=me$f;return f.x=o,f.y=a,i.encode(n,r*i.getStride(),d,f,s,l,u),c.minimumHeight=Math.min(c.minimumHeight,s),c.maximumHeight=Math.max(c.maximumHeight,s),r+1}var oe$c=new s$1p;function $$i(e,t,i,n){var r=e.rectangle,o=t.rectangle;0===t.x&&1===i.x&&e.x===e.tilingScheme.getNumberOfXTilesAtLevel(e.level)-1?((r=s$1p.clone(e.rectangle,oe$c)).west-=n$1d.TWO_PI,r.east-=n$1d.TWO_PI):0===e.x&&0===i.x&&t.x===t.tilingScheme.getNumberOfXTilesAtLevel(t.level)-1&&((r=s$1p.clone(e.rectangle,oe$c)).west+=n$1d.TWO_PI,r.east+=n$1d.TWO_PI);var a=r.east-r.west,s=(o.west-r.west)/a,l=(o.east-r.west)/a,u=r.north-r.south,c=(o.south-r.south)/u,h=(o.north-r.south)/u,d=(i.x-s)/(l-s),f=(i.y-c)/(h-c);return Math.abs(d)<Math.EPSILON5?d=0:Math.abs(d-1)<Math.EPSILON5&&(d=1),Math.abs(f)<Math.EPSILON5?f=0:Math.abs(f-1)<Math.EPSILON5&&(f=1),n.x=d,n.y=f,n}var rt$6=new r$T;function ge$a(e,t,i,n,r){var o=e.encoding,a=e.vertices;if(r.height=o.decodeHeight(a,t),o.hasVertexNormals)o.getOctEncodedNormal(a,t,r.encodedNormal);else{var s=r.encodedNormal;s.x=0,s.y=0}}var st$3=new r$T,at$4=new a$11;function it$4(e,t,i,n,r,o,a,s,l,u){var c,h=n.encoding,d=n.vertices,f=$$i(t,i,h.decodeTextureCoordinates(d,r,y$q),y$q),p=$$i(t,i,h.decodeTextureCoordinates(d,o,me$f),me$f);c=l?(a-f.x)/(p.x-f.x):(s-f.y)/(p.y-f.y);var _,m=h.decodeHeight(d,r),$=h.decodeHeight(d,o),g=i.rectangle;if(B$j.longitude=n$1d.lerp(g.west,g.east,a),B$j.latitude=n$1d.lerp(g.south,g.north,s),u.height=B$j.height=n$1d.lerp(m,$,c),!h.isModify)if(h.hasVertexNormals){var y=h.getOctEncodedNormal(d,r,rt$6),v=h.getOctEncodedNormal(d,o,st$3),x=r$P.octDecode(y.x,y.y,Q$k),b=r$P.octDecode(v.x,v.y,at$4);_=a$11.lerp(x,b,c,Q$k),a$11.normalize(_,_),r$P.octEncode(_,u.encodedNormal)}else _=e.geodeticSurfaceNormalCartographic(B$j,Q$k),r$P.octEncode(_,u.encodedNormal)}function ye$d(e,t,i,n,r,o){o.height=r;var a=t.geodeticSurfaceNormalCartographic(B$j,Q$k);r$P.octEncode(a,o.encodedNormal)}function ne$b(e,t,i,n,r,o,a,s,l,u,c){var h;return Pe$b(e,t,s,a,!1,i,n,c)||Pe$b(e,t,u,l,!0,i,n,c)?c:fe$9(r,o)?(ge$a(o,0===i?0===n?o.eastIndicesNorthToSouth[0]:o.southIndicesEastToWest[0]:0===n?o.northIndicesWestToEast[0]:o.westIndicesSouthToNorth[0],i,n,c),c):t$$(h=0===i?0===n?le$g(e.westMeshes,e.westTiles,T$N.EAST,e.southMeshes,e.southTiles,T$N.NORTH):le$g(e.northMeshes,e.northTiles,T$N.SOUTH,e.westMeshes,e.westTiles,T$N.EAST):0===n?le$g(e.southMeshes,e.southTiles,T$N.NORTH,e.eastMeshes,e.eastTiles,T$N.WEST):le$g(e.eastMeshes,e.eastTiles,T$N.WEST,e.northMeshes,e.northTiles,T$N.SOUTH))?(ye$d(e,t,i,n,h,c),c):void 0}function le$g(e,t,i,n,r,o,a,s){var l=Re$8(e,t,!1,i),u=Re$8(n,r,!0,o);return t$$(l)&&t$$(u)?.5*(l+u):t$$(l)?l:u}function ce$9(e,t,i,n,r,o,a,s,l){for(var u=0;u<o.length;++u)t$$(a[u])&&(r=ht$4(e,t,i,n,r,o[u],a[u],s,l));return r}function ht$4(e,t,i,n,r,o,a,s,l){var u=o.rectangle;s===T$N.EAST&&0===e.tile.x?((u=s$1p.clone(o.rectangle,oe$c)).west-=n$1d.TWO_PI,u.east-=n$1d.TWO_PI):s===T$N.WEST&&0===o.x&&((u=s$1p.clone(o.rectangle,oe$c)).west+=n$1d.TWO_PI,u.east+=n$1d.TWO_PI);var c,h,d,f,p=e.tile.rectangle;switch(r>0&&(i.decodeTextureCoordinates(n,r-1,y$q),c=y$q.x,h=y$q.y),s){case T$N.WEST:d=a.westIndicesSouthToNorth,f=!1;break;case T$N.NORTH:d=a.northIndicesWestToEast,f=!0;break;case T$N.EAST:d=a.eastIndicesNorthToSouth,f=!1;break;case T$N.SOUTH:d=a.southIndicesEastToWest,f=!0}var _,m,$=o,g=e.tile,y=a.encoding,v=a.vertices,x=i.getStride();y.hasWebMercatorT&&(_=e$1H.geodeticLatitudeToMercatorAngle(p.south),m=1/(e$1H.geodeticLatitudeToMercatorAngle(p.north)-_));for(var b=0;b<d.length;++b){var S=d[b],w=y.decodeTextureCoordinates(v,S,y$q);$$i($,g,w,w);var C=w.x,T=w.y,P=f?C:T;if(!(P<0||P>1||Math.abs(C-c)<n$1d.EPSILON5&&Math.abs(T-h)<n$1d.EPSILON5)){var E=Math.abs(C)<n$1d.EPSILON5||Math.abs(C-1)<n$1d.EPSILON5,A=Math.abs(T)<n$1d.EPSILON5||Math.abs(T-1)<n$1d.EPSILON5;if(!E||!A){var L,M=y.decodePosition(v,S,Q$k),I=y.decodeHeight(v,S);y.hasVertexNormals?L=y.getOctEncodedNormal(v,S,Te$e):((L=Te$e).x=0,L.y=0);var O=T;if(y.hasWebMercatorT){var D=n$1d.lerp(p.south,p.north,T);O=(e$1H.geodeticLatitudeToMercatorAngle(D)-_)*m}i.encode(n,r*x,M,w,I,L,O),l.minimumHeight=Math.min(l.minimumHeight,I),l.maximumHeight=Math.max(l.maximumHeight,I),++r}}}return r}function Re$8(e,t,i,n,r,o){var a,s,l;i?(a=0,s=e.length,l=1):(a=e.length-1,s=-1,l=-1);for(var u=a;u!==s;u+=l){var c=e[u];if(fe$9(t[u],c)){var h;switch(n){case T$N.WEST:h=c.westIndicesSouthToNorth;break;case T$N.SOUTH:h=c.southIndicesEastToWest;break;case T$N.EAST:h=c.eastIndicesNorthToSouth;break;case T$N.NORTH:h=c.northIndicesWestToEast}var d=h[i?0:h.length-1];if(t$$(d))return c.encoding.decodeHeight(c.vertices,d)}}}function fe$9(e,t){return t$$(t)&&(!t$$(e.data.fill)||!e.data.fill.changedThisFrame)}function Pe$b(e,t,i,n,r,o,a,s){var l,u,c,h,d,f=n[r?0:i.length-1],p=i[r?0:i.length-1];if(fe$9(f,p)&&(0===o?0===a?(l=r?p.northIndicesWestToEast:p.eastIndicesNorthToSouth,u=r,c=r):(l=r?p.eastIndicesNorthToSouth:p.southIndicesEastToWest,u=!r,c=!1):0===a?(l=r?p.westIndicesSouthToNorth:p.northIndicesWestToEast,u=!r,c=!0):(l=r?p.southIndicesEastToWest:p.westIndicesSouthToNorth,u=r,c=!r),l.length>0)){d=l[h=r?0:l.length-1],p.encoding.decodeTextureCoordinates(p.vertices,d,y$q);var _=$$i(f,e.tile,y$q,y$q);if(_.x===o&&_.y===a)return ge$a(p,d,o,a,s),!0;if(h=u$16(l,u?o:a,(function(t,i){p.encoding.decodeTextureCoordinates(p.vertices,t,y$q);var n=$$i(f,e.tile,y$q,y$q);return c?u?n.x-o:n.y-a:u?o-n.x:a-n.y})),!(h<0))return ge$a(p,l[h],o,a,s),!0;if((h=~h)>0&&h<l.length)return it$4(t,f,e.tile,p,l[h-1],l[h],o,a,u,s),!0}return!1}var ot$6=[new a$11,new a$11,new a$11,new a$11];function nt$6(e,t,i,n,r,o){var a=e.quadtree._occluders.ellipsoid,s=a.ellipsoid,l=ot$6;return a$11.fromRadians(i.west,i.south,r,s,l[0]),a$11.fromRadians(i.east,i.south,r,s,l[1]),a$11.fromRadians(i.west,i.north,r,s,l[2]),a$11.fromRadians(i.east,i.north,r,s,l[3]),a.computeHorizonCullingPointPossiblyUnderEllipsoid(t,l,n,o)}var _0x47a48d=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x17cf20=_0x47a48d(void 0,(function(){return _0x17cf20.toString().search("(((.+)+)+)+$").toString().constructor(_0x17cf20).search("(((.+)+)+)+$")}));_0x17cf20();var ua="attribute vec4 position;\nattribute vec2 texCoord;\nvarying vec2 v_texCoord;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\nvoid main()\n{\n v_texCoord = texCoord;\n gl_Position = czm_modelViewProjection * vec4(position.xyz, 1.0);\n v_positionMC = vec4(position.xyz, 1.0);\n v_positionEC = (czm_modelView * vec4(position.xyz, 1.0)).xyz;\n}",_0x59dc9b=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x5274c2=_0x59dc9b(void 0,(function(){return _0x5274c2.toString().search("(((.+)+)+)+$").toString().constructor(_0x5274c2).search("(((.+)+)+)+$")}));_0x5274c2();var da="varying vec2 v_texCoord;\nuniform sampler2D texture1;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\n#ifdef NormalTexture\n uniform sampler2D uNormalTexture;\n#endif\nvec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\nvec4 SRGBtoLINEAR4(vec4 srgbIn)\n{\n srgbIn = srgbIn;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n vec3 LINEARtoSRGB(vec3 linearIn)\n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n}\nconst float M_PI = 3.141592653589793;\nvec3 lambertianDiffuse(vec3 diffuseColor) \n{\n return diffuseColor / M_PI;\n}\nvec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH) \n{\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\nfloat smithVisibilityG1(float NdotV, float roughness) \n{\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n}\nfloat smithVisibilityGGX(float roughness, float NdotL, float NdotV) \n{\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n}\nfloat GGX(float roughness, float NdotH) \n{\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n}\nvec3 applyTonemapping(vec3 linearIn) \n{\n#ifndef HDR\n return czm_acesTonemapping(linearIn);\n#else\n return linearIn;\n#endif\n}\nvoid main()\n{\n vec4 baseColorWithAlpha = texture2D(texture1, v_texCoord);\n baseColorWithAlpha = SRGBtoLINEAR4(baseColorWithAlpha);\n vec3 ng = normalize(czm_normal * czm_computeNormal(v_positionMC.xyz));\n#ifdef NormalTexture\n vec3 pos_dx = dFdx(v_positionEC);\n vec3 pos_dy = dFdy(v_positionEC);\n vec3 tex_dx = dFdx(vec3(v_texCoord.xy, 0.0));\n vec3 tex_dy = dFdy(vec3(v_texCoord.xy, 0.0));\n vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n t = normalize(t - ng * dot(ng, t));\n vec3 b = normalize(cross(ng, t));\n mat3 tbn = mat3(t, b, ng);\n vec3 n = texture2D(uNormalTexture, v_texCoord.xy).rgb;\n n = normalize(tbn * (2.0 * n - 1.0));\n#else\n vec3 n = ng;\n#endif\n vec3 baseColor = baseColorWithAlpha.rgb;\n float roughness = 1.0;\n float metalness = 0.0;\n vec3 v = -normalize(v_positionEC);\n vec3 lightColorHdr = vec3(5.0);\n vec3 l = normalize(czm_lightDirectionEC);\n vec3 h = normalize(v + l);\n float NdotL = clamp(dot(n, l), 0.001, 1.0);\n float NdotV = abs(dot(n, v)) + 0.001;\n float NdotH = clamp(dot(n, h), 0.0, 1.0);\n float LdotH = clamp(dot(l, h), 0.0, 1.0);\n float VdotH = clamp(dot(v, h), 0.0, 1.0);\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n vec3 specularColor = mix(f0, baseColor, metalness);\n float alpha = roughness * roughness;\n float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n vec3 r90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\n vec3 r0 = specularColor.rgb;\n vec3 F = fresnelSchlick2(r0, r90, VdotH);\n float G = smithVisibilityGGX(alpha, NdotL, NdotV);\n float D = GGX(alpha, NdotH);\n vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n vec3 specularContribution = F * G * D / (4.0 * NdotL * NdotV);\n vec3 color = NdotL * lightColorHdr * (diffuseContribution + specularContribution);\n vec3 positionWC = vec3(czm_inverseView * vec4(v_positionEC, 1.0));\n vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n float vertexRadius = length(positionWC);\n float horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\n float reflectionDotNadir = dot(r, normalize(positionWC));\n r.x = -r.x;\n r = -normalize(czm_temeToPseudoFixed * r);\n r.x = -r.x;\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n float atmosphereHeight = 0.05;\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * l), normalize(positionWC * -1.0)), 0.001, 1.0);\n float S = acos(LdotZenith);\n float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n float gamma = acos(NdotL);\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(NdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n float luminance = 0.2 * (numerator / denominator);\n vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n vec3 IBLColor = (diffuseIrradiance * diffuseColor * 1.0) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * 1.0);\n float maximumComponent = max(max(lightColorHdr.x, lightColorHdr.y), lightColorHdr.z);\n vec3 lightColor = lightColorHdr / max(maximumComponent, 1.0);\n IBLColor *= lightColor;\n color += IBLColor * luminance;\n color = applyTonemapping(color);\n color = LINEARtoSRGB(color);\n gl_FragColor = vec4(color, 1.0);\n}";function R$h(e){if(!t$$(e))throw new t$_("options is required.");if(!t$$(e.terrainProvider))throw new t$_("options.terrainProvider is required.");if(!t$$(e.imageryLayers))throw new t$_("options.imageryLayers is required.");if(!t$$(e.surfaceShaderSet))throw new t$_("options.surfaceShaderSet is required.");this.lightingFadeOutDistance=65e5,this.lightingFadeInDistance=9e6,this.hasWaterMask=!1,this.oceanNormalMap=void 0,this.zoomedOutOceanSpecularIntensity=.5,this.enableLighting=!1,this.dynamicAtmosphereLighting=!1,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!1,this.shadows=q$Q.RECEIVE_ONLY,this.fillHighlightColor=void 0,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this._quadtree=void 0,this._terrainProvider=e.terrainProvider,this._oriTerrainProvider=e.terrainProvider,this._imageryLayers=e.imageryLayers,this._terrainLayers=e.terrainLayers,this._surfaceShaderSet=e.surfaceShaderSet,this._renderState=void 0,this._blendRenderState=void 0,this._disableCullingRenderState=void 0,this._disableCullingBlendRenderState=void 0,this._pickRenderState=void 0,this._disableCullingRenderState=void 0,this._disableCullingBlendRenderState=void 0,this._errorEvent=new o$15,this._imageryLayers.layerAdded.addEventListener(R$h.prototype._onLayerAdded,this),this._imageryLayers.layerRemoved.addEventListener(R$h.prototype._onLayerRemoved,this),this._imageryLayers.layerMoved.addEventListener(R$h.prototype._onLayerMoved,this),this._imageryLayers.layerShownOrHidden.addEventListener(R$h.prototype._onLayerShownOrHidden,this),this._imageryLayers.layerUpdate.addEventListener(R$h.prototype._onLayerUpdate,this),this._tileLoadedEvent=new o$15,this._imageryLayersUpdatedEvent=new o$15,this._layerOrderChanged=!1,this._tilesToRenderByTextureCount=[],this._drawCommands=[],this._uniformMaps=[],this._pickCommands=[],this._usedDrawCommands=0,this._usedPickCommands=0,this._modifyUniformMaps=[],this._modifyDrawCommands=[],this._modifyUsedDrawCommands=0,this._vertexArraysToDestroy=[],this._debug={wireframe:!1,boundingSphereTile:void 0},this._baseColor=void 0,this._firstPassInitialColor=void 0,this.baseColor=new e$1z(0,0,.5,1),this._clippingPlanes=void 0,this.cartographicLimitRectangle=s$1p.clone(s$1p.MAX_VALUE),this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1,this._flattenTextureWidth=1024,this._flattenTexture=void 0,this._hypsometricSetting=void 0,this._hypsometricTexture=void 0,this._hypsometricRenderTexture=void 0,this._hypsometricRegion=void 0,this._hypsometricBound=new a$10,this._bUseHypColorTable=!1,this._bUseHypRegion=!1,this._hypsometricRegionUpdate=!1,this._hypAnalysisMode=J$O.AnalysisRegionMode.ARM_NONE,this._hypMaxInstensity=e.MaxInstensity,this._hypMinInstensity=e.MinInstensity,this._hypMaxHeight=e.MaxHeight,this._hypMinHeight=e.MinHeight,this._hypUseColorByHeight=!0,this._geoBounds=new a$10,this.globeAlpha=1,this._style3D=new e$D,this._slopeSetting=void 0,this._slopeColorTexture=void 0,this._slopeArrowsTexture=void 0,this._slopePolygonTexture=void 0,this._slopeRegion=void 0,this._slopeBound=new a$10,this._bUseSlopeColorTable=!1,this._slopeRegionUpdate=!1,this._slopeAnalysisMode=J$O.AnalysisRegionMode.ARM_NONE,this._slopeArrowUrl=o$12("Assets/Textures/arrow.png"),this._excavateRectangle=new s$1p,this._clipRasterTilesMap={},this._modifyRegions=new e$1F,this._modifyTilesMap={},this._modifyRegionUpdate=!1,this.clippingType=L$o.KeepOutside,this._excavateRegions=new e$1F,this._excavateRegionUpdate=!1,this._extractRegions=new e$1F,this._extractRegionsUpdate=!1,this._excavationGeometrys=new e$1F,this._imageryClipRegions=new e$1F,this._imageryClipRegionUpate=!1,this._oriClipPlane=[],this._clipPlane=[];for(var t=0;t<6;t++)this._clipPlane[t]=new a$10(0,0,0,0),this._oriClipPlane[t]=new a$10(0,0,0,0);this._clipMode=0,this._clipLineColor=new a$10(1,0,0,1),this._clipping=!1,this._splitDirection=new r$T,this._cullEnabled=!0,this._rasterTextureSizes=[256,512],this._rasterLineWidth=1,this._rasterLineFBOs=[],this._rasterAAFBOs=[],this._rasterCurrentFBOIdx=0,this._lineExpandCommand=void 0,this._lineFXAACommand=void 0,this._swipeRegion=new a$10(0,0,1,1),this._swipeEnabled=!1,this._polygonOffset={enabled:!1,value:new r$T(0,0)},this._excavateRegionCommands=new e$1F,this._pbrParameter=We$a.NONE,this._PBRMaterialParams={metallic:0,roughness:0,baseColorFactor:new a$10(1,1,1,1),baseColorTextureIndex:-1,emissionFactor:a$11.UNIT_XYZ,emissionTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1},this._excavationSideTextureUrl=o$12("Assets/Textures/excavationregion_side.jpg"),this._excavationBottomTextureUrl=o$12("Assets/Textures/excavationregion_top.jpg")}function pa(e,t){var i=e.loadingImagery;t$$(i)||(i=e.readyImagery);var n=t.loadingImagery;return t$$(n)||(n=t.readyImagery),i.imageryLayer._layerIndex-n.imageryLayer._layerIndex}function ca(e){var t=e.indexBuffer;e.destroy(),!t.isDestroyed()&&t$$(t.referenceCount)&&(--t.referenceCount,0===t.referenceCount&&t.destroy())}function ma(e,t){var i=t.creditDisplay;e._terrainProvider.ready&&t$$(e._terrainProvider.credit)&&i.addCredit(e._terrainProvider.credit);for(var n=e._imageryLayers,r=0,o=n.length;r<o;++r){var a=n.get(r).imageryProvider;t$$(a)&&a.ready&&t$$(a.credit)&&i.addCredit(a.credit);var s=n.get(r).gridProvider;t$$(s)&&s.ready&&t$$(s.credit)&&i.addCredit(s.credit)}}function Qr(e,t){var i=t.data.mesh;if(t$$(i)&&!i.isModified){for(var n=e.context,r=i.encoding,o=i.vertices,a=(new r$T,new a$11),s=new a$11,l=i.center,u=new i$1g,c=i.stride,h=o.length,d=new Array(h/c),f=0;f<h;f+=c){var p=f/c;d[p]=a$11.unpack(o,f,d[p]),d[p]=a$11.add(d[p],l,d[p])}for(var _=t.rectangle.width/50,m=new Array(i.indices.length),$=(f=0,m.length);f<$;f++)m[f]=i.indices[f];var g=T$10.computeSubdivision(n$1c.WGS84,d,m,_,!0),y=g.attributes.position.values;h=y.length;var v=t.rectangle,x=v.width,b=v.height,S=new Float32Array(h/3*c),w=e$1H.geodeticLatitudeToMercatorAngle(v.south),C=1/(e$1H.geodeticLatitudeToMercatorAngle(v.north)-w),T=0;for(f=0;f<h;f+=3){a$11.unpack(y,f,a),i$1g.fromCartesian(a,void 0,u);var P=(u.longitude-v.west)/x,E=(u.latitude-v.south)/b,A={x:P=n$1d.clamp(P,0,1),y:E=n$1d.clamp(E,0,1)};let e=!1;t.regions&&t.regions.forEach((t=>{e=ga(t.cartographics,u)})),a$11.fromRadians(u.longitude,u.latitude,0,void 0,s);var L=(e$1H.geodeticLatitudeToMercatorAngle(u.latitude)-w)*C;T=e?r.encode(S,T,s,A,u.height,new r$T,L):r.encode(S,T,a,A,u.height,new r$T,L)}var M=new B$R;M.encoding=i.encoding,M.vertices=S,M.indices=new Uint16Array(g.indices),M.center=a$11.clone(l),t.data.subDivisionMesh=M,t.data.subDivisionVertexArray=t.data.subDivisionVertexArray&&t.data.subDivisionVertexArray.destroy(),t.data.subDivisionVertexArray=f$t._createVertexArrayForMesh(n,t.data.subDivisionMesh),i.isModified=!0}}function ga(e,t){let i=t.longitude,n=t.latitude,r=!1;for(let t=0,o=e.length-1;t<e.length;o=t++){let a=e[t].longitude,s=e[t].latitude,l=e[o].longitude,u=e[o].latitude;s>n!=u>n&&i<(l-a)*(n-s)/(u-s)+a&&(r=!r)}return r}Object.defineProperties(R$h.prototype,{baseColor:{get:function(){return this._baseColor},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._baseColor=e,this._firstPassInitialColor=a$10.fromColor(e,this._firstPassInitialColor)}},quadtree:{get:function(){return this._quadtree},set:function(e){if(!t$$(e))throw new t$_("value is required.");this._quadtree=e}},ready:{get:function(){return this._terrainProvider.ready&&(0===this._imageryLayers.length||this._imageryLayers.get(0).imageryProvider.ready)}},tilingScheme:{get:function(){return this._terrainProvider.tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},tileLoadedEvent:{get:function(){return this._tileLoadedEvent}},imageryLayersUpdatedEvent:{get:function(){return this._imageryLayersUpdatedEvent}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){if(this._terrainProvider!==e||e._isSkirtDirty){if(!t$$(e))throw new t$_("terrainProvider is required.");this._terrainProvider=e,this._terrainProvider instanceof se$s&&(this._terrainProvider._quadtree=this._quadtree),t$$(this._quadtree)&&this._quadtree.invalidateAllTiles()}}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){l$G.setOwner(e,this,"_clippingPlanes")}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection.x=e.x,this._splitDirection.y=e.y}},excavationSideTextureUrl:{get:function(){return this._excavationSideTextureUrl},set:function(e){this._excavationSideTextureUrl=e}},excavationBottomTextureUrl:{get:function(){return this._excavationBottomTextureUrl},set:function(e){this._excavationBottomTextureUrl=e}}}),R$h.prototype.update=function(e){this._imageryLayers._update(),this.terrainProvider._isSkirtDirty&&(this.terrainProvider=this.terrainProvider,this.terrainProvider._isSkirtDirty=!1)},R$h.prototype.initialize=function(e){this._imageryLayers.queueReprojectionCommands(e),this._layerOrderChanged&&(this._layerOrderChanged=!1,this._quadtree.forEachLoadedTile((function(e){e.data.imagery.sort(pa)}))),ma(this,e);for(var t=this._vertexArraysToDestroy,i=t.length,n=0;n<i;++n)ca(t[n]);t.length=0,e._quadtree=this._quadtree},R$h.prototype.beginUpdate=function(e){for(var t=this._tilesToRenderByTextureCount,i=0,n=t.length;i<n;++i){var r=t[i];t$$(r)&&(r.length=0)}var o=this._clippingPlanes;t$$(o)&&o.enabled&&o.update(e),this._usedDrawCommands=0,this._modifyUsedDrawCommands=0},R$h.prototype.createTexture=function(e){if(t$$(this._hypsometricTexture)||(this._hypsometricTexture=new P$S({context:e,width:1024,height:64,pixelFormat:Z$_.RGBA,flipY:!1}),t$$(this._hypsometricSetting)&&this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._hypsometricSetting.ColorTable._imageBuffer})),t$$(this._slopeColorTexture)||(this._slopeColorTexture=new P$S({context:e,width:1024,height:64,pixelFormat:Z$_.RGBA,flipY:!1}),t$$(this._slopeSetting)&&this._slopeColorTexture.copyFrom({width:1024,height:64,arrayBufferView:this._slopeSetting.ColorTable._imageBuffer})),!t$$(this._slopeArrowsTexture)&&(this._slopeArrowsTexture=this._slopeArrowsTexture&&this._slopeArrowsTexture.destroy(),t$$(this._slopeArrowUrl))){var t=this;c$18(n$S(this._slopeArrowUrl),(function(i){t._slopeArrowUrl==t._slopeArrowUrl&&(t._slopeArrowsTexture=new P$S({context:e,source:i,sampler:new a$Q({wrapS:j$13.REPEAT,wrapT:j$13.REPEAT})}))}))}},R$h.prototype.updateHypRegionFrameBuffer=function(e){if(this._hypsometricRegionUpdate){if(!t$$(this._hypsometricRegion))return void(this._bUseHypRegion=!1);this._hypsometricRegionUpdate=!1,this._bUseHypRegion=!0,Oe$b(e.context,this._hypsometricRegion)}},R$h.prototype.updateSlopeRegionFrameBuffer=function(e){if(this._slopeRegionUpdate){if(!t$$(this._slopeRegion))return void(this._bUseSlopeRegion=!1);this._slopeRegionUpdate=!1,this._bUseSlopeRegion=!0,Oe$b(e.context,this._slopeRegion)}},R$h.prototype.endUpdate=function(e){if(t$$(this._renderState)||(this._renderState=p$1a.fromCache({cull:{enabled:this._cullEnabled},depthTest:{enabled:!0,func:Re$h.LESS}}),this._blendRenderState=p$1a.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:Re$h.LESS_OR_EQUAL},blending:Ee$s.ALPHA_BLEND})),e._fboState.frameBufferType!=B$y.CLAMP){if(!this.backFaceCulling&&!t$$(this._disableCullingRenderState)){var t=e$1W(this._renderState,!0);t.cull.enabled=!1,this._disableCullingRenderState=p$1a.fromCache(t),(t=e$1W(this._blendRenderState,!0)).cull.enabled=!1,this._disableCullingBlendRenderState=p$1a.fromCache(t)}this.createTexture(e.context),this.updateHypRegionFrameBuffer(e),this.updateSlopeRegionFrameBuffer(e),this._updateExcavateRegions(e),this._updateModifyRegions(e),this._updateExcavateGeometrys(e),this._updateImageryClipRegions(e),this._updateExtractRegions(e),za(this,e),ka(this,e),e.rasterLineWidth>1&&t$$(e.commandListRealtimeRaster)&&e.commandListRealtimeRaster.length>0&&(Va(this,e),Ga(this,e)),this._hasFillTilesThisFrame&&this._hasLoadedTilesThisFrame&&!1!==this.terrainProvider.isShowGlobe&&Y$n.updateFillTiles(this,this._quadtree._tilesToRender,e,this._vertexArraysToDestroy);for(var i=0,n=this._tilesToRenderByTextureCount,r=0,o=n.length;r<o;++r){var a=n[r];if(t$$(a)){var s=0;a.length>0&&(s=a[a.length-1]._level);for(var l=0,u=a.length;l<u;++l){a[l].realtimeRasterVectors(e,this),a[l].renderVectorBy2DCanvas(e,this);var c=a[l],h=c.data.tileBoundingRegion;if(c.data.terrainState!==Ie$c.INVALID){c.rasterClipRegion(e,this),t$$(c.data.modifyTerrainVertexArray)&&(!e._fboState.enabled||e._fboState.name.indexOf("_excavationGlobeHeight2")>-1)&&(tr$2(this,c,void 0,s,e,!0),Qr(e,c));for(var d=void 0,f=!1,p=e.camera._scene.terrainLayers._layers,_=1;_<p.length;_++){var m=p[_]._terrainProvider.tablename,$=c.data.terrain[m];if(t$$($)){if(t$$($.terrainData)&&t$$($.terrainData.hasInvalid)){if(!$.terrainData.hasInvalid){t$$($.terrainData)&&t$$($.vertexArray)&&t$$($.mesh)&&(c.data.terrainData=$.terrainData,c.data.vertexArray=$.vertexArray,c.data.mesh=$.mesh);break}f=!0}tr$2(this,c,$,s,e,!1,d),t$$($)&&(t$$($.mesh)&&!$.mesh.invalid&&t$$($.vertexArray)?($.realtimeRasterValidTerrain(e,this,c),d=$._rasterTerrainTexture):d=void 0)}}f&&Qr(e,c),tr$2(this,c,void 0,s,e,!1,d),t$$(c.data)&&t$$(c.data.terrainData)&&t$$(c.data.terrainData._maximumHeight)&&t$$(c.data.terrainData._minimumHeight)&&(0==l?i=.5*(c.data.terrainData._maximumHeight+c.data.terrainData._minimumHeight):i+=.5*(c.data.terrainData._maximumHeight+c.data.terrainData._minimumHeight))}e.minimumTerrainHeight=Math.min(e.minimumTerrainHeight,h.minimumHeight)}u>1&&(i/=u,e.averageTerrainHeight=i)}}if(e.commandListRealtimeRaster.length=0,!e.camera.bReflect)for(var g in this._excavateRegionCommands._hash)if((t$$(this._excavationSideTextureUrl)||!(g.indexOf("side")>-1))&&(t$$(this._excavationBottomTextureUrl)||!(g.indexOf("bottom")>-1))){var y=this._excavateRegionCommands._hash[g];e.commandList.push(y)}if(this._clipping){var v=e.camera.inverseViewMatrix,x=new c$1a;c$1a.transpose(v,x);for(_=0;_<6;_++)c$1a.multiplyByVector(x,this._oriClipPlane[_],this._clipPlane[_])}}},R$h.prototype.updateForPick=function(e){for(var t=this._drawCommands,i=0,n=this._usedDrawCommands;i<n;++i)e.commandList.push(t[i])},R$h.prototype.cancelReprojections=function(){this._imageryLayers.cancelReprojections()},R$h.prototype.getLevelMaximumGeometricError=function(e){return this._terrainProvider.getLevelMaximumGeometricError(e)},R$h.prototype.loadTile=function(e,t){var i=t.parent,n=t.data;if(t$$(i)&&t$$(i.data)&&i.data.terrainState===Ie$c.INVALID)return n.terrainState=Ie$c.INVALID,void(t.state=te$C.DONE);var r,o=!0;t$$(n)&&(o=n.boundingVolumeSourceTile!==t||t._lastSelectionResult===D$u.CULLED_BUT_NEEDED,r=n.terrainState);var a=t.level<3?this._oriTerrainProvider:this.terrainProvider;f$t.processStateMachine(t,e,a,this._terrainLayers,this._imageryLayers,this._vertexArraysToDestroy,o),n=t.data,o&&r!==t.data.terrainState&&this.computeTileVisibility(t,e,this.quadtree.occluders)&&n.boundingVolumeSourceTile===t&&(o=!1,f$t.processStateMachine(t,e,this.terrainProvider,this._terrainLayers,this._imageryLayers,this._vertexArraysToDestroy,o)),t.renderable&&this._tileLoadedEvent.raiseEvent(t)};var ya=new c$19,Yr=new s$1p,fa=new s$1p,_a=new i$1g;function Jt$3(e,t){if(t.west<t.east)return t;var i=s$1p.clone(t,fa);return s$1p.center(e,_a).longitude>0?i.east=n$1d.PI:i.west=-n$1d.PI,i}R$h.prototype.computeTileVisibility=function(e,t,i){var n=this.computeDistanceToTile(e,t);if(e._distance=n,t.fog.enabled&&n$1d.fog(n,t.fog.density)>=1)return pe$q.NONE;var r=e.data,o=r.tileBoundingRegion;if(void 0===r.boundingVolumeSourceTile)return pe$q.PARTIAL;var a=t.cullingVolume,s=e$1Y(r.modifyOrientedBoundingBox,r.orientedBoundingBox);if(!t$$(s)&&t$$(r.renderedMesh))for(var l in s=r.renderedMesh.boundingSphere3D,r.terrain)s=c$19.union(e,r.terrain[l].mesh.boundingSphere3D,s,s);r.clippedByBoundaries=!1;var u=Jt$3(e.rectangle,this.cartographicLimitRectangle),c=s$1p.simpleIntersection(u,e.rectangle,Yr);if(!t$$(c))return pe$q.NONE;if(s$1p.equals(c,e.rectangle)||(r.clippedByBoundaries=!0),t.mode!==b$1d.SCENE3D)for(var l in s=ya,c$19.fromRectangleWithHeights2D(e.rectangle,t.mapProjection,o.minimumHeight,o.maximumHeight,s),a$11.fromElements(s.center.z,s.center.x,s.center.y,s.center),t.mode===b$1d.MORPHING&&t$$(r.renderedMesh)&&(s=c$19.union(r.renderedMesh.boundingSphere3D,s,s)),r.terrain)s=c$19.union(e,r.terrain[l].mesh.boundingSphere3D,s,s);var h=this._clippingPlanes;if(t$$(h)&&h.enabled&&t$$(s)){var d=h.computeIntersectionWithBoundingVolume(s);if(e.isClipped=d!==cr$4.INSIDE,d===cr$4.OUTSIDE)return pe$q.NONE}var f=cr$4.INTERSECTING;if(t$$(s)){if((f=a.computeVisibility(s))===cr$4.OUTSIDE)for(var l in r.terrain)if(t$$(s=r.terrain[l].orientedBoundingBox)||(s=r.tileTerrainOrientedBoundingBox),t$$(s)&&(f=a.computeVisibility(s))!==cr$4.OUTSIDE)break;if(f===cr$4.OUTSIDE)return t$$(e.parent)&&t$$(e.parent.data.modifyOrientedBoundingBox)?a.computeVisibility(e.parent.data.modifyOrientedBoundingBox):pe$q.NONE}if(e.isModified)return f;var p=t.mode===b$1d.SCENE3D&&t.camera.frustum instanceof r$K;if(t.mode===b$1d.SCENE3D&&!p&&t$$(i)){var _=r.occludeePointInScaledSpace;return!t$$(_)||i.ellipsoid.isScaledSpacePointVisiblePossiblyUnderEllipsoid(_,o.minimumHeight)?f:pe$q.NONE}return f},R$h.prototype.canRefine=function(e){return!!t$$(e.data.terrainData)||void 0!==this.terrainProvider.getTileDataAvailable(2*e.x,2*e.y,e.level+1)};var xa=[],va=[];R$h.prototype.canRenderWithoutLosingDetail=function(e,t){var i=e.data,n=xa;n.length=this._imageryLayers.length;var r,o,a,s=!1,l=!1;for(t$$(i)&&(s=i.terrainState===Ie$c.READY,l=!0,r=i.imagery),o=0,a=n.length;o<a;++o)n[o]=l;if(t$$(r))for(o=0,a=r.length;o<a;++o){var u=r[o];if(!t$$(u.imageryLayer)){var c=u.loadingImagery,h=!t$$(c)||c.state===Tt$4.FAILED||c.state===Tt$4.INVALID,d=(u.loadingImagery||u.readyImagery).imageryLayer._layerIndex;n[d]=h&&n[d]}}var f=this.quadtree._lastSelectionFrameNumber,p=va;for(p.length=0,p.push(e.southwestChild,e.southeastChild,e.northwestChild,e.northeastChild);p.length>0;){var _=p.pop(),m=_._lastSelectionResultFrame===f?_._lastSelectionResult:D$u.NONE;if(m===D$u.RENDERED){if(!t$$(_.data))continue;if(!s&&_.data.terrainState===Ie$c.READY)return!1;var $=_.data.imagery;for(o=0,a=$.length;o<a;++o){var g=$[o];if(!t$$(g.imageryLayer)){var y=g.loadingImagery,v=!t$$(y)||y.state===Tt$4.FAILED||y.state===Tt$4.INVALID,x=(g.loadingImagery||g.readyImagery).imageryLayer._layerIndex;if(v&&!n[x])return!1}}}else m===D$u.REFINED&&p.push(_.southwestChild,_.southeastChild,_.northwestChild,_.northeastChild)}return!0};var Ta=new a$11;R$h.prototype.computeTileLoadPriority=function(e,t){var i=e.data;if(void 0===i)return 0;var n=i.orientedBoundingBox;if(void 0===n)return 0;var r=t.camera.positionWC,o=t.camera.directionWC,a=a$11.subtract(n.center,r,Ta),s=a$11.magnitude(a);return s<n$1d.EPSILON5?0:(a$11.divideByScalar(a,s,a),(1-a$11.dot(a,o))*e._distance)};var Xr=new c$1a,Rt$4=new c$1a,wa=new a$10,Ra=new a$10,Ca=new a$11,Kr=new a$11,Aa=new a$11,ba=new a$11;R$h.prototype.showTileThisFrame=function(e,t){for(var i=0,n=e.data.imagery,r=0,o=n.length;r<o;++r){var a=n[r];t$$(a.readyImagery)&&0!==a.readyImagery.imageryLayer.alpha&&++i}var s=this._tilesToRenderByTextureCount[i];t$$(s)||(s=[],this._tilesToRenderByTextureCount[i]=s),s.push(e),t$$(e.data.vertexArray)?this._hasLoadedTilesThisFrame=!0:this._hasFillTilesThisFrame=!0;var l=this._debug;++l.tilesRendered,l.texturesRendered+=i};var Sa=[new a$11,new a$11,new a$11,new a$11];function Ma(e,t,i,n,r,o){var a=e.quadtree._occluders.ellipsoid,s=a.ellipsoid,l=Sa;return a$11.fromRadians(i.west,i.south,r,s,l[0]),a$11.fromRadians(i.east,i.south,r,s,l[1]),a$11.fromRadians(i.west,i.north,r,s,l[2]),a$11.fromRadians(i.east,i.north,r,s,l[3]),a.computeHorizonCullingPointPossiblyUnderEllipsoid(t,l,n,o)}function La(e,t,i){var n=e.data;void 0===n&&(n=e.data=new f$t),void 0===n.tileBoundingRegion&&(n.tileBoundingRegion=new _$v({computeBoundingVolumes:t._enablePrjArea,rectangle:e.rectangle,ellipsoid:e.tilingScheme.ellipsoid,minimumHeight:0,maximumHeight:.1}));var r=n.terrainData,o=n.mesh,a=n.tileBoundingRegion,s=!1;for(var l in void 0!==o&&void 0!==o.minimumHeight&&void 0!==o.maximumHeight?(a.minimumHeight=o.minimumHeight,a.maximumHeight=o.maximumHeight,s=!0):void 0!==r&&void 0!==r._minimumHeight&&void 0!==r._maximumHeight?(a.minimumHeight=r._minimumHeight*i.terrainExaggeration,a.maximumHeight=r._maximumHeight*i.terrainExaggeration,s=!0):e.showInvalid&&(a.minimumHeight=0,a.maximumHeight=0,s=!0),n.terrain)t$$(n.terrain[l].mesh)?(a.minimumHeight=Math.min(n.terrain[l].mesh.minimumHeight,a.minimumHeight),a.maximumHeight=Math.max(n.terrain[l].mesh.maximumHeight,a.maximumHeight)):t$$(n.terrain[l].terrainData)?(a.minimumHeight=Math.min(n.terrain[l].terrainData._minimumHeight,a.minimumHeight),a.maximumHeight=Math.max(n.terrain[l].terrainData._maximumHeight,a.maximumHeight)):s=!1;if(s)return e;a.minimumHeight=Number.NaN,a.maximumHeight=Number.NaN;for(var u=e.parent;void 0!==u;){var c=u.data;if(void 0!==c){var h=c.mesh;if(void 0!==h&&void 0!==h.minimumHeight&&void 0!==h.maximumHeight)a.minimumHeight=h.minimumHeight,a.maximumHeight=h.maximumHeight,s=!0;else{var d=c.terrainData;void 0!==d&&void 0!==d._minimumHeight&&void 0!==d._maximumHeight&&(a.minimumHeight=d._minimumHeight*i.terrainExaggeration,a.maximumHeight=d._maximumHeight*i.terrainExaggeration,s=!0)}for(var l in c.terrain)t$$(c.terrain[l].mesh)?(a.minimumHeight=Math.min(c.terrain[l].mesh.minimumHeight,a.minimumHeight),a.maximumHeight=Math.max(c.terrain[l].mesh.maximumHeight,a.maximumHeight)):t$$(c.terrain[l].terrainData)?(a.minimumHeight=Math.min(c.terrain[l].terrainData._minimumHeight,a.minimumHeight),a.maximumHeight=Math.max(c.terrain[l].terrainData._maximumHeight,a.maximumHeight)):s=!1;if(s)return u}u=u.parent}}function Zr$1(e,t,i){return function(n){var r,o,a,s=-1,l=n.data.imagery,u=l.length;for(a=0;a<u;++a)if((o=e$1Y((r=l[a]).readyImagery,r.loadingImagery)).imageryLayer===t){s=a;break}if(-1!==s){var c=s+e;if(o=t$$(r=l[c])?e$1Y(r.readyImagery,r.loadingImagery):void 0,!t$$(o)||o.imageryLayer!==t)return!t._createTileImagerySkeletons(n,i,c);for(a=s;a<c;++a)l[a].freeResources();l.splice(s,e)}return!0}}R$h.prototype.computeDistanceToTile=function(e,t){var i=La(e,this.terrainProvider,t),n=e.data,r=n.tileBoundingRegion;if(void 0===i)return 9999999999;n.boundingVolumeSourceTile!==i&&(n.boundingVolumeSourceTile=i,t$$(e.rectangle)&&(n.orientedBoundingBox=b$1o.fromRectangle(e.rectangle,r.minimumHeight,r.maximumHeight,e.tilingScheme.ellipsoid,n.orientedBoundingBox),n.occludeePointInScaledSpace=Ma(this,n.orientedBoundingBox.center,e.rectangle,r.minimumHeight,r.maximumHeight,n.occludeePointInScaledSpace),n.tileTerrainOrientedBoundingBox=new b$1o(n.orientedBoundingBox.center,n.orientedBoundingBox.halfAxes)));var o=r.minimumHeight,a=r.maximumHeight;if(n.boundingVolumeSourceTile!==e){var s=t.camera.positionCartographic.height;Math.abs(s-o)>Math.abs(s-a)?(r.minimumHeight=o,r.maximumHeight=o):(r.minimumHeight=a,r.maximumHeight=a)}var l=r.distanceToCamera(t);return r.minimumHeight=o,r.maximumHeight=a,l},R$h.prototype._onLayerAdded=function(e,t){e.show&&(this._terrainProvider,this._imageLayerAdded(e,t),this._gridLayerAdded(e,t))},R$h.prototype._onLayerRemoved=function(e,t){t$$(e.imageryProvider)&&(this._quadtree.forEachLoadedTile((function(t){for(var i=t.data.imagery,n=-1,r=0,o=0,a=i.length;o<a;++o){var s=i[o],l=s.loadingImagery;if(t$$(l)||(l=s.readyImagery),l.imageryLayer===e)-1===n&&(n=o),s.freeResources(),++r;else if(-1!==n)break}-1!==n&&i.splice(n,r)})),t$$(e.imageryProvider)&&(e.imageryProvider._reload=void 0),this._imageryLayersUpdatedEvent.raiseEvent()),t$$(e.gridProvider)&&(this._quadtree.forEachLoadedTile((function(t){for(var i=t.data.gridImagery,n=-1,r=0,o=0,a=i.length;o<a;++o){var s=i[o],l=s.loadingGrid;if(t$$(l)||(l=s.readyGrid),l.gridLayer===e)-1===n&&(n=o),s.freeResources(),++r;else if(-1!==n)break}-1!==n&&i.splice(n,r)})),t$$(e.gridProvider)&&(e.gridProvider._reload=void 0))},R$h.prototype._onLayerMoved=function(e,t,i){this._layerOrderChanged=!0,this._imageryLayersUpdatedEvent.raiseEvent()},R$h.prototype._onLayerShownOrHidden=function(e,t,i){i?this._onLayerAdded(e,t):this._onLayerRemoved(e,t)},R$h.prototype._imageLayerAdded=function(e,t){var i=this._terrainProvider,n=this,r=e.imageryProvider;if(t$$(r)){var o=this._imageryLayersUpdatedEvent;r._reload=function(){e._imageryCache={},n._quadtree.forEachLoadedTile((function(t){if(!t$$(t._loadedCallbacks[e._layerIndex])){var n,r=t.data.imagery,o=r.length,a=-1,s=0;for(n=0;n<o;++n){var l=r[n];if(e$1Y(l.readyImagery,l.loadingImagery).imageryLayer===e)-1===a&&(a=n),++s;else if(-1!==a)break}if(-1!==a){var u=a+s;e._createTileImagerySkeletons(t,i,u)&&(t._loadedCallbacks[e._layerIndex]=Zr$1(s,e,i),t.state=te$C.LOADING)}}}))},this._quadtree.forEachLoadedTile((function(t){e._createTileImagerySkeletons(t,i)&&(t.state=te$C.LOADING,0!==t.level&&(t._lastSelectionResultFrame!==n.quadtree._lastSelectionFrameNumber||t._lastSelectionResult!==D$u.RENDERED)&&(t.renderable=!1))})),this._layerOrderChanged=!0,o.raiseEvent()}},R$h.prototype._gridLayerAdded=function(e,t){var i=this._terrainProvider,n=this,r=e.gridProvider;if(t$$(r)){var o=this._imageryLayersUpdatedEvent;r._reload=function(){e._gridCache={},n._quadtree.forEachLoadedTile((function(t){if(!t$$(t._loadedCallbacks[e._layerIndex])){var n,r=t.data.gridImagery,o=r.length,a=-1,s=0;for(n=0;n<o;++n){var l=r[n];if(e$1Y(l.readyGrid,l.loadingGrid).gridLayer===e)-1===a&&(a=n),++s;else if(-1!==a)break}if(-1!==a){var u=a+s;e._createTileImagerySkeletons(t,i,u)&&(t._loadedCallbacks[e._layerIndex]=Zr$1(s,e,i),t.state=te$C.LOADING)}}}))},this._quadtree.forEachLoadedTile((function(t){e._createTileImagerySkeletons(t,i)&&(t.state=te$C.LOADING,0!==t.level&&(t._lastSelectionResultFrame!==n.quadtree._lastSelectionFrameNumber||t._lastSelectionResult!==D$u.RENDERED)&&(t.renderable=!1))})),this._layerOrderChanged=!0,o.raiseEvent()}},R$h.prototype._onLayerUpdate=function(e,t){t$$(e.gridProvider)&&(this._quadtree.forEachLoadedTile((function(e){e.data.gridImagery.length>0&&(e.state=te$C.LOADING)})),e._isUpdate=!1)};var Ba=new c$1a,Ze$4=new a$10,$r,Jr,Ct$3;function Ea(e,t){var i={u_initialColor:function(){return this.properties.initialColor},u_fillHighlightColor:function(){return this.properties.fillHighlightColor},u_zoomedOutOceanSpecularIntensity:function(){return this.properties.zoomedOutOceanSpecularIntensity},u_oceanNormalMap:function(){return this.properties.oceanNormalMap},u_lightingFadeDistance:function(){return this.properties.lightingFadeDistance},u_nightFadeDistance:function(){return this.properties.nightFadeDistance},u_center3D:function(){return this.properties.center3D},u_tileRectangle:function(){return this.properties.tileRectangle},u_modifiedModelView:function(){var t=e.context.uniformState.view,i=c$1a.multiplyByPoint(t,this.properties.rtc,Kr);return c$1a.setTranslation(t,i,Xr),Xr},u_modifiedModelViewProjection:function(){var t=e.context.uniformState.view,i=e.context.uniformState.projection,n=c$1a.multiplyByPoint(t,this.properties.rtc,Kr);return c$1a.setTranslation(t,n,Rt$4),c$1a.multiply(i,Rt$4,Rt$4),Rt$4},u_dayTextures:function(){return this.properties.dayTextures},u_dayTextureTranslationAndScale:function(){return this.properties.dayTextureTranslationAndScale},u_transparentBackColor:function(){return this.properties.transparentBackColor},u_imageryClipEnable:function(){return this.properties.imageryClipEnable},u_dayTextureTexCoordsRectangle:function(){return this.properties.dayTextureTexCoordsRectangle},u_dayTextureUseWebMercatorT:function(){return this.properties.dayTextureUseWebMercatorT},u_dayTextureFlipY:function(){return this.properties.dayTextureFlipY},u_dayTextureAlpha:function(){var e=this.properties.morphingParentIndex;if(e>0){this.properties.morphingBeginTime<0&&(this.properties.morphingBeginTime=performance.now());var t=(performance.now()-this.properties.morphingBeginTime)/1e3;t=Math.min(t,1),this.properties.dayTextureAlpha[e]=1-t}return this.properties.dayTextureAlpha},u_dayTextureBrightness:function(){return this.properties.dayTextureBrightness},u_dayTextureContrast:function(){return this.properties.dayTextureContrast},u_dayTextureHue:function(){return this.properties.dayTextureHue},u_dayTextureSaturation:function(){return this.properties.dayTextureSaturation},u_dayTextureOneOverGamma:function(){return this.properties.dayTextureOneOverGamma},u_dayIntensity:function(){return this.properties.dayIntensity},u_southAndNorthLatitude:function(){return this.properties.southAndNorthLatitude},u_southMercatorYAndOneOverHeight:function(){return this.properties.southMercatorYAndOneOverHeight},u_waterMask:function(){return this.properties.waterMask},u_waterMaskTranslationAndScale:function(){return this.properties.waterMaskTranslationAndScale},u_minMaxHeight:function(){return this.properties.minMaxHeight},u_scaleAndBias:function(){return this.properties.scaleAndBias},u_dayTextureSplit:function(){return this.properties.dayTextureSplit},u_dayTextureSwipeRegion:function(){return this.properties.dayTextureSwipeRegion},u_GlobeAlpha:function(){return this.properties.globeAlpha},u_normalTexture:function(){return this.properties.normalTexture},u_normalTextureTranslationAndScale:function(){return this.properties.normalTextureTranslationAndScale},u_dayTextureCutoutRectangles:function(){return this.properties.dayTextureCutoutRectangles},u_clippingPlanes:function(){var i=t._clippingPlanes;return t$$(i)&&t$$(i.texture)?i.texture:e.context.defaultTexture},u_cartographicLimitRectangle:function(){return this.properties.localizedCartographicLimitRectangle},u_clippingPlanesMatrix:function(){var i=t._clippingPlanes;return t$$(i)?c$1a.multiply(e.context.uniformState.view,i.modelMatrix,Ba):c$1a.IDENTITY},u_clippingPlanesEdgeStyle:function(){var e=this.properties.clippingPlanesEdgeColor;return e.alpha=this.properties.clippingPlanesEdgeWidth,e},u_minimumBrightness:function(){return e.fog.minimumBrightness},u_hsbShift:function(){return this.properties.hsbShift},u_GlobeSplitDirection:function(){return this.properties.globeSplitDirection},u_GlobeSwipeRegion:function(){return Ze$4.x=this.properties.globeSwipeRegion.x*e.context.drawingBufferWidth,Ze$4.y=(1-this.properties.globeSwipeRegion.y)*e.context.drawingBufferHeight,Ze$4.z=this.properties.globeSwipeRegion.z*e.context.drawingBufferWidth,Ze$4.w=(1-this.properties.globeSwipeRegion.w)*e.context.drawingBufferHeight,Ze$4},u_polygonOffset:function(){return this.properties.polygonOffset},u_pickIDColor:function(){return e.pickIDColor},uHypContourFillMode:function(){return this.properties.hypContourFillMode},uHypContourInterval:function(){return this.properties.hypContourInterval},uHypFloor:function(){return this.properties.hypFloor},uHypCeil:function(){return this.properties.hypCeil},uHypOpacity:function(){return this.properties.hypOpacity},uHypLineColor:function(){return this.properties.hypLineColor},uHypsometricTexture:function(){return this.properties.hypsometricTexture},uHypsometricRenderTexture:function(){return this.properties.hypsometricRenderTexture},uHypHasAnalysisRegion:function(){return this.properties.hypHasAnalysisRegion},uHypRect:function(){return this.properties.hypRect},uHypMaxVisibleValue:function(){return this.properties.hypMaxVisibleValue},uHypMinVisibleValue:function(){return this.properties.hypMinVisibleValue},uHypHasColorTable:function(){return this.properties.hypHasColorTable},uSlopeFillMode:function(){return this.properties.slopeFillMode},uSlopeRect:function(){return this.properties.slopeRect},uSlopeFloor:function(){return this.properties.slopeFloor},uSlopeCeil:function(){return this.properties.slopeCeil},uSlopeOpacity:function(){return this.properties.slopeOpacity},uSlopeArrowsColor:function(){return this.properties.slopeArrowsColor},uSlopeColorTexture:function(){return this.properties.slopeColorTexture},uSlopePolygonTexture:function(){return this.properties.slopePolygonTexture},uSlopeArrowsTexture:function(){return this.properties.slopeArrowsTexture},uHasSlopeRegion:function(){return this.properties.hasSlopeRegion},uSlopeMaxVisibleValue:function(){return this.properties.slopeMaxVisibleValue},uSlopeMinVisibleValue:function(){return this.properties.slopeMinVisibleValue},uSlopeHasColorTable:function(){return this.properties.slopeHasColorTable},uLevel:function(){return this.properties.level},uTopLevel:function(){return this.properties.topLevel},clip_mode:function(){return this.properties.clip_mode},clip_planes:function(){return this.properties.clip_planes},clip_line_color:function(){return this.properties.clip_line_color},flattenTexture:function(){return this.properties.flattenTexture},uTileBounds:function(){return this.properties.tileBounds},u_gridTextures:function(){return this.properties.gridTextures},u_gridTextureTranslationAndScale:function(){return this.properties.gridTextureTranslationAndScale},u_gridTextureUseWebMercatorT:function(){return this.properties.gridTextureUseWebMercatorT},u_gridTextureTexCoordsRectangle:function(){return this.properties.gridTextureTexCoordsRectangle},uModifyRasterTexture:function(){return this.properties.modifyRasterTexture},uParentMixDirection:function(){return this.properties.parentMixDirection},uBaseColorFactor:function(){return this.properties.baseColorFactor},uMetallicFactor:function(){return this.properties.metallic},uRoughnessFactor:function(){return this.properties.roughness},uEmissionFactor:function(){return this.properties.emissionFactor},uFloodTexture:function(){return this.properties.floodTexture},uFloodRect:function(){return this.properties.floodRect},u_sunLightColor:function(){return this.properties.sunLightColor},u_ambientLightColor:function(){return this.properties.ambientLightColor},uFrontDepthTexture:function(){return this.properties.frontDepthTexture},uBackDepthTexture:function(){return this.properties.backDepthTexture},uFrontColorTexture:function(){return this.properties.frontColorTexture},properties:{initialColor:new a$10(0,0,.5,1),fillHighlightColor:new e$1z(0,0,0,0),zoomedOutOceanSpecularIntensity:.5,oceanNormalMap:void 0,lightingFadeDistance:new r$T(65e5,9e6),nightFadeDistance:new r$T(1e7,4e7),hsbShift:new a$11,center3D:void 0,rtc:new a$11,modifiedModelView:new c$1a,tileRectangle:new a$10,dayTextures:[],dayTextureTranslationAndScale:[],transparentBackColor:[],imageryClipEnable:[],dayTextureTexCoordsRectangle:[],dayTextureUseWebMercatorT:[],dayTextureFlipY:[],dayTextureAlpha:[],dayTextureBrightness:[],dayTextureContrast:[],dayTextureHue:[],dayTextureSaturation:[],dayTextureOneOverGamma:[],dayTextureSplit:[],dayTextureSwipeRegion:[],dayTextureCutoutRectangles:[],dayIntensity:0,colorsToAlpha:[],southAndNorthLatitude:new r$T,southMercatorYAndOneOverHeight:new r$T,waterMask:void 0,waterMaskTranslationAndScale:new a$10,minMaxHeight:new r$T,scaleAndBias:new c$1a,clippingPlanesEdgeColor:e$1z.clone(e$1z.WHITE),clippingPlanesEdgeWidth:0,localizedCartographicLimitRectangle:new a$10,globeAlpha:1,normalTexture:void 0,normalTextureTranslationAndScale:new a$10,tileBounds:new a$10,hypContourFillMode:0,uHypContourInterval:0,hypFloor:0,hypCeil:0,hypOpacity:1,hypLineColor:new e$1z,hypsometricTexture:void 0,hypsometricRenderTexture:void 0,hypHasAnalysisRegion:new a$10,hypRect:new a$10,hypMaxVisibleValue:0,hypMinVisibleValue:0,hypHasColorTable:!1,slopeFillMode:0,slopeRect:new a$10,slopeFloor:0,slopeCeil:0,slopeOpacity:1,slopeColorTexture:void 0,slopePolygonTexture:void 0,slopeArrowsTexture:void 0,hasSlopeRegion:!1,slopeMaxVisibleValue:0,slopeMinVisibleValue:0,slopeHasColorTable:!1,level:0,topLevel:0,clip_mode:0,clip_planes:void 0,clip_line_color:new e$1z,flattenTexture:void 0,gridTextures:[],gridTextureTranslationAndScale:[],gridTextureTexCoordsRectangle:[],gridTextureUseWebMercatorT:[],modifyRasterTexture:void 0,morphingParentIndex:-1,morphingBeginTime:-1,parentMixDirection:0,baseColorFactor:new a$10(1,1,1,1),metallic:0,roughness:0,emissionFactor:a$11.UNIT_XYZ,floodRect:new a$10,floodTexture:void 0,sunLightColor:new e$1z,ambientLightColor:new e$1z,frontDepthTexture:void 0,backDepthTexture:void 0,frontColorTexture:void 0}};return i}function Da(e,t,i){var n,r,o=i.data;if(t$$(o.vertexArray)?(n=o.mesh,r=o.vertexArray):t$$(o.fill)&&t$$(o.fill.vertexArray)&&(n=o.fill.mesh,r=o.fill.vertexArray),t$$(n)&&t$$(r)){if(t$$(o.wireframeVertexArray)){if(o.wireframeVertexArray.mesh===n)return;o.wireframeVertexArray.destroy(),o.wireframeVertexArray=void 0}o.wireframeVertexArray=Pa(e,r,n),o.wireframeVertexArray.mesh=n}}function Pa(e,t,i){var n={indices:i.indices,primitiveType:H$11.TRIANGLES};F$W.toWireframe(n);var r=n.indices,o=u$Y.createIndexBuffer({context:e,typedArray:r,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.fromSizeInBytes(r.BYTES_PER_ELEMENT)});return new x$18({context:e,attributes:t._attributes,indexBuffer:o})}!function(){var e,t,i=new m$P({geometry:a$T.fromDimensions({dimensions:new a$11(2,2,2)})}),n=new m$P({geometry:new a$D({radius:1})}),r=new c$1a;function o(e){return new y$H({geometryInstances:e,appearance:new r$u({translucent:!1,flat:!0}),asynchronous:!1})}$r=function(n,a){return n===e||(Ct$3(),e=n,r=c$1a.fromRotationTranslation(n.halfAxes,n.center,r),i.modelMatrix=r,i.attributes.color=r$I.fromColor(a),t=o(i)),t},Jr=function(i,a){return i===e||(Ct$3(),e=i,r=c$1a.fromTranslation(i.center,r),r=c$1a.multiplyByUniformScale(r,i.radius,r),n.modelMatrix=r,n.attributes.color=r$I.fromColor(a),t=o(n)),t},Ct$3=function(){t$$(t)&&(t.destroy(),t=void 0,e=void 0)}}();var Ha=new a$10(0,0,0,0),Ia={frameState:void 0,surfaceTile:void 0,numberOfDayTextures:void 0,applyBrightness:void 0,applyContrast:void 0,applyHue:void 0,applySaturation:void 0,applyGamma:void 0,applyAlpha:void 0,applySplit:void 0,applySwipe:void 0,showReflectiveOcean:void 0,showOceanWaves:void 0,enableLighting:void 0,dynamicAtmosphereLighting:void 0,dynamicAtmosphereLightingFromSun:void 0,showGroundAtmosphere:void 0,perFragmentGroundAtmosphere:void 0,hasVertexNormals:void 0,useWebMercatorProjection:void 0,enableFog:void 0,enableClippingPlanes:void 0,clippingPlanes:void 0,clippedByBoundaries:void 0,hasImageryLayerCutout:void 0,colorCorrect:void 0,numberOfGridTextures:void 0,gridUpdate:!1},$e$2=new a$10;function tr$2(e,t,i,n,r,o,a){var s=t.data;if(s.terrainState!==Ie$c.INVALID&&(!1!==e.terrainProvider.isShowGlobe||t$$(s.mesh)&&!s.mesh.invalid)&&(!t$$(i)||t$$(i.mesh)&&!i.mesh.invalid&&t$$(i.vertexArray))&&(t$$(s.vertexArray)||(void 0===s.fill&&(s.fill=new Y$n(t)),s.fill.update(e,r),t$$(t.data.fill.vertexArray)))){var l=r.creditDisplay,u=s.terrainData;if(t$$(i))u=i.terrainData;if(t$$(u)&&t$$(u.credits))for(var c=u.credits,h=0,d=c.length;h<d;++h)l.addCredit(c[h]);var f=e$1y.maximumTextureImageUnits,p=s.waterMaskTexture,_=s.waterMaskTranslationAndScale;!t$$(p)&&t$$(s.fill)&&(p=s.fill.waterMaskTexture,_=s.fill.waterMaskTranslationAndScale);var m=e.hasWaterMask&&t$$(p),$=e.oceanNormalMap,g=m&&t$$($),y=e.terrainProvider.ready&&e.terrainProvider.hasVertexNormals,v=t$$(e._PBRMaterialParams)&&e._PBRMaterialParams.roughness>0,x=r.fog.enabled,b=e.showGroundAtmosphere,S=q$Q.castShadows(e.shadows),w=q$Q.receiveShadows(e.shadows),C=e.hueShift,T=e.saturationShift,P=e.brightnessShift,E=!(n$1d.equalsEpsilon(C,0,n$1d.EPSILON7)&&n$1d.equalsEpsilon(T,0,n$1d.EPSILON7)&&n$1d.equalsEpsilon(P,0,n$1d.EPSILON7)),A=!1;if(b){var L,M=r.mode,I=r.camera;L=M===b$1d.SCENE2D||M===b$1d.COLUMBUS_VIEW?I.positionCartographic.height:a$11.magnitude(I.positionWC);var O=e.nightFadeOutDistance;M!==b$1d.SCENE3D&&(O-=r.mapProjection.ellipsoid.maximumRadius),A=L>O}var D=s.normalTexture,R=t$$(D),N=t$$(e._slopeSetting)&&e._slopeSetting.DisplayMode!==_0x55779b.DisplayMode.NONE&&e._bUseSlopeColorTable,F=t$$(e._hypsometricSetting)&&e._hypsometricSetting.DisplayMode!==J$O.DisplayMode.NONE&&e._bUseHypColorTable,B=t$$(r.camera._scene.globe._floodFlagTexture);m&&--f,g&&--f,R&&--f,N&&(f-=3),F&&(f-=2),r.shadowMaps.length>0&&--f,B&&--f;var z=!o&&t._clipRegionRasterized&&t.isModified,G=!o&&t._clipRegionRasterized&&(e._excavateRegions.length>0||e._extractRegions.length>0),k=!o&&t._clipRegionRasterized&&e._extractRegions.length>0,U=!o&&t._clipRegionRasterized&&!t.isModified&&e._imageryClipRegions.length>0,V=!o&&N&&!t.isModified&&t$$(e._slopeRegion),W=!o&&F&&!t.isModified&&t$$(e._hypsometricRegion)&&t$$(t._clipRasterTexture),H=!1,Y=!1;G&&-1===r._fboState.name.indexOf("_excavationGlobeHeight")&&(--f,H=e.clippingType===L$o.KeepOutside,Y=e.clippingType===L$o.KeepInside),z||(z=!t$$(i)&&t$$(a)),H||(H=!t$$(i)&&t$$(a)),U&&--f;var j=o?s.modifyTerrainMesh:s.renderedMesh;t$$(i)&&i.mesh&&(j=i.mesh);var q=j.center,X=j.encoding,K=wa,Z=0,J=0,Q=0,ee=0,te=!1;if(r.mode!==b$1d.SCENE3D){var ie=r.mapProjection,ne=ie.project(s$1p.southwest(t.rectangle),Aa),re=ie.project(s$1p.northeast(t.rectangle),ba);if(K.x=ne.x,K.y=ne.y,K.z=re.x,K.w=re.y,r.mode!==b$1d.MORPHING&&((q=Ca).x=0,q.y=.5*(K.z+K.x),q.z=.5*(K.w+K.y),K.x-=q.y,K.y-=q.z,K.z-=q.y,K.w-=q.z),r.mode===b$1d.SCENE2D&&X.quantization===me$D.BITS12){var oe=1/(Math.pow(2,12)-1)*.5,ae=(K.z-K.x)*oe,se=(K.w-K.y)*oe;K.x-=ae,K.y-=se,K.z+=ae,K.w+=se}ie instanceof e$1H&&(Z=t.rectangle.south,J=t.rectangle.north,Q=e$1H.geodeticLatitudeToMercatorAngle(Z),ee=1/(e$1H.geodeticLatitudeToMercatorAngle(J)-Q),te=!0)}var le=Ia;le.frameState=r,le.surfaceTile=s,le.showReflectiveOcean=m,le.showOceanWaves=g,le.enableLighting=e.enableLighting,le.dynamicAtmosphereLighting=e.dynamicAtmosphereLighting,le.dynamicAtmosphereLightingFromSun=e.dynamicAtmosphereLightingFromSun,le.showGroundAtmosphere=b,le.perFragmentGroundAtmosphere=A,le.hasVertexNormals=y,le.hasRoughness=v,le.useWebMercatorProjection=te,le.clippedByBoundaries=s.clippedByBoundaries,le.applyModify=z,le.applyExtract=k,le.excavationRegion=H,le.excavationOuter=Y;var ue=s.imagery;le.excavationGeometry=!1;var ce=[];if(t._useParentImage){ue=[];for(var he=0;he<s.imagery.length;he++){var de=!1,fe=s.imagery[he].readyImagery;if(t$$(fe)&&fe.imageryLayer.featherEdgesEnabled){var pe=t.parent;if(t$$(pe))for(var _e=fe.imageryLayer.imageryProvider.tablename,me=0;me<pe.data.imagery.length;me++){var $e=pe.data.imagery[me],ge=$e.readyImagery;if(t$$(ge))if((gt=ge.imageryLayer).imageryProvider.tablename===_e){ce[he]=gt._calculateTextureTranslationAndScale(t,$e),ue.push($e),de=!0;break}}}de||ue.push(s.imagery[he])}}var ye=0,ve=0,xe=ue.length,be=s.gridImagery,Se=be.length,we=[],Ce=[],Te=[];t$$(t._rasterTexture)&&(we.push(t._rasterTexture),Ce.push(new a$10(0,0,0,0)),Te.push(1),xe+=1),t$$(t._2DRasterTexture)&&(we.push(t._2DRasterTexture),Ce.push(new a$10(0,0,0,.1)),Te.push(t._2DRasterTexture.textureAlpha),xe+=1);var Pe=we.length,Ee=e.backFaceCulling?e._renderState:e._disableCullingRenderState,Ae=e.backFaceCulling?e._blendRenderState:e._disableCullingBlendRenderState,Le=Ee,Me=e._firstPassInitialColor,Ie=r.context;t$$(e._debug.boundingSphereTile)||Ct$3();var Oe=(4&r.useType)>0?1:0;Oe&&--f;var De=(2&r.useType)>0?1:0;De&&--f,t$$(r.mvtLayerCount)&&r.mvtLayerCount>0&&f--;var Re=r.multiViewportIndex>-1,Ne=o?e._modifyDrawCommands:e._drawCommands,Fe=o?e._modifyUniformMaps:e._uniformMaps;do{var Be,ze,Ge=o?e._modifyUsedDrawCommands:e._usedDrawCommands,ke=0;Ne.length<=Ge?((Be=new s$1d).owner=t,Be.cull=!1,Be.boundingVolume=new c$19,Be.orientedBoundingBox=void 0,ze=Ea(r,e),Ne.push(Be),Fe.push(ze)):(Be=Ne[Ge],ze=Fe[Ge]),Be.owner=t,o?++e._modifyUsedDrawCommands:++e._usedDrawCommands,t===e._debug.boundingSphereTile&&(t$$(s.orientedBoundingBox)?$r(s.orientedBoundingBox,e$1z.RED).update(r):t$$(s.boundingSphere3D)&&Jr(s.boundingSphere3D,e$1z.RED).update(r));var Ue=ze.properties;if(Ue.globeAlpha=e.globeAlpha,a$10.clone(Me,Ue.initialColor),e$1z.clone(r.lightSource.sunLightColor,Ue.sunLightColor),e$1z.clone(r.lightSource.ambientLightColor,Ue.ambientLightColor),Ue.oceanNormalMap=$,Ue.lightingFadeDistance.x=e.lightingFadeOutDistance,Ue.lightingFadeDistance.y=e.lightingFadeInDistance,Ue.nightFadeDistance.x=e.nightFadeOutDistance,Ue.nightFadeDistance.y=e.nightFadeInDistance,Ue.zoomedOutOceanSpecularIntensity=e.zoomedOutOceanSpecularIntensity,Ue.tileBounds.x=t.rectangle.west,Ue.tileBounds.y=t.rectangle.south,Ue.tileBounds.z=t.rectangle.east,Ue.tileBounds.w=t.rectangle.north,t$$(e._hypsometricSetting)&&(Ue.hypContourFillMode=e._hypsometricSetting.DisplayMode,Ue.hypContourInterval=e._hypsometricSetting.LineInterval,Ue.hypFloor=e._hypsometricSetting.ColorTableMinKey,Ue.hypCeil=e._hypsometricSetting.ColorTableMaxKey,Ue.hypOpacity=e._hypsometricSetting.Opacity,Ue.hypLineColor=e._hypsometricSetting.LineColor,Ue.hypsometricTexture=e._hypsometricTexture,Ue.hypsometricRenderTexture=e._hypsometricRenderTexture,Ue.hypHasAnalysisRegion=e._bUseHypRegion,Ue.hypRect=e._geoBounds,Ue.hypMaxVisibleValue=e._hypsometricSetting.MaxVisibleValue,Ue.hypMinVisibleValue=e._hypsometricSetting.MinVisibleValue,Ue.hypHasColorTable=e._bUseHypColorTable&&!De),v&&(Ue.baseColorFactor=e._PBRMaterialParams.baseColorFactor,Ue.metallic=e._PBRMaterialParams.metallic,Ue.roughness=e._PBRMaterialParams.roughness,Ue.emissionFactor=e._PBRMaterialParams.emissionFactor),t$$(e._slopeSetting)&&(Ue.slopeFillMode=e._slopeSetting.DisplayMode,Ue.slopeRect=e._slopeBound,Ue.slopeFloor=n$1d.toRadians(e._slopeSetting.ColorTableMinKey),Ue.slopeCeil=n$1d.toRadians(e._slopeSetting.ColorTableMaxKey),Ue.slopeOpacity=e._slopeSetting.Opacity,Ue.slopeColorTexture=e._slopeColorTexture,Ue.slopePolygonTexture=e._slopePolygonTexture,Ue.slopeArrowsTexture=e._slopeArrowsTexture,Ue.hasSlopeRegion=e._bUseSlopeRegion,Ue.slopeMaxVisibleValue=n$1d.toRadians(e._slopeSetting.MaxVisibleValue),Ue.slopeMinVisibleValue=n$1d.toRadians(e._slopeSetting.MinVisibleValue),Ue.slopeHasColorTable=e._bUseSlopeColorTable,Ue.slopeArrowsColor=e._slopeSetting.SlopeArrowsColor,Ue.level=t.level,Ue.topLevel=n),t$$(r.camera._scene.globe._floodFlagTexture)&&(Ue.floodRect=r.camera._scene.globe._floodRect,Ue.floodTexture=r.camera._scene.globe._floodFlagTexture),t$$(t._clipRasterTexture)?Ue.modifyRasterTexture=t._clipRasterTexture:!t$$(i)&&t$$(a)&&(Ue.modifyRasterTexture=a),e._excavationGeometrys&&e._excavationGeometrys.length>0){var Ve=e._excavationGeometrys.values[0];3===Ve.spatialQuery._textures.length&&(Ue.frontDepthTexture=Ve.spatialQuery._textures[0],Ue.backDepthTexture=Ve.spatialQuery._textures[1],Ue.frontColorTexture=Ve.spatialQuery._textures[2],le.excavationGeometry=!0)}Ue.clip_mode=e._clipMode,Ue.clip_planes=e._clipPlane,Ue.clip_line_color=e._clipLineColor,Ue.flattenTexture=e._flattenTexture;var We=!t$$(s.vertexArray)&&t$$(e.fillHighlightColor)&&e.fillHighlightColor.alpha>0;We&&e$1z.clone(e.fillHighlightColor,Ue.fillHighlightColor),Ue.center3D=j.center,a$11.clone(q,Ue.rtc),a$10.clone(K,Ue.tileRectangle),Ue.southAndNorthLatitude.x=Z,Ue.southAndNorthLatitude.y=J,Ue.southMercatorYAndOneOverHeight.x=Q,Ue.southMercatorYAndOneOverHeight.y=ee,Ue.globeSplitDirection=e.splitDirection,Ue.globeSwipeRegion=e._swipeRegion,Ue.polygonOffset=e._polygonOffset.value;var He=Ra,Ye=Jt$3(t.rectangle,e.cartographicLimitRectangle);a$11.fromElements(C,T,P,Ue.hsbShift);var je=t.rectangle,qe=1/je.width,Xe=1/je.height;He.x=(Ye.west-je.west)*qe,He.y=(Ye.south-je.south)*Xe,He.z=(Ye.east-je.west)*qe,He.w=(Ye.north-je.south)*Xe,a$10.clone(He,Ue.localizedCartographicLimitRectangle);var Ke=x&&n$1d.fog(t._distance,r.fog.density)>n$1d.EPSILON3;E=E&&(Ke||b);for(var Ze=!1,Je=!1,Qe=!1,et=!1,tt=!1,it=!1,nt=!1,rt=!1,ot=!1,at=!1,st=!r$T.equals(e.splitDirection,r$T.ZERO),lt=e._swipeEnabled,ut=[],ct=e._polygonOffset.enabled;ke<f&&ye<xe;)if(ye!=xe-Pe||0==Pe){var ht=ue[ye],dt=ce[ye],ft=ht.readyImagery;if(++ye,!t$$(ft)||ht.discard)continue;var pt=r.camera._positionCartographic.height,_t=ft.imageryLayer.maxHeight,mt=ft.imageryLayer.minHeight;if(ft.imageryLayer._inVisibleHeightRange=pt>_t||pt<mt?0:1,ft.imageryLayer.alpha*ft.imageryLayer._inVisibleHeightRange==0||(ft.setVisible(!0),Re&&!ft.imageryLayer._isBaseLayer&&!ft.imageryLayer.getVisibleInViewport(r.multiViewportIndex)))continue;if(r.camera._scene._mvtVisibleControl){var $t=r.camera._scene._mvtVisibleLevel;if(t$$(ft.isMvtTexture)&&ft.isMvtTexture&&!(t._level>r.camera._endLevel-$t))continue}if(!t$$(Ot=ht.useWebMercatorT?ft.textureWebMercator:ft.texture))throw new t$_("readyImagery is not actually ready!");var gt=ft.imageryLayer;if(t$$(ft.isMvtTexture)&&ft.isMvtTexture){var yt=ft.imageryLayer._selectColor;ut.push({textureIndex:ke,selectColor:yt})}if(t$$(ht.textureTranslationAndScale)||(ht.textureTranslationAndScale=gt._calculateTextureTranslationAndScale(t,ht)),Ue.dayTextures[ke]=Ot,Ue.dayTextureTranslationAndScale[ke]=ht.textureTranslationAndScale,Ue.dayTextureTexCoordsRectangle[ke]=ht.textureCoordinateRectangle,t$$(dt)&&(Ue.dayTextureTranslationAndScale[ke]=dt,Ue.dayTextureTexCoordsRectangle[ke]=new a$10(0,0,1,1)),Ue.dayTextureUseWebMercatorT[ke]=ht.useWebMercatorT,Ue.dayTextureFlipY[ke]=ht.flipY,(wt=new a$10).x=gt.transparentBackColor.red,wt.y=gt.transparentBackColor.green,wt.z=gt.transparentBackColor.blue,wt.w=gt.transparentBackColorTolerance,Ue.transparentBackColor[ke]=wt,Ue.imageryClipEnable[ke]=gt.enableImageryClip,Ue.dayTextureAlpha[ke]=e$1Y(ht.morphingAlpha,gt.alpha),it=it||1!==Ue.dayTextureAlpha[ke],ht.morphingAlpha<1){var vt=ue[ye-1];t$$(vt)&&!t$$(vt.loadingImagery)&&(Ue.morphingParentIndex=ke,Ue.morphingBeginTime=vt.morphingBeginTime)}Ue.dayTextureBrightness[ke]=gt.brightness,Ze=Ze||Ue.dayTextureBrightness[ke]!==u$p.DEFAULT_BRIGHTNESS,Ue.dayTextureContrast[ke]=gt.contrast,Je=Je||Ue.dayTextureContrast[ke]!==u$p.DEFAULT_CONTRAST,Ue.dayTextureHue[ke]=gt.hue,Qe=Qe||Ue.dayTextureHue[ke]!==u$p.DEFAULT_HUE,Ue.dayTextureSaturation[ke]=gt.saturation,et=et||Ue.dayTextureSaturation[ke]!==u$p.DEFAULT_SATURATION,Ue.dayTextureOneOverGamma[ke]=1/gt.gamma,tt=tt||Ue.dayTextureOneOverGamma[ke]!==1/u$p.DEFAULT_GAMMA,Ue.dayTextureSplit[ke]=gt.splitDirection,$e$2.x=gt._swipeRegion.x*r.context.drawingBufferWidth,$e$2.y=(1-gt._swipeRegion.y)*r.context.drawingBufferHeight,$e$2.z=gt._swipeRegion.z*r.context.drawingBufferWidth,$e$2.w=(1-gt._swipeRegion.w)*r.context.drawingBufferHeight,Ue.dayTextureSwipeRegion[ke]=a$10.clone($e$2,new a$10),nt=nt||!r$T.equals(Ue.dayTextureSplit[ke],r$T.ZERO),rt=rt||gt.swipeEnabled;var xt=Ue.dayTextureCutoutRectangles[ke];if(t$$(xt)||(xt=Ue.dayTextureCutoutRectangles[ke]=new a$10),a$10.clone(a$10.ZERO,xt),t$$(gt.cutoutRectangle)){var bt=Jt$3(je,gt.cutoutRectangle);ot=t$$(s$1p.simpleIntersection(bt,je,Yr))||ot,xt.x=(bt.west-je.west)*qe,xt.y=(bt.south-je.south)*Xe,xt.z=(bt.east-je.west)*qe,xt.w=(bt.north-je.south)*Xe}var St=Ue.colorsToAlpha[ke];t$$(St)||(St=Ue.colorsToAlpha[ke]=new a$10);var wt,Ct=t$$(gt.colorToAlpha)&>.colorToAlphaThreshold>0;if(at=at||Ct,Ct){var Tt=gt.colorToAlpha;St.x=Tt.red,St.y=Tt.green,St.z=Tt.blue,St.w=gt.colorToAlphaThreshold}else St.w=-1;if(++ke,t$$(ft.idTexture))Ue.dayTextures[ke]=ft.idTexture,Ue.dayTextureTranslationAndScale[ke]=ht.textureTranslationAndScale,Ue.dayTextureTexCoordsRectangle[ke]=ht.textureCoordinateRectangle,Ue.dayTextureUseWebMercatorT[ke]=ht.useWebMercatorT,(wt=new a$10).x=gt.transparentBackColor.red,wt.y=gt.transparentBackColor.green,wt.z=gt.transparentBackColor.blue,wt.w=gt.transparentBackColor,Ue.transparentBackColor[ke]=wt,Ue.dayTextureAlpha[ke]=gt.alpha,Ue.dayTextureBrightness[ke]=gt.brightness,Ue.dayTextureContrast[ke]=gt.contrast,Ue.dayTextureHue[ke]=gt.hue,Ue.dayTextureSaturation[ke]=gt.saturation,Ue.dayTextureOneOverGamma[ke]=1/gt.gamma,Ue.dayTextureSplit[ke]=gt.splitDirection,Ue.dayTextureSwipeRegion[ke]=gt._swipeRegion,ke++;if(t$$(ft.credits))for(var Pt=ft.credits,Et=0,At=Pt.length;Et<At;++Et)l.addCredit(Pt[Et])}else{if(++ye,!t$$(Ot=we[ve]))throw new t$_("readyImagery is not actually ready!");Ue.dayTextures[ke]=Ot,Ue.dayTextureTranslationAndScale[ke]=new a$10(0,0,1,1),Ue.transparentBackColor[ke]=Ce[ve],Ue.dayTextureTexCoordsRectangle[ke]=new a$10(0,0,1,1),Ue.dayTextureUseWebMercatorT[ke]=!1,Ue.dayTextureAlpha[ke]=Te[ve],it=it||1!==Te[ve],Ue.dayTextureBrightness[ke]=1,Ze=!1,Ue.dayTextureContrast[ke]=1,Je=!1,Ue.dayTextureHue[ke]=0,Qe=!1,Ue.dayTextureSaturation[ke]=1,et=!1,Ue.dayTextureOneOverGamma[ke]=1,tt=!1,Ue.dayTextureSplit[ke]=new r$T(0,0),Ue.dayTextureSwipeRegion[ke]=r.realtimeRasterSwipeParams.swipeRegion,nt=!0,rt=r.realtimeRasterSwipeParams.swipeEnabled,ve++,++ke}for(var Lt=0,Mt=0,It=!1;Lt<f-ke&&Mt<Se;){var Ot,Dt=be[Mt],Rt=Dt.readyGrid;if(++Mt,null!=Rt&&(!Re||Rt.gridLayer.getVisibleInViewport(r.multiViewportIndex)))if(null!=(Ot=Dt.useWebMercatorT?Rt.textureWebMercator:Rt.texture)){Rt.needUpdate&&(It=!0,Rt.needUpdate=!1);var Nt=Rt.gridLayer;t$$(Dt.textureTranslationAndScale)||(Dt.textureTranslationAndScale=Nt._calculateTextureTranslationAndScale(t,Dt)),Ue.gridTextures[Lt]=Ot,Ue.gridTextureTranslationAndScale[Lt]=Dt.textureTranslationAndScale,Ue.gridTextureTexCoordsRectangle[Lt]=Dt.textureCoordinateRectangle,Ue.gridTextureUseWebMercatorT[Lt]=Dt.useWebMercatorT,Lt++}}Ue.gridTextures.length=Lt,Ue.dayTextures.length=ke,Ue.waterMask=p,a$10.clone(_,Ue.waterMaskTranslationAndScale),Ue.minMaxHeight.x=X.minimumHeight,Ue.minMaxHeight.y=X.maximumHeight,c$1a.clone(X.matrix,Ue.scaleAndBias);var Ft=e._clippingPlanes,Bt=t$$(Ft)&&Ft.enabled&&t.isClipped;Bt&&(Ue.clippingPlanesEdgeColor=e$1z.clone(Ft.edgeColor,Ue.clippingPlanesEdgeColor),Ue.clippingPlanesEdgeWidth=Ft.edgeWidth),t$$(e.uniformMap)&&(ze=s$1n(ze,e.uniformMap)),le.numberOfDayTextures=ke,le.applyBrightness=Ze,le.applyContrast=Je,le.applyHue=Qe,le.applySaturation=et,le.applyGamma=tt,le.applyAlpha=it,le.applySplit=nt,le.applySwipe=rt,le.applyGlobeSwipe=lt,le.applyGlobeSplit=st,le.enableFog=Ke,le.enableClippingPlanes=Bt,le.clippingPlanes=Ft,le.hasImageryLayerCutout=ot,le.colorCorrect=E,le.isHeight=Oe,le.isColor=De,le.hasNormalMap=R,le.hasHypsometricSetting=F,le.hasSlopeAnalysis=N,le.highlightFillTile=We,le.colorToAlpha=at,le.mvtTextureObj=ut,le.numberOfGridTextures=Lt,le.gridUpdate=It,le.applyPolygonOffset=ct,le.mixDirection=0,le.mixIndex=0,le.hasFlood=B,le.applyImageryClip=U,le.hasHypsometricRegion=W,le.applySlopeRegion=V;var zt=j.indices.length;e.showSkirts||(zt=j.indexCountWithoutSkirts),zt=o?s.modifyTerrainVertexArray._indexBuffer.numberOfIndices:zt,Ue.normalTexture=D,a$10.clone(s.normalTextureTranslationAndScale,Ue.normalTextureTranslationAndScale),Be.shaderProgram=e._surfaceShaderSet.getShaderProgram(le),Be.castShadows=S,Be.receiveShadows=w,Be.renderState=e.globeAlpha<1&&r.camera.positionCartographic.height<1e5?Ae:Le,Be.primitiveType=H$11.TRIANGLES,t$$(i)?Be.vertexArray=o?s.modifyTerrainVertexArray:i.vertexArray:Be.vertexArray=o?s.modifyTerrainVertexArray:s.subDivisionVertexArray||s.vertexArray||s.fill.vertexArray,Be.count=zt,Be.uniformMap=ze,Be.pass=e.globeAlpha<1?we$l.TRANSLUCENT:we$l.GLOBE,Be.opaquePass=we$l.GLOBE,e._debug.wireframe&&(Da(Ie,e,t),t$$(s.wireframeVertexArray)&&(Be.vertexArray=s.wireframeVertexArray,Be.primitiveType=H$11.LINES));var Gt=Be.boundingVolume,kt=Be.orientedBoundingBox;if(r.mode!==b$1d.SCENE3D){var Ut=s.tileBoundingRegion;c$19.fromRectangleWithHeights2D(t.rectangle,r.mapProjection,Ut.minimumHeight,Ut.maximumHeight,Gt),a$11.fromElements(Gt.center.z,Gt.center.x,Gt.center.y,Gt.center),r.mode===b$1d.MORPHING&&(Gt=c$19.union(j.boundingSphere3D,Gt,Gt))}else Be.boundingVolume=c$19.clone(j.boundingSphere3D,Gt),Be.orientedBoundingBox=b$1o.clone(s.orientedBoundingBox,kt),t$$(Be.boundingVolume)||(Be.boundingVolume=c$19.fromOrientedBoundingBox(Be.orientedBoundingBox));Be.dirty=!0,Be.invalid=e$1Y(t.invalid,!1),r.commandList.push(Be),Le=Ae,Me=Ha}while(ye<xe)}}var ei$2=new a$11,At$2=new i$1g;function Fa(e,t){for(var i=c$1a.getTranslation(t,new a$11),n=e.attributes.position.values,r=n.length,o=0;o<r;o+=3){a$11.unpack(n,o,ei$2),i$1g.fromCartesian(ei$2,void 0,At$2);var a=n$1d.toDegrees(At$2.longitude);a-=i.x;var s=n$1d.toDegrees(At$2.latitude);s-=i.y,n[o]=a,n[o+1]=s,n[o+2]=At$2.height-1}}function Oe$b(e,t){if(!t$$(t.command)){var i=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:t.modelMatrix});Fa(t.worldGeometry,t.modelMatrix),i.vertexArray=x$18.fromGeometry({context:e,geometry:t.worldGeometry,attributeLocations:{position:0},bufferUsage:A$13.STATIC_DRAW,interleave:!0});var n=["attribute vec4 position;","varying float vHeight;","void main()","{"," vHeight = position.z;"," gl_Position = czm_modelViewProjection * vec4(position.xy, 0.0, 1.0);","}"].join("\n"),r=["varying float vHeight;","void main()","{"," gl_FragColor = czm_packValue(vHeight);","}"].join("\n"),o=new a$O({sources:[n]}),a=new a$O({sources:[r]});i.shaderProgram=p$15.fromCache({context:e,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:{position:0}}),t.command=i}}function Ne$7(e){var t=e._clipRasterTilesMap;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];n._clipRasterTexture=n._clipRasterTexture&&!n._clipRasterTexture.isDestroyed()&&n._clipRasterTexture.destroy(),n._clipRasterFbo=n._clipRasterFbo&&!n._clipRasterFbo.isDestroyed()&&n._clipRasterFbo.destroy(),n._clipRegionsCount=0,n._clipRegionRasterized=!1}}function rr$2(e,t){var i=e._clipRasterTilesMap;for(var n in i)if(i.hasOwnProperty(n)){var r=i[n];t$$(s$1p.intersection(t,r.rectangle))||(r._clipRasterTexture=r._clipRasterTexture&&!r._clipRasterTexture.isDestroyed()&&r._clipRasterTexture.destroy(),r._clipRasterFbo=r._clipRasterFbo&&!r._clipRasterFbo.isDestroyed()&&r._clipRasterFbo.destroy(),r._clipRegionsCount=0,r._clipRegionRasterized=!1)}}function ir$3(e,t,i){if(i){var n=e.camera._projection.project(i$1g.fromDegrees(t.positions[0],t.positions[1]));n=new a$11(n.z,n.x,n.y),t._excavateMatrix=c$1a.fromTranslation(n)}else t._excavateMatrix=m$13.eastNorthUpToFixedFrame(a$11.fromDegrees(t.positions[0],t.positions[1]))}function ti$3(e,t){!t._excavationSideTexture&&t$$(t._excavationSideTextureUrl)&&c$18(t$X.createIfNeeded(t._excavationSideTextureUrl).fetchImage(),(function(i){t._excavationSideTexture=new P$S({context:e.context,source:i,sampler:new a$Q({wrapS:t._excavateTextureWrap,wrapT:t._excavateTextureWrap})}),t._excavationSideTexture.generateMipmap(D$12.NICEST)}))}function ri$2(e,t){!t._excavationBottomTexture&&t$$(t._excavationBottomTextureUrl)&&c$18(t$X.createIfNeeded(t._excavationBottomTextureUrl).fetchImage(),(function(i){t._excavationBottomTexture=new P$S({context:e.context,source:i})}))}function ii$4(e,t){!t._excavationNormalTexture&&t$$(t.excavationNormalTextureUrl)&&c$18(t$X.createIfNeeded(t.excavationNormalTextureUrl).fetchImage(),(function(i){t._excavationNormalTexture=new P$S({context:e.context,source:i})}));!t._excavationSideNormalTexture&&t$$(t.excavationSideNormalTextureUrl)&&c$18(t$X.createIfNeeded(t.excavationSideNormalTextureUrl).fetchImage(),(function(i){t._excavationSideNormalTexture=new P$S({context:e.context,source:i,sampler:new a$Q({wrapS:j$13.REPEAT,wrapT:j$13.REPEAT})})}))}R$h.prototype._updateExcavateRegions=function(e){if(!(!this._excavateRegionUpdate||e.camera.bReflect||this._tilesToRenderByTextureCount.length<1)){for(var t in this._excavateRegionUpdate=!1,e._framebufferList)t.indexOf("_excavationGlobeHeight")>-1&&!t$$(this._excavateRegions.get(t.slice(22)))&&(e._framebufferList[t]=!e._framebufferList[t].isDestroyed()&&e._framebufferList[t].destroy(),delete e._framebufferList[t]);if(this._excavateRegions.length<1)return void Ne$7(this);this._onceExcavateRegionsEmpty&&(Ne$7(this),this._onceExcavateRegionsEmpty=!1);var i=!1;e.camera._scene.mode===b$1d.COLUMBUS_VIEW&&(i=!0);var n=Je$3(this._excavateRegions.values);rr$2(this,n),this._excavateRectangle=n,ti$3(e,this),ri$2(e,this),ii$4(e,this);for(var r=this._excavateRegions.length,o=0;o<r;o++){var a=this._excavateRegions.values[o];ir$3(e,a,i),Oe$b(e.context,a),this._excavateTransparent||(ar$1(e,this,a,i),or$1(e,this,a,i))}}},R$h.prototype._updateExcavateGeometrys=function(e){if(!this._excavationGeometrys||0!==this._excavationGeometrys.length){var t=this._excavationGeometrys.values[0];t.spatialQuery._updateTextures(e.context,e),t.spatialQuery.update(e.context,e,e.commandList)}},R$h.prototype._updateExtractRegions=function(e){if(this._extractRegionsUpdate&&!e.camera.bReflect){for(var t in this._extractRegionsUpdate=!1,e._framebufferList)t.indexOf("_excavationGlobeHeight")>-1&&!t$$(this._extractRegions.get(t.slice(22)))&&(e._framebufferList[t]=!e._framebufferList[t].isDestroyed()&&e._framebufferList[t].destroy(),delete e._framebufferList[t]);if(this._extractRegions.length<1)Ne$7(this);else{this._onceExcavateRegionsEmpty&&(Ne$7(this),this._onceExcavateRegionsEmpty=!1);var i=!1;e.camera._scene.mode===b$1d.COLUMBUS_VIEW&&(i=!0);var n=Je$3(this._extractRegions.values);rr$2(this,n),this._excavateRectangle=n,ti$3(e,this),ri$2(e,this),ii$4(e,this);for(var r=this._extractRegions.length,o=0;o<r;o++){ir$3(e,d=this._extractRegions.values[o],i),Oe$b(e.context,d),this._extractTransparent||(ar$1(e,this,d,i),or$1(e,this,d,i),ar$1(e,this,d,i,!0),or$1(e,this,d,i,!0))}if(0!==this._quadtree._tilesToRender.length&&!(this._quadtree._tilesToRender[0].level<10)){if(r<1)return void ai$3(this);oi$2(this,n);var a=nr$1(this._quadtree._tilesToRender,n);if(t$$(a)&&t$$(a.data)){var s=a.data,l=e.context,u=[],c=Number.MAX_VALUE,h=Number.MIN_VALUE;for(o=0;o<r;o++){var d=this._extractRegions.values[o];u.push(d.geometry_extract),c=Math.min(c,d.minimumHeight),h=Math.max(h,d.maximumHeight)}s.createModifyVertexArray(l,this,a,u,c,h,!1),t$$(s.modifyTerrainVertexArray)&&we$a(l,this,a,n,u,c,h,!0)}}}}else this._extractRegions.length>0&&this._updateModifyTiles(e,this._extractRegions.values,!0)},R$h.prototype._updateImageryClipRegions=function(e){if(this._imageryClipRegionUpate&&!e.camera.bReflect){if(this._imageryClipRegionUpate=!1,this._imageryClipRegions.length<1)return void Ne$7(this);this._onceImageryClipRegionsEmpty&&(Ne$7(this),this._onceImageryClipRegionsEmpty=!1),rr$2(this,Je$3(this._imageryClipRegions.values));for(var t=this._imageryClipRegions.length,i=0;i<t;i++){var n=this._imageryClipRegions.values[i];ir$3(e,n,false),Oe$b(e.context,n)}}},R$h.prototype._removeAllExcavationCommands=function(){for(var e=Object.keys(this._excavateRegions._hash),t=0,i=e.length;t<i;t++){var n=e[t];this._removeExcavationCommands(n)}},R$h.prototype._removeAllExtractCommands=function(){for(var e=Object.keys(this._extractRegions._hash),t=0,i=e.length;t<i;t++){var n=e[t];this._removeExtractCommands(n)}this.modifyParentTiles=void 0},R$h.prototype._removeExcavationCommands=function(e){var t=this._excavateRegions.get(e);t.heightBuffer=t.heightBuffer&&!t.heightBuffer.isDestroyed()&&t.heightBuffer.destroy();var i=this._excavateRegionCommands.get(e+"side"),n=this._excavateRegionCommands.get(e+"bottom");i&&(i.vertexArray=i.vertexArray&&!i.vertexArray.isDestroyed()&&i.vertexArray.destroy()),n&&(n.vertexArray=n.vertexArray&&!n.vertexArray.isDestroyed()&&n.vertexArray.destroy()),this._excavateRegionCommands.remove(e+"side"),this._excavateRegionCommands.remove(e+"bottom")},R$h.prototype._removeExtractCommands=function(e){var t=this._extractRegions.get(e);t.heightBuffer=t.heightBuffer&&!t.heightBuffer.isDestroyed()&&t.heightBuffer.destroy(),t.heightBuffer2=t.heightBuffer2&&!t.heightBuffer2.isDestroyed()&&t.heightBuffer2.destroy();var i=this._excavateRegionCommands.get(e+"side"),n=this._excavateRegionCommands.get(e+"side_extract"),r=this._excavateRegionCommands.get(e+"bottom"),o=this._excavateRegionCommands.get(e+"bottom_extract");i&&(i.vertexArray=i.vertexArray&&!i.vertexArray.isDestroyed()&&i.vertexArray.destroy()),n&&(n.vertexArray=n.vertexArray&&!n.vertexArray.isDestroyed()&&n.vertexArray.destroy()),r&&(r.vertexArray=r.vertexArray&&!r.vertexArray.isDestroyed()&&r.vertexArray.destroy()),o&&(o.vertexArray=o.vertexArray&&!o.vertexArray.isDestroyed()&&o.vertexArray.destroy()),this._excavateRegionCommands.remove(e+"side"),this._excavateRegionCommands.remove(e+"bottom"),this._excavateRegionCommands.remove(e+"side_extract"),this._excavateRegionCommands.remove(e+"bottom_extract"),this.modifyParentTiles=void 0};var Te$d=new r$K,Oa=new f$V;function Na(e,t,i,n){var r=e.camera._projection,o=e.camera;if(!o.bReflect){var a=t,s=a.width,l=a.height,u=6378137*Math.cos(a.south+.5*l)*Math.sin(s)*.5,c=6378137*Math.sin(l)*.5;if(s=u,l=c,n){var h=r.project(new i$1g(a.west,a.south)),d=r.project(new i$1g(a.east,a.north));s=(d.x-h.x)/2,l=(d.y-h.y)/2}var f=o.frustum.clone(Oa),p=o._scene.globe.globeAlpha,_=new a$11,m=new a$11,$=new a$11,g=new c$1a;i.isUpdate=!0,t$$(i._beginFunc)||(i._beginFunc=function(){p=o._scene.globe.globeAlpha,o._scene.globe.globeAlpha=1,a$11.clone(o.position,_),a$11.clone(o.direction,m),a$11.clone(o.up,$),c$1a.clone(o.transform,g),o._setTransform(c$1a.IDENTITY),o.setView({destination:a$11.fromRadians(a.west+.5*a.width,a.south+.5*a.height,1e4)}),Te$d.width=2*s,Te$d.height=2*l,Te$d.near=1,Te$d.far=1e6,Te$d.aspectRatio=s/l,o.frustum=Te$d,e.context.uniformState.updateFrustum(Te$d)}),t$$(i._endFunc)||(i._endFunc=function(){o._scene.globe.globeAlpha=p,i.isUpdate=!1,o.frustum=f,o._setTransform(g),a$11.clone(_,o.position),a$11.clone(m,o.direction),a$11.clone($,o.up),a$11.cross(m,$,o.right),e.context.uniformState.updateFrustum(o.frustum)})}}function ar$1(e,t,i,n,r){var o=e.camera._projection,a=t._excavateRegionCommands;if((!a.contains(i.name+"side")||r)&&(!a.contains(i.name+"side_extract")||!r)){var s=e.context,l=c$1a.inverse(i._excavateMatrix,new c$1a),u=i.positions,c=i.rectangle,h=c.east-c.west,d=c.north-c.south,f=u.length/3,p=new Float32Array(8*f),_=new Float32Array(6*f),m=new Float32Array(4*f),$=new Uint16Array(6*f),g=new a$11,y=n$13.fromRectangle(i.rectangle);Math.max(y.width/100,1),Math.max(y.height/100,1);for(var v=0;v<f;v++){var x,b;n?(x=new a$11((x=o.project(i$1g.fromDegrees(u[3*v+0],u[3*v+1],-1e4))).z,x.x,x.y),b=new a$11((b=o.project(i$1g.fromDegrees(u[3*v+0],u[3*v+1],1e4))).z,b.x,b.y)):(x=a$11.fromDegrees(u[3*v+0],u[3*v+1],-1e4),b=a$11.fromDegrees(u[3*v+0],u[3*v+1],1e4)),g.x=x.x,g.y=x.y,g.z=x.z,g.w=1,c$1a.multiplyByVector(l,g,g),x.x=g.x,x.y=g.y,x.z=g.z,g.x=b.x,g.y=b.y,g.z=b.z,g.w=1,c$1a.multiplyByVector(l,g,g),b.x=g.x,b.y=g.y,b.z=g.z,p[8*v]=b.x,p[8*v+1]=b.y,p[8*v+2]=b.z,p[8*v+3]=1e4,p[8*v+4]=x.x,p[8*v+5]=x.y,p[8*v+6]=x.z,p[8*v+7]=-1e4,_[6*v+0]=_[6*v+3]=(n$1d.toRadians(u[3*v+0])-c.west)/h,_[6*v+1]=_[6*v+4]=(n$1d.toRadians(u[3*v+1])-c.south)/d,_[6*v+2]=_[6*v+5]=i.height;let e=i.sideLengths[v]?i.sideLengths[v]/i.round:0,r=(i.sideLengths[v]-(i.sideLengths[v-1]||0))/100,a=t._excavateTextureWrap===j$13.CLAMP_TO_EDGE;m[4*v+0]=a?1-e:v%2==0?0:r,m[4*v+1]=a?1:200,m[4*v+2]=a?1-e:v%2==0?0:r,m[4*v+3]=0}for(v=0;v<f-1;v++)$[6*v+0]=0+2*v,$[6*v+1]=2+2*v,$[6*v+2]=3+2*v,$[6*v+3]=0+2*v,$[6*v+4]=3+2*v,$[6*v+5]=1+2*v;$[6*(f-1)+0]=0+2*(f-1),$[6*(f-1)+1]=0,$[6*(f-1)+2]=1,$[6*(f-1)+3]=0+2*(f-1),$[6*(f-1)+4]=1,$[6*(f-1)+5]=1+2*(f-1);var S=u$Y.createVertexBuffer({context:s,typedArray:p,usage:A$13.STATIC_DRAW}),w=u$Y.createVertexBuffer({context:s,typedArray:_,usage:A$13.STATIC_DRAW}),C=u$Y.createVertexBuffer({context:s,typedArray:m,usage:A$13.STATIC_DRAW}),T=[],P={aPosition:0,aTexCoord0:1,aTexCoord1:2};T.push({index:P.aPosition,vertexBuffer:S,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:16,normalize:!1}),T.push({index:P.aTexCoord0,vertexBuffer:w,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),T.push({index:P.aTexCoord1,vertexBuffer:C,componentsPerAttribute:2,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var E=u$Y.createIndexBuffer({context:s,typedArray:$,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT}),A=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:i._excavateMatrix,pass:we$l.TERRAIN_CLASSIFICATION,owner:t,cull:!1});A.vertexArray=new x$18({context:s,attributes:T,indexBuffer:E});var L=new a$O({sources:[Y$o]}),M=new a$O({sources:[Z$m]});r&&M.defines.push("IsExtract"),t$$(t.excavationNormalTextureUrl)&&M.defines.push("NormalTexture"),A.shaderProgram=p$15.fromCache({context:s,vertexShaderSource:L,fragmentShaderSource:M,attributeLocations:P}),A.renderState=p$1a.fromCache({cull:{enabled:!1,face:de$x.BACK},depthTest:{enabled:!0}}),A.uniformMap={uRasterTexture:function(){return r?i.heightBuffer2._renderTexture._fb.getColorTexture(0):i.heightBuffer._renderTexture._fb.getColorTexture(0)},uColorTexture:function(){return t$$(t._excavationSideTexture)?t._excavationSideTexture:s.defaultTexture},uNormalTexture:function(){return t._excavationSideNormalTexture||s.defaultTexture},uExtractHeight:function(){return i.height+t._extractExtendHeight}};var I=new t$i(e.context);I.useType=4,I.environmentVisible.isGlobalVisible=!0,Na(e,i.rectangle,I,n),t$$(i.removeListenerFunc)||(i.removeListenerFunc=t.tileLoadedEvent.addEventListener((function(e){t$$(s$1p.intersection(e.rectangle,i.rectangle))&&(I.isUpdate=!0)}))),r?(a.set(i.name+"side_extract",A),i.heightBuffer2=I,e._framebufferList["_excavationGlobeHeight2"+i.name]=I):(a.set(i.name+"side",A),i.heightBuffer=I,e._framebufferList["_excavationGlobeHeight"+i.name]=I)}}function or$1(e,t,i,n,r){var o=e.camera._projection,a=t._excavateRegionCommands;if((!a.contains(i.name+"bottom")||r)&&(!a.contains(i.name+"bottom_extract")||!r)){for(var s=i._excavateMatrix,l=e.context,u=new s$1d({primitiveType:H$11.TRIANGLES,pass:we$l.TERRAIN_CLASSIFICATION,modelMatrix:s}),c=new a$11,h=[],d=i.worldGeometry,f=c$1a.getTranslation(i.modelMatrix,new a$11),p=0;p<d.attributes.position.values.length;p+=3)h.push(d.attributes.position.values[p]+f.x),h.push(d.attributes.position.values[p+1]+f.y),h.push(i.height);var _=c$1a.inverse(s,new c$1a),m=[];if(n){p=0;for(var $=h.length;p<$;p+=3){var g=o.project(i$1g.fromDegrees(h[p],h[p+1],h[p+2]));m.push(new a$11(g.z,g.x,g.y))}}else m=a$11.fromDegreesArrayHeights(h);var y=new Float32Array(4*m.length);for(p=0;p<m.length;p++)c.x=m[p].x,c.y=m[p].y,c.z=m[p].z,c.w=1,c$1a.multiplyByVector(_,c,c),y[4*p]=c.x,y[4*p+1]=c.y,y[4*p+2]=c.z,y[4*p+3]=c.z;var v=i.colorGeometry.attributes.position;v.values=y,v.componentsPerAttribute=4,v.componentDatatype=C$12.FLOAT,u.vertexArray=x$18.fromGeometry({context:l,geometry:i.colorGeometry,attributeLocations:{position:0,st:1},bufferUsage:A$13.STATIC_DRAW,interleave:!0});var x=new a$O({sources:[ua]}),b=new a$O({sources:[da]});if(t$$(t.excavationNormalTextureUrl)&&b.defines.push("NormalTexture"),u.shaderProgram=p$15.fromCache({context:l,vertexShaderSource:x,fragmentShaderSource:b,attributeLocations:{position:0,texCoord:1}}),u.uniformMap={texture1:function(){return t$$(t._excavationBottomTexture)?t._excavationBottomTexture:l.defaultTexture},uNormalTexture:function(){return t._excavationNormalTexture||l.defaultTexture}},u.renderState=p$1a.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$s.ALPHA_BLEND}),r){var S=t._extractExtendHeight,w=a$11.fromArray([0,0,S]),C=c$1a.fromTranslation(w);c$1a.multiply(u.modelMatrix,C,C),u.modelMatrix=C,a.set(i.name+"bottom_extract",u)}else a.set(i.name+"bottom",u)}}function Je$3(e){for(var t=s$1p.clone(e[0].rectangle),i=1,n=e.length;i<n;i++){var r=e[i];t=s$1p.union(t,r.rectangle)}return t}function nr$1(e,t){for(var i,n=!1,r=0,o=e.length;r<o;r++){if(i=e[r],t$$(s$1p.simpleIntersection(i.rectangle,t))){n=!0;break}}if(t$$(i)&&n)for(;t$$(i);){if(i.rectangle.contains(t))return i;i=i.parent}}function we$a(e,t,i,n,r,o,a,s){var l=i._southwestChild;t$$(l)&&t$$(l.data)&&(t$$(s$1p.intersection(l.rectangle,n))&&((s||!l.isModified)&&l.data.createModifyVertexArray(e,t,l,r,o,a,!0),t$$(l.data.modifyTerrainVertexArray)&&we$a(e,t,l,n,r,o,a,s))),t$$(l=i._southeastChild)&&t$$(l.data)&&(t$$(s$1p.intersection(l.rectangle,n))&&((s||!l.isModified)&&l.data.createModifyVertexArray(e,t,l,r,o,a,!0),t$$(l.data.modifyTerrainVertexArray)&&we$a(e,t,l,n,r,o,a,s))),t$$(l=i._northwestChild)&&t$$(l.data)&&(t$$(s$1p.intersection(l.rectangle,n))&&((s||!l.isModified)&&l.data.createModifyVertexArray(e,t,l,r,o,a,!0),t$$(l.data.modifyTerrainVertexArray)&&we$a(e,t,l,n,r,o,a,s))),t$$(l=i._northeastChild)&&t$$(l.data)&&(t$$(s$1p.intersection(l.rectangle,n))&&((s||!l.isModified)&&l.data.createModifyVertexArray(e,t,l,r,o,a,!0),t$$(l.data.modifyTerrainVertexArray)&&we$a(e,t,l,n,r,o,a,s)))}function Ua(e,t){return t.modifyParentTiles?!(e.level<12):!(!t$$(e.parent)||!e.parent.isModified)||(e._southwestChild.isModified||e._southeastChild.isModified||e._northwestChild.isModified||e._northeastChild.isModified)}function ai$3(e){var t=e._modifyTilesMap;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];n._clipRasterTexture=n._clipRasterTexture&&!n._clipRasterTexture.isDestroyed()&&n._clipRasterTexture.destroy(),n._clipRasterFbo=n._clipRasterFbo&&!n._clipRasterFbo.isDestroyed()&&n._clipRasterFbo.destroy(),n._clipRegionsCount=0,n._clipRegionRasterized=!1,n.isModified=!1,n.data.mesh&&(n.data.mesh.isModified=!1),n.data.freeModifyResource()}e._modifyTilesMap={}}function oi$2(e,t){var i=e._modifyTilesMap;for(var n in i)if(i.hasOwnProperty(n)){var r=i[n];s$1p.intersection(t,r.rectangle)||(r._clipRasterTexture=r._clipRasterTexture&&!r._clipRasterTexture.isDestroyed()&&r._clipRasterTexture.destroy(),r._clipRasterFbo=r._clipRasterFbo&&!r._clipRasterFbo.isDestroyed()&&r._clipRasterFbo.destroy(),r._clipRegionsCount=0,r._clipRegionRasterized=!1,r.isModified=!1,r.data.freeModifyResource(),delete i[n])}}function Ue$7(e,t,i){var n=new a$11,r=new a$11;a$11.subtract(t,e,n),a$11.subtract(i,e,r);var o=new a$11;a$11.cross(n,r,o),a$11.normalize(o,o);var a=-a$11.dot(o,e);return new a$10(o.x,o.y,o.z,a)}function ni$2(e,t){var i=t.context;return new u$F({context:i,colorTextures:[new P$S({context:i,width:e,height:e,pixelFormat:Z$_.RGBA,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST})})],destroyAttachments:!1,depthStencilRenderbuffer:new h$q({context:t.context,width:e,height:e,format:E$r.DEPTH_STENCIL})})}function Va(e,t){if(!(e._rasterLineFBOs.length>0))for(var i=0;i<e._rasterTextureSizes.length;i++)e._rasterLineFBOs.push(ni$2(e._rasterTextureSizes[i],t))}function za(e,t){if(!(e._rasterAAFBOs.length>0))for(var i=0;i<e._rasterTextureSizes.length;i++)e._rasterAAFBOs.push(ni$2(e._rasterTextureSizes[i],t))}function Ga(e,t){if(!t$$(e._lineExpandCommand)||e._rasterLineWidth!==t.rasterLineWidth){e._rasterLineWidth=t.rasterLineWidth;var i=t.context,n=Math.ceil(t.rasterLineWidth),r="#define CORESIZE "+n+"\n",o=new a$O({name:"RasterImageExpandFS_width_"+n,sources:[r+=Ki$1]}),a=new a$O({name:"ViewportQuadVS",sources:[pe$b]});e._lineExpandCommand=i.createCustomViewportQuadCommand(a,o,{uniformMap:{},owner:e}),e._lineExpandCommand.uniformMap.u_LineTexture=function(){return e._rasterLineFBOs[e._rasterCurrentFBOIdx].getColorTexture(0)},e._lineExpandCommand.uniformMap.u_texelOffset=function(){return 1/e._rasterTextureSizes[e._rasterCurrentFBOIdx]}}}function ka(e,t){if(!t$$(e._lineFXAACommand)){var i=t.context,n="#define FXAA_QUALITY_PRESET 39 \n"+j$h+"\n"+Zi$2;e._lineFXAACommand=i.createViewportQuadCommand(n,{uniformMap:{},owner:e}),e._lineFXAACommand.uniformMap.colorTexture=function(){return e._rasterAAFBOs[e._rasterCurrentFBOIdx].getColorTexture(0)}}}function b$w(){}new a$11,R$h.prototype._updateModifyTiles=function(e,t,i){for(var n=this._quadtree._tilesToRender,r=n.length,o=!1,a=0;a<r;a++)if(Ua(n[a],this)){o=!0;break}if(o){var s=Je$3(t),l=nr$1(n,s);if(t$$(l)&&t$$(l.data)){!t$$(this.modifyParentTiles)&&i&&(this.modifyParentTiles=l);for(var u=l.data,c=e.context,h=[],d=Number.MAX_VALUE,f=Number.MIN_VALUE,p=(a=0,t.length);a<p;a++){var _=t[a],m=i?_.geometry_extract:_.geometry;h.push(m),d=Math.min(d,_.minimumHeight),f=Math.max(f,_.maximumHeight)}if(l.isModified||u.createModifyVertexArray(c,this,l,h,d,f,!1),t$$(u.modifyTerrainVertexArray)){if(this.modifyParentTiles&&l.level<this.modifyParentTiles.level)return;we$a(c,this,l,s,h,d,f,!1)}}}},R$h.prototype._updateModifyRegions=function(e){if(this._modifyRegionUpdate){if(0!==this._quadtree._tilesToRender.length&&!(this._quadtree._tilesToRender[0].level<10)){this._modifyRegionUpdate=!1;var t=this._modifyRegions.values,i=t.length;if(i<1)return void ai$3(this);var n=Je$3(t);oi$2(this,n),this._excavateRectangle=n;for(var r=0;r<i;r++){var o=t[r];Oe$b(e.context,o)}var a=nr$1(this._quadtree._tilesToRender,n);if(t$$(a)&&t$$(a.data)){var s=a.data,l=e.context,u=[],c=Number.MAX_VALUE,h=Number.MIN_VALUE;for(r=0;r<i;r++){o=t[r];u.push(o.geometry),c=Math.min(c,o.minimumHeight),h=Math.max(h,o.maximumHeight)}s.createModifyVertexArray(l,this,a,u,c,h,!1),t$$(s.modifyTerrainVertexArray)&&we$a(l,this,a,n,u,c,h,!0)}}}else this._modifyRegions.length>0&&this._updateModifyTiles(e,this._modifyRegions.values)},R$h.prototype.clearCustomClipBox=function(){this._clipping=!1,this._clipMode=0},R$h.prototype.setCustomClipBox=function(e){if(!((e=e||{}).dimensions&&e.position||e.planePos&&e.planeNormal))throw new t$_("dimensions position is required to create CustomClipBox");if(this._clipMode=2,t$$(e.clipMode))switch(e.clipMode){case"clip_behind_any_plane":this._clipMode=1;break;case"clip_behind_all_plane":this._clipMode=2;break;case"only_keep_line":this._clipMode=3}if(e.clipLineColor&&e.clipLineColor instanceof e$1z&&(this._clipLineColor=new a$10(e.clipLineColor.red,e.clipLineColor.green,e.clipLineColor.blue,e.clipLineColor.alpha)),e.dimensions){var t=new c$1a,i=e.position,n=new e$1L(e.heading||0,e.pitch||0,e.roll||0);m$13.headingPitchRollToFixedFrame(i,n,n$1c.WGS84,t);var r=.5*e.dimensions.x,o=.5*e.dimensions.y,a=.5*e.dimensions.z,s=[];s[0]=new a$10,s[0].x=-r,s[0].y=o,s[0].z=a,s[0].w=1,s[1]=new a$10,s[1].x=r,s[1].y=o,s[1].z=a,s[1].w=1,s[2]=new a$10,s[2].x=r,s[2].y=-o,s[2].z=a,s[2].w=1,s[3]=new a$10,s[3].x=-r,s[3].y=-o,s[3].z=a,s[3].w=1,s[4]=new a$10,s[4].x=-r,s[4].y=o,s[4].z=-a,s[4].w=1,s[5]=new a$10,s[5].x=r,s[5].y=o,s[5].z=-a,s[5].w=1,s[6]=new a$10,s[6].x=r,s[6].y=-o,s[6].z=-a,s[6].w=1,s[7]=new a$10,s[7].x=-r,s[7].y=-o,s[7].z=-a,s[7].w=1;for(var l=0;l<8;l++)c$1a.multiplyByVector(t,s[l],s[l]);this._oriClipPlane[0]=a$10.clone(Ue$7(s[0],s[1],s[2])),this._oriClipPlane[1]=a$10.clone(Ue$7(s[0],s[4],s[1])),this._oriClipPlane[2]=a$10.clone(Ue$7(s[0],s[3],s[4])),this._oriClipPlane[3]=a$10.clone(Ue$7(s[6],s[2],s[5])),this._oriClipPlane[4]=a$10.clone(Ue$7(s[6],s[7],s[2])),this._oriClipPlane[5]=a$10.clone(Ue$7(s[6],s[5],s[7]))}else for(l=0;l<e.planePos.length;l++){var u=e.planePos[l],c=e.planeNormal[l];this._oriClipPlane[l].x=c.x,this._oriClipPlane[l].y=c.y,this._oriClipPlane[l].z=c.z,this._oriClipPlane[l].w=-a$11.dot(u,c)}this._clipping=!0},R$h.prototype.removeAllModifyRegion=function(){for(var e=this._modifyRegions.values,t=0;t<e.length;t++){var i=e[t];t$$(i.command)&&(i.command.vertexArray=i.command.vertexArray&&!i.command.vertexArray.isDestroyed()&&i.command.vertexArray.destroy(),i.command.shaderProgram=i.command.shaderProgram&&!i.command.shaderProgram.isDestroyed()&&i.command.shaderProgram.destroy()),i.command=void 0}this._modifyRegions.removeAll(),this._modifyTilesMap={},this._modifyRegionUpdate=!1},R$h.prototype.removeAllExcavationRegion=function(){},R$h.prototype.removeAllExtractRegion=function(){},R$h.prototype.isDestroyed=function(){return!1},R$h.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this.removeAllExcavationRegion(),this.removeAllModifyRegion(),this.removeAllExtractRegion(),this._hypsometricTexture=this._hypsometricTexture&&this._hypsometricTexture.destroy(),this._slopeArrowsTexture=this._slopeArrowsTexture&&this._slopeArrowsTexture.destroy();for(var e=0;e<this._rasterTextureSizes.length;e++)t$$(this._rasterLineFBOs[e])&&this._rasterLineFBOs[e].destroy(),this._rasterAAFBOs.length>0&&this._rasterAAFBOs[e].destroy();return s$1e(this)};var _$n=new r$K,ne$a=new f$V,se$a=new a$11;function me$e(e,t,i){if(!(u=e.camera).bReflect){var n=t,r=n.width,o=n.height,a=6378137*Math.cos(n.south+.5*o)*Math.sin(r)*.5,s=6378137*Math.sin(o)*.5;r=a,o=s;var l=u.frustum.clone(ne$a),u=e.camera;i.isUpdate=!0,t$$(i._beginFunc)||(i._beginFunc=function(){i.oldCameraParameter={destination:a$11.clone(u.position,se$a),orientation:{heading:u.heading,pitch:u.pitch,roll:u.roll}},u.setView({destination:a$11.fromRadians(n.west+.5*n.width,n.south+.5*n.height,1e3)}),_$n.width=2*r,_$n.height=2*o,_$n.near=1,_$n.far=1e4,_$n.aspectRatio=r/o,u.frustum=_$n,e.context.uniformState.updateFrustum(_$n)}),t$$(i._endFunc)||(i._endFunc=function(){i.isUpdate=!1,u.frustum=l,u.setView(i.oldCameraParameter),e.context.uniformState.updateFrustum(u.frustum)})}}b$w._createExcavationSideCommand=function(e,t,i){var n=t._excavateRegionCommands;if(!n.contains(i.name+"side")){for(var r=e.context,o=c$1a.inverse(i._excavateMatrix,new c$1a),a=i.positions,s=i.rectangle,l=s.east-s.west,u=s.north-s.south,c=a.length/3,h=new Float32Array(8*c),d=new Float32Array(6*c),f=new Float32Array(4*c),p=new Uint16Array(6*c),_=new a$11,m=0;m<c;m++){var $=a$11.fromDegrees(a[3*m+0],a[3*m+1],-1e3),g=a$11.fromDegrees(a[3*m+0],a[3*m+1],1e3);_.x=$.x,_.y=$.y,_.z=$.z,_.w=1,c$1a.multiplyByVector(o,_,_),$.x=_.x,$.y=_.y,$.z=_.z,_.x=g.x,_.y=g.y,_.z=g.z,_.w=1,c$1a.multiplyByVector(o,_,_),g.x=_.x,g.y=_.y,g.z=_.z,h[8*m]=g.x,h[8*m+1]=g.y,h[8*m+2]=g.z,h[8*m+3]=1e3,h[8*m+4]=$.x,h[8*m+5]=$.y,h[8*m+6]=$.z,h[8*m+7]=-1e3,d[6*m+0]=d[6*m+3]=(n$1d.toRadians(a[3*m+0])-s.west)/l,d[6*m+1]=d[6*m+4]=(n$1d.toRadians(a[3*m+1])-s.south)/u,d[6*m+2]=d[6*m+5]=i.height,f[4*m+0]=m/(c-1),f[4*m+1]=1,f[4*m+2]=m/(c-1),f[4*m+3]=0}for(m=0;m<c-1;m++)p[6*m+0]=0+2*m,p[6*m+1]=2+2*m,p[6*m+2]=3+2*m,p[6*m+3]=0+2*m,p[6*m+4]=3+2*m,p[6*m+5]=1+2*m;p[6*(c-1)+0]=0+2*(c-1),p[6*(c-1)+1]=0,p[6*(c-1)+2]=1,p[6*(c-1)+3]=0+2*(c-1),p[6*(c-1)+4]=1,p[6*(c-1)+5]=1+2*(c-1);var y=u$Y.createVertexBuffer({context:r,typedArray:h,usage:A$13.STATIC_DRAW}),v=u$Y.createVertexBuffer({context:r,typedArray:d,usage:A$13.STATIC_DRAW}),x=u$Y.createVertexBuffer({context:r,typedArray:f,usage:A$13.STATIC_DRAW}),b=[],S={aPosition:0,aTexCoord0:1,aTexCoord1:2};b.push({index:S.aPosition,vertexBuffer:y,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:16,normalize:!1}),b.push({index:S.aTexCoord0,vertexBuffer:v,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),b.push({index:S.aTexCoord1,vertexBuffer:x,componentsPerAttribute:2,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var w=u$Y.createIndexBuffer({context:r,typedArray:p,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT}),C=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:i._excavateMatrix,pass:we$l.OPAQUE,owner:t,cull:!1});C.vertexArray=new x$18({context:r,attributes:b,indexBuffer:w});var T=new a$O({sources:[Y$o]}),P=new a$O({sources:[Z$m]});C.shaderProgram=p$15.fromCache({context:r,vertexShaderSource:T,fragmentShaderSource:P,attributeLocations:S}),C.renderState=p$1a.fromCache({cull:{enabled:!1,face:de$x.BACK},depthTest:{enabled:!0}}),C.uniformMap={uRasterTexture:function(){return window.texture11=i.heightBuffer._renderTexture._fb.getColorTexture(0),window.texture11},uColorTexture:function(){return t$$(t._excavationSideTexture)?t._excavationSideTexture:r.defaultTexture}},n.set(i.name+"side",C);var E=new t$i(e.context);i.heightBuffer=E,E.useType=4,E.environmentVisible.isOnlyS3MObjectVisible=!0;var A=t instanceof R$h?"Globe":"Layer";e._framebufferList["_excavationHeight"+A+i.name]=E,me$e(e,i.rectangle,E)}},b$w._createExcavationBottomCommand=function(e,t,i){var n=t._excavateRegionCommands;if(!n.contains(i.name+"bottom")){var r=e.context,o=new s$1d({primitiveType:H$11.TRIANGLES,pass:we$l.OPAQUE,modelMatrix:i._excavateMatrix});n.set(i.name+"bottom",o);for(var a=new a$11,s=[],l=i._geometry,u=0;u<l.attributes.position.values.length;u+=3)a.x=l.attributes.position.values[u],a.y=l.attributes.position.values[u+1],a.z=l.attributes.position.values[u+2],c$1a.multiplyByPoint(t._matModel,a,a),a=i$1g.fromCartesian(a),s.push(n$1d.toDegrees(a.longitude)),s.push(n$1d.toDegrees(a.latitude)),s.push(i.height);var c=c$1a.inverse(i._excavateMatrix,new c$1a),h=a$11.fromDegreesArrayHeights(s),d=new Float32Array(4*h.length);for(u=0;u<h.length;u++)a.x=h[u].x,a.y=h[u].y,a.z=h[u].z,a.w=1,c$1a.multiplyByVector(c,a,a),d[4*u]=a.x,d[4*u+1]=a.y,d[4*u+2]=a.z,d[4*u+3]=a.z;var f=i.colorGeometry.attributes.position;f.values=d,f.componentsPerAttribute=4,f.componentDatatype=C$12.FLOAT,o.vertexArray=x$18.fromGeometry({context:r,geometry:i.colorGeometry,attributeLocations:{position:0,st:1,normal:2},bufferUsage:A$13.STATIC_DRAW,interleave:!0});var p=["attribute vec3 position;","attribute vec2 texCoord;","varying vec2 v_texCoord;","void main()","{"," v_texCoord = texCoord;"," gl_Position = czm_modelViewProjection * vec4(position.xyz, 1.0);","}"].join("\n"),_=["varying vec2 v_texCoord;","uniform sampler2D texture1;","void main()","{"," gl_FragColor = texture2D(texture1, v_texCoord);","}"].join("\n"),m=new a$O({sources:[p]}),$=new a$O({sources:[_]});o.shaderProgram=p$15.fromCache({context:r,vertexShaderSource:m,fragmentShaderSource:$,attributeLocations:{position:0,texCoord:1}}),o.uniformMap={texture1:function(){return t$$(t._excavationBottomTexture)?t._excavationBottomTexture:r.defaultTexture}},o.renderState=p$1a.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$s.ALPHA_BLEND})}},b$w.createExcavationSideTexture=function(e,t){t._excavationSideTexture||c$18(t$X.createIfNeeded(o$12("Assets/Textures/excavationregion_side.jpg")).fetchImage(),(function(i){t._excavationSideTexture=new P$S({context:e.context,source:i})}))},b$w.createExcavationBottomTexture=function(e,t){t._excavationBottomTexture||c$18(t$X.createIfNeeded(o$12("Assets/Textures/excavationregion_top.jpg")).fetchImage(),(function(i){t._excavationBottomTexture=new P$S({context:e.context,source:i})}))};var _0x97b7ff=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x253789=_0x97b7ff(void 0,(function(){return _0x253789.toString().search("(((.+)+)+)+$").toString().constructor(_0x253789).search("(((.+)+)+)+$")}));_0x253789();var _0x9a9087={Linear:0,Acceleration:1,Deceleration:2,CubicSpline:3,SmoothStep:4},_0x2d9da3=Object.freeze(_0x9a9087),_0x2a44fe=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2c333a=_0x2a44fe(void 0,(function(){return _0x2c333a.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c333a).search("(((.+)+)+)+$")}));_0x2c333a();var _0x3d83ed={None:0,First:1,Second:2},_0x575a61=Object.freeze(_0x3d83ed),_0x3e7ac2=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x50e90a=_0x3e7ac2(void 0,(function(){return _0x50e90a.toString().search("(((.+)+)+)+$").toString().constructor(_0x50e90a).search("(((.+)+)+)+$")}));_0x50e90a(),new i$1g;var _0x3d6b16=new c$1a(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),_0x450718={CLIP_NOTHING:0,CLIP_BEHIND_ANY_PLANE:1,CLIP_BEHIND_ALL_PLANE:2,ONLY_KEEP_LINE:3},_0x2b17a0={Altitude:0,Color:1,Texture:2},_0x59d63a={Normal:0,Add:1},_0x2bb716={LOD_Loading:0,All_Loading:1},_0x5040c1={DEGREE:"Degree",METER:"Meter"},_0x174b15=-1e3,_0x5f321e=9e3,_0x4ab4f4=function(e){var t=(e=e||{}).gl,i=e.name,n=e.position;if(this._materialType=e.materialType,this._isS3MB=e.isS3MB,this._isOSGB=e.isOSGB,this._isS3MZ=e.isS3MZ,this._isS3MBlock=e.isS3MBlock,this._context=e.context,this._gl=t,this._name=i,this._globeType=e.globeType,this._groupName=e.groupName,this._id=-1,this._version=void 0,this._baseUri=e.baseUri,this._dataType=e.dataType,this._isTextureShare=e$1Y(e.isTextureShare,!1),this._associateMaterialUrl=e.associateMaterialUrl,this._isTransparencyOptimization=e$1Y(e.isTransparencyOptimization,!1),this._vertexCompressionType=e.vertexCompressionType,t$$(e.vertexWeightMode))switch(e.vertexWeightMode){case"DatasetField":default:this._vertexWeightMode=_0x4e00e3.DatasetField;break;case"EdgeLengthMin":this._vertexWeightMode=_0x4e00e3.EdgeLengthMin}if(this._triangleFiltratePixel=0,this._urlType=e$1Y(e.urlType,di$7.REST),this._urlArguments=e.urlArguments,this._fileType=c$q.OSGBFile,this._RGBTOBGR=!1,this._S3MTileLoadedEvent=new o$15,this._allTilesLoaded=new o$15,this._colorTableChanged=new o$15,this._attributeDownloaded=new o$15,this._prepareLoadSize=0,this._prepareLoadEvent=void 0,e.pointCloudLayerNames&&e.pointCloudLayerNames.length>0){this._pointCloudLayerVisible={};for(var r=0,o=e.pointCloudLayerNames.length;r<o;r++)this._pointCloudLayerVisible[e.pointCloudLayerNames[r]]=!0;this._pointCloudLayerNames=e.pointCloudLayerNames.slice(0)}if(t$$(e.fileType))switch(e.fileType){case"ClampGroundLineCache":this._fileType=c$q.ClampGroundLine;break;case"ClampObjectLineCache":this._fileType=c$q.ClampObjectLine;break;case"ClampGroundPolygonCache":this._fileType=c$q.ClampGroundPolygon;break;case"ClampObjectPolygonCache":this._fileType=c$q.ClampObjectPolygon;break;case"ExtendClampPolygonCache":this._fileType=c$q.ExtendClampPolygonCache;break;case"IconPointCache":this._fileType=c$q.IconPoint;break;case"TextCache":this._fileType=c$q.Text;break;case"PointCloudFile":this._fileType=c$q.PointCloudFile;break;case"OSGBCacheFile":this._fileType=c$q.OSGBCacheFile;break;case"ExtendRegionCache":this._fileType=c$q.ExtendRegion3D;break;case"RegionEffect":this._fileType=c$q.RegionEffect;break;case"PolylineEffect":this._fileType=c$q.PolylineEffect;break;case"ClampGroundAndObjectLineCache":this._fileType=c$q.ClampGroundAndObjectLineCache;break;case"ClampGroundRealtimeRasterCache":this._fileType=c$q.ClampGroundRealtimeRasterCache}this._supportCompressType=e.supportCompressType,this.lon=n.lon,this.lat=n.lat,this.height=n.height,this.positionUnits=n.units,this._layerBounds=e.layerBounds;var a=.5*(this._layerBounds.north+this._layerBounds.south);this._layerRange=i$1g.sphericalDistance(n$1d.toDegrees(this._layerBounds.east),n$1d.toDegrees(a),n$1d.toDegrees(this._layerBounds.west),n$1d.toDegrees(a)),this._style3D=e$1Y(e.style3D,new e$D),this._style3D._owner=this,this._lodRangeScale=e$1Y(e.lodRangeScale,1),this._adjustedLodRangeScale=this._lodRangeScale,this._selectColorType=Ja.MIX,this._mixColorType=_0x28ce18.MIX,this._brightness=e$1Y(e.brightness,1),this._contrast=e$1Y(e.constrast,1),this._hue=e$1Y(e.hue,0),this._saturation=e$1Y(e.saturation,1),this._gamma=e$1Y(e.gamma,1),this._visibleDistanceMax=e$1Y(e.maxVisibleDistance,Number.MAX_VALUE),this._visibleDistanceMin=e$1Y(e.minVisibleDistance,0),this._minVisibleAltitude=e$1Y(e.minVisibleAltitude,0),this._maxVisibleAltitude=e$1Y(e.maxVisibleAltitude,Number.MAX_VALUE),this._hasLight=!(this._fileType===c$q.OSGBFile||this._fileType===c$q.PointCloudFile),this._selectEnabled=e$1Y(e.selectEnable,!0),this._enableHighlight=e$1Y(e.enableHighlight,!0),this._heading=e$1Y(e.heading,0),this._cullEnabled=e$1Y(e.cullEnabled,!1),this._cullMode=e$1Y(e.cullMode,_0x2ee645.NONE),this._shadowType=e$1Y(e.shadowType,_0x3df1e1.NONE),this._visibleViewport=4095,this._visible=e$1Y(e.isVisible,!0),this._sceneMode=e$1Y(e.sceneMode,b$1d.SCENE3D),this._selections=[],this._multiChoose=!1,this._selectedColor=new e$1z(.7,.7,1,1),this._selectedLineColor=new e$1z(1,1,1),this._skeletonSelectedColor=new e$1z(1,0,0,1),this._selectedTranslate=new a$11(0,0,0),this._objsColorList={},this._objsOffsetList={},this._objsVisibleList=new e$1F,this._objsHideList=new e$1F,this._objsVisibleMap={},this._objsOperationList={},this._operationType=_0x24b8f6.RESET,this._fileType===c$q.ExtendRegion3D&&(this._objsHeightList=new e$1F),t$$(e.effect)?this._effect=e.effect:this._fileType===c$q.RegionEffect?this._effect=new _0x4f5b3a:this._fileType===c$q.PolylineEffect&&(this._effect=new _0x840433),this._bloomEffect=new _0x2d12d7(this),this.waterEffectSet=e.waterEffectSet,this._noiseMapUrl=o$12("Assets/Textures/noise.png"),this._noiseMapTexture=void 0,this._flattenTextureWidth=1024,this._flattening=!1,this._flattenBounds=new a$10,this._flattenTexture=void 0,this._flattenRegions=new e$1F,this._flattenUpdate=!1,this._flattenVisibleViewport=255,this._hasExcavation=!1,this._hasServerExcavation=!1,this._excavationBounds=new a$10,this._excavationTexture=void 0,this._excavationRegions=new e$1F,this._excavationUpdate=!1,this._excavationMode=je$8.CLIP_INSIDE,this._serverExcavationMode=je$8.CLIP_OUTSIDE,this._serverExcavationBounds=new a$10,this._serverExcavationRegions=new e$1F,this._hasOverlay=!1,this._overlayBounds=new a$10,this._overlayRegions=new e$1F,this._overlayTextures=new e$1F,this._overlayTexture=void 0,this.__overlayUpdate=!1,this._hypsometricSetting=void 0,this._hypsometricTexture=void 0,this._hypsometricRenderTexture=void 0,this._hypsometricRegion=void 0,this._hypsometricBound=new a$10,this._bUseHypColorTable=!1,this._bUseHypRegion=!1,this._hypsometricRegionUpdate=!1,this._hypAnalysisMode=J$O.AnalysisRegionMode.ARM_NONE,this._hypMaxInstensity=e.maxInstensity,this._hypMinInstensity=e.minInstensity,this._hypMaxHeight=e.maxHeight,this._hypMinHeight=e.minHeight,this._hypMaxCategory=e.maxCategory,this._hypMinCategory=e.minCategory,this._hypUseColorByHeight=!0,this._categorieTexture=void 0,this._categoryHideList=new e$1F,this._fHorizontalLine=e.horizontalLine,this._oriClipPlane=[],this._renderClipPlaneArray=new e$1F,this._clipPlane=[];for(r=0;r<6;r++)this._clipPlane[r]=new a$10(0,0,0,0),this._oriClipPlane[r]=new a$10(0,0,0,0);this._clipMode=_0x450718.CLIP_NOTHING,this._clipLineColor=new a$10(1,0,0,0),this._clipping=!1,this._section=!1,this._clipPlaneMode=_0xaa965.NONE,this._clipPlaneColor=new a$10(1,0,0,1),this._matModel=new c$1a,this._oriMatModel=new c$1a,this._bReleaseColor=e$1Y(e.bReleaseColor,!1),this._fileType===c$q.OSGBFile||this._fileType===c$q.OSGBCacheFile?this._ignoreNormal=e$1Y(e.ignoreNormal,!1):this._ignoreNormal=!1,this._textureLod=e$1Y(e.textureLod,!0);var s=e$1Y(e.processType,"Normal");if(this._nProcessType="Normal"===s?_0x59d63a.Normal:_0x59d63a.Add,this._nLoadingMode=_0x2bb716.All_Loading,this._clockStart=0,this._polygonOffsetConfig=e.polygonOffset,this._wireFrameType=_0x39abaa.Quad,this._bVolume=!1,t$$(e.volumeObj)&&(this._bVolume=e.volumeObj.bVolume,this._strVolumeExts=e.volumeObj.strVolumeExts,this._volNames=e.volumeObj.volNames,this._maxVolumeValues=e.volumeObj.maxValues,this._minVolumeValues=e.volumeObj.minValues,this._volName=this._volNames[0],this._fMaxValue=this._maxVolumeValues[0],this._fMinValue=this._minVolumeValues[0],this._strVolumeExt=this._strVolumeExts[0]),this._maps=e.maps,this._volData=void 0,this._splitDirection=e$1Y(e.splitDirection,_0x324096.NONE),this._splitPosition=e$1Y(e.splitPosition,.5*this._context.drawingBufferWidth),this._pickPosition=new a$10,this._selectionFiltrateByTransparency=.01,this._receiveObjectClamp=!0,this._edgeCurrentTotalLength=0,this._edgeCurrentCount=0,this._edgeDistanceFalloffFactor=0,this.initialize(),t$$(window.Proxy)){var l=this,u={isAttributesSave:!1,isGeoTilesSave:!1,isGeoTilesRootNodeSave:!1,clear:function(){l._layerScheduler._clearIndexedDBCache()}};this._indexedDBSetting=new Proxy(u,{get:function(e,t){return e[t]},set:function(e,t,i){return"isAttributesSave"===t&&!1===e.isAttributesSave&&!0===i&&!t$$(l._queryFieldNames)&&(t$$(l._layerScheduler._indexedDBScheduler)?l._layerScheduler._indexedDBScheduler.getElementFromDB("attributes","saved").then((function(e){!e&&0==l._layerScheduler._attributes._memoryCache&&l._layerScheduler._requestAllScvd()}),(function(){0==l._layerScheduler._attributes._memoryCache&&l._layerScheduler._requestAllScvd()})):l._layerScheduler._dpPromise.then((function(){var e=l._layerScheduler._indexedDBScheduler.getElementFromDB("attributes","saved");t$$(e)?e.then((function(e){!e&&0==l._layerScheduler._attributes._memoryCache&&l._layerScheduler._requestAllScvd()}),(function(){0==l._layerScheduler._attributes._memoryCache&&l._layerScheduler._requestAllScvd()})):l._layerScheduler._requestAllScvd(!0)}))),e[t]=i,!0}}),this._isJsonScp=e._isJson||!1}this._queryFieldNames=e.queryFieldNames,this._fieldsInfo=e.fieldsInfo,this._indexInfoMap=e.indexInfoMap,this._attributeExtentName=e$1Y(e.attributeExtentName,""),this._layerScheduler=new _0x2063a0({gl:this._gl,layer:this,rootEntities:e.rootEntities,cacheEntityCount:e.cacheEntityCount,cacheKey:e$1Y(e.cacheKey,""),customRequestHeaders:e.customRequestHeaders,scpUrl:e.scpUrl}),this._clearMemoryImmediately=!1,this._totalMemoryUsageInBytes=0,this._maximumMemoryUsage=512,this._PBRMaterialType=We$a.NONE,this._pbrMetalTexture=void 0,this._pbrRoughTexture=void 0,this._PBRMaterialParams={pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:0,baseColor:new a$10(1,1,1,1),baseColorTextureIndex:-1,emissiveFactor:a$11.ZERO,emissiveTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseColorTexture:void 0}},this._localCacheMemoryReserveCount=500,this._fileType===c$q.Text&&(this._id2RectangleList=new e$1F),this._textureUVSpeed=new r$T(0,0),this._pointCloudEyeDomeLighting=new _0x2e7394(this._context),this._pointCloudShading=new n$C({attenuation:!0,geometricErrorScale:1,maximumAttenuation:8,eyeDomeLighting:!0}),this._pointCloudClassificationInfos=void 0,this._styleEngine=new e$K,this._manualShadowVolumeBottomHeight=_0x174b15,this._manualShadowVolumeTopHeight=_0x5f321e,this._shadowVolumeBottomHeight=_0x174b15,this._shadowVolumeTopHeight=_0x5f321e,"InstanceModel"===this._dataType&&(this.instanceSkeletonManager=new _0x35bc68),this._level=e.level,this._refreshVolume=!1,this._useMercatorProject=e$1Y(e.useMercatorProject,!1),this._groupNameBounds=e.groupNameBounds,this._skeletonSelectEnable=!1,this._lastSelectSkeletonId=-1,this._minTransparentAlpha=.1,this._maxTransparentAlpha=.98,this._selectRect=void 0,this._selectUpdate=!1,this._matSelectViewProj=new c$1a,this._useOIT=!0,this._partlyTransparent=!1,this._showLabel=!1,this._s3MTilesLabelStyle=new _0x42f3a3,this._labelCollection=new m$A({scene:e.scene,isS3MTileLabels:!0,selectedColor:this._selectedColor}),this._scene=e.scene,this._transparentBackColor=e$1Y(e.transparentBackColor,_0x4ab4f4.DEFAULT_TRANSPARENT_BACK_COLOR),this._transparentBackColorTolerance=e$1Y(e.transparentBackColorTolerance,_0x4ab4f4.DEFAULT_TRANSPARENT_BACK_COLOR_TOLERANCE),this._shadowDarkness=.5,this._spatialQueryEnable=!1,this._spatialClipEnable=!1,this._sqTextures=[],this._sqViewMatirx=new c$1a,this._sqPrjMatirx=new c$1a,this._sqMode=k$p.Disjoint,this._swipeRegion=new a$10(0,0,1,1),this._swipeEnabled=!1,this._allObjsHide=!1,this._residentRootTile=!1,this._idFieldName=e$1Y(e.idFieldName,"SmID"),this._imageryLayer=void 0,this._needCoverImageryLayer=!1,this._iconCollection=new O$t({scene:e.scene,style3D:this._style3D}),this._showIcon=e$1Y(e.showIcon,!1),this._boundingSphereOffset=a$11.ZERO,this._loadVolumeData=e$1Y(e.loadVolumeData,!0),this._hasWireframe=!1,this._edgeStrokesTexture=void 0;var c=e$1Y(e.subdomainConfig,{});this._subdomains=c.subdomains,this._subdomainsUrlScheme=c.urlScheme,this._isOverlapDisplayed=!1,this._iconRelatedTextLayerID=void 0,this._priorityScale=e$1Y(e.priorityScale,1),this._blockCache=_0x127a17.getSingleInstance(),this._clippingType=L$o.KeepOutside,this._spatialQuery=void 0,this._pickObjs={},this._hasMixedContent=!1,this._backfaceCommands=[],this._excavateRegionCommands=new e$1F,this._rasterPerFrame=!1,this._animationInfo={startTime:void 0,array:[],defers:void 0,duration:void 0,defaultInterpolation:void 0,done:!0},this._textureEmissionUnit=_0x575a61.None,this._pbrParameter=We$a.NONE,this._maxSkipNum=256,this._maximumPriority={foveatedFactor:-Number.MAX_VALUE,depth:-Number.MAX_VALUE,distance:-Number.MAX_VALUE,pixel:-Number.MAX_VALUE},this._minimumPriority={foveatedFactor:Number.MAX_VALUE,depth:Number.MAX_VALUE,distance:Number.MAX_VALUE,pixel:Number.MAX_VALUE},this._computeHeight=!1,this._polygonsTranslate={},this._maxSkipLevel=22,this._mipmapEnabled=!0,this._enableFusion=!1,this._floodFlagTexture=void 0,this._floodRect=void 0,this._matFloodInvertMatrix=c$1a.IDENTITY,this._heightScale=1,this._useRasterCull=!1,this._temporalCount=t$$(e.temporalCount)?e.temporalCount:0,this._temporalSetting=void 0,this._translucencyByDistance=!1,this._overlapWeightAttributeName=void 0,this._heightRangeAttributeName=void 0,this.hasAttributeIndex=e.hasAttributeIndex,this._envMapIntensity=1,this._historyCommands=[]};function _0x3ab0cb(e,t,i,n){for(var r={times:[],points:[],interpolations:[]},o=0,a=i.length;o<a;o++){var s=i[o],l=+s.slice(0,-1)/100*e.duration,u=n[s],c=e$1Y(u.interpolationType,e.defaultInterpolation);(h=u[t])&&(r.times.push(l),r.points.push(h),r.interpolations.push(c))}var h=_0x21e901(r=_0x32c4ac(r),e,t);return e.array.push(h),r}function _0x32c4ac(e){var t=e.interpolations,i=e.times,n=e.points;e=[];for(var r=0,o=t.length-1;r<o;r++)e.push({times:[i[r],i[r+1]],points:[n[r],n[r+1]],interpolationType:t[r]});return e}function _0x21e901(e,t,i){for(var n=[],r=0,o=e.length;r<o;r++){var a=e[r];n.push(_0x4b38f0(i,a.interpolationType,a.times,a.points))}return{type:i,splines:n}}function _0x4b38f0(e,t,i,n){var r;if("rotation"===e)return n.forEach((function(e,t){n[t]=a$U.fromHeadingPitchRoll(e)})),new n$R({times:i,points:n});switch(t){case _0x2d9da3.Linear:r=new o$X({times:i,points:n});break;case _0x2d9da3.Acceleration:r=new n$N({times:i,points:n,mode:0});break;case _0x2d9da3.Deceleration:r=new n$N({times:i,points:n,mode:1});break;case _0x2d9da3.CubicSpline:r=new p$1e({times:i,points:n});break;case _0x2d9da3.SmoothStep:r=new o$J({times:i,points:n});break;default:r=new o$X({times:i,points:n})}return r}function _0x14a9f2(e,t){!t||!t$$(s$1p.intersection(e.layerBounds,t.rectangle))||(t._rasterized=!1,_0x14a9f2(e,t._southwestChild),_0x14a9f2(e,t._southeastChild),_0x14a9f2(e,t._northwestChild),_0x14a9f2(e,t._northeastChild))}function _0x37fd1e(e){var t=0;t$$(e.style3D)&&(t=e.style3D.bottomAltitude);var i=e.height+t;if(e._sceneMode===b$1d.SCENE3D)if(e._fileType===c$q.ClampGroundRealtimeRasterCache)e._position=new a$11(e.lon,e.lat,i),c$1a.fromTranslation(e._position,e._matModel);else{var n=a$11.fromDegrees(e.lon,e.lat,i),r=a$11.fromDegrees(e.lon,e.lat,e.height);e._position=n;var o=new e$1L(e._heading,0,0);m$13.headingPitchRollToFixedFrame(n,o,n$1c.WGS84,m$13.eastNorthUpToFixedFrame,e._matModel),m$13.headingPitchRollToFixedFrame(r,o,n$1c.WGS84,m$13.eastNorthUpToFixedFrame,e._oriMatModel)}else if(e._fileType!==c$q.ClampGroundRealtimeRasterCache){if(e.lon>180||e.lon<-180||e.lat>180||e.lat<-180||e.positionUnits===_0x5040c1.METER)if(e.useMercatorProject){var a=(u=new e$1H).unproject(new a$11(e.lon,e.lat,0));e._position=e._scene.camera._projection.project(a)}else{var s=e.lon,l=e.lat;s>20037508.342789244&&(a$11.globalOffset.x=20037508.342789244*Math.floor(s/20037508.342789244),s-=a$11.globalOffset.x),l>10018754.171394622&&(a$11.globalOffset.y=20037508.342789244*Math.floor((l+10018754.171394622)/20037508.342789244),l-=a$11.globalOffset.y),e._position=new a$11(s,l,i)}else{var u=new s$1q;n=a$11.fromDegrees(e.lon,e.lat,i),a=u.ellipsoid.cartesianToCartographic(n);e._position=u.project(a)}c$1a.fromTranslation(e._position,e._matModel),c$1a.multiply(_0x3d6b16,e._matModel,e._matModel)}else e._position=new a$11(e.lon,e.lat,i),c$1a.fromTranslation(e._position,e._matModel);e._style3D._dirty&&t$$(e._layerScheduler)&&(e._layerScheduler._updateRootBoundingSphere(e._layerScheduler._oriRootEntities,e._matModel),e._style3D._dirty=!1),t$$(e._layerScheduler)&&e._layerScheduler.traverseRenderEntity({},(function(t){!t._colorCommand||(t._colorCommand.modelMatrix=c$1a.multiply(e._matModel,t._geoMatrix,t._colorCommand.modelMatrix))}))}function _0x303024(e,t){var i=e._hypsometricSetting;if(t$$(i)&&i._emissionTextureChanged){t$$(i._emissionTextureAtlas)&&!i._emissionTextureAtlas.isDestroyed()&&i._emissionTextureAtlas.destroy(),i._emissionTextureAtlas=new _$z({context:t});var n={};n.layer=e,n.textureCount=1,t$$(i._emissionTextureArray)&&i._emissionTextureArray.length>0?i._emissionTextureArray.map((function(t){i._emissionTextureAtlas.addImage(t.url,t.url).then((function(r){t.textureAtlasID=r,i._loadedEmissionTexture++,i._loadedEmissionTexture==i._emissionTextureArray.length&&(n.enable=!0,n.textureCount=i._loadedEmissionTexture,e.traverseRenderEntity(n,_0x66ff7d))}))})):(n.enable=!1,n.textureCount=0,e.traverseRenderEntity(n,_0x66ff7d)),i._emissionTextureChanged=!1}}function _0x59a805(e,t){e._manualShadowVolumeBottomHeight===_0x174b15&&e._manualShadowVolumeTopHeight===_0x5f321e?0===t.minTerrainHeight&&0===t.maxTerrainHeight?(e._shadowVolumeBottomHeight=_0x174b15,e._shadowVolumeTopHeight=_0x5f321e):(e._shadowVolumeBottomHeight=t.minTerrainHeight-10,e._shadowVolumeTopHeight=t.maxTerrainHeight+10):(e._shadowVolumeBottomHeight=e._manualShadowVolumeBottomHeight,e._shadowVolumeTopHeight=e._manualShadowVolumeTopHeight)}function _0x598209(e,t,i,n,r){var o=t$X.createIfNeeded(t).fetchImage().then((function(t){var o=new P$S({context:e,source:t,sampler:new a$Q({wrapS:j$13.REPEAT,wrapT:j$13.REPEAT,minificationFilter:tt$l.LINEAR_MIPMAP_LINEAR,magnificationFilter:tt$l.LINEAR})});!n$1d.isPowerOfTwo(o.width)||!n$1d.isPowerOfTwo(o.height)||o.generateMipmap(D$12.NICEST),n[r]=o,i.readyTextureCount++})).otherwise((function(){i.pendingTextureCount--}));n[r]=o}function _0x942933(e){if(!e._animationInfo.done){var t=(Date.now()-e._animationInfo.startTime)/1e3;t>=e._animationInfo.duration&&(e._animationInfo.defer.resolve(),e._animationInfo.done=!0,t=e._animationInfo.duration);for(var i=0,n=e._animationInfo.array.length;i<n;i++){var r=e._animationInfo.array[i];_0x313264(e,r,t),_0x2c8556(e,r,t),_0x46ca24(e,r,t)}_0x5e9397(e)}}_0x4ab4f4.DEFAULT_TRANSPARENT_BACK_COLOR=e$1z.BLACK,_0x4ab4f4.DEFAULT_TRANSPARENT_BACK_COLOR_TOLERANCE=0,Object.defineProperties(_0x4ab4f4.prototype,{overlapWeightAttributeName:{get:function(){return this._overlapWeightAttributeName},set:function(e){this._overlapWeightAttributeName=e}},heightRangeAttributeName:{get:function(){return this._heightRangeAttributeName},set:function(e){this._heightRangeAttributeName=e}},urlType:{get:function(){return this._urlType},set:function(e){this._urlType=e}},minVisibleAltitude:{get:function(){return this._minVisibleAltitude},set:function(e){n$1e.typeOf.number("min visible altitude",e),this._minVisibleAltitude=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){n$1e.typeOf.number("max visible altitude",e),this._maxVisibleAltitude=e}},heading:{get:function(){return this._heading},set:function(e){n$1e.typeOf.number("heading",e),this._heading=e,this.initialize()}},lodRangeScale:{get:function(){return this._lodRangeScale},set:function(e){this._historyCommands.push({func:"lodRangeScale",arguments:[e]}),this._lodRangeScale=e}},priorityScale:{get:function(){return this._priorityScale},set:function(e){this._priorityScale=e}},customRequestHeaders:{get:function(){return this._layerScheduler._customRequestHeaders},set:function(e){this._layerScheduler._customRequestHeaders=e}},style3D:{get:function(){return this._style3D},set:function(e){e&&(this._historyCommands.push({func:"style3D",arguments:[e]}),this._style3D=e,this._style3D._owner=this,this._iconCollection.style3D=this._style3D)}},themeStyle:{get:function(){return this._styleEngine.style},set:function(e){this._historyCommands.push({func:"themeStyle",arguments:[e]});var t=this;if(t$$(this._queryFieldNames)||0!==t._layerScheduler._attributes._memoryCache){if(t$$(t.themeStyle)&&t$$(t.themeStyle.pbrMaterialIndex)){var i={enable:!0};i.layer=t,t.traverseRenderEntity(i,_0x34c369)}t._styleEngine.style=e}else t._layerScheduler._downloadAttributes().then((function(){if(t._styleEngine.style=e,t$$(t.themeStyle)&&t$$(t.themeStyle.pbrMaterialIndex)){var i={enable:!0};i.layer=t,t.traverseRenderEntity(i,_0x34c369)}}));this.traverseRenderEntity({},(function(e){e._themeDirty=!0}))}},wireFrameMode:{get:function(){return this._wireFrameType},set:function(e){if(this._historyCommands.push({func:"wireFrameMode",arguments:[e]}),e!==this._wireFrameType){if(e===_0x39abaa.Quad&&(e=_0x39abaa.EffectOutline),e===_0x39abaa.Sketch||this._wireFrameType===_0x39abaa.Sketch){var t={};t.edgeMode=e===_0x39abaa.Sketch?1:0,t.layer=this,this.traverseRenderEntity(t,_0x3a86e2)}this._wireFrameType=e}}},visible:{get:function(){return this._visible},set:function(e){this._fileType===c$q.ClampGroundRealtimeRasterCache&&this._visible!=e&&this._layerScheduler.refreshRaster(this._frameState),this._visible=e}},dataMaxValue:{get:function(){return t$$(this._hypMaxCategory)?this._hypMaxCategory:this._hypMaxHeight}},dataMinValue:{get:function(){return t$$(this._hypMinCategory)?this._hypMinCategory:this._hypMinHeight}},ColorDictTableMode:{set:function(e){this._hypUseColorByHeight=e}},hypsometricSetting:{get:function(){return{hypsometricSetting:this._hypsometricSetting,analysisMode:this._hypAnalysisMode}},set:function(e){this._bUseHypColorTable=!1,this._hypsometricRegionUpdate=!0,t$$(this._hypsometricRegion)&&(this._hypsometricRegion.destroy(),this._hypsometricRegion=null),t$$(this._hypsometricRenderTexture)||(this._hypsometricRenderTexture=new P$S({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:Z$_.RGBA})),t$$(this._hypsometricTexture)||(this._hypsometricTexture=new P$S({context:this._context,width:1024,height:64,pixelFormat:Z$_.RGBA,flipY:!1}));var t={};if(t.layer=this,!t$$(e)||!t$$(e.hypsometricSetting))return t$$(this._hypsometricSetting)&&(this._hypsometricSetting.destroy(),this._hypsometricSetting=void 0),void this.traverseRenderEntity(t,_0x435894);if(this._hypAnalysisMode=e.analysisMode||this._hypAnalysisMode,this._hypsometricSetting=_$P.clone(e.hypsometricSetting,this._hypsometricSetting),this._hypsometricSetting._emissionTextureChanged=!0,t$$(this._hypsometricSetting.ColorTable)&&(this._hypsometricSetting.ColorTable.generateBuffer(),t$$(this._hypsometricTexture)&&this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._hypsometricSetting.ColorTable._imageBuffer})),this._hypAnalysisMode!==J$O.AnalysisRegionMode.ARM_NONE?(this._bUseHypColorTable=!0,this.traverseRenderEntity(t,_0x261d94)):this.traverseRenderEntity(t,_0x435894),this._hypsometricSetting.UpdatePolygonRegion&&this._hypAnalysisMode===J$O.AnalysisRegionMode.ARM_REGION&&this._hypsometricSetting.CoverageArea.length>0){var i=this._hypsometricSetting.CoverageArea,n=new S$C({polygonHierarchy:{positions:a$11.fromDegreesArrayHeights(i)}}),r=S$C.createGeometry(n),o=new c$1a;c$1a.inverse(this._matModel,o),u$U.updateGeometry(r,i,o,this._frameState.mode===b$1d.COLUMBUS_VIEW);var a=u$U.updateGeoBounds(r),s=.01*(a.z-a.x);a.w,a.y,this._hypsometricRegion=new u$U,this._hypsometricRegion._geometry=r,this._hypsometricRegion._bounds.x=a.x-s,this._hypsometricRegion._bounds.y=a.y-s,this._hypsometricRegion._bounds.z=a.z+s,this._hypsometricRegion._bounds.w=a.w+s,a$10.clone(this._hypsometricRegion._bounds,this._hypsometricBound)}this._bVolume||this._colorTableChanged.raiseEvent()}},layerBounds:{get:function(){return this._layerBounds},set:function(e){this._layerBounds=e}},LoadingMode:{get:function(){return this._nLoadingMode},set:function(e){this._nLoadingMode=e}},LoadingPriority:{get:function(){return t$$(this._layerScheduler)?this._layerScheduler.LoadingPriority:_0x271348.Child_Priority},set:function(e){t$$(this._layerScheduler)&&(this._layerScheduler.LoadingPriority=e)}},bReleaseColor:{get:function(){return this._bReleaseColor},set:function(e){this._bReleaseColor=e}},ignoreNormal:{get:function(){return this._ignoreNormal},set:function(e){this._ignoreNormal!==e&&(this._ignoreNormal=e,this.refresh())}},visibleDistanceMax:{get:function(){return this._visibleDistanceMax},set:function(e){this._visibleDistanceMax=e}},visibleDistanceMin:{get:function(){return this._visibleDistanceMin},set:function(e){this._visibleDistanceMin=e}},clipLineColor:{get:function(){return new e$1z(this._clipLineColor.x,this._clipLineColor.y,this._clipLineColor.z,this._clipLineColor.w)},set:function(e){e instanceof e$1z&&(this._clipLineColor=new a$10(e.red,e.green,e.blue,e.alpha))}},clipPlaneColor:{get:function(){return new e$1z(this._clipPlaneColor.x,this._clipPlaneColor.y,this._clipPlaneColor.z,this._clipPlaneColor.w)},set:function(e){e instanceof e$1z&&(this._clipPlaneColor=new a$10(e.red,e.green,e.blue,e.alpha))}},shadowType:{get:function(){return this._shadowType},set:function(e){this._historyCommands.push({func:"shadowType",arguments:[e]}),this._shadowType!==e&&(this._shadowType=e,this.updateShadow())}},horizontalline:{get:function(){return this._fHorizontalLine},set:function(e){this._fHorizontalLine=e}},horizontalColor:{get:function(){return new e$1z(this._HorizontalColor.x,this._HorizontalColor.y,this._HorizontalColor.z,this._HorizontalColor.w)},set:function(e){e instanceof e$1z&&(this._HorizontalColor=new a$10(e.red,e.green,e.blue,e.alpha))}},hasLight:{get:function(){return this._hasLight},set:function(e){if(this._historyCommands.push({func:"hasLight",arguments:[e]}),t$$(e)){this._hasLight=e;var t={};t.layer=this,t.enable=e,this.traverseRenderEntity(t,_0x22f2d7)}}},cullEnabled:{get:function(){return this._cullEnabled},set:function(e){this.cullMode=e?_0x2ee645.COUNTER_CLOCKWISE:_0x2ee645.NONE}},cullMode:{get:function(){return this._cullMode},set:function(e){this._cullMode=e;var t=p$1a.getState(this._rsColor);t.cull.enabled=e!==_0x2ee645.NONE,t.frontFace=e!==_0x2ee645.NONE?e:_0x2ee645.COUNTER_CLOCKWISE,this._rsColor=p$1a.fromCache(t)}},selectColorType:{get:function(){return this._selectColorType},set:function(e){if(this._selectColorType!==e){this._selectColorType=e,this.isSilhouette()?this._context.numNormalAndDepthObject++:(this._context.numNormalAndDepthObject--,this._context.numNormalAndDepthObject=Math.max(this._context.numNormalAndDepthObject,0));var t={};t.layer=this,t.selectColorType=e,this.traverseRenderEntity(t,_0x42e90f)}}},mixColorType:{get:function(){return this._mixColorType},set:function(e){if(this._historyCommands.push({func:"mixColorType",arguments:[e]}),this._mixColorType!==e){this._mixColorType=e;var t={layer:this,mixColorType:e};this.traverseRenderEntity(t,_0x3cf84f)}}},id:{get:function(){return this._id}},name:{get:function(){return this._name}},groupName:{get:function(){return this._groupName}},selectEnabled:{get:function(){return this._selectEnabled},set:function(e){this._historyCommands.push({func:"selectEnabled",arguments:[e]}),n$1e.defined("value",e),n$1e.typeOf.bool("value",e),this._selectEnabled=e}},enableHighlight:{get:function(){return this._enableHighlight},set:function(e){n$1e.defined("value",e),n$1e.typeOf.bool("value",e),this._enableHighlight=e}},skeletonSelectEnable:{get:function(){return this._skeletonSelectEnable},set:function(e){n$1e.defined("value",e),n$1e.typeOf.bool("value",e),this._skeletonSelectEnable=e,this.refresh()}},selectedColor:{get:function(){return this._selectedColor},set:function(e){this._historyCommands.push({func:"selectedColor",arguments:[e]}),n$1e.defined("selectedColor value",e),this._selectedColor=e$1z.clone(e),this._labelCollection.selectedColor=e$1z.clone(e)}},selectedLineColor:{get:function(){return this._selectedLineColor},set:function(e){n$1e.defined("selectedColor value",e),this._selectedLineColor=e$1z.clone(e)}},skeletonSelectedColor:{get:function(){return this._skeletonSelectedColor},set:function(e){n$1e.defined("skeletonSelectedColor value",e),this._skeletonSelectedColor=e$1z.clone(e)}},selectedSkeletonId:{get:function(){return this._lastSelectSkeletonId},set:function(e){n$1e.defined("selectSkeletonId value",e),this._lastSelectSkeletonId=e}},multiChoose:{get:function(){return this._multiChoose},set:function(e){n$1e.defined("multiChoose",e),n$1e.typeOf.bool("multiChoose",e),this._multiChoose=e}},brightness:{get:function(){return this._brightness},set:function(e){this._brightness=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x51bfa3)}},contrast:{get:function(){return this._contrast},set:function(e){this._contrast=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x51bfa3)}},hue:{get:function(){return this._hue},set:function(e){this._hue=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x51bfa3)}},saturation:{get:function(){return this._saturation},set:function(e){this._saturation=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x51bfa3)}},gamma:{get:function(){return this._gamma},set:function(e){this._gamma=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x51bfa3)}},transparentBackColor:{get:function(){return this._transparentBackColor},set:function(e){if(this._transparentBackColor!==e){this._transparentBackColor=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x24b2d9)}}},transparentBackColorTolerance:{get:function(){return this._transparentBackColorTolerance},set:function(e){if(this._transparentBackColorTolerance!==e){this._transparentBackColorTolerance=e;var t={};t.layer=this,0===this._transparentBackColorTolerance?this.traverseRenderEntity(t,_0x31a936):this.traverseRenderEntity(t,_0x24b2d9)}}},volName:{get:function(){return this._volName},set:function(e){for(var t=0;t<this._volNames.length;t++)this._volNames[t]==e&&(this._volName=e,this._fMaxValue=this._maxVolumeValues[t],this._fMinValue=this._minVolumeValues[t],this._strVolumeExt=this._strVolumeExts[t],this.refreshVolume())}},coverImageryLayer:{get:function(){return this._imageryLayer},set:function(e){if(t$$(e))if(t$$(this._imageryLayer)){!(this._imageryLayer instanceof Array)&&!this._imageryLayer.show&&this._layerScheduler._hideImage(),this._imageryLayer=e;var t=this;if(this._imageryLayer instanceof Array){for(var i=[],n=0;n<this._imageryLayer.length;n++)i.push(this._imageryLayer[n]._imageryProvider._readyPromise);t._layerScheduler._stopLoadImagery=!0,Promise.all(i).then((function(){t._layerScheduler._refreshImage(),t._layerScheduler._stopLoadImagery=!1}))}else t._layerScheduler._stopLoadImagery=!0,this._imageryLayer._imageryProvider._readyPromise.then((function(){t._layerScheduler._refreshImage(),t._layerScheduler._stopLoadImagery=!1}))}else{if(!this._needCoverImageryLayer)return this.refresh(),this._imageryLayer=e,void(this._needCoverImageryLayer=!0);var r=!1;t$$(this._imageryLayer)||(r=!0),this._imageryLayer=e;t=this;if(this._imageryLayer instanceof Array){for(i=[],n=0;n<this._imageryLayer.length;n++)i.push(this._imageryLayer[n]._imageryProvider._readyPromise);t._layerScheduler._stopLoadImagery=!0,Promise.all(i).then((function(){t._layerScheduler._refreshImage(),t._layerScheduler._stopLoadImagery=!1,r&&t._updateCoverImageryLayer(!1)}))}else t._layerScheduler._stopLoadImagery=!0,this._imageryLayer._imageryProvider._readyPromise.then((function(){t._layerScheduler._refreshImage(),t._layerScheduler._stopLoadImagery=!1,r&&t._updateCoverImageryLayer(!1)}));this._needCoverImageryLayer=!0}else t$$(this._imageryLayer)&&(this._updateCoverImageryLayer(!0),this._imageryLayer=void 0)}},splitDirection:{get:function(){return this._splitDirection},set:function(e){if(n$1e.typeOf.number("splitDirection",e),this._splitDirection!==e){this._splitDirection=e;var t={layer:this,enableSplit:e!==_0x324096.NONE};this.traverseRenderEntity(t,_0x59eeac)}}},splitPosition:{get:function(){return this._splitPosition},set:function(e){n$1e.typeOf.number("splitPosition",e),this._splitPosition=e}},selectionFiltrateByTransparency:{get:function(){return this._selectionFiltrateByTransparency},set:function(e){this._historyCommands.push({func:"selectionFiltrateByTransparency",arguments:[e]}),n$1e.typeOf.number("selectionFiltrateByTransparency value",e),this._selectionFiltrateByTransparency=e}},effect:{get:function(){return this._effect},set:function(e){this._effect=e}},bloomEffect:{get:function(){return t$$(this._bloomEffect)||(this._bloomEffect=new _0x2d12d7),this._bloomEffect}},bloomEnable:{get:function(){return!!t$$(this._bloomEffect)&&this._bloomEffect.enable}},selectedTranslate:{get:function(){return this._selectedTranslate},set:function(e){n$1e.typeOf.object("selected translate",e),!a$11.equals(e,this._selectedTranslate)&&(this._selectedTranslate=e)}},clearMemoryImmediately:{get:function(){return this._clearMemoryImmediately},set:function(e){this._historyCommands.push({func:"clearMemoryImmediately",arguments:[e]}),this._clearMemoryImmediately=e}},maximumMemoryUsage:{get:function(){return this._maximumMemoryUsage},set:function(e){n$1e.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumMemoryUsage=e}},PBRMaterialType:{get:function(){return this._PBRMaterialType},set:function(e){if(this._PBRMaterialType!==e){this._PBRMaterialType=e;var t=_0x20df78.getMaterial(e),i=this;t$$(this._pbrMetalTexture)&&(this._pbrMetalTexture.destroy(),this._pbrMetalTexture=null),t$$(this._pbrRoughTexture)&&(this._pbrRoughTexture.destroy(),this._pbrRoughTexture=null),c$18(n$S(t.metalTextureUrl),(function(e){i._pbrMetalTexture=new P$S({context:i._frameState.context,source:e,pixelFormat:Z$_.LUMINANCE,pixelDatatype:v$Z.UNSIGNED_BYTE})})),c$18(n$S(t.roughTextureUrl),(function(e){i._pbrRoughTexture=new P$S({context:i._frameState.context,source:e,pixelFormat:Z$_.LUMINANCE,pixelDatatype:v$Z.UNSIGNED_BYTE})}));var n={};n.layer=this,n.PBRType=e,this.traverseRenderEntity(n,_0x461efb)}}},PBRMetallic:{get:function(){return this._PBRMaterialParams.pbrMetallicRoughness.metallicFactor},set:function(e){this._PBRMaterialParams.pbrMetallicRoughness.metallicFactor=e}},PBRRoughness:{get:function(){return this._PBRMaterialParams.pbrMetallicRoughness.roughnessFactor},set:function(e){this._PBRMaterialParams.pbrMetallicRoughness.roughnessFactor=e}},emissiveFactor:{get:function(){return this._PBRMaterialParams.pbrMetallicRoughness.emissiveFactor},set:function(e){this._PBRMaterialParams.pbrMetallicRoughness.emissiveFactor=e}},textureUVSpeed:{get:function(){return this._textureUVSpeed},set:function(e){n$1e.typeOf.object("textureUVSpeed value",e),r$T.clone(e,this._textureUVSpeed);var t={};t.layer=this,t.enable=0!==this._textureUVSpeed.x||0!==this._textureUVSpeed.y,this.traverseRenderEntity(t,_0x191621)}},indexedDBSetting:{get:function(){return this._indexedDBSetting},set:function(e){if(this._historyCommands.push({func:"indexedDBSetting",arguments:[e]}),t$$(window.Proxy)){var t=this;if(t$$(e)&&"boolean"==typeof e.isGeoTilesSave&&"boolean"==typeof e.isAttributesSave&&"boolean"==typeof e.isGeoTilesRootNodeSave){(i={}).isGeoTilesSave=e.isGeoTilesSave,i.isAttributesSave=e.isAttributesSave,i.isGeoTilesRootNodeSave=e.isGeoTilesRootNodeSave,i.clear=function(){t._layerScheduler._clearIndexedDBCache()};var i={isAttributesSave:!1,isGeoTilesSave:!1,isGeoTilesRootNodeSave:!1,clear:function(){t._layerScheduler._clearIndexedDBCache()}};this._indexedDBSetting=new Proxy(i,{get:function(e,t){return e[t]},set:function(e,i,n){"isAttributesSave"===i&&!1===e.isAttributesSave&&!0===n&&(t$$(t._layerScheduler._indexedDBScheduler)?t._layerScheduler._indexedDBScheduler.getElementFromDB("attributes","saved").then((function(e){!e&&0==t._layerScheduler._attributes._memoryCache&&t._layerScheduler._requestAllScvd()}),(function(){0==t._layerScheduler._attributes._memoryCache&&t._layerScheduler._requestAllScvd()})):t._layerScheduler._dpPromise.then((function(){t._layerScheduler._indexedDBScheduler.getElementFromDB("attributes","saved").then((function(e){!e&&0==t._layerScheduler._attributes._memoryCache&&t._layerScheduler._requestAllScvd()}),(function(){0==t._layerScheduler._attributes._memoryCache&&t._layerScheduler._requestAllScvd()}))}))),e[i]=n}}),this._layerScheduler._indexedDBSetting=this._indexedDBSetting}}else this._indexedDBSetting={isAttributesSave:!1,isGeoTilesSave:!1,isGeoTilesRootNodeSave:!1},this._layerScheduler._indexedDBSetting=this._indexedDBSetting}},pointCloudShading:{get:function(){return this._pointCloudShading}},shadowVolumeTopHeight:{get:function(){return this._manualShadowVolumeTopHeight},set:function(e){this._manualShadowVolumeTopHeight=e}},shadowVolumeBottomHeight:{get:function(){return this._manualShadowVolumeBottomHeight},set:function(e){this._manualShadowVolumeBottomHeight=e}},triangleFiltratePixel:{get:function(){return this._triangleFiltratePixel},set:function(e){var t=parseFloat(e),i=this._triangleFiltratePixel>0,n=t>0;if(this._triangleFiltratePixel=t,this._vertexWeightMode===_0x4e00e3.EdgeLengthMin&&i!=n){var r={};r.layer=this,r.enable=n,this.traverseRenderEntity(r,_0x35862f)}}},useMercatorProject:{get:function(){return this._useMercatorProject},set:function(e){this._useMercatorProject=e,this.refresh()}},minTransparentAlpha:{get:function(){return this._minTransparentAlpha},set:function(e){this._minTransparentAlpha=e}},maxTransparentAlpha:{get:function(){return this._maxTransparentAlpha},set:function(e){this._maxTransparentAlpha=e}},selectBound:{get:function(){return this._selectRect},set:function(e){this._selectRect=e,this._selectUpdate=!0,this._selectEnabled=!0}},S3MTileLoadedEvent:{get:function(){return this._S3MTileLoadedEvent}},attributeDownloaded:{get:function(){return this._attributeDownloaded}},allTilesLoaded:{get:function(){return this._allTilesLoaded}},prepareLoadEvent:{get:function(){return this._prepareLoadEvent}},prepareLoadDataSize:{get:function(){return this._prepareLoadSize},set:function(e){n$1e.typeOf.number("value",e),e>0&&(this._prepareLoadSize=e,t$$(this._prepareLoadEvent)||(this._prepareLoadEvent=new o$15),this._layerScheduler._prepareLoaded=!1)}},colorTableChanged:{get:function(){return this._colorTableChanged}},receiveObjectClamp:{get:function(){return this._receiveObjectClamp},set:function(e){this._receiveObjectClamp=e;var t=p$1a.getState(this._rsColor);t.stencilTest=_0x43be0d.createReceiveClampObjectStencilTest(e),this._rsColor=p$1a.fromCache(t)}},orderIndependentTranslucency:{get:function(){return this._useOIT},set:function(e){this._historyCommands.push({func:"orderIndependentTranslucency",arguments:[e]}),n$1e.typeOf.bool("value",e),this._useOIT=e}},partlyTransparent:{get:function(){return this._partlyTransparent},set:function(e){n$1e.typeOf.bool("value",e),this._partlyTransparent=e}},showLabel:{get:function(){return this._showLabel},set:function(e){n$1e.defined("value",e),n$1e.typeOf.bool("value",e),this._showLabel=e,this._showLabel&&0===Object.keys(this._layerScheduler._attributes).length&&this._layerScheduler._requestAllScvd()}},labelStyle:{get:function(){return this._s3MTilesLabelStyle},set:function(e){n$1e.defined("value",e),(this._s3MTilesLabelStyle._textFieldChanged||t$$(e._textField)&&this._s3MTilesLabelStyle._textField!==e._textField)&&this._labelCollection.removeAll(),this._s3MTilesLabelStyle=e,t$$(this._labelCollection)&&this._labelCollection.setLabelStyle(this._s3MTilesLabelStyle)}},swipeRegion:{get:function(){return new n$13(this._swipeRegion.x,this._swipeRegion.y,this._swipeRegion.z-this._swipeRegion.x,this._swipeRegion.w-this._swipeRegion.y)},set:function(e){if(t$$(e)){if(!(e instanceof n$13))throw new t$_("swipeRegion must be a instance of BoundingRectangle.");a$10.fromElements(e.x,e.y,e.x+e.width,e.y+e.height,this._swipeRegion)}}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){e!==this._swipeEnabled&&(e?this.splitDirection=_0x324096.NONE:a$10.fromElements(0,0,1,1,this._swipeRegion),this._swipeEnabled=e,this.traverseRenderEntity({layer:this,enableSwipe:e},_0x140d02))}},allObjsHide:{get:function(){return this._allObjsHide}},residentRootTile:{get:function(){return this._residentRootTile},set:function(e){this._historyCommands.push({func:"residentRootTile",arguments:[e]}),n$1e.typeOf.bool("residentRootTile",e),this._residentRootTile=e}},idFieldName:{get:function(){return this._idFieldName}},loadVolumeData:{get:function(){return this._loadVolumeData},set:function(e){this._loadVolumeData=e}},showIcon:{get:function(){return this._showIcon},set:function(e){n$1e.defined("value",e),n$1e.typeOf.bool("value",e),this._showIcon=e}},showCallout:{get:function(){return this._iconCollection.showCallout},set:function(e){n$1e.defined("value",e),n$1e.typeOf.bool("value",e),this._iconCollection.showCallout=e}},waterColor:{get:function(){return this._waterParamter&&this._waterParamter.waterColour},set:function(e){if(!t$$(this._waterParamter))throw new t$_("No water exists in this layer");if(n$1e.defined("value",e),!(e instanceof e$1z))throw new t$_("Expected waterColor to be typeof color");this._waterParamter.waterColour=e}},waterSpeed:{get:function(){return this._waterParamter&&this._waterParamter.bumpSpeed},set:function(e){if(!this._waterParamter)throw new t$_("No water exists in this layer");if(n$1e.defined("value",e),!(e instanceof r$T))throw new t$_("Expected waterSpeed to be typeof Cartesian2");this._waterParamter.bumpSpeed=e}},waterWaveScale:{get:function(){return this._waterParamter&&this._waterParamter.noiseScale},set:function(e){if(!this._waterParamter)throw new t$_("No water exists in this layer");n$1e.defined("value",e),n$1e.typeOf.number("value",e),this._waterParamter.noiseScale=e}},attributeFieldNames:{get:function(){return t$$(this._fieldsInfo)?Object.keys(this._fieldsInfo._hash):void 0}},queryFieldNames:{get:function(){return this._queryFieldNames},set:function(e){if(this._historyCommands.push({func:"queryFieldNames",arguments:[e]}),t$$(this._queryFieldNames)&&this._queryFieldNames.sort().toString()!==e.sort().toString())for(var t=e.filter((e=>!this._queryFieldNames.includes(e))),i=this._layerScheduler,n=0;n<i._rootEntities.length;n++){var r=i._rootEntities[n];r._attrAppend=t,r.attrLoadState=W$q.UNLOAD}this._queryFieldNames=e}},hasWireframe:{get:function(){return this._hasWireframe}},subdomains:{get:function(){return this._subdomains},set:function(e){if(t$$(e)&&!t$$(e.length))throw new t$_("Excepted S3MTilesLayer.subdomains to be type of Array.");this._subdomains=e}},iconRelatedTextLayerID:{get:function(){return this._iconRelatedTextLayerID},set:function(e){if(typeof e<"u"&&"number"!=typeof e)throw new t$_("Excepted S3MTilesLayer.iconRelatedTextLayerID to be type of number or undefined");this._iconRelatedTextLayerID=e}},isOverlapDisplayed:{get:function(){return this._isOverlapDisplayed},set:function(e){n$1e.typeOf.bool("isOverlapDisplayed",e),this._isOverlapDisplayed=e,this._isOverlapDisplayed?this.setOnlyObjsVisible([],!1,!0,!0):this.setOnlyObjsVisible([],!0,!1)}},clippingType:{get:function(){return this._clippingType},set:function(e){n$1e.defined("clipping type",e),this._clippingType=e,t$$(this._spatialQuery)&&(this._spatialQuery.positionMode=_0x37687a(e))}},rasterPerFrame:{get:function(){return this._rasterPerFrame&&this._fileType===c$q.ClampGroundRealtimeRasterCache},set:function(e){n$1e.typeOf.bool("rasterPerFrame",e),this._rasterPerFrame=e}},RGBTOBGR:{get:function(){return this._RGBTOBGR},set:function(e){n$1e.typeOf.bool("RGBTOBGR",e),this._RGBTOBGR=e}},textureEmissionUnit:{get:function(){return this._textureEmissionUnit},set:function(e){this._textureEmissionUnit=e}},computeHeight:{get:function(){return this._computeHeight},set:function(e){this._computeHeight=e}},mipmapEnabled:{get:function(){return this._mipmapEnabled},set:function(e){this._mipmapEnabled=e}},enableFusion:{get:function(){return this._enableFusion},set:function(e){e!==this._enableFusion&&(this._enableFusion=e,this.traverseRenderEntity({enable:e,layer:this},_0x58d3ac))}},heightScale:{get:function(){return this._heightScale},set:function(e){if(e!==this._heightScale){e=Math.max(e,1e-5),this._heightScale=e;var t=c$1a.fromScale(new a$11(1,1,e),new c$1a);this.traverseRenderEntity({scaleMatrix:t,layerMatrix:this._matModel},_0x4eabfc)}}},temporalCount:{get:function(){return this._temporalCount}},temporalSetting:{get:function(){return this._temporalSetting},set:function(e){this._temporalSetting=e}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){this._translucencyByDistance=e}}}),_0x4ab4f4.prototype.initialize=function(){_0x37fd1e(this);var e,t=this._fileType,i=_0x43be0d.createClampGroundStencilRenderState();if(t===c$q.ClampGroundLine||t===c$q.ClampGroundPolygon||t===c$q.ExtendClampPolygonCache?(e=_0x43be0d.createClampGroundColorRenderState(),i=_0x43be0d.createClampGroundStencilRenderState()):t===c$q.ClampObjectPolygon||t===c$q.ClampObjectLine?(e=_0x43be0d.createClampObjectColorRenderState(),i=_0x43be0d.createClampObjectStencilRenderState()):t===c$q.ClampGroundAndObjectLineCache?e=_0x43be0d.createClampGroundAndObjectLineRenderState():(e=_0x43be0d.createNormalColorRenderState(this.cullMode)).stencilTest=_0x43be0d.createReceiveClampObjectStencilTest(this._receiveObjectClamp),t$$(this._polygonOffsetConfig)&&!0===this._polygonOffsetConfig.enabled&&(e.polygonOffset=this._polygonOffsetConfig),this._rsColor=p$1a.fromCache(e),this._rsClampColor=p$1a.fromCache(_0x43be0d.createClampGroundColorRenderState()),this._rsClampLineColor=p$1a.fromCache(_0x43be0d.createClampGroundAndObjectLineRenderState()),this._rsStencil=p$1a.fromCache(i),t$$(this.waterEffectSet)){this._waterPlanes=new e$1F,this._waterParamter=[];for(var n=0;n<this.waterEffectSet[0].gpuProgramParameters.length;n++){for(var r=this.waterEffectSet[0].gpuProgramParameters[n],o=0;o<r.atuoConstants.length;o++){var a=r.atuoConstants[o];if("timeVal"===a.name){this._waterParamter[a.name]=a.fData;break}}for(o=0;o<r.gpuConstants.length;o++){var s=r.gpuConstants[o],l=null;switch(s.arraySize){case 1:l=s.arrayFloat[0];break;case 2:l=new r$T,r$T.unpack(s.arrayFloat,0,l);break;case 3:l=new a$11,a$11.unpack(s.arrayFloat,0,l);break;case 4:l=new a$10,a$10.unpack(s.arrayFloat,0,l)}!t$$(l)||(this._waterParamter[s.name]=l)}}this._waterUniformBuffer=_0x35487f.createWaterUniformBuffer(this._context,this)}this._computeLayerModelBounds()},_0x4ab4f4.prototype._updateCoverImageryLayer=function(e){for(var t=this._layerScheduler,i=[],n=0;n<t._rootEntities.length;n++){var r=t._rootEntities[n];i.push(r)}for(var o,a={layer:this};o=i.pop();)for(var s=0;s<o._childrenPageLod.length;s++){for(var l=o._childrenPageLod[s]._renderEntityList,u=l.length,c=0;c<u;c++)e?(l[c]._imagerys=void 0,l[c].removeProgramDefineForCommand(l[c]._colorCommand,a,!0,!0,"IMAGERY"),l[c]._imageRasterFinish=!1,l[c]._imageryLevels=[]):l[c].appendProgramDefineForCommand(l[c]._colorCommand,a,!0,!0,"IMAGERY");o._childrenPageLod[s]._entity&&i.push(o._childrenPageLod[s]._entity)}},_0x4ab4f4.prototype.appendQueryFieldName=function(e){t$$(e.length)||new t$_("Expected value to be type of Array");for(var t=this._queryFieldNames,i=[],n=0,r=e.length;n<r;n++){var o=e[n];-1===t.indexOf(o)&&i.push(o)}if(0===i.length)return c$18.resolve();this._queryFieldNames=i;var a=this;return c$18.all(this._layerScheduler.appendQueryFieldName(this)).then((function(){a._queryFieldNames=t.concat(i)}))},_0x4ab4f4.prototype.getPointCloudClassificationInfos=function(){if(t$$(this._pointCloudClassificationInfos))return this._pointCloudClassificationInfos;if(this._isS3MB){var e=u$$(i=new h$1f("./attribute.json").resolve(this._baseUri).toString()),t=this;return e.then((function(e){var i=[];if(!t$$(e.classificationInfos))return t._pointCloudClassificationInfos=i,i;for(var n=0,r=e.classificationInfos.length;n<r;n++){var o=e.classificationInfos[n].id,a=e.classificationInfos[n].name,s=e.classificationInfos[n].pointCount;i.push(new _0x4e912a(o,a,s))}return t._pointCloudClassificationInfos=i,i})).otherwise((function(e){console.log(e)}))}var i=new h$1f("./indexData.dat").resolve(this._baseUri).toString();t$$(a$R.CREDENTIAL)&&(i=a$R.addToken(i));e=u$_(i),t=this;return e.then((function(e){for(var i=e.firstChild,n=i.namespaceURI,r=f$10.queryNodes(i,"PointCloudClassification",n),o=[],a=0,s=r.length;a<s;a++){var l=r[a],u=f$10.queryStringAttribute(l,"ID"),c=f$10.queryStringAttribute(l,"Name"),h=f$10.queryNumericAttribute(l,"PointCounts");o.push(new _0x4e912a(u,c,h))}return t._pointCloudClassificationInfos=o,o})).otherwise((function(e){console.log(e)}))},_0x4ab4f4.prototype.setPolygonoffset=function(e,t){if(this._rsColor._applyFunctions.length=0,this._rsColor.polygonOffset.factor!==e||this._rsColor.polygonOffset.units!==t){var i=p$1a.getState(this._rsColor);i.polygonOffset={enabled:!0,factor:e$1Y(e,0),units:e$1Y(t,0)},this._rsColor=p$1a.fromCache(i)}},_0x4ab4f4.prototype.getVolNames=function(){return this._volNames},_0x4ab4f4.prototype.setQueryParameter=function(e){if(!t$$((e=e||{}).url))throw new t$_("options.url is required!");if(!t$$(e.dataSourceName))throw new t$_("options.dataSourceName is required!");if(!t$$(e.dataSetName)&&!0!==e.isMerge)throw new t$_("options.dataSetName is required or isMerge must be true!");if(e.keyWord=e$1Y(e.keyWord,"SmID"),e.hasGeometry=e$1Y(e.hasGeometry,!1),this.queryParameter=e$1W(e),!t$$(this.queryParameter.dataSetName)&&1==this.queryParameter.isMerge){var t=this;this.datasetInfo().then((function(e){t.queryParameter.datasetList=e}))}},_0x4ab4f4.prototype.getQueryParameter=function(){return this.queryParameter},_0x4ab4f4.prototype.datasetInfo=function(){var e=c$18.defer();if(this._isS3MB){var t=this._baseUri+"attribute.json";t$$(a$R.CREDENTIAL)&&(t=a$R.addToken(t)),u$$(t).then((function(t){for(var i=t.layerInfos,n=new Array,r=0;r<i.length;r++){var o=i[r],a={};a.datasetName=o.layerName,a.startID=parseInt(o.idRange.minID),a.endID=parseInt(o.idRange.maxID),n.push(a)}e.resolve(n)}))}else{var i=this._baseUri+"indexData.dat";t$$(a$R.CREDENTIAL)&&(i=a$R.addToken(i));e=c$18.defer();c$18(u$_(i),(function(t){for(var i=f$10.getElementsByTagNameNS(t,"*","DatasetName"),n=f$10.getElementsByTagNameNS(t,"*","DatasetIDRange"),r=new Array,o=0;o<i.length;o++){var a={};a.datasetName=i[o].innerHTML;var s=n[o].innerHTML,l=s.indexOf("_");a.startID=parseInt(s.substr(0,l)),a.endID=parseInt(s.substr(l+1,s.length-l-1)),r.push(a)}e.resolve(r)}))}return e.promise},_0x4ab4f4.prototype.getLodRangeScale=function(){return this._lodRangeScale},_0x4ab4f4.prototype.setAnimation=function(e){n$1e.typeOf.object("options",e),n$1e.typeOf.object("options.keyframes",e.keyframes),n$1e.typeOf.number.greaterThan("options.duration",e.duration,0);var t=e.keyframes,i=e.duration,n=e.interpolationType;if("0%"in t){var r=t["0%"];r.scale=e$1Y(r.scale,new a$11(1,1,1)),r.rotation=e$1Y(r.rotation,new e$1L(this._heading,0,0)),r.translation=e$1Y(r.translation,a$11.fromDegrees(this.lon,this.lat,this.style3D.bottomAltitude))}else t["0%"]={translation:a$11.fromDegrees(this.lon,this.lat,this.style3D.bottomAltitude),scale:new a$11(1,1,1),rotation:new e$1L(this._heading,0,0)};var o=Object.keys(t);return(o=o.filter((function(e){return"%"===e[e.length-1]}))).sort((function(e,t){return(e=+e.slice(0,-1))-(t=+t.slice(0,-1))})),this._animationInfo={startTime:Date.now(),array:[],duration:i,defer:c$18.defer(),defaultInterpolation:e$1Y(n,_0x2d9da3.Linear),done:!1},_0x3ab0cb(this._animationInfo,"rotation",o,t),_0x3ab0cb(this._animationInfo,"scale",o,t),_0x3ab0cb(this._animationInfo,"translation",o,t),this._animationInfo.defer},_0x4ab4f4.prototype.setLodRangeScale=function(e){this._lodRangeScale=e},_0x4ab4f4.prototype.refreshRaster=function(){if(t$$(this._frameState)){var e=this._frameState._quadtree._levelZeroTiles;e[0]&&_0x14a9f2(this,e[0]),e[1]&&_0x14a9f2(this,e[1])}},_0x4ab4f4.prototype._isNeedUpdate=function(e,t){return!(!t$$(e)||!t$$(t)||!this._visible||t$$(this.waterEffectSet)&&t._fboState.enabled&&"water"===t._fboState.name)},_0x4ab4f4.prototype._loadMaterialTexture=function(e,t){e.loadingTexture=!0;var i=e.pbrMetallicRoughness,n=e.textureunitstates,r=i.baseColorTextureIndex;t$$(e.pendingTextureCount)||(e.pendingTextureCount=0),t$$(e.readyTextureCount)||(e.readyTextureCount=0);var o=this._context,a=t$$(t)?t:this._baseUri+this._materialRelativePath;r>-1&&!t$$(i.baseColorTexture)&&(_0x598209(o,a+n[r].textureunitstate.url,e,e.pbrMetallicRoughness,"baseColorTexture"),e.pendingTextureCount++);var s=i.emissiveTextureIndex;s>-1&&!t$$(i.emissiveTexture)&&(_0x598209(o,a+n[s].textureunitstate.url,e,e.pbrMetallicRoughness,"emissiveTexture"),e.pendingTextureCount++);var l=i.normalTextureIndex;l>-1&&!t$$(i.normalTexture)&&(_0x598209(o,a+n[l].textureunitstate.url,e,e.pbrMetallicRoughness,"normalTexture"),e.pendingTextureCount++);var u=i.metallicRoughnessTextureIndex;u>-1&&!t$$(i.metallicRoughnessTexture)&&(_0x598209(o,a+n[u].textureunitstate.url,e,e.pbrMetallicRoughness,"metallicRoughnessTexture"),e.pendingTextureCount++);var c=i.occlusionTextureIndex;c>-1&&!t$$(i.occlusionTexture)&&(_0x598209(o,a+n[c].textureunitstate.url,e,e.pbrMetallicRoughness,"occlusionTexture"),e.pendingTextureCount++)},_0x4ab4f4.prototype._loadMaterial=function(e,t){var i=this;t$X.createIfNeeded(e).fetchJson().then((function(e){t$$(i._materialMap)||(i._materialMap={}),e.material.ready=!1,i._materialMap[t]=e,i.readyMaterialCount++}))},_0x4ab4f4.prototype._loadMaterialMap=function(e){if(t$$(this._materialMapInfo)){this.readyMaterialCount=0;for(var t=0,i=this._materialMapInfo.length;t<i;t++){var n=this._materialMapInfo[t],r=this._baseUri+this._materialRelativePath+n.AssociateMaterial+".json";this._loadMaterial(r,n.OriginalMaterial)}this.pendingMaterialCount=this._materialMapInfo.length,this._materialMapInfo=void 0}if(t$$(this._materialMap)&&this.pendingMaterialCount===this.readyMaterialCount){var o=!0;for(var a in this._materialMap)if(this._materialMap.hasOwnProperty(a)){var s=this._materialMap[a].material;s.loadingTexture||this._loadMaterialTexture(s),s.pendingTextureCount===s.readyTextureCount&&(s.ready=!0),o=o&&s.ready}this._materialMapReady=o}if(!t$$(this._associateMaterialPromise)){var l=this,u=e.lastIndexOf("/");this._materialRelativePath=e.substring(0,u+1),e=this._baseUri+e;var c=t$X.createIfNeeded(e);this._associateMaterialPromise=c.fetchJson().then((function(e){l._materialMapInfo=e.Scenes[0].Layers[0].Materials.MaterialExportedMap}))}},_0x4ab4f4.prototype.update=function(e,t,i,n){if(this._fileType!==c$q.Text&&this._fileType!==c$q.IconPoint||!t.passes.pick||!t.passes.offscreen){if(t$$(this._associateMaterialUrl)&&!this._materialMapReady)return void this._loadMaterialMap(this._associateMaterialUrl);if(this._PBRMaterialParams.loadingTexture&&this._updatePBRMaterial(),_0x942933(this),this._isNeedUpdate(e,t)){this._style3D._dirty&&(_0x37fd1e(this),this._style3D._dirty=!1),this._style3D.billboardMode===Cr$2.FixedXYZ&&(this._isOverlapDisplayed=!0),_0x303024(this,e);var r=t.camera;this._sceneMode=r._mode,this._projection=r._projection,this._picking=t.passes.pick,this._frameState=t,this._backfaceCommands.length=0,this._hasMixedContent=!1;var o,a=i.length;for(l=0,o=this._renderClipPlaneArray.length;l<o;l++){this._renderClipPlaneArray.values[l].update(e,t,i)}if(this._layerScheduler.update(e,t,i),this._shadowDarkness=t.shadowDarkness,this._showIcon&&this._iconCollection.length>0&&this._iconCollection.update(t,e,i),n=e$1Y(n,!1),this._showLabel&&!0!==n&&(this._labelCollection.s3MlayerId=this._id,this._labelCollection.update(t,e,i)),this._fileType===c$q.PointCloudFile&&t.passes.render)i.length-a>0&&(this._pointCloudShading.eyeDomeLighting||this._pointCloudShading.performance)&&this._pointCloudEyeDomeLighting.update(t,a,this._pointCloudShading);this._fileType===c$q.ClampGroundRealtimeRasterCache&&(t.rasterLineWidth=this.style3D.lineWidth),_0x59a805(this,t),this._updateEdgeDistanceFalloffFactor();for(var s=this._excavateRegionCommands.values.length,l=0;l<s;l++){var u=this._excavateRegionCommands.values[l];t.commandList.push(u)}_0x48e83a(t,this);var c=this._objsVisibleMap;this._hasObjsVisibleMap=Object.keys(c).length>0,this._hasHeightRangeAttributeName=t$$(this._heightRangeAttributeName)}}};var _0x508b8a=new c$1a;function _0x5e9397(e){for(var t=[],i=0,n=e._layerScheduler._rootEntities.length;i<n;i++){var r=e._layerScheduler._rootEntities[i];t.push(r)}for(;t.length;){if(t$$(r=t.pop())){t$$(r._originalBS)&&(c$19.transform(r._originalBS,e._matModel,r._boundingSphere),_0x4a3e31(r,e._matModel));for(i=0,n=r._childrenPageLod.length;i<n;i++){var o=r._childrenPageLod[i];_0x4a3e31(o,e._matModel),t$$(o._originalBS)&&c$19.transform(o._originalBS,e._matModel,o._boundingSphere);for(var a=0,s=o._renderEntityList.length;a<s;a++){var l=o._renderEntityList[a];!t$$(l)||!t$$(l._colorCommand)||(c$1a.inverse(l._colorCommand.modelMatrix,_0x508b8a),c$19.transform(l._boundingVolume,_0x508b8a,l._boundingVolume),c$1a.multiply(e._matModel,l._geoMatrix,l._colorCommand.modelMatrix),c$19.transform(l._boundingVolume,l._colorCommand.modelMatrix,l._boundingVolume),l._colorCommand._boundingVolume=l._boundingVolume)}t.push(o._entity)}}}}function _0x4a3e31(e,t){if(t$$(e.obbMin)){var i=e.obbMin,n=e.obbMax,r=[];r.push(new a$11(i.x,i.y,i.z)),r.push(new a$11(i.x,i.y,n.z)),r.push(new a$11(i.x,n.y,i.z)),r.push(new a$11(i.x,n.y,n.z)),r.push(new a$11(n.x,i.y,i.z)),r.push(new a$11(n.x,i.y,n.z)),r.push(new a$11(n.x,n.y,i.z)),r.push(new a$11(n.x,n.y,n.z));for(var o=0;o<8;o++)r[o]=c$1a.multiplyByPoint(t,r[o],r[o]);e._orientedBoundingBox=b$1o.fromPoints(r,e._orientedBoundingBox)}}function _0x3bd553(e,t,i){for(var n,r=0,o=e.length;r<o;r++){var a=e[r],s=a.times;if(t>=s[0]&&t<=s[s.length-1]){n=a;break}}n&&n.evaluate(t,i)}var _0xb5f56f=a$U.clone(a$U.IDENTITY),_0x54b41f=new e$1L,_0x3653c4=new c$1a,_0x193e8a=new r$W,_0xf1705a=new r$W,_0x1853fc=new a$11;function _0x313264(e,t,i){"rotation"===t.type&&(_0x3bd553(t.splines,i,_0xb5f56f),r$W.fromQuaternion(_0xb5f56f,_0xf1705a),m$13.headingPitchRollToFixedFrame(e._position,_0x54b41f,n$1c.WGS84,m$13.eastNorthUpToFixedFrame,_0x3653c4),c$1a.getRotation(_0x3653c4,_0x193e8a),r$W.multiply(_0x193e8a,_0xf1705a,_0x193e8a),c$1a.getTranslation(e._matModel,_0x1853fc),c$1a.fromRotationTranslation(_0x193e8a,_0x1853fc,e._matModel))}var _0x9db461=new a$11(1,1,1);function _0x2c8556(e,t,i){"scale"===t.type&&(_0x3bd553(t.splines,i,_0x9db461),c$1a.setScale(e._matModel,_0x9db461,e._matModel))}function _0x46ca24(e,t,i){"translation"===t.type&&(_0x3bd553(t.splines,i,e._position),c$1a.setTranslation(e._matModel,e._position,e._matModel))}var _0x424b74=new a$10;function _0x48e83a(e,t){t$$(e.realtimeRasterSwipeParams)||(e.realtimeRasterSwipeParams={}),_0x424b74.x=t._swipeRegion.x*e.context.drawingBufferWidth,_0x424b74.y=(1-t._swipeRegion.y)*e.context.drawingBufferHeight,_0x424b74.z=t._swipeRegion.z*e.context.drawingBufferWidth,_0x424b74.w=(1-t._swipeRegion.w)*e.context.drawingBufferHeight,e.realtimeRasterSwipeParams.swipeRegion=_0x424b74,e.realtimeRasterSwipeParams.swipeEnabled=t._swipeEnabled}var _0x3733af=new a$10;function _0x5e159c(e,t){e.updateAllObjsVisible(t.layer,t.isVisible)}function _0x3d71b6(e,t){e.updateTheme(t.layer)}function _0xcf0e5b(e,t){e.updateObjsColor(t.ids)}function _0x5d8f57(e,t){e.updateObjsTranslate(t.ids)}function _0x14a007(e,t){e.updateExtendHeight(t.ids)}function _0x1d9eca(e,t){e.removeExtendHeight(t.ids)}function _0x5e9e15(e,t){e.removeAllExtendHeight()}function _0xcf1a00(e,t){e.updateObjsOperation(t.ids,t)}function _0x1124ee(e,t,i){var n=new a$11,r=new a$11;a$11.subtract(t,e,n),a$11.subtract(i,e,r);var o=new a$11;a$11.cross(n,r,o),a$11.normalize(o,o);var a=-a$11.dot(o,e);return new a$10(o.x,o.y,o.z,a)}function _0x2a0fd0(e,t){var i=e._projection,n=i.ellipsoid,r=new a$11,o=new i$1g;return n.cartesianToCartographic(t,o),i.project(o,r),a$11.fromElements(r.z,r.x,r.y)}_0x4ab4f4.prototype.render=function(e,t){if(t$$(e)&&t$$(t)){if(t.passes.pick){_0x3733af.x=e._pickPosition[0],_0x3733af.y=e._pickPosition[1],_0x3733af.z=e._pickPosition[2],_0x3733af.w=1;var i=new c$1a;c$1a.inverse(this._matModel,i),c$1a.multiplyByVector(i,_0x3733af,_0x3733af),_0x3733af.z=_0x3733af.z+this.height<0?2:_0x3733af.z+this.height,a$10.clone(_0x3733af,this._pickPosition)}if(this._picking=t.passes.pick,this.updateFlattenFrameBuffer(e,t),this._updateExcavationFrameBuffer(e,t),this.updateHypRegionFrameBuffer(e,t),this.updateOverlayFrameBuffer(e,t),this._clipping){var n=t.camera.inverseViewMatrix,r=new c$1a;c$1a.transpose(n,r);for(var o=0;o<6;o++)c$1a.multiplyByVector(r,this._oriClipPlane[o],this._clipPlane[o])}this._spatialClipEnable&&t$$(this._spatialQuery)&&this._spatialQuery._updateTextures(e,t)}},_0x4ab4f4.prototype.setSelection=function(e,t){if(this._historyCommands.push({func:"setSelection",arguments:[e,t]}),_0x335bbd.S3M!==this._version&&(n$1e.defined("setSelection ids",e),this._selectEnabled&&this._enableHighlight)){if(Array.isArray(e)||(e=[e]),this.multiChoose||this.releaseSelection(),this._lastSelectSkeletonId=e$1Y(t,-1),this._fileType===c$q.ClampGroundRealtimeRasterCache)for(var i=0,n=e.length;i<n;i++)this._layerScheduler.refreshRasterById(e[i],this._frameState);this._scene._layers.setSelectedLayer(this),this._selections=this._selections.concat(e),this.setObjectsOperationByID(e,_0x24b8f6.SELECTED)}},_0x4ab4f4.prototype.getSelection=function(){return[].concat(this._selections)},_0x4ab4f4.prototype.releaseSelection=function(){if(_0x335bbd.S3M!==this._version&&(this._showLabel&&this._labelCollection.releaseSelection(),!(this._selections.length<1))){if(this._fileType===c$q.ClampGroundRealtimeRasterCache)for(var e=0,t=this._selections.length;e<t;e++)this._layerScheduler.refreshRasterById(this._selections[e],this._frameState);this.removeObjectsOperation(this._selections,_0x24b8f6.SELECTED),this._selections.length=0}},_0x4ab4f4.prototype.setSkeletonSelection=function(e){},_0x4ab4f4.prototype.setRenderSelectionTexBySkeletonId=function(e){var t={};t.layer=this,t.enable=e,this.traverseRenderEntity(t,_0x4642cb)},_0x4ab4f4.prototype.setObjsColor=function(e,t){if(this._historyCommands.push({func:"setObjsColor",arguments:[e,t]}),_0x335bbd.S3M!==this._version){n$1e.defined("setObjsColor ids",e),n$1e.defined("setObjsColor color",t),n$1e.typeOf.object("setObjsColor color",t),Array.isArray(e)||(e=[e]);for(var i={},n=0,r=e.length;n<r;n++){var o=e[n]+"";!t$$(o)||(this._objsColorList[o]=t,i[o]=t)}this.updateObjsColor(i)}},_0x4ab4f4.prototype.getObjsColor=function(e){if(!t$$(e))throw new Error("id is required");return _0x335bbd.S3M===this._version?null:this._objsColorList[e]},_0x4ab4f4.prototype.removeObjsColor=function(e){n$1e.defined("removeObjsColor ids",e),Array.isArray(e)||(e=[e]);for(var t={},i=0,n=e.length;i<n;i++){var r=e[i];t$$(this._objsColorList[r])&&(t[r]=e$1z.TRANSPARENT,delete this._objsColorList[r])}this.removeObjectsOperation(e,_0x24b8f6.SetColor),this.updateObjsColor(t)},_0x4ab4f4.prototype.removeAllObjsColor=function(){if(!(Object.keys(this._objsColorList).length<1)){var e={};for(var t in this._objsColorList)this._objsColorList.hasOwnProperty(t)&&(e[t]=e$1z.TRANSPARENT);this._objsColorList={},this.updateObjsColor(e)}},_0x4ab4f4.prototype.setObjsExtendHeight=function(e,t){if(_0x335bbd.S3M!=this._version&&t$$(this._objsHeightList)){n$1e.defined("setObjsExtendHeight ids",e),n$1e.defined("setObjsExtendHeight height",t),Array.isArray(e)||(e=[e]);for(var i=new e$1F,n=0,r=e.length;n<r;n++){var o=e[n];this._objsHeightList.set(o,t),i.set(o,t)}this.updateExtendHeight(i)}},_0x4ab4f4.prototype.removeAllObjsExtendHeight=function(){!t$$(this._objsHeightList)||(this._objsHeightList.removeAll(),this.removeAllExtendHeight())},_0x4ab4f4.prototype.removeObjsExtendHeight=function(e){if(t$$(this._objsHeightList)){n$1e.defined("removeObjsExtendHeight ids",e),Array.isArray(e)||(e=[e]);for(var t=0,i=e.length;t<i;t++){var n=e[t];this._objsHeightList.remove(n)}this.removeExtendHeight(e)}},_0x4ab4f4.prototype.setOnlyObjsVisible=function(e,t,i,n){if(this._historyCommands.push({func:"setOnlyObjsVisible",arguments:[e,t,i,n]}),i=e$1Y(i,!0),n=e$1Y(n,!1),_0x335bbd.S3M===this._version)return null;if(n$1e.defined("setOnlyObjsVisible ids",e),n$1e.typeOf.bool("setOnlyObjsVisible isVisible",t),Array.isArray(e)||(e=[e]),0===e.length){this._allObjsHide=t,this._objsVisibleList.removeAll();var r=Object.keys(this._objsHideList._hash);return this.removeObjectsOperation(r,_0x24b8f6.HIDE),this._objsHideList.removeAll(),i&&!n&&(this._objsVisibleMap={}),void this.updateAllObjsVisible(!t)}var o=this._objsVisibleList,a=this._objsHideList,s=this._objsVisibleMap;t?(e.map((function(e){o.set(e,!0),a.remove(e),i&&(s[e]=!0)})),this.removeObjectsOperation(e,_0x24b8f6.HIDE)):(e.map((function(e){o.remove(e),a.set(e,!0),i&&(s[e]=!1)})),this.setObjectsOperationByID(e,_0x24b8f6.HIDE))},_0x4ab4f4.prototype.setObjsVisible=function(e,t,i){this._historyCommands.push({func:"setObjsVisible",arguments:[e,t,i]}),0!==e.length?(this.setOnlyObjsVisible([],t,i),this.setOnlyObjsVisible(e,t,i)):this.setOnlyObjsVisible([],t,i)},_0x4ab4f4.prototype.setPointCloudGroupsVisible=function(e,t){if(this._fileType===c$q.PointCloudFile&&t$$(this._pointCloudLayerVisible)){n$1e.defined("setPointCloudGroupsVisible groupNames",e),n$1e.typeOf.bool("setPointCloudGroupsVisible isVisible",t),Array.isArray(e)||(e=[e]);for(var i=0,n=e.length;i<n;i++)this._pointCloudLayerVisible.hasOwnProperty(e[i])&&(this._pointCloudLayerVisible[e[i]]=t)}},_0x4ab4f4.prototype.getPointCloudGroupInfos=function(){if(this._fileType!==c$q.PointCloudFile)return[];if(!t$$(this._pointCloudLayerVisible))return[];var e=[];for(var t in this._pointCloudLayerVisible)this._pointCloudLayerVisible.hasOwnProperty(t)&&e.push(t);return e},_0x4ab4f4.prototype.getPointCloudGroupBounds=function(e){if(this._fileType===c$q.PointCloudFile&&t$$(this._groupNameBounds))return this._groupNameBounds.get(e)},_0x4ab4f4.prototype.getObjsVisible=function(e){if(!this.visible)return!1;if(_0x335bbd.S3M===this._version)return!0;var t=this._objsColorList[e],i=!0;return t$$(t)&&(i&=t.alpha),i},_0x4ab4f4.prototype.setObjsOffset=function(e){if(this._historyCommands.push({func:"setObjsOffset",arguments:[e]}),t$$(this._layerScheduler._extrudedId))if(Array.isArray(e))for(var t=0;t<e.length;t++)this._polygonsTranslate[e[t]]=a$11.clone(this._selectedTranslate);else this._polygonsTranslate[e]=a$11.clone(this._selectedTranslate);else this._boundingSphereOffset=a$11.clone(this._selectedTranslate),this.setObjectsOperationByID(e,_0x24b8f6.OFFSET)},_0x4ab4f4.prototype.setObjsTranslate=function(e,t){if(_0x335bbd.S3M!==this._version){n$1e.defined("setObjsTranslate ids",e),n$1e.defined("setObjsTranslate translate",t),n$1e.typeOf.object("setObjsTranslate translate",t),Array.isArray(e)||(e=[e]);for(var i={},n=0,r=e.length;n<r;n++){var o=e[n];!t$$(o)||(this._objsOffsetList[o]=t,i[o]=t)}Object.keys(i).length>0&&(this.traverseRenderEntity({ids:i},_0x5d8f57),this.setObjectsOperationByID(e,_0x24b8f6.OFFSET))}},_0x4ab4f4.prototype.setBatchObjsTranslate=function(e){_0x335bbd.S3M!==this._version&&(n$1e.defined("setObjsTranslate option",e),Object.getPrototypeOf(e)===Object.prototype&&(Object.assign(this._objsOffsetList,e),Object.keys(e).length>0&&(this.traverseRenderEntity({ids:e},_0x5d8f57),this.setObjectsOperationByID(Object.keys(e),_0x24b8f6.OFFSET))))},_0x4ab4f4.prototype.removeObjsTranslate=function(e){n$1e.defined("removeObjsTranslate ids",e),Array.isArray(e)||(e=[e]);for(var t={},i=0,n=e.length;i<n;i++){var r=e[i];t$$(this._objsOffsetList[r])&&(delete this._objsOffsetList[r],t[r]=a$11.ZERO)}this.removeObjectsOperation(e,_0x24b8f6.OFFSET),Object.keys(t).length>0&&this.traverseRenderEntity({ids:t},_0x5d8f57)},_0x4ab4f4.prototype.removeAllObjsTranslate=function(){var e={};for(var t in this._objsOffsetList)this._objsOffsetList.hasOwnProperty(t)&&(e[t]=a$11.ZERO);this.traverseRenderEntity({ids:e},_0x5d8f57),this._objsOffsetList={}},_0x4ab4f4.prototype.removeObjsOffset=function(e){this.removeObjectsOperation(e,_0x24b8f6.OFFSET)},_0x4ab4f4.prototype.removeAllObjsOffset=function(){this._boundingSphereOffset=a$11.ZERO,this.removeAllObjectsOperation(_0x24b8f6.OFFSET)},_0x4ab4f4.prototype.setObjectsOperationByID=function(e,t){if(_0x335bbd.S3M!==this._version){n$1e.defined("set Objs Operation ids",e),n$1e.defined("set Objs Operation operationType",t),Array.isArray(e)||(e=[e]),t===_0x24b8f6.CLIP&&(this._operationType&_0x24b8f6.CLIP)===_0x24b8f6.RESET&&(this._operationType|=t,this.traverseRenderEntity({layer:this,enable:!0},_0x15c00e));for(var i,n=new e$1F,r=0,o=e.length;r<o;r++)if(t$$(i=e[r])){var a=e$1Y(this._objsOperationList[i],0);a!==t&&(a|=t,this._objsOperationList[i]=a,n.set(i,a))}n.length>0&&this.updateObjsOperation(n._hash)}},_0x4ab4f4.prototype.removeObjectsOperation=function(e,t){if(_0x335bbd.S3M!==this._version){n$1e.defined("set Objs Operation ids",e),Array.isArray(e)||(e=[e]);for(var i,n=_0x24b8f6.ALL^t,r=new e$1F,o=0,a=e.length;o<a;o++){i=e[o];var s=this._objsOperationList[i];!t$$(s)||((s&=n)===_0x24b8f6.RESET?delete this._objsOperationList[i]:this._objsOperationList[i]=s,r.set(i,s))}r.length>0&&this.updateObjsOperation(r._hash)}},_0x4ab4f4.prototype.removeAllObjectsOperation=function(e){if(_0x335bbd.S3M!==this._version&&!(Object.keys(this._objsOperationList).length<1)){var t=_0x24b8f6.ALL^e,i=new e$1F,n=this._objsOperationList;for(var r in n)if(n.hasOwnProperty(r)){var o=this._objsOperationList[r];if(!t$$(o))continue;(o&=t)===_0x24b8f6.RESET?delete this._objsOperationList[r]:this._objsOperationList[r]=o,i.set(r,o)}i.length>0&&this.updateObjsOperation(i._hash)}},_0x4ab4f4.prototype.setCategoriesVisible=function(e,t){n$1e.defined("set Categories Visible",e),Array.isArray(e)||(e=[e]);var i=this._hypMaxCategory,n=this._hypMinCategory,r=256,o=Math.max(Math.ceil((i-n)/r),1);t$$(this._categorieTexture)||(this._categorieTexture=new P$S({context:this._context,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE,width:r,height:o,flipY:!1,sampler:new a$Q({minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST})}),this.traverseRenderEntity({layer:this},_0x3fd61f));var a=new Uint8Array(r*o*4);if(t!==_0x49e724.ResetAll){var s,l,u;if(t===_0x49e724.Hide)for(s=0,l=e.length;s<l;s++)u=e[s],this._categoryHideList.set(u,u);else for(s=0,l=e.length;s<l;s++)u=e[s],this._categoryHideList.contains(u)&&this._categoryHideList.remove(u);for(s=0;s<this._categoryHideList.values.length;s++){var c=(u=this._categoryHideList.values[s])-n;a[4*c]=255,a[4*c+1]=255,a[4*c+2]=255,a[4*c+3]=255}this._categorieTexture.copyFrom({width:r,height:o,arrayBufferView:a})}else this._categorieTexture.copyFrom({width:r,height:o,arrayBufferView:a})},_0x4ab4f4.prototype.addFlattenRegion=function(e){var t=e.name,i=e.position;if(!t$$(t)||!t$$(i))return!1;if(t$$(this._flattenRegions.get(t)))return!1;t$$(this._flattenTexture)||(this._flattenTexture=new P$S({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:Z$_.RGBA,pixelDatatype:this._context.floatingPointTexture?v$Z.FLOAT:void 0}));var n=this._createRasterRegion(i),r=a$11.fromDegreesArrayHeights(i),o=c$19.fromPoints(r,new c$19);if(n.boundingSphere=o,this._flattenRegions.set(t,n),this._flattenUpdate=!0,1===this._flattenRegions.values.length){var a={};a.layer=this,a.boundingSphere=o,this.traverseRenderEntity(a,_0x404fb6)}return!0},_0x4ab4f4.prototype.removeFlattenRegion=function(e){if(!this._flattenRegions.remove(e))return!1;if(this._flattenUpdate=!0,0===this._flattenRegions.values.length){var t={};t.layer=this,this.traverseRenderEntity(t,_0x47d208)}return!0},_0x4ab4f4.prototype.removeAllFlattenRegion=function(){for(var e=0;e<this._flattenRegions.values.length;e++)this._flattenRegions.values[e].destroy(),this._flattenRegions.values[e]=null;this._flattenRegions.removeAll(),this._flattenUpdate=!0;var t={};t.layer=this,this.traverseRenderEntity(t,_0x47d208)},_0x4ab4f4.prototype.addOverlayImage=function(e){var t=(e=e$1Y(e,{})).name,i=e.bounds,n=e.image;if(!t$$(t)||!t$$(i)||!t$$(e.image))return!1;var r=this._overlayRegions.get(t);if(t$$(r))return!1;t$$(this._overlayTexture)||(this._overlayTexture=new P$S({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:Z$_.RGBA}));var o=new P$S({context:this._context,width:n.width,height:n.height,pixelFormat:Z$_.RGBA,source:n});if(this._overlayTextures.set(t,o),r=this._createRasterBounds(i),this._overlayRegions.set(t,r),this._overlayUpdate=!0,1===this._overlayRegions.values.length){var a={};a.layer=this,this.traverseRenderEntity(a,_0x12b864)}return!0},_0x4ab4f4.prototype.removeOverlayImage=function(e){if(!t$$(e))return!1;if(!t$$(this._overlayRegions.get(e)))return!1;if(this._overlayTextures.remove(e),this._overlayRegions.remove(e),this._overlayUpdate=!0,1===this._overlayRegions.values.length){var t={};t.layer=this,this.traverseRenderEntity(t,_0x12b864)}return!0},_0x4ab4f4.prototype.setModifyRegions=function(e,t){if(this._historyCommands.push({func:"setModifyRegions",arguments:[e,t]}),this.clearModifyRegions(),t==je$8.CLIP_INSIDE||t==je$8.CLIP_OUTSIDE)for(var i=e.length,n=0;n<i;n++){var r={position:e[n],name:"modify_"+n};this.addExcavationRegion(r)}this._excavationMode=t},_0x4ab4f4.prototype._setServerClipRegions=function(e,t){for(var i=0,n=e.length;i<n;i++){var r={position:e[i],name:"server_clipregion_"+i};this._addServerExcavationRegion(r)}this._serverExcavationMode=e$1Y(t,je$8.CLIP_OUTSIDE)},_0x4ab4f4.prototype.setClipRegions=function(e){if(!(e instanceof Array))throw new t$_("regions must be a georegion3d array");var t=this._baseUri.toString();new t$X(a={url:t.substring(0,t.indexOf("/data/path"))+"/config",method:"POST",data:JSON.stringify({clipRegions:e})})._makeRequest({method:"POST",data:a.data});for(var i=0;i<e.length;i++){for(var n=[],r=e[i],o=0;o<r.points.length;o++)n.push(r.points[o].x),n.push(r.points[o].y),n.push(r.points[o].z);var a={position:n,name:"server_clipregion_x"+i};this._addServerExcavationRegion(a)}},_0x4ab4f4.prototype.clearModifyRegions=function(){for(var e=Object.keys(this._excavationRegions._hash),t=0,i=e.length;t<i;t++){var n=e[t];n.startsWith("modify_")&&this.removeExcavationRegion(n)}},_0x4ab4f4.prototype.addExcavationRegion=function(e){var t=e.name,i=e.position,n=e.height;if(t$$(t)||n$1e.typeOf.string("options.name",t),t$$(i)||n$1e.typeOf.string("options.position",i),t$$(this._excavationRegions.get(t)))return!1;t$$(this._excavationTexture)||(this._excavationTexture=new P$S({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:Z$_.RGBA}));var r=this._createRasterRegion(i,n,t$$(n));if(r.name=t,this._excavationRegions.set(t,r),this._excavationUpdate=!0,this._hasExcavation=!0,1===this._excavationRegions.values.length){var o={};o.layer=this,this.traverseRenderEntity(o,_0x3248b0)}return!0},_0x4ab4f4.prototype._addServerExcavationRegion=function(e){var t=e.name,i=e.position,n=e.height;if(t$$(t)||n$1e.typeOf.string("options.name",t),t$$(i)||n$1e.typeOf.string("options.position",i),t$$(this._serverExcavationRegions.get(t)))return!1;t$$(this._excavationTexture)||(this._excavationTexture=new P$S({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:Z$_.RGBA}));var r=this._createRasterRegion(i,n,t$$(n));if(r.name=t,this._serverExcavationRegions.set(t,r),this._excavationUpdate=!0,this._hasServerExcavation=!0,1===this._serverExcavationRegions.values.length){var o={};o.layer=this,this.traverseRenderEntity(o,_0x4305d6)}return!0},_0x4ab4f4.prototype.removeExcavationRegion=function(e){var t=this._excavationRegions.get(e);if(!this._excavationRegions.remove(e))return!1;if(t.destroy(),this._removeExcavationCommands(e),this._excavationUpdate=!0,0===this._excavationRegions.values.length){var i={};i.layer=this,this.traverseRenderEntity(i,_0x3a4f6f)}return!0},_0x4ab4f4.prototype._removeServerExcavationRegion=function(e){var t=this._serverExcavationRegions.get(e);if(!this._serverExcavationRegions.remove(e))return!1;if(t.destroy(),this._removeExcavationCommands(e),this._excavationUpdate=!0,0===this._serverExcavationRegions.values.length){var i={};i.layer=this,this.traverseRenderEntity(i,_0x26da32)}return!0},_0x4ab4f4.prototype._removeExcavationCommands=function(e){var t=this._excavateRegionCommands.get(e+"side"),i=this._excavateRegionCommands.get(e+"bottom");t&&(t.vertexArray=t.vertexArray&&!t.vertexArray.isDestroyed()&&t.vertexArray.destroy()),i&&(i.vertexArray=i.vertexArray&&!i.vertexArray.isDestroyed()&&i.vertexArray.destroy()),this._excavateRegionCommands.remove(e+"side"),this._excavateRegionCommands.remove(e+"bottom")},_0x4ab4f4.prototype.removeAllExcavationRegion=function(){for(var e=Object.keys(this._excavationRegions._hash),t=0,i=e.length;t<i;t++){var n=e[t];this.removeExcavationRegion(n)}this._excavationRegions.removeAll()},_0x4ab4f4.prototype._createRasterRegion=function(e,t,i){var n=a$11.fromDegreesArrayHeights(e);if(this._sceneMode!==b$1d.SCENE3D)for(var r=0;r<n.length;r++)n[r]=_0x2a0fd0(this,n[r]);var o=new S$C({polygonHierarchy:{positions:n},perPositionHeight:!0}),a=S$C.createGeometry(o),s=new c$1a;c$1a.inverse(this._matModel,s),u$U.updateGeometry(a,e,s);var l=new u$U;if(l._geometry=a,l._bounds=u$U.updateGeoBounds(a),i){l.worldGeometry=S$C.createGeometry(o),l.colorGeometry=S$C.createGeometry(o);var u=a$11.fromDegrees(e[0],e[1],0),c=new e$1L(0,0,0);l._excavateMatrix=m$13.headingPitchRollToFixedFrame(u,c,n$1c.WGS84),l.modelMatrix=c$1a.fromTranslation(new a$11(e[0],e[1],0),new c$1a);for(var h=Number.MAX_VALUE,d=(r=0,e.length);r<d;r+=3)h=Math.min(h,e[r+2]);l.height=h-t,l.rectangle=s$1p.fromCartesianArray(n),l.positions=e}return l},_0x4ab4f4.prototype._createRasterBounds=function(e){var t=new B$B({rectangle:e}),i=B$B.createGeometry(t),n=new c$1a;if(c$1a.inverse(this._matModel,n),this._sceneMode===b$1d.COLUMBUS_VIEW)for(var r=0;r<i.attributes.position.values.length;r+=i.attributes.position.componentsPerAttribute){var o=new a$11(i.attributes.position.values[r],i.attributes.position.values[r+1],i.attributes.position.values[r+2]),a=i$1g.fromCartesian(o),s=new a$11;this._projection.project(a,s),i.attributes.position.values[r]=s.z,i.attributes.position.values[r+1]=s.x,i.attributes.position.values[r+2]=s.y}u$U.updateGeometry(i,void 0,n);var l=new u$U;return l._geometry=i,l._bounds=u$U.updateGeoBounds(i),l},_0x4ab4f4.prototype._computeLayerModelBounds=function(){var e=new a$11.fromRadians(this._layerBounds.west,this._layerBounds.south,0),t=new a$11.fromRadians(this._layerBounds.west,this._layerBounds.north,0),i=new a$11.fromRadians(this._layerBounds.east,this._layerBounds.south,0),n=new a$11.fromRadians(this._layerBounds.east,this._layerBounds.north,0),r=[];r.push(e),r.push(t),r.push(i),r.push(n);var o=new c$1a;c$1a.inverse(this._matModel,o),this._layerModelBounds=new a$10(Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(var a=0;a<4;a++)c$1a.multiplyByPoint(o,r[a],r[a]),this._layerModelBounds.x=Math.min(r[a].x,this._layerModelBounds.x),this._layerModelBounds.y=Math.min(r[a].y,this._layerModelBounds.y),this._layerModelBounds.z=Math.max(r[a].x,this._layerModelBounds.z),this._layerModelBounds.w=Math.max(r[a].y,this._layerModelBounds.w)},_0x4ab4f4.prototype._combineRegionBounds=function(e){for(var t=new a$10(Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),i=0;i<e.length;i++){var n=e[i]._bounds;t.x=Math.min(n.x,t.x),t.y=Math.min(n.y,t.y),t.z=Math.max(n.z,t.z),t.w=Math.max(n.w,t.w)}return t},_0x4ab4f4.prototype.createRasterRegionDrawCommand=function(e,t,i,n){if(t$$(t)&&!t$$(t._command)){var r=new s$1d({primitiveType:H$11.TRIANGLES});t._command=r;var o={position:0};r.vertexArray=x$18.fromGeometry({context:e,geometry:t._geometry,attributeLocations:o,bufferUsage:A$13.STATIC_DRAW,interleave:!0});var a=new a$O({sources:[_0x4ee30e]});n==_0x2b17a0.Altitude?(a.defines.push("Mode_Height"),i.pixelDatatype===v$Z.FLOAT&&a.defines.push("UseFloatTexture"),r.shaderProgram=p$15.fromCache({context:e,vertexShaderSource:_0x37c24d,fragmentShaderSource:a,attributeLocations:o})):n==_0x2b17a0.Texture?(a.defines.push("OVERLAY"),r.shaderProgram=p$15.fromCache({context:e,vertexShaderSource:_0x50e9a0,fragmentShaderSource:a,attributeLocations:o})):r.shaderProgram=p$15.fromCache({context:e,vertexShaderSource:_0x38a169,fragmentShaderSource:a,attributeLocations:o}),r.framebuffer=new u$F({context:e,colorTextures:[i],destroyAttachments:!1}),r.renderState=p$1a.fromCache({viewport:new n$13(0,0,this._flattenTextureWidth,this._flattenTextureWidth)})}},_0x4ab4f4.prototype.updateHypRegionFrameBuffer=function(e,t){if(this._hypsometricRegionUpdate){if(!t$$(this._hypsometricRegion))return void(this._bUseHypRegion=!1);this._bUseHypRegion=!0,this._hypsometricRegionUpdate=!1;var i=new r$M({color:new e$1z(0,0,0,0),depth:1});i.framebuffer=new u$F({context:e,colorTextures:[this._hypsometricRenderTexture],destroyAttachments:!1}),i.renderState=p$1a.fromCache(),i.execute(e),this.createRasterRegionDrawCommand(e,this._hypsometricRegion,this._hypsometricRenderTexture,_0x2b17a0.Color);var n=this;this._hypsometricRegion._command.uniformMap={uRect:function(){return n._hypsometricBound}},this._hypsometricRegion._command.execute(e),i.framebuffer.destroy()}},_0x4ab4f4.prototype.updateFlattenFrameBuffer=function(e,t){if(this._flattenUpdate){this._flattening=!0,this._flattenUpdate=!1,this._flattenBounds=this._combineRegionBounds(this._flattenRegions.values);var i=new r$M({color:new e$1z(0,0,0,0),depth:1});t$$(this._flattenTexture)||(this._flattenTexture=new P$S({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:Z$_.RGBA,pixelDatatype:this._context.floatingPointTexture?v$Z.FLOAT:void 0})),i.framebuffer=new u$F({context:e,colorTextures:[this._flattenTexture],destroyAttachments:!1}),i.renderState=p$1a.fromCache(),i.execute(e);var n=this._flattenRegions.values.length;n<1&&(this._flattening=!1);for(var r=0;r<n;r++){var o=this._flattenRegions.values[r];this.createRasterRegionDrawCommand(e,o,this._flattenTexture,_0x2b17a0.Altitude);var a=this;o._command.uniformMap={uRect:function(){return a._flattenBounds}},o._command.execute(e)}i.framebuffer.destroy()}},_0x4ab4f4.prototype.updateOverlayFrameBuffer=function(e,t){if(this._overlayUpdate){this._overlayUpdate=!1,this._overlayBounds=this._combineRegionBounds(this._overlayRegions.values),this._hasOverlay=this._overlayRegions.length>0;var i=new r$M({color:new e$1z(1,1,1,1),depth:1});i.framebuffer=new u$F({context:e,colorTextures:[this._overlayTexture],destroyAttachments:!1}),i.renderState=p$1a.fromCache(),i.execute(e);for(var n=this._overlayRegions.values.length,r=0;r<n;r++){var o=this._overlayRegions.values[r],a=this._overlayTextures.values[r];this.createRasterRegionDrawCommand(e,o,this._overlayTexture,_0x2b17a0.Texture),o._command.uniformMap=s(this._overlayBounds,a,o._bounds),o._command.execute(e)}i.framebuffer.destroy()}function s(e,t,i){return{uRect:function(){return e},uTexture:function(){return t},uSingleRegion:function(){return i}}}},_0x4ab4f4.prototype._updateExcavationFrameBuffer=function(e,t){if(this._excavationUpdate){for(var i in t._framebufferList)i.indexOf("_excavationHeightLayer")>-1&&!t$$(this._excavationRegions.get(i.slice(22)))&&(t._framebufferList[i]=!t._framebufferList[i].isDestroyed()&&t._framebufferList[i].destroy(),delete t._framebufferList[i]);var n=this._excavationRegions.values.length;this._hasExcavation=n>0,this._excavationUpdate=!1,this._excavationBounds=this._combineRegionBounds(this._excavationRegions.values);var r=this._serverExcavationRegions.values.length;if(this._hasServerExcavation=r>0,this._serverExcavationBounds=this._combineRegionBounds(this._serverExcavationRegions.values),0!=n||0!=r){var o=new r$M({color:new e$1z(0,0,0,0),depth:1});o.framebuffer=new u$F({context:e,colorTextures:[this._excavationTexture],destroyAttachments:!1}),o.renderState=p$1a.fromCache(),o.execute(e),b$w.createExcavationSideTexture(t,this),b$w.createExcavationBottomTexture(t,this);for(var a=0;a<n;a++){var s=this._excavationRegions.values[a];this.createRasterRegionDrawCommand(e,s,this._excavationTexture,_0x2b17a0.Color),t$$(s.height)&&(b$w._createExcavationSideCommand(t,this,s),b$w._createExcavationBottomCommand(t,this,s));var l=this;s._command.uniformMap={uRect:function(){return l._excavationBounds}},s._command.execute(e)}for(var u=0;u<r;u++){s=this._serverExcavationRegions.values[u];this.createRasterRegionDrawCommand(e,s,this._excavationTexture,_0x2b17a0.Color),t$$(s.height)&&(b$w._createExcavationSideCommand(t,this,s),b$w._createExcavationBottomCommand(t,this,s));l=this;s._command.uniformMap={uRect:function(){return l._serverExcavationBounds}},s._command.execute(e)}o.framebuffer.destroy()}}},_0x4ab4f4.prototype.updateAllObjsVisible=function(e){this.traverseRenderEntity({layer:this,isVisible:e},_0x5e159c)},_0x4ab4f4.prototype.updateObjsTheme=function(){var e={layer:this};this.traverseRenderEntity(e,_0x3d71b6)},_0x4ab4f4.prototype.updateObjsColor=function(e){var t={ids:e};this.traverseRenderEntity(t,_0xcf0e5b)},_0x4ab4f4.prototype.updateExtendHeight=function(e){var t={ids:e};this.traverseRenderEntity(t,_0x14a007)},_0x4ab4f4.prototype.removeExtendHeight=function(e){var t={ids:e};this.traverseRenderEntity(t,_0x1d9eca)},_0x4ab4f4.prototype.removeAllExtendHeight=function(){this.traverseRenderEntity({},_0x5e9e15)},_0x4ab4f4.prototype.updateObjsOperation=function(e){var t={ids:e,offset:Math.max(Math.abs(this.selectedTranslate.x),Math.abs(this.selectedTranslate.y),Math.abs(this.selectedTranslate.z))};this.traverseRenderEntity(t,_0xcf1a00)},_0x4ab4f4.prototype.refresh=function(){this._layerScheduler.refresh(),this.initialize()},_0x4ab4f4.prototype.refreshVolume=function(){this._refreshVolume=!0},_0x4ab4f4.prototype.clearCustomClipBox=function(){this.isRenderClipSection()&&this._context.numClampClipPlaneLayer--;for(var e=0,t=this._renderClipPlaneArray.values.length;e<t;e++)this._renderClipPlaneArray.values[e].destroy(),this._renderClipPlaneArray.values[e]=null;this._renderClipPlaneArray.removeAll(),this._clipping=!1,this._section=!1;var i={layer:this,enable:!1};this.traverseRenderEntity(i,_0x11173b)};var _0x2ed5d2=new i$1g;function _0x37687a(e){return e===L$o.KeepOutside?k$p.Disjoint:k$p.Intersects}function _0xe563e5(e,t){e.lightSourceChanged(t)}function _0x131e04(e,t){e.updateShadow(t.layer)}function _0x11173b(e,t){e.setCustomClipBox(t.layer,t.enable)}function _0x51bfa3(e,t){e.enableAdjustColor(t)}function _0x3248b0(e,t){e.enableExcavation(t)}function _0x3a4f6f(e,t){e.disableExcavation(t)}function _0x4305d6(e,t){e.enableServerExcavation(t)}function _0x26da32(e,t){e.disableServerExcavation(t)}function _0x404fb6(e,t){e.enableFlatten(t)}function _0x12b864(e,t){e.enableOverlay(t)}function _0x24b2d9(e,t){e.enableAjustTransparentBackColor(t)}function _0x31a936(e,t){e.disableAjustTransparentBackColor(t)}function _0x47d208(e,t){e.disableFlatten(t)}function _0x261d94(e,t){e.enableHypsometric(t)}function _0x435894(e,t){e.disableHypsometric(t)}function _0x22f2d7(e,t){e.hasLightChange(t)}function _0x4642cb(e,t){e.skeletonSelectEnable(t)}function _0x42e90f(e,t){e.selectColorTypeChange(t)}function _0x3cf84f(e,t){e.mixColorTypeChange(t)}function _0x59eeac(e,t){e.splitDirectionChange(t)}function _0x140d02(e,t){e.swipeStateChange(t)}function _0x461efb(e,t){e.PBRMaterialTypeChange(t)}function _0x3fd61f(e,t){e.enableCategoryVisible(t)}function _0x66ff7d(e,t){e.emissionTextureChange(t)}function _0x191621(e,t){e.enableTextureMove(t)}function _0x35862f(e,t){e.enableTriangleFiltrate(t)}function _0x15c00e(e,t){e.enableClipFilt(t)}function _0x58d3ac(e,t){e.enableFusionChange(t)}function _0x2e3e90(e,t){e.enableFlood(t)}function _0x363189(e,t){e.disableFlood(t)}function _0xf9e802(e){for(var t=1;t<e;)t<<=1;return t}function _0x2303df(e,t){e.emissionTextureUnitChange(t)}function _0x4eabfc(e,t){var i=c$1a.multiply(e._geoMatrix,t.scaleMatrix,new c$1a);c$1a.multiply(t.layerMatrix,i,e._matModel)}function _0x34c369(e,t){e.pbrParameterChange(t)}function _0x3a86e2(e,t){e.edgeWireFrameModeChange(t)}function _0x26e721(e,t){var i=t,n=i._PBRMaterialParams.baseUri;i._PBRMaterialParams=e.material,i._PBRMaterialParams.baseUri=n,i._loadMaterialTexture(i._PBRMaterialParams,n);var r=i._PBRMaterialParams.pbrMetallicRoughness,o=i._PBRMaterialParams.textureunitstates;if(t$$(r.volume)&&(i._PBRMaterialParams.pbrMetallicRoughness.volume={thickness:1,tintColor:a$10.fromElements(1,1,1,1),diffusionDistance:a$10.fromElements(1,1,1,1),transmissionFactor:1}),t$$(r.clearcoat)&&(i._PBRMaterialParams.pbrMetallicRoughness.clearcoat={clearcoatFactor:0,clearcoatRoughnessFactor:0}),t$$(r.snowEffect)&&-1!==r.snowEffect.snowNormalTextureIndex){var a=n+o[r.snowEffect.snowNormalTextureIndex].textureunitstate.url;i._PBRMaterialParams.pendingTextureCount++,_0x598209(i._context,a,i._PBRMaterialParams,i._PBRMaterialParams.pbrMetallicRoughness.snowEffect,"snowNormalTexture")}if(t$$(r.snowEffect)&&-1!==r.snowEffect.snowMaskTextureIndex){a=n+o[r.snowEffect.snowMaskTextureIndex].textureunitstate.url;i._PBRMaterialParams.pendingTextureCount++,_0x598209(i._context,a,i._PBRMaterialParams,i._PBRMaterialParams.pbrMetallicRoughness.snowEffect,"snowMaskTexture")}if(t$$(r.rainEffect)&&-1!==r.rainEffect.rippleTextureIndex){a=n+o[r.rainEffect.rippleTextureIndex].textureunitstate.url;i._PBRMaterialParams.pendingTextureCount++,_0x598209(i._context,a,i._PBRMaterialParams,i._PBRMaterialParams.pbrMetallicRoughness.rainEffect,"rippleTexture")}}_0x4ab4f4.prototype.setCustomClipBox=function(e){if(!((e=e||{}).dimensions&&e.position||e.planePos&&e.planeNormal))throw new t$_("dimensions position is required to create CustomClipBox");if(this._clipMode=_0x450718.CLIP_BEHIND_ALL_PLANE,t$$(e.clipMode))switch(e.clipMode){case"clip_behind_any_plane":this._clipMode=_0x450718.CLIP_BEHIND_ANY_PLANE;break;case"clip_behind_all_plane":this._clipMode=_0x450718.CLIP_BEHIND_ALL_PLANE;break;case"only_keep_line":this._clipMode=_0x450718.ONLY_KEEP_LINE}if(e.dimensions){var t=new c$1a,i=e.position,n=new e$1L(e.heading||0,e.pitch||0,e.roll||0);t=m$13.headingPitchRollToFixedFrame(i,n,n$1c.WGS84);var r=.5*e.dimensions.x,o=.5*e.dimensions.y,a=.5*e.dimensions.z,s=[];s[0]=new a$10,s[0].x=-r,s[0].y=o,s[0].z=a,s[0].w=1,s[1]=new a$10,s[1].x=r,s[1].y=o,s[1].z=a,s[1].w=1,s[2]=new a$10,s[2].x=r,s[2].y=-o,s[2].z=a,s[2].w=1,s[3]=new a$10,s[3].x=-r,s[3].y=-o,s[3].z=a,s[3].w=1,s[4]=new a$10,s[4].x=-r,s[4].y=o,s[4].z=-a,s[4].w=1,s[5]=new a$10,s[5].x=r,s[5].y=o,s[5].z=-a,s[5].w=1,s[6]=new a$10,s[6].x=r,s[6].y=-o,s[6].z=-a,s[6].w=1,s[7]=new a$10,s[7].x=-r,s[7].y=-o,s[7].z=-a,s[7].w=1;for(var l=0;l<8;l++)c$1a.multiplyByVector(t,s[l],s[l]);if(this._sceneMode!==b$1d.SCENE3D){var u=new s$1q;for(l=0;l<8;l++){var c=s[l],h=i$1g.fromCartesian(c,void 0,_0x2ed5d2),d=u.project(h,s[l]);c$1a.multiplyByPoint(_0x3d6b16,d,s[l])}}this._oriClipPlane[0]=a$10.clone(_0x1124ee(s[0],s[1],s[2])),this._oriClipPlane[1]=a$10.clone(_0x1124ee(s[0],s[4],s[1])),this._oriClipPlane[2]=a$10.clone(_0x1124ee(s[0],s[3],s[4])),this._oriClipPlane[3]=a$10.clone(_0x1124ee(s[6],s[2],s[5])),this._oriClipPlane[4]=a$10.clone(_0x1124ee(s[6],s[7],s[2])),this._oriClipPlane[5]=a$10.clone(_0x1124ee(s[6],s[5],s[7]))}else for(l=0;l<e.planePos.length;l++){var f=e.planePos[l],p=e.planeNormal[l];this._oriClipPlane[l].x=p.x,this._oriClipPlane[l].y=p.y,this._oriClipPlane[l].z=p.z,this._oriClipPlane[l].w=-a$11.dot(f,p)}if(!this._clipping){e={layer:this,enable:!0};this.traverseRenderEntity(e,_0x11173b)}this._clipping=!0},_0x4ab4f4.prototype.setClipSection=function(e,t,i,n){var r=e$1Y(n,_0xaa965.NONE);if(this._clipPlaneMode!==r&&(r!==_0xaa965.NONE?this._context.numClampClipPlaneLayer++:this._context.numClampClipPlaneLayer--),this._clipPlaneMode=r,this.isRenderClipSection()){var o=this._renderClipPlaneArray.get(0);t$$(o)||(o=new _0x53c87f(this),this._renderClipPlaneArray.set(0,o)),o.setPoints(e,t,i),this._section||this._context.numClampClipPlaneLayer++}},_0x4ab4f4.prototype.setCustomClipPlane=function(e,t,i,n){if(this._sceneMode===b$1d.COLUMBUS_VIEW&&(e=_0x2a0fd0(this,e),t=_0x2a0fd0(this,t),i=_0x2a0fd0(this,i)),this.setClipSection(e,t,i,n),this._oriClipPlane[0]=_0x1124ee(e,t,i),this._clipMode=_0x450718.CLIP_BEHIND_ALL_PLANE,this._section=!0,!this._clipping){var r={layer:this,enable:!0};this.traverseRenderEntity(r,_0x11173b)}this._clipping=!0},_0x4ab4f4.prototype.setCustomClipGeometry=function(e){var t=(e=e||{}).geometry;this._spatialClipEnable=!0;var i=e.spatialQuery,n=e.clippingType;i.geometry=t,i.positionMode=_0x37687a(n),i._profile=!0,i._clipLayers.set(this.name,this),this._sqMode=i.positionMode,this._spatialQuery=i,this._clippingType=n},_0x4ab4f4.prototype.clearCustomClipGeometry=function(){this._spatialClipEnable=!1},_0x4ab4f4.prototype.setCustomClipCross=function(e){if(!(e=e||{}).dimensions||!e.position)throw new t$_("dimensions position is required to create CustomClipBox");this._clipMode=_0x450718.CLIP_BEHIND_ALL_PLANE;var t,i,n,r=new c$1a,o=e.position;t=e.heading||0,i=e.pitch||0,n=e.roll||0;var a,s,l,u=e$1Y(e.extrudeDistance,.1),c=new e$1L(n$1d.toRadians(t),n$1d.toRadians(i),n$1d.toRadians(n));if(this._sceneMode===b$1d.SCENE3D)r=m$13.headingPitchRollToFixedFrame(o,c,n$1c.WGS84);else{var h=_0x2a0fd0(this,o);c$1a.setTranslation(c$1a.clone(c$1a.IDENTITY),h,r);var d=r$W.fromHeadingPitchRoll(c);c$1a.multiplyByMatrix3(r,d,r)}a=.5*e.dimensions.x,s=.5*e.dimensions.y,l=u;var f=[];f[0]=new a$10,f[0].x=-a,f[0].y=s,f[0].z=l,f[0].w=1,f[1]=new a$10,f[1].x=a,f[1].y=s,f[1].z=l,f[1].w=1,f[2]=new a$10,f[2].x=a,f[2].y=-s,f[2].z=l,f[2].w=1,f[3]=new a$10,f[3].x=-a,f[3].y=-s,f[3].z=l,f[3].w=1,f[4]=new a$10,f[4].x=-a,f[4].y=s,f[4].z=-l,f[4].w=1,f[5]=new a$10,f[5].x=a,f[5].y=s,f[5].z=-l,f[5].w=1,f[6]=new a$10,f[6].x=a,f[6].y=-s,f[6].z=-l,f[6].w=1,f[7]=new a$10,f[7].x=-a,f[7].y=-s,f[7].z=-l,f[7].w=1;for(var p=0;p<8;p++)c$1a.multiplyByVector(r,f[p],f[p]);this._oriClipPlane[0]=new a$10(0,0,0,0),this._oriClipPlane[1]=a$10.clone(_0x1124ee(f[0],f[4],f[1])),this._oriClipPlane[2]=a$10.clone(_0x1124ee(f[0],f[3],f[4])),this._oriClipPlane[3]=a$10.clone(_0x1124ee(f[6],f[2],f[5])),this._oriClipPlane[4]=a$10.clone(_0x1124ee(f[6],f[7],f[2])),this._oriClipPlane[5]=a$10.clone(_0x1124ee(f[6],f[5],f[7])),this._clipping||this.traverseRenderEntity({layer:this,enable:!0},_0x11173b),this._clipping=!0},_0x4ab4f4.prototype.getClipRegion=function(){if(this._clipping){var e=n$17.fromCartesian4(this._oriClipPlane[0]),t=this._layerBounds;if(t$$(t)){var i=s$1p.southwest(t),n=s$1p.northwest(t),r=s$1p.northeast(t),o=s$1p.southeast(t);i=a$11.fromRadians(i.longitude,i.latitude,i.height),n=a$11.fromRadians(n.longitude,n.latitude,n.height),r=a$11.fromRadians(r.longitude,r.latitude,r.height),o=a$11.fromRadians(o.longitude,o.latitude,o.height);var a=new a$11(0,0,0),s=a$11.normalize(i,new a$11),l=a$11.normalize(n,new a$11),u=a$11.normalize(r,new a$11),c=a$11.normalize(o,new a$11),h=new n$18(a,s),d=new n$18(a,l),f=new n$18(a,u),p=new n$18(a,c),_=h$1b.rayPlane(h,e),m=h$1b.rayPlane(d,e),$=h$1b.rayPlane(f,e),g=h$1b.rayPlane(p,e);if(t$$(_)&&t$$(m)&&t$$($)&&t$$(g))return{polygon:{hierarchy:[_,m,$,g],material:e$1z.WHITE.withAlpha(.5),perPositionHeight:!0}}}}},_0x4ab4f4.prototype.addWaterPlane=function(e){if(!(e=e||{}).boundingVolume)throw new t$_("position radius distance is required to add the plane");var t=this._waterPlanes.length;return this._waterPlanes.set(t,e),t},_0x4ab4f4.prototype.removeWaterPlane=function(e){this._waterPlanes.remove(e)},_0x4ab4f4.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$_("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},_0x4ab4f4.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$_("the index is 0~3");return 1<<e&this._visibleViewport},_0x4ab4f4.prototype.setFlattenRegionVisibleInViewport=function(e,t){if(e>8)throw new t$_("the index is 0~8");this._flattenVisibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},_0x4ab4f4.prototype.updateShadow=function(){var e={layer:this};this.traverseRenderEntity(e,_0x131e04)},_0x4ab4f4.prototype.isSilhouette=function(){return this._selectColorType===Ja.SILHOUETTE||this._selectColorType===Ja.ALWAYS_SHOW_SILHOUETTE},_0x4ab4f4.prototype.isRenderClipSection=function(){return this._clipPlaneMode!==_0xaa965.NONE},_0x4ab4f4.prototype.bloomEnableChange=function(e){e?this._context.numPostEffectFilterObject++:this._context.numPostEffectFilterObject--},_0x4ab4f4.prototype.lightSourceChanged=function(e){this.traverseRenderEntity({changedList:e,layer:this},_0xe563e5)},_0x4ab4f4.prototype.getAttributesById=function(e){if(0!==parseInt(e)&&!parseInt(e))throw new t$_("id must be a number!");return this._layerScheduler.getAttributesById(e)},_0x4ab4f4.prototype.traverseRenderEntity=function(e,t){this._layerScheduler.traverseRenderEntity(e,t)},_0x4ab4f4.prototype.isDestroyed=function(){return!1},_0x4ab4f4.prototype.destroy=function(){t$$(this._layerScheduler)&&(this._layerScheduler.destroy(),this._layerScheduler=null);for(var e=0;e<this._flattenRegions.values.length;e++)this._flattenRegions.values[e].destroy(),this._flattenRegions.values[e]=null;this._flattenRegions.removeAll(),delete this._flattenBounds,this._flattenBounds=null,t$$(this._flattenTexture)&&(this._flattenTexture.destroy(),this._flattenTexture=null);for(var t=Object.keys(this._excavationRegions._hash),i=(e=0,t.length);e<i;e++){var n=t[e];this._excavationRegions.get(n).destroy(),this._removeExcavationCommands(n)}if(this._excavationRegions.removeAll(),delete this._excavationBounds,this._excavationBounds=null,t$$(this._excavationTexture)&&(this._excavationTexture.destroy(),this._excavationTexture=null),t$$(this._excavationSideTexture)&&(this._excavationSideTexture.destroy(),this._excavationSideTexture=null),t$$(this._excavationBottomTexture)&&(this._excavationBottomTexture.destroy(),this._excavationBottomTexture=null),t$$(this._hypsometricTexture)&&(this._hypsometricTexture.destroy(),this._hypsometricTexture=null),t$$(this._hypsometricRenderTexture)&&(this._hypsometricRenderTexture.destroy(),this._hypsometricRenderTexture=null),t$$(this._hypsometricSetting)&&(this._hypsometricSetting.destroy(),this._hypsometricSetting=null),t$$(this._hypsometricRegion)&&(this._hypsometricRegion.destroy(),this._hypsometricRegion=null),t$$(this._noiseMapTexture)&&(this._noiseMapTexture.destroy(),this._noiseMapTexture=null),t$$(this._pbrMetalTexture)&&(this._pbrMetalTexture.destroy(),this._pbrMetalTexture=null),t$$(this._pbrRoughTexture)&&(this._pbrRoughTexture.destroy(),this._pbrRoughTexture=null),this._fileType===c$q.ClampGroundRealtimeRasterCache&&this.refreshRaster(),t$$(this._spatialQuery)&&t$$(this._spatialQuery._clipLayers)&&this._spatialQuery._clipLayers.remove(this.name),t$$(this._commonLayerUniformBuffer)&&(this._commonLayerUniformBuffer.destroy(),this._commonLayerUniformBuffer=null),t$$(this._materialMap))for(var r in this._materialMap)if(this._materialMap.hasOwnProperty(r)){var o=this._materialMap[r].material.pbrMetallicRoughness;if(!t$$(o))continue;t$$(o.baseColorTexture)&&o.baseColorTexture.destroy(),t$$(o.normalTexture)&&o.normalTexture.destroy(),t$$(o.emissiveTexture)&&o.emissiveTexture.destroy(),t$$(o.metallicRoughnessTexture)&&o.metallicRoughnessTexture.destroy(),t$$(o.occlusionTexture)&&o.occlusionTexture.destroy()}if(t$$(this._spatialQuery)&&t$$(this._spatialQuery._clipLayers)&&this._spatialQuery._clipLayers.remove(this.name),t$$(this.instanceSkeletonManager)){for(var r in this.instanceSkeletonManager.skeletons._hash)this.instanceSkeletonManager.skeletons._hash.hasOwnProperty(r)&&this.instanceSkeletonManager.remove(r);this.instanceSkeletonManager=void 0}return s$1e(this)},_0x4ab4f4.prototype.setVolume=function(e){if(!(t$$(e.values)&&t$$(e.width)&&t$$(e.height)&&t$$(e.depth)&&t$$(e.maxValue)&&t$$(e.minValue)&&t$$(e.maxHeight)&&t$$(e.minHeight)&&t$$(e.bounds)))throw new t$_("invalid volume object");this._volData={};var t=e.width,i=e.height,n=e.depth,r=Math.ceil(Math.sqrt(n));this._volData._nSideBlockCount=r;var o=Math.max(t,i)+2;this._volData._nBlockLength=o;var a=_0xf9e802(o*r-2);this._volData._nLength=a;var s=e.maxValue,l=e.minValue;this._volData._maxValue=s,this._volData._minValue=l,this._volData._width=t,this._volData._height=i,this._volData._depth=n;var u=e.bounds.leftBottom.x,c=e.bounds.rightTop.y,h=e.bounds.rightTop.x,d=e.bounds.leftBottom.y;this._volData._volBounds={left:u,top:c,right:h,bottom:d,minHeight:e.minHeight,maxHeight:e.maxHeight,width:h-u,length:c-d,height:e.maxHeight-e.minHeight};var f=a*a,p=new Array(f);p.fill(-1);for(var _=s-l,m=0;m<n;m++)for(var $=parseInt(m/r)*o,g=m%r*o,y=0;y<o-2;y++)for(var v=0;v<o-2;v++){var x=Math.min(v,t-1),b=m*i*t+(i-1-Math.min(y,i-1))*t+x,S=e.values[b];new a$10(0,0,0,0),-9999!=S&&(S=(S-l)/_,p[b=($+y)*a+g+v]=S)}var w=new Float32Array(p,0,f);this._volData._buffer=new Uint8Array(w.buffer,0,4*f),this._fMaxValue=s,this._fMinValue=l},_0x4ab4f4.prototype._setSQTextures=function(e){this._sqTextures=e},_0x4ab4f4.prototype._setSQViewPrjMatrix=function(e,t){this._sqViewMatirx=e,this._sqPrjMatirx=t},_0x4ab4f4.prototype._setSQMode=function(e){this._sqMode=e},_0x4ab4f4.prototype._updateEdgeDistanceFalloffFactor=function(){0!=this._edgeCurrentCount?(this._edgeDistanceFalloffFactor=this._edgeCurrentTotalLength/this._edgeCurrentCount*40,this._edgeCurrentTotalLength=0,this._edgeCurrentCount=0):this._edgeCurrentTotalLength=0},_0x4ab4f4.prototype._addRenderedEdge=function(e,t){this._edgeCurrentTotalLength+=e,this._edgeCurrentCount+=t},_0x4ab4f4.prototype.setTextureEmissive=function(e){if(e!==this.textureEmissionUnit){this.textureEmissionUnit=e;var t={enable:!0};t.layer=this,this.traverseRenderEntity(t,_0x2303df)}},_0x4ab4f4.prototype.setPBRMaterial=function(e){var t=this._pbrParameter;if(this._pbrParameter|=e,t!==this._pbrParameter){var i={enable:!0};i.layer=this,this.traverseRenderEntity(i,_0x34c369)}},_0x4ab4f4.prototype.setPBRMaterialFromJSON=function(e){if(this._pbrParameter===We$a.NONE){var t=this,i="string"==typeof e;t._PBRMaterialParams.baseUri=i?o$17(e):"",i?u$$(e).then((function(e){_0x26e721(e,t)})):_0x26e721(e,t)}},_0x4ab4f4.prototype._updatePBRMaterial=function(){if(t$$(this._PBRMaterialParams)&&t$$(this._PBRMaterialParams.pendingTextureCount)&&this._PBRMaterialParams.pendingTextureCount===this._PBRMaterialParams.readyTextureCount){var e={enable:!0};e.layer=this,this.traverseRenderEntity(e,_0x34c369),this._PBRMaterialParams.loadingTexture=!1}},_0x4ab4f4.prototype.removePBRMaterial=function(){var e=this._PBRMaterialParams.pbrMetallicRoughness;for(var t in e)e.hasOwnProperty(t)&&e[t]instanceof P$S&&e[t].destroy();this._PBRMaterialParams={pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:0,baseColor:new a$10(1,1,1,1),baseColorTextureIndex:-1,emissiveFactor:a$11.ZERO,emissiveTextureIndex:-1,occlusionTextureIndex:-1,metallicRoughnessTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseColorTexture:void 0,intensityScale:1,snowEffect:void 0,rainEffect:void 0,volume:void 0,clearcoat:void 0,anisotropy:void 0},loadingTexture:void 0};var i={enable:!0};i.layer=this,this.traverseRenderEntity(i,_0x34c369)},_0x4ab4f4.prototype.setExtrudedPolygons=function(e,t){this._layerScheduler._extrudedId=e,this._layerScheduler._polygons=t},_0x4ab4f4.prototype._initEdgeTexture=function(){var e=[1,256,65536,16777216];function t(t,i,n){var r,o,a,s;n=e$1Y(n,0),r=t,o=0,a=1,t=Math.min(Math.max(r,o),a);for(var l=0;l<4;l++)i[n+l]=Math.floor(256*((s=t*e[l])-Math.floor(s)))}const i=8,n=256,r=[{distance:[-1.59027,-1.59426,-1.59674,-1.59766,-1.59702,-1.59479,-1.59095,-1.5855,-1.57843,-1.56973,-1.55942,-1.5475,-1.53398,-1.5189,-1.50226,-1.4841,-1.46446,-1.44337,-1.42088,-1.39703,-1.37188,-1.34547,-1.31786,-1.28912,-1.2593,-1.22847,-1.19668,-1.16402,-1.13053,-1.09629,-1.06137,-1.02582,-.98972,-.95313,-.91611,-.87872,-.84102,-.80306,-.76488,-.72654,-.68807,-.64952,-.61092,-.57232,-.53375,-.49527,-.45692,-.41874,-.38078,-.34309,-.3057,-.26867,-.23204,-.19585,-.16015,-.12497,-.09036,-.05634,-.02296,.00977,.04183,.07321,.10389,.13386,.16313,.19169,.21956,.24672,.27321,.299,.32413,.34858,.37237,.3955,.41798,.43981,.461,.48154,.50145,.52073,.53939,.55744,.57488,.5917,.6079,.62347,.63837,.65259,.66609,.67885,.69083,.70201,.71235,.72183,.73042,.73812,.7449,.75076,.7557,.75973,.76284,.76507,.76642,.76692,.76659,.76545,.76352,.76083,.7574,.75324,.74837,.74279,.73652,.72959,.72199,.71377,.70493,.69553,.68558,.67515,.66426,.65298,.64135,.62944,.6173,.60499,.59257,.58008,.56759,.55513,.54275,.5305,.51842,.50654,.4949,.48353,.47246,.4617,.45128,.44121,.43149,.42213,.41313,.40448,.39617,.38818,.3805,.37309,.36594,.35902,.35229,.34572,.33927,.33292,.32663,.32035,.31407,.30774,.30135,.29486,.28824,.28148,.27454,.26739,.26002,.25241,.24454,.23639,.22796,.21922,.21016,.20076,.19098,.18082,.17023,.1592,.14768,.13566,.1231,.10996,.09624,.08188,.06688,.05121,.03485,.01778,0,-.0185,-.03771,-.05763,-.07824,-.09952,-.12144,-.14396,-.16706,-.19069,-.21481,-.23938,-.26436,-.28971,-.31539,-.34136,-.36759,-.39404,-.42067,-.44746,-.47437,-.50136,-.52839,-.55544,-.58248,-.60948,-.63642,-.66329,-.6901,-.71684,-.74352,-.77015,-.79675,-.82332,-.84988,-.87644,-.90301,-.92958,-.95615,-.98272,-1.00926,-1.03575,-1.06217,-1.08847,-1.11463,-1.1406,-1.16633,-1.19178,-1.2169,-1.24164,-1.26595,-1.28979,-1.31312,-1.3359,-1.35809,-1.37963,-1.4005,-1.42064,-1.44,-1.45853,-1.47616,-1.49285,-1.50853,-1.52313,-1.53659,-1.54886,-1.55986,-1.56955,-1.57788,-1.5848],pressure:[-.01365,-.00206,.01025,.02327,.03696,.05129,.06619,.08163,.09755,.11393,.1307,.14784,.16531,.18308,.20111,.21938,.23786,.25651,.2753,.29419,.31315,.33215,.35115,.37015,.38913,.40806,.42694,.44576,.46449,.48313,.50167,.5201,.53839,.55653,.57448,.59222,.60971,.62692,.6438,.66033,.67648,.69221,.70753,.72242,.73688,.75093,.76456,.77779,.79063,.80309,.81517,.82686,.83817,.84911,.85967,.86987,.87972,.88924,.89845,.90734,.91594,.92425,.93229,.94005,.94754,.95475,.96166,.96826,.97451,.9804,.98588,.99092,.99549,.99957,.99685,.99381,.99131,.98936,.98796,.98711,.98681,.98706,.98787,.98923,.99113,.99357,.99654,1,.99607,.99171,.98695,.98181,.97634,.97057,.96452,.95824,.95175,.94506,.93818,.93113,.92389,.91647,.90887,.90109,.89314,.88501,.87672,.86831,.85978,.85119,.84256,.83393,.82533,.8168,.80836,.80002,.79181,.78374,.77582,.7681,.76059,.75331,.74629,.73955,.73311,.72697,.72116,.71568,.71054,.70572,.70121,.697,.69304,.68931,.68576,.68236,.67905,.67582,.67262,.66941,.66619,.66291,.65957,.65613,.65259,.64892,.6451,.6411,.6369,.63248,.62783,.62295,.61783,.61247,.60688,.60104,.59498,.58868,.58216,.57542,.56845,.56125,.5538,.5461,.53813,.52986,.52129,.51239,.50316,.49359,.4837,.47349,.46299,.45223,.44124,.43005,.41869,.40719,.39557,.38386,.37207,.36023,.34836,.33648,.32464,.31287,.30119,.28963,.27822,.26698,.25594,.2451,.23448,.22409,.21391,.20394,.19415,.18452,.17503,.16565,.15636,.14713,.13794,.1288,.11968,.11058,.10151,.09247,.08346,.07447,.06552,.05659,.0477,.03885,.03007,.02137,.01278,.00433,-.00393,-.012,-.01983,-.02738,-.03463,-.04155,-.0481,-.05429,-.0601,-.06553,-.07057,-.07524,-.07954,-.08347,-.08703,-.09022,-.09303,-.09544,-.09744,-.09898,-.10004,-.10059,-.1006,-.10005,-.09892,-.0972,-.09487,-.09192,-.08833,-.08409,-.07918,-.07357,-.06724,-.06019,-.0524,-.04386,-.03455,-.02448]},{distance:[-3.46259,-3.47131,-3.47668,-3.47863,-3.47712,-3.4721,-3.46352,-3.45138,-3.43566,-3.41635,-3.39347,-3.36704,-3.33709,-3.30368,-3.26684,-3.22667,-3.18322,-3.1366,-3.08689,-3.0342,-2.97865,-2.92036,-2.85946,-2.79607,-2.73034,-2.66241,-2.59242,-2.52052,-2.44686,-2.37159,-2.29485,-2.2168,-2.13757,-2.05731,-1.97616,-1.89426,-1.81174,-1.72875,-1.64543,-1.56191,-1.47833,-1.39483,-1.3115,-1.22847,-1.14581,-1.06361,-.98193,-.90083,-.82036,-.74054,-.66141,-.583,-.50532,-.4284,-.35228,-.277,-.20261,-.12916,-.05672,.01463,.08485,.15384,.22153,.28784,.35269,.41602,.47776,.53787,.59629,.653,.70799,.76123,.81274,.86253,.9106,.95698,1.0017,1.04477,1.0862,1.126,1.16415,1.20065,1.23546,1.26857,1.29994,1.32953,1.35731,1.38321,1.40719,1.42921,1.44922,1.46719,1.48309,1.49691,1.50862,1.51825,1.52581,1.53133,1.53486,1.53644,1.53616,1.53409,1.53031,1.52493,1.51803,1.50972,1.50009,1.48924,1.47725,1.46421,1.45019,1.43527,1.4195,1.40295,1.38568,1.36778,1.34929,1.3303,1.31087,1.29108,1.27099,1.25066,1.23018,1.2096,1.18898,1.16838,1.14785,1.12745,1.10721,1.08719,1.06741,1.04791,1.02871,1.00986,.99136,.97324,.95551,.93819,.92127,.90476,.88866,.87296,.85767,.84277,.82823,.81406,.80022,.7867,.77346,.76049,.74774,.73519,.72278,.71049,.69827,.68606,.67381,.66145,.64893,.63618,.62313,.60973,.5959,.5816,.56675,.5513,.53516,.51826,.50053,.4819,.46231,.44169,.42002,.39725,.37336,.34834,.32219,.2949,.2665,.23698,.20638,.17469,.14193,.10809,.07316,.03714,0,-.03827,-.07772,-.11836,-.16022,-.20332,-.24768,-.29332,-.34024,-.38844,-.43788,-.48854,-.54036,-.59329,-.64724,-.70211,-.75782,-.81425,-.87128,-.92881,-.98674,-1.04498,-1.10346,-1.1621,-1.22086,-1.27969,-1.33854,-1.3974,-1.45625,-1.51511,-1.57396,-1.63283,-1.69173,-1.75067,-1.80968,-1.86875,-1.9279,-1.98712,-2.04639,-2.10568,-2.16495,-2.22416,-2.28322,-2.34208,-2.40063,-2.4588,-2.51647,-2.57354,-2.62989,-2.68543,-2.74002,-2.79357,-2.84597,-2.89711,-2.94689,-2.99521,-3.04195,-3.087,-3.13023,-3.17152,-3.21075,-3.24779,-3.28252,-3.3148,-3.34451,-3.37154,-3.39577,-3.41709,-3.43539,-3.45059],pressure:[.87183,.87151,.87129,.87118,.87117,.87128,.87149,.87182,.87225,.8728,.87347,.87424,.87513,.87613,.87723,.87845,.87978,.88122,.88276,.88441,.88616,.88801,.88996,.892,.89414,.89637,.89868,.90108,.90356,.90611,.90874,.91144,.91421,.91704,.91993,.92287,.92587,.92892,.93201,.93514,.93831,.94151,.94474,.94799,.95126,.95456,.95786,.96118,.9645,.96783,.97116,.97448,.9778,.98111,.98441,.9877,.99096,.99421,.99742,.99938,.99622,.9931,.99001,.98697,.98397,.98101,.97811,.97526,.97246,.96972,.96703,.96441,.96185,.95935,.95691,.95455,.95225,.95002,.94786,.94577,.94376,.94182,.93995,.93817,.93646,.93483,.93328,.93181,.93042,.92911,.92788,.92673,.92566,.92467,.92376,.92293,.92217,.92149,.92088,.92034,.91987,.91947,.91913,.91886,.91864,.91849,.91838,.91833,.91834,.91839,.91849,.91863,.91883,.91907,.91935,.91968,.92005,.92046,.92092,.92142,.92195,.92253,.92314,.9238,.92449,.92521,.92598,.92677,.9276,.92847,.92936,.93029,.93125,.93224,.93325,.9343,.93537,.93646,.93758,.93872,.93988,.94106,.94225,.94346,.94469,.94593,.94718,.94844,.94971,.95098,.95226,.95354,.95482,.9561,.95738,.95867,.95995,.96122,.9625,.96377,.96504,.9663,.96757,.96883,.97009,.97135,.97261,.97387,.97513,.9764,.97767,.97895,.98023,.98153,.98284,.98416,.98549,.98684,.98821,.9896,.99101,.99244,.99389,.99537,.99688,.99842,1,.99839,.99675,.99508,.99336,.99161,.98982,.98799,.98613,.98422,.98228,.98029,.97827,.97622,.97414,.97202,.96987,.9677,.96551,.9633,.96107,.95882,.95656,.9543,.95202,.94975,.94747,.94519,.94292,.94065,.93838,.93613,.93388,.93164,.92941,.9272,.92499,.9228,.92062,.91846,.91631,.91418,.91207,.90998,.90792,.90588,.90387,.90189,.89995,.89804,.89617,.89434,.89256,.89083,.88914,.88752,.88595,.88443,.88299,.88161,.8803,.87907,.87791,.87683,.87584,.87494,.87412,.8734,.87278,.87225]},{distance:[.39335,.43437,.47737,.52234,.56923,.61801,.66864,.72109,.7753,.83123,.88882,.94801,1.00875,1.07097,1.13461,1.1996,1.26586,1.33333,1.40193,1.47158,1.54221,1.61373,1.68607,1.75913,1.83284,1.90711,1.98186,2.05699,2.13243,2.20809,2.28387,2.35971,2.4355,2.51117,2.58663,2.66179,2.73658,2.81092,2.88473,2.95792,3.03043,3.10217,3.17308,3.24309,3.31211,3.3801,3.44697,3.51267,3.57712,3.64028,3.70208,3.76247,3.8214,3.87881,3.93467,3.98892,4.04152,4.09244,4.14164,4.18908,4.23474,4.27859,4.32061,4.36077,4.39905,4.43544,4.46992,4.50249,4.53314,4.56185,4.58864,4.61349,4.63642,4.65745,4.67657,4.69381,4.7092,4.72274,4.73447,4.74441,4.75259,4.75903,4.76376,4.76682,4.76822,4.768,4.76618,4.76279,4.75786,4.75142,4.74348,4.73409,4.72326,4.71102,4.69739,4.68241,4.6661,4.64849,4.6296,4.60948,4.58816,4.56567,4.54204,4.51732,4.49154,4.46473,4.43694,4.4082,4.37854,4.348,4.31662,4.28443,4.25145,4.21773,4.1833,4.14819,4.11243,4.07606,4.03912,4.00162,3.96361,3.92512,3.88618,3.84683,3.80708,3.76697,3.72653,3.68579,3.64478,3.60351,3.56202,3.52033,3.47845,3.43642,3.39425,3.35196,3.30957,3.2671,3.22455,3.18196,3.13933,3.09668,3.05402,3.01136,2.96873,2.92613,2.88357,2.84108,2.79865,2.75631,2.71407,2.67195,2.62994,2.58807,2.54634,2.50477,2.46338,2.42216,2.38114,2.34032,2.29971,2.25933,2.21916,2.17923,2.13954,2.10008,2.06087,2.02189,1.98316,1.94468,1.90644,1.86845,1.83069,1.79316,1.75586,1.71877,1.68189,1.6452,1.60868,1.57232,1.53611,1.50004,1.46407,1.4282,1.39241,1.35668,1.321,1.28535,1.24972,1.2141,1.17849,1.14286,1.10723,1.07158,1.03593,1.00028,.96464,.92902,.89344,.85793,.8225,.78719,.75203,.71705,.68231,.64784,.61369,.57991,.54656,.51368,.48134,.44959,.41849,.3881,.35848,.32967,.30174,.27474,.24872,.22373,.19982,.17702,.15539,.13497,.11579,.09791,.08137,.06621,.05248,.04022,.02948,.02029,.01271,.00677,.00252,0,-76e-5,27e-5,.00314,.00788,.01451,.02307,.03357,.04604,.0605,.07697,.09546,.11599,.13858,.16322,.18992,.21869,.24952,.28241,.31735,.35434],pressure:[.95248,.95236,.95228,.95223,.95222,.95224,.95231,.95241,.95256,.95274,.95296,.95322,.95352,.95385,.95423,.95465,.9551,.9556,.95613,.9567,.95731,.95796,.95864,.95936,.96012,.96091,.96173,.96259,.96348,.9644,.96535,.96633,.96734,.96838,.96944,.97053,.97164,.97277,.97393,.9751,.97629,.9775,.97873,.97997,.98122,.98249,.98376,.98505,.98634,.98763,.98893,.99023,.99154,.99284,.99414,.99544,.99673,.99802,.9993,.99942,.99816,.99691,.99568,.99445,.99324,.99205,.99087,.98972,.98858,.98746,.98636,.98528,.98423,.9832,.98219,.98121,.98025,.97931,.9784,.97752,.97666,.97582,.97501,.97423,.97347,.97274,.97203,.97135,.9707,.97007,.96948,.9689,.96836,.96784,.96735,.96689,.96646,.96605,.96567,.96533,.965,.96471,.96445,.96421,.964,.96382,.96367,.96355,.96346,.96339,.96335,.96334,.96336,.9634,.96348,.96358,.9637,.96385,.96403,.96423,.96446,.96471,.96499,.96529,.96561,.96595,.96631,.96669,.96709,.96751,.96795,.9684,.96887,.96935,.96984,.97035,.97087,.9714,.97194,.97249,.97304,.97361,.97418,.97476,.97534,.97592,.97651,.97711,.9777,.9783,.9789,.9795,.9801,.9807,.9813,.9819,.9825,.98309,.98369,.98428,.98486,.98545,.98603,.98661,.98718,.98775,.98832,.98888,.98944,.99,.99056,.99112,.99167,.99223,.99279,.99335,.99392,.99449,.99507,.99565,.99624,.99684,.99745,.99807,.9987,.99934,1,.99933,.99866,.99797,.99727,.99656,.99583,.9951,.99435,.99359,.99283,.99205,.99126,.99046,.98966,.98885,.98803,.9872,.98637,.98554,.9847,.98387,.98303,.98219,.98134,.9805,.97967,.97883,.978,.97717,.97634,.97552,.97471,.97389,.97309,.97229,.9715,.97071,.96993,.96915,.96838,.96762,.96687,.96612,.96539,.96466,.96395,.96324,.96255,.96187,.9612,.96055,.95991,.95929,.95869,.95811,.95754,.957,.95648,.95599,.95552,.95508,.95467,.95428,.95393,.9536,.95331,.95305,.95283,.95264]},{distance:[2.85606,2.86149,2.86432,2.8645,2.862,2.85686,2.84912,2.83886,2.82618,2.81117,2.79393,2.77456,2.75314,2.72975,2.70447,2.67734,2.64844,2.61784,2.58564,2.55196,2.5169,2.48057,2.44305,2.40438,2.36462,2.32383,2.28208,2.23943,2.19591,2.15153,2.10628,2.06016,2.01321,1.96548,1.91702,1.86793,1.8183,1.76829,1.71803,1.66767,1.61737,1.56726,1.51746,1.46803,1.41902,1.37044,1.32228,1.27452,1.22716,1.18023,1.13376,1.08781,1.04244,.99769,.95357,.91003,.86701,.82447,.78238,.74069,.69938,.65836,.61758,.57699,.53656,.49627,.45611,.41611,.37632,.33683,.29776,.25924,.22141,.18441,.14839,.11346,.07972,.04727,.01619,-.01348,-.0417,-.0684,-.09351,-.11698,-.13875,-.1588,-.17713,-.19381,-.20889,-.22242,-.23444,-.24501,-.25421,-.26216,-.26897,-.27473,-.27951,-.28336,-.28631,-.28836,-.28948,-.28963,-.28873,-.28673,-.28355,-.27916,-.27354,-.26673,-.25878,-.2498,-.23992,-.22929,-.21802,-.20623,-.19398,-.18134,-.16836,-.1551,-.14163,-.12809,-.11461,-.1013,-.08826,-.07557,-.06335,-.0517,-.04077,-.03065,-.02143,-.01321,-.00606,0,.00496,.00888,.01181,.01385,.01511,.0157,.01574,.01533,.01458,.01358,.0124,.01112,.00979,.00851,.00738,.0065,.006,.00596,.00646,.00754,.00924,.01161,.01471,.01858,.02323,.02865,.03481,.04169,.0493,.05765,.06677,.07671,.08754,.09934,.11222,.12628,.14159,.15823,.17624,.19561,.21632,.23828,.26142,.28563,.31083,.33696,.36397,.39185,.42057,.4501,.48036,.51125,.54264,.5744,.60646,.63871,.67105,.70337,.73556,.76751,.79918,.83048,.86139,.8919,.92202,.95184,.98144,1.01094,1.04045,1.0701,1.10002,1.13029,1.16103,1.1923,1.22416,1.25664,1.28979,1.32364,1.35824,1.39363,1.42985,1.4669,1.50475,1.54332,1.58252,1.62227,1.6625,1.70312,1.744,1.78501,1.82598,1.8668,1.90734,1.94754,1.98732,2.02666,2.06555,2.10402,2.1421,2.17985,2.2173,2.25448,2.29139,2.328,2.36424,2.4,2.43515,2.46955,2.50309,2.53565,2.56717,2.59761,2.62692,2.65505,2.68191,2.7074,2.73138,2.75375,2.7744,2.79324,2.81017,2.82504,2.83772,2.8481],pressure:[.22758,.23641,.24578,.25568,.26609,.27699,.28835,.30016,.31237,.32495,.33789,.35113,.36466,.37843,.39241,.40658,.4209,.43535,.44989,.4645,.47916,.49385,.50853,.5232,.53784,.55243,.56696,.58141,.59578,.61004,.62419,.63821,.65209,.6658,.67934,.69268,.70582,.71873,.73139,.7438,.75594,.76779,.77935,.79061,.80156,.81221,.82254,.83258,.84231,.85176,.86091,.86978,.87837,.88669,.89473,.9025,.91,.91725,.92425,.931,.93752,.9438,.94985,.95566,.96124,.96658,.97168,.97652,.98109,.98539,.98939,.99309,.99646,.99949,.99783,.99552,.99361,.99209,.99098,.99029,.99003,.99019,.99079,.99181,.99324,.9951,.99735,1,.99698,.99361,.98992,.98592,.98163,.97709,.97231,.96731,.96212,.95676,.95122,.94554,.93973,.93378,.92773,.92157,.91532,.90899,.90258,.89612,.88961,.88308,.87653,.87,.8635,.85705,.85068,.8444,.83823,.83219,.82628,.82052,.81493,.80952,.8043,.79929,.7945,.78994,.78561,.78151,.77765,.77402,.77062,.76742,.76443,.76161,.75896,.75645,.75406,.75175,.74951,.7473,.74511,.74289,.74064,.73833,.73592,.73341,.73078,.728,.72507,.72197,.71869,.71522,.71156,.70769,.70363,.69936,.69489,.69021,.68533,.68023,.67492,.66939,.66363,.65765,.65145,.64501,.63833,.63143,.62428,.61691,.60931,.60148,.59344,.58521,.57679,.5682,.55948,.55063,.54167,.53264,.52354,.51439,.50522,.49603,.48686,.47773,.46865,.45964,.45072,.44192,.43324,.42469,.41629,.40804,.39994,.392,.3842,.37655,.36903,.36164,.35437,.3472,.34012,.33312,.3262,.31933,.31251,.30574,.299,.2923,.28563,.27899,.27239,.26583,.25933,.25288,.24652,.24025,.2341,.22808,.22221,.21653,.21104,.20576,.20072,.19592,.19138,.18712,.18313,.17943,.17602,.17292,.17013,.16766,.16551,.16369,.16222,.1611,.16036,.16001,.16007,.16055,.16148,.16286,.16471,.16705,.16988,.17321,.17706,.18144,.18636,.19182,.19785,.20443,.21158,.2193]},{distance:[-2.31317,-2.3191,-2.32189,-2.32154,-2.31811,-2.31174,-2.30254,-2.29062,-2.27609,-2.25904,-2.23954,-2.21767,-2.19355,-2.16732,-2.13907,-2.10885,-2.07672,-2.04268,-2.00677,-1.96911,-1.92985,-1.88914,-1.84713,-1.80397,-1.75979,-1.71467,-1.66864,-1.62171,-1.57395,-1.52546,-1.47625,-1.42628,-1.3755,-1.32384,-1.27131,-1.218,-1.16408,-1.10972,-1.05508,-1.00031,-.94551,-.89077,-.83615,-.7817,-.72757,-.6739,-.62076,-.56821,-.51625,-.46484,-.41397,-.36366,-.314,-.26506,-.21689,-.16957,-.12316,-.07766,-.03301,.01085,.05399,.09643,.13827,.17967,.22079,.26176,.30265,.34342,.38397,.42414,.46381,.50285,.54115,.57863,.61524,.65093,.6856,.71914,.75153,.78275,.81283,.84182,.86972,.89651,.92208,.94634,.96919,.99052,1.01025,1.02835,1.04484,1.05976,1.07309,1.08479,1.09492,1.1036,1.11096,1.11714,1.12224,1.12627,1.12916,1.13083,1.13125,1.13036,1.12816,1.12466,1.11992,1.11397,1.10677,1.09827,1.08849,1.07746,1.06527,1.05203,1.03786,1.02283,1.00695,.99025,.97279,.9546,.93573,.9163,.8965,.8765,.85647,.83652,.81687,.79775,.77939,.76199,.74568,.73049,.71635,.70316,.69082,.67925,.66834,.65804,.64831,.63911,.63032,.62184,.61363,.60564,.59788,.59036,.58308,.57597,.5689,.56177,.55447,.5469,.53896,.53062,.5219,.51283,.5034,.49355,.48335,.47287,.46223,.45154,.44085,.43012,.41923,.40805,.39648,.38441,.37176,.35849,.34458,.32999,.31461,.29833,.28109,.26288,.2437,.22361,.20265,.18082,.15807,.13434,.1096,.0838,.0569,.02894,0,-.0298,-.0604,-.09173,-.12364,-.15594,-.18843,-.22092,-.25331,-.28559,-.31781,-.35006,-.38244,-.41502,-.44785,-.48098,-.5144,-.54811,-.58218,-.61666,-.65153,-.68677,-.72232,-.75807,-.79397,-.83002,-.86628,-.90281,-.93968,-.97693,-1.01465,-1.05282,-1.09139,-1.13031,-1.16956,-1.20917,-1.24905,-1.28907,-1.32908,-1.36891,-1.40844,-1.44765,-1.48658,-1.52527,-1.56376,-1.60206,-1.64016,-1.67801,-1.71552,-1.75264,-1.78936,-1.8257,-1.86161,-1.89702,-1.93182,-1.96584,-1.99894,-2.03102,-2.06203,-2.0919,-2.12056,-2.14794,-2.17397,-2.19852,-2.22138,-2.24235,-2.26129,-2.27805,-2.29243,-2.30422],pressure:[.9681,.97424,.98046,.98674,.99309,.9995,.99404,.98754,.981,.97444,.96785,.96124,.95462,.94801,.94139,.93479,.92822,.92167,.91515,.90868,.90225,.89589,.88959,.88336,.87722,.87115,.86519,.85932,.85356,.84792,.84239,.83699,.83173,.8266,.82162,.81679,.81211,.80759,.80324,.79906,.79505,.79121,.78756,.78409,.78081,.77771,.77481,.77211,.76959,.76728,.76516,.76324,.76153,.76001,.75869,.75757,.75665,.75593,.7554,.75507,.75493,.75498,.75523,.75565,.75627,.75706,.75803,.75917,.76049,.76197,.76361,.76541,.76737,.76947,.77172,.77409,.7766,.77923,.78198,.78484,.7878,.79086,.79401,.79724,.80055,.80394,.8074,.81092,.8145,.81813,.82182,.82556,.82934,.83317,.83703,.84093,.84487,.84884,.85284,.85687,.86094,.86503,.86915,.87329,.87746,.88166,.88587,.89011,.89436,.89863,.90291,.9072,.91149,.91579,.92009,.92438,.92867,.93295,.9372,.94144,.94566,.94985,.954,.95812,.96219,.96623,.97021,.97415,.97802,.98184,.9856,.9893,.99293,.9965,1,.99657,.9932,.98991,.98668,.98352,.98042,.97738,.9744,.97148,.9686,.96577,.96298,.96023,.95751,.95482,.95214,.94949,.94684,.9442,.94156,.93892,.93627,.93361,.93094,.92825,.92555,.92284,.9201,.91735,.91458,.91179,.90899,.90616,.90332,.90047,.8976,.89472,.89183,.88893,.88603,.88314,.88024,.87735,.87448,.87162,.86878,.86597,.86319,.86044,.85774,.85508,.85247,.84993,.84744,.84503,.84269,.84042,.83825,.83616,.83417,.83227,.83048,.8288,.82724,.82578,.82445,.82324,.82215,.82119,.82037,.81967,.81911,.81868,.81839,.81824,.81823,.81835,.81862,.81903,.81957,.82026,.82109,.82206,.82317,.82443,.82583,.82737,.82906,.83089,.83287,.83499,.83726,.83968,.84223,.84494,.84778,.85077,.8539,.85717,.86058,.86412,.86781,.87163,.87559,.87968,.88391,.88826,.89275,.89737,.90211,.90698,.91198,.91709,.92233,.92768,.93315,.93873,.94441,.95019,.95607,.96205]},{distance:[4.72925,4.81721,4.9037,4.98859,5.07177,5.15311,5.23249,5.3098,5.38491,5.45772,5.52811,5.59598,5.66122,5.72375,5.78346,5.84028,5.8941,5.94486,5.99248,6.03689,6.07803,6.11584,6.15028,6.18128,6.20882,6.23285,6.25336,6.27031,6.28369,6.29348,6.29969,6.3023,6.30133,6.29678,6.28867,6.27703,6.26187,6.24324,6.22116,6.19567,6.16683,6.13468,6.09928,6.06068,6.01896,5.97417,5.92639,5.87569,5.82217,5.76589,5.70696,5.64545,5.58147,5.5151,5.44644,5.37559,5.30265,5.2277,5.15085,5.0722,4.99184,4.90987,4.82639,4.74151,4.65533,4.56794,4.47945,4.38996,4.29959,4.20843,4.11658,4.02416,3.93125,3.83796,3.74437,3.65057,3.55666,3.46272,3.36884,3.27509,3.18155,3.08831,2.99545,2.90303,2.81114,2.71984,2.62922,2.53933,2.45026,2.36207,2.27484,2.18862,2.10349,2.01951,1.93675,1.85528,1.77515,1.69644,1.61919,1.54348,1.46935,1.39685,1.32605,1.25698,1.18967,1.12417,1.06049,.99863,.93862,.88044,.82408,.76953,.71676,.66574,.61644,.56882,.52282,.47841,.43553,.39413,.35414,.31551,.27817,.24206,.20712,.17328,.14048,.10866,.07776,.04772,.01848,-.00999,-.03776,-.06487,-.09134,-.11721,-.14251,-.16725,-.19144,-.21509,-.2382,-.26076,-.28275,-.30416,-.32496,-.34511,-.36459,-.38334,-.40134,-.41852,-.43485,-.45026,-.46471,-.47815,-.49052,-.50179,-.51189,-.52081,-.52849,-.5349,-.54003,-.54383,-.54627,-.54734,-.54702,-.54528,-.54211,-.53752,-.53149,-.52403,-.51515,-.50487,-.4932,-.48015,-.46575,-.45001,-.43297,-.41463,-.39503,-.37419,-.35213,-.32887,-.30443,-.27885,-.25214,-.22432,-.19541,-.16544,-.13442,-.10235,-.06926,-.03514,0,.03616,.07336,.11159,.15088,.19125,.23272,.27531,.31906,.36401,.41019,.45764,.5064,.55651,.60802,.66096,.71538,.77129,.82874,.88776,.94836,1.01056,1.07438,1.13982,1.20687,1.27554,1.34581,1.41766,1.49107,1.56599,1.64239,1.72025,1.79951,1.88013,1.96209,2.04532,2.12979,2.21546,2.30226,2.39017,2.47911,2.56905,2.65991,2.75164,2.84416,2.93742,3.03133,3.12582,3.2208,3.31619,3.41191,3.50785,3.60393,3.70006,3.79612,3.89202,3.98765,4.08291,4.17767,4.27182,4.36525,4.45783,4.54944,4.63995],pressure:[.30942,.30838,.30765,.30724,.30715,.30738,.30795,.30884,.31007,.31164,.31354,.31578,.31837,.32129,.32455,.32815,.33209,.33636,.34097,.34591,.35117,.35675,.36265,.36887,.37539,.38221,.38933,.39674,.40442,.41238,.4206,.42907,.43779,.44675,.45593,.46533,.47493,.48473,.49471,.50486,.51517,.52563,.53623,.54694,.55777,.5687,.57971,.59079,.60194,.61313,.62435,.6356,.64686,.65811,.66935,.68056,.69174,.70286,.71391,.72489,.73579,.74659,.75728,.76785,.7783,.7886,.79876,.80877,.81861,.82827,.83776,.84706,.85617,.86507,.87378,.88227,.89056,.89863,.90649,.91412,.92153,.92872,.93568,.94241,.94892,.95519,.96122,.96702,.97258,.97791,.98299,.98783,.99242,.99677,.99911,.99525,.99164,.98827,.98515,.98228,.97966,.97728,.97514,.97324,.97159,.97017,.96898,.96801,.96727,.96674,.96641,.96629,.96635,.96661,.96703,.96762,.96838,.96928,.97032,.97149,.97279,.9742,.97572,.97734,.97905,.98085,.98273,.98468,.98669,.98877,.99091,.99311,.99535,.99765,1,.9976,.99516,.99267,.99014,.98755,.98491,.98222,.97947,.97666,.97378,.97083,.96781,.96471,.96153,.95826,.9549,.95144,.94787,.9442,.94042,.93651,.93249,.92834,.92407,.91966,.91512,.91045,.90564,.90069,.8956,.89037,.885,.87949,.87384,.86806,.86214,.85608,.84988,.84356,.83711,.83053,.82383,.81702,.81009,.80306,.79594,.78872,.78141,.77403,.76657,.75905,.75148,.74385,.73619,.72849,.72076,.71302,.70526,.69749,.68972,.68195,.67419,.66644,.65871,.65099,.64329,.63561,.62795,.62032,.61271,.60512,.59755,.59001,.58248,.57497,.56749,.56002,.55256,.54512,.5377,.5303,.52291,.51554,.50819,.50087,.49358,.48632,.4791,.47192,.4648,.45773,.45072,.44378,.43692,.43015,.42346,.41687,.41039,.40403,.39779,.39168,.38571,.37989,.37423,.36873,.36342,.35828,.35335,.34862,.34409,.3398,.33573,.3319,.32831,.32498,.32192,.31912,.3166,.31436,.31242,.31077]}];function o(e,t){if(!e)return null;var i=e.length/2;const n=.1*i;i=Array(i);let r=0;t=1===t;for(let o=0;o<e.length;o+=2){const a=(e[o]+e[o+1])/2;i[r++]=t?Math.min(n,1-.5*(1-a)):Math.min(n,.5*a)}return i}var a=function(){var e=n,a=e/2;const s=new Uint8Array(4*e*e),l=4*e*a,u=2*(a=i),c=4*e,h=r.length;let d=8*h*c;for(var f of r){var p=f.distance,_=f.pressure;let e=d;for(let i=0;i<9;i++){0!==i&&(p=o(p,0),_=o(_,1));for(let i=0;i<n;i++){const n=_?_[i%_.length]:1;t(.5+(p?p[i%p.length]/u:0),s,e),t(n,s,e+l),e+=4}e-=c*(h+1)}d+=c}return s}(),s=new a$Q({wrapS:j$13.REPEAT,wrapT:j$13.REPEAT,minificationFilter:tt$l.LINEAR,magnificationFilter:et$k.LINEAR});this._edgeStrokesTexture=new P$S({context:this._frameState.context,source:{width:256,height:256,arrayBufferView:a},sampler:s,flipY:!1})},_0x4ab4f4.prototype._setFloodTexture=function(e,t,i){this._floodFlagTexture=e,this._floodRect=t;var n=new c$1a;c$1a.inverse(i,n),this._matFloodInvertMatrix=n;var r={};r.layer=this,this.traverseRenderEntity(r,_0x2e3e90)},_0x4ab4f4.prototype._removeFloodTexture=function(){this._floodFlagTexture=void 0,this._floodRect=void 0,this._matFloodInvertMatrix=c$1a.IDENTITY;var e={};e.layer=this,this.traverseRenderEntity(e,_0x363189)};var i$q=function(){if(this._layers=null,this.minQuality=1,this._jsHeapSizeLimitRatio=1,this._maxMemory=1024,o$$.isPCBroswer()&&(this._maxMemory=4096),window.performance&&window.performance.memory){var e=window.performance.memory.usedJSHeapSize/1048576,t=window.performance.memory.jsHeapSizeLimit/1048576;this._maxMemory=(t-e)*this._jsHeapSizeLimitRatio}this._cacheSize=1024,this._memoryUsed=0,this._memoryPredicted=0,this._quality=1,this._canFastRecover=0,this._downscaleMemoryUsed=this._stableQuality=0,this._QualityShrinkRatio=1.3,this._QualityIncreaseStep=.01,this._updating=0,this._geoMemoryEstimate=0,this._texMemoryEstimate=0,this._EMA=0,this._learningWeight=.9,this._beta=1-this._learningWeight,this._logTime=0,this._showMemoryInfo=!1};i$q.showMemoryInfo=function(e){e$y._showMemoryInfo=e},i$q.setCacheSize=function(e){e$y._cacheSize=Math.min(e,e$y._maxMemory)},i$q.getCacheSize=function(){return e$y._cacheSize},i$q.reAllocateMaxMemory=function(e){if(e$y._jsHeapSizeLimitRatio=e,window.performance&&window.performance.memory){var t=window.performance.memory.usedJSHeapSize/1048576,i=window.performance.memory.jsHeapSizeLimit/1048576;e$y._maxMemory=(i-t)*e$y._jsHeapSizeLimitRatio}},i$q.setMaxMemory=function(e){e$y._maxMemory=e},i$q.getMaxMemory=function(){return e$y._maxMemory};const c$o={GeForce:{1050:3,1060:3,1070:8,1080:8,1650:4,1660:6,2060:6,2070:8,2080:8,3050:8,3060:8,3080:12,3090:24,4070:12,4080:16,4090:24},AMD:{7900:24,7600:8,6950:16,6900:16,6800:16,6750:12,6700:12,6650:8,6600:8,6500:4,6400:4,5700:8,5600:6,5500:8,64:8,56:8,590:8,580:4,570:4,560:4,550:4,480:4,470:4,390:8,380:4,7990:6,7970:3,7950:3,6990:4}};i$q._autoSetMaxMemory=function(e){var t=e.split(" "),i=t.filter((function(e,t){return/^[1-9]/g.test(e)}));if(i.length>0){var n,r=t.indexOf("GeForce")>-1,o=t.indexOf("AMD")>-1,a=i[0];r?n=c$o.GeForce[a]:o&&(n=c$o.AMD[a]),n=t$$(n)?.9*n:2,n*=1024,i$q.setMaxMemory(n)}},i$q.setMinQuality=function(e){e$y.minQuality=Math.min(e,1)},i$q.getMinQuality=function(){return e$y.minQuality},i$q._memGeometryAdded=function(e){e$y._geoMemoryEstimate+=e},i$q._memGeometryRemoved=function(e){e$y._geoMemoryEstimate-=e},i$q._memTextureAdded=function(e){e$y._texMemoryEstimate+=e},i$q._memTextureRemoved=function(e){e$y._texMemoryEstimate-=e},i$q._attachLayers=function(e){e$y._layers=e},i$q._updateMemory=function(e){var t=1048576*e$y._maxMemory,i=e$y._memoryUsed*t;if(e$y._memoryUsed=e,e$y._memoryPredicted=e$y._memoryUsed-i,e$y._memoryPredicted=0==e$y._EMA?e$y._memoryPredicted:e$y._memoryPredicted*e$y._learningWeight+e$y._EMA*(1-e$y._learningWeight),e$y._EMA=e$y._memoryPredicted,e$y._showMemoryInfo&&e$y._memoryUsed>t){var n=yt$9();n-e$y._logTime>1e4&&(console.log(i$q.getStatistics()),e$y._logTime=n)}e$y._memoryPredicted=(e$y._memoryUsed+e$y._memoryPredicted)/t,e$y._memoryUsed=e$y._memoryUsed/t},i$q.getStatistics=function(){var e="内存上限(MB): "+e$y._maxMemory,t=e$y._memoryUsed;e$y._memoryUsed<1&&(t=1048576*e$y._maxMemory*t);for(var i="当前占用内存(MB): "+t/1048576,n="缓存上限(MB): "+e$y._cacheSize,r="当前缓存占用(MB): ",o=0;o<e$y._layers._layerQueue.length;o++){var a=e$y._layers._layerQueue[o];if(a instanceof _0x4ab4f4){var s=a._layerScheduler._getCacheMemoryUsageInBytes()/1048576;r+="第"+o+"层, 图层名:"+a._name+",缓存占用:"+s+","}}var l=e+","+i+","+("渲染质量:"+e$y._quality)+"\n"+n+","+r;if(window.performance&&window.performance.memory){var u=window.performance.memory.totalJSHeapSize/1048576,c=window.performance.memory.usedJSHeapSize/1048576;l+="\n浏览器最大内存(MB):"+window.performance.memory.jsHeapSizeLimit/1048576+",已分配内存(MB):"+c+",堆活跃内存(MB):"+u}return l},i$q.getMemoryUsed=function(){return e$y._memoryUsed},i$q.getQuality=function(){return e$y._quality},i$q._updateQuality=function(e){return(e=Math.min(Math.max(e,e$y.minQuality),1))===e$y._quality?0:(e$y._quality=e,1)},i$q._layersUpdating=function(){for(var e=e$y._layers._layerQueue.length,t=0;t<e;t++){var i=e$y._layers._layerQueue[t];if(i instanceof _0x4ab4f4&&i._layerScheduler._updatingTiles()>0)return!0}return!1},i$q.update=function(e){e$y._layers._setMaxMemory(e$y._maxMemory),e$y._layers._setCacheMemory(e$y._cacheSize),this._updateMemory(e);var t=!0;if(e$y._memoryPredicted>0||e$y._updating){var i=this._layersUpdating();e$y._memoryPredicted<.6&&e$y._canFastRecover?(e$y._stableQuality=e$y._downscaleMemoryUsed=0,e$y._canFastRecover=0,this._updateQuality(1)):i?(e$y._memoryPredicted>1.1||e$y._memoryUsed>1)&&(e$y._stableQuality>0?(e$y._downscaleMemoryUsed=0,this._updateQuality(e$y._stableQuality)):e$y._quality>e$y.minQuality&&e$y._downscaleMemoryUsed<e$y._memoryUsed?(t=i=this._updateQuality(e$y._quality/e$y._QualityShrinkRatio),e$y._downscaleMemoryUsed=e$y._memoryUsed,e$y._canFastRecover=0):t=!1):(i=this._layersUpdating(),e$y._downscaleMemoryUsed=0,e$y._memoryUsed>1?(e$y._stableQuality=0,e$y._canFastRecover=0,t=i=this._updateQuality(e$y._quality/e$y._QualityShrinkRatio),e$y._downscaleMemoryUsed=e$y._memoryPredicted):e$y._stableQuality!=e$y._quality&&(e$y._memoryUsed<.8&&e$y._quality<1?(e$y._stableQuality=e$y._quality,i=this._updateQuality(e$y._quality+e$y._QualityIncreaseStep)):e$y._quality<1&&(e$y._canFastRecover=1))),e$y._updating=i}return t};var e$y=new i$q;i$q.memManager=e$y;var oo$1=i$q,_0x380ebb=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1f320e=_0x380ebb(void 0,(function(){return _0x1f320e.toString().search("(((.+)+)+)+$").toString().constructor(_0x1f320e).search("(((.+)+)+)+$")}));_0x1f320e();var _0x1f2d50=273;function _0xcc5624(e,t){var i=["","WEBKIT_","MOZ_"],n=null;for(var r in i)if(n=e.getExtension(i[r]+t))break;return n}var _0x13f1b5=function(){this.textures={},this.refCounts={},this.unUsedTextures={},this.unUsedSize=0,this.dxtExt=null,this.pvrtcExt=null,this.etc1Ext=null,this.bInitialised=!1};_0x13f1b5.reservedMemorySize=50,_0x13f1b5.CreateTexture=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=t._gl;0==_0x358234.bInitialised&&(_0x358234.bInitialised=!0,_0x358234.dxtExt=_0xcc5624(d,"WEBGL_compressed_texture_s3tc"),_0x358234.pvrtcExt=_0xcc5624(d,"WEBGL_compressed_texture_pvrtc"),_0x358234.etc1Ext=_0xcc5624(d,"WEBGL_compressed_texture_etc1"));var f=_0x358234.textures[e];if(f)_0x358234.refCounts[e]++;else{var p=null;switch(o){case _0x415d95.enrS3TCDXTN:p=r===_0x5ce781.BGR||r===_0x5ce781.RGB?Z$_.RGB_DXT1:Z$_.RGBA_DXT5;break;case _0x415d95.enrPVRTPF_PVRTC2:case _0x415d95.enrPVRTPF_PVRTC:p=r===_0x5ce781.BGR||r===_0x5ce781.RGB?Z$_.RGB_PVRTC_2BPPV1:Z$_.RGBA_PVRTC_2BPPV1;break;case _0x415d95.enrPVRTPF_PVRTC_4bpp:p=Z$_.RGBA_PVRTC_4BPPV1;break;case _0x415d95.enrPVRTPF_ETC1:p=Z$_.RGB_ETC1;break;case _0x415d95.encNONE:p=r===_0x5ce781.BGR||r===_0x5ce781.RGB?_0x1f2d50:r===_0x5ce781.LUMINANCE_ALPHA?Z$_.LUMINANCE_ALPHA:Z$_.RGBA}var _=25===r?v$Z.FLOAT:v$Z.UNSIGNED_BYTE;t$$(_0x358234.unUsedTextures[e])?(f=_0x358234.unUsedTextures[e],_0x358234.unUsedSize-=f._size,delete _0x358234.unUsedTextures[e]):(s||(f=this.UseTexture(e,t,i,n,p,a,l,u,_)),null==f&&(f=new _0x389226(e,t,i,n,p,a,s,l,u,_,c,h),oo$1._memTextureAdded(f._sizeInBytes))),_0x358234.refCounts[e]=1,_0x358234.textures[e]=f}return f},_0x13f1b5.UseTexture=function(e,t,i,n,r,o,a,s,l){var u=t._gl;for(var c in _0x358234.unUsedTextures)if(_0x358234.unUsedTextures[c]._size===o.length){var h=_0x358234.unUsedTextures[c];if(h._context.id!==t.id)return;if(t.webgl2&&(i!==h._width||n!==h._height))continue;return _0x358234.unUsedSize-=h._size,delete _0x358234.unUsedTextures[c],h._gl=u,h._width=i,h._height=n,h._internalFormat=r,h._wrapS=e$1Y(a,j$13.CLAMP_TO_EDGE),h._wrapT=e$1Y(s,j$13.CLAMP_TO_EDGE),h._pixelDataType=e$1Y(l,v$Z.UNSIGNED_BYTE),h._pixelDataType===v$Z.FLOAT&&(h._wrapS=j$13.CLAMP_TO_EDGE,h._wrapT=j$13.CLAMP_TO_EDGE),h.ready=!1,h._target=h._gl.TEXTURE_2D,h.updateTexture(e,o),h}},_0x13f1b5.CreateVolumeTexture=function(e,t,i,n,r){var o=_0x358234.textures[e],a=tt$l.LINEAR,s=et$k.LINEAR;if(r===J$O.FilterMode.NEAREST&&(a=tt$l.NEAREST,s=et$k.NEAREST),o&&!t$$(n.imageArray))_0x358234.refCounts[e]++,o.sampler=new a$Q({minificationFilter:a,magnificationFilter:s});else{var l=n.nLength,u=n.imageArray;(o=new P$S({context:i,width:l,height:l,pixelFormat:Z$_.RGBA,flipY:!1,sampler:new a$Q({minificationFilter:a,magnificationFilter:s})})).copyFrom({width:l,height:l,arrayBufferView:u}),_0x358234.refCounts[e]=1,_0x358234.textures[e]=o,oo$1._memTextureAdded(o._sizeInBytes)}return o},_0x13f1b5.ReloadVolumeTexture=function(e,t,i,n,r){var o=_0x358234.textures[e];if(o){var a=n.nLength,s=n.imageArray;o.copyFrom({width:a,height:a,arrayBufferView:s})}return o},_0x13f1b5.AddRef=function(e){_0x358234.refCounts[e]++},_0x13f1b5.DecRef=function(e){_0x358234.refCounts[e]--},_0x13f1b5.DestroyTexture=function(e){var t=_0x358234.refCounts[e];_0x358234.refCounts[e]=t-1,0==_0x358234.refCounts[e]&&(_0x358234.textures[e].is3D||t$$(_0x358234.textures[e].sampler)?(oo$1._memTextureRemoved(_0x358234.textures[e]._sizeInBytes),_0x358234.textures[e].destroy()):(_0x358234.unUsedTextures[e]=_0x358234.textures[e],_0x358234.unUsedSize+=_0x358234.textures[e]._size),delete _0x358234.textures[e],delete _0x358234.refCounts[e])},_0x13f1b5.GetUnusedSize=function(){return _0x358234.unUsedSize},_0x13f1b5.DeleteUnusedTextures=function(){for(var e in _0x358234.unUsedTextures)_0x358234.unUsedTextures[e]._is3D&&(_0x358234.unUsedSize-=_0x358234.unUsedTextures[e]._size,oo$1._memTextureRemoved(_0x358234.textures[e]._sizeInBytes),_0x358234.unUsedTextures[e].destroy(),delete _0x358234.unUsedTextures[e]);var t=1024*_0x13f1b5.reservedMemorySize*1024;for(var e in _0x358234.unUsedTextures){if(t>_0x358234.unUsedSize)break;var i=_0x358234.unUsedTextures[e];_0x358234.unUsedSize-=i._size,oo$1._memTextureRemoved(i._sizeInBytes),i.destroy(),delete _0x358234.unUsedTextures[e]}};var _0x358234=new _0x13f1b5;_0x13f1b5.textureManager=_0x358234,_0x13f1b5._shareTexturePromiseCache={};var De$e=_0x13f1b5,_0x1dab97=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x9d3944=_0x1dab97(void 0,(function(){return _0x9d3944.toString().search("(((.+)+)+)+$").toString().constructor(_0x9d3944).search("(((.+)+)+)+$")}));_0x9d3944();var _0x19fcf8={INSTANCED_LAYER:"Instanced_Layer",INSTANCED_OBJECT:"Instanced_Object"},ai$2=Object.freeze(_0x19fcf8),_0x408f09=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x155477=_0x408f09(void 0,(function(){return _0x155477.toString().search("(((.+)+)+)+$").toString().constructor(_0x155477).search("(((.+)+)+)+$")}));_0x155477();var _0x378bad=new e$1z(.7,.7,1,1);function _0x10007a(e,t,i,n){n=e$1Y(n,e$1Y.EMPTY_OBJECT),n$1e.defined("options.position",n.position),this._type=ai$2.INSTANCED_OBJECT,this._ownerGroup=i,this._position=n.position,this._color=e$1Y(n.color,e$1z.WHITE),this._scale=e$1Y(n.scale,new a$11(1,1,1)),this._offset=e$1Y(n.offset,new a$11(0,0,0));var r=e$1Y(n.hpr,new e$1L);this._hpr=r,this._feature=e$1Y(n.feature,e$1Y.EMPTY_OBJECT);var o=i$1g.fromCartesian(this._position);o.longitude+=this._offset.x,o.latitude+=this._offset.y,o.height+=this._offset.z,this._offsetPosition=a$11.fromRadians(o.longitude,o.latitude,o.height),this._mode=n.sceneMode,this._mode===b$1d.COLUMBUS_VIEW&&(this._position=m$13.convertToColumbusCartesian(this._position),this._offsetPosition=m$13.convertToColumbusCartesian(this._offsetPosition)),this._quaternion=m$13.headingPitchRollQuaternion(this._position,r);var a={id:t,primitive:this},s=e.createPickId(a).color,l=new e$1z;l.x=e$1z.floatToByte(s.red),l.y=e$1z.floatToByte(s.green),l.z=e$1z.floatToByte(s.blue),l.w=e$1z.floatToByte(s.alpha),this._pickColor=l,this._isSelected=!1,this._preColor=e$1z.clone(this._color),this._oriCenter=void 0,this._oriRadius=1,this._boundingSphere=void 0,this._id=t,this._index=-1,this._isDeleted=!1,this._visible=e$1Y(n.visible,!0),this._distanceVisible=!0,this._localTransform=void 0,this._localTranslation=void 0,this._localQuaternion=void 0}Object.defineProperties(_0x10007a.prototype,{type:{get:function(){return this._type}},position:{get:function(){return this._position}},color:{get:function(){return this._color}},scale:{get:function(){return this._scale}},hpr:{get:function(){return this._hpr}},visible:{get:function(){return this._visible},set:function(e){n$1e.typeOf.bool("S3M Instance visible",e),e!==this._visible&&(this._visible=e,this.updatePosition(this._position))}},show:{get:function(){return this.visible},set:function(e){this.visible=e}},distanceVisible:{get:function(){return this._distanceVisible},set:function(e){n$1e.typeOf.bool("S3M Instance distanceVisible",e),e!==this._distanceVisible&&(this._distanceVisible=e,this.updatePosition(this._position))}},offset:{get:function(){return this._offset}},feature:{get:function(){return this._feature}},isSelected:{get:function(){return this._isSelected}},oriCenter:{get:function(){return this._oriCenter},set:function(e){!t$$(e)||(this._oriCenter=e)}},oriRadius:{get:function(){return this._oriRadius},set:function(e){!t$$(e)||(this._oriRadius=e)}},boundingSphere:{get:function(){return this._boundingSphere},set:function(e){!t$$(e)||(this._boundingSphere=e)}},index:{get:function(){return this._index},set:function(e){this._index=e}},id:{get:function(){return this._id},set:function(e){!t$$(e)||(this._id=e)}},isDeleted:{get:function(){return this._isDeleted},set:function(e){t$$(e)&&(this._isDeleted=e)}},localTransform:{get:function(){return this._localTransform}},localTranslation:{get:function(){return this._localTranslation}},localQuaternion:{get:function(){return this._localQuaternion}}}),_0x10007a.prototype.updatePosition=function(e){if(t$$(e)){var t=this._index;this._position=a$11.clone(e);var i=i$1g.fromCartesian(this._position);i.longitude+=this._offset.x,i.latitude+=this._offset.y,i.height+=this._offset.z,this._offsetPosition=a$11.fromRadians(i.longitude,i.latitude,i.height);var n=this._ownerGroup.renderEntities;if(t$$(n)&&!(n.length<1)){for(var r=this._visible&&this._distanceVisible?1:0,o=a$11.multiplyByScalar(e,r,new a$11),a=0,s=n.length;a<s;a++){var l=n[a],u=l._colorCommand.vertexArray.getAttribute(l._attributeLocations.aPosHigh),c=t*u.strideInBytes+u.offsetInBytes,h=C$12.createTypedArray(u.componentDatatype,2*u.componentsPerAttribute),d=t$R.fromCartesian(o),f=d.high,p=d.low;h[0]=f.x,h[1]=f.y,h[2]=f.z,h[3]=p.x,h[4]=p.y,h[5]=p.z,u.vertexBuffer.copyFromArrayView(h,c)}a$11.clone(e,this._boundingSphere.center)}}},_0x10007a.prototype.updateColor=function(e){if(t$$(e)&&!this._isDeleted){var t=this._index;if(!e$1z.equals(this._color,e)){this._color=e$1z.clone(e,this._color),this._preColor=e$1z.clone(e);var i=this._ownerGroup.renderEntities;if(t$$(i)&&!(i.length<1))for(var n=0,r=i.length;n<r;n++){var o=i[n],a=o._colorCommand.vertexArray.getAttribute(o._attributeLocations.aColor2),s=t*a.strideInBytes+a.offsetInBytes,l=C$12.createTypedArray(a.componentDatatype,a.componentsPerAttribute);l[0]=e.red,l[1]=e.green,l[2]=e.blue,l[3]=e.alpha,a.vertexBuffer.copyFromArrayView(l,s)}}}},_0x10007a.prototype.updateScale=function(e){if(t$$(e)){var t=this._index;if(!a$11.equals(this._scale,e)){this._scale=a$11.clone(e);var i=this._ownerGroup.renderEntities;if(t$$(i)&&!(i.length<1)){for(var n=0,r=i.length;n<r;n++){var o=i[n],a=o._colorCommand.vertexArray.getAttribute(o._attributeLocations.aScaleAndRadius),s=t*a.strideInBytes+a.offsetInBytes,l=C$12.createTypedArray(a.componentDatatype,a.componentsPerAttribute);l[0]=e.x,l[1]=e.y,l[2]=e.z,l[3]=this._oriRadius,a.vertexBuffer.copyFromArrayView(l,s)}var u=a$11.maximumComponent(e);this._boundingSphere.radius=this.oriRadius*u}}}},_0x10007a.prototype.updateRotation=function(e){if(t$$(e)){var t=this._index;if(!e$1L.equals(this._hpr,e)){if(this._hpr=e$1L.clone(e),this._quaternion=m$13.headingPitchRollQuaternion(this._position,e),this._mode===b$1d.COLUMBUS_VIEW){var i=r$W.fromRotationY(-Math.PI/2),n=a$U.fromRotationMatrix(i);this._quaternion=a$U.multiply(this._quaternion,n,this._quaternion)}var r=this._ownerGroup.renderEntities;if(t$$(r)&&!(r.length<1))for(var o=0,a=r.length;o<a;o++){var s=r[o],l=s._colorCommand.vertexArray.getAttribute(s._attributeLocations.aQuaternion),u=t*l.strideInBytes+l.offsetInBytes,c=C$12.createTypedArray(l.componentDatatype,l.componentsPerAttribute);c[0]=this._quaternion.x,c[1]=this._quaternion.y,c[2]=this._quaternion.z,c[3]=this._quaternion.w,l.vertexBuffer.copyFromArrayView(c,u)}}}},_0x10007a.prototype.updateModelMatrix=function(e){var t=c$1a.getScale(e,new a$11);this.updateScale(t),this._localTransform=c$1a.clone(e),this._localTranslation=c$1a.getTranslation(e,new a$11);var i=c$1a.setScale(e,new a$11(1,1,1),new c$1a),n=c$1a.getRotation(i,new r$W);this._localQuaternion=a$U.fromRotationMatrix(n,new a$U)},_0x10007a.prototype.setSelected=function(){var e=this._index;if(t$$(e)&&!(e<0)&&!e$1z.equals(this._color,_0x378bad)){var t=e$1z.multiply(_0x378bad,this._preColor,new e$1z),i=this._ownerGroup.renderEntities;if(t$$(i)&&!(i.length<1)){for(var n=0,r=i.length;n<r;n++){var o=i[n],a=o._colorCommand.vertexArray.getAttribute(o._attributeLocations.aColor2),s=e*a.strideInBytes+a.offsetInBytes,l=C$12.createTypedArray(a.componentDatatype,a.componentsPerAttribute);l[0]=t.red,l[1]=t.green,l[2]=t.blue,l[3]=t.alpha,a.vertexBuffer.copyFromArrayView(l,s)}this._isSelected=!0}}},_0x10007a.prototype.setUnSelected=function(){var e=this._index;if(t$$(e)&&!(e<0)&&this._isSelected){this._isSelected=!1,this._color=e$1z.clone(this._preColor);var t=this._ownerGroup.renderEntities;if(t$$(t)&&!(t.length<1))for(var i=0,n=t.length;i<n;i++){var r=t[i],o=r._colorCommand.vertexArray.getAttribute(r._attributeLocations.aColor2),a=e*o.strideInBytes+o.offsetInBytes,s=C$12.createTypedArray(o.componentDatatype,o.componentsPerAttribute);s[0]=this._preColor.red,s[1]=this._preColor.green,s[2]=this._preColor.blue,s[3]=this._preColor.alpha,o.vertexBuffer.copyFromArrayView(s,a)}}};var _0x553665=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x5062fb=_0x553665(void 0,(function(){return _0x5062fb.toString().search("(((.+)+)+)+$").toString().constructor(_0x5062fb).search("(((.+)+)+)+$")}));_0x5062fb();var _0x29dd65="\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n#extension GL_EXT_shader_texture_lod : enable\n#ifdef MRT\n#extension GL_EXT_draw_buffers : enable\n#endif\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef ClampObject\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#endif\n#ifdef TEXTURE\nuniform sampler2D uTexture;\n#endif\nvarying vec2 vTexCoord;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvarying vec4 vPositionMC;\nvarying vec3 vPositionEC;\nvarying vec4 vPositionWC;\nvarying vec3 vNormalEC;\nvarying mat4 vModelMatrix;\n\n#ifdef SQRESULT\nuniform sampler2D uFrontColorTexture;\nuniform sampler2D uFrontDepthTexture;\nuniform sampler2D uBackDepthTexture;\nuniform float uSQMode; \n#endif\n#ifdef Volume2\nvarying vec3 vecRotioCoord;\n#endif\nfloat computeDepth()\n{\n#ifdef LOG_DEPTH\n return log2(v_depthFromNearPlusOne) * czm_oneOverLog2FarDepthFromNearPlusOne;\n#else\n return gl_FragCoord.z;\n#endif\n}\n#ifdef SQRESULT\nbool isPointInObject(vec2 texCoord)\n{\n bool bIn = false;\n vec4 colorInClipTexture = texture2D(uFrontColorTexture,texCoord.xy);\n if(colorInClipTexture.r > 0.99 && colorInClipTexture.g < 0.01 && colorInClipTexture.b < 0.01)\n {\n float depthNear = czm_unpackDepth(texture2D(uFrontDepthTexture, texCoord.xy)) - 0.00001;\n float depthFar = czm_unpackDepth(texture2D(uBackDepthTexture, texCoord.xy)) + 0.00001;\n float currentDepth = computeDepth();\n if(currentDepth > depthNear && currentDepth < depthFar){\n bIn = true;\n }\n }\n return uSQMode < 0.5 ? !bIn : bIn;\n}\n#endif\n\nuniform vec3 uAmbientLightColor;\nuniform vec4 uSunLightColor;\nuniform float uSunLightON;\nuniform vec4 uAmbientColor;\nuniform vec4 uDiffuseColor;\n\nvec4 SRGBtoLinear(vec4 srgbIn) \n{\n return vec4(pow(srgbIn.rgb, vec3(2.2)), srgbIn.a);\n}\nvec4 LineartoSRGB(vec4 linearIn) \n{\n#ifndef HDR \n return vec4(pow(linearIn.rgb, vec3(1.0/2.2)), linearIn.a);\n#else \n return linearIn;\n#endif \n}\n\n#include <brdf>\n\nvoid main()\n{\n czm_s3mMaterialInput material;\n material.ambientColor = uAmbientColor;\n material.diffuseColor = uDiffuseColor;\n material.ambientLightColor.rgb = uAmbientLightColor;\n material.ambientLightColor.a = 1.0;\n material.sunLightColor = uSunLightColor;\n material.sunLightON = uSunLightON;\n material.sunDirectionEC = czm_sunDirectionEC;\n#ifdef ClampObject\n czm_writeDepthClampedToFarPlane();\n#endif\n vec4 color = vColor;\n#ifdef ClampObject\n #ifdef PROFILE\n #ifdef MRT\n gl_FragData[0] = vec4(vPickColor.xyz, 1.0);\n gl_FragData[1] = color;\n #else\n gl_FragColor = vec4(vPickColor.xyz, 1.0);\n #endif\n #else\n gl_FragColor = color;\n #endif\n#else\n vec2 vecTexCoord = vec2(0.0);\n #ifdef SQRESULT\n vec2 texCoord = vec2(gl_FragCoord.x / czm_viewport.z, gl_FragCoord.y / czm_viewport.w);\n if(!isPointInObject(texCoord)) \n { \n discard; \n } \n #endif\n \n\t#ifdef TEXTURE\n #ifdef FLIP_Y\n vecTexCoord = vec2(vTexCoord.x,1.0-vTexCoord.y);\n #else\n vecTexCoord = vec2(vTexCoord.x,vTexCoord.y);\n #endif\n #endif\n \n #ifdef TEXTURE\n color = SRGBtoLinear(texture2D(uTexture, vecTexCoord.xy, 0.0)) * color;\n #endif\n vec3 normalEC;\n if(vPositionMC.w > 0.9)\n {\n normalEC = normalize(vNormalEC);\n }\n else\n {\n vec3 normalMC = czm_computeNormal(vPositionMC.xyz);\n mat4 modelViewMatrix4 = czm_view * vModelMatrix;\n modelViewMatrix4 = czm_inverseMatrix(modelViewMatrix4);\n mat3 modelViewMatrix3 = mat3(modelViewMatrix4);\n modelViewMatrix3 = czm_transpose(modelViewMatrix3);\n normalEC = normalize(modelViewMatrix3 * normalMC);\n }\n vec3 positionEC = vec3(czm_modelView * vec4(vPositionMC.xyz,1.0)).xyz;\n \n #ifdef BRDF\n gl_FragColor = brdf(color, vecTexCoord, vecTexCoord, positionEC, vPositionMC.xyz, normalEC, uSunLightColor, uSunLightON);\n #else\n gl_FragColor = color * czm_directionLight(material, normalEC, -positionEC, vPositionMC.xyz);\n #ifdef TEXTURE\n gl_FragColor = LineartoSRGB(gl_FragColor);\n #endif\n #endif\n \n #ifdef Volume\n #ifdef Volume2\n if((vecRotioCoord.x < 1.0 && vecRotioCoord.x >0.0) && (vecRotioCoord.y < 1.0 && vecRotioCoord.y >0.0) && (vecRotioCoord.z < 1.0 && vecRotioCoord.z >0.0))\n {\n vec4 volumeColor = czm_getVolumeValue(vecRotioCoord);\n if (volumeColor.r * volumeColor.g * volumeColor.b * volumeColor.a < 0.99) {\n gl_FragColor = volumeColor;\n }\n }\n #else\n float wValue = 0.0;\n gl_FragColor = czm_getHypsometricColor(gl_FragColor, wValue);\n #endif\n #endif\n#endif\n\n#ifndef MRT\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n if(gl_FragColor.a < 0.1)\n {\n discard;\n }\n#endif\n}",_0x27d1fc=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x298d7b=_0x27d1fc(void 0,(function(){return _0x298d7b.toString().search("(((.+)+)+)+$").toString().constructor(_0x298d7b).search("(((.+)+)+)+$")}));_0x298d7b();var _0x4722cc={getDataShape:function(e,t){for(var i=-1/0,n=0,r=0,o=0,a=0;a<e.length;a++){var s=0;if(e[a].value&&(s=e[a].value[3]),s<i){if(o&&o!==r)throw new Error("Invalid data. data should be a row major 2d array.");o=r,r=0,n++}i=s,r++}return{row:n+1,column:r}}},_0x17dd0a=[],_0x47623b=[],_0x2e379f=[];function _0x18e4f8(e){var t;return/^#([A-Fa-f0-9]{3}){1,2}$/.test(e)?(3==(t=e.substring(1).split("")).length&&(t=[t[0],t[0],t[1],t[1],t[2],t[2]]),[((t="0x"+t.join(""))>>16&255)/255,(t>>8&255)/255,(255&t)/255,1]):[255,255,255,1]}_0x4722cc.updateSurfaceMesh=function(e,t,i){for(var n=new Float32Array(3*e.length),r=-900,o=900,a=-900,s=900,l=-900,u=900,c=0;c<e.length;c+=3)r=Math.max(e[c].value[0],r),o=Math.min(e[c].value[0],o),a=Math.max(e[c].value[1],a),s=Math.min(e[c].value[1],s),l=Math.max(e[c].value[2],l),u=Math.min(e[c].value[2],u);var h=_0x14ac5b(o,r);_0x17dd0a=_0x8dacda(o,r,h);var d=_0x14ac5b(s,a);_0x47623b=_0x8dacda(s,a,d);var f=_0x14ac5b(u,l);_0x2e379f=_0x8dacda(u,l,f);var p=0;e.forEach((function(e){e.value&&e.value instanceof Array&&_0x2dac65(e.value[0],e.value[1],e.value[2],p,n),p++}));var _=_0x24b631(0,null,[-50,50],_0x17dd0a),m=_0x24b631(0,null,[50,-50],_0x47623b),$=_0x24b631(0,null,[-50,50],_0x2e379f),g=null,y=null,v=null,x=null,b=null,S=t.row,w=t.column,C=(S-1)*(w-1)*4;g=new Float32Array(3*C),x=new Float32Array(4*C),b=new Float32Array(4*C),v=new Float32Array(2*C);var T,P,E,A,L,M,I,O,D,R,N,F,B,z,G,k=[0,3,1,1,3,2],U=[[1,1,0,0],[0,1,0,1],[1,0,0,1],[1,0,1,0]],V=new(C>65535?Uint32Array:Uint16Array)((S-1)*(w-1)*6),W=function(e,t,i){i[1]=e*w+t,i[0]=e*w+t+1,i[3]=(e+1)*w+t+1,i[2]=(e+1)*w+t},H=[],Y=[],j=0;y=new Float32Array(3*C);var q=[[],[],[]],X=[],K=[],Z=[0,0,0],J=function(e,t,i){var n=3*t;return i[0]=e[n],i[1]=e[n+1],i[2]=e[n+2],i},Q=new Float32Array(n.length),ee=new Float32Array(n.length/3*4),te=[0,0,0,1];for(c=0;c<e.length;c++){e[c].itemStyle&&"string"==typeof e[c].itemStyle.color?te=ue=_0x18e4f8(e[c].itemStyle.color):ue=te;ue[3]*=1,ue[3];for(var ie=0;ie<4;ie++)ee[4*c+ie]=ue[ie]}for(c=0;c<S-1;c++)for(var ne=0;ne<w-1;ne++){var re=4*(c*(w-1)+ne)*3;W(c,ne,H);for(ie=0;ie<4;ie++)J(n,H[ie],Y);for(ie=0;ie<4;ie++)J(n,H[ie],Y),g.set(Y,re+3*ie),x.set(U[ie],re/3*4+ie);for(ie=0;ie<6;ie++)V[j++]=k[ie]+re/3;for(ie=0;ie<2;ie++){for(var oe=3*ie,ae=0;ae<3;ae++){J(n,he=H[k[oe]+ae],q[ae])}var se=function(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e};se(X,q[0],q[1]),se(K,q[1],q[2]);I=Z,D=K,R=void 0,N=void 0,F=void 0,B=void 0,z=void 0,G=void 0,R=(O=X)[0],N=O[1],F=O[2],B=D[0],z=D[1],G=D[2],I[0]=N*G-F*z,I[1]=F*B-R*G,I[2]=R*z-N*B;for(ae=0;ae<3;ae++){var le=3*H[k[oe]+ae];Q[le]=Q[le]+Z[0],Q[le+1]=Q[le+1]+Z[1],Q[le+2]=Q[le+2]+Z[2]}}}for(c=0;c<Q.length/3;c++){J(Q,c,Z);T=Z,E=void 0,A=void 0,L=void 0,M=void 0,E=(P=Z)[0],A=P[1],L=P[2],(M=E*E+A*A+L*L)>0&&(M=1/Math.sqrt(M),T[0]=P[0]*M,T[1]=P[1]*M,T[2]=P[2]*M),Q[3*c]=Z[0],Q[3*c+1]=Z[1],Q[3*c+2]=Z[2]}var ue=[],ce=[];for(c=0;c<S-1;c++)for(ne=0;ne<w-1;ne++){re=4*(c*(w-1)+ne)*4;W(c,ne,H);for(ie=0;ie<4;ie++){for(ae=0;ae<4;ae++)ue[ae]=ee[4*H[ie]+ae];b.set(ue,re+4*ie),J(Q,H[ie],Z),y.set(Z,re/4*3+3*ie);var he=H[ie];ce[0]=he%w/(w-1),ce[1]=Math.floor(he/w)/(S-1),v.set(ce,re/4*2+2*ie)}0}for(c=0;c<g.length;c+=3){g[c]-=_,g[c+1]-=m,g[c+2]-=$;var de=g[c+1],fe=g[c+2];g[c+2]=de,g[c+1]=fe}return{positionAttr:g,normalAttr:y,texcoordAttr:v,barycentricAttr:x,colorAttr:b,indices:V,vertexColors:ee,vertexNormals:Q,vertexCount:C}};var _0x56733f=[0,1];function _0x805405(e,t,i,n){return(i=i||[])[0]=_0x24b631(e[0],n,[-50,50],_0x17dd0a),i[1]=_0x24b631(e[1],n,[50,-50],_0x47623b),i[2]=_0x24b631(e[2],n,[-50,50],_0x2e379f),i}function _0x24b631(e,t,i,n){return _0x1ad75b(e=_0x5dc381(e,n),_0x56733f,i,t)}function _0x5dc381(e,t){var i=t;return i[1]===i[0]?.5:(e-i[0])/(i[1]-i[0])}function _0x1ad75b(e,t,i,n){var r=t[1]-t[0],o=i[1]-i[0];if(0===r)return 0===o?i[0]:(i[0]+i[1])/2;if(n)if(r>0){if(e<=t[0])return i[0];if(e>=t[1])return i[1]}else{if(e>=t[0])return i[0];if(e<=t[1])return i[1]}else{if(e===t[0])return i[0];if(e===t[1])return i[1]}return(e-t[0])/r*o+i[0]}function _0x2dac65(e,t,i,n,r,o){var a;a=_0x805405([e,t,i]),r[3*n]=a[0],r[3*n+1]=a[1],r[3*n+2]=a[2]}function _0x14ac5b(e,t){var i=(t-e)/5,n=_0x3fdf9b(i),r=Math.pow(10,n),o=i/r;return i=(o<1.5?1:o<2.5?2:o<4?3:o<7?5:10)*r,n>=-20?+i.toFixed(n<0?-n:0):i}function _0x3fdf9b(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function _0x8dacda(e,t,i){var n=[];return n[0]=_0x48301f(Math.floor(e/i)*i),n[1]=_0x48301f(Math.ceil(t/i)*i),n}function _0x48301f(e,t,i){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),i?e:+e}var _0x3f7cb0=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2ac65b=_0x3f7cb0(void 0,(function(){return _0x2ac65b.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ac65b).search("(((.+)+)+)+$")}));_0x2ac65b();var _0xabe728={UNLOAD:0,LOADING:1,LOADED:2,PARSING:3,READY:4,LOST:5},_0x126748=new f$10,_0x4b9f18=25;function _0x83260a(e,t,i){var n=e.vertexAttributes[0],r=n.typedArray,o=new Float32Array(r.buffer,r.byteOffset,r.byteLength/4),a=n.componentsPerAttribute,s=e.verticesCount,l=new Float32Array(3*s),u=e.attrLocation;u.aRatio=Object.keys(u).length;for(var c=0;c<s;c++){var h=new a$11(o[c*a],o[c*a+1],o[c*a+2]),d=new a$11;c$1a.multiplyByPoint(t,h,d);var f=i$1g.fromCartesian(d),p=n$1d.toDegrees(f.longitude),_=n$1d.toDegrees(f.latitude),m=f.height,$=(p-i.left)/(i.right-i.left),g=(_-i.bottom)/(i.top-i.bottom),y=(m-i.minHeight)/(i.maxHeight-i.minHeight);l[3*c]=$,l[3*c+1]=g,l[3*c+2]=y}e.vertexAttributes.push({index:u.aRatio,typedArray:l,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1})}function _0x1bf60e(e){if(!t$$(e))throw new t$_("context is required.");this._context=e,this._gl=e._gl,this._type=ai$2.INSTANCED_LAYER,this._group={},this._visible=!0,this._picking=!1,this._clampToObject=!1,this._profile=!1,this._visibleViewport=4095,this._maxVisibleAltitude=Number.MAX_VALUE,this._maxVisibleDistance=Number.MAX_VALUE,this._minVisibleAltitude=0,this._minVisibleDistance=0,this._filterMode=_0x2b4bc7.DISTANCE_FROM_EYE_POINT,this._filterPixel=0,null!==e.s3tc?this._supportCompressType=1:null!==e.pvrtc?this._supportCompressType=2:null!==e.etc1&&(this._supportCompressType=3),this._isOverLay=!1,this._spatialQueryEnable=!1,this._sqTextures=[],this._sqMode=k$p.Disjoint,this._allColorCommand=[],this._shadowType=_0x3df1e1.NONE,this._needToRender=!0,this._addedEvent=new o$15,this._volume=void 0,this._PBRMaterialParams={},this._pbrParameter=We$a.NONE,this._mixColorType=_0x28ce18.MIX,_0xb658ed.S3MBTaskProcessor.scheduleTask({})}function _0x177c79(e,t,i){if(t$$(e._profileCommand)||e.createProfileCommand(t),e._profileCommand.derivedCommands={},i){var n=_0x43be0d.createClampObjectColorRenderState();e._profileCommand.renderState=p$1a.fromCache(n),e._profileCommand.pass=we$l.ClampObject,t$$(e._stencilCommand)||e.createClampCommand()}else e._profileCommand.renderState=p$1a.fromCache({cull:{enabled:group.cullEnabled,face:group.cullFace},depthTest:{enabled:!0},blending:Ee$s.ALPHA_BLEND}),e.removeProgramDefine(!0,!0,"ClampObject",!0)}function _0x3171c4(e,t){var i=e._group[t],n=e.customRequestHeaders,r=i.state;if(_0xabe728.UNLOAD==r){var o=m$I(t,(function(e){return u$S(e,n)}));t$$(o)&&(i.state=_0xabe728.LOADING,o.then((function(e){i._arrayBuffer=e,i.state=_0xabe728.LOADED}),(function(e){i.state=_0xabe728.LOST})))}_0xabe728.LOADED==r&&(t$$(i._arrayBuffer)?_0x2ea47d(e,i,i._arrayBuffer):t$$(i._threedmodeling)&&_0x473511(e,i._threedmodeling,i))}function _0x585c55(e){return e._shadowType==_0x3df1e1.SELECTION||e._shadowType==_0x3df1e1.ALL}function _0x34c63b(e,t){var i=e.instances.length,n=e.renderEntities;if(n&&!(n.length<1)&&0!==i){var r=e.instances.values[0];if(t$$(r)){var o=t$$(r.localTransform)?_0x4b9f18+8:_0x4b9f18,a=e.oriCenter,s=e.oriRadius;e.instanceBuffer&&e.instanceBuffer.destroy();for(var l=new Float32Array(i*o),u=0;u<i;u++){(m=e.instances.values[u]).index=u,_0x363391(l,m,u*o)}e.instanceBuffer=u$Y.createVertexBuffer({context:t,typedArray:l,usage:A$13.STATIC_DRAW}),e.instanceBuffer.vertexArrayDestroyable=!1;u=0;for(var c=n.length;u<c;u++){var h=n[u],d=h._colorCommand;d.vertexArray.destroy();for(var f=0;f<h.attributes.length;f++){var p=h.attributes[f];t$$(p.instanceDivisor)&&p.instanceDivisor>0&&(p.vertexBuffer=e.instanceBuffer)}d.vertexArray=new x$18({context:t,attributes:h.attributes,indexBuffer:h.indexBuffer}),d.instanceCount=i;for(var _=0;_<i;_++){var m;if((m=e.instances.values[_]).index=_,m.oriCenter=a,m.oriRadius=s,!t$$(m.boundingSphere)){m.boundingSphere=new c$19;var $=a$11.maximumComponent(m.scale);m.boundingSphere.radius=s*$;var g=m$13.eastNorthUpToFixedFrame(m.position,n$1c.WGS84,new c$1a);c$1a.multiplyByPoint(g,a,m.boundingSphere.center)}}}e.instanceCount=i,e.dirty=!1}}}function _0x363391(e,t,i){var n=a$11.clone(t._offsetPosition),r=t._quaternion;if(t._mode===b$1d.COLUMBUS_VIEW){var o=r$W.fromRotationY(-Math.PI/2),a=a$U.fromRotationMatrix(o);a$U.multiply(r,a,r)}var s=t._scale,l=t$R.fromCartesian(n),u=t.visible?l.high:a$11.ZERO,c=t.visible?l.low:a$11.ZERO,h=t._color,d=t._pickColor,f=t._offset,p=t.oriRadius,_=t.localTranslation,m=t.localQuaternion,$=0;e[i+$++]=u.x,e[i+$++]=u.y,e[i+$++]=u.z,e[i+$++]=c.x,e[i+$++]=c.y,e[i+$++]=c.z,e[i+$++]=r.x,e[i+$++]=r.y,e[i+$++]=r.z,e[i+$++]=r.w,e[i+$++]=s.x,e[i+$++]=s.y,e[i+$++]=s.z,e[i+$++]=p,e[i+$++]=h.red,e[i+$++]=h.green,e[i+$++]=h.blue,e[i+$++]=h.alpha,e[i+$++]=d.x,e[i+$++]=d.y,e[i+$++]=d.z,e[i+$++]=d.w,e[i+$++]=f.x,e[i+$++]=f.y,e[i+$++]=f.z,t$$(_)&&(e[i+$++]=_.x,e[i+$++]=_.y,e[i+$++]=_.z,e[i+$++]=1),t$$(m)&&(e[i+$++]=m.x,e[i+$++]=m.y,e[i+$++]=m.z,e[i+$++]=m.w)}function _0x344a36(e){var t=(e=e||{}).arrIndexPackage,i=e.vertexPackage,n=e.mapPass;if(!(e.arrIndexPackage&&e.vertexPackage&&e.collection&&e.mapPass))throw new t$_("gl texture indexes vertexes collection is required to create RenderEntityPagelod");this._arrIndexPackage=t,this._vertexPackage=i,this._collection=e.collection,this._attributeLocations={},this._initialize=!1,this._matModel=e$1Y(e.matModel,c$1a.IDENTITY),this._mapPass=n,this._colorCommand=void 0,this._stencilCommand=void 0,this._profileCommand=void 0,this._spatialQueryCommand=void 0,this._boundingVolume=e.boundingVolume,this._ownerGroup=e.ownerGroup}function _0x473511(e,t,i){i.state=_0xabe728.PARSING;for(var n=new a$11,r=[],o=Number.MAX_VALUE,a=Number.MIN_VALUE,s=0;s<t.vertexCount;s++)a$11.fromArray(t.positionAttr,3*s,n),r.push(a$11.clone(n)),o=Math.min(o,n.y),a=Math.max(a,n.y);var l=c$1a.clone(c$1a.IDENTITY,new c$1a),u=c$19.fromPoints(r,new c$19);c$19.transform(u,l,u);var c=new _0x344a36({vertexPackage:{vertexAttributes:[{index:0,typedArray:t.positionAttr,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1},{index:1,typedArray:t.colorAttr,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:0},{index:2,typedArray:t.normalAttr,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:0}],attrLocation:{aPosition:0,aColor:1,aNormal:2},instanceCount:0,instanceMode:0,instanceIndex:-1,verticesCount:t.vertexCount},arrIndexPackage:[{indicesTypedArray:t.indices,indexType:0,primitiveType:4}],mapPass:{},boundingVolume:u,collection:e,ownerGroup:i,matModel:l});c.initialize(e),i.renderEntities.push(c),i._threedmodeling=void 0,i.state=_0xabe728.READY,i.ready=!0,e._addedEvent.raiseEvent(i.url)}function _0x2407ef(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function _0x18ef60(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function _0x2ea47d(e,t,i){var n,r={buffer:i,supportCompressType:e._supportCompressType},o=!1;if(t.url.endsWith("s3mb")||/\.(x|X|dae|DAE|osgb)$/.test(t.url)){if(/\.(x|X|dae|DAE|osgb)$/.test(t.url)&&(r.isOSGB=!0),r.suffix=t.url.substring(t.url.lastIndexOf(".")+1),o=!0,_0xb658ed.init||_0xb658ed.initWebAssembly(),!_0xb658ed.taskProcessorReady)return;n=_0xb658ed.S3MBTaskProcessor.scheduleTask(r,[i])}else n=_0xb658ed.S3MTaskProcessor.scheduleTask(r,[i]);t$$(n)?(t.state=_0xabe728.PARSING,t._arrayBuffer=void 0,n.then((function(i){i.result?(o?_0x59d04d(i,t,e):_0x236ad9(i,t,e),t.ready=!0,t.dirty=!1,t.state=_0xabe728.READY):t.state=_0xabe728.UNLOAD})).otherwise((function(e){console.log(e)})).then((function(){e._addedEvent.raiseEvent(t.url)}))):t.state=_0xabe728.LOADED}function _0x59d04d(e,t,i){i._gl;var n=i._context,r=e.groupNode,o=e.geoPackage,a=e.matrials.material,s={},l=0,u=0,c=c$18.defer();a.map((function(i){var r=i.material,o=r.id,a=new _0x42161c({});s[o]=a,a.createCommonParamter(r),a.createPBRParamter(r);var h=r.textureunitstates;l+=h.length;for(var d=0;d<h.length;d++){var f=h[d].textureunitstate,p=f.id,_=0===f.addressmode.u?j$13.REPEAT:j$13.CLAMP_TO_EDGE,m=0===f.addressmode.v?j$13.REPEAT:j$13.CLAMP_TO_EDGE;a._texMatrix=c$1a.unpack(f.texmodmatrix);var $=e.texturePackage[p],g=p;if(t$$($))(!n$1d.isPowerOfTwo($.width)||!n$1d.isPowerOfTwo($.height))&&(_=j$13.CLAMP_TO_EDGE,m=j$13.CLAMP_TO_EDGE);if(t$$($)||!p.endsWith("jpg")&&!p.endsWith("png")){if(t$$($)&&$.width>0&&$.height>0&&$.imageBuffer.length>0){var y=De$e.CreateTexture(g,n,$.width,$.height,$.nFormat,$.compressType,$.imageBuffer,!1,_,m),v=p.indexOf("PBRMaterialParam")>-1,x=a._emissiveTextureIndex===d,b=a._normalTextureIndex===d,S=a._metallicRoughnessTextureIndex===d,w=a._occlusionTextureIndex===d;v?(a._usePBRTextureBatch=!0,a.pbrParamTexture=y):x?a.emissiveTexture=y:b?a.normalTexture=y:S?a.metallicRoughnessTexture=y:w?a.occlusionTexture=y:a._textures.push(y)}c.resolve()}else{var C=t.url.substring(0,t.url.lastIndexOf("/")+1)+p;u$S(C).then((function(e){var t=C.endsWith("jpg")?"jpg":"png";a.createJPGPNG(g,n,d,e,_,m,t).then((function(e){++u==l&&c.resolve()})).otherwise((function(){++u==l&&c.resolve()}))})).otherwise((function(){++u==l&&c.resolve()}))}}c.resolve()})),c.promise.then((function(){var n=r.pageLods,a=[],l=new c$19;n.forEach((e=>{e.boundingSphere&&a.push(e.boundingSphere)})),c$19.fromBoundingSpheres(a,l);for(var u=0;u<n.length;u++){n[u].geodes.map((function(n){for(var r=n.matrix,a=n.skeletonNames,u=0;u<t.instances.length;u++){var c=t.instances.values[u];c.oriCenter=a$11.clone(l.center),c.oriRadius=l.radius,t$$(t.oriCenter)||(t.oriCenter=c.oriCenter,t.oriRadius=c.oriRadius);var h=c.position,d=m$13.eastNorthUpToFixedFrame(h,n$1c.WGS84,new c$1a),f=c$19.transform(l,d,new c$19);c.boundingSphere=f}for(var p=0;p<a.length;p++){for(var _=a[p],m=o[_],$=m.vertexPackage,g=m.arrIndexPackage,y={},v=0;v<g.length;v++){var x=g[v];if(t$$(x)){var b=x.materialCode,S=s[b];y[b]=S}}var w=new _0x344a36({vertexPackage:$,arrIndexPackage:g,version:e.version,mapPass:y,collection:i,ownerGroup:t,matModel:r});w.initialize(i),t.renderEntities.push(w)}}))}}))}function _0x236ad9(e,t,i){i._gl;for(var n=i._context,r=_0x126748.read(e.xmlDoc).firstChild,o=r.namespaceURI,a=_0x32ceaf(_0x490f59(r,"Material3Ds",o),"material",o),s={},l=0,u=a.length;l<u;l++){var c=a[l],h=_0x18eaa2(c,"name",o),d=new _0x42161c({});s[h]=d;var f=_0x490f59(c,"Ambient",o),p=_0x596733(f,"AmbientR",o),_=_0x596733(f,"AmbientG",o),m=_0x596733(f,"AmbientB",o),$=_0x596733(f,"AmbientA",o);d._ambientColor=new e$1z(p,_,m,$);var g=_0x490f59(c,"Diffuse",o);p=_0x596733(g,"DiffuseR",o),_=_0x596733(g,"DiffuseG",o),m=_0x596733(g,"DiffuseB",o),$=_0x596733(g,"DiffuseA",o),d._diffuseColor=new e$1z(p,_,m,$);var y=_0x490f59(c,"Specular",o);p=_0x596733(y,"SpecularR",o),_=_0x596733(y,"SpecularG",o),m=_0x596733(y,"SpecularB",o),$=_0x596733(y,"SpecularA",o),d._specularColor=new e$1z(p,_,m,$);var v=_0x596733(c,"Shininess",o);d._shininess=v,_0x490f59(c,"TransparentSorting",o),d._bTransparentSorting=_0x33a4ff(c,"TransparentSorting",o)||d._diffuseColor.alpha<1;var x=_0x490f59(c,"texture",o),b=_0x18eaa2(x,"name",o),S=_0x490f59(x,"AddressMode",o),w=_0x18eaa2(S,"u",o),C=_0x18eaa2(S,"v",o);w="TAM_WRAP"===w?j$13.REPEAT:j$13.CLAMP_TO_EDGE,C="TAM_WRAP"===C?j$13.REPEAT:j$13.CLAMP_TO_EDGE;var T=e.texturePackage[b];if(t$$(T)){b=n._id+"_"+b,(!n$1d.isPowerOfTwo(T.width)||!n$1d.isPowerOfTwo(T.height))&&(w=j$13.CLAMP_TO_EDGE,C=j$13.CLAMP_TO_EDGE);var P=De$e.CreateTexture(b,n,T.width,T.height,T.nFormat,T.compressType,T.imageBuffer,!1,w,C);d._textures.push(P),0===T.compressType&&(i._supportCompressType=0)}}var E=_0x564f88(_0x490f59(r,"PageLods",o),"Geode",o);for(l=0,u=E.length;l<u;l++){for(var A=[],L=E[l],M=_0x18eaa2(L,"GeoDeModMatrix",o).split(","),I=0;I<16;I++)M[I]=parseFloat(M[I]);M=c$1a.unpack(M,0);for(var O=_0x564f88(L,"GeoName",o),D=[],R=0,N=O.length;R<N;R++){var F=O[R].textContent.trim();-1===D.indexOf(F)&&D.push(F)}for(var B=new c$19,z=0;z<D.length;z++){if(t$$(Q=e.geoPackage[D[z]])){var G=_0x399166(ee=Q.vertexPackage,M);A.push(G)}}if(A.length>0){var k=c$19.fromBoundingSpheres(A,new c$19),U=!1;t.instances.length>0&&t$$(t.instances.values[0].localTransform)&&(c$19.transform(k,t.instances.values[0].localTransform,k),U=!0);for(var V=[],W=0;W<t.instances.length;W++){var H=t.instances.values[W];H.oriCenter=a$11.clone(k.center),H.oriRadius=k.radius,t$$(t.oriCenter)||(t.oriCenter=H.oriCenter,t.oriRadius=H.oriRadius);var Y=H.position,j=m$13.eastNorthUpToFixedFrame(Y,n$1c.WGS84,new c$1a),q=c$19.transform(k,j,new c$19),X=U?1:a$11.maximumComponent(H.scale);q.radius=q.radius*X,H.boundingSphere=q,V.push(q)}c$19.fromBoundingSpheres(V,B)}var K=new c$1a;if(t$$(i._volume)){var Z=t.instances.values[0]._offsetPosition,J=new e$1L;j=m$13.headingPitchRollToFixedFrame(Z,J,n$1c.WGS84,m$13.eastNorthUpToFixedFrame);K=c$1a.multiply(j,M,K),K=c$1a.multiplyByScale(K,t.instances.values[0].scale,K)}for(N=0;N<D.length;N++){var Q;if(t$$(Q=e.geoPackage[D[N]])){var ee=Q.vertexPackage,te=Q.arrIndexPackage,ie={};for(var ne in te){var re=te[ne];if(t$$(re)){d=s[h=re.materialCode];ie[h]=d}}t$$(i._volume)&&_0x83260a(ee,K,i._volume._volBounds);var oe=new _0x344a36({vertexPackage:ee,arrIndexPackage:te,version:e.version,mapPass:ie,boundingVolume:B,collection:i,ownerGroup:t,matModel:M});oe.initialize(i),t.renderEntities.push(oe)}}}}function _0x399166(e,t){for(var i=[],n=new c$19,r=new a$11,o=(new a$11,e.vertexAttributes[0]),a=o.componentsPerAttribute,s=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4),l=0;l<e.verticesCount;l++)a$11.fromArray(s,a*l,r),i.push(a$11.clone(r));return c$19.fromPoints(i,n),i.length=0,c$19.transform(n,t,n),n}function _0x490f59(e,t,i){if(t$$(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(t$$(i)){if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}else if(a.localName===t)return a}}function _0x564f88(e,t,i){if(t$$(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];t$$(i)?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}}function _0x32ceaf(e,t,i){if(!t$$(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];t$$(i)?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}function _0x596733(e,t,i){var n=_0x490f59(e,t,i);if(t$$(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function _0x18eaa2(e,t,i){var n=_0x490f59(e,t,i);if(t$$(n))return n.textContent.trim()}function _0x33a4ff(e,t,i){var n=_0x490f59(e,t,i);if(t$$(n)){var r=n.textContent.trim();return"1"===r||/^true$/i.test(r)}}function _0x5a861a(e,t,i,n,r){var o=t$$(r)?_0x4b9f18+8:_0x4b9f18,a=C$12.getSizeInBytes(C$12.FLOAT),s=0;t.aPosHigh=i++,e.push({index:t.aPosHigh,vertexBuffer:n.instanceBuffer,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:s,strideInBytes:a*o,instanceDivisor:1}),s+=3,t.aPosLow=i++,e.push({index:t.aPosLow,vertexBuffer:n.instanceBuffer,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=3,t.aQuaternion=i++,e.push({index:t.aQuaternion,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4,t.aScaleAndRadius=i++,e.push({index:t.aScaleAndRadius,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4,t.aColor2=i++,e.push({index:t.aColor2,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4,t.aPickColor=i++,e.push({index:t.aPickColor,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4,t.aOffset=i++,e.push({index:t.aOffset,vertexBuffer:n.instanceBuffer,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=3,t$$(r)&&(t.aLocalTranslation=i++,e.push({index:t.aLocalTranslation,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4,t.aLocalQuaternion=i++,e.push({index:t.aLocalQuaternion,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4)}function _0x5ce0b0(e,t,i){var n=t.layer,r={uTexture:function(){return t.texture||n._context._defaultTexture},uHasNormal:function(){return t.hasNormal},uAmbientColor:function(){return n._mixColorType===_0x28ce18.REPLACE?e$1z.WHITE:t.ambientColor},uDiffuseColor:function(){return n._mixColorType===_0x28ce18.REPLACE?e$1z.WHITE:t.diffuseColor},uSpecularColor:function(){return t.specularColor},uShininess:function(){return t.shininess},uPicking:function(){return t.layer._picking},uGeoMat:function(){return t.geoMat},uRangeMode:function(){return n.filterMode},uVisibleDistance:function(){return new r$T(n.maxVisibleDistance,n.minVisibleDistance)},uFilterPixel:function(){return n.filterPixel},uFillColor:function(){return t.diffuseColor},uVolumeTexture:function(){return n._volume._volTexture},width:function(){return n._volume._volImageBuffer.nWidth},height:function(){return n._volume._volImageBuffer.nHeight},depth:function(){return n._volume._volImageBuffer.nDepth},sideBlockCount:function(){return n._volume._volImageBuffer.nSideBlockCount},blockLength:function(){return n._volume._volImageBuffer.nBlockLength},texLength:function(){return n._volume._volImageBuffer.nLength},uFilterMode:function(){var e=0;return t$$(n._volume.hypsometricSetting)&&n._volume.hypsometricSetting.filterMode===J$O.FilterMode.NEAREST&&(e=1),e},uMixColorType:function(){return n._mixColorType},uDataFloor:function(){return t$$(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.ColorTableMinKey:0},uDataCeil:function(){return t$$(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.ColorTableMaxKey:0},uVolumeType:function(){return t$$(n._volume.hypsometricSetting)&&n._volume.hypsometricSetting.filterMode===J$O.FilterMode.LINEAR?0:1},uHypOpacity:function(){return t$$(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.Opacity:1},uHypContourInterval:function(){return t$$(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.LineInterval:100},uHypLineColor:function(){var e=new a$10(0,1,1,1);return t$$(n._volume.hypsometricSetting)&&(e.x=n._volume.hypsometricSetting.LineColor.red,e.y=n._volume.hypsometricSetting.LineColor.green,e.z=n._volume.hypsometricSetting.LineColor.blue,e.w=n._volume.hypsometricSetting.LineColor.alpha),e},uHypContourFillMode:function(){var e=1;if(t$$(n._volume.hypsometricSetting))switch(n._volume.hypsometricSetting.DisplayMode){case J$O.DisplayMode.NONE:e=0;break;case J$O.DisplayMode.FACE:e=1;break;case J$O.DisplayMode.LINE:e=2;break;case J$O.DisplayMode.FACE_AND_LINE:e=3}return e},uHypFloor:function(){return t$$(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.ColorTableMinKey:0},uHypCeil:function(){return t$$(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.ColorTableMaxKey:0},uHypMaxVisibleValue:function(){return t$$(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.MaxVisibleValue:0},uHypMinVisibleValue:function(){return t$$(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.MinVisibleValue:0},uNoValueColor:function(){return t$$(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.noValueColor:e$1z.WHITE},uHypsometricVisible:function(){return 1},uHypHasAnalysisRegion:function(){return 0},uHypsometricRenderTexture:function(){return 0},uHypsometricTexture:function(){return n._volume._hypsometricTexture},uBaseColorFactor:function(){return t$$(i._baseColor)?i._baseColor:n._PBRMaterialParams[t.groupName].baseColorFactor},uBaseColorTextureIndex:function(){return i._baseColorTextureIndex>-1?i._baseColorTextureIndex:n._PBRMaterialParams[t.groupName].baseColorTextureIndex},uMetallicFactor:function(){return t$$(i._metallicFactor)?i._metallicFactor:n._PBRMaterialParams[t.groupName].metallic},uRoughnessFactor:function(){return t$$(i._roughnessFactor)?i._roughnessFactor:n._PBRMaterialParams[t.groupName].roughness},uEmissiveFactor:function(){return t$$(i._emissiveFactor)?i._emissiveFactor:n._PBRMaterialParams[t.groupName].emissionFactor},uEmissionTexture:function(){return t$$(i.emissiveTexture)&&i._emissiveTextureIndex>-1?i.emissiveTexture:i._textures[i._emissiveTextureIndex]},uEmissiveUVOffsetAndTiling:function(){var e=i._emissiveTextureMotion,t=new a$10,n=performance.now()/1e3;if(e._offsetPeriod>0){var r=n%e._offsetPeriod;t.x=r*e._offsetSpeedU,t.y=r*e._offsetSpeedV}else t.x=0,t.y=0;if(e._tilingPeriod>0){var o=n%e._tilingPeriod;t.z=1+o*e._tilingSpeedU,t.w=1+o*e._tilingSpeedV}else t.z=1,t.w=1;return t},uBaseTexture:function(){return t$$(i.baseColorTexture)&&i._baseColorTextureIndex>-1?i.baseColorTexture:n._PBRMaterialParams[t.groupName].baseTexture},uNormalTexture:function(){return t$$(i.normalTexture)&&i._normalTextureIndex>-1?i.normalTexture:n._PBRMaterialParams[t.groupName].normalTexture},uMetallicRoughnessTexture:function(){return t$$(i.metallicRoughnessTexture)&&i._metallicRoughnessTextureIndex>-1?i.metallicRoughnessTexture:n._PBRMaterialParams[t.groupName].metallicRoughnessTexture},uOcclusionTexture:function(){return t$$(i.occlusionTexture)&&i._occlusionTextureIndex>-1?i.occlusionTexture:n._PBRMaterialParams[t.groupName].occlusionTexture},uEnvMapIntensity:function(){return n._envMapIntensity}};r=s$1n(r,i.createPBRUniformMap()),r=s$1n(r,n._frameState.lightSource.createUniformMap()),e.uniformMap=r}function _0x46bca4(e,t,i,n){var r=t$X.createIfNeeded(t).fetchImage().then((function(t){var r=new P$S({context:e,source:t,sampler:new a$Q({wrapS:j$13.REPEAT,wrapT:j$13.REPEAT,minificationFilter:tt$l.LINEAR_MIPMAP_LINEAR,magnificationFilter:tt$l.LINEAR})});!n$1d.isPowerOfTwo(r.width)||!n$1d.isPowerOfTwo(r.height)||r.generateMipmap(D$12.NICEST),i[n]=r})).otherwise((function(){i[n]=void 0}));i[n]=r}function _0x4b814e(e,t){if(t$$(e._group[t])&&e._group[t].renderEntities.length>0)for(var i=e._group[t].renderEntities,n=0;n<i.length;n++)t$$(i[n]._colorCommand)&&(t$$(e._PBRMaterialParams[t])&&t$$(e._PBRMaterialParams[t].roughness)?(i[n].appendProgramDefine(!1,!0,H$r.BRDF,!1),e._PBRMaterialParams[t].baseColorTextureIndex>-1&&t$$(e._PBRMaterialParams[t].baseTexture)&&i[n].appendProgramDefine(!1,!0,H$r.HAS_BASE_TEXTURE,!1),e._PBRMaterialParams[t].normalTextureIndex>-1&&t$$(e._PBRMaterialParams[t].normalTexture)&&i[n].appendProgramDefine(!1,!0,H$r.HAS_NORMAL_TEXTURE,!1),e._PBRMaterialParams[t].emissionTextureIndex>-1&&i[n].appendProgramDefine(!1,!0,H$r.HAS_EMISSIVE_TEXTURE,!1),t$$(e._frameState.specularEnvironmentMaps)&&i[n].appendProgramDefine(!1,!0,H$r.IBL,!1)):(i[n].removeProgramDefine(!1,!0,H$r.BRDF,!1),i[n].removeProgramDefine(!1,!0,H$r.HAS_BASE_TEXTURE,!1),i[n].removeProgramDefine(!1,!0,H$r.HAS_NORMAL_TEXTURE,!1),i[n].removeProgramDefine(!1,!0,H$r.HAS_EMISSIVE_TEXTURE,!1),i[n].removeProgramDefine(!1,!0,H$r.IBL,!1)))}Object.defineProperties(_0x1bf60e.prototype,{type:{get:function(){return this._type}},group:{get:function(){return this._group}},visible:{get:function(){return this._visible},set:function(e){n$1e.typeOf.bool("value",e),this._visible=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){n$1e.typeOf.number("maxVisibleAltitude",e),this._maxVisibleAltitude=e}},maxVisibleDistance:{get:function(){return this._maxVisibleDistance},set:function(e){n$1e.typeOf.number("maxVisibleDistance",e),this._maxVisibleDistance=e}},minVisibleDistance:{get:function(){return this._minVisibleDistance},set:function(e){n$1e.typeOf.number("minVisibleDistance",e),this._minVisibleDistance=e}},minVisibleAltitude:{get:function(){return this._minVisibleAltitude},set:function(e){n$1e.typeOf.number("minVisibleAltitude",e),this._minVisibleAltitude=e}},filterMode:{get:function(){return this._filterMode},set:function(e){n$1e.typeOf.number("filterMode",e),this._filterMode=e}},filterPixel:{get:function(){return this._filterPixel},set:function(e){n$1e.typeOf.number("filterPixel",e),this._filterPixel=e}},isOverLay:{get:function(){return this._isOverLay},set:function(e){n$1e.typeOf.bool("value",e),this._isOverLay=e}},clampToObject:{get:function(){return this._clampToObject},set:function(e){if(n$1e.typeOf.bool("value",e),this._clampToObject!==e){this._clampToObject=e;var t=this._group;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];if(!n.ready)continue;for(var r=0,o=n.renderEntities.length;r<o;r++){var a=n.renderEntities[r];this._profile?_0x177c79(a,this,e):t$$(a._colorCommand)&&(a._colorCommand.derivedCommands={},a.createColorRenderState(n,e),e?(a._colorCommand.pass=we$l.ClampObject,t$$(a._stencilCommand)||a.createClampCommand(),a.appendProgramDefine(!0,!0,"ClampObject",!1)):a.removeProgramDefine(!0,!0,"ClampObject",!1))}}}}},shadowType:{get:function(){return this._shadowType},set:function(e){this._shadowType!==e&&(this._shadowType=e,this._updateShadow(this))}},addedEvent:{get:function(){return this._addedEvent}},mixColorType:{get:function(){return this._mixColorType},set:function(e){this._mixColorType!==e&&(this._mixColorType=e)}},customRequestHeaders:{get:function(){return this._customRequestHeaders},set:function(e){this._customRequestHeaders!==e&&(this._customRequestHeaders=e)}}}),_0x1bf60e.prototype.add=function(e,t,i,n){n$1e.defined("url",e),n$1e.typeOf.string("url",e),n$1e.defined("attrs",t),Array.isArray(t)||(t=[t]),t$$(this._group[e])||(this._group[e]={instances:new e$1F,ready:!1,state:t$$(i)?_0xabe728.LOADED:_0xabe728.UNLOAD,instanceCount:0,instanceBuffer:void 0,renderEntities:[],cullEnabled:!1,cullFace:k$F.BACK,oriCenter:void 0,oriRadius:void 0,dirty:!1,url:e});for(var r=this._group[e],o=this._context,a=0,s=t.length;a<s;a++){var l=t[a],u=e$1Y(l.id,r.instances.length);if(r.instances.contains(u))console.log("id "+u+" exist");else{l.sceneMode=this._context._us._mode;var c=new _0x10007a(o,u,r,l);r.instances.set(u,c)}}if(t$$(i))if(n=e$1Y(n,!0),i instanceof Blob){var h=new FileReader,d=this;h.addEventListener("load",(function(){if(n){var t=new Uint8Array(h.result).buffer;d._group[e]._arrayBuffer=t}else d._group[e]._arrayBuffer=h.result})),h.addEventListener("error",(function(){})),h.readAsArrayBuffer(i)}else if(i instanceof ArrayBuffer)if(n){var f=i;this._group[e]._arrayBuffer=f}else this._group[e]._arrayBuffer=i;else{var p=_0x4722cc.getDataShape(i);r=_0x4722cc.updateSurfaceMesh(i,p,!0);this._group[e]._threedmodeling=r}r.dirty=!0},_0x1bf60e.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$_("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},_0x1bf60e.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$_("the index is 0~8");return 1<<e&this._visibleViewport},_0x1bf60e.prototype.removeCollection=function(e){n$1e.defined("removeCollection url",e);var t=this._group[e];if(!t$$(t))return!1;for(var i=0,n=t.renderEntities.length;i<n;i++)t.renderEntities[i].destroy();return t.renderEntities.length=0,t.instances.removeAll(),this._group[e]=null,delete this._group[e],!0},_0x1bf60e.prototype.getInstance=function(e,t){n$1e.defined("S3MInstanceCollection getInstance url",e),n$1e.defined("S3MInstanceCollection getInstance id",t);var i=this._group[e];if(t$$(i))return i.instances.get(t)},_0x1bf60e.prototype.removeInstance=function(e,t){n$1e.defined("removeInstance url",e),n$1e.defined("removeInstance ids",t),Array.isArray(t)||(t=[t]);var i=this._group[e];if(!t$$(i))return!1;for(var n,r=0,o=t.length;r<o;r++){var a=t[r];t$$(n=i.instances.get(a))&&(n.updateColor(e$1z.WHITE.withAlpha(0),n.id),n.isDeleted=!0,i.instances.remove(a),n=null,this._group[e].dirty=!0)}return!0},_0x1bf60e.prototype.setCullEnabled=function(e,t){n$1e.typeOf.string("S3MInstanceCollection setCullEnabled url",e),t=e$1Y(t,k$F.BACK);var i=this._group[e];if(t$$(i)&&(!i.cullEnabled||i.cullFace!==t)&&(i.cullEnabled=!0,i.cullFace=t,i.ready))for(var n=0,r=i.renderEntities.length;n<r;n++){var o=i.renderEntities[n],a=p$1a.getState(o._colorCommand.renderState);a.cull.enabled=!0,a.cull.face=t,o._colorCommand.renderState=p$1a.fromCache(a)}},_0x1bf60e.prototype.setUnSelected=function(){var e=this._group;if(t$$(e))for(var t in e){var i=e[t];if(t$$(i.instances)&&!(i.instances.length<1))for(var n=0,r=i.instances.length;n<r;n++){i.instances.values[n].setUnSelected()}}},_0x1bf60e.prototype.update=function(e){if(e.multiViewportIndex>-1&&!this.getVisibleInViewport(e.multiViewportIndex))return;if(this._visible){if(t$$(this._volume)){if(!this._volume._ready)return;this._volume.loadTexture(this._context)}var t=e.camera;if(!(t.positionCartographic.height>this._maxVisibleAltitude||t.positionCartographic.height<this._minVisibleAltitude)){this._frameState=e;var i=e.commandList,n=this._group,r=e.passes;for(var o in this._picking=r.pick,this._allColorCommand=[],n){var a=n[o];if(_0x3171c4(this,o),a.ready){a.dirty&&_0x34c63b(a,this._context);for(var s=[],l=!1,u=0;u<a.instances.length;u++){var c=a.instances.values[u];0===u&&(l=c.color.alpha<1);var h=c.boundingSphere;s.push(h)}for(var d=c$19.fromBoundingSpheres(s,new c$19),f=0,p=a.renderEntities.length;f<p;f++){var _=a.renderEntities[f];if(this._clampToObject&&this._profile){if(e._fboState.frameBufferType===B$y.CLAMP)_._stencilCommand.boundingVolume=d,i.push(_._stencilCommand),_._profileCommand.boundingVolume=d,_._profileCommand.instanceCount=a.instanceCount,_._profileCommand.pass=we$l.ClampObject,i.push(_._profileCommand);else if(this._spatialQueryEnable){t$$(_._spatialQueryCommand)||_.createSpatialQueryCommand(this);var m=3===this._sqTextures.length?_._spatialQueryCommand:_._colorCommand;m.boundingVolume=d,m.instanceCount=a.instanceCount,m.pass=this._isOverLay?we$l.OVERLAY_AGAINST_DEPTH:l?we$l.TRANSLUCENT:we$l.OPAQUE,e._fboState.enabled||i.push(m)}}else this._clampToObject&&(_._stencilCommand.boundingVolume=d,i.push(_._stencilCommand)),_._colorCommand.boundingVolume=d,_._colorCommand.instanceCount=a.instanceCount,_._colorCommand.pass=this._isOverLay?we$l.OVERLAY_AGAINST_DEPTH:this._clampToObject?we$l.ClampObject:l?we$l.TRANSLUCENT:we$l.OPAQUE,this._needToRender&&i.push(_._colorCommand),this._allColorCommand.push(_._colorCommand)}}}}}},_0x1bf60e.prototype.isDestroyed=function(){return!1},_0x1bf60e.prototype._updateShadow=function(e){var t=_0x585c55(e),i=e._group;for(var n in i){var r=i[n];if(r.ready)for(var o=0,a=r.renderEntities.length;o<a;o++){var s=r.renderEntities[o];s._colorCommand.castShadows=t,s._colorCommand.receiveShadows=t}}},_0x1bf60e.prototype.destroy=function(){for(var e in this._group){var t=this._group[e];if(t.ready){for(var i=0;i<t.renderEntities.length;i++){var n=t.renderEntities[i]._colorCommand;if(t$$(n.vertexArray)&&!n.vertexArray.isDestroyed()){n.vertexArray._indexBuffer.vertexArrayDestroyable=!0;for(var r=0;r<n.vertexArray._attributes.length;r++){n.vertexArray._attributes[r].vertexBuffer.vertexArrayDestroyable=!0}n.vertexArray=n.vertexArray.destroy()}n.shaderProgram=n.shaderProgram&&n.shaderProgram.destroy()}t.instanceBuffer=t.instanceBuffer&&!t.instanceBuffer.isDestroyed()&&t.instanceBuffer.destroy()}}return this._group=void 0,this._allColorCommand=[],s$1e(this)},_0x344a36.prototype.initialize=function(e){this._initialize||(this.createCommand(e),this._initialize=!0)},_0x344a36.prototype.createVertexData=function(e){for(var t=this._vertexPackage.vertexAttributes,i=0,n=t.length;i<n;i++){var r=t[i];!t$$(r.typedArray)||(r.vertexBuffer=u$Y.createVertexBuffer({context:e,typedArray:r.typedArray,usage:A$13.STATIC_DRAW}),r.vertexBuffer.vertexArrayDestroyable=!1,r.typedArray=null,delete r.typedArray)}if(!t$$(this._ownerGroup.instanceBuffer)){var o=this._ownerGroup.instances,a=void 0;o.length>0&&(a=o.values[0].localTransform);var s=o.length;this._ownerGroup.instanceCount=s;var l=t$$(a)?_0x4b9f18+8:_0x4b9f18,u=new Float32Array(s*l);for(i=0;i<s;i++){var c=o.values[i];c.index=i,_0x363391(u,c,i*l)}this._ownerGroup.instanceBuffer=u$Y.createVertexBuffer({context:e,typedArray:u,usage:A$13.STATIC_DRAW})}this._attributeLocations=this._vertexPackage.attrLocation;var h=Object.keys(this._attributeLocations).length;return _0x5a861a(t,this._attributeLocations,h,this._ownerGroup,a),t},_0x344a36.prototype.createCommand=function(e){var t=e._context,i=this.createVertexData(t),n=we$l.S3MTiles+2;if(t$$(this._arrIndexPackage)&&t$$(this._arrIndexPackage[0])){var r=this._arrIndexPackage[0],o=this._vertexPackage.verticesCount,a=fe$u.UNSIGNED_SHORT;(1===r.indexType||o>=n$1d.SIXTY_FOUR_KILOBYTES)&&t.elementIndexUint&&(a=fe$u.UNSIGNED_INT);var s=u$Y.createIndexBuffer({context:t,typedArray:r.indicesTypedArray,usage:A$13.STATIC_DRAW,indexDatatype:a});s.vertexArrayDestroyable=!1,this.indexBuffer=s,this.attributes=i;var l=this._mapPass[r.materialCode]||_0x42161c.Default;this._arrIndexPackage[0]=null,!0===l._bTransparentSorting&&(n=we$l.S3MTiles+3);var u=H$11.TRIANGLES;switch(r.primitiveType){case 1:u=H$11.POINTS;break;case 2:u=H$11.LINES;break;case 4:u=H$11.TRIANGLES}n=e._isOverLay?we$l.OVERLAY_AGAINST_DEPTH:n;var c=new s$1d({primitiveType:u,boundingVolume:this._boundingVolume,pass:n,owner:this,cull:!0});e._shadowType===_0x3df1e1.ALL||e._shadowType===_0x3df1e1.SELECTION?(c.castShadows=!0,c.receiveShadows=!0):(c.castShadows=!1,c.receiveShadows=!1),c.pickId="vPickColor",c.instanceCount=this._ownerGroup.instances.length,c.vertexArray=new x$18({context:t,attributes:i,indexBuffer:s});var h=new a$O({name:"S3MInstanceCollectionVertex",sources:[_0x2b4a17]}),d=new a$O({name:"S3ModelFP",sources:[_0x29dd65]});if(0===this._collection._supportCompressType&&d.defines.push("FLIP_Y"),t$$(this._attributeLocations.aColor)&&h.defines.push("VertexColor"),l._textures.length>0&&t$$(this._attributeLocations.aTexCoord0)&&d.defines.push("TEXTURE"),t$$(this._attributeLocations.aNormal)&&(h.defines.push(H$r.HAS_NORMAL),d.defines.push(H$r.HAS_NORMAL)),t$$(e._volume)&&(h.defines.push(H$r.VOLUME),d.defines.push(H$r.VOLUME),e._volume.hypsometricSetting.filterMode===J$O.FilterMode.NEAREST&&(h.defines.push(H$r.VOLUME2),d.defines.push(H$r.VOLUME2))),this._collection.clampToObject&&(h.defines.push("ClampObject"),d.defines.push("ClampObject")),t$$(e._frameState.lightSource)){var f=e._frameState.lightSource.directionalLight;h.defines.push(H$r.DIR_LIGHTS+f.length),d.defines.push(H$r.DIR_LIGHTS+f.length);var p=e._frameState.lightSource.pointLight;h.defines.push(H$r.POINT_LIGHTS+p.length),d.defines.push(H$r.POINT_LIGHTS+p.length);var _=e._frameState.lightSource.spotLight;h.defines.push(H$r.SPOT_LIGHTS+_.length),d.defines.push(H$r.SPOT_LIGHTS+_.length);var m=e._frameState.lightSource.hemisphereLight;d.defines.push(H$r.HEMISPHERE_LIGHTS+m.length)}this._ownerGroup.instances.length>0&&t$$(this._ownerGroup.instances.values[0].localTransform)&&h.defines.push("LocalTransform");var $=this._ownerGroup.url;(l._usePBR||t$$(e._PBRMaterialParams[$])&&e._PBRMaterialParams[$].roughness>0)&&(d.defines.push(H$r.BRDF),(l.baseColorTexture||e._PBRMaterialParams[$]&&e._PBRMaterialParams[$].baseColorTextureIndex>-1&&t$$(e._PBRMaterialParams[$].baseTexture))&&d.defines.push(H$r.HAS_BASE_TEXTURE),(l.uNormalTexture||e._PBRMaterialParams[$]&&e._PBRMaterialParams[$].normalTextureIndex>-1&&t$$(e._PBRMaterialParams[$].normalTexture))&&d.defines.push(H$r.HAS_NORMAL_TEXTURE),(l.emissiveTexture||e._PBRMaterialParams[$]&&e._PBRMaterialParams[$].emissionTextureIndex>-1)&&d.defines.push(H$r.HAS_EMISSIVE_TEXTURE),(l.metallicRoughnessTexture||e._PBRMaterialParams[$]&&e._PBRMaterialParams[$]._metallicRoughnessTextureIndex>-1)&&d.defines.push(H$r.HAS_MetallicRoughness_TEXTURE),(l.occlusionTexture||e._PBRMaterialParams[$]&&e._PBRMaterialParams[$]._occlusionTextureIndex>-1)&&d.defines.push(H$r.HAS_OCCLUSION_TEXTURE),t$$(e._frameState.specularEnvironmentMaps)&&d.defines.push(H$r.IBL)),l.appendPBRMacroToShader(h,d);var g=t$$(this._attributeLocations.aNormal);c.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:this._attributeLocations});var y=l._diffuseColor,v=l._diffuseColor,x=l._specularColor,b=l._shininess;_0x5ce0b0(c,{texture:l._textures[0],hasNormal:g,ambientColor:y,diffuseColor:v,specularColor:x,shininess:b,layer:this._collection,geoMat:this._matModel,groupName:$},l),this._texture=l._textures[0],this._colorCommand=c,this._vertexPackage=void 0,this._arrIndexPackage.length=0,this.createColorRenderState(this._ownerGroup,this._collection._clampToObject),this._collection._clampToObject&&(c.pass=we$l.ClampObject,this.createClampCommand())}},_0x344a36.prototype.appendProgramDefine=function(e,t,i,n){var r=this._collection._context,o=n?this._profileCommand:this._colorCommand;if(t$$(o)){var a=o.shaderProgram.fragmentShaderSource,s=o.shaderProgram.vertexShaderSource;e&&_0x2407ef(s,i),t&&_0x2407ef(a,i),o.shaderProgram.destroy(),o.shaderProgram=p$15.fromCache({context:r,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:this._attributeLocations}),t$$(this._stencilCommand)&&(this._stencilCommand.shaderProgram=o.shaderProgram)}},_0x344a36.prototype.removeProgramDefine=function(e,t,i,n){var r=this._collection._context,o=n?this._profileCommand:this._colorCommand;if(t$$(o)){var a=o.shaderProgram.fragmentShaderSource,s=o.shaderProgram.vertexShaderSource;e&&_0x18ef60(s,i),t&&_0x18ef60(a,i),o.shaderProgram.destroy(),o.shaderProgram=p$15.fromCache({context:r,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:this._attributeLocations})}},_0x344a36.prototype.createColorRenderState=function(e,t){if(t){var i=_0x43be0d.createClampObjectColorRenderState();this._colorCommand.renderState=p$1a.fromCache(i)}else this._colorCommand.renderState=p$1a.fromCache({cull:{enabled:e.cullEnabled,face:e.cullFace},depthTest:{enabled:!0},blending:Ee$s.ALPHA_BLEND})},_0x344a36.prototype.createClampCommand=function(){if(!t$$(this._stencilCommand)){var e=_0x43be0d.createClampObjectStencilRenderState(),t=t$$(this._profileCommand)?this._profileCommand:this._colorCommand,i=s$1d.shallowClone(t);i.renderState=p$1a.fromCache(e),this._stencilCommand=i}},_0x344a36.prototype.createProfileCommand=function(e){if(!t$$(this._profileCommand)){var t=this._colorCommand,i=t.shaderProgram.vertexShaderSource.clone(),n=t.shaderProgram.fragmentShaderSource.clone();i.defines.push("ClampObject"),n.defines.push("ClampObject"),i.defines.push("PROFILE"),n.defines.push("PROFILE");var r=e._context;r.drawBuffers&&r.colorBufferFloat&&r.depthTexture&&n.defines.push("MRT");var o=s$1d.shallowClone(t);o.shaderProgram=p$15.fromCache({context:r,vertexShaderSource:i,fragmentShaderSource:n,attributeLocations:this._attributeLocations}),this._profileCommand=o}},_0x344a36.prototype.createSpatialQueryCommand=function(e){if(!t$$(this._spatialQueryCommand)){var t=this._colorCommand,i=t.shaderProgram.vertexShaderSource.clone(),n=t.shaderProgram.fragmentShaderSource.clone();i.defines.push("SQRESULT"),n.defines.push("SQRESULT"),e._frameState.useLogDepth&&n.defines.push("LOG_DEPTH");var r=s$1d.shallowClone(t);r.uniformMap.uFrontDepthTexture=function(){return e._sqTextures[0]},r.uniformMap.uBackDepthTexture=function(){return e._sqTextures[1]},r.uniformMap.uFrontColorTexture=function(){return e._sqTextures[2]},r.uniformMap.uSQMode=function(){return e._sqMode},r.shaderProgram=p$15.fromCache({context:e._context,vertexShaderSource:i,fragmentShaderSource:n,attributeLocations:this._attributeLocations}),this._spatialQueryCommand=r}},_0x344a36.prototype.destroy=function(){for(var e in this._mapPass)this._mapPass.hasOwnProperty(e)&&(this._mapPass[e]=this._mapPass[e]&&!this._mapPass[e].isDestroyed()&&this._mapPass[e].destroy());this._mapPass=void 0;var t=this._colorCommand;t$$(t)&&(t.vertexArray=t.vertexArray&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy(),this._colorCommand=void 0),t$$(t=this._stencilCommand)&&(t.vertexArray=t.vertexArray&&!t.vertexArray.isDestroyed()&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&!t.shaderProgram.isDestroyed()&&t.shaderProgram.destroy(),this._stencilCommand=void 0),t$$(t=this._profileCommand)&&(t.vertexArray=t.vertexArray&&!t.vertexArray.isDestroyed()&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&!t.shaderProgram.isDestroyed()&&t.shaderProgram.destroy(),this._profileCommand=void 0),this._vertexPackage=null,this._arrIndexPackage.length=0},_0x1bf60e.prototype._setSQTextures=function(e){this._sqTextures=e},_0x1bf60e.prototype._setSQMode=function(e){this._sqMode=e},_0x1bf60e.prototype._getAllColorCommand=function(){return this._allColorCommand},_0x1bf60e.prototype.setPBRMaterialFromJSON=function(e,t){if(this._pbrParameter===We$a.NONE){var i=this;e in i._PBRMaterialParams||(i._PBRMaterialParams[e]={metallic:0,roughness:0,baseColorFactor:new a$10(1,1,1,1),baseColorTextureIndex:-1,baseTexture:void 0,emissionFactor:a$11.UNIT_XYZ,emissionTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseUri:""}),i._PBRMaterialParams[e].baseUri=o$17(t),u$$(t).then((function(t){var n=t.material,r=n.pbrMetallicRoughness,o=n.textureunitstates;if(i._PBRMaterialParams[e].baseColorFactor=t$$(r.baseColor)?a$10.fromElements(r.baseColor.x,r.baseColor.y,r.baseColor.z,r.baseColor.w):i._PBRMaterialParams[e].baseColorFactor,i._PBRMaterialParams[e].baseColorTextureIndex=t$$(r.baseColorTextureIndex)?r.baseColorTextureIndex:-1,i._PBRMaterialParams[e].emissionFactor=t$$(r.emissiveFactor)?a$11.fromElements(r.emissiveFactor.x,r.emissiveFactor.y,r.emissiveFactor.z):a$11.UNIT_XYZ,i._PBRMaterialParams[e].emissionTextureIndex=t$$(r.emissiveTextureIndex)?r.emissiveTextureIndex:i._PBRMaterialParams[e].emissionTextureIndex,i._PBRMaterialParams[e].metallic=t$$(r.metallicFactor)?r.metallicFactor:i._PBRMaterialParams[e].metallic,i._PBRMaterialParams[e].roughness=t$$(r.roughnessFactor)?r.roughnessFactor:i._PBRMaterialParams[e].roughness,i._PBRMaterialParams[e].occlusionTextureIndex=t$$(r.occlusionTextureIndex)?r.occlusionTextureIndex:-1,i._PBRMaterialParams[e].normalTextureIndex=t$$(r.normalTextureIndex)?r.normalTextureIndex:-1,-1!==r.baseColorTextureIndex){var a=i._PBRMaterialParams[e].baseUri+o[r.baseColorTextureIndex].textureunitstate.url;_0x46bca4(i._context,a,i._PBRMaterialParams[e],"baseTexture")}if(-1!==r.normalTextureIndex){a=i._PBRMaterialParams[e].baseUri+o[r.normalTextureIndex].textureunitstate.url;_0x46bca4(i._context,a,i._PBRMaterialParams[e],"normalTexture")}if(-1!==r.emissiveTextureIndex){a=i._PBRMaterialParams[e].baseUri+o[r.emissiveTextureIndex].textureunitstate.url;_0x46bca4(i._context,a,i._PBRMaterialParams[e],"emissiveTexture")}if(-1!==r.metallicRoughnessTextureIndex){a=i._PBRMaterialParams[e].baseUri+o[r.metallicRoughnessTextureIndex].textureunitstate.url;_0x46bca4(i._context,a,i._PBRMaterialParams[e],"metallicRoughnessTexture")}if(-1!==r.occlusionTextureIndex){a=i._PBRMaterialParams[e].baseUri+o[r.occlusionTextureIndex].textureunitstate.url;_0x46bca4(i._context,a,i._PBRMaterialParams[e],"occlusionTexture")}_0x4b814e(i,e)}))}},_0x1bf60e.prototype.removePBRMaterial=function(e){delete this._PBRMaterialParams[e],_0x4b814e(this,e)};var ot$5={avi:"video/x-msvideo",bmp:"image/bmp",bz2:"application/x-bzip2",chm:"application/vnd.ms-htmlhelp",css:"text/css",csv:"text/csv",doc:"application/msword",dvi:"application/x-dvi",eps:"application/postscript",flv:"video/x-flv",gif:"image/gif",gz:"application/x-gzip",htm:"text/html",html:"text/html",ico:"image/vnd.microsoft.icon",jnlp:"application/x-java-jnlp-file",jpeg:"image/jpeg",jpg:"image/jpeg",m3u:"audio/x-mpegurl",m4v:"video/mp4",mathml:"application/mathml+xml",mid:"audio/midi",midi:"audio/midi",mov:"video/quicktime",mp3:"audio/mpeg",mp4:"video/mp4",mp4v:"video/mp4",mpeg:"video/mpeg",mpg:"video/mpeg",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",ogg:"application/ogg",pdf:"application/pdf",png:"image/png",pps:"application/vnd.ms-powerpoint",ppt:"application/vnd.ms-powerpoint",ps:"application/postscript",qt:"video/quicktime",rdf:"application/rdf+xml",rss:"application/rss+xml",rtf:"application/rtf",svg:"image/svg+xml",swf:"application/x-shockwave-flash",text:"text/plain",tif:"image/tiff",tiff:"image/tiff",txt:"text/plain",wav:"audio/x-wav",wma:"audio/x-ms-wma",wmv:"video/x-ms-wmv",xml:"application/xml",zip:"application/zip",detectFromFilename:function(e){var t=e.toLowerCase();return t=a$_(t),ot$5[t]}},we$9;typeof DOMParser<"u"&&(we$9=new DOMParser);var co$1=new zt$3({stripPrefix:!1,email:!1,replaceFn:function(e){if(!e.protocolUrlMatch)return!1}}),ee$c=32,rt$5=2414016,it$3=1,nt$5=16093e3,at$3=.1,lt$6=[null,void 0,"http://www.opengis.net/kml/2.2","http://earth.google.com/kml/2.2","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.0"],st$2=["http://www.google.com/kml/ext/2.2"],fo$1=["http://www.w3.org/2005/Atom"],s$k={kml:lt$6,gx:st$2,atom:fo$1,kmlgx:lt$6.concat(st$2)},De$d={Document:Ct$2,Folder:Co$2,Placemark:Io$2,NetworkLink:Vo$2,GroundOverlay:Po$2,PhotoOverlay:Ke$3,ScreenOverlay:Ke$3,Tour:Ro$2};function Q$j(e){this._dataSource=e,this._deferred=c$18.defer(),this._stack=[],this._promises=[],this._timeoutSet=!1,this._used=!1,this._started=0,this._timeThreshold=1e3}function vo$2(e){var t=e.slice(0,Math.min(4,e.size)),i=c$18.defer(),n=new FileReader;return n.addEventListener("load",(function(){i.resolve(1347093252===new DataView(n.result).getUint32(0,!1))})),n.addEventListener("error",(function(){i.reject(n.error)})),n.readAsArrayBuffer(t),i.promise}function mt$3(e){var t=c$18.defer(),i=new FileReader;return i.addEventListener("load",(function(){t.resolve(i.result)})),i.addEventListener("error",(function(){t.reject(i.error)})),i.readAsText(e),t.promise}function dt$5(e){var t,i,n,r={xsi:"http://www.w3.org/2001/XMLSchema-instance"};for(var o in r)r.hasOwnProperty(o)&&(n="xmlns:"+o+"=",RegExp("[< ]"+o+":").test(e)&&-1===e.indexOf(n)&&(t$$(t)||(t=e.substr(0,e.indexOf("<kml")+4),i=e.substr(t.length)),t+=" "+n+'"'+r[o]+'"'));return t$$(t)&&(e=t+i),e}function ut$4(e){for(var t,i,n,r=e.indexOf("xmlns:"),o=e.indexOf(">",r);-1!==r&&r<o;)t=e.slice(r,e.indexOf('"',r)),i=r,-1!==(r=e.indexOf(t,r+1))?(n=e.indexOf('"',e.indexOf('"',r)+1),r=(e=e.slice(0,r-1)+e.slice(n+1,e.length)).indexOf("xmlns:",i-1)):r=e.indexOf("xmlns:",i+1);return e}function ho$2(e,t,i){e.getData(new he$a.TextWriter,(function(e){e=ut$4(e=dt$5(e)),t.kml=we$9.parseFromString(e,"application/xml"),i.resolve()}))}function pt$4(e,t,i){var n=e$1Y(ot$5.detectFromFilename(e.filename),"application/octet-stream");e.getData(new he$a.Data64URIWriter(n),(function(n){t[e.filename]=n,i.resolve()}))}function ct$5(e,t,i,n){for(var r=n.keys,o=new h$1f("."),a=e.querySelectorAll(t),s=0;s<a.length;s++){var l=a[s],u=new h$1f(l.getAttribute(i)).resolve(o).toString(),c=r.indexOf(u);if(-1!==c){var h=r[c];l.setAttribute(i,n[h]),"a"===t&&null===l.getAttribute("download")&&l.setAttribute("download",h)}}}function ft$3(e,t,i,n){for(var r=e.querySelectorAll(t),o=0;o<r.length;o++){var a=r[o],s=_e$8(a.getAttribute(i),n);a.setAttribute(i,s.url)}}function vt$3(e,t,i){var n=G$p(e,"id");n=t$$(n)&&0!==n.length?n:t$U(),t$$(i)&&(n=i+n);var r=t.getById(n);return t$$(r)&&(n=t$U(),t$$(i)&&(n=i+n)),t$$((r=t.add(new l$J({id:n}))).kml)||(r.addProperty("kml"),r.kml=new Go$2),r}function fe$8(e,t){return"absolute"===e||"relativeToGround"===e||"relativeToSeaFloor"===t}function de$a(e,t){if(!t$$(e))return a$11.fromDegrees(0,0,0,t);var i=e.match(/[^\s,\n]+/g);if(!t$$(i))return a$11.fromDegrees(0,0,0,t);var n=parseFloat(i[0]),r=parseFloat(i[1]),o=parseFloat(i[2]);return n=isNaN(n)?0:n,r=isNaN(r)?0:r,o=isNaN(o)?0:o,a$11.fromDegrees(n,r,o,t)}function ye$c(e,t){if(t$$(e)){var i=e.textContent.match(/[^\s\n]+/g);if(t$$(i)){for(var n=i.length,r=new Array(n),o=0,a=0;a<n;a++)r[o++]=de$a(i[a],t);return r}}}function ht$3(e,t){if(t$$(e)){var i=e.getAttribute(t);if(null!==i){var n=parseFloat(i);return isNaN(n)?void 0:n}}}function G$p(e,t){if(t$$(e)){var i=e.getAttribute(t);return null!==i?i:void 0}}function S$l(e,t,i){if(t$$(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}}function gt$3(e,t,i){if(t$$(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}}function q$p(e,t,i){if(!t$$(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}function T$q(e,t,i){var n=S$l(e,t,i);if(t$$(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function w$v(e,t,i){var n=S$l(e,t,i);if(t$$(n))return n.textContent.trim()}function H$q(e,t,i){var n=S$l(e,t,i);if(t$$(n)){var r=n.textContent.trim();return"1"===r||/^true$/i.test(r)}}function _e$8(e,t,i){if(t$$(e)){var n;if(t$$(i)){var r=i[e=e.replace(/\\/g,"/")];if(t$$(r))n=new t$X({url:r});else{var o=new h$1f(t.getUrlComponent());t$$(r=i[new h$1f(e).resolve(o)])&&(n=new t$X({url:r}))}}return t$$(n)||(n=t$$(t)?t.getDerivedResource({url:e}):new t$X({url:e})),n}}Object.defineProperties(Q$j.prototype,{dataSource:{get:function(){return this._dataSource}}}),Q$j.prototype.addNodes=function(e,t){this._stack.push({nodes:e,index:0,processingData:t}),this._used=!0},Q$j.prototype.addPromise=function(e){this._promises.push(e)},Q$j.prototype.wait=function(){var e=this._deferred;return this._used||e.resolve(),c$18.join(e.promise,c$18.all(this._promises))},Q$j.prototype.process=function(){var e=1===this._stack.length;return e&&(this._started=D$t._getTimestamp()),this._process(e)},Q$j.prototype._giveUpTime=function(){if(!this._timeoutSet){this._timeoutSet=!0,this._timeThreshold=50;var e=this;setTimeout((function(){e._timeoutSet=!1,e._started=D$t._getTimestamp(),e._process(!0)}),0)}},Q$j.prototype._nextNode=function(){var e=this._stack,t=e[e.length-1],i=t.index,n=t.nodes;if(i!==n.length)return++t.index,n[i]},Q$j.prototype._pop=function(){var e=this._stack;return e.pop(),0!==e.length||(this._deferred.resolve(),!1)},Q$j.prototype._process=function(e){for(var t=this.dataSource,i=this._stack[this._stack.length-1].processingData,n=this._nextNode();t$$(n);){var r=De$d[n.localName];if(t$$(r)&&(-1!==s$k.kml.indexOf(n.namespaceURI)||-1!==s$k.gx.indexOf(n.namespaceURI))&&(r(t,n,i,this),this._timeoutSet||D$t._getTimestamp()>this._started+this._timeThreshold))return void this._giveUpTime();n=this._nextNode()}this._pop()&&e&&this._process(!0)};var W$m={maximumRed:void 0,red:void 0,maximumGreen:void 0,green:void 0,maximumBlue:void 0,blue:void 0};function Ae$9(e,t){if(t$$(e)&&!/^\s*$/gm.test(e)){"#"===e[0]&&(e=e.substring(1));var i=parseInt(e.substring(0,2),16)/255,n=parseInt(e.substring(2,4),16)/255,r=parseInt(e.substring(4,6),16)/255,o=parseInt(e.substring(6,8),16)/255;return t?(o>0?(W$m.maximumRed=o,W$m.red=void 0):(W$m.maximumRed=void 0,W$m.red=0),r>0?(W$m.maximumGreen=r,W$m.green=void 0):(W$m.maximumGreen=void 0,W$m.green=0),n>0?(W$m.maximumBlue=n,W$m.blue=void 0):(W$m.maximumBlue=void 0,W$m.blue=0),W$m.alpha=i,e$1z.fromRandom(W$m)):new e$1z(o,r,n,i)}}function ne$9(e,t,i){var n=w$v(e,t,i);if(t$$(n))return Ae$9(n,"random"===w$v(e,"colorMode",i))}function go$2(e){var t=S$l(e,"TimeStamp",s$k.kmlgx),i=w$v(t,"when",s$k.kmlgx);if(t$$(t)&&t$$(i)&&0!==i.length){var n=o$10.fromIso8601(i),r=new p$X;return r.addInterval(new n$T({start:n,stop:f$S.MAXIMUM_VALUE})),r}}function ko$3(e){var t=S$l(e,"TimeSpan",s$k.kmlgx);if(t$$(t)){var i,n=S$l(t,"begin",s$k.kmlgx),r=t$$(n)?o$10.fromIso8601(n.textContent):void 0,o=S$l(t,"end",s$k.kmlgx),a=t$$(o)?o$10.fromIso8601(o.textContent):void 0;if(t$$(r)&&t$$(a)){if(o$10.lessThan(a,r)){var s=r;r=a,a=s}(i=new p$X).addInterval(new n$T({start:r,stop:a}))}else t$$(r)?(i=new p$X).addInterval(new n$T({start:r,stop:f$S.MAXIMUM_VALUE})):t$$(a)&&(i=new p$X).addInterval(new n$T({start:f$S.MINIMUM_VALUE,stop:a}));return i}}function kt$3(){var e=new s$W;return e.width=ee$c,e.height=ee$c,e.scaleByDistance=new u$W(rt$5,it$3,nt$5,at$3),e.pixelOffsetScaleByDistance=new u$W(rt$5,it$3,nt$5,at$3),e}function Ve$9(){var e=new u$J;return e.outline=!0,e.outlineColor=e$1z.WHITE,e}function xt$5(){var e=new s$P;return e.translucencyByDistance=new u$W(3e6,1,5e6,0),e.distanceDisplayCondition=new e$1w(0,8e4),e.pixelOffset=new r$T(17,0),e.horizontalOrigin=N$W.LEFT,e.font="16px sans-serif",e.style=z$t.FILL_AND_OUTLINE,e}function wt$2(e,t,i,n,r){var o=w$v(e,"href",s$k.kml);if(t$$(o)&&0!==o.length){if(0===o.indexOf("root://icons/palette-")){var a=o.charAt(21),s=e$1Y(T$q(e,"x",s$k.gx),0),l=e$1Y(T$q(e,"y",s$k.gx),0);s=Math.min(s/32,7),o="https://maps.google.com/mapfiles/kml/pal"+a+"/icon"+(8*(l=7-Math.min(l/32,7))+s)+".png"}var u=_e$8(o,i,n);if(r){var c=w$v(e,"refreshMode",s$k.kml),h=w$v(e,"viewRefreshMode",s$k.kml);"onInterval"===c||"onExpire"===c?e$1Q("kml-refreshMode-"+c,"KML - Unsupported Icon refreshMode: "+c):("onStop"===h||"onRegion"===h)&&e$1Q("kml-refreshMode-"+h,"KML - Unsupported Icon viewRefreshMode: "+h);var d=e$1Y(w$v(e,"viewBoundScale",s$k.kml),1),f="onStop"===h?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",p=e$1Y(w$v(e,"viewFormat",s$k.kml),f),_=w$v(e,"httpQuery",s$k.kml);t$$(p)&&u.setQueryParameters(m$19(be$e(p))),t$$(_)&&u.setQueryParameters(m$19(be$e(_)));var m=t._ellipsoid;return We$6(u,t._camera,t._canvas,d,t._lastCameraView.bbox,m),u}return u}}function xo$2(e,t,i,n,r){var o=T$q(t,"scale",s$k.kml),a=T$q(t,"heading",s$k.kml),s=ne$9(t,"color",s$k.kml),l=S$l(t,"Icon",s$k.kml),u=wt$2(l,e,n,r,!1);t$$(l)&&!t$$(u)&&(u=!1);var c,h,d=T$q(l,"x",s$k.gx),f=T$q(l,"y",s$k.gx),p=T$q(l,"w",s$k.gx),_=T$q(l,"h",s$k.gx),m=S$l(t,"hotSpot",s$k.kml),$=ht$3(m,"x"),g=ht$3(m,"y"),y=G$p(m,"xunits"),v=G$p(m,"yunits"),x=i.billboard;t$$(x)||(x=kt$3(),i.billboard=x),x.image=u,x.scale=o,x.color=s,(t$$(d)||t$$(f)||t$$(p)||t$$(_))&&(x.imageSubRegion=new n$13(d,f,p,_)),t$$(a)&&0!==a&&(x.rotation=n$1d.toRadians(-a),x.alignedAxis=a$11.UNIT_Z),o=e$1Y(o,1),t$$($)&&("pixels"===y?c=-$*o:"insetPixels"===y?c=($-ee$c)*o:"fraction"===y&&(c=-$*ee$c*o),c+=.5*ee$c*o),t$$(g)&&("pixels"===v?h=g*o:"insetPixels"===v?h=(-g+ee$c)*o:"fraction"===v&&(h=g*ee$c*o),h-=.5*ee$c*o),(t$$(c)||t$$(h))&&(x.pixelOffset=new r$T(c,h))}function Me$d(e,t,i,n,r){for(var o=0,a=t.childNodes.length;o<a;o++){var s=t.childNodes.item(o);if("IconStyle"===s.localName)xo$2(e,s,i,n,r);else if("LabelStyle"===s.localName){var l=i.label;t$$(l)||(l=xt$5(),i.label=l),l.scale=e$1Y(T$q(s,"scale",s$k.kml),l.scale),l.fillColor=e$1Y(ne$9(s,"color",s$k.kml),l.fillColor),l.text=i.name}else if("LineStyle"===s.localName){var u=i.polyline;t$$(u)||(u=new o$B,i.polyline=u),u.width=T$q(s,"width",s$k.kml),u.material=ne$9(s,"color",s$k.kml),t$$(ne$9(s,"outerColor",s$k.gx))&&e$1Q("kml-gx:outerColor","KML - gx:outerColor is not supported in a LineStyle"),t$$(T$q(s,"outerWidth",s$k.gx))&&e$1Q("kml-gx:outerWidth","KML - gx:outerWidth is not supported in a LineStyle"),t$$(T$q(s,"physicalWidth",s$k.gx))&&e$1Q("kml-gx:physicalWidth","KML - gx:physicalWidth is not supported in a LineStyle"),t$$(H$q(s,"labelVisibility",s$k.gx))&&e$1Q("kml-gx:labelVisibility","KML - gx:labelVisibility is not supported in a LineStyle")}else if("PolyStyle"===s.localName){var c=i.polygon;t$$(c)||(c=Ve$9(),i.polygon=c),c.material=e$1Y(ne$9(s,"color",s$k.kml),c.material),c.fill=e$1Y(H$q(s,"fill",s$k.kml),c.fill),c.outline=e$1Y(H$q(s,"outline",s$k.kml),c.outline)}else if("BalloonStyle"===s.localName){var h=e$1Y(Ae$9(w$v(s,"bgColor",s$k.kml)),e$1z.WHITE),d=e$1Y(Ae$9(w$v(s,"textColor",s$k.kml)),e$1z.BLACK),f=w$v(s,"text",s$k.kml);i.addProperty("balloonStyle"),i.balloonStyle={bgColor:h,textColor:d,text:f}}else if("ListStyle"===s.localName){var p=w$v(s,"listItemType",s$k.kml);("radioFolder"===p||"checkOffOnly"===p)&&e$1Q("kml-listStyle-"+p,"KML - Unsupported ListStyle with listItemType: "+p)}}}function wo$2(e,t,i,n,r){for(var o,a=new l$J,s=-1,l=t.childNodes,u=l.length,c=0;c<u;c++){var h=l[c];("Style"===h.localName||"StyleMap"===h.localName)&&(s=c)}if(-1!==s){var d=l[s];if("Style"===d.localName)Me$d(e,d,a,n,r);else for(var f=q$p(d,"Pair",s$k.kml),p=0;p<f.length;p++){var _=f[p],m=w$v(_,"key",s$k.kml);if("normal"===m){var $=w$v(_,"styleUrl",s$k.kml);if(t$$($))t$$(o=i.getById($))||(o=i.getById("#"+$)),t$$(o)&&a.merge(o);else Me$d(e,S$l(_,"Style",s$k.kml),a,n,r)}else e$1Q("kml-styleMap-"+m,"KML - Unsupported StyleMap key: "+m)}}var g=w$v(t,"styleUrl",s$k.kml);if(t$$(g)){var y=g;if("#"!==g[0]&&-1!==g.indexOf("#")){var v=g.split("#"),x=v[0];y=n.getDerivedResource({url:x}).getUrlComponent()+"#"+v[1]}t$$(o=i.getById(y))||(o=i.getById("#"+y)),t$$(o)&&a.merge(o)}return a}function yo$2(e,t,i){return t.fetchXML().then((function(n){return yt$3(e,n,i,t,!0)}))}function yt$3(e,t,i,n,r,o){var a,s,l,u,c=gt$3(t,"Style",s$k.kml);if(t$$(c)){var h=c.length;for(a=0;a<h;a++)t$$(s=G$p(u=c[a],"id"))&&(s="#"+s,r&&t$$(n)&&(s=n.getUrlComponent()+s),t$$(i.getById(s))||(l=new l$J({id:s}),i.add(l),Me$d(e,u,l,n,o)))}var d=gt$3(t,"StyleMap",s$k.kml);if(t$$(d)){var f=d.length;for(a=0;a<f;a++){var p=d[a];if(t$$(s=G$p(p,"id")))for(var _=q$p(p,"Pair",s$k.kml),m=0;m<_.length;m++){var $=_[m],g=w$v($,"key",s$k.kml);if("normal"===g){if(s="#"+s,r&&t$$(n)&&(s=n.getUrlComponent()+s),!t$$(i.getById(s))){l=i.getOrCreateEntity(s);var y=w$v($,"styleUrl",s$k.kml);if(t$$(y)){"#"!==y[0]&&(y="#"+y),r&&t$$(n)&&(y=n.getUrlComponent()+y);var v=i.getById(y);t$$(v)&&l.merge(v)}else Me$d(e,u=S$l($,"Style",s$k.kml),l,n,o)}}else e$1Q("kml-styleMap-"+g,"KML - Unsupported StyleMap key: "+g)}}}var x=[],b=t.getElementsByTagName("styleUrl"),S=b.length;for(a=0;a<S;a++){var w=b[a].textContent;if("#"!==w[0]){var C=w.split("#");if(2===C.length){var T=C[0],P=n.getDerivedResource({url:T});x.push(yo$2(e,P,i))}}}return x}function Fe$7(e,t,i){var n=new a$p(e,t.id,["position"]),r=new i$u(t.position);t.polyline=t$$(i.polyline)?i.polyline.clone():new o$B,t.polyline.positions=new i$x([n,r])}function _t$3(e,t){return!t$$(e)&&!t$$(t)||"clampToGround"===e?U$Y.CLAMP_TO_GROUND:"relativeToGround"===e?U$Y.RELATIVE_TO_GROUND:"absolute"===e?U$Y.NONE:"clampToSeaFloor"===t?(e$1Q("kml-gx:altitudeMode-clampToSeaFloor","KML - <gx:altitudeMode>:clampToSeaFloor is currently not supported, using <kml:altitudeMode>:clampToGround."),U$Y.CLAMP_TO_GROUND):"relativeToSeaFloor"===t?(e$1Q("kml-gx:altitudeMode-relativeToSeaFloor","KML - <gx:altitudeMode>:relativeToSeaFloor is currently not supported, using <kml:altitudeMode>:relativeToGround."),U$Y.RELATIVE_TO_GROUND):(t$$(e)?e$1Q("kml-altitudeMode-unknown","KML - Unknown <kml:altitudeMode>:"+e+", using <kml:altitudeMode>:CLAMP_TO_GROUND."):e$1Q("kml-gx:altitudeMode-unknown","KML - Unknown <gx:altitudeMode>:"+t+", using <kml:altitudeMode>:CLAMP_TO_GROUND."),U$Y.CLAMP_TO_GROUND)}function Mt$4(e,t,i){return"relativeToSeaFloor"===i||"absolute"===t||"relativeToGround"===t?e:((t$$(t)&&"clampToGround"!==t||t$$(i)&&"clampToSeaFloor"!==i)&&e$1Q("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+e$1Y(t,i)),new i$u(e))}function _o$2(e,t,i,n){if(t$$(e)){if("relativeToSeaFloor"===i||"absolute"===t||"relativeToGround"===t)return e;(t$$(t)&&"clampToGround"!==t||t$$(i)&&"clampToSeaFloor"!==i)&&e$1Q("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+e$1Y(t,i));for(var r=e.length,o=0;o<r;o++){var a=e[o];n.scaleToGeodeticSurface(a,a)}return e}}function Te$c(e,t,i,n){var r=t.label;t$$(r)||(r=t$$(i.label)?i.label.clone():xt$5(),t.label=r),r.text=t.name;var o=t.billboard;t$$(o)||(o=t$$(i.billboard)?i.billboard.clone():kt$3(),t.billboard=o),t$$(o.image)?o.image.getValue()||(o.image=void 0):o.image=e._pinBuilder.fromColor(e$1z.YELLOW,64);var a=1;t$$(o.scale)&&(0!==(a=o.scale.getValue())?r.pixelOffset=new r$T(16*a+1,-16):(r.pixelOffset=void 0,r.horizontalOrigin=void 0)),t$$(n)&&e._clampToGround&&(o.heightReference=n,r.heightReference=n,r.pixelOffset=new r$T(16*a+1,-16))}function Tt$3(e,t){var i=e.path;t$$(i)||((i=new s$N).leadTime=0,e.path=i);var n=t.polyline;t$$(n)&&(i.material=n.material,i.width=n.width)}function Mo$2(e,t,i,n,r){var o=w$v(i,"coordinates",s$k.kml),a=w$v(i,"altitudeMode",s$k.kml),s=w$v(i,"altitudeMode",s$k.gx),l=H$q(i,"extrude",s$k.kml),u=de$a(o,e._ellipsoid);return n.position=u,Te$c(e,n,r,_t$3(a,s)),l&&fe$8(a,s)&&Fe$7(t,n,r),!0}function Lt$5(e,t,i,n,r){var o=S$l(i,"coordinates",s$k.kml),a=w$v(i,"altitudeMode",s$k.kml),s=w$v(i,"altitudeMode",s$k.gx),l=H$q(i,"extrude",s$k.kml),u=H$q(i,"tessellate",s$k.kml),c=fe$8(a,s),h=T$q(i,"drawOrder",s$k.gx),d=e._ellipsoid,f=ye$c(o,d),p=r.polyline;if(c&&l){var _=new s$J;n.wall=_,_.positions=f;var m=r.polygon;t$$(m)&&(_.fill=m.fill,_.material=m.material),_.outline=!0,t$$(p)?(_.outlineColor=t$$(p.material)?p.material.color:e$1z.WHITE,_.outlineWidth=p.width):t$$(m)&&(_.outlineColor=t$$(m.material)?m.material.color:e$1z.WHITE)}else if(!e._clampToS3M&&!e._clampToGround||c)t$$(h)&&e$1Q("kml-gx:drawOrder","KML - gx:drawOrder is not supported in LineStrings when clampToGround is false"),p=t$$(p)?p.clone():new o$B,n.polyline=p,p.positions=_o$2(f,a,s,d),(!u||c)&&(p.arcType=m$_.NONE);else{e._clampToS3M&&(n.clampToS3M=!0,n.classificationType=_0x29401c.S3M_TILE);var $=new o$B;e._clampToGround&&($.clampToGround=!0,$.classificationType=e._classificationType),n.polyline=$,$.positions=f,t$$(p)?($.material=t$$(p.material)?p.material.color.getValue(f$S.MINIMUM_VALUE):e$1z.WHITE,$.width=e$1Y(p.width,1)):($.material=e$1z.WHITE,$.width=1),$.zIndex=h}return!0}function To$2(e,t,i,n,r){var o=S$l(i,"outerBoundaryIs",s$k.kml),a=S$l(o,"LinearRing",s$k.kml),s=S$l(a,"coordinates",s$k.kml),l=e._ellipsoid,u=ye$c(s,l),c=H$q(i,"extrude",s$k.kml),h=fe$8(w$v(i,"altitudeMode",s$k.kml),w$v(i,"altitudeMode",s$k.gx)),d=t$$(r.polygon)?r.polygon.clone():Ve$9(),f=r.polyline;if(t$$(f)&&(d.outlineColor=t$$(f.material)?f.material.color:e$1z.WHITE,d.outlineWidth=f.width),n.polygon=d,h?(d.perPositionHeight=!0,d.extrudedHeight=c?0:void 0):!e._clampToGround&&!e._clampToS3M&&(d.height=0),e._clampToS3M&&(d.classificationType=_0x29401c.S3M_TILE),e._clampToGround&&(d.classificationType=_0x29401c.TERRAIN),t$$(u)){for(var p=new t$K(u),_=q$p(i,"innerBoundaryIs",s$k.kml),m=0;m<_.length;m++){a=q$p(_[m],"LinearRing",s$k.kml);for(var $=0;$<a.length;$++)t$$(u=ye$c(s=S$l(a[$],"coordinates",s$k.kml),l))&&p.holes.push(new t$K(u))}d.hierarchy=p}return!0}function Lo$2(e,t,i,n,r){var o=w$v(i,"altitudeMode",s$k.kml),a=w$v(i,"altitudeMode",s$k.gx),s=q$p(i,"coord",s$k.gx),l=q$p(i,"angles",s$k.gx),u=q$p(i,"when",s$k.kml),c=H$q(i,"extrude",s$k.kml),h=fe$8(o,a),d=e._ellipsoid;l.length>0&&e$1Q("kml-gx:angles","KML - gx:angles are not supported in gx:Tracks");for(var f=Math.min(s.length,u.length),p=[],_=[],m=0;m<f;m++){var $=de$a(s[m].textContent,d);p.push($),_.push(o$10.fromIso8601(u[m].textContent))}var g=new o$v;return g.addSamples(_,p),n.position=g,Te$c(e,n,r,_t$3(o,a)),Tt$3(n,r),n.availability=new p$X,u.length>0&&n.availability.addInterval(new n$T({start:_[0],stop:_[_.length-1]})),h&&c&&Fe$7(t,n,r),!0}function bt$5(e,t,i,n,r,o,a,s,l){var u=e[0],c=e[e.length-1],h=new o$v;h.addSamples(e,t),i.intervals.addInterval(new n$T({start:u,stop:c,isStartIncluded:l,isStopIncluded:l,data:Mt$4(h,a,s)})),n.addInterval(new n$T({start:u,stop:c,isStartIncluded:l,isStopIncluded:l})),r.intervals.addInterval(new n$T({start:u,stop:c,isStartIncluded:l,isStopIncluded:l,data:o}))}function St$4(e,t,i,n,r){for(var o,a,s,l=H$q(i,"interpolate",s$k.gx),u=q$p(i,"Track",s$k.gx),c=!1,h=new t$n,d=new p$X,f=new t$t,p=e._ellipsoid,_=0,m=u.length;_<m;_++){var $=u[_],g=q$p($,"when",s$k.kml),y=q$p($,"coord",s$k.gx),v=w$v($,"altitudeMode",s$k.kml),x=w$v($,"altitudeMode",s$k.gx),b=fe$8(v,x),S=H$q($,"extrude",s$k.kml),w=Math.min(y.length,g.length),C=[];o=[];for(var T=0;T<w;T++){var P=de$a(y[T].textContent,p);C.push(P),o.push(o$10.fromIso8601(g[T].textContent))}l&&(t$$(a)&&bt$5([a,o[0]],[s,C[0]],f,d,h,!1,"absolute",void 0,!1),a=o[w-1],s=C[C.length-1]),bt$5(o,C,f,d,h,b&&S,v,x,!0),c=c||b&&S}return n.availability=d,n.position=f,Te$c(e,n,r),Tt$3(n,r),c&&(Fe$7(t,n,r),n.polyline.show=h),!0}var Et$4={Point:Mo$2,LineString:Lt$5,LinearRing:Lt$5,Polygon:To$2,Track:Lo$2,MultiTrack:St$4,MultiGeometry:bo$2,Model:qo$2},Z$l;function bo$2(e,t,i,n,r,o){for(var a=i.childNodes,s=!1,l=0,u=a.length;l<u;l++){var c=a.item(l),h=Et$4[c.localName];if(t$$(h)){var d=vt$3(c,t,o);d.parent=n,d.name=n.name,d.availability=n.availability,d.description=n.description,d.kml=n.kml,h(e,t,c,d,r)&&(s=!0)}}return s}function So$2(e,t){var i=S$l(e,"ExtendedData",s$k.kml);if(t$$(i)){t$$(S$l(i,"SchemaData",s$k.kml))&&e$1Q("kml-schemaData","KML - SchemaData is unsupported"),t$$(G$p(i,"xmlns:prefix"))&&e$1Q("kml-extendedData","KML - ExtendedData with xmlns:prefix is unsupported");var n={},r=q$p(i,"Data",s$k.kml);if(t$$(r))for(var o=r.length,a=0;a<o;a++){var s=r[a],l=G$p(s,"name");t$$(l)&&(n[l]={displayName:w$v(s,"displayName",s$k.kml),value:w$v(s,"value",s$k.kml)})}t.kml.extendedData=n}}function Eo$2(e,t,i,n,r){var o,a,s,l,u=t.kml,c=u.extendedData,h=w$v(e,"description",s$k.kml),d=e$1Y(t.balloonStyle,i.balloonStyle),f=e$1z.WHITE,p=e$1z.BLACK,_=h;if(t$$(d)&&(f=e$1Y(d.bgColor,e$1z.WHITE),p=e$1Y(d.textColor,e$1z.BLACK),_=e$1Y(d.text,h)),t$$(_)){if(_=(_=(_=(_=(_=(_=_.replace("$[name]",e$1Y(t.name,""))).replace("$[description]",e$1Y(h,""))).replace("$[address]",e$1Y(u.address,""))).replace("$[Snippet]",e$1Y(u.snippet,""))).replace("$[id]",t.id)).replace("$[geDirections]",""),t$$(c)){var m=_.match(/\$\[.+?\]/g);if(null!==m)for(o=0;o<m.length;o++){var $=m[o],g=$.substr(2,$.length-3),y=/\/displayName$/.test(g);t$$(l=c[g=g.replace(/\/displayName$/,"")])&&(l=y?l.displayName:l.value),t$$(l)&&(_=_.replace($,e$1Y(l,"")))}}}else if(t$$(c)&&(s=Object.keys(c)).length>0){for(_='<table class="cesium-infoBox-defaultTable cesium-infoBox-defaultTable-lighter"><tbody>',o=0;o<s.length;o++)_+="<tr><th>"+e$1Y((l=c[a=s[o]]).displayName,a)+"</th><td>"+e$1Y(l.value,"")+"</td></tr>";_+="</tbody></table>"}if(t$$(_)){_=co$1.link(_),Z$l.innerHTML=_;var v=Z$l.querySelectorAll("a");for(o=0;o<v.length;o++)v[o].setAttribute("target","_blank");t$$(n)&&n.keys.length>1&&(ct$5(Z$l,"a","href",n),ct$5(Z$l,"img","src",n)),ft$3(Z$l,"a","href",r),ft$3(Z$l,"img","src",r);var x='<div class="cesium-infoBox-description-lighter" style="';x+="overflow:auto;",x+="word-wrap:break-word;",x+="background-color:"+f.toCssColorString()+";",x+="color:"+p.toCssColorString()+";",x+='">',x+=Z$l.innerHTML+"</div>",Z$l.innerHTML="",t.description=x}}function Le$a(e,t,i){var n=i.entityCollection,r=i.parentEntity,o=i.sourceResource,a=i.uriResolver,s=vt$3(t,n,i.context),l=s.kml,u=wo$2(e,t,i.styleCollection,o,a),c=w$v(t,"name",s$k.kml);s.name=c,s.parent=r;var h=ko$3(t);t$$(h)||(h=go$2(t)),s.availability=h,He$6(s);var d=H$q(t,"visibility",s$k.kml);s.show=function e(t){return!t||t.show&&e(t.parent)}(r)&&e$1Y(d,!0);var f=S$l(t,"author",s$k.atom),p=l.author;p.name=w$v(f,"name",s$k.atom),p.uri=w$v(f,"uri",s$k.atom),p.email=w$v(f,"email",s$k.atom);var _=S$l(t,"link",s$k.atom),m=l.link;m.href=G$p(_,"href"),m.hreflang=G$p(_,"hreflang"),m.rel=G$p(_,"rel"),m.type=G$p(_,"type"),m.title=G$p(_,"title"),m.length=G$p(_,"length"),l.address=w$v(t,"address",s$k.kml),l.phoneNumber=w$v(t,"phoneNumber",s$k.kml),l.snippet=w$v(t,"Snippet",s$k.kml),So$2(t,s),Eo$2(t,s,u,a,o);var $=e._ellipsoid;return Nt$2(t,s,$),It$3(t,s,$),t$$(S$l(t,"Region",s$k.kml))&&e$1Q("kml-region","KML - Placemark Regions are unsupported"),{entity:s,styleEntity:u}}function Ct$2(e,t,i,n){n.addNodes(t.childNodes,i),n.process()}function Co$2(e,t,i,n){var r=Le$a(e,t,i),o=e$1W(i);o.parentEntity=r.entity,Ct$2(e,t,o,n)}function Io$2(e,t,i,n){for(var r=Le$a(e,t,i),o=r.entity,a=r.styleEntity,s=!1,l=t.childNodes,u=0,c=l.length;u<c&&!s;u++){var h=l.item(u),d=Et$4[h.localName];t$$(d)&&(d(e,i.entityCollection,h,o,a,o.id,i.sourceResource),s=!0)}s||(o.merge(a),Te$c(e,o,a))}typeof document<"u"&&(Z$l=document.createElement("div"));var No$2={FlyTo:Uo$2,Wait:Oo$2,SoundCue:Be$a,AnimatedUpdate:Be$a,TourControl:Be$a};function Ro$2(e,t,i,n){var r=new l$l(w$v(t,"name",s$k.kml),G$p(t,"id")),o=S$l(t,"Playlist",s$k.gx);if(o)for(var a=e._ellipsoid,s=o.childNodes,l=0;l<s.length;l++){var u=s[l];if(u.localName){var c=No$2[u.localName];c?c(r,u,a):console.log("Unknown KML Tour playlist entry type "+u.localName)}}t$$(e.kmlTours)||(e.kmlTours=[]),e.kmlTours.push(r)}function Be$a(e,t){e$1Q("KML Tour unsupported node "+t.localName)}function Oo$2(e,t){var i=T$q(t,"duration",s$k.gx);e.addPlaylistEntry(new i$t(i))}function Uo$2(e,t,i){var n=T$q(t,"duration",s$k.gx),r=w$v(t,"flyToMode",s$k.gx),o={kml:{}};Nt$2(t,o,i),It$3(t,o,i);var a=new a$n(n,r,o.kml.lookAt||o.kml.camera);e.addPlaylistEntry(a)}function It$3(e,t,i){var n=S$l(e,"Camera",s$k.kml);if(t$$(n)){var r=e$1Y(T$q(n,"longitude",s$k.kml),0),o=e$1Y(T$q(n,"latitude",s$k.kml),0),a=e$1Y(T$q(n,"altitude",s$k.kml),0),s=e$1Y(T$q(n,"heading",s$k.kml),0),l=e$1Y(T$q(n,"tilt",s$k.kml),0),u=e$1Y(T$q(n,"roll",s$k.kml),0),c=a$11.fromDegrees(r,o,a,i),h=e$1L.fromDegrees(s,l-90,u);t.kml.camera=new o$t(c,h)}}function Nt$2(e,t,i){var n=S$l(e,"LookAt",s$k.kml);if(t$$(n)){var r=e$1Y(T$q(n,"longitude",s$k.kml),0),o=e$1Y(T$q(n,"latitude",s$k.kml),0),a=e$1Y(T$q(n,"altitude",s$k.kml),0),s=T$q(n,"heading",s$k.kml),l=T$q(n,"tilt",s$k.kml),u=e$1Y(T$q(n,"range",s$k.kml),0);l=n$1d.toRadians(e$1Y(l,0));var c=new h$V(s=n$1d.toRadians(e$1Y(s,0)),l-n$1d.PI_OVER_TWO,u),h=a$11.fromDegrees(r,o,a,i);t.kml.lookAt=new n$w(h,c)}}function Po$2(e,t,i,n){var r,o=Le$a(e,t,i).entity,a=!1,s=e._ellipsoid,l=ye$c(S$l(t,"LatLonQuad",s$k.gx),s),u=T$q(t,"drawOrder",s$k.kml);if(t$$(l))(r=Ve$9()).hierarchy=new t$K(l),r.zIndex=u,o.polygon=r,a=!0;else{(r=new o$A).zIndex=u,o.rectangle=r;var c=S$l(t,"LatLonBox",s$k.kml);if(t$$(c)){var h=T$q(c,"west",s$k.kml),d=T$q(c,"south",s$k.kml),f=T$q(c,"east",s$k.kml),p=T$q(c,"north",s$k.kml);t$$(h)&&(h=n$1d.negativePiToPi(n$1d.toRadians(h))),t$$(d)&&(d=n$1d.clampToLatitudeRange(n$1d.toRadians(d))),t$$(f)&&(f=n$1d.negativePiToPi(n$1d.toRadians(f))),t$$(p)&&(p=n$1d.clampToLatitudeRange(n$1d.toRadians(p))),r.coordinates=new s$1p(h,d,f,p);var _=T$q(c,"rotation",s$k.kml);if(t$$(_)){var m=n$1d.toRadians(_);r.rotation=m,r.stRotation=m}}}var $=S$l(t,"Icon",s$k.kml),g=wt$2($,e,i.sourceResource,i.uriResolver,!0);if(t$$(g)){a&&e$1Q("kml-gx:LatLonQuad","KML - gx:LatLonQuad Icon does not support texture projection.");var y=T$q($,"x",s$k.gx),v=T$q($,"y",s$k.gx),x=T$q($,"w",s$k.gx),b=T$q($,"h",s$k.gx);(t$$(y)||t$$(v)||t$$(x)||t$$(b))&&e$1Q("kml-groundOverlay-xywh","KML - gx:x, gx:y, gx:w, gx:h aren't supported for GroundOverlays"),r.material=g,r.material.color=ne$9(t,"color",s$k.kml),r.material.transparent=!0}else r.material=ne$9(t,"color",s$k.kml);var S=w$v(t,"altitudeMode",s$k.kml);t$$(S)?"absolute"===S?(r.height=T$q(t,"altitude",s$k.kml),r.zIndex=void 0):"clampToGround"!==S&&e$1Q("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+S):"relativeToSeaFloor"===(S=w$v(t,"altitudeMode",s$k.gx))?(e$1Q("kml-altitudeMode-relativeToSeaFloor","KML - altitudeMode relativeToSeaFloor is currently not supported, treating as absolute."),r.height=T$q(t,"altitude",s$k.kml),r.zIndex=void 0):"clampToSeaFloor"===S?e$1Q("kml-altitudeMode-clampToSeaFloor","KML - altitudeMode clampToSeaFloor is currently not supported, treating as clampToGround."):t$$(S)&&e$1Q("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+S)}function Ke$3(e,t,i,n){e._unsupportedNode.raiseEvent(e,i.parentEntity,t,i.entityCollection,i.styleCollection,i.sourceResource,i.uriResolver),e$1Q("kml-unsupportedFeature-"+t.nodeName,"KML - Unsupported feature: "+t.nodeName)}var te$a={INTERVAL:0,EXPIRE:1,STOP:2};function be$e(e){if(!t$$(e)||0===e.length)return"";var t=e[0];return("&"===t||"?"===t)&&(e=e.substring(1)),e}var Do$2=new s$1p,ue$8=new i$1g,Ge$5=new r$T,Ao$2=new a$11;function We$6(e,t,i,n,r,o){function a(e){return e<-n$1d.PI_OVER_TWO?-n$1d.PI_OVER_TWO:e>n$1d.PI_OVER_TWO?n$1d.PI_OVER_TWO:e}function s(e){return e>n$1d.PI?e-n$1d.TWO_PI:e<-n$1d.PI?e+n$1d.TWO_PI:e}var l=a$Y(e.queryParameters);if(l=l.replace(/%5B/g,"[").replace(/%5D/g,"]"),t$$(t)&&t._mode!==b$1d.MORPHING){var u,c;if(r=e$1Y(r,Do$2),t$$(i)&&(Ge$5.x=.5*i.clientWidth,Ge$5.y=.5*i.clientHeight,u=t.pickEllipsoid(Ge$5,o,Ao$2)),t$$(u)?c=o.cartesianToCartographic(u,ue$8):(c=s$1p.center(r,ue$8),u=o.cartographicToCartesian(c)),t$$(n)&&!n$1d.equalsEpsilon(n,1,n$1d.EPSILON9)){var h=r.width*n*.5,d=r.height*n*.5;r=new s$1p(s(c.longitude-h),a(c.latitude-d),s(c.longitude+h),a(c.latitude+d))}l=(l=(l=(l=l.replace("[bboxWest]",n$1d.toDegrees(r.west).toString())).replace("[bboxSouth]",n$1d.toDegrees(r.south).toString())).replace("[bboxEast]",n$1d.toDegrees(r.east).toString())).replace("[bboxNorth]",n$1d.toDegrees(r.north).toString());var f=n$1d.toDegrees(c.longitude).toString(),p=n$1d.toDegrees(c.latitude).toString();l=(l=(l=(l=(l=(l=(l=(l=l.replace("[lookatLon]",f)).replace("[lookatLat]",p)).replace("[lookatTilt]",n$1d.toDegrees(t.pitch).toString())).replace("[lookatHeading]",n$1d.toDegrees(t.heading).toString())).replace("[lookatRange]",a$11.distance(t.positionWC,u))).replace("[lookatTerrainLon]",f)).replace("[lookatTerrainLat]",p)).replace("[lookatTerrainAlt]",c.height.toString()),o.cartesianToCartographic(t.positionWC,ue$8),l=(l=(l=l.replace("[cameraLon]",n$1d.toDegrees(ue$8.longitude).toString())).replace("[cameraLat]",n$1d.toDegrees(ue$8.latitude).toString())).replace("[cameraAlt]",n$1d.toDegrees(ue$8.height).toString());var _=t.frustum,m=_.aspectRatio,$="",g="";if(t$$(m)){var y=n$1d.toDegrees(_.fov);m>1?($=y,g=y/m):(g=y,$=y*m)}l=(l=l.replace("[horizFov]",$.toString())).replace("[vertFov]",g.toString())}else l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=l.replace("[bboxWest]","-180")).replace("[bboxSouth]","-90")).replace("[bboxEast]","180")).replace("[bboxNorth]","90")).replace("[lookatLon]","")).replace("[lookatLat]","")).replace("[lookatRange]","")).replace("[lookatTilt]","")).replace("[lookatHeading]","")).replace("[lookatTerrainLon]","")).replace("[lookatTerrainLat]","")).replace("[lookatTerrainAlt]","")).replace("[cameraLon]","")).replace("[cameraLat]","")).replace("[cameraAlt]","")).replace("[horizFov]","")).replace("[vertFov]","");t$$(i)?l=(l=l.replace("[horizPixels]",i.clientWidth)).replace("[vertPixels]",i.clientHeight):l=(l=l.replace("[horizPixels]","")).replace("[vertPixels]",""),l=(l=(l=(l=(l=l.replace("[terrainEnabled]","1")).replace("[clientVersion]","1")).replace("[kmlVersion]","2.2")).replace("[clientName]","Cesium")).replace("[language]","English"),e.setQueryParameters(m$19(l))}function Vo$2(e,t,i,n){var r=Le$a(e,t,i).entity,o=i.sourceResource,a=i.uriResolver,s=S$l(t,"Link",s$k.kml);if(t$$(s)||(s=S$l(t,"Url",s$k.kml)),t$$(s)){var l,u,c=w$v(s,"href",s$k.kml);if(t$$(c)){var h=c;if(c=_e$8(c,o,i.uriResolver),/^data:/.test(c.getUrlComponent()))/\.kmz/i.test(o.getUrlComponent())||(h=o.getDerivedResource({url:h}));else{h=c.clone(),l=w$v(s,"viewRefreshMode",s$k.kml),u=e$1Y(w$v(s,"viewBoundScale",s$k.kml),1);var d="onStop"===l?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",f=e$1Y(w$v(s,"viewFormat",s$k.kml),d),p=w$v(s,"httpQuery",s$k.kml);t$$(f)&&c.setQueryParameters(m$19(be$e(f))),t$$(p)&&c.setQueryParameters(m$19(be$e(p)));var _=e._ellipsoid;We$6(c,e._camera,e._canvas,u,e._lastCameraView.bbox,_)}var m={sourceUri:h,uriResolver:a,context:r.id},$=new r$n,g=qe$6(e,$,c,m).then((function(t){var i=e._entityCollection,n=$.values;i.suspendEvents();for(var o=0;o<n.length;o++){var a=n[o];t$$(a.parent)||(a.parent=r,He$6(a)),i.add(a)}i.resumeEvents();var h=w$v(s,"refreshMode",s$k.kml),d=e$1Y(T$q(s,"refreshInterval",s$k.kml),0);if("onInterval"===h&&d>0||"onExpire"===h||"onStop"===l){var f=S$l(t,"NetworkLinkControl",s$k.kml),p=t$$(f),_=o$10.now(),m={id:t$U(),href:c,cookie:{},lastUpdated:_,updating:!1,entity:r,viewBoundScale:u,needsUpdate:!1,cameraUpdateTime:_},g=0;if(p&&(m.cookie=m$19(e$1Y(w$v(f,"cookie",s$k.kml),"")),g=e$1Y(T$q(f,"minRefreshPeriod",s$k.kml),0)),"onInterval"===h)p&&(d=Math.max(g,d)),m.refreshMode=te$a.INTERVAL,m.time=d;else if("onExpire"===h){var y;if(p&&(y=w$v(f,"expires",s$k.kml)),t$$(y))try{var v=o$10.fromIso8601(y),x=o$10.secondsDifference(v,_);x>0&&x<g&&o$10.addSeconds(_,g,v),m.refreshMode=te$a.EXPIRE,m.time=v}catch{e$1Q("kml-refreshMode-onInterval-onExpire","KML - NetworkLinkControl expires is not a valid date")}else e$1Q("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element")}else e._camera?(m.refreshMode=te$a.STOP,m.time=e$1Y(T$q(s,"viewRefreshTime",s$k.kml),0)):e$1Q("kml-refrehMode-onStop-noCamera","A NetworkLink with viewRefreshMode=onStop requires a camera be passed in when creating the KmlDataSource");t$$(m.refreshMode)&&e._networkLinks.set(m.id,m)}else"onRegion"===l&&e$1Q("kml-refrehMode-onRegion","KML - Unsupported viewRefreshMode: onRegion")})).otherwise((function(t){e$1Q("An error occured during loading "+c.url),e._error.raiseEvent(e,t)}));n.addPromise(g)}}}function Fo$2(e,t,i,n){var r=De$d[t.localName];return t$$(r)?r(e,t,i,n):Ke$3(e,t,i)}function Se$b(e,t,i,n,r,o){t.removeAll();var a=i.documentElement,s=w$v("Document"===a.localName?a:S$l(a,"Document",s$k.kml),"name",s$k.kml);t$$(s)||(s=a$J(n.getUrlComponent())),t$$(e._name)||(e._name=s);var l=new D$t._DeferredLoading(e),u=new r$n(e);return c$18.all(yt$3(e,i,u,n,!1,r)).then((function(){var a=i.documentElement;if("kml"===a.localName)for(var s=a.childNodes,c=0;c<s.length;c++){var h=s[c];if(t$$(De$d[h.localName])){a=h;break}}var d={parentEntity:void 0,entityCollection:t,styleCollection:u,sourceResource:n,uriResolver:r,context:o};return t.suspendEvents(),Fo$2(e,a,d,l),t.resumeEvents(),l.wait().then((function(){return i.documentElement}))}))}function Bo$2(e,t,i,n){var r=c$18.defer();return he$a.createReader(new he$a.BlobReader(i),(function(i){i.getEntries((function(o){for(var a,s,l=[],u={},c=0;c<o.length;c++){var h=o[c];if(!h.directory){var d=c$18.defer();l.push(d.promise),!/\.kml$/i.test(h.filename)||t$$(a)&&/\//i.test(h.filename)?pt$4(h,u,d):(t$$(a)&&pt$4(a,u,s),a=h,s=d)}}t$$(a)&&ho$2(a,u,s),c$18.all(l).then((function(){if(i.close(),t$$(u.kml))return u.keys=Object.keys(u),Se$b(e,t,u.kml,n,u);r.reject(new t$Z("KMZ file does not contain a KML document."))})).then(r.resolve).otherwise(r.reject)}))}),(function(e){r.reject(e)})),r.promise}function qe$6(e,t,i,n){var r=(n=e$1Y(n,e$1Y.EMPTY_OBJECT)).sourceUri,o=n.uriResolver,a=n.context,s=i;if("string"==typeof i||i instanceof t$X){s=(i=t$X.createIfNeeded(i)).fetchBlob(),r=e$1Y(r,i.clone());var l=e._resourceCredits,u=i.credits;if(t$$(u))for(var c=u.length,h=0;h<c;h++)l.push(u[h])}else r=e$1Y(r,t$X.DEFAULT.clone());return r=t$X.createIfNeeded(r),c$18(s).then((function(i){return i instanceof Blob?vo$2(i).then((function(n){return n?Bo$2(e,t,i,r):mt$3(i).then((function(i){var n,s;i=ut$4(i=dt$5(i));try{n=we$9.parseFromString(i,"application/xml")}catch(e){s=e.toString()}if(t$$(s)||n.body||"parsererror"===n.documentElement.tagName){var l=t$$(s)?s:n.documentElement.firstChild.nodeValue;throw l||(l=n.body.innerText),new t$Z(l)}return Se$b(e,t,n,r,o,a)}))})):Se$b(e,t,i,r,o,a)})).otherwise((function(t){return e._error.raiseEvent(e,t),console.log(t),c$18.reject(t)}))}function D$t(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).camera,i=e.canvas;if(!t$$(t))throw new t$_("options.camera is required.");if(!t$$(i))throw new t$_("options.canvas is required.");this._changed=new o$15,this._error=new o$15,this._loading=new o$15,this._refresh=new o$15,this._unsupportedNode=new o$15,this._clock=void 0,this._entityCollection=new r$n(this),this._name=void 0,this._isLoading=!1,this._pinBuilder=new h$T,this._networkLinks=new e$1F,this._entityCluster=new a$s,this._canvas=i,this._camera=t,this._lastCameraView={position:t$$(t)?a$11.clone(t.positionWC):void 0,direction:t$$(t)?a$11.clone(t.directionWC):void 0,up:t$$(t)?a$11.clone(t.upWC):void 0,bbox:t$$(t)?t.computeViewRectangle():s$1p.clone(s$1p.MAX_VALUE)},this._ellipsoid=e$1Y(e.ellipsoid,n$1c.WGS84),this._visibleViewport=4095;var n=e.credit;"string"==typeof n&&(n=new i$17(n)),this._credit=n,this._resourceCredits=[]}function He$6(e){var t=e.parent;if(t$$(t)){var i=t.availability;if(t$$(i)){var n=e.availability;t$$(n)?n.intersect(i):e.availability=i}}}function Ko$2(e,t,i,n,r){return function(o){if(n.contains(t.id)){var a=!1,s=S$l(o,"NetworkLinkControl",s$k.kml),l=0;if(t$$(s)){if(t$$(S$l(s,"Update",s$k.kml)))return e$1Q("kml-networkLinkControl-update","KML - NetworkLinkControl updates aren't supported."),t.updating=!1,void n.remove(t.id);t.cookie=m$19(e$1Y(w$v(s,"cookie",s$k.kml),"")),l=e$1Y(T$q(s,"minRefreshPeriod",s$k.kml),0)}var u=o$10.now(),c=t.refreshMode;if(c===te$a.INTERVAL)t$$(s)&&(t.time=Math.max(l,t.time));else if(c===te$a.EXPIRE){var h;if(t$$(s)&&(h=w$v(s,"expires",s$k.kml)),t$$(h))try{var d=o$10.fromIso8601(h),f=o$10.secondsDifference(d,u);f>0&&f<l&&o$10.addSeconds(u,l,d),t.time=d}catch{e$1Q("kml-networkLinkControl-expires","KML - NetworkLinkControl expires is not a valid date"),a=!0}else e$1Q("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element"),a=!0}var p=t.entity,_=e._entityCollection,m=i.values;_.suspendEvents();var $,g=_.values.slice();for($=0;$<g.length;++$){var y=g[$];y.parent===p&&(y.parent=void 0,P(y))}for(_.resumeEvents(),_.suspendEvents(),$=0;$<m.length;$++){var v=m[$];t$$(v.parent)||(v.parent=p,He$6(v)),_.add(v)}_.resumeEvents(),a?n.remove(t.id):t.lastUpdated=u;var x=_.computeAvailability(),b=x.start,S=x.stop,w=o$10.equals(b,f$S.MINIMUM_VALUE),C=o$10.equals(S,f$S.MAXIMUM_VALUE);if(!w||!C){var T=e._clock;(T.startTime!==b||T.stopTime!==S)&&(T.startTime=b,T.stopTime=S,e._changed.raiseEvent(e))}t.updating=!1,t.needsUpdate=!1,e._refresh.raiseEvent(e,r.getUrlComponent(!0))}function P(e){_.remove(e);for(var t=e._children,i=t.length,n=0;n<i;++n)P(t[n])}}}D$t.load=function(e,t){return new D$t(t=e$1Y(t,e$1Y.EMPTY_OBJECT)).load(e,t)},Object.defineProperties(D$t.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},s3mInstanceCollection:{get:function(){return this._s3mInstanceCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},refreshEvent:{get:function(){return this._refresh}},unsupportedNodeEvent:{get:function(){return this._unsupportedNode}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!t$$(e))throw new t$_("value must be defined.");this._entityCluster=e}},credit:{get:function(){return this._credit}}}),D$t.prototype.load=function(e,t){if(!t$$(e))throw new t$_("data is required.");t=e$1Y(t,e$1Y.EMPTY_OBJECT),o$w.setLoading(this,!0);var i=this._name;this._name=void 0,this._clampToGround=e$1Y(t.clampToGround,!1),this._clampToS3M=e$1Y(t.clampToS3M,!1),this._classificationType=e$1Y(t.classificationType,_0x29401c.TERRAIN);var n=this;return qe$6(this,this._entityCollection,e,t).then((function(){var e,t,r=n._entityCollection.computeAvailability(),o=r.start,a=r.stop,s=o$10.equals(o,f$S.MINIMUM_VALUE),l=o$10.equals(a,f$S.MAXIMUM_VALUE);s&&l||(s&&((t=new Date).setHours(0,0,0,0),o=o$10.fromDate(t)),l&&((t=new Date).setHours(24,0,0,0),a=o$10.fromDate(t)),(e=new t$r).startTime=o,e.stopTime=a,e.currentTime=o$10.clone(o),e.clockRange=tt$j.LOOP_STOP,e.clockStep=g$M.SYSTEM_CLOCK_MULTIPLIER,e.multiplier=Math.round(Math.min(Math.max(o$10.secondsDifference(a,o)/60,1),31556900)));var u=!1;return e!==n._clock&&(n._clock=e,u=!0),i!==n._name&&(u=!0),u&&n._changed.raiseEvent(n),o$w.setLoading(n,!1),n})).otherwise((function(e){return o$w.setLoading(n,!1),n._error.raiseEvent(n,e),console.log(e),c$18.reject(e)}))};var ze$8=new e$1F;function Go$2(){this.author={name:void 0,uri:void 0,email:void 0},this.link={href:void 0,hreflang:void 0,rel:void 0,type:void 0,title:void 0,length:void 0},this.address=void 0,this.phoneNumber=void 0,this.snippet=void 0,this.extendedData=void 0}function Wo$2(e,t,i,n){var r=(n=e$1Y(n,e$1Y.EMPTY_OBJECT)).sourceUri;return c$18(mt$3(i)).then((function(i){var n,o;try{n=we$9.parseFromString(i,"application/xml")}catch(e){o=e.toString()}if(t$$(o)||n.body||"parsererror"===n.documentElement.tagName){var a=t$$(o)?o:n.documentElement.firstChild.nodeValue;throw a||(a=n.body.innerText),new t$Z(a)}return Se$b(e,t,n,r,void 0)}))}function qo$2(e,t,i,n,r,o,a,s){var l,u=S$l(i,"Location",s$k.kml),c=w$v(i,"altitudeMode",s$k.kml),h=w$v(i,"altitudeMode",s$k.gx),d=S$l(i,"Orientation",s$k.kml),f=T$q(d,"heading",s$k.kml),p=T$q(d,"tilt",s$k.kml),_=T$q(d,"roll",s$k.kml),m=S$l(i,"Scale",s$k.kml),$=T$q(m,"x",s$k.kml),g=T$q(m,"y",s$k.kml),y=T$q(m,"z",s$k.kml),v=w$v(S$l(i,"Link",s$k.kml),"href",s$k.kml);if(t$$(s)&&(l=s[v]),-1!==(v=_e$8(v,a,s)).url.indexOf(".s3m")){t$$(e._s3mInstanceCollection)||(e._s3mInstanceCollection=new _0x1bf60e(e._camera._scene.context),e._camera._scene.primitives.add(e._s3mInstanceCollection));var x=de$a(w$v(u,"longitude",s$k.kml)+","+w$v(u,"latitude",s$k.kml)+","+w$v(u,"altitude",s$k.kml)),b=-n$1d.toRadians(f),S=n$1d.toRadians(p),w=n$1d.toRadians(_);return e._s3mInstanceCollection.add(v.url,[{position:x,scale:new a$11($,g,y),hpr:new e$1L(b,S,w)}]),!0}var C=S$l(u,"MultiTrack",s$k.gx);if(t$$(C))r.billboard=new s$W({show:!1}),r.label=new s$P({show:!1}),St$4(e,t,C,n,r),n.orientation=new e$F(n.position);else{x=de$a(w$v(u,"longitude",s$k.kml)+","+w$v(u,"latitude",s$k.kml)+","+w$v(u,"altitude",s$k.kml));n.position=Mt$4(new t$B(x),c,h);var T=m$13.headingPitchRollQuaternion(x,e$1L.fromDegrees(f,p,_));n.orientation=T}return n.model={uri:v.url,minimumPixelSize:16,maximumScale:16,scale:new a$11($,g,y),blob:l},!0}D$t.prototype.update=function(e){var t=this._networkLinks;if(0===t.length)return!0;var i=o$10.now(),n=this;function r(e){for(var t=e._children,i=t.length,n=0;n<i;++n){var o=t[n];ze$8.set(o.id,o),r(o)}}ze$8.removeAll();var o=!1,a=this._lastCameraView,s=this._camera;t$$(s)&&!(s.positionWC.equalsEpsilon(a.position,n$1d.EPSILON7)&&s.directionWC.equalsEpsilon(a.direction,n$1d.EPSILON7)&&s.upWC.equalsEpsilon(a.up,n$1d.EPSILON7))&&(a.position=a$11.clone(s.positionWC),a.direction=a$11.clone(s.directionWC),a.up=a$11.clone(s.upWC),a.bbox=s.computeViewRectangle(),o=!0);var l=new e$1F,u=!1;return t.values.forEach((function(e){var t=e.entity;if(!ze$8.contains(t.id)){if(!e.updating){var s=!1;if(e.refreshMode===te$a.INTERVAL?o$10.secondsDifference(i,e.lastUpdated)>e.time&&(s=!0):e.refreshMode===te$a.EXPIRE?o$10.greaterThan(i,e.time)&&(s=!0):e.refreshMode===te$a.STOP&&(o&&(e.needsUpdate=!0,e.cameraUpdateTime=i),e.needsUpdate&&o$10.secondsDifference(i,e.cameraUpdateTime)>=e.time&&(s=!0)),s){r(t),e.updating=!0;var c=new r$n,h=e.href.clone();h.setQueryParameters(e.cookie);var d=e$1Y(n._ellipsoid,n$1c.WGS84);We$6(h,n._camera,n._canvas,e.viewBoundScale,a.bbox,d),qe$6(n,c,h,{context:t.id}).then(Ko$2(n,e,c,l,h)).otherwise((function(t){var i="NetworkLink "+e.href+" refresh failed: "+t;console.log(i),n._error.raiseEvent(n,i)})),u=!0}}l.set(e.id,e)}})),u&&(this._networkLinks=l,this._changed.raiseEvent(this)),!0},D$t.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$_("the index is 0~8");return 1<<e&this._visibleViewport},D$t.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$_("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport,t$$(this._s3mInstanceCollection)&&this._s3mInstanceCollection.setVisibleInViewport(e,t)},D$t.importFile=function(e,t){return new D$t(t=e$1Y(t,e$1Y.EMPTY_OBJECT)).read(e,t)},D$t.prototype.read=function(e,t){if(!t$$(e))throw new t$_("data is required.");o$w.setLoading(this,!0);var i=this._name;this._name=void 0,this._promises=[];var n=this;return Wo$2(this,this._entityCollection,e,t).then((function(){return c$18.all(n._promises,(function(){var e,t,r=n._entityCollection.computeAvailability(),o=r.start,a=r.stop,s=o$10.equals(o,f$S.MINIMUM_VALUE),l=o$10.equals(a,f$S.MAXIMUM_VALUE);s&&l||(s&&((t=new Date).setHours(0,0,0,0),o=o$10.fromDate(t)),l&&((t=new Date).setHours(24,0,0,0),a=o$10.fromDate(t)),(e=new t$r).startTime=o,e.stopTime=a,e.currentTime=o$10.clone(o),e.clockRange=tt$j.LOOP_STOP,e.clockStep=g$M.SYSTEM_CLOCK_MULTIPLIER,e.multiplier=Math.round(Math.min(Math.max(o$10.secondsDifference(a,o)/60,1),31556900)));var u=!1;return e!==n._clock&&(n._clock=e,u=!0),i!==n._name&&(u=!0),u&&n._changed.raiseEvent(n),o$w.setLoading(n,!1),n._promises=void 0,n}))})).otherwise((function(e){return o$w.setLoading(n,!1),n._error.raiseEvent(n,e),console.log(e),c$18.reject(e)}))},D$t._DeferredLoading=Q$j,D$t._getTimestamp=yt$9;var h$o=e$1z.WHITE,d$o=e$1z.BLACK,a$l=1;function e$x(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._definitionChanged=new o$15,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,this.vtime=3.14*Math.random(),this._bAsy=e$1Y(e.bAsy,!0),this._speedRatio=e$1Y(e.speedRatio,1)}function r$i(){t$_.throwInstantiationError()}Object.defineProperties(e$x.prototype,{isConstant:{get:function(){return r$w.isConstant(this._color)&&r$w.isConstant(this._outlineColor)&&r$w.isConstant(this._outlineWidth)}},definitionChanged:{get:function(){return this._definitionChanged}},color:v$J("color"),outlineColor:v$J("outlineColor"),outlineWidth:v$J("outlineWidth")}),e$x.prototype.getType=function(e){return"PolylineDynamic"},e$x.prototype.getValue=function(e,t){return t$$(t)||(t={}),t.color=r$w.getValueOrClonedDefault(this._color,e,h$o,t.color),t.outlineColor=r$w.getValueOrClonedDefault(this._outlineColor,e,d$o,t.outlineColor),t.outlineWidth=r$w.getValueOrDefault(this._outlineWidth,e,a$l),t.bAsy=1==this._bAsy?1:0,t.v_time=618e-6*performance.now()-1.9788000000000001-this.vtime,t.v_time*=this._speedRatio,t},e$x.prototype.equals=function(e){return this===e||e instanceof e$x&&r$w.equals(this._color,e._color)&&r$w.equals(this._outlineColor,e._outlineColor)&&r$w.equals(this._outlineWidth,e._outlineWidth)},r$i.prototype.update=t$_.throwInstantiationError,r$i.prototype.getBoundingSphere=t$_.throwInstantiationError,r$i.prototype.isDestroyed=t$_.throwInstantiationError,r$i.prototype.destroy=t$_.throwInstantiationError;var e$w={NONE:0,CATMULL_ROM:1},hi$2=Object.freeze(e$w),e$v={StopPause:"StopPause",StopAround:"StopAround"},N$j=Object.freeze(e$v);function n$t(e){this._duration=e$1Y(e.duration,10),this._waitTime=e$1Y(e.waitTime,0),this._point=e.point,this._heading=e$1Y(e.heading,0),this._tilt=e$1Y(e.tilt,0),this._stopName=e.stopName,this._speed=e$1Y(e.speed,0),this._stopPlayMode=e.stopPlayMode||N$j.StopPause,this._surroundDuration=e$1Y(e.surroundDuration,0),this._promise=void 0,this._index=e$1Y(e.index,0),this._nextStopIndex=void 0,this._preStopIndex=void 0,this._isConvert=e$1Y(e.isConvert,!0)}Object.defineProperties(n$t.prototype,{duration:{get:function(){return this._duration},set:function(e){e&&(this._duration=e)}},waitTime:{get:function(){return this._waitTime},set:function(e){e&&!this._isGenerated&&(this._waitTime=e)}},heading:{get:function(){return this._heading},set:function(e){e&&(this._heading=e)}},tilt:{get:function(){return this._tilt},set:function(e){e&&(this._tilt=e)}},stopName:{get:function(){return this._stopName},set:function(e){e&&(this._stopName=e)}},point:{get:function(){return this._point},set:function(e){this._point=e}},speed:{get:function(){return this._speed},set:function(e){e&&(this._speed=e)}},stopPlayMode:{get:function(){return this._stopPlayMode},set:function(e){e&&(this._stopPlayMode=e)}},surroundDuration:{get:function(){return this._surroundDuration},set:function(e){e&&(this._surroundDuration=e)}},index:{get:function(){return this._index}},promise:{get:function(){return this._promise},set:function(e){e&&(this._promise=e)}}});var e$u={Smoothly:0,Directly:1},g$k=Object.freeze(e$u),n$s={Playing:0,Pause:1,Stop:2,Wait:3},y$p;function l$i(e){var t=e.scene,i=e.routes;if(!t)throw new t$_("scene is required!");if(!i)throw new t$_("routes is required!");this._routes=i,this._scene=t,this._currentStopIndex=0,this._dynamicCurrentStopIndex=0,this._currentTween=void 0,this._stopArrived=new o$15,this._playRate=1,this._flyStatus=n$s.Stop,this._turningMode=g$k.Smoothly,this._interpolationMode=hi$2.NONE}function c$n(e,t,i){e._flyStatus=n$s.Playing;var n=e._scene.camera,r=e._routes.routes[0],o=r._catmullRomSpline,a=e._interpolationMode,s=r.isFlyLoop,l=r.isHeadingFree,u=r.isTiltFree,c=r.isAltitudeFree,h=e$1Y(r._stopCollection.get(t),r._stopCollection._array[t]);if(!h)return!0===s?(t=r._stopCollection._array[0].index,t$$(o)&&(o._lastTimeIndex=0),e._dynamicCurrentStopIndex=t,e.currentStopIndex=t,void c$n(e,t)):void(e._flyStatus=n$s.Stop);if(t===e.currentStopIndex){var d=r.isAlongline&&t$$(h.direction)&&!u?{direction:h.direction,up:h.up}:{heading:h.heading,pitch:h.tilt,roll:0};n.setView({destination:h.point,orientation:d,convert:h._isConvert}),t++,c$n(e,t)}else{if(h._bImmediately){d=r.isAlongline&&t$$(h.direction)&&!u?{direction:h.direction,up:h.up}:{heading:h.heading,pitch:h.tilt,roll:0};return n.setView({destination:h.point,orientation:d,convert:h._isConvert}),void v$q(e,h,t)}var f=e$1Y(r._stopCollection.get(t-1),r._stopCollection.get(h._preStopIndex));t$$(i)&&(f=i);var p,_=f.altitude<h.altitude?f.altitude:h.altitude;if(f.stopPlayMode===N$j.StopAround)p=f.surroundDuration;else{if(t$$(i)){var m=a$11.distance(i.point,h.point);f.duration=m/f.speed}p=f.duration}p/=e._playRate;d=r.isAlongline&&t$$(h.direction)&&!u?{direction:h.direction,up:h.up}:{heading:h.heading,pitch:h.tilt,roll:0};var $=!1;if(e._turningMode===g$k.Directly&&t$$(f.direction)){d={direction:f.direction,up:f.up};$=!0}n.flyTo({convert:h._isConvert,destination:h.point,orientation:d,maximumHeight:_,duration:p,headingFree:l,pitchFree:u,altitudeFree:c,directTurning:$,catmullRomSpline:o,preStopIndex:t-1,interpolationMode:a,easingFunction:_$T.LINEAR_NONE,complete:function(){v$q(e,h,t)}})}}function v$q(e,t,i){if(y$p&&clearTimeout(y$p),e._dynamicCurrentStopIndex=t._index,i=e$1Y(t._nextStopIndex,t._index+1),e._stopArrived.raiseEvent(t),t.promise)c$18(t.promise,(function(){var n=t.waitTime;n>0?setTimeout((function(){c$n(e,i)}),1e3*n):c$n(e,i)}));else{var n=t.waitTime;n>0?(e._flyStatus=n$s.Wait,y$p=setTimeout((function(){e._flyStatus===n$s.Wait&&(e._flyStatus=n$s.Playing,c$n(e,i))}),1e3*n)):c$n(e,i)}}function _$m(e){e=e||{},this._stopCollection=new e$1F,this._isStopVisible=e$1Y(e.isStopVisible,!1),this._stopMarkCollection=[],this._isFlyLoop=e$1Y(e.isFlyLoop,!1),this._isLineVisible=e$1Y(e.isLineVisible,!1),this._lineEntity=void 0,this._routeName=e$1Y(e.routeName,""),this._speed=e$1Y(e.speed,50),this._isAlongline=e$1Y(e.isAlongline,!1),this._totalDuration=e$1Y(e.totalDuration,0),this._isHeadingFree=!this._isAlongline&&e$1Y(e.isHeadingFree,!1),this._isTiltFree=e$1Y(e.isTiltFree,!1),this._isAltitudeFree=e$1Y(e.isAltitudeFree,!1),this._entityCollection=e.entityCollection,this._catmullRomSpline=void 0,this._isCleared=!1,this._stopsInfo=e$1Y(e.stopsInfo,{}),this._removeIndex=[],this._addedStops=[]}function c$m(e){this._entityCollection=e,this._routes=[],this._ready=!1,this._readyPromise=c$18.defer()}function y$o(e,t){for(var i=e,n=t.firstChild,r=n.namespaceURI,o=v$p(n,"route",r),a=0,s=o.length;a<s;a++){var l=o[a],u=v$p(l,"routestop",r),c=I$o(l,"speed"),h=U$l(l,"name"),d=l$h(l,"showroutestop"),f=l$h(l,"showrouteline"),p=l$h(l,"flycircle"),_=l$h(l,"alongline"),m=l$h(l,"headingfree"),$=l$h(l,"tiltfree"),g=l$h(l,"altitudefree"),y=new _$m({entityCollection:i._entityCollection,routeName:h,speed:c,isLineVisible:f,isFlyLoop:p,isStopVisible:d,isAlongline:_,isHeadingFree:m,isTiltFree:$,isAltitudeFree:g,stopsInfo:{stopNodes:u,namespace:r}});y.init(),i.addRoute(y),i._ready=!0}i._readyPromise.resolve()}function I$o(e,t){if(t$$(e)){var i=e.getAttribute(t);if(null!==i){var n=parseFloat(i);return isNaN(n)?void 0:n}}}function U$l(e,t){if(t$$(e)){var i=e.getAttribute(t);return null!==i?i:void 0}}function l$h(e,t){if(t$$(e)){var i=e.getAttribute(t);if("false"===(i=i.toLowerCase()))return!1;if("true"===i)return!0}}function v$p(e,t,i){if(!t$$(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}function n$r(){this.Name="",this.NumParts=0,this.NumPoints=0,this.Parts=[],this.Points=[],this.Description="",this.Color=new e$1z(1,1,1),this.Radius=.02}function M$r(e,t){this.a0=80,this.r=35.187*.001,t$$(t)?(this.a0=e,this.r=t,this.m_sag=new P$g(e,t)):t$$(e)&&(this.m_sag=new P$g(e)),this.enuCenters=[]}Object.defineProperties(l$i.prototype,{routes:{get:function(){return this._routes},set:function(e){e&&(this._routes=e)}},stopArrived:{get:function(){return this._stopArrived}},currentStopIndex:{get:function(){return t$$(this._routes.routes[0]._stopCollection.get(this._currentStopIndex))||(this._dynamicCurrentStopIndex=this._currentStopIndex=this._routes.routes[0]._stopCollection._array[0].index),this._currentStopIndex},set:function(e){if(t$$(e)&&1==this._routes.ready){var t=this._routes.routes[0].stopCollection.length-1;e=(e=e>t?t:e)<0?0:e,this._currentStopIndex=e}}},currentRoute:{get:function(){if(this._routes.ready)return this._routes.routes[0]}},readyPromise:{get:function(){return this._routes.readyPromise}},playRate:{get:function(){return this._playRate},set:function(e){if(e&&0!==e&&this._playRate!==e&&(this._playRate=e,this._flyStatus===n$s.Playing)){this._scene.camera.cancelFlight();var t=this._routes.routes[0].get(this._dynamicCurrentStopIndex),i=new n$t({});for(var n in t)i[n]=t[n];i.point=this._scene.camera._position,c$n(this,this._dynamicCurrentStopIndex+1,i)}}},turningMode:{get:function(){return this._turningMode},set:function(e){this._turningMode=e}},interpolationMode:{get:function(){return this._interpolationMode},set:function(e){this._interpolationMode=e}}}),l$i.prototype.play=function(){if(this.currentRoute&&this._flyStatus!==n$s.Playing)if(this._flyStatus===n$s.Pause||this._flyStatus===n$s.Wait)this._currentTween&&this._scene.camera._currentFlight?(this._currentTween.tweenjs.endPause(),this._flyStatus=n$s.Playing):c$n(this,this._dynamicCurrentStopIndex+1);else{if(this.currentStopIndex>=this._routes.routes[0].stopCollection[this._routes.routes[0].stopCollection.length-1].index)return void(this._flyStatus=n$s.Stop);c$n(this,this.currentStopIndex)}},l$i.prototype.pause=function(){this._flyStatus===n$s.Playing?(this._currentTween=this._scene.camera._currentFlight,this._currentTween&&this._currentTween.tweenjs&&this._currentTween.tweenjs.pause(),this._flyStatus=n$s.Pause):this._flyStatus===n$s.Wait&&(this._flyStatus=n$s.Pause)},l$i.prototype.stop=function(){this._currentTween=this._scene.tweens.get(0),this._currentTween&&this._flyStatus!==n$s.Stop?(this._currentTween.cancelTween(),this._flyStatus=n$s.Stop,this._currentTween=void 0):this._flyStatus===n$s.Wait&&(this._flyStatus=n$s.Stop),this._dynamicCurrentStopIndex=this._currentStopIndex},l$i.prototype.viewToStop=function(e){if(e&&this._flyStatus!==n$s.Playing){var t=this._scene.camera,i={heading:e.heading,pitch:e.tilt,roll:0};t.setView({destination:e.point,orientation:i,convert:e._isConvert}),this._dynamicCurrentStopIndex=e.index}},l$i.prototype.getAllRouteStops=function(){return this.currentRoute?this.currentRoute.stopCollection:[]},Object.defineProperties(_$m.prototype,{stopCollection:{get:function(){return this._stopCollection.values}},isStopVisible:{get:function(){return this._isStopVisible},set:function(e){t$$(e)&&e!==this._isStopVisible&&(this._isStopVisible=e,this.setStopVisible())}},isFlyLoop:{get:function(){return this._isFlyLoop},set:function(e){e&&(this._isFlyLoop=e)}},isLineVisible:{get:function(){return this._isLineVisible},set:function(e){t$$(e)&&e!==this._isLineVisible&&(this._isLineVisible=e,this.setLineVisible())}},lineEntity:{get:function(){return this._lineEntity},set:function(e){t$$(e)&&(this._lineEntity=e)}},routeName:{get:function(){return this._routeName},set:function(e){e&&(this._routeName=e)}},speed:{get:function(){return this._speed},set:function(e){if(e&&e!=this._speed){this._speed=e;for(var t=this.speed,i=this.stopCollection,n=0,r=i.length;n<r-1;n++){var o=i[n];o.duration=Math.ceil(o.distanceToNext/t)}}}},stopCount:{get:function(){return this._stopCollection.length}},isAlongline:{get:function(){return this._isAlongline},set:function(e){t$$(e)&&(this._isAlongline=e)}},totalDuration:{get:function(){return this._totalDuration}},isHeadingFree:{get:function(){return this._isHeadingFree},set:function(e){t$$(e)&&(this._isHeadingFree=e)}},isTiltFree:{get:function(){return this._isTiltFree},set:function(e){t$$(e)&&(this._isTiltFree=e)}},isAltitudeFree:{get:function(){return this._isAltitudeFree},set:function(e){t$$(e)&&(this._isAltitudeFree=e)}}}),_$m.prototype.init=function(){var e=0,t=[0],i=[],n=this._stopsInfo.stopNodes,r=this._stopsInfo.namespace;n=t$$(n)?n.concat(this._addedStops):this._addedStops;for(var o=0;o<n.length;o++)if(!(this._removeIndex.indexOf(o)>-1)){var a,s=n[o];if(s instanceof n$t){if(-1!==(a=s)._preStopIndex){var l=(C=this._stopCollection._array[a._preStopIndex]).point,u=a$11.distance(l,a.point);C.distanceToNext=u}}else{var c=f$10.queryFirstNode(s,"camera",r),h=f$10.queryNumericValue(c,"longitude",r),d=f$10.queryNumericValue(c,"latitude",r),f=f$10.queryNumericValue(c,"altitude",r),p=f$10.queryNumericValue(c,"heading",r);p=n$1d.toRadians(p);var _=f$10.queryNumericValue(c,"tilt",r);_=n$1d.toRadians(_-90),f$10.queryStringValue(c,"altitudeMode",r);var m,$=f$10.queryStringAttribute(s,"name"),g=f$10.queryNumericAttribute(s,"speed",r),y=f$10.queryFirstNode(s,"setting",r),v=f$10.queryStringValue(y,"stopPlayMode",r),x=f$10.queryNumericValue(y,"pauseTime",r),b=f$10.queryNumericValue(y,"angularSpeed",r),S=f$10.queryFirstNode(y,"stopViews",r),w=!0;h>180||d>180?(m=new a$11(h,d,f),w=!1):m=a$11.fromDegrees(h,d,f),i.push(m);var C,T=this.stopCount;if(o>0&&T>0)if((C=this._stopCollection._array[this._stopCollection.length-1]).stopPlayMode!=N$j.StopAround){l=C.point,u=a$11.distance(l,m);C.distanceToNext=u;var P,E=C.speed;P=0<E?E:this._speed,C.duration=u/P,C.speed=P,e+=C.duration,t.push(e)}(a=new n$t({index:o,point:m,heading:p,tilt:_,stopName:$,waitTime:x,speed:g,isConvert:w})).altitude=f}if(this._addStop(a),t$$(C)&&(C._nextStopIndex=o,a._preStopIndex=C.index),v===N$j.StopAround&&S){var A=queryChildNodes(S,"view",r);if(2==A.length){var L=A[0],M=A[1],I=f$10.queryNumericAttribute(L,"heading",r),O=f$10.queryNumericAttribute(M,"heading",r);f$10.queryNumericAttribute(L,"tilt",r),f$10.queryNumericAttribute(M,"tilt",r),f$10.queryNumericAttribute(L,"altitude",r),f$10.queryNumericAttribute(M,"altitude",r);var D=f$10.queryStringAttribute(L,"direction",r);f$10.queryStringAttribute(M,"direction",r);var R,N="Clockwise"===D?1:-1;n$1d.equalsEpsilon(I,O,n$1d.EPSILON15)?R=360:((R=O-I)<0&&"Clockwise"===D?R+=360:R>0&&"Clockwise"!==D&&(R=360-R),R=Math.abs(R));var F=R/b;a.surroundDuration=F/3,a.stopPlayMode=N$j.StopAround;var B=n$1d.toRadians(I),z=n$1d.toRadians(I+N*R/3),G=n$1d.toRadians(I+N*R*2/3),k=n$1d.toRadians(O),U=new n$t({point:m,heading:B,tilt:_,stopName:$,waitTime:x,speed:g,surroundDuration:F/3,stopPlayMode:N$j.StopAround});U._bImmediately=!0,U._isGenerated=!0,this._addStop(U);var V=new n$t({point:m,heading:z,tilt:_,stopName:$,waitTime:0,speed:g,surroundDuration:F/3,stopPlayMode:N$j.StopAround});V._isGenerated=!0,this._addStop(V);var W=new n$t({point:m,heading:G,tilt:_,stopName:$,waitTime:0,speed:g,surroundDuration:F/3,stopPlayMode:N$j.StopAround});W._isGenerated=!0,this._addStop(W);var H=new n$t({point:m,heading:k,tilt:_,stopName:$,waitTime:x,speed:g});this._addStop(H),e+=F}}}for(var Y=0;Y<this.stopCount-1;Y++){var j=this.stopCollection[Y],q=this.stopCollection[Y+1],X=new a$11(q.point.x-j.point.x,q.point.y-j.point.y,q.point.z-j.point.z);X.equals(a$11.ZERO)||(a$11.normalize(X,X),j.direction=X,j.up=m$13.buildUp(j.point,X),this._isTiltFree&&(j.heading=m$13.getHeading(j.direction,j.up)-n$1d.PI))}if(this.stopCount>2){var K=this.stopCollection[this.stopCollection.length-1],Z=this.stopCollection[this.stopCollection.length-2];K.direction=Z.direction,K.up=Z.up,this._isTiltFree&&(K.heading=m$13.getHeading(K.direction,K.up)-n$1d.PI)}i.length>=2&&(this._catmullRomSpline=new p$1e({times:t,points:i})),this.setStopVisible(),this._totalDuration=e},_$m.prototype._addStop=function(e){if(!e)throw new t$_("parameter stop is required!");if(!(e instanceof n$t))throw new t$_("parameter stop must be instanceof RouteStop!");if(this._stopCollection.set(e.index,e),t$$(this._entityCollection)&&this._isStopVisible){var t=this._entityCollection.add({position:e.point,billboard:{image:o$12("Assets/Textures/maki/grepin.png"),scale:.5}});this._stopMarkCollection.push(t)}if(this._isCleared&&this._stopCollection.length>2)if(t$$(this._catmullRomSpline)){var i=[].concat(this._catmullRomSpline.times),n=[].concat(this._catmullRomSpline.points),r=this._stopCollection.length>0?this._stopCollection._array[this._stopCollection.length-2]._duration:0,o=i.length>0?i[i.length-1]:0;i.push(o+r),n.push(e.point),this._catmullRomSpline=new p$1e({times:i,points:n})}else{for(var a=[0],s=[this._stopCollection._array[0].point],l=0,u=1;u<this._stopCollection.length;u++){var c=this._stopCollection._array[u],h=this._stopCollection._array[u-1];s.push(c.point),l+=h.duration,a.push(l)}this._catmullRomSpline=new p$1e({times:a,points:s})}return!0},_$m.prototype.addStop=function(e){if(!e)throw new t$_("parameter stop is required!");if(!(e instanceof n$t))throw new t$_("parameter stop must be instanceof RouteStop!");e._preStopIndex=this._stopsInfo.stopNodes.length+this._addedStops.length-1,e._index=e._preStopIndex+1,this._addedStops.push(e),this.clear(),this.init(),this.setLineVisible()},_$m.prototype.removeStop=function(e){this.clear(),-1===this._removeIndex.indexOf(e.index)&&this._removeIndex.push(e.index),this.init(),this.setLineVisible()},_$m.prototype.setLineVisible=function(){if(t$$(this._entityCollection)){if(!t$$(this._lineEntity)){for(var e=this.stopCollection,t=e.length,i=[];t--;)i.push(e[t].point);this._lineEntity=this._entityCollection.add({name:this.routeName,polyline:{positions:i,width:5}})}this._lineEntity.show=this._isLineVisible}},_$m.prototype.setStopVisible=function(){if(t$$(this._entityCollection)){if(0===this._stopMarkCollection.length&&this._isStopVisible)for(var e=this.stopCollection,t=e.length;t--;){var i=e[t],n=this._entityCollection.add({position:i.point,billboard:{image:o$12("Assets/Textures/maki/grepin.png"),scale:.5}});this._stopMarkCollection.push(n)}for(var r=0,o=this._stopMarkCollection.length;r<o;r++){(n=this._stopMarkCollection[r]).show=this._isStopVisible}}},_$m.prototype.get=function(e){return void 0===this._stopCollection.get(e)?this.stopCollection[e]:this._stopCollection.get(e)},_$m.prototype.clear=function(){this._isCleared=!0;for(var e=0;e<this._stopMarkCollection.length;e++)this._entityCollection.remove(this._stopMarkCollection[e]);t$$(this._lineEntity)&&(this._entityCollection.remove(this._lineEntity),this._lineEntity=void 0),this._stopCollection.removeAll(),t$$(this._catmullRomSpline)&&(this._catmullRomSpline=void 0)},Object.defineProperties(c$m.prototype,{routes:{get:function(){return this._routes}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}}}),c$m.prototype.addRoute=function(e){if(e&&(this._routes.push(e),e.isLineVisible&&t$$(this._entityCollection))){for(var t=e.stopCollection,i=t.length,n=[];i--;)n.push(t[i].point);e.lineEntity=this._entityCollection.add({name:e.routeName,polyline:{positions:n,width:5}})}},c$m.prototype.get=function(e){return this._routes[e]},c$m.prototype.fromFile=function(e){var t=this;c$18(u$_(e),(function(e){y$o(t,e)}),(function(){t._readyPromise.reject()}))},c$m.prototype.fromXML=function(e){if(!t$$(e))throw new t$_("xml content is required to create routes!");var t=(new DOMParser).parseFromString(e,"text/xml");try{y$o(this,t)}catch(e){throw new t$_(e)}},n$r.prototype.Clone=function(){var e=new n$r;if(e.Name=this.Name,e.Description=this.Description,e.NumParts=this.NumParts,e.NumPoints=this.NumPoints,e.Color=this.Color,e.Radius=this.Radius,null!=this.Parts){for(var t=[],i=0;i<this.Parts.length;i++)t.push(this.Parts[i]);e.Parts=t}e.Points=[];for(i=0;i<this.NumPoints;i++)e.Points[i]=new a$11,e.Points[i].x=this.Points[i].x,e.Points[i].y=this.Points[i].y,e.Points[i].z=this.Points[i].z;return e},n$r.prototype.ComputeBox=function(e,t){e=new a$11(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),t=new a$11(Number.MIN_VALUE,Number.MIN_VALUE,Number.MIN_VALUE);for(var i=0,n=this.Points.length;i<n;i++){var r=this.Points[i];e.x>r.x&&(e.x=r.x),e.y>r.y&&(e.y=r.y),e.z>r.z&&(e.z=r.z),t.x<r.x&&(t.x=r.x),t.y<r.y&&(t.y=r.y),t.z<r.z&&(t.z=r.z)}},M$r.enuCenter=void 0;var z$k={sh:function(e){return(Math.pow(Math.E,e)-Math.pow(Math.E,-e))/2},arsh:function(e){return Math.log(e+Math.sqrt(e*e+1),Math.E)}};function D$s(e){return new a$11(parseFloat(e.x)||0,parseFloat(e.y)||0,parseFloat(e.z)||0)}M$r.prototype.GetPowerline=function(e){if(!e instanceof n$r||null==e.Points||e.Points.Length<2)return null},M$r.prototype.gernerateCatenarylines=function(e){if(!(e.points instanceof Array&&t$$(e.points[0].begin)&&t$$(e.points[0].end)))throw new t$_("options.points is required and must like [{begin : 0, end : 1}, {begin : 1, end : 2}]");for(var t=[],i=e$1Y(e.imageUrl,""),n=e$1Y(e.imageRepeat,new r$T(30,1)),r=e$1Y(e.imageTransparent,!1),o=e$1Y(e.volumeDisplayCondition,new r$T(0,500)),a=e$1Y(e.lineDisplayCondition,new r$T(500,5e4)),s=e$1Y(e.lineColor,e$1z.WHITE),l=0,u=e.points.length;l<u;l++){var c=e.points[l].begin,h=e.points[l].end;c=D$s(c),h=D$s(h);var d=this.InsertTwoPoints(c,h),f=[],p=null,_=a$11.fromDegrees(d[0].x,d[0].y,d[0].z);if(0===this.enuCenters.length)this.enuCenters.push(_),p=this.enuCenters[0];else{for(var m=0;m<this.enuCenters.length;m++)if(a$11.distance(this.enuCenters[m],_)<1e4){p=this.enuCenters[m];break}t$$(p)||(p=_,this.enuCenters.push(_))}for(var $=0;$<d.length;$++){var g=a$11.fromDegrees(d[$].x,d[$].y,d[$].z);f.push(g)}if(f.length>1){var y=new l$J({polylineVolume:new s$K({positions:f,enuCenter:p,shape:W$l(this.r),material:new i$M({image:i,repeat:n,transparent:r}),distanceDisplayCondition:new e$1w(o.x,o.y)}),polyline:new o$B({positions:f,distanceDisplayCondition:new e$1w(a.x,a.y),width:2,material:s})});t.push(y)}}return t};var b$v={};function W$l(e){if(t$$(b$v["_"+e]))return b$v["_"+e];for(var t=[],i=0;i<360;){var n=n$1d.toRadians(i);t.push(new r$T(e*Math.cos(n),e*Math.sin(n))),i+=11.25}return b$v["_"+e]=t,t}function E$p(e,t,i,n){return.5*n-e/t*z$k.arsh(t*i/(2*e*z$k.sh(t*n/(2*e))))}function B$i(e,t,i){return e*e+t*t+i*i}function J$m(e,t,i){return Math.sqrt(B$i(e,t,i))}function K$h(e,t,i){var n=J$m(e,t,i);return new a$11(e/n,t/n,i/n)}function O$k(e,t,i){e*=Math.PI/180,t*=Math.PI/180;var n=i*Math.cos(e);return new a$11(n*Math.cos(t),n*Math.sin(t),i*Math.sin(e))}function _$l(e){new a$11;return O$k(e.y,e.x,e.z+6378137)}function P$g(e,t){this.l=0,this.h=0,t$$(t)?(this.a0=e,this.r=t,this.k=Q$i(e,t)):(this.k=e,this.a0=0,this.r=0)}function Q$i(e,t){return t*Math.pow(10,5)/(8*e)}function i$p(){this.init()}function i$o(e,t,i){e=parseFloat(e)||0,t=parseFloat(t)||0,i=parseFloat(i)||0,this.init(e,t,i)}function i$n(e){e=parseFloat(e)||0,this.init(e)}function i$m(e,t){e=parseFloat(e)||0,t=parseFloat(t)||0,this._vertex=void 0,this._rotateOrigin=O$r.CENTER,this.init(e,t)}function o$r(e,t,i){e=parseFloat(e)||0,t=parseFloat(t)||0,i=parseFloat(i)||0,this.init(e,t,i)}function i$l(e,t,i){e=parseFloat(e)||0,t=parseFloat(t)||0,i=parseFloat(i)||0,this.init(e,t,i)}function t$h(){this.init()}function o$q(e){e=e||{},this.init(e)}function e$t(e){e=parseFloat(e)||0,this.init(e)}M$r.prototype.InsertTwoPoints=function(e,t){if(!(e instanceof a$11&&t instanceof a$11))throw new t$_("startPos and endPos must be Cartesian3!");if(e.x==t.x&&e.y==t.y&&e.z==t.z)return[new a$11(e.x,e.y,e.z)];var i=_$l(e),n=_$l(t),r=a$11.subtract(n,i,new a$11),o=a$11.magnitude(r),a=Math.max(Math.floor(o/10),2);a=a%2==0?a:a+1;var s=new Array(a+2),l=t.z-e.z,u=l/o,c=Math.sqrt(1-u*u)||1;E$p(this.a0,this.r,l,o*c);var h=o/(a+1);this.m_sag.l=o*c,this.m_sag.h=l;for(var d=0;d<=a+1;d++){var f=new a$11((t.x-e.x)*d/(a+1),(t.y-e.y)*d/(a+1),(t.z-e.z)*d/(a+1));if(s[d]=new a$11(e.x+f.x,e.y+f.y,e.z+f.z),0!=d||d!=this.segments+1){var p=h*d;this.m_sag.fx(p*c),s[d].z=s[d].z-this.m_sag.fx(p*c)}}return s},M$r.prototype.CalcPoint=function(e,t,i){var n=_$l(e),r=_$l(t),o=new a$11(r.x-n.x,r.y-n.y,r.z-n.z),a=Math.sqrt(o.x*o.x+o.y*o.y+o.z*o.z),s=null,l=t.z-e.z,u=l/a,c=Math.sqrt(1-u*u);E$p(this.a0,this.r,l,a*c),this.m_sag.l=a*c,this.m_sag.h=l;var h=i/this.m_sag.l,d=new a$11(t.x-e.x,t.y-e.y,t.z-e.z);o=new a$11((d=K$h(d.x,d.y,d.z)).x*a*h,d.y*a*h,d.z*a*h);return(s=new a$11(e.x+o.x,e.y+o.y,e.z+o.z)).z=s.z-this.m_sag.fx(i),s},P$g.prototype.fx=function(e){var t=8*Math.pow(10,-5)*this.k,i=this.Loa();return e*(this.h/this.l)+2/t*(z$k.sh(t*(2*i-e)/2)*z$k.sh(t*e/2))},P$g.prototype.Loa=function(){var e=8*Math.pow(10,-5)*this.k;return.5*this.l-1/e*z$k.arsh(this.h*e/2/z$k.sh(e*this.l/2))},i$p.prototype=new o$x,i$p.prototype.constructor=i$p,Object.defineProperties(i$p.prototype,{geoImagePath:{get:function(){return this.imagePath},set:function(e){"string"==typeof e&&(this.imagePath=e,this.billboard.image=e)}},geoWidth:{get:function(){return this.width},set:function(e){"number"==typeof e&&(this.width=e,this.billboard.width=e)}},geoHeight:{get:function(){return this.height},set:function(e){"number"==typeof e&&(this.height=e,this.billboard.height=e)}}}),i$p.prototype.init=function(){this.type=b$K.GEOBILLBOARD,this.height=100,this.width=100,this.imagePath="",this.billboard={image:"",width:100,height:100}},i$o.prototype=new o$x,i$o.prototype.constructor=i$o,Object.defineProperties(i$o.prototype,{geoLength:{get:function(){return this.length},set:function(e){"number"==typeof e&&(this.length=e,this.box.dimensions.x=e,this._isGeometryDirty=!0)}},geoWidth:{get:function(){return this.width},set:function(e){"number"==typeof e&&(this.width=e,this.box.dimensions.y=e,this._isGeometryDirty=!0)}},geoHeight:{get:function(){return this.height},set:function(e){"number"==typeof e&&(this.height=e,this.box.dimensions.z=e,this._isGeometryDirty=!0)}}}),i$o.prototype.init=function(e,t,i){this.type=b$K.GEOBOX,this.length=e,this.width=t,this.height=i,this.box={dimensions:new a$11(e,t,i),vertexFormat:n$12.POSITION_NORMAL_AND_ST}},i$o.prototype.isValid=function(){return this.length>0&&this.width&&this.height>0},i$o.prototype._createGeometry=function(){let e=c$Z.fromDimensions(this.box);this._geometry=c$Z.createGeometry(e),this._isGeometryDirty=!1,this._vertexBuffer&&!this._vertexBuffer.isDestroyed()&&(this._vertexBuffer=this._vertexBuffer.destroy())},i$o.prototype.getCenter=function(){return new s$w(this.position.x,this.position.y,this.position.z+this.height/2)},i$o.prototype.getOutlineVertexArray=function(e){let t=new Uint16Array(24);t[0]=0,t[1]=1,t[2]=1,t[3]=2,t[4]=2,t[5]=3,t[6]=3,t[7]=0,t[8]=4,t[9]=5,t[10]=5,t[11]=6,t[12]=6,t[13]=7,t[14]=7,t[15]=4,t[16]=1,t[17]=5,t[18]=2,t[19]=6,t[20]=0,t[21]=4,t[22]=3,t[23]=7;let i=u$Y.createIndexBuffer({context:e,typedArray:t,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT}),n=[];return n.push({index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}),new x$18({context:e,attributes:n,indexBuffer:i})},i$n.prototype=new o$x,i$n.prototype.constructor=i$n,Object.defineProperties(i$n.prototype,{geoRadius:{get:function(){return this.radius},set:function(e){"number"==typeof e&&(this.radius=e,this.ellipse.semiMinorAxis=e,this.ellipse.semiMajorAxis=e)}}}),i$n.prototype.init=function(e){this.type=b$K.GEOCIRCLE3D,this.radius=e,this.ellipse={semiMinorAxis:e,semiMajorAxis:e}},i$n.prototype.isValid=function(){return this.radius>0},i$n.prototype.getCenter=function(){return new Point3D(this.position.x,this.position.y,this.position.z)},i$m.prototype=new o$x,i$m.prototype.constructor=i$m,Object.defineProperties(i$m.prototype,{geoBottomRadius:{get:function(){return this.bottomRadius},set:function(e){"number"==typeof e&&(this.bottomRadius=e,this.cylinder.bottomRadius=e,this._isGeometryDirty=!0)}},geoHeight:{get:function(){return this.height},set:function(e){"number"==typeof e&&(this.height=e,this.cylinder.length=e,this._isGeometryDirty=!0)}},rotateOrigin:{get:function(){return this._rotateOrigin},set:function(e){n$1e.typeOf.number("GeoCone rotateOrigin",e),this._rotateOrigin=e}}}),i$m.prototype.init=function(e,t){this.type=b$K.GEOCONE,this.height=t,this.bottomRadius=e,this.cylinder={length:t,topRadius:0,bottomRadius:e,vertexFormat:n$12.POSITION_NORMAL_AND_ST}},i$m.prototype.clone=function(){return new i$m(this.bottomRadius,this.height)},i$m.prototype._createGeometry=function(){var e=new x$V(this.cylinder);this._geometry=x$V.createGeometry(e),this._vertex=a$11.fromDegrees(this.position.x,this.position.y,this.position.z+this.height/2),this._isGeometryDirty=!1},i$m.prototype.getOutlineVertexArray=function(e){let t=new Uint16Array(768),i=0;for(let e=0;e<256;e+=2)t[i++]=e,t[i++]=e+1,t[i++]=e,t[i++]=e+2,t[i++]=e+1,t[i++]=e+3;t[i-1]=1;let n=u$Y.createIndexBuffer({context:e,typedArray:t,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT}),r=[];return r.push({index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}),new x$18({context:e,attributes:r,indexBuffer:n})},o$r.prototype=new o$x,o$r.prototype.constructor=o$r,Object.defineProperties(o$r.prototype,{geoTopRadius:{get:function(){return this.topRadius},set:function(e){"number"==typeof e&&(this.topRadius=e,this.cylinder.topRadius=e,this._isGeometryDirty=!0)}},geoBottomRadius:{get:function(){return this.bottomRadius},set:function(e){"number"==typeof e&&(this.bottomRadius=e,this.cylinder.bottomRadius=e,this._isGeometryDirty=!0)}},geoHeight:{get:function(){return this.height},set:function(e){"number"==typeof e&&(this.height=e,this.cylinder.length=e,this._isGeometryDirty=!0)}}}),o$r.prototype.init=function(e,t,i){this.type=b$K.GEOCYLINDER,this.height=i,this.topRadius=e,this.bottomRadius=t,this.cylinder={length:i,topRadius:e,bottomRadius:t,vertexFormat:n$12.POSITION_NORMAL_AND_ST}},o$r.prototype.clone=function(){return new o$r(this.topRadius,this.bottomRadius,this.height)},o$r.prototype._createGeometry=function(){var e=new x$V(this.cylinder);this._geometry=x$V.createGeometry(e),this._isGeometryDirty=!1},o$r.prototype.getOutlineVertexArray=function(e){let t=new Uint16Array(768),i=0;for(let e=0;e<256;e+=2)t[i++]=e,t[i++]=e+1,t[i++]=e,t[i++]=e+2,t[i++]=e+1,t[i++]=e+3;t[i-1]=1;let n=u$Y.createIndexBuffer({context:e,typedArray:t,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT}),r=[];return r.push({index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}),new x$18({context:e,attributes:r,indexBuffer:n})},i$l.prototype=new o$x,i$l.prototype.constructor=i$l,Object.defineProperties(i$l.prototype,{geoXAxis:{get:function(){return this.xAxis},set:function(e){"number"==typeof e&&(this.xAxis=e,this.ellipsoid.radii.x=e,this._isGeometryDirty=!0)}},geoYAxis:{get:function(){return this.yAxis},set:function(e){"number"==typeof e&&(this.yAxis=e,this.ellipsoid.radii.z=e,this._isGeometryDirty=!0)}},geoZAxis:{get:function(){return this.zAxis},set:function(e){"number"==typeof e&&(this.zAxis=e,this.ellipsoid.radii.y=e,this._isGeometryDirty=!0)}}}),i$l.prototype.init=function(e,t,i){this.type=b$K.GEOELLIPSOID,this.xAxis=e,this.yAxis=t,this.zAxis=i,this.ellipsoid={radii:new a$11(e,i,t),vertexFormat:n$12.POSITION_NORMAL_AND_ST}},i$l.prototype.isValid=function(){return this.xAxis>0&&this.yAxis&&this.zAxis>0},i$l.prototype.getCenter=function(){return new s$w(this.position.x,this.position.y,this.position.z+this.zAxis)},i$l.prototype._createGeometry=function(){var e=new b$18(this.ellipsoid);this._geometry=b$18.createGeometry(e),this._isGeometryDirty=!1},i$l.prototype.getOutlineVertexArray=function(e){this._getGeometry();let t=0,i=new Uint16Array(17956);for(let e=0;e<67;e++){var n=67*e;for(let e=0;e<66;e++)i[t++]=n+e,i[t++]=n+e+1}for(let e=0;e<67;e++)for(let n=0;n<65;n++)i[t++]=67+e+67*n,i[t++]=67+e+67*(n+1);let r=u$Y.createIndexBuffer({context:e,typedArray:i,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT}),o=[];return o.push({index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}),new x$18({context:e,attributes:o,indexBuffer:r})},t$h.prototype=new o$x,t$h.prototype.constructor=t$h,t$h.prototype.parent=o$x.prototype,Object.defineProperties(t$h.prototype,{geoFilePath:{get:function(){return this.modelUrl},set:function(e){"string"==typeof e&&(this.modelUrl=e)}},geoModel:{get:function(){return this._geoModel},set:function(e){this._geoModel=e}}}),t$h.prototype.init=function(){this.modelUrl="",this._geoModel=void 0,this.type=b$K.GEOMODEL3D},o$q.prototype=new o$x,o$q.prototype.constructor=o$q,o$q.prototype.parent=o$x.prototype,Object.defineProperties(o$q.prototype,{X:{get:function(){return this.x},set:function(e){"number"==typeof e&&(this.x=e)}},Y:{get:function(){return this.y},set:function(e){"number"==typeof e&&(this.y=e)}},Z:{get:function(){return this.z},set:function(e){"number"==typeof e&&(this.z=e)}}}),o$q.prototype.init=function(e){this.x=e$1Y(e.x,0),this.y=e$1Y(e.y,0),this.z=e$1Y(e.z,0),this.type=b$K.GEOPOINT3D},e$t.prototype=new o$x,e$t.prototype.constructor=e$t,Object.defineProperties(e$t.prototype,{geoRadius:{get:function(){return this.radius},set:function(e){"number"==typeof e&&(this.radius=e,this.ellipsoid.radii.x=e,this.ellipsoid.radii.y=e,this.ellipsoid.radii.z=e,this.sphere.radius=e,this._isGeometryDirty=!0)}}}),e$t.prototype.init=function(e){this.type=b$K.GEOSPHERE,this.radius=e,this.ellipsoid={radii:new a$11(e,e,e)},this.sphere={radius:e,vertexFormat:n$12.POSITION_NORMAL_AND_ST}},e$t.prototype.isValid=function(){return this.radius>0},e$t.prototype.getCenter=function(){return new s$w(this.position.x,this.position.y,this.position.z+this.radius)},e$t.prototype._createGeometry=function(){var e=new n$P(this.sphere);this._geometry=n$P.createGeometry(e),this._isGeometryDirty=!1},e$t.prototype.getOutlineVertexArray=function(e){this._getGeometry();let t=0,i=new Uint16Array(17956);for(let e=0;e<67;e++){var n=67*e;for(let e=0;e<66;e++)i[t++]=n+e,i[t++]=n+e+1}for(let e=0;e<67;e++)for(let n=0;n<65;n++)i[t++]=67+e+67*n,i[t++]=67+e+67*(n+1);let r=u$Y.createIndexBuffer({context:e,typedArray:i,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT}),o=[];return o.push({index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}),new x$18({context:e,attributes:o,indexBuffer:r})};var xe$h=new c$1a(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);function R$g(e,t){if(!t$$(e)||!t$$(t))throw new t$_("No viewer or box provided.");if(!t$$(t.box))throw new t$_("Expected object to be a box.");this.handler=new f$N(e.scene.canvas),this.viewer=e,this.editEvt=new o$15,this._distanceDisplayCondition=void 0,this._id=t$U(),oe$b(this,t),re$e(this),this.activate()}function oe$b(e,t){e.box=t,e.hpr=ge$9(t),e.center=t.position.getValue(0),e.dimensions=t.box.dimensions.getValue(0),e._rotateCircleRadius=Math.max(Math.min(e.dimensions.x,e.dimensions.y)/7,.01),e._unifiedMoveBarLength=Math.max(Math.max(Math.max(e.dimensions.x,e.dimensions.y),e.dimensions.z)/6,.1),e._movePolygonDimension=e._rotateCircleRadius/2,e._moveBarXLength=e._unifiedMoveBarLength,e._moveBarYLength=e._unifiedMoveBarLength,e._moveBarZLength=e._unifiedMoveBarLength,e.isActive=!1,e._color=e$1z.WHITE.withAlpha(.1),e._lineColor=e$1z.fromCssColorString("rgba(250, 158, 62, 1)"),e._outlineColor=e$1z.fromCssColorString("rgba(1, 107, 185, 1)"),e._lineWidth=5,e._modelMatrix=m$13.headingPitchRollToFixedFrame(e.center,e.hpr),e._modelMatrixInverse=c$1a.inverse(e._modelMatrix,new c$1a),e._hoverColor=e$1z.RED,e._linesHover=[]}function ge$9(e){if(!t$$(e.orientation))return new e$1L;var t=r$W.fromQuaternion(e.orientation.getValue(0),new r$W),i=c$1a.fromRotationTranslation(t,a$11.ZERO,new c$1a),n=c$1a.inverse(m$13.eastNorthUpToFixedFrame(e.position.getValue(0)),new c$1a),r=c$1a.multiply(n,i,new c$1a),o=c$1a.getMatrix3(r,new r$W);return e$1L.fromQuaternion(a$U.fromRotationMatrix(o))}function re$e(e){var t=e;t.positions=be$d(t),t.polylines=new W$P({opaqueRS:p$1a.fromCache({depthMask:!0,depthTest:{enabled:!0}}),modelMatrix:e._modelMatrix}),t.translucentPolylines=new W$P({translucentRS:p$1a.fromCache({depthMask:!1,depthTest:{enabled:!1}}),modelMatrix:e._modelMatrix}),t.translucentPolylines._canAlwaysPick=!0;for(var i=0;i<7;i++)t.polylines.add({id:"box-editor-prim"+i+e._id,width:t._lineWidth,positions:e.positions[i],material:r$v.fromType(r$v.ColorType,{color:t._lineColor})});for(i=0;i<7;i++)t.translucentPolylines.add({id:"box-editor-prim"+i+e._id,width:t._lineWidth,positions:e.positions[i],material:r$v.fromType(r$v.ColorType,{color:t._lineColor.withAlpha(.2)})});t.boundingBox=Me$c(t,"edit_box"),t.viewer.entities.add(t.boundingBox),t.viewer.scene.primitives.add(t.polylines),t.viewer.scene.primitives.add(t.translucentPolylines),t._polygon=new Z$k(t),t.viewer.scene.primitives.add(t._polygon)}function Z$k(e){this.editor=e,this.show=!0,this._color=e$1z.clone(e._lineColor),this._isCustomPolygon=!0}function Ce$a(e,t,i){var n=new A$X({polygonHierarchy:{positions:e.positions[7]}}),r=A$X.createGeometry(n),o=c$1a.clone(e._modelMatrix);if(e.viewer.scene.mode===b$1d.COLUMBUS_VIEW){var a=new s$1q,s=a.ellipsoid.cartesianToCartographic(e.center),l=a.project(s);c$1a.fromTranslation(l,o),c$1a.multiply(xe$h,o,o)}let u=[];var c=u$Y.createVertexBuffer({context:t,typedArray:C$12.createTypedArray(C$12.FLOAT,r.attributes.position.values),usage:A$13.STATIC_DRAW});u.push({index:0,vertexBuffer:c,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1});var h=new x$18({context:t,attributes:u,indexBuffer:u$Y.createIndexBuffer({context:t,typedArray:r.indices,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT})}),d=p$15.fromCache({context:t,vertexShaderSource:"attribute vec4 aPosition;\nuniform vec4 uColor;\nuniform vec4 uPickColor;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvoid main()\n{\n vColor = uColor;\n vPickColor = uPickColor;\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}",fragmentShaderSource:"varying vec4 vColor;\nvarying vec4 vPickColor;\nvoid main()\n{\n gl_FragColor = vColor;\n}\n",attributeLocations:{aPosition:0}}),f=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:o,pass:we$l.LOG_DEPTH_OVERLAY,owner:i});f.vertexArray=h,f.shaderProgram=d;var p={id:"box-editor-prim7"+e._id,primitive:i},_=t.createPickId(p);f.pickId="vPickColor",f.uniformMap={uColor:function(){return i._color},uPickColor:function(){return _.color}},f.renderState=p$1a.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$s.ALPHA_BLEND});var m=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:o,pass:we$l.OPAQUE+1,owner:i});m.vertexArray=h,m.shaderProgram=d;var $={id:"box-editor-prim7"+e._id,primitive:i},g=t.createPickId($);m.pickId="vPickColor",m.uniformMap={uColor:function(){return i._color.withAlpha(.2)},uPickColor:function(){return g.color}},m.renderState=p$1a.fromCache({depthMask:!1,depthTest:{enabled:!1},blending:Ee$s.ALPHA_BLEND}),i._colorCommandAlpha=m,i._colorCommand=f}function be$d(e){var t=[];t.push([new a$11(0,0,e.dimensions.z/2),new a$11(0,0,e.dimensions.z/2+e._moveBarZLength)]),t.push([new a$11(0,0,-e.dimensions.z/2),new a$11(0,0,-e.dimensions.z/2-e._moveBarZLength)]),t.push([new a$11(e.dimensions.x/2,0,0),new a$11(e.dimensions.x/2+e._moveBarXLength,0,0)]),t.push([new a$11(-e.dimensions.x/2,0,0),new a$11(-e.dimensions.x/2-e._moveBarXLength,0,0)]),t.push([new a$11(0,e.dimensions.y/2,0),new a$11(0,e.dimensions.y/2+e._moveBarYLength,0)]),t.push([new a$11(0,-e.dimensions.y/2,0),new a$11(0,-e.dimensions.y/2-e._moveBarYLength,0)]);for(var i=ke$5(e._rotateCircleRadius,64),n=0;n<i.length;n++)i[n].z=e.dimensions.z/2;t.push(i);var r=e._movePolygonDimension;return t.push([new a$11(r,r,.505*e.dimensions.z+.01),new a$11(-r,r,.505*e.dimensions.z+.01),new a$11(-r,-r,.505*e.dimensions.z+.01),new a$11(r,-r,.505*e.dimensions.z+.01)]),t}function ke$5(e,t){var i=[];const n=2*Math.PI/t;for(var r=0;r<t+1;r++){var o=new a$11,a=n*r;o.x=e*Math.sin(a),o.y=e*Math.cos(a),i.push(o)}return i}function Me$c(e,t){var i=m$13.headingPitchRollQuaternion(e.center,e.hpr);return new l$J({id:t+e._id,position:new n$K((function(){return e.center}),!1),orientation:new n$K((function(){return i}),!1),box:{material:e._color,outline:!0,outlineWidth:2,outlineColor:e._outlineColor,dimensions:new n$K((function(){return e.dimensions}),!1)}})}Object.defineProperties(R$g.prototype,{distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(t$$(e)&&!(e instanceof e$1w))throw new t$_("Expected BoxEditor.distanceDisplayCondition to be type of DistanceDisplayCondition!");this._distanceDisplayCondition=e}},color:{get:function(){return this._color},set:function(e){this._color=e,this.boundingBox.box.material=e}},hoverColor:{get:function(){return this._hoverColor},set:function(e){this._hoverColor=e}}}),Object.defineProperties(Z$k.prototype,{color:{get:function(){return this._color},set:function(e){this._color=e,this.dirty=!0}}}),Z$k.prototype.update=function(e){(!this._colorCommand||this.dirty)&&(Ce$a(this.editor,e.context,this),this.dirty=!1);var t=this.editor;if(t$$(t._distanceDisplayCondition)&&t.isActive){var i=t.viewer.scene.camera.positionWC;if(e.mode===b$1d.COLUMBUS_VIEW&&(i=m$13.convertTo3DCartesian(i)),a$11.distance(t.center,i)<t._distanceDisplayCondition.far){t._polygon.show=!0;for(var n=0;n<t.polylines._polylines.length;n++)t.polylines._polylines[n].show=!0,t.translucentPolylines._polylines[n].show=!0}else{t._polygon.show=!1;for(n=0;n<t.polylines._polylines.length;n++)t.polylines._polylines[n].show=!1,t.translucentPolylines._polylines[n].show=!1}}this.show&&(e.commandList.push(this._colorCommand),e.commandList.push(this._colorCommandAlpha))},Z$k.prototype.destroy=function(e){};var F$m=new a$11,se$9=new c$19,ae$c=new a$11,Be$9=new r$T,Ie$a=new r$T,Te$b=new n$18,Oe$a=new a$11,ze$7=new a$11,Ae$8=new n$18,Ee$c=new a$11,Re$7=new a$11,Le$9=new n$17(a$11.UNIT_X,0);function Se$a(e,t){t.endPosition,e.currentPickObject;var i=+e.currentPickObject.id.slice(15,16),n=e.viewer.camera,r=r$T.clone(t.startPosition,Be$9),o=r$T.clone(t.endPosition,Ie$a),a=a$11.clone(a$11.ZERO,Oe$a),s=a$11.UNIT_X;(0===i||1===i)&&(s=a$11.UNIT_Y);var l=m$13.convertToColumbusCartesian(e.center);t$$(l)&&(a.x=l.x,(0===i||1===i)&&(a.y=l.y));var u=n$17.fromPointNormal(a,s,Le$9),c=n.getPickRay(r,Te$b),h=h$1b.rayPlane(c,u,ze$7),d=n.getPickRay(o,Ae$8),f=h$1b.rayPlane(d,u,Ee$c),p=a$11.subtract(h,f,Re$7),_=p.x;if(p.x=p.y,p.y=p.z,p.z=_,a$11.magnitude(p)>n$1d.EPSILON6&&(f=m$13.convertTo3DCartesian(f),e.currentPickPos=f),0===i||1===i){var m=c$1a.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new a$11),$=(S=c$1a.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new a$11)).z-m.z,g=new a$11(0,0,$/2);1===i&&(g=new a$11(0,0,-($=m.z-S.z)/2)),e.dimensions.z+=$,e.dimensions.z<=0&&($=0,e.dimensions.z=0,g=new a$11(0,0,0)),e.positions[0][0].z+=$/2,e.positions[0][1].z+=$/2,e.positions[1][0].z-=$/2,e.positions[1][1].z-=$/2;for(var y=e.positions[6],v=0;v<y.length;v++)y[v].z+=$/2;var x=e.positions[7];for(v=0;v<x.length;v++)x[v].z+=$/2;c$1a.multiplyByPoint(e._modelMatrix,g,e.center),a$11.clone(e.currentPickPos,e.lastPickPos)}if(2===i||3===i){m=c$1a.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new a$11);var b=(S=c$1a.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new a$11)).x-m.x;g=new a$11(b/2,0,0);3===i&&(g=new a$11(-(b=m.x-S.x)/2)),e.dimensions.x+=b,e.dimensions.x<0&&(e.dimensions.x=0,g=new a$11(0,0,0),b=0),e.positions[2][0].x+=b/2,e.positions[2][1].x+=b/2,e.positions[3][0].x-=b/2,e.positions[3][1].x-=b/2,c$1a.multiplyByPoint(e._modelMatrix,g,e.center),a$11.clone(e.currentPickPos,e.lastPickPos)}if(4===i||5===i){e.viewer.camera.getPickRay(t.endPosition);m=c$1a.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new a$11);var S,w=(S=c$1a.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new a$11)).y-m.y;g=new a$11(0,w/2,0);5===i&&(g=new a$11(0,-(w=m.y-S.y)/2,0)),e.dimensions.y+=w,e.dimensions.y<0&&(e.dimensions.y=0,g=new a$11(0,0,0),w=0),e.positions[4][0].y+=w/2,e.positions[4][1].y+=w/2,e.positions[5][0].y-=w/2,e.positions[5][1].y-=w/2,c$1a.multiplyByPoint(e._modelMatrix,g,e.center),a$11.clone(e.currentPickPos,e.lastPickPos)}}function De$c(e,t){var i=t.endPosition;e.currentPickObject;var n=+e.currentPickObject.id.slice(15,16);if(0===n||1===n){var r=e.viewer.scene.camera,o=r.getPickRay(i),a=r$T.fromElements(i.x+5,i.y,new r$T),s=r.getPickRay(a),l=a$11.normalize(a$11.cross(o.direction,s.direction,ae$c),ae$c),u=n$17.fromPointNormal(r.positionWC,l),c=new n$18(a$11.ZERO,e.currentPickPos);e.currentPickPos=h$1b.rayPlane(c,u);var h=c$1a.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new a$11),d=(v=c$1a.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new a$11)).z-h.z,f=new a$11(0,0,d/2);1===n&&(f=new a$11(0,0,-(d=h.z-v.z)/2)),e.dimensions.z+=d,e.dimensions.z<=0&&(d=0,e.dimensions.z=0,f=new a$11(0,0,0)),e.positions[0][0].z+=d/2,e.positions[0][1].z+=d/2,e.positions[1][0].z-=d/2,e.positions[1][1].z-=d/2;for(var p=e.positions[6],_=0;_<p.length;_++)p[_].z+=d/2;var m=e.positions[7];for(_=0;_<m.length;_++)m[_].z+=d/2;c$1a.multiplyByPoint(e._modelMatrix,f,e.center),a$11.clone(e.currentPickPos,e.lastPickPos)}if(2===n||3===n){c=e.viewer.camera.getPickRay(t.endPosition);var $=c$19.unpack([0,0,0,a$11.distance(e.lastPickPos,a$11.ZERO)],0,se$9),g=h$1b.raySphere(c,$);e.currentPickPos=n$18.getPoint(c,g.start);h=c$1a.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new a$11);var y=(v=c$1a.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new a$11)).x-h.x;f=new a$11(y/2,0,0);3===n&&(f=new a$11(-(y=h.x-v.x)/2)),e.dimensions.x+=y,e.dimensions.x<0&&(e.dimensions.x=0,f=new a$11(0,0,0),y=0),e.positions[2][0].x+=y/2,e.positions[2][1].x+=y/2,e.positions[3][0].x-=y/2,e.positions[3][1].x-=y/2,c$1a.multiplyByPoint(e._modelMatrix,f,e.center),a$11.clone(e.currentPickPos,e.lastPickPos)}if(4===n||5===n){c=e.viewer.camera.getPickRay(t.endPosition),$=c$19.unpack([0,0,0,a$11.distance(e.lastPickPos,a$11.ZERO)],0,se$9),g=h$1b.raySphere(c,$);e.currentPickPos=n$18.getPoint(c,g.start);h=c$1a.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new a$11);var v,x=(v=c$1a.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new a$11)).y-h.y;f=new a$11(0,x/2,0);5===n&&(f=new a$11(0,-(x=h.y-v.y)/2,0)),e.dimensions.y+=x,e.dimensions.y<0&&(e.dimensions.y=0,f=new a$11(0,0,0),x=0),e.positions[4][0].y+=x/2,e.positions[4][1].y+=x/2,e.positions[5][0].y-=x/2,e.positions[5][1].y-=x/2,c$1a.multiplyByPoint(e._modelMatrix,f,e.center),a$11.clone(e.currentPickPos,e.lastPickPos)}}function Ue$6(e,t){var i=c$1a.multiplyByPoint(e._modelMatrix,e.positions[0][0],new a$11),n=m$13.convertToColumbusCartesian(i),r=m$13.convertToColumbusCartesian(e.lastPickPos);r.x=n.x;var o=a$11.subtract(r,n,new a$11);e.tangent=a$11.cross(a$11.UNIT_X,o,new a$11);var a=t.endPosition;a$11.clone(e.lastPickPos,F$m);var s=e.viewer.camera.getPickRay(a),l=n$17.fromPointNormal(n,a$11.UNIT_X),u=h$1b.rayPlane(s,l),c=a$11.subtract(r,n,new a$11),h=a$11.subtract(u,n,new a$11),d=a$11.dot(a$11.normalize(c,c),a$11.normalize(h,h)),f=Math.acos(d);a$11.cross(a$11.UNIT_X,c,e.tangent);var p=a$11.dot(e.tangent,a$11.subtract(u,r,new a$11));f*=p=p<0?1:-1,e.hpr.heading+=f;var _=m$13.headingPitchRollQuaternion(e.center,e.hpr);e.boundingBox.orientation=_;var m=m$13.convertTo3DCartesian(u);a$11.clone(m,e.lastPickPos)}function Ne$6(e,t){var i=c$1a.multiplyByPoint(e._modelMatrix,e.positions[0][0],new a$11),n=a$11.subtract(e.lastPickPos,i,new a$11);e.tangent=a$11.cross(a$11.UNIT_Z,n,new a$11);var r=t.endPosition,o=a$11.clone(e.lastPickPos,F$m),a=e.viewer.camera.getPickRay(r),s=new c$19(a$11.ZERO,a$11.distance(o,a$11.ZERO)),l=h$1b.raySphere(a,s);o=n$18.getPoint(a,l.start);var u=a$11.subtract(e.lastPickPos,i,new a$11),c=a$11.subtract(o,i,new a$11),h=a$11.dot(a$11.normalize(u,u),a$11.normalize(c,c)),d=Math.acos(h);a$11.cross(a$11.UNIT_Z,u,e.tangent);var f=a$11.dot(e.tangent,a$11.subtract(o,e.lastPickPos,new a$11));d*=f=f<0?1:-1,e.hpr.heading+=d;var p=m$13.headingPitchRollQuaternion(e.center,e.hpr);e.boundingBox.orientation=p,a$11.clone(o,e.lastPickPos)}function Ve$8(e,t){var i=t.endPosition;a$11.clone(e.lastPickPos,F$m);var n=e.viewer.camera.getPickRay(i),r=m$13.convertToColumbusCartesian(e.lastPickPos),o=n$17.fromPointNormal(r,a$11.UNIT_X),a=h$1b.rayPlane(n,o),s=a.y-r.y,l=a.z-r.z,u=m$13.convertToColumbusCartesian(e.center);u.y+=s,u.z+=l,e.center=m$13.convertTo3DCartesian(u);var c=m$13.convertTo3DCartesian(a);a$11.clone(c,e.lastPickPos)}function je$7(e,t){var i=t.endPosition,n=a$11.clone(e.lastPickPos,F$m),r=e.viewer.camera.getPickRay(i),o=new c$19(a$11.ZERO,a$11.distance(n,a$11.ZERO)),a=h$1b.raySphere(r,o),s=n$18.getPoint(r,a.start),l=c$1a.multiplyByPoint(e._modelMatrixInverse,n,new a$11),u=c$1a.multiplyByPoint(e._modelMatrixInverse,s,new a$11),c=new a$11(u.x-l.x,u.y-l.y,0);c$1a.multiplyByPoint(e._modelMatrix,c,e.center),a$11.clone(s,e.lastPickPos)}function We$5(e){for(var t=0;t<e._linesHover.length;t++){var i=e._linesHover[t];i._isCustomPolygon?i.color=e._lineColor:i.material.uniforms.color.alpha<1?i.material=r$v.fromType(r$v.ColorType,{color:e._lineColor.withAlpha(.2)}):i.material=r$v.fromType(r$v.ColorType,{color:e._lineColor})}e._linesHover.length=0;var n=e.currentPickObject=e.viewer.scene.pick(e.viewer.scene.screenSpaceCameraController._aggregator._currentMousePosition);if(n&&"string"==typeof n.id&&n.id.indexOf("box-editor-prim")>-1&&n.id.indexOf(e._id)>-1){var r=n.primitive._index;if(t$$(r)){var o=e.polylines.get(r),a=e.translucentPolylines.get(r);o.material=r$v.fromType(r$v.ColorType,{color:e._hoverColor}),a.material=r$v.fromType(r$v.ColorType,{color:e._hoverColor.withAlpha(.2)}),e._linesHover.push(o),e._linesHover.push(a)}else n.primitive.color=e._hoverColor,e._linesHover.push(n.primitive)}}R$g.prototype.destroy=function(){this.viewer.scene.screenSpaceCameraController.enableInputs=!0,this.deactivate(),this.clear(),this.handler.destroy(),s$1e(this)},R$g.prototype.activate=function(){if(!this.isActive){this.isActive=!0;for(var e=0;e<this.polylines._polylines.length;e++)this.polylines._polylines[e].show=!0,this.translucentPolylines._polylines[e].show=!0;var t=this;t.boundingBox.show=!0,t._polygon.show=!0,t.handler.setInputAction((function(e){t.startPickPos=t.viewer.scene.pickPosition(e.position),t._isOperate=!1,t$$(t.startPickPos)&&t.currentPickObject&&"string"==typeof t.currentPickObject.id&&t.currentPickObject.id.slice(-36)===t._id&&"box-editor"===t.currentPickObject.id.slice(0,10)&&(t._isOperate=!0,t.lastPickPos=a$11.clone(t.startPickPos,new a$11),t.currentPickPos=a$11.clone(t.startPickPos,new a$11))}),Q$L.LEFT_DOWN),t.handler.setInputAction((function(e){if(t._isOperate){t.viewer.scene.screenSpaceCameraController.enableInputs=!1;var i=+t.currentPickObject.id.slice(15,16);i>=0&&i<6?t.viewer.scene.mode===b$1d.COLUMBUS_VIEW?Se$a(t,e):De$c(t,e):6===i?t.viewer.scene.mode===b$1d.COLUMBUS_VIEW?Ue$6(t,e):Ne$6(t,e):7===i&&(t.viewer.scene.mode===b$1d.COLUMBUS_VIEW?Ve$8(t,e):je$7(t,e)),t._polygon.dirty=!0,t._modelMatrix=m$13.headingPitchRollToFixedFrame(t.center,t.hpr),t._modelMatrixInverse=c$1a.inverse(t._modelMatrix,t._modelMatrixInverse),t.polylines.modelMatrix=t._modelMatrix,t.translucentPolylines.modelMatrix=t._modelMatrix,t.box.orientation=new n$K((function(e,i){return t.boundingBox.orientation.getValue(0)}),!1),t.box.position=new n$K((function(e,i){return t.boundingBox.position.getValue(0)}),!1),t.box.box.dimensions=new n$K((function(e,i){return t.boundingBox.box.dimensions.getValue(0)}),!1),t.editEvt.raiseEvent({position:t.boundingBox.position.getValue(0),dimensions:t.boundingBox.box.dimensions.getValue(0),orientation:t.boundingBox.orientation.getValue(0)})}else We$5(t)}),Q$L.MOUSE_MOVE),t.handler.setInputAction((function(e){t._isOperate=!1,t.viewer.scene.screenSpaceCameraController.enableInputs=!0,t.currentPickObject=void 0}),Q$L.LEFT_UP)}},R$g.prototype.deactivate=function(){if(this.isActive){this.isActive=!1,this.boundingBox.show=!1,this._polygon.show=!1;for(var e=0;e<this.polylines._polylines.length;e++)this.polylines._polylines[e].show=!1,this.translucentPolylines._polylines[e].show=!1;this.handler.removeInputAction(Q$L.LEFT_CLICK),this.handler.removeInputAction(Q$L.MOUSE_MOVE),this.handler.removeInputAction(Q$L.RIGHT_CLICK)}},R$g.prototype.clear=function(){this.polylines.removeAll(),this.viewer.scene.primitives.remove(this.polylines),this.polylines=void 0,this.translucentPolylines.removeAll(),this.viewer.scene.primitives.remove(this.translucentPolylines),this.viewer.scene.primitives.remove(this._polygon),this._polygon=void 0,this.translucentPolylines=void 0,this.viewer.entities.remove(this.boundingBox)},R$g.prototype.setEditObject=function(e){if(this.isActive){if(n$1e.typeOf.object("editObject",e),!t$$(e.box))throw new t$_("Expected editObject to be a box.");var t=this.boundingBox.orientation.getValue(0),i=this.boundingBox.position.getValue(0),n=this.boundingBox.box.dimensions.getValue(0);this.box.orientation=new n$K((function(){return t}),!1),this.box.position=new n$K((function(){return i}),!1),this.box.box.dimensions=new n$K((function(){return n}),!1),oe$b(this,e),this.deactivate(),this.clear(),re$e(this),this.activate()}};var e$s={Space:0,Ground:1,S3mModel:2,Raster:3,Both:4},n$q=Object.freeze(e$s),e$r={Point:0,Line:1,Polygon:2,Marker:3,Box:4},_0xd8b438=Object.freeze(e$r),e$q={POLYLINE:0,POLYGON:1,POLYGON_HOLE:2},C$o=Object.freeze(e$q),b$u=function(e,t,i){if(!t$$(e)||!t$$(t))throw new t$_("viewer and mode is required!");this.handler=new f$N(e.scene.canvas),this.viewer=e,this.mode=t,this._clampMode=e$1Y(i,n$q.Space),this.isDrawing=!1,this.active=!1,this._drawEvt=new o$15,this._activeEvt=new o$15,this._enableDepthTest=!0,this.movingEvt=new o$15,this.positions=[],this._positions=[]};function ii$3(e,t){var i=t;if(i&&i.active){var n=i.viewer.scene;if(!n.pickPositionSupported)return void console.log("your browser not supported pickPosition!");var r=n.pickPosition(e.position);if(r)if(i.isDrawing){var o=new r$T(e.position.x,e.position.y);switch(i.mode){case _0xd8b438.Line:j$g(o,i,!0);break;case _0xd8b438.Polygon:G$o(o,i,!0)}}else switch(i.isDrawing=!0,i.positions.length=0,i.positions.push(r.clone()),i.mode){case _0xd8b438.Point:ei$1(r,i);break;case _0xd8b438.Line:U$k(r,i);break;case _0xd8b438.Polygon:oi$1(r,i);break;case _0xd8b438.Marker:ti$2(r,i)}i.mode===_0xd8b438.Box&&ni$1(r,i)}}function ei$1(e,t){var i=t;t$$(i.points)?i.point.position=e:(i.points=new f$A({depthTestEnabled:!1}),i.point=i.points.add({position:e,pixelSize:10,color:e$1z.WHITE}),i.viewer.scene.primitives.add(i.points)),i.deactivate(),i.drawEvt.raiseEvent({object:i.point})}function U$k(e,t){var i=t;if(i._positions=[e,e],t$$(i.polyline))i.polyline.show=!0;else{var n=i._clampMode>0,r=i._clampMode<n$q.S3mModel?_0x29401c.TERRAIN:i._clampMode<n$q.Both?_0x29401c.S3M_TILE:_0x29401c.BOTH;i.polyline=i.viewer.entities.add({polyline:{positions:new n$K((function(){return t$$(i.polygon)?i._positions.concat([i._positions[0]]):i._positions}),!1),width:3,material:e$1z.fromCssColorString("#51ff00"),clampToGround:n,classificationType:r}})}}function oi$1(e,t){var i=t;if(i._positions=[e,e],U$k(e,t),t$$(i.polygon))i.polygon.show=!0,i.polyline.show=!0,t$$(i.rasterPolygon)&&i.viewer.scene.rasterVectorCollection.remove(i.rasterPolygon),t$$(i.rasterPolylines)&&i.viewer.scene.rasterVectorCollection.remove(i.rasterPolylines);else{var n=n$q.Space===i._clampMode,r=i._clampMode<n$q.S3mModel?_0x29401c.TERRAIN:i._clampMode<n$q.Both?_0x29401c.S3M_TILE:_0x29401c.BOTH;i.polygon=i.viewer.entities.add({polygon:{hierarchy:new n$K((function(){return{positions:i._positions,holes:[]}}),!1),material:e$1z.ORANGE.withAlpha(.5),perPositionHeight:n,classificationType:r},depthTestEnabled:i._enableDepthTest})}}function ti$2(e,t){var i=t;i$1g.fromCartesian(e).height,t$$(i.marker)?i.marker.position=e:(i.markers=new O$t,i.marker=i.markers.add({position:e,image:o$12("Assets/Textures/maki/grepin.png"),verticalOrigin:j$10.BOTTOM,scale:.5}),i.viewer.scene.primitives.add(i.markers)),i.deactivate(),i.drawEvt.raiseEvent({object:i.marker})}function ni$1(e,t){t$$(t.boxConfig)||(t.boxConfig={leftClickTimes:0,scratchPosition:new a$11,length:0,width:0,height:0}),t$$(t.boxes)||(t.boxes=[]);var i=t.boxConfig;if(0!==i.leftClickTimes||t$$(e))if(i.leftClickTimes++,i.firstPoint=e,1===i.leftClickTimes)i.enu=m$13.eastNorthUpToFixedFrame(e),i.enuInverse=c$1a.inverse(i.enu,new c$1a),a$11.clone(e,i.scratchPosition),t.box=i.entity=t.viewer.entities.add({position:new n$K((function(){return i.scratchPosition}),!1),box:{dimensions:new n$K((function(e,t){return(t=t||new a$11(i.length,i.width,i.height)).x=i.length,t.y=i.width,t.z=i.height,t}),!1),material:e$1z.fromCssColorString("rgba(0, 160, 233, 0.5)"),outline:!0,outlineColor:e$1z.BLACK}}),t.boxes.push(t.box),i.box=i.entity.box;else if(2===i.leftClickTimes){var n=c$1a.multiplyByPoint(i.enuInverse,i.scratchPosition,new a$11);a$11.multiplyByScalar(n,2,n),i.secondPoint=c$1a.multiplyByPoint(i.enu,n,n)}}function si$2(e,t){var i=t;if(i&&i.active&&i.isDrawing){var n=new r$T(e.endPosition.x,e.endPosition.y);switch(i.mode){case _0xd8b438.Line:j$g(n,i,!1);break;case _0xd8b438.Polygon:G$o(n,i,!1);break;case _0xd8b438.Box:li$2(n,i)}}i.movingEvt.raiseEvent(new r$T(e.endPosition.x,e.endPosition.y))}function j$g(e,t,i){var n=t,r=n.viewer.scene.pickPosition(e);if(t$$(r)){var o=n._positions.length;1==i?(n._positions[o]=r,n.positions.push(r.clone())):n._positions[o-1]=r}}function G$o(e,t,i){var n=t,r=n.viewer.scene.pickPosition(e);if(t$$(r)){var o=n._positions.length;1==i?(n.positions.push(r.clone()),n._positions[o]=r):n._positions[o-1]=r}}Object.defineProperties(b$u.prototype,{drawEvt:{get:function(){return this._drawEvt}},activeEvt:{get:function(){return this._activeEvt}},clampMode:{get:function(){return this._clampMode},set:function(e){if(this._clampMode!==n$q.Raster&&e!==n$q.Raster){if(t$$(e)&&e!=this._clampMode){if(this._clampMode=e,t$$(this.polyline)&&t$$(this.polyline.polyline)){var t=e!==n$q.Space,i=that._clampMode<n$q.S3mModel?_0x29401c.TERRAIN:that._clampMode<n$q.Both?_0x29401c.S3M_TILE:_0x29401c.BOTH;this.polyline.polyline.clampToGround=t,this.polyline.polyline.classificationType=i}if(t$$(this.polygon)){var n=n$q.Space===this._clampMode;i=that._clampMode<n$q.S3mModel?_0x29401c.TERRAIN:that._clampMode<n$q.Both?_0x29401c.S3M_TILE:_0x29401c.BOTH;this.polygon.polygon.perPositionHeight=n,this.polygon.polygon.classificationType=i}}}else this._clampMode=n$q.Raster}},enableDepthTest:{get:function(){return this._enableDepthTest},set:function(e){this._enableDepthTest=e}}}),b$u.prototype.activate=function(){if(1!=this.active){this.active=!0;var e=this;this.handler.setInputAction((function(t){ii$3(t,e)}),Q$L.LEFT_CLICK),this.handler.setInputAction((function(t){si$2(t,e)}),Q$L.MOUSE_MOVE),this.handler.setInputAction((function(t){ci$2(t,e)}),Q$L.RIGHT_CLICK),this.activeEvt.raiseEvent(!0)}},b$u.prototype.deactivate=function(){this.active=!1,this.isDrawing=!1,this.handler.removeInputAction(Q$L.LEFT_CLICK),this.handler.removeInputAction(Q$L.MOUSE_MOVE),this.handler.removeInputAction(Q$L.RIGHT_CLICK),this.activeEvt.raiseEvent(!1)},b$u.prototype.clear=function(){if(this.deactivate(),this.positions.length=0,this._positions.length=0,t$$(this.rasterPolylines)&&(this.viewer.scene.rasterVectorCollection.remove(this.rasterPolylines),this.rasterPolylines=void 0),t$$(this.rasterPolygon)&&(this.viewer.scene.rasterVectorCollection.remove(this.rasterPolygon),this.rasterPolygon=void 0),t$$(this.polygon)&&(this.viewer.entities.remove(this.polygon),this.polygon=void 0),t$$(this.polyline)&&(this.viewer.entities.remove(this.polyline),this.polyline=void 0),t$$(this.points)&&(this.points.removeAll(),this.viewer.scene.primitives.remove(this.points),this.points=void 0),t$$(this.markers)&&(this.viewer.scene.primitives.remove(this.markers),this.markers=void 0,t$$(this.marker)&&(this.marker=void 0)),t$$(this.corridor)&&this.viewer.entities.remove(this.corridor),t$$(this.boxes)){for(var e=0,t=this.boxes.length;e<t;e++)this.viewer.entities.remove(this.boxes[e]);this.boxes=void 0,this.box=void 0,this.boxConfig=void 0}};var ri$1=new a$11,x$r=new a$11,W$k=new r$T,ai$1=new c$19;function li$2(e,t,i){var n=t.boxConfig;if(t$$(n))if(1==n.leftClickTimes)if(t.viewer.scene.mode===b$1d.COLUMBUS_VIEW){var r=(y=t.viewer.scene.camera).getPickRay(e),o=m$13.convertToColumbusCartesian(n.firstPoint);t$$(n.first)||(n.first=a$11.clone(n.firstPoint));var a=n$17.fromPointNormal(o,a$11.UNIT_X);if(!t$$(h=h$1b.rayPlane(r,a)))return;i$1g.fromCartesian(n.firstPoint);var s=m$13.convertTo3DCartesian(h);n.second=a$11.clone(s),s=i$1g.fromCartesian(s);var l=Math.cos(s.latitude);n.ratio=l,s=i$1g.toCartesian(s),h=m$13.convertToColumbusCartesian(s),n.scratchPosition=a$11.midpoint(h,o,new a$11),n.scratchPosition=m$13.convertTo3DCartesian(n.scratchPosition),n.length=Math.abs(h.y-o.y)*l,n.width=Math.abs(h.z-o.z),n.height=0}else{r=t.viewer.camera.getPickRay(e);var u=c$19.unpack([0,0,0,a$11.distance(n.firstPoint,a$11.ZERO)],0,ai$1),c=h$1b.raySphere(r,u),h=n$18.getPoint(r,c.start),d=c$1a.multiplyByPoint(n.enuInverse,h,ri$1);d.z=0,n.scratchPosition=c$1a.multiplyByPoint(n.enu,a$11.divideByScalar(d,2,d),n.scratchPosition),c$1a.multiplyByPoint(n.enuInverse,n.scratchPosition,d),n.length=2*(d.x>0?d.x:-d.x),n.width=2*(d.y>0?d.y:-d.y),n.height=0}else if(n.leftClickTimes>1)if(t.viewer.scene.mode===b$1d.COLUMBUS_VIEW){var f=(y=t.viewer.scene.camera).getPickRay(e),p=r$T.fromElements(e.x+5,e.y,W$k),_=y.getPickRay(p),m=a$11.normalize(a$11.cross(f.direction,_.direction,x$r),x$r),$=(a=n$17.fromPointNormal(y.positionWC,m),m$13.convertToColumbusCartesian(n.second));$.x=.1;r=new n$18($,a$11.UNIT_X);var g=h$1b.rayPlane(r,a);if(!t$$(g))return;o=m$13.convertToColumbusCartesian(n.first);n.scratchPosition=a$11.midpoint(o,g,new a$11),n.scratchPosition=m$13.convertTo3DCartesian(n.scratchPosition),n.secondPoint=m$13.convertTo3DCartesian(g),n.height=Math.abs(o.x-g.x)}else{var y;f=(y=t.viewer.scene.camera).getPickRay(e),p=r$T.fromElements(e.x+5,e.y,W$k),_=y.getPickRay(p),m=a$11.normalize(a$11.cross(f.direction,_.direction,x$r),x$r),a=n$17.fromPointNormal(y.positionWC,m),r=new n$18(a$11.ZERO,n.secondPoint);n.secondPoint=h$1b.rayPlane(r,a);var v=c$1a.multiplyByPoint(n.enuInverse,n.secondPoint,new a$11);a$11.divideByScalar(v,2,v),Cesium.Matrix4.multiplyByPoint(n.enu,v,n.scratchPosition),n.length=2*(v.x>0?v.x:-v.x),n.width=2*(v.y>0?v.y:-v.y),n.height=2*(v.z>0?v.z:-v.z)}}var A$t=0;function ci$2(e,t){var i=t;if(i&&i.active&&i.isDrawing){if(i.deactivate(),i.mode===_0xd8b438.Box)return t.boxConfig=void 0,void i.drawEvt.raiseEvent({object:i.box,positions:i._positions});if(!t$$(i.polyline))return;if(i._positions=i._positions.slice(0,i._positions.length-1),i.mode===_0xd8b438.Polygon){if(i._positions.length<3)return void(i._positions.length=0);var n=[].concat(i._positions);if(i.polygon.polygon.hierarchy={positions:n,holes:i.polygon.polygon.hierarchy.getValue().holes},i.polygon.positions=n,n$q.Raster===i._clampMode){i._positions.length=0,t$$(i.polyline)&&(i.polyline.show=!1),t$$(i.polygon)&&(i.polygon.show=!1);for(var r=[],o=0;o<n.length;o++)r.push(i$1g.fromCartesian(n[o]));A$t+=1,i.rasterPolygon=A$t,i.viewer.scene.rasterVectorCollection.add({name:i.rasterPolygon,pickId:i.rasterPolygon,positions:r,fillColor:e$1z.ORANGE.withAlpha(.5),geometryType:C$o.POLYGON});var a=[];for(o=0;o<r.length;o++)a.push(r[o]);a.push(r[0]),i.rasterPolylines=A$t,i.viewer.scene.rasterVectorCollection.add({name:i.rasterPolylines,pickId:i.rasterPolylines,positions:a,lineColor:e$1z.fromCssColorString("#51ff00"),lineWidth:3,geometryType:C$o.POLYLINE}),i.drawEvt.raiseEvent({object:n,positions:i.positions})}else i.drawEvt.raiseEvent({object:i.polygon,positions:i.positions})}else i.mode===_0xd8b438.Line&&(i.polyline.positions=i._positions,i.drawEvt.raiseEvent({object:i.polyline,positions:i.positions}))}}var w$u="referencePoint",E$o="referenceAddPoint",l$g=function(e,t){if(!t$$(e)||!t$$(t))throw new t$_("viewer and mode is required!");this.handler=new f$N(e.scene.canvas),this.viewer=e,this.active=!1,this.referencePointColor=e$1z.WHITE,this.editPointColor=e$1z.VIOLET,this.setEditObject(t),this._editZ=!1,this._changedEvt=new o$15};function I$n(e,t){if(!e.scene.pickRasterData(t.position).isS3MTilesLayerSel){var i=e.scene.pick(t.position);if(t$$(i)){var n=e$1Y(i.id,i.primitive.id);if(n instanceof l$J)return n;if(t$$(i.primitive))return i}}}function D$r(e,t){var i=t;if(i&&i.active){var n=I$n(i.viewer,e);if(t$$(n)){var r=n.id;if(!t$$(r))return;var o=r.split("_");2==o.length&&o[0]===w$u&&(i._editPointIndex=parseInt(o[1]),i._editPoint=n.primitive,i._editPoint.color=i.editPointColor,i.viewer.scene._screenSpaceCameraController.enableRotate=!1)}else t.clear()}}function K$g(e,t){var i=t;i&&i.active&&(i._editPointIndex=-1,t$$(i._editPoint)&&(i._editPoint.color=i.referencePointColor,i._editPoint=void 0),i.viewer.scene._screenSpaceCameraController.enableRotate=!0,i._changedEvt.raiseEvent({}))}function N$i(e,t){var i=t;if(i&&i.active&&i._editPointIndex>-1&&i.viewer.scene._screenSpaceCameraController._aggregator._isDown[0]){var n,r=new r$T(e.endPosition.x,e.endPosition.y),o=i._polyline,a=i._polygon,s=!0;if(t$$(o)&&(s=o.clampToGround),t$$(a)&&(s=!a.perPositionHeight),s)n=i.viewer.scene.pickPosition(r);else if(i._editZ){var l=i.viewer.camera.getPickRay(r),u=new r$T(r.x+5,r.y),c=i.viewer.camera.getPickRay(u),h=new a$11;h=a$11.cross(l.direction,c.direction,h);var d=new a$11;a$11.normalize(h,d);var f=n$17.fromPointNormal(i.viewer.camera.position,d),p=new n$18(a$11.ZERO,i._editPoint.position);n=h$1b.rayPlane(p,f)}else{p=i.viewer.camera.getPickRay(r);var _=new c$19(a$11.ZERO,a$11.distance(i._editPoint.position,a$11.ZERO)),m=h$1b.raySphere(p,_);n=n$18.getPoint(p,m.start)}i._editPoint.position=n;var $=i._positions;$[i._editPointIndex]=n,t$$(o)&&(o.positions=new n$K((function(){return $}),!1)),t$$(a)&&(a.hierarchy=new n$K((function(){return{positions:$,holes:[]}}),!1)),i.refreshReferenceAddPoint()}}function U$j(e,t){var i=t;if(i&&i.active){var n=I$n(i.viewer,e);if(t$$(n)){var r=n.id;if(!t$$(r))return;var o=r.split("_");if(2==o.length&&o[0]===E$o){var a=parseInt(o[1]),s=i._addPositions[a];(h=i._positions).splice(a+1,0,s);var l=i._polyline;t$$(l)&&(l.positions=new n$K((function(){return h}),!1));var u=i._polygon;if(t$$(u)){var c=new n$K((function(){return h}),!1),h=u.hierarchy.getValue(0);Array.isArray(h)?u.hierarchy=c:u.hierarchy.positions=c}i.refreshReferencePoint(),i.refreshReferenceAddPoint()}}}}function q$o(e,t){var i=t;if(i&&i.active){var n=I$n(i.viewer,e);if(t$$(n)){var r=n.id;if(!t$$(r))return;var o=r.split("_");if(2==o.length&&o[0]===w$u){var a=parseInt(o[1]),s=i._positions;s.splice(a,1);var l=i._polyline;t$$(l)&&(l.positions=new n$K((function(){return s}),!1));var u=i._polygon;t$$(u)&&(u.hierarchy=new n$K((function(){return s}),!1)),i.refreshReferencePoint(),i.refreshReferenceAddPoint()}}}}Object.defineProperties(l$g.prototype,{isEditZ:{get:function(){return this._editZ},set:function(e){this._editZ=e}},changedEvt:{get:function(){return this._changedEvt}}}),l$g.prototype.setEditObject=function(e){if(t$$(e._polygon)||t$$(e._polyline)){if(this.clear(),this._editObject=e,this._polygon=e._polygon,t$$(this._polygon)){var t=this._polygon.hierarchy.getValue(0);if(!Array.isArray(t)){if(!Array.isArray(t.positions))throw new t$_("positions is required!");t=t.positions}if(this._polygon.classificationType&&(this._polygon.classificationType===_0x29401c.BOTH||this._polygon.classificationType===_0x29401c.TERRAIN)||!t$$(this._polygon.height)&&!t$$(this._polygon.extrudedHeight)&&t$$(this._polygon.perPositionHeight)&&!this._polygon.perPositionHeight.getValue()){for(var i=[],n=0;n<t.length;n++){var r=i$1g.fromCartesian(t[n]);r.height=this.viewer.scene.globe.getHeight(r),i.push(i$1g.toCartesian(r))}this._positions=i}else this._positions=t}this._polyline=e._polyline,t$$(this._polyline)&&(this._positions=this._polyline.positions.getValue(0)),this._editPoints=this.viewer.scene.primitives.add(new O$t({depthTestEnable:!1}));for(n=0;n<this._positions.length;n++)this._editPoints.add({id:w$u+"_"+n,position:this._positions[n],image:o$12("Assets/Textures/vertex-edit.png")});this._editPointIndex=-1,this._editPoint=void 0,this._addPositions=[],this._addPoints=this.viewer.scene.primitives.add(new O$t({depthTestEnable:!1}));for(n=0;n<this._positions.length-1;n++){var o=new a$11;a$11.add(this._positions[n],this._positions[n+1],o),a$11.multiplyByScalar(o,.5,o),this._addPositions.push(o)}if(t$$(this._polygon)){o=new a$11;a$11.add(this._positions[0],this._positions[this._positions.length-1],o),a$11.multiplyByScalar(o,.5,o),this._addPositions.push(o)}for(n=0;n<this._addPositions.length;n++)this._addPoints.add({id:E$o+"_"+n,position:this._addPositions[n],image:o$12("Assets/Textures/middle-edit.png")});this.activate()}},l$g.prototype.activate=function(){if(1!=this.active){this.active=!0;var e=this;this.handler.setInputAction((function(t){D$r(t,e)}),Q$L.LEFT_DOWN),this.handler.setInputAction((function(t){K$g(t,e)}),Q$L.LEFT_UP),this.handler.setInputAction((function(t){N$i(t,e)}),Q$L.MOUSE_MOVE),this.handler.setInputAction((function(t){U$j(t,e)}),Q$L.LEFT_CLICK),this.handler.setInputAction((function(t){q$o(t,e)}),Q$L.RIGHT_CLICK)}},l$g.prototype.deactivate=function(){this.active=!1,this.handler.removeInputAction(Q$L.LEFT_DOWN),this.handler.removeInputAction(Q$L.LEFT_UP),this.handler.removeInputAction(Q$L.MOUSE_MOVE),this.handler.removeInputAction(Q$L.LEFT_CLICK),this.handler.removeInputAction(Q$L.RIGHT_CLICK)},l$g.prototype.clear=function(){this.deactivate(),t$$(this._editPoints)&&this._editPoints.removeAll(),t$$(this._editPointIndex)&&(this._editPointIndex=-1),t$$(this._editPoint)&&(this._editPoint=void 0),t$$(this._editObject)&&(this._editObject=void 0),t$$(this._polygon)&&(this._polygon=void 0),t$$(this._polyline)&&(this._polyline=void 0),t$$(this._addPoints)&&this._addPoints.removeAll(),t$$(this._addPositions)&&(this._addPositions.length=0),t$$(this._positions)&&(this._positions=void 0)},l$g.prototype.refreshReferencePoint=function(){t$$(this._editPoints)&&this._editPoints.removeAll(),this._editPoints=this.viewer.scene.primitives.add(new O$t({depthTestEnable:!1}));for(var e=0;e<this._positions.length;e++)this._editPoints.add({id:w$u+"_"+e,position:this._positions[e],image:o$12("Assets/Textures/vertex-edit.png")});t$$(this._editPointIndex)&&(this._editPointIndex=-1),t$$(this._editPoint)&&(this._editPoint=void 0)},l$g.prototype.refreshReferenceAddPoint=function(){t$$(this._addPoints)&&this._addPoints.removeAll(),this._addPositions=[],this._addPoints=this.viewer.scene.primitives.add(new O$t({depthTestEnable:!1}));for(var e=0;e<this._positions.length-1;e++){var t=new a$11;a$11.add(this._positions[e],this._positions[e+1],t),a$11.multiplyByScalar(t,.5,t),this._addPositions.push(t)}if(t$$(this._polygon)){t=new a$11;a$11.add(this._positions[0],this._positions[this._positions.length-1],t),a$11.multiplyByScalar(t,.5,t),this._addPositions.push(t)}for(e=0;e<this._addPositions.length;e++)this._addPoints.add({position:this._addPositions[e],id:E$o+"_"+e,image:o$12("Assets/Textures/middle-edit.png")})};var e$p={Distance:0,Area:1,DVH:2,DVHX:3},_0x4057bc=Object.freeze(e$p),O$j=function(e,t,i,n){if(!t$$(e)||!t$$(t))throw new t$_("viewer and mode is required!");this.handler=new f$N(e.scene.canvas),this.viewer=e,this._clampMode=e$1Y(i,n$q.Space),this.mode=t,this.isDrawing=!1,this.active=!1,this.tmpEntities=[],this._areaLabel=void 0,this._disLabel=void 0,this._vLabel=void 0,this._hLabel=void 0,this._measureEvt=new o$15,this._activeEvt=new o$15,this._enableDepthTest=!1,this._labelBackgroundColor=e$1z.fromCssColorString("rgba(38, 38, 38, 0.85)"),this._labelPixelOffsetScaleByDistance=new u$W(150,3,15e6,.5),this._labelPixelOffset=new r$T(15,0),this._lineColor=e$1z.fromCssColorString("#51ff00"),this._fillColor=e$1z.ORANGE.withAlpha(.5),this._lineWidth=2,this._dblclickListener=void 0,this._showMeasureResult=e$1Y(n,!0),this._lineDisplayType=q$P.NON_OCCLUDED};function be$c(e,t){var i=t;if(i&&i.active){var n=i.viewer.scene,r=n.pickPosition(e.position);!t$$(r)&&n.mode===b$1d.SCENE2D&&(r=n.camera.pickEllipsoid(e.position));var o=n.pickPointEnabled?e$1Y(a$11.clone(n.pickPoint),r):r;if(o)if(i.isDrawing)if(i.mode==_0x4057bc.DVH||i.mode==_0x4057bc.DVHX)i.deactivate();else{var a=o;if(i&&i.active&&i.isDrawing&&t$$(a))switch(i.mode){case _0x4057bc.Distance:re$d(a,i);break;case _0x4057bc.Area:le$f(a,i);break;case _0x4057bc.DVH:ae$b(a,i)}Le$8(o,i)}else switch(i.isDrawing=!0,i.mode){case _0x4057bc.Distance:Te$a(o,i);break;case _0x4057bc.Area:Pe$a(o,i);break;case _0x4057bc.DVH:De$b(o,i);break;case _0x4057bc.DVHX:Me$b(o,i)}}}function Ee$b(e,t){var i=t,n=i.viewer.scene,r=n.pickPosition(e.endPosition);!t$$(r)&&n.mode===b$1d.SCENE2D&&(r=n.camera.pickEllipsoid(e.endPosition));var o=n.pickPointEnabled?e$1Y(a$11.clone(n.pickPoint),r):r;if(i&&i.active&&i.isDrawing&&t$$(o))switch(i.mode){case _0x4057bc.Distance:re$d(o,i);break;case _0x4057bc.Area:le$f(o,i);break;case _0x4057bc.DVH:ae$b(o,i)}}function Ce$9(e,t){var i=t,n=i.viewer.scene;if(i&&i.active&&i.isDrawing){var r;if(i.deactivate(),t$$(i.polyline)&&(i.mode===_0x4057bc.Distance?(r=i._accumulationPositions,1===i.polyline.positions.length&&i.viewer.entities.remove(i.spEntity)):(i.mode===_0x4057bc.Area?i.polyline.positions.push(i.polyline.positions[0]):i.polyline.positions=i.polyline.positions.slice(0,i.polyline.positions.length-1),1===i.polyline.positions.length&&i.viewer.entities.remove(i.spEntity),r=i.polyline.positions),i.viewer.entities.remove(i.epEntity),!t$$(i.polygon))){i.polylinePositions=r,i._disLabel.position=r[r.length-1];var o=0;if(t._clampMode===n$q.Ground)o=xe$g(i.viewer.scene,i._accumulationPositions);else for(var a=0,s=r.length-1;a<s;a++)n.mode===b$1d.COLUMBUS_VIEW?o+=a$11.distance(T$p(r[a],n.mapProjection),T$p(r[a+1],n.mapProjection)):o+=a$11.distance(r[a],r[a+1]);i._disLabel.show=!0,i.measureEvt.raiseEvent({distance:o.toFixed(8),positions:r})}if(t$$(i.polygon)){if(r.length<3){i._areaLabel.show=!1,i.viewer.entities.remove(i.spEntity);for(a=0,s=i.tmpEntities.length;a<s;a++)i.viewer.entities.remove(i.tmpEntities[a]);i.tmpEntities.length=0,i.viewer.entities.remove(i.epEntity),i.polyline.positions.length=0}if(i._areaLabel.show=!0,(i._clampMode==n$q.Ground||i._clampMode==n$q.S3mModel)&&(i.polyline.show=!0),i.polygonPositions=i.polyline.positions,i.polygon.show=!0,r.length>2){if(i._clampMode!==n$q.Ground)i._areaLabel.position=i.polyline.positions[i.polyline.positions.length-1];else{var l=i.tmpEntities[i.tmpEntities.length-1]._position._value;i._areaLabel.position=l}if(i._clampMode===n$q.Ground){var u=Oe$9(i.viewer.scene,i.polyline.positions);return void i.measureEvt.raiseEvent({area:u.toFixed(8),positions:r})}var c,h,d,f=T$10.triangulate(r),p=f.length/3,_=0;for(a=0;a<p;a++)c=r[f[3*a]],h=r[f[3*a+1]],d=r[f[3*a+2]],n.mode===b$1d.COLUMBUS_VIEW?(g$j=a$11.subtract(T$p(h,n.mapProjection),T$p(c,n.mapProjection),g$j),w$t=a$11.subtract(T$p(d,n.mapProjection),T$p(c,n.mapProjection),w$t),b$t=a$11.cross(g$j,w$t,b$t),_+=.5*a$11.magnitude(b$t)):(g$j=a$11.subtract(h,c,g$j),w$t=a$11.subtract(d,c,w$t),b$t=a$11.cross(g$j,w$t,b$t),_+=.5*a$11.magnitude(b$t));i.measureEvt.raiseEvent({area:_.toFixed(8),positions:r})}}}}function Le$8(e,t){var i=t;i.mode===_0x4057bc.Distance?(i.polyline.positions.push(e),i._accumulationPositions.push(e)):(i.mode===_0x4057bc.Area&&(i._accumulationArea=i._currentArea),i.polyline.positions.pop(),i.polyline.positions.push(e),i.polyline.positions.push(i.polyline.positions[0])),t$$(i.polygon)&&(i.polygonPositions=i.polyline.positions),i.tmpEntities.push(i.viewer.entities.add({show:i._showMeasureResult,position:e,point:{pixelSize:8,color:e$1z.fromCssColorString("#ffe500")}}))}Object.defineProperties(O$j.prototype,{activeEvt:{get:function(){return this._activeEvt}},measureEvt:{get:function(){return this._measureEvt}},disLabel:{get:function(){return this._disLabel}},areaLabel:{get:function(){return this._areaLabel}},hLabel:{get:function(){return this._hLabel}},vLabel:{get:function(){return this._vLabel}},clampMode:{get:function(){return this._clampMode},set:function(e){t$$(e)&&e!=this._clampMode&&(this._clampMode=e,t$$(this.polygon)&&(e==n$q.Space?(this.polygon.polygon.perPositionHeight.setValue(!0),this.polygon.clampToS3M=!1):e==n$q.Ground?(this.polygon.polygon.perPositionHeight.setValue(!1),this.polygon.clampToS3M=!1):e==n$q.S3mModel&&(this.polygon.polygon.perPositionHeight.setValue(!1),this.polygon.clampToS3M=!0)),t$$(this.polyline)&&(e==n$q.Ground?this.polyline._polyline.clampToGround=!0:this.polyline._polyline.clampToGround=!1))}},enableDepthTest:{get:function(){return this._enableDepthTest},set:function(e){console.warn("MeasureHandler.enableDepthTest is deprecated, use MeasureHandler.lineDisplayType instead."),n$1e.typeOf.bool("MeasureHandler.enableDepthTest",e),this._enableDepthTest=e,this._lineDisplayType=e?q$P.OCCLUDED:q$P.NON_OCCLUDED}},capturePointSize:{get:function(){return this.viewer._capturePointSize},set:function(e){this.viewer._capturePointSize=e}},capturePointColor:{get:function(){return this.viewer._capturePointColor},set:function(e){this.viewer._capturePointColor=e}},lineColor:{get:function(){return this._lineColor},set:function(e){this._lineColor=e}},fillColor:{get:function(){return this._fillColor},set:function(e){this._fillColor=e}},lineWidth:{get:function(){return this._lineWidth},set:function(e){this._lineWidth=e}},lineDisplayType:{get:function(){return this._lineDisplayType},set:function(e){n$1e.typeOf.number.greaterThanOrEquals("MeasureHandler.lineDisplayType",e,0),n$1e.typeOf.number.lessThanOrEquals("MeasureHandler.lineDisplayType",e,2),this._lineDisplayType=e,this.polylines&&(this.polylines.lineDisplayType=e)}}}),O$j.prototype.activate=function(){if(this.mode!==_0x4057bc.DVH&&this.clear(),1!=this.active){this.active=!0;var e=this;this.handler.setInputAction((function(t){be$c(t,e)}),Q$L.LEFT_CLICK),this.handler.setInputAction((function(t){Ee$b(t,e)}),Q$L.MOUSE_MOVE),this.handler.setInputAction((function(t){Ce$9(t,e)}),Q$L.RIGHT_CLICK),this.activeEvt.raiseEvent(!0),this._dblclickListener=this.viewer.screenSpaceEventHandler.getInputAction(Q$L.LEFT_DOUBLE_CLICK),this.viewer.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK)}},O$j.prototype.deactivate=function(){!0===this.active&&this.activeEvt.raiseEvent(!1),this.active=!1,this.isDrawing=!1,this.handler.removeInputAction(Q$L.LEFT_CLICK),this.handler.removeInputAction(Q$L.MOUSE_MOVE),this.handler.removeInputAction(Q$L.RIGHT_CLICK),t$$(this._dblclickListener)&&(this.viewer.screenSpaceEventHandler.setInputAction(this._dblclickListener,Q$L.LEFT_DOUBLE_CLICK),this._dblclickListener=void 0)},O$j.prototype.clear=function(){this.deactivate();for(var e=0,t=this.tmpEntities.length;e<t;e++)this.viewer.entities.remove(this.tmpEntities[e]);if(t$$(this.clampToGroundPolyline)&&(this.viewer.entities.remove(this.clampToGroundPolyline),this.clampToGroundPolyline=null),this.tmpEntities.length=0,t$$(this.polylines)&&(this.polylines.removeAll(),this.viewer.scene.primitives.remove(this.polylines),this.polylines=void 0),t$$(this.spEntity)&&(this.viewer.entities.remove(this.spEntity),this.spEntity=void 0),t$$(this.epEntity)&&(this.viewer.entities.remove(this.epEntity),this.epEntity=void 0),t$$(this.fpEntity)&&(this.viewer.entities.remove(this.fpEntity),this.fpEntity=void 0),t$$(this.labels))switch(this.mode){case _0x4057bc.Distance:this.labels.remove(this._disLabel);break;case _0x4057bc.Area:this.labels.remove(this._areaLabel);break;case _0x4057bc.DVH:this.labels.removeAll()}t$$(this.polygon)&&(this.viewer.entities.remove(this.polygon),this.polygon=void 0),t$$(this.polyline)&&(this.viewer.entities.remove(this.polyline),this.polyline=void 0)};var g$j=new a$11,w$t=new a$11,b$t=new a$11;function le$f(e,t){var i=t,n=i.viewer.scene;if(t$$(e)){i.endPoint=e;var r=i.polyline.positions,o=r.length;if(o>3?(r[o-2]=e,r.pop()):r[o-1]=e,o>2&&(t$$(i._areaLabel)&&(i._areaLabel.show=!0),i.polygonPositions=r),i.polyline.positions=r,r.length>2){var a;if(i.epEntity.position=e,i._areaLabel.position=e,i._areaLabel.show=t._clampMode!==n$q.Ground,i.polyline.positions.push(i.polyline.positions[0]),t._clampMode===n$q.Ground)return;if(n.mode===b$1d.COLUMBUS_VIEW){var s=r.map((function(e){return T$p(e,n.mapProjection)}));a=O$j.computeArea(s)}else a=O$j.computeArea(r);i.measureEvt.raiseEvent({area:a.toFixed(8),positions:r})}}}function Pe$a(e,t){var i=t;i.polygonPositions=[],i.polylineCoord=[e,e],i.tmpEntities.length=0;var n=i._enableDepthTest;i.polyline=i.viewer.entities.add({polyline:{positions:new n$K((function(){return i.polylineCoord}),!1),width:i._lineWidth,material:e$1z.fromCssColorString("#51ff00"),loop:!0,clampToGround:i._clampMode===n$q.Ground}}),i.polyline.positions=i.polylineCoord,i.spEntity=i.viewer.entities.add({position:e,point:{pixelSize:8,color:e$1z.fromCssColorString("#ffe500")}}),i.epEntity=i.viewer.entities.add({position:e,point:{pixelSize:8,color:e$1z.fromCssColorString("#ffe500")}});var r=i.viewer.scene.primitives.add(new m$A({depthTestEnable:!1}));i._areaLabel=r.add({position:e,font:"100 20px SimSun",fillColor:e$1z.WHITE,style:z$t.FILL_AND_OUTLINE,showBackground:!0,outlineWidth:1,outlineColor:e$1z.BLUE,pixelOffset:i._labelPixelOffset,text:"",show:i._showMeasureResult,horizontalOrigin:N$W.LEFT});var o=i._clampMode,a=!1,s=!1;o==n$q.Space?a=!0:o==n$q.S3mModel&&(s=!0),i.polygon=i.viewer.entities.add({polygon:{hierarchy:new n$K((function(){return{positions:JSON.parse(JSON.stringify(i.polygonPositions)),holes:[]}}),!1),material:i._fillColor,perPositionHeight:a},clampToS3M:s,depthTestEnabled:n,show:!0}),i.labels=r,t._clampMode===n$q.Ground&&(i.polyline.show=!0),i._areaLabel.show=!1}function Te$a(e,t){var i=t;i.polylinePositions=[e,e],i.polyline=i.viewer.entities.add({polyline:{positions:new n$K((function(){return i.polylinePositions}),!1),width:i._lineWidth,material:i._lineColor,clampToGround:t._clampMode===n$q.Ground}}),i.polyline.positions=i.polylinePositions,i.tmpEntities.length=0,i._accumulationPositions=[e],i.spEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1z.fromCssColorString("#ffe500")}}),i.epEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1z.fromCssColorString("#ffe500")}});var n=i.viewer.scene.primitives.add(new m$A({depthTestEnable:!1}));i._disLabel=n.add({position:e,font:"100 20px SimSun",fillColor:e$1z.WHITE,style:z$t.FILL_AND_OUTLINE,showBackground:!0,backgroundColor:i._labelBackgroundColor,outlineWidth:1,outlineColor:e$1z.BLUE,pixelOffset:i._labelPixelOffset,text:"",show:i._showMeasureResult,horizontalOrigin:N$W.LEFT}),i.labels=n}function re$d(e,t){var i=t,n=i.viewer.scene;i.endPoint=e;var r=i.polyline.positions,o=r.length;i.polylinePositions=r,r[o-1]=e,i.polyline.positions=r,i.epEntity.position=e;var a=0,s=i._accumulationPositions.concat([e]);if(i.polyline._distance=a,i._disLabel.position=e,i._disLabel.show=t._clampMode!==n$q.Ground,t._clampMode!==n$q.Ground){for(var l=0,u=s.length-1;l<u;l++)n.mode===b$1d.COLUMBUS_VIEW?a+=a$11.distance(T$p(s[l],n.mapProjection),T$p(s[l+1],n.mapProjection)):a+=a$11.distance(s[l],s[l+1]);i.measureEvt.raiseEvent({distance:a.toFixed(8),positions:s})}}function De$b(e,t){var i=t;if(!t$$(i.polylines)){var n=i._enableDepthTest;i.polylines=new W$P({opaqueRS:p$1a.fromCache({depthMask:n,depthTest:{enabled:n}}),lineDisplayType:i._lineDisplayType}),i.viewer.scene.primitives.add(i.polylines)}i.horizontalPolyline=i.polylines.add({width:2,show:i._showMeasureResult,positions:[e,e],material:r$v.fromType(r$v.ColorType,{color:i._lineColor})}),i.verticalPolyline=i.polylines.add({width:2,show:i._showMeasureResult,positions:[e,e],material:r$v.fromType(r$v.ColorType,{color:i._lineColor})}),i.dirPolyline=i.polylines.add({width:2,show:i._showMeasureResult,positions:[e,e],material:r$v.fromType(r$v.ColorType,{color:i._lineColor})}),i.spEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1z.fromCssColorString("#ffe500")}}),i.epEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1z.fromCssColorString("#ffe500")}}),i.fpEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1z.fromCssColorString("#ffe500")}}),i.tmpEntities.push(i.spEntity),i.tmpEntities.push(i.epEntity),i.tmpEntities.push(i.fpEntity),t$$(i.labels)||(i.labels=i.viewer.scene.primitives.add(new m$A({depthTestEnable:!1}))),i._disLabel=i.labels.add({position:e,font:"500 16px sans-serif",style:z$t.FILL_AND_OUTLINE,outlineWidth:1,outlineColor:e$1z.BLACK,showBackground:!0,backgroundColor:i._labelBackgroundColor,pixelOffset:i._labelPixelOffset,pixelOffsetScaleByDistance:i._labelPixelOffsetScaleByDistance,text:"",show:i._showMeasureResult,horizontalOrigin:N$W.LEFT}),i._vLabel=i.labels.add({position:e,font:"500 16px sans-serif",style:z$t.FILL_AND_OUTLINE,outlineWidth:1,outlineColor:e$1z.BLACK,showBackground:!0,backgroundColor:i._labelBackgroundColor,pixelOffset:i._labelPixelOffset,pixelOffsetScaleByDistance:i._labelPixelOffsetScaleByDistance,text:"",show:i._showMeasureResult,horizontalOrigin:N$W.LEFT}),i._hLabel=i.labels.add({position:e,font:"500 16px sans-serif",style:z$t.FILL_AND_OUTLINE,outlineWidth:1,outlineColor:e$1z.BLACK,showBackground:!0,backgroundColor:i._labelBackgroundColor,pixelOffset:i._labelPixelOffset,pixelOffsetScaleByDistance:i._labelPixelOffsetScaleByDistance,text:"",show:i._showMeasureResult,horizontalOrigin:N$W.LEFT});var r=new a$11;a$11.normalize(e,r),i.plane=n$17.fromPointNormal(e,r),i.startPoint=e,i.startHeight=i$1g.fromCartesian(e).height,i.normal=r;var o=new a$11;a$11.negate(r,o),i.negateNormal=o,i.spEntity.position=e}function Me$b(e,t){var i=t;if(!t$$(i.polylines)){i.polylines=new W$P,i.verticalPolyline=i.polylines.add({width:2,show:i._showMeasureResult,positions:[e,e],material:r$v.fromType(r$v.ColorType,{color:i._lineColor})}),i.startPoint=e,i.spEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1z.fromCssColorString("#ffe500")}}),i.fpEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1z.fromCssColorString("#ffe500")}});var n=i.viewer.scene.primitives.add(new m$A({depthTestEnable:!1}));i._vLabel=n.add({position:e,font:"500 16px sans-serif",style:z$t.FILL_AND_OUTLINE,outlineWidth:1,outlineColor:e$1z.BLACK,showBackground:!0,backgroundColor:i._labelBackgroundColor,pixelOffset:i._labelPixelOffset,pixelOffsetScaleByDistance:i._labelPixelOffsetScaleByDistance,text:"",show:i._showMeasureResult,horizontalOrigin:N$W.LEFT}),i.viewer.scene.primitives.add(i.polylines),i.labels=n}i.startPoint=e,i.spEntity.position=e}var Se$9=new a$11;function ae$b(e,t){var i=t;if(i.viewer.scene,t$$(e)){i.endPoint=e;var n,r,o=i$1g.fromCartesian(e).height;if(o>i.startHeight){var a=a$11.normalize(e,Se$9);n=n$17.fromPointNormal(e,a),r=new n$18(i.startPoint,a)}else n=i.plane,r=new n$18(e,i.normal);var s=h$1b.rayPlane(r,n);if(t$$(s)||(r=new n$18(e,i.normal),s=h$1b.rayPlane(r,i.plane))){o>i.startHeight?(i.horizontalPolyline.positions=[e,s],i.verticalPolyline.positions=[i.startPoint,s]):(i.horizontalPolyline.positions=[i.startPoint,s],i.verticalPolyline.positions=[e,s]),i.dirPolyline.positions=[i.startPoint,e],i.epEntity.position=e,i.fpEntity.position=s;var l=a$11.distance(i.startPoint,e).toFixed(8),u=a$11.distance(i.startPoint,s).toFixed(8),c=a$11.distance(e,s).toFixed(8);o>i.startHeight?(a$11.lerp(i.startPoint,e,.5,i._disLabel.position),a$11.lerp(i.startPoint,s,.5,i._vLabel.position),a$11.lerp(e,s,.5,i._hLabel.position)):(a$11.lerp(i.startPoint,e,.5,i._disLabel.position),a$11.lerp(e,s,.5,i._vLabel.position),a$11.lerp(i.startPoint,s,.5,i._hLabel.position),u=a$11.distance(e,s).toFixed(8),c=a$11.distance(i.startPoint,s).toFixed(8)),i.measureEvt.raiseEvent({distance:l,directionalPositions:i.dirPolyline.positions,verticalHeight:u,verticalPositions:i.verticalPolyline.positions,horizontalDistance:c,horizontalPositions:i.horizontalPolyline.positions,endHeight:o})}}}function T$p(e,t){if(t$$(e)){var i=t.ellipsoid.cartesianToCartographic(e);return t.project(i)}}function Oe$9(e,t){for(var i=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=Number.MAX_VALUE,o=-Number.MAX_VALUE,a=0;a<t.length;a++){var s=i$1g.fromCartesian(t[a]);i=Math.min(s.longitude,i),n=Math.max(s.longitude,n),r=Math.min(s.latitude,r),o=Math.max(s.latitude,o)}for(var l=i$1g.toCartesian(new i$1g(i,r,0)),u=i$1g.toCartesian(new i$1g(n,o,0)),c=a$11.angleBetween(l,u),h=S$C.fromPositions({positions:t,granularity:c/32}),d=S$C.createGeometry(h),f=0,p={},_=0;_<d.indices.length;_+=3){var m,$=d.indices[_];if(t$$(p[$]))m=p[$];else{m=new a$11(d.attributes.position.values[3*$],d.attributes.position.values[3*$+1],d.attributes.position.values[3*$+2]);var g=i$1g.fromCartesian(m),y=e.globe.getHeight(g);if(!t$$(y))continue;g=i$1g.fromRadians(g.longitude,g.latitude,y),m=i$1g.toCartesian(g),p[$]=a$11.clone(m)}var v,x=d.indices[_+1];if(t$$(p[x]))v=p[x];else{v=new a$11(d.attributes.position.values[3*x],d.attributes.position.values[3*x+1],d.attributes.position.values[3*x+2]);var b=i$1g.fromCartesian(v),S=e.globe.getHeight(b);if(!t$$(S))continue;b=i$1g.fromRadians(b.longitude,b.latitude,S),v=i$1g.toCartesian(b),p[x]=a$11.clone(v)}var w,C=d.indices[_+2];if(t$$(p[C]))w=p[C];else{w=new a$11(d.attributes.position.values[3*C],d.attributes.position.values[3*C+1],d.attributes.position.values[3*C+2]);var T=i$1g.fromCartesian(w),P=e.globe.getHeight(T);if(!t$$(P))continue;T=i$1g.fromRadians(T.longitude,T.latitude,P),w=i$1g.toCartesian(T),p[C]=a$11.clone(w)}g$j=a$11.subtract(v,m,g$j),w$t=a$11.subtract(w,m,w$t),b$t=a$11.cross(g$j,w$t,b$t),f+=.5*a$11.magnitude(b$t)}return f}function xe$g(e,t){for(var i=0,n=[],r=t.length-1,o=0;o<r;o++){var a=t[o],s=t[o+1],l=a$11.angleBetween(a,s);if(!(l<n$1d.EPSILON10)){var u=l/64,c=n$1d.chordLength(u,6378137),h=g$K.subdivideLine(a,s,c,n);h.push(s.x),h.push(s.y),h.push(s.z);for(var d=a$11.unpackArray(h),f=d.length-1,p=0;p<f;p++){var _=d[p],m=i$1g.fromCartesian(_),$=e.globe.getHeight(m);m=i$1g.fromRadians(m.longitude,m.latitude,$);var g=i$1g.toCartesian(m),y=d[p+1];m=i$1g.fromCartesian(y),$=e.globe.getHeight(m),m=i$1g.fromRadians(m.longitude,m.latitude,$);var v=i$1g.toCartesian(m);i+=a$11.distance(g,v)}}}return i}O$j.computeArea=function(e){for(var t,i,n,r=T$10.triangulate(e),o=r.length/3,a=0,s=0;s<o;s++)t=e[r[3*s]],i=e[r[3*s+1]],n=e[r[3*s+2]],g$j=a$11.subtract(i,t,g$j),w$t=a$11.subtract(n,t,w$t),b$t=a$11.cross(g$j,w$t,b$t),a+=.5*a$11.magnitude(b$t);return a};var l$f={LINE_X:1,LINE_Y:2,LINE_Z:3,CIRCLE_X:4,CIRCLE_Y:5,CIRCLE_Z:6,SCALE_LINE_X:7,SCALE_LINE_Y:8,SCALE_LINE_Z:9,UNIFORM_SCALE:10},U$i={ENTITY:1,S3MINSTANCE:2},q$n=new a$11,J$l=new a$11,K$f=new a$11,mi$2=new a$11,I$m=new a$11;new c$1a;var Ri$2=new a$11,Y$m=new r$W,di$2=new a$U,g$i=new c$1a,Pi$2=new c$1a,Ai$2=new c$1a,bi$2=new a$11,Oi$2=new a$11,Zi$1=new a$11,Ui$2=new a$11,L$n=new e$1L,Yi$1=new c$1a;new a$11;var $$h=new a$11;function H$p(e,t){for(var i=e.attributes.position.values,n=0,r=i.length;n<r;n+=3)i[n+2]+=t}function Di$3(e,t,i){var n=c$1a.getMatrix3(e,Y$m),r=a$U.fromRotationMatrix(n,di$2),o=r$W.fromQuaternion(r,Y$m),a=c$1a.fromRotationTranslation(o,a$11.ZERO,Yi$1),s=c$1a.inverse(t,g$i),l=c$1a.multiply(s,a,g$i),u=c$1a.getMatrix3(l,Y$m);return c$1a.fromRotationTranslation(u,a$11.ZERO,i)}function pi$3(e,t){return c$1a.getMatrix3(e,Y$m),a$U.fromRotationMatrix(Y$m,t),t}function b$s(e,t,i,n){var r=e.getPickRay(t),o=n$17.fromPointNormal(i,n);return h$1b.rayPlane(r,o)}function Xi$2(e,t,i){var n=[],r=u$Y.createVertexBuffer({context:e,typedArray:C$12.createTypedArray(C$12.FLOAT,i.attributes.position.values),usage:A$13.STATIC_DRAW});n.push({index:0,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1});var o=new x$18({context:e,attributes:n,indexBuffer:u$Y.createIndexBuffer({context:e,typedArray:i.indices,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT})}),a=p$15.fromCache({context:e,vertexShaderSource:"attribute vec4 aPosition;\nuniform vec4 uColor;\nuniform vec4 uPickColor;\nuniform float uScale;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvoid main()\n{\n vColor = uColor;\n vPickColor = uPickColor;\n mat4 scaleMatrix;\n scaleMatrix[0] = vec4(uScale, 0.0, 0.0, 0.0);\n scaleMatrix[1] = vec4(0.0, uScale, 0.0, 0.0);\n scaleMatrix[2] = vec4(0.0, 0.0, uScale, 0.0);\n scaleMatrix[3] = vec4(0.0, 0.0, 0.0, 1.0);\n gl_Position = czm_modelViewProjection * scaleMatrix * vec4(aPosition.xyz, 1.0);\n}",fragmentShaderSource:"varying vec4 vColor;\nvarying vec4 vPickColor;\nvoid main()\n{\n gl_FragColor = vColor;\n}\n",attributeLocations:{aPosition:0}}),s=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:t._modelMatrix,pass:we$l.LOG_DEPTH_OVERLAY,owner:t});s.vertexArray=o,s.shaderProgram=a;var l={id:t._id,primitive:t},u=e.createPickId(l);s.pickId="vPickColor",s.uniformMap={uColor:function(){return t._uColor},uPickColor:function(){return u.color},uScale:function(){return t._scaleAdjusted}},s.renderState=p$1a.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$s.ALPHA_BLEND});var c=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:t._modelMatrix,pass:we$l.OPAQUE+2,owner:t});c.vertexArray=o,c.shaderProgram=a;var h={id:t._id+"#2",primitive:t},d=e.createPickId(h);c.pickId="vPickColor",c.uniformMap={uColor:function(){return t._uColor.withAlpha(.2)},uPickColor:function(){return d.color},uScale:function(){return t._scaleAdjusted}},c.renderState=p$1a.fromCache({depthMask:!1,depthTest:{enabled:!1},blending:Ee$s.ALPHA_BLEND}),t._commands.push(c),t._commands.push(s)}var Wi$2=new a$U;function ki$2(e,t){var i=t.modelMatrix,n=a$11.negate(e._offset,K$f),r=c$1a.fromTranslation(n,Ai$2),o=m$13.eastNorthUpToFixedFrame(e._position,void 0,Pi$2),a=Di$3(i,o,g$i),s=pi$3(a,Wi$2);c$1a.multiply(o,c$1a.multiply(a,r,a),g$i);var l=c$1a.getTranslation(g$i,Ri$2);Bi$2(e,l,pi$3(g$i,di$2),t.nonUniformScaleAddition,t.uniformScaleAddition,r),Fi$2(e,l,s,t.nonUniformScaleAddition,t.uniformScaleAddition)}function Bi$2(e,t,i,n,r,o){if(e._modelType===U$i.ENTITY){e._model.model._offsetMatrix=o,e._model.position=t,e._model.orientation=i;var a=n;n||(a=a$11.clone(a$11.ZERO)),r&&(a.x+=r,a.y+=r,a.z+=r),e._model.model.scale||(e._model.model.scale=a$11.clone(a$11.UNIT_XYZ));var s=e._model.model.scale.getValue(0);s instanceof a$11?(a$11.add(a,s,a),e._model.model.scale=a):(a.x+=s,a.y+=s,a.z+=s,e._model.model.scale=a)}}function Fi$2(e,t,i,n,r){if(e._modelType===U$i.S3MINSTANCE){e._model.updatePosition(t);var o=e$1L.fromQuaternion(i);e._model.updateRotation(o);var a=a$11.clone(e._model.scale);t$$(r)&&(a.x+=r,a.y+=r,a.z+=r),t$$(n)&&a$11.add(a,n,a),e._model.updateScale(a)}}function D$q(e,t){e.prototype.__proto__=Object.create(t.prototype),e.prototype.__proto__.constructor=e}function x$q(e){this._owner=e.owner,this._color=e$1z.clone(e$1Y(e.color,e$1z.WHITE)),this._hoverColor=e$1z.clone(e$1Y(e.hoverColor,e$1z.WHITE)),this._uColor=e$1z.clone(this._color),this._visible=e$1Y(e.visible,!0),this._scale=e$1Y(e.scale,a$11.UNIT_XYZ),this._initTransition=e$1Y(e.transition,new a$11),this._initHpr=e$1Y(e.headingPitchRoll,new e$1L),this._initModelMatrix=c$1a.clone(c$1a.IDENTITY),this._initModelMatrixInverse=c$1a.clone(c$1a.IDENTITY),this._modelMatrix=c$1a.clone(e$1Y(e.modelMatrix,c$1a.IDENTITY)),this._id=e$1Y(e.id,t$U()),this._typeForModelEditor=e$1Y(e.type,-1),this._commands=[],this._geometries=[],this._updateMatrix(),this._setChangeEvt(),this._adjustAxisLength=void 0,this._scaleAdjusted=1}function ji$2(e,t){return function(i){if(!(t$$(i)&&i<.05)){var n=150*Gi$2(e,t._owner._model._position||t._owner._model._position._value);t._scaleAdjusted=Math.max(n/10,1),t._scaleAdjusted=t._scaleAdjusted>1e3?1:t._scaleAdjusted}}}function X$d(e){this._color=e$1Y(e.color,e$1z.WHITE),this._lineWidth=e$1Y(e.lineWidth,.02),this._lineLength=e$1Y(e.lineLength,5),this._arrowWidth=e$1Y(e.arrowWidth,.2),this._arrowLength=e$1Y(e.arrowLength,1),this._lineWidth=this._lineWidth*e$1Y(e.lineWidthScale,4),x$q.call(this,e)}function W$j(e){this._lineWidth=e$1Y(e.lineWidth,.02),this._lineLength=e$1Y(e.lineLength,10),this._headDimension=e$1Y(e.headDimension,.2),x$q.call(this,e)}function ii$2(e){this._dimensions=e$1Y(e.dimensions,.2),this._color=e$1Y(e.color,e$1z.WHITE),x$q.call(this,e)}function k$o(e){this._width=e$1Y(e.width,.02),this._radius=e$1Y(e.radius,7.5),this._width=this._width*e$1Y(e.lineWidthScale,4),x$q.call(this,e)}function B$h(e){this._dimensions=e$1Y(e.dimensions,.2),x$q.call(this,e)}function u$o(e){n$1e.typeOf.object("options",e),n$1e.typeOf.object("options.scene",e.scene),n$1e.typeOf.object("options.model",e.model);var t=e.model,i=t instanceof l$J;if(!i&&!(t instanceof _0x10007a))throw new t$_("Unsupported model type.");this._scene=e.scene,this._modelType=i?U$i.ENTITY:U$i.S3MINSTANCE,this._offset=e$1Y(e.offset,a$11.ZERO),this._hoverColor=e$1Y(e.hoverColor,e$1z.WHITE),this._scale=e$1Y(e.scale,1),this._model=t,this._active=!1,this._hpr=void 0,this._handler=new f$N(this._scene.canvas),this._primitives=[],this._axesShow=s$1n(e.axesShow,{translation:!0,rotation:!0,scale:!0}),this._lineWidthScale=e$1Y(e.lineWidthScale,4),this._modelType===U$i.ENTITY?(this._position=t.position.getValue(0),this._orientation=t.orientation?t.orientation.getValue(0):new a$U,this._calcHpr()):(this._position=t.position,this._hpr=e$1L.clone(t.hpr)),this._fromEnu=m$13.eastNorthUpToFixedFrame(this._position),c$1a.multiplyByPoint(this._fromEnu,this._offset,this._position),this._modelMatrix=m$13.headingPitchRollToFixedFrame(this._position,this._hpr),this._modelMatrixInverse=c$1a.inverse(this._modelMatrix,new c$1a),!t$$(this._changedEvt)&&(this._changedEvt=new o$15),!t$$(this._hoverChanged)&&(this._hoverChanged=new o$15),this._axesCreated=!1;var n=this;this._changedEvt.addEventListener((function(e){ki$2(n,e)}))}function Gi$2(e,t){var i=e.context._us,n=i._viewport,r=n.width,o=n.height,a=new a$11;c$1a.multiplyByPoint(i._view,t,a);var s,l,u=i.frustumPlanes,c=u.x,h=u.y,d=u.z,f=u.w;if(e.mode===b$1d.COLUMBUS_VIEW||i.orthographicIn3D){s=(f-d)/r,l=(c-h)/o}else{var p=-a.z,_=1/i.currentFrustum.x,m=c*_;l=2*p*m/o,s=2*p*(m=f*_)/r}return Math.max(s,l)}x$q.prototype._setChangeEvt=function(){var e=this;this._owner._changedEvt.addEventListener((function(t){c$1a.multiply(t.modelMatrix,e._initModelMatrix,e._modelMatrix)})),this._owner._hoverChanged.addEventListener((function(t){t===e._typeForModelEditor?e$1z.clone(e._hoverColor,e._uColor):e$1z.clone(e._color,e._uColor),t>=1&&t<=10&&t!==e._typeForModelEditor?e._color=e._color.withAlpha(.05,e._color):e._color=e._color.withAlpha(1,e._color)}))},x$q.prototype._createGeometry=function(){},x$q.prototype._updateMatrix=function(){c$1a.fromTranslationQuaternionRotationScale(this._initTransition,a$U.fromHeadingPitchRoll(this._initHpr),this._scale,this._initModelMatrix),c$1a.inverse(this._initModelMatrix,this._initModelMatrixInverse),c$1a.multiply(this._modelMatrix,this._initModelMatrix,this._modelMatrix)},x$q.prototype.update=function(e){if(t$$(this._adjustAxisLength)||(this._adjustAxisLength=ji$2(e,this),e.camera.changed.addEventListener(this._adjustAxisLength)),0===this._commands.length){this._createGeometry();for(var t=0,i=this._geometries.length;t<i;t++){var n=this._geometries[t];Xi$2(e.context,this,n)}}if(this._visible)for(t=0,i=this._commands.length;t<i;t++){var r=this._commands[t];e.commandList.push(r)}},x$q.prototype.destroy=function(){this._geometries.length=0;for(var e=0,t=this._commands.length;e<t;e++){var i=this._commands[e];i.vertexArray=i.vertexArray&&!i.vertexArray.isDestroyed()&&i.vertexArray.destroy(),i.shaderProgram=i.shaderProgram&&!i.shaderProgram.isDestroyed()&&i.shaderProgram.destroy()}this._commands.length=0},X$d.prototype._createGeometry=function(){var e=x$V.createGeometry(new x$V({length:this._lineLength,topRadius:this._lineWidth,bottomRadius:this._lineWidth})),t=x$V.createGeometry(new x$V({length:this._arrowLength,topRadius:.01,bottomRadius:this._arrowWidth}));H$p(e,this._lineLength/2),H$p(t,this._lineLength),this._geometries.push(e),this._geometries.push(t)},D$q(X$d,x$q),W$j.prototype._createGeometry=function(){var e=x$V.createGeometry(new x$V({length:this._lineLength,topRadius:this._lineWidth,bottomRadius:this._lineWidth})),t=c$Z.createGeometry(new c$Z({minimum:new a$11(-this._headDimension,-this._headDimension,-this._headDimension),maximum:new a$11(this._headDimension,this._headDimension,this._headDimension),vertexFormat:n$12.POSITION_AND_NORMAL}));H$p(e,this._lineLength/2),H$p(t,this._lineLength),this._geometries.push(e),this._geometries.push(t)},D$q(W$j,x$q),ii$2.prototype._createGeometry=function(){var e=c$Z.createGeometry(new c$Z({minimum:new a$11(-this._dimensions,-this._dimensions,-this._dimensions),maximum:new a$11(this._dimensions,this._dimensions,this._dimensions),vertexFormat:n$12.POSITION_AND_NORMAL}));this._geometries.push(e)},D$q(ii$2,x$q),k$o.prototype._createGeometry=function(){var e=N$Q.createGeometry(new N$Q({polylinePositions:function(e){for(var t=[],i=0;i<=360;i+=3){var n=n$1d.toRadians(i),r=new a$11(e*Math.cos(n),e*Math.sin(n),0);t.push(r)}return t}(this._radius),shapePositions:function(e){for(var t=[],i=0;i<=360;i+=10){var n=n$1d.toRadians(i);t.push(new r$T(e*Math.cos(n),e*Math.sin(n)))}return t}(this._width),vertexFormat:n$12.POSITION_AND_NORMAL}));this._geometries.push(e)},D$q(k$o,x$q),B$h.prototype._createGeometry=function(){var e=this._dimensions,t=A$X.createGeometry(new A$X({polygonHierarchy:new t$K([new a$11(-e,e,0),new a$11(-e,-e,0),new a$11(e,-e,0),new a$11(e,e,0)]),perPositionHeight:!0,vertexFormat:n$12.POSITION_AND_NORMAL}));this._geometries.push(t)},D$q(B$h,x$q),Object.defineProperties(u$o.prototype,{changedEvt:{get:function(){return this._changedEvt}}}),u$o.prototype.setEditObject=function(e){this._clearEditObject(),this.constructor({model:e,scene:this._scene,offset:this._offset,axesShow:this._axesShow}),this.activate()},u$o.prototype._clearEditObject=function(){for(var e=0;e<this._primitives.length;e++)this._scene.primitives.remove(this._primitives[e]),this._primitives[e]=void 0;this._primitives=[],this._handler.destroy()},u$o.prototype._calcHpr=function(){var e=r$W.fromQuaternion(this._orientation,new r$W),t=c$1a.fromRotationTranslation(e,a$11.ZERO,new c$1a),i=c$1a.inverse(m$13.eastNorthUpToFixedFrame(this._position),new c$1a),n=c$1a.multiply(i,t,new c$1a),r=c$1a.getMatrix3(n,new r$W);this._hpr=e$1L.fromQuaternion(a$U.fromRotationMatrix(r))},u$o.prototype._createAxes=function(){this._axisX=new X$d({owner:this,modelMatrix:this._modelMatrix,scale:a$11.multiplyByScalar(a$11.UNIT_XYZ,this._scale,new a$11),headingPitchRoll:e$1L.fromDegrees(0,-90,0),color:e$1z.RED,hoverColor:this._hoverColor,type:l$f.LINE_X,visible:this._axesShow.translation,lineWidthScale:this._lineWidthScale}),this._axisY=new X$d({owner:this,modelMatrix:this._modelMatrix,scale:a$11.multiplyByScalar(a$11.UNIT_XYZ,this._scale,new a$11),headingPitchRoll:e$1L.fromDegrees(0,0,-90),color:e$1z.GREEN,hoverColor:this._hoverColor,type:l$f.LINE_Y,visible:this._axesShow.translation,lineWidthScale:this._lineWidthScale}),this._axisZ=new X$d({owner:this,modelMatrix:this._modelMatrix,scale:a$11.multiplyByScalar(a$11.UNIT_XYZ,this._scale,new a$11),headingPitchRoll:e$1L.fromDegrees(0,0,0),color:e$1z.BLUE,hoverColor:this._hoverColor,type:l$f.LINE_Z,visible:this._axesShow.translation,lineWidthScale:this._lineWidthScale}),this._scaleLineX=new W$j({owner:this,modelMatrix:this._modelMatrix,scale:a$11.multiplyByScalar(a$11.UNIT_XYZ,this._scale,new a$11),headingPitchRoll:e$1L.fromDegrees(0,-90,0),color:e$1z.RED,hoverColor:this._hoverColor,type:l$f.SCALE_LINE_X,visible:this._axesShow.scale,lineWidthScale:this._lineWidthScale}),this._scaleLineY=new W$j({owner:this,modelMatrix:this._modelMatrix,scale:a$11.multiplyByScalar(a$11.UNIT_XYZ,this._scale,new a$11),headingPitchRoll:e$1L.fromDegrees(0,0,-90),color:e$1z.GREEN,hoverColor:this._hoverColor,type:l$f.SCALE_LINE_Y,visible:this._axesShow.scale}),this._scaleLineZ=new W$j({owner:this,modelMatrix:this._modelMatrix,scale:a$11.multiplyByScalar(a$11.UNIT_XYZ,this._scale,new a$11),headingPitchRoll:e$1L.fromDegrees(0,0,0),color:e$1z.BLUE,hoverColor:this._hoverColor,type:l$f.SCALE_LINE_Z,visible:this._axesShow.scale,lineWidthScale:this._lineWidthScale}),this._axisCircleX=new k$o({owner:this,modelMatrix:this._modelMatrix,scale:a$11.multiplyByScalar(a$11.UNIT_XYZ,this._scale,new a$11),headingPitchRoll:e$1L.fromDegrees(0,-90,0),color:e$1z.RED,hoverColor:this._hoverColor,type:l$f.CIRCLE_X,visible:this._axesShow.rotation,lineWidthScale:this._lineWidthScale}),this._axisCircleY=new k$o({owner:this,modelMatrix:this._modelMatrix,scale:a$11.multiplyByScalar(a$11.UNIT_XYZ,this._scale,new a$11),headingPitchRoll:e$1L.fromDegrees(0,0,-90),color:e$1z.GREEN,hoverColor:this._hoverColor,type:l$f.CIRCLE_Y,visible:this._axesShow.rotation,lineWidthScale:this._lineWidthScale}),this._axisCircleZ=new k$o({owner:this,modelMatrix:this._modelMatrix,scale:a$11.multiplyByScalar(a$11.UNIT_XYZ,this._scale,new a$11),headingPitchRoll:e$1L.fromDegrees(0,0,0),color:e$1z.BLUE,hoverColor:this._hoverColor,type:l$f.CIRCLE_Z,visible:this._axesShow.rotation,lineWidthScale:this._lineWidthScale}),this._transitionPlaneX=new B$h({owner:this,modelMatrix:this._modelMatrix,scale:a$11.multiplyByScalar(a$11.UNIT_XYZ,this._scale,new a$11),dimensions:.4,transition:new a$11(0,.4,.4),headingPitchRoll:e$1L.fromDegrees(0,-90,0),color:e$1z.RED,hoverColor:this._hoverColor,type:l$f.CIRCLE_Z}),this._transitionPlaneY=new B$h({owner:this,modelMatrix:this._modelMatrix,scale:a$11.multiplyByScalar(a$11.UNIT_XYZ,this._scale,new a$11),dimensions:.4,transition:new a$11(.4,0,.4),headingPitchRoll:e$1L.fromDegrees(0,0,90),color:e$1z.GREEN,hoverColor:this._hoverColor,type:l$f.CIRCLE_Z}),this._transitionPlaneZ=new B$h({owner:this,modelMatrix:this._modelMatrix,scale:a$11.multiplyByScalar(a$11.UNIT_XYZ,this._scale,new a$11),dimensions:.4,transition:new a$11(.4,.4,0),headingPitchRoll:e$1L.fromDegrees(0,0,0),color:e$1z.BLUE,hoverColor:this._hoverColor,type:l$f.CIRCLE_Z}),this._uniformScale=new ii$2({owner:this,modelMatrix:this._modelMatrix,scale:a$11.multiplyByScalar(a$11.UNIT_XYZ,this._scale,new a$11),dimensions:.2,transition:new a$11(.2001,.2,.2),headingPitchRoll:e$1L.fromDegrees(0,0,0),type:l$f.UNIFORM_SCALE,hoverColor:this._hoverColor,color:e$1z.ORANGE,visible:this._axesShow.scale,lineWidthScale:this._lineWidthScale}),this._primitives=[this._scaleLineX,this._scaleLineY,this._scaleLineZ,this._axisCircleX,this._axisCircleY,this._axisCircleZ,this._uniformScale,this._axisX,this._axisY,this._axisZ],this._scene.primitives.add(this._scaleLineX),this._scene.primitives.add(this._scaleLineY),this._scene.primitives.add(this._scaleLineZ),this._scene.primitives.add(this._axisCircleX),this._scene.primitives.add(this._axisCircleY),this._scene.primitives.add(this._axisCircleZ),this._scene.primitives.add(this._uniformScale),this._scene.primitives.add(this._axisX),this._scene.primitives.add(this._axisY),this._scene.primitives.add(this._axisZ)},u$o.prototype._initEvent=function(){var e=this._scene,t=this,i=this._handler;i.setInputAction((function(i){var n=t._pickObj;!n||!n.primitive||!n.primitive._typeForModelEditor||(t._isEdit=!0,t._pickObj=n,e.screenSpaceCameraController.enableInputs=!1)}),Q$L.LEFT_DOWN),i.setInputAction((function(e){t._isEdit?(t._handleTransition(e),t._handleRotation(e),t._handleScale(e),t._handleUniformScale(e)):t._handleHover(e)}),Q$L.MOUSE_MOVE),i.setInputAction((function(i){e.screenSpaceCameraController.enableInputs=!0,t._isEdit=!1,t._pickObj=void 0}),Q$L.LEFT_UP)},u$o.prototype._handleTransition=function(e){var t=this._pickObj.primitive._typeForModelEditor;if(t===l$f.LINE_X||t===l$f.LINE_Y||t===l$f.LINE_Z){var i,n;switch(t){case l$f.LINE_X:i=a$11.UNIT_Z,n=a$11.UNIT_Z;break;case l$f.LINE_Y:i=a$11.UNIT_X,n=a$11.UNIT_X;break;case l$f.LINE_Z:i=a$11.UNIT_Y,n=a$11.UNIT_Y}var r=this._scene,o=e.startPosition,a=e.endPosition,s=c$1a.multiplyByPoint(this._modelMatrix,i,q$n),l=c$1a.multiplyByPoint(this._modelMatrix,a$11.ZERO,J$l);n=c$1a.multiplyByPoint(this._modelMatrix,n,$$h),a$11.subtract(s,l,s);var u=a$11.normalize(s,s),c=b$s(r.camera,o,n,u),h=b$s(r.camera,a,n,u),d=c$1a.multiplyByPoint(this._modelMatrixInverse,c,mi$2),f=c$1a.multiplyByPoint(this._modelMatrixInverse,h,K$f);switch(t){case l$f.LINE_X:I$m.x=f.x-d.x;break;case l$f.LINE_Y:I$m.y=f.y-d.y;break;case l$f.LINE_Z:I$m.z=f.z-d.z}c$1a.multiply(this._modelMatrix,c$1a.fromTranslation(I$m,g$i),this._modelMatrix),this._changedEvt.raiseEvent({modelMatrix:this._modelMatrix,transitionAddtion:I$m}),c$1a.getTranslation(this._modelMatrix,this._position),a$11.clone(a$11.ZERO,I$m)}},u$o.prototype._handleRotation=function(e){var t=this._pickObj.primitive._typeForModelEditor;if(t===l$f.CIRCLE_X||t===l$f.CIRCLE_Y||t===l$f.CIRCLE_Z){var i,n,r=this._scene,o=e.startPosition,a=e.endPosition,s=this._position;switch(t){case l$f.CIRCLE_X:i=a$11.UNIT_X,n=a$11.UNIT_Y;break;case l$f.CIRCLE_Y:i=a$11.UNIT_Y,n=a$11.UNIT_Z;break;case l$f.CIRCLE_Z:i=a$11.UNIT_Z,n=a$11.UNIT_X}var l=c$1a.multiplyByPoint(this._modelMatrix,i,q$n),u=c$1a.multiplyByPoint(this._modelMatrix,a$11.ZERO,J$l);n=c$1a.multiplyByPoint(this._modelMatrix,n,$$h),a$11.subtract(l,u,l);var c=a$11.normalize(l,l),h=b$s(r.camera,a,n,c),d=b$s(r.camera,o,n,c),f=a$11.subtract(h,s,Oi$2),p=a$11.subtract(d,s,Zi$1),_=a$11.dot(a$11.normalize(f,f),a$11.normalize(p,p)),m=Math.acos(_),$=a$11.cross(l,f,bi$2),g=a$11.subtract(d,h,Ui$2),y=a$11.dot($,a$11.normalize(g,g));switch(m*=y=y>0?1:-1,t){case l$f.CIRCLE_X:L$n.roll=-m;break;case l$f.CIRCLE_Y:L$n.pitch=m;break;case l$f.CIRCLE_Z:L$n.heading=m}c$1a.multiply(this._modelMatrix,c$1a.fromRotationTranslation(r$W.fromHeadingPitchRoll(L$n),a$11.ZERO,g$i),this._modelMatrix),c$1a.inverse(this._modelMatrix,this._modelMatrixInverse),this._changedEvt.raiseEvent({modelMatrix:this._modelMatrix,rotationAddtion:L$n}),L$n.heading=0,L$n.pitch=0,L$n.roll=0}},u$o.prototype._handleScale=function(e){var t=this._pickObj.primitive._typeForModelEditor;if(t===l$f.SCALE_LINE_X||t===l$f.SCALE_LINE_Y||t===l$f.SCALE_LINE_Z){var i,n;switch(t){case l$f.SCALE_LINE_X:i=a$11.UNIT_Z,n=a$11.UNIT_Z;break;case l$f.SCALE_LINE_Y:i=a$11.UNIT_X,n=a$11.UNIT_X;break;case l$f.SCALE_LINE_Z:i=a$11.UNIT_Y,n=a$11.UNIT_Y}var r=this._scene,o=e.startPosition,a=e.endPosition,s=c$1a.multiplyByPoint(this._modelMatrix,i,q$n),l=c$1a.multiplyByPoint(this._modelMatrix,a$11.ZERO,J$l);n=c$1a.multiplyByPoint(this._modelMatrix,n,$$h),a$11.subtract(s,l,s);var u=a$11.normalize(s,s),c=b$s(r.camera,o,n,u),h=b$s(r.camera,a,n,u),d=c$1a.multiplyByPoint(this._modelMatrixInverse,c,mi$2),f=c$1a.multiplyByPoint(this._modelMatrixInverse,h,K$f);switch(t){case l$f.SCALE_LINE_X:I$m.x=f.x-d.x;break;case l$f.SCALE_LINE_Y:I$m.y=f.y-d.y;break;case l$f.SCALE_LINE_Z:I$m.z=f.z-d.z}this._changedEvt.raiseEvent({modelMatrix:this._modelMatrix,nonUniformScaleAddition:a$11.clone(I$m)}),a$11.clone(a$11.ZERO,I$m)}},u$o.prototype._handleHover=function(e){var t=this._scene.pick(e.startPosition);if(this._pickObj=t,!t||!t.primitive||t.primitive._typeForModelEditor<1||t.primitive._typeForModelEditor>10)this._hoverChanged.raiseEvent(-1);else{var i=t.primitive._typeForModelEditor;this._hoverChanged.raiseEvent(i)}},u$o.prototype._handleUniformScale=function(e){if(this._pickObj.primitive._typeForModelEditor===l$f.UNIFORM_SCALE){this._scene;var t=e.startPosition,i=e.endPosition.x-t.x;this._changedEvt.raiseEvent({modelMatrix:this._modelMatrix,uniformScaleAddition:i/50})}},u$o.prototype.activate=function(){this._active||(this._axesCreated||(this._createAxes(),this._axesCreated=!0),this._initEvent(),this._active=!0)},u$o.prototype.deactivate=function(){if(this._active){this._disableEvent(),this._active=!1;for(var e=0,t=this._primitives.length;e<t;e++){this._primitives[e]._visible=!1}this._scene.screenSpaceCameraController.enableInputs=!0,this._isEdit=!1,this._pickObj=void 0}},u$o.prototype._disableEvent=function(){var e=this._handler;e.removeInputAction(Q$L.LEFT_UP),e.removeInputAction(Q$L.LEFT_DOWN),e.removeInputAction(Q$L.MOUSE_MOVE)},u$o.prototype.destroy=function(){this.deactivate();for(var e=0,t=this._primitives.length;e<t;e++){this._primitives[e].destroy()}this._handler.destroy(),s$1e(this)},u$o.prototype.isDestroyed=function(){return!1};var d$n=function(e){i$1b("PointHandler","PointHandler is deprecated,please use DrawHandler.");var t=new b$u(e,_0xd8b438.Point,n$q.Space);return t.drawCompletedEvent=t.drawEvt,t},d$m=function(e){i$1b("PolygonHandler","PolygonHandler is deprecated,please use DrawHandler.");var t=new b$u(e,_0xd8b438.Polygon,n$q.Space);return t.drawCompletedEvent=t.drawEvt,t},l$e=function(e){i$1b("PolylineHandler","PolylineHandler is deprecated,please use DrawHandler.");var t=new b$u(e,_0xd8b438.Line,n$q.Space);return t.drawCompletedEvent=t.drawEvt,t};function _$k(e,t){if(t=e$1Y(t,{}),n$1e.defined("PointLight Position",e),a$11.equals(e,a$11.ZERO))throw new t$_("directional light position equals zero");this._id=t$U(),this._position=a$11.clone(e),this._positionCV=new a$11,this._targetPosition=e$1Y(t.targetPosition,new a$11),this._targetPositionCV=new a$11,this._color=e$1Y(t.color,new e$1z(1,1,1,1)),this._intensity=e$1Y(t.intensity,1),this._direction=new a$11,a$11.subtract(this._position,this._targetPosition,this._direction),a$11.normalize(this._direction,this._direction),this._lightColor=e$1z.multiplyByScalar(this._color,this._intensity,new e$1z),this._directionEC=new a$11,this._sceneMode=b$1d.SCENE3D}function n$p(e){e=e$1Y(e,{}),this._id=t$U(),this._skyColor=e$1Y(e.skyColor,new e$1z(.7,.7,.7)),this._groundColor=e$1Y(e.groundColor,new e$1z(.2,.2,.2)),this._groundLightColor=new e$1z,this._skyLightColor=new e$1z,this._intensity=e$1Y(e.intensity,1),this._sceneMode=b$1d.SCENE3D}function h$n(e){this._lightList={},this._lightList[w$x.DIRECTIONAL]=new e$1F,this._lightList[w$x.POINT]=new e$1F,this._lightList[w$x.SPOT]=new e$1F,this._lightList[w$x.HEMISPHERE]=new e$1F,this._visibleLightList={},this._visibleLightList[w$x.POINT]=new e$1F,this._visibleLightList[w$x.SPOT]=new e$1F,this._visiblePointLightCount=0,this._visibleSpotLightCount=0,this._visibleDirectionalLightCount=0,this._visibleHemisphereLightCount=0,this._ambientLightColor=new e$1z(0,0,0,1),this._sunLightColor=new e$1z(.8,.8,.8,1),this._sunLightON=1,this._changedLightList=new e$1F,this._pointLightDistanceDecay=[],this._spotLightDistanceDecayCosPenumbra=[],this._context=e,this._uniformBuffer=_0x35487f.createLightSourceUniformBuffer(e,this),this._visibleDistanceMax=1e4,this._visibleCountAllowed=100,this._enableAmbientLightColor=!1,this._enableSunLightColor=!1}function c$l(e,t){t=e$1Y(t,{}),n$1e.defined("PointLight Position",e),this._id=t$U(),this._position=a$11.clone(e),this._positionCV=new a$11,this._positionEC=new a$11,this._color=e$1Y(t.color,new e$1z(1,1,1,1)),this._intensity=e$1Y(t.intensity,2),this._cutoffDistance=e$1Y(t.cutoffDistance,10),this._decay=e$1Y(t.decay,1),this._lightColor=e$1z.multiplyByScalar(this._color,this._intensity,new e$1z),this._visibleInCullingVolume=1,this._sceneMode=b$1d.SCENE3D}Object.defineProperties(_$k.prototype,{id:{get:function(){return this._id}},position:{get:function(){return this._sceneMode===b$1d.SCENE3D?this._position:this._positionCV},set:function(e){n$1e.defined("directional light position",e),!a$11.equals(e,this._targetPosition)&&(this._position=e,this._sceneMode===b$1d.COLUMBUS_VIEW?(this._positionCV=m$13.convertToColumbusCartesian(this._position),a$11.subtract(this._positionCV,this._targetPositionCV,this._direction)):a$11.subtract(this._position,this._targetPosition,this._direction),a$11.normalize(this._direction,this._direction))}},targetPosition:{get:function(){return this._sceneMode===b$1d.SCENE3D?this._targetPosition:this._targetPositionCV},set:function(e){n$1e.defined("directional light target position",e),!a$11.equals(e,this._position)&&(this._targetPosition=e,this._sceneMode===b$1d.COLUMBUS_VIEW?(this._targetPositionCV=m$13.convertToColumbusCartesian(this._targetPosition),a$11.subtract(this._positionCV,this._targetPositionCV,this._direction)):a$11.subtract(this._position,this._targetPosition,this._direction),a$11.normalize(this._direction,this._direction))}},color:{get:function(){return this._color},set:function(e){n$1e.defined("directional light color",e),this._color=e,e$1z.multiplyByScalar(this._color,this._intensity,this._lightColor)}},intensity:{get:function(){return this._intensity},set:function(e){n$1e.typeOf.number("directional light intensity",e),this._intensity=e,e$1z.multiplyByScalar(this._color,this._intensity,this._lightColor)}},direction:{get:function(){return this._direction}},lightColor:{get:function(){return this._lightColor}},directionEC:{get:function(){return this._directionEC},set:function(e){n$1e.defined("directioinal light directionEC",e),this._directionEC=e}},lightType:{get:function(){return w$x.DIRECTIONAL}},sceneMode:{get:function(){return this._sceneMode},set:function(e){if(n$1e.typeOf.number("spot light sceneMode",e),this._sceneMode!==e){if(this._sceneMode=e,this._sceneMode===b$1d.COLUMBUS_VIEW){if(this._positionCV=m$13.convertToColumbusCartesian(this._position),this._targetPositionCV=m$13.convertToColumbusCartesian(this._targetPosition),a$11.equals(this._positionCV,this._targetPositionCV))return;a$11.subtract(this._positionCV,this._targetPositionCV,this._direction)}else a$11.subtract(this._position,this._targetPosition,this._direction);a$11.normalize(this._direction,this._direction)}}}}),Object.defineProperties(n$p.prototype,{id:{get:function(){return this._id}},lightType:{get:function(){return w$x.HEMISPHERE}},skyColor:{get:function(){return e$1z.multiplyByScalar(this._skyColor,this._intensity,this._skyLightColor)},set:function(e){n$1e.defined("skyColor color",e),e$1z.clone(e,this._skyColor)}},groundColor:{get:function(){return e$1z.multiplyByScalar(this._groundColor,this._intensity,this._groundLightColor)},set:function(e){n$1e.defined("groundColor color",e),e$1z.clone(e,this._groundColor)}}}),Object.defineProperties(h$n.prototype,{pointLight:{get:function(){return this._lightList[w$x.POINT]}},spotLight:{get:function(){return this._lightList[w$x.SPOT]}},directionalLight:{get:function(){return this._lightList[w$x.DIRECTIONAL]}},hemisphereLight:{get:function(){return this._lightList[w$x.HEMISPHERE]}},ambientLightColor:{get:function(){return this._ambientLightColor},set:function(e){n$1e.defined("Light source ambientLightColor",e),e$1z.clone(e,this._ambientLightColor),this._enableAmbientLightColor=!0}},sunLightColor:{get:function(){return this._sunLightColor},set:function(e){n$1e.defined("Light source sunLightColor",e),e$1z.clone(e,this._sunLightColor),this._enableSunLightColor=!0}},sunLightON:{get:function(){return this._sunLightON},set:function(e){n$1e.typeOf.bool("Light source sun light on",e),this._sunLightON=e?1:0}},visibleDistanceMax:{get:function(){return this._visibleDistanceMax},set:function(e){this._visibleDistanceMax=e}}}),h$n.prototype.addLightSource=function(e){var t=this._lightList[e.lightType];return t.set(e.id,e),t.length},h$n.prototype.removeLightSource=function(e){var t=this._lightList[e.lightType];return t.get(e.id)?(t.remove(e.id),t.length):-1},h$n.prototype.updateVisiblities=function(e){var t,i=this._lightList[w$x.POINT].values;for(t=0;t<i.length;t++)i[t].computeVisiblityInCullingVolume(e);for(i=this._lightList[w$x.SPOT].values,t=0;t<i.length;t++)i[t].computeVisiblityInCullingVolume(e)},h$n.prototype.hasChange=function(){return this._changedLightList.values.length>0},h$n.prototype.resetChange=function(){this._changedLightList.removeAll()},h$n.prototype.combineUniformValue=function(){this._pointLightDistanceDecay=[],this._spotLightDistanceDecayCosPenumbra=[];var e,t=this._visibleLightList[w$x.POINT].values,i=t.length;for(e=0;e<i;e++){var n=new r$T;n.x=t[e].cutoffDistance,n.y=t[e].decay,this._pointLightDistanceDecay.push(n)}var r=this._visibleLightList[w$x.SPOT].values;for(i=r.length,e=0;e<i;e++){var o=new a$10;o.x=r[e].distance,o.y=r[e].decay,o.z=r[e].angleCos,o.w=r[e].penumbraCos,this._spotLightDistanceDecayCosPenumbra.push(o)}},h$n.prototype.createUniformMap=function(){var e={},t=this;return e.uAmbientLightColor=function(){return t.ambientLightColor},e.uSunLightColor=function(){return t.sunLightColor},e.uSunLightON=function(){return t.sunLightON},e.uDirectionalLightDirectionEC=function(){for(var e=[],i=t.directionalLight.values,n=i.length,r=0;r<n;r++)e.push(i[r].directionEC);return e},e.uDirectionalLightColor=function(){for(var e=[],i=t.directionalLight.values,n=i.length,r=0;r<n;r++)e.push(i[r].lightColor);return e},e.uPointLightPositionEC=function(){for(var e=[],i=t._visibleLightList[w$x.POINT].values,n=i.length,r=0;r<n;r++)e.push(i[r].positionEC);return e},e.uPointLightColor=function(){for(var e=[],i=t._visibleLightList[w$x.POINT].values,n=i.length,r=0;r<n;r++)e.push(i[r].lightColor);return e},e.uDirectionalLightDirection=function(){for(var e=[],i=t.directionalLight.values,n=0;n<i.length;n++)e.push(i[n].direction);return e},e.uPointLightDistanceAndDecay=function(){return t._pointLightDistanceDecay},e.uSpotLightColor=function(){for(var e=[],i=t._visibleLightList[w$x.SPOT].values,n=i.length,r=0;r<n;r++)e.push(i[r].lightColor);return e},e.uSpotLightPositionEC=function(){for(var e=[],i=t._visibleLightList[w$x.SPOT].values,n=i.length,r=0;r<n;r++)e.push(i[r].positionEC);return e},e.uSpotLightPosition=function(){for(var e=[],i=t._visibleLightList[w$x.SPOT].values,n=i.length,r=0;r<n;r++)e.push(i[r].position);return e},e.uSpotLightDirection=function(){for(var e=[],i=t._visibleLightList[w$x.SPOT].values,n=i.length,r=0;r<n;r++)e.push(i[r].direction);return e},e.uSpotLightDirectionEC=function(){for(var e=[],i=t._visibleLightList[w$x.SPOT].values,n=i.length,r=0;r<n;r++)e.push(i[r].directionEC);return e},e.uSpotLightDistanceDecayCosPenumbra=function(){return t._spotLightDistanceDecayCosPenumbra},e.uSpotLightExponent=function(){for(var e=[],i=t._visibleLightList[w$x.SPOT].values,n=i.length,r=0;r<n;r++)e.push(i[r].exponent);return e},e.uSkyColor=function(){for(var e=[],i=t._lightList[w$x.HEMISPHERE].values,n=i.length,r=0;r<n;r++)e.push(i[r].skyColor);return e},e.uGroundColor=function(){for(var e=[],i=t._lightList[w$x.HEMISPHERE].values,n=i.length,r=0;r<n;r++)e.push(i[r].groundColor);return e},e},Object.defineProperties(c$l.prototype,{id:{get:function(){return this._id}},position:{get:function(){return this._sceneMode===b$1d.SCENE3D?this._position:this._positionCV},set:function(e){n$1e.defined("point light position",e),this._position=e,this._sceneMode===b$1d.COLUMBUS_VIEW&&(this._positionCV=m$13.convertToColumbusCartesian(this._position))}},color:{get:function(){return this._color},set:function(e){n$1e.defined("point color color",e),this._color=e,e$1z.multiplyByScalar(this._color,this._intensity,this._lightColor)}},intensity:{get:function(){return this._intensity},set:function(e){n$1e.typeOf.number("point light intensity",e),this._intensity=e,e$1z.multiplyByScalar(this._color,this._intensity,this._lightColor)}},cutoffDistance:{get:function(){return this._cutoffDistance},set:function(e){n$1e.typeOf.number("point light cutoffDistance",e),this._cutoffDistance=e}},decay:{get:function(){return this._decay},set:function(e){n$1e.typeOf.number("point light decay",e),this._decay=e}},lightColor:{get:function(){return this._lightColor}},positionEC:{get:function(){return this._positionEC},set:function(e){n$1e.defined("point light positionEC",e),this._positionEC=e}},lightType:{get:function(){return w$x.POINT}},visibleInCullingVolume:{get:function(){return this._visibleInCullingVolume}},sceneMode:{get:function(){return this._sceneMode},set:function(e){n$1e.typeOf.number("point light sceneMode",e),this._sceneMode!==e&&(this._sceneMode=e,this._sceneMode===b$1d.COLUMBUS_VIEW&&(this._positionCV=m$13.convertToColumbusCartesian(this._position)))}}});var u$n=new c$19;function c$k(e,t,i){if(i=e$1Y(i,{}),n$1e.defined("SpotLight Position",e),n$1e.defined("SpotLight target position",t),a$11.equals(e,t))throw new t$_("position equals targetPosition");this._id=t$U(),this._position=a$11.clone(e),this._positionCV=new a$11,this._targetPosition=a$11.clone(t),this._targetPositionCV=new a$11,this._color=e$1Y(i.color,new e$1z(1,1,1,1)),this._intensity=e$1Y(i.intensity,2),this._distance=e$1Y(i.distance,100),this._angle=e$1Y(i.angle,Math.PI/6),this._penumbra=e$1Y(i.penumbra,0),this._exponent=e$1Y(i.exponent,10),this._decay=e$1Y(i.decay,1),this._direction=new a$11,this._directionEC=new a$11,a$11.subtract(this._position,this._targetPosition,this._direction),a$11.normalize(this._direction,this._direction),this._lightColor=e$1z.multiplyByScalar(this._color,this._intensity,new e$1z),this._angleCos=Math.cos(this._angle),this._penumbraCos=Math.cos(this._angle*(1-this._penumbra)),this._positionEC=new a$11,this._visibleInCullingVolume=1,this._sceneMode=b$1d.SCENE3D}c$l.prototype.computeVisiblityInCullingVolume=function(e){return u$n.radius=this._cutoffDistance,u$n.center=this.position,this._visibleInCullingVolume=e.computeVisibility(u$n)!==cr$4.OUTSIDE?1:0,!!this._visibleInCullingVolume},Object.defineProperties(c$k.prototype,{id:{get:function(){return this._id}},position:{get:function(){return this._sceneMode===b$1d.SCENE3D?this._position:this._positionCV},set:function(e){n$1e.defined("spot light position",e),!a$11.equals(e,this._targetPosition)&&(this._position=e,this._sceneMode===b$1d.COLUMBUS_VIEW?(this._positionCV=m$13.convertToColumbusCartesian(this._position),a$11.subtract(this._positionCV,this._targetPositionCV,this._direction)):a$11.subtract(this._position,this._targetPosition,this._direction),a$11.normalize(this._direction,this._direction))}},targetPosition:{get:function(){return this._sceneMode===b$1d.SCENE3D?this._targetPosition:this._targetPositionCV},set:function(e){n$1e.defined("spot light target position",e),!a$11.equals(e,this._position)&&(this._targetPosition=e,this._sceneMode===b$1d.COLUMBUS_VIEW?(this._targetPositionCV=m$13.convertToColumbusCartesian(this._targetPosition),a$11.subtract(this._positionCV,this._targetPositionCV,this._direction)):a$11.subtract(this._position,this._targetPosition,this._direction),a$11.normalize(this._direction,this._direction))}},color:{get:function(){return this._color},set:function(e){n$1e.defined("spot color color",e),this._color=e,e$1z.multiplyByScalar(this._color,this._intensity,this._lightColor)}},intensity:{get:function(){return this._intensity},set:function(e){n$1e.typeOf.number("spot light intensity",e),this._intensity=e,e$1z.multiplyByScalar(this._color,this._intensity,this._lightColor)}},distance:{get:function(){return this._distance},set:function(e){n$1e.typeOf.number("spot light istance",e),this._distance=e}},angle:{get:function(){return this._angle},set:function(e){n$1e.typeOf.number("spot light angle",e),this._angle=e,this._angleCos=Math.cos(this._angle)}},exponent:{get:function(){return this._exponent},set:function(e){n$1e.typeOf.number("spot light exponent",e),this._exponent=e}},decay:{get:function(){return this._decay},set:function(e){n$1e.typeOf.number("spot light decay",e),this._decay=e}},direction:{get:function(){return this._direction}},lightColor:{get:function(){return this._lightColor}},angleCos:{get:function(){return this._angleCos}},penumbra:{get:function(){return this._penumbra},set:function(e){n$1e.typeOf.number("spot light angle",e),this._penumbra=e,this._penumbraCos=Math.cos(this._angle*(1-this._penumbra))}},penumbraCos:{get:function(){return this._penumbraCos}},positionEC:{get:function(){return this._positionEC},set:function(e){n$1e.defined("spot light positionEC",e),this._positionEC=e}},directionEC:{get:function(){return this._directionEC}},lightType:{get:function(){return w$x.SPOT}},visibleInCullingVolume:{get:function(){return this._visibleInCullingVolume}},sceneMode:{get:function(){return this._sceneMode},set:function(e){if(n$1e.typeOf.number("spot light sceneMode",e),this._sceneMode!==e){if(this._sceneMode=e,this._sceneMode===b$1d.COLUMBUS_VIEW){if(this._positionCV=m$13.convertToColumbusCartesian(this._position),this._targetPositionCV=m$13.convertToColumbusCartesian(this._targetPosition),a$11.equals(this._positionCV,this._targetPositionCV))return;a$11.subtract(this._positionCV,this._targetPositionCV,this._direction)}else a$11.subtract(this._position,this._targetPosition,this._direction);a$11.normalize(this._direction,this._direction)}}}});var u$m=new c$19;c$k.prototype.computeVisiblityInCullingVolume=function(e){return u$m.radius=this._distance,u$m.center=this.position,this._visibleInCullingVolume=e.computeVisibility(u$m)!==cr$4.OUTSIDE?1:0,!!this._visibleInCullingVolume};var f$s="varying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec2 v_st;\nvoid main()\n{\nczm_materialInput materialInput;\nvec3 normalEC = normalize(czm_normal3D * czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)));\n#ifdef FACE_FORWARD\nnormalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\nmaterialInput.s = v_st.s;\nmaterialInput.st = v_st;\nmaterialInput.str = vec3(v_st, 0.0);\nmaterialInput.normalEC = normalEC;\nmaterialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, materialInput.normalEC);\nvec3 positionToEyeEC = -v_positionEC;\nmaterialInput.positionToEyeEC = positionToEyeEC;\nczm_material material = czm_getMaterial(materialInput);\n#ifdef FLAT\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\ngl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",d$l="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec2 st;\nattribute float batchId;\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_positionMC = position3DHigh + position3DLow;\nv_positionEC = (czm_modelViewRelativeToEye * p).xyz;\nv_st = st;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n";function t$g(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT);var t=e$1Y(e.translucent,!0),i=e$1Y(e.aboveGround,!1);this.material=t$$(e.material)?e.material:r$v.fromType(r$v.ColorType),this.translucent=e$1Y(e.translucent,!0),this._vertexShaderSource=e$1Y(e.vertexShaderSource,d$l),this._fragmentShaderSource=e$1Y(e.fragmentShaderSource,f$s),this._renderState=n$M.getDefaultRenderState(t,!i,e.renderState),this._closed=!1,this._flat=e$1Y(e.flat,!1),this._faceForward=e$1Y(e.faceForward,i),this._aboveGround=i}Object.defineProperties(t$g.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return t$g.VERTEX_FORMAT}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}},aboveGround:{get:function(){return this._aboveGround}}}),t$g.VERTEX_FORMAT=n$12.POSITION_AND_ST,t$g.prototype.getFragmentShaderSource=n$M.prototype.getFragmentShaderSource,t$g.prototype.isTranslucent=n$M.prototype.isTranslucent,t$g.prototype.getRenderState=n$M.prototype.getRenderState;var _0x3fff02=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3ef3a1=_0x3fff02(void 0,(function(){return _0x3ef3a1.toString().search("(((.+)+)+)+$").toString().constructor(_0x3ef3a1).search("(((.+)+)+)+$")}));_0x3ef3a1();var _0x5430b3={FIRE:0,FOUNTAIN:1,RAIN:2},y$n=Object.freeze(_0x5430b3),h$m=new r$T(1,1);function r$h(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this.mass=e$1Y(e.mass,1),this.position=a$11.clone(e$1Y(e.position,a$11.ZERO)),this.velocity=a$11.clone(e$1Y(e.velocity,a$11.ZERO)),this.life=e$1Y(e.life,Number.MAX_VALUE),this.image=e.image,this.startColor=e$1z.clone(e$1Y(e.startColor,e$1z.WHITE)),this.endColor=e$1z.clone(e$1Y(e.endColor,e$1z.WHITE)),this.startScale=e$1Y(e.startScale,1),this.endScale=e$1Y(e.endScale,1),this.imageSize=r$T.clone(e$1Y(e.imageSize,h$m)),this.rotationSpeed=e$1Y(e.rotationSpeed,0),this._age=0,this._normalizedAge=0,this._billboard=void 0}Object.defineProperties(r$h.prototype,{age:{get:function(){return this._age}},normalizedAge:{get:function(){return this._normalizedAge}}});var n$o=new a$11;function a$k(e,t,i,n){e=e$1Y(e,1),n$1e.typeOf.number.greaterThan("radius",e,0),this._radius=e$1Y(e,1),this._innerRadius=e$1Y(t,0),this._startAngle=e$1Y(i,0),this._endAngle=e$1Y(n,n$1d.TWO_PI)}function e$o(e){e=e$1Y(e,1),n$1e.typeOf.number.greaterThan("radius",e,0),this._radius=e$1Y(e,1),this.radius=this._radius}r$h.prototype.update=function(e,t){return a$11.multiplyByScalar(this.velocity,e,n$o),a$11.add(this.position,n$o,this.position),t$$(t)&&t(this,e),this._age+=e,this.life===Number.MAX_VALUE?this._normalizedAge=0:this._normalizedAge=this._age/this.life,this._age<=this.life},Object.defineProperties(a$k.prototype,{radius:{get:function(){return this._radius},set:function(e){n$1e.typeOf.number.greaterThan("value",e,0),this._radius=e}},innerRadius:{get:function(){return this._innerRadius},set:function(e){n$1e.typeOf.number.greaterThan("value",e,0),this._innerRadius=e}},startAngle:{get:function(){return this._startAngle},set:function(e){this._startAngle=e}},endAngle:{get:function(){return this._endAngle},set:function(e){this._endAngle=e}},type:{get:function(){return"Circle"}}}),a$k.prototype.emit=function(e){var t=this._startAngle,i=this._endAngle;t>i&&(t=this._endAngle,i=this._startAngle);var n=n$1d.randomBetween(t,i),r=n$1d.randomBetween(this._innerRadius,this._radius),o=r*Math.cos(n),a=r*Math.sin(n);e.position=a$11.fromElements(o,a,0,e.position),e.velocity=a$11.clone(a$11.UNIT_Z,e.velocity)},Object.defineProperties(e$o.prototype,{radius:{get:function(){return this._radius},set:function(e){n$1e.typeOf.number.greaterThan("value",e,0),this._radius=e}},type:{get:function(){return"Sphere"}}}),e$o.prototype.emit=function(e){var t=n$1d.randomBetween(0,n$1d.TWO_PI),i=n$1d.randomBetween(0,n$1d.PI),n=n$1d.randomBetween(0,this._radius),r=n*Math.cos(t)*Math.sin(i),o=n*Math.sin(t)*Math.sin(i),a=n*Math.cos(i);e.position=a$11.fromElements(r,o,a,e.position),e.velocity=a$11.normalize(e.position,e.velocity)};var c$j=n$1d.toRadians(30);function n$n(e){this._angle=e$1Y(e,c$j)}Object.defineProperties(n$n.prototype,{angle:{get:function(){return this._angle},set:function(e){n$1e.typeOf.number("value",e),this._angle=e}}}),n$n.prototype.emit=function(e){var t=Math.tan(this._angle),i=n$1d.randomBetween(0,n$1d.TWO_PI),n=n$1d.randomBetween(0,t),r=n*Math.cos(i),o=n*Math.sin(i);e.velocity=a$11.fromElements(r,o,1,e.velocity),a$11.normalize(e.velocity,e.velocity),e.position=a$11.clone(a$11.ZERO,e.position)};var w$s=new r$T(1,1);function g$h(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this.show=e$1Y(e.show,!0),this.updateCallback=e.updateCallback,this.loop=e$1Y(e.loop,!0),this.image=e$1Y(e.image,void 0);var t=e.emitter;t$$(t)||(t=new a$k(.5)),this._emitter=t,t.owner=this,this._bursts=e.bursts,this._modelMatrix=c$1a.clone(e$1Y(e.modelMatrix,c$1a.IDENTITY)),this._emitterModelMatrix=c$1a.clone(e$1Y(e.emitterModelMatrix,c$1a.IDENTITY)),this._matrixDirty=!0,this._combinedMatrix=new c$1a,this._startColor=e$1z.clone(e$1Y(e.color,e$1Y(e.startColor,e$1z.WHITE))),this._endColor=e$1z.clone(e$1Y(e.color,e$1Y(e.endColor,e$1z.WHITE))),this._startScale=e$1Y(e.scale,e$1Y(e.startScale,1)),this._endScale=e$1Y(e.scale,e$1Y(e.endScale,1)),this._minRotationSpeed=e$1Y(e.minRotationSpeed,e$1Y(e.minimumRotationSpeed,0)),this._maxRotationSpeed=e$1Y(e.maxRotationSpeed,e$1Y(e.maximumRotationSpeed,0)),this._emissionRate=e$1Y(e.emissionRate,5),this._emissionRateByDistance=e$1Y(e.emissionRate,5),this._minimumSpeed=e$1Y(e.speed,e$1Y(e.minimumSpeed,1)),this._maximumSpeed=e$1Y(e.speed,e$1Y(e.maximumSpeed,1)),this._minimumParticleLife=e$1Y(e.particleLife,e$1Y(e.minimumParticleLife,5)),this._maximumParticleLife=e$1Y(e.particleLife,e$1Y(e.maximumParticleLife,5)),this._minimumMass=e$1Y(e.mass,e$1Y(e.minimumMass,1)),this._maximumMass=e$1Y(e.mass,e$1Y(e.maximumMass,1)),this._minimumImageSize=r$T.clone(e$1Y(e.imageSize,e$1Y(e.minimumImageSize,w$s))),this._maximumImageSize=r$T.clone(e$1Y(e.imageSize,e$1Y(e.maximumImageSize,w$s))),this._lifetime=e$1Y(e.lifetime,Number.MAX_VALUE),this._billboardCollection=void 0,this._particles=[],this._particlePool=[],this._previousTime=void 0,this._currentTime=0,this._carryOver=0,this._complete=new o$15,this._isComplete=!1,this._updateParticlePool=!0,this._particleEstimate=0,this._sizeInMeters=e$1Y(e.sizeInMeters,e$1Y(e.sizeInMeters,!1)),this._boundingSphere=new c$19(a$11.ZERO,100),this.lodRangeScale=1,this._performance=e$1Y(e.performance,!0),this._type=e$1Y(e.type,y$n.FIRE)}function U$h(e){var t=e._emissionRate,i=e._maximumParticleLife,n=0,r=e._bursts;if(t$$(r))for(var o=r.length,a=0;a<o;++a)n+=r[a].maximum;var s=e._billboardCollection,l=e.image,u=Math.ceil(t*i+n),c=e._particles,h=e._particlePool,d=e._emitter;t$$(d.areaFactor)&&(u=Math.min(u,d.areaFactor));for(var f=Math.max(u-c.length-h.length,0),p=0;p<f;++p){var _=new r$h;_._billboard=s.add({image:l,sizeInMeters:e._sizeInMeters}),h.push(_)}e._particleEstimate=u}function W$i(e){var t=e._particlePool.pop();return t$$(t)||(t=new r$h),t}function j$f(e,t){e._particlePool.push(t)}function Y$l(e){for(var t=e._particles,i=e._particlePool,n=e._billboardCollection,r=(t.length,i.length),o=e._particleEstimate,a=o;a<r;++a){var s=i[a];!t$$(s)||n.remove(s._billboard)}i.length=o}function H$o(e){t$$(e._billboard)&&(e._billboard.show=!1)}function I$l(e,t){var i=t._billboard;t$$(i)||(i=t._billboard=e._billboardCollection.add({image:t.image,sizeInMeters:e._sizeInMeters})),i.width=t.imageSize.x,i.height=t.imageSize.y,i.position=t.position,i.show=!0;var n=n$1d.lerp(t.startColor.red,t.endColor.red,t.normalizedAge),r=n$1d.lerp(t.startColor.green,t.endColor.green,t.normalizedAge),o=n$1d.lerp(t.startColor.blue,t.endColor.blue,t.normalizedAge),a=n$1d.lerp(t.startColor.alpha,t.endColor.alpha,t.normalizedAge);i.color=new e$1z(n,r,o,a),i.scale=n$1d.lerp(t.startScale,t.endScale,t.normalizedAge),i.rotation=t.age*t.rotationSpeed}function X$c(e,t){t.startColor=e$1z.clone(e._startColor,t.startColor),t.endColor=e$1z.clone(e._endColor,t.endColor),t.startScale=e._startScale,t.endScale=e._endScale,t.image=e.image,t.life=n$1d.randomBetween(e._minimumParticleLife,e._maximumParticleLife),t.mass=n$1d.randomBetween(e._minimumMass,e._maximumMass),t.imageSize.x=n$1d.randomBetween(e._minimumImageSize.x,e._maximumImageSize.x),t.imageSize.y=n$1d.randomBetween(e._minimumImageSize.y,e._maximumImageSize.y),t.rotationSpeed=n$1d.randomBetween(e._minRotationSpeed,e._maxRotationSpeed),t._normalizedAge=0,t._age=0;var i=n$1d.randomBetween(e._minimumSpeed,e._maximumSpeed);a$11.multiplyByScalar(t.velocity,i,t.velocity),e._particles.push(t)}function J$k(e,t){if(e._isComplete)return 0;var i=(t=n$1d.mod(t,e._lifetime))*e._emissionRateByDistance,n=Math.floor(i);if(e._carryOver+=i-n,e._carryOver>1&&(n++,e._carryOver-=1),t$$(e.bursts))for(var r=e.bursts.length,o=0;o<r;o++){var a=e.bursts[o],s=e._currentTime;t$$(a)&&!a._complete&&s>a.time&&(n+=n$1d.randomBetween(a.minimum,a.maximum),a._complete=!0)}return n}Object.defineProperties(g$h.prototype,{emitter:{get:function(){return this._emitter},set:function(e){n$1e.defined("value",e),this._emitter=e}},bursts:{get:function(){return this._bursts},set:function(e){this._bursts=e,this._updateParticlePool=!0}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){n$1e.defined("value",e),this._matrixDirty=this._matrixDirty||!c$1a.equals(this._modelMatrix,e),c$1a.clone(e,this._modelMatrix)}},emitterModelMatrix:{get:function(){return this._emitterModelMatrix},set:function(e){n$1e.defined("value",e),this._matrixDirty=this._matrixDirty||!c$1a.equals(this._emitterModelMatrix,e),c$1a.clone(e,this._emitterModelMatrix)}},startColor:{get:function(){return this._startColor},set:function(e){n$1e.defined("value",e),e$1z.clone(e,this._startColor)}},endColor:{get:function(){return this._endColor},set:function(e){n$1e.defined("value",e),e$1z.clone(e,this._endColor)}},startScale:{get:function(){return this._startScale},set:function(e){n$1e.typeOf.number.greaterThanOrEquals("value",e,0),this._startScale=e}},endScale:{get:function(){return this._endScale},set:function(e){n$1e.typeOf.number.greaterThanOrEquals("value",e,0),this._endScale=e}},emissionRate:{get:function(){return this._emissionRate},set:function(e){n$1e.typeOf.number.greaterThanOrEquals("value",e,0),this._emissionRate=e,this._updateParticlePool=!0}},minimumSpeed:{get:function(){return this._minimumSpeed},set:function(e){n$1e.typeOf.number.greaterThanOrEquals("value",e,0),this._minimumSpeed=e}},maximumSpeed:{get:function(){return this._maximumSpeed},set:function(e){n$1e.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumSpeed=e}},minimumRotationSpeed:{get:function(){return this._minRotationSpeed},set:function(e){this._minRotationSpeed=e}},maximumRotationSpeed:{get:function(){return this._maxRotationSpeed},set:function(e){this._maxRotationSpeed=e}},minimumParticleLife:{get:function(){return this._minimumParticleLife},set:function(e){n$1e.typeOf.number.greaterThanOrEquals("value",e,0),this._minimumParticleLife=e}},maximumParticleLife:{get:function(){return this._maximumParticleLife},set:function(e){n$1e.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumParticleLife=e,this._updateParticlePool=!0}},minimumMass:{get:function(){return this._minimumMass},set:function(e){n$1e.typeOf.number.greaterThanOrEquals("value",e,0),this._minimumMass=e}},maximumMass:{get:function(){return this._maximumMass},set:function(e){n$1e.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumMass=e}},minimumImageSize:{get:function(){return this._minimumImageSize},set:function(e){n$1e.typeOf.object("value",e),n$1e.typeOf.number.greaterThanOrEquals("value.x",e.x,0),n$1e.typeOf.number.greaterThanOrEquals("value.y",e.y,0),this._minimumImageSize=e}},maximumImageSize:{get:function(){return this._maximumImageSize},set:function(e){n$1e.typeOf.object("value",e),n$1e.typeOf.number.greaterThanOrEquals("value.x",e.x,0),n$1e.typeOf.number.greaterThanOrEquals("value.y",e.y,0),this._maximumImageSize=e}},lifetime:{get:function(){return this._lifetime},set:function(e){n$1e.typeOf.number.greaterThanOrEquals("value",e,0),this._lifetime=e}},type:{get:function(){return this._ParticleSystemType},set:function(e){n$1e.typeOf.number.greaterThanOrEquals("value",e,0),this._ParticleSystemType=e,this.setParticleType(e)}},complete:{get:function(){return this._complete}},isComplete:{get:function(){return this._isComplete}}});var Z$j=new c$19,C$n=new c$1a;function G$n(e,t){if(t$$(e._emitter)&&"Polygon"==e._emitter.type)e._boundingSphere=e._emitter.boundingSphere;else{var i=e._maxVelocity*e._maximumParticleLife;C$n=c$1a.multiply(e.modelMatrix,e.emitterModelMatrix,C$n),c$19.transform(Z$j,C$n,e._boundingSphere),e._boundingSphere.radius=i+10+e._emitter.radius}t.mode===b$1d.COLUMBUS_VIEW&&u$V.computeActualWgs84Position(t,e._boundingSphere.center,e._boundingSphere.center)}function K$e(e,t){var i=t.camera.positionWC,n=a$11.distance(i,e._boundingSphere.center)-e._boundingSphere.radius,r=0;n>1e3*e.lodRangeScale?r=0:n>200*e.lodRangeScale?(r=e._emissionRate/8,r=Math.max(2,r)):n>50*e.lodRangeScale?(r=e._emissionRate/2,r=Math.max(2,r)):r=e._emissionRate,t$$(e._emitter.areaFactor)&&(r=Math.min(e._emitter.areaFactor,r)),e._emissionRateByDistance=r}var v$o=new a$11;g$h.prototype.setParticleType=function(e){switch(e){case y$n.FIRE:this._emitter=new n$n(n$1d.toRadians(45)),this._emissionRate=150,this._particleSize=2,this._minimumParticleLife=1.5,this._maximumParticleLife=1.8,this._minimumSpeed=7,this._maximumSpeed=9,this._startScale=3,this._endScale=1.5,this._startColor=new e$1z(1,1,1,1),this._endColor=new e$1z(1,0,0,0),this._lifeTime=6,this._sizeInMeters=!0,this._performance=!0;break;case y$n.FOUNTAIN:this._emitter=new r$T(1,1),this._emissionRate=40,this._particleSize=1,this._minimumParticleLife=6,this._maximumParticleLife=7,this._minimumSpeed=10,this._maximumSpeed=10,this._startScale=1,this._endScale=30,this._startColor=new e$1z(1,1,1,.6),this._endColor=new e$1z(.8,.86,1,.4),this._lifeTime=16,this._sizeInMeters=!0,this._performance=!0;break;case y$n.RAIN:this._emitter=new e$o(5e3),this._emissionRate=8e3,this._particleSize=30,this._minimumParticleLife=6,this._maximumParticleLife=6,this._minimumSpeed=0,this._maximumSpeed=0,this._startScale=1,this._endScale=1,this._startColor=new e$1z(1,1,1,.8),this._endColor=new e$1z(1,1,1,.8),this._lifeTime=10,this._sizeInMeters=!0,this._performance=!1}},g$h.prototype.update=function(e){if(this.show){t$$(this._billboardCollection)||(this._billboardCollection=new O$t({particleSystem:this._performance,ignoreShow:!0})),this._updateParticlePool&&(U$h(this),this._updateParticlePool=!1);var t=e.cullingVolume;if(G$n(this,e),t.computeVisibility(this._boundingSphere)!=cr$4.OUTSIDE){K$e(this,e);var i=0;this._previousTime&&(i=o$10.secondsDifference(e.time,this._previousTime)),i<0&&(i=0),this._maxVelocity=0;var n,r,o=this._particles,a=this._emitter,s=this.updateCallback,l=o.length;for(n=0;n<l;++n)(r=o[n]).update(i,s)?(I$l(this,r),this._maxVelocity=Math.max(this._maxVelocity,a$11.magnitude(r.velocity))):(H$o(r),j$f(this,r),o[n]=o[l-1],--n,--l);o.length=l;var u=J$k(this,i);if(u>0&&t$$(a)){this._matrixDirty&&(this._combinedMatrix=c$1a.multiply(this.modelMatrix,this.emitterModelMatrix,this._combinedMatrix),this._matrixDirty=!1);var c=this._combinedMatrix;for(n=0;n<u;n++)r=W$i(this),this._emitter.emit(r),"Polygon"!==this._emitter.type&&(a$11.add(r.position,r.velocity,v$o),c$1a.multiplyByPoint(c,v$o,v$o),r.position=c$1a.multiplyByPoint(c,r.position,r.position),a$11.subtract(v$o,r.position,r.velocity),a$11.normalize(r.velocity,r.velocity)),X$c(this,r),I$l(this,r)}if(this._billboardCollection.update(e),this._previousTime=o$10.clone(e.time,this._previousTime),this._currentTime+=i,this._lifetime!==Number.MAX_VALUE&&this._currentTime>this._lifetime)if(this.loop){if(this._currentTime=n$1d.mod(this._currentTime,this._lifetime),this.bursts){var h=this.bursts.length;for(n=0;n<h;n++)this.bursts[n]._complete=!1}}else this._isComplete=!0,this._complete.raiseEvent(this);e.frameNumber%60==0&&Y$l(this)}}},g$h.prototype.isDestroyed=function(){return!1},g$h.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),s$1e(this)};var p$n=new a$11(1,1,1);function o$p(e){e=e$1Y(e,p$n),n$1e.defined("dimensions",e),n$1e.typeOf.number.greaterThanOrEquals("dimensions.x",e.x,0),n$1e.typeOf.number.greaterThanOrEquals("dimensions.y",e.y,0),n$1e.typeOf.number.greaterThanOrEquals("dimensions.z",e.z,0),this._dimensions=a$11.clone(e)}Object.defineProperties(o$p.prototype,{dimensions:{get:function(){return this._dimensions},set:function(e){n$1e.defined("value",e),n$1e.typeOf.number.greaterThanOrEquals("value.x",e.x,0),n$1e.typeOf.number.greaterThanOrEquals("value.y",e.y,0),n$1e.typeOf.number.greaterThanOrEquals("value.z",e.z,0),a$11.clone(e,this._dimensions)}}});var f$r=new a$11;o$p.prototype.emit=function(e){var t=this._dimensions,i=a$11.multiplyByScalar(t,.5,f$r),n=n$1d.randomBetween(-i.x,i.x),r=n$1d.randomBetween(-i.y,i.y),o=n$1d.randomBetween(-i.z,i.z);e.position=a$11.fromElements(n,r,o,e.position),e.velocity=a$11.normalize(e.position,e.velocity)};var S$k="uniform highp sampler2D u_depthTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\ngl_FragColor = czm_packDepth(texture2D(u_depthTexture, v_textureCoordinates).r);\n}\n";function n$m(e){this._depthTexture=void 0,this._framebuffer=void 0,this._copyDepthCommand=void 0,this._viewport=new n$13,this._rs=void 0,this._passState=new t$l(e),this._passState.viewport=this._viewport,this._context=e,this._isUpdate=!1,this._beginFunc=void 0,this._endFunc=void 0,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!1,isUnderGlobeVisible:!1},this._depthTextureToCopy=void 0,this._manualDepth=!0;var t=new t$l(e);t.blendingEnabled=!1,t.viewport=new n$13,this._passState=t}function g$g(e,t,i,n,r){(!t$$(e._framebuffer)||e.width!==n||e.height!==r)&&(e.width=n,e.height=r,e._depthTexture=e._depthTexture&&e._depthTexture.destroy(),e._depthTexture=new P$S({context:t,width:n,height:r,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST})}),e._framebuffer=e._framebuffer&&e._framebuffer.destroy(),e._framebuffer=new u$F({context:t,colorTextures:[e._depthTexture],destroyAttachments:!1}),t.depthTexture||(e._depthTextureCopyFrom=e._depthTextureCopyFrom&&e._depthTextureCopyFrom.destroy(),e._depthTextureCopyFrom=new P$S({context:t,width:n,height:r,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST})}),e._framebufferCopyFrom=e._framebufferCopyFrom&&e._framebufferCopyFrom.destroy(),e._framebufferCopyFrom=new u$F({context:t,colorTextures:[e._depthTextureCopyFrom],depthStencilRenderbuffer:new h$q({context:t,width:n,height:r,format:E$r.DEPTH_STENCIL}),destroyAttachments:!1})))}function D$p(e,t,i,n){if(e._viewport.width=i,e._viewport.height=n,(!t$$(e._rs)||!n$13.equals(e._viewport,e._rs.viewport))&&(e._rs=p$1a.fromCache({viewport:e._viewport})),t.depthTexture)t$$(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(S$k,{uniformMap:{u_depthTexture:function(){return e._depthTextureToCopy}},owner:e}));else{e._copyDepthCommand=t.createViewportQuadCommand("uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n gl_FragColor = texture2D(u_texture, v_textureCoordinates);\n}\n",{renderState:p$1a.fromCache(),uniformMap:{u_texture:function(){return e._depthTextureToCopy}},owner:e})}t$$(e._clearCommand)||(e._clearCommand=new r$M({color:new e$1z(0,0,0,0),stencil:0,owner:e})),e._copyDepthCommand.renderState=e._rs,e._clearCommand.framebuffer=e._framebuffer,e._copyDepthCommand.framebuffer=e._framebuffer}Object.defineProperties(n$m.prototype,{framebuffer:{get:function(){return this._framebuffer}},depthTexture:{get:function(){return this._depthTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isManualDepth:{get:function(){return this._manualDepth},set:function(e){this._manualDepth!==e&&(this._manualDepth=e,this._isUpdate=!0)}},useType:{get:function(){return 1},set:function(e){}},frameBufferType:{get:function(){return B$y.DEPTH}}}),n$m.prototype.begin=function(e){var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._passState.viewport.width=i,this._passState.viewport.height=n,g$g(this,t,e,i,n),D$p(this,t,i,n),this._beginFunc&&this._beginFunc(e),t.depthTexture||(e.passes.depth=!0,e.passes.pick=!0,this._passState.framebuffer=this._framebufferCopyFrom),this._passState},n$m.prototype.end=function(e){e.context.depthTexture||(e.passes.depth=!1,e.passes.pick=!1),this._endFunc&&this._endFunc(e)},n$m.prototype.update=function(e,t,i){this._depthTextureToCopy=e.depthTexture?i.depthStencilTexture:this._depthTextureCopyFrom,t$$(this._clearCommand)&&this._clearCommand.execute(e,t),t$$(this._copyDepthCommand)&&this._copyDepthCommand.execute(e,t)},n$m.prototype.destroy=function(){return this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._depthTextureCopyFrom=this._depthTextureCopyFrom&&this._depthTextureCopyFrom.destroy(),this._framebufferCopyFrom=this._framebufferCopyFrom&&this._framebufferCopyFrom.destroy(),t$$(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=this._copyDepthCommand.shaderProgram.destroy()),this._depthTextureToCopy=void 0,s$1e(this)},n$m.prototype.isDestroyed=function(){return!1};var de$9="attribute vec2 aSideness;\nattribute vec3 aPosition0;\nattribute vec3 aPosition1;\nuniform float uLineWidth;\nuniform mat4 uRenderTextureMatrix;\nvarying vec4 renderTextureCoord;\nvec4 resolvePosition(vec4 viewPosV0, vec4 viewPosV1, vec2 sidenessNorm) {\nvec2 sideness = sidenessNorm * 2.0 - 1.0;\nvec4 viewPos = mix(viewPosV0, viewPosV1, sidenessNorm.y);\nvec4 projPosV0 = czm_projection * viewPosV0;\nvec4 projPosV1 = czm_projection * viewPosV1;\nvec4 projPos = czm_projection * viewPos;\nvec3 screenSpaceLineNDC = (projPosV1.xyz / projPosV1.w - projPosV0.xyz / projPosV0.w);\nvec2 uNDCToPixel = vec2(czm_viewport.z / 2.0, czm_viewport.w / 2.0);\nvec2 screenSpaceLinePixels = screenSpaceLineNDC.xy * uNDCToPixel;\nfloat lineLengthPixels = length(screenSpaceLinePixels);\nfloat dzPerPixel = screenSpaceLineNDC.z / lineLengthPixels;\nvec2 screenSpaceDirection = screenSpaceLinePixels / lineLengthPixels;\nvec2 perpendicularScreenSpaceDirection = vec2(screenSpaceDirection.y, -screenSpaceDirection.x) * sideness.x;\nvec2 uPixelToNDC = vec2(2.0 / czm_viewport.z, 2.0 / czm_viewport.w);\nfloat halfLineWidth = max(uLineWidth, 1.0) * 0.5;\nvec2 halfLineWidthNDC = halfLineWidth * uPixelToNDC;\nvec2 ndcOffset = screenSpaceDirection * halfLineWidthNDC + perpendicularScreenSpaceDirection * halfLineWidthNDC;\nprojPos.xy += ndcOffset * projPos.w;\nprojPos.z += (dzPerPixel * halfLineWidth) * sideness.y * projPos.w;\nreturn projPos;\n}\nvoid main() {\nvec4 viewPosV0 = czm_modelView * vec4(aPosition0, 1.0);\nvec4 viewPosV1 = czm_modelView * vec4(aPosition1, 1.0);\ngl_Position = resolvePosition(viewPosV0, viewPosV1, aSideness);\nvec4 viewPos = czm_inverseProjection * gl_Position;\nrenderTextureCoord = uRenderTextureMatrix * viewPos;\n}\n",me$d="uniform sampler2D uTexture0;\nuniform vec4 uVisibleColor;\nuniform vec4 uHiddenColor;\nvarying vec4 renderTextureCoord;\nvoid main() {\nvec4 resultColor = uVisibleColor;\nvec4 texCoord = renderTextureCoord / renderTextureCoord.w;\nfloat depth = texCoord.z * 0.5 + 0.5;\ntexCoord.xy = texCoord.xy * 0.5 + 0.5;\nfloat z_window = czm_unpackDepth(texture2D(uTexture0, texCoord.xy));\nif(z_window < depth && z_window > 0.0 && z_window < 1.0)\n{\nresultColor = uHiddenColor;\n}\ngl_FragColor = resultColor;\n}\n";function x$p(e){if(!t$$(e))throw new t$_("scene are required.");this._scene=e,this._depthBuffer=void 0,this._command=void 0,this._frameState=void 0,this._viewPosition=[0,0,0],this._cameraDir=new a$11,this._viewProjMatrix=new c$1a,this._viewProjMatrixs=new e$1F,this._renderTextureMatrix=new c$1a,this._renderTextureMatrixs=new e$1F,this._visibleColor=new a$10(0,1,0,1),this._hiddenColor=new a$10(1,0,0,1),this._targetPoints=new e$1F,this._sightlineCameras=new e$1F,this._update=!0,this._updateAll=!0,this._id=0,this._name="",this._visibleViewport=4095,this._barrierPointArray=new e$1F,this._depthBuffers=new e$1F,this._commands=new e$1F,this._lineWidth=1}function Z$i(e,t,i){var n,r=i.camera,o=r._projection;if(e._scene.mode===b$1d.SCENE3D)n=a$11.fromDegreesArrayHeights(e._viewPosition,e._scene._globe.ellipsoid)[0];else{var a=i$1g.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]);n=o.project(a,new a$11)}var s=new a$11(0,0,0);e._targetPoints._hash;var l,u=0,c=e._currentTargetPoint;if(e._scene.mode===b$1d.SCENE3D)l=a$11.fromDegreesArrayHeights(c,e._scene._globe.ellipsoid)[0];else{var h=i$1g.fromDegrees(c[0],c[1],c[2]);l=o.project(h,new a$11)}var d=new a$11;a$11.subtract(l,n,d),a$11.normalize(d,d),a$11.add(s,d,s),u=Math.max(u,a$11.distance(l,n)),a$11.normalize(s,s),a$11.clone(s,e._cameraDir);var f=new a$11,p=new a$11,_=new a$11,m=r.frustum.fov;a$11.clone(r.position,f),a$11.clone(r.direction,p),a$11.clone(r.up,_);var $=2*n$1d.PI/3,g=r.frustum.near,y=r.frustum.far,v=i.useLogDepth,x=e._currentTargetName,b=e._depthBuffers.get(x);t$$(b)||((b=new n$m(t)).environmentVisible.isObjectVisible=!0,b.environmentVisible.isGlobalVisible=!0,b._visibleViewport=e._visibleViewport,i._framebufferList[x]=b,e._depthBuffers.set(x,b)),b.isUpdate=!0,b._beginFunc=function(){i.useLogDepth=!1,a$11.clone(r.position,f),a$11.clone(r.direction,p),a$11.clone(r.up,_),m=r.frustum.fov,r.frustum.fov=$;var t=s,o=new a$11;o=a$11.clone(n,o),o=a$11.normalize(o,o),Math.abs(a$11.dot(o,t))>=1&&(o=Math.abs(a$11.dot(t,a$11.UNIT_Y))<1?a$11.clone(a$11.UNIT_Y,o):a$11.clone(a$11.UNIT_Z,o));var a=new a$11;a$11.cross(o,t,a),a=a$11.normalize(a,a),a$11.cross(t,a,o),o=a$11.normalize(o,o);var l={destination:n,orientation:{direction:t,up:o},convert:!1};r.setView(l),e._sightlineCameras.set(x,l),r.frustum.near=1,r.frustum.far=Math.ceil(Math.max(u,10));var c=new c$1a;c$1a.multiply(r.frustum.projectionMatrix,r.viewMatrix,c),e._viewProjMatrixs.set(x,c),e._renderTextureMatrixs.set(x,new c$1a)},b._endFunc=function(){if(i.useLogDepth=v,r.frustum.fov=m,r.setView({destination:f,orientation:{direction:p,up:_},convert:!1}),r.frustum.near=g,r.frustum.far=y,b.isUpdate=!1,!e._update){var t=ee$b(e,x);e._barrierPointArray.set(x,t)}}}Object.defineProperties(x$p.prototype,{viewPosition:{get:function(){return this._viewPosition},set:function(e){this._viewPosition=e,this._updateAll=!0,this._update=!0}},visibleColor:{get:function(){var e=new e$1z;return e.red=this._visibleColor.x,e.green=this._visibleColor.y,e.blue=this._visibleColor.z,e.alpha=this._visibleColor.w,e},set:function(e){this._visibleColor.x=e.red,this._visibleColor.y=e.green,this._visibleColor.z=e.blue,this._visibleColor.w=e.alpha}},hiddenColor:{get:function(){var e=new e$1z;return e.red=this._hiddenColor.x,e.green=this._hiddenColor.y,e.blue=this._hiddenColor.z,e.alpha=this._hiddenColor.w,e},set:function(e){this._hiddenColor.x=e.red,this._hiddenColor.y=e.green,this._hiddenColor.z=e.blue,this._hiddenColor.w=e.alpha}},lineWidth:{get:function(){return this._lineWidth},set:function(e){n$1e.typeOf.number.greaterThan("Sightline.lineWidth",e,0),this._lineWidth=e}}}),x$p.prototype.addTargetPoint=function(e){var t=e.name,i=e.position;return!(!t$$(t)||!t$$(i))&&(this._targetPoints.set(t,i),this._currentTargetName=t,this._currentTargetPoint=i,this._update=!0,this._barrierPointArray.set(t,{}),!0)},x$p.prototype.removeTargetPoint=function(e){this._barrierPointArray.remove(e);var t=this._targetPoints.remove(e);if(this._sightlineCameras.remove(e),!t)return!1;this._viewProjMatrixs.remove(e),this._renderTextureMatrixs.remove(e);var i=this._depthBuffers.get(e);t$$(i)&&(i.destroy(),this._depthBuffers.remove(e),delete this._frameState._framebufferList[e]);var n=this._commands.get(e);if(t$$(n)){for(var r=0;r<n.length;r++){var o=n[r];o.shaderProgram=o.shaderProgram&&!o.shaderProgram.isDestroyed()&&o.shaderProgram.destroy(),o.vertexArray=o.vertexArray&&!o.vertexArray.isDestroyed()&&o.vertexArray.destroy();var a=this._frameState.commandList.indexOf(o);-1!==a&&this._frameState.commandList.splice(a,1)}this._commands.remove(e)}return this._update=!0,!0},x$p.prototype.removeAllTargetPoint=function(){for(var e in this._barrierPointArray.removeAll(),this._targetPoints.removeAll(),this._sightlineCameras.removeAll(),this._depthBuffers._hash)this._depthBuffers._hash.hasOwnProperty(e)&&(this._depthBuffers._hash[e].destroy(),delete this._frameState._framebufferList[e],delete this._frameState._framebufferList[e]);this._depthBuffers.removeAll();for(var t=0,i=this._commands.length;t<i;t++)for(var n=this._commands.values[t],r=0;r<n.length;r++){var o=n[r];o.shaderProgram=o.shaderProgram&&!o.shaderProgram.isDestroyed()&&o.shaderProgram.destroy(),o.vertexArray=o.vertexArray&&!o.vertexArray.isDestroyed()&&o.vertexArray.destroy()}this._commands.removeAll(),this._viewProjMatrixs.removeAll(),this._renderTextureMatrixs.removeAll(),this._update=!0};var ve$9=new c$1a(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),E$n=null;function ce$8(e){if(t$$(E$n))return E$n;var t=new Float32Array(8),i=0;return t[i++]=0,t[i++]=0,t[i++]=0,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=0,(E$n=u$Y.createVertexBuffer({context:e,typedArray:t,usage:A$13.STATIC_DRAW})).vertexArrayDestroyable=!1,E$n}function ge$8(e,t){var i=C$12.createTypedArray(C$12.FLOAT,6);return i[0]=0,i[1]=0,i[2]=0,i[3]=t.x,i[4]=t.y,i[5]=t.z,u$Y.createVertexBuffer({context:e,typedArray:i,usage:A$13.STATIC_DRAW})}function we$8(){var e=new Uint16Array(6),t=0;return e[t++]=2,e[t++]=1,e[t++]=0,e[t++]=3,e[t++]=2,e[t++]=0,e}var W$h=null;function ye$b(e){return t$$(W$h)||((W$h=u$Y.createIndexBuffer({context:e,typedArray:we$8(),usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT})).vertexArrayDestroyable=!1),W$h}var Y$k=new a$10,G$m=new a$10;function J$j(e,t,i){var n,r=i.camera._projection;if(e._scene.mode===b$1d.SCENE3D)n=a$11.fromDegreesArrayHeights(e._viewPosition,e._scene._globe.ellipsoid)[0];else{var o=i$1g.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]);n=r.project(o,new a$11)}var a,s=e._currentTargetPoint;if(e._scene.mode===b$1d.SCENE3D)a=a$11.fromDegreesArrayHeights(s,e._scene._globe.ellipsoid)[0];else{var l=i$1g.fromDegrees(s[0],s[1],s[2]);a=r.project(l,new a$11)}var u=new a$11;a$11.subtract(a,n,u);var c=ce$8(t),h=ge$8(t,u),d=[],f={aSideness:0};d.push({index:f.aSideness,vertexBuffer:c,componentsPerAttribute:2,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1}),f.aPosition0=1,d.push({index:f.aPosition0,vertexBuffer:h,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1,instanceDivisor:1}),f.aPosition1=2,d.push({index:f.aPosition1,vertexBuffer:h,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:12,strideInBytes:12,normalize:!1,instanceDivisor:1});var p=ye$b(t),_=new s$1d({primitiveType:H$11.TRIANGLES,pass:we$l.OPAQUE,owner:e,cull:!1}),m=new c$1a;c$1a.clone(c$1a.IDENTITY,m),c$1a.setTranslation(m,n,m),e._scene.mode!==b$1d.SCENE3D&&c$1a.multiply(ve$9,m,m),_.modelMatrix=m,_.vertexArray=new x$18({context:t,attributes:d,indexBuffer:p}),_.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:de$9,fragmentShaderSource:me$d,attributeLocations:f}),_.renderState=p$1a.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}});var $=e._currentTargetName,g={uRenderTextureMatrix:function(){return e._renderTextureMatrixs.get($)},uTexture0:function(){return e._depthBuffers.get($).depthTexture},uVisibleColor:function(){return e._visibleColor},uHiddenColor:function(){return e._hiddenColor},uLineWidth:function(){return e._lineWidth}};_.uniformMap=g;var y=s$1d.shallowClone(_);y.pass=we$l.ANALYSIS,y.renderState=p$1a.fromCache({depthMask:!1,depthTest:{enabled:!1},blending:Ee$s.ALPHA_BLEND}),y.uniformMap.uHiddenColor=function(){return a$10.clone(e._hiddenColor,Y$k),Y$k.w=.2,Y$k},y.uniformMap.uVisibleColor=function(){return a$10.clone(e._visibleColor,G$m),G$m.w=.2,G$m},e._commands.set($,[y,_])}function ee$b(e,t){var i=e._targetPoints.get(t);if(t$$(i)){var n={isViewer:!0},r=a$11.fromDegreesArrayHeights(i,e._scene._globe.ellipsoid)[0],o=new a$10(r.x,r.y,r.z,1),a=e._viewProjMatrixs.get(t);if(c$1a.multiplyByVector(a,o,o),a$10.divideByScalar(o,o.w,o),o.x>1||o.x<-1||o.y>1||o.y<-1)return n;var s=e._scene.context,l=s.drawingBufferWidth,u=s.drawingBufferHeight,c=(.5*o.x+.5)*l-.5,h=(.5*o.y+.5)*u-.5;if(c<0||h<0)return n;for(var d=Math.floor(c),f=c-d,p=Math.floor(h),_=h-p,m=e._depthBuffers.get(t),$=s.readPixels({framebuffer:m.framebuffer,x:d,y:p,width:2,height:2}),g=new a$10,y=(new a$11,new a$10(1/255,1/65025,1/160581375,1/4228250625)),v=[],x=(e._scene,s.uniformState.currentFrustum),b=(x.x,x.y,0);b<4;b++){var S=a$10.unpack($,4*b,g),w=a$10.dot(S,y);if(!(w<1&&w>0))return n;v[b]=2*w-1}var C=(1-_)*((1-f)*v[0]+f*v[1])+_*((1-f)*v[2]+f*v[3]);if(o.z-C>1e-6){var T=new c$1a;c$1a.inverse(a,T),o.z=C,c$1a.multiplyByVector(T,o,o),a$10.divideByScalar(o,o.w,o);var P=i$1g.fromCartesian(o,e._scene._globe.ellipsoid);n.position=P,n.isViewer=!1,n.st=new r$T(d,p)}return n}}function xe$f(e,t){var i=ee$b(e,t);if(t$$(i)&&t$$(i.position)&&t$$(i.st))return i.st}x$p.prototype.update=function(e,t,i){if(!t._fboState.enabled){var n=t.camera;for(var r in this._viewProjMatrixs._hash)c$1a.multiply(this._viewProjMatrixs.get(r),n.inverseViewMatrix,this._renderTextureMatrixs.get(r));if(this._update){if(this._update=!1,this._frameState=t,this._targetPoints.values.length<1)return;if(this._updateAll)for(var o in this._updateAll=!1,this._targetPoints._hash){var a=this._targetPoints.get(o);this._currentTargetPoint=a,this._currentTargetName=o,Z$i(this,e,t),J$j(this,e,t)}else Z$i(this,e,t),J$j(this,e,t)}if(!t.passes.pick){var s=this._commands.length;for(o=0;o<s;o++)if(t$$(this._depthBuffers.values[o].framebuffer)){var l=this._commands.values[o];i.push(l[0]),i.push(l[1])}}}},x$p.prototype.setVisibleInViewport=function(e){if(e>8)throw new t$_("the index is 0~8");this._visibleViewport=1<<e,t$$(this._depthBuffer)&&(this._depthBuffer._visibleViewport=this._visibleViewport)},x$p.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$_("the index is 0~8");return 1<<e&this._visibleViewport},x$p.prototype.getBarrierPoint=function(e,t){var i=this._barrierPointArray.get(e);return t$$(t)&&t.bind(null,i)(),i},x$p.prototype.getObjectIds=function(){for(var e={},t=Object.keys(this._targetPoints._hash),i=0,n=t.length;i<n;i++){var r=t[i];this._scene.renderIds(this._sightlineCameras.get(r));var o=this._scene._defaultView.pickFramebuffer,a=this._scene._context,s=xe$f(this,r);if(t$$(s)){var l=a.readPixels({x:s.x,y:s.y,width:1,height:1,framebuffer:o._fb}),u=e$1z.byteToRgba(l[0],l[1],l[2],l[3]),c=a.getObjectByPickId(u);if(t$$(c)){var h=c.primitive.id;u=c.id;t$$(e[h])||(e[h]=[]),-1===e[h].indexOf(u)&&e[h].push(u)}}}return e},x$p.prototype.build=function(){""!==this._name||this._checking||(this._name="sightline"+this._scene._analyst3D._layerIndex,this._scene._analyst3D.add(this))},x$p.prototype.destroy=function(){return this.removeAllTargetPoint(),this._scene._analyst3D.remove(this._name,!0),s$1e(this)};var _0x4e7440=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2b3a6d=_0x4e7440(void 0,(function(){return _0x2b3a6d.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b3a6d).search("(((.+)+)+)+$")}));_0x2b3a6d();var He$5="attribute vec4 aPosition;\n\nuniform vec4 uDiffuseColor;\n\nvarying vec4 vColor;\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\n\n#ifdef NormalVertex\nvarying vec3 normal_vertex;\n#endif\n\nvec4 depthClampFarPlane(vec4 clipPos)\n{\n\tfWindowZ = (0.5 * (clipPos.z / clipPos.w) + 0.5) * clipPos.w;\n\tclipPos.z = min(clipPos.z, clipPos.w);\n\treturn clipPos;\n}\nvoid main()\n{\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n gl_Position = depthClampFarPlane(pos);\n clip_vertex = czm_modelView * vec4(aPosition.xyz, 1.0);\n vColor = uDiffuseColor;\n#ifdef NormalVertex\n normal_vertex = aPosition.xyz;\n#endif\n}",_0x382172=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3b9784=_0x382172(void 0,(function(){return _0x3b9784.toString().search("(((.+)+)+)+$").toString().constructor(_0x3b9784).search("(((.+)+)+)+$")}));_0x3b9784();var Ye$6="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n\nvarying vec4 vColor;\nvarying float fWindowZ;\n\n#ifdef NormalVertex\nvarying vec3 normal_vertex;\nconst vec4 LIGHT_COLOR = vec4(0.8, 0.8, 0.8, 1.0);\n#endif\n\nvoid main()\n{\n#ifdef GL_EXT_frag_depth\n\tgl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef WEBGL2\n\tgl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n gl_FragColor = vColor;\n#ifdef NormalVertex\n vec3 normal = normalize(czm_computeNormal(normal_vertex));\n vec4 eyePosition = czm_modelView * vec4(normal_vertex.xyz, 1.0);\n vec3 lightDirection = normalize(czm_sunPositionWC - vec3(eyePosition));\n float nDotL = max(dot(lightDirection, normal), 0.0);\n vec4 diffuse = vColor * LIGHT_COLOR * nDotL;\n vec4 ambient = vColor * LIGHT_COLOR;\n gl_FragColor = clamp(diffuse + ambient, vec4(0.0), vec4(1.0));\n#endif\n}",_0x3f6acc=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x346b07=_0x3f6acc(void 0,(function(){return _0x346b07.toString().search("(((.+)+)+)+$").toString().constructor(_0x346b07).search("(((.+)+)+)+$")}));_0x346b07();var Oe$8="attribute vec4 aPosition;\n\nvarying vec4 vClip_pos;\nvoid main()\n{\n\tvClip_pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n\tgl_Position = czm_depthClampFarPlane(vClip_pos);\n}",_0xf56e0b=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x51af90=_0xf56e0b(void 0,(function(){return _0x51af90.toString().search("(((.+)+)+)+$").toString().constructor(_0x51af90).search("(((.+)+)+)+$")}));_0x51af90();var Te$9="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform vec4 uVisibleAreaColor;\nuniform vec4 uHiddenAreaColor;\nuniform mat4 uRenderTextureMatrix;\nuniform vec2 uTexture1_size;\nuniform sampler2D uTexture1;\nuniform sampler2D uGlobalDepthTexture;\nuniform vec2 uGlobeTextureSize;\nvarying vec4 vClip_pos;\n\nfloat getDepth(in vec4 depth)\n{\n float z_window = czm_unpackDepth(depth);\n#ifdef LOG_DEPTH\n\t// float n_range = czm_depthRange.near;\n\t// float f_range = czm_depthRange.far;\n\t// float depthLog = (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n // depthLog = depthLog * 0.5 + 0.5;\n // return depthLog;\n // return czm_reverseLogDepth(z_window);\n#endif\n return z_window;\n}\n\nfloat getDepthFromShadowMap(in sampler2D viewShedTexture, in vec4 texCoord)\n{\n\tvec2 tCoord;\n tCoord = texCoord.xy * uTexture1_size - 0.5;\n\tfloat x0 = floor(tCoord.x);\n\tfloat x1 = ceil(tCoord.x);\n\tfloat y0 = floor(tCoord.y);\n\tfloat y1 = ceil(tCoord.y);\n\tvec2 invTexSize = 1.0 / uTexture1_size;\n\tvec2 t00 = vec2((x0 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t10 = vec2((x1 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t01 = vec2((x0 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tvec2 t11 = vec2((x1 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tfloat z00 = getDepth(texture2D(uTexture1, t00));\n\tfloat z10 = getDepth(texture2D(uTexture1, t01));\n\tfloat z01 = getDepth(texture2D(uTexture1, t10));\n\tfloat z11 = getDepth(texture2D(uTexture1, t11));\n\tfloat depth = max(max(z00, z01), max(z10, z11));\n\treturn depth;\n}\n\n#ifdef CLIPPOLYGON\nuniform sampler2D uPolygonTexture;\nuniform mat4 uPolygonTextureMatrix;\nuniform float uPolygonMode;\nbool isClipValid(vec2 texcoord)\n{\n bool keepInside = (uPolygonMode > 1.5);\n if(keepInside)\n {\n return texture2D(uPolygonTexture, texcoord).r > 0.5;\n }\n else\n {\n return texture2D(uPolygonTexture, texcoord).r < 0.5;\n }\n}\n#endif\nvoid main()\n{\n czm_writeDepthClampedToFarPlane();\n\tvec4 depthTexCoord = vClip_pos / vClip_pos.w;\n\tdepthTexCoord.xy = depthTexCoord.xy * 0.5 + 0.5;\n// #ifdef LOG_DEPTH\n// depthTexCoord.x = depthTexCoord.x * czm_viewport.z / uGlobeTextureSize.x + czm_viewport.x / uGlobeTextureSize.x;\n// depthTexCoord.y = depthTexCoord.y * czm_viewport.w / uGlobeTextureSize.y + czm_viewport.y / uGlobeTextureSize.y;\n// #endif\n\tfloat sceneDepth = czm_unpackDepth(texture2D(uGlobalDepthTexture, depthTexCoord.xy));\n// #ifdef LOG_DEPTH\n// sceneDepth = czm_reverseLogDepth(sceneDepth);\n// #endif\n\tsceneDepth = sceneDepth * 2.0 - 1.0;\n\tvec4 pos = vClip_pos;\n\tpos.z = sceneDepth * pos.w;\n\t//vec4 viewPos = czm_inverseProjection * pos;\n\tvec4 renderTextureCoord = uRenderTextureMatrix * pos;\n\tvec4 texCoord = renderTextureCoord / renderTextureCoord.w;\n\ttexCoord.xyz = texCoord.xyz * 0.5 + 0.5;\n\tfloat depth = getDepthFromShadowMap(uTexture1, texCoord);\n\tfloat dxc = abs(dFdx(texCoord.z));\n\tfloat dyc = abs(dFdy(texCoord.z));\n\tfloat dF = max(dxc, dyc) * 3.0;\n\tfloat bias = 1.0e-6 + dF;\n\tfloat c = float(depth + bias < texCoord.z);\n\tvec4 resultColor = mix(uVisibleAreaColor, uHiddenAreaColor, vec4(c));\n\tif(resultColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n#ifdef CLIPPOLYGON\n vec4 polygonTextureCoord = uPolygonTextureMatrix * pos;\n\tvec4 texCoordPolygon = polygonTextureCoord / polygonTextureCoord.w;\n\ttexCoordPolygon.xyz = texCoordPolygon.xyz * 0.5 + 0.5;\n\tif(texCoordPolygon.x < 0.0 || texCoordPolygon.x > 1.0 || texCoordPolygon.y < 0.0 || texCoordPolygon.y > 1.0)\n\t{\n\t\tdiscard;\n }\n\tif(!isClipValid(texCoordPolygon.xy))\n {\n discard;\n }\n#endif\n\tgl_FragColor = resultColor;\n\tgl_FragColor = czm_gammaCorrect(gl_FragColor);\n}",_0x7bb5e8=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x331f4e=_0x7bb5e8(void 0,(function(){return _0x331f4e.toString().search("(((.+)+)+)+$").toString().constructor(_0x331f4e).search("(((.+)+)+)+$")}));_0x331f4e();var se$8="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform vec4 uVisibleAreaColor;\nuniform vec4 uHiddenAreaColor;\nuniform vec2 uTexture1_size;\n#if TEXTURE_UNITS > 0\nuniform sampler2D uTextures[TEXTURE_UNITS];\nuniform mat4 uRenderTextureMatrixs[TEXTURE_UNITS];\n#endif\nuniform sampler2D uGlobalDepthTexture;\nuniform vec2 uGlobeTextureSize;\nuniform int textureCount;\nvarying vec4 vClip_pos;\n\nfloat getDepth(in vec4 depth)\n{\n\tfloat z_window = czm_unpackDepth(depth);\n\tfloat n_range = czm_depthRange.near;\n\tfloat f_range = czm_depthRange.far;\n\treturn (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n}\n\nfloat getDepthFromShadowMap(in sampler2D viewShedTexture, in vec4 texCoord)\n{\n\tvec2 tCoord;\n tCoord = texCoord.xy * uTexture1_size - 0.5;\n\tfloat x0 = floor(tCoord.x);\n\tfloat x1 = ceil(tCoord.x);\n\tfloat y0 = floor(tCoord.y);\n\tfloat y1 = ceil(tCoord.y);\n\tvec2 invTexSize = 1.0 / uTexture1_size;\n\tvec2 t00 = vec2((x0 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t10 = vec2((x1 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t01 = vec2((x0 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tvec2 t11 = vec2((x1 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tfloat z00 = getDepth(texture2D(viewShedTexture, t00));\n\tfloat z10 = getDepth(texture2D(viewShedTexture, t01));\n\tfloat z01 = getDepth(texture2D(viewShedTexture, t10));\n\tfloat z11 = getDepth(texture2D(viewShedTexture, t11));\n\tfloat depth = max(max(z00, z01), max(z10, z11));\n\treturn depth;\n}\n\nfloat isVisibleForOneViewShed(in sampler2D viewShedTexture, in vec4 viewPos, in mat4 renderTextureMatrix1)\n{\n vec4 renderTextureCoord = renderTextureMatrix1 * viewPos;\n\tvec4 texCoord = renderTextureCoord / renderTextureCoord.w;\n\ttexCoord.xyz = texCoord.xyz * 0.5 + 0.5;\n\n if (texCoord.x<0.0 || texCoord.x>1.0\n || texCoord.y<0.0 || texCoord.y>1.0)\n {\n return 1.0;\n }\n\n float depth = getDepthFromShadowMap(viewShedTexture, texCoord);\n depth = depth * 0.5 + 0.5;\n float dxc = abs(dFdx(texCoord.z));\n float dyc = abs(dFdy(texCoord.z));\n float dF = max(dxc, dyc) * 3.0;\n float bias = 1.0e-6 + dF;\n float c = float(depth+bias < texCoord.z);\n return c;\n}\nvoid main()\n{\n czm_writeDepthClampedToFarPlane();\n\tvec4 depthTexCoord = vClip_pos / vClip_pos.w;\n\tdepthTexCoord.xy = depthTexCoord.xy * 0.5 + 0.5;\n\tdepthTexCoord.x = depthTexCoord.x * czm_viewport.z / uGlobeTextureSize.x + czm_viewport.x / uGlobeTextureSize.x;\n\tdepthTexCoord.y = depthTexCoord.y * czm_viewport.w / uGlobeTextureSize.y + czm_viewport.y / uGlobeTextureSize.y;\n\tfloat sceneDepth = czm_unpackDepth(texture2D(uGlobalDepthTexture, depthTexCoord.xy));\n // sceneDepth = czm_reverseLogDepth(sceneDepth);\n\tsceneDepth = sceneDepth * 2.0 - 1.0;\n\tvec4 pos = vClip_pos;\n\tpos.z = sceneDepth * pos.w;\n\t//vec4 viewPos = czm_inverseProjection * pos;\n float c = isVisibleForMultiViewShed(pos);\n\tvec4 resultColor = mix(uVisibleAreaColor, uHiddenAreaColor, vec4(c));\n\tif(resultColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n\tgl_FragColor = resultColor;\n\tgl_FragColor = czm_gammaCorrect(gl_FragColor);\n}";function w$r(e){if(!t$$(e))throw new t$_("scene are required.");this._scene=e,this._globalDepthBuffer=void 0,this._cameraDepthBuffer=void 0,this._clearStencilCommand=new r$M({stencil:0}),this._clearStencilCommand.pass=we$l.ANALYSIS,this._lineCommand=void 0,this._stencilCommand=void 0,this._colorCommand=void 0,this._boundingSphere=new c$19,this._frameState=void 0,this._viewPosition=[0,0,0],this._direction=0,this._pitch=0,this._horizontalFov=90,this._verticalFov=60,this._distance=200,this._visibleAreaColor=new a$10(0,1,0,.5),this._hiddenAreaColor=new a$10(1,0,0,.5),this._hintLineColor=new a$10(1,1,1,1),this._segmentCount=20,this._invertViewMatrix=new c$1a,this._viewProjMatrix=new c$1a,this._matProj=new c$1a,this._renderTextureMatrix=new c$1a,this._update=!0,this._id=0,this._name="",this._sceneName="",this._cameraName="",this._checking=!1,this._visibleViewport=4095,this._targetPoints=[],this._multiNames=[],this._isUpdateCommand=!1,this._isShowLine=!0,this._polygonTexture=void 0,this._polygonRegions=new e$1F,this._polygonTextureMatrix=new c$1a,this._polygonViewProjMatrix=new c$1a,this._polygonUpdate=!1,this._polygonMode=L$o.KeepInside}function be$b(e){t$$(e._stencilCommand)&&(e._stencilCommand.vertexArray=e._stencilCommand.vertexArray&&e._stencilCommand.vertexArray.destroy(),e._stencilCommand.shaderProgram=e._stencilCommand.shaderProgram&&e._stencilCommand.shaderProgram.destroy(),e._stencilCommand=void 0),t$$(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0),t$$(e._lineCommand)&&(e._lineCommand.vertexArray=e._lineCommand.vertexArray&&e._lineCommand.vertexArray.destroy(),e._lineCommand.shaderProgram=e._lineCommand.shaderProgram&&e._lineCommand.shaderProgram.destroy(),e._lineCommand=void 0)}function Ie$9(e,t,i){var n=e._horizontalFov*n$1d.RADIANS_PER_DEGREE,r=e._verticalFov*n$1d.RADIANS_PER_DEGREE,o=Math.tan(.5*n)/Math.tan(.5*r);e._distance;var a=Math.max(e._distance,10),s=e._direction*n$1d.RADIANS_PER_DEGREE,l=e._pitch*n$1d.RADIANS_PER_DEGREE,u=a$11.fromDegreesArrayHeights(e._viewPosition)[0],c=i.camera,h=c.frustum.aspectRatio,d=c.frustum.fov,f=c.frustum.near,p=c.frustum.far,_=new a$11,m=c.heading,$=c.pitch,g=c$1a.clone(c.transform,g);a$11.clone(c.position,_),e._cameraDepthBuffer.isUpdate=!0;var y=i.useLogDepth,v=e._scene.globe.depthTestAgainstTerrain;e._cameraDepthBuffer._beginFunc=function(t){t.useLogDepth=!1,e._scene.globe.depthTestAgainstTerrain=!0,h=c.frustum.aspectRatio,d=c.frustum.fov,f=c.frustum.near,p=c.frustum.far,m=c.heading,$=c.pitch,g=c$1a.clone(c.transform,g),c._setTransform(c$1a.IDENTITY),a$11.clone(c.position,_),c.frustum.aspectRatio=o,c.frustum.fov=n,c.frustum.near=1,c.frustum.far=a+100,c.setView({destination:u,orientation:{heading:s,pitch:l,roll:c.roll}}),c$1a.multiply(c.frustum.projectionMatrix,c.viewMatrix,e._viewProjMatrix),c$1a.clone(c.inverseViewMatrix,e._invertViewMatrix),c$1a.clone(c.frustum.projectionMatrix,e._matProj),a$11.clone(a$11.ZERO,e._boundingSphere.center),e._boundingSphere.radius=e._distance,c$19.transform(e._boundingSphere,e._invertViewMatrix,e._boundingSphere)},e._cameraDepthBuffer._endFunc=function(t){c.setView({destination:_,orientation:{heading:m,pitch:$,roll:c.roll},convert:!1}),c.frustum.aspectRatio=h,c.frustum.fov=d,c.frustum.near=f,c.frustum.far=p,c._setTransform(g),e._cameraDepthBuffer.isUpdate=!1,t.useLogDepth=y,e._scene.globe.depthTestAgainstTerrain=v},t$$(e._globalDepthBuffer)&&(e._globalDepthBuffer.isUpdate=!0,e._globalDepthBuffer._beginFunc=function(t){e._scene.globe.depthTestAgainstTerrain=!0,t.useLogDepth=!1;var i=a$11.distance(c.positionWC,e._boundingSphere.center),n=i<e._boundingSphere.radius?2:i-e._boundingSphere.radius,r=i+e._boundingSphere.radius;c.frustum.near=n,c.frustum.far=r,e._globalDepthProjMatrix=c.frustum.projectionMatrix,e._globalDepthProjMatrixInv=c$1a.inverse(e._globalDepthProjMatrix,new c$1a);var o=c$1a.multiply(c.inverseViewMatrix,e._globalDepthProjMatrixInv,new c$1a);c$1a.multiply(e._viewProjMatrix,o,e._renderTextureMatrix),t$$(e._polygonViewProjMatrix)&&c$1a.multiply(e._polygonViewProjMatrix,o,e._polygonTextureMatrix)},e._globalDepthBuffer._endFunc=function(t){t.useLogDepth=y,c.frustum.near=f,c.frustum.far=p,e._scene.globe.depthTestAgainstTerrain=v})}function ze$6(e,t,i){var n=(e._segmentCount+1)*(e._segmentCount+1)+1,r=C$12.createTypedArray(C$12.FLOAT,3*n),o=3,a=e._horizontalFov*n$1d.RADIANS_PER_DEGREE,s=e._verticalFov*n$1d.RADIANS_PER_DEGREE,l=(Math.tan(.5*a),Math.tan(.5*s));e._distance;var u=e._distance*l,c=Math.PI-.5*a,h=0,d=0,f=a/e._segmentCount;e._targetPoints.length=0;for(var p=0;p<e._segmentCount+1;p++){h=c+p*f;for(var _=u/(e._distance/Math.cos(h)),m=Math.atan(_),$=-m,g=2*m/e._segmentCount,y=new t$s,v=0;v<e._segmentCount+1;v++){d=$+v*g;var x=e._distance*Math.cos(d)*Math.sin(h),b=e._distance*Math.sin(d),S=e._distance*Math.cos(d)*Math.cos(h);r[o++]=x,r[o++]=b,r[o++]=S,y.add(new s$w(x,b,S))}e._targetPoints.push(y)}e._targetPoints.reverse();var w=2*(4+5*e._segmentCount+2*e._segmentCount*3),C=e._segmentCount*e._segmentCount*3*2+3*e._segmentCount*4,T=C$12.createTypedArray(C$12.UNSIGNED_SHORT,w),P=C$12.createTypedArray(C$12.UNSIGNED_SHORT,C),E=0;for(p=0;p<e._segmentCount;p++)for(v=0;v<e._segmentCount;v++)P[E++]=1+p+v*(e._segmentCount+1),P[E++]=1+p+1+v*(e._segmentCount+1),P[E++]=1+p+(v+1)*(e._segmentCount+1),P[E++]=1+p+1+v*(e._segmentCount+1),P[E++]=1+p+1+(v+1)*(e._segmentCount+1),P[E++]=1+p+(v+1)*(e._segmentCount+1);for(p=0;p<e._segmentCount;p++)P[E++]=p+1+1,P[E++]=p+1,P[E++]=0,P[E++]=0,P[E++]=p+e._segmentCount*(e._segmentCount+1)+1,P[E++]=p+1+e._segmentCount*(e._segmentCount+1)+1;for(p=0;p<e._segmentCount;p++)P[E++]=0,P[E++]=p*(e._segmentCount+1)+1,P[E++]=(p+1)*(e._segmentCount+1)+1,P[E++]=e._segmentCount+(p+1)*(e._segmentCount+1)+1,P[E++]=e._segmentCount+p*(e._segmentCount+1)+1,P[E++]=0;E=0,T[E++]=0,T[E++]=1,T[E++]=0,T[E++]=e._segmentCount+1,T[E++]=0,T[E++]=e._segmentCount*(e._segmentCount+1)+1,T[E++]=0,T[E++]=(e._segmentCount+1)*(e._segmentCount+1);for(p=0;p<5;p++)for(v=0;v<e._segmentCount;v++)T[E++]=1+v+5*(e._segmentCount+1)*p,T[E++]=1+(v+1)+5*(e._segmentCount+1)*p;for(p=0;p<5;p++)for(v=0;v<e._segmentCount;v++)T[E++]=1+(e._segmentCount+1)*v+5*p,T[E++]=1+(e._segmentCount+1)*(v+1)+5*p;var A=u$Y.createVertexBuffer({context:t,typedArray:r,usage:A$13.STATIC_DRAW}),L=[],M={aPosition:0};L.push({index:M.aPosition,vertexBuffer:A,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var I=u$Y.createIndexBuffer({context:t,typedArray:T,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT}),O=u$Y.createIndexBuffer({context:t,typedArray:P,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT});e._lineCommand=new s$1d({primitiveType:H$11.LINES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:we$l.ANALYSIS,owner:e,cull:!0}),e._lineCommand.vertexArray=new x$18({context:t,attributes:L,indexBuffer:I}),e._lineCommand.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:He$5,fragmentShaderSource:Ye$6,attributeLocations:M}),e._lineCommand.renderState=p$1a.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},blending:Ee$s.ALPHA_BLEND});var D=[];for(p=0;p<6;p++)D[p]=new a$10(0,0,0,0);e._lineCommand.uniformMap={uDiffuseColor:function(){return e._hintLineColor},clip_mode:function(){return 0},clip_planes:function(){return D},clip_line_color:function(){return a$10.UNIT_W}},e._stencilCommand=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:we$l.ANALYSIS,owner:e,cull:!0}),e._stencilCommand.vertexArray=new x$18({context:t,attributes:L,indexBuffer:O}),e._stencilCommand.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:He$5,fragmentShaderSource:Ye$6,attributeLocations:M}),e._stencilCommand.renderState=p$1a.fromCache({depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0,func:Re$h.GREATER},stencilTest:{enabled:!0,frontFunction:h$N.ALWAYS,frontOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.INCREMENT_WRAP},backFunction:h$N.ALWAYS,backOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.DECREMENT_WRAP},reference:0,mask:65535}}),e._stencilCommand.uniformMap={uDiffuseColor:function(){return a$10.UNIT_W},clip_mode:function(){return 0},clip_planes:function(){return D},clip_line_color:function(){return a$10.UNIT_W}},e._colorCommand=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:we$l.ANALYSIS,owner:e,cull:!0}),e._colorCommand.vertexArray=new x$18({context:t,attributes:L,indexBuffer:O});var R=void 0,N=new a$O({name:"ViewShedAnalysisVp",sources:[Oe$8]});if(e._multiNames.length>1){let t=se$8.indexOf("void main");var F="float isVisibleForMultiViewShed(vec4 viewPos) {\n float c = 1.0;\n #if TEXTURE_UNITS > 0\n";for(let t=0;t<e._multiNames.length;t++)F+=` c = isVisibleForOneViewShed(uTextures[${t}], viewPos, uRenderTextureMatrixs[${t}]);\n if(c == 0.0 || textureCount == 1)\n {\n return c;\n }\n`;F+=" #endif\n return c;\n }",R=new a$O({sources:[se$8.slice(0,t)+F+se$8.slice(t)],defines:["TEXTURE_UNITS "+e._multiNames.length]})}else R=new a$O({sources:[Te$9]});e._colorCommand.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:N,fragmentShaderSource:R,attributeLocations:M}),e._colorCommand.renderState=p$1a.fromCache({cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,stencilTest:{enabled:!0,frontFunction:h$N.NOT_EQUAL,frontOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.DECREMENT_WRAP},backFunction:h$N.NOT_EQUAL,backOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.DECREMENT_WRAP},reference:0,mask:65535},blending:Ee$s.ALPHA_BLEND}),e._multiNames.length<=1?e._colorCommand.uniformMap={uVisibleAreaColor:function(){return e._visibleAreaColor},uHiddenAreaColor:function(){return e._hiddenAreaColor},uRenderTextureMatrix:function(){return e._renderTextureMatrix},uTexture1_size:function(){var t=e._cameraDepthBuffer.depthTexture;return new r$T(t.width,t.height)},uTexture1:function(){return e._cameraDepthBuffer.depthTexture},uGlobalDepthTexture:function(){return e._globalDepthBuffer.depthTexture},uGlobeTextureSize:function(){return new r$T(e._globalDepthBuffer.depthTexture.width,e._globalDepthBuffer.depthTexture.height)},uPolygonTexture:function(){return e._polygonTexture},uPolygonMode:function(){return e._polygonMode},uPolygonTextureMatrix:function(){return e._polygonTextureMatrix}}:e._isUpdateCommand=!0}function Fe$6(e,t,i,n){if(t$$(i)&&!t$$(i._command)){var r=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:e._invertViewMatrix});i._command=r;var o={position:0};r.vertexArray=x$18.fromGeometry({context:t,geometry:i._geometry,attributeLocations:o,bufferUsage:A$13.STATIC_DRAW,interleave:!0});var a=new a$O({sources:["attribute vec4 position;\nvoid main()\n{\n gl_Position = czm_modelViewProjection * vec4(position.xyz, 1.0);\n}\n"]}),s=new a$O({sources:["void main()\n{\n gl_FragColor = vec4(1.0);\n}\n"]});r.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:o}),r.framebuffer=new u$F({context:t,colorTextures:[n],destroyAttachments:!1}),r.renderState=p$1a.fromCache({cull:{enabled:!1}})}}function Ge$4(e,t,i){if(e._polygonUpdate&&0!==e._polygonRegions.length){e._polygonUpdate=!1;var n=new r$M({color:new e$1z(0,0,0,0),depth:1});n.framebuffer=new u$F({context:t,colorTextures:[e._polygonTexture],destroyAttachments:!1}),n.renderState=p$1a.fromCache(),n.execute(t);for(var r=0;r<e._polygonRegions.values.length;r++){var o=e._polygonRegions.values[r];Fe$6(e,t,o,e._polygonTexture),o._command.execute(t)}n.framebuffer.destroy()}}Object.defineProperties(w$r.prototype,{viewPosition:{get:function(){return this._viewPosition},set:function(e){this._viewPosition=e,this._update=!0}},direction:{get:function(){return this._direction},set:function(e){this._direction=e,this._update=!0}},pitch:{get:function(){return this._pitch},set:function(e){this._pitch=e,this._update=!0}},horizontalFov:{get:function(){return this._horizontalFov},set:function(e){this._horizontalFov=e,this._update=!0}},verticalFov:{get:function(){return this._verticalFov},set:function(e){this._verticalFov=e,this._update=!0}},distance:{get:function(){return this._distance},set:function(e){if(e<=0)throw new t$_("the distance is greater than 0.0");this._distance=e,this._update=!0}},visibleAreaColor:{get:function(){var e=new e$1z;return e.red=this._visibleAreaColor.x,e.green=this._visibleAreaColor.y,e.blue=this._visibleAreaColor.z,e.alpha=this._visibleAreaColor.w,e},set:function(e){this._visibleAreaColor.x=e.red,this._visibleAreaColor.y=e.green,this._visibleAreaColor.z=e.blue,this._visibleAreaColor.w=e.alpha}},hiddenAreaColor:{get:function(){var e=new e$1z;return e.red=this._hiddenAreaColor.x,e.green=this._hiddenAreaColor.y,e.blue=this._hiddenAreaColor.z,e.alpha=this._hiddenAreaColor.w,e},set:function(e){this._hiddenAreaColor.x=e.red,this._hiddenAreaColor.y=e.green,this._hiddenAreaColor.z=e.blue,this._hiddenAreaColor.w=e.alpha}},hintLineColor:{get:function(){var e=new e$1z;return e.red=this._hintLineColor.x,e.green=this._hintLineColor.y,e.blue=this._hintLineColor.z,e.alpha=this._hintLineColor.w,e},set:function(e){this._hintLineColor.x=e.red,this._hintLineColor.y=e.green,this._hintLineColor.z=e.blue,this._hintLineColor.w=e.alpha}},isShowLine:{get:function(){return this._isShowLine},set:function(e){this._isShowLine=e}}}),w$r.prototype.destroy=function(){return t$$(this._frameState)&&(t$$(this._globalDepthBuffer)&&delete this._frameState._framebufferList[this._sceneName],t$$(this._cameraDepthBuffer)&&delete this._frameState._framebufferList[this._cameraName],this._frameState=void 0),this._globalDepthBuffer=this._globalDepthBuffer&&this._globalDepthBuffer.destroy(),this._cameraDepthBuffer=this._cameraDepthBuffer&&this._cameraDepthBuffer.destroy(),be$b(this),this._clearStencilCommand=void 0,this._scene.farToNearRatio=1e3,this._scene._analyst3D.remove(this._name,!0),t$$(this._polygonTexture)&&(this._polygonTexture.destroy(),this._polygonTexture=null),s$1e(this)},w$r.prototype.clear=function(){this._scene._analyst3D.remove(this._name,!1)},w$r.prototype.build=function(){""!==this._name||this._checking||(this._name="viewshed3d"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_global",this._cameraName=this._name+"_camera",this._scene._analyst3D.add(this))},w$r.prototype.setDistDirByPoint=function(e){if(e[0]===this._viewPosition[0]&&e[1]===this._viewPosition[1]&&e[2]===this._viewPosition[2])throw new t$_("the position is [longitude, latitude ,height] and is not equals viewPosition");var t,i,n=this._scene._frameState.camera,r=n._projection;if(this._scene.mode===b$1d.SCENE3D)t=a$11.fromDegreesArrayHeights(e)[0],i=a$11.fromDegreesArrayHeights(this._viewPosition)[0];else{var o=i$1g.fromDegrees(e[0],e[1],e[2]);t=r.project(o,new a$11);var a=i$1g.fromDegrees(this._viewPosition[0],this._viewPosition[1],this._viewPosition[2]);i=r.project(a,new a$11)}var s=new a$11;a$11.subtract(t,i,s);var l=a$11.magnitude(s);a$11.normalize(s,s),this.distance=l;var u=n.heading,c=n.pitch,h=n.roll,d=new a$11;a$11.clone(n.position,d);var f=s.clone(),p=i.clone();p=a$11.normalize(p,p),Math.abs(a$11.dot(p,f))>=1&&(p=Math.abs(a$11.dot(f,a$11.UNIT_Y))<1?a$11.clone(a$11.UNIT_Y,p):a$11.clone(a$11.UNIT_Z,p));var _=new a$11;a$11.cross(p,f,_),_=a$11.normalize(_,_),a$11.cross(f,_,p),p=a$11.normalize(p,p),n.setView({destination:i,orientation:{direction:f,up:p},convert:!1}),this.direction=n.heading*n$1d.DEGREES_PER_RADIAN,this.pitch=n.pitch*n$1d.DEGREES_PER_RADIAN,n.setView({destination:d,orientation:{heading:u,pitch:c,roll:h},convert:!1})},w$r.prototype.update=function(e,t,i){if("normal"===t._fboState.name&&!t.passes.pick){if(t._fboState.enabled&&(t._fboState.name===this._sceneName||t._fboState.name===this._cameraName))return void(t._fboState.name===this._sceneName&&t$$(this._stencilCommand)&&i.push(this._stencilCommand));if(!t.camera.bReflect&&(this._update&&(this._frameState=t,t$$(this._cameraDepthBuffer)||(this._cameraDepthBuffer=new n$m(e),this._cameraDepthBuffer.environmentVisible.isObjectVisible=!0,this._cameraDepthBuffer.environmentVisible.isGlobalVisible=!0,this._cameraDepthBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._cameraName]=this._cameraDepthBuffer),t$$(this._globalDepthBuffer)||(this._globalDepthBuffer=new n$m(e),this._globalDepthBuffer.environmentVisible.isObjectVisible=!0,this._globalDepthBuffer.environmentVisible.isGlobalVisible=!0,this._globalDepthBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._sceneName]=this._globalDepthBuffer),this._update=!1,be$b(this),Ie$9(this,e,t),ze$6(this,e)),t$$(this._cameraDepthBuffer.framebuffer))){var n=i.pop();!t$$(n)||(t$$(this._clearStencilCommand)&&i.push(this._clearStencilCommand),t$$(this._stencilCommand)&&i.push(this._stencilCommand),t$$(this._colorCommand)&&i.push(this._colorCommand),t$$(this._lineCommand)&&this._isShowLine&&i.push(this._lineCommand),i.push(n))}}},w$r.prototype.setVisibleInViewport=function(e){if(e>8)throw new t$_("the index is 0~8");this._visibleViewport=1<<e,t$$(this._cameraDepthBuffer)&&(this._cameraDepthBuffer._visibleViewport=this._visibleViewport)},w$r.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$_("the index is 0~8");return 1<<e&this._visibleViewport},w$r.prototype.getViewshedParameter=function(){for(var e=[],t=this._invertViewMatrix,i=0,n=this._targetPoints.length;i<n;i++){for(var r=this._targetPoints[i].pntArray,o=new t$s,a=0,s=r.length;a<s;a++){var l=this.getBarrierPoint(r[a]);if(t$$(l))o.add(l);else{var u=c$1a.multiplyByPoint(t,r[a],new a$11),c=i$1g.fromCartesian(u),h=c.longitude*n$1d.DEGREES_PER_RADIAN,d=c.latitude*n$1d.DEGREES_PER_RADIAN;o.add(new s$w(h,d,c.height))}}e.push(o)}return{viewPosition:new s$w(this._viewPosition[0],this._viewPosition[1],this._viewPosition[2]),point3DList:e,distance:this._distance}};var Ue$5=new a$10(1/255,1/65025,1/160581375,1/4228250625);function je$6(e,t){for(var i=a$11.fromDegreesArrayHeights(t),n=new S$C({polygonHierarchy:{positions:i},vertexFormat:{bitangent:!1,color:!1,normal:!1,position:!0,st:!1,tangent:!1},perPositionHeight:!0}),r=S$C.createGeometry(n),o=a$11.fromDegreesArrayHeights(t),a=s$1p.fromCartesianArray(o),s=[],l=1;l<i.length-1;l++)s.push(0),s.push(l),s.push(l+1);r.indices=s;var u=new c$1a;c$1a.inverse(e._invertViewMatrix,u),u$U.updateGeometry(r,t,u);var c=new u$U;return c._geometry=r,c._rectangle=a,c}function me$c(e,t){if(t$$(e._colorCommand)){var i=e._scene._context,n=e._colorCommand.shaderProgram.fragmentShaderSource,r=e._colorCommand.shaderProgram.vertexShaderSource,o=n.defines.indexOf("CLIPPOLYGON");t?o<0&&n.defines.push("CLIPPOLYGON"):o>=0&&n.defines.splice(o,1),e._colorCommand.shaderProgram.destroy(),e._colorCommand.shaderProgram=p$15.fromCache({context:i,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:e._attributeLocations})}}w$r.prototype.getBarrierPoint=function(e){var t=new a$10(e.x,e.y,e.z,1);if(c$1a.multiplyByVector(this._matProj,t,t),a$10.divideByScalar(t,t.w,t),!(t.x>1||t.x<-1||t.y>1||t.y<-1)){var i=this._scene.context,n=i.drawingBufferWidth,r=i.drawingBufferHeight,o=(.5*t.x+.5)*n-.5,a=(.5*t.y+.5)*r-.5;if(!(o<0||a<0)){for(var s=Math.floor(o),l=o-s,u=Math.floor(a),c=a-u,h=i.readPixels({framebuffer:this._cameraDepthBuffer.framebuffer,x:s,y:u,width:2,height:2}),d=new a$10,f=[],p=0;p<4;p++){var _=a$10.unpack(h,4*p,d);if(f[p]=2*a$10.dot(_,Ue$5)-1,!(f[p]<1&&f[p]>0))return}var m=(1-c)*((1-l)*f[0]+l*f[1])+c*((1-l)*f[2]+l*f[3]);if(t.z-m>1e-6){var $=new c$1a;c$1a.inverse(this._viewProjMatrix,$),t.z=m,c$1a.multiplyByVector($,t,t),a$10.divideByScalar(t,t.w,t);var g=i$1g.fromCartesian(t);return new s$w(g.longitude*n$1d.DEGREES_PER_RADIAN,g.latitude*n$1d.DEGREES_PER_RADIAN,g.height)}}}},w$r.prototype._setMultiViewShedNames=function(e){if(this._multiNames.length!=e.length)return this._update=!0,void(this._multiNames=e);for(var t=0;t<this._multiNames.length;t++)if(this._multiNames[t]!=e[t])return this._update=!0,void(this._multiNames=e)},w$r.prototype.addClipRegion=function(e){var t=e.name,i=e.position;if(!t$$(t)||!t$$(i))return!1;if(t$$(this._polygonRegions.get(t)))return!1;var n=this._scene._context.drawingBufferWidth,r=this._scene._context.drawingBufferHeight;t$$(this._polygonTexture)||(this._polygonTexture=new P$S({context:this._scene._context,width:n,height:r}));var o=je$6(this,i);this._polygonRegions.set(t,o),this._polygonUpdate=!0;var a=this._frameState.camera,s=o._rectangle,l=new a$11,u=a.heading,c=a.pitch,h=a._positionCartographic.height;a$11.clone(a.position,l),a.setView({destination:a$11.fromRadians(s.west+.5*s.width,s.south+.5*s.height,h+1e3)}),c$1a.multiply(a.frustum.projectionMatrix,a.viewMatrix,this._polygonViewProjMatrix),this._scene._context.uniformState.update(this._frameState),Ge$4(this,this._scene._context,this._frameState),me$c(this,!0),a.setView({destination:l,orientation:{heading:u,pitch:c,roll:a.roll}})},w$r.prototype.removeClipRegion=function(e){return!!this._polygonRegions.remove(e)&&(this._polygonUpdate=!0,0===this._polygonRegions.values.length&&me$c(this,!1),!0)},w$r.prototype.removeAllClipRegion=function(){for(var e=0;e<this._polygonRegions.values.length;e++)this._polygonRegions.values[e].destroy(),this._polygonRegions.values[e]=null;this._polygonRegions.removeAll(),this._polygonUpdate=!0,me$c(this,!1)},w$r.prototype.setClipMode=function(e){this._polygonMode=e};var _0x2e60e9=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x14ec3c=_0x2e60e9(void 0,(function(){return _0x14ec3c.toString().search("(((.+)+)+)+$").toString().constructor(_0x14ec3c).search("(((.+)+)+)+$")}));_0x14ec3c();var _0x74832c=function(e){e=e||{},this._scene=e.scene,this._name=e.name,this._layerConfigs=new e$1F,this._s3mLayers=new e$1F,this._s3mURLs=[],this._associatedFieldName=void 0,this._resetVisible=!1,this._associatedLayerIds=[],this._visible=e$1Y(e.isVisible,!0)};Object.defineProperties(_0x74832c.prototype,{size:{get:function(){return this._s3mLayers.length}},associatedField:{get:function(){return this._associatedFieldName},set:function(e){this._associatedFieldName=e}},visible:{get:function(){return this._visible},set:function(e){for(var t in this._visible=e,this._s3mLayers._hash){this._s3mLayers.get(t).visible=e}}}}),_0x74832c.prototype.getLayer=function(e){return this._s3mLayers._array[e]},_0x74832c.prototype.getSubLayer=function(e){var t,i=c$18.defer();if(!t$$(e))throw new t$_("name is required.");for(var n in this._layerConfigs._hash){var r=this._layerConfigs.get(n);if(r.name===e){if(r.ready){t=this._s3mLayers.get(n);break}t=this._scene.addS3MTilesLayerByScp(n+"?t=1",r,r.index,!0),r.ready=!0;break}}return t$$(t)?c$18(t,(function(e){i.resolve(e)})):i.resolve(),i.promise},_0x74832c.prototype.findByIndex=function(e){if(!t$$(e))throw new t$_("index is required.");if(e>this._s3mLayers.length-1)throw new t$_("index is out of bounds.");return this._s3mLayers._array[e]},_0x74832c.prototype.releaseSelection=function(){},_0x74832c.prototype.remove=function(e,t){if(t=e$1Y(t,!0),!t$$(e))return!1;var i,n;for(var r in this._s3mLayers._hash){var o=this._s3mLayers.get(r);if(o.name===e){i=r,n=o;break}}return t$$(i)?(this._s3mLayers.remove(i),t&&n.destroy(),!0):void 0};var _0x24fca4=.25,_0x2e8600=64,_0x207037=2,_0x38a24c=6378137,_0x1a6cc4=2*_0x38a24c*Math.PI*_0x24fca4/(_0x2e8600*_0x207037),_0x1cc6d2=2;function _0x1f7cf0(e,t,i){return _0x1a6cc4/(1<<t)*e.context.drawingBufferHeight/(i*e.camera.frustum.sseDenominator)}function _0x216e1f(e,t,i){e._scene.addS3MTilesLayerByScp(t+"?t=1",i,i.index,!0).then((function(n){if(t$$(n)){if(n.visible=e.visible,e._s3mLayers.set(t,n),t$$(i.historyCommands)){for(var r=0,o=i.historyCommands.length;r<o;r++)n[i.historyCommands[r].func].apply(n,i.historyCommands[r].arguments);n._historyCommands=i.historyCommands}if(t$$(e._associatedFieldName)&&("attribute"===n._attributeExtentName?(n._queryFieldNames=[e._associatedFieldName],n._layerScheduler._indexedDBSetting.isAttributesSave=!0):n._layerScheduler._downloadAttributes(),n._layerScheduler._associatedFieldName=e._associatedFieldName),e._associatedLayerIds.length>0){var a=void 0;for(r=0;r<e._associatedLayerIds.length;r++)if(t$$(a=e._associatedLayerIds[r].fineLayer)&&a===n.name){n._layerScheduler._isFineLayer=!0;break}n._layerScheduler._isFineLayer=!0}}}))}_0x74832c.prototype.setSelection=function(e,t,i,n){for(var r=!1,o=this._s3mURLs.length-1;o>=0;o--)if(t$$(this._s3mURLs[o])){var a=this._s3mLayers.get(this._s3mURLs[o]);!t$$(a)||(a.id===i&&a.selectEnabled&&a.name===n?(a.setSelection(e,t),r=!0):a.releaseSelection())}return r},_0x74832c.prototype.releaseSelection=function(){for(var e=this._s3mURLs.length-1;e>=0;e--)if(t$$(this._s3mURLs[e])){var t=this._s3mLayers.get(this._s3mURLs[e]);!t$$(t)||t.releaseSelection()}},_0x74832c.prototype.getSelection=function(){for(var e=[],t=this._s3mURLs.length-1;t>=0;t--)if(t$$(this._s3mURLs[t])){var i=this._s3mLayers.get(this._s3mURLs[t]);!t$$(i)||(e=e.concat(i.getSelection()))}return e},_0x74832c.prototype.update=function(e,t,i,n){var r=this,o=this._layerConfigs;for(var a in o._hash){var s=o.get(a),l=t.camera.positionWC,u=c$19.fromRectangle3D(s.layerBounds),c=a$11.distance(u.center,l);c>u.radius&&(c-=u.radius);for(var h=Math.max(s.layerBounds.width,s.layerBounds.height),d=0,f=Math.PI;f>h;)f*=.5,d++;var p=_0x1f7cf0(t,d-=1,c)<_0x1cc6d2;if(s.ready){var _=r._s3mLayers.get(a);if(!t$$(_))return;p?(t$$(_._flattenTexture)||t$$(_._excavationTexture)?_.refresh():(r.remove(_._name,!0),s.historyCommands=_._historyCommands,s.ready=!1),r._resetVisible=!0):_.update(e,t,i,n)}else p||(_0x216e1f(this,a,s),s.ready=!0)}},_0x74832c.prototype.render=function(e,t){for(var i=void 0,n={},r={},o=this._s3mURLs.length-1;o>=0;o--)if(t$$(this._s3mURLs[o])){var a=this._s3mLayers.get(this._s3mURLs[o]);if(t$$(a)){if(this._resetVisible){var s=[];for(var l in a._layerScheduler._attributes){t$$(n[a._layerScheduler._attributes[l][this._associatedFieldName]])&&s.push(l)}if(a.setObjsVisible(s,!1),this._associatedLayerIds.length>0){var u,c=void 0;for(u=0;u<this._associatedLayerIds.length&&(!t$$(c=this._associatedLayerIds[u].coarseLayer)||c!==a.name);u++)c=void 0;if(t$$(c)){var h=[];for(var l in r){var d=this._associatedLayerIds[u].idMapping[l];t$$(d)&&h.push(d)}a.setObjsVisible(h,!1)}}this._resetVisible=!1}if(a._fileType===c$q.OSGBFile&&t$$(this._associatedFieldName)&&t$$(i)){var f=n$1d.toDegrees(i.east),p=n$1d.toDegrees(i.north),_=n$1d.toDegrees(i.south),m=n$1d.toDegrees(i.west),$=[m,p,0,f,p,0,f,_,0,m,_,0,m,p,0];a.addFlattenRegion({position:$,name:"flatten"})}if(a.render(e,t),i=a._layerBounds,a._layerScheduler._objectIdChange){for(var g in a._layerScheduler._entityObjectId){var y=a._layerScheduler._entityObjectId[g];for(var l in y)n[y[l]]=l}for(var g in a._layerScheduler._entityModelId){y=a._layerScheduler._entityModelId[g];for(var l in y)r[l]=l}this._resetVisible=!0,a._layerScheduler._objectIdChange=!1}}}},_0x74832c.prototype.destroy=function(){for(var e=this._s3mURLs.length-1;e>=0;e--)if(t$$(this._s3mURLs[e])){var t=this._s3mLayers.get(this._s3mURLs[e]);t$$(t)&&t.destroy()}return s$1e(this)};const T$o=1048576;var h$l=function(){this._layers=new e$1F,this._layerQueue=[],this._layerIndex=3,this._selectedLayer=void 0,this._clampLayerIndex=Number.MAX_VALUE,this._allTextOverlap=[],this._lastId2RectangleCount=0,this._s3mLayerAddedIndex=0,this._processingTiles=[],this._replacementList=new s$15,this._replacementSentinel=this._replacementList.add(),this._maxMemory=2048,this._maxMemoryInBytes=this._maxMemory*T$o,this._cacheBytes=this._maxMemory*T$o};Object.defineProperties(h$l.prototype,{layerQueue:{get:function(){return this._layerQueue}}}),h$l.prototype._setCacheMemory=function(e){this._cacheBytes=e*T$o},h$l.prototype._setMaxMemory=function(e){this._maxMemory=e,this._maxMemoryInBytes=this._maxMemory*T$o};var k$n=function(e,t){return e.priority-t.priority},O$i=function(e,t){return e._disFromCamera-t._disFromCamera};function q$m(e){for(let t=0,i=e.length;t<i;t++){const i=e[t];i._adjustedLodRangeScale=Math.min(1.02*i._adjustedLodRangeScale,1e4)}}function D$o(e){for(let t=0,i=e.length;t<i;t++){const i=e[t];i._adjustedLodRangeScale=Math.max(i._adjustedLodRangeScale/1.02,i._lodRangeScale)}}function M$q(e,t,i){if((t=n$1d.clamp(t,0,e.length-1))===(i=n$1d.clamp(i,0,e.length-1)))return!1;var n=e[t];return e[t]=e[i],e[i]=n,!0}h$l.prototype._processTiles=function(e){const t=e.context;e.processingTiles.sort(O$i);const i=this._maxMemoryInBytes,n=i+.5*i,r=e.processingTiles;let o=!1;for(let t=0,i=r.length;t<i;t++){const i=r[t];o=i.transformResource(e,i.layer,n)}const a=this._layerQueue;t.memorySize<i?D$o(a):o&&r.length>0&&q$m(a),this._processingTiles.length=0},h$l.prototype.update=function(e,t,i,n){_0x51a186.update(e);var r=this._layerQueue,o=this._layerQueue.length;this._replacementList.splice(this._replacementList.tail,this._replacementSentinel),t.replacementList=this._replacementList,t.processingTiles=this._processingTiles;var a=0,s=[];for(a=0;a<o;a++){var l=r[a];if(t$$(l)){if(l instanceof _0x74832c)for(var u=r[a],c=0;c<u._s3mLayers._array.length;c++){if(l=u._s3mLayers._array[c],t.multiViewportIndex>-1)if(!l.getVisibleInViewport(t.multiViewportIndex))continue;if(t$$(n)&&!0===n){if(l._fileType===c$q.IconPoint||l._fileType===c$q.Text){l.update(e,t,i,n);continue}if(l._fileType!=c$q.ClampGroundRealtimeRasterCache){if(t.multiViewportIndex>-1&&!l.getVisibleInViewport(t.multiViewportIndex))continue;continue}s.push(l.id)}}if(l=r[a],t.multiViewportIndex>-1)if(!l.getVisibleInViewport(t.multiViewportIndex))continue;if(t$$(n)&&!0===n){if(l._fileType===c$q.IconPoint||l._fileType===c$q.Text){l.update(e,t,i,n);continue}if(l._fileType!=c$q.ClampGroundRealtimeRasterCache){if(t.multiViewportIndex>-1&&!l.getVisibleInViewport(t.multiViewportIndex))continue;continue}s.push(l.id)}else if(l._fileType===c$q.ClampGroundRealtimeRasterCache||l._fileType===c$q.IconPoint||l._fileType===c$q.Text)continue;var h=t._fboState.frameBufferType;if(h==B$y.NORMAL_AND_DEPTH){if(!t$$(l._wireFrameType)||!l.isSilhouette())continue}else if(h==B$y.POSTEFFECT_FILTER){if(!t$$(l.bloomEnable)||!l.bloomEnable)continue}else if(!(h!=B$y.CLAMP||t$$(l._section)&&l._section))continue;l.update(e,t,i)}}f$v.update(e),oo$1.update(e.memorySize),t.requests.sort(k$n);var d=performance.now();for(a=0,c=t.requests.length;a<c;a++){var f=t.requests[a];if(f.owner.loadEntity(f.entity),performance.now()-d>5)break}return t.requests.length=0,this._processTiles(t),s},h$l.prototype.updateTextVisible=function(e,t){if(0!=this._allTextOverlap.length){for(var i=this._layerQueue,n=this._layerQueue.length,r=0;r<n;r++){var o=i[r];(o._fileType===c$q.Text||o._fileType===c$q.IconPoint)&&_0x53605a.addPotentialVisibiltyChangedLayer(o.name)}var a=t.camera._scene.overlapDisplayOptions,s=a&&a.allowIconWithTextDisplay,l=t.camera._scene._overlapDisplayedThreshold;_0x53605a.meetVisible(this._allTextOverlap,l,s),_0x53605a.setVisibiltyChangedToLayer(this,s),_0x53605a.resetVisibleChangedQueue(),this._allTextOverlap=[]}},h$l.prototype._freeResource=function(e){for(var t=e.context,i=this._replacementList.head,n=this._cacheBytes;i!==this._replacementSentinel&&t.memorySize>n;){var r=i.item,o=r.layer;if(i=i.next,this._replacementList.remove(r._replacementNode),r._isRootTile&&o.residentRootTile)r._replacementNode=null;else{var a={geoSize:0,texSize:0};r.memoryUsageEx(a),oo$1._memGeometryRemoved(a.geoSize),r.destroy(e,!1)}}},h$l.prototype.endFrame=function(e){if(De$e.GetUnusedSize()>0&&De$e.DeleteUnusedTextures(),e.lightSource.hasChange()){var t=e.lightSource._changedLightList._hash;this.lightSourceChanged(t),e.lightSource.resetChange()}for(var i=this._layerQueue,n=this._layerQueue.length,r=performance.now(),o=0;o<n;o++){var a=i[o];if(a instanceof _0x74832c){var s=a._scene.context;for(let e=0;e<a._s3mLayers.length;e++){var l=a._s3mLayers.values[e];t$$(s._subTextureManager)&&s._subTextureManager.processRequests(l)}}else a._isS3MBlock&&a._context._subTextureManager&&a._context._subTextureManager.processRequests(a);if(performance.now()-r>5)break}_0xb658ed.processTasks(),e.passes.offscreen||this._freeResource(e)},h$l.prototype.render=function(e,t){var i=this._layerQueue,n=this._layerQueue.length,r=0;for(r=0;r<n;r++){var o=i[r];if(t$$(o)){if(t.multiViewportIndex>-1)if(!o.getVisibleInViewport(t.multiViewportIndex))continue;o.render(e,t)}}},h$l.prototype._setSelection=function(e){var t=e.primitive.id,i=e.id,n=e.skeletonId,r=this._layerQueue,o=this._layerQueue.length,a=0,s=void 0;for(a=0;a<o;a++){var l=r[a];l instanceof _0x74832c?l.setSelection(i,n,t,e.primitive.name)&&(s=l):l.id===t&&l.selectEnabled?(l.setSelection(i,n),s=l):l.releaseSelection()}s instanceof _0x74832c||this.setSelectedLayer(s)},h$l.prototype.releaseSelection=function(){var e=this._layerQueue,t=this._layerQueue.length,i=0;for(i=0;i<t;i++){var n=e[i];!t$$(n)||n.releaseSelection()}this.setSelectedLayer(void 0)},h$l.prototype.find=function(e){if(!t$$(e))throw new t$_("name is required.");var t=this._layers.get(e);if(!t$$(t))for(var i=this._layerQueue,n=this._layerQueue.length,r=0;r<n;r++){var o=i[r];if(o instanceof _0x74832c)for(var a=i[r],s=0;s<a._s3mLayers._array.length;s++)if((o=a._s3mLayers._array[s]).name===e){t=o;break}}return t},h$l.prototype.findByIndex=function(e){if(!t$$(e))throw new t$_("index is required.");if(e>this._layerQueue.length-1)throw new t$_("index is out of bounds.");return this._layerQueue[e]},h$l.prototype.add=function(e,t){if(!t$$(e))throw new t$_("layer is required.");var i=e._name;if(!t$$(i)||""==i)throw new t$_("name is required.");var n=this._layers;if(n.contains(i))throw new RuntimeError("An layer with name "+i+" already exists in this Scene.");e._id=this._layerIndex++;var r=this._layerQueue.length;n.set(i,e),t=e$1Y(t,r),e.index=t,this._layerQueue.push(e),this._layerQueue.sort((function(e,t){return e.index-t.index})),e._fileType===c$q.ClampObjectPolygon?this._clampLayerIndex=t:t>this._clampLayerIndex&&(e.receiveObjectClamp=!1)},h$l.prototype.remove=function(e,t){if(t=e$1Y(t,!0),!t$$(e))return!1;var i=this.find(e);return!!i&&(!!this._layers.remove(e)&&(this._layerQueue.splice(this._layerQueue.indexOf(i),1),t&&i.destroy(),i._fileType===c$q.ClampObjectPolygon&&(this._clampLayerIndex=Number.MAX_VALUE),this._selectedLayer===i&&(this._selectedLayer=void 0),this._s3mLayerAddedIndex--,!0))},h$l.prototype.removeAll=function(e){if(e=e$1Y(e,!0)){var t=this._layerQueue,i=this._layerQueue.length,n=0;for(n=0;n<i;n++){var r=t[n];!t$$(r)||r.destroy()}}this._layers.removeAll(),this._layerQueue.length=0,this._clampLayerIndex=Number.MAX_VALUE,this._selectedLayer=void 0,this._s3mLayerAddedIndex=0},h$l.prototype.pickFeatures=function(e,t){var i,n=t._context,r=n.pixels,o=e$1z.byteToRgba(r[0],r[1],r[2],r[3]),a=n.getObjectByPickId(o);if(t$$(a)&&t$$(a.primitive)&&a.primitive instanceof _0x4ab4f4){var s=a.id;if(!t$$((i=a.primitive).queryParameter)||!i.selectEnabled)return;var l=i.queryParameter,u=l.url+"/datasources/{datasourceName}/datasets/{datasetName}/features/{id}.jsonp?hasGeometry={hasGeometry}";if(t$$(l.dataSetName))return u=u.replace("{datasourceName}",l.dataSourceName).replace("{datasetName}",l.dataSetName).replace("{id}",s).replace("{hasGeometry}",l.hasGeometry),t$$(a$R.CREDENTIAL)&&(u=a$R.addToken(u)),m$M(u);if(1==l.isMerge&&t$$(l.datasetList)){for(var c,h=0,d=l.datasetList.length;h<d;h++){var f=l.datasetList[h];if(s>=f.startID&&s<=f.endID){s=s-f.startID+1,c=f.datasetName;break}}if(t$$(c))return u=u.replace("{datasourceName}",l.dataSourceName).replace("{datasetName}",c).replace("{id}",s).replace("{hasGeometry}",l.hasGeometry),t$$(a$R.CREDENTIAL)&&(u=a$R.addToken(u)),m$M(u)}}},h$l.prototype.raise=function(e){if(t$$(e)){var t=e.index;if(M$q(this._layerQueue,t,t+1)&&(e.index+=1),e._fileType===c$q.ClampGroundRealtimeRasterCache)for(var i=0;i<this._layerQueue.length;i++)this._layerQueue[i]._fileType===c$q.ClampGroundRealtimeRasterCache&&this._layerQueue[i]._layerScheduler.refreshRaster(this._layerQueue[i]._frameState)}},h$l.prototype.lower=function(e){if(t$$(e)){var t=e.index;if(M$q(this._layerQueue,t,t-1)&&(e.index-=1),e._fileType===c$q.ClampGroundRealtimeRasterCache)for(var i=0;i<this._layerQueue.length;i++)this._layerQueue[i]._fileType===c$q.ClampGroundRealtimeRasterCache&&this._layerQueue[i]._layerScheduler.refreshRaster(this._layerQueue[i]._frameState)}},h$l.prototype.lowerToBottom=function(e){if(t$$(e)){var t=e.index;this._layerQueue.splice(t,1),this._layerQueue.unshift(e),e.index=0;for(let i=1;i<=t;i++){e=this._layers.get(this._layerQueue[i].name);e.index+=1}}},h$l.prototype.raiseToTop=function(e){if(t$$(e)){var t=e.index;this._layerQueue.splice(t,1),this._layerQueue.push(e),e.index=this._layerQueue.length-1;for(let i=t;i<this._layerQueue.length-1;i++){e=this._layers.get(this._layerQueue[i].name);e.index-=1}}},h$l.prototype.setSelectedLayer=function(e){this._selectedLayer=e},h$l.prototype.getSelectedLayer=function(){if(!t$$(this._selectedLayer)||!this._selectedLayer.isDestroyed())return this._selectedLayer},h$l.prototype.lightSourceChanged=function(e){for(var t=0,i=this._layerQueue.length;t<i;t++)this._layerQueue[t]instanceof _0x4ab4f4&&this._layerQueue[t].lightSourceChanged(e)},h$l.prototype.saveLocalCache=function(){for(var e=[],t=0,i=this._layerQueue.length;t<i;t++)this._layerQueue[t]instanceof _0x4ab4f4&&this._layerQueue[t]._layerScheduler.saveLocalCache(e);if(e.length>0){var n={nameArray:e};_0xb658ed.indexTaskProcessor.scheduleTask(n,[])}};var _0x42dd10=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x4b43d0=_0x42dd10(void 0,(function(){return _0x4b43d0.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b43d0).search("(((.+)+)+)+$")}));_0x4b43d0();var WebGLPlot$g=window.WebGLPlot=window.WebGLPlot||{};function _0x120904(){}WebGLPlot$g.defaultValue=e$1Y,WebGLPlot$g.defined=t$$,WebGLPlot$g.Cartesian2=r$T,WebGLPlot$g.Cartesian3=a$11,WebGLPlot$g.WallGeometry=H$M,WebGLPlot$g.GeometryInstance=m$P,WebGLPlot$g.PolylineVolumeGeometry=N$Q,WebGLPlot$g.GroundPolylineGeometry=ee$x,WebGLPlot$g.PolylineGeometry=R$H,WebGLPlot$g.PolygonGeometry=S$C,WebGLPlot$g.Color=e$1z,WebGLPlot$g.ColorGeometryInstanceAttribute=r$I,WebGLPlot$g.PerInstanceColorAppearance=r$u,WebGLPlot$g.LabelStyle=z$t,WebGLPlot$g.SceneTransforms=u$V,WebGLPlot$g.HorizontalOrigin=N$W,WebGLPlot$g.SceneMode=b$1d,WebGLPlot$g.Material=r$v,WebGLPlot$g.VertexFormat=n$12,WebGLPlot$g.CesiumMath=n$1d,WebGLPlot$g.HeadingPitchRoll=e$1L,WebGLPlot$g.Ellipsoid=n$1c,WebGLPlot$g.Transforms=m$13,WebGLPlot$g.EllipsoidGeodesic=D$Y,WebGLPlot$g.Cartographic=i$1g,WebGLPlot$g.BillboardCollection=O$t,WebGLPlot$g.MaterialAppearance=t$G,WebGLPlot$g.LabelCollection=m$A,WebGLPlot$g.EllipsoidSurfaceAppearance=t$g,WebGLPlot$g.BoundingSphere=c$19,WebGLPlot$g.Primitive=y$H,WebGLPlot$g.GroundPrimitive=f$J,WebGLPlot$g.RenderState=p$1a,WebGLPlot$g.PolylineCollection=W$P,WebGLPlot$g.GroundPolylinePrimitive=C$I,WebGLPlot$g.PolylineColorAppearance=e$12,WebGLPlot$g.ClassificationType=_0x29401c,WebGLPlot$g.Polyline=o$G,WebGLPlot$g.Event=o$15,WebGLPlot$g.ScreenSpaceEventHandler=f$N,WebGLPlot$g.DeveloperError=t$_,WebGLPlot$g.clone=e$1W,WebGLPlot$g.when=c$18,WebGLPlot$g.loadXML=u$_,WebGLPlot$g.Check=n$1e,WebGLPlot$g.Request=r$V,WebGLPlot$g.RequestErrorEvent=e$1S,WebGLPlot$g.RequestScheduler=r$U,WebGLPlot$g.RuntimeError=t$Z,WebGLPlot$g.TrustedServers=a$X,WebGLPlot$g.ScreenSpaceEventType=Q$L,WebGLPlot$g.buildModuleUrl=o$12,WebGLPlot$g.IntersectionTests=h$1b,WebGLPlot$g.Ray=n$18,WebGLPlot$g.Cartographic=i$1g,WebGLPlot$g.BoxOutlineGeometry=a$T,WebGLPlot$g.Matrix3=r$W,WebGLPlot$g.Matrix4=c$1a,WebGLPlot$g.AxisAlignedBoundingBox=e$1N,WebGLPlot$g.createGuid=t$U,WebGLPlot$g.Entity=l$J,WebGLPlot$g.VerticalOrigin=j$10,WebGLPlot$g.Model=L$D,WebGLPlot$g.PolygonHierarchy=t$K,WebGLPlot$g.AssociativeArray=e$1F,WebGLPlot$g.ModelUtility=s$G,WebGLPlot$g.updateVersion=te$r,WebGLPlot$g.addDefaults=h$K,WebGLPlot$g.KeyboardEventModifier=Ft$5,WebGLPlot$g.ParticleSystem=g$h,WebGLPlot$g.CircleEmitter=a$k,WebGLPlot$g.ConeEmitter=n$n,WebGLPlot$g.TranslationRotationScale=a$C,WebGLPlot$g.BoxEmitter=o$p,WebGLPlot$g.Quaternion=a$U,WebGLPlot$g.JulianDate=o$10,WebGLPlot$g.Property=r$w,WebGLPlot$g.S3MInstanceCollection=_0x1bf60e,WebGLPlot$g.arrayFill=d$10,WebGLPlot$g.ComponentDatatype=C$12,WebGLPlot$g.Geometry=T$11,WebGLPlot$g.GeometryAttribute=r$Q,WebGLPlot$g.GeometryAttributes=t$W,WebGLPlot$g.GeometryOffsetAttribute=_0x165ce0,WebGLPlot$g.IndexDatatype=fe$u,WebGLPlot$g.PrimitiveType=H$11,WebGLPlot$g.PolylinePipeline=v$V,WebGLPlot$g.ImageMaterialProperty=i$M,WebGLPlot$g.ColorMaterialProperty=t$F,WebGLPlot$g.ShadowMode=q$Q,WebGLPlot$g.ShowGeometryInstanceAttribute=e$18,WebGLPlot$g.DistanceDisplayCondition=e$1w,WebGLPlot$g.DistanceDisplayConditionGeometryInstanceAttribute=n$Z,WebGLPlot$g.MeasureHandler=O$j,WebGLPlot$g.MeasureMode=_0x4057bc,WebGLPlot$g.DrawHandler=b$u,WebGLPlot$g.DrawMode=_0xd8b438,WebGLPlot$g.Sightline=x$p,WebGLPlot$g.ViewShed3D=w$r,WebGLPlot$g.PrimitiveCollection=r$l,WebGLPlot$g.PolylineMaterialAppearance=t$E,WebGLPlot$g.ApproximateTerrainHeights=e$1P,WebGLPlot$g.destroyObject=s$1e,WebGLPlot$g.OrientedBoundingBox=b$1o,WebGLPlot$g.Rectangle=s$1p,WebGLPlot$g.ClassificationPrimitive=M$M,WebGLPlot$g.ShadowVolumeAppearance=T$L,WebGLPlot$g.ColorTable=o$T,WebGLPlot$g.HypsometricSettingEnum=J$O,WebGLPlot$g.SlopeSetting=r$A,WebGLPlot$g.SlopeSettingEnum=_0x55779b,WebGLPlot$g.CallbackProperty=n$K,WebGLPlot$g.S3MTilesLayer=_0x4ab4f4,WebGLPlot$g.Layers=h$l,WebGLPlot$g.PlaneGeometry=f$Q,WebGLPlot$g.ModelAnimationLoop=_0x1f6ea1,WebGLPlot$g.NearFarScalar=u$W,WebGLPlot$g.createPropertyDescriptor=v$J,WebGLPlot$g.CatmullRomSpline=p$1e,WebGLPlot$g.GeometryPipeline=F$W,WebGLPlot$g.EllipseGeometry=H$U,WebGLPlot$g.CylinderGeometry=x$V,WebGLPlot$g.ArcType=m$_,WebGLPlot$g.PolylineOutlineMaterialProperty=e$H,WebGLPlot$g.deprecationWarning=i$1b,WebGLPlot$g.arrayRemoveDuplicates=u$11,WebGLPlot$g.GeometryType=_0x348fdd;var _0x159658=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x99f2ec=_0x159658(void 0,(function(){return _0x99f2ec.toString().search("(((.+)+)+)+$").toString().constructor(_0x99f2ec).search("(((.+)+)+)+$")}));function _0x45ea17(e,t,i){this.x=WebGLPlot.defaultValue(e,0),this.y=WebGLPlot.defaultValue(t,0),this.z=WebGLPlot.defaultValue(i,0)}_0x99f2ec(),_0x45ea17.clone=function(e,t){if(WebGLPlot.defined(e))return WebGLPlot.defined(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new _0x45ea17(e.x,e.y,e.z)},_0x45ea17.equals=function(e,t){return e===t||WebGLPlot.defined(e)&&WebGLPlot.defined(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z},_0x45ea17.prototype.clone=function(e){return _0x45ea17.clone(this,e)},_0x45ea17.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},_0x45ea17.prototype.equals=function(e){return _0x45ea17.equals(this,e)};var _0x4034d8=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x417996=_0x4034d8(void 0,(function(){return _0x417996.toString().search("(((.+)+)+)+$").toString().constructor(_0x417996).search("(((.+)+)+)+$")}));_0x417996();var _0x5d65f9={SYMBOL_UNKNOW:0,SYMBOL_DOT:1,SYMBOL_ALGO:2,SYMBOL_PICTURE:20,SYMBOL_MODEL:21,SYMBOL_Model:21,SYMBOL_POLYLINE:24,SYMBOL_RECTANGLE:26,SYMBOL_PARALLELOGRAM:28,SYMBOL_CIRCLE:29,SYMBOL_ELLIPSE:31,SYMBOL_ARBITRARYPOLYGON:32,SYMBOL_TEXT:34,SYMBOL_ARC:44,SYMBOL_PARALLELLINE:48,SYMBOL_TRAPEZOID:350,SYMBOL_POLYBEZIERCLOSED:360,SYMBOL_CHORD:370,SYMBOL_PIE:380,SYMBOL_KIDNEY:390,SYMBOL_BRACE:400,SYMBOL_REGULARPOLYGON:410,SYMBOL_POLYBEZIER:590,SYMBOL_RUNWAY:1013,SYMBOL_CURVEEIGHT:1014,SYMBOL_CONCENTRICCIRCLE:1019,SYMBOL_COMBINATIONALCIRCLE:1022,SYMBOL_NODECHAIN:1025,GROUPOBJECT:1e3,SYMBOL_CIRCLECHORD:3701,SYMBOL_CIRCLEPIE:3801,SYMBOL_CIRCLEARC:4401,SYMBOL_POINT:99998},_0x585354=Object.freeze(_0x5d65f9),_0x4b6c47=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x423795=_0x4b6c47(void 0,(function(){return _0x423795.toString().search("(((.+)+)+)+$").toString().constructor(_0x423795).search("(((.+)+)+)+$")}));_0x423795();var _0x46d019={SURROUNDLINE_NONE:0,SURROUNDLINE_INNER:1,SURROUNDLINE_OUT:2,SURROUNDLINE_ALL:3},_0x2bfc5b=Object.freeze(_0x46d019),_0x302ee2=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x4bdad3=_0x302ee2(void 0,(function(){return _0x4bdad3.toString().search("(((.+)+)+)+$").toString().constructor(_0x4bdad3).search("(((.+)+)+)+$")}));_0x4bdad3();var _0x4012c0={None:0,Linear:1,Radial:2},_0x51b78d=Object.freeze(_0x4012c0),_0x280a63=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3ef528=_0x280a63(void 0,(function(){return _0x3ef528.toString().search("(((.+)+)+)+$").toString().constructor(_0x3ef528).search("(((.+)+)+)+$")}));_0x3ef528();var _0x386d86=void 0;class _0x43a805{constructor(){this._layerAdded=new WebGLPlot$g.Event,this._layerDeleted=new WebGLPlot$g.Event,this._layerActived=new WebGLPlot$g.Event,this._layerEditableChanged=new WebGLPlot$g.Event,this._layerVisibleChanged=new WebGLPlot$g.Event,this._layerSelectedChanged=new WebGLPlot$g.Event,this._symbolAdded=new WebGLPlot$g.Event,this._symbolDeleted=new WebGLPlot$g.Event,this._symbolBeforeDeleted=new WebGLPlot$g.Event,this._symbolModified=new WebGLPlot$g.Event,this._symbolUpdated=new WebGLPlot$g.Event,this._symbolDestroyed=new WebGLPlot$g.Event,this._symbolSelected=new WebGLPlot$g.Event,this._symbolUnSelected=new WebGLPlot$g.Event,this._animationCreated=new WebGLPlot$g.Event,this._animationDeleted=new WebGLPlot$g.Event,this._animationModified=new WebGLPlot$g.Event,this._animationBegined=new WebGLPlot$g.Event,this._animationFinished=new WebGLPlot$g.Event,this._animationJsonEnd=new WebGLPlot$g.Event,this._animationPause=new WebGLPlot$g.Event,this._animationReset=new WebGLPlot$g.Event,this._animationPlay=new WebGLPlot$g.Event,this._animationStop=new WebGLPlot$g.Event,this._overlayerPropertyChanged=new WebGLPlot$g.Event}static getInstance(){return _0x386d86||(_0x386d86=new _0x43a805),_0x386d86}}Object.defineProperties(_0x43a805.prototype,{layerAdded:{get:function(){return this._layerAdded}},layerDeleted:{get:function(){return this._layerDeleted}},layerActived:{get:function(){return this._layerActived}},layerEditableChanged:{get:function(){return this._layerEditableChanged}},layerVisibleChanged:{get:function(){return this._layerVisibleChanged}},layerSelectedChanged:{get:function(){return this._layerSelectedChanged}},symbolAdded:{get:function(){return this._symbolAdded}},symbolBeforeDeleted:{get:function(){return this._symbolBeforeDeleted}},symbolDeleted:{get:function(){return this._symbolDeleted}},symbolModified:{get:function(){return this._symbolModified}},symbolUpdated:{get:function(){return this._symbolUpdated}},symbolDestroyed:{get:function(){return this._symbolDestroyed}},symbolSelected:{get:function(){return this._symbolSelected}},symbolUnSelected:{get:function(){return this._symbolUnSelected}},animationCreated:{get:function(){return this._animationCreated}},animationDeleted:{get:function(){return this._animationDeleted}},animationModified:{get:function(){return this._animationModified}},animationBegined:{get:function(){return this._animationBegined}},animationFinished:{get:function(){return this._animationFinished}},animationReset:{get:function(){return this._animationReset}},animationPause:{get:function(){return this._animationPause}},animationPlay:{get:function(){return this._animationPlay}},animationStop:{get:function(){return this._animationStop}},animationJsonEnd:{get:function(){return this._animationJsonEnd}},overlayerPropertyChanged:{get:function(){return this._overlayerPropertyChanged}}});var _0x2371f8=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x5b86d4=_0x2371f8(void 0,(function(){return _0x5b86d4.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b86d4).search("(((.+)+)+)+$")}));function _0x5bc221(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._graphicObject=WebGLPlot.defaultValue(e.graphicObject,void 0),this._lineColor=WebGLPlot.defaultValue(e.lineColor,new WebGLPlot.Color(1,0,0,1)),this._lineWidth=WebGLPlot.defaultValue(e.lineWidth,3),this._fillBackColor=WebGLPlot.defaultValue(e.fillBackColor,new WebGLPlot.Color(1,0,0,1)),this._fillBackOpaque=WebGLPlot.defaultValue(e.fillBackOpaque,!1),this._fillGradientAngle=WebGLPlot.defaultValue(e.fillGradientAngle,0),this._fillGradientMode=WebGLPlot.defaultValue(e.fillGradientMode,_0x51b78d.None),this._fillGradientOffsetRatioY=WebGLPlot.defaultValue(e.fillGradientOffsetRatioY,0),this._fillGradientOffsetRatioX=WebGLPlot.defaultValue(e.fillGradientOffsetRatioX,0),this._fillForeColor=WebGLPlot.defaultValue(e.fillForeColor,new WebGLPlot.Color(1,0,0,1)),this._fillSymbolID=WebGLPlot.defaultValue(e.fillSymbolID,1),this._fillOpaqueRate=WebGLPlot.defaultValue(e.fillOpaqueRate,70),this._surroundLineColor=WebGLPlot.defaultValue(e.surroundLineColor,WebGLPlot.Color.YELLOW),this._surroundLineType=WebGLPlot.defaultValue(e.surroundLineType,0),this._surroundLineWidth=WebGLPlot.defaultValue(e.surroundLineWidth,3),this._opacity=WebGLPlot.defaultValue(e.opacity,1)}_0x5b86d4(),_0x5bc221.prototype.clone=function(){var e=new _0x5bc221;return e._graphicObject=this._graphicObject,e._lineColor=WebGLPlot.Color.clone(this._lineColor),e._lineWidth=JSON.parse(JSON.stringify(void 0!==this._lineWidth?this._lineWidth:3)),e._fillBackColor=WebGLPlot.Color.clone(this._fillBackColor),e._fillBackOpaque=JSON.parse(JSON.stringify(void 0!==this._fillBackOpaque&&this._fillBackOpaque)),e._fillGradientAngle=JSON.parse(JSON.stringify(void 0!==this._fillGradientAngle?this._fillGradientAngle:0)),e._fillGradientMode=JSON.parse(JSON.stringify(void 0!==this._fillGradientMode?this._fillGradientMode:_0x51b78d.None)),e._fillGradientOffsetRatioY=JSON.parse(JSON.stringify(void 0!==this._fillGradientOffsetRatioY?this._fillGradientOffsetRatioY:0)),e._fillGradientOffsetRatioX=JSON.parse(JSON.stringify(void 0!==this._fillGradientOffsetRatioX?this._fillGradientOffsetRatioX:0)),e._fillForeColor=WebGLPlot.Color.clone(this._fillForeColor),e._fillSymbolID=JSON.parse(JSON.stringify(void 0!==this._fillSymbolID?this._fillSymbolID:1)),e._fillOpaqueRate=JSON.parse(JSON.stringify(void 0!==this._fillOpaqueRate?this._fillOpaqueRate:70)),e._surroundLineColor=WebGLPlot.Color.clone(this._surroundLineColor),e._surroundLineType=JSON.parse(JSON.stringify(void 0!==this._surroundLineType?this._surroundLineType:0)),e._surroundLineWidth=JSON.parse(JSON.stringify(void 0!==this._surroundLineWidth?this._surroundLineWidth:3)),e._opacity=JSON.parse(JSON.stringify(void 0!==this._opacity?this._opacity:1)),e},_0x5bc221.prototype.update=function(){this._graphicObject&&(this._graphicObject._initialize=!1,this._graphicObject._isAnimationFeature||_0x43a805.getInstance().symbolModified.raiseEvent(this._graphicObject))},Object.defineProperties(_0x5bc221.prototype,{lineColor:{get:function(){return this._lineColor},set:function(e){if(e instanceof WebGLPlot.Color){if(e.equals(this._lineColor))return;this._lineColor=e,this.update()}}},lineWidth:{get:function(){return this._lineWidth},set:function(e){e!==this._lineWidth&&(this._lineWidth=e,this._graphicObject._CorridorWidth=-1,this.update())}},fillBackColor:{get:function(){return this._fillBackColor},set:function(e){if(e instanceof WebGLPlot.Color){if(e.equals(this._fillBackColor))return;this._fillBackColor=e,this.update()}}},fillForeColor:{get:function(){return this._fillForeColor},set:function(e){if(e instanceof WebGLPlot.Color){if(e.equals(this._fillForeColor))return;this._fillForeColor=e,this.update()}}},fillBackOpaque:{get:function(){return this._fillBackOpaque},set:function(e){e!==this._fillBackOpaque&&(this._fillBackOpaque=e,this.update())}},fillGradientAngle:{get:function(){return this._fillGradientAngle},set:function(e){e!==this._fillGradientAngle&&(this._fillGradientAngle=e,this.update())}},fillGradientMode:{get:function(){return this._fillGradientMode},set:function(e){e!==this._fillGradientMode&&(this._fillGradientMode=e,this.update())}},fillGradientOffsetRatioY:{get:function(){return this._fillGradientOffsetRatioY},set:function(e){e===this._fillGradientOffsetRatioY||this._fillGradientOffsetRatioY<0||this._fillGradientOffsetRatioY>100||(this._fillGradientOffsetRatioY=e,this.update())}},fillGradientOffsetRatioX:{get:function(){return this._fillGradientOffsetRatioX},set:function(e){e===this._fillGradientOffsetRatioX||this._fillGradientOffsetRatioX<0||this._fillGradientOffsetRatioX>100||(this._fillGradientOffsetRatioX=e,this.update())}},fillSymbolID:{get:function(){return this._fillSymbolID},set:function(e){e!==this._fillSymbolID&&(this._fillSymbolID=e,this.update())}},fillOpaqueRate:{get:function(){return this._fillOpaqueRate},set:function(e){e===this._fillOpaqueRate||e>100||e<0||(this._fillOpaqueRate=e,this.update())}},surroundLineWidth:{get:function(){return this._surroundLineWidth},set:function(e){e!==this._surroundLineWidth&&(this._surroundLineWidth=e,this.update())}},surroundLineColor:{get:function(){return this._surroundLineColor},set:function(e){e!==this._surroundLineColor&&(this._surroundLineColor=e,this.update())}},opacity:{get:function(){return this._opacity},set:function(e){e!==this._opacity&&(this._opacity=e,this.update())}},surroundLineType:{get:function(){return this._surroundLineType},set:function(e){e!==this._surroundLineType&&(this._surroundLineType=e,this.update())}}});var _0x3f1e9d=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x142443=_0x3f1e9d(void 0,(function(){return _0x142443.toString().search("(((.+)+)+)+$").toString().constructor(_0x142443).search("(((.+)+)+)+$")}));function _0x37327d(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._graphicObject=WebGLPlot.defaultValue(e.graphicObject,void 0),this._fontHeight=WebGLPlot.defaultValue(e.fontHeight,508/96),this._foreColor=WebGLPlot.defaultValue(e.foreColor,WebGLPlot.Color.WHITE),this._backColor=WebGLPlot.defaultValue(e.backColor,new WebGLPlot.Color(1,0,0,.3)),this._outline=WebGLPlot.defaultValue(e.outline,!0),this._fontName=WebGLPlot.defaultValue(e.fontName,WebGLPlot.plotI18n("SongTi")),this._italic=WebGLPlot.defaultValue(e.italic,!1),this._bold=WebGLPlot.defaultValue(e.bold,!0),this._align=WebGLPlot.defaultValue(e.align,0),this._italicAngle=WebGLPlot.defaultValue(e.italicAngle,0),this._shadow=WebGLPlot.defaultValue(e.shadow,!1),this._sizeFixed=WebGLPlot.defaultValue(e.sizeFixed,!0),this._underline=WebGLPlot.defaultValue(e.underline,!1),this._rotation=WebGLPlot.defaultValue(e.rotation,0),this._backOpaque=WebGLPlot.defaultValue(e.backOpaque,!1),this._strikeout=WebGLPlot.defaultValue(e.strikeout,!1),this._borderSpacingWidth=WebGLPlot.defaultValue(e.borderSpacingWidth,4),this._outlineWidth=WebGLPlot.defaultValue(e.outlineWidth,1),this._fontWidth=WebGLPlot.defaultValue(e.fontWidth,0),this._opaqueRate=WebGLPlot.defaultValue(e.opaqueRate,255),this._stringAlignment=WebGLPlot.defaultValue(e.stringAlignment,0),this._text3DScale=WebGLPlot.defaultValue(e.text3DScale,1),this._fontWeight=WebGLPlot.defaultValue(e.fontWeight,0),this._fontSize=WebGLPlot.defaultValue(e.fontSize,20),this._textBoxColor=WebGLPlot.defaultValue(e.textBoxColor,new WebGLPlot.Color(1,0,0,.3)),this._textBoxLineColor=WebGLPlot.defaultValue(e.textBoxLineColor,new WebGLPlot.Color(1,0,0,.8)),this._isShowTextBox=WebGLPlot.defaultValue(e.isShowTextBox,!1)}_0x142443(),_0x37327d.prototype.setTextRectColor=function(e,t){this._textBoxLineColor=WebGLPlot.Color.clone(e),this._textBoxColor=new WebGLPlot.Color(e.red,e.green,e.blue,.3),WebGLPlot.defined(t)&&t&&this.update()},_0x37327d.prototype.clone=function(){var e=new _0x37327d;return e._graphicObject=this._graphicObject,e._fontHeight=JSON.parse(JSON.stringify(void 0!==this._fontHeight?this._fontHeight:508/96)),e._foreColor=WebGLPlot.Color.clone(this._foreColor),e._backColor=WebGLPlot.Color.clone(this._backColor),e._outline=JSON.parse(JSON.stringify(void 0!==this._outline&&this._outline)),e._fontName=JSON.parse(JSON.stringify(void 0!==this._fontName?this._fontName:WebGLPlot.plotI18n("SongTi"))),e._italic=JSON.parse(JSON.stringify(void 0!==this._italic&&this._italic)),e._bold=JSON.parse(JSON.stringify(void 0===this._bold||this._bold)),e._align=JSON.parse(JSON.stringify(void 0!==this._align?this._align:0)),e._italicAngle=JSON.parse(JSON.stringify(void 0!==this._italicAngle?this._italicAngle:0)),e._shadow=JSON.parse(JSON.stringify(void 0!==this._shadow?this._shadow:0)),e._sizeFixed=JSON.parse(JSON.stringify(void 0!==this._sizeFixed&&this._sizeFixed)),e._underline=JSON.parse(JSON.stringify(void 0!==this._underline?this._underline:0)),e._rotation=JSON.parse(JSON.stringify(void 0!==this._rotation?this._rotation:0)),e._backOpaque=JSON.parse(JSON.stringify(void 0!==this._backOpaque?this._backOpaque:0)),e._strikeout=JSON.parse(JSON.stringify(void 0!==this._strikeout?this._strikeout:0)),e._borderSpacingWidth=JSON.parse(JSON.stringify(void 0!==this._borderSpacingWidth?this._borderSpacingWidth:4)),e._outlineWidth=JSON.parse(JSON.stringify(void 0!==this._outlineWidth?this._outlineWidth:1)),e._opaqueRate=JSON.parse(JSON.stringify(void 0!==this._opaqueRate?this._opaqueRate:255)),e._stringAlignment=JSON.parse(JSON.stringify(void 0!==this._stringAlignment?this._stringAlignment:0)),e._text3DScale=JSON.parse(JSON.stringify(void 0!==this._text3DScale?this._text3DScale:1)),e._fontWeight=JSON.parse(JSON.stringify(void 0!==this._fontWeight?this._fontWeight:0)),e._fontSize=JSON.parse(JSON.stringify(void 0!==this._fontSize?this._fontSize:20)),e._textBoxColor=WebGLPlot.Color.clone(this._textBoxColor),e._textBoxLineColor=WebGLPlot.Color.clone(this._textBoxLineColor),e._isShowTextBox=JSON.parse(JSON.stringify(void 0!==this._isShowTextBox&&this._isShowTextBox)),e},Object.defineProperties(_0x37327d.prototype,{fontHeight:{get:function(){return this._fontHeight},set:function(e){e!==this._fontHeight&&(this._fontHeight=e,this._fontSize=parseInt(96*e/25.4),this.update())}},foreColor:{get:function(){return this._foreColor},set:function(e){e===this._foreColor||!(e instanceof WebGLPlot.Color)||(this._foreColor=e,this.update())}},backColor:{get:function(){return this._backColor},set:function(e){e!==this._backColor&&(this._backColor=e,this.update())}},outline:{get:function(){return this._outline},set:function(e){e!==this._outline&&(this._outline=e,this.update())}},fontName:{get:function(){return this._fontName},set:function(e){e!==this._fontName&&(this._fontName=e,this.update())}},italic:{get:function(){return this._italic},set:function(e){e!==this._italic&&(this._italic=e,this.update())}},bold:{get:function(){return this._bold},set:function(e){e!==this._bold&&(this._bold=e,this.update())}},align:{get:function(){return this._align},set:function(e){e!==this._italic&&(this._align=e,this.update())}},italicAngle:{get:function(){return this._italicAngle},set:function(e){e!==this._italicAngle&&(this._italicAngle=e,this.update())}},shadow:{get:function(){return this._shadow},set:function(e){e!==this._shadow&&(this._shadow=e,this.update())}},sizeFixed:{get:function(){return this._sizeFixed},set:function(e){e!==this._sizeFixed&&(this._sizeFixed=e,this.update())}},underline:{get:function(){return this._underline},set:function(e){e!==this._underline&&(this._underline=e,this.update())}},backOpaque:{get:function(){return this._backOpaque},set:function(e){e!==this._backOpaque&&(this._backOpaque=e,this.update())}},strikeout:{get:function(){return this._strikeout},set:function(e){e!==this._strikeout&&(this._strikeout=e,this.update())}},borderSpacingWidth:{get:function(){return this._borderSpacingWidth},set:function(e){e!==this._borderSpacingWidth&&(this._borderSpacingWidth=e,this.update())}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){e!==this._outlineWidth&&(this._outlineWidth=e,this.update())}},fontWidth:{get:function(){return this._fontWidth},set:function(e){e!==this._fontWidth&&(this._fontWidth=e,this.update())}},opaqueRate:{get:function(){return this._opaqueRate},set:function(e){e!==this._opaqueRate&&(this._opaqueRate=e,this.update())}},stringAlignment:{get:function(){return this._stringAlignment},set:function(e){e!==this._stringAlignment&&(this._stringAlignment=e,this.update())}},text3DScale:{get:function(){return this._text3DScale},set:function(e){e!==this._text3DScale&&(this._text3DScale=e,this.update())}},fontWeight:{get:function(){return this._fontWeight},set:function(e){e!==this._fontWeight&&(this._fontWeight=e,this.update())}},fontSize:{get:function(){return this._fontSize},set:function(e){e!==this._fontSize&&(this._fontSize=e,this._fontHeight=25.4*e/96,this.update())}},textBoxColor:{get:function(){return this._textBoxColor},set:function(e){e!==this._textBoxColor&&(this._textBoxColor=e,this.update())}},textBoxLineColor:{get:function(){return this._textBoxLineColor},set:function(e){e!==this._textBoxLineColor&&(this._textBoxLineColor=e,this.update())}},isShowTextBox:{get:function(){return this._isShowTextBox},set:function(e){e!==this._isShowTextBox&&(this._isShowTextBox=e,this.update())}}}),_0x37327d.prototype.update=function(){this._graphicObject&&(this._graphicObject._initialize=!1,this._graphicObject._isAnimationFeature||_0x43a805.getInstance().symbolModified.raiseEvent(this._graphicObject))};var _0x37a2cb=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x264822=_0x37a2cb(void 0,(function(){return _0x264822.toString().search("(((.+)+)+)+$").toString().constructor(_0x264822).search("(((.+)+)+)+$")}));_0x264822();var _0x16ef46={Vector:0,Grid:1,Marker:2,Picture:3,Unkown:4},_0x3f7d9f=Object.freeze(_0x16ef46),_0x11e931=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xa024c5=_0x11e931(void 0,(function(){return _0xa024c5.toString().search("(((.+)+)+)+$").toString().constructor(_0xa024c5).search("(((.+)+)+)+$")}));_0xa024c5();var _0x1dc496={LocationPt:0,ScalePt:1,AlgoMovePt:2,UnkownPt:4},_0x5edb39=Object.freeze(_0x1dc496),_0x432da5=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x30136a=_0x432da5(void 0,(function(){return _0x30136a.toString().search("(((.+)+)+)+$").toString().constructor(_0x30136a).search("(((.+)+)+)+$")}));function _0x51d1e4(){}_0x30136a(),_0x51d1e4.clearNextSamePts=function(e){for(var t=e.length,i=0;i<t-1;)this.equalFuzzy(e[i].x,e[i+1].x)&&this.equalFuzzy(e[i].y,e[i+1].y)&&this.equalFuzzy(e[i].z,e[i+1].z)?(e.splice(i,1),t--):i++;return e},_0x51d1e4.clearNextSamePtsXY=function(e){for(var t=e.length,i=0;i<t-1;)this.equalFuzzy(e[i].x,e[i+1].x)&&this.equalFuzzy(e[i].y,e[i+1].y)?(e.splice(i,1),t--):i++;return e},_0x51d1e4.clearSamePts=function(e){for(var t=e.length,i=0;i<t-1;)this.equalFuzzy(e[i].x,e[i+1].x)&&this.equalFuzzy(e[i].y,e[i+1].y)&&this.equalFuzzy(e[i].z,e[i+1].z)?(e.splice(i,1),t--):i++;return e},_0x51d1e4.clearSamePtsXY=function(e){for(var t=e.length,i=0;i<t-1;)this.equalFuzzy(e[i].x,e[i+1].x)&&this.equalFuzzy(e[i].y,e[i+1].y)?(e.splice(i,1),t--):i++;return e},_0x51d1e4.equalFuzzy=function(e,t,i){return WebGLPlot.defined(i)||(i=1e-31),Math.abs(e-t)<=i},_0x51d1e4.distance=function(e,t){return WebGLPlot.defined(e)&&WebGLPlot.defined(t)?Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y)):0},_0x51d1e4.distance3D=function(e,t){return WebGLPlot.defined(e)&&WebGLPlot.defined(t)?Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y)+(e.z-t.z)*(e.z-t.z)):0},_0x51d1e4.polylineDistance=function(e){if(0===e.length)return 0;let t=0;for(let i=0;i<e.length-1;i++)t+=_0x51d1e4.distance(e[i],e[i+1]);return t},_0x51d1e4.isRight=function(e,t,i){var n=t,r=i,o=t,a=e;return(r.x-n.x)*(a.y-o.y)-(a.x-o.x)*(r.y-n.y)<0},_0x51d1e4.isPloyClockwise=function(e){var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(e),i=t.length;if(!(i<3)){var n=t[0].y*(t[i-1].x-t[1].x);t.push(t[0].clone());for(var r=1;r<i;++r)n+=t[r].y*(t[r-1].x-t[r+1].x);return!(n>0)}},_0x51d1e4.parallel=function(e,t){var i=[];if(!WebGLPlot.defined(e)||e.length<2)return i;var n=!1;e.length>3&&e[0].x===e[e.length-1].x&&e[0].y===e[e.length-1].y&&e[0].z===e[e.length-1].z&&(n=!0),n?(i[0]=this.findBisectorPoint(e[e.length-2],e[0],e[1],t),i[e.length-1]=i[0]):(i[0]=this.findPoint(e[0],e[1],t,90),i[e.length-1]=this.findPoint(e[e.length-1],e[e.length-2],-t,90));for(var r=e[0],o=e[1],a=e[1],s=1;s<e.length-1;++s)if(o=e[s],e[s]!==e[s-1]&&(r=e[s-1]),e[s]!==e[s+1]){a=e[s+1];var l=this.findBisectorPoint(r,o,a,t);this.isCross(r,i[s-1],o,l)&&(l=i[s-1]),i[s]=l}return i},_0x51d1e4.isCross=function(e,t,i,n){var r=new _0x45ea17(0,0,0);return!(!this.intersectLineSegs(e,t,i,n,r)||r===e||r===t||r===i||r===n)},_0x51d1e4.intersectLineSegs=function(e,t,i,n,r){if(this.equalFuzzy(e.x,t.x)&&this.equalFuzzy(e.y,t.y)&&this.equalFuzzy(e.z,t.z))return r.x=e.x,r.y=e.y,!1;if(this.equalFuzzy(i.x,n.x)&&this.equalFuzzy(i.y,n.y)&&this.equalFuzzy(i.z,n.z))return r.x=i.x,r.y=i.y,!1;var o=1e-16,a=0,s=0;if(a=e.x>t.x?e.x:t.x,s=e.x<t.x?e.x:t.x,i.x-a>o&&n.x-a>o||i.x-s<-1e-16&&n.x-s<-1e-16||(a=e.y>t.y?e.y:t.y,s=e.y<t.y?e.y:t.y,i.y-a>o&&n.y-a>o||i.y-s<-1e-16&&n.y-s<-1e-16))return!1;var l=t.x-e.x,u=t.y-e.y,c=n.x-i.x,h=n.y-i.y,d=e.x-i.x,f=e.y-i.y,p=l*h-c*u,_=p;if(Math.abs(l)>1e-31&&Math.abs(c)>1e-31&&(_/=l*c),Math.abs(_)<1e-31)return e===i?(r.x=e.x,r.y=e.y,!this.isSameQuadrant(e,t,i,n)):t===n?(r.x=t.x,r.y=t.y,!this.isSameQuadrant(e,t,i,n)):e===n?(r.x=e.x,r.y=e.y,this.isSameQuadrant(e,t,i,n)):t===i&&(r.x=t.x,r.y=t.y,this.isSameQuadrant(e,t,i,n));var m=(l*f-u*d)/p,$=(c*f-h*d)/p;return!(m<0&&(Math.abs(m*c)>o||Math.abs(m*h)>o)||m>1&&(Math.abs((m-1)*c)>o||Math.abs((m-1)*h)>o)||$<0&&(Math.abs($*l)>o||Math.abs($*u)>o)||$>1&&(Math.abs(($-1)*l)>o||Math.abs(($-1)*u)>o))&&(Math.abs(m)<1e-31?(r.x=i.x,r.y=i.y,!0):Math.abs(m-1)<1e-31?(r.x=n.x,r.y=n.y,!0):Math.abs($)<1e-31?(r.x=e.x,r.y=e.y,!0):Math.abs($-1)<1e-31?(r.x=t.x,r.y=t.y,!0):!(m<0&&(Math.abs(m*c)>o||Math.abs(m*h)>o)||m>1&&(Math.abs((m-1)*c)>o||Math.abs((m-1)*h)>o)||$<0&&(Math.abs($*l)>o||Math.abs($*u)>o)||$>1&&(Math.abs(($-1)*l)>o||Math.abs(($-1)*u)>o))&&(r.x=m*c+i.x,r.y=m*h+i.y,!0))},_0x51d1e4.plumbLineLen=function(e,t,i){return this.distance(e,t)*Math.sin(this.innerAngle(t,e,i))},_0x51d1e4.innerAngle=function(e,t,i){if(e===t||e===i)return 0;var n=this.distance(e,t),r=this.distance(e,i),o=this.distance(t,i),a=(n*n+r*r-o*o)/(2*n*r);return a>1&&this.equalFuzzy(a,1)?a=1:a<1&&this.equalFuzzy(a,-1)&&(a=-1),Math.acos(a)},_0x51d1e4.isSameQuadrant=function(e,t,i,n){var r=(t.x-e.x)*(n.x-i.x),o=(t.y-e.y)*(n.y-i.y);return!(Math.abs(r)<1e-31&&Math.abs(o)<1e-31)&&((r>0||Math.abs(r)<1e-31)&&(o>0||Math.abs(o)<1e-31))},_0x51d1e4.findPoint=function(e,t,i,n){if(e===t||Math.abs(i)<1e-31)return e;var r=this.radian(e,t)+n*Math.PI/180;return new _0x45ea17(e.x+i*Math.cos(r),e.y+i*Math.sin(r),e.z)},_0x51d1e4.LinePnt=function(e,t,i){var n=_0x51d1e4.distance(e,t);if(0===n)return e;var r=i/n;return _0x51d1e4.FindPointOnLineByRatio(r,e,t)},_0x51d1e4.FindPointOnLineByRatio=function(e,t,i){var n=new _0x45ea17(0,0,0);return n.x=t.x+(i.x-t.x)*e,n.y=t.y+(i.y-t.y)*e,n.z=t.z+(i.z-t.z)*e,n},_0x51d1e4.getPolygonCenterPt=function(e){if(!e||null===e||0===e.length)return null;for(var t=0,i=0,n=0,r=0;r<e.length;r++)t+=e[r].x,i+=e[r].y,n+=e[r].z;return new _0x45ea17(t/e.length,i/e.length,n/e.length)},_0x51d1e4.findBisectorPoint=function(e,t,i,n){var r=this.radian(t,e),o=(r+this.radian(t,i))/2,a=Math.cos(o-r+Math.PI/2),s=n;return this.isNear(a,.15)||(s=n/a),new _0x45ea17(t.x+s*Math.cos(o),t.y+s*Math.sin(o),t.z)},_0x51d1e4.rotateAngle=function(e,t,i){var n=new _0x45ea17(0,0,0),r=t,o=Math.cos(r),a=Math.sin(r),s=i.x-e.x,l=i.y-e.y,u=i.z-e.z;return n.x=s*o-l*a+e.x,n.y=s*a+l*o+e.y,n.z=u*a+u*o+e.z,n},_0x51d1e4.calcCirclePts=function(e,t,i){WebGLPlot.defined(i)||(i=72);for(var n=[],r=360/i,o=0;o<i-1;++o){var a=WebGLPlot.CesiumMath.toRadians(o*r);n.push(new _0x45ea17(t.x+e*Math.cos(a),t.y+e*Math.sin(a),t.z))}return n.push(n[0].clone()),n},_0x51d1e4.circlePoint=function(e,t,i,n){return n*=Math.PI/180,new _0x45ea17(e.x+t*Math.cos(n),e.y+i*Math.sin(n),0)},_0x51d1e4.generateBezierCtrlPts=function(e){var t=[],i=e.length;if(i<3)for(var n=0;n!=i;++n)t[n]=e[n].clone();else{var r=0;for(n=0;n<3*i-2;n+=3)"function"==typeof e[r].clone?t[n]=e[r].clone():t[n]=new _0x45ea17(e[r].x,e[r].y,e[r].z),t[n+1]=new _0x45ea17(0,0,e[r].z),t[n+2]=new _0x45ea17(0,0,e[r].z),r++;for(n=1;n<i-1;++n)this.generateTrianglePoints(8,3,e[n-1],e[n],e[n+1],t[3*n-1],t[3*n+1]);this.getTrapezoidPoints(.6,t[0],t[3],t[2],t[1]),this.getTrapezoidPoints(.6,t[3*i-3],t[3*i-6],t[3*i-5],t[3*i-4]),"function"==typeof e[i-1].clone?t[3*i-1]=t[3*i-2]=e[i-1].clone():t[3*i-1]=t[3*i-2]=new _0x45ea17(e[i-1].x,e[i-1].y,e[i-1].z)}return t},_0x51d1e4.generateBezierPointsWithCtrlPts=function(e){var t=e.length,i=[];if(e.length<3)for(var n=0;n<t;++n)i[n]=e[n].clone();else{t/=3;for(n=0;n<3*t&&!(n+4>=3*t);n+=3){var r=e[n].x,o=e[n].y,a=e[n].z,s=e[n+1].x,l=e[n+1].y,u=e[n+1].z,c=e[n+2].x,h=e[n+2].y,d=e[n+2].z,f=e[n+3].x,p=e[n+3].y,_=e[n+3].z;if(this.equalFuzzy(r,s,1e-10)&&this.equalFuzzy(o,l,1e-10)&&this.equalFuzzy(c,f,1e-10)&&this.equalFuzzy(h,p,1e-10))i.push(new _0x45ea17(r,o,a)),i.push(new _0x45ea17(c,h,d));else for(var m=0;m<=1;m+=.03125){var $,g,y,v,x=m*m,b=x*m,S=new _0x45ea17(($=1-3*m+3*x-b)*r+(g=3*(m-2*x+b))*s+(y=3*(x-b))*c+(v=b)*f,$*o+g*l+y*h+v*p,$*a+g*u+y*d+v*_);i.push(S)}}}return i},_0x51d1e4.generateBeizerPointsNoCtrlPt=function(e){var t=_0x51d1e4.generateBezierCtrlPts(e);return _0x51d1e4.generateBezierPointsWithCtrlPts(t)},_0x51d1e4.generateBezierPtsWithScalePts=function(e,t,i,n){var r=[],o=e.x,a=e.y,s=t.x,l=t.y,u=i.x,c=i.y,h=n.x,d=n.y;if(this.equalFuzzy(o,s,1e-10)&&this.equalFuzzy(a,l,1e-10)&&this.equalFuzzy(u,h,1e-10)&&this.equalFuzzy(c,d,1e-10))r.push(new _0x45ea17(o,a,0)),r.push(new _0x45ea17(u,c,0));else for(var f=0;f<=1;f+=.03125){var p,_,m,$,g=f*f,y=g*f,v=new _0x45ea17((p=1-3*f+3*g-y)*o+(_=3*(f-2*g+y))*s+(m=3*(g-y))*u+($=y)*h,p*a+_*l+m*c+$*d,0);r.push(v)}return r},_0x51d1e4.generateTrianglePoints=function(e,t,i,n,r,o,a){var s=i.x,l=i.y,u=i.z,c=n.x,h=n.y,d=n.z,f=r.x,p=r.y,_=r.z;this.getPointsByTriangle(e,t,s,l,u,c,h,d,f,p,_,o,a)},_0x51d1e4.getPointsByTriangle=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=o+(l-i),p=a+(u-n),_=0,m=0;if(i==l)_=i,m=p;else if(n==u)_=f,m=n;else{var $=1*(u-n)/(l-i),g=n-i*$;m=$*(_=(p+f/$-g)/($+1/$))+g}var y=Math.sqrt(1*(o-f)*(o-f)+1*(a-p)*(a-p)),v=Math.sqrt(1*(i-o)*(i-o)+1*(n-a)*(n-a)),x=Math.sqrt(1*(o-l)*(o-l)+1*(a-u)*(a-u)),b=0;f=_+(f-_)*(b=v+x?1+(x-v)*e/(x+v):1),p=m+(p-m)*b,0==y&&(y=1),h.x=o+(o-f)*v/(t*y),h.y=a+(a-p)*v/(t*y),h.z=r,d.x=o+(f-o)*x/(t*y),d.y=a+(p-a)*x/(t*y),d.z=c},_0x51d1e4.getPtsByTriangle=function(e,t,i,n,r){var o=new _0x45ea17(0,0,0);new _0x45ea17(0,0,0);var a=0,s=0;return a=this.distance(r,i),s=this.distance(n,r),1==t&&(a*=2),2==t&&(s*=2),o.x=(a*n.x+s*i.x)/(a+s),o.y=(a*n.y+s*i.y)/(a+s),{pl:this.getWhichPtOfNormal(e,i,o,r),pr:this.getWhichPtOfNormal(e,n,o,r)}},_0x51d1e4.getWhichPtOfNormal=function(e,t,i,n){new _0x45ea17(0,0,0),new _0x45ea17(0,0,0);var r=0;r=this.distance(n,t)/e;var o=this.getPointsOfNormal(r,i,n);return this.distance(t,o.pt4)>=(r=this.distance(t,o.pt3))?o.pt3:o.pt4},_0x51d1e4.getTrapezoidPoints=function(e,t,i,n,r){var o=t.x,a=t.y,s=t.z,l=i.x,u=i.y,c=i.z,h=n.x,d=n.y,f=n.z;this.getPointsByTrapezoid(e,o,a,s,l,u,c,h,d,f,r)},_0x51d1e4.getPointsByTrapezoid=function(e,t,i,n,r,o,a,s,l,u,c){var h=0,d=0,f=0,p=0;if(0===Math.abs(i-o))h=t+r-s,d=l;else if(0==Math.abs(t-r))h=s,d=i+o-l;else{var _=1*(i-o)/(t-r),m=l-_*s;d=_*(h=((o+i)/2+(t+r)/(2*_)-m)/(_+1/_))+m,h=2*h-s,d=2*d-l}var $=Math.sqrt(1*(t-r)*(t-r)+1*(i-o)*(i-o)),g=Math.sqrt(1*(t-h)*(t-h)+1*(i-d)*(i-d));return $>0?(f=t+(r-t)*g/$,p=i+(o-i)*g/$):(f=t,p=i),c.x=f+(h-f)*e,c.y=p+(d-p)*e,c.z=u,c},_0x51d1e4.generateArcInfo=function(e,t,i){var n={};n.pntCenter=new _0x45ea17(0,0,0),n.dRadius=0,n.dStartAngle=0,n.dEndAngle=0;var r=t.x-e.x,o=t.y-e.y;if(Math.abs(r)<1e-31){var a={};(l={}).x=(t.x+e.x)/2,l.y=(t.y+e.y)/2,a.x=(t.x+i.x)/2,a.y=(t.y+i.y)/2;var s=0;Math.abs(i.x-t.x)>=1e-31&&(s=(i.y-t.y)/(i.x-t.x)),n.pntCenter.y=l.y,Math.abs(s)<1e-31?n.pntCenter.x=a.x:n.pntCenter.x=a.x-s*(l.y-a.y)}else{var l;a={};(l={}).x=(t.x+e.x)/2,l.y=(t.y+e.y)/2,a.x=(t.x+i.x)/2,a.y=(t.y+i.y)/2;var u=o/r,c=1;Math.abs(u)<1e-31?(n.pntCenter.x=l.x,Math.abs(i.x-t.x<1e-31)?n.pntCenter.y=a.y:n.pntCenter.y=-(i.x-t.x)/(i.y-t.y)*(n.pntCenter.x-a.x)+a.y):Math.abs(i.x-t.x)<1e-31?(n.pntCenter.y=a.y,n.pntCenter.x=-u*(n.pntCenter.y-l.y)+l.x):(c=(i.y-t.y)/(i.x-t.x),n.pntCenter.x=(u*c*(l.y-a.y)+c*l.x-u*a.x)/(c-u),n.pntCenter.y=(a.x-l.x+c*a.y-u*l.y)/(c-u))}var h=Math.atan2(e.y-n.pntCenter.y,e.x-n.pntCenter.x),d=Math.atan2(i.y-n.pntCenter.y,i.x-n.pntCenter.x);if(this.isCounterClockwise(e,t,i)){for(;h>=2*Math.PI;)h-=2*Math.PI;for(;h<0;)h+=2*Math.PI;for(;d>2*Math.PI;)d-=2*Math.PI;for(;d<h;)d+=2*Math.PI}else{for(;d>=2*Math.PI;)d-=2*Math.PI;for(;d<0;)d+=2*Math.PI;for(;h>2*Math.PI;)h-=2*Math.PI;for(;d>h;)h+=2*Math.PI;var f=h;h=d,d=f}return n.dRadius=Math.sqrt((n.pntCenter.x-e.x)*(n.pntCenter.x-e.x)+(n.pntCenter.y-e.y)*(n.pntCenter.y-e.y)),n.dEndAngle=180*d/Math.PI,n.dStartAngle=180*h/Math.PI,n},_0x51d1e4.isCounterClockwise=function(e,t,i){return(i.x-t.x)*(e.y-t.y)-(e.x-t.x)*(i.y-t.y)>0},_0x51d1e4.generateArcSpatialData=function(e,t,i,n,r,o,a){WebGLPlot.defined(a)||(a=36);var s=(o-r)/a,l=[];if(Math.abs(s)<1e-31)return l;for(;o<r;)o+=2*Math.PI;for(;o>r+2*Math.PI;)r+=2*Math.PI;var u=Math.cos(n)*t,c=Math.sin(n)*t,h=Math.cos(n)*i,d=Math.sin(n)*i,f=this.calcEllipseRadian(r,t,i),p=this.calcEllipseRadian(o,t,i);p-f<1e-31&&(p+=2*Math.PI);var _=Math.round(Math.abs((p-f)/s)+1);if(_<2)return l;for(var m=0;m<_-1;f+=s,m++){m===_-2&&(f=o);var $=e.x+u*Math.cos(f)-d*Math.sin(f),g=e.y+c*Math.cos(f)+h*Math.sin(f);l.push(new _0x45ea17($,g,0))}return 0>l.length&&(l[l.length-1].x=e.x+u*Math.cos(p)-d*Math.sin(p),l[l.length-1].y=e.y+c*Math.cos(p)+h*Math.sin(p)),l},_0x51d1e4.calcEllipseRadian=function(e,t,i){var n=e,r=t*Math.sin(e),o=i*Math.cos(e),a=Math.atan2(r,o);if(e>Math.PI)for(;n>Math.PI;)n-=2*Math.PI,a+=2*Math.PI;else if(e<-Math.PI)for(;n<-Math.PI;)n+=2*Math.PI,a-=2*Math.PI;return a},_0x51d1e4.radian=function(e,t){var i=0,n=t.x-e.x,r=t.y-e.y;return(i=Math.atan2(r,n))<0&&(i+=2*Math.PI),i},_0x51d1e4.intersectLines=function(e,t,i,n){var r={isIntersectLines:!1};if(e.x===t.x&&e.y===t.y||i.x===n.x&&i.y===n.y)return r;var o=t.x-e.x,a=t.y-e.y,s=n.x-i.x,l=n.y-i.y,u=o*l-s*a;if(this.isNear(u))return r;var c=(o*(e.y-i.y)-a*(e.x-i.x))/u,h=new _0x45ea17(0,0,0);return h.x=c*s+i.x,h.y=c*l+i.y,h.z=e.z,r.isIntersectLines=!0,r.intersectPoint=h,r},_0x51d1e4.isNear=function(e,t){return t||(t=1e-31),e<t&&e>-t},_0x51d1e4.calcKidneyShapePts=function(e){var t=[],i=[],n=e.length;if(0!==n){if(1===n)return void t.push(e[0]);if(2===n){var r=this.calcProtudeC3(e[0],e[1]);i.push(e[0]),i.push(e[1]),i.push(r)}else if(i.push(e[0]),i.push(e[1]),i.push(e[2]),(this.isSamePt(e[0],e[2])||this.isSamePt(e[1],e[2]))&&(t.push(e[0]),t.push(e[1])),this.isSamePt(e[0],e[1]))return t.push(e[0]),void t.push(e[2]);i=this.reNormalizeKidneyCtrlPoints(i);var o=new _0x45ea17(0,0,0),a=new _0x45ea17(0,0,0);o.x=.5*(i[0].x+i[1].x),o.y=.5*(i[0].y+i[1].y),a.x=o.x-.1*(i[2].x-o.x),a.y=o.y-.1*(i[2].y-o.y);var s=this.getPtsByTriangle(3,0,i[1],i[0],a);t.push(s.pr),t.push(a),t.push(s.pl);var l=this.getPtsByTriangle(4,2,i[2],i[0],i[1]);t.push(l.pr),t.push(i[1]),t.push(l.pl);var u=this.getPtsByTriangle(2,0,i[0],i[1],i[2]);t.push(u.pr),t.push(i[2]),t.push(u.pl);var c=this.getPtsByTriangle(4,1,i[1],i[2],i[0]);return t.push(c.pr),t.push(i[0]),t.push(c.pl),t}},_0x51d1e4.generateKidneyShapePts=function(e){var t=[];if(2>e.length)return t;var i=this.calcKidneyShapePts(e);if(12!=i.length)return t;i.push(i[0]),i.push(i[1]),i.splice(0,1);for(var n=0;n<i.length-3;n+=3){var r;i.slice(n,n+4),r=this.generateBezierPtsWithScalePts(i[n],i[n+1],i[n+2],i[n+3]),t=t.concat(r)}return t},_0x51d1e4.calcProtudeC3=function(e,t){var i,n=new _0x45ea17(0,0,0);return n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y),i=_0x51d1e4.distance(t,e)/2.7,this.getPointsOfNormal(i,e,n).pt3},_0x51d1e4.getPointsOfNormal=function(e,t,i){var n,r=new _0x45ea17(0,0,0),o=new _0x45ea17(0,0,0),a=new _0x45ea17(0,0,0);return 0==(n=this.distance(t,i))?(a.y=0,a.x=e):(a.x=e*(t.x-i.x)/n,a.y=e*(t.y-i.y)/n),r.x=-a.y+i.x,r.y=a.x+i.y,o.x=a.y+i.x,o.y=-a.x+i.y,{pt3:r,pt4:o}},_0x51d1e4.isSamePt=function(e,t){return!!(this.equalFuzzy(e.x,t.x)&&this.equalFuzzy(e.y,t.y)&&this.equalFuzzy(e.z,t.z))},_0x51d1e4.reNormalizeKidneyCtrlPoints=function(e){var t=[];t.push(new _0x45ea17(0,0,0)),t.push(new _0x45ea17(0,0,0)),t.push(new _0x45ea17(0,0,0));var i=e.length;if(!(i<2)){if(2==i)t[0]=e[0],t[1]=e[1],t[2]=this.calcProtudeC3(e[0],e[1]);else{var n,r,o,a=e[0],s=e[1],l=e[2];if(n=this.distance(s,a),r=this.distance(l,s),o=this.distance(a,l),r>=n&&r>=o){var u=a.clone();a=l.clone(),l=u.clone()}else if(o>=n&&o>=r){u=l.clone();l=s.clone(),s=u.clone()}if(!this.isRight(l,a,s)){u=a.clone();a=s.clone(),s=u.clone()}t[0]=a,t[1]=s,t[2]=l}return t}},_0x51d1e4.pointIsRightToVerticle=function(e,t,i){var n=new WebGLPlot.Cartesian2(.5*(t.x+e.x),.5*(t.y+e.y)),r=new WebGLPlot.Cartesian2(t.x-e.x,t.y-e.y),o=new WebGLPlot.Cartesian2(i.x-n.x,i.y-n.y);return r.x*o.x+r.y*o.y>0},_0x51d1e4.StringtoColor=function(e){if(e.length){var t;t=e.length<8?1:parseInt(e.slice(7,9),16)/255;var i=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255;return new WebGLPlot.Color(i,n,r,t)}return e},_0x51d1e4.getPosition=function(e,t){if(WebGLPlot.defined(t)){var i=void 0,n=e.pickPosition(t);if(n){var r=WebGLPlot.Cartographic.fromCartesian(n);i=new _0x45ea17(WebGLPlot.CesiumMath.toDegrees(r.longitude),WebGLPlot.CesiumMath.toDegrees(r.latitude),r.height<-1e4?0:r.height)}else if(n=e.camera.pickEllipsoid(t,e.globe.ellipsod)){r=WebGLPlot.Cartographic.fromCartesian(n);i=new _0x45ea17(WebGLPlot.CesiumMath.toDegrees(r.longitude),WebGLPlot.CesiumMath.toDegrees(r.latitude),r.height)}return void 0===i||NaN===i.x||NaN===i.y||NaN===i.z?new WebGLPlot.Cartesian3:i}},_0x51d1e4.getPosition2=function(e,t){if(!WebGLPlot.defined(t))return;let i=e.camera.pickEllipsoid(t,e.globe.ellipsod);var n=WebGLPlot.Cartographic.fromCartesian(i);const r=new _0x45ea17(WebGLPlot.CesiumMath.toDegrees(n.longitude),WebGLPlot.CesiumMath.toDegrees(n.latitude),n.height);return void 0===r||NaN===r.x||NaN===r.y||NaN===r.z?new WebGLPlot.Cartesian3:r},_0x51d1e4.getPosition3=function(e,t){if(!WebGLPlot.defined(t))return;let i=new WebGLPlot.Ray,n=e.camera.getPickRay(t,i),r=e.globe.pick(n,e,new WebGLPlot.Cartesian3);var o=WebGLPlot.Cartographic.fromCartesian(r);const a=new _0x45ea17(WebGLPlot.CesiumMath.toDegrees(o.longitude),WebGLPlot.CesiumMath.toDegrees(o.latitude),o.height);return void 0===a||NaN===a.x||NaN===a.y||NaN===a.z?new WebGLPlot.Cartesian3:a},_0x51d1e4.getSurroundLinePts=function(e,t){var i=[],n=[];t*=_0x51d1e4.innerOutlineDir(e);for(var r=0;r<e.length-1;r++){var o,a,s=[];if(!_0x51d1e4.equalFuzzy(e[r].x,e[r+1].x)||!_0x51d1e4.equalFuzzy(e[r].y,e[r+1].y)){s.push(e[r]),s.push(e[r+1]);var l=_0x51d1e4.parallel(s,t);if(o=l[0],a=l[1],0!=i.length){var u=_0x51d1e4.intersectLines(o,a,i[0],i[1]);if(u.isIntersectLines){var c=u.intersectPoint,h=_0x51d1e4.distance(o,a);_0x51d1e4.distance(c,a)>2*h||(n[n.length-1]=c),n.push(a)}else n.push(a)}else n.push(o),n.push(a);(i=[]).push(n[n.length-2]),i.push(n[n.length-1])}}if(e[0].x===e[e.length-1].x&&e[0].y===e[e.length-1].y&&e[0].z===e[e.length-1].z&&1<n.length){var d=_0x51d1e4.intersectLines(n[0],n[1],n[n.length-2],n[n.length-1]);if(d.isIntersectLines){var f=d.intersectPoint;n[n.length-1]=f,n[0]=f}}return n},_0x51d1e4.innerOutlineDir=function(e){function t(e,t){function i(e){var t=Math.atan2(e.y,e.x);return t<0&&(t+=2*Math.PI),t}var n=i(t)-i(e);return n<-Math.PI&&(n+=2*Math.PI),n>Math.PI&&(n-=2*Math.PI),n}if((e=_0x51d1e4.clearNextSamePts(e)).length<3)return 1;for(var i=0,n={x:0,y:0},r={x:0,y:0},o=2;o<e.length;o++)r.x=e[o].x-e[o-1].x,r.y=e[o].y-e[o-1].y,n.x=e[o-1].x-e[o-2].x,n.y=e[o-1].y-e[o-2].y,i+=t(n,r);return r.x=e[1].x-e[0].x,r.y=e[1].y-e[0].y,n.x=e[0].x-e[e.length-1].x,n.y=e[0].y-e[e.length-1].y,(i+=t(n,r))>=0?-1:1},_0x51d1e4.isSpecialHeightSymbol=function(e,t){if(22===e)switch(t){case 1001:case 1002:case 1003:case 1004:case 1006:case 1007:case 1009:case 1011:return!0}return 50308===t||26400===t},_0x51d1e4.isCanFill=function(e){if(!WebGLPlot.defined(e)||_0x585354.SYMBOL_ALGO!==e.symbolType)return!1;switch(e.code){case 1001:case 1002:case 1003:case 1004:case 1006:case 1011:case 25200:return!0}return!1},_0x51d1e4.isSymbolCellCanFill=function(e){return _0x585354.SYMBOL_CHORD===e.type||_0x585354.SYMBOL_ARBITRARYPOLYGON===e.type||_0x585354.SYMBOL_POLYBEZIERCLOSED===e.type||_0x585354.SYMBOL_PIE===e.type||_0x585354.SYMBOL_CIRCLE===e.type||_0x585354.SYMBOL_RECTANGLE===e.type||_0x585354.SYMBOL_PARALLELOGRAM===e.type||_0x585354.SYMBOL_ELLIPSE===e.type||_0x585354.SYMBOL_TRAPEZOID===e.type||_0x585354.SYMBOL_KIDNEY===e.type||_0x585354.SYMBOL_REGULARPOLYGON===e.type||_0x585354.SYMBOL_COMBINATIONALCIRCLE===e.type||_0x585354.SYMBOL_CIRCLECHORD===e.type||_0x585354.SYMBOL_CIRCLEPIE===e.type},_0x51d1e4.getSpaceDistance=function(e,t){var i=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z),n=WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z),r=WebGLPlot.Cartographic.fromCartesian(i),o=WebGLPlot.Cartographic.fromCartesian(n),a=new WebGLPlot.EllipsoidGeodesic;return a.setEndPoints(r,o),a.surfaceDistance},_0x51d1e4.getSpaceDistanceByCartesian=function(e,t){var i=WebGLPlot.Cartographic.fromCartesian(e),n=WebGLPlot.Cartographic.fromCartesian(t),r=new WebGLPlot.EllipsoidGeodesic;return r.setEndPoints(i,n),r.surfaceDistance},_0x51d1e4.intersectionOfRectByPointslopeline=function(e,t,i){var n=new WebGLPlot.Cartesian2,r=new WebGLPlot.Cartesian2;if(-1==t)n.x=e.x,n.y=i.bottom,r.x=e.x,r.y=i.top;else if(0==t)n.x=i.left,n.y=e.y,r.x=i.right,r.y=e.y;else{var o=0,a=[];if((l=t*((u=i.left)-e.x)+e.y)>i.bottom&&l<i.top&&(a[2*o]=u,a[2*o+1]=l,o++),(l=t*((u=i.right)-e.x)+e.y)>i.bottom&&l<i.top&&(a[2*o]=u,a[2*o+1]=l,o++),o<2){var s=-1/t;l=i.bottom,(u=e.x-s*(l-e.y))>i.left&&u<i.right&&(a[2*o]=u,a[2*o+1]=l,o++)}if(o<2){s=-1/t;var l=i.top,u=e.x-s*(l-e.y);o<2&&u>i.left&&u<i.right&&(a[2*o]=u,a[2*o+1]=l,o++)}n.x=a[0],n.y=a[1],r.x=a[2],r.y=a[3]}return[n,r]},_0x51d1e4.ptIsInPolygon=function(e,t){if(!e||0===e.length)return!1;for(var i=0,n=e.length,r=0;r<n;r++){var o=e[r],a=e[(r+1)%n];if(o.y!==a.y){var s=o.y<a.y?o.y:a.y,l=o.y>a.y?o.y:a.y;if(!(t.y<s||t.y>l))(t.y-o.y)*(a.x-o.x)/(a.y-o.y)+o.x>t.x&&i++}}return i%2==1},_0x51d1e4.pixelDisToRealDis=function(e,t,i){var n=WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z),r=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(e,n);if(!WebGLPlot.defined(r))return 0;var o=new WebGLPlot.Cartesian2(r.x+i,r.y),a=_0x51d1e4.getPosition(e,r),s=_0x51d1e4.getPosition(e,o);return _0x51d1e4.distance(a,s)},_0x51d1e4.computeMatrix=function(e,t,i){var n=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z),r=new WebGLPlot.HeadingPitchRoll,o=WebGLPlot.Transforms.localFrameToFixedFrameGenerator("north","west");i||(i=WebGLPlot.Transforms.headingPitchRollToFixedFrame(n,r,WebGLPlot.Ellipsoid.WGS84,o));var a=Math.PI/180;return r.pitch=-a*t.x,r.roll=a*t.y,r.heading=-a*t.z,WebGLPlot.Transforms.headingPitchRollToFixedFrame(n,r,WebGLPlot.Ellipsoid.WGS84,o,i),i},_0x51d1e4.computeMatrix2=function(e,t,i){var n=new WebGLPlot.HeadingPitchRoll,r=WebGLPlot.Transforms.localFrameToFixedFrameGenerator("north","west");i||(i=WebGLPlot.Transforms.headingPitchRollToFixedFrame(e,n,WebGLPlot.Ellipsoid.WGS84,r));var o=Math.PI/180;return n.pitch=-o*t.x,n.roll=o*t.y,n.heading=-o*t.z,WebGLPlot.Transforms.headingPitchRollToFixedFrame(e,n,WebGLPlot.Ellipsoid.WGS84,r,i),i},_0x51d1e4.Cross=function(e,t){return e.x*t.y-e.y*t.x},_0x51d1e4.IsClockwise=function(e){for(var t=0,i=0,n=1,r=2;i<e.length;i++,n++,r++){n>=e.length&&(n-=e.length),r>=e.length&&(r-=e.length);var o=new WebGLPlot.Cartesian2(e[n].x-e[i].x,e[n].y-e[i].y),a=new WebGLPlot.Cartesian2(e[r].x-e[n].x,e[r].y-e[n].y);_0x51d1e4.Cross(o,a)>=0?t++:t--}return t>=0},_0x51d1e4.Resolve=function(e){var t=[];if(e.length<3)return null;for(var i=_0x51d1e4.IsClockwise(e),n=[],r=0;r<e.length;r++){var o={point:e[r],index:r,isConvex:!1,isSeparable:!1};i?n.push(o):n.unshift(o)}for(var a=[],s=0;s<n.length;s++)_0x51d1e4.UpdatePointStatus(n[s],n,s),n[s].isSeparable&&a.unshift({Value:n[s],Array:n,ArrayIndex:s});for(;n.length>=3;){if(0===a.length)return null;var l=a[0];a.shift();var u={Array:l.Array,ArrayIndex:WebGLPlot.defined(l.Array[l.ArrayIndex-1])?l.ArrayIndex-1:l.Array.length-1},c={Array:l.Array,ArrayIndex:WebGLPlot.defined(l.Array[l.ArrayIndex+1])?l.ArrayIndex+1:0},h=WebGLPlot.defined(l.Array[l.ArrayIndex])?l.Array[l.ArrayIndex]:l.Array[0],d=u.Array[u.ArrayIndex],f=c.Array[c.ArrayIndex];if(n.splice(l.ArrayIndex,1),t.push(h.index),t.push(d.index),t.push(f.index),d.isSeparable){if(_0x51d1e4.UpdatePointStatus(d,u.Array,u.ArrayIndex),!d.isSeparable){var p=a.indexOf(u);a.splice(p,1)}}else _0x51d1e4.UpdatePointStatus(d,u.Array,u.ArrayIndex),d.isSeparable&&a.unshift(u);if(f.isSeparable){if(_0x51d1e4.UpdatePointStatus(f,c.Array,c.ArrayIndex),!f.isSeparable){p=a.indexOf(c);a.splice(p,1)}}else _0x51d1e4.UpdatePointStatus(f,c.Array,c.ArrayIndex),f.isSeparable&&a.unshift(c)}return t},_0x51d1e4.UpdatePointStatus=function(e,t,i){var n=WebGLPlot.defined(t[i-1])?t[i-1]:t[t.length-1],r=WebGLPlot.defined(t[i+1])?t[i+1]:t[0];if(!e.isConvex){var o=new WebGLPlot.Cartesian2,a=new WebGLPlot.Cartesian2;if(!(_0x51d1e4.Cross(WebGLPlot.Cartesian2.subtract(e.point,n.point,o),WebGLPlot.Cartesian2.subtract(r.point,e.point,a))>=0))return void(e.isSeparable=!1);e.isConvex=!0}for(var s=0;s<t.length;s++)if(!WebGLPlot.Cartesian2.equals(t[s].point,e.point)&&!WebGLPlot.Cartesian2.equals(t[s].point,n.point)&&!WebGLPlot.Cartesian2.equals(t[s].point,r.point)&&_0x51d1e4.TestInTriangle(t[s].point,e.point,n.point,r.point))return void(e.isSeparable=!1);e.isSeparable=!0},_0x51d1e4.TestInTriangle=function(e,t,i,n){var r=new WebGLPlot.Cartesian2,o=new WebGLPlot.Cartesian2,a=new WebGLPlot.Cartesian2,s=new WebGLPlot.Cartesian2,l=new WebGLPlot.Cartesian2;WebGLPlot.Cartesian2.subtract(i,t,r),WebGLPlot.Cartesian2.subtract(n,t,o),WebGLPlot.Cartesian2.subtract(n,i,a),WebGLPlot.Cartesian2.subtract(e,t,s);var u=_0x51d1e4.Cross(r,o)>=0;return u^_0x51d1e4.Cross(r,s)<0&&_0x51d1e4.Cross(a,r)>0^_0x51d1e4.Cross(a,WebGLPlot.Cartesian2.subtract(e,i,l))>=0&&u^_0x51d1e4.Cross(o,s)>=0},_0x51d1e4.screenSpaceCameraController=function(e,t){if(e){var i=e.screenSpaceCameraController;2===e.mode?i.enableTranslate=t:3===e.mode&&(i.enableRotate=t),e.camera.update(e.mode),i.update()}},_0x51d1e4.pixelDisToRealDisInMeters=function(e,t){var i=e.camera,n=new WebGLPlot.Cartesian2(e._canvas.clientWidth/2,e._canvas.clientHeight/2),r=new WebGLPlot.Cartesian2(n.x+t.x,n.y),o=new WebGLPlot.Cartesian2(n.x,n.y+t.y),a=i.getPickRay(n),s=i.getPickRay(r),l=i.getPickRay(o),u=e.globe.pick(a,e),c=e.globe.pick(s,e),h=e.globe.pick(l,e),d=WebGLPlot.Cartesian3.distance(u,c),f=WebGLPlot.Cartesian3.distance(u,h);return new WebGLPlot.Cartesian2(d,f)},_0x51d1e4.pixelHeightToRealHeight=function(e,t,i){var n=e.camera,r=new WebGLPlot.Cartesian2(t.x,t.y+1),o=n.getPickRay(t),a=n.getPickRay(r),s=e.globe.pick(o,e),l=e.globe.pick(a,e),u=.3*WebGLPlot.Cartesian3.distance(s,l);return(t.y-i.y)*u},_0x51d1e4.getPlotLayers=function(e){var t=null;if(WebGLPlot.defined(e.plotLayers)&&e.plotLayers instanceof WebGLPlot.PlotLayers)t=e.plotLayers;else for(var i=0,n=e.primitives.length;i<n;i++){var r=e.primitives._primitives[i];if(WebGLPlot.defined(r)&&r instanceof WebGLPlot.PlotLayers){t=r;break}}return t};var _0x27981d=new WebGLPlot.Cartesian3,_0x2e5d46=new WebGLPlot.Cartesian3;function _0x1e9c0e(e,t,i,n){let r=document.createElement("canvas"),o=r.getContext("2d");return r.setAttribute("width",i),r.setAttribute("height",n),o.clearRect(0,0,r.width,r.height),o.beginPath(),o.fillStyle=e.toCssColorString(),o.fillRect(0,0,i,n),o.lineWidth=1,o.strokeStyle=t.toCssColorString(),o.rect(0,0,i,n),o.stroke(),o.closePath(),r.toDataURL("image/png")}_0x51d1e4.getModelMinAndMaxCorner=function(e){for(var t=e.gltf,i=t.nodes,n=t.meshes,r=t.scenes[t.scene].nodes,o=r.length,a=[],s=new WebGLPlot.Cartesian3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),l=new WebGLPlot.Cartesian3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),u=0;u<o;++u){var c=i[r[u]];for(c._transformToRoot=WebGLPlot.ModelUtility.getTransform(c),a.push(c);a.length>0;){var h=(c=a.pop())._transformToRoot,d=c.mesh;if(WebGLPlot.defined(d))for(var f=n[d].primitives,p=f.length,_=0;_<p;++_)if(f[_].attributes&&f[_].attributes.POSITION){var m=f[_].attributes.POSITION;if(WebGLPlot.defined(m)){var $=WebGLPlot.ModelUtility.getAccessorMinMax(t,m);if(WebGLPlot.defined($.min)&&WebGLPlot.defined($.max)){var g=WebGLPlot.Cartesian3.fromArray($.min,0,_0x27981d),y=WebGLPlot.Cartesian3.fromArray($.max,0,_0x2e5d46);WebGLPlot.Matrix4.multiplyByPoint(h,g,g),WebGLPlot.Matrix4.multiplyByPoint(h,y,y),WebGLPlot.Cartesian3.minimumByComponent(s,g,s),WebGLPlot.Cartesian3.maximumByComponent(l,y,l)}}}var v=c.children;if(WebGLPlot.defined(v))for(var x=v.length,b=0;b<x;++b){var S=i[v[b]];S._transformToRoot=WebGLPlot.ModelUtility.getTransform(S),WebGLPlot.Matrix4.multiplyTransformation(h,S._transformToRoot,S._transformToRoot),a.push(S)}delete c._transformToRoot}}return{minCorner:s,maxCorner:l}},_0x51d1e4.localPtsToCartesian=function(e,t,i){var n=new WebGLPlot.Cartesian3,r=new WebGLPlot.Cartesian3;return r=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(e.x,e.y,e.z),i,r),{position:n=WebGLPlot.Matrix4.multiplyByPoint(t,r,n),vector:r}},_0x51d1e4.latLon2LocalPts=function(e){let t=[],i=[],n=WebGLPlot.Cartesian3.fromDegrees(e[0].x,e[0].y,e[0].z);if(i.push(new WebGLPlot.Cartesian3(0,0,0)),t.push(n),Array.isArray(e)){for(let r=1;r<e.length;r++){let o=WebGLPlot.Cartesian3.fromDegrees(e[r].x,e[r].y,e[r].z);const a=o.x-n.x,s=o.y-n.y,l=o.z-n.z;t.push(o),i.push(new WebGLPlot.Cartesian3(a,s,l))}var r=new WebGLPlot.HeadingPitchRoll,o=WebGLPlot.Transforms.localFrameToFixedFrameGenerator("east","north");const a=WebGLPlot.Transforms.headingPitchRollToFixedFrame(n,r,WebGLPlot.Ellipsoid.WGS84,o);return console.log(t,"test"),{positions:i,modelMatrix:a}}},_0x51d1e4.extend=function(e){var t,i,n,r;for(i=1,n=arguments.length;i<n;i++)for(t in r=arguments[i])e[t]=r[t];return e},_0x51d1e4.isSymbolDot=function(e){switch(e){case _0x585354.SYMBOL_DOT:case _0x585354.SYMBOL_PICTURE:case _0x585354.SYMBOL_POINT:case _0x585354.SYMBOL_MODEL:return!0}return!1},_0x51d1e4.drawEditCtrlPtnPic=function(e){let t=new WebGLPlot.Color(0,0,0,1),i=new WebGLPlot.Color(1,0,0,.8);switch(e){case _0x5edb39.LocationPt:{i=new WebGLPlot.Color(1,1,1,1);const e=_0x1e9c0e(i,t,5,5);return _0x51d1e4.LocationPt_img||(_0x51d1e4.LocationPt_img=e),_0x51d1e4.LocationPt_img}case _0x5edb39.ScalePt:{i=new WebGLPlot.Color(1,1,0,1);const e=_0x1e9c0e(i,t,5,5);return _0x51d1e4.ScalePt_img||(_0x51d1e4.ScalePt_img=e),_0x51d1e4.ScalePt_img}case _0x5edb39.AlgoMovePt:{i=new WebGLPlot.Color(1,0,0,1);const e=_0x1e9c0e(i,t,5,5);return _0x51d1e4.AlgoMovePt_img||(_0x51d1e4.AlgoMovePt_img=e),_0x51d1e4.AlgoMovePt_img}}return null},_0x51d1e4.getCommit=function(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{e=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e};var _0x52ac52=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1e4acb=_0x52ac52(void 0,(function(){return _0x1e4acb.toString().search("(((.+)+)+)+$").toString().constructor(_0x1e4acb).search("(((.+)+)+)+$")}));function _0x1cfd72(e,t){this.scene=WebGLPlot.defaultValue(e,null),this.dotBillboards=new WebGLPlot.BillboardCollection,this._name=WebGLPlot.defaultValue(t,"PlotCollentionLayer"),this._waterPlanes=[],this._visibleViewport=0,this._valid=!0,this._visibility=!0,this._id=-1,this.bIsUpdateDepthTestDis=!1,this.setInterval(),this.PolygonFillInstances={},this.WallInstances={},this.Labels={},this.ploygonFillPrimitive=[],this.wallPrimitive=[],this.ploygonFillAppearance={},this.wallAppearance={},this.algoLabels=new WebGLPlot.LabelCollection,this.updatePrimitive=!1,this.createPolylineCollention(!0),this.GroundInstances={},this.groundPrimitive=null,this.dynamicScaneInstances={},this.dynamicScaneimitive=null,this._dotModelAndVectorPrimitives=new WebGLPlot.PrimitiveCollection,this.scene.primitives.add(this._dotModelAndVectorPrimitives)}function _0x5dfe47(e){if(WebGLPlot.defined(e)&&null!==e&&WebGLPlot.defined(this.scene)&&null!==this.scene){var t=e.position,i=e.width,n=e.height;if(WebGLPlot.defined(i)&&WebGLPlot.defined(n)){var r=new WebGLPlot.BoundingSphere(t,0),o=this.scene.camera.getPixelSize(r,this.scene.frameState.context.drawingBufferWidth,this.scene.frameState.context.drawingBufferHeight),a=i*o,s=n*o,l=Math.max(a,s)/3;r.radius=l,WebGLPlot.BoundingSphere.isOccluded(r,this.scene.frameState.occluder)?e.disableDepthTestDistance=0:e.disableDepthTestDistance=Number.POSITIVE_INFINITY}}}function _0x24135f(e){var t=e.ForeRGBA;return e.isClampToGround&&(t+="_isClampToGround"),t}_0x1e4acb(),_0x1cfd72.prototype.update=function(e,t,i,n){WebGLPlot.defined(this.dotBillboards)&&null!==this.dotBillboards&&this.dotBillboards.update(e,t);for(var r=0;r<this.ploygonFillPrimitive.length;r++)(this.ploygonFillPrimitive[r]instanceof WebGLPlot.GroundPrimitive||this.ploygonFillPrimitive[r]instanceof WebGLPlot.Primitive)&&this.ploygonFillPrimitive[r].update(e);for(var o=0;o<this.wallPrimitive.length;o++)this.wallPrimitive[o]instanceof WebGLPlot.Primitive&&this.wallPrimitive[o].update(e);null!==this.groundPrimitive&&this.groundPrimitive.update(e),this.dynamicScaneimitive&&this.dynamicScaneimitive.update(e),this.algoLabels.update(e)},_0x1cfd72.prototype.render=function(){if(this._valid&&this.updatePrimitive){for(var e=0;e<this.ploygonFillPrimitive.length;e++)this.ploygonFillPrimitive[e]=null;for(e=0;e<this.wallPrimitive.length;e++)this.wallPrimitive[e]=null;this.groundPrimitive&&(this.groundPrimitive=null),this.dynamicScaneimitive&&(this.dynamicScaneimitive=null),this.ploygonFillPrimitive=[],this.wallPrimitive=[],this.ploygonFillAppearance={},this.wallAppearance={};var t=[],i=[],n=[],r=[];for(var o in this.PolygonFillInstances)!this.PolygonFillInstances[o]||this.PolygonFillInstances[o].length<=0?(delete this.PolygonFillInstances[o],this.PolygonFillInstances[o]=null):t=t.concat(this.PolygonFillInstances[o]);for(var a in this.WallInstances)this.WallInstances[a].length<=0?delete this.WallInstances[a]:i=i.concat(this.WallInstances[a]);for(var s in this.GroundInstances)this.GroundInstances[s].length<=0?delete this.GroundInstances[s]:n=n.concat(this.GroundInstances[s]);for(var s in this.dynamicScaneInstances)this.dynamicScaneInstances[s].length<=0?delete this.dynamicScaneInstances[s]:r=r.concat(this.dynamicScaneInstances[s]);for(s=0;s<t.length;s++){var l=t[s];this.ploygonFillAppearance.hasOwnProperty(_0x24135f(l))?this.ploygonFillAppearance[_0x24135f(l)].push(l):this.ploygonFillAppearance[_0x24135f(l)]=[l]}if(WebGLPlot.defined(this.ploygonFillAppearance)&&null!==this.ploygonFillAppearance)for(var e in this.ploygonFillAppearance){var u=this.createPolygonFillPrimitive(e,this.ploygonFillAppearance[e]);this.ploygonFillPrimitive.push(u)}for(var c=0;c<i.length;c++){var h=i[c];this.wallAppearance.hasOwnProperty(h.ForeRGBA)?this.wallAppearance[h.ForeRGBA].push(h):this.wallAppearance[h.ForeRGBA]=[h]}if(WebGLPlot.defined(this.wallAppearance)&&null!==this.wallAppearance)for(var d in this.wallAppearance){var f=this.createWallPrimitive(d,this.wallAppearance[d]);this.wallPrimitive.push(f)}n.length>0&&n[0]&&(this.groundPrimitive=new WebGLPlot.GroundPolylinePrimitive({geometryInstances:n,classificationType:WebGLPlot.ClassificationType.BOTH,clampToS3M:!0,show:!0,appearance:new WebGLPlot.PolylineColorAppearance}),this.groundPrimitive.SymbolType=_0x585354.SYMBOL_ALGO),r.length>0&&r[0]&&(this.dynamicScaneimitive=new WebGLPlot.Primitive({geometryInstances:r,appearance:new WebGLPlot.PerInstanceColorAppearance({flat:!0}),asynchronous:!1})),this.updatePrimitive=!1}},_0x1cfd72.prototype.createPolygonFillPrimitive=function(e,t){var i;i=e.includes("_isClampToGround")?WebGLPlot.Color.fromRgba(e.split("_")[0]):WebGLPlot.Color.fromRgba(e);var n,r=new WebGLPlot.Material.fromType("Color",{color:i,fill:!0}),o=new WebGLPlot.EllipsoidSurfaceAppearance({material:r,aboveGround:!0});return(n=t[0]&&t[0].isClampToGround?new WebGLPlot.GroundPrimitive({geometryInstances:t,appearance:o,show:this._display,asynchronous:!0,classificationType:WebGLPlot.ClassificationType.BOTH}):new WebGLPlot.Primitive({geometryInstances:t,appearance:o,show:this._display,asynchronous:!1})).PolygonFillOrWall=!0,n.SymbolType=_0x585354.SYMBOL_ALGO,n},_0x1cfd72.prototype.createWallPrimitive=function(e,t){var i=WebGLPlot.Color.fromRgba(e),n=WebGLPlot.Material.fromType("Color",{color:i,fill:!0}),r=new WebGLPlot.MaterialAppearance({material:n,faceForward:!0}),o=new WebGLPlot.Primitive({geometryInstances:t,appearance:r,asynchronous:!1,compressVertices:!0,show:!0});return o.PolygonFillOrWall=!0,o.SymbolType=_0x585354.SYMBOL_ALGO,o},_0x1cfd72.prototype.setInterval=function(){var e=this;setInterval((function(){if(WebGLPlot.defined(e.dotBillboards)&&e.dotBillboards.length>0&&e.bIsUpdateDepthTestDis)for(var t in e.dotBillboards._billboards)_0x5dfe47(t)}),100)},_0x1cfd72.prototype.releaseSelection=function(){this._valid},_0x1cfd72.prototype.createPolylineCollention=function(e){if(this.polylineCollection&&(this.scene.primitives.removeAndDestroy(this.polylineCollection),this.polylineCollection=null),this.polylineCollection=new WebGLPlot.PolylineCollection({opaqueRS:WebGLPlot.RenderState.fromCache({depthMask:e,depthTest:{enabled:e}}),translucentRS:WebGLPlot.RenderState.fromCache({depthMask:e,depthTest:{enabled:e}})}),this.scene&&this.scene.plotLayers){let e=this.scene.plotLayers._layerQueue.length;for(let t=0;t<e;t++){let e=this.scene.plotLayers._layerQueue[t];if(WebGLPlot.defined(e)&&e){let t=e._geoGraphicObjects.length;for(let i=0;i<t;i++)e._geoGraphicObjects[i]._initialize=!1}}}this.polylineCollection=this.scene.primitives.add(this.polylineCollection)};const _0x2557ae=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x292756=_0x2557ae(void 0,(function(){return _0x292756.toString().search("(((.+)+)+)+$").toString().constructor(_0x292756).search("(((.+)+)+)+$")}));_0x292756();var _0x20d817=new Map;function _0x24dc2a(e){this.collentionLayer=new _0x1cfd72(e);var t=!1;if(WebGLPlot.defined(e.plotLayers)&&e.plotLayers instanceof WebGLPlot.PlotLayers)e.plotLayers.collentionLayer=this.collentionLayer,t=!0;else for(var i=0,n=e.primitives.length;i<n;i++){var r=e.primitives._primitives[i];if(WebGLPlot.defined(r)&&r instanceof WebGLPlot.PlotLayers){r.collentionLayer=this.collentionLayer,t=!0;break}}if(!t){var o=new WebGLPlot.PlotLayers;o.collentionLayer=this.collentionLayer,e.primitives.add(o),e.plotLayers=o}this.overLayerPolylineCollection=new WebGLPlot.PolylineCollection,e.primitives.add(this.overLayerPolylineCollection)}_0x24dc2a.getInstance=function(e){let t=_0x20d817.get(e._plottingID);return e&&!WebGLPlot.defined(t)&&(t=new _0x24dc2a(e),_0x20d817.set(e._plottingID,t)),t},_0x24dc2a.addBillboard=function(e,t){let i=_0x20d817.get(t._plottingID);if(WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e)return i.collentionLayer.dotBillboards.add(e)},_0x24dc2a.removeBillboard=function(e,t){let i=_0x20d817.get(t._plottingID);WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e&&i.collentionLayer.dotBillboards.remove(e)},_0x24dc2a.addDotModelAndVector=function(e,t){let i=_0x20d817.get(t._plottingID);if(WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e)return i.collentionLayer._dotModelAndVectorPrimitives.add(e)},_0x24dc2a.removeDotModelAndVector=function(e,t){let i=_0x20d817.get(t._plottingID);WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e&&i.collentionLayer._dotModelAndVectorPrimitives.removeAndDestroy(e)},_0x24dc2a.removeAllBillboard=function(e){let t=_0x20d817.get(e._plottingID);WebGLPlot.defined(t)&&null!==t&&t.collentionLayer.dotBillboards.removeAll()},_0x24dc2a.addAlgoPloyline=function(e,t,i){let n=_0x20d817.get(i._plottingID);return null===e||WebGLPlot.defined(n)&&null!==n?n.collentionLayer.polylineCollection.add(t):void 0},_0x24dc2a.removeAlgoPloyline=function(e,t){let i=_0x20d817.get(t._plottingID);WebGLPlot.defined(i)&&null!==i&&(e&&e instanceof WebGLPlot.Polyline?i.collentionLayer.polylineCollection.remove(e):e&&e instanceof Map&&e.size>0&&(e.forEach((e=>{i.collentionLayer.polylineCollection.remove(e)})),e.clear()))},_0x24dc2a.removeAllAlgoPloyline=function(e,t){let i=_0x20d817.get(t._plottingID);WebGLPlot.defined(i)&&null!==i&&e&&(_0x24dc2a.removeAlgoPloyline(e.__symbolPolyLineArray,t),_0x24dc2a.removeAlgoPloyline(e.__symbolSurroundPolyLineArray1,t),_0x24dc2a.removeAlgoPloyline(e.__symbolSurroundPolyLineArray2,t))},_0x24dc2a.addAlgoLabel=function(e,t,i){let n=_0x20d817.get(i._plottingID);if(WebGLPlot.defined(n)&&null!==n){var r=n.collentionLayer.algoLabels.add(t);return e.Labels.push(r),r}},_0x24dc2a.removeAllAlgoLabel=function(e,t){let i=_0x20d817.get(t._plottingID);if(WebGLPlot.defined(i)&&null!==i){for(var n in e.Labels)i.collentionLayer.algoLabels.remove(e.Labels[n]);e.Labels=[]}},_0x24dc2a.setUpdatePrimitive=function(e,t){let i=_0x20d817.get(t._plottingID);WebGLPlot.defined(i)&&null!==i&&(i.collentionLayer.updatePrimitive=e)},_0x24dc2a.setPolygonFillInstances=function(e,t,i){let n=_0x20d817.get(i._plottingID);WebGLPlot.defined(n)&&null!==n&&(n.collentionLayer.PolygonFillInstances[e]=t)},_0x24dc2a.setWallInstances=function(e,t,i){let n=_0x20d817.get(i._plottingID);WebGLPlot.defined(n)&&null!==n&&(n.collentionLayer.WallInstances[e]=t)},_0x24dc2a.setGroundInstances=function(e,t,i){let n=_0x20d817.get(i._plottingID);WebGLPlot.defined(n)&&null!==n&&(n.collentionLayer.GroundInstances[e]=t)},_0x24dc2a.setScaneInstances=function(e,t,i){let n=_0x20d817.get(i._plottingID);WebGLPlot.defined(n)&&null!==n&&(n.collentionLayer.dynamicScaneInstances[e]=t,n.collentionLayer.updatePrimitive=!0)},_0x24dc2a.setUseDepthTest=function(e,t){let i=_0x20d817.get(t._plottingID);var n=WebGLPlot.RenderState.fromCache({depthMask:e,depthTest:{enabled:e}});WebGLPlot.defined(i)&&null!==i&&(i.collentionLayer.polylineCollection._opaqueRS=n,i.collentionLayer.polylineCollection._translucentRS=n)},_0x24dc2a.removeAll=function(e){let t=_0x20d817.get(e._plottingID);WebGLPlot.defined(t)&&WebGLPlot.defined(t.collentionLayer)&&(t.collentionLayer.polylineCollection.removeAll(),t.collentionLayer.algoLabels.removeAll(),t.collentionLayer.dotBillboards.removeAll(),t.collentionLayer.WallInstances=[],t.collentionLayer.PolygonFillInstances=[],t.collentionLayer.updatePrimitive=[],t.collentionLayer.GroundInstances=[],t.collentionLayer.dynamicScaneInstances=[])},_0x24dc2a.addOverLayerPolyLine=function(e,t){let i=_0x20d817.get(t._plottingID);if(WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e)return i.overLayerPolylineCollection.add(e)},_0x24dc2a.removeOverLayerPolyLine=function(e,t){let i=_0x20d817.get(t._plottingID);WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e&&i.overLayerPolylineCollection.remove(e)};var _0x485e71=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2d6977=_0x485e71(void 0,(function(){return _0x2d6977.toString().search("(((.+)+)+)+$").toString().constructor(_0x2d6977).search("(((.+)+)+)+$")}));_0x2d6977();class _0x2c86f0{constructor(e){this._visible=!1,this._isUsePlotVisible=WebGLPlot.defaultValue(e.isUsePlotVisible,!0),this._position=WebGLPlot.defaultValue(e.position,new _0x45ea17(0,0,0)),this._rotate=WebGLPlot.defaultValue(e.rotate,new _0x45ea17(0,0,0)),this._scale=WebGLPlot.defaultValue(e.scale,1),this._scene=e.scene,this._geoGraphicObject=e.geoGraphicObject}setIsUsePlotVisible(e){this._isUsePlotVisible=e}getIsUsePlotVisible(){return this._isUsePlotVisible}setScene(e){this._scene=e}setVisible(e){return!this._isUsePlotVisible&&(this._visible!==e&&(this._visible=e,e?this._addEffectToScene(this._options):this._removeEffectFromScene()),!0)}isVisible(){return this._visible}setGeoGraphicObject(e){this._geoGraphicObject=e}updateEffect(e){}_addEffectToScene(){}_removeEffectFromScene(){}destroy(){}toGeoJson(){return{}}fromGeoJson(e){}}const _0x177491=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x8d50b6=_0x177491(void 0,(function(){return _0x8d50b6.toString().search("(((.+)+)+)+$").toString().constructor(_0x8d50b6).search("(((.+)+)+)+$")}));_0x8d50b6();const _0x2193d9={PLOTSYMBOL:0,ANNOTATIONARRAY:1,BOTH:2};var _0x21c04d=Object.freeze(_0x2193d9),_0x1b7251=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xfa00d9=_0x1b7251(void 0,(function(){return _0xfa00d9.toString().search("(((.+)+)+)+$").toString().constructor(_0xfa00d9).search("(((.+)+)+)+$")}));_0xfa00d9();class _0x175b75{constructor(e,t){e&&(this.key=e),t&&(this.value=t),this.CLASS_NAME="SuperMap.Plot.Property"}setKey(e){this.key=e}getKey(){return this.key}setValue(e){this.value=e}getValue(){return this.value}destroy(){this.key=null,this.value=null}clone(){return new _0x175b75(this.key,this.value)}}var _0x3e19f8=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x7dee75=_0x3e19f8(void 0,(function(){return _0x7dee75.toString().search("(((.+)+)+)+$").toString().constructor(_0x7dee75).search("(((.+)+)+)+$")}));_0x7dee75();var WebGLPlot$f=window.WebGLPlot=window.WebGLPlot||{};function _0x37d005(e){e=e||{},this.properties=e.properties?e.properties:[],this.CLASS_NAME="ExtendProperty"}_0x37d005.prototype.addProperty=function(e,t){var i=this.findProperty(e);return null===i?this.properties.push(new _0x175b75(e,t)):i.setValue(t),!0},_0x37d005.prototype.deleteProperty=function(e){for(var t=0;t<this.properties.length;t++)if(this.properties[t].key===e)return this.properties.slice(t,1),!0;return!1},_0x37d005.prototype.findProperty=function(e){for(var t=0;t<this.properties.length;t++)if(this.properties[t].key===e)return this.properties[t];return null},_0x37d005.prototype.getPropertyValue=function(e){for(var t=0;t<this.properties.length;t++)if(this.properties[t].key===e)return this.properties[t].value;return null},_0x37d005.prototype.getPropertyByIndex=function(e){return e<this.properties.length?this.properties[e]:null},_0x37d005.prototype.getPropertyCount=function(){return this.properties.length},_0x37d005.prototype.destroy=function(){this.properties=null},WebGLPlot$f.ExtendProperty=_0x37d005;var _0x52e7c4=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x380f7c=_0x52e7c4(void 0,(function(){return _0x380f7c.toString().search("(((.+)+)+)+$").toString().constructor(_0x380f7c).search("(((.+)+)+)+$")}));_0x380f7c();const _0x2adb9c=2;class _0x521a23{constructor(e){null!=e&&(e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._libID=WebGLPlot$g.defaultValue(e.libID,-1),this._code=WebGLPlot$g.defaultValue(e.code,-1),this._localPoints=WebGLPlot$g.defaultValue(e.localPoints,[]),this._symbolName=WebGLPlot$g.defaultValue(e.symbolName,""),this._symbolType=_0x585354.SYMBOL_UNKNOW,this._display=WebGLPlot$g.defaultValue(e.display,!0),this._id=WebGLPlot$g.createGuid(),this._showTipLength=WebGLPlot$g.defaultValue(e.showTipLength,100),this._markHalo=WebGLPlot$g.defaultValue(e.markHalo,!1),this._extendWallHeight=WebGLPlot$g.defaultValue(e.extendWallHeight,-1),this._isUseSymbolLibStyle=WebGLPlot$g.defaultValue(e.isUseSymbolLibStyle,!0),this._surroundRatioVal=WebGLPlot$g.defaultValue(e.surroundRatioVal,.002),this._isEdit=!1,this.isDrawing=WebGLPlot$g.defaultValue(e.isDrawing,!1),this._layer=WebGLPlot$g.defaultValue(e.layer,null),this._initialize=!1,this._primitive=[],this._symbolLibManager=WebGLPlot$g.getLibManager(this.layer._scene._plottingID),this._symbolStyle=WebGLPlot$g.defaultValue(e.symbolStyle,new _0x5bc221({graphicObject:this})),this._symbolTextStyle=WebGLPlot$g.defaultValue(e.symbolTextStyle,new _0x37327d({graphicObject:this})),this._serverData=WebGLPlot$g.defaultValue(e.serverData,null),this._textContent=WebGLPlot$g.defaultValue(e.textContent,""),this.readStyleFromSymbolLib(),this._GeoJsonFeature=null,this._extendProperty=new _0x37d005,this._annotationArray=WebGLPlot$g.defaultValue(e.annotationArray,[]),this._wholeHeight=WebGLPlot$g.defaultValue(e.wholeHeight,0),this._disableDepthTestDistance=Number.MAX_VALUE,this._dotDepthTest=!0,this._initSymbolFinished=new WebGLPlot$g.Event,this._geoEffectArray=[],this._geoEntity=void 0,this._isDistanceChangeMode=!1,this._changeModeDistanceMap=new Map,this._bubbleHeight=320,this._bubbleWidth=320,this._description="",this._mediaList=[])}readStyleFromSymbolLib(){var e=this._serverData;WebGLPlot$g.defined(e)&&this._isUseSymbolLibStyle?(this._symbolType=this._serverData.symbolType,this._symbolName=WebGLPlot$g.defaultValue(e.symbolName,""),this._middleMarkExist=WebGLPlot$g.defaultValue(e.middleMarkExist,!1)):this.setSymbolName(this._code)}setGeoEntityShowMode(e){switch((!WebGLPlot$g.defined(this.__dotPlotLibID)||!WebGLPlot$g.defined(this.__dotPlotCode))&&(this.__dotPlotLibID=0,this.__dotPlotCode=_0x585354.SYMBOL_POINT),e){case _0x3f7d9f.Marker:this._libID=0,this._code=_0x585354.SYMBOL_MODEL,this.showMode=e;break;case _0x3f7d9f.Picture:this._libID=0,this._code=_0x585354.SYMBOL_PICTURE,this.showMode=e;break;case _0x3f7d9f.Grid:case _0x3f7d9f.Vector:if(this._libID=this.__dotPlotLibID,this._code=this.__dotPlotCode,0===this.__dotPlotLibID&&this._code===_0x585354.SYMBOL_POINT){let e;this.gridSymbolSize.x>0&&this.gridSymbolSize.y>0&&(e=this.gridSymbolSize),this.__initSymbolPointSymbolData(),WebGLPlot$g.defined(e)&&(this.gridSymbolSize=e)}else{let e=WebGLPlot$g.getServerData(this._libID,this._code,void 0,this._layer._scene._plottingID);if(!e)return;this.readStyleFromSymbolLib(),(!this._serverData||this._serverData.libID!==e.libID||this._serverData.code!==e.code)&&(this._serverData=e,this._getServerDataPrototype(this._serverData))}this.showMode=e}this.showMode===e&&(this._initialize=!1)}getGeoEntityShowMode(){return this._showMode}setGeoEntity(e){this._geoEntity=e}getGeoEntity(){return this._geoEntity}createSymbol(){_0x585354.SYMBOL_UNKNOW!==this._symbolType&&(_0x585354.SYMBOL_DOT,this._symbolType,WebGLPlot$g.defined(this._symbol))}setSymbolName(e){switch(e){case _0x585354.SYMBOL_POLYLINE:this._symbolName=WebGLPlot$g.plotI18n("polyLine");break;case _0x585354.SYMBOL_RECTANGLE:this._symbolName=WebGLPlot$g.plotI18n("rectangle");break;case _0x585354.SYMBOL_PARALLELOGRAM:this._symbolName=WebGLPlot$g.plotI18n("parallelogram");break;case _0x585354.SYMBOL_CIRCLE:this._symbolName=WebGLPlot$g.plotI18n("circle");break;case _0x585354.SYMBOL_ELLIPSE:this._symbolName=WebGLPlot$g.plotI18n("ellipse");break;case _0x585354.SYMBOL_ARBITRARYPOLYGON:this._symbolName=WebGLPlot$g.plotI18n("polygon");break;case _0x585354.SYMBOL_TEXT:this._symbolName=WebGLPlot$g.plotI18n("text");break;case _0x585354.SYMBOL_ARC:this._symbolName=WebGLPlot$g.plotI18n("arc");break;case _0x585354.SYMBOL_PARALLELLINE:this._symbolName=WebGLPlot$g.plotI18n("parallel");break;case _0x585354.SYMBOL_TRAPEZOID:this._symbolName=WebGLPlot$g.plotI18n("trapezoid");break;case _0x585354.SYMBOL_POLYBEZIERCLOSED:this._symbolName=WebGLPlot$g.plotI18n("closedBesselCurve");break;case _0x585354.SYMBOL_CHORD:this._symbolName=WebGLPlot$g.plotI18n("chord");break;case _0x585354.SYMBOL_PIE:this._symbolName=WebGLPlot$g.plotI18n("sector");break;case _0x585354.SYMBOL_KIDNEY:this._symbolName=WebGLPlot$g.plotI18n("kidney");break;case _0x585354.SYMBOL_BRACE:this._symbolName=WebGLPlot$g.plotI18n("brace");break;case _0x585354.SYMBOL_REGULARPOLYGON:this._symbolName=WebGLPlot$g.plotI18n("regularPolygon");break;case _0x585354.SYMBOL_POLYBEZIER:this._symbolName=WebGLPlot$g.plotI18n("bezier");break;case _0x585354.SYMBOL_RUNWAY:this._symbolName=WebGLPlot$g.plotI18n("runway");break;case _0x585354.SYMBOL_CURVEEIGHT:this._symbolName=WebGLPlot$g.plotI18n("curveEight");break;case _0x585354.SYMBOL_CONCENTRICCIRCLE:this._symbolName=WebGLPlot$g.plotI18n("concentricCircle");break;case _0x585354.SYMBOL_COMBINATIONALCIRCLE:this._symbolName=WebGLPlot$g.plotI18n("combinedCircle");break;case _0x585354.SYMBOL_NODECHAIN:this._symbolName=WebGLPlot$g.plotI18n("nodeChain");break;case _0x585354.SYMBOL_CIRCLECHORD:this._symbolName=WebGLPlot$g.plotI18n("chord");break;case _0x585354.SYMBOL_CIRCLEPIE:this._symbolName=WebGLPlot$g.plotI18n("sector");break;case _0x585354.SYMBOL_CIRCLEARC:this._symbolName=WebGLPlot$g.plotI18n("arc");break;case _0x585354.SYMBOL_MODEL:this._symbolName=WebGLPlot$g.plotI18n("SYMBOL_MODEL");break;case _0x585354.SYMBOL_POINT:this._symbolName=WebGLPlot$g.plotI18n("SYMBOL_POINT")}}setVisible(e){if(0!==this._primitive.length)for(var t=0;t<this._primitive.length;t++)this._primitive[t].show=e;WebGLPlot$g.defined(this._layer.selectedFeature)&&this.id===this._layer.selectedFeature.id&&!this.display&&this._layer._plottingEdit&&this._layer._plottingEdit.releaseSelection(!0),!this.billboard||this.showMode!==_0x3f7d9f.Grid&&this.showMode!==_0x3f7d9f.Picture?this._initialize=!1:this.billboard.show=e}getServerData(e,t,i){var n=this,r=WebGLPlot$g.getLibManager(this.layer._scene._plottingID);var o=WebGLPlot$g.getServerData(e,t,void 0,this._layer._scene._plottingID);!o||(o.getSymbolInfo.events.on({processCompleted:function(t){-1!==t.result.libID&&-1!==t.result.code&&(n._serverData=t.result,r.setSymbolData(e,t.result),i())},processFailed:function(){},scope:n}),o.getSymbolInfo.processAsync(o.getSymbolInfoParameters))}addGeoEffect(e){if(e instanceof _0x2c86f0)return this._geoEffectArray.forEach((t=>{if(t.id===e.id)return this._geoEffectArray})),this._geoEffectArray.push(e),e.setGeoGraphicObject(this),this._geoEffectArray}getGeoEffectArray(){return this._geoEffectArray}getGeoEffectByID(e){if(!WebGLPlot$g.defined(e))return!1;for(let t=0;t<this._geoEffectArray.length;t++){const i=this._geoEffectArray[t];if(e===i.id||e===i.uuid)return i}}removeGeoEffectByIndex(e){return e>=0&&e<this._geoEffectArray.length&&(this._geoEffectArray[e].destroy(),this._geoEffectArray[e]=void 0,this._geoEffectArray.splice(e,1),!0)}removeGeoEffectByID(e){if(!WebGLPlot$g.defined(e))return!1;for(let t=0;t<this._geoEffectArray.length;t++){if(e===this._geoEffectArray[t].id)return this._geoEffectArray[t].destroy(),this._geoEffectArray[t]=void 0,this._geoEffectArray.splice(t,1),!0}return!1}removeAllGeoEffect(){this._geoEffectArray.forEach((e=>{e.destroy(),e=void 0})),this._geoEffectArray=[]}__setEffectParameter(e,t){WebGLPlot$g.defined(t)&&t>=0&&t<this._geoEffectArray.length?this._geoEffectArray[t].updateEffect(e):this._geoEffectArray.forEach((t=>{t.updateEffect(e)}))}mergeDefaultStyle(){var e=WebGLPlot$g.getDefaultStyle({libID:this._libID,code:this._code});if(e&&e.defaultFlag){var t=e.symbolStyle,i=e.symbolTextStyle,n=e.gridSymbolSize;this._symbolStyle=t.clone(),this._symbolStyle._graphicObject=this,this._symbolTextStyle=i.clone(),_0x585354.SYMBOL_DOT===this.symbolType?(-1!==e.lineSymbolID&&(this.lineSymbolID=e.lineSymbolID),-1!==e.gridLineWidth&&(this.gridLineWidth=e.gridLineWidth),n.x>0&&n.y>0&&(this.gridSymbolSize=e.gridSymbolSize.clone()),""!==e.modelPath&&(this.modelPath=e.modelPath),e.isDistanceChangeMode&&(this._changeModeDistance=e.isDistanceChangeMode),e.changeModeDistanceMap&&(this._changeModeDistanceMap=e.changeModeDistanceMap)):(_0x585354.SYMBOL_MODEL===this._code||_0x585354.SYMBOL_PICTURE===this._code)&&(e.isDistanceChangeMode&&(this._changeModeDistance=e.isDistanceChangeMode),e.changeModeDistanceMap&&(this._changeModeDistanceMap=e.changeModeDistanceMap))}}update(e,t,i,n){if(this._display&&0!==this._primitive.length)for(var r=0;r<this._primitive.length;r++)this._primitive[r].update(e)}initSymbol(){}getSymbolData(e){WebGLPlot$g.defined(e)||(e=!0);var t={};if(t.version=_0x2adb9c,t.hasOwnProperty("type")||(t.type="GRAPHICOBJECT"),t.hasOwnProperty("libID")||(t.libID=this._libID),t.hasOwnProperty("code")||(t.code=this._code),t.hasOwnProperty("dotPlotLibID")||(t.dotPlotLibID=this.__dotPlotLibID),t.hasOwnProperty("dotPlotCode")||(t.dotPlotCode=this.__dotPlotCode),t.hasOwnProperty("localePoints")||(t.localePoints=this.localPoints),t.hasOwnProperty("symbolName")||(t.symbolName=this.symbolName),t.hasOwnProperty("symbolType")||(t.symbolType=this.symbolType),t.hasOwnProperty("uuid")||(t.uuid=this.id),t.hasOwnProperty("isEdit")||(t.isEdit=!1),WebGLPlot$g.defined(this.scaleByMap)?t.scaleByMap=this.scaleByMap:t.scaleByMap=!0,t.hasOwnProperty("wholeHeight")||(t.wholeHeight=this.wholeHeight),!t.hasOwnProperty("style")){var i=new Object;t.style=i,i.lineColor=_0x21b206(this.symbolStyle.lineColor),i.fillSymbolID=this.symbolStyle._fillSymbolID,i.fillBackColor=_0x21b206(this.symbolStyle._fillBackColor),i.fillForeColor=_0x21b206(this.symbolStyle._fillForeColor),i.fillBackOpaque=this.symbolStyle._fillBackOpaque,i.fillGradientMode=this.symbolStyle._fillGradientMode,i.fillCenterOffsetX=this.symbolStyle.fillGradientOffsetRatioX,i.fillCenterOffsetY=this.symbolStyle.fillGradientOffsetRatioY,i.fillAngle=this.symbolStyle.fillGradientAngle,i.fillOpaqueRate=100-this.symbolStyle.fillOpaqueRate,i.lineWidth3D=this.symbolStyle.lineWidth,t.style.hasOwnProperty("display")||(this._display?i.display="display":i.display="none"),t.style=i}if(!t.hasOwnProperty("textStyle2D")){var n=new Object;n.fontHeight=25.4*this._symbolTextStyle.fontSize/96,n.foreColor=_0x21b206(this._symbolTextStyle._foreColor),n.backColor=_0x21b206(this._symbolTextStyle._backColor),n.outline=this._symbolTextStyle._outline,n.fontStrokeColor=_0x21b206(this._symbolTextStyle._backColor),n.backOpaque=this.symbolTextStyle.isShowTextBox,n.fontBackgroundColor=_0x21b206(this.symbolTextStyle.textBoxLineColor),n.fontName=this._symbolTextStyle._fontName,n.italic=this._symbolTextStyle._italic,n.bold=this._symbolTextStyle._bold,n.align=this._symbolTextStyle._align,n.italicAngle=this._symbolTextStyle._italicAngle,n.shadow=this._symbolTextStyle._shadow,n.sizeFixed=this._symbolTextStyle._sizeFixed,n.underline=this._symbolTextStyle._underline,n.rotation=this._symbolTextStyle._rotation,n.strikeout=this._symbolTextStyle._strikeout,n.borderSpacingWidth=this._symbolTextStyle._borderSpacingWidth,n.outlineWidth=25.4*this._symbolTextStyle._outlineWidth/96,n.fontWidth=this._symbolTextStyle._fontWidth,n.opaqueRate=this._symbolTextStyle._opaqueRate,n.stringAlignment=this._symbolTextStyle._stringAlignment,n.fontScale=this._symbolTextStyle._text3DScale,n.fontWeight=this._symbolTextStyle._fontWeight,t.textStyle2D=n}if(!t.hasOwnProperty("textStyle3D")){var r=new Object;r.foreColor=_0x21b206(this.symbolTextStyle.foreColor),r.backColor=_0x21b206(this.symbolTextStyle.backColor),r.outline=this.symbolTextStyle.outline,r.textBoxColor=this.symbolTextStyle.textBoxColor,r.textBoxLineColor=this.symbolTextStyle.textBoxLineColor,r.fontName=this.symbolTextStyle.fontName,r.italic=this.symbolTextStyle.italic,r.bold=this.symbolTextStyle.bold,r.align=this.symbolTextStyle.align,r.fontSize=this.symbolTextStyle.fontSize,r.isShowTextBox=this.symbolTextStyle.isShowTextBox,t.textStyle3D=r}if(t.hasOwnProperty("surroundLineColor")||(t.surroundLineColor=_0x21b206(this.symbolStyle.surroundLineColor)),t.hasOwnProperty("surroundLineWidth2D")||(t.surroundLineWidth2D=.5),t.hasOwnProperty("surroundLineType")||(t.surroundLineType=this.symbolStyle.surroundLineType),_0x585354.SYMBOL_DOT===this._symbolType||_0x585354.SYMBOL_MODEL===this._symbolType||_0x585354.SYMBOL_PICTURE===this._symbolType)t.hasOwnProperty("showMode")||(t.showMode=this.showMode),t.hasOwnProperty("scale3D")||(t.scale3D=this._scale),WebGLPlot$g.defined(this._rotate2D)&&(t.rotate2D=this.rotate2D),t.hasOwnProperty("rotate3D")||(t.rotate3D=this._rotate),t.hasOwnProperty("positionOffset")||(t.positionOffset=this._hasDragLine),t.hasOwnProperty("dragPoint")||(t.dragPoint=this.dragPoint,t.positionOffsetX=this.dragPoint.x,t.positionOffsetY=this.dragPoint.y),WebGLPlot$g.defined(this._positionOffsetType)&&(t.positionOffsetType=this._positionOffsetType),t.hasOwnProperty("symbolRank")||(t.symbolRank=this._symbolRank),t.hasOwnProperty("anchorPoint")||(t.anchorPoint=this.anchorPoint),t.hasOwnProperty("middleMarkBounds")||(t.middleMarkBounds=this.middleMarkBounds),t.hasOwnProperty("negativeImage")||(t.negativeImage=this._isNegativeImage),t.hasOwnProperty("symbolSize")||(t.symbolSize=this._gridSymbolSize),t.hasOwnProperty("gridSymbolSize")||(t.gridSymbolSize=this._gridSymbolSize),t.hasOwnProperty("pictureSymbolSize")||(t.pictureSymbolSize=this._pictureSymbolSize),t.hasOwnProperty("picturePath")||(t.picturePath=this.picturePath),t.hasOwnProperty("modelPath")||(t.modelPath=this.modelPath),t.hasOwnProperty("modelScale")||(t.modelScale=this.modelScale),t.hasOwnProperty("modelRotate")||(t.modelRotate=this._modelRotate),t.hasOwnProperty("vectorScale")||(t.vectorScale=this.vectorScale),t.hasOwnProperty("middleMarkExist")||(t.middleMarkExist=this._isMiddleMarkExist),t.hasOwnProperty("middleMarkBounds")||(t.middleMarkBounds=this._middleMarkBounds),t.hasOwnProperty("vectorRotate")||(t.vectorRotate=this._vectorRotate),t.hasOwnProperty("vectorDefaultSize")||(t.vectorDefaultSize=this._vectorDefaultSize),t.hasOwnProperty("dotShowMode")||(t.dotShowMode=this._showMode),t.hasOwnProperty("innerCells")||(t.innerCells=this._innerCells),t.hasOwnProperty("surroundLineWidth3D")||(t.surroundlineWidth3D=this.surroundLineWidth),t.hasOwnProperty("middleMarkExist")||(t.middleMarkExist=this.middleMarkExist),t.hasOwnProperty("annotationPosition")||(t.annotationPosition=this._textPos),t.hasOwnProperty("gridSurroundLineWidth3D")||(t.gridSurroundLineWidth3D=this._gridSurroundLineWidth/4),t.hasOwnProperty("gridLineWidth")||(t.gridLineWidth3D=this._gridLineWidth/4),t.hasOwnProperty("symbolSizeInLib")||(t.symbolSizeInLib=this._symbolSizeInLib),t.hasOwnProperty("BloodVolumes")||(t.BloodVolumes=this.BloodVolumes),t.hasOwnProperty("bIsShowBloodVolume")||(t.bIsShowBloodVolume=this.bIsShowBloodVolume),t.hasOwnProperty("disableDepthTestDistance")||(t.disableDepthTestDistance=this._disableDepthTestDistance.toString()),t.hasOwnProperty("sizeInMeters")||(t.sizeInMeters=this.sizeInMeters),t.hasOwnProperty("symbolSizeInMeters")||(t.symbolSizeInMeters=this.symbolSizeInMeters),t.hasOwnProperty("alwaysHasMiddelText")||(t.alwaysHasMiddelText=this.alwaysHasMiddelText),t.style.hasOwnProperty("lineSymbolID")||(t.style.lineSymbolID=this._lineSymbolID),WebGLPlot$g.defined(this._BillboardScale)&&(t.BillboardScale=this._BillboardScale);else{if(t.hasOwnProperty("surroundLineWidth3D")||(t.surroundlineWidth3D=this._symbolStyle._surroundLineWidth),t.hasOwnProperty("updateSubSize")||(t.updateSubSize=this._updateSubSize),t.hasOwnProperty("subSymbolSize")||(t.subSymbolSize=this._subSymbolSize),!t.hasOwnProperty("subSymbols")&&(t.subSymbols=[],this._subSymbols))for(var o=0;o<this._subSymbols.length;++o){let e=JSON.stringify(this._subSymbols[o]);e=JSON.parse(e),this._subSymbols[o].width2D&&(e.width2D=25.4*this._subSymbols[o].width2D/96),this._subSymbols[o].lineColor&&(e.lineColor=_0x21b206(WebGLPlot$g.Color.fromCssColorString(this._subSymbols[o].lineColor))),t.subSymbols.push(e)}t.hasOwnProperty("dashLines")||(t.dashLines=this.dashLines),t.hasOwnProperty("scaleValues")||(t.scaleValues=this._scaleValues),t.hasOwnProperty("subSymbolScaleValue")||(t.subSymbolScaleValue=this._subSymbolScaleValue),t.hasOwnProperty("extendWallOpacity")||(t.wallOpaqueRate=100-this.extendWallOpacity),!t.hasOwnProperty("isClampToGround")&&WebGLPlot$g.defined(this.isClampToGround)&&(t.isClampToGround=this.isClampToGround),!t.hasOwnProperty("arrowHeadType")&&WebGLPlot$g.defined(this.arrowHeadType)&&(t.arrowHeadType=this.arrowHeadType),!t.hasOwnProperty("arrowBodyType")&&WebGLPlot$g.defined(this.arrowBodyType)&&(t.arrowBodyType=this.arrowBodyType),!t.hasOwnProperty("arrowTailType")&&WebGLPlot$g.defined(this.arrowTailType)&&(t.arrowTailType=this.arrowTailType),!t.style.hasOwnProperty("extendWallHeight")&&WebGLPlot$g.defined(this._extendWallHeight)&&(t.style.extendHeight=this._extendWallHeight),!t.style.hasOwnProperty("graphicWidth")&&WebGLPlot$g.defined(this._pictureSymbolSize)&&(t.style.graphicWidth=this._pictureSymbolSize.x),!t.style.hasOwnProperty("graphicHeight")&&WebGLPlot$g.defined(this._pictureSymbolSize)&&(t.style.graphicHeight=this._pictureSymbolSize.y)}return(this._symbolType!==_0x585354.SYMBOL_DOT||this._symbolType!==_0x585354.SYMBOL_TEXT)&&(t._CenterPosition=this._CenterPosition),t.hasOwnProperty("textContent")||(t.textContent=this._textContent),t.hasOwnProperty("markHalo")||(t.markHalo=this._markHalo),t.hasOwnProperty("showTipLength")||(t.showTipLength=this._showTipLength),t.hasOwnProperty("extendProperty")||(t.extendProperty=this.extendProperty),t.hasOwnProperty("annotationArray")||(t.annotationArray=this.annotationArray),null!==this._GeoJsonFeature?(_0x22bd21(this._GeoJsonFeature,t),this._GeoJsonFeature):t}toGeoJson(){var e=this.getSymbolData();return WebGLPlot$g.toJSON(e)}getMinEditPts(){return WebGLPlot$g.defined(this)?_0x51d1e4.isSymbolDot(this._symbolType)?1:this.getMinEditPts():0}getMaxEditPts(){return WebGLPlot$g.defined(this)?_0x51d1e4.isSymbolDot(this._symbolType)?1:this.getMaxEditPts():0}drawAnnotationArray(){if(_0x24dc2a.removeAllAlgoLabel(this,this._layer._scene),this._annotationArray.length>0)for(var e=0;e<this._annotationArray.length;e++){var t=null,i=this._annotationArray[e];if(""!==i._textContent&&i){var n=i._textStyle,r=i._textContent,o=new WebGLPlot$g.Color(n._foreColor.red,n._foreColor.green,n._foreColor.blue,n._foreColor.alpha),a=n._fontSize+"px "+n._fontName;0!==i._localPoint.x&&0!==i._localPoint.y?t=i._localPoint:(t=this._localPoints[0].clone(),i._localPoint=t),t=WebGLPlot$g.Cartesian3.fromDegrees(t.x,t.y,t.z);var s={style:n._outline?WebGLPlot$g.LabelStyle.FILL_AND_OUTLINE:WebGLPlot$g.LabelStyle.FILL,outlineColor:n._outlineColor,outlineWidth:n._outlineWidth,position:t,text:r,font:a,fillColor:o,horizontalOrigin:WebGLPlot$g.HorizontalOrigin.CENTER,id:this._id};(s=_0x24dc2a.addAlgoLabel(this,s,this._layer._scene)).SymbolType=_0x585354.SYMBOL_TEXT}}}clearAllAnnotationArray(){this.annotationArray=[],this.drawAnnotationArray()}setAnnotationArray(e,t,i){if(!WebGLPlot$g.defined(e)||!WebGLPlot$g.defined(t)||!WebGLPlot$g.defined(i)||this.annotationArray.length<=0)return!1;var n=this.annotationArray[e];switch(t){case"textContent":n.textContent=i;break;case"localPoint":n.localPoint=i;break;case"fontName":n._textStyle.fontName=i;break;case"foreColor":n._textStyle.foreColor=i;break;case"fontSize":n._textStyle.fontSize=i;break;case"outlineWidth":n._textStyle.outlineWidth=i;break;case"outlineColor":n._textStyle.outlineColor=i;break;case"outline":n._textStyle.outline=i}return this.drawAnnotationArray(),!0}releaseSelection(){this.layer&&this.layer._plottingEdit&&this.layer._plottingEdit.unSelection(!0)}_destroy(){}_destroyBase(){}_superClone(e){e.__dotPlotLibID=WebGLPlot$g.defined(this.__dotPlotLibID)?JSON.parse(JSON.stringify(this.__dotPlotLibID)):void 0,e.__dotPlotCode=WebGLPlot$g.defined(this.__dotPlotCode)?JSON.parse(JSON.stringify(this.__dotPlotCode)):void 0,e._libID=JSON.parse(JSON.stringify(this._libID)),e._code=JSON.parse(JSON.stringify(this._code)),e._symbolName=JSON.parse(JSON.stringify(this._symbolName)),e._symbolType=JSON.parse(JSON.stringify(this._symbolType)),e._display=JSON.parse(JSON.stringify(this._display)),e._id=JSON.parse(JSON.stringify(this._id)),e._initialize=JSON.parse(JSON.stringify(!1)),e._isEdit=JSON.parse(JSON.stringify(this._isEdit)),e._isUseSymbolLibStyle=JSON.parse(JSON.stringify(this._isUseSymbolLibStyle)),e._localPoints=WebGLPlot$g.clonePoints(this.localPoints),e._symbolStyle=this._symbolStyle.clone(),e._symbolTextStyle=this._symbolTextStyle.clone(),e._serverData=JSON.parse(JSON.stringify(this._serverData)),e._extendProperty=JSON.parse(JSON.stringify(this._extendProperty)),e._annotationArray=JSON.parse(JSON.stringify(this._annotationArray)),e._wholeHeight=JSON.parse(JSON.stringify(this._wholeHeight))}clearMediaList(){this._mediaList=[],this._description=""}}function _0x22bd21(e,t){for(var i in t)"style"===i||"textStyle2D"===i||"textStyle3D"===i||(e[i]=t[i]);var n=new Object;for(var i in t.style)n[i]=t.style[i];e.style=n;var r=new Object;for(var i in t.textStyle2D)r[i]=t.textStyle2D[i];e.textStyle2D=r;var o=new Object;for(var i in t.textStyle3D)o[i]=t.textStyle3D[i];e.textStyle3D=o}function _0x21b206(e){var t=new Object;return t.alpha=255*e.alpha,t.red=255*e.red,t.green=255*e.green,t.blue=255*e.blue,t}Object.defineProperties(_0x521a23.prototype,{libID:{get:function(){return this._libID},set:function(e){if(e===this._libID||"number"!=typeof e)return!1;this._libID=e}},code:{get:function(){return this._code},set:function(e){if(e===this._code||"number"!=typeof e)return!1;this._code=e}},symbolName:{get:function(){return this._symbolName},set:function(e){if(e===this._symbolName)return!1;this._symbolName=e}},symbolType:{get:function(){return this._symbolType}},id:{get:function(){return this._id},set:function(e){e!==this._id&&(this._id=e)}},localPoints:{get:function(){return this._localPoints},set:function(e){e===this._localPoints||!Array.isArray(e)||(this.__setEffectParameter({point:e[0]}),this._localPoints=e,!_0x51d1e4.isSymbolDot(this.symbolType)||this.showMode!==_0x3f7d9f.Grid&&this.showMode!==_0x3f7d9f.Picture?this._initialize=!1:WebGLPlot$g.defined(this.billboard)&&(this.billboard.position=WebGLPlot$g.Cartesian3.fromDegrees(e[0].x,e[0].y,e[0].z)),this._isAnimationFeature||_0x43a805.getInstance().symbolModified.raiseEvent(this),this._layer&&this._layer._isEditable&&this._layer._plottingEdit&&this._layer._plottingEdit._graphicObject&&this._layer._plottingEdit._graphicObject.id===this.id&&this._layer._plottingEdit.drawSymbolExtend(this))}},layer:{get:function(){return this._layer}},isEdit:{get:function(){return this._isEdit},set:function(e){e===this._isEdit||e.constructor!==Boolean||(this._isEdit=e,this._initialize=!1)}},middleMarkExist:{get:function(){return this._middleMarkExist}},symbolStyle:{get:function(){return this._symbolStyle},set:function(e){e===this._symbolStyle||!(e instanceof _0x5bc221)||(this._symbolStyle=e,this._initialize=!1)}},symbolTextStyle:{get:function(){return this._symbolTextStyle},set:function(e){e===this._symbolTextStyle||!(e instanceof _0x37327d)||(this._symbolTextStyle=e,this._initialize=!1)}},markHalo:{get:function(){return this._markHalo},set:function(e){e===this._markHalo||e.constructor!==Boolean||(this._markHalo=e,this._initialize=!1)}},showTipLength:{get:function(){return this._showTipLength},set:function(e){e===this._showTipLength||"number"!=typeof e||(this._showTipLength=e,this._initialize=!1)}},display:{get:function(){return this._display},set:function(e){e===this._display||e.constructor!==Boolean||(this._display=e,this.setVisible(e),this.__setEffectParameter({visible:e}))}},symbol:{get:function(){return this}},extendProperty:{get:function(){return this._extendProperty}},annotationArray:{get:function(){return this._annotationArray},set:function(e){if(e===this._annotationArray||!Array.isArray(e))return null;var t=this._layer._plottingEdit.CtrlPosition._ctrlPoints;if(this._annotationArray=e,WebGLPlot$g.defined(e.length)&&0===e.length){if(WebGLPlot$g.defined(this._layer._plottingEdit))for(var i=0;i<t.length;i++){var n=t.get(i);WebGLPlot$g.defined(n.annotationIndex)&&(n.show=!1)}}else if(WebGLPlot$g.defined(e.length)&&0!==e.length){const i=this._layer._scene.camera._positionCartographic.height;if(this._isEdit&&WebGLPlot$g.defined(this._layer._plottingEdit)){for(var r=0;r<t.length;r++)WebGLPlot$g.defined(t.get(r).annotationIndex)&&(t.get(r).show=!1,t.remove(t.get(r)));for(var o=0;o<e.length;o++){var a=e[o];if(0===a._localPoint.x&&0===a._localPoint.y){const e=1.141e-8*i*(o+1);let t=this._localPoints[0].clone();t.x+=e,a._localPoint=t}(this._layer._plottingEdit.editMode===_0x21c04d.BOTH||this._layer._plottingEdit.editMode===_0x21c04d.ANNOTATIONARRAY)&&this._layer._plottingEdit.addAnnotationArrayPositionPt(a,o)}this._layer._plottingEdit.editMode===_0x21c04d.PLOTSYMBOL&&this._layer._plottingEdit.addAnnotationArrayPositionPt(a,e.length-1)}}this.drawAnnotationArray()}},wholeHeight:{get:function(){return this._wholeHeight},set:function(e){e===this._wholeHeight||"number"!=typeof e||(this._wholeHeight=e,this._initialize=!1)}},dotDepthTest:{get:function(){return this._dotDepthTest},set:function(e){e===this._dotDepthTest||e.constructor!==Boolean||(this._disableDepthTestDistance=e?Number.MAX_VALUE:Number.MIN_VALUE,this._dotDepthTest=e,this._initialize=!1)}},textContent:{get:function(){return this._textContent},set:function(e){e!==this._textContent&&(this._textContent=e,this._initialize=!1,this._isAnimationFeature||_0x43a805.getInstance().symbolModified.raiseEvent(this))}},isDistanceChangeMode:{get:function(){return this._isDistanceChangeMode},set:function(e){this._isDistanceChangeMode!==e&&(this._isDistanceChangeMode=e)}},changeModeDistanceMap:{get:function(){return 0===this._changeModeDistanceMap.size&&this._changeModeDistanceMap.set(this.showMode,1/0),this._changeModeDistanceMap},set:function(e){if(e instanceof Map){let t=new Map([...e.entries()]);this._changeModeDistanceMap.clear();for(let[e,i]of t)this._changeModeDistanceMap.set(e,i)}}},bubbleHeight:{get:function(){return this._bubbleHeight},set:function(e){this._bubbleHeight=e}},bubbleWidth:{get:function(){return this._bubbleWidth},set:function(e){this._bubbleWidth=e}},description:{get:function(){return this._description},set:function(e){this._description=e}},mediaList:{get:function(){return this._mediaList},set:function(e){this._mediaList=e}}});var _0x4b7693=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x85c339=_0x4b7693(void 0,(function(){return _0x85c339.toString().search("(((.+)+)+)+$").toString().constructor(_0x85c339).search("(((.+)+)+)+$")}));function _0x20e33d(e,t){this.subObjects=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._id=void 0===t?WebGLPlot.createGuid():t,this._initialize=!0,this.subFeatures=[],this.symbolName="GroupObject",this._isEdit=!1,this.libID=0,this.code=_0x585354.GROUPOBJECT,this.symbolType=_0x585354.GROUPOBJECT,this.addComponents(this.subObjects),this._GeoJsonFeature=null,this._centerPt3D=new _0x45ea17}_0x85c339(),_0x20e33d.prototype.addComponents=function(e){for(var t in e)e[t]&&(e[t]instanceof _0x521a23||e[t]instanceof _0x20e33d)&&this.subFeatures.push(e[t].clone());this._initialize=!1},_0x20e33d.prototype.unGroupObject=function(e){for(var t in this.subObjects)this.subObjects[t]._initialize=!1;return this.subObjects},_0x20e33d.prototype.setOffset=function(e,t){var i=e.z-this.getBounds().min_Z;for(var n in this.subFeatures){if(t)for(var r=0;r<this.subFeatures[n]._localPoints.length;r++)this.subFeatures[n]._localPoints[r].z+=i;else for(r=0;r<this.subFeatures[n]._localPoints.length;r++){var o=this.subFeatures[n]._localPoints[r];this.subFeatures[n]._localPoints[r]=new _0x45ea17(o.x+e.x,o.y+e.y,o.z+e.z)}this.subFeatures[n]._initialize=!1}},_0x20e33d.prototype.clone=function(){return new _0x20e33d(this.subFeatures)},_0x20e33d.prototype.update=function(e,t,i,n){if(0!==this.subFeatures.length)for(var r=this.getSubObjectsFromFeatures(this.subFeatures),o=0;o<r.length;o++)r[o].update(e,t,i,n)},_0x20e33d.prototype.initSymbol=function(){if(0!==this.subFeatures.length)for(var e=this.getSubObjectsFromFeatures(this.subFeatures),t=0;t<e.length;t++)e[t].initSymbol();this._initialize=!0},_0x20e33d.prototype.getFeatureByUuid=function(e){var t=this.getSubObjectsFromFeatures(this.subFeatures);for(var i in t)if(t[i]._id===e)return t[i];return null},_0x20e33d.prototype.updateFeatures=function(e){if(e&&e.length<=1){let t=this.getFeatureByUuid(e[0].uuid);if(t){let i=[];for(let t=0;t<e[0].localePoints.length;t++){const n=e[0].localePoints[t];i.push(new WebGLPlot.Cartesian3(n.x,n.y,n.z))}t.localPoints=i}}else e&&e.length>1&&(this._destroy(),this.addComponents(e));this._initialize=!1},_0x20e33d.prototype.getBounds=function(){var e=[],t=[],i=[],n=0,r=0;for(var o in this.subFeatures){var a=this.subFeatures[o];if(a.symbolType===_0x585354.SYMBOL_DOT||a.symbolType===_0x585354.SYMBOL_TEXT){a.showMode===_0x3f7d9f.Marker?n=a._model._initialRadius*a._model.scale:a.showMode===_0x3f7d9f.Vector&&(n=a._dotVector.vectorHeight);var s=a.localPoints[0];e.push(s.x),t.push(s.y),i.push(s.z),r=s.z+n}else if(a.symbolType===_0x585354.GROUPOBJECT){var l=a.getBounds();e.push(l.max_X),t.push(l.max_Y),i.push(l.max_Z),e.push(l.min_X),t.push(l.min_Y),i.push(l.min_Z)}else{var u=a.computeBounds();for(var c in a.localPoints){var h=a.localPoints[c];e.push(h.x),t.push(h.y),i.push(h.z)}e.push(u.maxX),t.push(u.maxY),e.push(u.minX),t.push(u.minY)}}var d=Math.max.apply({},e),f=Math.max.apply({},t),p=Math.max.apply({},i);return{max_X:d,max_Y:f,max_Z:p=p>r?p:r,min_X:Math.min.apply({},e),min_Y:Math.min.apply({},t),min_Z:Math.min.apply({},i),modelRadius:n}},_0x20e33d.prototype.getSubObjectsFromFeatures=function(e){var t=[];for(var i in e)e[i]instanceof _0x20e33d?t=t.concat(this.getSubObjectsFromFeatures(e[i].subFeatures)):t.push(e[i]);return t},_0x20e33d.prototype.getSymbolData=function(){if(null===this._GeoJsonFeature){var e={version:2,libID:0,code:1e3,type:"GRAPHICOBJECT"};for(var t in e.uuid=this._id,e.symbolName=this.symbolName,e.symbolType=this.symbolType,e.geometries=[],this.subFeatures)e.geometries.push(this.subFeatures[t].getSymbolData());return e}return this._GeoJsonFeature},_0x20e33d.prototype._destroy=function(){for(var e in this.subFeatures)this.subFeatures[e]._destroy(),this.subFeatures[e]=null;this.subFeatures=[]};var _0x391a38=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1f8d0c=_0x391a38(void 0,(function(){return _0x1f8d0c.toString().search("(((.+)+)+)+$").toString().constructor(_0x1f8d0c).search("(((.+)+)+)+$")}));_0x1f8d0c();var _0x39bd7a={UNKNOWN:0,PLAYING:1,PAUSE:2,STOP:3,RESET:4},_0x4d33de=Object.freeze(_0x39bd7a),_0x3d7be1=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x20766c=_0x3d7be1(void 0,(function(){return _0x20766c.toString().search("(((.+)+)+)+$").toString().constructor(_0x20766c).search("(((.+)+)+)+$")}));_0x20766c();var _0x5977c9={ANIMATION_UNKNOWN:-1,ANIMATION_WAY:0,ANIMATION_BLINK:1,ANIMATION_ATTRIBUTE:2,ANIMATION_SHOW:3,ANIMATION_ROTATE:4,ANIMATION_SCALE:5,ANIMATION_GROW:6,ANIMATION_HIDE_EXP:12,ANIMATION_REDUCE_EXP:13,ANIMATION_MOVEIN_EXP:14,ANIMATION_MOVEOUT_EXP:15,ANIMATION_ZOOMIN_EXP:16,ANIMATION_ZOOMOUT_EXP:17,ANIMATION_CURVE_EXP:18,ANIMATION_BROKENLINE_EXP:19,ANIMATION_GROW_EXP:20,ANIMATION_WAY_EXP:21,ANIMATION_BLINK_EXP:22,ANIMATION_SHOW_EXP:23,ANIMATION_MOVEVIEW_EXP:24,ANIMATION_WAY_GROUP:25},_0x3b65eb=Object.freeze(_0x5977c9),_0x2233e0=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x28109a=_0x2233e0(void 0,(function(){return _0x28109a.toString().search("(((.+)+)+)+$").toString().constructor(_0x28109a).search("(((.+)+)+)+$")}));_0x28109a();var WebGLPlot$e=window.WebGLPlot=window.WebGLPlot||{};function _0x519a53(e,t){if(e&&!(t.points.length<2)){this.plottingLayer=WebGLPlot$e.defaultValue(e,null),this.libID=WebGLPlot$e.defaultValue(t.libID,0),this.code=WebGLPlot$e.defaultValue(t.code,99999),this.url=WebGLPlot$e.defaultValue(t.url,""),this.startTime=WebGLPlot$e.defaultValue(t.startTime,0),this.duration=WebGLPlot$e.defaultValue(t.duration,5),this.lineColor=WebGLPlot$e.defaultValue(t.lineColor,new WebGLPlot$e.Color(1,0,0,1)),this.lineWidth=WebGLPlot$e.defaultValue(t.lineWidth,1),this.linePtsCount=WebGLPlot$e.defaultValue(t.linePtsCount,100),this.pathType=WebGLPlot$e.defaultValue(t.pathType,0),this.isShowPathLine=WebGLPlot$e.defaultValue(t.isShowPathLine,!1),this.isTangentDirection=WebGLPlot$e.defaultValue(t.isTangentDirection,!0),this.PathPts=t.points;var i=this;if(0===this.libID&&99999===this.code){var n={libID:this.libID,code:this.code,url:this.url,points:this.PathPts};e.createModelAndPicture(n,(function(e){e.feature&&(i.geo=e.feature)}))}else e.createSymbol(t.libID,t.code,t.points,(function(e){e.feature&&(i.geo=e.feature,i.geo.modelPath=t.url,i.geo.showMode=_0x3f7d9f.Marker)}));this._updatePathLinePts=[],this.Polylines=[],this.createPathLine()}}_0x519a53.prototype.setPathLineisVisible=function(e){this.isShowPathLine=e},_0x519a53.prototype.getPathLineisVisible=function(){return this.isShowPathLine},_0x519a53.prototype.setTangentDirection=function(e){this.isTangentDirection=e},_0x519a53.prototype.getTangentDirection=function(){return this.isTangentDirection},_0x519a53.prototype.play=function(){var e=new Date;this._animationState===_0x4d33de.PAUSE?this._innerStartTime+=e.getTime()/1e3-this._pauseTime:this._innerStartTime=e.getTime()/1e3,this._updatePathLinePts=[],this._lastExecute=!1,this._animationState=_0x4d33de.PLAYING},_0x519a53.prototype.pause=function(){if(this._animationState===_0x4d33de.PLAYING){this._animationState=_0x4d33de.PAUSE;var e=new Date;this._pauseTime=e.getTime()/1e3}},_0x519a53.prototype.stop=function(){this._animationState=_0x4d33de.STOP},_0x519a53.prototype.execute=function(){if(!this.geo||!this.canExecute())return!1;this.polyline&&(this.polyline.show=this.isShowPathLine);var e=this._ratio,t=new Object;if(!((t=this._findPos(e,this._shapePoints,t))&&t.pt instanceof _0x45ea17))return!1;this.geo.localPoints[0]=this.PtsToSpherical(t.pt);var i=t.index;if(this.isTangentDirection){t.angle;var n=this.modifyAnimationFollowPath(this._shapePoints,i,t.pt),r=57.29577951308232,o=this.geo.showMode;_0x3f7d9f.Marker===o?this.geo._modelRotate=new _0x45ea17(n.x*r,n.y*r,n.z*r):_0x3f7d9f.Vector===o&&(this.geo._vectorRotate=n)}return this.geo._initialize=!1,!0},_0x519a53.prototype.updatePathLine=function(e){this._updatePathLinePts.length>=this.linePtsCount&&this._updatePathLinePts.splice(0,1),this._updatePathLinePts.push(e);var t=WebGLPlot$e.Material.fromType(WebGLPlot$e.Material.ColorType,{color:this.lineColor});this.polyline&&(this.polyline.positions=this._updatePathLinePts,this.polyline.width=this.lineWidth,this.polyline._material=t)},_0x519a53.prototype.createPathLine=function(){this.computerPathLinePts();var e=WebGLPlot$e.Material.fromType(WebGLPlot$e.Material.ColorType,{color:this.lineColor});if(!this.polyline){var t={width:this.lineWidth,positions:this._shapePoints,material:e,id:this.geo.id+"_PathLine"};this.polyline=_0x24dc2a.addAlgoPloyline(this,t,this.plottingLayer._scene),this.polyline&&(this.polyline.show=!1)}},_0x519a53.prototype.computerPathLinePts=function(){if(0===this.pathType)this._shapePoints=this.PathPts;else{var e=_0x51d1e4.generateBezierCtrlPts(this.PathPts);this._shapePoints=_0x51d1e4.generateBezierPointsWithCtrlPts(e)}for(var t=[],i=0;i<this._shapePoints.length;i++){var n=this._shapePoints[i];t.push(n.x),t.push(n.y),t.push(n.z)}this._shapePoints=WebGLPlot$e.Cartesian3.fromDegreesArrayHeights(t),this._pathLineLength=0;for(var r=1;r<this._shapePoints.length;r++)this._pathLineLength+=_0x51d1e4.distance3D(this._shapePoints[r-1],this._shapePoints[r])},_0x519a53.prototype.canExecute=function(){if(this._animationState!==_0x4d33de.PLAYING)return!1;var e=(new Date).getTime()/1e3;if(this._innerStartTime+this.startTime>e)return!1;var t=this.getRatioByTime();return!(t>1&&this._lastExecute||t<0)},_0x519a53.prototype.getRatioByTime=function(){if(this._animationState!==_0x4d33de.PLAYING)return 0;var e=(new Date).getTime()/1e3;if(this._innerStartTime+this.startTime>e)return 0;var t=(e-this._innerStartTime-this.startTime)/this.duration;return t>=1&&!this._lastExecute?this._repeat?(this._innerStartTime=(new Date).getTime()/1e3,t=0,this._lastExecute=!1,this._animationState=_0x4d33de.PLAYING):(t=1,this._lastExecute=!0,this._animationState=_0x4d33de.STOP):t<0&&(t=0),this._ratio=t,t},_0x519a53.prototype._findPos=function(e,t,i){if(!(i=this.getPtsIndexByDistance(t,e*this._pathLineLength)).result)return!1;var n=i.pt;return this.isTangentDirection&&(i.angle=_0x51d1e4.radian(n,t[i.index])/Math.PI*180),i},_0x519a53.prototype.getPtsIndexByDistance=function(e,t){var i=e.length,n=new Object;if(t<0||i<2)return n.result=!1,n;for(var r=0,o=0;o!=i-1;++o)if((r+=_0x51d1e4.distance(e[o],e[o+1]))>=t){var a=_0x51d1e4.distance(e[o+1],e[o]);if(0==a)return e[o+1];var s=(r-t)/a,l=new _0x45ea17(0,0,0);return l.x=e[o+1].x+(e[o].x-e[o+1].x)*s,l.y=e[o+1].y+(e[o].y-e[o+1].y)*s,l.z=e[o+1].z+(e[o].z-e[o+1].z)*s,n.pt=l,n.result=!0,n.index=o,n}return n.result=!1,n},_0x519a53.prototype.modifyAnimationFollowPath=function(e,t,i){if(this.isTangentDirection){var n=.017453292519943295,r=this.PtsToSpherical(i),o=this.PtsToSpherical(e[t]),a=e[t],s=e[t+1],l=WebGLPlot$e.Cartesian3.fromDegreesArrayHeights([o.x,o.y,o.z+100]),u=new WebGLPlot$e.Cartesian3;u=WebGLPlot$e.Cartesian3.subtract(l[0],a,u),u=WebGLPlot$e.Cartesian3.normalize(u,u);var c=new WebGLPlot$e.Cartesian3;c=WebGLPlot$e.Cartesian3.subtract(s,a,c),c=WebGLPlot$e.Cartesian3.normalize(c,c);var h=new WebGLPlot$e.Cartesian3;h=WebGLPlot$e.Cartesian3.cross(c,u,h),h=WebGLPlot$e.Cartesian3.normalize(h,h);var d=new WebGLPlot$e.Cartesian3;d=WebGLPlot$e.Cartesian3.cross(h,c,d),d=WebGLPlot$e.Cartesian3.normalize(d,d),c=new WebGLPlot$e.Cartesian3(c.y,c.z,c.x),h=new WebGLPlot$e.Cartesian3(h.y,h.z,h.x),d=new WebGLPlot$e.Cartesian3(d.y,d.z,d.x),h=this.FromAngleAxis(h,-r.x*n,new WebGLPlot$e.Cartesian3(0,1,0)),h=this.FromAngleAxis(h,r.y*n,new WebGLPlot$e.Cartesian3(1,0,0)),h=WebGLPlot$e.Cartesian3.normalize(h,h),c=this.FromAngleAxis(c,-r.x*n,new WebGLPlot$e.Cartesian3(0,1,0)),c=this.FromAngleAxis(c,r.y*n,new WebGLPlot$e.Cartesian3(1,0,0)),c=WebGLPlot$e.Cartesian3.normalize(c,c),d=this.FromAngleAxis(d,-r.x*n,new WebGLPlot$e.Cartesian3(0,1,0)),d=this.FromAngleAxis(d,r.y*n,new WebGLPlot$e.Cartesian3(1,0,0)),d=WebGLPlot$e.Cartesian3.normalize(d,d);var f=this.ToEulerAnglesXYZ(h,c,d),p=-f.x,_=-f.y,m=f.z;return new WebGLPlot$e.Cartesian3(p,_,m)}},_0x519a53.prototype.FromAngleAxis=function(e,t,i){var n=.5*t,r=Math.sin(n),o=Math.cos(n),a=new _0x45ea17(r*i.x,r*i.y,r*i.z),s=new _0x45ea17;s=WebGLPlot$e.Cartesian3.cross(a,e,s);var l=new _0x45ea17;l=WebGLPlot$e.Cartesian3.cross(a,s,l);var u=new _0x45ea17(2*s.x*o,2*s.y*o,2*s.z*o),c=new _0x45ea17(2*l.x,2*l.y,2*l.z);return new _0x45ea17(e.x+u.x+c.x,e.y+u.y+c.y,e.z+u.z+c.z)},_0x519a53.prototype.ToEulerAnglesXYZ=function(e,t,i){var n=0,r=Math.asin(e.z);return r<Math.PI/2?r>-Math.PI/2?new _0x45ea17(Math.atan2(-t.z,i.z),r,n=Math.atan2(-e.y,e.x)):new _0x45ea17((n=0)-Math.atan2(t.x,t.y),r,n):new _0x45ea17(Math.atan2(t.x,t.y)-(n=0),r,n)},_0x519a53.prototype.PtsToSpherical=function(e){var t=this.plottingLayer._scene.globe.ellipsoid,i=new WebGLPlot$e.Cartesian3(e.x,e.y,e.z),n=t.cartesianToCartographic(i),r=WebGLPlot$e.CesiumMath.toDegrees(n.latitude);return new _0x45ea17(WebGLPlot$e.CesiumMath.toDegrees(n.longitude),r,n.height)};var _0x223e61=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x407bc5=_0x223e61(void 0,(function(){return _0x407bc5.toString().search("(((.+)+)+)+$").toString().constructor(_0x407bc5).search("(((.+)+)+)+$")}));_0x407bc5();var WebGLPlot$d=window.WebGLPlot=window.WebGLPlot||{};class _0x34d5f9 extends _0x521a23{constructor(e){super(e=WebGLPlot$d.defaultValue(e,WebGLPlot$d.defaultValue.EMPTY_OBJECT)),this._scalePoints=WebGLPlot$d.defaultValue(e.scalePoints,[]),this._scaleValues=WebGLPlot$d.defaultValue(e.scaleValues,[]),this._subSymbols=WebGLPlot$d.defaultValue(e.subSymbols,[]),this._isPixelLine=WebGLPlot$d.defaultValue(e.isPixelLine,!0),this._layer=WebGLPlot$d.defaultValue(e.layer,null),this._isEdit=WebGLPlot$d.defaultValue(e.isEdit,!1),this._extendWallOpacity=WebGLPlot$d.defaultValue(e.extendWallOpacity,.7),this._wholeHeight=0,this._isScalePtModify=!1,this._modifyScalePtParams=null,this._symbolAlgo=null,this._updateSubSize=!0,this._subSymbolSize=0,this._isAnimationFeature=!1,this._subSymbolScaleValue=.1,this.sceneMode=WebGLPlot$d.SceneMode.SCENE3D,this.fillCanvas=document.createElement("canvas"),this.mergeDefaultStyle(),this._isClampToGround=!1,this.PolygonFillInstances=[],this.WallInstances=[],this.GroundLineInstances=[],this._SubSymbolDefaultPixelSize=20,this.__symbolPolyLineArray=new Map,this.__symbolSurroundPolyLineArray1=new Map,this.__symbolSurroundPolyLineArray2=new Map,this.__cellLabel=void 0}initSymbol(){if(!this._initialize||this.sceneMode!==this._layer._scene.mode){if(this._initialize=!0,WebGLPlot$d.defined(this._layer)&&WebGLPlot$d.defined(this._layer._scene)&&(this.sceneMode=this._layer._scene.mode),this._clearCells(),!this._display||!this._layer.visibility)return _0x903609(this.__symbolPolyLineArray,!1),_0x903609(this.__symbolSurroundPolyLineArray1,!1),void _0x903609(this.__symbolSurroundPolyLineArray2,!1);if(_0x903609(this.__symbolPolyLineArray,!0),_0x903609(this.__symbolSurroundPolyLineArray1,!0),_0x903609(this.__symbolSurroundPolyLineArray2,!0),null===this._symbolAlgo){if(this._symbolAlgo=WebGLPlot$d.createAlgo({libID:this.libID,code:this.code}),this._subSymbols.length>0)this._symbolAlgo.subSymbols=this._subSymbols;else if(this._symbolAlgo.subSymbols.length>0){for(let e=0;e<this._symbolAlgo.subSymbols.length;e++){this._symbolAlgo.subSymbols[e].width2D=3}this.createSubSymbolData()}WebGLPlot$d.defined(this._dashLines)&&this._dashLines.length>0&&(this._symbolAlgo.dashLines=this._dashLines)}if(WebGLPlot$d.defined(this._symbolAlgo)){this.__setArrowType();var e=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.localPoints);if(e=_0x51d1e4.clearNextSamePts(e),!(this.symbolType!==_0x585354.SYMBOL_TEXT&&e.length<2)){var t,i=this.localPoints.length;this._dHeight=0;for(var n=[],r=0;r<i;r++)0===r?this._dHeight=this.localPoints[0].z:this._dHeight<this.localPoints[r].z&&(this._dHeight=this.localPoints[r].z),0!==this._wholeHeight&&(this.localPoints[r].z=this._wholeHeight,this._dHeight=this._wholeHeight),n.push(new _0x45ea17(this.localPoints[r].x,this.localPoints[r].y,this.localPoints[r].z));if(this._symbolAlgo.controlPoints=n,this.setAlgoDefaultValue(),this._scalePoints=[],this._symbolAlgo.scaleValues.length<=this._scaleValues.length&&(this._symbolAlgo.scaleValues=this._scaleValues),this._symbolAlgo.style={color:this.symbolStyle.lineColor},WebGLPlot$d.defined(this._symbolAlgo.subSymbolScaleValue)?this._subSymbolScaleValue=this._symbolAlgo.subSymbolScaleValue:this._symbolAlgo.subSymbolScaleValue=this._subSymbolScaleValue,this._isScalePtModify){var o=this._modifyScalePtParams.index,a=this._modifyScalePtParams.position;a.isScalePoint=!0,this._symbolAlgo.isEdit=!0,this._symbolAlgo.modifyPoint(o,a),t=this._symbolAlgo.components}else this._updateSubSize&&!this._isAnimationFeature?(this._symbolAlgo.subSymbolDefaultPixelSize=this._SubSymbolDefaultPixelSize,this._symbolAlgo.subSymbolSize=this.pixelDisToRealDis(this._symbolAlgo.controlPoints[0],this._symbolAlgo.subSymbolDefaultPixelSize),this._subSymbolSize=this._symbolAlgo.subSymbolSize,this._updateSubSize=!1,this.createSubSymbolData()):this._symbolAlgo.subSymbolSize=this._subSymbolSize,this._isAnimationFeature&&(this._symbolAlgo.isEdit=!0,this._symbolAlgo.subSymbolScaleValue=this._subSymbolScaleValue),this._symbolAlgo.isEdit=this._isEdit,this._symbolAlgo.calculateParts(),t=this._symbolAlgo.components;if(this._scalePoints=this._symbolAlgo.scalePoints,this._scaleValues=this._symbolAlgo.scaleValues,this._subSymbols=this._symbolAlgo.subSymbols,WebGLPlot$d.defined(t)){var s=[];if(s=Array.isArray(t)?t:[t],0===this.libID&&this.code===_0x585354.SYMBOL_COMBINATIONALCIRCLE)for(let e=0;e<s.length;e++){const t=s[e];if(t&&t.type===_0x585354.SYMBOL_ARBITRARYPOLYGON){s.splice(e,1);break}}this.createGeometryInstances(s,this._dHeight),this._pushCollentionInstances(this.id),_0x24dc2a.setUpdatePrimitive(!0,this._layer._scene),this._initSymbolFinished.raiseEvent(this)}}}}}getMinEditPts(){return WebGLPlot$d.defined(this._symbolAlgo)?this._symbolAlgo.minEditPts:0}getMaxEditPts(){return WebGLPlot$d.defined(this._symbolAlgo)?this._symbolAlgo.maxEditPts:0}getSymbolName(){return WebGLPlot$d.defined(this._symbolAlgo)&&0!==this._symbolAlgo.symbolName.length?this._symbolAlgo.symbolName:""}createGeometryInstances(e,t){e.length!==this.__symbolPolyLineArray.size&&_0x24dc2a.removeAlgoPloyline(this.__symbolPolyLineArray,this._layer._scene);var i=this.isAllPointsHaveZ(e),n=[],r=this.computeBounds(e);this.drawAnnotationArray();let o=[];for(var a=0;a<e.length;a++){var s=e[a];Array.isArray(s.positionPoints)||(s.positionPoints=[s.positionPoints]);var l=s.positionPoints;if(s.shapePts&&(l=s.shapePts),!WebGLPlot$d.defined(l))return n;if(0===this.libID&&34===this.code?(this._symbolAlgo.maxEditPts=1,this._symbolAlgo.minEditPts=1,l=[s.positionPoints[0]]):0===this.libID&&24===this.code&&(l=this._localPoints),l.length>1){_0x51d1e4.isSymbolCellCanFill(s)&&l.push(l[0]);for(var u=[],c=[],h=[],d=0;d<l.length;d++){var f=l[d];!WebGLPlot$d.defined(f)||isNaN(f.x)||isNaN(f.y)||((isNaN(f.z)||void 0===f.z)&&(f.z=0),WebGLPlot$d.defined(this._layer)&&WebGLPlot$d.defined(this._layer._scene)&&this._layer._scene.mode===WebGLPlot$d.SceneMode.SCENE2D&&(t=0,f.z=0),i&&0!==this.libID||48===this.code||24===this.code||32===this.code?c.push(new _0x45ea17(f.x,f.y,f.z)):(f=new _0x45ea17(f.x,f.y,t),c.push(new _0x45ea17(f.x,f.y,t))),u.push(WebGLPlot$d.Cartesian3.fromDegrees(f.x,f.y,f.z)),h.push(f.z))}if(u=this.interPolation(u),0===this.libID&&this.code===_0x585354.SYMBOL_COMBINATIONALCIRCLE&&29!==s.type&&o.push(u),0===this.libID&&this.code===_0x585354.SYMBOL_CONCENTRICCIRCLE){if(29===s.type&&o.unshift(u),0===s.style.strokeWidth&&s.style.lineWidthLimit)continue}else if(this.createFillGeometry(s,u),0===s.style.strokeWidth&&s.style.lineWidthLimit){this._symbolStyle._fillSymbolID||this.generateFillGeometry(u,void 0);continue}var p=this._symbolStyle._surroundLineType;s.style&&s.style.surroundLineLimit?(p===_0x2bfc5b.SURROUNDLINE_NONE&&(p=s.style.surroundLineType),this.generateSurroundLineGeometry(c,u,r,s.style,p,a)):_0x2bfc5b.SURROUNDLINE_NONE!==this._symbolStyle._surroundLineType?this.generateSurroundLineGeometry(c,u,r,this._symbolStyle,p,a):(_0x24dc2a.removeAlgoPloyline(this.__symbolSurroundPolyLineArray2,this._layer._scene),_0x24dc2a.removeAlgoPloyline(this.__symbolSurroundPolyLineArray1,this._layer._scene));var _=this._symbolStyle._lineWidth;s.style.lineWidthLimit&&WebGLPlot$d.defined(s.style.weight)?_=s.style.weight:s.style.lineWidthLimit&&WebGLPlot$d.defined(s.style.lineWidth)&&(_=s.style.lineWidth);var m=null;(m=s.style.lineColorLimit&&s.style.color?_0x51d1e4.StringtoColor(s.style.color):this._symbolStyle._lineColor).alpha=this._symbolStyle._opacity,this._layer.selectedFeature&&this._id===this._layer.selectedFeature.id&&!this._layer.isEditable&&(m=new WebGLPlot$d.Color(0,0,1,1));var $=WebGLPlot$d.getDefaultStyle({libID:this.libID,code:this.code});if($.color&&((m=_0x51d1e4.StringtoColor($.color)).alpha=this._symbolStyle._opacity),this.__symbolPolyLineArray.get(a)?(this.__symbolPolyLineArray.get(a).positions=u,this.__symbolPolyLineArray.get(a).material=new WebGLPlot$d.Material.fromType(WebGLPlot$d.Material.ColorType,{color:m}),this.__symbolPolyLineArray.get(a).width=_):this.__symbolPolyLineArray.set(a,this.createLineGeometry(u,_,m)),this._extendWallHeight>0&&u.length>1){m=this._symbolStyle._lineColor;m=WebGLPlot$d.Color.fromAlpha(m,this._extendWallOpacity),this.createExtendWall(u,m,h)}}else 1===l.length&&34===s.type&&this.addTextContent(s,t)}return o.length>0&1!==this._symbolStyle._fillSymbolID&&this.generateFillGeometry(o,void 0,!0),n}computeBounds(e){var t=0,i=0,n=180,r=180,o=!1;WebGLPlot$d.defined(e)||(e=this._symbolAlgo.components,o=!0);for(var a=0;a<e.length;a++){var s=e[a];if(0!==s.style.weight){Array.isArray(s.positionPoints)||(s.positionPoints=[s.positionPoints]);var l=void 0;if(0===this.libID&&1014!==this.code&&1022!==this.code&&_0x585354.SYMBOL_CIRCLE===s.type){let e=WebGLPlot$d.Cartesian3.fromDegrees(s.positionPoints[0].x,s.positionPoints[0].y,s.positionPoints[0].z),t=WebGLPlot$d.Cartesian3.fromDegrees(s.positionPoints[1].x,s.positionPoints[1].y,s.positionPoints[1].z);var u=WebGLPlot$d.Transforms.eastNorthUpToFixedFrame(e);const i=WebGLPlot$d.Cartesian3.distance(e,t);for(var c=_0x51d1e4.calcCirclePts(i,new WebGLPlot$d.Cartesian3(0,0,0),72),h=[],d=0;d<c.length;d++){var f=new WebGLPlot$d.Cartesian3,p=new WebGLPlot$d.Cartesian3;f=WebGLPlot$d.Cartesian3.multiplyByScalar(new WebGLPlot$d.Cartesian3(c[d].x,c[d].y,0),1,f),p=WebGLPlot$d.Matrix4.multiplyByPoint(u,f,p);var _=WebGLPlot$d.Cartographic.fromCartesian(p);const e=WebGLPlot$d.CesiumMath.toDegrees(_.longitude),t=WebGLPlot$d.CesiumMath.toDegrees(_.latitude);h.push(new WebGLPlot$d.Cartesian3(e,t,0))}l=h,s.shapePts=h}else l=WebGLPlot$d.getSpatialData(s.type,s.positionPoints),s.shapePts=l;if(WebGLPlot$d.defined(l))for(var m=0;m<l.length;++m)!WebGLPlot$d.defined(l[m])||(l[m].x<n&&(n=l[m].x),l[m].y<r&&(r=l[m].y),l[m].x>t&&(t=l[m].x),l[m].y>i&&(i=l[m].y))}}this._CenterPosition=new _0x45ea17((t+n)/2,(r+i)/2,0);var $=t-n,g=i-r;return o?{x:n+$/2,y:r,z:0,maxX:t,maxY:i,minX:n,minY:r}:$>=g?$:g}generateSurroundLineGeometry(e,t,i,n,r,o){var a,s,l,u=[],c=[],h=this.symbolStyle.surroundLineColor;switch(h=WebGLPlot$d.Color.fromAlpha(h,this.symbolStyle.opacity),n.surroundLineLimit&&(r=n.surroundLineType,n.lineColorLimit&&((!n.surroundLineColor||""===n.surroundLineColor)&&(n.surroundLineColor="#ffff00"),(h=_0x4c0f62(n.surroundLineColor)).alpha=n.surroundLineColorOpacity)),r){case _0x2bfc5b.SURROUNDLINE_ALL:s=this._symbolStyle._surroundLineWidth/2+this._symbolStyle._lineWidth/2,this._isPixelLine&&(s=this._surroundRatioVal*i),l=_0x51d1e4.getSurroundLinePts(e,s);for(var d=0;d<l.length;++d)u.push(new WebGLPlot$d.Cartesian3.fromDegrees(l[d].x,l[d].y,l[d].z));s=-s;for(var f=(l=_0x51d1e4.getSurroundLinePts(e,s)).length-1;f>=0;--f)c.push(new WebGLPlot$d.Cartesian3.fromDegrees(l[f].x,l[f].y,l[f].z));a=this._symbolStyle._surroundLineWidth;break;case _0x2bfc5b.SURROUNDLINE_INNER:case _0x2bfc5b.SURROUNDLINE_OUT:s=this._symbolStyle._surroundLineWidth/2+this._symbolStyle._lineWidth/2,this._isPixelLine&&(s=this._surroundRatioVal*i),r===_0x2bfc5b.SURROUNDLINE_INNER&&(s=-s),_0x24dc2a.removeAlgoPloyline(this.__symbolSurroundPolyLineArray2,this._layer._scene),l=_0x51d1e4.getSurroundLinePts(e,s);for(d=0;d<l.length;++d)u.push(new WebGLPlot$d.Cartesian3.fromDegrees(l[d].x,l[d].y,l[d].z));a=this._symbolStyle._surroundLineWidth}u.length<2||(u=this.interPolation(u),this.__symbolSurroundPolyLineArray1.get(o)?(this.__symbolSurroundPolyLineArray1.get(o).positions=u,this.__symbolSurroundPolyLineArray1.get(o).material=new WebGLPlot$d.Material.fromType(WebGLPlot$d.Material.ColorType,{color:h}),this.__symbolSurroundPolyLineArray1.get(o).width=a):this.__symbolSurroundPolyLineArray1.set(o,this.createLineGeometry(u,a,h,!0)),c.length>=2&&(c=this.interPolation(c),this.__symbolSurroundPolyLineArray2.get(o)?(this.__symbolSurroundPolyLineArray2.get(o).positions=c,this.__symbolSurroundPolyLineArray2.get(o).material=new WebGLPlot$d.Material.fromType(WebGLPlot$d.Material.ColorType,{color:h}),this.__symbolSurroundPolyLineArray2.get(o).width=a):this.__symbolSurroundPolyLineArray2.set(o,this.createLineGeometry(c,a,h,!0))))}createFillGeometry(e,t){if(!e.style.fillLimit||e.style.fill){if((e.style.fillLimit&&e.style.fill||0===e.style.fillStyle&&e.style.fillLimit)&&_0x51d1e4.isSymbolCellCanFill(e))return void this.generateFillGeometry(t,e.style);if(1!==this.symbolStyle.fillSymbolID&&(_0x51d1e4.isCanFill(this)||_0x51d1e4.isSymbolCellCanFill(e)))return void this.generateFillGeometry(t,void 0);if(WebGLPlot$d.defined(e.style.fillSymbolID)&&0===e.style.fillSymbolID)return void this.generateFillGeometry(t,e.style)}}generateFillGeometry(e,t,i){var n,r,o=void 0;if(i){let t=0;for(let i=1;i<e.length;i++)e[i].length>e[t].length&&(t=i);let i=WebGLPlot$d.clonePoints(e[t]);e.splice(t,1);let n=[];for(let t=0;t<e.length;t++){let i=e[t];n.push(new WebGLPlot$d.PolygonHierarchy(i))}let r=new WebGLPlot$d.PolygonHierarchy(i,n);o=new WebGLPlot$d.PolygonGeometry({polygonHierarchy:r,perPositionHeight:!0})}else o=WebGLPlot$d.PolygonGeometry.fromPositions({positions:e,perPositionHeight:!0});if(WebGLPlot$d.defined(t)&&t.fillLimit?n=WebGLPlot$d.defined(t.fillColor)&&t.fillColorLimit?_0x51d1e4.StringtoColor(t.fillColor):t.color&&t.fillColorLimit?WebGLPlot$d.Color.clone(_0x51d1e4.StringtoColor(t.color)):WebGLPlot$d.Color.clone(this._symbolStyle._lineColor):(n=WebGLPlot$d.Color.clone(this._symbolStyle._fillForeColor)).alpha=1-this._symbolStyle._fillOpaqueRate/100,this._layer.selectedFeature&&this._id===this._layer.selectedFeature.id&&!this._layer.isEditable&&(n=new WebGLPlot$d.Color(0,0,1,1)),null!==(r=this.isClampToGround?o:WebGLPlot$d.PolygonGeometry.createGeometry(o))&&WebGLPlot$d.defined(r)){var a=new WebGLPlot$d.GeometryInstance({geometry:r,id:this.id,attributes:{color:WebGLPlot$d.ColorGeometryInstanceAttribute.fromColor(n)}});a.ForeRGBA=n.toRgba(),a.BackRGBA=this._symbolStyle._fillBackColor.toRgba(),a.isClampToGround=this.isClampToGround,a._isAnimationFeature=this._isAnimationFeature,this.PolygonFillInstances.push(a)}}createFillCanvas(){var e=this.fillCanvas.width=100,t=this.fillCanvas.height=100;this._ctx=this.fillCanvas.getContext("2d");var i=null;switch(this._symbolStyle._fillGradientMode){case 1:i=this._ctx.createLinearGradient(0,0,e,t);break;case 2:var n=e/2,r=t/2,o=e/4,a=2*o;i=this._ctx.createRadialGradient(n,r,o,n,r,a)}return i.addColorStop(0,this._symbolStyle._fillForeColor.toCssColorString()),i.addColorStop(1,this._symbolStyle._fillBackColor.toCssColorString()),this._ctx.fillStyle=i,this._ctx.fillRect(0,0,100,100),this.fillCanvas}isAllPointsHaveZ(e){for(var t=!0,i=0;i<e.length;i++)for(var n=e[i],r=0;r<n.positionPoints.length;r++){var o=n.positionPoints[r];if(void 0===o||void 0===o.z){t=!1;break}}return t}createSubSymbolData(){0===this._subSymbols.length&&this._symbolAlgo&&(this._subSymbols=JSON.parse(JSON.stringify(this._symbolAlgo.subSymbols)));for(var e=0;e<this._subSymbols.length;e++)this.getServerData(this._subSymbols[e],e)}getServerData(e,t){var i=WebGLPlot$d.getServerData(e.libID,e.code,void 0,this._layer._scene._plottingID);if(i&&WebGLPlot$d.defined(i)&&null!==i){var n=[];if(!WebGLPlot$d.defined(i.innerCells))return;for(var r=0;r<i.innerCells.length;r++)i.innerCells[r].surroundLineFlag||n.push(i.innerCells[r]);return i.innerCells=n,e.symbolData=i,this._symbolAlgo.subSymbols[t]&&this._symbolAlgo.subSymbols[t].width2D&&(e.width2D=this._symbolAlgo.subSymbols[t].width2D),this._symbolAlgo.subSymbols[t]&&this._symbolAlgo.subSymbols[t].lineColor&&(e.lineColor=this._symbolAlgo.subSymbols[t].lineColor),this._symbolAlgo.subSymbols[t]=e,this._initialize=!1,!0}}pixelDisToRealDis(e,t){if(void 0===e)return 0;var i=this._layer._scene,n=WebGLPlot$d.Cartesian3.fromDegrees(e.x,e.y,e.z),r=WebGLPlot$d.SceneTransforms.wgs84ToWindowCoordinates(i,n);if(!WebGLPlot$d.defined(r))return.001;var o=new WebGLPlot$d.Cartesian2(r.x,r.y+t),a=_0x51d1e4.getPosition2(i,r),s=_0x51d1e4.getPosition2(i,o);return _0x51d1e4.distance(a,s)}setAlgoDefaultValue(){if(this._updateSubSize&&0===this._symbolAlgo.libID&&1019===this._symbolAlgo.code&&(this._symbolAlgo.startAngle=0,this._symbolAlgo.endAngle=360),0===this._symbolAlgo.libID&&1022===this._symbolAlgo.code){WebGLPlot$d.defined(this._symbolAlgo.radius)||(this._symbolAlgo.radius=[]);var e=this.localPoints;if(this._symbolAlgo.radius.length<e.length){var t=this.pixelDisToRealDis(e[0],this._symbolAlgo.defaultRadius);this._symbolAlgo.radius.push(t)}}}addTextContent(e,t){if(WebGLPlot$d.defined(e.textContent)&&null!==e.textContent){0===e.textContent.length&&(!WebGLPlot$d.defined(this.textContent)||0===this.textContent.length)&&(this.textContent="AaBb"),0!==e.textContent.length&&(this.textContent=e.textContent);var i=this.textContent,n=WebGLPlot$d.Cartesian3.fromDegrees(e.positionPoints[0].x,e.positionPoints[0].y,t),r=this._symbolTextStyle,o=new WebGLPlot$d.Color(r._foreColor.red,r._foreColor.green,r._foreColor.blue,r._foreColor.alpha);this._isSelected&&(o=new WebGLPlot$d.Color(0,1,0,1));var a,s=r._fontSize+"px "+r._fontName;0===this.libID&&34===this.code?a={style:r.outline?WebGLPlot$d.LabelStyle.FILL_AND_OUTLINE:WebGLPlot$d.LabelStyle.FILL,outlineColor:r._backColor,outlineWidth:r.outlineWidth,position:n,text:i,font:s,fillColor:o,horizontalOrigin:WebGLPlot$d.HorizontalOrigin.CENTER,id:this._id}:(WebGLPlot$d.defined(e.style.fontColorLimit)&&WebGLPlot$d.defined(e.style.fontColor)&&e.style.fontColorLimit&&(o=_0x4c0f62(e.style.fontColor)),a={position:n,text:i,font:s,fillColor:o,horizontalOrigin:WebGLPlot$d.HorizontalOrigin.CENTER}),this.__cellLabel=_0x24dc2a.addAlgoLabel(this,a,this._layer._scene),this.__cellLabel.SymbolType=_0x585354.SYMBOL_TEXT}}createExtendWall(e,t,i){var n=[],r=[];if(i.length===e.length)for(let e=0;e<i.length;e++){var o=i[e]-this._extendWallHeight;n.push(o),0===this._dHeight?r.push(.1):r=void 0}else for(var a=0;a<e.length;a++){(o=WebGLPlot$d.Cartographic.fromCartesian(e[a]).height-this._extendWallHeight)<0&&(o=0),n.push(o),0===this._dHeight?r.push(.1):r=void 0}var s=new WebGLPlot$d.WallGeometry({positions:e,minimumHeights:n,maximumHeights:r}),l=WebGLPlot$d.WallGeometry.createGeometry(s);if(WebGLPlot$d.defined(l)){var u=WebGLPlot$d.ColorGeometryInstanceAttribute.fromColor({alpha:0,red:1,green:1,blue:0}),c=new WebGLPlot$d.GeometryInstance({geometry:l,attributes:{color:u},id:this.id});c.ForeRGBA=t.toRgba(),c._isAnimationFeature=this._isAnimationFeature,this.WallInstances.push(c)}}setSubSymbols(e,t){return(0!==this._symbolAlgo.subSymbols.length||0!==this.libID||1025===this.code)&&e!==this._subSymbols[t]&&(this.getServerData(e,t),this._initialize=!1,_0x43a805.getInstance().symbolModified.raiseEvent(this),!0)}createLineGeometry(e,t,i,n){if(this.isClampToGround&&!this.isDrawing)return this.createGroundPolylineGeometry(e,t,i,n),null;var r=void 0;if(this._isPixelLine){var o={width:t,positions:e,material:WebGLPlot$d.Material.fromType(WebGLPlot$d.Material.ColorType,{color:i}),id:this.id};return(o=_0x24dc2a.addAlgoPloyline(this,o,this._layer._scene)).SymbolType=_0x585354.SYMBOL_ALGO,o}var a=new WebGLPlot$d.PolylineVolumeGeometry({polylinePositions:e,shapePositions:[new WebGLPlot$d.Cartesian2(-.5*t,-.5*t),new WebGLPlot$d.Cartesian2(.5*t,-.5*t),new WebGLPlot$d.Cartesian2(.5*t,.5*t),new WebGLPlot$d.Cartesian2(-.5*t,.5*t)],cornerType:2});if(r=WebGLPlot$d.PolylineVolumeGeometry.createGeometry(a),!WebGLPlot$d.defined(r))return null;var s=new WebGLPlot$d.GeometryInstance({geometry:r,id:this.id,attributes:{color:i}});return n&&(s.bIsSurroundLine=!0),s}createGroundPolylineGeometry(e,t,i,n){var r=new WebGLPlot$d.GroundPolylineGeometry({vertexFormat:WebGLPlot$d.VertexFormat.POSITION_ONLY,positions:e,width:t}),o=new WebGLPlot$d.GeometryInstance({geometry:r,attributes:{color:WebGLPlot$d.ColorGeometryInstanceAttribute.fromColor(i)},id:this._id});n&&(o.bIsSurroundLine=!0),o._isAnimationFeature=this._isAnimationFeature,this.GroundLineInstances.push(o)}_destroy(){this._clearCells(),_0x24dc2a.removeAllAlgoPloyline(this,this._layer._scene),_0x24dc2a.setUpdatePrimitive(!0,this._layer._scene),_0x43a805.getInstance().symbolDestroyed.raiseEvent(this.id)}_clearCells(){_0x24dc2a.removeAllAlgoLabel(this,this._layer._scene),this.__cellLabel=void 0,this.PolygonFillInstances=[],this.WallInstances=[],this.GroundLineInstances=[],this._pushCollentionInstances(this.id)}_pushCollentionInstances(e){this.PolygonFillInstances.length>0?_0x24dc2a.setPolygonFillInstances(e,this.PolygonFillInstances,this._layer._scene):_0x24dc2a.setPolygonFillInstances(e,[],this._layer._scene),this.WallInstances.length>0?_0x24dc2a.setWallInstances(e,this.WallInstances,this._layer._scene):_0x24dc2a.setWallInstances(e,[],this._layer._scene),this.GroundLineInstances.length>0?_0x24dc2a.setGroundInstances(e,this.GroundLineInstances,this._layer._scene):_0x24dc2a.setGroundInstances(e,[],this._layer._scene)}clone(){var e=new _0x34d5f9({layer:this._layer,libID:this._libID,code:this._code,localPoints:this.localPoints,serverData:this._serverData});return this._superClone(e),e._markHalo=JSON.parse(JSON.stringify(this._markHalo)),e._extendWallHeight=JSON.parse(JSON.stringify(this._extendWallHeight)),e._scaleValues=JSON.parse(JSON.stringify(this._scaleValues)),e._subSymbolSize=JSON.parse(JSON.stringify(this._subSymbolSize)),e._subSymbols=JSON.parse(JSON.stringify(this._subSymbols)),e._isUpdateSubSymbolSize=JSON.parse(JSON.stringify(this._updateSubSize)),e._isAnimationFeature=JSON.parse(JSON.stringify(this._isAnimationFeature)),e._subSymbolScaleValue=JSON.parse(JSON.stringify(this._subSymbolScaleValue)),e._extendWallOpacity=JSON.parse(JSON.stringify(this._extendWallOpacity)),e.isClampToGround=JSON.parse(JSON.stringify(this.isClampToGround)),e}interPolation(e){var t=[];for(let n=0;n<e.length;n++){const r=e[n];var i=WebGLPlot$d.Cartographic.fromCartesian(r);t.push(i.height)}let n=WebGLPlot$d.PolylinePipeline.generateCartesianRhumbArc({positions:e,height:t,granularity:WebGLPlot$d.Plotting._AlgoSymoblPipelineGranularity});return n.push(e[e.length-1]),n}__setArrowType(){this._symbolAlgo&&(WebGLPlot$d.defined(this._arrowHeadType)&&(this._symbolAlgo.arrowHeadType=this._arrowHeadType),WebGLPlot$d.defined(this._arrowBodyType)&&(this._symbolAlgo.arrowBodyType=this._arrowBodyType),WebGLPlot$d.defined(this._arrowTailType)&&(this._symbolAlgo.arrowTailType=this._arrowTailType))}setSubSymbolLineColor(e,t){if(!this._symbolAlgo||this._symbolAlgo.subSymbols.length<=0)return;let i=this._symbolAlgo.subSymbols[e];i&&(i.lineColor=t.toCssHexString(),this._initialize=!1,this._isAnimationFeature||_0x43a805.getInstance().symbolModified.raiseEvent(this))}getSubSymbolLineColor(e){if(!this._symbolAlgo||this._symbolAlgo.subSymbols.length<=0)return;let t=this._symbolAlgo.subSymbols[e];return t?WebGLPlot$d.Color.fromCssColorString(t.lineColor):void 0}setSubSymbolLineWidth(e,t){if(!this._symbolAlgo||this._symbolAlgo.subSymbols.length<=0)return;let i=this._symbolAlgo.subSymbols[e];i&&(i.width2D=t,this._initialize=!1,this._isAnimationFeature||_0x43a805.getInstance().symbolModified.raiseEvent(this))}getSubSymbolLineWidth(e){if(!this._symbolAlgo||this._symbolAlgo.subSymbols.length<=0)return;let t=this._symbolAlgo.subSymbols[e];return t?t.width2D:void 0}}function _0x4c0f62(e){if(!e||""===e)return new WebGLPlot$d.Color(1,0,0);var t=parseInt(e.slice(1,3),16)/255,i=parseInt(e.slice(3,5),16)/255,n=parseInt(e.slice(5,7),16)/255;return new WebGLPlot$d.Color(t,i,n)}function _0x903609(e,t){e.forEach((e=>{e.show!==t&&(e.show=t)}))}Object.defineProperties(_0x34d5f9.prototype,{subSymbols:{get:function(){return this._subSymbols},set:function(e){e===this._subSymbols||!Array.isArray(e)||(this._subSymbols=e,this._initialize=!1,this._isAnimationFeature||_0x43a805.getInstance().symbolModified.raiseEvent(this))}},ispixelLine:{get:function(){return this._ispixelLine},set:function(e){e===this._ispixelLine||e.constructor!==Boolean||(this._ispixelLine=e,this._initialize=!1)}},surroundRatioVal:{get:function(){return this._surroundRatioVal},set:function(e){e===this._surroundRatioVal||"number"!=typeof e||(this._surroundRatioVal=e,this._initialize=!1,this._isAnimationFeature||_0x43a805.getInstance().symbolModified.raiseEvent(this))}},extendWallHeight:{get:function(){return this._extendWallHeight},set:function(e){e===this._extendWallHeight||"number"!=typeof e||(this._extendWallHeight=e,this._initialize=!1,this._isAnimationFeature||_0x43a805.getInstance().symbolModified.raiseEvent(this))}},extendWallOpacity:{get:function(){return Math.round(100*(1-this._extendWallOpacity))},set:function(e){this.extendWallOpacity==e||"number"!=typeof e||(this._extendWallOpacity=1-e/100,this._initialize=!1)}},isClampToGround:{get:function(){return this._isClampToGround},set:function(e){e!==this._isClampToGround&&(this._isClampToGround=e,this._initialize=!1,this._isAnimationFeature||_0x43a805.getInstance().symbolModified.raiseEvent(this))}},arrowHeadType:{get:function(){return this._arrowHeadType},set:function(e){"number"==typeof e&&(this._arrowHeadType=e,this._initialize=!1,this._isAnimationFeature||_0x43a805.getInstance().symbolModified.raiseEvent(this))}},arrowBodyType:{get:function(){return this._arrowBodyType},set:function(e){"number"==typeof e&&(this._arrowBodyType=e,this._initialize=!1,this._isAnimationFeature||_0x43a805.getInstance().symbolModified.raiseEvent(this))}},arrowTailType:{get:function(){return this._arrowTailType},set:function(e){"number"==typeof e&&(this._arrowTailType=e,this._initialize=!1,this._isAnimationFeature||_0x43a805.getInstance().symbolModified.raiseEvent(this))}},dashLines:{get:function(){return this._symbolAlgo?this._symbolAlgo.dashLines:[]},set:function(e){!Array.isArray(e)||!this._symbolAlgo||(this._symbolAlgo.dashLines=e,this._initialize=!1,this._isAnimationFeature||_0x43a805.getInstance().symbolModified.raiseEvent(this))}}});var _0x58be83=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3b5146=_0x58be83(void 0,(function(){return _0x3b5146.toString().search("(((.+)+)+)+$").toString().constructor(_0x3b5146).search("(((.+)+)+)+$")}));_0x3b5146();var _0x3d2724={LeftUp:0,LeftDown:1,RightUp:2,RightDown:3,Up:4,Down:5,Left:6,Right:7,Middle:8},_0x59fec3=Object.freeze(_0x3d2724),_0x2d2f15=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2d73fb=_0x2d2f15(void 0,(function(){return _0x2d73fb.toString().search("(((.+)+)+)+$").toString().constructor(_0x2d73fb).search("(((.+)+)+)+$")}));function _0x4df35e(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.symbolType=WebGLPlot.defaultValue(e.symbolType,_0x585354.SYMBOL_UNKNOW),this.points=WebGLPlot.defaultValue(e.points,[]),this.lineColorLimit=WebGLPlot.defaultValue(e.lineColorLimit,!1),this.lineColor=WebGLPlot.defaultValue(e.lineColor,WebGLPlot.Color.RED),this.lineTypeLimit=WebGLPlot.defaultValue(e.lineTypeLimit,!1),this.lineWidthLimit=WebGLPlot.defaultValue(e.lineWidthLimit,!1),this.lineWidth=WebGLPlot.defaultValue(e.lineWidth,-1),this.fillLimit=WebGLPlot.defaultValue(e.fillLimit,!1),this.fillStyle=WebGLPlot.defaultValue(e.fillStyle,!1),this.fillColorLimit=WebGLPlot.defaultValue(e.fillColorLimit,!1),this.fillColor=WebGLPlot.defaultValue(e.fillColor,new WebGLPlot.Color(1,0,0,.8)),this.fontColorLimit=WebGLPlot.defaultValue(e.fontColorLimit,!1),this.textContent=WebGLPlot.defaultValue(e.textContent,""),this.textStyle=WebGLPlot.defaultValue(e.textContent,void 0),this.textAngle=WebGLPlot.defaultValue(e.textAngle,0),this.textBounds=WebGLPlot.defaultValue(e.textBounds,void 0)}_0x2d73fb();var _0x205b78=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xb7882d=_0x205b78(void 0,(function(){return _0xb7882d.toString().search("(((.+)+)+)+$").toString().constructor(_0xb7882d).search("(((.+)+)+)+$")}));function _0x1a65af(){this._code=_0x585354.SYMBOL_ARC,this._libID=0,this._symbolType=_0x585354.SYMBOL_ARC,this._symbolName=WebGLPlot.plotI18n("arc"),this._minEditPts=3,this._maxEditPts=3}_0xb7882d(),_0x1a65af.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(2==t.length&&_0x51d1e4.isSamePt(t[0],t[1])||t.length<this._minEditPts)return null;var i=_0x51d1e4.generateArcInfo(t[0],t[1],t[2]);i.dStartAngle*=Math.PI/180,i.dEndAngle*=Math.PI/180;var n,r=_0x51d1e4.generateArcSpatialData(i.pntCenter,i.dRadius,i.dRadius,0,i.dStartAngle,i.dEndAngle);return 0!==r.length&&(n=new _0x4df35e({points:r,symbolType:_0x585354.SYMBOL_POLYLINE})),n},_0x1a65af.prototype.getMinEditPts=function(){return this._minEditPts},_0x1a65af.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x1a65af.prototype.getSymbolName=function(){return this._symbolName};var _0x36ef89=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3c2753=_0x36ef89(void 0,(function(){return _0x3c2753.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c2753).search("(((.+)+)+)+$")}));function _0x50ef33(){this._code=_0x585354.SYMBOL_POLYBEZIER,this._libID=0,this._symbolType=_0x585354.SYMBOL_POLYBEZIER,this._symbolName=WebGLPlot.plotI18n("bezier"),this._minEditPts=2,this._maxEditPts=9999}_0x3c2753(),_0x50ef33.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;var i=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsWithCtrlPt(t);return SuperMapAlgoPlot.PlottingUtil.clearSamePts(i),new _0x4df35e({points:i,symbolType:_0x585354.SYMBOL_POLYLINE})},_0x50ef33.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x50ef33.prototype.getMinEditPts=function(){return this._minEditPts},_0x50ef33.prototype.getSymbolName=function(){return this._symbolName};var _0x5f0266=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x35d2ff=_0x5f0266(void 0,(function(){return _0x35d2ff.toString().search("(((.+)+)+)+$").toString().constructor(_0x35d2ff).search("(((.+)+)+)+$")}));function _0x2dd781(){this._code=_0x585354.SYMBOL_ELLIPSE,this._libID=0,this._symbolType=_0x585354.SYMBOL_ELLIPSE,this._symbolName=WebGLPlot.plotI18n("ellipse"),this._maxEditPts=3,this._minEditPts=3}_0x35d2ff(),_0x2dd781.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x2dd781.prototype.getMinEditPts=function(){return this._minEditPts},_0x2dd781.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t,i,n,r=e.points;if(r.length<this._minEditPts)return null;t=_0x51d1e4.distance(r[0],r[2]),i=_0x51d1e4.distance(r[0],r[1]),n=_0x51d1e4.radian(r[0],r[1]);var o=2*Math.PI,a=_0x51d1e4.generateArcSpatialData(r[0],i,t,n,0,o);return a.push[a[0].clone()],new _0x4df35e({symbolType:_0x585354.SYMBOL_ARBITRARYPOLYGON,points:a})},_0x2dd781.prototype.getSymbolName=function(){return this._symbolName};var _0x206c67=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x9149b3=_0x206c67(void 0,(function(){return _0x9149b3.toString().search("(((.+)+)+)+$").toString().constructor(_0x9149b3).search("(((.+)+)+)+$")}));function _0x3637c(){this._code=_0x585354.SYMBOL_PARALLELOGRAM,this._libID=0,this._symbolType=_0x585354.SYMBOL_PARALLELOGRAM,this._symbolName=WebGLPlot.plotI18n("parallel"),this._maxEditPts=3,this._minEditPts=3}_0x9149b3(),_0x3637c.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;t.length>this._maxEditPts&&t.splice(3,t.length-3);for(var i=t[0].x+(t[2].x-t[1].x),n=t[0].y+(t[2].y-t[1].y),r=new WebGLPlot.Cartesian3(i,n,0),o=[],a=0;a<t.length;++a)o.push(t[a].clone());return o.push(r),o.push(o[0].clone()),new _0x4df35e({symbolType:_0x585354.SYMBOL_ARBITRARYPOLYGON,points:o})},_0x3637c.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x3637c.prototype.getMinEditPts=function(){return this._minEditPts},_0x3637c.prototype.getSymbolName=function(){return this._symbolName};var _0x42369f=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x66a950=_0x42369f(void 0,(function(){return _0x66a950.toString().search("(((.+)+)+)+$").toString().constructor(_0x66a950).search("(((.+)+)+)+$")}));function _0x4ca0d3(){this._code=_0x585354.SYMBOL_RECTANGLE,this._libID=0,this._symbolType=_0x585354.SYMBOL_RECTANGLE,this._symbolName=WebGLPlot.plotI18n("rectangle"),this._minEditPts=2,this._maxEditPts=2}_0x66a950(),_0x4ca0d3.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;var i=new WebGLPlot.Cartesian2(t[0].x,t[0].y),n=new WebGLPlot.Cartesian2(t[1].x,t[1].y),r=i.clone();return new _0x4df35e({points:[r,new WebGLPlot.Cartesian2(n.x,i.y),n.clone(),new WebGLPlot.Cartesian2(i.x,n.y),r.clone()],symbolType:_0x585354.SYMBOL_ARBITRARYPOLYGON})},_0x4ca0d3.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x4ca0d3.prototype.getMinEditPts=function(){return this._minEditPts},_0x4ca0d3.prototype.getSymbolName=function(){return this._symbolName};var _0x2e067d=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x287e2f=_0x2e067d(void 0,(function(){return _0x287e2f.toString().search("(((.+)+)+)+$").toString().constructor(_0x287e2f).search("(((.+)+)+)+$")}));function _0x1621e9(){this._code=_0x585354.SYMBOL_CIRCLE,this._libID=0,this._symbolType=_0x585354.SYMBOL_CIRCLE,this._symbolName=WebGLPlot.plotI18n("circle"),this._minEditPts=2,this._maxEditPts=2}_0x287e2f(),_0x1621e9.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(null===t||t.length<this._minEditPts)return null;t.length>this._maxEditPts&&t.splice(2,t.length-this._maxEditPts);var i=_0x51d1e4.distance(t[0],t[1]),n=_0x51d1e4.calcCirclePts(i,t[0]);return new _0x4df35e({symbolType:_0x585354.SYMBOL_ARBITRARYPOLYGON,points:n})},_0x1621e9.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x1621e9.prototype.getMinEditPts=function(){return this._minEditPts},_0x1621e9.prototype.getSymbolName=function(){return this._symbolName};var _0x2dbff4=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x5ce552=_0x2dbff4(void 0,(function(){return _0x5ce552.toString().search("(((.+)+)+)+$").toString().constructor(_0x5ce552).search("(((.+)+)+)+$")}));function _0x34af79(){this._code=_0x585354.SYMBOL_CHORD,this._libID=0,this._symbolType=_0x585354.SYMBOL_CHORD,this._symbolName=WebGLPlot.plotI18n("chord"),this._maxEditPts=3,this._minEditPts=3}_0x5ce552(),_0x34af79.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x34af79.prototype.getMinEditPts=function(){return this._minEditPts},_0x34af79.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(2==t.length&&_0x51d1e4.isSamePt(t[0],t[1])||t.length<this._minEditPts)return null;var i=_0x51d1e4.generateArcInfo(t[0],t[1],t[2]);i.dStartAngle*=Math.PI/180,i.dEndAngle*=Math.PI/180;var n=_0x51d1e4.generateArcSpatialData(i.pntCenter,i.dRadius,i.dRadius,0,i.dStartAngle,i.dEndAngle);return n.push(n[0].clone()),new _0x4df35e({points:n,symbolType:_0x585354.SYMBOL_ARBITRARYPOLYGON})},_0x34af79.prototype.getSymbolName=function(){return this._symbolName};var _0x4a4f56=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x17fbdf=_0x4a4f56(void 0,(function(){return _0x17fbdf.toString().search("(((.+)+)+)+$").toString().constructor(_0x17fbdf).search("(((.+)+)+)+$")}));_0x17fbdf();var _0x457963={TOP:4,BOTTOM:5,LEFT:6,RIGHT:7},_0x758b23=Object.freeze(_0x457963),_0x3d7b44=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3a9b80=_0x3d7b44(void 0,(function(){return _0x3a9b80.toString().search("(((.+)+)+)+$").toString().constructor(_0x3a9b80).search("(((.+)+)+)+$")}));function _0x225f00(e,t,i,n){n=n||{},this.volume=e>1?1:e,this.position=t,(void 0===this.position||null===this.position)&&(this.position=_0x758b23.TOP),this.offsetX=n.offsetX?n.offsetX:0,this.offsetY=n.offsetY?n.offsetY:0,this.width=n.width?n.width:40,this.height=n.height?n.height:8,null!==i&&WebGLPlot.defined(i)?this.style=i:(this.style={},this.style.fillColor=new WebGLPlot.Color(0,1,0),this.style.frameColor=new WebGLPlot.Color(0,0,0)),this.bounds=null}_0x3a9b80(),_0x225f00.clone=function(e){var t=new _0x225f00(e.volume,e.position,null,null);return t.offsetX=e.offsetX,t.offsetY=e.offsetY,t.width=e.width,t.height=e.height,t.bounds=e.bounds,t.style=e.style,t};var _0x186144=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2160aa=_0x186144(void 0,(function(){return _0x2160aa.toString().search("(((.+)+)+)+$").toString().constructor(_0x2160aa).search("(((.+)+)+)+$")}));_0x2160aa();const _0x5a96c=8;function _0x494c68(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._symbolDot=WebGLPlot.defaultValue(e.symbolDot,void 0),this._symbolSize=WebGLPlot.defaultValue(e.symbolDot._gridSymbolSize,void 0),this._xOffset=0,this._anchorPoint=WebGLPlot.defaultValue(e.symbolDot._anchorPoint,void 0),this._canvas=void 0,this._surroundLineType=void 0,this._isFirst=!0,this.returnisflag=!1,this._OffsetText_Down=0,this.initCanvas(),this._symbolDot._oldSymbolSize=this._symbolDot._symbolSizeInLib,this._dotGridScale=1,this._OffSetY=0,this.TopOffSet=0,this._textContentLength=0}function _0x36cec0(e,t){for(var i=[],n=t,r=0;r<n.length;r++)for(var o=0;o<n[r].points.length;o++){var a=n[r].points[o];i.push(a.x)}var s=Math.min.apply({},i),l=(Math.max.apply({},i)+s)/2;Math.abs(s/e._dotGridScale)<_0x5a96c&&(l=0,e.returnisflag=!0);for(r=0;r<n.length;r++)for(o=0;o<n[r].points.length;o++){(a=n[r].points[o]).x=2*l-a.x,n[r].points[o]=a}return n}function _0x540635(e){return null===e||typeof e>"u"||""===e||e.match(/^[ ]+$/)}Object.defineProperties(_0x494c68.prototype,{symbolDot:{get:function(){return this._symbolDot},set:function(e){this._symbolDot=e}}}),_0x494c68.prototype.drawDotSymbolGraphic=function(e){if(!WebGLPlot.defined(this._symbolDot))return null;if(this._OffsetText_Down=0,this.DEFAULTLINEWIDTH=this._symbolDot._billboardBoundsLineWidth,null!==this._symbolDot._textContent&&""!==this._symbolDot._textContent&&(this._textContentLength=this._ctx.measureText(this._symbolDot._textContent).width),this.symbolDot.BloodVolumes.length>1){for(var t=[],i=0;i<this.symbolDot.BloodVolumes.length;i++)t.push(_0x225f00.clone(this.symbolDot.BloodVolumes[i]));this.symbolDot.BloodVolumes=t}this.fontSize=0!==this._textContentLength?this._symbolDot._symbolTextStyle._fontSize:0,this.isForVector=e;var n=this.transformPoints();this.computeImageBounds(n),this.drawPicture(n);var r=this._canvas.toDataURL("image/png");return this._xOffset=0,r},_0x494c68.prototype.transformPoints=function(){this.computerScale();for(var e=[],t=[],i=this._symbolDot._canvasSymbolData,n=[],r=0;r<i.length;r++){(a=i[r]).surroundLineFlag&&0===this.symbolDot.symbolStyle.surroundLineType||n.push(a)}for(var o=0;o<n.length;o++){for(var a=n[o],s=[],l=0;l<a.positionPoints.length;l++)s.push(new WebGLPlot.Cartesian3(a.positionPoints[l].x,a.positionPoints[l].y,0));var u={points:s,cell:a,style:a.style,type:a.type,flag:a.surroundLineFlag};t.push(this.computePts(u))}var c=this.getMax_Y(t);for(o=0;o<t.length;o++){a=t[o];var h=[];for(l=0;l<a.points.length;l++){var d=new WebGLPlot.Cartesian2(a.points[l].x,a.points[l].y);d.y=(-d.y+c)*this._dotGridScale,d.x*=this._dotGridScale,h.push(d)}u={points:h,cell:a,style:a.style,type:a.type,flag:a.surroundLineFlag};e.push(u)}return this._symbolDot._isMiddleMarkExist&&this._symbolDot._middleMarkBounds&&(this._middleMarkBounds={},this._middleMarkBounds.x=this._symbolDot._middleMarkBounds.left*this._dotGridScale,this._middleMarkBounds.y=(-this._symbolDot._middleMarkBounds.top+c)*this._dotGridScale,this._middleMarkBounds.width=this._symbolDot._middleMarkBounds.right-this._symbolDot._middleMarkBounds.left,this._middleMarkBounds.height=this._symbolDot._middleMarkBounds.top-this._symbolDot._middleMarkBounds.bottom,this._middleMarkBounds.width*=this._dotGridScale,this._middleMarkBounds.height*=this._dotGridScale),this._symbolDot._isNegativeImage&&(e=_0x36cec0(this,e)),e},_0x494c68.prototype.computeImageBounds=function(e){this.symbolCellsBounds=this.getSymbolCellsBounds(e),this.selectedRectBounds=this.getSelectedRectBounds(this.symbolCellsBounds),this.bloodVolumeOffset=this.getBloodVolumeBounds(this.selectedRectBounds),this.textBounds=this.getContentTexBounds(this.selectedRectBounds,this.bloodVolumeOffset);var t=this.bloodVolumeOffset.LeftOffset>this.bloodVolumeOffset.RightOffset?2*this.bloodVolumeOffset.LeftOffset:2*this.bloodVolumeOffset.RightOffset,i=this.bloodVolumeOffset.DownOffset+this.bloodVolumeOffset.UpOffset,n=2*this.textBounds.LRoffset,r=Math.abs(this.textBounds.UDoffset),o=this.textBounds.UDoffset>0?this.textBounds.UDoffset:0;this.textBounds.UDoffset<0&&this.bloodVolumeOffset.DownOffset>=r?this._symbolDot._textPos!==_0x59fec3.Down&&(r=0):this.textBounds.UDoffset<0&&this.bloodVolumeOffset.DownOffset<r&&(i=r+this.bloodVolumeOffset.UpOffset);var a,s=0;Math.abs(this.symbolCellsBounds.x/this._dotGridScale)<_0x5a96c||this.returnisflag?(this.returnisflag=!0,s=this.selectedRectBounds.width):s=this.selectedRectBounds.width/2+2*this.DEFAULTLINEWIDTH,a=this.selectedRectBounds.height;var l=this.selectedRectBounds.width+s+t+n;l=l>this.textBounds.width?l:this.textBounds.width;var u=a+i+r+2*this.DEFAULTLINEWIDTH;this.setCanvasSize(l,u),this.symbolLROffset=l/2,this.symbolUDOffset=this.bloodVolumeOffset.UpOffset+o,this.offsetSymbolBounds(e)},_0x494c68.prototype.getSymbolCellsBounds=function(e){if(e.length<=0)return{x:0,y:0,width:0,height:0};for(var t=[],i=[],n=0;n<e.length;n++)for(var r=e[n].points,o=0;o<r.length;o++)t.push(r[o].x),i.push(r[o].y);var a=Math.max.apply({},t),s=Math.max.apply({},i),l=Math.min.apply({},t),u=Math.min.apply({},i),c=a-l;return a<=0&&(c=Math.abs(l)-Math.abs(a)),{x:l,y:u,width:c,height:s-u}},_0x494c68.prototype.getSelectedRectBounds=function(e){return{x:e.x-this.DEFAULTLINEWIDTH,y:e.y-this.DEFAULTLINEWIDTH,width:e.width+2*this.DEFAULTLINEWIDTH,height:e.height+2*this.DEFAULTLINEWIDTH}},_0x494c68.prototype.getBloodVolumeBounds=function(e){for(var t=0,i=0,n=0,r=0,o=0,a=0,s=0,l=0,u=0,c=0;c<this.symbolDot.BloodVolumes.length;c++){e.x>0&&(l=e.width/2+e.x),u=e.height/2+e.y;var h=this.symbolDot.BloodVolumes[c];if(!(h instanceof _0x225f00))return{UpOffset:t,DownOffset:i,LeftOffset:n,RightOffset:r};switch(h.width>e.width&&(o=e.width),h.position){case _0x758b23.TOP:a=l-h.width/2,s=e.y-h.height-t,h.bounds={x:a,y:s,width:o,height:h.height},t+=h.height+this.DEFAULTLINEWIDTH;break;case _0x758b23.BOTTOM:a=l-h.width/2,s=e.y+e.height+h.height+i,h.bounds={x:a,y:s,width:o,height:h.height},i+=h.height+this.DEFAULTLINEWIDTH,this._OffsetText_Down=i;break;case _0x758b23.LEFT:a=e.x-h.height-n,s=u-h.width/2,h.bounds={x:a,y:s,width:h.height,height:o},n+=h.height+this.DEFAULTLINEWIDTH;break;case _0x758b23.RIGHT:a=e.x+e.width+r,s=u-h.width/2,h.bounds={x:a,y:s,width:h.height,height:o},r+=h.height+this.DEFAULTLINEWIDTH;break;default:a=l-h.width/2,s=e.y-h.height-t,h.bounds={x:a,y:s,width:o,height:h.height},t+=h.height+this.DEFAULTLINEWIDTH}}return{UpOffset:t,DownOffset:i,LeftOffset:n,RightOffset:r}},_0x494c68.prototype.getContentTexBounds=function(e,t){var i=0,n=0,r=0,o=0,a=0,s=0;if(null!==this._symbolDot._textContent&&""!==this._symbolDot._textContent){this.setCanvasTextFont();var l=this._ctx.measureText(this._symbolDot._textContent).width,u=this._symbolDot._textPos;switch(this._symbolDot._showMode!==_0x3f7d9f.Grid&&(u=_0x59fec3.Up),u){case _0x59fec3.Left:i=e.x-t.LeftOffset,n=e.height/2+e.y;break;case _0x59fec3.Right:i=e.x+e.width+t.RightOffset,n=e.height/2+e.y;break;case _0x59fec3.LeftUp:i=e.x-t.LeftOffset,n=e.y-this.fontSize/2,s=this.fontSize;break;case _0x59fec3.RightUp:i=e.x+e.width+t.RightOffset,n=e.y-this.fontSize/2,s=this.fontSize;break;case _0x59fec3.LeftDown:i=e.x-t.LeftOffset,n=e.y+e.height+this.fontSize/2,s=-this.fontSize,this._OffsetText_Down=this._OffsetText_Down>this.fontSize?this._OffsetText_Down:2*this.fontSize;break;case _0x59fec3.RightDown:i=e.x+e.width+t.RightOffset,n=e.y+e.height+this.fontSize/2,s=-this.fontSize,this._OffsetText_Down=this._OffsetText_Down>this.fontSize?this._OffsetText_Down:2*this.fontSize;break;case _0x59fec3.Up:i=e.x<0?0:e.width/2+e.x,n=e.y-t.UpOffset-this.fontSize/2,s=this.fontSize;break;case _0x59fec3.Down:i=e.x<0?0:e.width/2+e.x,n=e.y+e.height+this.fontSize/2+t.DownOffset,s=-this.fontSize,this._OffsetText_Down=2*this.fontSize;case _0x59fec3.Middle:}r=l,o=this.fontSize,a=l}return{x:i,y:n,width:r,height:o,UDoffset:s,LRoffset:a}},_0x494c68.prototype.offsetSymbolBounds=function(e){for(var t=0;t<e.length;t++)for(var i=0;i<e[t].points.length;i++){var n=e[t].points[i];let r=e[t].cell.style.lineWidth;n.x+=this.symbolLROffset,n.y+=this.symbolUDOffset+4*this.DEFAULTLINEWIDTH-r/2,e[t].points[i]=n}this.selectedRectBounds.x+=this.symbolLROffset,this.selectedRectBounds.y+=this.symbolUDOffset+4*this.DEFAULTLINEWIDTH,this._symbolDot._isMiddleMarkExist&&(this._symbolDot._textPos===_0x59fec3.Middle||this._symbolDot._alwaysHasMiddelText)&&(this._middleMarkBounds.x+=this.symbolLROffset,this._middleMarkBounds.y+=this.symbolUDOffset+4*this.DEFAULTLINEWIDTH),this.textBounds.x+=this.symbolLROffset,this._symbolDot._isNegativeImage&&this.returnisflag&&(4===this._symbolDot._textPos||5===this._symbolDot._textPos)?this.textBounds.x-=this.symbolCellsBounds.width/2:this.returnisflag&&(4===this._symbolDot._textPos||5===this._symbolDot._textPos)&&(this.textBounds.x=this.symbolLROffset+this.symbolCellsBounds.width/2),this.textBounds.y+=this.symbolUDOffset+4*this.DEFAULTLINEWIDTH;for(var r=0;r<this.symbolDot.BloodVolumes.length;r++){var o=this.symbolDot.BloodVolumes[r];o instanceof _0x225f00&&(this._symbolDot._isNegativeImage&&this.returnisflag&&(4===o.position||5===o.position)?o.bounds.x+=this.symbolLROffset-this.selectedRectBounds.width/2:!this.returnisflag||4!==o.position&&5!==o.position?o.bounds.x+=this.symbolLROffset:o.bounds.x+=this.symbolLROffset+this.selectedRectBounds.width/2,o.bounds.y+=this.symbolUDOffset)}},_0x494c68.prototype.setCanvasSize=function(e,t){this._canvas.setAttribute("width",e),this._canvas.setAttribute("height",t)},_0x494c68.prototype.drawPolyline=function(e){var t=e.points,i=e.cell.style;this._ctx.beginPath(),this._ctx.moveTo(t[0].x,t[0].y);for(var n=1,r=t.length;n<r;n++)this._ctx.lineTo(t[n].x,t[n].y);this._ctx.globalAlpha=i.globalAlpha,this._ctx.setLineDash(i.dashArray),this._ctx.strokeStyle=i.lineColor,this._ctx.lineWidth=i.lineWidth,this._ctx.stroke()},_0x494c68.prototype.drawPolygon=function(e){var t=e.points,i=e.cell.style;this._ctx.beginPath();var n=t[0].x,r=t[0].y,o=r,a=r,s=n,l=n;this._ctx.moveTo(n,r);for(var u=1;u<t.length;u++){var c=t[u].x,h=t[u].y;this._ctx.lineTo(c,h),h<o&&(o=h),h>a&&(a=h),c>l&&(l=c),c<s&&(s=c)}if(this._ctx.lineTo(t[0].x,t[0].y),0===i.fill){if(i.hasShade){var d={mode:this._symbolDot._symbolStyle._fillGradientMode,style:i,maximum:{minX:s,minY:o,maxX:l,maxY:a}},f=this.drawGradient(d);this._ctx.fillStyle=f}else this._ctx.fillStyle=i.fillStyle;this._ctx.fill()}this._ctx.globalAlpha=i.globalAlpha,this._ctx.setLineDash(i.dashArray),this._ctx.strokeStyle=i.lineColor,this._ctx.lineWidth=i.lineWidth,this._ctx.closePath(),this._ctx.stroke()},_0x494c68.prototype.drawGradient=function(e){var t,i=e.style;const n=(100-this._symbolDot._symbolStyle.fillGradientOffsetRatioX)/100,r=(100-this._symbolDot._symbolStyle.fillGradientOffsetRatioY)/100;var o=e.maximum.minX,a=e.maximum.maxX*n,s=e.maximum.minY,l=e.maximum.maxY*r;switch(e.mode){case 1:t=this._ctx.createLinearGradient(o,s,a,l);break;case 2:var u=a-o,c=l-s,h=o+u/2,d=s+c/2,f=u>c?u/4:c/4,p=2*f;t=this._ctx.createRadialGradient(h,d,f,h,d,p)}return t.addColorStop(0,i.fillForeColor),t.addColorStop(1,i.fillBackColor),t},_0x494c68.prototype.drawText=function(e){if(!(e.points[0].x<0||e.points[0].y<0)){var t=e.cell.cell.textContent,i=e.cell.cell.textStyle,n=i.fontScale,r=i.fontName,o=i.fontHeight*n*.7*this._dotGridScale;if(!(o<4)){i.bold?this._ctx.font="bold "+o+"px "+r:i.italic?this._ctx.font="italic "+o+"px "+r:this._ctx.font=o+"px "+r,this._ctx.textAlign="center";var a=i.align;("TOPLEFT"===a||"TOPCENTER"===a||"TOPRIGHT"===a)&&(this._ctx.textBaseline="middle"),this._ctx.textBaseline="middle",this._ctx.fillStyle=i.foreColor.toCssColorString(),this._ctx.fillText(t,e.points[0].x,e.points[0].y+this._OffSetY)}}},_0x494c68.prototype.computePts=function(e){var t=e.cell,i=null;_0x585354.SYMBOL_RECTANGLE===t.type?(i=(new _0x4ca0d3).calculateParts(e),e.points=i.points):_0x585354.SYMBOL_ELLIPSE===t.type?(i=(new _0x2dd781).calculateParts(e),e.points=i.points):_0x585354.SYMBOL_CIRCLE===t.type?(i=(new _0x1621e9).calculateParts(e),e.points=i.points):_0x585354.SYMBOL_POLYBEZIER===t.type?(i=(new _0x50ef33).calculateParts(e),e.points=i.points):_0x585354.SYMBOL_ARC===t.type?(i=(new _0x1a65af).calculateParts(e),e.points=i.points):_0x585354.SYMBOL_PARALLELOGRAM===t.type?(i=(new _0x3637c).calculateParts(e),e.points=i.points):_0x585354.SYMBOL_PIE===t.type?(i=SuperMapAlgoPlot.Primitives.sector(e.points),e.points=i):_0x585354.SYMBOL_KIDNEY===t.type?e.points=SuperMapAlgoPlot.Primitives.getSpatialData(SuperMapAlgoPlot.SymbolType.KIDNEY,e.points):_0x585354.SYMBOL_TRAPEZOID===t.type?(i=(new SymbolTrapezoid).calculateParts(e),e.points=i.points):_0x585354.SYMBOL_CHORD===t.type&&(i=(new _0x34af79).calculateParts(e),e.points=i.points);return e},_0x494c68.prototype.drawPicture=function(e,t){if(WebGLPlot.defined(t)&&t){if(this.drawBloodVolume(),_0x3f7d9f.Vector===this._symbolDot._showMode&&this._symbolDot._textPos===_0x59fec3.Middle)return;this.drawtextContent()}else{for(var i=0;i<e.length;i++){var n=e[i],r=n.cell;this.isForVector?_0x585354.SYMBOL_TEXT===r.type&&this.drawText(n):_0x585354.SYMBOL_POLYLINE===r.type||_0x585354.SYMBOL_POLYBEZIER===r.type||_0x585354.SYMBOL_ARC===r.type?this.drawPolyline(n):_0x585354.SYMBOL_TEXT===r.type?this.drawText(n):this.drawPolygon(n)}this._symbolDot._showMode===_0x3f7d9f.Grid&&(null!==this._symbolDot._textContent&&""!==this._symbolDot._textContent&&this.drawtextContent(),this.drawBloodVolume(),WebGLPlot.defined(this._symbolDot._layer.selectedFeature)&&!this.isForVector&&this._symbolDot._isSelected&&this.drawBoundingRect())}},_0x494c68.prototype.drawtextContent=function(){var e=null,t=this._symbolDot._textPos;this._symbolDot._showMode!==_0x3f7d9f.Grid&&(t=_0x59fec3.Up),t===_0x59fec3.Left?e={textAlign:"right",textBaseline:"middle"}:t===_0x59fec3.Right?e={textAlign:"left",textBaseline:"middle"}:t===_0x59fec3.Up?(e={textAlign:"center",textBaseline:"middle"},this.returnisflag&&(e.x=(this._canvas.width+this._symbolWidth)/2)):t===_0x59fec3.Down||t===_0x59fec3.Middle?e={textAlign:"center",textBaseline:"middle"}:t===_0x59fec3.LeftUp||t===_0x59fec3.LeftDown?e={textAlign:"right",textBaseline:"middle"}:(t===_0x59fec3.RightUp||t===_0x59fec3.RightDown)&&(e={textAlign:"left",textBaseline:"middle"}),this.drawText2(e)},_0x494c68.prototype.drawText2=function(e){if(e){var t=this._symbolDot._textContent,i=this._symbolDot._symbolTextStyle;this.setCanvasTextFont(),this._ctx.textAlign=e.textAlign,this._ctx.textBaseline=e.textBaseline;var n=0,r=0;if(this._middleMarkBounds&&(n=this._middleMarkBounds.x+this._middleMarkBounds.width/2,r=this._middleMarkBounds.y+this._middleMarkBounds.height/2),i._outline){this._ctx.setLineDash([]);var o=this._ctx.lineWidth;this._ctx.lineWidth=i.outlineWidth;var a=i._backColor.toCssColorString();this._symbolDot._isMiddleMarkExist&&this._symbolDot._textPos===_0x59fec3.Middle&&!this._symbolDot._alwaysHasMiddelText?(this._ctx.strokeStyle=a,this._ctx.strokeText(t,n,r,this._middleMarkBounds.width)):this._symbolDot._textPos!==_0x59fec3.Middle&&(this._ctx.strokeStyle=a,this._ctx.strokeText(t,this.textBounds.x,this.textBounds.y)),this._symbolDot._alwaysHasMiddelText&&(this._ctx.textAlign="center",this._ctx.textBaseline="middle",this._ctx.strokeStyle=a,this._ctx.strokeText(t,n,r,this._middleMarkBounds.width)),this._ctx.lineWidth=o}var s=i.foreColor.toCssColorString();this._symbolDot._isMiddleMarkExist&&this._symbolDot._textPos===_0x59fec3.Middle&&!this._symbolDot._alwaysHasMiddelText?(this._ctx.fillStyle=s,this._ctx.fillText(t,n,r,this._middleMarkBounds.width)):this._symbolDot._textPos!==_0x59fec3.Middle&&(this.drawTextBoundsRect(i),this._ctx.fillStyle=s,this._ctx.fillText(t,this.textBounds.x,this.textBounds.y)),this._symbolDot._alwaysHasMiddelText&&(this._ctx.textAlign="center",this._ctx.textBaseline="middle",this._ctx.fillStyle=s,this._ctx.fillText(t,n,r,this._middleMarkBounds.width))}},_0x494c68.prototype.drawTextBoundsRect=function(e){if(e.isShowTextBox){let t,i=this.textBounds.y-e.fontSize/2,n=this.textBounds.width,r=this.textBounds.height;switch(this._ctx.textAlign){case"center":t=this.textBounds.x-this.textBounds.width/2;break;case"right":t=this.textBounds.x-this.textBounds.width;break;case"left":t=this.textBounds.x}this._ctx.fillStyle=e.textBoxColor.toCssColorString(),this._ctx.fillRect(t,i,n,r),this._ctx.beginPath(),this._ctx.lineWidth="2",this._ctx.strokeStyle=e.textBoxLineColor.toCssColorString(),this._ctx.rect(t,i,n-1,r),this._ctx.stroke()}},_0x494c68.prototype.drawBoundingRect=function(){var e=this.selectedRectBounds.x+this.DEFAULTLINEWIDTH/2,t=this.selectedRectBounds.y+this.DEFAULTLINEWIDTH/2,i=this.selectedRectBounds.width-1.5*this.DEFAULTLINEWIDTH,n=this.selectedRectBounds.height-2*this.DEFAULTLINEWIDTH;this._ctx.beginPath(),this._ctx.rect(e,t,i,n),this._ctx.strokeStyle=this._symbolDot._billboardBoundsColor.toCssColorString(),this._ctx.lineWidth=this.DEFAULTLINEWIDTH,this._ctx.setLineDash([]),this._ctx.closePath(),this._ctx.stroke()},_0x494c68.prototype.drawBloodVolume=function(){if(this._symbolDot.bIsShowBloodVolume)for(var e=0;e<this.symbolDot.BloodVolumes.length;e++){var t=this.symbolDot.BloodVolumes[e];if(!t.bounds)return;var i=t.bounds,n=t.position,r=0,o=0,a=0,s=0;switch((this._symbolDot._showMode===_0x3f7d9f.Marker||this._symbolDot._showMode===_0x3f7d9f.Vector)&&(n=_0x758b23.TOP),n){case _0x758b23.TOP:case _0x758b23.BOTTOM:r=t.width,o=t.height,a=t.width*t.volume,s=t.height;break;case _0x758b23.LEFT:case _0x758b23.RIGHT:r=t.height,o=t.width,a=t.height,s=t.width*t.volume}this._ctx.beginPath();var l=t.style.fillColor,u=t.style.frameColor,c=new WebGLPlot.Color(l.red,l.green,l.blue,this._symbolDot._symbolStyle._opacity),h=new WebGLPlot.Color(u.red,u.green,u.blue,this._symbolDot._symbolStyle._opacity);this._ctx.fillStyle=c.toCssColorString(),this._ctx.fillRect(i.x,i.y,a,s),this._ctx.lineWidth=.5,this._ctx.strokeStyle=h.toCssColorString(),this._ctx.rect(i.x,i.y,r,o),this._ctx.stroke(),this._ctx.closePath()}},_0x494c68.prototype.initCanvas=function(){WebGLPlot.defined(this._canvas)||(this._canvas=document.createElement("canvas")),this._ctx=this._canvas.getContext("2d"),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._ctx.scale(this._dotGridScale,this._dotGridScale)},_0x494c68.prototype.setCanvasTextFont=function(){var e=this._symbolDot._symbolTextStyle,t=e.fontName,i=e._fontSize;this._middleMarkBounds&&i>this._middleMarkBounds.height&&(i=this._middleMarkBounds.height),e.bold?this._ctx.font="bold "+i+"px "+t:e.italic?this._ctx.font="italic "+i+"px "+t:this._ctx.font=i+"px "+t},_0x494c68.prototype.getMax_Y=function(e){for(var t=[],i=0;i<e.length;i++)for(var n=e[i],r=0;r<n.points.length;r++)t.push(n.points[r].y);return Math.max.apply({},t)},_0x494c68.prototype.computerScale=function(){var e=1;this._symbolSize=new WebGLPlot.Cartesian2(this._symbolDot._gridSymbolSize.x,this._symbolDot._gridSymbolSize.y);var t=this._symbolDot._symbolSizeInLib;if(t.x>0&&t.y>0){var i=this._symbolSize.x/t.x,n=this._symbolSize.y/t.y;e=i>n?i:n}this._dotGridScale=this._symbolDot._scale*e*.5},_0x494c68.prototype.bIsChangHeight=function(){return this.symbolMoveToDown=!1,this.symbolMoveToUp=!1,this.symbolMoveToLR=!1,(0!==this._symbolDot._textContent.length||!_0x540635(this._symbolDot._textContent))&&(this._symbolDot._textPos===_0x59fec3.Down||this._symbolDot._textPos===_0x59fec3.RightDown||this._symbolDot._textPos===_0x59fec3.LeftDown?(this.symbolMoveToUp=!0,!0):this._symbolDot._textPos===_0x59fec3.Up||this._symbolDot._textPos===_0x59fec3.RightUp||this._symbolDot._textPos===_0x59fec3.LeftUp?(this.symbolMoveToDown=!0,!0):((this._symbolDot._textPos===_0x59fec3.Left||this._symbolDot._textPos===_0x59fec3.Right)&&(this.symbolMoveToLR=!0),!1))},_0x494c68.prototype.drawDotModelTextAndBloodVolume=function(){this.getModelTextAndBloodVolumeBounds(),this.drawPicture([],!0);var e=this._canvas.toDataURL("image/png");return this._xOffset=0,e},_0x494c68.prototype.getModelTextAndBloodVolumeBounds=function(){var e=0,t=0;this._symbolDot._textContent.length>0&&(this.fontSize=this._symbolDot._symbolTextStyle._fontSize,this.setCanvasTextFont(),e=this._ctx.measureText(this._symbolDot._textContent).width,t+=this.fontSize);for(var i=0;i<this.symbolDot.BloodVolumes.length;i++){e=(r=this.symbolDot.BloodVolumes[i]).width>e?r.width:e,t+=r.height+this.DEFAULTLINEWIDTH}this.textBounds={x:e/2,y:this.fontSize/2,width:this._ctx.measureText(this._symbolDot._textContent).width,height:this.fontSize},this.setCanvasSize(e,t);var n=t;for(i=0;i<this.symbolDot.BloodVolumes.length;i++){var r,o=(e-(r=this.symbolDot.BloodVolumes[i]).width)/2;n-=r.height+this.DEFAULTLINEWIDTH,r.bounds={x:o,y:n,width:r.width,height:r.height}}};var _0x51b419=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1f6e4b=_0x51b419(void 0,(function(){return _0x1f6e4b.toString().search("(((.+)+)+)+$").toString().constructor(_0x1f6e4b).search("(((.+)+)+)+$")}));function _0x2c042e(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._symbolDot=WebGLPlot.defaultValue(e.symbolDot,void 0),this._display=e._display,this.modelMatrix=_0x51d1e4.computeMatrix(this._symbolDot.localPoints[0],this._symbolDot._vectorRotate),this._primitives=[],this.__symbolPolyLineArray=new Map}_0x1f6e4b(),Object.defineProperties(_0x2c042e.prototype,{symbolDot:{get:function(){return this._symbolDot},set:function(e){this._symbolDot=e}}}),_0x2c042e.prototype.drawDotSymbolVector=function(){if(WebGLPlot.defined(this._symbolDot)){if(this._primitives=[],-1===this._symbolDot.vectorDefaultSize){var e=this._symbolDot._layer._scene,t=e.camera.position,i=WebGLPlot.Cartesian3.fromDegrees(this._symbolDot.localPoints[0].x,this._symbolDot.localPoints[0].y,this._symbolDot.localPoints[0].z),n=_0x51d1e4.getSpaceDistanceByCartesian(t,i);if(this._symbolDot.vectorDefaultSize=n/1e3,2===e.mode){var r=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(e,i),o=new WebGLPlot.Cartesian2(r.x+10,r.y),a=_0x51d1e4.getPosition(e,o),s=WebGLPlot.Cartesian3.fromDegrees(a.x,a.y,a.z),l=_0x51d1e4.getSpaceDistanceByCartesian(i,s);this._symbolDot.vectorDefaultSize=l/10}}var u=new WebGLPlot.Cartesian3(this._symbolDot.vectorRotate.x,this._symbolDot.vectorRotate.y,this._symbolDot.vectorRotate.z);return 0!==u.y&&0===u.x&&(u.x=1),this.modelMatrix=_0x51d1e4.computeMatrix(this._symbolDot.localPoints[0],u,this.modelMatrix),this.createGeometryInstances(),this._primitives}},_0x2c042e.prototype.createGeometryInstances=function(){var e,t,i,n=this._symbolDot._innerCells,r=[],o=[],a=[],s=[],l=[];this.isHasTextCell=!1;for(var u=0;u<n.length;u++){var c,h=n[u];if(h.surroundLineFlag&&0===this._symbolDot.symbolStyle.surroundLineType)this.__symbolPolyLineArray.get(u)&&(_0x24dc2a.removeAlgoPloyline(this.__symbolPolyLineArray.get(u),this._symbolDot._layer._scene),this.__symbolPolyLineArray.delete(u));else if(c=this._symbolDot._dotGrid.computePts({cell:h,points:h.positionPoints}).points,_0x585354.SYMBOL_POLYLINE!==h.type&&_0x585354.SYMBOL_POLYBEZIER!==h.type&&_0x585354.SYMBOL_ARC!==h.type&&_0x585354.SYMBOL_TEXT!==h.type&&c.push(c[0]),_0x585354.SYMBOL_TEXT!==h.type){for(var d=[],f=0;f<c.length;f++){var p=new WebGLPlot.Cartesian2(c[f].x,c[f].y),_=this.localPtsToCartesian(p,this.modelMatrix);d.push(new WebGLPlot.Cartesian3(_.position.x,_.position.y,_.position.z)),a.push(c[f].x),s.push(c[f].y),o.push(_.vector.y),r.push(_.vector.z),h.surroundLineFlag||l.push(_.position)}var m=this._symbolDot.gridLineWidth;if(e=h.surroundLineFlag&&0!==this._symbolDot.symbolStyle.surroundLineType?this._symbolDot.symbolStyle.surroundLineColor:this._symbolDot.symbolStyle.lineColor,n[u].lineColorLimit&&(i=n[u].style.lineColor,e=new WebGLPlot.Color(i.red/255,i.green/255,i.blue/255,i.alpha/255)),n[u].fillLimit&&!h.surroundLineFlag&&(n[u].fillColorLimit?(i=n[u].style.fillForeColor,t=new WebGLPlot.Color(i.red/255,i.green/255,i.blue/255,i.alpha/255)):t=e,this.createFillGeomtery(c,d,t,this._symbolDot.id)),(h.type!==_0x585354.SYMBOL_POLYLINE||h.type!==_0x585354.SYMBOL_POLYLINE||h.type!==_0x585354.SYMBOL_POLYLINE||h.type!==_0x585354.SYMBOL_TEXT)&&0===this._symbolDot._symbolStyle._fillSymbolID&&!h.surroundLineFlag&&((t=this._symbolDot._symbolStyle.fillForeColor).alpha=1-this._symbolDot._symbolStyle.fillOpaqueRate/100,this.createFillGeomtery(c,d,t,this._symbolDot.id)),e=WebGLPlot.Color.fromAlpha(e,this._symbolDot._symbolStyle.opacity),this.__symbolPolyLineArray.get(u))this.__symbolPolyLineArray.get(u).positions=d,this.__symbolPolyLineArray.get(u).material=new WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:e}),this.__symbolPolyLineArray.get(u).width=m,this.__symbolPolyLineArray.get(u).show=this._symbolDot.display;else{var $={width:m,positions:d,material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:e}),id:this._symbolDot.id};($=_0x24dc2a.addAlgoPloyline(this._symbolDot,$,this._symbolDot._layer._scene)).SymbolType=_0x585354.SYMBOL_DOT,this.__symbolPolyLineArray.set(u,$)}}else this.isHasTextCell=!0}var g=Math.max.apply({},r),y=Math.min.apply({},r),v=Math.max.apply({},o),x=Math.min.apply({},o);return x<0&&(v-=x),y<0&&(g-=y),this.vectorHeight=g>v?g:v,0!==this._symbolDot.vectorRotate.y||0!==this._symbolDot.vectorRotate.x?this.createTextCell2(l):this.createTextCell(a,s),[]},_0x2c042e.prototype.createFillGeomtery=function(e,t,i,n){var r=[],o=[],a=_0x51d1e4.Resolve(e);if(!a||a.length<3)return null;for(var s=0;s<a.length;s+=3){o[0]=t[a[s]],o[1]=t[a[s+1]],o[2]=t[a[s+2]];var l=this.createTrigonFillGeomterys(o,i,n);l&&r.push(l)}if(0===r.length)return null;var u=new WebGLPlot.Material.fromType("Color",{color:i,fill:!0}),c=new WebGLPlot.Primitive({geometryInstances:r,appearance:new WebGLPlot.MaterialAppearance({material:u,aboveGround:!0}),show:this._display,asynchronous:!1});c.plottingLayer=this._symbolDot._layer,this._primitives.push(c)},_0x2c042e.prototype.createTrigonFillGeomterys=function(e,t,i){var n=new WebGLPlot.PolygonHierarchy(e,[]),r=new WebGLPlot.PolygonGeometry({polygonHierarchy:n,perPositionHeight:!0}),o=WebGLPlot.PolygonGeometry.createGeometry(r);return o?new WebGLPlot.GeometryInstance({geometry:o,id:i}):null},_0x2c042e.prototype.getTextBoundPts=function(e,t,i){var n=[],r=[],o=Math.max.apply({},e),a=Math.min.apply({},e),s=Math.max.apply({},t),l=Math.min.apply({},t),u=(l<0?s-l:s)*(this._symbolDot.vectorScale*this._symbolDot.vectorDefaultSize);r.push(new WebGLPlot.Cartesian2(a,l)),r.push(new WebGLPlot.Cartesian2(o,l));var c=0;this._symbolDot._isMiddleMarkExist&&!i&&(c=l>0?l/s:l/(s-l));for(var h=[],d=[],f=0;f<r.length;f++){var p=r[f],_=this.localPtsToCartesian(p,this.modelMatrix).position;n.push(new WebGLPlot.Cartesian3(_.x,_.y,_.z)),h.push(this._symbolDot.localPoints[0].z+u),d.push(this._symbolDot.localPoints[0].z+u*c)}return{potions:n,maxExtendWallHeight:h,minExtendWallHeight:d}},_0x2c042e.prototype.localPtsToCartesian=function(e,t){var i=new WebGLPlot.Cartesian3,n=new WebGLPlot.Cartesian3,r=this._symbolDot.vectorScale*this._symbolDot.vectorDefaultSize;return n=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(-1,-e.x,e.y),r,n),{position:i=WebGLPlot.Matrix4.multiplyByPoint(t,n,i),vector:n}},_0x2c042e.prototype.createTextGeometry=function(e,t,i){var n=this.getTextBoundPts(e,t,i),r=new WebGLPlot.WallGeometry({positions:n.potions,maximumHeights:n.maxExtendWallHeight,minimumHeights:n.minExtendWallHeight}),o=WebGLPlot.WallGeometry.createGeometry(r);return o?new WebGLPlot.GeometryInstance({geometry:o,id:this._symbolDot.id}):null},_0x2c042e.prototype.createTextCell=function(e,t){if(this.isHasTextCell){var i=this._symbolDot._dotGrid.drawDotSymbolGraphic(!0),n=new WebGLPlot.Material.fromType("Image",{image:i}),r=this.createTextGeometry(e,t,!0),o=new WebGLPlot.Primitive({geometryInstances:[r],appearance:new WebGLPlot.MaterialAppearance({material:n}),show:this._display,asynchronous:!1});o.plottingLayer=this._symbolDot._layer,this._primitives.push(o)}},_0x2c042e.prototype.createTextCell2=function(e){if(this.isHasTextCell){var t=this.createPolygon(e),i=this._symbolDot._dotGrid.drawDotSymbolGraphic(!0),n=new WebGLPlot.Material.fromType("Image",{image:i}),r=new WebGLPlot.Primitive({geometryInstances:[t],appearance:new WebGLPlot.MaterialAppearance({material:n}),show:this._display,asynchronous:!1});r.plottingLayer=this._symbolDot._layer,this._primitives.push(r)}},_0x2c042e.prototype.createMiddleText=function(e){var t=[],i=[],n=[],r=[];t.push(new WebGLPlot.Cartesian2(e.left,e.top)),t.push(new WebGLPlot.Cartesian2(e.left,e.bottom)),t.push(new WebGLPlot.Cartesian2(e.right,e.bottom)),t.push(new WebGLPlot.Cartesian2(e.right,e.top)),t.push(new WebGLPlot.Cartesian2(e.left,e.top));for(var o=e.right-e.left,a=e.top-e.bottom,s=new WebGLPlot.Cartesian2(o/2,a/2),l=0;l<t.length;l++)i.push(t[l].x),n.push(t[l].y),r.push(this.localPtsToCartesian(t[l],this.modelMatrix).position);WebGLPlot.defined(this._canvas)||(this._canvas=document.createElement("canvas")),this._canvas.setAttribute("width",o),this._canvas.setAttribute("height",a),this._ctx=this._canvas.getContext("2d"),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height);var u=this._symbolDot._textContent,c=this._symbolDot._symbolTextStyle,h=c.fontName,d=c._fontSize;return c.bold?this._ctx.font="bold "+d+"px "+h:c.italic?this._ctx.font="italic "+d+"px "+h:this._ctx.font=d+"px "+h,this._ctx.textAlign="center",this._ctx.textBaseline="middle",c._outline?(this._ctx.strokeStyle=c.backColor.toCssColorString(),this._ctx.strokeText(u,s.x,s.y,o)):(this._ctx.fillStyle=c.foreColor.toCssColorString(),this._ctx.fillText(u,s.x,s.y,o)),0!==this._symbolDot.vectorRotate.y||0!==this._symbolDot.vectorRotate.x?this.createTextContent2(r):this.createTextContent(i,n)},_0x2c042e.prototype.createTextContent2=function(e){var t=this.createPolygon(e),i=this._canvas.toDataURL("image/png"),n=new WebGLPlot.Material.fromType("Image",{image:i}),r=new WebGLPlot.Primitive({geometryInstances:[t],appearance:new WebGLPlot.MaterialAppearance({material:n}),show:this._display,asynchronous:!1});return r.plottingLayer=this._symbolDot._layer,r},_0x2c042e.prototype.createTextContent=function(e,t){var i=this.createTextGeometry(e,t,!1),n=this._canvas.toDataURL("image/png"),r=new WebGLPlot.Material.fromType("Image",{image:n}),o=new WebGLPlot.Primitive({geometryInstances:[i],appearance:new WebGLPlot.MaterialAppearance({material:r}),show:this._display,asynchronous:!1});return o.plottingLayer=this._symbolDot._layer,o},_0x2c042e.prototype.createPolygon=function(e){var t=WebGLPlot.PolygonGeometry.fromPositions({positions:e,perPositionHeight:!0}),i=WebGLPlot.PolygonGeometry.createGeometry(t);return new WebGLPlot.GeometryInstance({geometry:i,id:this.id})};var _0x467e4e=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x57d99c=_0x467e4e(void 0,(function(){return _0x57d99c.toString().search("(((.+)+)+)+$").toString().constructor(_0x57d99c).search("(((.+)+)+)+$")}));function _0x484dc8(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._symbolDot=WebGLPlot.defaultValue(e.symbolDot,void 0),this._picturePath=WebGLPlot.defaultValue(e.symbolDot._picturePath,""),this._canvas=void 0,this.initCanvas()}_0x57d99c(),Object.defineProperties(_0x484dc8.prototype,{symbolDot:{get:function(){return this._symbolDot},set:function(e){this._symbolDot=e}}}),_0x484dc8.prototype.drawDotSymbolPicture=function(e){var t=this._symbolDot._billboardBoundsLineWidth,i=this._symbolDot.pictureSymbolSize.x*this._symbolDot.scale,n=this._symbolDot.pictureSymbolSize.y*this._symbolDot.scale,r=this._symbolDot.pictureSymbolSize.x*this._symbolDot.scale,o=this._symbolDot.pictureSymbolSize.y*this._symbolDot.scale,a=0;if(this.textBounds={x:0,y:0,width:0,height:0},this._symbolDot._textContent&&""!==this._symbolDot._textContent){a=this._symbolDot._symbolTextStyle._fontSize,this.setCanvasTextFont();let e=this._ctx.measureText(this._symbolDot._textContent).width;i=e>i?e:i,this.textBounds={x:i/2,y:a/2,width:e,height:a}}this._canvas.setAttribute("width",i+2*t),this._canvas.setAttribute("height",n+2*t+a),this._symbolDot._textContent&&""!==this._symbolDot._textContent&&this.drawText();var s=(this._canvas.width-r)/2;return this._ctx.drawImage(e,s,a,r,o),this._symbolDot._isSelected&&this.drawBoundingRect(t),this._canvas.toDataURL("image/png")},_0x484dc8.prototype.drawText=function(){var e=this._symbolDot._textContent,t=this._symbolDot._symbolTextStyle;this.setCanvasTextFont(),this._ctx.textAlign="center",this._ctx.textBaseline="middle";var i=0,n=0;if(this._middleMarkBounds&&(i=this._middleMarkBounds.x+this._middleMarkBounds.width/2,n=this._middleMarkBounds.y+this._middleMarkBounds.height/2),t._outline){this._ctx.setLineDash([]);var r=this._ctx.lineWidth;this._ctx.lineWidth=t.outlineWidth;var o=t._backColor.toCssColorString();this._symbolDot._isMiddleMarkExist&&this._symbolDot._textPos===_0x59fec3.Middle&&!this._symbolDot._alwaysHasMiddelText?(this._ctx.strokeStyle=o,this._ctx.strokeText(e,i,n,this._middleMarkBounds.width)):this._symbolDot._textPos!==_0x59fec3.Middle&&(this._ctx.strokeStyle=o,this._ctx.strokeText(e,this.textBounds.x,this.textBounds.y)),this._ctx.lineWidth=r}var a=t.foreColor.toCssColorString();this._symbolDot._isMiddleMarkExist&&this._symbolDot._textPos===_0x59fec3.Middle&&!this._symbolDot._alwaysHasMiddelText?(this._ctx.fillStyle=a,this._ctx.fillText(e,i,n,this._middleMarkBounds.width)):this._symbolDot._textPos!==_0x59fec3.Middle&&(this.drawTextBoundsRect(t),this._ctx.fillStyle=a,this._ctx.fillText(e,this.textBounds.x,this.textBounds.y)),this._symbolDot._alwaysHasMiddelText&&(this._ctx.textAlign="center",this._ctx.textBaseline="middle",this._ctx.fillStyle=a,this._ctx.fillText(e,i,n,this._middleMarkBounds.width))},_0x484dc8.prototype.drawTextBoundsRect=function(e){if(e.isShowBackColor){let t,i=this.textBounds.y-e.fontSize/2,n=this.textBounds.width,r=this.textBounds.height;switch(this._ctx.textAlign){case"center":t=this.textBounds.x-this.textBounds.width/2;break;case"right":t=this.textBounds.x-this.textBounds.width;break;case"left":t=this.textBounds.x}this._ctx.fillStyle=WebGLPlot.Color.fromCssColorString(e.backColor),this._ctx.fillRect(t,i,n,r)}},_0x484dc8.prototype.setCanvasTextFont=function(){var e=this._symbolDot._symbolTextStyle,t=e.fontName,i=e._fontSize;e.bold?this._ctx.font="bold "+i+"px "+t:e.italic?this._ctx.font="italic "+i+"px "+t:this._ctx.font=i+"px "+t},_0x484dc8.prototype.drawBoundingRect=function(e){this._ctx.beginPath(),this._ctx.moveTo(e/2,e/2+this.textBounds.height),this._ctx.lineTo(e/2,this._canvas.height-e/2),this._ctx.lineTo(this._canvas.width-e/2,this._canvas.height-e/2),this._ctx.lineTo(this._canvas.width-e/2,e/2+this.textBounds.height),this._ctx.lineTo(e/2,e/2+this.textBounds.height),this._ctx.strokeStyle=this._symbolDot._billboardBoundsColor.toCssColorString(),this._ctx.lineWidth=e,this._ctx.closePath(),this._ctx.stroke()},_0x484dc8.prototype.initCanvas=function(){WebGLPlot.defined(this._canvas)||(this._canvas=document.createElement("canvas"),this._canvas.width=this._symbolDot.pictureSymbolSize.x,this._canvas.height=this._symbolDot.pictureSymbolSizey),this._ctx=this._canvas.getContext("2d"),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height)};var _0x40c1ae=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1c089f=_0x40c1ae(void 0,(function(){return _0x1c089f.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c089f).search("(((.+)+)+)+$")}));_0x1c089f();class _0x36b026 extends _0x521a23{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),WebGLPlot.defined(e.serverData)?this._getServerDataPrototype(e.serverData):(this._anchorPoint=WebGLPlot.defaultValue(e.anchorPoint,new WebGLPlot.Cartesian2(0,0)),this._gridSymbolSize=WebGLPlot.defaultValue(e.gridSymbolSize,new WebGLPlot.Cartesian2(0,0)),this._symbolSizeInLib=WebGLPlot.defaultValue(e.symbolSizeInLib,new WebGLPlot.Cartesian2(-1,-1)),this._symbolRanks=WebGLPlot.defaultValue(e.symbolRanks,[]),this._middleMarkBounds=WebGLPlot.defaultValue(e.middleMarkBounds,null),this._symbolSize=WebGLPlot.defaultValue(e.symbolSize,new WebGLPlot.Cartesian2(-1,-1)),this._innerCells=[]),this._scale=WebGLPlot.defaultValue(e.scale,1),this._rotate=WebGLPlot.defaultValue(e.rotate,new _0x45ea17(0,0,0)),this._modelScale=WebGLPlot.defaultValue(e.modelScale,new _0x45ea17(1,1,1)),this._modelRotate=WebGLPlot.defaultValue(e.modelRotate,new _0x45ea17(0,0,0)),this._vectorRotate=WebGLPlot.defaultValue(e.vectorRotate,new _0x45ea17(0,0,0)),this._vectorScale=WebGLPlot.defaultValue(e.vectorScale,1),this._vectorDefaultSize=WebGLPlot.defaultValue(e.vectorDefaultSize,-1),this._gridLineWidth=WebGLPlot.defaultValue(e.gridLineWidth,3),this._gridSurroundLineWidth=WebGLPlot.defaultValue(e.gridSurroundLineWidth,3),this._pictureSymbolSize=WebGLPlot.defaultValue(e.pictureSymbolSize,new WebGLPlot.Cartesian2(64,64)),this._picturePath=WebGLPlot.defaultValue(e.picturePath,""),this._showMode=WebGLPlot.defaultValue(e.showMode,_0x3f7d9f.Grid),this._isNegativeImage=WebGLPlot.defaultValue(e.isNegativeImage,!1),this._symbolRank=WebGLPlot.defaultValue(e.symbolRank,0),this._lineSymbolID=WebGLPlot.defaultValue(e.lineSymbolID,0),this._modelPath=WebGLPlot.defaultValue(e.modelPath,""),this._textPos=WebGLPlot.defaultValue(e.textPos,_0x59fec3.Up),this._hasDragLine=WebGLPlot.defaultValue(e.hasDragLine,!1),this._dragPoint=WebGLPlot.defaultValue(e.dragPoint,new _0x45ea17(0,0,0)),this._textContent=WebGLPlot.defaultValue(e.textContent,""),this._canvasEle=null,this._prepicturePath=null,this._canvasSymbolData=[],this._imageResult=null,this._isFlagSymbol=!1,this._dotGrid=null,this._dotPicture=null,this._dotVector=null,this._sizeInMeters=!1,this._alwaysHasMiddelText=!1,this._bill=null,this._modelColor=new WebGLPlot.Color(1,1,1,1),this.billboard=null,this.mergeDefaultStyle(),this.bIsShowBloodVolume=WebGLPlot.defaultValue(e.bIsShowBloodVolume,!0),this.BloodVolumes=WebGLPlot.defaultValue(e.bloodVolumes,[]),this._isMiddleMarkExist=null!==this._serverData&&this._serverData.middleMarkExist,this._middleMarkBounds=null!==this._serverData&&this._serverData.middleMarkBounds,this._symbolSizeInMeters=new WebGLPlot.Cartesian2(-1,-1),this._symbolPictureSizeInMeters=new WebGLPlot.Cartesian2(-1,-1),this._BillboardScale=1,this._billboardBoundsColor=new WebGLPlot.Color(1,1,0,1),this._billboardBoundsLineWidth=3,this._modelAnimationPlay=WebGLPlot.defaultValue(e.modelAnimationPlay,!0),this._modelAnimationLoop=WebGLPlot.defaultValue(e.modelAnimationLoop,WebGLPlot.ModelAnimationLoop.REPEAT),this._modelAnimationMultiplier=WebGLPlot.defaultValue(e.modelAnimationMultiplier,1),this._modelAnimationReverse=WebGLPlot.defaultValue(e.modelAnimationReverse,!1),this.__initSymbolPointSymbolData(),this._vectorPrimitives=[],this._minimumPixelSize=0,this.__isModelRequestBack=!0}initSymbol(e){if((!this._initialize||e)&&!(this.localPoints.length<=0||0!==this.libID&&this._innerCells.length<=0)){this._initialize=!0,this.computerBillboardScaleInMeters(),this._showMode!==_0x3f7d9f.Marker&&this.__removeDotModelAndVector(),this.__resetBillboard(),this._canvasSymbolData=[],0!==this._wholeHeight&&(this.localPoints[0].z=this._wholeHeight);var t=this.localPoints[0],i=WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z);switch(null===this._dotGrid&&(this._dotGrid=new _0x494c68({symbolDot:this})),this._showMode){case _0x3f7d9f.Grid:case _0x3f7d9f.Picture:this.__createPicture(i,e);break;case _0x3f7d9f.Marker:this.__createModel(i);break;case _0x3f7d9f.Vector:this.__createVector()}this.addTextContent(t),this.drawAnnotationArray(),_0x3f7d9f.Picture!==this._showMode&&this.updateEditCtrl(e),this._initSymbolFinished.raiseEvent(this)}}createBillboard(e,t){return{id:this.id,show:this.display,position:e,image:t,pixelOffset:new WebGLPlot.Cartesian2(0,this._dotGrid._OffsetText_Down),horizontalOrigin:WebGLPlot.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot.VerticalOrigin.BOTTOM,disableDepthTestDistance:this.disableDepthTestDistance,color:WebGLPlot.Color.WHITE.withAlpha(this._symbolStyle._opacity),sizeInMeters:this._sizeInMeters,scale:this._BillboardScale}}computerBillboardScaleInMeters(){this._sizeInMeters&&-1===this._symbolSizeInMeters.x&&-1===this._symbolSizeInMeters.y&&this.showMode===_0x3f7d9f.Grid&&(this._symbolSizeInMeters=_0x51d1e4.pixelDisToRealDisInMeters(this._layer._scene,this._gridSymbolSize),this._BillboardScale=this._symbolSizeInMeters.x/this._gridSymbolSize.x),this._sizeInMeters&&-1===this._symbolPictureSizeInMeters.x&&-1===this._symbolPictureSizeInMeters.y&&this.showMode===_0x3f7d9f.Picture&&(this._symbolPictureSizeInMeters=_0x51d1e4.pixelDisToRealDisInMeters(this._layer._scene,this._pictureSymbolSize),this._BillboardScale=this._symbolPictureSizeInMeters.x/this._pictureSymbolSize.x)}__resetBillboard(){WebGLPlot.defined(this.billboard)&&(_0x24dc2a.removeBillboard(this.billboard,this._layer._scene),this.billboard=void 0)}updateEditCtrl(e){if(!e&&WebGLPlot.defined(this._layer.selectedFeature)&&this.id===this._layer.selectedFeature.id&&this.display){var t=this;WebGLPlot.defined(this._model)&&this._model.readyPromise.then((function(e){_0x3f7d9f.Marker===t._showMode&&t._layer._plottingEdit.drawModelEditObject(!0)})),WebGLPlot.defined(this.s3mInstance)&&this.s3mInstance._boundingSphere&&(_0x3f7d9f.Marker,t._showMode),this.display,(_0x3f7d9f.Grid===t._showMode||_0x3f7d9f.Picture===t._showMode)&&this._layer._plottingEdit.createCtrlPoints(this),_0x3f7d9f.Vector===t._showMode&&t._layer._plottingEdit.drawVectorEditObject(!0),_0x3f7d9f.Marker===t._showMode&&this._layer._plottingEdit.CtrlPosition.removeAll()}}copyStyle(){for(var e=0;e<this._innerCells.length;e++){var t=this._innerCells[e],i=this.copySymbolStyle(t,this._symbolStyle);let n=null;t.textStyle?n=this.copySymbolTextStyle(t.textStyle):t.textStyle2D&&(n=this.copySymbolTextStyle(t.textStyle2D)),this._canvasSymbolData.push({positionPoints:t.positionPoints,surroundLineFlag:t.surroundLineFlag,style:i,type:t.type,textStyle:n,textContent:t.textContent})}}copySymbolTextStyle(e){let t=e.backColor;!(e.backColor instanceof WebGLPlot.Color)&&e.backColor.alpha>1?e.backColor=WebGLPlot.Color.fromBytes(t.red,t.green,t.blue,t.alpha):e.backColor=new WebGLPlot.Color(t.red,t.green,t.blue,t.alpha);let i=e.foreColor;return!(e.foreColor instanceof WebGLPlot.Color)&&e.foreColor.alpha>1?e.foreColor=WebGLPlot.Color.fromBytes(i.red,i.green,i.blue,i.alpha):e.foreColor=new WebGLPlot.Color(i.red,i.green,i.blue,i.alpha),e}copySymbolStyle(e,t){var i={};if(e.surroundLineFlag)i.lineColor=t.surroundLineColor.toCssColorString(),i.lineWidth=this._gridSurroundLineWidth,i.dashArray=[];else{i.lineWidth=this._gridLineWidth;var n=t.lineColor;i.lineColor=n.toCssColorString();var r=WebGLPlot.Color.clone(t.fillForeColor);if(r.alpha=1-t.fillOpaqueRate/100,i.fillStyle=r.toCssColorString(),i.hasShade=!1,0!==t.fillGradientMode&&(i.hasShade=!0,t.fillForeColor.alpha=1-t.fillOpaqueRate/100,t.fillBackColor.alpha=1-t.fillOpaqueRate/100,i.fillForeColor=t.fillForeColor.toCssColorString(),i.fillBackColor=t.fillBackColor.toCssColorString()),i.fill=t.fillSymbolID,i.dashArray=_0x23f5e8(this._lineSymbolID),e.lineColorLimit){let t=e.style.lineColor;n=WebGLPlot.Color.fromBytes(t.red,t.green,t.blue,t.alpha),i.lineColor=n.toCssColorString()}if(e.lineTypeLimit&&(i.lineTypeLimit=!0),e.fillColorLimit){let t=e.style.fillForeColor;var o=WebGLPlot.Color.fromBytes(t.red,t.green,t.blue,t.alpha);o.alpha=e.style.fillOpaqueRate/100,i.fillStyle=o.toCssColorString()}if(e.fillLimit&&(i.fill=e.style.fillSymbolID,i.fillLimit=!0,!e.fillColorLimit)){var a=WebGLPlot.Color.clone(n);a.alpha=e.style.fillOpaqueRate/100,i.fillStyle=a.toCssColorString()}}return i.markerSize=e.style.markerSize,i.globalAlpha=t.opacity,i}setShowMode(e){this._showMode=e}getShowMode(){return this._showMode}setScale(e){if(_0x3f7d9f.Vector==this._showMode)this._scale=e;else{if(_0x3f7d9f.Marker!=this._showMode)return;this._modelScale=new _0x45ea17(e,e,e)}}getScale(){return _0x3f7d9f.Vector==this._showMode?this._scale:_0x3f7d9f.Marker==this._showMode?this._modelScale:new _0x45ea17(1,1,1)}setRotate(e){if(_0x3f7d9f.Vector==this._showMode)this._rotate=e;else{if(_0x3f7d9f.Marker!=this._showMode)return;this._modelRotate=e}}getRotate(){return _0x3f7d9f.Vector==this._showMode?this._rotate:_0x3f7d9f.Marker==this._showMode?this._modelRotate:void 0}setSymbolSize(e){if(_0x3f7d9f.Grid===this._showMode){var t=e,i=this._gridSymbolSize;if(i.x!==e.x&&i.y===e.y)t.y=i.y*e.x/i.x;else if(i.x===e.x&&i.y!==e.y)t.x=i.x*e.y/i.y;else if(i.x!==e.x&&i.y!==e.y){var n=e.x/i.x,r=e.y/i.y,o=r>n?r:n;t.x=o*i.x,t.y=o*i.y}this._gridSymbolSize=t}}getSymbolSize(){if(_0x3f7d9f.Grid==this._showMode)return this._gridSymbolSize}getPicturePath(){return this._picturePath}setPicturePath(e){return 0!==e.length&&(this._picturePath=e,!0)}getSymbolName(){return this.symbolName}setModelRotate(e,t,i){if("number"==typeof e&&"number"==typeof t&&"number"==typeof i){var n=new _0x45ea17(e,t,i);this.modelRotate=n}}setVectorRotate(e,t,i){var n=new _0x45ea17(e,t,i);this.vectorRotate=n}addTextContent(e){var t=this;if(WebGLPlot.defined(t._textContent)){var i=t._textContent;if(_0x3f7d9f.Marker===t._showMode&&(WebGLPlot.defined(i)&&0!==i.length&&!_0x54d475(i)||this.bIsShowBloodVolume))t._model&&t._model.readyPromise.then((function(i){_0x45990c(e,i,t)}));else if(_0x3f7d9f.Vector===t._showMode&&(WebGLPlot.defined(i)&&0!==i.length&&!_0x54d475(i)||this.bIsShowBloodVolume)){var n=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z+this._dotVector.vectorHeight);(t.bIsShowBloodVolume&&t.BloodVolumes.length>0||!_0x54d475(t._textContent))&&(t._imageResult=t._dotGrid.drawDotModelTextAndBloodVolume(),t.billboard=_0x24dc2a.addBillboard(t.createBillboard(n,t._imageResult),this._layer._scene),t._layer.updatePrimitive=!0)}}}addBloodVolume(e){e instanceof _0x225f00&&(this.BloodVolumes.push(e),this._initialize=!1)}_destroy(){_0x43a805.getInstance().symbolDestroyed.raiseEvent(this.id),WebGLPlot.defined(this.billboard)&&null!==this.billboard&&(_0x24dc2a.removeBillboard(this.billboard,this._layer._scene),this.billboard._destroy(),this.billboard=null),this.__removeDotModelAndVector(),this._dotVector&&this._dotVector.__symbolPolyLineArray.size>0&&_0x24dc2a.removeAlgoPloyline(this._dotVector.__symbolPolyLineArray,this._layer._scene),WebGLPlot.defined(this._geoEntity)&&(this._geoEntity.destroy(),this._geoEntity=void 0),this.removeAllGeoEffect()}__createModel(e){var t=new WebGLPlot.HeadingPitchRoll,i=Math.PI/180;t.pitch=-i*this._modelRotate.y,t.roll=i*this._modelRotate.x,t.heading=-i*this._modelRotate.z;var n=WebGLPlot.Transforms.localFrameToFixedFrameGenerator("east","north"),r=WebGLPlot.Transforms.headingPitchRollToFixedFrame(e,t,WebGLPlot.Ellipsoid.WGS84,n);if(this.s3mInstance&&this.s3mInstance.modelPath===this._modelPath)this.s3mInstance.updatePosition(e),this.s3mInstance.updateColor(this._modelColor),this.s3mInstance.updateScale(new Cesium.Cartesian3(this._modelScale.x,this._modelScale.x,this._modelScale.x)),this.s3mInstance.updateRotation(t),this.s3mInstance.visible=this._display;else if(void 0===this._model||this._model.basePath!==this._modelPath||this._initializeModel){this._initializeModel=!1;let i=this.modelPath.split(".");const n=i[i.length-1];switch(n){case"s3m":case"s3mb":{let i={position:e,hpr:t,scale:new Cesium.Cartesian3(this._modelScale.x,this._modelScale.x,this._modelScale.x),color:WebGLPlot.Color.clone(this._modelColor),id:this.id,visible:this._display};if(!WebGLPlot.s3mInstanceColc)throw new WebGLPlot.DeveloperError("S3MInstanceCollection is required.");WebGLPlot.s3mInstanceColc.get(this._layer._scene._plottingID).add(this._modelPath,i),this.s3mInstance=WebGLPlot.s3mInstanceColc.get(this._layer._scene._plottingID).getInstance(this._modelPath,this.id),this.s3mInstance.SymbolType=_0x585354.SYMBOL_DOT,this.s3mInstance.modelPath=this._modelPath;break}case"gltf":case"glb":case"s3mz":{const e={url:this._modelPath,modelMatrix:r,scale:this.modelScale,id:this.id,show:this._display,color:this._modelColor,minimumPixelSize:this._minimumPixelSize};if("gltf"==n||"glb"==n)this._model=WebGLPlot.Model.fromGltf(e),_0x566c61(this._model),_0x3f674d(this);else if("s3mz"==n){let t=this;if(i=this.modelPath.split("iserver"),i.length>1){let n=i[0]+"iserver/services/MGISDataSystemServer/rest/domainComponents/MGISDataQueryImpl/deCodeModelResult.json?";n+="arg0="+this.modelPath;let r=_0x109890();if(r.open("GET",decodeURI(n),!0),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),r.onreadystatechange=function(){if(4===r.readyState&&200===r.status){var i=r.responseText;let n=JSON.parse(i);WebGLPlot.defined(n)&&WebGLPlot.defined(n.supermap)&&(e.gltfJson=n.supermap,t._model=WebGLPlot.Model.fromJson(e),_0x566c61(t._model),_0x3f674d(t)),r.onreadystatechange=function(){},r=null,t.__isModelRequestBack=!0}},WebGLPlot.defined(WebGLPlot.Model.getCachedGltfByPath)){let t=WebGLPlot.Model.getCachedGltfByPath(this.modelPath);if(t){e.gltfJson=t,this._model=WebGLPlot.Model.fromJson(e),_0x566c61(this._model),_0x3f674d(this);break}}this.__isModelRequestBack&&(r.send(),this.__isModelRequestBack=!1)}}break}}}else{this._model.modelMatrix=r;let e=this._model;if(WebGLPlot.defined(e)&&"2.0"===e._sourceVersion){let t=WebGLPlot.Matrix3.fromRotationZ(WebGLPlot.CesiumMath.toRadians(-90));WebGLPlot.Matrix4.multiplyByMatrix3(e.modelMatrix,t,e.modelMatrix)}this._model.scale=this._modelScale.x,this._model.show=this._display,this._model.color=this._modelColor,this._model.minimumPixelSize=this._minimumPixelSize}}__createPicture(e,t){if(_0x3f7d9f.Grid===this._showMode||_0x54d475(this._picturePath)){if(!WebGLPlot.defined(this._innerCells)||0===this._innerCells.length)return;this.copyStyle(),this._showMode=_0x3f7d9f.Grid,this._imageResult=this._dotGrid.drawDotSymbolGraphic(),null===this._dotGrid&&(this._dotGrid=new _0x494c68({symbolDot:this})),this.billboard=_0x24dc2a.addBillboard(this.createBillboard(e,this._imageResult),this._layer._scene),this.billboard.SymbolType=_0x585354.SYMBOL_DOT}else{var i=this;null===this._dotPicture&&(this._dotPicture=new _0x484dc8({symbolDot:this}));var n=new Image;n.src=this._picturePath,n.setAttribute("crossOrigin","Anonymous"),n.onload=function(){i._imagePicture=i._dotPicture.drawDotSymbolPicture(n),i.__resetBillboard(),i.billboard=_0x24dc2a.addBillboard(i.createBillboard(e,i._imagePicture),i._layer._scene),i.billboard.SymbolType=_0x585354.SYMBOL_DOT,i.updateEditCtrl(t)}}}__createVector(){if(null===this._dotVector&&(this._dotVector=new _0x2c042e({symbolDot:this})),WebGLPlot.defined(this._innerCells)&&0!==this._innerCells.length){this.copyStyle(),this.__removeDotModelAndVector();var e=this._dotVector.drawDotSymbolVector();this._middleMarkBounds&&this._isMiddleMarkExist&&this._textPos===_0x59fec3.Middle&&e.push(this._dotVector.createMiddleText(this._middleMarkBounds));for(let t=0;t<e.length;t++){let i=_0x24dc2a.addDotModelAndVector(e[t],this._layer._scene);i.plottingLayer=this._layer,i.SymbolType=_0x585354.SYMBOL_DOT,this._vectorPrimitives.push(i)}}}clone(){var e=new _0x36b026({layer:this._layer,libID:this._libID,code:this._code,localPoints:this._localPoints,serverData:this._serverData});this._superClone(e),e._showMode=JSON.parse(JSON.stringify(this._showMode)),e._scale=JSON.parse(JSON.stringify(this._scale)),e._rotate=JSON.parse(JSON.stringify(this._rotate)),e._modelScale=JSON.parse(JSON.stringify(this._modelScale)),e._modelRotate=this._modelRotate.clone(),e._middleMarkBounds=JSON.parse(JSON.stringify(this._middleMarkBounds)),e._isMiddleMarkExist=JSON.parse(JSON.stringify(this._isMiddleMarkExist)),e._vectorScale=JSON.parse(JSON.stringify(this._vectorScale)),e._vectorDefaultSize=JSON.parse(JSON.stringify(this._vectorDefaultSize)),e._vectorRotate=JSON.parse(JSON.stringify(this._vectorRotate)),e._pictureSymbolSize=JSON.parse(JSON.stringify(this._pictureSymbolSize)),e._picturePath=JSON.parse(JSON.stringify(this._picturePath)),e._isNegativeImage=JSON.parse(JSON.stringify(this._isNegativeImage)),e.symbolRank=JSON.parse(JSON.stringify(this._symbolRank)),e._lineSymbolID=JSON.parse(JSON.stringify(this._lineSymbolID)),e._modelPath=JSON.parse(JSON.stringify(this._modelPath)),e._textPos=JSON.parse(JSON.stringify(this._textPos)),e._gridSymbolSize=JSON.parse(JSON.stringify(this._gridSymbolSize)),e._symbolSize=JSON.parse(JSON.stringify(this._symbolSize)),e._hasDragLine=JSON.parse(JSON.stringify(this._hasDragLine)),e._dragPoint=JSON.parse(JSON.stringify(this._dragPoint)),e._textContent=JSON.parse(JSON.stringify(this._textContent)),e._gridSurroundLineWidth=JSON.parse(JSON.stringify(this._gridSurroundLineWidth)),e._gridLineWidth=JSON.parse(JSON.stringify(this._gridLineWidth)),e._innerCells=this._innerCells,e._symbolSizeInLib=JSON.parse(JSON.stringify(this._symbolSizeInLib)),e.bIsShowBloodVolume=JSON.parse(JSON.stringify(this.bIsShowBloodVolume)),e._disableDepthTestDistance=this._disableDepthTestDistance,e._alwaysHasMiddelText=JSON.parse(JSON.stringify(this._alwaysHasMiddelText));for(var t=0;t<this.BloodVolumes.length;t++)e.BloodVolumes.push(_0x225f00.clone(this.BloodVolumes[t]));return e._sizeInMeters=JSON.parse(JSON.stringify(this._sizeInMeters)),e._symbolSizeInMeters=JSON.parse(JSON.stringify(this._symbolSizeInMeters)),e._symbolPictureSizeInMeters=JSON.parse(JSON.stringify(this._symbolPictureSizeInMeters)),e._geoEffectArray=[],this._geoEffectArray.forEach((t=>{e._geoEffectArray.push(t)})),WebGLPlot.defined(this._geoEntity)&&(e._geoEntity=this._geoEntity.clone(e)),e}_getServerDataPrototype(e){this._anchorPoint=WebGLPlot.defaultValue(e.anchorPoint,new WebGLPlot.Cartesian2(0,0)),this._gridSymbolSize=WebGLPlot.defaultValue(new WebGLPlot.Cartesian2(e.symbolSize.x,e.symbolSize.y),new WebGLPlot.Cartesian2(-1,-1)),this._symbolSizeInLib=WebGLPlot.defined(e.symbolSizeInLib)?new WebGLPlot.Cartesian2(e.symbolSizeInLib.x,e.symbolSizeInLib.y):new WebGLPlot.Cartesian2(this._gridSymbolSize.x,this._gridSymbolSize.y),this._symbolRanks=WebGLPlot.defaultValue(e.symbolRanks,[]),this._middleMarkBounds=WebGLPlot.defaultValue(e.middleMarkBounds,null),this._symbolSize=WebGLPlot.defaultValue(e.symbolSize,new WebGLPlot.Cartesian2(-1,-1)),this._innerCells=WebGLPlot.defaultValue(e.innerCells,[])}__removeDotModelAndVector(){if(this.s3mInstance&&WebGLPlot.s3mInstanceColc.get(this._layer._scene._plottingID)&&(WebGLPlot.s3mInstanceColc.get(this._layer._scene._plottingID).removeInstance(this.s3mInstance.modelPath,this.id),this.s3mInstance=void 0),this._model&&(_0x24dc2a.removeDotModelAndVector(this._model,this._layer._scene),this._model=void 0),this._vectorPrimitives.length>0){for(let e=0;e<this._vectorPrimitives.length;e++){let t=this._vectorPrimitives[e];_0x24dc2a.removeDotModelAndVector(t,this._layer._scene),t=void 0}this._vectorPrimitives=[]}}__initSymbolPointSymbolData(){_0x4c2eee(this)}}function _0x54d475(e){return!("string"==typeof e&&e.length>0)}function _0x23f5e8(e){var t;if(!WebGLPlot.defined(e)||""===e)return t=[];switch(e){case 0:t=[];break;case 1:t=[20,5];break;case 2:t=[2,2];break;case 3:t=[10,2,2,2];break;case 4:t=[10,2,2,2,2,2]}return t}function _0x45990c(e,t,i){var n=WebGLPlot.Cartesian3.multiplyByScalar(WebGLPlot.Cartesian3.fromElements(t._minCorner.z,t._minCorner.x,t._minCorner.y),t.scale,new WebGLPlot.Cartesian3),r=WebGLPlot.Cartesian3.multiplyByScalar(WebGLPlot.Cartesian3.fromElements(t._maxCorner.z,t._maxCorner.x,t._maxCorner.y),t.scale,new WebGLPlot.Cartesian3),o=n.z<=0?r.z:r.z-n.z,a=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z+o);(i.bIsShowBloodVolume&&i.BloodVolumes.length>0||!_0x54d475(i._textContent))&&(i._imageResult=i._dotGrid.drawDotModelTextAndBloodVolume(),i.billboard=_0x24dc2a.addBillboard(i.createBillboard(a,i._imageResult),i._layer._scene),i._layer.updatePrimitive=!0)}function _0x3f674d(e){e._model=_0x24dc2a.addDotModelAndVector(e._model,e._layer._scene),e._model.SymbolType=_0x585354.SYMBOL_DOT,e._modelAnimationPlay&&e._model.readyPromise.then((function(t){t.activeAnimations.addAll({loop:e._modelAnimationLoop,multiplier:e._modelAnimationMultiplier,reverse:e._modelAnimationReverse})}))}function _0x109890(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{e=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}function _0x4c2eee(e){if(!e||e._code!==_0x585354.SYMBOL_POINT)return;let t={fillBackColor:{red:255,green:0,blue:0,alpha:255},fillBackOpaque:!0,fillForeColor:{red:255,green:255,blue:0,alpha:255},fillGradientAngle:0,fillGradientMode:"NONE",fillGradientOffsetRatioX:0,fillGradientOffsetRatioY:0,fillOpaqueRate:100,fillSymbolID:0,lineColor:{red:255,green:255,blue:0,alpha:255},lineSymbolID:0,lineWidth:.5,markerAngle:0,markerHeight:0,markerSize:2.4,markerSymbolID:0,markerWidth:0},i={align:"MIDDLECENTER",backColor:{red:0,green:0,blue:0,alpha:255},backOpaque:!1,bold:!1,borderSpacingWidth:4,fontHeight:7,fontName:WebGLPlot.plotI18n("SongTi"),fontScale:1,fontWeight:0,fontWidth:0,foreColor:{red:0,green:0,blue:0,alpha:255},italic:!1,italicAngle:0,opaqueRate:100,outline:!1,outlineWidth:1,rotation:0,shadow:!1,sizeFixed:!0,strikeout:!1,stringAlignment:"LEFT",underline:!1};var n={fillColorLimit:!1,fillLimit:!0,fontColorLimit:!1,lineColorLimit:!1,lineTypeLimit:!1,lineWidthLimit:!1,polybezierClose:!1,positionPoints:[{x:.1,y:8},{x:8.2,y:8},{x:.1,y:16.1}],style:t,surroundLineColor:new WebGLPlot.Color(255,255,0,255),surroundLineFlag:!1,surroundLineLimit:!1,surroundLineType:0,surroundLineWidth:1,textContent:"",textStyle:i,type:31},r={fillColorLimit:!1,fillLimit:!0,fontColorLimit:!1,lineColorLimit:!1,lineTypeLimit:!1,lineWidthLimit:!1,polybezierClose:!1,positionPoints:[{x:2.571235,y:8},{x:10.671235,y:8},{x:2.571235,y:16.1}],style:t,surroundLineColor:new WebGLPlot.Color(255,255,0,255),surroundLineFlag:!0,surroundLineLimit:!1,surroundLineType:0,surroundLineWidth:1,textContent:"",textStyle:i,type:31};e._gridSymbolSize={x:32,y:32},e._anchorPoint={x:.1,y:8},e._symbolSizeInLib={x:32,y:32},e._innerCells=[n,r]}function _0x566c61(e){e.readyPromise.then((function(e){if(WebGLPlot.defined(e)&&"2.0"===e._sourceVersion){let t=WebGLPlot.Matrix3.fromRotationZ(WebGLPlot.CesiumMath.toRadians(-90));WebGLPlot.Matrix4.multiplyByMatrix3(e.modelMatrix,t,e.modelMatrix)}}))}Object.defineProperties(_0x36b026.prototype,{middleMarkBounds:{get:function(){return this._middleMarkBounds},set:function(e){e!==this._middleMarkBounds&&(this._middleMarkBounds=e,this._initialize=!1)}},modelAnimationPlay:{get:function(){return this._modelAnimationPlay},set:function(e){e!==this._modelAnimationPlay&&(this._modelAnimationPlay=e,this._initialize=!1,this._initializeModel=!0)}},modelAnimationLoop:{get:function(){return this._modelAnimationLoop},set:function(e){e===this._modelAnimationLoop||!(e instanceof WebGLPlot.ModelAnimationLoop)||(this._modelAnimationLoop=e,this._initialize=!1,this._initializeModel=!0)}},modelAnimationMultiplier:{get:function(){return this._modelAnimationMultiplier},set:function(e){e!==this._modelAnimationMultiplier&&(this._modelAnimationMultiplier=e,this._initialize=!1,this._initializeModel=!0)}},modelAnimationReverse:{get:function(){return this._modelAnimationReverse},set:function(e){e!==this._modelAnimationReverse&&(this._modelAnimationReverse=e,this._initialize=!1,this._initializeModel=!0)}},symbolSize:{get:function(){return this._symbolSize},set:function(e){e===this._symbolSize||!(e instanceof WebGLPlot.Cartesian2)||(this._symbolSize=e,this._initialize=!1)}},anchorPoint:{get:function(){return this._anchorPoint},set:function(e){e===this._anchorPoint||!(e instanceof WebGLPlot.Cartesian2)||(this._anchorPoint=e,this._initialize=!1)}},scale:{get:function(){return this._scale},set:function(e){if(!(e===this._scale||"number"!=typeof e||e<=0))if(this.billboard){if(this.billboard.scale=this.billboard.scale/this._scale*e,this._scale=e,this.showMode===_0x3f7d9f.Grid){var t=this._dotGrid.transformPoints();this._dotGrid.computeImageBounds(t)}this.updateEditCtrl(!1)}else this._scale=e,this._initialize=!1}},rotate:{get:function(){return this._rotate},set:function(e){e===this._rotate||!(e instanceof _0x45ea17)||(this._rotate=e,this._initialize=!1,this.__setEffectParameter({rotate:this._rotate}))}},modelScale:{get:function(){return this._modelScale.x},set:function(e){e===this._modelScale.x||"number"!=typeof e||e<0||(this.__setEffectParameter({scale:e}),this._modelScale.x=e,this._initialize=!1)}},modelRotate:{get:function(){return this._modelRotate},set:function(e){e===this._modelRotate||!(e instanceof _0x45ea17)||(this._modelRotate=e,this._initialize=!1,this.__setEffectParameter({rotate:e}))}},modelColor:{get:function(){return this._modelColor},set:function(e){e instanceof WebGLPlot.Color&&(this._modelColor=e,this._initialize=!1)}},vectorRotate:{get:function(){return this._vectorRotate},set:function(e){e===this._vectorRotate||!(e instanceof _0x45ea17)||(this._vectorRotate=e,this.__setEffectParameter({rotate:e}),this._initialize=!1)}},vectorScale:{get:function(){return this._vectorScale},set:function(e){e===this._vectorScale||"number"!=typeof e||(this._vectorScale=e,this.__setEffectParameter({scale:e}),this._initialize=!1)}},vectorDefaultSize:{get:function(){return this._vectorDefaultSize},set:function(e){e===this._vectorDefaultSize||"number"!=typeof e||(this._vectorDefaultSize=e,this._initialize=!1)}},gridLineWidth:{get:function(){return this._gridLineWidth},set:function(e){e===this._gridLineWidth||"number"!=typeof e||(this._gridLineWidth=e,this._initialize=!1,this._isAnimationFeature||_0x43a805.getInstance().symbolModified.raiseEvent(this))}},gridSurroundLineWidth:{get:function(){return this._gridSurroundLineWidth},set:function(e){e===this._gridSurroundLineWidth||"number"!=typeof e||(this._gridSurroundLineWidth=e,this._initialize=!1,this._isAnimationFeature||_0x43a805.getInstance().symbolModified.raiseEvent(this))}},gridSymbolSize:{get:function(){return new WebGLPlot.Cartesian2(96*this._gridSymbolSize.x/254,96*this._gridSymbolSize.y/254)},set:function(e){if(!(e instanceof WebGLPlot.Cartesian2))return!1;var t=new WebGLPlot.Cartesian2(254*e.x/96,254*e.y/96);if(t.x<=0||t.y<=0)return!1;-1===this._gridSymbolSize.x&&-1===this._gridSymbolSize.y?t=this._symbolSizeInLib:-1===this._symbolSizeInLib.x&&-1===this._symbolSizeInLib.y&&(this._symbolSizeInLib=t.clone());var i=this._gridSymbolSize,n=this._symbolSizeInLib,r=t.x/n.x,o=t.y/n.y,a=n.x/n.y;t.x!==i.x&&t.y!==i.y?r>o?t.y=t.x/a:t.x=t.y*a:t.x!==i.x&&t.y===i.y?t.y=t.x/a:t.x===i.x&&t.y!==i.y&&(t.x=t.y*a),this._gridSymbolSize=t,this._initialize=!1}},pictureSymbolSize:{get:function(){return this._pictureSymbolSize},set:function(e){if(!(e instanceof WebGLPlot.Cartesian2))return!1;this._pictureSymbolSize=e,this._initialize=!1}},showMode:{get:function(){return this._showMode},set:function(e){e===this._showMode||"number"!=typeof e||e<0||e>3||(this._showMode=e,WebGLPlot.defined(this._layer)&&WebGLPlot.defined(this._layer._plottingEdit)&&(_0x3f7d9f.Grid!=e||_0x3f7d9f.Picture!=e)&&this._layer._plottingEdit._ctrlPoints.removeAll(),this.__resetBillboard(),this.__removeDotModelAndVector(),this._dotVector&&this._dotVector.__symbolPolyLineArray.size>0&&_0x24dc2a.removeAlgoPloyline(this._dotVector.__symbolPolyLineArray,this._layer._scene),this._initialize=!1,this._isAnimationFeature||_0x43a805.getInstance().symbolModified.raiseEvent(this))}},isNegativeImage:{get:function(){return this._isNegativeImage},set:function(e){e===this._isNegativeImage||e.constructor!==Boolean||(this._isNegativeImage=e,WebGLPlot.defined(this._layer)&&WebGLPlot.defined(this._layer._plottingEdit)&&this._layer._plottingEdit.drawSymbolExtend(this),this._initialize=!1,this._isAnimationFeature||_0x43a805.getInstance().symbolModified.raiseEvent(this))}},symbolRank:{get:function(){return this._symbolRank},set:function(e){if(e!==this._symbolRank&&"number"==typeof e){this._symbolRank=e;var t=WebGLPlot.getServerData(this.libID,this.code,void 0,this._layer._scene._plottingID,e);!t||(this._innerCells=t.innerCells,this._initialize=!1,_0x43a805.getInstance().symbolModified.raiseEvent(this))}}},symbolRanks:{get:function(){return this._symbolRanks}},lineSymbolID:{get:function(){return this._lineSymbolID},set:function(e){e===this._lineSymbolID||"number"!=typeof e||(this._lineSymbolID=e,this._initialize=!1,this._isAnimationFeature||_0x43a805.getInstance().symbolModified.raiseEvent(this))}},modelPath:{get:function(){return this._modelPath},set:function(e){e!==this._modelPath&&(this._modelPath=e,this.__removeDotModelAndVector(),this._initialize=!1,this._isAnimationFeature||_0x43a805.getInstance().symbolModified.raiseEvent(this))}},textPos:{get:function(){return this._textPos},set:function(e){e===this._textPos||!this._middleMarkExist&&e===_0x59fec3.Middle||(this._textPos=e,this._initialize=!1,this._isAnimationFeature||_0x43a805.getInstance().symbolModified.raiseEvent(this))}},hasDragLine:{get:function(){return this._hasDragLine},set:function(e){e===this._hasDragLine||e.constructor!==Boolean||(this._hasDragLine=e,this._initialize=!1)}},dragPoint:{get:function(){return this._dragPoint},set:function(e){e===this._dragPoint||!(e instanceof _0x45ea17)||(this._dragPoint=e,this._initialize=!1)}},picturePath:{get:function(){return this._picturePath},set:function(e){e!==this._picturePath&&(this._picturePath=e,this._initialize=!1,this._isAnimationFeature||_0x43a805.getInstance().symbolModified.raiseEvent(this))}},scalePoints:{get:function(){return this._scalePoints},set:function(e){e===this._scalePoints||!(e instanceof _0x45ea17)||(this._scalePoints=e,this._initialize=!1)}},scaleValues:{get:function(){return this._scaleValues},set:function(e){e===this._scaleValues||!Array.isArray(e)||(this._scaleValues=e,this._initialize=!1)}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){e===this._sizeInMeters||_0x3f7d9f.Grid!==this.showMode&&_0x3f7d9f.Picture!==this.showMode||(this._sizeInMeters=e,this._initialize=!1,e||(this._BillboardScale=1))}},alwaysHasMiddelText:{get:function(){return this._alwaysHasMiddelText},set:function(e){e!==this._alwaysHasMiddelText&&(this._alwaysHasMiddelText=e,this._initialize=!1)}},billboardBoundsColor:{get:function(){return this._billboardBoundsColor},set:function(e){e instanceof WebGLPlot.Color&&(this._billboardBoundsColor=e,this._initialize=!1)}},billboardBoundsLineWidth:{get:function(){return this._billboardBoundsLineWidth},set:function(e){e===this._billboardBoundsLineWidth||"number"!=typeof e||(this._billboardBoundsLineWidth=e,this._initialize=!1)}},minimumPixelSize:{get:function(){return this._minimumPixelSize},set:function(e){e===this._minimumPixelSize||"number"!=typeof e||(this._minimumPixelSize=e,this._initialize=!1)}}});var _0x1eb2df=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x5793a9=_0x1eb2df(void 0,(function(){return _0x5793a9.toString().search("(((.+)+)+)+$").toString().constructor(_0x5793a9).search("(((.+)+)+)+$")}));function _0x455ba7(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._textContent=WebGLPlot.defaultValue(e.textContent,""),this._localPoint=WebGLPlot.defaultValue(e.localPoint,new WebGLPlot.Cartesian3(0,0,0)),this._textStyle=WebGLPlot.defaultValue(e.textStyle,new _0x37327d)}_0x5793a9(),Object.defineProperties(_0x455ba7.prototype,{textContent:{get:function(){return this._textContent},set:function(e){e&&"string"==typeof e&&(this._textContent=e)}},localPoint:{get:function(){return this._localPoint},set:function(e){(e instanceof _0x45ea17||e instanceof WebGLPlot.Cartesian3)&&(this._localPoint=e)}},textStyle:{get:function(){return this._textStyle}},fontName:{get:function(){return this._textStyle._fontName}},foreColor:{get:function(){return this._textStyle._foreColor}},fontSize:{get:function(){return this._textStyle._fontSize}},outlineWidth:{get:function(){return this._textStyle._outlineWidth}},outlineColor:{get:function(){return this._textStyle._outlineColor}},outline:{get:function(){return this._textStyle._outline}}});var _0x59f097=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xb4546b=_0x59f097(void 0,(function(){return _0xb4546b.toString().search("(((.+)+)+)+$").toString().constructor(_0xb4546b).search("(((.+)+)+)+$")}));_0xb4546b();var WebGLPlot$c=window.WebGLPlot=window.WebGLPlot||{};function _0x4ab86a(e,t){var i=t;if(!i)throw new WebGLPlot$c.DeveloperError("name is required to create PlottingLayer");this._waterPlanes=[],this._visibleViewport=0,this._scene=e,this._valid=!0,this._bIsUseDepthTest=!1,this._visibility=!0,this._geoGraphicObjects=[],this._isLocked=!1,this._isEditable=!0,this._isSelected=!0,this.updatePrimitive=!1,this._selectedFeature=void 0,this._name=i,this._id=-1,this._symbolAddedEvent=new WebGLPlot$c.Event,this._objsVisibleMap={}}function _0x3ad7ba(e){var t=new WebGLPlot$c.Color;return t.red=e.red/255,t.green=e.green/255,t.blue=e.blue/255,t.alpha=e.alpha/255,WebGLPlot$c.defined(e.red)||(t.red=1),WebGLPlot$c.defined(e.green)||(t.green=1),WebGLPlot$c.defined(e.blue)||(t.blue=1),WebGLPlot$c.defined(e.alpha)||(t.alpha=1),t}function _0x4082b1(e,t,i){var n=parseInt(t.symbolType);if(e._symbolType=n,99999===n&&(e._symbolType=_0x585354.SYMBOL_MODEL),e._symbolName=t.symbolName,e.__dotPlotLibID=t.dotPlotLibID,e.__dotPlotCode=t.dotPlotCode,""!==t.uuid&&WebGLPlot$c.defined(t.uuid)?e._id=t.uuid:e._id=WebGLPlot$c.createGuid(),e._isEdit=!0,e._wholeHeight=WebGLPlot$c.defined(t.wholeHeight)?t.wholeHeight:0,e._display=!0,"none"===t.style.display&&(e._display=!1),t.localePoints){let i=[];for(let e=0;e<t.localePoints.length;e++){const n=t.localePoints[e];i.push(new _0x45ea17(parseFloat(n.x),parseFloat(n.y),n.z?parseFloat(n.z):0))}e._localPoints=i}if(e._surroundRatioVal=WebGLPlot$c.defined(t.surroundRatioVal)?t.surroundRatioVal:.002,t.surroundLineColor&&(e._symbolStyle._surroundLineColor=_0x3ad7ba(t.surroundLineColor)),e._textContent=t.textContent,e._symbolStyle._surroundLineType=t.surroundLineType,e._symbolStyle._surroundLineWidth=WebGLPlot$c.defined(t.surroundlineWidth3D)?t.surroundlineWidth3D:3,e._symbolStyle._lineColor=_0x3ad7ba(t.style.lineColor),e._symbolStyle._opacity=e._symbolStyle.lineColor.alpha,e._symbolStyle._fillSymbolID=t.style.fillSymbolID,e._symbolStyle._fillForeColor=_0x3ad7ba(t.style.fillForeColor),e._symbolStyle._fillBackColor=_0x3ad7ba(t.style.fillBackColor),e._symbolStyle._fillGradientMode=t.style.fillGradientMode,e._symbolStyle._fillBackOpaque=t.style.fillBackOpaque,e._symbolStyle._fillGradientAngle=t.style.fillGradientAngle,e._symbolStyle._fillOpaqueRate=100-t.style.fillOpaqueRate,e._symbolStyle._fillGradientOffsetRatioX=t.style.fillGradientOffsetRatioX,e._symbolStyle._fillGradientOffsetRatioY=t.style.fillGradientOffsetRatioY,e._symbolStyle._lineWidth=WebGLPlot$c.defined(t.style.lineWidth3D)?t.style.lineWidth3D:3,t.hasOwnProperty("extendProperty")&&(e._extendProperty=t.extendProperty),t.hasOwnProperty("annotationArray"))for(var r=t.annotationArray,o=0;o<r.length;o++)e._annotationArray.push(new _0x455ba7({textContent:r[o]._textContent,localPoint:r[o]._localPoint,textStyle:r[o]._textStyle}));if(t.textStyle2D){e._symbolTextStyle._italicAngle=t.textStyle2D.italicAngle,e._symbolTextStyle._shadow=t.textStyle2D.shadow,e._symbolTextStyle._sizeFixed=t.textStyle2D.sizeFixed,e._symbolTextStyle._underline=t.textStyle2D.underline,e._symbolTextStyle._rotation=t.textStyle2D.rotation,e._symbolTextStyle._bold=t.textStyle2D.bold,e._symbolTextStyle._align=t.textStyle2D.align,e._symbolTextStyle._italic=t.textStyle2D.italic,e._symbolTextStyle._strikeout=t.textStyle2D.strikeout,e._symbolTextStyle._fontName=t.textStyle2D.fontName,e._symbolTextStyle._outline=t.textStyle2D.outline,e._symbolTextStyle._borderSpacingWidth=t.textStyle2D.borderSpacingWidth,e._symbolTextStyle._outlineWidth=96*t.textStyle2D.outlineWidth/25.4,e._symbolTextStyle._outlineColor=t.textStyle2D.fontStrokeColor,e._symbolTextStyle._fontWidth=t.textStyle2D.fontWidth,e._symbolTextStyle._opaqueRate=t.textStyle2D.opaqueRate,e._symbolTextStyle._stringAlignment=t.textStyle2D.stringAlignment,e._symbolTextStyle._fontScale=t.textStyle2D.fontScale,e._symbolTextStyle._fontWeight=t.textStyle2D.fontWeight,e._symbolTextStyle._foreColor=_0x3ad7ba(t.textStyle2D.foreColor),WebGLPlot$c.defined(t.textStyle2D.fontStrokeColor)?e._symbolTextStyle._backColor=_0x3ad7ba(t.textStyle2D.fontStrokeColor):WebGLPlot$c.defined(t.textStyle2D.backColor)&&(e._symbolTextStyle._backColor=_0x3ad7ba(t.textStyle2D.backColor)),e._symbolTextStyle._fontHeight=t.textStyle2D.fontHeight,e._symbolTextStyle._fontSize=parseInt(96*t.textStyle2D.fontHeight/25.4);let i=WebGLPlot$c.defined(t.textStyle2D.fontBackgroundColor)?_0x3ad7ba(t.textStyle2D.fontBackgroundColor):new WebGLPlot$c.Color(1,0,0,.3);e._symbolTextStyle.setTextRectColor(i),e._symbolTextStyle._isShowTextBox=!!WebGLPlot$c.defined(t.textStyle2D.backOpaque)&&t.textStyle2D.backOpaque}if(t.textStyle3D,_0x585354.SYMBOL_DOT===e._symbolType||_0x585354.SYMBOL_MODEL===e._symbolType||_0x585354.SYMBOL_PICTURE===e._symbolType){if(t.anchorPoint&&(e._anchorPoint=new WebGLPlot$c.Cartesian2(t.anchorPoint.x,t.anchorPoint.y)),t.symbolSize&&-1!==t.symbolSize.x&&-1!==t.symbolSize.y&&(t.symbolSize.x,e._gridSymbolSize.x,e._gridSymbolSize=new WebGLPlot$c.Cartesian2(t.symbolSize.x,t.symbolSize.y)),t.pictureSymbolSize&&-1!==t.pictureSymbolSize.x&&-1!==t.pictureSymbolSize.y?e._pictureSymbolSize=new WebGLPlot$c.Cartesian2(t.pictureSymbolSize.x,t.pictureSymbolSize.y):t.style.graphicWidth&&t.style.graphicHeight&&(e._pictureSymbolSize=new WebGLPlot$c.Cartesian2(t.style.graphicWidth,t.style.graphicHeight)),20==t.symbolType||3e3==t.symbolType?t.scale2D&&(WebGLPlot$c.defined(t.style.graphicHeight)&&WebGLPlot$c.defined(t.style.graphicWidth)?(e._pictureSymbolSize.x=t.style.graphicWidth,e._pictureSymbolSize.y=t.style.graphicHeight):e._scale=t.scale2D):t.scale3D&&(WebGLPlot$c.defined(t.scale3D.x)?e._scale=1:e._scale=t.scale3D),t.rotate2D?e._rotate=new _0x45ea17(t.rotate2D.x,t.rotate2D.y,t.rotate2D.z):e._rotate=new _0x45ea17(1,1,1),t.innerCells?e._innerCells=t.innerCells:_0x19d0aa(t.libID,t.code,e,i),t.symbolRanks&&(e._symbolRanks=t.symbolRanks),WebGLPlot$c.defined(t.picturePath)&&(e._picturePath=t.picturePath),WebGLPlot$c.defined(t.modelPath)&&(e._modelPath=t.modelPath),t.modelScale&&(e._modelScale=new _0x45ea17(t.modelScale,t.modelScale,t.modelScale)),t.modelRotate&&(e._modelRotate=new _0x45ea17(t.modelRotate.x,t.modelRotate.y,t.modelRotate.z)),21==t.symbolType&&(t.rotate2D&&(e._modelRotate=new _0x45ea17(t.rotate2D.x,t.rotate2D.y,t.rotate2D.z)),t.scale2D&&(e._modelScale=new _0x45ea17(t.scale2D.x,t.modelScale,t.modelScale))),t.vectorScale&&(e._vectorScale=t.vectorScale),t.vectorRotate&&(e._vectorRotate=new _0x45ea17(t.vectorRotate.x,t.vectorRotate.y,t.vectorRotate.z)),t.vectorDefaultSize&&(e._vectorDefaultSize=t.vectorDefaultSize),WebGLPlot$c.defined(t.middleMarkExist)&&(e._isMiddleMarkExist=t.middleMarkExist),WebGLPlot$c.defined(t.middleMarkBounds)&&(e._middleMarkBounds=t.middleMarkBounds),t.symbolSizeInLib?e._symbolSizeInLib=t.symbolSizeInLib:e._symbolSizeInLib=new WebGLPlot$c.Cartesian2(t.symbolSize,t.symbolSize),t.BloodVolumes)for(o=0;o<t.BloodVolumes.length;o++)e.BloodVolumes.push(_0x225f00.clone(t.BloodVolumes[o]));t.bIsShowBloodVolume&&(e.bIsShowBloodVolume=t.bIsShowBloodVolume),WebGLPlot$c.defined(t.disableDepthTestDistance)&&("5e-324"!==t.disableDepthTestDistance?e._disableDepthTestDistance=Number.MAX_VALUE:e._disableDepthTestDistance=Number.MIN_VALUE),WebGLPlot$c.defined(t.sizeInMeters)&&(e._sizeInMeters=t.sizeInMeters),WebGLPlot$c.defined(t.BillboardScale)&&(e._BillboardScale=t.BillboardScale),WebGLPlot$c.defined(t.alwaysHasMiddelText)&&(e._alwaysHasMiddelText=t.alwaysHasMiddelText),WebGLPlot$c.defined(t.negativeImage)&&(e._isNegativeImage=t.negativeImage),e._gridLineWidth=WebGLPlot$c.defined(t.gridLineWidth3D)?4*t.gridLineWidth3D:3,e._gridSurroundLineWidth=WebGLPlot$c.defined(t.gridSurroundLineWidth3D)?4*t.gridSurroundLineWidth3D:3,WebGLPlot$c.defined(t.symbolRank)&&(e._symbolRank=t.symbolRank),WebGLPlot$c.defined(t.style.lineSymbolID)&&(e._lineSymbolID=t.style.lineSymbolID),WebGLPlot$c.defined(t.middleMarkExist)&&(e._middleMarkExist=t.middleMarkExist),e._textPos=WebGLPlot$c.defined(t.annotationPosition)?t.annotationPosition:0,e._showMode=WebGLPlot$c.defined(t.dotShowMode)?t.dotShowMode:_0x3f7d9f.Grid,t.code===_0x585354.SYMBOL_PICTURE&&(e._showMode=_0x3f7d9f.Picture),t.code===_0x585354.SYMBOL_MODEL&&(e._showMode=_0x3f7d9f.Marker),e._hasDragLine=!!WebGLPlot$c.defined(t.positionOffset)&&t.positionOffset,t.dragPoint&&(e._dragPoint=new _0x45ea17(t.dragPoint.x,t.dragPoint.y,t.dragPoint.z))}else{if(t.subSymbols){e._subSymbols=t.subSymbols;for(let t=0;t<e._subSymbols.length;t++){const i=e._subSymbols[t];i.width2D=96*i.width2D/25.4,i.lineColor=_0x3ad7ba(i.lineColor).toCssHexString()}}t.dashLines&&(e._dashLines=t.dashLines),t.scaleValues&&(e._scaleValues=t.scaleValues),WebGLPlot$c.defined(t.style.extendHeight)&&(e._extendWallHeight=t.style.extendHeight),WebGLPlot$c.defined(t.wallOpaqueRate)&&(t.wallOpaqueRate>1&&t.wallOpaqueRate<100?e._extendWallOpacity=(100-t.wallOpaqueRate)/100:t.wallOpaqueRate<=1&&(e._extendWallOpacity=t.wallOpaqueRate)),t.subSymbolSize&&e._updateSubSize?e._updateSubSize=!1:e._updateSubSize=!0,e._subSymbolSize=t.subSymbolSize?t.subSymbolSize:0,WebGLPlot$c.defined(t.subSymbolScaleValue)&&(e._subSymbolScaleValue=t.subSymbolScaleValue),t.hasOwnProperty("isClampToGround")&&(e._isClampToGround=t.isClampToGround),t.hasOwnProperty("arrowHeadType")&&(e._arrowHeadType=t.arrowHeadType),t.hasOwnProperty("arrowBodyType")&&(e._arrowBodyType=t.arrowBodyType),t.hasOwnProperty("arrowTailType")&&(e._arrowTailType=t.arrowTailType)}return WebGLPlot$c.defined(t.scaleByMap)?e.scaleByMap=t.scaleByMap:e.scaleByMap=!0,WebGLPlot$c.defined(t.positionOffsetX)&&WebGLPlot$c.defined(t.positionOffsetY)&&(e._dragPoint=new _0x45ea17(t.positionOffsetX,t.positionOffsetY,0)),WebGLPlot$c.defined(t.positionOffsetType)&&(e._positionOffsetType=t.positionOffsetType),WebGLPlot$c.defined(t.rotate2D)&&(e._rotate2D=t.rotate2D),e}function _0x19d0aa(e,t,i,n){var r=WebGLPlot$c.getServerData(e,t,void 0,n);!r||(i._innerCells=r.innerCells,i._getServerDataPrototype&&i._getServerDataPrototype(r),i._initialize=!1)}function _0x13c6b0(e,t){!e||(e.lineColor&&(t.symbolStyle.lineColor=e.lineColor),e.lineWidth&&(t.symbolType===_0x585354.SYMBOL_DOT?t.gridLineWidth=e.lineWidth:t.symbolStyle.lineWidth=e.lineWidth),e.textContent&&(t.textContent=e.textContent),e.fontSize&&(t.symbolTextStyle.fontSize=e.fontSize),e.fontColor&&(t.symbolTextStyle.foreColor=e.fontColor))}_0x4ab86a.prototype.createSymbol=function(e,t,i,n,r){if(!Array.isArray(i)||i.length<=0||void 0===WebGLPlot$c.getLibManager(this._scene._plottingID))throw new WebGLPlot$c.DeveloperError("PlottingLayer createSymbol points or Plotting is needed!!!");if(this.isEditable){if(99999===t&&(t=_0x585354.SYMBOL_MODEL),0===e&&(t===_0x585354.SYMBOL_PICTURE||t===_0x585354.SYMBOL_MODEL)&&WebGLPlot$c.defined(n)&&"function"!=typeof n&&WebGLPlot$c.defined(n.url))return n.libID=e,n.code=t,n.points=i,void this.createModelAndPicture(n,r);"function"==typeof n&&!WebGLPlot$c.defined(r)&&(r=n);for(var o=this,a=[],s=WebGLPlot$c.getLibManager(this._scene._plottingID),l=0;l<i.length;l++)a.push(i[l].clone());var u=null,c=null;if(!s.useServerData){var h=s.localSymbolLibData[e][t];return _0x13c6b0(n,u=o.createGraphicObject(o,a,h)),"function"==typeof r&&r({feature:u}),!0}return 0===(c=WebGLPlot$c.getServerData(e,t,void 0,this._scene._plottingID))?(_0x13c6b0(n,u=_0x51d1e4.isSymbolDot(t)?new _0x36b026({layer:this,libID:e,code:t,localPoints:a}):new _0x34d5f9({layer:this,libID:e,code:t,localPoints:a})),u._symbolType=t,this._pushGeoGraphicObjectArray(u),"function"==typeof r&&r({feature:u}),!0):null!==c&&WebGLPlot$c.defined(c)?(_0x13c6b0(n,u=o.createGraphicObject(o,a,c)),"function"==typeof r&&r({feature:u}),!0):void 0}},_0x4ab86a.prototype.createModelAndPicture=function(e,t){if(99999===e.code&&(e.code=_0x585354.SYMBOL_MODEL),!this.isEditable||0!==e.libID||e.code!==_0x585354.SYMBOL_MODEL&&e.code!==_0x585354.SYMBOL_PICTURE)return;if(null===WebGLPlot$c.getLibManager(this._scene._plottingID))throw new WebGLPlot$c.DeveloperError("Plotting is needed initialize to get SymbolLibManager");for(var i=[],n=0;n<e.points.length;n++)i.push(e.points[n].clone());var r=null;let o=WebGLPlot$c.defined(e.modelScale)?e.modelScale:1;var a={layer:this,libID:e.libID,code:e.code,localPoints:i,modelScale:new _0x45ea17(o,o,o),pictureSymbolSize:e.pictureSymbolSize};r=new _0x36b026(a),e.code===_0x585354.SYMBOL_MODEL?(r._showMode=_0x3f7d9f.Marker,r._modelPath=e.url,r._symbolType=_0x585354.SYMBOL_MODEL):e.code===_0x585354.SYMBOL_PICTURE&&(r._showMode=_0x3f7d9f.Picture,r._picturePath=e.url,r._symbolType=_0x585354.SYMBOL_PICTURE),_0x13c6b0(e,r),WebGLPlot$c.defined(r)&&null!==r&&this._pushGeoGraphicObjectArray(r),"function"==typeof t&&t({feature:r})},_0x4ab86a.prototype.createGraphicObject=function(e,t,i){var n=null;return i.symbolType===_0x585354.SYMBOL_DOT?n=new _0x36b026({layer:e,libID:i.libID,code:i.code,localPoints:t,serverData:i}):i.symbolType!==_0x585354.SYMBOL_DOT&&i.symbolType!==_0x585354.SYMBOL_UNKNOW&&(n=new _0x34d5f9({layer:e,libID:i.libID,code:i.code,localPoints:t,serverData:i})),WebGLPlot$c.defined(n)&&null!==n&&e._pushGeoGraphicObjectArray(n),n},_0x4ab86a.prototype.update=function(e,t,i,n){if(this._valid)for(var r=0;r<this._geoGraphicObjects.length;r++)(this._geoGraphicObjects[r]instanceof _0x36b026||this._geoGraphicObjects[r]instanceof _0x34d5f9||this._geoGraphicObjects[r]instanceof _0x20e33d)&&(this.visibility?this._geoGraphicObjects[r].update(e,t,i,n):this._geoGraphicObjects[r].setVisible(this.visibility))},_0x4ab86a.prototype.render=function(e,t){if(this._valid){for(var i=0;i<this._geoGraphicObjects.length;i++)!1===this._geoGraphicObjects[i]._initialize&&(this.updatePrimitive=!0),(this._geoGraphicObjects[i]instanceof _0x36b026||this._geoGraphicObjects[i]instanceof _0x34d5f9||this._geoGraphicObjects[i]instanceof _0x20e33d)&&this._geoGraphicObjects[i].initSymbol();this.updatePrimitive&&(_0x24dc2a.setUpdatePrimitive(!0,this._scene),this.updatePrimitive=!1)}},_0x4ab86a.prototype.setVisibleByID=function(e,t){if(this._valid&&!1!==this._visibility)for(var i=0;i<this._geoGraphicObjects.length;++i)if(this._geoGraphicObjects[i]&&e===this._geoGraphicObjects[i].id){this._geoGraphicObjects[i].display=t;break}},_0x4ab86a.prototype.setColorByID=function(e,t){if(this._valid&&!1!==this._visibility){if(t instanceof Array)return t=new WebGLPlot$c.Color(t[0],t[1],t[2],t[3]),void this._geoGraphicObjects[e].setColor(t);this._geoGraphicObjects[e].setColor(t)}},_0x4ab86a.prototype.resetColor=function(){this._valid},_0x4ab86a.prototype.getFeatureByUuid=function(e){if(!this._valid)return null;for(var t=0;t<this._geoGraphicObjects.length;++t){if(e===this._geoGraphicObjects[t]._id)return this._geoGraphicObjects[t];if(this._geoGraphicObjects[t]instanceof _0x20e33d&&this._geoGraphicObjects[t].getFeatureByUuid(e))return this._geoGraphicObjects[t]}},_0x4ab86a.prototype.findFeatureByUuid=function(e){if(!this._valid||""===e||!WebGLPlot$c.defined(e))return null;for(var t=0;t<this._geoGraphicObjects.length;++t)if(e===this._geoGraphicObjects[t]._id)return{feature:this._geoGraphicObjects[t],index:t};return null},_0x4ab86a.prototype.addFeature=function(e){var t=e.id;if(!WebGLPlot$c.defined(t))return!1;for(var i=0;i<this._geoGraphicObjects.length;++i)if(t===this._geoGraphicObjects[i].id)return!1;return e._layer=this,this._pushGeoGraphicObjectArray(e),!0},_0x4ab86a.prototype.setSelectedFeature=function(e){if(this._valid&&this.isSelected)for(var t=0;t<this._geoGraphicObjects.length;++t)if(e===this._geoGraphicObjects[t]){this._selectedFeature=this._geoGraphicObjects[t],WebGLPlot$c.defined(this._plottingEdit)&&this._plottingEdit.DoSelectObjectEdit(this._selectedFeature);break}},_0x4ab86a.prototype.setSelectedFeatureByIndex=function(e){!this._valid||!this.isSelected||WebGLPlot$c.defined(this._geoGraphicObjects[e])&&(this._selectedFeature=this._geoGraphicObjects[e],WebGLPlot$c.defined(this._plottingEdit)&&this._plottingEdit.DoSelectObjectEdit(this._selectedFeature))},_0x4ab86a.prototype.setSelectedFeatureByID=function(e){if(this._valid&&this.isSelected)for(var t=0;t<this._geoGraphicObjects.length;++t)if(e===this._geoGraphicObjects[t]._id){this._selectedFeature=this._geoGraphicObjects[t],WebGLPlot$c.defined(this._plottingEdit)&&this._plottingEdit.DoSelectObjectEdit(this._selectedFeature);break}},_0x4ab86a.prototype.releaseSelection=function(){!this._valid||((WebGLPlot$c.defined(this._selectedFeature)||null!==this._selectedFeature)&&(this._selectedFeature=void 0),WebGLPlot$c.defined(this._plottingEdit)&&this._plottingEdit.unSelection(!0))},_0x4ab86a.prototype.removeGeoGraphicObject=function(e,t){if(WebGLPlot$c.defined(e)&&0!==this._geoGraphicObjects.length&&this.isEditable)for(var i=0;i<this._geoGraphicObjects.length;i++)if(this._geoGraphicObjects[i].id===e.id||this._geoGraphicObjects[i]instanceof _0x20e33d&&this._geoGraphicObjects[i].getFeatureByUuid(e.id)){let e=this._geoGraphicObjects[i].id,n=this.name;if(_0x43a805.getInstance().symbolBeforeDeleted.raiseEvent([e],n),this._geoGraphicObjects[i]._destroy(),this._geoGraphicObjects[i]=null,this._geoGraphicObjects.splice(i,1),t&&_0x43a805.getInstance().symbolDeleted.raiseEvent([e],n),WebGLPlot$c.defined(this._plottingEdit))this._plottingEdit.releaseSelection(),this._plottingEdit.RemoveFeatureEvent.raiseEvent();return!0}},_0x4ab86a.prototype.removeAll=function(e){this._removeAll(!1,e)},_0x4ab86a.prototype._removeAll=function(e,t){if(!(e||0!==this._geoGraphicObjects.length&&this.isEditable))return;let i=[];for(var n=0;n<this._geoGraphicObjects.length;n++)i.push(this._geoGraphicObjects[n].id);_0x43a805.getInstance().symbolBeforeDeleted.raiseEvent(i,this.name);for(n=0;n<this._geoGraphicObjects.length;n++)this._geoGraphicObjects[n]._destroy();(t&&_0x43a805.getInstance().symbolDeleted.raiseEvent(i,this.name),WebGLPlot$c.defined(this._plottingEdit))&&(this._plottingEdit.releaseSelection(),this._plottingEdit.RemoveFeatureEvent.raiseEvent());this._geoGraphicObjects=[]},_0x4ab86a.prototype.destroy=function(e){this._plottingEdit&&(this._plottingEdit.releaseSelection(),this._plottingEdit._plottingLayer=null);let t=[];for(let e=0;e<this._geoGraphicObjects.length;e++){let i=this._geoGraphicObjects[e];t.push(i.id)}_0x43a805.getInstance().symbolBeforeDeleted.raiseEvent(t,this.name);for(let e=0;e<this._geoGraphicObjects.length;e++){let t=this._geoGraphicObjects[e];t._destroy(),t=void 0}e&&_0x43a805.getInstance().symbolDeleted.raiseEvent(t,this.name),this._geoGraphicObjects=[],this._selectedFeature=null,this._name=null,this._projectName=null,this._waterPlanes=null,this._scene=null},_0x4ab86a.prototype.delete=function(){this.removeAll(),_0x51d1e4.getPlotLayers(this._scene).remove(this.name,!0)},_0x4ab86a.prototype.removeFeatureByUuId=function(e,t){for(var i=0;i<this._geoGraphicObjects.length;++i)e===this._geoGraphicObjects[i].id&&this.removeGeoGraphicObject(this._geoGraphicObjects[i],t)},_0x4ab86a.prototype.setUseDepthTest=function(e){this._bIsUseDepthTest=e,_0x24dc2a.setUseDepthTest(e,this._scene)},_0x4ab86a.prototype.createGroupObject=function(e){if(!e||e.length<=1||!this.isEditable)return null;for(var t=0;t<e.length;t++)if(!WebGLPlot$c.defined(e[t])||null===this.findFeatureByUuid(e[t].id))return null;for(t=0;t<e.length;t++)this.removeGeoGraphicObject(e[t]);var i=new _0x20e33d(e);return this._pushGeoGraphicObjectArray(i,!1),i},_0x4ab86a.prototype.getFeaturesFromGroupObject=function(e){var t=[];for(var i in e.subObjects)e.subObjects[i]instanceof _0x20e33d?t=t.concat(this.getFeaturesFromGroupObject(e.subObjects[i])):t.push(e.subObjects[i]);return t},_0x4ab86a.prototype.unGroupObject=function(e){if(!(e instanceof _0x20e33d&&this.isEditable))return!1;var t=e.unGroupObject();return this.removeGeoGraphicObject(e),this._geoGraphicObjects=this._geoGraphicObjects.concat(t),!0},_0x4ab86a.prototype.geoJsonToGeoGraphicObject=function(e,t){var i=this.findFeatureByUuid(e.uuid);i&&this.removeGeoGraphicObject(i.feature);var n=null;if(_0x585354.GROUPOBJECT===parseInt(e.symbolType)){n=new _0x20e33d(this.createGroupFeaturesByGeoJson(e),e.uuid)}else n=this.createSymbolByGeoJson(n,e);this._pushGeoGraphicObjectArray(n,!0),n._GeoJsonFeature=e,"function"==typeof t&&t({feature:n})},_0x4ab86a.prototype.createGroupFeaturesByGeoJson=function(e){var t=[];if(!this.isEditable)return t;var i=null,n=e.geometries;for(var r in n){if(_0x585354.GROUPOBJECT===parseInt(n[r].symbolType))i=new _0x20e33d(this.createGroupFeaturesByGeoJson(n[r]),n[r].id);else i=this.createSymbolByGeoJson(i,n[r]);t.push(i)}return t},_0x4ab86a.prototype.createSymbolByGeoJson=function(e,t){var i=parseInt(t.libID),n=parseInt(t.code);(99999===t.code||99999===t.symbolType)&&(n=_0x585354.SYMBOL_MODEL,t.symbolType=_0x585354.SYMBOL_MODEL);for(var r=[],o=t.localePoints,a=0;a<o.length;++a){var s=o[a],l=parseFloat(s.x),u=parseFloat(s.y),c=WebGLPlot$c.defined(s.z)?parseFloat(s.z):0;r.push(new _0x45ea17(l,u,c))}return _0x4082b1(e=t.symbolType===_0x585354.SYMBOL_DOT||t.symbolType===_0x585354.SYMBOL_MODEL||t.symbolType===_0x585354.SYMBOL_PICTURE?new _0x36b026({layer:this,libID:i,code:n,localPoints:r,symbolSizeInLib:t.symbolSize}):new _0x34d5f9({layer:this,libID:i,code:n,localPoints:r}),t,this._scene._plottingID),e},_0x4ab86a.prototype.setCustomClipBox=function(e){},_0x4ab86a.prototype.clearCustomClipBox=function(){},_0x4ab86a.prototype._pushGeoGraphicObjectArray=function(e,t){void 0===t&&(t=!0),(e instanceof _0x521a23||e instanceof _0x20e33d||e instanceof _0x20e33d)&&(this._geoGraphicObjects.push(e),t&&(this._symbolAddedEvent.raiseEvent(e),_0x43a805.getInstance().symbolAdded.raiseEvent(e,this.name)))},_0x4ab86a.prototype.updateGeoGraphicObjectByGeoJson=function(e){if(WebGLPlot$c.defined(e)&&WebGLPlot$c.defined(e.uuid)){let t=this.getFeatureByUuid(e.uuid);if(WebGLPlot$c.defined(t)){if(t instanceof _0x20e33d){let i=this.createGroupFeaturesByGeoJson(e);(!i||0===i.length)&&(i=[e]),t.updateFeatures(i)}else _0x4082b1(t,e,this._scene._plottingID),t._initialize=!1;return _0x43a805.getInstance().symbolUpdated.raiseEvent(t),t}}return null},_0x4ab86a.prototype.getBounds=function(){for(var e={north:-1e4,east:-1e4,south:1e4,west:1e4},t=0;t<this._geoGraphicObjects.length;t++)if(this._geoGraphicObjects[t]instanceof _0x36b026||this._geoGraphicObjects[t]instanceof _0x20e33d){var i=this._geoGraphicObjects[t].localPoints[0];i.y>e.north&&(e.north=i.y),i.y<e.south&&(e.south=i.y),i.x>e.east&&(e.east=i.x),i.x<e.west&&(e.west=i.x)}else if(this._geoGraphicObjects[t]instanceof _0x34d5f9)for(var n=this._geoGraphicObjects[t].localPoints,r=0;r<n.length;r++)n[r].y>e.north&&(e.north=n[r].y),n[r].y<e.south&&(e.south=n[r].y),n[r].x>e.east&&(e.east=n[r].x),n[r].x<e.west&&(e.west=n[r].x);return e.north=Cesium.Math.toRadians(e.north),e.east=Cesium.Math.toRadians(e.east),e.south=Cesium.Math.toRadians(e.south),e.west=Cesium.Math.toRadians(e.west),e},Object.defineProperties(_0x4ab86a.prototype,{id:{get:function(){return this._id}},visibility:{get:function(){return this._visibility},set:function(e){if(this._visibility!==e){for(var t in this._visibility=e,this._geoGraphicObjects)if(this._geoGraphicObjects[t]instanceof _0x36b026||this._geoGraphicObjects[t]instanceof _0x34d5f9||this._geoGraphicObjects[t]instanceof _0x20e33d){if(!this._geoGraphicObjects[t].display)continue;this._geoGraphicObjects[t].setVisible(e)}!e&&this._plottingEdit&&this._plottingEdit.releaseSelection(),_0x43a805.getInstance().layerVisibleChanged.raiseEvent(this.name,e)}}},name:{get:function(){return this._name},set:function(e){e!==this._name&&(this._name=e)}},geoGraphicObjects:{get:function(){return this._geoGraphicObjects}},selectedFeature:{get:function(){return this._selectedFeature}},isEditable:{get:function(){return this._isEditable},set:function(e){e!==this._isEditable&&(this._isEditable=e,!e&&this._plottingEdit?this._plottingEdit.releaseSelection():e&&this._plottingEdit&&this.selectedFeature&&this._plottingEdit.DoSelectObjectEdit(this.selectedFeature),_0x43a805.getInstance().layerEditableChanged.raiseEvent(this.name,e))}},isSelected:{get:function(){return this._isSelected},set:function(e){e!==this._isSelected&&(this._isSelected=e,e?this._plottingEdit.activate():(this._plottingEdit.deactivate(),this.releaseSelection()),_0x43a805.getInstance().layerSelectedChanged.raiseEvent(this.name,e))}},isLocked:{get:function(){return this._isLocked},set:function(e){e!==this._isLocked&&(this._isLocked=e,_0x43a805.getInstance().layerActived.raiseEvent(this.name,e))}},symbolAddedEvent:{get:function(){return this._symbolAddedEvent}}}),_0x4ab86a.prototype.getSelection=function(){return[]};const _0x2bac42=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x4c2813=_0x2bac42(void 0,(function(){return _0x4c2813.toString().search("(((.+)+)+)+$").toString().constructor(_0x4c2813).search("(((.+)+)+)+$")}));_0x4c2813();var _0x5a5fb4=function(){this._layers=new WebGLPlot.AssociativeArray,this._layerQueue=[],this._layerIndex=3,this._selectedLayer=void 0,this.collentionLayer=void 0,this.goAnimationLayer=void 0};Object.defineProperties(_0x5a5fb4.prototype,{layerQueue:{get:function(){return this._layerQueue}}}),_0x5a5fb4.prototype.prePassesUpdate=function(e){this.render(e,null)},_0x5a5fb4.prototype.update=function(e,t,i,n){var r=this._layerQueue,o=this._layerQueue.length,a=0;for(a=0;a<o;a++){var s=r[a];!WebGLPlot.defined(s)||s.update(e,t,i)}WebGLPlot.defined(this.collentionLayer)&&this.collentionLayer.update(e,t,i),WebGLPlot.defined(this.goAnimationLayer)&&this.goAnimationLayer.update(e,t,i)},_0x5a5fb4.prototype.render=function(e,t){var i=this._layerQueue,n=this._layerQueue.length,r=0;for(r=0;r<n;r++){var o=i[r];!WebGLPlot.defined(o)||o.render(t,e)}WebGLPlot.defined(this.collentionLayer)&&this.collentionLayer.render(t,e),WebGLPlot.defined(this.goAnimationLayer)&&this.goAnimationLayer.render(t,e)},_0x5a5fb4.prototype.releaseSelection=function(){var e=this._layerQueue,t=this._layerQueue.length,i=0;for(i=0;i<t;i++){var n=e[i];!WebGLPlot.defined(n)||n.releaseSelection()}},_0x5a5fb4.prototype.find=function(e){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("name is required.");return this._layers.get(e)},_0x5a5fb4.prototype.findByIndex=function(e){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("index is required.");if(e>this._layerQueue.length-1)throw new WebGLPlot.DeveloperError("index is out of bounds.");return this._layerQueue[e]},_0x5a5fb4.prototype.add=function(e,t){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("layer is required.");var i=e._name;if(!WebGLPlot.defined(i)||""==i)throw new WebGLPlot.DeveloperError("name is required.");var n=this._layers;if(n.contains(i))throw new WebGLPlot.RuntimeError("An layer with name "+i+" already exists in this Scene.");e._id=this._layerIndex++;var r=this._layerQueue.length;n.set(i,e),t=WebGLPlot.defaultValue(t,r),e.index=t,this._layerQueue.push(e),this._layerQueue.sort((function(e,t){return e.index-t.index})),_0x43a805.getInstance().layerAdded.raiseEvent(i)},_0x5a5fb4.prototype.remove=function(e,t){if(t=WebGLPlot.defaultValue(t,!0),!WebGLPlot.defined(e))return!1;var i=this.find(e);return!!i&&(!!this._layers.remove(e)&&(this._layerQueue.splice(this._layerQueue.indexOf(i),1),t&&(i.destroy(),i=void 0),_0x43a805.getInstance().layerDeleted.raiseEvent(e),!0))},_0x5a5fb4.prototype.removeAll=function(e){let t=[];e=WebGLPlot.defaultValue(e,!0);for(let i=0;i<this._layerQueue.length;i++){let n=this._layerQueue[i];t.push(n.name),e&&(n.destroy(),n=void 0)}this._layers.removeAll(),this._layerQueue.length=0,_0x43a805.getInstance().layerDeleted.raiseEvent(t)},_0x5a5fb4.prototype.setSelectedLayer=function(e){this._selectedLayer=e},_0x5a5fb4.prototype.getSelectedLayer=function(){return this._selectedLayer},_0x5a5fb4.prototype.getPlottingLayerByName=function(e){for(let t=0;t<this._layerQueue.length;t++){let i=this._layerQueue[t];if(i instanceof _0x4ab86a&&e===i.name)return i}return null},_0x5a5fb4.prototype.getPlottingLayerIsActived=function(){for(let e=0;e<this._layerQueue.length;e++){let t=this._layerQueue[e];if(t instanceof _0x4ab86a&&!t.isLocked)return t}return null},_0x5a5fb4.prototype.setPlottingLayerIsActived=function(e,t,i){let n=!1;if(!e||""===e)return n;for(let r=0;r<this._layerQueue.length;r++){let o=this._layerQueue[r];if(o instanceof _0x4ab86a&&o.name===e){o.isLocked=!1,t&&t.setPlottingLayer(o),i&&i.setPlottingLayer(o),n=!0;break}}if(n)for(let t=0;t<this._layerQueue.length;t++){let i=this._layerQueue[t];i instanceof _0x4ab86a&&i.name!==e&&(i._isLocked=!0)}return n},_0x5a5fb4.prototype.getAllPlottingLayers=function(){let e=[];for(let t=0;t<this._layerQueue.length;t++)this._layerQueue[t]instanceof _0x4ab86a&&e.push(this._layerQueue[t]);return e},_0x5a5fb4.prototype.getFeatrueByUuID=function(e){for(let t=0;t<this._layerQueue.length;t++){let i=this._layerQueue[t];if(i instanceof _0x4ab86a){let t=i.findFeatureByUuid(e);if(WebGLPlot.defined(t))return t}}return null},WebGLPlot.PlotLayers=_0x5a5fb4;var _0x57f7b6=function(){var e=function(){var e=!0;return function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){var t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();var n=!0;return function(e,t){var i=n?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x2f9855=_0x57f7b6(void 0,(function(){return _0x2f9855.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f9855).search("(((.+)+)+)+$")}));function _0x1ec317(e,t){this._name=e,this._features=[],this._valid=!0,this._scene=t,this._waterPlanes=[],this._visibleViewport=0,this.visibility=!0}_0x2f9855(),_0x1ec317.prototype.destroy=function(){this._valid=null,this._waterPlanes=null,this._visibleViewport=null,this._features=null,this._name=null},_0x1ec317.prototype.addFeatures=function(e){Array.isArray(e)||(e=[e]),this._features=this._features.concat(e)},_0x1ec317.prototype.update=function(e,t,i,n){if(this._valid)for(var r=0;r<this._features.length;r++)!1===this._features[r]._initialize&&(this.updatePrimitive=!0),(this._features[r]instanceof _0x36b026||this._features[r]instanceof _0x34d5f9)&&this._features[r].update(e,t,i,n)},_0x1ec317.prototype.render=function(){for(var e=0;e<this._features.length;e++)!1===this._features[e]._initialize&&(this.updatePrimitive=!0),(this._features[e]instanceof _0x36b026||this._features[e]instanceof _0x34d5f9)&&this._features[e].initSymbol();this.updatePrimitive&&(_0x24dc2a.setUpdatePrimitive(!0,this._scene),this.updatePrimitive=!1)},_0x1ec317.prototype.removeFeatures=function(e){if(WebGLPlot.defined(e)&&0!==this._features.length){for(var t=[],i=0;i<this._features.length;i++){if(this._features[i]===e){1===this._features[i].symbolType&&this._features[i]._destroy();continue}t.push(this._features[i])}this._features=t}},_0x1ec317.prototype.releaseSelection=function(){},_0x1ec317.prototype.setCustomClipBox=function(e){},_0x1ec317.prototype.clearCustomClipBox=function(){},Object.defineProperties(_0x1ec317.prototype,{id:{get:function(){return this._id}}});var _0x13bf11=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x108508=_0x13bf11(void 0,(function(){return _0x108508.toString().search("(((.+)+)+)+$").toString().constructor(_0x108508).search("(((.+)+)+)+$")}));_0x108508();var _0x3b06e2={PLAYFROMNOW:0,PLAYSAMELASTONE:1,PLAYAFTERLASTONE:2,UNKNOWN:3},_0x5158e5=Object.freeze(_0x3b06e2),_0x3acb48=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1ac2da=_0x3acb48(void 0,(function(){return _0x1ac2da.toString().search("(((.+)+)+)+$").toString().constructor(_0x1ac2da).search("(((.+)+)+)+$")}));_0x1ac2da();class _0x2fee9e{constructor(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._startTime=WebGLPlot.defaultValue(e.startTime,0),this._duration=WebGLPlot.defaultValue(e.duration,5),this._repeat=WebGLPlot.defaultValue(e.repeat,!1),this._name=WebGLPlot.defaultValue(e.name,""),this._animationState=WebGLPlot.defaultValue(e.animationState,_0x4d33de.UNKNOWN),this._goFeature=WebGLPlot.defaultValue(e.goFeature,null),this._animationGOFeature=WebGLPlot.defaultValue(e.animationGOFeature,null),this._innerStartTime=WebGLPlot.defaultValue(e.innerStartTime,0),this._lastExecute=WebGLPlot.defaultValue(e.lastExecute,!1),this._pauseTime=WebGLPlot.defaultValue(e.pauseTime,0),this._ratio=WebGLPlot.defaultValue(e.ratio,0),this._symbolTexts=WebGLPlot.defaultValue(e.symbolTexts,""),this._animationManager=null,this._animationFinish=new WebGLPlot.Event,this._animationBegin=new WebGLPlot.Event,this._isSendBegin=!0,this._playSpeed=1,this.__playPastRatio=0,this._groupIndex=WebGLPlot.defaultValue(e.groupIndex,void 0),this._animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5158e5.UNKNOWN),this.delayTime=0,this._needSetShowFlag=!0}destroy(){this.showAnimationFeature(!1),this.removeAnimationFeature(),this._goFeature=null,this._animationGOFeature._destroy(),this._animationGOFeature=null,this._name="",this.goFeatureLocalPts=[],this._symbolTexts="",this._animationState=_0x4d33de.UNKNOWN,this._pathFeature&&(_0x24dc2a.removeAllAlgoPloyline(this._pathFeature,this._scene),this._pathFeature._destroy(),this._pathFeature=null),this.dynamicScane&&(this.dynamicScane.removeScaneCylinder(),this.dynamicScane=void 0)}setGOFeature(e,t){if(null==t||null===t.layer||null===e._goAnimationLayer)return!1;this._animationManager=e,this._goFeature=t;var i=this.createAnimationGOFeature(this._goFeature);return null!==this._animationGOFeature&&(i||(this._animationGOFeature._layer=e._goAnimationLayer,e._goAnimationLayer.addFeatures(this._animationGOFeature)),this.showAnimationFeature(!1),(_0x3b65eb.ANIMATION_GROW===this.getGOAnimationType()||_0x3b65eb.ANIMATION_GROW_EXP===this.getGOAnimationType()||_0x3b65eb.ANIMATION_REDUCE_EXP==this.getGOAnimationType())&&(this.goFeatureLocalPts=WebGLPlot.clonePoints(this._goFeature._localPoints)),!0)}play(e=!0){WebGLPlot.defined(this._animationGrowEXP_isFirstExecute)&&(this._animationGrowEXP_isFirstExecute=!0);let t=new Date;if(this.__playSpeedTime=t.getTime()/1e3,this.__playTime=t.getTime()/1e3,this._animationState===_0x4d33de.PAUSE){const e=t.getTime()/1e3-this._pauseTime;this._innerStartTime+=e}else this._innerStartTime=t.getTime()/1e3,WebGLPlot.defined(this._goFeature)&&this._goFeature.releaseSelection(),e&&this.showAnimationFeature(!0),this.__playPastRatio=0;this._lastExecute=!1,this._animationState=_0x4d33de.PLAYING,_0x43a805.getInstance().animationPlay.raiseEvent(this.name)}stop(){this._animationState=_0x4d33de.STOP,_0x43a805.getInstance().animationStop.raiseEvent(this.name)}pause(){if(this._animationState===_0x4d33de.PLAYING){this._animationState=_0x4d33de.PAUSE;var e=new Date;this._pauseTime=e.getTime()/1e3,_0x43a805.getInstance().animationPause.raiseEvent(this.name)}}reset(){this._animationState=_0x4d33de.RESET,this.showAnimationFeature(!1),_0x43a805.getInstance().animationReset.raiseEvent(this.name)}createAnimationGOFeature(e){for(var t=0;t<this._animationManager.goAnimations.length;t++){var i=this._animationManager.goAnimations[t];if(i._goFeature.id===e.id)return this._animationGOFeature=i._animationGOFeature,this._animationGOFeature}return this._animationGOFeature=e.clone(),this._animationGOFeature._id+=this._name,this._animationGOFeature._isEdit=!0,this._animationGOFeature._valid=!1,this._animationGOFeature._isAnimationFeature=!0,null}canExecute(){if(this._animationState!==_0x4d33de.PLAYING)return!1;var e=(new Date).getTime()/1e3;if(this._innerStartTime+this._startTime>e)return!1;var t=this.getRatioByTime();return!(t>1&&this._lastExecute||t<0)}getRatioByTime(){if(this._animationState!==_0x4d33de.PLAYING)return 0;let e=this.__computePlayRatio();return e>=1&&!this._lastExecute?(this._repeat?(e=0,this._lastExecute=!1,this._animationState=_0x4d33de.PLAYING,this._innerStartTime=(new Date).getTime()/1e3,this.__playTime=(new Date).getTime()/1e3):(e=1,this._lastExecute=!0,this._isSendBegin=!0,this._animationState=_0x4d33de.STOP,this._animationFinish.raiseEvent(this.name),_0x43a805.getInstance().animationFinished.raiseEvent(this.name)),this.__playSpeedTime=(new Date).getTime()/1e3,this.__playPastRatio=0):this._isSendBegin&&(this._animationBegin.raiseEvent(this.name),_0x43a805.getInstance().animationBegined.raiseEvent(this.name),this._isSendBegin=!1),e<0&&(e=0,this.__playSpeedTime=(new Date).getTime()/1e3,this.__playPastRatio=0),this._ratio=e,e}showAnimationFeature(e){null!==this._animationGOFeature&&null!==this._animationGOFeature._symbolStyle&&(this.resetAnimationFeature(e),(this.getGOAnimationType()===_0x3b65eb.ANIMATION_BROKENLINE_EXP||this.getGOAnimationType()===_0x3b65eb.ANIMATION_WAY_EXP||this.getGOAnimationType()===_0x3b65eb.ANIMATION_WAY_EXP||this.getGOAnimationType()===_0x3b65eb.ANIMATION_CURVE_EXP||this.getGOAnimationType()===_0x3b65eb.ANIMATION_WAY||this.getGOAnimationType()===_0x3b65eb.ANIMATION_REDUCE_EXP)&&(this._animationGOFeature.display=e)),null!==this._goFeature&&null!==this._goFeature._symbolStyle&&(this._goFeature.display=!e,this._goFeature._initialize=!1),e&&(this._isSendBegin=!0)}resetAnimationFeature(e){!this._needSetShowFlag||(this._animationGOFeature._symbolStyle=this._goFeature._symbolStyle.clone(),this._animationGOFeature._localPoints=this._goFeature._localPoints,this._animationGOFeature.isClampToGround=this._goFeature.isClampToGround,this._animationGOFeature.gridSymbolSize=this._goFeature.gridSymbolSize,this._animationGOFeature._isNegativeImage=this._goFeature._isNegativeImage,this._animationGOFeature._gridSurroundLineWidth=this._goFeature._gridSurroundLineWidth,this._animationGOFeature._gridLineWidth=this._goFeature._gridLineWidth,this._animationGOFeature.lineSymbolID=this._goFeature.lineSymbolID,this._animationGOFeature.textContent=this._goFeature.textContent,this._animationGOFeature.symbolTextStyle=this._goFeature.symbolTextStyle,this._animationGOFeature._initialize=!1)}setAnimationShowFlag(){let e=this._animationManager.findGOAnimationsByUuid(this._goFeature._id);if(e.length>0)for(let t=0;t<e.length;t++)e[t]._needSetShowFlag=!1}setAnimationName(e){return!this._animationManager.findGOAnimationByName(e)&&(this._name=e,!0)}__setPlayRatioState(){this.__playSpeedTime=(new Date).getTime()/1e3,this.__playPastRatio=this._ratio}__computePlayRatio(){let e=0;const t=(new Date).getTime()/1e3,i=this._duration/this.playSpeed;return e=this.__playTime===this.__playSpeedTime?(t-this._innerStartTime-this._startTime)/i:(t-this.__playSpeedTime)/i,e+=this.__playPastRatio,this._innerStartTime+this._startTime>=t||e<0?0:e}removeAnimationFeature(){if(null!==this._animationGOFeature){var e=this._animationManager.goAnimations,t=!1;if(null!==e)for(var i=0;i<e.length;i++){var n=e[i];if(n!==this&&n._animationGOFeature===this._animationGOFeature){t=!0;break}}t||this._animationManager._goAnimationLayer.removeFeatures(this._animationGOFeature)}}getBaseJSONData(){var e={};return this.goFeature&&(e.goLayerUuid=this.goFeature.id),e.name=this.name,e.startTime=this.startTime,e.duration=this.duration,e.repeat=this.repeat,e.playtype=this.animationPlayType,e}fromBaseJSONData(e){this._startTime=e.startTime,this._duration=e.duration,this._repeat=e.repeat,this._animationPlayType=e.playtype,e.delayTime||(this.delayTime=this.getStartTime())}_serverColorToColor(e){var t=new WebGLPlot.Color;return t.red=e.red/255,t.green=e.green/255,t.blue=e.blue/255,t.alpha=e.alpha/255,t}_colorFormat(e){var t=new Object;return t.alpha=255*e.alpha,t.red=255*e.red,t.green=255*e.green,t.blue=255*e.blue,t}setStartTime(e){e<0&&(e=0),this.delayTime=e;for(var t=this._animationManager.getAnimationGroup(this).group,i=t.indexOf(this);i<t.length;i++){var n=t[i];this._animationManager.changeAnimationTime(n)}_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData())}getStartTime(){return this._animationManager.getAnimationDelayTime(this)}}Object.defineProperties(_0x2fee9e.prototype,{startTime:{get:function(){return this._startTime},set:function(e){e!==this._startTime&&(this._startTime=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},repeat:{get:function(){return this._repeat},set:function(e){e!==this._repeat&&(this._repeat=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},duration:{get:function(){return this._duration},set:function(e){if(e!==this._duration){this._duration=e;for(var t=this._animationManager.getAnimationGroup(this).group,i=t.indexOf(this);i<t.length;i++){var n=t[i];this._animationManager.changeAnimationTime(n)}_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData())}}},name:{get:function(){return this._name},set:function(e){e!==this._name&&(this._name=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},groupName:{get:function(){return this._groupName},set:function(e){e!==this._groupName&&(this._groupName=e)}},animationState:{get:function(){return this._animationState},set:function(e){e!==this._animationState&&(this._animationState=e)}},goFeature:{get:function(){return this._goFeature},set:function(e){e!==this._goFeature&&(this._goFeature=e)}},animationGOFeature:{get:function(){return this._animationGOFeature},set:function(e){e!==this._animationGOFeature&&(this._animationGOFeature=e)}},innerStartTime:{get:function(){return this._innerStartTime},set:function(e){e!==this._innerStartTime&&(this._innerStartTime=e)}},lastExecute:{get:function(){return this._lastExecute},set:function(e){e!==this._lastExecute&&(this._lastExecute=e)}},pauseTime:{get:function(){return this._pauseTime},set:function(e){e!==this._pauseTime&&(this._pauseTime=e)}},ratio:{get:function(){return this._ratio},set:function(e){e!==this._ratio&&(this._ratio=e)}},symbolTexts:{get:function(){return this._symbolTexts},set:function(e){e!==this._symbolTexts&&(this._symbolTexts=e)}},animationBegin:{get:function(){return this._animationBegin}},animationFinish:{get:function(){return this._animationFinish}},playSpeed:{get:function(){return this._playSpeed},set:function(e){e!==this._playSpeed&&(this.__setPlayRatioState(),this._playSpeed=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},fastForwardTime:{set:function(e){if(e<0)return;let t=e/this._duration;t>1&&(t=1),this.__playPastRatio+=t,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData())}},rewindTime:{set:function(e){if(e<0)return;let t=-e/this._duration;t>0&&(t=0),this.__playPastRatio+=t,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData())}},animationPlayType:{get:function(){return this._animationPlayType},set:function(e){if(e!==this._animationPlayType){this._animationPlayType=e;for(var t=this._animationManager.getAnimationGroup(this).group,i=t.indexOf(this);i<t.length;i++){var n=t[i];this._animationManager.changeAnimationTime(n)}_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData())}}}});var _0x1075ba=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x575b24=_0x1075ba(void 0,(function(){return _0x575b24.toString().search("(((.+)+)+)+$").toString().constructor(_0x575b24).search("(((.+)+)+)+$")}));_0x575b24();var _0x26059d={Blink_Frequency:0,Blink_Number:1},_0x160acc=Object.freeze(_0x26059d),_0x50f24e=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x9d06cd=_0x50f24e(void 0,(function(){return _0x9d06cd.toString().search("(((.+)+)+)+$").toString().constructor(_0x9d06cd).search("(((.+)+)+)+$")}));_0x9d06cd();var _0x38bfad={Replace_NoColor:0,Replace_Color:1},_0x3b00a4=Object.freeze(_0x38bfad),_0x14446e=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x40c92b=_0x14446e(void 0,(function(){return _0x40c92b.toString().search("(((.+)+)+)+$").toString().constructor(_0x40c92b).search("(((.+)+)+)+$")}));_0x40c92b();class _0x9b417f extends _0x2fee9e{constructor(e){super(e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT)),this._blinkInterval=WebGLPlot$g.defaultValue(e.blinkInterval,500),this._blinkStyle=WebGLPlot$g.defaultValue(e.blinkStyle,_0x160acc.Blink_Frequency),this._blinkNumber=WebGLPlot$g.defaultValue(e.blinkNumber,0),this._replaceStyle=WebGLPlot$g.defaultValue(e.replaceStyle,_0x3b00a4.Replace_NoColor),this._startVisiable=WebGLPlot$g.defaultValue(e.startVisiable,!1),this._startColor=WebGLPlot$g.defaultValue(e.startColor,new WebGLPlot$g.Color(0,0,1,1)),this._endColor=WebGLPlot$g.defaultValue(e.endColor,new WebGLPlot$g.Color(1,0,0,1))}getGOAnimationType(){return _0x3b65eb.ANIMATION_BLINK}setStartVisiable(e){this._startVisiable=e}getStartVisiable(){return this._startVisiable}execute(){if(!this.canExecute())return!1;this._goFeature.display&&(this._goFeature.display=!1);var e=(new Date).getTime()/1e3,t=this._blinkInterval/1e3;return this._blinkStyle===_0x160acc.Blink_Number&&(t=this._blinkInterval=this._duration/this._blinkNumber),(e-this._innerStartTime)%t<=t/2?this._replaceStyle===_0x3b00a4.Replace_Color?this.setColor(this._startColor):this._animationGOFeature.display=!1:(this._animationGOFeature.display=!0,this._replaceStyle===_0x3b00a4.Replace_Color&&this.setColor(this._endColor)),this._lastExecute&&(this._replaceStyle===_0x3b00a4.Replace_Color&&(this._animationGOFeature._symbolStyle._lineColor=this._endColor),this._animationGOFeature._display=!0,this._animationGOFeature._initialize=!1),!0}getRatioByTime(){if(this._animationState!==_0x4d33de.PLAYING)return 0;var e=(new Date).getTime()/1e3;if(this._innerStartTime+this._startTime>e)return 0;var t=(e-this._innerStartTime-this._startTime)/this._duration;return t>=1&&!this._lastExecute?this._repeat?(this._innerStartTime=(new Date).getTime()/1e3,t=0,this._lastExecute=!1,this._animationState=_0x4d33de.PLAYING):(t=1,this._lastExecute=!0,this._isSendBegin=!0,this._animationState=_0x4d33de.STOP,this._animationFinish.raiseEvent(this.name),_0x43a805.getInstance().animationFinished.raiseEvent(this.name)):t<0&&(t=0),this._isSendBegin&&(this._animationBegin.raiseEvent(this.name),_0x43a805.getInstance().animationBegined.raiseEvent(this.name),this._isSendBegin=!1),this._ratio=t,t}resetAnimationFeature(e){!this._needSetShowFlag||(_0x2fee9e.prototype.resetAnimationFeature.call(this,e),this._startVisiable?this._animationGOFeature.display=!0:this._animationGOFeature.display=!1,e&&this.setAnimationShowFlag())}setColor(e){this._animationGOFeature._symbolStyle._lineColor!==e&&(this._animationGOFeature._symbolStyle._lineColor=e,this._animationGOFeature._symbolTextStyle.setTextRectColor(e),this._animationGOFeature._initialize=!1)}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.blinkStyle=this.blinkStyle,e.blinkInterval=this.blinkInterval,e.blinkNumber=this.blinkNumber,e.replaceStyle=this.replaceStyle,e.startColor=this._colorFormat(this.startColor),e.endColor=this._colorFormat(this.endColor),e}fromJSONData(e){this.fromBaseJSONData(e),this.blinkStyle=e.blinkStyle,this.blinkInterval=e.blinkInterval,this.blinkNumber=e.blinkNumber,this.replaceStyle=e.replaceStyle,this.startColor=this._serverColorToColor(e.startColor),this.endColor=this._serverColorToColor(e.endColor)}}Object.defineProperties(_0x9b417f.prototype,{blinkInterval:{get:function(){return this._blinkInterval},set:function(e){e!=this._blinkInterval&&(this._blinkInterval=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},blinkStyle:{get:function(){return this._blinkStyle},set:function(e){e!=this._blinkStyle&&(this._blinkStyle=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},blinkNumber:{get:function(){return this._blinkNumber},set:function(e){e!=this._blinkNumber&&(this._blinkNumber=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},replaceStyle:{get:function(){return this._replaceStyle},set:function(e){e!=this._replaceStyle&&(this._replaceStyle=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startColor:{get:function(){return this._startColor},set:function(e){e==this._startColor||!(e instanceof WebGLPlot$g.Color)||(this._startColor=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endColor:{get:function(){return this._endColor},set:function(e){e==this._endColor||!(e instanceof WebGLPlot$g.Color)||(this._endColor=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x1ebbb8=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x10293e=_0x1ebbb8(void 0,(function(){return _0x10293e.toString().search("(((.+)+)+)+$").toString().constructor(_0x10293e).search("(((.+)+)+)+$")}));_0x10293e();class _0x2d3d95 extends _0x2fee9e{constructor(e){super(e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT)),this._showEffect=WebGLPlot$g.defaultValue(e.showEffect,!1),this._finalDisplay=WebGLPlot$g.defaultValue(e.finalDisplay,!1)}getGOAnimationType(){return _0x3b65eb.ANIMATION_SHOW}execute(){if(!this.canExecute())return!1;var e=this._ratio;return this._showEffect&&this._animationGOFeature.showMode!==_0x3f7d9f.Marker?this.executeHaveEffect(e):this.executeNoEffect(e),!0}executeNoEffect(e){this._animationGOFeature.display=1-e<.01?this._finalDisplay:!this._finalDisplay,(e>=1||e<=0)&&(this._animationGOFeature._initialize=!1)}executeHaveEffect(e){this._finalDisplay||(e=1-e);var t;if(t=e>1?1:e,this._animationGOFeature.display||(this._animationGOFeature.display=!0),this._animationGOFeature.symbolType===_0x585354.SYMBOL_TEXT){if(this._animationGOFeature.__cellLabel){let e=this._animationGOFeature.symbolTextStyle.foreColor.clone(),i=this._animationGOFeature.symbolTextStyle.backColor.clone();e.alpha*=t,i.alpha*=t,this._animationGOFeature.__cellLabel.fillColor=e,this._animationGOFeature.__cellLabel.outlineColor=i}}else this._animationGOFeature.showMode===_0x3f7d9f.Grid||this._animationGOFeature.showMode===_0x3f7d9f.Picture?this._animationGOFeature.billboard.color=new WebGLPlot$g.Color(1,1,1,t):(this._animationGOFeature._symbolStyle._opacity=t,this._goFeature._symbolStyle.fillOpaqueRate<=100*(1-e)&&(this._animationGOFeature._symbolStyle.fillOpaqueRate=100*(1-e)),WebGLPlot$g.defined(this._goFeature._extendWallOpacity)&&this._goFeature._extendWallOpacity>=e&&(this._animationGOFeature._extendWallOpacity=e),this._animationGOFeature._labels&&(this._animationGOFeature._symbolTextStyle._foreColor.alpha=t),this._animationGOFeature._initialize=!1)}resetAnimationFeature(e){!this._needSetShowFlag||(this._animationGOFeature._symbolStyle.fillOpaqueRate=this._goFeature._symbolStyle.fillOpaqueRate,this._animationGOFeature._extendWallOpacity=this._goFeature._extendWallOpacity,_0x2fee9e.prototype.resetAnimationFeature.call(this,e),this._finalDisplay||!e?this._animationGOFeature.display=!1:this._animationGOFeature.display=!0,e&&this.setAnimationShowFlag())}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.showEffect=this.showEffect,e.finalDisplay=this.finalDisplay,e}fromJSONData(e){this.fromBaseJSONData(e),this.showEffect=e.showEffect,this.finalDisplay=e.finalDisplay}}Object.defineProperties(_0x2d3d95.prototype,{showEffect:{get:function(){return this._showEffect},set:function(e){e!=this._showEffect&&(this._showEffect=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},finalDisplay:{get:function(){return this._finalDisplay},set:function(e){e!=this._finalDisplay&&(this._finalDisplay=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x4353e3=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2b8416=_0x4353e3(void 0,(function(){return _0x2b8416.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b8416).search("(((.+)+)+)+$")}));_0x2b8416();var _0x3ec199={POLYLINE:0,CURVE:1},_0x4f5747=Object.freeze(_0x3ec199),_0x3b9dad=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x42c3c0=_0x3b9dad(void 0,(function(){return _0x42c3c0.toString().search("(((.+)+)+)+$").toString().constructor(_0x42c3c0).search("(((.+)+)+)+$")}));_0x42c3c0();var _0x2d3b46={computePositions:function(e,t,i,n,r){var o,a=e,s=n+n,l=new Float64Array(3*(r?2*s:s)),u=0,c=0,h=r?3*s:0,d=r?3*(s+n):3*n;for(o=0;o<n;o++){var f=o/n*WebGLPlot.CesiumMath.TWO_PI,p=Math.cos(f),_=Math.sin(f),m=p*i,$=_*i,g=p*t,y=_*t;l[c+h]=m,l[c+h+1]=0,l[c+h+2]=$,l[c+d]=g,l[c+d+1]=a,l[c+d+2]=y,c+=3,r&&(l[u++]=m,l[u++]=0,l[u++]=$,l[u++]=g,l[u++]=a,l[u++]=y)}return l}},_0x2ad339=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x34cb43=_0x2ad339(void 0,(function(){return _0x34cb43.toString().search("(((.+)+)+)+$").toString().constructor(_0x34cb43).search("(((.+)+)+)+$")}));_0x34cb43();var _0x1fdadd=new WebGLPlot.Cartesian2,_0x1e6ae0=new WebGLPlot.Cartesian3,_0x320f65=new WebGLPlot.Cartesian3,_0x1958f0=new WebGLPlot.Cartesian3,_0x3278be=new WebGLPlot.Cartesian3;function _0x3bc307(e){var t=(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)).length,i=e.topRadius,n=e.bottomRadius,r=WebGLPlot.defaultValue(e.vertexFormat,WebGLPlot.VertexFormat.DEFAULT),o=WebGLPlot.defaultValue(e.slices,128);if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("options.length must be defined.");if(!WebGLPlot.defined(i))throw new WebGLPlot.DeveloperError("options.topRadius must be defined.");if(!WebGLPlot.defined(n))throw new WebGLPlot.DeveloperError("options.bottomRadius must be defined.");if(o<3)throw new WebGLPlot.DeveloperError("options.slices must be greater than or equal to 3.");if(WebGLPlot.defined(e.offsetAttribute)&&e.offsetAttribute===WebGLPlot.GeometryOffsetAttribute.TOP)throw new WebGLPlot.DeveloperError("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");if(!WebGLPlot.defined(e.scene))throw new WebGLPlot.DeveloperError("scene must be defined");if(!WebGLPlot.defined(e.id)||""===e.id)throw new WebGLPlot.DeveloperError("id must be defined");this._length=t,this._topRadius=i,this._bottomRadius=n,this._vertexFormat=WebGLPlot.VertexFormat.clone(r),this._slices=o,this._offsetAttribute=e.offsetAttribute,this._workerName="createPlotCylinderGeometry",this.scene=e.scene,this.rotate=WebGLPlot.defaultValue(e.rotate,new _0x45ea17(0,0,0)),this.offsetRotate=WebGLPlot.defaultValue(e.offsetRotate,new _0x45ea17(0,0,0)),this.point=WebGLPlot.defaultValue(e.point,new _0x45ea17(0,0,0)),this.id=e.id,this.cylinderColor=WebGLPlot.defaultValue(e.color,new WebGLPlot.Color(1,0,0,.4)),this.show=WebGLPlot.defaultValue(e.show,!0),this.add2Scene()}_0x3bc307.prototype.add2Scene=function(){this.ScaneCylinderGeometry=_0x3bc307.createGeometry(this);var e=WebGLPlot.CesiumMath.toRadians(this.rotate.z+this.offsetRotate.z),t=WebGLPlot.CesiumMath.toRadians(this.rotate.y+this.offsetRotate.y),i=WebGLPlot.CesiumMath.toRadians(this.rotate.x+this.offsetRotate.x),n=new WebGLPlot.HeadingPitchRoll(e,t,i);const r=WebGLPlot.Cartesian3.fromDegrees(this.point.x,this.point.y,this.point.z),o=WebGLPlot.Transforms.headingPitchRollToFixedFrame(r,n);var a=new WebGLPlot.GeometryInstance({geometry:this.ScaneCylinderGeometry,modelMatrix:o,id:this.id});let s=new WebGLPlot.Primitive({geometryInstances:a,appearance:new Cesium.EllipsoidSurfaceAppearance({material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:this.cylinderColor})}),asynchronous:!1,show:this.show});this.CylinderPrimitive=this.scene.primitives.add(s)},_0x3bc307.prototype.remove=function(){this.CylinderPrimitive&&(this.scene.primitives.removeAndDestroy(this.CylinderPrimitive),this.CylinderPrimitive=void 0)},_0x3bc307.prototype.update=function(e){var t=WebGLPlot.defaultValue(e.point,new _0x45ea17(0,0,0)),i=WebGLPlot.defaultValue(e.rotate,new _0x45ea17(0,0,0));if(this.CylinderPrimitive){this.remove();var n=WebGLPlot.CesiumMath.toRadians(i.z+this.offsetRotate.z),r=WebGLPlot.CesiumMath.toRadians(i.y+this.offsetRotate.y),o=WebGLPlot.CesiumMath.toRadians(i.x+this.offsetRotate.x),a=new WebGLPlot.HeadingPitchRoll(n,r,o);const e=WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z),l=WebGLPlot.Transforms.headingPitchRollToFixedFrame(e,a);var s=new WebGLPlot.GeometryInstance({geometry:this.ScaneCylinderGeometry,modelMatrix:l,id:this.id});let u=new WebGLPlot.Primitive({geometryInstances:s,appearance:new Cesium.EllipsoidSurfaceAppearance({material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:this.cylinderColor})}),asynchronous:!1,show:this.show});this.CylinderPrimitive=this.scene.primitives.add(u)}},_0x3bc307.prototype.setVisible=function(e){this.CylinderPrimitive&&(this.show=e,this.CylinderPrimitive.show=e)},_0x3bc307.prototype.setColor=function(e){this.CylinderPrimitive&&e instanceof WebGLPlot.Color&&(this.cylinderColor=e,this.CylinderPrimitive.appearance.material=WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:e}))},_0x3bc307.packedLength=WebGLPlot.VertexFormat.packedLength+5,_0x3bc307.pack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("value is required");if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("array is required");return i=WebGLPlot.defaultValue(i,0),WebGLPlot.VertexFormat.pack(e._vertexFormat,t,i),i+=WebGLPlot.VertexFormat.packedLength,t[i++]=e._length,t[i++]=e._topRadius,t[i++]=e._bottomRadius,t[i++]=e._slices,t[i]=WebGLPlot.defaultValue(e._offsetAttribute,-1),t};var _0x248391=new WebGLPlot.VertexFormat,_0x4964c2={vertexFormat:_0x248391,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0},_0x5491e9;_0x3bc307.unpack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("array is required");t=WebGLPlot.defaultValue(t,0);var n=WebGLPlot.VertexFormat.unpack(e,t,_0x248391);t+=WebGLPlot.VertexFormat.packedLength;var r=e[t++],o=e[t++],a=e[t++],s=e[t++],l=e[t];return WebGLPlot.defined(i)?(i._vertexFormat=WebGLPlot.VertexFormat.clone(n,i._vertexFormat),i._length=r,i._topRadius=o,i._bottomRadius=a,i._slices=s,i._offsetAttribute=-1===l?void 0:l,i):(_0x4964c2.length=r,_0x4964c2.topRadius=o,_0x4964c2.bottomRadius=a,_0x4964c2.slices=s,_0x4964c2.offsetAttribute=-1===l?void 0:l,new _0x3bc307(_0x4964c2))},_0x3bc307.createGeometry=function(e){var t=e._length,i=e._topRadius,n=e._bottomRadius,r=e._vertexFormat,o=e._slices;if(!(t<=0||i<0||n<0||0===i&&0===n)){var a,s=o+o,l=o+s,u=s+s,c=_0x2d3b46.computePositions(t,i,n,o,!0),h=r.st?new Float32Array(2*u):void 0,d=r.normal?new Float32Array(3*u):void 0,f=r.tangent?new Float32Array(3*u):void 0,p=r.bitangent?new Float32Array(3*u):void 0,_=r.normal||r.tangent||r.bitangent;if(_){var m=r.tangent||r.bitangent,$=0,g=0,y=0,v=Math.atan2(n-i,t),x=_0x1e6ae0;x.z=Math.sin(v);var b=Math.cos(v),S=_0x1958f0,w=_0x320f65;for(a=0;a<o;a++){var C=a/o*WebGLPlot.CesiumMath.TWO_PI,T=b*Math.cos(C),P=b*Math.sin(C);_&&(x.x=T,x.y=P,m&&(S=WebGLPlot.Cartesian3.normalize(WebGLPlot.Cartesian3.cross(WebGLPlot.Cartesian3.UNIT_Z,x,S),S)),r.normal&&(d[$++]=x.x,d[$++]=x.y,d[$++]=x.z,d[$++]=x.x,d[$++]=x.y,d[$++]=x.z),r.tangent&&(f[g++]=S.x,f[g++]=S.y,f[g++]=S.z,f[g++]=S.x,f[g++]=S.y,f[g++]=S.z),r.bitangent&&(w=WebGLPlot.Cartesian3.normalize(WebGLPlot.Cartesian3.cross(x,S,w),w),p[y++]=w.x,p[y++]=w.y,p[y++]=w.z,p[y++]=w.x,p[y++]=w.y,p[y++]=w.z))}for(a=0;a<o;a++)r.normal&&(d[$++]=0,d[$++]=0,d[$++]=-1),r.tangent&&(f[g++]=1,f[g++]=0,f[g++]=0),r.bitangent&&(p[y++]=0,p[y++]=-1,p[y++]=0);for(a=0;a<o;a++)r.normal&&(d[$++]=0,d[$++]=0,d[$++]=1),r.tangent&&(f[g++]=1,f[g++]=0,f[g++]=0),r.bitangent&&(p[y++]=0,p[y++]=1,p[y++]=0)}var E=12*o-12,A=WebGLPlot.IndexDatatype.createTypedArray(u,E),L=0,M=0;for(a=0;a<o-1;a++)A[L++]=M,A[L++]=M+2,A[L++]=M+3,A[L++]=M,A[L++]=M+3,A[L++]=M+1,M+=2;for(A[L++]=s-2,A[L++]=0,A[L++]=1,A[L++]=s-2,A[L++]=1,A[L++]=s-1,a=1;a<o-1;a++)A[L++]=s+a+1,A[L++]=s+a,A[L++]=s;for(a=1;a<o-1;a++)A[L++]=l,A[L++]=l+a,A[L++]=l+a+1;var I=0;if(r.st){var O=Math.max(i,n);for(a=0;a<u;a++){var D=WebGLPlot.Cartesian3.fromArray(c,3*a,_0x3278be);h[I++]=(D.x+O)/(2*O),h[I++]=(D.y+O)/(2*O)}}var R=new WebGLPlot.GeometryAttributes;r.position&&(R.position=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:c})),r.normal&&(R.normal=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})),r.tangent&&(R.tangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:f})),r.bitangent&&(R.bitangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:p})),r.st&&(R.st=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:h})),_0x1fdadd.x=.5*t,_0x1fdadd.y=Math.max(n,i);var N=new WebGLPlot.BoundingSphere(WebGLPlot.Cartesian3.ZERO,WebGLPlot.Cartesian2.magnitude(_0x1fdadd));if(WebGLPlot.defined(e._offsetAttribute)){t=c.length;var F=new Uint8Array(t/3),B=e._offsetAttribute===WebGLPlot.GeometryOffsetAttribute.NONE?0:1;WebGLPlot.arrayFill(F,B),R.applyOffset=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:F})}return new WebGLPlot.Geometry({attributes:R,indices:A,primitiveType:WebGLPlot.PrimitiveType.TRIANGLES,boundingSphere:N,offsetAttribute:e._offsetAttribute})}},_0x3bc307.getUnitCylinder=function(){return WebGLPlot.defined(_0x5491e9)||(_0x5491e9=_0x3bc307.createGeometry(new _0x3bc307({topRadius:1,bottomRadius:1,length:1,vertexFormat:WebGLPlot.VertexFormat.POSITION_ONLY}))),_0x5491e9};const _0x20b11b=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x4ca35c=_0x20b11b(void 0,(function(){return _0x4ca35c.toString().search("(((.+)+)+)+$").toString().constructor(_0x4ca35c).search("(((.+)+)+)+$")}));function _0x483eea(e){this.lineWidth=1,this.lineColor=new WebGLPlot.Color(1,0,0,1),this._scaneRegion_ShapePts=[],this.id=e.id,this.scene=e.scene}_0x4ca35c(),_0x483eea.prototype.createScaneCylinder=function(e){if(this.ScaneCylinder)return!1;this.point=WebGLPlot.defaultValue(e.point,new _0x45ea17(0,0,0));var t=WebGLPlot.defaultValue(e.length,100),i=WebGLPlot.defaultValue(e.radius,30),n=WebGLPlot.defaultValue(e.rotate,new _0x45ea17(0,0,0)),r=WebGLPlot.defaultValue(e.offsetRotate,new _0x45ea17(0,0,0));let o=WebGLPlot.defaultValue(e.color,new WebGLPlot.Color(1,0,0,.4));var a=WebGLPlot.defaultValue(e.showScane,!1);return this.ScaneCylinder=new _0x3bc307({length:t,topRadius:i,bottomRadius:0,scene:this.scene,point:this.point,rotate:n,offsetRotate:r,id:this.id,show:a,color:o}),!0},_0x483eea.prototype.updateScaneCylinder=function(e){this.ScaneCylinder&&this.ScaneCylinder.update(e)},_0x483eea.prototype.setScaneCylinderColor=function(e){this.ScaneCylinder&&e instanceof WebGLPlot.Color&&this.ScaneCylinder.setColor(e)},_0x483eea.prototype.setScaneCylinderVisible=function(e){this.ScaneCylinder&&this.ScaneCylinder.setVisible(e)},_0x483eea.prototype.removeScaneCylinder=function(){this.ScaneCylinder&&(this.ScaneCylinder.remove(),this.ScaneCylinder=void 0)},_0x483eea.prototype.scaneCylinder2JSONData=function(e){return this.ScaneCylinder&&(e.scaneCylinder_length=this.ScaneCylinder._length,e.scaneCylinder_radius=this.ScaneCylinder._topRadius,e.scaneCylinder_point=this.ScaneCylinder.point,e.scaneCylinder_show=this.ScaneCylinder.show,e.scaneCylinder_cylinderColor=this.ScaneCylinder.cylinderColor,e.scaneCylinder_rotate=this.ScaneCylinder.rotate,e.scaneCylinder_offsetRotate=this.ScaneCylinder.offsetRotate,e.scaneCylinder_id=this.ScaneCylinder.id),e},_0x483eea.prototype.scaneCylinderFromJSONData=function(e){if(this.ScaneCylinder=void 0,e){let t=e.scaneCylinder_length,i=e.scaneCylinder_radius,n=e.scaneCylinder_rotate,r=e.scaneCylinder_offsetRotate;this.point=e.scaneCylinder_point,this.id=e.scaneCylinder_id;let o=e.scaneCylinder_cylinderColor,a=e.scaneCylinder_show;this.ScaneCylinder=new _0x3bc307({length:t,topRadius:i,bottomRadius:0,scene:this.scene,point:this.point,rotate:n,offsetRotate:r,id:this.id,show:a,color:o})}};var _0x3e13f7=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1e3456=_0x3e13f7(void 0,(function(){return _0x1e3456.toString().search("(((.+)+)+)+$").toString().constructor(_0x1e3456).search("(((.+)+)+)+$")}));_0x1e3456();var _0x910fd3={EAST:0,WEST:1,SOUTH:2,NORTH:3,EAST_NORTH:4,WEST_NORTH:5,EAST_SOUTH:6,WEST_SOUTH:7,UP:8},_0x4daeca=Object.freeze(_0x910fd3),_0x284f1f=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2ff0a0=_0x284f1f(void 0,(function(){return _0x2ff0a0.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ff0a0).search("(((.+)+)+)+$")}));_0x2ff0a0();class _0x569ba9 extends _0x2fee9e{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._showPath=WebGLPlot.defaultValue(e.showPath,!1),this._tangentDirection=WebGLPlot.defaultValue(e.tangentDirection,!1),this._pathWidth=WebGLPlot.defaultValue(e.pathWidth,.5),this._pathColor=WebGLPlot.defaultValue(e.pathColor,new WebGLPlot.Color(1,0,0,1)),this._currentPt=WebGLPlot.defaultValue(e.currentPt,null),this._pathType=WebGLPlot.defaultValue(e.pathType,_0x4f5747.POLYLINE),this._wayPoints=WebGLPlot.defaultValue(e.wayPoints,[]),this._shapePoints=WebGLPlot.defaultValue(e.shapePoints,[]),this.__pathFeature=WebGLPlot.defaultValue(e.pathFeature,null),this._pathLength=WebGLPlot.defaultValue(e.pathLength,0),this.dynamicScane=void 0,this._showScane=!0,this._scaneColor=new WebGLPlot.Color(1,0,0,.4),this._rotateOffset=new _0x45ea17(0,0,0)}execute(){if(!_0x51d1e4.isSymbolDot(this._animationGOFeature._symbolType))return null!==this.__pathFeature&&0!==this.__pathFeature._positions.length&&(this.__pathFeature.show=!1),!1;if(!this.canExecute())return!1;this._showPath&&this.__pathFeature&&!this.__pathFeature._show&&(this.__pathFeature.show=!0);var e=this._ratio,t=new Object;t=this._findPos(e,this._shapePoints,t),this._animationGOFeature.localPoints=[this.PtsToSpherical(t.pt)];var i=t.index;if(this._tangentDirection){t.angle;var n=this.modifyAnimationFollowPath(this._shapePoints,i,t.pt),r=57.29577951308232,o=this._animationGOFeature._showMode,a=new _0x45ea17(n.x*r,n.y*r,n.z*r);this._rotateOffset&&(0!==this._rotateOffset.x||0!==this._rotateOffset.y||0!==this._rotateOffset.z)&&(a.x+=this._rotateOffset.x,a.y+=this._rotateOffset.y,a.z+=this._rotateOffset.z),_0x3f7d9f.Marker===o?this._animationGOFeature._modelRotate=a:_0x3f7d9f.Vector===o&&(this._animationGOFeature.vectorRotate=a),this.updateScane(this.PtsToSpherical(t.pt),a)}return this.updateCameraFollow(e),!0}modifyAnimationFollowPath(e,t,i){if(this._tangentDirection){var n=.017453292519943295,r=this.PtsToSpherical(i),o=this.PtsToSpherical(e[t]),a=e[t],s=e[t+1],l=WebGLPlot.Cartesian3.fromDegreesArrayHeights([o.x,o.y,o.z+100]),u=new WebGLPlot.Cartesian3;u=WebGLPlot.Cartesian3.subtract(l[0],a,u),u=WebGLPlot.Cartesian3.normalize(u,u);var c=new WebGLPlot.Cartesian3;c=WebGLPlot.Cartesian3.subtract(s,a,c),c=WebGLPlot.Cartesian3.normalize(c,c);var h=new WebGLPlot.Cartesian3;h=WebGLPlot.Cartesian3.cross(c,u,h),h=WebGLPlot.Cartesian3.normalize(h,h);var d=new WebGLPlot.Cartesian3;d=WebGLPlot.Cartesian3.cross(h,c,d),d=WebGLPlot.Cartesian3.normalize(d,d),c=new WebGLPlot.Cartesian3(c.y,c.z,c.x),h=new WebGLPlot.Cartesian3(h.y,h.z,h.x),d=new WebGLPlot.Cartesian3(d.y,d.z,d.x),h=this.FromAngleAxis(h,-r.x*n,new WebGLPlot.Cartesian3(0,1,0)),h=this.FromAngleAxis(h,r.y*n,new WebGLPlot.Cartesian3(1,0,0)),h=WebGLPlot.Cartesian3.normalize(h,h),c=this.FromAngleAxis(c,-r.x*n,new WebGLPlot.Cartesian3(0,1,0)),c=this.FromAngleAxis(c,r.y*n,new WebGLPlot.Cartesian3(1,0,0)),c=WebGLPlot.Cartesian3.normalize(c,c),d=this.FromAngleAxis(d,-r.x*n,new WebGLPlot.Cartesian3(0,1,0)),d=this.FromAngleAxis(d,r.y*n,new WebGLPlot.Cartesian3(1,0,0)),d=WebGLPlot.Cartesian3.normalize(d,d);var f=this.ToEulerAnglesXYZ(h,c,d),p=-f.x,_=-f.y,m=f.z;return new WebGLPlot.Cartesian3(p,_,m)}}FromAngleAxis(e,t,i){var n=.5*t,r=Math.sin(n),o=Math.cos(n),a=new _0x45ea17(r*i.x,r*i.y,r*i.z),s=new _0x45ea17;s=WebGLPlot.Cartesian3.cross(a,e,s);var l=new _0x45ea17;l=WebGLPlot.Cartesian3.cross(a,s,l);var u=new _0x45ea17(2*s.x*o,2*s.y*o,2*s.z*o),c=new _0x45ea17(2*l.x,2*l.y,2*l.z);return new _0x45ea17(e.x+u.x+c.x,e.y+u.y+c.y,e.z+u.z+c.z)}ToEulerAnglesXYZ(e,t,i){var n=0,r=Math.asin(e.z);return r<Math.PI/2?r>-Math.PI/2?new _0x45ea17(Math.atan2(-t.z,i.z),r,n=Math.atan2(-e.y,e.x)):new _0x45ea17((n=0)-Math.atan2(t.x,t.y),r,n):new _0x45ea17(Math.atan2(t.x,t.y)-(n=0),r,n)}resetAnimationFeature(e){if(_0x2fee9e.prototype.resetAnimationFeature.call(this,e),this._animationGOFeature._rotate=this._goFeature._rotate,this._animationGOFeature._modelRotate=this._goFeature._modelRotate,this._animationGOFeature.vectorRotate=this._goFeature.vectorRotate,this.wayPoints.length>=2){var t=[this.wayPoints[0].clone()];this._animationGOFeature.localPoints=t}else{t=[this._goFeature.localPoints[0].clone()];this._animationGOFeature.localPoints=t}e&&(null===this.__pathFeature||0===this.__pathFeature._positions.length||null===this._shapePoints)&&(this._makePath(),this._pathColor,this._pathWidth),null!==this.__pathFeature&&(this.__pathFeature.show=!1),void 0===this.dynamicScane?this.dynamicScane=new _0x483eea({id:this._animationGOFeature.id,scene:this._animationManager._scene}):(this.showScane=e,this.updateScane(this._animationGOFeature._localPoints[0],this._animationGOFeature._rotate)),this._needSetShowFlag&&e&&this.setAnimationShowFlag()}_makePath(){if(null===this._wayPoints||2>this._wayPoints.length)return!1;this.compuetWayPos(),null===this.__pathFeature?this.__pathFeature=_0x24dc2a.addAlgoPloyline(null,this.createPathLine(this._shapePoints),this._animationManager._scene):this.__pathFeature.positions=this._shapePoints,this._pathLength=0;for(var e=1;e<this._shapePoints.length;e++)this._pathLength+=_0x51d1e4.distance(this._shapePoints[e-1],this._shapePoints[e]);return this.__pathFeature}_findPos(e,t,i){if(!(i=this.getPtsIndexByDistance(t,e*this._pathLength)).result)return!1;var n=i.pt;return this._tangentDirection&&(i.angle=_0x51d1e4.radian(n,t[i.index])/Math.PI*180),i}PtsToSpherical(e){var t=this._animationManager._scene.globe.ellipsoid,i=new WebGLPlot.Cartesian3(e.x,e.y,e.z),n=t.cartesianToCartographic(i),r=WebGLPlot.CesiumMath.toDegrees(n.latitude);return new _0x45ea17(WebGLPlot.CesiumMath.toDegrees(n.longitude),r,n.height)}getGOAnimationType(){return _0x3b65eb.ANIMATION_WAY}setShowPath(e){this._showPath=e}setWayPoints(e){if(!e||!Array.isArray(e)||2>e.length)return!1;this._wayPoints=[],this._wayPoints=e,null!==this.__pathFeature&&(this.compuetWayPos(),this.__pathFeature.positions=this._shapePoints)}getWayPoints(){return this._wayPoints}getCurrentPt(){return this._currentPt}setPathColor(e){!e||(this._pathColor=e,this.__pathFeature&&null!==this.__pathFeature&&(this.__pathFeature.material=new WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:this.pathColor})))}getPathColor(){return this._pathColor}setPathWidth(e){!e||(this.pathWidth=e,this.__pathFeature&&null!==this.pathWidth&&(this.__pathFeature.width=this.pathWidth))}getPathWidth(){return this._pathWidth}setPathType(e){null!=e&&this.pathType!==e&&(this._pathType=e,null!==this.__pathFeature&&(_0x24dc2a.removeAlgoPloyline(this.__pathFeature,this._goFeature._layer._scene),this.__pathFeature=null),this._makePath())}getPathType(){return this._pathType}generateBeizerPointsNoCtrlPt(e){return _0x51d1e4.generateBeizerPointsNoCtrlPt(e)}createPathLine(e){return this._pathWidth<=0&&(this._pathWidth=.5),{width:this._pathWidth,positions:e,material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:this._pathColor}),id:this._animationGOFeature._id+"_Path",show:!1}}getPtsIndexByDistance(e,t){var i=e.length,n=new Object;if(t<0||i<2)return n.result=!1,n;for(var r=0,o=0;o!=i-1;++o)if((r+=_0x51d1e4.distance(e[o],e[o+1]))>=t){var a=_0x51d1e4.distance(e[o+1],e[o]);if(0==a)return e[o+1];var s=(r-t)/a,l=new _0x45ea17(0,0,0);return l.x=e[o+1].x+(e[o].x-e[o+1].x)*s,l.y=e[o+1].y+(e[o].y-e[o+1].y)*s,l.z=e[o+1].z+(e[o].z-e[o+1].z)*s,n.pt=l,n.result=!0,n.index=o,n}return n.result=!1,n}compuetWayPos(){this._pathType===_0x4f5747.POLYLINE?this._shapePoints=this._wayPoints:this._shapePoints=this.generateBeizerPointsNoCtrlPt(this._wayPoints);for(var e=[],t=0;t<this._shapePoints.length;t++){var i=this._shapePoints[t];e.push(i.x),e.push(i.y),e.push(i.z)}this._shapePoints=WebGLPlot.Cartesian3.fromDegreesArrayHeights(e)}getJSONData(){var e=this.getBaseJSONData();e.type=this.getGOAnimationType(),e.showPath=this.showPath,e.tangentDirection=this.tangentDirection,e.pathType=this.pathType,e.pathWidth=this.pathWidth,e.pathColor=this._colorFormat(this.pathColor),e.wayPoints=[];for(var t=0;t<this.wayPoints.length;t++)e.wayPoints.push({x:this.wayPoints[t].x,y:this.wayPoints[t].y,z:this.wayPoints[t].z});return e.rotateOffset=this.rotateOffset,this.dynamicScane&&(e=this.dynamicScane.scaneCylinder2JSONData(e)),e}fromJSONData(e){this.fromBaseJSONData(e),this.showPath=e.showPath,this.tangentDirection=e.tangentDirection,this.pathType=e.pathType,this.pathWidth=e.pathWidth,this.pathColor=this._serverColorToColor(e.pathColor);for(var t=[],i=0;i<e.wayPoints.length;i++)t.push(new _0x45ea17(e.wayPoints[i].x,e.wayPoints[i].y,e.wayPoints[i].z));this.rotateOffset=e.rotateOffset,this.dynamicScane&&e.scaneCylinder_id&&this.dynamicScane.scaneCylinderFromJSONData(e),this.setWayPoints(t)}createScane(e){e.showScane=this.showScane,e.point=this._animationGOFeature._localPoints[0].clone(),e.color?this.scaneColor=e.color:e.color=this.scaneColor,e.id=this._animationGOFeature.id,this.dynamicScane.createScaneCylinder(e)}updateScane(e,t){if(this.dynamicScane){var i={point:e,rotate:t};this.dynamicScane.updateScaneCylinder(i)}}setScaneVisible(e){this.dynamicScane&&this.dynamicScane.setScaneCylinderVisible(e)}setScaneColor(e){this.dynamicScane&&this.dynamicScane.setScaneCylinderColor(e)}removeScane(){this.dynamicScane&&this.dynamicScane.removeScaneCylinder()}setCameraFollow(e,t,i,n){if(this.isFollow=e,this._wayPoints.length<=0||!this.isFollow)return!1;null===this.__pathFeature&&this._shapePoints.length<=0&&(this._makePath(),this.__pathFeature.show=!1);const r=Math.PI/180,o=n/i,a=-Math.asin(o);let s=null;switch(this.CameraOrientation=null,t){case _0x4daeca.EAST:s=new Cesium.Cartesian3(0,-1,o),this.CameraOrientation={heading:-90*r,pitch:a,roll:0};break;case _0x4daeca.WEST:s=new Cesium.Cartesian3(0,1,o),this.CameraOrientation={heading:90*r,pitch:a,roll:0};break;case _0x4daeca.SOUTH:s=new Cesium.Cartesian3(-1,0,o),this.CameraOrientation={heading:0,pitch:a,roll:0};break;case _0x4daeca.NORTH:s=new Cesium.Cartesian3(1,0,o),this.CameraOrientation={heading:180*r,pitch:a,roll:0};break;case _0x4daeca.EAST_NORTH:s=new Cesium.Cartesian3(1,-1,o),this.CameraOrientation={heading:225*r,pitch:a,roll:0};break;case _0x4daeca.WEST_NORTH:s=new Cesium.Cartesian3(1,1,o),this.CameraOrientation={heading:135*r,pitch:a,roll:0};break;case _0x4daeca.EAST_SOUTH:s=new Cesium.Cartesian3(-1,-1,o),this.CameraOrientation={heading:-45*r,pitch:a,roll:0};break;case _0x4daeca.WEST_SOUTH:s=new Cesium.Cartesian3(-1,1,o),this.CameraOrientation={heading:45*r,pitch:a,roll:0};break;case _0x4daeca.UP:s=new Cesium.Cartesian3(0,0,1),this.CameraOrientation={heading:0*r,pitch:-Math.PI/2,roll:0}}const l=this._shapePoints[0],u=_0x51d1e4.computeMatrix2(l,new Cesium.Cartesian3(0,0,0));let c=_0x51d1e4.localPtsToCartesian(s,u,i).position,h=new _0x45ea17(c.x-l.x,c.y-l.y,c.z-l.z);this.followShapePoints=[];for(let e=0;e<this._shapePoints.length;e++){const t=this._shapePoints[e];this.followShapePoints.push(new _0x45ea17(t.x+h.x,t.y+h.y,t.z+h.z))}}updateCameraFollow(e){if(!this.isFollow)return;let t=new Object,i=this._findPos(e,this.followShapePoints,t).pt;this._animationManager._scene.camera.setView({destination:i,orientation:this.CameraOrientation})}}Object.defineProperties(_0x569ba9.prototype,{showPath:{get:function(){return this._showPath},set:function(e){e!=this._showPath&&(this._showPath=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},tangentDirection:{get:function(){return this._tangentDirection},set:function(e){e!=this._tangentDirection&&(this._tangentDirection=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathType:{get:function(){return this._pathType},set:function(e){e==this._pathType&&"number"==typeof e||(this.setPathType(e),this._pathType=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathWidth:{get:function(){return this._pathWidth},set:function(e){e==this._pathWidth||e<=0||(this._pathWidth=e,this.__pathFeature&&(this.__pathFeature.width=e),_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathColor:{get:function(){return this._pathColor},set:function(e){e==this._pathColor||!(e instanceof WebGLPlot.Color)||(this._pathColor=e,this.__pathFeature&&(this.__pathFeature.material=new WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:this.pathColor})),_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},wayPoints:{get:function(){return this._wayPoints},set:function(e){e!==this._wayPoints&&(this._wayPoints=e,this._makePath(),_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},showScane:{get:function(){return this._showScane},set:function(e){e!=this._showScane&&(this._showScane=e,this.dynamicScane&&this.dynamicScane.setScaneCylinderVisible(e),_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},scaneColor:{get:function(){return this._scaneColor},set:function(e){e!=this._scaneColor&&(this._scaneColor=e,this.dynamicScane&&this.dynamicScane.setScaneCylinderColor(e),_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},rotateOffset:{get:function(){return this._rotateOffset},set:function(e){e!=this._rotateOffset&&(this._rotateOffset=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0xd4d498=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x8fb0c9=_0xd4d498(void 0,(function(){return _0x8fb0c9.toString().search("(((.+)+)+)+$").toString().constructor(_0x8fb0c9).search("(((.+)+)+)+$")}));_0x8fb0c9();class _0x2a8935 extends _0x2fee9e{constructor(e){super(e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT)),this._showPath=WebGLPlot$g.defaultValue(e.showPath,!1),this._tangentDirection=WebGLPlot$g.defaultValue(e.tangentDirection,!1),this._pathWidth=WebGLPlot$g.defaultValue(e.pathWidth,.5),this._pathColor=WebGLPlot$g.defaultValue(e.pathColor,new WebGLPlot$g.Color(1,0,0,1)),this._currentPt=WebGLPlot$g.defaultValue(e.currentPt,null),this._pathType=WebGLPlot$g.defaultValue(e.pathType,_0x4f5747.POLYLINE),this._wayPoints=WebGLPlot$g.defaultValue(e.wayPoints,[]),this.shapePointsArray=WebGLPlot$g.defaultValue(e.shapePoints,[]),this._pathFeature=WebGLPlot$g.defaultValue(e.pathFeature,null),this._pathLength=WebGLPlot$g.defaultValue(e.pathLength,0),this._scane_ShapePts=[],this.showScane=!0,this._rotateOffset=new _0x45ea17(0,0,0)}execute(){if(!this.canExecute())return!1;if(this._showPath&&this._pathFeature&&!this._pathFeature._show&&(this._pathFeature.show=!0),this.animationGOFeatures.length>0)for(let e=0;e<this.animationGOFeatures.length;e++){const t=this.shapePointsArray[e];this.execute2(this.animationGOFeatures[e],t)}}execute2(e,t){if(!_0x51d1e4.isSymbolDot(e._symbolType))return!1;var i=this._ratio,n=new Object;n=this._findPos(i,t,n),e.localPoints=[this.PtsToSpherical(n.pt)];var r=n.index;if(this._tangentDirection){n.angle;var o=this.modifyAnimationFollowPath(t,r,n.pt),a=57.29577951308232,s=e._showMode,l=new _0x45ea17(o.x*a,o.y*a,o.z*a);_0x3f7d9f.Marker===s?e._modelRotate=l:_0x3f7d9f.Vector===s&&(e.vectorRotate=o)}return this.updateCameraFollow(i),!0}modifyAnimationFollowPath(e,t,i){if(this._tangentDirection){var n=.017453292519943295,r=this.PtsToSpherical(i),o=this.PtsToSpherical(e[t]),a=e[t],s=e[t+1],l=WebGLPlot$g.Cartesian3.fromDegreesArrayHeights([o.x,o.y,o.z+100]),u=new WebGLPlot$g.Cartesian3;u=WebGLPlot$g.Cartesian3.subtract(l[0],a,u),u=WebGLPlot$g.Cartesian3.normalize(u,u);var c=new WebGLPlot$g.Cartesian3;c=WebGLPlot$g.Cartesian3.subtract(s,a,c),c=WebGLPlot$g.Cartesian3.normalize(c,c);var h=new WebGLPlot$g.Cartesian3;h=WebGLPlot$g.Cartesian3.cross(c,u,h),h=WebGLPlot$g.Cartesian3.normalize(h,h);var d=new WebGLPlot$g.Cartesian3;d=WebGLPlot$g.Cartesian3.cross(h,c,d),d=WebGLPlot$g.Cartesian3.normalize(d,d),c=new WebGLPlot$g.Cartesian3(c.y,c.z,c.x),h=new WebGLPlot$g.Cartesian3(h.y,h.z,h.x),d=new WebGLPlot$g.Cartesian3(d.y,d.z,d.x),h=this.FromAngleAxis(h,-r.x*n,new WebGLPlot$g.Cartesian3(0,1,0)),h=this.FromAngleAxis(h,r.y*n,new WebGLPlot$g.Cartesian3(1,0,0)),h=WebGLPlot$g.Cartesian3.normalize(h,h),c=this.FromAngleAxis(c,-r.x*n,new WebGLPlot$g.Cartesian3(0,1,0)),c=this.FromAngleAxis(c,r.y*n,new WebGLPlot$g.Cartesian3(1,0,0)),c=WebGLPlot$g.Cartesian3.normalize(c,c),d=this.FromAngleAxis(d,-r.x*n,new WebGLPlot$g.Cartesian3(0,1,0)),d=this.FromAngleAxis(d,r.y*n,new WebGLPlot$g.Cartesian3(1,0,0)),d=WebGLPlot$g.Cartesian3.normalize(d,d);var f=this.ToEulerAnglesXYZ(h,c,d),p=-f.x,_=-f.y,m=f.z;return new WebGLPlot$g.Cartesian3(p,_,m)}}FromAngleAxis(e,t,i){var n=.5*t,r=Math.sin(n),o=Math.cos(n),a=new _0x45ea17(r*i.x,r*i.y,r*i.z),s=new _0x45ea17;s=WebGLPlot$g.Cartesian3.cross(a,e,s);var l=new _0x45ea17;l=WebGLPlot$g.Cartesian3.cross(a,s,l);var u=new _0x45ea17(2*s.x*o,2*s.y*o,2*s.z*o),c=new _0x45ea17(2*l.x,2*l.y,2*l.z);return new _0x45ea17(e.x+u.x+c.x,e.y+u.y+c.y,e.z+u.z+c.z)}ToEulerAnglesXYZ(e,t,i){var n=0,r=Math.asin(e.z);return r<Math.PI/2?r>-Math.PI/2?new _0x45ea17(Math.atan2(-t.z,i.z),r,n=Math.atan2(-e.y,e.x)):new _0x45ea17((n=0)-Math.atan2(t.x,t.y),r,n):new _0x45ea17(Math.atan2(t.x,t.y)-(n=0),r,n)}_makePath(){if(null===this._wayPoints||2>this._wayPoints.length)return!1;null===this._pathFeature&&(this.compuetWayPos(),this._pathFeature=_0x24dc2a.addAlgoPloyline(null,this.createPathLine(this.shapePointsArray[0]))),this._pathLength=0;for(var e=1;e<this.shapePointsArray[0].length;e++)this._pathLength+=_0x51d1e4.distance(this.shapePointsArray[0][e-1],this.shapePointsArray[0][e]);return this._pathFeature}_findPos(e,t,i){if(!(i=this.getPtsIndexByDistance(t,e*this._pathLength)).result)return!1;var n=i.pt;return this._tangentDirection&&(i.angle=_0x51d1e4.radian(n,t[i.index])/Math.PI*180),i}PtsToSpherical(e){var t=_0x9f2efc.getInstance({scene:this._scene})._scene.globe.ellipsoid,i=new WebGLPlot$g.Cartesian3(e.x,e.y,e.z),n=t.cartesianToCartographic(i),r=WebGLPlot$g.CesiumMath.toDegrees(n.latitude);return new _0x45ea17(WebGLPlot$g.CesiumMath.toDegrees(n.longitude),r,n.height)}getGOAnimationType(){return _0x3b65eb.ANIMATION_WAY}setShowPath(e){this._showPath=e}setWayPoints(e){if(!e||!Array.isArray(e)||2>e.length)return!1;this._wayPoints=[],this._wayPoints=e,null!==this._pathFeature&&(this.compuetWayPos(),this._pathFeature._positions=this.shapePointsArray[0])}getWayPoints(){return this._wayPoints}getCurrentPt(){return this._currentPt}setPathColor(e){!e||(this._pathColor=e,this.pathFeature&&null!==this.pathFeature&&(this.pathFeature.options.color=this.pathColor,this.pathFeature.setStyle(this.pathFeature.options)))}getPathColor(){return this._pathColor}setPathWidth(e){!e||(this.pathWidth=e,this.pathFeature&&null!==this.pathWidth&&(this.pathFeature.options.weight=this.pathWidth,this.pathFeature.setStyle(this.pathFeature.options)))}getPathWidth(){return this._pathWidth}setPathType(e){null!=e&&this.pathType!==e&&(this.pathType=e,null!==this.pathFeature&&(this.pathFeature.destroy(),this.pathFeature=null))}getPathType(){return this._pathType}generateBeizerPointsNoCtrlPt(e){return _0x51d1e4.generateBeizerPointsNoCtrlPt(e)}createPathLine(e){return this._pathWidth<=0&&(this._pathWidth=.5),{width:this._pathWidth,positions:e,material:WebGLPlot$g.Material.fromType(WebGLPlot$g.Material.ColorType,{color:this._pathColor}),id:this.animationGOFeatures[0]._id+"_Path",show:!1}}getPtsIndexByDistance(e,t){var i=e.length,n=new Object;if(t<0||i<2)return n.result=!1,n;for(var r=0,o=0;o!=i-1;++o)if((r+=_0x51d1e4.distance(e[o],e[o+1]))>=t){var a=_0x51d1e4.distance(e[o+1],e[o]);if(0==a)return e[o+1];var s=(r-t)/a,l=new _0x45ea17(0,0,0);return l.x=e[o+1].x+(e[o].x-e[o+1].x)*s,l.y=e[o+1].y+(e[o].y-e[o+1].y)*s,l.z=e[o+1].z+(e[o].z-e[o+1].z)*s,n.pt=l,n.result=!0,n.index=o,n}return n.result=!1,n}compuetWayPos(){let e=[];e=this._pathType===_0x4f5747.POLYLINE?this._wayPoints:this.generateBeizerPointsNoCtrlPt(this._wayPoints),this.shapePointsArray=[];for(let r=0;r<this.offsetPt.length;r++){const o=this.offsetPt[r];for(var t=[],i=0;i<e.length;i++){var n=e[i];t.push(n.x+o.x),t.push(n.y+o.y),t.push(n.z+o.z)}this.shapePointsArray.push(WebGLPlot$g.Cartesian3.fromDegreesArrayHeights(t))}}getJSONData(){var e=this.getBaseJSONData();e.type=this.getGOAnimationType(),e.showPath=this.showPath,e.tangentDirection=this.tangentDirection,e.pathType=this.pathType,e.pathWidth=this.pathWidth,e.pathColor=this._colorFormat(this.pathColor),e.wayPoints=[];for(var t=0;t<this.wayPoints.length;t++)e.wayPoints.push({x:this.wayPoints[t].x,y:this.wayPoints[t].y,z:this.wayPoints[t].z});return e}fromJSONData(e){this.fromBaseJSONData(e),this.showPath=e.showPath,this.tangentDirection=e.tangentDirection,this.pathType=e.pathType,this.pathWidth=e.pathWidth,this.pathColor=this._serverColorToColor(e.pathColor);for(var t=[],i=0;i<e.wayPoints.length;i++)t.push(new _0x45ea17(e.wayPoints[i].x,e.wayPoints[i].y,e.wayPoints[i].z));this.setWayPoints(t)}createScane(e){e.showScane=this.showScane,this.dynamicScane.createScaneCone(e)}updateScane(e,t){var i={point:e,rotate:t,showScane:this.showScane};this.dynamicScane.updateScaneCone(i)}setGOFeatures(e,t){if(void 0===t||t.length<=0||null===e._goAnimationLayer)return!1;this._animationManager=e,this._goFeatures=t;const i=t[0].localPoints[0].clone();return this.offsetPt=[],this.animationGOFeatures=[],t.map((t=>{const n=t.localPoints[0].clone(),r=new _0x45ea17(n.x-i.x,n.y-i.y,n.z-i.z);this.offsetPt.push(r);let o=this.createAnimationGOFeature(t);o._layer=e._goAnimationLayer,this.animationGOFeatures.push(o)})),!(this.animationGOFeatures.length<=0)&&(e._goAnimationLayer.addFeatures(this.animationGOFeatures),this.showAnimationFeature(!1),!0)}createAnimationGOFeature(e){for(var t=0;t<this._animationManager._goAnimations.length;t++){var i=this._animationManager._goAnimations[t];if(i._goFeature.id===e.id)return i._animationGOFeature}let n=e.clone();return n._id+=this._name,n._isEdit=!0,n._valid=!1,n._isAnimationFeature=!0,n}showAnimationFeature(e){this.resetAnimationFeature(e)}resetAnimationFeature(e){if(this.animationGOFeatures.length>0&&this._goFeatures.length>0)for(let i=0;i<this._goFeatures.length;i++){let n=this._goFeatures[i];n.display=!e,n._initialize=!1;let r=this.animationGOFeatures[i];r.display=e,r._initialize=!1,r._rotate=n._rotate,r._modelRotate=n._modelRotate,r.vectorRotate=n.vectorRotate;var t=n._localPoints[0].clone();r._localPoints=[t]}e&&(null===this._pathFeature||0===this._pathFeature._positions.length||0===this.shapePointsArray.length)&&(this._makePath(),this._pathColor,this._pathWidth),null!==this._pathFeature&&(this._pathFeature.show=!1)}setCameraFollow(e,t,i,n){if(this.isFollow=e,this._wayPoints.length<=0||!this.isFollow)return!1;null===this._pathFeature&&this.shapePointsArray[0].length<=0&&(this._makePath(),this._pathFeature.show=!1);const r=Math.PI/180,o=n/i,a=-Math.asin(o);let s=null;switch(this.CameraOrientation=null,t){case _0x4daeca.EAST:s=new Cesium.Cartesian3(0,-1,o),this.CameraOrientation={heading:-90*r,pitch:a,roll:0};break;case _0x4daeca.WEST:s=new Cesium.Cartesian3(0,1,o),this.CameraOrientation={heading:90*r,pitch:a,roll:0};break;case _0x4daeca.SOUTH:s=new Cesium.Cartesian3(-1,0,o),this.CameraOrientation={heading:0,pitch:a,roll:0};break;case _0x4daeca.NORTH:s=new Cesium.Cartesian3(1,0,o),this.CameraOrientation={heading:180*r,pitch:a,roll:0};break;case _0x4daeca.EAST_NORTH:s=new Cesium.Cartesian3(1,-1,o),this.CameraOrientation={heading:225*r,pitch:a,roll:0};break;case _0x4daeca.WEST_NORTH:s=new Cesium.Cartesian3(1,1,o),this.CameraOrientation={heading:135*r,pitch:a,roll:0};break;case _0x4daeca.EAST_SOUTH:s=new Cesium.Cartesian3(-1,-1,o),this.CameraOrientation={heading:-45*r,pitch:a,roll:0};break;case _0x4daeca.WEST_SOUTH:s=new Cesium.Cartesian3(-1,1,o),this.CameraOrientation={heading:45*r,pitch:a,roll:0};break;case _0x4daeca.UP:s=new Cesium.Cartesian3(0,0,1),this.CameraOrientation={heading:0*r,pitch:-Math.PI/2,roll:0}}const l=this.shapePointsArray[0][0],u=_0x51d1e4.computeMatrix2(l,new Cesium.Cartesian3(0,0,0));let c=_0x51d1e4.localPtsToCartesian(s,u,i).position,h=new _0x45ea17(c.x-l.x,c.y-l.y,c.z-l.z);this.followShapePoints=[];for(let e=0;e<this.shapePointsArray[0].length;e++){const t=this.shapePointsArray[0][e];this.followShapePoints.push(new _0x45ea17(t.x+h.x,t.y+h.y,t.z+h.z))}}updateCameraFollow(e){if(!this.isFollow)return;let t=new Object,i=this._findPos(e,this.followShapePoints,t).pt;this._animationManager._scene.camera.setView({destination:i,orientation:this.CameraOrientation})}}Object.defineProperties(_0x2a8935.prototype,{showPath:{get:function(){return this._showPath},set:function(e){e!=this._showPath&&(this._showPath=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},tangentDirection:{get:function(){return this._tangentDirection},set:function(e){e!=this._tangentDirection&&(this._tangentDirection=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathType:{get:function(){return this._pathType},set:function(e){e!=this._pathType&&(this._pathType=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathWidth:{get:function(){return this._pathWidth},set:function(e){e==this._pathWidth||e<=0||(this._pathWidth=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathColor:{get:function(){return this._pathColor},set:function(e){e!=this._pathColor&&(this._pathColor=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},wayPoints:{get:function(){return this._wayPoints},set:function(e){e!==this._wayPoints&&(this._wayPoints=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},showScane:{get:function(){return this._showScane},set:function(e){e!=this._showScane&&(this._showScane=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},rotateOffset:{get:function(){return this._rotateOffset},set:function(e){e!=this._rotateOffset&&(this._rotateOffset=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x8f4769=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3a7a20=_0x8f4769(void 0,(function(){return _0x3a7a20.toString().search("(((.+)+)+)+$").toString().constructor(_0x3a7a20).search("(((.+)+)+)+$")}));_0x3a7a20();class _0x22e2f7 extends _0x2fee9e{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._lineColorAnimation=WebGLPlot.defaultValue(e.lineColorAnimation,!1),this._startLineColor=WebGLPlot.defaultValue(e.startLineColor,new WebGLPlot.Color(1,0,0,1)),this._endLineColor=WebGLPlot.defaultValue(e.endLineColor,new WebGLPlot.Color(0,0,1,1)),this._lineWidthAnimation=WebGLPlot.defaultValue(e.lineWidthAnimation,!1),this._startLineWidth=WebGLPlot.defaultValue(e.startLineWidth,0),this._endLineWidth=WebGLPlot.defaultValue(e.endLineWidth,5),this._surroundLineColorAnimation=WebGLPlot.defaultValue(e.surroundLineColorAnimation,!1),this._startSurroundLineColor=WebGLPlot.defaultValue(e.startSurroundLineColor,new WebGLPlot.Color(1,1,0,1)),this._endSurroundLineColor=WebGLPlot.defaultValue(e.endSurroundLineColor,new WebGLPlot.Color(0,1,1,1)),this._surroundLineWidthAnimation=WebGLPlot.defaultValue(e.surroundLineWidthAnimation,!1),this._startSurroundLineWidth=WebGLPlot.defaultValue(e.startSurroundLineWidth,0),this._endSurroundLineWidth=WebGLPlot.defaultValue(e.endtSurroundLineWidth,1)}getGOAnimationType(){return _0x3b65eb.ANIMATION_ATTRIBUTE}execute(){if(!this.canExecute())return!1;var e=this.ratio,t=this.executeLineColorAnimation(e),i=this.executeLineWidthAnimation(e),n=this.executeSurroundLineColorAnimation(e),r=this.executeSurroundLineWidthAnimation(e);return!!(t||i||n||r)&&(this._animationGOFeature._initialize=!1,!0)}executeLineColorAnimation(e){if(!this._lineColorAnimation)return!1;var t=this.startLineColor,i=this.endLineColor,n=t.red+(i.red-t.red)*e,r=t.green+(i.green-t.green)*e,o=t.blue+(i.blue-t.blue)*e,a=t.alpha+(i.alpha-t.alpha)*e;return this._animationGOFeature._symbolStyle._lineColor=new WebGLPlot.Color(n,r,o,a),!0}executeLineWidthAnimation(e){return!!this.lineWidthAnimation&&(_0x585354.SYMBOL_DOT===this._animationGOFeature.symbolType?(this._animationGOFeature.gridLineWidth=this.startLineWidth+(this.endLineWidth-this.startLineWidth)*e,!0):_0x585354.SYMBOL_ALGO===this._animationGOFeature.symbolType?(this._animationGOFeature._symbolStyle._lineWidth=this.startLineWidth+(this.endLineWidth-this.startLineWidth)*e,!0):void 0)}executeSurroundLineColorAnimation(e){if(!this.surroundLineColorAnimation)return!1;var t=this.startSurroundLineColor,i=this.endSurroundLineColor,n=t.red+(i.red-t.red)*e,r=t.green+(i.green-t.green)*e,o=t.blue+(i.blue-t.blue)*e,a=t.alpha+(i.alpha-t.alpha)*e;return this._animationGOFeature._symbolStyle._surroundLineColor=new WebGLPlot.Color(n,r,o,a),!0}executeSurroundLineWidthAnimation(e){return!!this.surroundLineWidthAnimation&&(_0x585354.SYMBOL_DOT===this._animationGOFeature.symbolType?(this._animationGOFeature._gridSurroundLineWidth=this.startSurroundLineWidth+(this.endSurroundLineWidth-this.startSurroundLineWidth)*e,!0):_0x585354.SYMBOL_ALGO===this._animationGOFeature.symbolType?(this._animationGOFeature._symbolStyle._surroundLineWidth=this.startSurroundLineWidth+(this.endSurroundLineWidth-this.startSurroundLineWidth)*e,!0):void 0)}resetAnimationFeature(e){e&&(this.lineWidthAnimation&&(this._animationGOFeature.gridLineWidth=this._goFeature.gridLineWidth),this.lineColorAnimation&&(this._animationGOFeature._symbolStyle._lineColor=this._goFeature._symbolStyle._lineColor),this.surroundLineWidthAnimation&&(this._animationGOFeature._gridSurroundLineWidth=this._goFeature._gridSurroundLineWidth),this.surroundLineColorAnimation&&(this._animationGOFeature._symbolStyle._surroundLineColor=this._goFeature._symbolStyle._surroundLineColor))}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.lineColorAnimation=this.lineColorAnimation,e.startLineColor=this._colorFormat(this.startLineColor),e.endLineColor=this._colorFormat(this.endLineColor),e.lineWidthAnimation=this.lineWidthAnimation,e.startLineWidth=this.startLineWidth,e.endLineWidth=this.endLineWidth,e.surroundLineColorAnimation=this.surroundLineColorAnimation,e.startSurroundLineColor=this._colorFormat(this.startSurroundLineColor),e.endSurroundLineColor=this._colorFormat(this.endSurroundLineColor),e.surroundLineWidthAnimation=this.surroundLineWidthAnimation,e.startSurroundLineWidth=this.startSurroundLineWidth,e.endSurroundLineWidth=this.endSurroundLineWidth,e}fromJSONData(e){this.fromBaseJSONData(e),this.lineColorAnimation=e.lineColorAnimation,this.startLineColor=this._serverColorToColor(e.startLineColor),this.endLineColor=this._serverColorToColor(e.endLineColor),this.lineWidthAnimation=e.lineWidthAnimation,this.startLineWidth=e.startLineWidth,this.endLineWidth=e.endLineWidth,this.surroundLineColorAnimation=e.surroundLineColorAnimation,this.startSurroundLineColor=this._serverColorToColor(e.startSurroundLineColor),this.endSurroundLineColor=this._serverColorToColor(e.endSurroundLineColor),this.surroundLineWidthAnimation=e.surroundLineWidthAnimation,this.startSurroundLineWidth=e.startSurroundLineWidth,this.endSurroundLineWidth=e.endSurroundLineWidth}}Object.defineProperties(_0x22e2f7.prototype,{lineColorAnimation:{get:function(){return this._lineColorAnimation},set:function(e){e!==this._lineColorAnimation&&(this._lineColorAnimation=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startLineColor:{get:function(){return this._startLineColor},set:function(e){e!==this._startLineColor&&(this._startLineColor=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endLineColor:{get:function(){return this._endLineColor},set:function(e){e!==this._endLineColor&&(this._endLineColor=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},lineWidthAnimation:{get:function(){return this._lineWidthAnimation},set:function(e){e!==this._lineWidthAnimation&&(this._lineWidthAnimation=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startLineWidth:{get:function(){return this._startLineWidth},set:function(e){e!==this._startLineWidth&&(this._startLineWidth=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endLineWidth:{get:function(){return this._endLineWidth},set:function(e){e!=this._endLineWidth&&(this._endLineWidth=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},surroundLineColorAnimation:{get:function(){return this._surroundLineColorAnimation},set:function(e){e!=this._surroundLineColorAnimation&&(this._surroundLineColorAnimation=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startSurroundLineColor:{get:function(){return this._startSurroundLineColor},set:function(e){e!=this._startSurroundLineColor&&(this._startSurroundLineColor=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endSurroundLineColor:{get:function(){return this._endSurroundLineColor},set:function(e){e!=this._endSurroundLineColor&&(this._endSurroundLineColor=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},surroundLineWidthAnimation:{get:function(){return this._surroundLineWidthAnimation},set:function(e){e!=this._surroundLineWidthAnimation&&(this._surroundLineWidthAnimation=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startSurroundLineWidth:{get:function(){return this._startSurroundLineWidth},set:function(e){e!=this._startSurroundLineWidth&&(this._startSurroundLineWidth=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endSurroundLineWidth:{get:function(){return this._endSurroundLineWidth},set:function(e){e!=this._endSurroundLineWidth&&(this._endSurroundLineWidth=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x56095a=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xabb4ac=_0x56095a(void 0,(function(){return _0xabb4ac.toString().search("(((.+)+)+)+$").toString().constructor(_0xabb4ac).search("(((.+)+)+)+$")}));_0xabb4ac();var _0x53df95={ClockWise:0,AntiClockWise:1},_0x499c3d=Object.freeze(_0x53df95),_0x1ccb72=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xdd7e6=_0x1ccb72(void 0,(function(){return _0xdd7e6.toString().search("(((.+)+)+)+$").toString().constructor(_0xdd7e6).search("(((.+)+)+)+$")}));_0xdd7e6();class _0x268bb2 extends _0x2fee9e{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._rotateDirection=WebGLPlot.defaultValue(e.rotateDirection,_0x499c3d.ClockWise),this._startAngle=WebGLPlot.defaultValue(e.startAngle,new _0x45ea17(0,0,0)),this._endAngle=WebGLPlot.defaultValue(e.endAngle,new _0x45ea17(0,0,0))}getGOAnimationType(){return _0x3b65eb.ANIMATION_ROTATE}execute(){if(this._animationGOFeature.symbolType!==_0x585354.SYMBOL_DOT||!this.canExecute())return!1;var e=this._ratio,t=this.getCurrentAngle(this.startAngle.x,this.endAngle.x,e),i=this.getCurrentAngle(this.startAngle.y,this.endAngle.y,e),n=this.getCurrentAngle(this.startAngle.z,this.endAngle.z,e),r=this._animationGOFeature._showMode;return _0x3f7d9f.Vector===r?this._animationGOFeature.vectorRotate=new _0x45ea17(t,i,n):_0x3f7d9f.Marker===r&&(this._animationGOFeature._modelRotate=new _0x45ea17(t,i,n)),this._animationGOFeature._initialize=!1,!0}getCurrentAngle(e,t,i){var n=0,r=t-e,o=parseInt(Math.abs(r/360));if(e!==t)if(this._rotateDirection===_0x499c3d.ClockWise)r<0&&(r+=360*(2*o+1)),n=e+r*i;else{var a=0;n=e+(360-(r=0===(a=r<0?r+360*(o+1):r-360*o)?360*o:360-a+360*o)*i)}return n}resetAnimationFeature(e){!this._needSetShowFlag||(this._animationGOFeature._rotate=this._goFeature._rotate,this._animationGOFeature._modelRotate=this._goFeature._modelRotate,this._animationGOFeature.vectorRotate=this._goFeature.vectorRotate,_0x2fee9e.prototype.resetAnimationFeature.call(this,e),e&&this.setAnimationShowFlag())}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.rotateDirection=this.rotateDirection,e.startAngle=this.startAngle,e.endAngle=this.endAngle,e}fromJSONData(e){this.fromBaseJSONData(e),this.rotateDirection=e.rotateDirection,this.startAngle=e.startAngle,this.endAngle=e.endAngle}}Object.defineProperties(_0x268bb2.prototype,{rotateDirection:{get:function(){return this._rotateDirection},set:function(e){e!=this._rotateDirection&&(this._rotateDirection=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startAngle:{get:function(){return this._startAngle},set:function(e){e!=this._startAngle&&(this._startAngle=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endAngle:{get:function(){return this._endAngle},set:function(e){e!=this._endAngle&&(this._endAngle=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x2cb729=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x179efd=_0x2cb729(void 0,(function(){return _0x179efd.toString().search("(((.+)+)+)+$").toString().constructor(_0x179efd).search("(((.+)+)+)+$")}));_0x179efd();class _0x27c5be extends _0x2fee9e{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._startScale=WebGLPlot.defaultValue(e.startScale,0),this._endScale=WebGLPlot.defaultValue(e.endScale,1),this._lastScale=WebGLPlot.defaultValue(e.lastScale,null)}getGOAnimationType(){return _0x3b65eb.ANIMATION_SCALE}execute(){if(!_0x51d1e4.isSymbolDot(this._animationGOFeature._symbolType)&&this._animationGOFeature.symbolType!==_0x585354.SYMBOL_TEXT||!this.canExecute())return!1;this._lastScale=this._animationGOFeature._scale,_0x3f7d9f.Marker===this._animationGOFeature.showMode&&(this._lastScale=this._animationGOFeature._modelScale.x),_0x3f7d9f.Vector===this._animationGOFeature.showMode&&(this._lastScale=this._animationGOFeature._vectorScale);var e=this._startScale;0===e&&(e=0);var t=this._endScale;if(0===t&&(t=0),this._animationGOFeature.display||(this._animationGOFeature.display=!0),this._animationGOFeature.symbolType===_0x585354.SYMBOL_TEXT)this._animationGOFeature.__cellLabel&&(this._animationGOFeature.__cellLabel.scale=e+this.ratio*(t-e));else if(this._animationGOFeature.sizeInMeters)this._animationGOFeature.billboard.scale=this._animationGOFeature._BillboardScale*(e+this.ratio*(t-e));else{var i=this.goFeature._scale*(e+this.ratio*(t-e));_0x3f7d9f.Picture===this._animationGOFeature.showMode||_0x3f7d9f.Grid===this._animationGOFeature.showMode?this._animationGOFeature.scale=i:_0x3f7d9f.Marker===this._animationGOFeature.showMode?(i=this.goFeature._modelScale.x*(e+this.ratio*(t-e)),this._animationGOFeature._modelScale.x=i,this._animationGOFeature._initialize=!1):_0x3f7d9f.Vector===this._animationGOFeature.showMode&&(i=this.goFeature._vectorScale*(e+this.ratio*(t-e)),this._animationGOFeature._vectorScale=i,this._animationGOFeature._initialize=!1)}return!0}resetAnimationFeature(e){!this._needSetShowFlag||(this._lastScale=null,this._animationGOFeature.scale=this.goFeature.scale,_0x2fee9e.prototype.resetAnimationFeature.call(this,e),this._startScale<this._endScale||!e?this._animationGOFeature.display=!1:this._animationGOFeature.display=!0,e&&this.setAnimationShowFlag())}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.startScale=this.startScale,e.endScale=this.endScale,e}fromJSONData(e){this.fromBaseJSONData(e),this.startScale=e.startScale,this.endScale=e.endScale}}Object.defineProperties(_0x27c5be.prototype,{startScale:{get:function(){return this._startScale},set:function(e){e!=this._startScale&&(this._startScale=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endScale:{get:function(){return this._endScale},set:function(e){e!=this._endScale&&(this._endScale=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},lastScale:{get:function(){return this._lastScale},set:function(e){e!=this._lastScale&&(this._lastScale=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x195a27=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2bb61c=_0x195a27(void 0,(function(){return _0x2bb61c.toString().search("(((.+)+)+)+$").toString().constructor(_0x2bb61c).search("(((.+)+)+)+$")}));_0x2bb61c();class _0x5118f6 extends _0x2fee9e{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._startScale=WebGLPlot.defaultValue(e.startScale,0),this._endScale=WebGLPlot.defaultValue(e.endScale,1),this._timeSpace=WebGLPlot.defaultValue(e.timeSpace,50),this._lastDrawTime=WebGLPlot.defaultValue(e.lastDrawTime,0),this._lineLength=WebGLPlot.defaultValue(e.lineLength,0),this._controlPoints=WebGLPlot.defaultValue(e.controlPoints,[]),this.m_arrPts3D=[],this.goFeatureLocalPts=[]}getGOAnimationType(){return _0x3b65eb.ANIMATION_GROW}execute(){if(this._animationGOFeature._localPoints.length<2){var e=this.goFeatureLocalPts;if(e.length<2)return!1;this._animationGOFeature._localPoints=e}if(!this.canExecute())return!1;var t=(new Date).getTime();if(this._lastDrawTime>0&&t-this._timeSpace<this._lastDrawTime)return!1;var i=this._startScale+this._ratio*(this._endScale-this._startScale);return i>=1?i=1:i<=0&&(i=0),this._lastDrawTime=t,this._executeAnimation(i)}_executeAnimation(e){var t=!1,i=this._goFeature._code,n=this._goFeature._libID;if(0===this.m_arrPts3D.length&&(this.m_arrPts3D=WebGLPlot.clonePoints(this.goFeatureLocalPts)),0===n)switch(i){case _0x585354.SYMBOL_KIDNEY:case _0x585354.SYMBOL_POLYBEZIERCLOSED:case _0x585354.SYMBOL_PARALLELOGRAM:case _0x585354.SYMBOL_TRAPEZOID:case _0x585354.SYMBOL_CIRCLECHORD:t=this._execute_Kidney(e);break;case _0x585354.SYMBOL_CIRCLE:t=this._execute_Circle(e);break;case _0x585354.SYMBOL_RECTANGLE:t=this._execute_Rect(e);break;case _0x585354.SYMBOL_REGULARPOLYGON:t=this._execute_RegularPloygon(e);break;case _0x585354.SYMBOL_ELLIPSE:t=this._execute_Ellipse(e);break;case _0x585354.SYMBOL_ARBITRARYPOLYGON:t=this._execute_ArbitraryPolygon(e);break;case _0x585354.SYMBOL_PARALLELLINE:t=this._execute_ParallelLine(e);break;case _0x585354.SYMBOL_POLYBEZIER:t=this._execute_Polybezier(e);break;case _0x585354.SYMBOL_PIE:case _0x585354.SYMBOL_CHORD:case _0x585354.SYMBOL_ARC:return!1;case _0x585354.SYMBOL_CURVEEIGHT:t=this._execute_CurveEight(e);break;default:t=this._execute_Generalization(e)}else if(22===n)switch(i){case 1004:case 2004:case 1010:t=this._execute_1004(e);break;case 1006:case 2006:t=this._execute_1006(e);break;case 1002:case 2002:t=this._execute_1002(e);break;case 32:case 3211:t=this._execute_ArbitraryPolygon(e);break;case 390:case 3911:t=this._execute_Kidney(e);break;default:t=this._execute_Generalization(e)}else if(100===n)if(25200===i)t=this._execute_1004(e);else t=this._execute_Generalization(e);else if(421===n)switch(i){case 311:t=this._execute_1004(e);break;case 317:t=this._execute_1006(e);break;default:t=this._execute_Generalization(e)}else if(123===n)switch(i){case 60310:case 6031001:t=this._execute_1004(e);break;default:t=this._execute_Generalization(e)}else t=this._execute_Generalization(e);return t}_execute_Generalization(e){if(0===this._lineLength&&(this._controlPoints=this.m_arrPts3D,this._lineLength=WebGLPlot.polylineDistance(this._controlPoints)),0===e||Math.abs(e-this._endScale)<1e-10&&this._startScale>this._endScale)return this._executeAndRatioIsZero(),!0;for(var t=[],i=WebGLPlot.clonePoints(this._controlPoints),n=this._findPos(this._lineLength*e,i),r=0;r<=n.pos;r++)t.push(i[r]);return t.push(n.pts),WebGLPlot.isAccessServer(this._animationGOFeature._libID,this._animationGOFeature._code)&&this._animationGOFeature.getMinEditPts()>t.length?(this._executeAndRatioIsZero(),!0):(this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(t),this._animationGOFeature._initialize=!1,!0)}_findPos(e,t){var i,n=0,r=0;for(i=1;i<t.length&&!(n+(r=_0x51d1e4.distance(t[i-1],t[i]))>=e);i++)n+=r;var o=new Object;if(i<t.length)var a=_0x51d1e4.LinePnt(t[i-1],t[i],e-n);else a=t[i-1];return o.pos=i-1,o.pts=a,o}_execute_1004(e){if(0===this._lineLength){this._controlPoints=this.m_arrPts3D;var t=new _0x45ea17((this._controlPoints[0].x+this._controlPoints[1].x)/2,(this._controlPoints[0].y+this._controlPoints[1].y)/2,(this._controlPoints[0].z+this._controlPoints[1].z)/2);this._lineLength+=_0x51d1e4.distance(t,this._controlPoints[2]);for(var i=3;i<this._controlPoints.length;i++)this._lineLength+=_0x51d1e4.distance(this._controlPoints[i-1],this._controlPoints[i])}if(0===e||Math.abs(e-this._endScale)<1e-10&&this._startScale>this._endScale)return this._executeAndRatioIsZero(),!0;var n=[],r=[];t=new _0x45ea17((this._controlPoints[0].x+this._controlPoints[1].x)/2,(this._controlPoints[0].y+this._controlPoints[1].y)/2,(this._controlPoints[0].z+this._controlPoints[1].z)/2);r.push(t);for(i=2;i<this._controlPoints.length;i++)r.push(this._controlPoints[i].clone());n.push(this._controlPoints[0]),n.push(this._controlPoints[1]);for(var o=this._findPos(this._lineLength*e,r),a=1;a<=o.pos;a++)n.push(r[a]);return n.push(o.pts),this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(n),this._animationGOFeature._initialize=!1,!0}_execute_1006(e){if(0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D,this._animationGOFeature.m_bIsAnimation=!0),0===e||Math.abs(e-this._endScale)<1e-10&&this._startScale>this._endScale)return this._executeAndRatioIsZero(),!0;var t=this.OperateCtrlPts(this._controlPoints);if(4!==t.length)return!1;for(var i=[],n=0;n<t.length;n++){var r=WebGLPlot.Cartesian3.fromDegrees(t[n].x,t[n].y,t[n].z);i.push(r)}var o=i[0],a=i[1],s=i[2],l=i[3],u=_0x51d1e4.distance(o,l),c=_0x51d1e4.distance(a,s),h=_0x51d1e4.LinePnt(o,l,u*e),d=_0x51d1e4.LinePnt(a,s,c*e),f=[];return f.push(this.PtsToSpherical(o)),f.push(this.PtsToSpherical(a)),f.push(this.PtsToSpherical(d)),f.push(this.PtsToSpherical(h)),this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(f),this._animationGOFeature._initialize=!1,!0}PtsToSpherical(e){var t=_0x9f2efc.getInstance({scene:this._scene})._scene.globe.ellipsoid,i=new WebGLPlot.Cartesian3(e.x,e.y,e.z),n=t.cartesianToCartographic(i),r=WebGLPlot.CesiumMath.toDegrees(n.latitude);return new _0x45ea17(WebGLPlot.CesiumMath.toDegrees(n.longitude),r,n.height)}_execute_1002(e){if(0===this._lineLength&&(this._controlPoints=this.m_arrPts3D,this._lineLength=WebGLPlot.polylineDistance(this._controlPoints)),0===e||Math.abs(e-this._endScale)<1e-10&&this._startScale>this._endScale)return this._executeAndRatioIsZero(),!0;var t=this._controlPoints.length,i=Math.ceil(t/3),n=t%3==0?3:t%3;1===n&&(i-=1,n=3,this._controlPoints.pop());var r,o=[];if(3===n)for(var a=1;a<i+1;a++){var s=3*a,l=this._controlPoints[s-3],u=this._controlPoints[s-2],c=this._controlPoints[s-1];if((f=(d=_0x51d1e4.distance(l,u))+_0x51d1e4.distance(u,c))*e>=d)r=_0x51d1e4.LinePnt(u,c,f*e-d),o.push(l),o.push(u),o.push(r);else{r=_0x51d1e4.LinePnt(l,u,f*e);var h=_0x51d1e4.LinePnt(l,u,d*e);o.push(l),o.push(h),o.push(r)}}else{for(a=1;a<i;a++){var d;s=3*a,l=this._controlPoints[s-3],u=this._controlPoints[s-2],c=this._controlPoints[s-1];if((f=(d=_0x51d1e4.distance(l,u))+_0x51d1e4.distance(u,c))*e>=d)r=_0x51d1e4.LinePnt(u,c,f*e-d),o.push(l),o.push(u),o.push(r);else{r=_0x51d1e4.LinePnt(l,u,f*e);h=_0x51d1e4.LinePnt(l,u,d*e);o.push(l),o.push(h),o.push(r)}}l=this._controlPoints[t-2],u=this._controlPoints[t-1];var f=_0x51d1e4.distance(l,u);r=_0x51d1e4.LinePnt(l,u,f*e),o.push(l),o.push(r)}return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(o),this._animationGOFeature._initialize=!1,!0}_execute_Rect(e){0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D);var t=new _0x45ea17((this._controlPoints[0].x+this._controlPoints[1].x)/2,(this._controlPoints[0].y+this._controlPoints[1].y)/2,(this._controlPoints[0].z+this._controlPoints[1].z)/2),i=Math.abs(this._controlPoints[0].x-this._controlPoints[1].x)/2*e,n=Math.abs(this._controlPoints[0].y-this._controlPoints[1].y)/2*e,r=new _0x45ea17(t.x-i,t.y+n,t.z),o=new _0x45ea17(t.x+i,t.y-n,t.z);return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=[r,o],this._animationGOFeature._initialize=!1,!0}_execute_Circle(e){0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D);var t=e*_0x51d1e4.distance(this._controlPoints[0],this._controlPoints[1]);if(1===e)this._animationGOFeature._localPoints=[this._controlPoints[0],this._controlPoints[1]];else{var i=new _0x45ea17(this._controlPoints[0].x+t,this._controlPoints[0].y,this._controlPoints[0].z);this._animationGOFeature._localPoints=[this._controlPoints[0],i]}return this._animationGOFeature._initialize=!1,!0}_execute_Kidney(e){if(0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D),0===e||Math.abs(e-this._endScale)<1e-10&&this._startScale>this._endScale)return this._executeAndRatioIsZero(),!0;var t=[],i=this._controlPoints.length,n=_0x51d1e4.getPolygonCenterPt(this._controlPoints);if(null===n)return this._executeAndRatioIsZero(),!0;for(var r=0;r<i;r++){var o=_0x51d1e4.distance(n,this._controlPoints[r]),a=o*e;if(a>o)return!1;var s=_0x51d1e4.LinePnt(n,this._controlPoints[r],a);t.push(s)}return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(t),this._animationGOFeature._initialize=!1,!0}_execute_RegularPloygon(e){if(0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D),this._controlPoints=_0x51d1e4.clearNextSamePts(this._controlPoints),0===e||Math.abs(e-this._endScale)<1e-10&&this._startScale>this._endScale)return this._executeAndRatioIsZero(),!0;var t=this._controlPoints.length,i=_0x51d1e4.distance(this._controlPoints[0],this._controlPoints[t-1]),n=i*e,r=[];if(n>=i)r=this._controlPoints;else{var o=_0x51d1e4.LinePnt(this._controlPoints[0],this._controlPoints[t-1],n);r.push(this._controlPoints[0]);for(var a=1;a<t-1;a++)r.push(this._controlPoints[a]);r.push(o)}return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(r),this._animationGOFeature._initialize=!1,!0}_execute_Ellipse(e){if(0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D),0===e||Math.abs(e-this._endScale)<1e-10&&this._startScale>this._endScale)return this._executeAndRatioIsZero(),!0;var t=_0x51d1e4.FindPointOnLineByRatio(e,this._controlPoints[0],this._controlPoints[1]),i=_0x51d1e4.FindPointOnLineByRatio(e,this._controlPoints[0],this._controlPoints[2]);return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=[this._controlPoints[0],t,i],this._animationGOFeature._initialize=!1,!0}_execute_ArbitraryPolygon(e){if(0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D),0===e||Math.abs(e-this._endScale)<1e-10&&this._startScale>this._endScale)return this._executeAndRatioIsZero(),!0;var t=this._controlPoints.length,i=_0x51d1e4.getPolygonCenterPt(this._controlPoints);if(null===i)return this._executeAndRatioIsZero(),!0;for(var n=[],r=0;r<t;r++){var o=_0x51d1e4.distance(i,this._controlPoints[r])*e,a=_0x51d1e4.LinePnt(i,this._controlPoints[r],o);n.push(a)}return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(n),this._animationGOFeature._initialize=!1,!0}_execute_ParallelLine(e){if(0===this._lineLength){this._controlPoints=this.m_arrPts3D;for(var t=2;t<this._controlPoints.length;t++)this._lineLength+=_0x51d1e4.distance(this._controlPoints[t-1],this._controlPoints[t])}var i=[],n=[];for(t=1;t<this._controlPoints.length;t++)n.push(this._controlPoints[t]);var r=this._findPos(this._lineLength*e,n);i.push(this._controlPoints[0]);for(t=0;t<=r.pos;t++)i.push(n[t]);return i.push(r.pts),this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(i),this._animationGOFeature._initialize=!1,!0}_execute_Polybezier(e){var t=[];if(0===this._lineLength&&(this._controlPoints=this.m_arrPts3D,t=_0x51d1e4.generateBeizerPointsNoCtrlPt(this._controlPoints),this._lineLength+=WebGLPlot.polylineDistance(t)),e>=1)return this._animationGOFeature._symbolAlgo=null,this._animationGOFeature.code=590,this._animationGOFeature._localPoints=this._goFeature._localPoints,this._animationGOFeature._initialize=!1,!0;this._animationGOFeature._symbolAlgo=null,this._animationGOFeature.code=24;for(var i=[],n=0;n<this._controlPoints.length;n++)i.push(this._controlPoints[n].z);var r=Math.max.apply({},i),o=[];t=_0x51d1e4.generateBeizerPointsNoCtrlPt(this._controlPoints);var a=this._findPos(this._lineLength*e,t);for(n=0;n<=a.pos;n++)o.push(new _0x45ea17(t[n].x,t[n].y,r));return o.push(new _0x45ea17(a.pts.x,a.pts.y,r)),this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(o),this._animationGOFeature._initialize=!1,!0}_execute_CurveEight(e){0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D);for(var t=_0x51d1e4.getPolygonCenterPt(this._controlPoints),i=[],n=0;n<this._controlPoints.length;n++){var r=_0x51d1e4.distance(t,this._controlPoints[n])*e,o=_0x51d1e4.LinePnt(t,this._controlPoints[n],r);i.push(o)}return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(i),this._animationGOFeature._initialize=!1,!0}_executeAndRatioIsZero(){this._animationGOFeature._localPoints=[],this._animationGOFeature.display=!1}resetAnimationFeature(e){if(this._needSetShowFlag){if(_0x2fee9e.prototype.resetAnimationFeature.call(this,e),this._lineLength=0,this._controlPoints=[],this.m_arrPts3D=[],this._animationGOFeature._localPoints=[],this._animationGOFeature.code=this._goFeature.code,this.goFeatureLocalPts=WebGLPlot.clonePoints(this._goFeature._localPoints),this.goFeatureLocalPts.length>=2)for(var t=0;t<this.goFeatureLocalPts.length;t++)this._animationGOFeature._localPoints.push(this.goFeatureLocalPts[t].clone());this._startScale<this._endScale&&e?this._animationGOFeature.display=!1:this._animationGOFeature.display=!0,e&&this.setAnimationShowFlag()}}OperateCtrlPts(e){for(var t=[],i=0;i<e.length;i++)t.push(e[i].clone());var n=t.length;if(3==n){var r=new _0x45ea17;(r=_0x51d1e4.getPointsByTrapezoid(1,t[0].x,t[0].y,t[1].x,t[1].y,t[2].x,t[2].y,r)).z=t[2].z,t.push(r)}if(n>4&&t.splice(4,n-4),_0x51d1e4.isRight(t[2],t[0],t[1])){var o=t[0].clone();t[0]=t[1].clone(),t[1]=o}if(!_0x51d1e4.pointIsRightToVerticle(t[0],t[1],t[2])){o=t[2].clone();t[2]=t[3].clone(),t[3]=o}return t}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.startScale=this.startScale,e.endScale=this.endScale,e}fromJSONData(e){this.fromBaseJSONData(e),this.startScale=e.startScale,this.endScale=e.endScale}}Object.defineProperties(_0x5118f6.prototype,{startScale:{get:function(){return this._startScale},set:function(e){e!=this._startScale&&(this._startScale=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endScale:{get:function(){return this._endScale},set:function(e){e!=this._endScale&&(e>=1&&(e=1),this._endScale=e,_0x43a805.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});const _0x453021=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x199fec=_0x453021(void 0,(function(){return _0x199fec.toString().search("(((.+)+)+)+$").toString().constructor(_0x199fec).search("(((.+)+)+)+$")}));_0x199fec();class _0x179dd6 extends _0x5118f6{constructor(e){(e=WebGLPlot.defaultValue(e,{})).startScale=WebGLPlot.defaultValue(e.startScale,1),e.endScale=WebGLPlot.defaultValue(e.endScale,0);const t=e.startScale;e.startScale<e.endScale&&(e.startScale=e.endScale,e.endScale=t),e.duration=WebGLPlot.defaultValue(e.duration,1),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5158e5.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x3b65eb.ANIMATION_REDUCE_EXP}}var _0x486ce4=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x59b093=_0x486ce4(void 0,(function(){return _0x59b093.toString().search("(((.+)+)+)+$").toString().constructor(_0x59b093).search("(((.+)+)+)+$")}));_0x59b093();class _0x5443f8 extends _0x5118f6{constructor(e){(e=WebGLPlot.defaultValue(e,{})).startScale=WebGLPlot.defaultValue(e.startScale,0),e.endScale=WebGLPlot.defaultValue(e.endScale,1);const t=e.startScale;e.startScale>e.endScale&&(e.startScale=e.endScale,e.endScale=t),e.duration=WebGLPlot.defaultValue(e.duration,2),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5158e5.PLAYFROMNOW),super(e),this._animationGrowEXP_isFirstExecute=!0}getGOAnimationType(){return _0x3b65eb.ANIMATION_GROW_EXP}showAnimationFeature(e){null!==this._animationGOFeature&&null!==this._animationGOFeature._symbolStyle&&(this.resetAnimationFeature(e),this._animationGOFeature.display=!1),null!==this._goFeature&&null!==this._goFeature._symbolStyle&&(this._goFeature.display=!e,this._goFeature._initialize=!1),e&&(this._isSendBegin=!0)}execute(){if(this._animationGOFeature._localPoints.length<2){var e=this.goFeatureLocalPts;if(e.length<2)return!1;this._animationGOFeature._localPoints=e}if(!this.canExecute())return!1;this._animationGrowEXP_isFirstExecute&&(this._animationGOFeature.display=!0,this._animationGrowEXP_isFirstExecute=!1);var t=(new Date).getTime();if(this._lastDrawTime>0&&t-this._timeSpace<this._lastDrawTime)return!1;var i=this._startScale+this._ratio*(this._endScale-this._startScale);return i>=1&&(i=1),this._lastDrawTime=t,this._executeAnimation(i)}}var _0x405578=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x168bac=_0x405578(void 0,(function(){return _0x168bac.toString().search("(((.+)+)+)+$").toString().constructor(_0x168bac).search("(((.+)+)+)+$")}));_0x168bac();class _0x3548ca extends _0x2d3d95{constructor(e){(e=WebGLPlot.defaultValue(e,{})).finalDisplay=!0,e.showEffect=!0,e.duration=WebGLPlot.defaultValue(e.duration,3),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5158e5.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x3b65eb.ANIMATION_MOVEIN_EXP}}var _0x5c477a=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x51723e=_0x5c477a(void 0,(function(){return _0x51723e.toString().search("(((.+)+)+)+$").toString().constructor(_0x51723e).search("(((.+)+)+)+$")}));_0x51723e();class _0x3b5ece extends _0x2d3d95{constructor(e){(e=WebGLPlot.defaultValue(e,{})).finalDisplay=!1,e.showEffect=!0,e.duration=WebGLPlot.defaultValue(e.duration,1),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5158e5.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x3b65eb.ANIMATION_MOVEOUT_EXP}}var _0x49095c=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1dfb38=_0x49095c(void 0,(function(){return _0x1dfb38.toString().search("(((.+)+)+)+$").toString().constructor(_0x1dfb38).search("(((.+)+)+)+$")}));_0x1dfb38();class _0x4b4631 extends _0x2d3d95{constructor(e){(e=WebGLPlot.defaultValue(e,{})).finalDisplay=!1,e.showEffect=!1,e.duration=WebGLPlot.defaultValue(e.duration,1),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5158e5.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x3b65eb.ANIMATION_HIDE_EXP}}var _0x24b37d=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x59945f=_0x24b37d(void 0,(function(){return _0x59945f.toString().search("(((.+)+)+)+$").toString().constructor(_0x59945f).search("(((.+)+)+)+$")}));_0x59945f();class _0x990cf2 extends _0x2d3d95{constructor(e){(e=WebGLPlot.defaultValue(e,{})).finalDisplay=!0,e.showEffect=!1,e.duration=WebGLPlot.defaultValue(e.duration,1),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5158e5.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x3b65eb.ANIMATION_SHOW_EXP}}var _0x283f31=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x499a05=_0x283f31(void 0,(function(){return _0x499a05.toString().search("(((.+)+)+)+$").toString().constructor(_0x499a05).search("(((.+)+)+)+$")}));_0x499a05();class _0x5e08a4 extends _0x569ba9{constructor(e){(e=WebGLPlot.defaultValue(e,{})).pathType=_0x4f5747.POLYLINE,e.duration=WebGLPlot.defaultValue(e.duration,5),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5158e5.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x3b65eb.ANIMATION_BROKENLINE_EXP}}var _0x463998=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x4b2f3f=_0x463998(void 0,(function(){return _0x4b2f3f.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b2f3f).search("(((.+)+)+)+$")}));_0x4b2f3f();class _0x1cc45e extends _0x569ba9{constructor(e){(e=WebGLPlot.defaultValue(e,{})).pathType=_0x4f5747.CURVE,e.duration=WebGLPlot.defaultValue(e.duration,5),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5158e5.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x3b65eb.ANIMATION_CURVE_EXP}}const _0xfa80f7=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0xf42a48=_0xfa80f7(void 0,(function(){return _0xf42a48.toString().search("(((.+)+)+)+$").toString().constructor(_0xf42a48).search("(((.+)+)+)+$")}));_0xf42a48();class _0x24959f extends _0x569ba9{constructor(e){(e=WebGLPlot.defaultValue(e,{})).pathType=_0x4f5747.POLYLINE,e.duration=WebGLPlot.defaultValue(e.duration,5),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5158e5.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x3b65eb.ANIMATION_WAY_EXP}}Object.defineProperties(_0x24959f.prototype,{wayPoints:{get:function(){return this._wayPoints},set:function(e){if(e instanceof _0x34d5f9){let t=[];this._wayPoints=e.localPoints,t=this.generateBeizerPointsNoCtrlPt(this._wayPoints),this._shapePoints=t}}}});var _0x399d51=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x401c08=_0x399d51(void 0,(function(){return _0x401c08.toString().search("(((.+)+)+)+$").toString().constructor(_0x401c08).search("(((.+)+)+)+$")}));_0x401c08();class _0x25da3f extends _0x9b417f{constructor(e){(e=WebGLPlot.defaultValue(e,{})).duration=WebGLPlot.defaultValue(e.duration,2),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5158e5.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x3b65eb.ANIMATION_BLINK_EXP}}const _0x340f96=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0xcbb1e5=_0x340f96(void 0,(function(){return _0xcbb1e5.toString().search("(((.+)+)+)+$").toString().constructor(_0xcbb1e5).search("(((.+)+)+)+$")}));_0xcbb1e5();class _0x498b55 extends _0x27c5be{constructor(e){(e=WebGLPlot.defaultValue(e,{})).startScale=WebGLPlot.defaultValue(e.startScale,0),e.endScale=WebGLPlot.defaultValue(e.endScale,1);const t=e.startScale;e.startScale>e.endScale&&(e.startScale=e.endScale,e.endScale=t),e.duration=WebGLPlot.defaultValue(e.duration,2),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5158e5.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x3b65eb.ANIMATION_ZOOMIN_EXP}}const _0x134c53=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x5dc5ca=_0x134c53(void 0,(function(){return _0x5dc5ca.toString().search("(((.+)+)+)+$").toString().constructor(_0x5dc5ca).search("(((.+)+)+)+$")}));_0x5dc5ca();class _0x527738 extends _0x27c5be{constructor(e){(e=WebGLPlot.defaultValue(e,{})).startScale=WebGLPlot.defaultValue(e.startScale,1),e.endScale=WebGLPlot.defaultValue(e.endScale,0);const t=e.startScale;e.startScale<e.endScale&&(e.startScale=e.endScale,e.endScale=t),e.duration=WebGLPlot.defaultValue(e.duration,2),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5158e5.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x3b65eb.ANIMATION_ZOOMOUT_EXP}}var _0x36ea3a=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x4b33cf=_0x36ea3a(void 0,(function(){return _0x4b33cf.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b33cf).search("(((.+)+)+)+$")}));_0x4b33cf();class GOAnimationManagerBase{constructor(e){this.goAnimations=[],this.curPlayGroup=0}preView(){if(0!==this.goAnimations.length)for(var e=this.getAllGroups(),t=0;t<e.length;t++){var i=e[t];for(let e=0;e<i.length;e++)i[e].play()}}play(e){if(0===this.goAnimations.length)return;void 0!==e&&(this.curPlayGroup=this.getAnimationGroupByName(e).index),this.isPlay()&&this.curPlayGroup--;var t=this.getAllGroups();this.curPlayGroup>t.length-1&&(this.curPlayGroup=0);let i=this.isPause();for(var n=t[this.curPlayGroup],r=0;r<n.length;r++){n[r].play(!1)}if(0===this.curPlayGroup&&!i){for(var o=0;o<t.length;o++)for(n=t[o],r=0;r<n.length;r++){n[r].showAnimationFeature(!0)}this.resetAnimationShowFlag()}this.curPlayGroup++}stop(){if(0!==this.goAnimations.length){for(var e=0;e<this.goAnimations.length;e++)this.goAnimations[e].stop();this.curPlayGroup=0}}pause(){if(0!==this.goAnimations.length){for(var e=!1,t=0;t<this.goAnimations.length;t++)this.goAnimations[t].animationState===_0x4d33de.PLAYING?(e=!0,this.goAnimations[t].pause()):this.goAnimations[t].stop();e&&this.curPlayGroup>0&&this.curPlayGroup--}}reset(){if(0!==this.goAnimations.length){for(var e=0;e<this.goAnimations.length;e++)this.goAnimations[e].reset();this.curPlayGroup=0}}isPlay(){for(var e=!1,t=0;t<this.goAnimations.length;t++)this.goAnimations[t].animationState===_0x4d33de.PLAYING&&(e=!0);return e}isPause(){for(var e=!1,t=0;t<this.goAnimations.length;t++)this.goAnimations[t].animationState===_0x4d33de.PAUSE&&(e=!0);return e}resetAnimationShowFlag(){if(this.goAnimations.length>0)for(let e=0;e<this.goAnimations.length;e++)this.goAnimations[e]._needSetShowFlag=!0}getAnimationTimeLength(e,t){var i=!1,n=0,r=0;for(let u=e-1;u>=0;u--){var o=t[u],a=o.startTime+o.duration;if(a>r&&(r=a),o.animationPlayType===_0x5158e5.PLAYAFTERLASTONE){i=!0;for(let e=u-1;e>=0;e--){var s=t[e],l=s.startTime+s.duration;l>n&&(n=l)}}}return{isExist:i,length1:n,length2:r}}getAllGroups(){var e=[];for(let n=0;n<this.goAnimations.length;n++){var t=this.goAnimations[n];if(t.animationPlayType===_0x5158e5.PLAYFROMNOW||0===n){var i=[];i.push(t),e.push(i)}else e[e.length-1].push(t)}return e}getAnimationGroup(e){var t=null,i=0,n=this.getAllGroups();for(let o=0;o<n.length;o++){var r=n[o];for(let n=0;n<r.length;n++)if(r[n].name===e.name){t=r,i=o;break}}return{index:i,group:t}}getAnimationGroupByName(e){var t=null,i=0,n=this.getAllGroups();for(let o=0;o<n.length;o++){var r=n[o];for(let n=0;n<r.length;n++)if(r[n].name===e){t=r,i=o;break}}return{index:i,group:t}}changeAnimationTime(e){if(!e||!this.getAnimationGroup(e).group)return!1;var t=this.getAnimationGroup(e).group;this.getAnimationGroup(e).index;var i=t.indexOf(e);if(e.animationPlayType===_0x5158e5.PLAYFROMNOW)e.startTime=e.delayTime;else if(e.animationPlayType===_0x5158e5.PLAYSAMELASTONE||e.animationPlayType===_0x5158e5.UNKNOWN)(n=this.getAnimationTimeLength(i,t)).isExist?e.startTime=n.length1+e.delayTime:e.startTime=e.delayTime;else if(e.animationPlayType===_0x5158e5.PLAYAFTERLASTONE){var n=this.getAnimationTimeLength(i,t);e.startTime=n.length2+e.delayTime}}moveAnimation(e,t){if(!(t<0||t>this.goAnimations.length)){var i=this.goAnimations.indexOf(e);if(i!==t){this.goAnimations=this.move(i,t);for(var n=0;n<this.goAnimations.length;n++){e=this.goAnimations[n];this.changeAnimationTime(e)}}}}move(e,t){var i=[].concat(this.goAnimations);return i.splice(t,0,i.splice(e,1)[0]),i}getAnimationDelayTime(e){if(!e||!this.getAnimationGroup(e).group)return!1;var t=0,i=this.getAnimationGroup(e).group;this.getAnimationGroup(e).index;var n=i.indexOf(e);if(e.animationPlayType===_0x5158e5.PLAYFROMNOW||0===n)t=e.startTime;else if(e.animationPlayType===_0x5158e5.PLAYAFTERLASTONE){var r=this.getAnimationTimeLength(n,i);t=e.startTime-r.length2}else if(e.animationPlayType===_0x5158e5.PLAYSAMELASTONE||e.animationPlayType===_0x5158e5.UNKNOW){var o=-1;for(let e=n;e>=0;e--){if(i[e].animationPlayType===_0x5158e5.PLAYAFTERLASTONE){o=e;break}}if(-1===o)t=e.startTime;else{r=this.getAnimationTimeLength(o,i);t=e.startTime-r.length2}}return t}getSupportAnimationPlayType(e){if(!e)return null;let t=[_0x3b65eb.ANIMATION_WAY,_0x3b65eb.ANIMATION_BLINK,_0x3b65eb.ANIMATION_ATTRIBUTE,_0x3b65eb.ANIMATION_SHOW,_0x3b65eb.ANIMATION_ROTATE,_0x3b65eb.ANIMATION_SCALE,_0x3b65eb.ANIMATION_GROW,_0x3b65eb.ANIMATION_HIDE_EXP,_0x3b65eb.ANIMATION_REDUCE_EXP,_0x3b65eb.ANIMATION_MOVEIN_EXP,_0x3b65eb.ANIMATION_MOVEOUT_EXP,_0x3b65eb.ANIMATION_ZOOMIN_EXP,_0x3b65eb.ANIMATION_ZOOMOUT_EXP,_0x3b65eb.ANIMATION_CURVE_EXP,_0x3b65eb.ANIMATION_BROKENLINE_EXP,_0x3b65eb.ANIMATION_GROW_EXP,_0x3b65eb.ANIMATION_WAY_EXP,_0x3b65eb.ANIMATION_BLINK_EXP,_0x3b65eb.ANIMATION_SHOW_EXP,_0x3b65eb.ANIMATION_MOVEVIEW_EXP,_0x3b65eb.ANIMATION_WAY_GROUP],i=e.symbolType;return i===_0x585354.SYMBOL_DOT||i===_0x585354.SYMBOL_TEXT||i===_0x585354.SYMBOL_PICTURE||i===_0x585354.SYMBOL_MODEL||i===_0x585354.SYMBOL_ANNOFRAME||i===_0x585354.SYMBOL_CHORD||i===_0x585354.SYMBOL_PIE||i===_0x585354.SYMBOL_ARC||i===_0x585354.SYMBOL_NEWCHORD||i===_0x585354.SYMBOL_NEWPIE||i===_0x585354.SYMBOL_NEWARC||i===_0x585354.SYMBOL_ANNOFRAME||i===_0x585354.SYMBOL_ANNOLINE||i===_0x585354.SYMBOL_TEXTBOX||i===_0x585354.SYMBOL_LINEMARKING||i===_0x585354.SYMBOL_GEOTOOLTIPBOXM||i===_0x585354.SYMBOL_WIRE||i===_0x585354.SYMBOL_CURVEEIGHT||i===_0x585354.SYMBOL_CONCENTRICCIRCLE||i===_0x585354.SYMBOL_RUNWAY?(t=t.filter((e=>e!==_0x3b65eb.ANIMATION_GROW)),t=t.filter((e=>e!==_0x3b65eb.ANIMATION_GROW_EXP)),t=t.filter((e=>e!==_0x3b65eb.ANIMATION_REDUCE_EXP))):i===_0x585354.SYMBOL_DOT||i===_0x585354.SYMBOL_PICTURE||i===_0x585354.SYMBOL_MODEL?(t=t.filter((e=>e!==_0x3b65eb.ANIMATION_WAY)),t=t.filter((e=>e!==_0x3b65eb.ANIMATION_WAY_EXP)),t=t.filter((e=>e!==_0x3b65eb.ANIMATION_CURVE_EXP))):i===_0x585354.SYMBOL_DOT&&e.showMode===_0x3f7d9f.Marker||e.showMode===_0x3f7d9f.Picture||i===_0x585354.SYMBOL_TEXT||i===_0x585354.SYMBOL_PICTURE||i===_0x585354.SYMBOL_MODEL?(t=t.filter((e=>e!==_0x3b65eb.ANIMATION_MOVEOUT_EXP)),t=t.filter((e=>e!==_0x3b65eb.ANIMATION_MOVEIN_EXP))):(i===_0x585354.SYMBOL_DOT&&e.showMode===_0x3f7d9f.Picture||i!==_0x585354.SYMBOL_MODEL&&i!==_0x585354.SYMBOL_DOT)&&(t=t.filter((e=>e!==_0x3b65eb.ANIMATION_ZOOMIN_EXP)),t=t.filter((e=>e!==_0x3b65eb.ANIMATION_ZOOMOUT_EXP))),t}getSupportSettingPath(e){let t=e.symbolType;return!(null==e||t===_0x585354.SYMBOL_DOT||t===_0x585354.SYMBOL_TEXT||t===_0x585354.SYMBOL_PICTURE||t===_0x585354.SYMBOL_MODEL||t===_0x585354.SYMBOL_ANNOFRAME)}}var _0x560f94=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2a8bfd=_0x560f94(void 0,(function(){return _0x2a8bfd.toString().search("(((.+)+)+)+$").toString().constructor(_0x2a8bfd).search("(((.+)+)+)+$")}));_0x2a8bfd();const _0x5f1f34=new Map;class _0x9f2efc extends GOAnimationManagerBase{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._serverUrl=WebGLPlot.defaultValue(e.serverUrl,""),this._scene=WebGLPlot.defaultValue(e.scene,null),this._openEvoFileCompleted=new WebGLPlot.Event,this._openEvoFileFailed=new WebGLPlot.Event,this._saveEvoFileCompleted=new WebGLPlot.Event,this._saveEvoFileFailed=new WebGLPlot.Event,this.setScene(this._scene),this.options={serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},e.options&&e.options.serviceParams&&_0x51d1e4.extend(this.options,e.options)}static getInstance(e){let t;return e.scene&&(t=_0x5f1f34.get(e.scene._plottingID)),WebGLPlot.defined(e)&&!WebGLPlot.defined(t)&&(t=new _0x9f2efc(e),_0x5f1f34.set(e.scene._plottingID,t)),t}createGOAnimation(e,t,i,n=!0,r=_0x5158e5.UNKNOWN){if(e===_0x3b65eb.ANIMATION_WAY_GROUP){Array.isArray(i)||(i=[i]);for(let e=0;e<i.length;e++)if(!_0x51d1e4.isSymbolDot(i[e]._symbolType))return null;return(o=this.createGOAnimationByType(e,t)).setGOFeatures(this,i)?(this.goAnimations.push(o),r!==_0x5158e5.UNKNOWN&&(o._animationPlayType=r),o):null}return WebGLPlot.defined(i)&&this.isCanCreateAnimation(e,i.symbolType)&&null!==(o=this.createGOAnimationByType(e,t))&&null!=i&&i.symbolType!==_0x585354.GROUPOBJECT&&null!==i&&WebGLPlot.defined(i)&&o.setGOFeature(this,i)?(this.goAnimations.push(o),r!==_0x5158e5.UNKNOWN&&(o._animationPlayType=r),n&&_0x43a805.getInstance().animationCreated.raiseEvent(o),o):null;var o}setScene(e){this._goAnimationLayer=new _0x1ec317("animation",e);var t=!1;if(WebGLPlot.defined(e.plotLayers)&&e.plotLayers instanceof WebGLPlot.PlotLayers)e.plotLayers.goAnimationLayer=this._goAnimationLayer,t=!0;else for(var i=0,n=e.primitives.length;i<n;i++){var r=e.primitives._primitives[i];if(WebGLPlot.defined(r)&&r instanceof WebGLPlot.PlotLayers){r.goAnimationLayer=this._goAnimationLayer,t=!0;break}}if(!t){var o=new WebGLPlot.PlotLayers;o.goAnimationLayer=this._goAnimationLayer,e.primitives.add(o),e.plotLayers=o}}createGOAnimationByType(e,t){if(null===t||""===t||null===this._goAnimationLayer||null!==this.findGOAnimationByName(t))return null;var i=null;switch(e){case _0x3b65eb.ANIMATION_WAY:i=new _0x569ba9;break;case _0x3b65eb.ANIMATION_BLINK:i=new _0x9b417f;break;case _0x3b65eb.ANIMATION_ATTRIBUTE:i=new _0x22e2f7;break;case _0x3b65eb.ANIMATION_SHOW:i=new _0x2d3d95;break;case _0x3b65eb.ANIMATION_ROTATE:i=new _0x268bb2;break;case _0x3b65eb.ANIMATION_SCALE:i=new _0x27c5be;break;case _0x3b65eb.ANIMATION_GROW:i=new _0x5118f6;break;case _0x3b65eb.ANIMATION_WAY_GROUP:i=new _0x2a8935;break;case _0x3b65eb.ANIMATION_REDUCE_EXP:i=new _0x179dd6;break;case _0x3b65eb.ANIMATION_GROW_EXP:i=new _0x5443f8;break;case _0x3b65eb.ANIMATION_MOVEIN_EXP:i=new _0x3548ca;break;case _0x3b65eb.ANIMATION_MOVEOUT_EXP:i=new _0x3b5ece;break;case _0x3b65eb.ANIMATION_HIDE_EXP:i=new _0x4b4631;break;case _0x3b65eb.ANIMATION_SHOW_EXP:i=new _0x990cf2;break;case _0x3b65eb.ANIMATION_BROKENLINE_EXP:i=new _0x5e08a4;break;case _0x3b65eb.ANIMATION_CURVE_EXP:i=new _0x1cc45e;break;case _0x3b65eb.ANIMATION_WAY_EXP:i=new _0x24959f;break;case _0x3b65eb.ANIMATION_BLINK_EXP:i=new _0x25da3f;break;case _0x3b65eb.ANIMATION_ZOOMIN_EXP:i=new _0x498b55;break;case _0x3b65eb.ANIMATION_ZOOMOUT_EXP:i=new _0x527738;break;default:return null}return null!==i&&(i._name=t,i._scene=this._scene),i}findGOAnimationByName(e){if(null===this.goAnimations||null===e||""===e)return null;for(var t=null,i=0;i<this.goAnimations.length;i++)if(this.goAnimations[i].name===e){t=this.goAnimations[i];break}return t}findGOAnimationByFeature(e){var t=[];if(0===this.goAnimations.length||null===e||!WebGLPlot.defined(e))return t;for(var i=this.goAnimations.length,n=0;n<i;n++)if(this.goAnimations[n]._goFeature._id===e._id){var r=this.goAnimations[n];t.push(r)}return t}findGOAnimationsByUuid(e){if(0===this.goAnimations.length||"undefined"===e||null===e)return[];var t=this.getFeatureByID(e);return this.findGOAnimationByFeature(t)}execute(){if(0===this.goAnimations.length)return!1;for(var e=!1,t=0;t<this.goAnimations.length;t++)this.goAnimations[t].execute()&&(e=!0);return e}removeGOAnimationByName(e){if(0===this.goAnimations.length||null===e||""===e)return!1;var t=this.findGOAnimationByName(e);return this.removeGOAnimation(t)}removeGOAnimationByFeature(e){if(0===this.goAnimations.length||null===e||!WebGLPlot.defined(e))return!1;let t=[];for(var i=[],n=this.goAnimations.length,r=0;r<n;r++){var o=this.goAnimations[r];if(o._goFeature&&o._goFeature._id!==e._id)i.push(o);else if(o._goFeature&&o._goFeature._id===e._id){for(var a=this.getAnimationGroup(o).group,s=this.getAnimationGroup(o).index+1;s<a.length;s++)this.changeAnimationTime(a[s]);t.push(o.name),o.destroy()}}return this.goAnimations=i,_0x43a805.getInstance().animationDeleted.raiseEvent(t),!0}removeGOAnimation(e,t){if(0===this.goAnimations.length||null===e)return!1;void 0===t&&(t=!0);let i=e.name;for(var n=0;n<this.goAnimations.length;n++)if(this.goAnimations[n]===e){e.reset();var r=this.getAnimationGroup(e).group,o=this.getAnimationGroup(e).index;if(e.destroy(),e=null,this.goAnimations.splice(n,1),r.splice(o,1),null!==r){for(var a=o+1;a<r.length;a++){var s=r[a];this.changeAnimationTime(s)}break}}return t&&_0x43a805.getInstance().animationDeleted.raiseEvent([i]),!0}removeAllGOAnimation(){if(0===this.goAnimations.length)return;let e=[];for(var t=0;t<this.goAnimations.length;t++)e.push(this.goAnimations[t].name),this.removeGOAnimation(this.goAnimations[t],!1);_0x43a805.getInstance().animationDeleted.raiseEvent(e),this.goAnimations=[]}getPlottingLayers(){for(var e=[],t=this._scene,i=_0x51d1e4.getPlotLayers(t),n=0;n<i._layerQueue.length;++n){var r=i.findByIndex(n);r instanceof _0x4ab86a&&e.push(r)}return e}getFeatureByID(e){for(var t=this.getPlottingLayers(),i=0;i<t.length;i++){var n=t[i].getFeatureByUuid(e);if(n)return n}}getAllAnimations(){return this.goAnimations}releaseSelection(){for(var e=this.getPlottingLayers(),t=0;t<e.length;t++)null!=e[t]._plottingEdit&&e[t]._plottingEdit.releaseSelection()}getJSONData(){for(var e={animations:[]},t=0;t<this.goAnimations.length;t++)e.animations.push(this.goAnimations[t].getJSONData());return e}fromJSONData(e){let t=0;if(e.AnimationGroups)for(var i=0,n=0;n<e.AnimationGroups.length;n++){for(var r=e.AnimationGroups[n],o=0,a=0;a<r.Animations.length;a++){var s=r.Animations[a],l=s.startTime+s.duration;o=l>o?l:o}this.Analysis(r.Animations,i),i+=o,t+=r.Animations.length}else t=e.animations.length,this.Analysis(e.animations,0);_0x43a805.getInstance().animationJsonEnd.raiseEvent({animationNumber:t})}Analysis(e,t){for(var i=0;i<e.length;i++){var n=e[i],r="";n.goLayerUuid?r=n.goLayerUuid:n.goFeatureUuid&&(r=n.goFeatureUuid);var o=this.getFeatureByID(r),a=n.name,s=n.type,l=n.playType;if(o&&a&&-1!==s){var u=this.createGOAnimation(s,a,o,l);null!==u&&(n.startTime+=t,u.fromJSONData(n))}}}saveEvoFile(e,t){var i=this;function n(e){var t,n;e?i._saveEvoFileCompleted.raiseEvent(n):i._saveEvoFileFailed.raiseEvent(t)}var r=WebGLPlot.smlFileService(i._serverUrl,this.options.serviceParams);if(r){var o=r.editSmlFileParams;o.method="POST",o.sitData=this.getJSONData(),o.smlFileName=e,o.isCover=t,r.smlFileService.editSMLFile(o,(function(e){e.result.succeed?n({success:!0}):n({success:!1})}),this)}}openEvoFileOnServer(e){var t=this;var i=WebGLPlot.smlFileService(this._serverUrl,this.options.serviceParams);if(i){var n=i.editSmlFileParams;n.method="GET",n.smlFileName=e,i.smlFileService.editSMLFile(n,(function(e){var i;e.result&&e.result.succeed?(i=e.result,t.fromJSONData(i),t._openEvoFileCompleted.raiseEvent()):t._openEvoFileFailed.raiseEvent()}),this)}}buildUrl(e){var t=this._serverUrl,i=t.substr(t.length-1,1);return t+="/"===i?"smlInfos/":"/smlInfos/",t+=e+".json"}isCanCreateAnimation(e,t){return!(t===_0x585354.SYMBOL_DOT&&e===_0x3b65eb.ANIMATION_GROW||t===_0x585354.SYMBOL_ALGO&&e===_0x3b65eb.ANIMATION_SCALE)}}var _0x112076=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x14d6e9=_0x112076(void 0,(function(){return _0x14d6e9.toString().search("(((.+)+)+)+$").toString().constructor(_0x14d6e9).search("(((.+)+)+)+$")}));function _0x421c56(){}_0x14d6e9(),_0x421c56.extend=function(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&(e.toString=t.toString)}return e},_0x421c56.copy=function(e,t){var i;if(e=e||{},t)for(var n in e)typeof(i=t[n])<"u"&&(e[n]=i)},_0x421c56.reset=function(e){for(var t in e=e||{})if(e.hasOwnProperty(t)){if("object"==typeof e[t]&&e[t]instanceof Array){for(var i in e[t])e[t][i].destroy&&e[t][i].destroy();e[t].length=0}else"object"==typeof e[t]&&e[t]instanceof Object&&e[t].destroy&&e[t].destroy();e[t]=null}},_0x421c56.getElement=function(){for(var e=[],t=0,i=arguments.length;t<i;t++){var n=arguments[t];if("string"==typeof n&&(n=document.getElementById(n)),1===arguments.length)return n;e.push(n)}return e},_0x421c56.isElement=function(e){return!(!e||1!==e.nodeType)},_0x421c56.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},_0x421c56.removeItem=function(e,t){for(var i=e.length-1;i>=0;i--)e[i]===t&&e.splice(i,1);return e},_0x421c56.indexOf=function(e,t){if(null==e)return-1;if("function"==typeof e.indexOf)return e.indexOf(t);for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},_0x421c56.modifyDOMElement=function(e,t,i,n,r,o,a,s){t&&(e.id=t),i&&(e.style.left=i.x+"px",e.style.top=i.y+"px"),n&&(e.style.width=n.w+"px",e.style.height=n.h+"px"),r&&(e.style.position=r),o&&(e.style.border=o),a&&(e.style.overflow=a),parseFloat(s)>=0&&parseFloat(s)<1?(e.style.filter="alpha(opacity="+100*s+")",e.style.opacity=s):1===parseFloat(s)&&(e.style.filter="",e.style.opacity="")},_0x421c56.applyDefaults=function(e,t){e=e||{};var i="function"==typeof window.Event&&t instanceof window.Event;for(var n in t)(void 0===e[n]||!i&&t.hasOwnProperty&&t.hasOwnProperty(n)&&!e.hasOwnProperty(n))&&(e[n]=t[n]);return!i&&t&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")&&(e.toString=t.toString),e},_0x421c56.getParameterString=function(e){var t=[];for(var i in e){var n=e[i];if(null!=n&&"function"!=typeof n){var r;if("object"==typeof n&&n.constructor===Array){for(var o,a=[],s=0,l=n.length;s<l;s++)o=n[s],a.push(encodeURIComponent(o??""));r=a.join(",")}else r=encodeURIComponent(n);t.push(encodeURIComponent(i)+"="+r)}}return t.join("&")},_0x421c56.urlAppend=function(e,t){var i=e;if(t){var n=(e+" ").split(/[?&]/);i+=" "===n.pop()?t:n.length?"&"+t:"?"+t}return i},_0x421c56.DEFAULT_PRECISION=14,_0x421c56.toFloat=function(e,t){return null==t&&(t=_0x421c56.DEFAULT_PRECISION),"number"!=typeof e&&(e=parseFloat(e)),0===t?e:parseFloat(e.toPrecision(t))},_0x421c56.rad=function(e){return e*Math.PI/180},_0x421c56.lastSeqID=0,_0x421c56.createUniqueID=function(e){return null==e&&(e="id_"),_0x421c56.lastSeqID+=1,e+_0x421c56.lastSeqID},_0x421c56.Browser=function(){var e,t="",i="",n="pc",r=navigator.userAgent.toLowerCase();return r.indexOf("msie")>-1||r.indexOf("trident")>-1&&r.indexOf("rv")>-1?(t="msie",e=r.match(/msie ([\d.]+)/)||r.match(/rv:([\d.]+)/)):r.indexOf("chrome")>-1?(t="chrome",e=r.match(/chrome\/([\d.]+)/)):r.indexOf("firefox")>-1?(t="firefox",e=r.match(/firefox\/([\d.]+)/)):r.indexOf("opera")>-1?(t="opera",e=r.match(/version\/([\d.]+)/)):r.indexOf("safari")>-1&&(t="safari",e=r.match(/version\/([\d.]+)/)),i=e?e[1]:"",r.indexOf("ipad")>-1||r.indexOf("ipod")>-1||r.indexOf("iphone")>-1?n="apple":r.indexOf("android")>-1&&(i=(e=r.match(/version\/([\d.]+)/))?e[1]:"",n="android"),{name:t,version:i,device:n}},_0x421c56.getBrowser=function(){var e,t="",i="",n="pc",r=navigator.userAgent.toLowerCase();return r.indexOf("msie")>-1||r.indexOf("trident")>-1&&r.indexOf("rv")>-1?(t="msie",e=r.match(/msie ([\d.]+)/)||r.match(/rv:([\d.]+)/)):r.indexOf("chrome")>-1?(t="chrome",e=r.match(/chrome\/([\d.]+)/)):r.indexOf("firefox")>-1?(t="firefox",e=r.match(/firefox\/([\d.]+)/)):r.indexOf("opera")>-1?(t="opera",e=r.match(/version\/([\d.]+)/)):r.indexOf("safari")>-1&&(t="safari",e=r.match(/version\/([\d.]+)/)),i=e?e[1]:"",r.indexOf("ipad")>-1||r.indexOf("ipod")>-1||r.indexOf("iphone")>-1?n="apple":r.indexOf("android")>-1&&(i=(e=r.match(/version\/([\d.]+)/))?e[1]:"",n="android"),{name:t,version:i,device:n}},_0x421c56.isSupportCanvas=function(){var e=!0,t=_0x421c56.getBrowser();return document.createElement("canvas").getContext?("firefox"===t.name&&parseFloat(t.version)<5&&(e=!1),"safari"===t.name&&parseFloat(t.version)<4&&(e=!1),"opera"===t.name&&parseFloat(t.version)<10&&(e=!1),"msie"===t.name&&parseFloat(t.version)<9&&(e=!1)):e=!1,e},_0x421c56.supportCanvas=function(){return _0x421c56.isSupportCanvas},_0x421c56.isInTheSameDomain=function(e){if(!e)return!0;var t=e.indexOf("//"),i=document.location.toString(),n=i.indexOf("//");if(-1===t)return!0;var r,o=r=e.substring(0,t),a=i.substring(n+2);n=a.indexOf("/");var s=a.indexOf(":"),l=a.substring(0,n),u=document.location.protocol;if(-1!==s||(l+=":"+("http:"===u.toLowerCase()?80:443)),u.toLowerCase()!==o.toLowerCase())return!1;var c=(o=e.substring(t+2)).indexOf(":");t=o.indexOf("/");var h,d=o.substring(0,t);return-1!==c?h=o.substring(0,c):(h=o.substring(0,t),d+=":"+("http:"===r.toLowerCase()?80:443)),h===document.domain&&d===l},_0x421c56.calculateDpi=function(e,t,i,n,r){if(e&&t&&i){var o,a=1e4,s=e.getWidth(),l=e.getHeight(),u=t.w,c=t.h;if(r=r||6378137,"degree"===(n=n||"degrees").toLowerCase()||"degrees"===n.toLowerCase()||"dd"===n.toLowerCase()){let e=s/u,t=l/c;o=254/(e>t?e:t)/i/(2*Math.PI*r/360)/a}else{o=254/(s/u)/i/a}return o}},_0x421c56.toJSON=function(e){var t=e;if(null==t)return null;switch(t.constructor){case String:return t=(t=(t=(t=(t=(t=(t='"'+t.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%25")).replace(/&/g,"%26");case Array:for(var i=[],n=0,r=t.length;n<r;n++)i.push(_0x421c56.toJSON(t[n]));return"["+i.join(",")+"]";case Number:return isFinite(t)?String(t):null;case Boolean:return String(t);case Date:return"{'__type':\"System.DateTime\",'Year':"+t.getFullYear()+",'Month':"+(t.getMonth()+1)+",'Day':"+t.getDate()+",'Hour':"+t.getHours()+",'Minute':"+t.getMinutes()+",'Second':"+t.getSeconds()+",'Millisecond':"+t.getMilliseconds()+",'TimezoneOffset':"+t.getTimezoneOffset()+"}";default:if(null!=t.toJSON&&"function"==typeof t.toJSON)return t.toJSON();if("object"==typeof t){if(t.length){let e=[];for(let i=0,n=t.length;i<n;i++)e.push(_0x421c56.toJSON(t[i]));return"["+e.join(",")+"]"}let e=[];for(let i in t)"function"!=typeof t[i]&&"CLASS_NAME"!==i&&"parent"!==i&&e.push("'"+i+"':"+_0x421c56.toJSON(t[i]));return e.length>0?"{"+e.join(",")+"}":"{}"}return t.toString()}},_0x421c56.getScaleFromResolutionDpi=function(e,t,i,n){var r=1e4;return n=n||6378137,i=i||"",e>0&&t>0?"degree"===i.toLowerCase()||"degrees"===i.toLowerCase()||"dd"===i.toLowerCase()?254/t/e/(2*Math.PI*n/360)/r:254/t/e/r:-1},_0x421c56.transformResult=function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},_0x421c56.copyAttributes=function(e,t){if(e=e||{},t)for(var i in t){var n=t[i];void 0!==n&&"CLASS_NAME"!==i&&"function"!=typeof n&&(e[i]=n)}return e},_0x421c56.copyAttributesWithClip=function(e,t,i){if(e=e||{},t)for(var n in t){var r=!1;if(i&&i.length)for(var o=0,a=i.length;o<a;o++)if(n===i[o]){r=!0;break}if(!0!==r){var s=t[n];void 0!==s&&"CLASS_NAME"!==n&&"function"!=typeof s&&(e[n]=s)}}return e},_0x421c56.cloneObject=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Date){let t=new Date;return t.setTime(e.getTime()),t}if(e instanceof Array)return e.slice(0);if(e instanceof Object){let i={};for(var t in e)e.hasOwnProperty(t)&&(i[t]=_0x421c56.cloneObject(e[t]));return i}throw new Error("Unable to copy obj! Its type isn't supported.")},_0x421c56.getTextBounds=function(e,t,i){document.body.appendChild(i),i.style.width="auto",i.style.height="auto",e.fontSize&&(i.style.fontSize=e.fontSize),e.fontFamily&&(i.style.fontFamily=e.fontFamily),e.fontWeight&&(i.style.fontWeight=e.fontWeight),i.style.position="relative",i.style.visibility="hidden",i.style.display="inline-block",i.innerHTML=t;var n=i.clientWidth,r=i.clientHeight;return document.body.removeChild(i),{textWidth:n,textHeight:r}},_0x421c56.RequestJSONPPromise={limitLength:1500,queryKeys:[],queryValues:[],supermap_callbacks:{},addQueryStrings:function(e){for(var t in e){this.queryKeys.push(t),"string"!=typeof e[t]&&(e[t]=Util.toJSON(e[t]));var i=encodeURIComponent(e[t]);this.queryValues.push(i)}},issue:function(e){for(var t=this,i=t.getUid(),n=e.url,r=[],o=new Promise((function(e){t.supermap_callbacks[i]=function(n){delete t.supermap_callbacks[i],e(n)}})),a=n,s=0,l=t.queryKeys?t.queryKeys.length:0,u=0;u<l;u++)if(a.length+t.queryKeys[u].length+2>=t.limitLength){if(0==s)return!1;r.push(a),a=n,s=0,u--}else if(a.length+t.queryKeys[u].length+2+t.queryValues[u].length>t.limitLength)for(var c=t.queryValues[u];c.length>0;){var h=t.limitLength-a.length-t.queryKeys[u].length-2;a.indexOf("?")>-1?a+="&":a+="?";var d=c.substring(0,h);"%"===d.substring(h-1,h)?(h-=1,d=c.substring(0,h)):"%"===d.substring(h-2,h-1)&&(h-=2,d=c.substring(0,h)),a+=t.queryKeys[u]+"="+d,c=c.substring(h),d.length>0&&(r.push(a),a=n,s=0)}else s++,a.indexOf("?")>-1?a+="&":a+="?",a+=t.queryKeys[u]+"="+t.queryValues[u];return r.push(a),t.send(r,"Util.RequestJSONPPromise.supermap_callbacks["+i+"]",e&&e.proxy),o},getUid:function(){return 1e3*(new Date).getTime()+Math.floor(1e17*Math.random())},send:function(e,t,i){var n=e.length;if(n>0)for(var r=(new Date).getTime(),o=0;o<n;o++){var a=e[o];a.indexOf("?")>-1?a+="&":a+="?",a+="sectionCount="+n,a+="§ionIndex="+o,a+="&jsonpUserID="+r,i&&(a=decodeURIComponent(a),a=i+encodeURIComponent(a)),fetchJsonp(a,{jsonpCallbackFunction:t,timeout:3e4})}},GET:function(e){var t=this;return t.queryKeys.length=0,t.queryValues.length=0,t.addQueryStrings(e.params),t.issue(e)},POST:function(e){var t=this;return t.queryKeys.length=0,t.queryValues.length=0,t.addQueryStrings({requestEntity:e.data}),t.issue(e)},PUT:function(e){var t=this;return t.queryKeys.length=0,t.queryValues.length=0,t.addQueryStrings({requestEntity:e.data}),t.issue(e)},DELETE:function(e){var t=this;return t.queryKeys.length=0,t.queryValues.length=0,t.addQueryStrings({requestEntity:e.data}),t.issue(e)}},_0x421c56.urlPathAppend=function(e,t){let i=e;if(!t)return i;0===t.indexOf("/")&&(t=t.substring(1));const n=e.split("?");return n[0].indexOf("/",n[0].length-1)<0&&(n[0]+="/"),i=""+n[0]+t+(n.length>1?"?"+n[1]:""),i};var _0x923b90={observers:!1,KEY_SPACE:32,KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(e){return e.target||e.srcElement},isSingleTouch:function(e){return e.touches&&1===e.touches.length},isMultiTouch:function(e){return e.touches&&e.touches.length>1},isLeftClick:function(e){return e.which&&1===e.which||e.button&&1===e.button},isRightClick:function(e){return e.which&&3===e.which||e.button&&2===e.button},stop:function(e,t){t||(e.preventDefault?e.preventDefault():e.returnValue=!1),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},findElement:function(e,t){for(var i=_0x923b90.element(e);i.parentNode&&(!i.tagName||i.tagName.toUpperCase()!=t.toUpperCase());)i=i.parentNode;return i},observe:function(e,t,i,n){var r,o=(r=!0,function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}),a=function(){var e=o(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var t=!0;return function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}}(),s=function(){var e=a(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var t=!0;return function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}}(),l=s(this,(function(){return l.toString().search("(((.+)+)+)+$").toString().constructor(l).search("(((.+)+)+)+$")}));l();var u=_0x421c56.getElement(e);if(n=n||!1,"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||u.attachEvent)&&(t="keydown"),this.observers||(this.observers={}),!u._eventCacheID){var c="eventCacheID_";u.id&&(c=u.id+"_"+c),u._eventCacheID=_0x421c56.createUniqueID(c)}var h=u._eventCacheID;this.observers[h]||(this.observers[h]=[]),this.observers[h].push({element:u,name:t,observer:i,useCapture:n}),u.addEventListener?u.addEventListener(t,i,n):u.attachEvent&&u.attachEvent("on"+t,i)},stopObservingElement:function(e){var t=_0x421c56.getElement(e)._eventCacheID;this._removeElementObservers(_0x923b90.observers[t])},_removeElementObservers:function(e){if(e)for(var t=e.length-1;t>=0;t--){var i=e[t],n=new Array(i.element,i.name,i.observer,i.useCapture);_0x923b90.stopObserving.apply(this,n)}},stopObserving:function(e,t,i,n){n=n||!1;var r=_0x421c56.getElement(e),o=r._eventCacheID;"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||r.detachEvent)&&(t="keydown");var a=!1,s=_0x923b90.observers[o];if(s)for(var l=0;!a&&l<s.length;){var u=s[l];if(u.name===t&&u.observer===i&&u.useCapture===n){s.splice(l,1),0==s.length&&delete _0x923b90.observers[o],a=!0;break}l++}return a&&(r.removeEventListener?r.removeEventListener(t,i,n):r&&r.detachEvent&&r.detachEvent("on"+t,i)),a},unloadCache:function(){if(_0x923b90&&_0x923b90.observers){for(var e in _0x923b90.observers){var t=_0x923b90.observers[e];_0x923b90._removeElementObservers.apply(this,[t])}_0x923b90.observers=!1}},CLASS_NAME:"SuperMap.PlotEvent"};_0x923b90.observe(window,"unload",_0x923b90.unloadCache,!1);var _0x3a52ac=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x31d12b=_0x3a52ac(void 0,(function(){return _0x31d12b.toString().search("(((.+)+)+)+$").toString().constructor(_0x31d12b).search("(((.+)+)+)+$")}));_0x31d12b();class _0x47e9d7{constructor(e,t,i,n,r){if(this.BROWSER_EVENTS=["mouseover","mouseout","mousedown","mouseup","mousemove","click","dblclick","rightclick","dblrightclick","resize","focus","blur","touchstart","touchmove","touchend","keydown","MSPointerDown","MSPointerUp","pointerdown","pointerup","MSGestureStart","MSGestureChange","MSGestureEnd","contextmenu"],this.listeners={},this.object=e,this.element=null,this.eventTypes=[],this.eventHandler=null,this.fallThrough=n,this.includeXY=!1,this.extensions={},this.extensionCount={},this.clearMouseListener=null,this.extend(this,r),null!=i)for(var o=0,a=i.length;o<a;o++)this.addEventType(i[o]);null!=t&&this.attachToElement(t),this.CLASS_NAME="SuperMap.Events"}destroy(){for(var e in this.extensions)"boolean"!=typeof this.extensions[e]&&this.extensions[e].destroy();this.extensions=null,this.element&&(_0x923b90.stopObservingElement(this.element),this.element.hasScrollEvent&&_0x923b90.stopObserving(window,"scroll",this.clearMouseListener)),this.element=null,this.listeners=null,this.object=null,this.eventTypes=null,this.fallThrough=null,this.eventHandler=null}addEventType(e){this.listeners[e]||(this.eventTypes.push(e),this.listeners[e]=[])}attachToElement(e){this.element?_0x923b90.stopObservingElement(this.element):(this.eventHandler=FunctionExt.bindAsEventListener(this.handleBrowserEvent,this),this.clearMouseListener=FunctionExt.bind(this.clearMouseCache,this)),this.element=e;for(var t=0,i=this.BROWSER_EVENTS.length;t<i;t++){var n=this.BROWSER_EVENTS[t];this.addEventType(n),_0x923b90.observe(e,n,this.eventHandler)}_0x923b90.observe(e,"dragstart",_0x923b90.stop)}on(e){for(var t in e)"scope"!==t&&void 0!==e[t]&&this.register(t,e.scope,e[t])}register(e,t,i,n){if(e in _0x47e9d7&&!this.extensions[e]&&(this.extensions[e]=new _0x47e9d7[e](this)),null!=i&&-1!==_0x421c56.indexOf(this.eventTypes,e)){null==t&&(t=this.object);var r=this.listeners[e];r||(r=[],this.listeners[e]=r,this.extensionCount[e]=0);var o={obj:t,func:i};n?(r.splice(this.extensionCount[e],0,o),"object"===Events_typeof(n)&&n.extension&&this.extensionCount[e]++):r.push(o)}}registerPriority(e,t,i){this.register(e,t,i,!0)}un(e){for(var t in e)"scope"!==t&&void 0!==e.type&&this.unregister(t,e.scope,e[t])}unregister(e,t,i){null==t&&(t=this.object);var n=this.listeners[e];if(null!=n)for(var r=0,o=n.length;r<o;r++)if(n[r].obj===t&&n[r].func===i){n.splice(r,1);break}}remove(e){null!=this.listeners[e]&&(this.listeners[e]=[])}triggerEvent(e,t){var i=this.listeners[e];if(i&&0!=i.length){null==t&&(t={}),t.object=this.object,t.element=this.element,t.type||(t.type=e);for(var n,r=0,o=(i=i.slice()).length;r<o;r++){var a=i[r];if(null!=(n=a.func.apply(a.obj,[t]))&&!1===n)break}return this.fallThrough||_0x923b90.stop(t,!0),n}}handleBrowserEvent(e){var t=e.type,i=this.listeners[t];if(i&&0!=i.length){var n=e.touches;if(n&&n[0]){for(var r,o=0,a=0,s=n.length,l=0;l<s;++l)o+=(r=n[l]).clientX,a+=r.clientY;e.clientX=o/s,e.clientY=a/s}this.includeXY&&(e.xy=this.getMousePosition(e)),this.triggerEvent(t,e)}}clearMouseCache(){this.element.scrolls=null,this.element.lefttop=null;var e=document.body;e&&(0==e.scrollTop&&0==e.scrollLeft||!navigator.userAgent.match(/iPhone/i))&&(this.element.offsets=null)}getMousePosition(e){if(this.includeXY?this.element.hasScrollEvent||(_0x923b90.observe(window,"scroll",this.clearMouseListener),this.element.hasScrollEvent=!0):this.clearMouseCache(),!this.element.scrolls){var t=_0x421c56.getViewportElement();this.element.scrolls=[t.scrollLeft,t.scrollTop]}return this.element.lefttop||(this.element.lefttop=[document.documentElement.clientLeft||0,document.documentElement.clientTop||0]),this.element.offsets||(this.element.offsets=_0x421c56.pagePosition(this.element)),new Pixel(e.clientX+this.element.scrolls[0]-this.element.offsets[0]-this.element.lefttop[0],e.clientY+this.element.scrolls[1]-this.element.offsets[1]-this.element.lefttop[1])}extend(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&void 0!==t.toString&&(e.toString=t.toString)}return e}}var _0x3f3b92=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x5a72a3=_0x3f3b92(void 0,(function(){return _0x5a72a3.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a72a3).search("(((.+)+)+)+$")}));_0x5a72a3();class _0x3f233c{constructor(e,t){this.value=e||"",this.name=t||"token",this.CLASS_NAME="SuperMap.PlotCredential"}getUrlParameters(){return this.name+"="+this.value}getValue(){return this.value}destroy(){this.value=null,this.name=null}}var _0x57c212=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x223b07=_0x57c212(void 0,(function(){return _0x223b07.toString().search("(((.+)+)+)+$").toString().constructor(_0x223b07).search("(((.+)+)+)+$")}));_0x223b07();var _0x596ae9={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function _0x3dfb48(){return"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random())}function _0x2142ec(e){try{delete window[e]}catch{window[e]=void 0}}function _0x563dd8(e){var t=document.getElementById(e);t&&document.getElementsByTagName("head")[0].removeChild(t)}var _0x372214=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=e,n=t.timeout||_0x596ae9.timeout,r=t.jsonpCallback||_0x596ae9.jsonpCallback,o=void 0;return new Promise((function(a,s){var l=t.jsonpCallbackFunction||_0x3dfb48(),u=r+"_"+l;window[l]=function(e){a({ok:!0,json:function(){return Promise.resolve(e)}}),o&&clearTimeout(o),_0x563dd8(u),_0x2142ec(l)},i+=-1===i.indexOf("?")?"?":"&";var c=document.createElement("script");c.setAttribute("src",""+i+r+"="+l),t.charset&&c.setAttribute("charset",t.charset),c.id=u,document.getElementsByTagName("head")[0].appendChild(c),o=setTimeout((function(){s(new Error("JSONP request to "+e+" timed out")),_0x2142ec(l),_0x563dd8(u),window[l]=function(){_0x2142ec(l)}}),n),c.onerror=function(){s(new Error("JSONP request to "+e+" failed")),_0x2142ec(l),_0x563dd8(u),o&&clearTimeout(o)}}))},_0x1a2bf8=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x36625a=_0x1a2bf8(void 0,(function(){return _0x36625a.toString().search("(((.+)+)+)+$").toString().constructor(_0x36625a).search("(((.+)+)+)+$")}));_0x36625a();const _0x2c92dc=window.fetch;window.setCORS=function(e){window.CORS=e};var isCORS=window.isCORS=function(){return null!=window.CORS?window.CORS:window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest};window.setRequestTimeout=function(e){return window.RequestTimeout=e};var getRequestTimeout=window.getRequestTimeout=function(){return window.RequestTimeout||45e3},_0x5a12e5={commit:function(e,t,i,n){switch(e=e&&e.toUpperCase()){case"GET":default:return this.get(t,i,n);case"POST":return this.post(t,i,n);case"PUT":return this.put(t,i,n);case"DELETE":return this.delete(t,i,n)}},supportDirectRequest:function(e,t){return!!_0x421c56.isInTheSameDomain(e)||(null!=t.crossOrigin?t.crossOrigin:isCORS()||t.proxy)},get:function(e,t,i){i=i||{};if(e=_0x421c56.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,i),!this.supportDirectRequest(e,i)){var n={url:e=e.replace(".json",".jsonp"),data:t};return _0x421c56.RequestJSONPPromise.GET(n)}return this.urlIsLong(e)?this._postSimulatie("GET",e.substring(0,e.indexOf("?")-1),t,i):this._fetch(e,t,i,"GET")},delete:function(e,t,i){i=i||{};var n="DELETE";if(e=_0x421c56.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,i),!this.supportDirectRequest(e,i)){e=e.replace(".json",".jsonp");var r={url:e+="&_method=DELETE",data:t};return _0x421c56.RequestJSONPPromise.DELETE(r)}return this.urlIsLong(e)?this._postSimulatie(n,e.substring(0,e.indexOf("?")-1),t,i):this._fetch(e,t,i,n)},post:function(e,t,i){if(i=i||{},!this.supportDirectRequest(e,i)){e=e.replace(".json",".jsonp");var n={url:e+="&_method=POST",data:t};return _0x421c56.RequestJSONPPromise.POST(n)}return this._fetch(this._processUrl(e,i),t,i,"POST")},put:function(e,t,i){if(i=i||{},e=this._processUrl(e,i),!this.supportDirectRequest(e,i)){e=e.replace(".json",".jsonp");var n={url:e+="&_method=PUT",data:t};return _0x421c56.RequestJSONPPromise.PUT(n)}return this._fetch(e,t,i,"PUT")},urlIsLong:function(e){for(var t=0,i=null,n=0,r=e.length;n<r;n++)(i=e.charCodeAt(n))<127?t++:128<=i&&i<=2047?t+=2:2048<=i&&i<=65535&&(t+=3);return!(t<2e3)},_postSimulatie:function(e,t,i,n){var r=t.indexOf("?")>-1?"&":"?";return t+=r+"_method="+e,"string"!=typeof i&&(i=JSON.stringify(i)),this.post(t,i,n)},_processUrl:function(e,t){if(this._isMVTRequest(e))return e;if(-1===e.indexOf(".json")&&!t.withoutFormatSuffix)if(e.indexOf("?")<0)e+=".json";else{var i=e.split("?");2===i.length&&(e=i[0]+".json?"+i[1])}return t&&t.proxy&&("function"==typeof t.proxy?e=t.proxy(e):(e=decodeURIComponent(e),e=t.proxy+encodeURIComponent(e))),e},_fetch:function(e,t,i,n){return(i=i||{}).headers=i.headers||{},!i.headers["Content-Type"]&&!FormData.prototype.isPrototypeOf(t)&&(i.headers["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8"),i.timeout?this._timeout(i.timeout,_0x2c92dc(e,{method:n,headers:i.headers,body:"PUT"===n||"POST"===n?t:void 0,credentials:this._getWithCredentials(i),mode:"cors",timeout:getRequestTimeout()}).then((function(e){return e}))):_0x2c92dc(e,{method:n,body:"PUT"===n||"POST"===n?t:void 0,headers:i.headers,credentials:this._getWithCredentials(i),mode:"cors",timeout:getRequestTimeout()}).then((function(e){return e}))},_getWithCredentials:function(e){return!0===e.withCredentials?"include":!1===e.withCredentials?"omit":"same-origin"},_fetchJsonp:function(e,t){return t=t||{},_0x372214()(e,{method:"GET",timeout:t.timeout}).then((function(e){return e}))},_timeout:function(e,t){return new Promise((function(i,n){setTimeout((function(){n(new Error("timeout"))}),e),t.then(i,n)}))},_getParameterString:function(e){var t=[];for(var i in e){var n,r=e[i];if(null!=r&&"function"!=typeof r)n=Array.isArray(r)||"[object Object]"===r.toString()?encodeURIComponent(JSON.stringify(r)):encodeURIComponent(r),t.push(encodeURIComponent(i)+"="+n)}return t.join("&")},_isMVTRequest:function(e){return e.indexOf(".mvt")>-1||e.indexOf(".pbf")>-1}},_0x1765d0=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x5a0937=_0x1765d0(void 0,(function(){return _0x5a0937.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a0937).search("(((.+)+)+)+$")}));function _0x1f1377(){}_0x5a0937(),_0x1f1377.bind=function(e,t){var i=Array.prototype.slice.apply(arguments,[2]);return function(){var n=i.concat(Array.prototype.slice.apply(arguments,[0]));return e.apply(t,n)}},_0x1f1377.bindAsEventListener=function(e,t){return function(i){return e.call(t,i||window.event)}},_0x1f1377.False=function(){return!1},_0x1f1377.True=function(){return!0},_0x1f1377.Void=function(){};var _0x4a62eb=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1390b3=_0x4a62eb(void 0,(function(){return _0x1390b3.toString().search("(((.+)+)+)+$").toString().constructor(_0x1390b3).search("(((.+)+)+)+$")}));_0x1390b3();class _0x478df2{constructor(e){this.data=null,this.keepData=!1,_0x421c56.extend(this,e),this.options=e,this.CLASS_NAME="SuperMap.Format"}destroy(){}read(e){}write(e){}}var _0x86971a=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x172e4b=_0x86971a(void 0,(function(){return _0x172e4b.toString().search("(((.+)+)+)+$").toString().constructor(_0x172e4b).search("(((.+)+)+)+$")}));_0x172e4b();class _0x6ca727 extends _0x478df2{constructor(e){super(e),this.indent=" ",this.space=" ",this.newline="\n",this.level=0,this.pretty=!1,this.nativeJSON=!(!window.JSON||"function"!=typeof JSON.parse||"function"!=typeof JSON.stringify),this.CLASS_NAME="SuperMap.Format.JSON",this.serialize={object:function(e){if(null==e)return"null";if(e.constructor===Date)return this.serialize.date.apply(this,[e]);if(e.constructor===Array)return this.serialize.array.apply(this,[e]);var t=["{"];this.level+=1;var i,n,r,o=!1;for(i in e)e.hasOwnProperty(i)&&(n=this.write.apply(this,[i,this.pretty]),r=this.write.apply(this,[e[i],this.pretty]),null!=n&&null!=r&&(o&&t.push(","),t.push(this.writeNewline(),this.writeIndent(),n,":",this.writeSpace(),r),o=!0));return this.level-=1,t.push(this.writeNewline(),this.writeIndent(),"}"),t.join("")},array:function(e){var t,i=["["];this.level+=1;for(var n=0,r=e.length;n<r;++n)null!=(t=this.write.apply(this,[e[n],this.pretty]))&&(n>0&&i.push(","),i.push(this.writeNewline(),this.writeIndent(),t));return this.level-=1,i.push(this.writeNewline(),this.writeIndent(),"]"),i.join("")},string:function(e){var t={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return/["\\\x00-\x1f]/.test(e)?'"'+e.replace(/([\x00-\x1f\\"])/g,(function(e,i){var n=t[i];return n||(n=i.charCodeAt(),"\\u00"+Math.floor(n/16).toString(16)+(n%16).toString(16))}))+'"':'"'+e+'"'},number:function(e){return isFinite(e)?String(e):"null"},boolean:function(e){return String(e)},date:function(e){function t(e){return e<10?"0"+e:e}return'"'+e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())+"T"+t(e.getHours())+":"+t(e.getMinutes())+":"+t(e.getSeconds())+'"'}}}read(e,t){var i;if(this.nativeJSON)try{i=JSON.parse(e,t)}catch{}return this.keepData&&(this.data=i),i}write(e,t){this.pretty=!!t;var i=null,n=typeof e;if(this.serialize[n])try{i=!this.pretty&&this.nativeJSON?JSON.stringify(e):this.serialize[n].apply(this,[e])}catch{}return i}writeIndent(){var e=[];if(this.pretty)for(var t=0;t<this.level;++t)e.push(this.indent);return e.join("")}writeNewline(){return this.pretty?this.newline:""}writeSpace(){return this.pretty?this.space:""}}var _0x5d00d2=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x581add=_0x5d00d2(void 0,(function(){return _0x581add.toString().search("(((.+)+)+)+$").toString().constructor(_0x581add).search("(((.+)+)+)+$")}));_0x581add();class _0x36bd7a{constructor(e,t){var i=this;this.EVENT_TYPES=["processCompleted","processFailed"],this.events=null,this.eventListeners=null,this.url=null,this.urls=null,this.proxy=null,this.index=null,this.length=null,this.options=null,this.totalTimes=null,this.POLLING_TIMES=3,this._processSuccess=null,this._processFailed=null,this.isInTheSameDomain=null,this.withCredentials=!1,Array.isArray(e)?(i.urls=e,i.length=e.length,i.totalTimes=i.length,1===i.length?i.url=e[0]:(i.index=parseInt(Math.random()*i.length),i.url=e[i.index])):(i.totalTimes=1,i.url=e),Array.isArray(e)&&!i.isServiceSupportPolling()&&(i.url=e[0],i.totalTimes=1),t=t||{},this.crossOrigin=t.crossOrigin,this.headers=t.headers,this.extend(this,t),i.isInTheSameDomain=this.isInTheSameDomainFnc(i.url),i.events=new _0x47e9d7(i,null,i.EVENT_TYPES,!0),i.eventListeners instanceof Object&&i.events.on(i.eventListeners),this.CLASS_NAME="SuperMap.CommonServiceBase"}destroy(){var e=this;_0x421c56.isArray(e.urls)&&(e.urls=null,e.index=null,e.length=null,e.totalTimes=null),e.url=null,e.options=null,e._processSuccess=null,e._processFailed=null,e.isInTheSameDomain=null,e.EVENT_TYPES=null,e.events&&(e.events.destroy(),e.events=null),e.eventListeners&&(e.eventListeners=null)}request(e){var t=this;e.url=e.url||t.url,e.proxy=e.proxy||t.proxy,e.withCredentials=null!=e.withCredentials?e.withCredentials:t.withCredentials,e.crossOrigin=null!=e.crossOrigin?e.crossOrigin:t.crossOrigin,e.headers=e.headers||t.headers,e.isInTheSameDomain=t.isInTheSameDomain,e.url=this.appendCredential(e.url),t.calculatePollingTimes(),t._processSuccess=e.success,t._processFailed=e.failure,e.scope=t,e.success=t.getUrlCompleted,e.failure=t.getUrlFailed,t.options=e,t._commit(t.options)}getUrlCompleted(e){this._processSuccess(e)}getUrlFailed(e){var t=this;t.totalTimes>0?(t.totalTimes--,t.ajaxPolling()):t._processFailed(e)}ajaxPolling(){var e=this,t=e.options.url,i=/^http:\/\/([a-z]{9}|(\d+\.){3}\d+):\d{0,4}/;e.index=parseInt(Math.random()*e.length),e.url=e.urls[e.index],t=t.replace(i,i.exec(e.url)[0]),e.options.url=t,e.options.isInTheSameDomain=this.isInTheSameDomainFnc(t),e._commit(e.options)}calculatePollingTimes(){var e=this;e.times?e.totalTimes>e.POLLING_TIMES?e.times>e.POLLING_TIMES?e.totalTimes=e.POLLING_TIMES:e.totalTimes=e.times:e.times<e.totalTimes&&(e.totalTimes=e.times):e.totalTimes>e.POLLING_TIMES&&(e.totalTimes=e.POLLING_TIMES),e.totalTimes--}isServiceSupportPolling(){return!("SuperMap.REST.ThemeService"===this.CLASS_NAME||"SuperMap.REST.EditFeaturesService"===this.CLASS_NAME)}serviceProcessCompleted(e){e=_0x421c56.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}serviceProcessFailed(e){var t=(e=_0x421c56.transformResult(e)).error||e;this.events.triggerEvent("processFailed",{error:t})}_commit(e){if("POST"===e.method||"PUT"===e.method||"PATCH"===e.method)if(e.params&&(e.url=_0x421c56.urlAppend(e.url,_0x421c56.getParameterString(e.params||{}))),"object"==typeof e.data)try{e.params=_0x421c56.toJSON(e.data)}catch{console.log("不是json对象")}else e.params=e.data;_0x5a12e5.commit(e.method,e.url,e.params,{headers:e.headers,withCredentials:e.withCredentials,crossOrigin:e.crossOrigin,timeout:e.async?0:null,proxy:e.proxy}).then((function(e){return e.text?e.text():e.json?e.json():e})).then((function(e){var t=e;return"string"==typeof e&&(t=(new _0x6ca727).read(e)),(!t||t.error||t.code>=300&&304!==t.code)&&(t=t&&t.error?{error:t.error}:{error:t}),t})).catch((function(e){return{error:e}})).then((function(t){t.error?(e.scope?_0x1f1377.bind(e.failure,e.scope):e.failure)(t):(t.succeed=null==t.succeed||t.succeed,(e.scope?_0x1f1377.bind(e.success,e.scope):e.success)(t))}))}isInTheSameDomainFnc(e){if(!e)return!0;var t=e.indexOf("//"),i=document.location.toString(),n=i.indexOf("//");if(-1===t)return!0;var r,o=r=e.substring(0,t),a=i.substring(n+2);n=a.indexOf("/");var s=a.indexOf(":"),l=a.substring(0,n),u=document.location.protocol;if(-1!==s||(l+=":"+("http:"===u.toLowerCase()?80:443)),u.toLowerCase()!==o.toLowerCase())return!1;var c=(o=e.substring(t+2)).indexOf(":");t=o.indexOf("/");var h,d=o.substring(0,t);return-1!==c?h=o.substring(0,c):(h=o.substring(0,t),d+=":"+("http:"===r.toLowerCase()?80:443)),h===document.domain&&d===l}extend(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&void 0!==t.toString&&(e.toString=t.toString)}return e}appendCredential(e){var t=e,i=this.getToken(e),n=i?new _0x3f233c(i,"token"):null;return n||(n=(i=this.getKey(e))?new _0x3f233c(i,"key"):null),n&&(t=this.urlAppend(t,n.getUrlParameters())),t}getToken(e){if(e){this.tokens=this.tokens||{};var t=this._getTokenStorageKey(e);return this.tokens[t]}}_getTokenStorageKey(e){var t=e.match(/(.*?):\/\/([^\/]+)/i);return t?t[0]:e}getKey(e){this.keys=this.keys||{};var t=this._getUrlRestString(e)||e;return this.keys[t]}_getUrlRestString(e){if(!e)return e;var t=e.match(/(http|https):\/\/(.*\/rest)/i);return t?t[0]:e}urlAppend(e,t){var i=e;if(t){0===t.indexOf("?")&&(t=t.substring(1));var n=(e+" ").split(/[?&]/);i+=" "===n.pop()?t:n.length?"&"+t:"?"+t}return i}}var _0x5d093f=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xd17bcb=_0x5d093f(void 0,(function(){return _0xd17bcb.toString().search("(((.+)+)+)+$").toString().constructor(_0xd17bcb).search("(((.+)+)+)+$")}));_0xd17bcb();class _0x407715 extends _0x36bd7a{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.PlotCommonServiceBase"}destroy(){super.destroy()}_commit(e){("POST"===e.method||"PUT"===e.method)&&(e.params&&(e.url=SuperMap.Util.urlAppend(e.url,SuperMap.Util.getParameterString(e.params||{}))),e.params=e.data),_0x5a12e5.commit(e.method,e.url,e.params,{headers:e.headers,withCredentials:e.withCredentials,crossOrigin:e.crossOrigin,timeout:e.async?0:null,proxy:e.proxy}).then((function(e){return e.text()})).then((function(t){var i=(new _0x6ca727).read(t);(i||(i={error:t}),i.error)?(e.scope?_0x1f1377.bind(e.failure,e.scope):e.failure)(i.error):(i.succeed=null==i.succeed||i.succeed,(e.scope?_0x1f1377.bind(e.success,e.scope):e.success)(i))}))}}var _0x973b3d=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x259a13=_0x973b3d(void 0,(function(){return _0x259a13.toString().search("(((.+)+)+)+$").toString().constructor(_0x259a13).search("(((.+)+)+)+$")}));_0x259a13();class _0x1f653e extends _0x407715{constructor(e,t){super(e,t),(t=t||{})&&this.extend(this,t);var i,n=this;i=n.url.substr(n.url.length-1,1),n.url+="/"==i?"symbolLibs.json?":"/symbolLibs.json?",this.CLASS_NAME="SuperMap.GetLibIDsService"}destroy(){super.destroy()}processAsync(){var e=this;e.request({method:"GET",data:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}extend(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&void 0!==t.toString&&(e.toString=t.toString)}return e}}var _0x5be68d=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xf5ed23=_0x5be68d(void 0,(function(){return _0xf5ed23.toString().search("(((.+)+)+)+$").toString().constructor(_0xf5ed23).search("(((.+)+)+)+$")}));_0xf5ed23();class GetLibInfoService extends _0x407715{constructor(e,t){super(e,t),(t=t||{})&&_0x421c56.extend(this,t);var i,n=this;i=n.url.substr(n.url.length-1,1),n.url+="/"==i?"symbolLibs/":"/symbolLibs/",this.CLASS_NAME="SuperMap.GetLibInfoService"}destroy(){super.destroy()}processAsync(e){var t=this;e&&null!==e.libID&&(t.libID=e.libID),t.url+=t.libID,t.url+=".json",t.request({method:"GET",data:null,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}var _0x2b2f85=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x4f9582=_0x2b2f85(void 0,(function(){return _0x4f9582.toString().search("(((.+)+)+)+$").toString().constructor(_0x4f9582).search("(((.+)+)+)+$")}));function _0x475bf3(e,t){this.options=t,this.url=e}_0x4f9582(),_0x475bf3.prototype.getLibIDs=function(e,t){var i=this;return t||(t=i),new _0x1f653e(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:t,processCompleted:e,processFailed:e}}).processAsync(),i},_0x475bf3.prototype.getLibInfo=function(e,t,i){var n=this;return i||(i=n),new GetLibInfoService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,serverType:n.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e),n};const _0x513df6=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x1ef57f=_0x513df6(void 0,(function(){return _0x1ef57f.toString().search("(((.+)+)+)+$").toString().constructor(_0x1ef57f).search("(((.+)+)+)+$")}));function _0x55b53a(e){e=e||{},this.libID=e.libID,this.code=e.code,this.inputPoints=e.inputPoints?e.inputPoints:null,this.symbolRank=e.symbolRank?e.symbolRank:0,this.negativeImage=!!e.negativeImage&&e.negativeImage,this.surroundLineType=e.surroundLineType?e.surroundLineType:0,this.subSymbols=e.subSymbols?e.subSymbols:null,this.scaleValues=e.scaleValues?e.scaleValues:null,this.scalePoints=e.scalePoints?e.scalePoints:null,this.newScalePoint=e.newScalePoint?e.newScalePoint:null,this.newScalePointIndex=e.newScalePointIndex?e.newScalePointIndex:0,this.CLASS_NAME="SuperMap.GetSymbolInfoParameters"}_0x1ef57f(),_0x55b53a.prototype.destroy=function(){var e=this;e.libID=null,e.code=null,e.inputPoints=null,e.symbolRank=null,e.negativeImage=null,e.surroundLineType=null,e.subSymbols=null,e.scaleValues=null,e.scalePoints=null,e.newScalePoint=null,e.newScalePointIndex=null},_0x55b53a.toUrlParameters=function(e){if(e&&null!==e.libID&&null!==e.code){var t="libID="+encodeURIComponent(e.libID)+"&code="+encodeURIComponent(e.code);if(e.inputPoints&&null!==e.inputPoints&&0!==e.inputPoints.length){let i="[";for(let t=0;t<e.inputPoints.length;t++)t===e.inputPoints.length-1?i+='{"x":'+e.inputPoints[t].x+', "y":'+e.inputPoints[t].y+"}]":i+='{"x":'+e.inputPoints[t].x+', "y":'+e.inputPoints[t].y+"},";t+="&inputPoints="+encodeURIComponent(i)}if(e.scalePoints&&null!==e.scalePoints&&0!==e.scalePoints.length){let i="[";for(let t=0;t<e.scalePoints.length;t++)t===e.scalePoints.length-1?i+='{"x":'+e.scalePoints[t].x+', "y":'+e.scalePoints[t].y+"}]":i+='{"x":'+e.scalePoints[t].x+', "y":'+e.scalePoints[t].y+"},";t+="&scalePoints="+encodeURIComponent(i)}if(e.scaleValues&&null!==e.scaleValues&&0!==e.scaleValues.length){let i="[";for(let t=0;t<e.scaleValues.length;t++)t===e.scaleValues.length-1?i+=e.scaleValues[t]+"]":i+=e.scaleValues[t]+",";t+="&scaleValues="+encodeURIComponent(i)}if(e.subSymbols&&null!==e.subSymbols&&0!==e.subSymbols.length){let i="[";for(let t=0;t<e.subSymbols.length;t++)t===e.subSymbols.length-1?i+=e.subSymbols[t].code+"]":i+=e.subSymbols[t].code+",";t+="&subSymbols="+encodeURIComponent(i)}return e.newScalePoint&&null!==e.newScalePoint&&(t+="&newScalePoint="+encodeURIComponent('{"x":'+e.newScalePoint.x+', "y":'+e.newScalePoint.y+"}")),e.newScalePointIndex&&null!==e.newScalePointIndex&&(t+="&newScalePointIndex="+encodeURIComponent(e.newScalePointIndex)),e.symbolRank&&null!==e.symbolRank&&(t+="&symbolRank="+encodeURIComponent(e.symbolRank)),e.negativeImage&&null!==e.negativeImage&&(t+="&negativeImage="+encodeURIComponent(e.negativeImage)),e.surroundLineType&&null!==e.surroundLineType&&(t+="&surroundLineType="+encodeURIComponent(e.surroundLineType)),t}};var _0x499208=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x228b38=_0x499208(void 0,(function(){return _0x228b38.toString().search("(((.+)+)+)+$").toString().constructor(_0x228b38).search("(((.+)+)+)+$")}));function _0x25447e(e){this.cachecompleted=new WebGLPlot.Event,this.cachedSymbolList={},this.needCacheList=[],this.symbolNames=null,this.symbolLibData=null,this.plottingID=e.plottingID,this.cachedSymbolOK=!1,e&&_0x421c56.extend(this,e),e&&e.url&&e.libID?(this.url=e.url,this.libID=e.libID):e&&e.symbolLibData&&(this.symbolLibData=e.symbolLibData,this.libID=this.symbolLibData.libID,this.initNeedCacheList())}_0x228b38(),_0x25447e.prototype.initNeedCacheList=function(){if(!this.symbolLibData||!this.symbolLibData.rootSymbolLibNode)return!1;this.initNeedCacheListForNode(this.symbolLibData.rootSymbolLibNode)},_0x25447e.prototype.initNeedCacheListForNode=function(e,t){for(var i=0;i<e.childNodeCount;i++)"SYMBOL_GROUP"===e.childNodes[i].symbolNodeType?this.initNeedCacheListForNode(e.childNodes[i]):"SYMBOL_NODE"===e.childNodes[i].symbolNodeType&&this.needCacheList.push(e.childNodes[i].symbolCode)},_0x25447e.prototype.destroy=function(){this.url=null,this.libID=null,this.symbolLibData=null},_0x25447e.prototype.cachedSymbols=function(){var e=this;if(0===this.needCacheList.length)return void this.cachecompleted.raiseEvent({success:!0});var t=this.needCacheList.slice();let i=0,n=setInterval((function(){if(i>=t.length)return clearInterval(n),e.cachecompleted.raiseEvent({success:!0}),void(e.cachedSymbolOK=!0);let r=WebGLPlot.getServerData(e.libID,t[i],void 0,e.plottingID);r&&e.cacheSymbolData(r),i++}),5)},_0x25447e.prototype.cacheSymbolData=function(e){var t=_0x421c56.indexOf(this.needCacheList,e.code);-1!==t&&(this.cachedSymbolList[e.code]=SuperMapAlgoPlot.PlottingUtil.cloneObject(e),this.needCacheList.splice(t,1))},_0x25447e.prototype.getClassFication=function(){return null===this.symbolLibData?null:this.symbolLibData.classFication},_0x25447e.prototype.getCreateTime=function(){return null===this.symbolLibData?null:this.symbolLibData.createTime},_0x25447e.prototype.getCreator=function(){return null===this.symbolLibData?null:this.symbolLibData.creator},_0x25447e.prototype.getModifyTime=function(){return null===this.symbolLibData?null:this.symbolLibData.modifyTime},_0x25447e.prototype.getRootSymbolIconUrl=function(){return null===this.symbolLibData?null:this.symbolLibData.rootSymbolIconUrl},_0x25447e.prototype.getRootSymbolInfo=function(){return null===this.symbolLibData?null:this.symbolLibData.rootSymbolLibNode},_0x25447e.prototype.getSymbolCount=function(){return null===this.symbolLibData?null:this.symbolLibData.symbolCount},_0x25447e.prototype.getSymbolData=function(e){var t=null;return this.cachedSymbolList.hasOwnProperty(e)&&(t=SuperMapAlgoPlot.PlottingUtil.cloneObject(this.cachedSymbolList[e])),t},_0x25447e.prototype.setSymbolData=function(e){this.cacheSymbolData(e)},_0x25447e.prototype.getSymbolLibID=function(){return this.libID},_0x25447e.prototype.getSymbolLibName=function(){return null===this.symbolLibData?null:this.symbolLibData.symbolLibName},_0x25447e.prototype.getSymbolName=function(e){return null===this.symbolLibData?"":(null===this.symbolNames&&(this.symbolNames={},this.getSymbolNameFromList(this.symbolLibData.rootSymbolLibNode)),this.symbolNames[e])},_0x25447e.prototype.getVersion=function(){return null===this.symbolLibData?null:this.symbolLibData.version},_0x25447e.prototype.querySymbolbyKey=function(e){return this.querySymbol(e,this.getRootSymbolInfo(),this.getRootSymbolIconUrl())},_0x25447e.prototype.querySymbol=function(e,t,i){var n=[];if("SYMBOL_GROUP"===t.symbolNodeType)for(var r=0;r<t.childNodes.length;r++)for(var o=i+"/"+t.symbolName,a=this.querySymbol(e,t.childNodes[r],o),s=0;s<a.length;s++)n.push(a[s]);else(e===t.symbolCode.toString()||-1!==t.symbolName.indexOf(e))&&(t.icon=i+"/"+t.symbolCode+".png",n.push(t));return n};var _0x1e791f=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1bf86d=_0x1e791f(void 0,(function(){return _0x1bf86d.toString().search("(((.+)+)+)+$").toString().constructor(_0x1bf86d).search("(((.+)+)+)+$")}));_0x1bf86d();class _0x4f9120{constructor(e){e=e||{},this.libID=e.libID,this.CLASS_NAME="SuperMap.GetLibInfoParameter"}destroy(){this.libID=null}}var _0x42b829=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x15809d=_0x42b829(void 0,(function(){return _0x15809d.toString().search("(((.+)+)+)+$").toString().constructor(_0x15809d).search("(((.+)+)+)+$")}));_0x15809d();var _0x141658=new Map;function _0x5dcc48(e,t){if(this.useServerData=!0,(!WebGLPlot.defined(e)||0===e.length)&&this.useServerData)throw new WebGLPlot.DeveloperError("url is required to initialize SymbolLibManager");this.url=e,this.libIDs=null,this.symbolLibs=[],this.symbolLibJsons=[],this.isInializeOK=!1,this.initializecompleted=new WebGLPlot.Event,this.cachecompleted=new WebGLPlot.Event,this.options={serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},t&&t.serviceParams&&_0x421c56.extend(this.options,t),(!this.useServerData||!e||0===e.length)&&this.loadLocalLib(),this.initializeAsync(!1)}_0x5dcc48.getInstance=function(e,t,i){let n=_0x141658.get(i);return!WebGLPlot.defined(n)&&WebGLPlot.defined(i)&&(n=new _0x5dcc48(e,t),n.plottingID=i,_0x141658.set(i,n)),n},_0x5dcc48.prototype.loadLocalLib=function(e){var t="js/plotPanelControl/LocalLib.json";WebGLPlot.defined(e)&&""!==e&&(t=e);var i=this;if(void 0===$.getJSON())throw new WebGLPlot.DeveloperError("jQuery is needed");$.getJSON(t,(function(e){(!WebGLPlot.defined(i.localSymbolLibData)||null===i.localSymbolLibData)&&(i.localSymbolLibData={}),i.localSymbolLibData[e.libID]=e}))},_0x5dcc48.prototype.initialize=function(e,t){this.url=e,null===this.libIDs&&(this.libIDs=[]),null===this.symbolLibs&&(this.symbolLibs=[]),null===this.symbolLibJsons&&(this.symbolLibJsons=[]),t&&_0x421c56.extend(this,t)},_0x5dcc48.prototype.destroy=function(){this.url=null,this.libIDs=[],this.symbolLibs=[],this.symbolLibJsons=[],this.isInializeOK=!1,this.isInitialize=!1,this.localSymbolLibData={}},_0x5dcc48.prototype.initializeAsync=function(e){this.isInitializeOK()?this.initializecompleted.raiseEvent({success:!0,libIDs:this.libIDs}):this.isInitialize||(this.isInitialize=!0,new _0x475bf3(this.url,this.options.serviceParams).getLibIDs((function(t){if(!t.result||!t.result.succeed)throw _0x5dcc48.prototype.libIDs=[],new WebGLPlot.DeveloperError("Plotting Server is required to initialize SymbolLibManager");if(null!==this.libIDs&&0!==this.libIDs.length)for(var i=0;i<this.libIDs.length;i++){for(var n=!1,r=0;r<t.result.length;r++)if(this.libIDs[i]===t.result[r]){n=!0;break}!1===n&&this.libIDs.slice(i,1)}else this.libIDs=t.result;WebGLPlot.defined(e)||(e=!1),this.initializeSymbolLib(e)}),this))},_0x5dcc48.prototype.initializeSymbolLib=function(e){let t=this;for(var i=this.libIDs.slice(),n=0,r=this.libIDs.length;n<r;n++){let r=this.libIDs[n];var o=new _0x4f9120;o.libID=r,new _0x475bf3(this.url,this.options.serviceParams).getLibInfo(o,(function(n){if(n.result.succeed){var o=_0x421c56.indexOf(i,n.result.libID);if(-1!==o){i.splice(o,1);var a=t.getSymbolLibByLibId(r);WebGLPlot.defined(a)||(t.symbolLibJsons.push(n.result),(a=new _0x25447e({symbolLibData:n.result,plottingID:t.plottingID})).url=t.url,t.symbolLibs.push(a)),e&&a.cachedSymbols()}0===i.length&&(t.isInializeOK=!0,t.initializecompleted.raiseEvent({success:!0,libIDs:t.libIDs}))}}),this)}},_0x5dcc48.prototype.findSymbolByCode=function(e){for(var t=[],i=0;i<this.libIDs.length;i++)for(var n=this.getSymbolLibByLibId(this.libIDs[i]).querySymbolbyKey(e.toString()),r=0;r<n.length;r++)t.push(n[r]);return t},_0x5dcc48.prototype.findSymbolByName=function(e){for(var t=[],i=0;i<this.libIDs.length;i++)for(var n=this.getSymbolLibByLibId(this.libIDs[i]).querySymbolbyKey(e),r=0;r<n.length;r++)t.push(n[r]);return t},_0x5dcc48.prototype.getSymbolLibByIndex=function(e){return e>=this.libIDs.length?null:this.symbolLibs[e]},_0x5dcc48.prototype.getSymbolLibByLibId=function(e){for(var t=0;t<this.symbolLibs.length;t++)if(e===this.symbolLibs[t].libID)return this.symbolLibs[t];return null},_0x5dcc48.prototype.getSymbolLibID=function(e){return e>=this.libIDs.length?-1:this.libIDs[e]},_0x5dcc48.prototype.getSymbolLibJSONInfo=function(e){return e>=this.libIDs.length?null:this.symbolLibJsons[e]},_0x5dcc48.prototype.getSymbolLibNumber=function(){return this.libIDs.length},_0x5dcc48.prototype.getSymbolName=function(e,t){var i=this.getSymbolLibByLibId(e);return null===i?"":i.getSymbolName(t)},_0x5dcc48.prototype.getSymbolData=function(e,t){var i=this.getSymbolLibByLibId(e);return null===i?null:i.getSymbolData(t)},_0x5dcc48.prototype.setSymbolData=function(e,t){var i=this.getSymbolLibByLibId(e);if(null!==i&&WebGLPlot.defined(t)&&null!==t)i&&i.setSymbolData(t);else{var n=new _0x4f9120;n.libID=e;let r=this;new _0x475bf3(this.url,this.options.serviceParams).getLibInfo(n,(function(e){e.result.succeed&&-1!==e.result.libID&&(r.symbolLibJsons.push(e.result),(i=new _0x25447e({symbolLibData:e.result,plottingID:r.plottingID})).url=r.url,i.setSymbolData(t),r.symbolLibs.push(i))}),this)}},_0x5dcc48.prototype.isInitializeOK=function(){return this.isInializeOK},_0x5dcc48.prototype.cacheSymbolLib=function(e){var t=this,i=this.getSymbolLibByLibId(e);i.cachecompleted.addEventListener((function(e){t.cachecompleted.raiseEvent({success:!0})})),null!==i&&i.cachedSymbols()};var _0x2f1dfd=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xf84d3d=_0x2f1dfd(void 0,(function(){return _0xf84d3d.toString().search("(((.+)+)+)+$").toString().constructor(_0xf84d3d).search("(((.+)+)+)+$")}));_0xf84d3d();var WebGLPlot$b=window.WebGLPlot=window.WebGLPlot||{};function _0xac664c(e,t,i){try{SuperMapAlgoPlot}catch{throw new WebGLPlot$b.DeveloperError("need include Build/Cesium/ThirdParty/Workers/PlotAlgo/PlotAlgoInclude.js ")}this._plottingID="PlottingID"+WebGLPlot$b.createGuid(),_0xac664c.serverUrl=e,this._scene=t,t._plottingID=this._plottingID,i&&i.serviceParams&&_0x51d1e4.extend(this.options,i),this._symbolLibManager=_0x5dcc48.getInstance(e,void 0,this._plottingID),this._sitDataManager=WebGLPlot$b.SitDataManager.getInstance({scene:this._scene,serverUrl:e,options:this.options}),this._animationManager=_0x9f2efc.getInstance({serverUrl:e,scene:this._scene,options:this.options}),_0xac664c.defaultStyle=new WebGLPlot$b.DefaultStyle,WebGLPlot$b.S3MInstanceCollection&&(this.s3mInstanceColc=new WebGLPlot$b.S3MInstanceCollection(t._context),t.primitives.add(this.s3mInstanceColc),WebGLPlot$b.s3mInstanceColc.set(this._plottingID,this.s3mInstanceColc)),_0xac664c._AlgoSymoblPipelineGranularity=WebGLPlot$b.CesiumMath.RADIANS_PER_DEGREE,this._plotCollentionManager=_0x24dc2a.getInstance(t),this._plotModeChange=_0x14382e.getInstance(t)}_0xac664c.g_Plotting=_0xac664c.g_Plotting||new Map,WebGLPlot$b.s3mInstanceColc=WebGLPlot$b.s3mInstanceColc||new Map,_0xac664c.prototype.destroy=function(){this._scene.layers.remove("animation",!0),this._sitDataManager=null,this._animationManager=null,this._scene=null,_0xac664c.g_Plotting.clear()},_0xac664c.getInstance=function(e,t,i){let n=_0xac664c.g_Plotting.get(t._plottingID);return WebGLPlot$b.defined(e)&&WebGLPlot$b.defined(t)&&!WebGLPlot$b.defined(n)&&(n=new _0xac664c(e,t,i),_0xac664c.g_Plotting.set(n._plottingID,n)),n},_0xac664c.prototype.getSitDataManager=function(){return this._sitDataManager},_0xac664c.prototype.getSymbolLibManager=function(){return this._symbolLibManager},_0xac664c.prototype.getGOAnimationManager=function(){return this._animationManager},_0xac664c.prototype.getServerUrl=function(){return _0xac664c.serverUrl},_0xac664c.prototype.getDefaultStyle=function(){return _0xac664c.defaultStyle},_0xac664c.prototype.setAlgoUseDepthTest=function(e){this._plotCollentionManager&&this._plotCollentionManager.collentionLayer.createPolylineCollention(e)},_0xac664c.prototype.getAlgoUseDepthTest=function(){return!!this._plotCollentionManager&&this._plotCollentionManager.collentionLayer.polylineCollection._opaqueRS.depthMask},_0xac664c.prototype.getS3MCollection=function(){return this.s3mInstanceColc},WebGLPlot$b.Plotting=_0xac664c;var _0x1bcc2c=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xd38725=_0x1bcc2c(void 0,(function(){return _0xd38725.toString().search("(((.+)+)+)+$").toString().constructor(_0xd38725).search("(((.+)+)+)+$")}));function _0x374198(e,t){this._scene=e,this._graphicObject=null,this._ctrlPoints=new WebGLPlot.BillboardCollection,this._scene.primitives.add(this._ctrlPoints),this.handle=t,this.isShiftPress=!1,this.shiftKeyDownFun=void 0,this.shiftKeyUpFun=void 0,this.editHeightMode=!1,this.ctrlPointCallBack=null}function _0x3d9b31(e,t,i){e[t]=i}function _0x3f2c49(e,t,i){for(var n=0;n<e._ctrlPoints.length;++n){var r=e._ctrlPoints.get(n);r.index===t.index&&r.type===t.type||(r.show=i)}}function _0x2903cb(e,t,i,n){if(e._graphicObject){var r=1,o=e._scene,a=WebGLPlot.SceneTransforms.transformWindowToDrawingBuffer(o,n);a.y=o.drawingBufferHeight-a.y;var s=WebGLPlot.Cartesian3.fromDegrees(e.startPoint.x,e.startPoint.y,0),l=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(o,s),u=_0x374198.getAltitudeByLogical(s,a,o);if(WebGLPlot.defined(u)){l.y<n.y&&(r=-1);var c=WebGLPlot.Cartesian3.distance(s,u)*r,h=new _0x45ea17(e.startPoint.x,e.startPoint.y,c);if(WebGLPlot.defined(i.index)){var d=i.index;t.localPoints[d]=h}else WebGLPlot.defined(i.annotationIndex)&&(t._localPoint=h);_0x51d1e4.isSymbolDot(t.symbolType)?e._graphicObject.billboard.position=WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,h.z):e._graphicObject._initialize=!1,i.position=WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,h.z),e._graphicObject._wholeHeight=0}}}function _0x3ac270(e,t,i,n){if(WebGLPlot.defined(n)&&t._graphicObject){var r,o=i.type;t.getCtrlPt(i.type,i.index);var a=t._graphicObject;if(0===e)o===_0x5edb39.LocationPt&&t.isShiftPress&&(t.editHeightMode=!0),o===_0x5edb39.ScalePt&&(i.startScalePtn=n);else if(1===e){if(o===_0x5edb39.LocationPt&&(t.editHeightMode?_0x2903cb(t,t._graphicObject,i,n):(t._graphicObject.localPoints[i.index]=n,_0x51d1e4.isSymbolDot(t._graphicObject.symbolType)?(t._graphicObject.__setEffectParameter({point:n}),t._graphicObject.billboard.position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z)):t._graphicObject.localPoints[0]=new WebGLPlot.Cartesian3(n.x,n.y,n.z),i.position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z))),o===_0x5edb39.ScalePt){if(null===t._graphicObject)return;r=t.modifyDotSymbolSize(n,i.startScalePtn),a._sizeInMeters?(a.showMode===_0x3f7d9f.Grid||a.showMode===_0x3f7d9f.Picture)&&(a.billboard.scale=a._BillboardScale*r,i.eyeOffset=new WebGLPlot.Cartesian3(i.eyeOffsetX*r,i.eyeOffsetY*r,0)):(i.pixelOffset=new WebGLPlot.Cartesian3(i.pixelOffsetX*r,i.pixelOffsetY*r,0),a.billboard.scale=r)}}else 2===e&&o===_0x5edb39.ScalePt&&(r=t.modifyDotSymbolSize(n,i.startScalePtn),i.pixelOffsetX*=r,i.pixelOffsetY*=r,a.showMode===_0x3f7d9f.Picture?(a.pictureSymbolSize.x*=r,a.pictureSymbolSize.y*=r):a.showMode===_0x3f7d9f.Grid&&(a._gridSymbolSize.x*=r,a._gridSymbolSize.y*=r),a._initialize=!1)}}function _0xf16b05(e,t,i,n){if(WebGLPlot.defined(n)&&WebGLPlot.defined(t._graphicObject)){var r=i.type,o=i.index;if(r===_0x5edb39.LocationPt){if(t.editHeightMode)_0x2903cb(t,t._graphicObject,i,n);else{if(!(n instanceof _0x45ea17))return;var a=SuperMapAlgoPlot.PlottingUtil.clonePoints(t._graphicObject.localPoints);if(a[o]=n,(a=_0x51d1e4.clearNextSamePts(a)).length!==t._graphicObject.localPoints.length)return;t._graphicObject.localPoints[o]=n,t.isogon&&0!==o&&(o=1),i.position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z)}t._graphicObject._isScalePtModify=!1}else if(r===_0x5edb39.ScalePt){if(!(n instanceof _0x45ea17))return;if(1===e){t._graphicObject._isScalePtModify=!0,t._graphicObject._modifyScalePtParams={index:o,position:n};var s=_0x4822de(t._graphicObject._scalePoints);i.position=s[o]}else if(2===e){var l=t._graphicObject._scalePoints[o],u=WebGLPlot.Cartesian3.fromDegrees(l.x,l.y,l.z);i.position=u,t._graphicObject._isScalePtModify=!1}}else if(r===_0x5edb39.AlgoMovePt){if(!(n instanceof _0x45ea17))return;t.getCtrlPt(r,o).position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z);for(var c=n.x-t.redPntPos.x,h=n.y-t.redPntPos.y,d=0;d<t._graphicObject.localPoints.length;++d){var f=t._graphicObject.localPoints[d];t._graphicObject.localPoints[d]=new WebGLPlot.Cartesian3(f.x+c,f.y+h,f.z)}t._graphicObject._isScalePtModify=!1,t.redPntPos.x=n.x,t.redPntPos.y=n.y}t._graphicObject._initialize=!1}}function _0x378033(e,t,i){if(i instanceof _0x45ea17&&e._graphicObject&&e._graphicObject.annotationArray){var n=0,r=0;e._graphicObject.code;var o=e._graphicObject.symbolType;if(_0x51d1e4.isSymbolDot(o)||t.type!==_0x5edb39.AlgoMovePt){if(!_0x51d1e4.isSymbolDot(o)&&o!==_0x585354.SYMBOL_TEXT||t.type!==_0x5edb39.LocationPt)return;n=i.x-e._graphicObject.localPoints[t.index].x,r=i.y-e._graphicObject.localPoints[t.index].y}else n=i.x-e.redPntPos.x,r=i.y-e.redPntPos.y;for(var a=0;a<e._graphicObject.annotationArray.length;a++){var s=e._graphicObject.annotationArray[a];s._localPoint.x+=n,s._localPoint.y+=r,s._localPoint.z=i.z}}}function _0x2c0e9c(e,t,i,n){if(WebGLPlot.defined(n)&&t._graphicObject){if(WebGLPlot.defined(i.index)){_0x378033(t,i,n);var r=t._graphicObject.symbolType;t._graphicObject.code,_0x51d1e4.isSymbolDot(r)||r===_0x585354.SYMBOL_TEXT?_0x3ac270(e,t,i,n):_0xf16b05(e,t,i,n)}else if(t._graphicObject.annotationArray.length>0){var o=t._graphicObject.annotationArray[i.annotationIndex];t.editHeightMode?_0x2903cb(t,o,i,n):n instanceof _0x45ea17&&(o._localPoint=n,i.position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z))}0===e&&t.isShiftPress?t.editHeightMode=!0:2===e&&(WebGLPlot.defined(i.annotationIndex)?t._graphicObject.drawAnnotationArray():t._graphicObject._initialize=!1)}}function _0x4822de(e){var t=[];if(!WebGLPlot.defined(e)||0===e.length)return t;for(var i=0;i<e.length;++i){var n=e[i];t.push(n.x),t.push(n.y),t.push(0)}return WebGLPlot.Cartesian3.fromDegreesArrayHeights(t)}function _0x37e939(e,t,i,n){if(t.editHeightMode){var r=1,o=t._scene,a=WebGLPlot.SceneTransforms.transformWindowToDrawingBuffer(o,n);a.y=o.drawingBufferHeight-a.y;var s=WebGLPlot.Cartesian3.fromDegrees(t.startPoint.x,t.startPoint.y,0),l=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(o,s),u=_0x374198.getAltitudeByLogical(s,a,o);if(!WebGLPlot.defined(u))return;l.y<n.y&&(r=-1);var c=WebGLPlot.Cartesian3.distance(s,u)*r,h=new _0x45ea17(t.startPoint.x,t.startPoint.y,c);t._graphicObject instanceof _0x20e33d&&t._graphicObject.setOffset(h,!0),i.position=WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,h.z)}else{if(!(n instanceof _0x45ea17))return;var d=WebGLPlot.Cartographic.fromCartesian(i.position),f=new _0x45ea17(WebGLPlot.CesiumMath.toDegrees(d.longitude),WebGLPlot.CesiumMath.toDegrees(d.latitude),d.height),p=new _0x45ea17(n.x-f.x,n.y-f.y,n.z-f.z);t._graphicObject instanceof _0x20e33d&&t._graphicObject.setOffset(p),i.position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z)}}_0xd38725(),_0x374198.prototype.createCtrlPoint=function(e,t){if(WebGLPlot.defined(e)){var i=this;this.ctrlPointCallBack={dragHandlers:{onDragStart:function(e,t){i.isShiftPress&&(i.editHeightMode=!0),_0x2c0e9c(0,i,e,t),_0x3f2c49(i,e,!1)},onDrag:function(e,t){_0x2c0e9c(1,i,e,t)},onDragEnd:function(t,n){_0x2c0e9c(2,i,t,n),i.createCtrlPoints(i._graphicObject),i.handle._featureModifiedEvent.raiseEvent(e),_0x43a805.getInstance().symbolModified.raiseEvent(e,{isMouseEdit:!0}),t.type===_0x5edb39.LocationPt&&i.handle._featureDragEvent.raiseEvent(i._graphicObject)}}},e.code;var n=e.symbolType,r=null,o=new WebGLPlot.Cartesian3(0,0,0),a=[];if(t===_0x5edb39.LocationPt)r=_0x51d1e4.drawEditCtrlPtnPic(_0x5edb39.LocationPt),0===e.libID&&_0x585354.SYMBOL_REGULARPOLYGON===e.code?(a.push(e.localPoints[0]),a.push(e.localPoints[e.localPoints.length-1]),this.isogon=!0):0===e.libID&&_0x585354.SYMBOL_TEXT===e.code?a.push(e.localPoints[0]):a=e.localPoints;else if(t===_0x5edb39.ScalePt)r=_0x51d1e4.drawEditCtrlPtnPic(_0x5edb39.ScalePt),_0x51d1e4.isSymbolDot(n)?(o=i.getSaclePtOffset(e),a=e.localPoints):n!==_0x585354.SYMBOL_DOT&&n!==_0x585354.SYMBOL_TEXT&&(a=e._scalePoints);else if(t===_0x5edb39.AlgoMovePt){r=_0x51d1e4.drawEditCtrlPtnPic(_0x5edb39.AlgoMovePt),a.push(i.computeRedPoint(e));var s=i.computeRedPoint(e);i.redPntPos=s}var l=Number.MIN_VALUE;this._scene.globe.depthTestAgainstTerrain&&(l=Number.MAX_VALUE);for(var u=0;u<a.length;++u){(void 0===a[u].z||isNaN(a[u].z))&&(a[u].z=0);var c={show:!0,position:new WebGLPlot.Cartesian3.fromDegrees(a[u].x,a[u].y,a[u].z),scale:2,image:r,id:e.id,disableDepthTestDistance:l};if(e._sizeInMeters?c.eyeOffset=o:c.pixelOffset=o,(c=this._ctrlPoints.add(c)).index=u,c.type=t,c.SymbolType=_0x585354.SYMBOL_UNKNOW,e._sizeInMeters)c.eyeOffsetX=o.x,c.eyeOffsetY=o.y;else{if(void 0===o)return;c.pixelOffsetX=o.x,c.pixelOffsetY=o.y}this.addCallback(c,i.ctrlPointCallBack)}}},_0x374198.prototype.createCtrlPoints=function(e){if(this.removeAll(),e&&this.handle._plottingLayer._isEditable)switch(this._graphicObject=e,this.handle.editMode){case _0x21c04d.PLOTSYMBOL:this.createSymbolCtrlPoints(e);break;case _0x21c04d.ANNOTATIONARRAY:this.createAnnotationArrayCtrlPoints(e);break;case _0x21c04d.BOTH:this.createSymbolCtrlPoints(e),this.createAnnotationArrayCtrlPoints(e)}},_0x374198.prototype.createSymbolCtrlPoints=function(e){var t=e.symbolType;t===_0x585354.SYMBOL_DOT&&e.showMode===_0x3f7d9f.Marker||(this.createCtrlPoint(e,_0x5edb39.LocationPt),this.createCtrlPoint(e,_0x5edb39.ScalePt),!_0x51d1e4.isSymbolDot(e.symbolType)&&t!==_0x585354.SYMBOL_TEXT&&this.createCtrlPoint(e,_0x5edb39.AlgoMovePt))},_0x374198.prototype.createAnnotationArrayCtrlPoints=function(e){if(e&&e.annotationArray.length>0)for(var t=0;t<e.annotationArray.length;t++){var i=e.annotationArray[t];this.createAnnotationCtrlPoint(i,t)}},_0x374198.prototype.createAnnotationCtrlPoint=function(e,t){if(this._graphicObject){var i=e._localPoint,n=this._ctrlPoints.add({show:!0,position:new WebGLPlot.Cartesian3.fromDegrees(i.x,i.y,i.z),scale:2,image:_0x51d1e4.drawEditCtrlPtnPic(_0x5edb39.ScalePt),id:this._graphicObject.id,horizontalOrigin:WebGLPlot.HorizontalOrigin.LEFT});n.annotationIndex=t,n.type=_0x5edb39.LocationPt,n.SymbolType=_0x585354.SYMBOL_UNKNOW,this.addCallback(n,this.ctrlPointCallBack)}},_0x374198.prototype.addCallback=function(e,t){var i=this;t.dragHandlers&&(_0x3d9b31(e,"LEFT_DOWN",(function(n,r){function o(n,r){_0x51d1e4.screenSpaceCameraController(i._scene,!1),void 0!==e.index&&t.dragHandlers.onDrag&&t.dragHandlers.onDrag(n,r),void 0!==e.annotationIndex&&t.dragHandlers.onDrag&&t.dragHandlers.onDrag(n,r)}function a(n,o){r.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),r.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_UP),_0x51d1e4.screenSpaceCameraController(i._scene,!0),void 0!==e.index&&t.dragHandlers.onDragEnd&&t.dragHandlers.onDragEnd(n,o),void 0!==e.annotationIndex&&t.dragHandlers.onDragEnd&&t.dragHandlers.onDragEnd(n,o)}r.setInputAction((function(t){if(i._graphicObject)if(i.editHeightMode||e.type===_0x5edb39.ScalePt&&_0x51d1e4.isSymbolDot(i._graphicObject.symbolType))o(e,t.endPosition);else{var n=_0x51d1e4.getPosition(i._scene,t.endPosition);o(e,n)}}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),r.setInputAction((function(t){i.editHeightMode||e.type===_0x5edb39.ScalePt&&_0x51d1e4.isSymbolDot(i._graphicObject.symbolType)?a(e,t.position):a(e,_0x51d1e4.getPosition(i._scene,t.position))}),WebGLPlot.ScreenSpaceEventType.LEFT_UP),void 0!==e.index&&t.dragHandlers.onDragStart&&t.dragHandlers.onDragStart(e,n),void 0!==e.annotationIndex&&t.dragHandlers.onDragStart&&t.dragHandlers.onDragStart(e,n)})),_0x3d9b31(e,"mouseMove",(function(t){i.editHeightMode||(i.isShiftPress&&0===e.type?i._scene._canvas.style.cursor="n-resize":i._scene._canvas.style.cursor="default")})),_0x3d9b31(e,"mouseOut",(function(e){i.editHeightMode||(i._scene._canvas.style.cursor="")})))},_0x374198.prototype.getSaclePtOffset=function(e){var t,i,n=e.billboardBoundsLineWidth,r=new WebGLPlot.Cartesian3(0,0,0);if(e.showMode===_0x3f7d9f.Picture){let o=e._dotGrid._canvas.getContext("2d").measureText(e._textContent).width;t=(o>e.pictureSymbolSize.x?o:e.pictureSymbolSize.x)+n,i=e.pictureSymbolSize.y+n,e.sizeInMeters&&(i*=-1,t*=e.billboard.scale,i*=e.billboard.scale),r=new WebGLPlot.Cartesian3(t/2*e.scale,-i*e.scale,0)}else if(e.showMode===_0x3f7d9f.Grid){if(null===e._dotGrid)return;t=e._dotGrid.selectedRectBounds.x+e._dotGrid.selectedRectBounds.width-e._dotGrid._canvas.width/2,i=e._dotGrid._canvas.height-e._dotGrid.selectedRectBounds.y,i-=e._dotGrid._OffsetText_Down,e.sizeInMeters&&(i*=-1,t*=e.billboard.scale/e.scale,i*=e.billboard.scale/e.scale),r=new WebGLPlot.Cartesian3(t,-i,0)}return r},_0x374198.prototype.getCtrlPt=function(e,t){for(var i=0;i<this._ctrlPoints.length;i++){var n=this._ctrlPoints.get(i);if(n.type===e&&t===n.index)return this._ctrlPoints.get(i)}return null},_0x374198.prototype.removeAll=function(){this._ctrlPoints.removeAll(),this._graphicObject=null},_0x374198.prototype.modifyDotSymbolSize=function(e,t){if(this._graphicObject){if(!WebGLPlot.defined(e))return this._graphicObject.billboard.scale;var i=this._scene,n=this._graphicObject.localPoints[0],r=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(i,WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z)),o=_0x51d1e4.distance(r,t);return _0x51d1e4.distance(r,e)/o}},_0x374198.prototype.addListener=function(){var e=this;e.handle._featureRemoveEvent.addEventListener((function(){WebGLPlot.defined(e._ctrlPoints)&&e._ctrlPoints.removeAll()})),e.shiftKeyDownFun=function(t){72===t.keyCode&&(e.isShiftPress=!0)},e.shiftKeyUpFun=function(t){72===t.keyCode&&(e.isShiftPress=!1,e.editHeightMode=!1)},document.addEventListener("keydown",e.shiftKeyDownFun),document.addEventListener("keyup",e.shiftKeyUpFun)},_0x374198.prototype.removeListener=function(){document.removeEventListener("keydown",this.shiftKeyDownFun),document.removeEventListener("keyup",this.shiftKeyUpFun)},_0x374198.getAltitudeByLogical=function(e,t,i){var n=WebGLPlot.Cartographic.fromCartesian(e);n.height+=1,n=WebGLPlot.Cartesian3.fromRadians(n.longitude,n.latitude,n.height);var r=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(i,e),o=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(i,n);if(o){var a;o.x===r.x?(-1,a=0):o.y===r.y?(0,a=-1):a=-1/((o.y-r.y)/(o.x-r.x));var s=i._view.viewport,l={left:s.x,right:s.x+s.width,bottom:s.y,top:s.y+s.height},u=_0x51d1e4.intersectionOfRectByPointslopeline(t,a,l),c=u[0],h=u[1],d=new WebGLPlot.Cartesian3,f=new WebGLPlot.Cartesian3;WebGLPlot.SceneTransforms.drawingBufferToWgs84Coordinates(i,c,1,d),WebGLPlot.SceneTransforms.drawingBufferToWgs84Coordinates(i,h,1,f);var p=i.camera.position,_=new WebGLPlot.Cartesian3;WebGLPlot.Cartesian3.subtract(e,n,_);var m=new WebGLPlot.Cartesian3;WebGLPlot.Cartesian3.negate(_,m),WebGLPlot.Cartesian3.normalize(_,_),WebGLPlot.Cartesian3.normalize(m,m);var $=new WebGLPlot.Ray(e,_),g=new WebGLPlot.Ray(e,m),y=WebGLPlot.IntersectionTests.rayTriangleParametric($,d,f,p);if(y)return WebGLPlot.Ray.getPoint($,y);if(y=WebGLPlot.IntersectionTests.rayTriangleParametric(g,d,f,p))return WebGLPlot.Ray.getPoint(g,y)}},_0x374198.prototype.computeRedPoint=function(e){if(WebGLPlot.defined(e)||"function"!==e.computeBounds){var t=e.computeBounds(),i=this.pixelDisToRealDis(t,3);return new WebGLPlot.Cartesian3(t.x,t.y-i,t.z)}},_0x374198.prototype.pixelDisToRealDis=function(e,t){var i=this._scene,n=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z),r=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(i,n);if(!WebGLPlot.defined(r))return 0;var o=new WebGLPlot.Cartesian3(r.x+t,r.y,0),a=_0x51d1e4.getPosition(i,r),s=_0x51d1e4.getPosition(i,o);return _0x51d1e4.distance(a,s)},_0x374198.prototype.createGroupObjectCtrlPoint=function(e,t,i){if(WebGLPlot.defined(e)){this._graphicObject=e;var n=this;this.ctrlPointCallBack={dragHandlers:{onDragStart:function(e,t){n.isShiftPress&&(n.editHeightMode=!0),n.handle.removeGroupObjectEditObject(),_0x37e939(0,n,e,t)},onDrag:function(e,t){_0x37e939(1,n,e,t)},onDragEnd:function(t,i){_0x37e939(2,n,t,i),n.handle._featureModifiedEvent.raiseEvent(e),_0x43a805.getInstance().symbolModified.raiseEvent(e,{isMouseEdit:!0}),n.handle.drawGroupObjectEditObject(n._graphicObject,!0)}}};var r=null;i===_0x5edb39.LocationPt&&(r=_0x51d1e4.drawEditCtrlPtnPic(_0x5edb39.LocationPt));var o=Number.MIN_VALUE;this._scene.globe.depthTestAgainstTerrain&&(o=Number.MAX_VALUE),(void 0===t.z||isNaN(t.z))&&(t.z=0);var a={show:!0,position:new WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z),scale:2,image:r,id:e.id,disableDepthTestDistance:o};(a=this._ctrlPoints.add(a)).index=0,a.type=i,a.SymbolType=_0x585354.SYMBOL_UNKNOW,this.addCallback(a,n.ctrlPointCallBack)}};var _0x318f99=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x4ef68a=_0x318f99(void 0,(function(){return _0x4ef68a.toString().search("(((.+)+)+)+$").toString().constructor(_0x4ef68a).search("(((.+)+)+)+$")}));function _0x4bc9f5(e,t){this._scene=e,this.handle=t,this.model=null,this.fixedFrameTransform=WebGLPlot.Transforms.localFrameToFixedFrameGenerator("east","north"),this.initCallBack()}function _0xbba5d2(e,t,i){e[t]=i}function _0xb2f71f(e){e.destoryBoundsCtrl(),e.model?(e.createModelCtrl(),e.geoEdit._modelScale.x=e.model.scale):e.vector&&e.createVectorCtrl(e)}function _0x363e0b(e){e.scaleLeft1.show=!1,e.rotateCircle.show=!1,e.heightCtrl.show=!1,e.boxBounds.show=!1,e.moveFillCtrl.show=!1}function _0x1711a4(e,t,i,n,r){var o=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z),a=new WebGLPlot.HeadingPitchRoll,s=Math.PI/180;if(a.pitch=-1*s*t.x,a.roll=-1*s*t.y,a.heading=-1*s*t.z,WebGLPlot.Transforms.headingPitchRollToFixedFrame(o,a,WebGLPlot.Ellipsoid.WGS84,n,i),WebGLPlot.defined(r)&&"2.0"===r._sourceVersion){let e=WebGLPlot.Matrix3.fromRotationZ(WebGLPlot.CesiumMath.toRadians(-90));WebGLPlot.Matrix4.multiplyByMatrix3(r.modelMatrix,e,r.modelMatrix)}return i}function _0x47b643(e,t,i,n){var r=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z),o=new WebGLPlot.HeadingPitchRoll,a=Math.PI/180;return o.pitch=-1*a*t.x,o.roll=-1*a*t.y,o.heading=-1*a*t.z+90*a,WebGLPlot.Transforms.headingPitchRollToFixedFrame(r,o,WebGLPlot.Ellipsoid.WGS84,n,i),i}function _0x4bb390(e,t,i,n){if(WebGLPlot.defined(i)&&_0x4e68f4(t)){var r=e._scene;if("heightCtrl"===t._instanceIds[0]){_0x363e0b(e);var o=_0x51d1e4.pixelHeightToRealHeight(r,e.pixeStartPoint,i);e.geoEdit.localPoints[0].z=e.startPoint.z+o;var a=new _0x45ea17(e.geoEdit.localPoints[0].x,e.geoEdit.localPoints[0].y,e.geoEdit.localPoints[0].z);e.geoEdit.localPoints[0]=a,e.model&&_0x1711a4(e.geoEdit.localPoints[0],e.geoEdit._modelRotate,e.geoEdit._model.modelMatrix,e.fixedFrameTransform,e.geoEdit._model),e.vector&&e.geoEdit.initSymbol(!0)}if("moveFillCtrl"===t._instanceIds[0]&&(_0x363e0b(e),e.geoEdit.localPoints[0].x=i.x,e.geoEdit.localPoints[0].y=i.y,e.geoEdit.localPoints[0].z=i.z,e.model?_0x1711a4(e.geoEdit.localPoints[0],e.geoEdit._modelRotate,e.geoEdit._model.modelMatrix,e.fixedFrameTransform,e.geoEdit._model):e.vector&&e.geoEdit.initSymbol(!0)),"rotateCircle"===t._instanceIds[0]){var s=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(r,e.rotateCircleCenter),l=i,u=_0x51d1e4.radian(s,e.rotateStartPosition),c=_0x51d1e4.radian(s,l)-u;e.model&&(e.geoEdit._modelRotate.z=(e.startRotate-180*c/Math.PI)%360,_0x1711a4(e.geoEdit.localPoints[0],e.geoEdit._modelRotate,e.geoEdit._model.modelMatrix,e.fixedFrameTransform,e.geoEdit._model)),e.vector&&(e.geoEdit.vectorRotate.z=e.startRotate+180*c/Math.PI,e.geoEdit.initSymbol(!0))}if("ScaleLeft1_1"===t._instanceIds[0]){var h=e.geoEdit.localPoints[0],d=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(r,WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,h.z)),f=_0x51d1e4.distance(d,e.startSCalePtn),p=_0x51d1e4.distance(d,i)/f;e.model&&(e.geoEdit._model.scale=e.startScale*p),e.vector&&(e.geoEdit._vectorScale=e.startScale*p,e.geoEdit.initSymbol(!0))}}}function _0x4e68f4(e){return!!(e&&e._instanceIds&&e._instanceIds.length>0)}_0x4ef68a(),_0x4bc9f5.prototype.initCallBack=function(){this.ctrlPointCallBack={dragHandlers:{onDragStart:function(e,t,i,n){if("rotateCircle"===t._instanceIds[0]){if(!i)return;e.rotateStartPosition=n,e.startRotate=e.geoEdit._modelRotate.z}"ScaleLeft1_1"===t._instanceIds[0]&&(e.startSCalePtn=n,e.model?e.startScale=e.geoEdit._modelScale.x:e.vector&&(e.startScale=e.geoEdit.vectorScale)),"moveFillCtrl"===t._instanceIds[0]&&(e.startMovePtn=n,e.startMoveGeoPtn=e.geoEdit.localPoints[0],e.model&&(e.model._allowPicking=!1))},onDrag:function(e,t,i,n){_0x4bb390(e,t,i)},onDragEnd:function(e,t,i){_0x4e68f4(t)&&"moveFillCtrl"===t._instanceIds[0]&&(e.handle._featureDragEvent.raiseEvent(e.geoEdit),e.model&&(e.model._allowPicking=!0)),_0xb2f71f(e),e.geoEdit._initialize=!1,e.geoEdit.__setEffectParameter({point:e.geoEdit.localPoints[0],rotate:e.geoEdit.modelRotate}),e.handle._featureModifiedEvent.raiseEvent(e.geoEdit),_0x43a805.getInstance().symbolModified.raiseEvent(e.geoEdit,{isMouseEdit:!0})}}}},_0x4bc9f5.prototype.addCallback=function(e,t){var i=this;t.dragHandlers&&(_0xbba5d2(e,"LEFT_DOWN",(function(n,r){function o(e,n){_0x51d1e4.screenSpaceCameraController(i._scene,!1),void 0!==e.type&&t.dragHandlers.onDrag&&t.dragHandlers.onDrag(i,e,n)}if(r.setInputAction((function(t){if(_0x4e68f4(e))if("heightCtrl"===e._instanceIds[0]||"ScaleLeft1_1"===e._instanceIds[0]||"rotateCircle"===e._instanceIds[0])o(e,t.endPosition);else{var n=_0x51d1e4.getPosition(i._scene,t.endPosition);o(e,n,t.endPosition)}}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),r.setInputAction((function(n){var o;!_0x4e68f4(e)||(o=_0x51d1e4.getPosition(i._scene,n.position),r.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),r.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_UP),r.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_DOWN),_0x51d1e4.screenSpaceCameraController(i._scene,!0),void 0!==e.type&&t.dragHandlers.onDragEnd&&t.dragHandlers.onDragEnd(i,e,o))}),WebGLPlot.ScreenSpaceEventType.LEFT_UP),_0x4e68f4(e)){if("rotateCircle"===e._instanceIds[0]||"ScaleLeft1_1"===e._instanceIds[0]||"moveFillCtrl"===e._instanceIds[0]){var a=_0x51d1e4.getPosition(i._scene,n);t.dragHandlers.onDragStart&&t.dragHandlers.onDragStart(i,e,a,n)}if("heightCtrl"===e._instanceIds[0]){var s=i.geoEdit.localPoints[0].clone();i.startPoint=s,i.pixeStartPoint=n}}})),_0xbba5d2(e,"mouseMove",(function(t){if(i.editHeightMode||!_0x4e68f4(e))return;i._scene._canvas.style.cursor="default";var n=null;if(n=e.getGeometryInstanceAttributes("heightCtrl"))return i._scene._canvas.style.cursor="n-resize",void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(1,0,0,1)));if(n=e.getGeometryInstanceAttributes("rotateCircle"))return void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(1,0,0,1)));n=e.getGeometryInstanceAttributes("ScaleLeft1_1");let r=e.getGeometryInstanceAttributes("ScaleLeft1_2");return n&&r?(r.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(1,0,0,1)),void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(1,0,0,1)))):void 0})),_0xbba5d2(e,"mouseOut",(function(t){if(i.editHeightMode)return;i._scene._canvas.style.cursor="";var n=e.getGeometryInstanceAttributes("heightCtrl");if(n)return void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(0,0,1,1)));if(n=e.getGeometryInstanceAttributes("rotateCircle"))return void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(1,1,0,1)));n=e.getGeometryInstanceAttributes("ScaleLeft1_1");let r=e.getGeometryInstanceAttributes("ScaleLeft1_2");return n?(r.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(0,1,0,1)),void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(0,1,0,1)))):void 0})))},_0x4bc9f5.prototype.hideModeEditBouds=function(e){!WebGLPlot.defined(this.boxBounds)||null===this.boxBounds||(this.scaleLeft1.show=e,this.rotateCircle.show=e,this.heightCtrl.show=e,this.boxBounds.show=e,this.moveFillCtrl.show=e)},_0x4bc9f5.prototype.createModeEditBouds=function(e){e&&!WebGLPlot.defined(this.boxBounds)||e&&WebGLPlot.defined(this.boxBounds)?this.createModelCtrl():e||this.destoryBoundsCtrl()},_0x4bc9f5.prototype.createModelCtrl=function(){if(this.vector=null,this.handle._graphicObject){this.geoEdit=this.handle._graphicObject;var e=this.geoEdit.localPoints[0];this.model=this.geoEdit._model,this.modelMatrix=this.model.modelMatrix;var t=this.model._boundingSphere.center;this.centerMax=t.x>t.y?t.x:t.y,this.centerMax=(this.centerMax>t.z?this.centerMax:t.z)*this.model.scale,this.modelRadius=this.model._initialRadius*this.model.scale;var i=new WebGLPlot.Cartesian3(this.modelRadius+this.centerMax,this.modelRadius+this.centerMax,this.modelRadius+this.centerMax),n=new _0x45ea17(e.x,e.y,e.z),r={minCorner:this.model._minCorner,maxCorner:this.model._maxCorner},o=this.model.scale,a=Math.abs(r.minCorner.z)>Math.abs(r.minCorner.x)?r.minCorner.z:r.minCorner.x,s=Math.abs(r.maxCorner.z)>Math.abs(r.maxCorner.x)?r.maxCorner.z:r.maxCorner.x,l=WebGLPlot.Cartesian3.multiplyByScalar(WebGLPlot.Cartesian3.fromElements(a,a,r.minCorner.y),o,new WebGLPlot.Cartesian3),u=WebGLPlot.Cartesian3.multiplyByScalar(WebGLPlot.Cartesian3.fromElements(s,s,r.maxCorner.y),o,new WebGLPlot.Cartesian3),c=new WebGLPlot.AxisAlignedBoundingBox(l,u);this.BoundingBoxCenter=c.center,this.boxBounds=this.createBoxGeometry(n,i,c);var h=this.getLinePts(e,u,l,this.boxModelMatrix);if(this.moveFillCtrl=this.createFillCtrl(h.moveFillCtrl,new WebGLPlot.Color(1,1,0,.3),"moveFillCtrl"),this.scaleLeft1=this.createScaleLeft1(h.left1[0],h.left1[1]),this.rotateCircle=this.createRotateCircle(h.rotateCircle),this.heightCtrl=this.createHeightCtrl(h.heightCtrl),!this.handle._plottingLayer._isEditable)return void(this.boxBounds=this._scene._primitives.add(this.boxBounds));this.scaleLeft1=this._scene._primitives.add(this.scaleLeft1),this.rotateCircle=this._scene._primitives.add(this.rotateCircle),this.heightCtrl=this._scene._primitives.add(this.heightCtrl),this.moveFillCtrl=this._scene._primitives.add(this.moveFillCtrl),this.boxBounds=this._scene._primitives.add(this.boxBounds),this.addCallback(this.scaleLeft1,this.ctrlPointCallBack),this.addCallback(this.rotateCircle,this.ctrlPointCallBack),this.addCallback(this.heightCtrl,this.ctrlPointCallBack),this.addCallback(this.moveFillCtrl,this.ctrlPointCallBack)}},_0x4bc9f5.prototype.createBoxGeometry=function(e,t,i){if(null===e||null===t)return null;var n,r=[];return this.model?this.boxModelMatrix=_0x47b643(e,this.geoEdit._modelRotate,this.modelMatrix.clone(),this.fixedFrameTransform):this.vector?this.boxModelMatrix=_0x47b643(e,this.geoEdit.vectorRotate,this.modelMatrix.clone(),this.fixedFrameTransform):this.boxModelMatrix=_0x47b643(e,new WebGLPlot.Cartesian3(0,0,0),new WebGLPlot.Matrix4,this.fixedFrameTransform),n=WebGLPlot.defined(i)?WebGLPlot.BoxOutlineGeometry.fromAxisAlignedBoundingBox(i):WebGLPlot.BoxOutlineGeometry.fromDimensions({dimensions:t}),r.push(new WebGLPlot.GeometryInstance({geometry:n,modelMatrix:this.boxModelMatrix,attributes:{color:WebGLPlot.ColorGeometryInstanceAttribute.fromColor(WebGLPlot.Color.YELLOW)}})),new WebGLPlot.Primitive({geometryInstances:r,appearance:new WebGLPlot.PerInstanceColorAppearance({flat:!0,translucent:!1,renderState:{lineWidth:Math.min(3,this._scene.maximumAliasedLineWidth)}})})},_0x4bc9f5.prototype.createScaleLeft1=function(e,t){var i=[],n=new WebGLPlot.Color(0,1,0);return i.push(this.createLineGometryInstance(e,6,n,"ScaleLeft1_1")),i.push(this.createLineGometryInstance(t,6,n,"ScaleLeft1_2")),this.createPrimitive(i)},_0x4bc9f5.prototype.createRotateCircle=function(e){var t=[],i=new WebGLPlot.Color(1,1,0);return t.push(this.createLineGometryInstance(e,3,i,"rotateCircle")),this.createPrimitive(t)},_0x4bc9f5.prototype.createHeightCtrl=function(e){var t=[],i=new WebGLPlot.Color(0,0,1);return t.push(this.createLineGometryInstance(e,5,i,"heightCtrl")),this.createPrimitive(t)},_0x4bc9f5.prototype.createPrimitive=function(e){var t=WebGLPlot.Material.fromType("Color",{color:new WebGLPlot.Color(1,1,0,1),fill:!0}),i=new WebGLPlot.PolylineColorAppearance({translucent:!0,closed:!0,material:t}),n=new WebGLPlot.Primitive({geometryInstances:e,appearance:i,asynchronous:!1,compressVertices:!0,show:!0});return n.type="ModelEdit",n.SymbolType=1,n},_0x4bc9f5.prototype.createLineGometryInstance=function(e,t,i,n){var r=new WebGLPlot.PolylineGeometry({positions:e,width:t}),o=WebGLPlot.PolylineGeometry.createGeometry(r);return i=WebGLPlot.ColorGeometryInstanceAttribute.fromColor(i),new WebGLPlot.GeometryInstance({geometry:o,id:n,attributes:{color:i}})},_0x4bc9f5.prototype.getLinePts=function(e,t,i,n){var r=[],o=[],a=[],s=[],l=0,u=0,c=0,h=0;WebGLPlot.defined(t)&&WebGLPlot.defined(i)?(l=Math.abs(t.x-i.x)/2,u=Math.abs(t.y-i.y)/2,c=i.z<=0?t.z:t.z-i.z,h=l>u?u:l):(h=(this.centerMax+this.modelRadius)/2,c=1.5*this.centerMax+this.modelRadius/2),c=Math.abs(c),this.rotateCircleCenter=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,c+e.z);var d=this.computeHeightLines(l,u,h,c,n);a=a.concat(d);var f=this.computeScaleLines(l,u,h,c,n);r.push(f[0]),r.push(f[1]),r.push(f[2]),o.push(f[3]),o.push(f[4]),this.scaleLeft1Pnt=f[1],this.rotateCircle=this.computeRotateCircle(h,c,n);var p=this.computeMoveFill(h,c,n);return s.push(p[0]),s.push(p[1]),s.push(p[2]),s.push(p[3]),{left1:[r,o],rotateCircle:this.rotateCircle,heightCtrl:a,moveFillCtrl:s}},_0x4bc9f5.prototype.createFillCtrl=function(e,t,i){var n=WebGLPlot.PolygonGeometry.fromPositions({positions:e,perPositionHeight:!0}),r=WebGLPlot.PolygonGeometry.createGeometry(n),o=new WebGLPlot.GeometryInstance({geometry:r,id:i}),a=new WebGLPlot.Material.fromType("Color",{color:t,fill:!0}),s=new WebGLPlot.Primitive({geometryInstances:[o],appearance:new WebGLPlot.EllipsoidSurfaceAppearance({material:a,aboveGround:!0}),show:this._display,asynchronous:!1});return s.type="ModelEdit",s.SymbolType=1,s},_0x4bc9f5.prototype.getCartesian3ByLength=function(e,t,i,n){var r,o,a,s,l;(!WebGLPlot.defined(t)||!WebGLPlot.defined(i)||!WebGLPlot.defined(n))&&(t=0,i=0,n=0),r=Math.sqrt(e.x*e.x+e.y*e.y),o=Math.sqrt(r*r+e.z*e.z);var u=Math.acos((o*o+r*r-e.z*e.z)/(2*o*r));o+=n,l=Math.sin(u)*o;var c=Math.cos(u)*o;return a=c*e.x/r,s=c*e.y/r,new WebGLPlot.Cartesian3(a,s,l)},_0x4bc9f5.prototype.computeHeightLines=function(e,t,i,n,r){var o=[],a=new WebGLPlot.Cartesian3,s=new WebGLPlot.Cartesian3,l=0,u=0;0!==e&&0!==t?(i=e+this.BoundingBoxCenter.x,l=(t-this.BoundingBoxCenter.y)/i,u=n/i):0!==i&&(l=1,u=n/i);var c=WebGLPlot.Cartesian3.fromDegrees(this.geoEdit.localPoints[0].x,this.geoEdit.localPoints[0].y,this.geoEdit.localPoints[0].z),h=new WebGLPlot.HeadingPitchRoll,d=Math.PI/180;this.model?(h.pitch=-1*d*this.geoEdit._modelRotate.x,h.roll=-1*d*this.geoEdit._modelRotate.y,h.heading=-1*d*this.geoEdit._modelRotate.z+90*d):(h.pitch=-1*d*this.geoEdit.vectorRotate.x,h.roll=-1*d*this.geoEdit.vectorRotate.y,h.heading=d*this.geoEdit.vectorRotate.z);var f=WebGLPlot.Transforms.headingPitchRollToFixedFrame(c,h,WebGLPlot.Ellipsoid.WGS84,this.fixedFrameTransform,r.clone());return s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(-1*l,1,u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(-1*l,1,.7*u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),o},_0x4bc9f5.prototype.computeScaleLines=function(e,t,i,n,r){var o=[],a=new WebGLPlot.Cartesian3,s=new WebGLPlot.Cartesian3,l=0,u=0;0!==e&&0!==t?(i=e-this.BoundingBoxCenter.y,l=(t+this.BoundingBoxCenter.y)/i,u=n/i):0!==i&&(l=1,u=n/i);var c=WebGLPlot.Cartesian3.fromDegrees(this.geoEdit.localPoints[0].x,this.geoEdit.localPoints[0].y,this.geoEdit.localPoints[0].z),h=new WebGLPlot.HeadingPitchRoll,d=Math.PI/180;this.model?(h.pitch=-1*d*this.geoEdit._modelRotate.x,h.roll=-1*d*this.geoEdit._modelRotate.y,h.heading=-1*d*this.geoEdit._modelRotate.z+90*d):(h.pitch=d*this.geoEdit.vectorRotate.x,h.roll=d*this.geoEdit.vectorRotate.y,h.heading=d*this.geoEdit.vectorRotate.z);var f=WebGLPlot.Transforms.headingPitchRollToFixedFrame(c,h,WebGLPlot.Ellipsoid.WGS84,this.fixedFrameTransform,r.clone());return s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(l,-.8,u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(l,-1,u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(.8*l,-1,u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(l,-1,u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(l,-1,.8*u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),o},_0x4bc9f5.prototype.computeMoveFill=function(e,t,i){var n=[],r=new WebGLPlot.Cartesian3,o=new WebGLPlot.Cartesian3,a=t/e;return o=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(.3,.3,a),e,o),r=WebGLPlot.Matrix4.multiplyByPoint(i,o,r),n.push(new WebGLPlot.Cartesian3(r.x,r.y,r.z)),o=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(-.3,.3,a),e,o),r=WebGLPlot.Matrix4.multiplyByPoint(i,o,r),n.push(new WebGLPlot.Cartesian3(r.x,r.y,r.z)),o=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(-.3,-.3,a),e,o),r=WebGLPlot.Matrix4.multiplyByPoint(i,o,r),n.push(new WebGLPlot.Cartesian3(r.x,r.y,r.z)),o=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(.3,-.3,a),e,o),r=WebGLPlot.Matrix4.multiplyByPoint(i,o,r),n.push(new WebGLPlot.Cartesian3(r.x,r.y,r.z)),n},_0x4bc9f5.prototype.computeRotateCircle=function(e,t,i){for(var n=[],r=new WebGLPlot.Cartesian3,o=new WebGLPlot.Cartesian3,a=t/e,s=_0x51d1e4.calcCirclePts(1,new WebGLPlot.Cartesian3(0,0,0),72),l=0;l<s.length;l++)o=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(.8*s[l].x,.8*s[l].y,a),e,o),r=WebGLPlot.Matrix4.multiplyByPoint(i,o,r),n.push(new WebGLPlot.Cartesian3(r.x,r.y,r.z));return n},_0x4bc9f5.prototype.createVectorEditBouds=function(e){e&&!WebGLPlot.defined(this.boxBounds)?this.createVectorCtrl(this):e&&WebGLPlot.defined(this.boxBounds)?(_0x363e0b(this),this.createVectorCtrl(this)):e||this.destoryBoundsCtrl()},_0x4bc9f5.prototype.destoryBoundsCtrl=function(){this.scaleLeft1&&(this.scaleLeft1.mouseMove=void 0,this._scene._primitives.removeAndDestroy(this.scaleLeft1),this.scaleLeft1=void 0),this.rotateCircle&&(this.rotateCircle.mouseMove=void 0,this._scene._primitives.removeAndDestroy(this.rotateCircle),this.rotateCircle=void 0),this.heightCtrl&&(this.heightCtrl.mouseMove=void 0,this._scene._primitives.removeAndDestroy(this.heightCtrl),this.heightCtrl=void 0),this.moveFillCtrl&&(this.moveFillCtrl.mouseMove=void 0,this._scene._primitives.removeAndDestroy(this.moveFillCtrl),this.moveFillCtrl=void 0),this.boxBounds&&(this.boxBounds.mouseMove=void 0,this._scene._primitives.removeAndDestroy(this.boxBounds),this.boxBounds=void 0)},_0x4bc9f5.prototype.createVectorCtrl=function(e){if(this.handle._graphicObject){this.model=null,this.geoEdit=this.handle._graphicObject;var t=this.geoEdit.localPoints[0];this.vector=this.geoEdit._dotVector,this.modelMatrix=this.vector.modelMatrix,this.centerMax=this.vector.vectorHeight/2,this.modelRadius=this.vector.vectorHeight/2;var i=new WebGLPlot.Cartesian3(e.modelRadius+this.centerMax,e.modelRadius+this.centerMax,e.modelRadius+this.centerMax),n=new _0x45ea17(t.x,t.y,this.centerMax+t.z);e.boxBounds=e.createBoxGeometry(n,i);var r=_0x47b643(t,this.geoEdit.vectorRotate,this.vector.modelMatrix.clone(),this.fixedFrameTransform),o=e.getLinePts(t,void 0,void 0,r);if(e.moveFillCtrl=e.createFillCtrl(o.moveFillCtrl,new WebGLPlot.Color(1,1,0,.3),"moveFillCtrl"),e.scaleLeft1=e.createScaleLeft1(o.left1[0],o.left1[1]),e.rotateCircle=e.createRotateCircle(o.rotateCircle),e.heightCtrl=e.createHeightCtrl(o.heightCtrl),!this.handle._plottingLayer._isEditable)return void(e.boxBounds=e._scene._primitives.add(e.boxBounds));e.scaleLeft1=e._scene._primitives.add(e.scaleLeft1),e.rotateCircle=e._scene._primitives.add(e.rotateCircle),e.heightCtrl=e._scene._primitives.add(e.heightCtrl),e.moveFillCtrl=e._scene._primitives.add(e.moveFillCtrl),e.boxBounds=e._scene._primitives.add(e.boxBounds),e.addCallback(e.scaleLeft1,e.ctrlPointCallBack),e.addCallback(e.rotateCircle,e.ctrlPointCallBack),e.addCallback(e.heightCtrl,e.ctrlPointCallBack),e.addCallback(e.moveFillCtrl,e.ctrlPointCallBack)}};var _0x5835c5=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x528cf3=_0x5835c5(void 0,(function(){return _0x528cf3.toString().search("(((.+)+)+)+$").toString().constructor(_0x528cf3).search("(((.+)+)+)+$")}));function _0x5523fd(e,t){if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("plottingLayer is required!");this._scene=e,this._plottingLayer=t,this._active=!1,t._plottingEdit=this,this.CtrlPosition=new _0x374198(e,this),this.ModelEditControl=new _0x4bc9f5(e,this),this.pasteGeoJson=null,this._editMode=_0x21c04d.PLOTSYMBOL,this._pickRectangle=new WebGLPlot.Cartesian2(10,10),this.initialize()}function _0x49bc0f(e,t,i,n){if(i&&i._plottingLayer&&i._plottingLayer._scene&&i._plottingLayer._isSelected&&t){if("LEFT_DOWN"!==e||WebGLPlot.defined(i._graphicObject)){var r=[],o=[];if(void 0===n){const e=i._pickRectangle;o=i._scene.drillPick(t,void 0,e.x,e.y)}else o=i._scene.drillPick(t,void 0,n.width,n.height);for(var a=[],s=0;s<o.length;s++)if(o[s]&&o[s].id&&null!==o[s].primitive&&WebGLPlot.defined(o[s].primitive.SymbolType)){var l=i._plottingLayer.getFeatureByUuid(o[s].id);l&&a.push(l),r.push(o[s])}if(void 0!==n)return a;for(var u=!1,c=0;c<r.length;c++)if("heightCtrl"===r[c].id){u=!0;break}for(s=0;s<r.length;s++){var h,d=r[s];if(d&&d.primitive&&d.primitive[e]){if(0===d.primitive.type&&i.CtrlPosition.isShiftPress&&(void 0!==d.primitive.index?i._graphicObject instanceof _0x20e33d?(h=i._graphicObject._centerPt3D,WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,0),i.CtrlPosition.startPoint=h):(h=i._graphicObject.localPoints[d.primitive.index],WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,0),i.CtrlPosition.startPoint=h):void 0!==d.primitive.annotationIndex&&(h=i._graphicObject.annotationArray[d.primitive.annotationIndex].localPoint,WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,0),i.CtrlPosition.startPoint=h)),!u){d.primitive[e](t,i._CtrlPointhandler);break}if("heightCtrl"===d.id){d.primitive[e](t,i._CtrlPointhandler);break}}else if(d&&d.primitive&&d.id&&"LEFT_CLICK"===e){var f=i._plottingLayer.getFeatureByUuid(d.id);if(f instanceof _0x20e33d)return i.releaseSelection(),i.drawGroupObjectEditObject(f,!0),i._graphicObject=f,i._graphicObject._isSelected=!0,i._graphicObject._isEdit=!0,i._plottingLayer.setSelectedFeatureByID(f._id),void i._featureSelectedEvent.raiseEvent(i._graphicObject);if(WebGLPlot.defined(i._graphicObject)){if(i._graphicObject.id===d.id||(i.unSelection(!0),i._graphicObject=i._plottingLayer.getFeatureByUuid(d.id),!WebGLPlot.defined(i._graphicObject)))return;return void i.DoSelectObjectEdit(f)}if(!f)continue;return i._graphicObject=f,void i.DoSelectObjectEdit(f)}}if("LEFT_CLICK"===e&&(!WebGLPlot.defined(r)||0===r.length)&&WebGLPlot.defined(i._graphicObject)){const e=i._graphicObject.id;i.unSelection(!0);var p=i._featureReleaseEvent;let t=i._plottingLayer.getFeatureByUuid(e);p.raiseEvent(t)}}}else i.releaseSelection()}function _0x5cb913(e){const t=_0x51086a(e.keyCode);let i=_self._graphicObject;if(i&&(i.showMode===_0x3f7d9f.Marker||i.code===_0x585354.SYMBOL_MODEL))switch(t){case"Z":i.modelScale*=1.1;break;case"X":i.modelScale*=.9;break;case"W":i.modelRotate.y+=1,i._initialize=!1;break;case"S":i.modelRotate.y-=1,i._initialize=!1;break;case"A":i.modelRotate.z-=1,i._initialize=!1;break;case"D":i.modelRotate.z+=1,i._initialize=!1;break;case"Q":i.modelRotate.x+=1,i._initialize=!1;break;case"E":i.modelRotate.x-=1,i._initialize=!1}}function _0x51086a(e){switch(e){case"Z".charCodeAt(0):return"Z";case"X".charCodeAt(0):return"X";case"W".charCodeAt(0):case 38:return"W";case"S".charCodeAt(0):case 40:return"S";case"D".charCodeAt(0):case 39:return"D";case"A".charCodeAt(0):case 37:return"A";case"Q".charCodeAt(0):return"Q";case"E".charCodeAt(0):return"E";default:return}}_0x528cf3(),_0x5523fd.prototype.initialize=function(){this._graphicObject=void 0,this._handler=new WebGLPlot.ScreenSpaceEventHandler(this._scene.canvas),this._ctrlPoints=new WebGLPlot.BillboardCollection,this._scene.primitives.add(this._ctrlPoints),this.positionPointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointWhite_Go.png"),this.scalePointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointYellow_Go.png"),this.anchorPointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointRed_Go.png"),this._featureSelectedEvent=new WebGLPlot.Event,this._featureModifiedEvent=new WebGLPlot.Event,this._featureReleaseEvent=new WebGLPlot.Event,this._featureRemoveEvent=new WebGLPlot.Event,this.isShiftPress=!1,this.shiftKeyDownFun=void 0,this.shiftKeyUpFun=void 0,this.editHeightMode=!1,this._CtrlPointhandler=new WebGLPlot.ScreenSpaceEventHandler(this._scene.canvas),this._featureLeftClickEvent=new WebGLPlot.Event,this._featureRightClickEvent=new WebGLPlot.Event,this._sceneLeftClickEvent=new WebGLPlot.Event,this._sceneRightClickEvent=new WebGLPlot.Event,this._featureDragEvent=new WebGLPlot.Event,this._featureDoubleClickEvent=new WebGLPlot.Event,this.CtrlPosition.addListener();let e=this;this._handler.setInputAction((function(t){!e._active||_0x49bc0f("LEFT_CLICK",t.position,e)}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK);var t=null;this._handler.setInputAction((function(i){if(WebGLPlot.defined(e._graphicObject)&&(e._graphicObject.showMode===_0x3f7d9f.Vector||e._graphicObject.showMode===_0x3f7d9f.Marker)&&e._active){var n=e._scene.pick(i.endPosition);t&&(!n||t!==n.primitive)&&(!(t.isDestroyed&&t.isDestroyed())&&t.mouseOut(i.endPosition),t=null),n&&n.primitive&&((n=n.primitive).mouseOut&&(t=n),n.mouseMove&&n.mouseMove(i.endPosition))}}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this._handler.setInputAction((function(t){!e._active||_0x49bc0f("LEFT_DOWN",t.position,e,void 0)}),WebGLPlot.ScreenSpaceEventType.LEFT_DOWN),this._handler28s=new WebGLPlot.ScreenSpaceEventHandler(e._scene.canvas),this._handler28s.setInputAction((function(t){if(e._active){var i=null,n=e._scene.pick(t.position);n&&n.id&&null!==n.primitive&&WebGLPlot.defined(n.primitive.SymbolType)&&(i=e._plottingLayer.getFeatureByUuid(n.id)),i?e._featureLeftClickEvent.raiseEvent(i,t.position):e._sceneLeftClickEvent.raiseEvent(t.position)}}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this._handler28s.setInputAction((function(t){if(e._active){var i=null,n=e._scene.pick(t.position);n&&n.id&&null!==n.primitive&&WebGLPlot.defined(n.primitive.SymbolType)&&(i=e._plottingLayer.getFeatureByUuid(n.id)),i?e._featureRightClickEvent.raiseEvent(i,t.position):e._sceneRightClickEvent.raiseEvent(t.position)}}),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK),this._handler28s.setInputAction((function(t){if(e._active){var i=null,n=e._scene.pick(t.position);n&&n.id&&null!==n.primitive&&WebGLPlot.defined(n.primitive.SymbolType)&&(i=e._plottingLayer.getFeatureByUuid(n.id)),e._featureDoubleClickEvent.raiseEvent(i,t.position)}}),WebGLPlot.ScreenSpaceEventType.LEFT_DOUBLE_CLICK)},_0x5523fd.prototype.setPlottingLayer=function(e){return!!e&&(this.releaseSelection(),this._plottingLayer=e,e._plottingEdit=this,!0)},Object.defineProperties(_0x5523fd.prototype,{plottingLayer:{get:function(){return this._plottingLayer},set:function(e){e!==this._plottingLayer&&(this._plottingLayer=e)}},SelectedEvent:{get:function(){return this._featureSelectedEvent}},FeatureSelectedEvent:{get:function(){return this._featureSelectedEvent}},ModifiedEvent:{get:function(){return this._featureModifiedEvent}},FeatureModifiedEvent:{get:function(){return this._featureModifiedEvent}},UnSelectedEvent:{get:function(){return this._featureReleaseEvent}},RemoveFeatureEvent:{get:function(){return this._featureRemoveEvent}},FeatureRemoveEvent:{get:function(){return this._featureRemoveEvent}},FeatureLeftClickEvent:{get:function(){return this._featureLeftClickEvent}},FeatureRightClickEvent:{get:function(){return this._featureRightClickEvent}},SceneLeftClickEvent:{get:function(){return this._sceneLeftClickEvent}},SceneRightClickEvent:{get:function(){return this._sceneRightClickEvent}},FeatureDoubleClickEvent:{get:function(){return this._featureDoubleClickEvent}},FeatureDragEvent:{get:function(){return this._featureDragEvent}},editMode:{get:function(){return this._editMode},set:function(e){this._editMode!==e&&(this._editMode=e,this.unSelection(!1))}},pickRectangle:{get:function(){return this._pickRectangle},set:function(e){WebGLPlot.defined(e.x)&&WebGLPlot.defined(e.y)&&(this._pickRectangle=new WebGLPlot.Cartesian2(e.x,e.y))}}}),_0x5523fd.prototype.unSelection=function(e){WebGLPlot.defined(this._graphicObject)&&e&&_0x43a805.getInstance().symbolUnSelected.raiseEvent(this._graphicObject.id),this.releaseSelection(!1)},_0x5523fd.prototype.releaseSelection=function(e){WebGLPlot.defined(this._graphicObject)&&(this.clearAllEditCtrl(),e||(this._plottingLayer._selectedFeature=void 0))},_0x5523fd.prototype.clearAllEditCtrl=function(){WebGLPlot.defined(this._graphicObject)&&null!==this._graphicObject&&(this.CtrlPosition.removeAll(),this._graphicObject._initialize=!1,this._graphicObject._isSelected=!1,this._graphicObject instanceof _0x20e33d&&this.drawGroupObjectEditObject(this._graphicObject,!1),_0x3f7d9f.Marker===this._graphicObject.showMode&&this.drawModelEditObject(!1),_0x3f7d9f.Vector===this._graphicObject.showMode&&this.drawVectorEditObject(!1),this._graphicObject=null)},_0x5523fd.prototype.activate=function(){!this._plottingLayer||!this._plottingLayer._isSelected||this.isActive()||(this._active=!0)},_0x5523fd.prototype.pickRect=function(e,t){var i=t.x-e.x,n=t.y-e.y,r=(t.x+e.x)/2,o=(t.y+e.y)/2;return _0x49bc0f("LEFT_CLICK",new WebGLPlot.Cartesian2(r,o),this,{width:i,height:n})},_0x5523fd.prototype.DoSelectObject=function(e,t=!0){this._graphicObject=e,this._graphicObject._isEdit=!0,this._graphicObject._isSelected=!0,this._plottingLayer._selectedFeature=e,this._graphicObject._initialize=!1,t&&(this._featureSelectedEvent.raiseEvent(this._graphicObject),_0x43a805.getInstance().symbolSelected.raiseEvent(this._graphicObject))},_0x5523fd.prototype.DoSelectObjectEdit=function(e){!e||!(e instanceof _0x521a23)||!this._plottingLayer.isSelected||(this.releaseSelection(),this.DoSelectObject(e),this._plottingLayer._isEditable&&this.drawSymbolExtend(e))},_0x5523fd.prototype.drawSymbolExtend=function(e){var t=e.symbolType;e.showMode,_0x585354.SYMBOL_UNKNOW!==t&&(_0x585354.SYMBOL_MODEL!==t||_0x585354.SYMBOL_DOT!==t||_0x585354.SYMBOL_PICTURE!==t)&&this.createCtrlPoints(e)},_0x5523fd.prototype.addAnnotationArrayPositionPt=function(e,t){this.CtrlPosition.createAnnotationCtrlPoint(e,t)},_0x5523fd.prototype.deactivate=function(){this.releaseSelection(),this._active=!1},_0x5523fd.prototype.isActive=function(){return this._active},_0x5523fd.prototype.createCtrlPoints=function(e){this.CtrlPosition.createCtrlPoints(e),this.ModelEditControl.hideModeEditBouds(!1)},_0x5523fd.prototype.drawModelEditObject=function(e){this.CtrlPosition.removeAll(),this._graphicObject&&_0x3f7d9f.Marker===this._graphicObject.showMode&&(this.ModelEditControl.destoryBoundsCtrl(),this.ModelEditControl.createModeEditBouds(e))},_0x5523fd.prototype.drawVectorEditObject=function(e){this.CtrlPosition.removeAll(),this.ModelEditControl.destoryBoundsCtrl(),this.ModelEditControl.createVectorEditBouds(e)},_0x5523fd.prototype.drawGroupObjectEditObject=function(e,t){if(e instanceof _0x20e33d)if(t&&!this.groupObjectEditObject){var i=e.getBounds(),n=.5*(i.max_X+i.min_X),r=.5*(i.max_Y+i.min_Y);i.max_Z,i.min_Z;var o=new WebGLPlot.Cartesian3(i.min_X,i.max_Y,0),a=new WebGLPlot.Cartesian3(i.max_X,i.max_Y,0),s=new WebGLPlot.Cartesian3(i.min_X,i.min_Y,0),l=_0x51d1e4.getSpaceDistance(o,a)+i.modelRadius,u=_0x51d1e4.getSpaceDistance(o,s)+i.modelRadius,c=i.max_Z-i.min_Z;c=c>i.modelRadius?c:i.modelRadius,e._centerPt3D=new WebGLPlot.Cartesian3(n,r,i.min_Z);var h=new WebGLPlot.Cartesian3(l,u,c);h.z<0&&(h.z=0);var d=this.ModelEditControl.createBoxGeometry(new WebGLPlot.Cartesian3(n,r,i.min_Z+.5*c),h);this.groupObjectEditObject=this._scene.primitives.add(d),this.CtrlPosition._ctrlPoints.removeAll(),this.CtrlPosition.createGroupObjectCtrlPoint(e,e._centerPt3D,0)}else t||(this.CtrlPosition._ctrlPoints.removeAll(),this._scene.primitives.remove(this.groupObjectEditObject),this.groupObjectEditObject=null)},_0x5523fd.prototype.removeGroupObjectEditObject=function(){this.groupObjectEditObject&&(this._scene.primitives.remove(this.groupObjectEditObject),this.groupObjectEditObject=null)},_0x5523fd.prototype.cut=function(){null!==this._graphicObject&&this._plottingLayer&&this._plottingLayer._isEditable&&(this.pasteGeoJson=this._graphicObject.toGeoJson(),this._plottingLayer.removeGeoGraphicObject(this._graphicObject))},_0x5523fd.prototype.copy=function(){null!==this._graphicObject&&(this.pasteGeoJson=this._graphicObject.toGeoJson())},_0x5523fd.prototype.paste=function(e){if(null!==this.pasteGeoJson&&this._plottingLayer&&this._plottingLayer._isEditable){var t=JSON.parse(this.pasteGeoJson);if(t.uuid=WebGLPlot.createGuid(),WebGLPlot.defined(e))if(_0x51d1e4.isSymbolDot(parseInt(t.symbolType))||parseInt(t.symbolType)===_0x585354.SYMBOL_TEXT)t.localePoints[0].x=e.x,t.localePoints[0].y=e.y,t.localePoints[0].z=e.z;else for(var i=e.x-t._CenterPosition.x,n=e.y-t._CenterPosition.y,r=0;r<t.localePoints.length;++r)t.localePoints[r].x=t.localePoints[r].x+i,t.localePoints[r].y=t.localePoints[r].y+n,t.localePoints[r].z=e.z;return this._plottingLayer.geoJsonToGeoGraphicObject(t),t.uuid}},_0x5523fd.prototype.clearCopyOrCut=function(){this.pasteGeoJson=null},_0x5523fd.prototype.activateModelShortCutEdit=function(){this.ModelScaleShortCuts_Active||document.addEventListener("keydown",_0x5cb913,!1),this.ModelScaleShortCuts_Active=!0},_0x5523fd.prototype.deActivateModelShortCutEdit=function(){document.removeEventListener("keydown",_0x5cb913),this.ModelScaleShortCuts_Active=!1};var _0x537431=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xb11944=_0x537431(void 0,(function(){return _0xb11944.toString().search("(((.+)+)+)+$").toString().constructor(_0xb11944).search("(((.+)+)+)+$")}));function _0x39c322(e,t){if(!WebGLPlot.defined(t)||!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("plottingLayer || scene is required!");this._handler=new WebGLPlot.ScreenSpaceEventHandler(e.canvas),this._scene=e,this._isDrawing=!1,this._geoGraphicObject=void 0,this._layer=t,this._active=!1,this._drawFinishEvent=new WebGLPlot.Event,this._drawControlEndEvent=new WebGLPlot.Event,this._libID=-1,this._code=-1,this._Url="",this._Url2="",this._serverUrl="";var i=this;this._handler.setInputAction((function(e){_0x238e43(e,i)}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this._handler.setInputAction((function(e){_0x1383fc(e,i)}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this._handler.setInputAction((function(e){_0x463b26(e,i)}),WebGLPlot.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),this._handler.setInputAction((function(e){_0x4b4e76(e,i)}),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK)}function _0x238e43(e,t){var i=t;if(i._active&&i._layer&&i&&i._active){var n=i._scene,r=_0x51d1e4.getPosition(n,e.position);if(r)if(i._isDrawing){if(null===i._geoGraphicObject||void 0===i._geoGraphicObject)return void(i._isDrawing=!1);i._geoGraphicObject.localPoints.length>=i._geoGraphicObject.getMaxEditPts()?_0x4cc5de(t):(r.z+=1,i._geoGraphicObject.localPoints.push(r),i._geoGraphicObject._initialize=!1)}else{i._isDrawing=!0;var o=null;if(0===i._libID){switch(i._code){case _0x585354.SYMBOL_MODEL:case _0x585354.SYMBOL_PICTURE:case _0x585354.SYMBOL_POINT:o=new _0x36b026({layer:i._layer,libID:i._libID,code:i._code,localPoints:[]}),i._code===_0x585354.SYMBOL_MODEL?(o._modelPath=i._Url,o._picturePath=i._Url2,o._showMode=_0x3f7d9f.Marker):i._code===_0x585354.SYMBOL_PICTURE&&(o._picturePath=i._Url,o._modelPath=i._Url2,o._showMode=_0x3f7d9f.Picture);break;default:o=new _0x34d5f9({layer:i._layer,libID:i._libID,code:i._code,localPoints:[],isDrawing:!0,isEdit:!1})}o._symbolType=i._code}else void 0!==i._serverData&&null!==i._serverData&&i._serverData.symbolType===_0x585354.SYMBOL_DOT?o=new _0x36b026({layer:i._layer,libID:i._libID,code:i._code,localPoints:[],serverData:i._serverData}):i._serverData.symbolType===_0x585354.SYMBOL_ALGO&&(o=new _0x34d5f9({layer:i._layer,libID:i._libID,code:i._code,localPoints:[],serverData:i._serverData,isDrawing:!0}));if(null===o||o._symbolType===_0x585354.SYMBOL_UNKNOW)return void(i._isDrawing=!1);_0x51d1e4.isSymbolDot(o._symbolType)?(i._geoGraphicObject=o,i._geoGraphicObject.localPoints.push(r),i._layer.isEditable&&i._layer._geoGraphicObjects.push(o),_0x4cc5de(t)):(i._geoGraphicObject=o,i._geoGraphicObject.localPoints.push(r),i._layer.isEditable&&i._layer._geoGraphicObjects.push(o),0===i._libID&&34===i._code&&_0x4cc5de(t))}}}function _0x1383fc(e,t){var i=t;if(i._active&&i&&i._active&&i._isDrawing&&i._geoGraphicObject){var n=i._scene,r=_0x51d1e4.getPosition(n,e.endPosition);if(r)i._geoGraphicObject.localPoints.length>=2&&i._geoGraphicObject.localPoints.pop(),i._geoGraphicObject.localPoints.push(r),i._geoGraphicObject._initialize=!1}}function _0x463b26(e,t){var i=t;if(i._active){if(i._geoGraphicObject._symbolType!==_0x585354.SYMBOL_DOT){var n=i._geoGraphicObject.localPoints.length;i._geoGraphicObject.localPoints.splice(n-2,2)}_0x4cc5de(t)}}function _0x4b4e76(e,t){var i=t;i._active?(_0x4cc5de(t),i._drawControlEndEvent.raiseEvent(t._geoGraphicObject),i._serverData=null,t._isDrawing||t.deactivate()):i._scene._canvas.style.cursor=""}function _0x4cc5de(e){var t=e;if(t._isDrawing&&WebGLPlot.defined(t._geoGraphicObject)){var i=t._geoGraphicObject;if(_0x51d1e4.clearSamePtsXY(i.localPoints).length<i.getMinEditPts())return t._layer.removeGeoGraphicObject(i),t._isDrawing=!1,void(t._geoGraphicObject=void 0);t._geoGraphicObject.isDrawing=!1,t._geoGraphicObject._initialize=!1,t._isDrawing=!1,t._drawFinishEvent.raiseEvent(e._geoGraphicObject),t._layer.symbolAddedEvent.raiseEvent(e._geoGraphicObject),_0x43a805.getInstance().symbolAdded.raiseEvent(e._geoGraphicObject,t._layer.name)}}_0xb11944(),_0x39c322.prototype.activate=function(e,t,i,n){if(this._layer&&this._layer._scene&&this._layer.isEditable)if(WebGLPlot.defined(e)&&WebGLPlot.defined(t)){if("number"!=typeof e||"number"!=typeof t)return void console.log("PlotDrawControl activate libID or code should be number");(!WebGLPlot.defined(i)||null==i)&&(i="");let r="";r=WebGLPlot.defined(n)&&WebGLPlot.defined(n.url)?n.url:"",this._libID=e,this._code=t,this._Url=i,this._Url2=r,0===e?this.setDrawPrototype():this.getServerData(this._libID,this._code)}else(null===this._serverData||!WebGLPlot.defined(this._serverData))&&0!==this._libID&&!WebGLPlot.getLibManager(this._scene._plottingID).useServerData&&this.getServerDataFromLocal(symbolLibManager,this._libID,this._code),this.setDrawPrototype()},_0x39c322.prototype.setDrawPrototype=function(){-1===this._libID&&-1===this._code||(this._active=!0,this._scene._canvas.style.cursor="crosshair",_0x51d1e4.screenSpaceCameraController(this._scene,!1))},_0x39c322.prototype.setAction=function(e,t,i,n){if(!this._active&&((!WebGLPlot.defined(i)||null==i)&&(i=""),WebGLPlot.defined(e)&&WebGLPlot.defined(t)&&null!==e&&null!==t&&this._layer&&this._layer._scene)){if("number"!=typeof e||"number"!=typeof t)return void console.log("PlotDrawControl setAction libId or code should be number");let r="";r=WebGLPlot.defined(n)&&WebGLPlot.defined(n.url)?n.url:"",this._libID=e,this._code=t,this._Url=i,this._Url2=r,0!==e&&this.getServerData(this._libID,this._code)}},_0x39c322.prototype.getServerData=function(e,t){var i=WebGLPlot.getLibManager(this._layer._scene._plottingID).getSymbolData(e,t);if(!WebGLPlot.defined(i)||null===i){var n=WebGLPlot.getServerData(e,t,void 0,this._layer._scene._plottingID);return n?(this._serverData=n,n):void 0}this._serverData=i},_0x39c322.prototype.getServerDataFromLocal=function(e,t,i){var n=e.localSymbolLibData;this._serverData=n[t][i]},Object.defineProperties(_0x39c322.prototype,{libID:{get:function(){return this._libID}},code:{get:function(){return this._code}},serverUrl:{get:function(){return this._serverUrl},set:function(e){e!==this._serverUrl&&(this._serverUrl=e)}},drawFinishEvent:{get:function(){return this._drawFinishEvent}},drawControlEndEvent:{get:function(){return this._drawControlEndEvent}},plottingLayer:{get:function(){return this._layer},set:function(e){e!==this._layer&&(this._layer=e)}}}),_0x39c322.prototype.setPlottingLayer=function(e){return!!e&&(this._layer=e,!0)},_0x39c322.prototype.deactivate=function(){this._active=!1,this._isDrawing=!1,this._libID=-1,this._code=-1,delete this._geoGraphicObject,this._scene._canvas.style.cursor="",_0x51d1e4.screenSpaceCameraController(this._layer._scene,!0)};const _0x1c5261=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x155cb7=_0x1c5261(void 0,(function(){return _0x155cb7.toString().search("(((.+)+)+)+$").toString().constructor(_0x155cb7).search("(((.+)+)+)+$")}));_0x155cb7();class _0x47ddb3{constructor(e,t){this._isGroup=t,this._UUID=WebGLPlot$g.createGuid(),this._name=e,this._parentNode=void 0,this._childNodes=[],this._isModified=!1}_getRootNode(){let e=this;for(;!e.isRootNode();)e=e._parentNode;return e}_removeGeoEntityNode(e){let t=this.findNode(e);if(!t.isGroupNode()){let i=t._parentNode,n=i.indexOf(e);i._childNodes.splice(n,1),this._isModified=!0,this._save()}}_clear(){this._childNodes.splice(0),this._isModified=!0,this._save()}_isModify(){return!!this._isModified||(this._childNodes.forEach((e=>{if(e._isModify())return!0})),!1)}_setIsModify(e){this._isModified=e,this._childNodes.forEach((t=>{t._setIsModify(e)}))}_save(){_0x373a17.getInstance()._saveGeoEntity(!1)}_hasGeoEntityChildNode(e){if(e.isGroupNode())for(let t=0;t<e._childNodes.length;t++){let i=e._childNodes[t];return!i.isGroupNode()||this._hasGeoEntityChildNode(i)}return!1}_fromJson(e,t){if(!WebGLPlot$g.defined(t))return;let i=JSON.parse(e);!WebGLPlot$g.defined(i)||(WebGLPlot$g.defined(i.isGroup)&&(this._isGroup=i.isGroup),WebGLPlot$g.defined(i.UUID)&&(this._UUID=i.UUID),WebGLPlot$g.defined(i.name)&&(this._name=i.name),WebGLPlot$g.defined(i.parentUUID)&&(this._parentNode=t.findNode(i.parentUUID)),WebGLPlot$g.defined(i.childNodes)&&(this._childNodes=[],i.childNodes.forEach((e=>{let i=new _0x47ddb3("",!1);this._childNodes.push(i),i._fromJson(e,t)}))),this._isModified=!1)}_toJson(){let e={};return e.hasOwnProperty("isGroup")||(e.isGroup=this._isGroup),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),WebGLPlot$g.defined(this._parentNode)&&(e.hasOwnProperty("parentUUID")||(e.parentUUID=this._parentNode.getUUID())),e.hasOwnProperty("childNodes")||(e.childNodes=[],this._childNodes.forEach((t=>{e.childNodes.push(t._toJson())}))),JSON.stringify(e)}getParentNode(){return this._parentNode}isRootNode(){return void 0===this._parentNode}isGroupNode(){return this._isGroup}getUUID(){return this._UUID}getName(){return this._name}setName(e){this._name=e,this._isModified=!0,this._save()}createGroupNode(e){let t;return this._isGroup&&(t=new _0x47ddb3(e,!0),t._parentNode=this,this._childNodes.push(t),this._isModified=!0,this._save()),t}removeGroupNode(e){let t=this.findNode(e);if(t.isGroupNode()&&!this._hasGeoEntityChildNode(t)){let i=t._parentNode;if(WebGLPlot$g.defined(i))for(let t=0;t<i._childNodes.length;t++)if(i._childNodes[t].getUUID()===e){i._childNodes.splice(t,1),this._isModified=!0,this._save();break}}}createGeoEntityNode(e){let t;return this._isGroup&&(t=new _0x47ddb3(e.getName(),!1),t._UUID=e.getUUID(),t._parentNode=this,this._childNodes.push(t),this._isModified=!0,this._save()),t}getChildNodes(){return this._childNodes}findNode(e){let t;if(this._UUID===e)return this;for(let i=0;i<this._childNodes.length;i++){const n=this._childNodes[i];if(n.getUUID()===e){t=n;break}if(n._isGroup&&(t=n.findNode(e),WebGLPlot$g.defined(t)))break}return t}indexOf(e){let t=-1;for(let i=0;i<this._childNodes.length;i++)if(this._childNodes[i].getUUID()===e){t=i;break}return t}moveNodeTo(e,t,i){if(!this.isGroupNode()||!t.isGroupNode()||e>=this._childNodes.length)return!1;let n=this._childNodes.splice(e,1);if(0===n.length)return!1;let r=n[0];return r._parentNode=t,-1===i||i>=t.getChildNodes().length?t._childNodes.push(r):t._childNodes.splice(i,0,r),this._isModified=!0,this._save(),!0}moveTo(e,t){if(!e.isGroupNode())return!1;let i=this.getParentNode();if(WebGLPlot$g.defined(i)){let n=i.indexOf(this._UUID);if(i.moveNodeTo(n,e,t))return this._isModified=!0,this._save(),!0}return!1}}const _0x4ab8e5=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x7ff33b=_0x4ab8e5(void 0,(function(){return _0x7ff33b.toString().search("(((.+)+)+)+$").toString().constructor(_0x7ff33b).search("(((.+)+)+)+$")}));_0x7ff33b();class _0x2654ba{constructor(){this._geoEntityParameter=new _0x30275b,this._displayEffectsUUID=[]}_getGeoEntityParameter(){return this._geoEntityParameter}_updateGeoEntityParameter(e){this._geoEntityParameter._update(e)}_updateGeoEntityParameterValue(e){this._geoEntityParameter._updateValue(e)}_mergeGeoEntityParameter(e){this._geoEntityParameter._merge(e)}_mergeGeoEntityParameterValue(e){this._geoEntityParameter._mergeValue(e)}_toJson(){let e={};return e.hasOwnProperty("geoEntityParameter")||(e.geoEntityParameter=this._geoEntityParameter._toJson()),e.hasOwnProperty("displayEffectsUUID")||(e.displayEffectsUUID=this._displayEffectsUUID),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$g.defined(t.geoEntityParameter)&&this._geoEntityParameter._fromJson(t.geoEntityParameter),WebGLPlot$g.defined(t.displayEffectsUUID)&&(this._displayEffectsUUID=t.displayEffectsUUID)}updateGeoEntityEffects(e){e.forEach((e=>{e.isVisible()&&this._displayEffectsUUID.push(e.getUUID())}))}clone(){let e=new _0x2654ba;return e._geoEntityParameter=this._geoEntityParameter.clone(),e._displayEffectsUUID=this._displayEffectsUUID,e}getUUID(){return this._UUID}setShowMode(e){this._geoEntityParameter.setShowMode(e)}getShowMode(){return this._geoEntityParameter.getShowMode()}setModelPath(e){this._geoEntityParameter.setModelPath(e)}getModelPath(){return this._geoEntityParameter.getModelPath()}setModelScale(e){this._geoEntityParameter.setModelScale(e)}getModelScale(){return this._geoEntityParameter.getModelScale()}setModelRotate(e){this._geoEntityParameter.setModelRotate(e)}getModelRotate(){return this._geoEntityParameter.getModelRotate()}setPicturePath(e){this._geoEntityParameter.setPicturePath(e)}getPicturePath(){return this._geoEntityParameter.getPicturePath()}setPictureSymbolSize(e){this._geoEntityParameter.setPictureSymbolSize(e)}getPictureSymbolSize(){return this._geoEntityParameter.getPictureSymbolSize()}setDotPlotLibID(e){this._geoEntityParameter.setDotPlotLibID(e)}getDotPlotLibID(){return this._geoEntityParameter.getDotPlotLibID()}setDotPlotCode(e){this._geoEntityParameter.setDotPlotCode(e)}getDotPlotCode(){return this._geoEntityParameter.getDotPlotCode()}setDotPlotStyle(e){this._geoEntityParameter.setDotPlotStyle(e)}getDotPlotStyle(){return this._geoEntityParameter.getDotPlotStyle()}setGridSymbolSize(e){this._geoEntityParameter.setGridSymbolSize(e)}getGridSymbolSize(){return this._geoEntityParameter.getGridSymbolSize()}setVisible(e){this._geoEntityParameter.setVisible(e)}isVisible(){return this._visible}setDisplayEffectsUUID(e){this._displayEffectsUUID=e}getDisplayEffectsUUID(){return this._displayEffectsUUID}}const _0x598d0c=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x1445a7=_0x598d0c(void 0,(function(){return _0x1445a7.toString().search("(((.+)+)+)+$").toString().constructor(_0x1445a7).search("(((.+)+)+)+$")}));_0x1445a7();class _0x248ebf{constructor(){this._symbolStyle=new _0x5bc221,this._lineSymbolID=0,this._lineWidth=3,this._surroundLineWidth=3,this._symbolRank=0,this._symbolRanks=[],this._isNegativeImage=!1,this._textContent="",this._symbolTextStyle=new _0x37327d,this._textPosition=0}clone(){let e=new _0x248ebf;return e._symbolStyle=this._symbolStyle.clone(),e._lineSymbolID=this._lineSymbolID,e._lineWidth=this._lineWidth,e._surroundLineWidth=this._surroundLineWidth,e._symbolRank=this._symbolRank,e._symbolRanks=this._symbolRanks,e._isNegativeImage=this._isNegativeImage,e._textContent=this._textContent,e._symbolTextStyle=this._symbolTextStyle.clone(),e._textPosition=this._textPosition,e}getSymbolStyle(){return this._symbolStyle}setSymbolStyle(e){this._symbolStyle=e}getLineSymbolID(){return this._lineSymbolID}setLineSymbolID(e){this._lineSymbolID=e}getLineWidth(){return this._lineWidth}setLineWidth(e){this._lineWidth=e}getSurroundLineWidth(){return this._surroundLineWidth}setSurroundLineWidth(e){this._surroundLineWidth=e}getSymbolRank(){return this._symbolRank}setSymbolRank(e){this._symbolRank=e}getSymbolRanks(){return this._symbolRanks}isNegativeImage(){return this._isNegativeImage}setNegativeImage(e){this._isNegativeImage=e}getTextContent(){return this._textContent}setTextContent(e){this._textContent=e}getSymbolTextStyle(){return this._symbolTextStyle}setSymbolTextStyle(e){this._symbolTextStyle=e}getTextPosition(){return this._textPosition}setTextPosition(e){this._textPosition=e}setGeoGraphicObjectStyle(e){e.symbolStyle=this._symbolStyle.clone(),e.lineSymbolID=this._lineSymbolID,e.gridLineWidth=this._lineWidth,e.gridSurroundLineWidth=this._surroundLineWidth,e.symbolRank=this._symbolRank,e.isNegativeImage=this._isNegativeImage,e.textContent=this._textContent,e.symbolTextStyle=this._symbolTextStyle.clone(),e.textPos=this._textPosition}getGeoGraphicObjectStyle(e){this._symbolStyle=e.symbolStyle.clone(),this._lineSymbolID=e.lineSymbolID,this._lineWidth=e.gridLineWidth,this._surroundLineWidth=e.gridSurroundLineWidth,this._symbolRank=e.symbolRank,this._symbolRanks=e.symbolRanks,this._isNegativeImage=e.isNegativeImage,this._textContent=e.textContent,this._symbolTextStyle=e.symbolTextStyle.clone(),this._textPosition=e.textPos}toJson(){let e={};if(!e.hasOwnProperty("symbolStyle")){var t={};t.lineColor=_0x1569f6.colorToObject(this._symbolStyle.lineColor),t.fillSymbolID=this._symbolStyle.fillSymbolID,t.surroundLineType=this._symbolStyle.surroundLineType,t.surroundLineColor=_0x1569f6.colorToObject(this._symbolStyle.surroundLineColor),t.fillForeColor=_0x1569f6.colorToObject(this._symbolStyle.fillForeColor),t.fillOpaqueRate=100-this._symbolStyle.fillOpaqueRate,t.fillGradientMode=this._symbolStyle.fillGradientMode,t.fillBackColor=_0x1569f6.colorToObject(this._symbolStyle.fillBackColor),t.fillGradientOffsetRatioX=this._symbolStyle.fillGradientOffsetRatioX,t.fillGradientOffsetRatioY=this._symbolStyle.fillGradientOffsetRatioY,t.fillGradientAngle=this._symbolStyle.fillGradientAngle,e.symbolStyle=t}if(e.hasOwnProperty("lineSymbolID")||(e.lineSymbolID=this._lineSymbolID),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("surroundLineWidth")||(e.surroundLineWidth=this._surroundLineWidth),e.hasOwnProperty("symbolRank")||(e.symbolRank=this._symbolRank),e.hasOwnProperty("symbolRanks")||(e.symbolRanks=this._symbolRanks),e.hasOwnProperty("isNegativeImage")||(e.isNegativeImage=this._isNegativeImage),e.hasOwnProperty("textContent")||(e.textContent=this._textContent),e.hasOwnProperty("textPosition")||(e.textPosition=this._textPosition),!e.hasOwnProperty("textStyle")){var i={};i.fontSize=this._symbolTextStyle.fontSize,i.foreColor=_0x1569f6.colorToObject(this._symbolTextStyle.foreColor),i.fontName=this._symbolTextStyle.fontName,i.isShowTextBox=this._symbolTextStyle.isShowTextBox,i.textBoxLineColor=_0x1569f6.colorToObject(this._symbolTextStyle.textBoxLineColor),i.textBoxColor=_0x1569f6.colorToObject(this._symbolTextStyle.textBoxColor),i.outline=this._symbolTextStyle.outline,i.outlineWidth=this._symbolTextStyle.outlineWidth,i.backColor=_0x1569f6.colorToObject(this._symbolTextStyle.backColor),e.textStyle=i}return JSON.stringify(e)}fromJson(e){let t=JSON.parse(e);if(WebGLPlot$g.defined(t.symbolStyle)){let e=t.symbolStyle;WebGLPlot$g.defined(e.lineColor)&&(this._symbolStyle.lineColor=_0x1569f6.objectToColor(e.lineColor)),WebGLPlot$g.defined(e.fillSymbolID)&&(this._symbolStyle.fillSymbolID=e.fillSymbolID),WebGLPlot$g.defined(e.surroundLineType)&&(this._symbolStyle.surroundLineType=e.surroundLineType),WebGLPlot$g.defined(e.surroundLineColor)&&(this._symbolStyle.surroundLineColor=_0x1569f6.objectToColor(e.surroundLineColor)),WebGLPlot$g.defined(e.fillForeColor)&&(this._symbolStyle.fillForeColor=_0x1569f6.objectToColor(e.fillForeColor)),WebGLPlot$g.defined(e.fillOpaqueRate)&&(this._symbolStyle.fillOpaqueRate=e.fillOpaqueRate),WebGLPlot$g.defined(e.fillGradientMode)&&(this._symbolStyle.fillGradientMode=e.fillGradientMode),WebGLPlot$g.defined(e.fillBackColor)&&(this._symbolStyle.fillBackColor=_0x1569f6.objectToColor(e.fillBackColor)),WebGLPlot$g.defined(e.fillGradientAngle)&&(this._symbolStyle.fillGradientAngle=e.fillGradientAngle),WebGLPlot$g.defined(e.fillGradientOffsetRatioX)&&(this._symbolStyle.fillGradientOffsetRatioX=e.fillGradientOffsetRatioX),WebGLPlot$g.defined(e.fillGradientOffsetRatioY)&&(this._symbolStyle.fillGradientOffsetRatioY=e.fillGradientOffsetRatioY)}if(WebGLPlot$g.defined(t.lineSymbolID)&&(this._lineSymbolID=t.lineSymbolID),WebGLPlot$g.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$g.defined(t.surroundLineWidth)&&(this._surroundLineWidth=t.surroundLineWidth),WebGLPlot$g.defined(t.symbolRank)&&(this._symbolRank=t.symbolRank),WebGLPlot$g.defined(t.symbolRanks)&&(this._symbolRanks=t.symbolRanks),WebGLPlot$g.defined(t.isNegativeImage)&&(this._isNegativeImage=t.isNegativeImage),WebGLPlot$g.defined(t.textContent)&&(this._textContent=t.textContent),WebGLPlot$g.defined(t.textPosition)&&(this._textPosition=t.textPosition),WebGLPlot$g.defined(t.textStyle)){let e=t.textStyle;WebGLPlot$g.defined(e.fontSize)&&(this._symbolTextStyle.fontSize=e.fontSize),WebGLPlot$g.defined(e.foreColor)&&(this._symbolTextStyle.foreColor=_0x1569f6.objectToColor(e.foreColor)),WebGLPlot$g.defined(e.fontName)&&(this._symbolTextStyle.fontName=e.fontName),WebGLPlot$g.defined(e.isShowTextBox)&&(this._symbolTextStyle.isShowTextBox=e.isShowTextBox),WebGLPlot$g.defined(e.outline)&&(this._symbolTextStyle.outline=e.outline),WebGLPlot$g.defined(e.textBoxLineColor)&&(this._symbolTextStyle.textBoxLineColor=_0x1569f6.objectToColor(e.textBoxLineColor)),WebGLPlot$g.defined(e.textBoxColor)&&(this._symbolTextStyle.textBoxColor=_0x1569f6.objectToColor(e.textBoxColor)),WebGLPlot$g.defined(e.outlineWidth)&&(this._symbolTextStyle.outlineWidth=e.outlineWidth),WebGLPlot$g.defined(e.backColor)&&(this._symbolTextStyle.backColor=_0x1569f6.objectToColor(e.backColor))}}}const _0x1b44fa=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x4ee62e=_0x1b44fa(void 0,(function(){return _0x4ee62e.toString().search("(((.+)+)+)+$").toString().constructor(_0x4ee62e).search("(((.+)+)+)+$")}));_0x4ee62e();class _0x30275b{constructor(){this._position=new _0x45ea17,this._isPositionUpdate=!1,this._modelScale=1,this._isModelScaleUpdate=!1,this._vectorScale=1,this._isVectorScaleUpdate=!1,this._modelRotate=new _0x45ea17,this._isModelRotateUpdate=!1,this._vectorRotate=new _0x45ea17,this._isVectorRotateUpdate=!1,this._modelPath="",this._isModelPathUpdate=!1,this._visible=!0,this._isVisibleUpdate=!1,this._dotPlotLibID=0,this._isDotPlotLibIDUpdate=!1,this._dotPlotCode=0,this._isDotPlotCodeUpdate=!1,this._dotPlotStyle=new _0x248ebf,this._isDotPlotStyleUpdate=!1,this._pictureSymbolSize=new WebGLPlot$g.Cartesian2(0,0),this._isPictureSymbolSizeUpdate=!1,this._gridSymbolSize=new WebGLPlot$g.Cartesian2(0,0),this._isGridSymbolSizeUpdate=!1,this._picturePath="",this._isPicturePathUpdate=!1,this._showMode=_0x3f7d9f.Unkown,this._isShowModeUpdate=!1,this._autoChangeDisplayStatus=!1,this._isAutoChangeDisplayStatusUpdate=!1,this._mapDistanceDisplayStatus=new Map,this._isDistanceDisplayStatusUpdate=!1}_setIsUpdate(e){this._isPositionUpdate=e,this._isModelScaleUpdate=e,this._isVectorScaleUpdate=e,this._isModelRotateUpdate=e,this._isVectorRotateUpdate=e,this._isModelPathUpdate=e,this._isVisibleUpdate=e,this._isDotPlotLibIDUpdate=e,this._isDotPlotCodeUpdate=e,this._isDotPlotStyleUpdate=e,this._isPictureSymbolSizeUpdate=e,this._isGridSymbolSizeUpdate=e,this._isPicturePathUpdate=e,this._isShowModeUpdate=e,this._isAutoChangeDisplayStatusUpdate=e,this._isDistanceDisplayStatusUpdate=e}_update(e){this._position=new _0x45ea17(e._position.x,e._position.y,e._position.z),this._isPositionUpdate=!0,this._modelScale=e._modelScale,this._isModelScaleUpdate=!0,this._vectorScale=e._vectorScale,this._isVectorScaleUpdate=!0,this._modelRotate=new _0x45ea17(e._modelRotate.x,e._modelRotate.y,e._modelRotate.z),this._isModelRotateUpdate=!0,this._vectorRotate=new _0x45ea17(e._vectorRotate.x,e._vectorRotate.y,e._vectorRotate.z),this._isVectorRotateUpdate=!0,this._modelPath=e._modelPath,this._isModelPathUpdate=!0,this._visible=e._visible,this._isVisibleUpdate=!0,this._dotPlotLibID=e._dotPlotLibID,this._isDotPlotLibIDUpdate=!0,this._dotPlotCode=e._dotPlotCode,this._isDotPlotCodeUpdate=!0,this._dotPlotStyle=e._dotPlotStyle.clone(),this._isDotPlotStyleUpdate=!0,this._pictureSymbolSize=new WebGLPlot$g.Cartesian2(e._pictureSymbolSize.x,e._pictureSymbolSize.y),this._isPictureSymbolSizeUpdate=!0,this._gridSymbolSize=new WebGLPlot$g.Cartesian2(e._gridSymbolSize.x,e._gridSymbolSize.y),this._isGridSymbolSizeUpdate=!0,this._picturePath=e._picturePath,this._isPicturePathUpdate=!0,this._showMode=e._showMode,this._isShowModeUpdate=!0,this._autoChangeDisplayStatus=e._autoChangeDisplayStatus,this._isAutoChangeDisplayStatusUpdate=!0,this._mapDistanceDisplayStatus=new Map,e._mapDistanceDisplayStatus.forEach(((e,t)=>{WebGLPlot$g.defined(t)&&WebGLPlot$g.defined(e)&&this._mapDistanceDisplayStatus.set(t,e.clone())})),this._isDistanceDisplayStatusUpdate=!0}_updateValue(e){this._position=new _0x45ea17(e._position.x,e._position.y,e._position.z),this._modelScale=e._modelScale,this._vectorScale=e._vectorScale,this._modelRotate=new _0x45ea17(e._modelRotate.x,e._modelRotate.y,e._modelRotate.z),this._vectorRotate=new _0x45ea17(e._vectorRotate.x,e._vectorRotate.y,e._vectorRotate.z),this._modelPath=e._modelPath,this._visible=e._visible,this._dotPlotLibID=e._dotPlotLibID,this._dotPlotCode=e._dotPlotCode,this._dotPlotStyle=e._dotPlotStyle.clone(),this._pictureSymbolSize=new WebGLPlot$g.Cartesian2(e._pictureSymbolSize.x,e._pictureSymbolSize.y),this._gridSymbolSize=new WebGLPlot$g.Cartesian2(e._gridSymbolSize.x,e._gridSymbolSize.y),this._picturePath=e._picturePath,this._showMode=e._showMode,this._autoChangeDisplayStatus=e._autoChangeDisplayStatus,this._mapDistanceDisplayStatus=new Map,e._mapDistanceDisplayStatus.forEach(((e,t)=>{WebGLPlot$g.defined(t)&&WebGLPlot$g.defined(e)&&this._mapDistanceDisplayStatus.set(t,e.clone())}))}_merge(e){e._isPositionUpdate&&(this._position=new _0x45ea17(e._position.x,e._position.y,e._position.z),this._isPositionUpdate=!0),e._isModelScaleUpdate&&(this._modelScale=e._modelScale,this._isModelScaleUpdate=!0),e._isVectorScaleUpdate&&(this._vectorScale=e._vectorScale,this._isVectorScaleUpdate=!0),e._isModelRotateUpdate&&(this._modelRotate=new _0x45ea17(e._modelRotate.x,e._modelRotate.y,e._modelRotate.z),this._isModelRotateUpdate=!0),e._isVectorRotateUpdate&&(this._vectorRotate=new _0x45ea17(e._vectorRotate.x,e._vectorRotate.y,e._vectorRotate.z),this._isVectorRotateUpdate=!0),e._isModelPathUpdate&&(this._modelPath=e._modelPath,this._isModelPathUpdate=!0),e._isVisibleUpdate&&(this._visible=e._visible,this._isVisibleUpdate=!0),e._isDotPlotLibIDUpdate&&(this._dotPlotLibID=e._dotPlotLibID,this._isDotPlotLibIDUpdate=!0),e._isDotPlotCodeUpdate&&(this._dotPlotCode=e._dotPlotCode,this._isDotPlotCodeUpdate=!0),e._isDotPlotStyleUpdate&&(this._dotPlotStyle=e._dotPlotStyle.clone(),this._isDotPlotStyleUpdate=!0),e._isPictureSymbolSizeUpdate&&(this._pictureSymbolSize=new WebGLPlot$g.Cartesian2(e._pictureSymbolSize.x,e._pictureSymbolSize.y),this._isPictureSymbolSizeUpdate=!0),e._isGridSymbolSizeUpdate&&(this._gridSymbolSize=new WebGLPlot$g.Cartesian2(e._gridSymbolSize.x,e._gridSymbolSize.y),this._isGridSymbolSizeUpdate=!0),e._isPicturePathUpdate&&(this._picturePath=e._picturePath,this._isPicturePathUpdate=!0),e._isShowModeUpdate&&(this._showMode=e._showMode,this._isShowModeUpdate=!0),e._isAutoChangeDisplayStatusUpdate&&(this._autoChangeDisplayStatus=e._autoChangeDisplayStatus,this._isAutoChangeDisplayStatusUpdate=!0),e._isDistanceDisplayStatusUpdate&&(this._mapDistanceDisplayStatus=new Map,e._mapDistanceDisplayStatus.forEach(((e,t)=>{WebGLPlot$g.defined(t)&&WebGLPlot$g.defined(e)&&this._mapDistanceDisplayStatus.set(t,e.clone())})),this._isDistanceDisplayStatusUpdate=!0)}_mergeValue(e){e._isPositionUpdate&&(this._position=new _0x45ea17(e._position.x,e._position.y,e._position.z)),e._isModelScaleUpdate&&(this._modelScale=e._modelScale),e._isVectorScaleUpdate&&(this._vectorScale=e._vectorScale),e._isModelRotateUpdate&&(this._modelRotate=new _0x45ea17(e._modelRotate.x,e._modelRotate.y,e._modelRotate.z)),e._isVectorRotateUpdate&&(this._vectorRotate=new _0x45ea17(e._vectorRotate.x,e._vectorRotate.y,e._vectorRotate.z)),e._isModelPathUpdate&&(this._modelPath=e._modelPath),e._isVisibleUpdate&&(this._visible=e._visible),e._isDotPlotLibIDUpdate&&(this._dotPlotLibID=e._dotPlotLibID),e._isDotPlotCodeUpdate&&(this._dotPlotCode=e._dotPlotCode),e._isDotPlotStyleUpdate&&(this._dotPlotStyle=e._dotPlotStyle.clone()),e._isPictureSymbolSizeUpdate&&(this._pictureSymbolSize=new WebGLPlot$g.Cartesian2(e._pictureSymbolSize.x,e._pictureSymbolSize.y)),e._isGridSymbolSizeUpdate&&(this._gridSymbolSize=new WebGLPlot$g.Cartesian2(e._gridSymbolSize.x,e._gridSymbolSize.y)),e._isPicturePathUpdate&&(this._picturePath=e._picturePath),e._isShowModeUpdate&&(this._showMode=e._showMode),e._isAutoChangeDisplayStatusUpdate&&(this._autoChangeDisplayStatus=e._autoChangeDisplayStatus),e._isDistanceDisplayStatusUpdate&&(this._mapDistanceDisplayStatus=new Map,e._mapDistanceDisplayStatus.forEach(((e,t)=>{WebGLPlot$g.defined(t)&&WebGLPlot$g.defined(e)&&this._mapDistanceDisplayStatus.set(t,e.clone())})))}_initParm(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){this._position=new _0x45ea17(e.x,e.y,e.z),this._isPositionUpdate=!1,this._modelScale=t,this._isModelScaleUpdate=!1,this._vectorScale=i,this._isVectorScaleUpdate=!1,this._modelRotate=new _0x45ea17(n.x,n.y,n.z),this._isModelRotateUpdate=!1,this._vectorRotate=new _0x45ea17(r.x,r.y,r.z),this._isVectorRotateUpdate=!1,this._modelPath=o,this._isModelPathUpdate=!1,this._visible=a,this._isVisibleUpdate=!1,this._dotPlotLibID=s,this._isDotPlotLibIDUpdate=!1,this._dotPlotCode=l,this._isDotPlotCodeUpdate=!1,this._dotPlotStyle=u,this._isDotPlotStyleUpdate=!1,this._pictureSymbolSize=new WebGLPlot$g.Cartesian2(c.x,c.y),this._isPictureSymbolSizeUpdate=!1,this._gridSymbolSize=new WebGLPlot$g.Cartesian2(h.x,h.y),this._isGridSymbolSizeUpdate=!1,this._picturePath=d,this._isPicturePathUpdate=!1,this._showMode=f,this._isShowModeUpdate=!1,this._autoChangeDisplayStatus=p,this._isAutoChangeDisplayStatusUpdate=!1,this._mapDistanceDisplayStatus=new Map,_.forEach(((e,t)=>{WebGLPlot$g.defined(t)&&WebGLPlot$g.defined(e)&&this._mapDistanceDisplayStatus.set(t,e.clone())})),this._isDistanceDisplayStatusUpdate=!1}_toJson(){let e={};return e.hasOwnProperty("position")||(e.position={x:this._position.x,y:this._position.y,z:this._position.z}),e.hasOwnProperty("isPositionUpdate")||(e.isPositionUpdate=this._isPositionUpdate),e.hasOwnProperty("modelScale")||(e.modelScale=this._modelScale),e.hasOwnProperty("isModelScaleUpdate")||(e.isModelScaleUpdate=this._isModelScaleUpdate),e.hasOwnProperty("vectorScale")||(e.vectorScale=this._vectorScale),e.hasOwnProperty("isVectorScaleUpdate")||(e.isVectorScaleUpdate=this._isVectorScaleUpdate),e.hasOwnProperty("modelRotate")||(e.modelRotate={x:this._modelRotate.x,y:this._modelRotate.y,z:this._modelRotate.z}),e.hasOwnProperty("isModelRotateUpdate")||(e.isModelRotateUpdate=this._isModelRotateUpdate),e.hasOwnProperty("vectorRotate")||(e.vectorRotate={x:this._vectorRotate.x,y:this._vectorRotate.y,z:this._vectorRotate.z}),e.hasOwnProperty("isVectorRotateUpdate")||(e.isVectorRotateUpdate=this._isVectorRotateUpdate),e.hasOwnProperty("modelPath")||(e.modelPath=_0x1569f6.absoluteToRelativePath(this._modelPath)),e.hasOwnProperty("isModelPathUpdate")||(e.isModelPathUpdate=this._isModelPathUpdate),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("isVisibleUpdate")||(e.isVisibleUpdate=this._isVisibleUpdate),e.hasOwnProperty("dotPlotLibID")||(e.dotPlotLibID=this._dotPlotLibID),e.hasOwnProperty("isDotPlotLibIDUpdate")||(e.isDotPlotLibIDUpdate=this._isDotPlotLibIDUpdate),e.hasOwnProperty("dotPlotCode")||(e.dotPlotCode=this._dotPlotCode),e.hasOwnProperty("isDotPlotCodeUpdate")||(e.isDotPlotCodeUpdate=this._isDotPlotCodeUpdate),e.hasOwnProperty("dotPlotSyle")||(e.dotPlotStyle=this._dotPlotStyle.toJson()),e.hasOwnProperty("isDotPlotStyleUpdate")||(e.isDotPlotStyleUpdate=this._isDotPlotStyleUpdate),e.hasOwnProperty("pictureSymbolSize")||(e.pictureSymbolSize={x:this._pictureSymbolSize.x,y:this._pictureSymbolSize.y}),e.hasOwnProperty("isPictureSymbolSizeUpdate")||(e.isPictureSymbolSizeUpdate=this._isPictureSymbolSizeUpdate),e.hasOwnProperty("gridSymbolSize")||(e.gridSymbolSize={x:this._gridSymbolSize.x,y:this._gridSymbolSize.y}),e.hasOwnProperty("isGridSymbolSizeUpdate")||(e.isGridSymbolSizeUpdate=this._isGridSymbolSizeUpdate),e.hasOwnProperty("picturePath")||(e.picturePath=_0x1569f6.absoluteToRelativePath(this._picturePath)),e.hasOwnProperty("isPicturePathUpdate")||(e.isPicturePathUpdate=this._isPicturePathUpdate),e.hasOwnProperty("showMode")||(e.showMode=this._showMode),e.hasOwnProperty("isShowModeUpdate")||(e.isShowModeUpdate=this._isShowModeUpdate),e.hasOwnProperty("autoChangeDisplayStatus")||(e.autoChangeDisplayStatus=this._autoChangeDisplayStatus),e.hasOwnProperty("isAutoChangeDisplayStatusUpdate")||(e.isAutoChangeDisplayStatusUpdate=this._isAutoChangeDisplayStatusUpdate),e.hasOwnProperty("mapDistanceDisplayStatus")||(e.mapDistanceDisplayStatus=[],this._mapDistanceDisplayStatus.forEach(((t,i)=>{e.mapDistanceDisplayStatus.push({distance:i,displayStatus:t._toJson()})}))),e.hasOwnProperty("isDistanceDisplayStatusUpdate")||(e.isDistanceDisplayStatusUpdate=this._isDistanceDisplayStatusUpdate),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);if(WebGLPlot$g.defined(t.position)&&(this._position=new _0x45ea17(t.position.x,t.position.y,t.position.z)),WebGLPlot$g.defined(t.isPositionUpdate)&&(this._isPositionUpdate=t.isPositionUpdate),WebGLPlot$g.defined(t.modelScale)&&(this._modelScale=t.modelScale),WebGLPlot$g.defined(t.isModelScaleUpdate)&&(this._isModelScaleUpdate=t.isModelScaleUpdate),WebGLPlot$g.defined(t.vectorScale)&&(this._vectorScale=t.vectorScale),WebGLPlot$g.defined(t.isVectorScaleUpdate)&&(this._isVectorScaleUpdate=t.isVectorScaleUpdate),WebGLPlot$g.defined(t.modelRotate)&&(this._modelRotate=new _0x45ea17(t.modelRotate.x,t.modelRotate.y,t.modelRotate.z)),WebGLPlot$g.defined(t.isModelRotateUpdate)&&(this._isModelRotateUpdate=t.isModelRotateUpdate),WebGLPlot$g.defined(t.vectorRotate)&&(this._vectorRotate=new _0x45ea17(t.vectorRotate.x,t.vectorRotate.y,t.vectorRotate.z)),WebGLPlot$g.defined(t.isVectorRotateUpdate)&&(this._isVectorRotateUpdate=t.isVectorRotateUpdate),WebGLPlot$g.defined(t.modelPath)&&(this._modelPath=_0x1569f6.relativeToAbsolutePath(t.modelPath)),WebGLPlot$g.defined(t.isModelRotateUpdate)&&(this._isModelPathUpdate=t.isModelPathUpdate),WebGLPlot$g.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$g.defined(t.isVisibleUpdate)&&(this._isVisibleUpdate=t.isVisibleUpdate),WebGLPlot$g.defined(t.dotPlotLibID)&&(this._dotPlotLibID=t.dotPlotLibID),WebGLPlot$g.defined(t.isDotPlotLibIDUpdate)&&(this._isDotPlotLibIDUpdate=t.isDotPlotLibIDUpdate),WebGLPlot$g.defined(t.dotPlotCode)&&(this._dotPlotCode=t.dotPlotCode),WebGLPlot$g.defined(t.isDotPlotCodeUpdate)&&(this._isDotPlotCodeUpdate=t.isDotPlotCodeUpdate),WebGLPlot$g.defined(t.dotPlotStyle)){let e=new _0x248ebf;e.fromJson(t.dotPlotStyle),this._dotPlotStyle=e}WebGLPlot$g.defined(t.isDotPlotStyleUpdate)&&(this._isDotPlotStyleUpdate=t.isDotPlotStyleUpdate),WebGLPlot$g.defined(t.pictureSymbolSize)&&(this._pictureSymbolSize=new WebGLPlot$g.Cartesian2(t.pictureSymbolSize.x,t.pictureSymbolSize.y)),WebGLPlot$g.defined(t.isPictureSymbolSizeUpdate)&&(this._isPictureSymbolSizeUpdate=t.isPictureSymbolSizeUpdate),WebGLPlot$g.defined(t.gridSymbolSize)&&(this._gridSymbolSize=new WebGLPlot$g.Cartesian2(t.gridSymbolSize.x,t.gridSymbolSize.y)),WebGLPlot$g.defined(t.isGridSymbolSizeUpdate)&&(this._isGridSymbolSizeUpdate=t.isGridSymbolSizeUpdate),WebGLPlot$g.defined(t.picturePath)&&(this._picturePath=_0x1569f6.relativeToAbsolutePath(t.picturePath)),WebGLPlot$g.defined(t.isPicturePathUpdate)&&(this._isPicturePathUpdate=t.isPicturePathUpdate),WebGLPlot$g.defined(t.showMode)&&(this._showMode=t.showMode),WebGLPlot$g.defined(t.isShowModeUpdate)&&(this._isShowModeUpdate=t.isShowModeUpdate),WebGLPlot$g.defined(t.autoChangeDisplayStatus)&&(this._autoChangeDisplayStatus=t.autoChangeDisplayStatus),WebGLPlot$g.defined(t.isAutoChangeDisplayStatusUpdate)&&(this._isAutoChangeDisplayStatusUpdate=t.isAutoChangeDisplayStatusUpdate),WebGLPlot$g.defined(t.mapDistanceDisplayStatus)&&(this._mapDistanceDisplayStatus=new Map,t.mapDistanceDisplayStatus.forEach((e=>{let t=new _0x2654ba;t._fromJson(e.displayStatus),this._mapDistanceDisplayStatus.set(e.distance,t)}))),WebGLPlot$g.defined(t.isDistanceDisplayStatusUpdate)&&(this._isDistanceDisplayStatusUpdate=t.isDistanceDisplayStatusUpdate)}clone(){let e=new _0x30275b;return e._position=new _0x45ea17(this._position.x,this._position.y,this._position.z),e._isPositionUpdate=this._isPositionUpdate,e._modelScale=this._modelScale,e._isModelScaleUpdate=this._isModelScaleUpdate,e._vectorScale=this._vectorScale,e._isVectorScaleUpdate=this._isVectorScaleUpdate,e._modelRotate=new _0x45ea17(this._modelRotate.x,this._modelRotate.y,this._modelRotate.z),e._isModelRotateUpdate=this._isModelRotateUpdate,e._vectorRotate=new _0x45ea17(this._vectorRotate.x,this._vectorRotate.y,this._vectorRotate.z),e._isVectorRotateUpdate=this._isVectorRotateUpdate,e._modelPath=this._modelPath,e._isModelPathUpdate=this._isModelPathUpdate,e._visible=this._visible,e._isVisibleUpdate=this._isVisibleUpdate,e._dotPlotLibID=this._dotPlotLibID,e._isDotPlotLibIDUpdate=this._isDotPlotLibIDUpdate,e._dotPlotCode=this._dotPlotCode,e._isDotPlotCodeUpdate=this._isDotPlotCodeUpdate,e._dotPlotStyle=this._dotPlotStyle.clone(),e._isDotPlotStyleUpdate=this._isDotPlotStyleUpdate,e._pictureSymbolSize=new WebGLPlot$g.Cartesian2(this._pictureSymbolSize.x,this._pictureSymbolSize.y),e._isPictureSymbolSizeUpdate=this._isPictureSymbolSizeUpdate,e._gridSymbolSize=new WebGLPlot$g.Cartesian2(this._gridSymbolSize.x,this._gridSymbolSize.y),e._isGridSymbolSizeUpdate=this._isGridSymbolSizeUpdate,e._picturePath=this._picturePath,e._isPicturePathUpdate=this._isPicturePathUpdate,e._showMode=this._showMode,e._isShowModeUpdate=this._isShowModeUpdate,e._autoChangeDisplayStatus=this._autoChangeDisplayStatus,e._isAutoChangeDisplayStatusUpdate=this._isAutoChangeDisplayStatusUpdate,e._mapDistanceDisplayStatus=new Map,this._mapDistanceDisplayStatus.forEach(((t,i)=>{e._mapDistanceDisplayStatus.set(i,t.clone())})),e._isDistanceDisplayStatusUpdate=this._isDistanceDisplayStatusUpdate,e}setPosition(e){this._position=e,this._isPositionUpdate=!0}getPosition(){return this._position}isPositionUpdate(){return this._isPositionUpdate}setModelScale(e){this._modelScale=e,this._isModelScaleUpdate=!0}getModelScale(){return this._modelScale}isModelScaleUpdate(){return this._isModelScaleUpdate}setVectorScale(e){this._vectorScale=e,this._isVectorScaleUpdate=!0}getVectorScale(){return this._vectorScale}isVectorScaleUpdate(){return this._isVectorScaleUpdate}setModelRotate(e){this._modelRotate=e,this._isModelRotateUpdate=!0}getModelRotate(){return this._modelRotate}isModelRotateUpdate(){return this._isModelRotateUpdate}setVectorRotate(e){this._vectorRotate=e,this._isVectorRotateUpdate=!0}getVectorRotate(){return this._vectorRotate}isVectorRotateUpdate(){return this._isVectorRotateUpdate}setModelPath(e){this._modelPath=e,this._isModelPathUpdate=!0}getModelPath(){return this._modelPath}isModelPathUpdate(){return this._isModelPathUpdate}setDotPlotLibID(e){this._dotPlotLibID=e,this._isDotPlotLibIDUpdate=!0}getDotPlotLibID(){return this._dotPlotLibID}isDotPlotLibIDUpdate(){return this._isDotPlotLibIDUpdate}setDotPlotCode(e){this._dotPlotCode=e,this._isDotPlotCodeUpdate=!0}getDotPlotCode(){return this._dotPlotCode}isDotPlotCodeUpdate(){return this._isDotPlotCodeUpdate}setDotPlotStyle(e){this._dotPlotStyle=e,this._isDotPlotStyleUpdate=!0}getDotPlotStyle(){return this._dotPlotStyle}isDotPlotStyleUpdate(){return this._isDotPlotStyleUpdate}setVisible(e){this._visible=e,this._isVisibleUpdate=!0}isVisible(){return this._visible}isVisibleUpdate(){return this._isVisibleUpdate}setPicturePath(e){this._picturePath=e,this._isPicturePathUpdate=!0}getPicturePath(){return this._picturePath}isPicturePathUpdate(){return this._isPicturePathUpdate}setPictureSymbolSize(e){this._pictureSymbolSize=e,this._isPictureSymbolSizeUpdate=!0}getPictureSymbolSize(){return this._pictureSymbolSize}isPictureSymbolSizeUpdate(){return this._isPictureSymbolSizeUpdate}setGridSymbolSize(e){this._gridSymbolSize=e,this._isGridSymbolSizeUpdate=!0}getGridSymbolSize(){return this._gridSymbolSize}isGridSymbolSizeUpdate(){return this._isGridSymbolSizeUpdate}setShowMode(e){this._showMode=e,this._isShowModeUpdate=!0}getShowMode(){return this._showMode}isShowModeUpdate(){return this._isShowModeUpdate}setAutoChangeDisplayStatus(e){this._autoChangeDisplayStatus=e,this._isAutoChangeDisplayStatusUpdate=!0}getAutoChangeDisplayStatus(){return this._autoChangeDisplayStatus}isAutoChangeDisplayStatusUpdate(){return this._isAutoChangeDisplayStatusUpdate}setDistanceDisplayStatus(e,t){this._mapDistanceDisplayStatus.set(e,t),this._isDistanceDisplayStatusUpdate=!0}setDistanceDisplayStatusMap(e){this._mapDistanceDisplayStatus=e,this._isDistanceDisplayStatusUpdate=!0}getDistanceDisplayStatus(){return this._mapDistanceDisplayStatus}isDistanceDisplayStatusUpdate(){return this._isDistanceDisplayStatusUpdate}}var _0x47bbb2=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xec5fc5=_0x47bbb2(void 0,(function(){return _0xec5fc5.toString().search("(((.+)+)+)+$").toString().constructor(_0xec5fc5).search("(((.+)+)+)+$")}));_0xec5fc5();var _0x7f1434={UNKNOW:0,WAKE:1,ROTORWASH:2,FIRESMOKE:3,BURST:4,TAILFLAME:5,TAILGAS:6,RADAR:7,SCANWAVE:8,SCANCONE:9,DETECTIONCONE:10,TRACKLINE:11,ATTACKLINE:12,SIGN:13,COMMUNICATIONLINK:14,DYNAMICMODEL:15,TEXT:16,EXTENDACTION:17,AUGMENT:18,ANNULARDIFFUSION:19},_0x370c4a=Object.freeze(_0x7f1434);const _0x4162c2=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x307b34=_0x4162c2(void 0,(function(){return _0x307b34.toString().search("(((.+)+)+)+$").toString().constructor(_0x307b34).search("(((.+)+)+)+$")}));_0x307b34();class _0x4c64cd{constructor(e){e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._name=WebGLPlot$g.defaultValue(e.name,""),this._geoEntity=WebGLPlot$g.defaultValue(e.geoEntity,null),this._visible=WebGLPlot$g.defaultValue(e.visible,!0),this._pntOffset=WebGLPlot$g.defaultValue(e.pntOffset,new _0x45ea17(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$g.defaultValue(e.bChangeSizeFlowModel,!0),this._UUID=WebGLPlot$g.createGuid(),this._type=_0x370c4a.UNKNOW,this._geoEntityParameter=void 0,this._initialized=!1,this._scene=void 0;let t=this;this._execute=function(e,i){t._executeFunction(e),t._initialized||(t._isModified=!0,t._removeEffectFromScene(e),t._visible?t._initialized=t._addEffectToScene(e):t._initialized=!0)},this._isModified=!1}getType(){return this._type}setGeoEntity(e){this._geoEntity=e}getGeoEntity(){return this._geoEntity}setVisible(e){if(this._visible=e,WebGLPlot$g.defined(this._geoEntity)&&!this._geoEntity._changeByDistance)if(e&&-1===this._geoEntity._defaultDisplayStatus._displayEffectsUUID.indexOf(this._UUID))this._geoEntity._defaultDisplayStatus._displayEffectsUUID.push(this._UUID);else if(!e){let e=this._geoEntity._defaultDisplayStatus._displayEffectsUUID.indexOf(this._UUID);e>=0&&this._geoEntity._defaultDisplayStatus._displayEffectsUUID.splice(e,1)}this._initialized=!1}isVisible(){return this._visible}setOffset(e){this._pntOffset=e,this._initialized=!1}getOffset(){return this._pntOffset}setChangeSizeFlowModel(e){this._bChangeSizeFlowModel=e,this._isModified=!0}isChangeSizeFlowModel(){return this._bChangeSizeFlowModel}getUUID(){return this._UUID}addEffectToScene(e){this._scene=e,e.preUpdate.addEventListener(this._execute)}removeEffectFromScene(e){e.preUpdate.removeEventListener(this._execute),this._removeEffectFromScene(e),this._initialized=!1}setGeoEntityParameter(e,t){}_addEffectToScene(e){}_removeEffectFromScene(e){}_executeFunction(e){}_isModify(){return this._isModified}_setIsModify(e){this._isModified=e}destroy(){}toJSON(){return{}}fromJSON(e){}clone(){}getName(){return this._name}setName(e){this._name=e}}const _0x6d7a35=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x27cc0a=_0x6d7a35(void 0,(function(){return _0x27cc0a.toString().search("(((.+)+)+)+$").toString().constructor(_0x27cc0a).search("(((.+)+)+)+$")}));_0x27cc0a();class _0x5927c0 extends _0x4c64cd{constructor(e){super(e),e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._type=_0x370c4a.TAILFLAME,this._name=WebGLPlot$g.defaultValue(e.name,_0x5f28ea.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectTailflame_"+WebGLPlot$g.createGuid(),this._pntOffset=WebGLPlot$g.defaultValue(e.pntOffset,new _0x45ea17(0,-.5,.5)),this._bChangeSizeFlowModel=WebGLPlot$g.defaultValue(e.bChangeSizeFlowModel,!0),this._crossDiameter=WebGLPlot$g.defaultValue(e.crossDiameter,20),this._particleTailflame=void 0}setCrossDiameter(e){this._crossDiameter=e,this._initialized=!1}getCrossDiameter(){return this._crossDiameter}setGeoEntityParameter(e,t){if(WebGLPlot$g.defined(this._particleTailflame)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x3f7d9f.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$g.defined(t)&&(this._particleTailflame.emitterModelMatrix=t)}if(e.getShowMode()==_0x3f7d9f.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){if(0==this._geoEntityParameter.getModelScale()){let t=1*e.getModelScale();this._crossDiameter=t}else{let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._crossDiameter*=t}this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;return this._particleTailflame=this._createTailFlameParticle(e),WebGLPlot$g.defined(this._particleTailflame)&&(e.primitives.add(this._particleTailflame),t=!0),t}_removeEffectFromScene(e){WebGLPlot$g.defined(this._particleTailflame)&&e.primitives.contains(this._particleTailflame)&&e.primitives.remove(this._particleTailflame),this._particleTailflame=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("crossDiameter")||(e.crossDiameter=this._crossDiameter),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$g.defined(e))return;let t=JSON.parse(e);WebGLPlot$g.defined(t.type)&&(this._type=t.type),WebGLPlot$g.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$g.defined(t.name)&&(this._name=t.name),WebGLPlot$g.defined(t.crossDiameter)&&(this._crossDiameter=t.crossDiameter),WebGLPlot$g.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$g.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$g.defined(t.offset)&&(WebGLPlot$g.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$g.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$g.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x5927c0;return e._UUID=this._UUID,e._name=this._name,e._type=this._type,e._visible=this._visible,e._crossDiameter=this._crossDiameter,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._pntOffset=new _0x45ea17(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_createTailFlameParticle(e){if(!WebGLPlot$g.defined(this._geoEntityParameter)||!WebGLPlot$g.defined(this._pntOffset)||!WebGLPlot$g.defined(this._crossDiameter))return null;let t=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$g.defined(t))return null;let i=this._crossDiameter/1,n=1*i;n<.5&&(n=.5);let r=20*i,o=80*i;return new WebGLPlot$g.ParticleSystem({image:_0x5f28ea.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/flame.png",startColor:new WebGLPlot$g.Color(1,1,1,1),endColor:new WebGLPlot$g.Color(.5,0,0,0),startScale:1,endScale:1,minimumParticleLife:.1,maximumParticleLife:.3,minimumSpeed:r,maximumSpeed:o,imageSize:new WebGLPlot$g.Cartesian2(n,n),emissionRate:600,lifetime:6,loop:!0,emitterModelMatrix:t,emitter:new WebGLPlot$g.ConeEmitter(WebGLPlot$g.CesiumMath.toRadians(10)),sizeInMeters:!0})}_calcControlPoint(e,t,i){const n=_0x1569f6.calcControlPosMatrix(e,t,i);if(!WebGLPlot$g.defined(n))return null;const r=WebGLPlot$g.HeadingPitchRoll.fromDegrees(0,0,90,new WebGLPlot$g.HeadingPitchRoll),o=WebGLPlot$g.Matrix3.fromHeadingPitchRoll(r,new WebGLPlot$g.Matrix3);return WebGLPlot$g.Matrix4.multiplyByMatrix3(n,o,new WebGLPlot$g.Matrix4)}}const _0x1a3621=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x830ed7=_0x1a3621(void 0,(function(){return _0x830ed7.toString().search("(((.+)+)+)+$").toString().constructor(_0x830ed7).search("(((.+)+)+)+$")}));_0x830ed7();class _0x12c228 extends _0x4c64cd{constructor(e){super(e),e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._type=_0x370c4a.TAILGAS,this._name=WebGLPlot$g.defaultValue(e.name,_0x5f28ea.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectTailgas_"+WebGLPlot$g.createGuid(),this._pntOffset=WebGLPlot$g.defaultValue(e.pntOffset,new _0x45ea17(0,-.5,.5)),this._bChangeSizeFlowModel=WebGLPlot$g.defaultValue(e.bChangeSizeFlowModel,!0),this._crossDiameter=WebGLPlot$g.defaultValue(e.crossDiameter,20),this._particleTailgas=void 0}setCrossDiameter(e){this._crossDiameter=e,this._initialized=!1}getCrossDiameter(){return this._crossDiameter}setGeoEntityParameter(e,t){if(WebGLPlot$g.defined(this._particleTailgas)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x3f7d9f.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$g.defined(t)&&(this._particleTailgas.emitterModelMatrix=t)}if(e.getShowMode()==_0x3f7d9f.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._crossDiameter*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;return this._particleTailgas=this._createTailgasParticle(e),WebGLPlot$g.defined(this._particleTailgas)&&(e.primitives.add(this._particleTailgas),t=!0),t}_removeEffectFromScene(e){WebGLPlot$g.defined(this._particleTailgas)&&e.primitives.contains(this._particleTailgas)&&e.primitives.remove(this._particleTailgas),this._particleTailgas=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("crossDiameter")||(e.crossDiameter=this._crossDiameter),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$g.defined(e))return;let t=JSON.parse(e);WebGLPlot$g.defined(t.type)&&(this._type=t.type),WebGLPlot$g.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$g.defined(t.name)&&(this._name=t.name),WebGLPlot$g.defined(t.crossDiameter)&&(this._crossDiameter=t.crossDiameter),WebGLPlot$g.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$g.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$g.defined(t.offset)&&(WebGLPlot$g.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$g.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$g.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x12c228;return e._UUID=this._UUID,e._name=this._name,e._type=this._type,e._visible=this._visible,e._crossDiameter=this._crossDiameter,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._pntOffset=new _0x45ea17(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_createTailgasParticle(e){if(!WebGLPlot$g.defined(this._geoEntityParameter)||!WebGLPlot$g.defined(this._pntOffset)||!WebGLPlot$g.defined(this._crossDiameter))return null;let t=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$g.defined(t))return null;let i=this._crossDiameter/1,n=1*i;n<.5&&(n=.5);let r=5*i,o=5*i;return new WebGLPlot$g.ParticleSystem({image:_0x5f28ea.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/gas.png",startColor:new WebGLPlot$g.Color(.57,.57,.57,1),endColor:new WebGLPlot$g.Color(.57,.57,.57,0),startScale:1,endScale:1,minimumParticleLife:7,maximumParticleLife:7,minimumSpeed:r,maximumSpeed:o,imageSize:new WebGLPlot$g.Cartesian2(n,n),emissionRate:80,lifetime:6,loop:!0,emitterModelMatrix:t,emitter:new WebGLPlot$g.ConeEmitter(WebGLPlot$g.CesiumMath.toRadians(5)),sizeInMeters:!0})}_calcControlPoint(e,t,i){const n=_0x1569f6.calcControlPosMatrix(e,t,i);if(!WebGLPlot$g.defined(n))return null;const r=WebGLPlot$g.HeadingPitchRoll.fromDegrees(0,0,90,new WebGLPlot$g.HeadingPitchRoll),o=WebGLPlot$g.Matrix3.fromHeadingPitchRoll(r,new WebGLPlot$g.Matrix3);return WebGLPlot$g.Matrix4.multiplyByMatrix3(n,o,new WebGLPlot$g.Matrix4)}}const _0x467461=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x3ae43f=_0x467461(void 0,(function(){return _0x3ae43f.toString().search("(((.+)+)+)+$").toString().constructor(_0x3ae43f).search("(((.+)+)+)+$")}));_0x3ae43f();class _0x5611a5 extends _0x4c64cd{constructor(e){super(e),e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._type=_0x370c4a.FIRESMOKE,this._name=WebGLPlot$g.defaultValue(e.name,_0x5f28ea.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectFiresmoke_"+WebGLPlot$g.createGuid(),this._pntOffset=WebGLPlot$g.defaultValue(e.pntOffset,new _0x45ea17(0,0,.5)),this._bChangeSizeFlowModel=WebGLPlot$g.defaultValue(e.bChangeSizeFlowModel,!0),this._firesmokeDiameter=WebGLPlot$g.defaultValue(e.firesmokeDiameter,50),this._particleFiresmoke=void 0}setFiresmokeDiameter(e){this._firesmokeDiameter=e,this._initialized=!1}getFiresmokeDiameter(){return this._firesmokeDiameter}setGeoEntityParameter(e,t){if(WebGLPlot$g.defined(this._particleFiresmoke)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x3f7d9f.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$g.defined(t)&&(this._particleFiresmoke.emitterModelMatrix=t)}if(e.getShowMode()==_0x3f7d9f.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._firesmokeDiameter*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;return this._particleFiresmoke=this._createFiresmokeParticle(e),WebGLPlot$g.defined(this._particleFiresmoke)&&(e.primitives.add(this._particleFiresmoke),t=!0),t}_removeEffectFromScene(e){WebGLPlot$g.defined(this._particleFiresmoke)&&e.primitives.contains(this._particleFiresmoke)&&e.primitives.remove(this._particleFiresmoke),this._particleFiresmoke=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("firesmokeDiameter")||(e.firesmokeDiameter=this._firesmokeDiameter),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$g.defined(e))return;let t=JSON.parse(e);WebGLPlot$g.defined(t.type)&&(this._type=t.type),WebGLPlot$g.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$g.defined(t.name)&&(this._name=t.name),WebGLPlot$g.defined(t.firesmokeDiameter)&&(this._firesmokeDiameter=t.firesmokeDiameter),WebGLPlot$g.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$g.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$g.defined(t.offset)&&(WebGLPlot$g.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$g.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$g.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x5611a5;return e._UUID=this._UUID,e._name=this._name,e._type=this._type,e._visible=this._visible,e._firesmokeDiameter=this._firesmokeDiameter,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._pntOffset=new _0x45ea17(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_createFiresmokeParticle(e){if(!WebGLPlot$g.defined(this._geoEntityParameter)||!WebGLPlot$g.defined(this._pntOffset)||!WebGLPlot$g.defined(this._firesmokeDiameter)||this._firesmokeDiameter<=0)return null;let t=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$g.defined(t))return null;let i=this._firesmokeDiameter/1,n=1*i;n<.5&&(n=.5);let r=7*i,o=9*i;return new WebGLPlot$g.ParticleSystem({image:_0x5f28ea.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/fire.png",startColor:new WebGLPlot$g.Color(1,1,1,1),endColor:new WebGLPlot$g.Color(.2,0,0,0),startScale:3,endScale:3,minimumParticleLife:1.5,maximumParticleLife:1.8,minimumSpeed:r,maximumSpeed:o,imageSize:new WebGLPlot$g.Cartesian2(n,n),emissionRate:200,lifetime:6,loop:!0,emitterModelMatrix:t,emitter:new WebGLPlot$g.ConeEmitter(WebGLPlot$g.CesiumMath.toRadians(30)),sizeInMeters:!0})}_calcControlPoint(e,t,i){let n=_0x1569f6.calcControlPoint(e,t,i);return WebGLPlot$g.defined(n)?WebGLPlot$g.Transforms.headingPitchRollToFixedFrame(_0x1569f6.degreesToCartesian3(n),new WebGLPlot$g.HeadingPitchRoll,WebGLPlot$g.Ellipsoid.WGS84,WebGLPlot$g.Transforms.localFrameToFixedFrameGenerator("east","north")):null}}const _0x44d36a=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x151ae8=_0x44d36a(void 0,(function(){return _0x151ae8.toString().search("(((.+)+)+)+$").toString().constructor(_0x151ae8).search("(((.+)+)+)+$")}));_0x151ae8();class _0x3db1bf extends _0x4c64cd{constructor(){super(),this._UUID="GeoEntityEffectExtend_"+WebGLPlot$g.createGuid(),this._type=_0x370c4a.EXTENDACTION,this._name="",this._param=""}toJSON(){let e={};return e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("param")||(e.param=this._param),JSON.stringify(e)}fromJSON(e){let t=JSON.parse(e);WebGLPlot$g.defined(t.type)&&(this._type=t.type),WebGLPlot$g.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$g.defined(t.name)&&(this._name=t.name),WebGLPlot$g.defined(t.param)&&(this._param=t.param)}_executeExtend(){_0x3db1bf.extendCallBacks.forEach(((e,t)=>{t(e,this._name,this._param)}))}getName(){return this._name}setName(e){this._name=e}getParam(){return this._param}setParam(e){this._param=e}static addExtendCallBack(e,t){WebGLPlot$g.defined(_0x3db1bf.extendCallBacks.get(e))||_0x3db1bf.extendCallBacks.set(e,t)}static removeExtendCallBack(e){WebGLPlot$g.defined(_0x3db1bf.extendCallBacks.get(e))&&_0x3db1bf.extendCallBacks.delete(e)}}_0x3db1bf.extendCallBacks=new Map;var _0x5ef615=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1d0d63=_0x5ef615(void 0,(function(){return _0x1d0d63.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d0d63).search("(((.+)+)+)+$")}));_0x1d0d63();class _0x7be4ad extends _0x4c64cd{constructor(e){super(e),e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._pntOffset=WebGLPlot$g.defaultValue(e.pntOffset,new WebGLPlot$g.Cartesian3(0,0,0)),this._type=_0x370c4a.DYNAMICMODEL,this._name=WebGLPlot$g.defaultValue(e.name,_0x5f28ea.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectDynamic_"+WebGLPlot$g.createGuid(),this._dynamicModelUrl=WebGLPlot$g.defaultValue(e.dynamicModelUrl,""),this._angleTimes=WebGLPlot$g.defaultValue(e.angleTimes,[{time:3,start:{x:0,y:0,z:0},end:{x:45,y:45,z:45},isloop:!0}]),this._scaleTimes=WebGLPlot$g.defaultValue(e.scaleTimes,[{time:3,start:500,end:2e3,isloop:!0}]),this._dynamicModel=void 0,this._angleLoop=WebGLPlot$g.defaultValue(e.angleLoop,!1),this._scaleLoop=WebGLPlot$g.defaultValue(e.scaleLoop,!1),this._gapTime=WebGLPlot$g.defaultValue(e.gapTime,30),this._timer=null}setModelPath(e){this._dynamicModelUrl=e,this._initialized=!1}getModelPath(){return this._dynamicModelUrl}setAngleTimes(e){this._angleTimes=e,this._initialized=!1}getAngleTimes(){return this._angleTimes}setScaleTimes(e){this._scaleTimes=e,this._initialized=!1}getScaleTimes(){return this._scaleTimes}setAngleLoop(e){this._angleLoop=e,this._initialized=!1}getAngleLoop(){return this._angleLoop}setScaleLoop(e){this._scaleLoop=e,this._initialized=!1}getScaleLoop(){return this._scaleLoop}setGeoEntityParameter(e,t){if(WebGLPlot$g.defined(this._dynamicModel)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x3f7d9f.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=_0x1569f6.calcControlPosMatrix(e,this._pntOffset,null);WebGLPlot$g.defined(t)&&(this._dynamicModel.modelMatrix=t)}e.getShowMode()==_0x3f7d9f.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()||this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)&&(this._initialized=!1)}this._geoEntityParameter=e}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("dynamicModelUrl")||(e.dynamicModelUrl=_0x1569f6.absoluteToRelativePath(this._dynamicModelUrl)),e.hasOwnProperty("visible")||(e.visible=this._visible);let t=[];if(!e.hasOwnProperty("angleTimes")){e.angleTimes=t;for(var i=0;i<this._angleTimes.length;i++)!e.angleTimes.hasOwnProperty("time")&&!e.angleTimes.hasOwnProperty("start")&&!e.angleTimes.hasOwnProperty("end")&&!e.angleTimes.hasOwnProperty("isloop")&&e.angleTimes.push({time:this._angleTimes[i].time,start:this._angleTimes[i].start,end:this._angleTimes[i].end,isloop:this._angleTimes[i].isloop})}let n=[];if(!e.hasOwnProperty("scaleTimes")){e.scaleTimes=n;for(i=0;i<this._scaleTimes.length;i++)!e.scaleTimes.hasOwnProperty("time")&&!e.scaleTimes.hasOwnProperty("start")&&!e.scaleTimes.hasOwnProperty("end")&&!e.scaleTimes.hasOwnProperty("isloop")&&e.scaleTimes.push({time:this._scaleTimes[i].time,start:this._scaleTimes[i].start,end:this._scaleTimes[i].end,isloop:this._scaleTimes[i].isloop})}return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),e.hasOwnProperty("angleLoop")||(e.angleLoop=this._angleLoop),e.hasOwnProperty("scaleLoop")||(e.scaleLoop=this._scaleLoop),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$g.defined(e))return;let t=JSON.parse(e);if(WebGLPlot$g.defined(t.type)&&(this._type=t.type),WebGLPlot$g.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$g.defined(t.name)&&(this._name=t.name),WebGLPlot$g.defined(t.dynamicModelUrl)&&(this._dynamicModelUrl=_0x1569f6.relativeToAbsolutePath(t.dynamicModelUrl)),WebGLPlot$g.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$g.defined(t.angleTimes))for(var i=0;i<t.angleTimes.length;i++)WebGLPlot$g.defined(t.angleTimes[i].time),WebGLPlot$g.defined(t.angleTimes[i].start),WebGLPlot$g.defined(t.angleTimes[i].end),WebGLPlot$g.defined(t.angleTimes[i].isloop)&&this._angleTimes.push({time:t.angleTimes[i].time,start:t.angleTimes[i].start,end:t.angleTimes[i].end,isloop:t.angleTimes[i].isloop});if(WebGLPlot$g.defined(t.scaleTimes))for(i=0;i<t.scaleTimes.length;i++)WebGLPlot$g.defined(t.scaleTimes[i].time),WebGLPlot$g.defined(t.scaleTimes[i].start),WebGLPlot$g.defined(t.scaleTimes[i].end),WebGLPlot$g.defined(t.scaleTimes[i].isloop)&&this._scaleTimes.push({time:t.scaleTimes[i].time,start:t.scaleTimes[i].start,end:t.scaleTimes[i].end,isloop:t.scaleTimes[i].isloop});WebGLPlot$g.defined(t.offset)&&(WebGLPlot$g.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$g.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$g.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z)),WebGLPlot$g.defined(t.angleLoop)&&(this._angleLoop=t.angleLoop),WebGLPlot$g.defined(t.scaleLoop)&&(this._scaleLoop=t.scaleLoop)}clone(){let e=new _0x7be4ad;return e._UUID=this._UUID,e.name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x45ea17(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._initialized=this._initialized,e._dynamicModelUrl=this._dynamicModelUrl,e._angleTimes=this._angleTimes,e._scaleTimes=this._scaleTimes,e._angleLoop=this._angleLoop,e._scaleLoop=this._scaleLoop,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e}_addEffectToScene(e){let t=!1;if(this._dynamicModel=this._createDynamicModel(e),WebGLPlot$g.defined(this._dynamicModel)){e.primitives.add(this._dynamicModel);var i=this._getdata(this._angleTimes,this._scaleTimes);this._startChange(i),t=!0}return t}_startChange(e){var t=new WebGLPlot$g.JulianDate.fromDate(new Date),i=new WebGLPlot$g.JulianDate.fromDate(new Date),n=new WebGLPlot$g.JulianDate.fromDate(new Date),r=t,o=i,a=e.angle.as[0].x,s=e.angle.as[0].y,l=e.angle.as[0].z,u=e.scale.ss[0],c=this._dynamicModel.modelMatrix,h=e.angle.at,d=e.scale.st,f=0,p=0;h.forEach((e=>{f+=e})),d.forEach((e=>{p+=e}));var _=null;_=f>p?f:p;let m=this;var $=!1,g=!1;this._timer=setInterval((function(){var y=new WebGLPlot$g.JulianDate.fromDate(new Date),v=WebGLPlot$g.JulianDate.secondsDifference(y,r),x=WebGLPlot$g.JulianDate.secondsDifference(y,o),b=WebGLPlot$g.JulianDate.secondsDifference(y,t),S=WebGLPlot$g.JulianDate.secondsDifference(y,i),w=WebGLPlot$g.JulianDate.secondsDifference(y,n),C=m._findIndex(b,h),T=m._findIndex(S,d),P=1e3*v,E=1e3*x;r=y,o=y;var A=m._dynamicModel.modelMatrix;if(b<=f){let t=P*e.angleVX[C],i=P*e.angleVY[C],n=P*e.angleVZ[C];a+=t,s+=i,l+=n;const r=WebGLPlot$g.HeadingPitchRoll.fromDegrees(-l,-s,a,new WebGLPlot$g.HeadingPitchRoll),o=WebGLPlot$g.Matrix4.getTranslation(A,new WebGLPlot$g.Cartesian3);let u=WebGLPlot$g.Transforms.localFrameToFixedFrameGenerator("east","north");A=WebGLPlot$g.Transforms.headingPitchRollToFixedFrame(o,r,WebGLPlot$g.Ellipsoid.WGS84,u)}if(b<=f)try{WebGLPlot$g.defined(A)&&(m._dynamicModel.modelMatrix=A)}catch(e){console.log(e)}if(S<=p)try{u+=E*e.scaleVS[T],m._dynamicModel.scale=u}catch(e){console.log(e)}if(w>f&&!$){let t=e.angle.al;for(let i=t.length-1;i>=0;i--)t[i]||(f-=h[i],h.splice(i,1),t.splice(i,1),e.angle.as.splice(i,1),e.angle.ae.splice(i,1),e.angleVX.splice(i,1),e.angleVY.splice(i,1),e.angleVZ.splice(i,1),_=f>p?f:p);$=!0}if(w>p&&!g){let t=e.scale.sl;for(let i=t.length-1;i>=0;i--)t[i]||(p-=d[i],d.splice(i,1),t.splice(i,1),e.scale.ss.splice(i,1),e.scale.se.splice(i,1),e.scaleVS.splice(i,1),_=f>p?f:p);g=!0}if(w>_){if(m._angleLoop){t=WebGLPlot$g.JulianDate.fromDate(new Date),r=t;try{m._dynamicModel.modelMatrix=c,a=e.angle.as[0].x,s=e.angle.as[0].y,l=e.angle.as[0].z}catch(e){console.log(e)}}if(m._scaleLoop){i=WebGLPlot$g.JulianDate.fromDate(new Date),o=i;try{m._dynamicModel.scale=e.scale.ss[0],u=e.scale.ss[0]}catch(e){console.log(e)}}(m._angleLoop||m._scaleLoop)&&(n=WebGLPlot$g.JulianDate.fromDate(new Date)),!m._angleLoop&&!m._scaleLoop&&clearInterval(m._timer)}}),m._gapTime)}_getdata(e,t){var i=[],n=[],r=[],o=[],a=[],s=[],l=[],u=[];if(e.length>0)for(var c=0;c<e.length;c++)i.push(e[c].time),n.push(e[c].start),r.push(e[c].end),o.push(e[c].isloop);else i.push(1),n.push({x:0,y:0,z:0}),r.push({x:0,y:0,z:0}),o.push(!1);if(t.length>0)for(c=0;c<t.length;c++)a.push(t[c].time),s.push(t[c].start),l.push(t[c].end),u.push(t[c].isloop);else a.push(1),s.push(this._geoEntityParameter.getModelScale()),l.push(this._geoEntityParameter.getModelScale()),u.push(!1);var h=[],d=[],f=[],p=[];for(c=0;c<i.length;c++){var _=this._calspeed(i[c],n[c].x,r[c].x),m=this._calspeed(i[c],n[c].y,r[c].y),$=this._calspeed(i[c],n[c].z,r[c].z);h.push(_),d.push(m),f.push($)}for(c=0;c<a.length;c++){var g=this._calspeed(a[c],s[c],l[c]);p.push(g)}return{angle:{at:i,as:n,ae:r,al:o},scale:{st:a,ss:s,se:l,sl:u},angleVX:h,angleVY:d,angleVZ:f,scaleVS:p}}_calspeed(e,t,i){return(i-t)/(e*=1e3)}_findIndex(e,t){for(var i=[],n=0,r=0;r<t.length;r++)n+=t[r],i.push(n);var o=0;for(r=0;r<i.length;r++)if(e<i[r]){o=r;break}return o}_removeEffectFromScene(e){WebGLPlot$g.defined(this._timer)&&clearInterval(this._timer),WebGLPlot$g.defined(this._dynamicModel)&&e.primitives.contains(this._dynamicModel)&&e.primitives.remove(this._dynamicModel),this._dynamicModel=null}_createDynamicModel(){if(!(WebGLPlot$g.defined(this._geoEntityParameter)&&WebGLPlot$g.defined(this._pntOffset)&&WebGLPlot$g.defined(this._angleTimes)&&WebGLPlot$g.defined(this._scaleTimes)))return null;var e=_0x1569f6.calcControlPosMatrix(this._geoEntityParameter,this._pntOffset,scene);return WebGLPlot$g.defined(e)?_0x1569f6.getModel({url:this._dynamicModelUrl,modelMatrix:e,allowPicking:!0}):null}}const _0x3eda3f=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x18b139=_0x3eda3f(void 0,(function(){return _0x18b139.toString().search("(((.+)+)+)+$").toString().constructor(_0x18b139).search("(((.+)+)+)+$")}));_0x18b139();const _0x1d1300={AXES:0,STREAMER:1,WALL:2};var _0x3246d7=Object.freeze(_0x1d1300);const _0x241c6a=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x4ff020=_0x241c6a(void 0,(function(){return _0x4ff020.toString().search("(((.+)+)+)+$").toString().constructor(_0x4ff020).search("(((.+)+)+)+$")}));_0x4ff020();class _0x327d5d extends _0x4c64cd{constructor(e){super(e),e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._UUID="GeoEntityEffectTrackline"+WebGLPlot$g.createGuid(),this._pntOffset=WebGLPlot$g.defaultValue(e.pntOffset,new _0x45ea17(0,-.5,.5)),this._type=_0x370c4a.TRACKLINE,this._name=WebGLPlot$g.defaultValue(e.name,_0x5f28ea.getDefaultName({effectType:this._type})),this._trackType=WebGLPlot$g.defaultValue(e.trackType,_0x3246d7.AXES),this._lineWidth=WebGLPlot$g.defaultValue(e.lineWidth,1),this._streamerWidth=WebGLPlot$g.defaultValue(e.streamerWidth,1),this._showPntCount=WebGLPlot$g.defaultValue(e.showPntCount,500),this._aryGradientColors=WebGLPlot$g.defaultValue(e.aryGradientColors,[WebGLPlot$g.Color.RED]),this._aryGradientColors.length>5&&this._aryGradientColors.splice(5,this._aryGradientColors.length-5),this._pntsTmp=[],this._wallCollection=null,this._polylineCollection=null,this._polygonCollection=null,this._appearance=new WebGLPlot$g.PerInstanceColorAppearance,this.primitive=void 0}setTrackType(e){this._trackType!==e&&(this._trackType=e,this._initialized=!1)}getTrackType(){return this._trackType}setTrackColor(e){}getTrackColor(){}setLineWidth(e){this._lineWidth=e,this._initialized=!1}getLineWidth(){return this._lineWidth}setStreamerWidth(e){this._streamerWidth=e,this._initialized=!1}getStreamerWidth(){return this._streamerWidth}setShowPntCount(e){this._showPntCount=e,this._initialized=!1}getShowPntCount(){return this._showPntCount}setGradients(e){this._aryGradientColors=e,this._aryGradientColors.length>5&&this._aryGradientColors.splice(5,this._aryGradientColors.length-5),this._initialized=!1}getGradients(){return this._aryGradientColors}setGeoEntityParameter(e,t){WebGLPlot$g.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(e.getPosition())&&this._updateTrack(e),this._geoEntityParameter=e}_addEffectToScene(e){this._trackType===_0x3246d7.AXES?(this.polylineCollection=new WebGLPlot$g.PolylineCollection,e.primitives.add(this.polylineCollection)):this._trackType===_0x3246d7.WALL?(this._wallCollection=new WebGLPlot$g.PrimitiveCollection,e.primitives.add(this._wallCollection)):this._trackType===_0x3246d7.STREAMER&&(this._polygonCollection=new WebGLPlot$g.PrimitiveCollection,e.primitives.add(this._polygonCollection));let t=_0x1569f6.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);return WebGLPlot$g.defined(t)}_removeEffectFromScene(e){WebGLPlot$g.defined(this.polylineCollection)&&this.polylineCollection.removeAll(),WebGLPlot$g.defined(this._wallCollection)&&this._wallCollection.removeAll(),WebGLPlot$g.defined(this._polygonCollection)&&this._polygonCollection.removeAll(),this._pntsTmp=[]}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("trackType")||(e.trackType=this._trackType),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("streamerWidth")||(e.streamerWidth=this._streamerWidth),e.hasOwnProperty("showPntCount")||(e.showPntCount=this._showPntCount),e.hasOwnProperty("aryGradientColors")||(e.aryGradientColors=[],this._aryGradientColors.forEach((t=>{e.aryGradientColors.push(t.toCssColorString())}))),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),WebGLPlot$g.toJSON(e)}fromJSON(e){if(!WebGLPlot$g.defined(e))return;let t=JSON.parse(e);WebGLPlot$g.defined(t.type)&&(this._type=t.type),WebGLPlot$g.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$g.defined(t.name)&&(this._name=t.name),WebGLPlot$g.defined(t.trackType)&&(this._trackType=t.trackType),WebGLPlot$g.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$g.defined(t.streamerWidth)&&(this._streamerWidth=t.streamerWidth),WebGLPlot$g.defined(t.showPntCount)&&(this._showPntCount=t.showPntCount),WebGLPlot$g.defined(t.aryGradientColors)&&(this._aryGradientColors=[],t.aryGradientColors.forEach((e=>{this._aryGradientColors.push(WebGLPlot$g.Color.fromCssColorString(e))}))),WebGLPlot$g.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$g.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$g.defined(t.offset)&&(WebGLPlot$g.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$g.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$g.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x327d5d;return e._UUID=this._UUID,e._name=this._name,e._type=this._type,e._trackType=this._trackType,e._lineWidth=this._lineWidth,e._streamerWidth=this._streamerWidth,e._showPntCount=this._showPntCount,e._aryGradientColors=this._aryGradientColors,e._visible=this._visible,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._pntOffset=new _0x45ea17(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_updateTrack(e){this._trackType===_0x3246d7.AXES?this._updateTrackLine(e):this._trackType===_0x3246d7.STREAMER?this._updateTrackStreamer(e):this._trackType===_0x3246d7.WALL&&this._updateTrackWall(e)}_updateTrackLine(e){if(0==e.getModelScale())return;let t=_0x1569f6.calcControlPoint(e,this._pntOffset,this._scene);if(!WebGLPlot$g.defined(t))return;let i=_0x1569f6.degreesToCartesian3(t);if(0===this._pntsTmp.length)this._pntsTmp.push(i);else if(1===this._pntsTmp.length){this._pntsTmp.push(i);let e=this._initAXESMaterial();this.polylineCollection.add({positions:[],width:this._lineWidth,material:e})}else this._pntsTmp.push(i),this._pntsTmp.length>this._showPntCount&&this._pntsTmp.splice(0,this._pntsTmp.length-this._showPntCount),this.polylineCollection._polylines[0].positions=this._pntsTmp}_initAXESMaterial(){let e;if(this._aryGradientColors.length>0){let t=this._aryGradientColors.slice().reverse();if(t.length>=5){let i="czm_material czm_getMaterial(czm_materialInput materialInput)\n { czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st; float diff = 1.0 / 4.0; float diff1 = diff * 1.0; float diff2 = diff * 2.0; float diff3 = diff * 3.0; float diff4 = diff * 4.0; if(st.s > 0.0 && st.s <= diff1){ float scale = st.s / diff; material.diffuse.rgb = color1.rgb + (color2.rgb - color1.rgb) * scale; material.alpha = color1.a + (color2.a - color1.a) * scale; }else if(st.s > diff1 && st.s <= diff2){ float scale = (st.s - diff1) / diff; material.diffuse.rgb = color2.rgb + (color3.rgb - color2.rgb) * scale; material.alpha = color2.a + (color3.a - color2.a) * scale; }else if(st.s > diff2 && st.s <= diff3){ float scale = (st.s - diff2) / diff; material.diffuse.rgb = color3.rgb + (color4.rgb - color3.rgb) * scale; material.alpha = color3.a + (color4.a - color3.a) * scale; }else if(st.s > diff3 && st.s <= diff4){ float scale = (st.s - diff3) / diff; material.diffuse.rgb = color4.rgb + (color5.rgb - color4.rgb) * scale; material.alpha = color4.a + (color5.a - color4.a) * scale; } return material; } ";e=new WebGLPlot$g.Material({fabric:{uniforms:{color1:t[0],color2:t[1],color3:t[2],color4:t[3],color5:t[4]},source:i}})}else if(2===t.length){let i="czm_material czm_getMaterial(czm_materialInput materialInput)\n { czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st; float scale = st.s; material.diffuse.rgb = color1.rgb + (color2.rgb - color1.rgb) * scale; material.alpha = color1.a + (color2.a - color1.a) * scale; return material; } ";e=new WebGLPlot$g.Material({fabric:{uniforms:{color1:t[0],color2:t[1]},source:i}})}else if(3===t.length){let i="czm_material czm_getMaterial(czm_materialInput materialInput)\n { czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st; float diff = 1.0 / 2.0; float diff1 = diff * 1.0; float diff2 = diff * 2.0; if(st.s > 0.0 && st.s <= diff1){ float scale = st.s / diff; material.diffuse.rgb = color1.rgb + (color2.rgb - color1.rgb) * scale; material.alpha = color1.a + (color2.a - color1.a) * scale; }else if(st.s > diff1 && st.s <= diff2){ float scale = (st.s - diff1) / diff; material.diffuse.rgb = color2.rgb + (color3.rgb - color2.rgb) * scale; material.alpha = color2.a + (color3.a - color2.a) * scale; } return material; } ";e=new WebGLPlot$g.Material({fabric:{uniforms:{color1:t[0],color2:t[1],color3:t[2],colorCount:3},source:i}})}else if(4===t.length){let i="czm_material czm_getMaterial(czm_materialInput materialInput)\n { czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st; float diff = 1.0 / 3.0; float diff1 = diff * 1.0; float diff2 = diff * 2.0; float diff3 = diff * 3.0; if(st.s > 0.0 && st.s <= diff1){ float scale = st.s / diff; material.diffuse.rgb = color1.rgb + (color2.rgb - color1.rgb) * scale; material.alpha = color1.a + (color2.a - color1.a) * scale; }else if(st.s > diff1 && st.s <= diff2){ float scale = (st.s - diff1) / diff; material.diffuse.rgb = color2.rgb + (color3.rgb - color2.rgb) * scale; material.alpha = color2.a + (color3.a - color2.a) * scale; }else if(st.s > diff2 && st.s <= diff3){ float scale = (st.s - diff2) / diff; material.diffuse.rgb = color3.rgb + (color4.rgb - color3.rgb) * scale; material.alpha = color3.a + (color4.a - color3.a) * scale; } return material; } ";e=new WebGLPlot$g.Material({fabric:{uniforms:{color1:t[0],color2:t[1],color3:t[2],color4:t[3]},source:i}})}else 1===t.length&&(e=new WebGLPlot$g.Material({fabric:{type:"Color",uniforms:{color:t[0]}}}))}else e=new WebGLPlot$g.Material({fabric:{type:"Color",uniforms:{color:Cesium.Color.RED}}});return e}_updateTrackStreamer(e){let t=this._streamerWidth/2,i=new _0x45ea17(this._pntOffset.x-t,this._pntOffset.y,this._pntOffset.z),n=new _0x45ea17(this._pntOffset.x+t,this._pntOffset.y,this._pntOffset.z),r=_0x1569f6.calcControlPoint(e,i,this._scene),o=_0x1569f6.calcControlPoint(e,n,this._scene);if(!WebGLPlot$g.defined(r)||!WebGLPlot$g.defined(o))return;let a=_0x1569f6.degreesToCartesian3(r),s=_0x1569f6.degreesToCartesian3(o);this._pntsTmp.length<4?(this._pntsTmp.push(a),this._pntsTmp.push(s)):(this._polygonCollection.removeAll(),this._pntsTmp.push(a),this._pntsTmp.push(s),this._pntsTmp.length>2*this._showPntCount&&this._pntsTmp.splice(0,this._pntsTmp.length-2*this._showPntCount),this._polygonCollection.add(this._createPolygonPrimitive(this._pntsTmp)))}_createPolygonPrimitive(e){let t=new Float64Array(3*e.length),i=new Float32Array(2*e.length);for(let n=0;n<e.length;n++)t[3*n]=e[n].x,t[3*n+1]=e[n].y,t[3*n+2]=e[n].z,i[2*n]=0,i[2*n+1]=0,i[2*n+2]=1,i[2*n+3]=1;let n=new Float32Array(3*(e.length-2));for(let t=0;t<(e.length-2)/2;t++)n[6*t+0]=2*t,n[6*t+1]=2*t+1,n[6*t+2]=2*t+3,n[6*t+3]=2*t,n[6*t+4]=2*t+3,n[6*t+5]=2*t+2;let r=new Float32Array(4*e.length),o=[];for(let t=0;t<e.length/2;t++){let i=t/(e.length/2-1),n=this._calcGradientColor(i);o.push(n)}for(let t=0;t<e.length/2;t++){let e=o[t];r[8*t]=e.red,r[8*t+1]=e.green,r[8*t+2]=e.blue,r[8*t+3]=e.alpha,r[8*t+4]=e.red,r[8*t+5]=e.green,r[8*t+6]=e.blue,r[8*t+7]=e.alpha}let a=new Cesium.Geometry({attributes:{position:new Cesium.GeometryAttribute({componentDatatype:Cesium.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:t}),color:new WebGLPlot$g.GeometryAttribute({componentDatatype:WebGLPlot$g.ComponentDatatype.FLOAT,componentsPerAttribute:4,values:r}),st:new WebGLPlot$g.GeometryAttribute({componentDatatype:WebGLPlot$g.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:i})},indices:n,primitiveType:Cesium.PrimitiveType.TRIANGLES,boundingSphere:Cesium.BoundingSphere.fromVertices(t)}),s=new Cesium.GeometryInstance({geometry:a,show:new Cesium.ShowGeometryInstanceAttribute(!0)});return new WebGLPlot$g.Primitive({geometryInstances:[s],asynchronous:!1,appearance:new Cesium.PerInstanceColorAppearance({closed:!0,translucent:!0})})}_updateTrackWall(e){let t=_0x1569f6.calcControlPoint(e,this._pntOffset,this._scene),i=_0x1569f6.degreesToCartesian3(t),n=_0x1569f6.degreesToCartesian3(new WebGLPlot$g.Cartesian3(t.x,t.y,0));this._pntsTmp.length<4?(this._pntsTmp.push(i),this._pntsTmp.push(n)):(this._wallCollection.removeAll(),this._pntsTmp.push(i),this._pntsTmp.push(n),this._pntsTmp.length>2*this._showPntCount&&this._pntsTmp.splice(0,this._pntsTmp.length-2*this._showPntCount),this._wallCollection.add(this._createPolygonPrimitive(this._pntsTmp)))}_calcGradientColor(e){let t=WebGLPlot$g.Color.RED;if(this._aryGradientColors.length>0){if(1===this._aryGradientColors.length)return this._aryGradientColors[0];let i=this._aryGradientColors.slice().reverse(),n=i.length-1,r=1;for(;r/n<=e&&r<n;)r++;let o=r-1,a=o/n,s=i[o],l=i[o+1];if(e===a)t=new WebGLPlot$g.Color(s.red,s.green,s.blue,s.alpha);else{let i=(e-a)*n,r=s.red+(l.red-s.red)*i,o=s.green+(l.green-s.green)*i,u=s.blue+(l.blue-s.blue)*i,c=s.alpha+(l.alpha-s.alpha)*i;t=new WebGLPlot$g.Color(r,o,u,c)}}return t}}const _0x218d36=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x333ae8=_0x218d36(void 0,(function(){return _0x333ae8.toString().search("(((.+)+)+)+$").toString().constructor(_0x333ae8).search("(((.+)+)+)+$")}));_0x333ae8();class _0x2035f0 extends _0x4c64cd{constructor(e){super(e),e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._type=_0x370c4a.ATTACKLINE,this._name=WebGLPlot$g.defaultValue(e.name,_0x5f28ea.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectAttackline"+WebGLPlot$g.createGuid(),this._visible=WebGLPlot$g.defaultValue(e.visible,!0),this._pathInfo=WebGLPlot$g.defaultValue(e.pathInfo,[{totalLengthProportion:.3,relativeHeight:200},{totalLengthProportion:.5,relativeHeight:100},{totalLengthProportion:.7,relativeHeight:300}]),this._pntOffset=WebGLPlot$g.defaultValue(e.pntOffset,new _0x45ea17(0,-.5,.5)),this._startGeoEntityUUID=e.startGeoEntityUUID,this._targetGeoEntityUUID=e.targetGeoEntityUUID,this._attactModelPath=WebGLPlot$g.defaultValue(e.attactModelPath,""),this._attactModelScale=WebGLPlot$g.defaultValue(e.attactModelScale,40),this._during=WebGLPlot$g.defaultValue(e.during,5),this._lineWide=WebGLPlot$g.defaultValue(e.lineWide,1),this._lineColor=WebGLPlot$g.defaultValue(e.lineColor,new WebGLPlot$g.Color(0,255,0)),this._attackModel=void 0,this._modelLinePrimitive=void 0,this._isPlay=!1,this._moveParm=void 0}setPathInfo(e){this._pathInfo=e,this._initialized=!1}getPathInfo(){return this._pathInfo}setStartGeoEntityUUID(e){this._startGeoEntityUUID=e,this._initialized=!1}getStartGeoEntityUUID(){return this._startGeoEntityUUID}setTargetGeoEntityUUID(e){this._targetGeoEntityUUID=e,this._initialized=!1}getTargetGeoEntityUUID(){return this._targetGeoEntityUUID}setAttactModelPath(e){this._attactModelPath=decodeURI(e),this._initialized=!1}getAttactModelPath(){return this._attactModelPath}setAttactModelScale(e){this._attactModelScale=e,this._initialized=!1}getAttactModelScale(){return this._attactModelScale}setDuring(e){this._during=e,this._initialized=!1}getDuring(){return this._during}setLineWide(e){this._lineWide=e,this._initialized=!1}getLineWide(){return this._lineWide}setLineColor(e){this._lineColor=e,this._initialized=!1}getLineColor(){return this._lineColor}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("visible")||(e.visible=this._visible);let t=[];if(!e.hasOwnProperty("pathInfo")){e.pathInfo=t;for(var i=0;i<this._pathInfo.length;i++)!e.pathInfo.hasOwnProperty("totalLengthProportion")&&!e.pathInfo.hasOwnProperty("relativeHeight")&&e.pathInfo.push({totalLengthProportion:this._pathInfo[i].totalLengthProportion,relativeHeight:this._pathInfo[i].relativeHeight})}e.hasOwnProperty("startGeoEntityUUID")||(e.startGeoEntityUUID=this._startGeoEntityUUID),e.hasOwnProperty("targetGeoEntityUUID")||(e.targetGeoEntityUUID=this._targetGeoEntityUUID),e.hasOwnProperty("attactModelPath")||(e.attactModelPath=_0x1569f6.absoluteToRelativePath(this._attactModelPath)),e.hasOwnProperty("attactModelScale")||(e.attactModelScale=this._attactModelScale),e.hasOwnProperty("during")||(e.during=this._during),e.hasOwnProperty("lineWide")||(e.lineWide=this._lineWide),e.hasOwnProperty("lineColor")||(e.lineColor=_0x1569f6.colorToObject(this._lineColor));return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),WebGLPlot$g.toJSON(e)}fromJSON(e){if(!WebGLPlot$g.defined(e))return;let t=JSON.parse(e);if(WebGLPlot$g.defined(t.type)&&(this._type=t.type),WebGLPlot$g.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$g.defined(t.name)&&(this._name=t.name),WebGLPlot$g.defined(t.visible)&&(this._visible=t.visible),this._pathInfo=[],WebGLPlot$g.defined(t.pathInfo))for(var i=0;i<t.pathInfo.length;i++)WebGLPlot$g.defined(t.pathInfo[i].totalLengthProportion),WebGLPlot$g.defined(t.pathInfo[i].relativeHeight)&&this._pathInfo.push({totalLengthProportion:t.pathInfo[i].totalLengthProportion,relativeHeight:t.pathInfo[i].relativeHeight});WebGLPlot$g.defined(t.startGeoEntityUUID)&&(this._startGeoEntityUUID=t.startGeoEntityUUID),WebGLPlot$g.defined(t.targetGeoEntityUUID)&&(this._targetGeoEntityUUID=t.targetGeoEntityUUID),WebGLPlot$g.defined(t.attactModelPath)&&(this._attactModelPath=_0x1569f6.relativeToAbsolutePath(t.attactModelPath)),WebGLPlot$g.defined(t.attactModelScale)&&(this._attactModelScale=t.attactModelScale),WebGLPlot$g.defined(t.during)&&(this._during=t.during),WebGLPlot$g.defined(t.lineWide)&&(this._lineWide=t.lineWide),WebGLPlot$g.defined(t.lineColor)&&(this._lineColor=_0x1569f6.objectToColor(t.lineColor)),WebGLPlot$g.defined(t.offset)&&(WebGLPlot$g.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$g.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$g.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x2035f0;e._UUID=this._UUID,e._name=this._name,e._type=this._type,e._visible=this._visible,e._pathInfo=[];for(let t=0;t<this._pathInfo.length;t++){let i=this._pathInfo[t];e._pathInfo.push({totalLengthProportion:i.totalLengthProportion,relativeHeight:i.relativeHeight})}return e._startGeoEntityUUID=this._startGeoEntityUUID,e._targetGeoEntityUUID=this._targetGeoEntityUUID,e._attactModelPath=this._attactModelPath,e._attactModelScale=this._attactModelScale,e._during=this._during,e._lineWide=this._lineWide,e._lineColor=this._lineColor.clone(),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._pntOffset=new _0x45ea17(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_addEffectToScene(e){if(!WebGLPlot$g.defined(this._pntOffset)||!WebGLPlot$g.defined(this._startGeoEntityUUID)||!WebGLPlot$g.defined(this._targetGeoEntityUUID)||!WebGLPlot$g.defined(this._during)||this._during<=0)return!1;let t=_0x5f28ea.getGeoEntityParamByUUID(this._startGeoEntityUUID),i=_0x5f28ea.getGeoEntityParamByUUID(this._targetGeoEntityUUID);if(!WebGLPlot$g.defined(t)||!WebGLPlot$g.defined(i))return!1;let n=_0x1569f6.calcControlPoint(t,this._pntOffset,e),r=i.getPosition();if(!WebGLPlot$g.defined(n)||!WebGLPlot$g.defined(r))return!1;var o=this._calPoints(n,r,this._pathInfo),a=this._createCurve3D(o);return this._attackModel=this._createAttackModel(e,a),!!WebGLPlot$g.defined(this._attackModel)&&(this._modelLinePrimitive=e.primitives.add(new WebGLPlot$g.PolylineCollection),this._moveParm={},this._moveParm.curvePath3D=a,this._moveParm.speed=_0x1569f6.getAllDistance(a)/(1e3*this._during),this._moveParm.startTime=WebGLPlot$g.JulianDate.fromDate(new Date),this._moveParm.lastTime=this._moveParm.startTime,this._moveParm.lastDistance=0,this._moveParm.lastPoint=a[0],this._moveParm.fixeFrameTransform=WebGLPlot$g.Transforms.localFrameToFixedFrameGenerator("east","north"),this._moveParm.hpRoll=new WebGLPlot$g.HeadingPitchRoll,this._moveParm.modelSize=_0x1569f6.getModelSize({modelPath:this._attactModelPath,scene:e}),this._isPlay=!0,!0)}_removeEffectFromScene(e){this._isPlay&&(this._isPlay=!1),this._moveParm=void 0,WebGLPlot$g.defined(this._attackModel)&&e.primitives.contains(this._attackModel)&&(e.primitives.remove(this._attackModel),this._attackModel=void 0),WebGLPlot$g.defined(this._modelLinePrimitive)&&e.primitives.contains(this._modelLinePrimitive)&&(e.primitives.remove(this._modelLinePrimitive),this._modelLinePrimitive=void 0)}_executeFunction(e){if(this._isPlay){if(!WebGLPlot$g.defined(this._moveParm.modelSize))return void(this._moveParm.modelSize=_0x1569f6.getModelSize({modelPath:this._attactModelPath,scene:e}));var t=WebGLPlot$g.JulianDate.fromDate(new Date);if(t.secondsOfDay-this._moveParm.startTime.secondsOfDay>this._during)return void(this._isPlay=!1);var i=1e3*(t.secondsOfDay-this._moveParm.lastTime.secondsOfDay);this._moveParm.lastTime=t;var n=this._moveParm.lastDistance+i*this._moveParm.speed;this._moveParm.lastDistance=n;var r=_0x1569f6.getPositionByDistance(this._moveParm.curvePath3D,n);let a=r.index;if(a>=this._moveParm.curvePath3D.length||-1==a)return;let s=r.point;if(!s.equals(this._moveParm.lastPoint)){let e=[new WebGLPlot$g.Cartesian3(this._moveParm.lastPoint.x,this._moveParm.lastPoint.y,this._moveParm.lastPoint.z),new WebGLPlot$g.Cartesian3(s.x,s.y,s.z)];if(this._moveParm.lastPoint=s,this._modelLinePrimitive.add({positions:e,width:this._lineWide,material:new WebGLPlot$g.Material.fromType("Color",{color:this._lineColor})}),a<this._moveParm.curvePath3D.length-1){var o=this._moveParm.curvePath3D[a+1];const e=_0x1569f6.getHeading(this._moveParm.curvePath3D[a],o);e&&(this._moveParm.hpRoll.heading=e);const t=_0x1569f6.getPitch(this._moveParm.curvePath3D[a],o);t&&(this._moveParm.hpRoll.roll=t)}let t=_0x1569f6.cartesian3ToDegrees(s);t=new WebGLPlot$g.Cartesian3(t.x,t.y,t.z-this._moveParm.modelSize.z*this._attactModelScale/2),t=_0x1569f6.degreesToCartesian3(t),this._attackModel.modelMatrix=WebGLPlot$g.Transforms.headingPitchRollToFixedFrame(t,this._moveParm.hpRoll,WebGLPlot$g.Ellipsoid.WGS84,this._moveParm.fixeFrameTransform)}}}setGeoEntityParameter(e,t){this._geoEntityParameter=e}_createAttackModel(e,t){let i=this._attactModelPath,n=this._attactModelScale;if(!WebGLPlot$g.defined(i)||!WebGLPlot$g.defined(n)||!WebGLPlot$g.defined(t)||t.length<2)return null;let r=new WebGLPlot$g.HeadingPitchRoll;const o=_0x1569f6.getHeading(t[0],t[1]);o&&(r.heading=o);const a=_0x1569f6.getPitch(t[0],t[1]);a&&(r.roll=a);let s=WebGLPlot$g.Transforms.headingPitchRollToFixedFrame(t[0],r,WebGLPlot$g.Ellipsoid.WGS84,WebGLPlot$g.Transforms.localFrameToFixedFrameGenerator("east","north"));return viewer.scene.primitives.add(_0x1569f6.getModel({url:i,scale:n,modelMatrix:s}))}_calPoints(e,t,i){var n=[];if(n.push(e),WebGLPlot$g.defined(i)&&i.length>0)for(var r=e.x-t.x,o=e.y-t.y,a=e.z-t.z,s=0;s<i.length;s++){var l=i[s].totalLengthProportion,u=new WebGLPlot$g.Cartesian3(e.x-r*l,e.y-o*l,e.z-a*l+i[s].relativeHeight);n.push(u)}return n.push(t),n}_createCurve3D(e){let t=[];for(let i=0;i<e.length;i++)t.push(_0x1569f6.degreesToCartesian3(e[i]));let i=[];i.push(0);let n=0,r=_0x1569f6.getAllDistance(t);for(let e=0;e<t.length-2;e++){let o=t[e],a=t[e+1];n+=WebGLPlot$g.Cartesian3.distance(o,a),i.push(n/r)}i.push(1);let o=new WebGLPlot$g.CatmullRomSpline({points:t,times:i}),a=100*t.length,s=[];for(let e=0;e<=a;e++){let t=o.evaluate(e/a);s.push(t)}return s}}const _0x3c077c=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x37fd25=_0x3c077c(void 0,(function(){return _0x37fd25.toString().search("(((.+)+)+)+$").toString().constructor(_0x37fd25).search("(((.+)+)+)+$")}));_0x37fd25();const _0x17ba20={ColorMode:0,TextureMode:1};var _0x5c4879=Object.freeze(_0x17ba20);const _0x20b2bf=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x3822c8=_0x20b2bf(void 0,(function(){return _0x3822c8.toString().search("(((.+)+)+)+$").toString().constructor(_0x3822c8).search("(((.+)+)+)+$")}));_0x3822c8();class _0x53994b extends _0x4c64cd{constructor(e){super(e),e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._UUID="GeoEntityEffectScanWave_"+WebGLPlot$g.createGuid(),this._pntOffset=WebGLPlot$g.defaultValue(e.pntOffset,new WebGLPlot$g.Cartesian3(0,.5,.5)),this._type=WebGLPlot$g.defaultValue(e.type,_0x370c4a.SCANWAVE),this._name=WebGLPlot$g.defaultValue(e.name,_0x5f28ea.getDefaultName({effectType:this._type})),this._bChangeSizeFlowModel=WebGLPlot$g.defaultValue(e.bChangeSizeFlowModel,!0),this._length=WebGLPlot$g.defaultValue(e.length,15),this._width=WebGLPlot$g.defaultValue(e.width,5),this._height=WebGLPlot$g.defaultValue(e.height,3),this._scanAngle=WebGLPlot$g.defaultValue(e.scanAngle,30),this._sectionSlices=WebGLPlot$g.defaultValue(e.sectionSlices,360),this._initRotate=WebGLPlot$g.defaultValue(e.initRotate,new WebGLPlot$g.Cartesian3(90,0,0)),this._repeatCount=WebGLPlot$g.defaultValue(e.repeatCount,8),this._flowSpeed=WebGLPlot$g.defaultValue(e.flowSpeed,3),this._scanAxis=WebGLPlot$g.defaultValue(e.scanAxis,1),this._scanSpeed=WebGLPlot$g.defaultValue(e.scanSpeed,.5),this._picturePath=WebGLPlot$g.defaultValue(e.picturePath,""),this._pictureColorScale=WebGLPlot$g.defaultValue(e.pictureColorScale,5),this._colorBack=WebGLPlot$g.defaultValue(e.colorBack,new WebGLPlot$g.Color(0,1,0,.3)),this._colorBackScale=WebGLPlot$g.defaultValue(e.colorBackScale,1),this._colorForward=WebGLPlot$g.defaultValue(e.colorForward,new WebGLPlot$g.Color(1,1,0,1)),this._colorForwardScale=WebGLPlot$g.defaultValue(e.colorForwardScale,5),this._colorForwardLengthRatio=WebGLPlot$g.defaultValue(e.colorForwardLengthRatio,.08),this._sectionAngle=WebGLPlot$g.defaultValue(e.sectionAngle,360),this._mode=WebGLPlot$g.defaultValue(e.mode,_0x5c4879.ColorMode),this._scanWavePrimitive=void 0,this._currentRotateDirection=1,this._currentRotateDirectionAngle=0}getLength(){return this._length}setLength(e){this._length=e,this._initialized=!1}getWidth(){return this._width}setWidth(e){this._width=e,this._initialized=!1}getHeight(){return this._height}setHeight(e){this._height=e,this._initialized=!1}getScanAngle(){return this._scanAngle}setScanAngle(e){this._scanAngle=e,this._initialized=!1}getSectionSlices(){return this._sectionSlices}setSectionSlices(e){this._sectionSlices=e,this._initialized=!1}getInitRotate(){return this._initRotate}setInitRotate(e){this._initRotate=e,this._initialized=!1}getRepeatCount(){return this._repeatCount}setRepeatCount(e){this._repeatCount=e,this._initialized=!1}getFlowSpeed(){return this._flowSpeed}setFlowSpeed(e){this._flowSpeed=e,this._initialized=!1}getScanAxis(){return this._scanAxis}setScanAxis(e){this._scanAxis=e,this._initialized=!1}getScanSpeed(){return this._scanSpeed}setScanSpeed(e){this._scanSpeed=e,this._initialized=!1}getPicturePath(){return this._picturePath}setPicturePath(e){this._picturePath=e,this._initialized=!1}getPictureColorScale(){return this._pictureColorScale}setPictureColorScale(e){this._pictureColorScale=e,this._initialized=!1}getColorBack(){return this._colorBack}setColorBack(e){this._colorBack=e,this._initialized=!1}getColorBackScale(){return this._colorBackScale}setColorBackScale(e){this._colorBackScale=e,this._initialized=!1}getColorForward(){return this._colorForward}setColorForward(e){this._colorForward=e,this._initialized=!1}getColorForwardScale(){return this._colorForwardScale}setColorForwardScale(e){this._colorForwardScale=e,this._initialized=!1}getColorForwardLengthRatio(){return this._colorForwardLengthRatio}setColorForwardLengthRatio(e){this._colorForwardLengthRatio=e,this._initialized=!1}getSectionAngle(){return this._sectionAngle}setSectionAngle(e){this._sectionAngle=e,this._initialized=!1}getMode(){return this._mode}setMode(e){this._mode=e,this._initialized=!1}_addEffectToScene(e){let t=!1;return this._scanWavePrimitive=this._createScanWavePrimitive(e),WebGLPlot$g.defined(this._scanWavePrimitive)&&(e.primitives.add(this._scanWavePrimitive),t=!0),t}_removeEffectFromScene(e){WebGLPlot$g.defined(this._scanWavePrimitive)&&e.primitives.contains(this._scanWavePrimitive)&&e.primitives.remove(this._scanWavePrimitive),this._scanWavePrimitive=void 0}_executeFunction(e){if(!WebGLPlot$g.defined(this._scanWavePrimitive)||!this._visible||this._scanAngle<=0)return;let t=this._scanAngle/2;(this._currentRotateDirectionAngle>t||this._currentRotateDirectionAngle<-t)&&(this._currentRotateDirection=-this._currentRotateDirection);let i=this._scanSpeed*this._currentRotateDirection;this._currentRotateDirectionAngle+=i;let n=this._getRotateMatrix(i);this._scanWavePrimitive.modelMatrix=WebGLPlot$g.Matrix4.multiplyByMatrix3(this._scanWavePrimitive.modelMatrix,n,new WebGLPlot$g.Matrix4)}_getRotateMatrix(e){let t;return 0===this._scanAxis?t=WebGLPlot$g.Matrix3.fromRotationX(WebGLPlot$g.CesiumMath.toRadians(e)):1===this._scanAxis?t=WebGLPlot$g.Matrix3.fromRotationY(WebGLPlot$g.CesiumMath.toRadians(e)):2===this._scanAxis&&(t=WebGLPlot$g.Matrix3.fromRotationZ(WebGLPlot$g.CesiumMath.toRadians(e))),t}_createScanWavePrimitive(e){this._currentRotateDirection=1,this._currentRotateDirectionAngle=0;let t=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$g.defined(t))return null;let i=this._generateGeometry();if(!WebGLPlot$g.defined(i))return;let n,r="";r=this._mode===_0x5c4879.ColorMode?" uniform vec4 colorForward; uniform float colorForwardScale; uniform vec4 colorBack; uniform float colorBackScale; uniform float repeat; uniform float flowSpeed; uniform float colorForwardLengthRatio; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); float sp = 1.0 / repeat; float dis = materialInput.st.t; float m = mod(dis - fract(czm_frameNumber * 0.001 * flowSpeed), sp); if(m <= sp * colorForwardLengthRatio){ material.diffuse = colorForward.rgb * colorForwardScale; material.alpha = colorForward.a; } else { material.diffuse = colorBack.rgb * colorBackScale; material.alpha = colorBack.a; } return material; }":" uniform sampler2D picture; uniform float pictureColorScale; uniform vec2 repeat; uniform float flowSpeed; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); vec2 st = materialInput.st; vec4 colorImage = texture2D(picture, vec2(fract(repeat.x * st.s), fract(repeat.y * st.t - czm_frameNumber * 0.005 * flowSpeed))); material.diffuse = colorImage.rgb * pictureColorScale; material.alpha = colorImage.a; return material; }",n=this._mode===_0x5c4879.ColorMode?new WebGLPlot$g.Material({fabric:{uniforms:{colorForward:this._colorForward,colorForwardScale:this._colorForwardScale,colorBack:this._colorBack,colorBackScale:this._colorBackScale,repeat:this._repeatCount,flowSpeed:this._flowSpeed,colorForwardLengthRatio:this._colorForwardLengthRatio},source:r},translucent:!0}):new WebGLPlot$g.Material({fabric:{uniforms:{picture:this._picturePath,pictureColorScale:this._pictureColorScale,repeat:new WebGLPlot$g.Cartesian2(1,this._repeatCount),flowSpeed:this._flowSpeed},source:r},translucent:!0});let o=e.frameState;o.scene3DOnly=!0;let a=new WebGLPlot$g.MaterialAppearance({material:n,faceForward:!1,closed:!0,frameState:o});return new WebGLPlot$g.Primitive({releaseGeometryInstances:!1,geometryInstances:new WebGLPlot$g.GeometryInstance({geometry:i}),asynchronous:!1,appearance:a,modelMatrix:t})}_generateGeometry(){let e=this._sectionSlices,t=new Array(3*(e+1)),i=this._sectionAngle/e;for(let n=0;n<e+1;n++)if(0==n)t[3*n]=0,t[3*n+1]=0,t[3*n+2]=0;else{let e=_0x1569f6.circlePoint(new WebGLPlot$g.Cartesian2(0,0),this._width,this._height,i*n);t[3*n]=e.x,t[3*n+1]=e.y,t[3*n+2]=-this._length}let n=new Float64Array(t),r=WebGLPlot$g.BoundingSphere.fromVertices(t),o=new Array(3*e);for(let t=0;t<e;t++)t==e-1?(o[3*t]=0,o[3*t+1]=t+1,o[3*t+2]=1):(o[3*t]=0,o[3*t+1]=t+1,o[3*t+2]=t+2);this._sectionAngle<360&&o.splice(o.length-3,3);let a=new Uint16Array(o),s=new Array(4*(e+1));for(let t=0;t<e+1;t++)s[4*t]=1,s[4*t+1]=1,s[4*t+2]=1,s[4*t+3]=1;let l=new Array(2*(e+1));if(this._mode===_0x5c4879.ColorMode)for(let t=0;t<e+1;t++)0==t?(l[2*t]=0,l[2*t+1]=0):(l[2*t]=0,l[2*t+1]=1);else for(let t=0;t<e+1;t++)0==t?(l[2*t]=.5,l[2*t+1]=0):(l[2*t]=1/e/2+1/e*(t-1),l[2*t+1]=1);let u=new WebGLPlot$g.GeometryAttributes;return u.position=new WebGLPlot$g.GeometryAttribute({componentDatatype:WebGLPlot$g.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:n}),u.color=new WebGLPlot$g.GeometryAttribute({componentDatatype:WebGLPlot$g.ComponentDatatype.FLOAT,componentsPerAttribute:4,values:new Float32Array(s)}),u.st=new WebGLPlot$g.GeometryAttribute({componentDatatype:WebGLPlot$g.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(l)}),new WebGLPlot$g.Geometry({attributes:u,indices:a,primitiveType:WebGLPlot$g.PrimitiveType.TRIANGLES,boundingSphere:r})}_calcModelMatrix(e,t){let i=WebGLPlot$g.Matrix3.fromRotationX(WebGLPlot$g.CesiumMath.toRadians(t.x));return e=WebGLPlot$g.Matrix4.multiplyByMatrix3(e,i,new WebGLPlot$g.Matrix4),i=WebGLPlot$g.Matrix3.fromRotationY(WebGLPlot$g.CesiumMath.toRadians(t.y)),e=WebGLPlot$g.Matrix4.multiplyByMatrix3(e,i,new WebGLPlot$g.Matrix4),i=WebGLPlot$g.Matrix3.fromRotationZ(WebGLPlot$g.CesiumMath.toRadians(t.z)),e=WebGLPlot$g.Matrix4.multiplyByMatrix3(e,i,new WebGLPlot$g.Matrix4)}_calcControlPoint(e,t,i){const n=_0x1569f6.calcControlPosMatrix(e,t,i);if(!WebGLPlot$g.defined(n))return null;const r=WebGLPlot$g.HeadingPitchRoll.fromDegrees(-this._initRotate.z,-this._initRotate.y,this._initRotate.x,new WebGLPlot$g.HeadingPitchRoll),o=WebGLPlot$g.Matrix3.fromHeadingPitchRoll(r,new WebGLPlot$g.Matrix3);return WebGLPlot$g.Matrix4.multiplyByMatrix3(n,o,new WebGLPlot$g.Matrix4)}setGeoEntityParameter(e,t){if(WebGLPlot$g.defined(this._scanWavePrimitive)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x3f7d9f.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,this._scene);if(WebGLPlot$g.defined(t)){let e=this._getRotateMatrix(this._currentRotateDirectionAngle);this._scanWavePrimitive.modelMatrix=WebGLPlot$g.Matrix4.multiplyByMatrix3(t,e,new WebGLPlot$g.Matrix4)}}if(e.getShowMode()==_0x3f7d9f.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._length*=t,this._width*=t,this._height*=t,this._initialized=!1}}this._geoEntityParameter=e}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),e.hasOwnProperty("length")||(e.length=this._length),e.hasOwnProperty("width")||(e.width=this._width),e.hasOwnProperty("height")||(e.height=this._height),e.hasOwnProperty("scanAngle")||(e.scanAngle=this._scanAngle),e.hasOwnProperty("sectionSlices")||(e.sectionSlices=this._sectionSlices),e.hasOwnProperty("initRotate")||(e.initRotate={x:this._initRotate.x,y:this._initRotate.y,z:this._initRotate.z}),e.hasOwnProperty("repeatCount")||(e.repeatCount=this._repeatCount),e.hasOwnProperty("flowSpeed")||(e.flowSpeed=this._flowSpeed),e.hasOwnProperty("scanAxis")||(e.scanAxis=this._scanAxis),e.hasOwnProperty("scanSpeed")||(e.scanSpeed=this._scanSpeed),e.hasOwnProperty("picturePath")||(e.picturePath=_0x1569f6.absoluteToRelativePath(this._picturePath)),e.hasOwnProperty("pictureColorScale")||(e.pictureColorScale=this._pictureColorScale),e.hasOwnProperty("colorBack")||(e.colorBack=_0x1569f6.colorToObject(this._colorBack)),e.hasOwnProperty("colorBackScale")||(e.colorBackScale=this._colorBackScale),e.hasOwnProperty("colorForward")||(e.colorForward=_0x1569f6.colorToObject(this._colorForward)),e.hasOwnProperty("colorForwardScale")||(e.colorForwardScale=this._colorForwardScale),e.hasOwnProperty("colorForwardLengthRatio")||(e.colorForwardLengthRatio=this._colorForwardLengthRatio),e.hasOwnProperty("sectionAngle")||(e.sectionAngle=this._sectionAngle),e.hasOwnProperty("mode")||(e.mode=this._mode),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$g.defined(e))return;let t=JSON.parse(e);WebGLPlot$g.defined(t.type)&&(this._type=t.type),WebGLPlot$g.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$g.defined(t.name)&&(this._name=t.name),WebGLPlot$g.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$g.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$g.defined(t.offset)&&(WebGLPlot$g.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$g.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$g.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z)),WebGLPlot$g.defined(t.length)&&(this._length=t.length),WebGLPlot$g.defined(t.width)&&(this._width=t.width),WebGLPlot$g.defined(t.height)&&(this._height=t.height),WebGLPlot$g.defined(t.scanAngle)&&(this._scanAngle=t.scanAngle),WebGLPlot$g.defined(t.sectionSlices)&&(this._sectionSlices=t.sectionSlices),WebGLPlot$g.defined(t.initRotate)&&(this._initRotate=new WebGLPlot$g.Cartesian3(t.initRotate.x,t.initRotate.y,t.initRotate.z)),WebGLPlot$g.defined(t.repeatCount)&&(this._repeatCount=t.repeatCount),WebGLPlot$g.defined(this.flowSpeed)&&(this._flowSpeed=t.flowSpeed),WebGLPlot$g.defined(t.scanAxis)&&(this._scanAxis=t.scanAxis),WebGLPlot$g.defined(t.scanSpeed)&&(this._scanSpeed=t.scanSpeed),WebGLPlot$g.defined(t.picturePath)&&(this._picturePath=_0x1569f6.relativeToAbsolutePath(t.picturePath)),WebGLPlot$g.defined(t.pictureColorScale)&&(this._pictureColorScale=t.pictureColorScale),WebGLPlot$g.defined(t.colorBack)&&(this._colorBack=_0x1569f6.objectToColor(t.colorBack)),WebGLPlot$g.defined(t.colorBackScale)&&(this._colorBackScale=t.colorBackScale),WebGLPlot$g.defined(t.colorForward)&&(this._colorForward=_0x1569f6.objectToColor(t.colorForward)),WebGLPlot$g.defined(t.colorForwardScale)&&(this._colorForwardScale=t.colorForwardScale),WebGLPlot$g.defined(t.colorForwardLengthRatio)&&(this._colorForwardLengthRatio=t.colorForwardLengthRatio),WebGLPlot$g.defined(t.sectionAngle)&&(this._sectionAngle=t.sectionAngle),WebGLPlot$g.defined(t.mode)&&(this._mode=t.mode)}clone(){let e=new _0x53994b;return e._UUID=this._UUID,e._name=this._name,e._type=this._type,e._visible=this._visible,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._pntOffset=new WebGLPlot$g.Cartesian3(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._length=this._length,e._width=this._width,e._height=this._height,e._scanAngle=this._scanAngle,e._sectionSlices=this._sectionSlices,e._initRotate=this._initRotate,e._repeatCount=this._repeatCount,e._flowSpeed=this._flowSpeed,e._scanAxis=this._scanAxis,e._scanSpeed=this._scanSpeed,e._picturePath=this._picturePath,e._pictureColorScale=this._pictureColorScale,e._colorBack=this._colorBack.clone(),e._colorBackScale=this._colorBackScale,e._colorForward=this._colorForward.clone(),e._colorForwardScale=this._colorForwardScale,e._colorForwardLengthRatio=this._colorForwardLengthRatio,e._sectionAngle=this._sectionAngle,e._mode=this._mode,e}}const _0xf46751=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x4d95a3=_0xf46751(void 0,(function(){return _0x4d95a3.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d95a3).search("(((.+)+)+)+$")}));_0x4d95a3();class _0x59a1d3 extends _0x4c64cd{constructor(e){super(e),e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._type=_0x370c4a.BURST,this._name=WebGLPlot$g.defaultValue(e.name,_0x5f28ea.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectBurst_"+WebGLPlot$g.createGuid(),this._pntOffset=WebGLPlot$g.defaultValue(e.pntOffset,new _0x45ea17(0,0,.5)),this._bChangeSizeFlowModel=WebGLPlot$g.defaultValue(e.bChangeSizeFlowModel,!0),this._burstDiameter=WebGLPlot$g.defaultValue(e.burstDiameter,50),this._paricleBurst=void 0}setBurstDiameter(e){this._burstDiameter=e,this._initialized=!1}getBurstDiameter(){return this._burstDiameter}setGeoEntityParameter(e,t){if(WebGLPlot$g.defined(this._paricleBurst)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x3f7d9f.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$g.defined(t)&&(this._paricleBurst.emitterModelMatrix=t)}if(e.getShowMode()==_0x3f7d9f.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._burstDiameter*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;return this._paricleBurst=this._createBurstParticle(e),WebGLPlot$g.defined(this._paricleBurst)&&(e.primitives.add(this._paricleBurst),t=!0),t}_removeEffectFromScene(e){WebGLPlot$g.defined(this._paricleBurst)&&e.primitives.contains(this._paricleBurst)&&e.primitives.remove(this._paricleBurst),this._paricleBurst=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("burstDiameter")||(e.burstDiameter=this._burstDiameter),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$g.defined(e))return;let t=JSON.parse(e);WebGLPlot$g.defined(t.type)&&(this._type=t.type),WebGLPlot$g.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$g.defined(t.name)&&(this._name=t.name),WebGLPlot$g.defined(t.burstDiameter)&&(this._burstDiameter=t.burstDiameter),WebGLPlot$g.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$g.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$g.defined(t.offset)&&(WebGLPlot$g.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$g.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$g.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x59a1d3;return e._UUID=this._UUID,e._name=this._name,e._type=this._type,e._visible=this._visible,e._burstDiameter=this._burstDiameter,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._pntOffset=new _0x45ea17(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_createBurstParticle(e){if(!WebGLPlot$g.defined(this._geoEntityParameter)||!WebGLPlot$g.defined(this._pntOffset)||!WebGLPlot$g.defined(this._burstDiameter)||this._burstDiameter<=0)return null;let t=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$g.defined(t))return null;let i=this._burstDiameter/1,n=1*i;n<.5&&(n=.5);let r=2*i,o=2*i;return new WebGLPlot$g.ParticleSystem({image:_0x5f28ea.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/explosion.png",startColor:new Cesium.Color(1,1,1,1),endColor:new Cesium.Color(.5,0,0,0),startScale:1,endScale:.8,minimumParticleLife:.5,maximumParticleLife:1.2,minimumSpeed:r,maximumSpeed:o,imageSize:new WebGLPlot$g.Cartesian2(n,n),emissionRate:300,lifetime:1,bursts:[{time:0,minimum:500,maximum:500},{time:1,minimum:500,maximum:500}],loop:!0,emitterModelMatrix:t,emitter:new Cesium.SphereEmitter(n),sizeInMeters:!0})}_calcControlPoint(e,t,i){let n=_0x1569f6.calcControlPoint(e,t,i);return WebGLPlot$g.defined(n)?WebGLPlot$g.Transforms.headingPitchRollToFixedFrame(_0x1569f6.degreesToCartesian3(n),new WebGLPlot$g.HeadingPitchRoll,WebGLPlot$g.Ellipsoid.WGS84,WebGLPlot$g.Transforms.localFrameToFixedFrameGenerator("east","north")):null}}const _0x3b06f8=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x31d823=_0x3b06f8(void 0,(function(){return _0x31d823.toString().search("(((.+)+)+)+$").toString().constructor(_0x31d823).search("(((.+)+)+)+$")}));_0x31d823();class _0x34b663 extends _0x4c64cd{constructor(e){super(e),e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._pntOffset=WebGLPlot$g.defaultValue(e.pntOffset,new _0x45ea17(0,-.5,.5)),this._type=_0x370c4a.AUGMENT,this._name=WebGLPlot$g.defaultValue(e.name,_0x5f28ea.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectAugment_"+WebGLPlot$g.createGuid(),this._bChangeSizeFlowModel=WebGLPlot$g.defaultValue(e.bChangeSizeFlowModel,!0),this._augmentPicture=WebGLPlot$g.defaultValue(e.augmentPicture,_0x5f28ea.getResourceURI()+"/iserver/mgis/situationSimulation/AugPicture/Augment_Blue.png"),this._pictureWidth=WebGLPlot$g.defaultValue(e.pictureWidth,50),this._pictureHeight=WebGLPlot$g.defaultValue(e.pictureHeight,50),this._minDistanceDisplay=WebGLPlot$g.defaultValue(e.minDistanceDisplay,10),this._maxDistanceDisplay=WebGLPlot$g.defaultValue(e.maxDistanceDisplay,5e4),this._augmentCollection=null,this._augmentGeo=null}setAugmentPicture(e){this._augmentPicture=e,this._initialized=!1}getAugmentPicture(){return this._augmentPicture}setPictureWidth(e){this._pictureWidth=e,this._initialized=!1}getPictureWidth(){return this._pictureWidth}setPictureHeight(e){this._pictureHeight=e,this._initialized=!1}getPictureHeight(){return this._pictureHeight}setMinDistanceDisplay(e){this._minDistanceDisplay=e,this._initialized=!1}getMinDistanceDisplay(){return this._minDistanceDisplay}setMaxDistanceDisplay(e){this._maxDistanceDisplay=e,this._initialized=!1}getMaxDistanceDisplay(){return this._maxDistanceDisplay}setGeoEntityParameter(e,t){if(WebGLPlot$g.defined(this._augmentGeo)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())){let t=_0x1569f6.degreesToCartesian3(e.getPosition());WebGLPlot$g.defined(t)&&(this._augmentGeo.position=t)}if(e.getShowMode()==_0x3f7d9f.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._pictureWidth*=t,this._pictureHeight*=t,this._initialized=!1}}this._geoEntityParameter=e}_executeFunction(e){if(!WebGLPlot$g.defined(this._augmentGeo)||!WebGLPlot$g.defined(this._geoEntityParameter)||!this._augmentGeo.show||this._pictureHeight<=0)return;let t=Math.abs(WebGLPlot$g.CesiumMath.toDegrees(e.camera.pitch))/90*this._pictureHeight;t!=this._augmentGeo.height&&(this._augmentGeo.height=t)}_addEffectToScene(e){if(!WebGLPlot$g.defined(e)||!WebGLPlot$g.defined(this._augmentPicture))return!1;if(!WebGLPlot$g.defined(this._geoEntityParameter))return;let t=_0x1569f6.degreesToCartesian3(this._geoEntityParameter.getPosition());return this._augmentCollection=e.primitives.add(new WebGLPlot$g.BillboardCollection),this._augmentGeo=this._augmentCollection.add({position:t,image:this._augmentPicture,horizontalOrigin:WebGLPlot$g.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$g.VerticalOrigin.CENTER,distanceDisplayCondition:new WebGLPlot$g.DistanceDisplayCondition(this._minDistanceDisplay,this._maxDistanceDisplay),show:!0,width:this._pictureWidth,height:this._pictureHeight}),!!WebGLPlot$g.defined(this._augmentGeo)}_removeEffectFromScene(e){WebGLPlot$g.defined(this._augmentGeo)&&WebGLPlot$g.defined(this._augmentCollection)&&e.primitives.contains(this._augmentCollection)&&(e.primitives.remove(this._augmentCollection),this._augmentCollection=void 0,this._augmentGeo=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel),e.hasOwnProperty("augmentPicture")||(e.augmentPicture=_0x1569f6.absoluteToRelativePath(this._augmentPicture)),e.hasOwnProperty("pictureWidth")||(e.pictureWidth=this._pictureWidth),e.hasOwnProperty("pictureHeight")||(e.pictureHeight=this._pictureHeight),e.hasOwnProperty("minDistanceDisplay")||(e.minDistanceDisplay=this._minDistanceDisplay),e.hasOwnProperty("maxDistanceDisplay")||(e.maxDistanceDisplay=this._maxDistanceDisplay),e.hasOwnProperty("visible")||(e.visible=this._visible);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$g.defined(e))return;let t=JSON.parse(e);WebGLPlot$g.defined(t.type)&&(this._type=t.type),WebGLPlot$g.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$g.defined(t.name)&&(this._name=t.name),WebGLPlot$g.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$g.defined(t.augmentPicture)&&(this._augmentPicture=_0x1569f6.relativeToAbsolutePath(t.augmentPicture)),WebGLPlot$g.defined(t.pictureWidth)&&(this._pictureWidth=t.pictureWidth),WebGLPlot$g.defined(t.pictureHeight)&&(this._pictureHeight=t.pictureHeight),WebGLPlot$g.defined(t.minDistanceDisplay)&&(this._minDistanceDisplay=t.minDistanceDisplay),WebGLPlot$g.defined(t.maxDistanceDisplay)&&(this._maxDistanceDisplay=t.maxDistanceDisplay),WebGLPlot$g.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$g.defined(t.offset)&&(WebGLPlot$g.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$g.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$g.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x34b663;return e._UUID=this._UUID,e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x45ea17(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._augmentPicture=this._augmentPicture,e._pictureWidth=this._pictureWidth,e._pictureHeight=this._pictureHeight,e._minDistanceDisplay=this._minDistanceDisplay,e._maxDistanceDisplay=this._maxDistanceDisplay,e}}const _0x1a82e9=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x775430=_0x1a82e9(void 0,(function(){return _0x775430.toString().search("(((.+)+)+)+$").toString().constructor(_0x775430).search("(((.+)+)+)+$")}));_0x775430();const _0x4eb1ee={ScanCone_ARC:0,ScanCone_FLAT:1};var _0x2cf107=Object.freeze(_0x4eb1ee);const _0x342af2=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x27d226=_0x342af2(void 0,(function(){return _0x27d226.toString().search("(((.+)+)+)+$").toString().constructor(_0x27d226).search("(((.+)+)+)+$")}));_0x27d226();class _0x1d152e extends _0x4c64cd{constructor(e){super(e),e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._pntOffset=WebGLPlot$g.defaultValue(e.pntOffset,new _0x45ea17(0,.3,.5)),this._type=_0x370c4a.SCANCONE,this._name=WebGLPlot$g.defaultValue(e.name,_0x5f28ea.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectScancone_"+WebGLPlot$g.createGuid(),this._bChangeSizeFlowModel=WebGLPlot$g.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot$g.defaultValue(e.radius,15e3),this._scanHAngle=WebGLPlot$g.defaultValue(e.scanHAngle,50),this._scanVAngle=WebGLPlot$g.defaultValue(e.scanVAngle,30),this._sliceHCount=WebGLPlot$g.defaultValue(e.sliceHCount,6),this._sliceVCount=WebGLPlot$g.defaultValue(e.sliceVCount,9),this._isFill=WebGLPlot$g.defaultValue(e.isFill,!0),this._fillColor=WebGLPlot$g.defaultValue(e.fillColor,new WebGLPlot$g.Color(1,0,0,.3)),this._isOutline=WebGLPlot$g.defaultValue(e.isOutline,!0),this._outlineColor=WebGLPlot$g.defaultValue(e.outlineColor,new WebGLPlot$g.Color(1,0,0,1)),this._outlineWidth=WebGLPlot$g.defaultValue(e.outlineWidth,1),this._scanConeType=WebGLPlot$g.defaultValue(e.scanConeType,_0x2cf107.ScanCone_ARC),this._scanSpeed=WebGLPlot$g.defaultValue(e.scanSpeed,.5),this._pitchAngle=WebGLPlot$g.defaultValue(e.pitchAngle,0),this._scanRange=WebGLPlot$g.defaultValue(e.scanRange,30),this._linePrimitiveCone=null,this._fillPrimitiveCone=null,this._currentScanAngle=0,this._unitScanAngle=1}setGeoEntityParameter(e,t){if(WebGLPlot$g.defined(this._fillPrimitiveCone)||WebGLPlot$g.defined(this._linePrimitiveCone)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x3f7d9f.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,new _0x45ea17(this._pitchAngle,0,this._currentScanAngle),this._scene);WebGLPlot$g.defined(t)&&(WebGLPlot$g.defined(this._fillPrimitiveCone)&&(this._fillPrimitiveCone.modelMatrix=t),WebGLPlot$g.defined(this._linePrimitiveCone)&&(this._linePrimitiveCone.modelMatrix=t))}if(e.getShowMode()==_0x3f7d9f.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){this._currentScanAngle=0;let t=!1;if(!WebGLPlot$g.defined(this._geoEntityParameter)||!WebGLPlot$g.defined(this._pntOffset))return!1;let i=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,new _0x45ea17(this._pitchAngle,0,0),e);return!!WebGLPlot$g.defined(i)&&(this._isOutline&&(this._linePrimitiveCone=this._createLinePrimitiveCone(i),WebGLPlot$g.defined(this._linePrimitiveCone)&&(e.primitives.add(this._linePrimitiveCone),t=!0)),this._isFill&&(this._fillPrimitiveCone=this._createFillPrimitiveCone(i),WebGLPlot$g.defined(this._fillPrimitiveCone)&&(e.primitives.add(this._fillPrimitiveCone),t=!0)),t)}_removeEffectFromScene(e){WebGLPlot$g.defined(this._linePrimitiveCone)&&e.primitives.contains(this._linePrimitiveCone)&&e.primitives.remove(this._linePrimitiveCone),WebGLPlot$g.defined(this._fillPrimitiveCone)&&e.primitives.contains(this._fillPrimitiveCone)&&e.primitives.remove(this._fillPrimitiveCone),this._linePrimitiveCone=null,this._fillPrimitiveCone=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),e.hasOwnProperty("radius")||(e.radius=this._radius),e.hasOwnProperty("scanHAngle")||(e.scanHAngle=this._scanHAngle),e.hasOwnProperty("scanVAngle")||(e.scanVAngle=this._scanVAngle),e.hasOwnProperty("sliceHCount")||(e.sliceHCount=this._sliceHCount),e.hasOwnProperty("sliceVCount")||(e.sliceVCount=this._sliceVCount),e.hasOwnProperty("isFill")||(e.isFill=this._isFill),e.hasOwnProperty("fillColor")||(e.fillColor=this._fillColor.toCssColorString()),e.hasOwnProperty("isOutline")||(e.isOutline=this._isOutline),e.hasOwnProperty("outlineColor")||(e.outlineColor=this._outlineColor.toCssColorString()),e.hasOwnProperty("outlineWidth")||(e.outlineWidth=this._outlineWidth),e.hasOwnProperty("scanConeType")||(e.scanConeType=this._scanConeType),e.hasOwnProperty("scanSpeed")||(e.scanSpeed=this._scanSpeed),e.hasOwnProperty("pitchAngle")||(e.pitchAngle=this._pitchAngle),e.hasOwnProperty("scanRange")||(e.scanRange=this._scanRange),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$g.defined(e))return;let t=JSON.parse(e);WebGLPlot$g.defined(t.type)&&(this._type=t.type),WebGLPlot$g.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$g.defined(t.name)&&(this._name=t.name),WebGLPlot$g.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$g.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$g.defined(t.offset)&&(WebGLPlot$g.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$g.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$g.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z)),WebGLPlot$g.defined(t.radius)&&(this._radius=t.radius),WebGLPlot$g.defined(t.scanHAngle)&&(this._scanHAngle=t.scanHAngle),WebGLPlot$g.defined(t.sliceHCount)&&(this._sliceHCount=t.sliceHCount),WebGLPlot$g.defined(t.sliceVCount)&&(this._sliceVCount=t.sliceVCount),WebGLPlot$g.defined(t.isFill)&&(this._isFill=t.isFill),WebGLPlot$g.defined(t.fillColor)&&(this._fillColor=WebGLPlot$g.Color.fromCssColorString(t.fillColor)),WebGLPlot$g.defined(t.isOutline)&&(this._isOutline=t.isOutline),WebGLPlot$g.defined(t.outlineColor)&&(this._outlineColor=WebGLPlot$g.Color.fromCssColorString(t.outlineColor)),WebGLPlot$g.defined(t.outlineWidth)&&(this._outlineWidth=t.outlineWidth),WebGLPlot$g.defined(t.scanConeType)&&(this._scanConeType=t.scanConeType),WebGLPlot$g.defined(t.scanSpeed)&&(this._scanSpeed=t.scanSpeed),WebGLPlot$g.defined(t.pitchAngle)&&(this._pitchAngle=t.pitchAngle),WebGLPlot$g.defined(t.scanRange)&&(this._scanRange=t.scanRange)}clone(){let e=new _0x1d152e;return e._UUID=this._UUID,e._name=this._name,e._type=this._type,e._visible=this._visible,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._pntOffset=new _0x45ea17(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._radius=this._radius,e._scanHAngle=this._scanHAngle,e._scanVAngle=this._scanVAngle,e._sliceHCount=this._sliceHCount,e._sliceVCount=this._sliceVCount,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth,e._scanConeType=this._scanConeType,e._scanSpeed=this._scanSpeed,e._pitchAngle=this._pitchAngle,e._scanRange=this._scanRange,e}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}setScanHAngle(e){this._scanHAngle=e,this._initialized=!1}getScanHAngle(){return this._scanHAngle}setScanVAngle(e){this._scanVAngle=e,this._initialized=!1}getScanVAngle(){return this._scanVAngle}setCellAngle(e){}getCellAngle(){}setSliceHCount(e){this._sliceHCount=e,this._initialized=!1}getSliceHCount(){return this._sliceHCount}setSliceVCount(e){this._sliceVCount=e,this._initialized=!1}getSliceVCount(){return this._sliceVCount}setIsFill(e){this._isFill=e,this._initialized=!1}getIsFill(){return this._isFill}setFillColor(e){this._fillColor=e,this._initialized=!1}getFillColor(){return this._fillColor}setIsOutline(e){this._isOutline=e,this._initialized=!1}getIsOutline(){return this._isOutline}setOutlineColor(e){this._outlineColor=e,this._initialized=!1}getOutlineColor(){return this._outlineColor}setOutlineWidth(e){this._outlineWidth=e,this._initialized=!1}getOutlineWidth(){return this._outlineWidth}setScanConeType(e){this._scanConeType=e,this._initialized=!1}getScanConeType(){return this._scanConeType}setScanSpeed(e){this._scanSpeed=e,this._initialized=!1}getScanSpeed(){return this._scanSpeed}setPitchAngle(e){this._pitchAngle=e,this._initialized=!1}getPitchAngle(){return this._pitchAngle}setScanRange(e){this._scanRange=e,this._initialized=!1}getScanRange(){return this._scanRange}_executeFunction(e){if(!WebGLPlot$g.defined(this._linePrimitiveCone)&&!WebGLPlot$g.defined(this._fillPrimitiveCone)||!this._visible||this._scanRange<=0)return;let t=this._scanRange/2;(this._currentScanAngle>t||this._currentScanAngle<-t)&&(this._unitScanAngle=-this._unitScanAngle);let i=this._scanSpeed*this._unitScanAngle;this._currentScanAngle+=i;let n=WebGLPlot$g.Matrix3.fromRotationZ(WebGLPlot$g.CesiumMath.toRadians(i));WebGLPlot$g.defined(this._linePrimitiveCone)&&(this._linePrimitiveCone.modelMatrix=WebGLPlot$g.Matrix4.multiplyByMatrix3(this._linePrimitiveCone.modelMatrix,n,new WebGLPlot$g.Matrix4)),WebGLPlot$g.defined(this._fillPrimitiveCone)&&(this._fillPrimitiveCone.modelMatrix=WebGLPlot$g.Matrix4.multiplyByMatrix3(this._fillPrimitiveCone.modelMatrix,n,new WebGLPlot$g.Matrix4))}_createFillPrimitiveCone(e){if(!WebGLPlot$g.defined(e))return null;let t=this._createFillGeometry();if(!WebGLPlot$g.defined(t))return null;let i=new WebGLPlot$g.Material({fabric:{type:"Color",uniforms:{color:this._fillColor}},translucent:!0}),n=scene.frameState;n.scene3DOnly=!0;let r=new WebGLPlot$g.MaterialAppearance({material:i,faceForward:!1,closed:!0,frameState:n});return new WebGLPlot$g.Primitive({releaseGeometryInstances:!1,geometryInstances:new WebGLPlot$g.GeometryInstance({geometry:WebGLPlot$g.GeometryPipeline.computeNormal(t)}),asynchronous:!1,modelMatrix:e,appearance:r})}_createLinePrimitiveCone(e){let t=this._outlineColor;if(!WebGLPlot$g.defined(e))return null;let i=this._createLineGeometry();return WebGLPlot$g.defined(i)?new WebGLPlot$g.Primitive({releaseGeometryInstances:!1,geometryInstances:new WebGLPlot$g.GeometryInstance({geometry:i,attributes:{show:new WebGLPlot$g.ShowGeometryInstanceAttribute(!0),distanceDisplayCondition:new WebGLPlot$g.DistanceDisplayConditionGeometryInstanceAttribute,color:WebGLPlot$g.ColorGeometryInstanceAttribute.fromColor(t),offset:void 0}}),asynchronous:!1,modelMatrix:e,appearance:new WebGLPlot$g.PerInstanceColorAppearance({flat:!0,translucent:!0,renderState:{lineWidth:1}})}):null}_createFillGeometry(){let e=this._scanConeType,t=this._radius,i=WebGLPlot$g.CesiumMath.toRadians(this._scanVAngle),n=WebGLPlot$g.CesiumMath.toRadians(this._scanHAngle),r=1*i/this._sliceVCount,o=1*n/this._sliceHCount,a=0,s=[],l=0,u=new Array(this._sliceVCount*this._sliceHCount*6+6*this._sliceVCount+6*this._sliceHCount),c=[],h=this._sliceHCount+1,d=this._sliceVCount+1,f=-i/2;for(let i=0;i<d;i++){let n=f+r*i;const o=Math.sin(n)*t,a=Math.cos(n)*t;e==_0x2cf107.ScanCone_ARC?c.push(new WebGLPlot$g.Cartesian2(o,a)):e==_0x2cf107.ScanCone_FLAT&&c.push(new WebGLPlot$g.Cartesian2(o,t))}for(let t=0;t<c.length;t++){const i=c[t];let r=-n/2;for(let t=0;t<h;t++){let n=r+o*t;e==_0x2cf107.ScanCone_ARC?s.push(new WebGLPlot$g.Cartesian3(i.y*Math.sin(n),i.y*Math.cos(n),i.x)):e==_0x2cf107.ScanCone_FLAT&&s.push(new WebGLPlot$g.Cartesian3(i.y*Math.sin(n),i.y,i.x))}}for(let e=0;e<d-1;e++){let t=e*h;for(let e=0;e<h-1;e++)u[l++]=t+e,u[l++]=t+e+1,u[l++]=t+h+e,u[l++]=t+h+e,u[l++]=t+e+1,u[l++]=t+h+e+1}a=s.length;let p=[];for(let e=0;e<d;e++)p.push(s[e*h+h-1]);p.push(new WebGLPlot$g.Cartesian3(0,0,0));for(let e=0;e<d-1;e++)u[l++]=a+(e+1),u[l++]=a+e,u[l++]=a+p.length-1;s=s.concat(p),a=s.length;let _=[];for(let e=0;e<h;e++)_.push(s[e]);_.push(new WebGLPlot$g.Cartesian3(0,0,0));for(let e=0;e<h-1;e++)u[l++]=a+e,u[l++]=a+(e+1),u[l++]=a+_.length-1;s=s.concat(_),a=s.length;let m=[];for(let e=0;e<d;e++)m.push(s[e*h]);m.push(new WebGLPlot$g.Cartesian3(0,0,0));for(let e=0;e<d-1;e++)u[l++]=a+e,u[l++]=a+(e+1),u[l++]=a+m.length-1;s=s.concat(m),a=s.length;let $=[];for(let e=0;e<h;e++)$.push(s[e+(d-1)*h]);$.push(new WebGLPlot$g.Cartesian3(0,0,0));for(let e=0;e<h-1;e++)u[l++]=a+e,u[l++]=a+(e+1),u[l++]=a+$.length-1;s=s.concat($);let g=this._ptsTransform([s]),y=new Uint16Array(u),v=WebGLPlot$g.BoundingSphere.fromVertices(g),x=new WebGLPlot$g.GeometryAttributes;x.position=new WebGLPlot$g.GeometryAttribute({componentDatatype:WebGLPlot$g.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:new Float64Array(g)});let b=new Array(g.length/3*2);for(let e=0;e<g.length/3;e+=2)b[e]=1,b[e+1]=1;return x.st=new WebGLPlot$g.GeometryAttribute({componentDatatype:WebGLPlot$g.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(b)}),new WebGLPlot$g.Geometry({attributes:x,indices:y,primitiveType:WebGLPlot$g.PrimitiveType.TRIANGLES,boundingSphere:v})}_createLineGeometry(){let e=this._scanConeType,t=this._radius,i=WebGLPlot$g.CesiumMath.toRadians(this._scanVAngle),n=WebGLPlot$g.CesiumMath.toRadians(this._scanHAngle),r=1*i/this._sliceVCount,o=1*n/this._sliceHCount,a=[],s=this._sliceHCount+1,l=this._sliceVCount+1,u=[],c=-i/2;for(let i=0;i<l;i++){let n=c+r*i;const o=Math.sin(n)*t,a=Math.cos(n)*t;e==_0x2cf107.ScanCone_ARC?u.push(new WebGLPlot$g.Cartesian2(o,a)):e==_0x2cf107.ScanCone_FLAT&&u.push(new WebGLPlot$g.Cartesian2(o,t))}for(let t=0;t<u.length;t++){const i=u[t];let r=-n/2;for(let t=0;t<s;t++){let n=r+o*t;e==_0x2cf107.ScanCone_ARC?a.push(new WebGLPlot$g.Cartesian3(i.y*Math.sin(n),i.y*Math.cos(n),i.x)):e==_0x2cf107.ScanCone_FLAT&&a.push(new WebGLPlot$g.Cartesian3(i.y*Math.sin(n),i.y,i.x))}}let h=this._ptsTransform([a]),d=s*l,f=WebGLPlot$g.IndexDatatype.createTypedArray(d,4*d+8),p=0,_=d;for(let e=0;e<l;e++)for(let t=0;t<s-1;t++)f[p++]=e*s+t,f[p++]=e*s+t+1;for(let e=0;e<s;e++)for(let t=0;t<l-1;t++)f[p++]=e+t*s,f[p++]=e+(t+1)*s;f[p++]=_,f[p++]=0,f[p++]=_,f[p++]=s-1,f[p++]=_,f[p++]=(l-1)*s,f[p++]=_,f[p++]=l*s-1;let m=new WebGLPlot$g.GeometryAttributes;m.position=new WebGLPlot$g.GeometryAttribute({componentDatatype:WebGLPlot$g.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:new Float64Array(h)});let $=new Array(h.length/3*2);for(let e=0;e<h.length/3;e+=2)$[e]=1,$[e+1]=1;return m.st=new WebGLPlot$g.GeometryAttribute({componentDatatype:WebGLPlot$g.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array($)}),new WebGLPlot$g.Geometry({attributes:m,indices:f,primitiveType:WebGLPlot$g.PrimitiveType.LINES,boundingSphere:WebGLPlot$g.BoundingSphere.fromVertices(h)})}_ptsTransform(e){let t=[];for(let i=0;i<e.length;i++){const n=e[i];for(let e=0;e<n.length;e++){const i=n[e];t.push(i.x),t.push(i.y),t.push(i.z)}}return t}_calcControlPoint(e,t,i,n){const r=_0x1569f6.calcControlPosMatrix(e,t,n);if(!WebGLPlot$g.defined(r))return null;const o=WebGLPlot$g.HeadingPitchRoll.fromDegrees(-i.z,-i.y,i.x,new WebGLPlot$g.HeadingPitchRoll),a=WebGLPlot$g.Matrix3.fromHeadingPitchRoll(o,new WebGLPlot$g.Matrix3);return WebGLPlot$g.Matrix4.multiplyByMatrix3(r,a,new WebGLPlot$g.Matrix4)}}const _0x32ba47=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x27bbba=_0x32ba47(void 0,(function(){return _0x27bbba.toString().search("(((.+)+)+)+$").toString().constructor(_0x27bbba).search("(((.+)+)+)+$")}));_0x27bbba();class _0x5d5876 extends _0x4c64cd{constructor(e){super(e),e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._type=_0x370c4a.DETECTIONCONE,this._name=WebGLPlot$g.defaultValue(e.name,_0x5f28ea.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectDetecttoncone"+WebGLPlot$g.createGuid(),this._pntOffset=WebGLPlot$g.defaultValue(e.pntOffset,new _0x45ea17(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$g.defaultValue(e.bChangeSizeFlowModel,!0),this._bottomRadius=WebGLPlot$g.defaultValue(e.bottomRadius,15e4),this._bottomPosition=e.bottomPosition,this._repeatCount=WebGLPlot$g.defaultValue(e.repeatCount,8),this._colorBack=WebGLPlot$g.defaultValue(e.colorBack,new WebGLPlot$g.Color(0,1,0,.3)),this._colorBackScale=WebGLPlot$g.defaultValue(e.colorBackScale,1),this._colorForward=WebGLPlot$g.defaultValue(e.colorForward,new WebGLPlot$g.Color(1,1,0,1)),this._colorForwardScale=WebGLPlot$g.defaultValue(e.colorForwardScale,5),this._flowSpeed=WebGLPlot$g.defaultValue(e.flowSpeed,3),this._mode=WebGLPlot$g.defaultValue(e.mdoe,_0x5c4879.ColorMode),this._picturePath=WebGLPlot$g.defaultValue(e.picturePath,""),this._pictureColorScale=WebGLPlot$g.defaultValue(e.pictureColorScale,5),this._speed=WebGLPlot$g.defaultValue(e.speed,.005),this._bottomGeoEntityUUID=WebGLPlot$g.defaultValue(e.bottomGeoEntityUUID,""),this._bottomPositionMode=WebGLPlot$g.defaultValue(e.bottomPositionMode,0),this._detecttoncone=void 0,this._currentScale=0}getRepeatCount(){return this._repeatCount}setRepeatCount(e){this._repeatCount=e,this._initialized=!1}getFlowSpeed(){return this._flowSpeed}setFlowSpeed(e){this._flowSpeed=e,this._initialized=!1}getPicturePath(){return this._picturePath}setPicturePath(e){this._picturePath=e,this._initialized=!1}getPictureColorScale(){return this._pictureColorScale}setPictureColorScale(e){this._pictureColorScale=e,this._initialized=!1}getColorBack(){return this._colorBack}setColorBack(e){this._colorBack=e,this._initialized=!1}getColorBackScale(){return this._colorBackScale}setColorBackScale(e){this._colorBackScale=e,this._initialized=!1}getColorForward(){return this._colorForward}setColorForward(e){this._colorForward=e,this._initialized=!1}getColorForwardScale(){return this._colorForwardScale}setColorForwardScale(e){this._colorForwardScale=e,this._initialized=!1}setRadius(e){this._bottomRadius=e,this._initialized=!1}getRadius(){return this._bottomRadius}setPosition(e){this._bottomPosition=e,this._initialized=!1}getPosition(){return this._bottomPosition}setSpeed(e){this._speed=e,this._initialized=!1}getSpeed(){return this._speed}setBottomGeoEntityUUID(e){this._bottomGeoEntityUUID=e,this._initialized=!1}getBottomGeoEntityUUID(){return this._bottomGeoEntityUUID}setBottomPositionMode(e){this._bottomPositionMode=e,this._initialized=!1}getBottomPositionMode(){return this._bottomPositionMode}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),e.hasOwnProperty("bottomRadius")||(e.bottomRadius=this._bottomRadius),e.hasOwnProperty("bottomPositionMode")||(e.bottomPositionMode=this._bottomPositionMode),!e.hasOwnProperty("bottomPosition")&&WebGLPlot$g.defined(this._bottomPosition)&&(e.bottomPosition={x:this._bottomPosition.x,y:this._bottomPosition.y,z:this._bottomPosition.z}),!e.hasOwnProperty("bottomGeoEntityUUID")&&WebGLPlot$g.defined(this._bottomGeoEntityUUID)&&(e.bottomGeoEntityUUID=this._bottomGeoEntityUUID),e.hasOwnProperty("repeatCount")||(e.repeatCount=this._repeatCount),e.hasOwnProperty("flowSpeed")||(e.flowSpeed=this._flowSpeed),e.hasOwnProperty("picturePath")||(e.picturePath=_0x1569f6.absoluteToRelativePath(this._picturePath)),e.hasOwnProperty("pictureColorScale")||(e.pictureColorScale=this._pictureColorScale),e.hasOwnProperty("colorBack")||(e.colorBack=this._colorBack.toCssColorString()),e.hasOwnProperty("colorBackScale")||(e.colorBackScale=this._colorBackScale),e.hasOwnProperty("colorForward")||(e.colorForward=this._colorForward.toCssColorString()),e.hasOwnProperty("colorForwardScale")||(e.colorForwardScale=this._colorForwardScale),e.hasOwnProperty("mode")||(e.mode=this._mode),e.hasOwnProperty("speed")||(e.speed=this._speed),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$g.defined(e))return;let t=JSON.parse(e);WebGLPlot$g.defined(t.type)&&(this._type=t.type),WebGLPlot$g.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$g.defined(t.name)&&(this._name=t.name),WebGLPlot$g.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$g.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$g.defined(t.offset)&&(WebGLPlot$g.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$g.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$g.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z)),WebGLPlot$g.defined(t.bottomRadius)&&(this._bottomRadius=t.bottomRadius),WebGLPlot$g.defined(t.bottomPositionMode)&&(this._bottomPositionMode=t.bottomPositionMode),WebGLPlot$g.defined(t.bottomPosition)&&(this._bottomPosition=new _0x45ea17(t.bottomPosition.x,t.bottomPosition.y,t.bottomPosition.z)),WebGLPlot$g.defined(t.bottomGeoEntityUUID)&&(this._bottomGeoEntityUUID=t.bottomGeoEntityUUID),WebGLPlot$g.defined(t.repeatCount)&&(this._repeatCount=t.repeatCount),WebGLPlot$g.defined(this.flowSpeed)&&(this._flowSpeed=t.flowSpeed),WebGLPlot$g.defined(t.picturePath)&&(this._picturePath=_0x1569f6.relativeToAbsolutePath(t.picturePath)),WebGLPlot$g.defined(t.pictureColorScale)&&(this._pictureColorScale=t.pictureColorScale),WebGLPlot$g.defined(t.colorBack)&&(this._colorBack=WebGLPlot$g.Color.fromCssColorString(t.colorBack)),WebGLPlot$g.defined(t.colorBackScale)&&(this._colorBackScale=t.colorBackScale),WebGLPlot$g.defined(t.colorForward)&&(this._colorForward=WebGLPlot$g.Color.fromCssColorString(t.colorForward)),WebGLPlot$g.defined(t.colorForwardScale)&&(this._colorForwardScale=t.colorForwardScale),WebGLPlot$g.defined(t.mode)&&(this._mode=t.mode),WebGLPlot$g.defined(t.speed)&&(this._speed=t.speed)}clone(){let e=new _0x5d5876;return e._UUID=this._UUID,e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x45ea17(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bottomRadius=this._bottomRadius,e._bottomPositionMode=this._bottomPositionMode,WebGLPlot$g.defined(this._bottomPosition)&&(e._bottomPosition=new _0x45ea17(this._bottomPosition.x,this._bottomPosition.y,this._bottomPosition.z)),WebGLPlot$g.defined(this._bottomGeoEntityUUID)&&(e._bottomGeoEntityUUID=this._bottomGeoEntityUUID),e._repeatCount=this._repeatCount,e._flowSpeed=this._flowSpeed,e._pictureColorScale=this._pictureColorScale,e._colorBack=this._colorBack.clone(),e._colorBackScale=this._colorBackScale,e._colorForward=this._colorForward.clone(),e._colorForwardScale=this._colorForwardScale,e._mode=this._mode,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._speed=this._speed,e}setGeoEntityParameter(e,t){if(WebGLPlot$g.defined(this._detecttoncone)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x3f7d9f.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=_0x1569f6.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$g.defined(t)&&(this._detecttoncone.modelMatrix=WebGLPlot$g.Transforms.eastNorthUpToFixedFrame(_0x1569f6.degreesToCartesian3(t)))}if(e.getShowMode()==_0x3f7d9f.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._bottomRadius*=t,this._initialized=!1}}this._geoEntityParameter=e}_executeFunction(e){!WebGLPlot$g.defined(this._detecttoncone)||!this._visible||this._currentScale>1||(this._currentScale+=this._speed,this._detecttoncone.modelMatrix=WebGLPlot$g.Matrix4.setScale(this._detecttoncone.modelMatrix,new WebGLPlot$g.Cartesian3(this._currentScale,this._currentScale,this._currentScale),new WebGLPlot$g.Matrix4))}_addEffectToScene(e){let t=!1;return this._detecttoncone=this._createDetecttoncone(e),WebGLPlot$g.defined(this._detecttoncone)&&(e.primitives.add(this._detecttoncone),t=!0),t}_removeEffectFromScene(e){WebGLPlot$g.defined(this._detecttoncone)&&e.primitives.contains(this._detecttoncone)&&e.primitives.remove(this._detecttoncone),this._currentScale=0,this._detecttoncone=null}_createDetecttoncone(e){let t;if(0===this._bottomPositionMode){let e=_0x5f28ea.getGeoEntityParamByUUID(this._bottomGeoEntityUUID);WebGLPlot$g.defined(e)&&(t=_0x1569f6.degreesToCartesian3(e.getPosition()))}else 1===this._bottomPositionMode&&(t=WebGLPlot$g.defined(this._bottomPosition)?_0x1569f6.degreesToCartesian3(this._bottomPosition):WebGLPlot$g.Cartesian3.fromDegrees(this._geoEntityParameter.getPosition().x,this._geoEntityParameter.getPosition().y,0));if(!WebGLPlot$g.defined(t))return null;let i=this._bottomRadius,n=_0x1569f6.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$g.defined(n))return null;n=_0x1569f6.degreesToCartesian3(n);let r=WebGLPlot$g.Transforms.eastNorthUpToFixedFrame(n);if(r=WebGLPlot$g.Matrix4.setScale(r,new WebGLPlot$g.Cartesian3(.005,.005,.005),new WebGLPlot$g.Matrix4),!WebGLPlot$g.defined(r))return null;let o,a="";a=this._mode===_0x5c4879.ColorMode?" uniform vec4 colorForward; uniform float colorForwardScale; uniform vec4 colorBack; uniform float colorBackScale; uniform float repeat; uniform float flowSpeed; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); float sp = 1.0 / repeat; vec2 st = materialInput.st; float dis = distance(st, vec2(0.0, 0.0)); float m = mod(dis - fract(czm_frameNumber * 0.001 * flowSpeed), sp); float a = step(sp / repeat * 0.2, m); if(a == 0.0){ material.diffuse = colorForward.rgb * colorForwardScale; material.alpha = colorForward.a; } else { material.diffuse = colorBack.rgb * colorBackScale; material.alpha = colorBack.a; } return material; }":" uniform sampler2D picture; uniform float pictureColorScale; uniform vec2 repeat; uniform float flowSpeed; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); vec2 st = materialInput.st; vec4 colorImage = texture2D(picture, vec2(fract(repeat.x * st.s), fract(repeat.y * st.t - czm_frameNumber * 0.005 * flowSpeed))); material.diffuse = colorImage.rgb * pictureColorScale; material.alpha = colorImage.a; return material; }",o=this._mode===_0x5c4879.ColorMode?new WebGLPlot$g.Material({fabric:{uniforms:{colorForward:this._colorForward,colorForwardScale:this._colorForwardScale,colorBack:this._colorBack,colorBackScale:this._colorBackScale,repeat:this._repeatCount,flowSpeed:this._flowSpeed},source:a},translucent:!0}):new WebGLPlot$g.Material({fabric:{uniforms:{picture:this._picturePath,pictureColorScale:this._pictureColorScale,repeat:new WebGLPlot$g.Cartesian2(1,this._repeatCount),flowSpeed:this._flowSpeed},source:a},translucent:!0});let s=e.frameState;s.scene3DOnly=!0;let l=_0x1569f6.degreesToCartesian3(this._geoEntityParameter.getPosition()),u=this._generateGeometry(t,l,i),c=new WebGLPlot$g.GeometryInstance({geometry:u});return new WebGLPlot$g.Primitive({geometryInstances:c,appearance:new WebGLPlot$g.MaterialAppearance({material:o,faceForward:!1,closed:!0,frameState:s}),releaseGeometryInstances:!1,modelMatrix:r,asynchronous:!1})}_create(e){let t=this._geoEntityParameter.getPosition(),i=this._geoEntityParameter.getModelRotate(),n=WebGLPlot$g.HeadingPitchRoll.fromDegrees(-i.z,-i.y,i.x,new WebGLPlot$g.HeadingPitchRoll),r=this._detecttonconeColor,o=this._geoEntityParameter.getPosition().z,a=WebGLPlot$g.Cartesian3.fromDegrees(t.x,t.y,.5*t.z),s=WebGLPlot$g.Transforms.localFrameToFixedFrameGenerator("east","north");const l=WebGLPlot$g.Transforms.headingPitchRollToFixedFrame(a,n,WebGLPlot$g.Ellipsoid.WGS84,s);let u=new WebGLPlot$g.CylinderGeometry({length:o,topRadius:0,bottomRadius:.5*o,vertexFormat:WebGLPlot$g.MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat}),c=new WebGLPlot$g.GeometryInstance({geometry:u,modelMatrix:l,id:"Detecttoncone"});const h=new WebGLPlot$g.Material({fabric:{type:"VtxfShader1",uniforms:{color:r,repeat:30,offset:0,thickness:.3},source:"uniform vec4 color;\n uniform float repeat;\n uniform float offset;\n uniform float thickness;\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n float sp = 1.0 / repeat;\n vec2 st = materialInput.st;\n float dis = distance(st,vec2(0.5));\n float m = mod(dis + offset,sp);\n float a = step(sp * (1.0 - thickness), m);\n material.diffuse = color.rgb;\n material.alpha = a*color.a;\n return material;}"},translucent:!1}),d=new WebGLPlot$g.MaterialAppearance({material:h,faceForward:!1,closed:!0});return new WebGLPlot$g.Primitive({geometryInstances:[c],appearance:d})}_generateGeometry(e,t,i){let n=361,r=new Array(1086),o=WebGLPlot$g.Transforms.eastNorthUpToFixedFrame(t),a=WebGLPlot$g.Matrix4.inverse(o,new WebGLPlot$g.Matrix4);WebGLPlot$g.Matrix4.multiplyByPoint(a,t,new WebGLPlot$g.Cartesian3);let s=WebGLPlot$g.Matrix4.multiplyByPoint(a,e,new WebGLPlot$g.Cartesian3),l=_0x1569f6.cartesian3ToDegrees(e).z-_0x1569f6.cartesian3ToDegrees(t).z;for(let e=0;e<362;e++)if(0==e)r[3*e]=0,r[3*e+1]=0,r[3*e+2]=0;else{let t=_0x1569f6.circlePoint(s,i,i,1*e);r[3*e]=t.x,r[3*e+1]=t.y,r[3*e+2]=l}let u=new Float64Array(r),c=WebGLPlot$g.BoundingSphere.fromVertices(r),h=new Array(1083);for(let e=0;e<n;e++)360==e?(h[3*e]=0,h[3*e+1]=e+1,h[3*e+2]=1):(h[3*e]=0,h[3*e+1]=e+1,h[3*e+2]=e+2);h.splice(h.length-3,3);let d=new Uint16Array(h),f=new Array(1448);for(let e=0;e<362;e++)f[4*e]=1,f[4*e+1]=1,f[4*e+2]=1,f[4*e+3]=1;let p=new Array(724);for(let e=0;e<362;e++)0==e?(p[2*e]=0,p[2*e+1]=0):(p[2*e]=1,p[2*e+1]=1);let _=new WebGLPlot$g.GeometryAttributes;return _.position=new WebGLPlot$g.GeometryAttribute({componentDatatype:WebGLPlot$g.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u}),_.color=new WebGLPlot$g.GeometryAttribute({componentDatatype:WebGLPlot$g.ComponentDatatype.FLOAT,componentsPerAttribute:4,values:new Float32Array(f)}),_.st=new WebGLPlot$g.GeometryAttribute({componentDatatype:WebGLPlot$g.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(p)}),new WebGLPlot$g.Geometry({attributes:_,indices:d,primitiveType:WebGLPlot$g.PrimitiveType.TRIANGLES,boundingSphere:c})}_getRotateMatrix(e){let t;return 0===this._scanAxis?t=WebGLPlot$g.Matrix3.fromRotationX(WebGLPlot$g.CesiumMath.toRadians(e)):1===this._scanAxis?t=WebGLPlot$g.Matrix3.fromRotationY(WebGLPlot$g.CesiumMath.toRadians(e)):2===this._scanAxis&&(t=WebGLPlot$g.Matrix3.fromRotationZ(WebGLPlot$g.CesiumMath.toRadians(e))),t}}var _0x368a8c;!function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=function(){var e=i(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var t=!0;return function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}}(),r=function(){var e=n(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var t=!0;return function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}}(),o=function(){return{escape:function(e){return e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:e,mimeType:function(t){var i=e(t).toLowerCase();return(n="application/font-woff",r="image/jpeg",{woff:n,woff2:n,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:r,jpeg:r,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[i]||"";var n,r},dataAsUrl:function(e,t){return"data:"+t+";base64,"+e},isDataUrl:function(e){return-1!==e.search(/^(data:)/)},canvasToBlob:function(e){return e.toBlob?new Promise((function(t){e.toBlob(t)})):(t=e,new Promise((function(e){for(var i=window.atob(t.toDataURL().split(",")[1]),n=i.length,r=new Uint8Array(n),o=0;o<n;o++)r[o]=i.charCodeAt(o);e(new Blob([r],{type:"image/png"}))})));var t},resolveUrl:function(e,t){var i=document.implementation.createHTMLDocument(),n=i.createElement("base");i.head.appendChild(n);var r=i.createElement("a");return i.body.appendChild(r),n.href=t,r.href=e,r.href},getAndEncode:function(e){var t=3e4;return _0x368a8c.impl.options.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+(new Date).getTime()),new Promise((function(i){var n,r=new XMLHttpRequest;if(r.onreadystatechange=a,r.ontimeout=s,r.responseType="blob",r.timeout=t,r.open("GET",e,!0),r.send(),_0x368a8c.impl.options.imagePlaceholder){var o=_0x368a8c.impl.options.imagePlaceholder.split(/,/);o&&o[1]&&(n=o[1])}function a(){if(4===r.readyState){if(200!==r.status)return void(n?i(n):l("cannot fetch resource: "+e+", status: "+r.status));var t=new FileReader;t.onloadend=function(){var e=t.result.split(/,/)[1];i(e)},t.readAsDataURL(r.response)}}function s(){n?i(n):l("timeout of "+t+"ms occured while fetching resource: "+e)}function l(e){console.error(e),i("")}}))},uid:function(){var e=r(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var t=0;return function(){return"u"+e()+t++;function e(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}}}(),delay:function(e){return function(t){return new Promise((function(i){setTimeout((function(){i(t)}),e)}))}},asArray:function(e){for(var t=[],i=e.length,n=0;n<i;n++)t.push(e[n]);return t},escapeXhtml:function(e){return e.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(e){return new Promise((function(t,i){var n=new Image;n.onload=function(){t(n)},n.onerror=i,n.src=e}))},width:function(e){var i=t(e,"border-left-width"),n=t(e,"border-right-width");return e.scrollWidth+i+n},height:function(e){var i=t(e,"border-top-width"),n=t(e,"border-bottom-width");return e.scrollHeight+i+n}};function e(e){var t=/\.([^\.\/]*?)$/g.exec(e);return t?t[1]:""}function t(e,t){var i=window.getComputedStyle(e).getPropertyValue(t);return parseFloat(i.replace("px",""))}}(),a=function(){var e=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(e,r,o){return a()?Promise.resolve(e):Promise.resolve(e).then(i).then((function(t){var i=Promise.resolve(e);return t.forEach((function(e){i=i.then((function(t){return n(t,e,r,o)}))})),i}));function a(){return!t(e)}},shouldProcess:t,impl:{readUrls:i,inline:n}};function t(t){return-1!==t.search(e)}function i(t){for(var i,n=[];null!==(i=e.exec(t));)n.push(i[1]);return n.filter((function(e){return!o.isDataUrl(e)}))}function n(e,t,i,n){return Promise.resolve(t).then((function(e){return i?o.resolveUrl(e,i):e})).then(n||o.getAndEncode).then((function(e){return o.dataAsUrl(e,o.mimeType(t))})).then((function(i){return e.replace((n=t,new RegExp("(url\\(['\"]?)("+o.escape(n)+")(['\"]?\\))","g")),"$1"+i+"$3");var n}))}}(),s=function(){return{resolveAll:function(){return e().then((function(e){return Promise.all(e.map((function(e){return e.resolve()})))})).then((function(e){return e.join("\n")}))},impl:{readAll:e}};function e(){return Promise.resolve(o.asArray(document.styleSheets)).then((function(e){var t=[];return e.forEach((function(e){try{o.asArray(e.cssRules||[]).forEach(t.push.bind(t))}catch(t){console.log("Error while reading CSS rules from "+e.href,t.toString())}})),t})).then((function(e){return e.filter((function(e){return e.type===CSSRule.FONT_FACE_RULE})).filter((function(e){return a.shouldProcess(e.style.getPropertyValue("src"))}))})).then((function(t){return t.map(e)}));function e(e){return{resolve:function(){var t=(e.parentStyleSheet||{}).href;return a.inlineAll(e.cssText,t)},src:function(){return e.style.getPropertyValue("src")}}}}}(),l=function(){return{inlineAll:function t(i){return i instanceof Element?n(i).then((function(){return i instanceof HTMLImageElement?e(i).inline():Promise.all(o.asArray(i.childNodes).map((function(e){return t(e)})))})):Promise.resolve(i);function n(e){var t=e.style.getPropertyValue("background");return t?a.inlineAll(t).then((function(t){e.style.setProperty("background",t,e.style.getPropertyPriority("background"))})).then((function(){return e})):Promise.resolve(e)}},impl:{newImage:e}};function e(e){return{inline:function(t){return o.isDataUrl(e.src)?Promise.resolve():Promise.resolve(e.src).then(t||o.getAndEncode).then((function(t){return o.dataAsUrl(t,o.mimeType(e.src))})).then((function(t){return new Promise((function(i,n){e.onload=i,e.onerror=n,e.src=t}))}))}}}}(),u=void 0,c=!1;function h(e,t){return typeof(i=t=t||{}).imagePlaceholder>"u"?_0x368a8c.impl.options.imagePlaceholder=u:_0x368a8c.impl.options.imagePlaceholder=i.imagePlaceholder,typeof i.cacheBust>"u"?_0x368a8c.impl.options.cacheBust=c:_0x368a8c.impl.options.cacheBust=i.cacheBust,Promise.resolve(e).then((function(e){return f(e,t.filter,!0)})).then(p).then(_).then((function(e){return t.bgcolor&&(e.style.backgroundColor=t.bgcolor),t.width&&(e.style.width=t.width+"px"),t.height&&(e.style.height=t.height+"px"),t.style&&Object.keys(t.style).forEach((function(i){e.style[i]=t.style[i]})),e})).then((function(i){return n=i,r=t.width||o.width(e),a=t.height||o.height(e),Promise.resolve(n).then((function(e){return e.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(e)})).then(o.escapeXhtml).then((function(e){return'<foreignObject x="0" y="0" width="100%" height="100%">'+e+"</foreignObject>"})).then((function(e){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+r+'" height="'+a+'">'+e+"</svg>"})).then((function(e){return"data:image/svg+xml;charset=utf-8,"+e}));var n,r,a}));var i}function d(e,t){return h(e,t).then(o.makeImage).then(o.delay(100)).then((function(i){var n=function(e){var i=document.createElement("canvas"),n=i.getContext("2d");n.mozImageSmoothingEnabled=!1,n.webkitImageSmothingEnabled=!1,n.msImageSmothingEnabled=!1,n.imageSmoothingEnabled=!1;let r=t.scale||1;return i.width=t.width||o.width(e)*r,i.height=t.height||o.height(e)*r,n.scale(r,r),t.bgcolor&&(n.fillStyle=t.bgcolor,n.fillRect(0,0,i.width,i.height)),i}(e);return n.getContext("2d").drawImage(i,0,0),n}))}function f(e,t,i){return i||!t||t(e)?Promise.resolve(e).then((function(e){return e instanceof HTMLCanvasElement?o.makeImage(e.toDataURL()):e.cloneNode(!1)})).then((function(i){return function(e,t,i){var n=e.childNodes;return 0===n.length?Promise.resolve(t):r(t,o.asArray(n),i).then((function(){return t}));function r(e,t,i){var n=Promise.resolve();return t.forEach((function(t){n=n.then((function(){return f(t,i)})).then((function(t){t&&e.appendChild(t)}))})),n}}(e,i,t)})).then((function(t){return function(e,t){return t instanceof Element?Promise.resolve().then(i).then(n).then(r).then(a).then((function(){return t})):t;function i(){function i(e,t){function i(e,t){o.asArray(e).forEach((function(i){t.setProperty(i,e.getPropertyValue(i),e.getPropertyPriority(i))}))}e.cssText?t.cssText=e.cssText:i(e,t)}i(window.getComputedStyle(e),t.style)}function n(){function i(i){var n=window.getComputedStyle(e,i),r=n.getPropertyValue("content");if(""!==r&&"none"!==r){var a=o.uid();t.className=t.className+" "+a;var s=document.createElement("style");s.appendChild(l(a,i,n)),t.appendChild(s)}function l(e,t,i){var n="."+e+":"+t,r=i.cssText?a(i):s(i);return document.createTextNode(n+"{"+r+"}");function a(e){var t=e.getPropertyValue("content");return e.cssText+" content: "+t+";"}function s(e){return o.asArray(e).map(t).join("; ")+";";function t(t){return t+": "+e.getPropertyValue(t)+(e.getPropertyPriority(t)?" !important":"")}}}}[":before",":after"].forEach((function(e){i(e)}))}function r(){e instanceof HTMLTextAreaElement&&(t.innerHTML=e.value),e instanceof HTMLInputElement&&t.setAttribute("value",e.value)}function a(){t instanceof SVGElement&&(t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t instanceof SVGRectElement&&["width","height"].forEach((function(e){var i=t.getAttribute(e);!i||t.style.setProperty(e,i)})))}}(e,t)})):Promise.resolve()}function p(e){return s.resolveAll().then((function(t){var i=document.createElement("style");return e.appendChild(i),i.appendChild(document.createTextNode(t)),e}))}function _(e){return l.inlineAll(e).then((function(){return e}))}_0x368a8c={toSvg:h,toPng:function(e,t){return d(e,t||{}).then((function(e){return e.toDataURL()}))},toJpeg:function(e,t){return d(e,t=t||{}).then((function(e){return e.toDataURL("image/jpeg",t.quality||1)}))},toBlob:function(e,t){return d(e,t||{}).then(o.canvasToBlob)},toPixelData:function(e,t){return d(e,t||{}).then((function(t){return t.getContext("2d").getImageData(0,0,o.width(e),o.height(e)).data}))},impl:{fontFaces:s,images:l,util:o,inliner:a,options:{}}}}();var _0x283780=_0x368a8c;const _0x29b155=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x14204=_0x29b155(void 0,(function(){return _0x14204.toString().search("(((.+)+)+)+$").toString().constructor(_0x14204).search("(((.+)+)+)+$")}));_0x14204();class _0x5db3c1 extends _0x4c64cd{constructor(e){super(e),e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._pntOffset=WebGLPlot$g.defaultValue(e.pntOffset,new _0x45ea17(0,0,.5)),this._type=_0x370c4a.SIGN,this._name=WebGLPlot$g.defaultValue(e.name,_0x5f28ea.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectSign_"+WebGLPlot$g.createGuid(),this._styleHtmlPath=WebGLPlot$g.defaultValue(e.styleHtmlPath,_0x5f28ea.getResourceURI()+"/iserver/mgis/situationSimulation/Sign/sign1.html"),this._texts=WebGLPlot$g.defaultValue(e.texts,["飞机"]),this._scale=WebGLPlot$g.defaultValue(e.scale,1),this._pixScale=WebGLPlot$g.defaultValue(e.pixScale,2),this._billboardCollection=null,this._signImage=void 0}setStyleHtmlPath(e){this._styleHtmlPath=e,this._signImage=void 0,this._initialized=!1}getStyleHtmlPath(){return this._styleHtmlPath}setTexts(e){this._texts=e,this._signImage=void 0,this._initialized=!1}getTexts(){return this._texts}setScale(e){this._scale=e,this._signImage=void 0,this._initialized=!1}getScale(){return this._scale}setPixScale(e){this._pixScale=e,this._signImage=void 0,this._initialized=!1}getPixScale(){return this._pixScale}setGeoEntityParameter(e,t){if(null!=this._billboardCollection&&this._billboardCollection.length>0){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!==e.getShowMode()||e.getShowMode()===_0x3f7d9f.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=_0x1569f6.calcControlPoint(e,this._pntOffset,null);WebGLPlot$g.defined(t)&&(t=_0x1569f6.degreesToCartesian3(t),this._billboardCollection.get(0).position=t)}e.getShowMode()===_0x3f7d9f.Marker&&(this._geoEntityParameter.getModelPath()!==e.getModelPath()||this._geoEntityParameter.getModelScale()!==e.getModelScale())&&(this._initialized=!1)}if(WebGLPlot$g.defined(this._geoEntityParameter)){let t=this._geoEntityParameter.getModelScale();this._geoEntityParameter=e,this._bChangeSizeFlowModel||this._geoEntityParameter.setModelScale(t)}else this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$g.defined(this._signImage))return this._signImage=new Image,this._createSignImage(),!1;if(!WebGLPlot$g.defined(this._signImage.src)||0===this._signImage.src.length)return!1;if(WebGLPlot$g.defined(this._billboardCollection)||(this._billboardCollection=e.primitives.add(new WebGLPlot$g.BillboardCollection)),0===this._billboardCollection.length){let t=_0x1569f6.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$g.defined(t))return!1;if(t=_0x1569f6.degreesToCartesian3(t),this._billboardCollection.add({show:!0,position:t,image:this._signImage,pixelOffset:new WebGLPlot$g.Cartesian2(0,0),horizontalOrigin:WebGLPlot$g.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$g.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.MIN_VALUE,sizeInMeters:!1,scale:1/this._pixScale*this._scale}),WebGLPlot$g.defined(this._billboardCollection)&&this._billboardCollection.length>0)return this._initialized=!0,!0}return!1}_removeEffectFromScene(e){WebGLPlot$g.defined(e)&&WebGLPlot$g.defined(this._billboardCollection)&&e.primitives.remove(this._billboardCollection),this._billboardCollection=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("styleHtmlPath")||(e.styleHtmlPath=_0x1569f6.absoluteToRelativePath(this._styleHtmlPath)),e.hasOwnProperty("texts")||(e.texts=this._texts),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("changeSizeFlowModel")||(e.changeSizeFlowModel=this._bChangeSizeFlowModel),e.hasOwnProperty("scale")||(e.scale=this._scale),e.hasOwnProperty("pixScale")||(e.pixScale=this._pixScale);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),!e.hasOwnProperty("imageSrc")&&WebGLPlot$g.defined(this._signImage)&&(e.imageSrc=this._signImage.src),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$g.defined(e))return;let t=JSON.parse(e);WebGLPlot$g.defined(t.type)&&(this._type=t.type),WebGLPlot$g.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$g.defined(t.name)&&(this._name=t.name),WebGLPlot$g.defined(t.styleHtmlPath)&&(this._styleHtmlPath=_0x1569f6.relativeToAbsolutePath(t.styleHtmlPath)),WebGLPlot$g.defined(t.texts)&&(this._texts=t.texts),WebGLPlot$g.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$g.defined(t.changeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.changeSizeFlowModel),WebGLPlot$g.defined(t.scale)&&(this._scale=t.scale),WebGLPlot$g.defined(t.pixScale)&&(this._pixScale=t.pixScale),WebGLPlot$g.defined(t.offset)&&(WebGLPlot$g.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$g.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$g.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z)),WebGLPlot$g.defined(t.imageSrc)&&(this._signImage=new Image,this._signImage.src=t.imageSrc)}clone(){let e=new _0x5db3c1;return e._UUID=this._UUID,e._name=this._name,e._type=this._type,e._visible=this._visible,e._styleHtmlPath=this._styleHtmlPath,e._scale=this._scale,e._pixScale=this._pixScale,e._texts=[],this._texts.forEach((t=>{e._texts.push(t)})),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._pntOffset=new _0x45ea17(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),WebGLPlot$g.defined(this._signImage)&&(e._signImage=new Image,e._signImage.src=this._signImage.src),e}_createSignImage(){let e=this._loadTempHtml(this._styleHtmlPath);if(!WebGLPlot$g.defined(e))return;let t=this._styleHtmlPath.replaceAll("\\","/"),i=t.substr(0,t.lastIndexOf("/")+1);e=e.replaceAll("url(","url("+i),e=e.replaceAll('src="','src="'+i),e=e.replaceAll("src='","src='"+i);let n=(new DOMParser).parseFromString(e,"text/html");for(let e=0;e<this._texts.length;e++){let t=this._texts[e],i=n.getElementById(String(e));WebGLPlot$g.defined(i)&&(i.innerHTML=t)}let r=n.getElementById("sign");document.body.appendChild(r);let o=this;_0x283780.toPng(r,{scale:this._pixScale}).then((function(e){o._signImage.src=e,document.body.removeChild(r)})).catch((function(e){console.error(e)}))}_loadTempHtml(e){if(WebGLPlot$g.defined(e)){if(-1!=(e=e.replace(/\\+/g,"/")).lastIndexOf("/")){var t;(t=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")).open("GET",e,!1),t.send();var i=t.responseText;if(404!==t.status&&WebGLPlot$g.defined(i))return i}}}}const _0x2f12a7=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x1fffb5=_0x2f12a7(void 0,(function(){return _0x1fffb5.toString().search("(((.+)+)+)+$").toString().constructor(_0x1fffb5).search("(((.+)+)+)+$")}));_0x1fffb5();class _0x2a14e8 extends _0x4c64cd{constructor(e){super(e),e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._pntOffset=WebGLPlot.defaultValue(e.pntOffset,new _0x45ea17(0,0,0)),this._type=_0x370c4a.ANNULARDIFFUSION,this._name=WebGLPlot.defaultValue(e.name,_0x5f28ea.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectAnnularDiffusion_"+WebGLPlot.createGuid(),this._bChangeSizeFlowModel=WebGLPlot.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot.defaultValue(e.radius,1e3),this._scanColor=WebGLPlot.defaultValue(e.scanColor,new WebGLPlot.Color(1,0,0,1)),this._scanSpeed=WebGLPlot.defaultValue(e.scanSpeed,5),WebGLPlot.defined(e.repeat)?this.setRepeat(e.repeat):this._repeat=1,this._diffusionPrimitive=void 0}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}setScanColor(e){this._scanColor=e,this._initialized=!1}getScanColor(){return this._scanColor}setRepeat(e){let t=parseInt(e);t<1?t=1:t>5&&(t=5),this._repeat=t,this._initialized=!1}getRepeat(){return this._repeat}setScanSpeed(e){this._scanSpeed=e,this._initialized=!1}getScanSpeed(){return this._scanSpeed}setGeoEntityParameter(e,t){if(WebGLPlot.defined(this._diffusionPrimitive)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x3f7d9f.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=_0x1569f6.calcControlPosMatrix(e,this._pntOffset,this._scene);WebGLPlot.defined(t)&&(this._initialized=!1)}if(e.getShowMode()==_0x3f7d9f.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;return this._diffusionPrimitive=this._createAnnularDiffusion(e),WebGLPlot.defined(this._diffusionPrimitive)&&(e.primitives.add(this._diffusionPrimitive),t=!0),t}_removeEffectFromScene(e){WebGLPlot.defined(this._diffusionPrimitive)&&e.primitives.contains(this._diffusionPrimitive)&&e.primitives.remove(this._diffusionPrimitive),this._diffusionPrimitive=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("radius")||(e.radius=this._radius),e.hasOwnProperty("scanColor")||(e.scanColor=this._scanColor.toCssColorString()),e.hasOwnProperty("scanSpeed")||(e.scanSpeed=this._scanSpeed),e.hasOwnProperty("repeat")||(e.repeat=this._repeat),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot.defined(e))return;let t=JSON.parse(e);WebGLPlot.defined(t.type)&&(this._type=t.type),WebGLPlot.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot.defined(t.name)&&(this._name=t.name),WebGLPlot.defined(t.radius)&&(this._radius=t.radius),WebGLPlot.defined(t.scanColor)&&(this._scanColor=WebGLPlot.Color.fromCssColorString(t.scanColor)),WebGLPlot.defined(t.scanSpeed)&&(this._scanSpeed=t.scanSpeed),WebGLPlot.defined(t.repeat)&&(this._repeat=t.repeat),WebGLPlot.defined(t.visible)&&(this._visible=t.visible),WebGLPlot.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot.defined(t.offset)&&(WebGLPlot.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x2a14e8;return e._UUID=this._UUID,e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x45ea17(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._radius=this._radius,e._scanColor=this._scanColor.clone(),e._scanSpeed=this._scanSpeed,e._repeat=this._repeat,e}_createAnnularDiffusion(){if(!WebGLPlot.defined(this._geoEntityParameter)||!WebGLPlot.defined(this._pntOffset)||!WebGLPlot.defined(this._radius))return null;let e=_0x1569f6.calcControlPosMatrix(this._geoEntityParameter,this._pntOffset,scene);if(!WebGLPlot.defined(e))return null;let t=_0x1569f6.getPositionFromModelMatrix(e);let i=new WebGLPlot.Material({fabric:{type:"MyAnnularDiffusion",uniforms:{color:new WebGLPlot.Color(this._scanColor.red,this._scanColor.green,this._scanColor.blue,1),speed:this._scanSpeed,count:this._repeat,gradient:.2},source:"uniform vec4 color;\n uniform float speed;\n uniform float count;\n uniform float gradient;\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = 1.5 * color.rgb;\n vec2 st = materialInput.st;\n float dis = distance(st, vec2(0.5, 0.5));\n float per = fract(czm_frameNumber * speed / 1000.0);\n vec3 str = materialInput.str;\n if(abs(str.z) > 0.001){\n discard;\n }\n if(dis > 0.5){\n discard;\n } else {\n float perDis = 0.5 / count;\n float disNum;\n float bl = 0.0;\n for(int i = 0; i <= 5; i++){\n if(float(i) <= count){\n disNum = perDis * float(i) - dis + per / count;\n if(disNum > 0.0){\n if(disNum < perDis){\n bl = 1.0 - disNum / perDis;\n } else if(disNum - perDis < perDis){\n bl = 1.0 - abs(1.0 - disNum / perDis);\n }\n material.alpha = pow(bl,(1.0 + 10.0 * (1.0 - gradient)));\n }\n }\n }\n }\n return material;\n }"}});return new WebGLPlot.Primitive({releaseGeometryInstances:!1,asynchronous:!1,geometryInstances:new WebGLPlot.GeometryInstance({geometry:new WebGLPlot.EllipseGeometry({center:_0x1569f6.degreesToCartesian3(t),semiMajorAxis:this._radius,semiMinorAxis:this._radius,height:t.z})}),appearance:new WebGLPlot.EllipsoidSurfaceAppearance({material:i})})}}var _0x2a4759=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3a6560=_0x2a4759(void 0,(function(){return _0x3a6560.toString().search("(((.+)+)+)+$").toString().constructor(_0x3a6560).search("(((.+)+)+)+$")}));_0x3a6560();var _0x446aa7={UNKNOW:0,BASICLINE:1,DASHLINE:2,METEORLINE:3,TUBULAR:4,ARROW:5},_0x168c99=Object.freeze(_0x446aa7);const _0x12ef82=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x57b5b3=_0x12ef82(void 0,(function(){return _0x57b5b3.toString().search("(((.+)+)+)+$").toString().constructor(_0x57b5b3).search("(((.+)+)+)+$")}));_0x57b5b3();class _0xa34c70 extends _0x4c64cd{constructor(e){super(e),e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._type=_0x370c4a.COMMUNICATIONLINK,this._linkType=_0x168c99.UNKNOW,this._UUID=WebGLPlot$g.createGuid(),this._bChangeSizeFlowModel=!1,this._startUUID=WebGLPlot$g.defaultValue(e.startUUID,""),this._endUUID=WebGLPlot$g.defaultValue(e.endUUID,""),this._startOffset=WebGLPlot$g.defaultValue(e.startOffset,new _0x45ea17(0,0,.5)),this._endOffset=WebGLPlot$g.defaultValue(e.endOffset,new _0x45ea17(0,0,.5)),this._maxVisibleDistance=WebGLPlot$g.defaultValue(e.maxVisibleDistance,-1),this._linkPrimitive=void 0,this._pntStart=void 0,this._pntEnd=void 0,this._isMove=!1}getLinkType(){return this._linkType}setStartUUID(e){this._startUUID=e}getStartUUID(){return this._startUUID}setEndUUID(e){this._endUUID=e}getEndUUID(){return this._endUUID}setStartOffset(e){this._startOffset=e,this._initialized=!1}getStartOffset(){return this._startOffset}setEndOffset(e){this._endOffset=e,this._initialized=!1}getEndOffset(){return this._endOffset}setMaxVisibleDistance(e){this._maxVisibleDistance=e}getMaxVisibleDistance(){return this._maxVisibleDistance}_executeFunction(e){if(WebGLPlot$g.defined(this._pntStart)&&WebGLPlot$g.defined(this._pntEnd)&&this._visible){let t=WebGLPlot$g.Cartesian3.fromDegrees(this._pntStart.x,this._pntStart.y,this._pntStart.z),i=WebGLPlot$g.Cartesian3.fromDegrees(this._pntEnd.x,this._pntEnd.y,this._pntEnd.z),n=Math.sqrt(WebGLPlot$g.Cartesian3.distanceSquared(t,i)),r=!0;-1!=this._maxVisibleDistance&&(r=n<=this._maxVisibleDistance),r&&!WebGLPlot$g.defined(this._linkPrimitive)?this._addEffectToScene(e):!r&&WebGLPlot$g.defined(this._linkPrimitive)&&this._removeEffectFromScene(e)}}}const _0x4662eb=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x32a2ac=_0x4662eb(void 0,(function(){return _0x32a2ac.toString().search("(((.+)+)+)+$").toString().constructor(_0x32a2ac).search("(((.+)+)+)+$")}));_0x32a2ac();class _0x3a2ce6 extends _0xa34c70{constructor(e){super(e),e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._linkType=_0x168c99.BASICLINE,this._name=WebGLPlot$g.defaultValue(e.name,_0x5f28ea.getDefaultName({effectType:this._type,linkType:this._linkType})),this._UUID="BasicLineCommunicationLink_"+WebGLPlot$g.createGuid(),this._speedV=WebGLPlot$g.defaultValue(e.speedV,5),this._lineWidth=WebGLPlot$g.defaultValue(e.lineWidth,1),this._signalLengthRatio=WebGLPlot$g.defaultValue(e.signalLengthRatio,.15),this._signalColor=WebGLPlot$g.defaultValue(e.signalColor,new WebGLPlot$g.Color(.21,1,.027,.78)),this._linkLineColor=WebGLPlot$g.defaultValue(e.linkLineColor,new WebGLPlot$g.Color(.92,.92,.92,.19)),this._bBothWay=WebGLPlot$g.defaultValue(e.bBothWay,!0),this._polylineCollection=void 0,this._linkPrimitive=void 0,this._direct=1;let t=this;this._executeAni=function(e,i){if(!WebGLPlot$g.defined(t._linkPrimitive)||!WebGLPlot$g.defined(t._polylineCollection))return;let n=.001*t._speedV,r=t._linkPrimitive.material.uniforms.start;t._bBothWay?(r<=0&&(t._direct=1),r+t._signalLengthRatio>=1&&(t._direct=-1),r+=n*t._direct):r>.8?r=0:r+=n,t._linkPrimitive.material.uniforms.start=r}}setGeoEntityParameter(e,t){if(WebGLPlot$g.defined(this._linkPrimitive)){let i=!1,n=e.getPosition();if(this._startUUID==t?WebGLPlot$g.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntStart=_0x1569f6.calcControlPoint(e,this._startOffset,this._scene),WebGLPlot$g.defined(this._pntStart)&&(i=!0)):this._endUUID==t&&WebGLPlot$g.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntEnd=_0x1569f6.calcControlPoint(e,this._endOffset,this._scene),WebGLPlot$g.defined(this._pntEnd)&&(i=!0)),i){let e=_0x1569f6.degreesToCartesian3(this._pntStart),t=_0x1569f6.degreesToCartesian3(this._pntEnd),i=_0x1569f6.calCurveLinkPoints(e,t);this._linkPrimitive.positions=i}}this._geoEntityParameter=e}_addEffectToScene(e){WebGLPlot$g.defined(this._linkPrimitive)&&this._removeEffectFromScene(e),this._pntStart=void 0;let t=_0x5f28ea.getGeoEntityParamByUUID(this._startUUID);WebGLPlot$g.defined(t)&&(this._pntStart=_0x1569f6.calcControlPoint(t,this._startOffset,e)),this._pntEnd=void 0;let i=_0x5f28ea.getGeoEntityParamByUUID(this._endUUID);if(WebGLPlot$g.defined(i)&&(this._pntEnd=_0x1569f6.calcControlPoint(i,this._endOffset,e)),!WebGLPlot$g.defined(this._pntStart)||!WebGLPlot$g.defined(this._pntEnd))return!1;let n=new WebGLPlot$g.Material({fabric:{type:"MyBaseLineMaterial",uniforms:{color:this._signalColor,color1:this._linkLineColor,start:0,signalLengthRatio:this._signalLengthRatio},source:"czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st; \n if(st.s > start && st.s < start + signalLengthRatio){ material.diffuse = color.rgb; \n material.alpha = color.a; \n }\n else{\n material.diffuse = color1.rgb; \n material.alpha = color1.a; \n }\n return material;\n }"}}),r=_0x1569f6.degreesToCartesian3(this._pntStart),o=_0x1569f6.degreesToCartesian3(this._pntEnd),a=_0x1569f6.calCurveLinkPoints(r,o);this._polylineCollection=new WebGLPlot$g.PolylineCollection,this._linkPrimitive=this._polylineCollection.add({positions:a,width:this._lineWidth,material:n});let s=!1;return WebGLPlot$g.defined(this._linkPrimitive)&&(e.primitives.add(this._polylineCollection),e.preUpdate.addEventListener(this._executeAni),s=!0),s}_removeEffectFromScene(e){WebGLPlot$g.defined(this._polylineCollection)&&e.primitives.contains(this._polylineCollection)&&(e.preUpdate.removeEventListener(this._executeAni),e.primitives.remove(this._polylineCollection),this._polylineCollection=void 0,this._linkPrimitive=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("linkType")||(e.linkType=this._linkType),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("startUUID")||(e.startUUID=this._startUUID),e.hasOwnProperty("endUUID")||(e.endUUID=this._endUUID),e.hasOwnProperty("maxVisibleDistance")||(e.maxVisibleDistance=this._maxVisibleDistance),e.hasOwnProperty("speedV")||(e.speedV=this._speedV),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("signalLengthRatio")||(e.signalLengthRatio=this._signalLengthRatio),e.hasOwnProperty("signalColor")||(e.signalColor=this._signalColor.toCssColorString()),e.hasOwnProperty("linkLineColor")||(e.linkLineColor=this._linkLineColor.toCssColorString()),e.hasOwnProperty("bBothWay")||(e.bBothWay=this._bBothWay),e.hasOwnProperty("visible")||(e.visible=this._visible);e.hasOwnProperty("startOffset")||(e.startOffset={},e.startOffset.hasOwnProperty("x")||(e.startOffset.x=this._startOffset.x),e.startOffset.hasOwnProperty("y")||(e.startOffset.y=this._startOffset.y),e.startOffset.hasOwnProperty("z")||(e.startOffset.z=this._startOffset.z));return e.hasOwnProperty("endOffset")||(e.endOffset={},e.endOffset.hasOwnProperty("x")||(e.endOffset.x=this._endOffset.x),e.endOffset.hasOwnProperty("y")||(e.endOffset.y=this._endOffset.y),e.endOffset.hasOwnProperty("z")||(e.endOffset.z=this._endOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$g.defined(e))return;let t=JSON.parse(e);WebGLPlot$g.defined(t.type)&&(this._type=t.type),WebGLPlot$g.defined(t.linkType)&&(this._linkType=t.linkType),WebGLPlot$g.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$g.defined(t.name)&&(this._name=t.name),WebGLPlot$g.defined(t.startUUID)&&(this._startUUID=t.startUUID),WebGLPlot$g.defined(t.endUUID)&&(this._endUUID=t.endUUID),WebGLPlot$g.defined(t.maxVisibleDistance)&&(this._maxVisibleDistance=t.maxVisibleDistance),WebGLPlot$g.defined(t.speedV)&&(this._speedV=t.speedV),WebGLPlot$g.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$g.defined(t.signalLengthRatio)&&(this._signalLengthRatio=t.signalLengthRatio),WebGLPlot$g.defined(t.signalColor)&&(this._signalColor=WebGLPlot$g.Color.fromCssColorString(t.signalColor)),WebGLPlot$g.defined(t.linkLineColor)&&(this._linkLineColor=WebGLPlot$g.Color.fromCssColorString(t.linkLineColor)),WebGLPlot$g.defined(t.bBothWay)&&(this._bBothWay=t.bBothWay),WebGLPlot$g.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$g.defined(t.startOffset)&&(WebGLPlot$g.defined(t.startOffset.x)&&(this._startOffset.x=t.startOffset.x),WebGLPlot$g.defined(t.startOffset.y)&&(this._startOffset.y=t.startOffset.y),WebGLPlot$g.defined(t.startOffset.z)&&(this._startOffset.z=t.startOffset.z)),WebGLPlot$g.defined(t.endOffset)&&(WebGLPlot$g.defined(t.endOffset.x)&&(this._endOffset.x=t.endOffset.x),WebGLPlot$g.defined(t.endOffset.y)&&(this._endOffset.y=t.endOffset.y),WebGLPlot$g.defined(t.endOffset.z)&&(this._endOffset.z=t.endOffset.z))}clone(){let e=new _0x3a2ce6;return e._UUID=this._UUID,e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x45ea17(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._linkType=this._linkType,e._startUUID=this._startUUID,e._endUUID=this._endUUID,e._startOffset=new _0x45ea17(this._startOffset.x,this._startOffset.y,this._startOffset.z),e._endOffset=new _0x45ea17(this._endOffset.x,this._endOffset.y,this._endOffset.z),e._maxVisibleDistance=this._maxVisibleDistance,e._speedV=this._speedV,e._lineWidth=this._lineWidth,e._signalLengthRatio=this._signalLengthRatio,e._signalColor=WebGLPlot$g.Color.clone(this._signalColor),e._linkLineColor=WebGLPlot$g.Color.clone(this._linkLineColor),e._bBothWay=this._bBothWay,e}setSpeedV(e){this._speedV=e,this._initialized=!1}getSpeedV(){return this._speedV}setLineWidth(e){this._lineWidth=e,this._initialized=!1}getLineWidth(){return this._lineWidth}setSignalLengthRatio(e){this._signalLengthRatio=e,this._initialized=!1}getSignalLengthRatio(){return this._signalLengthRatio}setSignalColor(e){this._signalColor=e,this._initialized=!1}getSignalColor(){return this._signalColor}setLinkLineColor(e){this._linkLineColor=e,this._initialized=!1}getLinkLineColor(){return this._linkLineColor}setbBothWay(e){this._bBothWay=e,this._initialized=!1}getbBothWay(){return this._bBothWay}}const _0x5cfeec=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x40a695=_0x5cfeec(void 0,(function(){return _0x40a695.toString().search("(((.+)+)+)+$").toString().constructor(_0x40a695).search("(((.+)+)+)+$")}));_0x40a695();class _0x5be414 extends _0xa34c70{constructor(e){super(e),e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._linkType=_0x168c99.ARROW,this._name=WebGLPlot$g.defaultValue(e.name,_0x5f28ea.getDefaultName({effectType:this._type,linkType:this._linkType})),this._UUID="ArrowCommunicationLink_"+WebGLPlot$g.createGuid(),this._speedV=WebGLPlot$g.defaultValue(e.speedV,1),this._lineWidth=WebGLPlot$g.defaultValue(e.lineWidth,5),this._repeatCount=WebGLPlot$g.defaultValue(e.repeatCount,50),this._arrowImage=WebGLPlot$g.defaultValue(e.arrowImage,_0x5f28ea.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/Arrow.png"),this._polylineCollection=null,this._linkPrimitive=void 0}setGeoEntityParameter(e,t){if(WebGLPlot$g.defined(this._linkPrimitive)){let i=!1,n=e.getPosition();if(this._startUUID==t?WebGLPlot$g.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntStart=_0x1569f6.calcControlPoint(e,this._startOffset,this._scene),WebGLPlot$g.defined(this._pntStart)&&(i=!0)):this._endUUID==t&&WebGLPlot$g.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntEnd=_0x1569f6.calcControlPoint(e,this._endOffset,this._scene),WebGLPlot$g.defined(this._pntEnd)&&(i=!0)),i){let e=_0x1569f6.degreesToCartesian3(this._pntStart),t=_0x1569f6.degreesToCartesian3(this._pntEnd),i=_0x1569f6.calCurveLinkPoints(e,t);this._linkPrimitive.positions=i}}this._geoEntityParameter=e}_addEffectToScene(e){WebGLPlot$g.defined(this._linkPrimitive)&&this._removeEffectFromScene(e),this._pntStart=void 0;let t=_0x5f28ea.getGeoEntityParamByUUID(this._startUUID);WebGLPlot$g.defined(t)&&(this._pntStart=_0x1569f6.calcControlPoint(t,this._startOffset,e)),this._pntEnd=void 0;let i=_0x5f28ea.getGeoEntityParamByUUID(this._endUUID);if(WebGLPlot$g.defined(i)&&(this._pntEnd=_0x1569f6.calcControlPoint(i,this._endOffset,e)),!WebGLPlot$g.defined(this._pntStart)||!WebGLPlot$g.defined(this._pntEnd))return!1;let n=new WebGLPlot$g.Material({fabric:{type:"MyArrowImage",uniforms:{image:this._arrowImage,repeat:new WebGLPlot$g.Cartesian2(this._repeatCount,1),time:this._speedV},source:"czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = repeat * materialInput.st;\n vec4 colorImage = texture2D(image, vec2(fract(st.s - czm_frameNumber * time * 0.005), st.t));\n material.alpha = colorImage.a;\n material.diffuse = colorImage.rgb;\n return material;\n }"}}),r=_0x1569f6.degreesToCartesian3(this._pntStart),o=_0x1569f6.degreesToCartesian3(this._pntEnd),a=_0x1569f6.calCurveLinkPoints(r,o);this._polylineCollection=new WebGLPlot$g.PolylineCollection,this._linkPrimitive=this._polylineCollection.add({positions:a,width:this._lineWidth,material:n});let s=!1;return WebGLPlot$g.defined(this._linkPrimitive)&&(e.primitives.add(this._polylineCollection),s=!0),s}_removeEffectFromScene(e){WebGLPlot$g.defined(this._polylineCollection)&&e.primitives.contains(this._polylineCollection)&&(e.primitives.remove(this._polylineCollection),this._polylineCollection=void 0,this._linkPrimitive=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("linkType")||(e.linkType=this._linkType),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("startUUID")||(e.startUUID=this._startUUID),e.hasOwnProperty("endUUID")||(e.endUUID=this._endUUID),e.hasOwnProperty("maxVisibleDistance")||(e.maxVisibleDistance=this._maxVisibleDistance),e.hasOwnProperty("speedV")||(e.speedV=this._speedV),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("repeatCount")||(e.repeatCount=this._repeatCount),e.hasOwnProperty("arrowImage")||(e.arrowImage=_0x1569f6.absoluteToRelativePath(this._arrowImage)),e.hasOwnProperty("visible")||(e.visible=this._visible);e.hasOwnProperty("startOffset")||(e.startOffset={},e.startOffset.hasOwnProperty("x")||(e.startOffset.x=this._startOffset.x),e.startOffset.hasOwnProperty("y")||(e.startOffset.y=this._startOffset.y),e.startOffset.hasOwnProperty("z")||(e.startOffset.z=this._startOffset.z));return e.hasOwnProperty("endOffset")||(e.endOffset={},e.endOffset.hasOwnProperty("x")||(e.endOffset.x=this._endOffset.x),e.endOffset.hasOwnProperty("y")||(e.endOffset.y=this._endOffset.y),e.endOffset.hasOwnProperty("z")||(e.endOffset.z=this._endOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$g.defined(e))return;let t=JSON.parse(e);WebGLPlot$g.defined(t.type)&&(this._type=t.type),WebGLPlot$g.defined(t.linkType)&&(this._linkType=t.linkType),WebGLPlot$g.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$g.defined(t.name)&&(this._name=t.name),WebGLPlot$g.defined(t.startUUID)&&(this._startUUID=t.startUUID),WebGLPlot$g.defined(t.endUUID)&&(this._endUUID=t.endUUID),WebGLPlot$g.defined(t.maxVisibleDistance)&&(this._maxVisibleDistance=t.maxVisibleDistance),WebGLPlot$g.defined(t.speedV)&&(this._speedV=t.speedV),WebGLPlot$g.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$g.defined(t.repeatCount)&&(this._repeatCount=t.repeatCount),WebGLPlot$g.defined(t.arrowImage)&&(this._arrowImage=_0x1569f6.relativeToAbsolutePath(t.arrowImage)),WebGLPlot$g.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$g.defined(t.startOffset)&&(WebGLPlot$g.defined(t.startOffset.x)&&(this._startOffset.x=t.startOffset.x),WebGLPlot$g.defined(t.startOffset.y)&&(this._startOffset.y=t.startOffset.y),WebGLPlot$g.defined(t.startOffset.z)&&(this._startOffset.z=t.startOffset.z)),WebGLPlot$g.defined(t.endOffset)&&(WebGLPlot$g.defined(t.endOffset.x)&&(this._endOffset.x=t.endOffset.x),WebGLPlot$g.defined(t.endOffset.y)&&(this._endOffset.y=t.endOffset.y),WebGLPlot$g.defined(t.endOffset.z)&&(this._endOffset.z=t.endOffset.z))}clone(){let e=new _0x5be414;return e._UUID=this._UUID,e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x45ea17(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._linkType=this._linkType,e._startUUID=this._startUUID,e._endUUID=this._endUUID,e._startOffset=new _0x45ea17(this._startOffset.x,this._startOffset.y,this._startOffset.z),e._endOffset=new _0x45ea17(this._endOffset.x,this._endOffset.y,this._endOffset.z),e._maxVisibleDistance=this._maxVisibleDistance,e._speedV=this._speedV,e._lineWidth=this._lineWidth,e._repeatCount=this._repeatCount,e._arrowImage=this._arrowImage,e}setSpeedV(e){this._speedV=e,this._initialized=!1}getSpeedV(){return this._speedV}setLineWidth(e){this._lineWidth=e,this._initialized=!1}getLineWidth(){return this._lineWidth}setRepeatCount(e){this._repeatCount=e,this._initialized=!1}getRepeatCount(){return this._repeatCount}setArrowImage(e){this._arrowImage=e,this._initialized=!1}getArrowImage(){return this._arrowImage}}const _0x2da66b=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x16a786=_0x2da66b(void 0,(function(){return _0x16a786.toString().search("(((.+)+)+)+$").toString().constructor(_0x16a786).search("(((.+)+)+)+$")}));_0x16a786();class _0x398ff5 extends _0xa34c70{constructor(e){super(e),e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._linkType=_0x168c99.TUBULAR,this._name=WebGLPlot$g.defaultValue(e.name,_0x5f28ea.getDefaultName({effectType:this._type,linkType:this._linkType})),this._UUID="TubularCommunicationLink_"+WebGLPlot$g.createGuid(),this._pntOffset=WebGLPlot$g.defaultValue(e.pntOffset,new _0x45ea17(0,0,.5)),!WebGLPlot$g.defined(e.sectionSlices)||e.sectionSlices<3||e.sectionSlices>128?this._sectionSlices=60:this._sectionSlices=e.sectionSlices,this._topRadius=WebGLPlot$g.defaultValue(e.topRadius,1e3),this._bottomRadius=WebGLPlot$g.defaultValue(e.bottomRadius,1e3),this._speedV=WebGLPlot$g.defaultValue(e.speedV,1.5),this._repeatCount=WebGLPlot$g.defaultValue(e.repeatCount,10),this._image=WebGLPlot$g.defaultValue(e.image,_0x5f28ea.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/TubularLinkSpacer.png"),this._linkPrimitive=void 0,this._linkLength=0}getSectionSlices(){return this._sectionSlices}setSectionSlices(e){!WebGLPlot$g.defined(e)||e<3||e>128||(this._sectionSlices=e,this._initialized=!1)}getTopRadius(){return this._topRadius}setTopRadius(e){this._topRadius=e,this._initialized=!1}getBottomRadius(){return this._bottomRadius}setBottomRadius(e){this._bottomRadius=e,this._initialized=!1}getSpeedV(){return this._speedV}setSpeedV(e){this._speedV=e,this._initialized=!1}getRepeatCount(){return this._repeatCount}setRepeatCount(e){this._repeatCount=e,this._initialized=!1}getImage(){return this._image}setImage(e){this._image=e,this._initialized=!1}setGeoEntityParameter(e,t){if(WebGLPlot$g.defined(this._linkPrimitive)){let i=!1,n=e.getPosition();if(this._startUUID==t?WebGLPlot$g.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntStart=_0x1569f6.calcControlPoint(e,this._startOffset,this._scene),WebGLPlot$g.defined(this._pntStart)&&(i=!0)):this._endUUID==t&&WebGLPlot$g.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntEnd=_0x1569f6.calcControlPoint(e,this._endOffset,this._scene),WebGLPlot$g.defined(this._pntEnd)&&(i=!0)),i){let e=this._getModelMatrix(this._pntStart,this._pntEnd),t=WebGLPlot$g.Cartesian3.fromDegrees(this._pntStart.x,this._pntStart.y,this._pntStart.z),i=WebGLPlot$g.Cartesian3.fromDegrees(this._pntEnd.x,this._pntEnd.y,this._pntEnd.z),n=WebGLPlot$g.Cartesian3.distance(t,i)/this._linkLength;this._linkPrimitive.modelMatrix=WebGLPlot$g.Matrix4.multiplyByScale(e,new WebGLPlot$g.Cartesian3(1,n,1),new WebGLPlot$g.Matrix4)}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;this._pntStart=void 0;let i=_0x5f28ea.getGeoEntityParamByUUID(this._startUUID);WebGLPlot$g.defined(i)&&(this._pntStart=_0x1569f6.calcControlPoint(i,this._startOffset,e)),this._pntEnd=void 0;let n=_0x5f28ea.getGeoEntityParamByUUID(this._endUUID);if(WebGLPlot$g.defined(n)&&(this._pntEnd=_0x1569f6.calcControlPoint(n,this._endOffset,e)),!WebGLPlot$g.defined(this._pntStart)||!WebGLPlot$g.defined(this._pntEnd))return!1;let r=this._getModelMatrix(this._pntStart,this._pntEnd);return!!WebGLPlot$g.defined(r)&&(this._linkPrimitive=this._createFillPrimitive(r),WebGLPlot$g.defined(this._linkPrimitive)&&(e.primitives.add(this._linkPrimitive),t=!0),t)}_removeEffectFromScene(e){WebGLPlot$g.defined(this._linkPrimitive)&&e.primitives.contains(this._linkPrimitive)&&(e.primitives.remove(this._linkPrimitive),this._linkPrimitive=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("linkType")||(e.linkType=this._linkType),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("startUUID")||(e.startUUID=this._startUUID),e.hasOwnProperty("endUUID")||(e.endUUID=this._endUUID),e.hasOwnProperty("maxVisibleDistance")||(e.maxVisibleDistance=this._maxVisibleDistance),e.hasOwnProperty("sectionSlices")||(e.sectionSlices=this._sectionSlices),e.hasOwnProperty("topRadius")||(e.topRadius=this._topRadius),e.hasOwnProperty("bottomRadius")||(e.bottomRadius=this._bottomRadius),e.hasOwnProperty("speedV")||(e.speedV=this._speedV),e.hasOwnProperty("repeatCount")||(e.repeatCount=this._repeatCount),e.hasOwnProperty("image")||(e.image=_0x1569f6.absoluteToRelativePath(this._image)),e.hasOwnProperty("visible")||(e.visible=this._visible);e.hasOwnProperty("startOffset")||(e.startOffset={},e.startOffset.hasOwnProperty("x")||(e.startOffset.x=this._startOffset.x),e.startOffset.hasOwnProperty("y")||(e.startOffset.y=this._startOffset.y),e.startOffset.hasOwnProperty("z")||(e.startOffset.z=this._startOffset.z));return e.hasOwnProperty("endOffset")||(e.endOffset={},e.endOffset.hasOwnProperty("x")||(e.endOffset.x=this._endOffset.x),e.endOffset.hasOwnProperty("y")||(e.endOffset.y=this._endOffset.y),e.endOffset.hasOwnProperty("z")||(e.endOffset.z=this._endOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$g.defined(e))return;let t=JSON.parse(e);WebGLPlot$g.defined(t.type)&&(this._type=t.type),WebGLPlot$g.defined(t.linkType)&&(this._linkType=t.linkType),WebGLPlot$g.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$g.defined(t.name)&&(this._name=t.name),WebGLPlot$g.defined(t.startUUID)&&(this._startUUID=t.startUUID),WebGLPlot$g.defined(t.endUUID)&&(this._endUUID=t.endUUID),WebGLPlot$g.defined(t.maxVisibleDistance)&&(this._maxVisibleDistance=t.maxVisibleDistance),WebGLPlot$g.defined(t.sectionSlices)&&(this._sectionSlices=t.sectionSlices),WebGLPlot$g.defined(t.topRadius)&&(this._topRadius=t.topRadius),WebGLPlot$g.defined(t.bottomRadius)&&(this._bottomRadius=t.bottomRadius),WebGLPlot$g.defined(t.speedV)&&(this._speedV=t.speedV),WebGLPlot$g.defined(t.repeatCount)&&(this._repeatCount=t.repeatCount),WebGLPlot$g.defined(t.image)&&(this._image=_0x1569f6.relativeToAbsolutePath(t.image)),WebGLPlot$g.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$g.defined(t.startOffset)&&(WebGLPlot$g.defined(t.startOffset.x)&&(this._startOffset.x=t.startOffset.x),WebGLPlot$g.defined(t.startOffset.y)&&(this._startOffset.y=t.startOffset.y),WebGLPlot$g.defined(t.startOffset.z)&&(this._startOffset.z=t.startOffset.z)),WebGLPlot$g.defined(t.endOffset)&&(WebGLPlot$g.defined(t.endOffset.x)&&(this._endOffset.x=t.endOffset.x),WebGLPlot$g.defined(t.endOffset.y)&&(this._endOffset.y=t.endOffset.y),WebGLPlot$g.defined(t.endOffset.z)&&(this._endOffset.z=t.endOffset.z))}clone(){let e=new _0x398ff5;return e._UUID=this._UUID,e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x45ea17(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._linkType=this._linkType,e._startUUID=this._startUUID,e._endUUID=this._endUUID,e._startOffset=new _0x45ea17(this._startOffset.x,this._startOffset.y,this._startOffset.z),e._endOffset=new _0x45ea17(this._endOffset.x,this._endOffset.y,this._endOffset.z),e._maxVisibleDistance=this._maxVisibleDistance,e._sectionSlices=this._sectionSlices,e._topRadius=this._topRadius,e._bottomRadius=this._bottomRadius,e._speedV=this._speedV,e._repeatCount=this._repeatCount,e._image=this._image,e}_getModelMatrix(e,t){const i=_0x1569f6.degreesToCartesian3(e),n=_0x1569f6.degreesToCartesian3(t);let r=new WebGLPlot$g.HeadingPitchRoll,o=_0x1569f6.getHeading(i,n);o&&(r.heading=o);let a=_0x1569f6.getPitch(i,n);return a&&(r.roll=a),WebGLPlot$g.Transforms.headingPitchRollToFixedFrame(i,r,WebGLPlot$g.Ellipsoid.WGS84,WebGLPlot$g.Transforms.localFrameToFixedFrameGenerator("east","north"))}_createFillPrimitive(e){if(!WebGLPlot$g.defined(e))return null;let t=this._createFillGeometry();if(!WebGLPlot$g.defined(t))return null;let i=new WebGLPlot$g.Material({fabric:{type:"TubularImage",uniforms:{picture:this._image,pictureColorScale:1,repeat:new WebGLPlot$g.Cartesian2(1,this._repeatCount),flowSpeed:this._speedV},source:" uniform sampler2D picture; uniform float pictureColorScale; uniform vec2 repeat; uniform float flowSpeed; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); vec2 st = materialInput.st; vec4 colorImage = texture2D(picture, vec2(fract(repeat.x * st.s), fract(repeat.y * st.t - czm_frameNumber * 0.005 * flowSpeed))); material.diffuse = colorImage.rgb * pictureColorScale; material.alpha = colorImage.a; return material; }"}}),n=scene.frameState;n.scene3DOnly=!0;let r=new WebGLPlot$g.MaterialAppearance({material:i,faceForward:!1,closed:!0,frameState:n});return new WebGLPlot$g.Primitive({releaseGeometryInstances:!1,geometryInstances:new WebGLPlot$g.GeometryInstance({geometry:WebGLPlot$g.GeometryPipeline.computeNormal(t)}),asynchronous:!1,modelMatrix:e,appearance:r})}_createFillGeometry(){let e=WebGLPlot$g.Cartesian3.fromDegrees(this._pntStart.x,this._pntStart.y,this._pntStart.z),t=WebGLPlot$g.Cartesian3.fromDegrees(this._pntEnd.x,this._pntEnd.y,this._pntEnd.z);this._linkLength=WebGLPlot$g.Cartesian3.distance(e,t);let i=this._linkLength,n=this._topRadius,r=this._bottomRadius,o=this._sectionSlices,a=[],s=[],l=WebGLPlot$g.CesiumMath.toRadians(360/o);for(let e=0;e<o;e++){let t=l*e;const o=Math.cos(t)*n,u=Math.sin(t)*n;a.push(new WebGLPlot$g.Cartesian3(o,0,u));const c=Math.cos(t)*r,h=Math.sin(t)*r;s.push(new WebGLPlot$g.Cartesian3(c,i,h))}let u=[],c=s.length;u=a.concat(s);let h=this._ptsTransform([u]),d=WebGLPlot$g.BoundingSphere.fromVertices(h),f=new Array(2*c*3),p=0;for(let e=0;e<c-1;e++)f[p++]=e,f[p++]=e+1,f[p++]=c+e,f[p++]=e+1,f[p++]=c+(e+1),f[p++]=c+e;f[p++]=c-1,f[p++]=0,f[p++]=2*c-1,f[p++]=0,f[p++]=c,f[p++]=2*c-1;let _=new Uint16Array(f),m=new WebGLPlot$g.GeometryAttributes;m.position=new WebGLPlot$g.GeometryAttribute({componentDatatype:WebGLPlot$g.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:new Float64Array(h)});let $=0,g=2*u.length,y=new Array(g);for(let e=0;e<u.length;e++){let t=e,i=0;e>=c&&(t=e-c,i=1),y[$++]=1*t/c,y[$++]=i}return m.st=new WebGLPlot$g.GeometryAttribute({componentDatatype:WebGLPlot$g.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(y)}),new WebGLPlot$g.Geometry({attributes:m,indices:_,primitiveType:WebGLPlot$g.PrimitiveType.TRIANGLES,boundingSphere:d})}_ptsTransform(e){let t=[];for(let i=0;i<e.length;i++){const n=e[i];for(let e=0;e<n.length;e++){const i=n[e];t.push(i.x),t.push(i.y),t.push(i.z)}}return t}}const _0x204e37=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x476fc5=_0x204e37(void 0,(function(){return _0x476fc5.toString().search("(((.+)+)+)+$").toString().constructor(_0x476fc5).search("(((.+)+)+)+$")}));_0x476fc5();class _0x44dd6d extends _0xa34c70{constructor(e){super(e),e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._linkType=_0x168c99.METEORLINE,this._name=WebGLPlot$g.defaultValue(e.name,_0x5f28ea.getDefaultName({effectType:this._type,linkType:this._linkType})),this._UUID="MeteorCommunicationLink_"+WebGLPlot$g.createGuid(),this._color=WebGLPlot$g.defaultValue(e.color,new WebGLPlot$g.Color(1,1,.3,.8)),this._speedV=WebGLPlot$g.defaultValue(e.speedV,1),this._percent=WebGLPlot$g.defaultValue(e.percent,.1),this._gradient=WebGLPlot$g.defaultValue(e.gradient,.01),this._lineWidth=WebGLPlot$g.defaultValue(e.lineWidth,1),this._linkPrimitive=void 0,this._polylineCollection=void 0}getColor(){return this._color}setColor(e){this._color=e,this._initialized=!1}getSpeedV(){return this._speedV}setSpeedV(e){this._speedV=e,this._initialized=!1}getPercent(){return this._percent}setPercent(e){this._percent=e,this._initialized=!1}getGradient(){return this._gradient}setGradient(e){this._gradient=e,this._initialized=!1}getLineWidth(){return this._lineWidth}setLineWidth(e){this._lineWidth=e,this._initialized=!1}setGeoEntityParameter(e,t){if(WebGLPlot$g.defined(this._linkPrimitive)){let i=!1,n=e.getPosition();if(this._startUUID==t?WebGLPlot$g.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntStart=_0x1569f6.calcControlPoint(e,this._startOffset,this._scene),WebGLPlot$g.defined(this._pntStart)&&(i=!0)):this._endUUID==t&&WebGLPlot$g.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntEnd=_0x1569f6.calcControlPoint(e,this._endOffset,this._scene),WebGLPlot$g.defined(this._pntEnd)&&(i=!0)),i){let e=_0x1569f6.degreesToCartesian3(this._pntStart),t=_0x1569f6.degreesToCartesian3(this._pntEnd),i=_0x1569f6.calCurveLinkPoints(e,t);this._linkPrimitive.positions=i}}this._geoEntityParameter=e}_addEffectToScene(e){WebGLPlot$g.defined(this._linkPrimitive)&&this._removeEffectFromScene(e),this._pntStart=void 0;let t=_0x5f28ea.getGeoEntityParamByUUID(this._startUUID);WebGLPlot$g.defined(t)&&(this._pntStart=_0x1569f6.calcControlPoint(t,this._startOffset,e)),this._pntEnd=void 0;let i=_0x5f28ea.getGeoEntityParamByUUID(this._endUUID);if(WebGLPlot$g.defined(i)&&(this._pntEnd=_0x1569f6.calcControlPoint(i,this._endOffset,e)),!WebGLPlot$g.defined(this._pntStart)||!WebGLPlot$g.defined(this._pntEnd))return!1;let n=new WebGLPlot$g.Material({fabric:{type:"MeteorLine",uniforms:{color:this._color,speedV:this._speedV,percent:this._percent,gradient:this._gradient},source:"\n uniform vec4 color;\n uniform float speedV;\n uniform float percent;\n uniform float gradient;\n \n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float t =fract(czm_frameNumber * speedV / 1000.0);\n t *= (1.0 + percent);\n float alpha = smoothstep(t- percent, t, st.s) * step(-t, -st.s);\n \n if(alpha < 1.0 && alpha > 0.0){\n material.diffuse = color.rgb;\n alpha = alpha * (pow(2.0, alpha * 5.0) / pow(2.0, 5.0));\n }else{\n material.diffuse = color.rgb;\n }\n alpha += gradient;\n material.alpha = alpha;\n \n return material;\n }\n "}}),r=_0x1569f6.degreesToCartesian3(this._pntStart),o=_0x1569f6.degreesToCartesian3(this._pntEnd),a=_0x1569f6.calCurveLinkPoints(r,o);this._polylineCollection=new WebGLPlot$g.PolylineCollection,this._linkPrimitive=this._polylineCollection.add({positions:a,width:this._lineWidth,material:n});let s=!1;return WebGLPlot$g.defined(this._linkPrimitive)&&(e.primitives.add(this._polylineCollection),s=!0),s}_removeEffectFromScene(e){WebGLPlot$g.defined(this._polylineCollection)&&e.primitives.contains(this._polylineCollection)&&(e.primitives.remove(this._polylineCollection),this._polylineCollection=void 0,this._linkPrimitive=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("linkType")||(e.linkType=this._linkType),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("startUUID")||(e.startUUID=this._startUUID),e.hasOwnProperty("endUUID")||(e.endUUID=this._endUUID),e.hasOwnProperty("maxVisibleDistance")||(e.maxVisibleDistance=this._maxVisibleDistance),e.hasOwnProperty("color")||(e.color=this._color),e.hasOwnProperty("speedV")||(e.speedV=this._speedV),e.hasOwnProperty("percent")||(e.percent=this._percent),e.hasOwnProperty("gradient")||(e.gradient=this._gradient),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("visible")||(e.visible=this._visible);e.hasOwnProperty("startOffset")||(e.startOffset={},e.startOffset.hasOwnProperty("x")||(e.startOffset.x=this._startOffset.x),e.startOffset.hasOwnProperty("y")||(e.startOffset.y=this._startOffset.y),e.startOffset.hasOwnProperty("z")||(e.startOffset.z=this._startOffset.z));return e.hasOwnProperty("endOffset")||(e.endOffset={},e.endOffset.hasOwnProperty("x")||(e.endOffset.x=this._endOffset.x),e.endOffset.hasOwnProperty("y")||(e.endOffset.y=this._endOffset.y),e.endOffset.hasOwnProperty("z")||(e.endOffset.z=this._endOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$g.defined(e))return;let t=JSON.parse(e);WebGLPlot$g.defined(t.type)&&(this._type=t.type),WebGLPlot$g.defined(t.linkType)&&(this._linkType=t.linkType),WebGLPlot$g.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$g.defined(t.name)&&(this._name=t.name),WebGLPlot$g.defined(t.startUUID)&&(this._startUUID=t.startUUID),WebGLPlot$g.defined(t.endUUID)&&(this._endUUID=t.endUUID),WebGLPlot$g.defined(t.maxVisibleDistance)&&(this._maxVisibleDistance=t.maxVisibleDistance),WebGLPlot$g.defined(t.color)&&(this._color=t.color),WebGLPlot$g.defined(t.speedV)&&(this._speedV=t.speedV),WebGLPlot$g.defined(t.percent)&&(this._percent=t.percent),WebGLPlot$g.defined(t.gradient)&&(this._gradient=t.gradient),WebGLPlot$g.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$g.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$g.defined(t.startOffset)&&(WebGLPlot$g.defined(t.startOffset.x)&&(this._startOffset.x=t.startOffset.x),WebGLPlot$g.defined(t.startOffset.y)&&(this._startOffset.y=t.startOffset.y),WebGLPlot$g.defined(t.startOffset.z)&&(this._startOffset.z=t.startOffset.z)),WebGLPlot$g.defined(t.endOffset)&&(WebGLPlot$g.defined(t.endOffset.x)&&(this._endOffset.x=t.endOffset.x),WebGLPlot$g.defined(t.endOffset.y)&&(this._endOffset.y=t.endOffset.y),WebGLPlot$g.defined(t.endOffset.z)&&(this._endOffset.z=t.endOffset.z))}clone(){let e=new _0x44dd6d;return e._UUID=this._UUID,e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x45ea17(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._linkType=this._linkType,e._startUUID=this._startUUID,e._endUUID=this._endUUID,e._startOffset=new _0x45ea17(this._startOffset.x,this._startOffset.y,this._startOffset.z),e._endOffset=new _0x45ea17(this._endOffset.x,this._endOffset.y,this._endOffset.z),e._maxVisibleDistance=this._maxVisibleDistance,e._color=WebGLPlot$g.Color.clone(this._color),e._speedV=this._speedV,e._percent=this._percent,e._gradient=this._gradient,e._wide=this._wide,e}}const _0x42ced4=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x5bde97=_0x42ced4(void 0,(function(){return _0x5bde97.toString().search("(((.+)+)+)+$").toString().constructor(_0x5bde97).search("(((.+)+)+)+$")}));_0x5bde97();class _0x158030 extends _0xa34c70{constructor(e){super(e),e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._linkType=_0x168c99.DASHLINE,this._name=WebGLPlot$g.defaultValue(e.name,_0x5f28ea.getDefaultName({effectType:this._type,linkType:this._linkType})),this._UUID="DashLineCommunicationLink"+WebGLPlot$g.createGuid(),this._speedV=WebGLPlot$g.defaultValue(e.speedV,5),this._lineWidth=WebGLPlot$g.defaultValue(e.lineWidth,1),this._dashLength=WebGLPlot$g.defaultValue(e.dashLength,30),this._dashPattern=WebGLPlot$g.defaultValue(e.dashPattern,255),this._signalColor=WebGLPlot$g.defaultValue(e.signalColor,new WebGLPlot$g.Color(1,0,0,1)),this._gapColor=WebGLPlot$g.defaultValue(e.gapColor,new WebGLPlot$g.Color(0,0,0,0)),this._polylineCollection=void 0,this._linkPrimitive=void 0}setGeoEntityParameter(e,t){if(WebGLPlot$g.defined(this._linkPrimitive)){let i=!1,n=e.getPosition();if(this._startUUID==t?WebGLPlot$g.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntStart=_0x1569f6.calcControlPoint(e,this._startOffset,this._scene),WebGLPlot$g.defined(this._pntStart)&&(i=!0)):this._endUUID==t&&WebGLPlot$g.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntEnd=_0x1569f6.calcControlPoint(e,this._endOffset,this._scene),WebGLPlot$g.defined(this._pntEnd)&&(i=!0)),i){let e=_0x1569f6.degreesToCartesian3(this._pntStart),t=_0x1569f6.degreesToCartesian3(this._pntEnd),i=_0x1569f6.calCurveLinkPoints(e,t);this._linkPrimitive.positions=i}}this._geoEntityParameter=e}_addEffectToScene(e){WebGLPlot$g.defined(this._linkPrimitive)&&this._removeEffectFromScene(e),this._pntStart=void 0;let t=_0x5f28ea.getGeoEntityParamByUUID(this._startUUID);WebGLPlot$g.defined(t)&&(this._pntStart=_0x1569f6.calcControlPoint(t,this._startOffset,e)),this._pntEnd=void 0;let i=_0x5f28ea.getGeoEntityParamByUUID(this._endUUID);if(WebGLPlot$g.defined(i)&&(this._pntEnd=_0x1569f6.calcControlPoint(i,this._endOffset,e)),!WebGLPlot$g.defined(this._pntStart)||!WebGLPlot$g.defined(this._pntEnd))return!1;let n=new Cesium.Material({fabric:{type:"MyDashLineMaterial",uniforms:{color:this._signalColor,gapColor:this._gapColor,dashLength:this._dashLength,dashPattern:this._dashPattern,speedV:-this._speedV},source:"uniform vec4 gapColor;\n uniform float dashLength;\n uniform float dashPattern;\n uniform float xy;\n varying float v_polylineAngle;\n \n const float maskLength = 16.0;\n \n mat2 rotate(float rad) {\n float c = cos(rad);\n float s = sin(rad);\n return mat2(\n c, s,\n -s, c\n );\n }\n \n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n \n vec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;\n \n // Get the relative position within the dash from 0 to 1\n float dashPosition = fract(pos.x/ (dashLength * czm_pixelRatio) + czm_frameNumber * 0.01 * speedV);\n // Figure out the mask index.\n float maskIndex = floor(dashPosition * maskLength);\n // Test the bit mask.\n float maskTest = floor((dashPattern) / pow(2.0, maskIndex));\n vec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;\n if (fragColor.a < 0.005) { // matches 0/255 and 1/255\n discard;\n }\n \n fragColor = czm_gammaCorrect(fragColor);\n material.emission = fragColor.rgb;\n material.alpha = fragColor.a;\n return material;\n }"},translucent:!0}),r=_0x1569f6.degreesToCartesian3(this._pntStart),o=_0x1569f6.degreesToCartesian3(this._pntEnd),a=_0x1569f6.calCurveLinkPoints(r,o);this._polylineCollection=new WebGLPlot$g.PolylineCollection,this._linkPrimitive=this._polylineCollection.add({positions:a,width:this._lineWidth,material:n});let s=!1;return WebGLPlot$g.defined(this._linkPrimitive)&&(e.primitives.add(this._polylineCollection),s=!0),s}_removeEffectFromScene(e){WebGLPlot$g.defined(this._polylineCollection)&&e.primitives.contains(this._polylineCollection)&&(e.primitives.remove(this._polylineCollection),this._polylineCollection=void 0,this._linkPrimitive=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("linkType")||(e.linkType=this._linkType),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("startUUID")||(e.startUUID=this._startUUID),e.hasOwnProperty("endUUID")||(e.endUUID=this._endUUID),e.hasOwnProperty("maxVisibleDistance")||(e.maxVisibleDistance=this._maxVisibleDistance),e.hasOwnProperty("speedV")||(e.speedV=this._speedV),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("dashLength")||(e.dashLength=this._dashLength),e.hasOwnProperty("dashPattern")||(e.dashPattern=this._dashPattern),e.hasOwnProperty("signalColor")||(e.signalColor=this._signalColor.toCssColorString()),e.hasOwnProperty("gapColor")||(e.gapColor=this._gapColor.toCssColorString()),e.hasOwnProperty("visible")||(e.visible=this._visible);e.hasOwnProperty("startOffset")||(e.startOffset={},e.startOffset.hasOwnProperty("x")||(e.startOffset.x=this._startOffset.x),e.startOffset.hasOwnProperty("y")||(e.startOffset.y=this._startOffset.y),e.startOffset.hasOwnProperty("z")||(e.startOffset.z=this._startOffset.z));return e.hasOwnProperty("endOffset")||(e.endOffset={},e.endOffset.hasOwnProperty("x")||(e.endOffset.x=this._endOffset.x),e.endOffset.hasOwnProperty("y")||(e.endOffset.y=this._endOffset.y),e.endOffset.hasOwnProperty("z")||(e.endOffset.z=this._endOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$g.defined(e))return;let t=JSON.parse(e);WebGLPlot$g.defined(t.type)&&(this._type=t.type),WebGLPlot$g.defined(t.linkType)&&(this._linkType=t.linkType),WebGLPlot$g.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$g.defined(t.name)&&(this._name=t.name),WebGLPlot$g.defined(t.startUUID)&&(this._startUUID=t.startUUID),WebGLPlot$g.defined(t.endUUID)&&(this._endUUID=t.endUUID),WebGLPlot$g.defined(t.maxVisibleDistance)&&(this._maxVisibleDistance=t.maxVisibleDistance),WebGLPlot$g.defined(t.speedV)&&(this._speedV=t.speedV),WebGLPlot$g.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$g.defined(t.dashLength)&&(this._dashLength=t.dashLength),WebGLPlot$g.defined(t.dashPattern)&&(this._dashPattern=t.dashPattern),WebGLPlot$g.defined(t.signalColor)&&(this._signalColor=WebGLPlot$g.Color.fromCssColorString(t.signalColor)),WebGLPlot$g.defined(t.gapColor)&&(this._gapColor=WebGLPlot$g.Color.fromCssColorString(t.gapColor)),WebGLPlot$g.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$g.defined(t.startOffset)&&(WebGLPlot$g.defined(t.startOffset.x)&&(this._startOffset.x=t.startOffset.x),WebGLPlot$g.defined(t.startOffset.y)&&(this._startOffset.y=t.startOffset.y),WebGLPlot$g.defined(t.startOffset.z)&&(this._startOffset.z=t.startOffset.z)),WebGLPlot$g.defined(t.endOffset)&&(WebGLPlot$g.defined(t.endOffset.x)&&(this._endOffset.x=t.endOffset.x),WebGLPlot$g.defined(t.endOffset.y)&&(this._endOffset.y=t.endOffset.y),WebGLPlot$g.defined(t.endOffset.z)&&(this._endOffset.z=t.endOffset.z))}clone(){let e=new _0x158030;return e._UUID=this._UUID,e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x45ea17(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._linkType=this._linkType,e._startUUID=this._startUUID,e._endUUID=this._endUUID,e._startOffset=new _0x45ea17(this._startOffset.x,this._startOffset.y,this._startOffset.z),e._endOffset=new _0x45ea17(this._endOffset.x,this._endOffset.y,this._endOffset.z),e._maxVisibleDistance=this._maxVisibleDistance,e._speedV=this._speedV,e._lineWidth=this._lineWidth,e._dashLength=this._dashLength,e._dashPattern=this._dashPattern,e._signalColor=WebGLPlot$g.Color.clone(this._signalColor),e._gapColor=WebGLPlot$g.Color.clone(this._gapColor),e}setSpeedV(e){this._speedV=e,this._initialized=!1}getSpeedV(){return this._speedV}setLineWidth(e){this._lineWidth=e,this._initialized=!1}getLineWidth(){return this._lineWidth}setDashLength(e){this._dashLength=e,this._initialized=!1}getDashLength(){return this._dashLength}setDashPattern(e){this._dashPattern=e,this._initialized=!1}getDashPattern(){return this._dashPattern}setSignalColor(e){this._signalColor=e,this._initialized=!1}getSignalColor(){return this._signalColor}setGapColor(e){this._gapColor=e,this._initialized=!1}getGapColor(){return this._gapColor}}var _0xca38ae=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3efe53=_0xca38ae(void 0,(function(){return _0x3efe53.toString().search("(((.+)+)+)+$").toString().constructor(_0x3efe53).search("(((.+)+)+)+$")}));_0x3efe53();var _0xa4e852={PlotMechanicalRadar:0,PlotParameterRadar:1,PlotWarningRadar:2,PlotScanRadar:3,PlotRotateRadar:4,PlotCustomRadar:5},_0x1416c0=Object.freeze(_0xa4e852);const _0x5970cf=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x33004c=_0x5970cf(void 0,(function(){return _0x33004c.toString().search("(((.+)+)+)+$").toString().constructor(_0x33004c).search("(((.+)+)+)+$")}));_0x33004c();class _0x27577d{constructor(e){e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._shadows=WebGLPlot$g.defaultValue(e.shadows,WebGLPlot$g.ShadowMode.DISABLED),this._isFill=WebGLPlot$g.defaultValue(e.isFill,!0),this._fillColor=WebGLPlot$g.defaultValue(e.fillColor,new WebGLPlot$g.Color(1,1,0,.5)),this._isOutline=WebGLPlot$g.defaultValue(e.isOutline,!0),this._outlineColor=WebGLPlot$g.defaultValue(e.outlineColor,new WebGLPlot$g.Color(1,1,0,1))}setShadows(e){this._shadows=e,this._initialized=!1}getShadows(){return this._shadows}setIsFill(e){this._isFill=e,this._initialized=!1}getIsFill(){return this._isFill}setFillColor(e){this._fillColor=e,this._initialized=!1}getFillColor(){return this._fillColor}setIsOutline(e){this._isOutline=e,this._initialized=!1}getIsOutline(){return this._isOutline}setOutlineColor(e){this._outlineColor=e,this._initialized=!1}getOutlineColor(){return this._outlineColor}toJSON(){let e={};return e.hasOwnProperty("shadows")||(e.shadows=this._shadows),e.hasOwnProperty("isFill")||(e.isFill=this._isFill),e.hasOwnProperty("fillColor")||(e.fillColor=this._fillColor.toCssColorString()),e.hasOwnProperty("isOutline")||(e.isOutline=this._isOutline),e.hasOwnProperty("outlineColor")||(e.outlineColor=this._outlineColor.toCssColorString()),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$g.defined(e))return;let t=JSON.parse(e);WebGLPlot$g.defined(t.shadows)&&(this._shadows=t.shadows),WebGLPlot$g.defined(t.isFill)&&(this._isFill=t.isFill),WebGLPlot$g.defined(t.fillColor)&&(this._fillColor=WebGLPlot$g.Color.fromCssColorString(t.fillColor)),WebGLPlot$g.defined(t.isOutline)&&(this._isOutline=t.isOutline),WebGLPlot$g.defined(t.outlineColor)&&(this._outlineColor=WebGLPlot$g.Color.fromCssColorString(t.outlineColor))}clone(){let e=new _0x27577d;return e._UUID=this._UUID,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e}_updateScan(e){e.shadows=this._shadows,e.isFill=this._isFill,e.fillColor=this._fillColor.clone(),e.isOutline=this._isOutline,e.outlineColor=this._outlineColor.clone()}}const _0x1718ec=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x298653=_0x1718ec(void 0,(function(){return _0x298653.toString().search("(((.+)+)+)+$").toString().constructor(_0x298653).search("(((.+)+)+)+$")}));_0x298653();class _0x24ebc9 extends _0x4c64cd{constructor(e){if(super(e),e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._type=_0x370c4a.RADAR,this._radarType=_0x1416c0.PlotCustomRadar,this._UUID=WebGLPlot$g.createGuid(),this._bChangeSizeFlowModel=WebGLPlot$g.defaultValue(e.bChangeSizeFlowModel,!0),this._scanSpeed=WebGLPlot$g.defaultValue(e.scanSpeed,60),this._shadows=WebGLPlot$g.defaultValue(e.shadows,WebGLPlot$g.ShadowMode.DISABLED),this._isFill=WebGLPlot$g.defaultValue(e.isFill,!0),this._fillColor=WebGLPlot$g.defaultValue(e.fillColor,new WebGLPlot$g.Color(1,0,0,.3)),this._isOutline=WebGLPlot$g.defaultValue(e.isOutline,!0),this._outlineColor=WebGLPlot$g.defaultValue(e.outlineColor,new WebGLPlot$g.Color(1,0,0,1)),this._outlineWidth=WebGLPlot$g.defaultValue(e.outlineWidth,1),this._isShowScan=!0,WebGLPlot$g.defined(e.arrGeoEntityEffectRadarScans))this._arrGeoEntityEffectRadarScans=e.arrGeoEntityEffectRadarScans;else{let e=[];for(let t=0;t<3;t++){let t=new _0x27577d;e.push(t)}this._arrGeoEntityEffectRadarScans=e}}getRadarType(){return this._radarType}setScanSpeed(e){this._scanSpeed=e,this._initialized=!1}getScanSpeed(){return this._scanSpeed}setShadows(e){this._shadows=e,this._initialized=!1}getShadows(){return this._shadows}setIsFill(e){this._isFill=e,this._initialized=!1}getIsFill(){return this._isFill}setFillColor(e){this._fillColor=e,this._initialized=!1}getFillColor(){return this._fillColor}setIsOutline(e){this._isOutline=e,this._initialized=!1}getIsOutline(){return this._isOutline}setOutlineColor(e){this._outlineColor=e,this._initialized=!1}getOutlineColor(){return this._outlineColor}setOutlineWidth(e){this._outlineWidth=e,this._initialized=!1}getOutlineWidth(){return this._outlineWidth}getGeoEntityEffectRadarScans(){return this._arrGeoEntityEffectRadarScans}setGeoEntityEffectRadarScans(e){this._arrGeoEntityEffectRadarScans=e,this._initialized=!1}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),e.hasOwnProperty("scanSpeed")||(e.scanSpeed=this._scanSpeed),e.hasOwnProperty("shadows")||(e.shadows=this._shadows),e.hasOwnProperty("isFill")||(e.isFill=this._isFill),e.hasOwnProperty("fillColor")||(e.fillColor=this._fillColor.toCssColorString()),e.hasOwnProperty("isOutline")||(e.isOutline=this._isOutline),e.hasOwnProperty("outlineColor")||(e.outlineColor=this._outlineColor.toCssColorString()),e.hasOwnProperty("outlineWidth")||(e.outlineWidth=this._outlineWidth);let t=[];return e.hasOwnProperty("arrGeoEntityEffectRadarScans")||(e.arrGeoEntityEffectRadarScans=t,this._arrGeoEntityEffectRadarScans.forEach((e=>{t.push(e.toJSON())}))),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$g.defined(e))return;let t=JSON.parse(e);WebGLPlot$g.defined(t.type)&&(this._type=t.type),WebGLPlot$g.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$g.defined(t.name)&&(this._name=t.name),WebGLPlot$g.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$g.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$g.defined(t.offset)&&(WebGLPlot$g.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$g.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$g.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z)),WebGLPlot$g.defined(t.scanSpeed)&&(this._scanSpeed=t.scanSpeed),WebGLPlot$g.defined(t.shadows)&&(this._shadows=t.shadows),WebGLPlot$g.defined(t.isFill)&&(this._isFill=t.isFill),WebGLPlot$g.defined(t.fillColor)&&(this._fillColor=WebGLPlot$g.Color.fromCssColorString(t.fillColor)),WebGLPlot$g.defined(t.isOutline)&&(this._isOutline=t.isOutline),WebGLPlot$g.defined(t.outlineColor)&&(this._outlineColor=WebGLPlot$g.Color.fromCssColorString(t.outlineColor)),WebGLPlot$g.defined(t.outlineWidth)&&(this._outlineWidth=t.outlineWidth),this._arrGeoEntityEffectRadarScans=[],t.arrGeoEntityEffectRadarScans.forEach((e=>{let t=new _0x27577d;t.fromJSON(e),this._arrGeoEntityEffectRadarScans.push(t)}))}}const _0x5692bf=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0xd6bea6=_0x5692bf(void 0,(function(){return _0xd6bea6.toString().search("(((.+)+)+)+$").toString().constructor(_0xd6bea6).search("(((.+)+)+)+$")}));_0xd6bea6();var _0x4df7a2=void 0;function _0x5b76d9(e){if(!e)throw new WebGLPlot.DeveloperError("PlotRadarUpdater scene is required.");_0x4df7a2||(this.start(50),this._primitives=new WebGLPlot.PrimitiveCollection,e.primitives.add(this._primitives)),this.radarArray=[]}_0x5b76d9.getInstance=function(e){return _0x4df7a2||(_0x4df7a2=new _0x5b76d9(e)),_0x4df7a2},_0x5b76d9.prototype.add=function(e){e.PlotRadarType&&this.radarArray.push(e)},_0x5b76d9.prototype.radarUpdate=function(e){for(let t=0;t<this.radarArray.length;t++){const i=this.radarArray[t];(!i||!i.show||!i.__isDestroy)&&i._updated(e)}},_0x5b76d9.prototype.start=function(e){this.stop();let t=this;this.IntervalID=setInterval((function(){t.radarUpdate(e)}),e)},_0x5b76d9.prototype.stop=function(){clearInterval(this.IntervalID),this.IntervalID=-1},_0x5b76d9.prototype.destroy=function(){this.stop(),_0x4df7a2=void 0,this._primitives.destroy()};const _0x1a04a9=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x301294=_0x1a04a9(void 0,(function(){return _0x301294.toString().search("(((.+)+)+)+$").toString().constructor(_0x301294).search("(((.+)+)+)+$")}));_0x301294();class _0x3c19a2 extends _0x2c86f0{constructor(e,t){super(e),this._scene=t,this._isNeedUpdate=!1,this.PlotRadarType="PlotRadarBase",e&&(this._scale=WebGLPlot$g.defaultValue(e.scale,1),this._id=WebGLPlot$g.defaultValue(e.id,WebGLPlot$g.createGuid()),this._point=WebGLPlot$g.defaultValue(e.point,new WebGLPlot$g.Cartesian3),this._offset=WebGLPlot$g.defaultValue(e.offset,new WebGLPlot$g.Cartesian3),this._customPts=WebGLPlot$g.defaultValue(e.customPts,[]),this._radii=WebGLPlot$g.defaultValue(e.radii,new WebGLPlot$g.Cartesian3(1,1,1)),this._slicePartitions=WebGLPlot$g.defaultValue(e.slicePartitions,67),this._stackPartitions=WebGLPlot$g.defaultValue(e.stackPartitions,67),this._show=WebGLPlot$g.defaultValue(e.show,!0),this._fill=WebGLPlot$g.defaultValue(e.isFill,!0),this._fillColor=WebGLPlot$g.defaultValue(e.fillColor,new WebGLPlot$g.Color(1,0,0,.5)),this._outline=WebGLPlot$g.defaultValue(e.isOutline,!0),this._outlineColor=WebGLPlot$g.defaultValue(e.outlineColor,new WebGLPlot$g.Color(1,0,0,1)),this._outlineWidth=WebGLPlot$g.defaultValue(e.outlineWidth,.5),this._outlineMaterial=e.outlineMaterial,e.rotate?this._rotate=new WebGLPlot$g.Cartesian3(WebGLPlot$g.CesiumMath.toRadians(e.rotate.x),WebGLPlot$g.CesiumMath.toRadians(e.rotate.y),WebGLPlot$g.CesiumMath.toRadians(e.rotate.z)):this._rotate=new WebGLPlot$g.Cartesian3(0,0,0),this.shadows=WebGLPlot$g.defaultValue(e.shadows,WebGLPlot$g.ShadowMode.DISABLED)),t&&(_0x5b76d9.getInstance(t).add(this),this._primitives=_0x5b76d9.getInstance()._primitives),this._primitive=void 0,this._outlinePrimitive=void 0}updateEffect(e){WebGLPlot$g.defined(e.point)&&(this.point=e.point),WebGLPlot$g.defined(e.rotate)&&(this.rotate=e.rotate.clone()),WebGLPlot$g.defined(e.visible)&&(this.show=e.visible)}_updatedRadarPrimitive(){var e=new WebGLPlot$g.HeadingPitchRoll(-1*this._rotate.z,-1*this._rotate.y,this._rotate.x);const t=WebGLPlot$g.Cartesian3.fromDegrees(this.point.x+this._offset.x,this.point.y+this._offset.y,this.point.z+this._offset.z),i=WebGLPlot$g.Transforms.headingPitchRollToFixedFrame(t,e);this.isFill&&this._primitive&&(this._primitive.modelMatrix=i),this.isOutline&&this._outlinePrimitive&&(this._outlinePrimitive.modelMatrix=i)}_createRadarPrimitive(){var e=new WebGLPlot$g.HeadingPitchRoll(-1*this._rotate.z,-1*this._rotate.y,this._rotate.x);const t=WebGLPlot$g.Cartesian3.fromDegrees(this.point.x+this._offset.x,this.point.y+this._offset.y,this.point.z+this._offset.z),i=WebGLPlot$g.Transforms.headingPitchRollToFixedFrame(t,e);this.isFill&&this._addFillPrimitive(i),this.isOutline&&this._addOutlinePrimitive(i)}_addFillPrimitive(e){if(this._primitive&&this._primitives.removeAndDestroy(this._primitive),!this.show)return;let t=this._createFillPrimitive(e);this._primitive=this._primitives.add(t)}_addOutlinePrimitive(e){if(this._outlinePrimitive&&this._primitives.removeAndDestroy(this._outlinePrimitive),!this.show)return;let t=this._createOutlinePrimitive(e);this._outlinePrimitive=this._primitives.add(t)}_createFillPrimitive(e,t){t||(t=this);var i={show:new WebGLPlot$g.ShowGeometryInstanceAttribute(t.isFill),distanceDisplayCondition:new WebGLPlot$g.DistanceDisplayConditionGeometryInstanceAttribute,color:void 0,offset:void 0},n=new WebGLPlot$g.MaterialAppearance({material:WebGLPlot$g.Material.fromType(WebGLPlot$g.Material.ColorType,{color:t.fillColor}),translucent:!0,closed:!0,faceForward:!1});let r=this._createRadarFillGeometry(t),o=new WebGLPlot$g.GeometryInstance({id:t.id,geometry:r,attributes:i,modelMatrix:WebGLPlot$g.Matrix4.IDENTITY});return new WebGLPlot$g.Primitive({allowPicking:!1,geometryInstances:o,appearance:n,asynchronous:!1,shadows:t.shadows,modelMatrix:e})}_createOutlinePrimitive(e,t){t||(t=this);let i,n=[],r=this._createRadarOutLineGeometry(t);if(Array.isArray(r))for(let e=0;e<r.length;e++){let i=r[e],o=new WebGLPlot$g.GeometryInstance({id:t.id,geometry:i});n.push(o)}else n=new WebGLPlot$g.GeometryInstance({id:t.id,geometry:r});i=t.outlineMaterial&&t.outlineMaterial instanceof WebGLPlot$g.Material?t.outlineMaterial:new WebGLPlot$g.Material.fromType("Color",{color:t.outlineColor});let o=new WebGLPlot$g.PolylineMaterialAppearance({flat:!0,translucent:!0,material:i});return new WebGLPlot$g.Primitive({allowPicking:!1,geometryInstances:n,appearance:o,asynchronous:!1,shadows:t.shadows,modelMatrix:e})}_createScanPrimitive(e,t){var i=new WebGLPlot$g.HeadingPitchRoll(-1*e._rotate.z,-1*e._rotate.y,e._rotate.x);const n=WebGLPlot$g.Cartesian3.fromDegrees(e.point.x+this._offset.x,e.point.y+this._offset.y,e.point.z+this._offset.z),r=WebGLPlot$g.Transforms.headingPitchRollToFixedFrame(n,i);if(e.isFill){let i=this._createFillPrimitive(r,e),n=this._primitives.add(i);e._primitive=n,this._primitiveScnaFillArry[t]=n}if(e.isOutline){let i=this._createOutlinePrimitive(r,e),n=this._primitives.add(i);e._outlinePrimitive=n,this._primitiveScnaOutLineArry[t]=n}}clone(e){if(!WebGLPlot$g.defined(e))throw new WebGLPlot$g.DeveloperError("PlotRadar clone result is required.");return e.PlotRadarType="PlotRadarBase",e._scene=this._scene,e._id=this.id,e._point=this.point.clone(),e._rotate=this._rotate.clone(),e._radii=this.radii.clone(),e._slicePartitions=this.slicePartitions,e._stackPartitions=this.stackPartitions,e._show=this.show,e._fill=this.isFill,e._fillColor=this.fillColor,e._outline=this.isOutline,e._outlineColor=this.outlineColor,e._outlineWidth=this._outlineWidth,e.shadows=this.shadows,e._customPts=this._customPts,e}getEffectParameter(){let e={};return e.point=this.point,e.rotate=this.rotate,e.visible=this.visible,e}destroy(){this._isNeedUpdate=!1,this._primitive&&this._primitives&&this._primitives.removeAndDestroy(this._primitive),this._outlinePrimitive&&this._primitives&&this._primitives.removeAndDestroy(this._outlinePrimitive),this._scanArray&&this._scanArray.length>0&&(this._scanArray.forEach((e=>{e.destroy()})),this._scanArray=[]),this.__isDestroy=!0}toGeoJson(){return{}}fromGeoJson(e){}}Object.defineProperties(_0x3c19a2.prototype,{id:{get:function(){return this._id},set:function(e){"string"==typeof e&&this._id!==e&&(this._id=e)}},point:{get:function(){return this._point},set:function(e){(e instanceof WebGLPlot$g.Cartesian3||e instanceof _0x45ea17)&&!_0x45ea17.equals(e,this._point)&&(this._point=e.clone(),this._scanArray&&this._scanArray.length>0&&this._scanArray.forEach((t=>{t._point=e})),this._updatedRadarPrimitive())}},offset:{get:function(){return this._offset},set:function(e){(e instanceof WebGLPlot$g.Cartesian3||e instanceof _0x45ea17)&&!_0x45ea17.equals(e,this._offset)&&(this._offset=e,this._scanArray&&this._scanArray.length>0&&this._scanArray.forEach((t=>{t._offset=e})),this._updatedRadarPrimitive())}},rotate:{get:function(){return new WebGLPlot$g.Cartesian3(WebGLPlot$g.CesiumMath.toDegrees(this._rotate.x),WebGLPlot$g.CesiumMath.toDegrees(this._rotate.y),WebGLPlot$g.CesiumMath.toDegrees(this._rotate.z))},set:function(e){if(e instanceof WebGLPlot$g.Cartesian3||e instanceof _0x45ea17){let t=new WebGLPlot$g.Cartesian3(WebGLPlot$g.CesiumMath.toRadians(e.x),WebGLPlot$g.CesiumMath.toRadians(e.y),WebGLPlot$g.CesiumMath.toRadians(e.z));WebGLPlot$g.Cartesian3(t,this._rotate)||(this._rotate=t,this._updatedRadarPrimitive(),WebGLPlot$g.defined(this._updated_Scan)&&this._updated_Scan(0))}}},slicePartitions:{get:function(){return this._slicePartitions},set:function(e){"number"==typeof e&&this._slicePartitions!==e&&(this._slicePartitions=e,this._isNeedUpdate=!0)}},stackPartitions:{get:function(){return this._stackPartitions}},show:{get:function(){return this._show},set:function(e){if("boolean"==typeof e&&this._show!==e)if(this._show=e,e){if(this._primitive&&(this._primitive.show=this.isFill),this._outlinePrimitive&&(this._outlinePrimitive.show=this.isOutline),this._scanArray&&Array.isArray(this._scanArray))for(let e=0;e<this._scanArray.length;e++){const t=this._scanArray[e];t._primitive&&(t._primitive.show=t.isFill),t._outlinePrimitive&&(t._outlinePrimitive.show=t.isOutline)}}else if(this._primitive&&(this._primitive.show=e),this._outlinePrimitive&&(this._outlinePrimitive.show=e),this._scanArray&&Array.isArray(this._scanArray))for(let t=0;t<this._scanArray.length;t++){const i=this._scanArray[t];i._primitive&&(i._primitive.show=e),i._outlinePrimitive&&(i._outlinePrimitive.show=e)}}},isFill:{get:function(){return this._fill},set:function(e){"boolean"==typeof e&&this._fill!==e&&(this._fill=e,this._primitive&&(this._primitive.show=e))}},isOutline:{get:function(){return this._outline},set:function(e){"boolean"==typeof e&&this._outline!==e&&(this._outline=e,this._outlinePrimitive&&(this._outlinePrimitive.show=e),this.__parent&&(this.__parent._isNeedUpdate=!0))}},fillColor:{get:function(){return this._fillColor},set:function(e){e instanceof WebGLPlot$g.Color&&!WebGLPlot$g.Color.equals(e,this._fillColor)&&(this._fillColor=e,this._primitive&&(this._primitive.appearance.material=WebGLPlot$g.Material.fromType(WebGLPlot$g.Material.ColorType,{color:e})))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(e instanceof WebGLPlot$g.Color&&!WebGLPlot$g.Color.equals(e,this._outlineColor)){if(this._outlineColor=e,this._outlinePrimitive&&this._outlinePrimitive._instanceIds)for(let t=0;t<this._outlinePrimitive._instanceIds.length;t++)this._outlinePrimitive.appearance.material=WebGLPlot$g.Material.fromType(WebGLPlot$g.Material.ColorType,{color:e});this._isNeedUpdate=!0}}},outlineMaterial:{get:function(){return this._outlineMaterial},set:function(e){(e instanceof WebGLPlot$g.Material||!WebGLPlot$g.defined(e))&&(this.outlineMaterial=e)}},material:{get:function(){return this._fillColor},set:function(e){if(e instanceof WebGLPlot$g.Color&&!WebGLPlot$g.Color.equals(e,this._fillColor)){this.fillColor=e;let t=2*e.alpha>=1?1:2*e.alpha;this.outlineColor=new WebGLPlot$g.Color(e.red,e.green,e.blue,t)}}},radii:{get:function(){return this._radii},set:function(e){(e instanceof WebGLPlot$g.Cartesian3||e instanceof _0x45ea17)&&!_0x45ea17.equals(e,this._radii)&&(this._radii=e.clone(),this._createScan&&this._createScan(),this._isNeedUpdate=!0)}},isShowScan:{get:function(){return this._isShowScan},set:function(e){"boolean"==typeof e&&this.__isShowScan!==e&&(this._isShowScan=e)}},dScanSpeed:{get:function(){return WebGLPlot$g.CesiumMath.toDegrees(this._dScanSpeed)},set:function(e){if("number"==typeof e){let t=WebGLPlot$g.CesiumMath.toRadians(e);this._dScanSpeed=t}}},scale:{get:function(){return this._scale},set:function(e){"number"==typeof e&&this._scale!==e&&(this._scale=e,this._isNeedUpdate=!0)}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){"number"==typeof e&&this._outlineWidth!==e&&(this._outlineWidth=e,this._isNeedUpdate=!0)}}});const _0x296de3=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0xc840c2=_0x296de3(void 0,(function(){return _0xc840c2.toString().search("(((.+)+)+)+$").toString().constructor(_0xc840c2).search("(((.+)+)+)+$")}));_0xc840c2();class _0x5a9732 extends _0x3c19a2{constructor(e){super(e),this.PlotRadarType="PlotRotateRadarScan",this._slicePartitions=2,this._computeScanPts(e),e instanceof _0x3c19a2&&(this.__parent=e)}_computeScanPts(e){WebGLPlot.defined(e)&&(this.scanAngle=e.rotateAngle*(this._slicePartitions/e.slicePartitions),e._radarPts.length>3&&this._getScanPts(e._radarPts))}_getScanPts(e){this._radarPts=[];for(let i=0;i<e.length;i++){var t=[];const n=e[i];for(let e=0;e<this._slicePartitions;e++){const i=n[e];t.push(i)}this._radarPts.push(t)}}clone(e){return(!WebGLPlot.defined(e)||!(e instanceof _0x5a9732))&&(e=new _0x5a9732),(e=super.clone(e))._radarPts=this._radarPts,e.PlotRadarType=this.PlotRadarType,e._slicePartitions=this._slicePartitions,e.scanAngle=this.scanAngle,e._isNeedUpdate=!0,e}}var _0x189b8a=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x4bc9d6=_0x189b8a(void 0,(function(){return _0x4bc9d6.toString().search("(((.+)+)+)+$").toString().constructor(_0x4bc9d6).search("(((.+)+)+)+$")}));_0x4bc9d6();var _0x5e4593=new WebGLPlot.Cartesian3,_0x3c28f8=new WebGLPlot.Cartesian3,_0x2227a2=new WebGLPlot.Cartesian3,_0x436fc4=new WebGLPlot.Cartesian3,_0x4fda7a=new WebGLPlot.Cartesian3;function _0x45871f(e){this.radii=WebGLPlot.defaultValue(e.radii,new WebGLPlot.Cartesian3(1,1,1)),this.positions=WebGLPlot.defaultValue(e.customPts,[]),this.numThetas=WebGLPlot.defaultValue(e.slicePartitions,65),this.numPhis=WebGLPlot.defaultValue(e.stackPartitions,65),this.vertexFormat=WebGLPlot.defaultValue(e.vertexFormat,WebGLPlot.VertexFormat.DEFAULT),this._offsetAttribute=e.offsetAttribute,this._indices=e.indices,this._workerName="createPlotCustomRadarGeometry"}function _0x548807(e){let t=[];for(let i=0;i<e.length;i++){const n=e[i];for(let e=0;e<n.length;e++){const i=n[e];0===i.x&&(i.x=1e-10),0===i.y&&(i.y=1e-10),0===i.z&&(i.z=1e-10),t.push(i.x),t.push(i.y),t.push(i.z)}}return t}_0x45871f.createGeometry=function(e,t){if(e.numPhis<2||e.numThetas<2||e.positions.length<2)return;let i=_0x548807(e.positions),n=e.numThetas,r=e.numPhis;var o=e.vertexFormat,a=n*r,s=6*a,l=WebGLPlot.IndexDatatype.createTypedArray(a,s),u=o.normal?new Float32Array(3*a):void 0,c=o.tangent?new Float32Array(3*a):void 0,h=o.bitangent?new Float32Array(3*a):void 0,d=o.st?new Float32Array(2*a):void 0;if(e._indices)l=e._indices;else{var f,p;let e=0;var _,m;if(t)for(f=0;f<r-1;f++)for(_=f*n,m=(f+1)*n,p=0;p<n-1;p++)l[e++]=m+p,l[e++]=m+p+1,l[e++]=_+p+1,l[e++]=m+p,l[e++]=_+p+1,l[e++]=_+p;else for(f=0;f<r-1;f++)for(_=f*n,m=(f+1)*n,p=0;p<n-1;p++)0===p&&(l[e++]=0,l[e++]=_,l[e++]=m),l[e++]=m+p,l[e++]=m+p+1,l[e++]=_+p+1,l[e++]=m+p,l[e++]=_+p+1,l[e++]=_+p,p===n-2&&(l[e++]=0,l[e++]=_+p+1,l[e++]=m+p+1)}var $=new WebGLPlot.GeometryAttributes;o.position&&($.position=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:i}));var g,y=0,v=0,x=0,b=0,S=WebGLPlot.Ellipsoid.fromCartesian3(e.radii);if(o.st||o.normal||o.tangent||o.bitangent){for(f=0;f<a;f++){g=S;var w=WebGLPlot.Cartesian3.fromArray(i,3*f,_0x5e4593);0===w.x&&(w.x=1e-10),0===w.y&&(w.y=1e-10),0===w.z&&(w.z=1e-10);var C=g.geodeticSurfaceNormal(w,_0x3c28f8);if(o.st){var T=WebGLPlot.Cartesian2.negate(C,_0x4fda7a);d[y++]=Math.atan2(T.y,T.x)/WebGLPlot.CesiumMath.TWO_PI+.5,d[y++]=Math.asin(C.z)/WebGLPlot.CesiumMath.PI+.5}if(o.normal&&(u[v++]=C.x,u[v++]=C.y,u[v++]=C.z),o.tangent||o.bitangent){var P,E=_0x2227a2;if(P=!isTopOpen&&f>=0&&f<0+2*n?WebGLPlot.Cartesian3.UNIT_X:WebGLPlot.Cartesian3.UNIT_Z,WebGLPlot.Cartesian3.cross(P,C,E),WebGLPlot.Cartesian3.normalize(E,E),o.tangent&&(c[x++]=E.x,c[x++]=E.y,c[x++]=E.z),o.bitangent){var A=WebGLPlot.Cartesian3.cross(C,E,_0x436fc4);WebGLPlot.Cartesian3.normalize(A,A),h[b++]=A.x,h[b++]=A.y,h[b++]=A.z}}}o.st&&($.st=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:d})),o.normal&&($.normal=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:u})),o.tangent&&($.tangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:c})),o.bitangent&&($.bitangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:h}))}if(WebGLPlot.defined(e._offsetAttribute)){var L=i.length,M=new Uint8Array(L/3),I=e._offsetAttribute===WebGLPlot.GeometryOffsetAttribute.NONE?0:1;WebGLPlot.arrayFill(M,I),$.applyOffset=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:M})}return new WebGLPlot.Geometry({attributes:$,indices:l,primitiveType:WebGLPlot.PrimitiveType.TRIANGLES,boundingSphere:WebGLPlot.BoundingSphere.fromEllipsoid(S),offsetAttribute:e._offsetAttribute})};var _0x275ddd=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x230a01=_0x275ddd(void 0,(function(){return _0x230a01.toString().search("(((.+)+)+)+$").toString().constructor(_0x230a01).search("(((.+)+)+)+$")}));function _0x1fe166(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.radii=WebGLPlot.defaultValue(e.radii,new WebGLPlot.Cartesian3(1,1,1)),this.slicePartitions=WebGLPlot.defaultValue(e.slicePartitions,65),this.stackPartitions=WebGLPlot.defaultValue(e.stackPartitions,65),this.vertexFormat=WebGLPlot.defaultValue(e.vertexFormat,WebGLPlot.VertexFormat.DEFAULT),this._offsetAttribute=e.offsetAttribute,this._workerName="createPlotCustomRadarOutlineGeometry",this.point=e.point,this._positions=_0xa9749f(WebGLPlot.defaultValue(e.customPts,[])),this._positions_V=_0x5cddeb(WebGLPlot.defaultValue(e.customPts,[]));var t=e.colors,i=WebGLPlot.defaultValue(e.outlineWidth,1),n=WebGLPlot.defaultValue(e.hMax,-1),r=WebGLPlot.defaultValue(e.colorsPerVertex,!1);if(!WebGLPlot.defined(this._positions)||this._positions.length<2)throw new WebGLPlot.DeveloperError("At least two positions are required.");if("number"!=typeof i)throw new WebGLPlot.DeveloperError("width must be a number");if(WebGLPlot.defined(t)&&(r&&t.length<this._positions.length||!r&&t.length<this._positions.length-1))throw new WebGLPlot.DeveloperError("colors has an invalid length.");this._colors=t,this._width=i,this._hMax=n,this._colorsPerVertex=r,this._dist=e.dist,this._period=e.period,this._vertexFormat=WebGLPlot.VertexFormat.clone(WebGLPlot.defaultValue(e.vertexFormat,WebGLPlot.VertexFormat.DEFAULT)),this._followSurface=WebGLPlot.defaultValue(e.followSurface,!0),WebGLPlot.defined(e.followSurface)&&(WebGLPlot.deprecationWarning("PlotCustomRadarOutlineGeometry.followSurface","PlotCustomRadarOutlineGeometry.followSurface is deprecated and will be removed in SuperMap3D. Use PlotCustomRadarOutlineGeometry.arcType instead."),e.arcType=e.followSurface?WebGLPlot.ArcType.GEODESIC:WebGLPlot.ArcType.NONE),this._arcType=WebGLPlot.defaultValue(e.arcType,WebGLPlot.ArcType.GEODESIC),this._followSurface=this._arcType!==WebGLPlot.ArcType.NONE,this._granularity=WebGLPlot.defaultValue(e.granularity,WebGLPlot.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=WebGLPlot.Ellipsoid.clone(WebGLPlot.defaultValue(e.ellipsoid,WebGLPlot.Ellipsoid.WGS84));var o=1+this._positions.length*WebGLPlot.Cartesian3.packedLength;o+=WebGLPlot.defined(t)?1+t.length*WebGLPlot.Color.packedLength:1,this.packedLength=o+WebGLPlot.Ellipsoid.packedLength+WebGLPlot.VertexFormat.packedLength+4+2}_0x230a01(),_0x1fe166.pack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("value is required");if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("array is required");i=WebGLPlot.defaultValue(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=WebGLPlot.Cartesian3.packedLength)WebGLPlot.Cartesian3.pack(r[n],t,i);var a=e._colors;for(o=WebGLPlot.defined(a)?a.length:0,t[i++]=o,n=0;n<o;++n,i+=WebGLPlot.Color.packedLength)WebGLPlot.Color.pack(a[n],t,i);return WebGLPlot.Ellipsoid.pack(e._ellipsoid,t,i),i+=WebGLPlot.Ellipsoid.packedLength,WebGLPlot.VertexFormat.pack(e._vertexFormat,t,i),i+=WebGLPlot.VertexFormat.packedLength,t[i++]=e._width,t[i++]=e._colorsPerVertex?1:0,t[i++]=e._arcType,t[i++]=e._granularity,t[i++]=e._hMax,t[i++]=e._dist,t[i]=e._period,t};var _0x58b0dd=WebGLPlot.Ellipsoid.clone(WebGLPlot.Ellipsoid.UNIT_SPHERE),_0x5e81ec=new WebGLPlot.VertexFormat,_0x498fc1={positions:void 0,colors:void 0,ellipsoid:_0x58b0dd,vertexFormat:_0x5e81ec,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};_0x1fe166.unpack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("array is required");t=WebGLPlot.defaultValue(t,0);var n,r=e[t++],o=new Array(r);for(n=0;n<r;++n,t+=WebGLPlot.Cartesian3.packedLength)o[n]=WebGLPlot.Cartesian3.unpack(e,t);var a=(r=e[t++])>0?new Array(r):void 0;for(n=0;n<r;++n,t+=WebGLPlot.Color.packedLength)a[n]=WebGLPlot.Color.unpack(e,t);var s=WebGLPlot.Ellipsoid.unpack(e,t,_0x58b0dd);t+=WebGLPlot.Ellipsoid.packedLength;var l=WebGLPlot.VertexFormat.unpack(e,t,_0x5e81ec);t+=WebGLPlot.VertexFormat.packedLength;var u=e[t++],c=1===e[t++],h=e[t++],d=e[t++],f=e[t++],p=1==e[t++],_=e[t];return WebGLPlot.defined(i)?(i._positions=o,i._colors=a,i._ellipsoid=WebGLPlot.Ellipsoid.clone(s,i._ellipsoid),i._vertexFormat=WebGLPlot.VertexFormat.clone(l,i._vertexFormat),i._width=u,i._colorsPerVertex=c,i._arcType=h,i._granularity=d,i._hMax=f,i._dist=p,i._period=_,i):(_0x498fc1.positions=o,_0x498fc1.colors=a,_0x498fc1.width=u,_0x498fc1.colorsPerVertex=c,_0x498fc1.arcType=h,_0x498fc1.granularity=d,_0x498fc1.hMax=f,_0x498fc1.dist=p,_0x498fc1.period=_,new _0x1fe166(_0x498fc1))};var _0x264f0a=new WebGLPlot.Cartesian3,_0x1790af=new WebGLPlot.Cartesian3,_0x5c0c4d=new WebGLPlot.Cartesian3,_0x46a160=new WebGLPlot.Cartesian3;function _0x5cddeb(e){if(!e||e.length<=0)return[];let t=!1,i=[],n=e.length,r=e[0].length;for(let o=0;o<r;o++){t=!1,o%2!=0&&(t=!0);for(let r=0;r<n;r++){let a=e[r];t&&(a=e[n-r-1]);let s=a[o];0===s.x&&(s.x=1e-10),0===s.y&&(s.y=1e-10),0===s.z&&(s.z=1e-10),i.push(s)}}return i}function _0xa9749f(e){if(!e||e.length<=0)return[];let t=!1,i=[],n=e.length,r=e[0].length;for(let o=0;o<n;o++){t=!1;const n=e[o];o%2==0&&(t=!0);for(let e=0;e<r;e++){let o;o=t?n[r-e-1]:n[e],0===o.x&&(o.x=1e-10),0===o.y&&(o.y=1e-10),0===o.z&&(o.z=1e-10),i.push(o)}}return i}_0x1fe166.createGeometry=function(e){let t=[],i=_0x1fe166.createGeometry_H(e);i&&t.push(i);let n=_0x1fe166.createGeometry_V(e);return n&&t.push(n),t},_0x1fe166.createGeometry_V=function(e){var t,i,n=e._width,r=e._hMax,o=e._vertexFormat,a=e._colors,s=e._colorsPerVertex,l=e._dist,u=e._period,c=e._positions_V,h=c.length;if(!(h<2||n<=0)){var d,f=4*(h=c.length)-4,p=new Float64Array(3*f),_=new Float64Array(3*f),m=new Float64Array(3*f),$=new Float32Array(2*f),g=o.st?new Float32Array(2*f):void 0,y=WebGLPlot.defined(a)?new Uint8Array(4*f):void 0,v=l?new Float32Array(3*f):void 0,x=0,b=0,S=0,w=0,C=0,T=0;for(t=0;t<h;++t){var P,E;0===t?(d=_0x264f0a,WebGLPlot.Cartesian3.subtract(c[0],c[1],d),WebGLPlot.Cartesian3.add(c[0],d,d)):d=c[t-1],WebGLPlot.Cartesian3.clone(d,_0x5c0c4d),WebGLPlot.Cartesian3.clone(c[t],_0x1790af),t===h-1?(d=_0x264f0a,WebGLPlot.Cartesian3.subtract(c[h-1],c[h-2],d),WebGLPlot.Cartesian3.add(c[h-1],d,d)):d=c[t+1],WebGLPlot.Cartesian3.clone(d,_0x46a160),WebGLPlot.defined(y)&&(P=0===t||s?a[t]:a[t-1],t!==h-1&&(E=a[t]));var A=t===h-1?2:4;for(i=0===t?2:0;i<A;++i){WebGLPlot.Cartesian3.pack(_0x1790af,p,x),WebGLPlot.Cartesian3.pack(_0x5c0c4d,_,x),WebGLPlot.Cartesian3.pack(_0x46a160,m,x),x+=3;var L=i-2<0?-1:1,M=i%2*2-1,I=M*t/h;if($[b++]=r>0?I:M,$[b++]=L*n,o.st&&(g[S++]=t/(h-1),g[S++]=Math.max($[b-2],0)),WebGLPlot.defined(y)){var O=i<2?P:E;y[w++]=WebGLPlot.Color.floatToByte(O.red),y[w++]=WebGLPlot.Color.floatToByte(O.green),y[w++]=WebGLPlot.Color.floatToByte(O.blue),y[w++]=WebGLPlot.Color.floatToByte(O.alpha)}l&&(v[3*C]=T,C++)}T+=WebGLPlot.Cartesian3.distance(d,c[t])}if(l){var D=T,R=Math.random()*(u>0?u:D);for(t=0;t<f;t++)v[3*t+1]=D,v[3*t+2]=R}var N=new WebGLPlot.GeometryAttributes;N.position=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p}),N.prevPosition=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:_}),N.nextPosition=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:m}),N.expandAndWidth=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:$}),o.st&&(N.st=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:g})),WebGLPlot.defined(y)&&(N.color=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:y,normalize:!0})),l&&(N.dist=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:v}));var F=WebGLPlot.IndexDatatype.createTypedArray(f,2*(6*h-6)),B=0,z=0,G=h-1;for(t=0;t<2*G-1;++t)F[z++]=B,F[z++]=B+2,F[z++]=B+1,F[z++]=B+1,F[z++]=B+2,F[z++]=B+3,B+=2;return new WebGLPlot.Geometry({attributes:N,indices:F,primitiveType:WebGLPlot.PrimitiveType.TRIANGLES,boundingSphere:WebGLPlot.BoundingSphere.fromPoints(c),geometryType:WebGLPlot.GeometryType.POLYLINES})}},_0x1fe166.createGeometry_H=function(e){var t=e._width,i=e._hMax,n=e._vertexFormat,r=e._colors,o=e._colorsPerVertex;e._arcType,e._granularity,e._ellipsoid;var a,s,l=e._dist,u=e._period,c=e._positions,h=c.length;if(!(h<2||t<=0)){var d,f=4*(h=c.length)-4,p=new Float64Array(3*f),_=new Float64Array(3*f),m=new Float64Array(3*f),$=new Float32Array(2*f),g=n.st?new Float32Array(2*f):void 0,y=WebGLPlot.defined(r)?new Uint8Array(4*f):void 0,v=l?new Float32Array(3*f):void 0,x=0,b=0,S=0,w=0,C=0,T=0;for(a=0;a<h;++a){var P,E;0===a?(d=_0x264f0a,WebGLPlot.Cartesian3.subtract(c[0],c[1],d),WebGLPlot.Cartesian3.add(c[0],d,d)):d=c[a-1],WebGLPlot.Cartesian3.clone(d,_0x5c0c4d),WebGLPlot.Cartesian3.clone(c[a],_0x1790af),a===h-1?(d=_0x264f0a,WebGLPlot.Cartesian3.subtract(c[h-1],c[h-2],d),WebGLPlot.Cartesian3.add(c[h-1],d,d)):d=c[a+1],WebGLPlot.Cartesian3.clone(d,_0x46a160),WebGLPlot.defined(y)&&(P=0===a||o?r[a]:r[a-1],a!==h-1&&(E=r[a]));var A=a===h-1?2:4;for(s=0===a?2:0;s<A;++s){WebGLPlot.Cartesian3.pack(_0x1790af,p,x),WebGLPlot.Cartesian3.pack(_0x5c0c4d,_,x),WebGLPlot.Cartesian3.pack(_0x46a160,m,x),x+=3;var L=s-2<0?-1:1,M=s%2*2-1,I=M*a/h;if($[b++]=i>0?I:M,$[b++]=L*t,n.st&&(g[S++]=a/(h-1),g[S++]=Math.max($[b-2],0)),WebGLPlot.defined(y)){var O=s<2?P:E;y[w++]=WebGLPlot.Color.floatToByte(O.red),y[w++]=WebGLPlot.Color.floatToByte(O.green),y[w++]=WebGLPlot.Color.floatToByte(O.blue),y[w++]=WebGLPlot.Color.floatToByte(O.alpha)}l&&(v[3*C]=T,C++)}T+=WebGLPlot.Cartesian3.distance(d,c[a])}if(l){var D=T,R=Math.random()*(u>0?u:D);for(a=0;a<f;a++)v[3*a+1]=D,v[3*a+2]=R}var N=new WebGLPlot.GeometryAttributes;N.position=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p}),N.prevPosition=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:_}),N.nextPosition=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:m}),N.expandAndWidth=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:$}),n.st&&(N.st=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:g})),WebGLPlot.defined(y)&&(N.color=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:y,normalize:!0})),l&&(N.dist=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:v}));var F=new Array,B=0,z=0,G=2*h-3;for(a=1;a<G;++a)F[z++]=B,F[z++]=B+2,F[z++]=B+1,F[z++]=B+1,F[z++]=B+2,F[z++]=B+3,B+=2;return new WebGLPlot.Geometry({attributes:N,indices:F,primitiveType:WebGLPlot.PrimitiveType.TRIANGLES,boundingSphere:WebGLPlot.BoundingSphere.fromPoints(c),geometryType:WebGLPlot.GeometryType.POLYLINES})}};const _0x498559=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x412946=_0x498559(void 0,(function(){return _0x412946.toString().search("(((.+)+)+)+$").toString().constructor(_0x412946).search("(((.+)+)+)+$")}));_0x412946();class _0x508ffd extends _0x3c19a2{constructor(e,t){if(!WebGLPlot$g.defined(t))throw new WebGLPlot$g.DeveloperError("PlotRotateRadar scene is required.");super(e,t),this.PlotRadarType=_0x1416c0.PlotRotateRadar,this._primitiveScnaFillArry=[],this._primitiveScnaOutLineArry=[],this._scanArray=[],this._merge(e),this._add2Scene()}getScanArray(){return this._scanArray}setScanArray(e){this.removeAllScanArray();for(let t=0;t<e.length;t++){const i=e[t];i instanceof _0x5a9732&&this._scanArray.push(i)}return this._createScanGeoArray(),this._scanArray}addScan(e){(!e||!(e instanceof _0x5a9732))&&(e=new _0x5a9732(this)),this._scanArray.push(e),this._createScanGeoArray()}removeAllScanArray(){this._removeAllScanArrayPrimitive(),this._scanArray=[]}removeScan(e){if(this._primitiveScnaFillArry.length>e){let t=this._primitiveScnaFillArry[e];this._primitives.removeAndDestroy(t),t=void 0,this._primitiveScnaFillArry.splice(e,1)}if(this._primitiveScnaOutLineArry.length>e){let t=this._primitiveScnaOutLineArry[e];this._primitives.removeAndDestroy(t),t=void 0,this._primitiveScnaOutLineArry.splice(e,1)}return this._scanArray.length>e&&(this._scanArray.splice(e,1),this._createScanGeoArray(),!0)}setScan(e,t){return e instanceof _0x5a9732&&(this.removeScan(t),this._scanArray.splice(t,0,e),this._createScanGeoArray(),!0)}destroy(){this._isNeedUpdate=!1,this._primitive&&this._primitives.removeAndDestroy(this._primitive),this._outlinePrimitive&&this._primitives.removeAndDestroy(this._outlinePrimitive),this._scanArray&&this._scanArray.length>0&&(this._scanArray.forEach((e=>{e.destroy()})),this._scanArray=[]),this.removeAllScanArray()}_updated(e){this._isNeedUpdate&&(this._isNeedUpdate=!1,this._createRadarPrimitive(),this._createScanGeoArray());const t=this._dScanSpeed*e/1e3;this._updated_Scan(-t)}_add2Scene(){this._createRadarPrimitive(),this.isShowScan&&this._createScan()}_createScan(){if(this.removeAllScanArray(),!this.isShowScan||!this.show)return;const e=this.rotateAngle/this.scanCount;for(let n=0;n<this.scanCount;n++){var t=new _0x5a9732(this),i=new WebGLPlot$g.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-e*n);t._rotate=i,t.material=this.scanColor,this._scanArray.push(t),this._createScanPrimitive(t,n)}}_updated_Scan(e){if(this.isShowScan&&this.show)for(let n=0;n<this._scanArray.length;n++){var t=this._scanArray[n];this.rotateAngle>=WebGLPlot$g.CesiumMath.TWO_PI?(t._rotate.z+=e,Math.abs(t._rotate.z)>=WebGLPlot$g.CesiumMath.TWO_PI&&(t._rotate.z=t._rotate.z%WebGLPlot$g.CesiumMath.TWO_PI)):(t.__bIsBack_?t._rotate.z-=e:t._rotate.z+=e,-t._rotate.z>=this.rotateAngle-this._rotate.z-t.scanAngle/2?t.__bIsBack_=!0:-t._rotate.z<=-this._rotate.z&&(t.__bIsBack_=!1));var i=new WebGLPlot$g.HeadingPitchRoll(-1*this._rotate.z,-1*this._rotate.y,this._rotate.x);const r=WebGLPlot$g.Cartesian3.fromDegrees(t.point.x+this.offset.x,t.point.y+this.offset.y,t.point.z+this.offset.z),o=WebGLPlot$g.Transforms.headingPitchRollToFixedFrame(r,i);let a=WebGLPlot$g.Matrix3.fromRotationZ(this._rotate.z-t._rotate.z),s=WebGLPlot$g.Matrix4.multiplyByMatrix3(o,a,new WebGLPlot$g.Matrix4);this._primitiveScnaFillArry[n]&&(this._primitiveScnaFillArry[n].modelMatrix=s),this._primitiveScnaOutLineArry[n]&&(this._primitiveScnaOutLineArry[n].modelMatrix=s)}}_removeAllScanArrayPrimitive(){if(this._primitiveScnaFillArry.length>0){for(let e=0;e<this._primitiveScnaFillArry.length;e++){let t=this._primitiveScnaFillArry[e];this._primitives.removeAndDestroy(t),t=void 0}this._primitiveScnaFillArry=[]}if(this._primitiveScnaOutLineArry.length>0){for(let e=0;e<this._primitiveScnaOutLineArry.length;e++){let t=this._primitiveScnaOutLineArry[e];this._primitives.removeAndDestroy(t),t=void 0}this._primitiveScnaOutLineArry=[]}}_createRadarFillGeometry(e){return e||(e=this),_0x45871f.createGeometry(new _0x45871f({customPts:e._radarPts,slicePartitions:e.slicePartitions,stackPartitions:e._radarPts.length,radii:e.radii}),e.isClose)}_createRadarOutLineGeometry(e){return e||(e=this),_0x1fe166.createGeometry(new _0x1fe166({customPts:e._radarPts,slicePartitions:e.slicePartitions,stackPartitions:e._radarPts.length,radii:e.radii,outlineWidth:e.outlineWidth}),e.isClose)}_createScanGeoArray(){this._removeAllScanArrayPrimitive();const e=this.rotateAngle/this._scanArray.length;for(let n=0;n<this._scanArray.length;n++){var t=this._scanArray[n],i=new WebGLPlot$g.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-e*n);t._rotate=i,this._createScanPrimitive(t,n)}}_computerRadarPts(){if(this._customPts.length<3)throw new WebGLPlot$g.defined("PlotRotateRadar Property customPts.length < 3.");let e=[];for(let n=0;n<this._customPts.length;n++){const r=this._customPts[n],o=this.rotateAngle/(this.slicePartitions-1);for(var t=[],i=0;i<this.slicePartitions;i++){const e=i*o;t.push(new WebGLPlot$g.Cartesian3(r.x*Math.cos(e),r.x*Math.sin(e),r.y))}e.push(t)}return e}_merge(e){this.scanCount=WebGLPlot$g.defaultValue(e.scanCount,1),this._isShowScan=WebGLPlot$g.defaultValue(e.isShowScan,!1),this.scanColor=WebGLPlot$g.defaultValue(e.scanColor,new WebGLPlot$g.Color(1,0,0,.5)),e.dScanSpeed?this._dScanSpeed=WebGLPlot$g.CesiumMath.toRadians(e.dScanSpeed):this._dScanSpeed=WebGLPlot$g.CesiumMath.toRadians(20),e.rotateAngle?this.rotateAngle=WebGLPlot$g.CesiumMath.toRadians(e.rotateAngle):this.rotateAngle=WebGLPlot$g.CesiumMath.toRadians(360),this.isClose=this.rotateAngle%WebGLPlot$g.CesiumMath.TWO_PI==0,e.rotate?this._rotate=new WebGLPlot$g.Cartesian3(WebGLPlot$g.CesiumMath.toRadians(e.rotate.x),WebGLPlot$g.CesiumMath.toRadians(e.rotate.y),WebGLPlot$g.CesiumMath.toRadians(e.rotate.z-45)):this._rotate=new WebGLPlot$g.Cartesian3(0,0,-45),this._radarPts=this._computerRadarPts()}}Object.defineProperties(_0x508ffd.prototype,{customPts:{get:function(){return this._customPts},set:function(e){Array.isArray(e)&&(this._customPts=e,this._radarPts=this._computerRadarPts())}},rotate:{get:function(){return new WebGLPlot$g.Cartesian3(WebGLPlot$g.CesiumMath.toDegrees(this._rotate.x),WebGLPlot$g.CesiumMath.toDegrees(this._rotate.y),WebGLPlot$g.CesiumMath.toDegrees(this._rotate.z)+45)},set:function(e){if(e instanceof WebGLPlot$g.Cartesian3||e instanceof PlotPoint3D){e.z<0&&(e.z+=360);let t=new WebGLPlot$g.Cartesian3(WebGLPlot$g.CesiumMath.toRadians(e.x),WebGLPlot$g.CesiumMath.toRadians(e.y),WebGLPlot$g.CesiumMath.toRadians(e.z-45));WebGLPlot$g.Cartesian3(t,this._rotate)||(this._rotate=t,this._updatedRadarPrimitive())}}}});const _0x32eede=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x173004=_0x32eede(void 0,(function(){return _0x173004.toString().search("(((.+)+)+)+$").toString().constructor(_0x173004).search("(((.+)+)+)+$")}));_0x173004();class _0x1662dc extends _0x508ffd{constructor(e,t){if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("PlotMechanicalRadar scene is required.");e.rotateAngle=360,e.scale=WebGLPlot.defaultValue(e.scale,1),e.radii=WebGLPlot.defaultValue(e.radii,new WebGLPlot.Cartesian3(1e4,1e4,1e4)),e.cellAngle=WebGLPlot.defaultValue(e.cellAngle,5),e.customPts=_0x19738f(e.radii.x/10*e.scale),e.slicePartitions=e.rotateAngle/e.cellAngle,super(e,t),this.PlotRadarType=_0x1416c0.PlotMechanicalRadar}}function _0x19738f(e){var t=[];return t.push(new WebGLPlot.Cartesian3(0,0,0)),t.push(new WebGLPlot.Cartesian3(1.10296043731977*e,.046804145634484*e,0)),t.push(new WebGLPlot.Cartesian3(2.21610390044188*e,.11759698792659*e,0)),t.push(new WebGLPlot.Cartesian3(3.23948463412258*e,.207919742367934*e,0)),t.push(new WebGLPlot.Cartesian3(4.24306826853316*e,.304605633553736*e,0)),t.push(new WebGLPlot.Cartesian3(5.07593366806073*e,.449055607644075*e,0)),t.push(new WebGLPlot.Cartesian3(6.09774013826592*e,.626275021765735*e,0)),t.push(new WebGLPlot.Cartesian3(6.82649676873021*e,.854033937659516*e,0)),t.push(new WebGLPlot.Cartesian3(7.59836360255064*e,1.13340451890574*e,0)),t.push(new WebGLPlot.Cartesian3(8.12046765798091*e,1.39526442140232*e,0)),t.push(new WebGLPlot.Cartesian3(8.77215268479149*e,1.76316819829927*e,0)),t.push(new WebGLPlot.Cartesian3(9.24420050024946*e,2.26394442518268*e,0)),t.push(new WebGLPlot.Cartesian3(9.41437066670075*e,2.78004341750028*e,0)),t.push(new WebGLPlot.Cartesian3(9.37677016147896*e,3.37826190260998*e,0)),t.push(new WebGLPlot.Cartesian3(9.02402463279236*e,4.05665157036142*e,0)),t.push(new WebGLPlot.Cartesian3(8.49067600110484*e,4.52027646588052*e,0)),t.push(new WebGLPlot.Cartesian3(7.93178024681909*e,4.83964546832953*e,0)),t.push(new WebGLPlot.Cartesian3(7.37859457443028*e,4.95818525526998*e,0)),t.push(new WebGLPlot.Cartesian3(6.73933014626123*e,4.97031713954619*e,0)),t.push(new WebGLPlot.Cartesian3(6.1144105659988*e,4.8548345993221*e,0)),t.push(new WebGLPlot.Cartesian3(5.51606295388907*e,4.68304158511523*e,0)),t.push(new WebGLPlot.Cartesian3(4.84103177562709*e,4.34900006813962*e,0)),t.push(new WebGLPlot.Cartesian3(4.09846873384157*e,3.95082720446673*e,0)),t.push(new WebGLPlot.Cartesian3(3.26846203349058*e,3.4279079135254*e,0)),t.push(new WebGLPlot.Cartesian3(2.2493811983941*e,2.68004157158963*e,0)),t.push(new WebGLPlot.Cartesian3(1.43802404023069*e,1.88816148893958*e,0)),t.push(new WebGLPlot.Cartesian3(.67580571600966*e,.925081705540024*e,0)),t.push(new WebGLPlot.Cartesian3(0,0,0)),t}Object.defineProperties(_0x1662dc.prototype,{radii:{get:function(){return this._radii},set:function(e){if((e instanceof WebGLPlot.Cartesian3||e instanceof _0x45ea17)&&!_0x45ea17.equals(e,this._radii)){this._radii=e.clone(),this.customPts=_0x19738f(this._radii.x/10*this._scale);for(let e=0;e<this._scanArray.length;e++)this._scanArray[e]._computeScanPts(this);this._isNeedUpdate=!0}}},scale:{get:function(){return this._scale},set:function(e){if("number"==typeof e&&this._scale!==e){this._scale=e,this.customPts=_0x19738f(this._radii.x/10*e);for(let e=0;e<this._scanArray.length;e++)this._scanArray[e]._computeScanPts(this);this._isNeedUpdate=!0}}}});const _0x3382e4=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x2f46aa=_0x3382e4(void 0,(function(){return _0x2f46aa.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f46aa).search("(((.+)+)+)+$")}));_0x2f46aa();class _0x2cd796 extends _0x24ebc9{constructor(e){super(e),e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._radarType=_0x1416c0.PlotMechanicalRadar,this._name=WebGLPlot$g.defaultValue(e.name,_0x5f28ea.getDefaultName({effectType:this._type,radarType:this._radarType})),this._UUID="GeoEntityEffectMechanicalRadar_"+WebGLPlot$g.createGuid(),this._pntOffset=WebGLPlot$g.defaultValue(e.pntOffset,new _0x45ea17(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$g.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot$g.defaultValue(e.radius,15e4),this._mechanicalRadar=null,this._cellAngle=5,this._isShowScan=!0}setGeoEntityParameter(e,t){if(WebGLPlot$g.defined(this._mechanicalRadar)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()){let t=_0x1569f6.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$g.defined(t)&&(this._mechanicalRadar.point=t)}if(e.getShowMode()==_0x3f7d9f.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())&&(this._mechanicalRadar.rotate=e.getModelRotate()),e.getShowMode()==_0x3f7d9f.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$g.defined(this._geoEntityParameter)||!WebGLPlot$g.defined(this._pntOffset))return null;let t=_0x1569f6.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$g.defined(t))return null;let i=new _0x45ea17(0,0,0);if(this._geoEntityParameter.getShowMode()==_0x3f7d9f.Marker&&(i=this._geoEntityParameter.getModelRotate()),this._mechanicalRadar=new _0x1662dc({id:this._UUID,point:t,rotate:new WebGLPlot$g.Cartesian3(i.x,i.y,i.z),dScanSpeed:this._scanSpeed,shadows:this._shadows,cellAngle:this._cellAngle,radii:new WebGLPlot$g.Cartesian3(this._radius,this._radius,this._radius),isFill:this._isFill,fillColor:this._fillColor,isOutline:this._isOutline,outlineColor:this._outlineColor,outlineWidth:1,isShowScan:this._isShowScan,scanCount:this._arrGeoEntityEffectRadarScans.length,scanColor:this._scanColor,show:!0},e),!WebGLPlot$g.defined(this._mechanicalRadar))return!1;let n=this._mechanicalRadar.getScanArray();for(let e=0;e<n.length;e++)this._arrGeoEntityEffectRadarScans[e]._updateScan(n[e]);return this._mechanicalRadar.setScanArray(n),this._initialized=!0,!0}_removeEffectFromScene(e){WebGLPlot$g.defined(this._mechanicalRadar)&&(this._mechanicalRadar.destroy(),this._mechanicalRadar=null)}toJSON(){let e=super.toJSON(),t=JSON.parse(e);return t.hasOwnProperty("radarType")||(t.radarType=this._radarType),t.hasOwnProperty("radius")||(t.radius=this._radius),JSON.stringify(t)}fromJSON(e){super.fromJSON(e);let t=JSON.parse(e);WebGLPlot$g.defined(t.radarType)&&(this._radarType=t.radarType),WebGLPlot$g.defined(t.radius)&&(this._radius=t.radius)}clone(){let e=new _0x2cd796;e._UUID=this._UUID,e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x45ea17(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._scanSpeed=this._scanSpeed,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth;let t=[];for(let e=0;e<this._arrGeoEntityEffectRadarScans.length;e++)t.push(this._arrGeoEntityEffectRadarScans[e].clone());return e._arrGeoEntityEffectRadarScans=t,e._radarType=this._radarType,e._radius=this._radius,e}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}}const _0x1e89b1=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x332320=_0x1e89b1(void 0,(function(){return _0x332320.toString().search("(((.+)+)+)+$").toString().constructor(_0x332320).search("(((.+)+)+)+$")}));_0x332320();class _0x20496d extends _0x3c19a2{constructor(e){if(super(e),this.PlotRadarType="PlotParameterRadarScan",this.scale=WebGLPlot.defaultValue(e.scale,1),this.radii=WebGLPlot.defaultValue(e.radii,0),this.innerRadii=WebGLPlot.defaultValue(e.innerRadii,0),this._minimumClock=WebGLPlot.CesiumMath.toRadians(0),this._maximumClock=WebGLPlot.CesiumMath.toRadians(5),this._minimumCone=WebGLPlot.defaultValue(e._minimumCone,0),this._maximumCone=WebGLPlot.defaultValue(e._maximumCone,WebGLPlot.CesiumMath.PI),this.heightReference=WebGLPlot.defaultValue(e.heightReference,void 0),this.subdivisions=WebGLPlot.defaultValue(e.subdivisions,128),this.shadows=WebGLPlot.defaultValue(e.shadows,WebGLPlot.ShadowMode.DISABLED),this.distanceDisplayCondition=WebGLPlot.defaultValue(e.distanceDisplayCondition,new WebGLPlot.DistanceDisplayConditionGeometryInstanceAttribute),this.scanCount=WebGLPlot.defaultValue(e.scanCount,1),this.isShowScan=WebGLPlot.defaultValue(e.isShowScan,!1),this.scanColor=WebGLPlot.defaultValue(e.scanColor,new WebGLPlot.Color(1,0,0,1)),this.__bIsBack_=void 0,this._minimumClock>this._maximumClock){let e=this._minimumClock;this._minimumClock=this._maximumClock,this._maximumClock=e}this.scanAngle=this._maximumClock-this._minimumClock,"PlotParameterRadar"===e.PlotRadarType&&(this.isOutline=!1),e instanceof _0x3c19a2&&(this.__parent=e)}clone(e){return WebGLPlot.defined(e)?(e.id=this.id,e.point=this.point.clone(),e.rotate=this.rotate.clone(),e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e._minimumClock=this._minimumClock,e._maximumClock=this._maximumClock,e._minimumCone=this._minimumCone,e._maximumCone=this._maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.subdivisions=this.subdivisions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new _0x20496d(this)}}var _0x4c676b=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x295610=_0x4c676b(void 0,(function(){return _0x295610.toString().search("(((.+)+)+)+$").toString().constructor(_0x295610).search("(((.+)+)+)+$")}));_0x295610();var _0x4bde4f=new WebGLPlot.Cartesian3,_0x5c8316=new WebGLPlot.Cartesian3,_0x246886=new WebGLPlot.Cartesian3,_0x2aa34f=new WebGLPlot.Cartesian3,_0x4cb70c=new WebGLPlot.Cartesian3,_0x2ad5e6=new WebGLPlot.Cartesian3(1,1,1),_0x2ca077=Math.cos,_0x16799f=Math.sin;function _0x29734f(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT);var t=WebGLPlot.defaultValue(e.scale,1),i=WebGLPlot.defaultValue(e.radii,_0x2ad5e6),n=WebGLPlot.defaultValue(e.innerRadii,i),r=WebGLPlot.defaultValue(e._minimumClock,0),o=WebGLPlot.defaultValue(e._maximumClock,WebGLPlot.CesiumMath.TWO_PI),a=WebGLPlot.defaultValue(e._minimumCone,0),s=WebGLPlot.defaultValue(e._maximumCone,WebGLPlot.CesiumMath.PI),l=Math.round(WebGLPlot.defaultValue(e.stackPartitions,64)),u=Math.round(WebGLPlot.defaultValue(e.slicePartitions,64)),c=WebGLPlot.defaultValue(e.vertexFormat,WebGLPlot.VertexFormat.DEFAULT);if(u<3)throw new WebGLPlot.DeveloperError("options.slicePartitions cannot be less than three.");if(l<3)throw new WebGLPlot.DeveloperError("options.stackPartitions cannot be less than three.");this._radii=new WebGLPlot.Cartesian3(i.x*t,i.y*t,i.z*t),this._innerRadii=new WebGLPlot.Cartesian3(n.x*t,n.y*t,n.z*t),this._minimumClock=r,this._maximumClock=o,this._minimumCone=a,this._maximumCone=s,this._stackPartitions=l,this._slicePartitions=u,this._vertexFormat=WebGLPlot.VertexFormat.clone(c),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidGeometry"}_0x29734f.packedLength=2*WebGLPlot.Cartesian3.packedLength+WebGLPlot.VertexFormat.packedLength+7,_0x29734f.pack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("value is required");if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("array is required");return i=WebGLPlot.defaultValue(i,0),WebGLPlot.Cartesian3.pack(e._radii,t,i),i+=WebGLPlot.Cartesian3.packedLength,WebGLPlot.Cartesian3.pack(e._innerRadii,t,i),i+=WebGLPlot.Cartesian3.packedLength,WebGLPlot.VertexFormat.pack(e._vertexFormat,t,i),i+=WebGLPlot.VertexFormat.packedLength,t[i++]=e._minimumClock,t[i++]=e._maximumClock,t[i++]=e._minimumCone,t[i++]=e._maximumCone,t[i++]=e._stackPartitions,t[i++]=e._slicePartitions,t[i]=WebGLPlot.defaultValue(e._offsetAttribute,-1),t};var _0x38e616=new WebGLPlot.Cartesian3,_0x35ecbe=new WebGLPlot.Cartesian3,_0x14853a=new WebGLPlot.VertexFormat,_0xa86f53={radii:_0x38e616,innerRadii:_0x35ecbe,vertexFormat:_0x14853a,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0},_0x1e7284;_0x29734f.unpack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("array is required");t=WebGLPlot.defaultValue(t,0);var n=WebGLPlot.Cartesian3.unpack(e,t,_0x38e616);t+=WebGLPlot.Cartesian3.packedLength;var r=WebGLPlot.Cartesian3.unpack(e,t,_0x35ecbe);t+=WebGLPlot.Cartesian3.packedLength;var o=WebGLPlot.VertexFormat.unpack(e,t,_0x14853a);t+=WebGLPlot.VertexFormat.packedLength;var a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return WebGLPlot.defined(i)?(i._radii=WebGLPlot.Cartesian3.clone(n,i._radii),i._innerRadii=WebGLPlot.Cartesian3.clone(r,i._innerRadii),i._vertexFormat=WebGLPlot.VertexFormat.clone(o,i._vertexFormat),i._minimumClock=a,i._maximumClock=s,i._minimumCone=l,i._maximumCone=u,i._stackPartitions=c,i._slicePartitions=h,i._offsetAttribute=-1===d?void 0:d,i):(_0xa86f53.minimumClock=a,_0xa86f53.maximumClock=s,_0xa86f53.minimumCone=l,_0xa86f53.maximumCone=u,_0xa86f53.stackPartitions=c,_0xa86f53.slicePartitions=h,_0xa86f53.offsetAttribute=-1===d?void 0:d,new _0x29734f(_0xa86f53))},_0x29734f.createGeometry=function(e){var t=e._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var i=e._innerRadii;if(!(i.x<=0||i.y<=0||i.z<=0)){var n=e._minimumClock,r=e._maximumClock,o=e._minimumCone,a=e._maximumCone,s=e._vertexFormat,l=e._slicePartitions+1,u=e._stackPartitions+1;(l=Math.round(l*Math.abs(r-n)/WebGLPlot.CesiumMath.TWO_PI))<2&&(l=2),(u=Math.round(u*Math.abs(a-o)/WebGLPlot.CesiumMath.PI))<2&&(u=2);var c,h,d=0,f=[o],p=[n];for(c=0;c<u;c++)f.push(o+c*(a-o)/(u-1));for(f.push(a),h=0;h<l;h++)p.push(n+h*(r-n)/(l-1));p.push(r);var _=f.length,m=p.length,$=0,g=1,y=i.x!==t.x||i.y!==t.y||i.z!==t.z,v=!1,x=!1,b=!1;y&&(g=2,o>0&&(v=!0,$+=l-1),a<WebGLPlot.CesiumMath.PI&&(x=!0,$+=l-1),(r-n)%WebGLPlot.CesiumMath.TWO_PI?(b=!0,$+=2*(u-1)+1):$+=1);var S=m*_*g,w=new Float64Array(3*S),C=WebGLPlot.arrayFill(new Array(S),!1),T=WebGLPlot.arrayFill(new Array(S),!1),P=l*u*g,E=6*(P+$+1-(l+u)*g),A=WebGLPlot.IndexDatatype.createTypedArray(P,E),L=s.normal?new Float32Array(3*S):void 0,M=s.tangent?new Float32Array(3*S):void 0,I=s.bitangent?new Float32Array(3*S):void 0,O=s.st?new Float32Array(2*S):void 0,D=new Array(_),R=new Array(_);for(c=0;c<_;c++)D[c]=_0x16799f(f[c]),R[c]=_0x2ca077(f[c]);var N=new Array(m),F=new Array(m);for(h=0;h<m;h++)F[h]=_0x2ca077(p[h]),N[h]=_0x16799f(p[h]);for(c=0;c<_;c++)for(h=0;h<m;h++)w[d++]=t.x*D[c]*F[h],w[d++]=t.y*D[c]*N[h],w[d++]=t.z*R[c];var B,z,G,k,U=S/2;if(y)for(c=0;c<_;c++)for(h=0;h<m;h++)w[d++]=i.x*D[c]*F[h],w[d++]=i.y*D[c]*N[h],w[d++]=i.z*R[c],C[U]=!0,c>0&&c!==_-1&&0!==h&&h!==m-1&&(T[U]=!0),U++;for(d=0,c=1;c<_-2;c++)for(B=c*m,z=(c+1)*m,h=1;h<m-2;h++)A[d++]=z+h,A[d++]=z+h+1,A[d++]=B+h+1,A[d++]=z+h,A[d++]=B+h+1,A[d++]=B+h;if(y){var V=_*m;for(c=1;c<_-2;c++)for(B=V+c*m,z=V+(c+1)*m,h=1;h<m-2;h++)A[d++]=z+h,A[d++]=B+h,A[d++]=B+h+1,A[d++]=z+h,A[d++]=B+h+1,A[d++]=z+h+1}if(y){if(v)for(k=_*m,c=1;c<m-2;c++)A[d++]=c,A[d++]=c+1,A[d++]=k+c+1,A[d++]=c,A[d++]=k+c+1,A[d++]=k+c;if(x)for(G=_*m-m,k=_*m*g-m,c=1;c<m-2;c++)A[d++]=G+c+1,A[d++]=G+c,A[d++]=k+c,A[d++]=G+c+1,A[d++]=k+c,A[d++]=k+c+1}if(b){for(c=1;c<_-2;c++)k=m*_+m*c,G=m*c,A[d++]=k,A[d++]=G+m,A[d++]=G,A[d++]=k,A[d++]=k+m,A[d++]=G+m;for(c=1;c<_-2;c++)k=m*_+m*(c+1)-1,G=m*(c+1)-1,A[d++]=G+m,A[d++]=k,A[d++]=G,A[d++]=G+m,A[d++]=k+m,A[d++]=k}var W=new WebGLPlot.GeometryAttributes;s.position&&(W.position=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:w}));var H,Y=0,j=0,q=0,X=0,K=S/2,Z=WebGLPlot.Ellipsoid.fromCartesian3(t),J=WebGLPlot.Ellipsoid.fromCartesian3(i);if(s.st||s.normal||s.tangent||s.bitangent){for(c=0;c<S;c++){H=C[c]?J:Z;var Q=WebGLPlot.Cartesian3.fromArray(w,3*c,_0x4bde4f),ee=H.geodeticSurfaceNormal(Q,_0x5c8316);if(T[c]&&WebGLPlot.Cartesian3.negate(ee,ee),s.st){var te=WebGLPlot.Cartesian2.negate(ee,_0x4cb70c);O[Y++]=Math.atan2(te.y,te.x)/WebGLPlot.CesiumMath.TWO_PI+.5,O[Y++]=Math.asin(ee.z)/WebGLPlot.CesiumMath.PI+.5}if(s.normal&&(L[j++]=ee.x,L[j++]=ee.y,L[j++]=ee.z),s.tangent||s.bitangent){var ie,ne=_0x246886,re=0;if(C[c]&&(re=K),ie=!v&&c>=re&&c<re+2*m?WebGLPlot.Cartesian3.UNIT_X:WebGLPlot.Cartesian3.UNIT_Z,WebGLPlot.Cartesian3.cross(ie,ee,ne),WebGLPlot.Cartesian3.normalize(ne,ne),s.tangent&&(M[q++]=ne.x,M[q++]=ne.y,M[q++]=ne.z),s.bitangent){var oe=WebGLPlot.Cartesian3.cross(ee,ne,_0x2aa34f);WebGLPlot.Cartesian3.normalize(oe,oe),I[X++]=oe.x,I[X++]=oe.y,I[X++]=oe.z}}}s.st&&(W.st=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:O})),s.normal&&(W.normal=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:L})),s.tangent&&(W.tangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:M})),s.bitangent&&(W.bitangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:I}))}if(WebGLPlot.defined(e._offsetAttribute)){var ae=w.length,se=new Uint8Array(ae/3),le=e._offsetAttribute===WebGLPlot.GeometryOffsetAttribute.NONE?0:1;WebGLPlot.arrayFill(se,le),W.applyOffset=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:se})}return new WebGLPlot.Geometry({attributes:W,indices:A,primitiveType:WebGLPlot.PrimitiveType.TRIANGLES,boundingSphere:WebGLPlot.BoundingSphere.fromEllipsoid(Z),offsetAttribute:e._offsetAttribute})}}},_0x29734f.getUnitEllipsoid=function(){return WebGLPlot.defined(_0x1e7284)||(_0x1e7284=_0x29734f.createGeometry(new _0x29734f({radii:new WebGLPlot.Cartesian3(1,1,1),vertexFormat:WebGLPlot.VertexFormat.POSITION_ONLY}))),_0x1e7284};var _0x3b5278=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2f6c70=_0x3b5278(void 0,(function(){return _0x2f6c70.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f6c70).search("(((.+)+)+)+$")}));_0x2f6c70();var _0x371179=new WebGLPlot.Cartesian3;new WebGLPlot.Cartesian3,new WebGLPlot.Cartesian3,new WebGLPlot.Cartesian3,new WebGLPlot.Cartesian3;var _0x1156e7=new WebGLPlot.Cartesian3(1,1,1),_0x3cc4a3=Math.cos,_0x16f313=Math.sin;function _0x2cfb49(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT);var t=WebGLPlot.defaultValue(e.scale,1),i=WebGLPlot.defaultValue(e.radii,_0x1156e7),n=WebGLPlot.defaultValue(e.innerRadii,i),r=WebGLPlot.defaultValue(e._minimumClock,0),o=WebGLPlot.defaultValue(e._maximumClock,WebGLPlot.CesiumMath.TWO_PI),a=WebGLPlot.defaultValue(e._minimumCone,0),s=WebGLPlot.defaultValue(e._maximumCone,WebGLPlot.CesiumMath.PI),l=Math.round(WebGLPlot.defaultValue(e.stackPartitions,64)),u=Math.round(WebGLPlot.defaultValue(e.slicePartitions,64)),c=WebGLPlot.defaultValue(e.vertexFormat,WebGLPlot.VertexFormat.DEFAULT),h=WebGLPlot.defaultValue(e.outlineWidth,1);if(this.colors=e.colors,this.hMax=WebGLPlot.defaultValue(e.hMax,-1),this.colorsPerVertex=WebGLPlot.defaultValue(e.colorsPerVertex,!1),this._dist=e.dist,this._period=e.period,u<3)throw new WebGLPlot.DeveloperError("options.slicePartitions cannot be less than three.");if(l<3)throw new WebGLPlot.DeveloperError("options.stackPartitions cannot be less than three.");this._radii=new WebGLPlot.Cartesian3(i.x*t,i.y*t,i.z*t),this._innerRadii=new WebGLPlot.Cartesian3(n.x*t,n.y*t,n.z*t),this._minimumClock=r,this._maximumClock=o,this._minimumCone=a,this._maximumCone=s,this._stackPartitions=l,this._slicePartitions=u,this._vertexFormat=WebGLPlot.VertexFormat.clone(c),this._offsetAttribute=e.offsetAttribute,this._width=h,this._workerName="createEllipsoidGeometry"}_0x2cfb49.packedLength=2*WebGLPlot.Cartesian3.packedLength+WebGLPlot.VertexFormat.packedLength+7,_0x2cfb49.pack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("value is required");if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("array is required");return i=WebGLPlot.defaultValue(i,0),WebGLPlot.Cartesian3.pack(e._radii,t,i),i+=WebGLPlot.Cartesian3.packedLength,WebGLPlot.Cartesian3.pack(e._innerRadii,t,i),i+=WebGLPlot.Cartesian3.packedLength,WebGLPlot.VertexFormat.pack(e._vertexFormat,t,i),i+=WebGLPlot.VertexFormat.packedLength,t[i++]=e._minimumClock,t[i++]=e._maximumClock,t[i++]=e._minimumCone,t[i++]=e._maximumCone,t[i++]=e._stackPartitions,t[i++]=e._slicePartitions,t[i]=WebGLPlot.defaultValue(e._offsetAttribute,-1),t};var _0x2205ff=new WebGLPlot.Cartesian3,_0x10e429=new WebGLPlot.Cartesian3,_0x138834=new WebGLPlot.VertexFormat,_0x1697c8={radii:_0x2205ff,innerRadii:_0x10e429,vertexFormat:_0x138834,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};_0x2cfb49.unpack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("array is required");t=WebGLPlot.defaultValue(t,0);var n=WebGLPlot.Cartesian3.unpack(e,t,_0x2205ff);t+=WebGLPlot.Cartesian3.packedLength;var r=WebGLPlot.Cartesian3.unpack(e,t,_0x10e429);t+=WebGLPlot.Cartesian3.packedLength;var o=WebGLPlot.VertexFormat.unpack(e,t,_0x138834);t+=WebGLPlot.VertexFormat.packedLength;var a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return WebGLPlot.defined(i)?(i._radii=WebGLPlot.Cartesian3.clone(n,i._radii),i._innerRadii=WebGLPlot.Cartesian3.clone(r,i._innerRadii),i._vertexFormat=WebGLPlot.VertexFormat.clone(o,i._vertexFormat),i._minimumClock=a,i._maximumClock=s,i._minimumCone=l,i._maximumCone=u,i._stackPartitions=c,i._slicePartitions=h,i._offsetAttribute=-1===d?void 0:d,i):(_0x1697c8.minimumClock=a,_0x1697c8.maximumClock=s,_0x1697c8.minimumCone=l,_0x1697c8.maximumCone=u,_0x1697c8.stackPartitions=c,_0x1697c8.slicePartitions=h,_0x1697c8.offsetAttribute=-1===d?void 0:d,new _0x2cfb49(_0x1697c8))};var _0x312f76=new WebGLPlot.Cartesian3,_0x371179=new WebGLPlot.Cartesian3,_0x29b736=new WebGLPlot.Cartesian3,_0xf72150=new WebGLPlot.Cartesian3;function _0x299624(e){if(!e||e.length<=0)return[];let t=!1,i=[],n=e.length,r=e[0].length;for(let o=1;o<r;o++){t=!1,o%2!=0&&(t=!0);for(let r=0;r<n;r++){let a=e[r];t&&(a=e[n-r-1]),i.push(a[o])}}return i}_0x2cfb49.createGeometry=function(e){let t=[],i=_0x2cfb49.createGeometry_H(e);i&&t.push(i);let n=_0x2cfb49.createGeometry_V(e);return n&&t.push(n),t},_0x2cfb49.createGeometry_V=function(e){var t=e._width,i=e._hMax,n=e._vertexFormat,r=e._colors,o=e._colorsPerVertex;e._arcType,e._granularity,e._ellipsoid;var a,s=e._dist,l=e._period,u=e._radii;if(!(u.x<=0||u.y<=0||u.z<=0)){var c=e._innerRadii;if(!(c.x<=0||c.y<=0||c.z<=0)){var h=e._minimumClock,d=e._maximumClock,f=e._minimumCone,p=e._maximumCone,_=(n=e._vertexFormat,e._slicePartitions+1),m=e._stackPartitions+1;(_=Math.round(_*Math.abs(d-h)/WebGLPlot.CesiumMath.TWO_PI))<2&&(_=2),(m=Math.round(m*Math.abs(p-f)/WebGLPlot.CesiumMath.PI))<2&&(m=2);var $,g,y=0,v=[f],x=[h];for($=0;$<m;$++)v.push(f+$*(p-f)/(m-1));for(v.push(p),g=0;g<_;g++)x.push(h+g*(d-h)/(_-1));x.push(d);var b=v.length,S=x.length,w=1,C=c.x!==u.x||c.y!==u.y||c.z!==u.z;C&&(w=2,f>0&&_-1,p<WebGLPlot.CesiumMath.PI&&_-1,(d-h)%WebGLPlot.CesiumMath.TWO_PI?2*(m-1)+1:1);var T=S*b*w,P=WebGLPlot.arrayFill(new Array(T),!1),E=WebGLPlot.arrayFill(new Array(T),!1),A=new Array(b),L=new Array(b);for($=0;$<b;$++)A[$]=_0x16f313(v[$]),L[$]=_0x3cc4a3(v[$]);var M=new Array(S),I=new Array(S);for(g=0;g<S;g++)I[g]=_0x3cc4a3(x[g]),M[g]=_0x16f313(x[g]);var O=new Array;for($=0;$<b;$++){let e=new Array;for(g=0;g<S;g++){let t,i,n;t=u.x*A[$]*I[g],i=u.y*A[$]*M[g],n=u.z*L[$],e.push(new WebGLPlot.Cartesian3(t,i,n))}O.push(e)}var D=T/2;if(C)for($=b-1;$>0;$--){let e=new Array;for(g=0;g<S;g++){let t,i,n;t=c.x*A[$]*I[g],i=c.y*A[$]*M[g],n=c.z*L[$],e.push(new WebGLPlot.Cartesian3(t,i,n)),P[D]=!0,$>0&&$!==b-1&&0!==g&&g!==S-1&&(E[D]=!0),D++}O.push(e)}var R=_0x299624(O),N=R.length;if(!(N<2||t<=0)){var F,B=4*N-4,z=new Float64Array(3*B),G=new Float64Array(3*B),k=new Float64Array(3*B),U=new Float32Array(2*B),V=n.st?new Float32Array(2*B):void 0,W=WebGLPlot.defined(r)?new Uint8Array(4*B):void 0,H=s?new Float32Array(3*B):void 0,Y=0,j=0,q=0,X=0,K=0,Z=0;for(g=0;g<N;++g){var J,Q;0===g?(F=_0x312f76,WebGLPlot.Cartesian3.subtract(R[0],R[1],F),WebGLPlot.Cartesian3.add(R[0],F,F)):F=R[g-1],WebGLPlot.Cartesian3.clone(F,_0x29b736),WebGLPlot.Cartesian3.clone(R[g],_0x371179),g===N-1?(F=_0x312f76,WebGLPlot.Cartesian3.subtract(R[N-1],R[N-2],F),WebGLPlot.Cartesian3.add(R[N-1],F,F)):F=R[g+1],WebGLPlot.Cartesian3.clone(F,_0xf72150),WebGLPlot.defined(W)&&(J=0===g||o?r[g]:r[g-1],g!==N-1&&(Q=r[g]));var ee=g===N-1?2:4;for(a=0===g?2:0;a<ee;++a){WebGLPlot.Cartesian3.pack(_0x371179,z,Y),WebGLPlot.Cartesian3.pack(_0x29b736,G,Y),WebGLPlot.Cartesian3.pack(_0xf72150,k,Y),Y+=3;var te=a-2<0?-1:1,ie=a%2*2-1,ne=ie*g/N;if(U[j++]=i>0?ne:ie,U[j++]=te*t,n.st&&(V[q++]=g/(N-1),V[q++]=Math.max(U[j-2],0)),WebGLPlot.defined(W)){var re=a<2?J:Q;W[X++]=WebGLPlot.Color.floatToByte(re.red),W[X++]=WebGLPlot.Color.floatToByte(re.green),W[X++]=WebGLPlot.Color.floatToByte(re.blue),W[X++]=WebGLPlot.Color.floatToByte(re.alpha)}s&&(H[3*K]=Z,K++)}Z+=WebGLPlot.Cartesian3.distance(F,R[g])}if(s){var oe=Z,ae=Math.random()*(l>0?l:oe);for(g=0;g<B;g++)H[3*g+1]=oe,H[3*g+2]=ae}var se=new WebGLPlot.GeometryAttributes;se.position=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:z}),se.prevPosition=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:G}),se.nextPosition=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:k}),se.expandAndWidth=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:U}),n.st&&(se.st=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:V})),WebGLPlot.defined(W)&&(se.color=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:W,normalize:!0})),s&&(se.dist=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:H}));var le=new Array,ue=(y=0,0),ce=2*N-3;for(g=1;g<ce;++g)le[ue++]=y,le[ue++]=y+2,le[ue++]=y+1,le[ue++]=y+1,le[ue++]=y+2,le[ue++]=y+3,y+=2;return new WebGLPlot.Geometry({attributes:se,indices:le,primitiveType:WebGLPlot.PrimitiveType.TRIANGLES,boundingSphere:WebGLPlot.BoundingSphere.fromPoints(R),geometryType:WebGLPlot.GeometryType.POLYLINES})}}}},_0x2cfb49.createGeometry_H=function(e){var t=e._width,i=e._hMax,n=e._vertexFormat,r=e._colors,o=e._colorsPerVertex;e._arcType,e._granularity,e._ellipsoid;var a,s=e._dist,l=e._period,u=e._radii;if(!(u.x<=0||u.y<=0||u.z<=0)){var c=e._innerRadii;if(!(c.x<=0||c.y<=0||c.z<=0)){var h=e._minimumClock,d=e._maximumClock,f=e._minimumCone,p=e._maximumCone,_=(n=e._vertexFormat,e._slicePartitions+1),m=e._stackPartitions+1;(_=Math.round(_*Math.abs(d-h)/WebGLPlot.CesiumMath.TWO_PI))<2&&(_=2),(m=Math.round(m*Math.abs(p-f)/WebGLPlot.CesiumMath.PI))<2&&(m=2);var $,g,y=0,v=[f],x=[h];for($=0;$<m;$++)v.push(f+$*(p-f)/(m-1));for(v.push(p),g=0;g<_;g++)x.push(h+g*(d-h)/(_-1));x.push(d);var b=v.length,S=x.length,w=1,C=c.x!==u.x||c.y!==u.y||c.z!==u.z;C&&(w=2,f>0&&_-1,p<WebGLPlot.CesiumMath.PI&&_-1,(d-h)%WebGLPlot.CesiumMath.TWO_PI?2*(m-1)+1:1);var T=S*b*w,P=WebGLPlot.arrayFill(new Array(T),!1),E=WebGLPlot.arrayFill(new Array(T),!1),A=new Array(b),L=new Array(b);for($=0;$<b;$++)A[$]=_0x16f313(v[$]),L[$]=_0x3cc4a3(v[$]);var M=new Array(S),I=new Array(S);for(g=0;g<S;g++)I[g]=_0x3cc4a3(x[g]),M[g]=_0x16f313(x[g]);var O=new Array;for($=0;$<b;$++)for(g=0;g<S;g++){let e,t,i;$%2==0?(e=u.x*A[$]*I[g],t=u.y*A[$]*M[g]):(e=u.x*A[$]*I[S-g-1],t=u.y*A[$]*M[S-g-1]),i=u.z*L[$],O.push(new WebGLPlot.Cartesian3(e,t,i))}var D=T/2;if(C)for($=b-1;$>0;$--)for(g=S-1;g>0;g--){let e,t,i;$%2==0?(e=c.x*A[$]*I[g],t=c.y*A[$]*M[g]):(e=c.x*A[$]*I[S-g-1],t=c.y*A[$]*M[S-g-1]),i=c.z*L[$],O.push(new WebGLPlot.Cartesian3(e,t,i)),P[D]=!0,$>0&&$!==b-1&&0!==g&&g!==S-1&&(E[D]=!0),D++}var R=O,N=R.length;if(!(N<2||t<=0)){var F,B=4*N-4,z=new Float64Array(3*B),G=new Float64Array(3*B),k=new Float64Array(3*B),U=new Float32Array(2*B),V=n.st?new Float32Array(2*B):void 0,W=WebGLPlot.defined(r)?new Uint8Array(4*B):void 0,H=s?new Float32Array(3*B):void 0,Y=0,j=0,q=0,X=0,K=0,Z=0;for(g=0;g<N;++g){var J,Q;0===g?(F=_0x312f76,WebGLPlot.Cartesian3.subtract(R[0],R[1],F),WebGLPlot.Cartesian3.add(R[0],F,F)):F=R[g-1],WebGLPlot.Cartesian3.clone(F,_0x29b736),WebGLPlot.Cartesian3.clone(R[g],_0x371179),g===N-1?(F=_0x312f76,WebGLPlot.Cartesian3.subtract(R[N-1],R[N-2],F),WebGLPlot.Cartesian3.add(R[N-1],F,F)):F=R[g+1],WebGLPlot.Cartesian3.clone(F,_0xf72150),WebGLPlot.defined(W)&&(J=0===g||o?r[g]:r[g-1],g!==N-1&&(Q=r[g]));var ee=g===N-1?2:4;for(a=0===g?2:0;a<ee;++a){WebGLPlot.Cartesian3.pack(_0x371179,z,Y),WebGLPlot.Cartesian3.pack(_0x29b736,G,Y),WebGLPlot.Cartesian3.pack(_0xf72150,k,Y),Y+=3;var te=a-2<0?-1:1,ie=a%2*2-1,ne=ie*g/N;if(U[j++]=i>0?ne:ie,U[j++]=te*t,n.st&&(V[q++]=g/(N-1),V[q++]=Math.max(U[j-2],0)),WebGLPlot.defined(W)){var re=a<2?J:Q;W[X++]=WebGLPlot.Color.floatToByte(re.red),W[X++]=WebGLPlot.Color.floatToByte(re.green),W[X++]=WebGLPlot.Color.floatToByte(re.blue),W[X++]=WebGLPlot.Color.floatToByte(re.alpha)}s&&(H[3*K]=Z,K++)}Z+=WebGLPlot.Cartesian3.distance(F,R[g])}if(s){var oe=Z,ae=Math.random()*(l>0?l:oe);for(g=0;g<B;g++)H[3*g+1]=oe,H[3*g+2]=ae}var se=new WebGLPlot.GeometryAttributes;se.position=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:z}),se.prevPosition=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:G}),se.nextPosition=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:k}),se.expandAndWidth=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:U}),n.st&&(se.st=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:V})),WebGLPlot.defined(W)&&(se.color=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:W,normalize:!0})),s&&(se.dist=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:H}));var le=new Array,ue=(y=0,0),ce=2*N-3;for(g=1;g<ce;++g)le[ue++]=y,le[ue++]=y+2,le[ue++]=y+1,le[ue++]=y+1,le[ue++]=y+2,le[ue++]=y+3,y+=2;return new WebGLPlot.Geometry({attributes:se,indices:le,primitiveType:WebGLPlot.PrimitiveType.TRIANGLES,boundingSphere:WebGLPlot.BoundingSphere.fromPoints(R),geometryType:WebGLPlot.GeometryType.POLYLINES})}}}};const _0x1710e9=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x253660=_0x1710e9(void 0,(function(){return _0x253660.toString().search("(((.+)+)+)+$").toString().constructor(_0x253660).search("(((.+)+)+)+$")}));_0x253660();class _0x2ec863 extends _0x3c19a2{constructor(e,t){super(e,t),this.PlotRadarType=_0x1416c0.PlotParameterRadar,this._primitiveScnaFillArry=[],this._primitiveScnaOutLineArry=[],this._scanArray=[],this._merge(e),this._add2Scene()}getScanArray(){return this._scanArray}setScanArray(e){this.removeAllScanArray();for(let t=0;t<e.length;t++){const i=e[t];i instanceof _0x20496d&&this._scanArray.push(i)}return this.scanCount=this._scanArray.length,this._createScanGeoArray(),this._scanArray}addScan(e){(!e||!(e instanceof _0x20496d))&&(e=new _0x20496d(this)),this._scanArray.push(e),this.scanCount=this._scanArray.length,this._createScanGeoArray()}removeAllScanArray(){this._removeAllScanArrayPrimitive(),this._scanArray=[],this.scanCount=this._scanArray.length}removeScan(e){if(this._primitiveScnaFillArry.length>e){let t=this._primitiveScnaFillArry[e];this._primitives.removeAndDestroy(t),t=void 0,this._primitiveScnaFillArry.splice(e,1)}if(this._primitiveScnaOutLineArry.length>e){let t=this._primitiveScnaOutLineArry[e];this._primitives.removeAndDestroy(t),t=void 0,this._primitiveScnaOutLineArry.splice(e,1)}return this._scanArray.length>e&&(this._scanArray.splice(e,1),this.scanCount=this._scanArray.length,this._createScanGeoArray(),!0)}setScan(e,t){return!(t>=this._scanArray.length)&&((!e||!(e instanceof _0x20496d))&&(e=new _0x20496d(this)),this.removeScan(t),this._scanArray.splice(t,0,e),this.scanCount=this._scanArray.length,this._createScanGeoArray(),!0)}_updated(e){this._isNeedUpdate&&(this._isNeedUpdate=!1,this._createRadarPrimitive(),this._createScanGeoArray());const t=this._dScanSpeed*e/1e3;this._updated_Scan(-t)}_add2Scene(){this._createRadarPrimitive(),this.isShowScan&&this._createScan()}_createScan(){if(!this.isShowScan||!this.show)return;const e=(this._maximumClock-this._minimumClock)/this.scanCount;for(let r=0;r<this.scanCount;r++){var t=new _0x20496d(this),i=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-this._minimumClock-e*r);t._rotate=i,t.material=this.scanColor,this._scanArray.push(t);var n=new WebGLPlot.HeadingPitchRoll(-1*t._rotate.z,-1*t._rotate.y,t._rotate.x);const o=WebGLPlot.Cartesian3.fromDegrees(t.point.x+this.offset.x,t.point.y+this.offset.y,t.point.z+this.offset.z),a=WebGLPlot.Transforms.headingPitchRollToFixedFrame(o,n);if(t.isFill){let e=this._createFillPrimitive(a,t);t._primitive=e,this._primitiveScnaFillArry.push(this._primitives.add(e))}if(t.isOutline){let e=this._createOutlinePrimitive(a,t);t._outlinePrimitive=e,this._primitiveScnaOutLineArry.push(this._primitives.add(e))}}}_updated_Scan(e){if(this.isShowScan&&this.show)for(let i=0;i<this._scanArray.length;i++){const n=this._scanArray[i];this.radarClock>=WebGLPlot.CesiumMath.TWO_PI?(n._rotate.z+=e,Math.abs(n._rotate.z)>=WebGLPlot.CesiumMath.TWO_PI&&(n._rotate.z=n._rotate.z%WebGLPlot.CesiumMath.TWO_PI)):(n.__bIsBack_?n._rotate.z-=e:n._rotate.z+=e,-n._rotate.z>=this._maximumClock-this._rotate.z-n.scanAngle?n.__bIsBack_=!0:-n._rotate.z<=this._minimumClock-this._rotate.z&&(n.__bIsBack_=!1));var t=new WebGLPlot.HeadingPitchRoll(-1*this._rotate.z,-1*this._rotate.y,this._rotate.x);const r=WebGLPlot.Cartesian3.fromDegrees(n.point.x+this.offset.x,n.point.y+this.offset.y,n.point.z+this.offset.z),o=WebGLPlot.Transforms.headingPitchRollToFixedFrame(r,t);let a=WebGLPlot.Matrix3.fromRotationZ(this._rotate.z-n._rotate.z),s=WebGLPlot.Matrix4.multiplyByMatrix3(o,a,new WebGLPlot.Matrix4);this._primitiveScnaFillArry[i]&&(this._primitiveScnaFillArry[i].modelMatrix=s),this._primitiveScnaOutLineArry[i]&&(this._primitiveScnaOutLineArry[i].modelMatrix=s)}}_updated_Scan2(e){if(this._primitiveScnaFillArry.length>0)for(let o=0;o<this._primitiveScnaFillArry.length;o++){let a=this._primitiveScnaFillArry[o];const s=this._scanArray[o];this.radarClock>=WebGLPlot.CesiumMath.TWO_PI?(s._rotate.z+=e,Math.abs(s._rotate.z)>=WebGLPlot.CesiumMath.TWO_PI&&(s._rotate.z=s._rotate.z%WebGLPlot.CesiumMath.TWO_PI)):(s.__bIsBack_?s._rotate.z-=e:s._rotate.z+=e,-s._rotate.z>=this._maximumClock-this._rotate.z-s.scanAngle?s.__bIsBack_=!0:-s._rotate.z<=this._minimumClock-this._rotate.z&&(s.__bIsBack_=!1));const l=WebGLPlot.Cartesian3.fromDegrees(s.point.x,s.point.y,s.point.z);var t=WebGLPlot.Matrix4.fromTranslation(l),i=WebGLPlot.Cartesian3.multiplyByScalar(l,-1,new WebGLPlot.Cartesian3),n=WebGLPlot.Matrix4.fromTranslation(i);let u=WebGLPlot.Matrix3.fromRotationX(s._rotate.x),c=WebGLPlot.Matrix3.fromRotationY(s._rotate.y),h=WebGLPlot.Matrix3.fromRotationZ(s._rotate.z);n=WebGLPlot.Matrix4.multiplyByMatrix3(n,u,n),n=WebGLPlot.Matrix4.multiplyByMatrix3(n,c,n),n=WebGLPlot.Matrix4.multiplyByMatrix3(n,h,n);var r=WebGLPlot.Matrix4.multiply(t,n,new WebGLPlot.Matrix4);a.modelMatrix=r}if(this._primitiveScnaOutLineArry.length>0)for(let e=0;e<this._primitiveScnaOutLineArry.length;e++)this._primitiveScnaOutLineArry[e]}_createRadarFillGeometry(e){return _0x29734f.createGeometry(new _0x29734f(e))}_createRadarOutLineGeometry(e){return _0x2cfb49.createGeometry(new _0x2cfb49(e))}_removeAllScanArrayPrimitive(){if(this._primitiveScnaFillArry.length>0){for(let e=0;e<this._primitiveScnaFillArry.length;e++){let t=this._primitiveScnaFillArry[e];this._primitives.removeAndDestroy(t),t=void 0}this._primitiveScnaFillArry=[]}if(this._primitiveScnaOutLineArry.length>0){for(let e=0;e<this._primitiveScnaOutLineArry.length;e++){let t=this._primitiveScnaOutLineArry[e];this._primitives.removeAndDestroy(t),t=void 0}this._primitiveScnaOutLineArry=[]}}_createScanGeoArray(){this._removeAllScanArrayPrimitive();const e=(this._maximumClock-this._minimumClock)/this._scanArray.length;for(let n=0;n<this._scanArray.length;n++){var t=this._scanArray[n],i=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-e*n);t._rotate=i,this._createScanPrimitive(t,n)}}clone(e){return WebGLPlot.defined(e)?(e.PlotRadarType=this.PlotRadarType,e.id=this.id,e.point=this.point.clone(),e._rotate=this._rotate.clone(),e.show=this.show,e.radii=this.radii,e.innerRadii=this._innerRadii,e._minimumClock=this._minimumClock,e._maximumClock=this._maximumClock,e._minimumCone=this._minimumCone,e._maximumCone=this._maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.fillColor,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.subdivisions=this.subdivisions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new _0x2ec863(this)}_merge(e){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("PlotParameterRadar merge source is required.");if(this._innerRadii=WebGLPlot.defaultValue(e.innerRadii,0),e.minimumClock?this._minimumClock=WebGLPlot.CesiumMath.toRadians(e.minimumClock):this._minimumClock=0,e.maximumClock?this._maximumClock=WebGLPlot.CesiumMath.toRadians(e.maximumClock):this._maximumClock=WebGLPlot.CesiumMath.TWO_PI,e.minimumCone?this._minimumCone=WebGLPlot.CesiumMath.toRadians(e.minimumCone):this._minimumCone=0,e.maximumCone?this._maximumCone=WebGLPlot.CesiumMath.toRadians(e.maximumCone):this._maximumCone=WebGLPlot.CesiumMath.PI,this.heightReference=WebGLPlot.defaultValue(e.heightReference,void 0),this.distanceDisplayCondition=WebGLPlot.defaultValue(e.distanceDisplayCondition,new WebGLPlot.DistanceDisplayConditionGeometryInstanceAttribute),this.scanCount=WebGLPlot.defaultValue(e.scanCount,1),this._isShowScan=WebGLPlot.defaultValue(e.isShowScan,!1),this.scanColor=WebGLPlot.defaultValue(e.scanColor,new WebGLPlot.Color(1,0,0,1)),e.dScanSpeed?this._dScanSpeed=WebGLPlot.CesiumMath.toRadians(e.dScanSpeed):this._dScanSpeed=WebGLPlot.CesiumMath.toRadians(20),this._minimumClock>this._maximumClock){let e=this._minimumClock;this._minimumClock=this._maximumClock,this._maximumClock=e}this.radarClock=this._maximumClock-this._minimumClock}destroy(){this._isNeedUpdate=!1,this._primitive&&this._primitives.removeAndDestroy(this._primitive),this._outlinePrimitive&&this._primitives.removeAndDestroy(this._outlinePrimitive),this._scanArray&&this._scanArray.length>0&&(this._scanArray.forEach((e=>{e.destroy()})),this._scanArray=[]),this.removeAllScanArray(),this.__isDestroy=!0}}Object.defineProperties(_0x2ec863.prototype,{innerRadii:{get:function(){return this._innerRadii.x<=1e-8||this._innerRadii.y<=1e-8||this._innerRadii.z<=1e-8?new _0x45ea17(0,0,0):this._innerRadii},set:function(e){if((e instanceof WebGLPlot.Cartesian3||e instanceof _0x45ea17)&&!_0x45ea17.equals(e,this._point)){(e.x<=0||e.y<=0||e.z<=0)&&(e=new _0x45ea17(1e-8,1e-8,1e-8)),this._innerRadii=e.clone(),this._innerRadii.x>this.radii.x&&(this._innerRadii=this.radii.clone());for(let e=0;e<this._scanArray.length;e++){this._scanArray[e].innerRadii=this.innerRadii.clone()}this._isNeedUpdate=!0}}},radii:{get:function(){return this._radii},set:function(e){if((e instanceof WebGLPlot.Cartesian3||e instanceof _0x45ea17)&&!_0x45ea17.equals(e,this._point)){this._radii=e.clone(),this._innerRadii.x>this.radii.x&&(this._innerRadii=this.radii.clone());for(let e=0;e<this._scanArray.length;e++){this._scanArray[e].radii=this.radii.clone()}this._isNeedUpdate=!0}}},minimumClock:{get:function(){return WebGLPlot.CesiumMath.toDegrees(this._minimumClock)},set:function(e){if("number"!=typeof e||e===this.minimumClock||e>this.maximumClock)return;this._minimumClock=WebGLPlot.CesiumMath.toRadians(e),this._isNeedUpdate=!0;const t=(this._maximumClock-this._minimumClock)/this._scanArray.length;for(let e=0;e<this._scanArray.length;e++){var i=this._scanArray[e],n=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-t*e);i._rotate=n}this.radarClock=this._maximumClock-this._minimumClock}},maximumClock:{get:function(){return WebGLPlot.CesiumMath.toDegrees(this._maximumClock)},set:function(e){if("number"!=typeof e||e===this.maximumClock||e<this.minimumClock)return;this._maximumClock=WebGLPlot.CesiumMath.toRadians(e),this._isNeedUpdate=!0;const t=(this._maximumClock-this._minimumClock)/this._scanArray.length;for(let e=0;e<this._scanArray.length;e++){var i=this._scanArray[e],n=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-t*e);i._rotate=n}this.radarClock=this._maximumClock-this._minimumClock}},minimumCone:{get:function(){return WebGLPlot.CesiumMath.toDegrees(this._minimumCone)},set:function(e){if("number"==typeof e&&e!==this.minimumCone){this._minimumCone=WebGLPlot.CesiumMath.toRadians(e);for(let e=0;e<this._scanArray.length;e++){this._scanArray[e]._minimumCone=this._minimumCone}this._isNeedUpdate=!0}}},maximumCone:{get:function(){return WebGLPlot.CesiumMath.toDegrees(this._maximumCone)},set:function(e){if("number"==typeof e&&e!==this.maximumCone){this._maximumCone=WebGLPlot.CesiumMath.toRadians(e);for(let e=0;e<this._scanArray.length;e++){this._scanArray[e]._maximumCone=this._maximumCone}this._isNeedUpdate=!0}}},scale:{get:function(){return this._scale},set:function(e){if("number"==typeof e&&this._scale!==e){this._scale=e;for(let e=0;e<this._scanArray.length;e++){this._scanArray[e].scale=this._scale}this._isNeedUpdate=!0}}}});const _0x45f50a=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x5b0ce9=_0x45f50a(void 0,(function(){return _0x5b0ce9.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b0ce9).search("(((.+)+)+)+$")}));_0x5b0ce9();class _0x2b9951 extends _0x24ebc9{constructor(e){super(e),e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._radarType=_0x1416c0.PlotParameterRadar,this._name=WebGLPlot$g.defaultValue(e.name,_0x5f28ea.getDefaultName({effectType:this._type,radarType:this._radarType})),this._UUID="GeoEntityEffectParameterRadar_"+WebGLPlot$g.createGuid(),this._pntOffset=WebGLPlot$g.defaultValue(e.pntOffset,new _0x45ea17(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$g.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot$g.defaultValue(e.radius,15e4),this._innerRadius=WebGLPlot$g.defaultValue(e.innerRadius,5e3),this._minimumClock=WebGLPlot$g.defaultValue(e.minimumClock,0),this._maximumClock=WebGLPlot$g.defaultValue(e.maximumClock,360),this._minimumCone=WebGLPlot$g.defaultValue(e.minimumCone,0),this._maximumCone=WebGLPlot$g.defaultValue(e.maximumCone,90),this._parameterRadar=null}setGeoEntityParameter(e,t){if(WebGLPlot$g.defined(this._parameterRadar)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()){let t=_0x1569f6.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$g.defined(t)&&(this._parameterRadar.point=t)}if(e.getShowMode()==_0x3f7d9f.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())&&(this._parameterRadar.rotate=e.getModelRotate()),e.getShowMode()==_0x3f7d9f.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._innerRadius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$g.defined(this._geoEntityParameter)||!WebGLPlot$g.defined(this._pntOffset))return null;let t=_0x1569f6.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$g.defined(t))return null;let i=new _0x45ea17(0,0,0);this._geoEntityParameter.getShowMode()==_0x3f7d9f.Marker&&(i=this._geoEntityParameter.getModelRotate());let n=this._innerRadius>0?this._innerRadius:this._radius;if(this._parameterRadar=new _0x2ec863({id:this._UUID,point:t,rotate:new WebGLPlot$g.Cartesian3(i.x,i.y,i.z),dScanSpeed:this._scanSpeed,shadows:this._shadows,radii:new WebGLPlot$g.Cartesian3(this._radius,this._radius,this._radius),innerRadii:new WebGLPlot$g.Cartesian3(n,n,n),minimumClock:this._minimumClock,maximumClock:this._maximumClock,minimumCone:this._minimumCone,maximumCone:this._maximumCone,isFill:this._isFill,fillColor:this._fillColor,isOutline:this._isOutline,outlineColor:this._outlineColor,outlineWidth:1,isShowScan:this._isShowScan,scanCount:this._arrGeoEntityEffectRadarScans.length,scanColor:this._scanColor,show:!0},e),!WebGLPlot$g.defined(this._parameterRadar))return!1;let r=this._parameterRadar.getScanArray();for(let e=0;e<r.length;e++)this._arrGeoEntityEffectRadarScans[e]._updateScan(r[e]);return this._parameterRadar.setScanArray(r),this._initialized=!0,!0}_removeEffectFromScene(e){WebGLPlot$g.defined(this._parameterRadar)&&(this._parameterRadar.destroy(),this._parameterRadar=null)}toJSON(){let e=super.toJSON(),t=JSON.parse(e);return t.hasOwnProperty("radarType")||(t.radarType=this._radarType),t.hasOwnProperty("radius")||(t.radius=this._radius),t.hasOwnProperty("innerRadius")||(t.innerRadius=this._innerRadius),t.hasOwnProperty("minimumClock")||(t.minimumClock=this._minimumClock),t.hasOwnProperty("maximumClock")||(t.maximumClock=this._maximumClock),t.hasOwnProperty("minimumCone")||(t.minimumCone=this._minimumCone),t.hasOwnProperty("maximumCone")||(t.maximumCone=this._maximumCone),JSON.stringify(t)}fromJSON(e){super.fromJSON(e);let t=JSON.parse(e);WebGLPlot$g.defined(t.radarType)&&(this._radarType=t.radarType),WebGLPlot$g.defined(t.radius)&&(this._radius=t.radius),WebGLPlot$g.defined(t.innerRadius)&&(this._innerRadius=t.innerRadius),WebGLPlot$g.defined(t.minimumClock)&&(this._minimumClock=t.minimumClock),WebGLPlot$g.defined(t.maximumClock)&&(this._maximumClock=t.maximumClock),WebGLPlot$g.defined(t.minimumCone)&&(this._minimumCone=t.minimumCone),WebGLPlot$g.defined(t.maximumCone)&&(this._maximumCone=t.maximumCone)}clone(){let e=new _0x2b9951;e._UUID=this._UUID,e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x45ea17(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._scanSpeed=this._scanSpeed,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth;let t=[];for(let e=0;e<this._arrGeoEntityEffectRadarScans.length;e++)t.push(this._arrGeoEntityEffectRadarScans[e].clone());return e._arrGeoEntityEffectRadarScans=t,e._radarType=this._radarType,e._radius=this._radius,e._innerRadius=this._innerRadius,e._minimumClock=this._minimumClock,e._maximumClock=this._maximumClock,e._minimumCone=this._minimumCone,e._maximumCone=this._maximumCone,e}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}setInnerRadius(e){this._innerRadius=e,this._initialized=!1}getInnerRadius(){return this._innerRadius}setMinimumClock(e){this._minimumClock=e,this._initialized=!1}getMinimumClock(){return this._minimumClock}setMaximumClock(e){this._maximumClock=e,this._initialized=!1}getMaximumClock(){return this._maximumClock}setMinimumCone(e){this._minimumCone=e,this._initialized=!1}getMinimumCone(){return this._minimumCone}setMaximumCone(e){this._maximumCone=e,this._initialized=!1}getMaximumCone(){return this._maximumCone}}const _0x2fc3de=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x3543c2=_0x2fc3de(void 0,(function(){return _0x3543c2.toString().search("(((.+)+)+)+$").toString().constructor(_0x3543c2).search("(((.+)+)+)+$")}));_0x3543c2();class _0x3d9e88 extends _0x508ffd{constructor(e,t){if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("PlotWarningRadar scene is required.");e.rotateAngle=360,e.radii=WebGLPlot.defaultValue(e.radii,new WebGLPlot.Cartesian3(1e4,1e4,1e4)),e.cellAngle=WebGLPlot.defaultValue(e.cellAngle,5),e.customPts=_0x4a8aa3(e.radii.x),e.slicePartitions=e.rotateAngle/e.cellAngle,super(e,t),this.PlotRadarType=_0x1416c0.PlotWarningRadar}clone(e){if(!WebGLPlot.defined(e)){var t=new _0x3d9e88(this,this._scene);return t.id=WebGLPlot.createGuid(),t}return e._id=this.id,e._point=this.point.clone(),e._rotate=this.rotate.clone(),e._show=this.show,e._radii=this.radii,e._innerRadii=this.innerRadii,e._minimumClock=this.minimumClock,e._maximumClock=this.maximumClock,e._minimumCone=this.minimumCone,e._maximumCone=this.maximumCone,e._heightReference=this.heightReference,e._fill=this.fill,e._material=this.material,e._outline=this.outline,e._outlineColor=this.outlineColor,e._outlineWidth=this.outlineWidth,e._stackPartitions=this.stackPartitions,e._slicePartitions=this.slicePartitions,e._shadows=this.shadows,e._distanceDisplayCondition=this.distanceDisplayCondition,e}}function _0x4a8aa3(e){return[new WebGLPlot.Cartesian3(0,e/5,0),new WebGLPlot.Cartesian3(e,e/5*2,0),new WebGLPlot.Cartesian3(e,0,0),new WebGLPlot.Cartesian3(0,e/5,0)]}Object.defineProperties(_0x3d9e88.prototype,{radii:{get:function(){return this._radii},set:function(e){if((e instanceof WebGLPlot.Cartesian3||e instanceof _0x45ea17)&&!_0x45ea17.equals(e,this._radii)){this._radii=e.clone(),this.customPts=_0x4a8aa3(this._radii.x*this.scale);for(let e=0;e<this._scanArray.length;e++)this._scanArray[e]._computeScanPts(this);this._isNeedUpdate=!0}}},scale:{get:function(){return this._scale},set:function(e){if("number"==typeof e&&this._scale!==e){this._scale=e,this.customPts=_0x4a8aa3(this._radii.x*this.scale);for(let e=0;e<this._scanArray.length;e++)this._scanArray[e]._computeScanPts(this);this._isNeedUpdate=!0}}}});const _0x2aa1d2=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x40cf3a=_0x2aa1d2(void 0,(function(){return _0x40cf3a.toString().search("(((.+)+)+)+$").toString().constructor(_0x40cf3a).search("(((.+)+)+)+$")}));_0x40cf3a();class _0x2412b9 extends _0x24ebc9{constructor(e){super(e),e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._radarType=_0x1416c0.PlotWarningRadar,this._name=WebGLPlot$g.defaultValue(e.name,_0x5f28ea.getDefaultName({effectType:this._type,radarType:this._radarType})),this._UUID="GeoEntityEffectWarningRadar_"+WebGLPlot$g.createGuid(),this._pntOffset=WebGLPlot$g.defaultValue(e.pntOffset,new _0x45ea17(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$g.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot$g.defaultValue(e.radius,15e4),this._warningRadar=null,this._cellAngle=5}setGeoEntityParameter(e,t){if(WebGLPlot$g.defined(this._warningRadar)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()){let t=_0x1569f6.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$g.defined(t)&&(this._warningRadar.point=t)}if(e.getShowMode()==_0x3f7d9f.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())&&(this._warningRadar.rotate=e.getModelRotate()),e.getShowMode()==_0x3f7d9f.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$g.defined(this._geoEntityParameter)||!WebGLPlot$g.defined(this._pntOffset))return null;let t=_0x1569f6.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$g.defined(t))return null;let i=new _0x45ea17(0,0,0);if(this._geoEntityParameter.getShowMode()==_0x3f7d9f.Marker&&(i=this._geoEntityParameter.getModelRotate()),this._warningRadar=new _0x3d9e88({id:this._UUID,point:t,rotate:new WebGLPlot$g.Cartesian3(i.x,i.y,i.z),dScanSpeed:this._scanSpeed,shadows:this._shadows,cellAngle:this._cellAngle,radii:new WebGLPlot$g.Cartesian3(this._radius,this._radius,this._radius),isFill:this._isFill,fillColor:this._fillColor.clone(),isOutline:this._isOutline,outlineColor:this._outlineColor.clone(),outlineWidth:1,isShowScan:this._isShowScan,scanCount:this._arrGeoEntityEffectRadarScans.length,scanColor:this._scanColor,show:!0},e),!WebGLPlot$g.defined(this._warningRadar))return!1;let n=this._warningRadar.getScanArray();for(let e=0;e<n.length;e++)this._arrGeoEntityEffectRadarScans[e]._updateScan(n[e]);return this._warningRadar.setScanArray(n),this._initialized=!0,!0}_removeEffectFromScene(e){WebGLPlot$g.defined(this._warningRadar)&&(this._warningRadar.destroy(),this._warningRadar=null)}toJSON(){let e=super.toJSON(),t=JSON.parse(e);return t.hasOwnProperty("radarType")||(t.radarType=this._radarType),t.hasOwnProperty("radius")||(t.radius=this._radius),JSON.stringify(t)}fromJSON(e){super.fromJSON(e);let t=JSON.parse(e);WebGLPlot$g.defined(t.radarType)&&(this._radarType=t.radarType),WebGLPlot$g.defined(t.radius)&&(this._radius=t.radius)}clone(){let e=new _0x2412b9;e._UUID=this._UUID,e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x45ea17(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._scanSpeed=this._scanSpeed,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth;let t=[];for(let e=0;e<this._arrGeoEntityEffectRadarScans.length;e++)t.push(this._arrGeoEntityEffectRadarScans[e].clone());return e._arrGeoEntityEffectRadarScans=t,e._radarType=this._radarType,e._radius=this._radius,e}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}}var _0x551f6e=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x58ffc9=_0x551f6e(void 0,(function(){return _0x58ffc9.toString().search("(((.+)+)+)+$").toString().constructor(_0x58ffc9).search("(((.+)+)+)+$")}));_0x58ffc9();class _0x254b77 extends _0x3c19a2{constructor(e){super(e),this._slicePartitions=2,this.scaningRow=0,e._radarPts.length>3&&this._computeScanPts(e._radarPts),this.PlotRadarType="PlotScanRadarScan",e.scanConeColor&&(this._fillColor=e.scanConeColor),this.isBackIng=!1}_computeScanPts(e){const t=e[0],i=e[this.scaningRow+1],n=e[this.scaningRow+2];var r=[];r.push(new WebGLPlot.Cartesian3(t[0].x,t[0].y,t[0].z)),r.push(new WebGLPlot.Cartesian3(t[1].x,t[1].y,t[1].z));var o=[];o.push(new WebGLPlot.Cartesian3(i[0].x,i[0].y,i[0].z)),o.push(new WebGLPlot.Cartesian3(i[1].x,i[1].y,i[1].z));var a=[];a.push(new WebGLPlot.Cartesian3(n[0].x,n[0].y,n[0].z)),a.push(new WebGLPlot.Cartesian3(n[1].x,n[1].y,n[1].z));var s=[];s.push(new WebGLPlot.Cartesian3(t[0].x,t[0].y,t[0].z)),s.push(new WebGLPlot.Cartesian3(t[1].x,t[1].y,t[1].z)),this._radarPts=[r,o,a,s],this._indices=[0,3,2,0,4,5,0,2,4,0,5,3,4,2,3,3,5,4]}}const _0x3f3209=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x5be634=_0x3f3209(void 0,(function(){return _0x5be634.toString().search("(((.+)+)+)+$").toString().constructor(_0x5be634).search("(((.+)+)+)+$")}));_0x5be634();class _0x33eab6 extends _0x3c19a2{constructor(e,t){super(e,t),this._primitiveScnaFill=void 0,this._primitiveScnaOutLine=void 0,this.PlotRadarType=_0x1416c0.PlotScanRadar,this.scaningRow=0,this._fillPrimitives=[],this._merge(e),this._add2Scene()}_updated(e){if(this._isNeedUpdate&&(this._computeRadarPts2(),this._createRadarPrimitive(),this._isNeedUpdate=!1),this.isShowScan){const t=this.dScanSpeed*e/1e3;this._updated_Scan(-t)}}_updated_Scan(e){if(!this.scanCone)return;this.scaningRow%2!=0?this.scanCone.isBackIng=!1:(e*=-1,this.scanCone.isBackIng=!0),this.scanCone._rotate.z+=e;const t=this.cellAngle-this.scanCone._rotate.z>this.scanHAngle-this._rotate.z,i=-this.scanCone._rotate.z<=-this._rotate.z&&this.scanCone.isBackIng;(t||i)&&(this.scaningRow+=1,this.scanCone.scaningRow+=1,this.scaningRow-1>=this.scanVAngle/this.cellAngle&&(this.scanCone.scaningRow=0,this.scaningRow=1,this.scanCone._rotate.z=this._rotate.z),this._isNeedUpdate=!0);var n=new WebGLPlot.HeadingPitchRoll(-1*this._rotate.z,-1*this._rotate.y,this._rotate.x);const r=WebGLPlot.Cartesian3.fromDegrees(this.scanCone.point.x+this.offset.x,this.scanCone.point.y+this.offset.y,this.scanCone.point.z+this.offset.z),o=WebGLPlot.Transforms.headingPitchRollToFixedFrame(r,n);let a=WebGLPlot.Matrix3.fromRotationZ(this._rotate.z-this.scanCone._rotate.z),s=WebGLPlot.Matrix4.multiplyByMatrix3(o,a,new WebGLPlot.Matrix4),l=this.scanVAngle/this._stackPartitions*this.scanCone.scaningRow,u=WebGLPlot.Matrix3.fromRotationY(-l);s=WebGLPlot.Matrix4.multiplyByMatrix3(s,u,new WebGLPlot.Matrix4),this.scanCone.isFill&&(this._primitiveScnaFill.modelMatrix=s),this.scanCone.isOutline&&(this._primitiveScnaOutLine.modelMatrix=s)}_add2Scene(){this._createRadarPrimitive(),this._createScanCone()}_createRadarFillGeometry(e,t){return e||(e=this),t||(t=e._radarPts),_0x45871f.createGeometry(new _0x45871f({customPts:t,slicePartitions:e.slicePartitions,stackPartitions:t.length,radii:e.radii,indices:e._indices}),this.isClose)}_createRadarOutLineGeometry(e,t){return e||(e=this),t||(t=e._radarPts),_0x1fe166.createGeometry(new _0x1fe166({customPts:t,slicePartitions:e.slicePartitions,stackPartitions:t.length,radii:this.radii,outlineWidth:e.outlineWidth}),this.isClose)}_createScanCone(){if(!this.isShowScan)return;this._removeScanConePrimitive(),this.scanCone||(this.scanCone=new _0x254b77(this)),this.scanCone._rotate=_0x45ea17.clone(this._rotate),this.scanCone.scaningRow=this.scaningRow-1,this.scanCone._computeScanPts(this._radarPts),this.scanCone.material=this.scanConeColor;var e=new WebGLPlot.HeadingPitchRoll(-1*this._rotate.z,-1*this._rotate.y,this._rotate.x);const t=WebGLPlot.Cartesian3.fromDegrees(this.point.x+this.offset.x,this.point.y+this.offset.y,this.point.z+this.offset.z),i=WebGLPlot.Transforms.headingPitchRollToFixedFrame(t,e);if(this.scanCone.isFill){let e=this._createFillPrimitive(i,this.scanCone);this._primitiveScnaFill=this._primitives.add(e[0]),this.scanCone._primitive=this._primitiveScnaFill}if(this.scanCone.isOutline){let e=this._createOutlinePrimitive(i,this.scanCone);this._primitiveScnaOutLine=this._primitives.add(e),this.scanCone._outlinePrimitive=this._primitiveScnaOutLine}}_removeScanConePrimitive(){this._primitiveScnaFill&&(this._primitives.removeAndDestroy(this._primitiveScnaFill),this._primitiveScnaFill=void 0),this._primitiveScnaOutLine&&(this._primitives.removeAndDestroy(this._primitiveScnaOutLine),this._primitiveScnaOutLine=void 0)}_addFillPrimitive(e){if(this._fillPrimitives.length>0){for(var t in this._fillPrimitives)this._primitives.removeAndDestroy(this._fillPrimitives[t]);this._fillPrimitives=[]}let i=this._createFillPrimitive(e);for(var t in i)this._fillPrimitives.push(this._primitives.add(i[t]))}_createFillPrimitive(e,t){t||(t=this);var i=[],n={show:new WebGLPlot.ShowGeometryInstanceAttribute(t.isFill),distanceDisplayCondition:new WebGLPlot.DistanceDisplayConditionGeometryInstanceAttribute,color:void 0,offset:void 0},r=new WebGLPlot.MaterialAppearance({material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:t.fillColor}),translucent:!0,closed:!0});let o=this._createRadarFillGeometry(t,t._radarPts1),a=new WebGLPlot.GeometryInstance({id:t.id,geometry:o,modelMatrix:WebGLPlot.Matrix4.IDENTITY,attributes:n}),s=new WebGLPlot.Primitive({geometryInstances:a,appearance:r,asynchronous:!1,shadows:t.shadows,modelMatrix:e});if(i.push(s),t._radarPts2&&t._radarPts2.length>2){let r=this._createRadarFillGeometry(t,t._radarPts2),o=new WebGLPlot.GeometryInstance({id:t.id,geometry:r,modelMatrix:WebGLPlot.Matrix4.IDENTITY,attributes:n});var l=new WebGLPlot.MaterialAppearance({material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:t.scanedColor}),translucent:!0,closed:!0});let a=new WebGLPlot.Primitive({geometryInstances:o,appearance:l,asynchronous:!1,shadows:t.shadows,modelMatrix:e});i.push(a)}return i}_merge(e){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("PlotScanRadar merge source is required.");this.radii=WebGLPlot.defaultValue(e.radii,new WebGLPlot.Cartesian3(1,1,1)),e.cellAngle?this.cellAngle=WebGLPlot.CesiumMath.toRadians(e.cellAngle):this.cellAngle=WebGLPlot.CesiumMath.toRadians(5);let t=parseInt(WebGLPlot.CesiumMath.toDegrees(this.cellAngle)),i=parseInt(WebGLPlot.defaultValue(e.scanVAngle,30)),n=parseInt(WebGLPlot.defaultValue(e.scanHAngle,60));i%t!=0&&(i+=t-i%t),n%t!=0&&(n+=t-n%t),this.scanVAngle=WebGLPlot.CesiumMath.toRadians(i),this.scanHAngle=WebGLPlot.CesiumMath.toRadians(n),this._stackPartitions=i/t,this._slicePartitions=n/t+1,this.scanHAngle>=WebGLPlot.CesiumMath.TWO_PI&&(this.isClose=!0),this._isShowScan=WebGLPlot.defaultValue(e.isShowScan,!1),this._scanConeColor=WebGLPlot.defaultValue(e.scanColor,new WebGLPlot.Color(0,1,0,.8)),this._scanedColor=WebGLPlot.defaultValue(e.scanedColor,new WebGLPlot.Color(0,1,0,.3)),this._isShowScan&&(this.scaningRow=1),e.dScanSpeed?this.dScanSpeed=WebGLPlot.CesiumMath.toRadians(e.dScanSpeed):this.dScanSpeed=WebGLPlot.CesiumMath.toRadians(20),e.rotate?this._rotate=new WebGLPlot.Cartesian3(WebGLPlot.CesiumMath.toRadians(e.rotate.x),WebGLPlot.CesiumMath.toRadians(e.rotate.y),WebGLPlot.CesiumMath.toRadians(e.rotate.z+45)):this._rotate=new WebGLPlot.Cartesian3(0,0,45),this._computeRadarPts(),this._computeRadarPts2()}_computeRadarPts(){const e=this.radii.x*this.scale;this._customPts=[],this._customPts.push(new WebGLPlot.Cartesian2(0,0));for(let t=0;t<=this._stackPartitions;t++){const i=t*this.cellAngle,n=Math.cos(i)*e,r=Math.sin(i)*e;this._customPts.push(new WebGLPlot.Cartesian2(n,r))}this._customPts.push(new WebGLPlot.Cartesian2(0,0));let t=[];for(let e=0;e<this._customPts.length;e++){const r=this._customPts[e];for(var i=[],n=0;n<this._slicePartitions;n++){const e=n*this.cellAngle;i.push(new WebGLPlot.Cartesian3(r.x*Math.cos(e),r.x*Math.sin(e),r.y))}t.push(i)}this._radarPts=t}_computeRadarPts2(){const e=this.radii.x*this.scale;this._customPts1=[],this._customPts1.push(new WebGLPlot.Cartesian2(0,0));for(let t=this.scaningRow;t<=this._stackPartitions;t++){const i=Math.cos(t*this.cellAngle)*e,n=Math.sin(t*this.cellAngle)*e;this._customPts1.push(new WebGLPlot.Cartesian2(i,n))}this._customPts1.push(new WebGLPlot.Cartesian2(0,0));let t=[];for(let e=0;e<this._customPts1.length;e++){const r=this._customPts1[e];for(var i=[],n=0;n<this._slicePartitions;n++)i.push(new WebGLPlot.Cartesian3(r.x*Math.cos(n*this.cellAngle),r.x*Math.sin(n*this.cellAngle),r.y));t.push(i)}if(this._radarPts1=t,this._customPts2=[],this.scaningRow>0){this._customPts2.push(new WebGLPlot.Cartesian2(0,0));for(let t=0;t<=this.scaningRow;t++){const i=Math.cos(t*this.cellAngle)*e,n=Math.sin(t*this.cellAngle)*e;this._customPts2.push(new WebGLPlot.Cartesian2(i,n))}this._customPts2.push(new WebGLPlot.Cartesian2(0,0))}let r=[];for(let e=0;e<this._customPts2.length;e++){const t=this._customPts2[e];for(i=[],n=0;n<this._slicePartitions;n++)i.push(new WebGLPlot.Cartesian3(t.x*Math.cos(n*this.cellAngle),t.x*Math.sin(n*this.cellAngle),t.y));r.push(i)}this._radarPts2=r}clone(e){return WebGLPlot.defined(e)?(e.id=this.id,e.point=this.point.clone(),e._rotate=this._rotate.clone(),e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e.minimumClock=this.minimumClock,e.maximumClock=this.maximumClock,e.minimumCone=this.minimumCone,e.maximumCone=this.maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new _0x33eab6(this,this._scene)}destroy(){if(this._removeScanConePrimitive(),this._fillPrimitives.length>0){for(var e in this._fillPrimitives)this._primitives.removeAndDestroy(this._fillPrimitives[e]);this._fillPrimitives=[]}this._outlinePrimitive&&this._primitives.removeAndDestroy(this._outlinePrimitive),this.scanCone=void 0,this.__isDestroy=!0}_updatedRadarPrimitive(){var e=new WebGLPlot.HeadingPitchRoll(-1*this._rotate.z,-1*this._rotate.y,this._rotate.x);const t=WebGLPlot.Cartesian3.fromDegrees(this.point.x+this._offset.x,this.point.y+this._offset.y,this.point.z+this._offset.z),i=WebGLPlot.Transforms.headingPitchRollToFixedFrame(t,e);if(this._fillPrimitives.length>0)for(var n in this._fillPrimitives)this._fillPrimitives[n].modelMatrix=i;this._outlinePrimitive&&(this._outlinePrimitive.modelMatrix=i)}}Object.defineProperties(_0x33eab6.prototype,{show:{get:function(){return this._show},set:function(e){if("boolean"==typeof e&&this._show!==e){this._show=e;for(let t=0;t<this._fillPrimitives.length;t++){this._fillPrimitives[t].show=e}this._primitiveScnaFill&&(this._primitiveScnaFill.show=e),this._primitiveScnaOutLine&&(this._primitiveScnaOutLine.show=e),e?this._outlinePrimitive&&(this._outlinePrimitive.show=this.isOutline):this._outlinePrimitive&&(this._outlinePrimitive.show=e)}}},point:{get:function(){return this._point},set:function(e){(e instanceof WebGLPlot.Cartesian3||e instanceof _0x45ea17)&&!_0x45ea17.equals(e,this._point)&&(this._point=e.clone(),this.scanCone._point=e.clone(),this._updatedRadarPrimitive(),this._updated_Scan(0))}},radii:{get:function(){return this._radii},set:function(e){(e instanceof WebGLPlot.Cartesian3||e instanceof _0x45ea17)&&!_0x45ea17.equals(e,this._radii)&&(this._radii=e.clone(),this.scaningRow=1,this._computeRadarPts(),this._computeRadarPts2(),this._createScanCone(),this._isNeedUpdate=!0)}},scale:{get:function(){return this._scale},set:function(e){"number"==typeof e&&this._scale!==e&&(this._scale=e,this.scaningRow=1,this._computeRadarPts(),this._computeRadarPts2(),this._createScanCone(),this._isNeedUpdate=!0)}},rotate:{get:function(){return new WebGLPlot.Cartesian3(WebGLPlot.CesiumMath.toDegrees(this._rotate.x),WebGLPlot.CesiumMath.toDegrees(this._rotate.y),WebGLPlot.CesiumMath.toDegrees(this._rotate.z)-45)},set:function(e){if(e instanceof WebGLPlot.Cartesian3||e instanceof _0x45ea17){e.z<0&&(e.z+=360);let t=new WebGLPlot.Cartesian3(WebGLPlot.CesiumMath.toRadians(e.x),WebGLPlot.CesiumMath.toRadians(e.y),WebGLPlot.CesiumMath.toRadians(e.z+45));WebGLPlot.Cartesian3.equals(t,this._rotate)||(this._rotate=t,this._updatedRadarPrimitive(),this._updated_Scan(0))}}},offset:{get:function(){return this._offset},set:function(e){(e instanceof WebGLPlot.Cartesian3||e instanceof _0x45ea17)&&!_0x45ea17.equals(e,this._offset)&&(this._offset=e,this._isNeedUpdate=!0)}},scanedColor:{get:function(){return this._scanedColor},set:function(e){e instanceof WebGLPlot.Color&&!WebGLPlot.Color.equals(e,this._scanedColor)&&(this._scanedColor=e,this._createRadarPrimitive())}},fillColor:{get:function(){return this._fillColor},set:function(e){e instanceof WebGLPlot.Color&&!WebGLPlot.Color.equals(e,this._fillColor)&&(this._fillColor=e,this._createRadarPrimitive())}},scanConeColor:{get:function(){return this._scanConeColor},set:function(e){e instanceof WebGLPlot.Color&&!WebGLPlot.Color.equals(e,this._scanConeColor)&&(this._scanConeColor=e,this.scanCone&&(this.scanCone.material=e))}}});const _0x148bd1=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x35ba3b=_0x148bd1(void 0,(function(){return _0x35ba3b.toString().search("(((.+)+)+)+$").toString().constructor(_0x35ba3b).search("(((.+)+)+)+$")}));_0x35ba3b();class _0x1a1490 extends _0x24ebc9{constructor(e){super(e),e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._radarType=_0x1416c0.PlotScanRadar,this._name=WebGLPlot$g.defaultValue(e.name,_0x5f28ea.getDefaultName({effectType:this._type,radarType:this._radarType})),this._UUID="GeoEntityEffectScanRadar_"+WebGLPlot$g.createGuid(),this._pntOffset=WebGLPlot$g.defaultValue(e.pntOffset,new _0x45ea17(0,0,0)),this._scanSpeed=WebGLPlot$g.defaultValue(e.scanSpeed,30),this._bChangeSizeFlowModel=WebGLPlot$g.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot$g.defaultValue(e.radius,15e4),this._scanVAngle=WebGLPlot$g.defaultValue(e.scanVAngle,30),this._scanHAngle=WebGLPlot$g.defaultValue(e.scanHAngle,90),this._cellAngle=WebGLPlot$g.defaultValue(e.cellAngle,5),this._scanColor=WebGLPlot$g.defaultValue(e.scanColor,new WebGLPlot$g.Color(1,0,0,.3)),this._scanedColor=WebGLPlot$g.defaultValue(e.scanedColor,new WebGLPlot$g.Color(0,1,0,.3)),this._scanRadar=null}setGeoEntityParameter(e,t){if(WebGLPlot$g.defined(this._scanRadar)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()){let t=_0x1569f6.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$g.defined(t)&&(this._scanRadar.point=t)}if(e.getShowMode()==_0x3f7d9f.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())&&(this._scanRadar.rotate=e.getModelRotate()),e.getShowMode()==_0x3f7d9f.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$g.defined(this._geoEntityParameter)||!WebGLPlot$g.defined(this._pntOffset))return null;let t=_0x1569f6.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$g.defined(t))return null;let i=new _0x45ea17(0,0,0);return this._geoEntityParameter.getShowMode()==_0x3f7d9f.Marker&&(i=this._geoEntityParameter.getModelRotate()),this._scanRadar=new _0x33eab6({id:this._UUID,point:t,rotate:new WebGLPlot$g.Cartesian3(i.x,i.y,i.z-45),scale:this._radius,dScanSpeed:this._scanSpeed,shadows:this._shadows,scanVAngle:this._scanVAngle,scanHAngle:this._scanHAngle,cellAngle:this._cellAngle,isFill:this._isFill,fillColor:this._fillColor,isOutline:this._isOutline,outlineColor:this._outlineColor,outlineWidth:1,isShowScan:this._isShowScan,scanColor:this._scanColor,scanedColor:this._scanedColor,show:!0},e),!!WebGLPlot$g.defined(this._scanRadar)}_removeEffectFromScene(e){WebGLPlot$g.defined(this._scanRadar)&&(this._scanRadar.destroy(),this._scanRadar=null)}toJSON(){let e=super.toJSON(),t=JSON.parse(e);return t.hasOwnProperty("radarType")||(t.radarType=this._radarType),t.hasOwnProperty("radius")||(t.radius=this._radius),t.hasOwnProperty("scanVAngle")||(t.scanVAngle=this._scanVAngle),t.hasOwnProperty("scanHAngle")||(t.scanHAngle=this._scanHAngle),t.hasOwnProperty("cellAngle")||(t.cellAngle=this._cellAngle),t.hasOwnProperty("scanColor")||(t.scanColor=this._scanColor.toCssColorString()),t.hasOwnProperty("scanedColor")||(t.scanedColor=this._scanedColor.toCssColorString()),JSON.stringify(t)}fromJSON(e){super.fromJSON(e);let t=JSON.parse(e);WebGLPlot$g.defined(t.radarType)&&(this._radarType=t.radarType),WebGLPlot$g.defined(t.radius)&&(this._radius=t.radius),WebGLPlot$g.defined(t.scanVAngle)&&(this._scanVAngle=t.scanVAngle),WebGLPlot$g.defined(t.scanHAngle)&&(this._scanHAngle=t.scanHAngle),WebGLPlot$g.defined(t.cellAngle)&&(this._cellAngle=t.cellAngle),WebGLPlot$g.defined(t.scanColor)&&(this._scanColor=WebGLPlot$g.Color.fromCssColorString(t.scanColor)),WebGLPlot$g.defined(t.scanedColor)&&(this._scanedColor=WebGLPlot$g.Color.fromCssColorString(t.scanedColor))}clone(){let e=new _0x1a1490;e._UUID=this._UUID,e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x45ea17(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._scanSpeed=this._scanSpeed,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth;let t=[];for(let e=0;e<this._arrGeoEntityEffectRadarScans.length;e++)t.push(this._arrGeoEntityEffectRadarScans[e].clone());return e._arrGeoEntityEffectRadarScans=t,e._radarType=this._radarType,e._radius=this._radius,e._scanVAngle=this._scanVAngle,e._scanHAngle=this._scanHAngle,e._cellAngle=this._cellAngle,e._scanColor=this._scanColor.clone(),e._scanedColor=this._scanedColor.clone(),e}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}setScanVAngle(e){this._scanVAngle=e,this._initialized=!1}getScanVAngle(){return this._scanVAngle}setScanHAngle(e){this._scanHAngle=e,this._initialized=!1}getScanHAngle(){return this._scanHAngle}setCellAngle(e){this._cellAngle=e,this._initialized=!1}getCellAngle(){return this._cellAngle}setScanColor(e){this._scanColor=e,this._initialized=!1}getScanColor(){return this._scanColor}setScanedColor(e){this._scanedColor=e,this._initialized=!1}getScanedColor(){return this._scanedColor}}const _0x7a3da8=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x30819f=_0x7a3da8(void 0,(function(){return _0x30819f.toString().search("(((.+)+)+)+$").toString().constructor(_0x30819f).search("(((.+)+)+)+$")}));_0x30819f();class _0x2ffa4d extends _0x24ebc9{constructor(e){super(e),e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._radarType=_0x1416c0.PlotRotateRadar,this._name=WebGLPlot$g.defaultValue(e.name,_0x5f28ea.getDefaultName({effectType:this._type,radarType:this._radarType})),this._UUID="GeoEntityEffectRotateRadar_"+WebGLPlot$g.createGuid(),this._pntOffset=WebGLPlot$g.defaultValue(e.pntOffset,new _0x45ea17(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$g.defaultValue(e.bChangeSizeFlowModel,!0);var t=[new WebGLPlot$g.Cartesian3(0,2e3,0),new WebGLPlot$g.Cartesian3(2e4,8e3,0),new WebGLPlot$g.Cartesian3(4e4,2e3,0),new WebGLPlot$g.Cartesian3(0,2e3,0)];this._customPts=WebGLPlot$g.defaultValue(e.customPts,t),this._customAngle=WebGLPlot$g.defaultValue(e.customAngle,360),this._rotateRadar=null}setGeoEntityParameter(e,t){if(WebGLPlot$g.defined(this._rotateRadar)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()){let t=_0x1569f6.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$g.defined(t)&&(this._rotateRadar.point=t)}if(e.getShowMode()==_0x3f7d9f.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())&&(this._rotateRadar.rotate=e.getModelRotate()),e.getShowMode()==_0x3f7d9f.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._rotateRadar.scale*=t}}this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$g.defined(this._geoEntityParameter)||!WebGLPlot$g.defined(this._pntOffset))return null;let t=_0x1569f6.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$g.defined(t))return null;let i=new _0x45ea17(0,0,0);if(this._geoEntityParameter.getShowMode()==_0x3f7d9f.Marker&&(i=this._geoEntityParameter.getModelRotate()),this._rotateRadar=new _0x508ffd({id:this._UUID,point:t,rotate:new WebGLPlot$g.Cartesian3(i.x,i.y,i.z-45),dScanSpeed:this._scanSpeed,shadows:this._shadows,isFill:this._isFill,fillColor:this._fillColor,isOutline:this._isOutline,outlineColor:this._outlineColor,outlineWidth:1,isShowScan:this._isShowScan,scanCount:this._arrGeoEntityEffectRadarScans.length,scanColor:this._scanColor,customPts:this._customPts,rotateAngle:this._customAngle,slicePartitions:this._customAngle/5,show:!0},e),!WebGLPlot$g.defined(this._rotateRadar))return!1;this._rotateRadar.scale=this._geoEntityParameter.getModelScale();let n=this._rotateRadar.getScanArray();for(let e=0;e<n.length;e++)this._arrGeoEntityEffectRadarScans[e]._updateScan(n[e]);return this._rotateRadar.setScanArray(n),this._initialized=!0,!0}_removeEffectFromScene(e){WebGLPlot$g.defined(this._rotateRadar)&&(this._rotateRadar.destroy(),this._rotateRadar=null)}toJSON(){let e=super.toJSON(),t=JSON.parse(e);t.hasOwnProperty("radarType")||(t.radarType=this._radarType),t.hasOwnProperty("customAngle")||(t.customAngle=this._customAngle);return t.hasOwnProperty("customPts")||(t.customPts=[]),this._customPts.forEach((e=>{t.customPts.push({x:e.x,y:e.y,z:e.z})})),JSON.stringify(t)}fromJSON(e){super.fromJSON(e);let t=JSON.parse(e);WebGLPlot$g.defined(t.radarType)&&(this._radarType=t.radarType),WebGLPlot$g.defined(t.customAngle)&&(this._customAngle=t.customAngle),WebGLPlot$g.defined(t.customPts)&&(this._customPts=[],t.customPts.forEach((e=>{this._customPts.push(new WebGLPlot$g.Cartesian3(e.x,e.y,e.z))})))}clone(){let e=new _0x2ffa4d;e._UUID=this._UUID,e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x45ea17(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._scanSpeed=this._scanSpeed,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth;let t=[];for(let e=0;e<this._arrGeoEntityEffectRadarScans.length;e++)t.push(this._arrGeoEntityEffectRadarScans[e].clone());return e._arrGeoEntityEffectRadarScans=t,e._radarType=this._radarType,e._customAngle=this._customAngle,e._customPts=[],this._customPts.forEach((t=>{e._customPts.push(new WebGLPlot$g.Cartesian3(t.x,t.y,t.z))})),e}}const _0xb232d0=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x36c309=_0xb232d0(void 0,(function(){return _0x36c309.toString().search("(((.+)+)+)+$").toString().constructor(_0x36c309).search("(((.+)+)+)+$")}));_0x36c309();class _0x5f28ea{constructor(){}static createGeoEntityEffectFromJson(e){let t,i,n,r,o=JSON.parse(e);return WebGLPlot$g.defined(o.type)&&(i=o.type,o.type===_0x370c4a.COMMUNICATIONLINK?WebGLPlot$g.defined(o.linkType)&&(n=o.linkType):o.type===_0x370c4a.RADAR&&WebGLPlot$g.defined(o.radarType)&&(r=o.radarType),t=this.createGeoEntityEffectFromType({effectType:i,linkType:n,radarType:r}),WebGLPlot$g.defined(t)&&t.fromJSON(e)),t}static createGeoEntityEffectFromType(e){let t,i=(e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT)).effectType,n=e.linkType,r=e.radarType;switch(i){case _0x370c4a.WAKE:case _0x370c4a.ROTORWASH:break;case _0x370c4a.FIRESMOKE:t=new _0x5611a5;break;case _0x370c4a.BURST:t=new _0x59a1d3;break;case _0x370c4a.TAILFLAME:t=new _0x5927c0;break;case _0x370c4a.TAILGAS:t=new _0x12c228;break;case _0x370c4a.RADAR:switch(r){case _0x1416c0.PlotMechanicalRadar:t=new _0x2cd796;break;case _0x1416c0.PlotParameterRadar:t=new _0x2b9951;break;case _0x1416c0.PlotWarningRadar:t=new _0x2412b9;break;case _0x1416c0.PlotScanRadar:t=new _0x1a1490;break;case _0x1416c0.PlotRotateRadar:t=new _0x2ffa4d}break;case _0x370c4a.SCANWAVE:t=new _0x53994b;break;case _0x370c4a.SCANCONE:t=new _0x1d152e;break;case _0x370c4a.DETECTIONCONE:t=new _0x5d5876;break;case _0x370c4a.TRACKLINE:t=new _0x327d5d;break;case _0x370c4a.ATTACKLINE:t=new _0x2035f0;break;case _0x370c4a.SIGN:t=new _0x5db3c1;break;case _0x370c4a.COMMUNICATIONLINK:switch(n){case _0x168c99.BASICLINE:t=new _0x3a2ce6;break;case _0x168c99.ARROW:t=new _0x5be414;break;case _0x168c99.TUBULAR:t=new _0x398ff5;break;case _0x168c99.METEORLINE:t=new _0x44dd6d;break;case _0x168c99.DASHLINE:t=new _0x158030}break;case _0x370c4a.DYNAMICMODEL:t=new _0x7be4ad;break;case _0x370c4a.TEXT:break;case _0x370c4a.EXTENDACTION:t=new _0x3db1bf;break;case _0x370c4a.AUGMENT:t=new _0x34b663;break;case _0x370c4a.ANNULARDIFFUSION:t=new _0x2a14e8}return t}static linkToAnotherGeoEntity(e,t,i){if(!WebGLPlot$g.defined(e)||!WebGLPlot$g.defined(t))return!1;let n=null;if(t.getStartUUID()==e?n=t.getEndUUID():t.getEndUUID()===e&&(n=t.getStartUUID()),!WebGLPlot$g.defined(n))return!1;let r=_0x373a17.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(n);WebGLPlot$g.defined(r)||(r=_0x1569f6.getGeoEntityByUUID(n));let o=!1;return WebGLPlot$g.defined(r)&&(o=i?r._connectLinkToGeoEntity(t):r._disConnectLinkToGeoEntity(t)),o}static getGeoEntityParamByUUID(e){if(!WebGLPlot$g.defined(e))return;let t,i=_0x373a17.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(e);return WebGLPlot$g.defined(i)||(i=_0x1569f6.getGeoEntityByUUID(e)),WebGLPlot$g.defined(i)&&(t=i.getGeoEntityParameter()),t}static getResourceURI(){return _0x373a17.getInstance().getURI()}static getDefaultName(e){let t=(e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT)).effectType,i=e.linkType,n=e.radarType,r="";switch(t){case _0x370c4a.WAKE:case _0x370c4a.ROTORWASH:break;case _0x370c4a.FIRESMOKE:r="燃烧";break;case _0x370c4a.BURST:r="爆炸";break;case _0x370c4a.TAILFLAME:r="尾焰";break;case _0x370c4a.TAILGAS:r="尾气";break;case _0x370c4a.RADAR:switch(n){case _0x1416c0.PlotMechanicalRadar:r="机械雷达";break;case _0x1416c0.PlotParameterRadar:r="参数雷达";break;case _0x1416c0.PlotWarningRadar:r="预警雷达";break;case _0x1416c0.PlotScanRadar:r="扫描雷达";break;case _0x1416c0.PlotRotateRadar:r="旋转雷达"}break;case _0x370c4a.SCANWAVE:r="扫描波";break;case _0x370c4a.SCANCONE:r="扫描棱锥";break;case _0x370c4a.DETECTIONCONE:r="探视锥";break;case _0x370c4a.TRACKLINE:r="尾迹";break;case _0x370c4a.ATTACKLINE:r="攻击线";break;case _0x370c4a.SIGN:r="标牌";break;case _0x370c4a.COMMUNICATIONLINK:switch(i){case _0x168c99.BASICLINE:r="基础线";break;case _0x168c99.ARROW:r="箭头线";break;case _0x168c99.TUBULAR:r="管状线";break;case _0x168c99.METEORLINE:r="流星线";break;case _0x168c99.DASHLINE:r="间断线"}break;case _0x370c4a.DYNAMICMODEL:r="渐变体";break;case _0x370c4a.TEXT:r="文本";break;case _0x370c4a.EXTENDACTION:r="扩展特效";break;case _0x370c4a.AUGMENT:r="增强";break;case _0x370c4a.ANNULARDIFFUSION:r="扩散圆"}return r}static _fromJsonLink(e,t,i){e.forEach(((e,t)=>{if(e.length>0){let i=JSON.parse(e);if(WebGLPlot$g.defined(i.geoEntity)){let e=JSON.parse(i.geoEntity);WebGLPlot$g.defined(e.geoEntityEffects)&&e.geoEntityEffects.forEach((e=>{let i=JSON.parse(e);if(WebGLPlot$g.defined(i.type)&&i.type===_0x370c4a.COMMUNICATIONLINK){let i=_0x5f28ea.createGeoEntityEffectFromJson(e);if(WebGLPlot$g.defined(i)){let e=_0x1569f6.getGeoEntityByUUID(t);WebGLPlot$g.defined(e)&&e.addGeoEntityEffect(i)}}}))}}}))}}const _0x167bde=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x2a5d72=_0x167bde(void 0,(function(){return _0x2a5d72.toString().search("(((.+)+)+)+$").toString().constructor(_0x2a5d72).search("(((.+)+)+)+$")}));_0x2a5d72();class _0x5bd415{constructor(e){this._geoGraphicObject=e,this._name="",this._geoEntityEffects=[],this._getScene().preUpdate.addEventListener((()=>{this._autoChangeStatusFunc()})),this._isModified=!1,this._isMoveGeoEntity=!1,this._autoChangeDisplayStatus=!1,this._mapDistanceDisplayStatus=new Map,this._defaultDisplayStatus=new _0x2654ba;let t=this._getDefaultGeoEntityParameter();WebGLPlot$g.defined(t)&&this._defaultDisplayStatus._updateGeoEntityParameterValue(t),this._isDisplayStatusChange=!1,this._curDistance=void 0,this._changeByDistance=!1}_setIsMoveGeoEntity(e){this._isMoveGeoEntity=e}_autoChangeStatusFunc(){if(this._autoChangeDisplayStatus){let e,t=this._geoGraphicObject.localPoints[0],i=_0x1569f6.calcCameraDistance(t,this._getScene()),n=new Map([...this._mapDistanceDisplayStatus].sort(((e,t)=>t[0]-e[0])));for(let[t,r]of n.entries())if(i>t){e=t;break}if(this._curDistance!==e||this._isDisplayStatusChange){this._isDisplayStatusChange=!1,this._changeByDistance=!0,this._curDistance=e;let t=this._mapDistanceDisplayStatus.get(e);WebGLPlot$g.defined(t)?this._setDisplayStatus(t.clone()):this._setDefaultDisplayStatus(this._defaultDisplayStatus.clone()),this._changeByDistance=!1}}}_getGeoGraphicObject(){return this._geoGraphicObject}_getScene(){return this._geoGraphicObject.layer._scene}_isModify(){if(!this._isModified)for(let e=0;e<this._geoEntityEffects.length;e++)if(this._geoEntityEffects[e]._isModify()){this._isModified=!0;break}return this._isModified}_setIsModify(e){this._isModified=e;for(let t=0;t<this._geoEntityEffects.length;t++)this._geoEntityEffects[t]._setIsModify(e)}_save(){this._isMoveGeoEntity||_0x373a17.getInstance()._saveGeoEntity(!1)}_updateEffectGeoEntityParam(){let e=this.getGeoEntityParameter(),t=new _0x30275b;t.setPosition(e.getPosition().clone()),t.setShowMode(e.getShowMode()),t.setModelPath(e.getModelPath()),t.setModelRotate(e.getModelRotate().clone()),t.setModelScale(e.getModelScale()),t.setVectorRotate(e.getVectorRotate().clone()),t.setVectorScale(e.getVectorScale()),this._geoEntityEffects.forEach((e=>{e.setGeoEntityParameter(t,this.getUUID())}))}_onMouseUpdate(){if(this._autoChangeDisplayStatus){let e=this._defaultDisplayStatus.clone();if(WebGLPlot$g.defined(this._curDistance)){let t=this._mapDistanceDisplayStatus.get(this._curDistance);e._mergeGeoEntityParameterValue(t._getGeoEntityParameter())}this._setDefaultDisplayStatus(e)}else this._defaultDisplayStatus._updateGeoEntityParameterValue(this._getDefaultGeoEntityParameter()),this._updateEffectGeoEntityParam(),this._updateDeductionScript(),this._isMoveGeoEntity||this._modified()}_setDisplayStatus(e){this._setGeoEntityParameter(e._getGeoEntityParameter()),this._setEffectsVisible(e.getDisplayEffectsUUID())}_setDefaultDisplayStatus(e){let t=e._getGeoEntityParameter();t._setIsUpdate(!0),this._setGeoEntityParameter(t),this._setEffectsVisible(e.getDisplayEffectsUUID())}_calcGridSymbolSize(e){if(e.x<=0||e.y<=0)return new WebGLPlot$g.Cartesian2(0,0);var t=new WebGLPlot$g.Cartesian2(254*e.x/96,254*e.y/96);-1===this._geoGraphicObject._gridSymbolSize.x&&-1===this._geoGraphicObject._gridSymbolSize.y?t=this._geoGraphicObject._symbolSizeInLib:-1===this._geoGraphicObject._symbolSizeInLib.x&&-1===this._geoGraphicObject._symbolSizeInLib.y&&(this._geoGraphicObject._symbolSizeInLib=t.clone());var i=this._geoGraphicObject._gridSymbolSize,n=this._geoGraphicObject._symbolSizeInLib,r=t.x/n.x,o=t.y/n.y,a=n.x/n.y;return t.x!==i.x&&t.y!==i.y?r>o?t.y=t.x/a:t.x=t.y*a:t.x!==i.x&&t.y===i.y?t.y=t.x/a:t.x===i.x&&t.y!==i.y&&(t.x=t.y*a),t}_getDefaultGeoEntityParameter(){if(WebGLPlot$g.defined(this._geoGraphicObject)){let e=new _0x30275b,t=new _0x248ebf;return t.getGeoGraphicObjectStyle(this._geoGraphicObject),e._initParm(this._geoGraphicObject.localPoints[0],this._geoGraphicObject.modelScale,this._geoGraphicObject.vectorScale,this._geoGraphicObject.modelRotate,this._geoGraphicObject.vectorRotate,this._geoGraphicObject.modelPath,this._geoGraphicObject.display,this._geoGraphicObject.__dotPlotLibID,this._geoGraphicObject.__dotPlotCode,t,this._geoGraphicObject.pictureSymbolSize,this._geoGraphicObject.gridSymbolSize,this._geoGraphicObject.picturePath,this._geoGraphicObject.getGeoEntityShowMode(),this._autoChangeDisplayStatus,this._mapDistanceDisplayStatus),e}}_modified(){this._isModified=!0,this._save()}_updateDeductionScript(){_0x373a17.getInstance().getDeductionScriptManager().getDeductionScriptGroups().forEach((e=>{e.getDeductionScripts().forEach((e=>{e.getGeoEntityMoveParameterTimes().forEach((t=>{let i=e.getGeoEntityMoveParameter(t);(i.getOriginGeoEntityUUID()===this.getUUID()||i.getTargetGeoEntityUUID()===this.getUUID())&&e.setGeoEntityMoveParameter(t,i)}))}))}))}destroy(){this.clearGeoEntityEffects()}clone(e){e.id=WebGLPlot$g.createGuid();let t=new _0x5bd415(e);t._name=this._name,t._autoChangeDisplayStatus=this._autoChangeDisplayStatus,t._mapDistanceDisplayStatus=new Map,this._mapDistanceDisplayStatus.forEach(((e,i)=>{WebGLPlot$g.defined(i)&&WebGLPlot$g.defined(e)&&t._mapDistanceDisplayStatus.set(i,e.clone())})),t._defaultDisplayStatus=this._defaultDisplayStatus.clone();let i=[];return this._geoEntityEffects.forEach((e=>{let t=e.clone();e.getType()!=_0x370c4a.COMMUNICATIONLINK&&i.push(t)})),t.updateGeoEntityEffects(i),t}setName(e){this._name=e,this._isMoveGeoEntity||this._modified()}getName(){return this._name}setUUID(e){this._geoGraphicObject.id=e}getUUID(){return this._geoGraphicObject.id}setGeoEntityParameter(e){if(WebGLPlot$g.defined(this._geoGraphicObject)&&(this._defaultDisplayStatus._mergeGeoEntityParameterValue(e),e.isAutoChangeDisplayStatusUpdate()&&(this._autoChangeDisplayStatus=e.getAutoChangeDisplayStatus(),this._autoChangeDisplayStatus||this._setDefaultDisplayStatus(this._defaultDisplayStatus.clone())),e.isDistanceDisplayStatusUpdate()&&(this._mapDistanceDisplayStatus=e._mapDistanceDisplayStatus,this._isDisplayStatusChange=!0),this._updateGeoEntityParameter(e),this._updateEffectGeoEntityParam(),!this._isMoveGeoEntity)){let t=this._defaultDisplayStatus._getGeoEntityParameter();0===t._gridSymbolSize.x&&0===t._gridSymbolSize.y&&(t._gridSymbolSize=new WebGLPlot$g.Cartesian2(this._geoGraphicObject._gridSymbolSize.x,this._geoGraphicObject._gridSymbolSize.y)),e.isPositionUpdate()&&this._updateDeductionScript(),this._modified()}}getGeoEntityParameter(){let e=this._defaultDisplayStatus._getGeoEntityParameter();return 0===e._gridSymbolSize.x&&0===e._gridSymbolSize.y&&(e._gridSymbolSize=new WebGLPlot$g.Cartesian2(this._geoGraphicObject._gridSymbolSize.x,this._geoGraphicObject._gridSymbolSize.y)),e}toJson(){if(WebGLPlot$g.defined(this._geoGraphicObject)){let e={};if(!e.hasOwnProperty("geoGraphicObject")){let t=this._geoGraphicObject.getSymbolData();t.symbolRanks=this._geoGraphicObject.symbolRanks,t.modelPath=_0x1569f6.absoluteToRelativePath(t.modelPath),t.picturePath=_0x1569f6.absoluteToRelativePath(t.picturePath),e.geoGraphicObject=JSON.stringify(t)}if(!e.hasOwnProperty("geoEntity")){let t={};t.hasOwnProperty("name")||(t.name=this._name),t.hasOwnProperty("defaultDisplayStatus")||(t.defaultDisplayStatus=this._defaultDisplayStatus._toJson()),t.hasOwnProperty("autoChangeDisplayStatus")||(t.autoChangeDisplayStatus=this._autoChangeDisplayStatus),t.hasOwnProperty("mapDistanceDisplayStatus")||(t.mapDistanceDisplayStatus=[],this._mapDistanceDisplayStatus.forEach(((e,i)=>{t.mapDistanceDisplayStatus.push({distance:i,displayStatus:e._toJson()})}))),t.hasOwnProperty("geoEntityEffects")||(t.geoEntityEffects=[],this._geoEntityEffects.forEach((e=>{(e.getType()!=_0x370c4a.COMMUNICATIONLINK||e.getStartUUID()===this.getUUID())&&t.geoEntityEffects.push(e.toJSON())}))),e.geoEntity=JSON.stringify(t)}return JSON.stringify(e)}return""}fromJson(e){let t=JSON.parse(e);if(WebGLPlot$g.defined(t.geoGraphicObject)){let e=JSON.parse(t.geoGraphicObject);WebGLPlot$g.defined(e.symbolRanks)&&(this._geoGraphicObject._symbolRanks=e.symbolRanks)}if(WebGLPlot$g.defined(t.geoEntity)){let e=JSON.parse(t.geoEntity);WebGLPlot$g.defined(e.name)&&(this._name=e.name),WebGLPlot$g.defined(e.defaultDisplayStatus)&&(this._defaultDisplayStatus=new _0x2654ba,this._defaultDisplayStatus._fromJson(e.defaultDisplayStatus),this._defaultDisplayStatus._getGeoEntityParameter()._setIsUpdate(!1)),WebGLPlot$g.defined(e.autoChangeDisplayStatus)&&(this._autoChangeDisplayStatus=e.autoChangeDisplayStatus),WebGLPlot$g.defined(e.mapDistanceDisplayStatus)&&(this._mapDistanceDisplayStatus=new Map,e.mapDistanceDisplayStatus.forEach((e=>{let t=new _0x2654ba;t._fromJson(e.displayStatus),this._mapDistanceDisplayStatus.set(e.distance,t)}))),WebGLPlot$g.defined(e.geoEntityEffects)&&e.geoEntityEffects.forEach((e=>{let t=_0x5f28ea.createGeoEntityEffectFromJson(e);WebGLPlot$g.defined(t)&&t.getType()!=_0x370c4a.COMMUNICATIONLINK&&this.addGeoEntityEffect(t)}))}this._isModified=!1}getGeoEntityEffects(){return this._geoEntityEffects}addGeoEntityEffect(e){for(let t=0;t<this._geoEntityEffects.length;t++)if(this._geoEntityEffects[t].getUUID()===e.getUUID())return!1;let t=this._getScene();if(WebGLPlot$g.defined(t)){let i=this.getGeoEntityParameter(),n=new _0x30275b;n.setPosition(i.getPosition().clone()),n.setShowMode(i.getShowMode()),n.setModelPath(i.getModelPath()),n.setModelRotate(i.getModelRotate().clone()),n.setModelScale(i.getModelScale()),n.setVectorRotate(i.getVectorRotate().clone()),n.setVectorScale(i.getVectorScale()),e.setGeoEntityParameter(n,this.getUUID()),e.setGeoEntity(this),e.addEffectToScene(t)}return this._geoEntityEffects.push(e),e.isVisible()&&this._defaultDisplayStatus._displayEffectsUUID.push(e.getUUID()),this._mapDistanceDisplayStatus.forEach(((t,i)=>{WebGLPlot$g.defined(i)&&WebGLPlot$g.defined(t)&&t._displayEffectsUUID.push(e.getUUID())})),e.getType()===_0x370c4a.COMMUNICATIONLINK&&_0x5f28ea.linkToAnotherGeoEntity(this.getUUID(),e,!0),this._isMoveGeoEntity||this._modified(),!0}removeGeoEntityEffect(e){for(let t=0;t<this._geoEntityEffects.length;t++){const i=this._geoEntityEffects[t];if(i.getUUID()===e){i.getType()===_0x370c4a.COMMUNICATIONLINK&&_0x5f28ea.linkToAnotherGeoEntity(this.getUUID(),i,!1);let n=this._getScene();WebGLPlot$g.defined(n)&&i.removeEffectFromScene(n);let r=this._defaultDisplayStatus._displayEffectsUUID.indexOf(e);return r>=0&&this._defaultDisplayStatus._displayEffectsUUID.splice(r,1),this._mapDistanceDisplayStatus.forEach(((t,i)=>{if(WebGLPlot$g.defined(i)&&WebGLPlot$g.defined(t)){let i=t._displayEffectsUUID.indexOf(e);i>=0&&t._displayEffectsUUID.splice(i,1)}})),this._geoEntityEffects.splice(t,1),this._isMoveGeoEntity||this._modified(),!0}}return!1}updateGeoEntityEffects(e){let t=this._geoEntityEffects,i=[];t.forEach((e=>{(e.getType()!==_0x370c4a.COMMUNICATIONLINK||e.getStartUUID()===this.getUUID())&&i.push(e.getUUID())}));let n=[];e.forEach((e=>{(e.getType()!==_0x370c4a.COMMUNICATIONLINK||e.getStartUUID()===this.getUUID())&&n.push(e.getUUID())}));let r=[];i.forEach((e=>{-1===n.indexOf(e)&&r.push(e)}));let o=[];e.forEach((e=>{-1===i.indexOf(e.getUUID())&&o.push(e)})),r.forEach((e=>{this.removeGeoEntityEffect(e)})),o.forEach((e=>{this.addGeoEntityEffect(e)})),t.forEach((t=>{for(let i=0;i<e.length;i++){let n=e[i];if(t.getUUID()===n.getUUID()){let e=JSON.parse(t.toJSON()),i=JSON.parse(n.toJSON());t.getType()===_0x370c4a.SIGN&&(e.imageSrc="",i.imageSrc=""),JSON.stringify(e)!==JSON.stringify(i)&&this.updateGeoEntityEffect(n);break}}}))}updateGeoEntityEffect(e){let t=-1;for(let i=0;i<this._geoEntityEffects.length;i++)if(this._geoEntityEffects[i].getUUID()===e.getUUID()){t=i;break}-1!==t&&(this.removeGeoEntityEffect(e.getUUID()),this.addGeoEntityEffect(e),this._isMoveGeoEntity||this._modified())}clearGeoEntityEffects(){this.updateGeoEntityEffects([])}_connectLinkToGeoEntity(e){if(!WebGLPlot$g.defined(e))return!1;for(let t=0;t<this._geoEntityEffects.length;t++)if(this._geoEntityEffects[t].getUUID()===e.getUUID())return!1;return this._geoEntityEffects.push(e),!0}_disConnectLinkToGeoEntity(e){if(!WebGLPlot$g.defined(e))return!1;let t=!1,i=-1;for(let t=0;t<this._geoEntityEffects.length;t++)if(this._geoEntityEffects[t].getUUID()===e.getUUID()){i=t;break}return-1!=i&&(this._geoEntityEffects.splice(i,1),t=!0),t}_setEffectsVisible(e){this._geoEntityEffects.forEach((t=>{let i=t.getUUID();-1!=e.indexOf(i)?t.setVisible(!0):t.setVisible(!1)}))}_setGeoEntityParameter(e){WebGLPlot$g.defined(this._geoGraphicObject)&&(this._updateGeoEntityParameter(e),this._updateEffectGeoEntityParam())}_updateGeoEntityParameter(e){switch(e.isPositionUpdate()&&(this._geoGraphicObject.localPoints[0].x!==e.getPosition().x||this._geoGraphicObject.localPoints[0].y!==e.getPosition().y||this._geoGraphicObject.localPoints[0].z!==e.getPosition().z)&&(this._geoGraphicObject.localPoints=[e.getPosition()]),e.isVisibleUpdate()&&(this._geoGraphicObject.display=e.isVisible()),e.isShowModeUpdate()&&this._geoGraphicObject.setGeoEntityShowMode(e.getShowMode()),this._geoGraphicObject.getGeoEntityShowMode()){case _0x3f7d9f.Marker:e.isModelScaleUpdate()&&(this._geoGraphicObject.modelScale=e.getModelScale()),e.isModelRotateUpdate()&&(this._geoGraphicObject.modelRotate=e.getModelRotate()),e.isModelPathUpdate()&&(this._geoGraphicObject.modelPath=e.getModelPath()),e.isVectorScaleUpdate()&&(this._geoGraphicObject._vectorScale=e.getVectorScale()),e.isVectorRotateUpdate()&&(this._geoGraphicObject._vectorRotate=e.getVectorRotate()),e.isDotPlotLibIDUpdate()&&e.isDotPlotCodeUpdate()?(this._geoGraphicObject.__dotPlotLibID=e.getDotPlotLibID(),this._geoGraphicObject.__dotPlotCode=e.getDotPlotCode()):e.isDotPlotLibIDUpdate()&&!e.isDotPlotCodeUpdate()?this._geoGraphicObject.__dotPlotLibID=e.getDotPlotLibID():!e.isDotPlotLibIDUpdate()&&e.isDotPlotCodeUpdate()&&(this._geoGraphicObject.__dotPlotCode=e.getDotPlotCode()),e.isDotPlotStyleUpdate()&&e.getDotPlotStyle().setGeoGraphicObjectStyle(this._geoGraphicObject),e.isPictureSymbolSizeUpdate()&&(this._geoGraphicObject._pictureSymbolSize=e.getPictureSymbolSize()),e.isGridSymbolSizeUpdate()&&(this._geoGraphicObject._gridSymbolSize=this._calcGridSymbolSize(e.getGridSymbolSize())),e.isPicturePathUpdate()&&(this._geoGraphicObject._picturePath=e.getPicturePath());break;case _0x3f7d9f.Picture:if(e.isPictureSymbolSizeUpdate()){let t=e.getPictureSymbolSize();this._geoGraphicObject._pictureSymbolSize=t,WebGLPlot$g.defined(this._geoGraphicObject.billboard)&&(this._geoGraphicObject.billboard.width=t.x,this._geoGraphicObject.billboard.height=t.y)}e.isPicturePathUpdate()&&(this._geoGraphicObject.picturePath=e.getPicturePath()),e.isModelScaleUpdate()&&(this._geoGraphicObject._modelScale.x=e.getModelScale()),e.isVectorScaleUpdate()&&(this._geoGraphicObject._vectorScale=e.getVectorScale()),e.isModelRotateUpdate()&&(this._geoGraphicObject._modelRotate=e.getModelRotate()),e.isVectorRotateUpdate()&&(this._geoGraphicObject._vectorRotate=e.getVectorRotate()),e.isModelPathUpdate()&&(this._geoGraphicObject._modelPath=e.getModelPath()),e.isDotPlotLibIDUpdate()&&e.isDotPlotCodeUpdate()?(this._geoGraphicObject.__dotPlotLibID=e.getDotPlotLibID(),this._geoGraphicObject.__dotPlotCode=e.getDotPlotCode()):e.isDotPlotLibIDUpdate()&&!e.isDotPlotCodeUpdate()?this._geoGraphicObject.__dotPlotLibID=e.getDotPlotLibID():!e.isDotPlotLibIDUpdate()&&e.isDotPlotCodeUpdate()&&(this._geoGraphicObject.__dotPlotCode=e.getDotPlotCode()),e.isDotPlotStyleUpdate()&&e.getDotPlotStyle().setGeoGraphicObjectStyle(this._geoGraphicObject),e.isGridSymbolSizeUpdate()&&(this._geoGraphicObject._gridSymbolSize=this._calcGridSymbolSize(e.getGridSymbolSize()));break;case _0x3f7d9f.Vector:e.isVectorScaleUpdate()&&(this._geoGraphicObject.vectorScale=e.getVectorScale()),e.isVectorRotateUpdate()&&(this._geoGraphicObject.vectorRotate=e.getVectorRotate()),e.isDotPlotLibIDUpdate()&&e.isDotPlotCodeUpdate()?(this._geoGraphicObject.__dotPlotLibID=e.getDotPlotLibID(),this._geoGraphicObject.__dotPlotCode=e.getDotPlotCode(),this._geoGraphicObject.setGeoEntityShowMode(this._geoGraphicObject.getGeoEntityShowMode())):e.isDotPlotLibIDUpdate()&&!e.isDotPlotCodeUpdate()?(this._geoGraphicObject.__dotPlotLibID=e.getDotPlotLibID(),this._geoGraphicObject.setGeoEntityShowMode(this._geoGraphicObject.getGeoEntityShowMode())):!e.isDotPlotLibIDUpdate()&&e.isDotPlotCodeUpdate()&&(this._geoGraphicObject.__dotPlotCode=e.getDotPlotCode(),this._geoGraphicObject.setGeoEntityShowMode(this._geoGraphicObject.getGeoEntityShowMode())),e.isDotPlotStyleUpdate()&&e.getDotPlotStyle().setGeoGraphicObjectStyle(this._geoGraphicObject),e.isModelScaleUpdate()&&(this._geoGraphicObject._modelScale.x=e.getModelScale()),e.isModelRotateUpdate()&&(this._geoGraphicObject._modelRotate=e.getModelRotate()),e.isModelPathUpdate()&&(this._geoGraphicObject._modelPath=e.getModelPath()),e.isPictureSymbolSizeUpdate()&&(this._geoGraphicObject._pictureSymbolSize=e.getPictureSymbolSize()),e.isGridSymbolSizeUpdate()&&(this._geoGraphicObject._gridSymbolSize=this._calcGridSymbolSize(e.getGridSymbolSize())),e.isPicturePathUpdate()&&(this._geoGraphicObject._picturePath=e.getPicturePath());break;case _0x3f7d9f.Grid:if(e.isDotPlotLibIDUpdate()&&e.isDotPlotCodeUpdate()?(this._geoGraphicObject.__dotPlotLibID=e.getDotPlotLibID(),this._geoGraphicObject.__dotPlotCode=e.getDotPlotCode(),this._geoGraphicObject.setGeoEntityShowMode(this._geoGraphicObject.getGeoEntityShowMode())):e.isDotPlotLibIDUpdate()&&!e.isDotPlotCodeUpdate()?(this._geoGraphicObject.__dotPlotLibID=e.getDotPlotLibID(),this._geoGraphicObject.setGeoEntityShowMode(this._geoGraphicObject.getGeoEntityShowMode())):!e.isDotPlotLibIDUpdate()&&e.isDotPlotCodeUpdate()&&(this._geoGraphicObject.__dotPlotCode=e.getDotPlotCode(),this._geoGraphicObject.setGeoEntityShowMode(this._geoGraphicObject.getGeoEntityShowMode())),e.isDotPlotStyleUpdate()&&e.getDotPlotStyle().setGeoGraphicObjectStyle(this._geoGraphicObject),e.isGridSymbolSizeUpdate()){let n=this._calcGridSymbolSize(e.getGridSymbolSize()),r=this._geoGraphicObject._gridSymbolSize;var t=n.x/r.x,i=n.y/r.y;let o;o=t>i?t:i,this._geoGraphicObject._gridSymbolSize=n,WebGLPlot$g.defined(this._geoGraphicObject.billboard)&&(this._geoGraphicObject.billboard.scale=this._geoGraphicObject.billboard.scale*o)}e.isModelScaleUpdate()&&(this._geoGraphicObject._modelScale.x=e.getModelScale()),e.isVectorScaleUpdate()&&(this._geoGraphicObject._vectorScale=e.getVectorScale()),e.isModelRotateUpdate()&&(this._geoGraphicObject._modelRotate=e.getModelRotate()),e.isVectorRotateUpdate()&&(this._geoGraphicObject._vectorRotate=e.getVectorRotate()),e.isModelPathUpdate()&&(this._geoGraphicObject._modelPath=e.getModelPath()),e.isPictureSymbolSizeUpdate()&&(this._geoGraphicObject._pictureSymbolSize=e.getPictureSymbolSize()),e.isPicturePathUpdate()&&(this._geoGraphicObject._picturePath=e.getPicturePath())}}}const _0x13575f=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0xb65d1a=_0x13575f(void 0,(function(){return _0xb65d1a.toString().search("(((.+)+)+)+$").toString().constructor(_0xb65d1a).search("(((.+)+)+)+$")}));_0xb65d1a();class _0x2d71fc{constructor(){this._geoEntitys=new Map,this._geoEntityRootNode=new _0x47ddb3("GeoEntityRootNode",!0),this._geoEntityLayer=void 0,this._geoEntityEditControl=void 0,this._geoEntityDrawControl=void 0,this._addGeoEntitys=[],this._removeEntityUUIDs=[],this._geoEntityAdded=new WebGLPlot$g.Event,this._geoEntityDeleted=new WebGLPlot$g.Event,this._geoEntityBeforeDeleted=new WebGLPlot$g.Event,this._geoEntityModified=new WebGLPlot$g.Event,this._geoEntityUpdated=new WebGLPlot$g.Event,this._geoEntityDestroyed=new WebGLPlot$g.Event,this._geoEntitySelected=new WebGLPlot$g.Event,this._geoEntityUnSelected=new WebGLPlot$g.Event}_setScene(e){this._geoEntityLayer=new _0x4ab86a(e,"GeoEntitys"),e.plotLayers.add(this._geoEntityLayer),this._geoEntityEditControl=new _0x5523fd(e,this._geoEntityLayer),this._geoEntityDrawControl=new _0x39c322(e,this._geoEntityLayer),this._registerEvent(),this.addGeoEntityModifiedEvent(((e,t)=>{WebGLPlot$g.defined(t)&&t.isMouseEdit&&e._onMouseUpdate()}))}_getAddAndRemoveGeoEntitys(){return{add:this._addGeoEntitys,remove:this._removeEntityUUIDs}}_clearAddAndRemoveGeoEntitys(){this._addGeoEntitys.splice(0),this._removeEntityUUIDs.splice(0)}_save(){_0x373a17.getInstance()._saveGeoEntity(!1)}_removeAllGeoEntityFromScene(){this._geoEntitys.forEach(((e,t)=>{e.clearGeoEntityEffects();let i=e._getGeoGraphicObject();WebGLPlot$g.defined(i)&&this._geoEntityLayer.removeGeoGraphicObject(i)})),this._geoEntitys.clear(),this._geoEntityRootNode._clear()}_registerEvent(){_0x43a805.getInstance().symbolAdded.addEventListener(function(e,t){for(let[i,n]of this._geoEntitys)if(n._getGeoGraphicObject()===e){this._geoEntityAdded.raiseEvent(n,t);break}}.bind(this)),_0x43a805.getInstance().symbolDeleted.addEventListener(function(e,t){for(let[i,n]of this._geoEntitys)if(n._getGeoGraphicObject()===e){this._geoEntityDeleted.raiseEvent(n,t);break}}.bind(this)),_0x43a805.getInstance().symbolBeforeDeleted.addEventListener(function(e,t){for(let[i,n]of this._geoEntitys)if(n._getGeoGraphicObject()===e){this._geoEntityBeforeDeleted.raiseEvent(n,t);break}}.bind(this)),_0x43a805.getInstance().symbolModified.addEventListener(function(e,t){for(let[i,n]of this._geoEntitys)if(n._getGeoGraphicObject()===e){this._geoEntityModified.raiseEvent(n,t);break}}.bind(this)),_0x43a805.getInstance().symbolUpdated.addEventListener(function(e){for(let[t,i]of this._geoEntitys)if(i._getGeoGraphicObject()===e){this._geoEntityUpdated.raiseEvent(i);break}}.bind(this)),_0x43a805.getInstance().symbolDestroyed.addEventListener(function(e){this._geoEntityDestroyed.raiseEvent(e)}.bind(this)),_0x43a805.getInstance().symbolSelected.addEventListener(function(e){for(let[t,i]of this._geoEntitys)if(i._getGeoGraphicObject()===e){this._geoEntitySelected.raiseEvent(i);break}}.bind(this)),_0x43a805.getInstance().symbolUnSelected.addEventListener(function(e){for(let[t,i]of this._geoEntitys)if(i.getUUID()===e){this._geoEntityUnSelected.raiseEvent(i);break}}.bind(this))}addGeoEntity(e){if(WebGLPlot$g.defined(this.getGeoEntityByUUID(e.getGeoEntity().getUUID())))return"";if(this._geoEntityLayer.addFeature(e)){let t=new _0x5bd415(e);e.setGeoEntity(t);let i=t.getUUID();return this._geoEntitys.set(i,t),this._geoEntityRootNode.createGeoEntityNode(t),this._addGeoEntitys.push(t),this._save(),i}return""}addGeoEntityModel(e,t,i,n,r){let o=this;this._geoEntityLayer.createSymbol(0,_0x585354.SYMBOL_MODEL,[t],{url:i},(function(t){t.feature.__dotPlotLibID=0,t.feature.__dotPlotCode=99998,t.feature.gridSymbolSize=new WebGLPlot$g.Cartesian2(32,32);let i=_0x373a17.getInstance().getURI();t.feature._picturePath=i+"/iserver/mgis/situationSimulation/Picture/DafaultPicture.png",WebGLPlot$g.defined(r)&&(WebGLPlot$g.defined(r.modelScale)&&(t.feature.modelScale=r.modelScale),WebGLPlot$g.defined(r.modelRotate)&&(t.feature.modelRotate=r.modelRotate),WebGLPlot$g.defined(r.picturePath)&&(t.feature.picturePath=r.picturePath),WebGLPlot$g.defined(r.pictureSymbolSize)&&(t.feature.pictureSymbolSize=r.pictureSymbolSize),WebGLPlot$g.defined(r.plotLibID)&&WebGLPlot$g.defined(r.plotCode)&&(t.feature.__dotPlotLibID=r.plotLibID,t.feature.__dotPlotCode=r.plotCode),WebGLPlot$g.defined(r.dotPlotStyle)&&r.dotPlotStyle.setGeoGraphicObjectStyle(t.feature),WebGLPlot$g.defined(r.vectorScale)&&(t.feature.vectorScale=r.vectorScale),WebGLPlot$g.defined(r.vectorRotate)&&(t.feature.vectorRotate=r.vectorRotate),WebGLPlot$g.defined(r.visible)&&(t.feature.display=r.visible));let a=new _0x5bd415(t.feature);t.feature.setGeoEntity(a),a.setName(e);let s=a.getUUID();o._geoEntitys.set(s,a),o._geoEntityRootNode.createGeoEntityNode(a),"function"==typeof n&&n({UUID:s}),o._addGeoEntitys.push(a),o._save()}))}addGeoEntityPicture(e,t,i,n,r){let o=this;this._geoEntityLayer.createSymbol(0,_0x585354.SYMBOL_PICTURE,[t],{url:i},(function(t){t.feature.__dotPlotLibID=0,t.feature.__dotPlotCode=99998,t.feature.gridSymbolSize=new WebGLPlot$g.Cartesian2(32,32);let i=_0x373a17.getInstance().getURI();t.feature._modelPath=i+"/iserver/mgis/situationSimulation/Model/DafaultModel.gltf",WebGLPlot$g.defined(r)&&(WebGLPlot$g.defined(r.modelScale)&&(t.feature.modelScale=r.modelScale),WebGLPlot$g.defined(r.modelRotate)&&(t.feature.modelRotate=r.modelRotate),WebGLPlot$g.defined(r.modelPath)&&(t.feature.modelPath=r.modelPath),WebGLPlot$g.defined(r.pictureSymbolSize)&&(t.feature.pictureSymbolSize=r.pictureSymbolSize),WebGLPlot$g.defined(r.plotLibID)&&WebGLPlot$g.defined(r.plotCode)&&(t.feature.__dotPlotLibID=r.plotLibID,t.feature.__dotPlotCode=r.plotCode),WebGLPlot$g.defined(r.dotPlotStyle)&&r.dotPlotStyle.setGeoGraphicObjectStyle(t.feature),WebGLPlot$g.defined(r.vectorScale)&&(t.feature.vectorScale=r.vectorScale),WebGLPlot$g.defined(r.vectorRotate)&&(t.feature.vectorRotate=r.vectorRotate),WebGLPlot$g.defined(r.visible)&&(t.feature.display=r.visible));let a=new _0x5bd415(t.feature);t.feature.setGeoEntity(a),a.setName(e);let s=a.getUUID();o._geoEntitys.set(s,a),o._geoEntityRootNode.createGeoEntityNode(a),"function"==typeof n&&n({UUID:s}),o._addGeoEntitys.push(a),o._save()}))}addGeoEntityDotPlot(e,t,i,n,r,o){let a=this;this._geoEntityLayer.createSymbol(i,n,[t],(function(t){t.feature.__dotPlotLibID=t.feature.libID,t.feature.__dotPlotCode=t.feature.code;let i=_0x373a17.getInstance().getURI();t.feature._modelPath=i+"/iserver/mgis/situationSimulation/Model/DafaultModel.gltf",t.feature._picturePath=i+"/iserver/mgis/situationSimulation/Picture/DafaultPicture.png",WebGLPlot$g.defined(o)&&(WebGLPlot$g.defined(o.modelScale)&&(t.feature.modelScale=o.modelScale),WebGLPlot$g.defined(o.modelRotate)&&(t.feature.modelRotate=o.modelRotate),WebGLPlot$g.defined(o.modelPath)&&(t.feature.modelPath=o.modelPath),WebGLPlot$g.defined(o.picturePath)&&(t.feature.picturePath=o.picturePath),WebGLPlot$g.defined(o.pictureSymbolSize)&&(t.feature.pictureSymbolSize=o.pictureSymbolSize),WebGLPlot$g.defined(o.dotPlotStyle)&&o.dotPlotStyle.setGeoGraphicObjectStyle(t.feature),WebGLPlot$g.defined(o.vectorScale)&&(t.feature.vectorScale=o.vectorScale),WebGLPlot$g.defined(o.vectorRotate)&&(t.feature.vectorRotate=o.vectorRotate),WebGLPlot$g.defined(o.visible)&&(t.feature.display=o.visible));let n=new _0x5bd415(t.feature);t.feature.setGeoEntity(n),n.setName(e);let s=n.getUUID();a._geoEntitys.set(s,n),a._geoEntityRootNode.createGeoEntityNode(n),"function"==typeof r&&r({UUID:s}),a._addGeoEntitys.push(n),a._save()}))}removeGeoEntity(e){let t=this._geoEntitys.get(e);if(WebGLPlot$g.defined(t)){let i=t._getGeoGraphicObject();if(t.clearGeoEntityEffects(),WebGLPlot$g.defined(i)&&this._geoEntityLayer.removeGeoGraphicObject(i))return this._geoEntityRootNode._removeGeoEntityNode(e),this._geoEntitys.delete(e),this._removeEntityUUIDs.push(e),this._save(),!0}return!1}removeAllGeoEntity(){this._geoEntitys.forEach(((e,t)=>{e.clearGeoEntityEffects();let i=e._getGeoGraphicObject();WebGLPlot$g.defined(i)&&this._geoEntityLayer.removeGeoGraphicObject(i),this._removeEntityUUIDs.push(t)})),this._geoEntitys.clear(),this._geoEntityRootNode._clear(),this._save()}getGeoEntityByUUID(e){return this._geoEntitys.get(e)}isGeoEntityLayerEditable(){return!!WebGLPlot$g.defined(this._geoEntityEditControl)&&this._geoEntityEditControl.isActive()}setGeoEntityLayerEditable(e){WebGLPlot$g.defined(this._geoEntityEditControl)&&(e?this._geoEntityEditControl.activate():this._geoEntityEditControl.deactivate())}getGeoEntityRootNode(){return this._geoEntityRootNode}getGeoEntitys(){return this._geoEntitys}getSelectedGeoEntityUUID(){let e=this._geoEntityLayer.selectedFeature;if(WebGLPlot$g.defined(e))for(let[t,i]of this._geoEntitys)if(i._getGeoGraphicObject()===e)return i.getUUID()}setSelectedGeoEntity(e){let t=this._geoEntitys.get(e);WebGLPlot$g.defined(t)&&this._geoEntityLayer.setSelectedFeature(t._getGeoGraphicObject())}clearSelectGeoEntity(){this._geoEntityLayer.releaseSelection()}addGeoEntityAddedEvent(e){this._geoEntityAdded.addEventListener(e)}addGeoEntityDeletedEvent(e){this._geoEntityDeleted.addEventListener(e)}addGeoEntityBeforeDeletedEvent(e){this._geoEntityBeforeDeleted.addEventListener(e)}addGeoEntityModifiedEvent(e){this._geoEntityModified.addEventListener(e)}addGeoEntitUpdatedEvent(e){this._geoEntityUpdated.addEventListener(e)}addGeoEntitDestroyedEvent(e){this._geoEntityDestroyed.addEventListener(e)}addGeoEntitySelectedEvent(e){this._geoEntitySelected.addEventListener(e)}addGeoEntityUnSelectedEvent(e){this._geoEntityUnSelected.addEventListener(e)}toJson(){let e=new Map;this._geoEntitys.forEach(((t,i)=>{e.set(t.getUUID(),t.toJson())}));let t=this._geoEntityRootNode._toJson();return{geoEntityJsons:e,geoEntityNodeJson:t}}fromJson(e,t){let i=e.geoEntityJsons,n=e.geoEntityNodeJson;if(this.removeAllGeoEntity(!1),WebGLPlot$g.defined(this._geoEntityLayer)){let e=this,n=[];i.forEach(((r,o)=>{if(r.length>0){let a=JSON.parse(r);if(WebGLPlot$g.defined(a.geoGraphicObject)){let s=JSON.parse(a.geoGraphicObject);s.modelPath=_0x1569f6.relativeToAbsolutePath(s.modelPath),s.picturePath=_0x1569f6.relativeToAbsolutePath(s.picturePath),this._geoEntityLayer.geoJsonToGeoGraphicObject(s,(function(a){let s=a.feature;if(WebGLPlot$g.defined(s)){let a=new _0x5bd415(s);s.setGeoEntity(a),a.fromJson(r),e._geoEntitys.set(o,a),n.push(o),"function"==typeof t&&n.length===i.size&&t({UUIDs:n})}}))}}}))}this._geoEntityRootNode._clear(),n.length>0&&this._geoEntityRootNode._fromJson(n,this._geoEntityRootNode)}}function _0x559c70(e){e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),WebGLPlot$g.PolylineCollection.call(this,e),this._visible=WebGLPlot$g.defaultValue(e.visible,!0),this._orbitsWidth=WebGLPlot$g.defaultValue(e.orbitsWidth,1),this._orbitsColor=WebGLPlot$g.defaultValue(e.orbitsColor,new WebGLPlot$g.Color(.8,.8,.2,.39)),this._initialized=!1}(function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=function(){const e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=function(){};r.prototype=WebGLPlot$g.PolylineCollection.prototype,_0x559c70.prototype=new r,_0x559c70.prototype.constructor=_0x559c70,_0x559c70.prototype.update=function(e){!this._visible&&!this._initialized||(r.prototype.update.apply(this,Array.prototype.slice.apply(arguments)),this._initialized&&(this._initialized=!1))}})(),Object.defineProperties(_0x559c70.prototype,{visible:{get:function(){return this._visible},set:function(e){this._visible=e,this._initialized=!0}},orbitsWidth:{get:function(){return this._orbitsWidth},set:function(e){for(let t=0;t<this.length;t++)this.get(t).width=e;this._orbitsWidth=e,this._initialized=!0}},orbitsColor:{get:function(){return this._orbitsColor},set:function(e){for(let t=0;t<this.length;t++)this.get(t).material=WebGLPlot$g.Material.fromType("Color",{color:e});this._orbitsColor=e,this._initialized=!0}}}),function(e,t){var i,n=(i=!0,function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}),r=function(){var e=n(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var t=!0;return function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}}(),o=function(){var e=r(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var t=!0;return function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}}(),a=o(this,(function(){return a.toString().search("(((.+)+)+)+$").toString().constructor(a).search("(((.+)+)+)+$")}));a(),"object"==typeof exports&&typeof module<"u"?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).SatelliteToolkit=t()}(void 0,(function(){var e=Math.PI,t=2*e,i=e/180,n=180/e,r=1440,o=398600.8,a=6378.135,s=60/Math.sqrt(650942.9922085947),l=a*s/60,u=1/s,c=.001082616,h=-253881e-11,d=-165597e-11,f=h/c,p=2/3;function _(e,t){for(var i=[31,e%4==0?29:28,31,30,31,30,31,31,30,31,30,31],n=Math.floor(t),r=1,o=0;n>o+i[r-1]&&r<12;)o+=i[r-1],r+=1;var a=r,s=n-o,l=24*(t-n),u=Math.floor(l);l=60*(l-u);var c=Math.floor(l);return{mon:a,day:s,hr:u,minute:c,sec:60*(l-c)}}function m(e,t,i,n,r,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;return 367*e-Math.floor(7*(e+Math.floor((t+9)/12))*.25)+Math.floor(275*t/9)+i+1721013.5+((a/6e4+o/60+r)/60+n)/24}function $(e,t,i,n,r,o,a){if(e instanceof Date){var s=e;return m(s.getUTCFullYear(),s.getUTCMonth()+1,s.getUTCDate(),s.getUTCHours(),s.getUTCMinutes(),s.getUTCSeconds(),s.getUTCMilliseconds())}return m(e,t,i,n,r,o,a)}function g(i,n){var r,o,a,s,l,u,c,h,d,f,p,_,m,$,g,y,v,x,b=i.e3,S=i.ee2,w=i.peo,C=i.pgho,T=i.pho,P=i.pinco,E=i.plo,A=i.se2,L=i.se3,M=i.sgh2,I=i.sgh3,O=i.sgh4,D=i.sh2,R=i.sh3,N=i.si2,F=i.si3,B=i.sl2,z=i.sl3,G=i.sl4,k=i.t,U=i.xgh2,V=i.xgh3,W=i.xgh4,H=i.xh2,Y=i.xh3,j=i.xi2,q=i.xi3,X=i.xl2,K=i.xl3,Z=i.xl4,J=i.zmol,Q=i.zmos,ee=n.init,te=n.opsmode,ie=n.ep,ne=n.inclp,re=n.nodep,oe=n.argpp,ae=n.mp;x=Q+119459e-10*k,"y"===ee&&(x=Q),v=x+.0335*Math.sin(x);var se=A*(c=.5*($=Math.sin(v))*$-.25)+L*(h=-.5*$*Math.cos(v)),le=N*c+F*h,ue=B*c+z*h+G*$,ce=M*c+I*h+O*$,he=D*c+R*h;return x=J+.00015835218*k,"y"===ee&&(x=J),v=x+.1098*Math.sin(x),d=se+(S*(c=.5*($=Math.sin(v))*$-.25)+b*(h=-.5*$*Math.cos(v))),_=le+(j*c+q*h),m=ue+(X*c+K*h+Z*$),f=ce+(U*c+V*h+W*$),p=he+(H*c+Y*h),"n"===ee&&(m-=E,f-=C,p-=T,ne+=_-=P,ie+=d-=w,s=Math.sin(ne),a=Math.cos(ne),ne>=.2?(oe+=f-=a*(p/=s),re+=p,ae+=m):(r=s*(u=Math.sin(re)),o=s*(l=Math.cos(re)),r+=p*l+_*a*u,o+=-p*u+_*a*l,(re%=t)<0&&"a"===te&&(re+=t),g=ae+oe+a*re,g+=m+f-_*re*s,y=re,(re=Math.atan2(r,o))<0&&"a"===te&&(re+=t),Math.abs(y-re)>e&&(re<y?re+=t:re-=t),oe=g-(ae+=m)-a*re)),{ep:ie,inclp:ne,nodep:re,argpp:oe,mp:ae}}function y(e){var n=(e-2451545)/36525,r=-62e-7*n*n*n+.093104*n*n+3164400184.812866*n+67310.54841;return(r=r*i/240%t)<0&&(r+=t),r}function v(){return(arguments.length<=0?void 0:arguments[0])instanceof Date||arguments.length>1?y($.apply(void 0,arguments)):y.apply(void 0,arguments)}function x(i,n){var r,o,u,c,h,d,_,m,$,y,v,x,b,S,w,C,T,P,E,A,L,M,I,O,D,R;i.t=n,i.error=0;var N=i.mo+i.mdot*i.t,F=i.argpo+i.argpdot*i.t,B=i.nodeo+i.nodedot*i.t;m=F,A=N;var z=i.t*i.t;if(M=B+i.nodecf*z,C=1-i.cc1*i.t,T=i.bstar*i.cc4*i.t,P=i.t2cof*z,1!==i.isimp){d=i.omgcof*i.t;var G=1+i.eta*Math.cos(N);A=N+(w=d+i.xmcof*(G*G*G-i.delmo)),m=F-w,x=(v=z*i.t)*i.t,C=C-i.d2*z-i.d3*v-i.d4*x,T+=i.bstar*i.cc5*(Math.sin(A)-i.sinmao),P=P+i.t3cof*v+x*(i.t4cof+i.t*i.t5cof)}L=i.no;var k=i.ecco;if(E=i.inclo,"d"===i.method){b=i.t;var U=function(e){var i,n,r,o,a,s,l,u,c=e.irez,h=e.d2201,d=e.d2211,f=e.d3210,p=e.d3222,_=e.d4410,m=e.d4422,$=e.d5220,g=e.d5232,y=e.d5421,v=e.d5433,x=e.dedt,b=e.del1,S=e.del2,w=e.del3,C=e.didt,T=e.dmdt,P=e.dnodt,E=e.domdt,A=e.argpo,L=e.argpdot,M=e.t,I=e.tc,O=e.gsto,D=e.xfact,R=e.xlamo,N=e.no,F=e.atime,B=e.em,z=e.argpm,G=e.inclm,k=e.xli,U=e.mm,V=e.xni,W=e.nodem,H=e.nm,Y=.13130908,j=2.8843198,q=.37448087,X=5.7686396,K=.95240898,Z=1.8014998,J=1.050833,Q=4.4108898,ee=259200,te=0,ie=0,ne=(O+.0043752690880113*I)%t;if(B+=x*M,G+=C*M,z+=E*M,W+=P*M,U+=T*M,0!==c){(0===F||M*F<=0||Math.abs(M)<Math.abs(F))&&(F=0,V=N,k=R),i=M>0?720:-720;for(var re=381;381===re;)2!==c?(l=b*Math.sin(k-Y)+S*Math.sin(2*(k-j))+w*Math.sin(3*(k-q)),a=V+D,s=b*Math.cos(k-Y)+2*S*Math.cos(2*(k-j))+3*w*Math.cos(3*(k-q)),s*=a):(r=(u=A+L*F)+u,n=k+k,l=h*Math.sin(r+k-X)+d*Math.sin(k-X)+f*Math.sin(u+k-K)+p*Math.sin(-u+k-K)+_*Math.sin(r+n-Z)+m*Math.sin(n-Z)+$*Math.sin(u+k-J)+g*Math.sin(-u+k-J)+y*Math.sin(u+n-Q)+v*Math.sin(-u+n-Q),a=V+D,s=h*Math.cos(r+k-X)+d*Math.cos(k-X)+f*Math.cos(u+k-K)+p*Math.cos(-u+k-K)+$*Math.cos(u+k-J)+g*Math.cos(-u+k-J)+2*(_*Math.cos(r+n-Z)+m*Math.cos(n-Z)+y*Math.cos(u+n-Q)+v*Math.cos(-u+n-Q)),s*=a),Math.abs(M-F)>=720?re=381:(ie=M-F,re=0),381===re&&(k+=a*i+l*ee,V+=l*i+s*ee,F+=i);H=V+l*ie+s*ie*ie*.5,o=k+a*ie+l*ie*ie*.5,1!==c?(U=o-2*W+2*ne,te=H-N):(U=o-W-z+ne,te=H-N),H=N+te}return{atime:F,em:B,argpm:z,inclm:G,xli:k,mm:U,xni:V,nodem:W,dndt:te,nm:H}}({irez:i.irez,d2201:i.d2201,d2211:i.d2211,d3210:i.d3210,d3222:i.d3222,d4410:i.d4410,d4422:i.d4422,d5220:i.d5220,d5232:i.d5232,d5421:i.d5421,d5433:i.d5433,dedt:i.dedt,del1:i.del1,del2:i.del2,del3:i.del3,didt:i.didt,dmdt:i.dmdt,dnodt:i.dnodt,domdt:i.domdt,argpo:i.argpo,argpdot:i.argpdot,t:i.t,tc:b,gsto:i.gsto,xfact:i.xfact,xlamo:i.xlamo,no:i.no,atime:i.atime,em:k,argpm:m,inclm:E,xli:i.xli,mm:A,xni:i.xni,nodem:M,nm:L});k=U.em,m=U.argpm,E=U.inclm,A=U.mm,M=U.nodem,L=U.nm}if(L<=0)return i.error=2,[!1,!1];var V=Math.pow(s/L,p)*C*C;if(L=s/Math.pow(V,1.5),(k-=T)>=1||k<-.001)return i.error=1,[!1,!1];k<1e-6&&(k=1e-6),O=(A+=i.no*P)+m+M;var W=k;if(I=E,$=m%=t,R=M%=t,D=A=((O%=t)-m-M)%t,c=Math.sin(E),u=Math.cos(E),"d"===i.method){var H=g(i,{inclo:i.inclo,init:"n",ep:W,inclp:I,nodep:R,argpp:$,mp:D,opsmode:i.operationmode});if(W=H.ep,R=H.nodep,$=H.argpp,D=H.mp,(I=H.inclp)<0&&(I=-I,R+=e,$-=e),W<0||W>1)return i.error=3,[!1,!1]}"d"===i.method&&(c=Math.sin(I),u=Math.cos(I),i.aycof=-.5*f*c,Math.abs(u+1)>15e-13?i.xlcof=-.25*f*c*(3+5*u)/(1+u):i.xlcof=-.25*f*c*(3+5*u)/15e-13);var Y=W*Math.cos($);w=1/(V*(1-W*W));var j=W*Math.sin($)+w*i.aycof,q=(D+$+R+w*i.xlcof*Y-R)%t;_=q,S=9999.9;for(var X=1;Math.abs(S)>=1e-12&&X<=10;)o=Math.sin(_),S=(q-j*(r=Math.cos(_))+Y*o-_)/(S=1-r*Y-o*j),Math.abs(S)>=.95&&(S=S>0?.95:-.95),_+=S,X+=1;var K=Y*r+j*o,Z=Y*o-j*r,J=Y*Y+j*j,Q=V*(1-J);if(Q<0)return i.error=4,[!1,!1];var ee=V*(1-K),te=Math.sqrt(V)*Z/ee,ie=Math.sqrt(Q)/ee,ne=Math.sqrt(1-J),re=V/ee*(o-j-Y*(w=Z/(1+ne))),oe=V/ee*(r-Y+j*w);y=Math.atan2(re,oe);var ae=(oe+oe)*re,se=1-2*re*re,le=541308e-9*(w=1/Q),ue=le*w;"d"===i.method&&(h=u*u,i.con41=3*h-1,i.x1mth2=1-h,i.x7thm1=7*h-1);var ce=ee*(1-1.5*ue*ne*i.con41)+.5*le*i.x1mth2*se;if(ce<1)return i.error=6,{position:!1,velocity:!1};y-=.25*ue*i.x7thm1*ae;var he=R+1.5*ue*u*ae,de=I+1.5*ue*u*c*se,fe=te-L*le*i.x1mth2*ae/s,pe=ie+L*le*(i.x1mth2*se+1.5*i.con41)/s,_e=Math.sin(y),me=Math.cos(y),$e=Math.sin(he),ge=Math.cos(he),ye=Math.sin(de),ve=Math.cos(de),xe=-$e*ve,be=ge*ve,Se=xe*_e+ge*me,we=be*_e+$e*me,Ce=ye*_e;return{position:{x:ce*Se*a,y:ce*we*a,z:ce*Ce*a},velocity:{x:(fe*Se+pe*(xe*me-ge*_e))*l,y:(fe*we+pe*(be*me-$e*_e))*l,z:(fe*Ce+pe*(ye*me))*l}}}function b(i,n){var r,o,l,h,d,_,m,$,y,b,S,w,C,T,P,E,A,L,M,I,O,D,R,N,F,B,z,G,k,U,V,W,H,Y,j,q,X,K,Z,J,Q,ee,te,ie,ne,re,oe,ae,se,le,ue,ce,he=n.opsmode,de=n.satn,fe=n.epoch,pe=n.xbstar,_e=n.xecco,me=n.xargpo,$e=n.xinclo,ge=n.xmo,ye=n.xno,ve=n.xnodeo;i.isimp=0,i.method="n",i.aycof=0,i.con41=0,i.cc1=0,i.cc4=0,i.cc5=0,i.d2=0,i.d3=0,i.d4=0,i.delmo=0,i.eta=0,i.argpdot=0,i.omgcof=0,i.sinmao=0,i.t=0,i.t2cof=0,i.t3cof=0,i.t4cof=0,i.t5cof=0,i.x1mth2=0,i.x7thm1=0,i.mdot=0,i.nodedot=0,i.xlcof=0,i.xmcof=0,i.nodecf=0,i.irez=0,i.d2201=0,i.d2211=0,i.d3210=0,i.d3222=0,i.d4410=0,i.d4422=0,i.d5220=0,i.d5232=0,i.d5421=0,i.d5433=0,i.dedt=0,i.del1=0,i.del2=0,i.del3=0,i.didt=0,i.dmdt=0,i.dnodt=0,i.domdt=0,i.e3=0,i.ee2=0,i.peo=0,i.pgho=0,i.pho=0,i.pinco=0,i.plo=0,i.se2=0,i.se3=0,i.sgh2=0,i.sgh3=0,i.sgh4=0,i.sh2=0,i.sh3=0,i.si2=0,i.si3=0,i.sl2=0,i.sl3=0,i.sl4=0,i.gsto=0,i.xfact=0,i.xgh2=0,i.xgh3=0,i.xgh4=0,i.xh2=0,i.xh3=0,i.xi2=0,i.xi3=0,i.xl2=0,i.xl3=0,i.xl4=0,i.xlamo=0,i.zmol=0,i.zmos=0,i.atime=0,i.xli=0,i.xni=0,i.bstar=pe,i.ecco=_e,i.argpo=me,i.inclo=$e,i.mo=ge,i.no=ye,i.nodeo=ve,i.operationmode=he;i.init="y",i.t=0;var xe=function(e){var i=e.ecco,n=e.epoch,r=e.inclo,o=e.opsmode,a=e.no,l=i*i,u=1-l,h=Math.sqrt(u),d=Math.cos(r),f=d*d,_=Math.pow(s/a,p),m=.75*c*(3*f-1)/(h*u),$=m/(_*_),g=_*(1-$*$-$*(1/3+134*$*$/81));a/=1+($=m/(g*g));var y,x=Math.pow(s/a,p),b=Math.sin(r),S=x*u,w=1-5*f,C=-w-f-f,T=1/x,P=S*S,E=x*(1-i);if("a"===o){var A=n-7305,L=Math.floor(A+1e-8),M=.017202791694070362;(y=(1.7321343856509375+M*L+(M+t)*(A-L)+A*A*5075514194322695e-30)%t)<0&&(y+=t)}else y=v(n+2433281.5);return{no:a,method:"n",ainv:T,ao:x,con41:C,con42:w,cosio:d,cosio2:f,eccsq:l,omeosq:u,posq:P,rp:E,rteosq:h,sinio:b,gsto:y}}({satn:de,ecco:i.ecco,epoch:fe,inclo:i.inclo,no:i.no,method:i.method,opsmode:i.operationmode}),be=xe.ao,Se=xe.con42,we=xe.cosio,Ce=xe.cosio2,Te=xe.eccsq,Pe=xe.omeosq,Ee=xe.posq,Ae=xe.rp,Le=xe.rteosq,Me=xe.sinio;if(i.no=xe.no,i.con41=xe.con41,i.gsto=xe.gsto,i.a=Math.pow(i.no*u,-2/3),i.alta=i.a*(1+i.ecco)-1,i.altp=i.a*(1-i.ecco)-1,i.error=0,Pe>=0||i.no>=0){if(i.isimp=0,Ae<220/a+1&&(i.isimp=1),N=1.0122292801892716,L=1.880279159015271e-9,(P=(Ae-1)*a)<156){N=P-78,P<98&&(N=20);var Ie=(120-N)/a;L=Ie*Ie*Ie*Ie,N=N/a+1}E=1/Ee,ee=1/(be-N),i.eta=be*i.ecco*ee,w=i.eta*i.eta,S=i.ecco*i.eta,A=Math.abs(1-w),h=(m=(_=L*Math.pow(ee,4))/Math.pow(A,3.5))*i.no*(be*(1+1.5*w+S*(4+w))+.375*c*ee/A*i.con41*(8+3*w*(8+w))),i.cc1=i.bstar*h,d=0,i.ecco>1e-4&&(d=-2*_*ee*f*i.no*Me/i.ecco),i.x1mth2=1-Ce,i.cc4=2*i.no*m*be*Pe*(i.eta*(2+.5*w)+i.ecco*(.5+2*w)-c*ee/(be*A)*(-3*i.con41*(1-2*S+w*(1.5-.5*S))+.75*i.x1mth2*(2*w-S*(1+w))*Math.cos(2*i.argpo))),i.cc5=2*m*be*Pe*(1+2.75*(w+S)+S*w),$=Ce*Ce,J=.5*(Z=1.5*c*E*i.no)*c*E,Q=7.762359375e-7*E*E*i.no,i.mdot=i.no+.5*Z*Le*i.con41+.0625*J*Le*(13-78*Ce+137*$),i.argpdot=-.5*Z*Se+.0625*J*(7-114*Ce+395*$)+Q*(3-36*Ce+49*$),ie=-Z*we,i.nodedot=ie+(.5*J*(4-19*Ce)+2*Q*(3-7*Ce))*we,te=i.argpdot+i.nodedot,i.omgcof=i.bstar*d*Math.cos(i.argpo),i.xmcof=0,i.ecco>1e-4&&(i.xmcof=-p*_*i.bstar/S),i.nodecf=3.5*Pe*ie*i.cc1,i.t2cof=1.5*i.cc1,Math.abs(we+1)>15e-13?i.xlcof=-.25*f*Me*(3+5*we)/(1+we):i.xlcof=-.25*f*Me*(3+5*we)/15e-13,i.aycof=-.5*f*Me;var Oe=1+i.eta*Math.cos(i.mo);if(i.delmo=Oe*Oe*Oe,i.sinmao=Math.sin(i.mo),i.x7thm1=7*Ce-1,2*e/i.no>=225){i.method="d",i.isimp=1,0,C=i.inclo;var De=function(e){var i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,$,g,y,v,x,b,S,w,C,T,P,E,A,L,M,I,O,D,R,N,F,B,z,G,k,U,V,W,H,Y,j,q,X,K,Z,J,Q,ee,te,ie,ne,re,oe,ae,se,le,ue,ce,he=e.epoch,de=e.ep,fe=e.argpp,pe=e.tc,_e=e.inclp,me=e.nodep,$e=.01675,ge=.0549,ye=e.np,ve=de,xe=Math.sin(me),be=Math.cos(me),Se=Math.sin(fe),we=Math.cos(fe),Ce=Math.sin(_e),Te=Math.cos(_e),Pe=ve*ve,Ee=1-Pe,Ae=Math.sqrt(Ee),Le=he+18261.5+pe/1440,Me=(4.523602-.00092422029*Le)%t,Ie=Math.sin(Me),Oe=Math.cos(Me),De=.91375164-.03568096*Oe,Re=Math.sqrt(1-De*De),Ne=.089683511*Ie/Re,Fe=Math.sqrt(1-Ne*Ne),Be=5.8351514+.001944368*Le,ze=.39785416*Ie/Re,Ge=Fe*Oe+.91744867*Ne*Ie;ze=Math.atan2(ze,Ge),ze+=Be-Me;var ke=Math.cos(ze),Ue=Math.sin(ze);x=.1945905,b=-.98088458,C=.91744867,T=.39785416,S=be,w=xe,d=29864797e-13;for(var Ve=1/ye,We=0;We<2;)ie=-6*(i=x*S+b*C*w)*(a=-Ce*(l=-x*w+b*C*S)+Te*(u=b*T))+Pe*(-24*(f=i*we+(n=Te*l+Ce*u)*Se)*(y=a*we)-6*(_=-i*Se+n*we)*($=a*Se)),ne=-6*(i*(s=-Ce*(c=b*w+x*C*S)+Te*(h=x*T))+(r=-b*S+x*C*w)*a)+Pe*(-24*((p=r*we+(o=Te*c+Ce*h)*Se)*y+f*(v=s*we))+-6*(_*(g=s*Se)+(m=-r*Se+o*we)*$)),re=-6*r*s+Pe*(-24*p*v-6*m*g),oe=6*n*a+Pe*(24*f*$-6*_*y),ae=6*(o*a+n*s)+Pe*(24*(p*$+f*g)-6*(m*y+_*v)),se=6*o*s+Pe*(24*p*g-6*m*v),Q=(Q=3*(i*i+n*n)+(le=12*f*f-3*_*_)*Pe)+Q+Ee*le,ee=(ee=6*(i*r+n*o)+(ue=24*f*p-6*_*m)*Pe)+ee+Ee*ue,te=(te=3*(r*r+o*o)+(ce=12*p*p-3*m*m)*Pe)+te+Ee*ce,j=-.5*(q=d*Ve)/Ae,Y=-15*ve*(X=q*Ae),K=f*_+p*m,Z=p*_+f*m,J=p*m-f*_,1===(We+=1)&&(P=Y,E=j,A=q,L=X,M=K,I=Z,O=J,D=Q,R=ee,N=te,F=ie,B=ne,z=re,G=oe,k=ae,U=se,V=le,W=ue,H=ce,x=ke,b=Ue,C=De,T=Re,S=Fe*be+Ne*xe,w=xe*Fe-be*Ne,d=4.7968065e-7);return{snodm:xe,cnodm:be,sinim:Ce,cosim:Te,sinomm:Se,cosomm:we,day:Le,e3:2*Y*J,ee2:2*Y*Z,em:ve,emsq:Pe,gam:Be,peo:0,pgho:0,pho:0,pinco:0,plo:0,rtemsq:Ae,se2:2*P*I,se3:2*P*O,sgh2:2*L*W,sgh3:2*L*(H-V),sgh4:-18*L*$e,sh2:-2*E*k,sh3:-2*E*(U-G),si2:2*E*B,si3:2*E*(z-F),sl2:-2*A*R,sl3:-2*A*(N-D),sl4:-2*A*(-21-9*Pe)*$e,s1:Y,s2:j,s3:q,s4:X,s5:K,s6:Z,s7:J,ss1:P,ss2:E,ss3:A,ss4:L,ss5:M,ss6:I,ss7:O,sz1:D,sz2:R,sz3:N,sz11:F,sz12:B,sz13:z,sz21:G,sz22:k,sz23:U,sz31:V,sz32:W,sz33:H,xgh2:2*X*ue,xgh3:2*X*(ce-le),xgh4:-18*X*ge,xh2:-2*j*ae,xh3:-2*j*(se-oe),xi2:2*j*ne,xi3:2*j*(re-ie),xl2:-2*q*ee,xl3:-2*q*(te-Q),xl4:-2*q*(-21-9*Pe)*ge,nm:ye,z1:Q,z2:ee,z3:te,z11:ie,z12:ne,z13:re,z21:oe,z22:ae,z23:se,z31:le,z32:ue,z33:ce,zmol:(.2299715*Le-Be+4.7199672)%t,zmos:(6.2565837+.017201977*Le)%t}}({epoch:fe,ep:i.ecco,argpp:i.argpo,tc:0,inclp:i.inclo,nodep:i.nodeo,np:i.no,e3:i.e3,ee2:i.ee2,peo:i.peo,pgho:i.pgho,pho:i.pho,pinco:i.pinco,plo:i.plo,se2:i.se2,se3:i.se3,sgh2:i.sgh2,sgh3:i.sgh3,sgh4:i.sgh4,sh2:i.sh2,sh3:i.sh3,si2:i.si2,si3:i.si3,sl2:i.sl2,sl3:i.sl3,sl4:i.sl4,xgh2:i.xgh2,xgh3:i.xgh3,xgh4:i.xgh4,xh2:i.xh2,xh3:i.xh3,xi2:i.xi2,xi3:i.xi3,xl2:i.xl2,xl3:i.xl3,xl4:i.xl4,zmol:i.zmol,zmos:i.zmos});i.e3=De.e3,i.ee2=De.ee2,i.peo=De.peo,i.pgho=De.pgho,i.pho=De.pho,i.pinco=De.pinco,i.plo=De.plo,i.se2=De.se2,i.se3=De.se3,i.sgh2=De.sgh2,i.sgh3=De.sgh3,i.sgh4=De.sgh4,i.sh2=De.sh2,i.sh3=De.sh3,i.si2=De.si2,i.si3=De.si3,i.sl2=De.sl2,i.sl3=De.sl3,i.sl4=De.sl4,o=De.sinim,r=De.cosim,y=De.em,b=De.emsq,M=De.s1,I=De.s2,O=De.s3,D=De.s4,R=De.s5,F=De.ss1,B=De.ss2,z=De.ss3,G=De.ss4,k=De.ss5,U=De.sz1,V=De.sz3,W=De.sz11,H=De.sz13,Y=De.sz21,j=De.sz23,q=De.sz31,X=De.sz33,i.xgh2=De.xgh2,i.xgh3=De.xgh3,i.xgh4=De.xgh4,i.xh2=De.xh2,i.xh3=De.xh3,i.xi2=De.xi2,i.xi3=De.xi3,i.xl2=De.xl2,i.xl3=De.xl3,i.xl4=De.xl4,i.zmol=De.zmol,i.zmos=De.zmos,T=De.nm,ne=De.z1,re=De.z3,oe=De.z11,ae=De.z13,se=De.z21,le=De.z23,ue=De.z31,ce=De.z33;var Re=g(i,{inclo:C,init:i.init,ep:i.ecco,inclp:i.inclo,nodep:i.nodeo,argpp:i.argpo,mp:i.mo,opsmode:i.operationmode});i.ecco=Re.ep,i.inclo=Re.inclp,i.nodeo=Re.nodep,i.argpo=Re.argpp,i.mo=Re.mp,0,0,0;var Ne=function(i){var n,r,o,a,l,u,c,h,d,f,_,m,$,g,y,v,x,b=i.cosim,S=i.argpo,w=i.s1,C=i.s2,T=i.s3,P=i.s4,E=i.s5,A=i.sinim,L=i.ss1,M=i.ss2,I=i.ss3,O=i.ss4,D=i.ss5,R=i.sz1,N=i.sz3,F=i.sz11,B=i.sz13,z=i.sz21,G=i.sz23,k=i.sz31,U=i.sz33,V=i.t,W=i.tc,H=i.gsto,Y=i.mo,j=i.mdot,q=i.no,X=i.nodeo,K=i.nodedot,Z=i.xpidot,J=i.z1,Q=i.z3,ee=i.z11,te=i.z13,ie=i.z21,ne=i.z23,re=i.z31,oe=i.z33,ae=i.ecco,se=i.eccsq,le=i.emsq,ue=i.em,ce=i.argpm,he=i.inclm,de=i.mm,fe=i.nm,pe=i.nodem,_e=i.irez,me=i.atime,$e=i.d2201,ge=i.d2211,ye=i.d3210,ve=i.d3222,xe=i.d4410,be=i.d4422,Se=i.d5220,we=i.d5232,Ce=i.d5421,Te=i.d5433,Pe=i.dedt,Ee=i.didt,Ae=i.dmdt,Le=i.dnodt,Me=i.domdt,Ie=i.del1,Oe=i.del2,De=i.del3,Re=i.xfact,Ne=i.xlamo,Fe=i.xli,Be=i.xni,ze=.0043752690880113,Ge=.00015835218,ke=119459e-10;_e=0,fe<.0052359877&&fe>.0034906585&&(_e=1),fe>=.00826&&fe<=.00924&&ue>=.5&&(_e=2);var Ue=-ke*M*(z+G);(he<.052359877||he>e-.052359877)&&(Ue=0),0!==A&&(Ue/=A);var Ve=-Ge*C*(ie+ne);(he<.052359877||he>e-.052359877)&&(Ve=0),Me=O*ke*(k+U-6)-b*Ue+P*Ge*(re+oe-6),Le=Ue,0!==A&&(Me-=b/A*Ve,Le+=Ve/A);var We=(H+W*ze)%t;if(ue+=(Pe=L*ke*D+w*Ge*E)*V,he+=(Ee=M*ke*(F+B)+C*Ge*(ee+te))*V,ce+=Me*V,pe+=Le*V,de+=(Ae=-ke*I*(R+N-14-6*le)-Ge*T*(J+Q-14-6*le))*V,0!==_e){if(y=Math.pow(fe/s,p),2===_e){var He=ue,Ye=le;x=(ue=ae)*(le=se),ue<=.65?(o=3.616-13.247*ue+16.29*le,a=117.39*ue-19.302-228.419*le+156.591*x,l=109.7927*ue-18.9068-214.6334*le+146.5816*x,u=242.694*ue-41.122-471.094*le+313.953*x,c=841.88*ue-146.407-1629.014*le+1083.435*x,h=3017.977*ue-532.114-5740.032*le+3708.276*x):(o=331.819*ue-72.099-508.738*le+266.724*x,a=1582.851*ue-346.844-2415.925*le+1246.113*x,l=1554.908*ue-342.585-2366.899*le+1215.972*x,u=4758.686*ue-1052.797-7193.992*le+3651.957*x,c=16178.11*ue-3581.69-24462.77*le+12422.52*x,h=ue>.715?29936.92*ue-5149.66-54087.36*le+31324.56*x:1464.74-4664.75*ue+3763.64*le),ue<.7?(_=4988.61*ue-919.2277-9064.77*le+5542.21*x,d=4568.6173*ue-822.71072-8491.4146*le+5337.524*x,f=4690.25*ue-853.666-8624.77*le+5341.4*x):(_=161616.52*ue-37995.78-229838.2*le+109377.94*x,d=218913.95*ue-51752.104-309468.16*le+146349.42*x,f=170470.89*ue-40023.88-242699.48*le+115605.82*x),$e=($=17891679e-13*(g=fe*fe*3*(y*y)))*(n=.75*(1+2*b+(v=b*b)))*(-.306-.44*(ue-.64)),ge=$*(1.5*(m=A*A))*o,ye=($=3.7393792e-7*(g*=y))*(1.875*A*(1-2*b-3*v))*a,ve=$*(-1.875*A*(1+2*b-3*v))*l,xe=($=2*(g*=y)*7.3636953e-9)*(35*m*n)*u,be=$*(39.375*m*m)*c,Se=($=1.1428639e-7*(g*=y))*(9.84375*A*(m*(1-2*b-5*v)+.33333333*(4*b-2+6*v)))*h,we=$*(A*(4.92187512*m*(-2-4*b+10*v)+6.56250012*(1+2*b-3*v)))*f,Ce=($=2*g*2.1765803e-9)*(29.53125*A*(2-8*b+v*(8*b-12+10*v)))*d,Te=$*(29.53125*A*(-2-8*b+v*(12+8*b-10*v)))*_,Ne=(Y+X+X-(We+We))%t,Re=j+Ae+2*(K+Le-ze)-q,ue=He,le=Ye}1===_e&&(r=1+b,Oe=2*(Ie=3*fe*fe*y*y)*(n=.75*(1+b)*(1+b))*(1+le*(.8125*le-2.5))*17891679e-13,De=3*Ie*(r*=1.875*r*r)*(1+le*(6.60937*le-6))*2.2123015e-7*y,Ie=Ie*(.9375*A*A*(1+3*b)-.75*(1+b))*(a=1+2*le)*21460748e-13*y,Ne=(Y+X+S-We)%t,Re=j+Z+Ae+Me+Le-(q+ze)),Fe=Ne,Be=q,me=0,fe=q+0}return{em:ue,argpm:ce,inclm:he,mm:de,nm:fe,nodem:pe,irez:_e,atime:me,d2201:$e,d2211:ge,d3210:ye,d3222:ve,d4410:xe,d4422:be,d5220:Se,d5232:we,d5421:Ce,d5433:Te,dedt:Pe,didt:Ee,dmdt:Ae,dndt:0,dnodt:Le,domdt:Me,del1:Ie,del2:Oe,del3:De,xfact:Re,xlamo:Ne,xli:Fe,xni:Be}}({cosim:r,emsq:b,argpo:i.argpo,s1:M,s2:I,s3:O,s4:D,s5:R,sinim:o,ss1:F,ss2:B,ss3:z,ss4:G,ss5:k,sz1:U,sz3:V,sz11:W,sz13:H,sz21:Y,sz23:j,sz31:q,sz33:X,t:i.t,tc:0,gsto:i.gsto,mo:i.mo,mdot:i.mdot,no:i.no,nodeo:i.nodeo,nodedot:i.nodedot,xpidot:te,z1:ne,z3:re,z11:oe,z13:ae,z21:se,z23:le,z31:ue,z33:ce,ecco:i.ecco,eccsq:Te,em:y,argpm:0,inclm:C,mm:0,nm:T,nodem:0,irez:i.irez,atime:i.atime,d2201:i.d2201,d2211:i.d2211,d3210:i.d3210,d3222:i.d3222,d4410:i.d4410,d4422:i.d4422,d5220:i.d5220,d5232:i.d5232,d5421:i.d5421,d5433:i.d5433,dedt:i.dedt,didt:i.didt,dmdt:i.dmdt,dnodt:i.dnodt,domdt:i.domdt,del1:i.del1,del2:i.del2,del3:i.del3,xfact:i.xfact,xlamo:i.xlamo,xli:i.xli,xni:i.xni});i.irez=Ne.irez,i.atime=Ne.atime,i.d2201=Ne.d2201,i.d2211=Ne.d2211,i.d3210=Ne.d3210,i.d3222=Ne.d3222,i.d4410=Ne.d4410,i.d4422=Ne.d4422,i.d5220=Ne.d5220,i.d5232=Ne.d5232,i.d5421=Ne.d5421,i.d5433=Ne.d5433,i.dedt=Ne.dedt,i.didt=Ne.didt,i.dmdt=Ne.dmdt,i.dnodt=Ne.dnodt,i.domdt=Ne.domdt,i.del1=Ne.del1,i.del2=Ne.del2,i.del3=Ne.del3,i.xfact=Ne.xfact,i.xlamo=Ne.xlamo,i.xli=Ne.xli,i.xni=Ne.xni}1!==i.isimp&&(l=i.cc1*i.cc1,i.d2=4*be*ee*l,K=i.d2*ee*i.cc1/3,i.d3=(17*be+N)*K,i.d4=.5*K*be*ee*(221*be+31*N)*i.cc1,i.t3cof=i.d2+2*l,i.t4cof=.25*(3*i.d3+i.cc1*(12*i.d2+10*l)),i.t5cof=.2*(3*i.d4+12*i.cc1*i.d3+6*i.d2*i.d2+15*l*(2*i.d2+l)))}x(i,0),i.init="n"}function S(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return w(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if("Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return w(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function C(e){return e*n}function T(e){return e*i}function P(e){var t=e.longitude,i=e.latitude,n=e.height,r=6378.137,o=.006694380004260718,a=r/Math.sqrt(1-o*(Math.sin(i)*Math.sin(i)));return{x:(a+n)*Math.cos(i)*Math.cos(t),y:(a+n)*Math.cos(i)*Math.sin(t),z:(a*(1-o)+n)*Math.sin(i)}}var E={constants:Object.freeze({__proto__:null,deg2rad:i,earthRadius:a,j2:c,j3:h,j3oj2:f,j4:d,minutesPerDay:r,mu:o,pi:e,rad2deg:n,tumin:u,twoPi:t,vkmpersec:l,x2o3:p,xke:s}),propagate:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=t[0],o=Array.prototype.slice.call(t,1),a=$.apply(void 0,S(o)),s=(a-n.jdsatepoch)*r;return x(n,s)},sgp4:x,twoline2satrec:function(t,n){var r=1440/(2*e),o=0,a={error:0};a.satnum=t.substring(2,7),a.epochyr=parseInt(t.substring(18,20),10),a.epochdays=parseFloat(t.substring(20,32)),a.ndot=parseFloat(t.substring(33,43)),a.nddot=parseFloat(".".concat(parseInt(t.substring(44,50),10),"E").concat(t.substring(50,52))),a.bstar=parseFloat("".concat(t.substring(53,54),".").concat(parseInt(t.substring(54,59),10),"E").concat(t.substring(59,61))),a.inclo=parseFloat(n.substring(8,16)),a.nodeo=parseFloat(n.substring(17,25)),a.ecco=parseFloat(".".concat(n.substring(26,33))),a.argpo=parseFloat(n.substring(34,42)),a.mo=parseFloat(n.substring(43,51)),a.no=parseFloat(n.substring(52,63)),a.nc=parseFloat(n.substring(52,63)),a.no/=r,a.inclo*=i,a.nodeo*=i,a.argpo*=i,a.mo*=i;var s=_(o=a.epochyr<57?a.epochyr+2e3:a.epochyr+1900,a.epochdays),l=s.mon,u=s.day,c=s.hr,h=s.minute,d=s.sec;return a.jdsatepoch=$(o,l,u,c,h,d),b(a,{opsmode:"i",satn:a.satnum,epoch:a.jdsatepoch-2433281.5,xbstar:a.bstar,xecco:a.ecco,xargpo:a.argpo,xinclo:a.inclo,xmo:a.mo,xno:a.no,xnodeo:a.nodeo}),a},gstime:v,jday:$,invjday:function(e,t){var i=e-2415019.5,n=i/365.25,r=1900+Math.floor(n),o=Math.floor(.25*(r-1901)),a=i-(365*(r-1900)+o)+1e-11;a<1&&(a=i-(365*((r-=1)-1900)+(o=Math.floor(.25*(r-1901)))));var s=_(r,a),l=s.mon,u=s.day,c=s.hr,h=s.minute,d=s.sec-864e-9;return t?[r,l,u,c,h,Math.floor(d)]:new Date(Date.UTC(r,l-1,u,c,h,Math.floor(d)))},dopplerFactor:function(e,t,i){var n=7292115e-11,r={x:t.x-e.x,y:t.y-e.y,z:t.z-e.z};r.w=Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2)+Math.pow(r.z,2));var o=i.x+n*e.y,a=i.y-n*e.x,s=i.z,l=(r.x*o+r.y*a+r.z*s)/r.w;return 1+l/299792.458*(l>=0?1:-1)},radiansToDegrees:C,degreesToRadians:T,degreesLat:function(t){if(t<-e/2||t>e/2)throw new RangeError("Latitude radians must be in range [-pi/2; pi/2].");return C(t)},degreesLong:function(t){if(t<-e||t>e)throw new RangeError("Longitude radians must be in range [-pi; pi].");return C(t)},radiansLat:function(e){if(e<-90||e>90)throw new RangeError("Latitude degrees must be in range [-90; 90].");return T(e)},radiansLong:function(e){if(e<-180||e>180)throw new RangeError("Longitude degrees must be in range [-180; 180].");return T(e)},geodeticToEcf:P,eciToGeodetic:function(i,n){for(var r=6378.137,o=Math.sqrt(i.x*i.x+i.y*i.y),a=.006694380004260718,s=Math.atan2(i.y,i.x)-n;s<-e;)s+=t;for(;s>e;)s-=t;for(var l,u=0,c=Math.atan2(i.z,Math.sqrt(i.x*i.x+i.y*i.y));u<20;)l=1/Math.sqrt(1-a*(Math.sin(c)*Math.sin(c))),c=Math.atan2(i.z+r*l*a*Math.sin(c),o),u+=1;return{longitude:s,latitude:c,height:o/Math.cos(c)-r*l}},eciToEcf:function(e,t){return{x:e.x*Math.cos(t)+e.y*Math.sin(t),y:e.x*-Math.sin(t)+e.y*Math.cos(t),z:e.z}},ecfToEci:function(e,t){return{x:e.x*Math.cos(t)-e.y*Math.sin(t),y:e.x*Math.sin(t)+e.y*Math.cos(t),z:e.z}},ecfToLookAngles:function(t,i){var n,r,o,a,s,l,u,c,h,d,f,p,_,m,$=(r=i,o=(n=t).longitude,a=n.latitude,s=P(n),l=r.x-s.x,u=r.y-s.y,c=r.z-s.z,{topS:Math.sin(a)*Math.cos(o)*l+Math.sin(a)*Math.sin(o)*u-Math.cos(a)*c,topE:-Math.sin(o)*l+Math.cos(o)*u,topZ:Math.cos(a)*Math.cos(o)*l+Math.cos(a)*Math.sin(o)*u+Math.sin(a)*c});return d=(h=$).topS,f=h.topE,p=h.topZ,_=Math.sqrt(d*d+f*f+p*p),m=Math.asin(p/_),{azimuth:Math.atan2(-f,d)+e,elevation:m,rangeSat:_}}};return E}));var _0x1ff2e6=SatelliteToolkit;const _0xaa7f46=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x167af2=_0xaa7f46(void 0,(function(){return _0x167af2.toString().search("(((.+)+)+)+$").toString().constructor(_0x167af2).search("(((.+)+)+)+$")}));_0x167af2();class _0x9fe1e0{constructor(e){e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._tleName=e.name,this._tleLine1=e.tleLine1,this._tleLine2=e.tleLine2,this._networking=e.networking,this._satelliteGroup=e.satelliteGroup,this._name=this._tleName,this._visible=WebGLPlot$g.defaultValue(e.visible,void 0),this._urlPath=WebGLPlot$g.defaultValue(e.urlPath,void 0),this._scale=WebGLPlot$g.defaultValue(e.scale,void 0),this._orbitVisible=WebGLPlot$g.defaultValue(e.orbitVisible,void 0),this._orbitColor=WebGLPlot$g.defaultValue(e.orbitColor,void 0),this._orbitWidth=WebGLPlot$g.defaultValue(e.orbitWidth,void 0),this._satelliteGeo=WebGLPlot$g.defaultValue(e.satelliteGeo,void 0),this._orbitGeo=WebGLPlot$g.defaultValue(e.orbitGeo,void 0),this._orbitCollection=WebGLPlot$g.defaultValue(e.orbitCollection,void 0),this._mapExtendProperty=new Map,this._satrec=_0x1ff2e6.twoline2satrec(this._tleLine1,this._tleLine2),this._isModified=!1}setName(e){this._name!=e&&(this._name=e,this._isModified=!0,this._save())}getName(){return this._name}getUUID(){return this._tleName+" #"+this._satrec.satnum}setNetworking(e){this._networking=e}getNetworking(){return this._networking}setScale(e){WebGLPlot$g.defined(this._satelliteGeo)&&(this._satelliteGeo.scale=e),this._scale!=e&&(this._scale=e,this._isModified=!0,this._save())}getScale(){return this._scale}isVisible(){return this._visible}setVisible(e){WebGLPlot$g.defined(this._satelliteGeo)&&(this._satelliteGeo.show=e);let t=!1;e&&this._orbitVisible&&(t=!0),WebGLPlot$g.defined(this._orbitGeo)&&WebGLPlot$g.defined(this._orbitCollection)&&(this._orbitGeo.show=t,this._orbitCollection.visible=!0),this._visible!=e&&(this._visible=e,this._isModified=!0,this._save())}getUrlPath(){return this._urlPath}setUrlPath(e){if(WebGLPlot$g.defined(this._satelliteGroup)&&WebGLPlot$g.defined(this._satelliteGeo))if(_0x1569f6.isModelPath(this._urlPath)){let t=this._satelliteGroup.modelCollection;t.remove(this._satelliteGeo);let i=this._satelliteGeo.modelMatrix.clone(),n=_0x1569f6.getModel({id:this.getUUID(),url:e,scale:this.getScale(),modelMatrix:i,show:this.isVisible()});WebGLPlot$g.defined(n)&&(this._satelliteGroup._updateGTLF2RotationZ(n),t.add(n),this._setSatelliteGeo(n))}else{let t=this._satelliteGroup.billboardCollection;t.remove(this._satelliteGeo);const i=this._satelliteGeo.pos.clone();let n=t.add({id:this.getUUID(),position:i,image:e,scale:this.getScale(),horizontalOrigin:WebGLPlot$g.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$g.VerticalOrigin.CENTER,show:this.isVisible()});WebGLPlot$g.defined(n)&&this._setSatelliteGeo(n)}this._urlPath!=e&&(this._urlPath=e,this._isModified=!0,this._save())}isOrbitVisible(){return this._orbitVisible}setOrbitVisible(e){if(WebGLPlot$g.defined(this._orbitGeo)&&WebGLPlot$g.defined(this._orbitCollection)){let t=e&&this._visible;this._orbitGeo.show=t;let i=this._satelliteGroup._orbitPrimitiveCollection;if(WebGLPlot$g.defined(i))if(t)i.contains(this._orbitCollection)||i.add(this._orbitCollection);else if(i.contains(this._orbitCollection)){let e=!0;for(let t=0;t<this._orbitCollection.length;t++)if(this._orbitCollection.get(t).show){e=!1;break}e&&i.remove(this._orbitCollection)}}this._orbitVisible!=e&&(this._orbitVisible=e,this._isModified=!0,this._save())}getOrbitWidth(){return this._orbitWidth}setOrbitWidth(e){WebGLPlot$g.defined(this._orbitGeo)&&(this._orbitGeo.width=e),this._orbitWidth!=e&&(this._orbitWidth=e,this._isModified=!0,this._save())}getOrbitColor(){return this._orbitColor}setOrbitColor(e){WebGLPlot$g.defined(this._orbitGeo)&&(this._orbitGeo.material=WebGLPlot$g.Material.fromType("Color",{color:e})),this._orbitColor.toCssColorString()!=e.toCssColorString()&&(this._orbitColor=e,this._isModified=!0,this._save())}getExtendProperty(e){return this._mapExtendProperty.get(e)}setExtendProperty(e,t){this._mapExtendProperty.set(e,t),this._isModified=!0,this._save()}removeExtendProperty(e){this._mapExtendProperty.delete(e),this._isModified=!0,this._save()}getllExtendProperty(){return this._mapExtendProperty}removeAllExtendProperty(){this._mapExtendProperty.clear(),this._isModified=!0,this._save()}toJson(){let e={};if(!e.hasOwnProperty("name")&&this._name!=this._tleName&&(e.name=this._name),!e.hasOwnProperty("visible")&&this._visible!=this._satelliteGroup.isVisible()&&(e.visible=this._visible),!e.hasOwnProperty("urlPath")&&this._urlPath!=this._satelliteGroup.getGroupModelPath()&&(e.urlPath=_0x1569f6.absoluteToRelativePath(this._urlPath)),!e.hasOwnProperty("scale")&&this._scale!=this._satelliteGroup.getGroupModelScale()&&(e.scale=this._scale),!e.hasOwnProperty("orbitVisible")&&this._orbitVisible!=this._satelliteGroup.isOrbitsVisible()&&(e.orbitVisible=this._orbitVisible),!e.hasOwnProperty("orbitColor")&&this._orbitColor.toCssColorString()!=this._satelliteGroup.getOrbitsColor().toCssColorString()&&(e.orbitColor=this._orbitColor.toCssColorString()),!e.hasOwnProperty("orbitsWidth")&&this._orbitsWidth!=this._satelliteGroup.getOrbitsWidth()&&(e.orbitsWidth=this._orbitsWidth),!e.hasOwnProperty("SatelliteProperty")&&this._mapExtendProperty.size>0){const e=Object.fromEntries(this._mapExtendProperty);dataJSON.SatelliteProperty=e}return JSON.stringify(e)}fromJson(e){if(!WebGLPlot$g.defined(e))return;let t=JSON.parse(e);WebGLPlot$g.defined(t.name)&&(this._name=t.name),WebGLPlot$g.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$g.defined(t.urlPath)&&(this._urlPath=_0x1569f6.relativeToAbsolutePath(t.urlPath)),WebGLPlot$g.defined(t.scale)&&(this._scale=t.scale),WebGLPlot$g.defined(t.orbitVisible)&&(this._orbitVisible=t.orbitVisible),WebGLPlot$g.defined(t.orbitColor)&&(this._orbitColor=WebGLPlot$g.Color.fromCssColorString(t.orbitColor)),WebGLPlot$g.defined(t.orbitWidth)&&(this._orbitWidth=t.orbitWidth),WebGLPlot$g.defined(t.SatelliteProperty)&&(this._mapExtendProperty=new Map(Object.entries(t)))}toGeoJson(){}fromGeoJson(e){}clone(){let e=new _0x9fe1e0({name:this._name,tleLine1:this._tleLine1,tleLine2:this._tleLine2,networking:this._networking,satelliteGroup:this._satelliteGroup,visible:this._visible,urlPath:this._urlPath,scale:this._scale,orbitVisible:this._orbitVisible,orbitColor:this._orbitColor.clone(),orbitWidth:this._orbitWidth,satelliteGeo:this._satelliteGeo,orbitGeo:this._orbitGeo,orbitCollection:this._orbitCollection});return this._mapExtendProperty.forEach(((t,i)=>{e._mapExtendProperty.set(i,t)})),e}getPosition(e){let t=this.getPositionEci(e);if(WebGLPlot$g.defined(t))return _0x1569f6.cartesian3ToDegrees(t)}getPositionEci(e){let t=null,i=_0x1ff2e6.propagate(this._satrec,new Date(e)).position;return WebGLPlot$g.defined(i)&&!isNaN(i.x)&&!isNaN(i.y)&&!isNaN(i.z)&&(t=new WebGLPlot$g.Cartesian3(1e3*i.x,1e3*i.y,1e3*i.z)),t}getPositionMatrix(e){var t=new WebGLPlot$g.HeadingPitchRoll;const i=this.getPositionEci(e),n=this.getPositionEci(e+1e3);if(!WebGLPlot$g.defined(i)||!WebGLPlot$g.defined(n))return;const r=_0x1569f6.getHeading(i,n);r&&(t.heading=r);const o=_0x1569f6.getPitch(i,n);return o&&(t.roll=o),WebGLPlot$g.Transforms.headingPitchRollToFixedFrame(i,t,WebGLPlot$g.Ellipsoid.WGS84,new WebGLPlot$g.Transforms.localFrameToFixedFrameGenerator("east","north"))}getOrbitPoints(e){let t=864e5/this._satrec.nc/100,i=[];for(let n=0;n<100;n++){let r=e+parseInt(n*t),o=this.getPositionEci(r);null!=o&&i.push(o)}return WebGLPlot$g.defined(i[0])&&i.push(i[0].clone()),i}_setSatelliteGeo(e){this._satelliteGeo=e}_getSatelliteGeo(){return this._satelliteGeo}_setOrbitGeo(e){this._orbitGeo=e.orbitGeo,this._orbitCollection=e.orbitCollection}_getOrbitGeo(){return{orbitGeo:this._orbitGeo,orbitCollection:this._orbitCollection}}_isModify(){return this._isModified}_setIsModify(e){this._isModified=e}_save(){_0x373a17.getInstance()._saveSatelliteInfo(!1,this)}}const _0x33aaa3=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x279b1e=_0x33aaa3(void 0,(function(){return _0x279b1e.toString().search("(((.+)+)+)+$").toString().constructor(_0x279b1e).search("(((.+)+)+)+$")}));_0x279b1e();class _0x13ae55{constructor(e){e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._groupName=WebGLPlot$g.defaultValue(e.groupName,""),this._modelPath=WebGLPlot$g.defaultValue(e.modelPath,""),this._modelScale=WebGLPlot$g.defaultValue(e.modelScale,1e4),this._visible=WebGLPlot$g.defaultValue(e.visible,!0),this._orbitsVisible=WebGLPlot$g.defaultValue(e.orbitsVisible,!0),this._orbitsWidth=WebGLPlot$g.defaultValue(e.orbitsWidth,1),this._orbitsColor=WebGLPlot$g.defaultValue(e.orbitsColor,new WebGLPlot$g.Color(.8,.8,.2,.39)),this._tleFilePaths=WebGLPlot$g.defaultValue(e.tleFilePaths,[]),this._scene=void 0,this._mapSatellites=new Map,this._tleInfos=[],this._lUTCtime=void 0,this._isModel=void 0,this._satelliteCollection={modelCollection:new WebGLPlot$g.PrimitiveCollection,billboardCollection:new WebGLPlot$g.BillboardCollection},this._POLYLINE_ALL_COUNT=150,this._aryOrbitCollection=[],this._orbitPrimitiveCollection=new WebGLPlot$g.PrimitiveCollection({destroyPrimitives:!1})}setScene(e){WebGLPlot$g.defined(e)&&(this._scene=e,this._scene.primitives.add(this._satelliteCollection.modelCollection),this._scene.primitives.add(this._satelliteCollection.billboardCollection),this._scene.primitives.add(this._orbitPrimitiveCollection))}isVisible(){return this._visible}setVisible(e){for(let t of this._mapSatellites.values()){t._visible=e;let i=t._getSatelliteGeo();WebGLPlot$g.defined(i)&&(i.show=e);let n=t._getOrbitGeo().orbitGeo,r=t._getOrbitGeo().orbitCollection;if(WebGLPlot$g.defined(n)&&WebGLPlot$g.defined(r)){let i=t.isOrbitVisible()&&e;n.show=i;let o=this._orbitPrimitiveCollection;if(WebGLPlot$g.defined(o))if(i)o.contains(r)||o.add(r);else if(o.contains(r)){let e=!0;for(let t=0;t<r.length;t++)if(r.get(t).show){e=!1;break}e&&o.remove(r)}}}this._visible=e,this._saveToScheme()}isOrbitsVisible(){return this._orbitsVisible}setOrbitsVisible(e){for(let t of this._mapSatellites.values()){t._orbitVisible=e;let i=t._getOrbitGeo().orbitGeo;WebGLPlot$g.defined(i)&&(t.isVisible()&&e?i.show=!0:i.show=!1)}const t=this._aryOrbitCollection.length;for(let i=0;i<t;i++)e&&this._visible?this._orbitPrimitiveCollection.contains(this._aryOrbitCollection[i])||this._orbitPrimitiveCollection.add(this._aryOrbitCollection[i]):this._orbitPrimitiveCollection.contains(this._aryOrbitCollection[i])&&this._orbitPrimitiveCollection.remove(this._aryOrbitCollection[i]);this._orbitsVisible=e,this._saveToScheme()}getOrbitsWidth(){return Number(this._orbitsWidth)}setOrbitsWidth(e){for(let t of this._mapSatellites.values())t._orbitWidth=e;const t=this._aryOrbitCollection.length;for(let i=0;i<t;i++)this._aryOrbitCollection[i].orbitsWidth=e;this._orbitsWidth=e,this._saveToScheme()}getOrbitsColor(){return this._orbitsColor}setOrbitsColor(e){for(let t of this._mapSatellites.values())t._orbitColor=e;const t=this._aryOrbitCollection.length;for(let i=0;i<t;i++)this._aryOrbitCollection[i].orbitsColor=e;this._orbitsColor=e,this._saveToScheme()}getGroupName(){return this._groupName}getSatelliteFileNames(){let e=[];const t=this._tleInfos.length;for(let i=0;i<t;i++)e.push(this._tleInfos[i].fileName);return e}getSatellites(e){const t=this._tleInfos.length;for(let i=0;i<t;i++){const t=this._tleInfos[i];if(t.fileName===e)return t.satellites}return[]}getSatellitePos(e){let t;const i=this._mapSatellites.get(e);return WebGLPlot$g.defined(i)&&(t=i.getPosition(this._lUTCtime)),t}getSatelliteZRotation(e){let t;const i=this._mapSatellites.get(e);if(WebGLPlot$g.defined(i)){const e=i.getPositionEci(this._lUTCtime),n=i.getPositionEci(this._lUTCtime+1e3);if(WebGLPlot$g.defined(e)&&WebGLPlot$g.defined(n)){const i=_0x1569f6.getHeading(e,n),r=_0x1569f6.getPitch(e,n);t=new _0x45ea17(WebGLPlot$g.CesiumMath.toDegrees(r),0,-WebGLPlot$g.CesiumMath.toDegrees(i))}}return t}setGroupModelPath(e){if(!WebGLPlot$g.defined(e)||-1===e.lastIndexOf("."))return;for(let t of this._mapSatellites.values())t._urlPath=e;this._satelliteCollection.modelCollection.removeAll(),this._satelliteCollection.billboardCollection.removeAll();let t=_0x1569f6.isModelPath(e);for(let i of this._mapSatellites.values())if(t){let t=i.getPositionMatrix(this._lUTCtime);if(WebGLPlot$g.defined(t)){let n=_0x1569f6.getModel({id:i.getUUID(),url:e,scale:i.getScale(),modelMatrix:t,show:i.isVisible()});WebGLPlot$g.defined(n)&&(this._updateGTLF2RotationZ(n),this._satelliteCollection.modelCollection.add(n),i._setSatelliteGeo(n))}}else{const t=i.getPositionEci(this._lUTCtime);if(WebGLPlot$g.defined(t)){let n=this._satelliteCollection.billboardCollection.add({id:i.getUUID(),position:t,image:e,scale:i.getScale(),horizontalOrigin:WebGLPlot$g.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$g.VerticalOrigin.CENTER,show:i.isVisible()});WebGLPlot$g.defined(n)&&i._setSatelliteGeo(n)}}this._modelPath=e,this._saveToScheme()}getGroupModelPath(){return this._modelPath}setGroupModelScale(e){for(let t of this._mapSatellites.values()){t._scale=e;let i=t._getSatelliteGeo();WebGLPlot$g.defined(i)&&(i.scale=e)}this._modelScale=e,this._saveToScheme()}getGroupModelScale(){return this._modelScale}isModel(){return this._isModel}updateAllSatellitePosition(e){for(let t of this._mapSatellites.values()){let i=t._getSatelliteGeo();if(WebGLPlot$g.defined(i))if(_0x1569f6.isModelPath(t.getUrlPath())){let n=i,r=t.getPositionMatrix(e);if(WebGLPlot$g.defined(r)&&(n.modelMatrix=r,WebGLPlot$g.defined(n)&&"2.0"===n._sourceVersion)){let e=WebGLPlot$g.Matrix3.fromRotationZ(WebGLPlot$g.CesiumMath.toRadians(-90));WebGLPlot$g.Matrix4.multiplyByMatrix3(n.modelMatrix,e,n.modelMatrix)}}else{let n=t.getPositionEci(e);WebGLPlot$g.defined(n)&&(i.position=n)}}this._lUTCtime=e}updateAllOrbitPosition(e){const t=this._aryOrbitCollection.length;for(let i=0;i<t;i++){const t=this._aryOrbitCollection[i].length;for(let n=0;n<t;n++){let t=this._aryOrbitCollection[i].get(n),r=this._mapSatellites.get(t.id);WebGLPlot$g.defined(r)&&(t.point3Ds=r.getPositionMatrix(e))}}}getSatelliteByUUID(e){return this._mapSatellites.get(e)}_removeSatelliteFromScene(e){if(!WebGLPlot$g.defined(e))return!1;let t=this._mapSatellites.get(e);if(!WebGLPlot$g.defined(t))return!1;let i=this._satelliteCollection.billboardCollection;_0x1569f6.isModelPath(t.getUrlPath())&&(i=this._satelliteCollection.modelCollection);let n=i.remove(t._getSatelliteGeo());t._setSatelliteGeo(void 0);let r=!1,o=t._getOrbitGeo(),a=o.orbitGeo,s=o.orbitCollection;return WebGLPlot$g.defined(a)&&WebGLPlot$g.defined(s)&&(r=s.remove(a),t._setOrbitGeo({orbitGeo:void 0,orbitCollection:s})),n&&r}_addSatelliteToScene(e){if(!WebGLPlot$g.defined(e))return!1;const t=this._mapSatellites.get(e);if(!WebGLPlot$g.defined(t))return!1;let i=t.getUrlPath();if(_0x1569f6.isModelPath(i)){let e=this._satelliteCollection.modelCollection,n=t.getPositionMatrix(this._lUTCtime),r=_0x1569f6.getModel({id:t.getUUID(),url:i,scale:t.getScale(),modelMatrix:n,show:t.isVisible()});WebGLPlot$g.defined(r)&&(this._updateGTLF2RotationZ(r),e.add(r),t._setSatelliteGeo(r))}else{let e=this._satelliteCollection.billboardCollection,n=t.getPosition(this._lUTCtime),r=e.add({id:t.getUUID(),position:n,image:i,scale:t.getScale(),horizontalOrigin:WebGLPlot$g.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$g.VerticalOrigin.CENTER,show:t.isVisible()});WebGLPlot$g.defined(r)&&t._setSatelliteGeo(r)}let n=t._getOrbitGeo().orbitCollection;const r=t.getOrbitPoints(this._lUTCtime);let o=n.add({id:t.getUUID(),positions:r,material:WebGLPlot$g.Material.fromType("Color",{color:t.getOrbitColor()}),width:t.getOrbitWidth(),show:t.isOrbitVisible()});return t._setOrbitGeo({orbitGeo:o,orbitCollection:n}),t.setVisible(t.isVisible()),!0}fromJson(e){if(!WebGLPlot$g.defined(e))return;let t=JSON.parse(e);WebGLPlot$g.defined(t.groupName)&&(this._groupName=t.groupName),WebGLPlot$g.defined(t.modelPath)&&(this._modelPath=_0x1569f6.relativeToAbsolutePath(t.modelPath)),WebGLPlot$g.defined(t.modelScale)&&(this._modelScale=t.modelScale),WebGLPlot$g.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$g.defined(t.orbitsVisible)&&(this._orbitsVisible=t.orbitsVisible),WebGLPlot$g.defined(t.orbitsWidth)&&(this._orbitsWidth=t.orbitsWidth),WebGLPlot$g.defined(t.orbitsColor)&&(this._orbitsColor=WebGLPlot$g.Color.fromCssColorString(t.orbitsColor)),WebGLPlot$g.defined(t.tleFilePaths)&&(this._tleFilePaths=[],t.tleFilePaths.forEach((e=>{this._tleFilePaths.push(e)})))}toJson(){let e={};e.hasOwnProperty("groupName")||(e.groupName=this._groupName),e.hasOwnProperty("modelPath")||(e.modelPath=_0x1569f6.absoluteToRelativePath(this._modelPath)),e.hasOwnProperty("modelScale")||(e.modelScale=this._modelScale),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("orbitsVisible")||(e.orbitsVisible=this._orbitsVisible),e.hasOwnProperty("orbitsWidth")||(e.orbitsWidth=this._orbitsWidth),e.hasOwnProperty("orbitsColor")||(e.orbitsColor=this._orbitsColor.toCssColorString());let t=[];return e.hasOwnProperty("tleFilePaths")||(this._tleFilePaths.forEach((e=>{t.push(e)})),e.tleFilePaths=t),JSON.stringify(e)}initGroup(){if(!WebGLPlot$g.defined(this._modelPath)||!WebGLPlot$g.defined(this._tleFilePaths)||!WebGLPlot$g.defined(this._groupName))return;let e=_0x373a17.getInstance().getURI();if(!WebGLPlot$g.defined(e))return;this._lUTCtime=Date.now(),this._isModel=_0x1569f6.isModelPath(this._modelPath),this._tleInfos=[];let t=this._tleFilePaths.length;for(let i=0;i<t;i++){let t=this._loadTLE(e+this._tleFilePaths[i]);WebGLPlot$g.defined(t)&&(this._tleInfos.push(t),this._addSatellites(t))}}destory(){WebGLPlot$g.defined(this._scene)&&(WebGLPlot$g.defined(this._satelliteCollection.modelCollection)&&this._scene.primitives.remove(this._satelliteCollection.modelCollection),WebGLPlot$g.defined(this._satelliteCollection.billboardCollection)&&this._scene.primitives.remove(this._satelliteCollection.billboardCollection),WebGLPlot$g.defined(this._orbitPrimitiveCollection)&&(this._orbitPrimitiveCollection.destroyPrimitives=!0,this._scene.primitives.remove(this._orbitPrimitiveCollection))),this._satelliteCollection=void 0,this._orbitPrimitiveCollection=void 0,this._aryOrbitCollection=[],this._tleInfos=[]}_loadTLE(e){if(!WebGLPlot$g.defined(e))return null;var t=(e=e.replace(/\\+/g,"/")).lastIndexOf("/");if(-1==t)return null;let i=e.substring(t+1),n=i.substring(0,i.lastIndexOf(".")),r=[];var o;(o=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")).open("GET",e,!1),o.send();let a=o.responseText;if(200!=o.status)return null;let s=a.split(/\r\n/).filter((function(e){return e&&e.trim()})),l=0,u=s.length/3;for(let e=0;e<u;e++){let e=new _0x9fe1e0({name:s[l].trim(),tleLine1:s[l+1].trim(),tleLine2:s[l+2].trim(),networking:n,visible:this._visible,urlPath:this._modelPath,scale:this._modelScale,orbitVisible:this._orbitsVisible,orbitColor:this._orbitsColor.clone(),orbitWidth:this._orbitsWidth,satelliteGroup:this});null!=e&&r.push(e),l+=3}return{fileName:n,filePath:e,satellites:r}}_addSatellites(e){let t=e.satellites.length,i=_0x373a17.getInstance().getSituationSimulationSchemeManager().getSatelliteGroupInfo(_0x373a17.getInstance().getOpenedSchemeName(),this._groupName);for(let n=0;n<t;n++){let t=e.satellites[n];if(!WebGLPlot$g.defined(t))continue;this._mapSatellites.set(t.getUUID(),t);const r=t.getPositionEci(this._lUTCtime);if(null==r)continue;let o=i.get(t.getUUID());WebGLPlot$g.defined(o)&&t.fromJson(o);let a=t.getUrlPath();if(_0x1569f6.isModelPath(a)){let e=this._satelliteCollection.modelCollection,i=t.getPositionMatrix(this._lUTCtime),n=_0x1569f6.getModel({id:t.getUUID(),url:a,scale:t.getScale(),modelMatrix:i,show:t.isVisible()});WebGLPlot$g.defined(n)&&(this._updateGTLF2RotationZ(n),e.add(n),t._setSatelliteGeo(n))}else{let e=this._satelliteCollection.billboardCollection.add({id:t.getUUID(),position:r,image:a,scale:t.getScale(),horizontalOrigin:WebGLPlot$g.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$g.VerticalOrigin.CENTER,show:t.isVisible()});WebGLPlot$g.defined(e)&&t._setSatelliteGeo(e)}setTimeout((()=>{let e;0==this._aryOrbitCollection.length||this._aryOrbitCollection[this._aryOrbitCollection.length-1].length>this._POLYLINE_ALL_COUNT?(e=new _0x559c70,this._aryOrbitCollection.push(e)):e=this._aryOrbitCollection[this._aryOrbitCollection.length-1];const i=t.getOrbitPoints(this._lUTCtime);if(!WebGLPlot$g.defined(i)||0==i.length)return;let n=e.add({id:t.getUUID(),positions:i,material:WebGLPlot$g.Material.fromType("Color",{color:t.getOrbitColor()}),width:t.getOrbitWidth()});WebGLPlot$g.defined(n)&&t._setOrbitGeo({orbitGeo:n,orbitCollection:e}),t.setOrbitVisible(t.isOrbitVisible())}),2)}}_saveToScheme(){_0x373a17.getInstance().getSatelliteManager()._setIsModify(!0),_0x373a17.getInstance().getSatelliteManager()._save()}_getSatellitePrimitive(e){let t=null;if(WebGLPlot$g.defined(e)){let i=this._mapSatellites.get(e);WebGLPlot$g.defined(i)&&(t=i._getSatelliteGeo())}return t}_updateGTLF2RotationZ(e){WebGLPlot$g.defined(e)&&e.readyPromise.then((function(e){if(WebGLPlot$g.defined(e)&&"2.0"===e._sourceVersion){let t=WebGLPlot$g.Matrix3.fromRotationZ(WebGLPlot$g.CesiumMath.toRadians(-90));WebGLPlot$g.Matrix4.multiplyByMatrix3(e.modelMatrix,t,e.modelMatrix)}}))}getAllSatelliteScale(){return this._modelScale}setAllSatelliteScale(e){for(let t of this._mapSatellites.values()){t._scale=e;let i=t._getSatelliteGeo();WebGLPlot$g.defined(i)&&(i.scale=e)}this._modelScale=e,this._saveToScheme()}}const _0x553f80=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0xe25bcc=_0x553f80(void 0,(function(){return _0xe25bcc.toString().search("(((.+)+)+)+$").toString().constructor(_0xe25bcc).search("(((.+)+)+)+$")}));_0xe25bcc();class _0x1975a7{constructor(){this._scene=void 0,this._arrSatelliteGroup=[],this._isModified=!1,this._pickSatellite=void 0,this._featureSelectedEvent=new WebGLPlot$g.Event}setScene(e){this._scene=e}getGroups(){return this._arrSatelliteGroup}getGroup(e){const t=this._arrSatelliteGroup.length;for(let i=0;i<t;i++)if(this._arrSatelliteGroup[i].getGroupName()===e)return this._arrSatelliteGroup[i];return null}updateAllSatellitePosition(e){const t=this._arrSatelliteGroup.length;for(let i=0;i<t;i++)this._arrSatelliteGroup[i].updateAllSatellitePosition(e)}updateAllOrbitPosition(e){const t=this._arrSatelliteGroup.length;for(let e=0;e<t;e++)this._arrSatelliteGroup[e].updateAllOrbitPosition()}addSatelliteSelectCallBackEvent(e){this._featureSelectedEvent.addEventListener(e)}fromJson(e){let t=this._arrSatelliteGroup.length;for(let e=0;e<t;e++)this._arrSatelliteGroup[e].destory();if(this._arrSatelliteGroup=[],e.length>0){let t=JSON.parse(e);WebGLPlot$g.defined(t.groups)&&t.groups.forEach((e=>{let t=new _0x13ae55;t.fromJson(JSON.stringify(e)),t.initGroup(),WebGLPlot$g.defined(this._scene)&&t.setScene(this._scene),this._arrSatelliteGroup.push(t)}))}this._addClickEvent()}toJson(){let e={},t=[];return this._arrSatelliteGroup.forEach((e=>{t.push(JSON.parse(e.toJson()))})),e.hasOwnProperty("groups")||(e.groups=t),JSON.stringify(e)}_isModify(){return this._isModified}_setIsModify(e){this._isModified=e}_save(){this._isModified&&_0x373a17.getInstance()._saveSatelliteGroups(!1)}_addClickEvent(){let e=new WebGLPlot$g.ScreenSpaceEventHandler(this._scene.canvas),t=this;e.setInputAction((function(e){WebGLPlot$g.defined(t._pickSatellite)&&(t._pickSatellite.colorBlendMode=0,t._pickSatellite.color=new WebGLPlot$g.Color(1,1,1,1),t._pickSatellite=void 0);let i=t._scene.drillPick(e.position,void 0,10,10);if(i.length>0)for(let e=0;e<t._arrSatelliteGroup.length;++e){let n=t._arrSatelliteGroup[e].getSatelliteByUUID(i[0].id);if(WebGLPlot$g.defined(n)){i[0].primitive.colorBlendMode=2,i[0].primitive.color=new WebGLPlot$g.Color(0,0,1,1),t._pickSatellite=i[0].primitive,t._featureSelectedEvent.raiseEvent({satelliteUUID:n.getUUID()});break}}}),WebGLPlot$g.ScreenSpaceEventType.LEFT_CLICK)}setPickSatellite(e){WebGLPlot$g.defined(this._pickSatellite)&&(this._pickSatellite.colorBlendMode=0,this._pickSatellite.color=new WebGLPlot$g.Color(1,1,1,1),this._pickSatellite=void 0);for(let t=0;t<this._arrSatelliteGroup.length;++t){let i=this._arrSatelliteGroup[t].getSatelliteByUUID(e);if(WebGLPlot$g.defined(i)&&WebGLPlot$g.defined(i._satelliteGeo)){i._satelliteGeo.colorBlendMode=2,i._satelliteGeo.color=new WebGLPlot$g.Color(0,0,1,1),this._pickSatellite=i._satelliteGeo;break}}}clearSatellitePick(){WebGLPlot$g.defined(this._pickSatellite)&&(this._pickSatellite.colorBlendMode=0,this._pickSatellite.color=new WebGLPlot$g.Color(1,1,1,1),this._pickSatellite=void 0)}}const _0x3ffd55=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x4edcab=_0x3ffd55(void 0,(function(){return _0x4edcab.toString().search("(((.+)+)+)+$").toString().constructor(_0x4edcab).search("(((.+)+)+)+$")}));_0x4edcab();const _0x298e66={ENTITY:0,SCRIPT:1,SATELLITE:2};var _0x4e109a=Object.freeze(_0x298e66);const _0x282668=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x51e1be=_0x282668(void 0,(function(){return _0x51e1be.toString().search("(((.+)+)+)+$").toString().constructor(_0x51e1be).search("(((.+)+)+)+$")}));_0x51e1be();class _0x247aaa extends _0x5bd415{constructor(e){super(e.geoGraphicObject),this._satelliteGroupName=e.satelliteGroupName,this._satellite=e.satellite,this._orbit=e.orbit,this._name=this._satellite.getUUID(),this._orbitVisible=void 0,WebGLPlot$g.defined(e.orbit)&&(this.setOrbitVisible(e.orbitVisible),this.setOrbitWidth(e.orbitWidth),this.setOrbitColor(e.orbitColor))}setGeoEntityParameter(e){super.setGeoEntityParameter(e),e.isVisible()&&this._orbitVisible?this._orbit.show=!0:this._orbit.show=!1,this._isModified=!0,this._save()}getSatellite(){return this._satellite}getSatelliteGroupName(){return this._satelliteGroupName}getOrbit(){return this._orbit}isOrbitVisible(){if(WebGLPlot$g.defined(this._orbit))return this._orbit.show}setOrbitVisible(e){this.getGeoEntityParameter().isVisible()&&e?this._orbit.show=!0:this._orbit.show=!1,this._orbitVisible=e,this._isModified=!0,this._save()}getOrbitWidth(){if(WebGLPlot$g.defined(this._orbit))return this._orbit.width}setOrbitWidth(e){this._orbit.width=e,this._isModified=!0,this._save()}getOrbitColor(){if(WebGLPlot$g.defined(this._orbit))return this._orbit.material.uniforms.color}setOrbitColor(e){this._orbit.material.uniforms.color=e,this._isModified=!0,this._save()}updateOrbitPosition(e){let t=this._satellite.getOrbitPoints(e);this._orbit.positions=t}toJson(){let e=super.toJson();if(""==e)return"";let t=JSON.parse(e);t.hasOwnProperty("satellite")||(t.satellite={},t.satellite.hasOwnProperty("satelliteGroupName")||(t.satellite.satelliteGroupName=this._satelliteGroupName),t.satellite.hasOwnProperty("satelliteUUID")||(t.satellite.satelliteUUID=this._satellite.getUUID()));return t.hasOwnProperty("orbit")||(t.orbit={},t.orbit.hasOwnProperty("orbitVisible")||(t.orbit.orbitVisible=this._orbitVisible),t.orbit.hasOwnProperty("orbitWidth")||(t.orbit.orbitWidth=this._orbit.width),t.orbit.hasOwnProperty("orbitColor")||(t.orbit.orbitColor=this._orbit.material.uniforms.color.toCssColorString())),JSON.stringify(t)}fromJson(e){return super.fromJson(e)}_save(){this._isMoveGeoEntity||_0x373a17.getInstance()._saveSatelliteGeoEntity(!1)}}const _0x3e3b8a=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x51e068=_0x3e3b8a(void 0,(function(){return _0x51e068.toString().search("(((.+)+)+)+$").toString().constructor(_0x51e068).search("(((.+)+)+)+$")}));_0x51e068();class _0x13f071{constructor(){this._mapSatelliteEntitys=new Map,this._scene=void 0,this._geoEntityLayer=void 0,this._geoEntityEditControl=void 0,this._geoEntityDrawControl=void 0,this._satelliteOrbitsLayer=new _0x559c70,this._addGeoEntitys=[],this._removeEntityUUIDs=[],this._geoEntityAdded=new WebGLPlot$g.Event,this._geoEntityDeleted=new WebGLPlot$g.Event,this._geoEntityBeforeDeleted=new WebGLPlot$g.Event,this._geoEntityModified=new WebGLPlot$g.Event,this._geoEntityUpdated=new WebGLPlot$g.Event,this._geoEntityDestroyed=new WebGLPlot$g.Event,this._geoEntitySelected=new WebGLPlot$g.Event,this._geoEntityUnSelected=new WebGLPlot$g.Event}setScene(e){WebGLPlot$g.defined(e)&&(this._geoEntityLayer=new _0x4ab86a(e,"SatelliteEntitys"),this._geoEntityEditControl=new _0x5523fd(e,this._geoEntityLayer),this._geoEntityDrawControl=new _0x39c322(e,this._geoEntityLayer),e.plotLayers.add(this._geoEntityLayer),e.primitives.add(this._satelliteOrbitsLayer),this._scene=e,this._registerEvent(),this.addGeoEntityModifiedEvent(((e,t)=>{WebGLPlot$g.defined(t)&&t.isMouseEdit&&e._onMouseUpdate()})))}addSatelliteEntity(e,t,i,n){if(!WebGLPlot$g.defined(t))return;const r=t.getGroup(i);if(!WebGLPlot$g.defined(r))return;let o=r.getSatelliteByUUID(e);if(!WebGLPlot$g.defined(o))return;let a=o.getName(),s=o.getScale(),l=o.getOrbitWidth(),u=o.getOrbitColor(),c=o.isOrbitVisible(),h=r.getSatelliteZRotation(o.getUUID()),d=r.getSatellitePos(o.getUUID()),f=o.getUrlPath(),p=_0x1569f6.isModelPath(f),_=this;if(p)this._geoEntityLayer.createSymbol(0,99999,[d],{url:f},(function(e){if(WebGLPlot$g.defined(e)){e.feature.__dotPlotLibID=0,e.feature.__dotPlotCode=99998,e.feature.gridSymbolSize=new WebGLPlot$g.Cartesian2(32,32);let t=o.getOrbitPoints(r._lUTCtime),d=_._satelliteOrbitsLayer.add({id:o.getUUID(),positions:t}),f=new _0x247aaa({geoGraphicObject:e.feature,satelliteGroupName:i,satellite:o,orbit:d,orbitWidth:l,orbitColor:u,orbitVisible:c});e.feature.setGeoEntity(f),_._mapSatelliteEntitys.set(f.getUUID(),f),_._addGeoEntitys.push(f),_._save();let p=f.getGeoEntityParameter();p.setModelScale(s),p.setModelRotate(h),f.setGeoEntityParameter(p),f.setName(a),r._removeSatelliteFromScene(o.getUUID()),"function"==typeof n&&n({uuid:f.getUUID()})}}));else{let e=new Image;e.src=f,e.onload=function(){let t=new WebGLPlot$g.Cartesian2(e.width*s,e.height*s),p=_;_._geoEntityLayer.createSymbol(0,20,[d],{url:f},(function(e){if(WebGLPlot$g.defined(e)){e.feature.__dotPlotLibID=0,e.feature.__dotPlotCode=99998,e.feature.anchorPoint=new WebGLPlot$g.Cartesian2(.5,1.5),e.feature._modelRotate=h,e.feature.gridSymbolSize=new WebGLPlot$g.Cartesian2(32,32);let s=o.getOrbitPoints(r._lUTCtime),d=p._satelliteOrbitsLayer.add({id:o.getUUID(),positions:s}),f=new _0x247aaa({geoGraphicObject:e.feature,satelliteGroupName:i,satellite:o,orbit:d,orbitWidth:l,orbitColor:u,orbitVisible:c});e.feature.setGeoEntity(f),p._mapSatelliteEntitys.set(f.getUUID(),f),p._addGeoEntitys.push(f),p._save();let _=f.getGeoEntityParameter();_.setPictureSymbolSize(t),f.setGeoEntityParameter(_),f.setName(a),r._removeSatelliteFromScene(o.getUUID()),"function"==typeof n&&n({uuid:f.getUUID()})}}))}}}removeSatelliteEntity(e,t){let i=this._convertEntityToSatellite(e,t);return i&&(this._removeEntityUUIDs.push(e),this._save()),i}getSatelliteEntityByUUID(e){return this._mapSatelliteEntitys.get(e)}getSatelliteEntitys(){let e=[];for(let t of this._mapSatelliteEntitys.values())e.push(t);return e}updateAllSatelliteEntityPosition(e){for(let t of this._mapSatelliteEntitys.values()){let i=t.getSatellite();if(WebGLPlot$g.defined(i)){let n=i.getPositionEci(e);if(WebGLPlot$g.defined(n)){let r=t.getGeoEntityParameter();r.setPosition(_0x1569f6.cartesian3ToDegrees(n));const o=n,a=i.getPositionEci(e+1e3);if(WebGLPlot$g.defined(a)){const e=_0x1569f6.getHeading(o,a),t=_0x1569f6.getPitch(o,a);WebGLPlot$g.defined(e)&&WebGLPlot$g.defined(t)&&r.setModelRotate(new _0x45ea17(WebGLPlot$g.CesiumMath.toDegrees(t),-0,-WebGLPlot$g.CesiumMath.toDegrees(e)))}t.setGeoEntityParameter(r)}}}}updateAllOrbitPosition(e){for(let t of this._mapSatelliteEntitys.values())t.updateOrbitPosition(e)}removeAllSatelliteEntity(e){this._mapSatelliteEntitys.forEach(((t,i)=>{this._convertEntityToSatellite(i,e)&&this._removeEntityUUIDs.push(i)})),this._mapSatelliteEntitys.clear(),this._save()}getSelectedGeoEntityUUID(){let e=this._geoEntityLayer.selectedFeature;if(WebGLPlot$g.defined(e))for(let[t,i]of this._mapSatelliteEntitys)if(i._getGeoGraphicObject()===e)return i.getUUID()}isGeoEntityLayerEditable(){return!!WebGLPlot$g.defined(this._geoEntityEditControl)&&this._geoEntityEditControl.isActive()}setGeoEntityLayerEditable(e){WebGLPlot$g.defined(this._geoEntityEditControl)&&(e?this._geoEntityEditControl.activate():this._geoEntityEditControl.deactivate())}setSelectedGeoEntity(e){let t=this._mapSatelliteEntitys.get(e);WebGLPlot$g.defined(t)&&this._geoEntityLayer.setSelectedFeature(t._getGeoGraphicObject())}clearSelectGeoEntity(){this._geoEntityLayer.releaseSelection()}addGeoEntityAddedEvent(e){this._geoEntityAdded.addEventListener(e)}addGeoEntityDeletedEvent(e){this._geoEntityDeleted.addEventListener(e)}addGeoEntityBeforeDeletedEvent(e){this._geoEntityBeforeDeleted.addEventListener(e)}addGeoEntityModifiedEvent(e){this._geoEntityModified.addEventListener(e)}addGeoEntitUpdatedEvent(e){this._geoEntityUpdated.addEventListener(e)}addGeoEntitDestroyedEvent(e){this._geoEntityDestroyed.addEventListener(e)}addGeoEntitySelectedEvent(e){this._geoEntitySelected.addEventListener(e)}addGeoEntityUnSelectedEvent(e){this._geoEntityUnSelected.addEventListener(e)}toJson(){let e=new Map;return this._mapSatelliteEntitys.forEach(((t,i)=>{e.set(t.getUUID(),t.toJson())})),e}fromJson(e,t){let i=e.satelliteEntityJsons,n=e.satelliteManager;if(this.removeAllSatelliteEntity(n),!WebGLPlot$g.defined(this._geoEntityLayer))return;let r=this,o=[];i.forEach(((e,a)=>{let s=JSON.parse(e),l=JSON.parse(s.geoGraphicObject);WebGLPlot$g.defined(l)&&(l.modelPath=_0x1569f6.relativeToAbsolutePath(l.modelPath),l.picturePath=_0x1569f6.relativeToAbsolutePath(l.picturePath),this._geoEntityLayer.geoJsonToGeoGraphicObject(l,(function(a){if(WebGLPlot$g.defined(a)){let l=a.feature;if(WebGLPlot$g.defined(l)){let a,u,c,h,d;if(WebGLPlot$g.defined(s.satellite)&&(a=n.getGroup(s.satellite.satelliteGroupName),u=a.getSatelliteByUUID(s.satellite.satelliteUUID)),WebGLPlot$g.defined(s.orbit)&&(c=s.orbit.orbitVisible,h=s.orbit.orbitWidth,d=WebGLPlot$g.Color.fromCssColorString(s.orbit.orbitColor)),WebGLPlot$g.defined(a)&&WebGLPlot$g.defined(u)){let n=u.getOrbitPoints(a._lUTCtime),s=r._satelliteOrbitsLayer.add({id:u.getUUID(),positions:n});a._removeSatelliteFromScene(u.getUUID());let f=new _0x247aaa({geoGraphicObject:l,satelliteGroupName:a.getGroupName(),satellite:u,orbit:s,orbitWidth:h,orbitColor:d,orbitVisible:c});f.fromJson(e),l.setGeoEntity(f),r._mapSatelliteEntitys.set(f.getUUID(),f),o.push(f.getUUID()),"function"==typeof t&&o.length===i.size&&t({UUIDs:o})}}}})))})),this._isModified=!1}_convertEntityToSatellite(e,t){if(!WebGLPlot$g.defined(t))return!1;const i=this._mapSatelliteEntitys.get(e);if(!WebGLPlot$g.defined(i))return!1;const n=i.getSatelliteGroupName();if(!WebGLPlot$g.defined(n))return!1;this._satelliteOrbitsLayer.remove(i.getOrbit()),this._mapSatelliteEntitys.delete(e);let r=i._getGeoGraphicObject();WebGLPlot$g.defined(r)&&(r.removeAllGeoEffect(),this._geoEntityLayer.removeGeoGraphicObject(r));const o=t.getGroup(n);return!!WebGLPlot$g.defined(o)&&(o._addSatelliteToScene(i.getSatellite().getUUID()),!0)}_removeAllSatelliteEntityFromScene(e){this._mapSatelliteEntitys.forEach(((t,i)=>{this._convertEntityToSatellite(i,e)})),this._mapSatelliteEntitys.clear()}_getAddAndRemoveGeoEntitys(){return{add:this._addGeoEntitys,remove:this._removeEntityUUIDs}}_clearAddAndRemoveGeoEntitys(){this._addGeoEntitys.splice(0),this._removeEntityUUIDs.splice(0)}_save(){_0x373a17.getInstance()._saveSatelliteGeoEntity(!1)}_registerEvent(){_0x43a805.getInstance().symbolAdded.addEventListener(function(e,t){for(let[i,n]of this._mapSatelliteEntitys)if(n._getGeoGraphicObject()===e){this._geoEntityAdded.raiseEvent(n,t);break}}.bind(this)),_0x43a805.getInstance().symbolDeleted.addEventListener(function(e,t){for(let[i,n]of this._mapSatelliteEntitys)if(n._getGeoGraphicObject()===e){this._geoEntityDeleted.raiseEvent(n,t);break}}.bind(this)),_0x43a805.getInstance().symbolBeforeDeleted.addEventListener(function(e,t){for(let[i,n]of this._mapSatelliteEntitys)if(n._getGeoGraphicObject()===e){this._geoEntityBeforeDeleted.raiseEvent(n,t);break}}.bind(this)),_0x43a805.getInstance().symbolModified.addEventListener(function(e,t){for(let[i,n]of this._mapSatelliteEntitys)if(n._getGeoGraphicObject()===e){this._geoEntityModified.raiseEvent(n,t);break}}.bind(this)),_0x43a805.getInstance().symbolUpdated.addEventListener(function(e){for(let[t,i]of this._mapSatelliteEntitys)if(i._getGeoGraphicObject()===e){this._geoEntityUpdated.raiseEvent(i);break}}.bind(this)),_0x43a805.getInstance().symbolDestroyed.addEventListener(function(e){this._geoEntityDestroyed.raiseEvent(e)}.bind(this)),_0x43a805.getInstance().symbolSelected.addEventListener(function(e){for(let[t,i]of this._mapSatelliteEntitys)if(i._getGeoGraphicObject()===e){this._geoEntitySelected.raiseEvent(i);break}}.bind(this)),_0x43a805.getInstance().symbolUnSelected.addEventListener(function(e){for(let[t,i]of this._mapSatelliteEntitys)if(i.getUUID()===e){this._geoEntityUnSelected.raiseEvent(i);break}}.bind(this))}}const _0x18f81b=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x30894b=_0x18f81b(void 0,(function(){return _0x30894b.toString().search("(((.+)+)+)+$").toString().constructor(_0x30894b).search("(((.+)+)+)+$")}));_0x30894b();class _0x209a53{constructor(e){this._UUID=WebGLPlot$g.createGuid(),this._geoEntityParameter=WebGLPlot$g.defaultValue(e,new _0x30275b)}_getGeoEntityParameter(){return this._geoEntityParameter}_toJson(){let e={};return e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("geoEntityParameter")||(e.geoEntityParameter=this._geoEntityParameter._toJson()),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$g.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$g.defined(t.geoEntityParameter)&&this._geoEntityParameter._fromJson(t.geoEntityParameter)}clone(){let e=new _0x209a53;return e._UUID=this._UUID,e._geoEntityParameter=this._geoEntityParameter.clone(),e}getUUID(){return this._UUID}setModelPath(e){this._geoEntityParameter.setModelPath(e)}getModelPath(){return this._geoEntityParameter.getModelPath()}setDotPlotLibID(e){this._geoEntityParameter.setDotPlotLibID(e)}getDotPlotLibID(){return this._geoEntityParameter.getDotPlotLibID()}setDotPlotCode(e){this._geoEntityParameter.setDotPlotCode(e)}getDotPlotCode(){return this._geoEntityParameter.getDotPlotCode()}setDotPlotStyle(e){this._geoEntityParameter.setDotPlotStyle(e)}getDotPlotStyle(){return this._geoEntityParameter.getDotPlotStyle()}setVisible(e){this._geoEntityParameter.setVisible(e)}isVisible(){return this._geoEntityParameter.isVisible()}setPicturePath(e){this._geoEntityParameter.setPicturePath(e)}getPicturePath(){return this._geoEntityParameter.getPicturePath()}setShowMode(e){this._geoEntityParameter.setShowMode(e)}getShowMode(){return this._geoEntityParameter.getShowMode()}setAutoChangeDisplayStatus(e){this._geoEntityParameter.setAutoChangeDisplayStatus(e)}getAutoChangeDisplayStatus(){return this._geoEntityParameter.getAutoChangeDisplayStatus()}setDistanceDisplayStatus(e,t){this._geoEntityParameter.setDistanceDisplayStatus(e,t)}getDistanceDisplayStatus(){return this._geoEntityParameter.getDistanceDisplayStatus()}}const _0x34c13d=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x54242b=_0x34c13d(void 0,(function(){return _0x54242b.toString().search("(((.+)+)+)+$").toString().constructor(_0x54242b).search("(((.+)+)+)+$")}));_0x54242b();class _0x321ef3{constructor(e){this._UUID=WebGLPlot$g.createGuid(),this._geoEntityEffects=WebGLPlot$g.defaultValue(e,[])}_fromJson(e){let t=JSON.parse(e);!WebGLPlot$g.defined(t)||(WebGLPlot$g.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$g.defined(t.geoEntityEffects)&&(this._geoEntityEffects=[],t.geoEntityEffects.forEach((e=>{this._geoEntityEffects.push(_0x5f28ea.createGeoEntityEffectFromJson(e))}))))}_toJson(){let e={};return e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("geoEntityEffects")||(e.geoEntityEffects=[],this._geoEntityEffects.forEach((t=>{e.geoEntityEffects.push(t.toJSON())}))),JSON.stringify(e)}getUUID(){return this._UUID}setGeoEntityEffects(e){this._geoEntityEffects=e}getGeoEntityEffects(){return this._geoEntityEffects}}const _0x2b7c74=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x1b5b80=_0x2b7c74(void 0,(function(){return _0x1b5b80.toString().search("(((.+)+)+)+$").toString().constructor(_0x1b5b80).search("(((.+)+)+)+$")}));_0x1b5b80();class _0x1c784a{constructor(){this._UUID=WebGLPlot$g.createGuid(),this._isTimeMode=!0,this._time=void 0,this._speed=void 0,this._isCurvePath=!1,this._pathPoint3D=void 0,this._scalePoint2D=void 0,this._originPosition=void 0,this._targetPosition=void 0,this._originGeoEntityUUID=void 0,this._targetGeoEntityUUID=void 0}_toJson(){let e={};return e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("isTimeMode")||(e.isTimeMode=this._isTimeMode),!e.hasOwnProperty("time")&&WebGLPlot$g.defined(this._time)&&(e.time=this._time),!e.hasOwnProperty("speed")&&WebGLPlot$g.defined(this._speed)&&(e.speed=this._speed),e.hasOwnProperty("isCurvePath")||(e.isCurvePath=this._isCurvePath),!e.hasOwnProperty("pathPoint3D")&&WebGLPlot$g.defined(this._pathPoint3D)&&(e.pathPoint3D=[],this._pathPoint3D.forEach((t=>{e.pathPoint3D.push({x:t.x,y:t.y,z:t.z})}))),!e.hasOwnProperty("scalePoint2D")&&WebGLPlot$g.defined(this._scalePoint2D)&&(e.scalePoint2D=[],this._scalePoint2D.forEach((t=>{e.scalePoint2D.push({x:t.x,y:t.y})}))),!e.hasOwnProperty("originPosition")&&WebGLPlot$g.defined(this._originPosition)&&(e.originPosition={x:this._originPosition.x,y:this._originPosition.y,z:this._originPosition.z}),!e.hasOwnProperty("targetPosition")&&WebGLPlot$g.defined(this._targetPosition)&&(e.targetPosition={x:this._targetPosition.x,y:this._targetPosition.y,z:this._targetPosition.z}),!e.hasOwnProperty("targetGeoEntityUUID")&&WebGLPlot$g.defined(this._targetGeoEntityUUID)&&(e.targetGeoEntityUUID=this._targetGeoEntityUUID),!e.hasOwnProperty("originGeoEntityUUID")&&WebGLPlot$g.defined(this._originGeoEntityUUID)&&(e.originGeoEntityUUID=this._originGeoEntityUUID),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$g.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$g.defined(t.isTimeMode)&&(this._isTimeMode=t.isTimeMode),WebGLPlot$g.defined(t.time)&&(this._time=t.time),WebGLPlot$g.defined(t.speed)&&(this._speed=t.speed),WebGLPlot$g.defined(t.isCurvePath)&&(this._isCurvePath=t.isCurvePath),WebGLPlot$g.defined(t.pathPoint3D)&&(this._pathPoint3D=[],t.pathPoint3D.forEach((e=>{this._pathPoint3D.push(new _0x45ea17(e.x,e.y,e.z))}))),WebGLPlot$g.defined(t.scalePoint2D)&&(this._scalePoint2D=[],t.scalePoint2D.forEach((e=>{this._scalePoint2D.push(new WebGLPlot$g.Cartesian2(e.x,e.y))}))),WebGLPlot$g.defined(t.targetPosition)&&(this._targetPosition=new _0x45ea17(t.targetPosition.x,t.targetPosition.y,t.targetPosition.z)),WebGLPlot$g.defined(t.originPosition)&&(this._originPosition=new _0x45ea17(t.originPosition.x,t.originPosition.y,t.originPosition.z)),WebGLPlot$g.defined(t.targetGeoEntityUUID)&&(this._targetGeoEntityUUID=t.targetGeoEntityUUID),WebGLPlot$g.defined(t.originGeoEntityUUID)&&(this._originGeoEntityUUID=t.originGeoEntityUUID)}getUUID(){return this._UUID}setIsTimeMode(e){this._isTimeMode=e}isTimeMode(){return this._isTimeMode}setTime(e){this._time=e}getTime(){return this._time}setSpeed(e){this._speed=e}getSpeed(){return this._speed}setScalePoint2D(e){this._scalePoint2D=e,this._pathPoint3D=void 0}getScalePoint2D(){return this._scalePoint2D}setPathPoint3D(e){this._pathPoint3D=e,this._scalePoint2D=void 0}getPathPoint3D(){return this._pathPoint3D}setTargetPosition(e){this._targetPosition=e}getTargetPosition(){return this._targetPosition}setOriginPosition(e){this._originPosition=e}getOriginPosition(){return this._originPosition}setTargetGeoEntityUUID(e){this._targetGeoEntityUUID=e}getTargetGeoEntityUUID(){return this._targetGeoEntityUUID}setOriginGeoEntityUUID(e){this._originGeoEntityUUID=e}getOriginGeoEntityUUID(){return this._originGeoEntityUUID}setIsCurvePath(e){this._isCurvePath=e}isCurvePath(){return this._isCurvePath}clone(){let e=new _0x1c784a;return e._UUID=this._UUID,e._isTimeMode=this._isTimeMode,e._time=this._time,e._speed=this._speed,e._isCurvePath=this._isCurvePath,WebGLPlot$g.defined(this._pathPoint3D)&&(e._pathPoint3D=[],this._pathPoint3D.forEach((t=>{e._pathPoint3D.push(new _0x45ea17(t.x,t.y,t.z))}))),WebGLPlot$g.defined(this._scalePoint2D)&&(e._scalePoint2D=[],this._scalePoint2D.forEach((t=>{e._scalePoint2D.push(new WebGLPlot$g.Cartesian2(t.x,t.y))}))),e._originPosition=this._originPosition,e._targetPosition=this._targetPosition,e._targetGeoEntityUUID=this._targetGeoEntityUUID,e._originGeoEntityUUID=this._originGeoEntityUUID,e}}var _0x41defb=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x8944db=_0x41defb(void 0,(function(){return _0x8944db.toString().search("(((.+)+)+)+$").toString().constructor(_0x8944db).search("(((.+)+)+)+$")}));_0x8944db();var _0xdcd079={NO:0,ONEWAY:1,BOTHWAY:2},_0x37690a=Object.freeze(_0xdcd079);const _0x5f3307=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x4dedba=_0x5f3307(void 0,(function(){return _0x4dedba.toString().search("(((.+)+)+)+$").toString().constructor(_0x4dedba).search("(((.+)+)+)+$")}));_0x4dedba();class _0x11d14c{constructor(e){e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._time=WebGLPlot$g.defaultValue(e.time,0),this._startRotation=WebGLPlot$g.defaultValue(e.startRotation,new _0x45ea17(0,0,0)),this._endRotation=WebGLPlot$g.defaultValue(e.endRotation,new _0x45ea17(0,0,0)),this._cyclicType=WebGLPlot$g.defaultValue(e.cyclicType,_0x37690a.NO),this._isGradient=WebGLPlot$g.defaultValue(e.isGradient,!0),WebGLPlot$g.defined(e.time)||WebGLPlot$g.defined(e.totalTime)?this._totalTime=WebGLPlot$g.defaultValue(e.totalTime,e.time):this._totalTime=void 0,this._UUID=WebGLPlot$g.createGuid()}getUUID(){return this._UUID}setTotalTime(e){this._totalTime=e}getTotalTime(){return this._totalTime}setTime(e){this._time=e,WebGLPlot$g.defined(this._totalTime)||(this._totalTime=this._time)}getTime(){return this._time}setStartRotation(e){this._startRotation=e}getStartRotation(){return this._startRotation}setEndRotation(e){this._endRotation=e}getEndRotation(){return this._endRotation}setCyclicType(e){this._cyclicType=e}getCyclicType(){return this._cyclicType}setIsGradient(e){this._isGradient=e}isGradient(){return this._isGradient}_toJson(){let e={};e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("time")||(e.time=this._time);e.hasOwnProperty("startRotation")||(e.startRotation={},e.startRotation.hasOwnProperty("x")||(e.startRotation.x=this._startRotation.x),e.startRotation.hasOwnProperty("y")||(e.startRotation.y=this._startRotation.y),e.startRotation.hasOwnProperty("z")||(e.startRotation.z=this._startRotation.z));return e.hasOwnProperty("endRotation")||(e.endRotation={},e.endRotation.hasOwnProperty("x")||(e.endRotation.x=this._endRotation.x),e.endRotation.hasOwnProperty("y")||(e.endRotation.y=this._endRotation.y),e.endRotation.hasOwnProperty("z")||(e.endRotation.z=this._endRotation.z)),e.hasOwnProperty("cyclicType")||(e.cyclicType=this._cyclicType),e.hasOwnProperty("isGradient")||(e.isGradient=this._isGradient),e.hasOwnProperty("totalTime")||(e.totalTime=this._totalTime),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$g.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$g.defined(t.time)&&(this._time=t.time),WebGLPlot$g.defined(t.startRotation)&&(WebGLPlot$g.defined(t.startRotation.x)&&(this._startRotation.x=t.startRotation.x),WebGLPlot$g.defined(t.startRotation.y)&&(this._startRotation.y=t.startRotation.y),WebGLPlot$g.defined(t.startRotation.z)&&(this._startRotation.z=t.startRotation.z)),WebGLPlot$g.defined(t.endRotation)&&(WebGLPlot$g.defined(t.endRotation.x)&&(this._endRotation.x=t.endRotation.x),WebGLPlot$g.defined(t.endRotation.y)&&(this._endRotation.y=t.endRotation.y),WebGLPlot$g.defined(t.endRotation.z)&&(this._endRotation.z=t.endRotation.z)),WebGLPlot$g.defined(t.cyclicType)&&(this._cyclicType=t.cyclicType),WebGLPlot$g.defined(t.isGradient)&&(this._isGradient=t.isGradient),WebGLPlot$g.defined(t.totalTime)&&(this._totalTime=t.totalTime)}}const _0x54379f=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x1795ab=_0x54379f(void 0,(function(){return _0x1795ab.toString().search("(((.+)+)+)+$").toString().constructor(_0x1795ab).search("(((.+)+)+)+$")}));_0x1795ab();class _0x21ab63{constructor(e){e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT),this._time=WebGLPlot$g.defaultValue(e.time,0),this._startScale=WebGLPlot$g.defaultValue(e.startScale,1),this._endScale=WebGLPlot$g.defaultValue(e.endScale,1),this._cyclicType=WebGLPlot$g.defaultValue(e.cyclicType,_0x37690a.NO),this._isGradient=WebGLPlot$g.defaultValue(e.isGradient,!0),WebGLPlot$g.defined(e.time)||WebGLPlot$g.defined(e.totalTime)?this._totalTime=WebGLPlot$g.defaultValue(e.totalTime,e.time):this._totalTime=void 0,this._UUID=WebGLPlot$g.createGuid()}getUUID(){return this._UUID}setTotalTime(e){this._totalTime=e}getTotalTime(){return this._totalTime}setTime(e){this._time=e,WebGLPlot$g.defined(this._totalTime)||(this._totalTime=this._time)}getTime(){return this._time}setStartScale(e){this._startScale=e}getStartScale(){return this._startScale}setEndScale(e){this._endScale=e}getEndScale(){return this._endScale}setCyclicType(e){this._cyclicType=e}getCyclicType(){return this._cyclicType}setIsGradient(e){this._isGradient=e}isGradient(){return this._isGradient}_toJson(){let e={};return e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("time")||(e.time=this._time),e.hasOwnProperty("startScale")||(e.startScale=this._startScale),e.hasOwnProperty("endScale")||(e.endScale=this._endScale),e.hasOwnProperty("cyclicType")||(e.cyclicType=this._cyclicType),e.hasOwnProperty("isGradient")||(e.isGradient=this._isGradient),e.hasOwnProperty("totalTime")||(e.totalTime=this._totalTime),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$g.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$g.defined(t.time)&&(this._time=t.time),WebGLPlot$g.defined(t.startScale)&&(this._startScale=t.startScale),WebGLPlot$g.defined(t.endScale)&&(this._endScale=t.endScale),WebGLPlot$g.defined(t.cyclicType)&&(this._cyclicType=t.cyclicType),WebGLPlot$g.defined(t.isGradient)&&(this._isGradient=t.isGradient),WebGLPlot$g.defined(t.totalTime)&&(this._totalTime=t.totalTime)}}const _0x21887c=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x401f76=_0x21887c(void 0,(function(){return _0x401f76.toString().search("(((.+)+)+)+$").toString().constructor(_0x401f76).search("(((.+)+)+)+$")}));_0x401f76();class _0x386582{constructor(e,t,i,n,r,o,a){this._geoEntityUUID=e,this._geoEntityMoveParameter=t,this._executeManagerCalc=n,this._groupIndex=r,this._speed=0,this._curvePath3D=[],this._controlPointIndexs=[],this._isToTarget=!1,this._lastTime=void 0,this._lastDistance=0,this._isFinished=!1,this._isChangeCurve=!1,this._moveMode=-1,this._position=o,this._rotation=a,this._geoEntityMoveParameter=t,this._init(t,i)}_createCurve3D(e){let t=_0x1569f6.getAllDistance(e),i=[];i.push(0);let n=0;for(let r=0;r<e.length-2;r++){let o=e[r],a=e[r+1];n+=WebGLPlot$g.Cartesian3.distance(o,a),i.push(n/t)}i.push(1);let r=new Cesium.CatmullRomSpline({points:e,times:i}),o=100*e.length,a=[];for(let e=0;e<=o;e++){let t=r.evaluate(e/o);a.push(t)}let s=[];return i.forEach((e=>{s.push(e*o)})),{curvePath3D:a,controlPointIndexs:s}}_init(e,t){let i=e.isTimeMode(),n=e.getTime(),r=e.getSpeed(),o=e.getPathPoint3D(),a=e.getScalePoint2D();if(i&&WebGLPlot$g.defined(n)){let i=1e3*n;if(i>0){let n,r=[],s=e.getOriginGeoEntityUUID();WebGLPlot$g.defined(s)&&(n=this._executeManagerCalc._getPosition(this._groupIndex,s,t));let l,u=e.getTargetGeoEntityUUID();if(WebGLPlot$g.defined(u)&&(l=this._executeManagerCalc._getPosition(this._groupIndex,u,t+i)),WebGLPlot$g.defined(o))WebGLPlot$g.defined(n)&&r.push(n),o.forEach((e=>{r.push(e)})),WebGLPlot$g.defined(l)&&r.push(l);else if(WebGLPlot$g.defined(a)){if(WebGLPlot$g.defined(n)&&WebGLPlot$g.defined(l)){let e=[n,l];r=[n,l];let t=_0x1569f6.getAllDistance(e);a.forEach((i=>{let n=t*i.x,o=_0x1569f6.getPositionByDistance(e,n);r.splice(r.length-1,0,new WebGLPlot$g.Cartesian3(o.point.x,o.point.y,o.point.z+i.y))}))}}else WebGLPlot$g.defined(n)&&r.push(n),WebGLPlot$g.defined(l)&&r.push(l);if(r=this._convertToCartesian3(r),r.length>=2&&_0x1569f6.getAllDistance(r)>.001){if(this._moveMode=0,e.isCurvePath()){let e=this._createCurve3D(r);this._curvePath3D=e.curvePath3D}else this._curvePath3D=r;let n=_0x1569f6.getAllDistance(this._curvePath3D);this._speed=n/i,this._lastTime=t,this._lastDistance=0}}}else if(!i&&WebGLPlot$g.defined(r)){let i=r/1e3;if(i>0){let n,r=[],s=e.getOriginGeoEntityUUID();WebGLPlot$g.defined(s)&&(n=this._executeManagerCalc._getPosition(this._groupIndex,s,t));let l,u=e.getTargetGeoEntityUUID();if(WebGLPlot$g.defined(u)&&(l=this._executeManagerCalc._getPosition(this._groupIndex,u,t)),WebGLPlot$g.defined(o))WebGLPlot$g.defined(n)&&r.push(n),o.forEach((e=>{r.push(e)})),WebGLPlot$g.defined(l)&&r.push(l);else if(WebGLPlot$g.defined(a)){if(WebGLPlot$g.defined(n)&&WebGLPlot$g.defined(l)){let e=[n,l];r=[n,l];let t=_0x1569f6.getAllDistance(e);a.forEach((i=>{let n=t*i.x,o=_0x1569f6.getPositionByDistance(e,n);r.splice(r.length-1,0,new WebGLPlot$g.Cartesian3(o.point.x,o.point.y,o.point.z+i.y))}))}}else WebGLPlot$g.defined(n)&&r.push(n),WebGLPlot$g.defined(l)&&r.push(l);if(r=this._convertToCartesian3(r),r.length>=2&&_0x1569f6.getAllDistance(r)>.001){if(WebGLPlot$g.defined(l)?this._moveMode=1:this._moveMode=0,e.isCurvePath()){let e=this._createCurve3D(r);this._curvePath3D=e.curvePath3D,this._controlPointIndexs=e.controlPointIndexs}else{this._curvePath3D=r;for(let e=0;e<r.length;e++)this._controlPointIndexs.push(e)}1===this._moveMode&&this._controlPointIndexs.splice(this._controlPointIndexs.length-1,1),this._speed=i,this._lastTime=t,this._lastDistance=0}}}}_convertToCartesian3(e){let t=[];return e.forEach((e=>{t.push(_0x1569f6.degreesToCartesian3(e))})),t}_caclulate(e){if(!this._isFinished)if(this._geoEntityMoveParameter.isTimeMode()&&0===this._geoEntityMoveParameter.getTime()){this._isFinished=!0;let t,i=this._geoEntityMoveParameter.getTargetGeoEntityUUID();if(WebGLPlot$g.defined(i)&&(t=this._executeManagerCalc._getPosition(this._groupIndex,this._geoEntityMoveParameter.getTargetGeoEntityUUID(),e)),!WebGLPlot$g.defined(t)){let e=this._geoEntityMoveParameter.getPathPoint3D();WebGLPlot$g.defined(e)&&e.length>0&&(t=e[e.length-1])}WebGLPlot$g.defined(t)&&(this._position=t)}else{let t=e-this._lastTime;this._lastTime=e;let i=this._lastDistance+t*this._speed;this._lastDistance=i;let n=[];if(this._isToTarget){let t=this._executeManagerCalc._getPosition(this._groupIndex,this._geoEntityUUID,e),i=this._executeManagerCalc._getPosition(this._groupIndex,this._geoEntityMoveParameter.getTargetGeoEntityUUID(),e),r=_0x1569f6.degreesToCartesian3(t),o=_0x1569f6.degreesToCartesian3(i);WebGLPlot$g.defined(t)&&WebGLPlot$g.defined(i)&&WebGLPlot$g.Cartesian3.distance(this._curvePath3D[this._curvePath3D.length-1],o)>.001?(this._isChangeCurve?this._curvePath3D.splice(this._curvePath3D.length-1):(this._curvePath3D.splice(this._controlPointIndexs[this._controlPointIndexs.length-1]),this._isChangeCurve=!0),n.push(r),n.push(o),this._curvePath3D=this._curvePath3D.concat(n),n=this._curvePath3D):n=this._curvePath3D}else n=this._curvePath3D;if(i>_0x1569f6.getAllDistance(n))this._isFinished=!0;else{let e=_0x1569f6.getPositionByDistance(n,i),t=e.index;if(t<n.length&&t>=0){if(!this._isToTarget&&1===this._moveMode&&t>=this._controlPointIndexs[this._controlPointIndexs.length-1]&&(this._isToTarget=!0),this._position=_0x1569f6.cartesian3ToDegrees(e.point),t!==n.length-1){let i=n[t+1];if(e.point.x!==i.x||e.point.y!==i.y||e.point.z!==i.z){let t=_0x1569f6.getPitch(e.point,i),n=_0x1569f6.getHeading(e.point,i);if(t&&n){let e=new _0x45ea17(0);e.x=WebGLPlot$g.CesiumMath.toDegrees(t),e.z=WebGLPlot$g.CesiumMath.toDegrees(n),this._rotation=e}}}}else this._isFinished=!0}}return{position:this._position,rotation:this._rotation}}}const _0x5cad24=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x4549fb=_0x5cad24(void 0,(function(){return _0x4549fb.toString().search("(((.+)+)+)+$").toString().constructor(_0x4549fb).search("(((.+)+)+)+$")}));_0x4549fb();class _0x164388{constructor(e,t){this._geoEntityRotationParameter=e,this._speed=void 0,this._startTime=t,this._cyclicStartTime=void 0,this._lastTime=void 0,this._isBack=!1,this._isFinished=!1,this._rotate=void 0,this._init(e,t)}_init(e,t){if(!WebGLPlot$g.defined(e)||!WebGLPlot$g.defined(t))return void(this._isFinished=!0);let i=1e3*e.getTime();if(i<0)return void(this._isFinished=!0);let n=e.getStartRotation(),r=e.getEndRotation();this._isBack&&(n=e.getEndRotation(),r=e.getStartRotation()),this._speed=new _0x45ea17(0,0,0),e.isGradient()&&(this._speed=new _0x45ea17((r.x-n.x)/i,(r.y-n.y)/i,(r.z-n.z)/i)),this._cyclicStartTime=t,this._lastTime=t,this._rotate=new _0x45ea17(n.x,n.y,n.z),this._isFinished=!1}_caclulate(e){if(WebGLPlot$g.defined(this._geoEntityRotationParameter)){if(this._isFinished)return this._rotate;if(e-this._startTime>1e3*this._geoEntityRotationParameter.getTotalTime()&&(this._isFinished=!0),e-this._cyclicStartTime>1e3*this._geoEntityRotationParameter.getTime()){let t=this._geoEntityRotationParameter.getCyclicType();t==_0x37690a.NO?(this._rotate=this._geoEntityRotationParameter.getEndRotation().clone(),this._isFinished=!0):t==_0x37690a.ONEWAY?(this._rotate=this._geoEntityRotationParameter.getEndRotation().clone(),this._isFinished||this._init(this._geoEntityRotationParameter,e)):t==_0x37690a.BOTHWAY&&(this._isBack?this._rotate=this._geoEntityRotationParameter.getStartRotation().clone():this._rotate=this._geoEntityRotationParameter.getEndRotation().clone(),this._isBack=!this._isBack,this._isFinished||this._init(this._geoEntityRotationParameter,e))}else{let t=e-this._lastTime;this._lastTime=e;let i=this._rotate.x+t*this._speed.x,n=this._rotate.y+t*this._speed.y,r=this._rotate.z+t*this._speed.z;this._rotate=new _0x45ea17(i,n,r)}return this._rotate}}}const _0x45598d=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x41a51b=_0x45598d(void 0,(function(){return _0x41a51b.toString().search("(((.+)+)+)+$").toString().constructor(_0x41a51b).search("(((.+)+)+)+$")}));_0x41a51b();class _0x455abc{constructor(e,t){this._geoEntityScaleParameter=e,this._speed=void 0,this._startTime=t,this._cyclicStartTime=void 0,this._lastTime=void 0,this._isBack=!1,this._isFinished=!1,this._scale=void 0,this._init(e,t)}_init(e,t){if(!WebGLPlot$g.defined(e)||!WebGLPlot$g.defined(t))return void(this._isFinished=!0);let i=1e3*e.getTime();if(i<0)return void(this._isFinished=!0);let n=e.getStartScale(),r=e.getEndScale();this._isBack&&(n=e.getEndScale(),r=e.getStartScale()),this._speed=0,e.isGradient()&&(this._speed=(r-n)/i),this._cyclicStartTime=t,this._lastTime=t,this._scale=n,this._isFinished=!1}_caclulate(e){if(WebGLPlot$g.defined(this._geoEntityScaleParameter)){if(this._isFinished)return this._scale;if(e-this._startTime>1e3*this._geoEntityScaleParameter.getTotalTime()&&(this._isFinished=!0),e-this._cyclicStartTime>1e3*this._geoEntityScaleParameter.getTime()){let t=this._geoEntityScaleParameter.getCyclicType();t==_0x37690a.NO?(this._isFinished=!0,this._scale=this._geoEntityScaleParameter.getEndScale()):t==_0x37690a.ONEWAY?(this._scale=this._geoEntityScaleParameter.getEndScale(),this._isFinished||this._init(this._geoEntityScaleParameter,e)):t==_0x37690a.BOTHWAY&&(this._isBack?this._scale=this._geoEntityScaleParameter.getStartScale():this._scale=this._geoEntityScaleParameter.getEndScale(),this._isBack=!this._isBack,this._isFinished||this._init(this._geoEntityScaleParameter,e))}else{let t=e-this._lastTime;this._lastTime=e,this._scale+=t*this._speed}return this._scale}}}const _0xb28e64=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x592004=_0xb28e64(void 0,(function(){return _0x592004.toString().search("(((.+)+)+)+$").toString().constructor(_0x592004).search("(((.+)+)+)+$")}));_0x592004();class _0x1057a5{constructor(e,t,i){this._deductionScript=e,this._executeManagerCalc=t,this._currentGroupIndex=i,this._currentGeoEntityBasicParameter=void 0,this._currentGeoEntityEffectParameter=void 0,this._currentGeoEntityMoveParameter=void 0,this._currentGeoEntityRotationParameter=void 0,this._currentGeoEntityScaleParameter=void 0,this._geoEntity=void 0,this._finishTime=void 0,this._geoEntityMoveCalc=void 0,this._geoEntityRotationCalc=void 0,this._geoEntityScaleCalc=void 0,this._position=void 0,this._scale=void 0,this._rotation=void 0,this._startTime=void 0}_getGeoEntityUUID(){return this._deductionScript.getGeoEntityUUID()}_setGeoEntityMoveParameter(e,t){this._geoEntityMoveCalc=new _0x386582(this._deductionScript.getGeoEntityUUID(),e,t,this._executeManagerCalc,this._currentGroupIndex,this._position,this._rotation)}_setGeoEntityRotationParameter(e,t){this._geoEntityRotationCalc=new _0x164388(e,t)}_setGeoEntityScaleParameter(e,t){this._geoEntityScaleCalc=new _0x455abc(e,t)}_getPosition(){return this._position}_start(e){this._startTime=e,this._geoEntity=_0x1569f6.getGeoEntityByUUID(this._deductionScript.getGeoEntityUUID()),WebGLPlot$g.defined(this._geoEntity)&&(this._position=this._geoEntity.getGeoEntityParameter().getPosition(),this._rotation=this._geoEntity.getGeoEntityParameter().getModelRotate(),this._scale=this._geoEntity.getGeoEntityParameter().getModelScale())}_excuteMove(e){if(!WebGLPlot$g.defined(this._geoEntityMoveCalc))return;let t={},i=this._geoEntityMoveCalc._caclulate(e);return WebGLPlot$g.defined(i)&&(WebGLPlot$g.defined(i.position)&&(t.position=i.position),WebGLPlot$g.defined(i.rotation)&&(t.moveRotate=i.rotation)),t}_excuteRotation(e){if(!WebGLPlot$g.defined(this._geoEntityRotationCalc))return;let t=this._geoEntityRotationCalc._caclulate(e);return WebGLPlot$g.defined(t)?t:void 0}_excuteScale(e){if(!WebGLPlot$g.defined(this._geoEntityScaleCalc))return;let t=this._geoEntityScaleCalc._caclulate(e);return WebGLPlot$g.defined(t)?t:void 0}_isLegal(e){if(!WebGLPlot$g.defined(e))return!1;let t=e._getGeoEntityParameter();return!!(t._isModelPathUpdate&&t._isVisibleUpdate&&t._isDotPlotLibIDUpdate&&t._isDotPlotCodeUpdate&&t._isDotPlotStyleUpdate&&t._isPicturePathUpdate&&t._isShowModeUpdate&&t._isDistanceChangeModeUpdate&&t._isChangeModeDistanceUpdate)}_execute(e){if(this._isDeductionScriptExecuteStop(e))return;let t=e-this._startTime,i=t/1e3,n=this._deductionScript.getGeoEntityBasicParameterTimes();for(let e=0;e<n.length;e++){let t=n[e],r=this._deductionScript.getGeoEntityBasicParameter(t);if(i>=t){if(e===n.length-1){this._currentGeoEntityBasicParameter=r.clone();break}if(i<n[e+1]){this._currentGeoEntityBasicParameter=r.clone();break}}}let r=this._deductionScript.getGeoEntityEffectParameterTimes();for(let e=0;e<r.length;e++){let t=r[e],n=this._deductionScript.getGeoEntityEffectParameter(t);if(i>=t){if(e===r.length-1){this._currentGeoEntityEffectParameter=n;break}if(i<r[e+1]){this._currentGeoEntityEffectParameter=n;break}}}let o,a,s=this._deductionScript.getGeoEntityMoveParameterTimes();for(let e=0;e<s.length;e++){let t=s[e],n=this._deductionScript.getGeoEntityMoveParameter(t);if(i>=t){if(e===s.length-1){o=n,a=1e3*t;break}if(i<s[e+1]){o=n,a=1e3*t;break}}}let l,u,c=this._deductionScript.getGeoEntityRotationParameterTimes();for(let e=0;e<c.length;e++){let t=c[e],n=this._deductionScript.getGeoEntityRotationParameter(t);if(i>=t){if(e===c.length-1){l=n,u=1e3*t;break}if(i<c[e+1]){l=n,u=1e3*t;break}}}let h,d,f=this._deductionScript.getGeoEntityScaleParameterTimes();for(let e=0;e<f.length;e++){let t=f[e],n=this._deductionScript.getGeoEntityScaleParameter(t);if(i>=t){if(e===f.length-1){h=n,d=1e3*t;break}if(i<f[e+1]){h=n,d=1e3*t;break}}}!WebGLPlot$g.defined(this._currentGeoEntityBasicParameter)&&WebGLPlot$g.defined(this._geoEntity)&&(this._currentGeoEntityBasicParameter=new _0x209a53,this._currentGeoEntityBasicParameter._UUID="InitGeoEntityBasicParameter",this._currentGeoEntityBasicParameter._geoEntityParameter=this._geoEntity.getGeoEntityParameter()),WebGLPlot$g.defined(this._currentGeoEntityEffectParameter)||(this._currentGeoEntityEffectParameter=new _0x321ef3,this._currentGeoEntityEffectParameter._UUID="InitGeoEntityEffectParameter",WebGLPlot$g.defined(this._geoEntity)&&this._geoEntity.getGeoEntityEffects().forEach((e=>{this._currentGeoEntityEffectParameter._geoEntityEffects.push(e.clone())}))),WebGLPlot$g.defined(o)&&(!WebGLPlot$g.defined(this._currentGeoEntityMoveParameter)||this._currentGeoEntityMoveParameter.getUUID()!=o.getUUID())&&(this._currentGeoEntityMoveParameter=o,this._setGeoEntityMoveParameter(o,a)),WebGLPlot$g.defined(l)&&(!WebGLPlot$g.defined(this._currentGeoEntityRotationParameter)||this._currentGeoEntityRotationParameter.getUUID()!=l.getUUID())&&(this._currentGeoEntityRotationParameter=l,this._setGeoEntityRotationParameter(l,u)),WebGLPlot$g.defined(h)&&(!WebGLPlot$g.defined(this._currentGeoEntityScaleParameter)||this._currentGeoEntityScaleParameter.getUUID()!=h.getUUID())&&(this._currentGeoEntityScaleParameter=h,this._setGeoEntityScaleParameter(h,d));let p=this._excuteMove(t),_=this._excuteRotation(t),m=this._excuteScale(t),$={position:this._position,rotation:this._rotation,scale:this._scale};return $.UUID=this._deductionScript.getGeoEntityUUID(),WebGLPlot$g.defined(this._currentGeoEntityMoveParameter)&&($.geoEntityMoveParameter={UUID:this._currentGeoEntityMoveParameter.getUUID(),geoEntityMoveParameter:this._currentGeoEntityMoveParameter},this._geoEntityMoveCalc._isFinished&&($.geoEntityMoveParameter=void 0)),WebGLPlot$g.defined(this._currentGeoEntityBasicParameter)&&($.geoEntityBasicParameter={UUID:this._currentGeoEntityBasicParameter.getUUID(),geoEntityBasicParameter:this._currentGeoEntityBasicParameter}),WebGLPlot$g.defined(this._currentGeoEntityEffectParameter)&&($.geoEntityEffectParameter={UUID:this._currentGeoEntityEffectParameter.getUUID(),geoEntityEffectParameter:this._currentGeoEntityEffectParameter}),WebGLPlot$g.defined(p)&&WebGLPlot$g.defined(p.position)&&($.position=p.position),WebGLPlot$g.defined(p)&&WebGLPlot$g.defined(p.moveRotate)&&($.rotation=p.moveRotate),WebGLPlot$g.defined(_)&&($.rotation=new _0x45ea17($.rotation.x+_.x,$.rotation.y+_.y,$.rotation.z+_.z)),WebGLPlot$g.defined(m)&&($.scale=m),$}_isDeductionScriptExecuteStop(e){let t=!1,i=this._deductionScript.getGeoEntityMoveParameterTimes();if(0===i.length)t=!0;else{let e=i[i.length-1];WebGLPlot$g.defined(this._currentGeoEntityMoveParameter)&&this._currentGeoEntityMoveParameter.getUUID()===this._deductionScript.getGeoEntityMoveParameter(e).getUUID()&&(!WebGLPlot$g.defined(this._geoEntityMoveCalc)||!0===this._geoEntityMoveCalc._isFinished)&&(t=!0)}let n=!1,r=this._deductionScript.getGeoEntityRotationParameterTimes();if(0===r.length)n=!0;else{let e=r[r.length-1];WebGLPlot$g.defined(this._currentGeoEntityRotationParameter)&&this._currentGeoEntityRotationParameter.getUUID()===this._deductionScript.getGeoEntityRotationParameter(e).getUUID()&&(!WebGLPlot$g.defined(this._geoEntityRotationCalc)||!0===this._geoEntityRotationCalc._isFinished)&&(n=!0)}let o=!1,a=this._deductionScript.getGeoEntityScaleParameterTimes();if(0===a.length)o=!0;else{let e=a[a.length-1];WebGLPlot$g.defined(this._currentGeoEntityScaleParameter)&&this._currentGeoEntityScaleParameter.getUUID()===this._deductionScript.getGeoEntityScaleParameter(e).getUUID()&&(!WebGLPlot$g.defined(this._geoEntityScaleCalc)||!0===this._geoEntityScaleCalc._isFinished)&&(o=!0)}let s=!1,l=this._deductionScript.getGeoEntityBasicParameterTimes();if(0===l.length)s=!0;else{let e=l[l.length-1];WebGLPlot$g.defined(this._currentGeoEntityBasicParameter)&&this._currentGeoEntityBasicParameter.getUUID()===this._deductionScript.getGeoEntityBasicParameter(e).getUUID()&&(s=!0)}let u=!1,c=this._deductionScript.getGeoEntityEffectParameterTimes();if(0===c.length)u=!0;else{let e=c[c.length-1];WebGLPlot$g.defined(this._currentGeoEntityEffectParameter)&&this._currentGeoEntityEffectParameter.getUUID()===this._deductionScript.getGeoEntityEffectParameter(e).getUUID()&&(u=!0)}if(t&&n&&o&&s&&u){if(this._deductionScript.getDelayFinishTime()>0){if(!WebGLPlot$g.defined(this._finishTime))return this._finishTime=e,!1;if(e-this._finishTime<=1e3*this._deductionScript.getDelayFinishTime())return!1}return!0}return!1}}const _0x3262f4=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x5e22b3=_0x3262f4(void 0,(function(){return _0x5e22b3.toString().search("(((.+)+)+)+$").toString().constructor(_0x5e22b3).search("(((.+)+)+)+$")}));_0x5e22b3();class _0x7ccad{constructor(){this._deductionScriptGroups=void 0,this._allActions=void 0}static getInstance(){return _0x7ccad._instance||(_0x7ccad._instance=new _0x7ccad),_0x7ccad._instance}_reset(){this._deductionScriptGroups=void 0,this._allActions=void 0}_getAllActions(){return this._allActions}_containDeductionScriptGeoEntity(e,t){let i=e.getDeductionScripts();for(let e=0;e<i.length;e++)if(i[e].getGeoEntityUUID()===t)return i[e]}_calcDeductionScript(e,t,i,n,r){if(-1!==t.indexOf(n.getUUID()))return;n.getGeoEntityMoveParameterTimes().forEach((o=>{let a=n.getGeoEntityMoveParameter(o),s=a.getOriginGeoEntityUUID(),l=a.getTargetGeoEntityUUID();if(WebGLPlot$g.defined(s)&&s!==n.getGeoEntityUUID()){let n=this._containDeductionScriptGeoEntity(i,s);WebGLPlot$g.defined(n)&&-1===t.indexOf(n.getUUID())&&this._calcDeductionScript(e,t,i,n,r)}if(WebGLPlot$g.defined(l)){let n=this._containDeductionScriptGeoEntity(i,l);WebGLPlot$g.defined(n)&&-1===t.indexOf(n.getUUID())&&this._calcDeductionScript(e,t,i,n,r)}})),t.push(n.getUUID()),e.set(n.getGeoEntityUUID(),[]);let o=new _0x1057a5(n,this,r);o._start(0);let a=10;for(;;){let t=o._execute(a);if(!WebGLPlot$g.defined(t))break;t.time=a,e.get(n.getGeoEntityUUID()).push(t),a+=10}}_getPosition(e,t,i){let n;if(WebGLPlot$g.defined(this._allActions)){let r=this._allActions.groupActions;if(r.length>0){let o=r[e].actions;if(o.has(t)){let e=o.get(t);for(let t=0;t<e.length;t++){let r=e[t];if(i>=r.time){if(t===e.length-1){n=r.position;break}if(i<e[t+1].time){n=r.position;break}}}}if(!WebGLPlot$g.defined(n))for(let i=e-1;i>=0;i--){let e=r[i].actions;if(e.has(t)){let i=e.get(t);i.length>0&&(n=i[i.length-1].position);break}}}}if(!WebGLPlot$g.defined(n)){let e=_0x1569f6.getGeoEntityByUUID(t);WebGLPlot$g.defined(e)&&(n=e.getGeoEntityParameter().getPosition())}return n}_calcute(){this._deductionScriptGroups=_0x373a17.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._allActions={};let e=0,t=[];this._allActions.groupActions=t;for(let i=0;i<this._deductionScriptGroups.length;i++){let n=this._deductionScriptGroups[i],r={};t.push(r);let o=new Map;r.actions=o;let a=[],s=n.getDeductionScriptExtend()._getDeductionScript();this._calcDeductionScript(o,a,n,s,i),n.getDeductionScripts().forEach((e=>{this._calcDeductionScript(o,a,n,e,i)}));let l=0;o.forEach(((e,t)=>{if(e.length>0){let t=e[e.length-1].time;t>l&&(l=t)}})),r.time=l,e+=l}this._allActions.time=e,console.log(this._allActions)}_findGeoEntityMoveParameter(e){if(WebGLPlot$g.defined(this._deductionScriptGroups))for(let t=0;t<this._deductionScriptGroups.length;t++){let i=this._deductionScriptGroups[t].getDeductionScripts();for(let n=0;n<i.length;n++){let r=i[n],o=r.getGeoEntityMoveParameterTimes();for(let i=0;i<o.length;i++){let n=r.getGeoEntityMoveParameter(o[i]);if(n.getUUID()===e)return{geoEntityMoveParameter:n,deductionScript:r,groupIndex:t,time:o[i]}}}}}_indexOfDeductionScript(e){if(WebGLPlot$g.defined(this._deductionScriptGroups))for(let t=0;t<this._deductionScriptGroups.length;t++){let i=this._deductionScriptGroups[t].getDeductionScripts();for(let n=0;n<i.length;n++)if(i[n].getUUID()===e)return t}return-1}_calcGeoEntityMoveParameter(e,t,i){let n=this._getMoveParameterTime(e.getUUID()),r=this._getMoveParameterSpeed(e.getUUID());WebGLPlot$g.defined(n)&&WebGLPlot$g.defined(r)&&(WebGLPlot$g.defined(e.getOriginGeoEntityUUID())&&e.setOriginPosition(this._getPosition(i,e.getOriginGeoEntityUUID(),1e3*t)),WebGLPlot$g.defined(e.getTargetGeoEntityUUID())&&WebGLPlot$g.defined(n)&&e.setTargetPosition(this._getPosition(i,e.getTargetGeoEntityUUID(),1e3*(t+n))),e.setTime(n),e.setSpeed(r))}_getMoveParameterTime(e){let t;if(WebGLPlot$g.defined(this._deductionScriptGroups)){let i=this._findGeoEntityMoveParameter(e);if(WebGLPlot$g.defined(i)){t=i.geoEntityMoveParameter.getTime();let n=i.groupIndex,r=i.deductionScript.getGeoEntityUUID();if(!i.geoEntityMoveParameter.isTimeMode()&&WebGLPlot$g.defined(n)&&WebGLPlot$g.defined(r)&&WebGLPlot$g.defined(this._allActions)){let i=this._allActions.groupActions;if(n<i.length){let o=i[n].actions;if(o.has(r)){let i=o.get(r);if(WebGLPlot$g.defined(i)){let n;for(let r=0;r<i.length;r++){let o=i[r];if(Cesium.defined(o.geoEntityMoveParameter)&&o.geoEntityMoveParameter.UUID===e)WebGLPlot$g.defined(n)||(n=o.time);else if(WebGLPlot$g.defined(n)){t=(o.time-n)/1e3;break}}Cesium.defined(n)&&!Cesium.defined(t)&&(t=(i[i.length-1].time-n)/1e3)}}}}}}return t}_getMoveParameterSpeed(e){let t;if(WebGLPlot$g.defined(this._deductionScriptGroups)){let i=this._findGeoEntityMoveParameter(e);if(WebGLPlot$g.defined(i)){t=i.geoEntityMoveParameter.getSpeed();let n=i.groupIndex,r=i.deductionScript.getGeoEntityUUID();if(i.geoEntityMoveParameter.isTimeMode()&&WebGLPlot$g.defined(n)&&WebGLPlot$g.defined(r)&&WebGLPlot$g.defined(this._allActions)){let i,o,a=this._allActions.groupActions;if(n<a.length){let t=a[n].actions;if(t.has(r)){let n=t.get(r);if(WebGLPlot$g.defined(n)){let t;for(let r=0;r<n.length;r++){let a=n[r];if(Cesium.defined(a.geoEntityMoveParameter)&&a.geoEntityMoveParameter.UUID===e)WebGLPlot$g.defined(i)||(t=a.time,i=[]),i.push(a.position);else if(WebGLPlot$g.defined(t)){o=(a.time-t)/1e3;break}}WebGLPlot$g.defined(t)&&!WebGLPlot$g.defined(o)&&(o=(n[n.length-1].time-t)/1e3)}}}if(i.length>0){let e=[];i.forEach((t=>{e.push(_0x1569f6.degreesToCartesian3(t))})),t=_0x1569f6.getAllDistance(e)/o}}}}return t}_getDependsDeductionScriptInfos(e,t){let i=[];if(WebGLPlot$g.defined(this._deductionScriptGroups)&&e<this._deductionScriptGroups.length)for(let n=e;n<this._deductionScriptGroups.length;n++)this._deductionScriptGroups[n].getDeductionScripts().forEach((r=>{if(r.getGeoEntityUUID()!==t||n!==e){let e=r.getGeoEntityMoveParameterTimes();for(let o=0;o<e.length;o++){let a=r.getGeoEntityMoveParameter(e[o]);(a.getOriginGeoEntityUUID()===t||a.getTargetGeoEntityUUID()===t)&&i.push({deductionScript:r,groupIndex:n})}}}));return i}_calcFlowMoveParameter(e,t,i){e.getGeoEntityMoveParameterTimes().forEach((n=>{if(n>t){let t=e.getGeoEntityMoveParameter(n);this._calcGeoEntityMoveParameter(t,n,i)}}))}_updateGeoEntityMoveParameter(e,t,i){let n=this._indexOfDeductionScript(e.getUUID());this._calcGeoEntityMoveParameter(i,t,n),this._calcFlowMoveParameter(e,t,n),this._getDependsDeductionScriptInfos(n,e.getGeoEntityUUID()).forEach((e=>{let t=e.deductionScript.getGeoEntityMoveParameterTimes();t.length>0&&this._updateGeoEntityMoveParameter(e.deductionScript,t[0],e.deductionScript.getGeoEntityMoveParameter(t[0]))}))}_removeGeoEntityMoveParameter(e,t){let i=this._indexOfDeductionScript(e.getUUID());this._calcFlowMoveParameter(e,t,i),this._getDependsDeductionScriptInfos(i,e.getGeoEntityUUID()).forEach((e=>{let t=e.deductionScript.getGeoEntityMoveParameterTimes();t.length>0&&this._updateGeoEntityMoveParameter(e.deductionScript,t[0],e.deductionScript.getGeoEntityMoveParameter(t[0]))}))}}const _0x2d92d7=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x1ba78d=_0x2d92d7(void 0,(function(){return _0x1ba78d.toString().search("(((.+)+)+)+$").toString().constructor(_0x1ba78d).search("(((.+)+)+)+$")}));_0x1ba78d();class _0x5e9935{constructor(e){this._UUID=WebGLPlot$g.createGuid(),this._geoEntityUUID=e,this._delayFinishTime=0,this._geoEntityBasicParameters=new Map,this._geoEntityEffectParameters=new Map,this._geoEntityMoveParameters=new Map,this._geoEntityRotationParameters=new Map,this._geoEntityScaleParameters=new Map,this._isModified=!1,this._isPlay=!0}_isModify(){return this._isModified}_setIsModify(e){this._isModified=e}_save(){_0x373a17.getInstance()._saveDeductionScript(!1)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$g.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$g.defined(t.geoEntityUUID)&&(this._geoEntityUUID=t.geoEntityUUID),WebGLPlot$g.defined(t.delayFinishTime)&&(this._delayFinishTime=t.delayFinishTime),WebGLPlot$g.defined(t.geoBaseEntityParameters)&&(this._geoEntityBasicParameters.clear(),t.geoBaseEntityParameters.forEach((e=>{let t=e.time,i=new _0x209a53;i._fromJson(e.geoEntityBasicParameter),this._geoEntityBasicParameters.set(t,i)}))),WebGLPlot$g.defined(t.geoEntityEffectParameters)&&(this._geoEntityEffectParameters.clear(),t.geoEntityEffectParameters.forEach((e=>{let t=e.time,i=new _0x321ef3;i._fromJson(e.geoEntityEffectParameter),this._geoEntityEffectParameters.set(t,i)}))),WebGLPlot$g.defined(t.geoEntityMoveParameters)&&(this._geoEntityMoveParameters.clear(),t.geoEntityMoveParameters.forEach((e=>{let t=e.time,i=new _0x1c784a;i._fromJson(e.geoEntityMoveParameter),this._geoEntityMoveParameters.set(t,i)}))),WebGLPlot$g.defined(t.geoEntityRotationParameters)&&(this._geoEntityRotationParameters.clear(),t.geoEntityRotationParameters.forEach((e=>{let t=e.time,i=new _0x11d14c;i._fromJson(e.geoEntityRotationParameter),this._geoEntityRotationParameters.set(t,i)}))),WebGLPlot$g.defined(t.geoEntityScaleParameters)&&(this._geoEntityScaleParameters.clear(),t.geoEntityScaleParameters.forEach((e=>{let t=e.time,i=new _0x21ab63;i._fromJson(e.geoEntityScaleParameter),this._geoEntityScaleParameters.set(t,i)})))}_toJson(){let e={};return e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("geoEntityUUID")||(e.geoEntityUUID=this._geoEntityUUID),e.hasOwnProperty("delayFinishTime")||(e.delayFinishTime=this._delayFinishTime),e.hasOwnProperty("geoBaseEntityParameters")||(e.geoBaseEntityParameters=[],this._geoEntityBasicParameters.forEach(((t,i)=>{let n={};n.hasOwnProperty("time")||(n.time=i),n.hasOwnProperty("geoEntityBasicParameter")||(n.geoEntityBasicParameter=t._toJson()),e.geoBaseEntityParameters.push(n)}))),e.hasOwnProperty("geoEntityEffectParameters")||(e.geoEntityEffectParameters=[],this._geoEntityEffectParameters.forEach(((t,i)=>{let n={};n.hasOwnProperty("time")||(n.time=i),n.hasOwnProperty("geoEntityEffectParameter")||(n.geoEntityEffectParameter=t._toJson()),e.geoEntityEffectParameters.push(n)}))),e.hasOwnProperty("geoEntityMoveParameters")||(e.geoEntityMoveParameters=[],this._geoEntityMoveParameters.forEach(((t,i)=>{let n={};n.hasOwnProperty("time")||(n.time=i),n.hasOwnProperty("geoEntityMoveParameter")||(n.geoEntityMoveParameter=t._toJson()),e.geoEntityMoveParameters.push(n)}))),e.hasOwnProperty("geoEntityRotationParameters")||(e.geoEntityRotationParameters=[],this._geoEntityRotationParameters.forEach(((t,i)=>{let n={};n.hasOwnProperty("time")||(n.time=i),n.hasOwnProperty("geoEntityRotationParameter")||(n.geoEntityRotationParameter=t._toJson()),e.geoEntityRotationParameters.push(n)}))),e.hasOwnProperty("geoEntityScaleParameters")||(e.geoEntityScaleParameters=[],this._geoEntityScaleParameters.forEach(((t,i)=>{let n={};n.hasOwnProperty("time")||(n.time=i),n.hasOwnProperty("geoEntityScaleParameter")||(n.geoEntityScaleParameter=t._toJson()),e.geoEntityScaleParameters.push(n)}))),JSON.stringify(e)}_getTotalTime(){let e=0,t=this.getGeoEntityBasicParameterTimes();if(t.length>0){let i=1e3*t[t.length-1];e<i&&(e=i)}let i=this.getGeoEntityEffectParameterTimes();if(i.length>0){let t=1e3*i[i.length-1];e<t&&(e=t)}let n=this.getGeoEntityMoveParameterTimes();if(n.length>0){let t=n[n.length-1],i=this.getGeoEntityMoveParameter(t),r=1e3*(n[n.length-1]+i.getTime());e<r&&(e=r)}let r=this.getGeoEntityRotationParameterTimes();if(r.length>0){let t=r[r.length-1],i=this.getGeoEntityRotationParameter(t),n=1e3*(r[r.length-1]+i.getTotalTime());e<n&&(e=n)}let o=this.getGeoEntityScaleParameterTimes();if(o.length>0){let t=o[o.length-1],i=this.getGeoEntityScaleParameter(t),n=1e3*(o[o.length-1]+i.getTotalTime());e<n&&(e=n)}return e+=1e3*this._delayFinishTime,e}getIsPlay(){return this._isPlay}setIsPlay(e){this._isPlay=e}getGeoEntityUUID(){return this._geoEntityUUID}getUUID(){return this._UUID}getGeoEntityBasicParameterTimes(){let e=[];return this._geoEntityBasicParameters.forEach(((t,i)=>{e.push(i)})),e.sort((function(e,t){return e-t})),e}getGeoEntityBasicParameter(e){let t;return this._geoEntityBasicParameters.has(e)&&(t=this._geoEntityBasicParameters.get(e)),t}setGeoEntityBasicParameter(e,t){this._geoEntityBasicParameters.set(e,t),this._isModified=!0,this._save()}removeGeoEntityBasicParameter(e){this._geoEntityBasicParameters.has(e)&&(this._geoEntityBasicParameters.delete(e),this._isModified=!0,this._save())}getGeoEntityEffectParameterTimes(){let e=[];return this._geoEntityEffectParameters.forEach(((t,i)=>{e.push(i)})),e.sort((function(e,t){return e-t})),e}getGeoEntityEffectParameter(e){let t;return this._geoEntityEffectParameters.has(e)&&(t=this._geoEntityEffectParameters.get(e)),t}setGeoEntityEffectParameter(e,t){this._geoEntityEffectParameters.set(e,t),this._isModified=!0,this._save()}removeGeoEntityEffectParameter(e){this._geoEntityEffectParameters.has(e)&&(this._geoEntityEffectParameters.delete(e),this._isModified=!0,this._save())}getGeoEntityMoveParameterTimes(){let e=[];return this._geoEntityMoveParameters.forEach(((t,i)=>{e.push(i)})),e.sort((function(e,t){return e-t})),e}getGeoEntityMoveParameter(e){let t;return this._geoEntityMoveParameters.has(e)&&(t=this._geoEntityMoveParameters.get(e)),t}setGeoEntityMoveParameter(e,t){let i=this._geoEntityMoveParameters.get(e);WebGLPlot$g.defined(i)&&(i=i.clone()),this._geoEntityMoveParameters.set(e,t);let n=!0;try{_0x7ccad.getInstance()._calcute()}catch(e){console.log(e),n=!1}return n?(_0x7ccad.getInstance()._updateGeoEntityMoveParameter(this,e,t),this._isModified=!0,this._save()):WebGLPlot$g.defined(i)&&this._geoEntityMoveParameters.set(e,i),n}removeGeoEntityMoveParameter(e){this._geoEntityMoveParameters.has(e)&&(this._geoEntityMoveParameters.delete(e),_0x7ccad.getInstance()._calcute(),_0x7ccad.getInstance()._removeGeoEntityMoveParameter(this,e),this._isModified=!0,this._save())}setDelayFinishTime(e){this._delayFinishTime=e,this._isModified=!0,this._save()}getDelayFinishTime(){return this._delayFinishTime}getGeoEntityRotationParameterTimes(){let e=[];return this._geoEntityRotationParameters.forEach(((t,i)=>{e.push(i)})),e.sort((function(e,t){return e-t})),e}getGeoEntityRotationParameter(e){let t;return this._geoEntityRotationParameters.has(e)&&(t=this._geoEntityRotationParameters.get(e)),t}setGeoEntityRotationParameter(e,t){this._geoEntityRotationParameters.set(e,t),this._isModified=!0,this._save()}removeGeoEntityRotationParameter(e){this._geoEntityRotationParameters.has(e)&&(this._geoEntityRotationParameters.delete(e),this._isModified=!0,this._save())}getGeoEntityScaleParameterTimes(){let e=[];return this._geoEntityScaleParameters.forEach(((t,i)=>{e.push(i)})),e.sort((function(e,t){return e-t})),e}getGeoEntityScaleParameter(e){let t;return this._geoEntityScaleParameters.has(e)&&(t=this._geoEntityScaleParameters.get(e)),t}setGeoEntityScaleParameter(e,t){this._geoEntityScaleParameters.set(e,t),this._isModified=!0,this._save()}removeGeoEntityScaleParameter(e){this._geoEntityScaleParameters.has(e)&&(this._geoEntityScaleParameters.delete(e),this._isModified=!0,this._save())}}const _0x20876f=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0xc154d1=_0x20876f(void 0,(function(){return _0xc154d1.toString().search("(((.+)+)+)+$").toString().constructor(_0xc154d1).search("(((.+)+)+)+$")}));_0xc154d1();class _0x3a7ce4{constructor(e,t){this._deductionScript=e,this._groupIndex=t,this._geoEntityMoveParameter=void 0,this._speed=0,this._curvePath3D=[],this._startTime=void 0,this._isFinished=!1,this._position=void 0,this._rotation=void 0,this._geoEntityMoveParameter=void 0,this._allDistance=void 0,this._deductionScriptGroups=_0x373a17.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._currentGeoEntityMoveParameterUUID=void 0}_init(e,t,i,n){this._geoEntityMoveParameter=e,this._startTime=t,this._position=i,this._rotation=n;let r=e.getSpeed()/1e3;if(r>0){let t=[],i=e.getPathPoint3D(),n=e.getScalePoint2D(),o=e.getOriginPosition(),a=e.getTargetPosition();if(WebGLPlot$g.defined(i))WebGLPlot$g.defined(o)&&t.push(o),i.forEach((e=>{t.push(e)})),WebGLPlot$g.defined(a)&&t.push(a);else if(WebGLPlot$g.defined(n)){if(WebGLPlot$g.defined(o)&&WebGLPlot$g.defined(a)){let e=[o,a];t=[o,a];let i=_0x1569f6.getAllDistance(e);n.forEach((n=>{let r=i*n.x,o=_0x1569f6.getPositionByDistance(e,r);t.splice(t.length-1,0,new WebGLPlot$g.Cartesian3(o.point.x,o.point.y,o.point.z+n.y))}))}}else WebGLPlot$g.defined(o)&&t.push(o),WebGLPlot$g.defined(a)&&t.push(a);if(t=this._convertToCartesian3(t),t.length>=2&&_0x1569f6.getAllDistance(t)>.001){if(e.isCurvePath()){let e=this._createCurve3D(t);this._curvePath3D=e.curvePath3D}else this._curvePath3D=t;this._speed=r}}this._allDistance=_0x1569f6.getAllDistance(this._curvePath3D),this._isFinished=!1}_update(e,t,i){let n={},r=e/1e3,o=this._getCurrentGeoEntityMoveParameter(r);if(WebGLPlot$g.defined(o.geoEntityMoveParameter)&&WebGLPlot$g.defined(o.geoEntityMoveParameterActionTime)){this._currentGeoEntityMoveParameterUUID!=o.geoEntityMoveParameter.getUUID()&&(this._currentGeoEntityMoveParameterUUID=o.geoEntityMoveParameter.getUUID(),this._init(o.geoEntityMoveParameter,o.geoEntityMoveParameterActionTime,t,i));let r=this._caclulate(e);WebGLPlot$g.defined(r)&&(n.position=r.position,n.isCurrent=!0,n.finishTime=o.geoEntityMoveParameterActionTime+1e3*this._geoEntityMoveParameter.getTime(),n.isFinished=this._isFinished,n.rotation=r.rotation)}else{let e,r,o;if(this._groupIndex>0)for(let t=this._groupIndex-1;t>=0;t--){let i=this._deductionScriptGroups[t]._getDeductionScriptByGeoEntityUUID(this._deductionScript.getGeoEntityUUID());if(WebGLPlot$g.defined(i)){let n=i.getGeoEntityMoveParameterTimes();if(n.length>0){e=n[n.length-1],r=i.getGeoEntityMoveParameter(e),o=t;break}}}if(WebGLPlot$g.defined(r)){let t=new _0x3a7ce4;t._init(r);let i,a=t._getFinalPosition(),s=t._curvePath3D;if(s.length>1){let e=_0x1569f6.getPitch(s[s.length-2],s[s.length-1]),t=_0x1569f6.getHeading(s[s.length-2],s[s.length-1]);e&&t&&(i=new _0x45ea17(0),i.x=WebGLPlot$g.CesiumMath.toDegrees(e),i.z=-WebGLPlot$g.CesiumMath.toDegrees(t))}n.position=a,n.isCurrent=!1,n.rotation=i,n.groupIndex=o,n.finishTime=1e3*(e+r.getTime())}else n.position=t,n.isCurrent=!1,n.rotation=i}return n}_getCurrentGeoEntityMoveParameter(e){let t,i,n=this._deductionScript.getGeoEntityMoveParameterTimes();for(let r=0;r<n.length;r++){let o=n[r],a=this._deductionScript.getGeoEntityMoveParameter(o);if(e>=o){if(r===n.length-1){t=a,i=1e3*o;break}if(e<n[r+1]){t=a,i=1e3*o;break}}}return{geoEntityMoveParameter:t,geoEntityMoveParameterActionTime:i}}_createCurve3D(e){let t=_0x1569f6.getAllDistance(e),i=[];i.push(0);let n=0;for(let r=0;r<e.length-2;r++){let o=e[r],a=e[r+1];n+=WebGLPlot$g.Cartesian3.distance(o,a),i.push(n/t)}i.push(1);let r=new Cesium.HermiteSpline.createNaturalCubic({points:e,times:i}),o=100*e.length,a=[];for(let e=0;e<=o;e++){let t=r.evaluate(e/o);a.push(t)}let s=[];return i.forEach((e=>{s.push(e*o)})),{curvePath3D:a,controlPointIndexs:s}}_convertToCartesian3(e){let t=[];return e.forEach((e=>{t.push(_0x1569f6.degreesToCartesian3(e))})),t}_getFinalPosition(){let e=this._geoEntityMoveParameter.getTargetPosition();if(WebGLPlot$g.defined(e))return e;let t=this._geoEntityMoveParameter.getPathPoint3D();return t.length>0&&(e=t[t.length-1]),WebGLPlot$g.defined(e)||(e=this._geoEntityMoveParameter.getOriginPosition(),WebGLPlot$g.defined(e))?e:void 0}_caclulate(e){if(!this._isFinished)if(this._geoEntityMoveParameter.isTimeMode()&&0===this._geoEntityMoveParameter.getTime())this._isFinished=!0,this._position=this._getFinalPosition();else{let t=(e-this._startTime)*this._speed;if(t>this._allDistance)this._isFinished=!0;else{let e=_0x1569f6.getPositionByDistance(this._curvePath3D,t),i=e.index;if(i<=this._curvePath3D.length&&i>=0){if(this._position=_0x1569f6.cartesian3ToDegrees(e.point),i!==this._curvePath3D.length-1){let t=this._curvePath3D[i+1];if(e.point.x!==t.x||e.point.y!==t.y||e.point.z!==t.z){let i=_0x1569f6.getPitch(e.point,t),n=_0x1569f6.getHeading(e.point,t);if(i&&n){let e=new _0x45ea17(0);e.x=WebGLPlot$g.CesiumMath.toDegrees(i),e.z=-WebGLPlot$g.CesiumMath.toDegrees(n),this._rotation=e}}}}else this._isFinished=!0}if(this._isFinished){let e=this._getFinalPosition();if(WebGLPlot$g.defined(e)&&(this._position=e),!WebGLPlot$g.defined(this._curvePath3D)){let e=this._geoEntityMoveParameter.getPathPoint3D();if(WebGLPlot$g.defined(e)&&e.length>0&&e.length>1){let t=_0x1569f6.getPitch(e[e.length-2],e[e.length-1]),i=_0x1569f6.getHeading(e[e.length-2],e[e.length-1]);if(t&&i){let e=new _0x45ea17(0);e.x=WebGLPlot$g.CesiumMath.toDegrees(t),e.z=-WebGLPlot$g.CesiumMath.toDegrees(i),this._rotation=e}}}}}return{position:this._position,rotation:this._rotation}}}const _0x3240af=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x5a755e=_0x3240af(void 0,(function(){return _0x5a755e.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a755e).search("(((.+)+)+)+$")}));_0x5a755e();class _0x57fe5e{constructor(e,t){this._deductionScript=e,this._groupIndex=t,this._geoEntityRotationParameter=void 0,this._speed=void 0,this._startTime=void 0,this._isBack=!1,this._isFinished=!1,this._rotate=void 0,this._deductionScriptGroups=_0x373a17.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._currentGeoEntityRotationParameterUUID=void 0,this._startRotation=void 0,this._endRotation=void 0}_init(e,t){if(!WebGLPlot$g.defined(e)||!WebGLPlot$g.defined(t))return void(this._isFinished=!0);this._geoEntityRotationParameter=e,this._startTime=t,this._rotate=new _0x45ea17(0);let i=1e3*e.getTime();i<0?this._isFinished=!0:(this._startRotation=e.getStartRotation(),this._endRotation=e.getEndRotation(),(!WebGLPlot$g.defined(this._startRotation)||!WebGLPlot$g.defined(this._endRotation)||this._startRotation.x===this._endRotation.x&&this._startRotation.y===this._endRotation.y&&this._startRotation.z===this._endRotation.z)&&(this._isFinished=!0),e.isGradient()&&(this._speed=new _0x45ea17((this._endRotation.x-this._startRotation.x)/i,(this._endRotation.y-this._startRotation.y)/i,(this._endRotation.z-this._startRotation.z)/i),e.getCyclicType()==_0x37690a.BOTHWAY&&(this._speed=new _0x45ea17(2*this._speed.x,2*this._speed.y,2*this._speed.z))),this._isFinished=!1)}_update(e){let t=e/1e3,i=this._getCurrentGeoEntityRotationParameter(t);if(WebGLPlot$g.defined(i.geoEntityRotationParameter)&&WebGLPlot$g.defined(i.geoEntityRotationParameterActionTime))return this._currentGeoEntityRotationParameterUUID!=i.geoEntityRotationParameter.getUUID()&&(this._currentGeoEntityRotationParameterUUID=i.geoEntityRotationParameter.getUUID(),this._init(i.geoEntityRotationParameter,i.geoEntityRotationParameterActionTime)),{rotation:this._caclulate(e),isCurrent:!0,isFinished:this._isFinished};{let e,t,i;if(this._groupIndex>0)for(let n=this._groupIndex-1;n>=0;n--){let r=this._deductionScriptGroups[n]._getDeductionScriptByGeoEntityUUID(this._deductionScript.getGeoEntityUUID());if(WebGLPlot$g.defined(r)){let o=r.getGeoEntityRotationParameterTimes();if(o.length>0){e=o[o.length-1],t=r.getGeoEntityRotationParameter(e),i=n;break}}}if(WebGLPlot$g.defined(t)){let n=new _0x57fe5e;return n._init(t),{rotation:n._caclulate(1e3*t.getTotalTime()+1),isCurrent:!1,groupIndex:i,finishTime:1e3*(e+t.getTotalTime())}}return{rotation:new _0x45ea17(0),isCurrent:!1}}}_getCurrentGeoEntityRotationParameter(e){let t,i,n=this._deductionScript.getGeoEntityRotationParameterTimes();for(let r=0;r<n.length;r++){let o=n[r],a=this._deductionScript.getGeoEntityRotationParameter(o);if(e>=o){if(r===n.length-1){t=a,i=1e3*o;break}if(e<n[r+1]){t=a,i=1e3*o;break}}}return{geoEntityRotationParameter:t,geoEntityRotationParameterActionTime:i}}_caclulate(e){if(!WebGLPlot$g.defined(this._geoEntityRotationParameter))return;if(this._isFinished)return this._rotate;let t=this._geoEntityRotationParameter.getCyclicType(),i=1e3*this._geoEntityRotationParameter.getTime(),n=this._geoEntityRotationParameter.isGradient(),r=e-this._startTime;if(t==_0x37690a.NO)if(r>=i)this._isFinished=!0,this._rotate=this._endRotation.clone();else if(n){let e=this._startRotation.x+r*this._speed.x,t=this._startRotation.y+r*this._speed.y,i=this._startRotation.z+r*this._speed.z;this._rotate=new _0x45ea17(e,t,i)}else this._rotate=this._startRotation.clone();else{let e=1e3*this._geoEntityRotationParameter.getTotalTime();if(r>=e){this._isFinished=!0;let r=e%i;if(0===r)n?t==_0x37690a.ONEWAY?this._rotate=this._endRotation.clone():t==_0x37690a.BOTHWAY&&(this._rotate=this._startRotation.clone()):this._rotate=this._endRotation.clone();else if(n){if(t==_0x37690a.ONEWAY){let e=this._startRotation.x+r*this._speed.x,t=this._startRotation.y+r*this._speed.y,i=this._startRotation.z+r*this._speed.z;this._rotate=new _0x45ea17(e,t,i)}else if(t==_0x37690a.BOTHWAY){let e=i/2;if(r>e){let t=this._endRotation.x-(r-e)*this._speed.x,i=this._endRotation.y-(r-e)*this._speed.y,n=this._endRotation.z-(r-e)*this._speed.z;this._rotate=new _0x45ea17(t,i,n)}else{let e=this._startRotation.x+r*this._speed.x,t=this._startRotation.y+r*this._speed.y,i=this._startRotation.z+r*this._speed.z;this._rotate=new _0x45ea17(e,t,i)}}}else{let e=i/2;this._rotate=r>e?this._endRotation.clone():this._startRotation.clone()}}else{let e=r%i;if(n){if(t==_0x37690a.ONEWAY){let t=this._startRotation.x+e*this._speed.x,i=this._startRotation.y+e*this._speed.y,n=this._startRotation.z+e*this._speed.z;this._rotate=new _0x45ea17(t,i,n)}else if(t==_0x37690a.BOTHWAY){let t=i/2;if(e>t){let i=this._endRotation.x-(e-t)*this._speed.x,n=this._endRotation.y-(e-t)*this._speed.y,r=this._endRotation.z-(e-t)*this._speed.z;this._rotate=new _0x45ea17(i,n,r)}else{let t=this._startRotation.x+e*this._speed.x,i=this._startRotation.y+e*this._speed.y,n=this._startRotation.z+e*this._speed.z;this._rotate=new _0x45ea17(t,i,n)}}}else{let t=i/2;this._rotate=e>t?this._endRotation.clone():this._startRotation.clone()}}}return this._rotate}}const _0x588e5c=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x47c4a0=_0x588e5c(void 0,(function(){return _0x47c4a0.toString().search("(((.+)+)+)+$").toString().constructor(_0x47c4a0).search("(((.+)+)+)+$")}));_0x47c4a0();class _0x518dfc{constructor(e,t){this._deductionScript=e,this._groupIndex=t,this._geoEntityScaleParameter=void 0,this._speed=void 0,this._startTime=void 0,this._cyclicStartTime=void 0,this._isBack=!1,this._isFinished=!1,this._scale=void 0,this._deductionScriptGroups=_0x373a17.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._currentGeoEntityScaleParameterUUID=void 0,this._startScale=void 0,this._endScale=void 0}_init(e,t,i){if(!WebGLPlot$g.defined(e)||!WebGLPlot$g.defined(t))return void(this._isFinished=!0);this._geoEntityScaleParameter=e,this._startTime=t,this._scale=i;let n=1e3*e.getTime();n<0?this._isFinished=!0:(this._startScale=e.getStartScale(),WebGLPlot$g.defined(this._startScale)||(this._startScale=i),this._endScale=e.getEndScale(),WebGLPlot$g.defined(this._endScale)||(this._endScale=i),this._startScale!==this._endScale?(e.isGradient()&&(this._speed=(this._endScale-this._startScale)/n,this._geoEntityScaleParameter.getCyclicType()==_0x37690a.BOTHWAY&&(this._speed=2*this._speed)),this._isFinished=!1):this._isFinished=!0)}_update(e){let t=e/1e3,i=this._getCurrentGeoEntityScaleParameter(t);if(WebGLPlot$g.defined(i.geoEntityScaleParameter)&&WebGLPlot$g.defined(i.geoEntityScaleParameterActionTime))return this._currentGeoEntityScaleParameterUUID!=i.geoEntityScaleParameter.getUUID()&&(this._currentGeoEntityScaleParameterUUID=i.geoEntityScaleParameter.getUUID(),this._init(i.geoEntityScaleParameter,i.geoEntityScaleParameterActionTime)),this._caclulate(e);{let e,t;if(this._groupIndex>0)for(let i=this._groupIndex-1;i>=0;i--){let n=this._deductionScriptGroups[i]._getDeductionScriptByGeoEntityUUID(this._deductionScript.getGeoEntityUUID());if(WebGLPlot$g.defined(n)){let i=n.getGeoEntityScaleParameterTimes();if(i.length>0){e=i[i.length-1],t=n.getGeoEntityScaleParameter(e);break}}}if(WebGLPlot$g.defined(t)){let e=new _0x518dfc;return e._init(t),e._caclulate(1e3*t.getTotalTime()+1)}return this._scale}}_getCurrentGeoEntityScaleParameter(e){let t,i,n=this._deductionScript.getGeoEntityScaleParameterTimes();for(let r=0;r<n.length;r++){let o=n[r],a=this._deductionScript.getGeoEntityScaleParameter(o);if(e>=o){if(r===n.length-1){t=a,i=1e3*o;break}if(e<n[r+1]){t=a,i=1e3*o;break}}}return{geoEntityScaleParameter:t,geoEntityScaleParameterActionTime:i}}_caclulate(e){if(!WebGLPlot$g.defined(this._geoEntityScaleParameter))return;if(this._isFinished)return this._scale;let t=this._geoEntityScaleParameter.getCyclicType(),i=1e3*this._geoEntityScaleParameter.getTime(),n=this._geoEntityScaleParameter.getStartScale();WebGLPlot$g.defined(n)||(n=this._initScale);let r=this._geoEntityScaleParameter.getEndScale();WebGLPlot$g.defined(n)||(r=this._initScale);let o=this._geoEntityScaleParameter.isGradient(),a=e-this._startTime;if(t==_0x37690a.NO)a>=i?(this._isFinished=!0,this._scale=r):this._scale=o?n+a*this._speed:this._initScale;else{let e=1e3*this._geoEntityScaleParameter.getTotalTime();if(a>=e){this._isFinished=!0;let a=e%i;if(0===a)o?t==_0x37690a.ONEWAY?this._scale=r:t==_0x37690a.BOTHWAY&&(this._scale=n):this._scale=r;else if(o){if(t==_0x37690a.ONEWAY)this._scale=n+a*this._speed;else if(t==_0x37690a.BOTHWAY){let e=i/2;this._scale=a>e?r-(a-e)*this._speed:n+a*this._speed}}else{let e=i/2;this._scale=a>e?r:n}}else{let e=a%i;if(o){if(t==_0x37690a.ONEWAY)this._scale=n+e*this._speed;else if(t==_0x37690a.BOTHWAY){let t=i/2;this._scale=e>t?r-(e-t)*this._speed:n+e*this._speed}}else{let t=i/2;this._scale=e>t?r:n}}}return this._scale}}const _0x517eb9=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x6e3072=_0x517eb9(void 0,(function(){return _0x6e3072.toString().search("(((.+)+)+)+$").toString().constructor(_0x6e3072).search("(((.+)+)+)+$")}));_0x6e3072();class _0x54b539{constructor(e,t,i,n,r){this._geoEntity=e,this._moveGeoEntity=t,this._deductionScript=i,this._groupIndex=n,this._geoEntityStartVisible=r,this._deductionScriptGroups=_0x373a17.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._currentGeoEntityBasicParameterUUID=void 0}_setGeoEntityBasicParamerter(e){WebGLPlot$g.defined(this._moveGeoEntity)&&this._moveGeoEntity.setGeoEntityParameter(e._getGeoEntityParameter())}_caclulate(e){if(!WebGLPlot$g.defined(this._geoEntity)||!WebGLPlot$g.defined(this._deductionScript))return;let t,i=this._deductionScript.getGeoEntityBasicParameterTimes();for(let n=0;n<i.length;n++){let r=i[n],o=this._deductionScript.getGeoEntityBasicParameter(r);if(e>=r){if(n===i.length-1){t=o;break}if(e<i[n+1]){t=o;break}}}if(!WebGLPlot$g.defined(t)&&this._groupIndex>0)for(let e=this._groupIndex-1;e>=0;e--){let i=this._deductionScriptGroups[e]._getDeductionScriptByGeoEntityUUID(this._geoEntity.getUUID());if(WebGLPlot$g.defined(i)){let e=i.getGeoEntityBasicParameterTimes();if(e.length>0){t=i.getGeoEntityBasicParameter(e[e.length-1]);break}}}if(WebGLPlot$g.defined(t))return{geoEntityBasicParameter:t,geoEntityBasicParameterUUID:t.getUUID()};{let e=this._geoEntity.getGeoEntityParameter(),t=new _0x30275b;return t._update(e),t.setVisible(this._geoEntityStartVisible),t.setAutoChangeDisplayStatus(!1),{geoEntityBasicParameter:new _0x209a53(t),geoEntityBasicParameterUUID:"initGeoEntityBasicParameter"}}}_update(e){let t=e/1e3,i=this._caclulate(t);WebGLPlot$g.defined(i)&&WebGLPlot$g.defined(i.geoEntityBasicParameter)&&this._currentGeoEntityBasicParameterUUID!==i.geoEntityBasicParameterUUID&&(this._setGeoEntityBasicParamerter(i.geoEntityBasicParameter),this._currentGeoEntityBasicParameterUUID=i.geoEntityBasicParameterUUID)}}const _0x3140a1=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0xca3feb=_0x3140a1(void 0,(function(){return _0xca3feb.toString().search("(((.+)+)+)+$").toString().constructor(_0xca3feb).search("(((.+)+)+)+$")}));_0xca3feb();class _0xd598d1{constructor(e,t,i,n,r){this._geoEntity=e,this._moveGeoEntity=t,this._deductionScript=i,this._groupIndex=n,this._geoEntityStartEffectVisible=r,this._deductionScriptGroups=_0x373a17.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._currentGeoEntityEffectParameterUUID=void 0}_setGeoEntityEffectParameter(e){let t=e.getGeoEntityEffects(),i=[];t.forEach((e=>{let t=e.clone();if(t.setGeoEntity(this._moveGeoEntity),t.getType()==_0x370c4a.COMMUNICATIONLINK){let e=t.getStartUUID(),i=t.getEndUUID();if(this._geoEntity.getUUID()==e){e=this._moveGeoEntity.getUUID();let t=_0x373a17.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(i);WebGLPlot$g.defined(t)&&(i=t.getUUID())}else if(this._geoEntity.getUUID()==i){i=this._moveGeoEntity.getUUID();let t=_0x373a17.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(e);WebGLPlot$g.defined(t)&&(e=t.getUUID())}t.setStartUUID(e),t.setEndUUID(i)}i.push(t)})),this._moveGeoEntity.updateGeoEntityEffects(i)}_caclulate(e){if(!WebGLPlot$g.defined(this._geoEntity)||!WebGLPlot$g.defined(this._deductionScript))return;let t,i=this._deductionScript.getGeoEntityEffectParameterTimes();for(let n=0;n<i.length;n++){let r=i[n],o=this._deductionScript.getGeoEntityEffectParameter(r);if(e>=r){if(n===i.length-1){t=o;break}if(e<i[n+1]){t=o;break}}}if(!WebGLPlot$g.defined(t)&&this._groupIndex>0)for(let e=this._groupIndex-1;e>=0;e--){let i=this._deductionScriptGroups[e]._getDeductionScriptByGeoEntityUUID(this._geoEntity.getUUID());if(WebGLPlot$g.defined(i)){let e=i.getGeoEntityEffectParameterTimes();if(e.length>0){t=i.getGeoEntityEffectParameter(e[e.length-1]);break}}}if(WebGLPlot$g.defined(t))return{geoEntityEffectParameter:t,geoEntityEffectParameterUUID:t.getUUID()};{let e=this._geoEntity.getGeoEntityEffects(),t=[];return e.forEach((e=>{let i=e.clone(),n=this._geoEntityStartEffectVisible.get(e.getUUID());Cesium.defined(n)?i.setVisible(n):i.setVisible(!0),t.push(i)})),{geoEntityEffectParameter:new _0x321ef3(t),geoEntityEffectParameterUUID:"initGeoEntityEffectParameter"}}}_update(e){let t=e/1e3,i=this._caclulate(t);WebGLPlot$g.defined(i)&&WebGLPlot$g.defined(i.geoEntityEffectParameter)&&this._currentGeoEntityEffectParameterUUID!==i.geoEntityEffectParameterUUID&&(this._setGeoEntityEffectParameter(i.geoEntityEffectParameter),this._currentGeoEntityEffectParameterUUID=i.geoEntityEffectParameterUUID)}}const _0x196569=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x3ca159=_0x196569(void 0,(function(){return _0x3ca159.toString().search("(((.+)+)+)+$").toString().constructor(_0x3ca159).search("(((.+)+)+)+$")}));_0x3ca159();class _0x378bcb{constructor(e,t,i){this._geoEntityMoveLayer=e,this._deductionScript=t,this._groupIndex=i,this._geoEntity=void 0,this._moveGeoEntity=void 0,this._position=void 0,this._scale=void 0,this._rotation=void 0,this._currentExtendEffectParameterUUID=void 0,this._deductionScriptActionBasicParm=void 0,this._deductionScriptActionEffect=void 0,this._deductionScriptActionMove=void 0,this._deductionScriptActionRotation=void 0,this._deductionScriptActionScale=void 0,this._geoEntityStartEffectVisible=void 0,this._geoEntityStartVisible=void 0,this._deductionScriptGroups=_0x373a17.getInstance().getDeductionScriptManager().getDeductionScriptGroups()}_getMoveGeoEntity(){return this._moveGeoEntity}_getGeoEntityUUID(){return this._deductionScript.getGeoEntityUUID()}_setGeoEntityParamerter(e){WebGLPlot$g.defined(this._moveGeoEntity)&&this._moveGeoEntity.setGeoEntityParameter(e)}_setExtendEffectParameter(e){e.getGeoEntityEffects().forEach((e=>{e.getType()===_0x370c4a.EXTENDACTION&&e._executeExtend()}))}_updateDeductionScript(e,t){this._deductionScript=e,this._groupIndex=t,this._currentGeoEntityEffectParameterUUID=void 0,this._deductionScriptActionBasicParm=new _0x54b539(this._geoEntity,this._moveGeoEntity,this._deductionScript,this._groupIndex,this._geoEntityStartVisible),this._deductionScriptActionEffect=new _0xd598d1(this._geoEntity,this._moveGeoEntity,this._deductionScript,this._groupIndex,this._geoEntityStartVisible),this._deductionScriptActionMove=new _0x3a7ce4(this._deductionScript,this._groupIndex),this._deductionScriptActionRotation=new _0x57fe5e(this._deductionScript,this._groupIndex),this._deductionScriptActionScale=new _0x518dfc(this._deductionScript,this._groupIndex)}_start(){let e=_0x373a17.getInstance().getGeoEntityManager(),t=_0x373a17.getInstance().getSatelliteEntityManager();if(!WebGLPlot$g.defined(e)||!WebGLPlot$g.defined(t)||(this._geoEntity=e.getGeoEntityByUUID(this._deductionScript.getGeoEntityUUID()),WebGLPlot$g.defined(this._geoEntity)||(this._geoEntity=t.getSatelliteEntityByUUID(this._deductionScript.getGeoEntityUUID())),!WebGLPlot$g.defined(this._geoEntity)))return;let i=this._geoEntity._getGeoGraphicObject();if(!WebGLPlot$g.defined(i))return;let n=i.clone();this._moveGeoEntity=n.getGeoEntity(),this._geoEntityStartEffectVisible=new Map,this._geoEntity.getGeoEntityEffects().forEach((e=>{e.getType()!=_0x370c4a.COMMUNICATIONLINK&&(this._geoEntityStartEffectVisible.set(e.getUUID(),e.isVisible()),e.setVisible(!1))}));let r=[];if(this._geoEntity.getGeoEntityEffects().forEach((e=>{e.getType()==_0x370c4a.COMMUNICATIONLINK&&r.push(e)})),r.forEach((e=>{let t=this._geoEntity.getUUID(),i=this._moveGeoEntity.getUUID(),n=!1,r=e.getStartUUID();t==r&&(n=!0,r=e.getEndUUID());let o=_0x373a17.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(r);if(WebGLPlot$g.defined(o))e._isMove&&(n?e.setStartUUID(i):e.setEndUUID(i),this._geoEntity._disConnectLinkToGeoEntity(e),this._moveGeoEntity._connectLinkToGeoEntity(e));else{let t=e.clone();t._isMove=!0,n?t.setStartUUID(i):t.setEndUUID(i),this._moveGeoEntity.addGeoEntityEffect(t),this._geoEntityStartEffectVisible.set(e.getUUID(),e.isVisible()),e.isVisible()&&e.setVisible(!1)}})),this._geoEntityMoveLayer.addFeature(this._moveGeoEntity._getGeoGraphicObject()),this._geoEntityStartVisible=this._geoEntity.getGeoEntityParameter().isVisible(),this._geoEntityStartVisible){let e=new _0x30275b;e.setVisible(!1),this._geoEntity.setGeoEntityParameter(e)}this._moveGeoEntity._setIsMoveGeoEntity(!0),this._position=this._geoEntity.getGeoEntityParameter().getPosition(),this._rotation=this._geoEntity.getGeoEntityParameter().getModelRotate(),this._scale=this._geoEntity.getGeoEntityParameter().getModelScale(),this._deductionScriptActionBasicParm=new _0x54b539(this._geoEntity,this._moveGeoEntity,this._deductionScript,this._groupIndex,this._geoEntityStartVisible),this._deductionScriptActionEffect=new _0xd598d1(this._geoEntity,this._moveGeoEntity,this._deductionScript,this._groupIndex,this._geoEntityStartEffectVisible),this._deductionScriptActionMove=new _0x3a7ce4(this._deductionScript,this._groupIndex),this._deductionScriptActionRotation=new _0x57fe5e(this._deductionScript,this._groupIndex),this._deductionScriptActionScale=new _0x518dfc(this._deductionScript,this._groupIndex)}_reset(e){if(!WebGLPlot$g.defined(this._geoEntity)||!WebGLPlot$g.defined(this._moveGeoEntity))return;let t=new _0x30275b;if(e){t.setVisible(this._geoEntityStartVisible),this._geoEntity.getGeoEntityEffects().forEach((e=>{let t=this._geoEntityStartEffectVisible.get(e.getUUID());if(e.getType()==_0x370c4a.COMMUNICATIONLINK){let i=e.getStartUUID();i==this._geoEntity.getUUID()&&(i=e.getEndUUID());let n=_0x373a17.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(i);WebGLPlot$g.defined(n)||(Cesium.defined(t)?e.setVisible(t):e.setVisible(!0))}else e.setVisible(t)}));let e=this._moveGeoEntity.getGeoEntityEffects(),i=[],n=[];e.forEach((e=>{if(e.getType()==_0x370c4a.COMMUNICATIONLINK){let t=!1,r=e.getStartUUID();r==this._moveGeoEntity.getUUID()&&(t=!0,r=e.getEndUUID());let o=_0x373a17.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(r);WebGLPlot$g.defined(o)?(t?e.setStartUUID(this._geoEntity.getUUID()):e.setEndUUID(this._geoEntity.getUUID()),n.push(e)):i.push(e)}})),i.forEach((e=>{this._moveGeoEntity.removeGeoEntityEffect(e.getUUID())})),n.forEach((e=>{this._moveGeoEntity._disConnectLinkToGeoEntity(e),this._geoEntity._connectLinkToGeoEntity(e)}))}else{let e=this._moveGeoEntity.getGeoEntityParameter();WebGLPlot$g.defined(e)&&t._update(e);let i=[],n=[];this._moveGeoEntity.getGeoEntityEffects().forEach((e=>{e.getType()==_0x370c4a.COMMUNICATIONLINK?i.push(e):n.push(e.clone())})),this._geoEntity.clearGeoEntityEffects(),this._geoEntity.updateGeoEntityEffects(n),i.forEach((e=>{this._moveGeoEntity._disConnectLinkToGeoEntity(e),this._geoEntity._connectLinkToGeoEntity(e)}))}this._geoEntity.setGeoEntityParameter(t),this._geoEntityMoveLayer.removeGeoGraphicObject(this._moveGeoEntity._getGeoGraphicObject()),this._moveGeoEntity=void 0}_execute(e){if(WebGLPlot$g.defined(this._geoEntity)){this._deductionScriptActionBasicParm._update(e),this._deductionScriptActionEffect._update(e);let t=this._deductionScriptActionMove._update(e,this._position,this._rotation),i=this._deductionScriptActionRotation._update(e),n=this._deductionScriptActionScale._update(e);if(WebGLPlot$g.defined(t)||WebGLPlot$g.defined(i)||WebGLPlot$g.defined(n)){let e=new _0x30275b;WebGLPlot$g.defined(t)&&WebGLPlot$g.defined(t.position)&&e.setPosition(t.position);let r=new _0x45ea17(0);if(t.isCurrent?r=i.isCurrent?t.isFinished?i.isFinished&&t.currentFinishTime>i.currentFinishTime?new _0x45ea17(t.rotation.x+t.rotation.x,t.rotation.y+i.rotation.y,t.rotation.z+t.rotation.z):new _0x45ea17(t.rotation.x+i.rotation.x,t.rotation.y+i.rotation.y,t.rotation.z+i.rotation.z):(i.isFinished,new _0x45ea17(t.rotation.x+i.rotation.x,t.rotation.y+i.rotation.y,t.rotation.z+i.rotation.z)):new _0x45ea17(t.rotation.x+i.rotation.x,t.rotation.y+i.rotation.y,t.rotation.z+i.rotation.z):i.isCurrent?r=new _0x45ea17(t.rotation.x+i.rotation.x,t.rotation.y+i.rotation.y,t.rotation.z+i.rotation.z):WebGLPlot$g.defined(t.groupIndex)?WebGLPlot$g.defined(i.groupIndex)?t.groupIndex===i.groupIndex?r=(t.finishTime,i.finishTime,new _0x45ea17(t.rotation.x+i.rotation.x,t.rotation.y+i.rotation.y,t.rotation.z+i.rotation.z)):(t.groupIndex<i.groupIndex||t.groupIndex>i.groupIndex)&&(r=new _0x45ea17(t.rotation.x+i.rotation.x,t.rotation.y+i.rotation.y,t.rotation.z+i.rotation.z)):r=t.rotation:r=WebGLPlot$g.defined(i.groupIndex)?new _0x45ea17(t.rotation.x+i.rotation.x,t.rotation.y+i.rotation.y,t.rotation.z+i.rotation.z):t.rotation,e.setModelRotate(r),e.setVectorRotate(r),WebGLPlot$g.defined(n)){e.setModelScale(n),e.setVectorRotate(n);let t=this._moveGeoEntity._getGeoGraphicObject()._symbolSizeInLib.x,i=this._moveGeoEntity._getGeoGraphicObject()._symbolSizeInLib.y;t=96*t/254,i=96*i/254,-1!=t&&-1!=i&&(0===n?e.setGridSymbolSize(new WebGLPlot$g.Cartesian2(.1,.1)):e.setGridSymbolSize(new WebGLPlot$g.Cartesian2(t*n,i*n))),e.setPictureSymbolSize(new WebGLPlot$g.Cartesian2(64*n,64*n))}this._setGeoEntityParamerter(e)}}else{let t,i=e/1e3,n=this._deductionScript.getGeoEntityEffectParameterTimes();for(let e=0;e<n.length;e++){let r=n[e],o=this._deductionScript.getGeoEntityEffectParameter(r);if(i>=r){if(e===n.length-1){t=o;break}if(i<n[e+1]){t=o;break}}}WebGLPlot$g.defined(t)&&this._currentExtendEffectParameterUUID!==t.getUUID()&&(this._setExtendEffectParameter(t),this._currentExtendEffectParameterUUID=t.getUUID())}}}var _0x5e98e3=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x47f91b=_0x5e98e3(void 0,(function(){return _0x47f91b.toString().search("(((.+)+)+)+$").toString().constructor(_0x47f91b).search("(((.+)+)+)+$")}));_0x47f91b();var _0x5f3a41={Ready:0,Executing:1,Stop:2},_0x168ee9=Object.freeze(_0x5f3a41);const _0x354389=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x539341=_0x354389(void 0,(function(){return _0x539341.toString().search("(((.+)+)+)+$").toString().constructor(_0x539341).search("(((.+)+)+)+$")}));_0x539341();class _0x2a28c8{constructor(e,t,i){this._geoEntityMoveLayer=e,this._deductionScriptGroup=t,this._deductionScriptExcuteManager=i,this._deductionScriptExcutes=[],this._executeState=_0x168ee9.Ready,this._totalTime=t.getTotalTime()+100}_getTotalTime(){return this._totalTime}_getExecuteState(){return this._executeState}_getDeductionScriptExcutes(){return this._deductionScriptExcutes}_execute(e,t){this._executeState===_0x168ee9.Executing&&this._deductionScriptExcutes.forEach((i=>{i._execute(e,t)}))}_start(e){let t=this._deductionScriptGroup.getDeductionScripts();for(let i=0;i<t.length;i++){let n=t[i];if(n.getIsPlay()){let t=this._deductionScriptExcuteManager._getDeductionScriptExecute(n.getGeoEntityUUID());WebGLPlot$g.defined(t)?t._updateDeductionScript(n,e):(t=new _0x378bcb(this._geoEntityMoveLayer,n,e),t._start()),this._deductionScriptExcutes.push(t)}}let i=this._deductionScriptGroup.getDeductionScriptExtend();if(i.getIsPlay()){let t=new _0x378bcb(this._geoEntityMoveLayer,i._getDeductionScript(),e);t._start(),this._deductionScriptExcutes.push(t)}this._executeState=_0x168ee9.Executing}_reset(e){this._deductionScriptExcutes.forEach((t=>{this._executeState!==_0x168ee9.Ready&&t._reset(e)})),this._executeState=_0x168ee9.Ready}}var _0x277c83=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x27e2b7=_0x277c83(void 0,(function(){return _0x27e2b7.toString().search("(((.+)+)+)+$").toString().constructor(_0x27e2b7).search("(((.+)+)+)+$")}));_0x27e2b7();var _0x50d255={NoReset:0,ManualReset:1,AutoReset:2},_0x4bcd4a=Object.freeze(_0x50d255);const _0x3a8ece=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x3d1509=_0x3a8ece(void 0,(function(){return _0x3d1509.toString().search("(((.+)+)+)+$").toString().constructor(_0x3d1509).search("(((.+)+)+)+$")}));_0x3d1509();class _0x182f7e{constructor(){this._geoEntityMoveLayer=void 0,this._UUID=WebGLPlot$g.createGuid(),this._resetType=_0x4bcd4a.AutoReset,this._executeState=_0x168ee9.Ready,this._groupIndex=-1,this._deductionScriptExecuteGroups=[],this._currentDeductionScriptExecuteGroup=void 0,this._totalPassTime=0,this._lastTime=void 0,this._controllerEvent=new WebGLPlot$g.Event,this._executerEvent=new WebGLPlot$g.Event}_setGeoEntityMoveLayer(e){this._geoEntityMoveLayer=e}_getUUID(){return this._UUID}_getDeductionScriptExecute(e){for(let t=0;t<=this._groupIndex;t++){let i=this._deductionScriptExecuteGroups[t]._getDeductionScriptExcutes();if(WebGLPlot$g.defined(i))for(let t=0;t<i.length;t++){const n=i[t];if(n._getGeoEntityUUID()===e)return n}}}_execute(e){if(this._executeState===_0x168ee9.Executing){let t=e-this._lastTime;if(this._totalPassTime+=t,this._totalPassTime>0){let e=-1,t=0;for(let i=0;i<this._deductionScriptExecuteGroups.length;i++){let n=t+this._deductionScriptExecuteGroups[i]._getTotalTime();if(this._totalPassTime>=t&&this._totalPassTime<n+30){e=i;break}t=n}-1===e?this._stop():(e!=this._groupIndex?(this._groupIndex=e,this._currentDeductionScriptExecuteGroup=this._deductionScriptExecuteGroups[this._groupIndex],this._currentDeductionScriptExecuteGroup._start(e)):this._currentDeductionScriptExecuteGroup._execute(this._totalPassTime-t,this._deductionScriptGroups[e-1]),this._executerEvent.raiseEvent({allPassTime:this._totalPassTime,groupIndex:this._groupIndex,groupPassTime:this._totalPassTime-t}))}}this._lastTime=e}_start(e){this._controllerEvent.raiseEvent({status:"start"}),this._deductionScriptGroups=_0x373a17.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._lastTime=e,this._deductionScriptGroups.forEach((e=>{let t=new _0x2a28c8(this._geoEntityMoveLayer,e,this);this._deductionScriptExecuteGroups.push(t)})),this._executeState=_0x168ee9.Executing;let t=0;return this._deductionScriptExecuteGroups.forEach((e=>{t+=e._getTotalTime()})),t}_stop(){this._executeState===_0x168ee9.Executing&&(this._resetType===_0x4bcd4a.AutoReset||this._resetType===_0x4bcd4a.NoReset?this._reset(this._UUID):this._executeState=_0x168ee9.Stop,this._controllerEvent.raiseEvent({status:"stop"}))}_reset(){this._executeState!==_0x168ee9.Ready&&(this._deductionScriptExecuteGroups.forEach((e=>{this._resetType===_0x4bcd4a.NoReset?e._reset(!1):e._reset(!0)})),this._executeState=_0x168ee9.Ready,this._groupIndex=-1,this._deductionScriptExecuteGroups=[],this._currentDeductionScriptExecuteGroup=void 0,this._totalPassTime=0,this._lastTime=void 0,this._controllerEvent.raiseEvent({status:"reset"}))}_setResetType(e){this._resetType=e}}var _0x4700c1=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x59c3f7=_0x4700c1(void 0,(function(){return _0x59c3f7.toString().search("(((.+)+)+)+$").toString().constructor(_0x59c3f7).search("(((.+)+)+)+$")}));_0x59c3f7();class _0x2e1f61{constructor(){this._deductionScript=new _0x5e9935("Extend"),this._isModified=!1}_getDeductionScript(){return this._deductionScript}_isModify(){return this._isModified}_setIsModify(e){this._isModified=e}_save(){_0x373a17.getInstance()._saveDeductionScript(!1)}_toJson(){return this._deductionScript._toJson()}_fromJson(e){this._deductionScript._fromJson(e)}getUUID(){return this._deductionScript.getUUID()}getGeoEntityEffectExtendParameterTimes(){return this._deductionScript.getGeoEntityEffectParameterTimes()}getGeoEntityEffectExtendParameter(e){return this._deductionScript.getGeoEntityEffectParameter(e)}setGeoEntityEffectExtendParameter(e,t){this._deductionScript.setGeoEntityEffectParameter(e,t),this._isModified=!0,this._save()}removeGeoEntityEffectExtendParameter(e){this._deductionScript.removeGeoEntityEffectParameter(e),this._isModified=!0,this._save()}getDelayFinishTime(){return this._deductionScript.getDelayFinishTime()}setDelayFinishTime(e){this._deductionScript.setDelayFinishTime(e),this._isModified=!0}getIsPlay(){return this._deductionScript.getIsPlay()}setIsPlay(e){this._deductionScript.setIsPlay(e)}}const _0x51ef9e=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x251f38=_0x51ef9e(void 0,(function(){return _0x251f38.toString().search("(((.+)+)+)+$").toString().constructor(_0x251f38).search("(((.+)+)+)+$")}));_0x251f38();class _0xa3433e{constructor(e){this._deductionScriptManager=e,this._UUID=WebGLPlot$g.createGuid(),this._name="",this._deductionScripts=[],this._deductionScriptExtend=new _0x2e1f61,this._isModified=!1}_fromJson(e,t){let i=JSON.parse(e);WebGLPlot$g.defined(i.UUID)&&(this._UUID=i.UUID),WebGLPlot$g.defined(i.name)&&(this._name=i.name),WebGLPlot$g.defined(i.deductionScriptUUIDs)&&(this._deductionScripts.splice(0),i.deductionScriptUUIDs.forEach((e=>{this._deductionScripts.push(t.get(e))}))),WebGLPlot$g.defined(i.deductionScriptExtend)&&this._deductionScriptExtend._fromJson(i.deductionScriptExtend)}_toJson(){let e=new Map,t={};return t.hasOwnProperty("UUID")||(t.UUID=this._UUID),t.hasOwnProperty("name")||(t.name=this._name),t.hasOwnProperty("deductionScriptUUIDs")||(t.deductionScriptUUIDs=[],this._deductionScripts.forEach((i=>{e.set(i.getUUID(),i._toJson()),t.deductionScriptUUIDs.push(i.getUUID())}))),t.hasOwnProperty("deductionScriptExtend")||(t.deductionScriptExtend=this._deductionScriptExtend._toJson()),{deductionScriptJsons:e,json:JSON.stringify(t)}}_isModify(){return!!this._isModified||!!this._deductionScriptExtend._isModify()}_setIsModify(e){this._isModified=e,this._deductionScriptExtend._setIsModify(e)}_save(){_0x373a17.getInstance()._saveDeductionScript(!1)}_getDeductionScriptByGeoEntityUUID(e){for(let t=0;t<this._deductionScripts.length;t++){let i=this._deductionScripts[t];if(i.getGeoEntityUUID()===e)return i}}createDeductionScript(e){let t=new _0x5e9935(e);return this._deductionScripts.push(t),this._deductionScriptManager._addDeductionScripts.push(t),this._isModified=!0,this._save(),t}removeDeductionScript(e){for(let t=0;t<this._deductionScripts.length;t++){const i=this._deductionScripts[t];if(i.getUUID()===e){let n=i.getGeoEntityMoveParameterTimes();for(let e=n.length-1;e>=0;e--)i.removeGeoEntityMoveParameter(n[e]);this._deductionScripts.splice(t,1),this._deductionScriptManager._removeDeductionScriptUUIDs.push(e),this._isModified=!0,this._save();break}}}getDeductionScripts(){return this._deductionScripts}setName(e){this._name=e,this._isModified=!0,this._save()}getName(){return this._name}getUUID(){return this._UUID}getDeductionScriptExtend(){return this._deductionScriptExtend}getTotalTime(){let e=0;this._deductionScripts.forEach((t=>{if(t.getIsPlay()){let i=t._getTotalTime();e<i&&(e=i)}}));let t=this._deductionScriptExtend._getDeductionScript();if(t.getIsPlay()){let i=t._getTotalTime();e<i&&(e=i)}return e}}const _0x14b499=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x4c9636=_0x14b499(void 0,(function(){return _0x4c9636.toString().search("(((.+)+)+)+$").toString().constructor(_0x4c9636).search("(((.+)+)+)+$")}));_0x4c9636();class _0xdeda0a{constructor(){this._deductionScriptGroups=[],this._scene=void 0,this._geoEntityMoveLayer=void 0,this._deductionScriptExecuteManager=new _0x182f7e,this._addDeductionScripts=[],this._removeDeductionScriptUUIDs=[],this._isGroupInfoModified=!1}_setScene(e){this._geoEntityMoveLayer=new _0x4ab86a(e,"GeoEntityMoveLayer"),e.plotLayers.add(this._geoEntityMoveLayer),this._scene=e,this._deductionScriptExecuteManager._setGeoEntityMoveLayer(this._geoEntityMoveLayer)}_execute(e){WebGLPlot$g.defined(this._deductionScriptExecuteManager)&&this._deductionScriptExecuteManager._execute(e)}_getDeductionScriptExecute(e){if(WebGLPlot$g.defined(this._deductionScriptExecuteManager)){let t=this._deductionScriptExecuteManager._getDeductionScriptExecute(e);if(WebGLPlot$g.defined(t))return t}}_getAddAndRemoveDeductionScripts(){return{add:this._addDeductionScripts,remove:this._removeDeductionScriptUUIDs}}_clearAddAndRemoveDeductionScripts(){this._addDeductionScripts.splice(0),this._removeDeductionScriptUUIDs.splice(0)}_isGroupInfoModify(){if(this._isGroupInfoModified)return!0;for(let e=0;e<this._deductionScriptGroups.length;e++)if(this._deductionScriptGroups[e]._isModify())return!0;return!1}_setIsGroupInfoModify(e){this._isGroupInfoModified=e,this._deductionScriptGroups.forEach((t=>{t._setIsModify(e)}))}_save(){_0x373a17.getInstance()._saveDeductionScript(!1)}_start(e){return this._deductionScriptExecuteManager._start(e)}_stop(){WebGLPlot$g.defined(this._deductionScriptExecuteManager)&&this._deductionScriptExecuteManager._stop()}_reset(){WebGLPlot$g.defined(this._deductionScriptExecuteManager)&&this._deductionScriptExecuteManager._reset(),_0x373a17.getInstance().getGeoEntityEffectExtendFactory().clearText()}_setResetType(e){WebGLPlot$g.defined(this._deductionScriptExecuteManager)&&this._deductionScriptExecuteManager._setResetType(e)}_removeAllScriptGroupFromScene(){this._deductionScriptGroups.splice(0)}getDeductionScriptGroups(){return this._deductionScriptGroups}removeScriptGroup(e){for(let t=0;t<this._deductionScriptGroups.length;t++){const i=this._deductionScriptGroups[t];if(i.getUUID()===e){i.getDeductionScripts().forEach((e=>{this._removeDeductionScriptUUIDs.push(e.getUUID())})),this._deductionScriptGroups.splice(t,1),this._isGroupInfoModified=!0,this._save();break}}}getScriptGroupByUUID(e){for(let t=0;t<this._deductionScriptGroups.length;t++){let i=this._deductionScriptGroups[t];if(i.getUUID()===e)return i}}removeAllScriptGroup(){this._deductionScriptGroups.forEach((e=>{e.getDeductionScripts().forEach((e=>{this._removeDeductionScriptUUIDs.push(e.getUUID())}))})),this._deductionScriptGroups.splice(0),this._isGroupInfoModified=!0,this._save()}createScriptGroup(e){let t=new _0xa3433e(this);return t.setName(e),this._deductionScriptGroups.push(t),this._isGroupInfoModified=!0,this._save(),t}toJson(){let e=new Map,t=[];return this._deductionScriptGroups.forEach((i=>{let n=i._toJson();e=new Map([...e,...n.deductionScriptJsons]),t.push(n.json)})),{deductionScriptJsons:e,deductionScriptGroupJsons:JSON.stringify(t)}}fromJson(e){this.removeAllScriptGroup(!1);let t=e.deductionScriptJsons,i=new Map;if(t.forEach(((e,t)=>{if(e.length>0){let n=new _0x5e9935("");n._fromJson(e),i.set(t,n)}})),e.deductionScriptGroupJsons.length>0){let t=JSON.parse(e.deductionScriptGroupJsons);WebGLPlot$g.defined(t)&&t.forEach((e=>{let t=new _0xa3433e(this);t._fromJson(e,i),this._deductionScriptGroups.push(t)}))}}_getMoveGeoEntityByUUID(e){let t=this._getDeductionScriptExecute(e);if(WebGLPlot$g.defined(t))return t._getMoveGeoEntity();if(WebGLPlot$g.defined(this._deductionScriptExecuteManager))for(let t=0;t<=this._deductionScriptExecuteManager._groupIndex;t++){let i=this._deductionScriptExecuteManager._deductionScriptExecuteGroups[t]._getDeductionScriptExcutes();if(WebGLPlot$g.defined(i))for(let t=0;t<i.length;t++){const n=i[t];if(WebGLPlot$g.defined(n)&&WebGLPlot$g.defined(n._getMoveGeoEntity())){let t=n._getMoveGeoEntity();if(t.getUUID()==e)return t}}}return null}}const _0x4176bc=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x106e92=_0x4176bc(void 0,(function(){return _0x106e92.toString().search("(((.+)+)+)+$").toString().constructor(_0x106e92).search("(((.+)+)+)+$")}));_0x106e92();class _0x5a144a{constructor(){this._datasetNameSuffix=["_Structure","_Entity","_Script","_Satellite","_SatelliteInfo"],this._commit=this._getCommit(),this._URI=null}_setURI(e){this._URI=e,this._SatelliteConfigURI=e+"/iserver/mgis/situationSimulation/Satellite/SatelliteGroupsTemplate.json",this._datasetsURI=e+"/iserver/services/data-SituationSimulationSchemeWorkspace/rest/data/datasources/SituationSimulationSchemeDatasource/datasets",this._featureResultsURI=e+"/iserver/services/data-SituationSimulationSchemeWorkspace/rest/data/featureResults.rjson?returnContent=true"}newScheme(e){if(null==e||0===e.length||/^\d/.test(e))return!1;let t=this._queryFeatures("metadata","SchemeName",e);if(null==t||null!=t&&t.length>0)return!1;let i=this._datasetsURI+"/metadata/features.rjson",n=[{fieldNames:["SmID","SmUserID","SchemeName"],fieldValues:["0","0",e],geometry:null}];this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(WebGLPlot$g.toJSON(n));for(let t=0;t<this._datasetNameSuffix.length;t++){let i={datasetType:"TABULAR",datasetName:e+this._datasetNameSuffix[t]};if(this._commit.open("POST",encodeURI(this._datasetsURI+".json"),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(i)),JSON.parse(this._commit.responseText,null).succeed){let i=this._datasetsURI+"/"+e+this._datasetNameSuffix[t]+"/fields.rjson",n=["uuid","Content"];"_Structure"===this._datasetNameSuffix[t]?n=["EntityStructure","ScriptStructure","SatelliteGroupStructure"]:"_SatelliteInfo"===this._datasetNameSuffix[t]&&(n=["SatelliteID","SatelliteGroupName","Content"]);for(let e=0;e<n.length;e++){let t={isZeroLengthAllowed:"false",maxLength:"100000000",isRequired:"false",name:n[e],caption:n[e],type:"WTEXT",defaultValue:"null",isSystemField:"false"};this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(t))}}}let r=this._loadSateGroupInfos(this._SatelliteConfigURI);return WebGLPlot$g.defined(r)&&this.saveSatelliteGroupStructure(e,r),!0}_saveAsScheme(e,t){if(!WebGLPlot$g.defined(e)||!WebGLPlot$g.defined(t)||/^\d/.test(t))return!1;let i=this._queryFeatures("metadata","SchemeName",t);if(null==i||null!=i&&i.length>0)return!1;let n=this._datasetsURI+"/metadata/features.rjson",r=[{fieldNames:["SmID","SmUserID","SchemeName"],fieldValues:["0","0",t],geometry:null}];this._commit.open("POST",encodeURI(n),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(WebGLPlot$g.toJSON(r));for(let i=0;i<this._datasetNameSuffix.length;i++){let n={srcDatasourceName:"SituationSimulationSchemeDatasource",srcDatasetName:e+this._datasetNameSuffix[i],destDatasetName:t+this._datasetNameSuffix[i]};this._commit.open("POST",encodeURI(this._datasetsURI+".json"),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(n))}let o=this.getSatelliteGroupStructure(e);return WebGLPlot$g.defined(o)&&this.saveSatelliteGroupStructure(t,o),!0}saveCommonUse(e,t){if(null==e||0===e.length)return;let i=this._datasetsURI+"/metadata/fields.rjson";if(this._commit.open("GET",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null),-1===JSON.parse(this._commit.responseText,null).fieldNames.indexOf("CommonUse")){let e={isZeroLengthAllowed:"false",maxLength:"100000",isRequired:"false",name:"CommonUse",caption:"CommonUse",type:"WTEXT",defaultValue:"null",isSystemField:"false"};this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(e))}let n=this._queryFeatures("metadata","SchemeName",e),r=this._datasetsURI+"/metadata/features.rjson?_method=PUT";if(null!=n&&n.length>0){let e=[{ID:n[0].ID,fieldNames:["CommonUse"],fieldValues:[t],geometry:null}];this._commit.open("POST",encodeURI(r),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(e))}}getCommonUse(e){if(null==e||0===e.length)return;let t=this._queryFeatures("metadata","SchemeName",e);return null!=t&&t.length>0?t[0].fieldValues[4]:""}getAllSchemeName(){let e=this._queryFeatures("metadata","",""),t=[];if(null!=e)for(let i=0;i<e.length;i++)t.push(e[i].fieldValues[2]);return t}deleteScheme(e){let t=this._datasetsURI+"/metadata/features.rjson?_method=DELETE&deleteMode=SQL",i={attributeFilter:'SchemeName="'+e+'"'};this._commit.open("POST",encodeURI(t),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(WebGLPlot$g.toJSON(i));for(let t=0;t<this._datasetNameSuffix.length;t++){let i=this._datasetsURI+"/"+e+this._datasetNameSuffix[t]+".rjson";this._commit.open("DELETE",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null)}}saveEntityStructure(e,t){let i=this._datasetsURI+"/"+e+"_Structure/features.rjson";this._commit.open("GET",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null);let n=JSON.parse(this._commit.responseText,null),r=[{fieldNames:["SmID","SmUserID","EntityStructure"],fieldValues:["1","0",t],geometry:null}];return 0!==n.featureCount&&(i+="?_method=PUT",r=[{ID:1,fieldNames:["SmID","SmUserID","EntityStructure"],fieldValues:["1","0",t],geometry:null}]),this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(r)),n=JSON.parse(this._commit.responseText,null),n.succeed}getEntityStructure(e){this._commit.open("POST",encodeURI(this._featureResultsURI),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");let t={getFeatureMode:"ID",datasetNames:["SituationSimulationSchemeDatasource:"+e+"_Structure"],ids:[1]};this._commit.send(JSON.stringify(t));let i=JSON.parse(this._commit.responseText,null);return null!=i&&i.featureCount>0?i.features[0].fieldValues[2]:""}saveScriptStructure(e,t){let i=this._datasetsURI+"/"+e+"_Structure/features.rjson";this._commit.open("GET",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null);let n=JSON.parse(this._commit.responseText,null),r=[{fieldNames:["SmID","SmUserID","ScriptStructure"],fieldValues:["1","0",t],geometry:null}];return 0!==n.featureCount&&(i+="?_method=PUT",r=[{ID:1,fieldNames:["SmID","SmUserID","ScriptStructure"],fieldValues:["1","0",t],geometry:null}]),this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(r)),n=JSON.parse(this._commit.responseText,null),n.succeed}getScriptStructure(e){this._commit.open("POST",encodeURI(this._featureResultsURI),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");let t={getFeatureMode:"ID",datasetNames:["SituationSimulationSchemeDatasource:"+e+"_Structure"],ids:[1]};this._commit.send(JSON.stringify(t));let i=JSON.parse(this._commit.responseText,null);return null!=i&&i.featureCount>0?i.features[0].fieldValues[3]:""}saveSatelliteGroupStructure(e,t){let i=this._datasetsURI+"/"+e+"_Structure/features.rjson";this._commit.open("GET",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null);let n=JSON.parse(this._commit.responseText,null),r=[{fieldNames:["SmID","SmUserID","SatelliteGroupStructure"],fieldValues:["1","0",t],geometry:null}];return 0!==n.featureCount&&(i+="?_method=PUT",r=[{ID:1,fieldNames:["SmID","SmUserID","SatelliteGroupStructure"],fieldValues:["1","0",t],geometry:null}]),this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(r)),n=JSON.parse(this._commit.responseText,null),n.succeed}getSatelliteGroupStructure(e){this._commit.open("POST",encodeURI(this._featureResultsURI),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");let t={getFeatureMode:"ID",datasetNames:["SituationSimulationSchemeDatasource:"+e+"_Structure"],ids:[1]};this._commit.send(JSON.stringify(t));let i=JSON.parse(this._commit.responseText,null);return null!=i&&i.featureCount>0?i.features[0].fieldValues[4]:""}addFeature(e,t,i,n){return this._editFeature(e,t,i,n)}addFeatures(e,t,i){i.forEach(((i,n)=>{this._editFeature(e,t,n,i)}))}getFeatures(e,t){let i=this._getDatasetNameSuffix(t),n=this._queryFeatures(e+i,"","");const r=new Map;if(null!=n)for(let e=0;e<n.length;e++)r.set(n[e].fieldValues[2],n[e].fieldValues[3]);return r}updateFeature(e,t,i,n){return this._editFeature(e,t,i,n)}updateFeatures(e,t,i){let n=this._getDatasetNameSuffix(t),r=this._datasetsURI+"/"+e+n+"/features.rjson";this._commit.open("GET",encodeURI(r),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null);let o=JSON.parse(this._commit.responseText,null);if(null!=o&&o.featureCount>0){r=this._datasetsURI+"/"+e+n+"/features.rjson?_method=DELETE&deleteMode=SQL";let t={attributeFilter:"SmID>=0"};this._commit.open("POST",encodeURI(r),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(t))}i.forEach(((i,n)=>{this._editFeature(e,t,n,i)}))}getSatelliteGroupInfo(e,t){let i=this._queryFeaturesByFields(e+"_SatelliteInfo",["SatelliteGroupName"],[t]),n=new Map;return WebGLPlot$g.defined(i)&&i.length>0&&i.forEach((e=>{n.set(e.fieldValues[2],e.fieldValues[4])})),n}getSatelliteInfo(e,t,i){let n=this._queryFeaturesByFields(e+"_SatelliteInfo",["SatelliteID","SatelliteGroupName"],[t,i]);if(WebGLPlot$g.defined(n)&&n.length>0)return n[0].fieldValues[4]}updateSatelliteInfoFeature(e,t,i,n){this._commit.open("GET",encodeURI(this._datasetsURI+".rjson"),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null);let r=JSON.parse(this._commit.responseText,null);if(WebGLPlot$g.defined(r)&&-1==r.datasetNames.indexOf(e+"_SatelliteInfo")){let t={datasetType:"TABULAR",datasetName:e+"_SatelliteInfo"};if(this._commit.open("POST",encodeURI(this._datasetsURI+".json"),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(t)),JSON.parse(this._commit.responseText,null).succeed){let t=this._datasetsURI+"/"+e+"_SatelliteInfo/fields.rjson",i=["SatelliteID","SatelliteGroupName","Content"];for(let e=0;e<i.length;e++){let n={isZeroLengthAllowed:"false",maxLength:"100000000",isRequired:"false",name:i[e],caption:i[e],type:"WTEXT",defaultValue:"null",isSystemField:"false"};this._commit.open("POST",encodeURI(t),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(n))}}}let o=this._queryFeaturesByFields(e+"_SatelliteInfo",["SatelliteID","SatelliteGroupName"],[t,i]),a=this._datasetsURI+"/"+e+"_SatelliteInfo/features.rjson",s=[{fieldNames:["SmID","SmUserID","SatelliteID","SatelliteGroupName","Content"],fieldValues:["0","0",t,i,n],geometry:null}];return null!=o&&o.length>0&&(a+="?_method=PUT",s=[{ID:o[0].ID,fieldNames:["SmID","SmUserID","Content"],fieldValues:["0","0",n],geometry:null}]),this._commit.open("POST",encodeURI(a),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(s)),r=JSON.parse(this._commit.responseText,null),r.succeed}deleteFeature(e,t,i){let n=this._getDatasetNameSuffix(t),r=this._datasetsURI+"/"+e+n+"/features.rjson?_method=DELETE&deleteMode=SQL",o={attributeFilter:'uuid="'+i+'"'};return this._commit.open("POST",encodeURI(r),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(o)),JSON.parse(this._commit.responseText,null).succeed}deleteSatelliteInfoFeature(e,t,i){let n=this._datasetsURI+"/"+e+"_SatelliteInfo/features.rjson?_method=DELETE&deleteMode=SQL",r={attributeFilter:"SatelliteID='"+t+"' and SatelliteGroupName='"+i+"'"};return this._commit.open("POST",encodeURI(n),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(r)),JSON.parse(this._commit.responseText,null).succeed}_getCommit(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{this.commit=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}_editFeature(e,t,i,n){let r=this._getDatasetNameSuffix(t),o=this._queryFeatures(e+r,"uuid",i),a=this._datasetsURI+"/"+e+r+"/features.rjson",s=[{fieldNames:["SmID","SmUserID","uuid","Content"],fieldValues:["0","0",i,n],geometry:null}];return null!=o&&o.length>0&&(a+="?_method=PUT",s=[{ID:o[0].ID,fieldNames:["SmID","SmUserID","Content"],fieldValues:["0","0",n],geometry:null}]),this._commit.open("POST",encodeURI(a),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(s)),JSON.parse(this._commit.responseText,null).succeed}_getDatasetNameSuffix(e){let t="";switch(e){case _0x4e109a.ENTITY:t="_Entity";break;case _0x4e109a.SCRIPT:t="_Script";break;case _0x4e109a.SATELLITE:t="_Satellite"}return t}_queryFeatures(e,t,i){this._commit.open("POST",encodeURI(this._featureResultsURI),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");let n={getFeatureMode:"SQL",datasetNames:["SituationSimulationSchemeDatasource:"+e],maxFeatures:1e4,queryParameter:{sortClause:null,ids:null,name:null,attributeFilter:0===t.length?"":t+'="'+i+'"',groupClause:null,linkItems:null,joinItems:null,fields:null}};this._commit.send(WebGLPlot$g.toJSON(n));let r=JSON.parse(this._commit.responseText,null);return null==r?null:r.features}_queryFeaturesByFields(e,t,i){this._commit.open("POST",encodeURI(this._featureResultsURI),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");let n="";for(let e=0;e<t.length;++e)n+=0==e?t[e]+"='"+i[e]+"'":" and "+t[e]+"='"+i[e]+"'";let r={getFeatureMode:"SQL",datasetNames:["SituationSimulationSchemeDatasource:"+e],maxFeatures:1e4,queryParameter:{sortClause:null,ids:null,name:null,attributeFilter:n,groupClause:null,linkItems:null,joinItems:null,fields:null}};this._commit.send(WebGLPlot$g.toJSON(r));let o=JSON.parse(this._commit.responseText,null);return null==o||!1===o.succeed?null:o.features}_loadSateGroupInfos(e){if(!WebGLPlot$g.defined(e)||!WebGLPlot$g.defined(this._URI))return null;var t;if(-1==(e=e.replace(/\\+/g,"/")).lastIndexOf("/"))return null;(t=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")).open("GET",e,!1),t.send();var i=t.responseText;return WebGLPlot$g.defined(i)?i:null}_convertToRgba(e){if(e.startsWith("RGBA(")&&e.endsWith(")")){let t=e.replace("RGBA(","");t=t.substring(0,t.lastIndexOf(")"));let i=t.split(",");if(4===i.length)return new WebGLPlot$g.Color(i[0].trim(),i[1].trim(),i[2].trim(),i[3].trim())}return null}}const _0x5526d4=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0xe0c097=_0x5526d4(void 0,(function(){return _0xe0c097.toString().search("(((.+)+)+)+$").toString().constructor(_0xe0c097).search("(((.+)+)+)+$")}));_0xe0c097();class _0xb0d84{constructor(){this._textNames=[],this._funcs=new Map,this._time=void 0,this._div=void 0}_execute(e){this._time=e,this._funcs.forEach(((e,t)=>{e.func(e.parms)}))}init(e){let t=this;WebGLPlot$g.defined(e.viewer)&&_0x3db1bf.addExtendCallBack((function(e,t,i){if("camera"===t){let t=e.viewer,n=JSON.parse(i);t.camera.flyTo({destination:new Cesium.Cartesian3(n.position.x,n.position.y,n.position.z),orientation:{heading:n.heading,pitch:n.pitch,roll:n.roll},duration:n.duration})}}),{viewer:e.viewer}),WebGLPlot$g.defined(e.document)&&_0x3db1bf.addExtendCallBack((function(e,i,n){if("text"===i){let i=e.document,r=JSON.parse(n),o=i.createElement("Div");o.onselectstart=function(){return!1},o.style.position="absolute",o.style.zIndex="9999",o.style.whiteSpace="pre-wrap",o.style.wordBreak="break-all",o.style.width=r.width,o.style.height=r.height,o.style.background=r.backColor,o.style.borderWidth=r.borderWidth,o.style.borderStyle=r.borderStyle,o.style.borderColor=r.borderColor,o.style.webkitBorderRadius=r.borderRadius,o.style.paddingLeft=r.paddingLeft,o.style.paddingRight=r.paddingRight,o.style.paddingTop=r.paddingTop,o.style.paddingBottom=r.paddingBottom;let a=r.texts;for(let e=0;e<a.length;e++){let t=a[e],n=i.createElement("p");n.style.marginTop="0px",n.style.marginBottom="0px";let r=t.fontSize,s=r.slice(0,r.length-2);n.style.paddingTop=String(Number(s)/2)+"px",n.style.paddingBottom=String(Number(s)/2)+"px",n.style.color=t.color,n.style.fontFamily=t.fontFamily,n.style.fontSize=t.fontSize,n.style.fontWeight=t.fontWeight,n.style.fontStyle=t.fontStyle,n.style.lineHeight=t.lineHeight,n.style.letterSpacing=t.letterSpacing,n.style.textDecoration=t.textDecoration,n.style.textShadow=t.textShadow,n.style["-webkit-text-stroke"]=t.stroke,n.style.textAlign=t.textAlign,"left"===n.style.textAlign?n.style.marginLeft=t.margin:"right"===n.style.textAlign&&(n.style.marginRight=t.margin);let l=i.createTextNode(t.text);n.appendChild(l),o.appendChild(n)}i.body.appendChild(o);let s=o.offsetWidth,l=o.offsetHeight;switch(r.position.type){case 0:o.style.left=String(r.position.customPos.left+r.position.offset.x)+"px",o.style.top=String(r.position.customPos.top+r.position.offset.y)+"px";break;case 1:o.style.left=String(1+r.position.offset.x)+"px",o.style.top=String(1+r.position.offset.y)+"px";break;case 2:o.style.left="calc(50% - "+String(s/2-r.position.offset.x)+"px)",o.style.top=String(1+r.position.offset.y)+"px";break;case 3:o.style.left="calc(100% - "+String(s+1-r.position.offset.x)+"px)",o.style.top=String(1+r.position.offset.y)+"px";break;case 4:o.style.left=String(1+r.position.offset.x)+"px",o.style.top="calc(50% - "+String(l/2-r.position.offset.y)+"px)";break;case 5:o.style.left="calc(50% - "+String(s/2-r.position.offset.x)+"px)",o.style.top="calc(50% - "+String(l/2-r.position.offset.y)+"px)";break;case 6:o.style.left="calc(100% - "+String(s+1-r.position.offset.x)+"px)",o.style.top="calc(50% - "+String(l/2-r.position.offset.y)+"px)";break;case 7:o.style.left=String(1+r.position.offset.x)+"px",o.style.top="calc(100% - "+String(l+1-r.position.offset.y)+"px)";break;case 8:o.style.left="calc(50% - "+String(s/2-r.position.offset.x)+"px)",o.style.top="calc(100% - "+String(l+1-r.position.offset.y)+"px)";break;case 9:o.style.left="calc(100% - "+String(s+1-r.position.offset.x)+"px)",o.style.top="calc(100% - "+String(l+1-r.position.offset.y)+"px)"}let u=WebGLPlot$g.createGuid(),c=function(e){if(t._time-e.startTime>e.time){e.div.remove(),t._funcs.delete(u);for(let e=0;e<t._textNames.length;e++)if(t._textNames[e]===u){t._textNames.splice(e,1);break}}};t._funcs.set(u,{parms:{startTime:t._time,time:r.time,div:o},func:c}),t._textNames.push(u)}}),{document:e.document})}clearText(){this._textNames.forEach((e=>{this._funcs.get(e).parms.div.remove(),this._funcs.delete(e)})),this._textNames=[]}createCameraFlyExtendEffect(e){let t=new _0x3db1bf;t.setName("camera");let i={};return i.position={x:e.position.x,y:e.position.y,z:e.position.z},i.heading=e.heading,i.pitch=e.pitch,i.roll=e.roll,i.duration=e.duration,t.setParam(JSON.stringify(i)),t}createTextExtendEffect(e){if(!WebGLPlot$g.defined(e.texts))return;let t=new _0x3db1bf;t.setName("text");let i={};return i.time=WebGLPlot$g.defaultValue(1e3*e.time,3e3),WebGLPlot$g.defined(e.position)?(i.position={type:WebGLPlot$g.defaultValue(e.position.type,8)},WebGLPlot$g.defined(e.position.customPos)?i.position.customPos={left:WebGLPlot$g.defined(e.position.customPos.x)?e.position.customPos.x:0,top:WebGLPlot$g.defined(e.position.customPos.y)?e.position.customPos.y:0}:i.position.customPos={left:0,top:0},WebGLPlot$g.defined(e.position.offset)?i.position.offset={x:WebGLPlot$g.defined(e.position.offset.x)?e.position.offset.x:0,y:WebGLPlot$g.defined(e.position.offset.y)?e.position.offset.y:0}:i.position.offset={x:0,y:0}):i.position={type:8},i.width=WebGLPlot$g.defined(e.width)?String(e.width)+"px":"",i.height=WebGLPlot$g.defined(e.height)?String(e.height)+"px":"",i.backColor=WebGLPlot$g.defined(e.backColor)?e.backColor:"white",i.borderColor=WebGLPlot$g.defined(e.borderColor)?e.borderColor:"white",i.borderStyle=WebGLPlot$g.defined(e.borderStyle)?String(e.borderStyle):"solid",i.borderWidth=WebGLPlot$g.defined(e.borderWidth)?e.borderWidth+"px":"0px",i.borderRadius=WebGLPlot$g.defined(e.borderRadius)?e.borderRadius+"px":"0px",i.paddingLeft=WebGLPlot$g.defined(e.paddingLeft)?String(e.paddingLeft)+"px":"0px",i.paddingRight=WebGLPlot$g.defined(e.paddingRight)?String(e.paddingRight)+"px":"0px",i.paddingTop=WebGLPlot$g.defined(e.paddingTop)?String(e.paddingTop)+"px":"0px",i.paddingBottom=WebGLPlot$g.defined(e.paddingBottom)?String(e.paddingBottom)+"px":"0px",i.texts=[],e.texts.forEach((e=>{let t={text:WebGLPlot$g.defaultValue(e.text,"Text"),fontFamily:WebGLPlot$g.defaultValue(e.fontFamily,"Microsoft YaHei"),fontStyle:WebGLPlot$g.defaultValue(e.fontStyle,"normal"),lineHeight:WebGLPlot$g.defaultValue(e.lineHeight,1),fontSize:WebGLPlot$g.defined(e.fontSize)?String(e.fontSize)+"px":"16px",fontWeight:WebGLPlot$g.defined(e.fontWeight)?e.fontWeight:"normal",letterSpacing:WebGLPlot$g.defined(e.letterSpacing)?String(e.letterSpacing)+"px":"0px",color:WebGLPlot$g.defined(e.color)?e.color:"black",textAlign:WebGLPlot$g.defaultValue(e.textAlign,"left"),margin:WebGLPlot$g.defined(e.margin)?String(e.margin)+"px":"0px"};if(WebGLPlot$g.defined(e.textDecoration)){let i=WebGLPlot$g.defined(e.textDecoration.type)?e.textDecoration.type:"none",n=WebGLPlot$g.defined(e.textDecoration.color)?e.textDecoration.color:"black";t.textDecoration=i+" "+n}if(WebGLPlot$g.defined(e.textShadow)){let i=WebGLPlot$g.defined(e.textShadow.color)?e.textShadow.color:"black",n=WebGLPlot$g.defined(e.textShadow.left)?String(e.textShadow.left)+"px":"4px",r=WebGLPlot$g.defined(e.textShadow.top)?String(e.textShadow.top)+"px":"4px",o=WebGLPlot$g.defined(e.textShadow.size)?String(e.textShadow.size)+"px":"4px";t.textShadow=i+" "+n+" "+r+" "+o}if(WebGLPlot$g.defined(e.stroke)){let i=WebGLPlot$g.defined(e.stroke.width)?String(e.stroke.width)+"px":"0px",n=WebGLPlot$g.defined(e.stroke.color)?e.stroke.color:"black";t.stroke=i+" "+n}i.texts.push(t)})),i.param=JSON.stringify(e),t.setParam(JSON.stringify(i)),t}previewExtendText(e,t){WebGLPlot$g.defined(this._div)&&(this._div.remove(),this._div=void 0);let i=JSON.parse(t.getParam()),n=e.createElement("Div");n.onselectstart=function(){return!1},n.style.position="absolute",n.style.zIndex="9999",n.style.whiteSpace="pre-wrap",n.style.wordBreak="break-all",n.style.width=i.width,n.style.height=i.height,n.style.background=i.backColor,n.style.borderWidth=i.borderWidth,n.style.borderStyle=i.borderStyle,n.style.borderColor=i.borderColor,n.style.webkitBorderRadius=i.borderRadius,n.style.paddingLeft=i.paddingLeft,n.style.paddingRight=i.paddingRight,n.style.paddingTop=i.paddingTop,n.style.paddingBottom=i.paddingBottom;let r=i.texts;for(let t=0;t<r.length;t++){let i=r[t],o=e.createElement("p");o.style.marginTop="0px",o.style.marginBottom="0px";let a=i.fontSize,s=a.slice(0,a.length-2);o.style.paddingTop=String(Number(s)/2)+"px",o.style.paddingBottom=String(Number(s)/2)+"px",o.style.color=i.color,o.style.fontFamily=i.fontFamily,o.style.fontSize=i.fontSize,o.style.fontWeight=i.fontWeight,o.style.fontStyle=i.fontStyle,o.style.lineHeight=i.lineHeight,o.style.letterSpacing=i.letterSpacing,o.style.textDecoration=i.textDecoration,o.style.textShadow=i.textShadow,o.style["-webkit-text-stroke"]=i.stroke,o.style.textAlign=i.textAlign,"left"===o.style.textAlign?o.style.marginLeft=i.margin:"right"===o.style.textAlign&&(o.style.marginRight=i.margin);let l=e.createTextNode(i.text);o.appendChild(l),n.appendChild(o)}e.body.appendChild(n);let o=n.offsetWidth,a=n.offsetHeight;switch(i.position.type){case 0:n.style.left=String(i.position.customPos.left+i.position.offset.x)+"px",n.style.top=String(i.position.customPos.top+i.position.offset.y)+"px";break;case 1:n.style.left=String(1+i.position.offset.x)+"px",n.style.top=String(1+i.position.offset.y)+"px";break;case 2:n.style.left="calc(50% - "+String(o/2-i.position.offset.x)+"px)",n.style.top=String(1+i.position.offset.y)+"px";break;case 3:n.style.left="calc(100% - "+String(o+1-i.position.offset.x)+"px)",n.style.top=String(1+i.position.offset.y)+"px";break;case 4:n.style.left=String(1+i.position.offset.x)+"px",n.style.top="calc(50% - "+String(a/2-i.position.offset.y)+"px)";break;case 5:n.style.left="calc(50% - "+String(o/2-i.position.offset.x)+"px)",n.style.top="calc(50% - "+String(a/2-i.position.offset.y)+"px)";break;case 6:n.style.left="calc(100% - "+String(o+1-i.position.offset.x)+"px)",n.style.top="calc(50% - "+String(a/2-i.position.offset.y)+"px)";break;case 7:n.style.left=String(1+i.position.offset.x)+"px",n.style.top="calc(100% - "+String(a+1-i.position.offset.y)+"px)";break;case 8:n.style.left="calc(50% - "+String(o/2-i.position.offset.x)+"px)",n.style.top="calc(100% - "+String(a+1-i.position.offset.y)+"px)";break;case 9:n.style.left="calc(100% - "+String(o+1-i.position.offset.x)+"px)",n.style.top="calc(100% - "+String(a+1-i.position.offset.y)+"px)"}this._div=n}cancelPreviewExtendText(){WebGLPlot$g.defined(this._div)&&(this._div.remove(),this._div=void 0)}}const _0x20ffa0=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0xfd8226=_0x20ffa0(void 0,(function(){return _0xfd8226.toString().search("(((.+)+)+)+$").toString().constructor(_0xfd8226).search("(((.+)+)+)+$")}));_0xfd8226();class _0x4a8e27{constructor(){this._bPlay=!1,this._lUTCTime=(new Date).getTime(),this._lSimulationTime=this._lUTCTime,this._dSimulationSpeed=1,this._lCumnlativeTime=0,this._bReverse=!1,this._bAutoUpdate=!1,this._lOrbitTime=this._lSimulationTime;let e=this;this._timer=setInterval((function(){e._execute()}),30)}addControllerCallBackEvent(e){_0x373a17.getInstance().getDeductionScriptManager()._deductionScriptExecuteManager._controllerEvent.addEventListener(e)}removeControllerCallBackEvent(e){_0x373a17.getInstance().getDeductionScriptManager()._deductionScriptExecuteManager._controllerEvent.removeEventListener(e)}setResetType(e){_0x373a17.getInstance().getDeductionScriptManager()._setResetType(e)}start(){return this.reset(),this._bPlay=!0,_0x373a17.getInstance().getDeductionScriptManager()._start(this._lSimulationTime)}stop(){this._bPlay=!1,_0x373a17.getInstance().getDeductionScriptManager()._stop()}reset(){this._bPlay=!1,_0x373a17.getInstance().getDeductionScriptManager()._reset()}pause(){this._bPlay=!1}continue(){this._bPlay=!0}setExecutePassTimeOffset(e){this._lSimulationTime+=e}addExecuteCallBackEvent(e){_0x373a17.getInstance().getDeductionScriptManager()._deductionScriptExecuteManager._executerEvent.addEventListener(e)}removeExecuteCallBackEvent(e){_0x373a17.getInstance().getDeductionScriptManager()._deductionScriptExecuteManager._executerEvent.removeEventListener(e)}getUTCTime(){return this._lUTCTime}setSimulationSpeed(e){this._dSimulationSpeed=e}getSimulationSpeed(){return this._dSimulationSpeed}setSimulationTime(e){this._lSimulationTime=e,this._executeSatellite(),this._executeDeductionScript()}getSimulationTime(){return this._lSimulationTime}setIsReverse(e){this._bReverse=e}getIsReverse(){return this._bReverse}getAutoUpdate(){return this._bAutoUpdate}isPlay(){return this._bPlay}updataAllOrbitPosition(){_0x373a17.getInstance().getSatelliteManager().updateAllOrbitPosition(this._lSimulationTime)}_execute(){let e=(new Date).getTime();if(this._bPlay){let t=(e-this._lUTCTime)*this._dSimulationSpeed;this._bReverse?this._lSimulationTime=this._lSimulationTime-t:this._lSimulationTime=this._lSimulationTime+t,this._executeSatellite(),this._executeDeductionScript(),this._lCumnlativeTime=0}this._lUTCTime=e}_executeSatellite(){_0x373a17.getInstance().getSatelliteManager().updateAllSatellitePosition(this._lSimulationTime),_0x373a17.getInstance().getSatelliteEntityManager().updateAllSatelliteEntityPosition(this._lSimulationTime)}_executeDeductionScript(){_0x373a17.getInstance().getDeductionScriptManager()._execute(this._lSimulationTime),_0x373a17.getInstance().getGeoEntityEffectExtendFactory()._execute(this._lSimulationTime)}}const _0x2df1c7=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x51b468=_0x2df1c7(void 0,(function(){return _0x51b468.toString().search("(((.+)+)+)+$").toString().constructor(_0x51b468).search("(((.+)+)+)+$")}));_0x51b468();class _0x373a17{constructor(){this._geoEntityManager=new _0x2d71fc,this._satelliteEntityManager=new _0x13f071,this._satelliteManager=new _0x1975a7,this._deductionScriptManager=new _0xdeda0a,this._situationSimulationSchemeManager=new _0x5a144a,this._geoEntityEffectExtendFactory=new _0xb0d84,this._simulationController=new _0x4a8e27,this._schemeName=void 0,this._isAutoSave=!1,this._uri=void 0}_saveGeoEntity(e){if(e||this._isAutoSave){if(!WebGLPlot$g.defined(this._schemeName))return;let e=this._geoEntityManager._getAddAndRemoveGeoEntitys();e.add.forEach((e=>{this._situationSimulationSchemeManager.addFeature(this._schemeName,_0x4e109a.ENTITY,e.getUUID(),e.toJson())})),e.remove.forEach((e=>{this._situationSimulationSchemeManager.deleteFeature(this._schemeName,_0x4e109a.ENTITY,e)}));let t=this._geoEntityManager.getGeoEntityRootNode();(e.add.length>0||e.remove.length>0||t._isModify())&&(this._situationSimulationSchemeManager.saveEntityStructure(this._schemeName,t._toJson()),t._isModify()&&t._setIsModify(!1)),this._geoEntityManager.getGeoEntitys().forEach((t=>{-1===e.add.indexOf(t)&&t._isModify()&&(this._situationSimulationSchemeManager.updateFeature(this._schemeName,_0x4e109a.ENTITY,t.getUUID(),t.toJson()),t._setIsModify(!1))})),this._geoEntityManager._clearAddAndRemoveGeoEntitys()}}_saveSatelliteGeoEntity(e){if(e||this._isAutoSave){if(!WebGLPlot$g.defined(this._schemeName))return;let e=this._satelliteEntityManager._getAddAndRemoveGeoEntitys();e.add.forEach((e=>{this._situationSimulationSchemeManager.addFeature(this._schemeName,_0x4e109a.SATELLITE,e.getUUID(),e.toJson())})),e.remove.forEach((e=>{this._situationSimulationSchemeManager.deleteFeature(this._schemeName,_0x4e109a.SATELLITE,e)})),this._satelliteEntityManager.getSatelliteEntitys().forEach((t=>{-1===e.add.indexOf(t)&&t._isModify()&&(this._situationSimulationSchemeManager.updateFeature(this._schemeName,_0x4e109a.SATELLITE,t.getUUID(),t.toJson()),t._setIsModify(!1))})),this._satelliteEntityManager._clearAddAndRemoveGeoEntitys()}}_saveDeductionScript(e){if(e||this._isAutoSave){if(!WebGLPlot$g.defined(this._schemeName))return;let e=this._deductionScriptManager._getAddAndRemoveDeductionScripts();e.add.forEach((e=>{this._situationSimulationSchemeManager.addFeature(this._schemeName,_0x4e109a.SCRIPT,e.getUUID(),e._toJson())})),e.remove.forEach((e=>{this._situationSimulationSchemeManager.deleteFeature(this._schemeName,_0x4e109a.SCRIPT,e)})),(e.add.length>0||e.remove.length>0||this._deductionScriptManager._isGroupInfoModify())&&(this._situationSimulationSchemeManager.saveScriptStructure(this._schemeName,this._deductionScriptManager.toJson().deductionScriptGroupJsons),this._deductionScriptManager._isGroupInfoModify()&&this._deductionScriptManager._setIsGroupInfoModify(!1)),this._deductionScriptManager.getDeductionScriptGroups().forEach((e=>{e.getDeductionScripts().forEach((e=>{e._isModify()&&(this._situationSimulationSchemeManager.updateFeature(this._schemeName,_0x4e109a.SCRIPT,e.getUUID(),e._toJson()),e._setIsModify(!1))}))}))}}_saveSatelliteGroups(e){if(e||this._isAutoSave){if(!WebGLPlot$g.defined(this._schemeName))return;this._satelliteManager._isModify()&&(this._situationSimulationSchemeManager.saveSatelliteGroupStructure(this._schemeName,this._satelliteManager.toJson()),this._satelliteManager._setIsModify(!1))}}_saveSatelliteInfo(e,t){if(e||this._isAutoSave){if(!WebGLPlot$g.defined(this._schemeName))return;if(this._isAutoSave){if(WebGLPlot$g.defined(t)&&t._isModify()){let e=t._satelliteGroup,i=Json.stringify(t.toJson());if("{}"==i){let i=this._situationSimulationSchemeManager.getSatelliteInfo(this._schemeName,t.getUUID(),e.getGroupName());WebGLPlot$g.defined(i)&&this._situationSimulationSchemeManager.deleteSatelliteInfoFeature(this._schemeName,t.getUUID(),e.getGroupName())}else this._situationSimulationSchemeManager.updateSatelliteInfoFeature(this._schemeName,t.getUUID(),e.getGroupName(),i);t._setIsModify(!1)}}else if(e){let e=this._satelliteManager.getGroups();for(let t=0;t<e.length;t++){let i=e[t].getGroupName(),n=this._situationSimulationSchemeManager.getSatelliteGroupInfo(this._schemeName,i),r=e[t].getSatelliteFileNames();for(let o=0;o<r.length;o++){let a=e[t].getSatellites(r[o]);for(let e=0;e<a.length;e++){let t=a[e],r=n.get(t.getUUID());if(WebGLPlot$g.defined(r)&&!t._isModify())this._situationSimulationSchemeManager.deleteSatelliteInfoFeature(this._schemeName,t.getUUID(),i);else if(t._isModify()){let e=t.toJson();this._situationSimulationSchemeManager.updateSatelliteInfoFeature(this._schemeName,t.getUUID(),i,e),t._setIsModify(!1)}}}}}}}static getInstance(){return _0x373a17._instance||(_0x373a17._instance=new _0x373a17),_0x373a17._instance}getOpenedSchemeName(){return this._schemeName}getSimulationController(){return this._simulationController}getGeoEntityManager(){return this._geoEntityManager}getSatelliteEntityManager(){return this._satelliteEntityManager}getSatelliteManager(){return this._satelliteManager}getDeductionScriptManager(){return this._deductionScriptManager}getSituationSimulationSchemeManager(){return this._situationSimulationSchemeManager}getGeoEntityEffectExtendFactory(){return this._geoEntityEffectExtendFactory}setScene(e){this._geoEntityManager._setScene(e),this._satelliteEntityManager.setScene(e),this._satelliteManager.setScene(e),this._deductionScriptManager._setScene(e)}openScheme(e,t){let i=this._isAutoSave;this._isAutoSave=!1,this._schemeName=e;let n=this._situationSimulationSchemeManager.getSatelliteGroupStructure(e);this._satelliteManager.fromJson(n);let r=this._situationSimulationSchemeManager.getFeatures(e,_0x4e109a.ENTITY),o=this._situationSimulationSchemeManager.getEntityStructure(e);this._geoEntityManager.fromJson({geoEntityJsons:r,geoEntityNodeJson:o},(function(e){"function"==typeof t&&t(e)}));let a=this._situationSimulationSchemeManager.getFeatures(e,_0x4e109a.SATELLITE);this._satelliteEntityManager.fromJson({satelliteEntityJsons:a,satelliteManager:this._satelliteManager},(function(e){"function"==typeof t&&t(e)})),_0x5f28ea._fromJsonLink(r,this._geoEntityManager,this._satelliteEntityManager),_0x5f28ea._fromJsonLink(a,this._geoEntityManager,this._satelliteEntityManager);let s=this._situationSimulationSchemeManager.getFeatures(e,_0x4e109a.SCRIPT),l=this._situationSimulationSchemeManager.getScriptStructure(e);this._deductionScriptManager.fromJson({deductionScriptJsons:s,deductionScriptGroupJsons:l}),this._satelliteEntityManager.updateAllSatelliteEntityPosition((new Date).getTime()),this._satelliteEntityManager.updateAllOrbitPosition((new Date).getTime()),this._isAutoSave=i}closeScheme(){let e=this._isAutoSave;this._isAutoSave=!1,this._geoEntityManager._removeAllGeoEntityFromScene(),this._deductionScriptManager._removeAllScriptGroupFromScene(),this._satelliteEntityManager._removeAllSatelliteEntityFromScene(this._satelliteManager),this._schemeName=void 0,this._isAutoSave=e}saveScheme(){this._saveGeoEntity(!0),this._saveSatelliteGeoEntity(!0),this._saveDeductionScript(!0),this._saveSatelliteGroups(!0),this._saveSatelliteInfo(!0)}saveAsScheme(e){let t=this._situationSimulationSchemeManager._saveAsScheme(this._schemeName,e);return t&&(this._schemeName=e),t}setIsAutoSave(e){this._isAutoSave=e}isAutoSave(){return this._isAutoSave}setURI(e){this._situationSimulationSchemeManager._setURI(e),this._uri=e}getURI(){return this._uri}}const _0x54f881=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0xa22e0d=_0x54f881(void 0,(function(){return _0xa22e0d.toString().search("(((.+)+)+)+$").toString().constructor(_0xa22e0d).search("(((.+)+)+)+$")}));_0xa22e0d();class _0x1569f6{constructor(){this._mapModelPathToModelSize=void 0}static cartesian3ToDegrees(e){let t=WebGLPlot$g.Cartographic.fromCartesian(e);return new _0x45ea17(WebGLPlot$g.CesiumMath.toDegrees(t.longitude),WebGLPlot$g.CesiumMath.toDegrees(t.latitude),t.height)}static degreesToCartesian3(e){return WebGLPlot$g.Cartesian3.fromDegrees(e.x,e.y,e.z)}static getPositionFromModelMatrix(e){let t=WebGLPlot$g.Matrix4.getTranslation(e,new WebGLPlot$g.Cartesian3);return this.cartesian3ToDegrees(t)}static getScaleFromModelMatrix(e){let t=WebGLPlot$g.Matrix4.getScale(e,new WebGLPlot$g.Cartesian3);return this.cartesian3ToDegrees(t)}static getRotationFromModelMatrix(e){let t=WebGLPlot$g.Matrix4.getRotation(e,new WebGLPlot$g.Matrix4),i=WebGLPlot$g.Matrix4.getMatrix3(t,new WebGLPlot$g.Matrix3),n=WebGLPlot$g.Quaternion.fromRotationMatrix(i),r=WebGLPlot$g.HeadingPitchRoll.fromQuaternion(n);return new _0x45ea17(WebGLPlot$g.CesiumMath.toDegrees(r.pitch),WebGLPlot$g.CesiumMath.toDegrees(r.roll),WebGLPlot$g.CesiumMath.toDegrees(r.heading))}static getHeading(e,t){let i=WebGLPlot$g.Transforms.eastNorthUpToFixedFrame(e),n=Cesium.Cartesian3.subtract(t,e,new Cesium.Cartesian3),r=WebGLPlot$g.Matrix4.multiplyByPointAsVector(WebGLPlot$g.Matrix4.inverse(i,new WebGLPlot$g.Matrix4),n,new WebGLPlot$g.Cartesian3),o=WebGLPlot$g.Cartesian3.normalize(r,new WebGLPlot$g.Cartesian3),a=Math.atan2(o.y,o.x)-WebGLPlot$g.CesiumMath.PI_OVER_TWO;return WebGLPlot$g.CesiumMath.TWO_PI-WebGLPlot$g.CesiumMath.zeroToTwoPi(a)}static getPitch(e,t){let i=WebGLPlot$g.Transforms.eastNorthUpToFixedFrame(e),n=WebGLPlot$g.Cartesian3.subtract(t,e,new WebGLPlot$g.Cartesian3),r=WebGLPlot$g.Matrix4.multiplyByPointAsVector(WebGLPlot$g.Matrix4.inverse(i,i),n,n);return WebGLPlot$g.Cartesian3.normalize(r,r),WebGLPlot$g.CesiumMath.PI_OVER_TWO-WebGLPlot$g.CesiumMath.acosClamped(r.z)}static getModelSize(e){WebGLPlot$g.defined(this._mapModelPathToModelSize)||(this._mapModelPathToModelSize=new Map);let t=(e=WebGLPlot$g.defaultValue(e,WebGLPlot$g.defaultValue.EMPTY_OBJECT)).modelPath,i=e.scene,n=this._mapModelPathToModelSize.get(t);if(WebGLPlot$g.defined(n))return n;if(!WebGLPlot$g.defined(i))return;let r,o=t;if(t.endsWith(".gltf")||t.endsWith(".glb"))r=i.primitives.add(WebGLPlot$g.Model.fromGltf({url:t}));else if(t.endsWith(".s3mz")){o=_0x373a17.getInstance().getURI()+"/iserver/services/MGISDataSystemServer/rest/domainComponents/MGISDataQueryImpl/deCodeModelResult.json?",o+="arg0="+t;let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{e=null}}!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e.open("GET",encodeURI(o),!1),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send();var a=e.responseText;if(WebGLPlot$g.defined(a)){let e=JSON.parse(a);WebGLPlot$g.defined(e.error)||(WebGLPlot$g.defined(e.supermap)&&(e=e.supermap),r=i.primitives.add(WebGLPlot$g.Model.fromJson({url:t,gltfJson:e})))}}if(!Cesium.defined(r))return;let s=this;return r.readyPromise.then((function(e){if(WebGLPlot$g.defined(e._maxCorner)&&WebGLPlot$g.defined(e._minCorner)){var n=Math.abs(e._maxCorner.x-e._minCorner.x),r=Math.abs(e._maxCorner.y-e._minCorner.y),o=Math.abs(e._maxCorner.z-e._minCorner.z);s._mapModelPathToModelSize.set(t,new _0x45ea17(n,o,r)),i.primitives.remove(e)}})),n}static getModel(e){let t;if(!WebGLPlot$g.defined(e.url))return t;let i=e.url.split(".");const n=i[i.length-1];if("gltf"==n||"glb"==n)t=WebGLPlot$g.Model.fromGltf(e);else if("s3mz"==n){let i=!1;if(WebGLPlot$g.defined(e.gltfJson)&&e.gltfJson.length>0)t=WebGLPlot$g.Model.fromJson(e),i=!0;else if(WebGLPlot$g.defined(WebGLPlot$g.Model.getCachedGltfByPath)){let n=WebGLPlot$g.Model.getCachedGltfByPath(e.url);n&&(e.gltfJson=n,t=WebGLPlot$g.Model.fromJson(e),i=!0)}if(!i){let i=_0x373a17.getInstance().getURI()+"/iserver/services/MGISDataSystemServer/rest/domainComponents/MGISDataQueryImpl/deCodeModelResult.json?";i+="arg0="+e.url;let n=null;try{n=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{n=new ActiveXObject("Microsoft.XMLHTTP")}catch{n=null}}!n&&typeof XMLHttpRequest<"u"&&(n=new XMLHttpRequest),n.open("GET",encodeURI(i),!1),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),n.send();var r=n.responseText;if(WebGLPlot$g.defined(r)){let i=JSON.parse(r);WebGLPlot$g.defined(i.error)||(WebGLPlot$g.defined(i.supermap)&&(e.gltfJson=i.supermap),t=WebGLPlot$g.Model.fromJson(e))}}}return t}static getModelSizeSyn(e){if(!WebGLPlot$g.defined(e))return;WebGLPlot$g.defined(this._mapModelPathToModelSize)||(this._mapModelPathToModelSize=new Map);let t=this._mapModelPathToModelSize.get(e);if(WebGLPlot$g.defined(t))return t;let i=e;e.endsWith(".s3mz")&&(i=_0x373a17.getInstance().getURI()+"/iserver/services/MGISDataSystemServer/rest/domainComponents/MGISDataQueryImpl/deCodeModelResult.json?",i+="arg0="+e);let n=null;try{n=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{n=new ActiveXObject("Microsoft.XMLHTTP")}catch{n=null}}!n&&typeof XMLHttpRequest<"u"&&(n=new XMLHttpRequest),n.open("GET",encodeURI(i),!1),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),n.send();var r=n.responseText;if(!WebGLPlot$g.defined(r))return;let o=JSON.parse(r);if(WebGLPlot$g.defined(o.error))return;WebGLPlot$g.defined(o.supermap)&&(o=o.supermap),WebGLPlot$g.updateVersion(o),WebGLPlot$g.addDefaults(o);for(var a=new WebGLPlot$g.Cartesian3,s=new WebGLPlot$g.Cartesian3,l=o.nodes,u=o.meshes,c=o.scenes[o.scene].nodes,h=c.length,d=[],f=new WebGLPlot$g.Cartesian3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),p=new WebGLPlot$g.Cartesian3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),_=0;_<h;++_){var m=l[c[_]];for(m._transformToRoot=WebGLPlot$g.ModelUtility.getTransform(m),d.push(m);d.length>0;){var $=(m=d.pop())._transformToRoot,g=m.mesh;if(WebGLPlot$g.defined(g))for(var y=u[g].primitives,v=y.length,x=0;x<v;++x){var b=y[x].attributes.POSITION;if(WebGLPlot$g.defined(b)){var S=WebGLPlot$g.ModelUtility.getAccessorMinMax(o,b),w=WebGLPlot$g.Cartesian3.fromArray(S.min,0,a),C=WebGLPlot$g.Cartesian3.fromArray(S.max,0,s);WebGLPlot$g.defined(f)&&WebGLPlot$g.defined(p)&&(WebGLPlot$g.Matrix4.multiplyByPoint($,w,w),WebGLPlot$g.Matrix4.multiplyByPoint($,C,C),WebGLPlot$g.Cartesian3.minimumByComponent(f,w,f),WebGLPlot$g.Cartesian3.maximumByComponent(p,C,p))}}var T=m.children;if(WebGLPlot$g.defined(T))for(var P=T.length,E=0;E<P;++E){var A=l[T[E]];A._transformToRoot=WebGLPlot$g.ModelUtility.getTransform(A),WebGLPlot$g.Matrix4.multiplyTransformation($,A._transformToRoot,A._transformToRoot),d.push(A)}delete m._transformToRoot}}let L={};if(L._minCorner=f,L._maxCorner=p,WebGLPlot$g.defined(L._maxCorner)&&WebGLPlot$g.defined(L._minCorner)){var M=Math.abs(L._maxCorner.x-L._minCorner.x),I=Math.abs(L._maxCorner.y-L._minCorner.y),O=Math.abs(L._maxCorner.z-L._minCorner.z);this._mapModelPathToModelSize.set(e,new _0x45ea17(M,I,O))}return t=this._mapModelPathToModelSize.get(e),t}static getPositionByDistanceOnOld(e,t,i,n){if(e.length>=2&&t>=0&&i>=0&&n>=0){if(0==t)return{index:i,point:e[i],distanceIndexOld:n};let r=n;for(let n=i;n<e.length-1;n++){let i=e[n],o=e[n+1],a=WebGLPlot$g.Cartesian3.distance(i,o);if(r+=a,r==t)return{index:n+1,point:o,distanceIndexOld:r};if(r>t){let e=(r-t)/a,s=o.x+(i.x-o.x)*e,l=o.y+(i.y-o.y)*e,u=o.z+(i.z-o.z)*e,c=this.cartesian3ToDegrees(new _0x45ea17(s,l,u)),h=this.cartesian3ToDegrees(i),d=this.cartesian3ToDegrees(o);return c.z=h.z+(d.z-h.z)*(1-e),{index:n,point:this.degreesToCartesian3(c),distanceIndexOld:r-a}}}}return{index:-1,point:new WebGLPlot$g.Cartesian3}}static getPositionByDistance1(e,t){if(e.length>=2&&t>=0){if(0==t)return{index:0,point:e[0],distanceIndex:0};let i=0;for(let n=0;n<e.length-1;n++){let r=e[n],o=e[n+1],a=WebGLPlot$g.Cartesian3.distance(r,o);if(i+=a,i==t)return{index:n+1,point:o,distanceIndex:i};if(i>t){let e=(i-t)/a,s=o.x+(r.x-o.x)*e,l=o.y+(r.y-o.y)*e,u=o.z+(r.z-o.z)*e;return{index:n,point:new WebGLPlot$g.Cartesian3(s,l,u),distanceIndex:i-a}}}}return{index:-1,point:new WebGLPlot$g.Cartesian3,distanceIndex:0}}static getPositionByDistance(e,t){if(e.length>=2&&t>=0){if(0==t)return{index:0,point:e[0],distanceIndex:0};let i=0;for(let n=0;n<e.length-1;n++){let r=e[n],o=e[n+1],a=WebGLPlot$g.Cartesian3.distance(r,o);if(i+=a,i==t)return{index:n+1,point:o,distanceIndex:i};if(i>t){let e=(i-t)/a,s=o.x+(r.x-o.x)*e,l=o.y+(r.y-o.y)*e,u=o.z+(r.z-o.z)*e,c=this.cartesian3ToDegrees(new _0x45ea17(s,l,u)),h=this.cartesian3ToDegrees(r),d=this.cartesian3ToDegrees(o);return c.z=h.z+(d.z-h.z)*(1-e),{index:n,point:this.degreesToCartesian3(c),distanceIndex:i-a}}}}return{index:-1,point:new WebGLPlot$g.Cartesian3,distanceIndex:0}}static getAllDistance(e){let t=0;for(let i=0;i<e.length-1;i++){let n=e[i],r=e[i+1];t+=WebGLPlot$g.Cartesian3.distance(n,r)}return t}static calcControlPosMatrix(e,t,i){if(!WebGLPlot$g.defined(e)||!WebGLPlot$g.defined(t))return null;let n=WebGLPlot$g.Transforms.localFrameToFixedFrameGenerator("east","north"),r=null;if(e.getShowMode()!=_0x3f7d9f.Marker){const t=this.degreesToCartesian3(e.getPosition());r=WebGLPlot$g.Transforms.headingPitchRollToFixedFrame(t,new WebGLPlot$g.HeadingPitchRoll,WebGLPlot$g.Ellipsoid.WGS84,n)}else{const o=e.getModelRotate(),a=WebGLPlot$g.HeadingPitchRoll.fromDegrees(-o.z,-o.y,o.x,new WebGLPlot$g.HeadingPitchRoll),s=this.degreesToCartesian3(e.getPosition()),l=WebGLPlot$g.Transforms.headingPitchRollToFixedFrame(s,a,WebGLPlot$g.Ellipsoid.WGS84,n),u=e.getModelScale(),c=e.getModelPath(),h=this.getModelSize({modelPath:c,scene:i});if(WebGLPlot$g.defined(h)){const e=WebGLPlot$g.Cartesian3.fromElements(h.x*t.x*u,h.y*t.y*u,h.z*t.z*u);r=WebGLPlot$g.Matrix4.multiplyByTranslation(l,e,new WebGLPlot$g.Matrix4)}}return r}static calcControlPoint(e,t,i){if(0==t.x&&0==t.y&&0==t.z)return e.getPosition();let n=this.calcControlPosMatrix(e,t,i);return WebGLPlot$g.defined(n)?this.getPositionFromModelMatrix(n):null}static colorToObject(e){var t=new Object;return t.alpha=255*e.alpha,t.red=255*e.red,t.green=255*e.green,t.blue=255*e.blue,t}static objectToColor(e){var t=new WebGLPlot$g.Color;return t.red=e.red/255,t.green=e.green/255,t.blue=e.blue/255,t.alpha=e.alpha/255,WebGLPlot$g.defined(e.red)||(t.red=1),WebGLPlot$g.defined(e.green)||(t.green=1),WebGLPlot$g.defined(e.blue)||(t.blue=1),WebGLPlot$g.defined(e.alpha)||(t.alpha=1),t}static circlePoint(e,t,i,n){n*=Math.PI/180;let r=e.x+t*Math.cos(n),o=e.y+i*Math.sin(n);return new Cesium.Cartesian2(r,o)}static calcCameraDistance(e,t){if(WebGLPlot$g.defined(e)&&WebGLPlot$g.defined(t)){let i=this.degreesToCartesian3(e);return WebGLPlot$g.Cartesian3.distance(i,t.camera.positionWC)}return null}static relativeToAbsolutePath(e){if(!WebGLPlot$g.defined(e))return;let t=e,i=e.indexOf("iserver/");return i>-1&&(t=_0x373a17.getInstance().getURI()+"/"+e.substring(i)),t}static absoluteToRelativePath(e){if(!WebGLPlot$g.defined(e))return;let t=e,i=e.indexOf("iserver/");return i>-1&&(t="/"+e.substring(i)),t}static calCurveLinkPoints(e,t){let i=5e5,n=[];n.push(e);let r=[e,t],o=this.getAllDistance(r);if(o>i){let e=i;for(;e<o;){let t=this.getPositionByDistance(r,e);n.push(t.point),e+=i}}return n.push(t),n}static getSignTemplatePaths(){let e=[],t=_0x5f28ea.getResourceURI()+"/iserver/mgis/situationSimulation/Sign/signManager.json";if(!WebGLPlot$g.defined(t))return e;var i;if(t=t.replace(/\\+/g,"/"),-1==t.lastIndexOf("/"))return e;(i=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")).open("GET",t,!1),i.send();var n=i.responseText;if(!WebGLPlot$g.defined(n))return e;try{let i=JSON.parse(n),r=t.replaceAll("\\","/"),o=r.substr(0,r.lastIndexOf("/")+1);i.forEach((t=>{e.push(o+t)}))}catch(e){console.error(e)}return e}static isModelPath(e){let t=!1;if(WebGLPlot$g.defined(e)){let i=e.lastIndexOf(".");if(-1!=i){let n=e.substring(i+1).toUpperCase();("GLTF"===n||"GLB"===n||"S3MZ"===n)&&(t=!0)}}return t}static getGeoEntityByUUID(e){let t=_0x373a17.getInstance().getGeoEntityManager().getGeoEntityByUUID(e);return WebGLPlot$g.defined(t)||(t=_0x373a17.getInstance().getSatelliteEntityManager().getSatelliteEntityByUUID(e)),t}}const _0x4864f7=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x2dfc71=_0x4864f7(void 0,(function(){return _0x2dfc71.toString().search("(((.+)+)+)+$").toString().constructor(_0x2dfc71).search("(((.+)+)+)+$")}));_0x2dfc71();let _0x572d2f=null;class _0x14382e{constructor(e){this._scene=e,e&&e.camera.changed.addEventListener((()=>{this._ModeChange()}))}static getInstance(e){return null===_0x572d2f&&(_0x572d2f=new _0x14382e(e)),_0x572d2f}_ModeChange(){if(_0xac664c.defaultStyle.isDistanceChangeMode)for(let t=0;t<this._scene.plotLayers.getAllPlottingLayers().length;t++){let i=this._scene.plotLayers.getAllPlottingLayers()[t]._geoGraphicObjects;for(let t=0;t<i.length;t++){if(!_0x51d1e4.isSymbolDot(i[t]))return;let n=i[t];n.isDistanceChangeMode;let r=n.changeModeDistanceMap,o=_0x1569f6.calcCameraDistance(n.localPoints[0],this._scene),a=!1;(_0x585354.SYMBOL_MODEL===n._code||_0x585354.SYMBOL_PICTURE===n._code)&&(a=!0),(e=Array.from(r)).sort((function(e,t){return e[1]-t[1]}));for(let[t,i]of e){if(o<1e3*i&&a&&(t===_0x3f7d9f.Picture||t===_0x3f7d9f.Marker)){n.showMode=t;break}if(o<1e3*i&&a&&t!==_0x3f7d9f.Picture&&t!==_0x3f7d9f.Marker)continue;if(o<1e3*i){n.showMode=t;break}}}}else for(let t=0;t<this._scene.plotLayers.getAllPlottingLayers().length;t++){let i=this._scene.plotLayers.getAllPlottingLayers()[t]._geoGraphicObjects;for(let t=0;t<i.length;t++){if(!_0x51d1e4.isSymbolDot(i[t]))return;let n=i[t],r=!1;(_0x585354.SYMBOL_MODEL===n._code||_0x585354.SYMBOL_PICTURE===n._code)&&(r=!0);let o=n.isDistanceChangeMode,a=n.changeModeDistanceMap,s=_0x1569f6.calcCameraDistance(n.localPoints[0],this._scene);if(o){var e;(e=Array.from(a)).sort((function(e,t){return e[1]-t[1]}));for(let[t,i]of e){if(s<1e3*i&&r&&(t===_0x3f7d9f.Picture||t===_0x3f7d9f.Marker)){n.showMode=t;break}if(s<1e3*i&&r&&t!==_0x3f7d9f.Picture&&t!==_0x3f7d9f.Marker)continue;if(s<1e3*i){n.showMode=t;break}}}}}}}var c$i="uniform sampler2D u_floatTexture;\nvoid main()\n{\nfloat actual = texture2D(u_floatTexture, vec2(0.5, 0.5)).r;\nfloat expected = 123456.0;\ngl_FragColor = vec4(abs(actual - expected), 0.0, 0.0, 1.0);\n}\n";function a$j(e){this._context=e}var i$k,L$m=new s$1d({primitiveType:H$11.TRIANGLES}),M$p=new r$M({color:new e$1z(0,0,0,0)});function V$i(e,t){return new u$F({context:e,colorTextures:[t],destroyAttachments:!1})}function D$n(e,t){return p$15.fromCache({context:e,vertexShaderSource:pe$b,fragmentShaderSource:t,attributeLocations:{position:0,textureCoordinates:1}})}function Q$h(e,t){return(!t$$(i$k)||i$k.viewport.width!==e||i$k.viewport.height!==t)&&(i$k=p$1a.fromCache({viewport:new n$13(0,0,e,t)})),i$k}function t$f(e){if(!e.floatingPointTexture)return!1;var t=new a$j(e),i=new P$S({context:e,width:1,height:1,pixelFormat:Z$_.RGBA}),n=new P$S({context:e,width:1,height:1,pixelFormat:Z$_.RGBA,pixelDatatype:t$f._getFloatPixelType(),source:{width:1,height:1,arrayBufferView:t$f._getArray([123456,0,0,0])}}),r=new u$F({context:e,colorTextures:[i],destroyAttachments:!1}),o={framebuffer:r,x:0,y:0,width:1,height:1},a=!1,s=new t$w({fragmentShaderSource:c$i,outputTexture:i,uniformMap:{u_floatTexture:function(){return n}},persists:!1,postExecute:function(){var t=e.readPixels(o);a=0===t[0]}});return s.execute(t),t.destroy(),r.destroy(),a}function t$e(e){this._renderTexture=new h$p(e),this._renderTexture._pixelDatatype=v$Z.UNSIGNED_BYTE,this._context=e,this._isUpdate=!0,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0};var t=e._gl,i=t$$(e._currentFramebuffer)?e._currentFramebuffer._framebuffer:null;t.bindFramebuffer(t.FRAMEBUFFER,i)}function o$o(e){this._context=e,this._frameBuffer=void 0,this._depthTexture=void 0,this._textureToCopy=void 0,this._copyDepthCommand=void 0,this._upSampleWidth=Math.max(Math.pow(2,Math.ceil(Math.log(e.drawingBufferWidth)/Math.log(10))),8),this._upSampleHeight=Math.max(Math.pow(2,Math.ceil(Math.log(e.drawingBufferHeight)/Math.log(10))),8),this._upSampleViewport=new n$13(0,0,this._upSampleWidth,this._upSampleHeight)}a$j.prototype.execute=function(e){if(n$1e.defined("computeCommand",e),t$$(e.preExecute)&&e.preExecute(e),!t$$(e.fragmentShaderSource)&&!t$$(e.shaderProgram))throw new t$_("computeCommand.fragmentShaderSource or computeCommand.shaderProgram is required.");n$1e.defined("computeCommand.outputTexture",e.outputTexture);var t=e.outputTexture,i=t.width,n=t.height,r=this._context,o=t$$(e.vertexArray)?e.vertexArray:r.getViewportQuadVertexArray(),a=t$$(e.shaderProgram)?e.shaderProgram:D$n(r,e.fragmentShaderSource),s=V$i(r,t),l=e$1Y(e.renderState,Q$h(i,n)),u=e.uniformMap;if(e.clear){var c=M$p;c.framebuffer=s,c.renderState=l,c.execute(r)}var h=L$m;h.vertexArray=o,h.renderState=l,h.shaderProgram=a,h.uniformMap=u,h.framebuffer=s,h.execute(r),s.destroy(),e.persists||(a.destroy(),t$$(e.vertexArray)&&o.destroy()),t$$(e.postExecute)&&e.postExecute(t)},a$j.prototype.isDestroyed=function(){return!1},a$j.prototype.destroy=function(){return s$1e(this)},t$f._getFloatPixelType=function(){return v$Z.FLOAT},t$f._getArray=function(e){return new Float32Array(e)},Object.defineProperties(t$e.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},useType:{get:function(){return 32},set:function(e){}},frameBufferType:{get:function(){return B$y.CLAMP}}}),t$e.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this._renderTexture._passState},t$e.prototype.end=function(e){this._isUpdate=!0},t$e.prototype.update=function(e,t){},t$e.prototype.isDestroyed=function(){return!1},t$e.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),s$1e(this)};var U$g=new a$10,Y$j=new a$10(1,1/255,1/65025,1/16581375);function C$m(e){e._depthTexture=e._depthTexture&&!e._depthTexture.isDestroyed()&&e._depthTexture.destroy()}function g$f(e){e._frameBuffer=e._frameBuffer&&!e._frameBuffer.isDestroyed()&&e._frameBuffer.destroy()}function j$e(e,t){e._depthTexture=new P$S({context:t,width:e._upSampleWidth,height:e._upSampleHeight,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE})}function q$l(e,t){C$m(e),g$f(e),j$e(e,t),e._frameBuffer=new u$F({context:t,colorTextures:[e._depthTexture],destroyAttachments:!1})}function J$i(e,t){(!t$$(e._frameBuffer)||!t$$(e._depthTexture))&&q$l(e,t)}function K$d(e,t,i){if(!t$$(e._copyDepthCommand)){e._copyDepthCommand=t.createViewportQuadCommand("uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n gl_FragColor = czm_packDepth(texture2D(u_texture, v_textureCoordinates).r);\n}\n",{renderState:p$1a.fromCache({viewport:e._upSampleViewport}),uniformMap:{u_texture:function(){return e._textureToCopy}},owner:e})}e._textureToCopy=i,e._copyDepthCommand.framebuffer=e._frameBuffer,t$$(e._clearCommand)||(e._clearCommand=new r$M({color:new e$1z(0,0,0,1),stencil:0,depth:1,owner:e})),e._clearCommand.framebuffer=e._frameBuffer}function i$j(e){this._context=e,this._shaders={},this._numberOfShaders=0,this._shadersToRelease={}}function b$r(e){const t=Object.keys(e).sort();return JSON.stringify(e,t)}function v$n(e,t){for(var i=t.derivedKeywords,n=i.length,r=0;r<n;++r){var o=i[r]+t.keyword;v$n(e,e._shaders[o])}delete e._shaders[t.keyword],t.shaderProgram.finalDestroy()}function r$g(){this._textures={},this._numberOfTextures=0,this._texturesToRelease={}}function n$l(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this.color=t$$(e.color)?e$1z.clone(e.color):e$1z.WHITE,this.intensity=e$1Y(e.intensity,2)}function y$m(){this.globeDepthTexture=void 0,this.gamma=void 0,this._viewport=new n$13,this._viewportCartesian4=new a$10,this._viewportDirty=!1,this._viewportOrthographicMatrix=c$1a.clone(c$1a.IDENTITY),this._viewportTransformation=c$1a.clone(c$1a.IDENTITY),this._model=c$1a.clone(c$1a.IDENTITY),this._view=c$1a.clone(c$1a.IDENTITY),this._inverseView=c$1a.clone(c$1a.IDENTITY),this._projection=c$1a.clone(c$1a.IDENTITY),this._infiniteProjection=c$1a.clone(c$1a.IDENTITY),this._entireFrustum=new r$T,this._currentFrustum=new r$T,this._frustumPlanes=new a$10,this._frameState=void 0,this._temeToPseudoFixed=r$W.clone(c$1a.IDENTITY),this._view3DDirty=!0,this._view3D=new c$1a,this._inverseView3DDirty=!0,this._inverseView3D=new c$1a,this._inverseModelDirty=!0,this._inverseModel=new c$1a,this._inverseTransposeModelDirty=!0,this._inverseTransposeModel=new r$W,this._viewRotation=new r$W,this._inverseViewRotation=new r$W,this._viewRotation3D=new r$W,this._inverseViewRotation3D=new r$W,this._inverseProjectionDirty=!0,this._inverseProjection=new c$1a,this._modelViewDirty=!0,this._modelView=new c$1a,this._modelView3DDirty=!0,this._modelView3D=new c$1a,this._modelViewRelativeToEyeDirty=!0,this._modelViewRelativeToEye=new c$1a,this._inverseModelViewDirty=!0,this._inverseModelView=new c$1a,this._inverseModelView3DDirty=!0,this._inverseModelView3D=new c$1a,this._viewProjectionDirty=!0,this._viewProjection=new c$1a,this._inverseViewProjectionDirty=!0,this._inverseViewProjection=new c$1a,this._modelViewProjectionDirty=!0,this._modelViewProjection=new c$1a,this._inverseModelViewProjectionDirty=!0,this._inverseModelViewProjection=new c$1a,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewProjectionRelativeToEye=new c$1a,this._modelViewInfiniteProjectionDirty=!0,this._modelViewInfiniteProjection=new c$1a,this._mvpViewPortDirty=!0,this._mvpViewPort=new c$1a,this._normalDirty=!0,this._normal=new r$W,this._normal3DDirty=!0,this._normal3D=new r$W,this._inverseNormalDirty=!0,this._inverseNormal=new r$W,this._inverseNormal3DDirty=!0,this._inverseNormal3D=new r$W,this._encodedCameraPositionMCDirty=!0,this._encodedCameraPositionMC=new t$R,this._cameraPosition=new a$11,this._sunPositionWC=new a$11,this._sunPositionColumbusView=new a$11,this._sunDirectionWC=new a$11,this._sunDirectionEC=new a$11,this._sunColor=new a$11,this._moonDirectionEC=new a$11,this._lightDirectionWC=new a$11,this._lightDirectionEC=new a$11,this._lightColor=new a$11,this._lightColorHdr=new a$11,this._pass=void 0,this._mode=void 0,this._mapProjection=void 0,this._cameraDirection=new a$11,this._cameraRight=new a$11,this._cameraUp=new a$11,this._frustum2DWidth=0,this._eyeHeight2D=new r$T,this._resolutionScale=1,this._pixelRatio=1,this._orthographicIn3D=!1,this._backgroundColor=new e$1z,this._brdfLut=void 0,this._environmentMap=void 0,this._sphericalHarmonicCoefficients=void 0,this._specularEnvironmentMaps=void 0,this._specularEnvironmentMapsDimensions=new r$T,this._specularEnvironmentMapsMaximumLOD=void 0,this._fogDensity=void 0,this._invertClassificationColor=void 0,this._imagerySplitPosition=new r$T,this._globeSplitPosition=new r$T,this._pixelSizePerMeter=void 0,this._geometricToleranceOverMeter=void 0,this._minimumDisableDepthTestDistance=void 0,this._globeDepthTextureDim=new r$T,this._silverLightingAtmosphere=void 0,this._hdrEnvMap=void 0,this._toneMappingExposure=1}function B$g(e,t){c$1a.clone(t,e._view),c$1a.getRotation(t,e._viewRotation),e._view3DDirty=!0,e._inverseView3DDirty=!0,e._modelViewDirty=!0,e._modelView3DDirty=!0,e._modelViewRelativeToEyeDirty=!0,e._inverseModelViewDirty=!0,e._inverseModelView3DDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0,e._modelViewInfiniteProjectionDirty=!0,e._normalDirty=!0,e._inverseNormalDirty=!0,e._normal3DDirty=!0,e._inverseNormal3DDirty=!0,e._mvpViewPortDirty=!0}function A$s(e,t){c$1a.clone(t,e._inverseView),c$1a.getRotation(t,e._inverseViewRotation)}function Y$i(e){var t=e._frameState;if(t$$(t)&&t.TAAEnable&&"normal"===t._fboState.name){var i=e._projection;i[8]+=t.jitter.x,i[9]+=t.jitter.y}}function k$m(e,t){c$1a.clone(t,e._projection),Y$i(e),e._inverseProjectionDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0,e._mvpViewPortDirty=!0}function U$f(e,t){c$1a.clone(t,e._infiniteProjection),e._modelViewInfiniteProjectionDirty=!0}function G$l(e,t){a$11.clone(t.positionWC,e._cameraPosition),a$11.clone(t.directionWC,e._cameraDirection),a$11.clone(t.rightWC,e._cameraRight),a$11.clone(t.upWC,e._cameraUp),e._encodedCameraPositionMCDirty=!0}o$o.prototype.end=function(e,t,i){for(var n,r=e._context,o=r.drawingBufferWidth,a=r.drawingBufferHeight,s=this._upSampleWidth,l=this._upSampleHeight,u=Math.max(s,l),c=u*u,h=Math.floor(t/o*s),d=Math.floor(i/a*l),f=0,p=0,_=0,m=-1,$=this._frameBuffer,g=r.readPixels({x:0,y:0,width:s,height:l,framebuffer:$}),y=0,v=0;v<c;++v){if(-h<=f&&f<=h&&-d<=p&&p<=d){var x=4*((d-p)*s+f+h);if(n=a$10.unpack(g,x,U$g),a$10.divideByScalar(n,255,n),(y=a$10.dot(n,Y$j))>0&&y<1)break}if(f===p||f<0&&-f===p||f>0&&f===1-p){var b=_;_=-m,m=b}f+=_,p+=m}if(y>0&&y<1&&e._frustumCommandsList.length>0){var S=e._frustumCommandsList[0];e._context.uniformState.updateFrustum(S);var w=new r$T(t,i);return u$V.drawingBufferToWgs84Coordinates(e,w,y,new a$11)}},o$o.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)},o$o.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)},o$o.prototype.clear=function(e,t){this._clearCommand.execute(e,t)},o$o.prototype.update=function(e,t){J$i(this,e),K$d(this,e,t)},o$o.prototype.isDestroyed=function(){return!1},o$o.prototype.destroy=function(){return C$m(this),g$f(this),this._copyDepthCommand.shaderProgram=t$$(this._copyDepthCommand.shaderProgram)&&this._copyDepthCommand.shaderProgram.destroy(),s$1e(this)},Object.defineProperties(i$j.prototype,{numberOfShaders:{get:function(){return this._numberOfShaders}}}),i$j.prototype.replaceShaderProgram=function(e){return t$$(e.shaderProgram)&&e.shaderProgram.destroy(),this.getShaderProgram(e)},i$j.prototype.getShaderProgram=function(e){var t=e.vertexShaderSource,i=e.fragmentShaderSource,n=e.attributeLocations,r=e.varyings,o=e.bufferMode;"string"==typeof t&&(t=new a$O({sources:[t]})),"string"==typeof i&&(i=new a$O({sources:[i]}));const a=`${t.getCacheKey(this._context)}:${i.getCacheKey(this._context)}:${t$$(n)?b$r(n):""}`;var s;if(t$$(this._shaders[a]))s=this._shaders[a],delete this._shadersToRelease[a];else{var l=t.createCombinedVertexShader(this._context),u=i.createCombinedFragmentShader(this._context),c=this._context,h=new p$15({gl:c._gl,logShaderCompilation:c.logShaderCompilation,debugShaders:c.debugShaders,vertexShaderSource:t,vertexShaderText:l,fragmentShaderSource:i,fragmentShaderText:u,attributeLocations:n,varyings:r,bufferMode:o});s={cache:this,shaderProgram:h,keyword:a,derivedKeywords:[],count:0},h._cachedShader=s,this._shaders[a]=s,++this._numberOfShaders}return++s.count,s.shaderProgram},i$j.prototype.replaceDerivedShaderProgram=function(e,t,i){var n=e._cachedShader,r=t+n.keyword,o=this._shaders[r];if(t$$(o)){v$n(this,o);var a=n.derivedKeywords.indexOf(t);a>-1&&n.derivedKeywords.splice(a,1)}return this.createDerivedShaderProgram(e,t,i)},i$j.prototype.getDerivedShaderProgram=function(e,t){var i=t+e._cachedShader.keyword,n=this._shaders[i];if(t$$(n))return n.shaderProgram},i$j.prototype.createDerivedShaderProgram=function(e,t,i){var n=e._cachedShader,r=t+n.keyword,o=i.vertexShaderSource,a=i.fragmentShaderSource,s=i.attributeLocations,l=i.varyings,u=i.bufferMode;"string"==typeof o&&(o=new a$O({sources:[o]})),"string"==typeof a&&(a=new a$O({sources:[a]}));var c=this._context,h=o.createCombinedVertexShader(c),d=a.createCombinedFragmentShader(c),f=new p$15({gl:c._gl,logShaderCompilation:c.logShaderCompilation,debugShaders:c.debugShaders,vertexShaderSource:o,vertexShaderText:h,fragmentShaderSource:a,fragmentShaderText:d,attributeLocations:s,varyings:l,bufferMode:u}),p={cache:this,shaderProgram:f,keyword:r,derivedKeywords:[],count:0};return n.derivedKeywords.push(t),f._cachedShader=p,this._shaders[r]=p,f},i$j.prototype.destroyReleasedShaderPrograms=function(){var e=this._shadersToRelease;for(var t in e)if(e.hasOwnProperty(t)){v$n(this,e[t]),--this._numberOfShaders}this._shadersToRelease={}},i$j.prototype.releaseShaderProgram=function(e){if(t$$(e)){var t=e._cachedShader;t&&0==--t.count&&(this._shadersToRelease[t.keyword]=t)}},i$j.prototype.isDestroyed=function(){return!1},i$j.prototype.destroy=function(){var e=this._shaders;for(var t in e)e.hasOwnProperty(t)&&e[t].shaderProgram.finalDestroy();return s$1e(this)},Object.defineProperties(r$g.prototype,{numberOfTextures:{get:function(){return this._numberOfTextures}}}),r$g.prototype.getTexture=function(e){var t=this._textures[e];if(t$$(t))return delete this._texturesToRelease[e],++t.count,t.texture},r$g.prototype.addTexture=function(e,t){var i={texture:t,count:1};t.finalDestroy=t.destroy;var n=this;t.destroy=function(){0==--i.count&&(n._texturesToRelease[e]=i)},this._textures[e]=i,++this._numberOfTextures},r$g.prototype.destroyReleasedTextures=function(){var e=this._texturesToRelease;for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];delete this._textures[t],i.texture.finalDestroy(),--this._numberOfTextures}this._texturesToRelease={}},r$g.prototype.isDestroyed=function(){return!1},r$g.prototype.destroy=function(){var e=this._textures;for(var t in e)e.hasOwnProperty(t)&&e[t].texture.finalDestroy();return s$1e(this)},Object.defineProperties(y$m.prototype,{toneMappingExposure:{get:function(){return this._toneMappingExposure}},frameState:{get:function(){return this._frameState}},viewport:{get:function(){return this._viewport},set:function(e){if(!n$13.equals(e,this._viewport)){n$13.clone(e,this._viewport);var t=this._viewport,i=this._viewportCartesian4;i.x=t.x,i.y=t.y,i.z=t.width,i.w=t.height,this._viewportDirty=!0,this._mvpViewPortDirty=!0}}},viewportCartesian4:{get:function(){return this._viewportCartesian4}},viewportOrthographic:{get:function(){return O$h(this),this._viewportOrthographicMatrix}},viewportTransformation:{get:function(){return O$h(this),this._viewportTransformation}},model:{get:function(){return this._model},set:function(e){c$1a.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,this._mvpViewPortDirty=!0}},inverseModel:{get:function(){return this._inverseModelDirty&&(this._inverseModelDirty=!1,c$1a.inverse(this._model,this._inverseModel)),this._inverseModel}},inverseTransposeModel:{get:function(){var e=this._inverseTransposeModel;return this._inverseTransposeModelDirty&&(this._inverseTransposeModelDirty=!1,c$1a.getRotation(this.inverseModel,e),r$W.transpose(e,e)),e}},view:{get:function(){return this._view}},view3D:{get:function(){return x$o(this),this._view3D}},viewRotation:{get:function(){return x$o(this),this._viewRotation}},viewRotation3D:{get:function(){return x$o(this),this._viewRotation3D}},inverseView:{get:function(){return this._inverseView}},inverseView3D:{get:function(){return H$n(this),this._inverseView3D}},inverseViewRotation:{get:function(){return this._inverseViewRotation}},inverseViewRotation3D:{get:function(){return H$n(this),this._inverseViewRotation3D}},projection:{get:function(){return this._projection}},inverseProjection:{get:function(){return Q$g(this),this._inverseProjection}},infiniteProjection:{get:function(){return this._infiniteProjection}},modelView:{get:function(){return X$b(this),this._modelView}},modelView3D:{get:function(){return $$g(this),this._modelView3D}},modelViewRelativeToEye:{get:function(){return si$1(this),this._modelViewRelativeToEye}},inverseModelView:{get:function(){return ii$1(this),this._inverseModelView}},inverseModelView3D:{get:function(){return ti$1(this),this._inverseModelView3D}},viewProjection:{get:function(){return ei(this),this._viewProjection}},inverseViewProjection:{get:function(){return oi(this),this._inverseViewProjection}},modelViewProjection:{get:function(){return ni(this),this._modelViewProjection}},mvpViewPort:{get:function(){return ri(this),this._mvpViewPort}},inverseModelViewProjection:{get:function(){return hi$1(this),this._inverseModelViewProjection}},modelViewProjectionRelativeToEye:{get:function(){return li$1(this),this._modelViewProjectionRelativeToEye}},modelViewInfiniteProjection:{get:function(){return ai(this),this._modelViewInfiniteProjection}},normal:{get:function(){return _i$2(this),this._normal}},normal3D:{get:function(){return ui$1(this),this._normal3D}},inverseNormal:{get:function(){return ci$1(this),this._inverseNormal}},inverseNormal3D:{get:function(){return mi$1(this),this._inverseNormal3D}},entireFrustum:{get:function(){return this._entireFrustum}},currentFrustum:{get:function(){return this._currentFrustum}},frustumPlanes:{get:function(){return this._frustumPlanes}},farDepthFromNearPlusOne:{get:function(){return this._farDepthFromNearPlusOne}},log2FarDepthFromNearPlusOne:{get:function(){return this._log2FarDepthFromNearPlusOne}},oneOverLog2FarDepthFromNearPlusOne:{get:function(){return this._oneOverLog2FarDepthFromNearPlusOne}},eyeHeight2D:{get:function(){return this._eyeHeight2D}},sunPositionWC:{get:function(){return this._sunPositionWC}},sunPositionColumbusView:{get:function(){return this._sunPositionColumbusView}},sunDirectionWC:{get:function(){return this._sunDirectionWC}},sunDirectionEC:{get:function(){return this._sunDirectionEC}},sunColor:{get:function(){return this._sunColor}},moonDirectionEC:{get:function(){return this._moonDirectionEC}},lightDirectionWC:{get:function(){return this._lightDirectionWC}},lightDirectionEC:{get:function(){return this._lightDirectionEC}},lightColor:{get:function(){return this._lightColor}},lightColorHdr:{get:function(){return this._lightColorHdr}},encodedCameraPositionMCHigh:{get:function(){return W$g(this),this._encodedCameraPositionMC.high}},encodedCameraPositionMCLow:{get:function(){return W$g(this),this._encodedCameraPositionMC.low}},temeToPseudoFixedMatrix:{get:function(){return this._temeToPseudoFixed}},resolutionScale:{get:function(){return this._resolutionScale}},pixelRatio:{get:function(){return this._pixelRatio}},fogDensity:{get:function(){return this._fogDensity}},geometricToleranceOverMeter:{get:function(){return this._geometricToleranceOverMeter}},pass:{get:function(){return this._pass}},backgroundColor:{get:function(){return this._backgroundColor}},brdfLut:{get:function(){return this._brdfLut}},environmentMap:{get:function(){return this._environmentMap}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps}},specularEnvironmentMapsDimensions:{get:function(){return this._specularEnvironmentMapsDimensions}},specularEnvironmentMapsMaximumLOD:{get:function(){return this._specularEnvironmentMapsMaximumLOD}},imagerySplitPosition:{get:function(){return this._imagerySplitPosition}},globeSplitPosition:{get:function(){return this._globeSplitPosition}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance}},invertClassificationColor:{get:function(){return this._invertClassificationColor}},orthographicIn3D:{get:function(){return this._orthographicIn3D}},globeDepthTextureDim:{get:function(){return this._globeDepthTextureDim}},hdrEnvMap:{get:function(){return this._hdrEnvMap}}});var M$o=new r$W,q$k=new i$1g;function Z$h(e,t){t$$(m$13.computeIcrfToFixedMatrix(t.time,M$o))||(M$o=m$13.computeTemeToPseudoFixedMatrix(t.time,M$o));var i=x$M.computeSunPositionInEarthInertialFrame(t.time,e._sunPositionWC);r$W.multiplyByVector(M$o,i,i),a$11.normalize(i,e._sunDirectionWC),i=r$W.multiplyByVector(e.viewRotation3D,i,e._sunDirectionEC),a$11.normalize(i,i),i=x$M.computeMoonPositionInEarthInertialFrame(t.time,e._moonDirectionEC),r$W.multiplyByVector(M$o,i,i),r$W.multiplyByVector(e.viewRotation3D,i,i),a$11.normalize(i,i);var n=t.mapProjection,r=n.ellipsoid.cartesianToCartographic(e._sunPositionWC,q$k);n.project(r,e._sunPositionColumbusView)}y$m.prototype.updateCamera=function(e){B$g(this,e.viewMatrix),A$s(this,e.inverseViewMatrix),G$l(this,e),this._entireFrustum.x=e.frustum.near,this._entireFrustum.y=e.frustum.far,this.updateFrustum(e.frustum),this._orthographicIn3D=this._mode!==b$1d.SCENE2D&&e.frustum instanceof r$K},y$m.prototype.updateFrustum=function(e){k$m(this,e.projectionMatrix),t$$(e.infiniteProjectionMatrix)&&U$f(this,e.infiniteProjectionMatrix),this._currentFrustum.x=e.near,this._currentFrustum.y=e.far,this._farDepthFromNearPlusOne=e.far-e.near+1,this._log2FarDepthFromNearPlusOne=n$1d.log2(this._farDepthFromNearPlusOne),this._oneOverLog2FarDepthFromNearPlusOne=1/this._log2FarDepthFromNearPlusOne,t$$(e._offCenterFrustum)&&(e=e._offCenterFrustum),this._frustumPlanes.x=e.top,this._frustumPlanes.y=e.bottom,this._frustumPlanes.z=e.left,this._frustumPlanes.w=e.right},y$m.prototype.updatePass=function(e){this._pass=e},y$m.prototype.updateLightSource=function(e){if(t$$(e)){var t=e.pointLight.values,i=e.spotLight.values,n=e.directionalLight.values,r=e.hemisphereLight.values,o=e._visibleLightList[w$x.POINT],a=e._visibleLightList[w$x.SPOT];o.removeAll(),a.removeAll();var s,l,u,c,h,d=[];for(s=0,l=t.length;s<l;s++){(c=t[s]).sceneMode=this._frameState.mode,c$1a.multiplyByPoint(this._view,c.position,c._positionEC),(h=a$11.distance(this._frameState.camera.positionWC,c.position))<e.visibleDistanceMax&&d.push([h,c])}for(d.length>e._visibleCountAllowed&&(d.sort((function(e,t){return e[0]-t[0]})),d=d.slice(0,e._visibleCountAllowed)),u=0;u<d.length;u++)c=d[u][1],o.set(c.id,c);for(d=[],s=0,l=i.length;s<l;s++){(c=i[s]).sceneMode=this._frameState.mode,c$1a.multiplyByPoint(this._view,c.position,c._positionEC),r$W.multiplyByVector(this.viewRotation,c.direction,c._directionEC),a$11.normalize(c._directionEC,c._directionEC),h=a$11.distance(this._frameState.camera.positionWC,c.position),c.computeVisiblityInCullingVolume(this._frameState.cullingVolume)&&h<e.visibleDistanceMax&&d.push([h,c])}for(d.length>e._visibleCountAllowed&&(d.sort((function(e,t){return e[0]-t[0]})),d=d.slice(0,e._visibleCountAllowed)),u=0;u<d.length;u++)c=d[u][1],a.set(c.id,c);for(s=0,l=n.length;s<l;s++)(c=n[s]).sceneMode=this._frameState.mode,r$W.multiplyByVector(this.viewRotation,c.direction,c._directionEC),a$11.normalize(c._directionEC,c._directionEC);o.length!==e._visiblePointLightCount&&(e._changedLightList.set(w$x.POINT,{count:o.length,type:w$x.POINT}),e._visiblePointLightCount=o.length),a.length!==e._visibleSpotLightCount&&(e._changedLightList.set(w$x.SPOT,{count:a.length,type:w$x.SPOT}),e._visibleSpotLightCount=a.length),n.length!==e._visibleDirectionalLightCount&&(e._changedLightList.set(w$x.DIRECTIONAL,{count:n.length,type:w$x.DIRECTIONAL}),e._visibleDirectionalLightCount=n.length),r.length!==e._visibleHemisphereLightCount&&(e._changedLightList.set(w$x.HEMISPHERE,{count:r.length,type:w$x.HEMISPHERE}),e._visibleHemisphereLightCount=r.length),e.combineUniformValue()}};var J$h=[],K$c=new n$l;function O$h(e){if(e._viewportDirty){var t=e._viewport;c$1a.computeOrthographicOffCenter(t.x,t.x+t.width,t.y,t.y+t.height,0,1,e._viewportOrthographicMatrix),c$1a.computeViewportTransformation(t,0,1,e._viewportTransformation),e._viewportDirty=!1,e._mvpViewPortDirty=!0}}function Q$g(e){e._inverseProjectionDirty&&(e._inverseProjectionDirty=!1,e._mode===b$1d.SCENE2D||e._mode===b$1d.MORPHING||e._orthographicIn3D?c$1a.clone(c$1a.ZERO,e._inverseProjection):c$1a.inverse(e._projection,e._inverseProjection))}function X$b(e){e._modelViewDirty&&(e._modelViewDirty=!1,c$1a.multiplyTransformation(e._view,e._model,e._modelView))}function $$g(e){e._modelView3DDirty&&(e._modelView3DDirty=!1,c$1a.multiplyTransformation(e.view3D,e._model,e._modelView3D))}function ii$1(e){e._inverseModelViewDirty&&(e._inverseModelViewDirty=!1,c$1a.inverse(e.modelView,e._inverseModelView))}function ti$1(e){e._inverseModelView3DDirty&&(e._inverseModelView3DDirty=!1,c$1a.inverse(e.modelView3D,e._inverseModelView3D))}function ei(e){e._viewProjectionDirty&&(e._viewProjectionDirty=!1,c$1a.multiply(e._projection,e._view,e._viewProjection))}function oi(e){e._inverseViewProjectionDirty&&(e._inverseViewProjectionDirty=!1,c$1a.inverse(e.viewProjection,e._inverseViewProjection))}function ni(e){e._modelViewProjectionDirty&&(e._modelViewProjectionDirty=!1,c$1a.multiply(e._projection,e.modelView,e._modelViewProjection),e._mvpViewPortDirty=!0)}function ri(e){e._mvpViewPortDirty&&(c$1a.multiply(e.viewportTransformation,e.modelViewProjection,e._mvpViewPort),e._mvpViewPortDirty=!1)}function si$1(e){if(e._modelViewRelativeToEyeDirty){e._modelViewRelativeToEyeDirty=!1;var t=e.modelView,i=e._modelViewRelativeToEye;i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[4]=t[4],i[5]=t[5],i[6]=t[6],i[7]=t[7],i[8]=t[8],i[9]=t[9],i[10]=t[10],i[11]=t[11],i[12]=0,i[13]=0,i[14]=0,i[15]=t[15]}}function hi$1(e){e._inverseModelViewProjectionDirty&&(e._inverseModelViewProjectionDirty=!1,c$1a.inverse(e.modelViewProjection,e._inverseModelViewProjection))}function li$1(e){e._modelViewProjectionRelativeToEyeDirty&&(e._modelViewProjectionRelativeToEyeDirty=!1,c$1a.multiply(e._projection,e.modelViewRelativeToEye,e._modelViewProjectionRelativeToEye))}function ai(e){e._modelViewInfiniteProjectionDirty&&(e._modelViewInfiniteProjectionDirty=!1,c$1a.multiply(e._infiniteProjection,e.modelView,e._modelViewInfiniteProjection))}function _i$2(e){if(e._normalDirty){e._normalDirty=!1;var t=e._normal;c$1a.getRotation(e.inverseModelView,t),r$W.transpose(t,t)}}function ui$1(e){if(e._normal3DDirty){e._normal3DDirty=!1;var t=e._normal3D;c$1a.getRotation(e.inverseModelView3D,t),r$W.transpose(t,t)}}function ci$1(e){e._inverseNormalDirty&&(e._inverseNormalDirty=!1,c$1a.getRotation(e.inverseModelView,e._inverseNormal))}function mi$1(e){e._inverseNormal3DDirty&&(e._inverseNormal3DDirty=!1,c$1a.getRotation(e.inverseModelView3D,e._inverseNormal3D))}y$m.prototype.update=function(e){this._mode=e.mode,this._mapProjection=e.mapProjection,e.context._canvas,this._resolutionScale=e.pixelRatio,this._pixelRatio=e.pixelRatio;var t=e.camera;this.updateCamera(t),e.mode===b$1d.SCENE2D?(this._frustum2DWidth=t.frustum.right-t.frustum.left,this._eyeHeight2D.x=.5*this._frustum2DWidth,this._eyeHeight2D.y=this._eyeHeight2D.x*this._eyeHeight2D.x):(this._frustum2DWidth=0,this._eyeHeight2D.x=0,this._eyeHeight2D.y=0),Z$h(this,e);var i=e$1Y(e.light,K$c);i instanceof n$l?(this._lightDirectionWC=a$11.clone(this._sunDirectionWC,this._lightDirectionWC),this._lightDirectionEC=a$11.clone(this._sunDirectionEC,this._lightDirectionEC)):(this._lightDirectionWC=a$11.normalize(a$11.negate(i.direction,this._lightDirectionWC),this._lightDirectionWC),this._lightDirectionEC=r$W.multiplyByVector(this.viewRotation3D,this._lightDirectionWC,this._lightDirectionEC));var n=i.color,r=a$11.fromElements(n.red,n.green,n.blue,this._lightColorHdr);r=a$11.multiplyByScalar(r,i.intensity,r);var o=a$11.maximumComponent(r);o>1?a$11.divideByScalar(r,o,this._lightColor):a$11.clone(r,this._lightColor),this._sunColor=a$11.clone(e.sunColor,this._sunColor);var a=e.brdfLutGenerator;t$$(a)&&a.update(e);var s=t$$(a)?a.colorTexture:void 0;this._brdfLut=s,this._environmentMap=e$1Y(e.environmentMap,e.context.defaultCubeMap),this._sphericalHarmonicCoefficients=e$1Y(e.sphericalHarmonicCoefficients,J$h),this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._specularEnvironmentMapsMaximumLOD=e.specularEnvironmentMapsMaximumLOD,this._hdrEnvMap=e.hdrEnvMap,this._toneMappingExposure=e.toneMappingExposure,t$$(this._specularEnvironmentMaps)&&r$T.clone(this._specularEnvironmentMaps.dimensions,this._specularEnvironmentMapsDimensions),this._fogDensity=e.fog.density,this._invertClassificationColor=e.invertClassificationColor,this._frameState=e,this._temeToPseudoFixed=m$13.computeTemeToPseudoFixedMatrix(e.time,this._temeToPseudoFixed),this._imagerySplitPosition.x=e.imagerySplitPosition.x*e.context.drawingBufferWidth,this._imagerySplitPosition.y=e.imagerySplitPosition.y*e.context.drawingBufferHeight,this._globeSplitPosition.x=e.globeSplitPosition.x*e.context.drawingBufferWidth,this._globeSplitPosition.y=e.globeSplitPosition.y*e.context.drawingBufferHeight;var l,u=t.frustum.fov,c=this._viewport;l=c.height>c.width?2*Math.tan(.5*u)/c.height:2*Math.tan(.5*u)/c.width,this._geometricToleranceOverMeter=l*e.maximumScreenSpaceError,e$1z.clone(e.backgroundColor,this._backgroundColor),this._minimumDisableDepthTestDistance=e.minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance*=this._minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance===Number.POSITIVE_INFINITY&&(this._minimumDisableDepthTestDistance=-1),this.updateLightSource(e.lightSource),t$$(this.globeDepthTexture)&&(this._globeDepthTextureDim.x=this.globeDepthTexture.width,this._globeDepthTextureDim.y=this.globeDepthTexture.height)};var L$l=new a$11;function W$g(e){e._encodedCameraPositionMCDirty&&(e._encodedCameraPositionMCDirty=!1,c$1a.multiplyByPoint(e.inverseModel,e._cameraPosition,L$l),t$R.fromCartesian(L$l,e._encodedCameraPositionMC))}var vi$2=new a$11,Di$2=new a$11,pi$2=new a$11,wi$2=new a$11,di$1=new i$1g,fi$2=new a$11,gi$2=new c$1a;function yi$2(e,t,i,n,r,o,a,s){var l=vi$2;l.x=e.y,l.y=e.z,l.z=e.x;var u=Di$2;u.x=i.y,u.y=i.z,u.z=i.x;var c=pi$2;c.x=n.y,c.y=n.z,c.z=n.x;var h=wi$2;h.x=t.y,h.y=t.z,h.z=t.x,o===b$1d.SCENE2D&&(l.z=.5*r);var d=a.unproject(l,di$1);d.longitude=n$1d.clamp(d.longitude,-Math.PI,Math.PI),d.latitude=n$1d.clamp(d.latitude,-n$1d.PI_OVER_TWO,n$1d.PI_OVER_TWO);var f=a.ellipsoid,p=f.cartographicToCartesian(d,fi$2),_=m$13.eastNorthUpToFixedFrame(p,f,gi$2);return c$1a.multiplyByPointAsVector(_,u,u),c$1a.multiplyByPointAsVector(_,c,c),c$1a.multiplyByPointAsVector(_,h,h),t$$(s)||(s=new c$1a),s[0]=u.x,s[1]=c.x,s[2]=-h.x,s[3]=0,s[4]=u.y,s[5]=c.y,s[6]=-h.y,s[7]=0,s[8]=u.z,s[9]=c.z,s[10]=-h.z,s[11]=0,s[12]=-a$11.dot(u,p),s[13]=-a$11.dot(c,p),s[14]=a$11.dot(h,p),s[15]=1,s}function x$o(e){e._view3DDirty&&(e._mode===b$1d.SCENE3D?c$1a.clone(e._view,e._view3D):yi$2(e._cameraPosition,e._cameraDirection,e._cameraRight,e._cameraUp,e._frustum2DWidth,e._mode,e._mapProjection,e._view3D),c$1a.getRotation(e._view3D,e._viewRotation3D),e._view3DDirty=!1)}function H$n(e){e._inverseView3DDirty&&(c$1a.inverseTransformation(e.view3D,e._inverseView3D),c$1a.getRotation(e._inverseView3D,e._inverseViewRotation3D),e._inverseView3DDirty=!1)}function i$i(e){if(this._renderTexture=new h$p(e),this._context=e,this.waterNormalMapUrl=o$12("Assets/Textures/waterNormalsSmall.jpg"),this._waterNormalMapUrl=void 0,this._waterNormalMap=void 0,this._reflectPlane=new n$17(a$11.UNIT_Z,6378137),this._isUpdate=!0,this._environmentVisible={isSunVisible:!0,isMoonVisible:!0,isSkyAtmosphereVisible:!0,isSkyBoxVisible:!0,isGlobalVisible:!1,isObjectVisible:!0},this.waterNormalMapUrl!==this._waterNormalMapUrl){var t=this.waterNormalMapUrl;if(this._waterNormalMapUrl=t,t$$(t)){var i=this;c$18(n$S(t),(function(n){if(t===i.waterNormalMapUrl){var r=new a$Q({wrapS:j$13.REPEAT,wrapT:j$13.REPEAT});i._waterNormalMap=i._waterNormalMap&&i._waterNormalMap.destroy(),i._waterNormalMap=new P$S({context:e,source:n,sampler:r})}}))}else this._waterNormalMap=this._waterNormalMap&&this._waterNormalMap.destroy()}}function r$f(e){this._renderTexture=new h$p(e),this._renderTexture._pixelDatatype=v$Z.UNSIGNED_BYTE,this._context=e,this._isUpdate=!1,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0,isBillboardVisible:!1,isOnlyS3MObjectVisible:!0}}function t$d(e){this._renderTexture=new h$p(e),this._renderTexture._pixelDatatype=v$Z.FLOAT,this._context=e,this._isUpdate=!1,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0}}function t$c(e){this._renderTexture=new h$p(e),this._renderTexture._passState.blendingEnabled=!1,this._context=e,this._isUpdate=!1,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0,isBillboardVisible:!1,isOnlyS3MObjectVisible:!0}}function Ne$5(e,t){var i="WebGL Error: ";switch(t){case e.INVALID_ENUM:i+="INVALID_ENUM";break;case e.INVALID_VALUE:i+="INVALID_VALUE";break;case e.INVALID_OPERATION:i+="INVALID_OPERATION";break;case e.OUT_OF_MEMORY:i+="OUT_OF_MEMORY";break;case e.CONTEXT_LOST_WEBGL:i+="CONTEXT_LOST_WEBGL lost";break;default:i+="Unknown ("+t+")"}return i}function Ue$4(e,t,i,n){for(var r=Ne$5(e,n)+": "+t.name+"(",o=0;o<i.length;++o)0!==o&&(r+=", "),r+=i[o];return r+=");"}function Ve$7(e,t,i){var n=e.getError();if(n!==e.NO_ERROR)throw new t$Z(Ue$4(e,t,i,n))}function We$4(e,t,i){return{get:function(){var n=e[t];return i(e,"get: "+t,n),e[t]},set:function(n){e[t]=n,i(e,"set: "+t,n)}}}function Xe$2(e,t){if(!t$$(t))return e;function i(i){return function(){var n=i.apply(e,arguments);return t(e,i,arguments),n}}var n={};for(var r in e){var o=e[r];o instanceof Function?n[r]=i(o):Object.defineProperty(n,r,We$4(e,r,t))}return n}function m$o(e,t){for(var i=t.length,n=0;n<i;++n){var r=e.getExtension(t[n]);if(r)return r}}function ke$4(e,t,i,n){var r=e,o=t;(r>i||o>n)&&(r/i>o/n?(r=i,o=t/e*i):(r=e/t*n,o=n));return{width:r,height:o}}Object.defineProperties(i$i.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},frameBufferType:{get:function(){return B$y.REFLECT}}}),i$i.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=e.camera,n=t.drawingBufferWidth,r=t.drawingBufferHeight,o=this._reflectPlane;return this._renderTexture._passState.viewport.width=n,this._renderTexture._passState.viewport.height=r,i.enableReflection(o),this._oriUseLogDepth=e.useLogDepth,e.useLogDepth=!1,this._renderTexture._passState},i$i.prototype.end=function(e){e.camera.disableReflection(),e.useLogDepth=this._oriUseLogDepth},i$i.prototype.update=function(e,t){},i$i.prototype.isDestroyed=function(){return!1},i$i.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),s$1e(this)},Object.defineProperties(r$f.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},useType:{get:function(){return 8},set:function(e){}},frameBufferType:{get:function(){return B$y.NORMAL_AND_DEPTH}}}),r$f.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this._renderTexture._passState},r$f.prototype.end=function(e){var t=this._context.readPixels({x:e.x,y:e.y,width:e.width,height:e.height,framebuffer:this._renderTexture._fb}),i=new a$10(t[0]/255,t[1]/255,t[2]/255,t[3]/255);if(0!==i.w){var n=a$11.divideByScalar(i,i.w,new a$11);return a$11.subtract(a$11.multiplyByScalar(n,2,new a$11),new a$11(1,1,1),n),a$11.normalize(n,n),n}},r$f.prototype.update=function(e,t){},r$f.prototype.isDestroyed=function(){return!1},r$f.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),s$1e(this)},Object.defineProperties(t$d.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},useType:{get:function(){return 16},set:function(e){}},frameBufferType:{get:function(){return B$y.POSTEFFECT_FILTER}}}),t$d.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this._renderTexture._passState},t$d.prototype.end=function(e){},t$d.prototype.update=function(e,t){},t$d.prototype.isDestroyed=function(){return!1},t$d.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),s$1e(this)},Object.defineProperties(t$c.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},frameBufferType:{get:function(){return B$y.PICKRECT}}}),t$c.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this.beginFunc&&this.beginFunc.call(this),this._renderTexture._passState},t$c.prototype.end=function(e){},t$c.prototype.update=function(e,t){},t$c.prototype.isDestroyed=function(){return!1},t$c.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),s$1e(this)};var He$4=1073741824;function d$k(e,t){if(typeof WebGLRenderingContext>"u")throw new t$Z("The browser does not support WebGL. Visit http://get.webgl.org.");n$1e.defined("canvas",e),this._canvas=e;var i=t&&t.monitorTable||{};this._rows=i.rows||1,this._cols=i.cols||1,this._curRow=i.curRow||0,this._curCol=i.curCol||0;var n=e.width*this._cols,r=e.height*this._rows,o=3840,a=1080;t$$(t)&&(o=e$1Y(t.maxDrawingBufferWidth,o),a=e$1Y(t.maxDrawingBufferHeight,a));var s=ke$4(n,r,o,a);n=s.width,r=s.height,e.maxWidth=o,e.maxHeight=a,e.width=300,e.height=150,(t=e$1Y(t=e$1W(t,!0),{})).allowTextureFilterAnisotropic=e$1Y(t.allowTextureFilterAnisotropic,!0);var l=e$1Y(t.webgl,{});l.alpha=e$1Y(l.alpha,!1),l.stencil=e$1Y(l.stencil,!0);var u,c=e$1Y(t.requestWebgl2,!1)&&typeof WebGL2RenderingContext<"u",h=!1,d=t.getWebGLStub;if(t$$(d))u=d(e,l);else if(c&&(t$$(u=e.getContext("webgl2",l)||e.getContext("experimental-webgl2",l)||void 0)&&(h=!0)),t$$(u)||(u=e.getContext("webgl",l)||e.getContext("experimental-webgl",l)||void 0),!t$$(u))throw new t$Z("The browser supports WebGL, but initialization failed.");this.webglOptions=l,e.width=n,e.height=r,this._originalGLContext=u,this._gl=u,this._webgl2=h,this._id=t$U(),this.validateFramebuffer=!1,this.validateShaderProgram=!1,this.logShaderCompilation=!1,this._throwOnWebGLError=!1,this._shaderCache=new i$j(this),this._textureCache=new r$g;var f=u;this._stencilBits=f.getParameter(f.STENCIL_BITS),e$1y._maximumCombinedTextureImageUnits=f.getParameter(f.MAX_COMBINED_TEXTURE_IMAGE_UNITS),e$1y._maximumCubeMapSize=f.getParameter(f.MAX_CUBE_MAP_TEXTURE_SIZE),e$1y._maximumFragmentUniformVectors=f.getParameter(f.MAX_FRAGMENT_UNIFORM_VECTORS),e$1y._maximumTextureImageUnits=f.getParameter(f.MAX_TEXTURE_IMAGE_UNITS),e$1y._maximumRenderbufferSize=f.getParameter(f.MAX_RENDERBUFFER_SIZE),e$1y._maximumTextureSize=f.getParameter(f.MAX_TEXTURE_SIZE),e$1y._maximumVaryingVectors=f.getParameter(f.MAX_VARYING_VECTORS),e$1y._maximumVertexAttributes=f.getParameter(f.MAX_VERTEX_ATTRIBS),e$1y._maximumVertexTextureImageUnits=f.getParameter(f.MAX_VERTEX_TEXTURE_IMAGE_UNITS),e$1y._maximumVertexUniformVectors=f.getParameter(f.MAX_VERTEX_UNIFORM_VECTORS);var p=f.getParameter(f.ALIASED_LINE_WIDTH_RANGE);e$1y._minimumAliasedLineWidth=p[0],e$1y._maximumAliasedLineWidth=p[1];var _=f.getParameter(f.ALIASED_POINT_SIZE_RANGE);e$1y._minimumAliasedPointSize=_[0],e$1y._maximumAliasedPointSize=_[1];var m=f.getParameter(f.MAX_VIEWPORT_DIMS);e$1y._maximumViewportWidth=m[0],e$1y._maximumViewportHeight=m[1];var $=f.getShaderPrecisionFormat(f.FRAGMENT_SHADER,f.HIGH_FLOAT);e$1y._highpFloatSupported=0!==$.precision;var g=f.getShaderPrecisionFormat(f.FRAGMENT_SHADER,f.HIGH_INT);e$1y._highpIntSupported=0!==g.rangeMax,h&&(e$1y._uniformBufferOffsetAlignment=f.getParameter(f.UNIFORM_BUFFER_OFFSET_ALIGNMENT),e$1y._maxUniformBufferBinding=f.getParameter(f.MAX_UNIFORM_BUFFER_BINDINGS),e$1y._maxArrayTextureLayers=f.getParameter(f.MAX_ARRAY_TEXTURE_LAYERS)),this._antialias=f.getContextAttributes().antialias,this._standardDerivatives=h||!!m$o(f,["OES_standard_derivatives"]),this._blendMinmax=!!m$o(f,["EXT_blend_minmax"]),this._elementIndexUint=!!m$o(f,["OES_element_index_uint"]),this._depthTexture=!!m$o(f,["WEBGL_depth_texture","WEBKIT_WEBGL_depth_texture"]),this._fragDepth=h||!!m$o(f,["EXT_frag_depth"]),this._debugShaders=m$o(f,["WEBGL_debug_shaders"]);var y=m$o(f,["EXT_shader_texture_lod"]);this._textureFloat=!!m$o(f,["OES_texture_float"]),this._textureHalfFloat=!!m$o(f,["OES_texture_half_float"]),this._textureFloatLinear=!!m$o(f,["OES_texture_float_linear"]),this._textureHalfFloatLinear=!!m$o(f,["OES_texture_half_float_linear"]),this._sysShaderDefines=[],t$$(this._standardDerivatives)&&this._standardDerivatives&&this._sysShaderDefines.push("GL_OES_standard_derivatives"),t$$(this._fragDepth)&&this._fragDepth&&this._sysShaderDefines.push("GL_EXT_frag_depth"),t$$(y)&&this._sysShaderDefines.push("GL_EXT_shader_texture_lod"),h&&this._sysShaderDefines.push("WEBEL2"),this._colorBufferFloat=!!m$o(f,["EXT_color_buffer_float","WEBGL_color_buffer_float"]),this._floatBlend=!!m$o(f,["EXT_float_blend"]),this._colorBufferHalfFloat=!!m$o(f,["EXT_color_buffer_half_float"]),this._s3tc=!!m$o(f,["WEBGL_compressed_texture_s3tc","MOZ_WEBGL_compressed_texture_s3tc","WEBKIT_WEBGL_compressed_texture_s3tc"]),this._pvrtc=!!m$o(f,["WEBGL_compressed_texture_pvrtc","WEBKIT_WEBGL_compressed_texture_pvrtc"]),this._etc1=!!m$o(f,["WEBGL_compressed_texture_etc1"]),this._astc=!!m$o(f,["WEBGL_compressed_texture_astc"]),this._etc=!!m$o(f,["WEBG_compressed_texture_etc"]),this._bc7=!!m$o(f,["EXT_texture_compression_bptc"]),i$T.setKTX2SupportedFormats(this._s3tc,this._pvrtc,this._astc,this._etc,this._etc1,this._bc7);var v,x,b,S,w,C,T,P,E,A,L=t.allowTextureFilterAnisotropic?m$o(f,["EXT_texture_filter_anisotropic","WEBKIT_EXT_texture_filter_anisotropic"]):void 0;if(this._textureFilterAnisotropic=L,e$1y._maximumTextureFilterAnisotropy=t$$(L)?f.getParameter(L.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1,h){var M=this;v=function(){return M._gl.createVertexArray()},x=function(e){M._gl.bindVertexArray(e)},b=function(e){M._gl.deleteVertexArray(e)},S=function(e,t,i,n,r){f.drawElementsInstanced(e,t,i,n,r)},w=function(e,t,i,n){f.drawArraysInstanced(e,t,i,n)},C=function(e,t){f.vertexAttribDivisor(e,t)},T=function(e){f.drawBuffers(e)}}else t$$(P=m$o(f,["OES_vertex_array_object"]))&&(v=function(){return P.createVertexArrayOES()},x=function(e){P.bindVertexArrayOES(e)},b=function(e){P.deleteVertexArrayOES(e)}),t$$(E=m$o(f,["ANGLE_instanced_arrays"]))&&(S=function(e,t,i,n,r){E.drawElementsInstancedANGLE(e,t,i,n,r)},w=function(e,t,i,n){E.drawArraysInstancedANGLE(e,t,i,n)},C=function(e,t){E.vertexAttribDivisorANGLE(e,t)}),t$$(A=m$o(f,["WEBGL_draw_buffers"]))&&(T=function(e){A.drawBuffersWEBGL(e)});this.glCreateVertexArray=v,this.glBindVertexArray=x,this.glDeleteVertexArray=b,this.glDrawElementsInstanced=S,this.glDrawArraysInstanced=w,this.glVertexAttribDivisor=C,this.glDrawBuffers=T,this._vertexArrayObject=!!P,this._instancedArrays=!!E,this._drawBuffers=!!A,e$1y._maximumDrawBuffers=this.drawBuffers?f.getParameter(de$x.MAX_DRAW_BUFFERS):1,e$1y._maximumColorAttachments=this.drawBuffers?f.getParameter(de$x.MAX_COLOR_ATTACHMENTS):1,e$1y._maximumSamples=this._webgl2?f.getParameter(f.MAX_SAMPLES):1,this._clearColor=new e$1z(0,0,0,0),this._clearDepth=1,this._clearStencil=0;var I=new y$m,O=new t$l(this),D=p$1a.fromCache();this._defaultPassState=O,this._defaultRenderState=D,this._defaultTexture=void 0,this._defaultCubeMap=void 0,this._defaultTransparentTexture=void 0,this._us=I,this._currentRenderState=D,this._currentPassState=O,this._currentViewport=void 0,this._currentFramebuffer=void 0,this._maxFrameTextureUnitIndex=0,this._vertexAttribDivisors=[],this._previousDrawInstanced=!1;for(var R=0;R<e$1y._maximumVertexAttributes;R++)this._vertexAttribDivisors.push(0);this._pickObjects={},this._nextPickColor=new Uint32Array(1),this.options=t,this.cache={},this._pickPosition=new Float64Array(3),this._pickPositionHeight=0,this.pixels=new Uint8Array(4),this.shaderPreprocess=!0,this.numNormalAndDepthObject=0,this.numPostEffectFilterObject=0,this.numClampClipPlaneLayer=0,p$1a.apply(f,D,O);var N=e$1Y(t.fsaaLevel,1);N=Math.max(1,N),this.ssaaLevel=Math.sqrt(N),this.msaaLevel=1,this._webgl2&&(this.msaaLevel=e$1Y(t.msaaLevel,1),this.msaaLevel=Math.min(this.msaaLevel,e$1y._maximumSamples)),this._floatTexSixPlaces=t$f(this),this._sharedEDL=this.createSharedEDLFrameBuffer();const F=f.getExtension("WEBGL_debug_renderer_info");if(F){var B=f.getParameter(F.UNMASKED_RENDERER_WEBGL);oo$1._autoSetMaxMemory(B)}this.memorySize=0,this.memoryThreshold=4,this.currentWarnFrameNumber=-99999}var je$5={},Y$h;function Ye$5(e){if(e.validateFramebuffer){var t=e._gl,i=t.checkFramebufferStatus(t.FRAMEBUFFER);if(i!==t.FRAMEBUFFER_COMPLETE){var n;switch(i){case t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:n="Framebuffer is not complete. Incomplete attachment: at least one attachment point with a renderbuffer or texture attached has its attached object no longer in existence or has an attached image with a width or height of zero, or the color attachment point has a non-color-renderable image attached, or the depth attachment point has a non-depth-renderable image attached, or the stencil attachment point has a non-stencil-renderable image attached. Color-renderable formats include GL_RGBA4, GL_RGB5_A1, and GL_RGB565. GL_DEPTH_COMPONENT16 is the only depth-renderable format. GL_STENCIL_INDEX8 is the only stencil-renderable format.";break;case t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:n="Framebuffer is not complete. Incomplete dimensions: not all attached images have the same width and height.";break;case t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:n="Framebuffer is not complete. Missing attachment: no images are attached to the framebuffer.";break;case t.FRAMEBUFFER_UNSUPPORTED:n="Framebuffer is not complete. Unsupported: the combination of internal formats of the attached images violates an implementation-dependent set of restrictions."}throw new t$_(n)}}}function ae$a(e,t,i,n){var r=e._currentRenderState,o=e._currentPassState,a=e._currentViewport;e._currentRenderState=t,e._currentPassState=i,e._currentViewport=i.viewport,p$1a.partialApply(e._gl,r,t,o,i,a,i.viewport,n)}function q$j(e,t){if(t!==e._currentFramebuffer){e._currentFramebuffer=t;var i=Y$h;if(t$$(t))t._bind(),Ye$5(e),i=t._getActiveColorAttachments();else{var n=e._gl;n.bindFramebuffer(n.FRAMEBUFFER,null)}e.drawBuffers&&e.glDrawBuffers(i)}}Object.defineProperties(d$k.prototype,{id:{get:function(){return this._id}},webgl2:{get:function(){return this._webgl2}},canvas:{get:function(){return this._canvas}},shaderCache:{get:function(){return this._shaderCache}},textureCache:{get:function(){return this._textureCache}},uniformState:{get:function(){return this._us}},stencilBits:{get:function(){return this._stencilBits}},stencilBuffer:{get:function(){return this._stencilBits>=8}},antialias:{get:function(){return this._antialias}},standardDerivatives:{get:function(){return this._standardDerivatives||this._webgl2}},floatBlend:{get:function(){return this._floatBlend}},blendMinmax:{get:function(){return this._blendMinmax||this._webgl2}},elementIndexUint:{get:function(){return this._elementIndexUint||this._webgl2}},depthTexture:{get:function(){return this._depthTexture||this._webgl2}},floatingPointTexture:{get:function(){return this._webgl2||this._textureFloat}},floatTextureSixPlaces:{get:function(){return this._floatTexSixPlaces}},halfFloatingPointTexture:{get:function(){return this._webgl2||this._textureHalfFloat}},textureFloatLinear:{get:function(){return this._textureFloatLinear}},textureHalfFloatLinear:{get:function(){return this._webgl2&&this._textureFloatLinear||!this._webgl2&&this._textureHalfFloatLinear}},textureFilterAnisotropic:{get:function(){return!!this._textureFilterAnisotropic}},s3tc:{get:function(){return this._s3tc}},pvrtc:{get:function(){return this._pvrtc}},etc1:{get:function(){return this._etc1}},vertexArrayObject:{get:function(){return this._vertexArrayObject||this._webgl2}},fragmentDepth:{get:function(){return this._fragDepth||this._webgl2}},instancedArrays:{get:function(){return this._instancedArrays||this._webgl2}},colorBufferFloat:{get:function(){return this._colorBufferFloat}},colorBufferHalfFloat:{get:function(){return this._webgl2&&this._colorBufferFloat||!this._webgl2&&this._colorBufferHalfFloat}},drawBuffers:{get:function(){return this._drawBuffers||this._webgl2}},debugShaders:{get:function(){return this._debugShaders}},throwOnWebGLError:{get:function(){return this._throwOnWebGLError},set:function(e){this._throwOnWebGLError=e,this._gl=Xe$2(this._originalGLContext,e?Ve$7:void 0)}},defaultTexture:{get:function(){return void 0===this._defaultTexture&&(this._defaultTexture=new P$S({context:this,source:{width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])},flipY:!1})),this._defaultTexture}},defaultTransparentTexture:{get:function(){return void 0===this._defaultTransparentTexture&&(this._defaultTransparentTexture=new P$S({context:this,source:{width:1,height:1,arrayBufferView:new Uint8Array([0,0,0,0])},flipY:!1})),this._defaultTransparentTexture}},defaultCubeMap:{get:function(){if(void 0===this._defaultCubeMap){var e={width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])};this._defaultCubeMap=new X$y({context:this,source:{positiveX:e,negativeX:e,positiveY:e,negativeY:e,positiveZ:e,negativeZ:e},flipY:!1})}return this._defaultCubeMap}},drawingBufferHeight:{get:function(){return Math.floor(this._gl.drawingBufferHeight*this.ssaaLevel)}},drawingBufferWidth:{get:function(){return Math.floor(this._gl.drawingBufferWidth*this.ssaaLevel)}},realDrawingBufferHeight:{get:function(){return this._gl.drawingBufferHeight*this._rows}},realDrawingBufferWidth:{get:function(){return this._gl.drawingBufferWidth*this._cols}},defaultFramebuffer:{get:function(){return je$5}},memoryThresholdValue:{get:function(){return this.memoryThreshold*He$4}}}),typeof WebGLRenderingContext<"u"&&(Y$h=[de$x.BACK]);var qe$5=new r$M;function ze$5(e,t,i,n,r){if(t$$(t)&&r.depthTest&&r.depthTest.enabled&&!t.hasDepthAttachment)throw new t$_("The depth test can not be enabled (drawCommand.renderState.depthTest.enabled) because the framebuffer (drawCommand.framebuffer) does not have a depth or depth-stencil renderbuffer.");q$j(e,t),ae$a(e,r,i,!1),n._bind(),e._maxFrameTextureUnitIndex=Math.max(e._maxFrameTextureUnitIndex,n.maximumTextureUnitIndex)}function Qe$5(e,t,i,n){var r=t._primitiveType,o=t._vertexArray,a=t._offset,s=t._count,l=t.instanceCount;if(!H$11.validate(r))throw new t$_("drawCommand.primitiveType is required and must be valid.");if(n$1e.defined("drawCommand.vertexArray",o),n$1e.typeOf.number.greaterThanOrEquals("drawCommand.offset",a,0),t$$(s)&&n$1e.typeOf.number.greaterThanOrEquals("drawCommand.count",s,0),n$1e.typeOf.number.greaterThanOrEquals("drawCommand.instanceCount",l,0),l>0&&!e.instancedArrays)throw new t$_("Instanced arrays extension is not supported");e._us.model=e$1Y(t._modelMatrix,c$1a.IDENTITY),i._setUniforms(n,e._us,e.validateShaderProgram),o._bind();var u=o.indexBuffer;t$$(u)?(a*=u.bytesPerIndex,s=e$1Y(s,u.numberOfIndices),e._trangleCount+=s/3,0===l?e._gl.drawElements(r,s,u.indexDatatype,a):e.glDrawElementsInstanced(r,s,u.indexDatatype,a,l)):(s=e$1Y(s,o.numberOfVertices),0===l?e._gl.drawArrays(r,a,s):e.glDrawArraysInstanced(r,a,s,l)),o._unBind()}d$k.prototype.clear=function(e,t){e=e$1Y(e,qe$5),t=e$1Y(t,this._defaultPassState);var i=this._gl,n=0,r=e.color,o=e.depth,a=e.stencil;t$$(r)&&(e$1z.equals(this._clearColor,r)||(e$1z.clone(r,this._clearColor),i.clearColor(r.red,r.green,r.blue,r.alpha)),n|=i.COLOR_BUFFER_BIT),t$$(o)&&(o!==this._clearDepth&&(this._clearDepth=o,i.clearDepth(o)),n|=i.DEPTH_BUFFER_BIT),t$$(a)&&(a!==this._clearStencil&&(this._clearStencil=a,i.clearStencil(a)),n|=i.STENCIL_BUFFER_BIT),ae$a(this,e$1Y(e.renderState,this._defaultRenderState),t,!0),q$j(this,e$1Y(e.framebuffer,t.framebuffer)),i.clear(n)},d$k.prototype.draw=function(e,t,i,n){n$1e.defined("drawCommand",e),n$1e.defined("drawCommand.shaderProgram",e._shaderProgram),t=e$1Y(t,this._defaultPassState);var r=e$1Y(e._framebuffer,t.framebuffer),o=e$1Y(e._renderState,this._defaultRenderState);i=e$1Y(i,e._shaderProgram),n=e$1Y(n,e._uniformMap),ze$5(this,r,t,i,o);var a=e._uniformBuffers;if(t$$(a)&&a.length>0)for(var s=0;s<a.length;s++)a[s].bindProgram(i);Qe$5(this,e,i,n)},d$k.prototype.endFrame=function(){var e=this._gl;e.useProgram(null),this._currentFramebuffer=void 0,e.bindFramebuffer(e.FRAMEBUFFER,null);var t=Y$h;this.drawBuffers&&this.glDrawBuffers(t);var i=this._maxFrameTextureUnitIndex;this._maxFrameTextureUnitIndex=0;for(var n=0;n<i;++n)e.activeTexture(e.TEXTURE0+n),e.bindTexture(e.TEXTURE_2D,null),e.bindTexture(e.TEXTURE_CUBE_MAP,null)},d$k.prototype.readPixels=function(e){var t=this._gl;e=e$1Y(e,e$1Y.EMPTY_OBJECT);var i=Math.max(e$1Y(e.x,0),0),n=Math.max(e$1Y(e.y,0),0),r=e$1Y(e.width,t.drawingBufferWidth*this.ssaaLevel),o=e$1Y(e.height,t.drawingBufferHeight*this.ssaaLevel),a=e.framebuffer;n$1e.typeOf.number.greaterThan("readState.width",r,0),n$1e.typeOf.number.greaterThan("readState.height",o,0);var s=v$Z.UNSIGNED_BYTE;t$$(a)&&a.numberOfColorAttachments>0&&(s=a.getColorTexture(0).pixelDatatype);var l=Z$_.createTypedArray(Z$_.RGBA,s,r,o);return q$j(this,a),t.readPixels(i,n,r,o,Z$_.RGBA,s,l),l};var ne$8={position:0,textureCoordinates:1},Z$g,$$f,tt$6,et$4,ot$4;function z$j(e,t,i){this._pickObjects=e,this.key=t,this.color=i}function w$q(e){this._scene=e,this._startPoint=void 0,this._endPoint=void 0,this._maxHeight=100,this._farDistance=500,this._showBound=!0,this._fbo=void 0,this._readyPromise=c$18.defer(),this._hintBoundColor=new e$1z(0,1,1,.1),this._hintBoundOutlineColor=new e$1z(1,0,0,1),this._colorCommand=void 0,this._outlineCommand=void 0,this._update=!1,this._name="",this._frameState=void 0,this._visibleViewport=4095,this._buffers=new e$1F}function Y$g(e){t$$(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0),t$$(e._outlineCommand)&&(e._outlineCommand.vertexArray=e._outlineCommand.vertexArray&&e._outlineCommand.vertexArray.destroy(),e._outlineCommand.shaderProgram=e._outlineCommand.shaderProgram&&e._outlineCommand.shaderProgram.destroy(),e._outlineCommand=void 0)}function lt$5(e){var t=e._scene.camera,i=a$11.subtract(e._endPoint,e._startPoint,new a$11),n=a$11.midpoint(e._startPoint,e._endPoint,new a$11);a$11.normalize(i,i);var r=a$11.normalize(n,new a$11),o=a$11.cross(r,i,new a$11);a$11.normalize(o,o),a$11.cross(i,o,r),a$11.normalize(r,r);var a=a$11.multiplyByScalar(r,e._maxHeight/2,new a$11),s=new a$11;a$11.clone(n,s),a$11.add(s,a,s);var l=a$11.distance(e._endPoint,e._startPoint),u=1,c=0,h=e._maxHeight;l*e._scene.context.drawingBufferHeight/e._scene.context.drawingBufferWidth<e._maxHeight&&(h=l*e._scene.context.drawingBufferHeight/e._scene.context.drawingBufferWidth,u=Math.ceil(e._maxHeight/h)),t$$(e._fbo)||(e._fbo=new t$i(e._scene.context),e._fbo.environmentVisible.isObjectVisible=!0,e._fbo.environmentVisible.isOnlyS3MObjectVisible=!0,e._fbo._useHeight=!1,e._scene.frameState._framebufferList[e._name]=e._fbo,e._frameState=e._scene._frameState),e._buffers.removeAll(),e._fbo._isUpdate=!0,e._fbo._beginFunc=function(i){e._readyPromise=c$18.defer(),Z$g=a$11.clone(t.position),$$f=a$11.clone(t.direction),tt$6=a$11.clone(t.up),et$4=t.frustum.clone(new f$V),ot$4=i.useLogDepth,i.useLogDepth=!1,a$11.clone(n,s),a=a$11.multiplyByScalar(r,h/2+h*c,new a$11),a$11.add(s,a,s),t.setView({destination:s,orientation:{direction:o,up:r}});var l=new r$K,u=a$11.distance(e._endPoint,e._startPoint);l.width=u,l.near=.01,l.far=e._farDistance,l.aspectRatio=i.context.drawingBufferWidth/i.context.drawingBufferHeight,t.frustum=l,i.context.uniformState.updateFrustum(l)},e._fbo._endFunc=function(i){t.frustum=et$4,t.setView({destination:Z$g,orientation:{direction:$$f,up:tt$6},convert:!1}),i.context.uniformState.updateFrustum(t.frustum),i.useLogDepth=ot$4;var n=e._scene._context,r=n.readPixels({x:0,y:0,width:n.drawingBufferWidth,height:n.drawingBufferHeight,framebuffer:e._fbo._renderTexture._fb});if(e._buffers.set(c,r),c++,0==--u){for(var o=new Uint8Array(r.length*e._buffers.length),a=0;a<e._buffers.length;a++)o.set(e._buffers.get(a),r.length*a);var s=document.createElement("canvas");s.height=n.drawingBufferHeight*e._buffers.length,s.width=n.drawingBufferWidth;var l=s.getContext("2d"),d=l.createImageData(s.width,s.height);d.data.set(o),l.putImageData(d,0,0);for(var f=a$11.distance(e._endPoint,e._startPoint)/e._maxHeight,p=i.context.drawingBufferWidth/f,_=l.getImageData(0,0,s.width,s.height),m=e._maxHeight/h-Math.floor(e._maxHeight/h),$=(1-m)*_.height/e._buffers.length,g=0;g<_.height/2;++g)for(var y=0;y<_.width;++y){var v=4*g*_.width+4*y,x=4*(_.height-g)*_.width+4*y,b=_.data[v],S=_.data[v+1],w=_.data[v+2],C=_.data[v+3];_.data[v]=_.data[x],_.data[v+1]=_.data[x+1],_.data[v+2]=_.data[x+2],_.data[v+3]=_.data[x+3],_.data[x]=b,_.data[x+1]=S,_.data[x+2]=w,_.data[x+3]=C,1===e._buffers.length&&g<_.height/2-p/2&&(_.data[v]=0,_.data[v+1]=0,_.data[v+2]=0,_.data[v+3]=0),e._buffers.length>1&&m>0&&g<$&&(_.data[v]=0,_.data[v+1]=0,_.data[v+2]=0,_.data[v+3]=0)}l.clearRect(0,0,_.width,_.height),l.putImageData(_,0,0);var T=s.toDataURL();e._readyPromise.resolve(T),e._fbo._isUpdate=!1}}}function pt$3(e){if(e._showBound){var t=e._scene._context,i=a$11.subtract(e._endPoint,e._startPoint,new a$11),n=a$11.midpoint(e._startPoint,e._endPoint,new a$11);a$11.normalize(i,i);var r=a$11.normalize(n,new a$11),o=a$11.multiplyByScalar(r,e._maxHeight,new a$11),a=a$11.cross(r,i,new a$11);a$11.normalize(a,a);var s=a$11.multiplyByScalar(a,e._farDistance,new a$11),l=new a$11;a$11.add(e._startPoint,s,l);var u=new a$11;a$11.add(e._endPoint,s,u);var c=new a$11;a$11.add(e._startPoint,o,c);var h=new a$11;a$11.add(e._endPoint,o,h);var d=new a$11;a$11.add(u,o,d);var f=new a$11;a$11.add(l,o,f);var p=new c$1a,_=new c$1a,m=[e._startPoint,e._endPoint,u,l,c,h,d,f];if(e._scene.mode===b$1d.COLUMBUS_VIEW){var $=m$13.convertToColumbusCartesian(e._startPoint);c$1a.fromTranslation($,p);var g=a$11.negate($,new a$11);c$1a.fromTranslation(g,_),m=m.map((e=>m$13.convertToColumbusCartesian(e)))}else p=m$13.eastNorthUpToFixedFrame(e._startPoint),_=c$1a.inverse(p,new c$1a);e._colorCommand=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:p,pass:we$l.OPAQUE,owner:e});for(var y=C$12.createTypedArray(C$12.FLOAT,24),v=0;v<m.length;v++){var x=c$1a.multiplyByPoint(_,m[v],new a$11);y[3*v]=x.x,y[3*v+1]=x.y,y[3*v+2]=x.z}var b=u$Y.createVertexBuffer({context:t,typedArray:y,usage:A$13.STATIC_DRAW}),S=new a$O({sources:["attribute vec4 aPosition;\nvoid main()\n{\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}\n"]}),w=new a$O({sources:["uniform vec4 uColor;\nvoid main(){\n gl_FragColor = uColor;\n}\n"]}),C=p$15.fromCache({context:t,vertexShaderSource:S,fragmentShaderSource:w,attributeLocations:{aPosition:0}}),T=p$1a.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},blending:Ee$s.ALPHA_BLEND}),P=[];P.push({index:0,vertexBuffer:b,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1});var E=C$12.createTypedArray(C$12.UNSIGNED_SHORT,36);E[0]=0,E[1]=1,E[2]=2,E[3]=0,E[4]=2,E[5]=3,E[6]=4,E[7]=5,E[8]=6,E[9]=4,E[10]=6,E[11]=7,E[12]=0,E[13]=1,E[14]=5,E[15]=0,E[16]=5,E[17]=4,E[18]=3,E[19]=2,E[20]=6,E[21]=3,E[22]=6,E[23]=7,E[24]=3,E[25]=0,E[26]=4,E[27]=3,E[28]=4,E[29]=7,E[30]=1,E[31]=2,E[32]=6,E[33]=1,E[34]=6,E[35]=5;var A=C$12.createTypedArray(C$12.UNSIGNED_SHORT,24);A[0]=0,A[1]=1,A[2]=1,A[3]=2,A[4]=2,A[5]=3,A[6]=3,A[7]=0,A[8]=4,A[9]=5,A[10]=5,A[11]=6,A[12]=6,A[13]=7,A[14]=7,A[15]=4,A[16]=0,A[17]=4,A[18]=1,A[19]=5,A[20]=2,A[21]=6,A[22]=3,A[23]=7;var L=new x$18({context:t,attributes:P,indexBuffer:u$Y.createIndexBuffer({context:t,typedArray:E,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT})});e._colorCommand.vertexArray=L,e._colorCommand.shaderProgram=C,e._colorCommand.renderState=T,e._colorCommand.uniformMap={uColor:function(){return e._hintBoundColor}},e._outlineCommand=new s$1d({primitiveType:H$11.LINES,modelMatrix:p,pass:we$l.OPAQUE,owner:e}),e._outlineCommand.shaderProgram=C;var M=new x$18({context:t,attributes:P,indexBuffer:u$Y.createIndexBuffer({context:t,typedArray:A,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT})});e._outlineCommand.vertexArray=M,e._outlineCommand.renderState=T,e._outlineCommand.uniformMap={uColor:function(){return e._hintBoundOutlineColor}}}}function b$q(e,t){this._positions=e,this._skyline=t,this._command=void 0,this._initialize=!1,this._matWorldMatrix=c$1a.IDENTITY.clone(),this._vertexArray=void 0,this._normalArray=void 0,this._texcoordArray=void 0}function ir$2(e,t,i,n){var r=a$11.fromRadians(e.longitude,e.latitude,0),o=a$11.fromRadians(e.longitude,e.latitude,100),a=new a$10(r.x,r.y,r.z,1);c$1a.multiplyByVector(t,a,a),a$10.divideByScalar(a,a.w,a),i.push(.5*a.x+.5),i.push(.5*a.y+.5),a=new a$10(o.x,o.y,o.z,1),c$1a.multiplyByVector(t,a,a),a$10.divideByScalar(a,a.w,a),n.push(.5*a.x+.5),n.push(.5*a.y+.5)}function d$j(e,t){if(n$1e.defined("context",e),!(t$$(t)&&t$$(t.positiveX)&&t$$(t.negativeX)&&t$$(t.positiveY)&&t$$(t.negativeY)&&t$$(t.positiveZ)&&t$$(t.negativeZ)))throw new t$_("urls is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");var i=[t$X.createIfNeeded(t.positiveX).fetchImage(),t$X.createIfNeeded(t.negativeX).fetchImage(),t$X.createIfNeeded(t.positiveY).fetchImage(),t$X.createIfNeeded(t.negativeY).fetchImage(),t$X.createIfNeeded(t.positiveZ).fetchImage(),t$X.createIfNeeded(t.negativeZ).fetchImage()];return c$18.all(i,(function(t){return new X$y({context:e,source:{positiveX:t[0],negativeX:t[1],positiveY:t[2],negativeY:t[3],positiveZ:t[4],negativeZ:t[5]}})}))}function u$l(e){if(!t$$(e))throw new t$_("scene are required.");this._scene=e,this._viewSheds=[],this._boundingSphere=new c$19,this._frameState=void 0,this._update=!0,this._id=0,this._name="",this._sceneName="",this._checking=!1,this._visibleViewport=4095}function v$m(e,t,i,n){if(t._isUpdateCommand){for(var r=[],o=[],a=0;a<n.length;a++)r.push(i[n[a]]._cameraDepthBuffer.depthTexture),o.push(i[n[a]]._renderTextureMatrix);t._colorCommand.uniformMap={uVisibleAreaColor:function(){return t._visibleAreaColor},textureCount:function(){return n.length},uHiddenAreaColor:function(){return t._hiddenAreaColor},uRenderTextureMatrixs:function(){return o},uTexture1_size:function(){var e=t._cameraDepthBuffer.depthTexture;return new r$T(e.width,e.height)},uTextures:function(){return r},uGlobalDepthTexture:function(){return t._globalDepthBuffer.depthTexture},uGlobeTextureSize:function(){return new r$T(t._globalDepthBuffer.depthTexture.width,t._globalDepthBuffer.depthTexture.height)}},t._isUpdateCommand=!1}}function w$p(e,t,i){for(var n=e._viewSheds,r=0;r<n.length;r++){for(var o=[],a=[],s=n[r]._boundingSphere,l=0;l<n.length;l++)r!=l&&m$n(s,n[l]._boundingSphere)&&(o.push(n[l]._name),a.push(l));o.length>0&&(o.push(n[r]._name),a.push(r)),t.push(o),i.push(a)}}function m$n(e,t){var i=e.radius,n=t.radius,r=e.center,o=t.center;return a$11.distance(r,o)<i+n}d$k.prototype.getViewportQuadVertexArray=function(){var e=this.cache.viewportQuad_vertexArray;if(!t$$(e)){var t=new T$11({attributes:{position:new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1]}),textureCoordinates:new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:2,values:[0,0,1,0,1,1,0,1]})},indices:new Uint16Array([0,1,2,0,2,3]),primitiveType:H$11.TRIANGLES});e=x$18.fromGeometry({context:this,geometry:t,attributeLocations:ne$8,bufferUsage:A$13.STATIC_DRAW,interleave:!0}),this.cache.viewportQuad_vertexArray=e}return e},d$k.prototype.createViewportQuadCommand=function(e,t){return this.createCustomViewportQuadCommand(pe$b,e,t)},d$k.prototype.createCustomViewportQuadCommand=function(e,t,i){return i=e$1Y(i,e$1Y.EMPTY_OBJECT),new s$1d({vertexArray:this.getViewportQuadVertexArray(),primitiveType:H$11.TRIANGLES,renderState:i.renderState,shaderProgram:p$15.fromCache({context:this,vertexShaderSource:e,fragmentShaderSource:t,attributeLocations:ne$8}),uniformMap:i.uniformMap,owner:i.owner,framebuffer:i.framebuffer,pass:i.pass})},d$k.prototype.createReflectFramebuffer=function(){return new i$i(this)},d$k.prototype.createNormalFramebuffer=function(){return new r$f(this)},d$k.prototype.createPostEffectFilterlFramebuffer=function(){return new t$d(this)},d$k.prototype.createClampFramebuffer=function(){return new t$e(this)},d$k.prototype.createClosedDepthFramebuffer=function(){return new o$o(this)},d$k.prototype.createPickRectFramebuffer=function(){return new t$c(this)},d$k.prototype.createSharedEDLFrameBuffer=function(){return new _0x21f1aa},d$k.prototype.getObjectByPickColor=function(e){return n$1e.defined("pickColor",e),this._pickObjects[e.toRgba()]},d$k.prototype.getObjectByPickId=function(e){return n$1e.defined("pickId",e),this._pickObjects[e]},Object.defineProperties(z$j.prototype,{object:{get:function(){return this._pickObjects[this.key]},set:function(e){this._pickObjects[this.key]=e}}}),z$j.prototype.destroy=function(){delete this._pickObjects[this.key]},d$k.prototype.createPickId=function(e){n$1e.defined("object",e),++this._nextPickColor[0];var t=this._nextPickColor[0];if(0===t)throw new t$Z("Out of unique Pick IDs.");return this._pickObjects[t]=e,new z$j(this._pickObjects,t,e$1z.fromRgba(t))},d$k.prototype.isDestroyed=function(){return!1},d$k.prototype.destroy=function(){var e=this.cache;for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];t$$(i.destroy)&&i.destroy()}return this._shaderCache=this._shaderCache.destroy(),this._textureCache=this._textureCache.destroy(),this._defaultTexture=this._defaultTexture&&this._defaultTexture.destroy(),this._defaultCubeMap=this._defaultCubeMap&&this._defaultCubeMap.destroy(),this._defaultTransparentTexture=this._defaultTransparentTexture&&this._defaultTransparentTexture.destroy(),s$1e(this)},Object.defineProperties(w$q.prototype,{readyPromise:{get:function(){return this._readyPromise}},farDistance:{get:function(){return this._farDistance},set:function(e){this._farDistance=e,this._update=!0}},maxHeight:{get:function(){return this._maxHeight},set:function(e){this._maxHeight=e,this._update=!0}},startPoint:{get:function(){return this._startPoint},set:function(e){this._startPoint=e,this._update=!0}},endPoint:{get:function(){return this._endPoint},set:function(e){this._endPoint=e,this._update=!0}}}),w$q.prototype.clear=function(){this._startPoint=void 0,this._endPoint=void 0,Y$g(this)},w$q.prototype.setVisibleInViewport=function(e){if(e>8)throw new DeveloperError("the index is 0~8");this._visibleViewport=1<<e},w$q.prototype.getVisibleInViewport=function(e){if(e>8)throw new DeveloperError("the index is 0~8");return 1<<e&this._visibleViewport},w$q.prototype.destroy=function(){return this.clear(),t$$(this._frameState)&&(t$$(this._fbo)&&delete this._frameState._framebufferList[this._name],this._frameState=void 0),this._fbo=this._fbo&&this._fbo.destroy(),this._scene._analyst3D.remove(this._name,!0),s$1e(this)},w$q.prototype.update=function(e,t,i){!t$$(this._startPoint)||!t$$(this._endPoint)||(this._update&&(Y$g(this),lt$5(this),pt$3(this),this._update=!1),this._showBound&&t$$(this._colorCommand)&&t$$(this._outlineCommand)&&!t.passes.pick&&(i.push(this._colorCommand),i.push(this._outlineCommand)))},w$q.prototype.setBoundByPoints=function(e,t){this._startPoint=e,this._endPoint=t,this._update=!0},w$q.prototype.build=function(){""===this._name&&(this._name="facade"+this._scene._analyst3D._layerIndex,this._scene._analyst3D.add(this))},b$q.prototype.destroy=function(){t$$(this._command)&&(this._command.vertexArray=this._command.vertexArray&&this._command.vertexArray.destroy(),this._command.shaderProgram=this._command.shaderProgram&&this._command.shaderProgram.destroy(),this._command=void 0),this._vertexArray=void 0,this._normalArray=void 0,this._texcoordArray=void 0},b$q.prototype.initialize=function(e){if(!this._initialize){t$$(this._command)&&(this._command.vertexArray=this._command.vertexArray&&this._command.vertexArray.destroy(),this._command.shaderProgram=this._command.shaderProgram&&this._command.shaderProgram.destroy(),this._command=void 0),this._typeArray=null,this._initialize=!0;var t=new S$C({polygonHierarchy:{positions:a$11.fromDegreesArray(this._positions)},extrudedHeight:100,granularity:1e-6}),i=S$C.createGeometry(t);c$1a.setTranslation(this._matWorldMatrix,i.boundingSphere.center,this._matWorldMatrix),this._vertexArray=i.attributes.position.values,this._normalArray=i.attributes.normal.values,this._texcoordArray=i.attributes.st.values,this._command=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:this._matWorldMatrix,pass:we$l.ANALYSIS,boundingVolume:i.boundingSphere,cull:!1});var n={aPosition:0};this._command.vertexArray=x$18.fromGeometry({context:e,geometry:i,attributeLocations:n,bufferUsage:A$13.STATIC_DRAW,interleave:!0});var r=new a$O({sources:[He$5]}),o=new a$O({sources:[Ye$6]});r.defines.push("NormalVertex"),o.defines.push("NormalVertex"),this._command.shaderProgram=p$15.fromCache({context:e,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n}),this._command.renderState=p$1a.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}});var a=new a$10(128/255,1,235/255,1);this._command.uniformMap={uDiffuseColor:function(){return a}}}},b$q.prototype.update=function(e,t){this.initialize(e);var i=e.readPixels({framebuffer:this._skyline._depthBuffer.framebuffer}),n=c$1a.IDENTITY.clone();c$1a.inverse(this._matWorldMatrix,n);for(var r=n$1d.toDegrees(t.positionCartographic.longitude),o=n$1d.toDegrees(t.positionCartographic.latitude),a=t.positionCartographic.height,s=this._vertexArray.length/3,l=this._command.vertexArray.getAttribute(0),u=new Float32Array(8*s),c=new a$10,h=new a$10(1,1/255,1/65025,1/160581375),d=e.uniformState,f=d.viewProjection,p=d.inverseViewProjection,_=d.currentFrustum,m=_.x,$=_.y,g=0;g<s;g++){var y=new a$10(this._vertexArray[3*g],this._vertexArray[3*g+1],this._vertexArray[3*g+2],1),v=i$1g.fromCartesian(y);if(v.height<50)c$1a.multiplyByVector(n,y,y),u[8*g]=y.x,u[8*g+1]=y.y,u[8*g+2]=y.z,u[8*g+3]=this._texcoordArray[2*g],u[8*g+4]=this._texcoordArray[2*g+1],u[8*g+5]=this._normalArray[3*g],u[8*g+6]=this._normalArray[3*g+1],u[8*g+7]=this._normalArray[3*g+2];else{var x=[],b=[];ir$2(v,f,x,b);var S=0;b[0]!=x[0]&&b[1]!=x[1]&&(S=(b[1]-x[1])/(b[0]-x[0]));for(var w=new a$10(0,0,0,1),C=0,T=e.drawingBufferHeight-1;T>-1;T--){var P=0;if(0===S)P=Math.round(x[0]*e.drawingBufferWidth);else{var E=(T/e.drawingBufferHeight-x[1])/S+x[0];P=Math.round(E*e.drawingBufferWidth)}P=n$1d.clamp(P,0,e.drawingBufferWidth-1);var A=e.drawingBufferWidth*T+P,L=a$10.unpack(i,4*A,c);if(a$10.divideByScalar(L,255,L),(C=a$10.dot(L,h))>0){w.x=P/e.drawingBufferWidth*2-1,w.y=T/e.drawingBufferHeight*2-1;break}}if(this._skyline._scene.frameState.useLogDepth&&C>0){var M=C*d.log2FarDepthFromNearPlusOne;C=$*(1-m/(Math.pow(2,M)-1+m))/($-m)}C=2*C-1,w.z=C,c$1a.multiplyByVector(p,w,w),a$10.divideByScalar(w,w.w,w);var I=i$1g.fromCartesian(w);I.longitude=n$1d.toDegrees(I.longitude),I.latitude=n$1d.toDegrees(I.latitude),v.longitude=n$1d.toDegrees(v.longitude),v.latitude=n$1d.toDegrees(v.latitude);var O=i$1g.sphericalDistance(r,o,I.longitude,I.latitude),D=i$1g.sphericalDistance(r,o,v.longitude,v.latitude)/O*(I.height-a)+a,R=a$11.fromDegrees(v.longitude,v.latitude,D);y.x=R.x,y.y=R.y,y.z=R.z,y.w=1,c$1a.multiplyByVector(n,y,y),u[8*g]=y.x,u[8*g+1]=y.y,u[8*g+2]=y.z,u[8*g+3]=this._texcoordArray[2*g],u[8*g+4]=this._texcoordArray[2*g+1],u[8*g+5]=this._normalArray[3*g],u[8*g+6]=this._normalArray[3*g+1],u[8*g+7]=this._normalArray[3*g+2]}}l.vertexBuffer.copyFromArrayView(u,0)},Object.defineProperties(u$l.prototype,{ViewShedCount:{get:function(){return this._viewSheds.length}}}),u$l.prototype.addViewShed=function(e){t$$(e)&&this._viewSheds.push(e)},u$l.prototype.getViewShed=function(e){if(this._viewSheds.length<=e)throw new t$_("index is outrange.");return this._viewSheds[e]},u$l.prototype.removeViewShed=function(e,t){if(this._viewSheds.length<=e)throw new t$_("index is outrange.");t?this._viewSheds[e].destroy():this._viewSheds[e].clear(),this._viewSheds.splice(e,1)},u$l.prototype.destroy=function(){for(var e=0;e<this._viewSheds.length;e++)this._viewSheds[e].destroy();this._viewSheds=[],this._scene._analyst3D.remove(this._name,!0)},u$l.prototype.clear=function(){for(var e=0;e<this._viewSheds.length;e++)this._viewSheds[e].clear();this._viewSheds=[],this._scene._analyst3D.remove(this._name,!1)},u$l.prototype.build=function(){if(""===this._name&&!this._checking){for(var e=0;e<this._viewSheds.length;e++)""!=this._viewSheds[e]._name?this._scene._analyst3D.add(this._viewSheds[e]):this._viewSheds[e].build();this._name="multiviewshed3d"+this._scene._analyst3D._layerIndex,this._scene._analyst3D.add(this)}},u$l.prototype.update=function(e,t,i){if("normal"===t._fboState.name&&!t.passes.pick&&!t.camera.bReflect){var n=[],r=[];w$p(this,n,r);for(var o=this._viewSheds.length,a=0;a<o;a++){var s=n[a],l=r[a];s.length>0&&(this._viewSheds[a]._setMultiViewShedNames(s),v$m(e,this._viewSheds[a],this._viewSheds,l))}}};class F$l{constructor(){}parse(e){const t=function(e,t){switch(e){case 1:console.error("THREE.RGBELoader Read Error: "+(t||""));break;case 2:console.error("THREE.RGBELoader Write Error: "+(t||""));break;case 3:console.error("THREE.RGBELoader Bad File Format: "+(t||""));break;default:console.error("THREE.RGBELoader: Error: "+(t||""))}return-1},i=function(e,t,i){t=t||1024;let n=e.pos,r=-1,o=0,a="",s=String.fromCharCode.apply(null,new Uint16Array(e.subarray(n,n+128)));for(;0>(r=s.indexOf("\n"))&&o<t&&n<e.byteLength;)a+=s,o+=s.length,n+=128,s+=String.fromCharCode.apply(null,new Uint16Array(e.subarray(n,n+128)));return-1<r&&(!1!==i&&(e.pos+=o+r+1),a+s.slice(0,r))};const n=function(){const e=new ArrayBuffer(4),t=new Float32Array(e),i=new Uint32Array(e),n=new Uint32Array(512),r=new Uint32Array(512);for(let e=0;e<256;++e){const t=e-127;t<-27?(n[e]=0,n[256|e]=32768,r[e]=24,r[256|e]=24):t<-14?(n[e]=1024>>-t-14,n[256|e]=1024>>-t-14|32768,r[e]=-t-1,r[256|e]=-t-1):t<=15?(n[e]=t+15<<10,n[256|e]=t+15<<10|32768,r[e]=13,r[256|e]=13):t<128?(n[e]=31744,n[256|e]=64512,r[e]=24,r[256|e]=24):(n[e]=31744,n[256|e]=64512,r[e]=13,r[256|e]=13)}const o=new Uint32Array(2048),a=new Uint32Array(64),s=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,i=0;for(;0==(8388608&t);)t<<=1,i-=8388608;t&=-8388609,i+=947912704,o[e]=t|i}for(let e=1024;e<2048;++e)o[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)a[e]=e<<23;a[31]=1199570944,a[32]=2147483648;for(let e=33;e<63;++e)a[e]=2147483648+(e-32<<23);a[63]=3347054592;for(let e=1;e<64;++e)32!==e&&(s[e]=1024);return{floatView:t,uint32View:i,baseTable:n,shiftTable:r,mantissaTable:o,exponentTable:a,offsetTable:s}}();function r(e){Math.abs(e)>65504&&console.warn("rgbe : toHalfFloat(): Value out of range."),e=function(e,t,i){return Math.max(t,Math.min(i,e))}(e,-65504,65504),n.floatView[0]=e;const t=n.uint32View[0],i=t>>23&511;return n.baseTable[i]+((8388607&t)>>n.shiftTable[i])}const o=function(e,t,i,n){const o=e[t+3],a=Math.pow(2,o-128)/255;i[n+0]=r(Math.min(e[t+0]*a,65504)),i[n+1]=r(Math.min(e[t+1]*a,65504)),i[n+2]=r(Math.min(e[t+2]*a,65504)),i[n+3]=r(1)},a=new Uint8Array(e);a.pos=0;const s=function(e){const n=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,r=/^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,o=/^\s*FORMAT=(\S+)\s*$/,a=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,s={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};let l,u;if(e.pos>=e.byteLength||!(l=i(e)))return t(1,"no header found");if(!(u=l.match(/^#\?(\S+)/)))return t(3,"bad initial token");for(s.valid|=1,s.programtype=u[1],s.string+=l+"\n";l=i(e),!1!==l;)if(s.string+=l+"\n","#"!==l.charAt(0)){if((u=l.match(n))&&(s.gamma=parseFloat(u[1])),(u=l.match(r))&&(s.exposure=parseFloat(u[1])),(u=l.match(o))&&(s.valid|=2,s.format=u[1]),(u=l.match(a))&&(s.valid|=4,s.height=parseInt(u[1],10),s.width=parseInt(u[2],10)),2&s.valid&&4&s.valid)break}else s.comments+=l+"\n";return 2&s.valid?4&s.valid?s:t(3,"missing image size specifier"):t(3,"missing format specifier")}(a);if(-1!==s){const e=s.width,i=s.height,n=function(e,i,n){const r=i;if(r<8||r>32767||2!==e[0]||2!==e[1]||128&e[2])return new Uint8Array(e);if(r!==(e[2]<<8|e[3]))return t(3,"wrong scanline width");const o=new Uint8Array(4*i*n);if(!o.length)return t(4,"unable to allocate buffer space");let a=0,s=0;const l=4*r,u=new Uint8Array(4),c=new Uint8Array(l);let h=n;for(;h>0&&s<e.byteLength;){if(s+4>e.byteLength)return t(1);if(u[0]=e[s++],u[1]=e[s++],u[2]=e[s++],u[3]=e[s++],2!=u[0]||2!=u[1]||(u[2]<<8|u[3])!=r)return t(3,"bad rgbe scanline format");let i,n=0;for(;n<l&&s<e.byteLength;){i=e[s++];const r=i>128;if(r&&(i-=128),0===i||n+i>l)return t(3,"bad scanline data");if(r){const t=e[s++];for(let e=0;e<i;e++)c[n++]=t}else c.set(e.subarray(s,s+i),n),n+=i,s+=i}const d=r;for(let e=0;e<d;e++){let t=0;o[a]=c[e+t],t+=r,o[a+1]=c[e+t],t+=r,o[a+2]=c[e+t],t+=r,o[a+3]=c[e+t],a+=4}h--}return o}(a.subarray(a.pos),e,i);if(-1!==n){let t;const r=n.length/4,a=new Uint16Array(4*r);for(let e=0;e<r;e++)o(n,4*e,a,4*e);return t=a,{width:e,height:i,data:t,header:s.string,gamma:s.gamma,exposure:s.exposure}}}return null}}var mt$2={};function Nt$1(e,t,i){var n,r,o;if(e instanceof f$V){var a=Math.tan(.5*e.fovy);return n=e.near,r=e.near*a,o=e.aspectRatio*r,Math.max(t*n/o,i*n/r)}return e instanceof l$V?(n=e.near,r=e.top,o=e.right,Math.max(t*n/o,i*n/r)):Math.max(t,i)}var yt$2=new a$11,ft$2=new a$11;function Wt$2(e,t,i,n){if(t$$(n)&&i(.5)>n){var r=i(0),o=i(1),a=i(.5),s=a-r,l=a-o;return function(n){var a=i(n);if(n<=.5){var u=(a-r)/s;return n$1d.lerp(e,-n$1d.PI_OVER_TWO,u)}var c=(a-o)/l;return n$1d.lerp(-n$1d.PI_OVER_TWO,t,1-c)}}return function(i){return n$1d.lerp(e,t,i)}}function et$3(e,t,i,n,r){var o=r,a=Math.max(i,n);if(!t$$(o)){var s=e.position,l=t,u=e.up,c=e.right,h=e.frustum,d=a$11.subtract(s,l,yt$2),f=a$11.magnitude(a$11.multiplyByScalar(u,a$11.dot(d,u),ft$2)),p=a$11.magnitude(a$11.multiplyByScalar(c,a$11.dot(d,c),ft$2));o=Math.min(.2*Nt$1(h,f,p),1e9)}if(a<o){var _=1e6,m=-Math.pow((o-i)*_,1/8),$=Math.pow((o-n)*_,1/8);return function(e){var t=e*($-m)+m;return-Math.pow(t,8)/_+o}}return function(e){return n$1d.lerp(i,n,e)}}function B$f(e,t){return n$1d.equalsEpsilon(e,n$1d.TWO_PI,n$1d.EPSILON11)&&(e=0),t>e+Math.PI?e+=n$1d.TWO_PI:t<e-Math.PI&&(e-=n$1d.TWO_PI),e}var ht$2=new a$11;function bt$4(e,t,i,n,r,o,a){var s=e.camera,l=a$11.clone(s.position,ht$2),u=s.pitch,c=B$f(s.heading,n),h=B$f(s.roll,o),d=et$3(s,i,l.z,i.z,a);return function(e){var a=e.time/t;s.setView({orientation:{heading:n$1d.lerp(c,n,a),pitch:n$1d.lerp(u,r,a),roll:n$1d.lerp(h,o,a)}}),r$T.lerp(l,i,a,s.position),s.position.z=d(a)}}function zt$1(e,t){e.longitude<t.longitude?e.longitude+=n$1d.TWO_PI:t.longitude+=n$1d.TWO_PI}function xt$4(e,t){var i=e.longitude-t.longitude;i<-n$1d.PI?e.longitude+=n$1d.TWO_PI:i>n$1d.PI&&(t.longitude+=n$1d.TWO_PI)}var Rt$3=new i$1g,Vt$3=new i$1g;function Lt$4(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,$,g){var y=e.camera,v=e.mapProjection.ellipsoid,x=i$1g.clone(y.positionCartographic,Rt$3),b=y.pitch,S=B$f(y.heading,n),w=B$f(y.roll,o),C=v.cartesianToCartographic(i,Vt$3);x.longitude=n$1d.zeroToTwoPi(x.longitude),C.longitude=n$1d.zeroToTwoPi(C.longitude);var T=!1;if(t$$(s)){var P=n$1d.zeroToTwoPi(s),E=Math.min(x.longitude,C.longitude),A=Math.max(x.longitude,C.longitude),L=P>=E&&P<=A;if(t$$(l)){var M=Math.abs(x.longitude-C.longitude),I=n$1d.TWO_PI-M;(L?M:I)<(L?I:M)*l&&!L&&(T=!0)}else L||(T=!0)}T?zt$1(x,C):xt$4(x,C);var O=et$3(y,i,x.height,C.height,a),D=Wt$2(b,r,O,u);return function(){var i=x.longitude,r=C.longitude,a=x.latitude,s=C.latitude;return function(l){var u,v,x=l.time/t,b=d?y.positionCartographic.height:O(x);if(m!==hi$2.NONE&&t$$(g)){if((u=$._times[g]+l.time)>$._times[$._times.length-1])return;var C=$.evaluate(u),T=i$1g.fromCartesian(C);v=a$11.fromRadians(T.longitude,T.latitude,b)}else v=a$11.fromRadians(n$1d.lerp(i,r,x),n$1d.lerp(a,s,x),b);if(f){var P=i$1g.fromCartesian(v),E=e.globe.getHeight(P);if(!t$$(E))return;(b<E||b-E>0&&b-E<p)&&(P.height=E+p,v=i$1g.toCartesian(P))}var A=c?y.heading:n$1d.lerp(S,n,x),L=h?y.pitch:D(x),M=n$1d.lerp(w,o,x);if(_&&(A=c?y.heading:n,M=o),m!==hi$2.NONE&&t$$(g)){var I=u+.001;if(I>$._times[$._times.length-1])y.setView({destination:v,orientation:{heading:A,pitch:L,roll:M}});else{var R=$.evaluate(I),N=i$1g.fromCartesian(R);R=a$11.fromRadians(N.longitude,N.latitude,b);var F=new a$11(R.x-v.x,R.y-v.y,R.z-v.z);a$11.normalize(F,F);var B=m$13.buildUp(v,F);y.setView({destination:v,orientation:{direction:F,up:B}})}}else y.setView({destination:v,orientation:{heading:A,pitch:L,roll:M}})}}()}function Ft$1(e,t,i,n,r,o,a){var s=e.camera,l=a$11.clone(s.position,ht$2),u=B$f(s.heading,n),c=s.frustum.right-s.frustum.left,h=et$3(s,i,c,i.z,a);return function(e){var r=e.time/t;s.setView({orientation:{heading:n$1d.lerp(u,n,r)}}),r$T.lerp(l,i,r,s.position);var o=h(r),a=s.frustum,c=a.top/a.right,d=.5*(o-(a.right-a.left));a.right+=d,a.left-=d,a.top=c*a.right,a.bottom=-a.top}}var dt$4=new i$1g,jt$3=new a$11;function rt$4(e,t){return{startObject:{},stopObject:{},duration:0,complete:e,cancel:t}}function gt$2(e,t){return function(){"function"==typeof t&&t(),e.enableInputs=!0}}mt$2.createTween=function(e,t){var i=(t=e$1Y(t,e$1Y.EMPTY_OBJECT)).destination;if(!t$$(e))throw new t$_("scene is required.");if(!t$$(i))throw new t$_("destination is required.");var n=e.mode;if(n===b$1d.MORPHING)return rt$4();var r=e$1Y(t.convert,!0),o=e.mapProjection,a=o.ellipsoid,s=t.maximumHeight,l=t.flyOverLongitude,u=t.flyOverLongitudeWeight,c=t.pitchAdjustHeight,h=t.easingFunction,d=t.flyClampToGround,f=t.flyRelativeHeight,p=t.interpolationMode,_=t.catmullRomSpline,m=t.preStopIndex;r&&n!==b$1d.SCENE3D&&(a.cartesianToCartographic(i,dt$4),i=o.project(dt$4,jt$3));var $=e.camera,g=t.endTransform;t$$(g)&&$._setTransform(g);var y=t.duration;t$$(y)||(y=Math.ceil(a$11.distance($.position,i)/1e6)+2,y=Math.min(y,3));var v=e$1Y(t.heading,0),x=e$1Y(t.pitch,-n$1d.PI_OVER_TWO),b=e$1Y(t.roll,0),S=e$1Y(t.headingFree,!1),w=e$1Y(t.pitchFree,!1),C=e$1Y(t.altitudeFree,!1),T=e$1Y(t.directTurning,!1),P=e.screenSpaceCameraController;P.enableInputs=t.headingFree||t.pitchFree||t.altitudeFree;var E=gt$2(P,t.complete),A=gt$2(P,t.cancel),L=$.frustum,M=e.mode===b$1d.SCENE2D;if(M=(M=(M=(M=M&&r$T.equalsEpsilon($.position,i,n$1d.EPSILON6))&&n$1d.equalsEpsilon(Math.max(L.right-L.left,L.top-L.bottom),i.z,n$1d.EPSILON6))||e.mode!==b$1d.SCENE2D&&a$11.equalsEpsilon(i,$.position,n$1d.EPSILON10))&&n$1d.equalsEpsilon(n$1d.negativePiToPi(v),n$1d.negativePiToPi($.heading),n$1d.EPSILON10)&&n$1d.equalsEpsilon(n$1d.negativePiToPi(x),n$1d.negativePiToPi($.pitch),n$1d.EPSILON10)&&n$1d.equalsEpsilon(n$1d.negativePiToPi(b),n$1d.negativePiToPi($.roll),n$1d.EPSILON10))return rt$4(E,A);var I=new Array(4);if(I[b$1d.SCENE2D]=Ft$1,I[b$1d.SCENE3D]=Lt$4,I[b$1d.COLUMBUS_VIEW]=bt$4,y<=0){return rt$4((function(){I[n](e,1,i,v,x,b,s,l,u,c)({time:1}),"function"==typeof E&&E()}),A)}var O=I[n](e,y,i,v,x,b,s,l,u,c,S,w,C,d,f,T,p,_,m);if(!t$$(h)){var D=$.positionCartographic.height;h=D>(n===b$1d.SCENE3D?a.cartesianToCartographic(i).height:i.z)&&D>11500?_$T.CUBIC_OUT:_$T.QUINTIC_IN_OUT}return{duration:y,easingFunction:h,startObject:{time:0},stopObject:{time:y},update:O,complete:E,cancel:A}};var e$n={ROTATE:0,INFINITE_SCROLL:1},Zr=Object.freeze(e$n);function p$m(e){if(!t$$(e))throw new t$_("scene is required.");this._scene=e,this._transform=c$1a.clone(c$1a.IDENTITY),this._invTransform=c$1a.clone(c$1a.IDENTITY),this._actualTransform=c$1a.clone(c$1a.IDENTITY),this._actualInvTransform=c$1a.clone(c$1a.IDENTITY),this._transformChanged=!1,this.position=new a$11,this._position=new a$11,this._positionWC=new a$11,this._positionCartographic=new i$1g,this.positionWCDeltaMagnitude=0,this.positionWCDeltaMagnitudeLastFrame=0,this.direction=new a$11,this._direction=new a$11,this._directionWC=new a$11,this.up=new a$11,this._up=new a$11,this._upWC=new a$11,this.right=new a$11,this._right=new a$11,this._rightWC=new a$11,this.frustum=new f$V,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=n$1d.toRadians(60),this.defaultMoveAmount=1e5,this.defaultLookAmount=Math.PI/60,this.defaultRotateAmount=Math.PI/3600,this.defaultZoomAmount=1e5,this.constrainedAxis=void 0,this.maximumZoomFactor=1.5,this._moveStart=new o$15,this._moveEnd=new o$15,this._changed=new o$15,this._changedPosition=void 0,this._changedDirection=void 0,this._changedFrustum=void 0,this.percentageChanged=.5,this._refinePercentageChanged=.001,this._viewMatrix=new c$1a,this._invViewMatrix=new c$1a,bt$3(this),this._mode=b$1d.SCENE3D,this._modeChanged=!0;var t=e.mapProjection;this._projection=t,this._maxCoord=t.project(new i$1g(Math.PI,n$1d.PI_OVER_TWO)),this._max2Dfrustum=void 0,this._suspendTerrainAdjustment=!1,Xt$1(this,p$m.DEFAULT_VIEW_RECTANGLE,this.position,!0);var i=a$11.magnitude(this.position);i+=i*p$m.DEFAULT_VIEW_FACTOR,a$11.normalize(this.position,this.position),a$11.multiplyByScalar(this.position,i,this.position),this.bReflect=!1,this._bReflect=!1,this._reflectMatrix=new c$1a,this._reflectPosition=new a$11,this._reflectUp=new a$11,this._reflectDirection=new a$11,this._reflectRight=new a$11,this._isFlyCircle=!1,this._flyCircleCenter=new a$11,this._flyCircleLoop=!1,this._isResetFlyCircleParm=!1,this._speedRatio=1,this._flyClampToGround=!1,this._flyRelativeHeight=10,this._sensitivePosition=void 0,this._sensitivePositionRatio=0,this._sensitiveRegionRatio=0,this._endLevel=22,this._stateChanged=!0,this._preciseSensitivePosition=!1,this._enableIndoorColliDetection=!1}function bt$3(e){c$1a.computeView(e._position,e._direction,e._up,e._right,e._viewMatrix),c$1a.multiply(e._viewMatrix,e._actualInvTransform,e._viewMatrix),e.bReflect&&c$1a.multiply(e._viewMatrix,e._reflectMatrix,e._viewMatrix),c$1a.inverseTransformation(e._viewMatrix,e._invViewMatrix)}function ui(e){if(t$$(e._oldPositionWC)){e.positionWCDeltaMagnitudeLastFrame=e.positionWCDeltaMagnitude;var t=a$11.subtract(e.positionWC,e._oldPositionWC,e._oldPositionWC);e.positionWCDeltaMagnitude=a$11.magnitude(t),e._oldPositionWC=a$11.clone(e.positionWC,e._oldPositionWC),e.positionWCDeltaMagnitude>0?(e.timeSinceMoved=0,e._lastMovedTimestamp=yt$9()):e.timeSinceMoved=Math.max(yt$9()-e._lastMovedTimestamp,0)/1e3}else e._oldPositionWC=a$11.clone(e.positionWC,e._oldPositionWC)}p$m.TRANSFORM_2D=new c$1a(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),p$m.TRANSFORM_2D_INVERSE=c$1a.inverseTransformation(p$m.TRANSFORM_2D,new c$1a),p$m.DEFAULT_VIEW_RECTANGLE=s$1p.fromDegrees(70,0,140,60),p$m.DEFAULT_VIEW_FACTOR=.5,p$m.DEFAULT_OFFSET=new h$V(0,-n$1d.PI_OVER_FOUR,0),p$m.prototype.canPreloadFlight=function(){return t$$(this._currentFlight)&&this._mode!==b$1d.SCENE2D},p$m.prototype._updateCameraChanged=function(){var e=this;if(ui(e),this._stateChanged=!1,0!==e._changed.numberOfListeners){var t=e.percentageChanged,i=e._refinePercentageChanged;if(e._mode===b$1d.SCENE2D){if(!t$$(e._changedFrustum))return e._changedPosition=a$11.clone(e.position,e._changedPosition),void(e._changedFrustum=e.frustum.clone());var n,r=e.position,o=e._changedPosition,a=e.frustum,s=e._changedFrustum,l=r.x+a.left,u=r.x+a.right,c=o.x+s.left,h=o.x+s.right,d=r.y+a.bottom,f=r.y+a.top,p=o.y+s.bottom,_=o.y+s.top,m=Math.max(l,c),$=Math.min(u,h),g=Math.max(d,p),y=Math.min(f,_);if(m>=$||g>=f)n=1;else{var v=s;l<c&&u>h&&d<p&&f>_&&(v=a),n=1-($-m)*(y-g)/((v.right-v.left)*(v.top-v.bottom))}return void(n>t&&(e._changed.raiseEvent(n),e._changedPosition=a$11.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone(e._changedFrustum)))}if(!t$$(e._changedDirection))return e._changedPosition=a$11.clone(e.positionWC,e._changedPosition),void(e._changedDirection=a$11.clone(e.directionWC,e._changedDirection));var x,b=n$1d.acosClamped(a$11.dot(e.directionWC,e._changedDirection));x=t$$(e.frustum.fovy)?b/(.5*e.frustum.fovy):b;var S=a$11.distance(e.positionWC,e._changedPosition)/e.positionCartographic.height;(x>t||S>t)&&(e._changed.raiseEvent(Math.max(x,S)),e._changedPosition=a$11.clone(e.positionWC,e._changedPosition),e._changedDirection=a$11.clone(e.directionWC,e._changedDirection)),(x>i||S>i)&&(e._changed.raiseEvent(Math.max(x,S)),this._stateChanged=!0,e._changedPosition=a$11.clone(e.positionWC,e._changedPosition),e._changedDirection=a$11.clone(e.directionWC,e._changedDirection))}};var ci=new c$1a,li=new i$1g;function mi(e){m$13.basisTo2D(e._projection,e._transform,e._actualTransform)}p$m.prototype._adjustHeightForTerrain=function(){var e=this._scene,t=e.screenSpaceCameraController,i=t.enableCollisionDetection,n=t.minimumCollisionTerrainHeight,r=t.minimumZoomDistance;if(!this._suspendTerrainAdjustment&&i){var o=this._mode,a=e.globe;if(t$$(a)&&o!==b$1d.SCENE2D&&o!==b$1d.MORPHING){var s,l,u=a.ellipsoid,c=e.mapProjection;c$1a.equals(this.transform,c$1a.IDENTITY)||(s=c$1a.clone(this.transform,ci),l=a$11.magnitude(this.position),this._setTransform(c$1a.IDENTITY));var h=li;o===b$1d.SCENE3D?u.cartesianToCartographic(this.position,h):c.unproject(this.position,h);var d=!1;if(h.height<n){var f=a.getHeight(h);t$$(f)&&(f+=r,h.height<f&&(h.height=f,o===b$1d.SCENE3D?u.cartographicToCartesian(h,this.position):c.project(h,this.position),d=!0))}t$$(s)&&(this._setTransform(s),d&&(a$11.normalize(this.position,this.position),a$11.negate(this.position,this.direction),a$11.multiplyByScalar(this.position,Math.max(l,r),this.position),a$11.normalize(this.direction,this.direction),a$11.cross(this.direction,this.up,this.right),a$11.cross(this.right,this.direction,this.up)))}}};var di=new i$1g,pi$1=new a$11,ut$3=new a$11,fi$1=new a$10,_i$1=new a$10,gi$1=new a$10,vi$1=new a$10,Ci$1=new a$10;function yi$1(e){var t=e._projection,i=t.ellipsoid,n=c$1a.getColumn(e._transform,3,fi$1),r=i.cartesianToCartographic(n,di),o=t.project(r,pi$1),a=_i$1;a.x=o.z,a.y=o.x,a.z=o.y,a.w=1;var s=a$10.clone(a$10.UNIT_X,Ci$1),l=a$10.add(c$1a.getColumn(e._transform,0,ut$3),n,ut$3);i.cartesianToCartographic(l,r),t.project(r,o);var u=gi$1;u.x=o.z,u.y=o.x,u.z=o.y,u.w=0,a$11.subtract(u,a,u),u.x=0;var c=vi$1;if(a$11.magnitudeSquared(u)>n$1d.EPSILON10)a$11.cross(s,u,c);else{var h=a$10.add(c$1a.getColumn(e._transform,1,ut$3),n,ut$3);i.cartesianToCartographic(h,r),t.project(r,o),c.x=o.z,c.y=o.x,c.z=o.y,c.w=0,a$11.subtract(c,a,c),c.x=0,a$11.magnitudeSquared(c)<n$1d.EPSILON10&&(a$10.clone(a$10.UNIT_Y,u),a$10.clone(a$10.UNIT_Z,c))}a$11.cross(c,s,u),a$11.normalize(u,u),a$11.cross(s,u,c),a$11.normalize(c,c),c$1a.setColumn(e._actualTransform,0,u,e._actualTransform),c$1a.setColumn(e._actualTransform,1,c,e._actualTransform),c$1a.setColumn(e._actualTransform,2,s,e._actualTransform),c$1a.setColumn(e._actualTransform,3,a,e._actualTransform)}var Tt$2=new a$11;function S$j(e){var t=e._mode,i=!1,n=0;t===b$1d.SCENE2D&&(i=(n=e.frustum.right-e.frustum.left)!==e._positionCartographic.height);var r=e._position,o=!a$11.equals(r,e.position)||i;o&&(r=a$11.clone(e.position,e._position));var a=e._direction,s=!a$11.equals(a,e.direction);s&&(a$11.normalize(e.direction,e.direction),a=a$11.clone(e.direction,e._direction));var l=e._up,u=!a$11.equals(l,e.up);u&&(a$11.normalize(e.up,e.up),l=a$11.clone(e.up,e._up));var c=e._right,h=!a$11.equals(c,e.right);h&&(a$11.normalize(e.right,e.right),c=a$11.clone(e.right,e._right));var d=!1;e.bReflect!=e._bReflect&&(e._bReflect=e.bReflect,d=!0);var f=e._transformChanged||e._modeChanged;e._transformChanged=!1,f&&(c$1a.inverseTransformation(e._transform,e._invTransform),e._mode===b$1d.COLUMBUS_VIEW||e._mode===b$1d.SCENE2D?c$1a.equals(c$1a.IDENTITY,e._transform)?c$1a.clone(p$m.TRANSFORM_2D,e._actualTransform):e._mode===b$1d.COLUMBUS_VIEW?mi(e):yi$1(e):c$1a.clone(e._transform,e._actualTransform),c$1a.inverseTransformation(e._actualTransform,e._actualInvTransform),e._modeChanged=!1);var p=e._actualTransform;if(o||f)if(e._positionWC=c$1a.multiplyByPoint(p,r,e._positionWC),t===b$1d.SCENE3D||t===b$1d.MORPHING)e._positionCartographic=e._projection.ellipsoid.cartesianToCartographic(e._positionWC,e._positionCartographic);else{var _=Tt$2;_.x=e._positionWC.y,_.y=e._positionWC.z,_.z=e._positionWC.x,t===b$1d.SCENE2D&&(_.z=n),e._projection.unproject(_,e._positionCartographic)}if(s||u||h){var m=a$11.dot(a,a$11.cross(l,c,Tt$2));if(Math.abs(1-m)>n$1d.EPSILON2){var $=1/a$11.magnitudeSquared(l),g=a$11.dot(l,a)*$,y=a$11.multiplyByScalar(a,g,Tt$2);l=a$11.normalize(a$11.subtract(l,y,e._up),e._up),a$11.clone(l,e.up),c=a$11.cross(a,l,e._right),a$11.clone(c,e.right)}}(s||f)&&(e._directionWC=c$1a.multiplyByPointAsVector(p,a,e._directionWC),a$11.normalize(e._directionWC,e._directionWC)),(u||f)&&(e._upWC=c$1a.multiplyByPointAsVector(p,l,e._upWC),a$11.normalize(e._upWC,e._upWC)),(h||f)&&(e._rightWC=c$1a.multiplyByPointAsVector(p,c,e._rightWC),a$11.normalize(e._rightWC,e._rightWC)),(o||s||u||h||f||d)&&bt$3(e)}function Bt$2(e,t){var i;return i=n$1d.equalsEpsilon(Math.abs(e.z),1,n$1d.EPSILON3)?Math.atan2(t.y,t.x)-n$1d.PI_OVER_TWO:Math.atan2(e.y,e.x)-n$1d.PI_OVER_TWO,n$1d.TWO_PI-n$1d.zeroToTwoPi(i)}function Vt$2(e){return n$1d.PI_OVER_TWO-n$1d.acosClamped(e.z)}function Lt$3(e,t,i){var n=0;return n$1d.equalsEpsilon(Math.abs(e.z),1,n$1d.EPSILON3)||(n=Math.atan2(-i.z,t.z),n=n$1d.zeroToTwoPi(n+n$1d.TWO_PI)),n}var ct$4=new c$1a,lt$4=new c$1a;Object.defineProperties(p$m.prototype,{transform:{get:function(){return this._transform}},inverseTransform:{get:function(){return S$j(this),this._invTransform}},viewMatrix:{get:function(){return S$j(this),this._viewMatrix}},inverseViewMatrix:{get:function(){return S$j(this),this._invViewMatrix}},positionCartographic:{get:function(){return S$j(this),this._positionCartographic}},positionWC:{get:function(){return S$j(this),this._positionWC}},directionWC:{get:function(){return S$j(this),this._directionWC}},upWC:{get:function(){return S$j(this),this._upWC}},rightWC:{get:function(){return S$j(this),this._rightWC}},heading:{get:function(){if(this._mode!==b$1d.MORPHING){var e=this._projection.ellipsoid,t=c$1a.clone(this._transform,ct$4),i=m$13.eastNorthUpToFixedFrame(this.positionWC,e,lt$4);this._setTransform(i);var n=Bt$2(this.direction,this.up);return this._setTransform(t),n}}},pitch:{get:function(){if(this._mode!==b$1d.MORPHING){var e=this._projection.ellipsoid,t=c$1a.clone(this._transform,ct$4),i=m$13.eastNorthUpToFixedFrame(this.positionWC,e,lt$4);this._setTransform(i);var n=Vt$2(this.direction);return this._setTransform(t),n}}},roll:{get:function(){if(this._mode!==b$1d.MORPHING){var e=this._projection.ellipsoid,t=c$1a.clone(this._transform,ct$4),i=m$13.eastNorthUpToFixedFrame(this.positionWC,e,lt$4);this._setTransform(i);var n=Lt$3(this.direction,this.up,this.right);return this._setTransform(t),n}}},moveStart:{get:function(){return this._moveStart}},moveEnd:{get:function(){return this._moveEnd}},changed:{get:function(){return this._changed}},flyCircleLoop:{set:function(e){this._flyCircleLoop!==e&&(this._isResetFlyCircleParm=!0),this._flyCircleLoop=e},get:function(){return this._flyCircleLoop}},speedRatio:{get:function(){return this._speedRatio},set:function(e){this._speedRatio=e}},flyClampToGround:{set:function(e){this._flyClampToGround=e},get:function(){return this._flyClampToGround}},flyRelativeHeight:{set:function(e){this._flyRelativeHeight=e},get:function(){return this._flyRelativeHeight}},sensitivePositionRatio:{set:function(e){this._sensitivePositionRatio=n$1d.clamp(e,0,1)},get:function(){return this._sensitivePositionRatio}},preciseSensitivePosition:{set:function(e){t$$(e)&&"boolean"==typeof e&&(this._preciseSensitivePosition=e)},get:function(){return this._preciseSensitivePosition}},sensitiveRegionRatio:{set:function(e){this._sensitiveRegionRatio=e},get:function(){return this._sensitiveRegionRatio}}}),p$m.prototype._computeSensitivePosition=function(){if(this._scene.mode===b$1d.SCENE3D){var e=this._scene.canvas,t=this._scene.frameState;mt$1.x=e.clientWidth/2,mt$1.y=e.clientHeight/2;var i=void 0;if(t$$(this._scene.globe)&&this._preciseSensitivePosition&&(t$$(i=this._scene.pickPositionWorldCoordinates(mt$1,wi$1,!0))&&(this._sensitivePosition=i)),!t$$(i)){var n=this.getPickRay(mt$1),r=n$1c.WGS84;t$$(t.averageTerrainHeight)&&0!=t.averageTerrainHeight&&(r=new n$1c(n$1d.Radius+t.averageTerrainHeight,n$1d.Radius+t.averageTerrainHeight,n$1d.Radius+t.averageTerrainHeight));var o=h$1b.rayEllipsoid(n,r);if(t$$(o)){Et$3.x=e.clientWidth/2,Et$3.y=0;var a=this.getPickRay(Et$3);if(t$$(h$1b.rayEllipsoid(a,r)))this._sensitivePosition=n$18.getPoint(n,o.start);else{var s,l=a$11.magnitude(this.position);s=l<n$1d.Radius?n$1d.PI_OVER_TWO:Math.asin(n$1d.Radius/l);var u=new n$18(this.position,new a$11(-this.position.x,-this.position.y,-this.position.z)),c=new a$11(u.origin.x+u.direction.x,u.origin.y+u.direction.y,u.origin.z+u.direction.z),h=new a$11(n.origin.x+n.direction.x,n.origin.y+n.direction.y,n.origin.z+n.direction.z),d=a$11.distance(c,h),f=2*Math.asin(.5*d),p=(.5*this.frustum.fov-(s-f))/this.frustum.fov,_=e.clientHeight*(1+p)*.5;if(!Number.isNaN(_)){var m=new r$T(.5*e.clientWidth,_),$=this.getPickRay(m),g=h$1b.rayEllipsoid($,r);t$$(g)?this._sensitivePosition=n$18.getPoint($,g.start):this._sensitivePosition=void 0}}}else this._sensitivePosition=void 0}var y=t._quadtree;if(t$$(y)){_=t.context.drawingBufferHeight;var v=this.frustum.sseDenominator;if(this._positionCartographic.height,t$$(this._sensitivePosition)){var x=a$11.distance(this.positionWC,this._sensitivePosition),b=y._tileProvider.getLevelMaximumGeometricError(0);this.zoomLevel=n$1d.log2(b*_/(2*y.maximumScreenSpaceError*x*v))}}}};var Et$3=new r$T,mt$1=new r$T,wi$1=new a$11;p$m.prototype.update=function(e){if(!t$$(e))throw new t$_("mode is required.");if(e===b$1d.SCENE2D&&!(this.frustum instanceof l$W))throw new t$_("An OrthographicOffCenterFrustum is required in 2D.");if(!(e!==b$1d.SCENE3D&&e!==b$1d.COLUMBUS_VIEW||this.frustum instanceof f$V||this.frustum instanceof r$K))throw new t$_("A PerspectiveFrustum or OrthographicFrustum is required in 3D and Columbus view");var t=!1;if(e!==this._mode&&(this._mode=e,this._modeChanged=e!==b$1d.MORPHING,t=this._mode===b$1d.SCENE2D),t){var i=this._max2Dfrustum=this.frustum.clone();if(!(i instanceof l$W))throw new t$_("The camera frustum is expected to be orthographic for 2D camera control.");var n=i.top/i.right;i.right=2*this._maxCoord.x,i.left=-i.right,i.top=n*i.right,i.bottom=-i.top}this._mode===b$1d.SCENE2D&&jt$2(this,this.position);var r=this._scene.globe,o=!t$$(r)||r._surface.tileProvider.ready&&0===r._surface._tileLoadQueueHigh.length&&0===r._surface._tileLoadQueueMedium.length&&0===r._surface._tileLoadQueueLow.length&&0===r._surface._debug.tilesWaitingForChildren;this._suspendTerrainAdjustment&&(this._suspendTerrainAdjustment=!o),o&&this._adjustHeightForTerrain(),this._isFlyCircle&&this._flyCircle(this._flyCircleCenter)};var Ti$1=new a$11,Ei$1=new a$11,Pi$1=new a$11;p$m.prototype._setTransform=function(e){var t=a$11.clone(this.positionWC,Ti$1),i=a$11.clone(this.upWC,Ei$1),n=a$11.clone(this.directionWC,Pi$1);c$1a.clone(e,this._transform),this._transformChanged=!0,S$j(this);var r=this._actualInvTransform;c$1a.multiplyByPoint(r,t,this.position),c$1a.multiplyByPointAsVector(r,n,this.direction),c$1a.multiplyByPointAsVector(r,i,this.up),a$11.cross(this.direction,this.up,this.right),S$j(this)};var xi$1=new r$T,Ii$1=new n$18,Wi$1=new a$11,Ri$1=new a$11;p$m.prototype._adjustOrthographicFrustum=function(e){if(this.frustum instanceof r$K&&(e||!(this._positionCartographic.height<15e4))){if(!c$1a.equals(c$1a.IDENTITY,this.transform))return void(this.frustum.width=a$11.magnitude(this.position));var t,i,n=this._scene,r=n.globe;if(t$$(r)){var o=xi$1;o.x=n.drawingBufferWidth/2,o.y=n.drawingBufferHeight/2;var a=this.getPickRay(o,Ii$1);if(t=r.pickWorldCoordinates(a,n,Wi$1),n.pickPositionSupported&&(i=n.pickPositionWorldCoordinates(o,Ri$1)),t$$(t)&&t$$(i)){var s=t$$(i)?a$11.distance(i,this.positionWC):Number.POSITIVE_INFINITY,l=t$$(t)?a$11.distance(t,this.positionWC):Number.POSITIVE_INFINITY;this.frustum.width=Math.min(s,l)}else t$$(i)?this.frustum.width=a$11.distance(i,this.positionWC):t$$(t)&&(this.frustum.width=a$11.distance(t,this.positionWC))}if(!t$$(r)||!t$$(t)&&!t$$(i)){var u=Math.max(this.positionCartographic.height,0);this.frustum.width=u}}};var dt$3=new a$11,Pt$3=new c$1a,Mi$1=new c$1a,xt$3=new a$U,It$2=new r$W,Ut$2=new i$1g;function Si$1(e,t,i){var n=c$1a.clone(e.transform,Pt$3),r=m$13.eastNorthUpToFixedFrame(t,e._projection.ellipsoid,Mi$1);e._setTransform(r),a$11.clone(a$11.ZERO,e.position),i.heading=i.heading-n$1d.PI_OVER_TWO;var o=a$U.fromHeadingPitchRoll(i,xt$3),a=r$W.fromQuaternion(o,It$2);r$W.getColumn(a,0,e.direction),r$W.getColumn(a,2,e.up),a$11.cross(e.direction,e.up,e.right),e._setTransform(n),e._adjustOrthographicFrustum(!0)}function Oi$1(e,t,i,n){var r=c$1a.clone(e.transform,Pt$3);if(e._setTransform(c$1a.IDENTITY),!a$11.equals(t,e.positionWC)){if(n){var o=e._projection,a=o.ellipsoid.cartesianToCartographic(t,Ut$2);t=o.project(a,dt$3)}a$11.clone(t,e.position)}i.heading=i.heading-n$1d.PI_OVER_TWO;var s=a$U.fromHeadingPitchRoll(i,xt$3),l=r$W.fromQuaternion(s,It$2);r$W.getColumn(l,0,e.direction),r$W.getColumn(l,2,e.up),a$11.cross(e.direction,e.up,e.right),e._setTransform(r),e._adjustOrthographicFrustum(!0)}function Ni$1(e,t,i,n){var r=c$1a.clone(e.transform,Pt$3);if(e._setTransform(c$1a.IDENTITY),!a$11.equals(t,e.positionWC)){if(n){var o=e._projection,a=o.ellipsoid.cartesianToCartographic(t,Ut$2);t=o.project(a,dt$3)}r$T.clone(t,e.position);var s=.5*-t.z,l=-s,u=e.frustum;if(l>s){var c=u.top/u.right;u.right=l,u.left=s,u.top=u.right*c,u.bottom=-u.top}}if(e._scene.mapMode2D===Zr.ROTATE){i.heading=i.heading-n$1d.PI_OVER_TWO,i.pitch=-n$1d.PI_OVER_TWO,i.roll=0;var h=a$U.fromHeadingPitchRoll(i,xt$3),d=r$W.fromQuaternion(h,It$2);r$W.getColumn(d,2,e.up),a$11.cross(e.direction,e.up,e.right)}e._setTransform(r)}var Di$1=new a$11,Ai$1=new a$11,Fi$1=new a$11;function qt$1(e,t,i,n){var r=a$11.clone(i.direction,Di$1),o=a$11.clone(i.up,Ai$1);if(e._scene.mode===b$1d.SCENE3D){var a=e._projection.ellipsoid,s=m$13.eastNorthUpToFixedFrame(t,a,ct$4),l=c$1a.inverseTransformation(s,lt$4);c$1a.multiplyByPointAsVector(l,r,r),c$1a.multiplyByPointAsVector(l,o,o)}var u=a$11.cross(r,o,Fi$1);return n.heading=Bt$2(r,o),n.pitch=Vt$2(r),n.roll=Lt$3(r,o,u),n}var Wt$1={destination:void 0,orientation:{direction:void 0,up:void 0,heading:void 0,pitch:void 0,roll:void 0},convert:void 0,endTransform:void 0},tt$5=new e$1L;p$m.prototype.setView=function(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT);var t=e$1Y(e.orientation,e$1Y.EMPTY_OBJECT),i=this._mode;if(i!==b$1d.MORPHING){t$$(e.endTransform)&&this._setTransform(e.endTransform);var n=e$1Y(e.convert,!0),r=e$1Y(e.destination,a$11.clone(this.positionWC,dt$3));t$$(r)&&t$$(r.west)&&(r=this.getRectangleCameraCoordinates(r,dt$3),n=!1),t$$(t.direction)&&(t=qt$1(this,r,t,Wt$1.orientation)),tt$5.heading=e$1Y(t.heading,0),tt$5.pitch=e$1Y(t.pitch,-n$1d.PI_OVER_TWO),tt$5.roll=e$1Y(t.roll,0),this._suspendTerrainAdjustment=!0,i===b$1d.SCENE3D?Si$1(this,r,tt$5):i===b$1d.SCENE2D?Ni$1(this,r,tt$5,n):Oi$1(this,r,tt$5,n)}};var zi$1=new a$11;function jt$2(e,t){var i,n,r=e._scene.mapMode2D===Zr.ROTATE,o=e._maxCoord.x,a=e._maxCoord.y;r?i=-(n=o):(n=t.x-2*o,i=t.x+2*o),t.x>o&&(t.x=n),t.x<-o&&(t.x=i),t.y>a&&(t.y=a),t.y<-a&&(t.y=-a)}p$m.prototype.flyHome=function(e){var t=this._mode;if(t===b$1d.MORPHING&&this._scene.completeMorph(),t===b$1d.SCENE2D)this.flyTo({destination:p$m.DEFAULT_VIEW_RECTANGLE,duration:e,endTransform:c$1a.IDENTITY});else if(t===b$1d.SCENE3D){var i=this.getRectangleCameraCoordinates(p$m.DEFAULT_VIEW_RECTANGLE),n=a$11.magnitude(i);n+=n*p$m.DEFAULT_VIEW_FACTOR,a$11.normalize(i,i),a$11.multiplyByScalar(i,n,i),this.flyTo({destination:i,duration:e,endTransform:c$1a.IDENTITY})}else if(t===b$1d.COLUMBUS_VIEW){var r=this._projection.ellipsoid.maximumRadius,o=new a$11(0,-1,1);o=a$11.multiplyByScalar(a$11.normalize(o,o),5*r,o),this.flyTo({destination:o,duration:e,orientation:{heading:0,pitch:-Math.acos(a$11.normalize(o,zi$1).z),roll:0},endTransform:c$1a.IDENTITY,convert:!1})}},p$m.prototype.worldToCameraCoordinates=function(e,t){if(!t$$(e))throw new t$_("cartesian is required.");return t$$(t)||(t=new a$10),S$j(this),c$1a.multiplyByVector(this._actualInvTransform,e,t)},p$m.prototype.worldToCameraCoordinatesPoint=function(e,t){if(!t$$(e))throw new t$_("cartesian is required.");return t$$(t)||(t=new a$11),S$j(this),c$1a.multiplyByPoint(this._actualInvTransform,e,t)},p$m.prototype.worldToCameraCoordinatesVector=function(e,t){if(!t$$(e))throw new t$_("cartesian is required.");return t$$(t)||(t=new a$11),S$j(this),c$1a.multiplyByPointAsVector(this._actualInvTransform,e,t)},p$m.prototype.cameraToWorldCoordinates=function(e,t){if(!t$$(e))throw new t$_("cartesian is required.");return t$$(t)||(t=new a$10),S$j(this),c$1a.multiplyByVector(this._actualTransform,e,t)},p$m.prototype.cameraToWorldCoordinatesPoint=function(e,t){if(!t$$(e))throw new t$_("cartesian is required.");return t$$(t)||(t=new a$11),S$j(this),c$1a.multiplyByPoint(this._actualTransform,e,t)},p$m.prototype.cameraToWorldCoordinatesVector=function(e,t){if(!t$$(e))throw new t$_("cartesian is required.");return t$$(t)||(t=new a$11),S$j(this),c$1a.multiplyByPointAsVector(this._actualTransform,e,t)};var pt$2=new a$11;p$m.prototype.move=function(e,t){if(!t$$(e))throw new t$_("direction is required.");var i=this._scene;if(this._enableIndoorColliDetection){a$11.multiplyByScalar(e,Math.sign(t),pt$2);var n=i.collideDetection(pt$2);if(t$$(n))if(a$11.distance(this.position,n)<1)return}var r=this.position;a$11.multiplyByScalar(e,t,pt$2),a$11.add(r,pt$2,r),this._mode===b$1d.SCENE2D&&jt$2(this,r),this._adjustOrthographicFrustum(!0)},p$m.prototype.moveForward=function(e){e=e$1Y(e,this.defaultMoveAmount),this._mode===b$1d.SCENE2D?ft$1(this,e):this.move(this.direction,e)},p$m.prototype.moveBackward=function(e){e=e$1Y(e,this.defaultMoveAmount),this._mode===b$1d.SCENE2D?ft$1(this,-e):this.move(this.direction,-e)},p$m.prototype.moveUp=function(e){e=e$1Y(e,this.defaultMoveAmount),this.move(this.up,e)},p$m.prototype.moveDown=function(e){e=e$1Y(e,this.defaultMoveAmount),this.move(this.up,-e)},p$m.prototype.moveRight=function(e){e=e$1Y(e,this.defaultMoveAmount),this.move(this.right,e)},p$m.prototype.moveLeft=function(e){e=e$1Y(e,this.defaultMoveAmount),this.move(this.right,-e)},p$m.prototype.lookLeft=function(e){e=e$1Y(e,this.defaultLookAmount),this._mode!==b$1d.SCENE2D&&this.look(this.up,-e)},p$m.prototype.lookRight=function(e){e=e$1Y(e,this.defaultLookAmount),this._mode!==b$1d.SCENE2D&&this.look(this.up,e)},p$m.prototype.lookUp=function(e){e=e$1Y(e,this.defaultLookAmount),this._mode!==b$1d.SCENE2D&&this.look(this.right,-e)},p$m.prototype.lookDown=function(e){e=e$1Y(e,this.defaultLookAmount),this._mode!==b$1d.SCENE2D&&this.look(this.right,e)};var bi$1=new a$U,Bi$1=new r$W;p$m.prototype.look=function(e,t){if(!t$$(e))throw new t$_("axis is required.");var i=e$1Y(t,this.defaultLookAmount),n=a$U.fromAxisAngle(e,-i,bi$1),r=r$W.fromQuaternion(n,Bi$1),o=this.direction,a=this.up,s=this.right;r$W.multiplyByVector(r,o,o),r$W.multiplyByVector(r,a,a),r$W.multiplyByVector(r,s,s)},p$m.prototype.twistLeft=function(e){e=e$1Y(e,this.defaultLookAmount),this.look(this.direction,e)},p$m.prototype.twistRight=function(e){e=e$1Y(e,this.defaultLookAmount),this.look(this.direction,-e)};var Vi$1=new a$U,Li$1=new r$W;p$m.prototype.rotate=function(e,t){if(!t$$(e))throw new t$_("axis is required.");var i=e$1Y(t,this.defaultRotateAmount),n=a$U.fromAxisAngle(e,-i,Vi$1),r=r$W.fromQuaternion(n,Li$1);r$W.multiplyByVector(r,this.position,this.position),r$W.multiplyByVector(r,this.direction,this.direction),r$W.multiplyByVector(r,this.up,this.up),a$11.cross(this.direction,this.up,this.right),a$11.cross(this.right,this.direction,this.up),this._adjustOrthographicFrustum(!1)},p$m.prototype.rotateDown=function(e){kt$2(this,e=e$1Y(e,this.defaultRotateAmount))},p$m.prototype.rotateUp=function(e){kt$2(this,-(e=e$1Y(e,this.defaultRotateAmount)))};var Ui$1=new a$11,qi$1=new a$11,ji$1=new a$11,Ht$1=new a$11;function kt$2(e,t){var i=e.position,n=a$11.normalize(i,Ui$1);if(t$$(e.constrainedAxis)){var r=a$11.equalsEpsilon(n,e.constrainedAxis,n$1d.EPSILON2),o=a$11.equalsEpsilon(n,a$11.negate(e.constrainedAxis,Ht$1),n$1d.EPSILON2);if(r||o)(r&&t<0||o&&t>0)&&e.rotate(e.right,t);else{var a=a$11.normalize(e.constrainedAxis,qi$1),s=a$11.dot(n,a),l=n$1d.acosClamped(s);t>0&&t>l&&(t=l-n$1d.EPSILON4),s=a$11.dot(n,a$11.negate(a,Ht$1)),l=n$1d.acosClamped(s),t<0&&-t>l&&(t=-l+n$1d.EPSILON4);var u=a$11.cross(a,n,ji$1),c=a$11.dot(u,e.right);if(c<0&&t>0)return;u=c<0?a$11.negate(u,u):u,e.rotate(u,t)}}else e.rotate(e.right,t)}function Yt$1(e,t){t$$(e.constrainedAxis)?e.rotate(e.constrainedAxis,t):e.rotate(e.up,t)}function ft$1(e,t){var i,n=e.frustum;if(!(n instanceof l$W&&t$$(n.left)&&t$$(n.right)&&t$$(n.bottom)&&t$$(n.top)))throw new t$_("The camera frustum is expected to be orthographic for 2D camera control.");if(t*=.5,Math.abs(n.top)+Math.abs(n.bottom)>Math.abs(n.left)+Math.abs(n.right)){var r=n.top-t,o=n.bottom+t,a=e._maxCoord.y;e._scene.mapMode2D===Zr.ROTATE&&(a*=e.maximumZoomFactor),o>a&&(o=a,r=-a),r<=o&&(r=1,o=-1),i=n.right/n.top,n.top=r,n.bottom=o,n.right=n.top*i,n.left=-n.right}else{var s=n.right-t,l=n.left+t,u=e._maxCoord.x;e._scene.mapMode2D===Zr.ROTATE&&(u*=e.maximumZoomFactor),s>u&&(s=u,l=-u),s<=l&&(s=1,l=-1),i=n.top/n.right,n.right=s,n.left=l,n.top=n.right*i,n.bottom=-n.top}}function Gt$3(e,t){e.move(e.direction,t)}p$m.prototype.rotateRight=function(e){Yt$1(this,-(e=e$1Y(e,this.defaultRotateAmount)))},p$m.prototype.rotateLeft=function(e){Yt$1(this,e=e$1Y(e,this.defaultRotateAmount))},p$m.prototype.zoomIn=function(e){e=e$1Y(e,this.defaultZoomAmount),this._mode===b$1d.SCENE2D?ft$1(this,e):Gt$3(this,e)},p$m.prototype.zoomOut=function(e){e=e$1Y(e,this.defaultZoomAmount),this._mode===b$1d.SCENE2D?ft$1(this,-e):Gt$3(this,-e)},p$m.prototype.getMagnitude=function(){return this._mode===b$1d.SCENE3D?a$11.magnitude(this.position):this._mode===b$1d.COLUMBUS_VIEW?Math.abs(this.position.z):this._mode===b$1d.SCENE2D?Math.max(this.frustum.right-this.frustum.left,this.frustum.top-this.frustum.bottom):void 0};var Hi$1=new c$1a;p$m.prototype.lookAt=function(e,t){if(!t$$(e))throw new t$_("target is required");if(!t$$(t))throw new t$_("offset is required");if(this._mode===b$1d.MORPHING)throw new t$_("lookAt is not supported while morphing.");var i=m$13.eastNorthUpToFixedFrame(e,n$1c.WGS84,Hi$1);this.lookAtTransform(i,t)};var ki$1=new a$11,Yi=new a$U,Gi$1=new a$U,Zi=new r$W;function Zt$1(e,t,i){t=n$1d.clamp(t,-n$1d.PI_OVER_TWO,n$1d.PI_OVER_TWO),e=n$1d.zeroToTwoPi(e)-n$1d.PI_OVER_TWO;var n=a$U.fromAxisAngle(a$11.UNIT_Y,-t,Yi),r=a$U.fromAxisAngle(a$11.UNIT_Z,-e,Gi$1),o=a$U.multiply(r,n,r),a=r$W.fromQuaternion(o,Zi),s=a$11.clone(a$11.UNIT_X,ki$1);return r$W.multiplyByVector(a,s,s),a$11.negate(s,s),a$11.multiplyByScalar(s,i,s),s}p$m.prototype.lookAtTransform=function(e,t){if(!t$$(e))throw new t$_("transform is required");if(this._mode===b$1d.MORPHING)throw new t$_("lookAtTransform is not supported while morphing.");if(this._setTransform(e),t$$(t)){var i;if(i=t$$(t.heading)?Zt$1(t.heading,t.pitch,t.range):t,this._mode===b$1d.SCENE2D){r$T.clone(r$T.ZERO,this.position),a$11.negate(i,this.up),this.up.z=0,a$11.magnitudeSquared(this.up)<n$1d.EPSILON10&&a$11.clone(a$11.UNIT_Y,this.up),a$11.normalize(this.up,this.up),this._setTransform(c$1a.IDENTITY),a$11.negate(a$11.UNIT_Z,this.direction),a$11.cross(this.direction,this.up,this.right),a$11.normalize(this.right,this.right);var n=this.frustum,r=n.top/n.right;return n.right=.5*a$11.magnitude(i),n.left=-n.right,n.top=r*n.right,n.bottom=-n.top,void this._setTransform(e)}a$11.clone(i,this.position),a$11.negate(this.position,this.direction),a$11.normalize(this.direction,this.direction),a$11.cross(this.direction,a$11.UNIT_Z,this.right),a$11.magnitudeSquared(this.right)<n$1d.EPSILON10&&a$11.clone(a$11.UNIT_X,this.right),a$11.normalize(this.right,this.right),a$11.cross(this.right,this.direction,this.up),a$11.normalize(this.up,this.up),this._adjustOrthographicFrustum(!0)}};var ot$3=new i$1g,Qi=new i$1g,Xi$1=new a$11,Ji=new a$11,Ki=new a$11,$i=new a$11,te$9=new a$11,ie$9=new a$11,ee$a=new a$11,Rt$2=new a$11,oe$a={direction:new a$11,right:new a$11,up:new a$11},Qt$2;function D$m(e,t,i,n){return Math.abs(a$11.dot(t,i))/n-a$11.dot(e,i)}function Xt$1(e,t,i,n){var r=e._projection.ellipsoid,o=n?e:oe$a,a=t.north,s=t.south,l=t.east,u=t.west;u>l&&(l+=n$1d.TWO_PI);var c,h=.5*(u+l);if(s<-n$1d.PI_OVER_TWO+n$1d.RADIANS_PER_DEGREE&&a>n$1d.PI_OVER_TWO-n$1d.RADIANS_PER_DEGREE)c=0;else{var d=ot$3;d.longitude=h,d.latitude=a,d.height=0;var f=Qi;f.longitude=h,f.latitude=s,f.height=0;var p=Qt$2;(!t$$(p)||p.ellipsoid!==r)&&(Qt$2=p=new D$Y(void 0,void 0,r)),p.setEndPoints(d,f),c=p.interpolateUsingFraction(.5,ot$3).latitude}var _=ot$3;_.longitude=h,_.latitude=c,_.height=0;var m=r.cartographicToCartesian(_,ee$a),$=ot$3;$.longitude=l,$.latitude=a;var g=r.cartographicToCartesian($,Xi$1);$.longitude=u;var y=r.cartographicToCartesian($,Ki);$.longitude=h;var v=r.cartographicToCartesian($,te$9);$.latitude=s;var x=r.cartographicToCartesian($,ie$9);$.longitude=l;var b=r.cartographicToCartesian($,$i);$.longitude=u;var S=r.cartographicToCartesian($,Ji);a$11.subtract(y,m,y),a$11.subtract(b,m,b),a$11.subtract(g,m,g),a$11.subtract(S,m,S),a$11.subtract(v,m,v),a$11.subtract(x,m,x);var w=r.geodeticSurfaceNormal(m,o.direction);a$11.negate(w,w);var C=a$11.cross(w,a$11.UNIT_Z,o.right);a$11.normalize(C,C);var T,P=a$11.cross(C,w,o.up);if(e.frustum instanceof r$K){var E,A,L=Math.max(a$11.distance(g,y),a$11.distance(b,S)),M=Math.max(a$11.distance(g,b),a$11.distance(y,S)),I=e.frustum._offCenterFrustum.right/e.frustum._offCenterFrustum.top,O=M*I;L>O?A=(E=L)/I:(A=M,E=O),T=Math.max(E,A)}else{var D=Math.tan(.5*e.frustum.fovy),R=e.frustum.aspectRatio*D;if(T=Math.max(D$m(w,P,y,D),D$m(w,P,b,D),D$m(w,P,g,D),D$m(w,P,S,D),D$m(w,P,v,D),D$m(w,P,x,D),D$m(w,C,y,R),D$m(w,C,b,R),D$m(w,C,g,R),D$m(w,C,S,R),D$m(w,C,v,R),D$m(w,C,x,R)),s<0&&a>0){var N=ot$3;N.longitude=u,N.latitude=0,N.height=0;var F=r.cartographicToCartesian(N,Rt$2);a$11.subtract(F,m,F),T=Math.max(T,D$m(w,P,F,D),D$m(w,C,F,R)),N.longitude=l,F=r.cartographicToCartesian(N,Rt$2),a$11.subtract(F,m,F),T=Math.max(T,D$m(w,P,F,D),D$m(w,C,F,R))}}return a$11.add(m,a$11.multiplyByScalar(w,-T,Rt$2),i)}var re$c=new i$1g,ne$7=new a$11,se$7=new a$11;function ae$9(e,t,i){var n=e._projection;t.west>t.east&&(t=s$1p.MAX_VALUE);var r=e._actualTransform,o=e._actualInvTransform,a=re$c;a.longitude=t.east,a.latitude=t.north;var s=n.project(a,ne$7);c$1a.multiplyByPoint(r,s,s),c$1a.multiplyByPoint(o,s,s),a.longitude=t.west,a.latitude=t.south;var l=n.project(a,se$7);if(c$1a.multiplyByPoint(r,l,l),c$1a.multiplyByPoint(o,l,l),i.x=.5*(s.x-l.x)+l.x,i.y=.5*(s.y-l.y)+l.y,t$$(e.frustum.fovy)){var u=Math.tan(.5*e.frustum.fovy),c=e.frustum.aspectRatio*u;i.z=.5*Math.max((s.x-l.x)/c,(s.y-l.y)/u)}else{var h=s.x-l.x,d=s.y-l.y;i.z=Math.max(h,d)}return i}var he$7=new i$1g,ue$7=new a$11,ce$7=new a$11;function le$e(e,t,i){var n=e._projection;t.west>t.east&&(t=s$1p.MAX_VALUE);var r=he$7;r.longitude=t.east,r.latitude=t.north;var o=n.project(r,ue$7);r.longitude=t.west,r.latitude=t.south;var a,s,l=n.project(r,ce$7),u=.5*Math.abs(o.x-l.x),c=.5*Math.abs(o.y-l.y),h=e.frustum.right/e.frustum.top,d=c*h;return u>d?s=(a=u)/h:(s=c,a=d),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,(r=n.unproject(i,r)).height=c,i=n.project(r,i)}p$m.prototype.getRectangleCameraCoordinates=function(e,t){if(!t$$(e))throw new t$_("rectangle is required");var i=this._mode;return t$$(t)||(t=new a$11),i===b$1d.SCENE3D?Xt$1(this,e,t):i===b$1d.COLUMBUS_VIEW?ae$9(this,e,t):i===b$1d.SCENE2D?le$e(this,e,t):void 0};var me$b=new n$18;function de$8(e,t,i,n){i=e$1Y(i,n$1c.WGS84);var r=e.getPickRay(t,me$b),o=h$1b.rayEllipsoid(r,i);if(o){var a=o.start>0?o.start:o.stop;return n$18.getPoint(r,a,n)}}var pe$8=new n$18;function fe$7(e,t,i,n){var r=e.getPickRay(t,pe$8).origin;r.z=0;var o=i.unproject(r);if(!(o.latitude<-n$1d.PI_OVER_TWO||o.latitude>n$1d.PI_OVER_TWO))return i.ellipsoid.cartographicToCartesian(o,n)}var _e$7=new n$18;function ge$7(e,t,i,n){var r=e.getPickRay(t,_e$7),o=-r.origin.x/r.direction.x;n$18.getPoint(r,o,n);var a=i.unproject(new a$11(n.y,n.z,0));if(!(a.latitude<-n$1d.PI_OVER_TWO||a.latitude>n$1d.PI_OVER_TWO||a.longitude<-Math.PI||a.longitude>Math.PI))return i.ellipsoid.cartographicToCartesian(a,n)}p$m.prototype.pickEllipsoid=function(e,t,i){if(!t$$(e))throw new t$_("windowPosition is required.");var n=this._scene.canvas;if(0!==n.clientWidth&&0!==n.clientHeight){if(t$$(i)||(i=new a$11),t=e$1Y(t,n$1c.WGS84),this._mode===b$1d.SCENE3D)i=de$8(this,e,t,i);else if(this._mode===b$1d.SCENE2D)i=fe$7(this,e,this._projection,i);else{if(this._mode!==b$1d.COLUMBUS_VIEW)return;i=ge$7(this,e,this._projection,i)}return i}};var ve$8=new a$11,Ce$8=new a$11,ye$a=new a$11;function we$7(e,t,i){var n=e._scene.canvas,r=n.clientWidth,o=n.clientHeight,a=Math.tan(.5*e.frustum.fovy),s=e.frustum.aspectRatio*a,l=e.frustum.near,u=2/r*t.x-1,c=2/o*(o-t.y)-1,h=e.positionWC;a$11.clone(h,i.origin);var d=a$11.multiplyByScalar(e.directionWC,l,ve$8);a$11.add(h,d,d);var f=a$11.multiplyByScalar(e.rightWC,u*l*s,Ce$8),p=a$11.multiplyByScalar(e.upWC,c*l*a,ye$a),_=a$11.add(d,f,i.direction);return a$11.add(_,p,_),a$11.subtract(_,h,_),a$11.normalize(_,_),i}var _t$2=new a$11;function Te$8(e,t,i){var n=e._scene.canvas,r=n.clientWidth,o=n.clientHeight,a=e.frustum;t$$(a._offCenterFrustum)&&(a=a._offCenterFrustum);var s=2/r*t.x-1;s*=.5*(a.right-a.left);var l=2/o*(o-t.y)-1;l*=.5*(a.top-a.bottom);var u=i.origin;return a$11.clone(e.position,u),a$11.multiplyByScalar(e.right,s,_t$2),a$11.add(_t$2,u,u),a$11.multiplyByScalar(e.up,l,_t$2),a$11.add(_t$2,u,u),a$11.clone(e.directionWC,i.direction),e._mode===b$1d.COLUMBUS_VIEW&&a$11.fromElements(i.origin.z,i.origin.x,i.origin.y,i.origin),i}p$m.prototype.getPickRay=function(e,t){if(!t$$(e))throw new t$_("windowPosition is required.");t$$(t)||(t=new n$18);var i=this.frustum;return t$$(i.aspectRatio)&&t$$(i.fov)&&t$$(i.near)?we$7(this,e,t):Te$8(this,e,t)};var Ee$a=new a$11,Pe$9=new a$11;p$m.prototype.distanceToBoundingSphere=function(e){if(!t$$(e))throw new t$_("boundingSphere is required.");var t=a$11.subtract(this.positionWC,e.center,Ee$a),i=a$11.multiplyByScalar(this.directionWC,a$11.dot(t,this.directionWC),Pe$9);return Math.max(0,a$11.magnitude(i)-e.radius)};var xe$e=new r$T;function Ie$8(e,t,i,n,r,o){var a=a$11.clone(t);return i.y>n?a.y-=i.y-n:i.y<-n&&(a.y+=-n-i.y),i.z>r?a.z-=i.z-r:i.z<-r&&(a.z+=-r-i.z),{easingFunction:_$T.EXPONENTIAL_OUT,startObject:{time:0},stopObject:{time:1},duration:o,update:function(i){var n=a$11.lerp(t,a,i.time,new a$11);e.worldToCameraCoordinatesPoint(n,e.position)}}}p$m.prototype.getPixelSize=function(e,t,i){if(!t$$(e))throw new t$_("boundingSphere is required.");if(!t$$(t))throw new t$_("drawingBufferWidth is required.");if(!t$$(i))throw new t$_("drawingBufferHeight is required.");var n=this.distanceToBoundingSphere(e),r=this.frustum.getPixelDimensions(t,i,n,this._scene.pixelRatio,xe$e);return Math.max(r.x,r.y)};var We$3=new a$11,Jt$2=new a$11,Re$6=new a$11,Me$a=new a$11;function Se$8(e,t){var i=e.position,n=e.direction,r=e.worldToCameraCoordinatesVector(a$11.UNIT_X,We$3),o=-a$11.dot(r,i)/a$11.dot(r,n),a=a$11.add(i,a$11.multiplyByScalar(n,o,Jt$2),Jt$2);e.cameraToWorldCoordinatesPoint(a,a),i=e.cameraToWorldCoordinatesPoint(e.position,Re$6);var s=Math.tan(.5*e.frustum.fovy),l=e.frustum.aspectRatio*s,u=a$11.magnitude(a$11.subtract(i,a,Me$a)),c=l*u,h=s*u,d=e._maxCoord.x,f=e._maxCoord.y,p=Math.max(c-d,d),_=Math.max(h-f,f);if(i.z<-p||i.z>p||i.y<-_||i.y>_){var m=a.y<-p||a.y>p,$=a.z<-_||a.z>_;if(m||$)return Ie$8(e,i,a,p,_,t)}}p$m.prototype.createCorrectPositionTween=function(e){if(!t$$(e))throw new t$_("duration is required.");if(this._mode===b$1d.COLUMBUS_VIEW)return Se$8(this,e)};var Oe$7=new a$11,R$f={destination:void 0,heading:void 0,pitch:void 0,roll:void 0,duration:void 0,complete:void 0,cancel:void 0,endTransform:void 0,maximumHeight:void 0,easingFunction:void 0};function Ne$4(e,t){var i=e.frustum,n=Math.tan(.5*i.fovy),r=i.aspectRatio*n;return Math.max(t/r,t/n)}function De$a(e,t){var i=e.frustum;t$$(i._offCenterFrustum)&&(i=i._offCenterFrustum);var n,r,o=i.right/i.top,a=t*o;return t>a?r=(n=t)/o:(r=t,n=a),1.5*Math.max(n,r)}p$m.prototype.cancelFlight=function(){t$$(this._currentFlight)&&(this._currentFlight.cancelTween(),this._currentFlight=void 0)},p$m.prototype.flyTo=function(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).destination;if(!t$$(t))throw new t$_("destination is required.");if(this._mode!==b$1d.MORPHING){this.cancelFlight();var i=e$1Y(e.orientation,e$1Y.EMPTY_OBJECT);if(t$$(i.direction)&&(i=qt$1(this,t,i,Wt$1.orientation)),t$$(e.duration)&&e.duration<=0){var n=Wt$1;return n.destination=e.destination,n.orientation.heading=i.heading,n.orientation.pitch=i.pitch,n.orientation.roll=i.roll,n.convert=e.convert,n.endTransform=e.endTransform,this.setView(n),void("function"==typeof e.complete&&e.complete())}var r=t$$(t.west);r&&(t=this.getRectangleCameraCoordinates(t,Oe$7));var o,a=this;R$f.destination=t,R$f.heading=i.heading,R$f.pitch=i.pitch,R$f.roll=i.roll,R$f.duration=e.duration,R$f.complete=function(){o===a._currentFlight&&(a._currentFlight=void 0),t$$(e.complete)&&e.complete()},R$f.cancel=e.cancel,R$f.endTransform=e.endTransform,R$f.convert=!r&&e.convert,R$f.maximumHeight=e.maximumHeight,R$f.pitchAdjustHeight=e.pitchAdjustHeight,R$f.flyOverLongitude=e.flyOverLongitude,R$f.flyOverLongitudeWeight=e.flyOverLongitudeWeight,R$f.easingFunction=e.easingFunction,R$f.headingFree=e$1Y(e.headingFree,!1),R$f.pitchFree=e$1Y(e.pitchFree,!1),R$f.altitudeFree=e$1Y(e.altitudeFree,!1),R$f.directTurning=e$1Y(e.directTurning,!1),R$f.interpolationMode=e$1Y(e.interpolationMode,hi$2.NONE),R$f.catmullRomSpline=e.catmullRomSpline,R$f.preStopIndex=e.preStopIndex,R$f.flyClampToGround=this._flyClampToGround,R$f.flyRelativeHeight=this._flyRelativeHeight;var s=this._scene,l=mt$2.createTween(s,R$f);if(0===l.duration)return void("function"==typeof l.complete&&l.complete());o=s.tweens.add(l),this._currentFlight=o;var u=this._scene.preloadFlightCamera;this._mode!==b$1d.SCENE2D&&(t$$(u)||(u=p$m.clone(this)),u.setView({destination:t,orientation:i}),this._scene.preloadFlightCullingVolume=u.frustum.computeCullingVolume(u.positionWC,u.directionWC,u.upWC))}};var Ae$7=100;function Kt$1(e,t,i){t$$(i)||(i=h$V.clone(p$m.DEFAULT_OFFSET));var n=e._scene.screenSpaceCameraController.minimumZoomDistance,r=e._scene.screenSpaceCameraController.maximumZoomDistance,o=i.range;if(!t$$(o)||0===o){var a=t.radius;0===a?i.range=Ae$7:e.frustum instanceof r$K||e._mode===b$1d.SCENE2D?i.range=De$a(e,a):i.range=Ne$4(e,a),i.range=n$1d.clamp(i.range,n,r)}return i}p$m.prototype.viewBoundingSphere=function(e,t){if(!t$$(e))throw new t$_("boundingSphere is required.");if(this._mode===b$1d.MORPHING)throw new t$_("viewBoundingSphere is not supported while morphing.");t=Kt$1(this,e,t),this.lookAt(e.center,t)};var Fe$5=new c$1a,ze$4=new a$11,be$a=new a$11,Be$8=new a$11,Ve$6=new a$11,Le$7=new a$10,Ue$3=new a$U,qe$4=new r$W;p$m.prototype.flyToBoundingSphere=function(e,t){if(!t$$(e))throw new t$_("boundingSphere is required.");t=e$1Y(t,e$1Y.EMPTY_OBJECT);var i=this._mode===b$1d.SCENE2D||this._mode===b$1d.COLUMBUS_VIEW;this._setTransform(c$1a.IDENTITY);var n,r=Kt$1(this,e,t.offset);n=i?a$11.multiplyByScalar(a$11.UNIT_Z,r.range,ze$4):Zt$1(r.heading,r.pitch,r.range);var o,a,s=m$13.eastNorthUpToFixedFrame(e.center,n$1c.WGS84,Fe$5);if(c$1a.multiplyByPoint(s,n,n),!i){if(o=a$11.subtract(e.center,n,be$a),a$11.normalize(o,o),a=c$1a.multiplyByPointAsVector(s,a$11.UNIT_Z,Be$8),1-Math.abs(a$11.dot(o,a))<n$1d.EPSILON6){var l=a$U.fromAxisAngle(o,r.heading,Ue$3),u=r$W.fromQuaternion(l,qe$4);a$11.fromCartesian4(c$1a.getColumn(s,1,Le$7),a),r$W.multiplyByVector(u,a,a)}var c=a$11.cross(o,a,Ve$6);a$11.cross(c,o,a),a$11.normalize(a,a)}this.flyTo({destination:n,orientation:{direction:o,up:a},duration:t.duration,complete:t.complete,cancel:t.cancel,endTransform:t.endTransform,maximumHeight:t.maximumHeight,easingFunction:t.easingFunction,flyOverLongitude:t.flyOverLongitude,flyOverLongitudeWeight:t.flyOverLongitudeWeight,pitchAdjustHeight:t.pitchAdjustHeight})};var $t$1=new a$11,ti=new a$11,Mt$3=new a$11,ii=new a$11,rt$3=[new a$11,new a$11,new a$11,new a$11];function je$4(e,t){var i,n,r=t.radii,o=e.positionWC,a=a$11.multiplyComponents(t.oneOverRadii,o,$t$1),s=a$11.magnitude(a),l=a$11.normalize(a,ti);a$11.equalsEpsilon(l,a$11.UNIT_Z,n$1d.EPSILON10)?(i=new a$11(0,1,0),n=new a$11(0,0,1)):(i=a$11.normalize(a$11.cross(a$11.UNIT_Z,l,Mt$3),Mt$3),n=a$11.normalize(a$11.cross(l,i,ii),ii));var u=Math.sqrt(a$11.magnitudeSquared(a)-1),c=a$11.multiplyByScalar(l,1/s,$t$1),h=u/s,d=a$11.multiplyByScalar(i,h,ti),f=a$11.multiplyByScalar(n,h,Mt$3),p=a$11.add(c,f,rt$3[0]);a$11.subtract(p,d,p),a$11.multiplyComponents(r,p,p);var _=a$11.subtract(c,f,rt$3[1]);a$11.subtract(_,d,_),a$11.multiplyComponents(r,_,_);var m=a$11.subtract(c,f,rt$3[2]);a$11.add(m,d,m),a$11.multiplyComponents(r,m,m);var $=a$11.add(c,f,rt$3[3]);return a$11.add($,d,$),a$11.multiplyComponents(r,$,$),rt$3}var St$3=new r$T,He$3=new a$11,Q$f=[new i$1g,new i$1g,new i$1g,new i$1g];function gt$1(e,t,i,n,r,o){St$3.x=e,St$3.y=t;var a=n.pickEllipsoid(St$3,r,He$3);return t$$(a)?(Q$f[i]=r.cartesianToCartographic(a,Q$f[i]),1):(Q$f[i]=r.cartesianToCartographic(o[i],Q$f[i]),0)}function ke$3(e,t){var i=e.distance,n=e.normal;t[0]=-2*n.x*n.x+1,t[1]=-2*n.y*n.x,t[2]=-2*n.z*n.x,t[3]=0,t[4]=-2*n.x*n.y,t[5]=-2*n.y*n.y+1,t[6]=-2*n.z*n.y,t[7]=0,t[8]=-2*n.x*n.z,t[9]=-2*n.y*n.z,t[10]=-2*n.z*n.z+1,t[11]=0,t[12]=-2*n.x*i,t[13]=-2*n.y*i,t[14]=-2*n.z*i,t[15]=1}p$m.prototype.computeViewRectangle=function(e,t){e=e$1Y(e,n$1c.WGS84);var i=this.frustum.computeCullingVolume(this.positionWC,this.directionWC,this.upWC),n=new c$19(a$11.ZERO,e.maximumRadius);if(i.computeVisibility(n)!==cr$4.OUTSIDE){var r=this._scene.canvas,o=r.clientWidth,a=r.clientHeight,s=0,l=je$4(this,e);if(s+=gt$1(0,0,0,this,e,l),s+=gt$1(0,a,1,this,e,l),s+=gt$1(o,a,2,this,e,l),(s+=gt$1(o,0,3,this,e,l))<2)return s$1p.MAX_VALUE;t=s$1p.fromCartographicArray(Q$f,t);for(var u=0,c=Q$f[3].longitude,h=0;h<4;++h){var d=Q$f[h].longitude,f=Math.abs(d-c);f>n$1d.PI?u+=n$1d.TWO_PI-f:u+=f,c=d}return n$1d.equalsEpsilon(Math.abs(u),n$1d.TWO_PI,n$1d.EPSILON9)&&(t.west=-n$1d.PI,t.east=n$1d.PI,Q$f[0].latitude>=0?t.north=n$1d.PI_OVER_TWO:t.south=-n$1d.PI_OVER_TWO),t}},p$m.prototype.switchToPerspectiveFrustum=function(){if(!(this._mode===b$1d.SCENE2D||this.frustum instanceof f$V)){var e=this._scene;this.frustum=new f$V,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=n$1d.toRadians(60)}},p$m.prototype.switchToOrthographicFrustum=function(){if(!(this._mode===b$1d.SCENE2D||this.frustum instanceof r$K)){var e=this._scene;this.frustum=new r$K,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.width=a$11.magnitude(this.position),t$$(this.frustum.projectionMatrix)&&this._adjustOrthographicFrustum(!0)}},p$m.clone=function(e,t){return t$$(t)||(t=new p$m(e._scene)),a$11.clone(e.position,t.position),a$11.clone(e.direction,t.direction),a$11.clone(e.up,t.up),a$11.clone(e.right,t.right),c$1a.clone(e._transform,t.transform),t._mode=e._mode,t._transformChanged=!0,t.frustum=e.frustum.clone(),t},p$m.prototype.enableReflection=function(e){this.bReflect=!0,ke$3(e,this._reflectMatrix),S$j(this),this.frustum.reflect=!0,this.frustum.clipPlane=e,this.frustum.currentViewMatrix=this._viewMatrix},p$m.prototype.disableReflection=function(){this.bReflect=!1,this.frustum.reflect=!1,this.frustum instanceof f$V&&this.frustum.resetProjectionMatrix(),S$j(this)};var Ye$4=new c$1a,Ge$3=new c$1a,J$g=0,vt$2=!1;function b$p(e,t){if(n$1e.defined("context",e),!t$$(t))throw new t$_("urls is required and must have the url of image.");this._context=e,this._size=0,this._cubeVs=void 0,this._cubeUniformMap=void 0,this._cubeRenderState=void 0,this._inputTexture=void 0,this._cubeMap=void 0,this._sourceData=void 0,this._loading=!1,this._url=t,this._rgbeLoader=new F$l,this._inputTexture=void 0,this._ready=!1,this._position=a$11.fromDegrees(113,23,1),this._modelMatrix=m$13.eastNorthUpToFixedFrame(this._position)}function le$d(e){let t=[],i=[],n=0;function r(e,r,o,a,s,l,u,c,h,d,f){const p=l/h,_=u/d,m=l/2,$=u/2,g=c/2,y=h+1,v=d+1;let x=0;const b=new a$11;for(let i=0;i<v;i++){const n=i*_-$;for(let i=0;i<y;i++){const l=i*p-m;b[e]=l*a,b[r]=n*s,b[o]=g,t.push(b.x,b.y,b.z),b[e]=0,b[r]=0,b[o]=c>0?1:-1,x+=1}}for(let e=0;e<d;e++)for(let t=0;t<h;t++){const r=n+t+y*e,o=n+t+y*(e+1),a=n+(t+1)+y*(e+1),s=n+(t+1)+y*e;i.push(r,o,s),i.push(o,a,s)}n+=x}r("z","y","x",-1,-1,1,1,1,1,1),r("z","y","x",1,-1,1,1,-1,1,1),r("x","z","y",1,1,1,1,1,1,1),r("x","z","y",1,-1,1,1,-1,1,1),r("x","y","z",1,-1,1,1,1,1,1),r("x","y","z",-1,-1,1,1,-1,1,1);let o=new Uint16Array(i),a=new Float32Array(t),s=new T$11({attributes:{position:new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:a})},indices:o,primitiveType:H$11.TRIANGLES,boundingSphere:c$19.fromVertices(a)});return x$18.fromGeometry({context:e,geometry:s,attributeLocations:{position:0},bufferUsage:A$13.STATIC_DRAW})}function xe$d(e){return p$15.fromCache({context:e,vertexShaderSource:"\n precision mediump float;\n precision mediump int;\n\n attribute vec3 position;\n uniform mat4 projectionMat4;\n\n varying vec3 vWorldDirection;\n\n void main() {\n vWorldDirection = normalize(position);\n gl_Position = czm_modelViewProjection * vec4(position, 1.0);\n }\n ",fragmentShaderSource:"\n precision mediump float;\n precision mediump int;\n\n varying vec3 vWorldDirection;\n uniform sampler2D tEquirect;\n\n #define RECIPROCAL_PI 0.3183098861837907\n #define RECIPROCAL_PI2 0.15915494309189535\n\n vec2 equirectUv( in vec3 dir ) {\n // dir is assumed to be unit length\n float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n return vec2( u, v );\n }\n\n void main() {\n vec3 direction = normalize( vWorldDirection );\n vec2 sampleUV = equirectUv( direction );\n gl_FragColor = texture2D( tEquirect, sampleUV );\n }\n",attributeLocations:{position:0}})}function ye$9(e,t){let i=t;const n=e.context;i._cubeVs=le$d(n),i._cubeSp=xe$d(n),i._cubeUniformMap={tEquirect:function(){return i._inputTexture}},i._cubeRenderState=p$1a.fromCache({cull:{enabled:!1},depthTest:{enabled:!1},viewport:new n$13(0,0,i._size,i._size)}),i._cubeMap=new X$y({context:n,width:i._size,height:i._size,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.HALF_FLOAT,flipY:!0});let r=c$1a.getRotation(i._modelMatrix,new r$W),o=r$W.getColumn(r,0,new a$11),a=r$W.getColumn(r,1,new a$11),s=r$W.getColumn(r,2,new a$11),l=a$11.multiplyByScalar(s,-1,new a$11),u=a$11.multiplyByScalar(a,-1,new a$11),c=a$11.multiplyByScalar(o,-1,new a$11),h=new p$m(e.camera._scene);h.frustum.near=.1,h.frustum.aspectRatio=1,h.frustum.fov=90*n$1d.RADIANS_PER_DEGREE,i._projectionMat4=c$1a.clone(h.frustum.projectionMatrix,i._projectionMat4);let d=[o,l,a,c,s,u],f=[s,a,s,s,a,s],p=[i._cubeMap.positiveX,i._cubeMap.positiveY,i._cubeMap.positiveZ,i._cubeMap.negativeX,i._cubeMap.negativeY,i._cubeMap.negativeZ];for(let t=0;t<6;t++){let r=new u$F({context:n,colorTextures:[p[t]]}),o=new s$1d({vertexArray:i._cubeVs,shaderProgram:i._cubeSp,uniformMap:i._cubeUniformMap,pass:we$l.OPAQUE,primitiveType:H$11.TRIANGLES,renderState:i._cubeRenderState,modelMatrix:i._modelMatrix,cull:!1,owner:i,framebuffer:r,pickOnly:!0});h.setView({destination:i._position,orientation:{direction:d[t],up:f[t]}}),e.context.uniformState.updateCamera(h);let a=new t$l(e.context);e.context.draw(o,a)}}p$m.prototype.flyCircle=function(e){J$g=0,vt$2=!1,this._isFlyCircle=!1,this._flyCircle(e)},p$m.prototype._flyCircle=function(e){if(this._flyCircleLoop||!vt$2){(!this._isFlyCircle||this._isResetFlyCircleParm)&&(yt$9(),J$g=0,vt$2=!1,this._flyCircleCenter=a$11.clone(e),this._isFlyCircle=!0,this._isResetFlyCircleParm=!1);var t=this.constrainedAxis,i=c$1a.clone(this.transform,Ge$3),n=m$13.eastNorthUpToFixedFrame(e,n$1c.WGS84,Ye$4);this._setTransform(n),this.constrainedAxis=a$11.UNIT_Z,yt$9();var r=.01;r*=this._speedRatio;var o=2*Math.PI-Math.abs(J$g);J$g<0&&(o*=-1),!this._flyCircleLoop&&Math.abs(J$g)>=2*Math.PI&&(r=o,vt$2=!0),J$g+=r,this.rotateRight(-r),this.constrainedAxis=t,this._setTransform(i)}else J$g=0},p$m.prototype.stopFlyCircle=function(){this._isFlyCircle=!1},Object.defineProperties(b$p.prototype,{cubeMap:{get:function(){return this._cubeMap}},ready:{get:function(){return this._ready}}});let ve$7=/(\.hdr$)/i,be$9=/(\.jpg$)/i;function V$h(e){if(!t$$(e))throw new t$_("scene are required.");if(!e.context.depthTexture)throw new t$_("the depth buffer is not supported.");this._scene=e,this._depthBuffer=void 0,this._depthDownBuffer=void 0,this._depthDownReverBuffer=void 0,this._depthLeftBuffer=void 0,this._depthLeftReverBuffer=void 0,this._depthTopBuffer=void 0,this._depthValue=void 0,this._dataBuffer=void 0,this._frameState=void 0,this._textureWidth=1024,this._textureHeight=1024,this._startPoint3D=[0,0,0],this._endPoint3D=[0,0,0],this._extendHeight=0,this._bManualChangeExtendHeight=!1,this._v3ProfileDir=new a$11(0,0,0),this._v3MiddlePosition=new a$11(0,0,0),this._v3ProfileNormal=new a$11(0,0,0),this._viewMatrix=new c$1a,this._projMatrix=new c$1a,this._update=!0,this._visibleViewport=4095,this._id=0,this._name="",this._downName="",this._downReverName="",this._leftName="",this._leftReverName="",this._topName="",this._func=void 0,this._isGetPositions=!1,this._positions=[]}function Y$f(e,t,i){var n=i.camera._projection,r=.5*(e.startPoint[2]+e.endPoint[2]),o=new a$11;if(o.x=.5*(e.endPoint[0]-e.startPoint[0])+e.startPoint[0],o.y=.5*(e.endPoint[1]-e.startPoint[1])+e.startPoint[1],o.z=r,e._scene.mode===b$1d.SCENE3D){var a=a$11.fromDegreesArrayHeights([e.startPoint[0],e.startPoint[1],r])[0],s=a$11.fromDegreesArrayHeights([e.endPoint[0],e.endPoint[1],r])[0];a$11.subtract(s,a,e._v3ProfileDir),e._v3MiddlePosition=a$11.fromDegreesArrayHeights([o.x,o.y,r])[0];var l=new a$11;e._v3MiddlePosition.clone(l),a$11.normalize(l,l)}else{a=n.project(i$1g.fromDegrees(e.startPoint[0],e.startPoint[1],e.startPoint[2]),new a$11),s=n.project(i$1g.fromDegrees(e.endPoint[0],e.endPoint[1],e.startPoint[2]),new a$11);a$11.subtract(s,a,e._v3ProfileDir);var u=i$1g.fromDegrees(o.x,o.y,r);e._v3MiddlePosition=n.project(u,new a$11),e._oriPos=n.project(i$1g.fromDegrees(o.x,o.y,-6378137),new a$11);l=new a$11;a$11.subtract(e._v3MiddlePosition,e._oriPos,l),a$11.normalize(l,l)}var c=new a$11;e._v3ProfileDir.clone(c),a$11.normalize(c,c),a$11.cross(c,l,e._v3ProfileNormal),a$11.normalize(e._v3ProfileNormal,e._v3ProfileNormal)}function k$l(e,t,i){e._textureWidth=t.drawingBufferWidth,e._textureHeight=t.drawingBufferHeight,e._textureWidth=e._textureWidth<=1?1:e._textureWidth,e._textureHeight=e._textureHeight<=1?1:e._textureHeight;var n=e._textureWidth*e._textureHeight;e._depthValue=new Float32Array(n),e._dataBuffer=new Uint8Array(4*n);for(var r=0;r<n;r++)e._depthValue[r]=1,e._dataBuffer[4*r]=0,e._dataBuffer[4*r+1]=0,e._dataBuffer[4*r+2]=0,e._dataBuffer[4*r+3]=255}function $$e(e,t){var i=t.depthData,n=t.viewProjection,r=t.invViewProjection;c$1a.multiply(e._projMatrix,e._viewMatrix,n);for(var o=new a$10,a=new a$10(1,1/255,1/65025,1/160581375),s=e._scene.context.uniformState,l=s.currentFrustum,u=l.x,c=l.y,h=0;h<e._textureHeight;h++)for(var d=0;d<e._textureWidth;d++){var f=h*e._textureWidth+d,p=a$10.unpack(i,4*f,o);a$10.divideByScalar(p,255,p);var _=a$10.dot(p,a);if(!(_<=0)){if(e._scene.frameState.useLogDepth){var m=_*s.log2FarDepthFromNearPlusOne;_=c*(1-u/(Math.pow(2,m)-1+u))/(c-u)}o.x=d/e._textureWidth*2-1,o.y=h/e._textureHeight*2-1,o.z=2*_-1,o.w=1,c$1a.multiplyByVector(r,o,o),a$10.divideByScalar(o,o.w,o);var $=new a$11(o.x,o.y,o.z);c$1a.multiplyByVector(n,o,o),a$10.divideByScalar(o,o.w,o),o.x=.5*o.x+.5,o.y=.5*o.y+.5;var g=Math.round(o.x*e._textureWidth),y=Math.round(o.y*e._textureHeight);if(g>=0&&g<e._textureWidth&&y>=0&&y<e._textureHeight){var v=o.z;if(v<=1&&v>=-1){var x=g+(e._textureHeight-y)*e._textureWidth;e._dataBuffer[4*x]=0,e._dataBuffer[4*x+1]=255,e._dataBuffer[4*x+2]=255,e._dataBuffer[4*x+3]=255;var b=e._depthValue[x];e._depthValue[x]=v<b?v:b,e._isGetPositions&&e._positions.push($)}}}}}function J$f(e){for(var t=1;t<e._textureHeight-1;t++)for(var i=1;i<e._textureWidth-1;i++){var n=t*e._textureWidth+i,r=e._dataBuffer[4*n+1],o=e._dataBuffer[4*(n-e._textureWidth)+1],a=e._dataBuffer[4*(n+e._textureWidth)+1],s=e._dataBuffer[4*(n-e._textureWidth-1)+1],l=e._dataBuffer[4*(n+e._textureWidth+1)+1],u=e._dataBuffer[4*(n-e._textureWidth+1)+1],c=e._dataBuffer[4*(n+e._textureWidth-1)+1],h=e._dataBuffer[4*(n-1)+1],d=e._dataBuffer[4*(n+1)+1];if(0==r&&(255==o&&255==a||255==s&&255==l||255==u&&255==c||255==h&&255==d)){e._dataBuffer[4*n]=0,e._dataBuffer[4*n+1]=255,e._dataBuffer[4*n+2]=255,e._dataBuffer[4*n+3]=255;for(var f=-1;f<=1;f++)for(var p=-1;p<=1;p++)n+f*e._textureWidth+p>0&&(e._dataBuffer[4*(n+f*e._textureWidth+p)]=0,e._dataBuffer[4*(n+f*e._textureWidth+p)+1]=255,e._dataBuffer[4*(n+f*e._textureWidth+p)+2]=255,e._dataBuffer[4*(n+f*e._textureWidth+p)+3]=255)}}for(t=1;t<e._textureHeight-1;t++)for(i=1;i<e._textureWidth-1;i++){n=t*e._textureWidth+i,r=e._dataBuffer[4*n+1],o=e._dataBuffer[4*(n-e._textureWidth)+1],a=e._dataBuffer[4*(n+e._textureWidth)+1],s=e._dataBuffer[4*(n-e._textureWidth-1)+1],l=e._dataBuffer[4*(n+e._textureWidth+1)+1],u=e._dataBuffer[4*(n-e._textureWidth+1)+1],c=e._dataBuffer[4*(n+e._textureWidth-1)+1],h=e._dataBuffer[4*(n-1)+1],d=e._dataBuffer[4*(n+1)+1];if(r<255){var _=(u+l+s+c)/9+(o+h+d+a)/9+r/9;_=Math.round(_),e._dataBuffer[4*n]=0,e._dataBuffer[4*n+1]=_,e._dataBuffer[4*n+2]=_,e._dataBuffer[4*n+3]=255}}}function N$h(e,t,i,n){var r=e._scene,o=45*n$1d.RADIANS_PER_DEGREE,a=.5*a$11.magnitude(e._v3ProfileDir),s=e._extendHeight,l=new a$11;e._v3ProfileNormal.clone(l),a$11.multiplyByScalar(l,a,l);var u=new a$11;if(t.downOblique&&!t.leftOblique)a$11.UNIT_Z.clone(u),t.secondDrawing?a$11.subtract(e._v3MiddlePosition,l,u):a$11.add(e._v3MiddlePosition,l,u),I$k(e,u,u),a$11.multiplyByScalar(u,a*Math.tan(o),u),a$11.add(l,u,u),t.secondDrawing&&a$11.negate(u,u);else if(t.leftOblique&&!t.downOblique)e._v3ProfileDir.clone(u),a$11.normalize(u,u),a$11.multiplyByScalar(u,a*Math.tan(o),u),a$11.add(l,u,u),t.secondDrawing||a$11.negate(u,u);else if(t.leftOblique||t.downOblique){var c=new a$11;I$k(e,e._v3MiddlePosition,c),a$11.multiplyByScalar(c,.5*s,u)}else l.clone(u);var h=new a$11;a$11.add(e._v3MiddlePosition,u,h);var d=new a$11;a$11.subtract(e._v3MiddlePosition,h,d);var f=a$11.magnitude(d),p=f-t.cameraWidth,_=f+t.cameraWidth;a$11.normalize(d,d);var m=d.clone(),$=new a$11;e._v3ProfileDir.clone($),a$11.negate($,$);var g=new a$11;a$11.cross(m,$,g),g=a$11.normalize(g,g),t.downOblique&&t.leftOblique&&(p=.5,_=s),p=p<.5?.5:p;var y=n.camera,v=y.frustum.near,x=y.frustum.far,b=y.frustum.fov,S=new a$11,w=y.heading,C=y.pitch,T=y.frustum.aspectRatio,P=[],E=r.globe.showSkirts,A=r.globe.backFaceCulling;a$11.clone(y.position,S),t.depthBuffer.isUpdate=!0,t.depthBuffer._beginFunc=function(){(e._textureWidth!=i.drawingBufferWidth||e._textureHeight!=i.drawingBufferHeight)&&k$l(e,i),v=y.frustum.near,x=y.frustum.far,b=y.frustum.fov,w=y.heading,C=y.pitch,T=y.frustum.aspectRatio,a$11.clone(y.position,S),y.frustum.near=p,y.frustum.far=_,y.frustum.fov=90*n$1d.RADIANS_PER_DEGREE,y.frustum.aspectRatio=e._textureWidth/e._textureHeight,y.setView({destination:h,orientation:{direction:m,up:g},convert:!1}),!t.downOblique&&!t.leftOblique&&(c$1a.clone(y.viewMatrix,e._viewMatrix),c$1a.clone(y.frustum.projectionMatrix,e._projMatrix));for(var n=0;n<r.layers._layerQueue.length;n++){var o=r.layers._layerQueue[n];P[n]=o.clipLineColor,o.clipLineColor=new e$1z(1,1,1,1),o.setCustomClipBox(t.clipOptions)}r.globe.showSkirts=!1,r.globe.backFaceCulling=!1,r.globe.setCustomClipBox(t.clipOptions)},t.depthBuffer._endFunc=function(){if(t.downOblique||t.leftOblique){var n=i.readPixels({framebuffer:t.depthBuffer.framebuffer}),o=i.uniformState,a={invViewProjection:o.inverseViewProjection,viewProjection:o.viewProjection,depthData:n};$$e(e,a)}y.setView({destination:S,orientation:{heading:w,pitch:C,roll:y.roll},convert:!1}),y.frustum.near=v,y.frustum.far=x,y.frustum.fov=b,y.frustum.aspectRatio=T,t.depthBuffer.isUpdate=!1;for(var s=0;s<r.layers._layerQueue.length;s++){var l=r.layers._layerQueue[s];l.clipLineColor=P[s],l.clearCustomClipBox()}r.globe.clearCustomClipBox(),r.globe.showSkirts=E,r.globe.backFaceCulling=A,t.leftOblique&&t.downOblique&&(J$f(e),!e._isGetPositions&&e._func(e._dataBuffer),e._isGetPositions&&e._getPositionsFunc(e._positions))}}function I$k(e,t,i){return e._scene.mode===b$1d.SCENE3D?a$11.normalize(t,i):(a$11.subtract(t,e._oriPos,i),a$11.normalize(i,i)),i}function C$l(e){var t=e.x;e.x=e.z,e.z=e.y,e.y=t}function ee$9(e,t,i){Y$f(e,t,i),k$l(e,t);var n=a$11.magnitude(e._v3ProfileDir);e._bManualChangeExtendHeight||(e._extendHeight=n);var r=e._extendHeight,o=Math.sqrt(2),a=n/e._textureWidth*o;a<.1&&(a=.1);var s=new a$11;s.x=.5*(e.startPoint[0]+e.endPoint[0]),s.y=.5*(e.startPoint[1]+e.endPoint[1]),s.z=.5*(e.startPoint[2]+e.endPoint[2]);var l=[],u=[],c=new a$11,h=e._v3ProfileNormal.clone(),d=a$11.negate(h,new a$11);u.push(d),a$11.multiplyByScalar(e._v3ProfileNormal,a,c),a$11.add(e._v3MiddlePosition,c,c),l.push(c);var f=e._v3ProfileNormal.clone();f=a$11.negate(f,f),d=a$11.negate(f,new a$11),u.push(d);var p=new a$11;a$11.multiplyByScalar(f,a,p),a$11.add(e._v3MiddlePosition,p,p),l.push(p),e._scene.mode!==b$1d.SCENE3D&&(C$l(h),C$l(f),C$l(c),C$l(p));var _={planePos:l,planeNormal:u,clipMode:"clip_behind_any_plane"};N$h(e,{downOblique:!1,leftOblique:!1,secondDrawing:!1,cameraWidth:10*a,depthBuffer:e._depthBuffer,clipOptions:_},t,i);var m=(a+.5*r)/o;N$h(e,{downOblique:!0,leftOblique:!1,secondDrawing:!1,cameraWidth:m,depthBuffer:e._depthDownBuffer,clipOptions:_},t,i),N$h(e,{downOblique:!0,leftOblique:!1,secondDrawing:!0,cameraWidth:m,depthBuffer:e._depthDownReverBuffer,clipOptions:_},t,i),N$h(e,{downOblique:!1,leftOblique:!0,secondDrawing:!1,cameraWidth:m=(a+.5*n)/o,depthBuffer:e._depthLeftBuffer,clipOptions:_},t,i),N$h(e,{downOblique:!1,leftOblique:!0,secondDrawing:!0,cameraWidth:m,depthBuffer:e._depthLeftReverBuffer,clipOptions:_},t,i),N$h(e,{downOblique:!0,leftOblique:!0,secondDrawing:!1,cameraWidth:a,depthBuffer:e._depthTopBuffer,clipOptions:_},t,i)}b$p.prototype.update=function(e){if(!t$$(this._sourceData)&&!this._loading){let e=t$X.createIfNeeded(this._url);ve$7.test(this._url)?e.fetchArrayBuffer().then((e=>{this._sourceData=this._rgbeLoader.parse(e)})).otherwise((e=>{this._loading=!1})):be$9.test(this._url)&&e.fetchImage().then((e=>{this._sourceData=e})).otherwise((e=>{this._loading=!1})),this._loading=!0}if(t$$(this._sourceData)){if(!t$$(this._inputTexture)){let t=this._sourceData.data?{arrayBufferView:this._sourceData.data,width:this._sourceData.width,height:this._sourceData.height}:this._sourceData;this._inputTexture=new P$S({context:e.context,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.HALF_FLOAT,flipY:!0,source:t}),this._size=Math.min(this._sourceData.width,this._sourceData.height)}this._ready||(ye$9(e,this),this._ready=!0)}},b$p.prototype.isDestroyed=function(){return!1},b$p.prototype.destroy=function(){return this._inputTexture=this._inputTexture&&this._inputTexture.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),destroyObject(this)},Object.defineProperties(V$h.prototype,{startPoint:{get:function(){return this._startPoint3D},set:function(e){this._startPoint3D=e,this._update=!0}},endPoint:{get:function(){return this._endPoint3D},set:function(e){this._endPoint3D=e,this._update=!0}},extendHeight:{get:function(){return this._extendHeight},set:function(e){this._extendHeight=e,this._bManualChangeExtendHeight=!0,this._update=!0}}}),V$h.prototype.getPositions=function(e){this._positions=[],this._isGetPositions=!0,this._getPositionsFunc=function(t){e(t),this._isGetPositions=!1},this._update=!0},V$h.prototype.update=function(e,t,i){t._fboState.enabled||this._update&&(this._frameState=t,t$$(this._depthBuffer)||(this._depthBuffer=new n$m(e),this._depthBuffer.environmentVisible.isObjectVisible=!0,this._depthBuffer.environmentVisible.isOnlyS3MObjectVisible=!0,this._depthBuffer.environmentVisible.isGlobalVisible=!0,this._depthBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._name]=this._depthBuffer),t$$(this._depthDownBuffer)||(this._depthDownBuffer=new n$m(e),this._depthDownBuffer.environmentVisible.isObjectVisible=!0,this._depthDownBuffer.environmentVisible.isOnlyS3MObjectVisible=!0,this._depthDownBuffer.environmentVisible.isGlobalVisible=!0,this._depthDownBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._downName]=this._depthDownBuffer),t$$(this._depthDownReverBuffer)||(this._depthDownReverBuffer=new n$m(e),this._depthDownReverBuffer.environmentVisible.isObjectVisible=!0,this._depthDownReverBuffer.environmentVisible.isOnlyS3MObjectVisible=!0,this._depthDownReverBuffer.environmentVisible.isGlobalVisible=!0,this._depthDownReverBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._downReverName]=this._depthDownReverBuffer),t$$(this._depthLeftBuffer)||(this._depthLeftBuffer=new n$m(e),this._depthLeftBuffer.environmentVisible.isObjectVisible=!0,this._depthLeftBuffer.environmentVisible.isOnlyS3MObjectVisible=!0,this._depthLeftBuffer.environmentVisible.isGlobalVisible=!0,this._depthLeftBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._leftName]=this._depthLeftBuffer),t$$(this._depthLeftReverBuffer)||(this._depthLeftReverBuffer=new n$m(e,this._scene.farToNearRatio),this._depthLeftReverBuffer.environmentVisible.isObjectVisible=!0,this._depthLeftReverBuffer.environmentVisible.isOnlyS3MObjectVisible=!0,this._depthLeftReverBuffer.environmentVisible.isGlobalVisible=!0,this._depthLeftReverBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._leftReverName]=this._depthLeftReverBuffer),t$$(this._depthTopBuffer)||(this._depthTopBuffer=new n$m(e),this._depthTopBuffer.environmentVisible.isObjectVisible=!0,this._depthTopBuffer.environmentVisible.isOnlyS3MObjectVisible=!0,this._depthTopBuffer.environmentVisible.isGlobalVisible=!0,this._depthTopBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._topName]=this._depthTopBuffer),this._update=!1,ee$9(this,e,t))},V$h.prototype.getBuffer=function(e){this._func=e},V$h.prototype.build=function(){""===this._name&&(this._name="profile"+this._scene._analyst3D._layerIndex,this._downName=this._name+"_down",this._downReverName=this._name+"_downRever",this._leftName=this._name+"_left",this._leftReverName=this._name+"_leftRever",this._topName=this._name+"_top",this._scene._analyst3D.add(this))},V$h.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$_("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport,t$$(this._depthBuffer)&&(this._depthBuffer._visibleViewport=this._visibleViewport),t$$(this._depthDownBuffer)&&(this._depthDownBuffer._visibleViewport=this._visibleViewport),t$$(this._depthDownReverBuffer)&&(this._depthDownReverBuffer._visibleViewport=this._visibleViewport),t$$(this._depthLeftBuffer)&&(this._depthLeftBuffer._visibleViewport=this._visibleViewport),t$$(this._depthLeftReverBuffer)&&(this._depthLeftReverBuffer._visibleViewport=this._visibleViewport),t$$(this._depthTopBuffer)&&(this._depthTopBuffer._visibleViewport=this._visibleViewport)},V$h.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$_("the index is 0~8");return 1<<e&this._visibleViewport},V$h.prototype.destroy=function(){return t$$(this._frameState)&&(t$$(this._depthBuffer)&&delete this._frameState._framebufferList[this._name],t$$(this._depthDownBuffer)&&delete this._frameState._framebufferList[this._downName],t$$(this._depthDownReverBuffer)&&delete this._frameState._framebufferList[this._downReverName],t$$(this._depthLeftBuffer)&&delete this._frameState._framebufferList[this._leftName],t$$(this._depthLeftReverBuffer)&&delete this._frameState._framebufferList[this._leftReverName],t$$(this._depthTopBuffer)&&delete this._frameState._framebufferList[this._topName],this._frameState=void 0),this._depthBuffer=this._depthBuffer&&this._depthBuffer.destroy(),this._depthDownBuffer=this._depthDownBuffer&&this._depthDownBuffer.destroy(),this._depthDownReverBuffer=this._depthDownReverBuffer&&this._depthDownReverBuffer.destroy(),this._depthLeftBuffer=this._depthLeftBuffer&&this._depthLeftBuffer.destroy(),this._depthLeftReverBuffer=this._depthLeftReverBuffer&&this._depthLeftReverBuffer.destroy(),this._depthTopBuffer=this._depthTopBuffer&&this._depthTopBuffer.destroy(),this._depthValue=null,this._dataBuffer=null,this._func=void 0,this._scene._analyst3D.remove(this._name,!0),s$1e(this)};var _0x377170=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x28c717=_0x377170(void 0,(function(){return _0x28c717.toString().search("(((.+)+)+)+$").toString().constructor(_0x28c717).search("(((.+)+)+)+$")}));_0x28c717();var ze$3="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform mat4 uRenderTextureMatrix;\nuniform vec2 uTexture1_size;\nuniform sampler2D uTexture1;\nuniform sampler2D uDiffuseTexture;\nuniform float uFeatheringScale;\nuniform vec3 uV3AffineX;\nuniform vec3 uV3AffineY;\n#ifdef CLIPPOLYGON\nuniform sampler2D uPolygonTexture;\nuniform mat4 uPolygonTextureMatrix;\nuniform float uPolygonMode;\n#endif\n\nvarying vec4 vClip_pos;\n\nconst float oldFeatureingRadius = 0.707;\nvec4 feathering(vec4 oldColor, vec2 texCoord){\n float disToCenter = length(texCoord - vec2(0.5));\n float roundRadius = oldFeatureingRadius * (1.0 - uFeatheringScale);\n float disToRoundBounds = disToCenter - roundRadius;\n float featheringAlpha = min(1.0, 1.0 - disToRoundBounds / (oldFeatureingRadius - roundRadius));\n return vec4(oldColor.rgb, featheringAlpha);\n}\nfloat getDepth(in vec4 depth)\n{\n\tfloat z_window = czm_unpackDepth(depth);\n\tfloat n_range = czm_depthRange.near;\n\tfloat f_range = czm_depthRange.far;\n\treturn (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n}\n\nfloat getDepthFromShadowMap(in sampler2D viewShedTexture, in vec4 texCoord)\n{\n\tvec2 tCoord;\n tCoord = texCoord.xy * uTexture1_size - 0.5;\n\tfloat x0 = floor(tCoord.x);\n\tfloat x1 = ceil(tCoord.x);\n\tfloat y0 = floor(tCoord.y);\n\tfloat y1 = ceil(tCoord.y);\n\tvec2 invTexSize = 1.0 / uTexture1_size;\n\tvec2 t00 = vec2((x0 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t10 = vec2((x1 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t01 = vec2((x0 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tvec2 t11 = vec2((x1 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tfloat z00 = getDepth(texture2D(uTexture1, t00));\n\tfloat z10 = getDepth(texture2D(uTexture1, t01));\n\tfloat z01 = getDepth(texture2D(uTexture1, t10));\n\tfloat z11 = getDepth(texture2D(uTexture1, t11));\n\tfloat depth = max(max(z00, z01), max(z10, z11));\n\treturn depth;\n}\n#ifdef CLIPPOLYGON\nbool isClipValid(vec2 texcoord)\n{\n bool clipInside = (uPolygonMode < 0.5);\n if(clipInside)\n {\n return texture2D(uPolygonTexture, texcoord).r > 0.5;\n }\n else\n {\n return texture2D(uPolygonTexture, texcoord).r < 0.5;\n }\n}\n#endif\n\nvoid main()\n{\n czm_writeDepthClampedToFarPlane();\n\tvec4 depthTexCoord = vClip_pos / vClip_pos.w;\n\tdepthTexCoord.xy = depthTexCoord.xy * 0.5 + 0.5;\n\tfloat sceneDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, depthTexCoord.xy));\n\tsceneDepth = czm_reverseLogDepth(sceneDepth);\n\tsceneDepth = sceneDepth * 2.0 - 1.0;\n\tvec4 pos = vClip_pos;\n\tpos.z = sceneDepth * pos.w;\n\tvec4 viewPos = czm_inverseProjection * pos;\n\tvec4 renderTextureCoord = uRenderTextureMatrix * viewPos;\n\tvec4 texCoord = renderTextureCoord / renderTextureCoord.w;\n\ttexCoord.xyz = texCoord.xyz * 0.5 + 0.5;\n\tif(texCoord.x < 0.0 || texCoord.x > 1.0 || texCoord.y < 0.0 || texCoord.y > 1.0)\n\t{\n\t\tdiscard;\n\t}\n#ifdef CLIPPOLYGON\n vec4 polygonTextureCoord = uPolygonTextureMatrix * viewPos;\n\tvec4 texCoordPolygon = polygonTextureCoord / polygonTextureCoord.w;\n\ttexCoordPolygon.xyz = texCoordPolygon.xyz * 0.5 + 0.5;\n\tif(texCoordPolygon.x < 0.0 || texCoordPolygon.x > 1.0 || texCoordPolygon.y < 0.0 || texCoordPolygon.y > 1.0)\n\t{\n\t\tdiscard;\n }\n\tif(!isClipValid(texCoordPolygon.xy))\n {\n discard;\n }\n#endif\n\tfloat depth = getDepthFromShadowMap(uTexture1, texCoord);\n\tdepth = depth * 0.5 + 0.5;\n\tfloat dxc = abs(dFdx(texCoord.z));\n\tfloat dyc = abs(dFdy(texCoord.z));\n\tfloat dF = max(dxc, dyc) * 3.0;\n\tfloat bias = 1.0e-6 + dF;\n\tif(depth + 0.00002 < texCoord.z)\n\t{\n\t\tdiscard;\n\t}\n\tvec2 finalTexCoord = texCoord.xy;\n texCoord.x = uV3AffineX.x * finalTexCoord.x + uV3AffineX.y * finalTexCoord.y + uV3AffineX.z;\n texCoord.y = uV3AffineY.x * finalTexCoord.x + uV3AffineY.y * finalTexCoord.y + uV3AffineY.z;\n if(texCoord.x > 1.0 || texCoord.y > 1.0 || texCoord.x < 0.0 || texCoord.y < 0.0)\n {\n discard;\n }\n\tgl_FragColor = texture2D(uDiffuseTexture, texCoord.xy);\n\tgl_FragColor = feathering(gl_FragColor, texCoord.xy);\n\tgl_FragColor.rgb = czm_adjustColor(gl_FragColor.rgb);\n}",_0x39c70f=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x46db03=_0x39c70f(void 0,(function(){return _0x46db03.toString().search("(((.+)+)+)+$").toString().constructor(_0x46db03).search("(((.+)+)+)+$")}));_0x46db03();var _0x3f60db={ProjectToScene:0,ProjectToPlane:1},K$b=Object.freeze(_0x3f60db);function P$f(e){if(!t$$(e))throw new t$_("scene are required.");if(!e.context.depthTexture)throw new t$_("the depth buffer is not supported.");this._scene=e,this._cameraDepthBuffer=void 0,this._clearStencilCommand=new r$M({stencil:0}),this._clearStencilCommand.pass=we$l.ANALYSIS,this._lineCommand=void 0,this._stencilCommand=void 0,this._colorCommand=void 0,this._boundingSphere=new c$19,this._frameState=void 0,this._viewPosition=[0,0,0],this._direction=0,this._pitch=0,this._roll=0,this._horizontalFov=90,this._verticalFov=60,this._distance=200,this._hintLineColor=new a$10(1,1,1,1),this._hintLineVisible=!0,this._texture=void 0,this._segmentCount=20,this._invertViewMatrix=new c$1a,this._viewProjMatrix=new c$1a,this._renderTextureMatrix=new c$1a,this._update=!0,this._id=0,this._name="",this._cameraName="",this._visibleViewport=4095,this._video=void 0,this._hasExcavation=!1,this._polygonTexture=void 0,this._polygonRegions=new e$1F,this._polygonTextureMatrix=new c$1a,this._polygonViewProjMatrix=new c$1a,this._polygonUpdate=!1,this._polygonMode=je$8.CLIP_OUTSIDE,this._brightness=1,this._contrast=1,this._hue=0,this._saturation=1,this._gamma=1,this._featheringScale=0,this._v3AffineX=new a$11(1,0,0),this._v3AffineY=new a$11(0,1,0),this._visible=!0,this._boundingSphereFromXML=void 0,this._visibleDistanceMax=500,this._mode=K$b.ProjectToScene,this._planeRegions=void 0,this._projectEvent=new o$15,this._projectPlaneOffset=1,this._guid=t$U(),this._fusionAlpha=1,this._minDepth=.9999}function Ce$7(e){t$$(e._stencilCommand)&&(e._stencilCommand.vertexArray=e._stencilCommand.vertexArray&&e._stencilCommand.vertexArray.destroy(),e._stencilCommand.shaderProgram=e._stencilCommand.shaderProgram&&e._stencilCommand.shaderProgram.destroy(),e._stencilCommand=void 0),t$$(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0),t$$(e._lineCommand)&&(e._lineCommand.vertexArray=e._lineCommand.vertexArray&&e._lineCommand.vertexArray.destroy(),e._lineCommand.shaderProgram=e._lineCommand.shaderProgram&&e._lineCommand.shaderProgram.destroy(),e._lineCommand=void 0),t$$(e._planeCommand)&&(e._planeCommand.vertexArray=e._planeCommand.vertexArray&&e._planeCommand.vertexArray.destroy(),e._planeCommand.shaderProgram=e._planeCommand.shaderProgram&&e._planeCommand.shaderProgram.destroy(),e._planeCommand=void 0)}function Ye$3(e,t,i){var n=e._horizontalFov*n$1d.RADIANS_PER_DEGREE,r=e._verticalFov*n$1d.RADIANS_PER_DEGREE,o=Math.tan(.5*n)/Math.tan(.5*r);e._distance;var a=Math.max(e._distance,10),s=e._direction*n$1d.RADIANS_PER_DEGREE,l=e._pitch*n$1d.RADIANS_PER_DEGREE,u=e._roll*n$1d.RADIANS_PER_DEGREE,c=a$11.fromDegreesArrayHeights(e._viewPosition,e._scene._globe.ellipsoid)[0],h=i.camera,d=h.frustum.aspectRatio,f=h.frustum.fov,p=h.frustum.near,_=h.frustum.far,m=new a$11,$=h.heading,g=h.pitch,y=h.roll;a$11.clone(h.position,m),e._cameraDepthBuffer.isUpdate=!0;var v=i.useLogDepth;e._cameraDepthBuffer._beginFunc=function(){i.useLogDepth=!1,d=h.frustum.aspectRatio,f=h.frustum.fov,p=h.frustum.near,_=h.frustum.far,$=h.heading,g=h.pitch,y=h.roll,a$11.clone(h.position,m),h.frustum.aspectRatio=o,h.frustum.fov=o>=1?n:r,h.frustum.near=1,h.frustum.far=a,v&&(h.frustum.near=.1,h.frustum.far=1e8),h.setView({destination:c,orientation:{heading:s,pitch:l,roll:u}}),c$1a.multiply(h.frustum.projectionMatrix,h.viewMatrix,e._viewProjMatrix),c$1a.clone(h.inverseViewMatrix,e._invertViewMatrix),a$11.clone(a$11.ZERO,e._boundingSphere.center),e._boundingSphere.radius=e._distance,c$19.transform(e._boundingSphere,e._invertViewMatrix,e._boundingSphere)},e._cameraDepthBuffer._endFunc=function(){h.setView({destination:m,orientation:{heading:$,pitch:g,roll:y},convert:!1}),h.frustum.aspectRatio=d,h.frustum.fov=f,h.frustum.near=p,h.frustum.far=_,i.useLogDepth=v,e._cameraDepthBuffer.isUpdate=!1}}Object.defineProperties(P$f.prototype,{viewPosition:{get:function(){return this._viewPosition},set:function(e){this._viewPosition=e,this._update=!0}},direction:{get:function(){return this._direction},set:function(e){this._direction=e,this._update=!0}},pitch:{get:function(){return this._pitch},set:function(e){this._pitch=e,this._update=!0}},roll:{get:function(){return this._roll},set:function(e){this._roll=e,this._update=!0}},horizontalFov:{get:function(){return this._horizontalFov},set:function(e){this._horizontalFov=e,this._update=!0}},verticalFov:{get:function(){return this._verticalFov},set:function(e){this._verticalFov=e,this._update=!0}},distance:{get:function(){return this._distance},set:function(e){if(e<=0)throw new t$_("the distance is greater than 0.0");this._distance=e,this._update=!0}},featheringScale:{get:function(){return this._featheringScale},set:function(e){if(e<0||e>1)throw new t$_("the distance is greater than 0.0 an less than 1.0");this._featheringScale=e}},hintLineColor:{get:function(){var e=new e$1z;return e.red=this._hintLineColor.x,e.green=this._hintLineColor.y,e.blue=this._hintLineColor.z,e.alpha=this._hintLineColor.w,e},set:function(e){this._hintLineColor.x=e.red,this._hintLineColor.y=e.green,this._hintLineColor.z=e.blue,this._hintLineColor.w=e.alpha}},hintLineVisible:{get:function(){return this._hintLineVisible},set:function(e){this._hintLineVisible=e}},brightness:{get:function(){return this._brightness},set:function(e){n$1e.typeOf.number.greaterThanOrEquals("ProjectionImage.brightness",e,0),this._brightness=e}},contrast:{get:function(){return this._contrast},set:function(e){n$1e.typeOf.number.greaterThanOrEquals("ProjectionImage.contrast",e,0),this._contrast=e}},hue:{get:function(){return this._hue},set:function(e){n$1e.typeOf.number.greaterThanOrEquals("ProjectionImage.hue",e,0),this._hue=e}},saturation:{get:function(){return this._saturation},set:function(e){n$1e.typeOf.number.greaterThanOrEquals("ProjectionImage.saturation",e,0),this._saturation=e}},gamma:{get:function(){return this._gamma},set:function(e){n$1e.typeOf.number.greaterThan("ProjectionImage.gamma",e,0),this._gamma=e}},visible:{get:function(){return this._visible},set:function(e){n$1e.typeOf.bool("ProjectionImage.visible",e),this._visible=e}},visibleDistanceMax:{get:function(){return this._visibleDistanceMax},set:function(e){n$1e.typeOf.number("ProjectionImage.visibleDistance",e),this._visibleDistanceMax=e}},mode:{get:function(){return this._mode},set:function(e){this._mode=e}},projectEvent:{get:function(){return this._projectEvent}},fusionAlpha:{get:function(){return this._fusionAlpha},set:function(e){this._fusionAlpha=e}}});var xe$c=new a$10,we$6=new a$10(1,1/255,1/65025,1/16581375);function J$e(e,t,i,n,r,o){var a=t.context.readPixels({x:i,y:n,width:1,height:1,framebuffer:e._cameraDepthBuffer._framebuffer}),s=a$10.unpack(a,0,xe$c);a$10.divideByScalar(s,255,s);var l=a$10.dot(s,we$6);0!==l?e._minDepth=Math.min(e._minDepth,l):l=e._minDepth;var u=new a$10(r,o,2*l-1,1),c=new a$10,h=c$1a.inverse(e._viewProjMatrix,new c$1a),d=c$1a.multiplyByVector(h,u,c),f=1/d.w;return a$11.multiplyByScalar(d,f,d)}function be$8(e,t){var i=e._scene,n=i.screenSpaceCameraController;n.enableFusion||(n.enableFusion=!0),t$$(t.curFusionViewMatrix)||(t.curFusionViewMatrix=c$1a.clone(t.uniformState.view,new c$1a));var r=J$e(e,i,0,0,-1,-1),o=J$e(e,i,i.drawingBufferWidth-1,0,1,-1),a=J$e(e,i,i.drawingBufferWidth-1,i.drawingBufferHeight-1,1,1),s=J$e(e,i,0,i.drawingBufferHeight-1,-1,1);if(u$V.wgs84ToDrawingBufferCoordinates(i,r,r),u$V.wgs84ToDrawingBufferCoordinates(i,o,o),u$V.wgs84ToDrawingBufferCoordinates(i,a,a),u$V.wgs84ToDrawingBufferCoordinates(i,s,s),t$$(r)&&t$$(o)&&t$$(a)&&t$$(s)){t$$(n.panOffset)&&(r.x+=n.panOffset.x,o.x+=n.panOffset.x,a.x+=n.panOffset.x,s.x+=n.panOffset.x,r.y+=n.panOffset.y,o.y+=n.panOffset.y,a.y+=n.panOffset.y,s.y+=n.panOffset.y),n.zoomDirty=!1,n.panDirty=!1;for(var l=[r.x,r.y,o.x,o.y,a.x,a.y,s.x,s.y],u=i.drawingBufferWidth,c=i.drawingBufferHeight,h=0,d=l.length;h<d;h++){var f=l[h];f=2*(f=h%2==0?f/u:1-f/c)-1,l[h]=f}var p=new T$11({attributes:{position:new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:2,values:l}),textureCoordinates:new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:2,values:[0,0,1,0,1,1,0,1]})},indices:new Uint16Array([0,1,2,0,2,3]),primitiveType:H$11.TRIANGLES}),_=new s$1d({vertexArray:x$18.fromGeometry({context:t,geometry:p,attributeLocations:{position:0,textureCoordinates:1},bufferUsage:A$13.STATIC_DRAW,interleave:!0}),primitiveType:H$11.TRIANGLES,renderState:p$1a.fromCache({blending:Ee$s.ALPHA_BLEND}),shaderProgram:p$15.fromCache({context:t,vertexShaderSource:"\n attribute vec4 position;\n attribute vec2 textureCoordinates;\n varying vec2 v_textureCoordinates;\n void main() \n {\n gl_Position = position;\n v_textureCoordinates = textureCoordinates;\n }\n ",fragmentShaderSource:"\n uniform sampler2D u_Texture;\n uniform float uFusionAlpha;\n varying vec2 v_textureCoordinates;\n void main()\n {\n gl_FragColor = texture2D(u_Texture, v_textureCoordinates);\n gl_FragColor.a = uFusionAlpha;\n }\n ",attributeLocations:{position:0,textureCoordinates:1}}),uniformMap:{u_Texture:function(){return e._texture},uFusionAlpha:function(){return e._fusionAlpha}},owner:e});_.pass=we$l.OVERLAY_AGAINST_DEPTH,e._planeCommand=_}}function Ke$2(e,t,i){for(var n=(e._segmentCount+1)*(e._segmentCount+1)+1,r=C$12.createTypedArray(C$12.FLOAT,3*n),o=3,a=e._horizontalFov*n$1d.RADIANS_PER_DEGREE,s=e._verticalFov*n$1d.RADIANS_PER_DEGREE,l=Math.tan(.5*a),u=Math.tan(.5*s),c=(e._distance,e._distance*u),h=Math.PI-.5*a,d=0,f=0,p=a/e._segmentCount,_=0;_<e._segmentCount+1;_++){d=h+_*p;for(var m=c/(e._distance/Math.cos(d)),$=Math.atan(m),g=-$,y=2*$/e._segmentCount,v=0;v<e._segmentCount+1;v++)f=g+v*y,r[o++]=e._distance*Math.cos(f)*Math.sin(d),r[o++]=e._distance*Math.sin(f),r[o++]=e._distance*Math.cos(f)*Math.cos(d)}var x=2*(4+5*e._segmentCount+2*e._segmentCount*3),b=e._segmentCount*e._segmentCount*3*2+3*e._segmentCount*4,S=C$12.createTypedArray(C$12.UNSIGNED_SHORT,x),w=C$12.createTypedArray(C$12.UNSIGNED_SHORT,b),C=0;for(_=0;_<e._segmentCount;_++)for(v=0;v<e._segmentCount;v++)w[C++]=1+_+v*(e._segmentCount+1),w[C++]=1+_+1+v*(e._segmentCount+1),w[C++]=1+_+(v+1)*(e._segmentCount+1),w[C++]=1+_+1+v*(e._segmentCount+1),w[C++]=1+_+1+(v+1)*(e._segmentCount+1),w[C++]=1+_+(v+1)*(e._segmentCount+1);for(_=0;_<e._segmentCount;_++)w[C++]=_+1+1,w[C++]=_+1,w[C++]=0,w[C++]=0,w[C++]=_+e._segmentCount*(e._segmentCount+1)+1,w[C++]=_+1+e._segmentCount*(e._segmentCount+1)+1;for(_=0;_<e._segmentCount;_++)w[C++]=0,w[C++]=_*(e._segmentCount+1)+1,w[C++]=(_+1)*(e._segmentCount+1)+1,w[C++]=e._segmentCount+(_+1)*(e._segmentCount+1)+1,w[C++]=e._segmentCount+_*(e._segmentCount+1)+1,w[C++]=0;C=0,S[C++]=0,S[C++]=1,S[C++]=0,S[C++]=e._segmentCount+1,S[C++]=0,S[C++]=e._segmentCount*(e._segmentCount+1)+1,S[C++]=0,S[C++]=(e._segmentCount+1)*(e._segmentCount+1);for(_=0;_<5;_++)for(v=0;v<e._segmentCount;v++)S[C++]=1+v+5*(e._segmentCount+1)*_,S[C++]=1+(v+1)+5*(e._segmentCount+1)*_;for(_=0;_<5;_++)for(v=0;v<e._segmentCount;v++)S[C++]=1+(e._segmentCount+1)*v+5*_,S[C++]=1+(e._segmentCount+1)*(v+1)+5*_;var T=u$Y.createVertexBuffer({context:t,typedArray:r,usage:A$13.STATIC_DRAW}),P=[],E={aPosition:0};P.push({index:E.aPosition,vertexBuffer:T,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var A=u$Y.createIndexBuffer({context:t,typedArray:S,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT}),L=u$Y.createIndexBuffer({context:t,typedArray:w,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT});e._lineCommand=new s$1d({primitiveType:H$11.LINES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:we$l.ANALYSIS,owner:e,cull:!0}),e._lineCommand.vertexArray=new x$18({context:t,attributes:P,indexBuffer:A}),e._lineCommand.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:He$5,fragmentShaderSource:Ye$6,attributeLocations:E}),e._lineCommand.renderState=p$1a.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}});var M=[];for(_=0;_<6;_++)M[_]=new a$10(0,0,0,0);e._lineCommand.uniformMap={uDiffuseColor:function(){return e._hintLineColor},clip_mode:function(){return 0},clip_planes:function(){return M},clip_line_color:function(){return a$10.UNIT_W}},e._stencilCommand=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:we$l.ProjectionImage,owner:e,cull:!0}),e._stencilCommand.vertexArray=new x$18({context:t,attributes:P,indexBuffer:L}),e._stencilCommand.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:He$5,fragmentShaderSource:Ye$6,attributeLocations:E});var I=e._mode===K$b.ProjectToPlane?{enabled:!0,frontFunction:h$N.ALWAYS,frontOperation:{fail:o$F.KEEP,zFail:o$F.DECREMENT_WRAP,zPass:o$F.KEEP},backFunction:h$N.ALWAYS,backOperation:{fail:o$F.KEEP,zFail:o$F.DECREMENT_WRAP,zPass:o$F.KEEP},reference:0,mask:1}:{enabled:!0,frontFunction:h$N.ALWAYS,frontOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.INCREMENT_WRAP},backFunction:h$N.ALWAYS,backOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.DECREMENT_WRAP},reference:0,mask:-1};e._stencilCommand.renderState=p$1a.fromCache({depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0},stencilTest:I,stencilMask:1}),e._stencilCommand.uniformMap={uDiffuseColor:function(){return a$10.UNIT_W},clip_mode:function(){return 0},clip_planes:function(){return M},clip_line_color:function(){return a$10.UNIT_W}},e._colorCommand=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:we$l.ProjectionImage,owner:e,cull:!0}),e._colorCommand.vertexArray=new x$18({context:t,attributes:P,indexBuffer:L});var O=new a$O({name:"ViewShedAnalysisVp",sources:[Oe$8]});e._colorCommand.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:O,fragmentShaderSource:ze$3,attributeLocations:E}),I=e._mode===K$b.ProjectToPlane?{enabled:!0,frontFunction:h$N.EQUAL,frontOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.DECREMENT_WRAP},backFunction:h$N.EQUAL,backOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.DECREMENT_WRAP},reference:3,mask:3}:{enabled:!0,frontFunction:h$N.NOT_EQUAL,frontOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.DECREMENT_WRAP},backFunction:h$N.NOT_EQUAL,backOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.DECREMENT_WRAP},reference:0,mask:-1},e._colorCommand.renderState=p$1a.fromCache({cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,stencilTest:I,blending:Ee$s.ALPHA_BLEND}),e._colorCommand.uniformMap={uRenderTextureMatrix:function(){return e._renderTextureMatrix},uPolygonTextureMatrix:function(){return e._polygonTextureMatrix},uTexture1_size:function(){var t=e._cameraDepthBuffer.depthTexture;return new r$T(t.width,t.height)},uTexture1:function(){return e._cameraDepthBuffer.depthTexture},uDiffuseTexture:function(){return e._texture},uPolygonTexture:function(){return e._polygonTexture},uPolygonMode:function(){return e._polygonMode},uBrightness:function(){return e._brightness},uContrast:function(){return e._contrast},uHue:function(){return e._hue},uSaturation:function(){return e._saturation},uOneOverGamma:function(){return 1/e._gamma},uFeatheringScale:function(){return e._featheringScale},uV3AffineX:function(){return e._v3AffineX},uV3AffineY:function(){return e._v3AffineY}}}function Pe$8(e,t,i){return a$11.distance(e.positionWC,t.center)>i||e.frustum.computeCullingVolume(e.positionWC,e.directionWC,e.upWC).computeVisibility(t)===cr$4.OUTSIDE}function Ae$6(e){var t=f$10.queryStringValue(e,"VideoName"),i=f$10.queryFirstNode(e,"Fov"),n=f$10.queryNumericValue(i,"Horizontal"),r=f$10.queryNumericValue(i,"Vertical"),o=f$10.queryNumericValue(e,"Distance"),a=f$10.queryNumericValue(e,"Heading"),s=f$10.queryNumericValue(e,"Pitch"),l=f$10.queryNumericValue(e,"Roll"),u=f$10.queryFirstNode(e,"ViewPosition"),c=[0,0,0];c[0]=f$10.queryNumericValue(u,"X"),c[1]=f$10.queryNumericValue(u,"Y"),c[2]=f$10.queryNumericValue(u,"Z");var h=f$10.queryFirstNode(e,"Matrix"),d=f$10.queryStringValue(h,"U"),f=f$10.queryStringValue(h,"V");f$10.queryStringValue(h,"W");var p=d.split(","),_=new a$11(parseFloat(p[0]),parseFloat(p[1]),parseFloat(p[2])),m=f.split(","),$=new a$11(parseFloat(m[0]),parseFloat(m[1]),parseFloat(m[2])),g=f$10.queryFirstNode(e,"Bounds"),y=void 0;if(g){var v=n$1d.toRadians(f$10.queryNumericValue(g,"Left")),x=n$1d.toRadians(f$10.queryNumericValue(g,"Top")),b=n$1d.toRadians(f$10.queryNumericValue(g,"Right")),S=new s$1p(v,n$1d.toRadians(f$10.queryNumericValue(g,"Bottom")),b,x),w=o*Math.cos(n$1d.toRadians(s));w=s<0?-w:w;var C=c[2]+w;y=c$19.fromRectangle3D(S,void 0,C)}return{videoName:t,viewPosition:c,heading:a,pitch:s,roll:l,horizontalFov:n,verticalFov:r,matrixU:_,matrixV:$,distance:o,boundingSphere:y}}function Xe$1(e,t){var i=document.getElementById("projection-image");t$$(i)||((i=document.createElement("div")).setAttribute("id","projection-image"),document.body.appendChild(i));var n=document.createElement("video");return n.style="visibility:hidden;position:absolute;top:0px;left:0px;",n.setAttribute("width","320"),n.setAttribute("height","240"),n.setAttribute("autoplay","autoplay"),n.setAttribute("loop","loop"),n.setAttribute("crossorigin","crossorigin"),n.setAttribute("src",e),n.setAttribute("id","projection-image-"+t),i.appendChild(n),n}function Qe$4(e,t){for(var i=a$11.fromDegreesArrayHeights(t),n=new S$C({polygonHierarchy:{positions:i},vertexFormat:{bitangent:!1,color:!1,normal:!1,position:!0,st:!1,tangent:!1},perPositionHeight:!0}),r=S$C.createGeometry(n),o=[],a=1;a<i.length-1;a++)o.push(0),o.push(a),o.push(a+1);r.indices=o;var s=new c$1a;c$1a.inverse(e._invertViewMatrix,s),u$U.updateGeometry(r,t,s);var l=new u$U;return l._geometry=r,l}function Ze$3(e,t,i){if(e._polygonUpdate&&0!==e._polygonRegions.values.length){e._polygonUpdate=!1;var n=new r$M({color:new e$1z(0,0,0,0),depth:1});n.framebuffer=new u$F({context:t,colorTextures:[e._polygonTexture],destroyAttachments:!1}),n.renderState=p$1a.fromCache(),n.execute(t);for(var r=0;r<e._polygonRegions.values.length;r++){var o=e._polygonRegions.values[r];Je$2(e,t,o,e._polygonTexture),o._command.execute(t)}n.framebuffer.destroy()}}function Je$2(e,t,i,n){if(t$$(i)&&!t$$(i._command)){var r=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:e._invertViewMatrix});i._command=r;var o={position:0};r.vertexArray=x$18.fromGeometry({context:t,geometry:i._geometry,attributeLocations:o,bufferUsage:A$13.STATIC_DRAW,interleave:!0});var a=new a$O({sources:["attribute vec4 position;\nvoid main()\n{\n gl_Position = czm_modelViewProjection * vec4(position.xyz, 1.0);\n}\n"]}),s=new a$O({sources:["void main()\n{\n gl_FragColor = vec4(1.0);\n}\n"]});r.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:o}),r.framebuffer=new u$F({context:t,colorTextures:[n],destroyAttachments:!1}),r.renderState=p$1a.fromCache({cull:{enabled:!1}})}}function oe$9(e,t){if(t$$(e._colorCommand)){var i=e._scene._context,n=e._colorCommand.shaderProgram.fragmentShaderSource,r=e._colorCommand.shaderProgram.vertexShaderSource,o=n.defines.indexOf("CLIPPOLYGON");t?o<0&&n.defines.push("CLIPPOLYGON"):o>=0&&n.defines.splice(o,1),e._colorCommand.shaderProgram.destroy(),e._colorCommand.shaderProgram=p$15.fromCache({context:i,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:e._attributeLocations})}}function t$b(){}P$f.prototype.update=function(e,t,i){if(!t._fboState.enabled&&this._visible){var n=t.camera;if(!n.bReflect&&(!t$$(this._boundingSphereFromXML)||!Pe$8(n,this._boundingSphereFromXML,this._visibleDistanceMax))&&(0===this._boundingSphere.radius||this._update||!Pe$8(n,this._boundingSphere,this._visibleDistanceMax))&&(c$1a.multiply(this._viewProjMatrix,n.inverseViewMatrix,this._renderTextureMatrix),c$1a.multiply(this._polygonViewProjMatrix,n.inverseViewMatrix,this._polygonTextureMatrix),t$$(this._video)&&this._video.readyState>=2&&(t$$(this._texture)&&this._texture!==e.defaultTexture?this._texture.copyFrom(this._video):this._texture=new P$S({context:e,source:this._video})),t$$(this._texture))){var r=this._scene;if(this._update&&(this._frameState=t,t$$(this._cameraDepthBuffer)||(this._cameraDepthBuffer=new n$m(e),this._cameraDepthBuffer.environmentVisible.isGlobalVisible=!0,this._cameraDepthBuffer.environmentVisible.isObjectVisible=!0,t._framebufferList[this._cameraName]=this._cameraDepthBuffer),this._update=!1,Ce$7(this),Ye$3(this,e,t),Ke$2(this,e)),this._polygonUpdate&&Ze$3(this,e),t$$(this._cameraDepthBuffer.depthTexture)){if(!t$$(this._planeCommand)&&this._mode===K$b.ProjectToPlane&&(be$8(this,e),t$$(this._fusionLayers)&&this._fusionLayers.length>0))for(var o=0,a=this._fusionLayers.length;o<a;o++){var s=this._fusionLayers[o];s.enableFusion=!0,s.panOffset=r.screenSpaceCameraController.panOffset}if(t$$(this._planeCommand)&&this._mode===K$b.ProjectToPlane)return(r.screenSpaceCameraController.panDirty||r.screenSpaceCameraController.zoomDirty)&&(this._planeCommand.vertexArray=this._planeCommand.vertexArray&&this._planeCommand.vertexArray.destroy(),this._planeCommand.shaderProgram=this._planeCommand.shaderProgram&&this._planeCommand.shaderProgram.destroy(),be$8(this,e)),void i.push(this._planeCommand);t$$(this._clearStencilCommand)&&i.push(this._clearStencilCommand),t$$(this._stencilCommand)&&i.push(this._stencilCommand),t$$(this._colorCommand)&&i.push(this._colorCommand),t$$(this._lineCommand)&&this._hintLineVisible&&i.push(this._lineCommand)}}}},P$f.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$_("the index is 0~3");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport,t$$(this._cameraDepthBuffer)&&(this._cameraDepthBuffer._visibleViewport=this._visibleViewport)},P$f.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$_("the index is 0~3");return 1<<e&this._visibleViewport},P$f.prototype.setImage=function(e){if(!t$$(e))throw new t$_("options is required.");if(!t$$(e.url)&&!t$$(e.video)&&!t$$(e.image))throw new t$_("options.url or options.video or options.image are required.");if(t$$(e.url)){var t=e.url,i=this;c$18(n$S(t),(function(e){i._texture!==i._scene._context.defaultTexture&&(i._texture=i._texture&&i._texture.destroy()),i._texture=new P$S({context:i._scene._context,source:e})}))}else t$$(e.image)?t$$(this._texture)?this._texture.copyFrom(e.image):this._texture=new P$S({context:this._scene._context,source:e.image}):this._video=e.video},P$f.prototype.setDistDirByPoint=function(e){if(e[0]===this._viewPosition[0]&&e[1]===this._viewPosition[1]&&e[2]===this._viewPosition[2])throw new t$_("the position is [longitude, latitude ,height] and is not equals viewPosition");var t,i,n=(l=this._scene._frameState.camera)._projection;if(this._scene.mode===b$1d.SCENE3D)t=a$11.fromDegreesArrayHeights(e)[0],i=a$11.fromDegreesArrayHeights(this._viewPosition)[0];else{var r=i$1g.fromDegrees(e[0],e[1],e[2]);t=n.project(r,new a$11);var o=i$1g.fromDegrees(this._viewPosition[0],this._viewPosition[1],this._viewPosition[2]);i=n.project(o,new a$11)}var a=new a$11;a$11.subtract(t,i,a);var s=a$11.magnitude(a);a$11.normalize(a,a),this.distance=s;var l,u=(l=this._scene._frameState.camera).heading,c=l.pitch,h=l.roll,d=new a$11;a$11.clone(l.position,d);var f=a.clone(),p=i.clone();p=a$11.normalize(p,p),Math.abs(a$11.dot(p,f))>=1&&(p=Math.abs(a$11.dot(f,a$11.UNIT_Y))<1?a$11.clone(a$11.UNIT_Y,p):a$11.clone(a$11.UNIT_Z,p));var _=new a$11;a$11.cross(p,f,_),_=a$11.normalize(_,_),a$11.cross(f,_,p),p=a$11.normalize(p,p),l.setView({destination:i,orientation:{direction:f,up:p},convert:!1}),this.direction=l.heading*n$1d.DEGREES_PER_RADIAN,this.pitch=l.pitch*n$1d.DEGREES_PER_RADIAN,l.setView({destination:d,orientation:{heading:u,pitch:c,roll:h},convert:!1})},P$f.prototype.pixelToWorldCoordinates=function(e,t){var i=this._scene.context,n=this._texture.width,r=this._texture.height,o=e/n*i.drawingBufferWidth,a=i.drawingBufferHeight-t/r*i.drawingBufferHeight;i.drawingBufferHeight;var s=i.readPixels({x:o,y:a,width:1,height:1,framebuffer:this._cameraDepthBuffer.framebuffer}),l=a$10.unpack(s,0,xe$c);a$10.divideByScalar(l,255,l);var u=a$10.dot(l,we$6),c=c$1a.inverse(this._viewProjMatrix,new c$1a),h=new a$10,d=this._scene._view.passState.viewport;h.x=(o-d.x)/d.width*2-1,h.y=(a-d.y)/d.height*2-1,h.z=2*u-1,h.w=1;var f=c$1a.multiplyByVector(c,h,new a$10);n=1/f.w;return a$11.multiplyByScalar(f,n,f),a$11.fromCartesian4(f,new a$11)},P$f.prototype.build=function(){""===this._name&&(this._name="projectionimage"+this._scene._analyst3D._layerIndex,this._cameraName=this._name+"_camera",this._scene._analyst3D.add(this))},P$f.prototype.setInfo=function(e){if(!t$$(e))throw new t$_("No url provided.");var t=this;return u$_(e).then((function(e){var i=Ae$6(e.firstChild);t.direction=i.heading,t.pitch=e$1Y(i.pitch,t.pitch),t._roll=e$1Y(i.roll,t._roll),t.horizontalFov=i.horizontalFov,t.verticalFov=i.verticalFov,a$11.clone(i.matrixU,t._v3AffineX),a$11.clone(i.matrixV,t._v3AffineY),t.distance=i.distance,t.viewPosition=i.viewPosition,t._boundingSphereFromXML=i.boundingSphere})).otherwise((function(e){console.error(e)}))},P$f.fromInfo=function(e,t,i){if(!t$$(e))throw new t$_("No scene provided.");if(!t$$(t))throw new t$_("No url provided.");return u$_(t).then((function(n){for(var r={},o=n.firstChild,a=0,s=o.children.length;a<s;a++){var l=Ae$6(o.children[a]),u=l.videoName;u=t$$(i)?e$1Z(i)+l.videoName:t.slice(0,t.lastIndexOf("/")+1)+l.videoName;var c=new P$f(e),h=Xe$1(u,c._guid);c.viewPosition=l.viewPosition,c.direction=l.heading,c.pitch=l.pitch,c.horizontalFov=l.horizontalFov,c.verticalFov=l.verticalFov,a$11.clone(l.matrixU,c._v3AffineX),a$11.clone(l.matrixV,c._v3AffineY),c.distance=l.distance,c.setImage({video:h}),c._boundingSphereFromXML=l.boundingSphere,h.addEventListener("loadeddata",function(e){e.build()}.bind(h,c)),r[l.videoName]=c}return r})).otherwise((function(e){console.error(e)}))},P$f.prototype.destroy=function(){var e=document.getElementById("projection-image-"+this._guid);if(e){var t=e.parentNode;t.removeChild(e),0===t.children.length&&t.parentNode.removeChild(t)}t$$(this._frameState)&&(t$$(this._cameraDepthBuffer)&&delete this._frameState._framebufferList[this._cameraName],this._frameState=void 0),this._cameraDepthBuffer=this._cameraDepthBuffer&&this._cameraDepthBuffer.destroy(),Ce$7(this),this._clearStencilCommand=void 0,this._texture!==this._scene._context.defaultTexture&&(this._texture=this._texture&&this._texture.destroy());for(var i=0;i<this._polygonRegions.values.length;i++)this._polygonRegions.values[i].destroy(),this._polygonRegions.values[i]=null;if(t$$(this._polygonTexture)&&(this._polygonTexture.destroy(),this._polygonTexture=null),this._scene._analyst3D.remove(this._name,!0),this._scene.context.curFusionViewMatrix=void 0,this._scene.screenSpaceCameraController.enableFusion=!1,t$$(this._fusionLayers)){i=0;for(var n=this._fusionLayers.length;i<n;i++){var r=this._fusionLayers[i];r.enableFusion&&(r.enableFusion=!1)}}return this._fusionLayers=void 0,s$1e(this)},P$f.prototype.setClipMode=function(e){this._polygonMode=e},P$f.prototype.addClipRegion=function(e){var t=e.name,i=e.position;if(!t$$(t)||!t$$(i))return!1;if(t$$(this._polygonRegions.get(t)))return!1;var n=this._scene._context.drawingBufferWidth,r=this._scene._context.drawingBufferHeight;t$$(this._polygonTexture)||(this._polygonTexture=new P$S({context:this._scene._context,width:n,height:r,pixelFormat:Z$_.RGBA}));var o=Qe$4(this,i);this._polygonRegions.set(t,o),this._polygonUpdate=!0;var a=this._frameState.camera;return c$1a.multiply(a.frustum.projectionMatrix,a.viewMatrix,this._polygonViewProjMatrix),oe$9(this,!0),!0},P$f.prototype.removeClipRegion=function(e){return!!this._polygonRegions.remove(e)&&(this._polygonUpdate=!0,0===this._polygonRegions.values.length&&oe$9(this,!1),!0)},P$f.prototype.removeAllClipRegion=function(){for(var e=0;e<this._polygonRegions.values.length;e++)this._polygonRegions.values[e].destroy(),this._polygonRegions.values[e]=null;this._polygonRegions.removeAll(),this._polygonUpdate=!0,oe$9(this,!1)},P$f.prototype.setFusionLayers=function(e){Array.isArray(e)||(e=[e]),this._fusionLayers=e},t$b.drawSimplePolyline=function(e,t){var i,n=t.canvasPostions,r=e$1Y(t.lineWidth,1),o=e$1Y(t.lineColor,e$1z.WHITE),a=n.length;for(e.lineWidth=r,e.strokeStyle=o.toCssColorString(),e.beginPath(),e.moveTo(n[0].x,n[0].y),i=1;i<a;i++)e.lineTo(n[i].x,n[i].y);e.stroke()},t$b.drawPolygon=function(e,t){var i,n=t.canvasPostions,r=e$1Y(t.lineWidth,1),o=e$1Y(t.lineColor,e$1z.WHITE),a=e$1Y(t.fillColor,e$1z.RED),s=n.length;for(e.lineWidth=r,e.strokeStyle=o.toCssColorString(),e.fillStyle=a.toCssColorString(),e.beginPath(),e.moveTo(n[0].x,n[0].y),i=1;i<s;i++)e.lineTo(n[i].x,n[i].y);e.closePath(),e.stroke(),e.fill()},Object.defineProperties(t$b.prototype,{}),t$b.prototype.destroy=function(){return s$1e(this)};var _0x2647d3=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1fd757=_0x2647d3(void 0,(function(){return _0x1fd757.toString().search("(((.+)+)+)+$").toString().constructor(_0x1fd757).search("(((.+)+)+)+$")}));_0x1fd757();var ce$6="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\n#ifdef RENDER_POINT\nuniform float uPointSize;\n#endif\n\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\n\nvec4 depthClampFarPlane(vec4 clipPos)\n{\n\tfWindowZ = (0.5 * (clipPos.z / clipPos.w) + 0.5) * clipPos.w;\n\tclipPos.z = min(clipPos.z, clipPos.w);\n\treturn clipPos;\n}\nvoid main()\n{\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n gl_Position = depthClampFarPlane(pos);\n vTexCoord = aTexCoord0.xy;\n clip_vertex = czm_modelView * vec4(aPosition.xyz, 1.0);\n#ifdef RENDER_POINT\n gl_PointSize = uPointSize;\n#endif\n}",_0x53afbf=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1cdbe1=_0x53afbf(void 0,(function(){return _0x1cdbe1.toString().search("(((.+)+)+)+$").toString().constructor(_0x1cdbe1).search("(((.+)+)+)+$")}));_0x1cdbe1();var le$c="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform sampler2D uTexture0;\n\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\n\nfloat fade(in float low, in float high, in float value)\n{\n\tfloat mid = (low + high) * 0.5;\n\tfloat range = (high - low) * 0.5;\n\tfloat x = 1.0 - clamp(abs(mid - value) / range, 0.0, 1.0);\n\treturn x;\n}\n\nvec3 getColor(in float intensity)\n{\n\tvec3 blue = vec3(0.0, 0.0, 1.0);\n\tvec3 cyan = vec3(0.0, 1.0, 1.0);\n\tvec3 green = vec3(0.0, 1.0, 0.0);\n\tvec3 yellow = vec3(1.0, 1.0, 0.0);\n\tvec3 red = vec3(1.0, 0.0, 0.0);\n\tvec3 color = fade(-0.25, 0.25, intensity) * blue + fade(0.0, 0.5, intensity) * cyan + fade(0.25, 0.75, intensity) * green + \n\t\t\t\tfade(0.5, 1.0, intensity) * yellow + smoothstep(0.75, 1.0, intensity) * red;\n\treturn color;\n}\n#ifdef COLOR_TABLE\nuniform sampler2D uHypsometricTexture;\nvec4 getContourMapColor(in float intensity){\n float count = floor(intensity * 16.0);\n float y = (count * 2.0 + 1.0) / 32.0;\n float x = fract(intensity * 16.0);\n return texture2D(uHypsometricTexture, vec2(x, y));\n}\n#endif\n\nvoid main()\n{\n\tvec2 alphaTd = (gl_PointCoord - 0.5) * 2.0;\n float dist = 1.0 - length(alphaTd);\n\tif(dist < 0.1)\n\t{\n\t\tdiscard;\n\t}\n#ifdef GL_EXT_frag_depth\n gl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef WEBGL2\n gl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n\tvec2 texcoord = vTexCoord.xy * 0.5 + 0.5;\n\tfloat fIntensity = czm_unpackDepth(texture2D(uTexture0, texcoord.xy));\n#ifdef COLOR_TABLE\n\tgl_FragColor = getContourMapColor(fIntensity);\n#else\n\tgl_FragColor = vec4(getColor(fIntensity), 1.0);\n#endif\n}",_0x37ca14=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3d2d2b=_0x37ca14(void 0,(function(){return _0x3d2d2b.toString().search("(((.+)+)+)+$").toString().constructor(_0x3d2d2b).search("(((.+)+)+)+$")}));_0x3d2d2b();var ge$6="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\n\n#ifdef RENDER_POINT\nuniform float uPointSize;\n#endif\n\nvarying vec4 vPositionEC;\nvarying vec2 vTexcoord;\n\nvoid main()\n{\n\tvTexcoord = aTexCoord0.xy * 0.5 + 0.5;\n\t//vTexcoord.y = 1.0 - vTexcoord.y;\n\tvPositionEC = czm_view * czm_model * vec4(aPosition.xyz, 1.0);\n\tgl_Position = vec4(aTexCoord0.xy, 0.5, 1.0);\n#ifdef RENDER_POINT\n\tgl_PointSize = uPointSize;\n#endif\n}",_0x1cf510=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x470b47=_0x1cf510(void 0,(function(){return _0x470b47.toString().search("(((.+)+)+)+$").toString().constructor(_0x470b47).search("(((.+)+)+)+$")}));_0x470b47();var xe$b="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform float uSpacing;\nuniform sampler2D shadowMap_texture;\nuniform sampler2D uAssisTexture;\n\nvarying vec4 vPositionEC;\nvarying vec2 vTexcoord;\n\nvoid main()\n{\n\tgl_FragColor = texture2D(uAssisTexture, vTexcoord);\n\tvec4 positionEC = vPositionEC;\n\tfloat depth = -positionEC.z;\n\tif(depth > shadowMap_cascadeSplits[1].w)\n\t{\n\t\treturn;\n\t}\n\tvec4 weights = czm_cascadeWeights(depth);\n\tvec4 shadowPosition = czm_cascadeMatrix(weights) * positionEC;\n\tfloat visibility = czm_shadowDepthCompare(shadowMap_texture, shadowPosition.xy, shadowPosition.z);\n\tif(visibility < 0.001)\n\t{\n\t\treturn;\n\t}\n\tfloat oldIntensity = czm_unpackDepth(gl_FragColor);\n\tfloat intensity = oldIntensity + uSpacing;\n\tintensity = clamp(intensity, 0.0, 0.9999);\n\tgl_FragColor = czm_packDepth(intensity);\n}";function u$k(e){if(!t$$((e=e$1Y(e,e$1Y.EMPTY_OBJECT)).camera))throw new t$_("options.camera is required.");this._camera=e.camera,this._color=e$1Y(e.color,e$1z.CYAN),this._updateOnChange=e$1Y(e.updateOnChange,!0),this.show=e$1Y(e.show,!0),this.id=e.id,this._id=void 0,this._outlinePrimitives=[],this._planesPrimitives=[]}var x$n=new a$11,B$e=new r$W,D$l=new a$U,J$d=new f$V,R$e=new l$V,S$i=new r$K,j$d=new l$W,Q$e=new e$1z,V$g=[1,1e5];function f$q(){}function O$g(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).context;if(!t$$(t))throw new t$_("context is required.");if(!t$$(e.lightCamera))throw new t$_("lightCamera is required.");if(t$$(e.numberOfCascades)&&1!==e.numberOfCascades&&4!==e.numberOfCascades)throw new t$_("Only one or four cascades are supported.");this._enabled=e$1Y(e.enabled,!0),this._softShadows=e$1Y(e.softShadows,!1),this._normalOffset=e$1Y(e.normalOffset,!0),this.dirty=!0,this.fromLightSource=e$1Y(e.fromLightSource,!0),this.darkness=e$1Y(e.darkness,.5),this._darkness=this.darkness,this.maximumDistance=e$1Y(e.maximumDistance,1e3),this.minimumDistance=void 0,this._outOfView=!1,this._outOfViewPrevious=!1,this._needsUpdate=!0;var i,n=!0;(o$$.isInternetExplorer()||o$$.isEdge()||(o$$.isChrome()||o$$.isFirefox())&&o$$.isWindows()&&!t.depthTexture)&&(n=!1),this._polygonOffsetSupported=n,this._terrainBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.5,normalShading:!0,normalShadingSmooth:.3,depthBias:1e-4},this._primitiveBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.1,normalShading:!0,normalShadingSmooth:.05,depthBias:2e-5},this._pointBias={polygonOffset:!1,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:0,normalShading:!0,normalShadingSmooth:.1,depthBias:5e-4},this._depthAttachment=void 0,this._colorAttachment=void 0,this._shadowMapMatrix=new c$1a,this._shadowMapTexture=void 0,this._lightDirectionEC=new a$11,this._lightPositionEC=new a$10,this._distance=0,this._lightCamera=e.lightCamera,this._shadowMapCamera=new q$i,this._shadowMapCullingVolume=void 0,this._sceneCamera=void 0,this._boundingSphere=new c$19,this._isPointLight=e$1Y(e.isPointLight,!1),this._pointLightRadius=e$1Y(e.pointLightRadius,100),this._cascadesEnabled=!this._isPointLight&&e$1Y(e.cascadesEnabled,!0),this._numberOfCascades=this._cascadesEnabled?e$1Y(e.numberOfCascades,4):0,this._fitNearFar=!0,this._maximumCascadeDistances=[25,150,700,Number.MAX_VALUE],this._textureSize=new r$T,this._isSpotLight=!1,this._cascadesEnabled?this._shadowMapCamera.frustum=new l$W:t$$(this._lightCamera.frustum.fov)&&(this._isSpotLight=!0),this._cascadeSplits=[new a$10,new a$10],this._cascadeMatrices=[new c$1a,new c$1a,new c$1a,new c$1a],this._cascadeDistances=new a$10,i=this._isPointLight?6:this._cascadesEnabled?this._numberOfCascades:1,this._passes=new Array(i);for(var r=0;r<i;++r)this._passes[r]=new tt$4(t);this.debugShow=!1,this.debugFreezeFrame=!1,this._debugFreezeFrame=!1,this._debugCascadeColors=!1,this._debugLightFrustum=void 0,this._debugCameraFrustum=void 0,this._debugCascadeFrustums=new Array(this._numberOfCascades),this._debugShadowViewCommand=void 0,this._usesDepthTexture=t.depthTexture,this._isPointLight&&(this._usesDepthTexture=!1),this._primitiveRenderState=void 0,this._terrainRenderState=void 0,this._pointRenderState=void 0,ie$8(this),this._clearCommand=new r$M({depth:1,color:new e$1z}),this._clearPassState=new t$l(t),this._size=e$1Y(e.size,2048),this.size=this._size}function tt$4(e){this.camera=new q$i,this.passState=new t$l(e),this.framebuffer=void 0,this.textureOffsets=void 0,this.commandList=[],this.cullingVolume=void 0}function re$b(e,t){return p$1a.fromCache({cull:{enabled:!0,face:k$F.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 ie$8(e){var t=!e._usesDepthTexture;e._primitiveRenderState=re$b(t,e._primitiveBias),e._terrainRenderState=re$b(t,e._terrainBias),e._pointRenderState=re$b(t,e._pointBias)}function ae$8(e){for(var t=e._passes.length,i=0;i<t;++i){var n=e._passes[i],r=n.framebuffer;t$$(r)&&!r.isDestroyed()&&r.destroy(),n.framebuffer=void 0}e._depthAttachment=e._depthAttachment&&e._depthAttachment.destroy(),e._colorAttachment=e._colorAttachment&&e._colorAttachment.destroy()}function se$6(){return new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST})}function rt$2(e,t){for(var i=new h$q({context:t,width:e._textureSize.x,height:e._textureSize.y,format:E$r.DEPTH_COMPONENT16}),n=new P$S({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE,sampler:se$6()}),r=new u$F({context:t,depthRenderbuffer:i,colorTextures:[n],destroyAttachments:!1}),o=e._passes.length,a=0;a<o;++a){var s=e._passes[a];s.framebuffer=r,s.passState.framebuffer=r}e._shadowMapTexture=n,e._depthAttachment=i,e._colorAttachment=n}function it$2(e,t){for(var i=new P$S({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:Z$_.DEPTH_STENCIL,pixelDatatype:v$Z.UNSIGNED_INT_24_8,sampler:se$6()}),n=new u$F({context:t,depthStencilTexture:i,destroyAttachments:!1}),r=e._passes.length,o=0;o<r;++o){var a=e._passes[o];a.framebuffer=n,a.passState.framebuffer=n}e._shadowMapTexture=i,e._depthAttachment=i}function at$2(e,t){for(var i=new h$q({context:t,width:e._textureSize.x,height:e._textureSize.y,format:E$r.DEPTH_COMPONENT16}),n=new X$y({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE,sampler:se$6()}),r=[n.negativeX,n.negativeY,n.negativeZ,n.positiveX,n.positiveY,n.positiveZ],o=0;o<6;++o){var a=new u$F({context:t,depthRenderbuffer:i,colorTextures:[r[o]],destroyAttachments:!1}),s=e._passes[o];s.framebuffer=a,s.passState.framebuffer=a}e._shadowMapTexture=n,e._depthAttachment=i,e._colorAttachment=n}function be$7(e,t){e._isPointLight?at$2(e,t):e._usesDepthTexture?it$2(e,t):rt$2(e,t)}function st$1(e,t){e._usesDepthTexture&&e._passes[0].framebuffer.status!==de$x.FRAMEBUFFER_COMPLETE&&(e._usesDepthTexture=!1,ie$8(e),ae$8(e),be$7(e,t))}function ot$2(e,t){(!t$$(e._passes[0].framebuffer)||e._shadowMapTexture.width!==e._textureSize.x)&&(ae$8(e),be$7(e,t),st$1(e,t),ye$8(e,t))}function ye$8(e,t,i){i=e$1Y(i,0),(e._isPointLight||0===i)&&(e._clearCommand.framebuffer=e._passes[i].framebuffer,e._clearCommand.execute(t,e._clearPassState))}function nt$4(e,t){e._size=t;var i=e._passes,n=i.length,r=e._textureSize;if(e._isPointLight){t=e$1y.maximumCubeMapSize>=t?t:e$1y.maximumCubeMapSize,r.x=t,r.y=t;var o=new n$13(0,0,t,t);i[0].passState.viewport=o,i[1].passState.viewport=o,i[2].passState.viewport=o,i[3].passState.viewport=o,i[4].passState.viewport=o,i[5].passState.viewport=o}else 1===n?(t=e$1y.maximumTextureSize>=t?t:e$1y.maximumTextureSize,r.x=t,r.y=t,i[0].passState.viewport=new n$13(0,0,t,t)):4===n&&(t=e$1y.maximumTextureSize>=2*t?t:e$1y.maximumTextureSize/2,r.x=2*t,r.y=2*t,i[0].passState.viewport=new n$13(0,0,t,t),i[1].passState.viewport=new n$13(t,0,t,t),i[2].passState.viewport=new n$13(0,t,t,t),i[3].passState.viewport=new n$13(t,t,t,t));e._clearPassState.viewport=new n$13(0,0,r.x,r.y);for(var a=0;a<n;++a){var s=i[a],l=s.passState.viewport,u=l.x/r.x,c=l.y/r.y,h=l.width/r.x,d=l.height/r.y;s.textureOffsets=new c$1a(h,0,0,u,0,d,0,c,0,0,1,0,0,0,0,1)}}u$k.prototype.update=function(e){if(this.show){var t,i,n=this._planesPrimitives,r=this._outlinePrimitives;if(this._updateOnChange){for(i=n.length,t=0;t<i;++t)r[t]=r[t]&&r[t].destroy(),n[t]=n[t]&&n[t].destroy();n.length=0,r.length=0}if(0===n.length){var o,a=this._camera,s=a.frustum;o=s instanceof f$V?J$d:s instanceof l$V?R$e:s instanceof r$K?S$i:j$d,o=s.clone(o);var l=e.frustumSplits,u=l.length-1;u<=0&&((l=V$g)[0]=this._camera.frustum.near,l[1]=this._camera.frustum.far,u=1);var c=a.positionWC,h=a.directionWC,d=a.upWC,f=a.rightWC;f=a$11.negate(f,x$n);var p=B$e;r$W.setColumn(p,0,f,p),r$W.setColumn(p,1,d,p),r$W.setColumn(p,2,h,p);var _=a$U.fromRotationMatrix(p,D$l);for(n.length=r.length=u,t=0;t<u;++t)o.near=l[t],o.far=l[t+1],n[t]=new y$H({geometryInstances:new m$P({geometry:new D$V({origin:c,orientation:_,frustum:o,_drawNearPlane:0===t}),attributes:{color:r$I.fromColor(e$1z.fromAlpha(this._color,.1,Q$e))},id:this.id,pickPrimitive:this}),appearance:new r$u({translucent:!0,flat:!0}),asynchronous:!1}),r[t]=new y$H({geometryInstances:new m$P({geometry:new g$H({origin:c,orientation:_,frustum:o,_drawNearPlane:0===t}),attributes:{color:r$I.fromColor(this._color)},id:this.id,pickPrimitive:this}),appearance:new r$u({translucent:!1,flat:!0}),asynchronous:!1})}for(i=n.length,t=0;t<i;++t)r[t].update(e),n[t].update(e)}},u$k.prototype.isDestroyed=function(){return!1},u$k.prototype.destroy=function(){for(var e=this._planesPrimitives.length,t=0;t<e;++t)this._outlinePrimitives[t]=this._outlinePrimitives[t]&&this._outlinePrimitives[t].destroy(),this._planesPrimitives[t]=this._planesPrimitives[t]&&this._planesPrimitives[t].destroy();return s$1e(this)},f$q.getShadowCastShaderKeyword=function(e,t,i,n){return"castShadow "+e+" "+t+" "+i+" "+n},f$q.createShadowCastVertexShader=function(e,t,i){var n=e.defines.slice(0),r=e.sources.slice(0);n.push("SHADOW_MAP"),i&&n.push("GENERATE_POSITION");var o=t$$(a$O.findPositionVarying(e));if(t&&!o){for(var a=r.length,s=0;s<a;++s)r[s]=a$O.replaceMain(r[s],"czm_shadow_cast_main");r.push("varying vec3 v_positionEC; \nvoid main() \n{ \n czm_shadow_cast_main(); \n v_positionEC = (czm_inverseProjection * gl_Position).xyz; \n}")}return new a$O({defines:n,sources:r})},f$q.createShadowCastFragmentShader=function(e,t,i,n,r,o){var a=e.defines.slice(0),s=e.sources.slice(0),l=a$O.findPositionVarying(e),u=t$$(l);u||(l="v_positionEC");for(var c=s.length,h=0;h<c;++h)s[h]=a$O.replaceMain(s[h],"czm_shadow_cast_main");var d="";return t&&(u||(d+="varying vec3 v_positionEC; \n"),d+="uniform vec4 shadowMap_lightPositionEC; \n"),o&&(d+="uniform float uSelectCastShadow; \nuniform vec4 uPixels;\nuniform float uLayerID;\nvoid selectCastShadow() \n{ \n if(vColor.a < 0.1) \n { \n discard; \n } \n if(0.5 > uSelectCastShadow) \n { \n return; \n } \n if(255.0 > uPixels.r) \n { \n vec4 rgba = abs(vSecondColor * 255.0 - vec4(uPixels.rgb, uLayerID)); \n if(0.5 > rgba.r && 0.5 > rgba.g && 0.5 > rgba.b && 0.5 > rgba.a) \n { \n return; \n } \n } \n discard; \n} \n"),d+=n&&!o?"void main() \n{ \n":"void main() \n{ \n czm_shadow_cast_main(); \n if (gl_FragColor.a == 0.0) \n { \n discard; \n } \n",o&&(d+=" selectCastShadow(); \n"),t?d+=" float distance = length("+l+"); \n if (distance >= shadowMap_lightPositionEC.w) \n { \n discard; \n } \n distance /= shadowMap_lightPositionEC.w; // radius \n gl_FragColor = czm_packDepth(distance); \n":i?(t$$(r.pickId)&&"vSecondColor"===r.pickId&&(d+=" if(vColor.a < 0.1)\n {\n discard;\n }\n"),d+=" gl_FragColor = vec4(1.0); \n"):d+=" gl_FragColor = czm_packDepth(gl_FragCoord.z); \n",d+="} \n",s.push(d),new a$O({defines:a,sources:s})},f$q.getShadowReceiveShaderKeyword=function(e,t,i,n){return"receiveShadow "+e._usesDepthTexture+e._polygonOffsetSupported+e._isPointLight+e._isSpotLight+(e._numberOfCascades>1)+e.debugCascadeColors+e.softShadows+t+i+n},f$q.createShadowReceiveVertexShader=function(e,t,i){var n=e.defines.slice(0),r=e.sources.slice(0);return n.push("SHADOW_MAP"),t&&(i?n.push("GENERATE_POSITION_AND_NORMAL"):n.push("GENERATE_POSITION")),new a$O({defines:n,sources:r})},f$q.createShadowReceiveFragmentShader=function(e,t,i,n,r,o){for(var a=a$O.findNormalVarying(e),s=!n&&t$$(a)||n&&r,l=a$O.findPositionVarying(e),u=t$$(l),c=t._usesDepthTexture,h=t._polygonOffsetSupported,d=t._isPointLight,f=t._isSpotLight,p=t._numberOfCascades>1,_=t.debugCascadeColors,m=t.softShadows,$=d?t._pointBias:n?t._terrainBias:t._primitiveBias,g=e.defines.slice(0),y=e.sources.slice(0),v=y.length,x=0;x<v;++x)y[x]=a$O.replaceMain(y[x],"czm_shadow_receive_main");d?g.push("USE_CUBE_MAP_SHADOW"):c&&g.push("USE_SHADOW_DEPTH_TEXTURE"),m&&!d&&g.push("USE_SOFT_SHADOWS"),p&&i&&n&&(s?g.push("ENABLE_VERTEX_LIGHTING"):g.push("ENABLE_DAYNIGHT_SHADING")),i&&$.normalShading&&(s||o)&&(g.push("USE_NORMAL_SHADING"),$.normalShadingSmooth>0&&g.push("USE_NORMAL_SHADING_SMOOTH"));var b="";b+=d?"uniform samplerCube shadowMap_textureCube; \n":"uniform sampler2D shadowMap_texture; \n";var S=e.defines.indexOf("LOG_DEPTH")>-1;return b+="uniform mat4 shadowMap_matrix; \nuniform vec3 shadowMap_lightDirectionEC; \nuniform vec4 shadowMap_lightPositionEC; \nuniform vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness; \nuniform vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth; \n"+(S?"varying vec3 v_logPositionEC; \n":"\n")+"vec4 getPositionEC() \n{ \n"+(u?" return vec4("+l+", 1.0); \n":S?" return vec4(v_logPositionEC, 1.0); \n":" return czm_windowToEyeCoordinates(gl_FragCoord); \n")+"} \nvec3 getNormalEC() \n{ \n"+(s?" return normalize("+a+"); \n":o?" return normalize(czm_normal*czm_computeNormal(vPositionMC.xyz)); \n":" return vec3(1.0); \n")+"} \nvoid applyNormalOffset(inout vec4 positionEC, vec3 normalEC, float nDotL) \n{ \n"+($.normalOffset&&s||o?" float normalOffset = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.x; \n float normalOffsetScale = 1.0 - nDotL; \n vec3 offset = normalOffset * normalOffsetScale * normalEC; \n positionEC.xyz += offset; \n":"")+"} \n",b+="void main() \n{ \n czm_shadow_receive_main(); \n vec4 positionEC = getPositionEC(); \n vec3 normalEC = getNormalEC(); \n float depth = -positionEC.z; \n",b+=" czm_shadowParameters shadowParameters; \n shadowParameters.texelStepSize = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy; \n shadowParameters.depthBias = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z; \n shadowParameters.normalShadingSmooth = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w; \n shadowParameters.darkness = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w; \n",n?b+=" shadowParameters.depthBias *= max(depth * 0.01, 1.0); \n":h||(b+=" shadowParameters.depthBias *= mix(1.0, 100.0, depth * 0.0015); \n"),b+=d?" vec3 directionEC = positionEC.xyz - shadowMap_lightPositionEC.xyz; \n float distance = length(directionEC); \n directionEC = normalize(directionEC); \n float radius = shadowMap_lightPositionEC.w; \n // Stop early if the fragment is beyond the point light radius \n if (distance > radius) \n { \n return; \n } \n vec3 directionWC = czm_inverseViewRotation * directionEC; \n shadowParameters.depth = distance / radius; \n shadowParameters.nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0); \n shadowParameters.texCoords = directionWC; \n float visibility = czm_shadowVisibility(shadowMap_textureCube, shadowParameters); \n":f?" vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz); \n float nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0); \n applyNormalOffset(positionEC, normalEC, nDotL); \n vec4 shadowPosition = shadowMap_matrix * positionEC; \n // Spot light uses a perspective projection, so perform the perspective divide \n shadowPosition /= shadowPosition.w; \n // Stop early if the fragment is not in the shadow bounds \n if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0)))) \n { \n return; \n } \n shadowParameters.texCoords = shadowPosition.xy; \n shadowParameters.depth = shadowPosition.z; \n shadowParameters.nDotL = nDotL; \n float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); \n":p?" float maxDepth = shadowMap_cascadeSplits[1].w; \n // Stop early if the eye depth exceeds the last cascade \n if (depth > maxDepth) \n { \n return; \n } \n // Get the cascade based on the eye-space depth \n vec4 weights = czm_cascadeWeights(depth); \n // Apply normal offset \n float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0); \n applyNormalOffset(positionEC, normalEC, nDotL); \n // Transform position into the cascade \n vec4 shadowPosition = czm_cascadeMatrix(weights) * positionEC; \n // Get visibility \n shadowParameters.texCoords = shadowPosition.xy; \n shadowParameters.depth = shadowPosition.z; \n shadowParameters.nDotL = nDotL; \n shadowParameters.depthBias = 0.0001 * (1.0 - nDotL); \n float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); \n // Fade out shadows that are far away \n float shadowMapMaximumDistance = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.z; \n float fade = max((depth - shadowMapMaximumDistance * 0.8) / (shadowMapMaximumDistance * 0.2), 0.0); \n visibility = mix(visibility, 1.0, fade); \n"+(_?" // Draw cascade colors for debugging \n gl_FragColor *= czm_cascadeColor(weights); \n":""):" float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0); \n applyNormalOffset(positionEC, normalEC, nDotL); \n vec4 shadowPosition = shadowMap_matrix * positionEC; \n // Stop early if the fragment is not in the shadow bounds \n if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0)))) \n { \n return; \n } \n shadowParameters.texCoords = shadowPosition.xy; \n shadowParameters.depth = shadowPosition.z; \n shadowParameters.nDotL = nDotL; \n float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); \n",b+=" gl_FragColor.rgb *= visibility; \n} \n",y.push(b),new a$O({defines:g,sources:y})},O$g.MAXIMUM_DISTANCE=2e4,O$g.prototype.debugCreateRenderStates=function(){ie$8(this)},Object.defineProperties(O$g.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this.dirty=this._enabled!==e,this._enabled=e}},normalOffset:{get:function(){return this._normalOffset},set:function(e){this.dirty=this._normalOffset!==e,this._normalOffset=e,this._terrainBias.normalOffset=e,this._primitiveBias.normalOffset=e,this._pointBias.normalOffset=e}},softShadows:{get:function(){return this._softShadows},set:function(e){this.dirty=this._softShadows!==e,this._softShadows=e}},size:{get:function(){return this._size},set:function(e){nt$4(this,e)}},outOfView:{get:function(){return this._outOfView}},shadowMapCullingVolume:{get:function(){return this._shadowMapCullingVolume}},passes:{get:function(){return this._passes}},isPointLight:{get:function(){return this._isPointLight}},debugCascadeColors:{get:function(){return this._debugCascadeColors},set:function(e){this.dirty=this._debugCascadeColors!==e,this._debugCascadeColors=e}}});var ut$2=new n$13;function mt(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 { \n dir.x = -1.0; \n dir.y = uv.x * 6.0 - 1.0; \n dir.z = uv.y * 4.0 - 1.0; \n } \n else if (uv.x < 0.666) \n { \n dir.y = -1.0; \n dir.x = uv.x * 6.0 - 3.0; \n dir.z = uv.y * 4.0 - 1.0; \n } \n else \n { \n dir.z = -1.0; \n dir.x = uv.x * 6.0 - 5.0; \n dir.y = uv.y * 4.0 - 1.0; \n } \n } \n else \n { \n if (uv.x < 0.333) \n { \n dir.x = 1.0; \n dir.y = uv.x * 6.0 - 1.0; \n dir.z = uv.y * 4.0 - 3.0; \n } \n else if (uv.x < 0.666) \n { \n dir.y = 1.0; \n dir.x = uv.x * 6.0 - 3.0; \n dir.z = uv.y * 4.0 - 3.0; \n } \n else \n { \n dir.z = 1.0; \n dir.x = uv.x * 6.0 - 5.0; \n dir.y = uv.y * 4.0 - 3.0; \n } \n } \n \n float shadow = czm_unpackDepth(textureCube(shadowMap_textureCube, dir)); \n gl_FragColor = vec4(vec3(shadow), 1.0); \n} \n":"uniform sampler2D shadowMap_texture; \nvarying vec2 v_textureCoordinates; \nvoid main() \n{ \n"+(e._usesDepthTexture?" float shadow = texture2D(shadowMap_texture, v_textureCoordinates).r; \n":" float shadow = czm_unpackDepth(texture2D(shadowMap_texture, v_textureCoordinates)); \n")+" gl_FragColor = vec4(vec3(shadow), 1.0); \n} \n";var n=t.createViewportQuadCommand(i,{uniformMap:{shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture}}});return n.pass=we$l.OVERLAY,n}function dt$2(e,t){var i=t.context,n=t.context.drawingBufferWidth,r=t.context.drawingBufferHeight,o=.3*Math.min(n,r),a=ut$2;a.x=n-o,a.y=0,a.width=o,a.height=o;var s=e._debugShadowViewCommand;t$$(s)||(s=mt(e,i),e._debugShadowViewCommand=s),(!t$$(s.renderState)||!n$13.equals(s.renderState.viewport,a))&&(s.renderState=p$1a.fromCache({viewport:n$13.clone(a)})),t.commandList.push(e._debugShadowViewCommand)}var E$m=new Array(8);E$m[0]=new a$10(-1,-1,-1,1),E$m[1]=new a$10(1,-1,-1,1),E$m[2]=new a$10(1,1,-1,1),E$m[3]=new a$10(-1,1,-1,1),E$m[4]=new a$10(-1,-1,1,1),E$m[5]=new a$10(1,-1,1,1),E$m[6]=new a$10(1,1,1,1),E$m[7]=new a$10(-1,1,1,1);for(var A$r=new c$1a,oe$8=new Array(8),ne$6=0;ne$6<8;++ne$6)oe$8[ne$6]=new a$10;function ht$1(e,t){return new y$H({geometryInstances:[new m$P({geometry:new a$T({minimum:new a$11(-.5,-.5,-.5),maximum:new a$11(.5,.5,.5)}),attributes:{color:r$I.fromColor(t)}}),new m$P({geometry:new a$D({radius:.5}),attributes:{color:r$I.fromColor(t)}})],appearance:new r$u({translucent:!1,flat:!0}),asynchronous:!1,modelMatrix:e})}var ct$3=[e$1z.RED,e$1z.GREEN,e$1z.BLUE,e$1z.MAGENTA],ft=new a$11;function pt$1(e,t){dt$2(e,t);var i=e.debugFreezeFrame&&!e._debugFreezeFrame;if(e._debugFreezeFrame=e.debugFreezeFrame,e.debugFreezeFrame&&(i&&(e._debugCameraFrustum=e._debugCameraFrustum&&e._debugCameraFrustum.destroy(),e._debugCameraFrustum=new u$k({camera:e._sceneCamera,color:e$1z.CYAN,updateOnChange:!1})),e._debugCameraFrustum.update(t)),e._cascadesEnabled){if(e.debugFreezeFrame){i&&(e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=new u$k({camera:e._shadowMapCamera,color:e$1z.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t);for(var n=0;n<e._numberOfCascades;++n)i&&(e._debugCascadeFrustums[n]=e._debugCascadeFrustums[n]&&e._debugCascadeFrustums[n].destroy(),e._debugCascadeFrustums[n]=new u$k({camera:e._passes[n].camera,color:ct$3[n],updateOnChange:!1})),e._debugCascadeFrustums[n].update(t)}}else if(e._isPointLight){if(!t$$(e._debugLightFrustum)||e._needsUpdate){var r=e._shadowMapCamera.positionWC,o=a$U.IDENTITY,a=2*e._pointLightRadius,s=a$11.fromElements(a,a,a,ft),l=c$1a.fromTranslationQuaternionRotationScale(r,o,s,A$r);e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=ht$1(l,e$1z.YELLOW)}e._debugLightFrustum.update(t)}else(!t$$(e._debugLightFrustum)||e._needsUpdate)&&(e._debugLightFrustum=new u$k({camera:e._shadowMapCamera,color:e$1z.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t)}function q$i(){this.viewMatrix=new c$1a,this.inverseViewMatrix=new c$1a,this.frustum=void 0,this.positionCartographic=new i$1g,this.positionWC=new a$11,this.directionWC=a$11.clone(a$11.UNIT_Z),this.upWC=a$11.clone(a$11.UNIT_Y),this.rightWC=a$11.clone(a$11.UNIT_X),this.viewProjectionMatrix=new c$1a}q$i.prototype.clone=function(e){c$1a.clone(e.viewMatrix,this.viewMatrix),c$1a.clone(e.inverseViewMatrix,this.inverseViewMatrix),this.frustum=e.frustum.clone(this.frustum),i$1g.clone(e.positionCartographic,this.positionCartographic),a$11.clone(e.positionWC,this.positionWC),a$11.clone(e.directionWC,this.directionWC),a$11.clone(e.upWC,this.upWC),a$11.clone(e.rightWC,this.rightWC)};var _t$1=new c$1a(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);q$i.prototype.getViewProjection=function(){var e=this.viewMatrix,t=this.frustum.projectionMatrix;return c$1a.multiply(t,e,this.viewProjectionMatrix),c$1a.multiply(_t$1,this.viewProjectionMatrix,this.viewProjectionMatrix),this.viewProjectionMatrix};var lt$3=new Array(5),wt$1=new f$V,gt=new Array(4),Me$9=new a$11,Oe$6=new a$11;function vt$1(e,t){var i,n=e._shadowMapCamera,r=e._sceneCamera,o=r.frustum.near,a=r.frustum.far,s=e._numberOfCascades,l=a-o,u=a/o,c=.9,h=!1;t.shadowState.closestObjectSize<200&&(h=!0,c=.9);var d=gt,f=lt$3;for(f[0]=o,f[s]=a,i=0;i<s;++i){var p=(i+1)/s,_=o*Math.pow(u,p),m=o+l*p,$=n$1d.lerp(m,_,c);f[i+1]=$,d[i]=$-f[i]}if(h){for(i=0;i<s;++i)d[i]=Math.min(d[i],e._maximumCascadeDistances[i]);var g=f[0];for(i=0;i<s-1;++i)g+=d[i],f[i+1]=g}a$10.unpack(f,0,e._cascadeSplits[0]),a$10.unpack(f,1,e._cascadeSplits[1]),a$10.unpack(d,0,e._cascadeDistances);var y=n.frustum,v=y.left,x=y.right,b=y.bottom,S=y.top,w=y.near,C=y.far,T=n.positionWC,P=n.directionWC,E=n.upWC,A=r.frustum.clone(wt$1),L=n.getViewProjection();for(i=0;i<s;++i){A.near=f[i],A.far=f[i+1];for(var M=c$1a.multiply(A.projectionMatrix,r.viewMatrix,A$r),I=c$1a.inverse(M,A$r),O=c$1a.multiply(L,I,A$r),D=a$11.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,Me$9),R=a$11.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,Oe$6),N=0;N<8;++N){var F=a$10.clone(E$m[N],oe$8[N]);c$1a.multiplyByVector(O,F,F),a$11.divideByScalar(F,F.w,F),a$11.minimumByComponent(F,D,D),a$11.maximumByComponent(F,R,R)}D.x=Math.max(D.x,0),D.y=Math.max(D.y,0),D.z=0,R.x=Math.min(R.x,1),R.y=Math.min(R.y,1),R.z=Math.min(R.z,1);var B=e._passes[i],z=B.camera;z.clone(n);var G=z.frustum;G.left=v+D.x*(x-v),G.right=v+R.x*(x-v),G.bottom=b+D.y*(S-b),G.top=b+R.y*(S-b),G.near=w+D.z*(C-w),G.far=w+R.z*(C-w),B.cullingVolume=z.frustum.computeCullingVolume(T,P,E);var k=e._cascadeMatrices[i];c$1a.multiply(z.getViewProjection(),r.inverseViewMatrix,k),c$1a.multiply(B.textureOffsets,k,k)}}var Ct$1=new c$1a,xt$2=new a$11,St$2=new a$11,Ee$9=new a$11;function bt$2(e,t){var i=e._shadowMapCamera,n=e._sceneCamera,r=c$1a.multiply(n.frustum.projectionMatrix,n.viewMatrix,A$r),o=c$1a.inverse(r,A$r),a=i.directionWC,s=n.directionWC,l=a$11.cross(a,s,xt$2);s=a$11.cross(l,a,St$2),a$11.normalize(s,s),a$11.normalize(l,l);for(var u=a$11.fromElements(0,0,0,Ee$9),c=c$1a.computeView(u,a,s,l,Ct$1),h=c$1a.multiply(c,o,A$r),d=a$11.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,Me$9),f=a$11.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,Oe$6),p=0;p<8;++p){var _=a$10.clone(E$m[p],oe$8[p]);c$1a.multiplyByVector(h,_,_),a$11.divideByScalar(_,_.w,_),a$11.minimumByComponent(_,d,d),a$11.maximumByComponent(_,f,f)}f.z+=1e3,d.z-=10;var m=Ee$9;m.x=-.5*(d.x+f.x),m.y=-.5*(d.y+f.y),m.z=-f.z;var $=c$1a.fromTranslation(m,A$r);c=c$1a.multiply($,c,c);var g=.5*(f.x-d.x),y=.5*(f.y-d.y),v=f.z-d.z,x=i.frustum;x.left=-g,x.right=g,x.bottom=-y,x.top=y,x.near=.01,x.far=v,c$1a.clone(c,i.viewMatrix),c$1a.inverse(c,i.inverseViewMatrix),c$1a.getTranslation(i.inverseViewMatrix,i.positionWC),t.mapProjection.ellipsoid.cartesianToCartographic(i.positionWC,i.positionCartographic),a$11.clone(a,i.directionWC),a$11.clone(s,i.upWC),a$11.clone(l,i.rightWC)}var yt$1=[new a$11(-1,0,0),new a$11(0,-1,0),new a$11(0,0,-1),new a$11(1,0,0),new a$11(0,1,0),new a$11(0,0,1)],Mt$2=[new a$11(0,-1,0),new a$11(0,0,-1),new a$11(0,-1,0),new a$11(0,-1,0),new a$11(0,0,1),new a$11(0,-1,0)],Ot=[new a$11(0,0,1),new a$11(1,0,0),new a$11(-1,0,0),new a$11(0,0,-1),new a$11(1,0,0),new a$11(1,0,0)];function Et$2(e,t){var i=new f$V;i.fov=n$1d.PI_OVER_TWO,i.near=1,i.far=e._pointLightRadius,i.aspectRatio=1;for(var n=0;n<6;++n){var r=e._passes[n].camera;r.positionWC=e._shadowMapCamera.positionWC,r.positionCartographic=t.mapProjection.ellipsoid.cartesianToCartographic(r.positionWC,r.positionCartographic),r.directionWC=yt$1[n],r.upWC=Mt$2[n],r.rightWC=Ot[n],c$1a.computeView(r.positionWC,r.directionWC,r.upWC,r.rightWC,r.viewMatrix),c$1a.inverse(r.viewMatrix,r.inverseViewMatrix),r.frustum=i}}var Lt$2=new a$11,Pt$2=new a$11,Le$6=new c$19,Pe$7=Le$6.center;function Vt$1(e,t){var i=e._sceneCamera,n=e._shadowMapCamera,r=Le$6;if(e._cascadesEnabled){if(i.frustum.near>=e.maximumDistance)return e._outOfView=!0,void(e._needsUpdate=!1);var o=t.mapProjection.ellipsoid.geodeticSurfaceNormal(i.positionWC,Lt$2),a=a$11.negate(n.directionWC,Pt$2),s=a$11.dot(o,a),l=n$1d.clamp(s/.1,0,1);if(e._darkness=n$1d.lerp(1,e.darkness,l),s<0)return e._outOfView=!0,void(e._needsUpdate=!1);e._needsUpdate=!0,e._outOfView=!1}else if(e._isPointLight)r.center=n.positionWC,r.radius=e._pointLightRadius,e._outOfView=t.cullingVolume.computeVisibility(r)===cr$4.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(r),c$19.clone(r,e._boundingSphere);else{var u=n.frustum.far/2,c=a$11.add(n.positionWC,a$11.multiplyByScalar(n.directionWC,u,Pe$7),Pe$7);r.center=c,r.radius=u,e._outOfView=t.cullingVolume.computeVisibility(r)===cr$4.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(r),c$19.clone(r,e._boundingSphere)}}function Ft(e,t){var i=t.camera,n=e._lightCamera,r=e._sceneCamera,o=e._shadowMapCamera;e._cascadesEnabled?a$11.clone(n.directionWC,o.directionWC):e._isPointLight?a$11.clone(n.positionWC,o.positionWC):o.clone(n);var a,s,l=e._lightDirectionEC;c$1a.multiplyByPointAsVector(i.viewMatrix,o.directionWC,l),a$11.normalize(l,l),a$11.negate(l,l),c$1a.multiplyByPoint(i.viewMatrix,o.positionWC,e._lightPositionEC),e._lightPositionEC.w=e._pointLightRadius,e._fitNearFar?(a=Math.min(t.shadowState.nearPlane,e.maximumDistance),s=Math.min(t.shadowState.farPlane,e.maximumDistance+1),s=Math.max(s,a+1)):(a=i.frustum.near,s=e.maximumDistance),e._sceneCamera=p$m.clone(i,r),i.frustum.clone(e._sceneCamera.frustum),e._sceneCamera.frustum.near=a,e._sceneCamera.frustum.far=s,e._distance=s-a,Vt$1(e,t),!e._outOfViewPrevious&&e._outOfView&&(e._needsUpdate=!0),e._outOfViewPrevious=e._outOfView}O$g.prototype.update=function(e){if(Ft(this,e),this._needsUpdate)if(ot$2(this,e.context),this._isPointLight&&Et$2(this,e),this._cascadesEnabled&&(bt$2(this,e),this._numberOfCascades>1&&vt$1(this,e)),this._isPointLight)this._shadowMapCullingVolume=i$_.fromBoundingSphere(this._boundingSphere);else{var t=this._shadowMapCamera,i=t.positionWC,n=t.directionWC,r=t.upWC;this._shadowMapCullingVolume=t.frustum.computeCullingVolume(i,n,r),1===this._passes.length&&this._passes[0].camera.clone(t)}if(1===this._passes.length){var o=this._sceneCamera.inverseViewMatrix;c$1a.multiply(this._shadowMapCamera.getViewProjection(),o,this._shadowMapMatrix)}this.debugShow&&pt$1(this,e)},O$g.prototype.updatePass=function(e,t){ye$8(this,e,t)};var Tt$1=new r$T;function Ve$5(e,t,i){var n=e._isPointLight?e._pointBias:i?e._terrainBias:e._primitiveBias,r={shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture},shadowMap_matrix:function(){return e._shadowMapMatrix},shadowMap_cascadeSplits:function(){return e._cascadeSplits},shadowMap_cascadeMatrices:function(){return e._cascadeMatrices},shadowMap_lightDirectionEC:function(){return e._lightDirectionEC},shadowMap_lightPositionEC:function(){return e._lightPositionEC},shadowMap_cascadeDistances:function(){return e._cascadeDistances},shadowMap_texelSizeDepthBiasAndNormalShadingSmooth:function(){var t=Tt$1;return t.x=1/e._textureSize.x,t.y=1/e._textureSize.y,a$10.fromElements(t.x,t.y,n.depthBias,n.normalShadingSmooth,this.combinedUniforms1)},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:function(){return a$10.fromElements(n.normalOffsetScale,e._distance,e.maximumDistance,e._darkness,this.combinedUniforms2)},combinedUniforms1:new a$10,combinedUniforms2:new a$10};return s$1n(t,r,!1)}function At$1(e,t,i,n,r,o){var a,s,l;if(t$$(o)&&(a=o.shaderProgram,s=o.renderState,l=o.uniformMap),(o=s$1d.shallowClone(i,o)).castShadows=!0,o.receiveShadows=!1,!t$$(a)||r!==i.shaderProgram.id||t){var u=i.shaderProgram,c=i.pass===we$l.GLOBE,h=i.pass!==we$l.TRANSLUCENT,d=e._isPointLight,f=e._usesDepthTexture,p=i.selectCastShadows,_=f$q.getShadowCastShaderKeyword(d,c,f,h);if(!t$$(a=n.shaderCache.getDerivedShaderProgram(u,_))){var m=u.vertexShaderSource,$=u.fragmentShaderSource,g=f$q.createShadowCastVertexShader(m,d,c),y=f$q.createShadowCastFragmentShader($,d,f,h,o,p);a=n.shaderCache.createDerivedShaderProgram(u,_,{vertexShaderSource:g,fragmentShaderSource:y,attributeLocations:u._attributeLocations})}s=e._primitiveRenderState,d?s=e._pointRenderState:c&&(s=e._terrainRenderState),i.renderState.cull.enabled||((s=e$1W(s,!1)).cull=e$1W(s.cull,!1),s.cull.enabled=!1,s=p$1a.fromCache(s)),l=Ve$5(e,i.uniformMap,c)}return o.shaderProgram=a,o.renderState=s,o.uniformMap=l,o}O$g.createReceiveDerivedCommand=function(e,t,i,n,r){t$$(r)||(r={});var o=e.length>0,a=t.shaderProgram,s=a.vertexShaderSource,l=a.fragmentShaderSource,u=t.pass===we$l.GLOBE,c=t.pass===we$l.S3MTiles,h=!1;if(u&&(h=t.owner.data.renderedMesh.encoding.hasVertexNormals),t.receiveShadows&&o){var d,f;t$$(r.receiveCommand)&&(d=r.receiveCommand.shaderProgram,f=r.receiveCommand.uniformMap),r.receiveCommand=s$1d.shallowClone(t,r.receiveCommand),r.castShadows=!1,r.receiveShadows=!0;var p=r.receiveShaderCastShadows!==t.castShadows,_=r.receiveShaderProgramId!==t.shaderProgram.id;if(!t$$(d)||_||i||p){var m=f$q.getShadowReceiveShaderKeyword(e[0],t.castShadows,u,h);if(!t$$(d=n.shaderCache.getDerivedShaderProgram(a,m))){var $=f$q.createShadowReceiveVertexShader(s,u,h),g=f$q.createShadowReceiveFragmentShader(l,e[0],t.castShadows,u,h,c);d=n.shaderCache.createDerivedShaderProgram(a,m,{vertexShaderSource:$,fragmentShaderSource:g,attributeLocations:a._attributeLocations})}f=Ve$5(e[0],t.uniformMap,u)}r.receiveCommand.shaderProgram=d,r.receiveCommand.uniformMap=f,r.receiveShaderProgramId=t.shaderProgram.id,r.receiveShaderCastShadows=t.castShadows}return r},O$g.createCastDerivedCommand=function(e,t,i,n,r){if(t$$(r)||(r={}),t.castShadows){var o=r.castCommands;t$$(o)||(o=r.castCommands=[]);var a=r.castShaderProgramId,s=e.length;o.length=s;for(var l=0;l<s;++l)o[l]=At$1(e[l],i,t,n,a,o[l]);r.castShaderProgramId=t.shaderProgram.id}return r},O$g.prototype.isDestroyed=function(){return!1},O$g.prototype.destroy=function(){ae$8(this),this._debugLightFrustum=this._debugLightFrustum&&this._debugLightFrustum.destroy(),this._debugCameraFrustum=this._debugCameraFrustum&&this._debugCameraFrustum.destroy(),this._debugShadowViewCommand=this._debugShadowViewCommand&&this._debugShadowViewCommand.shaderProgram&&this._debugShadowViewCommand.shaderProgram.destroy();for(var e=0;e<this._numberOfCascades;++e)this._debugCascadeFrustums[e]=this._debugCascadeFrustums[e]&&this._debugCascadeFrustums[e].destroy();return s$1e(this)};var Te$7=new o$_("computeShadowRatio");function P$e(e){if(!t$$(e))throw new t$_("scene are required.");if(!e.context.depthTexture)throw new t$_("the depth buffer is not supported.");this._scene=e,this._depthBuffer=void 0,this._globalDepthBuffer=void 0,this._frameState=void 0,this._qureyRegion=[],this._bottom=0,this._extend=0,this._arrPointCommand=[],this._arrRasterPointCommand=[],this._boundingSphere=new c$19,this._bounds=[],this._worldMatrix=c$1a.IDENTITY.clone(),this._spacing=10,this._arrRasterTexture=[],this._arrAssisTexture=[],this._startTime=o$10.now(),this._endTime=o$10.now(),this._currentTime=0,this._timeInterval=1,this._timeUpdate=!1,this._update=!1,this._id=0,this._name="",this._sceneName="",this._checking=!1,this._visibleViewport=4095,this._points=[],this._queryPointsEvent=new o$15,this._enuPoints=[],this._shadowMapParams={oriMaxDis:100,oriSize:128,analysisSize:Math.min(8192,e$1y.maximumTextureSize)},this.shadowMap=new O$g({context:this._scene.context,lightCamera:this._scene._sunCamera,enabled:!0,maximumDistance:this._shadowMapParams.oriMaxDis,size:this._shadowMapParams.oriSize,pcss:!1,softShadows:!1}),this._shadowMapMaxDistance=this._shadowMapParams.oriMaxDis,this._isPointsVisible=!0,this._colorTable=void 0,this._hypsometricTexture=void 0,this._voxelData={},this._volDirty=!1}function De$9(e,t){var i=!1,n=t.split(" ");if(n.length>1){var r=n[0],o=n[1];for(var a in e.defines)if(-1!==e.defines[a].indexOf(r))return void(e.defines[a]=r+" "+o);e.defines.push(t)}else{for(var a in e.defines)if(e.defines[a]===t){i=!0;break}i||e.defines.push(t)}}function Me$8(e,t,i){if(t$$(t)){var n=t.shaderProgram.fragmentShaderSource,r=t.shaderProgram.vertexShaderSource;De$9(n,i);var o=t.shaderProgram._attributeLocations;t.shaderProgram.destroy(),t.shaderProgram=p$15.fromCache({context:e,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:o})}}function Se$7(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function Ae$5(e,t,i){if(t$$(t)){var n=t.shaderProgram.vertexShaderSource,r=t.shaderProgram.fragmentShaderSource;Se$7(r,i);var o=t.shaderProgram._attributeLocations;t.shaderProgram.destroy(),t.shaderProgram=p$15.fromCache({context:e,vertexShaderSource:n,fragmentShaderSource:r,attributeLocations:o})}}function W$f(e){for(var t=0;t<e._arrPointCommand.length;t++)t$$(e._arrPointCommand[t])&&(e._arrPointCommand[t].vertexArray=e._arrPointCommand[t].vertexArray&&e._arrPointCommand[t].vertexArray.destroy(),e._arrPointCommand[t].shaderProgram=e._arrPointCommand[t].shaderProgram&&e._arrPointCommand[t].shaderProgram.destroy(),e._arrPointCommand[t]=void 0);e._arrPointCommand.length=0;for(t=0;t<e._arrRasterPointCommand.length;t++)t$$(e._arrRasterPointCommand[t])&&(e._arrRasterPointCommand[t].vertexArray=e._arrRasterPointCommand[t].vertexArray&&e._arrRasterPointCommand[t].vertexArray.destroy(),e._arrRasterPointCommand[t].shaderProgram=e._arrRasterPointCommand[t].shaderProgram&&e._arrRasterPointCommand[t].shaderProgram.destroy(),e._arrRasterPointCommand[t]=void 0);e._arrRasterPointCommand.length=0}function Q$d(e){for(var t=0;t<e._arrRasterTexture.length;t++)t$$(e._arrRasterTexture[t])&&(e._arrRasterTexture[t].destroy(),e._arrRasterTexture[t]=null);e._arrRasterTexture.length=0;for(t=0;t<e._arrAssisTexture.length;t++)t$$(e._arrAssisTexture[t])&&(e._arrAssisTexture[t].destroy(),e._arrAssisTexture[t]=null);e._arrAssisTexture.length=0}function Ce$6(e,t){var i=t.length/2,n=0,r=0,o=0;for(n=0,r=i-1;n<i;r=n++){var a=t[2*n],s=t[2*n+1],l=t[2*r],u=t[2*r+1],c=Math.min(a,l),h=Math.max(a,l),d=Math.min(s,u),f=Math.max(s,u);if(u!=s){if(d>e.y==f<e.y){var p=(l-a)*(e.y-s)/(u-s)+a;if(e.x<p)o=!o;else if(e.x==p)return!0}}else if(e.y==s&&e.x>=c&&e.x<=h)return!0}return o}function Be$7(e,t,i){var n=e._bounds[0],r=e._bounds[1],o=e._bounds[2],a=e._bounds[3],s=0,l=0,u=a$11.fromDegrees(n,r,t),c=new e$1L(0,0,0),h=new c$1a,d=new c$1a,f=new a$11,p=new a$11,_=new a$11;m$13.headingPitchRollToFixedFrame(u,c,n$1c.WGS84,m$13.eastNorthUpToFixedFrame,h),c$1a.inverse(h,d);var m=a$11.fromDegrees(o,r,e._bottom);c$1a.multiplyByPoint(d,m,p);var $=a$11.fromDegrees(n,a,e._bottom);c$1a.multiplyByPoint(d,$,_);for(var g=a$11.distance(new a$11(0,0,0),p),y=a$11.distance(new a$11(0,0,0),_),v=(Math.floor(y/e._spacing),0);v<g;v+=e._spacing){l=0;for(var x=0;x<y;x+=e._spacing){c$1a.multiplyByPoint(h,new a$11(e._spacing*s,e._spacing*l,0),f);var b=i$1g.fromCartesian(f),S=e._getVolValue(b,i);e._voxelData.values.push(S),l++}s++}e._voxelData.width=s,e._voxelData.height=l,e._voxelData.bounds={leftBottom:{x:n,y:r},rightTop:{x:o,y:a}}}function X$a(e){if(0===e._qureyRegion.length/2||0===e._bounds.length)return[];if(e._enuPoints.length>0)return e._enuPoints;var t=e._bounds[0],i=e._bounds[1],n=e._bounds[2],r=e._bounds[3],o=0,a=0,s=0,l=a$11.fromDegrees(t,i,e._bottom),u=new e$1L(0,0,0),c=new c$1a,h=new c$1a,d=new a$11,f=new a$11,p=new a$11;m$13.headingPitchRollToFixedFrame(l,u,n$1c.WGS84,m$13.eastNorthUpToFixedFrame,c),c$1a.inverse(c,h);var _=a$11.fromDegrees(n,i,e._bottom);c$1a.multiplyByPoint(h,_,f);var m=a$11.fromDegrees(t,r,e._bottom);c$1a.multiplyByPoint(h,m,p);for(var $=a$11.distance(new a$11(0,0,0),f),g=a$11.distance(new a$11(0,0,0),p),y=0;y<$;y+=e._spacing){a++,s=0;for(var v=0;v<g;v+=e._spacing){s++,c$1a.multiplyByPoint(c,new a$11(e._spacing*a,e._spacing*s,0),d);var x=i$1g.fromCartesian(d),b=n$1d.toDegrees(x.longitude),S=n$1d.toDegrees(x.latitude);!Ce$6({x:b,y:S},e._qureyRegion)||(e._enuPoints[o++]=b,e._enuPoints[o++]=S)}}return e._enuPoints}function Re$5(e){var t=e._qureyRegion.length/2;if(0===t)return[];if(t<3)return new c$19;for(var i=Number.MAX_VALUE,n=Number.MAX_VALUE,r=-Number.MAX_VALUE,o=-Number.MAX_VALUE,a=0;a<t;a++)i=Math.min(e._qureyRegion[2*a],i),n=Math.min(e._qureyRegion[2*a+1],n),r=Math.max(e._qureyRegion[2*a],r),o=Math.max(e._qureyRegion[2*a+1],o);e._bounds.length=0,e._bounds.push(i),e._bounds.push(n),e._bounds.push(r),e._bounds.push(o);var s=a$11.fromDegrees(.5*(r+i),.5*(o+n),e._bottom+.5*e._extend);a$11.clone(s,e._boundingSphere.center),c$1a.setTranslation(e._worldMatrix,s,e._worldMatrix);var l=a$11.fromDegrees(i,n,e._bottom),u=a$11.fromDegrees(r,o,e._bottom+e._extend);return a$11.subtract(u,l,s),e._boundingSphere.radius=.5*a$11.magnitude(s),e._boundingSphere}function Ee$8(e,t,i,n){var r=i.length/2,o=C$12.createTypedArray(C$12.FLOAT,3*r),a=C$12.createTypedArray(C$12.FLOAT,2*r),s=null,l=fe$u.UNSIGNED_SHORT;r<65535?s=C$12.createTypedArray(C$12.UNSIGNED_SHORT,r):(s=C$12.createTypedArray(C$12.UNSIGNED_INT,r),l=fe$u.UNSIGNED_INT);var u=e._bounds[2]-e._bounds[0],c=e._bounds[3]-e._bounds[1],h=e._bounds[0]-.025*u,d=e._bounds[1]-.025*c;u+=.05*u,c+=.05*c;var f=new a$10(0,0,0,1),p=new c$1a;c$1a.inverse(e._worldMatrix,p);for(var _=0;_<r;_++){var m=a$11.fromDegrees(i[2*_],i[2*_+1],n);e._points.push(m),f.x=m.x,f.y=m.y,f.z=m.z,c$1a.multiplyByVector(p,f,f),o[3*_]=f.x,o[3*_+1]=f.y,o[3*_+2]=f.z,a[2*_]=(i[2*_]-h)/u*2-1,a[2*_+1]=(i[2*_+1]-d)/c*2-1,s[_]=_}var $=u$Y.createVertexBuffer({context:t,typedArray:o,usage:A$13.STATIC_DRAW}),g=u$Y.createVertexBuffer({context:t,typedArray:a,usage:A$13.STATIC_DRAW}),y=[],v={aPosition:0,aTexCoord0:1};y.push({index:v.aPosition,vertexBuffer:$,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),y.push({index:v.aTexCoord0,vertexBuffer:g,componentsPerAttribute:2,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var x=u$Y.createIndexBuffer({context:t,typedArray:s,usage:A$13.STATIC_DRAW,indexDatatype:l}),b=new P$S({context:t,width:1024,height:1024,pixelFormat:Z$_.RGBA,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST}),flipY:!1});e._arrRasterTexture.push(b);var S=new P$S({context:t,width:1024,height:1024,pixelFormat:Z$_.RGBA,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST}),flipY:!1});e._arrAssisTexture.push(S);var w=new s$1d({primitiveType:H$11.POINTS,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:we$l.OPAQUE,owner:e,cull:!0});e._arrPointCommand.push(w),w.vertexArray=new x$18({context:t,attributes:y,indexBuffer:x});var C=new a$O({sources:[ce$6]});C.defines.push("RENDER_POINT");var T=new a$O({sources:[le$c]});t$$(e._colorTable)&&T.defines.push("COLOR_TABLE"),w.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:C,fragmentShaderSource:T,attributeLocations:v}),w.renderState=p$1a.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$s.ALPHA_BLEND}),w.uniformMap={uPointSize:function(){return 10},uTexture0:function(){return b},uHypsometricTexture:function(){return e._hypsometricTexture}};var P=new s$1d({primitiveType:H$11.POINTS,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:we$l.OPAQUE,owner:e,cull:!1});e._arrRasterPointCommand.push(P),P.vertexArray=new x$18({context:t,attributes:y,indexBuffer:x}),(C=new a$O({sources:[ge$6]})).defines.push("RENDER_POINT"),P.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:C,fragmentShaderSource:xe$b,attributeLocations:v}),P.renderState=p$1a.fromCache({viewport:new n$13(0,0,1024,1024),cull:{enabled:!1},depthTest:{enabled:!1}});var E=1/e._currentTime,A=e.shadowMap;P.uniformMap={uPointSize:function(){return 4},uSpacing:function(){return E},shadowMap_texture:function(){return A._shadowMapTexture},shadowMap_textureCube:function(){return A._shadowMapTexture},shadowMap_matrix:function(){return A._shadowMapMatrix},shadowMap_cascadeSplits:function(){return A._cascadeSplits},shadowMap_cascadeMatrices:function(){return A._cascadeMatrices},shadowMap_lightDirectionEC:function(){return A._lightDirectionEC},shadowMap_lightPositionEC:function(){return A._lightPositionEC},shadowMap_cascadeDistances:function(){return A._cascadeDistances},uAssisTexture:function(){return S}},P.framebuffer=new u$F({context:t,colorTextures:[b],destroyAttachments:!1})}function Ve$4(e,t,i){e._globalDepthBuffer.isUpdate=!0,i.camera,e._globalDepthBuffer._beginFunc=function(e){},e._globalDepthBuffer._endFunc=function(t){e._globalDepthBuffer.isUpdate=!1,e._depthBuffer.isUpdate=!0}}function Ie$7(e,t,i){var n=i.time.clone(),r=0,o=i.useLogDepth;e._depthBuffer._beginFunc=function(){i.useLogDepth=!1,e.shadowMap.enabled=!0,n=i.time.clone(),i.time=o$10.addMinutes(e._startTime,r,new o$10),r+=e._timeInterval,i.passes.pick=!1},e._depthBuffer._endFunc=function(){i.useLogDepth=o;for(var r=[],a=0;a<e._arrRasterPointCommand.length;a++){e._arrRasterPointCommand[a].execute(t);var s=t.readPixels({x:0,y:0,width:1024,height:1024,framebuffer:e._arrRasterPointCommand[a].framebuffer});r.push(s),e._arrAssisTexture[a].copyFrom({width:1024,height:1024,arrayBufferView:s})}if(i.time=n,--e._currentTime<1){e._depthBuffer.isUpdate=!1,e._timeUpdate=!1;if(e.shadowMap.maximumDistance=e._shadowMapParams.oriMaxDis,e.shadowMap.minimumDistance=void 0,e.shadowMap.size=e._shadowMapParams.oriSize,e._points.length>0){var l={},u=X$a(e);l.points=e._points,l.enuPoints=u,l.bounds=e._bounds,l.extend=e._extend,l.spacing=e._spacing,l.bottom=e._bottom,l.pixelsArray=r;var c=Te$7.scheduleTask(l,[]);if(!t$$(c))return[];c.then((function(t){var i=t.resultData;i.length>0&&e._queryPointsEvent.raiseEvent(i)})).otherwise((function(e){}))}else e._queryPointsEvent.raiseEvent({resultData:[]})}}}Object.defineProperties(P$e.prototype,{startTime:{get:function(){return this._startTime},set:function(e){this._startTime=e.clone(),this._update=!0}},endTime:{get:function(){return this._endTime},set:function(e){this._endTime=e.clone(),this._update=!0}},timeInterval:{get:function(){return this._timeInterval},set:function(e){this._timeInterval=e,this._update=!0}},spacing:{get:function(){return this._spacing},set:function(e){this._spacing=e,this._update=!0}},queryPointsEvent:{get:function(){return this._queryPointsEvent}},isPointsVisible:{get:function(){return this._isPointsVisible},set:function(e){this._isPointsVisible=e}},colorTable:{get:function(){return this._colorTable},set:function(e){if(t$$(e)){t$$(this._hypsometricTexture)||(this._hypsometricTexture=new P$S({context:this._scene.context,width:1024,height:64,pixelFormat:Z$_.RGBA,flipY:!1})),this._colorTable=e,this._colorTable.generateBuffer(),this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._colorTable._imageBuffer});for(i=0,n=(t=this._arrPointCommand).length;i<n;i++)Me$8(this._scene.context,t[i],"COLOR_TABLE")}else for(var t,i=0,n=(t=this._arrPointCommand).length;i<n;i++)Ae$5(this._scene.context,t[i],"COLOR_TABLE")}},voxelData:{get:function(){return this._volDirty=!0,this._getVoxelData(),this._voxelData}}}),P$e.prototype._getVolValue=function(e,t){var i=e.longitude,n=e.latitude,r=e.height;i=n$1d.toDegrees(i),n=n$1d.toDegrees(n);var o=this._bounds[2]-this._bounds[0],a=(r=this._bounds[3]-this._bounds[1],this._bounds[0]-.025*o),s=this._bounds[1]-.025*r;o+=.05*o,r+=.05*r;var l=parseInt((i-a)/o*1024),u=parseInt((n-s)/r*1024);l=l<1?1:l,u=u<1?1:u;for(var c=0,h=new a$10(1,1/255,1/65025,1/160581375),d=-1;d<2;d++)for(var f=-1;f<2;f++){var p=this._scene.context.readPixels({x:l+d,y:u+f,width:1,height:1,framebuffer:this._arrRasterPointCommand[t].framebuffer}),_=a$10.unpack(p,0);a$10.divideByScalar(_,255,_),c=Math.max(c,a$10.dot(_,h))}return 1-(c=c>.999?1:c)},P$e.prototype.update=function(e,t,i){if(!t._fboState.enabled&&!t.camera.bReflect){if(this._update){if(!this.shadowMap.enabled)throw new t$_("ShadowQueryPoints must be shadow.");if(this._scene.mode!==b$1d.SCENE3D)throw new t$_("Shadow anaylsis is not supported for non-3D scenes.");if(this._frameState=t,t$$(this._depthBuffer)||(this._depthBuffer=new n$m(e),this._depthBuffer.environmentVisible.isSunVisible=!0,this._depthBuffer.environmentVisible.isGlobalVisible=!0,this._depthBuffer.environmentVisible.isObjectVisible=!0,this._depthBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._sceneName]=this._depthBuffer),!t$$(this._globalDepthBuffer)){this._globalDepthBuffer=new n$m(e),this._globalDepthBuffer.environmentVisible.isObjectVisible=!0,this._globalDepthBuffer.environmentVisible.isGlobalVisible=!0,this._globalDepthBuffer._visibleViewport=this._visibleViewport;var n=this._name+"_global";t._framebufferList[n]=this._globalDepthBuffer}this._update=!1,this._timeUpdate=!0,this._currentTime=1;var r=new o$10,o=0;for(this.shadowMap.maximumDistance=this._shadowMapMaxDistance;o$10.addMinutes(this._startTime,o,r),o+=this._timeInterval,!o$10.lessThan(this._endTime,r);)this._currentTime++;W$f(this),Q$d(this);var a=X$a(this);if(this._points.length=0,a.length>0){for(var s=0;s<=this._extend;s+=this._spacing)Ee$8(this,e,a,this._bottom+s);Ve$4(this,e,t),Ie$7(this,e,t)}}if(!this._timeUpdate&&this._isPointsVisible){for(var l=0;l<this._arrPointCommand.length;l++)i.push(this._arrPointCommand[l]);this._getVoxelData()}}},P$e.prototype._getVoxelData=function(){if(this._arrPointCommand.length>0&&this._volDirty){this._volDirty=!1,this._voxelData={values:[]};for(var e=0,t=0;t<=this._extend;t+=this._spacing)Be$7(this,t,e),e++;this._voxelData.values=new Float32Array(this._voxelData.values),this._voxelData.depth=Math.ceil(this._extend/this._spacing)+1,this._voxelData.minValue=0,this._voxelData.maxValue=1,this._voxelData.minHeight=this._bottom,this._voxelData.maxHeight=this._bottom+this._extend}},P$e.prototype.setVisibleInViewport=function(e){if(e>8)throw new t$_("the index is 0~8");this._visibleViewport=1<<e,t$$(this._depthBuffer)&&(this._depthBuffer._visibleViewport=this._visibleViewport)},P$e.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$_("the index is 0~8");return 1<<e&this._visibleViewport},P$e.prototype.getShadowRadio=function(e){if(!t$$(e)||this._timeUpdate)return-1;var t=e.longitude,i=e.latitude,n=e.height;if(!t$$(t)||!t$$(i)||!t$$(n)||(t=n$1d.toDegrees(t),i=n$1d.toDegrees(i),t<this._bounds[0]||t>this._bounds[2]||i<this._bounds[1]||i>this._bounds[3]))return-1;for(var r=!1,o=0,a=.1*this._spacing,s=0;s<=this._extend;s+=this._spacing){if(Math.abs(this._bottom+s-n)<a){r=!0;break}o++}if(!r)return-1;var l=X$a(this);if(l.length<0)return-1;r=!1;for(var u=0;u<l.length;u+=2){var c=a$11.fromDegrees(t,i,n),h=a$11.fromDegrees(l[u+0],l[u+1],n);if(a$11.distance(c,h)<a){r=!0;break}}if(!r||o>=this._arrRasterPointCommand.length)return-1;var d=this._bounds[2]-this._bounds[0],f=(n=this._bounds[3]-this._bounds[1],this._bounds[0]-.025*d),p=this._bounds[1]-.025*n;d+=.05*d,n+=.05*n;var _=parseInt((t-f)/d*1024),m=parseInt((i-p)/n*1024);_=_<1?1:_,m=m<1?1:m;var $=0,g=new a$10(1,1/255,1/65025,1/160581375),y=this._arrRasterPointCommand[o].framebuffer;for(u=-1;u<2;u++)for(var v=-1;v<2;v++){var x=this._scene.context.readPixels({x:_+u,y:m+v,width:1,height:1,framebuffer:y}),b=a$10.unpack(x,0);a$10.divideByScalar(b,255,b),$=Math.max($,a$10.dot(b,g))}return $=$>.999?1:$},P$e.prototype.qureyRegion=function(e){if(!t$$(e)||!t$$(e.position))throw new t$_("the options is required");this._qureyRegion=e.position,this._bottom=e$1Y(e.bottom,this._bottom),this._extend=e$1Y(e.extend,this._extend),this._update=!0,this._enuPoints=[];var t=Re$5(this),i=a$11.distance(t.center,this._scene.camera.position);i+=this._boundingSphere.radius,this.shadowMap.maximumDistance=i,this.shadowMap.size=this._shadowMapParams.analysisSize,this._shadowMapMaxDistance=i},P$e.prototype.clear=function(){W$f(this),Q$d(this)},P$e.prototype.build=function(){""!==this._name||this._checking?t$$(this._scene._analyst3D.find(this._name))||this._scene._analyst3D.add(this):(this._name="ShadowQueryPoints"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_scene",this._scene._analyst3D.add(this),this._scene._analysisShadowMap=this.shadowMap)},P$e.prototype.destroy=function(){return t$$(this._frameState)&&(t$$(this._depthBuffer)&&delete this._frameState._framebufferList[this._sceneName],this._frameState=void 0),this._depthBuffer=this._depthBuffer&&this._depthBuffer.destroy(),W$f(this),Q$d(this),t$$(this._hypsometricTexture)&&(this._hypsometricTexture=this._hypsometricTexture.destroy()),this._scene._analyst3D.remove(this._name,!0),t$$(this.shadowMap)&&(this.shadowMap.destroy(),this.shadowMap=void 0,this._scene._analysisShadowMap=void 0),s$1e(this)};var _0x16c999=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xbc0006=_0x16c999(void 0,(function(){return _0xbc0006.toString().search("(((.+)+)+)+$").toString().constructor(_0xbc0006).search("(((.+)+)+)+$")}));_0xbc0006();var oe$7="attribute vec4 aPosition;\nattribute vec4 aTexCoord0;\n\nvoid main()\n{\n gl_Position = czm_modelViewProjection * aPosition;\n}",_0x3b6c4c=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x4c5256=_0x3b6c4c(void 0,(function(){return _0x4c5256.toString().search("(((.+)+)+)+$").toString().constructor(_0x4c5256).search("(((.+)+)+)+$")}));_0x4c5256();var ne$5="uniform vec4 uSkylineColor;\n\nvoid main()\n{\n gl_FragColor = uSkylineColor;\n}";function v$l(e){if(!t$$(e))throw new t$_("scene are required.");if(!e.context.depthTexture)throw new t$_("the depth buffer is not supported.");if(e$1y.maximumVertexTextureImageUnits<1)throw new t$_("the max of vertexTextureImageUnits less 1, function is not supported.");this._displayMode={LINE:0,FACE:1},this._scene=e,this._depthBuffer=void 0,this._command=void 0,this._lineCommand=void 0,this._viewerCommand=void 0,this._viewerLineCommand=void 0,this._boundingSphere=new c$19,this._frameState=void 0,this._viewPosition=[0,0,0],this._direction=0,this._pitch=0,this._displayStyle=this._displayMode.LINE,this._invertViewMatrix=new c$1a,this._invertViewProjectionMatrix=new c$1a,this._color=new a$10(1,0,0,1),this._radius=-1,this._ignoreGlobe=!1,this._limitBodys=new e$1F,this._update=!1,this._visibleViewport=4095,this._id=0,this._name="",this._points=[],this._lineWidth=1,this._lineStripCollection=e.primitives.add(new W$P)}function H$m(e){t$$(e._command)&&(e._command.vertexArray=e._command.vertexArray&&e._command.vertexArray.destroy(),e._command.shaderProgram=e._command.shaderProgram&&e._command.shaderProgram.destroy(),e._command=void 0),t$$(e._lineCommand)&&(e._lineCommand.vertexArray=e._lineCommand.vertexArray&&e._lineCommand.vertexArray.destroy(),e._lineCommand.shaderProgram=e._lineCommand.shaderProgram&&e._lineCommand.shaderProgram.destroy(),e._lineCommand=void 0),t$$(e._faceCommand)&&(e._faceCommand.vertexArray=e._faceCommand.vertexArray&&e._faceCommand.vertexArray.destroy(),e._faceCommand.shaderProgram=e._faceCommand.shaderProgram&&e._faceCommand.shaderProgram.destroy(),e._faceCommand=void 0)}function $$d(e){t$$(e._viewerCommand)&&(e._viewerCommand.vertexArray=e._viewerCommand.vertexArray&&e._viewerCommand.vertexArray.destroy(),e._viewerCommand.shaderProgram=e._viewerCommand.shaderProgram&&e._viewerCommand.shaderProgram.destroy(),e._viewerCommand=void 0),t$$(e._viewerLineCommand)&&(e._viewerLineCommand.vertexArray=e._viewerLineCommand.vertexArray&&e._viewerLineCommand.vertexArray.destroy(),e._viewerLineCommand.shaderProgram=e._viewerLineCommand.shaderProgram&&e._viewerLineCommand.shaderProgram.destroy(),e._viewerLineCommand=void 0)}function Te$6(e,t,i){var n=e._viewPosition[2],r=5e-4*n;r=r<1?1:r;var o=Math.abs(n)+6378137,a=Math.sqrt((o-6378137)*(o+6378137));n<0&&a<5e4?a=5e4:n<100&&n>0&&(a*=50);var s,l=e._direction*n$1d.RADIANS_PER_DEGREE,u=e._pitch*n$1d.RADIANS_PER_DEGREE,c=i.camera,h=c._projection;if(e._scene.mode===b$1d.SCENE3D)s=a$11.fromDegreesArrayHeights(e._viewPosition,e._scene._globe.ellipsoid)[0];else{var d=i$1g.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]);s=h.project(d,new a$11)}var f=c.frustum.near,p=c.frustum.far,_=new a$11,m=c.heading,$=c.pitch;a$11.clone(c.position,_),e._depthBuffer.isUpdate=!0,e._depthBuffer._beginFunc=function(){f=c.frustum.near,p=c.frustum.far,m=c.heading,$=c.pitch,a$11.clone(c.position,_),c.frustum.near=r,c.frustum.far=a;var t={destination:s,orientation:{heading:l,pitch:u},convert:!1};if(c.setView(t),e.skylineCamera=t,c$1a.clone(c.inverseViewMatrix,e._invertViewMatrix),c$1a.multiply(c.frustum.projectionMatrix,c.viewMatrix,e._invertViewProjectionMatrix),c$1a.inverse(e._invertViewProjectionMatrix,e._invertViewProjectionMatrix),e._scene.mode===b$1d.SCENE3D)a$11.clone(s,e._boundingSphere.center);else{var i=m$13.convertToColumbusCartesian(a$11.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]));a$11.clone(i,e._boundingSphere.center)}e._boundingSphere.radius=a},e._depthBuffer._endFunc=function(){if(t$$(e._lineCommand)){e._points.length=0;var i=t.readPixels({framebuffer:e._depthBuffer.framebuffer}),n=e._lineCommand.vertexArray.getAttribute(0),r=4*(t.drawingBufferWidth+1),o=C$12.createTypedArray(n.componentDatatype,r);o[0]=0,o[1]=0,o[2]=0,o[3]=1,4*r!==n.vertexBuffer.sizeInBytes&&(H$m(e),me$a(e,t),n=e._lineCommand.vertexArray.getAttribute(0));for(var a=new a$10,s=new a$10(1,1/255,1/65025,1/160581375),l=t.uniformState,u=l.inverseProjection,h=l.currentFrustum,d=h.x,g=h.y,y=0;y<t.drawingBufferWidth;y++){for(var v=0,x=t.drawingBufferHeight-1;x>-1;x--){var b=4*(t.drawingBufferWidth*x+y),S=a$10.unpack(i,b,a);if(a$10.divideByScalar(S,255,S),(v=a$10.dot(S,s))>0)break;v=0}if(e._scene.frameState.useLogDepth&&v>0){var w=v*l.log2FarDepthFromNearPlusOne;v=g*(1-d/(Math.pow(2,w)-1+d))/(g-d)}a.x=y/t.drawingBufferWidth*2-1,a.y=x/t.drawingBufferHeight*2-1,a.z=2*v-1,a.w=1,c$1a.multiplyByVector(u,a,a);var C=new a$11(a.x,a.y,a.z);a$11.divideByScalar(C,a.w,C);var T=a$11.magnitude(C);e._radius>0&&T>e._radius&&(a$11.normalize(C,C),C.x*=e._radius,C.y*=e._radius,C.z*=e._radius),a.x=C.x,a.y=C.y,a.z=C.z,a.w=1;var P=a$11.fromCartesian4(c$1a.multiplyByVector(e._invertViewMatrix,a,new a$10));e._scene.mode===b$1d.COLUMBUS_VIEW&&(P=m$13.convertTo3DCartesian(P)),e._points.push(P),o[4*(y+1)]=a.x,o[4*(y+1)+1]=a.y,o[4*(y+1)+2]=a.z,o[4*(y+1)+3]=a.w}n.vertexBuffer.copyFromArrayView(o,0);for(var E=0;E<e._limitBodys.values.length;E++)e._limitBodys.values[E].update(t,c);e._lineStripCollection.removeAll(),e._lineWidth>=2&&e._lineStripCollection.add({width:e._lineWidth,positions:e._points,material:r$v.fromType(r$v.ColorType,{color:e$1z.fromCartesian4(e._color)})})}c.setView({destination:_,orientation:{heading:m,pitch:$,roll:c.roll},convert:!1}),c.frustum.near=f,c.frustum.far=p,e._depthBuffer.isUpdate=!1}}function Ie$6(e,t,i){var n=i.camera.frustum,r=10,o=2*Math.atan(n.aspectRatio*Math.tan(.5*n.fovy)),a=r*Math.tan(.5*o),s=r*Math.tan(.5*n.fovy),l=C$12.createTypedArray(C$12.UNSIGNED_SHORT,12),u=C$12.createTypedArray(C$12.UNSIGNED_SHORT,16);l[0]=0,l[1]=2,l[2]=1,l[3]=0,l[4]=4,l[5]=2,l[6]=0,l[7]=3,l[8]=4,l[9]=0,l[10]=1,l[11]=3,u[0]=0,u[1]=1,u[2]=0,u[3]=2,u[4]=0,u[5]=3,u[6]=0,u[7]=4,u[8]=1,u[9]=2,u[10]=1,u[11]=3,u[12]=2,u[13]=4,u[14]=3,u[15]=4;var c=C$12.createTypedArray(C$12.FLOAT,15);c[0]=c[1]=c[2]=0,c[3]=-a,c[4]=-s,c[5]=-r,c[6]=-a,c[7]=s,c[8]=-r,c[9]=a,c[10]=-s,c[11]=-r,c[12]=a,c[13]=s,c[14]=-r;var h=u$Y.createVertexBuffer({context:t,typedArray:c,usage:A$13.STATIC_DRAW}),d=[],f={aPosition:0};d.push({index:f.aPosition,vertexBuffer:h,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var p=u$Y.createIndexBuffer({context:t,typedArray:l,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT}),_=u$Y.createIndexBuffer({context:t,typedArray:u,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT});e._viewerLineCommand=new s$1d({primitiveType:H$11.LINES,modelMatrix:e._invertViewMatrix,pass:we$l.ANALYSIS,owner:e,cull:!1}),e._viewerLineCommand.vertexArray=new x$18({context:t,attributes:d,indexBuffer:_}),e._viewerLineCommand.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:He$5,fragmentShaderSource:Ye$6,attributeLocations:f}),e._viewerLineCommand.renderState=p$1a.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}});for(var m=[],$=0;$<6;$++)m[$]=new a$10(0,0,0,0);var g=new a$10(128/255,1,235/255,1);e._viewerLineCommand.uniformMap={uDiffuseColor:function(){return g},clip_mode:function(){return 0},clip_planes:function(){return m},clip_line_color:function(){return a$10.UNIT_W}},e._viewerCommand=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:e._invertViewMatrix,pass:we$l.ANALYSIS,owner:e,cull:!1}),e._viewerCommand.vertexArray=new x$18({context:t,attributes:d,indexBuffer:p}),e._viewerCommand.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:He$5,fragmentShaderSource:Ye$6,attributeLocations:f}),e._viewerCommand.renderState=p$1a.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}});var y=new a$10(68/255,222/255,158/255,1);e._viewerCommand.uniformMap={uDiffuseColor:function(){return y},clip_mode:function(){return 0},clip_planes:function(){return m},clip_line_color:function(){return a$10.UNIT_W}}}function me$a(e,t,i){var n=t.drawingBufferWidth+1,r=C$12.createTypedArray(C$12.FLOAT,4*n),o=C$12.createTypedArray(C$12.FLOAT,2*n),a=C$12.createTypedArray(C$12.UNSIGNED_SHORT,n-1),s=C$12.createTypedArray(C$12.UNSIGNED_SHORT,n);o[0]=-1;for(var l=1;l<n;l++)o[2*l]=l/(n-1),o[2*l+1]=0;for(l=0;l<n-1;l++)a[l]=l+1,s[l]=l;s[n-1]=n-1;var u=u$Y.createVertexBuffer({context:t,typedArray:r,usage:A$13.STATIC_DRAW}),c=[],h={aPosition:0};c.push({index:h.aPosition,vertexBuffer:u,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:16,normalize:!1}),h.aTexCoord0=1;var d=u$Y.createVertexBuffer({context:t,typedArray:o,usage:A$13.STATIC_DRAW});c.push({index:h.aTexCoord0,vertexBuffer:d,componentsPerAttribute:2,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var f=u$Y.createIndexBuffer({context:t,typedArray:a,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT}),p=u$Y.createIndexBuffer({context:t,typedArray:s,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT}),_={uSkylineColor:function(){return e._color}};e._lineCommand=new s$1d({primitiveType:H$11.LINE_STRIP,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:we$l.ANALYSIS,owner:e,cull:!1}),e._lineCommand.vertexArray=new x$18({context:t,attributes:c,indexBuffer:f}),e._lineCommand.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:oe$7,fragmentShaderSource:ne$5,attributeLocations:h}),e._lineCommand.renderState=p$1a.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}}),e._lineCommand.uniformMap=_,e._faceCommand=new s$1d({primitiveType:H$11.TRIANGLE_FAN,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:we$l.ANALYSIS,owner:e,cull:!1}),e._faceCommand.vertexArray=new x$18({context:t,attributes:c,indexBuffer:p}),e._faceCommand.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:oe$7,fragmentShaderSource:ne$5,attributeLocations:h}),e._faceCommand.renderState=p$1a.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}}),e._faceCommand.uniformMap=_}function t$a(e){this._renderTexture=new h$p(e),this._renderTexture._passState.blendingEnabled=!1,this._context=e,this._isUpdate=!1,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0,isBillboardVisible:!1,isOnlyS3MObjectVisible:!0},this._type=B$y.SQRESULT,this._beginFunc=void 0,this._endFunc=void 0}Object.defineProperties(v$l.prototype,{viewPosition:{get:function(){return this._viewPosition},set:function(e){this._viewPosition=e,this._update=!0}},color:{get:function(){var e=new e$1z;return e.red=this._color.x,e.green=this._color.y,e.blue=this._color.z,e.alpha=this._color.w,e},set:function(e){this._color.x=e.red,this._color.y=e.green,this._color.z=e.blue,this._color.w=e.alpha,this._lineWidth>=2&&(this._update=!0)}},direction:{get:function(){return this._direction},set:function(e){this._direction=e,this._update=!0}},pitch:{get:function(){return this._pitch},set:function(e){this._pitch=e,this._update=!0}},displayMode:{get:function(){return this._displayMode}},displayStyle:{get:function(){return this._displayStyle},set:function(e){this._displayStyle=e}},radius:{get:function(){return this._radius},set:function(e){this._radius=e,this._update=!0}},lineWidth:{get:function(){return this._lineWidth},set:function(e){this._lineWidth=e,this._update=!0}},ignoreGlobe:{get:function(){return this._ignoreGlobe},set:function(e){this._ignoreGlobe=e,t$$(this._depthBuffer)&&(this._depthBuffer.environmentVisible.isGlobalVisible=!this._ignoreGlobe,this._update=!0)}}}),v$l.prototype.update=function(e,t,i){if(!t._fboState.enabled){this._update&&(t$$(this._depthBuffer)||(this._depthBuffer=new n$m(e),this._depthBuffer.environmentVisible.isGlobalVisible=!this._ignoreGlobe,this._depthBuffer.environmentVisible.isObjectVisible=!0,t._framebufferList[this._name]=this._depthBuffer,this._frameState=t),this._update=!1,H$m(this),$$d(this),Te$6(this,e,t),Ie$6(this,e,t),me$a(this,e));for(var n=0;n<this._limitBodys.values.length;n++){var r=this._limitBodys.values[n];t$$(r)&&t$$(r._command)&&i.push(r._command)}t$$(this._viewerCommand),t$$(this._viewerLineCommand),this._displayStyle===this._displayMode.LINE?t$$(this._lineCommand)&&this._lineWidth<2&&i.push(this._lineCommand):t$$(this._faceCommand)&&i.push(this._faceCommand)}},v$l.prototype.setVisibleInViewport=function(e){if(e>8)throw new t$_("the index is 0~8");this._visibleViewport=1<<e,t$$(this._depthBuffer)&&(this._depthBuffer._visibleViewport=this._visibleViewport)},v$l.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$_("the index is 0~8");return 1<<e&this._visibleViewport},v$l.prototype.getSkyline2D=function(){if(!this._update){for(var e=this._scene.context,t=e.readPixels({framebuffer:this._depthBuffer.framebuffer}),i=(e.drawingBufferWidth,[]),n=[],r=[],o=[],a=new a$10,s=new a$10(1,1/255,1/65025,1/160581375),l=0;l<e.drawingBufferWidth;l++)for(var u=e.drawingBufferHeight-1;u>-1;u--){var c=4*(e.drawingBufferWidth*u+l),h=a$10.unpack(t,c,a);if(a$10.divideByScalar(h,255,h),a$10.dot(h,s)>0){i.push(l/e.drawingBufferWidth),n.push(u/e.drawingBufferHeight),r.push(l),o.push(u);break}}return{x:i,y:n,drawingBufferXArr:r,drawingBufferYArr:o}}},v$l.prototype.getSkyline3D=function(){if(!this._update&&0!==this._points.length){for(var e,t=[],i=[],n=[],r=0,o=this._points.length;r<o;r++)e=i$1g.fromCartesian(this._points[r]),t.push(e.longitude*n$1d.DEGREES_PER_RADIAN),i.push(e.latitude*n$1d.DEGREES_PER_RADIAN),n.push(e.height);return{x:t,y:i,z:n}}},v$l.prototype.addLimitbody=function(e){var t=e.name,i=e.position;if(!t$$(t)||!t$$(i))return!1;var n=this._limitBodys.get(t);if(t$$(n))return!1;n=new b$q(i,this),this._limitBodys.set(t,n),t$$(this._depthBuffer)&&(this._depthBuffer.isUpdate=!0)},v$l.prototype.removeLimitbody=function(e){return!!this._limitBodys.remove(e)},v$l.prototype.removeAllLimitBody=function(){for(var e=0;e<this._limitBodys.values.length;e++)this._limitBodys.values[e].destroy(),this._limitBodys.values[e]=null;this._limitBodys.removeAll()},v$l.prototype.clear=function(){this.removeAllLimitBody(),this._update=!1,this._lineStripCollection.removeAll(),this._points=[],H$m(this),$$d(this)},v$l.prototype.getObjectIds=function(){this._scene.renderIds(this.skylineCamera);var e=this._scene._defaultView.pickFramebuffer;if(t$$(e)){var t=this._scene._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight,r=t.readPixels({x:0,y:0,width:i,height:n,framebuffer:e._fb}),o=this.getSkyline2D();if(t$$(o)){for(var a,s,l=o.drawingBufferXArr,u=o.drawingBufferYArr,c=l.length,h={};c--;){a=l[c],s=u[c];var d=a$10.fromArray(r,4*i*s+4*a),f=e$1z.byteToRgba(d.x,d.y,d.z,d.w),p=t.getObjectByPickId(f);if(t$$(p)){var _=p.primitive.id;f=p.id;t$$(h[_])||(h[_]=[]),-1===h[_].indexOf(f)&&h[_].push(f)}}return h}}},v$l.prototype.getSkylineSectorParameter=function(){var e=this.getSkyline3D();if(t$$(e)){for(var t,i,n,r=e.x,o=e.y,a=e.z,s=new t$s,l=0,u=r.length;l<u;l++)t=r[l],i=o[l],n=a[l],s.add(new s$w(t,i,n));return{geoLine3D:new i$y([s]),viewPos:new s$w(this._viewPosition[0],this._viewPosition[1],this._viewPosition[2])}}},v$l.prototype.build=function(){""===this._name&&(this._name="skyline"+this._scene._analyst3D._layerIndex,this._scene._analyst3D.add(this))},v$l.prototype.destroy=function(){return t$$(this._frameState)&&(t$$(this._depthBuffer)&&delete this._frameState._framebufferList[this._name],this._frameState=void 0),this._depthBuffer=this._depthBuffer&&this._depthBuffer.destroy(),H$m(this),$$d(this),this.removeAllLimitBody(),this._scene._analyst3D.remove(this._name,!0),s$1e(this)},Object.defineProperties(t$a.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},frameBufferType:{get:function(){return this._type},set:function(e){this._type=e}}}),t$a.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this._beginFunc&&this._beginFunc(e),this._renderTexture._passState},t$a.prototype.end=function(e){this._endFunc&&this._endFunc(e)},t$a.prototype.update=function(e,t){},t$a.prototype.isDestroyed=function(){return!1},t$a.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),s$1e(this)};var _0x434c8d=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3f757a=_0x434c8d(void 0,(function(){return _0x3f757a.toString().search("(((.+)+)+)+$").toString().constructor(_0x3f757a).search("(((.+)+)+)+$")}));_0x3f757a();var le$b="attribute vec4 aPosition;\nattribute vec4 aNormal;\nuniform vec4 uDiffuseColor;\nvarying vec4 vColor;\nvarying vec3 normalEC;\nvarying vec3 positionEC;\nvoid main()\n{\n normalEC = czm_normal * aNormal.xyz;\n positionEC = (czm_modelView * aPosition).xyz;\n vColor = uDiffuseColor;\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}",_0x39d681=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x276eb5=_0x39d681(void 0,(function(){return _0x276eb5.toString().search("(((.+)+)+)+$").toString().constructor(_0x276eb5).search("(((.+)+)+)+$")}));_0x276eb5();var me$9="varying vec4 vColor;\nvarying vec3 normalEC;\nvarying vec3 positionEC;\nvoid main()\n{\n vec3 positionToEyeEC = -positionEC;\n vec4 color = czm_gammaCorrect(vColor);\n czm_materialInput materialInput;\n materialInput.normalEC = normalize(normalEC);\n materialInput.positionToEyeEC = positionToEyeEC;\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = vColor.rgb;\n material.alpha = vColor.a;\n gl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n}";function C$k(e){if(!t$$(e))throw new t$_("scene are required.");if(!e.context.depthTexture)throw new t$_("the depth buffer is not supported.");this._scene=e,this._name="",this._frameState=void 0,this._isInitlized=!1,this._depthDirty=!1,this._bufferDirty=!1,this._updateIDs=!1,this._disjointIDs=[],this._intersectsIDs=[],this._ids=[],this._textures=[],this._depthBuffers=[],this._resultBuffer=void 0,this._disjointBuffer=void 0,this._worldMatrix=new c$1a(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this._matDepthView=new c$1a(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this._matDepthProject=new c$1a(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this._boundingSphere=new c$19,this._depthCommands=[],this._colorCommand=void 0,this._clearCommand=new r$M({color:new e$1z(0,0,0,0),stencil:0,depth:1}),this._geometry=void 0,this._layers=[],this._fillColor=new e$1z(1,1,0,.5),this._outlineColor=new e$1z(1,0,0,1),this._positionMode=k$p.Disjoint,this._fillStyle=vr.Fill,this._positionMode=k$p.Disjoint,this._beQueryCollection=void 0,this._queryCollection=void 0,this._allS3MColorCommand=[],this._profile=!1,this._clipLayers=new e$1F,this._curFrameNumber=-1,this._width=1,this._height=1}function F$k(e){t$$(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&!e._colorCommand.vertexArray.isDestroyed()&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&!e._colorCommand.shaderProgram.isDestroyed()&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0);for(var t=0;t<e._depthCommands.length;t++)e._depthCommands[t].vertexArray=e._depthCommands[t].vertexArray&&!e._depthCommands[t].vertexArray.isDestroyed()&&e._depthCommands[t].vertexArray.destroy(),e._depthCommands[t].shaderProgram=e._depthCommands[t].shaderProgram&&!e._depthCommands[t].shaderProgram.isDestroyed()&&e._depthCommands[t].shaderProgram.destroy(),e._depthCommands[t]=void 0;e._depthCommands=[],t$$(e._outlineCommand)&&(e._outlineCommand.vertexArray=e._outlineCommand.vertexArray&&!e._outlineCommand.vertexArray.isDestroyed()&&e._outlineCommand.vertexArray.destroy(),e._outlineCommand.shaderProgram=e._outlineCommand.shaderProgram&&!e._outlineCommand.shaderProgram.isDestroyed()&&e._outlineCommand.shaderProgram.destroy(),e._outlineCommand=void 0)}function Y$e(e){for(var t=0;t<e._textures.length;t++)t$$(e._textures[t])&&(e._textures[t]=e._textures[t]&&e._textures[t].destroy(),e._textures[t]=null);e._textures=[]}function W$e(e){t$$(e._frameState)&&(t$$(e._disjointBuffer)&&delete e._frameState._framebufferList.sqDisjoinTexture,t$$(e._resultBuffer)&&delete e._frameState._framebufferList.sqResultTexture,e._frameState=void 0),e._disjointBuffer=e._disjointBuffer&&e._disjointBuffer.destroy(),e._resultBuffer=e._resultBuffer&&e._resultBuffer.destroy();for(var t=0;t<e._depthBuffers.length;t++)e._depthBuffers[t]=e._depthBuffers[t]&&e._depthBuffers[t].destroy();e._depthBuffers=[]}function Ce$5(e){return!!t$$(e)&&(e.geoType===b$K.GEOCONE||e.geoType===b$K.GEOBOX||e.geoType===b$K.GEOCYLINDER||e.geoType===b$K.GEOSPHERE||e.geoType===b$K.GEOREGION3D||e.geoType===b$K.GEOELLIPSOID||e.geoType===b$K.GEOMODEL3D||e instanceof y$H)}function ve$6(e,t,i){W$e(e),F$k(e),Y$e(e),xe$a(e,t,i),Se$6(e,t,i);for(var n=0;n<e._layers.length;n++)e._layers[n]._spatialQueryEnable=!0,e._layers[n]._setSQTextures(e._textures),e._layers[n].selectEnabled=!0;n=0;for(var r=e._clipLayers.length;n<r;n++){e._clipLayers.values[n]._setSQTextures(e._textures)}e._isInitlized=!0}function xe$a(e,t,i){var n=t.drawingBufferWidth,r=t.drawingBufferHeight;if(0===e._textures.length)for(var o=0;o<3;o++){var a=new P$S({context:t,width:n,height:r,pixelFormat:Z$_.UNSIGNED_BYTE,sampler:new a$Q({minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST})});e._textures.push(a)}var s=new t$a(t);s.isUpdate=!1,i._framebufferList.sqResultTexture=s,e._resultBuffer=s;var l=new t$a(t);l.isUpdate=!1,i._framebufferList.sqDisjoinTexture=l,e._disjointBuffer=l}function Se$6(e,t,i){if(!t$$(e._colorCommand)||!t$$(e._outlineCommand))if(F$k(e),e._allS3MColorCommand.length>0)for(var n=0;n<e._allS3MColorCommand.length;n++)Z$f(e,t),X$9(e,t,i,e._allS3MColorCommand[n]);else De$8(e,t,i)}function De$8(e,t,i){var n=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:we$l.TRANSLUCENT,owner:e}),r={aPosition:0};n.vertexArray=e._geometry.getVertexArray(t),n.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:le$b,fragmentShaderSource:me$9,attributeLocations:r}),n.renderState=p$1a.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$s.ALPHA_BLEND}),n.uniformMap={uDiffuseColor:function(){return e._fillColor}},e._colorCommand=n,Z$f(e,t),X$9(e,t,i,n);var o=new s$1d({primitiveType:H$11.LINES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:we$l.LOG_DEPTH_OVERLAY,owner:e});o.vertexArray=e._geometry.getOutlineVertexArray(t),o.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:He$5,fragmentShaderSource:Ye$6,attributeLocations:r}),o.renderState=p$1a.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$s.ALPHA_BLEND}),o.uniformMap={uDiffuseColor:function(){return e._outlineColor}},e._outlineCommand=o}function X$9(e,t,i,n){var r=n.shaderProgram.vertexShaderSource.clone(),o=new a$O({name:"SpatialQueryFp",sources:[z$m]});if(o.defines.push("DEPTH"),i.useLogDepth){r.defines.push("LOG_DEPTH");for(var a=r.sources,s=0;s<a.length;++s)a[s]=a$O.replaceMain(a[s],"czm_log_depth_main");a.push("\n\nvoid main() \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n"),o.defines.push("LOG_DEPTH")}var l=n.shaderProgram._attributeLocations,u=s$1d.shallowClone(n);u.renderState=p$1a.fromCache({depthTest:{enabled:!0},cull:{enabled:!0,face:de$x.BACK}}),u.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:l}),u.framebuffer=e._depthBuffers[0],e._depthCommands.push(u);var c=s$1d.shallowClone(n);c.renderState=p$1a.fromCache({depthTest:{enabled:!0},cull:{enabled:!0,face:de$x.FRONT}}),c.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:l}),c.framebuffer=e._depthBuffers[1],e._depthCommands.push(c);var h=s$1d.shallowClone(n),d=new a$O({name:"SpatialQueryFp",sources:[z$m]});d.defines.push("COLOR"),h.renderState=p$1a.fromCache({cull:{enabled:!1},depthTest:{enabled:!1}}),h.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:d,attributeLocations:l}),h.framebuffer=e._depthBuffers[2],e._depthCommands.push(h)}function Z$f(e,t){var i=new u$F({context:t,colorTextures:[e._textures[0]],destroyAttachments:!1,depthStencilRenderbuffer:new h$q({context:t,format:E$r.DEPTH_STENCIL})});e._depthBuffers.push(i);var n=new u$F({context:t,colorTextures:[e._textures[1]],destroyAttachments:!1,depthStencilRenderbuffer:new h$q({context:t,format:E$r.DEPTH_STENCIL})});e._depthBuffers.push(n);var r=new u$F({context:t,colorTextures:[e._textures[2]],destroyAttachments:!1,depthStencilRenderbuffer:new h$q({context:t,format:E$r.DEPTH_STENCIL})});e._depthBuffers.push(r)}function J$c(e,t,i,n){if(t$$(i)){var r=[];if(be$6(e._scene._context,i,e._layers,n,r),e._positionMode===k$p.Intersects)for(var o=Object.keys(n),a=0;a<o.length;a++){var s=r[o[a]],l=e._layers[s],u=n[o[a]];u.length>0&&l.setSelection(u)}}}function be$6(e,t,i,n,r){if(t$$(t)&&t.isUpdate){for(var o=t.renderTexture._width,a=t.renderTexture._height,s=e.readPixels({framebuffer:t.renderTexture._fb,x:0,y:0,width:o,height:a}),l=[],u=0;u<i.length;u++){r[$=T$n(_=i[u].id)]=u,l.push($),n[$]=[]}for(var c=0;c<o;c++)for(var h=0;h<a;h++){var d=4*(h*o+c);if(0!==s[d]||0!==s[d+1]||0!==s[d+2]){var f=e$1z.byteToRgba(s[d],s[d+1],s[d+2],s[d+3]),p=e.getObjectByPickId(f);if(t$$(p)){var _=p.primitive.id,m=p.id,$=T$n(_),g=l.indexOf($);if(g>=0)if(i[r[$]],0==n[$].length){var y=[];y.push(m),n[$]=y}else(g=n[$].indexOf(m))<0&&n[$].push(m)}}}}}function T$n(e){return"id_"+e}function we$5(e,t,i){if(e._profile){t$$(e._beQueryCollection)&&e._beQueryCollection._setSQMode(e._positionMode);for(var n=0,r=e._clipLayers.length;n<r;n++){e._clipLayers.values[n]._setSQMode(e._positionMode)}}else e._frameState=i,0!==e._textures.length&&e._bufferDirty&&!e._depthDirty&&(e._resultBuffer.isUpdate=!0,e._resultBuffer._beginFunc=function(t){for(var i=0;i<e._layers.length;i++)e._layers[i]._setSQMode(k$p.Intersects)},e._resultBuffer._endFunc=function(t){e._intersectsIDs=[],J$c(e,t,e._resultBuffer,e._intersectsIDs),e._resultBuffer.isUpdate=!1,e._updateIDs=!0},e._positionMode!==k$p.Intersects&&(e._disjointBuffer.isUpdate=!0,e._disjointBuffer._beginFunc=function(t){for(var i=0;i<e._layers.length;i++)e._layers[i]._setSQMode(k$p.Disjoint)},e._disjointBuffer._endFunc=function(t){e._disjointIDs=[],J$c(e,t,e._disjointBuffer,e._disjointIDs),Ie$5(e),Be$6(e),e._disjointBuffer.isUpdate=!1,e._updateIDs=!0}),e._bufferDirty=!1)}function Ie$5(e){if(e._positionMode===k$p.Disjoint)for(var t=Object.keys(e._disjointIDs),i=Object.keys(e._intersectsIDs),n=0;n<e._layers.length;n++){var r=e._layers[n],o=T$n(r.id);if(!(t.indexOf(o)<0)){if(i.indexOf(o)<0){r.setSelection(e._disjointIDs[o]);continue}for(var a=e._intersectsIDs[o],s=e._disjointIDs[o],l=0;l<a.length;l++){var u=s.indexOf(a[l]);u>=0&&s.splice(u,1)}r.setSelection(s)}}}function Be$6(e){if(e._positionMode===k$p.Contains)for(var t=Object.keys(e._disjointIDs),i=Object.keys(e._intersectsIDs),n=0;n<e._layers.length;n++){var r=e._layers[n],o=T$n(r.id);if(!(i.indexOf(o)<0)){if(t.indexOf(o)<0){r.setSelection(e._intersectsIDs[o]);continue}for(var a=e._intersectsIDs[o],s=e._disjointIDs[o],l=0;l<s.length;l++){var u=a.indexOf(s[l]);u>=0&&a.splice(u,1)}r.setSelection(a)}}}function E$l(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).context,i=e.width,n=e.height,r=e.depth,o=e.mipmapLevels,a=e.is3D,s=e$1Y(e.pixelFormat,Z$_.RGBA),l=e$1Y(e.pixelDatatype,v$Z.UNSIGNED_BYTE),u=s,c=Z$_.isCompressedFormat(u);if(s===Z$_.DEPTH_STENCIL?u=de$x.DEPTH24_STENCIL8:s===Z$_.DEPTH_COMPONENT&&(l===v$Z.UNSIGNED_SHORT?u=de$x.DEPTH_COMPONENT16:l===v$Z.UNSIGNED_INT&&(u=de$x.DEPTH_COMPONENT24)),l===v$Z.FLOAT)switch(s){case Z$_.RGBA:u=de$x.RGBA32F;break;case Z$_.RGB:u=de$x.RGB32F;break;case Z$_.RG:u=de$x.RG32F;break;case Z$_.R:u=de$x.R32F}else if(l===v$Z.HALF_FLOAT)switch(s){case Z$_.RGBA:u=de$x.RGBA16F;break;case Z$_.RGB:u=de$x.RGB16F;break;case Z$_.RG:u=de$x.RG16F;break;case Z$_.R:u=de$x.R16F}if(!t$$(i)||!t$$(n))throw new t$_("options requires a source field to create an initialized texture or width and height fields to create a blank texture.");if(n$1e.typeOf.number.greaterThan("width",i,0),i>e$1y.maximumTextureSize)throw new t$_("Width must be less than or equal to the maximum texture size ("+e$1y.maximumTextureSize+"). Check maximumTextureSize.");if(n$1e.typeOf.number.greaterThan("height",n,0),n>e$1y.maximumTextureSize)throw new t$_("Height must be less than or equal to the maximum texture size ("+e$1y.maximumTextureSize+"). Check maximumTextureSize.");if(!Z$_.validate(s))throw new t$_("Invalid options.pixelFormat.");if(!c&&!v$Z.validate(l))throw new t$_("Invalid options.pixelDatatype.");if(s===Z$_.DEPTH_COMPONENT&&l!==v$Z.UNSIGNED_SHORT&&l!==v$Z.UNSIGNED_INT)throw new t$_("When options.pixelFormat is DEPTH_COMPONENT, options.pixelDatatype must be UNSIGNED_SHORT or UNSIGNED_INT.");if(s===Z$_.DEPTH_STENCIL&&l!==v$Z.UNSIGNED_INT_24_8)throw new t$_("When options.pixelFormat is DEPTH_STENCIL, options.pixelDatatype must be UNSIGNED_INT_24_8.");if(l===v$Z.FLOAT&&!t.floatingPointTexture)throw new t$_("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension. Check context.floatingPointTexture.");if(l===v$Z.HALF_FLOAT&&!t.halfFloatingPointTexture)throw new t$_("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension. Check context.halfFloatingPointTexture.");if(Z$_.isDepthFormat(s)&&!t.depthTexture)throw new t$_("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, this WebGL implementation must support WEBGL_depth_texture. Check context.depthTexture.");if(c){if(Z$_.isDXTFormat(u)&&!t.s3tc)throw new t$_("When options.pixelFormat is S3TC compressed, this WebGL implementation must support the WEBGL_texture_compression_s3tc extension. Check context.s3tc.");if(Z$_.isPVRTCFormat(u)&&!t.pvrtc)throw new t$_("When options.pixelFormat is PVRTC compressed, this WebGL implementation must support the WEBGL_texture_compression_pvrtc extension. Check context.pvrtc.");if(Z$_.isETC1Format(u)&&!t.etc1)throw new t$_("When options.pixelFormat is ETC1 compressed, this WebGL implementation must support the WEBGL_texture_compression_etc1 extension. Check context.etc1.")}var h,d=e.preMultiplyAlpha||s===Z$_.RGB||s===Z$_.LUMINANCE,f=e$1Y(e.flipY,!0),p=t._gl,_=a?p.TEXTURE_3D:p.TEXTURE_2D_ARRAY,m=p.createTexture();p.activeTexture(p.TEXTURE0),p.bindTexture(_,m),p.texStorage3D(_,o,u,i,n,r),p.bindTexture(_,null),h=c?Z$_.compressedTextureSizeInBytes(s,i,n,r):Z$_.textureSizeInBytes(s,l,i,n,r),this._id=t$U(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=_,this._texture=m,this._pixelFormat=s,this._internalFormat=u,this._pixelDatatype=l,this._width=i,this._height=n,this._depth=r,this._dimensions=new a$11(i,n,r),this._hasMipmap=!1,this._sizeInBytes=h,this._preMultiplyAlpha=d,this._flipY=f,this._sampler=void 0,this.ignoreWEBGL2=!1,this._isCompressed=c,this.sampler=t$$(e.sampler)?e.sampler:new a$Q,t.memorySize+=h}function O$f(e,t,i,n){if(!n$1d.isPowerOfTwo(i)||!n$1d.isPowerOfTwo(n))return!1;for(var r=e.length,o=i,a=n,s=0;;){if(s+=Z$_.compressedTextureSizeInBytes(t,o,a),a>>=1,0==(o>>=1)&&0==a)break;o=Math.max(o,1),a=Math.max(a,1)}return s==r}function y$l(e,t,i){switch(e){case Z$_.RGB_DXT1:case Z$_.RGB_ETC1:return(t+3>>2)*(i+3>>2)*8;case Z$_.RGBA_DXT5:return(t+3>>2)*(i+3>>2)*16;case Z$_.RGB_PVRTC_4BPPV1:case Z$_.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8);case Z$_.RGB_PVRTC_2BPPV1:case Z$_.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8);case de$x.RGB565:return t*i*2;case Z$_.RGBA:return t*i*4;case Z$_.LUMINANCE_ALPHA:return t*i*2;default:return 0}}function B$d(e,t){if(t!==e._currentFramebuffer){var i;e._currentFramebuffer=t,typeof WebGLRenderingContext<"u"&&(i=[de$x.BACK]);var n=i;if(t$$(t))t._bind(),n=t._getActiveColorAttachments();else{var r=e._gl;r.bindFramebuffer(r.FRAMEBUFFER,null)}e.drawBuffers&&e.glDrawBuffers(n)}}function g$e(e,t,i,n){var r=e._currentRenderState,o=e._currentPassState,a=e._currentViewport;e._currentRenderState=t,e._currentPassState=i,e._currentViewport=i.viewport,p$1a.partialApply(e._gl,r,t,o,i,a,i.viewport,n)}function m$m(e,t,i,n){var r=e$1Y(i._renderState,e._defaultRenderState);if(t$$(t)&&r.depthTest&&r.depthTest.enabled&&!t.hasDepthAttachment)throw new t$_("The depth test can not be enabled (drawCommand.renderState.depthTest.enabled) because the framebuffer (drawCommand.framebuffer) does not have a depth or depth-stencil renderbuffer.");B$d(e,t),g$e(e,r,n,!1)}function s$j(e){this._pointCount=e.pointCount,this._primitiveMode=e.primitiveMode,this._feedbackShaderProgram=e.feedbackShader,this._normalShaderProgram=e.normalShader,this._modelMatrix=e.modelMatrix,this._normalShaderUniformMap=e.normalShaderUniformMap,this._feedbackShaderUniformMap=e.feedbackShaderUniformMap,this._attributes=e.attributes,this._framebuffer=e.framebuffer,this._renderState=e.renderState,this._indices=e.indices,this._textureEffect=e.textureEffect,this._frameIdx=0,this._VBOs=new Array,this._VBOs[0]=new Array,this._VBOs[1]=new Array,this._indexBuffer=null,this._pass=we$l.ANALYSIS,this._handle=void 0,this._gl=void 0,this.initialized=!1,this._drawEvent=new o$15}Object.defineProperties(C$k.prototype,{geometry:{get:function(){return this._geometry},set:function(e){if(this._geometry&&this._geometry.type===b$K.GEOMODEL3D&&(this._queryCollection.removeCollection(this._name),this._queryCollection.destroy(),this._allS3MColorCommand=[],this._queryCollection=void 0),this._geometry=e,this._depthDirty=!0,this._isInitlized=!1,this._geometry.type===b$K.GEOMODEL3D)t$$(this._queryCollection)&&(this._queryCollection.removeCollection(this._name),this._queryCollection.destroy(),this._allS3MColorCommand=[]),this._queryCollection=new _0x1bf60e(this._scene.context),this._queryCollection._needToRender=!1,this._requestModel(e);else if(t$$(this._geometry._shape)){var t=new y$H({geometryInstances:new m$P({attributes:{color:new r$I},geometry:this._geometry}),appearance:new r$u({translucent:!1})});this._scene.primitives.add(t),this._geometry=t}}},layers:{get:function(){return this._layers},set:function(e){for(var t=0;t<this._layers.length;t++)this._layers[t]._spatialQueryEnable=!1;this._layers=e,this._bufferDirty=!0}},fillColor:{get:function(){return this._fillColor},set:function(e){this._fillColor=e}},outlineColor:{get:function(){return this._outlineColor},set:function(e){this._outlineColor=e}},positionMode:{get:function(){return this._positionMode},set:function(e){this._positionMode=e,this._bufferDirty=!0}},fillStyle:{get:function(){return this._fillStyle},set:function(e){this._fillStyle=e}}}),C$k.prototype.destroy=function(){return W$e(this),F$k(this),Y$e(this),t$$(this._geometry)&&this._geometry.type===b$K.GEOMODEL3D?(this._queryCollection.removeCollection(this._name),this._queryCollection.destroy(),this._allS3MColorCommand=[]):this._beQueryCollection=void 0,this._profile=!1,this._scene._analyst3D.remove(this._name,!0),s$1e(this)},C$k.prototype.clear=function(){this._scene._analyst3D.remove(this._name,!1)},C$k.prototype.build=function(){""===this._name?(this._name="spatialQuery3D"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_scene",this._cameraName=this._name+"_camera",this._scene._analyst3D.add(this)):t$$(this._scene._analyst3D.find(this._name))||this._scene._analyst3D.add(this)},C$k.prototype.update=function(e,t,i){if(this._curFrameNumber!==t.frameNumber&&(this._curFrameNumber=t,!t._fboState.enabled&&t$$(this._geometry)&&(0!==this._clipLayers.length||0!==this._layers.length||t$$(this._beQueryCollection)))){if(!Ce$5(this._geometry))throw new t$_("the geometry type is not supported.");var n=e.drawingBufferWidth,r=e.drawingBufferHeight;if((this._width!==n||this._height!==r)&&(this._geometry.isGeometryDirty=!0,this._width=n,this._height=r),this._geometry.isGeometryDirty&&(this._isInitlized=!1),this._geometry.type===b$K.GEOMODEL3D){if(this._queryCollection.update(t),this._allS3MColorCommand=this._queryCollection._getAllColorCommand(),0===this._allS3MColorCommand.length)return}else if(this._geometry instanceof y$H){if(this._allS3MColorCommand=this._geometry._colorCommands,0===this._allS3MColorCommand.length)return;this._geometry._state=ce$n.FAILED}else{c$1a.equalsEpsilon(this._worldMatrix,this._geometry.modelMatrix,n$1d.EPSILON8)?0==this._boundingSphere.radius&&(this._boundingSphere=this.geometry._getGeometry().boundingSphere):(c$1a.clone(this._geometry.modelMatrix,this._worldMatrix),c$19.transform(this.geometry._getGeometry().boundingSphere,this._worldMatrix,this._boundingSphere),this._depthDirty=!0)}this._isInitlized||(ve$6(this,e,t),this._geometry.isGeometryDirty=!1),this._profile||this._updateTextures(e,t),we$5(this,e,t),t$$(this._colorCommand)&&(this.fillStyle===vr.Fill||this.fillStyle===vr.Fill_And_WireFrame)&&!this._profile&&i.push(this._colorCommand),t$$(this._outlineCommand)&&(this.fillStyle===vr.WireFrame||this.fillStyle===vr.Fill_And_WireFrame)&&i.push(this._outlineCommand)}},C$k.prototype.getQueryIDs=function(){if(!this._updateIDs)return this._ids;this._ids=[];for(var e=new e$1F;;){this._bufferDirty=!0,this._resultBuffer.isUpdate=!0,this._scene.initializeFrame(),this._scene._renderForQuery();for(var t=!1,i=0;i<this._layers.length;i++){var n=(s=this._layers[i]).getSelection();if(!(n.length<=0)){if(e.contains(s.id)){var r;r=n.concat(e.get(s.id).ids),n=r}var o={layerName:s.name,layerIndex:i,ids:n};e.set(s.id,o),t=!0,s.releaseSelection(),s.setObjsVisible(n,!1)}}if(!t){this._bufferDirty=!1,this._resultBuffer.isUpdate=!1;break}}for(var a=0;a<e.values.length;a++){var s;(s=this._layers[e.values[a].layerIndex]).setObjsVisible([],!1);var l={layerName:e.values[a].layerName,ids:e.values[a].ids};this._ids.push(l)}return this._updateIDs=!1,this._ids},C$k.prototype._requestModel=function(){var e=this,t=this._geometry.geoModel;if(t$$(t)){var i=new Uint8Array(t.model);this._queryCollection.add(this._name,{position:a$11.fromDegrees(t.position.x,t.position.y,t.position.z),id:this._dataIndex,color:this._fillColor,scale:new a$11(t.scaleX,t.scaleY,t.scaleZ)},i.buffer)}else if(""!==this._geometry.geoFilePath){var n=this._geometry.geoFilePath,r=n.replace(/\?returnContent=.*$/,"");".json"===(r=r.substring(r.length-5).toLowerCase())?u$$(this._geometry.geoFilePath).then((function(t){if(null!=t.geometry){e._geometry.geoModel=t.geometry;var i=new Uint8Array(t.geometry.model);e._queryCollection.add(e._name,{position:a$11.fromDegrees(t.geometry.position.x,t.geometry.position.y,t.geometry.position.z),id:e._dataIndex,color:e._fillColor,scale:new a$11(t.geometry.scaleX,t.geometry.scaleY,t.geometry.scaleZ)},i.buffer)}})):u$S(n).then((function(t){var i=new DataView(t),r=0,o=i.getInt32(r,!0);r+=4;var a=c$X(new Uint8Array(t,r,o)),s=JSON.parse(a).geometry;if(null!=s){r+=o;var l=i.getInt32(r,!0);r+=4;var u,c,h=[];for(u=0;u<l;u++)c=i.getInt32(r,!0),h.push(c),r+=4;var d=[];for(u=0;u<l;u++){if(0===(c=h[u]))d.push(null);else{var f=new Uint8Array(t,r,c);d.push(new Uint8Array(f).buffer)}r+=c}e._queryCollection.add(n,{position:a$11.fromDegrees(s.position.x,s.position.y,s.position.z),id:e._dataIndex,scale:new a$11(s.scaleX,s.scaleY,s.scaleZ),hpr:e$1L.fromDegrees(-s.rotationZ,s.rotationX,s.rotationY)},d[0],!1)}}))}},C$k.prototype._updateTextures=function(e,t){if(this._curFrameNumber!==t.frameNumber&&(this._curFrameNumber=t,!(!this._depthDirty||t$$(this._resultBuffer)&&this._resultBuffer.isUpdate||t$$(this._disjointBuffer)&&this._disjointBuffer.isUpdate)||this._profile)){for(var i=t.camera,n=this._depthBuffers.length,r=0;r<n;r++)this._clearCommand.framebuffer=this._depthBuffers[r],this._clearCommand.execute(e);for(var o=0;o<n;o++)this._depthCommands[o].execute(e);t$$(this._beQueryCollection)&&3===this._textures.length&&this._beQueryCollection._setSQTextures(this._textures),this._clearCommand.framebuffer=void 0,c$1a.clone(i.viewMatrix,this._matDepthView),c$1a.clone(e.uniformState.projection,this._matDepthProject);for(r=0;r<this._layers.length;r++)this._layers[r]._setSQViewPrjMatrix(this._matDepthView,this._matDepthProject);this._depthDirty=!1,this._bufferDirty=!0}},E$l.create=function(e){return new Texture(e)},Object.defineProperties(E$l.prototype,{id:{set:function(e){this._id=e},get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,i=e.magnificationFilter,n=t===tt$l.NEAREST_MIPMAP_NEAREST||t===tt$l.NEAREST_MIPMAP_LINEAR||t===tt$l.LINEAR_MIPMAP_NEAREST||t===tt$l.LINEAR_MIPMAP_LINEAR,r=this._context,o=this._pixelDatatype;(o===v$Z.FLOAT&&!r.textureFloatLinear||o===v$Z.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(t=n?tt$l.NEAREST_MIPMAP_NEAREST:tt$l.NEAREST,i=et$k.NEAREST),!this.ignoreWEBGL2&&this._context.webgl2&&(!n$1d.isPowerOfTwo(this._width)||!n$1d.isPowerOfTwo(this._height))&&(t!=de$x.NEAREST&&(t=de$x.NEAREST),i!=de$x.NEAREST&&(i=de$x.NEAREST));var a=r._gl,s=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(s,this._texture),a.texParameteri(s,a.TEXTURE_MIN_FILTER,t),a.texParameteri(s,a.TEXTURE_MAG_FILTER,i),a.texParameteri(s,a.TEXTURE_WRAP_S,e.wrapS),a.texParameteri(s,a.TEXTURE_WRAP_T,e.wrapT),t$$(this._textureFilterAnisotropic)&&a.texParameteri(s,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),a.bindTexture(s,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}}),E$l.prototype.setDataBufferWithMipmap=function(e,t){var i=this._context._gl;i.activeTexture(i.TEXTURE0),i.bindTexture(this._textureTarget,this._texture);var n=this._width,r=this._height,o=O$f(t,this._internalFormat,n,r),a=0,s=0;do{var l,u=y$l(this._internalFormat,n,r);l=this._internalFormat==Z$_.RGBA&&this._pixelDatatype===v$Z.FLOAT?new Float32Array(t.buffer,t.byteOffset+a,u):new Uint8Array(t.buffer,t.byteOffset+a,u),this._isCompressed?i.compressedTexSubImage3D(this._textureTarget,s++,0,0,e,n,r,1,this._internalFormat,l):i.texSubImage3D(this._textureTarget,s++,0,0,e,n,r,1,this._internalFormat,this._pixelDatatype,l),n=Math.max(n>>1,1),r=Math.max(r>>1,1),a+=u}while(a<t.length&&o);i.bindTexture(this._textureTarget,null)},E$l.prototype.generateMipmap=function(e){if(e=e$1Y(e,D$12.DONT_CARE),this._width>1&&!n$1d.isPowerOfTwo(this._width))throw new t$_("width must be a power of two to call generateMipmap().");if(this._height>1&&!n$1d.isPowerOfTwo(this._height))throw new t$_("height must be a power of two to call generateMipmap().");var t=this._gl,i=this._target;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i)},E$l.prototype.isDestroyed=function(){return!1},E$l.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._context.memorySize-=this._sizeInBytes,s$1e(this)},s$j.prototype.beginDraw=function(e,t,i,n){m$m(e,t,i,n)},s$j.prototype.execute=function(e,t){var i=e._gl;if(this._gl=i,!this.initialized){for(var n=this._attributes.length,r=0;r<n;++r)this._addAttribute(e,this._attributes[r]);this._textureEffect&&this._createIndexBuffer(e),t$$(this._handle)||(this._handle=i.createTransformFeedback()),this.initialized=!0}m$m(e,e$1Y(this._framebuffer,t.framebuffer),this,t),this._bindVBOToVertexAttribute(e),this._enableVertexAttribArray(e,!0),this._drawTransformFeedback(e),this._drawNormal(e,t),this._drawEvent.raiseEvent(e,t),this._enableVertexAttribArray(e,!1),this._frameIdx=1-this._frameIdx},s$j.prototype._drawNormal=function(e,t){var i=e._gl;this._normalShaderProgram._bind(),e._us.model=e$1Y(this._modelMatrix,c$1a.IDENTITY),this._normalShaderProgram._setUniforms(this._normalShaderUniformMap,e._us,e.validateShaderProgram),this._textureEffect?(i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,this._indexBuffer),i.drawElements(this._primitiveMode,this._indices.length,i.UNSIGNED_INT,0)):i.drawArrays(this._primitiveMode,0,this._pointCount)},s$j.prototype._drawTransformFeedback=function(e){var t=e._gl;t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,this._handle),this._bindVBOToTransformFeedback(e,!0),this._feedbackShaderProgram._bind(),e._us.model=e$1Y(this._modelMatrix,c$1a.IDENTITY),this._feedbackShaderProgram._setUniforms(this._feedbackShaderUniformMap,e._us,e.validateShaderProgram),t.enable(t.RASTERIZER_DISCARD),t.beginTransformFeedback(this._primitiveMode),this._textureEffect?t.drawArrays(this._primitiveMode,0,4*this._pointCount):t.drawArrays(this._primitiveMode,0,this._pointCount),t.endTransformFeedback(),t.disable(t.RASTERIZER_DISCARD),this._bindVBOToTransformFeedback(e,!1)},s$j.prototype._enableVertexAttribArray=function(e,t){for(var i=e._gl,n=0;n<this._attributes.length;n++){var r=this._attributes[n].index;t?i.enableVertexAttribArray(r):i.disableVertexAttribArray(r)}},s$j.prototype._bindVBOToVertexAttribute=function(e){for(var t=e._gl,i=0;i<this._attributes.length;i++){var n=this._attributes[i],r=n.index,o=n.componentsPerAttribute;t.bindBuffer(t.ARRAY_BUFFER,this._VBOs[this._frameIdx][r]._getBuffer()),t.vertexAttribPointer(r,o,t.FLOAT,!1,0,0)}},s$j.prototype._bindVBOToTransformFeedback=function(e,t){for(var i=e._gl,n=0;n<this._attributes.length;n++){var r=this._attributes[n].index,o=t?this._VBOs[1-this._frameIdx][r]._getBuffer():null;i.bindBufferBase(i.TRANSFORM_FEEDBACK_BUFFER,r,o)}},s$j.prototype._addAttribute=function(e,t){var i=t.data,n=t.index;this._VBOs[0][n]=this._createVBO(e,i),this._VBOs[1][n]=this._createVBO(e,i)},s$j.prototype._createVBO=function(e,t){return new u$Y({context:e,bufferTarget:de$x.ARRAY_BUFFER,usage:de$x.DYNAMIC_DRAW,typedArray:t})},s$j.prototype._createIndexBuffer=function(e){var t=e._gl;this._indexBuffer=t.createBuffer(),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this._indexBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,this._indices,t.STATIC_DRAW)},s$j.prototype.isDestroyed=function(){return!1},s$j.prototype.destroy=function(){t$$(this._normalShaderProgram)&&(this._normalShaderProgram=this._normalShaderProgram&&this._normalShaderProgram.destroy()),t$$(this._feedbackShaderProgram)&&(this._feedbackShaderProgram=this._feedbackShaderProgram&&this._feedbackShaderProgram.destroy());for(var e=0;e<this._attributes.length;e++){var t=this._attributes[e].index;this._VBOs[0][t].destroy(),this._VBOs[1][t].destroy()}return t$$(this._indexBuffer)&&this._gl.deleteBuffer(this._indexBuffer),t$$(this._handle)&&(this._handle=this._gl.deleteTransformFeedback(this._handle),this._handle=void 0),s$1e(this)},Object.defineProperties(s$j.prototype,{pass:{get:function(){return this._pass},set:function(e){this._pass!==e&&(this._pass=e)}}});var _0x208455=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x53c4c2=_0x208455(void 0,(function(){return _0x53c4c2.toString().search("(((.+)+)+)+$").toString().constructor(_0x53c4c2).search("(((.+)+)+)+$")}));_0x53c4c2();var $$c="\nattribute vec4 aPosition;\nuniform mat4 uTexWorldViewProjMatrix0;\nuniform mat4 uTexWorldViewProjMatrix1;\nuniform mat4 uTexWorldViewProjMatrix2;\nuniform mat4 uTexWorldViewProjMatrix3;\nuniform mat4 uTexWorldViewProjMatrix4;\n\nuniform mat4 worldview_matrix;\nuniform mat4 projection_matrix;\nuniform float uRadius;\n\nvarying vec4 renderTextureCoord0;\nvarying vec4 renderTextureCoord1;\nvarying vec4 renderTextureCoord2;\nvarying vec4 renderTextureCoord3;\nvarying vec4 renderTextureCoord4;\n\nvarying vec4 vexPos;\nvarying vec3 vPositionToEyeEC;\n\nvec4 GetUV(const mat4 renderTextureMatrix)\n{\n\tvec4 texCoord = renderTextureMatrix * vec4(vexPos.xyz, 1.0);\n\ttexCoord = texCoord / texCoord.w;\n\ttexCoord.xyz = texCoord.xyz * 0.5 + 0.5;\n\treturn texCoord;\n}\n\nvoid main()\n{\t\n vec3 newPos = vec3(aPosition.xyz);\n\tnewPos = newPos * uRadius;\n\tvexPos = vec4(newPos.xyz, 1.0);\n\trenderTextureCoord0 = GetUV(uTexWorldViewProjMatrix0);\n\trenderTextureCoord1 = GetUV(uTexWorldViewProjMatrix1);\n\trenderTextureCoord2 = GetUV(uTexWorldViewProjMatrix2);\n\trenderTextureCoord3 = GetUV(uTexWorldViewProjMatrix3);\n\trenderTextureCoord4 = GetUV(uTexWorldViewProjMatrix4);\n\n\tgl_Position = czm_modelViewProjection * vexPos;\n\t\n}",_0x580f42=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x39489e=_0x580f42(void 0,(function(){return _0x39489e.toString().search("(((.+)+)+)+$").toString().constructor(_0x39489e).search("(((.+)+)+)+$")}));_0x39489e();var ee$8="\nuniform mat4 uTexWorldViewMatrix0;\nuniform mat4 uTexWorldViewMatrix1;\nuniform mat4 uTexWorldViewMatrix2;\nuniform mat4 uTexWorldViewMatrix3;\nuniform mat4 uTexWorldViewMatrix4;\n\nuniform mat4 uTexProjMatrix0;\nuniform mat4 uTexProjMatrix1;\nuniform mat4 uTexProjMatrix2;\nuniform mat4 uTexProjMatrix3;\nuniform mat4 uTexProjMatrix4;\nuniform sampler2D uDepthMap0;\nuniform sampler2D uDepthMap1;\nuniform sampler2D uDepthMap2;\nuniform sampler2D uDepthMap3;\nuniform sampler2D uDepthMap4;\nuniform int uDomeType;\nuniform float uRadius;\nuniform vec4 uVisibleAreaColor;\nuniform vec4 uHiddenAreaColor;\n\nvarying vec4 renderTextureCoord0;\nvarying vec4 renderTextureCoord1;\nvarying vec4 renderTextureCoord2;\nvarying vec4 renderTextureCoord3;\nvarying vec4 renderTextureCoord4;\n\nvarying vec4 vexPos;\n\nbool IsValidUV(vec4 texCoord)\n{\n\tif ((texCoord.x<=1.0)&&(texCoord.x>=0.0)&&(texCoord.y<=1.0)&&(texCoord.y>=0.0)&&(texCoord.z<=1.0)&&(texCoord.z>=0.0))\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}\n\nbool IsVisible(sampler2D shadowMap, vec4 uv)\n{\n bool isVisible = true;\n\tfloat depth = czm_unpackDepth(texture2D(shadowMap, uv.xy));\n\tif(depth < 0.00001)\n {\n return isVisible;\n }\n\tif(uv.z > (depth + 0.00001))\n {\n isVisible = false;\n }\n\treturn isVisible;\n}\n\nbool GetVisibleFlag()\n{\n\tif(IsValidUV(renderTextureCoord0))\n\t{\n\t\treturn IsVisible(uDepthMap0, renderTextureCoord0);\n\t}\n\t\n\tif(IsValidUV(renderTextureCoord1))\n\t{\n\t\treturn IsVisible(uDepthMap1, renderTextureCoord1);\n\t}\n\t\n\tif(IsValidUV(renderTextureCoord2))\n\t{\n\t\treturn IsVisible(uDepthMap2, renderTextureCoord2);\n\t}\n\t\n\tif(IsValidUV(renderTextureCoord3))\n\t{\n\t\treturn IsVisible(uDepthMap3, renderTextureCoord3);\n\t}\n\t\n\tif(IsValidUV(renderTextureCoord4))\n\t{\n\t\treturn IsVisible(uDepthMap4, renderTextureCoord4);\n\t}\n\treturn true;\n}\n\nvoid main()\n{\n\tbool isVisible = GetVisibleFlag();\n\tif(uDomeType == 0)\n\t{\n if (!isVisible)\n {\n discard;\n }\n else\n {\n gl_FragColor = uVisibleAreaColor;\n }\n\t}\n\telse if(uDomeType == 1)\n\t{\n\t\tif (!isVisible)\n\t\t{\n\t\t\tgl_FragColor = uHiddenAreaColor;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdiscard;\n\t\t}\n\t}\n\telse\n\t{\n\t if (!isVisible)\n\t\t{\n\t\t\tgl_FragColor = uHiddenAreaColor;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgl_FragColor = uVisibleAreaColor;\n\t\t}\n\t}\n}",e$m={VISIBLEDOME:0,HIDDENDOME:1,ALLDOME:2},me$8=Object.freeze(e$m),ue$6=new c$1a(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);function C$j(e){if(!t$$(e))throw new t$_("scene are required.");this._scene=e,this._cameraDepthBuffer=[],this._cameraNames=[],this._renderTextureMatrix=[],this._texWorldViewMatrix=[],this._texPrjMatrix=[],this._dirRadian=[],this._dPitch=[],this._colorCommand=void 0,this._boundingSphere=new c$19,this._frameState=void 0,this._viewPosition=[0,0,0],this._startAngle=0,this._endAngle=360,this._visibleAreaColor=new a$10(0,1,0,.5),this._hiddenAreaColor=new a$10(1,0,0,.5),this._domeType=me$8.ALLDOME,this._quality=0,this._displayMode=0,this._name="",this._checking=!1,this._sceneName="",this._updateCamera=!0,this._isRecreateTexture=!0,this._targetPoints=[],this._worldMatrix=c$1a.IDENTITY.clone(),this._initialize=!1,this._id=0,this._isUpdateCommand=!1,this._textureFinish=!1,this._isClosed=!1}function _e$6(e){t$$(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0)}function k$k(e){if(t$$(e._frameState)){for(var t in e._cameraDepthBuffer)t$$(e._cameraDepthBuffer[t])&&delete e._frameState._framebufferList[t];e._frameState=void 0}for(var t in e._cameraDepthBuffer)e._cameraDepthBuffer[t]=e._cameraDepthBuffer[t]&&e._cameraDepthBuffer[t].destroy()}function he$6(e,t,i){var n=i.camera,r=n.frustum.aspectRatio,o=n.frustum.fov,a=n.frustum.near,s=n.frustum.far,l=new a$11,u=n.heading,c=n.pitch,h=e._scene.globe.cullEnabled;a$11.clone(n.position,l);for(var d=0;d<5;d++){var f=90*n$1d.RADIANS_PER_DEGREE,p=90*n$1d.RADIANS_PER_DEGREE,_=Math.tan(.5*f)/Math.tan(.5*p),m=.001*e._distance,$=Math.max(e._distance,10),g=a$11.fromDegreesArrayHeights(e._viewPosition)[0],y=e._cameraNames[d];e._cameraDepthBuffer[y].isUpdate=!0;var v=i.useLogDepth;e._cameraDepthBuffer[y]._beginFunc=function(t){e._scene.globe.cullEnabled=!1,t.useLogDepth=!1,e._textureFinish=!1;var i=t._fboState.name,r=e._dirRadian[i]*n$1d.RADIANS_PER_DEGREE,o=e._dPitch[i]*n$1d.RADIANS_PER_DEGREE;n.frustum.aspectRatio=_,n.frustum.fov=f,n.frustum.near=m,n.frustum.far=$+100,n.setView({destination:g,orientation:{heading:r,pitch:o,roll:n.roll}}),c$1a.multiply(n.viewMatrix,e._worldMatrix,e._texWorldViewMatrix[i]),c$1a.multiply(n.frustum.projectionMatrix,e._texWorldViewMatrix[i],e._renderTextureMatrix[i]),c$1a.clone(n.frustum.projectionMatrix,e._texPrjMatrix[i])},e._cameraDepthBuffer[y]._endFunc=function(i){n.setView({destination:l,orientation:{heading:u,pitch:c,roll:n.roll},convert:!1}),e._scene.globe.cullEnabled=h,n.frustum.aspectRatio=r,n.frustum.fov=o,n.frustum.near=a,n.frustum.far=s;var d=i._fboState.name;for(var f in e._cameraDepthBuffer[d]._isUpdate=!1,e._cameraDepthBuffer)if(e._cameraDepthBuffer[f]._isUpdate)return void(i.useLogDepth=v);if(e._textureFinish=!0,e._textureFinish){if(!t$$(e._colorCommand))return;var p=e._colorCommand.shaderProgram.fragmentShaderSource,_=e._colorCommand.shaderProgram.vertexShaderSource,m={aPosition:0};e._colorCommand.shaderProgram.destroy(),e._colorCommand.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:_,fragmentShaderSource:p,attributeLocations:m})}i.useLogDepth=v}}}function ce$5(e,t){var i=de$7(e);pe$7(e),U$e(e,t),xe$9(e,t,i.vertexPackage,i.indexPackage)}function de$7(e){return{vertexPackage:fe$6(129,129,1,e._startAngle,e._endAngle,e._isClosed),indexPackage:le$a(129,129,e._startAngle,e._endAngle,e._isClosed)}}function fe$6(e,t,i,n,r,o){var a=e,s=t,l=(r-n)*n$1d.RADIANS_PER_DEGREE/s,u=Math.PI/(2*a),c=0,h=0,d=!1;o&&(0!=n||360!=r)&&(d=!0);for(var f=0,p=d?(e+1)*t+1:(e+1)*t,_=C$12.createTypedArray(C$12.FLOAT,3*p),m=0;m<s;m++){h=m*l+n*n$1d.RADIANS_PER_DEGREE;for(var $=0;$<=a;$++){c=$*u;var g=i*Math.sin(c)*Math.cos(h),y=i*Math.sin(c)*Math.sin(h),v=i*Math.cos(c);_[f++]=y,_[f++]=g,_[f++]=v}}return d&&(_[f++]=0,_[f++]=0,_[f++]=0),_}function le$a(e,t,i,n,r){for(var o=[],a=0==i&&360==n?t:t-1,s=0;s<e;s++)for(var l=0;l<a;l++){var u=s+l*(e+1),c=u+1,h=l==t-1?s+1:u+e+2;o.push(u),o.push(c),o.push(h),o.push(u),o.push(h),o.push(h-1)}if(r&&(0!=i||360!=n)){var d=(e+1)*t,f=a*(e+1);for(s=0;s<e;s++)o.push(s),o.push(s+1),o.push(d),o.push(s+f+1),o.push(s+f),o.push(d)}for(var p=0,_=C$12.createTypedArray(C$12.UNSIGNED_SHORT,o.length),m=0;m<o.length;m++)_[p++]=o[m];return _}function pe$7(e){if(e._scene.mode===b$1d.SCENE3D){var t=a$11.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]),i=new e$1L(0,0,0);m$13.headingPitchRollToFixedFrame(t,i,n$1c.WGS84,m$13.eastNorthUpToFixedFrame,e._worldMatrix)}else if(e._viewPosition[0]>180||e._viewPosition[0]<-180||e._viewPosition[1]>180||e._viewPosition[1]<-180)layer._position=new a$11(layer.lon,layer.lat,height);else{var n=e._scene._frameState.camera._projection,r=a$11.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]),o=n.ellipsoid.cartesianToCartographic(r);r=n.project(o),c$1a.fromTranslation(r,e._worldMatrix),c$1a.multiply(ue$6,e._worldMatrix,e._worldMatrix)}a$11.clone(a$11.ZERO,e._boundingSphere.center),e._boundingSphere.radius=e._distance,c$19.transform(e._boundingSphere,e._worldMatrix,e._boundingSphere)}function U$e(e,t){if(e._isRecreateTexture){var i=e._frameState;k$k(e),e._frameState=i;for(var n=0;n<5;n++){var r=new n$m(t);r.environmentVisible.isObjectVisible=!0,r.environmentVisible.isGlobalVisible=!0,r._visibleViewport=e._visibleViewport;var o=e._cameraNames[n];e._cameraDepthBuffer[o]=r,e._frameState._framebufferList[o]=e._cameraDepthBuffer[o],e._renderTextureMatrix[o]=new c$1a,e._texWorldViewMatrix[o]=new c$1a,e._texPrjMatrix[o]=new c$1a,e._dirRadian[o]=90*n,e._dPitch[o]=4==n?90:0}e._isRecreateTexture=!1}}function xe$9(e,t,i,n){var r=u$Y.createVertexBuffer({context:t,typedArray:i,usage:A$13.STATIC_DRAW}),o=[],a={aPosition:0};o.push({index:a.aPosition,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var s=u$Y.createIndexBuffer({context:t,typedArray:n,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT});e._colorCommand=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:we$l.ANALYSIS,owner:e,cull:!1}),e._colorCommand.vertexArray=new x$18({context:t,attributes:o,indexBuffer:s});var l=new a$O({name:"ViewDomeVp",sources:[$$c]}),u=new a$O({name:"ViewDomeFp",sources:[ee$8]});e._colorCommand.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:a}),e._colorCommand.renderState=p$1a.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},blending:Ee$s.ALPHA_BLEND}),e._colorCommand.uniformMap={uVisibleAreaColor:function(){return e._visibleAreaColor},uHiddenAreaColor:function(){return e._hiddenAreaColor},uTexWorldViewProjMatrix0:function(){return e._renderTextureMatrix[e._cameraNames[0]]},uTexWorldViewProjMatrix1:function(){return e._renderTextureMatrix[e._cameraNames[1]]},uTexWorldViewProjMatrix2:function(){return e._renderTextureMatrix[e._cameraNames[2]]},uTexWorldViewProjMatrix3:function(){return e._renderTextureMatrix[e._cameraNames[3]]},uTexWorldViewProjMatrix4:function(){return e._renderTextureMatrix[e._cameraNames[4]]},uTexWorldViewMatrix0:function(){return e._texWorldViewMatrix[e._cameraNames[0]]},uTexWorldViewMatrix1:function(){return e._texWorldViewMatrix[e._cameraNames[1]]},uTexWorldViewMatrix2:function(){return e._texWorldViewMatrix[e._cameraNames[2]]},uTexWorldViewMatrix3:function(){return e._texWorldViewMatrix[e._cameraNames[3]]},uTexWorldViewMatrix4:function(){return e._texWorldViewMatrix[e._cameraNames[4]]},uTexProjMatrix0:function(){return e._texPrjMatrix[e._cameraNames[0]]},uTexProjMatrix1:function(){return e._texPrjMatrix[e._cameraNames[1]]},uTexProjMatrix2:function(){return e._texPrjMatrix[e._cameraNames[2]]},uTexProjMatrix3:function(){return e._texPrjMatrix[e._cameraNames[3]]},uTexProjMatrix4:function(){return e._texPrjMatrix[e._cameraNames[4]]},uDepthMap0:function(){return e._cameraDepthBuffer[e._cameraNames[0]].depthTexture},uDepthMap1:function(){return e._cameraDepthBuffer[e._cameraNames[1]].depthTexture},uDepthMap2:function(){return e._cameraDepthBuffer[e._cameraNames[2]].depthTexture},uDepthMap3:function(){return e._cameraDepthBuffer[e._cameraNames[3]].depthTexture},uDepthMap4:function(){return e._cameraDepthBuffer[e._cameraNames[4]].depthTexture},uRadius:function(){return e._distance},uDomeType:function(){return e._domeType}}}Object.defineProperties(C$j.prototype,{viewPosition:{get:function(){return this._viewPosition},set:function(e){this._viewPosition=e,this._updateCamera=!0}},distance:{get:function(){return this._distance},set:function(e){if(e<=0)throw new t$_("the distance is greater than 0.0");this._distance=e,this._updateCamera=!0}},startAngle:{get:function(){return this._startAngle},set:function(e){this._startAngle=e,this._initialize=!1,this._updateCamera=!0}},endAngle:{get:function(){return this._endAngle},set:function(e){this._endAngle=e,this._initialize=!1,this._updateCamera=!0}},visibleAreaColor:{get:function(){var e=new e$1z;return e.red=this._visibleAreaColor.x,e.green=this._visibleAreaColor.y,e.blue=this._visibleAreaColor.z,e.alpha=this._visibleAreaColor.w,e},set:function(e){this._visibleAreaColor.x=e.red,this._visibleAreaColor.y=e.green,this._visibleAreaColor.z=e.blue,this._visibleAreaColor.w=e.alpha}},hiddenAreaColor:{get:function(){var e=new e$1z;return e.red=this._hiddenAreaColor.x,e.green=this._hiddenAreaColor.y,e.blue=this._hiddenAreaColor.z,e.alpha=this._hiddenAreaColor.w,e},set:function(e){this._hiddenAreaColor.x=e.red,this._hiddenAreaColor.y=e.green,this._hiddenAreaColor.z=e.blue,this._hiddenAreaColor.w=e.alpha}},domeType:{get:function(){return this._domeType},set:function(e){this._domeType=e}},isClosed:{get:function(){return this._isClosed},set:function(e){this._isClosed=e,this._initialize=!1,this._updateCamera=!0,this._isRecreateTexture=!0}}}),C$j.prototype.destroy=function(){return k$k(this),_e$6(this),this._scene.farToNearRatio=1e3,this._scene._analyst3D.remove(this._name,!0),s$1e(this)},C$j.prototype.build=function(){if(""===this._name&&!this._checking){this._name="ViewDome"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_scene";for(var e=0;e<5;e++)this._cameraNames.push(this._name+"_camera"+e);this._scene._analyst3D.add(this)}},C$j.prototype.update=function(e,t,i){"water"===t._fboState.name||t.passes.pick||t._fboState.enabled||(t.camera.bReflect||(this._initialize||(this._frameState=t,ce$5(this,e),this._initialize=!0,this._textureFinish=!1),this._updateCamera&&(this._frameState=t,this._isRecreateTexture&&(U$e(this),this._isRecreateTexture=!1),he$6(this,e,this._frameState),this._update=!1,this._updateCamera=!1),t$$(this._colorCommand)&&this._textureFinish&&i.push(this._colorCommand)))},C$j.prototype.clear=function(){this._scene._analyst3D.remove(this._name,!1)};var _0xff6453=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3e8e65=_0xff6453(void 0,(function(){return _0x3e8e65.toString().search("(((.+)+)+)+$").toString().constructor(_0x3e8e65).search("(((.+)+)+)+$")}));function _0xd5ac20(){}_0x3e8e65(),_0xd5ac20.maxVBOSize=0;var _0x38dff4=0,_0x19d566=0,_0x3f09df=1048576,_0x2af7b5={},_0x1bb890=new e$1F;_0xd5ac20.createVertexBuffer=function(e,t){var i;if(t$$(_0x2af7b5[e.id])){i=_0x2af7b5[e.id];for(var n,r=t.byteLength,o=Object.keys(i._hash),a=!1,s=0,l=o.length;s<l;s++)if((n=Number(o[s]))>=r&&n<r+1024){a=!0;break}var u;if(a){var c=i.get(n);(u=c.pop()).isCached=!1,u.copyFromArrayView(t,0),_0x38dff4-=n,c.length<1&&i.remove(n)}return u}},_0xd5ac20.createIndexBuffer=function(e,t){var i;if(t$$(_0x1bb890[e.id])){i=_0x1bb890[e.id];for(var n,r=t.byteLength,o=Object.keys(i._hash),a=!1,s=0,l=o.length;s<l;s++)if((n=Number(o[s]))===r){a=!0;break}var u;if(a){var c=i.get(n);(u=c.pop()).isCached=!1,u.copyFromArrayView(t,0),_0x19d566-=n,c.length<1&&i.remove(n)}return u}},_0xd5ac20.deleteBuffer=function(e){if(t$$(_0x2af7b5[e.id])){var t,i,n,r,o=_0x2af7b5[e.id],a=_0x3f09df*_0xd5ac20.maxVBOSize*.9;if(_0x38dff4>a*_0x3f09df){var s=a*_0x3f09df;for(i=(t=Object.keys(o._hash)).length,n=0;n<i&&_0x38dff4>s;){r=t[n];for(var l=o.get(r);l.length&&_0x38dff4>s;){l.pop().destroy(),_0x38dff4-=r}l.length<1&&o.remove(r),++n}}if(t$$(_0x1bb890[e.id])){var u=_0x1bb890[e.id],c=_0x3f09df*_0xd5ac20.maxVBOSize*.1;if(_0x19d566>c*_0x3f09df){var h=c*_0x3f09df;for(i=(t=Object.keys(u._hash)).length,n=0;n<i&&_0x19d566>h;){r=t[n];for(var d=u.get(r);d.length&&_0x19d566>h;){d.pop().destroy(),_0x19d566-=r}d.length<1&&u.remove(r),++n}}}}},_0xd5ac20.deleteVertexArray=function(e,t){var i,n;t$$(_0x2af7b5[e.id])||(_0x2af7b5[e.id]=new e$1F),i=_0x2af7b5[e.id];for(var r=t._attributes,o=.9*_0xd5ac20.maxVBOSize,a=0;a<r.length;++a){var s=r[a].vertexBuffer;if(!(_0x38dff4>=o||s.isCached||s.vertexArrayDestroyable)){var l=s.sizeInBytes;i.contains(l)?i.get(l).push(s):i.set(l,[s]),s.isCached=!0,_0x38dff4+=l}}t$$(_0x1bb890[e.id])||(_0x1bb890[e.id]=new e$1F),n=_0x1bb890[e.id];var u=t._indexBuffer;return.1*_0xd5ac20.maxVBOSize>_0x19d566&&t$$(u)&&!u.isCached&&!u.vertexArrayDestroyable&&(n.contains(u.sizeInBytes)?n.get(u.sizeInBytes).push(u):n.set(u.sizeInBytes,[u]),u.isCached=!0,_0x19d566+=u.sizeInBytes),t.destroy()};var _0x4c14de=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x117898=_0x4c14de(void 0,(function(){return _0x117898.toString().search("(((.+)+)+)+$").toString().constructor(_0x117898).search("(((.+)+)+)+$")}));function _0x37527e(e){this._longitude=e$1Y(e.longitude,0),this._latitude=e$1Y(e.latitude,0),this._altitude=e$1Y(e.altitude,0),this._scale=e$1Y(e.scale,new a$11(1,1,1)),this._color=e$1Y(e.color,e$1z.WHITE),this._heading=e$1Y(e.heading,Math.PI/2),this._pitch=e$1Y(e.pitch,0),this._roll=e$1Y(e.roll,0),this._startDirection=e$1Y(e.startDirection,0),this._offset=e$1Y(e.offset,new a$11),this._timeStamp=e$1Y(e.timeStamp,-1),this._id=e$1Y(e.id,t$U()),this._description=e.description,this._lockOrientation=e$1Y(e.lockOrientation,!1)}_0x117898(),Object.defineProperties(_0x37527e.prototype,{longitude:{get:function(){return this._longitude},set:function(e){this._longitude=e}},latitude:{get:function(){return this._latitude},set:function(e){this._latitude=e}},altitude:{get:function(){return this._altitude},set:function(e){this._altitude=e}},scale:{get:function(){return this._scale},set:function(e){this._scale=e}},color:{get:function(){return this._color},set:function(e){this._color=e}},heading:{get:function(){return this._heading},set:function(e){this._heading=e}},pitch:{get:function(){return this._pitch},set:function(e){this._pitch=e}},roll:{get:function(){return this._roll},set:function(e){this._roll=e}},startDirection:{get:function(){return this._startDirection},set:function(e){this._startDirection=e}},offset:{get:function(){return this._offset},set:function(e){this._offset=e}},timeStamp:{get:function(){return this._timeStamp},set:function(e){this._timeStamp=e}},id:{get:function(){return this._id},set:function(e){this._id=e}},description:{get:function(){return this._description},set:function(e){this._description=e}},lockOrientation:{get:function(){return this._lockOrientation},set:function(e){this._lockOrientation=e}}}),_0x37527e.clone=function(e){return new _0x37527e({longitude:e._longitude,latitude:e._latitude,altitude:e._altitude,scale:e._scale,color:e._color,heading:e._heading,pitch:e._pitch,roll:e._roll,startDirection:e._startDirection,offset:e._offset,lockOrientation:e._lockOrientation})};var _0x4e52a5=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2e8f9f=_0x4e52a5(void 0,(function(){return _0x2e8f9f.toString().search("(((.+)+)+)+$").toString().constructor(_0x2e8f9f).search("(((.+)+)+)+$")}));_0x2e8f9f();var _0x268086="attribute vec4 aPosition;\n#ifdef HAS_NORMAL\n attribute vec3 aNormal;\n#endif\nattribute vec4 aTexCoord0;\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\nattribute vec4 aPreHxyzLx;\nattribute vec4 aPreLyzNextHxy;\nattribute vec4 aNextHzLxyz;\nattribute vec4 aPreOrientation;\nattribute vec4 aNextOrientation;\nattribute vec4 aColorAndPickColor;\nattribute vec3 aPreHpr;\nattribute vec3 aNextHpr;\nattribute vec3 aScale;\nuniform vec3 uOffset;\nuniform mat4 uGeoMatrix;\nuniform float uInterval;\nuniform float uFilterMode;\nuniform float uMaxVisibleDistance;\nuniform float uFilterPixel;\nuniform float uRadius;\nvarying vec4 vPositionMC;\nvarying vec2 vTexCoord;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvarying vec3 vNormalEC;\nvarying mat4 vModelMatrix;\n\nvec4 vertexColor = vec4(1.0);\nvec4 quaternionfromAxisAngle(vec3 axis, float angle)\n{\n float halfAngle = angle * 0.5;\n float s = sin(halfAngle);\n vec3 fromAxis = normalize(axis);\n return vec4(fromAxis * s, cos(halfAngle));\n}\nvec4 quaternionMultiply(vec4 left, vec4 right)\n{\n float x = left.w * right.x + left.x * right.w + left.y * right.z - left.z * right.y;\n float y = left.w * right.y - left.x * right.z + left.y * right.w + left.z * right.x;\n float z = left.w * right.z + left.x * right.y - left.y * right.x + left.z * right.w;\n float w = left.w * right.w - left.x * right.x - left.y * right.y - left.z * right.z;\n return vec4(x, y, z, w);\n}\nmat4 rotationFromQuaternion(vec4 q)\n{\n float x2 = q.x * q.x;\n float xy = q.x * q.y;\n float xz = q.x * q.z;\n float xw = q.x * q.w;\n float y2 = q.y * q.y;\n float yz = q.y * q.z;\n float yw = q.y * q.w;\n float z2 = q.z * q.z;\n float zw = q.z * q.w;\n float w2 = q.w * q.w;\n float m00 = x2 - y2 - z2 + w2;\n float m01 = 2.0 * (xy - zw);\n float m02 = 2.0 * (xz + yw);\n float m10 = 2.0 * (xy + zw);\n float m11 = -x2 + y2 - z2 + w2;\n float m12 = 2.0 * (yz - xw);\n float m20 = 2.0 * (xz - yw);\n float m21 = 2.0 * (yz + xw);\n float m22 = -x2 - y2 + z2 + w2;\n return mat4(m00, m10, m20, 0.0, m01, m11, m21, 0.0, m02, m12, m22, 0.0, 0.0, 0.0, 0.0, 1.0);\n}\nvec4 lerp(vec4 start, vec4 end, float t)\n{\n vec4 tmp = end * t;\n vec4 result = start * (1.0 - t);\n return result + tmp;\n}\nvec4 slerp(vec4 start, vec4 end, float t)\n{\n float dot = dot(start, end);\n vec4 r = end;\n if(dot < 0.0){\n dot = -dot;\n r = end * -1.0;\n }\n if(1.0 - dot < 0.000001){\n return mix(start, r, t);\n }\n float theta = acos(dot);\n float angle = (1.0 - t) * theta;\n vec4 scaledP = start * sin(angle);\n vec4 scaledR = r * (sin(t * theta));\n vec4 result = scaledP + scaledR;\n return result * (1.0 / sin(theta));\n}\nfloat filterTest(vec3 rte, float radius)\n{\n if(uFilterMode > 0.0)\n {\n float distance = length(rte);\n float theta = czm_piOverFour * 0.5;\n float screenPix = max(czm_globeDepthTextureDim.x, czm_globeDepthTextureDim.y) * 0.5;\n float lamat = screenPix / tan(theta);\n return lamat * radius / distance > uFilterPixel ? 1.0 : 0.0;\n }\n return length(rte) < uMaxVisibleDistance ? 1.0 : 0.0;\n}\nvoid main()\n{\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n vec3 prePosHigh = aPreHxyzLx.xyz;\n vec3 prePosLow = vec3(aPreHxyzLx.w, aPreLyzNextHxy.xy);\n vec3 nextPosHigh = vec3(aPreLyzNextHxy.zw, aNextHzLxyz.x);\n vec3 nextPosLow = aNextHzLxyz.yzw;\n vTexCoord = aTexCoord0.xy;\n vec4 vertexPos = aPosition - vec4(uOffset.xyz,0.0);\n //vertexPos.xyz *= aScale;\n vec4 positionMC = uGeoMatrix * vertexPos;\n vec4 preRte = czm_translateRelativeToEye(prePosHigh,prePosLow);\n vec4 nextRte = czm_translateRelativeToEye(nextPosHigh,nextPosLow);\n vec4 rte = mix(preRte, nextRte, uInterval);\n float show = filterTest(rte.xyz, uRadius * aScale.x);\n vec3 hpr = mix(aPreHpr, aNextHpr, uInterval);\n vec4 rollQuaternion = quaternionfromAxisAngle(vec3(1.0, 0.0, 0.0), hpr.z);\n vec4 pitchQuaternion = quaternionfromAxisAngle(vec3(0.0, 1.0, 0.0), -hpr.y);\n vec4 headingQuaternion = quaternionfromAxisAngle(vec3(0.0, 0.0, 1.0), -hpr.x);\n vec4 q = quaternionMultiply(rollQuaternion, pitchQuaternion);\n q = quaternionMultiply(headingQuaternion, q);\n mat4 rotationMat = rotationFromQuaternion(q);\n vec4 orientation = slerp(aPreOrientation, aNextOrientation, uInterval);\n mat3 velocityMat = mat3(rotationFromQuaternion(orientation)); mat3 rotationMatrix = velocityMat * mat3(rotationMat); mat4 scaleMatrix = mat4(aScale.x, 0, 0, 0, 0, aScale.y, 0, 0, 0, 0, aScale.z, 0, 0, 0, 0, 1);\n mat4 worldMatrix;\n worldMatrix[0] = vec4(rotationMatrix[0], 0.0);\n worldMatrix[1] = vec4(rotationMatrix[1], 0.0);\n worldMatrix[2] = vec4(rotationMatrix[2], 0.0);\n worldMatrix[3] = vec4(rte.xyz, 1.0);\n mat4 modelMatrix = worldMatrix * scaleMatrix;\n vModelMatrix = modelMatrix * uGeoMatrix;\n vertexPos = modelMatrix * positionMC;\n vertexPos.w = 1.0;\n vPositionMC.xyz = rotationMatrix * positionMC.xyz;\n vPositionMC.w = 0.0;\n gl_Position = show * czm_modelViewProjectionRelativeToEye * vertexPos;\n vec4 color, pickColor;\n color.xy = czm_decompressTextureCoordinates(aColorAndPickColor.x);\n color.zw = czm_decompressTextureCoordinates(aColorAndPickColor.y);\n pickColor.xy = czm_decompressTextureCoordinates(aColorAndPickColor.z);\n pickColor.zw = czm_decompressTextureCoordinates(aColorAndPickColor.w);\n vColor = vertexColor * color;\n#ifdef HAS_NORMAL\n if(length(aNormal) > 0.8)\n {\n vec3 normal = rotationMatrix * aNormal;\n mat4 realModelViewMatrix4 = czm_view * vModelMatrix;\n realModelViewMatrix4 = czm_inverseMatrix(realModelViewMatrix4);\n mat3 realModelViewMatrix3 = mat3(realModelViewMatrix4);\n realModelViewMatrix3 = czm_transpose(realModelViewMatrix3);\n vNormalEC = normalize(realModelViewMatrix3 * aNormal);\n vPositionMC.w = 1.0;\n }\n#endif\n vPickColor = pickColor;\n}",_0x2e4cb8=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x21c4b5=_0x2e4cb8(void 0,(function(){return _0x21c4b5.toString().search("(((.+)+)+)+$").toString().constructor(_0x21c4b5).search("(((.+)+)+)+$")}));_0x21c4b5();var _0xd70f2=34,_0x27d880=new e$1z(.7,.7,1,1),_0x11ef21={UNLOAD:0,LOADING:1,LOADED:2,PARSING:3,READY:4,FAILED:5};function _0x3239f2(e,t){n$1e.defined("context",e),n$1e.defined("context",t),Array.isArray(t)||(t=[t]),this._context=e,this._gl=e._gl,this._updateInterval=1e3,this._xmlParser=new f$10,this._visible=!0,this._type=ai$2.INSTANCED_LAYER,this._group={};for(var i=0,n=t.length;i<n;i++){var r=t[i];n$1e.typeOf.string("url",r),this._group[r]={url:r,ready:!1,visible:!0,pickEnable:!0,cullEnabled:!1,polygonOffset:{enabled:!1,factor:0,units:0},cullFace:k$F.BACK,loadState:_0x11ef21.UNLOAD,buffer:void 0,offset:new a$11,radius:0,instanceCount:0,stateList:new e$1F,instanceList:new e$1F,removedList:new e$1F,renderEntities:[],boundingSphere:new c$19,beginTime:-1,interval:0}}this._maxVisibleAltitude=Number.MAX_VALUE,this._maxVisibleDistance=Number.MAX_VALUE,this._filterMode=_0x2b4bc7.DISTANCE_FROM_EYE_POINT,this._filterPixel=0,this._enableLocalOffset=!0,this._visibleViewport=4095,null!==e.s3tc?this._supportCompressType=1:null!==e.pvrtc?this._supportCompressType=2:null!==e.etc1&&(this._supportCompressType=3),this._shadowType=_0x3df1e1.NONE}function _0x26fd1f(e){return e._shadowType==_0x3df1e1.SELECTION||e._shadowType==_0x3df1e1.ALL}function _0x463e46(e){e._times.length>3&&(e._times.splice(0,1),e._values.splice(0,e._packedLength))}function _0x4d1a05(e,t,i){for(var n=0;n<e._times.length;n++){var r=o$10.addSeconds(t,n*i,new o$10);e._times[n]=r}}function _0x359139(e,t){for(var i=o$10.now(),n=0,r=e.stateList.length;n<r;n++){var o=e.stateList.values[n];_0x4d1a05(o.position._property,i,t),_0x4d1a05(o.heading,i,t),_0x4d1a05(o.pitch,i,t),_0x4d1a05(o.roll,i,t),_0x4d1a05(o.scale,i,t),_0x4d1a05(o.color,i,t)}}function _0x5bca05(e){var t={};return t$$(e.a_position)&&(t.aPosition=e.a_position.index),t$$(e.a_normal)&&(t.aNormal=e.a_normal.index),t$$(e.a_vertexColor)&&(t.aColor=e.a_vertexColor.index),t$$(e.a_texcoord_0)&&(t.aTexCoord0=e.a_texcoord_0.index),t$$(e.a_texcoord0)&&(t.aTexCoord0=e.a_texcoord0.index),t}function _0x23cdd8(e,t,i,n){var r=t.buffer;if(!t$$(r)){var o=0===t.instanceCount?1:t.instanceCount,a=4*_0xd70f2*o;(r=u$Y.createVertexBuffer({context:e,sizeInBytes:a,usage:A$13.DYNAMIC_DRAW})).vertexArrayDestroyable=!1,t.buffer=r}_0x4a93e4(r,i,n,Object.keys(i).length)}Object.defineProperties(_0x3239f2.prototype,{updateInterval:{get:function(){return this._updateInterval},set:function(e){this._updateInterval=e}},group:{get:function(){return this._group}},visible:{get:function(){return this._visible},set:function(e){this._visible=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){!t$$(e)||(this._maxVisibleAltitude=e)}},type:{get:function(){return this._type}},enableLocalOffset:{get:function(){return this._enableLocalOffset},set:function(e){this._enableLocalOffset=e}},maxVisibleDistance:{get:function(){return this._maxVisibleDistance},set:function(e){n$1e.typeOf.number("maxVisibleDistance",e),this._maxVisibleDistance=e}},filterMode:{get:function(){return this._filterMode},set:function(e){n$1e.typeOf.number("filterMode",e),this._filterMode=e}},filterPixel:{get:function(){return this._filterPixel},set:function(e){n$1e.typeOf.number("filterPixel",e),this._filterPixel=e}},shadowType:{get:function(){return this._shadowType},set:function(e){this._shadowType!==e&&(this._shadowType=e,this._updateShadow(this))}}}),_0x3239f2.prototype.setPolygonOffset=function(e,t,i){n$1e.typeOf.string("dynamicLayer setPolygonoffset url",e),n$1e.typeOf.number("dynamicLayer setPolygonoffset factor",t),n$1e.typeOf.number("dynamicLayer setPolygonoffset units",i);var n=this._group[e];if(t$$(n)&&(n.polygonOffset.factor!==t||n.polygonOffset.units!==i)&&(n.polygonOffset={enabled:!0,factor:e$1Y(t,0),units:e$1Y(i,0)},n.ready))for(var r=0,o=n.renderEntities.length;r<o;r++){var a=n.renderEntities[r].command,s=p$1a.getState(a.renderState);s.polygonOffset={enabled:!0,factor:e$1Y(t,0),units:e$1Y(i,0)},a.renderState=p$1a.fromCache(s)}},_0x3239f2.prototype.update=function(e){if(this._visible&&e._fboState.frameBufferType!==B$y.NORMAL_AND_DEPTH){var t=!0;if(e.multiViewportIndex>-1)t=this.getVisibleInViewport(e.multiViewportIndex);this._frameState=e,this._picking=e.passes.pick;var i=e.camera.positionCartographic.height<this._maxVisibleAltitude;for(var n in this._group)if(this._group.hasOwnProperty(n)){var r=this._group[n];if(r.ready){if(!r.visible||(this._picking||(_0x4eb4dc(e,this,r),_0x4e2f43(r,e)),r.instanceCount<1)||!i||!t)continue;for(var o=0,a=r.renderEntities.length;o<a;o++){var s=r.renderEntities[o].command;s.instanceCount=r.instanceCount,s.boundingVolume=r.boundingSphere,e.commandList.push(s)}}else _0x5cb2da(e,this,n)}}},_0x3239f2.prototype.setCullEnabled=function(e,t){n$1e.typeOf.string("dynamicLayer setCullEnabled url",e),t=e$1Y(t,k$F.BACK);var i=this._group[e];if(t$$(i)&&(!i.cullEnabled||i.cullFace!==t)&&(i.cullEnabled=!0,i.cullFace=t,i.ready))for(var n=0,r=i.renderEntities.length;n<r;n++){var o=i.renderEntities[n].command,a=p$1a.getState(o.renderState);a.cull.enabled=!0,a.cull.face=t,o.renderState=p$1a.fromCache(a)}},_0x3239f2.prototype.getCullEnabled=function(e){n$1e.typeOf.string("dynamicLayer getCullEnabled url",e);var t=this._group[e];if(t$$(t))return t.cullEnabled},_0x3239f2.prototype.clear=function(e,t){i$1b("DynamicLayer3D.prototype.clear","clear() will be deprecated, please use clearState()"),this.clearState(e,t)},_0x3239f2.prototype.clearAll=function(){i$1b("DynamicLayer3D.prototype.clearAll","clearAll() will be deprecated, please use clearAllState()"),this.clearAllState()},_0x3239f2.prototype.clearAllState=function(){for(var e in this._group)this._group.hasOwnProperty(e)&&(this._group[e].stateList.removeAll(),this._group[e].instanceList.removeAll(),_0x559a08(this,this._group[e]))},_0x3239f2.prototype.clearState=function(e,t){n$1e.typeOf.string("dynamicLayer3D.clear url",e),n$1e.defined("dynamicLayer3D.clear ids",t),Array.isArray(t)||(t=[t]);var i=this._group[e];if(t$$(i)){var n=i.stateList,r=i.instanceList;if(t$$(n)&&t$$(r)){for(var o,a=0,s=t.length;a<s;a++)o=t[a],n.contains(o)&&n.remove(o),r.contains(o)&&r.remove(o);_0x559a08(this,i)}}},_0x3239f2.prototype.deleteObjects=function(e,t){n$1e.typeOf.string("dynamicLayer3D.delete url",e),n$1e.defined("dynamicLayer3D.delete ids",t),Array.isArray(t)||(t=[t]);var i=this._group[e];if(t$$(i)){var n=i.instanceList,r=i.removedList,o=i.stateList;if(t$$(n)&&t$$(r)&&t$$(o)){for(var a,s=0,l=t.length;s<l;s++)a=t[s],o.remove(a),n.contains(a)&&(n.remove(a),r.set(a,!0));_0x559a08(this,i)}}},_0x3239f2.prototype.deleteAllObjects=function(){for(var e in this._group)if(this._group.hasOwnProperty(e)){for(var t=this._group[e],i=t.instanceList,n=Object.keys(i._hash),r=n.length;r--;)t.removedList.set(n[r],!0);i.removeAll(),t.stateList.removeAll(),_0x559a08(this,t)}},_0x3239f2.prototype._updateShadow=function(e){var t=_0x26fd1f(e),i=e._group;for(var n in i){var r=i[n];if(r.ready)for(var o=0,a=r.renderEntities.length;o<a;o++){var s=r.renderEntities[o];s.command.castShadows=t,s.command.receiveShadows=t}}},_0x3239f2.prototype.setVisibleByUrl=function(e,t){var i=this._group[e];t$$(i)&&(i.visible=t)},_0x3239f2.prototype.setPickEnable=function(e,t){this._group[e].pickEnable=t},_0x3239f2.prototype.updateObjectWithModel=function(e,t){if(n$1e.typeOf.string("url",e),Array.isArray(t)){var i=this._group[e];if(t$$(i)){t$$(i.stateList)||(i.stateList=new e$1F);for(var n,r=0,o=t.length;r<o;r++)if((n=t[r])instanceof _0x37527e){var a=n.id;if(i.removedList.contains(a))continue;var s=i.stateList.get(a);t$$(s)||(i.offset=a$11.clone(n.offset,i.offset),i.stateList.set(a,{position:new o$v,scale:new g$o(a$11),heading:new g$o(Number),pitch:new g$o(Number),roll:new g$o(Number),color:new g$o(e$1z),offset:n.offset,description:n.description,lockOrientation:n.lockOrientation,id:a}),(s=i.stateList.get(a)).position.setInterpolationOptions({interpolationDegree:10}),s.position.backwardExtrapolationType=_0x2f1e09.HOLD,s.position.forwardExtrapolationType=_0x2f1e09.HOLD,s.scale.backwardExtrapolationType=_0x2f1e09.HOLD,s.scale.forwardExtrapolationType=_0x2f1e09.HOLD,s.heading.backwardExtrapolationType=_0x2f1e09.HOLD,s.heading.forwardExtrapolationType=_0x2f1e09.HOLD,s.pitch.backwardExtrapolationType=_0x2f1e09.HOLD,s.pitch.forwardExtrapolationType=_0x2f1e09.HOLD,s.roll.backwardExtrapolationType=_0x2f1e09.HOLD,s.roll.forwardExtrapolationType=_0x2f1e09.HOLD,s.color.backwardExtrapolationType=_0x2f1e09.HOLD,s.color.forwardExtrapolationType=_0x2f1e09.HOLD,s.startDirection=n.startDirection);var l=o$10.now(),u=a$11.fromDegrees(n.longitude,n.latitude,n.altitude);_0x463e46(s.position._property),_0x463e46(s.heading),_0x463e46(s.pitch),_0x463e46(s.roll),_0x463e46(s.scale),_0x463e46(s.color),s.position.addSample(l,u),s.heading.addSample(l,n.heading),s.pitch.addSample(l,n.pitch),s.roll.addSample(l,n.roll),s.scale.addSample(l,n.scale),s.color.addSample(l,n.color),s.lockOrientation=n.lockOrientation}}}},_0x3239f2.prototype.setUnSelected=function(){var e=this._group;if(t$$(e))for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];if(!t$$(i.instanceList)||i.instanceCount<1||!i.pickEnable)continue;for(var n=i.instanceList,r=0;r<n.length;r++){var o=n.values[r];t$$(o)&&o.setUnSelected()}}},_0x3239f2.prototype.getVisibleInViewport=function(e){return!(e>8)&&1<<e&this._visibleViewport},_0x3239f2.prototype.setVisibleInViewport=function(e,t){e>8||(this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport)};var _0x137c66=new a$10(1,1,1,1);function _0x440599(e,t,i){i.localMatrix=i.modelMatrix.clone();var n=i.uniformMap,r={uInterval:function(){return e.interval},uAmbientColor:function(){return _0x137c66},uDiffuseColor:function(){return _0x137c66},uSpecularColor:function(){return _0x137c66},uShininess:function(){return 1},uPicking:function(){return t._picking},uGeoMatrix:function(){return i.localMatrix},uFilterMode:function(){return t.filterMode},uMaxVisibleDistance:function(){return t.maxVisibleDistance},uFilterPixel:function(){return t.filterPixel},uRadius:function(){return i.boundingVolume.radius},uOffset:function(){return e.offset}};return t$$(n.u_baseColorTexture)?r.uTexture=n.u_baseColorTexture:t$$(n.u_diffuse)&&(r.uTexture=n.u_diffuse),t$$(n.u_specular)&&(r.uSpecularColor=n.u_specular),t$$(n.u_shininess)&&(r.uShininess=n.u_shininess),r}function _0x4e2f43(e,t){if(t$$(e.model)){e.boundingSphere=e.boundingSphere.clone(),e.model.updateAnimation(t);for(var i=e.model._nodeCommands,n=i.length,r=0;r<n;++r){var o=i[r].command;o.localMatrix=o.modelMatrix,o.modelMatrix=c$1a.IDENTITY.clone()}}}function _0x671cfc(e,t){for(var i=t._context,n=e.model._nodeCommands,r=n.length,o=[],a=0;a<r;++a){var s=n[a].command;t._shadowType==_0x3df1e1.ALL||t._shadowType==_0x3df1e1.SELECTION?(s.castShadows=!0,s.receiveShadows=!0):(s.castShadows=!1,s.receiveShadows=!1),s.pickId="vPickColor",s.instanceCount=e.instanceCount,s.pass=we$l.S3MTiles+2,s.renderState=_0x1beaf4(e);var l=s.vertexArray,u=l._attributes,c=l.indexBuffer;if(u.length<9){var h=_0x5bca05(s.shaderProgram.vertexAttributes);_0x23cdd8(i,e,h,u),s.vertexArray=new x$18({context:i,attributes:u,indexBuffer:c})}var d=new a$O({name:"DynamicLayerVertex",sources:[_0x268086]}),f=new a$O({name:"S3ModelFP",sources:[_0x29dd65]});if(t$$(h.aColor)&&d.defines.push("VertexColor"),t$$(h.aNormal)&&(d.defines.push(H$r.HAS_NORMAL),f.defines.push(H$r.HAS_NORMAL)),t$$(h.aTexCoord0)&&(d.defines.push("TEXTURE"),f.defines.push("TEXTURE")),t$$(t._frameState.lightSource)){var p=t._frameState.lightSource.directionalLight;d.defines.push(H$r.DIR_LIGHTS+p.length),f.defines.push(H$r.DIR_LIGHTS+p.length);var _=t._frameState.lightSource.pointLight;d.defines.push(H$r.POINT_LIGHTS+_.length),f.defines.push(H$r.POINT_LIGHTS+_.length);var m=t._frameState.lightSource.spotLight;d.defines.push(H$r.SPOT_LIGHTS+m.length),f.defines.push(H$r.SPOT_LIGHTS+m.length);var $=t._frameState.lightSource.hemisphereLight;f.defines.push(H$r.HEMISPHERE_LIGHTS+$.length)}s.shaderProgram=p$15.fromCache({context:i,vertexShaderSource:d,fragmentShaderSource:f,attributeLocations:h});var g=_0x440599(e,t,s);g=s$1n(g,t._frameState.lightSource.createUniformMap()),s.uniformMap=g,s.modelMatrix=c$1a.IDENTITY.clone(),e.renderEntities.push({command:s,attributes:u,indexBuffer:c}),o.push(s.boundingVolume)}var y=new c$19;c$19.fromBoundingSpheres(o,y),e.oriBoundingSphere=y}function _0x5cb2da(e,t,i){var n=t._group[i],r=n.loadState;if(i.indexOf(".gltf")>0||i.indexOf(".glb")>0)_0x11ef21.UNLOAD==r&&(t$$(n.model)||(n.model=L$D.fromGltf({url:i,incrementallyLoadTextures:!1})),n.model.update(e),n.model.ready&&(n.ready=!0,n.loadState=_0x11ef21.READY,_0x359139(n,t.updateInterval/1e3),_0x671cfc(n,t),n.model.activeAnimations.addAll({loop:_0x1f6ea1.REPEAT})));else{var o=i.indexOf(".s3mb")>-1;if(_0x11ef21.UNLOAD==r){var a=m$I(i,(function(e){return u$S(e)}));t$$(a)?(n.loadState=_0x11ef21.LOADING,a.then((function(e){n.loadState=_0x11ef21.LOADED,n.contentBuffer=e}),(function(e){t$$(e)?n.loadState=_0x11ef21.FAILED:n.loadState=_0x11ef21.UNLOAD}))):n.loadState=_0x11ef21.UNLOAD}_0x11ef21.LOADED===r&&(o?_0x232341(t,n):_0x471fb9(t,n))}}function _0x4eb4dc(e,t,i){if(!(i.stateList.length<1)){var n=t._context,r=!1;i.beginTime<0&&(r=!0,i.beginTime=window.performance.now());var o=yt$9()-i.beginTime,a=t._updateInterval;if(i.interval=o/a,i.interval=n$1d.clamp(i.interval,0,1),r||o>=a){i.interval=0;var s=o$10.now();o=o$10.addSeconds(s,-t._updateInterval/1e3,new o$10);i.beginTime=window.performance.now();for(var l,u=i.stateList,c=[],h=0;h<u.length;h++){var d=u.values[h];l=d.id;var f=i.instanceList.get(l);if(i.removedList.contains(l))return;t$$(f)||(i.instanceList.set(l,new _0x2c366d(n,d,i,l)),f=i.instanceList.get(l)),f.update(e,d,o,c)}if(c.length>0){var p=c$19.fromBoundingSpheres(c,new c$19);c$19.clone(p,i.boundingSphere)}i.instanceCount=c.length,_0x559a08(t,i)}}}function _0x559a08(e,t){var i=t.instanceCount;if(!(i<1)){var n=_0xd70f2*i,r=t.buffer,o=e._context,a=C$12.getSizeInBytes(C$12.FLOAT);if(r.sizeInBytes/(a*_0xd70f2)<i){t.buffer&&t.buffer.destroy(),(r=u$Y.createVertexBuffer({context:o,sizeInBytes:n*a,usage:A$13.DYNAMIC_DRAW})).vertexArrayDestroyable=!1,t.buffer=r;for(var s=0,l=t.renderEntities.length;s<l;s++){var u=t.renderEntities[s],c=u.command;if(t$$(c)){c.vertexArray.isDestroyed()||c.vertexArray.destroy();for(var h=0;h<u.attributes.length;h++){var d=u.attributes[h];t$$(d.instanceDivisor)&&d.instanceDivisor>0&&(d.vertexBuffer=t.buffer)}c.vertexArray=new x$18({context:o,attributes:u.attributes,indexBuffer:u.indexBuffer})}}}var f=new Float32Array(n),p=t.instanceList,_=0;for(s=0,l=p.length;s<l;s++){var m=p.values[s];if(t$$(m)&&m._ready){m._index=_;var $=t$R.fromCartesian(m._prePosition),g=$.high,y=$.low,v=t$R.fromCartesian(m._nextPosition),x=v.high,b=v.low,S=m._preOrientation,w=m._nextOrientation,C=m._pickColor,T=m._color,P=m._scale,E=m._preHpr,A=m._nextHpr,L=new e$1z;L.red=r$P.compressTextureCoordinates({x:T.red,y:T.green}),L.green=r$P.compressTextureCoordinates({x:T.blue,y:T.alpha}),L.blue=r$P.compressTextureCoordinates({x:C.red,y:C.green}),L.alpha=r$P.compressTextureCoordinates({x:C.blue,y:C.alpha}),_0x20e7ec(f,_,g,y,x,b,S,w,L,E,A,P),_++}}r.copyFromArrayView(f,0)}}function _0x20e7ec(e,t,i,n,r,o,a,s,l,u,c,h){var d=0;e[(t*=_0xd70f2)+d++]=i.x,e[t+d++]=i.y,e[t+d++]=i.z,e[t+d++]=n.x,e[t+d++]=n.y,e[t+d++]=n.z,e[t+d++]=r.x,e[t+d++]=r.y,e[t+d++]=r.z,e[t+d++]=o.x,e[t+d++]=o.y,e[t+d++]=o.z,e[t+d++]=a.x,e[t+d++]=a.y,e[t+d++]=a.z,e[t+d++]=a.w,e[t+d++]=s.x,e[t+d++]=s.y,e[t+d++]=s.z,e[t+d++]=s.w,e[t+d++]=l.red,e[t+d++]=l.green,e[t+d++]=l.blue,e[t+d++]=l.alpha,e[t+d++]=u.heading,e[t+d++]=u.pitch,e[t+d++]=u.roll,e[t+d++]=c.heading,e[t+d++]=c.pitch,e[t+d++]=c.roll,e[t+d++]=h.x,e[t+d++]=h.y,e[t+d++]=h.z}var _0x520c33=new a$U,_0x80029b=new a$11;function _0x2c366d(e,t,i,n){this.type=ai$2.INSTANCED_OBJECT,this._ownerGroup=i,this._id=n,this._index=-1,this._description=t.description;var r=t.position.getValue(0);t$$(r)||(r=new a$11),this._scale=a$11.clone(t.scale.getValue(0));var o=a$11.maximumComponent(this._scale);this._offset=t.offset,this._lockOrientation=t.lockOrientation,this._preOrientation=new a$U,this._nextOrientation=new a$U,this._orientation=void 0,this._velocityOrientation=new e$F(t.position);var a=m$13.headingPitchRollToFixedFrame(r,new e$1L(t.startDirection,0,0),n$1c.WGS84,m$13.eastNorthUpToFixedFrame,new c$1a),s=c$1a.getRotation(a,new r$W),l=a$U.fromRotationMatrix(s);a$U.clone(l,this._preOrientation),a$U.clone(this._preOrientation,this._nextOrientation);var u=a$11.multiplyByScalar(this._offset,o,new a$11);this._prePosition=c$1a.multiplyByPoint(a,u,new a$11),this._nextPosition=a$11.clone(this._prePosition);var c=t.heading.getValue(0),h=t.pitch.getValue(0),d=t.roll.getValue(0);this._preHpr=new e$1L(c,h,d),this._nextHpr=e$1L.clone(this._preHpr),this._dynamicColor=t.color.getValue(0);var f=i.oriBoundingSphere.radius*o;this._boundingSphere=new c$19(this._prePosition,f);var p={id:n,primitive:this},_=e.createPickId(p);this._pickColor=_.color,this._selColor=new e$1z,this._color=e$1z.multiply(this._dynamicColor,this._selColor,new e$1z),this._isSelected=!1,this._ready=!1}function _0x471fb9(e,t){var i=t.contentBuffer;if(t$$(i)){var n={buffer:i,supportCompressType:e._supportCompressType},r=_0xb658ed.S3MTaskProcessor.scheduleTask(n,[i]);t$$(r)?(t.contentBuffer=void 0,t._loadState=_0x11ef21.PARSING,r.then((function(i){if(i.result){e._gl;for(var n=e._xmlParser.read(i.xmlDoc).firstChild,r=n.namespaceURI,o=f$10.queryFirstNode(n,"Material3Ds",r),a=f$10.queryChildNodes(o,"material",r),s={},l=e._context,u=0,c=a.length;u<c;u++){var h=a[u],d=f$10.queryStringValue(h,"name",r),f=new _0x42161c({});s[d]=f;var p=f$10.queryFirstNode(h,"Ambient",r),_=f$10.queryNumericValue(p,"AmbientR",r),m=f$10.queryNumericValue(p,"AmbientG",r),$=f$10.queryNumericValue(p,"AmbientB",r),g=f$10.queryNumericValue(p,"AmbientA",r);f._ambientColor=new e$1z(_,m,$,g);var y=f$10.queryFirstNode(h,"Diffuse",r);_=f$10.queryNumericValue(y,"DiffuseR",r),m=f$10.queryNumericValue(y,"DiffuseG",r),$=f$10.queryNumericValue(y,"DiffuseB",r),g=f$10.queryNumericValue(y,"DiffuseA",r),f._diffuseColor=new e$1z(_,m,$,g);var v=f$10.queryFirstNode(h,"Specular",r);_=f$10.queryNumericValue(v,"SpecularR",r),m=f$10.queryNumericValue(v,"SpecularG",r),$=f$10.queryNumericValue(v,"SpecularB",r),g=f$10.queryNumericValue(v,"SpecularA",r),f._specularColor=new e$1z(_,m,$,g);var x=f$10.queryNumericValue(h,"Shininess",r);f._shininess=x,f$10.queryFirstNode(h,"TransparentSorting",r),f._bTransparentSorting=f$10.queryBooleanValue(h,"TransparentSorting",r);var b=f$10.queryFirstNode(h,"texture",r),S=f$10.queryStringValue(b,"name",r),w=f$10.queryFirstNode(b,"AddressMode",r),C=f$10.queryStringValue(w,"u",r),T=f$10.queryStringValue(w,"v",r);C="TAM_WRAP"===C?j$13.REPEAT:j$13.CLAMP_TO_EDGE,T="TAM_WRAP"===T?j$13.REPEAT:j$13.CLAMP_TO_EDGE;var P=i.texturePackage[S];if(t$$(P)){var E=De$e.CreateTexture(S,l,P.width,P.height,P.nFormat,P.compressType,P.imageBuffer,!1,C,T);f._textures.push(E),0===P.compressType&&(e._supportCompressType=0)}}var A=f$10.queryFirstNode(n,"PageLods",r),L=f$10.queryNodes(A,"Geode",r);for(u=0,c=L.length;u<c;u++){for(var M=L[u],I=f$10.queryStringValue(M,"GeoDeModMatrix",r).split(","),O=0;O<16;O++)I[O]=parseFloat(I[O]);if(I=c$1a.unpack(I,0),t.enableOffset){var D=c$1a.fromTranslation(new a$11(0,0,-690));I=c$1a.multiplyTransformation(I,D,new c$1a)}for(var R=f$10.queryNodes(M,"GeoName",r),N=[],F=0,B=R.length;F<B;F++){var z=R[F].textContent.trim();N.push(z)}for(var G=[],k=new c$19,U=0;U<N.length;U++){var V=_0x3ce08a(H=(W=i.geoPackage[N[U]]).vertexPackage,I);G.push(V)}G.length>0&&(c$19.fromBoundingSpheres(G,k),t.oriBoundingSphere=k,G.length=0);for(B=0;B<N.length;B++){var W,H=(W=i.geoPackage[N[B]]).vertexPackage,Y=W.arrIndexPackage,j={};for(var q in Y){var X=Y[q];if(t$$(X)){f=s[d=X.materialCode];j[d]=f}}e.enableLocalOffset||(I=c$1a.IDENTITY),_0x11b918(e,t,H,Y,k,j,I)}t.boundingSphere=c$19.clone(k)}t.ready=!0,t.loadState=_0x11ef21.READY,_0x359139(t,e.updateInterval/1e3)}else t._loadState=_0x11ef21.UNLOAD}))):t._loadState=_0x11ef21.LOADED}else t._loadState=_0x11ef21.FAILED}function _0x232341(e,t){var i=t.contentBuffer;if(t$$(i)){if(_0xb658ed.init||_0xb658ed.initWebAssembly(),_0xb658ed.taskProcessorReady){var n=_0xb658ed.S3MBTaskProcessor.scheduleTask({buffer:i,supportCompressType:e._supportCompressType},[i]);if(!t$$(n))return void(t._loadState=_0x11ef21.LOADED);t.contentBuffer=void 0,t._loadState=_0x11ef21.PARSING,n.then((function(i){if(i.result){for(var n=e._context,r={},o=0,a=i.matrials.material.length;o<a;o++){var s=i.matrials.material[o].material,l=s.id,u=new _0x42161c({});r[l]=u,u.createCommonParamter(s),u.createPBRParamter(s);for(var c=s.textureunitstates,h=0;h<c.length;h++){var d=c[h].textureunitstate,f=d.id,p=0===d.addressmode.u?j$13.REPEAT:j$13.CLAMP_TO_EDGE,_=0===d.addressmode.v?j$13.REPEAT:j$13.CLAMP_TO_EDGE;u._texMatrix=c$1a.unpack(d.texmodmatrix);var m=i.texturePackage[f];if(t$$(m)){var $=De$e.CreateTexture(f,n,m.width,m.height,m.nFormat,m.compressType,m.imageBuffer,!1,p,_);u._textures.push($),0===m.compressType&&(e._supportCompressType=0)}}}var g=i.groupNode.pageLods;if(t$$(g))for(o=0,a=g.length;o<a;o++){for(var y=g[o].geodes[0],v=y.matrix,x=0;x<16;x++)v[x]=parseFloat(v[x]);if(v=c$1a.unpack(v,0),t.enableOffset){var b=c$1a.fromTranslation(new a$11(0,0,-690));v=c$1a.multiplyTransformation(v,b,new c$1a)}for(var S=y.skeletonNames,w=[],C=0,T=S.length;C<T;C++){var P=S[C].trim();w.push(P)}var E=[],A=new c$19;for(h=0;h<w.length;h++){var L=_0x3ce08a(I=(M=i.geoPackage[w[h]]).vertexPackage,v);E.push(L)}E.length>0&&(c$19.fromBoundingSpheres(E,A),t.oriBoundingSphere=A,E.length=0);for(C=0,T=w.length;C<T;C++){P=w[C];var M,I=(M=i.geoPackage[P]).vertexPackage,O=M.arrIndexPackage,D=O[0];if(t$$(D)){var R={};u=r[l=D.materialCode];R[l]=u,e.enableLocalOffset||(v=c$1a.IDENTITY),_0x11b918(e,t,I,O,A,R,v)}}t.boundingSphere=c$19.clone(A)}t.ready=!0,t.loadState=_0x11ef21.READY,_0x359139(t,e.updateInterval/1e3)}else t._loadState=_0x11ef21.UNLOAD}))}}else t._loadState=_0x11ef21.FAILED}function _0x3ce08a(e,t){for(var i=[],n=new c$19,r=new a$11,o=(new a$11,e.vertexAttributes[0]),a=o.componentsPerAttribute,s=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4),l=0;l<e.verticesCount;l++)a$11.fromArray(s,a*l,r),i.push(a$11.clone(r));return c$19.fromPoints(i,n),i.length=0,c$19.transform(n,t,n),n}function _0x1beaf4(e){return p$1a.fromCache({cull:{enabled:e.cullEnabled,face:e.cullFace},polygonOffset:{enabled:e.polygonOffset.enabled,factor:e.polygonOffset.factor,units:e.polygonOffset.units},depthTest:{enabled:!0},blending:Ee$s.ALPHA_BLEND})}function _0x205a9b(e,t,i){for(var n=i.vertexAttributes,r=0,o=n.length;r<o;r++){var a=n[r];!t$$(a.typedArray)||(a.vertexBuffer=u$Y.createVertexBuffer({context:t,typedArray:a.typedArray,usage:A$13.STATIC_DRAW}),a.vertexBuffer.vertexArrayDestroyable=!1,a.typedArray=null,delete a.typedArray)}var s=i.attrLocation,l=Object.keys(s).length,u=e.buffer;if(!t$$(u)){var c=0===e.instanceCount?1:e.instanceCount,h=4*_0xd70f2*c;(u=u$Y.createVertexBuffer({context:t,sizeInBytes:h,usage:A$13.DYNAMIC_DRAW})).vertexArrayDestroyable=!1,e.buffer=u}return _0x4a93e4(u,s,n,l),{attributes:n,attrLocation:s}}function _0x4a93e4(e,t,i,n){var r=n,o=0,a=C$12.getSizeInBytes(C$12.FLOAT);t.aPreHxyzLx=r++,i.push({index:t.aPreHxyzLx,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0xd70f2,instanceDivisor:1}),o+=4*a,t.aPreLyzNextHxy=r++,i.push({index:t.aPreLyzNextHxy,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0xd70f2,instanceDivisor:1}),o+=4*a,t.aNextHzLxyz=r++,i.push({index:t.aNextHzLxyz,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0xd70f2,instanceDivisor:1}),o+=4*a,t.aPreOrientation=r++,i.push({index:t.aPreOrientation,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0xd70f2,instanceDivisor:1}),o+=4*a,t.aNextOrientation=r++,i.push({index:t.aNextOrientation,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0xd70f2,instanceDivisor:1}),o+=4*a,t.aColorAndPickColor=r++,i.push({index:t.aColorAndPickColor,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0xd70f2,instanceDivisor:1}),o+=4*a,t.aPreHpr=r++,i.push({index:t.aPreHpr,vertexBuffer:e,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0xd70f2,instanceDivisor:1}),o+=3*a,t.aNextHpr=r++,i.push({index:t.aNextHpr,vertexBuffer:e,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0xd70f2,instanceDivisor:1}),o+=3*a,t.aScale=r++,i.push({index:t.aScale,vertexBuffer:e,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0xd70f2,instanceDivisor:1}),o+=3*a}function _0x11b918(e,t,i,n,r,o,a){var s=e._context,l=_0x205a9b(t,s,i),u=l.attributes,c=l.attrLocation,h=we$l.S3MTiles+2,d=_0x1beaf4(t),f=i.verticesCount,p=n[0];if(t$$(p)){var _=fe$u.UNSIGNED_SHORT;(1===p.indexType||f>=n$1d.SIXTY_FOUR_KILOBYTES)&&s.elementIndexUint&&(_=fe$u.UNSIGNED_INT);var m=u$Y.createIndexBuffer({context:s,typedArray:p.indicesTypedArray,usage:A$13.STATIC_DRAW,indexDatatype:_});m.vertexArrayDestroyable=!1;var $=o[p.materialCode]||_0x42161c.Default,g=new s$1d({primitiveType:H$11.TRIANGLES,boundingVolume:r,pass:h,owner:e});e._shadowType===_0x3df1e1.ALL||e._shadowType===_0x3df1e1.SELECTION?(g.castShadows=!0,g.receiveShadows=!0):(g.castShadows=!1,g.receiveShadows=!1),g.pickId="vPickColor",g.instanceCount=t.instanceCount,g.vertexArray=new x$18({context:s,attributes:u,indexBuffer:m});var y=new a$O({name:"DynamicLayerVertex",sources:[_0x268086]}),v=new a$O({name:"S3ModelFP",sources:[_0x29dd65]}),x=t$$(c.aTexCoord0)&&$._textures.length>0;if(0===e._supportCompressType&&v.defines.push("FLIP_Y"),t$$(c.aColor)&&y.defines.push("VertexColor"),t$$(c.aNormal)&&(y.defines.push(H$r.HAS_NORMAL),v.defines.push(H$r.HAS_NORMAL)),x&&(y.defines.push("TEXTURE"),v.defines.push("TEXTURE")),t$$(e._frameState.lightSource)){var b=e._frameState.lightSource.directionalLight;y.defines.push(H$r.DIR_LIGHTS+b.length),v.defines.push(H$r.DIR_LIGHTS+b.length);var S=e._frameState.lightSource.pointLight;y.defines.push(H$r.POINT_LIGHTS+S.length),v.defines.push(H$r.POINT_LIGHTS+S.length);var w=e._frameState.lightSource.spotLight;y.defines.push(H$r.SPOT_LIGHTS+w.length),v.defines.push(H$r.SPOT_LIGHTS+w.length);var C=e._frameState.lightSource.hemisphereLight;v.defines.push(H$r.HEMISPHERE_LIGHTS+C.length)}g.shaderProgram=p$15.fromCache({context:s,vertexShaderSource:y,fragmentShaderSource:v,attributeLocations:c});var T=$._diffuseColor,P=$._diffuseColor,E=$._specularColor,A=$._shininess,L=t$$(c.aNormal),M=r.radius,I={uTexture:function(){return $._textures[0]},uInterval:function(){return t.interval},uAmbientColor:function(){return T},uDiffuseColor:function(){return P},uSpecularColor:function(){return E},uShininess:function(){return A},uPicking:function(){return e._picking},uHasNormal:function(){return L},uGeoMatrix:function(){return a},uFilterMode:function(){return e.filterMode},uMaxVisibleDistance:function(){return e.maxVisibleDistance},uFilterPixel:function(){return e.filterPixel},uRadius:function(){return M},uOffset:function(){return t.offset}};I=s$1n(I,e._frameState.lightSource.createUniformMap()),g.uniformMap=I,g.renderState=d,t.renderEntities.push({command:g,attributes:u,indexBuffer:m})}}_0x2c366d.prototype.setSelected=function(){var e=this._index;if(t$$(e)&&this._ownerGroup.pickEnable&&!(e<0)&&(n$1e.typeOf.number.greaterThanOrEquals("offset",e,0),!e$1z.equals(this._selColor,_0x27d880))){this._selColor=e$1z.clone(_0x27d880),this._color=e$1z.multiply(this._selColor,this._dynamicColor,this._color);var t=new e$1z;t.red=r$P.compressTextureCoordinates({x:this._color.red,y:this._color.green}),t.green=r$P.compressTextureCoordinates({x:this._color.blue,y:this._color.alpha}),t.blue=r$P.compressTextureCoordinates({x:this._pickColor.red,y:this._pickColor.green}),t.alpha=r$P.compressTextureCoordinates({x:this._pickColor.blue,y:this._pickColor.alpha});var i=this._ownerGroup.renderEntities;if(t$$(i)&&!(i.length<1)){for(var n=0,r=i.length;n<r;n++){var o=i[n].command,a=o.shaderProgram.vertexAttributes.aColorAndPickColor.index,s=o.vertexArray.getAttribute(a),l=e*s.strideInBytes+s.offsetInBytes,u=C$12.createTypedArray(s.componentDatatype,s.componentsPerAttribute);u[0]=t.red,u[1]=t.green,u[2]=t.blue,u[3]=t.alpha,s.vertexBuffer.copyFromArrayView(u,l)}this._isSelected=!0}}},_0x2c366d.prototype.setUnSelected=function(){var e=this._index;if(t$$(e)&&this._ownerGroup.pickEnable&&!(e<0)&&this._isSelected){this._isSelected=!1,this._selColor=e$1z.WHITE,this._color=e$1z.clone(this._dynamicColor);var t=new e$1z;t.red=r$P.compressTextureCoordinates({x:this._color.red,y:this._color.green}),t.green=r$P.compressTextureCoordinates({x:this._color.blue,y:this._color.alpha}),t.blue=r$P.compressTextureCoordinates({x:this._pickColor.red,y:this._pickColor.green}),t.alpha=r$P.compressTextureCoordinates({x:this._pickColor.blue,y:this._pickColor.alpha});var i=this._ownerGroup.renderEntities;if(t$$(i)&&!(i.length<1))for(var n=0,r=i.length;n<r;n++){var o=i[n].command,a=o.shaderProgram.vertexAttributes.aColorAndPickColor.index,s=o.vertexArray.getAttribute(a),l=e*s.strideInBytes+s.offsetInBytes,u=C$12.createTypedArray(s.componentDatatype,s.componentsPerAttribute);u[0]=t.red,u[1]=t.green,u[2]=t.blue,u[3]=t.alpha,s.vertexBuffer.copyFromArrayView(u,l)}}},_0x2c366d.prototype.update=function(e,t,i,n){var r=t.position,o=r$w.getValueOrUndefined(r,i,_0x80029b);if(t$$(o)){var a=a$11.equalsEpsilon(o,this._nextPosition,n$1d.EPSILON8)||a$11.distance(o,this._nextPosition)<.5;this._scale=a$11.clone(t.scale.getValue(i),this._scale);var s=a$11.maximumComponent(t.scale.getValue(i)),l=a$11.multiplyByScalar(this._offset,s,new a$11),u=m$13.headingPitchRollToFixedFrame(o,new e$1L,n$1c.WGS84,m$13.eastNorthUpToFixedFrame,new c$1a);if(this._prePosition=a$11.clone(this._nextPosition,this._prePosition),c$1a.multiplyByPoint(u,l,this._nextPosition),e$1L.clone(this._nextHpr,this._preHpr),this._nextHpr.heading=t.heading.getValue(i),this._nextHpr.pitch=t.pitch.getValue(i),this._nextHpr.roll=t.roll.getValue(i),this._lockOrientation=t.lockOrientation,a$U.clone(this._nextOrientation,this._preOrientation),!this._lockOrientation)if(t$$(h=a?void 0:r$w.getValueOrUndefined(this._velocityOrientation,i,_0x520c33)))this._orientation=a$U.clone(h),a$U.clone(this._orientation,this._nextOrientation);else if(t$$(this._orientation))a$U.clone(this._orientation,this._nextOrientation);else{var c=c$1a.getRotation(u,new r$W);a$U.fromRotationMatrix(c,this._nextOrientation);u=m$13.headingPitchRollToFixedFrame(o,new e$1L(t.startDirection,0,0),n$1c.WGS84,m$13.eastNorthUpToFixedFrame,new c$1a),c=c$1a.getRotation(u,new r$W);var h=a$U.fromRotationMatrix(c);this._preOrientation=h,this._nextOrientation=h}var d=t.color.getValue(i);this._dynamicColor=e$1z.clone(d),this._color=e$1z.multiply(this._dynamicColor,this._selColor,this._color),a$11.clone(this._nextPosition,this._boundingSphere.center),this._boundingSphere.radius=this._ownerGroup.oriBoundingSphere.radius*s;var f=e.cullingVolume.computeVisibility(this._boundingSphere)!==cr$4.OUTSIDE;f&&n.push(this._boundingSphere),this._ready=f}else this._ready=!1},_0x3239f2.prototype.isDestroyed=function(){return!1},_0x3239f2.prototype.destroy=function(){for(var e in this._group){var t=this._group[e];if(t.ready){for(var i=0,n=t.renderEntities.length;i<n;i++){var r=t.renderEntities[i].command;r.vertexArray=r.vertexArray&&!r.vertexArray.isDestroyed()&&r.vertexArray.destroy(),r.shaderProgram=r.shaderProgram&&r.shaderProgram.destroy()}t.renderEntities.length=0,t$$(t.stateList)&&t.stateList.removeAll()}}return this._group=void 0,s$1e(this)};var _0x422135=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x163fde=_0x422135(void 0,(function(){return _0x163fde.toString().search("(((.+)+)+)+$").toString().constructor(_0x163fde).search("(((.+)+)+)+$")}));_0x163fde();var _0x217112={UnLoad:0,Loading:1,Loaded:2,Parsing:3,Ready:4,LoadedFailed:5,ParseFailed:6},_0x2bc85d=Object.freeze(_0x217112),_0x51ad1e=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2bf69=_0x51ad1e(void 0,(function(){return _0x2bf69.toString().search("(((.+)+)+)+$").toString().constructor(_0x2bf69).search("(((.+)+)+)+$")}));function _0x36ee04(e){this.url=e,this._isGlTF=!0,this.model=void 0,this.state=_0x2bc85d.UnLoad,this.ready=!1}_0x2bf69(),_0x36ee04.prototype.isDestroyed=function(){return!1},_0x36ee04.prototype.destroy=function(){return t$$(this.model)&&!this.model.isDestroyed()&&this.model.destroy(),s$1e(this)};var _0x531000=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2370bc=_0x531000(void 0,(function(){return _0x2370bc.toString().search("(((.+)+)+)+$").toString().constructor(_0x2370bc).search("(((.+)+)+)+$")}));function _0x1fdb75(){}_0x2370bc(),_0x1fdb75.load=function(e,t){if(t$$(t.model)||(t.model=L$D.fromGltf({url:t.url,incrementallyLoadTextures:!1})),t.model.update(e._frameState),t.model.ready){t.state=_0x2bc85d.Ready,t.ready=!0;for(var i=e._skeletonTileMap.get(t.url),n=0,r=i.length;n<r;n++)i[n].dirty=!0}},_0x1fdb75.parse=function(e,t){};var _0x12a457=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x13cb17=_0x12a457(void 0,(function(){return _0x13cb17.toString().search("(((.+)+)+)+$").toString().constructor(_0x13cb17).search("(((.+)+)+)+$")}));function _0x4b234a(e,t,i,n){this.url=t,this.id=n,this.index=-1,this.type=ai$2.INSTANCED_OBJECT,this.position=a$11.clone(i.position),this.geoPosition=i$1g.fromCartesian(this.position),this.offset=e$1Y(i.offset,new a$11(0,0,0)),this.color=e$1Y(i.color,new e$1z),this.scale=e$1Y(i.scale,new a$11(1,1,1));var r=e$1Y(i.hpr,new e$1L);this.hpr=r,this.quaternion=a$U.fromHeadingPitchRoll(r),this.feature=e$1Y(i.feature,e$1Y.EMPTY_OBJECT),this.isSelected=!1,this.selectedColor=new e$1z,this.preColor=e$1z.clone(this.color),this.tile=void 0,this.instanceInfo=void 0,this.layer=void 0;var o={id:n,primitive:this},a=e.createPickId(o).color,s=new e$1z;s.x=e$1z.floatToByte(a.red),s.y=e$1z.floatToByte(a.green),s.z=e$1z.floatToByte(a.blue),s.w=e$1z.floatToByte(a.alpha),this.pickColor=s}_0x13cb17(),_0x4b234a.prototype.setSelected=function(){if(t$$(this.layer)&&this.layer.pickEnable){var e=this.index;if(t$$(e)&&!(e<0)&&!e$1z.equals(this.color,this.selectedColor)){this.color=e$1z.clone(this.selectedColor,new e$1z);var t=e$1z.multiply(this.color,this.preColor,new e$1z),i=this.instanceInfo;if(t$$(i)&&t$$(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aColor2];if(t$$(r)){var o=e*r.strideInBytes+r.offsetInBytes,a=C$12.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=t.red,a[1]=t.green,a[2]=t.blue,a[3]=t.alpha,i.instanceBuffer.copyFromArrayView(a,o),this.isSelected=!0}}}}},_0x4b234a.prototype.setUnSelected=function(){var e=this.index;if(t$$(e)&&!(e<0)&&this.isSelected){this.isSelected=!1,this.color=e$1z.clone(this.preColor,this.color);var t=this.instanceInfo;if(t$$(t)&&t$$(t.instanceBuffer)){var i=t.attributeLocation,n=t.attributes[i.aColor2];if(t$$(n)){var r=e*n.strideInBytes+n.offsetInBytes,o=C$12.createTypedArray(n.componentDatatype,n.componentsPerAttribute);o[0]=this.preColor.red,o[1]=this.preColor.green,o[2]=this.preColor.blue,o[3]=this.preColor.alpha,t.instanceBuffer.copyFromArrayView(o,r)}}}},_0x4b234a.prototype.updateOffsetPosition=function(e){if(t$$(e)){var t=this.index;this.offset=a$11.clone(e,this.offset);var i=this.instanceInfo;if(t$$(i)&&t$$(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aOffsetPosition];if(t$$(r)){var o=t*r.strideInBytes+r.offsetInBytes,a=C$12.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=this.offset.x,a[1]=this.offset.y,a[2]=this.offset.z,i.instanceBuffer.copyFromArrayView(a,o)}}}},_0x4b234a.prototype.updatePosition=function(e){if(t$$(e)){var t=this.index;if(this.position=a$11.clone(e,this.position),this.geoPosition=i$1g.fromCartesian(this.position),t$$(this.tile)&&t$$(this.tile.inverseTransform)){this.offset=c$1a.multiplyByPoint(this.tile.inverseTransform,this.position,this.offset);var i=this.instanceInfo;if(t$$(i)&&t$$(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aOffsetPosition];if(t$$(r)){var o=t*r.strideInBytes+r.offsetInBytes,a=C$12.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=this.offset.x,a[1]=this.offset.y,a[2]=this.offset.z,i.instanceBuffer.copyFromArrayView(a,o)}}}}},_0x4b234a.prototype.updateRotation=function(e){if(t$$(e)){var t=this.index;if(!e$1L.equals(this.hpr,e)){this.hpr=e$1L.clone(e,this.hpr),this.quaternion=a$U.fromHeadingPitchRoll(e,this.quaternion);var i=this.instanceInfo;if(t$$(i)&&t$$(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aQuaternion];if(t$$(r)){var o=t*r.strideInBytes+r.offsetInBytes,a=C$12.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=this.quaternion.x,a[1]=this.quaternion.y,a[2]=this.quaternion.z,a[3]=this.quaternion.w,i.instanceBuffer.copyFromArrayView(a,o)}}}}},_0x4b234a.prototype.updateColor=function(e){if(t$$(e)){var t=this.index;if(!e$1z.equals(this.color,e)){this.color=e$1z.clone(e,this.color),this.preColor=e$1z.clone(e,this.preColor);var i=this.instanceInfo;if(t$$(i)&&t$$(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aColor2];if(t$$(r)){var o=t*r.strideInBytes+r.offsetInBytes,a=C$12.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=this.color.red,a[1]=this.color.green,a[2]=this.color.blue,a[3]=this.color.alpha,i.instanceBuffer.copyFromArrayView(a,o)}}}}},_0x4b234a.prototype.updateScale=function(e){if(t$$(e)){var t=this.index;if(!a$11.equals(this.scale,e)){a$11.clone(e,this.scale);var i=this.instanceInfo;if(t$$(i)&&t$$(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aScale];if(t$$(r)){var o=t*r.strideInBytes+r.offsetInBytes,a=C$12.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=e.x,a[1]=e.y,a[2]=e.z,i.instanceBuffer.copyFromArrayView(a,o)}}}}},_0x4b234a.prototype.updateModelMatrix=function(e){var t=c$1a.getScale(e,new a$11);this.updateScale(t);var i=c$1a.setScale(e,new a$11(1,1,1),new c$1a),n=c$1a.getRotation(i,new r$W);a$U.fromRotationMatrix(n,this.quaternion);var r=e$1L.fromQuaternion(this.quaternion,new e$1L);this.updateRotation(r);var o=c$1a.getTranslation(e,new a$11);a$11.add(this.offset,o,this.offset),this.updateOffsetPosition(this.offset)},_0x4b234a.prototype.write=function(e,t){var i=this.offset,n=this.quaternion,r=this.scale,o=this.color,a=this.pickColor,s=0;e[t+s++]=i.x,e[t+s++]=i.y,e[t+s++]=i.z,e[t+s++]=n.x,e[t+s++]=n.y,e[t+s++]=n.z,e[t+s++]=n.w,e[t+s++]=r.x,e[t+s++]=r.y,e[t+s++]=r.z,e[t+s++]=o.red,e[t+s++]=o.green,e[t+s++]=o.blue,e[t+s++]=o.alpha,e[t+s++]=a.x,e[t+s++]=a.y,e[t+s++]=a.z,e[t+s++]=a.w},_0x4b234a.prototype.isDestroyed=function(){return!1},_0x4b234a.prototype.destroy=function(){s$1e(this)};var _0x3f9831=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x462481=_0x3f9831(void 0,(function(){return _0x462481.toString().search("(((.+)+)+)+$").toString().constructor(_0x462481).search("(((.+)+)+)+$")}));function _0x398ed3(e,t){this.url=e,this.stride=t,this.instances=[],this.instanceBuffer=void 0,this.attributes=void 0,this.attributeLocation=void 0,this.inverseTransform=void 0,this.dirty=!1}function _0x139fda(e,t){for(var i=e.length,n=new Float32Array(i*t),r=0;r<i;r++){var o=e[r];o.index=r;var a=r*t;o.write(n,a)}return n}function _0x2afe32(e,t,i){var n=_0x139fda(t,i),r=u$Y.createVertexBuffer({context:e,typedArray:n,usage:A$13.STATIC_DRAW});return r.vertexArrayDestroyable=!1,r}function _0x163dcf(e,t){var i=C$12.getSizeInBytes(C$12.FLOAT),n=0,r=[],o=0,a={};return a.aOffsetPosition=o++,r.push({index:a.aOffsetPosition,vertexBuffer:e,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:n,strideInBytes:i*t,instanceDivisor:1}),n+=3,a.aQuaternion=o++,r.push({index:a.aQuaternion,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:i*n,strideInBytes:i*t,instanceDivisor:1}),n+=4,a.aScale=o++,r.push({index:a.aScale,vertexBuffer:e,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:i*n,strideInBytes:i*t,instanceDivisor:1}),n+=3,a.aColor2=o++,r.push({index:a.aColor2,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:i*n,strideInBytes:i*t,instanceDivisor:1}),n+=4,a.aPickColor=o++,r.push({index:a.aPickColor,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,normalize:!1,offsetInBytes:i*n,strideInBytes:i*t,instanceDivisor:1}),n+=4,{attributes:r,attributeLocation:a}}_0x462481(),_0x398ed3.prototype.getHeightRange=function(){for(var e=Number.MAX_VALUE,t=Number.MIN_VALUE,i=this.instances.length,n=0;n<i;n++){var r=this.instances[n];e=Math.min(e,r.geoPosition.height),t=Math.max(t,r.geoPosition.height)}return{minHeight:e,maxHeight:t}},_0x398ed3.prototype.update=function(e){if(t$$(this.instanceBuffer)&&(this.instanceBuffer=this.instanceBuffer.destroy()),this.instances.length>0)if(this.instanceBuffer=_0x2afe32(e,this.instances,this.stride),t$$(this.attributes))for(var t=0,i=this.attributes.length;t<i;t++){this.attributes[t].vertexBuffer=this.instanceBuffer}else{var n=_0x163dcf(this.instanceBuffer,this.stride);this.attributes=n.attributes,this.attributeLocation=n.attributeLocation}this.dirty=!1},_0x398ed3.prototype.isDestroyed=function(){return!1},_0x398ed3.prototype.destroy=function(){this.instanceBuffer=this.instanceBuffer&&!this.instanceBuffer.isDestroyed()&&this.instanceBuffer.destroy(),this.instances=null,this.attributes=null,this.attributeLocation=null,this.inverseTransform=null,s$1e(this)};var _0x2901ab=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3907ea=_0x2901ab(void 0,(function(){return _0x3907ea.toString().search("(((.+)+)+)+$").toString().constructor(_0x3907ea).search("(((.+)+)+)+$")}));_0x3907ea();var _0x4bd2ca="attribute vec4 aPosition;\n#ifdef HAS_NORMAL\n attribute vec3 aNormal;\n#endif\nattribute vec4 aTexCoord0;\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\nattribute vec3 aOffsetPosition;\nattribute vec4 aQuaternion;\nattribute vec3 aScale;\nattribute vec4 aColor2;\nattribute vec4 aPickColor;\n#ifdef LocalTransform\nattribute vec4 aLocalTranslation;\nattribute vec4 aLocalQuaternion;\n#endif\nuniform mat4 uGeoMat;\nvarying vec4 vPositionMC;\nvarying vec3 vPositionEC;\nvarying vec3 vNormalEC;\nvarying vec2 vTexCoord;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvarying mat4 vModelMatrix;\nmat4 transfromFromQuaternion(vec4 q, vec4 translation)\n{\n float x2 = q.x * q.x;\n float xy = q.x * q.y;\n float xz = q.x * q.z;\n float xw = q.x * q.w;\n float y2 = q.y * q.y;\n float yz = q.y * q.z;\n float yw = q.y * q.w;\n float z2 = q.z * q.z;\n float zw = q.z * q.w;\n float w2 = q.w * q.w;\n float m00 = x2 - y2 - z2 + w2;\n float m01 = 2.0 * (xy - zw);\n float m02 = 2.0 * (xz + yw);\n float m10 = 2.0 * (xy + zw);\n float m11 = -x2 + y2 - z2 + w2;\n float m12 = 2.0 * (yz - xw);\n float m20 = 2.0 * (xz - yw);\n float m21 = 2.0 * (yz + xw);\n float m22 = -x2 - y2 + z2 + w2;\n return mat4(m00, m10, m20, 0.0, m01, m11, m21, 0.0, m02, m12, m22, 0.0, translation.x, translation.y, translation.z, 1.0);\n}\nvoid main()\n{\n vec4 vertexPos = vec4(aPosition.xyz, 1.0);\n vec4 positionMC = uGeoMat * vertexPos;\n vTexCoord = aTexCoord0.xy;\n mat3 rotationMat = mat3(transfromFromQuaternion(aQuaternion, vec4(0.0)));\n mat4 worldMatrix;\n worldMatrix[0] = vec4(rotationMat[0], 0.0);\n worldMatrix[1] = vec4(rotationMat[1], 0.0);\n worldMatrix[2] = vec4(rotationMat[2], 0.0);\n worldMatrix[3] = vec4(aOffsetPosition, 1.0);\n mat4 scaleMatrix;\n vec3 scale = aScale.xyz;\n scaleMatrix[0] = vec4(scale.x,0,0,0.0);\n scaleMatrix[1] = vec4(0,scale.y,0,0.0);\n scaleMatrix[2] = vec4(0,0,scale.z,0.0);\n scaleMatrix[3] = vec4(0,0,0,1.0);\n mat4 modelMatrix = worldMatrix;\n#ifdef LocalTransform\n mat4 localTransformMat = transfromFromQuaternion(aLocalQuaternion, aLocalTranslation);\n modelMatrix *= localTransformMat;\n#endif\n modelMatrix *= scaleMatrix;\n mat3 rotationMatrix = mat3(modelMatrix);\n vModelMatrix = modelMatrix * uGeoMat;\n positionMC = modelMatrix * vec4(positionMC.xyz, 1.0);\n positionMC.w = 1.0;\n gl_Position = czm_modelViewProjection * positionMC;\n vPositionMC.xyz = positionMC.xyz;\n vPositionMC.w = 0.0;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n vColor = vertexColor * aColor2;\n vPickColor = aPickColor / 255.0;\n#ifdef HAS_NORMAL\n if(length(aNormal) > 0.8)\n {\n vec3 normal = rotationMatrix * aNormal;\n mat4 realModelViewMatrix4 = czm_modelView * vModelMatrix;\n realModelViewMatrix4 = czm_inverseMatrix(realModelViewMatrix4);\n mat3 realModelViewMatrix3 = mat3(realModelViewMatrix4);\n realModelViewMatrix3 = czm_transpose(realModelViewMatrix3);\n vNormalEC = realModelViewMatrix3 * aNormal;\n vPositionMC.w = 1.0;\n vPositionEC = (czm_modelView * vPositionMC).xyz;\n }\n#endif\n}",_0x16cf96=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3bbdc7=_0x16cf96(void 0,(function(){return _0x3bbdc7.toString().search("(((.+)+)+)+$").toString().constructor(_0x3bbdc7).search("(((.+)+)+)+$")}));function _0x2fde82(e){this.ready=!1,this.state=_0x2bc85d.UnLoad,this.url=e,this.subSkeletons=[]}function _0x4e86f6(){this.attributes=void 0,this.attributeLocation=void 0,this.indexBuffer=void 0,this.sp=void 0,this.colorCommand=void 0,this.boundingVolume=void 0}function _0x8e349c(e,t,i){var n=fe$u.UNSIGNED_SHORT;(1===t.indexType||i>=n$1d.SIXTY_FOUR_KILOBYTES)&&e.elementIndexUint&&(n=fe$u.UNSIGNED_INT);var r=u$Y.createIndexBuffer({context:e,typedArray:t.indicesTypedArray,usage:A$13.STATIC_DRAW,indexDatatype:n});return r.vertexArrayDestroyable=!1,r}function _0x443e68(e,t){for(var i=t.vertexAttributes,n=0,r=i.length;n<r;n++){var o=i[n];!t$$(o.typedArray)||(o.vertexBuffer=u$Y.createVertexBuffer({context:e,typedArray:o.typedArray,usage:A$13.STATIC_DRAW}),o.vertexBuffer.vertexArrayDestroyable=!1,o.typedArray=null,delete o.typedArray)}return i}function _0x1b4cb9(e,t,i){var n=t.hasTexture,r=t.hasNormal,o=t.hasVertexColor,a=t.flipY,s=t.attributeLocation,l=new a$O({name:"S3MInstanceCollectionVertex",sources:[_0x4bd2ca]}),u=new a$O({name:"S3ModelFP",sources:[_0x29dd65]});if(a&&u.defines.push("FLIP_Y"),n&&u.defines.push("TEXTURE"),r&&(l.defines.push(H$r.HAS_NORMAL),u.defines.push(H$r.HAS_NORMAL)),o&&l.defines.push("VertexColor"),t$$(e._frameState.lightSource)){var c=e._frameState.lightSource.directionalLight;l.defines.push(H$r.DIR_LIGHTS+c.length),u.defines.push(H$r.DIR_LIGHTS+c.length);var h=e._frameState.lightSource.pointLight;l.defines.push(H$r.POINT_LIGHTS+h.length),u.defines.push(H$r.POINT_LIGHTS+h.length);var d=e._frameState.lightSource.spotLight;l.defines.push(H$r.SPOT_LIGHTS+d.length),u.defines.push(H$r.SPOT_LIGHTS+d.length);var f=e._frameState.lightSource.hemisphereLight;u.defines.push(H$r.HEMISPHERE_LIGHTS+f.length)}return i.appendPBRMacroToShader(l,u),p$15.fromCache({context:e._context,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:s})}function _0x4b6a28(e,t,i,n){var r=new s$1d({primitiveType:H$11.TRIANGLES,boundingVolume:n,modelMatrix:t,pass:i._bTransparentSorting?we$l.S3MTiles+3:we$l.S3MTiles+2,cull:!0});e._shadowType===_0x3df1e1.ALL||e._shadowType===_0x3df1e1.SELECTION?(r.castShadows=!0,r.receiveShadows=!0):(r.castShadows=!1,r.receiveShadows=!1),r.pickId="vPickColor";var o=i._diffuseColor,a=i._diffuseColor,s=i._specularColor,l=i._shininess,u=i._textures[0],c={uTexture:function(){return u},uAmbientColor:function(){return o},uDiffuseColor:function(){return a},uSpecularColor:function(){return s},uShininess:function(){return l},uGeoMat:function(){return t}};return c=s$1n(c,i.createPBRUniformMap()),c=s$1n(c,e._frameState.lightSource.createUniformMap()),r.uniformMap=c,r.renderState=p$1a.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},blending:Ee$s.ALPHA_BLEND}),r}_0x3bbdc7(),_0x4e86f6.prototype.isDestroyed=function(){return!1},_0x4e86f6.prototype.destroy=function(){this.sp=this.sp&&!this.sp.isDestroyed()&&this.sp.destroy(),this.indexBuffer=this.indexBuffer&&!this.indexBuffer.isDestroyed()&&this.indexBuffer.destroy();for(var e=0,t=this.attributes.length;e<t;e++)this.attributes[e].vertexBuffer.destroy();return this.attributes.length=0,this.colorCommand=void 0,s$1e(this)},_0x2fde82.prototype.createSubSkeleton=function(e,t,i,n,r,o){var a=e._context,s=new _0x4e86f6;s.attributes=_0x443e68(a,n),s.indexBuffer=_0x8e349c(a,r,n.verticesCount),s.attributeLocation=n.attrLocation,s.sp=_0x1b4cb9(e,{hasTexture:t$$(s.attributeLocation.aTexCoord0)&&i._textures.length>0,hasNormal:t$$(s.attributeLocation.aNormal),hasVertexColor:t$$(s.attributeLocation.aColor),flipY:0===e._supportCompressType,attributeLocation:s.attributeLocation},i),s.colorCommand=_0x4b6a28(e,t,i,o),s.boundingVolume=c$19.clone(o),this.subSkeletons.push(s)},_0x2fde82.prototype.isDestroyed=function(){return!1},_0x2fde82.prototype.destroy=function(){for(var e=0,t=this.subSkeletons.length;e<t;e++)this.subSkeletons[e].destroy();s$1e(this)};var _0x288d8b=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3ce22c=_0x288d8b(void 0,(function(){return _0x3ce22c.toString().search("(((.+)+)+)+$").toString().constructor(_0x3ce22c).search("(((.+)+)+)+$")}));function _0x1bf26a(e,t,i){this.tileX=e,this.tileY=t,this.level=i,this.rectangle=void 0,this.boundingVolume=void 0,this.transform=void 0,this.inverseTransform=void 0,this.tileBoundingRegion=void 0,this.distanceToCamera=0,this.instanceGroup=new e$1F,this.skeletonGroup=new e$1F,this.commandGroup=new e$1F,this.dirty=!1}function _0x392ac4(e,t){var i={},n=0;for(var r in e)e.hasOwnProperty(r)&&(i[r]=e[r],++n);for(var r in t)t.hasOwnProperty(r)&&(i[r]=t[r]+n);return i}function _0x498d94(e,t){for(var i=e.length,n=e.slice(0),r=0,o=t.length;r<o;r++)t[r].index=i+r,n.push(t[r]);return n}function _0x220e2e(e,t,i,n){var r=n.instances[0],o=a$11.maximumComponent(r.scale);t$$(l=e.commandGroup.get(n.url))||(l=new Array(t.subSkeletons.length),e.commandGroup.set(n.url,l));for(var a=0,s=t.subSkeletons.length;a<s;a++){var l,u=t.subSkeletons[a],c=(l=e.commandGroup.get(n.url))[a];t$$(c)||((c=s$1d.shallowClone(u.colorCommand)).modelMatrix=c$1a.clone(u.colorCommand.modelMatrix),l[a]=c),t$$(c.vertexArray)&&!c.vertexArray.isDestroyed()&&c.vertexArray.destroy();var h=_0x498d94(u.attributes,n.attributes),d=_0x392ac4(u.attributeLocation,n.attributeLocation);c.vertexArray=new x$18({context:i,attributes:h,indexBuffer:u.indexBuffer}),c.shaderProgram=p$15.fromCache({context:i,shaderProgram:u.sp,vertexShaderSource:u.sp.vertexShaderSource,fragmentShaderSource:u.sp.fragmentShaderSource,attributeLocations:d}),c$1a.clone(e.transform,c.modelMatrix),c.instanceCount=n.instances.length,c.radius=u.boundingVolume.radius*o,c.boundingVolume=e.boundingVolume}}_0x3ce22c(),_0x1bf26a.prototype.updateDrawCommand=function(e,t){var i=this.skeletonGroup.get(t.url);t$$(i)&&i.ready&&(!t$$(t.instances[0])||(i._isGlTF?(i.transformed=!0,_0x25d290(this,i,e,t),i.model.activeAnimations.addAll({loop:_0x1f6ea1.REPEAT})):_0x220e2e(this,i,e,t)))};var _0x435797=new a$10(1,1,1,1);function _0x25d290(e,t,i,n){var r=e.layer,o=t.model._nodeCommands,a=o.length,s=n.instances[0],l=a$11.maximumComponent(s.scale),u=e.commandGroup.get(n.url);t$$(u)||(u=new Array(a),e.commandGroup.set(n.url,u));for(var c=0;c<a;++c){var h=o[c],d=s$1d.shallowClone(h.command);u[c]=d,d._isGltfCommand=!0,d.castShadows=!1,d.receiveShadows=!1,d.pickId="vPickColor",d.instanceCount=n.instances.length,d.pass=we$l.S3MTiles+2,d.cull=!1;var f=_0x146809(d.shaderProgram.vertexAttributes);f=_0x392ac4(f,n.attributeLocation);var p=d.vertexArray,_=p._attributes,m=p.indexBuffer;_=_0x498d94(_,n.attributes),d.vertexArray=new x$18({context:i,attributes:_,indexBuffer:m});var $=new a$O({name:"InstanceTilesLayerVS",sources:[_0x4bd2ca]}),g=new a$O({name:"S3ModelFP",sources:[_0x29dd65]});if(g.defines.push("BRDF"),t$$(r._frameState.specularEnvironmentMaps)&&g.defines.push(H$r.IBL),t$$(r._frameState.lightSource)){var y=r._frameState.lightSource.directionalLight;$.defines.push(H$r.DIR_LIGHTS+y.length),g.defines.push(H$r.DIR_LIGHTS+y.length);var v=r._frameState.lightSource.pointLight;$.defines.push(H$r.POINT_LIGHTS+v.length),g.defines.push(H$r.POINT_LIGHTS+v.length);var x=r._frameState.lightSource.spotLight;$.defines.push(H$r.SPOT_LIGHTS+x.length),g.defines.push(H$r.SPOT_LIGHTS+x.length);var b=r._frameState.lightSource.hemisphereLight;g.defines.push(H$r.HEMISPHERE_LIGHTS+b.length)}t$$(f.aColor)&&$.defines.push("VertexColor"),t$$(f.aNormal)&&($.defines.push(H$r.HAS_NORMAL),g.defines.push(H$r.HAS_NORMAL)),t$$(f.aTexCoord0)&&(t$$(d.uniformMap.u_baseColorTexture)||t$$(d.uniformMap.u_diffuse))&&($.defines.push("TEXTURE"),g.defines.push("TEXTURE")),t$$(d.uniformMap.u_metallicRoughnessTexture)&&g.defines.push("HAS_MetallicRoughness_TEXTURE"),t$$(d.uniformMap.u_normalTexture)&&g.defines.push("HAS_NORMAL_TEXTURE"),t$$(d.uniformMap.u_emissiveTexture)&&g.defines.push("HAS_EMISSIVE_TEXTURE"),t$$(d.uniformMap.u_occlusionTexture)&&g.defines.push("HAS_OCCLUSION_TEXTURE"),d.shaderProgram=p$15.fromCache({context:i,vertexShaderSource:$,fragmentShaderSource:g,attributeLocations:f});var S=new a$10(1,1,1,1),w={uAmbientColor:function(){return _0x435797},uDiffuseColor:function(){return _0x435797},uSpecularColor:function(){return _0x435797},uShininess:function(){return 1},uGeoMat:function(e){return function(){return u[e].localMatrix}}(c),uFilterMode:function(){return r.filterMode},uVisibleDistance:function(){return Number.MAX_VALUE},uFilterPixel:function(){return r.filterPixel},uFillColor:function(){return _0x435797},uTransformMatrix:function(){return e.transform},uBaseColorFactor:function(){return S},uEmissiveFactor:function(){return a$11.ZERO},uMetallicFactor:function(){return 0},uRoughnessFactor:function(){return 1},uNormalTextureScale:function(){return 1},uEmissiveUVOffsetAndTiling:function(){return new a$10(0,0,1,1)},uEnvMapIntensity:function(){return 1}},C=d.uniformMap;t$$(C.u_baseColorTexture)?w.uTexture=C.u_baseColorTexture:t$$(C.u_diffuse)&&(w.uTexture=C.u_diffuse),t$$(C.u_specular)&&(w.uSpecularColor=C.u_specular),t$$(C.u_shininess)&&(w.uShininess=C.u_shininess),t$$(C.u_baseColorFactor)&&(w.uBaseColorFactor=C.u_baseColorFactor),t$$(C.u_emissiveFactor)&&(w.uEmissiveFactor=C.u_emissiveFactor),t$$(C.u_metallicFactor)&&(w.uMetallicFactor=C.u_metallicFactor),t$$(C.u_roughnessFactor)&&(w.uRoughnessFactor=C.u_roughnessFactor),t$$(C.u_metallicRoughnessTexture)&&(w.uMetallicRoughnessTexture=C.u_metallicRoughnessTexture),t$$(C.u_normalTexture)&&(w.uNormalTexture=C.u_normalTexture),t$$(C.u_emissiveTexture)&&(w.uEmissionTexture=C.u_emissiveTexture),t$$(C.u_occlusionTexture)&&(w.uOcclusionTexture=C.u_occlusionTexture),d.uniformMap=s$1n(w,r._frameState.lightSource.createUniformMap()),d.localMatrix=c$1a.IDENTITY.clone(),d._transformMatrix=c$1a.IDENTITY.clone(),d.modelMatrix=c$1a.clone(c$1a.IDENTITY,new c$1a),d.radius=d.boundingVolume.radius*l,d.boundingVolume=b$1o.clone(e.boundingVolume,new b$1o)}}function _0x146809(e){var t={};return t$$(e.a_position)&&(t.aPosition=e.a_position.index),t$$(e.a_normal)&&(t.aNormal=e.a_normal.index),t$$(e.a_vertexColor)&&(t.aColor=e.a_vertexColor.index),t$$(e.a_texcoord_0)&&(t.aTexCoord0=e.a_texcoord_0.index),t$$(e.a_texcoord0)&&(t.aTexCoord0=e.a_texcoord0.index),t}_0x1bf26a.prototype.updateBoundingVolume=function(e,t){this.boundingVolume=b$1o.fromRectangle(this.rectangle,e,t)},_0x1bf26a.prototype.remove=function(e){var t=this.instanceGroup.get(e);t$$(t)&&(t.destroy(),this.instanceGroup.remove(e)),this.skeletonGroup.remove(e);var i=this.commandGroup.get(e);if(t$$(i)){for(var n=0,r=i.length;n<r;n++){var o=i[n];o.vertexArray=o.vertexArray&&!o.vertexArray.isDestroyed()&&o.vertexArray.destroy(),o.shaderProgram=o.shaderProgram&&!o.shaderProgram.isDestroyed()&&o.shaderProgram.destroy()}this.commandGroup.remove(e)}},_0x1bf26a.prototype.update=function(e){this.dirty=!1;var t=Number.MAX_VALUE,i=Number.MIN_VALUE;for(var n in this.instanceGroup._hash)if(this.instanceGroup._hash.hasOwnProperty(n)){var r=this.instanceGroup.get(n);r.dirty&&r.update(e);var o=r.getHeightRange();t=Math.min(t,o.minHeight),i=Math.max(i,o.maxHeight),this.updateDrawCommand(e,r)}this.updateBoundingVolume(t,i)},_0x1bf26a.prototype.isDestroyed=function(){return!1},_0x1bf26a.prototype.destroy=function(){var e,t,i,n;for(e=0,t=this.instanceGroup.length;e<t;e++){this.instanceGroup.values[e].destroy()}for(this.instanceGroup.removeAll(),this.skeletonGroup.removeAll(),e=0,t=this.commandGroup.length;e<t;e++){var r=this.commandGroup.values[e];for(i=0,n=r.length;i<n;i++){var o=r[i];o.vertexArray=o.vertexArray&&!o.vertexArray.isDestroyed()&&o.vertexArray.destroy(),o.shaderProgram=o.shaderProgram&&!o.shaderProgram.isDestroyed()&&o.shaderProgram.destroy()}}this.commandGroup.removeAll(),s$1e(this)};var _0x1f24f4=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x301728=_0x1f24f4(void 0,(function(){return _0x301728.toString().search("(((.+)+)+)+$").toString().constructor(_0x301728).search("(((.+)+)+)+$")}));function _0x59c543(){}function _0x1c4d51(e,t){for(var i=[],n=new c$19,r=new a$11,o=e.vertexAttributes[0],a=o.componentsPerAttribute,s=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4),l=0;l<e.verticesCount;l++)a$11.fromArray(s,a*l,r),i.push(a$11.clone(r));return c$19.fromPoints(i,n),i.length=0,c$19.transform(n,t,n),n}_0x301728(),_0x59c543.load=function(e,t){var i=t$X.fetchArrayBuffer({url:t.url});t$$(i)||(t.state=_0x2bc85d.UnLoad),t.state=_0x2bc85d.Loading,i.then((function(e){t.state=_0x2bc85d.Loaded,t.skeletonBuffer=e}),(function(e){t.state=_0x2bc85d.Failed}))},_0x59c543.parse=function(e,t){if(_0xb658ed.init||_0xb658ed.initWebAssembly(),_0xb658ed.taskProcessorReady){var i=_0xb658ed.S3MBTaskProcessor.scheduleTask({buffer:t.skeletonBuffer,supportCompressType:e._supportCompressType},[t.skeletonBuffer]);if(!t$$(i))return void(t.state=_0x2bc85d.Loaded);t.skeletonBuffer=void 0,t.state=_0x2bc85d.Parsing,i.then((function(i){if(i.result){for(var n=e._context,r={},o=0,a=i.matrials.material.length;o<a;o++){var s=i.matrials.material[o].material,l=s.id,u=new _0x42161c({});r[l]=u,u.createCommonParamter(s),u.createPBRParamter(s);for(var c=s.textureunitstates,h=0;h<c.length;h++){var d=c[h].textureunitstate,f=d.id,p=0===d.addressmode.u?j$13.REPEAT:j$13.CLAMP_TO_EDGE,_=0===d.addressmode.v?j$13.REPEAT:j$13.CLAMP_TO_EDGE;u._texMatrix=c$1a.unpack(d.texmodmatrix);var m=i.texturePackage[f];if(t$$(m)){var $=De$e.CreateTexture(f,n,m.width,m.height,m.nFormat,m.compressType,m.imageBuffer,!1,p,_);u._textures.push($),0===m.compressType&&(e._supportCompressType=0)}}}var g=i.groupNode.pageLods;if(t$$(g))for(o=0,a=g.length;o<a;o++){for(var y=g[o].geodes[0],v=y.matrix,x=0;x<16;x++)v[x]=parseFloat(v[x]);v=c$1a.unpack(v,0);for(var b=y.skeletonNames,S=[],w=0,C=b.length;w<C;w++){var T=b[w].trim();S.push(T);var P=i.geoPackage[T],E=P.vertexPackage,A=_0x1c4d51(E,v),L=P.arrIndexPackage[0];if(t$$(L)){u=r[l=L.materialCode];t.createSubSkeleton(e,v,u,E,L,A)}}}t.ready=!0,t.state=_0x2bc85d.Ready;var M=e._skeletonTileMap.get(t.url);for(o=0,a=M.length;o<a;o++)M[o].dirty=!0;e._skeletonTileMap.remove(t.url)}else t.state=_0x2bc85d.Failed})).otherwise((function(e){console.log(e)}))}};var _0xb7716b=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x589503=_0xb7716b(void 0,(function(){return _0x589503.toString().search("(((.+)+)+)+$").toString().constructor(_0x589503).search("(((.+)+)+)+$")}));function _0x571b82(){}_0x589503();var _0x4dc814=new f$10;function _0x5a44ec(e,t){for(var i=[],n=new c$19,r=new a$11,o=(new a$11,e.vertexAttributes[0]),a=o.componentsPerAttribute,s=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4),l=0;l<e.verticesCount;l++)a$11.fromArray(s,a*l,r),i.push(a$11.clone(r));return c$19.fromPoints(i,n),i.length=0,c$19.transform(n,t,n),n}_0x571b82.load=function(e,t){var i=t$X.fetchArrayBuffer({url:t.url});t$$(i)||(t.state=_0x2bc85d.UnLoad),t.state=_0x2bc85d.Loading,i.then((function(e){t.state=_0x2bc85d.Loaded,t.skeletonBuffer=e}),(function(e){t.state=_0x2bc85d.Failed}))},_0x571b82.parse=function(e,t){var i=_0xb658ed.S3MTaskProcessor.scheduleTask({buffer:t.skeletonBuffer,supportCompressType:e._supportCompressType},[t.skeletonBuffer]);t$$(i)?(t.skeletonBuffer=void 0,t.state=_0x2bc85d.Parsing,i.then((function(i){if(i.result){e._gl;for(var n=e._context,r=_0x4dc814.read(i.xmlDoc).firstChild,o=r.namespaceURI,a=f$10.queryFirstNode(r,"Material3Ds",o),s=f$10.queryChildNodes(a,"material",o),l={},u=0,c=s.length;u<c;u++){var h=s[u],d=f$10.queryStringValue(h,"name",o),f=new _0x42161c({});l[d]=f;var p=f$10.queryFirstNode(h,"Ambient",o),_=f$10.queryNumericValue(p,"AmbientR",o),m=f$10.queryNumericValue(p,"AmbientG",o),$=f$10.queryNumericValue(p,"AmbientB",o),g=f$10.queryNumericValue(p,"AmbientA",o);f._ambientColor=new e$1z(_,m,$,g);var y=f$10.queryFirstNode(h,"Diffuse",o);_=f$10.queryNumericValue(y,"DiffuseR",o),m=f$10.queryNumericValue(y,"DiffuseG",o),$=f$10.queryNumericValue(y,"DiffuseB",o),g=f$10.queryNumericValue(y,"DiffuseA",o),f._diffuseColor=new e$1z(_,m,$,g);var v=f$10.queryFirstNode(h,"Specular",o);_=f$10.queryNumericValue(v,"SpecularR",o),m=f$10.queryNumericValue(v,"SpecularG",o),$=f$10.queryNumericValue(v,"SpecularB",o),g=f$10.queryNumericValue(v,"SpecularA",o),f._specularColor=new e$1z(_,m,$,g);var x=f$10.queryNumericValue(h,"Shininess",o);f._shininess=x,f$10.queryFirstNode(h,"TransparentSorting",o),f._bTransparentSorting=f$10.queryBooleanValue(h,"TransparentSorting",o)||f._diffuseColor.alpha<1;var b=f$10.queryFirstNode(h,"texture",o),S=f$10.queryStringValue(b,"name",o),w=f$10.queryFirstNode(b,"AddressMode",o),C=f$10.queryStringValue(w,"u",o),T=f$10.queryStringValue(w,"v",o);C="TAM_WRAP"===C?j$13.REPEAT:j$13.CLAMP_TO_EDGE,T="TAM_WRAP"===T?j$13.REPEAT:j$13.CLAMP_TO_EDGE;var P=i.texturePackage[S];if(t$$(P)){var E=De$e.CreateTexture(S,n,P.width,P.height,P.nFormat,P.compressType,P.imageBuffer,!1,C,T);f._textures.push(E),0===P.compressType&&(e._supportCompressType=0)}}var A=f$10.queryFirstNode(r,"PageLods",o),L=f$10.queryNodes(A,"Geode",o);for(u=0,c=L.length;u<c;u++){for(var M=L[u],I=f$10.queryStringValue(M,"GeoDeModMatrix",o).split(","),O=0;O<16;O++)I[O]=parseFloat(I[O]);I=c$1a.unpack(I,0);for(var D=f$10.queryNodes(M,"GeoName",o),R=[],N=0,F=D.length;N<F;N++){var B=D[N].textContent.trim();R.push(B);var z=i.geoPackage[B],G=_0x5a44ec(k=z.vertexPackage,I),k=z.vertexPackage,U=z.arrIndexPackage[0];if(t$$(U)){f=l[d=U.materialCode];t.createSubSkeleton(e,I,f,k,U,G)}}}t.ready=!0,t.state=_0x2bc85d.Ready;var V=e._skeletonTileMap.get(t.url);for(u=0,c=V.length;u<c;u++)V[u].dirty=!0;e._skeletonTileMap.remove(t.url)}else t.state=_0x2bc85d.Failed})).otherwise((function(e){console.log(e)}))):t.state=_0x2bc85d.Loaded};var _0x431a36=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x365725=_0x431a36(void 0,(function(){return _0x365725.toString().search("(((.+)+)+)+$").toString().constructor(_0x365725).search("(((.+)+)+)+$")}));function _0x1ca2e5(){}_0x365725(),_0x1ca2e5.load=function(e,t){t._isGlTF?_0x1fdb75.load(e,t):_0x571b82.load(e,t)},_0x1ca2e5.parse=function(e,t){t.url.endsWith("s3mb")?_0x59c543.parse(e,t):_0x571b82.parse(e,t)};var _0x3198fa=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x284489=_0x3198fa(void 0,(function(){return _0x284489.toString().search("(((.+)+)+)+$").toString().constructor(_0x284489).search("(((.+)+)+)+$")}));function _0x512f9a(e){this._context=e,this._gl=e._gl,this.type=ai$2.INSTANCED_LAYER,this._tilingScheme=new a$W,this._modelSkeletons=new e$1F,this._tiles=new e$1F,this._instances=new e$1F,this._skeletonTileMap=new e$1F,this._tileWidth=1e3,this._level=10,this._maxGeometricError=0,this._level=this.computeLevel(this._tileWidth),this._minVisibleAltitude=0,this._maxVisibleAltitude=Number.MAX_VALUE,this._filterMode=_0x2b4bc7.PIXEL_SIZE_ON_SCREEN,this._filterDistance=Number.MAX_VALUE,this._filterPixel=0,this._selectedColor=new e$1z(.7,.7,1,1),this._pickEnable=!0,this._visibleViewport=4095,this._supportCompressType=t$$(e.s3tc)?1:t$$(e.pvrtc)?2:3,this._shadowType=_0x3df1e1.NONE}function _0x2fadc9(e,t,i){var n=e.camera,r=e.context.drawingBufferWidth,o=e.context.drawingBufferHeight,a=Math.max(r,o),s=.5*n.frustum.fov,l=.5*a/Math.tan(s);return Math.ceil(l*t/i)}function _0x117d91(e,t,i){if(!t$$(i.boundingVolume))return!1;if(!(e.cullingVolume.computeVisibility(i.boundingVolume)!==cr$4.OUTSIDE))return!1;var n=i.tileBoundingRegion.distanceToCamera(e);if(i.distanceToCamera=n,e.fog.enabled&&n$1d.fog(n,e.fog.density)>=1)return!1;var r=e.context.drawingBufferHeight,o=e.camera.frustum.sseDenominator,a=t._maxGeometricError*r/(n*o);return e.fog.enabled&&(a-=n$1d.fog(n,e.fog.density)*e.fog.sse),!(a<2)}function _0x3106f3(e,t){t.state===_0x2bc85d.UnLoad&&_0x1ca2e5.load(e,t),t.state===_0x2bc85d.Loaded&&_0x1ca2e5.parse(e,t)}function _0x480558(e,t,i){for(var n=0;n<i.commandGroup.length;n++)for(var r=i.commandGroup.values[n],o=0;o<r.length;o++){var a=r[o];if(t._filterMode===_0x2b4bc7.PIXEL_SIZE_ON_SCREEN){if(_0x2fadc9(e,a.radius,i.distanceToCamera)<t.filterPixel)continue}else if(i.distanceToCamera>t.filterDistance)continue;e.commandList.push(a)}}_0x284489(),Object.defineProperties(_0x512f9a.prototype,{minVisibleAltitude:{get:function(){return this._minVisibleAltitude},set:function(e){n$1e.typeOf.number("InstanceLayer minVisibleAltitude",e),this._minVisibleAltitude=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){n$1e.typeOf.number("InstanceLayer maxVisibleAltitude",e),this._maxVisibleAltitude=e}},filterMode:{get:function(){return this._filterMode},set:function(e){n$1e.typeOf.number("InstanceLayer filterMode",e),this._filterMode=e}},filterDistance:{get:function(){return this._filterDistance},set:function(e){n$1e.typeOf.number("InstanceLayer filterPixel",e),this._filterDistance=e}},filterPixel:{get:function(){return this._filterPixel},set:function(e){n$1e.typeOf.number("InstanceLayer filterPixel",e),this._filterPixel=e}},selectedColor:{get:function(){return this._selectedColor},set:function(e){n$1e.typeOf.object("InstanceLayer selectedColor",e),this._selectedColor=e$1z.clone(e,this._selectedColor)}},pickEnable:{get:function(){return this._pickEnable},set:function(e){n$1e.typeOf.bool("InstanceLayer pickEnable",e),this._pickEnable=e}},tileWidth:{get:function(){return this._tileWidth},set:function(e){n$1e.typeOf.number("InstanceLayer tileWidth",e),this._tileWidth=e;var t=this.computeLevel(e);t!==this._level&&(this._level=t,this.updateTiles())}},shadowType:{get:function(){return this._shadowType},set:function(e){this._shadowType!==e&&(this._shadowType=e,this._updateShadow(this))}}});var _0x2479f=78271.51696402048;function _0x147d44(e){return e._shadowType==_0x3df1e1.SELECTION||e._shadowType==_0x3df1e1.ALL}_0x512f9a.prototype.computeLevel=function(e){var t=10,i=this._tilingScheme.tileXYToRectangle(0,0,10),n=this._tilingScheme._projection,r=s$1p.southwest(i),o=s$1p.northeast(i);r=n.project(r);var a=(o=n.project(o)).x-r.x;for(o.y,r.y;a>e;)++t,a*=.5;return t-=1,this._maxGeometricError=_0x2479f/(1<<t),t},_0x512f9a.prototype.updateTiles=function(){var e,t,i,n;for(e=0,t=this._tiles.length;e<t;e++)this._tiles.values[e].destroy();this._tiles.removeAll(),this._skeletonTileMap.removeAll();var r=this._tilingScheme;for(e=0,t=this._instances.length;e<t;e++){var o=this._instances.values[e];for(i=0,n=o.length;i<n;i++){var a=o.values[i];a.tile=void 0,a.instanceInfo=void 0;var s=a.url,l=r.positionToTileXY(a.geoPosition,this._level),u=l.x+"_"+l.y;if(!t$$(p=this._tiles.get(u))){(p=new _0x1bf26a(l.x,l.y)).layer=this;var c=r.tileXYToRectangle(l.x,l.y,this._level);p.rectangle=s$1p.clone(c),p.boundingVolume=b$1o.fromRectangle(c,0,0),p.transform=m$13.eastNorthUpToFixedFrame(p.boundingVolume.center,void 0,new c$1a),p.inverseTransform=c$1a.inverse(p.transform,new c$1a),p.tileBoundingRegion=new _$v({computeBoundingVolumes:!1,rectangle:c,ellipsoid:r.ellipsoid,minimumHeight:0,maximumHeight:0}),this._tiles.set(u,p)}a.offset=c$1a.multiplyByPoint(p.inverseTransform,a.position,a.offset),p.dirty=!0;var h=this._skeletonTileMap.get(s);t$$(h)||(h=[],this._skeletonTileMap.set(s,h)),h.push(p);var d=p.instanceGroup.get(s);t$$(d)||(d=new _0x398ed3(s,_0x512f9a.STRIDE),p.instanceGroup.set(s,d)),d.instances.push(a),a.instanceInfo=d,a.tile=p,d.dirty=!0;var f=p.skeletonGroup.get(s);t$$(f)||(f=this._modelSkeletons.get(s),p.skeletonGroup.set(s,f))}}for(e=0,t=this._tiles.length;e<t;e++){var p;(p=this._tiles.values[e]).dirty&&p.update(this._context)}},_0x512f9a.prototype.add=function(e,t,i){if(n$1e.typeOf.string("url",e),n$1e.defined("attrs",t),Array.isArray(t)||(t=[t]),!this._modelSkeletons.contains(e)){var n=!1;(e.indexOf(".gltf")>0||e.indexOf(".glb")>0)&&(n=!0),t$$(i)&&(n="gltf"===i),n?this._modelSkeletons.set(e,new _0x36ee04(e)):this._modelSkeletons.set(e,new _0x2fde82(e))}for(var r=this._tilingScheme,o=0,a=t.length;o<a;o++){var s=t[o],l=e$1Y(s.id,t$U()),u=new _0x4b234a(this._context,e,s,l),c=r.positionToTileXY(u.geoPosition,this._level),h=c.x+"_"+c.y;if(!t$$($=this._tiles.get(h))){($=new _0x1bf26a(c.x,c.y)).layer=this;var d=this._tilingScheme.tileXYToRectangle(c.x,c.y,this._level);$.rectangle=s$1p.clone(d),$.boundingVolume=b$1o.fromRectangle(d,0,0),$.transform=m$13.eastNorthUpToFixedFrame($.boundingVolume.center,void 0,new c$1a),$.inverseTransform=c$1a.inverse($.transform,new c$1a),$.tileBoundingRegion=new _$v({computeBoundingVolumes:!1,rectangle:d,ellipsoid:r.ellipsoid,minimumHeight:0,maximumHeight:0}),this._tiles.set(h,$)}u.offset=c$1a.multiplyByPoint($.inverseTransform,u.position,u.offset),u.selectedColor=e$1z.clone(this._selectedColor,u.selectedColor),$.dirty=!0;var f=this._skeletonTileMap.get(e);t$$(f)||(f=[],this._skeletonTileMap.set(e,f)),f.push($);var p=$.instanceGroup.get(u.url);t$$(p)||(p=new _0x398ed3(u.url,_0x512f9a.STRIDE),$.instanceGroup.set(u.url,p)),p.instances.push(u),u.instanceInfo=p,u.tile=$,u.layer=this,p.dirty=!0;var _=$.skeletonGroup.get(u.url);t$$(_)||(_=this._modelSkeletons.get(u.url),$.skeletonGroup.set(u.url,_));var m=this._instances.get(e);t$$(m)||(m=new e$1F,this._instances.set(e,m)),m.set(l,u)}for(o=0,a=this._tiles.length;o<a;o++){var $;($=this._tiles.values[o]).dirty&&$.update(this._context)}},_0x512f9a.prototype.getInstance=function(e,t){n$1e.defined("InstanceLayer getInstance url",e),n$1e.defined("InstanceLayer getInstance id",t);var i=this._instances.get(e);if(t$$(i))return i.get(t)},_0x512f9a.prototype._updateShadow=function(e){var t=_0x147d44(e),i=e._modelSkeletons._hash;for(var n in i){var r=i[n];if(r.ready)for(var o=0,a=r.subSkeletons.length;o<a;o++){var s=r.subSkeletons[o];s.colorCommand.castShadows=t,s.colorCommand.receiveShadows=t}}},_0x512f9a.prototype.removeInstance=function(e,t){n$1e.defined("InstanceLayer removeInstance url",e),n$1e.defined("InstanceLayer removeInstance ids",t),Array.isArray(t)||(t=[t]);for(var i=0,n=t.length;i<n;i++){var r=t[i],o=this.getInstance(e,r);if(t$$(o)&&t$$(o.tile)){var a=o.tile;a.dirty=!0;var s=a.instanceGroup.get(e);if(t$$(s)){s.dirty=!0;var l=s.instances.indexOf(o);s.instances.splice(l,1),this._instances.get(e).remove(o.id)}}}0===this._instances.get(e).length&&this.removeAll(e)},_0x512f9a.prototype.removeAll=function(e){var t,i;if(t$$(e)){if(!this._modelSkeletons.contains(e))return;for(this._modelSkeletons.get(e).destroy(),this._modelSkeletons.remove(e),this._instances.remove(e),this._skeletonTileMap.remove(e),t=0,i=this._tiles.length;t<i;t++){var n=this._tiles.values[t];n.remove(e),n.dirty=!0}}else{for(t=0,i=this._modelSkeletons.length;t<i;t++){var r=this._modelSkeletons.values[t];r._isGlTF?!r.model.isDestroyed()&&r.model.destroy():this._modelSkeletons.values[t].destroy()}for(this._modelSkeletons.removeAll(),t=0,i=this._tiles.length;t<i;t++)this._tiles.values[t].destroy();this._tiles.removeAll(),this._instances.removeAll(),this._skeletonTileMap.removeAll()}},_0x512f9a.prototype.setUnSelected=function(){var e=this._instances;if(t$$(e)&&!(e.length<1))for(var t=0,i=e.length;t<i;t++)for(var n=e.values[t],r=0,o=n.length;r<o;r++){n.values[r].setUnSelected()}},_0x512f9a.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$_("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},_0x512f9a.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$_("the index is 0~8");return 1<<e&this._visibleViewport},_0x512f9a.prototype.update=function(e){if(e.multiViewportIndex>-1&&!this.getVisibleInViewport(e.multiViewportIndex))return;var t=e.camera;if(!(t.positionCartographic.height>this._maxVisibleAltitude||t.positionCartographic.height<this._minVisibleAltitude)&&(!e.passes.pick||this._pickEnable)){for(var i in this._frameState=e,this._modelSkeletons._hash)if(this._modelSkeletons._hash.hasOwnProperty(i)){var n=this._modelSkeletons.get(i);n.ready||_0x3106f3(this,n),n._isGlTF&&n.transformed&&n.model.updateAnimation(e)}for(var r=0,o=this._tiles.length;r<o;r++){var a=this._tiles.values[r];if(_0x117d91(e,this,a)){for(var i in a.dirty&&a.update(this._context),a.commandGroup._hash){var s=this._modelSkeletons.get(i).model;if(t$$(s))for(var l=s._nodeCommands,u=a.commandGroup.get(i),c=0,h=u.length;c<h;c++){var d=u[c],f=l[c].command;c$1a.clone(f.modelMatrix,d.localMatrix),c$1a.clone(a.transform,d.modelMatrix),b$1o.clone(a.boundingVolume,d.boundingVolume)}}_0x480558(e,this,a)}}}},_0x512f9a.STRIDE=18,_0x512f9a.prototype.isDestroyed=function(){return!1},_0x512f9a.prototype.destroy=function(){this.removeAll(),s$1e(this)};var _0x1c1e6=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x110b02=_0x1c1e6(void 0,(function(){return _0x110b02.toString().search("(((.+)+)+)+$").toString().constructor(_0x110b02).search("(((.+)+)+)+$")}));function _0x27e125(e,t){this.id=e,this.buffer=t}_0x110b02();var _0x4351ae=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3f356e=_0x4351ae(void 0,(function(){return _0x3f356e.toString().search("(((.+)+)+)+$").toString().constructor(_0x3f356e).search("(((.+)+)+)+$")})),_0x2409f3;function _0x51c0ac(){}function _0x32b87c(e,t){for(var i=e.num_points(),n=e.num_faces(),r=new _0x2409f3.DracoInt32Array,o=3*n,a=fe$u.createTypedArray(i,o),s=0,l=0;l<n;++l)t.GetFaceFromMesh(e,l,r),a[s+0]=r.GetValue(0),a[s+1]=r.GetValue(1),a[s+2]=r.GetValue(2),s+=3;var u=fe$u.UNSIGNED_SHORT;return a instanceof Uint32Array&&(u=fe$u.UNSIGNED_INT),_0x2409f3.destroy(r),{typedArray:a,numberOfIndices:o,indexDataType:u}}function _0x2c849e(e,t,i,n,r){var o,a;n.quantizationBits<=8?(a=new _0x2409f3.DracoUInt8Array,o=new Uint8Array(r),t.GetAttributeUInt8ForAllPoints(e,i,a)):(a=new _0x2409f3.DracoUInt16Array,o=new Uint16Array(r),t.GetAttributeUInt16ForAllPoints(e,i,a));for(var s=0;s<r;++s)o[s]=a.GetValue(s);return _0x2409f3.destroy(a),o}function _0x42f48d(e,t,i,n){var r,o;switch(i.data_type()){case 1:case 11:o=new _0x2409f3.DracoInt8Array,r=new Int8Array(n),t.GetAttributeInt8ForAllPoints(e,i,o);break;case 2:o=new _0x2409f3.DracoUInt8Array,r=new Uint8Array(n),t.GetAttributeUInt8ForAllPoints(e,i,o);break;case 3:o=new _0x2409f3.DracoInt16Array,r=new Int16Array(n),t.GetAttributeInt16ForAllPoints(e,i,o);break;case 4:o=new _0x2409f3.DracoUInt16Array,r=new Uint16Array(n),t.GetAttributeUInt16ForAllPoints(e,i,o);break;case 5:case 7:o=new _0x2409f3.DracoInt32Array,r=new Int32Array(n),t.GetAttributeInt32ForAllPoints(e,i,o);break;case 6:case 8:o=new _0x2409f3.DracoUInt32Array,r=new Uint32Array(n),t.GetAttributeUInt32ForAllPoints(e,i,o);break;case 9:case 10:o=new _0x2409f3.DracoFloat32Array,r=new Float32Array(n),t.GetAttributeFloatForAllPoints(e,i,o)}for(var a=0;a<n;++a)r[a]=o.GetValue(a);return _0x2409f3.destroy(o),r}function _0x82e60a(e,t,i){var n,r=e.num_points(),o=i.num_components(),a=new _0x2409f3.AttributeQuantizationTransform;if(a.InitFromAttribute(i)){for(var s=new Array(o),l=0;l<o;++l)s[l]=a.min_value(l);n={quantizationBits:a.quantization_bits(),minValues:s,range:a.range(),octEncoded:!1}}_0x2409f3.destroy(a),(a=new _0x2409f3.AttributeOctahedronTransform).InitFromAttribute(i)&&(n={quantizationBits:a.quantization_bits(),octEncoded:!0}),_0x2409f3.destroy(a);var u,c=r*o;u=t$$(n)?_0x2c849e(e,t,i,n,c):_0x42f48d(e,t,i,c);var h=C$12.fromTypedArray(u);return{array:u,data:{componentsPerAttribute:o,componentDatatype:h,byteOffset:i.byte_offset(),byteStride:C$12.getSizeInBytes(h)*o,normalized:i.normalized(),quantization:n}}}_0x3f356e();var _0x43fe40=new a$11(40680631590769,40680631590769,40408299984661.445),_0x5220a1=new a$11,_0x4d9559=new a$11;function _0x2e8f19(e,t,i,n){var r=Math.cos(t);_0x5220a1.x=r*Math.cos(e),_0x5220a1.y=r*Math.sin(e),_0x5220a1.z=Math.sin(t),_0x5220a1=a$11.normalize(_0x5220a1,_0x5220a1),a$11.multiplyComponents(_0x43fe40,_0x5220a1,_0x4d9559);var o=Math.sqrt(a$11.dot(_0x5220a1,_0x4d9559));return _0x4d9559=a$11.divideByScalar(_0x4d9559,o,_0x4d9559),_0x5220a1=a$11.multiplyByScalar(_0x5220a1,i,_0x5220a1),t$$(n)||(n=new a$11),a$11.add(_0x4d9559,_0x5220a1,n)}var _0x43448f=new c$1a,_0xa260de=new c$1a,_0x23969c=new a$11,_0x52892b=new i$1g;function _0x5c3295(e,t,i,n,r,o,a,s){var l=void 0,u=void 0,c=void 0,h=void 0,d=i.vertexAttributes,f=i.attrLocation;if(i.nCompressOptions=0,t$$(n.posUniqueID)&&n.posUniqueID>=0){t$$(s)||(i.nCompressOptions|=_0x107fdf.SVC_Vertex);var p=t.GetAttribute(e,n.posUniqueID),_=_0x82e60a(e,t,p),m=_.data.componentsPerAttribute;i.verticesCount=_.array.length/m,i.vertCompressConstant=_.data.quantization.range/(1<<_.data.quantization.quantizationBits);var $=_.data.quantization.minValues;i.minVerticesValue=new a$10($[0],$[1],$[2],1),m>3&&(i.minVerticesValue.w=$[3]);var g=i.verticesCount;if(o&&(l=new i$1g,u=new i$1g,c=new Float32Array(2*g),h=new Float64Array(2*g)),t$$(s)){var y=_.array,v=3===m?a$11.unpackArray(y):a$10.unpackArray(y);for(let e=0,t=v.length;e<t;e++){let t=v[e];a$11.multiplyByScalar(t,i.vertCompressConstant,t),a$11.add(t,i.minVerticesValue,t)}var x=c$1a.multiply(s.sphereMatrix,s.geoMatrix,_0x43448f),b=c$1a.multiply(s.ellipsoidMatrix,s.geoMatrix,_0xa260de);c$1a.inverse(b,b);var S=new n$1c(6378137,6378137,6378137);for(let e=0,t=v.length;e<t;e++){let t=v[e];c$1a.multiplyByPoint(x,t,_0x23969c);let i=S.cartesianToCartographic(_0x23969c,_0x52892b);o&&(h[2*e]=i.longitude,h[2*e+1]=i.latitude,0===e?(l.longitude=i.longitude,l.latitude=i.latitude,u.longitude=i.longitude,u.latitude=i.latitude):(l.longitude=Math.max(i.longitude,l.longitude),l.latitude=Math.max(i.latitude,l.latitude),u.longitude=Math.min(i.longitude,u.longitude),u.latitude=Math.min(i.latitude,u.latitude)));let n=_0x2e8f19(i.longitude,i.latitude,i.height,_0x23969c);c$1a.multiplyByPoint(b,n,t)}var w=new Array(3*v.length);3===m?a$11.packArray(v,w):a$10.packArray(v,w),_.array=new Float32Array(w),_.data.componentDatatype=C$12.FLOAT,_.data.byteStride=4*m}if(f.aPosition=d.length,d.push({index:f.aPosition,typedArray:_.array,componentsPerAttribute:m,componentDatatype:_.data.componentDatatype,offsetInBytes:_.data.byteOffset,strideInBytes:_.data.byteStride,normalize:_.data.normalized}),!t$$(s)&&o)for(var C=new a$11,T=new a$11,P=new i$1g,E=0;E<g;E++)c$1a.multiplyByPoint(r,a$11.fromElements(_.array[3*E]*i.vertCompressConstant+$[0],_.array[3*E+1]*i.vertCompressConstant+$[1],_.array[3*E+2]*i.vertCompressConstant+$[2],C),T),P=i$1g.fromCartesian(T),h[2*E]=P.longitude,h[2*E+1]=P.latitude,0===E?(l.longitude=P.longitude,l.latitude=P.latitude,u.longitude=P.longitude,u.latitude=P.latitude):(l.longitude=Math.max(P.longitude,l.longitude),l.latitude=Math.max(P.latitude,l.latitude),u.longitude=Math.min(P.longitude,u.longitude),u.latitude=Math.min(P.latitude,u.latitude));if(o){for(E=0;E<g;E++)c[2*E]=h[2*E]-u.longitude,c[2*E+1]=h[2*E+1]-u.latitude;f.img=d.length,d.push({index:f.img,typedArray:c,componentsPerAttribute:2,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:2*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),a.max=l,a.min=u}}if(t$$(n.normalUniqueID)&&n.normalUniqueID>=0){i.nCompressOptions|=_0x107fdf.SVC_Normal;var A=t.GetAttribute(e,n.normalUniqueID),L=_0x82e60a(e,t,A),M=L.data.quantization;i.normalRangeConstant=(1<<M.quantizationBits)-1,f.aNormal=d.length,d.push({index:f.aNormal,typedArray:L.array,componentsPerAttribute:L.data.componentsPerAttribute,componentDatatype:L.data.componentDatatype,offsetInBytes:L.data.byteOffset,strideInBytes:L.data.byteStride,normalize:L.data.normalized})}if(t$$(n.colorUniqueID)&&n.colorUniqueID>=0){i.nCompressOptions|=_0x107fdf.SVC_VertexColor;var I=t.GetAttribute(e,n.colorUniqueID),O=_0x82e60a(e,t,I);f.aColor=d.length,d.push({index:f.aColor,typedArray:O.array,componentsPerAttribute:O.data.componentsPerAttribute,componentDatatype:O.data.componentDatatype,offsetInBytes:O.data.byteOffset,strideInBytes:O.data.byteStride,normalize:O.data.normalized})}for(E=0;E<n.texCoordUniqueIDs.length;E++){i.texCoordCompressConstant=[],i.minTexCoordValue=[];var D=n.texCoordUniqueIDs[E];if(!(D<0)){var R=t.GetAttribute(e,D),N=_0x82e60a(e,t,R);if(t$$(N.data.quantization)){i.nCompressOptions|=_0x107fdf.SVC_TexutreCoord,i.texCoordCompressConstant.push(N.data.quantization.range/(1<<N.data.quantization.quantizationBits));$=N.data.quantization.minValues;i.minTexCoordValue.push(new r$T($[0],$[1]))}var F="aTexCoord"+E;f[F]=d.length,d.push({index:f[F],typedArray:N.array,componentsPerAttribute:N.data.componentsPerAttribute,componentDatatype:N.data.componentDatatype,offsetInBytes:N.data.byteOffset,strideInBytes:N.data.byteStride,normalize:N.data.normalized}),i.textureCoordIsW=!0}}for(E=0;E<n.vertexAttrUniqueIDs.length;E++){var B=n.vertexAttrUniqueIDs[E];if(!(B<0)){var z=t.GetAttribute(e,B),G=_0x82e60a(e,t,z);f.aVertexWeight=d.length,d.push({index:f.aVertexWeight,typedArray:G.array,componentsPerAttribute:G.data.componentsPerAttribute,componentDatatype:G.data.componentDatatype,offsetInBytes:G.data.byteOffset,strideInBytes:G.data.byteStride,normalize:G.data.normalized}),i.customVertexAttribute={VertexWeight:0}}}}_0x51c0ac.dracoDecodePointCloud=function(e,t,i,n,r){for(var o=new(_0x2409f3=e).Decoder,a=["POSITION","NORMAL","COLOR"],s=0;s<a.length;++s)o.SkipAttributeTransform(_0x2409f3[a[s]]);var l=new _0x2409f3.DecoderBuffer;if(l.Init(t,i),o.GetEncodedGeometryType(l)!==_0x2409f3.POINT_CLOUD)throw new t$Z("Draco geometry type must be POINT_CLOUD.");var u=new _0x2409f3.PointCloud,c=o.DecodeBufferToPointCloud(l,u);if(!c.ok()||0===u.ptr)throw new t$Z("Error decoding draco point cloud: "+c.error_msg());_0x2409f3.destroy(l),_0x5c3295(u,o,n,r),_0x2409f3.destroy(u),_0x2409f3.destroy(o)},_0x51c0ac.dracoDecodeMesh=function(e,t,i,n,r,o,a,s,l,u){for(var c=new(_0x2409f3=e).Decoder,h=["POSITION","NORMAL","COLOR","TEX_COORD"],d=0;d<h.length;++d)c.SkipAttributeTransform(_0x2409f3[h[d]]);var f=new _0x2409f3.DecoderBuffer;if(f.Init(t,i),c.GetEncodedGeometryType(f)!==_0x2409f3.TRIANGULAR_MESH)throw new t$Z("Unsupported draco mesh geometry type.");var p=new _0x2409f3.Mesh;if(!c.DecodeBufferToMesh(f,p).ok()||0===p.ptr)return!1;_0x2409f3.destroy(f),_0x5c3295(p,c,n,o,a,s,l,u);var _=_0x32b87c(p,c);r.indicesTypedArray=_.typedArray,r.indicesCount=_.numberOfIndices,r.indexType=_.indexDataType,r.primitiveType=H$11.TRIANGLES,_0x2409f3.destroy(p),_0x2409f3.destroy(c)};var _0x3df4ab=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x8b5fc8=_0x3df4ab(void 0,(function(){return _0x8b5fc8.toString().search("(((.+)+)+)+$").toString().constructor(_0x8b5fc8).search("(((.+)+)+)+$")}));function _0x3f7254(){this._cache={},this._cacheHeap=new o$14({comparator:sortComparator}),this._cacheHeap.maximumLength=100}function f$p(e){if(!t$$((e=e$1Y(e,e$1Y.EMPTY_OBJECT)).missingImageUrl))throw new t$_("options.missingImageUrl is required.");if(!t$$(e.pixelsToCheck))throw new t$_("options.pixelsToCheck is required.");this._pixelsToCheck=e.pixelsToCheck,this._missingImagePixels=void 0,this._missingImageByteLength=void 0,this._isReady=!1;var t=t$X.createIfNeeded(e.missingImageUrl),i=this;t.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}).then((function(t){t$$(t.blob)&&(i._missingImageByteLength=t.blob.size);var n=i$W(t);if(e.disableCheckIfAllPixelsAreTransparent){for(var r=!0,o=t.width,a=e.pixelsToCheck,s=0,l=a.length;r&&s<l;++s){var u=a[s];n[4*u.x+u.y*o+3]>0&&(r=!1)}r&&(n=void 0)}i._missingImagePixels=n,i._isReady=!0})).otherwise((function(){i._missingImagePixels=void 0,i._isReady=!0}))}function s$i(){this.name=void 0,this.description=void 0,this.position=void 0,this.data=void 0,this.imageryLayer=void 0}function o$n(){this.defaultAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,t$_.throwInstantiationError()}_0x8b5fc8(),_0x3f7254.prototype.set=function(e,t){var i={id:e,buffer:t,priority:yt$9()};this._cache[e]=i;var n=this._cacheHeap.insert(i);t$$(n)&&delete this._cache[n.id]},_0x3f7254.prototype.get=function(e){var t=this._cache[e];if(t$$(t))return t},_0x3f7254.prototype.contains=function(e){return t$$(this._cache[e])},f$p.prototype.isReady=function(){return this._isReady},f$p.prototype.shouldDiscardImage=function(e){if(!this._isReady)throw new t$_("shouldDiscardImage must not be called before the discard policy is ready.");var t=this._pixelsToCheck,i=this._missingImagePixels;if(!t$$(i)||t$$(e.blob)&&e.blob.size!==this._missingImageByteLength)return!1;for(var n=i$W(e),r=e.width,o=0,a=t.length;o<a;++o)for(var s=t[o],l=4*s.x+s.y*r,u=0;u<4;++u){var c=l+u;if(n[c]!==i[c])return!1}return!0},s$i.prototype.configureNameFromProperties=function(e){var t,i=10;for(var n in e)if(e.hasOwnProperty(n)&&e[n]){var r=n.toLowerCase();i>1&&"name"===r?(i=1,t=n):i>2&&"title"===r?(i=2,t=n):i>3&&/name/i.test(n)?(i=3,t=n):i>4&&/title/i.test(n)&&(i=4,t=n)}t$$(t)&&(this.name=e[t])},s$i.prototype.configureDescriptionFromProperties=function(e){this.description=function e(t){var i='<table class="cesium-infoBox-defaultTable">';for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];t$$(r)&&(i+="object"==typeof r?"<tr><td>"+n+"</td><td>"+e(r)+"</td></tr>":"<tr><td>"+n+"</td><td>"+r+"</td></tr>")}return i+="</table>"}(e)},Object.defineProperties(o$n.prototype,{ready:{get:t$_.throwInstantiationError},readyPromise:{get:t$_.throwInstantiationError},rectangle:{get:t$_.throwInstantiationError},tileWidth:{get:t$_.throwInstantiationError},tileHeight:{get:t$_.throwInstantiationError},maximumLevel:{get:t$_.throwInstantiationError},minimumLevel:{get:t$_.throwInstantiationError},tilingScheme:{get:t$_.throwInstantiationError},tileDiscardPolicy:{get:t$_.throwInstantiationError},errorEvent:{get:t$_.throwInstantiationError},credit:{get:t$_.throwInstantiationError},proxy:{get:t$_.throwInstantiationError},hasAlphaChannel:{get:t$_.throwInstantiationError}}),o$n.prototype.getTileCredits=t$_.throwInstantiationError,o$n.prototype.requestImage=t$_.throwInstantiationError,o$n.prototype.pickFeatures=t$_.throwInstantiationError;var p$l=/\.ktx$/i,u$j=/\.crn$/i,g$d=/\.dxtz$/i;function b$o(e){if(!t$$((e=e$1Y(e,e$1Y.EMPTY_OBJECT)).url))throw new t$_("options.url is required.");this._baseUrl=e.url;var t=t$X.createIfNeeded(e.url);t.appendForwardSlash(),t$$(e.token)&&t.setQueryParameters({token:e.token}),this._resource=t,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tileWidth=e$1Y(e.tileWidth,256),this._tileHeight=e$1Y(e.tileHeight,256),this._maximumLevel=e.maximumLevel,this._tilingScheme=e$1Y(e.tilingScheme,new a$W({ellipsoid:e.ellipsoid})),this._useTiles=e$1Y(e.usePreCachedTilesIfAvailable,!0),this._rectangle=e$1Y(e.rectangle,this._tilingScheme.rectangle),this._layers=e.layers;var i=e.credit;"string"==typeof i&&(i=new i$17(i)),this._credit=i,this.enablePickFeatures=e$1Y(e.enablePickFeatures,!0),this._errorEvent=new o$15,this._ready=!1,this._readyPromise=c$18.defer();var n,r=this,o=e.url;function a(t){var i=t.tileInfo;if(t$$(i)){if(r._tileWidth=i.rows,r._tileHeight=i.cols,102100===i.spatialReference.wkid||102113===i.spatialReference.wkid)r._tilingScheme=new o$Z({ellipsoid:e.ellipsoid});else{if(4326!==t.tileInfo.spatialReference.wkid){var o="Tile spatial reference WKID "+t.tileInfo.spatialReference.wkid+" is not supported.";return void(n=c$_.handleError(n,r,r._errorEvent,o,void 0,void 0,void 0,l))}r._tilingScheme=new a$W({ellipsoid:e.ellipsoid})}if(r._maximumLevel=t.tileInfo.lods.length-1,t$$(t.fullExtent)){if(t$$(t.fullExtent.spatialReference)&&t$$(t.fullExtent.spatialReference.wkid))if(102100===t.fullExtent.spatialReference.wkid||102113===t.fullExtent.spatialReference.wkid){var a=new e$1H,s=t.fullExtent,u=a.unproject(new a$11(Math.max(s.xmin,-r._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.max(s.ymin,-r._tilingScheme.ellipsoid.maximumRadius*Math.PI),0)),c=a.unproject(new a$11(Math.min(s.xmax,r._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.min(s.ymax,r._tilingScheme.ellipsoid.maximumRadius*Math.PI),0));r._rectangle=new s$1p(u.longitude,u.latitude,c.longitude,c.latitude)}else{if(4326!==t.fullExtent.spatialReference.wkid){var h="fullExtent.spatialReference WKID "+t.fullExtent.spatialReference.wkid+" is not supported.";return void(n=c$_.handleError(n,r,r._errorEvent,h,void 0,void 0,void 0,l))}r._rectangle=s$1p.fromDegrees(t.fullExtent.xmin,t.fullExtent.ymin,t.fullExtent.xmax,t.fullExtent.ymax)}}else r._rectangle=r._tilingScheme.rectangle;t$$(r._tileDiscardPolicy)||(r._tileDiscardPolicy=new f$p({missingImageUrl:F$j(r,0,0,r._maximumLevel).url,pixelsToCheck:[new r$T(0,0),new r$T(200,20),new r$T(20,200),new r$T(80,110),new r$T(160,130)],disableCheckIfAllPixelsAreTransparent:!0})),r._useTiles=!0}else r._useTiles=!1;t$$(t.copyrightText)&&t.copyrightText.length>0&&(r._credit=new i$17(t.copyrightText)),r._ready=!0,r._readyPromise.resolve(!0),c$_.handleSuccess(n)}function s(e){var t="An error occurred while accessing "+r._resource.url+".";n=c$_.handleError(n,r,r._errorEvent,t,void 0,void 0,void 0,l),r._readyPromise.reject(new t$Z(t))}function l(){c$18(r._resource.getDerivedResource({queryParameters:{f:"json"}}).fetchJsonp(),a,s)}r.tablename=e.url,new d$_({name:o}).then((function(e){e.checkObjectStoreExit(r.tablename)?r._indexedDBScheduler=e:e.createObjectStore(r.tablename).then((function(){r._indexedDBScheduler=e}))})),r._indexedDBSetting={isOpen:!1,clear:function(){r._indexedDBScheduler.clear(r.tablename)},cache:[]},this._useTiles?l():(this._ready=!0,this._readyPromise.resolve(!0))}function F$j(e,t,i,n,r){var o;if(e._useTiles)o=e._resource.getDerivedResource({url:"tile/"+n+"/"+i+"/"+t,request:r});else{var a=e._tilingScheme.tileXYToNativeRectangle(t,i,n),s={bbox:a.west+","+a.south+","+a.east+","+a.north,size:e._tileWidth+","+e._tileHeight,format:"png",transparent:!0,f:"image"};e._tilingScheme.projection instanceof s$1q?(s.bboxSR=4326,s.imageSR=4326):(s.bboxSR=3857,s.imageSR=3857),e.layers&&(s.layers="show:"+e.layers),o=e._resource.getDerivedResource({url:"export",request:r,queryParameters:s})}return o}function G$k(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;e$1B(t,o)?e$1B(e,o)&&(a|=1):(a|=2,e$1B(e,o)||(a|=1)),n+=a}return n}function a$i(){this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._ready=!1,this._name="czm_autoexposure",this._logDepthChanged=void 0,this._useLogDepth=void 0,this._framebuffers=void 0,this._previousLuminance=void 0,this._commands=void 0,this._clearCommand=void 0,this._minMaxLuminance=new r$T,this.enabled=!0,this._enabled=!0,this.minimumLuminance=.1,this.maximumLuminance=10}function d$i(e){var t=e._framebuffers;if(t$$(t)){for(var i=t.length,n=0;n<i;++n)t[n].destroy();e._framebuffers=void 0,e._previousLuminance.destroy(),e._previousLuminance=void 0}}function C$i(e,t){d$i(e);for(var i=e._width,n=e._height,r=Z$_.RGBA,o=t.halfFloatingPointTexture?v$Z.HALF_FLOAT:v$Z.FLOAT,a=new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST}),s=Math.ceil(Math.log(Math.max(i,n))/Math.log(3)),l=new Array(s),u=0;u<s;++u)i=Math.max(Math.ceil(i/3),1),n=Math.max(Math.ceil(n/3),1),l[u]=new u$F({context:t,colorTextures:[new P$S({context:t,width:i,height:n,pixelFormat:r,pixelDatatype:o,sampler:a})]});var c=l[s-1].getColorTexture(0);e._previousLuminance=new u$F({context:t,colorTextures:[new P$S({context:t,width:c.width,height:c.height,pixelFormat:r,pixelDatatype:o,sampler:a})]}),e._framebuffers=l}function v$k(e){var t=e._commands;if(t$$(t)){for(var i=t.length,n=0;n<i;++n)t[n].shaderProgram.destroy();e._commands=void 0}}function A$q(e,t){var i;if(0===t)i={colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions}};else{var n=e._framebuffers[t-1].getColorTexture(0);i={colorTexture:function(){return n},colorTextureDimensions:function(){return n.dimensions}}}return i.minMaxLuminance=function(){return e._minMaxLuminance},i.previousLuminance=function(){return e._previousLuminance.getColorTexture(0)},i}function F$i(e,t){var i="uniform sampler2D colorTexture; \nvarying vec2 v_textureCoordinates; \nfloat sampleTexture(vec2 offset) { \n";return i+=0===e?" vec4 color = texture2D(colorTexture, v_textureCoordinates + offset); \n return czm_luminance(color.rgb); \n":" return texture2D(colorTexture, v_textureCoordinates + offset).r; \n",i+="}\n\n",i+="uniform vec2 colorTextureDimensions; \nuniform vec2 minMaxLuminance; \nuniform sampler2D previousLuminance; \nvoid main() { \n float color = 0.0; \n float xStep = 1.0 / colorTextureDimensions.x; \n float yStep = 1.0 / colorTextureDimensions.y; \n int count = 0; \n for (int i = 0; i < 3; ++i) { \n for (int j = 0; j < 3; ++j) { \n vec2 offset; \n offset.x = -xStep + float(i) * xStep; \n offset.y = -yStep + float(j) * yStep; \n if (offset.x < 0.0 || offset.x > 1.0 || offset.y < 0.0 || offset.y > 1.0) { \n continue; \n } \n color += sampleTexture(offset); \n ++count; \n } \n } \n if (count > 0) { \n color /= float(count); \n } \n",e===t-1&&(i+=" float previous = texture2D(previousLuminance, vec2(0.5)).r; \n color = clamp(color, minMaxLuminance.x, minMaxLuminance.y); \n color = previous + (color - previous) / (60.0 * 1.5); \n color = clamp(color, minMaxLuminance.x, minMaxLuminance.y); \n"),i+=" gl_FragColor = vec4(color); \n} \n"}function S$h(e,t){v$k(e);for(var i=e._framebuffers,n=i.length,r=new Array(n),o=0;o<n;++o)r[o]=t.createViewportQuadCommand(F$i(o,n),{framebuffer:i[o],uniformMap:A$q(e,o)});e._commands=r}o$n.loadImage=function(e,t,i){n$1e.defined("url",t);var n=t$X.createIfNeeded(t);return t$$(i)?n.fetchArrayBuffer():p$l.test(n.url)?k$L(n):u$j.test(n.url)?I$W(n):g$d.test(n.url)?(e.flipY=!0,p$_(n)):t$$(e.tileDiscardPolicy)?n.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):(t$$(e._customRequestHeaders)&&(n.headers=s$1n(n.headers,e._customRequestHeaders)),n.fetchBlob())},Object.defineProperties(b$o.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(){if(!this._ready)throw new t$_("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$_("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$_("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$_("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new t$_("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new t$_("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$_("tileDiscardPolicy must not be called before the imagery provider is ready.");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}}}),b$o.prototype.getTileCredits=function(e,t,i){},b$o.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$_("requestImage must not be called before the imagery provider is ready.");var r=F$j(this,e,t,i,n);if(t$$(a$R.CREDENTIAL)&&(t$$(a$R.CREDENTIAL._keymap[this._baseUrl])?r.url=a$R.addTokenWithKey(this._baseUrl,r.url):r.url=a$R.addToken(r.url)),n.quadKey=G$k(e,t,i),!0===this._indexedDBSetting.isOpen&&!0===n.cacheEnable){if(t$$(this._indexedDBScheduler)){var o=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey);return t$$(o)?c$18(o,(function(e){return t$$(e)?e:"cacheError"}),(function(e){return"cacheError"})):o$n.loadImage(this,r)}return o$n.loadImage(this,r)}return o$n.loadImage(this,r)},b$o.prototype.pickFeatures=function(e,t,i,n,r){if(!this._ready)throw new t$_("pickFeatures must not be called before the imagery provider is ready.");if(this.enablePickFeatures){var o,a,s,l=this._tilingScheme.tileXYToNativeRectangle(e,t,i);if(this._tilingScheme.projection instanceof s$1q)o=n$1d.toDegrees(n),a=n$1d.toDegrees(r),s="4326";else{var u=this._tilingScheme.projection.project(new i$1g(n,r,0));o=u.x,a=u.y,s="3857"}var c="visible";t$$(this._layers)&&(c+=":"+this._layers);var h={f:"json",tolerance:2,geometryType:"esriGeometryPoint",geometry:o+","+a,mapExtent:l.west+","+l.south+","+l.east+","+l.north,imageDisplay:this._tileWidth+","+this._tileHeight+",96",sr:s,layers:c};return this._resource.getDerivedResource({url:"identify",queryParameters:h}).fetchJson().then((function(e){var t=[],i=e.results;if(!t$$(i))return t;for(var n=0;n<i.length;++n){var r=i[n],o=new s$i;if(o.data=r,o.name=r.value,o.properties=r.attributes,o.configureDescriptionFromProperties(r.attributes),"esriGeometryPoint"===r.geometryType&&r.geometry){var a=r.geometry.spatialReference&&r.geometry.spatialReference.wkid?r.geometry.spatialReference.wkid:4326;if(4326===a||4283===a)o.position=i$1g.fromDegrees(r.geometry.x,r.geometry.y,r.geometry.z);else if(102100===a||900913===a||3857===a){var s=new e$1H;o.position=s.unproject(new a$11(r.geometry.x,r.geometry.y,r.geometry.z))}}t.push(o)}return t}))}},Object.defineProperties(a$i.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},outputTexture:{get:function(){var e=this._framebuffers;if(t$$(e))return e[e.length-1].getColorTexture(0)}}}),a$i.prototype.clear=function(e){var t=this._framebuffers;if(t$$(t)){var i=this._clearCommand;t$$(i)||(i=this._clearCommand=new r$M({color:new e$1z(0,0,0,0),framebuffer:void 0}));for(var n=t.length,r=0;r<n;++r)i.framebuffer=t[r],i.execute(e)}},a$i.prototype.update=function(e){var t=e.drawingBufferWidth,i=e.drawingBufferHeight;(t!==this._width||i!==this._height)&&(this._width=t,this._height=i,C$i(this,e),S$h(this,e),this._ready||(this._ready=!0)),this._minMaxLuminance.x=this.minimumLuminance,this._minMaxLuminance.y=this.maximumLuminance;var n=this._framebuffers,r=n[n.length-1];n[n.length-1]=this._previousLuminance,this._commands[this._commands.length-1].framebuffer=this._previousLuminance,this._previousLuminance=r},a$i.prototype.execute=function(e,t){this._colorTexture=t;var i=this._commands;if(t$$(i))for(var n=i.length,r=0;r<n;++r)i[r].execute(e)},a$i.prototype.isDestroyed=function(){return!1},a$i.prototype.destroy=function(){return d$i(this),v$k(this),s$1e(this)};var A$p={AERIAL:"Aerial",AERIAL_WITH_LABELS:"AerialWithLabels",AERIAL_WITH_LABELS_ON_DEMAND:"AerialWithLabelsOnDemand",ROAD:"Road",ROAD_ON_DEMAND:"RoadOnDemand",CANVAS_DARK:"CanvasDark",CANVAS_LIGHT:"CanvasLight",CANVAS_GRAY:"CanvasGray",ORDNANCE_SURVEY:"OrdnanceSurvey",COLLINS_BART:"CollinsBart"},W$d=Object.freeze(A$p),e$l;function A$o(e){}function o$m(e){if(!t$$((e=e$1Y(e,e$1Y.EMPTY_OBJECT)).url))throw new t$_("options.url is required.");this._key=e$1E.getKey(e.key),this._resource=t$X.createIfNeeded(e.url),this._resource.appendForwardSlash(),this._tileProtocol=e.tileProtocol,this._mapStyle=e$1Y(e.mapStyle,W$d.AERIAL),this._culture=e$1Y(e.culture,""),this._tileDiscardPolicy=e.tileDiscardPolicy,t$$(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new A$o),this._proxy=e.proxy,this._credit=new i$17('<a href="http://www.bing.com"><img src="'+o$m.logoUrl+'" title="Bing Imagery"/></a>'),this.defaultGamma=1,this._tilingScheme=new o$Z({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:e.ellipsoid}),this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=e$1Y(e.maximumLevel,void 0),this._imageUrlTemplate=void 0,this._imageUrlSubdomains=void 0,this._errorEvent=new o$15,this._ready=!1,this._readyPromise=c$18.defer();var t=this._tileProtocol;t$$(t)?t.length>0&&":"===t[t.length-1]&&(t=t.substr(0,t.length-1)):t="http:"===document.location.protocol?"http":"https";var i,n=this._resource.getDerivedResource({url:"REST/v1/Imagery/Metadata/"+this._mapStyle,queryParameters:{incl:"ImageryProviders",key:this._key,uriScheme:t}}),r=this;function o(e){if(1===e.resourceSets.length){var t=e.resourceSets[0].resources[0];r._tileWidth=t.imageWidth,r._tileHeight=t.imageHeight,r._maximumLevel=t$$(r._maximumLevel)?r._maximumLevel:t.zoomMax-1,r._imageUrlSubdomains=t.imageUrlSubdomains,r._imageUrlTemplate=t.imageUrl;var n=r._attributionList=t.imageryProviders;n||(n=r._attributionList=[]);for(var o=0,s=n.length;o<s;++o){var l=n[o];if(l.credit instanceof i$17)break;l.credit=new i$17(l.attribution);for(var u=l.coverageAreas,c=0,h=l.coverageAreas.length;c<h;++c){var d=u[c],f=d.bbox;d.bbox=new s$1p(n$1d.toRadians(f[1]),n$1d.toRadians(f[0]),n$1d.toRadians(f[3]),n$1d.toRadians(f[2]))}}r._ready=!0,r._readyPromise.resolve(!0),c$_.handleSuccess(i)}else a()}function a(e){var t="An error occurred while accessing "+n.url+".";i=c$_.handleError(i,r,r._errorEvent,t,void 0,void 0,void 0,l),r._readyPromise.reject(new t$Z(t))}var s=n.url;function l(){var e=n.fetchJsonp("jsonp");o$m._metadataCache[s]=e,e.then(o).otherwise(a)}var u=o$m._metadataCache[s];t$$(u)?u.then(o).otherwise(a):l()}A$o.prototype.isReady=function(){return!0},A$o.prototype.shouldDiscardImage=function(e){return A$o.EMPTY_IMAGE===e},Object.defineProperties(A$o,{EMPTY_IMAGE:{get:function(){return t$$(e$l)||((e$l=new Image).src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),e$l}}}),Object.defineProperties(o$m.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},key:{get:function(){return this._key}},mapStyle:{get:function(){return this._mapStyle}},culture:{get:function(){return this._culture}},tileWidth:{get:function(){if(!this._ready)throw new t$_("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$_("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$_("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$_("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new t$_("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new t$_("rectangle must not be called before the imagery provider is ready.");return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$_("tileDiscardPolicy must not be called before the imagery provider is ready.");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}},hasAlphaChannel:{get:function(){return!1}}});var z$i=new s$1p;function O$e(e,t,i,n,r){var o=e._imageUrlTemplate,a=e._imageUrlSubdomains,s=(t+i+n)%a.length;return e._resource.getDerivedResource({url:o,request:r,templateValues:{quadkey:o$m.tileXYToQuadKey(t,i,n),subdomain:a[s],culture:e._culture},queryParameters:{n:"z"}})}o$m.prototype.getTileCredits=function(e,t,i){if(!this._ready)throw new t$_("getTileCredits must not be called before the imagery provider is ready.");var n=this._tilingScheme.tileXYToRectangle(e,t,i,z$i);return K$a(this._attributionList,i,n)},o$m.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$_("requestImage must not be called before the imagery provider is ready.");var r=o$n.loadImage(this,O$e(this,e,t,i,n));if(t$$(r))return r.otherwise((function(e){return t$$(e.blob)&&0===e.blob.size?A$o.EMPTY_IMAGE:c$18.reject(e)}))},o$m.prototype.pickFeatures=function(e,t,i,n,r){},o$m.tileXYToQuadKey=function(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;0!=(e&o)&&(a|=1),0!=(t&o)&&(a|=2),n+=a}return n},o$m.quadKeyToTileXY=function(e){for(var t=0,i=0,n=e.length-1,r=n;r>=0;--r){var o=1<<r,a=+e[n-r];0!=(1&a)&&(t|=o),0!=(2&a)&&(i|=o)}return{x:t,y:i,level:n}},o$m._logoUrl=void 0,Object.defineProperties(o$m,{logoUrl:{get:function(){return t$$(o$m._logoUrl)||(o$m._logoUrl=o$12("Assets/Images/bing_maps_credit.png")),o$m._logoUrl},set:function(e){n$1e.defined("value",e),o$m._logoUrl=e}}});var X$8=new s$1p;function K$a(e,t,i){++t;for(var n=[],r=0,o=e.length;r<o;++r){for(var a=e[r],s=a.coverageAreas,l=!1,u=0,c=a.coverageAreas.length;!l&&u<c;++u){var h=s[u];if(t>=h.zoomMin&&t<=h.zoomMax)t$$(s$1p.intersection(i,h.bbox,X$8))&&(l=!0)}l&&n.push(a.credit)}return n}o$m._metadataCache={};var Z$e="uniform sampler2D u_MainTex;\nuniform vec2 u_MainTex_TexelSize;\nuniform float u_Threshold;\nuniform float u_Params;\nvarying vec2 v_textureCoordinates;\nconst vec3 lumWeight = vec3(0.2125, 0.7154, 0.0721);\nvec4 DownsampleBox13Tap(sampler2D samplerTex, vec2 uv, vec2 texelSize)\n{\nvec4 A = texture2D(samplerTex, uv + texelSize * vec2(-1.0, -1.0));\nvec4 B = texture2D(samplerTex, uv + texelSize * vec2( 0.0, -1.0));\nvec4 C = texture2D(samplerTex, uv + texelSize * vec2( 1.0, -1.0));\nvec4 D = texture2D(samplerTex, uv + texelSize * vec2(-0.5, -0.5));\nvec4 E = texture2D(samplerTex, uv + texelSize * vec2( 0.5, -0.5));\nvec4 F = texture2D(samplerTex, uv + texelSize * vec2(-1.0, 0.0));\nvec4 G = texture2D(samplerTex, uv );\nvec4 H = texture2D(samplerTex, uv + texelSize * vec2( 1.0, 0.0));\nvec4 I = texture2D(samplerTex, uv + texelSize * vec2(-0.5, 0.5));\nvec4 J = texture2D(samplerTex, uv + texelSize * vec2( 0.5, 0.5));\nvec4 K = texture2D(samplerTex, uv + texelSize * vec2(-1.0, 1.0));\nvec4 L = texture2D(samplerTex, uv + texelSize * vec2( 0.0, 1.0));\nvec4 M = texture2D(samplerTex, uv + texelSize * vec2( 1.0, 1.0));\nvec2 div = (1.0 / 4.0) * vec2(0.5, 0.125);\nvec4 o = (D + E + I + J) * div.x;\no += (A + B + G + F) * div.y;\no += (B + C + H + G) * div.y;\no += (F + G + L + K) * div.y;\no += (G + H + M + L) * div.y;\nreturn o;\n}\nvec4 QuadraticThreshold(vec4 color, float threshold, vec3 curve)\n{\nfloat br = max(max(color.r, color.g), color.b);\nfloat rq = clamp(br - curve.x, 0.0, curve.y);\nrq = curve.z * rq * rq;\ncolor *= max(rq, br - threshold) / max(br, 1.0e-4);\nreturn color;\n}\nvec4 Prefilter(vec4 color, vec2 uv)\n{\nfloat br = max(max(color.r, color.g), color.b);\nif(br < u_Threshold)\n{\ncolor = vec4(0.0);\n}\nreturn color;\n}\nvec4 SafeHDR(vec4 c)\n{\nreturn min(c, 65504.0);\n}\nvoid main()\n{\nvec4 color = DownsampleBox13Tap(u_MainTex, v_textureCoordinates, u_MainTex_TexelSize.xy);\ngl_FragColor = Prefilter(SafeHDR(color), v_textureCoordinates);\n}\n",$$b="uniform sampler2D u_MainTex;\nuniform vec2 u_MainTex_TexelSize;\nvarying vec2 v_textureCoordinates;\nvec4 DownsampleBox13Tap(sampler2D samplerTex, vec2 uv, vec2 texelSize)\n{\nvec4 A = texture2D(samplerTex, uv + texelSize * vec2(-1.0, -1.0));\nvec4 B = texture2D(samplerTex, uv + texelSize * vec2( 0.0, -1.0));\nvec4 C = texture2D(samplerTex, uv + texelSize * vec2( 1.0, -1.0));\nvec4 D = texture2D(samplerTex, uv + texelSize * vec2(-0.5, -0.5));\nvec4 E = texture2D(samplerTex, uv + texelSize * vec2( 0.5, -0.5));\nvec4 F = texture2D(samplerTex, uv + texelSize * vec2(-1.0, 0.0));\nvec4 G = texture2D(samplerTex, uv );\nvec4 H = texture2D(samplerTex, uv + texelSize * vec2( 1.0, 0.0));\nvec4 I = texture2D(samplerTex, uv + texelSize * vec2(-0.5, 0.5));\nvec4 J = texture2D(samplerTex, uv + texelSize * vec2( 0.5, 0.5));\nvec4 K = texture2D(samplerTex, uv + texelSize * vec2(-1.0, 1.0));\nvec4 L = texture2D(samplerTex, uv + texelSize * vec2( 0.0, 1.0));\nvec4 M = texture2D(samplerTex, uv + texelSize * vec2( 1.0, 1.0));\nvec2 div = (1.0 / 4.0) * vec2(0.5, 0.125);\nvec4 o = (D + E + I + J) * div.x;\no += (A + B + G + F) * div.y;\no += (B + C + H + G) * div.y;\no += (F + G + L + K) * div.y;\no += (G + H + M + L) * div.y;\nreturn o;\n}\nvec4 DownsampleBox4Tap(sampler2D samplerTex, vec2 uv, vec2 texelSize)\n{\nvec4 d = texelSize.xyxy * vec4(-1.0, -1.0, 1.0, 1.0);\nvec4 s;\ns = texture2D(samplerTex, uv + d.xy);\ns += texture2D(samplerTex, uv + d.zy);\ns += texture2D(samplerTex, uv + d.xw);\ns += texture2D(samplerTex, uv + d.zw);\nreturn s * (1.0 / 4.0);\n}\nvoid main()\n{\nvec4 color = DownsampleBox13Tap(u_MainTex, v_textureCoordinates, u_MainTex_TexelSize.xy);\ngl_FragColor = color;\n}\n",tt$3="uniform sampler2D u_MainTex;\nuniform sampler2D u_BloomTex;\nuniform vec2 u_MainTex_TexelSize;\nuniform float u_SampleScale;\nvarying vec2 v_textureCoordinates;\nvec4 Combine(vec4 bloom, vec2 uv)\n{\nvec4 color = texture2D(u_BloomTex, uv);\nreturn bloom + color;\n}\nvec4 UpsampleTent(sampler2D samplerTex, vec2 uv, vec2 texelSize, vec4 sampleScale)\n{\nvec4 d = texelSize.xyxy * vec4(1.0, 1.0, -1.0, 0.0) * sampleScale;\nvec4 s;\ns = texture2D(samplerTex, uv - d.xy);\ns += texture2D(samplerTex, uv - d.wy) * 2.0;\ns += texture2D(samplerTex, uv - d.zy);\ns += texture2D(samplerTex, uv + d.zw) * 2.0;\ns += texture2D(samplerTex, uv ) * 4.0;\ns += texture2D(samplerTex, uv + d.xw) * 2.0;\ns += texture2D(samplerTex, uv + d.zy);\ns += texture2D(samplerTex, uv + d.wy) * 2.0;\ns += texture2D(samplerTex, uv + d.xy);\nreturn s * (1.0 / 16.0);\n}\nvec4 UpsampleBox(sampler2D samplerTex, vec2 uv, vec2 texelSize, vec4 sampleScale)\n{\nvec4 d = texelSize.xyxy * vec4(-1.0, -1.0, 1.0, 1.0) * (sampleScale * 0.5);\nvec4 s;\ns = texture2D(samplerTex, uv + d.xy);\ns += texture2D(samplerTex, uv + d.zy);\ns += texture2D(samplerTex, uv + d.xw);\ns += texture2D(samplerTex, uv + d.zw);\nreturn s * (1.0 / 4.0);\n}\nvoid main()\n{\nvec4 bloom = UpsampleTent(u_MainTex, v_textureCoordinates, u_MainTex_TexelSize.xy, vec4(u_SampleScale));\ngl_FragColor = Combine(bloom, v_textureCoordinates);\n}\n",G$j=16;function e$k(){this._fbo=void 0,this._downSamplePassState=new t$l,this._upSamplePassState=new t$l,this._show=!1,this._context=void 0,this.anamorphicRatio=0,this.diffusion=7,this._iterations=0,this._sampleScale=1,this._dirtTileOffset=new a$10(1,1,0,0),this._shaderSettings=new a$11,this._bloomColor=new a$11(1,1,1),this._threshold=0,this._softKnee=.5,this._clamp=65472,this._params=1,this._intensity=1.34,this._dirtIntensity=0,this._dirtTexUrl=o$12("Assets/Textures/NoiseAndGrain.png"),this._dirtTexture=void 0,this._lastUpFBO=void 0,this._Pyramid=[];for(var e=0;e<G$j;e++){this._Pyramid.push({})}this._clearCommand=new r$M({color:new e$1z})}Object.defineProperties(e$k.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(t$$(this._owner)&&this._owner.bloomShowChange(e),this._show=e)}},bloomIntensity:{get:function(){return this._intensity},set:function(e){this._intensity=e}},bloomDirtTexIntensity:{get:function(){return this._dirtIntensity},set:function(e){this._dirtIntensity=e}},threshold:{get:function(){return this._threshold},set:function(e){this._threshold=e}}}),e$k.prototype.clear=function(e,t){for(var i=0;i<this._iterations;i++){var n=this._clearCommand;n.framebuffer=this._Pyramid[i].downSampleFBO,e$1z.clone(e$1Y(t,e$1z.BLACK),n.color),n.execute(e),n.framebuffer=this._Pyramid[i].upSampleFBO,e$1z.clone(e$1Y(t,e$1z.BLACK),n.color),n.execute(e)}};var h$k=new r$T;e$k.prototype.execute=function(e,t){var i=this,n=this._fbo;t$$(this._context)&&this._context.numPostEffectFilterObject>0&&(n=this._scene._postEffectFilterFramebuffer.renderTexture._fb);for(var r=0;r<this._iterations;r++){var o=this._Pyramid[r].downCommand;h$k.x=1/n.getColorTexture(0).width,h$k.y=1/n.getColorTexture(0).height,o.uniformMap.u_MainTex=function(){return n.getColorTexture(0)},o.uniformMap.u_MainTex_TexelSize=function(){return h$k},o.uniformMap.u_Threshold=function(){return i._threshold},o.uniformMap.u_Params=function(){return i._params},o.execute(e,this._downSamplePassState),n=this._Pyramid[r].downSampleFBO}var a=this._Pyramid[this._iterations-1].downSampleFBO;for(r=this._iterations-2;r>=0;r--){var s=this._Pyramid[r].downSampleFBO,l=this._Pyramid[r].upSampleFBO,u=this._Pyramid[r].upCommand;h$k.x=1/a.getColorTexture(0).width,h$k.y=1/a.getColorTexture(0).height,u.uniformMap.u_BloomTex=function(){return s.getColorTexture(0)},u.uniformMap.u_MainTex=function(){return a.getColorTexture(0)},u.uniformMap.u_MainTex_TexelSize=function(){return h$k},u.uniformMap.u_SampleScale=function(){return i._sampleScale},u.execute(e,this._downSamplePassState),a=l}this._lastUpFBO=a};var et$2=new n$13;e$k.prototype.update=function(e,t,i){this._context=t.context,this._downSamplePassState.context=t.context,this._upSamplePassState.context=t.context,this._scene=i;var n=e.drawingBufferWidth,r=e.drawingBufferHeight,o=this;t$$(this._dirtTexture)||c$18(n$S(o._dirtTexUrl),(function(t){o._dirtTexture=new P$S({context:e,source:t,pixelFormat:Z$_.RGB,pixelDatatype:v$Z.UNSIGNED_BYTE})}));var a=n$1d.clamp(this.anamorphicRatio,-1,1),s=a<0?-a:0,l=a>0?a:0,u=Math.floor(n/(2-s)),c=Math.floor(r/(2-l)),h=Math.max(u,c),d=Math.log(h)/Math.log(2)+Math.min(this.diffusion,10)-10,f=Math.floor(d),p=n$1d.clamp(f,1,G$j),_=!1;p!=this._iterations&&(this._iterations=p,_=!0),this._sampleScale=.5+d-f;var m=1;t$$(this._dirtTexture)&&(m=this._dirtTexture.width/this._dirtTexture.height);var $=e.drawingBufferWidth/e.drawingBufferHeight;m>$?(this._dirtTileOffset.x=$/m,this._dirtTileOffset.z=.5*(1-this._dirtTileOffset.x)):$>m&&(this._dirtTileOffset.y=m/$,this._dirtTileOffset.w=.5*(1-this._dirtTileOffset.y));var g=Math.exp(this._intensity/10*.6931471805599453)-1;this._shaderSettings.x=this._sampleScale,this._shaderSettings.y=g,this._shaderSettings.z=this._dirtIntensity;var y=this._Pyramid[0].downSampleFBO,v=t$$(y)&&y.getColorTexture(0)||void 0;if(!t$$(v)||v.width!==u||v.height!==c||_){this.destroyFBO();for(var x=0;x<this._iterations;x++){var b,S={};b=0==x?e.createViewportQuadCommand(Z$e,{uniformMap:S,owner:this}):e.createViewportQuadCommand($$b,{uniformMap:S,owner:this});var w=e.createViewportQuadCommand(tt$3,{uniformMap:S,owner:this});this._Pyramid[x].downCommand=b,this._Pyramid[x].upCommand=w;var C=et$2;C.width=u,C.height=c;var T=p$1a.fromCache({viewport:C});b.renderState=T,w.renderState=T;var P=new u$F({context:e,colorTextures:[new P$S({context:e,width:u,height:c,pixelDatatype:v$Z.FLOAT})]}),E=new u$F({context:e,colorTextures:[new P$S({context:e,width:u,height:c,pixelDatatype:v$Z.FLOAT})]});this._Pyramid[x].downSampleFBO=P,this._Pyramid[x].upSampleFBO=E,b.framebuffer=P,w.framebuffer=E,u/=2,u=Math.max(u,1),c=Math.max(c/2,1)}}},e$k.prototype.gammaToLinearSpace=function(e){return e*(e*(.305306011*e+.682171111)+.012522878)},e$k.prototype.setInputFBO=function(e){this._fbo=e},e$k.prototype.getBloomTexture=function(){return this._lastUpFBO.getColorTexture(0)},e$k.prototype.getBloomDirtTexture=function(){return t$$(this._dirtTexture)?this._dirtTexture:this._context.defaultTexture},e$k.prototype.getBloomTextureTexelSize=function(){return h$k.x=1/this._lastUpFBO.getColorTexture(0).width,h$k.y=1/this._lastUpFBO.getColorTexture(0).height,h$k},e$k.prototype.getDirtTileOffset=function(){return this._dirtTileOffset},e$k.prototype.getBloomSettings=function(){return this._shaderSettings},e$k.prototype.getBloomColor=function(){return this._bloomColor},e$k.prototype.isDestroyed=function(){return!1},e$k.prototype.destroyFBO=function(){for(var e=0;e<this._iterations;e++)if(t$$(this._Pyramid[e].downSampleFBO)){var t=this._Pyramid[e].downSampleFBO,i=this._Pyramid[e].upSampleFBO;t.destroy(),i.destroy()}},e$k.prototype.destroy=function(){this.destroyFBO();for(var e=0;e<this._iterations;e++){var t=this._Pyramid[e].downCommand,i=this._Pyramid[e].upCommand;t.shaderProgram.destroy(),i.shaderProgram.destroy()}return s$1e(this)};var h$j="varying vec2 v_textureCoordinates;\nconst float M_PI = 3.141592653589793;\nfloat vdcRadicalInverse(int i)\n{\nfloat r;\nfloat base = 2.0;\nfloat value = 0.0;\nfloat invBase = 1.0 / base;\nfloat invBi = invBase;\nfor (int x = 0; x < 100; x++)\n{\nif (i <= 0)\n{\nbreak;\n}\nr = mod(float(i), base);\nvalue += r * invBi;\ninvBi *= invBase;\ni = int(float(i) * invBase);\n}\nreturn value;\n}\nvec2 hammersley2D(int i, int N)\n{\nreturn vec2(float(i) / float(N), vdcRadicalInverse(i));\n}\nvec3 importanceSampleGGX(vec2 xi, float roughness, vec3 N)\n{\nfloat a = roughness * roughness;\nfloat phi = 2.0 * M_PI * xi.x;\nfloat cosTheta = sqrt((1.0 - xi.y) / (1.0 + (a * a - 1.0) * xi.y));\nfloat sinTheta = sqrt(1.0 - cosTheta * cosTheta);\nvec3 H = vec3(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);\nvec3 upVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);\nvec3 tangentX = normalize(cross(upVector, N));\nvec3 tangentY = cross(N, tangentX);\nreturn tangentX * H.x + tangentY * H.y + N * H.z;\n}\nfloat G1_Smith(float NdotV, float k)\n{\nreturn NdotV / (NdotV * (1.0 - k) + k);\n}\nfloat G_Smith(float roughness, float NdotV, float NdotL)\n{\nfloat k = roughness * roughness / 2.0;\nreturn G1_Smith(NdotV, k) * G1_Smith(NdotL, k);\n}\nvec2 integrateBrdf(float roughness, float NdotV)\n{\nvec3 V = vec3(sqrt(1.0 - NdotV * NdotV), 0.0, NdotV);\nfloat A = 0.0;\nfloat B = 0.0;\nconst int NumSamples = 1024;\nfor (int i = 0; i < NumSamples; i++)\n{\nvec2 xi = hammersley2D(i, NumSamples);\nvec3 H = importanceSampleGGX(xi, roughness, vec3(0.0, 0.0, 1.0));\nvec3 L = 2.0 * dot(V, H) * H - V;\nfloat NdotL = clamp(L.z, 0.0, 1.0);\nfloat NdotH = clamp(H.z, 0.0, 1.0);\nfloat VdotH = clamp(dot(V, H), 0.0, 1.0);\nif (NdotL > 0.0)\n{\nfloat G = G_Smith(roughness, NdotV, NdotL);\nfloat G_Vis = G * VdotH / (NdotH * NdotV);\nfloat Fc = pow(1.0 - VdotH, 5.0);\nA += (1.0 - Fc) * G_Vis;\nB += Fc * G_Vis;\n}\n}\nreturn vec2(A, B) / float(NumSamples);\n}\nvoid main()\n{\ngl_FragColor = vec4(integrateBrdf(v_textureCoordinates.y, v_textureCoordinates.x), 0.0, 1.0);\n}\n";function o$l(){this._colorTexture=void 0,this._drawCommand=void 0}function x$m(e,t,i){const n=t.createViewportQuadCommand(h$j,{framebuffer:i,renderState:p$1a.fromCache({viewport:new n$13(0,0,256,256)})});e._drawCommand=n}Object.defineProperties(o$l.prototype,{colorTexture:{get:function(){return this._colorTexture}}}),o$l.prototype.update=function(e){if(!t$$(this._colorTexture)){const t=e.context,i=new P$S({context:t,width:256,height:256,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE,sampler:a$Q.NEAREST});this._colorTexture=i;const n=new u$F({context:t,colorTextures:[i],destroyAttachments:!1});x$m(this,t,n),this._drawCommand.execute(t),n.destroy(),this._drawCommand.shaderProgram=this._drawCommand.shaderProgram&&this._drawCommand.shaderProgram.destroy()}},o$l.prototype.isDestroyed=function(){return!1},o$l.prototype.destroy=function(){return this._colorTexture=this._colorTexture&&this._colorTexture.destroy(),s$1e(this)};var e$j={LEFT_DRAG:0,RIGHT_DRAG:1,MIDDLE_DRAG:2,WHEEL:3,PINCH:4},Q$c=Object.freeze(e$j);function u$i(e,t){var i=e;return t$$(t)&&(i+="+"+t),i}function G$i(e,t){r$T.clone(e.distance.startPosition,t.distance.startPosition),r$T.clone(e.distance.endPosition,t.distance.endPosition),r$T.clone(e.angleAndHeight.startPosition,t.angleAndHeight.startPosition),r$T.clone(e.angleAndHeight.endPosition,t.angleAndHeight.endPosition)}function A$n(e,t,i){var n=u$i(Q$c.PINCH,t),r=e._update,o=e._isDown,a=e._eventStartPosition,s=e._pressTime,l=e._releaseTime;r[n]=!0,o[n]=!1,a[n]=new r$T;var u=e._movement[n];t$$(u)||(u=e._movement[n]={}),u.distance={startPosition:new r$T,endPosition:new r$T},u.angleAndHeight={startPosition:new r$T,endPosition:new r$T},u.prevAngle=0,e._eventHandler.setInputAction((function(t){e._buttonsDown++,o[n]=!0,s[n]=new Date,r$T.lerp(t.position1,t.position2,.5,a[n])}),Q$L.PINCH_START,t),e._eventHandler.setInputAction((function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),o[n]=!1,l[n]=new Date}),Q$L.PINCH_END,t),e._eventHandler.setInputAction((function(e){if(o[n]){r[n]?(G$i(e,u),r[n]=!1,u.prevAngle=u.angleAndHeight.startPosition.x):(r$T.clone(e.distance.endPosition,u.distance.endPosition),r$T.clone(e.angleAndHeight.endPosition,u.angleAndHeight.endPosition));for(var t=u.angleAndHeight.endPosition.x,a=u.prevAngle,s=2*Math.PI;t>=a+Math.PI;)t-=s;for(;t<a-Math.PI;)t+=s;u.angleAndHeight.endPosition.x=-t*i.clientWidth/12,u.angleAndHeight.startPosition.x=-a*i.clientWidth/12}}),Q$L.PINCH_MOVE,t)}function y$k(e,t){var i=u$i(Q$c.WHEEL,t),n=e._update;n[i]=!0;var r=e._movement[i];t$$(r)||(r=e._movement[i]={}),r.startPosition=new r$T,r.endPosition=new r$T,e._eventHandler.setInputAction((function(e){var t=15*n$1d.toRadians(e);n[i]?(r$T.clone(r$T.ZERO,r.startPosition),r.endPosition.x=0,r.endPosition.y=t,n[i]=!1):r.endPosition.y=r.endPosition.y+t}),Q$L.WHEEL,t)}function H$l(e,t,i){var n=u$i(i,t),r=e._isDown,o=e._eventStartPosition,a=e._pressTime,s=e._releaseTime;r[n]=!1,o[n]=new r$T;var l,u,c=e._lastMovement[n];t$$(c)||(c=e._lastMovement[n]={startPosition:new r$T,endPosition:new r$T,valid:!1}),i===Q$c.LEFT_DRAG?(l=Q$L.LEFT_DOWN,u=Q$L.LEFT_UP):i===Q$c.RIGHT_DRAG?(l=Q$L.RIGHT_DOWN,u=Q$L.RIGHT_UP):i===Q$c.MIDDLE_DRAG&&(l=Q$L.MIDDLE_DOWN,u=Q$L.MIDDLE_UP),e._eventHandler.setInputAction((function(t){e._buttonsDown++,c.valid=!1,r[n]=!0,a[n]=new Date,r$T.clone(t.position,o[n])}),l,t),e._eventHandler.setInputAction((function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),r[n]=!1,s[n]=new Date}),u,t)}function E$k(e,t){r$T.clone(e.startPosition,t.startPosition),r$T.clone(e.endPosition,t.endPosition)}function M$n(e,t){var i=e._update,n=e._movement,r=e._lastMovement,o=e._isDown;for(var a in Q$c)if(Q$c.hasOwnProperty(a)){var s=Q$c[a];if(t$$(s)){var l=u$i(s,t);i[l]=!0,t$$(e._lastMovement[l])||(e._lastMovement[l]={startPosition:new r$T,endPosition:new r$T,valid:!1}),t$$(e._movement[l])||(e._movement[l]={startPosition:new r$T,endPosition:new r$T})}}e._eventHandler.setInputAction((function(a){for(var s in Q$c)if(Q$c.hasOwnProperty(s)){var l=Q$c[s];if(t$$(l)){var u=u$i(l,t);o[u]&&(i[u]?(E$k(n[u],r[u]),r[u].valid=!0,E$k(a,n[u]),i[u]=!1):r$T.clone(a.endPosition,n[u].endPosition))}}r$T.clone(a.endPosition,e._currentMousePosition)}),Q$L.MOUSE_MOVE,t)}function I$j(e){switch(e){case"W".charCodeAt(0):return"moveForward";case"S".charCodeAt(0):return"moveBackward";case"D".charCodeAt(0):return"moveRight";case"A".charCodeAt(0):return"moveLeft";default:return}}function W$c(e){document.addEventListener("keydown",(function(t){var i=I$j(t.keyCode);typeof i<"u"&&(e._flags[i]=!0)}),!1)}function C$h(e){document.addEventListener("keyup",(function(t){var i=I$j(t.keyCode);typeof i<"u"&&(e._flags[i]=!1)}),!1)}function v$j(e){if(!t$$(e))throw new t$_("canvas is required.");for(var t in this._eventHandler=new f$N(e,!0),this._update={},this._movement={},this._lastMovement={},this._isDown={},this._eventStartPosition={},this._pressTime={},this._releaseTime={},this._buttonsDown=0,this._currentMousePosition=new r$T,y$k(this,void 0),A$n(this,void 0,e),H$l(this,void 0,Q$c.LEFT_DRAG),H$l(this,void 0,Q$c.RIGHT_DRAG),H$l(this,void 0,Q$c.MIDDLE_DRAG),M$n(this,void 0),Ft$5)if(Ft$5.hasOwnProperty(t)){var i=Ft$5[t];t$$(i)&&(y$k(this,i),A$n(this,i,e),H$l(this,i,Q$c.LEFT_DRAG),H$l(this,i,Q$c.RIGHT_DRAG),H$l(this,i,Q$c.MIDDLE_DRAG),M$n(this,i))}this._flags={looking:!1,moveForward:!1,moveBackward:!1,moveUp:!1,moveDown:!1,moveLeft:!1,moveRight:!1},W$c(this),C$h(this)}function n$k(e,t,i,n,r){this.featurePropertiesDirty=!1}function i$h(e){n$1e.typeOf.object("options",e),n$1e.typeOf.number("options.pass",e.pass),this.pass=e.pass,this.commandList=e.commandList,this.camera=e.camera,this.cullingVolume=e.cullingVolume,this.ready=!1}function h$i(){}Object.defineProperties(v$j.prototype,{currentMousePosition:{get:function(){return this._currentMousePosition}},anyButtonDown:{get:function(){var e=!(this._update[u$i(Q$c.WHEEL)]&&this._update[u$i(Q$c.WHEEL,Ft$5.SHIFT)]&&this._update[u$i(Q$c.WHEEL,Ft$5.CTRL)]&&this._update[u$i(Q$c.WHEEL,Ft$5.ALT)]);return this._buttonsDown>0||e}}}),v$j.prototype.isMoving=function(e,t){if(!t$$(e))throw new t$_("type is required.");var i=u$i(e,t);return!this._update[i]},v$j.prototype.getMovement=function(e,t){if(!t$$(e))throw new t$_("type is required.");var i=u$i(e,t);return this._movement[i]},v$j.prototype.getLastMovement=function(e,t){if(!t$$(e))throw new t$_("type is required.");var i=u$i(e,t),n=this._lastMovement[i];if(n.valid)return n},v$j.prototype.isButtonDown=function(e,t){if(!t$$(e))throw new t$_("type is required.");var i=u$i(e,t);return this._isDown[i]},v$j.prototype.getStartMousePosition=function(e,t){if(!t$$(e))throw new t$_("type is required.");if(e===Q$c.WHEEL)return this._currentMousePosition;var i=u$i(e,t);return this._eventStartPosition[i]},v$j.prototype.getButtonPressTime=function(e,t){if(!t$$(e))throw new t$_("type is required.");var i=u$i(e,t);return this._pressTime[i]},v$j.prototype.getButtonReleaseTime=function(e,t){if(!t$$(e))throw new t$_("type is required.");var i=u$i(e,t);return this._releaseTime[i]},v$j.prototype.reset=function(){for(var e in this._update)this._update.hasOwnProperty(e)&&(this._update[e]=!0)},v$j.prototype.isDestroyed=function(){return!1},v$j.prototype.destroy=function(){return this._eventHandler=this._eventHandler&&this._eventHandler.destroy(),s$1e(this)},Object.defineProperties(n$k.prototype,{featuresLength:{get:function(){t$_.throwInstantiationError()}},pointsLength:{get:function(){t$_.throwInstantiationError()}},trianglesLength:{get:function(){t$_.throwInstantiationError()}},geometryByteLength:{get:function(){t$_.throwInstantiationError()}},texturesByteLength:{get:function(){t$_.throwInstantiationError()}},batchTableByteLength:{get:function(){t$_.throwInstantiationError()}},innerContents:{get:function(){t$_.throwInstantiationError()}},readyPromise:{get:function(){t$_.throwInstantiationError()}},tileset:{get:function(){t$_.throwInstantiationError()}},tile:{get:function(){t$_.throwInstantiationError()}},url:{get:function(){t$_.throwInstantiationError()}},batchTable:{get:function(){t$_.throwInstantiationError()}}}),n$k.prototype.hasProperty=function(e,t){t$_.throwInstantiationError()},n$k.prototype.getFeature=function(e){t$_.throwInstantiationError()},n$k.prototype.applyDebugSettings=function(e,t){t$_.throwInstantiationError()},n$k.prototype.applyStyle=function(e){t$_.throwInstantiationError()},n$k.prototype.update=function(e,t){t$_.throwInstantiationError()},n$k.prototype.isDestroyed=function(){t$_.throwInstantiationError()},n$k.prototype.destroy=function(){t$_.throwInstantiationError()};var u$h={stack:new e$1d,stackMaximumLength:0};function f$o(e){return e._visible&&e._inRequestVolume}function m$l(e){return e.hasEmptyContent||e.hasTilesetContent}function g$c(e){return!m$l(e)&&e.contentUnloaded}function v$i(e,t){return 0!==t.children.length&&(t.hasTilesetContent?!t.contentExpired:(t.hasEmptyContent,!0))}function x$l(e,t,i,n){for(var r=t.children,o=r.length,a=0;a<o;++a){var s=r[a];s.updateVisibility(n),f$o(s)&&i.push(s)}}function _$j(e,t){(g$c(t)||t.contentExpired)&&(t._priority=0,e._requestedTiles.push(t))}function T$m(e,t){e._cache.touch(t)}function k$j(e){++e.statistics.visited}function y$j(e,t,i){t.contentAvailable&&t.contentVisibility(i)!==cr$4.OUTSIDE&&e._selectedTiles.push(t)}function u$g(e,t){this._conditionsExpression=e$1W(e,!0),this._conditions=e.conditions,this._runtimeConditions=void 0,g$b(this,t)}function l$d(e,t){this.condition=e,this.expression=t}function g$b(e,t){var i=[],n=e._conditions;if(t$$(n)){for(var r=n.length,o=0;o<r;++o){var a=n[o],s=String(a[0]),l=String(a[1]);i.push(new l$d(new b$V(s,t),new b$V(l,t)))}e._runtimeConditions=i}}function h$h(e){var t;(this._style={},this._ready=!1,this._show=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._labelColor=void 0,this._labelOutlineColor=void 0,this._labelOutlineWidth=void 0,this._font=void 0,this._labelStyle=void 0,this._labelText=void 0,this._backgroundColor=void 0,this._backgroundPadding=void 0,this._backgroundEnabled=void 0,this._scaleByDistance=void 0,this._translucencyByDistance=void 0,this._distanceDisplayCondition=void 0,this._heightOffset=void 0,this._anchorLineEnabled=void 0,this._anchorLineColor=void 0,this._image=void 0,this._disableDepthTestDistance=void 0,this._horizontalOrigin=void 0,this._verticalOrigin=void 0,this._labelHorizontalOrigin=void 0,this._labelVerticalOrigin=void 0,this._pbrMaterialIndex=void 0,this._meta=void 0,this._colorShaderFunction=void 0,this._showShaderFunction=void 0,this._pointSizeShaderFunction=void 0,this._colorShaderFunctionReady=!1,this._showShaderFunctionReady=!1,this._pointSizeShaderFunctionReady=!1,this._colorShaderTranslucent=!1,"string"==typeof e||e instanceof t$X)?t=t$X.createIfNeeded(e).fetchJson(e):t=c$18.resolve(e);var i=this;this._readyPromise=t.then((function(e){return m$k(i,e),i}))}function m$k(e,t){t=e$1Y(e$1W(t,!0),e._style),e._style=t,e.show=t.show,e.color=t.color,e.pointSize=t.pointSize,e.pointOutlineColor=t.pointOutlineColor,e.pointOutlineWidth=t.pointOutlineWidth,e.labelColor=t.labelColor,e.labelOutlineColor=t.labelOutlineColor,e.labelOutlineWidth=t.labelOutlineWidth,e.labelStyle=t.labelStyle,e.font=t.font,e.labelText=t.labelText,e.backgroundColor=t.backgroundColor,e.backgroundPadding=t.backgroundPadding,e.backgroundEnabled=t.backgroundEnabled,e.scaleByDistance=t.scaleByDistance,e.translucencyByDistance=t.translucencyByDistance,e.distanceDisplayCondition=t.distanceDisplayCondition,e.heightOffset=t.heightOffset,e.anchorLineEnabled=t.anchorLineEnabled,e.anchorLineColor=t.anchorLineColor,e.image=t.image,e.disableDepthTestDistance=t.disableDepthTestDistance,e.horizontalOrigin=t.horizontalOrigin,e.verticalOrigin=t.verticalOrigin,e.labelHorizontalOrigin=t.labelHorizontalOrigin,e.labelVerticalOrigin=t.labelVerticalOrigin,e.pbrMaterialIndex=t.pbrMaterialIndex;var i={};if(t$$(t.meta)){var n=t.defines,r=e$1Y(t.meta,e$1Y.EMPTY_OBJECT);for(var o in r)r.hasOwnProperty(o)&&(i[o]=new b$V(r[o],n))}e._meta=i,e._ready=!0}function o$k(e,t){var i=e$1Y(e._style,e$1Y.EMPTY_OBJECT).defines;if(t$$(t))return"boolean"==typeof t||"number"==typeof t?new b$V(String(t)):"string"==typeof t?new b$V(t,i):t$$(t.conditions)?new u$g(t,i):t}function n$j(e){if(t$$(e))return t$$(e.expression)?e.expression:t$$(e.conditionsExpression)?e$1W(e.conditionsExpression,!0):e}function D$k(e){if(!t$$((e=e$1Y(e,{})).url))throw new t$_("options.url is required.");this._baseUrl=e.url;var t=t$X.createIfNeeded(e.url);if(t.appendForwardSlash(),t$$(e.token))t.setQueryParameters({token:e.token});else if(t$$(a$R.CREDENTIAL))if(t$$(a$R.CREDENTIAL._keymap[this._baseUrl])){var i=a$R.CREDENTIAL._keymap[this._baseUrl].type,n=a$R.CREDENTIAL._keymap[this._baseUrl].value,r='{"tokenName": "value"}'.replace("tokenName",i).replace("value",n),o=JSON.parse(r);t.setQueryParameters(o)}else{(r={})[a$R.CREDENTIAL.name]=a$R.CREDENTIAL.value,t.setQueryParameters(r)}this._resource=t,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tileWidth=e$1Y(e.tileWidth,256),this._tileHeight=e$1Y(e.tileHeight,256),this._maximumLevel=e.maximumLevel,this._tilingScheme=e$1Y(e.tilingScheme,new I$1e({ellipsoid:e.ellipsoid})),this._tilingSchemeCustomized=t$$(e.tilingScheme),this._useTiles=e$1Y(e.usePreCachedTilesIfAvailable,!0),this._rectangle=e$1Y(e.rectangle,this._tilingScheme.rectangle),this._layers=e.layers,this._zoomOffset=e.zoomOffset,this._coordUnit="DEGREE",this._beginLevel=e$1Y(e.beginLevel,0);var a=e.credit;"string"==typeof a&&(a=new i$17(a)),this._credit=a,this.enablePickFeatures=e$1Y(e.enablePickFeatures,!0),this._errorEvent=new o$15,this._ready=!1,this._readyPromise=c$18.defer();var s,l=this,u=e.url;function c(t){l._tilingScheme instanceof I$1e&&"esriMeters"===t.units&&(l._coordUnit="METER");var i=t.tileInfo;if(l.wkid=t.spatialReference.wkid,l._tilingSchemeCustomized&&l._tilingScheme instanceof I$1e&&t$$(i)&&(l._tilingScheme=new I$1e({tileInfo:{origin:{x:i.origin.x,y:i.origin.y},cols:i.cols,rows:i.rows},resolutions:i.lods.map((function(e){return e.resolution})),dataBounds:{west:t.fullExtent.xmin,south:t.fullExtent.ymin,east:t.fullExtent.xmax,north:t.fullExtent.ymax}})),t$$(i)){if(l._tileWidth=i.rows,l._tileHeight=i.cols,!l._tilingSchemeCustomized||!t$$(l.wkid))if(102100===i.spatialReference.wkid||102113===i.spatialReference.wkid)l._tilingScheme=new o$Z({ellipsoid:e.ellipsoid});else if(4326===t.tileInfo.spatialReference.wkid)l._tilingScheme=new I$1e({ellipsoid:e.ellipsoid});else if(4490===t.tileInfo.spatialReference.wkid){if(t$$(e.suggest)&&e.suggest){var n=Math.ceil((t.fullExtent.xmax-t.fullExtent.xmin)/(t.tileInfo.lods[0].resolution*t.tileInfo.cols)),r=Math.ceil((t.fullExtent.ymax-t.fullExtent.ymin)/(t.tileInfo.lods[0].resolution*t.tileInfo.rows));l._tilingScheme=new I$1e({ellipsoid:e.ellipsoid,tileInfo:t.tileInfo,rectangle:new s$1p(n$1d.toRadians(t.fullExtent.xmin),n$1d.toRadians(t.fullExtent.ymin),n$1d.toRadians(t.fullExtent.xmax),n$1d.toRadians(t.fullExtent.ymax)),origin:new r$T(n$1d.toRadians(t.tileInfo.origin.x),n$1d.toRadians(t.tileInfo.origin.y)),numberOfLevelZeroTilesX:n,numberOfLevelZeroTilesY:r}),l._tilingScheme._suggest=!0}else l._tilingScheme=new I$1e({ellipsoid:e.ellipsoid,tileInfo:t.tileInfo});l._tilingScheme._beginLevel=l._beginLevel}else{var o=[];if(t$$(i.lods))for(var a=0;a<i.lods.length;a++)o.push(i.lods[a].resolution);l._tilingScheme=new I$1e({ellipsoid:e.ellipsoid,tileInfo:t.tileInfo,origin:new r$T(t.tileInfo.origin.x,t.tileInfo.origin.y),dataBounds:new s$1p(t.fullExtent.xmin,t.fullExtent.ymin,t.fullExtent.xmax,t.fullExtent.ymax),resolutions:o}),l._rectangle=new s$1p(t.fullExtent.xmin/6378137,t.fullExtent.ymin/6378137,t.fullExtent.xmax/6378137,t.fullExtent.ymax/6378137)}if(l._zoomOffset?l._maximumLevel=20:l._maximumLevel=t.tileInfo.lods.length-1,t$$(l._tilingScheme._resolutions)&&(l._minimumLevel=l._tilingScheme._beginLevel,l._maximumLevel=l._minimumLevel+l._tilingScheme._resolutions.length-1),t$$(t.fullExtent)){if(t$$(t.fullExtent.spatialReference)&&t$$(t.fullExtent.spatialReference.wkid))if(102100===t.fullExtent.spatialReference.wkid||102113===t.fullExtent.spatialReference.wkid){var u=new e$1H,c=t.fullExtent,h=u.unproject(new a$11(Math.max(c.xmin,-l._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.max(c.ymin,-l._tilingScheme.ellipsoid.maximumRadius*Math.PI),0)),f=u.unproject(new a$11(Math.min(c.xmax,l._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.min(c.ymax,l._tilingScheme.ellipsoid.maximumRadius*Math.PI),0));l._rectangle=new s$1p(h.longitude,h.latitude,f.longitude,f.latitude)}else{if(4326!==t.fullExtent.spatialReference.wkid&&4490!==t.fullExtent.spatialReference.wkid){var p="fullExtent.spatialReference WKID "+t.fullExtent.spatialReference.wkid+" is not supported.";return void(s=c$_.handleError(s,l,l._errorEvent,p,void 0,void 0,void 0,d))}l._rectangle=s$1p.fromDegrees(t.fullExtent.xmin,t.fullExtent.ymin,t.fullExtent.xmax,t.fullExtent.ymax)}}else l._rectangle=l._tilingScheme.rectangle;t$$(l._tileDiscardPolicy)||(l._tileDiscardPolicy=new f$p({missingImageUrl:B$c(l,0,0,l._maximumLevel).url,pixelsToCheck:[new r$T(0,0),new r$T(200,20),new r$T(20,200),new r$T(80,110),new r$T(160,130)],disableCheckIfAllPixelsAreTransparent:!0})),l._useTiles=!0}else l._useTiles=!1;t$$(t.copyrightText)&&t.copyrightText.length>0&&(l._credit=new i$17(t.copyrightText)),l._ready=!0,l._readyPromise.resolve(!0),c$_.handleSuccess(s)}function h(e){var t="An error occurred while accessing "+l._resource.url+".";s=c$_.handleError(s,l,l._errorEvent,t,void 0,void 0,void 0,d),l._readyPromise.reject(new t$Z(t))}function d(){c$18(l._resource.getDerivedResource({queryParameters:{f:"json"}}).fetchJson(),c,h)}l.tablename=e.url,new d$_({name:u}).then((function(e){e.checkObjectStoreExit(l.tablename)?l._indexedDBScheduler=e:e.createObjectStore(l.tablename).then((function(){l._indexedDBScheduler=e}))})),l._indexedDBSetting={isOpen:!1,clear:function(){l._indexedDBScheduler.clear(l.tablename)},cache:[]},this._useTiles?d():(this._ready=!0,this._readyPromise.resolve(!0))}function B$c(e,t,i,n,r){var o;if(t$$(e._tilingScheme._resolutions)&&(n-=e._tilingScheme._beginLevel),e._useTiles)e.zoomOffset&&(n-=parseInt(e.zoomOffset)),o=e._resource.getDerivedResource({url:"tile/"+n+"/"+i+"/"+t,request:r});else{var a=e._tilingScheme.tileXYToNativeRectangle(t,i,n);if("METER"===e._coordUnit){var s=e._tilingScheme._projection._semimajorAxis;a.west=s*n$1d.toRadians(a.west),a.south=s*n$1d.toRadians(a.south),a.east=s*n$1d.toRadians(a.east),a.north=s*n$1d.toRadians(a.north)}var l={bbox:a.west+","+a.south+","+a.east+","+a.north,size:e._tileWidth+","+e._tileHeight,format:"png",transparent:!0,f:"image"};e.wkid&&(l.imageSR=l.bboxSR=e.wkid),e.layers&&(l.layers="show:"+e.layers),e.layerDefs&&(l.layerDefs=e.layerDefs),e.time&&(l.time=e.time),o=e._resource.getDerivedResource({url:"export",request:r,queryParameters:l})}return o||null}function Z$d(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;e$1B(t,o)?e$1B(e,o)&&(a|=1):(a|=2,e$1B(e,o)||(a|=1)),n+=a}return n}function t$9(e){this._angle=0,this._url=e.url,this._scene=void 0,this._ellipsoidGeometry=new b$18({radii:new a$11(6578137,6578137,6578137),vertexFormat:t$g.vertexFormat}),this._cloudBall=new y$H({geometryInstances:new m$P({geometry:this._ellipsoidGeometry,attributes:{distanceDisplayCondition:new n$Z(2e6,Number.MAX_VALUE)}}),appearance:new t$g({material:new r$v({fabric:{type:"Image",uniforms:{image:this._url}}}),aboveGround:!0})}),this._originalModelMatrix=c$1a.clone(this._cloudBall.modelMatrix)}function o$j(e){this._show=!1,this._brightness=1,this._contrast=1,this._saturation=1,this._hue=0,this.context=e}h$i.selectTiles=function(e,t){e._selectedTiles.length=0,e._requestedTiles.length=0,e._hasMixedContent=!1;var i=!0,n=e.root;if(n.updateVisibility(t),!f$o(n))return i;var r=u$h.stack;for(r.push(e.root);r.length>0;){u$h.stackMaximumLength=Math.max(u$h.stackMaximumLength,r.length);var o=r.pop(),a=o.refine===l$D.ADD,s=o.refine===l$D.REPLACE,l=v$i(e,o);l&&x$l(e,o,r,t),(a||s&&!l)&&(_$j(e,o),y$j(e,o,t),!m$l(o)&&!o.contentAvailable&&(i=!1)),k$j(e),T$m(e,o)}return u$h.stack.trim(u$h.stackMaximumLength),i},Object.defineProperties(u$g.prototype,{conditionsExpression:{get:function(){return this._conditionsExpression}}}),u$g.prototype.evaluate=function(e,t){var i=this._runtimeConditions;if(t$$(i))for(var n=i.length,r=0;r<n;++r){var o=i[r];if(o.condition.evaluate(e))return o.expression.evaluate(e,t)}},u$g.prototype.evaluateColor=function(e,t){var i=this._runtimeConditions;if(t$$(i))for(var n=i.length,r=0;r<n;++r){var o=i[r];if(o.condition.evaluate(e))return o.expression.evaluateColor(e,t)}},u$g.prototype.getShaderFunction=function(e,t,i,n){var r=this._runtimeConditions;if(t$$(r)&&0!==r.length){for(var o="",a=r.length,s=0;s<a;++s){var l=r[s];o+=" "+(0===s?"if":"else if")+" ("+l.condition.getShaderExpression(t,i)+") \n { \n return "+l.expression.getShaderExpression(t,i)+"; \n } \n"}return o=n+" "+e+"() \n{ \n"+o+" return "+n+"(1.0); \n} \n"}},Object.defineProperties(h$h.prototype,{style:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._style}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},show:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._show},set:function(e){this._show=o$k(this,e),this._style.show=n$j(this._show),this._showShaderFunctionReady=!1}},color:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._color},set:function(e){this._color=o$k(this,e),this._style.color=n$j(this._color),this._colorShaderFunctionReady=!1}},pointSize:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._pointSize},set:function(e){this._pointSize=o$k(this,e),this._style.pointSize=n$j(this._pointSize),this._pointSizeShaderFunctionReady=!1}},pointOutlineColor:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._pointOutlineColor},set:function(e){this._pointOutlineColor=o$k(this,e),this._style.pointOutlineColor=n$j(this._pointOutlineColor)}},pointOutlineWidth:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=o$k(this,e),this._style.pointOutlineWidth=n$j(this._pointOutlineWidth)}},labelColor:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelColor},set:function(e){this._labelColor=o$k(this,e),this._style.labelColor=n$j(this._labelColor)}},labelOutlineColor:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelOutlineColor},set:function(e){this._labelOutlineColor=o$k(this,e),this._style.labelOutlineColor=n$j(this._labelOutlineColor)}},labelOutlineWidth:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelOutlineWidth},set:function(e){this._labelOutlineWidth=o$k(this,e),this._style.labelOutlineWidth=n$j(this._labelOutlineWidth)}},font:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._font},set:function(e){this._font=o$k(this,e),this._style.font=n$j(this._font)}},labelStyle:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelStyle},set:function(e){this._labelStyle=o$k(this,e),this._style.labelStyle=n$j(this._labelStyle)}},labelText:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelText},set:function(e){this._labelText=o$k(this,e),this._style.labelText=n$j(this._labelText)}},backgroundColor:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._backgroundColor},set:function(e){this._backgroundColor=o$k(this,e),this._style.backgroundColor=n$j(this._backgroundColor)}},backgroundPadding:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._backgroundPadding},set:function(e){this._backgroundPadding=o$k(this,e),this._style.backgroundPadding=n$j(this._backgroundPadding)}},backgroundEnabled:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._backgroundEnabled},set:function(e){this._backgroundEnabled=o$k(this,e),this._style.backgroundEnabled=n$j(this._backgroundEnabled)}},scaleByDistance:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._scaleByDistance},set:function(e){this._scaleByDistance=o$k(this,e),this._style.scaleByDistance=n$j(this._scaleByDistance)}},translucencyByDistance:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._translucencyByDistance},set:function(e){this._translucencyByDistance=o$k(this,e),this._style.translucencyByDistance=n$j(this._translucencyByDistance)}},distanceDisplayCondition:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=o$k(this,e),this._style.distanceDisplayCondition=n$j(this._distanceDisplayCondition)}},heightOffset:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._heightOffset},set:function(e){this._heightOffset=o$k(this,e),this._style.heightOffset=n$j(this._heightOffset)}},anchorLineEnabled:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._anchorLineEnabled},set:function(e){this._anchorLineEnabled=o$k(this,e),this._style.anchorLineEnabled=n$j(this._anchorLineEnabled)}},anchorLineColor:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._anchorLineColor},set:function(e){this._anchorLineColor=o$k(this,e),this._style.anchorLineColor=n$j(this._anchorLineColor)}},image:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._image},set:function(e){this._image=o$k(this,e),this._style.image=n$j(this._image)}},disableDepthTestDistance:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance=o$k(this,e),this._style.disableDepthTestDistance=n$j(this._disableDepthTestDistance)}},horizontalOrigin:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._horizontalOrigin},set:function(e){this._horizontalOrigin=o$k(this,e),this._style.horizontalOrigin=n$j(this._horizontalOrigin)}},verticalOrigin:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._verticalOrigin},set:function(e){this._verticalOrigin=o$k(this,e),this._style.verticalOrigin=n$j(this._verticalOrigin)}},labelHorizontalOrigin:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelHorizontalOrigin},set:function(e){this._labelHorizontalOrigin=o$k(this,e),this._style.labelHorizontalOrigin=n$j(this._labelHorizontalOrigin)}},labelVerticalOrigin:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelVerticalOrigin},set:function(e){this._labelVerticalOrigin=o$k(this,e),this._style.labelVerticalOrigin=n$j(this._labelVerticalOrigin)}},pbrMaterialIndex:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._pbrMaterialIndex},set:function(e){this._pbrMaterialIndex=o$k(this,e),this._style.pbrMaterialIndex=n$j(this._pbrMaterialIndex)}},meta:{get:function(){if(!this._ready)throw new t$_("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._meta},set:function(e){this._meta=e}}}),h$h.prototype.getColorShaderFunction=function(e,t,i){return this._colorShaderFunctionReady?(i.translucent=this._colorShaderTranslucent,this._colorShaderFunction):(this._colorShaderFunctionReady=!0,this._colorShaderFunction=t$$(this.color)?this.color.getShaderFunction(e,t,i,"vec4"):void 0,this._colorShaderTranslucent=i.translucent,this._colorShaderFunction)},h$h.prototype.getShowShaderFunction=function(e,t,i){return this._showShaderFunctionReady||(this._showShaderFunctionReady=!0,this._showShaderFunction=t$$(this.show)?this.show.getShaderFunction(e,t,i,"bool"):void 0),this._showShaderFunction},h$h.prototype.getPointSizeShaderFunction=function(e,t,i){return this._pointSizeShaderFunctionReady||(this._pointSizeShaderFunctionReady=!0,this._pointSizeShaderFunction=t$$(this.pointSize)?this.pointSize.getShaderFunction(e,t,i,"float"):void 0),this._pointSizeShaderFunction},Object.defineProperties(D$k.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(){if(!this._ready)throw new t$_("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$_("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$_("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$_("minimumLevel must not be called before the imagery provider is ready.");return t$$(this._minimumLevel)?this._minimumLevel:0}},tilingScheme:{get:function(){if(!this._ready)throw new t$_("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new t$_("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$_("tileDiscardPolicy must not be called before the imagery provider is ready.");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}},zoomOffset:{get:function(){return this._zoomOffset}}}),D$k.prototype.getTileCredits=function(e,t,i){},D$k.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$_("requestImage must not be called before the imagery provider is ready.");var r=B$c(this,e,t,i,n);if(n.quadKey=Z$d(e,t,i),!0===this._indexedDBSetting.isOpen&&!0===n.cacheEnable){if(t$$(this._indexedDBScheduler)){var o=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey);return t$$(o)?c$18(o,(function(e){return t$$(e)?e:"cacheError"}),(function(e){return"cacheError"})):o$n.loadImage(this,r)}return o$n.loadImage(this,r)}return o$n.loadImage(this,r)},D$k.prototype.pickFeatures=function(e,t,i,n,r){if(!this._ready)throw new t$_("pickFeatures must not be called before the imagery provider is ready.");if(this.enablePickFeatures){var o,a,s,l=this._tilingScheme.tileXYToNativeRectangle(e,t,i);if(this._tilingScheme.projection instanceof s$1q)o=n$1d.toDegrees(n),a=n$1d.toDegrees(r),s="4326";else{var u=this._tilingScheme.projection.project(new i$1g(n,r,0));o=u.x,a=u.y,s="3857"}var c="visible";t$$(this._layers)&&(c+=":"+this._layers);var h={f:"json",tolerance:2,geometryType:"esriGeometryPoint",geometry:o+","+a,mapExtent:l.west+","+l.south+","+l.east+","+l.north,imageDisplay:this._tileWidth+","+this._tileHeight+",96",sr:s,layers:c};return this._resource.getDerivedResource({url:"identify",queryParameters:h}).fetchJson().then((function(e){var t=[],i=e.results;if(!t$$(i))return t;for(var n=0;n<i.length;++n){var r=i[n],o=new s$i;if(o.data=r,o.name=r.value,o.properties=r.attributes,o.configureDescriptionFromProperties(r.attributes),"esriGeometryPoint"===r.geometryType&&r.geometry){var a=r.geometry.spatialReference&&r.geometry.spatialReference.wkid?r.geometry.spatialReference.wkid:4326;if(4326===a||4283===a)o.position=i$1g.fromDegrees(r.geometry.x,r.geometry.y,r.geometry.z);else if(102100===a||900913===a||3857===a){var s=new e$1H;o.position=s.unproject(new a$11(r.geometry.x,r.geometry.y,r.geometry.z))}}t.push(o)}return t}))}},Object.defineProperties(t$9.prototype,{url:{get:function(){return this._url},set:function(e){this._url!==e&&(this._cloudBall.appearance.material.uniforms.image=e,this._url=e)}}}),t$9.prototype.update=function(e){this._scene=e.camera._scene,t$$(this._cloudBall)&&!this._scene.primitives.contains(this._cloudBall)&&this._scene.primitives.add(this._cloudBall),e.mode===b$1d.SCENE3D&&this.animation(),e.mode===b$1d.COLUMBUS_VIEW&&(this._cloudBall.modelMatrix=c$1a.clone(this._originalModelMatrix))},t$9.prototype.animation=function(){this._angle+=.05,this._angle=this._angle%360;var e=n$1d.toRadians(this._angle);e=-e;var t=r$W.fromRotationZ(e);c$1a.multiplyByMatrix3(this._originalModelMatrix,t,this._cloudBall.modelMatrix)},t$9.prototype.isDestroyed=function(){return!1},t$9.prototype.remove=function(){if(this._scene.primitives.contains(this._cloudBall)){var e=this._scene._primitives._primitives.indexOf(this._cloudBall);-1!==e&&(this._scene._primitives._primitives.splice(e,1),delete this._cloudBall._external._composites[this._scene._primitives._guid])}},t$9.prototype.destroy=function(){this.remove(),this._cloudBall=void 0},Object.defineProperties(o$j.prototype,{show:{get:function(){return this._show},set:function(e){this.context._colorBufferFloat||this.context._colorBufferHalfFloat?e!==this._show&&(t$$(this._owner)&&this._owner.colorCorrectionShowChange(e),this._show=e):console.warn("Color correction is not currently supported on the mobile.")}},brightness:{get:function(){return this._brightness},set:function(e){this._brightness=e}},contrast:{get:function(){return this._contrast},set:function(e){this._contrast=e}},saturation:{get:function(){return this._saturation},set:function(e){this._saturation=e}},hue:{get:function(){return this._hue},set:function(e){this._hue=e}}}),o$j.prototype.isDestroyed=function(){return!1},o$j.prototype.destroy=function(){return s$1e(this)};var v$h="uniform sampler2D u_texture0;\n#ifdef BLOOM\nuniform vec2 u_BloomTex_TexelSize;\nuniform vec4 u_Bloom_DirtTileOffset;\nuniform vec3 u_Bloom_Settings;\nuniform vec3 u_Bloom_Color;\nuniform sampler2D u_BloomTexture;\nuniform sampler2D u_Bloom_DirtTex;\n#endif\n#ifdef COLOR_CORRECTION\nuniform float u_brightness;\nuniform float u_contrast;\nuniform float u_saturation;\nuniform float u_hue;\n#endif\n#ifdef SSAO\nuniform sampler2D u_AmbientOcclusionTexture;\n#endif\n#ifdef TONEMAPPING\nuniform float u_exposure;\nuniform float u_toneMappingWhitePoint;\n#endif\nvarying vec2 v_textureCoordinates;\nvec4 UpsampleTent(sampler2D samplerTex, vec2 uv, vec2 texelSize, vec4 sampleScale)\n{\nvec4 d = texelSize.xyxy * vec4(1.0, 1.0, -1.0, 0.0) * sampleScale;\nvec4 s;\ns = texture2D(samplerTex, uv - d.xy);\ns += texture2D(samplerTex, uv - d.wy) * 2.0;\ns += texture2D(samplerTex, uv - d.zy);\ns += texture2D(samplerTex, uv + d.zw) * 2.0;\ns += texture2D(samplerTex, uv ) * 4.0;\ns += texture2D(samplerTex, uv + d.xw) * 2.0;\ns += texture2D(samplerTex, uv + d.zy);\ns += texture2D(samplerTex, uv + d.wy) * 2.0;\ns += texture2D(samplerTex, uv + d.xy);\nreturn s * (1.0 / 16.0);\n}\n#ifdef TONEMAPPING\nvec3 ACESTonemapping(vec3 inputColor)\n{\nreturn clamp((inputColor * (2.51 * inputColor + 0.03)) / (inputColor * (2.43 * inputColor + 0.59) + 0.14), 0.0, 1.0);\n}\nvec3 FilmicTonemappingFunction(vec3 x)\n{\nfloat A = 0.22;\nfloat B = 0.3;\nfloat C = 0.1;\nfloat D = 0.2;\nfloat E = 0.01;\nfloat F = 0.3;\nreturn ((x * (A * x + C * B) + D * E) / (x * (A * x + B) + D * F)) - E / F;\n}\nvec3 FilmicTonemapping(vec3 x)\n{\nvec3 WHITE = vec3(u_toneMappingWhitePoint);\nreturn FilmicTonemappingFunction(1.6 * x) / FilmicTonemappingFunction(WHITE);\n}\nvec3 inverseGamma(vec3 color)\n{\nreturn pow(color, vec3(1.0 / 2.2));\n}\nvec3 sRGBToLinear(vec3 value)\n{\nreturn vec3(mix(pow(value.rgb * 0.9478672986 + vec3(0.0521327014), vec3(2.4)), value.rgb * 0.0773993808, vec3(lessThanEqual(value.rgb, vec3(0.04045)))));\n}\nvec3 linearTosRGB(vec3 value)\n{\nreturn vec3(mix(pow(value.rgb, vec3(0.41666)) * 1.055 - vec3(0.055), value.rgb * 12.92, vec3(lessThanEqual(value.rgb, vec3(0.0031308)))));\n}\n#endif\nvoid main()\n{\nvec4 color0 = texture2D(u_texture0, v_textureCoordinates);\ngl_FragColor = color0;\n#ifdef BLOOM\nvec4 bloom = UpsampleTent(u_BloomTexture, v_textureCoordinates, u_BloomTex_TexelSize.xy, vec4(u_Bloom_Settings.x));\nvec4 dirt = vec4(texture2D(u_Bloom_DirtTex, v_textureCoordinates * u_Bloom_DirtTileOffset.xy + u_Bloom_DirtTileOffset.zw).rgb, 0.0);\nbloom *= u_Bloom_Settings.y;\ndirt *= u_Bloom_Settings.z;\ngl_FragColor += bloom * vec4(u_Bloom_Color, 1.0);\ngl_FragColor += dirt * bloom;\n#endif\n#ifdef SSAO\nvec3 ao = texture2D(u_AmbientOcclusionTexture, v_textureCoordinates).rgb;\ngl_FragColor.rgb *= ao;\n#endif\n#ifdef TONEMAPPING\nvec3 linearColor = sRGBToLinear(gl_FragColor.rgb);\nvec3 toneMappingColor = ACESTonemapping(linearColor * u_exposure);\ngl_FragColor.rgb = linearTosRGB(toneMappingColor);\n#endif\n#ifdef COLOR_CORRECTION\ngl_FragColor.rgb = mix(vec3(0.0), gl_FragColor.rgb, u_brightness);\ngl_FragColor.rgb = mix(vec3(0.5), gl_FragColor.rgb, u_contrast);\ngl_FragColor.rgb = czm_hue(gl_FragColor.rgb, u_hue);\ngl_FragColor.rgb = czm_saturation(gl_FragColor.rgb, u_saturation);\n#endif\n}\n",D$j="uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\ngl_FragColor = texture2D(u_texture, v_textureCoordinates);\n}\n",x$k="uniform float focalDistance;\nuniform float focalRange;\nuniform float focalLength;\nuniform float fstop;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nfloat logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));\nvec4 viewPos = czm_windowToEyeCoordinates(v_textureCoordinates.xy * czm_viewport.zw, logDepthOrDepth);\nviewPos /= viewPos.w;\nfloat dist = abs(viewPos.z);\nfloat aperture = focalLength / fstop;\nfloat coc;\nfloat uppper = focalDistance + focalRange;\nfloat lower = focalDistance - focalRange;\nif (dist <= uppper && dist >= lower)\n{\ncoc = 0.5;\ncoc = coc * 0.5 + 0.5;\n}\nelse\n{\nfloat focalAdjusted = dist > uppper ? uppper : lower;\ncoc = abs(aperture * (focalLength * (dist - focalAdjusted)) / (dist * (focalAdjusted - focalLength)));\ncoc = clamp(coc, 0.0, 2.0) / 2.00001;\nif (dist < lower)\n{\ncoc = -coc;\n}\ncoc = coc * 0.5 + 0.5;\n}\ngl_FragColor = czm_packDepth(coc);\n}\n",F$h="uniform sampler2D texture;\nuniform sampler2D coc;\nvarying vec2 v_textureCoordinates;\nuniform float blurRadius;\nuniform vec2 textureSize;\nuniform vec2 poissonKernel[16];\nconst float percent = 0.01;\nfloat nrand(in vec2 n)\n{\nreturn fract(sin(dot(n.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\nvoid main()\n{\nvec2 offset = blurRadius / textureSize;\nfloat rnd = 6.28318 * nrand(v_textureCoordinates + 0.07 * percent );\nfloat cosa = cos(rnd);\nfloat sina = sin(rnd);\nvec4 basis = vec4(cosa, -sina, sina, cosa);\noffset *= abs(czm_unpackDepth(texture2D(coc, v_textureCoordinates)) * 2.0 - 1.0);\nvec4 color = vec4(0.0);\nfloat weightSum = 0.0;\nfor (int i = 0; i < 16; i++)\n{\nvec2 ofs = poissonKernel[i];\nofs = vec2(dot(ofs, basis.xy), dot(ofs, basis.zw));\nvec2 uv = v_textureCoordinates + ofs * offset;\nvec4 texel = texture2D(texture, uv);\nfloat w = 1.0;\nfloat fCoc = czm_unpackDepth(texture2D(coc, uv)) * 2.0 - 1.0;\nw *= abs(fCoc);\ntexel.rgb *= texel.a;\ncolor += texel * w;\nweightSum += w;\n}\ncolor /= weightSum;\ncolor.rgb /= (color.a + 0.0001);\ngl_FragColor = color;\n}\n",S$g="uniform sampler2D original;\nuniform sampler2D blurred;\nuniform sampler2D coc;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 blurredColor = texture2D(blurred, v_textureCoordinates);\nvec4 originalColor = texture2D(original, v_textureCoordinates);\nfloat fCoc = czm_unpackDepth(texture2D(coc, v_textureCoordinates));\nfCoc = abs(fCoc * 2.0 - 1.0);\nfloat weight = smoothstep(0.0, 1.0, fCoc);\ngl_FragColor = mix(originalColor, blurredColor, weight);\n}\n";function s$h(){this._cocFBO=void 0,this._blurFBO=void 0,this._compositeBlurFBO=void 0,this._cocCommand=void 0,this._blurCommand=void 0,this._compositeCommand=void 0,this._upSamplePassState=new t$l,this._scene=void 0,this._show=!1,this._useLogDepth=!0,this._focalDistance=50,this._focalRange=20,this._focalLength=30,this._fstop=2.8,this._blurRadius=10,this._textureSize=new r$T(512,512),this._poissonKernel=D$i(),this._dofBlurKernel=[],this._dofBlurKernelSize=16;for(var e=0;e<this._dofBlurKernelSize;e++)this._dofBlurKernel.push(this._poissonKernel[e])}Object.defineProperties(s$h.prototype,{show:{get:function(){return this._show},set:function(e){this._show=e}},focalDistance:{get:function(){return this._focalDistance},set:function(e){this._focalDistance=e}},focalRange:{get:function(){return this._focalRange},set:function(e){this._focalRange=e}},fStop:{get:function(){return this._fstop},set:function(e){this._fstop=e}},blurRadius:{get:function(){return this._blurRadius},set:function(e){this._blurRadius=e}}}),s$h.prototype.execute=function(e){this._cocCommand.execute(e,this._upSamplePassState),this._blurCommand.execute(e,this._upSamplePassState),this._compositeCommand.execute(e,this._upSamplePassState)};var y$i=new n$13;function v$g(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function P$d(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function D$i(){var e=[];return e.push(new r$T(0,0)),e.push(new r$T(-.321585265978,-.154972575841)),e.push(new r$T(.458126042375,.188473391593)),e.push(new r$T(.842080129861,.527766490688)),e.push(new r$T(.147304551086,-.659453822776)),e.push(new r$T(-.331943915203,-.940619700594)),e.push(new r$T(.0479226680259,.54812163202)),e.push(new r$T(.701581552186,-.709825561388)),e.push(new r$T(-.295436780218,.940589268233)),e.push(new r$T(-.901489676764,.237713156085)),e.push(new r$T(.973570876096,-.109899459384)),e.push(new r$T(-.866792314779,-.451805525005)),e.push(new r$T(.330975007087,.800048655954)),e.push(new r$T(-.344275183665,.381779221166)),e.push(new r$T(-.386139432542,-.437418421534)),e.push(new r$T(-.576478634965,-.0148463392551)),e.push(new r$T(.385798197415,-.262426961053)),e.push(new r$T(-.666302061145,.682427250835)),e.push(new r$T(-.628010632582,-.732836215494)),e.push(new r$T(.10163141741,-.987658134403)),e.push(new r$T(.711995289051,-.320024291314)),e.push(new r$T(.0296005138058,.950296523438)),e.push(new r$T(.0130612307608,-.351024443122)),e.push(new r$T(-.879596633704,-.10478487883)),e.push(new r$T(.435712737232,.504254490347)),e.push(new r$T(.779203817497,.206477676721)),e.push(new r$T(.388264289969,-.896736162545)),e.push(new r$T(-.153106280781,-.629203242522)),e.push(new r$T(-.245517550697,.657969239148)),e.push(new r$T(.126830499058,.26862328493)),e.push(new r$T(-.634888119007,-.302301223431)),e.push(new r$T(.617074219636,.779817204925)),e}s$h.prototype.update=function(e,t,i,n){var r=(e=t.context).drawingBufferWidth,o=e.drawingBufferHeight;this._scene=i,t$$(this._cocCommand)&&n!==this._useLogDepth&&(this._useLogDepth=n,this.changeProgramDefine(n,"LOG_DEPTH")),t$$(this._cocCommand)||this.createCommand(e);var a=this._blurFBO,s=t$$(a)&&a.getColorTexture(0)||void 0;if(!t$$(s)||this._textureSize.x!==r||this._textureSize.y!==o){this._textureSize.x=r,this._textureSize.y=o,this.createFBO(r,o,e);var l=y$i;l.width=r,l.height=o;var u=p$1a.fromCache({viewport:l});this._cocCommand.renderState=u,this._blurCommand.renderState=u,this._compositeCommand.renderState=u}this._upSamplePassState.context=e},s$h.prototype.createFBO=function(e,t,i){this._cocFBO=this._cocFBO&&this._cocFBO.destroy(),this._blurFBO=this._blurFBO&&this._blurFBO.destroy(),this._compositeBlurFBO=this._compositeBlurFBO&&this._compositeBlurFBO.destroy(),this._cocFBO=new u$F({context:i,colorTextures:[new P$S({context:i,width:e,height:t})]}),this._blurFBO=new u$F({context:i,colorTextures:[new P$S({context:i,width:e,height:t,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.FLOAT})]}),this._compositeBlurFBO=new u$F({context:i,colorTextures:[new P$S({context:i,width:e,height:t})]}),t$$(this._cocCommand)&&t$$(this._blurCommand)&&t$$(this._compositeCommand)&&(this._cocCommand.framebuffer=this._cocFBO,this._blurCommand.framebuffer=this._blurFBO,this._compositeCommand.framebuffer=this._compositeBlurFBO)},s$h.prototype.createCommand=function(e){var t={},i=new a$O({name:"DOFCoc",sources:[x$k]});this._useLogDepth&&i.defines.push("LOG_DEPTH"),this._cocCommand=e.createViewportQuadCommand(i,{uniformMap:t,owner:this}),this._blurCommand=e.createViewportQuadCommand(F$h,{uniformMap:t,owner:this}),this._compositeCommand=e.createViewportQuadCommand(S$g,{uniformMap:t,owner:this}),this.createUniformMap()},s$h.prototype.createUniformMap=function(){if(t$$(this._cocCommand)&&t$$(this._blurCommand)&&t$$(this._compositeCommand)){var e=this;this._cocCommand.uniformMap.focalDistance=function(){return e._focalDistance},this._cocCommand.uniformMap.focalRange=function(){return e._focalRange},this._cocCommand.uniformMap.focalLength=function(){return e._focalLength},this._cocCommand.uniformMap.fstop=function(){return e._fstop},this._blurCommand.uniformMap.texture=function(){return e._fbo.getColorTexture(0)},this._blurCommand.uniformMap.coc=function(){return e._cocFBO.getColorTexture(0)},this._blurCommand.uniformMap.blurRadius=function(){return e._blurRadius},this._blurCommand.uniformMap.textureSize=function(){return e._textureSize},this._blurCommand.uniformMap.poissonKernel=function(){return e._dofBlurKernel},this._compositeCommand.uniformMap.original=function(){return e._fbo.getColorTexture(0)},this._compositeCommand.uniformMap.blurred=function(){return e._blurFBO.getColorTexture(0)},this._compositeCommand.uniformMap.coc=function(){return e._cocFBO.getColorTexture(0)}}},s$h.prototype.setInputFBO=function(e){this._fbo=e},s$h.prototype.getDOFTexture=function(){return this._compositeBlurFBO.getColorTexture(0)},s$h.prototype.isDestroyed=function(){return!1},s$h.prototype.destroy=function(){return this._cocFBO=this._cocFBO&&this._cocFBO.destroy(),this._blurFBO=this._blurFBO&&this._blurFBO.destroy(),this._compositeBlurFBO=this._compositeBlurFBO&&this._compositeBlurFBO.destroy(),this._cocCommand=this._cocCommand&&this._cocCommand.shaderProgram&&this._cocCommand.shaderProgram.destroy(),this._blurCommand=this._blurCommand&&this._blurCommand.shaderProgram&&this._blurCommand.shaderProgram.destroy(),this._compositeCommand=this._compositeCommand&&this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy(),s$1e(this)},s$h.prototype.changeProgramDefine=function(e,t){var i=this._scanCommand;if(t$$(i)){var n=i.shaderProgram.fragmentShaderSource,r=i.shaderProgram.vertexShaderSource;e?v$g(n,t):P$d(n,t),i.shaderProgram.destroy(),i.shaderProgram=ShaderProgram.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:n})}};var k$i="uniform sampler2D randomTexture;\nuniform float intensity;\nuniform float bias;\nuniform float lengthCap;\nuniform float stepSize;\nuniform float frustumLength;\nvarying vec2 v_textureCoordinates;\nvec4 clipToEye(vec2 uv, float depth)\n{\nvec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));\nvec4 posEC = czm_inverseProjection * vec4(xy, depth, 1.0);\nposEC = posEC / posEC.w;\nreturn posEC;\n}\nfloat getDepth(in vec4 depth)\n{\nfloat z_window = czm_unpackDepth(depth);\nfloat n_range = czm_depthRange.near;\nfloat f_range = czm_depthRange.far;\nreturn (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n}\nvec3 getNormalXEdge(vec3 posInCamera, float depthU, float depthD, float depthL, float depthR, vec2 pixelSize)\n{\nvec4 posInCameraUp = clipToEye(v_textureCoordinates - vec2(0.0, pixelSize.y), depthU);\nvec4 posInCameraDown = clipToEye(v_textureCoordinates + vec2(0.0, pixelSize.y), depthD);\nvec4 posInCameraLeft = clipToEye(v_textureCoordinates - vec2(pixelSize.x, 0.0), depthL);\nvec4 posInCameraRight = clipToEye(v_textureCoordinates + vec2(pixelSize.x, 0.0), depthR);\nvec3 up = posInCamera.xyz - posInCameraUp.xyz;\nvec3 down = posInCameraDown.xyz - posInCamera.xyz;\nvec3 left = posInCamera.xyz - posInCameraLeft.xyz;\nvec3 right = posInCameraRight.xyz - posInCamera.xyz;\nvec3 DX = length(left) < length(right) ? left : right;\nvec3 DY = length(up) < length(down) ? up : down;\nreturn normalize(cross(DY, DX));\n}\nvoid main(void)\n{\nfloat depth = getDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));\nvec4 posInCamera = clipToEye(v_textureCoordinates, depth);\nif (posInCamera.z > frustumLength)\n{\ngl_FragColor = vec4(1.0);\nreturn;\n}\nvec2 pixelSize = 1.0 / czm_viewport.zw;\nfloat depthU = getDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates- vec2(0.0, pixelSize.y)));\nfloat depthD = getDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates+ vec2(0.0, pixelSize.y)));\nfloat depthL = getDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates- vec2(pixelSize.x, 0.0)));\nfloat depthR = getDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates+ vec2(pixelSize.x, 0.0)));\nvec3 normalInCamera = getNormalXEdge(posInCamera.xyz, depthU, depthD, depthL, depthR, pixelSize);\nfloat ao = 0.0;\nvec2 sampleDirection = vec2(1.0, 0.0);\nfloat gapAngle = 90.0 * czm_radiansPerDegree;\nfloat randomVal = getDepth(texture2D(randomTexture, v_textureCoordinates));\nfloat inverseViewportWidth = 1.0 / czm_viewport.z;\nfloat inverseViewportHeight = 1.0 / czm_viewport.w;\nfor (int i = 0; i < 4; i++)\n{\nfloat newGapAngle = gapAngle * (float(i) + randomVal);\nfloat cosVal = cos(newGapAngle);\nfloat sinVal = sin(newGapAngle);\nvec2 rotatedSampleDirection = vec2(cosVal * sampleDirection.x - sinVal * sampleDirection.y, sinVal * sampleDirection.x + cosVal * sampleDirection.y);\nfloat localAO = 0.0;\nfloat localStepSize = stepSize;\nfor (int j = 0; j < 6; j++)\n{\nvec2 directionWithStep = vec2(rotatedSampleDirection.x * localStepSize * inverseViewportWidth, rotatedSampleDirection.y * localStepSize * inverseViewportHeight);\nvec2 newCoords = directionWithStep + v_textureCoordinates;\nif(newCoords.x > 1.0 || newCoords.y > 1.0 || newCoords.x < 0.0 || newCoords.y < 0.0)\n{\nbreak;\n}\nfloat stepDepthInfo = getDepth(texture2D(czm_globeDepthTexture, newCoords));\nvec4 stepPosInCamera = clipToEye(newCoords, stepDepthInfo);\nvec3 diffVec = stepPosInCamera.xyz - posInCamera.xyz;\nfloat len = length(diffVec);\nif (len > lengthCap)\n{\nbreak;\n}\nfloat dotVal = clamp(dot(normalInCamera, normalize(diffVec)), 0.0, 1.0 );\nfloat weight = len / lengthCap;\nweight = 1.0 - weight * weight;\nif (dotVal < bias)\n{\ndotVal = 0.0;\n}\nlocalAO = max(localAO, dotVal * weight);\nlocalStepSize += stepSize;\n}\nao += localAO;\n}\nao /= 4.0;\nao = 1.0 - clamp(ao, 0.0, 1.0);\nao = pow(ao, intensity);\ngl_FragColor = vec4(vec3(ao), 1.0);\n}\n",F$g="uniform float u_delta;\nuniform float u_sigma;\nuniform float direction;\nuniform sampler2D u_texture;\nuniform vec2 u_step;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec2 st = v_textureCoordinates;\nvec2 dir = vec2(1.0 - direction, direction);\nvec2 off = u_step * dir;\nvec3 g;\ng.x = 1.0 / (sqrt(czm_twoPi) * u_sigma);\ng.y = exp((-0.5 * u_delta * u_delta) / (u_sigma * u_sigma));\ng.z = g.y * g.y;\nvec4 result = texture2D(u_texture, st) * g.x;\nfor (int i = 1; i < 8; ++i)\n{\ng.xy *= g.yz;\nvec2 offset = float(i) * dir * u_step;\nresult += texture2D(u_texture, st - offset) * g.x;\nresult += texture2D(u_texture, st + offset) * g.x;\n}\ngl_FragColor = result;\n}\n";function a$h(){this._fbo=void 0,this._scene=void 0,this._downSampleFBO1=void 0,this._downSampleFBO2=void 0,this._clearFBO1Command=void 0,this._clearFBO2Command=void 0,this._ambientOcclusionGenerateCommand=void 0,this._blurXCommand=void 0,this._blurYCommand=void 0,this._downSamplePassState=new t$l,this._upSamplePassState=new t$l,this._blurStep=new r$T,this._intensity=3,this._bias=.1,this._lengthCap=.26,this._stepSize=1.95,this._frustumLength=1e3,this._randomTexture=void 0,this._show=!1,this._useLogDepth=!0,this._context=void 0}Object.defineProperties(a$h.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(t$$(this._owner)&&this._owner.ssaoShowChange(e),this._show=e)}},intensity:{get:function(){return this._intensity},set:function(e){this._intensity=e}},lengthCap:{get:function(){return this._lengthCap},set:function(e){this._lengthCap=e}},bias:{get:function(){return this._bias},set:function(e){this._bias=e}},stepSize:{get:function(){return this._stepSize},set:function(e){this._stepSize=e}},frustumLength:{get:function(){return this._frustumLength},set:function(e){this._frustumLength=e}}}),a$h.prototype.clear=function(e,t){var i=this._clearFBO1Command;e$1z.clone(e$1Y(t,e$1z.BLACK),i.color),i.execute(e),i=this._clearFBO2Command,e$1z.clone(e$1Y(t,e$1z.BLACK),i.color),i.execute(e)},a$h.prototype.isPrepared=function(){return t$$(this._scene)&&this._scene._pickDepths.length>0},a$h.prototype.execute=function(e,t){this._ambientOcclusionGenerateCommand.execute(e,this._downSamplePassState),this._blurXCommand.execute(e,this._downSamplePassState),this._blurYCommand.execute(e,this._downSamplePassState)},a$h.prototype.createRandomTexture=function(e){for(var t=196608,i=new Uint8Array(t),n=0;n<t;n+=3)i[n]=Math.floor(255*Math.random());this._randomTexture=new P$S({context:e,pixelFormat:Z$_.RGB,pixelDatatype:v$Z.UNSIGNED_BYTE,source:{arrayBufferView:i,width:256,height:256},sampler:new a$Q({wrapS:j$13.REPEAT,wrapT:j$13.REPEAT,minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST})})},new n$13;var z$h=new n$13;function V$f(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function H$k(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}a$h.prototype.update=function(e,t,i,n){this._scene=i,this._context=t.context;var r=(e=t.context).drawingBufferWidth,o=e.drawingBufferHeight,a=this;if(t$$(this._randomTexture)||this.createRandomTexture(e),t$$(this._ambientOcclusionGenerateCommand)&&n!==this._useLogDepth&&(this._useLogDepth=n,this.changeProgramDefine(n,"LOG_DEPTH")),!t$$(this._ambientOcclusionGenerateCommand)){this._clearFBO1Command=new r$M({color:new e$1z}),this._clearFBO2Command=new r$M({color:new e$1z});var s={randomTexture:function(){return a._randomTexture},intensity:function(){return a._intensity},bias:function(){return a._bias},lengthCap:function(){return a._lengthCap},stepSize:function(){return a._stepSize},frustumLength:function(){return a._frustumLength}},l=new a$O({name:"ambientOcclusion",sources:[k$i]});this._useLogDepth&&l.defines.push("LOG_DEPTH"),this._ambientOcclusionGenerateCommand=e.createViewportQuadCommand(l,{uniformMap:s,owner:this}),s={direction:function(){return 0}},this._blurXCommand=e.createViewportQuadCommand(F$g,{uniformMap:s,owner:this}),s={direction:function(){return 1}},this._blurYCommand=e.createViewportQuadCommand(F$g,{uniformMap:s,owner:this})}var u=Math.pow(2,Math.ceil(Math.log(r)/Math.log(2))-2),c=Math.pow(2,Math.ceil(Math.log(o)/Math.log(2))-2),h=Math.max(1,u,c),d=z$h;d.width=h,d.height=h;var f=this._downSampleFBO1,p=t$$(f)&&f.getColorTexture(0)||void 0;if(!t$$(p)||p.width!==h||p.height!==h){this._downSampleFBO1=this._downSampleFBO1&&this._downSampleFBO1.destroy(),this._downSampleFBO2=this._downSampleFBO2&&this._downSampleFBO2.destroy(),this._blurStep.x=this._blurStep.y=2/h;this._downSampleFBO1=new u$F({context:e,colorTextures:[new P$S({context:e,width:h,height:h})]}),this._downSampleFBO2=new u$F({context:e,colorTextures:[new P$S({context:e,width:h,height:h})]}),this._clearFBO1Command.framebuffer=this._downSampleFBO1,this._clearFBO2Command.framebuffer=this._downSampleFBO2,this._ambientOcclusionGenerateCommand.framebuffer=this._downSampleFBO1,this._blurXCommand.framebuffer=this._downSampleFBO2,this._blurYCommand.framebuffer=this._downSampleFBO1;var _=p$1a.fromCache({viewport:d});this._ambientOcclusionGenerateCommand.uniformMap.depthTexture=function(){return a._scene._pickDepths.length>0&&t$$(a._scene._pickDepths[0]._depthTexture)?a._scene._pickDepths[0]._depthTexture:a._context.defaultTexture},this._ambientOcclusionGenerateCommand.renderState=_,this._blurXCommand.uniformMap.u_texture=function(){return a._downSampleFBO1.getColorTexture(0)},this._blurXCommand.uniformMap.u_step=function(){return a._blurStep},this._blurXCommand.uniformMap.u_delta=function(){return 1},this._blurXCommand.uniformMap.u_sigma=function(){return 2},this._blurXCommand.renderState=_,this._blurYCommand.uniformMap.u_texture=function(){return a._downSampleFBO2.getColorTexture(0)},this._blurYCommand.uniformMap.u_step=function(){return a._blurStep},this._blurYCommand.uniformMap.u_delta=function(){return 1},this._blurYCommand.uniformMap.u_sigma=function(){return 2},this._blurYCommand.renderState=_}this._downSamplePassState.context=e,this._upSamplePassState.context=e},a$h.prototype.setInputFBO=function(e){this._fbo=e},a$h.prototype.getAmbientOcclusionTexture=function(){return this._downSampleFBO1.getColorTexture(0)},a$h.prototype.changeProgramDefine=function(e,t){var i=this._scanCommand;if(t$$(i)){var n=i.shaderProgram.fragmentShaderSource,r=i.shaderProgram.vertexShaderSource;e?V$f(n,t):H$k(n,t),i.shaderProgram.destroy(),i.shaderProgram=ShaderProgram.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:n})}},a$h.prototype.isDestroyed=function(){return!1},a$h.prototype.destroy=function(){return this._downSampleFBO1=this._downSampleFBO1&&this._downSampleFBO1.destroy(),this._downSampleFBO2=this._downSampleFBO2&&this._downSampleFBO2.destroy(),this._ambientOcclusionGenerateCommand=this._ambientOcclusionGenerateCommand&&this._ambientOcclusionGenerateCommand.shaderProgram&&this._ambientOcclusionGenerateCommand.shaderProgram.destroy(),this._blurXCommand=this._blurXCommand&&this._blurXCommand.shaderProgram&&this._blurXCommand.shaderProgram.destroy(),this._blurYCommand=this._blurYCommand&&this._blurYCommand.shaderProgram&&this._blurYCommand.shaderProgram.destroy(),s$1e(this)};var k$h="uniform sampler2D u_colorTexture;\nuniform sampler2D u_appendTexture;\nuniform vec4 u_scanViewCenterArr[COUNT];\nuniform vec4 u_scanViewPlaneArr[COUNT];\nuniform float u_radiusArr[COUNT];\nuniform vec3 u_scanLineDirArr[COUNT];\nuniform vec3 u_scanLineMoveViewDirArr[COUNT];\nuniform vec3 u_scanLinePtArr[COUNT];\nuniform float u_lineWidth;\nuniform vec4 u_ScanColor;\nvarying vec2 v_textureCoordinates;\nvec3 pointProjectPlane(vec3 planeNormal, vec3 pointOnPlane, vec3 point1)\n{\nvec3 v01 = point1 - pointOnPlane;\nv01 = normalize(v01);\nvec3 normalizeVector = normalize(planeNormal);\nif (v01 == normalizeVector)\n{\nreturn pointOnPlane;\n}\nfloat d = (planeNormal.x * (point1.x - pointOnPlane.x) + planeNormal.y * (point1.y - pointOnPlane.y) + planeNormal.z * (point1.z - pointOnPlane.z)) / dot(planeNormal, planeNormal);\nvec3 res;\nres = point1 - planeNormal * d;\nreturn res;\n}\nfloat distancePointToLine(vec3 ptOnLine, vec3 vectorLine, vec3 testPt)\n{\nvec3 v = vectorLine;\nvec3 w = testPt - ptOnLine;\nfloat c1 = dot(w, v);\nfloat c2 = dot(v, v);\nfloat b = c1 / c2;\nvec3 Pb = ptOnLine + b * v;\nreturn length(testPt - Pb);\n}\nvoid main()\n{\nfloat logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));\n#ifdef LOG_DEPTH\nfloat scale = logDepthOrDepth;\n#else\nfloat scale = pow(logDepthOrDepth * 0.5 + 0.5, 8.0);\n#endif\nif(scale > 0.999999)\n{\nreturn;\n}\nvec4 viewPos = czm_windowToEyeCoordinates(v_textureCoordinates.xy * czm_viewport.zw, logDepthOrDepth);\nviewPos /= viewPos.w;\nvec4 scanColor = vec4(1.0);\nfloat scanValue = 0.0;\nvec4 appendColor = vec4(0.0);\nfor(int i = 0;i < COUNT;i++)\n{\nvec3 scanViewPlane = u_scanViewPlaneArr[i].xyz;\nvec3 scanViewCenter = u_scanViewCenterArr[i].xyz;\nfloat radius = u_radiusArr[i];\nvec3 scanLinePt = u_scanLinePtArr[i];\nvec3 scanLineDir = u_scanLineDirArr[i];\nvec3 scanLineMoveViewDir = u_scanLineMoveViewDirArr[i];\nfloat lineWidth = u_lineWidth;\nvec3 prjOnPlane = pointProjectPlane(scanViewPlane, scanViewCenter, viewPos.xyz);\nvec2 appendTexCoord = vec2(0.0);\n#ifdef CIRCLE\nvec3 relativePos = prjOnPlane - scanViewCenter;\nfloat dis = length(relativePos);\n#ifdef APPEND_TEXTURE\nif(dis < radius)\n{\nvec3 zAxis = scanViewPlane;\nvec3 temp = vec3(1.0, 0.0, 0.0);\nvec3 xAxis = normalize(cross(temp, zAxis));\nvec3 yAxis = normalize(cross(zAxis, xAxis));\nfloat cosTheta = dot(normalize(relativePos), xAxis);\nfloat cosTheta2 = dot(normalize(relativePos), yAxis);\nappendTexCoord.x = (dis * cosTheta / radius + 1.0) * 0.5;\nappendTexCoord.y = (dis * cosTheta2 / radius + 1.0) * 0.5;\nappendColor += texture2D(u_appendTexture, appendTexCoord);\nappendColor.rgb = appendColor.rgb * u_ScanColor.rgb;\n}\n#else\nif(dis < radius)\n{\nfloat f = 1.0 - abs(radius - dis) / radius;\nf = pow(f, 8.0);\nscanValue = f;\nscanColor *= u_ScanColor;\n}\n#endif\n#else\n#ifdef APPEND_TEXTURE\nvec3 relativePos = prjOnPlane - scanLinePt;\nfloat cosTheta = dot(scanLineDir, normalize(relativePos));\nfloat cosTheta2 = dot(scanLineMoveViewDir, normalize(relativePos));\nfloat disToLineCenter = length(relativePos);\nappendTexCoord.x = (disToLineCenter * cosTheta / lineWidth + 1.0) * 0.5;\nappendTexCoord.y = (disToLineCenter * cosTheta2 / lineWidth + 1.0) * 0.5;\nappendColor += texture2D(u_appendTexture, appendTexCoord);\nappendColor.rgb = appendColor.rgb * u_ScanColor.rgb;\n#else\nfloat disToLine = distancePointToLine(scanLinePt, scanLineDir, prjOnPlane);\nif(disToLine < lineWidth)\n{\nfloat f = abs(lineWidth - disToLine) / lineWidth;\nf = pow(f, 8.0);\nscanValue += f;\nscanColor = u_ScanColor;\n}\n#endif\n#endif\n}\nvec4 color = texture2D(u_colorTexture, v_textureCoordinates);\n#ifdef APPEND_TEXTURE\ngl_FragColor.rgb = color.rgb + appendColor.rgb * scanColor.rgb;\n#else\ngl_FragColor = mix(color, scanColor, scanValue);\n#endif\n}\n",e$i={CIRCLE:{programDefines:"CIRCLE"},LINE:{programDefines:"LINE"}},A$m=Object.freeze(e$i);function c$h(){this._fbo=void 0,this._inputFbo=void 0,this._scanCommand=void 0,this._upSamplePassState=new t$l,this._scene=void 0,this._mode=A$m.LINE,this._scanViewCenterArr=[],this._scanPlaneArr=[],this._scanCenterArr=[],this._scanLineMoveDirArr=[],this._scanLineMoveViewDirArr=[],this._scanLineDirArr=[],this._scanLinePtArr=[],this._radiusArr=[],this._lineWidth=1e3,this._color=new e$1z(1,1,1,1),this._period=1e3,this._speed=1e3,this._show=!1,this._appendTexUrl=void 0,this._appendTexture=void 0,this._textureChanged=!1,this._useLogDepth=!0}Object.defineProperties(c$h.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(t$$(this._owner)&&this._owner.scanShowChange(e),this._show=e)}},mode:{get:function(){return this._mode},set:function(e){this.changeProgramDefine(!1,this._mode.programDefines),this._mode=e,this.changeProgramDefine(!0,this._mode.programDefines)}},color:{get:function(){return this._color},set:function(e){this._color=e}},count:{get:function(){return this._scanCenterArr.length}},centerPostion:{get:function(){var e=this._scanCenterArr.length;return this._scanCenterArr[e-1]},set:function(e){this._scanCenterArr[0]=e,0===this._scanLineMoveDirArr.length&&(this._scanViewCenterArr[0]=new a$11,this.computeDefaultMoveDir(0))}},period:{get:function(){return this._period/1e3},set:function(e){this._period=1e3*e}},speed:{get:function(){return this._speed},set:function(e){this._speed=e}},lineMoveDirection:{get:function(){var e=this._scanLineMoveDirArr.length;return this._scanLineMoveDirArr[e-1]},set:function(e){var t=this._scanLineMoveDirArr.length,i=a$11.normalize(e,new a$11);this._scanLineMoveDirArr[t-1]=i}},lineWidth:{get:function(){return this._lineWidth},set:function(e){this._lineWidth=e}},textureUrl:{get:function(){return this._appendTexUrl},set:function(e){this._textureChanged=!0,this._appendTexUrl=e,(!t$$(e)||""===e)&&this.changeProgramDefine(!1,"APPEND_TEXTURE")}}}),c$h.prototype.isPrepared=function(){return t$$(this._scene)&&this._scene._pickDepths.length>0},c$h.prototype.execute=function(e){this._scanCommand.execute(e,this._upSamplePassState)};var G$h=new n$13,v$f=new a$10(0,0,0,1),C$g=new a$10(0,0,0,1),a$g=new a$10,d$h=new a$10,p$k=new a$11,R$d=new n$17(new a$11(0,0,1),10);function H$j(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function j$c(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}c$h.prototype.computeDefaultMoveDir=function(e){var t=new a$11,i=this._scanCenterArr[e];t=a$11.cross(new a$11(0,0,1),i,t),t=a$11.normalize(t,t),this._scanLineMoveDirArr[e]=t},c$h.prototype.computeScanPlane=function(e,t){var i=this._scanCenterArr[t],n=this._scanViewCenterArr[t],r=this._scanPlaneArr[t];t$$(r)||(r=this._scanPlaneArr[t]=new a$10);var o=e._frameState.camera;e.mode===b$1d.SCENE2D&&(C$g.x=i.x,C$g.y=i.y,C$g.z=i.z-1e3),v$f=c$1a.multiplyByVector(o.viewMatrix,C$g,v$f),d$h=a$10.subtract(n,v$f,d$h),p$k.x=d$h.x,p$k.y=d$h.y,p$k.z=d$h.z,p$k=a$11.normalize(p$k,p$k);var a=n$17.fromPointNormal(new a$11(n.x,n.y,n.z),p$k,R$d);r.x=a.normal.x,r.y=a.normal.y,r.z=a.normal.z,r.w=a.distance},c$h.prototype.updateScanParameters=function(e){for(var t=e._frameState.camera,i=0,n=this._scanCenterArr.length;i<n;i++){var r=this._scanCenterArr[i];a$g.x=r.x,a$g.y=r.y,a$g.z=r.z,a$g.w=1,c$1a.multiplyByVector(t.viewMatrix,a$g,this._scanViewCenterArr[i]),this.computeScanPlane(e,i);var o=performance.now()%this._period;0==o&&(o=this._period);var a=this._speed*o/1e3;this._mode===A$m.CIRCLE?this._radiusArr[i]=a:this._mode===A$m.LINE&&(this.computeScanLineDir(e,i),this.computeScanLinePt(e,a,i))}},c$h.prototype.computeScanLineDir=function(e,t){var i=e._frameState.camera,n=this._scanLineDirArr[t];t$$(n)||(n=this._scanLineDirArr[t]=new a$11);var r=this._scanLineMoveDirArr[t];t$$(r)||(r=this._scanLineMoveDirArr[t]=new a$11);var o=this._scanCenterArr[t],a=this._scanViewCenterArr[t];n=e.mode===b$1d.SCENE2D?a$11.cross(r,new a$11(0,0,1),n):a$11.cross(r,o,n),a$11.normalize(n,n);var s=new a$11;s=a$11.multiplyByScalar(n,10,s),s=a$11.add(o,s,s),a$g.x=s.x,a$g.y=s.y,a$g.z=s.z,a$g.w=1,a$g=c$1a.multiplyByVector(i.viewMatrix,a$g,a$g),n.x=a$g.x-a.x,n.y=a$g.y-a.y,n.z=a$g.z-a.z,a$11.normalize(n,n)},c$h.prototype.computeScanLinePt=function(e,t,i){var n=e._frameState.camera,r=this._scanLinePtArr[i];t$$(r)||(r=this._scanLinePtArr[i]=new a$11);var o=this._scanLineMoveDirArr[i],a=this._scanCenterArr[i],s=this._scanViewCenterArr[i],l=this._scanLineMoveViewDirArr[i];t$$(l)||(l=this._scanLineMoveViewDirArr[i]=new a$11),r=a$11.multiplyByScalar(o,t,r),r=a$11.add(a,r,r),a$g.x=r.x,a$g.y=r.y,a$g.z=r.z,a$g.w=1,a$g=c$1a.multiplyByVector(n.viewMatrix,a$g,a$g),r.x=a$g.x,r.y=a$g.y,r.z=a$g.z,l.x=a$g.x-s.x,l.y=a$g.y-s.y,l.z=a$g.z-s.z,a$11.normalize(l,l)},c$h.prototype.update=function(e,t,i,n){this._context=t.context;var r=(e=t.context).drawingBufferWidth,o=e.drawingBufferHeight;this._scene=i,this.updateScanParameters(i);var a=this;if(this._textureChanged&&(t$$(this._appendTexUrl)&&""!==this._appendTexUrl&&c$18(n$S(a._appendTexUrl),(function(t){t$$(a._appendTexture)&&a._appendTexture.destroy(),a._appendTexture=new P$S({context:e,source:t,pixelFormat:Z$_.RGB,pixelDatatype:v$Z.UNSIGNED_BYTE}),a.changeProgramDefine(!0,"APPEND_TEXTURE")})),this._textureChanged=!1),t$$(this._scanCommand)&&n!==this._useLogDepth&&(this._useLogDepth=n,this.changeProgramDefine(n,"LOG_DEPTH")),!t$$(this._scanCommand)){var s=new a$O({name:"Scan",sources:[k$h]});s.defines.push(this._mode.programDefines),s.defines.push("COUNT "+this._scanCenterArr.length),n&&s.defines.push("LOG_DEPTH"),this._scanCommand=e.createViewportQuadCommand(s,{uniformMap:{},owner:this}),this._scanCommand.uniformMap.u_depthTex=function(){return a._scene._pickDepths[0]._depthTexture},this._scanCommand.uniformMap.u_colorTexture=function(){return a._inputFbo.getColorTexture(0)},this._scanCommand.uniformMap.u_appendTexture=function(){return t$$(a._appendTexture)?a._appendTexture:a._context.defaultTexture},this._scanCommand.uniformMap.u_scanViewCenterArr=function(){return a._scanViewCenterArr},this._scanCommand.uniformMap.u_radiusArr=function(){return a._radiusArr},this._scanCommand.uniformMap.u_scanViewPlaneArr=function(){return a._scanPlaneArr},this._scanCommand.uniformMap.u_scanLineDirArr=function(){return a._scanLineDirArr},this._scanCommand.uniformMap.u_scanLineMoveViewDirArr=function(){return a._scanLineMoveViewDirArr},this._scanCommand.uniformMap.u_scanLinePtArr=function(){return a._scanLinePtArr},this._scanCommand.uniformMap.u_lineWidth=function(){return a._lineWidth},this._scanCommand.uniformMap.u_ScanColor=function(){return a._color}}var l=this._fbo,u=t$$(l)&&l.getColorTexture(0)||void 0;if(!t$$(u)||u.width!==r||u.height!==o){this._fbo=this._fbo&&this._fbo.destroy(),this._fbo=new u$F({context:e,colorTextures:[new P$S({context:e,width:r,height:o})]}),this._scanCommand.framebuffer=this._fbo;var c=G$h;c.width=r,c.height=o;var h=p$1a.fromCache({viewport:c});this._scanCommand.renderState=h}this._upSamplePassState.context=e},c$h.prototype.setInputFBO=function(e){this._inputFbo=e},c$h.prototype.getScanTexture=function(){return this._fbo.getColorTexture(0)},c$h.prototype.getScanFBO=function(){return this._fbo},c$h.prototype.changeProgramDefine=function(e,t){var i=this._scanCommand;if(t$$(i)){var n=i.shaderProgram.fragmentShaderSource,r=i.shaderProgram.vertexShaderSource;e?H$j(n,t):j$c(n,t),i.shaderProgram.destroy(),i.shaderProgram=p$15.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:n})}},c$h.prototype.add=function(e){if(t$$(e))return 0===this._scanCenterArr.length?void(this.centerPosition=a$11.clone(e)):(this.changeProgramDefine(!1,"COUNT "+this._scanCenterArr.length),this._scanCenterArr.push(e),this._scanViewCenterArr.push(new a$11),this.changeProgramDefine(!0,"COUNT "+this._scanCenterArr.length),this.computeDefaultMoveDir(this._scanCenterArr.length-1),this._scanCenterArr.length-1)},c$h.prototype.remove=function(e){e>=this._scanCenterArr.length||1===this._scanCenterArr.length||(this.changeProgramDefine(!1,"COUNT "+this._scanCenterArr.length),this._scanCenterArr.splice(e,1),this._scanViewCenterArr.splice(e,1),this._scanLineMoveDirArr.splice(e,1),this.changeProgramDefine(!0,"COUNT "+this._scanCenterArr.length))},c$h.prototype.isDestroyed=function(){return!1},c$h.prototype.destroy=function(){return this._fbo=this._fbo&&this._fbo.destroy(),this._scanCommand=this._scanCommand&&this._scanCommand.shaderProgram&&this._scanCommand.shaderProgram.destroy(),t$$(this._appendTexture)&&(this._appendTexture.destroy(),this._appendTexture=null),s$1e(this)};var T$l="#define AA_SAMPLES 9\n#define AA_CLAMP 1\n#define AA_CLIP 0\n#define SHARPEN 1\nuniform sampler2D u_currentTexture;\nuniform sampler2D u_historyTexture;\nuniform mat4 u_transformMatrix;\nuniform vec2 u_jitter;\nuniform float u_sampleSpatialWeight[AA_SAMPLES];\nuniform vec2 u_offsets3x3[AA_SAMPLES];\nvarying vec2 v_textureCoordinates;\nvec3 RGB2YCoCgR(vec3 rgbColor){\nfloat Y = dot(rgbColor, vec3(1.0, 2.0, 1.0));\nfloat Co = dot(rgbColor, vec3(2.0, 0.0, -2.0));\nfloat Cg = dot(rgbColor, vec3(-1.0, 2.0, -1.0));\nvec3 YCoCgRColor = vec3(Y, Co, Cg);\nreturn YCoCgRColor;\n}\nvec3 YCoCgR2RGB(vec3 YCoCgRColor){\nfloat Y = YCoCgRColor.x * 0.25;\nfloat Co = YCoCgRColor.y * 0.25;\nfloat Cg = YCoCgRColor.z * 0.25;\nfloat R = Y + Co - Cg;\nfloat G = Y + Cg;\nfloat B = Y - Co - Cg;\nvec3 rgbColor = vec3(R, G, B);\nreturn rgbColor;\n}\nfloat Luminance(vec3 color){\nreturn color.r;\n}\nvec3 ToneMap(vec3 color){\nreturn color / (1.0 + Luminance(color));\n}\nvec3 UnToneMap(vec3 color){\nreturn color / (1.0 - Luminance(color));\n}\nvec3 GetNeighorhoodSamp(vec2 offset, vec2 uv){\nfloat fx = offset.x;\nfloat fy = offset.y;\nvec2 sampleOffset = vec2(fx / czm_viewport.z, fy / czm_viewport.w);\nvec2 sampleUV = uv + sampleOffset;\nsampleUV = clamp(sampleUV, 0.0, 1.0);\nvec3 neighorhoodSamp = texture2D(u_currentTexture, sampleUV).rgb;\nneighorhoodSamp = max(neighorhoodSamp, 0.0);\nneighorhoodSamp = ToneMap(neighorhoodSamp);\nneighorhoodSamp = RGB2YCoCgR(neighorhoodSamp);\nreturn neighorhoodSamp;\n}\nfloat HdrWeightY(float Color){\nfloat exposure = 1.0;\nreturn 1.0 / (Color * exposure + 4.0);\n}\nfloat GetSceneColorLuma4(vec3 SceneColor){\nreturn SceneColor.x;\n}\nfloat GetSceneColorHdrWeight(vec3 SceneColor)\n{\nreturn HdrWeightY(SceneColor.x);\n}\nvec2 WeightedLerpFactors(float WeightA, float WeightB, float Blend)\n{\nfloat BlendA = (1.0 - Blend) * WeightA;\nfloat BlendB = Blend * WeightB;\nfloat RcpBlend = 1.0 / (BlendA + BlendB);\nBlendA *= RcpBlend;\nBlendB *= RcpBlend;\nreturn vec2(BlendA, BlendB);\n}\nvoid ComputeNeighborhoodBoundingbox(in vec3 Neighbors[AA_SAMPLES], out vec3 OutNeighborMin, out vec3 OutNeighborMax)\n{\nvec3 NeighborMin;\nvec3 NeighborMax;\nNeighborMin = min( min(Neighbors[1], Neighbors[3]), Neighbors[4] );\nNeighborMin = min( min(NeighborMin, Neighbors[5]), Neighbors[7] );\nNeighborMax = max( max(Neighbors[1], Neighbors[3]), Neighbors[4] );\nNeighborMax = max( max(NeighborMax, Neighbors[5]), Neighbors[7] );\nvec3 NeighborMinPlus = NeighborMin;\nvec3 NeighborMaxPlus = NeighborMax;\nNeighborMin = min( min(NeighborMin, Neighbors[0]), Neighbors[2] );\nNeighborMin = min( min(NeighborMin, Neighbors[6]), Neighbors[8] );\nNeighborMax = max( max(NeighborMax, Neighbors[0]), Neighbors[2] );\nNeighborMax = max( max(NeighborMax, Neighbors[6]), Neighbors[8] );\nOutNeighborMin = NeighborMin;\nOutNeighborMax = NeighborMax;\n}\nfloat IntersectAABB(vec3 Dir, vec3 Org, vec3 Box){\nvec3 RcpDir = vec3(1.0 / Dir.x, 1.0 / Dir.y, 1.0 / Dir.z);\nvec3 TNeg = ( Box - Org) * RcpDir;\nvec3 TPos = ((-Box) - Org) * RcpDir;\nreturn max(max(min(TNeg.x, TPos.x), min(TNeg.y, TPos.y)), min(TNeg.z, TPos.z));\n}\nfloat HistoryClip(vec3 History, vec3 Filtered, vec3 NeighborMin, vec3 NeighborMax){\n#if 0\nvec3 Min = min(Filtered, min(NeighborMin, NeighborMax));\nvec3 Max = max(Filtered, max(NeighborMin, NeighborMax));\nvec3 Avg2 = Max + Min;\nvec3 Dir = Filtered - History;\nvec3 Org = History - Avg2 * 0.5;\nvec3 Scale = Max - Avg2 * 0.5;\nreturn clamp(IntersectAABB(Dir, Org, Scale), 0.0, 1.0);\n#else\nvec3 BoxMin = NeighborMin;\nvec3 BoxMax = NeighborMax;\nvec3 RayOrigin = History;\nvec3 RayDir = Filtered - History;\nRayDir = all(lessThanEqual(abs(RayDir), vec3(1.0/65536.0))) ? vec3(1.0/65536.0) : RayDir;\nvec3 InvRayDir = vec3( 1.0 / RayDir.x, 1.0 / RayDir.y, 1.0 / RayDir.z );\nvec3 MinIntersect = (BoxMin - RayOrigin) * InvRayDir;\nvec3 MaxIntersect = (BoxMax - RayOrigin) * InvRayDir;\nvec3 EnterIntersect = min( MinIntersect, MaxIntersect );\nreturn max( max(EnterIntersect.x, EnterIntersect.y), EnterIntersect.z );\n#endif\n}\nvec3 ClampHistory(vec3 Filtered, vec3 History, vec3 NeighborMin, vec3 NeighborMax)\n{\n#if !AA_CLAMP\nreturn History;\n#elif AA_CLIP\nvec3 TargetColor = Filtered;\nvec3 HistoryColor = History;\nfloat ClipBlend = HistoryClip( HistoryColor.rgb, TargetColor.rgb, NeighborMin.rgb, NeighborMax.rgb );\nClipBlend = clamp( ClipBlend, 0.0, 1.0 );\nHistoryColor = mix( HistoryColor, TargetColor, ClipBlend );\nreturn HistoryColor;\n#else //!AA_CLIP\nHistory = clamp(History, NeighborMin, NeighborMax);\nreturn History;\n#endif\n}\nvec3 FilterCurrentFrameInputSamples(in vec2 uv, inout vec3 neighborhood[AA_SAMPLES]){\nfor(int i = 0; i < AA_SAMPLES; i++){\nneighborhood[i] = GetNeighorhoodSamp(u_offsets3x3[i], uv);\n}\nfloat totalWeight = 0.0;\nvec3 sum = vec3(0.0);\nfor(int i = 0; i < AA_SAMPLES; i++){\nfloat neighborhoodHdrWeight = GetSceneColorHdrWeight(neighborhood[i]);\nfloat neighborhoodFinalWeight = neighborhoodHdrWeight * u_sampleSpatialWeight[i];\ntotalWeight += neighborhoodFinalWeight;\nsum += neighborhood[i] * neighborhoodFinalWeight;\n}\nvec3 filtered = sum / totalWeight;\nreturn filtered;\n}\nvoid main()\n{\nfloat HistoryBlur = 0.0;\nvec2 jitteredUV = v_textureCoordinates + u_jitter;\nfloat logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));\nvec4 viewPos = czm_windowToEyeCoordinates(v_textureCoordinates.xy * czm_viewport.zw, logDepthOrDepth);\nviewPos /= viewPos.w;\nvec4 histroyUV = u_transformMatrix * viewPos;\nhistroyUV = histroyUV / histroyUV.w;\nhistroyUV.xy = histroyUV.xy * 0.5 + 0.5;\nhistroyUV.xy = histroyUV.xy + u_jitter;\nvec3 prevColor = texture2D(u_historyTexture, histroyUV.xy).rgb;\nprevColor = ToneMap(prevColor);\nprevColor = RGB2YCoCgR(prevColor);\nvec3 neighborhood[AA_SAMPLES];\nvec3 filtered = FilterCurrentFrameInputSamples(jitteredUV, neighborhood);\nvec3 NeighborMin;\nvec3 NeighborMax;\nComputeNeighborhoodBoundingbox(neighborhood, NeighborMin, NeighborMax);\nfloat LumaMin = GetSceneColorLuma4(NeighborMin);\nfloat LumaMax = GetSceneColorLuma4(NeighborMax);\nfloat LumaHistory = GetSceneColorLuma4(prevColor);\nprevColor = ClampHistory(filtered, prevColor, NeighborMin, NeighborMax);\nfloat BlendFinal = 0.04;\nfloat FilterWeight = GetSceneColorHdrWeight(filtered);\nfloat HistoryWeight = GetSceneColorHdrWeight(prevColor);\nvec2 Weights = WeightedLerpFactors(HistoryWeight, FilterWeight, BlendFinal);\nvec3 color = prevColor * Weights.x + filtered * Weights.y;\ncolor = YCoCgR2RGB(color);\ncolor = UnToneMap(color);\ngl_FragColor.rgb = color;\ngl_FragColor.a = 1.0;\n}\n",C$f=8,D$h=[0,-.5,.5,-3/4,1/4,-1/4,3/4,-7/8],V$e=[-1/3,1/3,-7/9,-1/9,5/9,-5/9,1/9,7/9],y$h=[new r$T(-1,-1),new r$T(0,-1),new r$T(1,-1),new r$T(-1,0),new r$T(0,0),new r$T(1,0),new r$T(-1,1),new r$T(0,1),new r$T(1,1)];function n$i(){this._compositeCommand=void 0,this._histroyFBO=[],this._upSamplePassState=new t$l,this._show=!1,this._fbo=void 0,this._fboIndex=0,this._uniformState=void 0,this._prevViewProjectionMatrx=new c$1a,this._transformMatrix=new c$1a,this._frameIndex=0,this._jitterPixel=new r$T,this._jitterUVOffset=new r$T,this._sampleWeights=[],this._plusWeights=[]}Object.defineProperties(n$i.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(this._show=e)}}}),n$i.prototype.execute=function(e,t){!t$$(e.uniformState)||!t$$(e.uniformState.globeDepthTexture)||(this._compositeCommand.framebuffer=this._histroyFBO[this._fboIndex],this._compositeCommand.execute(e,this._upSamplePassState),this._frameIndex++,this._frameIndex===C$f&&(this._frameIndex=0))};var L$k=new n$13;n$i.prototype.update=function(e,t,i,n){var r=n.useLogDepth,o=(e=t.context).uniformState;this._uniformState=o,o.viewProjection.clone(this._prevViewProjectionMatrx);var a=e.drawingBufferWidth,s=e.drawingBufferHeight;this._scene=i,t$$(this._compositeCommand)&&r!==this._useLogDepth&&(this._useLogDepth=r,this.changeProgramDefine(r,"LOG_DEPTH")),t$$(this._compositeCommand)||this.createCommand(e);var l=!1;if(0==this._histroyFBO.length)l=!0;else{var u=this._histroyFBO[0],c=t$$(u)&&u.getColorTexture(0)||void 0;(!t$$(c)||c.width!==a||c.height!==s)&&(l=!0)}if(l){this.createFBO(a,s,e);var h=L$k;h.width=a,h.height=s;var d=p$1a.fromCache({viewport:h});this._compositeCommand.renderState=d}this._upSamplePassState.context=e,this._fboIndex=(this._fboIndex+1)%2,n.jitterIndex=this._frameIndex,W$b(this,n,a,s),U$d(this)};var v$e=new r$T;function W$b(e,t,i,n){var r=e._frameIndex%C$f,o=D$h[r],a=V$e[r],s=.47,l=Math.exp(-.565866908103214),u=2*Math.PI*a,c=s*Math.sqrt(-2*Math.log((1-o)*l+o)),h=c*Math.cos(u),d=c*Math.sin(u);e._jitterPixel.x=h,e._jitterPixel.y=d;var f=e._jitterPixel.x/i,p=e._jitterPixel.y/n;v$e.x=f,v$e.y=p,t.jitter=v$e,e._jitterUVOffset.x=-f/2,e._jitterUVOffset.y=-p/2}function U$d(e){var t,i,n=[],r=[],o=0;for(i=0;i<9;i++){var a=y$h[i].x-e._jitterPixel.x,s=y$h[i].y-e._jitterPixel.y;n[i]=Math.exp(-2.29*(a*a+s*s)),o+=n[i]}for(r[0]=n[1],r[1]=n[3],r[2]=n[4],r[3]=n[5],r[4]=n[7],t=n[1]+n[3]+n[4]+n[5]+n[7],i=0;i<9;i++)n[i]=n[i]/o;for(i=0;i<5;i++)r[i]=r[i]/t;e._sampleWeights=n,e._plusWeights=r}function A$l(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function H$i(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}n$i.prototype.createFBO=function(e,t,i){var n,r=v$Z.FLOAT;for(n=0;n<this._histroyFBO.length;n++)this._histroyFBO[n].destroy();for(this._histroyFBO=[],n=0;n<2;n++){var o=new u$F({context:i,colorTextures:[new P$S({context:i,width:e,height:t,pixelDatatype:r})]});this._histroyFBO.push(o)}},n$i.prototype.createCommand=function(e){var t=new a$O({name:"TAAComposite",sources:[T$l]});this._useLogDepth&&t.defines.push("LOG_DEPTH"),this._compositeCommand=e.createViewportQuadCommand(t,{uniformMap:{},owner:this}),this.createUniformMap()},n$i.prototype.createUniformMap=function(){if(t$$(this._compositeCommand)){var e=this;this._compositeCommand.uniformMap.u_currentTexture=function(){return e._fbo.getColorTexture(0)},this._compositeCommand.uniformMap.u_historyTexture=function(){var t=(e._fboIndex+1)%2;return e._histroyFBO[t].getColorTexture(0)},this._compositeCommand.uniformMap.u_transformMatrix=function(){var t=e._uniformState.inverseView3D;return c$1a.multiply(e._prevViewProjectionMatrx,t,e._transformMatrix),e._transformMatrix},this._compositeCommand.uniformMap.u_jitter=function(){return e._jitterUVOffset},this._compositeCommand.uniformMap.u_sampleSpatialWeight=function(){return e._sampleWeights},this._compositeCommand.uniformMap.u_offsets3x3=function(){return y$h}}},n$i.prototype.setInputFBO=function(e){this._fbo=e},n$i.prototype.getTAATexture=function(){return this._histroyFBO[this._fboIndex].getColorTexture(0)},n$i.prototype.getOutputFBO=function(){return this._histroyFBO[this._fboIndex]},n$i.prototype.changeProgramDefine=function(e,t){var i=this._scanCommand;if(t$$(i)){var n=i.shaderProgram.fragmentShaderSource,r=i.shaderProgram.vertexShaderSource;e?A$l(n,t):H$i(n,t),i.shaderProgram.destroy(),i.shaderProgram=ShaderProgram.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:n})}},n$i.prototype.isDestroyed=function(){return!1},n$i.prototype.destroy=function(){for(var e=0;e<this._histroyFBO.length;e++)this._histroyFBO[e].destroy();return this._compositeCommand=this._compositeCommand&&this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy(),s$1e(this)};var h$g={BLOOM:"BLOOM",COLOR_CORRECTION:"COLOR_CORRECTION",SCAN:"SCAN",SSAO:"SSAO",TONEMAPPING:"TONEMAPPING",ACES_TONEMAPPING:"ACES_TONEMAPPING",FILMIC_TONEMAPPING:"FILMIC_TONEMAPPING"};function o$i(e){this._fbo=void 0,this._blendCommand=void 0,this._fullScreenCommand=void 0,this._upSamplePassState=new t$l,this.bloomEffect=void 0,this.colorCorrection=void 0,this.context=e,this.show=!1,this.bloomEffect=new e$k,this.colorCorrection=new o$j(e),this.depthOfFieldEffect=new s$h,this.SSAOEffect=new a$h,this.scanEffect=new c$h,this.temporalAA=new n$i,this.bloomEffect._owner=this,this.colorCorrection._owner=this,this.scanEffect._owner=this,this.SSAOEffect._owner=this,this.exposure=1,this.toneMappingWhitePoint=11.2,this._toneMappingEnabled=!1,this.inputTexture=void 0,this._outputFbo=void 0}Object.defineProperties(o$i.prototype,{toneMappingEnabled:{get:function(){return this._toneMappingEnabled},set:function(e){e!==this._toneMappingEnabled&&(this.toneMappingEnabledChange(e),this._toneMappingEnabled=e)}},outputFbo:{get:function(){return this._outputFbo},set:function(e){this._outputFbo=e}}}),o$i.prototype.isEnable=function(){return this.isTAAEnable()||this.isBloomEnable()||this.isColorCorrectionEnable()||this.isDOFEnable()||this.isScanEnable()||this.isSSAOEnable()||this._toneMappingEnabled},o$i.prototype.isBloomEnable=function(){return t$$(this.bloomEffect)&&this.bloomEffect.show},o$i.prototype.isColorCorrectionEnable=function(){return t$$(this.colorCorrection)&&this.colorCorrection.show},o$i.prototype.isDOFEnable=function(){return t$$(this.depthOfFieldEffect)&&this.depthOfFieldEffect.show},o$i.prototype.isSSAOEnable=function(){return t$$(this.SSAOEffect)&&this.SSAOEffect.show},o$i.prototype.isScanEnable=function(){return t$$(this.scanEffect)&&this.scanEffect.show},o$i.prototype.isTAAEnable=function(){return t$$(this.temporalAA)&&this.temporalAA.show},o$i.prototype.clear=function(e,t){this.isBloomEnable()&&this.bloomEffect.clear(e,t)},o$i.prototype.copy=function(e,t){this.inputTexture=t,this._fullScreenCommand.framebuffer=this._fbo,this._fullScreenCommand.execute(e),this.inputTexture=void 0},o$i.prototype.execute=function(e,t){this.isTAAEnable()&&this.temporalAA.execute(e),this.isDOFEnable()&&this.depthOfFieldEffect.execute(e),this.isScanEnable()&&this.scanEffect.execute(e),this.isBloomEnable()&&this.bloomEffect.execute(e,t),this.isSSAOEnable()&&this.SSAOEffect.execute(e,t),this.isEnable()&&(this._fullScreenCommand.framebuffer=t,this._blendCommand.framebuffer=t,this._fullScreenCommand.execute(e),this._blendCommand.execute(e,this._upSamplePassState))};var k$g=new n$13;function z$g(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function j$b(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function i$g(e,t){var i,n=t.terrainProvider,r=t.mapProjection,o=r.ellipsoid,a=t.camera.getRectangleCameraCoordinates(e);return i=t.mode===b$1d.SCENE3D?o.cartesianToCartographic(a):r.unproject(a),t$$(n)?n.readyPromise.then((function(){if(!t$$(n.availability)||t.mode===b$1d.SCENE2D)return i;var r=[s$1p.center(e),s$1p.southeast(e),s$1p.southwest(e),s$1p.northeast(e),s$1p.northwest(e)];return i$g._sampleTerrainMostDetailed(n,r).then((function(e){var t=e.reduce((function(e,t){return Math.max(t.height,e)}),-Number.MAX_VALUE),n=i;return n.height+=isNaN(t)?0:t,n}))})):c$18.resolve(i)}o$i.prototype.update=function(e,t,i,n){var r=n.useLogDepth;this.isTAAEnable()&&this.temporalAA.update(e,t,i,n),this.isDOFEnable()&&this.depthOfFieldEffect.update(e,t,i,r),this.isScanEnable()&&this.scanEffect.update(e,t,i,r),this.isBloomEnable()&&this.bloomEffect.update(e,t,i),this.isSSAOEnable()&&this.SSAOEffect.update(e,t,i,r);var o=(e=t.context).drawingBufferWidth,a=e.drawingBufferHeight;if(!t$$(this._blendCommand)){var s=new a$O({name:"CompositorFP",sources:[v$h]});this.isScanEnable()&&s.defines.push(h$g.SCAN),this.isBloomEnable()&&s.defines.push(h$g.BLOOM),this.isColorCorrectionEnable()&&s.defines.push(h$g.COLOR_CORRECTION),this.isSSAOEnable()&&s.defines.push(h$g.SSAO),this._toneMappingEnabled&&s.defines.push(h$g.TONEMAPPING);var l={};this._blendCommand=e.createViewportQuadCommand(s,{uniformMap:l,owner:this}),l={},this._fullScreenCommand=e.createViewportQuadCommand(D$j,{uniformMap:l,owner:this})}var u=this._fbo,c=t$$(u)&&u.getColorTexture(0)||void 0;if(!t$$(c)||c.width!==o||c.height!==a){u=u&&u.destroy();var h=[new P$S({context:e,width:o,height:a,pixelDatatype:e.colorBufferHalfFloat?v$Z.HALF_FLOAT:v$Z.FLOAT})];u=e.depthTexture?this._fbo=new u$F({context:e,colorTextures:h,depthTexture:new P$S({context:e,width:o,height:a,pixelFormat:Z$_.DEPTH_COMPONENT,pixelDatatype:v$Z.UNSIGNED_SHORT})}):this._fbo=new u$F({context:e,colorTextures:h,depthRenderbuffer:new h$q({context:e,format:E$r.DEPTH_COMPONENT16})});var d=k$g;d.width=o,d.height=a;var f=p$1a.fromCache({viewport:d}),p=this;this._blendCommand.uniformMap.u_texture0=function(){return p.isTAAEnable()?p.temporalAA.getTAATexture():p.isDOFEnable()?p.depthOfFieldEffect.getDOFTexture():p.isScanEnable()?p.scanEffect.getScanTexture():u.getColorTexture(0)},this._blendCommand.uniformMap.u_ScanColor=function(){return p.scanEffect.color},this._blendCommand.uniformMap.u_BloomTexture=function(){return p.bloomEffect.getBloomTexture()},this._blendCommand.uniformMap.u_Bloom_DirtTex=function(){return p.bloomEffect.getBloomDirtTexture()},this._blendCommand.uniformMap.u_BloomTex_TexelSize=function(){return p.bloomEffect.getBloomTextureTexelSize()},this._blendCommand.uniformMap.u_Bloom_DirtTileOffset=function(){return p.bloomEffect.getDirtTileOffset()},this._blendCommand.uniformMap.u_Bloom_Settings=function(){return p.bloomEffect.getBloomSettings()},this._blendCommand.uniformMap.u_Bloom_Color=function(){return p.bloomEffect.getBloomColor()},this._blendCommand.uniformMap.u_AmbientOcclusionTexture=function(){return p.SSAOEffect.getAmbientOcclusionTexture()},this._blendCommand.uniformMap.u_brightness=function(){return p.colorCorrection.brightness},this._blendCommand.uniformMap.u_contrast=function(){return p.colorCorrection.contrast},this._blendCommand.uniformMap.u_saturation=function(){return p.colorCorrection.saturation},this._blendCommand.uniformMap.u_hue=function(){return p.colorCorrection.hue},this._blendCommand.uniformMap.u_exposure=function(){return p.exposure},this._blendCommand.uniformMap.u_toneMappingWhitePoint=function(){return p.toneMappingWhitePoint},this._blendCommand.renderState=f,this._fullScreenCommand.uniformMap.u_texture=function(){return e$1Y(p.inputTexture,u.getColorTexture(0))},this._fullScreenCommand.renderState=f}return this.temporalAA.setInputFBO(u),this.isTAAEnable()&&(u=this.temporalAA.getOutputFBO()),this.depthOfFieldEffect.setInputFBO(u),this.SSAOEffect.setInputFBO(u),this.bloomEffect.setInputFBO(u),this.scanEffect.setInputFBO(u),this._upSamplePassState.context=e,this._fbo},o$i.prototype.getColorFramebuffer=function(){return this._fbo},o$i.prototype.isDestroyed=function(){return!1},o$i.prototype.destroy=function(){return this._fbo=this._fbo&&this._fbo.destroy(),this._blendCommand=this._blendCommand&&this._blendCommand.shaderProgram&&this._blendCommand.shaderProgram.destroy(),this._fullScreenCommand=this._fullScreenCommand&&this._fullScreenCommand.shaderProgram&&this._fullScreenCommand.shaderProgram.destroy(),t$$(this.bloomEffect)&&(this.bloomEffect.destroy(),this.bloomEffect=null),t$$(this.colorCorrection)&&(this.colorCorrection.destroy(),this.colorCorrection=null),t$$(this.SSAOEffect)&&(this.SSAOEffect.destroy(),this.SSAOEffect=null),t$$(this.DepthOfFieldEffect)&&(this.DepthOfFieldEffect.destroy(),this.DepthOfFieldEffect=null),t$$(this.ScanEffect)&&(this.ScanEffect.destroy(),this.ScanEffect=null),t$$(this.temporalAA)&&(this.temporalAA.destroy(),this.temporalAA=null),s$1e(this)},o$i.prototype.scanShowChange=function(e){this.changeProgramDefine(e,h$g.SCAN)},o$i.prototype.bloomShowChange=function(e){this.changeProgramDefine(e,h$g.BLOOM)},o$i.prototype.colorCorrectionShowChange=function(e){this.changeProgramDefine(e,h$g.COLOR_CORRECTION)},o$i.prototype.ssaoShowChange=function(e){this.changeProgramDefine(e,h$g.SSAO)},o$i.prototype.toneMappingEnabledChange=function(e){this.changeProgramDefine(e,h$g.TONEMAPPING)},o$i.prototype.changeProgramDefine=function(e,t){var i=this._blendCommand;if(t$$(i)){var n=i.shaderProgram.fragmentShaderSource,r=i.shaderProgram.vertexShaderSource;e?z$g(n,t):j$b(n,t),i.shaderProgram.destroy(),i.shaderProgram=p$15.fromCache({context:this.context,vertexShaderSource:r,fragmentShaderSource:n})}},i$g._sampleTerrainMostDetailed=g$C;var e$h={DESIGN:0,NORMAL:1},re$a=Object.freeze(e$h),B$b=/{[^}]+}/g,N$g={x:Q$b,y:ee$7,z:ie$7,s:ne$4,reverseX:$$a,reverseY:te$8,reverseZ:re$9,westDegrees:oe$6,southDegrees:se$5,eastDegrees:ae$7,northDegrees:ue$5,westProjected:ce$4,southProjected:he$5,eastProjected:le$9,northProjected:de$6,width:me$7,height:fe$5},J$b=s$1n(N$g,{i:ge$5,j:pe$6,reverseI:ve$5,reverseJ:_e$5,longitudeDegrees:be$5,latitudeDegrees:we$4,longitudeProjected:Se$5,latitudeProjected:Pe$6,format:xe$8});function v$d(e){if(!t$$(e))throw new t$_("options is required.");if(!c$18.isPromise(e)&&!t$$(e.url))throw new t$_("options is required.");this._errorEvent=new o$15,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._minimumLevel=void 0,this._tilingScheme=void 0,this._rectangle=void 0,this._tileDiscardPolicy=void 0,this._credit=void 0,this._hasAlphaChannel=void 0,this._readyPromise=void 0,this._tags=void 0,this._pickFeaturesTags=void 0,this.enablePickFeatures=!0,this.reinitialize(e)}function V$d(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;e$1B(t,o)?e$1B(e,o)&&(a|=1):(a|=2,e$1B(e,o)||(a|=1)),n+=a}return n}Object.defineProperties(v$d.prototype,{url:{get:function(){return this._resource.url}},urlSchemeZeroPadding:{get:function(){return this._urlSchemeZeroPadding}},pickFeaturesUrl:{get:function(){return this._pickFeaturesResource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){if(!this.ready)throw new t$_("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this.ready)throw new t$_("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this.ready)throw new t$_("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this.ready)throw new t$_("minimumLevel must not be called before the imagery provider is ready.");return this._minimumLevel}},tilingScheme:{get:function(){if(!this.ready)throw new t$_("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this.ready)throw new t$_("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},tileDiscardPolicy:{get:function(){if(!this.ready)throw new t$_("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return t$$(this._resource)}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){if(!this.ready)throw new t$_("credit must not be called before the imagery provider is ready.");return this._credit}},hasAlphaChannel:{get:function(){if(!this.ready)throw new t$_("hasAlphaChannel must not be called before the imagery provider is ready.");return this._hasAlphaChannel}}}),v$d.prototype.reinitialize=function(e){var t=this;t._readyPromise=c$18(e).then((function(i){if(!t$$(i))throw new t$_("options is required.");if(!t$$(i.url))throw new t$_("options.url is required.");t._baseUrl=e.baseUrl;var n=i.customTags,r=s$1n(N$g,n),o=s$1n(J$b,n),a=t$X.createIfNeeded(i.url),s=t$X.createIfNeeded(i.pickFeaturesUrl);t.enablePickFeatures=e$1Y(i.enablePickFeatures,t.enablePickFeatures),t._urlSchemeZeroPadding=e$1Y(i.urlSchemeZeroPadding,t.urlSchemeZeroPadding),t._tileDiscardPolicy=i.tileDiscardPolicy,t._getFeatureInfoFormats=i.getFeatureInfoFormats,t._subdomains=i.subdomains,Array.isArray(t._subdomains)?t._subdomains=t._subdomains.slice():t$$(t._subdomains)&&t._subdomains.length>0?t._subdomains=t._subdomains.split(""):t._subdomains=["a","b","c"],t._tileWidth=e$1Y(i.tileWidth,256),t._tileHeight=e$1Y(i.tileHeight,256),t._minimumLevel=e$1Y(i.minimumLevel,0),t._maximumLevel=i.maximumLevel,t._tilingScheme=e$1Y(i.tilingScheme,new o$Z({ellipsoid:i.ellipsoid})),t._rectangle=e$1Y(i.rectangle,t._tilingScheme.rectangle),t._rectangle=s$1p.intersection(t._rectangle,t._tilingScheme.rectangle),t._hasAlphaChannel=e$1Y(i.hasAlphaChannel,!0);var l=i.credit;"string"==typeof l&&(l=new i$17(l)),t._credit=l,t._resource=a,t._tags=r,t._pickFeaturesResource=s,t._pickFeaturesTags=o;var u=i.url;return t.tablename=i.url,new d$_({name:u}).then((function(e){e.checkObjectStoreExit(t.tablename)?t._indexedDBScheduler=e:e.createObjectStore(t.tablename).then((function(){t._indexedDBScheduler=e}))})),t._indexedDBSetting={isOpen:!1,clear:function(){t._indexedDBScheduler.clear(t.tablename)},cache:[]},!0}))},v$d.prototype.getTileCredits=function(e,t,i){if(!this.ready)throw new t$_("getTileCredits must not be called before the imagery provider is ready.")},v$d.prototype.requestImage=function(e,t,i,n){if(!this.ready)throw new t$_("requestImage must not be called before the imagery provider is ready.");var r=M$m(this,e,t,i,n);if(t$$(a$R.CREDENTIAL)&&(t$$(a$R.CREDENTIAL._keymap[this._baseUrl])?r.url=a$R.addTokenWithKey(this._baseUrl,r.url):r.url=a$R.addToken(r.url)),t$$(this._customRequestHeaders)&&(r.headers=s$1n(r.headers,this._customRequestHeaders)),n.quadKey=V$d(e,t,i),!0===this._indexedDBSetting.isOpen&&!0===n.cacheEnable){if(t$$(this._indexedDBScheduler)){var o=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey);return t$$(o)?c$18(o,(function(e){return t$$(e)?e:"cacheError"}),(function(e){return"cacheError"})):o$n.loadImage(this,r)}return o$n.loadImage(this,r)}return o$n.loadImage(this,r)},v$d.prototype.pickFeatures=function(e,t,i,n,r){if(!this.ready)throw new t$_("pickFeatures must not be called before the imagery provider is ready.");if(this.enablePickFeatures&&t$$(this._pickFeaturesResource)&&0!==this._getFeatureInfoFormats.length){var o=0,a=this;return function l(){if(o>=a._getFeatureInfoFormats.length)return c$18([]);var u=a._getFeatureInfoFormats[o],c=G$g(a,e,t,i,n,r,u.format);return++o,"json"===u.type?c.fetchJson().then(u.callback).otherwise(l):"xml"===u.type?c.fetchXML().then(u.callback).otherwise(l):"text"===u.type||"html"===u.type?c.fetchText().then(u.callback).otherwise(l):c.fetch({responseType:u.format}).then(s.bind(void 0,u)).otherwise(l)}()}function s(e,t){return e.callback(t)}};var F$f=!1,m$j=new s$1p,k$f=!1,w$o=new s$1p;function M$m(e,t,i,n,r){F$f=!1,k$f=!1;var o=e._resource,a=o.getUrlComponent(!0),s=e._tags,l={},u=a.match(B$b);return t$$(u)&&u.forEach((function(r){var o=r.substring(1,r.length-1);t$$(s[o])&&(l[o]=s[o](e,t,i,n))})),o.getDerivedResource({request:r,templateValues:l})}var A$k=!1,_$i=new r$T,C$e=!1;function G$g(e,t,i,n,r,o,a){F$f=!1,k$f=!1,A$k=!1,C$e=!1;var s=e._pickFeaturesResource,l=s.getUrlComponent(!0),u=e._pickFeaturesTags,c={},h=l.match(B$b);return t$$(h)&&h.forEach((function(s){var l=s.substring(1,s.length-1);t$$(u[l])&&(c[l]=u[l](e,t,i,n,r,o,a))})),s.getDerivedResource({templateValues:c})}function y$g(e,t,i){if(e&&e.urlSchemeZeroPadding&&e.urlSchemeZeroPadding.hasOwnProperty(t)){var n=e.urlSchemeZeroPadding[t];if("string"==typeof n){var r=n.length;r>1&&(i=i.length>=r?i:new Array(r-i.toString().length+1).join("0")+i)}}return i}function Q$b(e,t,i,n){return y$g(e,"{x}",t)}function $$a(e,t,i,n){var r=e.tilingScheme.getNumberOfXTilesAtLevel(n)-t-1;return y$g(e,"{reverseX}",r)}function ee$7(e,t,i,n){return y$g(e,"{y}",i)}function te$8(e,t,i,n){var r=e.tilingScheme.getNumberOfYTilesAtLevel(n)-i-1;return y$g(e,"{reverseY}",r)}function re$9(e,t,i,n){var r=e.maximumLevel;return y$g(e,"{reverseZ}",t$$(r)&&n<r?r-n-1:n)}function ie$7(e,t,i,n){return y$g(e,"{z}",n)}function ne$4(e,t,i,n){var r=(t+i+n)%e._subdomains.length;return e._subdomains[r]}function L$j(e,t,i,n){F$f||(e.tilingScheme.tileXYToRectangle(t,i,n,m$j),m$j.west=n$1d.toDegrees(m$j.west),m$j.south=n$1d.toDegrees(m$j.south),m$j.east=n$1d.toDegrees(m$j.east),m$j.north=n$1d.toDegrees(m$j.north),F$f=!0)}function oe$6(e,t,i,n){return L$j(e,t,i,n),m$j.west}function se$5(e,t,i,n){return L$j(e,t,i,n),m$j.south}function ae$7(e,t,i,n){return L$j(e,t,i,n),m$j.east}function ue$5(e,t,i,n){return L$j(e,t,i,n),m$j.north}function T$k(e,t,i,n){k$f||(e.tilingScheme.tileXYToNativeRectangle(t,i,n,w$o),k$f=!0)}function ce$4(e,t,i,n){return T$k(e,t,i,n),w$o.west}function he$5(e,t,i,n){return T$k(e,t,i,n),w$o.south}function le$9(e,t,i,n){return T$k(e,t,i,n),w$o.east}function de$6(e,t,i,n){return T$k(e,t,i,n),w$o.north}function me$7(e,t,i,n){return e.tileWidth}function fe$5(e,t,i,n){return e.tileHeight}function ge$5(e,t,i,n,r,o,a){return I$i(e,t,i,n,r,o),_$i.x}function pe$6(e,t,i,n,r,o,a){return I$i(e,t,i,n,r,o),_$i.y}function ve$5(e,t,i,n,r,o,a){return I$i(e,t,i,n,r,o),e.tileWidth-_$i.x-1}function _e$5(e,t,i,n,r,o,a){return I$i(e,t,i,n,r,o),e.tileHeight-_$i.y-1}var ye$7=new s$1p,b$n=new a$11;function I$i(e,t,i,n,r,o,a){if(!A$k){q$h(e,t,i,n,r,o);var s=b$n,l=e.tilingScheme.tileXYToNativeRectangle(t,i,n,ye$7);_$i.x=e.tileWidth*(s.x-l.west)/l.width|0,_$i.y=e.tileHeight*(l.north-s.y)/l.height|0,A$k=!0}}function be$5(e,t,i,n,r,o,a){return n$1d.toDegrees(r)}function we$4(e,t,i,n,r,o,a){return n$1d.toDegrees(o)}function Se$5(e,t,i,n,r,o,a){return q$h(e,t,i,n,r,o),b$n.x}function Pe$6(e,t,i,n,r,o,a){return q$h(e,t,i,n,r,o),b$n.y}var De$7=new i$1g;function q$h(e,t,i,n,r,o,a){if(!C$e){if(e.tilingScheme instanceof o$Z){var s=De$7;s.longitude=r,s.latitude=o,e.tilingScheme.projection.project(s,b$n)}else b$n.x=n$1d.toDegrees(r),b$n.y=n$1d.toDegrees(o);C$e=!0}}function xe$8(e,t,i,n,r,o,a){return a}var L$i=new i$17("MapQuest, Open Street Map and contributors, CC-BY-SA");function T$j(e){e=e$1Y(e,{});var t=e$1Y(e.url,"https://a.tile.openstreetmap.org/");t=e$1Z(t),t+="{z}/{x}/{y}."+e$1Y(e.fileExtension,"png");var i=t$X.createIfNeeded(t),n=new o$Z({ellipsoid:e.ellipsoid}),r=e$1Y(e.minimumLevel,0),o=e.maximumLevel,a=e$1Y(e.rectangle,n.rectangle),s=n.positionToTileXY(s$1p.southwest(a),r),l=n.positionToTileXY(s$1p.northeast(a),r),u=(Math.abs(l.x-s.x)+1)*(Math.abs(l.y-s.y)+1);if(u>4)throw new t$_("The rectangle and minimumLevel indicate that there are "+u+" tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.");var c=e$1Y(e.credit,L$i);return"string"==typeof c&&(c=new i$17(c)),new v$d({url:i,credit:c,tilingScheme:n,tileWidth:256,tileHeight:256,minimumLevel:r,maximumLevel:o,rectangle:a})}function w$n(e){var t=[],i=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).geometry;if(!t$$(i))throw new t$_("options.geometry is required.");(!t$$(i.attributes)||!t$$(i.primitiveType))&&(i=i.constructor.createGeometry(i));var n=i.attributes,r=c$1a.clone(e$1Y(e.modelMatrix,c$1a.IDENTITY)),o=e$1Y(e.length,1e4);if(t$$(n.normal)&&t.push(new m$P({geometry:F$W.createLineSegmentsForVectors(i,"normal",o),attributes:{color:new r$I(1,0,0,1)},modelMatrix:r})),t$$(n.tangent)&&t.push(new m$P({geometry:F$W.createLineSegmentsForVectors(i,"tangent",o),attributes:{color:new r$I(0,1,0,1)},modelMatrix:r})),t$$(n.bitangent)&&t.push(new m$P({geometry:F$W.createLineSegmentsForVectors(i,"bitangent",o),attributes:{color:new r$I(0,0,1,1)},modelMatrix:r})),t.length>0)return new y$H({asynchronous:!1,geometryInstances:t,appearance:new r$u({flat:!0,translucent:!1})})}function re$8(e){if(!t$$((e=e$1Y(e,{})).url))throw new t$_("options.url is required.");var t,i,n,r=c$18.defer(),o=new v$d(r.promise);function a(a){for(var s,u,c,h=/tileformat/i,d=/tileset/i,f=/tilesets/i,p=/boundingbox/i,_=[],m=a.childNodes[0].childNodes,$=0;$<m.length;$++)if(h.test(m.item($).nodeName))s=m.item($);else if(f.test(m.item($).nodeName)){c=m.item($);for(var g=m.item($).childNodes,y=0;y<g.length;y++)d.test(g.item(y).nodeName)&&_.push(g.item(y))}else p.test(m.item($).nodeName)&&(u=m.item($));var v;if(!t$$(c)||!t$$(u))return v="Unable to find expected tilesets or bbox attributes in "+n.url+".",void((t=c$_.handleError(t,o,o.errorEvent,v,void 0,void 0,void 0,l)).retry||r.reject(new t$Z(v)));var x=e$1Y(e.fileExtension,s.getAttribute("extension")),b=e$1Y(e.tileWidth,parseInt(s.getAttribute("width"),10)),S=e$1Y(e.tileHeight,parseInt(s.getAttribute("height"),10)),w=e$1Y(e.minimumLevel,parseInt(_[0].getAttribute("order"),10)),C=e$1Y(e.maximumLevel,parseInt(_[_.length-1].getAttribute("order"),10)),T=c.getAttribute("profile"),P=e.tilingScheme;if(!t$$(P))if("geodetic"===T||"global-geodetic"===T)P=new a$W({ellipsoid:e.ellipsoid});else{if("mercator"!==T&&"global-mercator"!==T)return v=n.url+"specifies an unsupported profile attribute, "+T+".",void((t=c$_.handleError(t,o,o.errorEvent,v,void 0,void 0,void 0,l)).retry||r.reject(new t$Z(v)));P=new o$Z({ellipsoid:e.ellipsoid})}var E=s$1p.clone(e.rectangle);if(!t$$(E)){var A,L,M,I;e$1Y(e.flipXY,!1)?(M=new r$T(parseFloat(u.getAttribute("miny")),parseFloat(u.getAttribute("minx"))),I=new r$T(parseFloat(u.getAttribute("maxy")),parseFloat(u.getAttribute("maxx")))):(M=new r$T(parseFloat(u.getAttribute("minx")),parseFloat(u.getAttribute("miny"))),I=new r$T(parseFloat(u.getAttribute("maxx")),parseFloat(u.getAttribute("maxy"))));var O="geodetic"===T||"mercator"===T;if(P.projection instanceof s$1q||O)A=i$1g.fromDegrees(M.x,M.y),L=i$1g.fromDegrees(I.x,I.y);else{var D=P.projection;A=D.unproject(M),L=D.unproject(I)}E=new s$1p(A.longitude,A.latitude,L.longitude,L.latitude)}E.west<P.rectangle.west&&(E.west=P.rectangle.west),E.east>P.rectangle.east&&(E.east=P.rectangle.east),E.south<P.rectangle.south&&(E.south=P.rectangle.south),E.north>P.rectangle.north&&(E.north=P.rectangle.north);var R=P.positionToTileXY(s$1p.southwest(E),w),N=P.positionToTileXY(s$1p.northeast(E),w);(Math.abs(N.x-R.x)+1)*(Math.abs(N.y-R.y)+1)>4&&(w=0);var F=i.getDerivedResource({url:"{z}/{x}/{reverseY}."+x});r.resolve({url:F,tilingScheme:P,rectangle:E,tileWidth:b,tileHeight:S,minimumLevel:w,maximumLevel:C,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit})}function s(t){var n=e$1Y(e.fileExtension,"png"),o=e$1Y(e.tileWidth,256),a=e$1Y(e.tileHeight,256),s=e$1Y(e.minimumLevel,0),l=e.maximumLevel,u=t$$(e.tilingScheme)?e.tilingScheme:new o$Z({ellipsoid:e.ellipsoid}),c=e$1Y(e.rectangle,u.rectangle),h=i.getDerivedResource({url:"{z}/{x}/{reverseY}."+n});r.resolve({url:h,tilingScheme:u,rectangle:c,tileWidth:o,tileHeight:a,minimumLevel:s,maximumLevel:l,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit})}function l(){n.fetchXML().then(a).otherwise(s)}return c$18(e.url).then((function(e){(i=t$X.createIfNeeded(e)).appendForwardSlash(),n=i.getDerivedResource({url:"tilemapresource.xml"}),l()})).otherwise((function(e){r.reject(e)})),o}function g$a(e){if(!t$$((e=e$1Y(e,e$1Y.EMPTY_OBJECT)).url))throw new t$_("options.url is required.");var t=c$18.defer();v$d.call(this,t.promise),this._tmsResource=void 0,this._xmlResource=void 0,this._options=e,this._deferred=t,this._metadataError=void 0,this._metadataSuccess=this._metadataSuccess.bind(this),this._metadataFailure=this._metadataFailure.bind(this),this._requestMetadata=this._requestMetadata.bind(this);var i,n=this;c$18(e.url).then((function(e){(i=t$X.createIfNeeded(e)).appendForwardSlash(),n._tmsResource=i,n._xmlResource=i.getDerivedResource({url:"tilemapresource.xml"}),n._requestMetadata()})).otherwise((function(e){t.reject(e)}))}function o$h(e){if(!t$$((e=e$1Y(e,{})).url))throw new t$_("options.url is required.");if(!t$$(e.channel))throw new t$_("options.channel is required.");var t=e.url,i=e$1Y(e.path,"/default_map"),n=t$X.createIfNeeded(t).getDerivedResource({url:"/"===i[0]?i.substring(1):i});n.appendForwardSlash(),this._resource=n,this._url=t,this._path=i,this._tileDiscardPolicy=e.tileDiscardPolicy,this._channel=e.channel,this._requestType="ImageryMaps",this._credit=new i$17('<a href="http://www.google.com/enterprise/mapsearth/products/earthenterprise.html"><img src="'+o$h.logoUrl+'" title="Google Imagery"/></a>'),this.defaultGamma=1.9,this._tilingScheme=void 0,this._version=void 0,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=e.maximumLevel,this._errorEvent=new o$15,this._ready=!1,this._readyPromise=c$18.defer();var r,o=n.getDerivedResource({url:"query",queryParameters:{request:"Json",vars:"geeServerDefs",is2d:"t"}}),a=this;function s(t){var i,n;try{i=JSON.parse(t)}catch{i=JSON.parse(t.replace(/([\[\{,])[\n\r ]*([A-Za-z0-9]+)[\n\r ]*:/g,'$1"$2":'))}for(var o,s=0;s<i.layers.length;s++)if(i.layers[s].id===a._channel){o=i.layers[s];break}if(!t$$(o))throw n="Could not find layer with channel (id) of "+a._channel+".",r=c$_.handleError(r,a,a._errorEvent,n,void 0,void 0,void 0,u),new t$Z(n);if(!t$$(o.version))throw n="Could not find a version in channel (id) "+a._channel+".",r=c$_.handleError(r,a,a._errorEvent,n,void 0,void 0,void 0,u),new t$Z(n);if(a._version=o.version,t$$(i.projection)&&"flat"===i.projection)a._tilingScheme=new a$W({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new s$1p(-Math.PI,-Math.PI,Math.PI,Math.PI),ellipsoid:e.ellipsoid});else{if(t$$(i.projection)&&"mercator"!==i.projection)throw n="Unsupported projection "+i.projection+".",r=c$_.handleError(r,a,a._errorEvent,n,void 0,void 0,void 0,u),new t$Z(n);a._tilingScheme=new o$Z({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:e.ellipsoid})}a._ready=!0,a._readyPromise.resolve(!0),c$_.handleSuccess(r)}function l(e){var t="An error occurred while accessing "+o.url+".";r=c$_.handleError(r,a,a._errorEvent,t,void 0,void 0,void 0,u),a._readyPromise.reject(new t$Z(t))}function u(){c$18(o.fetchText(),s,l)}u()}t$$(Object.create)&&(g$a.prototype=Object.create(v$d.prototype),g$a.prototype.constructor=g$a),g$a.prototype._requestMetadata=function(){this._xmlResource.fetchXML().then(this._metadataSuccess).otherwise(this._metadataFailure)},g$a.prototype._metadataSuccess=function(e){for(var t,i,n,r=/tileformat/i,o=/tileset/i,a=/tilesets/i,s=/boundingbox/i,l=[],u=this._xmlResource,c=this._metadataError,h=this._deferred,d=this._requestMetadata,f=e.childNodes[0].childNodes,p=0;p<f.length;p++)if(r.test(f.item(p).nodeName))t=f.item(p);else if(a.test(f.item(p).nodeName)){n=f.item(p);for(var _=f.item(p).childNodes,m=0;m<_.length;m++)o.test(_.item(m).nodeName)&&l.push(_.item(m))}else s.test(f.item(p).nodeName)&&(i=f.item(p));var $;if(!t$$(n)||!t$$(i))return $="Unable to find expected tilesets or bbox attributes in "+u.url+".",(c=c$_.handleError(c,this,this.errorEvent,$,void 0,void 0,void 0,d)).retry||h.reject(new t$Z($)),void(this._metadataError=c);var g=this._options,y=e$1Y(g.fileExtension,t.getAttribute("extension")),v=e$1Y(g.tileWidth,parseInt(t.getAttribute("width"),10)),x=e$1Y(g.tileHeight,parseInt(t.getAttribute("height"),10)),b=e$1Y(g.minimumLevel,parseInt(l[0].getAttribute("order"),10)),S=e$1Y(g.maximumLevel,parseInt(l[l.length-1].getAttribute("order"),10)),w=n.getAttribute("profile"),C=g.tilingScheme;if(!t$$(C))if("geodetic"===w||"global-geodetic"===w)C=new a$W({ellipsoid:g.ellipsoid});else{if("mercator"!==w&&"global-mercator"!==w)return $=u.url+"specifies an unsupported profile attribute, "+w+".",(c=c$_.handleError(c,this,this.errorEvent,$,void 0,void 0,void 0,d)).retry||h.reject(new t$Z($)),void(this._metadataError=c);C=new o$Z({ellipsoid:g.ellipsoid})}var T=s$1p.clone(g.rectangle);if(!t$$(T)){var P,E,A,L;e$1Y(g.flipXY,!1)?(A=new r$T(parseFloat(i.getAttribute("miny")),parseFloat(i.getAttribute("minx"))),L=new r$T(parseFloat(i.getAttribute("maxy")),parseFloat(i.getAttribute("maxx")))):(A=new r$T(parseFloat(i.getAttribute("minx")),parseFloat(i.getAttribute("miny"))),L=new r$T(parseFloat(i.getAttribute("maxx")),parseFloat(i.getAttribute("maxy"))));var M="geodetic"===w||"mercator"===w;if(C.projection instanceof s$1q||M)P=i$1g.fromDegrees(A.x,A.y),E=i$1g.fromDegrees(L.x,L.y);else{var I=C.projection;P=I.unproject(A),E=I.unproject(L)}T=new s$1p(P.longitude,P.latitude,E.longitude,E.latitude)}T.west<C.rectangle.west&&(T.west=C.rectangle.west),T.east>C.rectangle.east&&(T.east=C.rectangle.east),T.south<C.rectangle.south&&(T.south=C.rectangle.south),T.north>C.rectangle.north&&(T.north=C.rectangle.north);var O=C.positionToTileXY(s$1p.southwest(T),b),D=C.positionToTileXY(s$1p.northeast(T),b);(Math.abs(D.x-O.x)+1)*(Math.abs(D.y-O.y)+1)>4&&(b=0);var R=this._tmsResource.getDerivedResource({url:"{z}/{x}/{reverseY}."+y});h.resolve({url:R,tilingScheme:C,rectangle:T,tileWidth:v,tileHeight:x,minimumLevel:b,maximumLevel:S,tileDiscardPolicy:g.tileDiscardPolicy,credit:g.credit})},g$a.prototype._metadataFailure=function(e){var t=this._options,i=e$1Y(t.fileExtension,"png"),n=e$1Y(t.tileWidth,256),r=e$1Y(t.tileHeight,256),o=e$1Y(t.minimumLevel,0),a=t.maximumLevel,s=t$$(t.tilingScheme)?t.tilingScheme:new o$Z({ellipsoid:t.ellipsoid}),l=e$1Y(t.rectangle,s.rectangle),u=this._tmsResource.getDerivedResource({url:"{z}/{x}/{reverseY}."+i});this._deferred.resolve({url:u,tilingScheme:s,rectangle:l,tileWidth:n,tileHeight:r,minimumLevel:o,maximumLevel:a,tileDiscardPolicy:t.tileDiscardPolicy,credit:t.credit})},Object.defineProperties(o$h.prototype,{url:{get:function(){return this._url}},path:{get:function(){return this._path}},proxy:{get:function(){return this._resource.proxy}},channel:{get:function(){return this._channel}},tileWidth:{get:function(){if(!this._ready)throw new t$_("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$_("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$_("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$_("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new t$_("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},version:{get:function(){if(!this._ready)throw new t$_("version must not be called before the imagery provider is ready.");return this._version}},requestType:{get:function(){if(!this._ready)throw new t$_("requestType must not be called before the imagery provider is ready.");return this._requestType}},rectangle:{get:function(){if(!this._ready)throw new t$_("rectangle must not be called before the imagery provider is ready.");return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$_("tileDiscardPolicy must not be called before the imagery provider is ready.");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}},hasAlphaChannel:{get:function(){return!0}}}),o$h.prototype.getTileCredits=function(e,t,i){},o$h.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$_("requestImage must not be called before the imagery provider is ready.");var r=this._resource.getDerivedResource({url:"query",request:n,queryParameters:{request:this._requestType,channel:this._channel,version:this._version,x:e,y:t,z:i+1}});return o$n.loadImage(this,r)},o$h.prototype.pickFeatures=function(e,t,i,n,r){},o$h._logoUrl=void 0,Object.defineProperties(o$h,{logoUrl:{get:function(){return t$$(o$h._logoUrl)||(o$h._logoUrl=o$12("Assets/Images/google_earth_credit.png")),o$h._logoUrl},set:function(e){n$1e.defined("value",e),o$h._logoUrl=e}}});var f$n=/\/$/,p$j=new i$17('© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function a$f(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).mapId;if(!t$$(t))throw new t$_("options.mapId is required.");var i=t$X.createIfNeeded(e$1Y(e.url,"https://{s}.tiles.mapbox.com/v4/")),n=e$1c.getAccessToken(e.accessToken);this._mapId=t,this._accessToken=n,this._accessTokenErrorCredit=i$17.clone(e$1c.getErrorCredit(e.accessToken));var r=e$1Y(e.format,"png");/\./.test(r)||(r="."+r),this._format=r;var o,a=i.getUrlComponent();f$n.test(a)||(a+="/"),a+=t+"/{z}/{x}/{y}"+this._format,i.url=a,i.setQueryParameters({access_token:n}),t$$(e.credit)?"string"==typeof(o=e.credit)&&(o=new i$17(o)):o=p$j,this._resource=i,this._imageryProvider=new v$d({url:i,credit:o,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}function h$f(e){if(!t$$((e=e$1Y(e,{})).url))throw new t$_("options.url is required.");var t=t$X.createIfNeeded(e.url),i=new a$W({rectangle:e$1Y(e.rectangle,s$1p.MAX_VALUE),numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});this._tilingScheme=i,this._resource=t,this._image=void 0,this._texture=void 0,this._tileWidth=0,this._tileHeight=0,this._errorEvent=new o$15,this._ready=!1,this._readyPromise=c$18.defer();var n=e.credit;"string"==typeof n&&(n=new i$17(n)),this._credit=n;var r,o=this;function a(e){o._image=e,o._tileWidth=e.width,o._tileHeight=e.height,o._ready=!0,o._readyPromise.resolve(!0),c$_.handleSuccess(o._errorEvent)}function s(e){var i="Failed to load image "+t.url+".";r=c$_.handleError(r,o,o._errorEvent,i,0,0,0,l,e),o._readyPromise.reject(new t$Z(i))}function l(){c$18(t.fetchImage(),a,s)}l()}function F$e(e,t,i){if(!t$$(e))throw new t$_("type is required.");if(this.type=e,!t$$(t))if("json"===e)t="application/json";else if("xml"===e)t="text/xml";else if("html"===e)t="text/html";else{if("text"!==e)throw new t$_('format is required when type is not "json", "xml", "html", or "text".');t="text/plain"}if(this.format=t,!t$$(i))if("json"===e)i=b$m;else if("xml"===e)i=P$c;else if("html"===e)i=S$f;else{if("text"!==e)throw new t$_('callback is required when type is not "json", "xml", "html", or "text".');i=S$f}this.callback=i}function b$m(e){for(var t=[],i=e.features,n=0;n<i.length;++n){var r=i[n],o=new s$i;if(o.data=r,o.properties=r.properties,o.configureNameFromProperties(r.properties),o.configureDescriptionFromProperties(r.properties),t$$(r.geometry)&&"Point"===r.geometry.type){var a=r.geometry.coordinates[0],s=r.geometry.coordinates[1];o.position=i$1g.fromDegrees(a,s)}t.push(o)}return t}Object.defineProperties(a$f.prototype,{url:{get:function(){return this._imageryProvider.url}},ready:{get:function(){return this._imageryProvider.ready}},readyPromise:{get:function(){return this._imageryProvider.readyPromise}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}}),a$f.prototype.getTileCredits=function(e,t,i){if(t$$(this._accessTokenErrorCredit))return[this._accessTokenErrorCredit]},a$f.prototype.requestImage=function(e,t,i,n){return this._imageryProvider.requestImage(e,t,i,n)},a$f.prototype.pickFeatures=function(e,t,i,n,r){return this._imageryProvider.pickFeatures(e,t,i,n,r)},a$f._defaultCredit=p$j,Object.defineProperties(h$f.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){if(!this._ready)throw new t$_("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$_("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$_("maximumLevel must not be called before the imagery provider is ready.");return 0}},minimumLevel:{get:function(){if(!this._ready)throw new t$_("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new t$_("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$_("tileDiscardPolicy must not be called before the imagery provider is ready.")}},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}},hasAlphaChannel:{get:function(){return!0}}}),h$f.prototype.getTileCredits=function(e,t,i){},h$f.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$_("requestImage must not be called before the imagery provider is ready.");return this._image},h$f.prototype.pickFeatures=function(e,t,i,n,r){};var w$m="http://www.mapinfo.com/mxp",L$h="http://www.esri.com/wms",M$l="http://www.opengis.net/wfs",D$g="http://www.opengis.net/gml";function P$c(e){var t=e.documentElement;if("MultiFeatureCollection"===t.localName&&t.namespaceURI===w$m)return C$d(e);if("FeatureInfoResponse"===t.localName&&t.namespaceURI===L$h)return R$c(e);if("FeatureCollection"===t.localName&&t.namespaceURI===M$l)return B$a(e);if("ServiceExceptionReport"===t.localName)throw new t$Z((new XMLSerializer).serializeToString(t));return"msGMLOutput"===t.localName?I$h(e):j$a(e)}function C$d(e){for(var t=[],i=e.documentElement.getElementsByTagNameNS(w$m,"Feature"),n=0;n<i.length;++n){for(var r=i[n],o={},a=r.getElementsByTagNameNS(w$m,"Val"),s=0;s<a.length;++s){var l=a[s];if(l.hasAttribute("ref")){var u=l.getAttribute("ref"),c=l.textContent.trim();o[u]=c}}var h=new s$i;h.data=r,h.properties=o,h.configureNameFromProperties(o),h.configureDescriptionFromProperties(o),t.push(h)}return t}function R$c(e){var t,i=e.documentElement,n=[],r=i.getElementsByTagNameNS("*","FIELDS");if(r.length>0)for(var o=0;o<r.length;++o){var a=r[o];t={};for(var s=a.attributes,l=0;l<s.length;++l){var u=s[l];t[u.name]=u.value}n.push(d$g(a,t))}else for(var c=i.getElementsByTagNameNS("*","FeatureInfo"),h=0;h<c.length;++h){var d=c[h];t={};for(var f=d.childNodes,p=0;p<f.length;++p){var _=f[p];_.nodeType===Node.ELEMENT_NODE&&(t[_.localName]=_.textContent)}n.push(d$g(d,t))}return n}function B$a(e){for(var t=[],i=e.documentElement.getElementsByTagNameNS(D$g,"featureMember"),n=0;n<i.length;++n){var r=i[n],o={};E$j(r,o),t.push(d$g(r,o))}return t}function I$h(e){for(var t,i=[],n=e.documentElement.childNodes,r=0;r<n.length;r++)if(n[r].nodeType===Node.ELEMENT_NODE){t=n[r];break}if(!t$$(t))throw new t$Z("Unable to find first child of the feature info xml document");for(var o=t.childNodes,a=0;a<o.length;++a){var s=o[a];if(s.nodeType===Node.ELEMENT_NODE){var l={};E$j(s,l),i.push(d$g(s,l))}}return i}function E$j(e,t){for(var i=!0,n=0;n<e.childNodes.length;++n){var r=e.childNodes[n];r.nodeType===Node.ELEMENT_NODE&&(i=!1),"Point"!==r.localName&&"LineString"!==r.localName&&"Polygon"!==r.localName&&"boundedBy"!==r.localName&&r.hasChildNodes()&&E$j(r,t)&&(t[r.localName]=r.textContent)}return i}function d$g(e,t){var i=new s$i;return i.data=e,i.properties=t,i.configureNameFromProperties(t),i.configureDescriptionFromProperties(t),i}function j$a(e){var t=(new XMLSerializer).serializeToString(e),i=document.createElement("div"),n=document.createElement("pre");n.textContent=t,i.appendChild(n);var r=new s$i;return r.data=e,r.description=i.innerHTML,[r]}var O$d=/<body>\s*<\/body>/im,z$f=/<ServiceExceptionReport([\s\S]*)<\/ServiceExceptionReport>/im,U$c=/<title>([\s\S]*)<\/title>/im;function S$f(e){if(!O$d.test(e)&&!z$f.test(e)){var t,i=U$c.exec(e);i&&i.length>1&&(t=i[1]);var n=new s$i;return n.name=t,n.description=e,n.data=e,[n]}}function u$f(e){if(!t$$((e=e$1Y(e,e$1Y.EMPTY_OBJECT)).url))throw new t$_("options.url is required.");if(!t$$(e.layers))throw new t$_("options.layers is required.");if(t$$(e.times)&&!t$$(e.clock))throw new t$_("options.times was specified, so options.clock is required.");this._baseUrl=e.url;var t=t$X.createIfNeeded(e.url),i=t.clone();t.setQueryParameters(u$f.DefaultParameters,!0),i.setQueryParameters(u$f.GetFeatureInfoDefaultParameters,!0),t$$(e.parameters)&&t.setQueryParameters(p$i(e.parameters)),t$$(e.getFeatureInfoParameters)&&i.setQueryParameters(p$i(e.getFeatureInfoParameters));var n=this;n._indexedDBSetting={isOpen:!1,clear:function(){n._indexedDBScheduler.clear(n.tablename)},cache:[]},this._reload=void 0,t$$(e.times)&&(this._timeDynamicImagery=new h$r({clock:e.clock,times:e.times,requestImageFunction:function(e,t,i,r,o){return P$b(n,e,t,i,r,o)},reloadFunction:function(){t$$(n._reload)&&n._reload()}}));var r={};r.layers=e.layers,r.bbox="{westProjected},{southProjected},{eastProjected},{northProjected}",r.width="{width}",r.height="{height}",parseFloat(t.queryParameters.version)>=1.3?r.crs=e$1Y(e.crs,e.tilingScheme&&e.tilingScheme.projection instanceof e$1H?"EPSG:3857":"CRS:84"):r.srs=e$1Y(e.srs,e.tilingScheme&&e.tilingScheme.projection instanceof e$1H?"EPSG:3857":"EPSG:4326"),e.tilingScheme instanceof o$Z&&e.tilingScheme.projection instanceof s$1q&&(r.srs="EPSG:0"),t.setQueryParameters(r,!0),i.setQueryParameters(r,!0);var o={query_layers:e.layers,x:"{i}",y:"{j}",info_format:"{format}"};i.setQueryParameters(o,!0),this._resource=t,this._pickFeaturesResource=i,this._layers=e.layers,this._tileProvider=new v$d({url:t,pickFeaturesUrl:i,tilingScheme:e$1Y(e.tilingScheme,new a$W({ellipsoid:e.ellipsoid})),rectangle:e.rectangle,tileWidth:e.tileWidth,tileHeight:e.tileHeight,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,subdomains:e.subdomains,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit,getFeatureInfoFormats:e$1Y(e.getFeatureInfoFormats,u$f.DefaultGetFeatureInfoFormats),enablePickFeatures:e.enablePickFeatures,baseUrl:this._baseUrl}),this._tileProvider._indexedDBSetting=this._indexedDBSetting,this._customRequestHeaders=e.customRequestHeaders,this._tileProvider._customRequestHeaders=e.customRequestHeaders}function P$b(e,t,i,n,r,o){var a=t$$(o)?o.data:void 0,s=e._tileProvider;return t$$(a)&&s._resource.setQueryParameters(a),s.requestImage(t,i,n,r)}function j$9(e,t,i,n,r,o,a){var s=t$$(a)?a.data:void 0,l=e._tileProvider;return t$$(s)&&l._pickFeaturesResource.setQueryParameters(s),l.pickFeatures(t,i,n,r,o)}function p$i(e){var t={};for(var i in e)e.hasOwnProperty(i)&&(t[i.toLowerCase()]=e[i]);return t}function n$h(e){return function(t){return new e(t)}}Object.defineProperties(u$f.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}},customRequestHeaders:{get:function(){return this._customRequestHeaders},set:function(e){this._customRequestHeaders=e}}}),u$f.prototype.getTileCredits=function(e,t,i){return this._tileProvider.getTileCredits(e,t,i)},u$f.prototype.requestImage=function(e,t,i,n){var r,o,a=this._timeDynamicImagery;return t$$(a)&&(o=a.currentInterval,r=a.getFromCache(e,t,i,n)),t$$(r)||(r=P$b(this,e,t,i,n,o)),t$$(r)&&t$$(a)&&a.checkApproachingInterval(e,t,i,n),r},u$f.prototype.pickFeatures=function(e,t,i,n,r){var o=this._timeDynamicImagery;return j$9(this,e,t,i,n,r,t$$(o)?o.currentInterval:void 0)},u$f.DefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetMap",styles:"",format:"image/jpeg"}),u$f.GetFeatureInfoDefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetFeatureInfo"}),u$f.DefaultGetFeatureInfoFormats=Object.freeze([Object.freeze(new F$e("json","application/json")),Object.freeze(new F$e("xml","text/xml")),Object.freeze(new F$e("text","text/html"))]);var M$k={ARCGIS_MAPSERVER:n$h(b$o),BING:n$h(o$m),GOOGLE_EARTH:n$h(o$h),MAPBOX:n$h(a$f),SINGLE_TILE:n$h(h$f),TMS:n$h(g$a),URL_TEMPLATE:n$h(v$d),WMS:n$h(u$f),WMTS:n$h(g$m)};function a$e(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).assetId;n$1e.typeOf.number("options.assetId",t),this.defaultAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,this._ready=!1,this._tileCredits=void 0,this._errorEvent=new o$15;var i=this,n=r$H._createEndpointResource(t,e),r=e.assetId.toString()+e.accessToken+e.server,o=a$e._endpointCache[r];t$$(o)||(o=n.fetchJson(),a$e._endpointCache[r]=o),this._readyPromise=o.then((function(e){if("IMAGERY"!==e.type)return c$18.reject(new t$Z("Cesium ion asset "+t+" is not an imagery asset."));var r,o=e.externalType;if(t$$(o)){var a=M$k[o];if(!t$$(a))return c$18.reject(new t$Z("Unrecognized Cesium ion imagery type: "+o));r=a(e.options)}else r=new g$a({url:new r$H(e,n)});return i._tileCredits=r$H.getCreditsFromEndpoint(e,n),r.errorEvent.addEventListener((function(e){e.provider=i,i._errorEvent.raiseEvent(e)})),i._imageryProvider=r,r.readyPromise.then((function(){return i._ready=!0,!0}))}))}Object.defineProperties(a$e.prototype,{ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},rectangle:{get:function(){if(!this._ready)throw new t$_("tileHeight must not be called before the imagery provider is ready.");return this._imageryProvider.rectangle}},tileWidth:{get:function(){if(!this._ready)throw new t$_("tileWidth must not be called before the imagery provider is ready.");return this._imageryProvider.tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$_("tileHeight must not be called before the imagery provider is ready.");return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$_("maximumLevel must not be called before the imagery provider is ready.");return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$_("minimumLevel must not be called before the imagery provider is ready.");return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){if(!this._ready)throw new t$_("tilingScheme must not be called before the imagery provider is ready.");return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$_("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){if(!this._ready)throw new t$_("credit must not be called before the imagery provider is ready.");return this._imageryProvider.credit}},hasAlphaChannel:{get:function(){if(!this._ready)throw new t$_("hasAlphaChannel must not be called before the imagery provider is ready.");return this._imageryProvider.hasAlphaChannel}}}),a$e.prototype.getTileCredits=function(e,t,i){if(!this._ready)throw new t$_("getTileCredits must not be called before the imagery provider is ready.");var n=this._imageryProvider.getTileCredits(e,t,i);return t$$(n)?this._tileCredits.concat(n):this._tileCredits},a$e.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$_("requestImage must not be called before the imagery provider is ready.");return this._imageryProvider.requestImage(e,t,i,n)},a$e.prototype.pickFeatures=function(e,t,i,n,r){if(!this._ready)throw new t$_("pickFeatures must not be called before the imagery provider is ready.");return this._imageryProvider.pickFeatures(e,t,i,n,r)},a$e._endpointCache={};var e$g={AERIAL:2,AERIAL_WITH_LABELS:3,ROAD:4},n$g=Object.freeze(e$g);function f$m(e){return e=e$1Y(e,e$1Y.EMPTY_OBJECT),new a$e({assetId:e$1Y(e.style,n$g.AERIAL)})}var L$g=576,D$f=100,x$j="#ffffff",_$h="#48b";function M$j(e,t){for(var i=e.length,n=0;n<i;n++){var r=e[n];if(i$17.equals(r,t))return!0}return!1}function T$i(e){var t=e._previousCesiumCredit,i=e._currentCesiumCredit;i$17.equals(i,t)||(t$$(t)&&e._cesiumCreditContainer.removeChild(t.element),t$$(i)&&e._cesiumCreditContainer.appendChild(i.element),e._previousCesiumCredit=i)}var k$e="cesium-credit-delimiter",f$l;function E$i(e){var t=document.createElement("span");return t.textContent=e,t.className=k$e,t}function N$f(e,t){if(t$$(t)){var i=document.createElement(t);i._creditId=e._creditId,i.appendChild(e),e=i}return e}function I$g(e,t,i,n){for(var r=e.childNodes,o=-1,a=0;a<t.length;++a){var s=t[a];if(t$$(s)){if(o=a,t$$(i)&&(o*=2,a>0)){var l=o-1;if(r.length<=l)e.appendChild(E$i(i));else{var u=r[l];u.className!==k$e&&e.replaceChild(E$i(i),u)}}var c=s.element;if(r.length<=o)e.appendChild(N$f(c,n));else{var h=r[o];h._creditId!==s._id&&e.replaceChild(N$f(c,n),h)}}}for(++o;o<r.length;)e.removeChild(r[o])}function O$c(e){var t=e._lightboxCredits,i=e.viewport.clientWidth,n=e.viewport.clientHeight;i!==e._lastViewportWidth&&(i<L$g?(t.className="cesium-credit-lightbox cesium-credit-lightbox-mobile",t.style.marginTop="0"):(t.className="cesium-credit-lightbox cesium-credit-lightbox-expanded",t.style.marginTop=Math.floor(.5*(n-t.clientHeight))+"px"),e._lastViewportWidth=i),i>=L$g&&n!==e._lastViewportHeight&&(t.style.marginTop=Math.floor(.5*(n-t.clientHeight))+"px",e._lastViewportHeight=n)}function s$g(e,t){var i=e+" {";for(var n in t)t.hasOwnProperty(n)&&(i+=n+": "+t[n]+"; ");return i+=" }\n"}function q$g(){var e="";e+=s$g(".cesium-credit-lightbox-overlay",{display:"none","z-index":"1",position:"absolute",top:"0",left:"0",width:"100%",height:"100%","background-color":"rgba(80, 80, 80, 0.8)"}),e+=s$g(".cesium-credit-lightbox",{"background-color":"#303336",color:x$j,position:"relative","min-height":D$f+"px",margin:"auto"}),e+=s$g(".cesium-credit-lightbox > ul > li a, .cesium-credit-lightbox > ul > li a:visited",{color:x$j}),e+=s$g(".cesium-credit-lightbox > ul > li a:hover",{color:_$h}),e+=s$g(".cesium-credit-lightbox.cesium-credit-lightbox-expanded",{border:"1px solid #444","border-radius":"5px","max-width":"370px"}),e+=s$g(".cesium-credit-lightbox.cesium-credit-lightbox-mobile",{height:"100%",width:"100%"}),e+=s$g(".cesium-credit-lightbox-title",{padding:"20px 20px 0 20px"}),e+=s$g(".cesium-credit-lightbox-close",{"font-size":"18pt",cursor:"pointer",position:"absolute",top:"0",right:"6px",color:x$j}),e+=s$g(".cesium-credit-lightbox-close:hover",{color:_$h}),e+=s$g(".cesium-credit-lightbox > ul",{margin:"0",padding:"12px 20px 12px 40px","font-size":"13px"}),e+=s$g(".cesium-credit-lightbox > ul > li",{"padding-bottom":"6px"}),e+=s$g(".cesium-credit-lightbox > ul > li *",{padding:"0",margin:"0"}),e+=s$g(".cesium-credit-expand-link",{"padding-left":"5px",cursor:"pointer","text-decoration":"underline",color:x$j}),e+=s$g(".cesium-credit-expand-link:hover",{color:_$h}),e+=s$g(".cesium-credit-text",{color:x$j}),e+=s$g(".cesium-credit-textContainer *, .cesium-credit-logoContainer *",{display:"inline"});var t=document.head,i=document.createElement("style");i.innerHTML=e,t.insertBefore(i,t.firstChild)}function r$e(e,t,i){n$1e.defined("container",e);var n=this;i=e$1Y(i,document.body);var r=document.createElement("div");r.className="cesium-credit-lightbox-overlay",i.appendChild(r);var o=document.createElement("div");function a(e){o.contains(e.target)||n.hideLightbox()}o.className="cesium-credit-lightbox",r.appendChild(o),r.addEventListener("click",a,!1);var s=document.createElement("div");s.className="cesium-credit-lightbox-title",s.textContent="Data provided by:",o.appendChild(s);var l=document.createElement("a");l.onclick=this.hideLightbox.bind(this),l.innerHTML="×",l.className="cesium-credit-lightbox-close",o.appendChild(l);var u=document.createElement("ul");o.appendChild(u);var c=document.createElement("div");c.className="cesium-credit-logoContainer",c.style.display="inline",e.appendChild(c);var h=document.createElement("div");h.className="cesium-credit-textContainer",h.style.display="inline",e.appendChild(h);var d=document.createElement("a");d.className="cesium-credit-expand-link",d.onclick=this.showLightbox.bind(this),d.textContent="Data attribution",e.appendChild(d),q$g();var f=i$17.clone(r$e.cesiumCredit);this._delimiter=e$1Y(t," • "),this._screenContainer=h,this._cesiumCreditContainer=c,this._lastViewportHeight=void 0,this._lastViewportWidth=void 0,this._lightboxCredits=o,this._creditList=u,this._lightbox=r,this._hideLightbox=a,this._expandLink=d,this._expanded=!1,this._defaultCredits=[],this._cesiumCredit=f,this._previousCesiumCredit=void 0,this._currentCesiumCredit=f,this._currentFrameCredits={screenCredits:new e$1F,lightboxCredits:new e$1F},this._defaultCredit=void 0,this.viewport=i,this.container=e}function F$d(){if(!t$$(f$l)){var e=o$12("Assets/Images/logo.png");f$l=new i$17('<a href="http://www.supermap.com" target="_blank"><img src="'+e+'" title="SuperMap"/></a>',!0)}return r$e._cesiumCreditInitialized||(r$e._cesiumCredit=f$l,r$e._cesiumCreditInitialized=!0),f$l}function r$d(e){if(!t$$(e))throw new t$_("scene are required.");this._scene=e,this._sceneDepthBuffer=void 0,this._cameraDepthBuffer=void 0,this._boundingSphere=new c$19,this._qureyRegion=[],this._waterHeight=0,this._polygonTexture=null,this._damBreakPosition=[0,0,0],this._frameState=void 0,this._update=!0,this._name="",this._sceneName="",this._cameraName="",this._checking=!1}function o$g(e){t$$(e._polygonTexture)&&(e._polygonTexture=e._polygonTexture&&e._polygonTexture.destroy(),e._polygonTexture=null)}function n$f(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).attributeName,i=e.perInstanceAttribute;if(!t$$(t))throw new t$_("options.attributeName is required.");t$$(i)||(i=!1);var n,r=e$1Y(e.glslDatatype,"vec3"),o="v_"+t;if("normal"===t||"tangent"===t||"bitangent"===t)n="vec4 getColor() { return vec4(("+o+" + vec3(1.0)) * 0.5, 1.0); }\n";else switch("st"===t&&(r="vec2"),r){case"float":n="vec4 getColor() { return vec4(vec3("+o+"), 1.0); }\n";break;case"vec2":n="vec4 getColor() { return vec4("+o+", 0.0, 1.0); }\n";break;case"vec3":n="vec4 getColor() { return vec4("+o+", 1.0); }\n";break;case"vec4":n="vec4 getColor() { return "+o+"; }\n";break;default:throw new t$_("options.glslDatatype must be float, vec2, vec3, or vec4.")}var a="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute float batchId;\n"+(i?"":"attribute "+r+" "+t+";\n")+"varying "+r+" "+o+";\nvoid main()\n{\nvec4 p = czm_translateRelativeToEye(position3DHigh, position3DLow);\n"+(i?o+" = czm_batchTable_"+t+"(batchId);\n":o+" = "+t+";\n")+"gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}",s="varying "+r+" "+o+";\n"+n+"\nvoid main()\n{\ngl_FragColor = getColor();\n}";this.material=void 0,this.translucent=e$1Y(e.translucent,!1),this._vertexShaderSource=e$1Y(e.vertexShaderSource,a),this._fragmentShaderSource=e$1Y(e.fragmentShaderSource,s),this._renderState=n$M.getDefaultRenderState(!1,!1,e.renderState),this._closed=e$1Y(e.closed,!1),this._attributeName=t,this._glslDatatype=r}function s$f(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this.length=e$1Y(e.length,1e7),this._length=void 0,this.width=e$1Y(e.width,2),this._width=void 0,this.show=e$1Y(e.show,!0),this.modelMatrix=c$1a.clone(e$1Y(e.modelMatrix,c$1a.IDENTITY)),this._modelMatrix=new c$1a,this.id=e.id,this._id=void 0,this._primitive=void 0}r$e.prototype.addCredit=function(e){if(n$1e.defined("credit",e),e._isIon)return t$$(this._defaultCredit)||(this._defaultCredit=i$17.clone(F$d())),void(this._currentCesiumCredit=this._defaultCredit);e.showOnScreen?this._currentFrameCredits.screenCredits.set(e.id,e):this._currentFrameCredits.lightboxCredits.set(e.id,e)},r$e.prototype.addDefaultCredit=function(e){n$1e.defined("credit",e);var t=this._defaultCredits;M$j(t,e)||t.push(e)},r$e.prototype.removeDefaultCredit=function(e){n$1e.defined("credit",e);var t=this._defaultCredits,i=t.indexOf(e);-1!==i&&t.splice(i,1)},r$e.prototype.showLightbox=function(){this._lightbox.style.display="block",this._expanded=!0},r$e.prototype.hideLightbox=function(){this._lightbox.style.display="none",this._expanded=!1},r$e.prototype.update=function(){this._expanded&&O$c(this)},r$e.prototype.beginFrame=function(){var e=this._currentFrameCredits,t=e.screenCredits;t.removeAll();for(var i=this._defaultCredits,n=0;n<i.length;++n){var r=i[n];t.set(r.id,r)}e.lightboxCredits.removeAll(),i$17.equals(r$e.cesiumCredit,this._cesiumCredit)||(this._cesiumCredit=i$17.clone(r$e.cesiumCredit)),this._currentCesiumCredit=this._cesiumCredit},r$e.prototype.endFrame=function(){var e=this._currentFrameCredits.screenCredits.values;I$g(this._screenContainer,e,this._delimiter,void 0);var t=this._currentFrameCredits.lightboxCredits.values;this._expandLink.style.display=t.length>0?"inline":"none",I$g(this._creditList,t,void 0,"li"),T$i(this)},r$e.prototype.destroy=function(){return this._lightbox.removeEventListener("click",this._hideLightbox,!1),this.container.removeChild(this._cesiumCreditContainer),this.container.removeChild(this._screenContainer),this.container.removeChild(this._expandLink),this.viewport.removeChild(this._lightbox),s$1e(this)},r$e.prototype.isDestroyed=function(){return!1},r$e._cesiumCredit=void 0,r$e._cesiumCreditInitialized=!1,Object.defineProperties(r$e,{cesiumCredit:{get:function(){return F$d(),r$e._cesiumCredit},set:function(e){r$e._cesiumCredit=e,r$e._cesiumCreditInitialized=!0}}}),Object.defineProperties(r$d.prototype,{damBreakPosition:{get:function(){return this._damBreakPosition},set:function(e){this._damBreakPosition=e,this._update=!0}},waterHeight:{get:function(){return this._waterHeight},set:function(e){this._waterHeight=e,this._update=!0}}}),r$d.prototype.destroy=function(){return o$g(this),s$1e(this)},r$d.prototype.build=function(){""!==this._name||this._checking||(this._name="damBreakAnalysis"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_scene",this._cameraName=this._name+"_camera",this._scene._analyst3D.add(this))},r$d.prototype.qureyRegion=function(e){if(!t$$(e)||!t$$(e.position))throw new t$_("the options is required");this._qureyRegion=e.position,this._update=!0},r$d.prototype.setTerrainBlock=function(e){},r$d.prototype.update=function(e,t,i){if("water"!==t._fboState.name&&!t.passes.pick){if(t._fboState.enabled&&(t._fboState.name===this._sceneName||t._fboState.name===this._cameraName))return void(t._fboState.name===this._sceneName&&t$$(this._stencilCommand)&&i.push(this._stencilCommand));var n=t.camera;n.bReflect||(c$1a.multiply(this._viewProjMatrix,n.inverseViewMatrix,this._renderTextureMatrix),this._update&&(this._frameState=t,t$$(this._cameraDepthBuffer)||(this._cameraDepthBuffer=new n$m(e),this._cameraDepthBuffer.environmentVisible.isObjectVisible=!0,this._cameraDepthBuffer.environmentVisible.isGlobalVisible=!0,this._cameraDepthBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._cameraName]=this._cameraDepthBuffer),this._update=!1,o$g(this),updateCamera(this,e,t),updateViewShed(this,e,t)),t$$(this._cameraDepthBuffer.framebuffer)&&i.push(correct))}},Object.defineProperties(n$f.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},attributeName:{get:function(){return this._attributeName}},glslDatatype:{get:function(){return this._glslDatatype}}}),n$f.prototype.getFragmentShaderSource=n$M.prototype.getFragmentShaderSource,n$f.prototype.isTranslucent=n$M.prototype.isTranslucent,n$f.prototype.getRenderState=n$M.prototype.getRenderState,s$f.prototype.update=function(e){if(this.show){if(!t$$(this._primitive)||!c$1a.equals(this._modelMatrix,this.modelMatrix)||this._length!==this.length||this._width!==this.width||this._id!==this.id){this._modelMatrix=c$1a.clone(this.modelMatrix,this._modelMatrix),this._length=this.length,this._width=this.width,this._id=this.id,t$$(this._primitive)&&this._primitive.destroy(),0===this.modelMatrix[12]&&0===this.modelMatrix[13]&&0===this.modelMatrix[14]&&(this.modelMatrix[14]=.01);var t=new m$P({geometry:new R$H({positions:[a$11.ZERO,a$11.UNIT_X],width:this.width,vertexFormat:e$12.VERTEX_FORMAT,colors:[e$1z.RED,e$1z.RED],arcType:m$_.NONE}),modelMatrix:c$1a.multiplyByUniformScale(this.modelMatrix,this.length,new c$1a),id:this.id,pickPrimitive:this}),i=new m$P({geometry:new R$H({positions:[a$11.ZERO,a$11.UNIT_Y],width:this.width,vertexFormat:e$12.VERTEX_FORMAT,colors:[e$1z.GREEN,e$1z.GREEN],arcType:m$_.NONE}),modelMatrix:c$1a.multiplyByUniformScale(this.modelMatrix,this.length,new c$1a),id:this.id,pickPrimitive:this}),n=new m$P({geometry:new R$H({positions:[a$11.ZERO,a$11.UNIT_Z],width:this.width,vertexFormat:e$12.VERTEX_FORMAT,colors:[e$1z.BLUE,e$1z.BLUE],arcType:m$_.NONE}),modelMatrix:c$1a.multiplyByUniformScale(this.modelMatrix,this.length,new c$1a),id:this.id,pickPrimitive:this});this._primitive=new y$H({geometryInstances:[t,i,n],appearance:new e$12,asynchronous:!1})}this._primitive.update(e)}},s$f.prototype.isDestroyed=function(){return!1},s$f.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),s$1e(this)};var M$i="varying vec4 positionEC;\nvoid main()\n{\nvec3 direction = normalize(positionEC.xyz);\nczm_ray ray = czm_ray(vec3(0.0), direction);\nvec3 ellipsoid_center = czm_view[3].xyz;\nczm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);\nif (!czm_isEmpty(intersection))\n{\ngl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);\n}\nelse\n{\ndiscard;\n}\nczm_writeLogDepth();\n}\n",U$b="attribute vec4 position;\nvarying vec4 positionEC;\nvoid main()\n{\npositionEC = czm_modelView * position;\ngl_Position = czm_projection * positionEC;\nczm_vertexLogDepth();\n}\n";function c$g(){this._rs=void 0,this._sp=void 0,this._va=void 0,this._command=void 0,this._mode=void 0,this._useLogDepth=!1}var f$k=o$$.supportsTypedArrays()?new Float32Array(12):[],x$i=new a$11,A$j=new a$11,w$l=new a$11,a$d=new a$11;function q$f(e,t){var i=e.radii,n=t.camera.positionWC,r=a$11.multiplyComponents(e.oneOverRadii,n,x$i),o=a$11.magnitude(r),a=a$11.normalize(r,A$j),s=a$11.normalize(a$11.cross(a$11.UNIT_Z,r,w$l),w$l),l=a$11.normalize(a$11.cross(a,s,a$d),a$d),u=Math.sqrt(a$11.magnitudeSquared(r)-1),c=a$11.multiplyByScalar(a,1/o,x$i),h=u/o,d=a$11.multiplyByScalar(s,h,A$j),f=a$11.multiplyByScalar(l,h,w$l),p=a$11.add(c,f,a$d);a$11.subtract(p,d,p),a$11.multiplyComponents(i,p,p),a$11.pack(p,f$k,0);var _=a$11.subtract(c,f,a$d);a$11.subtract(_,d,_),a$11.multiplyComponents(i,_,_),a$11.pack(_,f$k,3);var m=a$11.add(c,f,a$d);a$11.add(m,d,m),a$11.multiplyComponents(i,m,m),a$11.pack(m,f$k,6);var $=a$11.subtract(c,f,a$d);return a$11.add($,d,$),a$11.multiplyComponents(i,$,$),a$11.pack($,f$k,9),f$k}function p$h(){}c$g.prototype.update=function(e){if(this._mode=e.mode,e.mode===b$1d.SCENE3D){var t=e.context,i=e.mapProjection.ellipsoid,n=e.useLogDepth;if(t$$(this._command)||(this._rs=p$1a.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},colorMask:{red:!1,green:!1,blue:!1,alpha:!1}}),this._command=new s$1d({renderState:this._rs,boundingVolume:new c$19(a$11.ZERO,i.maximumRadius),pass:we$l.OPAQUE,owner:this})),!t$$(this._sp)||this._useLogDepth!==n){this._useLogDepth=n;var r=new a$O({sources:[U$b]}),o=new a$O({sources:[M$i]});if(n){o.sources.push("#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\n"),o.defines.push("LOG_DEPTH"),r.defines.push("LOG_DEPTH")}this._sp=p$15.replaceCache({shaderProgram:this._sp,context:t,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:{position:0}}),this._command.shaderProgram=this._sp}var a=q$f(i,e);if(t$$(this._va))this._va.getAttribute(0).vertexBuffer.copyFromArrayView(a);else{var s=new T$11({attributes:{position:new r$Q({componentDatatype:C$12.FLOAT,componentsPerAttribute:3,values:a})},indices:[0,1,2,2,1,3],primitiveType:H$11.TRIANGLES});this._va=x$18.fromGeometry({context:t,geometry:s,attributeLocations:{position:0},bufferUsage:A$13.DYNAMIC_DRAW}),this._command.vertexArray=this._va}}},c$g.prototype.execute=function(e,t){this._mode===b$1d.SCENE3D&&this._command.execute(e,t)},c$g.prototype.isDestroyed=function(){return!1},c$g.prototype.destroy=function(){this._sp=this._sp&&this._sp.destroy(),this._va=this._va&&this._va.destroy()};var C$c=/\bgl_FragDepthEXT\b/,P$a=/\bdiscard\b/;function T$h(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"depthOnly");if(!t$$(i)){var n=t._attributeLocations,r=t.fragmentShaderSource,o=!1,a=r.sources,s=a.length;for(h=0;h<s;++h)if(C$c.test(a[h])||P$a.test(a[h])){o=!0;break}var l=!1,u=r.defines;for(s=u.length,h=0;h<s;++h)if("LOG_DEPTH"===u[h]){l=!0;break}if(e.depthTexture)o||l?!o&&l&&(r=new a$O({defines:["LOG_DEPTH"],sources:["#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\nvoid main() \n{ \n gl_FragColor = vec4(1.0); \n czm_writeLogDepth(); \n} \n"]})):r=new a$O({sources:["void main() \n{ \n gl_FragColor = vec4(1.0); \n} \n"]});else if(o||l)if(!o&&l)r=new a$O({defines:["LOG_DEPTH"],sources:["#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\nvoid main() \n{ \n gl_FragColor = czm_packDepth(gl_FragCoord.z);\n czm_writeLogDepth(); \n} \n"]});else{s=a.length;for(var c=new Array(s+1),h=0;h<s;++h)c[h]=a$O.replaceMain(a[h],"pick_depth_old_main");var d="void main() \n{ \n pick_depth_old_main(); \n if (gl_FragColor.a == 0.0) { \n discard; \n } \n gl_FragColor = "+(l?"czm_packDepth(gl_FragDepthEXT)":"czm_packDepth(gl_FragCoord.z)")+";\n} \n";c[s]=d;for(var f=[],p=0;p<u.length;p++){var _=r.defines[p];f.push(_)}r=new a$O({sources:c,defines:f})}else r=new a$O({sources:["void main() \n{ \n gl_FragColor = czm_packDepth(gl_FragCoord.z);\n} \n"]});i=e.shaderCache.createDerivedShaderProgram(t,"depthOnly",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:r,attributeLocations:n})}return i}function x$h(e,t,i){var n=e._depthOnlyRenderStateCache,r=n[t.id];if(!t$$(r)){var o=p$1a.getState(t);o.depthMask=!0,e._context.depthTexture&&(o.colorMask={red:!1,green:!1,blue:!1,alpha:!1}),t$$(i)&&(o.viewport=void 0),r=p$1a.fromCache(o),n[t.id]=r}return r}p$h.createDepthOnlyDerivedCommand=function(e,t,i,n){var r,o;return t$$(n)||(n={}),t$$(n.depthOnlyCommand)&&(r=n.depthOnlyCommand.shaderProgram,o=n.depthOnlyCommand.renderState),n.depthOnlyCommand=s$1d.shallowClone(t,n.depthOnlyCommand),t$$(r)&&n.shaderProgramId===t.shaderProgram.id?(n.depthOnlyCommand.shaderProgram=r,n.depthOnlyCommand.renderState=o):(n.depthOnlyCommand.shaderProgram=T$h(i,t.shaderProgram),n.depthOnlyCommand.renderState=x$h(e,t.renderState,n.depthOnlyCommand._pointCloudEyeDomeLighting),n.shaderProgramId=t.shaderProgram.id),n.depthOnlyCommand._pointCloudEyeDomeLighting&&(n.depthOnlyCommand.framebuffer=void 0),n};var w$k=/\s+czm_writeLogDepth\(/,O$b=/\s+czm_vertexLogDepth\(/,y$f=/\s*#extension\s+GL_EXT_frag_depth\s*:\s*enable/;function E$h(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"logDepth");if(!t$$(i)){var n=t._attributeLocations,r=t.vertexShaderSource.clone(),o=t.fragmentShaderSource.clone();r.defines=t$$(r.defines)?r.defines.slice(0):[],r.defines.push("LOG_DEPTH"),o.defines=t$$(o.defines)?o.defines.slice(0):[],o.defines.push("LOG_DEPTH");var a,s=!1,l=r.sources,u=l.length;for(a=0;a<u;++a)if(O$b.test(l[a])){s=!0;break}if(!s){for(a=0;a<u;++a)l[a]=a$O.replaceMain(l[a],"czm_log_depth_main");"\n\nvoid main() \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n",l.push("\n\nvoid main() \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n")}var c=!0;for(s=!1,u=(l=o.sources).length,a=0;a<u;++a)w$k.test(l[a])&&(s=!0),y$f.test(l[a])&&(c=!1);var h="";if(c&&(h+="#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\n"),!s){for(a=0;a<u;a++)l[a]=a$O.replaceMain(l[a],"czm_log_depth_main");h+="\nvoid main() \n{ \n czm_log_depth_main(); \n czm_writeLogDepth(); \n} \n"}l.push(h),i=e.shaderCache.createDerivedShaderProgram(t,"logDepth",{vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n})}return i}function F$c(e,t,i){var n=e.shaderCache.getDerivedShaderProgram(t,"pick");if(!t$$(n)){var r=t._attributeLocations,o=t.fragmentShaderSource,a=o.sources,s=a.length,l="";l="vSecondColor"===i?"uniform float uTransparentFilter;\nvoid main() \n{ \n czm_non_pick_main(); \n if (gl_FragColor.a < uTransparentFilter) { \n discard; \n } \n gl_FragColor = "+i+"; \n} \n":"void main() \n{ \n czm_non_pick_main(); \n if (gl_FragColor.a == 0.0) { \n discard; \n } \n gl_FragColor = "+i+"; \n} \n";for(var u=new Array(s+1),c=0;c<s;++c)u[c]=a$O.replaceMain(a[c],"czm_non_pick_main");u[s]=l,o=new a$O({sources:u,defines:o.defines}),n=e.shaderCache.createDerivedShaderProgram(t,"pick",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:o,attributeLocations:r})}return n}function G$f(e,t){var i=e._pickRenderStateCache,n=i[t.id];if(!t$$(n)){var r=p$1a.getState(t);r.blending.enabled=!1,r.depthMask=!0,n=p$1a.fromCache(r),i[t.id]=n}return n}function I$f(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"HDR");if(!t$$(i)){var n=t._attributeLocations,r=t.vertexShaderSource.clone(),o=t.fragmentShaderSource.clone();r.defines=t$$(r.defines)?r.defines.slice(0):[],r.defines.push("HDR"),o.defines=t$$(o.defines)?o.defines.slice(0):[],o.defines.push("HDR"),i=e.shaderCache.createDerivedShaderProgram(t,"HDR",{vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n})}return i}function H$h(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"NORMAL");if(!t$$(i)){var n=t._attributeLocations,r=t.vertexShaderSource.clone(),o=t.fragmentShaderSource.clone();o.defines=t$$(o.defines)?o.defines.slice(0):[],o.defines.push("NORMAL"),i=e.shaderCache.createDerivedShaderProgram(t,"NORMAL",{vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n})}return i}function M$h(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"mask");if(!t$$(i)){var n,r=t._attributeLocations,o=t.fragmentShaderSource,a=o.sources,s=a.length;for(n=0;n<s&&(!C$c.test(a[n])&&!P$a.test(a[n]));++n);var l=o.defines;for(s=l.length,n=0;n<s&&"LOG_DEPTH"!==l[n];++n);o=new a$O({defines:["LOG_DEPTH"],sources:[["#ifdef GL_EXT_frag_depth","#extension GL_EXT_frag_depth : enable","#endif","uniform sampler2D uNonSelDepthTexture;","varying vec4 vColor;","varying vec2 fSelected;","void main() {"," if(vColor.a < 0.1 || fSelected.x < 0.1){discard;}","\tfloat depth = czm_unpackDepth(texture2D(czm_nonSelDepthTexture, gl_FragCoord.xy / czm_viewport.zw));"," depth = czm_reverseLogDepth(depth);"," vec4 positionEC = czm_windowToEyeCoordinates(gl_FragCoord);"," if(-positionEC.z > 10000.0){discard;}"," float near = czm_currentFrustum.x;"," float far = czm_currentFrustum.y;"," float viewZ = -( near * far ) / ( ( far - near ) * depth - far );"," float depthTest = (-positionEC.z > viewZ) && (depth > 0.00001) ? 1.0 : 0.0;","\tgl_FragColor = vec4(0.0, depthTest, 1.0, 1.0);"," czm_writeLogDepth();","}"].join("\n")]}),i=e.shaderCache.createDerivedShaderProgram(t,"mask",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:o,attributeLocations:r})}return i}function m$i(e){if(!t$$(e))throw new t$_("scene is required.");this._scene=e,this._lastAlpha=void 0,this._lastBeta=void 0,this._lastGamma=void 0,this._alpha=void 0,this._beta=void 0,this._gamma=void 0;var t=this;function i(e){var i=e.alpha;if(!t$$(i))return t._alpha=void 0,t._beta=void 0,void(t._gamma=void 0);t._alpha=n$1d.toRadians(i),t._beta=n$1d.toRadians(e.beta),t._gamma=n$1d.toRadians(e.gamma)}window.addEventListener("deviceorientation",i,!1),this._removeListener=function(){window.removeEventListener("deviceorientation",i,!1)}}p$h.createLogDepthCommand=function(e,t,i){var n;return t$$(i)||(i={}),t$$(i.command)&&(n=i.command.shaderProgram),i.command=s$1d.shallowClone(e,i.command),t$$(n)&&i.shaderProgramId===e.shaderProgram.id?i.command.shaderProgram=n:(i.command.shaderProgram=E$h(t,e.shaderProgram),i.shaderProgramId=e.shaderProgram.id),i},p$h.createPickDerivedCommand=function(e,t,i,n){var r,o;return t$$(n)||(n={}),t$$(n.pickCommand)&&(r=n.pickCommand.shaderProgram,o=n.pickCommand.renderState),n.pickCommand=s$1d.shallowClone(t,n.pickCommand),t$$(r)&&n.shaderProgramId===t.shaderProgram.id?(n.pickCommand.shaderProgram=r,n.pickCommand.renderState=o):(n.pickCommand.shaderProgram=F$c(i,t.shaderProgram,t.pickId),n.pickCommand.renderState=G$f(e,t.renderState),n.shaderProgramId=t.shaderProgram.id),e.pickPointEnabled&&t.pass===we$l.S3MTiles&&(n.pickCommand.primitiveType=H$11.POINTS),n},p$h.createHdrCommand=function(e,t,i){var n;return t$$(i)||(i={}),t$$(i.command)&&(n=i.command.shaderProgram),i.command=s$1d.shallowClone(e,i.command),t$$(n)&&i.shaderProgramId===e.shaderProgram.id?i.command.shaderProgram=n:(i.command.shaderProgram=I$f(t,e.shaderProgram),i.shaderProgramId=e.shaderProgram.id),i},p$h.createNormalDerivedCommand=function(e,t,i){var n;return t$$(i)||(i={}),t$$(i.command)&&(n=i.command.shaderProgram),i.command=s$1d.shallowClone(e,i.command),t$$(n)&&i.shaderProgramId===e.shaderProgram.id?i.command.shaderProgram=n:(i.command.shaderProgram=H$h(t,e.shaderProgram),i.shaderProgramId=e.shaderProgram.id),i},p$h.createMaskCommand=function(e,t,i){var n;return t$$(i)||(i={}),t$$(i.command)&&(n=i.command.shaderProgram),i.command=s$1d.shallowClone(e,i.command),t$$(n)&&i.shaderProgramId===e.shaderProgram.id?i.command.shaderProgram=n:(i.command.shaderProgram=M$h(t,e.shaderProgram),i.shaderProgramId=e.shaderProgram.id),i};var A$i=new a$U,f$j=new a$U,w$j=new r$W;function b$l(e,t,i,n){var r=e.direction,o=e.right,a=e.up,s=a$U.fromAxisAngle(r,i,f$j),l=a$U.fromAxisAngle(o,n,A$i),u=a$U.multiply(l,s,l),c=a$U.fromAxisAngle(a,t,f$j);a$U.multiply(c,u,u);var h=r$W.fromQuaternion(u,w$j);r$W.multiplyByVector(h,o,o),r$W.multiplyByVector(h,a,a),r$W.multiplyByVector(h,r,r)}function t$8(e){this.blobSize=e$1Y(e,0)}m$i.prototype.update=function(){if(t$$(this._alpha)){t$$(this._lastAlpha)||(this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma);var e=this._lastAlpha-this._alpha,t=this._lastBeta-this._beta,i=this._lastGamma-this._gamma;b$l(this._scene.camera,-e,t,i),this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma}},m$i.prototype.isDestroyed=function(){return!1},m$i.prototype.destroy=function(){return this._removeListener(),s$1e(this)},t$8.prototype.isReady=function(){return!0},new a$10,t$8.prototype.shouldDiscardImage=function(e){return e.blob.size===this.blobSize};var M$g="#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);\nreturn czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n}\nvoid main()\n{\nfloat maxRadius = max(u_radii.x, max(u_radii.y, u_radii.z)) * 1.5;\nvec3 direction = normalize(v_positionEC);\nvec3 ellipsoidCenter = czm_modelView[3].xyz;\nfloat t1 = -1.0;\nfloat t2 = -1.0;\nfloat b = -2.0 * dot(direction, ellipsoidCenter);\nfloat c = dot(ellipsoidCenter, ellipsoidCenter) - maxRadius * maxRadius;\nfloat discriminant = b * b - 4.0 * c;\nif (discriminant >= 0.0) {\nt1 = (-b - sqrt(discriminant)) * 0.5;\nt2 = (-b + sqrt(discriminant)) * 0.5;\n}\nif (t1 < 0.0 && t2 < 0.0) {\ndiscard;\n}\nfloat t = min(t1, t2);\nif (t < 0.0) {\nt = 0.0;\n}\nczm_ray ray = czm_ray(t * direction, direction);\nvec3 ellipsoid_inverseRadii = vec3(1.0 / u_radii.x, 1.0 / u_radii.y, 1.0 / u_radii.z);\nczm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoidCenter, ellipsoid_inverseRadii);\nif (czm_isEmpty(intersection))\n{\ndiscard;\n}\nvec4 outsideFaceColor = (intersection.start != 0.0) ? computeEllipsoidColor(ray, intersection.start, 1.0) : vec4(0.0);\nvec4 insideFaceColor = (outsideFaceColor.a < 1.0) ? computeEllipsoidColor(ray, intersection.stop, -1.0) : vec4(0.0);\ngl_FragColor = mix(insideFaceColor, outsideFaceColor, outsideFaceColor.a);\ngl_FragColor.a = 1.0 - (1.0 - insideFaceColor.a) * (1.0 - outsideFaceColor.a);\n#ifdef WRITE_DEPTH\n#ifdef GL_EXT_frag_depth\nt = (intersection.start != 0.0) ? intersection.start : intersection.stop;\nvec3 positionEC = czm_pointAlongRay(ray, t);\nvec4 positionCC = czm_projection * vec4(positionEC, 1.0);\n#ifdef LOG_DEPTH\nczm_writeLogDepth(1.0 + positionCC.w);\n#else\nfloat z = positionCC.z / positionCC.w;\nfloat n = czm_depthRange.near;\nfloat f = czm_depthRange.far;\ngl_FragDepthEXT = (z * (f - n) + f + n) * 0.5;\n#endif\n#endif\n#endif\n}\n",D$e="attribute vec3 position;\nuniform vec3 u_radii;\nvarying vec3 v_positionEC;\nvoid main()\n{\nvec4 p = vec4(u_radii * position, 1.0);\nv_positionEC = (czm_modelView * p).xyz;\ngl_Position = czm_modelViewProjection * p;\ngl_Position.z = clamp(gl_Position.z, czm_depthRange.near, czm_depthRange.far);\nczm_vertexLogDepth();\n}\n",S$e={position:0};function c$f(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this.center=a$11.clone(e$1Y(e.center,a$11.ZERO)),this._center=new a$11,this.radii=a$11.clone(e.radii),this._radii=new a$11,this._oneOverEllipsoidRadiiSquared=new a$11,this._boundingSphere=new c$19,this.modelMatrix=c$1a.clone(e$1Y(e.modelMatrix,c$1a.IDENTITY)),this._modelMatrix=new c$1a,this._computedModelMatrix=new c$1a,this.show=e$1Y(e.show,!0),this.material=e$1Y(e.material,r$v.fromType(r$v.ColorType)),this._material=void 0,this._translucent=void 0,this.id=e.id,this._id=void 0,this.debugShowBoundingVolume=e$1Y(e.debugShowBoundingVolume,!1),this.onlySunLighting=e$1Y(e.onlySunLighting,!1),this._onlySunLighting=!1,this._depthTestEnabled=e$1Y(e.depthTestEnabled,!0),this._useLogDepth=!1,this._sp=void 0,this._rs=void 0,this._va=void 0,this._pickSP=void 0,this._pickId=void 0,this._colorCommand=new s$1d({owner:e$1Y(e._owner,this)}),this._pickCommand=new s$1d({owner:e$1Y(e._owner,this),pickOnly:!0});var t=this;this._uniforms={u_radii:function(){return t.radii},u_oneOverEllipsoidRadiiSquared:function(){return t._oneOverEllipsoidRadiiSquared}},this._pickUniforms={czm_pickColor:function(){return t._pickId.color}}}function F$b(e){var t=e.cache.ellipsoidPrimitive_vertexArray;if(t$$(t))return t;var i=c$Z.createGeometry(c$Z.fromDimensions({dimensions:new a$11(2,2,2),vertexFormat:n$12.POSITION_ONLY}));return t=x$18.fromGeometry({context:e,geometry:i,attributeLocations:S$e,bufferUsage:A$13.STATIC_DRAW,interleave:!0}),e.cache.ellipsoidPrimitive_vertexArray=t,t}var C$b="#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\n";c$f.prototype.update=function(e){if(this.show&&e.mode===b$1d.SCENE3D&&t$$(this.center)&&t$$(this.radii)){if(!t$$(this.material))throw new t$_("this.material must be defined.");var t=e.context,i=this.material.isTranslucent(),n=this._translucent!==i;(!t$$(this._rs)||n)&&(this._translucent=i,this._rs=p$1a.fromCache({cull:{enabled:!0,face:k$F.FRONT},depthTest:{enabled:this._depthTestEnabled},depthMask:!i&&t.fragmentDepth,blending:i?Ee$s.ALPHA_BLEND:void 0})),t$$(this._va)||(this._va=F$b(t));var r=!1,o=this.radii;if(!a$11.equals(this._radii,o)){a$11.clone(o,this._radii);var a=this._oneOverEllipsoidRadiiSquared;a.x=1/(o.x*o.x),a.y=1/(o.y*o.y),a.z=1/(o.z*o.z),r=!0}(!c$1a.equals(this.modelMatrix,this._modelMatrix)||!a$11.equals(this.center,this._center))&&(c$1a.clone(this.modelMatrix,this._modelMatrix),a$11.clone(this.center,this._center),c$1a.multiplyByTranslation(this.modelMatrix,this.center,this._computedModelMatrix),r=!0),r&&(a$11.clone(a$11.ZERO,this._boundingSphere.center),this._boundingSphere.radius=a$11.maximumComponent(o),c$19.transform(this._boundingSphere,this._computedModelMatrix,this._boundingSphere));var s=this._material!==this.material;this._material=this.material,this._material.update(t);var l=this.onlySunLighting!==this._onlySunLighting;this._onlySunLighting=this.onlySunLighting;var u=e.useLogDepth,c=this._useLogDepth!==u;this._useLogDepth=u;var h,d,f=this._colorCommand;(s||l||n||c)&&(h=new a$O({sources:[D$e]}),d=new a$O({sources:[this.material.shaderSource,M$g]}),this.onlySunLighting&&d.defines.push("ONLY_SUN_LIGHTING"),!i&&t.fragmentDepth&&d.defines.push("WRITE_DEPTH"),this._useLogDepth&&(h.defines.push("LOG_DEPTH"),d.defines.push("LOG_DEPTH"),d.sources.push(C$b)),this._sp=p$15.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:S$e}),f.vertexArray=this._va,f.renderState=this._rs,f.shaderProgram=this._sp,f.uniformMap=s$1n(this._uniforms,this.material._uniforms),f.executeInClosestFrustum=i);var p=e.commandList,_=e.passes;if(_.render&&(f.boundingVolume=this._boundingSphere,f.debugShowBoundingVolume=this.debugShowBoundingVolume,f.modelMatrix=this._computedModelMatrix,f.pass=i?we$l.TRANSLUCENT:we$l.OPAQUE,p.push(f)),_.pick){var m=this._pickCommand;(!t$$(this._pickId)||this._id!==this.id)&&(this._id=this.id,this._pickId=this._pickId&&this._pickId.destroy(),this._pickId=t.createPickId({primitive:this,id:this.id})),(s||l||!t$$(this._pickSP)||c)&&(h=new a$O({sources:[D$e]}),d=new a$O({sources:[this.material.shaderSource,M$g],pickColorQualifier:"uniform"}),this.onlySunLighting&&d.defines.push("ONLY_SUN_LIGHTING"),!i&&t.fragmentDepth&&d.defines.push("WRITE_DEPTH"),this._useLogDepth&&(h.defines.push("LOG_DEPTH"),d.defines.push("LOG_DEPTH"),d.sources.push(C$b)),this._pickSP=p$15.replaceCache({context:t,shaderProgram:this._pickSP,vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:S$e}),m.vertexArray=this._va,m.renderState=this._rs,m.shaderProgram=this._pickSP,m.uniformMap=s$1n(s$1n(this._uniforms,this._pickUniforms),this.material._uniforms),m.executeInClosestFrustum=i),m.boundingVolume=this._boundingSphere,m.modelMatrix=this._computedModelMatrix,m.pass=i?we$l.TRANSLUCENT:we$l.OPAQUE,p.push(m)}}},c$f.prototype.isDestroyed=function(){return!1},c$f.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._pickSP=this._pickSP&&this._pickSP.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),s$1e(this)};var te$7="layout(location=0) in vec3 pos;\nlayout(location=2) in vec2 lonLat;\nlayout(location=3) in vec2 life;\nlayout(location=4) in vec2 texCoord;\nuniform float pointSize;\nuniform float uFieldTextureSize;\nuniform float uMaxFilterValue;\nuniform float uMinFilterValue;\nuniform vec4 particleColor;\nuniform sampler2D velocityTexture;\nuniform sampler2D colorTable;\nuniform float uHasColorTable;\nuniform float uCeil;\nuniform float uFloor;\nuniform float velocityScale;\nuniform float deltaTime;\nuniform vec4 lonlatRange;\nout vec4 velocityColor;\nout vec2 outTexCoord;\nfloat computerOnePixelLength()\n{\nvec4 viewPos = czm_modelView * vec4(pos, 1.0);\nvec4 winPos = czm_projection * viewPos;\nfloat dwidth = czm_metersPerPixel(viewPos);\nwinPos.x = winPos.x - 2.0 * dwidth;\nvec4 newViewPos = czm_inverseProjection * winPos;\nreturn length(viewPos - newViewPos);\n}\nvec4 computePos(vec3 v3Normal)\n{\nvec4 viewPos = czm_modelView * vec4(pos, 1.0);\n#ifdef SIZEFIXED\nviewPos.xyz = viewPos.xyz + v3Normal * computerOnePixelLength() * uFieldTextureSize;\n#else\nviewPos.xyz = viewPos.xyz + v3Normal * uFieldTextureSize;\n#endif\nviewPos.xyz = viewPos.xyz * 0.9;\nreturn czm_projection * viewPos;\n}\nvoid main()\n{\nvec2 lonLatTexCoord;\n#ifdef TEXTUREEFFECT\nlonLatTexCoord.x = (lonLat.x + czm_pi) / czm_twoPi;\nlonLatTexCoord.y = (lonLat.y + czm_piOverTwo) / czm_pi;\n#else\nlonLatTexCoord.x = (lonLat.x - lonlatRange.x) / (lonlatRange.z - lonlatRange.x);\nlonLatTexCoord.y = (lonLat.y - lonlatRange.y) / (lonlatRange.w - lonlatRange.y);\n#endif\nvec2 velocity = texture(velocityTexture, lonLatTexCoord).xy;\nfloat velocitySize = length(velocity);\nfloat threshold = abs(uCeil - uFloor);\nfloat contourRate = (velocitySize - uFloor) / threshold;\nfloat finalCoord = clamp(contourRate, 0.0, 1.0);\nvelocityColor = mix(particleColor, texture(colorTable, vec2(0.0, finalCoord)).rgba, uHasColorTable);\noutTexCoord= texCoord;\nvec3 upAxis = normalize(pos);\nvec3 eastAxis = cross(vec3(0.0, 0.0, 1.0), upAxis);\neastAxis = normalize(eastAxis);\nvec3 northAxis = cross(upAxis, eastAxis);\nnorthAxis = normalize(northAxis);\n#ifdef FILTER\nif(velocitySize > uMaxFilterValue || velocitySize < uMinFilterValue){\nvelocityColor.a = 0.0;\n}\n#endif\n#ifdef TEXTUREEFFECT\nvec3 nestPos = pos + northAxis * velocity.y * deltaTime * velocityScale + eastAxis * velocity.x * deltaTime * velocityScale;\nvec4 nextPrjPos = czm_modelViewProjection * vec4(nestPos, 1.0);\nvec4 curPrjPos = czm_modelViewProjection * vec4(pos, 1.0);\nvec2 direction = normalize(nextPrjPos.xy - curPrjPos.xy);\nfloat cosx = dot(direction, vec2(1.0, 0.0));\nfloat cosy = dot(direction, vec2(0.0, 1.0));\nfloat sinx = sqrt(1.0- cosx*cosx);\nfloat cosYBiggerThan0 = sign(cosy);\nmat2 mat = mat2(cosx, sinx * cosYBiggerThan0, -sinx * cosYBiggerThan0, cosx);\nvec2 realNormal = mat * texCoord.xy;\ngl_Position = computePos(vec3(realNormal.xy, 0.0));\n#else\ngl_PointSize = pointSize;\ngl_Position = czm_modelViewProjection * vec4(pos, 1);\n#endif\n}\n",re$7="layout(location=0) in vec3 pos;\nlayout(location=3) in vec2 texCoord;\nuniform float pointSize;\nuniform float uFieldTextureSize;\nuniform float uMaxFilterValue;\nuniform float uMinFilterValue;\nuniform vec4 particleColor;\nuniform sampler2D velocityTexture;\nuniform sampler2D colorTable;\nuniform float uHasColorTable;\nuniform float uCeil;\nuniform float uFloor;\nuniform float velocityScale;\nuniform float deltaTime;\nuniform vec4 uXYBounds;\nuniform vec2 uZBounds;\nuniform float uTextureDepth;\nout vec4 velocityColor;\nout vec2 outTexCoord;\nfloat computerOnePixelLength()\n{\nvec4 viewPos = czm_modelView * vec4(pos, 1.0);\nvec4 winPos = czm_projection * viewPos;\nfloat dwidth = czm_metersPerPixel(viewPos);\nwinPos.x = winPos.x - 2.0 * dwidth;\nvec4 newViewPos = czm_inverseProjection * winPos;\nreturn length(viewPos - newViewPos);\n}\nvec4 computePos(vec3 v3Normal)\n{\nvec4 viewPos = czm_modelView * vec4(pos, 1.0);\n#ifdef SIZEFIXED\nviewPos.xyz = viewPos.xyz + v3Normal * computerOnePixelLength() * uFieldTextureSize;\n#else\nviewPos.xyz = viewPos.xyz + v3Normal * uFieldTextureSize;\n#endif\nviewPos.xyz = viewPos.xyz * 0.9;\nreturn czm_projection * viewPos;\n}\nvoid main()\n{\nvec2 velocityTexCoord;\nvelocityTexCoord.x = (pos.x - uXYBounds.x) / (uXYBounds.z - uXYBounds.x);\nvelocityTexCoord.y = (pos.y - uXYBounds.y) / (uXYBounds.w - uXYBounds.y);\nfloat texCoordZ = pos.z / (uZBounds.y - uZBounds.x);\nfloat texCoordStep = 1.0 / uTextureDepth;\nfloat timesZ = floor(texCoordZ / texCoordStep);\nvelocityTexCoord.x /= uTextureDepth;\nvelocityTexCoord.x += texCoordStep * timesZ;\nvec3 velocity = texture(velocityTexture, velocityTexCoord).xyz;\nfloat velocitySize = length(velocity);\nfloat threshold = abs(uCeil - uFloor);\nfloat contourRate = (velocitySize - uFloor) / threshold;\nfloat finalCoord = clamp(contourRate, 0.0, 1.0);\nvelocityColor = mix(particleColor, texture(colorTable, vec2(0.0, finalCoord)).rgba, uHasColorTable);\noutTexCoord= texCoord;\n#ifdef FILTER\nif(velocitySize > uMaxFilterValue || velocitySize < uMinFilterValue)\n{\nvelocityColor.a = 0.0;\n}\n#endif\nif(pos.x > uXYBounds.z || pos.x < uXYBounds.x || pos.y > uXYBounds.w || pos.y < uXYBounds.y || pos.z < uZBounds.x || pos.z > uZBounds.y)\n{\nvelocityColor.a = 0.0;\n}\n#ifdef TEXTUREEFFECT\nvec3 nextPos = pos.xyz + velocity.xyz * deltaTime * velocityScale;\nvec4 nextPrjPos = czm_modelViewProjection * vec4(nextPos, 1.0);\nvec4 curPrjPos = czm_modelViewProjection * vec4(pos, 1.0);\nvec2 direction = normalize(nextPrjPos.xy - curPrjPos.xy);\nfloat cosx = dot(direction, vec2(1.0, 0.0));\nfloat cosy = dot(direction, vec2(0.0, 1.0));\nfloat sinx = sqrt(1.0- cosx*cosx);\nfloat cosYBiggerThan0 = sign(cosy);\nmat2 mat = mat2(cosx, sinx * cosYBiggerThan0, -sinx * cosYBiggerThan0, cosx);\nvec2 realNormal = mat * texCoord.xy;\ngl_Position = computePos(vec3(realNormal.xy, 0.0));\n#else\ngl_PointSize = pointSize;\ngl_Position = czm_modelViewProjection * vec4(pos, 1);\n#endif\n}\n",ie$6="precision mediump float;\nin vec4 velocityColor;\nin vec2 outTexCoord;\nout vec4 FragColor;\nuniform sampler2D uFieldTexture;\nvoid main()\n{\nFragColor = velocityColor;\n#ifdef TEXTUREEFFECT\nFragColor = texture(uFieldTexture, outTexCoord) * velocityColor;\n#endif\n}\n",ae$6="precision highp float;\nlayout(location=0) in vec3 pos;\nlayout(location=1) in vec3 oriPos;\nlayout(location=2) in vec2 lonLat;\nlayout(location=3) in vec2 life;\nout vec3 tf_pos;\nout vec3 tf_oriPos;\nout vec2 tf_lonLat;\nout vec2 tf_life;\nuniform sampler2D velocityTexture;\nuniform float velocityScale;\nuniform float deltaTime;\nuniform vec2 velocityTexRes;\nuniform vec4 lonlatRange;\nfloat fastAtan2(float y, float x)\n{\nfloat ax = abs(x);\nfloat ay = abs(y);\nfloat a = min(ax, ay) / (max(ax, ay) + 1e-18);\nfloat r = ((-0.0464964749 * a * a + 0.15931422) * a * a - 0.327622764) * a * a * a + a;\nif(ay > ax){\nr = 1.57079637 - r;\n}\nif(x < 0.0){\nr = 3.14159274 - r;\n}\nif(y < 0.0){\nr = -r;\n}\nreturn r;\n}\nvec3 ComputeLatLonFromPos(vec3 pos)\n{\nfloat rho = sqrt(pos.x * pos.x + pos.y * pos.y + pos.z * pos.z);\nif (rho < 0.00001)\n{\nreturn vec3(0.0);\n}\nfloat longitude = fastAtan2(pos.y, pos.x);\nfloat latitude = asin(pos.z / rho);\nreturn vec3(longitude,latitude,rho);\n}\nvec2 lookup_wind(const vec2 uv)\n{\nvec2 px = 1.0 / velocityTexRes;\nvec2 vc = (floor(uv * velocityTexRes)) * px;\nvec2 f = fract(uv * velocityTexRes);\nvec2 tl = texture(velocityTexture, vc).rg;\nvec2 tr = texture(velocityTexture, vc + vec2(px.x, 0)).rg;\nvec2 bl = texture(velocityTexture, vc + vec2(0, px.y)).rg;\nvec2 br = texture(velocityTexture, vc + px).rg;\nreturn mix(mix(tl, tr, f.x), mix(bl, br, f.x), f.y);\n}\nvoid main()\n{\nvec2 lonLatTexCoord;\n#ifdef TEXTUREEFFECT\nlonLatTexCoord.x = (lonLat.x + czm_pi) / czm_twoPi;\nlonLatTexCoord.y = (lonLat.y + czm_piOverTwo) / czm_pi;\n#else\nlonLatTexCoord.x = (lonLat.x - lonlatRange.x) / (lonlatRange.z - lonlatRange.x);\nlonLatTexCoord.y = (lonLat.y - lonlatRange.y) / (lonlatRange.w - lonlatRange.y);\n#endif\nvec2 velocity = lookup_wind(lonLatTexCoord);\nvec3 upAxis = normalize(pos);\nvec3 eastAxis = cross(vec3(0.0, 0.0, 1.0), upAxis);\neastAxis = normalize(eastAxis);\nvec3 northAxis = cross(upAxis, eastAxis);\nnorthAxis = normalize(northAxis);\nif(life.x > life.y)\n{\ntf_pos = oriPos;\ntf_life.x = 0.0;\ntf_life.y = life.y;\n}\nelse\n{\ntf_pos = pos + northAxis * velocity.y * deltaTime * velocityScale + eastAxis * velocity.x * deltaTime * velocityScale;\ntf_life.x += life.x + deltaTime;\ntf_life.y = life.y;\n}\ntf_oriPos = oriPos;\ntf_lonLat = ComputeLatLonFromPos(tf_pos).xy;\n#ifndef TEXTUREEFFECT\nvec2 s = step(lonlatRange.xy, tf_lonLat);\nvec2 t = step(tf_lonLat, lonlatRange.zw);\nif (s.x * s.y * t.x * t.y < 1.0) {\ntf_life.x = life.y + 1.0;\n}\n#endif\n}\n",oe$5="precision highp float;\nlayout(location=0) in vec3 pos;\nlayout(location=1) in vec3 oriPos;\nlayout(location=2) in vec2 life;\nout vec3 tf_pos;\nout vec3 tf_oriPos;\nout vec2 tf_life;\nuniform sampler2D velocityTexture;\nuniform float velocityScale;\nuniform float deltaTime;\nuniform vec4 uXYBounds;\nuniform vec2 uZBounds;\nuniform float uTextureDepth;\nvoid main()\n{\nvec2 velocityTexCoord;\nvelocityTexCoord.x = (pos.x - uXYBounds.x) / (uXYBounds.z - uXYBounds.x);\nvelocityTexCoord.y = (pos.y - uXYBounds.y) / (uXYBounds.w - uXYBounds.y);\nfloat texCoordZ = pos.z / (uZBounds.y - uZBounds.x);\nfloat texCoordStep = 1.0 / uTextureDepth;\nfloat timesZ = floor(texCoordZ / texCoordStep);\nvelocityTexCoord.x /= uTextureDepth;\nvelocityTexCoord.x += texCoordStep * timesZ;\nvec3 velocity = texture(velocityTexture, velocityTexCoord).xyz;\nif(life.x > life.y)\n{\ntf_pos = oriPos;\ntf_life.x = 0.0;\ntf_life.y = life.y;\n}\nelse\n{\ntf_pos.xyz = pos.xyz + velocity.xyz * deltaTime * velocityScale;\ntf_life.x += life.x + deltaTime;\ntf_life.y = life.y;\n}\ntf_oriPos = oriPos;\n}\n",se$4="precision highp float;\nout vec4 FragColor;\nvoid main() {}\n",V$c="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\ngl_FragColor = texture2D(colorTexture, v_textureCoordinates);\n}\n",le$8="uniform sampler2D u_lastColorTexture;\nuniform sampler2D u_colorTexture;\nuniform float u_opacity;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 color = texture2D(u_colorTexture, v_textureCoordinates);\nvec4 lastColor = texture2D(u_lastColorTexture, v_textureCoordinates);\nvec4 outColor = color*color.a + lastColor * (1.0 - color.a);\nfloat alpha = outColor.a * u_opacity;\ngl_FragColor = vec4(outColor.rgb, alpha < 0.1 ? 0.0 : alpha);\n}\n";function g$9(e){if(!e._webgl2)throw new t$_("webgl2 is not supported.");this._context=e,this._show=!0,this._filter=!1,this._MaxFilterValue=Number.MAX_VALUE,this._MinFilterValue=Number.MIN_VALUE,this._paricleCountPerDegree=1,this._lifeRange=[5e3,1e4],this._particleColor=new e$1z(1,1,0,1),this._particleSize=5,this._velocityScale=1,this._velocityTexRes=new r$T(0,0),this._velocityField=void 0,this._dictColorTable=void 0,this._floor=0,this._ceil=10,this._hasColorTable=0,this._hypsometricTexture=void 0,this._dataBounds=s$1p.MAX_VALUE,this._zBounds=new r$T(0,1),this._transformFeedback=void 0,this._normalShaderProgram=void 0,this._feedbackShaderProgram=void 0,this._currentTime=0,this._deltaTime=0,this._transformFeedbackInitialized=!1,this._fieldInitialized=!1,this._fieldDataIndices=void 0,this._textureEffect=!1,this._textureEffectUrl=o$12("Assets/Textures/arrow.png"),this._fieldTexture=void 0,this._fieldTextureSize=30,this._sizeFixed=!0,this._sceneMode=b$1d.SCENE3D,this._showParticleTrails=!0,this._fadeOpacity=.98,this._curParticleStateTexture=void 0,this._lastParticleStateTexture=void 0,this._tmpParticleStateTexture=void 0,this._curParticleTextureBuffer=void 0,this._lastParticleTextureBuffer=void 0,this._tmpParticleTextureBuffer=void 0,this._clearCommand=void 0,this._copyColorCommand=void 0,this._copyLastColorCommand=void 0,this._hdrEnable=!1}var de$5=new c$1a(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);Object.defineProperties(g$9.prototype,{fieldTextureSize:{get:function(){return this._fieldTextureSize},set:function(e){this._fieldTextureSize=e}},sizeFixed:{get:function(){return this._sizeFixed},set:function(e){this._sizeFixed=e,this._transformFeedbackInitialized=!1}},textureEffect:{get:function(){return this._textureEffect},set:function(e){this._textureEffect=e,this._transformFeedbackInitialized=!1}},textureEffectUrl:{get:function(){return this._textureEffectUrl},set:function(e){this._textureEffectUrl=e,this._fieldTexture=void 0}},show:{get:function(){return this._show},set:function(e){this._show=e}},filter:{get:function(){return this._filter},set:function(e){this._filter=e,this._transformFeedbackInitialized=!1}},MaxFilterValue:{get:function(){return this._MaxFilterValue},set:function(e){this._MaxFilterValue=e}},MinFilterValue:{get:function(){return this._MinFilterValue},set:function(e){this._MinFilterValue=e}},paricleCountPerDegree:{get:function(){return this._paricleCountPerDegree},set:function(e){this._paricleCountPerDegree=e,this._transformFeedbackInitialized=!1}},particleLifeRange:{get:function(){return this._lifeRange},set:function(e){this._lifeRange=e,this._transformFeedbackInitialized=!1}},particleColor:{get:function(){return this._particleColor},set:function(e){this._particleColor=e}},particleSize:{get:function(){return this._particleSize},set:function(e){this._particleSize=e}},velocityScale:{get:function(){return this._velocityScale},set:function(e){this._velocityScale=e}},colorTable:{get:function(){return this._dictColorTable},set:function(e){if(!t$$(e))return t$$(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null),void(this._hasColorTable=0);this._dictColorTable=o$T.clone(e,this._dictColorTable);var t=this._dictColorTable.count();if(t<1)this._hasColorTable=0;else{t$$(this._hypsometricTexture)||(this._hypsometricTexture=new P$S({context:this._context,width:1024,height:64,pixelFormat:Z$_.RGBA})),t$$(this._dictColorTable)&&(this._dictColorTable.generateBuffer(),t$$(this._hypsometricTexture)&&this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._dictColorTable._imageBuffer}));var i=0,n=0,r=this._dictColorTable.getItem(0);t$$(r)&&t$$(r.altitude)&&(i=parseFloat(r.altitude)),t$$(r=this._dictColorTable.getItem(t-1))&&t$$(r.altitude)&&(n=parseFloat(r.altitude)),this._ceiling=Math.max(i,n),this._floor=Math.min(i,n),this._hasColorTable=1}}}}),g$9.prototype.update=function(e){if(this._show&&t$$(this._velocityField)){if(this._sceneMode!==e.camera._mode&&(this._sceneMode=e.camera._mode,this._transformFeedbackInitialized=!1),this._textureEffect&&t$$(this._textureEffectUrl)&&!t$$(this._fieldTexture)){var t=this;c$18(n$S(this._textureEffectUrl),(function(e){t._fieldTexture=new P$S({context:t._context,source:e,sampler:new a$Q({wrapS:j$13.REPEAT,wrapT:j$13.REPEAT})}),t._transformFeedbackInitialized=!1}))}this._fieldInitialized||(this._createVectorFieldTexture(this._context,this._velocityField),this._fieldInitialized=!0),this._transformFeedbackInitialized||(this._createTransformFeedback(this._context,e),this._transformFeedbackInitialized=!0),t$$(this._hypsometricTexture)||(this._hypsometricTexture=new P$S({context:this._context,width:1,height:1024,pixelFormat:Z$_.RGBA}));var i=(new Date).getTime(),n=i-this._currentTime;this._currentTime=i,this._deltaTime=n,t$$(this._transformFeedback)&&e.commandList.push(this._transformFeedback)}},g$9.prototype._setVelocityField=function(e){this._velocityField=e,this._fieldInitialized=!1},g$9.prototype._setDataBounds=function(e){this._dataBounds=e,this._transformFeedbackInitialized=!1},g$9.prototype._setZBounds=function(e){this._zBounds=e,this._transformFeedbackInitialized=!1};var fe$4=/\s+czm_writeLogDepth\(/,_e$4=/\s+czm_vertexLogDepth\(/,me$6=/\s*#extension\s+GL_EXT_frag_depth\s*:\s*enable/;function pe$5(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"logDepth");if(!t$$(i)){var n=t._attributeLocations,r=t.vertexShaderSource.clone(),o=t.fragmentShaderSource.clone();r.defines=t$$(r.defines)?r.defines.slice(0):[],r.defines.push("LOG_DEPTH"),o.defines=t$$(o.defines)?o.defines.slice(0):[],o.defines.push("LOG_DEPTH");var a,s=!1,l=r.sources,u=l.length;for(a=0;a<u;++a)if(_e$4.test(l[a])){s=!0;break}if(!s){for(a=0;a<u;++a)l[a]=a$O.replaceMain(l[a],"czm_log_depth_main");"\n\nvoid main() \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n",l.push("\n\nvoid main() \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n")}for(s=!1,u=(l=o.sources).length,a=0;a<u;++a)fe$4.test(l[a])&&(s=!0),me$6.test(l[a]);var c="";if(!s){for(a=0;a<u;a++)l[a]=a$O.replaceMain(l[a],"czm_log_depth_main");c+="\nvoid main() \n{ \n czm_log_depth_main(); \n czm_writeLogDepth(); \n} \n"}l.push(c),i=e.shaderCache.createDerivedShaderProgram(t,"logDepth",{vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n})}return i}g$9.prototype._createTransformFeedback=function(e,t){t$$(this._transformFeedback)&&this._transformFeedback.destroy();var i,n,r=[];this._sceneMode!==b$1d.SCENE3D?(i=new a$O({sources:[oe$5]}),n=new a$O({sources:[re$7]}),r=["tf_pos","tf_oriPos","tf_life"]):(i=new a$O({sources:[ae$6]}),n=new a$O({sources:[te$7]}),r=["tf_pos","tf_oriPos","tf_lonLat","tf_life"]);var o,a=new a$O({sources:[ie$6]});this._textureEffect&&(i.defines.push("TEXTUREEFFECT"),n.defines.push("TEXTUREEFFECT"),a.defines.push("TEXTUREEFFECT")),this._filter&&n.defines.push("FILTER"),this._sizeFixed&&n.defines.push("SIZEFIXED"),this._normalShaderProgram=p$15.fromCache({context:e,vertexShaderSource:n,fragmentShaderSource:a}),t.useLogDepth&&(this._normalShaderProgram=pe$5(e,this._normalShaderProgram)),this._feedbackShaderProgram=p$15.fromCache({context:e,vertexShaderSource:i,fragmentShaderSource:se$4,varyings:r,bufferMode:de$x.SEPARATE_ATTRIBS}),o=this._textureEffect?this._sceneMode!==b$1d.SCENE3D?this._createLocalTextureVertexAttributes():this._createGlobalTextureVertexAttributes():this._sceneMode!==b$1d.SCENE3D?this._createLocalVertexAttributes():this._createGlobalVertexAttributes();var s=this._createFeedbackShaderUniformMap(),l=this._createNormalShaderUniformMap(),u=p$1a.fromCache({depthTest:{enabled:!0},depthMask:!1,blending:Ee$s.ALPHA_BLEND}),c=this._computeTotalParticleCount();this._transformFeedback=new s$j({pointCount:c,indices:this._fieldDataIndices,textureEffect:this._textureEffect,attributes:o,primitiveMode:this._textureEffect?de$x.TRIANGLES:de$x.POINTS,renderState:u,feedbackShader:this._feedbackShaderProgram,normalShader:this._normalShaderProgram,normalShaderUniformMap:l,feedbackShaderUniformMap:s,modelMatrix:this._sceneMode===b$1d.SCENE3D?c$1a.IDENTITY:de$5,fadeOpacity:this._fadeOpacity}),this._transformFeedback._drawEvent.addEventListener(this.drawParticleTrails,this)},g$9.prototype._createGlobalVertexAttributes=function(){var e,t,i,n,r,o,a,s,l;e=n$1d.toDegrees(this._dataBounds.width),t=n$1d.toDegrees(this._dataBounds.height),i=this._zBounds.y-this._zBounds.x,n=n$1d.toDegrees(this._dataBounds.west),r=n$1d.toDegrees(this._dataBounds.south),o=this._zBounds.x;for(var u=(a=Math.ceil(this._paricleCountPerDegree*e))*(s=Math.ceil(this._paricleCountPerDegree*t))*(l=Math.ceil(this._paricleCountPerDegree*i)),c=new Float32Array(3*u),h=new Float32Array(3*u),d=new Float32Array(2*u),f=new Float32Array(2*u),p=0,_=0;_<s;_++)for(var m=0;m<a;m++)for(var $=0;$<l;$++,p++){var g=n+m*(e/a),y=r+_*(t/s),v=o+$*(i/l),x=new a$11.fromDegrees(g,y,v);c[3*p]=x.x,c[3*p+1]=x.y,c[3*p+2]=x.z,h[3*p]=x.x,h[3*p+1]=x.y,h[3*p+2]=x.z,d[2*p]=n$1d.toRadians(g),d[2*p+1]=n$1d.toRadians(y);var b=(this._lifeRange[1]-this._lifeRange[0])*Math.random()+this._lifeRange[0];f[2*p]=0,f[2*p+1]=b}this.lonlatRange=new a$10(d[0],d[1],d[d.length-2],d[d.length-1]);var S=[];return S.push({index:0,componentsPerAttribute:3,data:c}),S.push({index:1,componentsPerAttribute:3,data:h}),S.push({index:2,componentsPerAttribute:2,data:d}),S.push({index:3,componentsPerAttribute:2,data:f}),S},g$9.prototype._createLocalVertexAttributes=function(){var e,t,i,n,r,o,a,s,l;e=this._dataBounds.width,t=this._dataBounds.height,i=this._zBounds.y-this._zBounds.x,n=this._dataBounds.west,r=this._dataBounds.south,o=this._zBounds.x;for(var u=(a=Math.ceil(this._paricleCountPerDegree*e))*(s=Math.ceil(this._paricleCountPerDegree*t))*(l=Math.ceil(this._paricleCountPerDegree*i)),c=new Float32Array(3*u),h=new Float32Array(3*u),d=new Float32Array(2*u),f=0,p=0;p<s;p++)for(var _=0;_<a;_++)for(var m=0;m<l;m++,f++){var $=n+_*(e/(a-1)),g=r+p*(t/(s-1)),y=o+m*(i/l);c[3*f]=$,c[3*f+1]=g,c[3*f+2]=y,h[3*f]=$,h[3*f+1]=g,h[3*f+2]=y;var v=(this._lifeRange[1]-this._lifeRange[0])*Math.random()+this._lifeRange[0];d[2*f]=0,d[2*f+1]=v}var x=[];return x.push({index:0,componentsPerAttribute:3,data:c}),x.push({index:1,componentsPerAttribute:3,data:h}),x.push({index:2,componentsPerAttribute:2,data:d}),x},g$9.prototype._createGlobalTextureVertexAttributes=function(){for(var e=n$1d.toDegrees(this._dataBounds.width),t=n$1d.toDegrees(this._dataBounds.height),i=this._zBounds.y-this._zBounds.x,n=n$1d.toDegrees(this._dataBounds.west),r=n$1d.toDegrees(this._dataBounds.south),o=this._zBounds.x,a=Math.ceil(this._paricleCountPerDegree*t),s=Math.ceil(this._paricleCountPerDegree*e),l=Math.ceil(this._paricleCountPerDegree*i),u=a*s*l*4,c=new Uint32Array(u/4*6),h=new Float32Array(2*u),d=new Float32Array(3*u),f=new Float32Array(3*u),p=new Float32Array(2*u),_=new Float32Array(2*u),m=0,$=0;$<a;$++)for(var g=0;g<s;g++)for(var y=0;y<l;y++,m++){for(var v=n+g*(e/(s-1)),x=r+$*(t/(a-1)),b=o+y*(i/l),S=new a$11.fromDegrees(v,x,b),w=0;w<12;w+=3)d[12*m+w]=S.x,d[12*m+w+1]=S.y,d[12*m+ +w+2]=S.z;for(w=0;w<12;w+=3)f[12*m+w]=S.x,f[12*m+w+1]=S.y,f[12*m+ +w+2]=S.z;for(w=0;w<8;w+=2)p[8*m+w]=n$1d.toRadians(v),p[8*m+w+1]=n$1d.toRadians(x);var C=(this._lifeRange[1]-this._lifeRange[0])*Math.random()+this._lifeRange[0];_[8*m]=0,_[8*m+1]=C,_[8*m+2]=0,_[8*m+3]=C,_[8*m+4]=0,_[8*m+5]=C,_[8*m+6]=0,_[8*m+7]=C}for(g=0;g<c.length;g++)c[6*g]=4*g,c[6*g+1]=4*g+1,c[6*g+2]=4*g+2,c[6*g+3]=4*g,c[6*g+4]=4*g+2,c[6*g+5]=4*g+3;this._fieldDataIndices=c;for(m=0,y=0;y<h.length;y+=8,m++)h[8*m]=0,h[8*m+1]=0,h[8*m+2]=0,h[8*m+3]=1,h[8*m+4]=1,h[8*m+5]=1,h[8*m+6]=1,h[8*m+7]=0;var T=[];return T.push({index:0,componentsPerAttribute:3,data:d}),T.push({index:1,componentsPerAttribute:3,data:f}),T.push({index:2,componentsPerAttribute:2,data:p}),T.push({index:3,componentsPerAttribute:2,data:_}),T.push({index:4,componentsPerAttribute:2,data:h}),T},g$9.prototype._createLocalTextureVertexAttributes=function(){for(var e=this._dataBounds.width,t=this._dataBounds.height,i=this._zBounds.y-this._zBounds.x,n=this._dataBounds.west,r=this._dataBounds.south,o=this._zBounds.x,a=Math.ceil(this._paricleCountPerDegree*e),s=Math.ceil(this._paricleCountPerDegree*t),l=Math.ceil(this._paricleCountPerDegree*i),u=s*a*l*4,c=new Uint32Array(u/4*6),h=new Float32Array(2*u),d=new Float32Array(3*u),f=new Float32Array(3*u),p=new Float32Array(2*u),_=0,m=0;m<s;m++)for(var $=0;$<a;$++)for(var g=0;g<l;g++,_++){for(var y=n+$*(e/(a-1)),v=r+m*(t/(s-1)),x=o+g*(i/l),b=0;b<12;b+=3)d[12*_+b]=y,d[12*_+b+1]=v,d[12*_+ +b+2]=x;for(b=0;b<12;b+=3)f[12*_+b]=y,f[12*_+b+1]=v,f[12*_+ +b+2]=x;var S=(this._lifeRange[1]-this._lifeRange[0])*Math.random()+this._lifeRange[0];p[8*_]=0,p[8*_+1]=S,p[8*_+2]=0,p[8*_+3]=S,p[8*_+4]=0,p[8*_+5]=S,p[8*_+6]=0,p[8*_+7]=S}for($=0;$<c.length;$++)c[6*$]=4*$,c[6*$+1]=4*$+1,c[6*$+2]=4*$+2,c[6*$+3]=4*$,c[6*$+4]=4*$+2,c[6*$+5]=4*$+3;this._fieldDataIndices=c;for(_=0,g=0;g<h.length;g+=8,_++)h[8*_]=0,h[8*_+1]=0,h[8*_+2]=0,h[8*_+3]=1,h[8*_+4]=1,h[8*_+5]=1,h[8*_+6]=1,h[8*_+7]=0;var w=[];return w.push({index:0,componentsPerAttribute:3,data:d}),w.push({index:1,componentsPerAttribute:3,data:f}),w.push({index:2,componentsPerAttribute:2,data:p}),w.push({index:3,componentsPerAttribute:2,data:h}),w},g$9.prototype._computeTotalParticleCount=function(){if(this._sceneMode!==b$1d.SCENE3D){var e=this._dataBounds.width,t=this._dataBounds.height,i=this._zBounds.y-this._zBounds.x;return Math.ceil(this._paricleCountPerDegree*e)*Math.ceil(this._paricleCountPerDegree*t)*Math.ceil(this._paricleCountPerDegree*i)}e=n$1d.toDegrees(this._dataBounds.width),t=n$1d.toDegrees(this._dataBounds.height),i=this._zBounds.y-this._zBounds.x;return Math.ceil(this._paricleCountPerDegree*e)*Math.ceil(this._paricleCountPerDegree*t)*Math.ceil(this._paricleCountPerDegree*i)};var B$9=new a$10;function i$f(e){n$1e.defined("context",e),this._context=e,this._fieldData=void 0,this._NetCDFData=void 0,this._NetCDFInfo=void 0,this._NetCDFBuffer=void 0,this._layerBounds=s$1p.MAX_VALUE,this._visible=!0,this._type="FieldLayer3D",this._particleVelocityFieldEffect=new g$9(e)}g$9.prototype._createFeedbackShaderUniformMap=function(){var e=this;return{velocityTexture:function(){return e._vectorFieldTexture},velocityScale:function(){return e._velocityScale},velocityTexRes:function(){return e._velocityTexRes},deltaTime:function(){return e._deltaTime},uXYBounds:function(){return B$9.x=e._dataBounds.west,B$9.y=e._dataBounds.south,B$9.z=e._dataBounds.east,B$9.w=e._dataBounds.north,B$9},uZBounds:function(){return e._zBounds},uTextureDepth:function(){return e._texZDepth},lonlatRange:function(){return e.lonlatRange}}},g$9.prototype._createNormalShaderUniformMap=function(){var e=this;return{particleColor:function(){return e._particleColor},pointSize:function(){return e._particleSize},uMaxFilterValue:function(){return e._MaxFilterValue},uMinFilterValue:function(){return e._MinFilterValue},uFieldTexture:function(){return t$$(e._fieldTexture)?e._fieldTexture:new P$S({context:e._context,width:1,height:1})},uFieldTextureSize:function(){return e._fieldTextureSize},velocityTexture:function(){return e._vectorFieldTexture},colorTable:function(){return e._hypsometricTexture},lonlatRange:function(){return e.lonlatRange},uFloor:function(){return e._floor},uCeil:function(){return e._ceiling},uHasColorTable:function(){return e._hasColorTable},velocityScale:function(){return e._velocityScale},deltaTime:function(){return e._deltaTime},uXYBounds:function(){return B$9.x=e._dataBounds.west,B$9.y=e._dataBounds.south,B$9.z=e._dataBounds.east,B$9.w=e._dataBounds.north,B$9},uZBounds:function(){return e._zBounds},uTextureDepth:function(){return e._texZDepth}}},g$9.prototype._createVectorFieldTexture=function(e,t){t$$(this._vectorFieldTexture)&&this._vectorFieldTexture.destroy();var i,n=0,r=0;if(t instanceof Array&&(n=(i=this._createCanvasFromDataMatrix(t)).width,r=i.height,!i))return!1;this._velocityTexRes.x=n,this._velocityTexRes.y=r,this._vectorFieldTexture=new P$S({context:e,width:n,height:r,pixelFormat:Z$_.RGB,pixelDatatype:v$Z.FLOAT}),this._vectorFieldTexture.copyFrom({width:n,height:r,arrayBufferView:i.imageData})},g$9.prototype._createCanvasFromDataMatrix=function(e){var t=e.length;if(!(e[0]instanceof Array))return null;var i,n,r,o,a,s,l,u=e[0].length;if(!(e[0][0]instanceof Array))return null;if(e[0][0][0]instanceof Array){var c=u,h=t,d=e[0][0].length;for(this._texZDepth=d,s=new Float32Array(h*c*d*3),o=0,i=0;i<c;i++)for(n=0;n<d;n++)for(r=0;r<h;r++){var f=null==(l=e[r][i][n]).x?l[0]:l.x,p=null==l.y?l[1]:l.y,_=null==l.z?l[2]:l.z;s[o++]=f,s[o++]=p,s[o++]=_}a={height:c,width:d*h,imageData:s}}else{for(s=new Float32Array(t*u*3),o=0,n=0;n<t;n++)for(i=0;i<u;i++){var m=null==(l=e[n][i]).x?l[0]:l.x,$=null==l.y?l[1]:l.y;s[o++]=m,s[o++]=$,s[o++]=0}a={height:t,width:u,imageData:s}}return a},g$9.prototype.createParticleTrailsResources=function(e,t){if(this._showParticleTrails&&(!t$$(this._lastParticleStateTexture)||this._lastParticleStateTexture.width!==e.drawingBufferWidth||this._lastParticleStateTexture.height!==e.drawingBufferHeight)){t$$(this._lastParticleStateTexture)&&(this._lastParticleStateTexture.width!==e.drawingBufferWidth||this._lastParticleStateTexture.height!==e.drawingBufferHeight)&&this.destroyParticleTrailsResources();var i=v$Z.UNSIGNED_BYTE;this._hdrEnable&&(i=v$Z.FLOAT),this._curParticleStateTexture=new P$S({context:e,width:e.drawingBufferWidth,height:e.drawingBufferHeight,pixelDatatype:i,pixelFormat:Z$_.RGBA}),this._lastParticleStateTexture=new P$S({context:e,width:e.drawingBufferWidth,height:e.drawingBufferHeight,pixelDatatype:i,pixelFormat:Z$_.RGBA}),this._tmpParticleStateTexture=new P$S({context:e,width:e.drawingBufferWidth,height:e.drawingBufferHeight,pixelDatatype:i,pixelFormat:Z$_.RGBA});var n=e$1Y(this._transformFeedback._framebuffer,t.framebuffer);this._curParticleTextureBuffer=new u$F({context:e,colorTextures:[this._curParticleStateTexture],depthStencilTexture:n._depthStencilTexture,destroyAttachments:!1}),this._lastParticleTextureBuffer=new u$F({context:e,colorTextures:[this._lastParticleStateTexture],destroyAttachments:!1}),this._tmpParticleTextureBuffer=new u$F({context:e,colorTextures:[this._tmpParticleStateTexture],destroyAttachments:!1}),this._clearCommand=new r$M({color:new e$1z(0,0,0,0),renderState:p$1a.fromCache()});var r=this._lastParticleStateTexture,o=this._tmpParticleTextureBuffer;this._copyLastColorCommand=e.createViewportQuadCommand(V$c,{uniformMap:{colorTexture:function(){return r}},framebuffer:o});var a=this._tmpParticleStateTexture,s=this._curParticleStateTexture,l=this._lastParticleTextureBuffer,u=this._fadeOpacity;this._copyColorCommand=e.createViewportQuadCommand(le$8,{uniformMap:{u_lastColorTexture:function(){return a},u_colorTexture:function(){return s},u_opacity:function(){return u}},framebuffer:l})}},g$9.prototype.destroyParticleTrailsResources=function(){t$$(this._curParticleStateTexture)&&(this._curParticleStateTexture.destroy(),this._curParticleStateTexture=void 0),t$$(this._lastParticleStateTexture)&&(this._lastParticleStateTexture.destroy(),this._lastParticleStateTexture=void 0),t$$(this._tmpParticleStateTexture)&&(this._tmpParticleStateTexture.destroy(),this._tmpParticleStateTexture=void 0),t$$(this._curParticleTextureBuffer)&&(this._curParticleTextureBuffer.destroy(),this._curParticleTextureBuffer=void 0),t$$(this._lastParticleTextureBuffer)&&(this._lastParticleTextureBuffer.destroy(),this._lastParticleTextureBuffer=void 0),t$$(this._tmpParticleTextureBuffer)&&(this._tmpParticleTextureBuffer.destroy(),this._tmpParticleTextureBuffer=void 0),this._clearCommand=void 0,this._copyColorCommand=void 0,this._copyLastColorCommand=void 0},g$9.prototype.drawParticleTrails=function(e,t){!this._showParticleTrails||(this.createParticleTrailsResources(e,t),t$$(this._copyLastColorCommand)&&this._copyLastColorCommand.execute(e,t),t$$(this._copyColorCommand)&&this._copyColorCommand.execute(e,t),this._clearCommand.framebuffer=this._curParticleTextureBuffer,this._clearCommand.execute(e,t),this._transformFeedback.beginDraw(e,this._curParticleTextureBuffer,this._transformFeedback,t),this._transformFeedback._drawNormal(e,t))},g$9.prototype.clearLastParticleStateTexture=function(e,t,i,n){if(t$$(t)&&this._hdrEnable!==t)return this._hdrEnable=t,this.destroyParticleTrailsResources(),void this.createParticleTrailsResources(t,i,n);!e._stateChanged||this.clearLastParticleBuffer(i,n)},g$9.prototype.clearLastParticleBuffer=function(e,t){this._clearCommand.framebuffer=this._lastParticleTextureBuffer,this._clearCommand.execute(e,t),this._clearCommand.framebuffer=this._curParticleTextureBuffer,this._clearCommand.execute(e,t),this._clearCommand.framebuffer=this._tmpParticleTextureBuffer,this._clearCommand.execute(e,t)},g$9.prototype.isDestroyed=function(){return!1},g$9.prototype.destroy=function(){return t$$(this._vectorFieldTexture)&&(this._vectorFieldTexture.destroy(),this._vectorFieldTexture=void 0),t$$(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null),t$$(this._hypsometricTexture)&&(this._hypsometricTexture.destroy(),this._hypsometricTexture=null),t$$(this._transformFeedback)&&(this._transformFeedback.destroy(),this._transformFeedback=void 0),t$$(this._fieldTexture)&&(this._fieldTexture.destroy(),this._fieldTexture=void 0),this.destroyParticleTrailsResources(),s$1e(this)},Object.defineProperties(i$f.prototype,{visible:{get:function(){return this._visible},set:function(e){this._visible=e}},type:{get:function(){return this._type}},fieldData:{get:function(){return this._fieldData},set:function(e){this._fieldData=e,t$$(this._particleVelocityFieldEffect)&&this._particleVelocityFieldEffect._setVelocityField(e)}},NetCDFData:{get:function(){return this._NetCDFData},set:function(e){if(!t$$(e.longitude)||!t$$(e.latitude))throw new t$_("coordinates are required.");if(!t$$(e.uwnd)||!t$$(e.vwnd))throw new t$_("uwnd or vwnd is required.");if(e.timeOrder=e$1Y(e.timeOrder,0),t$$(this._NetCDFBuffer)){for(var t=this._NetCDFBuffer,i=t.getDataVariable(e.longitude),n=t.getDataVariable(e.latitude),r=t.getDataVariable(e.uwnd),o=t.getDataVariable(e.vwnd),a=0,s=[],l=0;l<n.length;l++){s[l]=[];for(var u=0;u<i.length;u++,a++){var c=n.length*i.length*e.timeOrder;s[l][u]=[r[a+c],o[a+c]]}}this._NetCDFData=s,t$$(this._particleVelocityFieldEffect)&&this._particleVelocityFieldEffect._setVelocityField(s)}}},NetCDFInfo:{get:function(){return this._NetCDFInfo},set:function(e){this._NetCDFInfo=e}},layerBounds:{get:function(){return this._layerBounds},set:function(e){this._layerBounds=e,t$$(this._particleVelocityFieldEffect)&&this._particleVelocityFieldEffect._setDataBounds(e)}},zBounds:{get:function(){return this._zBounds},set:function(e){this._zBounds=e,t$$(this._particleVelocityFieldEffect)&&this._particleVelocityFieldEffect._setZBounds(e)}},particleVelocityFieldEffect:{get:function(){return this._particleVelocityFieldEffect}}}),i$f.prototype.update=function(e){this._visible?t$$(this._particleVelocityFieldEffect)&&this._particleVelocityFieldEffect.update(e):t$$(this._particleVelocityFieldEffect)&&t$$(this._particleVelocityFieldEffect._transformFeedback)&&this._particleVelocityFieldEffect.clearLastParticleBuffer(this._context,e)},i$f.prototype.isDestroyed=function(){return!1},i$f.prototype.destroy=function(){return t$$(this._particleVelocityFieldEffect)&&(this._particleVelocityFieldEffect.destroy(),this._particleVelocityFieldEffect=void 0),s$1e(this)};var me$5="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\nuniform float uWaterHeight;\nvarying vec2 vNoiseCoord;\nvarying vec3 vProjectionCoord;\nvarying vec3 vEyeDir;\nvarying vec3 vNormal;\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvec4 depthClampFarPlane(vec4 clipPos)\n{\nfWindowZ = (0.5 * (clipPos.z / clipPos.w) + 0.5) * clipPos.w;\nclipPos.z = min(clipPos.z, clipPos.w);\nreturn clipPos;\n}\nvoid initialWaterParam(vec4 oPos)\n{\nfloat uTimeVal = 0.05;\nfloat uScale = 80.0;\nfloat uScroll = 1.0;\nfloat uNoise = 1.0;\nvec2 uBumpSpeed = vec2(3.0 -3.0);\nmat4 scalemat = mat4(0.5, 0.0, 0.0, 0.0,\n0.0, 0.5, 0.0, 0.0,\n0.0, 0.0, 0.5, 0.0,\n0.5, 0.5, 0.5, 1.0);\nvec4 proj = scalemat * oPos;\nvProjectionCoord = proj.xyw;\nvNoiseCoord.xy = aTexCoord0.xy * uScale + uBumpSpeed * uTimeVal;\nvec4 cameraPos = czm_inverseModel * vec4(czm_cameraPositionWC, 1.0);\nvEyeDir = aPosition.xyz - cameraPos.xyz;\nvNormal = vec3(0.0,0.0,1.0);\n}\nvoid main()\n{\nvec4 newPos = vec4(aPosition.xyz, 1.0);\nnewPos.z = newPos.z + uWaterHeight;\nvec4 pos = czm_modelViewProjection * newPos;\ngl_Position = depthClampFarPlane(pos);\nvTexCoord = aTexCoord0.xy;\ninitialWaterParam(pos);\nclip_vertex = czm_modelView * newPos;\n}\n",xe$7="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform sampler2D uPolygonTexture;\nuniform sampler2D uReflectMap;\nuniform sampler2D uNoiseMap;\nvarying vec2 vNoiseCoord;\nvarying vec3 vProjectionCoord;\nvarying vec3 vEyeDir;\nvarying vec3 vNormal;\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvec4 AdjSaturation(in vec4 inputColor, in float saturation)\n{\nvec3 lumCoeff = vec3(0.2125, 0.7154, 0.0721);\nvec3 intensity = vec3(dot(inputColor.rgb, lumCoeff));\nvec3 tempColor = mix(intensity, inputColor.rgb, saturation);\nreturn vec4(tempColor, 1.0);\n}\nvec4 GetWaterColor()\n{\nvec4 uTintColour = vec4(0,0.05,0.05,1);\nvec4 uWaterColour = vec4(0.1804,0.2706,0.3294,1);\nfloat uNoiseScale = 0.05;\nfloat uMinFresnel = 0.3;\nfloat uMaxFresnel = 0.7;\nfloat uFresnelPower = 1.8;\nfloat uWaterBrightness = 0.95;\nvec2 final = vProjectionCoord.xy / vProjectionCoord.z;\nvec3 noiseNormal = (texture2D(uNoiseMap, (vNoiseCoord.xy / 5.0)).rgb - 0.5).rbg * uNoiseScale;\nfinal += noiseNormal.xz;\nfloat realMinFresnel, realMaxFresnel;\nif(uMinFresnel < uMaxFresnel)\n{\nrealMinFresnel = uMinFresnel;\nrealMaxFresnel = uMaxFresnel;\n}\nelse\n{\nrealMinFresnel = uMaxFresnel;\nrealMaxFresnel = uMinFresnel;\n}\nfloat fresnelBias = realMinFresnel;\nfloat fresnelScale = (realMaxFresnel - realMinFresnel) / 1.0;\nfloat fresnel = fresnelBias + fresnelScale * pow(1.0 + dot(normalize(vEyeDir), vNormal), uFresnelPower);\nfresnel = clamp(fresnel, 0.05, 0.95);\nvec4 reflectionColour = texture2D(uReflectMap, final);\nvec4 refractionColour = reflectionColour + uTintColour;\nvec4 resultColour = mix(uWaterColour, reflectionColour, fresnel);\nresultColour = AdjSaturation(resultColour, 1.0);\nresultColour = resultColour * uWaterBrightness;\nresultColour.a = uWaterColour.a;\nreturn resultColour;\n}\nvoid main()\n{\n#if defined(GL_EXT_frag_depth) || defined(WEBGL2)\ngl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\nvec2 texCoord = vTexCoord.xy;\nvec4 waterColor = GetWaterColor();\nvec4 texHeight = texture2D(uPolygonTexture, texCoord.xy);\nif(texHeight.x < 0.5)\n{\ndiscard;\n}\nelse\n{\ngl_FragColor = waterColor;\n}\n}\n",pe$4="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform sampler2D uHeightTexture;\nuniform sampler2D uAssisTexture;\nuniform float uWaterHeight;\nuniform float uTextureWidth;\nuniform float uTextureHeight;\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvoid main()\n{\nfloat dStepX = 1.0 / uTextureWidth;\nfloat dStepY = 1.0 / uTextureHeight;\nvec2 texCoord = vTexCoord;\nvec4 texHeight = texture2D(uHeightTexture, texCoord);\nif(texHeight.r > uWaterHeight || texHeight.r < -90000.0)\n{\ngl_FragColor = vec4(0.0,0.0,0.0,1.0);\nreturn;\n}\nvec4 texCenter = texture2D(uAssisTexture, texCoord);\nif(texCenter.x > 0.5)\n{\ngl_FragColor = vec4(1.0,0.0,0.0,1.0);\nreturn;\n}\nvec4 texRight = texture2D(uAssisTexture, vec2(dStepX + texCoord.x, texCoord.y));\nvec4 texTop = texture2D(uAssisTexture, vec2( texCoord.x, dStepY + texCoord.y));\nvec4 texLeft = texture2D(uAssisTexture, vec2(texCoord.x - dStepX, texCoord.y));\nvec4 texBottom = texture2D(uAssisTexture, vec2(texCoord.x, texCoord.y - dStepY));\nvec4 texLeftBottom = texture2D(uAssisTexture, vec2(texCoord.x - dStepX, texCoord.y - dStepY));\nvec4 texRightBottom = texture2D(uAssisTexture, vec2(texCoord.x + dStepX, texCoord.y - dStepY));\nvec4 texLeftTop = texture2D(uAssisTexture, vec2(texCoord.x - dStepX, texCoord.y + dStepY));\nvec4 texRightTop = texture2D(uAssisTexture, vec2(texCoord.x + dStepX, texCoord.y + dStepY));\nif(texCenter.x < 0.5 && texRight.x < 0.5 && texTop.x < 0.5 && texLeft.x < 0.5 && texBottom.x < 0.5 && texLeftBottom.x < 0.5 && texRightBottom.x < 0.5 && texLeftTop.x < 0.5 && texRightTop.x < 0.5)\n{\ndiscard;\n}\ngl_FragColor = vec4(1.0,0.0,0.0,1.0);\n}\n",e$f={Clamp:0,Absolute:1},k$d=Object.freeze(e$f);function R$b(e){if(!t$$(e))throw new t$_("scene are required.");this._scene=e,this._floodCommand=void 0,this._boundingSphere=new c$19,this._qureyRegion=[],this._waterHeight=0,this._polygonTexture=null,this._floodPosition=[0,0,0],this._worldMatrix=c$1a.IDENTITY.clone(),this._bound=[],this._terrainBlock=void 0,this._terrainBlockURL="",this._points=[],this._datasetInfo=void 0,this._frameState=void 0,this._updateFlagTexture=!1,this._updateHeightTexture=!1,this._name="",this._sceneName="",this._initialize=!1,this._waterMode=k$d.Clamp,this._assistTexture=null,this._heightTexture=null,this._flagCommand=void 0,this._regionGeometry=null,this._textureWidth=1024,this._textureHeight=1024,this._loaded=!1,this._layer=null}function Y$d(e){t$$(e._floodCommand)&&(e._floodCommand.vertexArray=e._floodCommand.vertexArray&&e._floodCommand.vertexArray.destroy(),e._floodCommand.shaderProgram=e._floodCommand.shaderProgram&&e._floodCommand.shaderProgram.destroy(),e._floodCommand=void 0),t$$(e._flagCommand)&&(e._flagCommand.vertexArray=e._flagCommand.vertexArray&&e._flagCommand.vertexArray.destroy(),e._flagCommand.shaderProgram=e._flagCommand.shaderProgram&&e._flagCommand.shaderProgram.destroy(),e._flagCommand=void 0)}function L$f(e){t$$(e._polygonTexture)&&(e._polygonTexture=e._polygonTexture&&e._polygonTexture.destroy(),e._polygonTexture=null),t$$(e._assistTexture)&&(e._assistTexture=e._assistTexture&&e._assistTexture.destroy(),e._assistTexture=null),t$$(e._heightTexture)&&(e._heightTexture=e._heightTexture&&e._heightTexture.destroy(),e._heightTexture=null)}function X$7(e){if(null!==e._polygonTexture&&null!==e._assistTexture){var t=e._textureWidth,i=e._textureHeight,n=0,r=0;if(e._layer==e._scene.globe){var o=(e._bound[2]-e._bound[0])/t,a=(e._bound[3]-e._bound[1])/i,s=e._floodPosition;n=Math.floor((s.x-e._bound[0])/o),r=Math.floor((s.y-e._bound[1])/a)}else{var l=e._regionGeometry.rect,u=(o=(l.z-l.x)/t,a=(l.w-l.y)/i,s=a$11.fromDegrees(e._floodPosition.x,e._floodPosition.y,0),new c$1a);c$1a.inverse(e._worldMatrix,u),c$1a.multiplyByPoint(u,s,s),n=Math.floor((s.x-l.x)/o),r=Math.floor((s.y-l.y)/a)}var c=new Uint8Array(t*i*4);c[4*(r*t+n)]=255,e._polygonTexture.copyFrom({width:t,height:i,arrayBufferView:c});var h=new Uint8Array(t*i*4);h[4*(r*t+n)]=255,e._assistTexture.copyFrom({width:t,height:i,arrayBufferView:h})}}function Te$5(e,t,i){e._initialize||(Z$c(e),e._regionGeometry=ne$3(e),ie$5(e,t),be$4(e,t),ae$5(e,t,e._regionGeometry,e._polygonTexture),$$9(e,e._terrainBlockURL,e._bound),e._initialize=!0),e._updateHeightTexture&&e._loaded&&null!=e._terrainBlock&&null!=e._datasetInfo&&re$6(e),e._updateFlagTexture&&te$6(e,t),t$$(e._floodCommand)&&null!=e._terrainBlock&&null!=e._datasetInfo&&i.push(e._floodCommand)}function ve$4(e,t){e._initialize||(e._initialize=!0,Z$c(e),e._regionGeometry=ne$3(e),ie$5(e,t),Ee$7(e),ae$5(e,t,e._regionGeometry,e._polygonTexture),$$9(e,e._terrainBlockURL,e._bound)),e._updateHeightTexture&&e._loaded&&null!=e._terrainBlock&&null!=e._datasetInfo&&re$6(e),e._updateFlagTexture&&te$6(e,t)}function Z$c(e){Ae$4(e);var t=e._bound[0],i=e._bound[1],n=e._bound[2],r=e._bound[3],o=a$11.fromDegrees(.5*(n+t),.5*(r+i),0),a=new e$1L(0,0,0);m$13.headingPitchRollToFixedFrame(o,a,n$1c.WGS84,m$13.eastNorthUpToFixedFrame,e._worldMatrix)}function Ae$4(e){if(0!==e._points.length){for(var t=Number.MAX_VALUE,i=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=-Number.MAX_VALUE,o=0;o<e._points.length;o++)t=Math.min(e._points[o].x,t),i=Math.min(e._points[o].y,i),n=Math.max(e._points[o].x,n),r=Math.max(e._points[o].y,r);e._bound.length=0,e._bound.push(t),e._bound.push(i),e._bound.push(n),e._bound.push(r)}}function be$4(e,t){if(0!=e._points.length){var i=e._points.length,n=C$12.createTypedArray(C$12.FLOAT,3*i),r=C$12.createTypedArray(C$12.FLOAT,2*i),o=new c$1a;c$1a.inverse(e._worldMatrix,o);for(var a=[],s=0;s<e._qureyRegion.length/3;s++)a[3*s]=e._qureyRegion[3*s],a[3*s+1]=e._qureyRegion[3*s+1],a[3*s+2]=e._qureyRegion[3*s+2];var l=new S$C({polygonHierarchy:{positions:a$11.fromDegreesArrayHeights(a)}}),u=S$C.createGeometry(l);u$U.updateGeometry(u,a,o),e._boundingSphere=u.boundingSphere;for(s=0;s<u.attributes.position.values.length/3;s++)n[3*s]=u.attributes.position.values[3*s],n[3*s+1]=u.attributes.position.values[3*s+1],n[3*s+2]=u.attributes.position.values[3*s+2],r[2*s]=u.attributes.st.values[2*s],r[2*s+1]=u.attributes.st.values[2*s+1];var c=null,h=fe$u.UNSIGNED_SHORT;i<65535?c=C$12.createTypedArray(C$12.UNSIGNED_SHORT,u.indices.length):(c=C$12.createTypedArray(C$12.UNSIGNED_INT,u.indices.length),h=fe$u.UNSIGNED_INT);for(s=0;s<u.indices.length;s++)c[s]=u.indices[s];we$3(e,t,n,r,c,h)}}function we$3(e,t,i,n,r,o){Y$d(e);var a=u$Y.createVertexBuffer({context:t,typedArray:i,usage:A$13.STATIC_DRAW}),s=u$Y.createVertexBuffer({context:t,typedArray:n,usage:A$13.STATIC_DRAW}),l=[],u={aPosition:0,aTexCoord0:1};l.push({index:u.aPosition,vertexBuffer:a,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),l.push({index:u.aTexCoord0,vertexBuffer:s,componentsPerAttribute:2,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var c=u$Y.createIndexBuffer({context:t,typedArray:r,usage:A$13.STATIC_DRAW,indexDatatype:o});e._floodCommand=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:we$l.ANALYSIS,owner:e,cull:!0}),e._floodCommand.vertexArray=new x$18({context:t,attributes:l,indexBuffer:c});var h=new a$O({sources:[me$5]});e._floodCommand.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:h,fragmentShaderSource:xe$7,attributeLocations:u}),e._floodCommand.renderState=p$1a.fromCache({cull:{enabled:!0},depthTest:{enabled:!0}}),e._floodCommand.uniformMap={uWaterHeight:function(){return e._waterHeight},uPolygonTexture:function(){return e._polygonTexture},uReflectMap:function(){return e._frameState._framebufferList.water.renderTexture._fb.getColorTexture(0)},uNoiseMap:function(){return e._frameState._framebufferList.water._waterNormalMap}}}function $$9(e,t,i){""!=t&&4==i.length&&u$_(t+".xml").then((function(n){var r=n.getElementsByTagName("leftBottom"),o=r[0].children[0].textContent,a=r[0].children[1].textContent,s=n.getElementsByTagName("rightTop"),l=s[0].children[0].textContent,u=s[0].children[1].textContent,c=n.getElementsByTagName("height")[0].textContent,h=n.getElementsByTagName("width")[0].textContent;e._datasetInfo={width:h,height:c,left:o,right:l,top:u,bottom:a,xRatio:(l-o)/h,yRatio:(u-a)/c};for(var d=[],f=0;f<e._datasetInfo.width;f++){for(var p=[],_=0;_<e._datasetInfo.height;_++)p.push(-99999);d.push(p)}ee$6(e,t,i,d)}))}function ee$6(e,t,i,n){u$$(t+'/gridValues.json?bounds={"leftBottom":{"x":'+i[0]+',"y":'+i[1]+'},"rightTop":{"x":'+i[2]+',"y":'+i[3]+"}}").then((function(t){for(var i=t.values,r=0;r<i.length;r++)for(var o=i[r],a=0,s=o.length;a<s;a++){var l=o[a];n[l.column][l.row]=l.value}e._terrainBlock=n;var u=(e._floodPosition.x-e._datasetInfo.left)/e._datasetInfo.xRatio,c=(e._datasetInfo.top-e._floodPosition.y)/e._datasetInfo.yRatio;u=Math.ceil(u),c=Math.ceil(c),n[u][c]>-9e4&&(e._loaded=!0),e._updateHeightTexture=!0}),(function(r){if(400==r.statusCode)for(var o=0;o<2;o++)for(var a=(i[2]-i[0])/2,s=i[0]+a*o,l=s+a,u=0;u<2;u++){var c=(i[3]-i[1])/2,h=i[1]+c*u,d=h+c,f=[];f[0]=s,f[1]=h,f[2]=l,f[3]=d,ee$6(e,t,f,n)}}))}function te$6(e,t){if(null!=e._terrainBlock&&null!=e._datasetInfo){e._flagCommand.execute(t);var i=t.readPixels({x:0,y:0,width:e._textureWidth,height:e._textureHeight,framebuffer:e._flagCommand.framebuffer});e._assistTexture.copyFrom({width:e._textureWidth,height:e._textureHeight,arrayBufferView:i})}}function re$6(e,t){if(null!=e._terrainBlock&&null!=e._datasetInfo){var i=new Float32Array(e._textureWidth*e._textureHeight);if(e._layer==e._scene.globe)for(var n=(e._bound[2]-e._bound[0])/e._textureWidth,r=(e._bound[3]-e._bound[1])/e._textureHeight,o=0;o<e._textureWidth;o++)for(var a=e._bound[0]+n*o,s=0;s<e._textureHeight;s++){-99999!=(f=W$a(e,a,e._bound[1]+r*s))&&(i[s*e._textureWidth+o]=f,e._minHeight=Math.min(f,e._minHeight))}else{var l=e._regionGeometry.rect,u=(l.z-l.x)/e._textureWidth,c=(l.w-l.y)/e._textureHeight;for(o=0;o<e._textureWidth;o++){var h=l.x+u*o;for(s=0;s<e._textureHeight;s++){var d=new a$11(h,l.y+c*s,0);c$1a.multiplyByPoint(e._worldMatrix,d,d);var f,p=Cesium.Cartographic.fromCartesian(d);-99999!=(f=W$a(e,Cesium.Math.toDegrees(p.longitude),Cesium.Math.toDegrees(p.latitude)))&&(i[s*e._textureWidth+o]=f,e._minHeight=Math.min(f,e._minHeight))}}}e._heightTexture.copyFrom({width:e._textureWidth,height:e._textureHeight,arrayBufferView:i}),e._updateFlagTexture=!0,e._updateHeightTexture=!1}}function W$a(e,t,i){if(t<e._datasetInfo.left||t>e._datasetInfo.right||i<e._datasetInfo.bottom||i>e._datasetInfo.top)return-99999;var n=(t-e._datasetInfo.left)/e._datasetInfo.xRatio,r=(e._datasetInfo.top-i)/e._datasetInfo.yRatio;return n=Math.ceil(n),r=Math.ceil(r),e._terrainBlock[n][r]}function ie$5(e,t){var i=e._textureWidth,n=e._textureHeight;L$f(e),null===e._polygonTexture&&(e._polygonTexture=new P$S({context:t,width:e._textureWidth,height:e._textureHeight,pixelFormat:Z$_.RGBA,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST}),flipY:!1})),null===e._assistTexture&&(e._assistTexture=new P$S({context:t,width:i,height:n,pixelFormat:Z$_.RGBA,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST}),flipY:!1})),X$7(e),null===e._heightTexture&&(e._heightTexture=new P$S({context:t,width:i,height:n,pixelFormat:Z$_.LUMINANCE,pixelDatatype:v$Z.FLOAT,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.LINEAR,magnificationFilter:et$k.LINEAR}),flipY:!1}))}function ne$3(e,t){for(var i=[],n=0;n<e._qureyRegion.length/3;n++)i[3*n]=e._qureyRegion[3*n],i[3*n+1]=e._qureyRegion[3*n+1],i[3*n+2]=e._qureyRegion[3*n+2];var r=new S$C({polygonHierarchy:{positions:a$11.fromDegreesArrayHeights(i)}}),o=0,a=S$C.createGeometry(r),s=a.attributes.position.values;C$12.createTypedArray(C$12.FLOAT,s.length);var l=C$12.createTypedArray(C$12.FLOAT,s.length/3*2),u=new a$10(e._bound[0]*n$1d.RADIANS_PER_DEGREE,e._bound[1]*n$1d.RADIANS_PER_DEGREE,e._bound[2]*n$1d.RADIANS_PER_DEGREE,e._bound[3]*n$1d.RADIANS_PER_DEGREE);if(e._layer==e._scene.globe){var c=e._bound[2]-e._bound[0],h=e._bound[3]-e._bound[1];for(n=0;n<s.length;n+=3){var d=new a$11(s[n],s[n+1],s[n+2]),f=Cesium.Cartographic.fromCartesian(d),p=Cesium.Math.toDegrees(f.longitude),_=Cesium.Math.toDegrees(f.latitude);l[o++]=(p-e._bound[0])/c,l[o++]=(_-e._bound[1])/h}var m=new c$1a;c$1a.inverse(e._worldMatrix,m),u$U.updateGeometry(a,i,m)}else{m=new c$1a;c$1a.inverse(e._worldMatrix,m),u$U.updateGeometry(a,i,m);for(c=(u=u$U.updateGeoBounds(a)).z-u.x,h=u.w-u.y,n=0;n<s.length;n+=3)l[o++]=(s[n]-u.x)/c,l[o++]=(s[n+1]-u.y)/h}return{vertices:a.attributes.position.values,texcoords:l,indices:a.indices,rect:u}}function ae$5(e,t,i,n){if(t$$(i)){var r=new s$1d({primitiveType:H$11.TRIANGLES}),o=u$Y.createVertexBuffer({context:t,typedArray:i.vertices,usage:A$13.STATIC_DRAW}),a=u$Y.createVertexBuffer({context:t,typedArray:i.texcoords,usage:A$13.STATIC_DRAW}),s=[],l={aPosition:0,aTexCoord0:1};s.push({index:l.aPosition,vertexBuffer:o,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),s.push({index:l.aTexCoord0,vertexBuffer:a,componentsPerAttribute:2,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var u=u$Y.createIndexBuffer({context:t,typedArray:i.indices,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT});r.vertexArray=new x$18({context:t,attributes:s,indexBuffer:u});var c=new a$O({sources:["attribute vec4 position;\nattribute vec4 aTexCoord0;\nvarying vec2 vTexCoord;\nvoid main()\n{\n vTexCoord = vec2(aTexCoord0.xy);\n vec2 vPos = aTexCoord0.xy * 2.0 - 1.0;\n gl_Position = vec4(vPos, 0.1, 1.0);\n}\n"]}),h=new a$O({sources:[pe$4]});r.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:c,fragmentShaderSource:h,attributeLocations:l}),r.framebuffer=new u$F({context:t,colorTextures:[n],destroyAttachments:!1}),r.renderState=p$1a.fromCache({cull:{enabled:!1}}),r.uniformMap={uTextureWidth:function(){return e._textureWidth},uTextureHeight:function(){return e._textureHeight},uWaterHeight:function(){return e._waterHeight},uHeightTexture:function(){return e._heightTexture},uAssisTexture:function(){return e._assistTexture}},e._flagCommand=r}}function ue$4(e){e._loaded=!1,e._initialize=!1,e._updateFlagTexture=!1,e._updateHeightTexture=!1}function Ee$7(e){var t=new a$10(e._bound[0]*n$1d.RADIANS_PER_DEGREE,e._bound[1]*n$1d.RADIANS_PER_DEGREE,e._bound[2]*n$1d.RADIANS_PER_DEGREE,e._bound[3]*n$1d.RADIANS_PER_DEGREE);e._layer!==e._scene.globe&&(t=e._regionGeometry.rect),e._layer._setFloodTexture(e._polygonTexture,t,e._worldMatrix)}function Re$4(e){e._layer._removeFloodTexture()}function d$f(){this.enabled=!0,this.density=2e-4,this.screenSpaceErrorFactor=2,this.minimumBrightness=.03}Object.defineProperties(R$b.prototype,{floodPosition:{get:function(){return this._floodPosition},set:function(e){this._floodPosition=e,this._updateFlagTexture=!0,X$7(this)}},waterHeight:{get:function(){return this._waterHeight},set:function(e){this._waterHeight=e,this._updateFlagTexture=!0,X$7(this)}},waterMode:{get:function(){return this._waterMode},set:function(e){this._waterMode=e,this._updateFlagTexture=!0}},layer:{get:function(){return this._layer},set:function(e){this._layer=e,Y$d(this),L$f(this),ue$4(this)}}}),R$b.prototype.destroy=function(){return this._scene._analyst3D.remove(this._name,!0),null!==this._scene&&this._waterMode===k$d.Clamp&&Re$4(this),Y$d(this),L$f(this),s$1e(this)},R$b.prototype.build=function(){""===this._name&&(this._name="floodAnalysis3D"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_scene",this._cameraName=this._name+"_camera",this._scene._analyst3D.add(this))},R$b.prototype.qureyRegion=function(e){if(!t$$(e)||!t$$(e.position))throw new t$_("the options is required");this._qureyRegion=e.position,this._points.length=0;for(var t=this._qureyRegion.length/3,i=0;i<t;i++){var n=new a$11(this._qureyRegion[3*i],this._qureyRegion[3*i+1],this._qureyRegion[3*i+2]);this._points.push(n)}ue$4(this)},R$b.prototype.terrainURL=function(e){this._terrainBlockURL=e},R$b.prototype.update=function(e,t,i){this._frameState=t,this._textureWidth=e.drawingBufferWidth,this._textureHeight=e.drawingBufferHeight,this._waterMode===k$d.Absolute?Te$5(this,e,i):ve$4(this,e)};for(var s$e=[359.393,800.749,1275.6501,2151.1192,3141.7763,4777.5198,6281.2493,12364.307,15900.765,49889.0549,78026.8259,99260.7344,120036.3873,151011.0158,156091.1953,203849.3112,274866.9803,319916.3149,493552.0528,628733.5874],i$e=[2e-5,2e-4,1e-4,7e-5,5e-5,4e-5,3e-5,19e-6,1e-5,85e-7,62e-7,58e-7,53e-7,52e-7,51e-7,42e-7,4e-6,34e-7,26e-7,22e-7],l$c=0;l$c<i$e.length;++l$c)i$e[l$c]*=1e6;for(var v$c=i$e[1],p$g=i$e[i$e.length-1],f$i=0;f$i<i$e.length;++f$i)i$e[f$i]=(i$e[f$i]-p$g)/(v$c-p$g);var e$e=0;function F$a(e){var t,i=s$e,n=i.length;if(e<i[0])return e$e=0;if(e>i[n-1])return e$e=n-2;if(e>=i[e$e]){if(e$e+1<n&&e<i[e$e+1])return e$e;if(e$e+2<n&&e<i[e$e+2])return++e$e}else if(e$e-1>=0&&e>=i[e$e-1])return--e$e;for(t=0;t<n-2&&!(e>=i[t]&&e<i[t+1]);++t);return e$e=t}var M$f=new a$11;function i$d(e){if(!t$$(e)||!t$$(e.scene))throw new t$_("options.scene is required.");this._scene=e.scene,this.samplingWindow=e$1Y(e.samplingWindow,i$d.defaultSettings.samplingWindow),this.quietPeriod=e$1Y(e.quietPeriod,i$d.defaultSettings.quietPeriod),this.warmupPeriod=e$1Y(e.warmupPeriod,i$d.defaultSettings.warmupPeriod),this.minimumFrameRateDuringWarmup=e$1Y(e.minimumFrameRateDuringWarmup,i$d.defaultSettings.minimumFrameRateDuringWarmup),this.minimumFrameRateAfterWarmup=e$1Y(e.minimumFrameRateAfterWarmup,i$d.defaultSettings.minimumFrameRateAfterWarmup),this._lowFrameRate=new o$15,this._nominalFrameRate=new o$15,this._frameTimes=[],this._needsQuietPeriod=!0,this._quietPeriodEndTime=0,this._warmupPeriodEndTime=0,this._frameRateIsLow=!1,this._lastFramesPerSecond=void 0,this._pauseCount=0;var t=this;this._preUpdateRemoveListener=this._scene.preUpdate.addEventListener((function(e,i){h$e(t)})),this._hiddenPropertyName=void 0!==document.hidden?"hidden":void 0!==document.mozHidden?"mozHidden":void 0!==document.msHidden?"msHidden":void 0!==document.webkitHidden?"webkitHidden":void 0;var i=void 0!==document.hidden?"visibilitychange":void 0!==document.mozHidden?"mozvisibilitychange":void 0!==document.msHidden?"msvisibilitychange":void 0!==document.webkitHidden?"webkitvisibilitychange":void 0;function n(){c$e(t)}this._visibilityChangeRemoveListener=void 0,t$$(i)&&(document.addEventListener(i,n,!1),this._visibilityChangeRemoveListener=function(){document.removeEventListener(i,n,!1)})}function h$e(e,t){if(!(e._pauseCount>0)){var i=yt$9();if(e._needsQuietPeriod)e._needsQuietPeriod=!1,e._frameTimes.length=0,e._quietPeriodEndTime=i+e.quietPeriod/h$1a.SECONDS_PER_MILLISECOND,e._warmupPeriodEndTime=e._quietPeriodEndTime+(e.warmupPeriod+e.samplingWindow)/h$1a.SECONDS_PER_MILLISECOND;else if(i>=e._quietPeriodEndTime){e._frameTimes.push(i);var n=i-e.samplingWindow/h$1a.SECONDS_PER_MILLISECOND;if(e._frameTimes.length>=2&&e._frameTimes[0]<=n){for(;e._frameTimes.length>=2&&e._frameTimes[1]<n;)e._frameTimes.shift();var r=(i-e._frameTimes[0])/(e._frameTimes.length-1);e._lastFramesPerSecond=1e3/r,r>1e3/(i>e._warmupPeriodEndTime?e.minimumFrameRateAfterWarmup:e.minimumFrameRateDuringWarmup)?e._frameRateIsLow||(e._frameRateIsLow=!0,e._needsQuietPeriod=!0,e.lowFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond)):e._frameRateIsLow&&(e._frameRateIsLow=!1,e._needsQuietPeriod=!0,e.nominalFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond))}}}}function c$e(e){document[e._hiddenPropertyName]?e.pause():e.unpause()}function h$d(e,t,i){this.context=e,this.commandList=[],this.commandListRealtimeRaster=[],this.shadowMaps=[],this.brdfLutGenerator=void 0,this.environmentMap=void 0,this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this.specularEnvironmentMapsMaximumLOD=void 0,this.mode=b$1d.SCENE3D,this.morphTime=b$1d.getMorphTime(b$1d.SCENE3D),this.frameNumber=0,this.newFrame=!1,this.time=void 0,this.jobScheduler=i,this.mapProjection=void 0,this.camera=void 0,this.cullingVolume=void 0,this.occluder=void 0,this.maximumScreenSpaceError=void 0,this.pixelRatio=1,this.passes={render:!1,pick:!1,depth:!1,postProcess:!1,offscreen:!1,asynchronous:!1,fbo:!1,normal:!1},this.creditDisplay=t,this.afterRender=[],this.scene3DOnly=!1,this.fog={enabled:!1,density:void 0,sse:void 0,minimumBrightness:void 0},this.terrainExaggeration=1,this._framebufferList=[],this.shadowState={shadowsEnabled:!0,lightShadowsEnabled:!0,shadowMaps:[],lightShadowMaps:[],nearPlane:1,farPlane:5e3,closestObjectSize:1e3,lastDirtyTime:0,outOfView:!0},this.imagerySplitPosition=new r$T,this.globeSplitPosition=new r$T,this.frustumSplits=[],this.backgroundColor=void 0,this.sunColor=void 0,this.minimumDisableDepthTestDistance=void 0,this.invertClassification=!1,this.invertClassificationColor=void 0,this.useLogDepth=!1,this._fboState={name:"normal",enabled:!1,frameBufferType:B$y.NORMAL},this.useType=0,this.frustumIndex=0,this.multiViewportIndex=-1,this.globeBottomLevel=0,this.minTerrainHeight=0,this.maxTerrainHeight=0,this.TAAEnable=!1,this.rasterLineWidth=1,this.pickIDColor=new e$1z,this.tilesetPassState=void 0,this.requests=[],this.updateRoArr=[],this.rasterPerFrame=!1,this.pbrMaterialsArr=[]}function i$c(e,t){this.near=e$1Y(e,0),this.far=e$1Y(t,0);for(var i=we$l.NUMBER_OF_PASSES,n=new Array(i),r=new Array(i),o=0;o<i;++o)n[o]=[],r[o]=0;this.commands=n,this.indices=r}d$f.prototype.update=function(e){if(e.fog.enabled=this.enabled){var t=e.camera,i=t.positionCartographic;if(!t$$(i)||i.height>8e5||e.mode!==b$1d.SCENE3D)return void(e.fog.enabled=!1);var n=i.height,r=F$a(n),o=n$1d.clamp((n-s$e[r])/(s$e[r+1]-s$e[r]),0,1),a=n$1d.lerp(i$e[r],i$e[r+1],o),s=1e6*this.density;a=a*(s-s/v$c*p$g)*1e-6;var l=a$11.normalize(t.positionWC,M$f);a*=1-Math.abs(a$11.dot(t.directionWC,l)),e.fog.density=a,e.fog.sse=this.screenSpaceErrorFactor,e.fog.minimumBrightness=this.minimumBrightness}},i$d.defaultSettings={samplingWindow:5,quietPeriod:2,warmupPeriod:5,minimumFrameRateDuringWarmup:4,minimumFrameRateAfterWarmup:8},i$d.fromScene=function(e){if(!t$$(e))throw new t$_("scene is required.");return(!t$$(e._frameRateMonitor)||e._frameRateMonitor.isDestroyed())&&(e._frameRateMonitor=new i$d({scene:e})),e._frameRateMonitor},Object.defineProperties(i$d.prototype,{scene:{get:function(){return this._scene}},lowFrameRate:{get:function(){return this._lowFrameRate}},nominalFrameRate:{get:function(){return this._nominalFrameRate}},lastFramesPerSecond:{get:function(){return this._lastFramesPerSecond}}}),i$d.prototype.pause=function(){++this._pauseCount,1===this._pauseCount&&(this._frameTimes.length=0,this._lastFramesPerSecond=void 0)},i$d.prototype.unpause=function(){--this._pauseCount,this._pauseCount<=0&&(this._pauseCount=0,this._needsQuietPeriod=!0)},i$d.prototype.isDestroyed=function(){return!1},i$d.prototype.destroy=function(){return this._preUpdateRemoveListener(),t$$(this._visibilityChangeRemoveListener)&&this._visibilityChangeRemoveListener(),s$1e(this)};var Ee$6="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nuniform vec4 u_initialColor;\nuniform float u_GlobeAlpha;\nuniform vec3 u_sunLightColor;\nuniform vec3 u_ambientLightColor;\nuniform vec4 uSlopeArrowsColor;\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n#if GRIDTEXTURE_UNITS > 0\nuniform sampler2D u_gridTextures[GRIDTEXTURE_UNITS];\nuniform vec4 u_gridTextureTranslationAndScale[GRIDTEXTURE_UNITS];\nuniform bool u_gridTextureUseWebMercatorT[GRIDTEXTURE_UNITS];\nuniform vec4 u_gridTextureTexCoordsRectangle[GRIDTEXTURE_UNITS];\n#endif\n#if TEXTURE_UNITS > 0\nuniform sampler2D u_dayTextures[TEXTURE_UNITS];\nuniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];\nuniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];\nuniform bool u_dayTextureFlipY[TEXTURE_UNITS];\nuniform vec4 u_transparentBackColor[TEXTURE_UNITS];\nuniform bool u_imageryClipEnable[TEXTURE_UNITS];\n#ifdef APPLY_ALPHA\nuniform float u_dayTextureAlpha[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_SPLIT\nuniform vec2 u_dayTextureSplit[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_SWIPE\nuniform vec4 u_dayTextureSwipeRegion[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_GLOBESPLIT\nuniform vec2 u_GlobeSplitDirection;\n#endif\n#ifdef APPLY_GLOBESWIPE\nuniform vec4 u_GlobeSwipeRegion;\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(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))\nuniform float u_minimumBrightness;\n#endif\n#ifdef COLOR_CORRECT\nuniform vec3 u_hsbShift;\n#endif\n#ifdef SHOW_NORMAL_MAP\nuniform sampler2D u_normalTexture;\nuniform vec4 u_normalTextureTranslationAndScale;\nvarying vec3 vertNorm;\n#endif\n#ifdef SQRESULT\nuniform sampler2D uFrontColorTexture;\nuniform sampler2D uFrontDepthTexture;\nuniform sampler2D uBackDepthTexture;\n#endif\n#ifdef SLOPE_ANALYSIS\nuniform sampler2D uSlopeColorTexture;\nuniform sampler2D uSlopeArrowsTexture;\nuniform sampler2D uSlopePolygonTexture;\nuniform float uSlopeHasColorTable;\nuniform float uSlopeFillMode;\nuniform float uSlopeOpacity;\nuniform float uSlopeFloor;\nuniform float uSlopeCeil;\nuniform float uSlopeMinVisibleValue;\nuniform float uSlopeMaxVisibleValue;\nuniform float uHasSlopeRegion;\nconst float PI = 3.1415926535897932384626;\nvarying vec2 texCoordRotate;\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\nvarying float v_height2;\n#ifdef HYPSOMETRIC_ANALYSIS\nuniform sampler2D uHypsometricTexture;\nuniform sampler2D uHypsometricRenderTexture;\nuniform float uHypHasColorTable;\nuniform float uHypContourFillMode;\nuniform float uHypContourInterval;\nuniform float uHypOpacity;\nuniform float uHypMaxVisibleValue;\nuniform float uHypMinVisibleValue;\nuniform float uHypFloor;\nuniform float uHypCeil;\nuniform vec4 uHypLineColor;\nuniform float uHypHasAnalysisRegion;\n#endif\nuniform vec4 uTileBounds;\n#if defined(Excavate_Region) || defined(Excavate_Outer) || defined(SLOPE_ANALYSIS) || defined(HYPSOMETRIC_REGION)\n#ifndef Apply_ImageryClip\nuniform sampler2D uModifyRasterTexture;\n#endif\n#endif\n#ifdef BRDF\nuniform vec4 uBaseColorFactor;\nuniform float uMetallicFactor;\nuniform float uRoughnessFactor;\n#endif\n#ifdef FLOOD_ANALYSIS\nuniform sampler2D uFloodTexture;\nuniform vec4 uFloodRect;\nvarying vec3 vProjectionCoord;\n#endif\nvec3 colorCorrect(vec3 rgb) {\n#ifdef COLOR_CORRECT\nvec3 hsb = czm_RGBToHSB(rgb);\nhsb.x += u_hsbShift.x;\nhsb.y = clamp(hsb.y + u_hsbShift.y, 0.0, 1.0);\nhsb.z = hsb.z > czm_epsilon7 ? hsb.z + u_hsbShift.z : 0.0;\nrgb = czm_HSBToRGB(hsb);\n#endif\nreturn rgb;\n}\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates);\nvec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float specularMapValue, float fade);\n#ifdef HYPSOMETRIC_ANALYSIS\nfloat computeMixCon()\n{\nfloat distanceToContour;\nif(abs(uHypMaxVisibleValue - uHypMinVisibleValue) > 0.1)\n{\nfloat t = floor(v_height2 / uHypContourInterval);\ndistanceToContour = abs(v_height2 - t * uHypContourInterval - 0.1) ;\n}\nelse\n{\ndistanceToContour = abs(v_height2 - uHypMaxVisibleValue);\n}\nfloat dxc = abs(dFdx(v_height2));\nfloat dyc = abs(dFdy(v_height2));\nfloat dF = max(dxc, dyc);\nreturn (distanceToContour < dF) ? 1.0 : 0.0;\n}\nvec4 computeContourMapColor()\n{\nfloat threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\nfloat contourRate = (v_height2 - uHypFloor) / threshold;\nfloat finalCoord = clamp(contourRate, 0.0, 1.0);\nvec2 contourCoord = vec2(0.0, finalCoord);\nreturn texture2D(uHypsometricTexture, contourCoord).rgba;\n}\n#endif\n#ifdef SLOPE_ANALYSIS\nvec4 ComputeSlopeArrowColor(in float slopeAngle,in vec3 realNormal)\n{\nif (slopeAngle <= PI/180.0)\n{\nreturn vec4(0.0);\n}\nvec2 limitTexCoord = fract(texCoordRotate);\nvec2 slopeDirection = realNormal.xy;\nvec4 arrowsTexColor = vec4(0.0);\nfloat arrowAlpha = 0.0;\nfloat distance = length(slopeDirection);\nfloat acosSlopeDirection = acos(slopeDirection.x/distance);\nfloat slopeArrowsAngle = acosSlopeDirection;\nif(slopeDirection.y<0.0)\n{\nslopeArrowsAngle = 2.0 * PI - acosSlopeDirection;\n}\nvec2 n = vec2(cos(slopeArrowsAngle),-sin(slopeArrowsAngle));\nvec2 t = vec2(sin(slopeArrowsAngle),cos(slopeArrowsAngle));\nmat2 slopeRotateZMatrix = mat2(n,t);\nvec2 transCoord = limitTexCoord - vec2(0.5,0.5);\ntransCoord = slopeRotateZMatrix * transCoord ;\ntransCoord += vec2(0.5,0.5);\ntransCoord = smoothstep(0.0,1.0,transCoord);\narrowsTexColor = texture2D(uSlopeArrowsTexture, transCoord);\narrowAlpha = arrowsTexColor.a;\nfloat xNum = floor(transCoord.x * 64.0);\nfloat yNum = floor(transCoord.y * 64.0);\nif ((xNum<=2.0||xNum>=61.0||yNum<=2.0||yNum>=61.0)&&arrowAlpha<1.0)\n{\narrowAlpha = 0.0;\n}\narrowsTexColor = vec4(arrowsTexColor.rgb,arrowAlpha);\nreturn arrowsTexColor;\n}\n#endif\nvec4 sRGBToLinear( in vec4 value ) {\n#ifndef HDR\nreturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n#else\nreturn value;\n#endif\n}\nvec4 LinearTosRGB( in vec4 value ) {\n#ifndef HDR\nreturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n#else\nreturn value;\n#endif\n}\n#ifdef BRDF\nvec3 SRGBtoLINEAR3(vec3 srgbIn)\n{\nreturn pow(srgbIn, vec3(2.2));\n}\nvec4 SRGBtoLINEAR4(vec4 srgbIn)\n{\nsrgbIn = srgbIn * uBaseColorFactor;\nvec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\nreturn vec4(linearOut, srgbIn.a);\n}\nvec3 LINEARtoSRGB(vec3 linearIn)\n{\n#ifndef HDR\nreturn pow(linearIn, vec3(1.0/2.2));\n#else\nreturn linearIn;\n#endif\n}\nconst float M_PI = 3.141592653589793;\nvec3 lambertianDiffuse(vec3 diffuseColor)\n{\nreturn diffuseColor / M_PI;\n}\nvec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH)\n{\nreturn f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\nfloat smithVisibilityG1(float NdotV, float roughness)\n{\nfloat k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\nreturn NdotV / (NdotV * (1.0 - k) + k);\n}\nfloat smithVisibilityGGX(float roughness, float NdotL, float NdotV)\n{\nreturn smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n}\nfloat GGX(float roughness, float NdotH)\n{\nfloat roughnessSquared = roughness * roughness;\nfloat f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\nreturn roughnessSquared / (M_PI * f * f);\n}\nvec3 applyTonemapping(vec3 linearIn)\n{\n#ifndef HDR\nreturn czm_acesTonemapping(linearIn);\n#else\nreturn linearIn;\n#endif\n}\nvec3 brdf(in vec4 baseColorWithAlpha) {\nbaseColorWithAlpha = SRGBtoLINEAR4(baseColorWithAlpha);\nvec3 ng = normalize(v_normalEC);\nvec3 n = ng;\nvec3 baseColor = baseColorWithAlpha.rgb;\nfloat roughness = uRoughnessFactor;\nfloat metalness = uMetallicFactor;\nvec3 v = -normalize(v_positionEC);\nvec3 lightColorHdr = vec3(5.0);\nvec3 l = normalize(czm_lightDirectionEC);\nvec3 h = normalize(v + l);\nfloat NdotL = clamp(dot(n, l), 0.001, 1.0);\nfloat NdotV = abs(dot(n, v)) + 0.001;\nfloat NdotH = clamp(dot(n, h), 0.0, 1.0);\nfloat LdotH = clamp(dot(l, h), 0.0, 1.0);\nfloat VdotH = clamp(dot(v, h), 0.0, 1.0);\nvec3 f0 = vec3(0.04);\nvec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\nvec3 specularColor = mix(f0, baseColor, metalness);\nfloat alpha = roughness * roughness;\nfloat reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\nvec3 r90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\nvec3 r0 = specularColor.rgb;\nvec3 F = fresnelSchlick2(r0, r90, VdotH);\nfloat G = smithVisibilityGGX(alpha, NdotL, NdotV);\nfloat D = GGX(alpha, NdotH);\nvec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\nvec3 specularContribution = F * G * D / (4.0 * NdotL * NdotV);\nvec3 color = NdotL * lightColorHdr * (diffuseContribution + specularContribution);\n#ifndef IBL\nvec3 positionWC = vec3(czm_inverseView * vec4(v_positionEC, 1.0));\nvec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\nfloat vertexRadius = length(positionWC);\nfloat horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\nfloat reflectionDotNadir = dot(r, normalize(positionWC));\nr.x = -r.x;\nr = -normalize(czm_temeToPseudoFixed * r);\nr.x = -r.x;\nfloat inverseRoughness = 1.04 - roughness;\ninverseRoughness *= inverseRoughness;\nvec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\nfloat atmosphereHeight = 0.05;\nfloat blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\nfloat blendRegionOffset = roughness * -1.0;\nfloat farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\nfloat aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\nfloat farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\nfloat smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\nvec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\nvec3 nadirColor = belowHorizonColor * 0.5;\nvec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\nvec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\nvec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\nvec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\nfloat diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\nfloat diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\nvec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\nfloat notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\nvec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\nspecularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\nspecularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\nfloat LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * l), normalize(positionWC * -1.0)), 0.001, 1.0);\nfloat S = acos(LdotZenith);\nfloat NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\nfloat gamma = acos(NdotL);\nfloat numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(NdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\nfloat denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\nfloat luminance = 0.2 * (numerator / denominator);\nvec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\nvec3 IBLColor = (diffuseIrradiance * diffuseColor * 1.0) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * 1.0);\nfloat maximumComponent = max(max(lightColorHdr.x, lightColorHdr.y), lightColorHdr.z);\nvec3 lightColor = lightColorHdr / max(maximumComponent, 1.0);\nIBLColor *= lightColor;\ncolor += IBLColor * luminance;\n#else\nmat3 fixedToENU = mat3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\nconst mat3 yUpToZUp = mat3(-1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0);\nvec3 cubeDir = normalize(yUpToZUp * fixedToENU * reflect(-v, n));\nvec3 diffuseIrradiance = czm_sphericalHarmonics(cubeDir, czm_sphericalHarmonicCoefficients);\nvec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\nvec3 specularIBL = czm_sampleOctahedralProjection(czm_specularEnvironmentMaps, czm_specularEnvironmentMapSize, cubeDir, roughness * czm_specularEnvironmentMapsMaximumLOD, czm_specularEnvironmentMapsMaximumLOD);\nspecularIBL *= F * brdfLut.x + brdfLut.y;\ncolor += diffuseIrradiance * diffuseColor + specularColor * specularIBL;\n#endif\ncolor = applyTonemapping(color);\ncolor = LINEARtoSRGB(color);\nreturn color;\n}\n#endif\n#ifdef SQRESULT\nfloat computeDepth()\n{\n#ifdef LOG_DEPTH\nreturn log2(v_depthFromNearPlusOne) * czm_oneOverLog2FarDepthFromNearPlusOne;\n#else\nreturn gl_FragCoord.z;\n#endif\n}\nbool isPointInObject(vec2 texCoord)\n{\nbool bIn = false;\nvec4 colorInClipTexture = texture2D(uFrontColorTexture,texCoord.xy);\nif(colorInClipTexture.r > 0.99 && colorInClipTexture.g < 0.01 && colorInClipTexture.b < 0.01)\n{\nfloat depthNear = czm_unpackDepth(texture2D(uFrontDepthTexture, texCoord.xy)) - 0.00001;\nfloat depthFar = czm_unpackDepth(texture2D(uBackDepthTexture, texCoord.xy)) + 0.00001;\nfloat currentDepth = computeDepth();\nif(currentDepth > depthNear && currentDepth < depthFar){\nbIn = true;\n}\n}\nreturn bIn;\n}\n#endif\nvoid main()\n{\n#ifdef APPLY_GLOBESPLIT\nvec2 splitPosition = czm_globeSplitPosition;\nif (u_GlobeSplitDirection.x < 0.0 && gl_FragCoord.x > splitPosition.x) {\ndiscard;\n}\nelse if (u_GlobeSplitDirection.x > 0.0 && gl_FragCoord.x < splitPosition.x) {\ndiscard;\n}\nif(u_GlobeSplitDirection.y < 0.0 && gl_FragCoord.y > splitPosition.y) {\ndiscard;\n}\nelse if(u_GlobeSplitDirection.y > 0.0 && gl_FragCoord.y < splitPosition.y) {\ndiscard;\n}\n#endif\n#ifdef APPLY_GLOBESWIPE\nif (gl_FragCoord.x < u_GlobeSwipeRegion.x || gl_FragCoord.y > u_GlobeSwipeRegion.y) {\ndiscard;\n}\nelse if (gl_FragCoord.x > u_GlobeSwipeRegion.z || gl_FragCoord.y < u_GlobeSwipeRegion.w) {\ndiscard;\n}\n#endif\n#ifdef Excavate_Region\nif(texture2D(uModifyRasterTexture, v_textureCoordinates.xy).w > 0.5)\n{\ndiscard;\n}\n#endif\n#ifdef Excavate_Outer\nif(texture2D(uModifyRasterTexture, v_textureCoordinates.xy).w < 0.1)\n{\ndiscard;\n}\n#endif\n#ifdef SQRESULT\nvec2 texCoord = vec2(gl_FragCoord.x / czm_viewport.z, gl_FragCoord.y / czm_viewport.w);\nif(isPointInObject(texCoord))\n{\ndiscard;\n}\n#endif\n#ifdef TILE_LIMIT_RECTANGLE\nif (v_textureCoordinates.x < u_cartographicLimitRectangle.x || u_cartographicLimitRectangle.z < v_textureCoordinates.x ||\nv_textureCoordinates.y < u_cartographicLimitRectangle.y || u_cartographicLimitRectangle.w < v_textureCoordinates.y)\n{\ndiscard;\n}\n#endif\n#ifdef ENABLE_CLIPPING_PLANES\nfloat clipDistance = clip(gl_FragCoord, u_clippingPlanes, u_clippingPlanesMatrix);\n#endif\nvec4 color = computeDayColor(u_initialColor, clamp(v_textureCoordinates, 0.0, 1.0));\n#ifdef SHOW_TILE_BOUNDARIES\nif (v_textureCoordinates.x < (1.0/256.0) || v_textureCoordinates.x > (255.0/256.0) ||\nv_textureCoordinates.y < (1.0/256.0) || v_textureCoordinates.y > (255.0/256.0))\n{\ncolor = vec4(1.0, 0.0, 0.0, 1.0);\n}\n#endif\n#if defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING) || defined(HDR)\nvec3 normalMC = czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0));\nvec3 normalEC = czm_normal3D * normalMC;\n#endif\n#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)\nfloat cameraDist;\nif (czm_sceneMode == czm_sceneMode2D)\n{\ncameraDist = max(czm_frustumPlanes.x - czm_frustumPlanes.y, czm_frustumPlanes.w - czm_frustumPlanes.z) * 0.5;\n}\nelse if (czm_sceneMode == czm_sceneModeColumbusView)\n{\ncameraDist = -czm_view[3].z;\n}\nelse\n{\ncameraDist = length(czm_view[3]);\n}\nfloat fadeOutDist = u_lightingFadeDistance.x;\nfloat fadeInDist = u_lightingFadeDistance.y;\nif (czm_sceneMode != czm_sceneMode3D) {\nvec3 radii = czm_getWgs84EllipsoidEC().radii;\nfloat maxRadii = max(radii.x, max(radii.y, radii.z));\nfadeOutDist -= maxRadii;\nfadeInDist -= maxRadii;\n}\nfloat fade = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);\n#else\nfloat fade = 0.0;\n#endif\n#ifdef SHOW_REFLECTIVE_OCEAN\nvec2 waterMaskTranslation = u_waterMaskTranslationAndScale.xy;\nvec2 waterMaskScale = u_waterMaskTranslationAndScale.zw;\nvec2 waterMaskTextureCoordinates = v_textureCoordinates.xy * waterMaskScale + waterMaskTranslation;\nwaterMaskTextureCoordinates.y = 1.0 - waterMaskTextureCoordinates.y;\nfloat mask = texture2D(u_waterMask, waterMaskTextureCoordinates).r;\nif (mask > 0.0)\n{\nmat3 enuToEye = czm_eastNorthUpToEyeCoordinates(v_positionMC, normalEC);\nvec2 ellipsoidTextureCoordinates = czm_ellipsoidWgs84TextureCoordinates(normalMC);\nvec2 ellipsoidFlippedTextureCoordinates = czm_ellipsoidWgs84TextureCoordinates(normalMC.zyx);\nvec2 textureCoordinates = mix(ellipsoidTextureCoordinates, ellipsoidFlippedTextureCoordinates, czm_morphTime * smoothstep(0.9, 0.95, normalMC.z));\ncolor = computeWaterColor(v_positionEC, textureCoordinates, enuToEye, color, mask, fade);\n}\n#endif\n#ifdef APPLY_MATERIAL\nczm_materialInput materialInput;\nmaterialInput.st = v_textureCoordinates.st;\nmaterialInput.normalEC = normalize(v_normalEC);\nmaterialInput.slope = v_slope;\nmaterialInput.height = v_height;\nczm_material material = czm_getMaterial(materialInput);\ncolor.xyz = mix(color.xyz, material.diffuse, material.alpha);\n#endif\n#ifdef ENABLE_VERTEX_LIGHTING\nfloat diffuseIntensity = clamp(czm_getLambertDiffuse(czm_sunDirectionEC, normalize(v_normalEC)) * 0.9 + 0.3, 0.0, 1.0);\nvec4 finalColor = vec4(color.rgb * u_sunLightColor.rgb * diffuseIntensity + u_ambientLightColor.rgb * 0.25, color.a);\n#elif defined(SHOW_NORMAL_MAP)\nvec2 normalTextureTranslation = u_normalTextureTranslationAndScale.xy;\nvec2 normalTextureScale = u_normalTextureTranslationAndScale.zw;\nvec2 normalTextureCoordinates = v_textureCoordinates.xy * normalTextureScale + normalTextureTranslation;\nvec3 realNormal = texture2D(u_normalTexture, normalTextureCoordinates.xy).xyz;\nrealNormal = (realNormal - 0.5) * 2.0;\n#ifdef ENABLE_LIGHTING\nvec3 zAxis = normalize(vertNorm);\nvec3 xAxis = normalize(vec3(-vertNorm.y, vertNorm.x, 0));\nvec3 yAxis = normalize(cross(zAxis, xAxis));\nmat3 matrix = mat3(xAxis, yAxis, zAxis);\nvec3 vNormal = czm_normal3D * matrix * realNormal;\nfloat diffuseIntensity = clamp(czm_getLambertDiffuse(czm_sunDirectionEC, normalize(vNormal)) * 0.9 + 0.3, 0.0, 1.0);\nvec4 finalColor = vec4(color.rgb * u_sunLightColor.rgb * diffuseIntensity + u_ambientLightColor.rgb * 0.25, color.a);\n#else\nvec4 finalColor = color;\n#endif\n#elif defined(ENABLE_DAYNIGHT_SHADING)\nfloat diffuseIntensity = clamp(czm_getLambertDiffuse(czm_sunDirectionEC, normalEC) + 0.3, 0.0, 1.0);\nvec4 finalColor = vec4(color.rgb * u_sunLightColor.rgb * diffuseIntensity + u_ambientLightColor.rgb * 0.25, color.a);\n#else\nvec4 finalColor = color;\n#endif\n#ifdef ENABLE_CLIPPING_PLANES\nvec4 clippingPlanesEdgeColor = vec4(1.0);\nclippingPlanesEdgeColor.rgb = u_clippingPlanesEdgeStyle.rgb;\nfloat clippingPlanesEdgeWidth = u_clippingPlanesEdgeStyle.a;\nif (clipDistance < clippingPlanesEdgeWidth)\n{\nfinalColor = clippingPlanesEdgeColor;\n}\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE)\nvec3 fogColor = colorCorrect(v_fogMieColor) + finalColor.rgb * colorCorrect(v_fogRayleighColor);\n#ifndef HDR\nconst float fExposure = 2.0;\nfogColor = vec3(1.0) - exp(-fExposure * fogColor);\n#endif\n#endif\n#if defined(DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN)\nvec3 atmosphereLightDirection = czm_sunDirectionWC;\n#else\nvec3 atmosphereLightDirection = czm_lightDirectionWC;\n#endif\n#ifdef FOG\n#if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))\nfloat darken = clamp(dot(normalize(czm_viewerPositionWC), atmosphereLightDirection), u_minimumBrightness, 1.0);\nfogColor *= darken;\n#endif\n#ifdef HDR\nconst float modifier = 0.15;\nfinalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor, modifier), finalColor.a);\n#else\nfinalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor), finalColor.a);\n#endif\n#endif\n#ifdef HYPSOMETRIC_ANALYSIS\nif(uHypHasColorTable > 0.1)\n{\nbool hasHyp = true;\n#ifdef HYPSOMETRIC_REGION\nif(uHypHasAnalysisRegion > 0.1){\nhasHyp = texture2D(uModifyRasterTexture, v_textureCoordinates.xy).w > 0.5;\n}\n#endif\nif(hasHyp)\n{\nvec4 contourMapColor = vec4(1.0);\nfloat finalOpacity = uHypOpacity;\nif(v_height2 > uHypMaxVisibleValue + 4.0 || v_height2 < uHypMinVisibleValue - 4.0)\n{\nfinalOpacity = 0.5;\n}\nelse\n{\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\nif(uHypContourFillMode > 2.9)\n{\nfloat mix_con = computeMixCon();\ncontourMapColor = mix(computeContourMapColor(), uHypLineColor, mix_con);\n}\nelse if(uHypContourFillMode > 1.9)\n{\nfinalOpacity = computeMixCon();\ncontourMapColor = uHypLineColor;\n}\nelse if(uHypContourFillMode > 0.9)\n#else\nif(uHypContourFillMode > 0.9)\n#endif\n{\ncontourMapColor = computeContourMapColor();\n}\nelse\n{\nfinalOpacity = 0.0;\n}\nfinalColor = mix(finalColor, contourMapColor, finalOpacity);\n}\n}\n}\n#endif\n#ifdef SLOPE_ANALYSIS\nbool hasSlopeRegion = true;\n#ifdef SlopeRegion\nif(uHasSlopeRegion > 0.1){\nhasSlopeRegion = texture2D(uModifyRasterTexture, v_textureCoordinates.xy).w > 0.5;\n}\n#endif\nif(hasSlopeRegion)\n{\nfloat finalOpacity = uSlopeOpacity;\nfloat slopeRate = abs(normalize(realNormal).z);\nfloat slopeAngle = acos(slopeRate);\nif (slopeAngle < uSlopeMinVisibleValue || slopeAngle > uSlopeMaxVisibleValue)\n{\nfinalOpacity = 0.0;\n}\nfloat threshold = clamp(abs(uSlopeCeil-uSlopeFloor),0.0000001,PI/2.0);\nfloat rate = (slopeAngle-uSlopeFloor)/threshold;\nfloat finalRate = clamp(rate,0.0,1.0);\nfloat count = floor(finalRate * 16.0);\nfloat y = (count*2.0 + 1.0)/32.0;\nfloat x = fract(finalRate*16.0);\nif(y > 1.0)\n{\nx = 1.0;\n}\nvec2 slopeCoord = vec2(x, y);\nvec4 slopeFillColor = texture2D(uSlopeColorTexture, slopeCoord);\nvec4 slopeMapColor = vec4(0.0);\nif(uSlopeFillMode > 2.9)\n{\nvec4 arrowsTexColor = ComputeSlopeArrowColor(slopeAngle, realNormal);\nslopeMapColor = mix(slopeFillColor, arrowsTexColor * uSlopeArrowsColor, arrowsTexColor.a);\n}\nelse if(uSlopeFillMode > 1.9)\n{\nvec4 arrowsTexColor = ComputeSlopeArrowColor(slopeAngle, realNormal);\nslopeMapColor = arrowsTexColor * uSlopeArrowsColor;\nfinalOpacity *= arrowsTexColor.a;\n}\nelse if(uSlopeFillMode > 0.9)\n{\nslopeMapColor = slopeFillColor;\n}\nelse\n{\nfinalOpacity = 0.0;\n}\nfinalColor = mix(finalColor, slopeMapColor, finalOpacity);\n}\n#endif\n#ifdef GROUND_ATMOSPHERE\nif (czm_sceneMode != czm_sceneMode3D)\n{\nfinalColor.a *= u_GlobeAlpha;\ngl_FragColor = finalColor;\n#ifdef Height_Map\ngl_FragColor = czm_packValue(v_height2);\n#endif\nreturn;\n}\n#if defined(PER_FRAGMENT_GROUND_ATMOSPHERE) && defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))\nfloat mpp = czm_metersPerPixel(vec4(0.0, 0.0, -czm_currentFrustum.x, 1.0), 1.0);\nvec2 xy = gl_FragCoord.xy / czm_viewport.zw * 2.0 - vec2(1.0);\nxy *= czm_viewport.zw * mpp * 0.5;\nvec3 direction = normalize(vec3(xy, -czm_currentFrustum.x));\nczm_ray ray = czm_ray(vec3(0.0), direction);\nvec3 ellipsoid_center = czm_view[3].xyz;\nczm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);\nvec3 ellipsoidPosition = czm_pointAlongRay(ray, intersection.start);\nellipsoidPosition = (czm_inverseView * vec4(ellipsoidPosition, 1.0)).xyz;\nAtmosphereColor atmosColor = computeGroundAtmosphereFromSpace(ellipsoidPosition, true, atmosphereLightDirection);\nvec3 groundAtmosphereColor = colorCorrect(atmosColor.mie) + finalColor.rgb * colorCorrect(atmosColor.rayleigh);\n#ifndef HDR\ngroundAtmosphereColor = vec3(1.0) - exp(-fExposure * groundAtmosphereColor);\n#endif\nfadeInDist = u_nightFadeDistance.x;\nfadeOutDist = u_nightFadeDistance.y;\nfloat sunlitAtmosphereIntensity = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);\n#ifdef HDR\nsunlitAtmosphereIntensity = max(sunlitAtmosphereIntensity * sunlitAtmosphereIntensity, 0.03);\n#endif\ngroundAtmosphereColor = mix(groundAtmosphereColor, fogColor, sunlitAtmosphereIntensity);\n#else\nvec3 groundAtmosphereColor = fogColor;\n#endif\n#ifdef HDR\ngroundAtmosphereColor = czm_saturation(groundAtmosphereColor, 1.6);\n#endif\nfinalColor = vec4(mix(finalColor.rgb, groundAtmosphereColor, fade), finalColor.a);\n#endif\nfinalColor.a *= u_GlobeAlpha;\nif (finalColor.a == 0.0) {\ndiscard;\n}\ngl_FragColor = finalColor;\n#ifdef BRDF\ngl_FragColor.rgb = brdf(gl_FragColor);\n#endif\n#ifdef Height_Map\ngl_FragColor = czm_packValue(v_height2);\n#endif\n#ifdef FLOOD_ANALYSIS\nfloat bIsFloodColor = 1.0;\nvec2 polyTexCoord = v_textureCoordinates.xy;\npolyTexCoord.x = polyTexCoord.x * (uTileBounds.z - uTileBounds.x) + uTileBounds.x;\npolyTexCoord.y = polyTexCoord.y * (uTileBounds.w - uTileBounds.y) + uTileBounds.y;\nif(polyTexCoord.x>uFloodRect.x && polyTexCoord.x<uFloodRect.z && polyTexCoord.y> uFloodRect.y&& polyTexCoord.y < uFloodRect.w)\n{\npolyTexCoord.xy = polyTexCoord.xy - vec2(uFloodRect.x, uFloodRect.w);\npolyTexCoord.x = polyTexCoord.x / (uFloodRect.z - uFloodRect.x);\npolyTexCoord.y = 1.0-polyTexCoord.y / (uFloodRect.y - uFloodRect.w);\nvec4 floodColor = texture2D(uFloodTexture, polyTexCoord);\nif(floodColor.r > 0.5)\n{\ngl_FragColor = vec4(40.0/255.0,150.0/255.0,200.0/255.0,u_GlobeAlpha);\n}\n}\n#endif\n}\n#ifdef SHOW_REFLECTIVE_OCEAN\nfloat waveFade(float edge0, float edge1, float x)\n{\nfloat y = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\nreturn pow(1.0 - y, 5.0);\n}\nfloat linearFade(float edge0, float edge1, float x)\n{\nreturn clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n}\nconst float oceanFrequencyLowAltitude = 825000.0;\nconst float oceanAnimationSpeedLowAltitude = 0.004;\nconst float oceanOneOverAmplitudeLowAltitude = 1.0 / 2.0;\nconst float oceanSpecularIntensity = 0.5;\nconst float oceanFrequencyHighAltitude = 125000.0;\nconst float oceanAnimationSpeedHighAltitude = 0.008;\nconst float oceanOneOverAmplitudeHighAltitude = 1.0 / 2.0;\nvec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float maskValue, float fade)\n{\nvec3 positionToEyeEC = -positionEyeCoordinates;\nfloat positionToEyeECLength = length(positionToEyeEC);\nvec3 normalizedpositionToEyeEC = normalize(normalize(positionToEyeEC));\nfloat waveIntensity = waveFade(70000.0, 1000000.0, positionToEyeECLength);\n#ifdef SHOW_OCEAN_WAVES\nfloat time = czm_frameNumber * oceanAnimationSpeedHighAltitude;\nvec4 noise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyHighAltitude, time, 0.0);\nvec3 normalTangentSpaceHighAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeHighAltitude);\ntime = czm_frameNumber * oceanAnimationSpeedLowAltitude;\nnoise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyLowAltitude, time, 0.0);\nvec3 normalTangentSpaceLowAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeLowAltitude);\nfloat highAltitudeFade = linearFade(0.0, 60000.0, positionToEyeECLength);\nfloat lowAltitudeFade = 1.0 - linearFade(20000.0, 60000.0, positionToEyeECLength);\nvec3 normalTangentSpace =\n(highAltitudeFade * normalTangentSpaceHighAltitude) +\n(lowAltitudeFade * normalTangentSpaceLowAltitude);\nnormalTangentSpace = normalize(normalTangentSpace);\nnormalTangentSpace.xy *= waveIntensity;\nnormalTangentSpace = normalize(normalTangentSpace);\n#else\nvec3 normalTangentSpace = vec3(0.0, 0.0, 1.0);\n#endif\nvec3 normalEC = enuToEye * normalTangentSpace;\nconst vec3 waveHighlightColor = vec3(0.3, 0.45, 0.6);\nfloat diffuseIntensity = czm_getLambertDiffuse(czm_sunDirectionEC, normalEC) * maskValue;\nvec3 diffuseHighlight = waveHighlightColor * diffuseIntensity * (1.0 - fade);\n#ifdef SHOW_OCEAN_WAVES\nfloat tsPerturbationRatio = normalTangentSpace.z;\nvec3 nonDiffuseHighlight = mix(waveHighlightColor * 5.0 * (1.0 - tsPerturbationRatio), vec3(0.0), diffuseIntensity);\n#else\nvec3 nonDiffuseHighlight = vec3(0.0);\n#endif\nfloat specularIntensity = czm_getSpecular(czm_sunDirectionEC, normalizedpositionToEyeEC, normalEC, 10.0) + 0.25 * czm_getSpecular(czm_moonDirectionEC, normalizedpositionToEyeEC, normalEC, 10.0);\nfloat surfaceReflectance = mix(0.0, mix(u_zoomedOutOceanSpecularIntensity, oceanSpecularIntensity, waveIntensity), maskValue);\nfloat specular = specularIntensity * surfaceReflectance;\n#ifdef HDR\nspecular *= 1.4;\nfloat e = 0.2;\nfloat d = 3.3;\nfloat c = 1.7;\nvec3 color = imageryColor.rgb + (c * (vec3(e) + imageryColor.rgb * d) * (diffuseHighlight + nonDiffuseHighlight + specular));\n#else\nvec3 color = imageryColor.rgb + diffuseHighlight + nonDiffuseHighlight + specular;\n#endif\nreturn vec4(color, imageryColor.a);\n}\n#endif // #ifdef SHOW_REFLECTIVE_OCEAN\n",De$6="#ifdef QUANTIZATION_BITS12\nattribute vec4 compressed0;\nattribute float compressed1;\n#else\nattribute vec4 position3DAndHeight;\nattribute vec4 textureCoordAndEncodedNormals;\n#ifdef APPLY_MODIFY\nattribute vec3 positionModify;\n#endif\n#endif\nuniform vec3 u_center3D;\nuniform mat4 u_modifiedModelView;\nuniform mat4 u_modifiedModelViewProjection;\nuniform vec4 u_tileRectangle;\nuniform vec2 u_southAndNorthLatitude;\nuniform vec2 u_southMercatorYAndOneOverHeight;\nvarying float v_height2;\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_slope;\nvarying float v_height;\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE)\nvarying float v_distance;\nvarying vec3 v_fogMieColor;\nvarying vec3 v_fogRayleighColor;\n#endif\n#ifdef SHOW_NORMAL_MAP\nvarying vec3 vertNorm;\n#endif\n#ifdef BRDF\nuniform sampler2D u_normalTexture;\nuniform vec4 u_normalTextureTranslationAndScale;\n#endif\n#ifdef SLOPE_ANALYSIS\nuniform float uTopLevel;\nuniform float uLevel;\nvarying vec2 texCoordRotate;\n#endif\n#ifdef APPLY_MODIFY\nuniform sampler2D uModifyRasterTexture;\n#endif\nvarying vec4 clip_vertex;\nvec4 getPosition(vec3 position, float height, vec2 textureCoordinates);\nfloat get2DYPositionFraction(vec2 textureCoordinates);\nvec4 getPosition3DMode(vec3 position, float height, vec2 textureCoordinates)\n{\nreturn u_modifiedModelViewProjection * vec4(position, 1.0);\n}\nfloat get2DMercatorYPositionFraction(vec2 textureCoordinates)\n{\nconst float maxTileWidth = 0.003068;\nfloat positionFraction = textureCoordinates.y;\nfloat southLatitude = u_southAndNorthLatitude.x;\nfloat northLatitude = u_southAndNorthLatitude.y;\nif (northLatitude - southLatitude > maxTileWidth)\n{\nfloat southMercatorY = u_southMercatorYAndOneOverHeight.x;\nfloat oneOverMercatorHeight = u_southMercatorYAndOneOverHeight.y;\nfloat currentLatitude = mix(southLatitude, northLatitude, textureCoordinates.y);\ncurrentLatitude = clamp(currentLatitude, -czm_webMercatorMaxLatitude, czm_webMercatorMaxLatitude);\npositionFraction = czm_latitudeToWebMercatorFraction(currentLatitude, southMercatorY, oneOverMercatorHeight);\n}\nreturn positionFraction;\n}\nfloat get2DGeographicYPositionFraction(vec2 textureCoordinates)\n{\nreturn textureCoordinates.y;\n}\nvec4 getPositionPlanarEarth(vec3 position, float height, vec2 textureCoordinates)\n{\nfloat yPositionFraction = get2DYPositionFraction(textureCoordinates);\nvec4 rtcPosition2D = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);\nreturn u_modifiedModelViewProjection * rtcPosition2D;\n}\nvec4 getPosition2DMode(vec3 position, float height, vec2 textureCoordinates)\n{\nreturn getPositionPlanarEarth(position, 0.0, textureCoordinates);\n}\nvec4 getPositionColumbusViewMode(vec3 position, float height, vec2 textureCoordinates)\n{\nreturn getPositionPlanarEarth(position, height, textureCoordinates);\n}\nvec4 getPositionMorphingMode(vec3 position, float height, vec2 textureCoordinates)\n{\nvec3 position3DWC = position + u_center3D;\nfloat yPositionFraction = get2DYPositionFraction(textureCoordinates);\nvec4 position2DWC = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);\nvec4 morphPosition = czm_columbusViewMorph(position2DWC, vec4(position3DWC, 1.0), czm_morphTime);\nreturn czm_modelViewProjection * morphPosition;\n}\n#ifdef QUANTIZATION_BITS12\nuniform vec2 u_minMaxHeight;\nuniform mat4 u_scaleAndBias;\n#endif\nvoid main()\n{\n#ifdef QUANTIZATION_BITS12\nvec2 xy = czm_decompressTextureCoordinates(compressed0.x);\nvec2 zh = czm_decompressTextureCoordinates(compressed0.y);\nvec3 position = vec3(xy, zh.x);\nfloat height = zh.y;\nvec2 textureCoordinates = czm_decompressTextureCoordinates(compressed0.z);\nheight = height * (u_minMaxHeight.y - u_minMaxHeight.x) + u_minMaxHeight.x;\nv_height2 = height;\nposition = (u_scaleAndBias * vec4(position, 1.0)).xyz;\n#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)) && defined(INCLUDE_WEB_MERCATOR_Y)\nfloat webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;\nfloat encodedNormal = compressed1;\n#elif defined(INCLUDE_WEB_MERCATOR_Y)\nfloat webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;\nfloat encodedNormal = 0.0;\n#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)\nfloat webMercatorT = textureCoordinates.y;\nfloat encodedNormal = compressed0.w;\n#else\nfloat webMercatorT = textureCoordinates.y;\nfloat encodedNormal = 0.0;\n#endif\n#else\nvec3 position = position3DAndHeight.xyz;\nfloat height = position3DAndHeight.w;\nv_height2 = height;\nvec2 textureCoordinates = textureCoordAndEncodedNormals.xy;\n#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)) && defined(INCLUDE_WEB_MERCATOR_Y)\nfloat webMercatorT = textureCoordAndEncodedNormals.z;\nfloat encodedNormal = textureCoordAndEncodedNormals.w;\n#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)\nfloat webMercatorT = textureCoordinates.y;\nfloat encodedNormal = textureCoordAndEncodedNormals.z;\n#elif defined(INCLUDE_WEB_MERCATOR_Y)\nfloat webMercatorT = textureCoordAndEncodedNormals.z;\nfloat encodedNormal = 0.0;\n#else\nfloat webMercatorT = textureCoordinates.y;\nfloat encodedNormal = 0.0;\n#endif\n#endif\nvec3 position3DWC = position + u_center3D;\ngl_Position = getPosition(position, height, textureCoordinates);\nv_textureCoordinates = vec3(textureCoordinates, webMercatorT);\n#if defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)\nv_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;\nv_positionMC = position3DWC;\nvec3 normalMC = czm_octDecode(encodedNormal);\nv_normalMC = normalMC;\nv_normalEC = czm_normal3D * v_normalMC;\n#elif defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING) || defined(GENERATE_POSITION) || defined(HDR)\nv_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;\nv_positionMC = position3DWC;\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE)\nAtmosphereColor atmosFogColor = computeGroundAtmosphereFromSpace(position3DWC, false, vec3(0.0));\nv_fogMieColor = atmosFogColor.mie;\nv_fogRayleighColor = atmosFogColor.rayleigh;\nv_distance = length((czm_modelView3D * vec4(position3DWC, 1.0)).xyz);\n#endif\n#ifdef APPLY_MATERIAL\nvec3 finalNormal = normalMC;\nvec3 ellipsoidNormal = normalize(position3DWC.xyz);\nv_slope = abs(dot(ellipsoidNormal, finalNormal));\nv_height = height;\n#endif\nclip_vertex = czm_inverseProjection * gl_Position;\n#ifdef SHOW_NORMAL_MAP\nv_positionEC = (u_modifiedModelView * vec4(position.xyz, 1.0)).xyz;\nvertNorm = normalize(position3DWC);\n#ifdef BRDF\nvec2 normalTextureTranslation = u_normalTextureTranslationAndScale.xy;\nvec2 normalTextureScale = u_normalTextureTranslationAndScale.zw;\nvec2 normalTextureCoordinates = v_textureCoordinates.xy * normalTextureScale + normalTextureTranslation;\nvec3 realNormal = texture2D(u_normalTexture, normalTextureCoordinates.xy).xyz;\nrealNormal = (realNormal - 0.5) * 2.0;\nvec3 zAxis = normalize(vertNorm);\nvec3 xAxis = normalize(vec3(-vertNorm.y, vertNorm.x, 0));\nvec3 yAxis = normalize(cross(zAxis, xAxis));\nmat3 matrix = mat3(xAxis, yAxis, zAxis);\nvec3 vNormal = czm_normal3D * matrix * realNormal;\nv_normalEC = normalize(vNormal);\n#endif\n#endif\n#ifdef SLOPE_ANALYSIS\nfloat levelSpan = min(uLevel - uTopLevel, 2.0);\nfloat arrowTextureScale = pow(2.0,levelSpan);\ntexCoordRotate = v_textureCoordinates.xy * arrowTextureScale;\n#endif\n}\n",se$3="const float fInnerRadius = 6378137.0;\nconst float fOuterRadius = 6378137.0 * 1.025;\nconst float fOuterRadius2 = fOuterRadius * fOuterRadius;\nconst float Kr = 0.0025;\nconst float Km = 0.0015;\nconst float ESun = 15.0;\nconst float fKrESun = Kr * ESun;\nconst float fKmESun = Km * ESun;\nconst float fKr4PI = Kr * 4.0 * czm_pi;\nconst float fKm4PI = Km * 4.0 * czm_pi;\nconst float fScale = 1.0 / (fOuterRadius - fInnerRadius);\nconst float fScaleDepth = 0.25;\nconst float fScaleOverScaleDepth = fScale / fScaleDepth;\nstruct AtmosphereColor\n{\nvec3 mie;\nvec3 rayleigh;\n};\nconst int nSamples = 2;\nconst float fSamples = 2.0;\nfloat scale(float fCos)\n{\nfloat x = 1.0 - fCos;\nreturn fScaleDepth * exp(-0.00287 + x*(0.459 + x*(3.83 + x*(-6.80 + x*5.25))));\n}\nAtmosphereColor computeGroundAtmosphereFromSpace(vec3 v3Pos, bool dynamicLighting, vec3 lightDirectionWC)\n{\nvec3 v3InvWavelength = vec3(1.0 / pow(0.650, 4.0), 1.0 / pow(0.570, 4.0), 1.0 / pow(0.475, 4.0));\nvec3 v3Ray = v3Pos - czm_viewerPositionWC;\nfloat fFar = length(v3Ray);\nv3Ray /= fFar;\nfloat fCameraHeight = length(czm_viewerPositionWC);\nfloat fCameraHeight2 = fCameraHeight * fCameraHeight;\nfloat B = 2.0 * length(czm_viewerPositionWC) * dot(normalize(czm_viewerPositionWC), v3Ray);\nfloat C = fCameraHeight2 - fOuterRadius2;\nfloat fDet = max(0.0, B*B - 4.0 * C);\nfloat fNear = 0.5 * (-B - sqrt(fDet));\nvec3 v3Start = czm_viewerPositionWC + v3Ray * fNear;\nfFar -= fNear;\nfloat fDepth = exp((fInnerRadius - fOuterRadius) / fScaleDepth);\nfloat fLightAngle = czm_branchFreeTernary(dynamicLighting, dot(lightDirectionWC, v3Pos) / length(v3Pos), 1.0);\nfloat fCameraAngle = dot(-v3Ray, v3Pos) / length(v3Pos);\nfloat fCameraScale = scale(fCameraAngle);\nfloat fLightScale = scale(fLightAngle);\nfloat fCameraOffset = fDepth*fCameraScale;\nfloat fTemp = (fLightScale + fCameraScale);\nfloat fSampleLength = fFar / fSamples;\nfloat fScaledLength = fSampleLength * fScale;\nvec3 v3SampleRay = v3Ray * fSampleLength;\nvec3 v3SamplePoint = v3Start + v3SampleRay * 0.5;\nvec3 v3FrontColor = vec3(0.0);\nvec3 v3Attenuate = vec3(0.0);\nfor(int i=0; i<nSamples; i++)\n{\nfloat fHeight = length(v3SamplePoint);\nfloat fDepth = exp(fScaleOverScaleDepth * (fInnerRadius - fHeight));\nfloat fScatter = fDepth*fTemp - fCameraOffset;\nv3Attenuate = exp(-fScatter * (v3InvWavelength * fKr4PI + fKm4PI));\nv3FrontColor += v3Attenuate * (fDepth * fScaledLength);\nv3SamplePoint += v3SampleRay;\n}\nAtmosphereColor color;\ncolor.mie = v3FrontColor * (v3InvWavelength * fKrESun + fKmESun);\ncolor.rayleigh = v3Attenuate;\nreturn color;\n}\n";function Oe$5(e,t,i,n,r,o,a,s){this.numberOfDayTextures=e,this.flags=t,this.material=i,this.shaderProgram=n,this.clippingShaderState=r,this.mvtTextureObj=o,this.numberOfGridTextures=a,this.gridUpdate=s}function b$k(){this.baseVertexShaderSource=void 0,this.baseFragmentShaderSource=void 0,this._shadersByTexturesFlags=[],this.material=void 0}function ye$6(e){var t;switch(e){case b$1d.SCENE3D:t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPosition3DMode(position, height, textureCoordinates); }";break;case b$1d.SCENE2D:case b$1d.COLUMBUS_VIEW:t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionColumbusViewMode(position, height, textureCoordinates); }";break;case b$1d.MORPHING:t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionMorphingMode(position, height, textureCoordinates); }"}return t}function Le$5(e){return e?"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DMercatorYPositionFraction(textureCoordinates); }":"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DGeographicYPositionFraction(textureCoordinates); }"}function le$7(e,t){if(!t$$(e)||!t$$(t))return!1;if(e===t)return!0;if(e.length!=t.length)return!1;for(var i=e.length,n=0;n<i;n++)if(e[n].textureIndex!==t[n].textureIndex||e[n].selectColor!==t[n].selectColor)return!1;return!0}b$k.prototype.getShaderProgram=function(e){var t=e.frameState,i=e.surfaceTile,n=e.numberOfDayTextures,r=e.applyBrightness,o=e.applyContrast,a=e.applyHue,s=e.applySaturation,l=e.applyGamma,u=e.applyAlpha,c=e.applySplit,h=e.applySwipe,d=e.applyGlobeSwipe,f=e.showReflectiveOcean,p=e.showOceanWaves,_=e.enableLighting,m=e.dynamicAtmosphereLighting,$=e.dynamicAtmosphereLightingFromSun,g=e.showGroundAtmosphere,y=e.perFragmentGroundAtmosphere,v=e.hasVertexNormals,x=e.hasRoughness,b=e.useWebMercatorProjection,S=e.enableFog,w=e.enableClippingPlanes,C=e.clippingPlanes,T=e.clippedByBoundaries,P=e.hasImageryLayerCutout,E=e.colorCorrect,A=e.isHeight,L=e.isColor,M=e.hasNormalMap,I=e.hasHypsometricSetting,O=e.hasFlood,D=e.hasSlopeAnalysis,R=e.applyGlobeSplit;e.highlightFillTile,e.colorToAlpha;var N=e.mvtTextureObj,F=e.numberOfGridTextures,B=e.gridUpdate,z=e.applyPolygonOffset,G=e.applyModify,k=e.applyExtract,U=e.excavationRegion,V=e.excavationOuter,W=e.applyImageryClip,H=e.hasHypsometricRegion,Y=e.applySlopeRegion,j=e.excavationGeometry,q=0,X="",K=i.renderedMesh.encoding;K.quantization===me$D.BITS12&&(q=1,X="QUANTIZATION_BITS12");var Z=0,J="";t$$(i.terrainData)&&i.terrainData._createdByUpsampling&&(Z=1,J="DISABLE_GL_POSITION_LOG_DEPTH");var Q=0,ee="";T&&(Q=1,ee="TILE_LIMIT_RECTANGLE");var te=0,ie="";P&&(te=1,ie="APPLY_IMAGERY_CUTOUT");var ne=t.mode,re=ne|r<<2|o<<3|a<<4|s<<5|l<<6|u<<7|f<<8|p<<9|_<<10|g<<11|y<<12|v<<13|b<<14|S<<15|q<<16|c<<17|w<<18|Z<<19|Q<<20|te<<21|E<<22|A<<23|L<<24|M<<25|D<<26|R<<27|G<<28|U<<29|V<<30|x<<31;re=re+"_"+(R|I<<1|h<<2|d<<3|z<<4|O<<5|W<<6|H<<7|Y<<8|j<<9);var oe=0;t$$(C)&&C.length>0&&(oe=w?C.clippingPlanesState:0);var ae=i.surfaceShader;if(t$$(ae)&&ae.numberOfDayTextures===n&&ae.flags===re&&ae.material===this.material&&ae.clippingShaderState===oe&&le$7(ae.mvtTextureObj,N)&&ae.numberOfGridTextures===F&&ae.gridUpdate===B)return ae.shaderProgram;var se=this._shadersByTexturesFlags[n+F];if(t$$(se)||(se=this._shadersByTexturesFlags[n+F]={}),!t$$(ae=se[re])||ae.material!==this.material||ae.clippingShaderState!==oe||!le$7(ae.mvtTextureObj,N)||B||ae.numberOfGridTextures!=F){var le=this.baseVertexShaderSource.clone(),ue=this.baseFragmentShaderSource.clone();0!==oe&&ue.sources.unshift(f$F(C,t.context)),le.defines.push(X,J),ue.defines.push("TEXTURE_UNITS "+n,ee,ie),ue.defines.push("GRIDTEXTURE_UNITS "+F,ee,ie),r&&ue.defines.push("APPLY_BRIGHTNESS"),o&&ue.defines.push("APPLY_CONTRAST"),a&&ue.defines.push("APPLY_HUE"),s&&ue.defines.push("APPLY_SATURATION"),l&&ue.defines.push("APPLY_GAMMA"),u&&ue.defines.push("APPLY_ALPHA"),f&&(ue.defines.push("SHOW_REFLECTIVE_OCEAN"),le.defines.push("SHOW_REFLECTIVE_OCEAN")),p&&ue.defines.push("SHOW_OCEAN_WAVES"),z&&ue.defines.push("POLYGON_OFFSET"),_&&(le.defines.push("ENABLE_LIGHTING"),ue.defines.push("ENABLE_LIGHTING"),v?(le.defines.push("ENABLE_VERTEX_LIGHTING"),ue.defines.push("ENABLE_VERTEX_LIGHTING")):(le.defines.push("ENABLE_DAYNIGHT_SHADING"),ue.defines.push("ENABLE_DAYNIGHT_SHADING"))),(x&&M||_&&v)&&(le.defines.push(H$r.BRDF),ue.defines.push(H$r.BRDF),t$$(t.specularEnvironmentMaps)&&ue.defines.push(H$r.IBL)),m&&(ue.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),$&&ue.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN")),M&&(ue.defines.push("SHOW_NORMAL_MAP"),le.defines.push("SHOW_NORMAL_MAP")),g&&(le.defines.push("GROUND_ATMOSPHERE"),ue.defines.push("GROUND_ATMOSPHERE"),y&&ue.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE")),le.defines.push("INCLUDE_WEB_MERCATOR_Y"),ue.defines.push("INCLUDE_WEB_MERCATOR_Y"),S&&(le.defines.push("FOG"),ue.defines.push("FOG")),c&&ue.defines.push("APPLY_SPLIT"),h&&ue.defines.push("APPLY_SWIPE"),R&&ue.defines.push("APPLY_GLOBESPLIT"),d&&ue.defines.push("APPLY_GLOBESWIPE"),w&&ue.defines.push("ENABLE_CLIPPING_PLANES"),E&&ue.defines.push("COLOR_CORRECT"),A&&(le.defines.push("Height_Map"),ue.defines.push("Height_Map")),L&&le.defines.push("Color_Map"),G&&!k&&le.defines.push("APPLY_MODIFY"),U&&ue.defines.push("Excavate_Region"),V&&ue.defines.push("Excavate_Outer"),W&&ue.defines.push("Apply_ImageryClip"),I&&ue.defines.push("HYPSOMETRIC_ANALYSIS"),H&&ue.defines.push("HYPSOMETRIC_REGION"),O&&(ue.defines.push("FLOOD_ANALYSIS"),le.defines.push("FLOOD_ANALYSIS")),D&&M&&(ue.defines.push("SLOPE_ANALYSIS"),le.defines.push("SLOPE_ANALYSIS")),D&&Y&&M&&ue.defines.push("SlopeRegion"),j&&ue.defines.push("SQRESULT");var ce="vec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates)\n{\n vec4 color = initialColor;\n";P&&(ce+=" vec4 cutoutAndColorResult;\n bool texelUnclipped;\n");for(var he=0;he<n;++he)P?ce+=" cutoutAndColorResult = u_dayTextureCutoutRectangles["+he+"];\n texelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;\n cutoutAndColorResult = czm_sampleAndBlend(\n":he===e.mixIndex&&e.mixDirection>0?ce+=" color = sampleAndBlendParent(\n":ce+=" color = czm_sampleAndBlend(\n",ce+=" color,\n u_dayTextures["+he+"],\n u_dayTextureUseWebMercatorT["+he+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_dayTextureTexCoordsRectangle["+he+"],\n u_dayTextureTranslationAndScale["+he+"],\n u_transparentBackColor["+he+"],\n u_imageryClipEnable["+he+"],\n u_dayTextureFlipY["+he+"],\n "+(u?"u_dayTextureAlpha["+he+"]":"1.0")+",\n "+(r?"u_dayTextureBrightness["+he+"]":"0.0")+",\n "+(o?"u_dayTextureContrast["+he+"]":"0.0")+",\n "+(a?"u_dayTextureHue["+he+"]":"0.0")+",\n "+(s?"u_dayTextureSaturation["+he+"]":"0.0")+",\n "+(l?"u_dayTextureOneOverGamma["+he+"]":"0.0")+",\n "+(c?"u_dayTextureSplit["+he+"]":"vec2(0.0,0.0)")+",\n "+(h?"u_dayTextureSwipeRegion["+he+"]":"vec4(0.0,0.0,0.0,0.0)")+"\n );\n",P&&(ce+=" color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n");for(he=0;he<F;++he)ce+=" color = gridTextureSampleAndBlend(\n color,\n u_gridTextures["+he+"],\n u_gridTextureUseWebMercatorT["+he+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_gridTextureTexCoordsRectangle["+he+"],\n u_gridTextureTranslationAndScale["+he+"]);\n";ce+=" return color;\n}",ue.sources.push(ce),le.sources.push(ye$6(ne)),le.sources.push(Le$5(b));var de=p$15.fromCache({context:t.context,vertexShaderSource:le,fragmentShaderSource:ue,attributeLocations:K.getAttributeLocations()});ae=se[re]=new Oe$5(n,re,this.material,de,oe,N,F,B)}return i.surfaceShader=ae,ae.shaderProgram},b$k.prototype.destroy=function(){var e,t,i=this._shadersByTexturesFlags;for(var n in i)if(i.hasOwnProperty(n)){var r=i[n];if(!t$$(r))continue;for(e in r)r.hasOwnProperty(e)&&(t$$(t=r[e])&&t.shaderProgram.destroy())}return s$1e(this)};var E$g={FAILED:0,UNLOADED:1,TRANSITIONING:2,RECEIVED:3,TEXTURE_LODED:4,READY:5,UPDATE:6},_$g=Object.freeze(E$g);function h$c(e,t,i,n,r){if(this.gridLayer=e,this.x=t,this.y=i,this.level=n,this.request=void 0,0!==n){var o=t/2|0,a=i/2|0,s=n-1;this.parent=e._getGridFromCache(o,a,s)}(this.state=_$g.UNLOADED,this.gridBuffer=void 0,this.gridUrl=void 0,this.texture=void 0,this.textureWebMercator=void 0,this.credits=void 0,this.referenceCount=0,!t$$(r)&&e.gridProvider.ready)&&(r=e.gridProvider.tilingScheme.tileXYToRectangle(t,i,n));this.rectangle=r,this.needUpdate=!1}function d$e(e,t,i){this.readyGrid=void 0,this.loadingGrid=e,this.textureCoordinateRectangle=t,this.textureTranslationAndScale=void 0,this.useWebMercatorT=i}function p$f(e,t){this._gridProvider=e,t=e$1Y(t,{}),this._context=t.context,this._show=!0,this.show=!0,this._rectangle=e$1Y(t.rectangle,s$1p.MAX_VALUE),this._gridCache=[],t$$(t.maxCategory)?this._MaxCategory=t.maxCategory:e.ready?this._MaxCategory=e.maxCategory:this._isNeedUpdate=!0,this._isNeedUpdate=!1,this._isUpdate=!0,t$$(t.minCategory)?this._MinCategory=t.minCategory:e.ready?this._MinCategory=e.minCategory:this._isNeedUpdate=!0,this._hypsometricSetting=void 0,t$$(t.hypsometricSetting)&&D$d(this,t),this._filterMode=J$O.FilterMode.LINEAR}function T$g(e,t,i,n,r){var o=n+1,a=e._gridProvider;if(t$$(a)&&!(a.maxLevel<o))for(var s=Object.keys(e._gridCache),l=0;l<2;l++)for(var u=2*t+l,c=0;c<2;c++){var h=2*i+c,d=R$a(u,h,o);for(l=0;l<s.length;l++)if(d==s[l]){var f=e._gridCache[d];if(b$j(f,r)){var p=T$g(e,u,h,o);return t$$(p)&&p.state==_$g.READY?p:f.state==_$g.READY?f:void 0}}}}function b$j(e,t){return!!t$$(e)&&s$1p.contains(e.rectangle,t)}h$c.prototype.addReference=function(){++this.referenceCount},h$c.prototype.releaseReference=function(){return--this.referenceCount,0===this.referenceCount?(this.gridLayer._removeGridFromCache(this),t$$(this.parent)&&this.parent.releaseReference(),t$$(this.girlBuffer)&&t$$(this.girlBuffer.destroy)&&this.girlBuffer.destroy(),t$$(this.texture)&&this.texture.destroy(),t$$(this.textureWebMercator)&&this.texture!==this.textureWebMercator&&this.textureWebMercator.destroy(),s$1e(this),0):this.referenceCount},h$c.prototype._processStateMachine=function(e,t,i){return this.state===_$g.UNLOADED&&!i&&(this.state=_$g.TRANSITIONING,this.gridLayer._requestGridTile(this)),(this.state===_$g.RECEIVED||this.state===_$g.UPDATE)&&(this.state=_$g.TRANSITIONING,this.gridLayer._createTexture(e.context,this)),!0},d$e.prototype.freeResources=function(){t$$(this.readyImagery)&&this.readyImagery.releaseReference(),t$$(this.loadingImagery)&&this.loadingImagery.releaseReference()},d$e.prototype._processStateMachine=function(e,t,i){var n=this.loadingGrid;if(null==n){if(!t$$(this.readyGrid)||this.readyGrid.state!=_$g.UPDATE)return!1;this.loadingGrid=this.readyGrid,this.readyGrid=void 0,n=this.loadingGrid}var r=n.gridLayer;return n._processStateMachine(t,!this.useWebMercatorT,i),n.state===_$g.READY&&(t$$(this.readyGrid)&&this.readyGrid.releaseReference(),this.readyGrid=this.loadingGrid,this.loadingGrid=void 0,this.textureTranslationAndScale=r._calculateTextureTranslationAndScale(e,this),!0)},Object.defineProperties(p$f.prototype,{gridProvider:{get:function(){return this._gridProvider}},rectangle:{get:function(){return this._rectangle}},dataMaxValue:{get:function(){if(!this._isNeedUpdate)return this._MaxCategory;if(!this._gridProvider.ready)throw new DeveloperError("dataMaxValue must not be called before the grid provider is ready");this._MaxCategory=this._gridProvider.maxCategory,this._isNeedUpdate=!1}},dataMinValue:{get:function(){if(!this._isNeedUpdate)return this._MinCategory;if(!this._gridProvider.ready)throw new DeveloperError("dataMinValue must not be called before the grid provider is ready");this._MinCategory=this._gridProvider.minCategory,this._isNeedUpdate=!1}},hypsometricSetting:{get:function(){return{hypsometricSetting:this._hypsometricSetting,analysisMode:this._hypAnalysisMode}},set:function(e){D$d(this,e),this._isUpdate=!0}}}),p$f.prototype.destroy=function(){return s$1e(this)},p$f.prototype.cancelReprojections=function(){},p$f.prototype.queueReprojectionCommands=function(e){},p$f.prototype.getViewableRectangle=function(){var e=this._gridProvider,t=this._rectangle;return e.readyPromise.then((function(){return s$1p.intersection(e.rectangle,t)}))},p$f.prototype._getGridFromCache=function(e,t,i,n){var r=R$a(e,t,i),o=(this._gridCache.length,this._gridCache[r]);return t$$(o)||(o=new h$c(this,e,t,i,n),this._gridCache[r]=o),o.addReference(),o},p$f.prototype.getGridValue=function(e){for(var t=Object.values(this._gridCache),i=void 0,n=0;n<t.length;n++){var r=t[n];if(r.state==_$g.READY)if(b$j(r,e)){var o=T$g(this,r.x,r.y,r.level,e);i=t$$(o)?o:r;break}}if(!t$$(i))return-1;var a=(e.longitude-i.rectangle.west)/i.rectangle.width,s=(i.rectangle.north-e.latitude)/i.rectangle.height;a=Math.max(Math.floor(a*this._gridProvider.cellWidth),0),s=Math.max(Math.floor(s*this._gridProvider.cellHeight),0);var l=i.gridBuffer;return N$e(this._gridProvider,l,a,s,this._filterMode)},p$f.prototype._removeGridFromCache=function(e){var t=R$a(e.x,e.y,e.level);delete this._gridCache[t]},p$f.prototype._requestGridTile=function(e){var t=this._gridProvider;function i(t){if(!t$$(t))return n();e.gridBuffer=t,e.state=_$g.RECEIVED}function n(){if(e.request.state===Y$_.CANCELLED)return e.gridBuffer=void 0,e.state=_$g.UNLOADED,void(e.request=void 0);e.state=_$g.FAILED,e.request=void 0}!function(){var r=new r$V({throttle:!1,throttleByServer:!0,type:V$_.TERRAIN});e.request=r;var o=t._requestGridTile(e.x,e.y,e.level,r);t$$(o)?(e.state=_$g.RECEIVING,c$18(o,i,n)):(e.state=_$g.UNLOADED,e.request=void 0)}()},p$f.prototype._createTexture=function(e,t){var i=this._gridProvider,n=t.gridBuffer;if(null==n||null==i||!i.ready)return!1;this._isNeedUpdate&&this._gridProvider.ready&&(this._MinCategory=this._gridProvider.minCategory,this._MaxCategory=this._gridProvider.maxCategory,this._isNeedUpdate=!1),this._context=e,null==this._hypsometricSetting&&J$a(this),null==t.texture&&(t.texture=new P$S({context:this._context,width:i.cellWidth,height:i.cellHeight,pixelFormat:Z$_.RGBA,flipY:!1}));for(var r=i.cellWidth*i.cellHeight,o=new Uint8Array(4*r),a=0;a<i.cellHeight;a++)for(var s=0;s<i.cellWidth;s++){var l=(i.cellHeight-1-a)*i.cellWidth+s,u=N$e(i,n,s,a,this._filterMode);if(u<this._hypsometricSetting.MinVisibleValue||u>this._hypsometricSetting.MaxVisibleValue||u<this._hypsometricSetting.ColorTableMinKey||u>this._hypsometricSetting.ColorTableMaxKey)o[4*l+0]=0,o[4*l+1]=0,o[4*l+2]=0,o[4*l+3]=0;else{var c=this._hypsometricSetting.ColorTable.getColor(u);if(!t$$(c)){o[4*l+0]=0,o[4*l+1]=0,o[4*l+2]=0,o[4*l+3]=0;continue}o[4*l+0]=255*c.red,o[4*l+1]=255*c.green,o[4*l+2]=255*c.blue,o[4*l+3]=255*c.alpha}}t.texture.copyFrom({width:i.cellWidth,height:i.cellHeight,arrayBufferView:o}),t.state=_$g.READY};var E$f=new s$1p,H$g=new s$1p,M$e=new s$1p,A$h=new s$1p;function K$9(e,t,i,n,r,o){var a,s=t.rectangle.width/512,l=t.rectangle.height/512,u=e.tilingScheme,c=s$1p.clone(t.rectangle,A$h),h=u.tileXYToRectangle(i.northwestTileCoordinates.x,i.northwestTileCoordinates.y,o),d=s$1p.intersection(h,n,M$e);return r?(u.rectangleToNativeRectangle(c,c),u.rectangleToNativeRectangle(h,h),u.rectangleToNativeRectangle(d,d),u.rectangleToNativeRectangle(n,n),a=u.tileXYToNativeRectangle.bind(u),s=c.width/512,l=c.height/512):a=u.tileXYToRectangle.bind(u),{veryCloseX:s,veryCloseY:l,terrainRectangle:c,gridRectangle:h,clippedGridRectangle:d,gridTileXYToRectangle:a}}function k$c(e,t,i,n,r,o,a,s){var l,u,c=0,h=1;Math.abs(i.clippedGridRectangle.west-i.terrainRectangle.west)>=i.veryCloseX&&(c=Math.min(1,(i.clippedGridRectangle.west-i.terrainRectangle.west)/i.terrainRectangle.width)),Math.abs(i.clippedGridRectangle.north-i.terrainRectangle.north)>=i.veryCloseY&&(h=Math.max(0,(i.clippedGridRectangle.north-i.terrainRectangle.south)/i.terrainRectangle.height));for(var d=h,f=n.northwestTileCoordinates.x;f<=n.southeastTileCoordinates.x;f++)if(l=c,i.gridRectangle=i.gridTileXYToRectangle(f,n.northwestTileCoordinates.y,o),i.clippedGridRectangle=s$1p.simpleIntersection(i.gridRectangle,r,M$e),t$$(i.clippedGridRectangle)){c=Math.min(1,(i.clippedGridRectangle.east-i.terrainRectangle.west)/i.terrainRectangle.width),f===n.southeastTileCoordinates.x&&Math.abs(i.clippedGridRectangle.east-i.terrainRectangle.east)<i.veryCloseX&&(c=1),h=d;for(var p=n.northwestTileCoordinates.y;p<=n.southeastTileCoordinates.y;p++)if(u=h,i.gridRectangle=i.gridTileXYToRectangle(f,p,o),i.clippedGridRectangle=s$1p.simpleIntersection(i.gridRectangle,r,M$e),t$$(i.clippedGridRectangle)){h=Math.max(0,(i.clippedGridRectangle.south-i.terrainRectangle.south)/i.terrainRectangle.height),p===n.southeastTileCoordinates.y&&Math.abs(i.clippedGridRectangle.south-i.terrainRectangle.south)<i.veryCloseY&&(h=0);var _=new a$10(l,h,c,u),m=e._getGridFromCache(f,p,o);t.gridImagery.splice(s,0,new d$e(m,_,a)),++s}}}function D$d(e,t){if(t$$(t)&&t$$(t.hypsometricSetting))t$$(e._hypsometricSetting)&&e._hypsometricSetting.destroy(),e._hypsometricSetting=t.hypsometricSetting,e._hypsometricSetting._emissionTextureChanged=!0,e._filterMode=e._hypsometricSetting.filterMode,t$$(e._hypsometricSetting.ColorTable)&&e._hypsometricSetting.ColorTable.generateBuffer();else if(t$$(e._hypsometricSetting._hypsometricSetting))return e._hypsometricSetting.destroy(),void(e._hypsometricSetting=void 0);z$e(e)}function J$a(e){if(e._isNeedUpdate&&e._gridProvider.ready&&(e._MinCategory=e._gridProvider.minCategory,e._MaxCategory=e._gridProvider.maxCategory,e._isNeedUpdate=!1),null==e._hypsometricSetting){var t=new o$T;e._hypsometricSetting=new _$P,e._hypsometricSetting.MaxVisibleValue=0;for(var i=[e$1z.fromCssColorString("#AAF0E9"),e$1z.fromCssColorString("#B0F2D3"),e$1z.fromCssColorString("#B0F4BC"),e$1z.fromCssColorString("#BFF8B2"),e$1z.fromCssColorString("#DAFBB2"),e$1z.fromCssColorString("#EDF9AD"),e$1z.fromCssColorString("#DCEC91"),e$1z.fromCssColorString("#A0D567"),e$1z.fromCssColorString("#60BD42"),e$1z.fromCssColorString("#2CA432"),e$1z.fromCssColorString("#148E35"),e$1z.fromCssColorString("#20853D"),e$1z.fromCssColorString("#559037"),e$1z.fromCssColorString("#819D2F"),e$1z.fromCssColorString("#ABA826"),e$1z.fromCssColorString("#D7B117"),e$1z.fromCssColorString("#EBA509"),e$1z.fromCssColorString("#E18302"),e$1z.fromCssColorString("#CB5902"),e$1z.fromCssColorString("#C53602"),e$1z.fromCssColorString("#9D1901"),e$1z.fromCssColorString("#820C01"),e$1z.fromCssColorString("#760F03"),e$1z.fromCssColorString("#721906"),e$1z.fromCssColorString("#702007"),e$1z.fromCssColorString("#6E280A"),e$1z.fromCssColorString("#6A2D0C"),e$1z.fromCssColorString("#733C1B"),e$1z.fromCssColorString("#815032"),e$1z.fromCssColorString("#8E664D"),e$1z.fromCssColorString("#997C6C"),e$1z.fromCssColorString("#A69992")],n=(e._MaxCategory-e._MinCategory)/31,r=0;r<32;r++)t.insert(e._MinCategory+n*r,i[r]);e._hypsometricSetting.ColorTable=t,e._hypsometricSetting.DisplayMode=J$O.DisplayMode.FACE_AND_LINE,e._hypsometricSetting.Opacity=.618,e._hypsometricSetting.ColorTableMaxKey=e._MaxCategory,e._hypsometricSetting.ColorTableMinKey=e._MinCategory,e._hypsometricSetting.MaxVisibleValue=e._MaxCategory,e._hypsometricSetting.MinVisibleValue=e._MinCategory,e._hypsometricSetting.ColorTable.generateBuffer()}}function R$a(e,t,i){return JSON.stringify([e,t,i])}function z$e(e){for(var t=Object.values(e._gridCache),i=0;i<t.length;i++){var n=t[i];n.state==_$g.READY&&(n.state=_$g.UPDATE,n.needUpdate=!0)}}function Q$a(e,t,i,n){var r=0;i.south>0?r=i.south:i.north<0&&(r=i.north);var o=e._gridProvider,a=Z$b(e,1*t.getLevelMaximumGeometricError(n),r,t$$(o.resolution)?o.resolution:1,t.tilingScheme._tileWidth);a=Math.max(0,a);var s=o.maxLevel;if(a>s&&(a=s),t$$(o.minLevel)){var l=o.minLevel;a<l&&(a=l)}return a}function Z$b(e,t,i,n,r){var o=e._gridProvider,a=o.tilingScheme,s=a.ellipsoid,l=o.tilingScheme.projection instanceof s$1q?1:Math.cos(i),u=a.rectangle,c=s.maximumRadius*u.width*l/(o.cellWidth*a.getNumberOfXTilesAtLevel(0)/n)/t*(o.cellWidth/r),h=Math.log(c)/Math.log(2);return 0|Math.round(h)}function $$8(e,t,i,n){var r=e.tilingScheme,o=r.positionToTileXY(s$1p.northwest(t),i),a=r.positionToTileXY(s$1p.southeast(t),i),s=n.width/512,l=n.height/512,u=r.tileXYToRectangle(o.x,o.y,i);Math.abs(u.south-n.north)<l&&o.y<a.y&&++o.y,Math.abs(u.east-n.west)<s&&o.x<a.x&&++o.x;var c=r.tileXYToRectangle(a.x,a.y,i);return Math.abs(c.north-n.south)<l&&a.y>o.y&&--a.y,Math.abs(c.west-n.east)<s&&a.x>o.x&&--a.x,{northwestTileCoordinates:o,southeastTileCoordinates:a}}function N$e(e,t,i,n,r){if(!t$$(e))throw new DeveloperError("getValue must not be called before the grid provider is ready");if(r==J$O.FilterMode.NEAREST)return t[n*e.cellWidth+i];for(var o=0,a=0,s=0;s<2;s++)for(var l=0;l<2;l++){var u=i+s;u=Math.min(u,e.cellWidth-1);var c=n+l;o+=t[(c=Math.min(c,e.cellHeight-1))*e.cellWidth+u],a++}return a<=0?-99999:o/=a}function o$f(){this._layers=[],this.layerAdded=new o$15,this.layerRemoved=new o$15,this.layerMoved=new o$15,this.layerShownOrHidden=new o$15,this.layerUpdate=new o$15}function _$f(e,t){if(!t$$(t))throw new t$_("layer is required.");var i=e.indexOf(t);if(-1===i)throw new t$_("layer is not in this collection.");return i}function I$e(e,t,i){var n=e._layers;if((t=n$1d.clamp(t,0,n.length-1))!==(i=n$1d.clamp(i,0,n.length-1))){var r=n[t];n[t]=n[i],n[i]=r,e._update(),e.layerMoved.raiseEvent(r,i,t)}}p$f.prototype._createTileImagerySkeletons=function(e,t,i){var n=e.data,r=this._gridProvider;if(!this.show||!r.ready)return!1;t$$(i)||(i=n.gridImagery.length);var o=r.tilingScheme.projection instanceof e$1H&&e.rectangle.north<e$1H.MaximumLatitude&&e.rectangle.south>-e$1H.MaximumLatitude,a=s$1p.intersection(r.rectangle,this._rectangle,E$f),s=s$1p.intersection(e.rectangle,a,H$g);if(null==s)return!1;var l=Q$a(this,t,s,e.level),u=$$8(r,s,l,e.rectangle);return e.rectangle.width,e.rectangle.height,k$c(this,n,K$9(r,e,u,a,o,l),u,a,l,o,i),!0},p$f.prototype._calculateTextureTranslationAndScale=function(e,t){var i=t.readyGrid.rectangle,n=e.rectangle;if(t.useWebMercatorT){var r=t.girdLayer.gridProvider.tilingScheme;i=r.rectangleToNativeRectangle(i,E$f),n=r.rectangleToNativeRectangle(n,A$h)}var o=n.width,a=n.height,s=o/i.width,l=a/i.height;return new a$10(s*(n.west-i.west)/o,l*(n.south-i.south)/a,s,l)},Object.defineProperties(o$f.prototype,{length:{get:function(){return this._layers.length}}}),o$f.prototype.add=function(e,t){var i=t$$(t);if(!t$$(e))throw new t$_("layer is required.");if(i){if(t<0)throw new t$_("index must be greater than or equal to zero.");if(t>this._layers.length)throw new t$_("index must be less than or equal to the number of layers.")}i?this._layers.splice(t,0,e):(t=this._layers.length,this._layers.push(e)),this._update(),this.layerAdded.raiseEvent(e,t)},o$f.prototype.addImageryProvider=function(e,t){if(!t$$(e))throw new t$_("imageryProvider is required.");var i=new u$p(e);return i._imageryLayers=this,this.add(i,t),i},o$f.prototype.addVectorTileProvider=function(e,t){if(!t$$(e))throw new t$_("imageryProvider is required.");var i=new u$p(e,{minimumTerrainLevel:e.minimumTerrainLevel,maximumTerrainLevel:e.maximumTerrainLevel,minificationFilter:e.minificationFilter,magnificationFilter:e.magnificationFilter});return this.add(i,t),i},o$f.prototype.addGridProvider=function(e,t){if(!t$$(e))throw new t$_("gridProvider is required.");var i=new p$f(e);return this.add(i,t),i},o$f.prototype.remove=function(e,t,i){t=e$1Y(t,!0);i=e$1Y(i,!1);var n=this._layers.indexOf(e);return-1!==n&&(e._imageryProvider&&e._imageryProvider instanceof M$10&&!i?void 0:(this._layers.splice(n,1),this._update(),this.layerRemoved.raiseEvent(e,n),t&&e.destroy(),!0))},o$f.prototype.removeAll=function(e){e=e$1Y(e,!0);for(var t=this._layers,i=0,n=t.length;i<n;i++){var r=t[i];this.layerRemoved.raiseEvent(r,i),e&&r.destroy()}this._layers=[]},o$f.prototype.contains=function(e){return-1!==this.indexOf(e)},o$f.prototype.indexOf=function(e){return this._layers.indexOf(e)},o$f.prototype.get=function(e){if(!t$$(e))throw new t$_("index is required.","index");return this._layers[e]},o$f.prototype.raise=function(e){var t=_$f(this._layers,e);I$e(this,t,t+1)},o$f.prototype.lower=function(e){var t=_$f(this._layers,e);I$e(this,t,t-1)},o$f.prototype.raiseToTop=function(e){var t=_$f(this._layers,e);t!==this._layers.length-1&&(this._layers.splice(t,1),this._layers.push(e),this._update(),this.layerMoved.raiseEvent(e,this._layers.length-1,t))},o$f.prototype.lowerToBottom=function(e){var t=_$f(this._layers,e);0!==t&&(this._layers.splice(t,1),this._layers.splice(0,0,e),this._update(),this.layerMoved.raiseEvent(e,0,t))};var H$f=new s$1p;function r$c(e,t){this._terrainProvider=e}function o$e(){this._layers=[],this.layerAdded=new o$15,this.layerRemoved=new o$15,this.layerMoved=new o$15,this.layerShownOrHidden=new o$15,this._globe=void 0}function _$e(e,t){if(!t$$(t))throw new t$_("layer is required.");var i=e.indexOf(t);if(-1===i)throw new t$_("layer is not in this collection.");return i}function u$e(e,t,i){var n=e._layers;if((t=n$1d.clamp(t,0,n.length-1))!==(i=n$1d.clamp(i,0,n.length-1))){var r=n[t];n[t]=n[i],n[i]=r,e._update(),e.layerMoved.raiseEvent(r,i,t)}}function e$d(e){this._ellipsoid=new c$15(e.ellipsoid,a$11.ZERO)}function h$b(e){if(!t$$(e))throw new t$_("options is required.");if(!t$$(e.x))throw new t$_("options.x is required.");if(!t$$(e.y))throw new t$_("options.y is required.");if(e.x<0||e.y<0)throw new t$_("options.x and options.y must be greater than or equal to zero.");if(!t$$(e.level))throw new t$_("options.level is required and must be greater than or equal to zero.");if(!t$$(e.tilingScheme))throw new t$_("options.tilingScheme is required.");this._tilingScheme=e.tilingScheme,this._x=e.x,this._y=e.y,this._level=e.level,this._parent=e.parent,this._rectangle=this._tilingScheme.tileXYToRectangle(this._x,this._y,this._level),this._southwestChild=void 0,this._southeastChild=void 0,this._northwestChild=void 0,this._northeastChild=void 0,this.replacementPrevious=void 0,this.replacementNext=void 0,this._distance=0,this._loadPriority=0,this._customData=[],this._frameUpdated=void 0,this._lastSelectionResult=D$u.NONE,this._lastSelectionResultFrame=void 0,this._loadedCallbacks={},this.state=te$C.START,this.renderable=!1,this.upsampledFromParent=!1,this.data=void 0,this._rasterTextureSize=void 0,this._rasterFBO=void 0,this._rasterTexture=void 0,this._rasterized=!1,this._clearCommand=new r$M({color:new e$1z(0,0,0,0),depth:1}),this._2DRasterized=!1,this._2DRasterTexture=void 0,this._mvtLoaded=!1,this._clipRasterTexture=void 0,this._clipRasterFbo=void 0,this._clipRegionsCount=0,this._clipRegionRasterized=!1,this.isModified=!1,0===this._level?this.showInvalid=!1:this.showInvalid=e.parent.showInvalid,this.zoomLevel=-1,this._renderThisFrame=!1,this._useParentImage=!1}function I$d(e){t$$(e)&&e.freeResources()}o$f.prototype.pickImageryLayerFeatures=function(e,t){var i=t.globe.pick(e,t);if(t$$(i)){for(var n,r=t.globe.ellipsoid.cartesianToCartographic(i),o=t.globe._surface._tilesToRender,a=0;!t$$(n)&&a<o.length;++a){var s=o[a];s$1p.contains(s.rectangle,r)&&(n=s)}if(t$$(n)){for(var l=n.data.imagery,u=[],c=[],h=l.length-1;h>=0;--h){var d=l[h],f=d.readyImagery;if(t$$(f)){var p=f.imageryLayer.imageryProvider;if(t$$(p.pickFeatures)&&s$1p.contains(f.rectangle,r)){var _=H$f,m=1/1024;if(_.west=n$1d.lerp(n.rectangle.west,n.rectangle.east,d.textureCoordinateRectangle.x-m),_.east=n$1d.lerp(n.rectangle.west,n.rectangle.east,d.textureCoordinateRectangle.z+m),_.south=n$1d.lerp(n.rectangle.south,n.rectangle.north,d.textureCoordinateRectangle.y-m),_.north=n$1d.lerp(n.rectangle.south,n.rectangle.north,d.textureCoordinateRectangle.w+m),s$1p.contains(_,r)){var $=p.pickFeatures(f.x,f.y,f.level,r.longitude,r.latitude);!t$$($)||(u.push($),c.push(f.imageryLayer))}}}}if(0!==u.length)return c$18.all(u,(function(e){for(var t=[],i=0;i<e.length;++i){var n=e[i],o=c[i];if(t$$(n)&&n.length>0)for(var a=0;a<n.length;++a){var s=n[a];s.imageryLayer=o,t$$(s.position)||(s.position=r),t.push(s)}}return t}))}}},o$f.prototype.queueReprojectionCommands=function(e){for(var t=this._layers,i=0,n=t.length;i<n;++i)t[i].queueReprojectionCommands(e)},o$f.prototype.cancelReprojections=function(){for(var e=this._layers,t=0,i=e.length;t<i;++t)e[t].cancelReprojections()},o$f.prototype.isDestroyed=function(){return!1},o$f.prototype.destroy=function(){return this.removeAll(!0),s$1e(this)},o$f.prototype._update=function(){var e,t,i,n,r=!0,o=this._layers;for(i=0,n=o.length;i<n;++i)(t=o[i])._layerIndex=i,t$$(t._imageryProvider)&&(t._imageryProvider._id=t._layerIndex),t.show?(t._isBaseLayer=r,r=!1):t._isBaseLayer=!1,t.show!==t._show&&(t$$(t._show)&&(t$$(e)||(e=[]),e.push(t)),t._show=t.show),t$$(t.gridProvider)&&t._isUpdate&&this.layerUpdate.raiseEvent(t,t._layerIndex);if(t$$(e))for(i=0,n=e.length;i<n;++i)t=e[i],this.layerShownOrHidden.raiseEvent(t,t._layerIndex,t.show)},o$f.prototype._maxDetailLevelOffset=function(){for(var e=0,t=this._layers,i=0,n=t.length;i<n;++i){var r=t[i]._detailLevelOffset;t[i].featherEdgesEnabled&&r<1&&(r=1),e=Math.max(r,e)}return e},o$f.prototype.saveLocalCache=function(){for(var e=0,t=this._layers.length;e<t;e++)this._layers[e]instanceof u$p&&this._layers[e].saveLocalCache()},Object.defineProperties(r$c.prototype,{terrainProvider:{get:function(){return this._terrainProvider}}}),r$c.prototype.isDestroyed=function(){return!1},r$c.prototype.destroy=function(){return s$1e(this)},Object.defineProperties(o$e.prototype,{length:{get:function(){return this._layers.length}}}),o$e.prototype.add=function(e,t){var i=t$$(t);if(!t$$(e))throw new t$_("layer is required.");if(i){if(t<0)throw new t$_("index must be greater than or equal to zero.");if(t>this._layers.length)throw new t$_("index must be less than or equal to the number of layers.")}i?this._layers.splice(t,0,e):(t=this._layers.length,this._layers.push(e)),this._update(),t$$(this._globe)&&t$$(this._globe._surface)&&this._globe._surface.invalidateAllTiles(),this.layerAdded.raiseEvent(e,t)},o$e.prototype.addTerrainProvider=function(e,t){if(!t$$(e))throw new t$_("terrainProvider is required.");var i=new r$c(e);return this.add(i,t),t$$(this._globe)&&t$$(this._globe._surface)&&this._globe._surface.invalidateAllTiles(),i},o$e.prototype.remove=function(e,t){t=e$1Y(t,!0);var i=this._layers.indexOf(e);return-1!==i&&(this._layers.splice(i,1),this._update(),this.layerRemoved.raiseEvent(e,i),t&&e.destroy(),t$$(this._globe)&&t$$(this._globe._surface)&&(0===this._layers.length&&(this._globe.terrainProvider=new t$P({ellipsoid:this._globe.ellipsoid})),this._globe._surface.invalidateAllTiles()),!0)},o$e.prototype.removeAll=function(e){e=e$1Y(e,!0);for(var t=this._layers,i=0,n=t.length;i<n;i++){var r=t[i];this.layerRemoved.raiseEvent(r,i),e&&r.destroy()}t$$(this._globe)&&t$$(this._globe._surface)&&(this._globe.terrainProvider=new t$P({ellipsoid:this._globe.ellipsoid}),this._globe._surface.invalidateAllTiles()),this._layers=[]},o$e.prototype.contains=function(e){return-1!==this.indexOf(e)},o$e.prototype.indexOf=function(e){return this._layers.indexOf(e)},o$e.prototype.get=function(e){if(!t$$(e))throw new t$_("index is required.","index");return this._layers[e]},o$e.prototype.raise=function(e){var t=_$e(this._layers,e);u$e(this,t,t+1),t$$(this._globe)&&t$$(this._globe._surface)&&this._globe._surface.invalidateAllTiles()},o$e.prototype.lower=function(e){var t=_$e(this._layers,e);u$e(this,t,t-1),t$$(this._globe)&&t$$(this._globe._surface)&&this._globe._surface.invalidateAllTiles()},o$e.prototype.raiseToTop=function(e){var t=_$e(this._layers,e);t!==this._layers.length-1&&(this._layers.splice(t,1),this._layers.push(e),this._update(),t$$(this._globe)&&t$$(this._globe._surface)&&this._globe._surface.invalidateAllTiles(),this.layerMoved.raiseEvent(e,this._layers.length-1,t))},o$e.prototype.lowerToBottom=function(e){var t=_$e(this._layers,e);0!==t&&(this._layers.splice(t,1),this._layers.splice(0,0,e),this._update(),t$$(this._globe)&&t$$(this._globe._surface)&&this._globe._surface.invalidateAllTiles(),this.layerMoved.raiseEvent(e,0,t))},o$e.prototype.isDestroyed=function(){return!1},o$e.prototype.destroy=function(){return this.removeAll(!0),s$1e(this)},o$e.prototype._update=function(){var e,t,i,n,r=!0,o=this._layers;for(i=0,n=o.length;i<n;++i)(t=o[i])._layerIndex=i,t$$(t._terrainProvider)&&(t._terrainProvider._id=t._layerIndex),t.show?(t._isBaseLayer=r,r=!1):t._isBaseLayer=!1,t.show!==t._show&&(t$$(t._show)&&(t$$(e)||(e=[]),e.push(t)),t._show=t.show);if(t$$(e))for(i=0,n=e.length;i<n;++i)t=e[i],this.layerShownOrHidden.raiseEvent(t,t._layerIndex,t.show)},Object.defineProperties(e$d.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),h$b.createLevelZeroTiles=function(e){if(!t$$(e))throw new t$_("tilingScheme is required.");for(var t=e.getNumberOfXTilesAtLevel(0),i=e.getNumberOfYTilesAtLevel(0),n=new Array(t*i),r=0,o=0;o<i;++o)for(var a=0;a<t;++a)n[r++]=new h$b({tilingScheme:e,x:a,y:o,level:0});return n},h$b.prototype._updateCustomData=function(e,t,i){var n,r,o,a=this.customData;if(t$$(t)&&t$$(i)){for(a=a.filter((function(e){return-1===i.indexOf(e)})),this._customData=a,o=this._rectangle,n=0;n<t.length;++n)r=t[n],s$1p.contains(o,r.positionCartographic)&&a.push(r);this._frameUpdated=e}else{var s=this._parent;if(t$$(s)&&this._frameUpdated!==s._frameUpdated){a.length=0,o=this._rectangle;var l=s.customData;for(n=0;n<l.length;++n)r=l[n],s$1p.contains(o,r.positionCartographic)&&a.push(r);this._frameUpdated=s._frameUpdated}}},Object.defineProperties(h$b.prototype,{tilingScheme:{get:function(){return this._tilingScheme}},x:{get:function(){return this._x}},y:{get:function(){return this._y}},level:{get:function(){return this._level}},parent:{get:function(){return this._parent}},rectangle:{get:function(){return this._rectangle}},children:{get:function(){return[this.northwestChild,this.northeastChild,this.southwestChild,this.southeastChild]}},southwestChild:{get:function(){return t$$(this._southwestChild)||(this._southwestChild=new h$b({tilingScheme:this.tilingScheme,x:2*this.x,y:2*this.y+1,level:this.level+1,parent:this})),this._southwestChild}},southeastChild:{get:function(){return t$$(this._southeastChild)||(this._southeastChild=new h$b({tilingScheme:this.tilingScheme,x:2*this.x+1,y:2*this.y+1,level:this.level+1,parent:this})),this._southeastChild}},northwestChild:{get:function(){return t$$(this._northwestChild)||(this._northwestChild=new h$b({tilingScheme:this.tilingScheme,x:2*this.x,y:2*this.y,level:this.level+1,parent:this})),this._northwestChild}},northeastChild:{get:function(){return t$$(this._northeastChild)||(this._northeastChild=new h$b({tilingScheme:this.tilingScheme,x:2*this.x+1,y:2*this.y,level:this.level+1,parent:this})),this._northeastChild}},customData:{get:function(){return this._customData}},needsLoading:{get:function(){return this.state<te$C.DONE}},eligibleForUnloading:{get:function(){var e=!0;return t$$(this.data)&&(t$$(e=this.data.eligibleForUnloading)||(e=!0)),e}}}),h$b.prototype.findLevelZeroTile=function(e,t,i){var n=this.tilingScheme.getNumberOfXTilesAtLevel(0);if(t<0?t+=n:t>=n&&(t-=n),!(i<0||i>=this.tilingScheme.getNumberOfYTilesAtLevel(0)))return e.filter((function(e){return e.x===t&&e.y===i}))[0]},h$b.prototype.findTileToWest=function(e){var t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x-1,this.y);if(t.southeastChild===this)return t.southwestChild;if(t.northeastChild===this)return t.northwestChild;var i=t.findTileToWest(e);return void 0!==i?t.southwestChild===this?i.southeastChild:i.northeastChild:void 0},h$b.prototype.findTileToEast=function(e){var t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x+1,this.y);if(t.southwestChild===this)return t.southeastChild;if(t.northwestChild===this)return t.northeastChild;var i=t.findTileToEast(e);return void 0!==i?t.southeastChild===this?i.southwestChild:i.northwestChild:void 0},h$b.prototype.findTileToSouth=function(e){var t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x,this.y+1);if(t.northwestChild===this)return t.southwestChild;if(t.northeastChild===this)return t.southeastChild;var i=t.findTileToSouth(e);return void 0!==i?t.southwestChild===this?i.northwestChild:i.northeastChild:void 0},h$b.prototype.findTileToNorth=function(e){var t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x,this.y-1);if(t.southwestChild===this)return t.northwestChild;if(t.southeastChild===this)return t.northeastChild;var i=t.findTileToNorth(e);return void 0!==i?t.northwestChild===this?i.southwestChild:i.southeastChild:void 0},h$b.prototype.freeResources=function(){this.state=te$C.START,this.renderable=!1,this.upsampledFromParent=!1,t$$(this.data)&&t$$(this.data.freeResources)&&this.data.freeResources(),I$d(this._southwestChild),this._southwestChild=void 0,I$d(this._southeastChild),this._southeastChild=void 0,I$d(this._northwestChild),this._northwestChild=void 0,I$d(this._northeastChild),this._northeastChild=void 0,this._rasterTexture=this._rasterTexture&&!this._rasterTexture.isDestroyed()&&this._rasterTexture.destroy(),this._rasterFBO=this._rasterFBO&&!this._rasterFBO.isDestroyed()&&this._rasterFBO.destroy(),this._rasterFBO=void 0,this._rasterized=!1,this._2DRasterTexture=this._2DRasterTexture&&!this._2DRasterTexture.isDestroyed()&&this._2DRasterTexture.destroy(),this._2DRasterized=!1,this._mvtLoaded=!1,this._clipRasterTexture=this._clipRasterTexture&&!this._clipRasterTexture.isDestroyed()&&this._clipRasterTexture.destroy(),this._clipRasterFbo=this._clipRasterFbo&&!this._clipRasterFbo.isDestroyed()&&this._clipRasterFbo.destroy(),this._clipRegionsCount=0,this._clipRegionRasterized=!1,this.isModified=!1};var Z$a=new s$1p,f$h=new n$13;h$b.prototype.createRealtimeRasterFBO=function(e){this._rasterTexture=new P$S({context:e.context,width:this._rasterTextureSize,height:this._rasterTextureSize,pixelFormat:Z$_.RGBA,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.LINEAR,magnificationFilter:et$k.LINEAR})}),this._rasterFBO=new u$F({context:e.context,colorTextures:[this._rasterTexture],destroyAttachments:!1})};var W$9=new c$1a;function Y$c(e,t){var i=n$13.clone(t.context.uniformState._viewport),n=n$1d.toDegrees(e._rectangle.west),r=n$1d.toDegrees(e._rectangle.east),o=n$1d.toDegrees(e._rectangle.north),a=n$1d.toDegrees(e._rectangle.south),s=t.camera,l=s.frustum.clipPlane,u=s.heading,c=s.pitch,h=s.roll,d=new a$11;1===t._fboState.frameBufferType&&s.disableReflection(),a$11.clone(s._positionWC,d),c$1a.clone(s.transform,W$9),s._setTransform(c$1a.IDENTITY);var f=new r$K({width:r-n,aspectRatio:1,near:1,far:100}),p=new a$11(.5*(n+r),.5*(o+a),50),_=new a$11(0,0,-1),m=new a$11(0,1,0);r=a$11.cross(_,m,new a$11);return c$1a.computeView(p,_,m,r,t.context.uniformState.view),t.context.uniformState.updateFrustum(f),{position:d,viewport:i,waterPlane:l,heading:u,pitch:c,roll:h}}function T$f(e){if(!t$$(e)||!t$$(e.tileProvider))throw new t$_("options.tileProvider is required.");if(t$$(e.tileProvider.quadtree))throw new t$_("A QuadtreeTileProvider can only be used with a single QuadtreePrimitive");this._tileProvider=e.tileProvider,this._tileProvider.quadtree=this,this._debug={enableDebugOutput:!1,maxDepth:0,maxDepthVisited:0,tilesVisited:0,tilesCulled:0,tilesRendered:0,tilesWaitingForChildren:0,lastMaxDepth:-1,lastMaxDepthVisited:-1,lastTilesVisited:-1,lastTilesCulled:-1,lastTilesRendered:-1,lastTilesWaitingForChildren:-1,suspendLodUpdate:!1};var t=this._tileProvider.tilingScheme.ellipsoid;this._tilesToRender=[],this._tileLoadQueueHigh=[],this._tileLoadQueueMedium=[],this._tileLoadQueueLow=[],this._tileReplacementQueue=new m$Q,this._levelZeroTiles=void 0,this._loadQueueTimeSlice=5,this._tilesInvalidated=!1,this._addHeightCallbacks=[],this._removeHeightCallbacks=[],this._tileToUpdateHeights=[],this._lastTileIndex=0,this._updateHeightsTimeSlice=2,this._cameraPositionCartographic=void 0,this._cameraReferenceFrameOriginCartographic=void 0,this.maximumScreenSpaceError=e$1Y(e.maximumScreenSpaceError,2),this.tileCacheSize=e$1Y(e.tileCacheSize,100),this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!0,this._occluders=new e$d({ellipsoid:t}),this._tileLoadProgressEvent=new o$15,this._lastTileLoadQueueLength=0,this._lastSelectionFrameNumber=void 0,this._tilesToRenderOld=[],this._levelZeroTilesOld=[],this._zeroTileReady=!1,this._freeAllBakTiles=!1,this._visible=!0,this._delicateImagerylength=16}function Te$4(e){if(e._zeroTileReady){e._tilesToRenderOld.length=0;for(var t=e._levelZeroTilesOld,i=0;i<t.length;++i){for(var n=t[i],r=n.customData,o=r.length,a=0;a<o;++a){var s=r[a];s.level=0,e._addHeightCallbacks.push(s)}n.freeResources()}e._levelZeroTilesOld.length=0}}function Le$4(e){var t=e._tileReplacementQueue;t.head=void 0,t.tail=void 0,t.count=0,ie$4(e);var i=e._levelZeroTiles;if(t$$(i))if(e._zeroTileReady){e._tilesToRenderOld.length=0;for(var n=0;n<i.length;++n){for(var r=i[n].customData,o=r.length,a=0;a<o;++a){var s=r[a];s.level=0,e._addHeightCallbacks.push(s)}i[n].freeResources()}}else e._tilesToRenderOld=e._tilesToRender.slice(0),e._levelZeroTilesOld=e._levelZeroTiles.slice(0);e._levelZeroTiles=void 0,e._tileProvider.cancelReprojections()}function ie$4(e){var t=e._debug;t.maxDepth=0,t.maxDepthVisited=0,t.tilesVisited=0,t.tilesCulled=0,t.tilesRendered=0,t.tilesWaitingForChildren=0,e._tileLoadQueueHigh.length=0,e._tileLoadQueueMedium.length=0,e._tileLoadQueueLow.length=0}function be$3(e,t){var i=e._tileLoadQueueHigh.length+e._tileLoadQueueMedium.length+e._tileLoadQueueLow.length;(i!==e._lastTileLoadQueueLength||e._tilesInvalidated)&&(t.afterRender.push(o$15.prototype.raiseEvent.bind(e._tileLoadProgressEvent,i)),e._lastTileLoadQueueLength=i);var n=e._debug;n.enableDebugOutput&&!n.suspendLodUpdate&&(n.maxDepth=e._tilesToRender.reduce((function(e,t){return Math.max(e,t.level)}),-1),n.tilesRendered=e._tilesToRender.length,(n.tilesVisited!==n.lastTilesVisited||n.tilesRendered!==n.lastTilesRendered||n.tilesCulled!==n.lastTilesCulled||n.maxDepth!==n.lastMaxDepth||n.tilesWaitingForChildren!==n.lastTilesWaitingForChildren||n.maxDepthVisited!==n.lastMaxDepthVisited)&&(console.log("Visited "+n.tilesVisited+", Rendered: "+n.tilesRendered+", Culled: "+n.tilesCulled+", Max Depth Rendered: "+n.maxDepth+", Max Depth Visited: "+n.maxDepthVisited+", Waiting for children: "+n.tilesWaitingForChildren),n.lastTilesVisited=n.tilesVisited,n.lastTilesRendered=n.tilesRendered,n.lastTilesCulled=n.tilesCulled,n.lastMaxDepth=n.maxDepth,n.lastTilesWaitingForChildren=n.tilesWaitingForChildren,n.lastMaxDepthVisited=n.maxDepthVisited))}h$b.prototype.resetCamera=function(e,t){var i=e.camera;1===e._fboState.frameBufferType&&t.waterPlane&&i.enableReflection(t.waterPlane),i._setTransform(W$9),i.setView({destination:t.position,orientation:{heading:t.heading,pitch:t.pitch,roll:t.roll},convert:!1}),e.context.uniformState.update(e),e.context.uniformState.updateFrustum(i.frustum),e.context.uniformState.viewport=t.viewport},h$b.prototype.realtimeRasterVectors=function(e,t){if(!(this.level<2||(e.rasterPerFrame&&e.camera.zoomLevel!==this.zoomLevel&&(this._rasterized=!1),this._rasterized))){this.zoomLevel=e.camera.zoomLevel;var i=0;2===this._level&&(i=1),t._rasterCurrentFBOIdx=i,this._rasterTextureSize=t._rasterTextureSizes[i],this._rasterized=!0,f$h.width=this._rasterTextureSize,f$h.height=this._rasterTextureSize;for(var n=e.commandListRealtimeRaster,r=[],o=[],a=0;a<n.length;a++){var s=!1;if(t$$(n[a]._globeIndex))if(this._level>=n[a]._globeIndex.level){var l=Math.pow(2,this._level-n[a]._globeIndex.level),u=Math.floor(this.y/l),c=Math.floor(this.x/l);u===n[a]._globeIndex.row&&c===n[a]._globeIndex.col&&(s=!0)}else{l=Math.pow(2,n[a]._globeIndex.level-this._level),u=Math.floor(n[a]._globeIndex.row/l),c=Math.floor(n[a]._globeIndex.col/l);u===this.y&&c===this.x&&(s=!0)}else{var h=new s$1p(n[a]._boundingVolume.center.x-n[a]._boundingVolume.radius,n[a]._boundingVolume.center.y-n[a]._boundingVolume.radius,n[a]._boundingVolume.center.x+n[a]._boundingVolume.radius,n[a]._boundingVolume.center.y+n[a]._boundingVolume.radius);h.west=n$1d.toRadians(h.west),h.north=n$1d.toRadians(h.north),h.east=n$1d.toRadians(h.east),h.south=n$1d.toRadians(h.south),t$$(s$1p.intersection(h,this._rectangle,Z$a))&&(s=!0)}s&&(n[a]._primitiveType===H$11.TRIANGLES?r.push(n[a]):o.push(n[a]))}if(0===r.length&&0===o.length)return void(t$$(this._rasterFBO)&&(this._clearCommand.framebuffer=this._rasterFBO,this._clearCommand.execute(e.context)));t$$(this._rasterTexture)||this.createRealtimeRasterFBO(e);var d=!1,f=t._rasterLineFBOs[i],p=t._rasterAAFBOs[i];e.rasterLineWidth>1&&o.length>0&&(d=!0,this._clearCommand.framebuffer=f,this._clearCommand.execute(e.context)),this._clearCommand.framebuffer=p,this._clearCommand.execute(e.context),this._clearCommand.framebuffer=this._rasterFBO,this._clearCommand.execute(e.context);var _=Y$c(this,e),m={},$={};for(a=0;a<r.length;a++){t$$(m[g=r[a].layerId])?m[g].push(r[a]):m[g]=[r[a]]}for(a=0;a<o.length;a++){var g;t$$($[g=o[a].layerId])?$[g].push(o[a]):$[g]=[o[a]]}if(t$$(e.rasterLayerIds))for(var y=0;y<e.rasterLayerIds.length;y++){var v=e.rasterLayerIds[y],x=m[v],b=$[v];if(t$$(x))for(a=0;a<x.length;a++)x[a].renderState=p$1a.fromCache({viewport:f$h,depthTest:{enabled:!1}}),x[a].framebuffer=p,x[a].execute(e.context);if(t$$(b))for(a=0;a<b.length;a++)b[a].renderState=p$1a.fromCache({viewport:f$h}),b[a].framebuffer=d?f:p,b[a].execute(e.context)}this.resetCamera(e,_),d&&(t._lineExpandCommand.framebuffer=p,t._lineExpandCommand.renderState=p$1a.fromCache({viewport:f$h}),t._lineExpandCommand.execute(e.context)),t._lineFXAACommand.framebuffer=this._rasterFBO,t._lineFXAACommand.renderState=p$1a.fromCache({viewport:f$h}),t._lineFXAACommand.execute(e.context)}},h$b.prototype.renderVectorBy2DCanvas=function(e,t){var i=e.rasterVectorCollection,n=i.bounds;if(t$$(n)){var r=!1;if(t$$(s$1p.intersection(n,this._rectangle,Z$a))&&(r=!0),r&&!this._2DRasterized){this._2DRasterized=!0,t$$(this._2DRasterTexture)||(this._2DRasterTexture=new P$S({context:e.context,width:i.canvasWidth,height:i.canvasHeight,pixelFormat:Z$_.RGBA,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST})}));var o=i.draw(this._rectangle);this._2DRasterTexture.copyFrom(o),this._2DRasterTexture.textureAlpha=i.alpha}}},h$b.prototype.rasterClipRegion=function(e,t){if(!(e._fboState.name.indexOf("_excavationGlobeHeight")>-1||this._level<2)){var i=[].concat(t._excavateRegions.values).concat(t._modifyRegions.values).concat(t._imageryClipRegions.values).concat(t._extractRegions.values);t$$(t._slopeRegion)&&i.push(t._slopeRegion),t$$(t._hypsometricRegion)&&i.push(t._hypsometricRegion);var n=i.length;if(!(n<1||e.camera.frustum instanceof r$K||this._clipRegionsCount===n)){t$$(this._clipRasterFbo)||(this._clipRasterTexture=new P$S({context:e.context,width:256,height:256,pixelFormat:Z$_.RGBA}),this._clipRasterFbo=new u$F({context:e.context,colorTextures:[this._clipRasterTexture],destroyAttachments:!1})),this._clearCommand.framebuffer=this._clipRasterFbo,this._clearCommand.execute(e.context),f$h.width=256,f$h.height=256,this.regions=[];for(var r=Y$c(this,e),o=!1,a=0;a<n;a++){var s=i[a];if(t$$(s$1p.intersection(s.rectangle,this._rectangle))){this.regions.push(s);var l=s.command;!t$$(s.command)||(o=!0,l.renderState=p$1a.fromCache({viewport:f$h,cull:{enabled:!1}}),l.framebuffer=this._clipRasterFbo,l.execute(e.context))}}if(this.resetCamera(e,r),(o=o||t.clippingType===L$o.KeepInside)&&(this._clipRegionsCount=n),this._clipRegionRasterized=o,o){var u=this._level+" "+this._x+" "+this._y;t._clipRasterTilesMap[u]=this}}}},h$b.prototype.setRasterValidTerrainCamera=function(e,t){var i=n$13.clone(t.context.uniformState._viewport),n=t.camera;a$11.clone(n.position,oldPosition),a$11.clone(n.direction,oldDirection),a$11.clone(n.up,oldUp),n.setView({destination:new a$11(16383.5,16383.5,5e4),orientation:{direction:new a$11(0,0,-1),up:new a$11(0,1,0)},convert:!1});var r=new r$K({width:32767,aspectRatio:1,near:1,far:1e5});return t.context.uniformState.update(t),t.context.uniformState.updateFrustum(r),{position:oldPosition,direction:oldDirection,upDirection:oldUp,viewport:i}},h$b.prototype.setShowInvalid=function(e){this.showInvalid!==e&&(this.showInvalid=e,t$$(this.data)&&this.data.setShowInvalid(e))},Object.defineProperties(T$f.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}},occluders:{get:function(){return this._occluders}}}),T$f.prototype.invalidateAllTiles=function(){this._tilesInvalidated=!0,this._zeroTileReady=!1},T$f.prototype.forEachLoadedTile=function(e){for(var t=this._tileReplacementQueue.head;t$$(t);)t.state!==te$C.START&&e(t),t=t.replacementNext},T$f.prototype.forEachRenderedTile=function(e){for(var t=this._tilesToRender,i=0,n=t.length;i<n;++i)e(t[i])},T$f.prototype.updateHeight=function(e,t,i){var n=this,r={positionOnEllipsoidSurface:void 0,positionCartographic:e,level:-1,callback:t,scene:i,removeFunc:function(){for(var e=n._addHeightCallbacks,t=e.length,i=0;i<t;++i)if(e[i]===r){e.splice(i,1);break}n._removeHeightCallbacks.push(r)}};return n._addHeightCallbacks.push(r),r.removeFunc},T$f.prototype.update=function(e){t$$(this._tileProvider.update)&&this._tileProvider.update(e)},T$f.prototype.beginFrame=function(e){!e.passes.render||(this._tilesInvalidated&&(Le$4(this),this._tilesInvalidated=!1),this._freeAllBakTiles&&(Te$4(this),this._freeAllBakTiles=!1),this._tileProvider.initialize(e),ie$4(this),!this._debug.suspendLodUpdate&&this._tileReplacementQueue.markStartOfRenderFrame())},T$f.prototype.render=function(e){var t=e.passes,i=this._tileProvider;t.render&&(i.beginUpdate(e),ye$5(this,e),Oe$4(this,e),i.endUpdate(e)),t.pick&&this._tilesToRender.length>0&&i.updateForPick(e)},T$f.prototype.showInvalid=function(e){var t,i,n,r=[];for(t=0,i=this._levelZeroTiles.length;t<i;++t)r.push(this._levelZeroTiles[t]);for(;n=r.pop();)n.setShowInvalid(e),t$$(n._southeastChild)&&r.push(n._southeastChild),t$$(n._southwestChild)&&r.push(n._southwestChild),t$$(n._northeastChild)&&r.push(n._northeastChild),t$$(n._northwestChild)&&r.push(n._northwestChild)},T$f.prototype.endFrame=function(e){if(e.passes.render&&e.mode!==b$1d.MORPHING){if(e.camera._scene._mvtVisibleControl)for(var t=e.camera._scene._mvtVisibleLevel,i=this._tileReplacementQueue.head;t$$(i);){if(!1===i._mvtLoaded&&i._level>e.camera._endLevel-t&&t$$(i.data)&&t$$(i.data.imagery))for(var n=i.data.imagery,r=0;r<n.length;r++)if(t$$(n[r].loadingImagery)){n[r].loadingImagery.imageryLayer._imageryProvider instanceof M$10&&(i._mvtLoaded=n[r].processStateMachine(i,e))}i=i.replacementNext}!0===this.tileProvider.terrainProvider._needRefresh&&(this.invalidateAllTiles(),this.tileProvider.terrainProvider._needRefresh=!1),we$2(this,e),He$2(this,e),be$3(this,e)}},T$f.prototype.isDestroyed=function(){return!1},T$f.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy()};var w$i,re$5=new i$1g;function Ce$4(e,t){var i=s$1p.center(e.rectangle,re$5),n=i.longitude-w$i.longitude,r=i.latitude-w$i.latitude,o=(i=s$1p.center(t.rectangle,re$5)).longitude-w$i.longitude,a=i.latitude-w$i.latitude;return n*n+r*r-(o*o+a*a)}var Ee$5=new a$11,N$d=[];function De$5(e,t,i){if(t>5){for(var n=[],r=0;r<e.length;++r)e[r].level===t&&n.push(e[r]);if(n.length<i)for(r=0;r<n.length;++r)n[r]._useParentImage=!0}}function ye$5(e,t){var i=e._debug;if(!i.suspendLodUpdate){var n=e._tilesToRender;n.length=0;for(var r=e._tileReplacementQueue.head;r!==e._tileReplacementQueue.tail;)r._renderThisFrame=!1,r._useParentImage=!1,r=r.replacementNext;var o,a=e._tileProvider;if(!t$$(e._levelZeroTiles)){if(!a.ready)return;var s=a.tilingScheme;e._levelZeroTiles=h$b.createLevelZeroTiles(s);var l=e._levelZeroTiles.length;if(N$d.length<l)for(N$d=new Array(l),o=0;o<l;++o)void 0===N$d[o]&&(N$d[o]=new k$b)}e._occluders.ellipsoid.cameraPosition=t.camera.positionWC;var u=e._levelZeroTiles,c=u.length>1?e._occluders:void 0;w$i=t.camera.positionCartographic,u.sort(Ce$4);var h,d=e._addHeightCallbacks,f=e._removeHeightCallbacks,p=t.frameNumber;if(d.length>0||f.length>0){for(o=0,h=u.length;o<h;++o)(r=u[o])._updateCustomData(p,d,f);d.length=0,f.length=0}var _=t.camera;e._cameraPositionCartographic=_.positionCartographic;var m=c$1a.getTranslation(_.transform,Ee$5);for(e._cameraReferenceFrameOriginCartographic=e.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(m,e._cameraReferenceFrameOriginCartographic),o=0,h=u.length;o<h;++o)r=u[o],e._tileReplacementQueue.markTileRendered(r),r.renderable?g$8(e,r,a,t,c,!1,N$d[o]):(b$i(e,e._tileLoadQueueHigh,r,t),++i.tilesWaitingForChildren);for(var $=0,g=22,y=0;y<n.length;++y)$=Math.max(n[y].level,$),g=Math.min(n[y].level,g);t.camera._endLevel=$,$-g>3&&De$5(n,$,e._delicateImagerylength),e._zeroTileReady||(e._tilesToRenderOld.length>0?n.length>2&&(e._zeroTileReady=!0,e._freeAllBakTiles=!0):e._zeroTileReady=!0),e._lastSelectionFrameNumber=p}}function b$i(e,t,i,n){!i.needsLoading||(void 0!==e.tileProvider.computeTileLoadPriority&&(i._loadPriority=e.tileProvider.computeTileLoadPriority(i,n)),t.push(i))}function k$b(){this.allAreRenderable=!0,this.anyWereRenderedLastFrame=!1,this.notYetRenderableCount=0}function le$6(){this.southwest=new k$b,this.southeast=new k$b,this.northwest=new k$b,this.northeast=new k$b}le$6.prototype.combine=function(e){var t=this.southwest,i=this.southeast,n=this.northwest,r=this.northeast;e.allAreRenderable=t.allAreRenderable&&i.allAreRenderable&&n.allAreRenderable&&r.allAreRenderable,e.anyWereRenderedLastFrame=t.anyWereRenderedLastFrame||i.anyWereRenderedLastFrame||n.anyWereRenderedLastFrame||r.anyWereRenderedLastFrame,e.notYetRenderableCount=t.notYetRenderableCount+i.notYetRenderableCount+n.notYetRenderableCount+r.notYetRenderableCount};for(var V$b=new Array(30),j$8=0;j$8<V$b.length;++j$8)V$b[j$8]=new le$6;function Pe$5(e,t,i,n,r){var o=e._debug;++o.tilesVisited,e._tileReplacementQueue.markTileRendered(i),i._updateCustomData(t.frameNumber),i.level>o.maxDepthVisited&&(o.maxDepthVisited=i.level);var a=Se$4(e,t,i)<e.maximumScreenSpaceError;if(e._tileProvider._terrainProvider._enablePrjArea&&a){var s=i._level+2,l=4*i._x,u=4*i._y;for(let t=0;t<e._tilesToRender.length;t++){const i=e._tilesToRender[t];if(i._level==s&&(i._x==l-1&&i._y==u||i._x==l&&i._y==u-1||i._x==l+3&&i._y==u-1||i._x==l+4&&i._y==u||i._x==l+4&&i._y==u+3||i._x==l+3&&i._y==u+4||i._x==l&&i._y==u+4||i._x==l-1&&i._y==u+3)){a=!1;break}}}var c=i.southwestChild,h=i.southeastChild,d=i.northwestChild,f=i.northeastChild,p=e._lastSelectionFrameNumber,_=i._lastSelectionResultFrame===p?i._lastSelectionResult:D$u.NONE,m=e.tileProvider;if(a||n){var $=D$u.originalResult(_)===D$u.RENDERED,g=D$u.originalResult(_)===D$u.CULLED||_===D$u.NONE,y=i.state===te$C.DONE,v=$||g||y;if(v||t$$(m.canRenderWithoutLosingDetail)&&(v=m.canRenderWithoutLosingDetail(i)),v)return a&&b$i(e,e._tileLoadQueueMedium,i,t),W$8(e,i),r.allAreRenderable=i.renderable,r.anyWereRenderedLastFrame=_===D$u.RENDERED,r.notYetRenderableCount=i.renderable?0:1,i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=D$u.RENDERED,void(r.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(i));n=!0,a&&b$i(e,e._tileLoadQueueHigh,i,t)}if(m.canRefine(i)){if(c.upsampledFromParent&&h.upsampledFromParent&&d.upsampledFromParent&&f.upsampledFromParent)return W$8(e,i),b$i(e,e._tileLoadQueueMedium,i,t),e._tileReplacementQueue.markTileRendered(c),e._tileReplacementQueue.markTileRendered(h),e._tileReplacementQueue.markTileRendered(d),e._tileReplacementQueue.markTileRendered(f),r.allAreRenderable=i.renderable,r.anyWereRenderedLastFrame=_===D$u.RENDERED,r.notYetRenderableCount=i.renderable?0:1,i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=D$u.RENDERED,void(r.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(i));i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=D$u.REFINED;var x=e._tilesToRender.length,b=e._tileLoadQueueLow.length,S=e._tileLoadQueueMedium.length,w=e._tileLoadQueueHigh.length,C=e._tileToUpdateHeights.length;if(Fe$4(e,c,h,d,f,t,n,r),x!==e._tilesToRender.length){var T=r.allAreRenderable,P=r.anyWereRenderedLastFrame,E=r.notYetRenderableCount,A=!1;if(!T&&!P){for(var L=e._tilesToRender,M=x;M<L.length;++M)for(var I=L[M];void 0!==I&&I._lastSelectionResult!==D$u.KICKED&&I!==i;)I._lastSelectionResult=D$u.kick(I._lastSelectionResult),I=I.parent;e._tilesToRender.length=x,e._tileToUpdateHeights.length=C,W$8(e,i),i._lastSelectionResult=D$u.RENDERED;var O=_===D$u.RENDERED;!O&&E>e.loadingDescendantLimit&&(e._tileLoadQueueLow.length=b,e._tileLoadQueueMedium.length=S,e._tileLoadQueueHigh.length=w,b$i(e,e._tileLoadQueueMedium,i,t),r.notYetRenderableCount=i.renderable?0:1,A=!0),r.allAreRenderable=i.renderable,r.anyWereRenderedLastFrame=O,O||e._tileToUpdateHeights.push(i),++o.tilesWaitingForChildren}e.preloadAncestors&&!A&&b$i(e,e._tileLoadQueueLow,i,t)}}else i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=D$u.RENDERED,W$8(e,i),b$i(e,e._tileLoadQueueHigh,i,t),r.allAreRenderable=i.renderable,r.anyWereRenderedLastFrame=_===D$u.RENDERED,r.notYetRenderableCount=i.renderable?0:1}function Fe$4(e,t,i,n,r,o,a,s){if(!(t.level>=V$b.length)){var l=o.camera.positionCartographic,u=e._tileProvider,c=e._occluders,h=V$b[t.level],d=h.southwest,f=h.southeast,p=h.northwest,_=h.northeast;l.longitude<t.rectangle.east?l.latitude<t.rectangle.north?(g$8(e,t,u,o,c,a,d),g$8(e,i,u,o,c,a,f),g$8(e,n,u,o,c,a,p),g$8(e,r,u,o,c,a,_)):(g$8(e,n,u,o,c,a,p),g$8(e,t,u,o,c,a,d),g$8(e,r,u,o,c,a,_),g$8(e,i,u,o,c,a,f)):l.latitude<t.rectangle.north?(g$8(e,i,u,o,c,a,f),g$8(e,t,u,o,c,a,d),g$8(e,r,u,o,c,a,_),g$8(e,n,u,o,c,a,p)):(g$8(e,r,u,o,c,a,_),g$8(e,n,u,o,c,a,p),g$8(e,i,u,o,c,a,f),g$8(e,t,u,o,c,a,d)),h.combine(s)}}function xe$6(e,t){var i=t.rectangle;return t$$(e._cameraPositionCartographic)&&s$1p.contains(i,e._cameraPositionCartographic)||t$$(e._cameraReferenceFrameOriginCartographic)&&s$1p.contains(i,e._cameraReferenceFrameOriginCartographic)}function g$8(e,t,i,n,r,o,a){if(i.computeTileVisibility(t,n,r)!==pe$q.NONE)return Pe$5(e,n,t,o,a);if(++e._debug.tilesCulled,e._tileReplacementQueue.markTileRendered(t),a.allAreRenderable=!0,a.anyWereRenderedLastFrame=!1,a.notYetRenderableCount=0,xe$6(e,t)){(!t$$(t.data)||!t$$(t.data.vertexArray))&&b$i(e,e._tileLoadQueueMedium,t,n);var s=e._lastSelectionFrameNumber,l=t._lastSelectionResultFrame===s?t._lastSelectionResult:D$u.NONE;l!==D$u.CULLED_BUT_NEEDED&&l!==D$u.RENDERED&&e._tileToUpdateHeights.push(t),t._lastSelectionResult=D$u.CULLED_BUT_NEEDED}else e.preloadSiblings||0===t.level?(b$i(e,e._tileLoadQueueLow,t,n),t._lastSelectionResult=D$u.CULLED):t._lastSelectionResult=D$u.CULLED;t._lastSelectionResultFrame=n.frameNumber}function Se$4(e,t,i){if(t.mode===b$1d.SCENE2D||t.camera.frustum instanceof r$K||t.camera.frustum instanceof l$W)return Qe$3(e,t,i);if(i.isModified&&i.level>18)return 0;var n,r=i._distance;if(e._tileProvider._terrainProvider._enablePrjArea){var o=i.data.tileBoundingRegion._orientedBoundingBox.calculateBoxArea(t.camera.positionWC,t.mode,r,t.camera.frustum.sseDenominator,t.context.drawingBufferHeight,-1,t.context.uniformState.mvpViewPort,t.mapProjection);n=Math.sqrt(o/n$1d.PI_OVER_FOUR)/288}else{n=e._tileProvider.getLevelMaximumGeometricError(i.level)*t.context.drawingBufferHeight/(r*t.camera.frustum.sseDenominator)}return 0==e._tileProvider._terrainProvider._enablePrjArea&&t.fog.enabled&&(n-=n$1d.fog(r,t.fog.density)*t.fog.sse),n}function Qe$3(e,t,i){var n=t.camera.frustum;t$$(n._offCenterFrustum)&&(n=n._offCenterFrustum);var r=t.context,o=r.drawingBufferWidth,a=r.drawingBufferHeight,s=e._tileProvider.getLevelMaximumGeometricError(i.level)/(Math.max(n.top-n.bottom,n.right-n.left)/Math.max(o,a));return t.fog.enabled&&t.mode!==b$1d.SCENE2D&&(s-=n$1d.fog(i._distance,t.fog.density)*t.fog.sse),s}function W$8(e,t){t._renderThisFrame=!0,e._tilesToRender.push(t)}function we$2(e,t){var i=e._tileLoadQueueHigh,n=e._tileLoadQueueMedium,r=e._tileLoadQueueLow;if(0!==i.length||0!==n.length||0!==r.length){e._tileReplacementQueue.trimTiles(e.tileCacheSize,e.tileCacheSizeForMVT);var o=yt$9()+e._loadQueueTimeSlice,a=e._tileProvider,s=q$e(e,t,a,o,i,!1);s=q$e(e,t,a,o,n,s),q$e(e,t,a,o,r,s)}}function Ne$3(e,t){return e._loadPriority-t._loadPriority}function q$e(e,t,i,n,r,o){void 0!==i.computeTileLoadPriority&&r.sort(Ne$3);for(var a=0,s=r.length;a<s&&(yt$9()<n||!o);++a){var l=r[a];e._tileReplacementQueue.markTileRendered(l),i.loadTile(t,l),o=!0}return o}var x$g=new n$18,K$8=new i$1g,P$9=new a$11,ke$2=[];function He$2(e,t){if(!e.tileProvider.ready)return;const i=ke$2;i.length=0;const n=e._tileToUpdateHeights,r=yt$9()+e._updateHeightsTimeSlice,o=t.mode,a=t.mapProjection,s=e.tileProvider.tilingScheme.ellipsoid;let l;for(;n.length>0;){const t=n[0];if(!t$$(t.data)||!t$$(t.data.mesh)){const r=t._lastSelectionResultFrame===e._lastSelectionFrameNumber?t._lastSelectionResult:D$u.NONE;(r===D$u.RENDERED||r===D$u.CULLED_BUT_NEEDED)&&i.push(t),n.shift(),e._lastTileIndex=0;continue}const u=t.customData,c=u.length;let h=!1;for(l=e._lastTileIndex;l<c;++l){const e=u[l],i=t.data.terrainData;if(t$$(i)&&i.wasCreatedByUpsampling(),t.level>e.level){if(t$$(e.positionOnEllipsoidSurface)||(e.positionOnEllipsoidSurface=a$11.fromRadians(e.positionCartographic.longitude,e.positionCartographic.latitude,0,s)),o===b$1d.SCENE3D){const i=s.geodeticSurfaceNormal(e.positionOnEllipsoidSurface,x$g.direction);if(!t$$(s.getSurfaceNormalIntersectionWithZAxis(e.positionOnEllipsoidSurface,11500,x$g.origin))){let n=0;t$$(t.data.tileBoundingRegion)&&(n=t.data.tileBoundingRegion.minimumHeight);const r=Math.min(n,-11500),o=a$11.multiplyByScalar(i,Math.abs(r)+1,P$9);a$11.subtract(e.positionOnEllipsoidSurface,o,x$g.origin)}}else i$1g.clone(e.positionCartographic,K$8),K$8.height=-11500,a.project(K$8,P$9),a$11.fromElements(P$9.z,P$9.x,P$9.y,P$9),a$11.clone(P$9,x$g.origin),a$11.clone(a$11.UNIT_X,x$g.direction);const i=t.data.pick(x$g,o,a,!1,P$9);t$$(i)&&(t$$(e.callback)&&e.callback(i),e.level=t.level)}if(yt$9()>=r){h=!0;break}}if(h){e._lastTileIndex=l;break}e._lastTileIndex=0,n.shift()}for(l=0;l<i.length;l++)n.push(i[l])}function Oe$4(e,t){for(var i=e._tileProvider,n=e._zeroTileReady?e._tilesToRender:e._tilesToRenderOld,r=0,o=n.length;r<o;++r){var a=n[r];i.showTileThisFrame(a,t)}}function p$e(e){this._bounds=void 0;var t=512;this._canvas=document.createElement("canvas"),this._canvas.height=t,this._canvas.width=t,this._pickCanvas=document.createElement("canvas"),this._pickCanvas.height=t,this._pickCanvas.width=t,this._polygons=new e$1F,this._polygonHoles=new e$1F,this._polylines=new e$1F,this._quadtreePrimitive=e,this._alpha=1}Object.defineProperties(p$e.prototype,{bounds:{get:function(){return this._bounds}},canvasWidth:{get:function(){return this._canvas.width}},canvasHeight:{get:function(){return this._canvas.height}},alpha:{get:function(){return this._alpha},set:function(e){this._alpha=e}}});var H$e=new s$1p;function c$d(e,t){if(t$$(t)){var i=e._rectangle;t$$(s$1p.intersection(t,i,H$e))&&(e._2DRasterized=!1),t$$(e._southwestChild)&&c$d(e._southwestChild,t),t$$(e._southeastChild)&&c$d(e._southeastChild,t),t$$(e._northwestChild)&&c$d(e._northwestChild,t),t$$(e._northeastChild)&&c$d(e._northeastChild,t)}}function M$d(e){var t,i,n=e._polygons,r=n.values.length;for(t=0;t<r;t++)i=n.values[t].bounds,t$$(e._bounds)?e._bounds=s$1p.union(i,e._bounds):e._bounds=i;for(r=(n=e._polygonHoles).values.length,t=0;t<r;t++)i=n.values[t].bounds,t$$(e._bounds)?e._bounds=s$1p.union(i,e._bounds):e._bounds=i;for(r=(n=e._polylines).values.length,t=0;t<r;t++)i=n.values[t].bounds,t$$(e._bounds)?e._bounds=s$1p.union(i,e._bounds):e._bounds=i}function q$d(e,t,i,n){for(var r=e.length,o=[],a=i/t.width,s=n/t.height,l=0;l<r;l++){var u=e[l],c=new r$T;c.x=(u.longitude-t.west)*a,c.y=(t.north-u.latitude)*s,c.x=Math.floor(c.x+.5),c.y=Math.floor(c.y+.5),o.push(c)}return o}function T$e(e,t,i,n,r,o){var a,s=t.values.length;for(a=0;a<s;a++){var l=t.values[a];if(t$$(s$1p.intersection(l.bounds,i,H$e))){var u;u=t$$(l.selected)&&l.selected?e$1z.BLUE:o?new e$1z(0,0,0,1):l.fillColor;var c=q$d(l.positions,i,n,r);t$b.drawPolygon(e,{canvasPostions:c,fillColor:u,lineColor:l.lineColor,lineWidth:l.lineWidth})}}}function A$g(e,t,i,n,r){var o,a=t.values.length;for(o=0;o<a;o++){var s=t.values[o];if(t$$(s$1p.intersection(s.bounds,i,H$e))){var l=q$d(s.positions,i,n,r);t$b.drawSimplePolyline(e,{canvasPostions:l,lineColor:s.lineColor,lineWidth:s.lineWidth})}}}function D$c(e,t){var i=Math.floor(e/65536),n=e-65536*i,r=Math.floor(n/256),o=n-256*r,a=1;return t$$(t)&&(a=t/256),new e$1z(o/256,r/256,i/256,a)}p$e.prototype.add=function(e){var t=e.name,i=e.positions,n=new s$1p,r=e$1Y(e.geometryType,C$o.POLYGON),o=e$1Y(e.pickId,0);s$1p.fromCartographicArray(i,n);var a={pickId:o,positions:i,bounds:n,fillColor:e.fillColor,lineColor:e.lineColor,lineWidth:e.lineWidth};r==C$o.POLYLINE?this._polylines.set(t,a):r==C$o.POLYGON?this._polygons.set(t,a):r==C$o.POLYGON_HOLE&&this._polygonHoles.set(t,a),M$d(this),c$d(this._quadtreePrimitive._levelZeroTiles[0],n),c$d(this._quadtreePrimitive._levelZeroTiles[1],n)},p$e.prototype.remove=function(e){var t;if(this._polygons.contains(e)){var i=this._polygons.get(e);t$$(i)&&(t=i.bounds),this._polygons.remove(e)}if(this._polygonHoles.contains(e)){var n=this._polygonHoles.get(e);t$$(n)&&(t=n.bounds),this._polygonHoles.remove(e)}if(this._polylines.contains(e)){var r=this._polylines.get(e);t$$(r)&&(t=r.bounds),this._polylines.remove(e)}c$d(this._quadtreePrimitive._levelZeroTiles[0],t),c$d(this._quadtreePrimitive._levelZeroTiles[1],t)},p$e.prototype.removeAll=function(){this._polylines.removeAll(),this._polygons.removeAll(),this._polygonHoles.removeAll(),c$d(this._quadtreePrimitive._levelZeroTiles[0],this._bounds),c$d(this._quadtreePrimitive._levelZeroTiles[1],this._bounds)},p$e.prototype.draw=function(e){var t=this._canvas.getContext("2d");return t.clearRect(0,0,this._canvas.width,this._canvas.height),T$e(t,this._polygons,e,this._canvas.width,this._canvas.height,!1),T$e(t,this._polygonHoles,e,this._canvas.width,this._canvas.height,!0),A$g(t,this._polylines,e,this._canvas.width,this._canvas.height),t.getImageData(0,0,this._canvas.width,this._canvas.height)};var u$d=new s$1p;function u$c(e){var t=new t$P({ellipsoid:e=e$1Y(e,n$1c.WGS84)}),i=new o$f,n=new o$e;this._ellipsoid=e,this._imageryLayerCollection=i,this._terrainLayerCollection=n,this._surfaceShaderSet=new b$k,this._material=void 0,this._surface=new T$f({tileProvider:new R$h({terrainProvider:t,imageryLayers:i,terrainLayers:n,surfaceShaderSet:this._surfaceShaderSet})}),this._terrainLayerCollection._globe=this,this._rasterVectorCollection=new p$e(this._surface),this._terrainProvider=t,this._defaultTerrainProvider=t,this._terrainProviderChanged=new o$15,Z$9(this),this.show=!0,this._oceanNormalMapResourceDirty=!0,this._oceanNormalMapResource=new t$X({url:o$12("Assets/Textures/waterNormalsSmall.jpg")}),this.maximumScreenSpaceError=2,this.tileCacheSize=100,this.tileCacheSizeForMVT=100,this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!0,this.fillHighlightColor=void 0,this.enableLighting=!1,this.dynamicAtmosphereLighting=!0,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!0,this.lightingFadeOutDistance=1e7,this.lightingFadeInDistance=2e7,this.nightFadeOutDistance=1e7,this.nightFadeInDistance=5e7,this.showWaterEffect=!0,this.depthTestAgainstTerrain=!0,this.shadows=q$Q.RECEIVE_ONLY,this.atmosphereHueShift=0,this.atmosphereSaturationShift=0,this.atmosphereBrightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this._oceanNormalMap=void 0,this._zoomedOutOceanSpecularIntensity=void 0,this._globeAlpha=1,this._splitDirection=new r$T(0,0),this._sceneMode=b$1d.SCENE3D,this.clippingType=L$o.KeepOutside,this.showExcavationSide=!0,this._scene=void 0,this._excavationNormalTextureUrl=o$12("Assets/Textures/excavationregion_top_Normal.jpg"),this._excavationSideNormalTextureUrl=o$12("Assets/Textures/excavationregion_side_Normal.jpg"),this._floodFlagTexture=void 0,this._floodRect=new a$10}function Z$9(e){var t=[],i=t$$(e._material)&&(e._material.shaderSource.match(/slope/)||e._material.shaderSource.match("normalEC")),n=[se$3];!t$$(e._material)||i&&!e._terrainProvider.requestVertexNormals?e._surface._tileProvider.uniformMap=void 0:(n.push(e._material.shaderSource),t.push("APPLY_MATERIAL"),e._surface._tileProvider.uniformMap=e._material._uniforms),n.push(Ee$6),e._surfaceShaderSet.baseVertexShaderSource=new a$O({sources:[se$3,De$6],defines:t}),e._surfaceShaderSet.baseFragmentShaderSource=new a$O({sources:n,defines:t}),e._surfaceShaderSet.material=e._material}function Ye$2(e){return function(t,i){return c$19.distanceSquaredTo(t.pickBoundingSphere,e)-c$19.distanceSquaredTo(i.pickBoundingSphere,e)}}p$e.prototype.getPickID=function(e){var t,i=this._polygons,n=i.values.length,r=[],o=0;for(t=0;t<n;t++){var a=i.values[t].bounds;s$1p.contains(a,e)&&(0==o?s$1p.clone(a,u$d):u$d=s$1p.union(a,u$d),o++,r.push(i.values[t]))}if(0==o)return-1;var s=this._pickCanvas.getContext("2d");for(n=r.length,t=0;t<n;t++){var l=r[t],u=q$d(l.positions,u$d,this._pickCanvas.width,this._pickCanvas.height),c=D$c(l.pickId);t$b.drawPolygon(s,{canvasPostions:u,fillColor:c,lineColor:c})}var h=(e.longitude-u$d.west)/u$d.width*this._pickCanvas.width,d=(u$d.north-e.latitude)/u$d.height*this._pickCanvas.height;h=Math.floor(h+.5);var f=4*((d=Math.floor(d+.5))*this._pickCanvas.width+h),p=s.getImageData(0,0,this._pickCanvas.width,this._pickCanvas.height),_=p.data[f],m=p.data[f+1],$=p.data[f+2];return p.data[f+3],_+256*m+256*$*256},p$e.prototype.setSelection=function(e){var t,i=this._polygons,n=i.values.length,r=0,o=!1;for(t=0;t<n;t++){var a=i.values[t],s=a.pickId,l=a.bounds;o=!1,s===e?(a.selected=!0,o=!0):(t$$(a.selected)&&a.selected&&(o=!0),a.selected=!1),o&&(0==r?s$1p.clone(l,u$d):u$d=s$1p.union(l,u$d),r++)}c$d(this._quadtreePrimitive._levelZeroTiles[0],u$d),c$d(this._quadtreePrimitive._levelZeroTiles[1],u$d)},p$e.prototype.isDestroyed=function(){return!1},p$e.prototype.destroy=function(){return s$1e(this)},new c$1a(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),Object.defineProperties(u$c.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},imageryLayers:{get:function(){return this._imageryLayerCollection}},terrainLayers:{get:function(){return this._terrainLayerCollection}},imageryLayersUpdatedEvent:{get:function(){return this._surface.tileProvider.imageryLayersUpdatedEvent}},tileLoadedEvent:{get:function(){return this._surface.tileProvider.tileLoadedEvent}},tilesLoaded:{get:function(){return!t$$(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){t$$(e)||(e=s$1p.clone(s$1p.MAX_VALUE)),this._surface.tileProvider.cartographicLimitRectangle=e}},oceanNormalMapUrl:{get:function(){return this._oceanNormalMapResource.url},set:function(e){this._oceanNormalMapResource.url=e,this._oceanNormalMapResourceDirty=!0}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){e!==this._terrainProvider&&(this._terrainProvider=e,this._terrainProviderChanged.raiseEvent(e),t$$(this._material)&&Z$9(this))}},terrainProviderChanged:{get:function(){return this._terrainProviderChanged}},tileLoadProgressEvent:{get:function(){return this._surface.tileLoadProgressEvent}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,Z$9(this))}},globeAlpha:{get:function(){return this._globeAlpha},set:function(e){t$$(e)&&e>=0&&e<=1&&(this._globeAlpha=e,this._surface.tileProvider.globeAlpha=e)}},cullEnabled:{get:function(){return this._surface._tileProvider._cullEnabled},set:function(e){if(n$1e.typeOf.bool("cullEnabled",e),t$$(e)&&(this._surface._tileProvider._cullEnabled=e,t$$(this._surface._tileProvider._renderState))){var t=p$1a.getState(this._surface._tileProvider._renderState);t.cull.enabled=e,this._surface._tileProvider._renderState=p$1a.fromCache(t)}}},HypsometricSetting:{get:function(){return{hypsometricSetting:this._surface._tileProvider._hypsometricSetting,analysisMode:this._surface._tileProvider._hypAnalysisMode,altitudeMode:this._surface._tileProvider._style3D._altitudeMode}},set:function(e){if(this.removeRasterRegions(),this._surface._tileProvider._bUseHypColorTable=!1,this._surface._tileProvider._hypsometricRegionUpdate=!0,t$$(this._surface._tileProvider._hypsometricRegion)&&(t$$(this._surface._tileProvider._hypsometricRegion.command)&&(this._surface._tileProvider._hypsometricRegion.command.vertexArray.destroy(),this._surface._tileProvider._hypsometricRegion.command.shaderProgram.destroy()),this._surface._tileProvider._hypsometricRegion=null),t$$(e)&&t$$(e.hypsometricSetting)){if(this._surface._tileProvider._hypAnalysisMode=e.analysisMode||this._surface._tileProvider._hypAnalysisMode,this._surface._tileProvider._hypsometricSetting=_$P.clone(e.hypsometricSetting,this._surface._tileProvider._hypsometricSetting),this._surface._tileProvider._hypsometricSetting.ColorTable.generateBuffer(),t$$(this._surface._tileProvider._hypsometricTexture)&&this._surface._tileProvider._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._surface._tileProvider._hypsometricSetting.ColorTable._imageBuffer}),this._surface._tileProvider._hypAnalysisMode!=J$O.AnalysisRegionMode.ARM_NONE&&(this._surface._tileProvider._bUseHypColorTable=!0),this._surface._tileProvider._hypsometricSetting.UpdatePolygonRegion&&this._surface._tileProvider._hypAnalysisMode==J$O.AnalysisRegionMode.ARM_REGION&&this._surface._tileProvider._hypsometricSetting.CoverageArea.length>0){var t=this._surface._tileProvider._hypsometricSetting.CoverageArea,i=a$11.fromDegreesArrayHeights(t),n=s$1p.fromCartesianArray(i),r=S$C.createGeometry(new S$C({polygonHierarchy:{positions:a$11.fromDegreesArrayHeights(t)}}));this._surface._tileProvider._hypsometricRegion={rectangle:n,worldGeometry:r,modelMatrix:c$1a.fromTranslation(new a$11(t[0],t[1],0),new c$1a),command:void 0}}}else t$$(this._surface._tileProvider._hypsometricSetting)&&(this._surface._tileProvider._hypsometricSetting.destroy(),this._surface._tileProvider._hypsometricSetting=void 0)}},SlopeSetting:{get:function(){return{slopeSetting:this._surface._tileProvider._slopeSetting,analysisMode:this._surface._tileProvider._slopeAnalysisMode,altitudeMode:this._surface._tileProvider._style3D._altitudeMode}},set:function(e){if(this.removeRasterRegions(),this._surface._tileProvider._bUseSlopeColorTable=!1,this._surface._tileProvider._slopeRegionUpdate=!0,t$$(this._surface._tileProvider._slopeRegion)&&(t$$(this._surface._tileProvider._slopeRegion.command)&&(this._surface._tileProvider._slopeRegion.command.vertexArray.destroy(),this._surface._tileProvider._slopeRegion.command.shaderProgram.destroy()),this._surface._tileProvider._slopeRegion=null),t$$(e)&&t$$(e.slopeSetting)){if(this._surface._tileProvider._slopeAnalysisMode=e.analysisMode,this._surface._tileProvider._slopeSetting=r$A.clone(e.slopeSetting,this._surface._tileProvider._slopeSetting),this._surface._tileProvider._slopeSetting.ColorTable.generateBuffer(),t$$(this._surface._tileProvider._slopeColorTexture)&&this._surface._tileProvider._slopeColorTexture.copyFrom({width:1024,height:64,arrayBufferView:this._surface._tileProvider._slopeSetting.ColorTable._imageBuffer}),this._surface._tileProvider._slopeAnalysisMode!=J$O.AnalysisRegionMode.ARM_NONE&&(this._surface._tileProvider._bUseSlopeColorTable=!0),this._surface._tileProvider._slopeSetting.UpdatePolygonRegion&&this._surface._tileProvider._slopeAnalysisMode==J$O.AnalysisRegionMode.ARM_REGION&&this._surface._tileProvider._slopeSetting.CoverageArea.length>0){var t=this._surface._tileProvider._slopeSetting.CoverageArea,i=a$11.fromDegreesArrayHeights(t),n=s$1p.fromCartesianArray(i),r=S$C.createGeometry(new S$C({polygonHierarchy:{positions:a$11.fromDegreesArrayHeights(t)}}));this._surface._tileProvider._slopeRegion={rectangle:n,worldGeometry:r,modelMatrix:c$1a.fromTranslation(new a$11(t[0],t[1],0),new c$1a),command:void 0}}}else t$$(this._surface._tileProvider._slopeSetting)&&(this._surface._tileProvider._slopeSetting.destroy(),this._surface._tileProvider._slopeSetting=void 0)}},splitDirection:{get:function(){return this._splitDirection},set:function(e){r$T.clone(e,this._splitDirection),r$T.clone(e,this._surface._tileProvider._splitDirection)}},swipeRegion:{get:function(){var e=this._surface._tileProvider._swipeRegion;return new n$13(e.x,e.y,e.z-e.x,e.w-e.y)},set:function(e){if(t$$(e)){if(!(e instanceof n$13))throw new t$_("swipeRegion must be a instance of BoundingRectangle.");a$10.fromElements(e.x,e.y,e.x+e.width,e.y+e.height,this._surface._tileProvider._swipeRegion)}}},swipeEnabled:{get:function(){return this._surface._tileProvider._swipeEnabled},set:function(e){e!==this._swipeEnabled&&(e?this.splitDirection=new r$T(0,0):a$10.fromElements(0,0,1,1,this._surface._tileProvider._swipeRegion),this._surface._tileProvider._swipeEnabled=e)}},imageryLodTolerance:{get:function(){return this._surface._delicateImagerylength},set:function(e){"number"==typeof e&&(this._surface._delicateImagerylength=e)}},excavationSideTextureUrl:{get:function(){return this._surface.tileProvider._excavationSideTextureUrl},set:function(e){this._surface.tileProvider._excavationSideTextureUrl=e}},excavationBottomTextureUrl:{get:function(){return this._surface.tileProvider._excavationBottomTextureUrl},set:function(e){this._surface.tileProvider._excavationBottomTextureUrl=e}}});var Ze$2=[],Je$1={start:0,stop:0};u$c.prototype.pickWorldCoordinates=function(e,t,i){if(!t$$(e))throw new t$_("ray is required");if(!t$$(t))throw new t$_("scene is required");var n=t.mode,r=t.mapProjection,o=Ze$2;o.length=0;var a,s,l,u=this._surface._tilesToRender,c=u.length;for(s=0;s<c;++s){var h=(a=u[s]).data;if(t$$(h)){var d=h.pickBoundingSphere;if(n!==b$1d.SCENE3D)h.pickBoundingSphere=d=c$19.fromRectangleWithHeights2D(a.rectangle,r,h.tileBoundingRegion.minimumHeight,h.tileBoundingRegion.maximumHeight,d),a$11.fromElements(d.center.z,d.center.x,d.center.y,d.center);else{if(!t$$(h.renderedMesh))continue;c$19.clone(h.renderedMesh.boundingSphere3D,d)}t$$(h$1b.raySphere(e,d,Je$1))&&o.push(h)}}for(o.sort(Ye$2(e.origin)),c=o.length,s=0;s<c&&!t$$(l=o[s].pick(e,t.mode,t.mapProjection,!0,i));++s);return l};var J$9=new a$11,K$7=new a$11,$$7=new a$11;u$c.prototype.computeSurfaceArea=function(e,t,i){var n,r=e._polygonHierarchy.positions;if(!t$$(i)){for(var o=Number.MAX_VALUE,a=-Number.MAX_VALUE,s=Number.MAX_VALUE,l=-Number.MAX_VALUE,u=0;u<r.length;u++){var c=i$1g.fromCartesian(r[u]);o=Math.min(c.longitude,o),a=Math.max(c.longitude,a),s=Math.min(c.latitude,s),l=Math.max(c.latitude,l)}var h=i$1g.toCartesian(new i$1g(o,s,0)),d=i$1g.toCartesian(new i$1g(a,l,0));n=a$11.angleBetween(h,d)}for(var f=S$C.fromPositions({positions:r,granularity:t$$(i)?i:n/32}),p=S$C.createGeometry(f),_=0,m={},$=0;$<p.indices.length;$+=3){var g,y,v,x=p.indices[$];if(t$$(m[x]))g=m[x];else{g=new a$11(p.attributes.position.values[3*x],p.attributes.position.values[3*x+1],p.attributes.position.values[3*x+2]);var b=i$1g.fromCartesian(g),S=this.getHeight(b);if(!t$$(S))continue;b=i$1g.fromRadians(b.longitude,b.latitude,S),g=i$1g.toCartesian(b,t),m[x]=a$11.clone(g)}var w=p.indices[$+1];if(t$$(m[w]))y=m[w];else{y=new a$11(p.attributes.position.values[3*w],p.attributes.position.values[3*w+1],p.attributes.position.values[3*w+2]);var C=i$1g.fromCartesian(y),T=this.getHeight(C);if(!t$$(T))continue;C=i$1g.fromRadians(C.longitude,C.latitude,T),y=i$1g.toCartesian(C,t),m[w]=a$11.clone(y)}var P=p.indices[$+2];if(t$$(m[P]))v=m[P];else{v=new a$11(p.attributes.position.values[3*P],p.attributes.position.values[3*P+1],p.attributes.position.values[3*P+2]);var E=i$1g.fromCartesian(v),A=this.getHeight(E);if(!t$$(A))continue;E=i$1g.fromRadians(E.longitude,E.latitude,A),v=i$1g.toCartesian(E,t),m[P]=a$11.clone(v)}J$9=a$11.subtract(y,g,J$9),K$7=a$11.subtract(v,g,K$7),$$7=a$11.cross(J$9,K$7,$$7),_+=.5*a$11.magnitude($$7)}return _},u$c.prototype.getVisibleTiles=function(){for(var e=[],t=this._surface._tilesToRender,i=0;i<t.length;i++)e.push({x:t[i].x,y:t[i].y,level:t[i].level});return e},u$c.prototype.computeSurfaceDistance=function(e,t){for(var i=e._positions,n=0,r=[],o=i.length-1,a=0;a<o;a++)for(var s=i[a],l=i[a+1],u=a$11.angleBetween(s,l)/64,c=n$1d.chordLength(u,6378137),h=g$K.subdivideLine(s,l,c,r),d=a$11.unpackArray(h),f=d.length-1,p=0;p<f;p++){var _=d[p],m=i$1g.fromCartesian(_),$=this.getHeight(m);if(t$$($)){m=i$1g.fromRadians(m.longitude,m.latitude,$);var g=i$1g.toCartesian(m),y=d[p+1];if(m=i$1g.fromCartesian(y),t$$($=this.getHeight(m))){m=i$1g.fromRadians(m.longitude,m.latitude,$);var v=i$1g.toCartesian(m);n+=a$11.distance(g,v)}}}return n};var Ke$1=new i$1g;u$c.prototype.pick=function(e,t,i){if(this.show){if(t$$(i=this.pickWorldCoordinates(e,t,i))&&t.mode!==b$1d.SCENE3D){i=a$11.fromElements(i.y,i.z,i.x,i);var n=t.mapProjection.unproject(i,Ke$1);i=t.globe.ellipsoid.cartographicToCartesian(n,i)}return i}};var $e$1=new a$11,me$4=new a$11,er$1=new i$1g,rr$1=new n$18;function U$a(e,t){return s$1p.contains(e.rectangle,t)?e:void 0}function de$4(e){for(var t=Number.MAX_VALUE,i=-Number.MAX_VALUE,n=2,r=e.length;n<r;n+=3){var o=e[n];t=Math.min(t,o),i=Math.max(i,o)}return{min:t,max:i}}function tr$1(e,t,i){var n=s$1p.center(t,new a$11);n.height=i,n=i$1g.toCartesian(n);var r=a$11.distance(e[0],e[1])/90,o=[];for(let t=0;t<e.length;t++){var a=new a$11,s=a$11.subtract(e[t],n,new a$11);a$11.normalize(s,s),a$11.multiplyComponents(s,new a$11(r,r,r),a),a$11.subtract(e[t],a,a);var l=i$1g.fromCartesian(a),u=n$1d.toDegrees(l.longitude),c=n$1d.toDegrees(l.latitude);o.push(u),o.push(c),o.push(l.height)}return o}function ir$1(e,t){var i=e.mapProjection,n=i.ellipsoid,r=new a$11,o=new i$1g;return n.cartesianToCartographic(t,o),i.project(o,r),a$11.fromElements(r.z,r.x,r.y)}function he$4(e,t){if(!t$$(t._surface)||!t$$(t._surface._tileProvider))return!1;var i=t._surface._tileProvider;if(t$$(t._slopeSetting)&&i._modifyRegions.values.length>0)return!1;var n=t._surface._levelZeroTiles;if(!t$$(n))return!1;var r,o,a=n.length;for(o=0;o<a&&(r=n[o],!s$1p.contains(r.rectangle,e));++o);if(o>=a)return!1;for(;r._lastSelectionResult===D$u.REFINED;)r=U$a(r.southwestChild,e)||U$a(r.southeastChild,e)||U$a(r.northwestChild,e)||r.northeastChild;for(var s=r.data,l=s.normalTexture,u=s.terrainData.normalTexture;!(u||(r=r.parent,u=r.data.terrainData.normalTexture,l=r.data.normalTexture,r.level<10)););if(!t$$(u)||!t$$(l))return!1;var c=parseInt((e.longitude-r.rectangle.west)/(r.rectangle.east-r.rectangle.west)*l.width)+parseInt((r.rectangle.north-e.latitude)/(r.rectangle.north-r.rectangle.south)*l.height)*l.width,h=new a$11;return h.x=2*(u[3*c]/255-.5),h.y=2*(u[3*c+1]/255-.5),h.z=2*(u[3*c+2]/255-.5),a$11.normalize(h,h),h}function f$g(){this._colorTexture=void 0,this._depthStencilTexture=void 0,this._globeDepthTexture=void 0,this._tempGlobeDepthTexture=void 0,this._tempCopyDepthTexture=void 0,this._colorRenderBuffer=void 0,this._depthStencilRenderbuffer=void 0,this._copyDepthFramebuffer=void 0,this._tempCopyDepthFramebuffer=void 0,this._updateDepthFramebuffer=void 0,this._framebufferWithTexture=void 0,this._framebufferWithRenderbuffer=void 0,this._isMSAA=!1,this._clearColorCommand=void 0,this._copyColorCommand=void 0,this._copyDepthCommand=void 0,this._tempCopyDepthCommand=void 0,this._updateDepthCommand=void 0,this._viewport=new n$13,this._rs=void 0,this._rsUpdate=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useLogDepth=void 0,this._useHdr=void 0,this._debugGlobeDepthViewportCommand=void 0}function W$7(e,t,i,n){if(!t$$(e._debugGlobeDepthViewportCommand)||n!==e._useLogDepth){var r=new a$O({defines:[n?"LOG_DEPTH":""],sources:["uniform highp sampler2D u_depthTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n float z_window = czm_unpackDepth(texture2D(u_depthTexture, v_textureCoordinates));\n z_window = czm_reverseLogDepth(z_window); \n float n_range = czm_depthRange.near;\n float f_range = czm_depthRange.far;\n float z_ndc = (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n float scale = pow(z_ndc * 0.5 + 0.5, 8.0);\n gl_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);\n}\n"]});e._debugGlobeDepthViewportCommand=t.createViewportQuadCommand(r,{uniformMap:{u_depthTexture:function(){return e._globeDepthTexture}},owner:e}),e._useLogDepth=n}e._debugGlobeDepthViewportCommand.execute(t,i)}function E$e(e){e._colorTexture=e._colorTexture&&!e._colorTexture.isDestroyed()&&e._colorTexture.destroy(),e._depthStencilTexture=e._depthStencilTexture&&!e._depthStencilTexture.isDestroyed()&&e._depthStencilTexture.destroy(),e._globeDepthTexture=e._globeDepthTexture&&!e._globeDepthTexture.isDestroyed()&&e._globeDepthTexture.destroy()}function N$c(e){e._colorRenderBuffer=e._colorRenderBuffer&&!e._colorRenderBuffer.isDestroyed()&&e._colorRenderBuffer.destroy(),e._depthStencilRenderbuffer=e._depthStencilRenderbuffer&&!e._depthStencilRenderbuffer.isDestroyed()&&e._depthStencilRenderbuffer.destroy()}function A$f(e){e._framebufferWithTexture=e._framebufferWithTexture&&!e._framebufferWithTexture.isDestroyed()&&e._framebufferWithTexture.destroy(),e._framebufferWithRenderbuffer=e._framebufferWithRenderbuffer&&!e._framebufferWithRenderbuffer.isDestroyed()&&e._framebufferWithRenderbuffer.destroy(),e._copyDepthFramebuffer=e._copyDepthFramebuffer&&!e._copyDepthFramebuffer.isDestroyed()&&e._copyDepthFramebuffer.destroy()}function x$f(e){e._tempCopyDepthFramebuffer=e._tempCopyDepthFramebuffer&&!e._tempCopyDepthFramebuffer.isDestroyed()&&e._tempCopyDepthFramebuffer.destroy(),e._updateDepthFramebuffer=e._updateDepthFramebuffer&&!e._updateDepthFramebuffer.isDestroyed()&&e._updateDepthFramebuffer.destroy(),e._tempGlobeDepthTexture=e._tempGlobeDepthTexture&&!e._tempGlobeDepthTexture.isDestroyed()&&e._tempGlobeDepthTexture.destroy()}function R$9(e,t,i,n,r){e._tempGlobeDepthTexture=new P$S({context:t,width:i,height:n,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST})}),e._tempCopyDepthFramebuffer=new u$F({context:t,colorTextures:[e._tempGlobeDepthTexture],destroyAttachments:!1});var o=r.framebuffer.depthStencilTexture;e._isMSAA&&(o=e._depthStencilTexture),e._updateDepthFramebuffer=new u$F({context:t,colorTextures:[e._globeDepthTexture],depthStencilTexture:o,destroyAttachments:!1})}function B$8(e,t,i,n,r){var o=r?t.halfFloatingPointTexture?v$Z.HALF_FLOAT:v$Z.FLOAT:v$Z.UNSIGNED_BYTE;e._colorTexture=new P$S({context:t,width:i,height:n,pixelFormat:Z$_.RGBA,pixelDatatype:o,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST})}),e._depthStencilTexture=new P$S({context:t,width:i,height:n,pixelFormat:Z$_.DEPTH_STENCIL,pixelDatatype:v$Z.UNSIGNED_INT_24_8}),e._globeDepthTexture=new P$S({context:t,width:i,height:n,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST})})}function O$a(e,t,i,n,r){if(e._isMSAA){var o=r?t.halfFloatingPointTexture?v$Z.HALF_FLOAT:v$Z.FLOAT:v$Z.UNSIGNED_BYTE;e._colorRenderBuffer=new h$q({context:t,width:i,height:n,pixelDatatype:o,format:Z$_.RGBA,samples:t.msaaLevel}),e._depthStencilRenderbuffer=new h$q({context:t,width:i,height:n,format:E$r.DEPTH_STENCIL,samples:t.msaaLevel})}}function z$d(e,t){e._isMSAA&&(e._framebufferWithRenderbuffer=new u$F({context:t,colorRenderbuffers:[e._colorRenderBuffer],depthStencilRenderbuffer:e._depthStencilRenderbuffer,destroyAttachments:!1})),e._framebufferWithTexture=new u$F({context:t,colorTextures:[e._colorTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._copyDepthFramebuffer=new u$F({context:t,colorTextures:[e._globeDepthTexture],destroyAttachments:!1})}function I$c(e,t,i,n,r){t.msaaLevel>1&&(e._isMSAA=!0);var o=e._colorTexture,a=!t$$(o)||o.width!==i||o.height!==n||r!==e._useHdr;(!t$$(e._framebufferWithTexture)||a)&&(E$e(e),A$f(e),B$8(e,t,i,n,r),O$a(e,t,i,n,r),z$d(e,t))}function b$h(e,t,i,n,r){e._viewport.width=i,e._viewport.height=n;var o=!n$13.equals(e._viewport,r.viewport),a=o!==e._useScissorTest;e._useScissorTest=o,n$13.equals(e._scissorRectangle,r.viewport)||(e._scissorRectangle=n$13.clone(r.viewport,e._scissorRectangle),a=!0),(!t$$(e._rs)||!n$13.equals(e._viewport,e._rs.viewport)||a)&&(e._rs=p$1a.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}}),e._rsUpdate=p$1a.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!1,frontFunction:h$N.EQUAL,frontOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.KEEP},backFunction:h$N.NEVER,reference:Ia$1.CESIUM_3D_TILE_MASK,mask:Ia$1.CESIUM_3D_TILE_MASK}})),t$$(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(S$k,{uniformMap:{u_depthTexture:function(){return e._depthStencilTexture}},owner:e})),e._copyDepthCommand.framebuffer=e._copyDepthFramebuffer,e._copyDepthCommand.renderState=e._rs,t$$(e._copyColorCommand)||(e._copyColorCommand=t.createViewportQuadCommand(V$c,{uniformMap:{colorTexture:function(){return e._colorTexture}},owner:e})),t$$(e._tempCopyDepthCommand)||(e._tempCopyDepthCommand=t.createViewportQuadCommand(S$k,{uniformMap:{u_depthTexture:function(){return e._tempCopyDepthTexture}},owner:e})),e._tempCopyDepthCommand.framebuffer=e._tempCopyDepthFramebuffer,e._tempCopyDepthCommand.renderState=e._rs,t$$(e._updateDepthCommand)||(e._updateDepthCommand=t.createViewportQuadCommand(V$c,{uniformMap:{colorTexture:function(){return e._tempGlobeDepthTexture}},owner:e})),e._updateDepthCommand.framebuffer=e._updateDepthFramebuffer,e._updateDepthCommand.renderState=e._rsUpdate,t$$(e._clearColorCommand)||(e._clearColorCommand=new r$M({color:new e$1z(0,0,0,0),stencil:0,owner:e})),e._isMSAA?e._clearColorCommand.framebuffer=e._framebufferWithRenderbuffer:e._clearColorCommand.framebuffer=e._framebufferWithTexture}function v$b(){this._image=new Image}function u$b(e){if(!t$$((e=e$1Y(e,e$1Y.EMPTY_OBJECT)).url)&&!t$$(e.metadata))throw new t$_("options.url or options.metadata is required.");var t;if(t$$(e.metadata))t=e.metadata;else{var i=t$X.createIfNeeded(e.url);t=new f$U(i)}this._metadata=t,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=new a$W({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new s$1p(-n$1d.PI,-n$1d.PI,n$1d.PI,n$1d.PI),ellipsoid:e.ellipsoid});var n=e.credit;"string"==typeof n&&(n=new i$17(n)),this._credit=n,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=23,t$$(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new v$b),this._errorEvent=new o$15,this._ready=!1;var r,o=this;this._readyPromise=t.readyPromise.then((function(e){if(!t.imageryPresent){var i=new t$Z("The server "+t.url+" doesn't have imagery");return r=c$_.handleError(r,o,o._errorEvent,i.message,void 0,void 0,void 0,i),c$18.reject(i)}return c$_.handleSuccess(r),o._ready=e,e})).otherwise((function(e){return r=c$_.handleError(r,o,o._errorEvent,e.message,void 0,void 0,void 0,e),c$18.reject(e)}))}function F$9(e,t,i,n,r,o){var a=f$U.tileXYToQuadKey(i,n,r),s=t.imageryVersion;return s=t$$(s)&&s>0?s:1,e._metadata.resource.getDerivedResource({url:"flatfile?f1-0"+a+"-i."+s.toString(),request:o})}function Y$b(e){var t="JFIF";if(e[6]===t.charCodeAt(0)&&e[7]===t.charCodeAt(1)&&e[8]===t.charCodeAt(2)&&e[9]===t.charCodeAt(3))return"image/jpeg";var i="PNG";return e[1]===i.charCodeAt(0)&&e[2]===i.charCodeAt(1)&&e[3]===i.charCodeAt(2)?"image/png":void 0}function q$c(e){for(var t=j$T.Reader.create(e),i=t.len,n={};t.pos<i;){var r=t.uint32();switch(r>>>3){case 1:n.imageType=t.uint32();break;case 2:n.imageData=t.bytes();break;case 3:n.alphaType=t.uint32();break;case 4:n.imageAlpha=t.bytes();break;case 5:var o=n.copyrightIds;if(t$$(o)||(o=n.copyrightIds=[]),2==(7&r))for(var a=t.uint32()+t.pos;t.pos<a;)o.push(t.uint32());else o.push(t.uint32());break;default:t.skipType(7&r)}}var s=n.imageType;if(t$$(s))switch(s){case 0:n.imageType="image/jpeg";break;case 4:n.imageType="image/png";break;default:throw new t$Z("GoogleEarthEnterpriseImageryProvider: Unsupported image type.")}var l=n.alphaType;return t$$(l)&&0!==l&&(console.log("GoogleEarthEnterpriseImageryProvider: External alpha not supported."),delete n.alphaType,delete n.imageAlpha),n}u$c.prototype.getHeight=function(e){if(!t$$(e))throw new t$_("cartographic is required");var t=this._surface._levelZeroTiles;if(t$$(t)){var i,n,r=t.length;for(n=0;n<r&&(i=t[n],!s$1p.contains(i.rectangle,e));++n);if(!(n>=r)){for(;i._lastSelectionResult===D$u.REFINED;)i=U$a(i.southwestChild,e)||U$a(i.southeastChild,e)||U$a(i.northwestChild,e)||i.northeastChild;if(t$$(i.data)&&t$$(i.data.renderedMesh)){var o=this._surface._tileProvider.tilingScheme.ellipsoid,a=a$11.fromRadians(e.longitude,e.latitude,0,o,$e$1),s=rr$1,l=o.geodeticSurfaceNormal(a,s.direction);if(!t$$(o.getSurfaceNormalIntersectionWithZAxis(a,11500,s.origin))){var u=Math.min(e$1Y(i.data.minimumHeight,0),-11500),c=a$11.multiplyByScalar(l,Math.abs(u)+1,me$4);a$11.subtract(a,c,s.origin)}if(t$$(i.data.terrainData)&&i.data.terrainData instanceof k$11)return i.data.terrainData.interpolateHeight(i.rectangle,e.longitude,e.latitude);var h=i.data.pick(s,void 0,void 0,!1,me$4);if(t$$(h))return o.cartesianToCartographic(h,er$1).height}}}},u$c.prototype.update=function(e){!this.show||(e.passes.render&&this._surface.update(e),e.rasterVectorCollection=this._rasterVectorCollection,this.computeGlobeBottomLevel(e))},u$c.prototype.computeGlobeBottomLevel=function(e){for(var t=e.camera.frustum.fov,i=512/Math.tan(.5*t),n=e.camera.position,r=new i$1g.fromCartesian(n),o=new a$11.fromRadians(r.longitude,r.latitude,0),a=i/a$11.distance(n,o),s=0,l=0;l<22;l++){var u=1<<l,c=Math.PI/u,h=a$11.fromRadians(r.longitude+.5*c,r.latitude+.5*c),d=a$11.fromRadians(r.longitude+.5*c,r.latitude-.5*c),f=a$11.fromRadians(r.longitude-.5*c,r.latitude-.5*c),p=a$11.fromRadians(r.longitude-.5*c,r.latitude+.5*c),_=a$11.distance(h,d),m=a$11.distance(d,f),$=a$11.distance(f,p),g=a$11.distance(p,h);if(Math.max(Math.max(Math.max(_,m),$),g)/8*a<32||21==l){s=l;break}}e.globeBottomLevel=s},u$c.prototype.beginFrame=function(e){var t=this._surface,i=t.tileProvider,n=this.terrainProvider,r=this.showWaterEffect&&n.ready&&n.hasWaterMask;if(this._sceneMode=e.mode,r&&this._oceanNormalMapResourceDirty){this._oceanNormalMapResourceDirty=!1;var o=this._oceanNormalMapResource,a=o.url;if(t$$(a)){var s=this;c$18(o.fetchImage(),(function(t){a===s._oceanNormalMapResource.url&&(s._oceanNormalMap=s._oceanNormalMap&&s._oceanNormalMap.destroy(),s._oceanNormalMap=new P$S({context:e.context,source:t}))}))}else this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy()}var l=e.passes,u=e.mode;l.render&&(this.showGroundAtmosphere?this._zoomedOutOceanSpecularIntensity=.4:this._zoomedOutOceanSpecularIntensity=.5,t.maximumScreenSpaceError=this.maximumScreenSpaceError,t.tileCacheSize=this.tileCacheSize,t.tileCacheSizeForMVT=this.tileCacheSizeForMVT,t.loadingDescendantLimit=this.loadingDescendantLimit,t.preloadAncestors=this.preloadAncestors,t.preloadSiblings=this.preloadSiblings,i.terrainProvider=this.terrainProvider,i.lightingFadeOutDistance=this.lightingFadeOutDistance,i.lightingFadeInDistance=this.lightingFadeInDistance,i.nightFadeOutDistance=this.nightFadeOutDistance,i.nightFadeInDistance=this.nightFadeInDistance,i.zoomedOutOceanSpecularIntensity=u===b$1d.SCENE3D?this._zoomedOutOceanSpecularIntensity:0,i.hasWaterMask=r,i.oceanNormalMap=this._oceanNormalMap,i.enableLighting=this.enableLighting,i.dynamicAtmosphereLighting=this.dynamicAtmosphereLighting,i.dynamicAtmosphereLightingFromSun=this.dynamicAtmosphereLightingFromSun,i.showGroundAtmosphere=this.showGroundAtmosphere,i.shadows=this.shadows,i.hueShift=this.atmosphereHueShift,i.saturationShift=this.atmosphereSaturationShift,i.brightnessShift=this.atmosphereBrightnessShift,i.fillHighlightColor=this.fillHighlightColor,i.showSkirts=this.showSkirts,i.backFaceCulling=this.backFaceCulling,i.clippingType=this.clippingType,i.showExcavationSide=this.showExcavationSide,i.excavationNormalTextureUrl=this._excavationNormalTextureUrl,i.excavationSideNormalTextureUrl=this._excavationSideNormalTextureUrl,t.beginFrame(e))},u$c.prototype.render=function(e){if(this.show){t$$(this._material)&&this._material.update(e.context);var t=this._surface,i=e.passes;i.render&&t.render(e),i.pick&&t.render(e)}},u$c.prototype.endFrame=function(e){!this.show||e.passes.render&&this._surface.endFrame(e)},u$c.prototype.isDestroyed=function(){return!1},u$c.prototype.destroy=function(){return this._surfaceShaderSet=this._surfaceShaderSet&&this._surfaceShaderSet.destroy(),this._surface=this._surface&&this._surface.destroy(),this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy(),s$1e(this)},u$c.prototype.addModifyRegion=function(e){var t=e.name,i=e.position;if(!t$$(t)||!t$$(i))return!1;var n=this._surface._tileProvider;if(n._modifyRegions.contains(t))return!1;var r=de$4(i),o=r.min,a=r.max,s=a$11.fromDegreesArrayHeights(i),l=S$C.createGeometry(new S$C({polygonHierarchy:{positions:s},extrudedHeight:Math.min(-1e3,o),perPositionHeight:!0}));if(!l)return!1;var u=S$C.createGeometry(new S$C({polygonHierarchy:{positions:s},perPositionHeight:!0})),c=s$1p.fromCartesianArray(s),h=[];s.forEach((e=>{h.push(i$1g.fromCartesian(e))}));var d={geometry:l,worldGeometry:u,modelMatrix:c$1a.fromTranslation(new a$11(i[0],i[1],0),new c$1a),rectangle:c,minimumHeight:Math.min(-1e3,o),maximumHeight:a,command:void 0,cartographics:h};return n._modifyRegions.set(t,d),n._modifyRegionUpdate=!0,!0},u$c.prototype.removeModifyRegion=function(e){var t=this._surface._tileProvider,i=t._modifyRegions;if(i.contains(e)){var n=i.get(e);t$$(n.command)&&(n.command.vertexArray=n.command.vertexArray&&!n.command.vertexArray.isDestroyed()&&n.command.vertexArray.destroy(),n.command.shaderProgram=n.command.shaderProgram&&!n.command.shaderProgram.isDestroyed()&&n.command.shaderProgram.destroy()),n.command=void 0,t._modifyRegions.remove(e),t._modifyRegionUpdate=!0}},u$c.prototype.removeAllModifyRegion=function(){for(var e=this._surface._tileProvider,t=Object.keys(e._modifyRegions._hash),i=0,n=t.length;i<n;i++){var r=t[i];this.removeModifyRegion(r)}e._modifyRegions.removeAll()},u$c.prototype.addExcavationRegion=function(e){var t=e.name,i=e.position,n=e.height;if(!t$$(t)||!t$$(i)||!t$$(n))return!1;var r=this._surface._tileProvider;if(r._excavateRegions.contains(t))return!1;var o=1,a=[],s=a$11.fromDegreesArrayHeights(i);let l=[...s,s[0]];for(let e=1;e<l.length;e++){o+=a$11.distance(l[e-1],l[e]),a.push(o)}var u=i.length;i.length/3%2!=0&&(i.push(i[u-1-2]),i.push(i[u-1-1]),i.push(i[u-1]));for(var c=new S$C({polygonHierarchy:{positions:a$11.fromDegreesArrayHeights(i)}}),h=Number.MAX_VALUE,d=0,f=i.length;d<f;d+=3)h=Math.min(h,i[d+2]);var p=S$C.createGeometry(c);if(!p)return!1;var _=S$C.createGeometry(c),m=S$C.createGeometry(c),$=a$11.fromDegreesArrayHeights(i),g={rectangle:s$1p.fromCartesianArray($),geometry:p,worldGeometry:_,colorGeometry:m,positions:i,modelMatrix:c$1a.fromTranslation(new a$11(i[0],i[1],0),new c$1a),command:void 0,name:t,height:h-n,sideLengths:a,round:o};return r._excavateRegions.set(t,g),r._excavateRegionUpdate=!0,r._excavateTransparent=e$1Y(e.transparent,!0),r._excavateTextureWrap=e$1Y(e.textureWrap,j$13.REPEAT),r._excavateExtendHeight=n,!0},u$c.prototype.removeExcavationRegion=function(e){var t=this._surface._tileProvider,i=t._excavateRegions;if(i.contains(e)){t._removeExcavationCommands(e);var n=i.get(e);t$$(n.command)&&(n.command.vertexArray=n.command.vertexArray&&!n.command.vertexArray.isDestroyed()&&n.command.vertexArray.destroy(),n.command.shaderProgram=n.command.shaderProgram&&!n.command.shaderProgram.isDestroyed()&&n.command.shaderProgram.destroy()),t$$(n.removeListenerFunc)&&n.removeListenerFunc(),n.command=void 0,i.remove(e),0===i.length&&(t._onceExcavateRegionsEmpty=!0),t._excavateRegionUpdate=!0}},u$c.prototype.removeAllExcavationRegion=function(){var e=this._surface._tileProvider;e._removeAllExcavationCommands();for(var t=Object.keys(e._excavateRegions._hash),i=0,n=t.length;i<n;i++){var r=t[i];this.removeExcavationRegion(r)}e._excavateRegions.removeAll()},u$c.prototype.addExtractRegion=function(e){var t=e.name,i=e.position,n=e.height,r=e$1Y(e.extractHeight,100),o=e$1Y(e.granularity,1);if(!t$$(t)||!t$$(i)||!t$$(n))return!1;var a=this._surface._tileProvider;if(a._extractRegions.contains(t))return!1;var s=1,l=[],u=a$11.fromDegreesArrayHeights(i);let c=[...u,u[0]];for(let e=1;e<c.length;e++){s+=a$11.distance(c[e-1],c[e]),l.push(s)}var h=i.length;i.length/3%2!=0&&(i.push(i[h-1-2]),i.push(i[h-1-1]),i.push(i[h-1]));var d=de$4(i),f=d.min,p=d.max;p+=r;var _=a$11.fromDegreesArrayHeights(i),m=s$1p.fromCartesianArray(_),$=Math.PI/Math.pow(2,11);$=$/64*o;var g=new S$C({polygonHierarchy:{positions:a$11.fromDegreesArrayHeights(i)},granularity:$});i=tr$1(_,m,p);var y=new S$C({polygonHierarchy:{positions:a$11.fromDegreesArrayHeights(i)}}),v=S$C.createGeometry(y);if(!v)return!1;var x=S$C.createGeometry(g),b=S$C.createGeometry(y),S=S$C.createGeometry(y),w=[];_.forEach((e=>{w.push(i$1g.fromCartesian(e))}));var C={rectangle:m,geometry:v,geometry_extract:x,colorGeometry:b,worldGeometry:S,positions:i,modelMatrix:c$1a.fromTranslation(new a$11(i[0],i[1],0),new c$1a),command:void 0,name:t,height:f-n,minimumHeight:Math.min(0,f),maximumHeight:p,sideLengths:l,round:s,cartographics:w};return a._extractRegions.set(t,C),a._extractRegionsUpdate=!0,a._extractTransparent=e$1Y(e.transparent,!0),a._extractTextureWrap=e$1Y(e.textureWrap,j$13.REPEAT),a._extractExtendHeight=r,a._excavateTransparent=e$1Y(e.transparent,!0),a._excavateTextureWrap=e$1Y(e.textureWrap,j$13.REPEAT),!0},u$c.prototype.removeExtractRegion=function(e){var t=this._surface._tileProvider,i=t._extractRegions;if(i.contains(e)){t._removeExtractCommands(e);var n=i.get(e);t$$(n.command)&&(n.command.vertexArray=n.command.vertexArray&&!n.command.vertexArray.isDestroyed()&&n.command.vertexArray.destroy(),n.command.shaderProgram=n.command.shaderProgram&&!n.command.shaderProgram.isDestroyed()&&n.command.shaderProgram.destroy()),n.command=void 0,i.remove(e),0===i.length&&(t._onceExcavateRegionsEmpty=!0),t._extractRegionsUpdate=!0,n.command=void 0,t._modifyRegions.remove(e),t._modifyRegionUpdate=!0,t._extractExtendHeight=void 0}},u$c.prototype.removeAllExtractRegion=function(){var e=this._surface._tileProvider;e._removeAllExtractCommands();for(var t=Object.keys(e._extractRegions._hash),i=0,n=t.length;i<n;i++){var r=t[i];this.removeExtractRegion(r)}e._extractRegions.removeAll(),e._extractExtendHeight=void 0},u$c.prototype.setClipGeometry=function(e){var t="ExcavationGeometry",i=e.geometry,n=e.scene;if(!t$$(n)||!t$$(i))return!1;var r=this._surface._tileProvider,o=new C$k(n);o.geometry=i,o.positionMode=k$p.Intersects,o._profile=!0,o._beQueryCollection=new _0x1bf60e(n._context);var a={geometry:i,command:void 0,name:t,spatialQuery:o};return r._excavationGeometrys.set(t,a),!0},u$c.prototype.clearClipGeometry=function(){var e=this._surface._tileProvider._excavationGeometrys,t="ExcavationGeometry";if(e.contains(t)){var i=e.get(t);t$$(i.command)&&(i.command.vertexArray=i.command.vertexArray&&!i.command.vertexArray.isDestroyed()&&i.command.vertexArray.destroy(),i.command.shaderProgram=i.command.shaderProgram&&!i.command.shaderProgram.isDestroyed()&&i.command.shaderProgram.destroy()),t$$(i.removeListenerFunc)&&i.removeListenerFunc(),i.command=void 0,e.remove(t)}},u$c.prototype.addImageryClipRegions=function(e){var t=e.name,i=e.position;if(t$$(t)&&t$$(i)&&t$$(e.layers)){var n=this._surface._tileProvider;if(n._imageryClipRegions.contains(t))return!1;var r=new S$C({polygonHierarchy:{positions:a$11.fromDegreesArrayHeights(i)}}),o=S$C.createGeometry(r);if(!o)return!1;for(var a=S$C.createGeometry(r),s=a$11.fromDegreesArrayHeights(i),l={rectangle:s$1p.fromCartesianArray(s),geometry:o,worldGeometry:a,positions:i,modelMatrix:c$1a.fromTranslation(new a$11(i[0],i[1],0),new c$1a),command:void 0,name:t},u=0,c=e.layers.length;u<c;u++)e.layers[u].enableImageryClip=!0;n._imageryClipRegions.set(t,l),n._imageryClipRegionUpate=!0}},u$c.prototype.removeImageryClipRegion=function(e,t){var i=this._surface._tileProvider,n=i._imageryClipRegions;if(n.contains(e)){var r=n.get(e);if(t$$(r.command)&&(r.command.vertexArray=r.command.vertexArray&&!r.command.vertexArray.isDestroyed()&&r.command.vertexArray.destroy(),r.command.shaderProgram=r.command.shaderProgram&&!r.command.shaderProgram.isDestroyed()&&r.command.shaderProgram.destroy()),r.command=void 0,n.remove(e),0===n.length){for(var o=0,a=t.length;o<a;o++)t[o].enableImageryClip=!1;i._onceImageryClipRegionsEmpty=!0}i._imageryClipRegionUpate=!0}},u$c.prototype.clearCustomClipBox=function(){this.clippingPlanes=void 0},u$c.prototype.setCustomClipBox=function(e){if(!(e.dimensions&&e.position||e.planePos&&e.planeNormal))throw new t$_("globe box clip, position and dimensions is required!");if(e.dimensions){var t,i=e.position,n=new e$1L(t$$(e.heading)?e.heading:0,t$$(e.pitch)?e.pitch:0,t$$(e.roll)?e.roll:0);if(this._sceneMode===b$1d.SCENE3D)t=m$13.headingPitchRollToFixedFrame(i,n,n$1c.WGS84,m$13.eastNorthUpToFixedFrame,new c$1a);else{var r=ir$1(this._scene,i);t=c$1a.setTranslation(c$1a.clone(c$1a.IDENTITY),r,new c$1a)}var o=-.5*e.dimensions.x,a=-.5*e.dimensions.y,s=-.5*e.dimensions.z;t$$(e.clipLineColor)?e.clipLineColor:e$1z.WHITE;var l=[new t$x(new a$11(1,0,0),o),new t$x(new a$11(-1,0,0),o),new t$x(new a$11(0,1,0),a),new t$x(new a$11(0,-1,0),a),new t$x(new a$11(0,0,1),s),new t$x(new a$11(0,0,-1),s)]}else{l=[];for(var u=0;u<e.planePos.length;u++){var c=e.planePos[u],h=e.planeNormal[u],d=-a$11.dot(h,c);l.push(new t$x(h,d))}}return this.clippingPlanes=new l$G({modelMatrix:t,planes:l,edgeWidth:1,edgeColor:e$1z.WHITE,unionClippingRegions:!t$$(e.dimensions),enabled:!0}),!0},u$c.prototype.setPolygonOffset=function(e,t){0!=e||0!=t?(this._surface._tileProvider._polygonOffset.enabled=!0,r$T.fromElements(e,t,this._surface._tileProvider._polygonOffset.value)):(this._surface._tileProvider._polygonOffset.enabled=!1,r$T.fromElements(0,0,this._surface._tileProvider._polygonOffset.value))},u$c.prototype.hasTerrainAnalysis=function(){if(!t$$(this._surface)||!t$$(this._surface._tileProvider))return!1;var e=this._surface._tileProvider;return!!(t$$(e._excavateRegions)&&e._excavateRegions.values.length>0||t$$(e._modifyRegions)&&e._modifyRegions.values.length>0||t$$(e._hypsometricSetting)&&e._hypsometricSetting.CoverageArea.length>0||t$$(e._slopeSetting)&&e._slopeSetting.CoverageArea.length>0)},u$c.prototype.getSlopeValue=function(e){var t=he$4(e,this);return t?Math.acos(Math.abs(t.z))*n$1d.DEGREES_PER_RADIAN:0},u$c.prototype.getSlopeDirectionValue=function(e){var t=he$4(e,this);if(!t)return 0;t.z=0;var i=a$11.angleBetween(t,a$11.UNIT_Y);return i=i/n$1d.PI*180,i=a$11.dot(t,a$11.UNIT_X)<0?360-i:i},u$c.prototype.setPBRMaterialFromJSON=function(e){if(this._surface.tileProvider._pbrParameter===We$a.NONE){var t=this;u$$(e).then((function(e){var i=e.material,n=i.pbrMetallicRoughness;i.textureunitstates,t._surface.tileProvider._PBRMaterialParams.baseColorFactor=t$$(n.baseColor)?a$10.fromElements(n.baseColor.x,n.baseColor.y,n.baseColor.z,n.baseColor.w):t._surface.tileProvider._PBRMaterialParams.baseColorFactor,t._surface.tileProvider._PBRMaterialParams.baseColorTextureIndex=t$$(n.baseColorTextureIndex)?n.baseColorTextureIndex:t._surface.tileProvider._PBRMaterialParams.baseColorTextureIndex,t._surface.tileProvider._PBRMaterialParams.emissionFactor=t$$(n.emissiveFactor)?a$11.fromElements(n.emissiveFactor.x,n.emissiveFactor.y,n.emissiveFactor.z):t._surface.tileProvider._PBRMaterialParams.emissionFactor,t._surface.tileProvider._PBRMaterialParams.emissionTextureIndex=t$$(n.emissiveTextureIndex)?n.emissiveTextureIndex:-1,t._surface.tileProvider._PBRMaterialParams.metallic=t$$(n.metallicFactor)?n.metallicFactor:t._surface.tileProvider._PBRMaterialParams.metallic,t._surface.tileProvider._PBRMaterialParams.roughness=t$$(n.roughnessFactor)?n.roughnessFactor:t._surface.tileProvider._PBRMaterialParams.roughness,t._surface.tileProvider._PBRMaterialParams.occlusionTextureIndex=t$$(n.occlusionTextureIndex)?n.occlusionTextureIndex:-1,t._surface.tileProvider._PBRMaterialParams.normalTextureIndex=t$$(n.normalTextureIndex)?n.normalTextureIndex:-1}))}},u$c.prototype.removePBRMaterial=function(){this._surface.tileProvider._PBRMaterialParams={metallic:0,roughness:0,baseColorFactor:new a$10(1,1,1,1),baseColorTextureIndex:-1,emissionFactor:a$11.UNIT_XYZ,emissionTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1}},u$c.prototype._setFloodTexture=function(e,t){this._floodFlagTexture=e,this._floodRect=t},u$c.prototype._removeFloodTexture=function(){this._floodFlagTexture=void 0,this._floodRect=void 0},u$c.prototype.removeRasterRegions=function(){var e=this._surface._tileProvider,t=e._clipRasterTilesMap;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];n._clipRasterTexture=n._clipRasterTexture&&!n._clipRasterTexture.isDestroyed()&&n._clipRasterTexture.destroy(),n._clipRasterFbo=n._clipRasterFbo&&!n._clipRasterFbo.isDestroyed()&&n._clipRasterFbo.destroy(),n._clipRegionsCount=0,n._clipRegionRasterized=!1}e._clipRasterTilesMap={}},Object.defineProperties(f$g.prototype,{framebuffer:{get:function(){return this._isMSAA?this._framebufferWithRenderbuffer:this._framebufferWithTexture}},framebufferWithTexture:{get:function(){return this._framebufferWithTexture}},depthStencilTexture:{get:function(){return this._depthStencilTexture}}}),f$g.prototype.executeDebugGlobeDepth=function(e,t,i){W$7(this,e,t,i)},f$g.prototype.update=function(e,t,i,n){var r=i.width,o=i.height;I$c(this,e,r,o,n),b$h(this,e,r,o,t),e.uniformState.globeDepthTexture=void 0,this._useHdr=n},f$g.prototype.executeCopyDepth=function(e,t){t$$(this._copyDepthCommand)&&(this.copyFromRenderbufferToTexture(e,!1,!0,!1),this._copyDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._globeDepthTexture)},f$g.prototype.executeUpdateDepth=function(e,t,i){var n=t.framebuffer.depthStencilTexture;if(!t$$(n)||!i&&n===this._depthStencilTexture)if(this._isMSAA&&i){if(t$$(this._updateDepthCommand)){if(!t$$(this._updateDepthFramebuffer)||this._updateDepthFramebuffer.getColorTexture(0)!==this._globeDepthTexture){r=this._globeDepthTexture.width,o=this._globeDepthTexture.height;x$f(this),R$9(this,e,r,o,t),b$h(this,e,r,o,t)}this.copyFromRenderbufferToTexture(e,!1,!0,!1),this._tempCopyDepthTexture=this._depthStencilTexture,this._tempCopyDepthCommand.execute(e,t),this._updateDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._globeDepthTexture}}else t$$(this._copyDepthCommand)&&(this.copyFromRenderbufferToTexture(e,!1,!0,!1),this._copyDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._globeDepthTexture);else if(t$$(this._updateDepthCommand)){if(!t$$(this._updateDepthFramebuffer)||this._updateDepthFramebuffer.depthStencilTexture!==n||this._updateDepthFramebuffer.getColorTexture(0)!==this._globeDepthTexture){var r=this._globeDepthTexture.width,o=this._globeDepthTexture.height;x$f(this),R$9(this,e,r,o,t),b$h(this,e,r,o,t)}this._tempCopyDepthTexture=n,this._tempCopyDepthCommand.execute(e,t),this._updateDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._globeDepthTexture}},f$g.prototype.executeCopyColor=function(e,t){t$$(this._copyColorCommand)&&this._copyColorCommand.execute(e,t)},f$g.prototype.copyFromRenderbufferToTexture=function(e,t,i,n){this._isMSAA&&u$F.copyFromFramebufferToFramebuffer(e,this._framebufferWithRenderbuffer,this._framebufferWithTexture,t,i,n)},f$g.prototype.clear=function(e,t,i){var n=this._clearColorCommand;t$$(n)&&(e$1z.clone(i,n.color),n.execute(e,t))},f$g.prototype.isDestroyed=function(){return!1},f$g.prototype.destroy=function(){E$e(this),N$c(this),A$f(this),x$f(this),t$$(this._copyColorCommand)&&(this._copyColorCommand.shaderProgram=this._copyColorCommand.shaderProgram.destroy()),t$$(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=this._copyDepthCommand.shaderProgram.destroy());var e=this._debugGlobeDepthViewportCommand;return t$$(e)&&(e.shaderProgram=e.shaderProgram.destroy()),s$1e(this)},v$b.prototype.isReady=function(){return!0},v$b.prototype.shouldDiscardImage=function(e){return e===this._image},Object.defineProperties(u$b.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tileWidth:{get:function(){if(!this._ready)throw new t$_("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$_("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$_("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$_("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new t$_("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new t$_("rectangle must not be called before the imagery provider is ready.");return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$_("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}}),u$b.prototype.getTileCredits=function(e,t,i){if(!this._ready)throw new t$_("getTileCredits must not be called before the imagery provider is ready.");var n=this._metadata,r=n.getTileInformation(e,t,i);if(t$$(r)){var o=n.providers[r.imageryProvider];if(t$$(o))return[o]}},u$b.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$_("requestImage must not be called before the imagery provider is ready.");var r=this._tileDiscardPolicy._image,o=this._metadata,a=f$U.tileXYToQuadKey(e,t,i),s=o.getTileInformation(e,t,i);if(!t$$(s)){if(o.isValid(a)){var l=new r$V({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction});return void o.populateSubtree(e,t,i,l)}return r}if(!s.hasImagery())return r;var u=F$9(this,s,e,t,i,n).fetchArrayBuffer();return t$$(u)?u.then((function(e){h$X(o.key,e);var t,i=new Uint8Array(e),n=o.protoImagery;if((!t$$(n)||!n)&&(t=Y$b(i)),!t$$(t)&&(!t$$(n)||n)){var a=q$c(i);t=a.imageType,i=a.imageData}return t$$(t)&&t$$(i)?b$14({uint8Array:i,format:t,flipY:!0}):r})):void 0},u$b.prototype.pickFeatures=function(e,t,i,n,r){};var _$d=new e$1z(1,1,1,.4),m$h=new e$1z(0,1,0,.05),f$f=new e$1z(0,.5,0,.2);function n$e(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._tilingScheme=t$$(e.tilingScheme)?e.tilingScheme:new a$W({ellipsoid:e.ellipsoid}),this._cells=e$1Y(e.cells,8),this._color=e$1Y(e.color,_$d),this._glowColor=e$1Y(e.glowColor,m$h),this._glowWidth=e$1Y(e.glowWidth,6),this._backgroundColor=e$1Y(e.backgroundColor,f$f),this._errorEvent=new o$15,this._tileWidth=e$1Y(e.tileWidth,256),this._tileHeight=e$1Y(e.tileHeight,256),this._canvasSize=e$1Y(e.canvasSize,256),this._canvas=this._createGridCanvas(),this._readyPromise=c$18.resolve(!0)}Object.defineProperties(n$e.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}}),n$e.prototype._drawGrid=function(e){for(var t=this._canvasSize,i=0;i<=this._cells;++i){var n=1+i/this._cells*(t-1);e.moveTo(n,0),e.lineTo(n,t),e.moveTo(0,n),e.lineTo(t,n)}e.stroke()},n$e.prototype._createGridCanvas=function(){var e=document.createElement("canvas");e.width=this._canvasSize,e.height=this._canvasSize;var t=this._canvasSize,i=e.getContext("2d"),n=this._backgroundColor.toCssColorString();i.fillStyle=n,i.fillRect(0,0,t,t);var r=this._glowColor.toCssColorString();i.strokeStyle=r,i.lineWidth=this._glowWidth,i.strokeRect(0,0,t,t),this._drawGrid(i),i.lineWidth=.5*this._glowWidth,i.strokeRect(0,0,t,t),this._drawGrid(i);var o=this._color.toCssColorString();return i.strokeStyle=o,i.lineWidth=2,i.strokeRect(0,0,t,t),i.lineWidth=1,this._drawGrid(i),e},n$e.prototype.getTileCredits=function(e,t,i){},n$e.prototype.requestImage=function(e,t,i,n){return this._canvas},n$e.prototype.pickFeatures=function(e,t,i,n,r){};var f$e={None:0,Attribute:1,Slope:2,Aspect:3};function E$d(e){e=e$1Y(e,{}),this._url=e.url+"/",this._useConfigFile=e$1Y(e.useConfigFile,!0),this._compressType="NONE",this._tilingScheme=void 0,this._rectangle=void 0,this._levels=[],this._maxCategory=90,this._minCategory=0,this._dataType=f$e.NONE;var t=e.credit;"string"==typeof t&&(t=new Credit(t)),this._credit=t,this._ready=!1,this._readyPromise=c$18.defer();var i,n=e$1Y(e.ellipsoid,n$1c.WGS84),r=this;function o(e){r._compressType=e.getElementsByTagName("sml:CompressType")[0].textContent;var t=e.getElementsByTagName("sml:Type")[0].textContent;"Slope"==t?r._dataType=f$e.Slope:"Aspect"==t?r._dataType=f$e.Aspect:"Attribute"==t&&(r._dataType=f$e.Attribute),r._cellWidth=parseInt(e.getElementsByTagName("sml:CellWidth")[0].textContent),r._cellHeight=parseInt(e.getElementsByTagName("sml:CellHeight")[0].textContent),r._maxCategory=parseInt(e.getElementsByTagName("sml:MaxHeight")[0].textContent),r._minCategory=parseInt(e.getElementsByTagName("sml:MinHeight")[0].textContent),r._tilingScheme=new a$W({ellipsoid:n}),r._tilingScheme.isSct=!0;var i=e.getElementsByTagName("sml:Bounds")[0],o=n$1d.toRadians(parseFloat(i.getElementsByTagName("sml:Left")[0].textContent)),a=n$1d.toRadians(parseFloat(i.getElementsByTagName("sml:Bottom")[0].textContent)),s=n$1d.toRadians(parseFloat(i.getElementsByTagName("sml:Right")[0].textContent)),l=n$1d.toRadians(parseFloat(i.getElementsByTagName("sml:Top")[0].textContent));r._rectangle=new s$1p(o,a,s,l);for(var u=e.getElementsByTagName("sml:Levels")[0].getElementsByTagName("sml:Level"),c=0;c<u.length;++c){var h=u[c];r._levels.push(parseInt(h.textContent))}r._ready=!0,r._readyPromise.resolve(!0)}function a(e){var t=e$1Y(e,"An error occurred while accessing "+r._url+".");i=TileProviderError.handleError(i,r,r._errorEvent,t,void 0,void 0,void 0,s),r._readyPromise.reject(new RuntimeError(t))}function s(){if(!t$$(e.rectangle)||!t$$(e.levels))throw new t$_("options.rectangles,options.levels is required.");r._compressType=e$1Y(e.compressType,"ZIP"),r._attType=f$e.SLOPE,r._cellWidth=e$1Y(e._cellWidth,32),r._cellHeight=e$1Y(e._cellHeight,32),r._maxCategory=e$1Y(e.maxCategory,90),r._minCategory=e$1Y(e.minCategory,0),r._tilingScheme=new a$W({ellipsoid:n}),r._rectangle=e.rectangle,r._levels=e.levels}this._useConfigFile?c$18(u$_(r._url+"config"),o,a):s(),this._styleEngine=new e$K}Object.defineProperties(E$d.prototype,{url:{get:function(){return this._url}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){if(!this.ready)throw new t$_("requestTileGeometry must not be called before ready returns true.");return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},rectangle:{get:function(){if(!this._ready)throw new t$_("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},errorEvent:{get:function(){return this._errorEvent}},cellWidth:{get:function(){return this._cellWidth}},cellHeight:{get:function(){return this._cellHeight}},minLevel:{get:function(){return this._levels.length>0?Math.min(this._levels[0],this._levels[this._levels.length-1]):-1}},maxLevel:{get:function(){return this._levels.length>0?Math.max(this._levels[0],this._levels[this._levels.length-1]):-1}},minCategory:{get:function(){if(!this._ready)throw new t$_("minCategory must not be called before the grid provider is ready");return this._minCategory}},maxCategory:{get:function(){if(!this._ready)throw new t$_("maxCategory must not be called before the grid provider is ready");return this._maxCategory}}}),E$d.prototype.getTileCredits=function(e,t,i){};var I$b=new s$1p;function R$8(e,t){var n,r;if(2===(n="ZIP"===e._compressType?lt$f.inflate(t).buffer:t[i]).byteLength/(e._cellWidth*e._cellHeight)){var o=new Int16Array(n,0,e._cellWidth*e._cellHeight);r=[];for(var a=0;a<o.length;a++)r.push(parseFloat(o[a]))}else r=new Float32Array(n,0,e._cellWidth*e._cellHeight);return r}function r$b(e){e=e$1Y(e,{}),this._height=this._width=e$1Y(e.quality,2048);var t=e$1Y(e.intensityRange,new r$T(0,1));this._minIntensity=t.x,this._maxIntensity=t.y,this._context=e.context,this._bounds=e.bounds,this._fbIntensity=void 0,this._intensityCommand=void 0,this._heatMapCommand=void 0,this._sp=void 0,this._va=void 0,this._vertexSize=8,this._maxPointCount=1e4,this._pointCount=0,this._bufferIndex=0,this._vertexBufferData=new Float32Array(this._maxPointCount*this._vertexSize*6),this._vertexBufferViews=[];for(var i=this._maxPointCount,n=0;n<i;n++)this._vertexBufferViews.push(new Float32Array(this._vertexBufferData.buffer,0,n*this._vertexSize*6));this._clearCommand=new r$M({color:new e$1z(0,0,0,0)}),this._data=void 0,this._dataIndex=0,this._fbHeatMap=x$e(this._context,this._width,this._height,v$Z.UNSIGNED_BYTE),this._clearCommand.framebuffer=this._fbHeatMap,this._clearCommand.execute(this._context),this._maxPerFrameDrawCount=5e3}function x$e(e,t,i,n){return new u$F({context:e,colorTextures:[new P$S({context:e,width:t,height:i,pixelDatatype:n})]})}function M$c(e,t){if(!t$$(t._sp)){var i=new a$O({sources:[["attribute vec4 aPosition;","attribute vec4 aIntensity;","varying vec2 vOff;","varying vec2 vDim;","varying float vIntensity;","uniform vec4 uBounds;","void main()","{","vDim = abs(aPosition.zw);","vOff = aPosition.zw;","vec2 pos = aPosition.xy + aPosition.zw;","vIntensity = aIntensity.x;","gl_Position = vec4(((pos - uBounds.xy) / uBounds.zw) * 2.0 - 1.0, 0.0, 1.0);","}"].join("\n")]}),n=new a$O({sources:[["varying vec2 vOff;","varying vec2 vDim;","varying float vIntensity;","void main()","{","float falloff = (1.0 - smoothstep(0.0, 1.0, length(vOff/vDim)));","float intensity = falloff*vIntensity;","gl_FragColor = vec4(intensity);","}"].join("\n")]});t._sp=p$15.fromCache({context:e,vertexShaderSource:i,fragmentShaderSource:n,attributeLocations:{aPosition:0,aIntensity:1}})}}function R$7(e,t){if(!t$$(t._va)){var i=t._vertexBufferViews[t._pointCount],n=u$Y.createVertexBuffer({context:e,typedArray:i,usage:A$13.STREAM_DRAW}),r=[{index:0,vertexBuffer:n,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:32,normalize:!1},{index:1,vertexBuffer:n,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,offsetInBytes:16,strideInBytes:32,normalize:!1}];t._va=new x$18({context:e,attributes:r})}}function T$d(e,t){var i=new s$1d({primitiveType:H$11.TRIANGLES,count:6*t._pointCount});R$7(e,t),M$c(e,t),i.vertexArray=t._va,i.shaderProgram=t._sp,i.renderState=p$1a.fromCache({depthTest:{enabled:!1},viewport:new n$13(0,0,t._width,t._height),blending:{enabled:!0,functionDestinationRgb:de$x.ONE,functionDestinationAlpha:de$x.ONE}});var n=new a$10(t.bounds.x,t.bounds.y,t.bounds.width,t.bounds.height);return i.uniformMap={uBounds:function(){return n}},i.framebuffer=t._fbIntensity,i}function V$a(e,t){var i=["uniform sampler2D uIntensityTexture;","varying vec2 v_textureCoordinates;","float linstep(float low, float high, float value) {","return clamp((value-low)/(high-low), 0.0, 1.0);","}","float fade(float low, float high, float value){","float mid = (low+high)*0.5;","float range = (high-low)*0.5;","float x = 1.0 - clamp(abs(mid-value)/range, 0.0, 1.0);","return smoothstep(0.0, 1.0, x);","}","vec3 getColor(float intensity){","vec3 blue = vec3(0.0, 0.0, 1.0);","vec3 cyan = vec3(0.0, 1.0, 1.0);","vec3 green = vec3(0.0, 1.0, 0.0);","vec3 yellow = vec3(1.0, 1.0, 0.0);","vec3 red = vec3(1.0, 0.0, 0.0);","vec3 color = fade(-0.25, 0.25, intensity)*blue + fade(0.0, 0.5, intensity)*cyan + fade(0.25, 0.75, intensity)*green + fade(0.5, 1.0, intensity)*yellow + smoothstep(0.75, 1.0, intensity)*red;","return color;","}","vec4 alphaFun(vec3 color, float intensity){","float alpha = smoothstep(0.0, 1.0, intensity);","return vec4(color*alpha, alpha);","}","void main(){","float intensity = smoothstep(0.0, 1.0, texture2D(uIntensityTexture, v_textureCoordinates).r);","vec3 color = getColor(intensity);","gl_FragColor = alphaFun(color, intensity);","}"].join("\n"),n=e.createViewportQuadCommand(i,{uniformMap:{uIntensityTexture:function(){return t._fbIntensity.getColorTexture(0)}},renderState:p$1a.fromCache({viewport:new n$13(0,0,t._width,t._height),blending:{enabled:!0,functionDestinationRgb:de$x.ONE,functionDestinationAlpha:de$x.ONE}}),owner:t});return n.framebuffer=t._fbHeatMap,n}function S$d(e){if(t$$(e._va)){var t=e._va.getAttribute(0).vertexBuffer,i=t._getBuffer(),n=t._gl;n.bindBuffer(de$x.ARRAY_BUFFER,i),n.bufferData(de$x.ARRAY_BUFFER,e._vertexBufferViews[e._pointCount],A$13.STREAM_DRAW),n.bindBuffer(de$x.ARRAY_BUFFER,null)}}function r$a(){this.previousFramebuffer=void 0,this._previousFramebuffer=void 0,this._texture=void 0,this._classifiedTexture=void 0,this._depthStencilTexture=void 0,this._fbo=void 0,this._fboClassified=void 0,this._rsUnclassified=void 0,this._rsClassified=void 0,this._unclassifiedCommand=void 0,this._classifiedCommand=void 0,this._translucentCommand=void 0,this._clearColorCommand=new r$M({color:new e$1z(0,0,0,0),owner:this}),this._clearCommand=new r$M({color:new e$1z(0,0,0,0),depth:1,stencil:0});var e=this;this._uniformMap={colorTexture:function(){return e._texture},depthTexture:function(){return e._depthStencilTexture},classifiedTexture:function(){return e._classifiedTexture}}}E$d.prototype._requestGridTile=function(e,t,i,n){if(!this.ready)throw new t$_("requestTileGrid must not be called before ready returns true.");var r=[],o=this._tilingScheme.tileXYToRectangle(e,t,i),a=this;if(this._levels[this._levels.length-1],t$$(s$1p.intersection(this._rectangle,o,I$b))){var s=this._levels[0],l=i;if(l<=this._levels[this._levels.length-1]&&l>=s){var u=i+"_"+e+"_"+t,c=a._url+"data/index/"+t+"/"+e+".bil?level="+l,h=u$S(c);t$$(h)&&(h.id=u,h.url=c,r.push(h))}}return c$18.all(r,(function(e){for(var t=0;t<e.length;t++){return R$8(a,e[t])}}),(function(e){return c$18.reject(e)}))},Object.defineProperties(r$b.prototype,{texture:{get:function(){return this._fbHeatMap.getColorTexture(0)}},bounds:{set:function(e){this._bounds=e},get:function(){return this._bounds}},maxPerFrameDrawCount:{set:function(e){this._maxPerFrameDrawCount=e},get:function(){return this._maxPerFrameDrawCount}}}),r$b.prototype.addVertex=function(e,t,i,n,r){this._vertexBufferData[this._bufferIndex++]=e,this._vertexBufferData[this._bufferIndex++]=t,this._vertexBufferData[this._bufferIndex++]=i,this._vertexBufferData[this._bufferIndex++]=n,this._vertexBufferData[this._bufferIndex++]=r,this._vertexBufferData[this._bufferIndex++]=r,this._vertexBufferData[this._bufferIndex++]=r,this._vertexBufferData[this._bufferIndex++]=r},r$b.prototype.addPoint=function(e,t,i,n){this._pointCount>=this._maxPointCount-1&&this.draw(this._context),n=e$1Y(n,50),i=e$1Y(i,.2);var r=.5*n;this.addVertex(e,t,-r,-r,i),this.addVertex(e,t,+r,-r,i),this.addVertex(e,t,-r,+r,i),this.addVertex(e,t,-r,+r,i),this.addVertex(e,t,+r,-r,i),this.addVertex(e,t,+r,+r,i),this._pointCount++},r$b.prototype.setData=function(e){this._data=e},r$b.prototype.drawIntensity=function(e){t$$(this._fbIntensity)||(this._fbIntensity=x$e(e,this._width,this._height,v$Z.HALF_FLOAT)),t$$(this._intensityCommand)||(this._intensityCommand=T$d(e,this)),this._intensityCommand.count=6*this._pointCount,S$d(this),this._intensityCommand.execute(e)},r$b.prototype.drawHeatMap=function(e){this._clearCommand.framebuffer=this._fbHeatMap,this._clearCommand.execute(e),t$$(this._heatMapCommand)||(this._heatMapCommand=V$a(e,this)),this._heatMapCommand.execute(e)},r$b.prototype.draw=function(e){this.drawIntensity(e),this.drawHeatMap(e),this._bufferIndex=0,this._pointCount=0},r$b.prototype.update=function(e){if(this._context=e.context,t$$(this._data)){for(var t=Math.min(this._data.length,this._dataIndex+this._maxPerFrameDrawCount),i=.002*this._bounds.width,n=this._dataIndex;n<t;n++){var r=this._data[n];r.x,r.y;var o=e$1Y(r.intensity,.1);o=(o-this._minIntensity)/this._maxIntensity,this.addPoint(r.x,r.y,o,i)}this._dataIndex=t,this._dataIndex>=this._data.length&&(this._data=void 0,this._dataIndex=0)}this._pointCount<1||this.draw(e.context)},r$b.prototype.destroy=function(){return this._fbIntensity=this._fbIntensity&&this._fbIntensity.destroy(),this._fbHeatMap=this._fbHeatMap&&this._fbHeatMap.destroy(),this._sp=this._sp&&this._sp.destroy(),this._va=this._va&&this._va.destroy(),this._vertexBufferData=void 0,this._vertexBufferViews=void 0,this._data=void 0,s$1e(this)},Object.defineProperties(r$a.prototype,{unclassifiedCommand:{get:function(){return this._unclassifiedCommand}}}),r$a.isTranslucencySupported=function(e){return e.depthTexture&&e.fragmentDepth};var L$e={depthMask:!1,stencilTest:{enabled:!0,frontFunction:h$N.EQUAL,frontOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.KEEP},backFunction:h$N.NEVER,reference:0,mask:Ia$1.CLASSIFICATION_MASK},blending:Ee$s.ALPHA_BLEND},I$a={depthMask:!1,stencilTest:{enabled:!0,frontFunction:h$N.NOT_EQUAL,frontOperation:{fail:o$F.KEEP,zFail:o$F.KEEP,zPass:o$F.KEEP},backFunction:h$N.NEVER,reference:0,mask:Ia$1.CLASSIFICATION_MASK},blending:Ee$s.ALPHA_BLEND},N$b={depthMask:!0,depthTest:{enabled:!0},stencilTest:Ia$1.setCesium3DTileBit(),stencilMask:Ia$1.CESIUM_3D_TILE_MASK,blending:Ee$s.ALPHA_BLEND},M$b="#extension GL_EXT_frag_depth : enable\nuniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nuniform sampler2D classifiedTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n vec4 color = texture2D(colorTexture, v_textureCoordinates);\n if (color.a == 0.0)\n {\n discard;\n }\n bool isClassified = all(equal(texture2D(classifiedTexture, v_textureCoordinates), vec4(0.0)));\n#ifdef UNCLASSIFIED\n vec4 highlightColor = czm_invertClassificationColor;\n if (isClassified)\n {\n discard;\n }\n#else\n vec4 highlightColor = vec4(1.0);\n if (!isClassified)\n {\n discard;\n }\n#endif\n gl_FragColor = color * highlightColor;\n gl_FragDepthEXT = texture2D(depthTexture, v_textureCoordinates).r;\n}\n",U$9="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n vec4 color = texture2D(colorTexture, v_textureCoordinates);\n if (color.a == 0.0)\n {\n discard;\n }\n#ifdef UNCLASSIFIED\n gl_FragColor = color * czm_invertClassificationColor;\n#else\n gl_FragColor = color;\n#endif\n}\n";function d$d(e){this._total=e,this.usedThisFrame=0,this.stolenFromMeThisFrame=0,this.starvedThisFrame=!1,this.starvedLastFrame=!1}function o$d(e){if(t$$(e)&&e.length!==i$E.NUMBER_OF_JOB_TYPES)throw new t$_("A budget must be specified for each job type; budgets.length should equal JobType.NUMBER_OF_JOB_TYPES.");var t=new Array(i$E.NUMBER_OF_JOB_TYPES);t[i$E.TEXTURE]=new d$d(t$$(e)?e[i$E.TEXTURE]:10),t[i$E.PROGRAM]=new d$d(t$$(e)?e[i$E.PROGRAM]:10),t[i$E.BUFFER]=new d$d(t$$(e)?e[i$E.BUFFER]:30);var i,n=t.length,r=0;for(i=0;i<n;++i)r+=t[i].total;var o=new Array(n);for(i=0;i<n;++i)o[i]=!1;this._totalBudget=r,this._totalUsedThisFrame=0,this._budgets=t,this._executedThisFrame=o}function r$9(){}r$a.prototype.update=function(e){var t=this._texture,i=!t$$(t)||this.previousFramebuffer!==this._previousFramebuffer;this._previousFramebuffer=this.previousFramebuffer;var n,r,o=e.drawingBufferWidth,a=e.drawingBufferHeight,s=!t$$(t)||t.width!==o||t.height!==a;((s||i)&&(this._texture=this._texture&&this._texture.destroy(),this._classifiedTexture=this._classifiedTexture&&this._classifiedTexture.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._texture=new P$S({context:e,width:o,height:a,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.LINEAR,magnificationFilter:et$k.LINEAR})}),t$$(this._previousFramebuffer)||(this._classifiedTexture=new P$S({context:e,width:o,height:a,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.LINEAR,magnificationFilter:et$k.LINEAR})}),this._depthStencilTexture=new P$S({context:e,width:o,height:a,pixelFormat:Z$_.DEPTH_STENCIL,pixelDatatype:v$Z.UNSIGNED_INT_24_8}))),!t$$(this._fbo)||s||i)&&(this._fbo=this._fbo&&this._fbo.destroy(),this._fboClassified=this._fboClassified&&this._fboClassified.destroy(),t$$(this._previousFramebuffer)?(n=this._previousFramebuffer.depthStencilTexture,r=this._previousFramebuffer.depthStencilRenderbuffer):n=this._depthStencilTexture,this._fbo=new u$F({context:e,colorTextures:[this._texture],depthStencilTexture:n,depthStencilRenderbuffer:r,destroyAttachments:!1}),t$$(this._previousFramebuffer)||(this._fboClassified=new u$F({context:e,colorTextures:[this._classifiedTexture],depthStencilTexture:n,destroyAttachments:!1})));if(t$$(this._rsUnclassified)||(this._rsUnclassified=p$1a.fromCache(L$e),this._rsClassified=p$1a.fromCache(I$a),this._rsDefault=p$1a.fromCache(N$b)),!t$$(this._unclassifiedCommand)||i){t$$(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy());var l=t$$(this._previousFramebuffer)?U$9:M$b,u=new a$O({defines:["UNCLASSIFIED"],sources:[l]}),c=new a$O({sources:[l]});this._unclassifiedCommand=e.createViewportQuadCommand(u,{renderState:t$$(this._previousFramebuffer)?this._rsUnclassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),this._classifiedCommand=e.createViewportQuadCommand(c,{renderState:t$$(this._previousFramebuffer)?this._rsClassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),t$$(this._translucentCommand)&&(this._translucentCommand.shaderProgram=this._translucentCommand.shaderProgram&&this._translucentCommand.shaderProgram.destroy()),t$$(this._previousFramebuffer)||(this._translucentCommand=e.createViewportQuadCommand(V$c,{renderState:this._rsUnclassified,uniformMap:this._uniformMap,owner:this}))}},r$a.prototype.clear=function(e,t){var i=t.framebuffer;t$$(this._previousFramebuffer)?(t.framebuffer=this._fbo,this._clearColorCommand.execute(e,t)):(t.framebuffer=this._fbo,this._clearCommand.execute(e,t),t.framebuffer=this._fboClassified,this._clearCommand.execute(e,t)),t.framebuffer=i},r$a.prototype.executeClassified=function(e,t){if(!t$$(this._previousFramebuffer)){var i=t.framebuffer;t.framebuffer=this._fboClassified,this._translucentCommand.execute(e,t),t.framebuffer=i}this._classifiedCommand.execute(e,t)},r$a.prototype.executeUnclassified=function(e,t){this._unclassifiedCommand.execute(e,t)},r$a.prototype.isDestroyed=function(){return!1},r$a.prototype.destroy=function(){return this._fbo=this._fbo&&this._fbo.destroy(),this._texture=this._texture&&this._texture.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),t$$(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy()),s$1e(this)},Object.defineProperties(d$d.prototype,{total:{get:function(){return this._total}}}),o$d.getTimestamp=yt$9,Object.defineProperties(o$d.prototype,{totalBudget:{get:function(){return this._totalBudget}}}),o$d.prototype.disableThisFrame=function(){this._totalUsedThisFrame=this._totalBudget},o$d.prototype.resetBudgets=function(){for(var e=this._budgets,t=e.length,i=0;i<t;++i){var n=e[i];n.starvedLastFrame=n.starvedThisFrame,n.starvedThisFrame=!1,n.usedThisFrame=0,n.stolenFromMeThisFrame=0}this._totalUsedThisFrame=0},o$d.prototype.execute=function(e,t){var i,n=this._budgets,r=n[t],o=this._executedThisFrame[t];if(this._totalUsedThisFrame>=this._totalBudget&&o)return r.starvedThisFrame=!0,!1;if(r.usedThisFrame+r.stolenFromMeThisFrame>=r.total){var a,s=n.length;for(a=0;a<s&&(!((i=n[a]).usedThisFrame+i.stolenFromMeThisFrame<i.total)||i.starvedLastFrame);++a);if(a===s&&o)return!1;o&&(r.starvedThisFrame=!0)}var l=o$d.getTimestamp();e.execute();var u=o$d.getTimestamp()-l;return this._totalUsedThisFrame+=u,i?i.stolenFromMeThisFrame+=u:r.usedThisFrame+=u,this._executedThisFrame[t]=!0,!0},Object.defineProperties(r$9.prototype,{color:{get:t$_.throwInstantiationError},intensity:{get:t$_.throwInstantiationError}});var e$c={SUN_LIGHT:0,LIGHT_GROUP1:1},br=Object.freeze(e$c),v$a=/\/$/,h$a=new i$17('© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function n$d(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).styleId;if(!t$$(t))throw new t$_("options.styleId is required.");var i=t$X.createIfNeeded(e$1Y(e.url,"https://api.mapbox.com/styles/v1/")),n=e$1c.getAccessToken(e.accessToken);this._styleId=t,this._accessToken=n,this._accessTokenErrorCredit=i$17.clone(e$1c.getErrorCredit(e.accessToken));var r=e$1Y(e.tilesize,512);this._tilesize=r;var o=e$1Y(e.username,"mapbox");this._username=o;var a,s=t$$(e.scaleFactor)?"@2x":"",l=i.getUrlComponent();v$a.test(l)||(l+="/"),l+=this._username+"/"+t+"/tiles/"+this._tilesize+"/{z}/{x}/{y}"+s,i.url=l,i.setQueryParameters({access_token:n}),t$$(e.credit)?"string"==typeof(a=e.credit)&&(a=new i$17(a)):a=h$a,this._resource=i,this._imageryProvider=new v$d({url:i,credit:a,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}function s$d(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).textureUrl;t$$(t)||(t=o$12("Assets/Textures/moonSmall.jpg")),this.show=e$1Y(e.show,!0),this.textureUrl=t,this._ellipsoid=e$1Y(e.ellipsoid,n$1c.MOON),this.onlySunLighting=e$1Y(e.onlySunLighting,!0),this._ellipsoidPrimitive=new c$f({radii:this.ellipsoid.radii,material:r$v.fromType(r$v.ImageType),depthTestEnabled:!1,_owner:this}),this._ellipsoidPrimitive.material.translucent=!1,this._axes=new s$12}Object.defineProperties(n$d.prototype,{url:{get:function(){return this._imageryProvider.url}},ready:{get:function(){return this._imageryProvider.ready}},readyPromise:{get:function(){return this._imageryProvider.readyPromise}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}}),n$d.prototype.getTileCredits=function(e,t,i){if(t$$(this._accessTokenErrorCredit))return[this._accessTokenErrorCredit]},n$d.prototype.requestImage=function(e,t,i,n){return this._imageryProvider.requestImage(e,t,i,n)},n$d.prototype.pickFeatures=function(e,t,i,n,r){return this._imageryProvider.pickFeatures(e,t,i,n,r)},n$d._defaultCredit=h$a,Object.defineProperties(s$d.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});var n$c=new r$W,T$c=new r$W,w$h=new a$11,p$d=[];s$d.prototype.update=function(e){if(this.show){var t=this._ellipsoidPrimitive;t.material.uniforms.image=this.textureUrl,t.onlySunLighting=this.onlySunLighting;var i=e.time;t$$(m$13.computeIcrfToFixedMatrix(i,n$c))||m$13.computeTemeToPseudoFixedMatrix(i,n$c);var n=this._axes.evaluate(i,T$c);r$W.transpose(n,n),r$W.multiply(n$c,n,n);var r=x$M.computeMoonPositionInEarthInertialFrame(i,w$h);r$W.multiplyByVector(n$c,r,r),c$1a.fromRotationTranslation(n,r,t.modelMatrix);var o=e.commandList;return e.commandList=p$d,p$d.length=0,t.update(e),e.commandList=o,1===p$d.length?p$d[0]:void 0}},s$d.prototype.isDestroyed=function(){return!1},s$d.prototype.destroy=function(){return this._ellipsoidPrimitive=this._ellipsoidPrimitive&&this._ellipsoidPrimitive.destroy(),s$1e(this)};var I$9={NONE:0,HORIZONTAL:1,VERTICAL:2,QUAD:3,TRIPLE:4,VerticalTrisection:5,FIVE_DIVISIONS:6,SIX_DIVISIONS:7,SEVEN_DIVISIONS:8,EIGHT_DIVISIONS:9,NINE_DIVISIONS:10},te$5=Object.freeze(I$9);function b$g(){}function N$a(e,t,i,n,r,o,a){var s=e.xDimName,l=e.yDimName,u=e.zDimName,c=e.timeDimName,h=e.dimensions,d=e.dimensionIndices,f=e.buffer,p=h[d[t]];if(0==p.size&&t<d.length-1)N$a(e,t+1,i,n,r,o,a);else for(var _=p.name===s,m=p.name===l,$=p.name===u,g=t$$(c)&&p.name===c,y=0;y<p.size;y++)if(_?i=y:m?n=y:$?r=y:g&&(o=y),t==d.length-1){var v=f.readFloat32();a.maxValue=Math.max(a.maxValue,v),a.minValue=Math.min(a.minValue,v);var x=r*e.xDimSize*e.yDimSize+n*e.xDimSize+i;a.array[o][x]=v}else N$a(e,t+1,i,n,r,o,a)}function p$c(e,t,i,n){var r=t.offset;t.size,t.type;var o=t.dimensions,a=e.recordDimension;n.seek(r),e.buffer=n,e.dimensions=i,e.dimensionIndices=o;var s=e.xDimName,l=e.yDimName,u=e.zDimName,c=e.timeDimName;e.xDimSize=0,e.yDimSize=0,e.zDimSize=0;for(var h=1,d=0;d<i.length;d++)i[d].name==s?e.xDimSize=i[d].size:i[d].name==l?e.yDimSize=i[d].size:i[d].name==u?e.zDimSize=i[d].size:t$$(c)&&i[d].name==c&&(h=i[d].size);a.length>0&&(h=a.length,e.timeDimName=null);var f={array:[]},p=0;for(p=0;p<h;p++)f.array[p]=[];if(f.maxValue=Number.MIN_VALUE,f.minValue=Number.MAX_VALUE,f.xDimSize=e.xDimSize,f.yDimSize=e.yDimSize,f.zDimSize=e.zDimSize,f.timeDimSize=h,a.length>0)for(p=0;p<h;p++)n.seek(r+a.recordStep*p),N$a(e,0,0,0,0,p,f);else N$a(e,0,0,0,0,0,f);return f}function t$7(e){}b$g.loadData=function(e,t){var i=e.header,n=e.buffer,r=i.dimensions;i.globalAttributes;var o=i.variables;t.recordDimension=i.recordDimension;for(var a=0,s=0;s<o.length;s++)if(o[s].name==t.variableName){a=s;break}return p$c(t,o[a],r,n)},t$7.prototype.isReady=function(){return!0},t$7.prototype.shouldDiscardImage=function(e){return!1};var y$e="#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",N$9="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";function _$c(e){this._translucentMultipassSupport=!1,this._translucentMRTSupport=!1;var t=e.colorBufferFloat&&e.depthTexture&&e.floatBlend;this._translucentMRTSupport=e.drawBuffers&&t,this._translucentMultipassSupport=!this._translucentMRTSupport&&t,this._opaqueFBO=void 0,this._opaqueTexture=void 0,this._depthStencilTexture=void 0,this._accumulationTexture=void 0,this._translucentFBO=void 0,this._alphaFBO=void 0,this._adjustTranslucentFBO=void 0,this._adjustAlphaFBO=void 0,this._opaqueClearCommand=new r$M({color:new e$1z(0,0,0,0),owner:this}),this._translucentMRTClearCommand=new r$M({color:new e$1z(0,0,0,1),owner:this}),this._translucentMultipassClearCommand=new r$M({color:new e$1z(0,0,0,0),owner:this}),this._alphaClearCommand=new r$M({color:new e$1z(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 n$13,this._rs=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHDR=!1}function P$8(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy()}function A$e(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 q$b(e){P$8(e),A$e(e)}function L$d(e,t,i,n){P$8(e),e._accumulationTexture=new P$S({context:t,width:i,height:n,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.FLOAT});var r=new Float32Array(i*n*4);e._revealageTexture=new P$S({context:t,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.FLOAT,source:{arrayBufferView:r,width:i,height:n},flipY:!1})}function I$8(e,t){A$e(e);var i=de$x.FRAMEBUFFER_COMPLETE,n=!0;if(e._translucentMRTSupport&&(e._translucentFBO=new u$F({context:t,colorTextures:[e._accumulationTexture,e._revealageTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._adjustTranslucentFBO=new u$F({context:t,colorTextures:[e._accumulationTexture,e._revealageTexture],destroyAttachments:!1}),(e._translucentFBO.status!==i||e._adjustTranslucentFBO.status!==i)&&(A$e(e),e._translucentMRTSupport=!1)),!e._translucentMRTSupport){e._translucentFBO=new u$F({context:t,colorTextures:[e._accumulationTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._alphaFBO=new u$F({context:t,colorTextures:[e._revealageTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._adjustTranslucentFBO=new u$F({context:t,colorTextures:[e._accumulationTexture],destroyAttachments:!1}),e._adjustAlphaFBO=new u$F({context:t,colorTextures:[e._revealageTexture],destroyAttachments:!1});var r=e._translucentFBO.status===i,o=e._alphaFBO.status===i,a=e._adjustTranslucentFBO.status===i,s=e._adjustAlphaFBO.status===i;(!r||!o||!a||!s)&&(q$b(e),e._translucentMultipassSupport=!1,n=!1)}return n}_$c.prototype.update=function(e,t,i,n){if(this.isSupported()){this._opaqueFBO=i,this._opaqueTexture=i.getColorTexture(0),this._depthStencilTexture=i.depthStencilTexture;var r=this._opaqueTexture.width,o=this._opaqueTexture.height,a=this._accumulationTexture,s=!t$$(a)||a.width!==r||a.height!==o||n!==this._useHDR;if(s&&L$d(this,e,r,o),t$$(this._translucentFBO)&&!s||I$8(this,e)){this._useHDR=n;var l,u,c=this;t$$(this._compositeCommand)||(l=new a$O({sources:[N$9]}),this._translucentMRTSupport&&l.defines.push("MRT"),u={u_opaque:function(){return c._opaqueTexture},u_accumulation:function(){return c._accumulationTexture},u_revealage:function(){return c._revealageTexture}},this._compositeCommand=e.createViewportQuadCommand(l,{uniformMap:u,owner:this})),t$$(this._adjustTranslucentCommand)||(this._translucentMRTSupport?(l=new a$O({defines:["MRT"],sources:[y$e]}),u={u_bgColor:function(){return c._translucentMRTClearCommand.color},u_depthTexture:function(){return c._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(l,{uniformMap:u,owner:this})):this._translucentMultipassSupport&&(l=new a$O({sources:[y$e]}),u={u_bgColor:function(){return c._translucentMultipassClearCommand.color},u_depthTexture:function(){return c._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(l,{uniformMap:u,owner:this}),u={u_bgColor:function(){return c._alphaClearCommand.color},u_depthTexture:function(){return c._depthStencilTexture}},this._adjustAlphaCommand=e.createViewportQuadCommand(l,{uniformMap:u,owner:this}))),this._viewport.width=r,this._viewport.height=o;var h=!n$13.equals(this._viewport,t.viewport),d=h!==this._useScissorTest;this._useScissorTest=h,n$13.equals(this._scissorRectangle,t.viewport)||(this._scissorRectangle=n$13.clone(t.viewport,this._scissorRectangle),d=!0),(!t$$(this._rs)||!n$13.equals(this._viewport,this._rs.viewport)||d)&&(this._rs=p$1a.fromCache({viewport:this._viewport,scissorTest:{enabled:this._useScissorTest,rectangle:this._scissorRectangle}})),t$$(this._compositeCommand)&&(this._compositeCommand.renderState=this._rs),this._adjustTranslucentCommand&&(this._adjustTranslucentCommand.renderState=this._rs),t$$(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.renderState=this._rs)}}};var U$8={enabled:!0,color:new e$1z(0,0,0,0),equationRgb:x$16.ADD,equationAlpha:x$16.ADD,functionSourceRgb:h$13.ONE,functionDestinationRgb:h$13.ONE,functionSourceAlpha:h$13.ZERO,functionDestinationAlpha:h$13.ONE_MINUS_SOURCE_ALPHA},H$d={enabled:!0,color:new e$1z(0,0,0,0),equationRgb:x$16.ADD,equationAlpha:x$16.ADD,functionSourceRgb:h$13.ONE,functionDestinationRgb:h$13.ONE,functionSourceAlpha:h$13.ONE,functionDestinationAlpha:h$13.ONE},V$9={enabled:!0,color:new e$1z(0,0,0,0),equationRgb:x$16.ADD,equationAlpha:x$16.ADD,functionSourceRgb:h$13.ZERO,functionDestinationRgb:h$13.ONE_MINUS_SOURCE_ALPHA,functionSourceAlpha:h$13.ZERO,functionDestinationAlpha:h$13.ONE_MINUS_SOURCE_ALPHA};function R$6(e,t,i,n){var r=i[n.id];if(!t$$(r)){var o=p$1a.getState(n);o.depthMask=!1,o.blending=t,r=p$1a.fromCache(o),i[n.id]=r}return r}function Q$9(e,t,i){return R$6(t,U$8,e._translucentRenderStateCache,i)}function G$e(e,t,i){return R$6(t,H$d,e._translucentRenderStateCache,i)}function Z$8(e,t,i){return R$6(t,V$9,e._alphaRenderStateCache,i)}var W$6=" vec3 Ci = czm_gl_FragColor.rgb * czm_gl_FragColor.a;\n float ai = czm_gl_FragColor.a;\n float wzi = czm_alphaWeight(ai);\n gl_FragData[0] = vec4(Ci * wzi, ai);\n gl_FragData[1] = vec4(ai * wzi);\n",k$a=" vec3 Ci = czm_gl_FragColor.rgb * czm_gl_FragColor.a;\n float ai = czm_gl_FragColor.a;\n float wzi = czm_alphaWeight(ai);\n gl_FragColor = vec4(Ci, ai) * wzi;\n",X$6=" float ai = czm_gl_FragColor.a;\n gl_FragColor = vec4(ai);\n";function b$f(e,t,i,n){var r=e.shaderCache.getDerivedShaderProgram(t,i);if(!t$$(r)){var o=t._attributeLocations,a=t.fragmentShaderSource.clone();a.sources=a.sources.map((function(e){return e=(e=(e=(e=a$O.replaceMain(e,"czm_translucent_main")).replace(/gl_FragColor/g,"czm_gl_FragColor")).replace(/\bdiscard\b/g,"czm_discard = true")).replace(/czm_phong/g,"czm_translucentPhong")})),a.sources.splice(0,0,(-1!==n.indexOf("gl_FragData")?"#extension GL_EXT_draw_buffers : enable \n":"")+"vec4 czm_gl_FragColor;\nbool czm_discard = false;\n"),a.sources.push("void main()\n{\n czm_translucent_main();\n if (czm_discard)\n {\n discard;\n }\n"+n+"}\n"),r=e.shaderCache.createDerivedShaderProgram(t,i,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:a,attributeLocations:o})}return r}function Y$a(e,t){return b$f(e,t,"translucentMRT",W$6)}function J$8(e,t){return b$f(e,t,"translucentMultipass",k$a)}function K$6(e,t){return b$f(e,t,"alphaMultipass",X$6)}function $$6(e,t,i,n,r,o){var a,s,l=t.context,u=t.frameState.useLogDepth,c=t._hdr,h=n.framebuffer,d=r.length,f=t.frameState.shadowState.lightShadowsEnabled;n.framebuffer=e._adjustTranslucentFBO,e._adjustTranslucentCommand.execute(l,n),n.framebuffer=e._adjustAlphaFBO,e._adjustAlphaCommand.execute(l,n);var p=e._opaqueFBO;for(n.framebuffer=e._translucentFBO,s=0;s<d;++s)a=r[s],a=u?a.derivedCommands.logDepth.command:a,a=c?a.derivedCommands.hdr.command:a,i(f&&a.receiveShadows?a.derivedCommands.oit.shadows.translucentCommand:a.derivedCommands.oit.translucentCommand,t,l,n,p);for(t$$(o)&&(a=o.unclassifiedCommand,i(f&&a.receiveShadows?a.derivedCommands.oit.shadows.translucentCommand:a.derivedCommands.oit.translucentCommand,t,l,n,p)),n.framebuffer=e._alphaFBO,s=0;s<d;++s)a=r[s],a=u?a.derivedCommands.logDepth.command:a,a=c?a.derivedCommands.hdr.command:a,i(f&&a.receiveShadows?a.derivedCommands.oit.shadows.alphaCommand:a.derivedCommands.oit.alphaCommand,t,l,n,p);t$$(o)&&(a=o.unclassifiedCommand,i(f&&a.receiveShadows?a.derivedCommands.oit.shadows.alphaCommand:a.derivedCommands.oit.alphaCommand,t,l,n,p)),n.framebuffer=h}function ee$5(e,t,i,n,r,o){var a=t.context,s=t.frameState.useLogDepth,l=t._hdr,u=n.framebuffer,c=r.length,h=t.frameState.shadowState.lightShadowsEnabled;n.framebuffer=e._adjustTranslucentFBO,e._adjustTranslucentCommand.execute(a,n);var d=e._opaqueFBO;n.framebuffer=e._translucentFBO;for(var f,p=0;p<c;++p)f=r[p],f=s?f.derivedCommands.logDepth.command:f,f=l?f.derivedCommands.hdr.command:f,i(h&&f.receiveShadows?f.derivedCommands.oit.shadows.translucentCommand:f.derivedCommands.oit.translucentCommand,t,a,n,d);t$$(o)&&(f=o.unclassifiedCommand,i(h&&f.receiveShadows?f.derivedCommands.oit.shadows.translucentCommand:f.derivedCommands.oit.translucentCommand,t,a,n,d)),n.framebuffer=u}_$c.prototype.createDerivedCommands=function(e,t,i){var n,r,o,a,s,l;(t$$(i)||(i={}),this._translucentMRTSupport)?(t$$(i.translucentCommand)&&(n=i.translucentCommand.shaderProgram,r=i.translucentCommand.renderState),i.translucentCommand=s$1d.shallowClone(e,i.translucentCommand),t$$(n)&&i.shaderProgramId===e.shaderProgram.id?(i.translucentCommand.shaderProgram=n,i.translucentCommand.renderState=r):(i.translucentCommand.shaderProgram=Y$a(t,e.shaderProgram),i.translucentCommand.renderState=Q$9(this,t,e.renderState),i.shaderProgramId=e.shaderProgram.id)):(t$$(i.translucentCommand)&&(o=i.translucentCommand.shaderProgram,a=i.translucentCommand.renderState,s=i.alphaCommand.shaderProgram,l=i.alphaCommand.renderState),i.translucentCommand=s$1d.shallowClone(e,i.translucentCommand),i.alphaCommand=s$1d.shallowClone(e,i.alphaCommand),t$$(o)&&i.shaderProgramId===e.shaderProgram.id?(i.translucentCommand.shaderProgram=o,i.translucentCommand.renderState=a,i.alphaCommand.shaderProgram=s,i.alphaCommand.renderState=l):(i.translucentCommand.shaderProgram=J$8(t,e.shaderProgram),i.translucentCommand.renderState=G$e(this,t,e.renderState),i.alphaCommand.shaderProgram=K$6(t,e.shaderProgram),i.alphaCommand.renderState=Z$8(this,t,e.renderState),i.shaderProgramId=e.shaderProgram.id));return i},_$c.prototype.executeCommands=function(e,t,i,n,r){this._translucentMRTSupport?ee$5(this,e,t,i,n,r):$$6(this,e,t,i,n,r)},_$c.prototype.execute=function(e,t){this._compositeCommand.execute(e,t)},_$c.prototype.clear=function(e,t,i){var n=t.framebuffer;t.framebuffer=this._opaqueFBO,e$1z.clone(i,this._opaqueClearCommand.color),this._opaqueClearCommand.execute(e,t),t.framebuffer=this._translucentFBO,(this._translucentMRTSupport?this._translucentMRTClearCommand:this._translucentMultipassClearCommand).execute(e,t),this._translucentMultipassSupport&&(t.framebuffer=this._alphaFBO,this._alphaClearCommand.execute(e,t)),t.framebuffer=n},_$c.prototype.isSupported=function(){return this._translucentMRTSupport||this._translucentMultipassSupport},_$c.prototype.setOpaqueTexture=function(e){this._opaqueTexture=e},_$c.prototype.isDestroyed=function(){return!1},_$c.prototype.destroy=function(){return q$b(this),t$$(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),t$$(this._adjustTranslucentCommand)&&(this._adjustTranslucentCommand.shaderProgram=this._adjustTranslucentCommand.shaderProgram&&this._adjustTranslucentCommand.shaderProgram.destroy()),t$$(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.shaderProgram=this._adjustAlphaCommand.shaderProgram&&this._adjustAlphaCommand.shaderProgram.destroy()),s$1e(this)};var T$b=new i$17("MapQuest, Open Street Map and contributors, CC-BY-SA");function o$c(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT);var t=t$X.createIfNeeded(e$1Y(e.url,"https://a.tile.openstreetmap.org/"));t.appendForwardSlash(),t.url+="{z}/{x}/{y}."+e$1Y(e.fileExtension,"png");var i=new o$Z({ellipsoid:e.ellipsoid}),n=e$1Y(e.minimumLevel,0),r=e.maximumLevel,o=e$1Y(e.rectangle,i.rectangle),a=i.positionToTileXY(s$1p.southwest(o),n),s=i.positionToTileXY(s$1p.northeast(o),n),l=(Math.abs(s.x-a.x)+1)*(Math.abs(s.y-a.y)+1);if(l>4)throw new t$_("The rectangle and minimumLevel indicate that there are "+l+" tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.");var u=e$1Y(e.credit,T$b);"string"==typeof u&&(u=new i$17(u)),v$d.call(this,{url:t,credit:u,tilingScheme:i,tileWidth:256,tileHeight:256,minimumLevel:n,maximumLevel:r,rectangle:o})}function e$b(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this.time=e$1Y(e.time,0),this.minimum=e$1Y(e.minimum,0),this.maximum=e$1Y(e.maximum,50),this._complete=!1}function e$a(e){throw new t$_("This type should not be instantiated directly. Instead, use BoxEmitter, CircleEmitter, ConeEmitter or SphereEmitter.")}t$$(Object.create)&&(o$c.prototype=Object.create(v$d.prototype),o$c.prototype.constructor=o$c),Object.defineProperties(e$b.prototype,{complete:{get:function(){return this._complete}}}),e$a.prototype.emit=function(e){t$_.throwInstantiationError()};var G$d="uniform sampler2D u_colorTexture;\nuniform sampler2D u_transitionAndCountTexture;\nvarying vec2 v_textureCoordinates;\nfloat erf(float x){\nif (abs(x) > 2.629639){\nreturn sign(x);\n}\nelse {\nfloat z = 0.289226 * x * x - 1.0;\nreturn ((((((0.0145688 * z - 0.0348595) * z + 0.0503913) * z - 0.0897001) * z + 0.156097) * z - 0.249431) * z + 0.533201) * x;\n}\n}\nfloat VDMTransmission(vec2 transition, float depth){\nfloat variance = max(transition.y - transition.x * transition.x, 0.0);\nreturn clamp(0.5 * (1.0 + erf((depth - transition.x) / sqrt(variance * 2.0))), 0.0, 1.0);\n}\nvoid main()\n{\nvec4 color = texture2D(u_colorTexture, v_textureCoordinates);\nif(color.a < 0.01){\ndiscard;\n}\nfloat scene_depth = czm_unpackDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));\nif(scene_depth > 0.0){\nvec3 transitionAndCount = texture2D(u_transitionAndCountTexture, v_textureCoordinates).xyz;\nfloat count = transitionAndCount.z;\nvec2 transition = transitionAndCount.xy;\ntransition /= count;\nfloat vdmAlpha = VDMTransmission(transition, scene_depth);\ncolor.a = min(color.a, vdmAlpha);\n}\ngl_FragColor = color;\n}\n";function h$9(){this._colorFBO=void 0,this._transitionFBO=void 0,this._colorTexture=void 0,this._transitionTexture=void 0,this._drawCommand=void 0,this._clearCommand=void 0,this._passType=we$l.OPAQUE,this._screenWidth=0,this._screenHeight=0,this._renderStateCache={},this.quality=.25,this.enable=!1,this._useLogDepth=!1,this._particleSp=void 0,this._useHdr=!1,this.useHdr=this._useHdr}var W$5={enabled:!0,color:new e$1z(0,0,0,0),equationRgb:x$16.ADD,equationAlpha:x$16.ADD,functionSourceRgb:h$13.SOURCE_ALPHA,functionDestinationRgb:h$13.ONE_MINUS_SOURCE_ALPHA,functionSourceAlpha:h$13.ONE,functionDestinationAlpha:h$13.ONE},m$g=new n$13;function q$a(e,t){var i=e[t.id];if(!t$$(i)||i.viewport.width!=m$g.width||i.viewport.height!=m$g.height){var n=p$1a.getState(t);n.viewport=m$g,i=p$1a.fromCache(n),e[t.id]=i}return i}function v$9(){return new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.LINEAR,magnificationFilter:et$k.LINEAR})}function y$d(e){e._colorTexture=e._colorTexture&&!e._colorTexture.isDestroyed()&&e._colorTexture.destroy(),e._transitionTexture=e._transitionTexture&&!e._transitionTexture.isDestroyed()&&e._transitionTexture.destroy(),e._colorFBO=e._colorFBO&&!e._colorFBO.isDestroyed()&&e._colorFBO.destroy(),e._transitionFBO=e._transitionFBO&&!e._transitionFBO.isDestroyed()&&e._transitionFBO.destroy(),e._drawCommand=void 0,e._clearCommand=void 0}function I$7(e,t){var i=e._screenWidth,n=e._screenHeight;e._colorTexture=new P$S({context:t,width:i,height:n,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE,sampler:v$9()}),e._transitionTexture=new P$S({context:t,width:i,height:n,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.FLOAT,sampler:v$9()}),e._colorFBO=new u$F({context:t,colorTextures:[e._colorTexture],destroyAttachments:!1}),e._transitionFBO=new u$F({context:t,colorTextures:[e._transitionTexture],destroyAttachments:!1})}function U$7(e,t){var i=[];e._useLogDepth&&i.push("LOG_DEPTH");var n=new a$O({sources:[G$d],defines:i}),r={u_colorTexture:function(){return e._colorTexture},u_transitionAndCountTexture:function(){return e._transitionTexture}},o=p$1a.fromCache({depthTest:{enabled:!1},depthMask:!1,blending:W$5});e._drawCommand=t.createViewportQuadCommand(n,{uniformMap:r,renderState:o,pass:e._passType,owner:e}),e._clearCommand=new r$M({color:new e$1z(0,0,0,0),depth:1,renderState:p$1a.fromCache(),pass:e._passType,owner:e})}function Q$8(e,t){var i=e._screenWidth,n=e._screenHeight,r=e._colorTexture,o=!1,a=t$$(r)&&(r.width!==i||r.height!==n);return(!t$$(r)||a)&&(y$d(e),I$7(e,t),U$7(e,t),o=!0),o}function D$b(e){return e.drawBuffers&&e.fragmentDepth}function o$b(){this._drawCommand=void 0,this.enable=!1,this._particleStateTexture=void 0,this._initialized=!1}function n$b(e){e._drawCommand=void 0,e._clearCommand=void 0}function h$8(e,t){var i=new a$O({sources:[V$c]}),n={colorTexture:function(){return e._particleStateTexture}},r=p$1a.fromCache({depthTest:{enabled:!1},depthMask:!1,blending:Ee$s.ALPHA_BLEND});e._drawCommand=t.createViewportQuadCommand(i,{uniformMap:n,renderState:r,pass:e._passType,owner:e})}function l$b(e,t){var i=!1;return e._initialized||(n$b(e),h$8(e,t),i=!0,e._initialized=!0),i}function a$c(e){return e.drawBuffers&&e.fragmentDepth}function o$a(e){if("string"==typeof e){var t=document.getElementById(e);if(null===t)throw new t$_('Element with id "'+e+'" does not exist in the document.');e=t}return e}function n$a(e){var t=o$a((e=e$1Y(e,e$1Y.EMPTY_OBJECT)).container);if(!t$$(t))throw new t$_("container is required");this._container=t;var i=document.createElement("div");i.className="cesium-performanceDisplay";var n=document.createElement("div");n.className="cesium-performanceDisplay-fps",this._fpsText=document.createTextNode(""),n.appendChild(this._fpsText);var r=document.createElement("div");r.className="cesium-performanceDisplay-ms",this._msText=document.createTextNode(""),r.appendChild(this._msText),i.appendChild(r),i.appendChild(n),this._container.appendChild(i),this._lastFpsSampleTime=yt$9(),this._lastMsSampleTime=yt$9(),this._fpsFrameCount=0,this._msFrameCount=0,this._throttled=!1;var o=document.createElement("div");o.className="cesium-performanceDisplay-throttled",this._throttledText=document.createTextNode(""),o.appendChild(this._throttledText),i.appendChild(o);var a=document.createElement("div");a.className="cesium-performanceDisplay-ms",this._trangleCountText=document.createTextNode(""),a.appendChild(this._trangleCountText),i.appendChild(a)}function u$a(){this._framebuffer=void 0,this._depthTexture=void 0,this._textureToCopy=void 0,this._copyDepthCommand=void 0,this._useLogDepth=void 0,this._debugPickDepthViewportCommand=void 0}function w$g(e,t,i,n){if(!t$$(e._debugPickDepthViewportCommand)||n!==e._useLogDepth){var r=new a$O({defines:[n?"LOG_DEPTH":""],sources:["uniform highp sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n float z_window = czm_unpackDepth(texture2D(u_texture, v_textureCoordinates));\n z_window = czm_reverseLogDepth(z_window); \n float n_range = czm_depthRange.near;\n float f_range = czm_depthRange.far;\n float z_ndc = (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n float scale = pow(z_ndc * 0.5 + 0.5, 8.0);\n gl_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);\n}\n"]});e._debugPickDepthViewportCommand=t.createViewportQuadCommand(r,{uniformMap:{u_texture:function(){return e._depthTexture}},owner:e}),e._useLogDepth=n}e._debugPickDepthViewportCommand.execute(t,i)}function c$c(e){e._depthTexture=e._depthTexture&&!e._depthTexture.isDestroyed()&&e._depthTexture.destroy()}function s$c(e){e._framebuffer=e._framebuffer&&!e._framebuffer.isDestroyed()&&e._framebuffer.destroy()}function l$a(e,t,i,n){e._depthTexture=new P$S({context:t,width:i,height:n,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE})}function T$a(e,t,i,n){c$c(e),s$c(e),l$a(e,t,i,n),e._framebuffer=new u$F({context:t,colorTextures:[e._depthTexture],destroyAttachments:!1})}function b$e(e,t,i){var n=i.width,r=i.height,o=e._depthTexture,a=!t$$(o)||o.width!==n||o.height!==r;(!t$$(e._framebuffer)||a)&&T$a(e,t,n,r)}function z$c(e,t,i){if(t.depthTexture){if(!t$$(e._copyDepthCommand)){var n="uniform highp sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n gl_FragColor = czm_packDepth(texture2D(u_texture, v_textureCoordinates).r);\n}\n";e._copyDepthCommand=t.createViewportQuadCommand(n,{renderState:p$1a.fromCache(),uniformMap:{u_texture:function(){return e._textureToCopy}},owner:e})}}else if(!t$$(e._copyDepthCommand)){n="uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n gl_FragColor = texture2D(u_texture, v_textureCoordinates).rgba;\n}\n";e._copyDepthCommand=t.createViewportQuadCommand(n,{renderState:p$1a.fromCache(),uniformMap:{u_texture:function(){return e._textureToCopy}},owner:e})}e._textureToCopy=i,e._copyDepthCommand.framebuffer=e._framebuffer}h$9.isSupported=D$b,h$9.prototype.update=function(e,t){if(D$b(e.context)&&this.enable){var i=e.context;this._screenWidth=Math.floor(i.drawingBufferWidth*this.quality),this._screenHeight=Math.floor(i.drawingBufferHeight*this.quality),m$g.width=this._screenWidth,m$g.height=this._screenHeight,this._useLogDepth=e.useLogDepth,this._useHdr=t,Q$8(this,i)}},h$9.prototype.execute=function(e,t){!t$$(this._drawCommand)||!this.enable||!t$$(e.uniformState)||!t$$(e.uniformState.globeDepthTexture)||this._drawCommand.execute(e,t)},h$9.prototype.executeCommand=function(e,t,i,n,r){if(0!=r){var o,a,s=e.context,l=e.frameState.useLogDepth,u=e._hdr,c=i.framebuffer;for(i.framebuffer=this._colorFBO,a=0;a<r;++a)o=n[a],o=l?o.derivedCommands.logDepth.command:o,t(o=u?o.derivedCommands.hdr.command:o,e,s,i);for(i.framebuffer=this._transitionFBO,a=0;a<r;++a){if(o=n[a],o=l?o.derivedCommands.logDepth.command:o,o=u?o.derivedCommands.hdr.command:o,!t$$(this._particleSp)||this._useHdr!==this.useHdr){this.useHdr=this._useHdr;var h=o.shaderProgram.fragmentShaderSource.clone(),d=o.shaderProgram.vertexShaderSource.clone();h.defines.push("PARTICLESYSTEM"),this._particleSp=p$15.fromCache({context:s,vertexShaderSource:d,fragmentShaderSource:h})}var f=o.shaderProgram;o._shaderProgram=this._particleSp,t(o,e,s,i),o._shaderProgram=f}i.framebuffer=c}},h$9.prototype.clear=function(e,t){!t$$(this._clearCommand)||!this.enable||(this._clearCommand.framebuffer=this._colorFBO,this._clearCommand.execute(e,t),this._clearCommand.framebuffer=this._transitionFBO,this._clearCommand.execute(e,t))},h$9.prototype.createDerivedCommands=function(e){!t$$(e)||(this.enable=!0,t$$(this._colorFBO)&&(e.renderState=q$a(this._renderStateCache,e.renderState)))},h$9.prototype.isDestroyed=function(){return!1},h$9.prototype.destroy=function(){return y$d(this),s$1e(this)},o$b.isSupported=a$c,o$b.prototype.update=function(e){if(this.enable=!0,a$c(e.context)&&this.enable)l$b(this,e.context)},o$b.prototype.execute=function(e,t){!t$$(this._drawCommand)||!this.enable||!t$$(e.uniformState)||!t$$(e.uniformState.globeDepthTexture)||this._drawCommand.execute(e,t)},o$b.prototype.isDestroyed=function(){return!1},o$b.prototype.destroy=function(){return n$b(this),s$1e(this)},Object.defineProperties(n$a.prototype,{throttled:{get:function(){return this._throttled},set:function(e){this._throttled!==e&&(this._throttledText.nodeValue=e?"(throttled)":"",this._throttled=e)}},trangleCount:{set:function(e){this._trangleCount!==e&&(this._trangleCount=e,this._trangleCountText.nodeValue=e)}}}),n$a.prototype.update=function(e){var t=yt$9(),i=e$1Y(e,!0);this._fpsFrameCount++;var n=t-this._lastFpsSampleTime;if(n>1e3){var r="N/A";i&&(r=1e3*this._fpsFrameCount/n|0),this._fpsText.nodeValue=r+" FPS",this._lastFpsSampleTime=t,this._fpsFrameCount=0}this._msFrameCount++;var o=t-this._lastMsSampleTime;if(o>200){var a="N/A";i&&(a=(o/this._msFrameCount).toFixed(2)),this._msText.nodeValue=a+" MS",this._lastMsSampleTime=t,this._msFrameCount=0}},n$a.prototype.destroy=function(){return s$1e(this)},u$a.prototype.executeDebugPickDepth=function(e,t,i){w$g(this,e,t,i)},u$a.prototype.update=function(e,t){b$e(this,e,t),z$c(this,e,t)},new a$10;var P$7=new a$10(1,1/255,1/65025,1/16581375);function f$d(){this._depthStencilTexture=void 0,this._framebuffer=void 0,this._passState=void 0}function c$b(e){e._framebuffer=e._framebuffer&&e._framebuffer.destroy(),e._depthStencilTexture=e._depthStencilTexture&&e._depthStencilTexture.destroy()}function w$f(e,t){var i=t.drawingBufferWidth,n=t.drawingBufferHeight;t.depthTexture?(e._depthStencilTexture=new P$S({context:t,width:i,height:n,pixelFormat:Z$_.DEPTH_STENCIL,pixelDatatype:v$Z.UNSIGNED_INT_24_8}),e._framebuffer=new u$F({context:t,depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1})):(e._depthStencilTexture=new P$S({context:t,width:i,height:n,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE}),e._framebuffer=new u$F({context:t,colorTextures:[e._depthStencilTexture],depthStencilRenderbuffer:new h$q({context:t,width:i,height:n,format:E$r.DEPTH_STENCIL}),destroyAttachments:!1}));var r=new t$l(t);r.blendingEnabled=!1,r.scissorTest={enabled:!0,rectangle:new n$13},r.viewport=new n$13,e._passState=r}function a$b(e){var t=new t$l(e);t.blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new n$13},t.viewport=new n$13,this._context=e,this._fb=void 0,this._passState=t,this._width=0,this._height=0}function d$c(){this._colorTexture=void 0,this._idTexture=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this._framebuffer=void 0,this._idFramebuffer=void 0,this._idClearColor=new e$1z(0,0,0,0),this._useHdr=void 0,this._clearCommand=new r$M({color:new e$1z(0,0,0,0),depth:1,owner:this})}function x$d(e){e._framebuffer=e._framebuffer&&e._framebuffer.destroy(),e._idFramebuffer=e._idFramebuffer&&e._idFramebuffer.destroy(),e._colorTexture=e._colorTexture&&e._colorTexture.destroy(),e._idTexture=e._idTexture&&e._idTexture.destroy(),e._depthStencilTexture=e._depthStencilTexture&&e._depthStencilTexture.destroy(),e._depthStencilRenderbuffer=e._depthStencilRenderbuffer&&e._depthStencilRenderbuffer.destroy(),e._depthStencilIdTexture=e._depthStencilIdTexture&&e._depthStencilIdTexture.destroy(),e._depthStencilIdRenderbuffer=e._depthStencilIdRenderbuffer&&e._depthStencilIdRenderbuffer.destroy(),e._framebuffer=void 0,e._idFramebuffer=void 0,e._colorTexture=void 0,e._idTexture=void 0,e._depthStencilTexture=void 0,e._depthStencilRenderbuffer=void 0,e._depthStencilIdTexture=void 0,e._depthStencilIdRenderbuffer=void 0}function f$c(e){var t=new t$l(e);t.blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new n$13},t.viewport=new n$13,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0,isOnlyS3MObjectVisible:!0,isUnderGlobeVisible:!1},this._context=e,this._fb=void 0,this._passState=t,this._width=0,this._height=0}function x$c(e,t,i){var n,r,o=e.context,a=[],s=t.frustum.near,l=t.frustum.far,u=e.logarithmicDepthBuffer?e.logarithmicDepthFarToNearRatio:e.farToNearRatio;W$4(s,l,u,Math.ceil(Math.log(l/s)/Math.log(u)),e.logarithmicDepthBuffer,a,!1,void 0),o.depthTexture&&(n=new f$g),e._useOIT&&o.depthTexture&&(r=new _$c(o));var c=new t$l(o);c.viewport=n$13.clone(i),this.camera=t,this._cameraClone=p$m.clone(t),this._cameraStartFired=!1,this._cameraMovedTime=void 0,this.viewport=i,this.passState=c,this.pickFramebuffer=new a$b(o),this.pickPointFramebuffer=new f$c(o),this.pickDepthFramebuffer=new f$d,this.sceneFramebuffer=new d$c,this.normalFramebuffer=new r$f(o),this.globeDepth=n,this.oit=r,this.pickDepths=[],this.debugGlobeDepths=[],this.frustumCommandsList=a,this.debugFrustumStatistics=void 0,this.updateFrustums=!1}u$a.prototype.getDepth=function(e,t,i,n){var r=1;t$$(n)&&(r+=n),t-=Math.floor(.5*r),i-=Math.floor(.5*r);var o=e.readPixels({x:t,y:i,width:r,height:r,framebuffer:this._framebuffer}),a=[];a$10.unpackArray(o,a);for(var s=Number.POSITIVE_INFINITY,l=0;l<a.length;l++){var u=a[l];a$10.divideByScalar(u,255,u),s=Math.min(s,a$10.dot(u,P$7))}return s},u$a.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)},u$a.prototype.isDestroyed=function(){return!1},u$a.prototype.destroy=function(){return c$c(this),s$c(this),this._copyDepthCommand.shaderProgram=t$$(this._copyDepthCommand.shaderProgram)&&this._copyDepthCommand.shaderProgram.destroy(),s$1e(this)},f$d.prototype.update=function(e,t,i){var n=i.width,r=i.height;(!t$$(this._framebuffer)||n!==this._depthStencilTexture.width||r!==this._depthStencilTexture.height)&&(c$b(this),w$f(this,e));var o=this._framebuffer,a=this._passState;return a.framebuffer=o,a.viewport.width=n,a.viewport.height=r,a.scissorTest.rectangle.x=t.x,a.scissorTest.rectangle.y=r-t.y,a.scissorTest.rectangle.width=1,a.scissorTest.rectangle.height=1,a},f$d.prototype.isDestroyed=function(){return!1},f$d.prototype.destroy=function(){return c$b(this),s$1e(this)},a$b.prototype.begin=function(e,t,i){var n=this._context,r=t.width,o=t.height;return n$13.clone(e,this._passState.scissorTest.rectangle),this._passState.scissorTest.enabled=!i,(!t$$(this._fb)||this._width!==r||this._height!==o)&&(this._width=r,this._height=o,this._fb=this._fb&&this._fb.destroy(),this._fb=new u$F({context:n,colorTextures:[new P$S({context:n,width:r,height:o})],depthStencilRenderbuffer:new h$q({context:n,width:r,height:o,format:E$r.DEPTH_STENCIL})}),this._passState.framebuffer=this._fb),this._passState.viewport.width=r,this._passState.viewport.height=o,this._passState},new e$1z,a$b.prototype.end=function(e){var t=e$1Y(e.width,1),i=e$1Y(e.height,1),n=this._context,r=n.readPixels({x:e.x,y:e.y,width:t,height:i,framebuffer:this._fb});n.pixels=r;for(var o=Math.max(t,i),a=o*o,s=Math.floor(.5*t),l=Math.floor(.5*i),u=0,c=0,h=0,d=-1,f=0;f<a;++f){if(-s<=u&&u<=s&&-l<=c&&c<=l){var p=4*((l-c)*t+u+s),_=e$1z.byteToRgba(r[p],r[p+1],r[p+2],r[p+3]),m=n.getObjectByPickId(_);if(t$$(m))return m}if(u===c||u<0&&-u===c||u>0&&u===1-c){var $=h;h=-d,d=$}u+=h,c+=d}},a$b.prototype.isDestroyed=function(){return!1},a$b.prototype.destroy=function(){return this._fb=this._fb&&this._fb.destroy(),s$1e(this)},d$c.prototype.update=function(e,t,i){var n=t.width,r=t.height,o=this._colorTexture;if(!t$$(o)||o.width!==n||o.height!==r||i!==this._useHdr){x$d(this),this._useHdr=i;var a=i?e.halfFloatingPointTexture?v$Z.HALF_FLOAT:v$Z.FLOAT:v$Z.UNSIGNED_BYTE;this._colorTexture=new P$S({context:e,width:n,height:r,pixelFormat:Z$_.RGBA,pixelDatatype:a,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST})}),this._idTexture=new P$S({context:e,width:n,height:r,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST})}),e.depthTexture?(this._depthStencilTexture=new P$S({context:e,width:n,height:r,pixelFormat:Z$_.DEPTH_STENCIL,pixelDatatype:v$Z.UNSIGNED_INT_24_8,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST})}),this._depthStencilIdTexture=new P$S({context:e,width:n,height:r,pixelFormat:Z$_.DEPTH_STENCIL,pixelDatatype:v$Z.UNSIGNED_INT_24_8,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST})})):(this._depthStencilRenderbuffer=new h$q({context:e,width:n,height:r,format:E$r.DEPTH_STENCIL}),this._depthStencilIdRenderbuffer=new h$q({context:e,width:n,height:r,format:E$r.DEPTH_STENCIL})),this._framebuffer=new u$F({context:e,colorTextures:[this._colorTexture],depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1}),this._idFramebuffer=new u$F({context:e,colorTextures:[this._idTexture],depthStencilTexture:this._depthStencilIdTexture,depthStencilRenderbuffer:this._depthStencilIdRenderbuffer,destroyAttachments:!1})}},d$c.prototype.clear=function(e,t,i){var n=t.framebuffer;t.framebuffer=this._framebuffer,e$1z.clone(i,this._clearCommand.color),this._clearCommand.execute(e,t),t.framebuffer=this._idFramebuffer,e$1z.clone(this._idClearColor,this._clearCommand.color),this._clearCommand.execute(e,t),t.framebuffer=n},d$c.prototype.getFramebuffer=function(){return this._framebuffer},d$c.prototype.getIdFramebuffer=function(){return this._idFramebuffer},d$c.prototype.isDestroyed=function(){return!1},d$c.prototype.destroy=function(){return x$d(this),s$1e(this)},f$c.prototype.begin=function(e,t){var i=this._context,n=t.width,r=t.height;return n$13.clone(e,this._passState.scissorTest.rectangle),(!t$$(this._fb)||this._width!==n||this._height!==r)&&(this._width=n,this._height=r,this._fb=this._fb&&this._fb.destroy(),this._fb=new u$F({context:i,colorTextures:[new P$S({context:i,width:n,height:r,pixelFormat:Z$_.RGB,pixelDatatype:v$Z.FLOAT})],depthStencilRenderbuffer:new h$q({context:i,width:n,height:r,format:E$r.DEPTH_STENCIL})}),this._passState.framebuffer=this._fb),this._passState.viewport.width=n,this._passState.viewport.height=r,this._passState},f$c.prototype.end=function(e){var t=e$1Y(e.width,1),i=e$1Y(e.height,1),n=this._context,r=n.readPixels({x:e.x,y:e.y,width:t,height:i,framebuffer:this._fb});n.pixels=r;for(var o=Math.max(t,i),a=o*o,s=Math.floor(.5*t),l=Math.floor(.5*i),u=0,c=0,h=0,d=-1,f=0;f<a;++f){if(-s<=u&&u<=s&&-l<=c&&c<=l){var p=4*((l-c)*t+u+s),_=new a$10(r[p],r[p+1],r[p+2],1);if(_.z<-n$1d.EPSILON10)return _}if(u===c||u<0&&-u===c||u>0&&u===1-c){var m=h;h=-d,d=m}u+=h,c+=d}},f$c.prototype.isDestroyed=function(){return!1},f$c.prototype.destroy=function(){return this._fb=this._fb&&this._fb.destroy(),s$1e(this)};var q$9=new a$11,z$b=new a$11;function lt$2(e,t){var i=Math.max(Math.abs(e.x),Math.abs(t.x)),n=Math.max(Math.abs(e.y),Math.abs(t.y)),r=Math.max(Math.abs(e.z),Math.abs(t.z));return Math.max(Math.max(i,n),r)}function dt$1(e,t,i){var n=1/Math.max(1,lt$2(e.position,t.position));return a$11.multiplyByScalar(e.position,n,q$9),a$11.multiplyByScalar(t.position,n,z$b),a$11.equalsEpsilon(q$9,z$b,i)&&a$11.equalsEpsilon(e.direction,t.direction,i)&&a$11.equalsEpsilon(e.up,t.up,i)&&a$11.equalsEpsilon(e.right,t.right,i)&&c$1a.equalsEpsilon(e.transform,t.transform,i)&&e.frustum.equalsEpsilon(t.frustum,i)}function W$4(e,t,i,n,r,o,a,s){o.length=n;for(var l=0;l<n;++l){var u,c;a?(u=Math.min(t-s,e+l*s),c=Math.min(t,u+s)):(c=i*(u=Math.max(e,Math.pow(i,l)*e)),r||(c=Math.min(t,c)));var h=o[l];t$$(h)?(h.near=u,h.far=c):h=o[l]=new i$c(u,c)}}function ct$2(e,t,i,n){e.debugShowFrustums&&(i.debugOverlappingFrustums=0);for(var r=t.frustumCommandsList,o=r.length,a=0;a<o;++a){var s=r[a],l=s.near,u=s.far;if(!(n.start>u)){if(n.stop<l)break;var c=i.pass,h=s.indices[c]++;if(s.commands[c][h]=i,e.debugShowFrustums&&(i.debugOverlappingFrustums|=1<<a),i.executeInClosestFrustum)break}}if(e.debugShowFrustums){var d=t.debugFrustumStatistics.commandsInFrustums;d[i.debugOverlappingFrustums]=t$$(d[i.debugOverlappingFrustums])?d[i.debugOverlappingFrustums]+1:1,++t.debugFrustumStatistics.totalCommands}e.updateDerivedCommands(i)}x$c.prototype.checkForCameraUpdates=function(e){var t=this.camera,i=this._cameraClone;return dt$1(t,i,n$1d.EPSILON6)?(this._cameraStartFired&&yt$9()-this._cameraMovedTime>e.cameraEventWaitTime&&(t.moveEnd.raiseEvent(),this._cameraStartFired=!1),!1):(this._cameraStartFired||(t.moveStart.raiseEvent(),this._cameraStartFired=!0),this._cameraMovedTime=yt$9(),p$m.clone(t,i),!0)};var Y$9=new i$_,m$f=new i$1f;x$c.prototype.createPotentiallyVisibleSet=function(e){var t=e.frameState,i=t.camera,n=i.directionWC,r=i.positionWC,o=e._computeCommandList,a=e._overlayCommandList,s=e._logDepthOverlayCommandList,l=e._overlayAgainstDepthCommandList,u=t.commandList;e.debugShowFrustums&&(this.debugFrustumStatistics={totalCommands:0,commandsInFrustums:{}});for(var c=this.frustumCommandsList,h=c.length,d=we$l.NUMBER_OF_PASSES,f=0;f<h;++f)for(var p=0;p<d;++p)c[f].indices[p]=0;o.length=0,a.length=0,s.length=0,l.length=0;for(var _=Number.MAX_VALUE,m=-Number.MAX_VALUE,$=!1,g=t.shadowState.shadowsEnabled,y=Number.MAX_VALUE,v=-Number.MAX_VALUE,x=Number.MAX_VALUE,b=t.mode===b$1d.SCENE3D?t.occluder:void 0,S=t.cullingVolume,w=Y$9.planes,C=0;C<5;++C)w[C]=S.planes[C];S=Y$9;for(var T=u.length,P=0;P<T;++P){var E=u[P];if(e.terrainProvider.isShowGlobe||!0!==E.invalid){var A=E.pass;if(A===we$l.COMPUTE)o.push(E);else if(A===we$l.LOG_DEPTH_OVERLAY)s.push(E),e.updateDerivedCommands(E);else if(A===we$l.OVERLAY)a.push(E),e.updateDerivedCommands(E);else if(A===we$l.OVERLAY_AGAINST_DEPTH)l.push(E),e.updateDerivedCommands(E);else{var L=E.boundingVolume;if(t$$(L)&&E.cull){if(!e.isVisible(E,S,b))continue;if(m$f=L.computePlaneDistances(r,n,m$f),_=Math.min(_,m$f.start),m=Math.max(m,m$f.stop),g&&E.receiveShadows&&m$f.start<O$g.MAXIMUM_DISTANCE&&!(A===we$l.GLOBE&&m$f.start<-100&&m$f.stop>100)){var M=m$f.stop-m$f.start;A!==we$l.GLOBE&&m$f.start<100&&(x=Math.min(x,M));var I=Math.max(m$f.start,5);y=Math.min(y,I),v=Math.max(v,m$f.stop)}}else m$f.start=i.frustum.near,m$f.stop=i.frustum.far,$=!(E instanceof r$M);ct$2(e,this,E,m$f)}}}$?(_=i.frustum.near,m=i.frustum.far):(_=Math.min(Math.max(_,i.frustum.near),i.frustum.far),_=t.useLogDepth?_:Math.max(_,1),m=Math.max(Math.min(m,i.frustum.far),_),g&&(y=Math.min(Math.max(y,i.frustum.near),i.frustum.far),v=Math.max(Math.min(v,i.frustum.far),y+1))),g&&(t.shadowState.nearPlane=Math.max(y,1),t.shadowState.farPlane=v,t.shadowState.closestObjectSize=x);var O,D=e.mode===b$1d.SCENE2D,R=t.useLogDepth,N=R?e.logarithmicDepthFarToNearRatio:e.farToNearRatio;!t.useLogDepth&&t.context.depthTexture&&(t.passes.fbo||t._isDepth||e.compositor.isScanEnable())&&(N=e.logarithmicDepthFarToNearRatio,_=Math.max(_,1)),D?(m=Math.min(m,i.position.z+e.nearToFarDistance2D),_=Math.min(_,m),O=Math.ceil(Math.max(1,m-_)/e.nearToFarDistance2D)):O=Math.ceil(Math.log(m/_)/Math.log(N)),(this.updateFrustums||_!==Number.MAX_VALUE&&(O!==h||0!==c.length&&(_<c[0].near||m>c[h-1].far&&(R||!n$1d.equalsEpsilon(m,c[h-1].far,n$1d.EPSILON8)))))&&(this.updateFrustums=!1,W$4(_,m,N,O,R,c,D,e.nearToFarDistance2D),this.createPotentiallyVisibleSet(e));var F=t.frustumSplits;F.length=O+1;for(var B=0;B<O;++B)F[B]=c[B].near,B===O-1&&(F[B+1]=c[B].far);"normal"===t._fboState.name&&(e._commandsNear=_,e._commandsFar=m)},x$c.prototype.destroy=function(){this.pickFramebuffer=this.pickFramebuffer&&this.pickFramebuffer.destroy(),this.pickPointFramebuffer=this.pickPointFramebuffer&&this.pickPointFramebuffer.destroy(),this.pickDepthFramebuffer=this.pickDepthFramebuffer&&this.pickDepthFramebuffer.destroy(),this.sceneFramebuffer=this.sceneFramebuffer&&this.sceneFramebuffer.destroy(),this.normalFramebuffer=this.normalFramebuffer&&this.normalFramebuffer.destroy(),this.globeDepth=this.globeDepth&&this.globeDepth.destroy(),this.oit=this.oit&&this.oit.destroy();var e,t,i=this.pickDepths,n=this.debugGlobeDepths;for(t=i.length,e=0;e<t;++e)i[e].destroy();for(t=n.length,e=0;e<t;++e)n[e].destroy()};var Q$7=.1,ge$4=new i$h({pass:_t$6.MOST_DETAILED_PRELOAD}),ye$4=new i$h({pass:_t$6.MOST_DETAILED_PICK}),q$8=new i$h({pass:_t$6.PICK});function l$9(e){this._mostDetailedRayPicks=[],this.pickRenderStateCache={},this._pickPositionCache={},this._pickPositionCacheDirty=!1;var t=new n$13(0,0,1,1),i=new p$m(e);i.frustum=new r$K({width:Q$7,aspectRatio:1,near:.1}),this._pickOffscreenView=new x$c(e,i,t)}l$9.prototype.update=function(){this._pickPositionCacheDirty=!0},l$9.prototype.getPickDepth=function(e,t){var i=e.view.pickDepths,n=i[t];return t$$(n)||(n=new u$a,i[t]=n),n};var Ce$3=new l$W,De$4=new a$11,V$8=new a$11,ke$1=new r$T,Pe$4=new c$1a;function Se$3(e,t,i,n,r){var o=e.camera,a=o.frustum;t$$(a._offCenterFrustum)&&(a=a._offCenterFrustum);var s=2*(t.x-r.x)/r.width-1;s*=.5*(a.right-a.left);var l=2*(r.height-t.y-r.y)/r.height-1;l*=.5*(a.top-a.bottom);var u=c$1a.clone(o.transform,Pe$4);o._setTransform(c$1a.IDENTITY);var c=a$11.clone(o.position,De$4);a$11.multiplyByScalar(o.right,s,V$8),a$11.add(V$8,c,c),a$11.multiplyByScalar(o.up,l,V$8),a$11.add(V$8,c,c),o._setTransform(u),e.mode===b$1d.SCENE2D&&a$11.fromElements(c.z,c.x,c.y,c);var h=a.getPixelDimensions(r.width,r.height,1,1,ke$1),d=Ce$3;return d.right=.5*h.x,d.left=-d.right,d.top=.5*h.y,d.bottom=-d.top,d.near=a.near,d.far=a.far,d.computeCullingVolume(c,o.directionWC,o.upWC)}var xe$5=new l$V,Ee$4=new r$T;function be$2(e,t,i,n,r){var o=e.camera,a=o.frustum,s=a.near,l=Math.tan(.5*a.fovy),u=a.aspectRatio*l,c=(2*(t.x-r.x)/r.width-1)*s*u,h=(2*(r.height-t.y-r.y)/r.height-1)*s*l,d=a.getPixelDimensions(r.width,r.height,1,1,Ee$4),f=d.x*i*.5,p=d.y*n*.5,_=xe$5;return _.top=h+p,_.bottom=h-p,_.right=c+f,_.left=c-f,_.near=s,_.far=a.far,_.computeCullingVolume(o.positionWC,o.directionWC,o.upWC)}function Z$7(e,t,i,n,r){var o=e.camera.frustum;return o instanceof r$K||o instanceof l$W?Se$3(e,t,i,n,r):be$2(e,t,i,n,r)}var E$c=3,H$c=3,k$9=new n$13(0,0,E$c,H$c),$$5=new r$T,z$a=new e$1z(0,0,0,0);function Te$3(e,t){var i=e.context,n=e.frameState,r=e.environmentState,o=e.defaultView;e.view=o;var a=o.viewport;a.x=0,a.y=0,a.width=i.drawingBufferWidth,a.height=i.drawingBufferHeight;var s=o.passState;s.viewport=n$13.clone(a,s.viewport),e.clearPasses(n.passes),n.passes.pick=!0,n.passes.depth=!0,n.cullingVolume=Z$7(e,t,1,1,a),n.tilesetPassState=q$8,e.updateEnvironment(),r.renderTranslucentDepthForPick=!0,s=o.pickDepthFramebuffer.update(i,t,a),e.updateAndExecuteCommands(s,z$a),e.resolveFramebuffers(s),i.endFrame()}l$9.prototype.pick=function(e,t,i,n){if(!t$$(t))throw new t$_("windowPosition is undefined.");E$c=e$1Y(i,3),H$c=e$1Y(n,E$c);var r=e.context,o=r.uniformState,a=e.frameState,s=e.defaultView;e.view=s;var l=s.viewport;l.x=0,l.y=0,l.width=r.drawingBufferWidth,l.height=r.drawingBufferHeight;var u=s.passState;u.viewport=n$13.clone(l,u.viewport);var c=u$V.transformWindowToDrawingBuffer(e,t,$$5);e.jobScheduler.disableThisFrame(),e.updateFrameState(),a.cullingVolume=Z$7(e,c,E$c,H$c,l),a.invertClassification=!1,a.passes.pick=!0,a.tilesetPassState=q$8,o.update(a),e.updateEnvironment(),k$9.x=c.x-.5*(E$c-1),k$9.y=e.drawingBufferHeight-c.y-.5*(H$c-1),k$9.width=E$c,k$9.height=H$c,u=s.pickFramebuffer.begin(k$9,s.viewport),e.updateAndExecuteCommands(u,z$a),e.resolveFramebuffers(u);var h=s.pickFramebuffer.end(k$9);return r.endFrame(),h};var Fe$3=new f$V,_e$3=new l$V,He$1=new r$K,Ve$3=new l$W;l$9.prototype.pickPositionWorldCoordinates=function(e,t,i){if(e.useDepthPicking){if(!t$$(t))throw new t$_("windowPosition is undefined.");if(!e.context.depthTexture)throw new t$_("Picking from the depth buffer is not supported. Check pickPositionSupported.");var n=t.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(n))return a$11.clone(this._pickPositionCache[n],i);var r=e.frameState,o=e.context,a=o.uniformState,s=e.defaultView;e.view=s;var l=u$V.transformWindowToDrawingBuffer(e,t,$$5);e.pickTranslucentDepth?Te$3(e,l):(e.updateFrameState(),a.update(r),e.updateEnvironment()),l.y=e.drawingBufferHeight-l.y;var u,c=e.camera;u=t$$(c.frustum.fov)?c.frustum.clone(Fe$3):t$$(c.frustum.infiniteProjectionMatrix)?c.frustum.clone(_e$3):t$$(c.frustum.width)?c.frustum.clone(He$1):c.frustum.clone(Ve$3);for(var h=s.frustumCommandsList,d=h.length,f=0;f<d;++f){var p=this.getPickDepth(e,f).getDepth(o,l.x,l.y);if(p>0&&p<1){var _,m=h[f];return e.mode===b$1d.SCENE2D?(_=c.position.z,c.position.z=_-m.near+1,u.far=Math.max(1,m.far-m.near),u.near=1,a.update(r),a.updateFrustum(u)):(u.near=m.near*(0!==f?e.opaqueFrustumNearOffset:1),u.far=m.far,a.updateFrustum(u)),i=u$V.drawingBufferToWgs84Coordinates(e,l,p,i),e.mode===b$1d.SCENE2D&&(c.position.z=_,a.update(r)),this._pickPositionCache[n]=a$11.clone(i),i}}this._pickPositionCache[n]=void 0}};var Re$3=new i$1g;function Y$8(e,t){var i,n,r=[],o=[],a=[],s=[];t$$(e)||(e=Number.MAX_VALUE);for(var l=t();t$$(l);){var u=l.object,c=l.position,h=l.exclude;if(t$$(c)&&!t$$(u)){r.push(l);break}if(!t$$(u)||!t$$(u.primitive)||!h&&(r.push(l),0>=--e))break;var d=u.primitive,f=!1;"function"==typeof d.getGeometryInstanceAttributes&&t$$(u.id)&&(t$$(n=d.getGeometryInstanceAttributes(u.id))&&t$$(n.show)&&(f=!0,n.show=e$18.toValue(!1,n.show),a.push(n))),u instanceof e$Z&&(f=!0,u.show=!1,s.push(u)),f||(d.show=!1,o.push(d)),l=t()}for(i=0;i<o.length;++i)o[i].show=!0;for(i=0;i<a.length;++i)(n=a[i]).show=e$18.toValue(!0,n.show);for(i=0;i<s.length;++i)s[i].show=!0;return r}l$9.prototype.pickPosition=function(e,t,i){if(t$$(i=this.pickPositionWorldCoordinates(e,t,i))&&e.mode!==b$1d.SCENE3D){a$11.fromElements(i.y,i.z,i.x,i);var n=e.mapProjection,r=n.ellipsoid,o=n.unproject(i,Re$3);r.cartographicToCartesian(o,i)}return i},l$9.prototype.drillPick=function(e,t,i,n,r){var o=this,a=Y$8(i,(function(){var i=o.pick(e,t,n,r);if(t$$(i))return{object:i,position:void 0,exclude:!1}}));return a.map((function(e){return e.object}))};var ee$4=new a$11,Ne$2=new a$11;function Oe$3(e,t,i){this.ray=e,this.width=t,this.tilesets=i,this.ready=!1,this.deferred=c$18.defer(),this.promise=this.deferred.promise}function te$4(e,t,i,n){var r=t.direction,o=a$11.mostOrthogonalAxis(r,ee$4),a=a$11.cross(r,o,ee$4),s=a$11.cross(r,a,Ne$2);return n.position=t.origin,n.direction=r,n.up=s,n.right=a,n.frustum.width=e$1Y(i,Q$7),n.frustum.computeCullingVolume(n.positionWC,n.directionWC,n.upWC)}function Me$7(e,t,i){var n=t.frameState,r=i.ray,o=i.width,a=i.tilesets,s=e._pickOffscreenView.camera,l=te$4(e,r,o,s),u=ge$4;u.camera=s,u.cullingVolume=l;for(var c=!0,h=a.length,d=0;d<h;++d){var f=a[d];f.show&&t.primitives.contains(f)&&(f.updateForPass(n,u),c=c&&u.ready)}return c&&i.deferred.resolve(),c}function re$4(e,t,i){for(var n=e.length,r=0;r<n;++r){var o=e.get(r);o.show&&(t$$(o.isCesium3DTileset)?(!t$$(t)||-1===t.indexOf(o))&&i.push(o):o instanceof r$l&&re$4(o,t,i))}}function R$5(e,t,i,n,r,o){var a=[];if(re$4(t.primitives,n,a),0===a.length)return c$18.resolve(o());var s=new Oe$3(i,r,a);return e._mostDetailedRayPicks.push(s),s.promise.then((function(){return o()}))}function We$2(e,t){return!(!t$$(e)||!t$$(t)||0===t.length)&&(t.indexOf(e)>-1||t.indexOf(e.primitive)>-1||t.indexOf(e.id)>-1)}function je$3(e,t,i,n,r,o,a){var s=t.context,l=s.uniformState,u=t.frameState,c=e._pickOffscreenView;t.view=c,te$4(e,i,r,c.camera),k$9=n$13.clone(c.viewport,k$9);var h=c.pickFramebuffer.begin(k$9,c.viewport);t.jobScheduler.disableThisFrame(),t.updateFrameState(),u.invertClassification=!1,u.passes.pick=!0,u.passes.offscreen=!0,c.updateFrustums=!0,u.tilesetPassState=a?ye$4:q$8,l.update(u),t.updateEnvironment(),t.updateAndExecuteCommands(h,z$a),t.resolveFramebuffers(h);var d,f=c.pickFramebuffer.end(s);if(t.context.depthTexture)for(var p=c.frustumCommandsList.length,_=0;_<p;++_){var m=e.getPickDepth(t,_).getDepth(s,0,0);if(m>0&&m<1){var $=c.frustumCommandsList[_],g=$.near*(0!==_?t.opaqueFrustumNearOffset:1),y=g+m*($.far-g);d=n$18.getPoint(i,y);break}}if(t.view=t.defaultView,s.endFrame(),t$$(f)||t$$(d))return{object:f,position:d,exclude:!t$$(d)&&o||We$2(f,n)}}function ie$3(e,t,i,n,r,o,a,s){return Y$8(n,(function(){return je$3(e,t,i,r,o,a,s)}))}function b$d(e,t,i,n,r,o,a){var s=ie$3(e,t,i,1,n,r,o,a);if(s.length>0)return s[0]}function oe$4(e,t,i,n,r,o,a,s){return ie$3(e,t,i,n,r,o,a,s)}function N$8(e,t){var i=c$18.defer();return t.then((function(t){var n=e.postRender.addEventListener((function(){i.resolve(t),n()}));e.requestRender()})).otherwise((function(e){i.reject(e)})),i.promise}l$9.prototype.updateMostDetailedRayPicks=function(e){for(var t=this._mostDetailedRayPicks,i=0;i<t.length;++i)Me$7(this,e,t[i])&&t.splice(i--,1)},l$9.prototype.pickFromRay=function(e,t,i,n){if(n$1e.defined("ray",t),e.mode!==b$1d.SCENE3D)throw new t$_("Ray intersections are only supported in 3D mode.");return b$d(this,e,t,i,n,!1,!1)},l$9.prototype.drillPickFromRay=function(e,t,i,n,r){if(n$1e.defined("ray",t),e.mode!==b$1d.SCENE3D)throw new t$_("Ray intersections are only supported in 3D mode.");return oe$4(this,e,t,i,n,r,!1,!1)},l$9.prototype.pickFromRayMostDetailed=function(e,t,i,n){if(n$1e.defined("ray",t),e.mode!==b$1d.SCENE3D)throw new t$_("Ray intersections are only supported in 3D mode.");var r=this;return t=n$18.clone(t),i=t$$(i)?i.slice():i,N$8(e,R$5(r,e,t,i,n,(function(){return b$d(r,e,t,i,n,!1,!0)})))},l$9.prototype.drillPickFromRayMostDetailed=function(e,t,i,n,r){if(n$1e.defined("ray",t),e.mode!==b$1d.SCENE3D)throw new t$_("Ray intersections are only supported in 3D mode.");var o=this;return t=n$18.clone(t),n=t$$(n)?n.slice():n,N$8(e,R$5(o,e,t,n,r,(function(){return oe$4(o,e,t,i,n,r,!1,!0)})))};var Ae$3=new a$11,Be$5=new a$11,Ie$4=new n$18,ne$2=new i$1g;function G$c(e,t){var i=e.globe,n=t$$(i)?i.ellipsoid:e.mapProjection.ellipsoid,r=e$1P._defaultMaxTerrainHeight,o=n.geodeticSurfaceNormalCartographic(t,Be$5),a=i$1g.toCartesian(t,n,Ae$3),s=Ie$4;s.origin=a,s.direction=o;var l=new n$18;return n$18.getPoint(s,r,l.origin),a$11.negate(o,l.direction),l}function ae$4(e,t){var i=e.globe,n=t$$(i)?i.ellipsoid:e.mapProjection.ellipsoid;return G$c(e,i$1g.fromCartesian(t,n,ne$2))}function se$2(e,t){var i=e.globe,n=t$$(i)?i.ellipsoid:e.mapProjection.ellipsoid;return i$1g.fromCartesian(t,n,ne$2).height}function Le$3(e,t,i,n,r){var o=G$c(t,i);return R$5(e,t,o,n,r,(function(){var i=b$d(e,t,o,n,r,!0,!0);if(t$$(i))return se$2(t,i.position)}))}function qe$3(e,t,i,n,r,o){var a=ae$4(t,i);return R$5(e,t,a,n,r,(function(){var i=b$d(e,t,a,n,r,!0,!0);if(t$$(i))return a$11.clone(i.position,o)}))}function z$9(e){if(this._positions=e$1Y(e,[new a$11,new a$11,new a$11]),this.boundingSphere=c$19.fromPoints(e),t$$(e)){var t=S$C.fromPositions({positions:e,perPositionHeight:!0});this._geometry=S$C.createGeometry(t),this._triangleArrayByWeight=S$c(this)}this._density=1}l$9.prototype.sampleHeight=function(e,t,i,n){if(n$1e.defined("position",t),e.mode!==b$1d.SCENE3D)throw new t$_("sampleHeight is only supported in 3D mode.");if(!e.sampleHeightSupported)throw new t$_("sampleHeight requires depth texture support. Check sampleHeightSupported.");var r=b$d(this,e,G$c(e,t),i,n,!0,!1);if(t$$(r))return se$2(e,r.position)},l$9.prototype.clampToHeight=function(e,t,i,n,r){if(n$1e.defined("cartesian",t),e.mode!==b$1d.SCENE3D)throw new t$_("clampToHeight is only supported in 3D mode.");if(!e.clampToHeightSupported)throw new t$_("clampToHeight requires depth texture support. Check clampToHeightSupported.");var o=b$d(this,e,ae$4(e,t),i,n,!0,!1);if(t$$(o))return a$11.clone(o.position,r)},l$9.prototype.sampleHeightMostDetailed=function(e,t,i,n){if(n$1e.defined("positions",t),e.mode!==b$1d.SCENE3D)throw new t$_("sampleHeightMostDetailed is only supported in 3D mode.");if(!e.sampleHeightSupported)throw new t$_("sampleHeightMostDetailed requires depth texture support. Check sampleHeightSupported.");i=t$$(i)?i.slice():i;for(var r=t.length,o=new Array(r),a=0;a<r;++a)o[a]=Le$3(this,e,t[a],i,n);return N$8(e,c$18.all(o).then((function(e){for(var i=e.length,n=0;n<i;++n)t[n].height=e[n];return t})))},l$9.prototype.clampToHeightMostDetailed=function(e,t,i,n){if(n$1e.defined("cartesians",t),e.mode!==b$1d.SCENE3D)throw new t$_("clampToHeightMostDetailed is only supported in 3D mode.");if(!e.clampToHeightSupported)throw new t$_("clampToHeightMostDetailed requires depth texture support. Check clampToHeightSupported.");i=t$$(i)?i.slice():i;for(var r=t.length,o=new Array(r),a=0;a<r;++a)o[a]=qe$3(this,e,t[a],i,n,t[a]);return N$8(e,c$18.all(o).then((function(e){for(var i=e.length,n=0;n<i;++n)t[n]=e[n];return t})))},l$9.prototype.destroy=function(){this._pickOffscreenView=this._pickOffscreenView&&this._pickOffscreenView.destroy()},Object.defineProperties(z$9.prototype,{type:{get:function(){return"Polygon"}},positions:{get:function(){return this._positions},set:function(e){if(t$$(e)){this._positions=e;var t=S$C.fromPositions({positions:this._positions,perPositionHeight:!0});this._geometry=S$C.createGeometry(t),this._triangleArrayByWeight=S$c(this),this.boundingSphere=c$19.fromPoints(e),t$$(this.owner)&&(this.owner._updateParticlePool=!0)}}},density:{set:function(e){e!==this._density&&(this._density=e,t$$(this.owner)&&(this.owner._updateParticlePool=!0))},get:function(){return this._density}},areaFactor:{get:function(){return this._density*this._area/100|0}}});var l$8=new a$11,w$e=new a$11,v$8=new a$11;function S$c(e){var t,i,n=e._geometry,r=n.indices,o=r.length/3,a=n.attributes.position.values,s=[],l=0;for(t=0;t<o;t++){var u=r[3*t],c=r[3*t+1],h=r[3*t+2];l$8.x=a[3*u],l$8.y=a[3*u+1],l$8.z=a[3*u+2],w$e.x=a[3*c],w$e.y=a[3*c+1],w$e.z=a[3*c+2],v$8.x=a[3*h],v$8.y=a[3*h+1],v$8.z=a[3*h+2];var d=O$9(l$8,w$e,v$8);l+=d,s.push(d)}e._area=l;var f=Math.max(100,10*o),p=[];for(t=0;t<o;t++){var _=Math.floor(s[t]/l*f);for(_=Math.max(1,_),i=0;i<_;i++)p.push(t)}return p}var B$7=new a$11,W$3=new a$11,q$7=new a$11;function O$9(e,t,i){return B$7=a$11.subtract(t,e,B$7),W$3=a$11.subtract(i,e,W$3),q$7=a$11.cross(B$7,W$3,q$7),.5*a$11.magnitude(q$7)}function A$d(e,t,i,n,r){return(1-Math.sqrt(e))*i+Math.sqrt(e)*(1-t)*n+Math.sqrt(e)*t*r}z$9.prototype.emit=function(e){if(t$$(this._geometry)){var t=Math.floor(n$1d.randomBetween(0,this._triangleArrayByWeight.length)),i=this._triangleArrayByWeight[t],n=this._geometry.indices[3*i],r=this._geometry.indices[3*i+1],o=this._geometry.indices[3*i+2],a=this._geometry.attributes.position.values,s=a[3*n],l=a[3*n+1],u=a[3*n+2],c=a[3*r],h=a[3*r+1],d=a[3*r+2],f=a[3*o],p=a[3*o+1],_=a[3*o+2],m=n$1d.randomBetween(0,1),$=n$1d.randomBetween(0,1),g=A$d(m,$,s,c,f),y=A$d(m,$,l,h,p),v=A$d(m,$,u,d,_);e.position=a$11.fromElements(g,y,v,e.position),e.velocity=a$11.normalize(e.position,e.velocity)}};var e$9={NEAREST:0,LINEAR:1};function p$b(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).fragmentShader,i=e$1Y(e.textureScale,1),n=e$1Y(e.pixelFormat,Z$_.RGBA);if(n$1e.typeOf.string("options.fragmentShader",t),n$1e.typeOf.number.greaterThan("options.textureScale",i,0),n$1e.typeOf.number.lessThanOrEquals("options.textureScale",i,1),!Z$_.isColorFormat(n))throw new t$_("options.pixelFormat must be a color format.");this._fragmentShader=t,this._uniforms=e.uniforms,this._textureScale=i,this._forcePowerOfTwo=e$1Y(e.forcePowerOfTwo,!1),this._sampleMode=e$1Y(e.sampleMode,e$9.NEAREST),this._blendingState=e.blendingState,this._pixelFormat=n,this._pixelDatatype=e$1Y(e.pixelDatatype,v$Z.UNSIGNED_BYTE),this._clearColor=e$1Y(e.clearColor,e$1z.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 r=new t$l;r.scissorTest={enabled:!0,rectangle:t$$(e.scissorRectangle)?n$13.clone(e.scissorRectangle):new n$13},this._passState=r,this._ready=!1;var o=e.name;t$$(o)||(o=t$U()),this._name=o,this._logDepthChanged=void 0,this._useLogDepth=void 0,this._selectedIdTexture=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0,this._textureCache=void 0,this._index=void 0,this.enabled=!0,this._enabled=!0}Object.defineProperties(p$b.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},fragmentShader:{get:function(){return this._fragmentShader}},uniforms:{get:function(){return this._uniforms}},textureScale:{get:function(){return this._textureScale}},forcePowerOfTwo:{get:function(){return this._forcePowerOfTwo}},sampleMode:{get:function(){return this._sampleMode}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},clearColor:{get:function(){return this._clearColor}},scissorRectangle:{get:function(){return this._passState.scissorTest.rectangle}},outputTexture:{get:function(){if(t$$(this._textureCache)){var e=this._textureCache.getFramebuffer(this._name);if(t$$(e))return e.getColorTexture(0)}}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}});var z$8=/uniform\s+sampler2D\s+depthTexture/g;function H$b(e,t,i){var n=t[i];return("string"==typeof n||n instanceof HTMLCanvasElement||n instanceof HTMLImageElement||n instanceof HTMLVideoElement||n instanceof ImageData)&&e._dirtyUniforms.push(i),{get:function(){return t[i]},set:function(n){var r=t[i];t[i]=n;var o=e._actualUniforms,a=o[i];t$$(a)&&a!==r&&a instanceof P$S&&!t$$(e._textureCache.getStageByName(i))&&(e._texturesToRelease.push(a),delete o[i],delete o[i+"Dimensions"]),r instanceof P$S&&e._texturesToRelease.push(r),"string"==typeof n||n instanceof HTMLCanvasElement||n instanceof HTMLImageElement||n instanceof HTMLVideoElement||n instanceof ImageData?e._dirtyUniforms.push(i):o[i]=n}}}function k$8(e,t){return function(){var i=e._actualUniforms[t];return"function"==typeof i?i():i}}function V$7(e,t){return function(){var i=e[t]();if(t$$(i))return i.dimensions}}function Y$7(e){if(!t$$(e._uniformMap)){var t={},i={},n=e._uniforms,r=e._actualUniforms;for(var o in n)if(n.hasOwnProperty(o)){"function"!=typeof n[o]?(t[o]=k$8(e,o),i[o]=H$b(e,n,o)):(t[o]=n[o],i[o]=n[o]),r[o]=n[o];var a=t[o]();("string"==typeof a||a instanceof P$S||a instanceof HTMLImageElement||a instanceof HTMLCanvasElement||a instanceof HTMLVideoElement)&&(t[o+"Dimensions"]=V$7(t,o))}e._uniforms={},Object.defineProperties(e._uniforms,i),e._uniformMap=s$1n(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 q$6(e,t){if(!t$$(e._command)||e._logDepthChanged||e._selectedDirty){var i=e._fragmentShader;if(t$$(e._selectedIdTexture))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 < "+e._selectedIdTexture.width+"; ++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=i.replace(/varying\s+vec2\s+v_textureCoordinates;/g,""));var n=new a$O({defines:[e._useLogDepth?"LOG_DEPTH":""],sources:[i]});e._command=t.createViewportQuadCommand(n,{uniformMap:e._uniformMap,owner:e})}}function j$7(e){var t,i;e._sampleMode===e$9.LINEAR?(t=tt$l.LINEAR,i=et$k.LINEAR):(t=tt$l.NEAREST,i=et$k.NEAREST);var n=e._sampler;(!t$$(n)||n.minificationFilter!==t||n.magnificationFilter!==i)&&(e._sampler=new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:t,magnificationFilter:i}))}function W$2(e,t){return function(i){e._texturesToCreate.push({name:t,source:i})}}function J$7(e,t){return function(){return e._textureCache.getOutputTexture(t)}}function K$5(e,t){var i,n,r,o=e._texturesToRelease,a=o.length;for(i=0;i<a;++i)n=(n=o[i])&&n.destroy();o.length=0;var s=e._texturesToCreate;for(a=s.length,i=0;i<a;++i){var l=s[i];r=l.name;var u=l.source;e._actualUniforms[r]=new P$S({context:t,source:u})}s.length=0;var c=e._dirtyUniforms;if(0!==c.length||t$$(e._texturePromise)){if(0!==c.length&&!t$$(e._texturePromise)){a=c.length;var h=e._uniforms,d=[];for(i=0;i<a;++i){var f=h[r=c[i]];if(t$$(e._textureCache.getStageByName(f)))e._actualUniforms[r]=J$7(e,f);else if("string"==typeof f){var p=new t$X({url:f});d.push(p.fetchImage().then(W$2(e,r)))}else e._texturesToCreate.push({name:r,source:f})}c.length=0,d.length>0?(e._ready=!1,e._texturePromise=c$18.all(d).then((function(){e._ready=!0,e._texturePromise=void 0}))):e._ready=!0}}else e._ready=!0}function C$a(e){t$$(e._command)&&(e._command.shaderProgram=e._command.shaderProgram&&e._command.shaderProgram.destroy(),e._command=void 0),e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy();var t=e._textureCache;if(t$$(t)){var i=e._uniforms,n=e._actualUniforms;for(var r in n)n.hasOwnProperty(r)&&n[r]instanceof P$S&&(t$$(t.getStageByName(i[r]))||n[r].destroy(),e._dirtyUniforms.push(r))}}function Q$6(e){var t=t$$(e._selected)?e._selected.length:0,i=t$$(e._parentSelected)?e._parentSelected:0,n=e._selected!==e._selectedShadow||t!==e._selectedLength;if(n=n||e._parentSelected!==e._parentSelectedShadow||i!==e._parentSelectedLength,t$$(e._selected)&&t$$(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):t$$(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!n&&t$$(e._combinedSelected)){if(!t$$(e._combinedSelectedShadow))return!0;t=e._combinedSelected.length;for(var r=0;r<t;++r)if(e._combinedSelected[r]!==e._combinedSelectedShadow[r])return!0}return n}function Z$6(e,t){if(e._selectedDirty){e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy(),e._selectedIdTexture=void 0;var i=e._combinedSelected;if(t$$(i)){var n,r,o=0,a=i.length;for(n=0;n<a;++n)t$$((r=i[n]).pickIds)?o+=r.pickIds.length:t$$(r.pickId)&&++o;if(0===a||0===o){var s=new Uint8Array(4);return s[0]=255,s[1]=255,s[2]=255,s[3]=255,void(e._selectedIdTexture=new P$S({context:t,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE,source:{arrayBufferView:s,width:1,height:1},sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST})}))}var l,u=0,c=new Uint8Array(4*o);for(n=0;n<a;++n)if(t$$((r=i[n]).pickIds))for(var h=r.pickIds,d=h.length,f=0;f<d;++f)l=h[f].color,c[u]=e$1z.floatToByte(l.red),c[u+1]=e$1z.floatToByte(l.green),c[u+2]=e$1z.floatToByte(l.blue),c[u+3]=e$1z.floatToByte(l.alpha),u+=4;else t$$(r.pickId)&&(l=r.pickId.color,c[u]=e$1z.floatToByte(l.red),c[u+1]=e$1z.floatToByte(l.green),c[u+2]=e$1z.floatToByte(l.blue),c[u+3]=e$1z.floatToByte(l.alpha),u+=4);e._selectedIdTexture=new P$S({context:t,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE,source:{arrayBufferView:c,width:o,height:1},sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST})})}}}p$b.prototype._isSupported=function(e){return!z$8.test(this._fragmentShader)||e.depthTexture},p$b.prototype.update=function(e,t){if(this.enabled!==this._enabled&&!this.enabled&&C$a(this),this._enabled=this.enabled,this._enabled&&(this._logDepthChanged=t!==this._useLogDepth,this._useLogDepth=t,this._selectedDirty=Q$6(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=t$$(this._selected)?this._selected.length:0,this._parentSelectedLength=t$$(this._parentSelected)?this._parentSelected.length:0,Z$6(this,e),Y$7(this),K$5(this,e),q$6(this,e),j$7(this),this._selectedDirty=!1,this._ready)){var i=this._textureCache.getFramebuffer(this._name);if(this._command.framebuffer=i,t$$(i)){var n,r=i.getColorTexture(0);(r.width!==e.drawingBufferWidth||r.height!==e.drawingBufferHeight||t$$(this._blendingState))&&((!t$$(n=this._renderState)||r.width!==n.viewport.width||r.height!==n.viewport.height)&&(this._renderState=p$1a.fromCache({viewport:new n$13(0,0,r.width,r.height),blending:this._blendingState}))),this._command.renderState=n}}},p$b.prototype.execute=function(e,t,i,n){if(t$$(this._command)&&t$$(this._command.framebuffer)&&this._ready&&this._enabled){this._colorTexture=t,this._depthTexture=i,this._idTexture=n,a$Q.equals(this._colorTexture.sampler,this._sampler)||(this._colorTexture.ignoreWEBGL2=!0,this._colorTexture.sampler=this._sampler);var r=this.scissorRectangle.width>0&&this.scissorRectangle.height>0?this._passState:void 0;t$$(r)&&(r.context=e),this._command.execute(e,r)}},p$b.prototype.isDestroyed=function(){return!1},p$b.prototype.destroy=function(){return C$a(this),s$1e(this)};var w$d="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\nvoid main()\n{\nvec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\nvec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\ncolor /= texture2D(autoExposure, vec2(0.5)).r;\n#endif\nfloat g = 0.985;\nfloat a = 0.065;\nfloat b = 0.0001;\nfloat c = 0.433;\nfloat d = 0.238;\ncolor = (color * (color + a) - b) / (color * (g * color + c) + d);\ncolor = clamp(color, 0.0, 1.0);\ncolor = czm_inverseGamma(color);\ngl_FragColor = vec4(color, fragmentColor.a);\n}\n",b$c="uniform sampler2D randomTexture;\nuniform sampler2D depthTexture;\nuniform float intensity;\nuniform float bias;\nuniform float lengthCap;\nuniform float stepSize;\nuniform float frustumLength;\nvarying vec2 v_textureCoordinates;\nvec4 clipToEye(vec2 uv, float depth)\n{\nvec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));\nvec4 posEC = czm_inverseProjection * vec4(xy, depth, 1.0);\nposEC = posEC / posEC.w;\nreturn posEC;\n}\nvec3 getNormalXEdge(vec3 posInCamera, float depthU, float depthD, float depthL, float depthR, vec2 pixelSize)\n{\nvec4 posInCameraUp = clipToEye(v_textureCoordinates - vec2(0.0, pixelSize.y), depthU);\nvec4 posInCameraDown = clipToEye(v_textureCoordinates + vec2(0.0, pixelSize.y), depthD);\nvec4 posInCameraLeft = clipToEye(v_textureCoordinates - vec2(pixelSize.x, 0.0), depthL);\nvec4 posInCameraRight = clipToEye(v_textureCoordinates + vec2(pixelSize.x, 0.0), depthR);\nvec3 up = posInCamera.xyz - posInCameraUp.xyz;\nvec3 down = posInCameraDown.xyz - posInCamera.xyz;\nvec3 left = posInCamera.xyz - posInCameraLeft.xyz;\nvec3 right = posInCameraRight.xyz - posInCamera.xyz;\nvec3 DX = length(left) < length(right) ? left : right;\nvec3 DY = length(up) < length(down) ? up : down;\nreturn normalize(cross(DY, DX));\n}\nvoid main(void)\n{\nfloat depth = czm_readDepth(depthTexture, v_textureCoordinates);\nvec4 posInCamera = clipToEye(v_textureCoordinates, depth);\nif (posInCamera.z > frustumLength)\n{\ngl_FragColor = vec4(1.0);\nreturn;\n}\nvec2 pixelSize = czm_pixelRatio / czm_viewport.zw;\nfloat depthU = czm_readDepth(depthTexture, v_textureCoordinates - vec2(0.0, pixelSize.y));\nfloat depthD = czm_readDepth(depthTexture, v_textureCoordinates + vec2(0.0, pixelSize.y));\nfloat depthL = czm_readDepth(depthTexture, v_textureCoordinates - vec2(pixelSize.x, 0.0));\nfloat depthR = czm_readDepth(depthTexture, v_textureCoordinates + vec2(pixelSize.x, 0.0));\nvec3 normalInCamera = getNormalXEdge(posInCamera.xyz, depthU, depthD, depthL, depthR, pixelSize);\nfloat ao = 0.0;\nvec2 sampleDirection = vec2(1.0, 0.0);\nfloat gapAngle = 90.0 * czm_radiansPerDegree;\nfloat randomVal = texture2D(randomTexture, v_textureCoordinates).x;\nfor (int i = 0; i < 4; i++)\n{\nfloat newGapAngle = gapAngle * (float(i) + randomVal);\nfloat cosVal = cos(newGapAngle);\nfloat sinVal = sin(newGapAngle);\nvec2 rotatedSampleDirection = vec2(cosVal * sampleDirection.x - sinVal * sampleDirection.y, sinVal * sampleDirection.x + cosVal * sampleDirection.y);\nfloat localAO = 0.0;\nfloat localStepSize = stepSize;\nfor (int j = 0; j < 6; j++)\n{\nvec2 newCoords = v_textureCoordinates + rotatedSampleDirection * localStepSize * pixelSize;\nif(newCoords.x > 1.0 || newCoords.y > 1.0 || newCoords.x < 0.0 || newCoords.y < 0.0)\n{\nbreak;\n}\nfloat stepDepthInfo = czm_readDepth(depthTexture, newCoords);\nvec4 stepPosInCamera = clipToEye(newCoords, stepDepthInfo);\nvec3 diffVec = stepPosInCamera.xyz - posInCamera.xyz;\nfloat len = length(diffVec);\nif (len > lengthCap)\n{\nbreak;\n}\nfloat dotVal = clamp(dot(normalInCamera, normalize(diffVec)), 0.0, 1.0 );\nfloat weight = len / lengthCap;\nweight = 1.0 - weight * weight;\nif (dotVal < bias)\n{\ndotVal = 0.0;\n}\nlocalAO = max(localAO, dotVal * weight);\nlocalStepSize += stepSize;\n}\nao += localAO;\n}\nao /= 4.0;\nao = 1.0 - clamp(ao, 0.0, 1.0);\nao = pow(ao, intensity);\ngl_FragColor = vec4(vec3(ao), 1.0);\n}\n",T$9="uniform sampler2D colorTexture;\nuniform sampler2D ambientOcclusionTexture;\nuniform bool ambientOcclusionOnly;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec3 color = texture2D(colorTexture, v_textureCoordinates).rgb;\nvec3 ao = texture2D(ambientOcclusionTexture, v_textureCoordinates).rgb;\ngl_FragColor.rgb = ambientOcclusionOnly ? ao : ao * color;\n}\n",z$7="uniform sampler2D colorTexture;\nuniform float gradations;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;\n#ifdef CZM_SELECTED_FEATURE\nif (czm_selected()) {\ngl_FragColor = vec4(rgb, 1.0);\nreturn;\n}\n#endif\nfloat luminance = czm_luminance(rgb);\nfloat darkness = luminance * gradations;\ndarkness = (darkness - fract(darkness)) / gradations;\ngl_FragColor = vec4(vec3(darkness), 1.0);\n}\n",E$b="uniform sampler2D colorTexture;\nuniform sampler2D bloomTexture;\nuniform bool glowOnly;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec4 color = texture2D(colorTexture, v_textureCoordinates);\n#ifdef CZM_SELECTED_FEATURE\nif (czm_selected()) {\ngl_FragColor = color;\nreturn;\n}\n#endif\nvec4 bloom = texture2D(bloomTexture, v_textureCoordinates);\ngl_FragColor = glowOnly ? bloom : bloom + color;\n}\n",C$9="uniform sampler2D colorTexture;\nuniform float brightness;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;\nvec3 target = vec3(0.0);\ngl_FragColor = vec4(mix(target, rgb, brightness), 1.0);\n}\n",O$8="uniform sampler2D colorTexture;\nuniform float contrast;\nuniform float brightness;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec3 sceneColor = texture2D(colorTexture, v_textureCoordinates).xyz;\nsceneColor = czm_RGBToHSB(sceneColor);\nsceneColor.z += brightness;\nsceneColor = czm_HSBToRGB(sceneColor);\nfloat factor = (259.0 * (contrast + 255.0)) / (255.0 * (259.0 - contrast));\nsceneColor = factor * (sceneColor - vec3(0.5)) + vec3(0.5);\ngl_FragColor = vec4(sceneColor, 1.0);\n}\n",D$a="uniform sampler2D colorTexture;\nuniform sampler2D blurTexture;\nuniform sampler2D depthTexture;\nuniform float focalDistance;\nvarying vec2 v_textureCoordinates;\nvec4 toEye(vec2 uv, float depth)\n{\nvec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));\nvec4 posInCamera = czm_inverseProjection * vec4(xy, depth, 1.0);\nposInCamera = posInCamera / posInCamera.w;\nreturn posInCamera;\n}\nfloat computeDepthBlur(float depth)\n{\nfloat f;\nif (depth < focalDistance)\n{\nf = (focalDistance - depth) / (focalDistance - czm_currentFrustum.x);\n}\nelse\n{\nf = (depth - focalDistance) / (czm_currentFrustum.y - focalDistance);\nf = pow(f, 0.1);\n}\nf *= f;\nf = clamp(f, 0.0, 1.0);\nreturn pow(f, 0.5);\n}\nvoid main(void)\n{\nfloat depth = czm_readDepth(depthTexture, v_textureCoordinates);\nvec4 posInCamera = toEye(v_textureCoordinates, depth);\nfloat d = computeDepthBlur(-posInCamera.z);\ngl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), texture2D(blurTexture, v_textureCoordinates), d);\n}\n",y$c="uniform sampler2D depthTexture;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nfloat depth = czm_readDepth(depthTexture, v_textureCoordinates);\ngl_FragColor = vec4(vec3(depth), 1.0);\n}\n",R$4="uniform sampler2D depthTexture;\nuniform float length;\nuniform vec4 color;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nfloat directions[3];\ndirections[0] = -1.0;\ndirections[1] = 0.0;\ndirections[2] = 1.0;\nfloat scalars[3];\nscalars[0] = 3.0;\nscalars[1] = 10.0;\nscalars[2] = 3.0;\nfloat padx = czm_pixelRatio / czm_viewport.z;\nfloat pady = czm_pixelRatio / czm_viewport.w;\n#ifdef CZM_SELECTED_FEATURE\nbool selected = false;\nfor (int i = 0; i < 3; ++i)\n{\nfloat dir = directions[i];\nselected = selected || czm_selected(vec2(-padx, dir * pady));\nselected = selected || czm_selected(vec2(padx, dir * pady));\nselected = selected || czm_selected(vec2(dir * padx, -pady));\nselected = selected || czm_selected(vec2(dir * padx, pady));\nif (selected)\n{\nbreak;\n}\n}\nif (!selected)\n{\ngl_FragColor = vec4(color.rgb, 0.0);\nreturn;\n}\n#endif\nfloat horizEdge = 0.0;\nfloat vertEdge = 0.0;\nfor (int i = 0; i < 3; ++i)\n{\nfloat dir = directions[i];\nfloat scale = scalars[i];\nhorizEdge -= texture2D(depthTexture, v_textureCoordinates + vec2(-padx, dir * pady)).x * scale;\nhorizEdge += texture2D(depthTexture, v_textureCoordinates + vec2(padx, dir * pady)).x * scale;\nvertEdge -= texture2D(depthTexture, v_textureCoordinates + vec2(dir * padx, -pady)).x * scale;\nvertEdge += texture2D(depthTexture, v_textureCoordinates + vec2(dir * padx, pady)).x * scale;\n}\nfloat len = sqrt(horizEdge * horizEdge + vertEdge * vertEdge);\ngl_FragColor = vec4(color.rgb, len > length ? color.a : 0.0);\n}\n",A$c="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\nvoid main()\n{\nvec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\nvec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\nfloat exposure = texture2D(autoExposure, vec2(0.5)).r;\ncolor /= exposure;\n#endif\nconst float A = 0.22;\nconst float B = 0.30;\nconst float C = 0.10;\nconst float D = 0.20;\nconst float E = 0.01;\nconst float F = 0.30;\nconst float white = 11.2;\nvec3 c = ((color * (A * color + C * B) + D * E) / (color * ( A * color + B) + D * F)) - E / F;\nfloat w = ((white * (A * white + C * B) + D * E) / (white * ( A * white + B) + D * F)) - E / F;\nc = czm_inverseGamma(c / w);\ngl_FragColor = vec4(c, fragmentColor.a);\n}\n",L$c="varying vec2 v_textureCoordinates;\nuniform sampler2D colorTexture;\nconst float fxaaQualitySubpix = 0.5;\nconst float fxaaQualityEdgeThreshold = 0.125;\nconst float fxaaQualityEdgeThresholdMin = 0.0833;\nvoid main()\n{\nvec2 fxaaQualityRcpFrame = vec2(1.0) / czm_viewport.zw;\nvec4 color = FxaaPixelShader(\nv_textureCoordinates,\ncolorTexture,\nfxaaQualityRcpFrame,\nfxaaQualitySubpix,\nfxaaQualityEdgeThreshold,\nfxaaQualityEdgeThresholdMin);\nfloat alpha = texture2D(colorTexture, v_textureCoordinates).a;\ngl_FragColor = vec4(color.rgb, alpha);\n}\n",P$6="uniform sampler2D colorTexture;\nuniform sampler2D dirtTexture;\nuniform sampler2D starTexture;\nuniform vec2 dirtTextureDimensions;\nuniform float distortion;\nuniform float ghostDispersal;\nuniform float haloWidth;\nuniform float dirtAmount;\nuniform float earthRadius;\nuniform float intensity;\nvarying vec2 v_textureCoordinates;\n#define DISTANCE_TO_SPACE 6500000.0\nvec4 getNDCFromWC(vec3 WC, float earthRadius)\n{\nvec4 positionEC = czm_view * vec4(WC, 1.0);\npositionEC = vec4(positionEC.x + earthRadius, positionEC.y, positionEC.z, 1.0);\nvec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\nreturn czm_viewportOrthographic * vec4(positionWC.xy, -positionWC.z, 1.0);\n}\nfloat isInEarth(vec2 texcoord, vec2 sceneSize)\n{\nvec2 NDC = texcoord * 2.0 - 1.0;\nvec4 earthPosSC = getNDCFromWC(vec3(0.0), 0.0);\nvec4 earthPosSCEdge = getNDCFromWC(vec3(0.0), earthRadius * 1.5);\nNDC.xy -= earthPosSC.xy;\nfloat X = abs(NDC.x) * sceneSize.x;\nfloat Y = abs(NDC.y) * sceneSize.y;\nreturn clamp(0.0, 1.0, max(sqrt(X * X + Y * Y) / max(abs(earthPosSCEdge.x * sceneSize.x), 1.0) - 0.8 , 0.0));\n}\nvec4 textureDistorted(sampler2D tex, vec2 texcoord, vec2 direction, vec3 distortion, bool isSpace)\n{\nvec2 sceneSize = czm_viewport.zw;\nvec3 color;\nif(isSpace)\n{\ncolor.r = isInEarth(texcoord + direction * distortion.r, sceneSize) * texture2D(tex, texcoord + direction * distortion.r).r;\ncolor.g = isInEarth(texcoord + direction * distortion.g, sceneSize) * texture2D(tex, texcoord + direction * distortion.g).g;\ncolor.b = isInEarth(texcoord + direction * distortion.b, sceneSize) * texture2D(tex, texcoord + direction * distortion.b).b;\n}\nelse\n{\ncolor.r = texture2D(tex, texcoord + direction * distortion.r).r;\ncolor.g = texture2D(tex, texcoord + direction * distortion.g).g;\ncolor.b = texture2D(tex, texcoord + direction * distortion.b).b;\n}\nreturn vec4(clamp(color, 0.0, 1.0), 0.0);\n}\nvoid main(void)\n{\nvec4 originalColor = texture2D(colorTexture, v_textureCoordinates);\nvec3 rgb = originalColor.rgb;\nbool isSpace = length(czm_viewerPositionWC.xyz) > DISTANCE_TO_SPACE;\nvec4 sunPos = czm_morphTime == 1.0 ? vec4(czm_sunPositionWC, 1.0) : vec4(czm_sunPositionColumbusView.zxy, 1.0);\nvec4 sunPositionEC = czm_view * sunPos;\nvec4 sunPositionWC = czm_eyeToWindowCoordinates(sunPositionEC);\nsunPos = czm_viewportOrthographic * vec4(sunPositionWC.xy, -sunPositionWC.z, 1.0);\nif(!isSpace || !((sunPos.x >= -1.1 && sunPos.x <= 1.1) && (sunPos.y >= -1.1 && sunPos.y <= 1.1)))\n{\ngl_FragColor = originalColor;\nreturn;\n}\nvec2 texcoord = vec2(1.0) - v_textureCoordinates;\nvec2 pixelSize = czm_pixelRatio / czm_viewport.zw;\nvec2 invPixelSize = 1.0 / pixelSize;\nvec3 distortionVec = pixelSize.x * vec3(-distortion, 0.0, distortion);\nvec2 ghostVec = (vec2(0.5) - texcoord) * ghostDispersal;\nvec3 direction = normalize(vec3(ghostVec, 0.0));\nvec4 result = vec4(0.0);\nvec4 ghost = vec4(0.0);\nfor (int i = 0; i < 4; ++i)\n{\nvec2 offset = fract(texcoord + ghostVec * float(i));\nghost += textureDistorted(colorTexture, offset, direction.xy, distortionVec, isSpace);\n}\nresult += ghost;\nvec2 haloVec = normalize(ghostVec) * haloWidth;\nfloat weightForHalo = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));\nweightForHalo = pow(1.0 - weightForHalo, 5.0);\nresult += textureDistorted(colorTexture, texcoord + haloVec, direction.xy, distortionVec, isSpace) * weightForHalo * 1.5;\nvec2 dirtTexCoords = (v_textureCoordinates * invPixelSize) / dirtTextureDimensions;\nif (dirtTexCoords.x > 1.0)\n{\ndirtTexCoords.x = mod(floor(dirtTexCoords.x), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.x) : fract(dirtTexCoords.x);\n}\nif (dirtTexCoords.y > 1.0)\n{\ndirtTexCoords.y = mod(floor(dirtTexCoords.y), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.y) : fract(dirtTexCoords.y);\n}\nresult += dirtAmount * texture2D(dirtTexture, dirtTexCoords);\nfloat camrot = czm_view[0].z + czm_view[1].y;\nfloat cosValue = cos(camrot);\nfloat sinValue = sin(camrot);\nmat3 rotation = mat3(\ncosValue, -sinValue, 0.0,\nsinValue, cosValue, 0.0,\n0.0, 0.0, 1.0\n);\nvec3 st1 = vec3(v_textureCoordinates * 2.0 - vec2(1.0), 1.0);\nvec3 st2 = vec3((rotation * st1).xy, 1.0);\nvec3 st3 = st2 * 0.5 + vec3(0.5);\nvec2 lensStarTexcoord = st3.xy;\nfloat weightForLensFlare = length(vec3(sunPos.xy, 0.0));\nfloat oneMinusWeightForLensFlare = max(1.0 - weightForLensFlare, 0.0);\nif (!isSpace)\n{\nresult *= oneMinusWeightForLensFlare * intensity * 0.2;\n}\nelse\n{\nresult *= oneMinusWeightForLensFlare * intensity;\nresult *= texture2D(starTexture, lensStarTexcoord) * pow(weightForLensFlare, 1.0) * max((1.0 - length(vec3(st1.xy, 0.0))), 0.0) * 2.0;\n}\nresult += texture2D(colorTexture, v_textureCoordinates);\ngl_FragColor = result;\n}\n",F$8="uniform sampler2D colorTexture;\nuniform vec3 white;\nvarying vec2 v_textureCoordinates;\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\nvoid main()\n{\nvec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\nvec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\nfloat exposure = texture2D(autoExposure, vec2(0.5)).r;\ncolor /= exposure;\n#endif\ncolor = (color * (1.0 + color / white)) / (1.0 + color);\ncolor = czm_inverseGamma(color);\ngl_FragColor = vec4(color, fragmentColor.a);\n}\n",I$6="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nfloat rand(vec2 co)\n{\nreturn fract(sin(dot(co.xy ,vec2(12.9898, 78.233))) * 43758.5453);\n}\nvoid main(void)\n{\nfloat noiseValue = rand(v_textureCoordinates + sin(czm_frameNumber)) * 0.1;\nvec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;\nvec3 green = vec3(0.0, 1.0, 0.0);\ngl_FragColor = vec4((noiseValue + rgb) * green, 1.0);\n}\n",M$a="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\nvoid main()\n{\nvec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\nvec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\nfloat exposure = texture2D(autoExposure, vec2(0.5)).r;\ncolor /= exposure;\n#endif\ncolor = color / (1.0 + color);\ncolor = czm_inverseGamma(color);\ngl_FragColor = vec4(color, fragmentColor.a);\n}\n",N$7="uniform sampler2D colorTexture;\nuniform sampler2D silhouetteTexture;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec4 silhouetteColor = texture2D(silhouetteTexture, v_textureCoordinates);\nvec4 color = texture2D(colorTexture, v_textureCoordinates);\ngl_FragColor = mix(color, silhouetteColor, silhouetteColor.a);\n}\n";function d$b(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),n$1e.defined("options.stages",e.stages),n$1e.typeOf.number.greaterThan("options.stages.length",e.stages.length,0),this._stages=e.stages,this._inputPreviousStageTexture=e$1Y(e.inputPreviousStageTexture,!0);var t=e.name;t$$(t)||(t=t$U()),this._name=t,this._uniforms=e.uniforms,this._textureCache=void 0,this._index=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0}function _$b(e){var t=t$$(e._selected)?e._selected.length:0,i=t$$(e._parentSelected)?e._parentSelected:0,n=e._selected!==e._selectedShadow||t!==e._selectedLength;if(n=n||e._parentSelected!==e._parentSelectedShadow||i!==e._parentSelectedLength,t$$(e._selected)&&t$$(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):t$$(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!n&&t$$(e._combinedSelected)){if(!t$$(e._combinedSelectedShadow))return!0;t=e._combinedSelected.length;for(var r=0;r<t;++r)if(e._combinedSelected[r]!==e._combinedSelectedShadow[r])return!0}return n}Object.defineProperties(d$b.prototype,{ready:{get:function(){for(var e=this._stages,t=e.length,i=0;i<t;++i)if(!e[i].ready)return!1;return!0}},name:{get:function(){return this._name}},enabled:{get:function(){return this._stages[0].enabled},set:function(e){for(var t=this._stages,i=t.length,n=0;n<i;++n)t[n].enabled=e}},uniforms:{get:function(){return this._uniforms}},inputPreviousStageTexture:{get:function(){return this._inputPreviousStageTexture}},length:{get:function(){return this._stages.length}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}}),d$b.prototype._isSupported=function(e){for(var t=this._stages,i=t.length,n=0;n<i;++n)if(!t[n]._isSupported(e))return!1;return!0},d$b.prototype.get=function(e){return n$1e.typeOf.number.greaterThanOrEquals("index",e,0),n$1e.typeOf.number.lessThan("index",e,this.length),this._stages[e]},d$b.prototype.update=function(e,t){this._selectedDirty=_$b(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=t$$(this._selected)?this._selected.length:0,this._parentSelectedLength=t$$(this._parentSelected)?this._parentSelected.length:0;for(var i=this._stages,n=i.length,r=0;r<n;++r){var o=i[r];this._selectedDirty&&(o.parentSelected=this._combinedSelected),o.update(e,t)}},d$b.prototype.isDestroyed=function(){return!1},d$b.prototype.destroy=function(){for(var e=this._stages,t=e.length,i=0;i<t;++i)e[i].destroy();return s$1e(this)};var B$6="uniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nvarying vec2 v_textureCoordinates;\nuniform float scale;\nvoid main ()\n{\nvec4 oriColor = texture2D(colorTexture, v_textureCoordinates);\nvec4 fogColor = vec4(0.8, 0.8, 0.8, 0.5);\nfloat depth = texture2D(depthTexture, v_textureCoordinates).r;\nfloat f = (depth - 0.7) * min(1.0, max(scale, 0.0)) / 0.2;\ngl_FragColor = mix(oriColor, fogColor, clamp(f, 0.0, 1.0));\n}\n",G$b="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nuniform float speed;\nuniform float angle;\nfloat hash(float x){\nreturn fract(sin(x * 133.3) * 13.13);\n}\nvoid main(void){\nfloat time = czm_frameNumber / 60.0;\nvec2 resolution = czm_viewport.zw;\nvec2 uv = (gl_FragCoord.xy * 2.0 - resolution.xy) / min(resolution.x, resolution.y);\nvec3 c = vec3(0.6, 0.7, 0.8);\nfloat a = angle;\nfloat si = sin(a);\nfloat co = cos(a);\nuv *= mat2(co, -si, si, co);\nuv *= length(uv + vec2(0.0, 4.9)) * 0.3 + 1.0;\nfloat v = 1.0 - sin(hash(floor(uv.x * 100.0)) * 2.0);\nfloat b = clamp(abs(sin(speed * time * v + uv.y * (5.0 / (2.0 + v)))) - 0.95, 0.0, 1.0) * 20.0;\nc *= v * b;\ngl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(c, 1.0), speed < 0.00001 ? 0.0 : 0.15);\n}\n",Y$6="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nuniform int density;\nuniform float speed;\nuniform float angle;\nfloat snow(vec2 uv, float scale)\n{\nfloat time = czm_frameNumber / 60.0;\nfloat w = smoothstep(1.0 , 0.0, -uv.y * (scale / 10.0));\nif(w < 0.1) return 0.0;\nuv += time / scale;\nuv.y += time * cos(angle) * speed / scale;\nuv.x += sin(uv.y + time * sin(angle) * speed) / scale;\nuv *= scale;\nvec2 s = floor(uv);\nvec2 f = fract(uv);\nvec2 p;\nfloat k = 3.0;\nfloat d;\np = 0.5 + 0.35 * sin(11.0 * fract(sin((s + p + scale) * mat2(7, 3, 6, 5)) * 5.0)) - f;\nd = length(p);\nk = min(d, k);\nk = smoothstep(0.0, k, sin(f.x + f.y) * 0.01);\nreturn k * w * clamp(float(density) / 5.0, 1.0, 5.0);\n}\nvoid main(void){\nvec2 resolution = czm_viewport.zw;\nvec2 uv = (gl_FragCoord.xy * 2.0 - resolution.xy) / min(resolution.x, resolution.y);\nvec3 finalColor = vec3(0);\nfloat c = 0.0;\nfor (int i = 2; i < 5; i++) {\nif (density < i) {\nbreak;\n}\nc += snow(uv, float(i));\n}\nfor (int i = 6; i < 10; i+= 2) {\nif (density < i) {\nbreak;\n}\nc += snow(uv, float(i));\n}\nfor (int i = 15; i < 30; i+= 5) {\nif (density < i) {\nbreak;\n}\nc += snow(uv, float(i));\n}\nfinalColor = vec3(c);\nif(c > 0.8)\n{\nfinalColor = vec3(max(5.0, c));\n}\ngl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(finalColor, 1.0), 0.15);\n}\n",o$9={};function _$a(e){var t="#define USE_STEP_SIZE\n"+P$h,i=new p$b({name:e+"_x_direction",fragmentShader:t,uniforms:{delta:1,sigma:2,stepSize:1,direction:0},sampleMode:e$9.LINEAR}),n=new p$b({name:e+"_y_direction",fragmentShader:t,uniforms:{delta:1,sigma:2,stepSize:1,direction:1},sampleMode:e$9.LINEAR}),r={};return Object.defineProperties(r,{delta:{get:function(){return i.uniforms.delta},set:function(e){var t=i.uniforms,r=n.uniforms;t.delta=r.delta=e}},sigma:{get:function(){return i.uniforms.sigma},set:function(e){var t=i.uniforms,r=n.uniforms;t.sigma=r.sigma=e}},stepSize:{get:function(){return i.uniforms.stepSize},set:function(e){var t=i.uniforms,r=n.uniforms;t.stepSize=r.stepSize=e}}}),new d$b({name:e,stages:[i,n],uniforms:r})}function H$a(e){if(!t$$(e))return o$9.createEdgeDetectionStage();for(var t=new d$b({name:"czm_edge_detection_multiple",stages:e,inputPreviousStageTexture:!1}),i={},n="",r="",o=0;o<e.length;++o)n+="uniform sampler2D edgeTexture"+o+"; \n",r+=" vec4 edge"+o+" = texture2D(edgeTexture"+o+", v_textureCoordinates); \n if (edge"+o+".a > 0.0) \n { \n color = edge"+o+"; \n break; \n } \n",i["edgeTexture"+o]=e[o].name;return new d$b({name:"czm_edge_detection_composite",stages:[t,new p$b({name:"czm_edge_detection_combine",fragmentShader:n+"varying vec2 v_textureCoordinates; \nvoid main() { \n vec4 color = vec4(0.0); \n for (int i = 0; i < "+e.length+"; i++) \n { \n"+r+" } \n gl_FragColor = color; \n} \n",uniforms:i})]})}o$9.createBlurStage=function(){return _$a("czm_blur")},o$9.createDepthOfFieldStage=function(){var e=_$a("czm_depth_of_field_blur"),t=new p$b({name:"czm_depth_of_field_composite",fragmentShader:D$a,uniforms:{focalDistance:5,blurTexture:e.name}}),i={};return Object.defineProperties(i,{focalDistance:{get:function(){return t.uniforms.focalDistance},set:function(e){t.uniforms.focalDistance=e}},delta:{get:function(){return e.uniforms.delta},set:function(t){e.uniforms.delta=t}},sigma:{get:function(){return e.uniforms.sigma},set:function(t){e.uniforms.sigma=t}},stepSize:{get:function(){return e.uniforms.stepSize},set:function(t){e.uniforms.stepSize=t}}}),new d$b({name:"czm_depth_of_field",stages:[e,t],inputPreviousStageTexture:!1,uniforms:i})},o$9.isDepthOfFieldSupported=function(e){return e.context.depthTexture},o$9.createEdgeDetectionStage=function(){return new p$b({name:"czm_edge_detection_"+t$U(),fragmentShader:R$4,uniforms:{length:.25,color:e$1z.clone(e$1z.BLACK)}})},o$9.isEdgeDetectionSupported=function(e){return e.context.depthTexture},o$9.createSilhouetteStage=function(e){var t=H$a(e);return new d$b({name:"czm_silhouette",stages:[t,new p$b({name:"czm_silhouette_color_edges",fragmentShader:N$7,uniforms:{silhouetteTexture:t.name}})],inputPreviousStageTexture:!1,uniforms:t.uniforms})},o$9.isSilhouetteSupported=function(e){return e.context.depthTexture},o$9.createBloomStage=function(){var e=new p$b({name:"czm_bloom_contrast_bias",fragmentShader:O$8,uniforms:{contrast:128,brightness:-.3}}),t=_$a("czm_bloom_blur"),i=new d$b({name:"czm_bloom_contrast_bias_blur",stages:[e,t]}),n=new p$b({name:"czm_bloom_generate_composite",fragmentShader:E$b,uniforms:{glowOnly:!1,bloomTexture:i.name}}),r={};return Object.defineProperties(r,{glowOnly:{get:function(){return n.uniforms.glowOnly},set:function(e){n.uniforms.glowOnly=e}},contrast:{get:function(){return e.uniforms.contrast},set:function(t){e.uniforms.contrast=t}},brightness:{get:function(){return e.uniforms.brightness},set:function(t){e.uniforms.brightness=t}},delta:{get:function(){return t.uniforms.delta},set:function(e){t.uniforms.delta=e}},sigma:{get:function(){return t.uniforms.sigma},set:function(e){t.uniforms.sigma=e}},stepSize:{get:function(){return t.uniforms.stepSize},set:function(e){t.uniforms.stepSize=e}}}),new d$b({name:"czm_bloom",stages:[i,n],inputPreviousStageTexture:!1,uniforms:r})},o$9.createAmbientOcclusionStage=function(){var e=new p$b({name:"czm_ambient_occlusion_generate",fragmentShader:b$c,uniforms:{intensity:3,bias:.1,lengthCap:.26,stepSize:1.95,frustumLength:1e3,randomTexture:void 0}}),t=_$a("czm_ambient_occlusion_blur");t.uniforms.stepSize=.86;var i=new d$b({name:"czm_ambient_occlusion_generate_blur",stages:[e,t]}),n=new p$b({name:"czm_ambient_occlusion_composite",fragmentShader:T$9,uniforms:{ambientOcclusionOnly:!1,ambientOcclusionTexture:i.name}}),r={};return Object.defineProperties(r,{intensity:{get:function(){return e.uniforms.intensity},set:function(t){e.uniforms.intensity=t}},bias:{get:function(){return e.uniforms.bias},set:function(t){e.uniforms.bias=t}},lengthCap:{get:function(){return e.uniforms.lengthCap},set:function(t){e.uniforms.lengthCap=t}},stepSize:{get:function(){return e.uniforms.stepSize},set:function(t){e.uniforms.stepSize=t}},frustumLength:{get:function(){return e.uniforms.frustumLength},set:function(t){e.uniforms.frustumLength=t}},randomTexture:{get:function(){return e.uniforms.randomTexture},set:function(t){e.uniforms.randomTexture=t}},delta:{get:function(){return t.uniforms.delta},set:function(e){t.uniforms.delta=e}},sigma:{get:function(){return t.uniforms.sigma},set:function(e){t.uniforms.sigma=e}},blurStepSize:{get:function(){return t.uniforms.stepSize},set:function(e){t.uniforms.stepSize=e}},ambientOcclusionOnly:{get:function(){return n.uniforms.ambientOcclusionOnly},set:function(e){n.uniforms.ambientOcclusionOnly=e}}}),new d$b({name:"czm_ambient_occlusion",stages:[i,n],inputPreviousStageTexture:!1,uniforms:r})},o$9.isAmbientOcclusionSupported=function(e){return e.context.depthTexture};var Q$5="#define FXAA_QUALITY_PRESET 39 \n"+j$h+"\n"+L$c;function g$7(e){this._collection=e,this._framebuffers=[],this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0,this._updateDependencies=!1}function b$b(e){for(;t$$(e.length);)e=e.get(e.length-1);return e.name}function _$9(e,t,i,n,r){if(!n.enabled||!n._isSupported(t))return r;var o=i[n.name]={};t$$(r)&&(o[b$b(e.getStageByName(r))]=!0);var a=n.uniforms;if(t$$(a))for(var s=Object.getOwnPropertyNames(a),l=s.length,u=0;u<l;++u){var c=a[s[u]];if("string"==typeof c){var h=e.getStageByName(c);t$$(h)&&(o[b$b(h)]=!0)}}return n.name}function d$a(e,t,i,n,r){if(t$$(n.enabled)&&!n.enabled||t$$(n._isSupported)&&!n._isSupported(t))return r;for(var o=r,a=!t$$(n.inputPreviousStageTexture)||n.inputPreviousStageTexture,s=r,l=n.length,u=0;u<l;++u){var c=n.get(u);s=t$$(c.length)?d$a(e,t,i,c,r):_$9(e,t,i,c,r),a&&(r=s)}var h,d;if(a)for(h=1;h<l;++h)t$$(i[d=b$b(n.get(h))])||(i[d]={}),i[d][o]=!0;else for(h=1;h<l;++h)for(var f=i[d=b$b(n.get(h))],p=0;p<h;++p)f[b$b(n.get(p))]=!0;return s}function B$5(e,t){var i={};if(t$$(e.ambientOcclusion)){var n=e._outline,r=e.ambientOcclusion,o=e.bloom,a=e._tonemapping,s=e.fxaa,l=e.fog,u=e.rain,c=e.snow,h=d$a(e,t,i,n,void 0);h=_$9(e,t,i,l,h),h=_$9(e,t,i,c,h),h=d$a(e,t,i,r,h=_$9(e,t,i,u,h)),h=_$9(e,t,i,a,h=d$a(e,t,i,o,h)),_$9(e,t,i,s,h=d$a(e,t,i,e,h))}else d$a(e,t,i,e,void 0);return i}function C$8(e,t,i){var n,r,o=e._collection.getStageByName(t),a=o._textureScale,s=o._forcePowerOfTwo,l=o._pixelFormat,u=o._pixelDatatype,c=o._clearColor,h=e._framebuffers,d=h.length;for(n=0;n<d;++n)if(a===(r=h[n]).textureScale&&s===r.forcePowerOfTwo&&l===r.pixelFormat&&u===r.pixelDatatype&&e$1z.equals(c,r.clearColor)){for(var f=r.stages,p=f.length,_=!1,m=0;m<p;++m)if(i[f[m]]){_=!0;break}if(!_)break}return t$$(r)&&n<d?(r.stages.push(t),r):(r={textureScale:a,forcePowerOfTwo:s,pixelFormat:l,pixelDatatype:u,clearColor:c,stages:[t],buffer:void 0,clear:void 0},h.push(r),r)}function M$9(e,t){var i=B$5(e._collection,t);for(var n in i)i.hasOwnProperty(n)&&(e._stageNameToFramebuffer[n]=C$8(e,n,i[n]))}function x$b(e){for(var t=e._framebuffers,i=t.length,n=0;n<i;++n){var r=t[n];r.buffer=r.buffer&&r.buffer.destroy(),r.buffer=void 0}}function j$6(e,t){for(var i=e._width,n=e._height,r=e._framebuffers,o=r.length,a=0;a<o;++a){var s=r[a],l=s.textureScale,u=Math.ceil(i*l),c=Math.ceil(n*l),h=Math.min(u,c);s.forcePowerOfTwo&&(n$1d.isPowerOfTwo(h)||(h=n$1d.nextPowerOfTwo(h)),u=h,c=h),s.buffer=new u$F({context:t,colorTextures:[new P$S({context:t,width:u,height:c,pixelFormat:s.pixelFormat,pixelDatatype:s.pixelDatatype})]}),s.clear=new r$M({color:s.clearColor,framebuffer:s.buffer})}}o$9.createFXAAStage=function(){return new p$b({name:"czm_FXAA",fragmentShader:Q$5,sampleMode:e$9.LINEAR})},o$9.createSnowStage=function(){return new p$b({name:"czm_SnowEffect",fragmentShader:Y$6,uniforms:{density:5,angle:.1,speed:2},sampleMode:e$9.LINEAR})},o$9.createRainStage=function(){return new p$b({name:"czm_RainEffect",fragmentShader:G$b,uniforms:{speed:20,angle:-.4},sampleMode:e$9.LINEAR})},o$9.createFogStage=function(){return new p$b({name:"czm_FogEffect",fragmentShader:B$6,uniforms:{scale:1},sampleMode:e$9.LINEAR})},o$9.createAcesTonemappingStage=function(e){var t=e?"#define AUTO_EXPOSURE\n":"";return new p$b({name:"czm_aces",fragmentShader:t+=w$d,uniforms:{autoExposure:void 0}})},o$9.createFilmicTonemappingStage=function(e){var t=e?"#define AUTO_EXPOSURE\n":"";return new p$b({name:"czm_filmic",fragmentShader:t+=A$c,uniforms:{autoExposure:void 0}})},o$9.createReinhardTonemappingStage=function(e){var t=e?"#define AUTO_EXPOSURE\n":"";return new p$b({name:"czm_reinhard",fragmentShader:t+=M$a,uniforms:{autoExposure:void 0}})},o$9.createModifiedReinhardTonemappingStage=function(e){var t=e?"#define AUTO_EXPOSURE\n":"";return new p$b({name:"czm_modified_reinhard",fragmentShader:t+=F$8,uniforms:{white:e$1z.WHITE,autoExposure:void 0}})},o$9.createAutoExposureStage=function(){return new a$i},o$9.createBlackAndWhiteStage=function(){return new p$b({name:"czm_black_and_white",fragmentShader:z$7,uniforms:{gradations:5}})},o$9.createBrightnessStage=function(){return new p$b({name:"czm_brightness",fragmentShader:C$9,uniforms:{brightness:.5}})},o$9.createNightVisionStage=function(){return new p$b({name:"czm_night_vision",fragmentShader:I$6})},o$9.createDepthViewStage=function(){return new p$b({name:"czm_depth_view",fragmentShader:y$c})},o$9.createLensFlareStage=function(){return new p$b({name:"czm_lens_flare",fragmentShader:P$6,uniforms:{dirtTexture:o$12("Assets/Textures/LensFlare/DirtMask.jpg"),starTexture:o$12("Assets/Textures/LensFlare/StarBurst.jpg"),intensity:2,distortion:10,ghostDispersal:.4,haloWidth:.4,earthRadius:n$1c.WGS84.maximumRadius}})},o$9.createOutlineStage=function(){var e=new p$b({name:"outline_copy",fragmentShader:V$c}),t=new p$b({name:"outline_downSample",fragmentShader:["varying vec2 v_textureCoordinates;","void main()","{","gl_FragColor = texture2D(czm_maskTexture, v_textureCoordinates);","}"].join("\n"),textureScale:.5}),i=new p$b({name:"outline_edgeDetection",fragmentShader:["varying vec2 v_textureCoordinates;","uniform sampler2D colorTexture;","uniform vec2 colorTextureDimensions;","uniform vec3 visibleEdgeColor;","uniform vec3 hiddenEdgeColor;","void main() {","vec2 invSize = 1.0 / vec2(colorTextureDimensions.x, colorTextureDimensions.y);","vec4 uvOffset = vec4(1.0, 0.0, 0.0, 1.0) * vec4(invSize, invSize);","vec4 c1 = texture2D( colorTexture, v_textureCoordinates + uvOffset.xy);","vec4 c2 = texture2D( colorTexture, v_textureCoordinates - uvOffset.xy);","vec4 c3 = texture2D( colorTexture, v_textureCoordinates + uvOffset.yw);","vec4 c4 = texture2D( colorTexture, v_textureCoordinates - uvOffset.yw);","float diff1 = (c1.r - c2.r)*0.5;","float diff2 = (c3.r - c4.r)*0.5;","float d = length( vec2(diff1, diff2) );","float a1 = min(c1.g, c2.g);","float a2 = min(c3.g, c4.g);","float visibilityFactor = min(a1, a2);","vec3 edgeColor = 1.0 - visibilityFactor > 0.001 ? visibleEdgeColor : hiddenEdgeColor;","gl_FragColor = vec4(edgeColor,1.0) * vec4(d);","}"].join("\n"),textureScale:.5,uniforms:{visibleEdgeColor:new e$1z(1,1,1),hiddenEdgeColor:new e$1z(.1,.04,.02)},sampleMode:e$9.LINEAR});i.visibleEdgeColor=new e$1z,i.hiddenEdgeColor=new e$1z;var n=["varying vec2 v_textureCoordinates;","uniform sampler2D colorTexture;","uniform vec2 colorTextureDimensions;","uniform vec2 direction;","uniform float kernelRadius;","float gaussianPdf(in float x, in float sigma) {","return 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma;","}","void main() {","vec2 invSize = 1.0 / colorTextureDimensions;","float weightSum = gaussianPdf(0.0, kernelRadius);","vec3 diffuseSum = texture2D( colorTexture, v_textureCoordinates).rgb * weightSum;","vec2 delta = direction * invSize * kernelRadius/float(4);","vec2 uvOffset = delta;","for( int i = 1; i <= 4; i ++ ) {","float w = gaussianPdf(uvOffset.x, kernelRadius);","vec3 sample1 = texture2D( colorTexture, v_textureCoordinates + uvOffset).rgb;","vec3 sample2 = texture2D( colorTexture, v_textureCoordinates - uvOffset).rgb;","diffuseSum += ((sample1 + sample2) * w);","weightSum += (2.0 * w);","uvOffset += delta;","}","gl_FragColor = vec4(diffuseSum/weightSum, 1.0);","}"].join("\n"),r=new p$b({name:"outline_blurHalf_X",fragmentShader:n,textureScale:.5,uniforms:{direction:{x:1,y:0},kernelRadius:1},sampleMode:e$9.LINEAR}),o=new p$b({name:"outline_blurHalf_Y",fragmentShader:n,textureScale:.5,uniforms:{direction:{x:0,y:1},kernelRadius:1},sampleMode:e$9.LINEAR}),a=new p$b({name:"outline_blurQuarter_X",fragmentShader:n,textureScale:.25,uniforms:{direction:{x:1,y:0},kernelRadius:4},sampleMode:e$9.LINEAR}),s=new p$b({name:"outline_blurQuarter_Y",fragmentShader:n,textureScale:.25,uniforms:{direction:{x:0,y:1},kernelRadius:4},sampleMode:e$9.LINEAR}),l=new p$b({name:"outline_overlayStage",fragmentShader:["varying vec2 v_textureCoordinates;","uniform sampler2D edgeTexture1;","uniform sampler2D edgeTexture2;","uniform float edgeStrength;","uniform float edgeGlow;","void main() {","vec4 edgeValue1 = texture2D(edgeTexture1, v_textureCoordinates);","vec4 edgeValue2 = texture2D(edgeTexture2, v_textureCoordinates);","vec4 maskColor = texture2D(czm_maskTexture, v_textureCoordinates);","vec4 edgeValue = edgeValue1 + edgeValue2 * edgeGlow;","vec4 finalColor = edgeStrength * maskColor.r * edgeValue;","gl_FragColor = finalColor;","}"].join("\n"),uniforms:{edgeStrength:3,edgeGlow:0,edgeTexture1:"outline_blurHalf_Y",edgeTexture2:"outline_blurQuarter_Y"},blendingState:Ee$s.ADDITIVE_BLEND,sampleMode:e$9.LINEAR}),u={};return Object.defineProperties(u,{visibleEdgeColor:{get:function(){return i.uniforms.visibleEdgeColor},set:function(e){i.uniforms.visibleEdgeColor=e$1z.clone(e)}},hiddenEdgeColor:{get:function(){return i.hiddenEdgeColor},set:function(e){i.uniforms.hiddenEdgeColor=e$1z.clone(e)}},edgeStrength:{get:function(){return l.uniforms.edgeStrength},set:function(e){l.uniforms.edgeStrength=e}},edgeGlow:{get:function(){return l.uniforms.edgeGlow},set:function(e){l.uniforms.edgeGlow=e}},edgeThickness:{get:function(){return r.uniforms.kernelRadius},set:function(e){r.uniforms.kernelRadius=e,o.uniforms.kernelRadius=e}}}),new d$b({name:"outline_overlay",stages:[e,t,i,r,o,a,s,l],inputPreviousStageTexture:!0,uniforms:u})},g$7.prototype.updateDependencies=function(){this._updateDependencies=!0},g$7.prototype.update=function(e){var t=this._collection,i=this._updateDependencies,n=t$$(t.ambientOcclusion)&&t.ambientOcclusion.enabled&&t.ambientOcclusion._isSupported(e),r=t$$(t.bloom)&&t.bloom.enabled&&t.bloom._isSupported(e),o=t$$(t._tonemapping)&&t._tonemapping.enabled&&t._tonemapping._isSupported(e),a=t$$(t.fxaa)&&t.fxaa.enabled&&t.fxaa._isSupported(e),s=!t$$(t._activeStages)||t._activeStages.length>0||n||r||o||a;if((i||!s&&this._framebuffers.length>0)&&(x$b(this),this._framebuffers.length=0,this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0),i||s){0===this._framebuffers.length&&M$9(this,e);var l=e.drawingBufferWidth,u=e.drawingBufferHeight,c=this._width!==l||this._height!==u;!i&&!c||(this._width=l,this._height=u,this._updateDependencies=!1,x$b(this),j$6(this,e))}},g$7.prototype.clear=function(e){for(var t=this._framebuffers,i=t.length,n=0;n<i;++n)t[n].clear.execute(e)},g$7.prototype.getStageByName=function(e){return this._collection.getStageByName(e)},g$7.prototype.getOutputTexture=function(e){return this._collection.getOutputTexture(e)},g$7.prototype.getFramebuffer=function(e){var t=this._stageNameToFramebuffer[e];if(t$$(t))return t.buffer},g$7.prototype.isDestroyed=function(){return!1},g$7.prototype.destroy=function(){return x$b(this),s$1e(this)};var I$5={REINHARD:0,MODIFIED_REINHARD:1,FILMIC:2,ACES:3,validate:function(e){return e===I$5.REINHARD||e===I$5.MODIFIED_REINHARD||e===I$5.FILMIC||e===I$5.ACES}},L$b=Object.freeze(I$5),M$8="precision highp float;\nprecision highp int;\nattribute vec4 position;\nattribute vec2 textureCoordinates;\nuniform vec2 u_resolution;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[3];\nvoid SMAAEdgeDetectionVS(vec2 texcoord) {\nfOffset[0] = texcoord.xyxy + u_resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 );\nfOffset[1] = texcoord.xyxy + u_resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 );\nfOffset[2] = texcoord.xyxy + u_resolution.xyxy * vec4( -2.0, 0.0, 0.0, 2.0 );\n}\nvoid main()\n{\ngl_Position = position;\nv_textureCoordinates = textureCoordinates;\nSMAAEdgeDetectionVS(textureCoordinates);\n}\n",N$6="precision highp float;\nprecision highp int;\n#define SMAA_THRESHOLD 0.05\n#define SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR 2\n#define SMAA_USE_COLOR_EDGE_DETECTION 1\nuniform sampler2D inputColorTexture;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[3];\nvec4 SMAAColorEdgeDetectionPS( vec2 texcoord, vec4 offset[3], sampler2D colorTex ) {\nvec2 threshold = vec2( SMAA_THRESHOLD, SMAA_THRESHOLD );\nvec4 delta;\nvec3 C = texture2D( colorTex, texcoord ).rgb;\nvec3 Cleft = texture2D( colorTex, offset[0].xy ).rgb;\nvec3 t = abs( C - Cleft );\ndelta.x = max( max( t.r, t.g ), t.b );\nvec3 Ctop = texture2D( colorTex, offset[0].zw ).rgb;\nt = abs( C - Ctop );\ndelta.y = max( max( t.r, t.g ), t.b );\nvec2 edges = step( threshold, delta.xy );\nif ( dot( edges, vec2( 1.0, 1.0 ) ) == 0.0 )\ndiscard;\nvec3 Cright = texture2D( colorTex, offset[1].xy ).rgb;\nt = abs( C - Cright );\ndelta.z = max( max( t.r, t.g ), t.b );\nvec3 Cbottom = texture2D( colorTex, offset[1].zw ).rgb;\nt = abs( C - Cbottom );\ndelta.w = max( max( t.r, t.g ), t.b );\nfloat maxDelta = max( max( max( delta.x, delta.y ), delta.z ), delta.w );\nvec3 Cleftleft = texture2D( colorTex, offset[2].xy ).rgb;\nt = abs( C - Cleftleft );\ndelta.z = max( max( t.r, t.g ), t.b );\nvec3 Ctoptop = texture2D( colorTex, offset[2].zw ).rgb;\nt = abs( C - Ctoptop );\ndelta.w = max( max( t.r, t.g ), t.b );\nmaxDelta = max( max( maxDelta, delta.z ), delta.w );\nedges.xy *= step( maxDelta, float(SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR) * delta.xy );\nreturn vec4( edges, 0.0, 0.0 );\n}\nvoid main()\n{\ngl_FragColor = SMAAColorEdgeDetectionPS( v_textureCoordinates, fOffset, inputColorTexture );\n}\n",H$9="precision highp float;\nprecision highp int;\n#define SMAA_MAX_SEARCH_STEPS 8\nattribute vec4 position;\nattribute vec2 textureCoordinates;\nuniform vec2 u_resolution;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[3];\nvarying vec2 fPixCoord;\nvoid SMAABlendingWeightCalculationVS( vec2 texcoord ) {\nfPixCoord = texcoord / u_resolution;\nfOffset[ 0 ] = texcoord.xyxy + u_resolution.xyxy * vec4( -0.25, 0.125, 1.25, 0.125 );\nfOffset[ 1 ] = texcoord.xyxy + u_resolution.xyxy * vec4( -0.125, 0.25, -0.125, -1.25 );\nfOffset[ 2 ] = vec4( fOffset[ 0 ].xz, fOffset[ 1 ].yw ) + vec4( -2.0, 2.0, -2.0, 2.0 ) * u_resolution.xxyy * float( SMAA_MAX_SEARCH_STEPS );\n}\nvoid main()\n{\ngl_Position = position;\nv_textureCoordinates = textureCoordinates;\nSMAABlendingWeightCalculationVS( textureCoordinates );\n}\n",W$1="precision highp float;\nprecision highp int;\n#define SMAA_MAX_SEARCH_STEPS 8\n#define SMAA_AREATEX_MAX_DISTANCE 16\n#define SMAA_AREATEX_PIXEL_SIZE ( 1.0 / vec2( 160.0, 560.0 ) )\n#define SMAA_AREATEX_SUBTEX_SIZE ( 1.0 / 7.0 )\nuniform sampler2D tEdges;\nuniform sampler2D tArea;\nuniform sampler2D tSearch;\nuniform vec2 u_resolution;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[3];\nvarying vec2 fPixCoord;\nvec4 SMAASampleLevelZeroOffset(sampler2D tex, vec2 coord, ivec2 offset ){\nreturn texture2D( tex, coord + float( offset ) * u_resolution, 0.0 );\n}\n#ifndef WEBGL2\nvec2 round( vec2 x ) {\nreturn sign( x ) * floor( abs( x ) + 0.5 );\n}\n#endif\nfloat SMAASearchLength( sampler2D searchTex, vec2 e, float bias, float scale ) {\ne.r = bias + e.r * scale;\nreturn 255.0 * texture2D( searchTex, e, 0.0 ).r;\n}\nfloat SMAASearchXLeft( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {\nvec2 e = vec2( 0.0, 1.0 );\nfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {\ne = texture2D( edgesTex, texcoord, 0.0 ).rg;\ntexcoord -= vec2( 2.0, 0.0 ) * u_resolution;\nif ( ! ( texcoord.x > end && e.g > 0.8281 && e.r == 0.0 ) ) break;\n}\ntexcoord.x += 0.25 * u_resolution.x;\ntexcoord.x += u_resolution.x;\ntexcoord.x += 2.0 * u_resolution.x;\ntexcoord.x -= u_resolution.x * SMAASearchLength(searchTex, e, 0.0, 0.5);\nreturn texcoord.x;\n}\nfloat SMAASearchXRight( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {\nvec2 e = vec2( 0.0, 1.0 );\nfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {\ne = texture2D( edgesTex, texcoord, 0.0 ).rg;\ntexcoord += vec2( 2.0, 0.0 ) * u_resolution;\nif ( ! ( texcoord.x < end && e.g > 0.8281 && e.r == 0.0 ) ) break;\n}\ntexcoord.x -= 0.25 * u_resolution.x;\ntexcoord.x -= u_resolution.x;\ntexcoord.x -= 2.0 * u_resolution.x;\ntexcoord.x += u_resolution.x * SMAASearchLength( searchTex, e, 0.5, 0.5 );\nreturn texcoord.x;\n}\nfloat SMAASearchYUp( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {\nvec2 e = vec2( 1.0, 0.0 );\nfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {\ne = texture2D( edgesTex, texcoord, 0.0 ).rg;\ntexcoord += vec2( 0.0, 2.0 ) * u_resolution;\nif ( ! ( texcoord.y > end && e.r > 0.8281 && e.g == 0.0 ) ) break;\n}\ntexcoord.y -= 0.25 * u_resolution.y;\ntexcoord.y -= u_resolution.y;\ntexcoord.y -= 2.0 * u_resolution.y;\ntexcoord.y += u_resolution.y * SMAASearchLength( searchTex, e.gr, 0.0, 0.5 );\nreturn texcoord.y;\n}\nfloat SMAASearchYDown( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {\nvec2 e = vec2( 1.0, 0.0 );\nfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {\ne = texture2D( edgesTex, texcoord, 0.0 ).rg;\ntexcoord -= vec2( 0.0, 2.0 ) * u_resolution;\nif ( ! ( texcoord.y < end && e.r > 0.8281 && e.g == 0.0 ) ) break;\n}\ntexcoord.y += 0.25 * u_resolution.y;\ntexcoord.y += u_resolution.y;\ntexcoord.y += 2.0 * u_resolution.y;\ntexcoord.y -= u_resolution.y * SMAASearchLength( searchTex, e.gr, 0.5, 0.5 );\nreturn texcoord.y;\n}\nvec2 SMAAArea( sampler2D areaTex, vec2 dist, float e1, float e2, float offset ) {\nvec2 texcoord = float( SMAA_AREATEX_MAX_DISTANCE ) * round( 4.0 * vec2( e1, e2 ) ) + dist;\ntexcoord = SMAA_AREATEX_PIXEL_SIZE * texcoord + ( 0.5 * SMAA_AREATEX_PIXEL_SIZE );\ntexcoord.y += SMAA_AREATEX_SUBTEX_SIZE * offset;\nreturn texture2D( areaTex, texcoord, 0.0 ).rg;\n}\nvec4 SMAABlendingWeightCalculationPS( vec2 texcoord, vec2 pixcoord, vec4 offset[ 3 ], sampler2D edgesTex, sampler2D areaTex, sampler2D searchTex, ivec4 subsampleIndices ) {\nvec4 weights = vec4( 0.0, 0.0, 0.0, 0.0 );\nvec2 e = texture2D( edgesTex, texcoord ).rg;\nif ( e.g > 0.0 ) {\nvec2 d;\nvec2 coords;\ncoords.x = SMAASearchXLeft( edgesTex, searchTex, offset[ 0 ].xy, offset[ 2 ].x );\ncoords.y = offset[ 1 ].y;\nd.x = coords.x;\nfloat e1 = texture2D( edgesTex, coords, 0.0 ).r;\ncoords.x = SMAASearchXRight( edgesTex, searchTex, offset[ 0 ].zw, offset[ 2 ].y );\nd.y = coords.x;\nd = d / u_resolution.x - pixcoord.x;\nvec2 sqrt_d = sqrt( abs( d ) );\ncoords.y -= 1.0 * u_resolution.y;\nfloat e2 = SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 1, 0 ) ).r;\nweights.rg = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.y ) );\n}\nif ( e.r > 0.0 ) {\nvec2 d;\nvec2 coords;\ncoords.y = SMAASearchYUp( edgesTex, searchTex, offset[ 1 ].xy, offset[ 2 ].z );\ncoords.x = offset[ 0 ].x;\nd.x = coords.y;\nfloat e1 = texture2D( edgesTex, coords, 0.0 ).g;\ncoords.y = SMAASearchYDown( edgesTex, searchTex, offset[ 1 ].zw, offset[ 2 ].w );\nd.y = coords.y;\nd = d / u_resolution.y - pixcoord.y;\nvec2 sqrt_d = sqrt( abs( d ) );\ncoords.y -= 1.0 * u_resolution.y;\nfloat e2 = SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 0, 1 ) ).g;\nweights.ba = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.x ) );\n}\nreturn weights;\n}\nvoid main()\n{\ngl_FragColor = SMAABlendingWeightCalculationPS(v_textureCoordinates, fPixCoord, fOffset, tEdges, tArea, tSearch, ivec4(0.0));\n}\n",j$5="precision highp float;\nprecision highp int;\nattribute vec4 position;\nattribute vec2 textureCoordinates;\nuniform vec2 u_resolution;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[2];\nvoid SMAANeighborhoodBlendingVS( vec2 texcoord ) {\nfOffset[ 0 ] = texcoord.xyxy + u_resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 );\nfOffset[ 1 ] = texcoord.xyxy + u_resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 );\n}\nvoid main()\n{\ngl_Position = position;\nv_textureCoordinates = textureCoordinates;\nSMAANeighborhoodBlendingVS(textureCoordinates);\n}\n",C$7="precision highp float;\nprecision highp int;\n#define SMAA_DEBUG_SPLIT_VIEW 0\nuniform vec2 u_resolution;\nuniform sampler2D tBlendWeights;\nuniform sampler2D tColor;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[2];\nvec4 SMAANeighborhoodBlendingPS( vec2 texcoord, vec4 offset[ 2 ], sampler2D colorTex, sampler2D blendTex ) {\nvec4 a;\na.xz = texture2D( blendTex, texcoord ).xz;\na.y = texture2D( blendTex, offset[ 1 ].zw ).g;\na.w = texture2D( blendTex, offset[ 1 ].xy ).a;\nif ( dot(a, vec4( 1.0, 1.0, 1.0, 1.0 )) < 1e-5 ) {\nreturn texture2D( colorTex, texcoord, 0.0 );\n} else {\nvec2 offset;\noffset.x = a.a > a.b ? a.a : -a.b;\noffset.y = a.g > a.r ? -a.g : a.r;\nif ( abs( offset.x ) > abs( offset.y )) {\noffset.y = 0.0;\n} else {\noffset.x = 0.0;\n}\nvec4 C = texture2D( colorTex, texcoord, 0.0 );\ntexcoord += sign( offset ) * u_resolution;\nvec4 Cop = texture2D( colorTex, texcoord, 0.0 );\nfloat s = abs( offset.x ) > abs( offset.y ) ? abs( offset.x ) : abs( offset.y );\nC.xyz = pow(C.xyz, vec3(2.2));\nCop.xyz = pow(Cop.xyz, vec3(2.2));\nvec4 mixed = mix(C, Cop, s);\nmixed.xyz = pow(mixed.xyz, vec3(1.0 / 2.2));\nreturn mixed;\n}\n}\nvoid main()\n{\ngl_FragColor = SMAANeighborhoodBlendingPS( v_textureCoordinates, fOffset, tColor, tBlendWeights );\n#if SMAA_DEBUG_SPLIT_VIEW // split the view in the middle and display the unprocessed image on the right\nif (v_textureCoordinates.x > 0.5)\n{\nif (v_textureCoordinates.x < 0.5 + (5.0 / czm_viewport.z))\n{\ngl_FragColor = vec4(0, 0, 1, 1);\n} else\n{\ngl_FragColor = texture2D(tColor, v_textureCoordinates);\n}\n}\n#endif // DEBUG\n}\n";function i$b(){this._edgeDetectionCommand=void 0,this._weightCalculationCommand=void 0,this._neighborhoodBlendingCommand=void 0,this._upSamplePassState=new t$l,this.enabled=!1,this._inputTexture=void 0,this._edgeDetectionFBO=void 0,this._weightFBO=void 0,this._blendingFBO=void 0,this._searchTexture=void 0,this._areaTexture=void 0,this._clearCommand=new r$M({color:new e$1z(0,0,0,0)}),this._resolution=new r$T}function F$7(){return new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST})}Object.defineProperties(i$b.prototype,{}),i$b.prototype.execute=function(e){var t=this._clearCommand;t.framebuffer=this._edgeDetectionFBO,t.execute(e),t.framebuffer=this._weightFBO,t.execute(e),t.framebuffer=this._blendingFBO,t.execute(e),this._edgeDetectionCommand.framebuffer=this._edgeDetectionFBO,this._edgeDetectionCommand.execute(e,this._upSamplePassState),this._weightCalculationCommand.framebuffer=this._weightFBO,this._weightCalculationCommand.execute(e,this._upSamplePassState),this._neighborhoodBlendingCommand.framebuffer=this._blendingFBO,this._neighborhoodBlendingCommand.execute(e,this._upSamplePassState)};var x$a=new n$13;i$b.prototype.update=function(e){if(this.enabled){this._context=e;var t=e.drawingBufferWidth,i=e.drawingBufferHeight;this._resolution.x=1/t,this._resolution.y=1/i;var n=this;if(!t$$(this._searchTexture)){var r=new Image;r.src=this.getSearchTexture(),r.onload=function(){n._searchTexture=new P$S({context:e,source:this,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.UNSIGNED_BYTE,flipY:!1,sampler:F$7()})}}if(!t$$(this._areaTexture)){var o=new Image;o.src=this.getAreaTexture(),o.onload=function(){n._areaTexture=new P$S({context:e,source:this,pixelFormat:Z$_.RGB,pixelDatatype:v$Z.UNSIGNED_BYTE,flipY:!1})}}t$$(this._edgeDetectionCommand)||this.createCommand(e);var a=this._edgeDetectionFBO,s=t$$(a)&&a.getColorTexture(0)||void 0;if(!t$$(s)||s.width!==t||s.height!==i){this.createFBO(t,i,e),x$a.width=t,x$a.height=i;var l=p$1a.fromCache({viewport:x$a});this._edgeDetectionCommand.renderState=l,this._weightCalculationCommand.renderState=l,this._neighborhoodBlendingCommand.renderState=l}this._upSamplePassState.context=e}},i$b.prototype.createCommand=function(e){this._edgeDetectionCommand=e.createCustomViewportQuadCommand(M$8,N$6,{uniformMap:{},owner:this});var t=new a$O({name:"blendingWeightCalculationFS",sources:[W$1]});e.webgl2&&t.defines.push("WEBGL2"),this._weightCalculationCommand=e.createCustomViewportQuadCommand(H$9,t,{uniformMap:{},owner:this}),this._neighborhoodBlendingCommand=e.createCustomViewportQuadCommand(j$5,C$7,{uniformMap:{},owner:this}),this.createUniformMap()},i$b.prototype.createUniformMap=function(){if(t$$(this._edgeDetectionCommand)){var e=this;this._edgeDetectionCommand.uniformMap.inputColorTexture=function(){return e._inputTexture},this._edgeDetectionCommand.uniformMap.u_resolution=function(){return e._resolution},this._weightCalculationCommand.uniformMap.tEdges=function(){return e._edgeDetectionFBO.getColorTexture(0)},this._weightCalculationCommand.uniformMap.tArea=function(){return t$$(e._areaTexture)?e._areaTexture:e._context.defaultTexture},this._weightCalculationCommand.uniformMap.tSearch=function(){return t$$(e._searchTexture)?e._searchTexture:e._context.defaultTexture},this._weightCalculationCommand.uniformMap.u_resolution=function(){return e._resolution},this._neighborhoodBlendingCommand.uniformMap.tColor=function(){return e._inputTexture},this._neighborhoodBlendingCommand.uniformMap.tBlendWeights=function(){return e._weightFBO.getColorTexture(0)},this._neighborhoodBlendingCommand.uniformMap.u_resolution=function(){return e._resolution}}},i$b.prototype.createFBO=function(e,t,i){t$$(this._edgeDetectionFBO)||this.destroyFBO();var n=v$Z.UNSIGNED_BYTE;this._edgeDetectionFBO=new u$F({context:i,colorTextures:[new P$S({context:i,width:e,height:t,pixelDatatype:n,pixelFormat:Z$_.RGB})]}),this._weightFBO=new u$F({context:i,colorTextures:[new P$S({context:i,width:e,height:t,pixelDatatype:n,pixelFormat:Z$_.RGBA})]}),this._blendingFBO=new u$F({context:i,colorTextures:[new P$S({context:i,width:e,height:t,pixelDatatype:n,pixelFormat:Z$_.RGBA})]})},i$b.prototype.setInputTexture=function(e){this._inputTexture=e},i$b.prototype.getSMAATexture=function(){return this._blendingFBO.getColorTexture(0)},i$b.prototype.isDestroyed=function(){return!1},i$b.prototype.destroyFBO=function(){this._edgeDetectionFBO=this._edgeDetectionFBO&&!this._edgeDetectionFBO.isDestroyed()&&this._edgeDetectionFBO.destroy(),this._weightFBO=this._weightFBO&&!this._weightFBO.isDestroyed()&&this._weightFBO.destroy(),this._blendingFBO=this._blendingFBO&&!this._blendingFBO.isDestroyed()&&this._blendingFBO.destroy()},i$b.prototype.destroy=function(){return this.destroyFBO(),this._edgeDetectionCommand=this._edgeDetectionCommand&&this._edgeDetectionCommand.shaderProgram&&this._edgeDetectionCommand.shaderProgram.destroy(),this._weightCalculationCommand=this._weightCalculationCommand&&this._weightCalculationCommand.shaderProgram&&this._weightCalculationCommand.shaderProgram.destroy(),this._neighborhoodBlendingCommand=this._neighborhoodBlendingCommand&&this._neighborhoodBlendingCommand.shaderProgram&&this._neighborhoodBlendingCommand.shaderProgram.destroy(),s$1e(this)},i$b.prototype.getAreaTexture=function(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAIwCAIAAACOVPcQAACBeklEQVR42u39W4xlWXrnh/3WWvuciIzMrKxrV8/0rWbY0+SQFKcb4owIkSIFCjY9AC1BT/LYBozRi+EX+cV+8IMsYAaCwRcBwjzMiw2jAWtgwC8WR5Q8mDFHZLNHTarZGrLJJllt1W2qKrsumZWZcTvn7L3W54e1vrXX3vuciLPPORFR1XE2EomorB0nVuz//r71re/y/1eMvb4Cb3N11xV/PP/2v4UBAwJG/7H8urx6/25/Gf8O5hypMQ0EEEQwAqLfoN/Z+97f/SW+/NvcgQk4sGBJK6H7N4PFVL+K+e0N11yNfkKvwUdwdlUAXPHHL38oa15f/i/46Ih6SuMSPmLAYAwyRKn7dfMGH97jaMFBYCJUgotIC2YAdu+LyW9vvubxAP8kAL8H/koAuOKP3+q6+xGnd5kdYCeECnGIJViwGJMAkQKfDvB3WZxjLKGh8VSCCzhwEWBpMc5/kBbjawT4HnwJfhr+pPBIu7uu+OOTo9vsmtQcniMBGkKFd4jDWMSCRUpLjJYNJkM+IRzQ+PQvIeAMTrBS2LEiaiR9b/5PuT6Ap/AcfAFO4Y3dA3DFH7/VS+M8k4baEAQfMI4QfbVDDGIRg7GKaIY52qAjTAgTvGBAPGIIghOCYAUrGFNgzA7Q3QhgCwfwAnwe5vDejgG44o/fbm1C5ZlYQvQDARPAIQGxCWBM+wWl37ZQESb4gImexGMDouhGLx1Cst0Saa4b4AqO4Hk4gxo+3DHAV/nx27p3JziPM2pVgoiia5MdEzCGULprIN7gEEeQ5IQxEBBBQnxhsDb5auGmAAYcHMA9eAAz8PBol8/xij9+C4Djlim4gJjWcwZBhCBgMIIYxGAVIkH3ZtcBuLdtRFMWsPGoY9rN+HoBji9VBYdwD2ZQg4cnO7OSq/z4rU5KKdwVbFAjNojCQzTlCLPFSxtamwh2jMUcEgg2Wm/6XgErIBhBckQtGN3CzbVacERgCnfgLswhnvqf7QyAq/z4rRZm1YglYE3affGITaZsdIe2FmMIpnOCap25I6jt2kCwCW0D1uAD9sZctNGXcQIHCkINDQgc78aCr+zjtw3BU/ijdpw3zhCwcaONwBvdeS2YZKkJNJsMPf2JKEvC28RXxxI0ASJyzQCjCEQrO4Q7sFArEzjZhaFc4cdv+/JFdKULM4px0DfUBI2hIsy06BqLhGTQEVdbfAIZXYMPesq6VoCHICzUyjwInO4Y411//LYLs6TDa9wvg2CC2rElgAnpTBziThxaL22MYhzfkghz6GAs2VHbbdM91VZu1MEEpupMMwKyVTb5ij9+u4VJG/5EgEMMmFF01cFai3isRbKbzb+YaU/MQbAm2XSMoUPAmvZzbuKYRIFApbtlrfFuUGd6vq2hXNnH78ZLh/iFhsQG3T4D1ib7k5CC6vY0DCbtrohgLEIClXiGtl10zc0CnEGIhhatLBva7NP58Tvw0qE8yWhARLQ8h4+AhQSP+I4F5xoU+VilGRJs6wnS7ruti/4KvAY/CfdgqjsMy4pf8fodQO8/gnuX3f/3xi3om1/h7THr+co3x93PP9+FBUfbNUjcjEmhcrkT+8K7ml7V10Jo05mpIEFy1NmCJWx9SIKKt+EjAL4Ez8EBVOB6havuT/rByPvHXK+9zUcfcbb254+9fydJknYnRr1oGfdaiAgpxu1Rx/Rek8KISftx3L+DfsLWAANn8Hvw0/AFeAGO9DFV3c6D+CcWbL8Dj9e7f+T1k8AZv/d7+PXWM/Z+VvdCrIvuAKO09RpEEQJM0Ci6+B4xhTWr4cZNOvhktabw0ta0rSJmqz3Yw5/AKXwenod7cAhTmBSPKf6JBdvH8IP17h95pXqw50/+BFnj88fev4NchyaK47OPhhtI8RFSvAfDSNh0Ck0p2gLxGkib5NJj/JWCr90EWQJvwBzO4AHcgztwAFN1evHPUVGwfXON+0debT1YeGON9Yy9/63X+OguiwmhIhQhD7l4sMqlG3D86Suc3qWZ4rWjI1X7u0Ytw6x3rIMeIOPDprfe2XzNgyj6PahhBjO4C3e6puDgXrdg+/5l948vF3bqwZetZ+z9Rx9zdIY5pInPK4Nk0t+l52xdK2B45Qd87nM8fsD5EfUhIcJcERw4RdqqH7Yde5V7m1vhNmtedkz6EDzUMF/2jJYWbC+4fzzA/Y+/8PPH3j9dcBAPIRP8JLXd5BpAu03aziOL3VVHZzz3CXWDPWd+SH2AnxIqQoTZpo9Ckc6HIrFbAbzNmlcg8Ag8NFDDAhbJvTBZXbC94P7t68EXfv6o+21gUtPETU7bbkLxvNKRFG2+KXzvtObonPP4rBvsgmaKj404DlshFole1Glfh02fE7bYR7dZ82oTewIBGn1Md6CG6YUF26X376oevOLzx95vhUmgblI6LBZwTCDY7vMq0op5WVXgsObOXJ+1x3qaBl9j1FeLxbhU9w1F+Wiba6s1X/TBz1LnUfuYDi4r2C69f1f14BWfP+p+W2GFKuC9phcELMYRRLur9DEZTUdEH+iEqWdaM7X4WOoPGI+ZYD2+wcQ+y+ioHUZ9dTDbArzxmi/bJI9BND0Ynd6lBdve/butBw8+f/T9D3ABa3AG8W3VPX4hBin+bj8dMMmSpp5pg7fJ6xrBFE2WQQEWnV8Qg3FbAWzYfM1rREEnmvkN2o1+acG2d/9u68GDzx91v3mAjb1zkpqT21OipPKO0b9TO5W0nTdOmAQm0TObts3aBKgwARtoPDiCT0gHgwnbArzxmtcLc08HgF1asN0C4Ms/fvD5I+7PhfqyXE/b7RbbrGyRQRT9ARZcwAUmgdoz0ehJ9Fn7QAhUjhDAQSw0bV3T3WbNa59jzmiP6GsWbGXDX2ytjy8+f9T97fiBPq9YeLdBmyuizZHaqXITnXiMUEEVcJ7K4j3BFPurtB4bixW8wTpweL8DC95szWMOqucFYGsWbGU7p3TxxxefP+r+oTVktxY0v5hbq3KiOKYnY8ddJVSBxuMMVffNbxwIOERShst73HZ78DZrHpmJmH3K6sGz0fe3UUj0eyRrSCGTTc+rjVNoGzNSv05srAxUBh8IhqChiQgVNIIBH3AVPnrsnXQZbLTm8ammv8eVXn/vWpaTem5IXRlt+U/LA21zhSb9cye6jcOfCnOwhIAYXAMVTUNV0QhVha9xjgA27ODJbLbmitt3tRN80lqG6N/khgot4ZVlOyO4WNg3OIMzhIZQpUEHieg2im6F91hB3I2tubql6BYNN9Hj5S7G0G2tahslBWKDnOiIvuAEDzakDQKDNFQT6gbn8E2y4BBubM230YIpBnDbMa+y3dx0n1S0BtuG62lCCXwcY0F72T1VRR3t2ONcsmDjbmzNt9RFs2LO2hQNyb022JisaI8rAWuw4HI3FuAIhZdOGIcdjLJvvObqlpqvWTJnnQbyi/1M9O8UxWhBs//H42I0q1Yb/XPGONzcmm+ri172mHKvZBpHkJaNJz6v9jxqiklDj3U4CA2ugpAaYMWqNXsdXbmJNd9egCnJEsphXNM+MnK3m0FCJ5S1kmJpa3DgPVbnQnPGWIDspW9ozbcO4K/9LkfaQO2KHuqlfFXSbdNzcEcwoqNEFE9zcIXu9/6n/ym/BC/C3aJLzEKPuYVlbFnfhZ8kcWxV3dbv4bKl28566wD+8C53aw49lTABp9PWbsB+knfc/Li3eVizf5vv/xmvnPKg5ihwKEwlrcHqucuVcVOxEv8aH37E3ZqpZypUulrHEtIWKUr+txHg+ojZDGlwnqmkGlzcVi1dLiNSJiHjfbRNOPwKpx9TVdTn3K05DBx4psIk4Ei8aCkJahRgffk4YnEXe07T4H2RR1u27E6wfQsBDofUgjFUFnwC2AiVtA+05J2zpiDK2Oa0c5fmAecN1iJzmpqFZxqYBCYhFTCsUNEmUnIcZ6aEA5rQVhEywG6w7HSW02XfOoBlQmjwulOFQAg66SvJblrTEX1YtJ3uG15T/BH1OfOQeuR8g/c0gdpT5fx2SKbs9EfHTKdM8A1GaJRHLVIwhcGyydZsbifAFVKl5EMKNU2Hryo+06BeTgqnxzYjThVySDikbtJPieco75lYfKAJOMEZBTjoITuWHXXZVhcUDIS2hpiXHV9Ku4u44bN5OYLDOkJo8w+xJSMbhBRHEdEs9JZUCkQrPMAvaHyLkxgkEHxiNkx/x2YB0mGsQ8EUWj/stW5YLhtS5SMu+/YBbNPDCkGTUybN8krRLBGPlZkVOA0j+a1+rkyQKWGaPHPLZOkJhioQYnVZ2hS3zVxMtgC46KuRwbJNd9nV2PHgb36F194ecf/Yeu2vAFe5nm/bRBFrnY4BauE8ERmZRFUn0k8hbftiVYSKMEme2dJCJSCGYAlNqh87bXOPdUkGy24P6d1ll21MBqqx48Fvv8ZHH8HZFY7j/uAq1xMJUFqCSUlJPmNbIiNsmwuMs/q9CMtsZsFO6SprzCS1Z7QL8xCQClEelpjTduDMsmWD8S1PT152BtvmIGvUeDA/yRn83u/x0/4qxoPHjx+PXY9pqX9bgMvh/Nz9kpP4pOe1/fYf3axUiMdHLlPpZCNjgtNFAhcHEDxTumNONhHrBduW+vOyY++70WWnPXj98eA4kOt/mj/5E05l9+O4o8ePx67HFqyC+qSSnyselqjZGaVK2TadbFLPWAQ4NBhHqDCCV7OTpo34AlSSylPtIdd2AJZlyzYQrDJ5lcWGNceD80CunPLGGzsfD+7wRb95NevJI5docQ3tgCyr5bGnyaPRlmwNsFELViOOx9loebGNq2moDOKpHLVP5al2cymWHbkfzGXL7kfRl44H9wZy33tvt+PB/Xnf93e+nh5ZlU18wCiRUa9m7kib9LYuOk+hudQNbxwm0AQqbfloimaB2lM5fChex+ylMwuTbfmXQtmWlenZljbdXTLuOxjI/fDDHY4Hjx8/Hrse0zXfPFxbUN1kKqSCCSk50m0Ajtx3ub9XHBKHXESb8iO6E+qGytF4nO0OG3SXzbJlhxBnKtKyl0NwybjvYCD30aMdjgePHz8eu56SVTBbgxJMliQ3Oauwg0QHxXE2Ez/EIReLdQj42Gzb4CLS0YJD9xUx7bsi0vJi5mUbW1QzL0h0PFk17rtiIPfJk52MB48fPx67npJJwyrBa2RCCQRTbGZSPCxTPOiND4G2pYyOQ4h4jINIJh5wFU1NFZt+IsZ59LSnDqBjZ2awbOku+yInunLcd8VA7rNnOxkPHj9+PGY9B0MWJJNozOJmlglvDMXDEozdhQWbgs/U6oBanGzLrdSNNnZFjOkmbi5bNt1lX7JLLhn3vXAg9/h4y/Hg8ePHI9dzQMEkWCgdRfYykYKnkP7D4rIujsujaKPBsB54vE2TS00ccvFY/Tth7JXeq1hz+qgVy04sAJawTsvOknHfCwdyT062HA8eP348Zj0vdoXF4pilKa2BROed+9fyw9rWRXeTFXESMOanvDZfJuJaSXouQdMdDJZtekZcLLvEeK04d8m474UDuaenW44Hjx8/Xns9YYqZpszGWB3AN/4VHw+k7WSFtJ3Qicuqb/NlVmgXWsxh570xg2UwxUw3WfO6B5nOuO8aA7lnZxuPB48fPx6znm1i4bsfcbaptF3zNT78eFPtwi1OaCNOqp1x3zUGcs/PN++AGD1+fMXrSVm2baTtPhPahbPhA71wIHd2bXzRa69nG+3CraTtPivahV/55tXWg8fyRY/9AdsY8VbSdp8V7cKrrgdfM//z6ILQFtJ2nxHtwmuoB4/kf74+gLeRtvvMaBdeSz34+vifx0YG20jbfTa0C6+tHrwe//NmOG0L8EbSdp8R7cLrrQe/996O+ai3ujQOskpTNULa7jOjXXj99eCd8lHvoFiwsbTdZ0a78PrrwTvlo966pLuRtB2fFe3Cm6oHP9kNH/W2FryxtN1nTLvwRurBO+Kj3pWXHidtx2dFu/Bm68Fb81HvykuPlrb7LGkX3mw9eGs+6h1Y8MbSdjegXcguQLjmevDpTQLMxtJ2N6NdyBZu9AbrwVvwUW+LbteULUpCdqm0HTelXbhNPe8G68Gb8lFvVfYfSNuxvrTdTWoXbozAzdaDZzfkorOj1oxVxlIMlpSIlpLrt8D4hrQL17z+c3h6hU/wv4Q/utps4+bm+6P/hIcf0JwQ5oQGPBL0eKPTYEXTW+eL/2DKn73J9BTXYANG57hz1cEMviVf/4tf5b/6C5pTQkMIWoAq7hTpOJjtAM4pxKu5vg5vXeUrtI09/Mo/5H+4z+Mp5xULh7cEm2QbRP2tFIKR7WM3fPf/jZ3SWCqLM2l4NxID5zB72HQXv3jj/8mLR5xXNA5v8EbFQEz7PpRfl1+MB/hlAN65qgDn3wTgH13hK7T59bmP+NIx1SHHU84nLOITt3iVz8mNO+lPrjGAnBFqmioNn1mTyk1ta47R6d4MrX7tjrnjYUpdUbv2rVr6YpVfsGG58AG8Ah9eyUN8CX4WfgV+G8LVWPDGb+Zd4cU584CtqSbMKxauxTg+dyn/LkVgA+IR8KHtejeFKRtTmLLpxN6mYVLjYxwXf5x2VofiZcp/lwKk4wGOpYDnoIZPdg/AAbwMfx0+ge9dgZvYjuqKe4HnGnykYo5TvJbG0Vj12JagRhwKa44H95ShkZa5RyLGGdfYvG7aw1TsF6iapPAS29mNS3NmsTQZCmgTzFwgL3upCTgtBTRwvGMAKrgLn4evwin8+afJRcff+8izUGUM63GOOuAs3tJkw7J4kyoNreqrpO6cYLQeFUd7TTpr5YOTLc9RUUogUOVJQ1GYJaFLAW0oTmKyYS46ZooP4S4EON3xQ5zC8/CX4CnM4c1PE8ApexpoYuzqlP3d4S3OJP8ZDK7cKWNaTlqmgDiiHwl1YsE41w1zT4iRTm3DBqxvOUsbMKKDa/EHxagtnta072ejc3DOIh5ojvh8l3tk1JF/AV6FU6jh3U8HwEazLgdCLYSQ+MYiAI2ltomkzttUb0gGHdSUUgsIYjTzLG3mObX4FBRaYtpDVNZrih9TgTeYOBxsEnN1gOCTM8Bsw/ieMc75w9kuAT6A+/AiHGvN/+Gn4KRkiuzpNNDYhDGFndWRpE6SVfm8U5bxnSgVV2jrg6JCKmneqey8VMFgq2+AM/i4L4RUbfSi27lNXZ7R7W9RTcq/q9fk4Xw3AMQd4I5ifAZz8FcVtm9SAom/dyN4lczJQW/kC42ZrHgcCoIf1oVMKkVItmMBi9cOeNHGLqOZk+QqQmrbc5YmYgxELUUN35z2iohstgfLIFmcMV7s4CFmI74L9+EFmGsi+tGnAOD4Yk9gIpo01Y4cA43BWGygMdr4YZekG3OBIUXXNukvJS8tqa06e+lSDCtnqqMFu6hWHXCF+WaYt64m9QBmNxi7Ioy7D+fa1yHw+FMAcPt7SysFLtoG4PXAk7JOA3aAxBRqUiAdU9Yp5lK3HLSRFtOim0sa8euEt08xvKjYjzeJ2GU7YawexrnKI9tmobInjFXCewpwriY9+RR4aaezFhMhGCppKwom0ChrgFlKzyPKkGlTW1YQrE9HJqu8hKGgMc6hVi5QRq0PZxNfrYNgE64utmRv6KKHRpxf6VDUaOvNP5jCEx5q185My/7RKz69UQu2im5k4/eownpxZxNLwiZ1AZTO2ZjWjkU9uaB2HFn6Q3u0JcsSx/qV9hTEApRzeBLDJQXxYmTnq7bdLa3+uqFrxLJ5w1TehnNHx5ECvCh2g2c3hHH5YsfdaSKddztfjQ6imKFGSyFwlLzxEGPp6r5IevVjk1AMx3wMqi1NxDVjLBiPs9tbsCkIY5we5/ML22zrCScFxnNtzsr9Wcc3CnD+pYO+4VXXiDE0oc/vQQ/fDK3oPESJMYXNmJa/DuloJZkcTpcYE8lIH8Dz8DJMiynNC86Mb2lNaaqP/+L7f2fcE/yP7/Lde8xfgSOdMxvOixZf/9p3+M4hT1+F+zApxg9XfUvYjc8qX2lfOOpK2gNRtB4flpFu9FTKCp2XJRgXnX6olp1zyYjTKJSkGmLE2NjUr1bxFM4AeAAHBUFIeSLqXR+NvH/M9fOnfHzOD2vCSyQJKzfgsCh+yi/Mmc35F2fUrw7miW33W9hBD1vpuUojFphIyvg7aTeoymDkIkeW3XLHmguMzbIAJejN6B5MDrhipE2y6SoFRO/AK/AcHHZHNIfiWrEe/C6cr3f/yOvrQKB+zMM55/GQdLDsR+ifr5Fiuu+/y+M78LzOE5dsNuXC3PYvYWd8NXvphLSkJIasrlD2/HOqQ+RjcRdjKTGWYhhVUm4yxlyiGPuMsZR7sMCHUBeTuNWA7if+ifXgc/hovftHXs/DV+Fvwe+f8shzMiMcweFgBly3//vwJfg5AN4450fn1Hd1Rm1aBLu22Dy3y3H2+OqMemkbGZ4jozcDjJf6596xOLpC0eMTHbKnxLxH27uZ/bMTGs2jOaMOY4m87CfQwF0dw53oa1k80JRuz/XgS+8fX3N9Af4qPIMfzKgCp4H5TDGe9GGeFPzSsZz80SlPTxXjgwJmC45njzgt2vbQ4b4OAdUK4/vWhO8d8v6EE8fMUsfakXbPpFJeLs2ubM/qdm/la3WP91uWhxXHjoWhyRUq2iJ/+5mA73zwIIo+LoZ/SgvIRjAd1IMvvn98PfgOvAJfhhm8scAKVWDuaRaK8aQ9f7vuPDH6Bj47ZXau7rqYJ66mTDwEDU6lLbCjCK0qTXyl5mnDoeNRxanj3FJbaksTk0faXxHxLrssgPkWB9LnA/MFleXcJozzjwsUvUG0X/QCve51qkMDXp9mtcyOy3rwBfdvVJK7D6/ACSzg3RoruIq5UDeESfEmVclDxnniU82vxMLtceD0hGZWzBNPMM/jSPne2OVatiTKUpY5vY7gc0LdUAWeWM5tH+O2I66AOWw9xT2BuyRVLGdoDHUsVRXOo/c+ZdRXvFfnxWyIV4upFLCl9eAL7h8Zv0QH8Ry8pA2cHzQpGesctVA37ZtklBTgHjyvdSeKY/RZw/kJMk0Y25cSNRWSigQtlULPTw+kzuJPeYEkXjQRpoGZobYsLF79pyd1dMRHInbgFTZqNLhDqiIsTNpoex2WLcy0/X6rHcdMMQvFSd5dWA++4P7xv89deACnmr36uGlL69bRCL6BSZsS6c0TU2TKK5gtWCzgAOOwQcurqk9j8whvziZSMLcq5hbuwBEsYjopUBkqw1yYBGpLA97SRElEmx5MCInBY5vgLk94iKqSWmhIGmkJ4Bi9m4L645J68LyY4wsFYBfUg5feP/6gWWm58IEmKQM89hq7KsZNaKtP5TxxrUZZVkNmMJtjbKrGxLNEbHPJxhqy7lAmbC32ZqeF6lTaknRWcYaFpfLUBh/rwaQycCCJmW15Kstv6jRHyJFry2C1ahkkIW0LO75s61+owxK1y3XqweX9m5YLM2DPFeOjn/iiqCKJ+yKXF8t5Yl/kNsqaSCryxPq5xWTFIaP8KSW0RYxqupaUf0RcTNSSdJZGcKYdYA6kdtrtmyBckfKXwqk0pHpUHlwWaffjNRBYFPUDWa8e3Lt/o0R0CdisKDM89cX0pvRHEfM8ca4t0s2Xx4kgo91MPQJ/0c9MQYq0co8MBh7bz1fio0UUHLR4aAIOvOmoYO6kwlEVODSSTliWtOtH6sPkrtctF9ZtJ9GIerBskvhdVS5cFNv9s1BU0AbdUgdK4FG+dRnjFmDTzniRMdZO1QhzMK355vigbdkpz9P6qjUGE5J2qAcXmwJ20cZUiAD0z+pGMx6xkzJkmEf40Hr4qZfVg2XzF9YOyoV5BjzVkUJngKf8lgNYwKECEHrCNDrWZzMlflS3yBhr/InyoUgBc/lKT4pxVrrC6g1YwcceK3BmNxZcAtz3j5EIpqguh9H6wc011YN75cKDLpFDxuwkrPQmUwW4KTbj9mZTwBwLq4aQMUZbHm1rylJ46dzR0dua2n3RYCWZsiHROeywyJGR7mXKlpryyCiouY56sFkBWEnkEB/raeh/Sw4162KeuAxMQpEkzy5alMY5wamMsWKKrtW2WpEWNnReZWONKWjrdsKZarpFjqCslq773PLmEhM448Pc3+FKr1+94vv/rfw4tEcu+lKTBe4kZSdijBrykwv9vbCMPcLQTygBjzVckSLPRVGslqdunwJ4oegtFOYb4SwxNgWLCmD7T9kVjTv5YDgpo0XBmN34Z/rEHp0sgyz7lngsrm4lvMm2Mr1zNOJYJ5cuxuQxwMGJq/TP5emlb8fsQBZviK4t8hFL+zbhtlpwaRSxQRWfeETjuauPsdGxsBVdO7nmP4xvzSoT29pRl7kGqz+k26B3Oy0YNV+SXbbQas1ctC/GarskRdFpKczVAF1ZXnLcpaMuzVe6lZ2g/1ndcvOVgRG3sdUAY1bKD6achijMPdMxV4muKVorSpiDHituH7rSTs7n/4y5DhRXo4FVBN4vO/zbAcxhENzGbHCzU/98Mcx5e7a31kWjw9FCe/zNeYyQjZsWb1uc7U33pN4Mji6hCLhivqfa9Ss6xLg031AgfesA/l99m9fgvnaF9JoE6bYKmkGNK3aPbHB96w3+DnxFm4hs0drLsk7U8kf/N/CvwQNtllna0rjq61sH8L80HAuvwH1tvBy2ChqWSCaYTaGN19sTvlfzFD6n+iKTbvtayfrfe9ueWh6GJFoxLdr7V72a5ZpvHcCPDzma0wTO4EgbLyedxstO81n57LYBOBzyfsOhUKsW1J1BB5vr/tz8RyqOFylQP9Tvst2JALsC5lsH8PyQ40DV4ANzYa4dedNiKNR1s+x2wwbR7q4/4cTxqEk4LWDebfisuo36JXLiWFjOtLrlNWh3K1rRS4xvHcDNlFnNmWBBAl5SWaL3oPOfnvbr5pdjVnEaeBJSYjuLEkyLLsWhKccadmOphZkOPgVdalj2QpSmfOsADhMWE2ZBu4+EEJI4wKTAuCoC4xwQbWXBltpxbjkXJtKxxabo9e7tyhlgb6gNlSbUpMh+l/FaqzVwewGu8BW1Zx7pTpQDJUjb8tsUTW6+GDXbMn3mLbXlXJiGdggxFAoUrtPS3wE4Nk02UZG2OOzlk7fRs7i95QCLo3E0jtrjnM7SR3uS1p4qtS2nJ5OwtQVHgOvArLBFijZUV9QtSl8dAY5d0E0hM0w3HS2DpIeB6m/A1+HfhJcGUq4sOxH+x3f5+VO+Ds9rYNI7zPXOYWPrtf8bYMx6fuOAX5jzNR0PdsuON+X1f7EERxMJJoU6GkTEWBvVolVlb5lh3tKCg6Wx1IbaMDdJ+9sUCc5KC46hKGCk3IVOS4TCqdBNfUs7Kd4iXf2RjnT/LLysJy3XDcHLh/vde3x8DoGvwgsa67vBk91G5Pe/HbOe7xwym0NXbtiuuDkGO2IJDh9oQvJ4cY4vdoqLDuoH9Zl2F/ofsekn8lkuhIlhQcffUtSjytFyp++p6NiE7Rqx/lodgKVoceEp/CP4FfjrquZaTtj2AvH5K/ywpn7M34K/SsoYDAdIN448I1/0/wveW289T1/lX5xBzc8N5IaHr0XMOQdHsIkDuJFifj20pBm5jzwUv9e2FhwRsvhAbalCIuIw3bhJihY3p6nTFFIZgiSYjfTf3aXuOjmeGn4bPoGvwl+CFzTRczBIuHBEeImHc37/lGfwZR0cXzVDOvaKfNHvwe+suZ771K/y/XcBlsoN996JpBhoE2toYxOznNEOS5TJc6Id5GEXLjrWo+LEWGNpPDU4WAwsIRROu+1vM+0oW37z/MBN9kqHnSArwPfgFJ7Cq/Ai3Ie7g7ncmI09v8sjzw9mzOAEXoIHxURueaAce5V80f/DOuuZwHM8vsMb5wBzOFWM7wymTXPAEvm4vcFpZ2ut0VZRjkiP2MlmLd6DIpbGSiHOjdnUHN90hRYmhTnmvhzp1iKDNj+b7t5hi79lWGwQ+HN9RsfFMy0FXbEwhfuczKgCbyxYwBmcFhhvo/7a44v+i3XWcwDP86PzpGQYdWh7csP5dBvZ1jNzdxC8pBGuxqSW5vw40nBpj5JhMwvOzN0RWqERHMr4Lv1kWX84xLR830G3j6yqZ1a8UstTlW+qJPOZ+sZ7xZPKTJLhiNOAFd6tk+jrTH31ncLOxid8+nzRb128HhUcru/y0Wn6iT254YPC6FtVSIMoW2sk727AhvTtrWKZTvgsmckfXYZWeNRXx/3YQ2OUxLDrbHtN11IwrgXT6c8dATDwLniYwxzO4RzuQqTKSC5gAofMZ1QBK3zQ4JWobFbcvJm87FK+6JXrKahLn54m3p+McXzzYtP8VF/QpJuh1OwieElEoI1pRxPS09FBrkq2tWCU59+HdhNtTIqKm8EBrw2RTOEDpG3IKo2Y7mFdLm3ZeVjYwVw11o/oznceMve4CgMfNym/utA/d/ILMR7gpXzRy9eDsgLcgbs8O2Va1L0zzIdwGGemTBuwROHeoMShkUc7P+ISY3KH5ZZeWqO8mFTxQYeXTNuzvvK5FGPdQfuu00DwYFY9dyhctEt+OJDdnucfpmyhzUJzfsJjr29l8S0bXBfwRS9ZT26tmMIdZucch5ZboMz3Nio3nIOsYHCGoDT4kUA9MiXEp9Xsui1S8th/kbWIrMBxDGLodWUQIWcvnXy+9M23xPiSMOiRPqM+YMXkUN3gXFrZJwXGzUaMpJfyRS9ZT0lPe8TpScuRlbMHeUmlaKDoNuy62iWNTWNFYjoxFzuJs8oR+RhRx7O4SVNSXpa0ZJQ0K1LAHDQ+D9IepkMXpcsq5EVCvClBUIzDhDoyKwDw1Lc59GbTeORivugw1IcuaEOaGWdNm+Ps5fQ7/tm0DjMegq3yM3vb5j12qUId5UZD2oxDSEWOZMSqFl/W+5oynWDa/aI04tJRQ2eTXusg86SQVu/nwSYwpW6wLjlqIzwLuxGIvoAvul0PS+ZNz0/akp/pniO/8JDnGyaCkzbhl6YcqmK/69prxPqtpx2+Km9al9sjL+rwMgHw4jE/C8/HQ3m1vBuL1fldbzd8mOueVJ92syqdEY4KJjSCde3mcRw2TA6szxedn+zwhZMps0XrqEsiUjnC1hw0TELC2Ek7uAAdzcheXv1BYLagspxpzSAoZZUsIzIq35MnFQ9DOrlNB30jq3L4pkhccKUAA8/ocvN1Rzx9QyOtERs4CVsJRK/DF71kPYrxYsGsm6RMh4cps5g1DOmM54Ly1ii0Hd3Y/BMk8VWFgBVmhqrkJCPBHAolwZaWzLR9Vb7bcWdX9NyUYE+uB2BKfuaeBUcjDljbYVY4DdtsVWvzRZdWnyUzDpjNl1Du3aloAjVJTNDpcIOVVhrHFF66lLfJL1zJr9PQ2nFJSBaKoDe+sAvLufZVHVzYh7W0h/c6AAZ+7Tvj6q9j68G/cTCS/3n1vLKHZwNi+P+pS0WkZNMBMUl+LDLuiE4omZy71r3UFMwNJV+VJ/GC5ixVUkBStsT4gGKh0Gm4Oy3qvq7Lbmq24nPdDuDR9deR11XzP4vFu3TYzfnIyiSVmgizUYGqkIXNdKTY9pgb9D2Ix5t0+NHkVzCdU03suWkkVZAoCONCn0T35gAeW38de43mf97sMOpSvj4aa1KYUm58USI7Wxxes03bAZdRzk6UtbzMaCQ6IxO0dy7X+XsjoD16hpsBeGz9dfzHj+R/Hp8nCxZRqkEDTaCKCSywjiaoMJ1TITE9eg7Jqnq8HL6gDwiZb0u0V0Rr/rmvqjxKuaLCX7ZWXTvAY+uvm3z8CP7nzVpngqrJpZKwWnCUjIviYVlirlGOzPLI3SMVyp/elvBUjjDkNhrtufFFErQ8pmdSlbK16toBHlt/HV8uHMX/vEGALkV3RJREiSlopxwdMXOZPLZ+ix+kAHpMKIk8UtE1ygtquttwxNhphrIZ1IBzjGF3IIGxGcBj6q8bHJBG8T9vdsoWrTFEuebEZuVxhhClH6P5Zo89OG9fwHNjtNQTpD0TG9PJLEYqvEY6Rlxy+ZZGfL0Aj62/bnQCXp//eeM4KzfQVJbgMQbUjlMFIm6TpcfWlZje7NBSV6IsEVmumWIbjiloUzQX9OzYdo8L1wjw2PrrpimONfmfNyzKklrgnEkSzT5QWYQW40YShyzqsRmMXbvVxKtGuYyMKaU1ugenLDm5Ily4iT14fP11Mx+xJv+zZ3MvnfdFqxU3a1W/FTB4m3Qfsyc1XUcdVhDeUDZXSFHHLQj/Y5jtC7ZqM0CXGwB4bP11i3LhOvzPGygYtiUBiwQV/4wFO0majijGsafHyRLu0yG6q35cL1rOpVxr2s5cM2jJYMCdc10Aj6q/blRpWJ//+dmm5psMl0KA2+AFRx9jMe2WbC4jQxnikd4DU8TwUjRVacgdlhmr3bpddzuJ9zXqr2xnxJfzP29RexdtjDVZqzkqa6PyvcojGrfkXiJ8SEtml/nYskicv0ivlxbqjemwUjMw5evdg8fUX9nOiC/lf94Q2i7MURk9nW1MSj5j8eAyV6y5CN2S6qbnw3vdA1Iwq+XOSCl663udN3IzLnrt+us25cI1+Z83SXQUldqQq0b5XOT17bGpLd6ssN1VMPf8c+jG8L3NeCnMdF+Ra3fRa9dft39/LuZ/3vwHoHrqGmQFafmiQw6eyzMxS05K4bL9uA+SKUQzCnSDkqOGokXyJvbgJ/BHI+qvY69//4rl20NsmK2ou2dTsyIALv/91/8n3P2Aao71WFGi8KKv1fRC5+J67Q/507/E/SOshqN5TsmYIjVt+kcjAx98iz/4SaojbIV1rexE7/C29HcYD/DX4a0rBOF5VTu7omsb11L/AWcVlcVZHSsqGuXLLp9ha8I//w3Mv+T4Ew7nTBsmgapoCrNFObIcN4pf/Ob/mrvHTGqqgAupL8qWjWPS9m/31jAe4DjA+4+uCoQoT/zOzlrNd3qd4SdphFxsUvYwGWbTWtISc3wNOWH+kHBMfc6kpmpwPgHWwqaSUG2ZWWheYOGQGaHB+eQ/kn6b3pOgLV+ODSn94wDvr8Bvb70/LLuiPPEr8OGVWfDmr45PZyccEmsVXZGe1pRNX9SU5+AVQkNTIVPCHF/jGmyDC9j4R9LfWcQvfiETmgMMUCMN1uNCakkweZsowdYobiMSlnKA93u7NzTXlSfe+SVbfnPQXmg9LpYAQxpwEtONyEyaueWM4FPjjyjG3uOaFmBTWDNgBXGEiQpsaWhnAqIijB07Dlsy3fUGeP989xbWkyf+FF2SNEtT1E0f4DYYVlxFlbaSMPIRMk/3iMU5pME2SIWJvjckciebkQuIRRyhUvkHg/iUljG5kzVog5hV7vIlCuBrmlhvgPfNHQM8lCf+FEGsYbMIBC0qC9a0uuy2wLXVbLBaP5kjHokCRxapkQyzI4QEcwgYHRZBp+XEFTqXFuNVzMtjXLJgX4gAid24Hjwc4N3dtVSe+NNiwTrzH4WVUOlDobUqr1FuAgYllc8pmzoVrELRHSIW8ViPxNy4xwjBpyR55I6J220qQTZYR4guvUICJiSpr9gFFle4RcF/OMB7BRiX8sSfhpNSO3lvEZCQfLUVTKT78Ek1LRLhWN+yLyTnp8qWUZ46b6vxdRGXfHVqx3eI75YaLa4iNNiK4NOW7wPW6lhbSOF9/M9qw8e/aoB3d156qTzxp8pXx5BKAsYSTOIIiPkp68GmTq7sZtvyzBQaRLNxIZ+paozHWoLFeExIhRBrWitHCAHrCF7/thhD8JhYz84wg93QRV88wLuLY8zF8sQ36qF1J455bOlgnELfshKVxYOXKVuKx0jaj22sczTQqPqtV/XDgpswmGTWWMSDw3ssyUunLLrVPGjYRsH5ggHeHSWiV8kT33ycFSfMgkoOK8apCye0J6VW6GOYvffgU9RWsukEi2kUV2nl4dOYUzRik9p7bcA4ggdJ53LxKcEe17B1R8eqAd7dOepV8sTXf5lhejoL85hUdhDdknPtKHFhljOT+bdq0hxbm35p2nc8+Ja1Iw+tJykgp0EWuAAZYwMVwac5KzYMslhvgHdHRrxKnvhTYcfKsxTxtTETkjHO7rr3zjoV25lAQHrqpV7bTiy2aXMmUhTBnKS91jhtR3GEoF0oLnWhWNnYgtcc4N0FxlcgT7yz3TgNIKkscx9jtV1ZKpWW+Ub1tc1eOv5ucdgpx+FJy9pgbLE7xDyXb/f+hLHVGeitHOi6A7ybo3sF8sS7w7cgdk0nJaOn3hLj3uyD0Zp5pazFIUXUpuTTU18d1EPkDoX8SkmWTnVIozEdbTcZjoqxhNHf1JrSS/AcvHjZ/SMHhL/7i5z+POsTUh/8BvNfYMTA8n+yU/MlTZxSJDRStqvEuLQKWwDctMTQogUDyQRoTQG5Kc6oQRE1yV1jCA7ri7jdZyK0sYTRjCR0Hnnd+y7nHxNgTULqw+8wj0mQKxpYvhjm9uSUxg+TTy7s2GtLUGcywhXSKZN275GsqlclX90J6bRI1aouxmgL7Q0Nen5ziM80SqMIo8cSOo+8XplT/5DHNWsSUr/6lLN/QQ3rDyzLruEW5enpf7KqZoShEduuSFOV7DLX7Ye+GmXb6/hnNNqKsVXuMDFpb9Y9eH3C6NGEzuOuI3gpMH/I6e+zDiH1fXi15t3vA1czsLws0TGEtmPEJdiiFPwlwKbgLHAFk4P6ZyPdymYYHGE0dutsChQBl2JcBFlrEkY/N5bQeXQ18gjunuMfMfsBlxJSx3niO485fwO4fGD5T/+3fPQqkneWVdwnw/3bMPkW9Wbqg+iC765Zk+xcT98ibKZc2EdgHcLoF8cSOo/Oc8fS+OyEULF4g4sJqXVcmfMfsc7A8v1/yfGXmL9I6Fn5pRwZhsPv0TxFNlAfZCvG+Oohi82UC5f/2IsJo0cTOm9YrDoKhFPEUr/LBYTUNht9zelHXDqwfPCIw4owp3mOcIQcLttWXFe3VZ/j5H3cIc0G6oPbCR+6Y2xF2EC5cGUm6wKC5tGEzhsWqw5hNidUiKX5gFWE1GXh4/Qplw4sVzOmx9QxU78g3EF6wnZlEN4FzJ1QPSLEZz1KfXC7vd8ssGdIbNUYpVx4UapyFUHzJoTOo1McSkeNn1M5MDQfs4qQuhhX5vQZFw8suwWTcyYTgioISk2YdmkhehG4PkE7w51inyAGGaU+uCXADabGzJR1fn3lwkty0asIo8cROm9Vy1g0yDxxtPvHDAmpu+PKnM8Ix1wwsGw91YJqhteaWgjYBmmQiebmSpwKKzE19hx7jkzSWOm66oPbzZ8Yj6kxVSpYjVAuvLzYMCRo3oTQecOOjjgi3NQ4l9K5/hOGhNTdcWVOTrlgYNkEXINbpCkBRyqhp+LdRB3g0OU6rMfW2HPCFFMV9nSp+uB2woepdbLBuJQyaw/ZFysXrlXwHxI0b0LovEkiOpXGA1Ijagf+KUNC6rKNa9bQnLFqYNkEnMc1uJrg2u64ELPBHpkgWbmwKpJoDhMwNbbGzAp7Yg31wS2T5rGtzit59PrKhesWG550CZpHEzpv2NGRaxlNjbMqpmEIzygJqQfjypycs2pg2cS2RY9r8HUqkqdEgKTWtWTKoRvOBPDYBltja2SO0RGjy9UHtxwRjA11ujbKF+ti5cIR9eCnxUg6owidtyoU5tK4NLji5Q3HCtiyF2IqLGYsHViOXTXOYxucDqG0HyttqYAKqYo3KTY1ekyDXRAm2AWh9JmsVh/ccg9WJ2E8YjG201sPq5ULxxX8n3XLXuMInbft2mk80rRGjCGctJ8/GFdmEQ9Ug4FlE1ll1Y7jtiraqm5Fe04VV8lvSVBL8hiPrfFVd8+7QH3Qbu2ipTVi8cvSGivc9cj8yvH11YMHdNSERtuOslM97feYFOPKzGcsI4zW0YGAbTAOaxCnxdfiYUmVWslxiIblCeAYr9VYR1gM7GmoPrilunSxxeT3DN/2eBQ9H11+nk1adn6VK71+5+Jfct4/el10/7KBZfNryUunWSCPxPECk1rdOv1WVSrQmpC+Tl46YD3ikQYcpunSQgzVB2VHFhxHVGKDgMEY5GLlQnP7FMDzw7IacAWnO6sBr12u+XanW2AO0wQ8pknnFhsL7KYIqhkEPmEXFkwaN5KQphbkUmG72wgw7WSm9RiL9QT925hkjiVIIhphFS9HKI6/8QAjlpXqg9W2C0apyaVDwKQwrwLY3j6ADR13ZyUNByQXHQu6RY09Hu6zMqXRaNZGS/KEJs0cJEe9VH1QdvBSJv9h09eiRmy0V2uJcqHcShcdvbSNg5fxkenkVprXM9rDVnX24/y9MVtncvbKY706anNl3ASll9a43UiacVquXGhvq4s2FP62NGKfQLIQYu9q1WmdMfmUrDGt8eDS0cXozH/fjmUH6Jruvm50hBDSaEU/2Ru2LEN/dl006TSc/g7tfJERxGMsgDUEr104pfWH9lQaN+M4KWQjwZbVc2rZVNHsyHal23wZtIs2JJqtIc/WLXXRFCpJkfE9jvWlfFbsNQ9pP5ZBS0zKh4R0aMFj1IjTcTnvi0Zz2rt7NdvQb2mgbju1plsH8MmbnEk7KbK0b+wC2iy3aX3szW8xeZvDwET6hWZYwqTXSSG+wMETKum0Dq/q+x62gt2ua2ppAo309TRk9TPazfV3qL9H8z7uhGqGqxNVg/FKx0HBl9OVUORn8Q8Jx9gFttGQUDr3tzcXX9xGgN0EpzN9mdZ3GATtPhL+CjxFDmkeEU6x56kqZRusLzALXVqkCN7zMEcqwjmywDQ6OhyUe0Xao1Qpyncrg6wKp9XfWDsaZplElvQ/b3sdweeghorwBDlHzgk1JmMc/wiERICVy2VJFdMjFuLQSp3S0W3+sngt2njwNgLssFGVQdJ0tu0KH4ky1LW4yrbkuaA6Iy9oz/qEMMXMMDWyIHhsAyFZc2peV9hc7kiKvfULxCl9iddfRK1f8kk9qvbdOoBtOg7ZkOZ5MsGrSHsokgLXUp9y88smniwWyuFSIRVmjplga3yD8Uij5QS1ZiM4U3Qw5QlSm2bXjFe6jzzBFtpg+/YBbLAWG7OPynNjlCw65fukGNdkJRf7yM1fOxVzbxOJVocFoYIaGwH22mIQkrvu1E2nGuebxIgW9U9TSiukPGU+Lt++c3DJPKhyhEEbXCQLUpae2exiKy6tMPe9mDRBFCEMTWrtwxN8qvuGnt6MoihKWS5NSyBhbH8StXoAz8PLOrRgLtOT/+4vcu+7vDLnqNvztOq7fmd8sMmY9Xzn1zj8Dq8+XVdu2Nv0IIySgEdQo3xVHps3Q5i3fLFsV4aiqzAiBhbgMDEd1uh8qZZ+lwhjkgokkOIv4xNJmyncdfUUzgB4oFMBtiu71Xumpz/P+cfUP+SlwFExwWW62r7b+LSPxqxn/gvMZ5z9C16t15UbNlq+jbGJtco7p8wbYlL4alSyfWdeuu0j7JA3JFNuVAwtst7F7FhWBbPFNKIUORndWtLraFLmMu7KFVDDOzqkeaiN33YAW/r76wR4XDN/yN1z7hejPau06EddkS/6XThfcz1fI/4K736fO48vlxt2PXJYFaeUkFS8U15XE3428xdtn2kc8GQlf1vkIaNRRnOMvLTWrZbElEHeLWi1o0dlKPAh1MVgbbVquPJ5+Cr8LU5/H/+I2QlHIU2ClXM9G8v7Rr7oc/hozfUUgsPnb3D+I+7WF8kNO92GY0SNvuxiE+2Bt8prVJTkzE64sfOstxuwfxUUoyk8VjcTlsqe2qITSFoSj6Epd4KsT6BZOWmtgE3hBfir8IzZDwgV4ZTZvD8VvPHERo8v+vL1DASHTz/i9OlKueHDjK5Rnx/JB1Vb1ioXdBra16dmt7dgik10yA/FwJSVY6XjA3oy4SqM2frqDPPSRMex9qs3XQtoWxMj7/Er8GWYsXgjaVz4OYumP2+9kbxvny/6kvWsEBw+fcb5bInc8APdhpOSs01tEqIkoiZjbAqKMruLbJYddHuHFRIyJcbdEdbl2sVLaySygunutBg96Y2/JjKRCdyHV+AEFtTvIpbKIXOamknYSiB6KV/0JetZITgcjjk5ZdaskBtWO86UF0ap6ozGXJk2WNiRUlCPFir66lzdm/SLSuK7EUdPz8f1z29Skq6F1fXg8+5UVR6bszncP4Tn4KUkkdJ8UFCY1zR1i8RmL/qQL3rlei4THG7OODlnKko4oI01kd3CaM08Ia18kC3GNoVaO9iDh+hWxSyTXFABXoau7Q6q9OxYg/OVEMw6jdbtSrJ9cBcewGmaZmg+bvkUnUUaGr+ZfnMH45Ivevl61hMcXsxYLFTu1hTm2zViCp7u0o5l+2PSUh9bDj6FgYypufBDhqK2+oXkiuHFHR3zfj+9PtA8oR0xnqX8qn+sx3bFODSbbF0X8EUvWQ8jBIcjo5bRmLOljDNtcqNtOe756h3l0VhKa9hDd2l1eqmsnh0MNMT/Cqnx6BInumhLT8luljzQ53RiJeA/0dxe5NK0o2fA1+GLXr6eNQWHNUOJssQaTRlGpLHKL9fD+IrQzTOMZS9fNQD4AnRNVxvTdjC+fJdcDDWQcyB00B0t9BDwTxXgaAfzDZ/DBXzRnfWMFRwuNqocOmX6OKNkY63h5n/fFcB28McVHqnXZVI27K0i4rDLNE9lDKV/rT+udVbD8dFFu2GGZ8mOt0kAXcoX3ZkIWVtw+MNf5NjR2FbivROHmhV1/pj2egv/fMGIOWTIWrV3Av8N9imV9IWml36H6cUjqEWNv9aNc+veb2sH46PRaHSuMBxvtW+twxctq0z+QsHhux8Q7rCY4Ct8lqsx7c6Sy0dl5T89rIeEuZKoVctIk1hNpfavER6yyH1Vvm3MbsUHy4ab4hWr/OZPcsRBphnaV65/ZcdYPNNwsjN/djlf9NqCw9U5ExCPcdhKxUgLSmfROpLp4WSUr8ojdwbncbvCf+a/YzRaEc6QOvXcGO256TXc5Lab9POvB+AWY7PigWYjzhifbovuunzRawsO24ZqQQAqguBtmpmPB7ysXJfyDDaV/aPGillgz1MdQg4u5MYaEtBNNHFjkRlSpd65lp4hd2AVPTfbV7FGpyIOfmNc/XVsPfg7vzaS/3nkvLL593ANLvMuRMGpQIhiF7kUEW9QDpAUbTWYBcbp4WpacHHY1aacqQyjGZS9HI3yCBT9kUZJhVOD+zUDvEH9ddR11fzPcTDQ5TlgB0KwqdXSavk9BC0pKp0WmcuowSw07VXmXC5guzSa4p0UvRw2lbDiYUx0ExJJRzWzi6Gm8cnEkfXXsdcG/M/jAJa0+bmCgdmQ9CYlNlSYZOKixmRsgiFxkrmW4l3KdFKv1DM8tk6WxPYJZhUUzcd8Kdtgrw/gkfXXDT7+avmfVak32qhtkg6NVdUS5wgkru1YzIkSduTW1FDwVWV3JQVJVuieTc0y4iDpFwc7/BvSalvKdQM8sv662cevz/+8sQVnjVAT0W2wLllw1JiMhJRxgDjCjLQsOzSFSgZqx7lAW1JW0e03yAD3asC+GD3NbQhbe+mN5GXH1F83KDOM4n/e5JIuH4NpdQARrFPBVptUNcjj4cVMcFSRTE2NpR1LEYbYMmfWpXgP9KejaPsLUhuvLCsVXznAG9dfx9SR1ud/3hZdCLHb1GMdPqRJgqDmm76mHbvOXDtiO2QPUcKo/TWkQ0i2JFXpBoo7vij1i1Lp3ADAo+qvG3V0rM//vFnnTE4hxd5Ka/Cor5YEdsLVJyKtDgVoHgtW11pWSjolPNMnrlrVj9Fv2Qn60twMwKPqr+N/wvr8z5tZcDsDrv06tkqyzESM85Ycv6XBWA2birlNCXrI6VbD2lx2L0vQO0QVTVVLH4SE67fgsfVXv8n7sz7/85Z7cMtbE6f088wSaR4kCkCm10s6pKbJhfqiUNGLq+0gLWC6eUAZFPnLjwqtKd8EwGvWX59t7iPW4X/eAN1svgRVSY990YZg06BD1ohLMtyFTI4pKTJsS9xREq9EOaPWiO2gpms7397x6nQJkbh+Fz2q/rqRROX6/M8bJrqlVW4l6JEptKeUFuMYUbtCQ7CIttpGc6MY93x1r1vgAnRXvY5cvwWPqb9uWQm+lP95QxdNMeWhOq1x0Db55C7GcUv2ZUuN6n8iKzsvOxibC//Yfs9Na8r2Rlz02vXXDT57FP/zJi66/EJSmsJKa8QxnoqW3VLQ+jZVUtJwJ8PNX1NQCwfNgdhhHD9on7PdRdrdGPF28rJr1F+3LBdeyv+8yYfLoMYet1vX4upNAjVvwOUWnlNXJXlkzk5Il6kqeoiL0C07qno+/CYBXq/+utlnsz7/Mzvy0tmI4zm4ag23PRN3t/CWryoUVJGm+5+K8RJ0V8Hc88/XHUX/HfiAq7t+BH+x6v8t438enWmdJwFA6ZINriLGKv/95f8lT9/FnyA1NMVEvQyaXuu+gz36f/DD73E4pwqpLcvm/o0Vle78n//+L/NPvoefp1pTJye6e4A/D082FERa5/opeH9zpvh13cNm19/4v/LDe5xMWTi8I0Ta0qKlK27AS/v3/r+/x/2GO9K2c7kVMonDpq7//jc5PKCxeNPpFVzaRr01wF8C4Pu76hXuX18H4LduTr79guuFD3n5BHfI+ZRFhY8w29TYhbbLi/bvBdqKE4fUgg1pBKnV3FEaCWOWyA+m3WpORZr/j+9TKJtW8yBTF2/ZEODI9/QavHkVdGFp/Pjn4Q+u5hXapsP5sOH+OXXA1LiKuqJxiMNbhTkbdJTCy4llEt6NnqRT4dhg1V3nbdrm6dYMecA1yTOL4PWTE9L5VzPFlLBCvlG58AhehnN4uHsAYinyJ+AZ/NkVvELbfOBUuOO5syBIEtiqHU1k9XeISX5bsimrkUUhnGDxourN8SgUsCZVtKyGbyGzHXdjOhsAvOAswSRyIBddRdEZWP6GZhNK/yjwew9ehBo+3jEADu7Ay2n8mDc+TS7awUHg0OMzR0LABhqLD4hJEh/BEGyBdGlSJoXYXtr+3HS4ijzVpgi0paWXtdruGTknXBz+11qT1Q2inxaTzQCO46P3lfLpyS4fou2PH/PupwZgCxNhGlj4IvUuWEsTkqMWm6i4xCSMc9N1RDQoCVcuGItJ/MRWefais+3synowi/dESgJjkilnWnBTGvRWmaw8oR15257t7CHmCf8HOn7cwI8+NQBXMBEmAa8PMRemrNCEhLGEhDQKcGZWS319BX9PFBEwGTbRBhLbDcaV3drFcDqk5kCTd2JF1Wp0HraqBx8U0wwBTnbpCadwBA/gTH/CDrcCs93LV8E0YlmmcyQRQnjBa8JESmGUfIjK/7fkaDJpmD2QptFNVJU1bbtIAjjWQizepOKptRjbzR9Kag6xZmMLLjHOtcLT3Tx9o/0EcTT1XN3E45u24AiwEypDJXihKjQxjLprEwcmRKclaDNZCVqr/V8mYWyFADbusiY5hvgFoU2vio49RgJLn5OsReRFN6tabeetiiy0V7KFHT3HyZLx491u95sn4K1QQSPKM9hNT0wMVvAWbzDSVdrKw4zRjZMyJIHkfq1VAVCDl/bUhNKlGq0zGr05+YAceXVPCttVk0oqjVwMPt+BBefx4yPtGVkUsqY3CHDPiCM5ngupUwCdbkpd8kbPrCWHhkmtIKLEetF2499eS1jZlIPGYnlcPXeM2KD9vLS0bW3ktYNqUllpKLn5ZrsxlIzxvDu5eHxzGLctkZLEY4PgSOg2IUVVcUONzUDBEpRaMoXNmUc0tFZrTZquiLyKxrSm3DvIW9Fil+AkhXu5PhEPx9mUNwqypDvZWdKlhIJQY7vn2OsnmBeOWnYZ0m1iwbbw1U60by5om47iHRV6fOgzjMf/DAZrlP40Z7syxpLK0lJ0gqaAK1c2KQKu7tabTXkLFz0sCftuwX++MyNeNn68k5Buq23YQhUh0SNTJa1ioQ0p4nUG2y0XilF1JqODqdImloPS4Bp111DEWT0jJjVv95uX9BBV7eB3bUWcu0acSVM23YZdd8R8UbQUxJ9wdu3oMuhdt929ME+mh6JXJ8di2RxbTi6TbrDquqV4aUKR2iwT6aZbyOwEXN3DUsWr8Hn4EhwNyHuXHh7/pdaUjtR7vnDh/d8c9xD/s5f501eQ1+CuDiCvGhk1AN/4Tf74RfxPwD3toLarR0zNtsnPzmS64KIRk861dMWCU8ArasG9T9H0ZBpsDGnjtAOM2+/LuIb2iIUGXNgl5ZmKD/Tw8TlaAuihaFP5yrw18v4x1898zIdP+DDAX1bM3GAMvPgRP/cJn3zCW013nrhHkrITyvYuwOUkcHuKlRSW5C6rzIdY4ppnF7J8aAJbQepgbJYBjCY9usGXDKQxq7RZfh9eg5d1UHMVATRaD/4BHK93/1iAgYZ/+jqPn8Dn4UExmWrpa3+ZOK6MvM3bjwfzxNWA2dhs8+51XHSPJiaAhGSpWevEs5xHLXcEGFXYiCONySH3fPWq93JIsBiSWvWyc3CAN+EcXoT7rCSANloPPoa31rt/5PUA/gp8Q/jDD3hyrjzlR8VkanfOvB1XPubt17vzxAfdSVbD1pzAnfgyF3ycadOTOTXhpEUoLC1HZyNGW3dtmjeXgr2r56JNmRwdNNWaQVBddd6rh4MhviEB9EFRD/7RGvePvCbwAL4Mx/D6M541hHO4D3e7g6PafdcZVw689z7NGTwo5om7A8sPhccT6qKcl9NJl9aM/9kX+e59Hh1yPqGuCCZxuITcsmNaJ5F7d0q6J3H48TO1/+M57085q2icdu2U+W36Ldllz9Agiv4YGljoEN908EzvDOrBF98/vtJwCC/BF2AG75xxEmjmMIcjxbjoaxqOK3/4hPOZzhMPBpYPG44CM0dTVm1LjLtUWWVz1Bcf8tEx0zs8O2A2YVHRxKYOiy/aOVoAaMu0i7ubu43njjmd4ibMHU1sIDHaQNKrZND/FZYdk54oCXetjq7E7IVl9eAL7t+oHnwXXtLx44czzoRFHBztYVwtH1d+NOMkupZ5MTM+gUmq90X+Bh9zjRlmaQ+m7YMqUL/veemcecAtOJ0yq1JnVlN27di2E0+Klp1tAJ4KRw1eMI7aJjsO3R8kPSI3fUFXnIOfdQe86sIIVtWDL7h//Ok6vj8vwDk08NEcI8zz7OhBy+WwalzZeZ4+0XniRfst9pAJqQHDGLzVQ2pheZnnv1OWhwO43/AgcvAEXEVVpa4db9sGvNK8wjaENHkfFQ4Ci5i7dqnQlPoLQrHXZDvO3BIXZbJOBrOaEbML6sFL798I4FhKihjHMsPjBUZYCMFr6nvaArxqXPn4lCa+cHfSa2cP27g3Z3ziYTRrcbQNGLQmGF3F3cBdzzzX7AILx0IB9rbwn9kx2G1FW3Inic+ZLIsVvKR8Zwfj0l1fkqo8LWY1M3IX14OX3r9RKTIO+d9XzAI8qRPGPn/4NC2n6o4rN8XJ82TOIvuVA8zLKUHRFgBCetlDZlqR1gLKjS39xoE7Bt8UvA6BxuEDjU3tFsEijgA+615tmZkXKqiEENrh41iLDDZNq4pKTWR3LZfnos81LOuNa15cD956vLMsJd1rqYp51gDUQqMYm2XsxnUhD2jg1DM7SeuJxxgrmpfISSXVIJIS5qJJSvJPEQ49DQTVIbYWJ9QWa/E2+c/oPK1drmC7WSfJRNKBO5Yjvcp7Gc3dmmI/Xh1kDTEuiSnWqQf37h+fTMhGnDf6dsS8SQfQWlqqwXXGlc/PEZ/SC5mtzIV0nAshlQdM/LvUtYutrEZ/Y+EAFtq1k28zQhOwLr1AIeANzhF8t9qzTdZf2qRKO6MWE9ohBYwibbOmrFtNmg3mcS+tB28xv2uKd/agYCvOP+GkSc+0lr7RXzyufL7QbkUpjLjEWFLqOIkAGu2B0tNlO9Eau2W1qcOUvVRgKzypKIQZ5KI3q0MLzqTNRYqiZOqmtqloIRlmkBHVpHmRYV6/HixbO6UC47KOFJnoMrVyr7wYz+SlW6GUaghYbY1I6kkxA2W1fSJokUdSh2LQ1GAimRGm0MT+uu57H5l7QgOWxERpO9moLRPgTtquWCfFlGlIjQaRly9odmzMOWY+IBO5tB4sW/0+VWGUh32qYk79EidWKrjWuiLpiVNGFWFRJVktyeXWmbgBBzVl8anPuXyNJlBJOlKLTgAbi/EYHVHxWiDaVR06GnHQNpJcWcK2jJtiCfG2sEHLzuI66sGrMK47nPIInPnu799935aOK2cvmvubrE38ZzZjrELCmXM2hM7UcpXD2oC3+ECVp7xtIuxptJ0jUr3sBmBS47TVxlvJ1Sqb/E0uLdvLj0lLr29ypdd/eMX3f6lrxGlKwKQxEGvw0qHbkbwrF3uHKwVENbIV2wZ13kNEF6zD+x24aLNMfDTCbDPnEikZFyTNttxWBXDaBuM8KtI2rmaMdUY7cXcUPstqTGvBGSrFWIpNMfbdea990bvAOC1YX0qbc6smDS1mPxSJoW4fwEXvjMmhlijDRq6qale6aJEuFGoppYDoBELQzLBuh/mZNx7jkinv0EtnUp50lO9hbNK57lZaMAWuWR5Yo9/kYwcYI0t4gWM47Umnl3YmpeBPqSyNp3K7s2DSAS/39KRuEN2bS4xvowV3dFRMx/VFcp2Yp8w2nTO9hCXtHG1kF1L4KlrJr2wKfyq77R7MKpFKzWlY9UkhYxyHWW6nBWPaudvEAl3CGcNpSXPZ6R9BbBtIl6cHL3gIBi+42CYXqCx1gfGWe7Ap0h3luyXdt1MKy4YUT9xSF01G16YEdWsouW9mgDHd3veyA97H+Ya47ZmEbqMY72oPztCGvK0onL44AvgC49saZKkWRz4veWljE1FHjbRJaWv6ZKKtl875h4CziFCZhG5rx7tefsl0aRT1bMHZjm8dwL/6u7wCRysaQblQoG5yAQN5zpatMNY/+yf8z+GLcH/Qn0iX2W2oEfXP4GvwQHuIL9AYGnaO3zqAX6946nkgqZNnUhx43DIdQtMFeOPrgy/y3Yd85HlJWwjLFkU3kFwq28xPnuPhMWeS+tDLV9Otllq7pQCf3uXJDN9wFDiUTgefHaiYbdfi3b3u8+iY6TnzhgehI1LTe8lcd7s1wJSzKbahCRxKKztTLXstGAiu3a6rPuQs5pk9TWAan5f0BZmGf7Ylxzzk/A7PAs4QPPPAHeFQ2hbFHszlgZuKZsJcUmbDC40sEU403cEjczstOEypa+YxevL4QBC8oRYqWdK6b7sK25tfE+oDZgtOQ2Jg8T41HGcBE6fTWHn4JtHcu9S7uYgU5KSCkl/mcnq+5/YBXOEr6lCUCwOTOM1taOI8mSxx1NsCXBEmLKbMAg5MkwbLmpBaFOPrNSlO2HnLiEqW3tHEwd8AeiQLmn+2gxjC3k6AxREqvKcJbTEzlpLiw4rNZK6oJdidbMMGX9FULKr0AkW+2qDEPBNNm5QAt2Ik2nftNWHetubosHLo2nG4vQA7GkcVCgVCgaDixHqo9UUn1A6OshapaNR/LPRYFV8siT1cCtJE0k/3WtaNSuUZYKPnsVIW0xXWnMUxq5+En4Kvw/MqQmVXnAXj9Z+9zM98zM/Agy7F/qqj2Nh67b8HjFnPP3iBn/tkpdzwEJX/whIcQUXOaikeliCRGUk7tiwF0rItwMEhjkZ309hikFoRAmLTpEXWuHS6y+am/KB/fM50aLEhGnSMwkpxzOov4H0AvgovwJ1iGzDLtJn/9BU+fAINfwUe6FHSLhu83viV/+/HrOePX+STT2B9uWGbrMHHLldRBlhS/CJQmcRxJFqZica01XixAZsYiH1uolZxLrR/SgxVIJjkpQP4PE9sE59LKLr7kltSBogS5tyszzH8Fvw8/AS8rNOg0xUS9fIaHwb+6et8Q/gyvKRjf5OusOzGx8evA/BP4IP11uN/grca5O0lcsPLJ5YjwI4QkJBOHa0WdMZYGxPbh2W2nR9v3WxEWqgp/G3+6VZbRLSAAZ3BhdhAaUL33VUSw9yjEsvbaQ9u4A/gGXwZXoEHOuU1GSj2chf+Mo+f8IcfcAxfIKVmyunRbYQVnoevwgfw3TXXcw++xNuP4fhyueEUNttEduRVaDttddoP0eSxLe2LENk6itYxlrxBNBYrNNKSQmeaLcm9c8UsaB5WyO6675yyQIAWSDpBVoA/gxmcwEvwoDv0m58UE7gHn+fJOa8/Ywan8EKRfjsopF83eCglX/Sfr7OeaRoQfvt1CGvIDccH5BCvw1sWIzRGC/66t0VTcLZQZtm6PlAasbOJ9iwWtUo7biktTSIPxnR24jxP1ZKaqq+2RcXM9OrBAm/AAs7hDJ5bNmGb+KIfwCs8a3jnjBrOFeMjHSCdbKr+2uOLfnOd9eiA8Hvvwwq54VbP2OqwkB48Ytc4YEOiH2vTXqodabfWEOzso4qxdbqD5L6tbtNPECqbhnA708DZH4QOJUXqScmUlks7Ot6FBuZw3n2mEbaUX7kDzxHOOQk8nKWMzAzu6ZZ8sOFw4RK+6PcuXo9tB4SbMz58ApfKDXf3szjNIIbGpD5TKTRxGkEMLjLl+K3wlWXBsCUxIDU+jbOiysESqAy1MGUJpXgwbTWzNOVEziIXZrJ+VIztl1PUBxTSo0dwn2bOmfDRPD3TRTGlfbCJvO9KvuhL1hMHhB9wPuPRLGHcdOWG2xc0U+5bQtAJT0nRTewXL1pgk2+rZAdeWmz3jxAqfNQQdzTlbF8uJ5ecEIWvTkevAHpwz7w78QujlD/Lr491bD8/1vhM2yrUQRrWXNQY4fGilfctMWYjL72UL/qS9eiA8EmN88nbNdour+PBbbAjOjIa4iBhfFg6rxeKdEGcL6p3EWR1Qq2Qkhs2DrnkRnmN9tG2EAqmgPw6hoL7Oza7B+3SCrR9tRftko+Lsf2F/mkTndN2LmzuMcKTuj/mX2+4Va3ki16+nnJY+S7MefpkidxwnV+4wkXH8TKnX0tsYzYp29DOOoSW1nf7nTh2akYiWmcJOuTidSaqESrTYpwjJJNVGQr+rLI7WsqerHW6Kp/oM2pKuV7T1QY9gjqlZp41/WfKpl56FV/0kvXQFRyeQ83xaTu5E8p5dNP3dUF34ihyI3GSpeCsywSh22ZJdWto9winhqifb7VRvgktxp13vyjrS0EjvrRfZ62uyqddSWaWYlwTPAtJZ2oZ3j/Sgi/mi+6vpzesfAcWNA0n8xVyw90GVFGuZjTXEQy+6GfLGLMLL523f5E0OmxVjDoOuRiH91RKU+vtoCtH7TgmvBLvtFXWLW15H9GTdVw8ow4IlRLeHECN9ym1e9K0I+Cbnhgv4Yu+aD2HaQJ80XDqOzSGAV4+4yCqBxrsJAX6ZTIoX36QnvzhhzzMfFW2dZVLOJfo0zbce5OvwXMFaZ81mOnlTVXpDZsQNuoYWveketKb5+6JOOsgX+NTm7H49fUTlx+WLuWL7qxnOFh4BxpmJx0p2gDzA/BUARuS6phR+pUsY7MMboAHx5xNsSVfVZcYSwqCKrqon7zM+8ecCkeS4nm3rINuaWvVNnMRI1IRpxTqx8PZUZ0Br/UEduo3B3hNvmgZfs9gQPj8vIOxd2kndir3awvJ6BLvoUuOfFWNYB0LR1OQJoUySKb9IlOBx74q1+ADC2G6rOdmFdJcD8BkfualA+BdjOOzP9uUhGUEX/TwhZsUduwRr8wNuXKurCixLBgpQI0mDbJr9dIqUuV+92ngkJZ7xduCk2yZKbfWrH1VBiTg9VdzsgRjW3CVXCvAwDd+c1z9dWw9+B+8MJL/eY15ZQ/HqvTwVdsZn5WQsgRRnMaWaecu3jFvMBEmgg+FJFZsnSl0zjB9OqPYaBD7qmoVyImFvzi41usesV0julaAR9dfR15Xzv9sEruRDyk1nb+QaLU67T885GTls6YgcY+UiMa25M/pwGrbCfzkvR3e0jjtuaFtnwuagHTSb5y7boBH119HXhvwP487jJLsLJ4XnUkHX5sLbS61dpiAXRoZSCrFJ+EjpeU3puVfitngYNo6PJrAigKktmwjyQdZpfq30mmtulaAx9Zfx15Xzv+cyeuiBFUs9zq8Kq+XB9a4PVvph3GV4E3y8HENJrN55H1X2p8VyqSKwVusJDKzXOZzplWdzBUFK9e+B4+uv468xvI/b5xtSAkBHQaPvtqWzllVvEOxPbuiE6+j2pvjcKsbvI7txnRErgfH7LdXqjq0IokKzga14GzQ23SSbCQvO6r+Or7SMIr/efOkkqSdMnj9mBx2DRsiY29Uj6+qK9ZrssCKaptR6HKURdwUYeUWA2kPzVKQO8ku2nU3Anhs/XWkBx3F/7wJtCTTTIKftthue1ty9xvNYLY/zo5KSbIuKbXpbEdSyeRyYdAIwKY2neyoc3+k1XUaufYga3T9daMUx/r8z1s10ITknIO0kuoMt+TB8jK0lpayqqjsJ2qtXAYwBU932zinimgmd6mTRDnQfr88q36NAI+tv24E8Pr8zxtasBqx0+xHH9HhlrwsxxNUfKOHQaZBITNf0uccj8GXiVmXAuPEAKSdN/4GLHhs/XWj92dN/uetNuBMnVR+XWDc25JLjo5Mg5IZIq226tmCsip2zZliL213YrTlL2hcFjpCduyim3M7/eB16q/blQsv5X/esDRbtJeabLIosWy3ycavwLhtxdWzbMmHiBTiVjJo6lCLjXZsi7p9PEPnsq6X6wd4bP11i0rD5fzPm/0A6brrIsllenZs0lCJlU4abakR59enZKrKe3BZihbTxlyZ2zl1+g0wvgmA166/bhwDrcn/7Ddz0eWZuJvfSESug6NzZsox3Z04FIxz0mUjMwVOOVTq1CQ0AhdbBGVdjG/CgsfUX7esJl3K/7ytWHRv683praW/8iDOCqWLLhpljDY1ZpzK75QiaZoOTpLKl60auHS/97oBXrv+umU9+FL+5+NtLFgjqVLCdbmj7pY5zPCPLOHNCwXGOcLquOhi8CmCWvbcuO73XmMUPab+ug3A6/A/78Bwe0bcS2+tgHn4J5pyS2WbOck0F51Vq3LcjhLvZ67p1ABbaL2H67bg78BfjKi/jr3+T/ABV3ilLmNXTI2SpvxWBtt6/Z//D0z/FXaGbSBgylzlsEGp+5//xrd4/ae4d8DUUjlslfIYS3t06HZpvfQtvv0N7AHWqtjP2pW08QD/FLy//da38vo8PNlKHf5y37Dxdfe/oj4kVIgFq3koLReSR76W/bx//n9k8jonZxzWTANVwEniDsg87sOSd/z7//PvMp3jQiptGVWFX2caezzAXwfgtzYUvbr0iozs32c3Uge7varH+CNE6cvEYmzbPZ9hMaYDdjK4V2iecf6EcEbdUDVUARda2KzO/JtCuDbNQB/iTeL0EG1JSO1jbXS+nLxtPMDPw1fh5+EPrgSEKE/8Gry5A73ui87AmxwdatyMEBCPNOCSKUeRZ2P6Myb5MRvgCHmA9ywsMifU+AYXcB6Xa5GibUC5TSyerxyh0j6QgLVpdyhfArRTTLqQjwe4HOD9s92D4Ap54odXAPBWLAwB02igG5Kkc+piN4lvODIFGAZgT+EO4Si1s7fjSR7vcQETUkRm9O+MXyo9OYhfe4xt9STQ2pcZRLayCV90b4D3jR0DYAfyxJ+eywg2IL7NTMXna7S/RpQ63JhWEM8U41ZyQGjwsVS0QBrEKLu8xwZsbi4wLcCT+OGidPIOCe1PiSc9Qt+go+vYqB7cG+B9d8cAD+WJPz0Am2gxXgU9IneOqDpAAXOsOltVuMzpdakJXrdPCzXiNVUpCeOos5cxnpQT39G+XVLhs1osQVvJKPZyNq8HDwd4d7pNDuWJPxVX7MSzqUDU6gfadKiNlUFTzLeFHHDlzO4kpa7aiKhBPGKwOqxsBAmYkOIpipyXcQSPlRTf+Tii0U3EJGaZsDER2qoB3h2hu0qe+NNwUooYU8y5mILbJe6OuX+2FTKy7bieTDAemaQyQ0CPthljSWO+xmFDIYiESjM5xKd6Ik5lvLq5GrQ3aCMLvmCA9wowLuWJb9xF59hVVP6O0CrBi3ZjZSNOvRy+I6klNVRJYRBaEzdN+imiUXQ8iVF8fsp+W4JXw7WISW7fDh7lptWkCwZ4d7QTXyBPfJMYK7SijjFppGnlIVJBJBYj7eUwtiP1IBXGI1XCsjNpbjENVpSAJ2hq2LTywEly3hUYazt31J8w2+aiLx3g3fohXixPfOMYm6zCGs9LVo9MoW3MCJE7R5u/WsOIjrqBoHUO0bJE9vxBpbhsd3+Nb4/vtPCZ4oZYCitNeYuC/8UDvDvy0qvkiW/cgqNqRyzqSZa/s0mqNGjtKOoTm14zZpUauiQgVfqtQiZjq7Q27JNaSK5ExRcrGCXO1FJYh6jR6CFqK7bZdQZ4t8g0rSlPfP1RdBtqaa9diqtzJkQ9duSryi2brQXbxDwbRUpFMBHjRj8+Nt7GDKgvph9okW7LX47gu0SpGnnFQ1S1lYldOsC7hYteR574ZuKs7Ei1lBsfdz7IZoxzzCVmmVqaSySzQbBVAWDek+N4jh9E/4VqZrJjPwiv9BC1XcvOWgO8275CVyBPvAtTVlDJfZkaZGU7NpqBogAj/xEHkeAuJihWYCxGN6e8+9JtSegFXF1TrhhLGP1fak3pebgPz192/8gB4d/6WT7+GdYnpH7hH/DJzzFiYPn/vjW0SgNpTNuPIZoAEZv8tlGw4+RLxy+ZjnKa5NdFoC7UaW0aduoYse6+bXg1DLg6UfRYwmhGEjqPvF75U558SANrElK/+MdpXvmqBpaXOa/MTZaa1DOcSiLaw9j0NNNst3c+63c7EKTpkvKHzu6bPbP0RkuHAVcbRY8ijP46MIbQeeT1mhA+5PV/inyDdQipf8LTvMXbwvoDy7IruDNVZKTfV4CTSRUYdybUCnGU7KUTDxLgCknqUm5aAW6/1p6eMsOYsphLzsHrE0Y/P5bQedx1F/4yPHnMB3/IOoTU9+BL8PhtjuFKBpZXnYNJxTuv+2XqolKR2UQgHhS5novuxVySJhBNRF3SoKK1XZbbXjVwWNyOjlqWJjrWJIy+P5bQedyldNScP+HZ61xKSK3jyrz+NiHG1hcOLL/+P+PDF2gOkekKGiNWKgJ+8Z/x8Iv4DdQHzcpZyF4v19I27w9/yPGDFQvmEpKtqv/TLiWMfn4sofMm9eAH8Ao0zzh7h4sJqYtxZd5/D7hkYPneDzl5idlzNHcIB0jVlQ+8ULzw/nc5/ojzl2juE0apD7LRnJxe04dMz2iOCFNtGFpTuXA5AhcTRo8mdN4kz30nVjEC4YTZQy4gpC7GlTlrePKhGsKKgeXpCYeO0MAd/GH7yKQUlXPLOasOH3FnSphjHuDvEu4gB8g66oNbtr6eMbFIA4fIBJkgayoXriw2XEDQPJrQeROAlY6aeYOcMf+IVYTU3XFlZufMHinGywaW3YLpObVBAsbjF4QJMsVUSayjk4voPsHJOQfPWDhCgDnmDl6XIRerD24HsGtw86RMHOLvVSHrKBdeVE26gKB5NKHzaIwLOmrqBWJYZDLhASG16c0Tn+CdRhWDgWXnqRZUTnPIHuMJTfLVpkoYy5CzylHVTGZMTwkGAo2HBlkQplrJX6U+uF1wZz2uwS1SQ12IqWaPuO4baZaEFBdukksJmkcTOm+YJSvoqPFzxFA/YUhIvWxcmSdPWTWwbAKVp6rxTtPFUZfKIwpzm4IoMfaYQLWgmlG5FME2gdBgm+J7J+rtS/XBbaVLsR7bpPQnpMFlo2doWaVceHk9+MkyguZNCJ1He+kuHTWyQAzNM5YSUg/GlTk9ZunAsg1qELVOhUSAK0LABIJHLKbqaEbHZLL1VA3VgqoiOKXYiS+HRyaEKgsfIqX64HYWbLRXy/qWoylIV9gudL1OWBNgBgTNmxA6b4txDT4gi3Ri7xFSLxtXpmmYnzAcWDZgY8d503LFogz5sbonDgkKcxGsWsE1OI+rcQtlgBBCSOKD1mtqYpIU8cTvBmAT0yZe+zUzeY92fYjTtGipXLhuR0ePoHk0ofNWBX+lo8Z7pAZDk8mEw5L7dVyZZoE/pTewbI6SNbiAL5xeygW4xPRuLCGbhcO4RIeTMFYHEJkYyEO9HmJfXMDEj/LaH781wHHZEtqSQ/69UnGpzH7LKIAZEDSPJnTesJTUa+rwTepI9dLJEawYV+ZkRn9g+QirD8vF8Mq0jFQ29js6kCS3E1+jZIhgPNanHdHFqFvPJLHqFwQqbIA4jhDxcNsOCCQLDomaL/dr5lyJaJU6FxPFjO3JOh3kVMcROo8u+C+jo05GjMF3P3/FuDLn5x2M04xXULPwaS6hBYki+MrMdZJSgPHlcB7nCR5bJ9Kr5ACUn9jk5kivdd8tk95SOGrtqu9lr2IhK65ZtEl7ZKrp7DrqwZfRUSN1el7+7NJxZbywOC8neNKTch5vsTEMNsoCCqHBCqIPRjIPkm0BjvFODGtto99rCl+d3wmHkW0FPdpZtC7MMcVtGFQjJLX5bdQ2+x9ypdc313uj8xlsrfuLgWXz1cRhZvJYX0iNVBRcVcmCXZs6aEf3RQF2WI/TcCbKmGU3IOoDJGDdDub0+hYckt6PlGu2BcxmhbTdj/klhccLGJMcqRjMJP1jW2ETqLSWJ/29MAoORluJ+6LPffBZbi5gqi5h6catQpmOT7/OFf5UorRpLzCqcMltBLhwd1are3kztrSzXO0LUbXRQcdLh/RdSZ+swRm819REDrtqzC4es6Gw4JCKlSnjYVpo0xeq33PrADbFLL3RuCmObVmPN+24kfa+AojDuM4umKe2QwCf6EN906HwjujaitDs5o0s1y+k3lgbT2W2i7FJdnwbLXhJUBq/9liTctSmFC/0OqUinb0QddTWamtjbHRFuWJJ6NpqZ8vO3fZJ37Db+2GkaPYLGHs7XTTdiFQJ68SkVJFVmY6McR5UycflNCsccHFaV9FNbR4NttLxw4pQ7wJd066Z0ohVbzihaxHVExd/ay04oxUKWt+AsdiQ9OUyZ2krzN19IZIwafSTFgIBnMV73ADj7V/K8u1MaY2sJp2HWm0f41tqwajEvdHWOJs510MaAqN4aoSiPCXtN2KSi46dUxHdaMquar82O1x5jqhDGvqmoE9LfxcY3zqA7/x3HA67r9ZG4O6Cuxu12/+TP+eLP+I+HErqDDCDVmBDO4larujNe7x8om2rMug0MX0rL1+IWwdwfR+p1TNTyNmVJ85ljWzbWuGv8/C7HD/izjkHNZNYlhZcUOKVzKFUxsxxN/kax+8zPWPSFKw80rJr9Tizyj3o1gEsdwgWGoxPezDdZ1TSENE1dLdNvuKL+I84nxKesZgxXVA1VA1OcL49dFlpFV5yJMhzyCmNQ+a4BqusPJ2bB+xo8V9u3x48VVIEPS/mc3DvAbXyoYr6VgDfh5do5hhHOCXMqBZUPhWYbWZECwVJljLgMUWOCB4MUuMaxGNUQDVI50TQ+S3kFgIcu2qKkNSHVoM0SHsgoZxP2d5HH8B9woOk4x5bPkKtAHucZsdykjxuIpbUrSILgrT8G7G5oCW+K0990o7E3T6AdW4TilH5kDjds+H64kS0mz24grtwlzDHBJqI8YJQExotPvoC4JBq0lEjjQkyBZ8oH2LnRsQ4Hu1QsgDTJbO8fQDnllitkxuVskoiKbRF9VwzMDvxHAdwB7mD9yCplhHFEyUWHx3WtwCbSMMTCUCcEmSGlg4gTXkHpZXWQ7kpznK3EmCHiXInqndkQjunG5kxTKEeGye7jWz9cyMR2mGiFQ15ENRBTbCp+Gh86vAyASdgmJq2MC6hoADQ3GosP0QHbnMHjyBQvQqfhy/BUbeHd5WY/G/9LK/8Ka8Jd7UFeNWEZvzPb458Dn8DGLOe3/wGL/4xP+HXlRt+M1PE2iLhR8t+lfgxsuh7AfO2AOf+owWhSZRYQbd622hbpKWKuU+XuvNzP0OseRDa+mObgDHJUSc/pKx31QdKffQ5OIJpt8GWjlgTwMc/w5MPCR/yl1XC2a2Yut54SvOtMev55Of45BOat9aWG27p2ZVORRvnEk1hqWMVUmqa7S2YtvlIpspuF1pt0syuZS2NV14mUidCSfzQzg+KqvIYCMljIx2YK2AO34fX4GWdu5xcIAb8MzTw+j/lyWM+Dw/gjs4GD6ehNgA48kX/AI7XXM/XAN4WHr+9ntywqoCakCqmKP0rmQrJJEErG2Upg1JObr01lKQy4jskWalKYfJ/EDLMpjNSHFEUAde2fltaDgmrNaWQ9+AAb8I5vKjz3L1n1LriB/BXkG/wwR9y/oRX4LlioHA4LzP2inzRx/DWmutRweFjeP3tNeSGlaE1Fde0OS11yOpmbIp2u/jF1n2RRZviJM0yBT3IZl2HWImKjQOxIyeU325b/qWyU9Moj1o07tS0G7qJDoGHg5m8yeCxMoEH8GU45tnrNM84D2l297DQ9t1YP7jki/7RmutRweEA77/HWXOh3HCxkRgldDQkAjNTMl2Iloc1qN5JfJeeTlyTRzxURTdn1Ixv2uKjs12AbdEWlBtmVdk2k7FFwj07PCZ9XAwW3dG+8xKzNFr4EnwBZpy9Qzhh3jDXebBpYcpuo4fQ44u+fD1dweEnHzI7v0xuuOALRUV8rXpFyfSTQYkhd7IHm07jpyhlkCmI0ALYqPTpUxXS+z4jgDj1Pflvmz5ecuItpIBxyTHpSTGWd9g1ApfD/bvwUhL4nT1EzqgX7cxfCcNmb3mPL/qi9SwTHJ49oj5ZLjccbTG3pRmlYi6JCG0mQrAt1+i2UXTZ2dv9IlQpN5naMYtviaXlTrFpoMsl3bOAFEa8sqPj2WCMrx3Yjx99qFwO59Aw/wgx+HlqNz8oZvA3exRDvuhL1jMQHPaOJ0+XyA3fp1OfM3qObEVdhxjvynxNMXQV4+GJyvOEFqeQBaIbbO7i63rpxCltdZShPFxkjM2FPVkn3TG+Rp9pO3l2RzFegGfxGDHIAh8SteR0C4HopXzRF61nheDw6TFN05Ebvq8M3VKKpGjjO6r7nhudTEGMtYM92HTDaR1FDMXJ1eThsbKfywyoWwrzRSXkc51flG3vIid62h29bIcFbTGhfV+faaB+ohj7dPN0C2e2lC96+XouFByen9AsunLDJZ9z7NExiUc0OuoYW6UZkIyx2YUR2z6/TiRjyKMx5GbbjLHvHuf7YmtKghf34LJfx63Yg8vrvN2zC7lY0x0tvKezo4HmGYDU+Gab6dFL+KI761lDcNifcjLrrr9LWZJctG1FfU1uwhoQE22ObjdfkSzY63CbU5hzs21WeTddH2BaL11Gi7lVdlxP1nkxqhnKhVY6knS3EPgVGg1JpN5cP/hivujOelhXcPj8HC/LyI6MkteVjlolBdMmF3a3DbsuAYhL44dxzthWSN065xxUd55Lmf0wRbOYOqH09/o9WbO2VtFdaMb4qBgtFJoT1SqoN8wPXMoXLb3p1PUEhxfnnLzGzBI0Ku7FxrKsNJj/8bn/H8fPIVOd3rfrklUB/DOeO+nkghgSPzrlPxluCMtOnDL4Yml6dK1r3vsgMxgtPOrMFUZbEUbTdIzii5beq72G4PD0DKnwjmBULUVFmy8t+k7fZ3pKc0Q4UC6jpVRqS9Umv8bxw35flZVOU1X7qkjnhZlsMbk24qQ6Hz7QcuL6sDC0iHHki96Uh2UdvmgZnjIvExy2TeJdMDZNSbdZyAHe/Yd1xsQhHiKzjh7GxQ4yqMPaywPkjMamvqrYpmO7Knad+ZQC5msCuAPWUoxrxVhrGv7a+KLXFhyONdTMrZ7ke23qiO40ZJUyzgYyX5XyL0mV7NiUzEs9mjtbMN0dERqwyAJpigad0B3/zRV7s4PIfXSu6YV/MK7+OrYe/JvfGMn/PHJe2fyUdtnFrKRNpXV0Y2559aWPt/G4BlvjTMtXlVIWCnNyA3YQBDmYIodFz41PvXPSa6rq9lWZawZ4dP115HXV/M/tnFkkrBOdzg6aP4pID+MZnTJ1SuuB6iZlyiox4HT2y3YBtkUKWooacBQUDTpjwaDt5poBHl1/HXltwP887lKKXxNUEyPqpGTyA699UqY/lt9yGdlUKra0fFWS+36iylVWrAyd7Uw0CZM0z7xKTOduznLIjG2Hx8cDPLb+OvK6Bv7n1DYci4CxUuRxrjBc0bb4vD3rN5Zz36ntLb83eVJIB8LiIzCmn6SMPjlX+yNlTjvIGjs+QzHPf60Aj62/jrzG8j9vYMFtm1VoRWCJdmw7z9N0t+c8cxZpPeK4aTRicS25QhrVtUp7U578chk4q04Wx4YoQSjFryUlpcQ1AbxZ/XVMknIU//OGl7Q6z9Zpxi0+3yFhSkjUDpnCIUhLWVX23KQ+L9vKvFKI0ZWFQgkDLvBoylrHNVmaw10zwCPrr5tlodfnf94EWnQ0lFRWy8pW9LbkLsyUVDc2NSTHGDtnD1uMtchjbCeb1mpxFP0YbcClhzdLu6lfO8Bj6q+bdT2sz/+8SZCV7VIxtt0DUn9L7r4cLYWDSXnseEpOGFuty0qbOVlS7NNzs5FOGJUqQpl2Q64/yBpZf90sxbE+//PGdZ02HSipCbmD6NItmQ4Lk5XUrGpDMkhbMm2ZVheNYV+VbUWTcv99+2NyX1VoafSuC+AN6q9bFIMv5X/eagNWXZxEa9JjlMwNWb00akGUkSoepp1/yRuuqHGbUn3UdBSTxBU6SEVklzWRUkPndVvw2PrrpjvxOvzPmwHc0hpmq82npi7GRro8dXp0KXnUQmhZbRL7NEVp1uuZmO45vuzKsHrktS3GLWXODVjw+vXXLYx4Hf7njRPd0i3aoAGX6W29GnaV5YdyDj9TFkakje7GHYzDoObfddHtOSpoi2SmzJHrB3hM/XUDDEbxP2/oosszcRlehWXUvzHv4TpBVktHqwenFo8uLVmy4DKLa5d3RtLrmrM3aMFr1183E4sewf+85VWeg1c5ag276NZrM9IJVNcmLEvDNaV62aq+14IAOGFsBt973Ra8Xv11YzXwNfmft7Jg2oS+XOyoC8/cwzi66Dhmgk38kUmP1CUiYWOX1bpD2zWXt2FCp7uq8703APAa9dfNdscR/M/bZLIyouVxqJfeWvG9Je+JVckHQ9+CI9NWxz+blX/KYYvO5n2tAP/vrlZ7+8/h9y+9qeB/Hnt967e5mevX10rALDWK//FaAT5MXdBXdP0C/BAes792c40H+AiAp1e1oH8HgH94g/Lttx1gp63op1eyoM/Bvw5/G/7xFbqJPcCXnmBiwDPb/YKO4FX4OjyCb289db2/Noqicw4i7N6TVtoz8tNwDH+8x/i6Ae7lmaQVENzJFb3Di/BFeAwz+Is9SjeQySpPqbLFlNmyz47z5a/AF+AYFvDmHqibSXTEzoT4Gc3OALaqAP4KPFUJ6n+1x+rGAM6Zd78bgJ0a8QN4GU614vxwD9e1Amy6CcskNrczLx1JIp6HE5UZD/DBHrFr2oNlgG4Odv226BodoryjGJ9q2T/AR3vQrsOCS0ctXZi3ruLlhpFDJYl4HmYtjQCP9rhdn4suySLKDt6wLcC52h8xPlcjju1fn+yhuw4LZsAGUuo2b4Fx2UwQu77uqRHXGtg92aN3tQCbFexc0uk93vhTXbct6y7MulLycoUljx8ngDMBg1tvJjAazpEmOtxlzclvj1vQf1Tx7QlPDpGpqgtdSKz/d9/hdy1vTfFHSmC9dGDZbLiezz7Ac801HirGZsWjydfZyPvHXL/Y8Mjzg8BxTZiuwKz4Eb8sBE9zznszmjvFwHKPIWUnwhqfVRcd4Ck0K6ate48m1oOfrX3/yOtvAsJ8zsPAM89sjnddmuLuDPjX9Bu/L7x7xpMzFk6nWtyQfPg278Gn4Aekz2ZgOmU9eJ37R14vwE/BL8G3aibCiWMWWDQ0ZtkPMnlcGeAu/Ag+8ZyecU5BPuy2ILD+sQqyZhAKmn7XZd+jIMTN9eBL7x95xVLSX4On8EcNlXDqmBlqS13jG4LpmGbkF/0CnOi3H8ETOIXzmnmtb0a16Tzxj1sUvQCBiXZGDtmB3KAefPH94xcUa/6vwRn80GOFyjEXFpba4A1e8KQfFF+259tx5XS4egYn8fQsLGrqGrHbztr+uByTahWuL1NUGbDpsnrwBfePPwHHIf9X4RnM4Z2ABWdxUBlqQ2PwhuDxoS0vvqB1JzS0P4h2nA/QgTrsJFn+Y3AOjs9JFC07CGWX1oNX3T/yHOzgDjwPn1PM3g9Jk9lZrMEpxnlPmBbjyo2+KFXRU52TJM/2ALcY57RUzjObbjqxVw++4P6RAOf58pcVsw9Daje3htriYrpDOonre3CudSe6bfkTEgHBHuDiyu5MCsc7BHhYDx7ePxLjqigXZsw+ijMHFhuwBmtoTPtOxOrTvYJDnC75dnUbhfwu/ZW9AgYd+peL68HD+0emKquiXHhWjJg/UrkJYzuiaL3E9aI/ytrCvAd4GcYZMCkSQxfUg3v3j8c4e90j5ZTPdvmJJGHnOCI2nHS8081X013pHuBlV1gB2MX1YNmWLHqqGN/TWmG0y6clJWthxNUl48q38Bi8vtMKyzzpFdSDhxZ5WBA5ZLt8Jv3895DduBlgbPYAj8C4B8hO68FDkoh5lydC4FiWvBOVqjYdqjiLv92t8yPDjrDaiHdUD15qkSURSGmXJwOMSxWAXYwr3zaAufJ66l+94vv3AO+vPcD7aw/w/toDvL/2AO+vPcD7aw/wHuD9tQd4f+0B3l97gPfXHuD9tQd4f+0B3l97gG8LwP8G/AL8O/A5OCq0Ys2KIdv/qOIXG/4mvFAMF16gZD+2Xvu/B8as5+8bfllWyg0zaNO5bfXj6vfhhwD86/Aq3NfRS9t9WPnhfnvCIw/CT8GLcFTMnpntdF/z9V+PWc/vWoIH+FL3Znv57PitcdGP4R/C34avw5fgRVUInCwbsn1yyA8C8zm/BH8NXoXnVE6wVPjdeCI38kX/3+Ct9dbz1pTmHFRu+Hm4O9Ch3clr99negxfwj+ER/DR8EV6B5+DuQOnTgUw5rnkY+FbNU3gNXh0o/JYTuWOvyBf9FvzX663HH/HejO8LwAl8Hl5YLTd8q7sqA3wbjuExfAFegQdwfyDoSkWY8swzEf6o4Qyewefg+cHNbqMQruSL/u/WWc+E5g7vnnEXgDmcDeSGb/F4cBcCgT+GGRzDU3hZYburAt9TEtHgbM6JoxJ+6NMzzTcf6c2bycv2+KK/f+l6LBzw5IwfqZJhA3M472pWT/ajKxnjv4AFnMEpnBTPND6s2J7qHbPAqcMK74T2mZ4VGB9uJA465It+/eL1WKhYOD7xHOkr1ajK7d0C4+ke4Hy9qXZwpgLr+Znm/uNFw8xQOSy8H9IzjUrd9+BIfenYaylf9FsXr8fBAadnPIEDna8IBcwlxnuA0/Wv6GAWPd7dDIKjMdSWueAsBj4M7TOd06qBbwDwKr7oleuxMOEcTuEZTHWvDYUO7aHqAe0Bbq+HEFRzOz7WVoTDQkVds7A4sIIxfCQdCefFRoIOF/NFL1mPab/nvOakSL/Q1aFtNpUb/nFOVX6gzyg/1nISyDfUhsokIzaBR9Kxm80s5mK+6P56il1jXic7nhQxsxSm3OwBHl4fFdLqi64nDQZvqE2at7cWAp/IVvrN6/BFL1mPhYrGMBfOi4PyjuSGf6wBBh7p/FZTghCNWGgMzlBbrNJoPJX2mW5mwZfyRffXo7OFi5pZcS4qZUrlViptrXtw+GQoyhDPS+ANjcGBNRiLCQDPZPMHuiZfdFpPSTcQwwKYdRNqpkjm7AFeeT0pJzALgo7g8YYGrMHS0iocy+YTm2vyRUvvpXCIpQ5pe666TJrcygnScUf/p0NDs/iAI/nqDHC8TmQT8x3NF91l76oDdQGwu61Z6E0ABv7uO1dbf/37Zlv+Zw/Pbh8f1s4Avur6657/+YYBvur6657/+YYBvur6657/+YYBvur6657/+aYBvuL6657/+VMA8FXWX/f8zzcN8BXXX/f8zzcNMFdbf93zP38KLPiK6697/uebtuArrr/u+Z9vGmCusP6653/+1FjwVdZf9/zPN7oHX339dc//fNMu+irrr3v+50+Bi+Zq6697/uebA/jz8Pudf9ht/fWv517J/XUzAP8C/BAeX9WCDrUpZ3/dEMBxgPcfbtTVvsYV5Yn32u03B3Ac4P3b8I+vxNBKeeL9dRMAlwO83959qGO78sT769oB7g3w/vGVYFzKE++v6wV4OMD7F7tckFkmT7y/rhHgpQO8b+4Y46XyxPvrugBeNcB7BRiX8sT767oAvmCA9woAHsoT76+rBJjLBnh3txOvkifeX1dswZcO8G6N7sXyxPvr6i340gHe3TnqVfLE++uKAb50gHcXLnrX8sR7gNdPRqwzwLu7Y/FO5Yn3AK9jXCMGeHdgxDuVJ75VAI8ljP7PAb3/RfjcZfePHBB+79dpfpH1CanN30d+mT1h9GqAxxJGM5LQeeQ1+Tb+EQJrElLb38VHQ94TRq900aMIo8cSOo+8Dp8QfsB8zpqE1NO3OI9Zrj1h9EV78PqE0WMJnUdeU6E+Jjyk/hbrEFIfeWbvId8H9oTRFwdZaxJGvziW0Hn0gqYB/wyZ0PwRlxJST+BOw9m77Amj14ii1yGM/txYQudN0qDzGe4EqfA/5GJCagsHcPaEPWH0esekSwmjRxM6b5JEcZ4ww50ilvAOFxBSx4yLW+A/YU8YvfY5+ALC6NGEzhtmyZoFZoarwBLeZxUhtY4rc3bKnjB6TKJjFUHzJoTOozF2YBpsjcyxDgzhQ1YRUse8+J4wenwmaylB82hC5w0zoRXUNXaRBmSMQUqiWSWkLsaVqc/ZE0aPTFUuJWgeTei8SfLZQeMxNaZSIzbII4aE1Nmr13P2hNHjc9E9guYNCZ032YlNwESMLcZiLQHkE4aE1BFg0yAR4z1h9AiAGRA0jyZ03tyIxWMajMPWBIsxYJCnlITU5ShiHYdZ94TR4wCmSxg9jtB5KyPGYzymAYexWEMwAPIsAdYdV6aObmNPGD0aYLoEzaMJnTc0Ygs+YDw0GAtqxBjkuP38bMRWCHn73xNGjz75P73WenCEJnhwyVe3AEe8TtKdJcYhBl97wuhNAObK66lvD/9J9NS75v17wuitAN5fe4D31x7g/bUHeH/tAd5fe4D3AO+vPcD7aw/w/toDvL/2AO+vPcD7aw/w/toDvAd4f/24ABzZ8o+KLsSLS+Pv/TqTb3P4hKlQrTGh+fbIBT0Axqznnb+L/V2mb3HkN5Mb/nEHeK7d4IcDld6lmDW/iH9E+AH1MdOw/Jlu2T1xNmY98sv4wHnD7D3uNHu54WUuOsBTbQuvBsPT/UfzNxGYzwkP8c+Yz3C+r/i6DcyRL/rZ+utRwWH5PmfvcvYEt9jLDS/bg0/B64DWKrQM8AL8FPwS9beQCe6EMKNZYJol37jBMy35otdaz0Bw2H/C2Smc7+WGB0HWDELBmOByA3r5QONo4V+DpzR/hFS4U8wMW1PXNB4TOqYz9urxRV++ntWCw/U59Ty9ebdWbrgfRS9AYKKN63ZokZVygr8GZ/gfIhZXIXPsAlNjPOLBby5c1eOLvmQ9lwkOy5x6QV1j5TYqpS05JtUgUHUp5toHGsVfn4NX4RnMCe+AxTpwmApTYxqMxwfCeJGjpXzRF61nbcHhUBPqWze9svwcHJ+S6NPscKrEjug78Dx8Lj3T8D4YxGIdxmJcwhi34fzZUr7olevZCw5vkOhoClq5zBPZAnygD/Tl9EzDh6kl3VhsHYcDEb+hCtJSvuiV69kLDm+WycrOTArHmB5/VYyP6jOVjwgGawk2zQOaTcc1L+aLXrKeveDwZqlKrw8U9Y1p66uK8dEzdYwBeUQAY7DbyYNezBfdWQ97weEtAKYQg2xJIkuveAT3dYeLGH+ShrWNwZgN0b2YL7qznr3g8JYAo5bQBziPjx7BPZ0d9RCQp4UZbnFdzBddor4XHN4KYMrB2qHFRIzzcLAHQZ5the5ovui94PCWAPefaYnxIdzRwdHCbuR4B+tbiy96Lzi8E4D7z7S0mEPd+eqO3cT53Z0Y8SV80XvB4Z0ADJi/f7X113f+7p7/+UYBvur6657/+YYBvur6657/+aYBvuL6657/+aYBvuL6657/+aYBvuL6657/+aYBvuL6657/+VMA8FXWX/f8z58OgK+y/rrnf75RgLna+uue//lTA/CV1V/3/M837aKvvv6653++UQvmauuve/7nTwfAV1N/3fM/fzr24Cuuv+75nz8FFnxl9dc9//MOr/8/glixwRuUfM4AAAAASUVORK5CYII="},i$b.prototype.getSearchTexture=function(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAAAhCAAAAABIXyLAAAAAOElEQVRIx2NgGAWjYBSMglEwEICREYRgFBZBqDCSLA2MGPUIVQETE9iNUAqLR5gIeoQKRgwXjwAAGn4AtaFeYLEAAAAASUVORK5CYII="};var j$4=[];function _$8(){var e=o$9.createFXAAStage(),t=o$9.createAmbientOcclusionStage(),i=o$9.createBloomStage(),n=o$9.createOutlineStage(),r=o$9.createFogStage(),o=o$9.createRainStage(),a=o$9.createSnowStage();this._autoExposureEnabled=!1,this._autoExposure=o$9.createAutoExposureStage(),this._tonemapping=void 0,this._tonemapper=void 0,this.tonemapper=L$b.ACES;var s=this._tonemapping;t.enabled=!1,i.enabled=!1,s.enabled=!1,r.enabled=!1,o.enabled=!1,a.enabled=!1;var l=new g$7(this),u={},c=j$4;for(c.push(e,t,i,s,n,r,a,o);c.length>0;){var h=c.pop();u[h.name]=h,h._textureCache=l;var d=h.length;if(t$$(d))for(var f=0;f<d;++f)c.push(h.get(f))}this._stages=[],this._activeStages=[],this._previousActiveStages=[],this._randomTexture=void 0;var p=this;t.uniforms.randomTexture=function(){return p._randomTexture},this._ao=t,this._bloom=i,this._fxaa=e,this._smaa=new i$b,this._outline=n,this._fog=r,this._rain=o,this._snow=a,this._lastLength=void 0,this._aoEnabled=void 0,this._bloomEnabled=void 0,this._tonemappingEnabled=void 0,this._fxaaEnabled=void 0,this._smaaEnabled=void 0,this._stagesRemoved=!1,this._textureCacheDirty=!1,this._stageNames=u,this._textureCache=l}function q$5(e){if(e._stagesRemoved){e._stagesRemoved=!1;for(var t=[],i=e._stages,n=i.length,r=0,o=0;r<n;++r){var a=i[r];a&&(a._index=o++,t.push(a))}e._stages=t}}function b$a(e){for(;t$$(e.length);)e=e.get(e.length-1);return e.outputTexture}function f$b(e,t,i,n,r){if(t$$(e.execute))e.execute(t,i,n,r);else{var o,a=e.length;if(e.inputPreviousStageTexture)for(f$b(e.get(0),t,i,n,r),o=1;o<a;++o)f$b(e.get(o),t,b$a(e.get(o-1)),n,r);else for(o=0;o<a;++o)f$b(e.get(o),t,i,n,r)}}Object.defineProperties(_$8.prototype,{ready:{get:function(){for(var e=!1,t=this._stages,i=t.length-1;i>=0;--i){var n=t[i];e=e||n.ready&&n.enabled}var r=this._fxaa,o=this._ao,a=this._bloom,s=this._tonemapping;return e=(e=(e=(e=e||r.ready&&r.enabled)||o.ready&&o.enabled)||a.ready&&a.enabled)||s.ready&&s.enabled}},fxaa:{get:function(){return this._fxaa}},smaa:{get:function(){return this._smaa}},ambientOcclusion:{get:function(){return this._ao}},bloom:{get:function(){return this._bloom}},outline:{get:function(){return this._outline}},rain:{get:function(){return this._rain}},snow:{get:function(){return this._snow}},fog:{get:function(){return this._fog}},length:{get:function(){return q$5(this),this._stages.length}},outputTexture:{get:function(){var e=this._smaa;if(e.enabled)return e.getSMAATexture();var t=this._fxaa;if(t.enabled&&t.ready)return this.getOutputTexture(t.name);for(var i=this._stages,n=i.length-1;n>=0;--n){var r=i[n];if(t$$(r)&&r.ready&&r.enabled)return this.getOutputTexture(r.name)}var o=this._tonemapping;if(o.enabled&&o.ready)return this.getOutputTexture(o.name);var a=this._bloom;if(a.enabled&&a.ready)return this.getOutputTexture(a.name);var s=this._ao;return s.enabled&&s.ready?this.getOutputTexture(s.name):void 0}},hasSelected:{get:function(){for(var e=l$Z(this._stages);e.length>0;){var t=e.pop();if(t$$(t)){if(t$$(t.selected))return!0;var i=t.length;if(t$$(i))for(var n=0;n<i;++n)e.push(t.get(n))}}return!1}},tonemapper:{get:function(){return this._tonemapper},set:function(e){if(this._tonemapper!==e){if(!L$b.validate(e))throw new t$_("tonemapper was set to an invalid value.");t$$(this._tonemapping)&&(delete this._stageNames[this._tonemapping.name],this._tonemapping.destroy());var t,i=this._autoExposureEnabled;switch(e){case L$b.REINHARD:t=o$9.createReinhardTonemappingStage(i);break;case L$b.MODIFIED_REINHARD:t=o$9.createModifiedReinhardTonemappingStage(i);break;case L$b.FILMIC:t=o$9.createFilmicTonemappingStage(i);break;default:t=o$9.createAcesTonemappingStage(i)}if(i){var n=this._autoExposure;t.uniforms.autoExposure=function(){return n.outputTexture}}this._tonemapper=e,this._tonemapping=t,t$$(this._stageNames)&&(this._stageNames[t.name]=t,t._textureCache=this._textureCache),this._textureCacheDirty=!0}}}}),_$8.prototype.add=function(e){n$1e.typeOf.object("stage",e);var t=this._stageNames,i=j$4;for(i.push(e);i.length>0;){var n=i.pop();if(t$$(t[n.name]))throw new t$_(n.name+" has already been added to the collection or does not have a unique name.");t[n.name]=n,n._textureCache=this._textureCache;var r=n.length;if(t$$(r))for(var o=0;o<r;++o)i.push(n.get(o))}var a=this._stages;return e._index=a.length,a.push(e),this._textureCacheDirty=!0,e},_$8.prototype.remove=function(e){if(!this.contains(e))return!1;var t=this._stageNames,i=j$4;for(i.push(e);i.length>0;){var n=i.pop();delete t[n.name];var r=n.length;if(t$$(r))for(var o=0;o<r;++o)i.push(n.get(o))}return this._stages[e._index]=void 0,this._stagesRemoved=!0,this._textureCacheDirty=!0,e._index=void 0,e._textureCache=void 0,e.destroy(),!0},_$8.prototype.contains=function(e){return t$$(e)&&t$$(e._index)&&e._textureCache===this._textureCache},_$8.prototype.get=function(e){q$5(this);var t=this._stages,i=t.length;return n$1e.typeOf.number.greaterThanOrEquals("stages length",i,0),n$1e.typeOf.number.greaterThanOrEquals("index",e,0),n$1e.typeOf.number.lessThan("index",e,i),t[e]},_$8.prototype.removeAll=function(){for(var e=this._stages,t=e.length,i=0;i<t;++i)this.remove(e[i]);e.length=0},_$8.prototype.getStageByName=function(e){return this._stageNames[e]},new e$1z,new e$1z,_$8.prototype.update=function(e,t,i,n){q$5(this);var r=this._activeStages,o=this._activeStages=this._previousActiveStages;this._previousActiveStages=r;var a,s,l=this._stages,u=o.length=l.length,c=0;for(a=0;a<u;++a)(s=l[a]).ready&&s.enabled&&s._isSupported(e)&&(o[c++]=s);o.length=c;var h=c!==r.length;if(!h)for(a=0;a<c;++a)if(o[a]!==r[a]){h=!0;break}var d=this._ao,f=this._bloom,p=this._autoExposure,_=this._tonemapping,m=this._fxaa,$=this._smaa,g=this._outline,y=this._fog,v=this._rain,x=this._snow;_.enabled=i;var b=d.enabled&&d._isSupported(e),S=f.enabled&&f._isSupported(e),w=_.enabled&&_._isSupported(e),C=m.enabled&&m._isSupported(e),T=$.enabled,P=y.enabled,E=v.enabled,A=x.enabled,L=g.enabled;if((h||this._textureCacheDirty||c!==this._lastLength||b!==this._aoEnabled||P!==this._fogEnabled||E!==this._rainEnabled||A!==this._snowEnabled||S!==this._bloomEnabled||w!==this._tonemappingEnabled||C!==this._fxaaEnabled||T!==this._smaaEnabled)&&(this._textureCache.updateDependencies(),this._lastLength=c,this._aoEnabled=b,this._fogEnabled=P,this._rainEnabled=E,this._snowEnabled=A,this._bloomEnabled=S,this._tonemappingEnabled=w,this._fxaaEnabled=C,this._smaaEnabled=T,this._textureCacheDirty=!1),t$$(this._randomTexture)&&!b&&(this._randomTexture.destroy(),this._randomTexture=void 0),L){var M=n._layers.getSelectedLayer();t$$(M)&&(M._selectColorType===Ja.SILHOUETTE_EDGE?g.uniforms.visibleEdgeColor=e$1z.clone(M._selectedLineColor):g.uniforms.visibleEdgeColor=e$1z.WHITE)}if(!t$$(this._randomTexture)&&b){u=196608;var I=new Uint8Array(u);for(a=0;a<u;a+=3)I[a]=Math.floor(255*Math.random());this._randomTexture=new P$S({context:e,pixelFormat:Z$_.RGB,pixelDatatype:v$Z.UNSIGNED_BYTE,source:{arrayBufferView:I,width:256,height:256},sampler:new a$Q({wrapS:j$13.REPEAT,wrapT:j$13.REPEAT,minificationFilter:tt$l.NEAREST,magnificationFilter:et$k.NEAREST})})}for(this._textureCache.update(e),m.update(e,t),$.update(e,t),d.update(e,t),f.update(e,t),_.update(e,t),g.update(e,t),y.update(e,t),v.update(e,t),x.update(e,t),this._autoExposureEnabled&&p.update(e,t),u=l.length,a=0;a<u;++a)l[a].update(e,t)},_$8.prototype.clear=function(e){this._textureCache.clear(e),this._autoExposureEnabled&&this._autoExposure.clear(e)},_$8.prototype.getOutputTexture=function(e){var t=this.getStageByName(e);if(t$$(t))return b$a(t)},_$8.prototype.execute=function(e,t,i,n){var r=this._activeStages,o=r.length,a=this._fxaa,s=this._smaa,l=this._ao,u=this._bloom,c=this._autoExposure,h=this._tonemapping,d=this._outline,f=this.compositor,p=this._fog,_=this._rain,m=this._snow,$=l.enabled&&l._isSupported(e),g=u.enabled&&u._isSupported(e),y=this._autoExposureEnabled,v=h.enabled&&h._isSupported(e),x=a.enabled&&a._isSupported(e),b=s.enabled,S=d.enabled,w=p.enabled,C=_.enabled,T=m.enabled;if(w||C||T||S||b||x||$||g||v||0!==o){var P=t;S&&d.ready&&t$$(e.uniformState.maskTexture)&&(f$b(d,e,P,i,n),P=b$a(d)),t$$(f)&&f.isEnable()&&(f.copy(e,P),f.execute(e,f.outputFbo),P=f.outputFbo.getColorTexture(0)),$&&l.ready&&(f$b(l,e,P,i,n),P=b$a(l)),g&&u.ready&&(f$b(u,e,P,i,n),P=b$a(u)),y&&c.ready&&f$b(c,e,P,i,n),v&&h.ready&&(f$b(h,e,P,i,n),P=b$a(h));var E=P;if(o>0){f$b(r[0],e,P,i,n);for(var A=1;A<o;++A)f$b(r[A],e,b$a(r[A-1]),i,n);E=b$a(r[o-1])}w&&(f$b(p,e,E,i,n),E=b$a(p)),T&&(f$b(m,e,E,i,n),E=b$a(m)),C&&(f$b(_,e,E,i,n),E=b$a(_)),x&&a.ready&&f$b(a,e,E,i,n),b&&(s.setInputTexture(E),s.execute(e))}};var D$9=new n$13;function A$b(e){this._url=e,this._rgbeLoader=new F$l,this._sourceData=void 0,this._loading=!1,this._width=1,this._height=1,this._inputTexture=void 0,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._outputTexture=void 0,this._pingPongTexture=void 0,this._ready=!1}_$8.prototype.copy=function(e,t,i){if(D$9.width=e.realDrawingBufferWidth,D$9.height=e.realDrawingBufferHeight,D$9.x=0,D$9.y=0,D$9.x+=-e._curCol/e._cols*e.realDrawingBufferWidth,D$9.y+=-(e._rows-e._curRow-1)/e._rows*e.realDrawingBufferHeight,!t$$(this._copyColorCommand)){var n,r=this;i&&e.fragmentDepth&&e.depthTexture&&!e.webglOptions.preserveDrawingBuffer?n=new a$O({sources:[n=["#extension GL_EXT_frag_depth : enable","#extension GL_OES_standard_derivatives : enable","uniform sampler2D colorTexture;","varying vec2 v_textureCoordinates;","void main()","{","float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));","gl_FragDepthEXT = logDepthOrDepth;","gl_FragColor = texture2D(colorTexture, v_textureCoordinates);","}"].join("\n")],defines:i?["LOG_DEPTH"]:[]}):n=V$c,this._copyColorCommand=e.createViewportQuadCommand(n,{uniformMap:{colorTexture:function(){return r.outputTexture}},owner:this})}var o=p$1a.fromCache({viewport:D$9,depthTest:{enabled:!e.webglOptions.preserveDrawingBuffer}});this._copyColorCommand.renderState=o,this._copyColorCommand.framebuffer=t,(e.fragmentDepth&&t$$(e.uniformState.globeDepthTexture)||!e.fragmentDepth||!e.depthTexture)&&this._copyColorCommand.execute(e)},_$8.prototype.isDestroyed=function(){return!1},_$8.prototype.destroy=function(){return this._fxaa.destroy(),this._smaa.destroy(),this._ao.destroy(),this._bloom.destroy(),this._autoExposure.destroy(),this._tonemapping.destroy(),this.removeAll(),this._textureCache=this._textureCache&&this._textureCache.destroy(),s$1e(this)},Object.defineProperties(A$b.prototype,{ready:{get:function(){return this._ready}},texture:{get:function(){return this._outputTexture}}});const Y$5="\n precision mediump float;\n precision mediump int;\n\n attribute vec4 position;\n attribute vec2 uv;\n attribute float faceIndex;\n\n varying vec3 vOutputDirection;\n\n // RH coordinate system; PMREM face-indexing convention\n vec3 getDirection( vec2 uv, float face ) {\n\n uv = 2.0 * uv - 1.0;\n\n vec3 direction = vec3( uv, 1.0 );\n\n if ( face == 0.0 ) {\n\n direction = direction.zyx; // ( 1, v, u ) pos x\n\n } else if ( face == 1.0 ) {\n\n direction = direction.xzy;\n direction.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n } else if ( face == 2.0 ) {\n\n direction.x *= -1.0; // ( -u, v, 1 ) pos z\n\n } else if ( face == 3.0 ) {\n\n direction = direction.zyx;\n direction.xz *= -1.0; // ( -1, v, -u ) neg x\n\n } else if ( face == 4.0 ) {\n\n direction = direction.xzy;\n direction.xy *= -1.0; // ( -u, -1, v ) neg y\n\n } else if ( face == 5.0 ) {\n\n direction.z *= -1.0; // ( u, v, -1 ) neg z\n\n }\n\n return direction;\n\n }\n\n void main() {\n\n vOutputDirection = getDirection( uv, faceIndex );\n gl_Position = vec4( position.xyz, 1.0 );\n\n }\n",te$3="\n precision mediump float;\n precision mediump int;\n\n varying vec3 vOutputDirection;\n\n uniform sampler2D envMap;\n\n #define RECIPROCAL_PI 0.3183098861837907\n #define RECIPROCAL_PI2 0.15915494309189535\n\n vec2 equirectUv( in vec3 dir ) {\n\n // dir is assumed to be unit length\n \n float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n \n float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n \n return vec2( u, v );\n \n }\n\n void main() {\n\n vec3 outputDirection = normalize( vOutputDirection );\n vec2 uv = equirectUv( outputDirection );\n\n gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n }\n",ie$2="\n precision mediump float;\n precision mediump int;\n #extension GL_EXT_shader_texture_lod : enable\n #define ENVMAP_TYPE_CUBE_UV\n #define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\t#define n 20\n\t#define CUBEUV_TEXEL_WIDTH 0.0013020833333333333\n\t#define CUBEUV_TEXEL_HEIGHT 0.0009765625\n\t#define CUBEUV_MAX_MIP 8.0\n\t\n varying vec3 vOutputDirection;\n\n uniform sampler2D envMap;\n uniform int samples;\n uniform float weights[ n ];\n uniform bool latitudinal;\n uniform float dTheta;\n uniform float mipInt;\n uniform vec3 poleAxis;\n\n float getFace( vec3 direction ) {\n\n\t\tvec3 absDirection = abs( direction );\n\n\t\tfloat face = - 1.0;\n\n\t\tif ( absDirection.x > absDirection.z ) {\n\n\t\t\tif ( absDirection.x > absDirection.y )\n\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t} else {\n\n\t\t\tif ( absDirection.z > absDirection.y )\n\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t}\n\n\t\treturn face;\n\n\t}\n\t\n\tvec2 getUV( vec3 direction, float face ) {\n\n\t\tvec2 uv;\n\n\t\tif ( face == 0.0 ) {\n\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x ); // pos x\n\n\t\t} else if ( face == 1.0 ) {\n\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y ); // pos y\n\n\t\t} else if ( face == 2.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z ); // pos z\n\n\t\t} else if ( face == 3.0 ) {\n\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x ); // neg x\n\n\t\t} else if ( face == 4.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y ); // neg y\n\n\t\t} else {\n\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z ); // neg z\n\n\t\t}\n\n\t\treturn 0.5 * ( uv + 1.0 );\n\n\t}\n\t\n vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\n\t\tfloat face = getFace( direction );\n\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\n\t\tfloat faceSize = exp2( mipInt );\n\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\n\t\tif ( face > 2.0 ) {\n\n\t\t\tuv.y += faceSize;\n\n\t\t\tface -= 3.0;\n\n\t\t}\n\n\t\tuv.x += face * faceSize;\n\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\n\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; // disable anisotropic filtering\n\t}\n\n vec3 getSample( float theta, vec3 axis ) {\n\n float cosTheta = cos( theta );\n // Rodrigues' axis-angle rotation\n vec3 sampleDirection = vOutputDirection * cosTheta\n + cross( axis, vOutputDirection ) * sin( theta )\n + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n return bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n }\n\n void main() {\n\n vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n if ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n }\n\n axis = normalize( axis );\n\n gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n for ( int i = 1; i < n; i++ ) {\n\n if ( i >= samples ) {\n\n break;\n\n }\n\n float theta = dTheta * float( i );\n gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n }\n \n }\n",x$9=(1+Math.sqrt(5))/2,b$9=1/x$9,E$a=20,j$3=[new a$11(1,1,1),new a$11(-1,1,1),new a$11(1,1,-1),new a$11(-1,1,-1),new a$11(0,x$9,b$9),new a$11(0,x$9,-b$9),new a$11(b$9,0,x$9),new a$11(-b$9,0,x$9),new a$11(x$9,b$9,0),new a$11(-x$9,b$9,0)],w$c=4,k$7=[.125,.215,.35,.446,.526,.582];function re$3(e,t){const i=[],n=[],r=[];let o=t;const a=t-w$c+1+k$7.length;for(let s=0;s<a;s++){const a=Math.pow(2,o);n.push(a);let l=1/a;s>t-w$c?l=k$7[s-t+w$c-1]:0===s&&(l=0),r.push(l);const u=1/(a-2),c=-u,h=1+u,d=[c,c,h,c,h,h,c,c,h,h,c,h],f=6,p=6,_=3,m=2,$=1,g=new Float32Array(_*p*f),y=new Float32Array(m*p*f),v=new Float32Array($*p*f);for(let e=0;e<f;e++){const t=e%3*2/3-1,i=e>2?0:-1,n=[t,i,0,t+2/3,i,0,t+2/3,i+1,0,t,i,0,t+2/3,i+1,0,t,i+1,0];g.set(n,_*p*e),y.set(d,m*p*e);const r=[e,e,e,e,e,e];v.set(r,$*p*e)}const x=u$Y.createVertexBuffer({context:e,typedArray:g,usage:A$13.STATIC_DRAW}),b=u$Y.createVertexBuffer({context:e,typedArray:y,usage:A$13.STATIC_DRAW}),S=u$Y.createVertexBuffer({context:e,typedArray:v,usage:A$13.STATIC_DRAW}),w=new x$18({context:e,attributes:[{index:0,vertexBuffer:x,componentsPerAttribute:3,componentDatatype:C$12.FLOAT},{index:1,vertexBuffer:b,componentsPerAttribute:2,componentDatatype:C$12.FLOAT},{index:2,vertexBuffer:S,componentsPerAttribute:1,componentDatatype:C$12.FLOAT}]});i.push(w),o>w$c&&o--}return{lodPlanes:i,sizeLods:n,sigmas:r}}function oe$3(e,t){const i=e.context,n=p$15.fromCache({context:i,vertexShaderSource:Y$5,fragmentShaderSource:te$3,attributeLocations:{position:0,uv:1,faceIndex:2}}),r=t._lodPlanes[0],o={envMap:function(){return t._inputTexture}},a=new P$S({context:i,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.HALF_FLOAT,width:t._width,height:t._height}),s=new t$w({vertexArray:r,shaderProgram:n,uniformMap:o,outputTexture:a,persists:!0,renderState:p$1a.fromCache({viewport:new n$13(0,0,3*t._cubeSize,2*t._cubeSize)}),owner:t});t._outputTexture=a,e.commandList.push(s)}A$b.prototype._halfBlur=function(e,t,i,n,r,o,a,s){const l=this._sizeLods[n]-1,u=isFinite(o)?Math.PI/(2*l):2*Math.PI/(2*E$a-1),c=o/u,h=isFinite(o)?1+Math.floor(3*c):E$a,d=[];let f=0;for(let e=0;e<E$a;++e){const t=e/c,i=Math.exp(-t*t/2);d.push(i),0===e?f+=i:e<h&&(f+=2*i)}for(let e=0;e<d.length;e++)d[e]=d[e]/f;const{_lodMax:p}=this,_=this._sizeLods[r],m=3*_*(r>p-w$c?r-p+w$c:0),$=4*(this._cubeSize-_),g=this._lodPlanes[r],y=this._blurSP,v={envMap:function(){return this.properties.envMap},samples:function(){return this.properties.samples},weights:function(){return this.properties.weights},latitudinal:function(){return this.properties.latitudinal},dTheta:function(){return this.properties.dTheta},mipInt:function(){return this.properties.mipInt},poleAxis:function(){return this.properties.poleAxis},properties:{envMap:null,samples:1,weights:new Float32Array(E$a),latitudinal:!1,dTheta:0,mipInt:0,poleAxis:new a$11(0,1,0)}};v.properties.envMap=t,v.properties.samples=h,v.properties.weights=d,v.properties.latitudinal="latitudinal"===a,s&&(v.properties.poleAxis=s),v.properties.dTheta=u,v.properties.mipInt=p-n;const x=new t$w({vertexArray:g,shaderProgram:y,uniformMap:v,outputTexture:i,persists:!0,renderState:p$1a.fromCache({viewport:new n$13(m,$,3*_,2*_)}),clear:!1,owner:this});e.commandList.push(x)},A$b.prototype._blur=function(e,t,i,n,r,o){const a=this._pingPongTexture;this._halfBlur(e,t,a,i,n,r,"latitudinal",o),this._halfBlur(e,a,t,n,n,r,"longitudinal",o)},A$b.prototype.update=function(e){const t=e.context;t$$(this._sourceData)||this._loading||(t$X.createIfNeeded(this._url).fetchArrayBuffer().then((e=>{this._sourceData=this._rgbeLoader.parse(e),this._loading=!1})).otherwise((e=>{this._loading=!1})),this._loading=!0);if(t$$(this._sourceData)){if(!t$$(this._inputTexture)){this._inputTexture=new P$S({context:t,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.HALF_FLOAT,flipY:!0,source:{arrayBufferView:this._sourceData.data,width:this._sourceData.width,height:this._sourceData.height}}),this._lodMax=Math.floor(Math.log2(this._inputTexture.width/4)),this._cubeSize=Math.pow(2,this._lodMax),this._width=3*Math.max(this._cubeSize,112),this._height=4*this._cubeSize;const{_lodMax:e}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=re$3(t,e)),this._blurSP=p$15.fromCache({context:t,vertexShaderSource:Y$5,fragmentShaderSource:ie$2,attributeLocations:{position:0,uv:1,faceIndex:2}}),this._pingPongTexture=new P$S({context:t,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.HALF_FLOAT,width:this._width,height:this._height})}if(!this._ready){oe$3(e,this);for(let t=1;t<this._lodPlanes.length;t++){const i=Math.sqrt(this._sigmas[t]*this._sigmas[t]-this._sigmas[t-1]*this._sigmas[t-1]),n=j$3[(t-1)%j$3.length];this._blur(e,this._outputTexture,t-1,t,i,n)}this._ready=!0}}};var c$a=2e4;function h$7(e){this._positionArray=e,this.type="PLANE",this.planeWidth=1,this.planeHeight=1,this._center=new a$11,this.init(),this._volBounds=void 0}h$7.prototype.createVertices=function(e){var t=C$12.createTypedArray(C$12.FLOAT,12),i=0;return t[i++]=this._topPoint1.x-e.x,t[i++]=this._topPoint1.y-e.y,t[i++]=this._topPoint1.z-e.z,t[i++]=this._topPoint2.x-e.x,t[i++]=this._topPoint2.y-e.y,t[i++]=this._topPoint2.z-e.z,t[i++]=this._bottomPoint1.x-e.x,t[i++]=this._bottomPoint1.y-e.y,t[i++]=this._bottomPoint1.z-e.z,t[i++]=this._bottomPoint2.x-e.x,t[i++]=this._bottomPoint2.y-e.y,t[i++]=this._bottomPoint2.z-e.z,t},h$7.prototype.createTexCoords=function(){var e=C$12.createTypedArray(C$12.FLOAT,8);return e[0]=0,e[1]=0,e[2]=1,e[3]=0,e[4]=0,e[5]=1,e[6]=1,e[7]=1,e},h$7.prototype.createNormals=function(){return C$12.createTypedArray(C$12.FLOAT,12)},h$7.prototype.init=function(){this._topPoint1=this._positionArray[0],this._topPoint2=this._positionArray[1];var e=i$1g.fromCartesian(this._positionArray[0]),t=i$1g.fromCartesian(this._positionArray[1]),i=i$1g.clone(e),n=i$1g.clone(t);e.height+=.5*c$a,t.height+=.5*c$a,i.height-=c$a,n.height-=c$a,this._topPoint1=i$1g.toCartesian(e),this._topPoint2=i$1g.toCartesian(t),this._bottomPoint1=i$1g.toCartesian(i),this._bottomPoint2=i$1g.toCartesian(n),this.planeWidth=a$11.distance(this._topPoint1,this._topPoint2),this.planeHeight=c$a;var r=[];r.push(this._topPoint1),r.push(this._topPoint2),r.push(this._bottomPoint1),r.push(this._bottomPoint2),this.boundingSphere=c$19.fromPoints(r);var o=r.length,a=this;r.map((function(e){a._center.x+=e.x/o,a._center.y+=e.y/o,a._center.z+=e.z/o}));var s={};c$1a.fromRotationTranslation(r$W.IDENTITY,this._center,s),this.modelMatrix=s},h$7.prototype.getVertexArray=function(e){var t=this.createVertices(this._center),i=u$Y.createVertexBuffer({context:e,typedArray:t,usage:A$13.STATIC_DRAW}),n=this.createNormals(this._center),r=u$Y.createVertexBuffer({context:e,typedArray:n,usage:A$13.STATIC_DRAW}),o=this.createTexCoords(),a=u$Y.createVertexBuffer({context:e,typedArray:o,usage:A$13.STATIC_DRAW}),s=[];if(s.push({index:0,vertexBuffer:i,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),s.push({index:1,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),s.push({index:2,vertexBuffer:a,componentsPerAttribute:2,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1}),t$$(this._volBounds)){for(var l=C$12.createTypedArray(C$12.FLOAT,12),u=[this._topPoint1,this._topPoint2,this._bottomPoint1,this._bottomPoint2],c=0;c<4;c++){var h=i$1g.fromCartesian(u[c]),d=n$1d.toDegrees(h.longitude),f=n$1d.toDegrees(h.latitude),p=h.height,_=(d-this._volBounds.left)/(this._volBounds.right-this._volBounds.left),m=(f-this._volBounds.bottom)/(this._volBounds.top-this._volBounds.bottom),$=(p-this._volBounds.minHeight)/(this._volBounds.maxHeight-this._volBounds.minHeight);l[3*c]=_,l[3*c+1]=m,l[3*c+2]=$}var g=u$Y.createVertexBuffer({context:e,typedArray:l,usage:A$13.STATIC_DRAW});s.push({index:3,vertexBuffer:g,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1})}var y=C$12.createTypedArray(C$12.UNSIGNED_SHORT,6);return y[0]=0,y[1]=1,y[2]=3,y[3]=0,y[4]=3,y[5]=2,new x$18({context:e,attributes:s,indexBuffer:u$Y.createIndexBuffer({context:e,typedArray:y,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT})})},h$7.prototype.destroy=function(){return s$1e(this)};var _0x3d62b7=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x4b687b=_0x3d62b7(void 0,(function(){return _0x4b687b.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b687b).search("(((.+)+)+)+$")}));_0x4b687b();var k$6="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform sampler2D uClampIDTexture;\nuniform sampler2D uClampColorTexture;\nuniform sampler2D uModelTexture;\nuniform vec4 uModelTextureRect;\nuniform vec4 uModelColor;\nuniform vec3 uHasModelTextureAndPixelLength;\nuniform vec3 uModelTextureTiling;\nuniform vec4 uModelIDColor;\nuniform vec4 uProfilePickColor;\nuniform bool uPicking;\nuniform vec4 uHighLightColor;\nuniform float uUseOriModelTex;\nuniform float uClippingType;\nvarying vec2 v_texCoord;\nvarying float v_face;\n#ifdef Volume2\nvarying vec3 vecRotioCoord;\n#endif\nvoid main()\n{\nvec2 texCoord = vec2(gl_FragCoord.x / czm_viewport.z, gl_FragCoord.y / czm_viewport.w);\nvec4 idColor = texture2D(uClampIDTexture, texCoord) * 255.0;\nif((gl_FrontFacing && uClippingType < 1.5) || idColor.r != uModelIDColor.r || idColor.g != uModelIDColor.g || idColor.b != uModelIDColor.b)\n{\n discard;\n}\nif(uPicking){\n gl_FragColor = uProfilePickColor;\n return;\n}\nvec4 color = texture2D(uClampColorTexture, texCoord);\ntexCoord = mod(v_texCoord * uModelTextureTiling.xy, vec2(1.0));\nif(v_face > -0.1 && v_face < 0.1)\n{\n texCoord = mod(v_texCoord * uModelTextureTiling.xz, vec2(1.0));\n}\n#ifdef GEOBOX\n if(v_face > -0.1 && v_face < 0.1)\n {\n texCoord = mod(v_texCoord * uModelTextureTiling.xy, vec2(1.0));\n }\n else if(v_face > 0.5)\n {\n texCoord = mod(v_texCoord * vec2(uModelTextureTiling.zy), vec2(1.0));\n }\n else if(v_face < -0.5)\n {\n texCoord = mod(v_texCoord * vec2(uModelTextureTiling.zx), vec2(1.0));\n }\n#endif\nvec2 pixelSize = uHasModelTextureAndPixelLength.yz;\ntexCoord = clamp(texCoord, pixelSize, 1.0 - pixelSize);\nvec2 modelTexCoord = uUseOriModelTex > 0.5 ? texCoord : mix(uModelTextureRect.xy, uModelTextureRect.zw, texCoord);\nvec4 texColor = texture2D(uModelTexture, modelTexCoord);\ngl_FragColor = uUseOriModelTex > 0.5 ? texColor * color * uHighLightColor : mix(uModelColor, texColor, uHasModelTextureAndPixelLength.x) * uHighLightColor * color;\n#ifdef Volume\n#ifdef Volume2\n if((vecRotioCoord.x < 1.0 && vecRotioCoord.x >0.0) && (vecRotioCoord.y < 1.0 && vecRotioCoord.y >0.0) && (vecRotioCoord.z < 1.0 && vecRotioCoord.z >0.0))\n {\n gl_FragColor = czm_getVolumeValue(vecRotioCoord);\n }\n#else\n float wValue = 0.0;\n gl_FragColor = czm_getHypsometricColor(gl_FragColor, wValue);\n#endif\n#endif\n}";function f$a(e,t,i,n){this._scene=e._scene,this._attributeLocations={aPosition:0,aNormal:1,aTexCoord:2},this._geometry=n,this._drawCommandInClampTexture=null,this._drawCommandInScene=null,this._drawCommandNormal=null,this._drawCommandInScenePreModel={},this._clampFramebuffer=null,this._name="solidModelsProfile_"+e._name+"_"+t.toString(),this._textureAtlas=e._textureAtlas,this._modelInfo=i,this._picking=!1,this._owner=e,this._clippingType=L$o.KeepInside,this._volume=void 0,this._width=1,this._height=1}f$a.prototype.createCommand=function(e){var t=c$1a.clone(this._geometry.modelMatrix),i=this._geometry.boundingSphere,n=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:t,pass:we$l.OPAQUE,cull:!1,boundingVolume:i});n.vertexArray=this._geometry.getVertexArray(e);var r=new a$O({name:"ClipPlaneVp",sources:[V$j]}),o=new a$O({name:"SolidProfileFp",sources:[k$6]});this._geometry.type==b$K.GEOCYLINDER?(r.defines.push("GEOCYLINDER"),o.defines.push("GEOCYLINDER")):this._geometry.type==b$K.GEOBOX&&(r.defines.push("GEOBOX"),o.defines.push("GEOBOX")),t$$(this._volume)&&(r.defines.push("Volume"),o.defines.push("Volume"),this._volume.hypsometricSetting.filterMode===J$O.FilterMode.NEAREST&&(r.defines.push("Volume2"),o.defines.push("Volume2"))),n.shaderProgram=p$15.fromCache({context:e,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:this._attributeLocations}),n.renderState=p$1a.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:{enabled:!0},blending:Ee$s.ALPHA_BLEND});for(var a in this._drawCommandInScene=n,this._modelInfo)this.copyCommandForSingleModel(a,this._modelInfo[a],this._drawCommandInScene,e);this.createCommandInClampTexture(n,e),this.createNormalCommand(this._drawCommandInClampTexture,e)};var y$b=new a$11,_$7=new a$10,a$a=new a$11,C$6=new a$11,l$7=new e$1z;function L$a(e){t$$(e)&&(e.vertexArray=e.vertexArray&&!e.vertexArray.isDestroyed()&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),e.renderState=void 0,e.uniformMap=void 0)}function r$8(){t$_.throwInstantiationError()}f$a.prototype.copyCommandForSingleModel=function(e,t,i,n){var r=s$1d.shallowClone(i),o=this;r.uniformMap={uClampIDTexture:function(){var e=o._clampFramebuffer;return t$$(e)?e.renderTexture._fb.getColorTexture(0):n.defaultTexture},uClampColorTexture:function(){var e=o._clampFramebuffer;return t$$(e)&&2===e.renderTexture._fb._colorTextures.length?e.renderTexture._fb.getColorTexture(1):n.defaultTexture},uModelColor:function(){return t.color},uHasModelTextureAndPixelLength:function(){if(C$6.x=t.textureAtlasID>=0?1:0,t$$(o._textureAtlas)){var e=o._textureAtlas.texture.width,i=o._textureAtlas.texture.height,n=o._textureAtlas.textureCoordinates[t.textureAtlasID];if(t$$(n)){var r=n.width*e,a=n.height*i;C$6.y=1/r,C$6.z=1/a}}return C$6},uUseOriModelTex:function(){return!t$$(o._textureAtlas)&&t$$(t.texture)},uModelTexture:function(){return t$$(o._textureAtlas)?o._textureAtlas.texture:t$$(t.texture)?t.texture:n.defaultTexture},uModelTextureRect:function(){if(t$$(o._textureAtlas)){var e=o._textureAtlas.textureCoordinates[t.textureAtlasID];t$$(e)&&(_$7.x=e.x,_$7.y=e.y,_$7.z=e.x+e.width,_$7.w=e.y+e.height)}return _$7},uModelTextureTiling:function(){return"PLANE"==o._geometry.type?(a$a.x=o._geometry.planeWidth/t.textureTilingU,a$a.y=o._geometry.planeHeight/t.textureTilingV):o._geometry.type==b$K.GEOCYLINDER?(a$a.x=2*Math.PI*o._geometry.geoTopRadius/t.textureTilingU,a$a.y=o._geometry.geoHeight/t.textureTilingV):o._geometry.type==b$K.GEOREGION3D?(a$a.x=o._geometry.width/t.textureTilingU,a$a.y=o._geometry.height/t.textureTilingV,a$a.z=Math.abs(o._geometry._extrudedHeight)/t.textureTilingV):o._geometry.type==b$K.GEOBOX&&(a$a.x=o._geometry.geoWidth/t.textureTilingU,a$a.y=o._geometry.geoHeight/t.textureTilingV,a$a.z=o._geometry.geoLength/t.textureTilingU),a$a},uClippingType:function(){return o._clippingType},uGeometryHeight:function(){return o._geometry.type==b$K.GEOCYLINDER?o._geometry.geoHeight:1},uModelIDColor:function(){return y$b.x=t.pickColor.x,y$b.y=t.pickColor.y,y$b.z=t.pickColor.z,y$b},uProfilePickColor:function(){return t.profilePickId.color},uPicking:function(){return o._picking},uHighLightColor:function(){var e=o._owner._selectedProfileIDs;if(0==e.length)l$7.red=1,l$7.green=1,l$7.blue=1;else{var i=!1;e.map((function(e){t.id==e&&(i=!0)})),i?(l$7.red=.7,l$7.green=.7,l$7.blue=1):(l$7.red=1,l$7.green=1,l$7.blue=1)}return l$7},uVolumeTexture:function(){return o._volume._volTexture},width:function(){return o._volume._volImageBuffer.nWidth},height:function(){return o._volume._volImageBuffer.nHeight},depth:function(){return o._volume._volImageBuffer.nDepth},sideBlockCount:function(){return o._volume._volImageBuffer.nSideBlockCount},blockLength:function(){return o._volume._volImageBuffer.nBlockLength},texLength:function(){return o._volume._volImageBuffer.nLength},uFilterMode:function(){var e=0;return t$$(o._volume.hypsometricSetting)&&o._volume.hypsometricSetting.filterMode===J$O.FilterMode.NEAREST&&(e=1),e},uMixColorType:function(){return 0},uDataFloor:function(){return t$$(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.ColorTableMinKey:0},uDataCeil:function(){return t$$(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.ColorTableMaxKey:0},uVolumeType:function(){return t$$(o._volume.hypsometricSetting)&&o._volume.hypsometricSetting.filterMode===J$O.FilterMode.LINEAR?0:1},uHypOpacity:function(){return t$$(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.Opacity:1},uHypContourInterval:function(){return t$$(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.LineInterval:100},uHypLineColor:function(){var e=new a$10(0,1,1,1);return t$$(o._volume.hypsometricSetting)&&(e.x=o._volume.hypsometricSetting.LineColor.red,e.y=o._volume.hypsometricSetting.LineColor.green,e.z=o._volume.hypsometricSetting.LineColor.blue,e.w=o._volume.hypsometricSetting.LineColor.alpha),e},uHypContourFillMode:function(){var e=1;if(t$$(o._volume.hypsometricSetting))switch(o._volume.hypsometricSetting.DisplayMode){case J$O.DisplayMode.NONE:e=0;break;case J$O.DisplayMode.FACE:e=1;break;case J$O.DisplayMode.LINE:e=2;break;case J$O.DisplayMode.FACE_AND_LINE:e=3}return e},uHypFloor:function(){return t$$(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.ColorTableMinKey:0},uHypCeil:function(){return t$$(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.ColorTableMaxKey:0},uHypMaxVisibleValue:function(){return t$$(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.MaxVisibleValue:0},uHypMinVisibleValue:function(){return t$$(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.MinVisibleValue:0},uNoValueColor:function(){return t$$(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.noValueColor:e$1z.WHITE},uHypsometricVisible:function(){return 1},uHypHasAnalysisRegion:function(){return 0},uHypsometricRenderTexture:function(){return 0},uHypsometricTexture:function(){return o._volume._hypsometricTexture}},this._drawCommandInScenePreModel[e]=r},f$a.prototype.createCommandInClampTexture=function(e,t){var i=s$1d.shallowClone(e);i.pass=we$l.OPAQUE;var n={enabled:!1};this._geometry.type===b$K.GEOREGION3D&&this._clippingType===L$o.KeepOutside&&(n.enabled=!0,n.face=de$x.FRONT),i.renderState=p$1a.fromCache({cull:n,depthTest:{enabled:!0},depthMask:!0,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:_0x43be0d.createReceiveClampObjectStencilTest(!0)}),i.uniformMap={uDiffuseColor:function(){return e$1z.WHITE}},i.shaderProgram=p$15.fromCache({context:t,vertexShaderSource:He$5,fragmentShaderSource:Ye$6,attributeLocations:this._attributeLocations}),this._drawCommandInClampTexture=i},f$a.prototype.createNormalCommand=function(e){this._drawCommandNormal=s$1d.shallowClone(e),this._drawCommandNormal.renderState=p$1a.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!1,colorMask:{red:!0,green:!0,blue:!0,alpha:!0},stencilTest:!1})},f$a.prototype.createClampFrameBuffer=function(e,t){t$$(this._clampFramebuffer)||(this._frameState=t,t$$(t._framebufferList[this._name])?this._clampFramebuffer=t._framebufferList[this._name]:(this._clampFramebuffer=e.createClampFramebuffer(),this._clampFramebuffer.renderTexture.mrt=!0,t._framebufferList[this._name]=this._clampFramebuffer))},f$a.prototype.update=function(e,t,i,n){this._picking=t.passes.pick,this._frameState=t;var r=e.drawingBufferWidth,o=e.drawingBufferHeight;if((this._width!==r||this._height!==o)&&(this._width=r,this._height=o,t$$(this._clampFramebuffer)&&(this._clampFramebuffer.renderTexture._mrt=!1)),(!t$$(this._drawCommandInScene)||this._geometry._isGeometryDirty)&&(this.createCommand(e,t),this.createClampFrameBuffer(e,t)),t._fboState.frameBufferType==B$y.CLAMP)t._fboState.name==this._name&&i.push(this._drawCommandInClampTexture);else for(var a in this._geometry.type==b$K.GEOCYLINDER&&i.push(this._drawCommandNormal),this._drawCommandInScenePreModel){var s=this._modelInfo[a];if(!a$11.equals(s.pickColor,a$11.ZERO)){var l=this._drawCommandInScenePreModel[a];i.push(l)}}},f$a.prototype.destroy=function(){return L$a(this._drawCommandInClampTexture),this._drawCommandInClampTexture=void 0,L$a(this._drawCommandInScene),this._drawCommandInScene=void 0,this._drawCommandNormal=void 0,this._drawCommandInScenePreModel={},t$$(this._clampFramebuffer)&&(this._clampFramebuffer.destroy(),this._frameState._framebufferList[this._name]=void 0),t$$(this._geometry)&&(this._geometry=null),s$1e(this)},r$8.computeDefaultLevelZeroMaximumGeometricError=function(e){return 2*e.ellipsoid.maximumRadius*Math.PI*.25/(65*e.getNumberOfXTilesAtLevel(0))},Object.defineProperties(r$8.prototype,{quadtree:{get:t$_.throwInstantiationError,set:t$_.throwInstantiationError},ready:{get:t$_.throwInstantiationError},tilingScheme:{get:t$_.throwInstantiationError},errorEvent:{get:t$_.throwInstantiationError}}),r$8.prototype.update=t$_.throwInstantiationError,r$8.prototype.beginUpdate=t$_.throwInstantiationError,r$8.prototype.endUpdate=t$_.throwInstantiationError,r$8.prototype.getLevelMaximumGeometricError=t$_.throwInstantiationError,r$8.prototype.loadTile=t$_.throwInstantiationError,r$8.prototype.computeTileVisibility=t$_.throwInstantiationError,r$8.prototype.showTileThisFrame=t$_.throwInstantiationError,r$8.prototype.computeDistanceToTile=t$_.throwInstantiationError,r$8.prototype.isDestroyed=t$_.throwInstantiationError,r$8.prototype.destroy=t$_.throwInstantiationError;var e$8={LOW:1024,MEDIUM:2048,HIGH:4096},Quality=Object.freeze(e$8);function N$5(e){n$1e.typeOf.object("scene",e),this._scene=e,this._currentTweens=[],this._morphHandler=void 0,this._morphCancelled=!1,this._completeMorph=void 0,this._morphToOrthographic=!1}N$5.prototype.completeMorph=function(){t$$(this._completeMorph)&&this._completeMorph()},N$5.prototype.morphTo2D=function(e,t){t$$(this._completeMorph)&&this._completeMorph();var i=this._scene;this._previousMode=i.mode,this._morphToOrthographic=i.camera.frustum instanceof r$K,this._previousMode!==b$1d.SCENE2D&&this._previousMode!==b$1d.MORPHING&&(this._scene.morphStart.raiseEvent(this,this._previousMode,b$1d.SCENE2D,!0),i._mode=b$1d.MORPHING,i.camera._setTransform(c$1a.IDENTITY),this._previousMode===b$1d.COLUMBUS_VIEW?ze$2(this,e):Ze$1(this,e,t),0===e&&t$$(this._completeMorph)&&this._completeMorph())};var se$1=new a$11,ce$3=new a$11,pe$3=new a$11,ae$3=new a$11,ue$3=new a$11,me$3=new a$11,he$3=new a$11,de$3=new i$1g,le$5=new c$1a,fe$3=new f$V,_e$2=new r$K,ve$3={position:void 0,direction:void 0,up:void 0,position2D:void 0,direction2D:void 0,up2D:void 0,frustum:void 0};N$5.prototype.morphToColumbusView=function(e,t){t$$(this._completeMorph)&&this._completeMorph();var i=this._scene;if(this._previousMode=i.mode,this._previousMode!==b$1d.COLUMBUS_VIEW&&this._previousMode!==b$1d.MORPHING){this._scene.morphStart.raiseEvent(this,this._previousMode,b$1d.COLUMBUS_VIEW,!0),i.camera._setTransform(c$1a.IDENTITY);var n,r=se$1,o=ce$3,a=pe$3;if(e>0)r.x=0,r.y=-1,r.z=1,r=a$11.multiplyByScalar(a$11.normalize(r,r),5*t.maximumRadius,r),a$11.negate(a$11.normalize(r,o),o),a$11.cross(a$11.UNIT_X,o,a);else{var s=i.camera;if(this._previousMode===b$1d.SCENE2D)a$11.clone(s.position,r),r.z=s.frustum.right-s.frustum.left,a$11.negate(a$11.UNIT_Z,o),a$11.clone(a$11.UNIT_Y,a);else{a$11.clone(s.positionWC,r),a$11.clone(s.directionWC,o),a$11.clone(s.upWC,a);var l=t.scaleToGeodeticSurface(r,he$3),u=m$13.eastNorthUpToFixedFrame(l,t,le$5);c$1a.inverseTransformation(u,u),i.mapProjection.project(t.cartesianToCartographic(r,de$3),r),c$1a.multiplyByPointAsVector(u,o,o),c$1a.multiplyByPointAsVector(u,a,a)}}this._morphToOrthographic?((n=_e$2).width=i.camera.frustum.right-i.camera.frustum.left,n.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight):((n=fe$3).aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,n.fov=n$1d.toRadians(60));var c=ve$3;c.position=r,c.direction=o,c.up=a,c.frustum=n;var h=Ye$1(c);I$4(this,h),this._previousMode===b$1d.SCENE2D?Qe$2(this,e,c,h):(c.position2D=c$1a.multiplyByPoint(p$m.TRANSFORM_2D,r,ae$3),c.direction2D=c$1a.multiplyByPointAsVector(p$m.TRANSFORM_2D,o,ue$3),c.up2D=c$1a.multiplyByPointAsVector(p$m.TRANSFORM_2D,a,me$3),i._mode=b$1d.MORPHING,K$4(this,e,c,h)),0===e&&t$$(this._completeMorph)&&this._completeMorph()}};var F$6={position:new a$11,direction:new a$11,up:new a$11,frustum:void 0},G$a=new f$V;function I$4(e,t){if(e._scene.completeMorphOnUserInput){e._morphHandler=new f$N(e._scene.canvas);var i=function(){e._morphCancelled=!0,e._scene.camera.cancelFlight(),t(e)};e._completeMorph=i,e._morphHandler.setInputAction(i,Q$L.LEFT_DOWN),e._morphHandler.setInputAction(i,Q$L.MIDDLE_DOWN),e._morphHandler.setInputAction(i,Q$L.RIGHT_DOWN),e._morphHandler.setInputAction(i,Q$L.WHEEL)}}function C$5(e){for(var t=e._currentTweens,i=0;i<t.length;++i)t[i].cancelTween();e._currentTweens.length=0,e._morphHandler=e._morphHandler&&e._morphHandler.destroy()}N$5.prototype.morphTo3D=function(e,t){t$$(this._completeMorph)&&this._completeMorph();var i=this._scene;if(this._previousMode=i.mode,this._previousMode!==b$1d.SCENE3D&&this._previousMode!==b$1d.MORPHING){if(this._scene.morphStart.raiseEvent(this,this._previousMode,b$1d.SCENE3D,!0),i._mode=b$1d.MORPHING,i.camera._setTransform(c$1a.IDENTITY),this._previousMode===b$1d.SCENE2D)ye$3(this,e,t);else{var n;e>0?(n=F$6,a$11.fromDegrees(0,0,5*t.maximumRadius,t,n.position),a$11.negate(n.position,n.direction),a$11.normalize(n.direction,n.direction),a$11.clone(a$11.UNIT_Z,n.up)):n=x$8(this,t);var r,o=i.camera;o.frustum instanceof r$K?r=o.frustum.clone():((r=G$a).aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,r.fov=n$1d.toRadians(60)),n.frustum=r;var a=ee$3(n);I$4(this,a),H$8(this,e,n,a)}0===e&&t$$(this._completeMorph)&&this._completeMorph()}},N$5.prototype.isDestroyed=function(){return!1},N$5.prototype.destroy=function(){return C$5(this),s$1e(this)};var ge$3=new i$1g,we$1=new a$11,Te$2=new c$1a;function x$8(e,t){var i=e._scene,n=i.camera,r=F$6,o=r.position,a=r.direction,s=r.up,l=i.mapProjection.unproject(n.position,ge$3);t.cartographicToCartesian(l,o);var u=t.scaleToGeodeticSurface(o,we$1),c=m$13.eastNorthUpToFixedFrame(u,t,Te$2);return c$1a.multiplyByPointAsVector(c,n.direction,a),c$1a.multiplyByPointAsVector(c,n.up,s),r}var Me$6=new a$11,Re$2=new a$11,De$3=new a$11,Ee$3=new a$11,Ne$1=new a$11,Oe$2=new a$11;function H$8(e,t,i,n){t*=.5;var r=e._scene,o=r.camera,a=a$11.clone(o.position,Me$6),s=a$11.clone(o.direction,Re$2),l=a$11.clone(o.up,De$3),u=c$1a.multiplyByPoint(p$m.TRANSFORM_2D_INVERSE,i.position,Ee$3),c=c$1a.multiplyByPointAsVector(p$m.TRANSFORM_2D_INVERSE,i.direction,Ne$1),h=c$1a.multiplyByPointAsVector(p$m.TRANSFORM_2D_INVERSE,i.up,Oe$2);var d=r.tweens.add({duration:t,easingFunction:_$T.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){M$7(a,u,e.time,o.position),M$7(s,c,e.time,o.direction),M$7(l,h,e.time,o.up),a$11.cross(o.direction,o.up,o.right),a$11.normalize(o.right,o.right)},complete:function(){$$4(e,r,0,1,t,n)}});e._currentTweens.push(d)}var Ie$3=new r$K,L$9=new a$11,Z$5=new a$11,Q$4=new a$11,V$6=new a$11,Y$4=new a$11,k$5=new a$11;function ye$3(e,t,i){t/=3;var n,r,o=e._scene,a=o.camera;t>0?(n=F$6,a$11.fromDegrees(0,0,5*i.maximumRadius,i,n.position),a$11.negate(n.position,n.direction),a$11.normalize(n.direction,n.direction),a$11.clone(a$11.UNIT_Z,n.up)):(a.position.z=a.frustum.right-a.frustum.left,n=x$8(e,i)),e._morphToOrthographic?((r=Ie$3).aspectRatio=o.drawingBufferWidth/o.drawingBufferHeight,r.width=a.frustum.right-a.frustum.left):((r=G$a).aspectRatio=o.drawingBufferWidth/o.drawingBufferHeight,r.fov=n$1d.toRadians(60)),n.frustum=r;var s,l=ee$3(n);I$4(e,l),s=e._morphToOrthographic?function(){H$8(e,t,n,l)}:function(){J$6(e,t,n,(function(){H$8(e,t,n,l)}))},t>0?(o._mode=b$1d.SCENE2D,a.flyTo({duration:t,destination:a$11.fromDegrees(0,0,5*i.maximumRadius,i,V$6),complete:function(){o._mode=b$1d.MORPHING,s()}})):s()}function M$7(e,t,i,n){return a$11.lerp(e,t,i,n)}function X$5(e,t,i,n,r){var o=e._scene,a=o.camera;if(!(a.frustum instanceof r$K)){var s=a.frustum.fov,l=.5*n$1d.RADIANS_PER_DEGREE,u=i.position.z*Math.tan(.5*s);a.frustum.far=u/Math.tan(.5*l)+1e7;var c=o.tweens.add({duration:t,easingFunction:_$T.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){a.frustum.fov=n$1d.lerp(s,l,e.time);var t=u/Math.tan(.5*a.frustum.fov);n(a,t)},complete:function(){a.frustum=i.frustum.clone(),r(e)}});e._currentTweens.push(c)}}var Se$2=new a$11,Ce$2=new a$11,Ae$2=new a$11,z$6=new a$11,Ue$2=new a$11,Be$4=new a$11,Pe$3=new l$W,Fe$2=new n$18,He=new a$11,Ve$2={position:void 0,direction:void 0,up:void 0,frustum:void 0};function ze$2(e,t){t*=.5;var i=e._scene,n=i.camera,r=a$11.clone(n.position,Se$2),o=a$11.clone(n.direction,Ce$2),a=a$11.clone(n.up,Ae$2),s=a$11.negate(a$11.UNIT_Z,Ue$2),l=a$11.clone(a$11.UNIT_Y,Be$4),u=z$6;if(t>0)a$11.clone(a$11.ZERO,z$6),u.z=5*i.mapProjection.ellipsoid.maximumRadius;else{a$11.clone(r,z$6);var c=Fe$2;c$1a.multiplyByPoint(p$m.TRANSFORM_2D,r,c.origin),c$1a.multiplyByPointAsVector(p$m.TRANSFORM_2D,o,c.direction);var h=i.globe;if(t$$(h)){var d=h.pickWorldCoordinates(c,i,He);t$$(d)&&(c$1a.multiplyByPoint(p$m.TRANSFORM_2D_INVERSE,d,u),u.z+=a$11.distance(r,u))}}var f=Pe$3;f.right=.5*u.z,f.left=-f.right,f.top=f.right*(i.drawingBufferHeight/i.drawingBufferWidth),f.bottom=-f.top;var p=Ve$2;p.position=u,p.direction=s,p.up=l,p.frustum=f;var _=te$2(p);function m(e,t){e.position.z=t}I$4(e,_);var $=i.tweens.add({duration:t,easingFunction:_$T.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){M$7(r,u,e.time,n.position),M$7(o,s,e.time,n.direction),M$7(a,l,e.time,n.up),a$11.cross(n.direction,n.up,n.right),a$11.normalize(n.right,n.right),n._adjustOrthographicFrustum(!0)},complete:function(){X$5(e,t,p,m,_)}});e._currentTweens.push($)}var q$4=new i$1g,We$1={position:new a$11,direction:new a$11,up:new a$11,position2D:new a$11,direction2D:new a$11,up2D:new a$11,frustum:new l$W},je$2={position:new a$11,direction:new a$11,up:new a$11,frustum:void 0},be$1=new a$11,Ge$2=new n$18,xe$4=new c$1a,Le$2=new a$11;function Ze$1(e,t,i){t*=.5;var n=e._scene,r=n.camera,o=We$1;if(t>0)a$11.clone(a$11.ZERO,o.position),o.position.z=5*i.maximumRadius,a$11.negate(a$11.UNIT_Z,o.direction),a$11.clone(a$11.UNIT_Y,o.up);else{i.cartesianToCartographic(r.positionWC,q$4),n.mapProjection.project(q$4,o.position),a$11.negate(a$11.UNIT_Z,o.direction),a$11.clone(a$11.UNIT_Y,o.up);var a=Ge$2;a$11.clone(o.position2D,a.origin);var s=a$11.clone(r.directionWC,a.direction),l=i.scaleToGeodeticSurface(r.positionWC,Le$2),u=m$13.eastNorthUpToFixedFrame(l,i,xe$4);c$1a.inverseTransformation(u,u),c$1a.multiplyByPointAsVector(u,s,s),c$1a.multiplyByPointAsVector(p$m.TRANSFORM_2D,s,s);var c=n.globe;if(t$$(c)){var h=c.pickWorldCoordinates(a,n,be$1);if(t$$(h)){var d=a$11.distance(o.position2D,h);h.x+=d,a$11.clone(h,o.position2D)}}}function f(e,t){e.position.x=t}c$1a.multiplyByPoint(p$m.TRANSFORM_2D,o.position,o.position2D),c$1a.multiplyByPointAsVector(p$m.TRANSFORM_2D,o.direction,o.direction2D),c$1a.multiplyByPointAsVector(p$m.TRANSFORM_2D,o.up,o.up2D);var p=o.frustum;p.right=.5*o.position.z,p.left=-p.right,p.top=p.right*(n.drawingBufferHeight/n.drawingBufferWidth),p.bottom=-p.top;var _=je$2;c$1a.multiplyByPoint(p$m.TRANSFORM_2D_INVERSE,o.position2D,_.position),a$11.clone(o.direction,_.direction),a$11.clone(o.up,_.up),_.frustum=p;var m=te$2(_);I$4(e,m),K$4(e,t,o,(function(){X$5(e,t,o,f,m)}))}function J$6(e,t,i,n){var r=e._scene,o=r.camera,a=o.frustum.right-o.frustum.left;o.frustum=i.frustum.clone();var s=o.frustum.fov,l=.5*n$1d.RADIANS_PER_DEGREE,u=a*Math.tan(.5*s);o.frustum.far=u/Math.tan(.5*l)+1e7,o.frustum.fov=l;var c=r.tweens.add({duration:t,easingFunction:_$T.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){o.frustum.fov=n$1d.lerp(l,s,e.time),o.position.z=u/Math.tan(.5*o.frustum.fov)},complete:function(){n(e)}});e._currentTweens.push(c)}function Qe$2(e,t,i,n){t*=.5;var r=e._scene,o=r.camera,a=a$11.clone(i.position,V$6),s=a$11.clone(i.direction,Y$4),l=a$11.clone(i.up,k$5);function u(){o.frustum=i.frustum.clone();var u=a$11.clone(o.position,L$9),c=a$11.clone(o.direction,Z$5),h=a$11.clone(o.up,Q$4);u.z=a.z;var d=r.tweens.add({duration:t,easingFunction:_$T.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){M$7(u,a,e.time,o.position),M$7(c,s,e.time,o.direction),M$7(h,l,e.time,o.up),a$11.cross(o.direction,o.up,o.right),a$11.normalize(o.right,o.right)},complete:function(){n(e)}});e._currentTweens.push(d)}r._mode=b$1d.MORPHING,e._morphToOrthographic?u():J$6(e,0,i,u)}function K$4(e,t,i,n){var r=e._scene,o=r.camera,a=a$11.clone(o.position,L$9),s=a$11.clone(o.direction,Z$5),l=a$11.clone(o.up,Q$4),u=a$11.clone(i.position2D,V$6),c=a$11.clone(i.direction2D,Y$4),h=a$11.clone(i.up2D,k$5);var d=r.tweens.add({duration:t,easingFunction:_$T.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){M$7(a,u,e.time,o.position),M$7(s,c,e.time,o.direction),M$7(l,h,e.time,o.up),a$11.cross(o.direction,o.up,o.right),a$11.normalize(o.right,o.right),o._adjustOrthographicFrustum(!0)},complete:function(){$$4(e,r,1,0,t,n)}});e._currentTweens.push(d)}function $$4(e,t,i,n,r,o){var a={object:t,property:"morphTime",startValue:i,stopValue:n,duration:r,easingFunction:_$T.QUARTIC_OUT};t$$(o)&&(a.complete=function(){o(e)});var s=t.tweens.addProperty(a);e._currentTweens.push(s)}function ee$3(e){return function(t){var i=t._scene;i._mode=b$1d.SCENE3D,i.morphTime=b$1d.getMorphTime(b$1d.SCENE3D),C$5(t);var n=i.camera;(t._previousMode!==b$1d.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,a$11.clone(e.position,n.position),a$11.clone(e.direction,n.direction),a$11.clone(e.up,n.up),a$11.cross(n.direction,n.up,n.right),a$11.normalize(n.right,n.right),n.frustum=e.frustum.clone());var r=n.frustum;i.frameState.useLogDepth&&(r.near=.1,r.far=1e10);var o=t$$(t._completeMorph);t._completeMorph=void 0,i.camera.update(i.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,b$1d.SCENE3D,o)}}function te$2(e){return function(t){var i=t._scene;i._mode=b$1d.SCENE2D,i.morphTime=b$1d.getMorphTime(b$1d.SCENE2D),C$5(t);var n=i.camera;a$11.clone(e.position,n.position),n.position.z=2*i.mapProjection.ellipsoid.maximumRadius,a$11.clone(e.direction,n.direction),a$11.clone(e.up,n.up),a$11.cross(n.direction,n.up,n.right),a$11.normalize(n.right,n.right),n.frustum=e.frustum.clone();var r=t$$(t._completeMorph);t._completeMorph=void 0,i.camera.update(i.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,b$1d.SCENE2D,r)}}function Ye$1(e){return function(t){var i=t._scene;i._mode=b$1d.COLUMBUS_VIEW,i.morphTime=b$1d.getMorphTime(b$1d.COLUMBUS_VIEW),C$5(t);var n=i.camera;(t._previousModeMode!==b$1d.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,a$11.clone(e.position,n.position),a$11.clone(e.direction,n.direction),a$11.clone(e.up,n.up),a$11.cross(n.direction,n.up,n.right),a$11.normalize(n.right,n.right));var r=n.frustum;i.frameState.useLogDepth&&(r.near=.1,r.far=1e10);var o=t$$(t._completeMorph);t._completeMorph=void 0,i.camera.update(i.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,b$1d.COLUMBUS_VIEW,o)}}function f$9(e,t,i,n,r,o,a,s,l,u){this._tweens=e,this._tweenjs=t,this._startObject=e$1W(i),this._stopObject=e$1W(n),this._duration=r,this._delay=o,this._easingFunction=a,this._update=s,this._complete=l,this.cancel=u,this.needsStart=!0}function p$a(){this._tweens=[]}function wt(e){if(!t$$(e))throw new t$_("scene is required.");this.enableInputs=!0,this.enableTranslate=!0,this.enableZoom=!0,this.enableRotate=!0,this.enableTilt=!0,this.enableLook=!0,this.enableWalk=!1,this.walkParameters={speed:1,height:2},this.inertiaSpin=.9,this.inertiaTranslate=.9,this.inertiaZoom=.8,this.maximumMovementRatio=.1,this.bounceAnimationTime=3,this.minimumZoomDistance=1,this.maximumZoomDistance=Number.POSITIVE_INFINITY,this.translateEventTypes=Q$c.LEFT_DRAG,this.zoomEventTypes=[Q$c.RIGHT_DRAG,Q$c.WHEEL,Q$c.PINCH],this.rotateEventTypes=Q$c.LEFT_DRAG,this.tiltEventTypes=[Q$c.MIDDLE_DRAG,Q$c.PINCH,{eventType:Q$c.LEFT_DRAG,modifier:Ft$5.CTRL},{eventType:Q$c.RIGHT_DRAG,modifier:Ft$5.CTRL}],this.lookEventTypes={eventType:Q$c.LEFT_DRAG,modifier:Ft$5.SHIFT},this.minimumPickingTerrainHeight=15e4,this._minimumPickingTerrainHeight=this.minimumPickingTerrainHeight,this.minimumCollisionTerrainHeight=15e4,this._minimumCollisionTerrainHeight=this.minimumCollisionTerrainHeight,this.minimumTrackBallHeight=75e5,this._minimumTrackBallHeight=this.minimumTrackBallHeight,this.enableCollisionDetection=!0,this._enableIndoorColliDetection=!1,this.minimumDetectDistance=.5,this.minimumWalkingDetectDistance=2,this._scene=e,this._globe=void 0,this._ellipsoid=void 0,this._aggregator=new v$j(e.canvas),this._lastInertiaSpinMovement=void 0,this._lastInertiaZoomMovement=void 0,this._lastInertiaTranslateMovement=void 0,this._lastInertiaTiltMovement=void 0,this._inertiaDisablers={_lastInertiaZoomMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement","_lastInertiaTiltMovement"],_lastInertiaTiltMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement"]},this._tweens=new p$a,this._tween=void 0,this._horizontalRotationAxis=void 0,this._tiltCenterMousePosition=new r$T(-1,-1),this._tiltCenter=new a$11,this._rotateMousePosition=new r$T(-1,-1),this._rotateStartPosition=new a$11,this._strafeStartPosition=new a$11,this._zoomMouseStart=new r$T(-1,-1),this._zoomWorldPosition=new a$11,this._useZoomWorldPosition=!1,this._tiltCVOffMap=!1,this._looking=!1,this._rotating=!1,this._strafing=!1,this._zoomingOnVector=!1,this._rotatingZoom=!1;var t=e.mapProjection;this._maxCoord=t.project(new i$1g(Math.PI,n$1d.PI_OVER_TWO)),this._zoomFactor=5,this._rotateFactor=void 0,this._rotateRateRangeAdjustment=void 0,this._maximumRotateRate=.618,this._minimumRotateRate=.5,this._minimumZoomRate=20,this._maximumZoomRate=5906376272e3,this._cloneCamera=void 0,this._isAroundScreenCenter=!1,this.autoTiltHeight=0,this._controlMode=re$a.NORMAL,this._enableFusion=!1,this.panOffset={x:0,y:0},this.zoomDirty=!1,this.panDirty=!1,this.minFov=n$1d.toRadians(20),this.maxFov=n$1d.toRadians(70)}Object.defineProperties(f$9.prototype,{startObject:{get:function(){return this._startObject}},stopObject:{get:function(){return this._stopObject}},duration:{get:function(){return this._duration}},delay:{get:function(){return this._delay}},easingFunction:{get:function(){return this._easingFunction}},update:{get:function(){return this._update}},complete:{get:function(){return this._complete}},tweenjs:{get:function(){return this._tweenjs}}}),f$9.prototype.cancelTween=function(){this._tweens.remove(this)},Object.defineProperties(p$a.prototype,{length:{get:function(){return this._tweens.length}}}),p$a.prototype.add=function(e){if(!t$$((e=e$1Y(e,e$1Y.EMPTY_OBJECT)).startObject)||!t$$(e.stopObject))throw new t$_("options.startObject and options.stopObject are required.");if(!t$$(e.duration)||e.duration<0)throw new t$_("options.duration is required and must be positive.");if(0===e.duration)return t$$(e.complete)&&e.complete(),new f$9(this);var t=e.duration/h$1a.SECONDS_PER_MILLISECOND,i=e$1Y(e.delay,0),n=i/h$1a.SECONDS_PER_MILLISECOND,r=e$1Y(e.easingFunction,_$T.LINEAR_NONE),o=e.startObject,a=new f$W.Tween(o);a.to(e$1W(e.stopObject),t),a.delay(n),a.easing(r),t$$(e.update)&&a.onUpdate((function(){e.update(o)})),a.onComplete(e$1Y(e.complete,null)),a.repeat(e$1Y(e._repeat,0));var s=new f$9(this,a,e.startObject,e.stopObject,e.duration,i,r,e.update,e.complete,e.cancel);return this._tweens.push(s),s},p$a.prototype.addProperty=function(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).object,i=e.property,n=e.startValue,r=e.stopValue;if(!t$$(t)||!t$$(e.property))throw new t$_("options.object and options.property are required.");if(!t$$(t[i]))throw new t$_("options.object must have the specified property.");if(!t$$(n)||!t$$(r))throw new t$_("options.startValue and options.stopValue are required.");return this.add({startObject:{value:n},stopObject:{value:r},duration:e$1Y(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:function(e){t[i]=e.value},complete:e.complete,cancel:e.cancel,_repeat:e._repeat})},p$a.prototype.addAlpha=function(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).material;if(!t$$(t))throw new t$_("options.material is required.");var i=[];for(var n in t.uniforms)t.uniforms.hasOwnProperty(n)&&t$$(t.uniforms[n])&&t$$(t.uniforms[n].alpha)&&i.push(n);if(0===i.length)throw new t$_("material has no properties with alpha components.");return this.add({startObject:{alpha:e$1Y(e.startValue,0)},stopObject:{alpha:e$1Y(e.stopValue,1)},duration:e$1Y(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:function(e){for(var n=i.length,r=0;r<n;++r)t.uniforms[i[r]].alpha=e.alpha},complete:e.complete,cancel:e.cancel})},p$a.prototype.addOffsetIncrement=function(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).material;if(!t$$(t))throw new t$_("material is required.");if(!t$$(t.uniforms.offset))throw new t$_("material.uniforms must have an offset property.");var i=t.uniforms;return this.addProperty({object:i,property:"offset",startValue:i.offset,stopValue:i.offset+1,duration:e.duration,delay:e.delay,easingFunction:e.easingFunction,update:e.update,cancel:e.cancel,_repeat:1/0})},p$a.prototype.remove=function(e){if(!t$$(e))return!1;var t=this._tweens.indexOf(e);return-1!==t&&(e.tweenjs.stop(),t$$(e.cancel)&&e.cancel(),this._tweens.splice(t,1),!0)},p$a.prototype.removeAll=function(){for(var e=this._tweens,t=0;t<e.length;++t){var i=e[t];i.tweenjs.stop(),t$$(i.cancel)&&i.cancel()}e.length=0},p$a.prototype.contains=function(e){return t$$(e)&&-1!==this._tweens.indexOf(e)},p$a.prototype.get=function(e){if(!t$$(e))throw new t$_("index is required.");return this._tweens[e]},p$a.prototype.update=function(e){var t=this._tweens,i=0;for(e=t$$(e)?e/h$1a.SECONDS_PER_MILLISECOND:yt$9();i<t.length;){var n=t[i],r=n.tweenjs;n.needsStart?(n.needsStart=!1,r.start(e)):r.update(e)?i++:(r.stop(),t.splice(i,1))}};var Zt=0;function Ye(e,t){if(e<0)return 0;var i=25*(1-t);return Math.exp(-i*e)}function Xe(e){return r$T.equalsEpsilon(e.startPosition,e.endPosition,n$1d.EPSILON14)}Object.defineProperties(wt.prototype,{enableIndoorColliDetection:{get:function(){return this._enableIndoorColliDetection},set:function(e){this._enableIndoorColliDetection=e,this._scene.camera._enableIndoorColliDetection=e}},zoomFactor:{get:function(){return this._zoomFactor},set:function(e){this._zoomFactor=e}},previousHeight:{set:function(e){Zt=e}},controlMode:{get:function(){return this._controlMode},set:function(e){n$1e.typeOf.number.lessThanOrEquals("controlMode",e,1),n$1e.typeOf.number.greaterThanOrEquals("controlMode",e,0),this._controlMode=e}},enableFusion:{get:function(){return this._enableFusion},set:function(e){e!==this._enableFusion&&(this._enableFusion=e,this.panOffset={x:0,y:0})}}});var Qe$1=.4;function Je(e,t,i,n,r,o,a){let s=o[a];t$$(s)||(s=o[a]={startPosition:new r$T,endPosition:new r$T,motion:new r$T,inertiaEnabled:!0});const l=e.getButtonPressTime(t,i),u=e.getButtonReleaseTime(t,i),c=l&&u&&(u.getTime()-l.getTime())/1e3,h=new Date,d=u&&(h.getTime()-u.getTime())/1e3;if(l&&u&&c<Qe$1){const a=Ye(d,n),l=e.getLastMovement(t,i);if(!t$$(l)||Xe(l)||!s.inertiaEnabled||(s.motion.x=.5*(l.endPosition.x-l.startPosition.x),s.motion.y=.5*(l.endPosition.y-l.startPosition.y),s.startPosition=r$T.clone(l.startPosition,s.startPosition),s.endPosition=r$T.multiplyByScalar(s.motion,a,s.endPosition),s.endPosition=r$T.add(s.startPosition,s.endPosition,s.endPosition),isNaN(s.endPosition.x)||isNaN(s.endPosition.y)||r$T.distance(s.startPosition,s.endPosition)<.5))return;if(!e.isButtonDown(t,i)){r(o,e.getStartMousePosition(t,i),s)}}}function Ke(e,t){if(t$$(t)){let i=e[t];t$$(i)&&(i.inertiaEnabled=!0);const n=e._inertiaDisablers[t];if(t$$(n)){const t=n.length;for(let r=0;r<t;++r)i=e[n[r]],t$$(i)&&(i.inertiaEnabled=!1)}}}var le$4=[];function N$4(e,t,i,n,r,o){if(e._scene.mode===b$1d.COLUMBUS_VIEW&&e._controlMode===re$a.DESIGN?e._isAroundScreenCenter=!0:e._isAroundScreenCenter=!1,t$$(i)){var a=e._aggregator;t$$(e.tiltEventTypes)&&!Array.isArray(e.tiltEventTypes)&&(e.tiltEventTypes=[e.tiltEventTypes]),Array.isArray(i)||(le$4[0]=i,i=le$4);for(var s=i.length,l=0;l<s;++l){var u=i[l],c=t$$(u.eventType)?u.eventType:u,h=u.modifier,d=a.isMoving(c,h)&&a.getMovement(c,h),f=a.getStartMousePosition(c,h);if(e._isAroundScreenCenter){var p=e._scene.getViewport({x:10,y:10});f={x:p.width/2,y:p.height/2}}e.enableInputs&&t&&(d?(n(e,f,d),Ke(e,o)):r<1&&"_lastInertiaTiltMovement"!=o&&"_lastInertiaZoomMovement"!=o?Je(a,c,h,r,n,e,o):("_lastInertiaZoomMovement"===o||"_lastInertiaTiltMovement"===o)&&a._isDown[c]&&(e._isAroundScreenCenter||(f=a.getStartMousePosition(c,void 0)),e._scene.mode===b$1d.SCENE3D&&"_lastInertiaTiltMovement"===o&&e.tiltEventTypes.indexOf(c)>-1?n(e,f,a._lastMovement[c],!0):"_lastInertiaZoomMovement"==o&&a._lastMovement[c].valid&&n(e,f,a._lastMovement[c])))}}}var xt$1=new n$18,$e=new a$11,to=new r$T,eo=new a$11,oo=new r$T,no=new a$11,io=new a$11,ao=new a$11,ro=new a$11,so=new a$11,lo=new a$11,mo=new a$11,co=new a$11,_o$1=new a$11,uo=new a$11,vo$1=new a$11,go$1=new a$11,po$1=new a$11,ho$1=new a$11,fo=new a$11,Y$3=new a$11,me$2=new a$11,ce$2=new a$11,Bt$1={orientation:new e$1L};function jt$1(e,t,i,n,r,o){var a=1;t$$(o)&&(a=n$1d.clamp(Math.abs(o),.25,1));var s=e._scene,l=s.camera,u=s.mode;e.enableIndoorColliDetection&&(t$$(e._cloneCamera)||(e._cloneCamera=p$m.clone(s.camera)),p$m.clone(e._scene.camera,e._cloneCamera),l=e._cloneCamera);var c=e.minimumZoomDistance*a,h=e.maximumZoomDistance,d=n*(r-c);d=n$1d.clamp(d,e._minimumZoomRate,e._maximumZoomRate);var f=(i.endPosition.y-i.startPosition.y)/e._scene.canvas.clientHeight,p=d*(f=Math.min(f,e.maximumMovementRatio));if(t$$(e.thetaWindowRatio)&&Math.abs(f)<Math.abs(e.thetaWindowRatio))e.thetaWindowRatio=0;else if(t$$(e.phiWindowRatio)&&Math.abs(f)<Math.abs(e.phiWindowRatio))e.phiWindowRatio=0;else if(!(e.enableIndoorColliDetection&&p>0&&Math.abs(r-c)<1||e.enableIndoorColliDetection&&p<0&&Math.abs(r-h)<1)){r-p<c?p=r-c-1:r-p>h&&(p=r-h);var _=Bt$1.orientation;if(_.heading=l.heading,_.pitch=l.pitch,_.roll=l.roll,l.frustum instanceof r$K)return void(Math.abs(p)>0&&(l.zoomIn(p),e.enableIndoorColliDetection&&nt$3(e),l._adjustOrthographicFrustum()));var m=r$T.equals(t,e._zoomMouseStart);e._isAroundScreenCenter&&(m=!1,e._useZoomWorldPosition=!1);var $,g,y=e._zoomingOnVector,v=e._rotatingZoom;if(!m&&!e._isAroundScreenCenter&&(e._zoomMouseStart=r$T.clone(t,e._zoomMouseStart),t$$(e._globe)&&($=u!==b$1d.SCENE2D?J$5(e,t,$e):l.getPickRay(t,xt$1).origin),t$$($)?(e._useZoomWorldPosition=!0,e._zoomWorldPosition=a$11.clone($,e._zoomWorldPosition)):e._useZoomWorldPosition=!1,y=e._zoomingOnVector=!1,v=e._rotatingZoom=!1),!e._useZoomWorldPosition)return l.zoomIn(p),p<0&&(g=3),void(e.enableIndoorColliDetection&&nt$3(e,g));var x=u===b$1d.COLUMBUS_VIEW;if(l.positionCartographic.height<2e6&&(v=!0),!m||v){if(u===b$1d.SCENE2D){var b=e._zoomWorldPosition,S=l.position;if(!a$11.equals(b,S)&&l.positionCartographic.height<2*e._maxCoord.x){var w=l.position.x,C=a$11.subtract(b,S,eo);a$11.normalize(C,C);var T=a$11.distance(b,S)*p/(.5*l.getMagnitude());l.move(C,.5*T),(l.position.x<0&&w>0||l.position.x>0&&w<0)&&($=l.getPickRay(t,xt$1).origin,e._zoomWorldPosition=a$11.clone($,e._zoomWorldPosition))}}else if(u===b$1d.SCENE3D){var P=a$11.normalize(l.position,so);if(l.positionCartographic.height<3e3&&Math.abs(a$11.dot(l.direction,P))<.6)x=!0;else{var E=s.canvas,A=oo;A.x=E.clientWidth/2,A.y=E.clientHeight/2;var L=J$5(e,A,no);if(t$$(L)&&l.positionCartographic.height<1e6){var M=mo;a$11.clone(l.position,M);var I=e._zoomWorldPosition,O=lo;if(O=a$11.normalize(I,O),a$11.dot(O,P)<0)return;var D=fo,R=uo;a$11.clone(l.direction,R),a$11.add(M,a$11.multiplyByScalar(R,1e3,Y$3),D);var N=vo$1,F=go$1;a$11.subtract(I,M,N),a$11.normalize(N,F);var B=a$11.dot(P,F);if(B>=0)return void(e._zoomMouseStart.x=-1);var z=Math.acos(-B),G=a$11.magnitude(M),k=a$11.magnitude(I),U=G-p,V=a$11.magnitude(N),W=Math.asin(n$1d.clamp(V/k*Math.sin(z),-1,1))-Math.asin(n$1d.clamp(U/k*Math.sin(z),-1,1))+z,H=co;a$11.normalize(M,H);var Y=_o$1;Y=a$11.cross(F,H,Y),Y=a$11.normalize(Y,Y),a$11.normalize(a$11.cross(H,Y,Y$3),R),a$11.multiplyByScalar(a$11.normalize(D,Y$3),a$11.magnitude(D)-p,D),a$11.normalize(M,M),a$11.multiplyByScalar(M,U,M);var j=po$1;a$11.multiplyByScalar(a$11.add(a$11.multiplyByScalar(H,Math.cos(W)-1,me$2),a$11.multiplyByScalar(R,Math.sin(W),ce$2),Y$3),U,j),a$11.add(M,j,M),a$11.normalize(D,H),a$11.normalize(a$11.cross(H,Y,Y$3),R);var q=ho$1;return a$11.multiplyByScalar(a$11.add(a$11.multiplyByScalar(H,Math.cos(W)-1,me$2),a$11.multiplyByScalar(R,Math.sin(W),ce$2),Y$3),a$11.magnitude(D),q),a$11.add(D,q,D),a$11.clone(M,l.position),a$11.normalize(a$11.subtract(D,M,Y$3),l.direction),a$11.clone(l.direction,l.direction),a$11.cross(l.direction,l.up,l.right),a$11.cross(l.right,l.direction,l.up),l.setView(Bt$1),void(e.enableIndoorColliDetection&&nt$3(e))}if(t$$(L)){var X=a$11.normalize(L,io),K=a$11.normalize(e._zoomWorldPosition,ao),Z=a$11.dot(K,X);if(Z>0&&Z<1){var J=n$1d.acosClamped(Z),Q=a$11.cross(K,X,ro),ee=p/(Math.abs(J)>n$1d.toRadians(20)?.75*l.positionCartographic.height:l.positionCartographic.height-p);l.rotate(Q,J*ee)}}else x=!0}}e._rotatingZoom=!x}if(!m&&x||y){var te=u$V.wgs84ToWindowCoordinates(s,e._zoomWorldPosition,to),ie=(u!==b$1d.COLUMBUS_VIEW&&r$T.equals(t,e._zoomMouseStart)&&t$$(te)?l.getPickRay(te,xt$1):l.getPickRay(t,xt$1)).direction;u===b$1d.COLUMBUS_VIEW&&a$11.fromElements(ie.y,ie.z,ie.x,ie),l.move(ie,p),e._zoomingOnVector=!0}else l.zoomIn(p);l.setView(Bt$1),e.enableIndoorColliDetection&&nt$3(e)}}function wo$1(e,t,i,n,r,o){e._ellipsoid;var a=e._scene,s=a.camera;if(a.canvas,e._globe,e.enableIndoorColliDetection&&(t$$(e._cloneCamera)||(e._cloneCamera=p$m.clone(a.camera)),p$m.clone(a.camera,e._cloneCamera),s=e._cloneCamera),!(Math.abs(i.endPosition.y-i.startPosition.y)<1)){var l=i.endPosition.y-i.startPosition.y>0?1:-1;e._aggregator._isDown[1]&&(l=i.endPosition.y-t.y>0?.2:-.2,e._isAroundScreenCenter&&(l=i.endPosition.y-i.startPosition.y>0?.2:-.2));var u=e.maximumZoomDistance,c=l*n*7e-4*48;if(t$$(o)){var h=a$11.distance(s.position,o),d=1*e.minimumZoomDistance,f=n*(h-d);f=n$1d.clamp(f,e._minimumZoomRate,e._maximumZoomRate);var p=l/e._scene.canvas.clientHeight,_=f*(p=Math.min(p,e.maximumMovementRatio));if(e.enableIndoorColliDetection&&_>0&&Math.abs(h-d)<.1)return}if(!(r>u&&l<0)){r$T.equals(t,e._zoomMouseStart)||(e._zoomMouseStart=r$T.clone(t,e._zoomMouseStart)),e.zoomActive=!0,s.position;var m=r*c;if(!t$$(o))return void s.zoomIn(m);var $=new a$11;a$11.subtract(o,s.position,$);var g=new a$11;g=a$11.clone(s.right,g);var y=a$11.dot($,g),v=new a$11;v=a$11.multiplyByScalar(g,y,v);var x=new a$11;x=a$11.subtract($,v,x);var b=new a$11;b=a$11.normalize(x,b),new a$11,s.move(b,m);var S=new a$11;S=a$11.normalize(o,S);var w=a$11.magnitude(o),C=ye$2;C.x=C.y=C.z=w;var T=n$1c.fromCartesian3(C,Pe$2),P=s.pickEllipsoid(t,T,Gt$2);if(t$$(P)&&!isNaN(P.x)&&!isNaN(P.y)&&!isNaN(P.z)){P=a$11.normalize(P,P);var E=a$11.angleBetween(S,P);if(!n$1d.equalsEpsilon(E,0,n$1d.EPSILON10)){var A=new a$11;if(A=a$11.cross(S,P,A),s.rotate(A,E),e.enableIndoorColliDetection){var L=a.camera,M=e._cloneCamera,I=L.position,O=M.position;if(!a$11.equals(O,I)){var D=a$11.subtract(O,I,Xt);a$11.normalize(D,D);var R=a.collideDetection(D);if(t$$(R))if(a$11.distance(I,R)<1.5)return}p$m.clone(M,a.camera)}}}}}}var yo$1=new n$18,Po$1=new n$18,To$1=new a$11;function Co$1(e,t,i){var n=e._scene.camera,r=n.getPickRay(i.startPosition,yo$1).origin,o=n.getPickRay(i.endPosition,Po$1).origin,a=a$11.subtract(r,o,To$1),s=a$11.magnitude(a);s>0&&(a$11.normalize(a,a),n.move(a,s))}function de$2(e,t,i){t$$(i.distance)&&(i=i.distance);var n=e._scene.camera;jt$1(e,t,i,e._zoomFactor,n.getMagnitude())}var bo$1=new r$T,xo$1=new r$T;function _e$1(e,t,i){if(t$$(i.angleAndHeight))Io$1(e,t,i.angleAndHeight);else{var n=e._scene,r=n.camera,o=n.canvas,a=o.clientWidth,s=o.clientHeight,l=bo$1;l.x=2/a*i.startPosition.x-1,l.y=2/s*(s-i.startPosition.y)-1,l=r$T.normalize(l,l);var u=xo$1;u.x=2/a*i.endPosition.x-1,u.y=2/s*(s-i.endPosition.y)-1,u=r$T.normalize(u,u);var c=n$1d.acosClamped(l.x);l.y<0&&(c=n$1d.TWO_PI-c);var h=n$1d.acosClamped(u.x);u.y<0&&(h=n$1d.TWO_PI-h);var d=h-c;r.twistRight(d)}}function Io$1(e,t,i){var n=e._rotateFactor*e._rotateRateRangeAdjustment;n>e._maximumRotateRate&&(n=e._maximumRotateRate),n<e._minimumRotateRate&&(n=e._minimumRotateRate);var r=e._scene,o=r.camera,a=r.canvas,s=(i.endPosition.x-i.startPosition.x)/a.clientWidth,l=n*(s=Math.min(s,e.maximumMovementRatio))*Math.PI*4;o.twistRight(l)}function Ro$1(e){var t=e._scene.mapMode2D===Zr.ROTATE;c$1a.equals(c$1a.IDENTITY,e._scene.camera.transform)?(N$4(e,e.enableTranslate,e.translateEventTypes,Co$1,e.inertiaTranslate,"_lastInertiaTranslateMovement"),N$4(e,e.enableZoom,e.zoomEventTypes,de$2,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&N$4(e,e.enableRotate,e.tiltEventTypes,_e$1,e.inertiaSpin,"_lastInertiaTiltMovement")):(N$4(e,e.enableZoom,e.zoomEventTypes,de$2,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&N$4(e,e.enableRotate,e.translateEventTypes,_e$1,e.inertiaSpin,"_lastInertiaSpinMovement"))}var ue$2=new n$18,Eo$1=new a$11,It$1=new a$11,yt=new r$T;function Mo$1(e,t){if(e._mode!==b$1d.SCENE3D||e._multiViewportMode==te$5.NONE)return t;r$T.clone(t,yt);for(var i=e._context,n=new n$13(t.x,i.drawingBufferHeight-t.y),r=new n$13,o=0;o<e._multiViewportInfo.length;o++){var a=e._multiViewportInfo[o];if(r.x=i.drawingBufferWidth*a.x,r.y=i.drawingBufferHeight*a.y,r.width=i.drawingBufferWidth*a.width,r.height=i.drawingBufferHeight*a.height,r.intersect(n)===cr$4.INTERSECTING){var s=(n.x-r.x)/r.width,l=(n.y-r.y)/r.height;return yt.x=s*i.drawingBufferWidth,yt.y=i.drawingBufferHeight-l*i.drawingBufferHeight,yt}}return yt}function J$5(e,t,i){var n=e._scene,r=e._globe,o=n.camera;if(t$$(r)){var a;n.pickPositionSupported&&(a=n.pickPositionWorldCoordinates(t,Eo$1,!0));var s,l=o.getPickRay(Mo$1(e._scene,t),ue$2),u=r.pick(l,n,It$1);if((t$$(a)?a$11.distance(a,o.positionWC):Number.POSITIVE_INFINITY)<(t$$(u)?a$11.distance(u,o.positionWC):Number.POSITIVE_INFINITY))return a$11.clone(a,i);if(t$$(u))return a$11.clone(u,i);if(n._environmentState.isUnderGlobeVisible&&o._positionCartographic.height<1&&t$$(s=h$1b.rayEllipsoid(l,n._underGlobe.ellipsoid))){var c=s.start>0?s.start:s.stop;return c=Math.min(c,100),n$18.getPoint(l,c,i)}}}var ve$2=new n$18,So$1=new n$18,ge$2=new a$11,zo$1=new a$11,ko$2=new a$11,No$1=new a$11,Do$1=new n$17(a$11.UNIT_X,0),Ao$1=new r$T,Ho$1=new r$T;function Oo$1(e,t,i){if(a$11.equals(t,e._translateMousePosition)||(e._looking=!1),a$11.equals(t,e._strafeMousePosition)||(e._strafing=!1),e._looking||e.enableWalk)U$6(e,t,i);else if(!e._strafing||e._isAroundScreenCenter){var n=e._scene,r=n.camera;e.enableIndoorColliDetection&&(t$$(e._cloneCamera)||(e._cloneCamera=p$m.clone(n.camera)),p$m.clone(n.camera,e._cloneCamera),r=e._cloneCamera);var o,a=r$T.clone(i.startPosition,Ao$1),s=r$T.clone(i.endPosition,Ho$1),l=r.getPickRay(a,ve$2),u=a$11.clone(a$11.ZERO,No$1),c=a$11.UNIT_X;if(r.position.z<e._minimumPickingTerrainHeight&&(t$$(o=J$5(e,a,ge$2))?(u.x=o.x,(!t$$(n.pickPositionWorldCoordinates(t))||o.x<-1e4)&&(u.x=-20)):t$$(n.pickPositionWorldCoordinates(t))||(u.x=-20)),u.x>r.position.z&&t$$(o)&&!e._isAroundScreenCenter)return a$11.clone(o,e._strafeStartPosition),e._strafing=!0,Mt$1(e,t,i),void(e._strafeMousePosition=r$T.clone(t,e._strafeMousePosition));var h=n$17.fromPointNormal(u,c,Do$1);l=r.getPickRay(a,ve$2);var d=h$1b.rayPlane(l,h,ge$2),f=r.getPickRay(s,So$1),p=h$1b.rayPlane(f,h,zo$1);if(!t$$(d)||!t$$(p))return e._looking=!0,U$6(e,t,i),void r$T.clone(t,e._translateMousePosition);var _=a$11.subtract(d,p,ko$2),m=_.x;_.x=_.y,_.y=_.z,_.z=m;var $=a$11.magnitude(_);$>n$1d.EPSILON6&&(a$11.normalize(_,_),r.move(_,$),e.enableIndoorColliDetection&&nt$3(e))}else Mt$1(e,t,i)}var pe$2=new r$T,Ut$1=new n$18,Rt$1=new a$11,Fo$1=new a$11,he$2=new c$1a,Wo$1=new c$1a,Zo$1=new a$11,Bo$1=new n$17(a$11.UNIT_X,0),Vt=new a$11,qt=new i$1g,fe$2=new c$1a,jo$1=new a$U,Uo$1=new r$W,Vo$1=new a$11;function qo$1(e,t,i){if(t$$(i.angleAndHeight)&&(i=i.angleAndHeight),(!r$T.equals(t,e._tiltCenterMousePosition)||e._isAroundScreenCenter)&&(e._tiltCVOffMap=!1,e._looking=!1),e._looking)U$6(e,t,i);else{var n=e._scene,r=n.camera;e.enableIndoorColliDetection&&(t$$(e._cloneCamera)||(e._cloneCamera=p$m.clone(n.camera)),p$m.clone(n.camera,e._cloneCamera),r=e._cloneCamera);var o=e._maxCoord,a=Math.abs(r.position.x)-o.x<0&&Math.abs(r.position.y)-o.y<0;e._tiltCVOffMap||!a||r.position.z>e._minimumPickingTerrainHeight||!t$$(n.pickPositionWorldCoordinates(t))?(e._tiltCVOffMap=!0,Lo$1(e,t,i)):Go$1(e,t,i),e.enableIndoorColliDetection&&nt$3(e)}}function Lo$1(e,t,i){var n=e._scene,r=n.camera,o=n.canvas,a=pe$2;a.x=o.clientWidth/2,a.y=o.clientHeight/2;var s,l=r.getPickRay(a,Ut$1),u=a$11.UNIT_X,c=l.origin,h=l.direction,d=a$11.dot(u,h);if(Math.abs(d)>n$1d.EPSILON6&&(s=-a$11.dot(u,c)/d),!t$$(s)||s<=0)return e._looking=!0,U$6(e,t,i),void r$T.clone(t,e._tiltCenterMousePosition);var f=a$11.multiplyByScalar(h,s,Rt$1);a$11.add(c,f,f);var p=n.mapProjection,_=p.ellipsoid;a$11.fromElements(f.y,f.z,f.x,f);var m=p.unproject(f,qt);_.cartographicToCartesian(m,f);var $=m$13.eastNorthUpToFixedFrame(f,_,he$2),g=e._globe,y=e._ellipsoid;e._globe=void 0,e._ellipsoid=n$1c.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;var v=c$1a.clone(r.transform,fe$2);r._setTransform($),K$3(e,t,i,a$11.UNIT_Z),r._setTransform(v),e._globe=g,e._ellipsoid=y;var x=y.maximumRadius;e._rotateFactor=1/x,e._rotateRateRangeAdjustment=x}function Go$1(e,t,i){var n=e._scene,r=n.camera;e.enableIndoorColliDetection&&(t$$(e._cloneCamera)||(e._cloneCamera=p$m.clone(n.camera)),r=e._cloneCamera);var o,a,s=a$11.UNIT_X;if(r$T.equals(t,e._tiltCenterMousePosition)&&!e._isAroundScreenCenter)o=a$11.clone(e._tiltCenter,Rt$1);else{if(r.position.z<e._minimumPickingTerrainHeight&&(o=J$5(e,t,Rt$1)),!t$$(o)){var l,u=(a=r.getPickRay(t,Ut$1)).origin,c=a.direction,h=a$11.dot(s,c);if(Math.abs(h)>n$1d.EPSILON6&&(l=-a$11.dot(s,u)/h),!t$$(l)||l<=0)return e._looking=!0,U$6(e,t,i),void r$T.clone(t,e._tiltCenterMousePosition);o=a$11.multiplyByScalar(c,l,Rt$1),a$11.add(u,o,o)}if(r$T.clone(t,e._tiltCenterMousePosition),e._isAroundScreenCenter){var d=new a$11;a$11.clone(o,d),e._tiltCenter=d}else a$11.clone(o,e._tiltCenter)}var f=n.canvas,p=pe$2;p.x=f.clientWidth/2,p.y=e._tiltCenterMousePosition.y,a=r.getPickRay(p,Ut$1);var _=a$11.clone(a$11.ZERO,Zo$1);_.x=o.x;var m=n$17.fromPointNormal(_,s,Bo$1),$=h$1b.rayPlane(a,m,Fo$1),g=r._projection,y=g.ellipsoid;a$11.fromElements(o.y,o.z,o.x,o);var v=g.unproject(o,qt);y.cartographicToCartesian(v,o);var x,b=m$13.eastNorthUpToFixedFrame(o,y,he$2);t$$($)?(a$11.fromElements($.y,$.z,$.x,$),v=g.unproject($,qt),y.cartographicToCartesian(v,$),x=m$13.eastNorthUpToFixedFrame($,y,Wo$1)):x=b;var S=e._globe,w=e._ellipsoid;e._globe=void 0,e._ellipsoid=n$1c.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;var C=a$11.UNIT_Z,T=c$1a.clone(r.transform,fe$2);r._setTransform(b);var P=a$11.cross(a$11.UNIT_Z,a$11.normalize(r.position,Vt),Vt),E=a$11.dot(r.right,P);if(K$3(e,t,i,C,!1,!0),r._setTransform(x),E<0){i.startPosition.y>i.endPosition.y&&(C=void 0);var A=r.constrainedAxis;r.constrainedAxis=void 0,K$3(e,t,i,C,!0,!1),r.constrainedAxis=A}else K$3(e,t,i,C,!0,!1);if(t$$(r.constrainedAxis)){var L=a$11.cross(r.direction,r.constrainedAxis,Vo$1);a$11.equalsEpsilon(L,a$11.ZERO,n$1d.EPSILON6)||(a$11.dot(L,r.right)<0&&a$11.negate(L,L),a$11.cross(L,r.direction,r.up),a$11.cross(r.direction,r.up,r.right),a$11.normalize(r.up,r.up),a$11.normalize(r.right,r.right))}r._setTransform(T),e._globe=S,e._ellipsoid=w;var M=w.maximumRadius;e._rotateFactor=1/M,e._rotateRateRangeAdjustment=M;var I=a$11.clone(r.positionWC,Vt);if(r._adjustHeightForTerrain(),!a$11.equals(r.positionWC,I)){r._setTransform(x),r.worldToCameraCoordinatesPoint(I,I);var O=a$11.magnitudeSquared(I);a$11.magnitudeSquared(r.position)>O&&(a$11.normalize(r.position,r.position),a$11.multiplyByScalar(r.position,Math.sqrt(O),r.position));var D=a$11.angleBetween(I,r.position),R=a$11.cross(I,r.position,I);a$11.normalize(R,R);var N=a$U.fromAxisAngle(R,D,jo$1),F=r$W.fromQuaternion(N,Uo$1);r$W.multiplyByVector(F,r.direction,r.direction),r$W.multiplyByVector(F,r.up,r.up),a$11.cross(r.direction,r.up,r.right),a$11.cross(r.right,r.direction,r.up),r._setTransform(T)}}var Yo$1=new r$T,Xo$1=new n$18,Et$1=new a$11;function Qo$1(e,t,i){t$$(i.distance)&&(i=i.distance);var n=e._scene,r=n.camera,o=n.canvas,a=Yo$1;a.x=o.clientWidth/2,a.y=o.clientHeight/2;var s,l,u=r.getPickRay(a,Xo$1);if(r.position.z<e._minimumPickingTerrainHeight&&(s=J$5(e,t,Et$1)),t$$(s))if(t$$(n.pickPositionWorldCoordinates(t,Et$1,!0)))l=a$11.distance(u.origin,s);else{var c=r._projection.unproject(r.position),h=i$1g.toCartesian(c);l=a$11.distance(h,s)}else{var d=a$11.UNIT_X,f=u.origin,p=u.direction;l=-a$11.dot(d,f)/a$11.dot(d,p)}be(e,i);var _=a$11.normalize(r.position,Ce$1);jt$1(e,t,i,e._zoomFactor,l,a$11.dot(_,r.direction))}function Jo$1(e){var t=e._scene.camera;if(c$1a.equals(c$1a.IDENTITY,t.transform)){var i=e._tweens;if(e._aggregator.anyButtonDown&&i.removeAll(),N$4(e,e.enableTilt,e.tiltEventTypes,qo$1,e.inertiaSpin,"_lastInertiaTiltMovement"),N$4(e,e.enableTranslate,e.translateEventTypes,Oo$1,e.inertiaTranslate,"_lastInertiaTranslateMovement"),N$4(e,e.enableZoom,e.zoomEventTypes,Qo$1,e.inertiaZoom,"_lastInertiaZoomMovement"),N$4(e,e.enableLook,e.lookEventTypes,U$6),!(e._aggregator.anyButtonDown||t$$(e._lastInertiaZoomMovement)&&e._lastInertiaZoomMovement.active||t$$(e._lastInertiaTranslateMovement)&&e._lastInertiaTranslateMovement.active||i.contains(e._tween))){var n=t.createCorrectPositionTween(e.bounceAnimationTime);t$$(n)&&(e._tween=i.add(n))}i.update()}else N$4(e,e.enableRotate,e.rotateEventTypes,K$3,e.inertiaSpin,"_lastInertiaSpinMovement"),N$4(e,e.enableZoom,e.zoomEventTypes,xe$3,e.inertiaZoom,"_lastInertiaZoomMovement")}new n$18;var Ko$1=new n$17(a$11.UNIT_X,0);new a$11,new a$11;var Lt$1=new a$11;function Mt$1(e,t,i){var n=e._scene.camera,r=e._strafeStartPosition,o=e.operPlane;if(t$$(r)&&t$$(o)){t=i.startPosition;var a=r$T.clone(i.endPosition,new r$T);if(e.flipY){var s=a.y-t.y;a.y=t.y-s}var l=n.getPickRay(t,new n$18),u=n.getPickRay(a,new n$18),c=h$1b.rayPlane(l,o,new a$11),h=h$1b.rayPlane(u,o,new a$11);if(t$$(c)&&t$$(h)){var d=a$11.normalize(c,new a$11),f=a$11.normalize(h,new a$11),p=a$11.angleBetween(d,f);if(0!=p){var _=a$11.cross(d,f,new a$11);n.rotate(_,p),n._adjustHeightForTerrain()}}}}var we=new a$11,lt$1=new i$1g,ye$2=new a$11,Pe$2=new n$1c,$o$1=new a$11;function tn$1(e,t,i){e.spining=!0,e.zooming=!1,e.tilting=!1;var n=e._scene,r=n.camera;if(c$1a.equals(r.transform,c$1a.IDENTITY)){var o,a,s,l=e._ellipsoid.geodeticSurfaceNormal(r.position,$o$1),u=e._ellipsoid.cartesianToCartographic(r.positionWC,lt$1).height,c=e._globe;if(r$T.equals(t,e._rotateMousePosition))e._looking?U$6(e,t,i,l):e._rotating?K$3(e,t,i):e._strafing?Mt$1(e,t,i,e.operPlane):Yt(e,t,i,e.operEllipsoid);else{if(e._looking=!1,e._rotating=!1,e._strafing=!1,e.enableWalk)return e._limitObject=void 0,e._looking=!0,void U$6(e,t,i,l);var h;if(t$$(c)&&u<e._minimumPickingTerrainHeight){if(!t$$(h=J$5(e,t,Lt$1))){var d=new n$18(r.position,r.direction),f=c.pick(d,n,It$1);if(t$$(f)){var p=u$V.wgs84ToWindowCoordinates(n,f,new a$11);if(!t$$(h=J$5(e,new r$T(t.x,p.y+100),Lt$1)))return}else if(!t$$(h=r.pickEllipsoid(t,c.ellipsoid,Lt$1)))return}if(o=a$11.magnitude(h),a$11.magnitude(r.position)<o){a$11.clone(h,e._strafeStartPosition);var _=new a$11;e.flipY=!0,_=a$11.add(r.direction,r.up,_),a$11.normalize(_,_);var m=n$17.fromPointNormal(h,_,Ko$1);e.operPlane=m,e._strafing=!0,Mt$1(e,t,i)}else(a=ye$2).x=a.y=a.z=o,s=n$1c.fromCartesian3(a,Pe$2),e.operEllipsoid=s,!n.undergroundMode&&n.globe.show&&(e._limitObject=nn$1(e,s)),Yt(e,t,i,s),a$11.clone(h,e._rotateStartPosition)}else t$$(r.pickEllipsoid(i.startPosition,e._ellipsoid,we))?(e._limitObject=void 0,Yt(e,t,i,e._ellipsoid),a$11.clone(we,e._rotateStartPosition)):u>e._minimumTrackBallHeight?(e._limitObject=void 0,e._rotating=!0,K$3(e,t,i)):(e._limitObject=void 0,e._looking=!0,U$6(e,t,i,l));r$T.clone(t,e._rotateMousePosition)}}else K$3(e,t,i)}function K$3(e,t,i,n,r,o){r=e$1Y(r,!1),o=e$1Y(o,!1);var a=e._scene,s=a.camera;e.enableIndoorColliDetection&&(t$$(e._cloneCamera)||(e._cloneCamera=p$m.clone(a.camera)),s=e._cloneCamera);var l=a.canvas,u=s.constrainedAxis;t$$(n)&&(s.constrainedAxis=n);var c=a$11.magnitude(s.position),h=e._rotateFactor*(c-e._rotateRateRangeAdjustment);h>e._maximumRotateRate&&(h=e._maximumRotateRate),h<e._minimumRotateRate&&(h=e._minimumRotateRate);var d=(i.startPosition.x-i.endPosition.x)/l.clientWidth,f=(i.startPosition.y-i.endPosition.y)/l.clientHeight;d=Math.min(d,e.maximumMovementRatio),f=Math.min(f,e.maximumMovementRatio);var p=Math.abs(d)<Math.abs(f),_=h*d*Math.PI*2,m=h*f*Math.PI;if("ontouchstart"in window&&(m*=2),e.deltaTheta=-m,e.thetaWindowRatio=f,e.phiWindowRatio=d,!r&&!p&&s.rotateRight(_),!o&&p){var $=Math.abs(s.pitch-m),g=s.positionCartographic.height,y=e.minimumZoomDistance+1;if(!($>-n$1d.PI_OVER_TWO&&$<n$1d.PI_OVER_TWO)||g<y&&m<0)return void(s.constrainedAxis=u);s.rotate(s.right,m)}s.constrainedAxis=u}var Gt$2=a$10.clone(a$10.UNIT_W),Te$1=a$10.clone(a$10.UNIT_W);new a$11,new a$11,new a$11,new a$11;var en$1=new r$T,on$1=new r$T;function nn$1(e,t){var i=e._scene,n=i.camera,r=i.globe,o=.5*Math.PI,a=new n$18(n.position,n.direction),s=r.pick(a,i,It$1);if(t$$(s)){var l=a$11.subtract(n.position,s,new a$11);o=a$11.angleBetween(s,l)}var u=n$1d.toDegrees(o);o=n$1d.toRadians(82-u);var c=a$U.fromAxisAngle(n.right,o,Me$5),h=r$W.fromQuaternion(c,St$1),d=new a$11;r$W.multiplyByVector(h,n.direction,d),a$11.normalize(d,d);var f=new a$11;a$U.multiplyByVec(c,n.direction,f),a$11.normalize(f,f);var p=new n$18(n.position,d),_=h$1b.rayEllipsoid(p,t);if(t$$(_)){var m=_.start>0?_.start:_.stop,$=n$18.getPoint(p,m,new a$11),g=new r$T;if(t$$($)){u$V.wgs84ToWindowCoordinates(i,$,g);var y=new r$T(g.x,g.y-2),v=n.getPickRay(y,ue$2),x=h$1b.rayEllipsoid(v,t);if(t$$(x)){var b=x.start>0?x.start:x.stop,S=n$18.getPoint(v,b,new a$11);if(t$$(S))return{angle:.5*a$11.angleBetween(S,$),division:g.y}}}}}function an$1(e,t,i,n,r,o,a){var s=e._scene,l=s.camera,u=e._limitObject.division,c=e._limitObject.angle;if(t.y<u){var h=c,d=(n.y-i.y)*h*.5,f=(n.x-i.x)*h*.2,p=a$U.fromAxisAngle(l.right,d,new a$U);a$U.normalize(p,p);var _=r$W.fromQuaternion(p,St$1);r$W.multiplyByVector(_,r,o);var m=a$U.fromAxisAngle(l.direction,f,new a$U);a$U.normalize(m,m);var $=r$W.fromQuaternion(m,St$1);return r$W.multiplyByVector($,o,o),!0}if(i.y>u&&n.y>u)return!1;if(i.y<u&&n.y>u)return!!t$$(e._lastPosition)&&(r=l.pickEllipsoid(e._lastPosition,a),!0);var g=new a$11,y=0;if(i.y<u&&n.y<u){y=(n.y-i.y)*c;var v=t$$(e._lastPosition)?e._lastPosition:i;l.pickEllipsoid(v,a,r),g=a$11.clone(r)}else if(i.y>u&&n.y<u){var x=new r$T;x.y=u,x.x=(x.y-i.y)/(n.y-i.y)*(n.x-i.x)+i.x,g=l.pickEllipsoid(x,a),y=(n.y-x.y)*c}var b=new a$11,S=a$U.fromAxisAngle(l.right,y,Me$5),w=r$W.fromQuaternion(S,St$1);r$W.multiplyByVector(w,g,b);var C=new r$T;u$V.wgs84ToWindowCoordinates(s,b,C);var T=new r$T(n.x,C.y),P=l.pickEllipsoid(T,a);return a$11.clone(P,o),e._lastPosition=r$T.clone(T),!0}function Yt(e,t,i,n){var r=e._scene,o=r.camera;e.enableIndoorColliDetection&&(t$$(e._cloneCamera)||(e._cloneCamera=p$m.clone(r.camera)),p$m.clone(r.camera,e._cloneCamera),o=e._cloneCamera);var a=r$T.clone(i.startPosition,en$1),s=r$T.clone(i.endPosition,on$1),l=o.pickEllipsoid(a,n,Gt$2),u=o.pickEllipsoid(s,n,Te$1);if(!t$$(l)||!t$$(u)||isNaN(l.x)||isNaN(u.x)){var c=new n$18(o.position,o.direction),h=r.globe.pick(c,r,It$1);if(t$$(h)){var d=u$V.wgs84ToWindowCoordinates(r,h,new a$11);if(!t$$(d))return;var f=s.y-a.y,p=new r$T(a.x,d.y),_=new r$T(s.x,d.y+f);l=o.pickEllipsoid(p,n,Gt$2),u=o.pickEllipsoid(_,n,Te$1)}}if(t$$(l)&&t$$(u)&&!isNaN(l.x)&&!isNaN(u.x)&&(t$$(e._limitObject)&&an$1(e,t,a,s,l,u,n),t$$(l)&&t$$(u)&&!isNaN(l.x)&&!isNaN(u.x))){l=o.worldToCameraCoordinates(l,l),u=o.worldToCameraCoordinates(u,u);var m=a$11.angleBetween(l,u),$=new a$11;a$11.cross(l,u,$),a$11.magnitudeSquared($)<1e-20&&($=a$11.cross(l,a$11.UNIT_X,$),a$11.magnitudeSquared($)<1e-20&&($=a$11.cross(l,a$11.UNIT_Y,$))),a$11.normalize($,$),o.rotate($,m),e._enableFusion&&(e.panOffset.x+=i.endPosition.x-i.startPosition.x,e.panOffset.y+=i.endPosition.y-i.startPosition.y,e.panDirty=!0),e.enableIndoorColliDetection&&nt$3(e),o._adjustHeightForTerrain()}}var Ce$1=new a$11,rn$1=new i$1g;function be(e,t){var i=e._scene,n=i.globe;if(!(e.autoTiltHeight<1)&&t$$(n)){var r=i.camera,o=r.positionCartographic;if(o.height-n.getHeight(o)<e.autoTiltHeight){var a=t.endPosition.y-t.startPosition.y>0?1:-1,s=r.pitch+n$1d.toRadians(3)*a;s=Math.min(s,-.01),s=Math.max(s,.5*-Math.PI),r.setView({orientation:{heading:r.heading,pitch:s}})}}}function xe$3(e,t,i){e.spining=!1,e.zooming=!0,e.tilting=!1;var n=e._ellipsoid,r=e._scene,o=r.camera;if(t$$(i.distance)&&(i=i.distance),e._enableFusion){var a=i.endPosition.y-i.startPosition.y;e.zoomDirty=!0;var s=n$1d.toRadians(1);a>=0?(o.frustum.fov-=s,o.frustum.fov<e.minFov&&(o.frustum.fov=e.minFov,e.zoomDirty=!1)):(o.frustum.fov+=s,o.frustum.fov>e.maxFov&&(o.frustum.fov=e.maxFov,e.zoomDirty=!1))}else{var l=J$5(e,t,Et$1);if(e.isAroundScreenCenter){var u=e._scene.getViewport({x:10,y:10});l=J$5(e,{x:u.width/2,y:u.height/2},Et$1)}var c,h=n.cartesianToCartographic(o.position,rn$1).height;if(c=t$$(l)?a$11.distance(o.position,l):h,0!==r._multiViewportMode||"ontouchstart"in window){var d=a$11.normalize(o.position,Ce$1);jt$1(e,t,i,e._zoomFactor,c,a$11.dot(d,o.direction))}else wo$1(e,t,i,e._zoomFactor,c,l);be(e,i),o._adjustHeightForTerrain()}}var sn$1=new r$T,Ie$2=new n$18,Pt$1=new a$11;new a$11;var Re$1=new c$1a;new c$1a;var Ee$2=new c$1a,Me$5=new a$U,St$1=new r$W,Se$1=new i$1g,ze$1=new a$11;function ln$1(e,t,i,n){e.spining=!1,e.zooming=!1,e.tilting=!0;var r=e._scene.camera;if(c$1a.equals(r.transform,c$1a.IDENTITY)){if(t$$(i.angleAndHeight)&&(i=i.angleAndHeight),r$T.equals(t,e._tiltCenterMousePosition)||(e._tiltOnEllipsoid=!1,e._looking=!1),e.enableWalk||e._looking){var o=e._ellipsoid.geodeticSurfaceNormal(r.position,ze$1);return void U$6(e,t,i,o)}var a=e._ellipsoid.cartesianToCartographic(r.position,Se$1);e._tiltOnEllipsoid||a.height>e._minimumCollisionTerrainHeight?(e._tiltOnEllipsoid=!0,cn$1(e,t,i,n)):dn$1(e,t,i,n)}}var mn$1=new i$1g;function cn$1(e,t,i,n){var r=e._ellipsoid,o=e._scene,a=o.camera,s=.25*e.minimumZoomDistance,l=r.cartesianToCartographic(a.positionWC,mn$1).height;if(!(l-s-1<n$1d.EPSILON3&&i.endPosition.y-i.startPosition.y<0)){var u=o.canvas,c=sn$1;c.x=u.clientWidth/2,c.y=u.clientHeight/2;var h,d=a.getPickRay(c,Ie$2),f=h$1b.rayEllipsoid(d,r);if(t$$(f))h=n$18.getPoint(d,f.start,Pt$1);else{if(!(l>e._minimumTrackBallHeight)){e._looking=!0;var p=e._ellipsoid.geodeticSurfaceNormal(a.position,ze$1);return U$6(e,t,i,p),void r$T.clone(t,e._tiltCenterMousePosition)}var _=h$1b.grazingAltitudeLocation(d,r);if(!t$$(_))return;var m=r.cartesianToCartographic(_,Se$1);m.height=0,h=r.cartographicToCartesian(m,Pt$1)}if(a$11.clone(h,e._tiltCenter),!n){var $=m$13.eastNorthUpToFixedFrame(h,r,Re$1),g=e._globe,y=e._ellipsoid;e._globe=void 0,e._ellipsoid=n$1c.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;var v=c$1a.clone(a.transform,Ee$2);a._setTransform($),K$3(e,t,i,a$11.UNIT_Z),a._setTransform(v),e._globe=g,e._ellipsoid=y;var x=y.maximumRadius;e._rotateFactor=1/x,e._rotateRateRangeAdjustment=x}}}var Xt=new a$11;function nt$3(e,t){var i=e._scene,n=i.camera,r=e._cloneCamera,o=n.position,a=r.position;if(!a$11.equals(a,o)){var s=a$11.subtract(a,o,Xt);a$11.normalize(s,s);var l=i.collideDetection(s);if(t$$(l))if(i.mode===b$1d.COLUMBUS_VIEW&&(l=a$11.fromElements(l.y,l.z,l.x)),a$11.distance(o,l)<(t=e$1Y(t,e.minimumDetectDistance)))return}p$m.clone(r,i.camera)}function dn$1(e,t,i,n){var r,o,a,s=e._ellipsoid,l=e._scene,u=l.camera;if(e.enableIndoorColliDetection&&(t$$(e._cloneCamera)||(e._cloneCamera=p$m.clone(l.camera)),p$m.clone(l.camera,e._cloneCamera),u=e._cloneCamera),r$T.equals(t,e._tiltCenterMousePosition)&&!e._isAroundScreenCenter)r=a$11.clone(e._tiltCenter,Pt$1);else{if(!t$$(r=J$5(e,t,Pt$1))){if(o=u.getPickRay(t,Ie$2),!t$$(a=h$1b.rayEllipsoid(o,s)))return;r=n$18.getPoint(o,a.start,Pt$1)}r$T.clone(t,e._tiltCenterMousePosition),e._tiltCenter=a$11.clone(r,e._tiltCenter)}if(!n){var c=m$13.eastNorthUpToFixedFrame(r,s,Re$1),h=e._globe,d=e._ellipsoid;e._globe=void 0,e._ellipsoid=n$1c.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;var f=a$11.UNIT_Z,p=c$1a.clone(u.transform,Ee$2);u._setTransform(c),K$3(e,t,i,f),u._setTransform(p),e._globe=h,e._ellipsoid=d;var _=d.maximumRadius;e._rotateFactor=1/_,e._rotateRateRangeAdjustment=_,e.enableIndoorColliDetection&&nt$3(e),u._suspendTerrainAdjustment=!1,u._adjustHeightForTerrain()}}var _n$1=new r$T,un$1=new r$T,Qt$1=new n$18,Jt$1=new n$18,vn$1=new a$11,gn$1=new a$11;function U$6(e,t,i,n){var r=e._scene.camera,o=_n$1;o.x=i.startPosition.x,o.y=0;var a=un$1;a.x=i.endPosition.x,a.y=0;var s,l,u=r.getPickRay(o,Qt$1),c=r.getPickRay(a,Jt$1),h=0;r.frustum instanceof r$K?(s=u.origin,l=c.origin,a$11.add(r.direction,s,s),a$11.add(r.direction,l,l),a$11.subtract(s,r.position,s),a$11.subtract(l,r.position,l),a$11.normalize(s,s),a$11.normalize(l,l)):(s=u.direction,l=c.direction);var d=a$11.dot(s,l);d<1&&(h=Math.acos(d)),h=i.startPosition.x>i.endPosition.x?-h:h;var f=e._horizontalRotationAxis;if(t$$(n)?r.look(n,-h):t$$(f)?r.look(f,-h):r.lookLeft(h),o.x=0,o.y=i.startPosition.y,a.x=0,a.y=i.endPosition.y,s=r.getPickRay(o,Qt$1).direction,l=r.getPickRay(a,Jt$1).direction,u=r.getPickRay(o,Qt$1),c=r.getPickRay(a,Jt$1),h=0,r.frustum instanceof r$K?(s=u.origin,l=c.origin,a$11.add(r.direction,s,s),a$11.add(r.direction,l,l),a$11.subtract(s,r.position,s),a$11.subtract(l,r.position,l),a$11.normalize(s,s),a$11.normalize(l,l)):(s=u.direction,l=c.direction),(d=a$11.dot(s,l))<1&&(h=Math.acos(d)),h=i.startPosition.y>i.endPosition.y?-h:h,t$$(n=e$1Y(n,f))){var p=r.direction,_=a$11.negate(n,vn$1),m=a$11.equalsEpsilon(p,n,n$1d.EPSILON2),$=a$11.equalsEpsilon(p,_,n$1d.EPSILON2);if(m||$)(m&&h<0||$&&h>0)&&r.look(r.right,-h);else{d=a$11.dot(p,n);var g=n$1d.acosClamped(d);h>0&&h>g&&(h=g-n$1d.EPSILON4),d=a$11.dot(p,_),g=n$1d.acosClamped(d),h<0&&-h>g&&(h=-g+n$1d.EPSILON4);var y=a$11.cross(n,p,gn$1);r.look(y,h)}}else r.lookUp(h)}var S$b=new a$11,ke=new a$11;function zt(e,t){var i=new s$1h(t);S$b=a$11.multiplyByScalar(e,.1,S$b),a$11.add(t,S$b,S$b);var n=i.projectPointOntoPlane(S$b),r=i.projectPointOntoEllipsoid(n),o=i.projectPointOntoPlane(t),a=i.projectPointOntoEllipsoid(o),s=a$11.subtract(r,a,ke);return a$11.normalize(s,s),s}function kt$1(e,t){var i=n$17.ORIGIN_XY_PLANE;S$b=a$11.multiplyByScalar(e,.1,S$b),a$11.add(t,S$b,S$b);var n=n$17.projectPointOntoPlane(i,S$b),r=n$17.projectPointOntoPlane(i,t),o=a$11.subtract(n,r,ke);return a$11.normalize(o,o),o}var Kt=new n$18,lt$1=new i$1g,Y$3=new a$11;function pn$1(e,t){var i=t.positionCartographic;lt$1.longitude=i.longitude,lt$1.latitude=i.latitude,lt$1.height=i.height>0?0:i.height-10,i$1g.toCartesian(lt$1,void 0,Y$3);var n=a$11.subtract(Y$3,t.position,Y$3);a$11.normalize(n,n),Kt.origin=t.position,Kt.direction=n;var r=e.pickFromRay(Kt);if(t$$(r)&&t$$(r.position)){var o=r.position;return i$1g.fromCartesian(o,void 0,lt$1).height}}function hn$1(e,t,i){var n=t.positionCartographic,r=pn$1(e,t);if(!t$$(r)||Math.abs(n.height-r-i)<1)return t.position;n.height=r-Zt>2?i+1.8:r+i,Zt=n.height;var o=i$1g.toCartesian(n);return t$$(o)?o:t.position}var Nt=new a$11,Dt=new a$11;function fn$1(e){var t=e._scene,i=t.camera,n=e._aggregator._flags,r=i.position,o=5*e.walkParameters.speed,a=e.walkParameters.height;n.moveForward&&At(e,zt(i.direction,r),o),n.moveBackward&&(Nt.x=-i.direction.x,Nt.y=-i.direction.y,Nt.z=-i.direction.z,At(e,zt(Nt,r),o)),n.moveLeft&&(Dt.x=-i.right.x,Dt.y=-i.right.y,Dt.z=-i.right.z,At(e,zt(Dt,r),.1*o)),n.moveRight&&At(e,zt(i.right,r),.1*o),i.position=hn$1(t,i,a)}function At(e,t,i){var n=e._scene,r=n.camera.position;a$11.multiplyByScalar(t,i,S$b),a$11.add(r,S$b,S$b);var o=!0;if(!a$11.equals(S$b,r)){var a=a$11.subtract(S$b,r,Xt);a$11.normalize(a,a);var s=n.collideDetection(a);if(t$$(s))a$11.distance(S$b,r)-a$11.distance(r,s)>-e.minimumDetectDistance*Math.abs(i)&&(o=!1)}(o||!e.enableIndoorColliDetection)&&a$11.clone(S$b,r)}function wn$1(e){var t,i=e._scene.camera,n=e._aggregator._flags,r=i.position,o=5*e.walkParameters.speed;n.moveForward&&(t=kt$1(i.direction,r),i.move(t,o)),n.moveBackward&&(t=kt$1(i.direction,r),i.move(t,-o)),n.moveLeft&&(t=kt$1(i.right,r),i.move(t,-o)),n.moveRight&&(t=kt$1(i.right,r),i.move(t,o))}function yn$1(e){N$4(e,e.enableRotate,e.rotateEventTypes,tn$1,e.inertiaSpin,"_lastInertiaSpinMovement"),N$4(e,e.enableZoom,e.zoomEventTypes,xe$3,e.inertiaZoom,"_lastInertiaZoomMovement"),N$4(e,e.enableTilt,e.tiltEventTypes,ln$1,e.inertiaSpin,"_lastInertiaTiltMovement"),N$4(e,e.enableLook,e.lookEventTypes,U$6)}wt.prototype.update=function(){c$1a.equals(this._scene.camera.transform,c$1a.IDENTITY)?(this._globe=this._scene.globe,this._ellipsoid=t$$(this._globe)?this._globe.ellipsoid:this._scene.mapProjection.ellipsoid):(this._globe=void 0,this._ellipsoid=n$1c.UNIT_SPHERE),this._minimumCollisionTerrainHeight=this.minimumCollisionTerrainHeight*this._scene.terrainExaggeration,this._minimumPickingTerrainHeight=this.minimumPickingTerrainHeight*this._scene.terrainExaggeration,this._minimumTrackBallHeight=this.minimumTrackBallHeight*this._scene.terrainExaggeration;var e=this._ellipsoid.maximumRadius;this._rotateFactor=1/e,this._rotateRateRangeAdjustment=e;var t=this._scene.mode;t===b$1d.SCENE2D?Ro$1(this):t===b$1d.COLUMBUS_VIEW?(this._horizontalRotationAxis=a$11.UNIT_Z,Jo$1(this),this.enableWalk&&wn$1(this)):t===b$1d.SCENE3D&&(this._horizontalRotationAxis=void 0,yn$1(this),this.enableWalk&&fn$1(this)),this._aggregator.reset()},wt.prototype.isDestroyed=function(){return!1},wt.prototype.destroy=function(){return this._tweens.removeAll(),this._aggregator=this._aggregator&&this._aggregator.destroy(),s$1e(this)};var E$9="uniform sampler2D colorTexture;\nuniform sampler2D colorTexture2;\nuniform vec2 center;\nuniform float radius;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 color0 = texture2D(colorTexture, v_textureCoordinates);\nvec4 color1 = texture2D(colorTexture2, v_textureCoordinates);\nfloat x = length(gl_FragCoord.xy - center) / radius;\nfloat t = smoothstep(0.5, 0.8, x);\ngl_FragColor = mix(color0 + color1, color1, t);\n}\n",j$2="uniform sampler2D colorTexture;\nuniform float avgLuminance;\nuniform float threshold;\nuniform float offset;\nvarying vec2 v_textureCoordinates;\nfloat key(float avg)\n{\nfloat guess = 1.5 - (1.5 / (avg * 0.1 + 1.0));\nreturn max(0.0, guess) + 0.1;\n}\nvoid main()\n{\nvec4 color = texture2D(colorTexture, v_textureCoordinates);\nvec3 xyz = czm_RGBToXYZ(color.rgb);\nfloat luminance = xyz.r;\nfloat scaledLum = key(avgLuminance) * luminance / avgLuminance;\nfloat brightLum = max(scaledLum - threshold, 0.0);\nfloat brightness = brightLum / (offset + brightLum);\nxyz.r = brightness;\ngl_FragColor = vec4(czm_XYZToRGB(xyz), 1.0);\n}\n";function s$b(){this._sceneFramebuffer=new d$c,this._stMatrix3=r$W.clone(r$W.IDENTITY),this._isMultiViewport=!1;var e=.125,t=new Array(6);t[0]=new p$b({fragmentShader:V$c,textureScale:e,forcePowerOfTwo:!0,sampleMode:e$9.LINEAR});var i=t[1]=new p$b({fragmentShader:j$2,uniforms:{avgLuminance:.5,threshold:.25,offset:.1},textureScale:e,forcePowerOfTwo:!0}),n=this;this._delta=1,this._sigma=2,this._blurStep=new r$T,t[2]=new p$b({fragmentShader:P$h,uniforms:{step:function(){return n._blurStep.x=n._blurStep.y=1/i.outputTexture.width,n._blurStep},delta:function(){return n._delta},sigma:function(){return n._sigma},direction:0},textureScale:e,forcePowerOfTwo:!0}),t[3]=new p$b({fragmentShader:P$h,uniforms:{step:function(){return n._blurStep.x=n._blurStep.y=1/i.outputTexture.width,n._blurStep},delta:function(){return n._delta},sigma:function(){return n._sigma},direction:1},textureScale:e,forcePowerOfTwo:!0}),t[4]=new p$b({fragmentShader:V$c,sampleMode:e$9.LINEAR}),this._uCenter=new r$T,this._uRadius=void 0,t[5]=new p$b({fragmentShader:E$9,uniforms:{center:function(){return n._uCenter},radius:function(){return n._uRadius},colorTexture2:function(){return n._sceneFramebuffer.getFramebuffer().getColorTexture(0)}}}),this._stages=new d$b({stages:t});for(var r=new g$7(this),o=t.length,a=0;a<o;++a)t[a]._textureCache=r;this._textureCache=r,this.length=t.length}s$b.prototype.get=function(e){return this._stages.get(e)},s$b.prototype.getStageByName=function(e){for(var t=this._stages.length,i=0;i<t;++i){var n=this._stages.get(i);if(n.name===e)return n}};var Q$3=new a$10,B$4=new r$T,U$5=new r$T,D$8=new c$1a;function k$4(e,t,i){var n=t.uniformState,r=n.sunPositionWC,o=n.view,a=n.viewProjection,s=n.projection,l=c$1a.computeViewportTransformation(i,0,1,D$8),u=c$1a.multiplyByPoint(o,r,Q$3),c=m$13.pointToGLWindowCoordinates(a,l,r,B$4);u.x+=n$1d.SOLAR_RADIUS;var h=m$13.pointToGLWindowCoordinates(s,l,u,u),d=30*r$T.magnitude(r$T.subtract(h,c,h))*2,f=U$5;f.x=d,f.y=d,e._uCenter=r$T.clone(c,e._uCenter),e._uRadius=.15*Math.max(f.x,f.y);var p=t.drawingBufferWidth,_=t.drawingBufferHeight,m=e._stages,$=m.get(0),g=$.outputTexture.width,y=$.outputTexture.height,v=new n$13;v.width=g,v.height=y,l=c$1a.computeViewportTransformation(v,0,1,D$8),c=m$13.pointToGLWindowCoordinates(a,l,r,B$4),f.x*=g/p,f.y*=y/_;var x=$.scissorRectangle;x.x=Math.max(c.x-.5*f.x,0),x.y=Math.max(c.y-.5*f.y,0),x.width=Math.min(f.x,p),x.height=Math.min(f.y,_);for(var b=1;b<4;++b)n$13.clone(x,m.get(b).scissorRectangle)}s$b.prototype.clear=function(e,t,i){this._sceneFramebuffer.clear(e,t,i),this._textureCache.clear(e)},s$b.prototype.update=function(e){var t=e.context,i=e.viewport,n=this._sceneFramebuffer;n.update(t,i);var r=n.getFramebuffer();return this._textureCache.update(t),this._stages.update(t,!1),k$4(this,t,i),r},s$b.prototype.execute=function(e){var t=this._sceneFramebuffer.getFramebuffer().getColorTexture(0),i=this._stages,n=i.length;i.get(0).execute(e,t);for(var r=1;r<n;++r)i.get(r).execute(e,i.get(r-1).outputTexture)};const z$5=new r$W(1,0,-.5,0,1,-.5,0,0,1);s$b.prototype.copy=function(e,t,i){if(t$$(i)&&t$$(i.viewport)){this._isMultiViewport=!0;var n=i.viewport,r=e.drawingBufferWidth,o=e.drawingBufferHeight,a=[n.width/r,0,(n.x+.5*n.width)/r,0,n.height/o,(n.y+.5*n.height)/o,0,0,1];r$W.fromRowMajorArray(a,this._stMatrix3),r$W.multiply(this._stMatrix3,z$5,this._stMatrix3)}if(!t$$(this._copyColorCommand)){var s=this;const t="\n uniform sampler2D colorTexture;\n varying vec2 v_textureCoordinates;\n uniform mat3 stMatrix3;\n void main(){\n vec3 st = stMatrix3 * vec3(v_textureCoordinates, 1.0);\n gl_FragColor = texture2D(colorTexture, st.xy);\n }\n ";this._copyColorCommand=e.createViewportQuadCommand(t,{uniformMap:{colorTexture:function(){return s._stages.get(s._stages.length-1).outputTexture},stMatrix3:function(){return s._isMultiViewport?s._stMatrix3:r$W.IDENTITY}},owner:this})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e,i),this._isMultiViewport=!1},s$b.prototype.isDestroyed=function(){return!1},s$b.prototype.destroy=function(){return this._textureCache.destroy(),this._stages.destroy(),s$1e(this)};var Oe$1=new i$17("MapQuest, SuperMap iServer Imagery"),Z$4=[1.690163571602655e-9,3.3803271432053056e-9,6.760654286410611e-9,1.3521308572821242e-8,2.7042617145642484e-8,5.408523429128511e-8,1.0817046858256998e-7,2.1634093716513974e-7,4.3268187433028044e-7,8.653637486605571e-7,17307274973211203e-22,34614549946422405e-22,69229099892844565e-22,13845819978568952e-21,27691639957137904e-21,553832799142758e-19,.0001107665598285516,.0002215331196571032,.0004430662393142064,.0008861324786284128,.001772264957256826,.003544529914513652,.007089059829027304,.014178119658054609,.028356239316109217,.056712478632218434,.11342495726443687,.2684991452887374],ue$1=[1.690163571602655e-9,3.38026990562e-9,6.76053981124e-9,1.352107962249e-8,2.704215924497e-8,5.408431848995e-8,1.0816863697989e-7,2.1633727395979e-7,4.3267454791958e-7,8.6534909583916e-7,173069819167831e-20,346139638335662e-20,692279276671324e-20,1384558553342649e-20,2769117106685297e-20,5538234213370595e-20,.0001107646842674119,.0002215293685348238,.0004430587370696476,.0008861174741392952,.0017722349482785903,.0035444698965571807,.007088939793114361],U$4=function(e){if(!t$$((e=e$1Y(e,{})).url))throw new t$_("options.url is required.");this._baseUrl=e.url,this._prjCoordSys=e.prjCoordSys;var t=(n=e.url).substring(0,n.indexOf("/datas"));this.tablename=n.substring(n.indexOf("datas/")+6,n.length);var i=this;new d$_({name:t+this.tablename}).then((function(e){e.checkObjectStoreExit(i.tablename)?i._indexedDBScheduler=e:e.createObjectStore(i.tablename).then((function(){i._indexedDBScheduler=e}))})),this._indexedDBSetting={isOpen:!1,clear:function(){i._indexedDBScheduler.clear(i.tablename)},cache:[]},this.isSci3D=!1,this.isTileMap=!1;var n=e$1Z(e.url);if(this._packingRequest=e.packingRequest,this._url=n,this._resource=t$X.createIfNeeded(n),this._resolution=t$$(e.highResolution)?2:1,this._transparent=e$1Y(e.transparent,!0),this._name=e.name||"",this._urlTemplate=void 0,this._errorEvent=new o$15,this._fileExtension="png",this._tileWidth=256,this._tileHeight=256,this._tileFormat=e.tileFormat||"png",this._scales=Z$4,this._rasterfunction=e$1Y(e.rasterfunction,void 0),this._regions=e.regions,this._cache=e$1Y(e._cache,!0),this._rectangleExtentValue=e$1Y(e.rectangleExtentValue,0),this._isBlock=!1,this._blockCache={},this._blockCacheQueue=new s$19,this._blockCacheSize=100,this._blockScale=0,this._tileversion=e$1Y(e.tileversion,""),this._minimumLevel=e$1Y(e.minimumLevel,0),this._maximumLevel=e.maximumLevel,this._rectangle=void 0,this._tilingScheme=e.tilingScheme,this._subdomains=e.subdomains,this._origin=e$1Y(e.origin,null),t$$(e.tilingScheme)&&t$$(e.tilingScheme._scaleDenominators)){this._scales=[];for(var r=0;r<e.tilingScheme._scaleDenominators.length;r++)this._scales[r]=1/e.tilingScheme._scaleDenominators[r]}this._flipY=!1,this._tileDiscardPolicy=e.tileDiscardPolicy,this._fRatio=e$1Y(e.ratio,n$1d.DEGREES_PER_RADIAN/n$1c.WGS84.maximumRadius),this._coordUnit="DEGREE",this._customRequestHeaders=e.customRequestHeaders;var o=e$1Y(e.credit,Oe$1);this._cacheKey=e$1Y(e.cacheKey,""),this._cacheEnabled=e$1Y(e.cacheEnabled,!0),"string"==typeof o&&(o=new i$17(o)),this._credit=o,this._ready=!1,this._readyPromise=c$18.defer();i=this;t$$(this._subdomains)&&(n=n.replace(/({.*?})/g,(function(e,t){if(!t$$(i._subdomains.length))throw new t$_("detected subdomain url scheme, but no subdomain provided.");return"{s}"===t?i._subdomains[0]:e}))),this._layerStatusParameters=e$1Y(e.layerStatusParameters,void 0),this._layerStatusParametersID=void 0;var a,s=!0;if(this._layerStatusParameters&&(s=he$1(this)),n.indexOf("rest/maps")>-1)this.isTileMap=!0,this.layersID=e.layersID;else{if(!(n.indexOf("rest/realspace")>-1)){var l=n+"config";return t$$(a$R.CREDENTIAL)&&(l=t$$(a$R.CREDENTIAL._keymap[i._baseUrl])?a$R.addTokenWithKey(i._baseUrl,l):a$R.addToken(l)),void c$18.all([o$W(l,i._customRequestHeaders),s]).then(c).otherwise((function(){var e=n.slice(0,-1)+".json";t$$(a$R.CREDENTIAL)&&(e=t$$(a$R.CREDENTIAL._keymap[i._baseUrl])?a$R.addTokenWithKey(i._baseUrl,e):a$R.addToken(e));var t=u$$(e,i.customRequestHeaders);c$18.all([t,s]).then(h,d)}))}this.isSci3D=!0}function u(){if(i.isTileMap){var e=n.slice(0,-1)+".json";t$$(a$R.CREDENTIAL)&&(e=t$$(a$R.CREDENTIAL._keymap[i._baseUrl])?a$R.addTokenWithKey(i._baseUrl,e):a$R.addToken(e)),t$$(i._prjCoordSys)&&(e=e.includes("?")?e+"&prjCoordSys="+JSON.stringify(i._prjCoordSys):e+"?prjCoordSys="+JSON.stringify(i._prjCoordSys));var t=u$$(e,i.customRequestHeaders);c$18.all([t,s]).then(h,d)}else{var r=n+"config";t$$(a$R.CREDENTIAL)&&(r=t$$(a$R.CREDENTIAL._keymap[i._baseUrl])?a$R.addTokenWithKey(i._baseUrl,r):a$R.addToken(r)),c$18.all([o$W(r,i._customRequestHeaders),s]).then(c,d)}}function c(t){i.isSci3D=!0;var n=function(e){var t=(e=f.parseFromString(e,"application/xml")).childNodes[0],n="http://www.supermap.com/SuperMapCache/sci3d",r=e$1Y(Be$3(t,"xmlns:sml"),n);B$3(t,"Version",r);var o=Me$4(H$7(t,"StoreType",r),"BlockScale");"number"==typeof o&&(i._isBlock=!0,i._blockScale=o);for(var a=Ae$1(H$7(t,"Levels",r),"Level",r),s=[],l=0,u=a.length;l<u;l++)s.push(parseInt(a[l].textContent,10));var c=H$7(t,"Bounds",r),h=B$3(c,"Left",r),d=B$3(c,"Right",r),p=B$3(c,"Top",r),_=B$3(c,"Bottom",r),m=de$1(t,"FileExtentName",r),$=B$3(t,"CellWidth",r),g=B$3(t,"CellHeight",r),y=de$1(t,"CacheName",r);return i._name||(i._name=y||""),{left:h,right:d,top:p,bottom:_,fileExtentName:m,levels:s,imageSizeWidth:$,imageSizeHeight:g}}(t[0]);i._fileExtension=e$1Y(n.fileExtentName,"png"),i._tileWidth=e$1Y(n.imageSizeWidth,256),i._tileHeight=e$1Y(n.imageSizeHeight,256);var r=n.levels,o=r.length;i._minimumLevel=e$1Y(r[0],0),i._maximumLevel=e$1Y(i._maximumLevel,r[o-1]),t$$(i._tilingScheme)||(i._tilingScheme=new a$W({ellipsoid:e.ellipsoid}));var a,s,l,u,c=i._tilingScheme;t$$(i._rectangle)||t$$(n.left)&&t$$(n.right)&&t$$(n.top)&&t$$(n.bottom)&&(a=n$1d.toRadians(n.left),l=n$1d.toRadians(n.right),s=n$1d.toRadians(n.bottom),u=n$1d.toRadians(n.top),a>Math.PI&&(a$11.globalOffset.x=Math.floor(a/Math.PI)*Math.PI,a-=a$11.globalOffset.x,l-=a$11.globalOffset.x,a$11.globalOffset.x*=6378137),u>.5*Math.PI&&(a$11.globalOffset.y=Math.floor((u+.5*Math.PI)/Math.PI)*Math.PI,u-=a$11.globalOffset.y,s-=a$11.globalOffset.y,a$11.globalOffset.y*=6378137),i._rectangle=new s$1p(a,s,l,u));i._rectangle.west<c.rectangle.west&&(i._rectangle.west=c.rectangle.west),i._rectangle.east>c.rectangle.east&&(i._rectangle.east=c.rectangle.east),i._rectangle.south<c.rectangle.south&&(i._rectangle.south=c.rectangle.south),i._rectangle.north>c.rectangle.north&&(i._rectangle.north=c.rectangle.north);var h=c.positionToTileXY(s$1p.southwest(i._rectangle),i._minimumLevel),d=c.positionToTileXY(s$1p.northeast(i._rectangle),i._minimumLevel);(Math.abs(d.x-h.x)+1)*(Math.abs(d.y-h.y)+1)>4&&(i._minimumLevel=0),i._tilingScheme=c,i._urlTemplate=i._url+"data/index/{y}/{x}.{fileExtension}?level={level}",i._ready=!0,i._readyPromise.resolve(!0)}function h(t){i.isTileMap=!0,i.layersID=e.layersID;var n=t[0],r=n.prjCoordSys.coordUnit;i._coordUnit=r,n.prjCoordSys.projection;var o,a,s=n.bounds,l=n.visibleScales;if(i.customScales=l&&l.length>0,"DEGREE"==r){var u=i._resolution;i._tilingScheme=new a$W({numberOfLevelZeroTilesX:2*u,numberOfLevelZeroTilesY:u});var c=i._rectangleExtentValue;if(s.left=n$1d.clamp(s.left-c,-180,180),s.bottom=n$1d.clamp(s.bottom-c,-90,90),s.right=n$1d.clamp(s.right+c,-180,180),s.top=n$1d.clamp(s.top+c,-90,90),n$1d.equalsEpsilon(s.left,s.right,n$1d.EPSILON7)&&(s.right+=n$1d.EPSILON5),n$1d.equalsEpsilon(s.top,s.bottom,n$1d.EPSILON7)&&(s.top+=n$1d.EPSILON5),i._rectangle=s$1p.fromDegrees(s.left,s.bottom,s.right,s.top),i._urlTemplate=i._url+"tileImage."+i._tileFormat+"?transparent={transparent}&cacheEnabled="+i._cacheEnabled+'&_cache={_cache}&width=256&height=256&x={x}&y={y}&scale={scale}&redirect=false&overlapDisplayed=false&origin={"x":-180,"y":90}{tileversion}',(l=e$1Y(e.scales,l)).length>0){var h=[];for(var d=i.customScales?0:u;d<l.length;d++)h.push(1/l[d]);i._tilingScheme._scaleDenominators=h,n.dpi&&(i._tilingScheme._customDPI=new Cesium.Cartesian2(n.dpi,n.dpi)),i._tilingScheme._rectangle=i._rectangle,null!=i._origin?(o=i._origin[0],a=i._origin[1]):(o=s.left,a=s.top),i._urlTemplate=i._url+"tileImage."+i._tileFormat+"?transparent={transparent}&cacheEnabled="+i._cacheEnabled+'&_cache={_cache}&width=256&height=256&x={x}&y={y}&scale={scale}&redirect=false&overlapDisplayed=false&origin={"x":'+o+',"y":'+a+"}{tileversion}",i._maximumLevel=h.length}}else{c=i._rectangleExtentValue;var f=new a$11(s.left-c,s.bottom-c,0);f.x>20037508.342789244&&(a$11.globalOffset.x=20037508.342789244*Math.floor(f.x/20037508.342789244),f.x=f.x-a$11.globalOffset.x),f.y>10018754.171394622&&(a$11.globalOffset.y=20037508.342789244*Math.floor((f.y+10018754.171394622)/20037508.342789244),f.y=f.y-a$11.globalOffset.y);var p=new a$11(s.right+c,s.top+c,0);if(p.x=Math.min(20037508.342789244,p.x-a$11.globalOffset.x),p.y=Math.min(20037508.342789244,p.y-a$11.globalOffset.y),t$$(i._tilingScheme)){h=[];if(i._tilingScheme._scaleDenominators)h=i._tilingScheme._scaleDenominators;else for(d=0;d<l.length;d++)h.push(1/l[d]);i._tilingScheme._scaleDenominators=h,n.dpi&&(i._tilingScheme._customDPI=new Cesium.Cartesian2(n.dpi,n.dpi)),i._tilingScheme._rectangleNortheastInMeters=p,i._tilingScheme._rectangleSouthwestInMeters=f;var _=i._tilingScheme._projection.unproject(f),m=i._tilingScheme._projection.unproject(p);if(i._tilingScheme._rectangle=new s$1p(_.longitude,_.latitude,m.longitude,m.latitude),l.length>0){var $=l[0];u=.0254/(n.dpi*$);i._tilingScheme._numberOfLevelZeroTilesX=Math.ceil((p.x-f.x)/u/n.viewer.width),i._tilingScheme._numberOfLevelZeroTilesY=Math.ceil((p.y-f.y)/u/n.viewer.height)}}else{var g,y,v=t$$(n.prjCoordSys)&&t$$(n.prjCoordSys.projection)&&("PRJ_SPHERE_MERCATOR"===n.prjCoordSys.projection.type||"PRJ_TRANSVERSE_MERCATOR"===n.prjCoordSys.projection.type),x=v?new e$1H:new s$1q;h=[];if(!v){for(d=0;d<l.length;d++)h.push(1/l[d]);if(l.length>0){n.viewBounds.rightTop,n.viewBounds.leftBottom;$=l[0],u=.0254/(n.dpi*$);g=Math.ceil((p.x-f.x)/u/n.viewer.width),y=Math.ceil((p.y-f.y)/u/n.viewer.height)}}!v&&l.length>0?i._tilingScheme=new o$Z({numberOfLevelZeroTilesX:g,numberOfLevelZeroTilesY:y,projection:x,rectangleSouthwestInMeters:f,rectangleNortheastInMeters:p,customDPI:new Cesium.Cartesian2(n.dpi,n.dpi),scaleDenominators:h}):i._tilingScheme=new o$Z({projection:x})}_=i._tilingScheme._projection.unproject(f),m=i._tilingScheme._projection.unproject(p);i._rectangle=new s$1p(_.longitude,_.latitude,m.longitude,m.latitude),!v&&(l.length>0||h.length>0)?(null!=i._origin?(o=i._origin[0],a=i._origin[1]):(o=s.left,a=s.top),i._urlTemplate=i._url+"tileImage."+i._tileFormat+"?transparent={transparent}&cacheEnabled="+i._cacheEnabled+'&_cache={_cache}&width=256&height=256&x={x}&y={y}&scale={scale}&redirect=false&overlapDisplayed=false&origin={"x":'+o+',"y":'+a+"}{tileversion}"):(null!=i._origin?(o=i._origin[0],a=i._origin[1]):(o=-20037508.342789248,a=20037508.342789095),i._urlTemplate=i._url+"tileImage."+i._tileFormat+"?transparent={transparent}&cacheEnabled="+i._cacheEnabled+'&_cache={_cache}&width=256&height=256&x={x}&y={y}&scale={scale}&redirect=false&overlapDisplayed=false&origin={"x":'+o+',"y":'+a+"}{tileversion}")}if(t$$(l)&&Array.isArray(l)&&l.length>1)if(i._tilingScheme.projection instanceof s$1q)i._scales=l,i._maximumLevel=l.length-1-i._resolution;else{var b=l[l.length-1];i._maximumLevel=Pe$1(i,b),n.prjCoordSys.name.indexOf("Beijing")>-1&&n.prjCoordSys.name.indexOf("1954")>-1&&(i._scales=ue$1)}else t$$(i._maximumLevel)||(i._maximumLevel=i._scales.length-1);"GCS_Beijing_1954"===n.prjCoordSys.name&&(!t$$(l)||0==l.length)&&(i._scales=ue$1),i._urlTemplate=i._urlTemplate.replace("{transparent}",i._transparent),i._urlTemplate=i._urlTemplate.replace("{_cache}",i._cache),t$$(i._rasterfunction)&&(i._urlTemplate=i._urlTemplate+"&rasterfunction={rasterfunction}"),i.layersID&&(i._urlTemplate=i._urlTemplate+"&layersID="+i.layersID),t$$(i._regions)&&(i._urlTemplate=i._urlTemplate+"®ions="+i._regions),t$$(i._prjCoordSys)&&(i._urlTemplate=i._urlTemplate+"&prjCoordSys="+JSON.stringify(i._prjCoordSys)),i._rectangle||(i._rectangle=e$1Y(e.rectangle,i._tilingScheme.rectangle)),i._ready=!0,i._readyPromise.resolve(!0)}function d(e){var t="An error occurred while accessing "+i._url+".";a=c$_.handleError(a,i,i._errorEvent,t,void 0,void 0,void 0,u),i._readyPromise.reject(new t$Z(t))}u();var f=new DOMParser};function he$1(e){var t=c$18.defer(),i=new r$V,n=e._url+"tempLayersSet.jsonp";return t$$(a$R.CREDENTIAL)&&(n=a$R.addToken(n)),m$M(n,{parameters:{_method:"POST",requestEntity:null,sectionCount:1,sectionIndex:0,jsonpUserID:Date.now()}},i),i.deferred.then((function(i){for(var n=new r$V,r=[],o=0;o<e._layerStatusParameters.length;o++){var a=e._layerStatusParameters[o];r.push({type:"UGC",name:a.layerName,visible:!!a.isVisible,displayFilter:a.displayFilter||""})}var s=e._url.slice(0,-1),l=s.lastIndexOf("/"),u=e._baseUrl+i.newResourceLocation.substring(i.newResourceLocation.indexOf("/tempLayersSet"));t$$(a$R.CREDENTIAL)&&(u=a$R.addToken(u)),m$M(u,{parameters:{elementRemain:!0,reference:i.newResourceID,holdTime:15,requestEntity:JSON.stringify([{type:"UGC",visible:!0,subLayers:{layers:r},name:s.slice(l+1)}]),_method:"PUT",sectionCount:1,sectionIndex:0,jsonpUserID:Date.now()}},n),n.deferred.then((function(){e._layerStatusParametersID=i.newResourceID,t.resolve(e._layerStatusParametersID)})).otherwise((function(){t.resolve(void 0)}))})),t.promise}function Pe$1(e,t){for(var i=e._scales.length;i--;)if(e._scales[i]<=t)return i}function X$4(e,t,i,n,r){var o;if(e.isTileMap){var a,s=""===e._tileversion?"":"&tileversion="+e._tileversion;if("DEGREE"===e._coordUnit)if(1===e.packingRequest)o=e._urlTemplate.replace("&x={x}&y={y}&scale={scale}","").replace("{tileversion}",s).replace("tileImage","tileImages").replace("&_cache=true","");else{let r=e.customScales?0:e.resolution;a=e._scales[n+r]||Z$4[n],o=e._urlTemplate.replace("{x}",t).replace("{y}",i).replace("{scale}",a.toString()).replace("{tileversion}",s)}else"METER"===e._coordUnit&&(1===e.packingRequest?o=e._urlTemplate.replace("&x={x}&y={y}&scale={scale}","").replace("{tileversion}",s).replace("tileImage","tileImages").replace("&_cache=true",""):(a=e._scales[n],o=e._urlTemplate.replace("{x}",t).replace("{y}",i).replace("{scale}",a.toString()).replace("{tileversion}",s)))}else o=e._urlTemplate.replace("{x}",t).replace("{y}",i).replace("{level}",n).replace("{fileExtension}",e._fileExtension);if(t$$(e._subdomains)){var l=e._subdomains,u=l[(t+i+n)%l.length];o=o.replace(Ne,(function(e,t){return"{s}"===t?u:e}))}return t$$(a$R.CREDENTIAL)&&(o=a$R.addToken(o)),o}function G$9(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;e$1B(t,o)?e$1B(e,o)&&(a|=1):(a|=2,e$1B(e,o)||(a|=1)),n+=a}return n}function me$1(e,t,i,n){var r=e._blockScale,o=Math.pow(2,r),a=Math.floor(t/o),s=t%o,l=Math.floor(i/o),u=i%o;return{x:a,y:l,url:X$4(e,a,l,n),col:s,row:u,level:n,blockSize:o}}Object.defineProperties(U$4.prototype,{url:{get:function(){return this._url}},name:{get:function(){return this._name},set:function(e){this._name=e}},customRequestHeaders:{get:function(){return this._customRequestHeaders},set:function(e){this._customRequestHeaders=e}},tileWidth:{get:function(){if(!this._ready)throw new t$_("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$_("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},tileFormat:{get:function(){return this._tileFormat}},tileversion:{get:function(){return this._tileversion}},maximumLevel:{get:function(){if(!this._ready)throw new t$_("maximumLevel must not be called before the imagery provider is ready.");return 1===this.resolution?this._maximumLevel:this._maximumLevel-1}},minimumLevel:{get:function(){if(!this._ready)throw new t$_("minimumLevel must not be called before the imagery provider is ready.");return this._minimumLevel}},tilingScheme:{get:function(){if(!this._ready)throw new t$_("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new t$_("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},ratio:{get:function(){return this._fRatio},set:function(e){this._fRatio=e}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},resolution:{get:function(){return this._resolution}},flipY:{get:function(){return this._flipY},set:function(e){this._flipY=e}},packingRequest:{get:function(){return this._packingRequest}},isBlock:{get:function(){return this._isBlock}},blockCache:{get:function(){return this._blockCache}},blockCacheQueue:{get:function(){return this._blockCacheQueue}},blockCacheSize:{get:function(){return this._blockCacheSize}},subdomains:{get:function(){return this._subdomains},set:function(e){if(t$$(e)&&!t$$(e.length))throw new t$_("Excepted SuperMapImageryProvider.subdomains to be type of Array.");this._subdomains=e}},layerStatusParameters:{get:function(){return this._layerStatusParameters}}}),U$4.prototype.setLayerStatusParameters=function(e){if(!t$$(e))throw new t$_("Parameter is required.");if(!t$$(e.length))throw new t$_("Expected parameter to be type of Array.");return this._layerStatusParameters=e,he$1(this)},U$4.prototype.getTileCredits=function(e,t,i){};var Ne=/({.*?})/g;U$4.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$_("requestImage must not be called before the imagery provider is ready.");var r=X$4(this,e,t,i),o=e,a=t;if(this.isSci3D){var s=1<<i;r=X$4(this,o=e+a$11.globalOffset.x/(6378137*Math.PI)*s,a=t+a$11.globalOffset.y/(6378137*Math.PI)*s,i)}t$$(this._layerStatusParametersID)&&(r+="&layersID="+this._layerStatusParametersID),t$$(a$R.CREDENTIAL)&&t$$(a$R.CREDENTIAL._keymap[this._baseUrl])&&(r=a$R.addTokenWithKey(this._baseUrl,r));var l=this,u={};t$$(this._rasterfunction)&&(u.rasterfunction=JSON.stringify(this._rasterfunction));var c=this._resource.getDerivedResource({url:r,request:n,templateValues:u});if(n.quadKey=G$9(e,t,i),this._packingRequest===J$_.QuadKey&&this._isBlock){n.type=V$_.BLOCKPACK,n.throttle=!0;var h=me$1(this,e,t,i);if(c.url=h.url,n.blockInfo=h,n.quadKey=G$9(h.x,h.y,h.level),n.providerName=this.url,t$$(f=this._blockCache[n.quadKey]))return this.blockCacheQueue.touch(f),f.data}else if(this._packingRequest===J$_.QuadKey){if(n.type=V$_.PACK,this.isTileMap){var d=this._scales[i+this.resolution]||Z$4[i];n.quadKey=d+":"+e+":"+t}else n.quadKey=G$9(e,t,i);n.providerName=this.url,n.throttle=!0}else if(this._isBlock){n.type=V$_.BLOCK;var f;h=me$1(this,o,a,i);if(c.url=h.url,n.blockInfo=h,n.quadKey=G$9(h.x,h.y,h.level),n.providerName=this.url,t$$(f=this._blockCache[n.quadKey])&&t$$(f.data))return this.blockCacheQueue.touch(f),f.data;if(!0===this._indexedDBSetting.isOpen&&!0===n.cacheEnable){var p,_=c$18.defer();return t$$(this._indexedDBScheduler)&&t$$(p=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey))?(c$18(p,(function(e){t$$(e)?_.resolve(e):_.resolve("cacheError")}),(function(e){_.resolve("cacheError")})),_):m(l,c)}}if(!0===this._indexedDBSetting.isOpen&&!0===n.cacheEnable)return t$$(this._indexedDBScheduler)&&t$$(p=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey))?c$18(p,(function(e){return t$$(e)?e:"cacheError"}),(function(e){return"cacheError"})):m(l,c);function m(e,t){if(e._isBlock){var i=e._blockCache[n.quadKey];if(t$$(i))return i.promise;var r=_e(e,t);return t$$(r)?(i=new e$1p(e,n.quadKey),e._blockCache[n.quadKey]=i,i.promise=r,i.promise):void 0}return _e(e,t)}return m(l,c)};var je$1=/\.ktx$/i,qe$2=/\.crn$/i,fe$1=/\.dxtz/i;function _e(e,t){n$1e.defined("url",t);var i=t$X.createIfNeeded(t);return e.isBlock||e.packingRequest===J$_.QuadKey?(fe$1.test(i.url)&&(e.flipY=!0),i.fetchArrayBuffer()):je$1.test(i.url)?k$L(i):qe$2.test(i.url)?I$W(i):fe$1.test(i.url)?(e.flipY=!0,p$_(i)):t$$(e.tileDiscardPolicy)?i.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):(t$$(e._customRequestHeaders)&&(i.headers=s$1n(i.headers,e._customRequestHeaders)),e._cacheKey.length>0?i.fetchArrayBuffer():i.fetchBlob())}function Me$4(e,t){if(t$$(e)){var i=e.getAttribute(t);if(null!==i){var n=parseFloat(i);return isNaN(n)?void 0:n}}}function Be$3(e,t){if(t$$(e)){var i=e.getAttribute(t);return null!==i?i:void 0}}function H$7(e,t,i){if(t$$(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}}function Ae$1(e,t,i){if(t$$(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}}function B$3(e,t,i){var n=H$7(e,t,i);if(t$$(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function de$1(e,t,i){var n=H$7(e,t,i);if(t$$(n))return n.textContent.trim()}U$4.prototype.pickFeatures=function(){};var k$3={},m$e=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();function w$b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var U$3=8192,b$8=[],I$3=function(){function e(t,i){w$b(this,e),i=i||{},void 0===t&&(t=U$3),"number"==typeof t&&(t=new ArrayBuffer(t));var n=t.byteLength,r=i.offset?i.offset>>>0:0;t.buffer&&(n=t.byteLength-r,t=t.byteLength!==t.buffer.byteLength?t.buffer.slice(t.byteOffset+r,t.byteOffset+t.byteLength):r?t.buffer.slice(r):t.buffer),this.buffer=t,this.length=n,this.byteLength=n,this.byteOffset=0,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer),this._increment=n||U$3,this._mark=0}return m$e(e,[{key:"available",value:function(e){return void 0===e&&(e=1),this.offset+e<=this.length}},{key:"isLittleEndian",value:function(){return this.littleEndian}},{key:"setLittleEndian",value:function(){this.littleEndian=!0}},{key:"isBigEndian",value:function(){return!this.littleEndian}},{key:"setBigEndian",value:function(){this.littleEndian=!1}},{key:"skip",value:function(e){void 0===e&&(e=1),this.offset+=e}},{key:"seek",value:function(e){this.offset=e}},{key:"mark",value:function(){this._mark=this.offset}},{key:"reset",value:function(){this.offset=this._mark}},{key:"rewind",value:function(){this.offset=0}},{key:"ensureAvailable",value:function(e){if(void 0===e&&(e=1),!this.available(e)){var t=this._increment+this._increment;this._increment=t;var i=this.length+t,n=new Uint8Array(i);n.set(new Uint8Array(this.buffer)),this.buffer=n.buffer,this.length=i,this._data=new DataView(this.buffer)}}},{key:"readBoolean",value:function(){return 0!==this.readUint8()}},{key:"readInt8",value:function(){return this._data.getInt8(this.offset++)}},{key:"readUint8",value:function(){return this._data.getUint8(this.offset++)}},{key:"readByte",value:function(){return this.readUint8()}},{key:"readBytes",value:function(e){void 0===e&&(e=1);for(var t=new Uint8Array(e),i=0;i<e;i++)t[i]=this.readByte();return t}},{key:"readInt16",value:function(){var e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}},{key:"readUint16",value:function(){var e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}},{key:"readInt32",value:function(){var e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}},{key:"readUint32",value:function(){var e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}},{key:"readFloat32",value:function(){var e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}},{key:"readFloat64",value:function(){var e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}},{key:"readChar",value:function(){return String.fromCharCode(this.readInt8())}},{key:"readChars",value:function(e){void 0===e&&(e=1),b$8.length=e;for(var t=0;t<e;t++)b$8[t]=this.readChar();return b$8.join("")}},{key:"writeBoolean",value:function(e){this.writeUint8(e?255:0)}},{key:"writeInt8",value:function(e){this.ensureAvailable(1),this._data.setInt8(this.offset++,e)}},{key:"writeUint8",value:function(e){this.ensureAvailable(1),this._data.setUint8(this.offset++,e)}},{key:"writeByte",value:function(e){this.writeUint8(e)}},{key:"writeBytes",value:function(e){this.ensureAvailable(e.length);for(var t=0;t<e.length;t++)this._data.setUint8(this.offset++,e[t])}},{key:"writeInt16",value:function(e){this.ensureAvailable(2),this._data.setInt16(this.offset,e,this.littleEndian),this.offset+=2}},{key:"writeUint16",value:function(e){this.ensureAvailable(2),this._data.setUint16(this.offset,e,this.littleEndian),this.offset+=2}},{key:"writeInt32",value:function(e){this.ensureAvailable(4),this._data.setInt32(this.offset,e,this.littleEndian),this.offset+=4}},{key:"writeUint32",value:function(e){this.ensureAvailable(4),this._data.setUint32(this.offset,e,this.littleEndian),this.offset+=4}},{key:"writeFloat32",value:function(e){this.ensureAvailable(4),this._data.setFloat32(this.offset,e,this.littleEndian),this.offset+=4}},{key:"writeFloat64",value:function(e){this.ensureAvailable(8),this._data.setFloat64(this.offset,e,this.littleEndian),this.offset+=8}},{key:"writeChar",value:function(e){this.writeUint8(e.charCodeAt(0))}},{key:"writeChars",value:function(e){for(var t=0;t<e.length;t++)this.writeUint8(e.charCodeAt(t))}},{key:"toArray",value:function(){return new Uint8Array(this.buffer,0,this.offset)}}]),e}(),s$a={};function A$a(e,t){if(e)throw new TypeError("Not a valid NetCDF v3.x file: "+t)}function E$8(e){e.offset%4!=0&&e.skip(4-e.offset%4)}function B$2(e){var t=e.readUint32(),i=e.readChars(t);return E$8(e),i}s$a.notNetcdf=A$a,s$a.padding=E$8,s$a.readName=B$2;var a$9={BYTE:1,CHAR:2,SHORT:3,INT:4,FLOAT:5,DOUBLE:6};function p$9(e){switch(Number(e)){case a$9.BYTE:return"byte";case a$9.CHAR:return"char";case a$9.SHORT:return"short";case a$9.INT:return"int";case a$9.FLOAT:return"float";case a$9.DOUBLE:return"double";default:return"undefined"}}function v$7(e,t){if(1!==e){for(var i=new Array(e),n=0;n<e;n++)i[n]=t();return i}return t()}function T$8(e,t,i){switch(t){case a$9.BYTE:return e.readBytes(i);case a$9.CHAR:return D$7(e.readChars(i));case a$9.SHORT:return v$7(i,e.readInt16.bind(e));case a$9.INT:return v$7(i,e.readInt32.bind(e));case a$9.FLOAT:return v$7(i,e.readFloat32.bind(e));case a$9.DOUBLE:return v$7(i,e.readFloat64.bind(e));default:return void A$a(!0,"non valid type "+t)}}function D$7(e){return 0===e.charCodeAt(e.length-1)?e.substring(0,e.length-1):e}var l$6=0,F$5=10,O$7=11,L$8=12;function S$a(e){var t={recordDimension:{length:e.readUint32()}},i=R$3(e);t.recordDimension.id=i.recordId,t.recordDimension.name=i.recordName,t.dimensions=i.dimensions,t.globalAttributes=N$3(e);var n=H$6(e,i.recordId);return t.variables=n.variables,t.recordDimension.recordStep=n.recordStep,t}function R$3(e){var t,i,n=e.readUint32();if(n===l$6)return s$a.notNetcdf(e.readUint32()!==l$6,"wrong empty tag for list of dimensions"),[];s$a.notNetcdf(n!==F$5,"wrong tag for list of dimensions");for(var r=e.readUint32(),o=new Array(r),a=0;a<r;a++){var s=s$a.readName(e),l=e.readUint32();0===l&&(t=a,i=s),o[a]={name:s,size:l}}return{dimensions:o,recordId:t,recordName:i}}function N$3(e){var t=e.readUint32();if(t===l$6)return s$a.notNetcdf(e.readUint32()!==l$6,"wrong empty tag for list of attributes"),[];s$a.notNetcdf(t!==L$8,"wrong tag for list of attributes");for(var i=e.readUint32(),n=new Array(i),r=0;r<i;r++){var o=s$a.readName(e),a=e.readUint32();s$a.notNetcdf(a<1||a>6,"non valid type "+a);var s=e.readUint32(),l=T$8(e,a,s);s$a.padding(e),n[r]={name:o,type:p$9(a),value:l}}return n}function H$6(e,t){var i=e.readUint32(),n=0;if(i===l$6)return s$a.notNetcdf(e.readUint32()!==l$6,"wrong empty tag for list of variables"),[];s$a.notNetcdf(i!==O$7,"wrong tag for list of variables");for(var r=e.readUint32(),o=new Array(r),a=0;a<r;a++){for(var s=s$a.readName(e),l=e.readUint32(),u=new Array(l),c=0;c<l;c++)u[c]=e.readUint32();var h=N$3(e),d=e.readUint32();s$a.notNetcdf(d<1&&d>6,"non valid type "+d);var f=e.readUint32(),p=e.readUint32();u[0]===t&&(n+=f),o[a]={name:s,dimensions:u,attributes:h,type:p$9(d),size:f,offset:p,record:u[0]===t}}return{variables:o,recordStep:n}}!function(){function e(t){w$b(this,e);var i=new I$3(t);i.setBigEndian(),s$a.notNetcdf("CDF"!==i.readChars(3),"should start with CDF");var n=i.readByte();s$a.notNetcdf(2===n,"64-bit offset format not supported yet"),s$a.notNetcdf(1!==n,"unknown version"),this.header=S$a(i),this.header.version=n,this.buffer=i}m$e(e,[{key:"getDataVariable",value:function(e){var t;return t="string"==typeof e?this.header.variables.find((function(t){return t.name===e})):e,s$a.notNetcdf(void 0===t,"variable not found"),this.buffer.seek(t.offset),t.record?data.record(this.buffer,t,this.header.recordDimension):data.nonRecord(this.buffer,t)}},{key:"version",get:function(){return 1===this.header.version?"classic format":"64-bit offset format"}},{key:"recordDimension",get:function(){return this.header.recordDimension}},{key:"dimensions",get:function(){return this.header.dimensions}},{key:"globalAttributes",get:function(){return this.header.globalAttributes}},{key:"variables",get:function(){return this.header.variables}}]),k$3.NetCDFReader=e}();var e$7={VolumeRendering:0,Slice:1,ContourValue:2},xt=Object.freeze(e$7),Re="attribute vec4 aPosition;\nattribute vec3 aTexCoord0;\nvarying vec4 vTexCoord;\nvarying vec4 vNearTexCoord;\n#ifdef HAS_LIGHT\nvarying vec4 vPositionMC;\n#endif\nuniform vec3 u_volumeBoxSize;\nuniform vec3 scale;\nuniform vec3 uOffset;\nvoid main()\n{\nvTexCoord = vec4(aTexCoord0.xyz, 1.0);\ngl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}\n",Fe$1="varying vec4 vTexCoord;\nvarying vec4 vNearTexCoord;\nuniform sampler2D u_colorTable;\nuniform vec4 u_minMaxValueAndFiltration;\nuniform vec3 u_maxVisibleTextureCoord;\nuniform vec3 u_minVisibleTextureCoord;\nuniform sampler2D u_opacityTexture;\nuniform sampler2D u_colorTexture;\nvec4 getColorForValue(float tValue)\n{\nfloat texCoord = tValue;\ntexCoord = clamp(texCoord, 0.0, 1.0);\nvec4 tColor = texture2D(u_colorTexture, vec2(texCoord, 0.5));\ntColor.a = texture2D(u_opacityTexture, vec2(texCoord, 0.5)).r;\nreturn tColor;\n}\nvec4 getSampleValue(vec3 pos)\n{\nif(vTexCoord.x > u_maxVisibleTextureCoord.x || vTexCoord.x < u_minVisibleTextureCoord.x\n|| vTexCoord.y > u_maxVisibleTextureCoord.y || vTexCoord.y < u_minVisibleTextureCoord.y\n|| vTexCoord.z > u_maxVisibleTextureCoord.z || vTexCoord.z < u_minVisibleTextureCoord.z)\n{\ndiscard;\n}\nfloat noValue;\nfloat value = czm_getVolumeValue(pos, noValue);\nvec4 color = getColorForValue(value);\nreturn color;\n}\nvoid main()\n{\nvec3 texcood = vTexCoord.xyz;\nif(uFilterMode > 0.5)\n{\ntexcood = vNearTexCoord.xyz;\n}\ngl_FragColor = getSampleValue(texcood);\ngl_FragColor = czm_gammaCorrect(gl_FragColor);\n}\n",_0x21da87=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x250f1=_0x21da87(void 0,(function(){return _0x250f1.toString().search("(((.+)+)+)+$").toString().constructor(_0x250f1).search("(((.+)+)+)+$")}));_0x250f1();var Me$3="attribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nvarying vec3 positionEC;\nvarying vec3 vTexCoord;\nvoid main()\n{\n positionEC = (czm_modelView * aPosition).xyz;\n vTexCoord = aTexCoord0.xyz;\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}",_0x4c3883=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x39617a=_0x4c3883(void 0,(function(){return _0x39617a.toString().search("(((.+)+)+)+$").toString().constructor(_0x39617a).search("(((.+)+)+)+$")}));_0x39617a();var Ge$1="uniform vec3 u_camTexCoord;\nuniform vec4 u_minMaxValueAndFiltration;\n// opacity and color textures\nuniform sampler2D u_opacityTexture;\nuniform sampler2D u_colorTexture;\nuniform vec4 u_gradientOpacityInfo;\n#ifdef CLIP_PLANE\nuniform vec4 u_clip_planes[6];\nuniform int u_clip_planes_count;\n#endif\n#ifdef APPLY_LIGHTING\n uniform vec3 uDiffuse;\n uniform vec3 uSpecular;\n uniform vec3 uAmbient;\n uniform float uShiness;\n#endif\n\nvarying vec3 positionEC;\nvarying vec3 vTexCoord;\n\nfloat realValueToScalarValue(float value){\n float minValue = u_minMaxValueAndFiltration.z;\n float maxValue = u_minMaxValueAndFiltration.w;\n return (value - minValue) / (maxValue - minValue);\n}\nfloat scalarValueToReaValue(float value){\n float minValue = u_minMaxValueAndFiltration.x;\n float maxValue = u_minMaxValueAndFiltration.y;\n return minValue + value * (maxValue - minValue);\n}\nfloat getTextureValue(vec3 pos)\n{\n float noValue;\n#ifdef MultiResolution\n\tfloat value = czm_getVolumeValueMultiResolution(pos, noValue);\n#else\n\tfloat value = czm_getVolumeValue(pos, noValue);\n#endif\n value = scalarValueToReaValue(value);\n return value;\n}\n\n// Given a normal compute the gradient opacity factors\nfloat computeGradientOpacityFactor(vec4 normal, float goscale, float goshift, float gomin, float gomax)\n{\n#ifdef GRADIENT_OPACITY\n return clamp(normal.a*goscale + goshift, gomin, gomax);\n#else\n return 1.0;\n#endif\n}\n\n// compute the normal and gradient magnitude for a position\nvec4 computeNormal(vec3 pos, float scalar, vec3 tstep)\n{\n vec4 result;\n result.x = getTextureValue(pos + vec3(tstep.x, 0.0, 0.0)) - scalar;\n result.y = getTextureValue(pos + vec3(0.0, tstep.y, 0.0)) - scalar;\n result.z = getTextureValue(pos + vec3(0.0, 0.0, tstep.z)) - scalar;\n // divide by spacing\n vec3 vSpacing = vec3(1.0);\n result.xyz /= vSpacing;\n result.w = length(result.xyz);\n // rotate to View Coords\n //result.xyz = result.x * vPlaneNormal0 + result.y * vPlaneNormal2 + result.z * vPlaneNormal4;\n if (result.w > 0.0)\n {\n result.xyz /= result.w;\n }\n return result;\n}\n\n#ifdef APPLY_LIGHTING\nvoid applyLighting(inout vec4 tColor, vec3 normal)\n{\n vec3 diffuse = uDiffuse;\n vec3 specular = uSpecular;\n vec3 ambient = uAmbient;\n float shiness = uShiness;\n vec3 normalEC = normalize(czm_normal * normal);\n float ndot = max( dot( normalEC, czm_sunDirectionEC ), 0.0 );\n ndot = ndot * 0.5 + 0.5;\n diffuse = diffuse * ndot;\n specular = specular * czm_getSpecular(czm_sunDirectionEC, normalize(-positionEC), normalEC, shiness);\n tColor.rgb = tColor.rgb*(diffuse + ambient) + specular;\n}\n#endif\n\nvec4 getColorForValue(vec3 posIS, vec3 stepIS, float tValue)\n{\n vec4 goFactor = vec4(1.0,1.0,1.0,1.0);\n#if defined(GRADIENT_OPACITY) || defined(APPLY_LIGHTING)\n vec4 normal0 = computeNormal(posIS, tValue, stepIS);\n#endif\n#ifdef GRADIENT_OPACITY\n float goscale = u_gradientOpacityInfo.z;\n float goshift = u_gradientOpacityInfo.w;\n float gomin = u_gradientOpacityInfo.x;\n float gomax = u_gradientOpacityInfo.y;\n goFactor.x = computeGradientOpacityFactor(normal0, goscale, goshift, gomin, gomax);\n#endif\n float texCoord = realValueToScalarValue(tValue);\n\ttexCoord = clamp(texCoord, 0.0, 1.0);\n vec4 tColor = texture2D(u_colorTexture, vec2(texCoord, 0.5));\n tColor.a = goFactor.x * texture2D(u_opacityTexture, vec2(texCoord, 0.5)).r;\n#ifdef APPLY_LIGHTING\n applyLighting(tColor, normal0.xyz);\n#endif\n return tColor;\n}\n\nvec4 applyBlend(vec3 posIS, vec3 endIS, vec3 stepIS, float texSampleDist)\n{\n float raySteps = 1.0 / texSampleDist;\n float jitter = 0.1;\n float stepsTraveled = jitter;\n // local vars for the loop\n vec4 color = vec4(0.0, 0.0, 0.0, 0.0);\n float tValue;\n vec4 tColor = vec4(0.0);\n // Perform initial step at the volume boundary\n // compute the scalar\n tValue = getTextureValue(posIS);\n // now map through opacity and color\n tColor = getColorForValue(posIS, stepIS, tValue);\n // handle very thin volumes\n if (raySteps <= 1.0)\n {\n tColor.a = 1.0 - pow(1.0 - tColor.a, raySteps);\n return tColor;\n }\n\n tColor.a = 1.0 - pow(1.0 - tColor.a, jitter);\n color = vec4(tColor.rgb * tColor.a, tColor.a);\n posIS += (jitter * stepIS);\n\n for (int i = 0; i < 5000 ; ++i)\n {\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n // compute the scalar\n tValue = getTextureValue(posIS);\n // now map through opacity and color\n tColor = getColorForValue(posIS, stepIS, tValue);\n float mix = (1.0 - color.a);\n color = color + vec4(tColor.rgb*tColor.a, tColor.a)*mix;\n stepsTraveled++;\n posIS += stepIS;\n if(posIS.x > 1.0 || posIS.x < 0.0 || posIS.y > 1.0 || posIS.y < 0.0 || posIS.z > 1.0 || posIS.z < 0.0){\n break; \n }\n if (color.a > 0.99) \n { \n color.a = 1.0; break; \n }\n }\n\n // if (color.a < 0.99 && (raySteps - stepsTraveled) > 0.0)\n // {\n // posIS = endIS;\n\n // // compute the scalar\n // tValue = getTextureValue(posIS);\n\n // // now map through opacity and color\n // tColor = getColorForValue(posIS, stepIS, tValue);\n // tColor.a = 1.0 - pow(1.0 - tColor.a, raySteps - stepsTraveled);\n\n // float mix = (1.0 - color.a);\n // color = color + vec4(tColor.rgb * tColor.a, tColor.a)*mix;\n // }\n return vec4(color.rgb/color.a, color.a);\n}\n\nvec2 intersectBox(vec3 texel_zero, vec3 texel_dir_norm)\n{\n vec3 minV = vec3(0.0);\n vec3 maxV = vec3(1.0);\n float t1,t2;\n t1=(minV.x-texel_zero.x)/texel_dir_norm.x;\n t2=(maxV.x-texel_zero.x)/texel_dir_norm.x;\n float tminX=min(t1,t2);\n float tmaxX=max(t1,t2);\n t1=(minV.y-texel_zero.y)/texel_dir_norm.y;\n t2=(maxV.y-texel_zero.y)/texel_dir_norm.y;\n float tminY=min(t1,t2);\n float tmaxY=max(t1,t2);\n t1=(minV.z-texel_zero.z)/texel_dir_norm.z;\n t2=(maxV.z-texel_zero.z)/texel_dir_norm.z;\n float tminZ=min(t1,t2);\n float tmaxZ=max(t1,t2);\n float largest_tmin = max(max(tminX, tminY), max(tminX, tminZ));\n float smallest_tmax = min(min(tmaxX, tmaxY), min(tmaxX, tmaxZ));\n vec2 dists = vec2(largest_tmin,smallest_tmax);\n \n#ifdef CLIP_PLANE\n for(int i = 0; i < 6; i++){\n if(i == u_clip_planes_count){\n break;\n }\n float rayDirRatio = dot(texel_dir_norm, u_clip_planes[i].xyz);\n float equationResult = dot(texel_zero.xyz, u_clip_planes[i].xyz) + u_clip_planes[i].w;\n if (rayDirRatio == 0.0){\n if (equationResult < 0.0){\n dists.x = dists.y;\n }\n continue;\n }\n float result = -1.0 * equationResult / rayDirRatio;\n if (rayDirRatio < 0.0){\n dists.y = min(dists.y, result);\n }\n else {\n dists.x = max(dists.x, result);\n }\n }\n#endif\n return dists;\n}\nvoid main()\n{\n vec3 cameraDir = normalize(positionEC.xyz);\n vec3 localZero = u_camTexCoord;\n vec3 localOne = vTexCoord.xyz;\n vec3 texel_dir_norm = normalize(localOne.xyz - localZero.xyz);\n\n vec3 texel_zero = localZero.xyz;\n vec2 nearFar = intersectBox(texel_zero, texel_dir_norm);\n // 采样间隔受相机与物体之间的距离控制\n float texSampleDist = 0.005;\n vec3 texel_step = texSampleDist * texel_dir_norm;\n float tstep = length(texel_step);\n float tnear = max(nearFar.x, 0.0) + tstep;\n float tfar = nearFar.y - tstep;\n vec3 coord;\n if(tnear > tfar){\n discard;\n }\n else{\n coord = texel_zero + texel_dir_norm * tnear;\n }\n gl_FragColor = applyBlend(coord, texel_zero + texel_dir_norm * tfar, texel_step, texSampleDist);\n}",_0x12cf63=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3ba271=_0x12cf63(void 0,(function(){return _0x3ba271.toString().search("(((.+)+)+)+$").toString().constructor(_0x3ba271).search("(((.+)+)+)+$")}));_0x3ba271();var _0x267df6=[[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,9,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,3,8,9,1,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,11,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,1,11,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,11,2,0,9,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,3,8,2,8,11,11,8,9,-1,-1,-1,-1,-1,-1,-1],[3,2,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,2,10,8,0,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,0,9,2,10,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,2,10,1,10,9,9,10,8,-1,-1,-1,-1,-1,-1,-1],[3,1,11,10,3,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,1,11,0,11,8,8,11,10,-1,-1,-1,-1,-1,-1,-1],[3,0,9,3,9,10,10,9,11,-1,-1,-1,-1,-1,-1,-1],[9,11,8,11,10,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,8,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,0,3,7,4,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,9,1,8,7,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,9,1,4,1,7,7,1,3,-1,-1,-1,-1,-1,-1,-1],[1,11,2,8,7,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,7,4,3,4,0,1,11,2,-1,-1,-1,-1,-1,-1,-1],[9,11,2,9,2,0,8,7,4,-1,-1,-1,-1,-1,-1,-1],[2,9,11,2,7,9,2,3,7,7,4,9,-1,-1,-1,-1],[8,7,4,3,2,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,7,4,10,4,2,2,4,0,-1,-1,-1,-1,-1,-1,-1],[9,1,0,8,7,4,2,10,3,-1,-1,-1,-1,-1,-1,-1],[4,10,7,9,10,4,9,2,10,9,1,2,-1,-1,-1,-1],[3,1,11,3,11,10,7,4,8,-1,-1,-1,-1,-1,-1,-1],[1,11,10,1,10,4,1,4,0,7,4,10,-1,-1,-1,-1],[4,8,7,9,10,0,9,11,10,10,3,0,-1,-1,-1,-1],[4,10,7,4,9,10,9,11,10,-1,-1,-1,-1,-1,-1,-1],[9,4,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,4,5,0,3,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,4,5,1,0,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,4,5,8,5,3,3,5,1,-1,-1,-1,-1,-1,-1,-1],[1,11,2,9,4,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,8,0,1,11,2,4,5,9,-1,-1,-1,-1,-1,-1,-1],[5,11,2,5,2,4,4,2,0,-1,-1,-1,-1,-1,-1,-1],[2,5,11,3,5,2,3,4,5,3,8,4,-1,-1,-1,-1],[9,4,5,2,10,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,2,10,0,10,8,4,5,9,-1,-1,-1,-1,-1,-1,-1],[0,4,5,0,5,1,2,10,3,-1,-1,-1,-1,-1,-1,-1],[2,5,1,2,8,5,2,10,8,4,5,8,-1,-1,-1,-1],[11,10,3,11,3,1,9,4,5,-1,-1,-1,-1,-1,-1,-1],[4,5,9,0,1,8,8,1,11,8,11,10,-1,-1,-1,-1],[5,0,4,5,10,0,5,11,10,10,3,0,-1,-1,-1,-1],[5,8,4,5,11,8,11,10,8,-1,-1,-1,-1,-1,-1,-1],[9,8,7,5,9,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,0,3,9,3,5,5,3,7,-1,-1,-1,-1,-1,-1,-1],[0,8,7,0,7,1,1,7,5,-1,-1,-1,-1,-1,-1,-1],[1,3,5,3,7,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,8,7,9,7,5,11,2,1,-1,-1,-1,-1,-1,-1,-1],[11,2,1,9,0,5,5,0,3,5,3,7,-1,-1,-1,-1],[8,2,0,8,5,2,8,7,5,11,2,5,-1,-1,-1,-1],[2,5,11,2,3,5,3,7,5,-1,-1,-1,-1,-1,-1,-1],[7,5,9,7,9,8,3,2,10,-1,-1,-1,-1,-1,-1,-1],[9,7,5,9,2,7,9,0,2,2,10,7,-1,-1,-1,-1],[2,10,3,0,8,1,1,8,7,1,7,5,-1,-1,-1,-1],[10,1,2,10,7,1,7,5,1,-1,-1,-1,-1,-1,-1,-1],[9,8,5,8,7,5,11,3,1,11,10,3,-1,-1,-1,-1],[5,0,7,5,9,0,7,0,10,1,11,0,10,0,11,-1],[10,0,11,10,3,0,11,0,5,8,7,0,5,0,7,-1],[10,5,11,7,5,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[11,5,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,5,6,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,1,0,5,6,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,3,8,1,8,9,5,6,11,-1,-1,-1,-1,-1,-1,-1],[1,5,6,2,1,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,5,6,1,6,2,3,8,0,-1,-1,-1,-1,-1,-1,-1],[9,5,6,9,6,0,0,6,2,-1,-1,-1,-1,-1,-1,-1],[5,8,9,5,2,8,5,6,2,3,8,2,-1,-1,-1,-1],[2,10,3,11,5,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,8,0,10,0,2,11,5,6,-1,-1,-1,-1,-1,-1,-1],[0,9,1,2,10,3,5,6,11,-1,-1,-1,-1,-1,-1,-1],[5,6,11,1,2,9,9,2,10,9,10,8,-1,-1,-1,-1],[6,10,3,6,3,5,5,3,1,-1,-1,-1,-1,-1,-1,-1],[0,10,8,0,5,10,0,1,5,5,6,10,-1,-1,-1,-1],[3,6,10,0,6,3,0,5,6,0,9,5,-1,-1,-1,-1],[6,9,5,6,10,9,10,8,9,-1,-1,-1,-1,-1,-1,-1],[5,6,11,4,8,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,0,3,4,3,7,6,11,5,-1,-1,-1,-1,-1,-1,-1],[1,0,9,5,6,11,8,7,4,-1,-1,-1,-1,-1,-1,-1],[11,5,6,1,7,9,1,3,7,7,4,9,-1,-1,-1,-1],[6,2,1,6,1,5,4,8,7,-1,-1,-1,-1,-1,-1,-1],[1,5,2,5,6,2,3,4,0,3,7,4,-1,-1,-1,-1],[8,7,4,9,5,0,0,5,6,0,6,2,-1,-1,-1,-1],[7,9,3,7,4,9,3,9,2,5,6,9,2,9,6,-1],[3,2,10,7,4,8,11,5,6,-1,-1,-1,-1,-1,-1,-1],[5,6,11,4,2,7,4,0,2,2,10,7,-1,-1,-1,-1],[0,9,1,4,8,7,2,10,3,5,6,11,-1,-1,-1,-1],[9,1,2,9,2,10,9,10,4,7,4,10,5,6,11,-1],[8,7,4,3,5,10,3,1,5,5,6,10,-1,-1,-1,-1],[5,10,1,5,6,10,1,10,0,7,4,10,0,10,4,-1],[0,9,5,0,5,6,0,6,3,10,3,6,8,7,4,-1],[6,9,5,6,10,9,4,9,7,7,9,10,-1,-1,-1,-1],[11,9,4,6,11,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,6,11,4,11,9,0,3,8,-1,-1,-1,-1,-1,-1,-1],[11,1,0,11,0,6,6,0,4,-1,-1,-1,-1,-1,-1,-1],[8,1,3,8,6,1,8,4,6,6,11,1,-1,-1,-1,-1],[1,9,4,1,4,2,2,4,6,-1,-1,-1,-1,-1,-1,-1],[3,8,0,1,9,2,2,9,4,2,4,6,-1,-1,-1,-1],[0,4,2,4,6,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,2,3,8,4,2,4,6,2,-1,-1,-1,-1,-1,-1,-1],[11,9,4,11,4,6,10,3,2,-1,-1,-1,-1,-1,-1,-1],[0,2,8,2,10,8,4,11,9,4,6,11,-1,-1,-1,-1],[3,2,10,0,6,1,0,4,6,6,11,1,-1,-1,-1,-1],[6,1,4,6,11,1,4,1,8,2,10,1,8,1,10,-1],[9,4,6,9,6,3,9,3,1,10,3,6,-1,-1,-1,-1],[8,1,10,8,0,1,10,1,6,9,4,1,6,1,4,-1],[3,6,10,3,0,6,0,4,6,-1,-1,-1,-1,-1,-1,-1],[6,8,4,10,8,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,6,11,7,11,8,8,11,9,-1,-1,-1,-1,-1,-1,-1],[0,3,7,0,7,11,0,11,9,6,11,7,-1,-1,-1,-1],[11,7,6,1,7,11,1,8,7,1,0,8,-1,-1,-1,-1],[11,7,6,11,1,7,1,3,7,-1,-1,-1,-1,-1,-1,-1],[1,6,2,1,8,6,1,9,8,8,7,6,-1,-1,-1,-1],[2,9,6,2,1,9,6,9,7,0,3,9,7,9,3,-1],[7,0,8,7,6,0,6,2,0,-1,-1,-1,-1,-1,-1,-1],[7,2,3,6,2,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,10,3,11,8,6,11,9,8,8,7,6,-1,-1,-1,-1],[2,7,0,2,10,7,0,7,9,6,11,7,9,7,11,-1],[1,0,8,1,8,7,1,7,11,6,11,7,2,10,3,-1],[10,1,2,10,7,1,11,1,6,6,1,7,-1,-1,-1,-1],[8,6,9,8,7,6,9,6,1,10,3,6,1,6,3,-1],[0,1,9,10,7,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,0,8,7,6,0,3,0,10,10,0,6,-1,-1,-1,-1],[7,6,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,10,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,8,0,10,6,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,9,1,10,6,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,9,1,8,1,3,10,6,7,-1,-1,-1,-1,-1,-1,-1],[11,2,1,6,7,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,11,2,3,8,0,6,7,10,-1,-1,-1,-1,-1,-1,-1],[2,0,9,2,9,11,6,7,10,-1,-1,-1,-1,-1,-1,-1],[6,7,10,2,3,11,11,3,8,11,8,9,-1,-1,-1,-1],[7,3,2,6,7,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,8,0,7,0,6,6,0,2,-1,-1,-1,-1,-1,-1,-1],[2,6,7,2,7,3,0,9,1,-1,-1,-1,-1,-1,-1,-1],[1,2,6,1,6,8,1,8,9,8,6,7,-1,-1,-1,-1],[11,6,7,11,7,1,1,7,3,-1,-1,-1,-1,-1,-1,-1],[11,6,7,1,11,7,1,7,8,1,8,0,-1,-1,-1,-1],[0,7,3,0,11,7,0,9,11,6,7,11,-1,-1,-1,-1],[7,11,6,7,8,11,8,9,11,-1,-1,-1,-1,-1,-1,-1],[6,4,8,10,6,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,10,6,3,6,0,0,6,4,-1,-1,-1,-1,-1,-1,-1],[8,10,6,8,6,4,9,1,0,-1,-1,-1,-1,-1,-1,-1],[9,6,4,9,3,6,9,1,3,10,6,3,-1,-1,-1,-1],[6,4,8,6,8,10,2,1,11,-1,-1,-1,-1,-1,-1,-1],[1,11,2,3,10,0,0,10,6,0,6,4,-1,-1,-1,-1],[4,8,10,4,10,6,0,9,2,2,9,11,-1,-1,-1,-1],[11,3,9,11,2,3,9,3,4,10,6,3,4,3,6,-1],[8,3,2,8,2,4,4,2,6,-1,-1,-1,-1,-1,-1,-1],[0,2,4,4,2,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,0,9,2,4,3,2,6,4,4,8,3,-1,-1,-1,-1],[1,4,9,1,2,4,2,6,4,-1,-1,-1,-1,-1,-1,-1],[8,3,1,8,1,6,8,6,4,6,1,11,-1,-1,-1,-1],[11,0,1,11,6,0,6,4,0,-1,-1,-1,-1,-1,-1,-1],[4,3,6,4,8,3,6,3,11,0,9,3,11,3,9,-1],[11,4,9,6,4,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,5,9,7,10,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,4,5,9,10,6,7,-1,-1,-1,-1,-1,-1,-1],[5,1,0,5,0,4,7,10,6,-1,-1,-1,-1,-1,-1,-1],[10,6,7,8,4,3,3,4,5,3,5,1,-1,-1,-1,-1],[9,4,5,11,2,1,7,10,6,-1,-1,-1,-1,-1,-1,-1],[6,7,10,1,11,2,0,3,8,4,5,9,-1,-1,-1,-1],[7,10,6,5,11,4,4,11,2,4,2,0,-1,-1,-1,-1],[3,8,4,3,4,5,3,5,2,11,2,5,10,6,7,-1],[7,3,2,7,2,6,5,9,4,-1,-1,-1,-1,-1,-1,-1],[9,4,5,0,6,8,0,2,6,6,7,8,-1,-1,-1,-1],[3,2,6,3,6,7,1,0,5,5,0,4,-1,-1,-1,-1],[6,8,2,6,7,8,2,8,1,4,5,8,1,8,5,-1],[9,4,5,11,6,1,1,6,7,1,7,3,-1,-1,-1,-1],[1,11,6,1,6,7,1,7,0,8,0,7,9,4,5,-1],[4,11,0,4,5,11,0,11,3,6,7,11,3,11,7,-1],[7,11,6,7,8,11,5,11,4,4,11,8,-1,-1,-1,-1],[6,5,9,6,9,10,10,9,8,-1,-1,-1,-1,-1,-1,-1],[3,10,6,0,3,6,0,6,5,0,5,9,-1,-1,-1,-1],[0,8,10,0,10,5,0,5,1,5,10,6,-1,-1,-1,-1],[6,3,10,6,5,3,5,1,3,-1,-1,-1,-1,-1,-1,-1],[1,11,2,9,10,5,9,8,10,10,6,5,-1,-1,-1,-1],[0,3,10,0,10,6,0,6,9,5,9,6,1,11,2,-1],[10,5,8,10,6,5,8,5,0,11,2,5,0,5,2,-1],[6,3,10,6,5,3,2,3,11,11,3,5,-1,-1,-1,-1],[5,9,8,5,8,2,5,2,6,3,2,8,-1,-1,-1,-1],[9,6,5,9,0,6,0,2,6,-1,-1,-1,-1,-1,-1,-1],[1,8,5,1,0,8,5,8,6,3,2,8,6,8,2,-1],[1,6,5,2,6,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,6,3,1,11,6,3,6,8,5,9,6,8,6,9,-1],[11,0,1,11,6,0,9,0,5,5,0,6,-1,-1,-1,-1],[0,8,3,5,11,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[11,6,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,11,5,7,10,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,11,5,10,5,7,8,0,3,-1,-1,-1,-1,-1,-1,-1],[5,7,10,5,10,11,1,0,9,-1,-1,-1,-1,-1,-1,-1],[11,5,7,11,7,10,9,1,8,8,1,3,-1,-1,-1,-1],[10,2,1,10,1,7,7,1,5,-1,-1,-1,-1,-1,-1,-1],[0,3,8,1,7,2,1,5,7,7,10,2,-1,-1,-1,-1],[9,5,7,9,7,2,9,2,0,2,7,10,-1,-1,-1,-1],[7,2,5,7,10,2,5,2,9,3,8,2,9,2,8,-1],[2,11,5,2,5,3,3,5,7,-1,-1,-1,-1,-1,-1,-1],[8,0,2,8,2,5,8,5,7,11,5,2,-1,-1,-1,-1],[9,1,0,5,3,11,5,7,3,3,2,11,-1,-1,-1,-1],[9,2,8,9,1,2,8,2,7,11,5,2,7,2,5,-1],[1,5,3,3,5,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,7,8,0,1,7,1,5,7,-1,-1,-1,-1,-1,-1,-1],[9,3,0,9,5,3,5,7,3,-1,-1,-1,-1,-1,-1,-1],[9,7,8,5,7,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[5,4,8,5,8,11,11,8,10,-1,-1,-1,-1,-1,-1,-1],[5,4,0,5,0,10,5,10,11,10,0,3,-1,-1,-1,-1],[0,9,1,8,11,4,8,10,11,11,5,4,-1,-1,-1,-1],[11,4,10,11,5,4,10,4,3,9,1,4,3,4,1,-1],[2,1,5,2,5,8,2,8,10,4,8,5,-1,-1,-1,-1],[0,10,4,0,3,10,4,10,5,2,1,10,5,10,1,-1],[0,5,2,0,9,5,2,5,10,4,8,5,10,5,8,-1],[9,5,4,2,3,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,11,5,3,2,5,3,5,4,3,4,8,-1,-1,-1,-1],[5,2,11,5,4,2,4,0,2,-1,-1,-1,-1,-1,-1,-1],[3,2,11,3,11,5,3,5,8,4,8,5,0,9,1,-1],[5,2,11,5,4,2,1,2,9,9,2,4,-1,-1,-1,-1],[8,5,4,8,3,5,3,1,5,-1,-1,-1,-1,-1,-1,-1],[0,5,4,1,5,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,5,4,8,3,5,9,5,0,0,5,3,-1,-1,-1,-1],[9,5,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,7,10,4,10,9,9,10,11,-1,-1,-1,-1,-1,-1,-1],[0,3,8,4,7,9,9,7,10,9,10,11,-1,-1,-1,-1],[1,10,11,1,4,10,1,0,4,7,10,4,-1,-1,-1,-1],[3,4,1,3,8,4,1,4,11,7,10,4,11,4,10,-1],[4,7,10,9,4,10,9,10,2,9,2,1,-1,-1,-1,-1],[9,4,7,9,7,10,9,10,1,2,1,10,0,3,8,-1],[10,4,7,10,2,4,2,0,4,-1,-1,-1,-1,-1,-1,-1],[10,4,7,10,2,4,8,4,3,3,4,2,-1,-1,-1,-1],[2,11,9,2,9,7,2,7,3,7,9,4,-1,-1,-1,-1],[9,7,11,9,4,7,11,7,2,8,0,7,2,7,0,-1],[3,11,7,3,2,11,7,11,4,1,0,11,4,11,0,-1],[1,2,11,8,4,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,1,9,4,7,1,7,3,1,-1,-1,-1,-1,-1,-1,-1],[4,1,9,4,7,1,0,1,8,8,1,7,-1,-1,-1,-1],[4,3,0,7,3,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,7,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,8,11,11,8,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,9,0,3,10,9,10,11,9,-1,-1,-1,-1,-1,-1,-1],[0,11,1,0,8,11,8,10,11,-1,-1,-1,-1,-1,-1,-1],[3,11,1,10,11,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,10,2,1,9,10,9,8,10,-1,-1,-1,-1,-1,-1,-1],[3,9,0,3,10,9,1,9,2,2,9,10,-1,-1,-1,-1],[0,10,2,8,10,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,10,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,8,3,2,11,8,11,9,8,-1,-1,-1,-1,-1,-1,-1],[9,2,11,0,2,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,8,3,2,11,8,0,8,1,1,8,11,-1,-1,-1,-1],[1,2,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,8,3,9,8,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,1,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,8,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]],_0x471c2a=[[0,1],[1,3],[2,3],[0,2],[4,5],[5,7],[6,7],[4,6],[0,4],[1,5],[2,6],[3,7]];function _0x4bf712(e){return _0x267df6[e]}function _0x1a1359(e){return _0x471c2a[e]}var _0x435398={getCase:_0x4bf712,getEdge:_0x1a1359},_0x1325cd=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1ec144=_0x1325cd(void 0,(function(){return _0x1ec144.toString().search("(((.+)+)+)+$").toString().constructor(_0x1ec144).search("(((.+)+)+)+$")}));function _0xdf1e4f(){this._ids=[],this._voxelScalars=[],this._voxelGradients=[],this._voxelPts=[],this._edgeMap={},this.computeNormals=!0,this.mergePoints=!1,this.contourValue=0}_0x1ec144(),_0xdf1e4f.prototype.getVoxelScalars=function(e,t,i,n,r,o,a,s){var l=this._ids,u=this._voxelScalars;l[0]=i*n+t*r[0]+e,l[1]=l[0]+1,l[2]=l[0]+r[0],l[3]=l[2]+1,l[4]=l[0]+n,l[5]=l[4]+1,l[6]=l[4]+r[0],l[7]=l[6]+1;for(let e=0;e<8;++e)u[e]=s[l[e]]},_0xdf1e4f.prototype.getVoxelPoints=function(e,t,i,n,r,o){var a=this._voxelPts;a[0]=r[0]+e*o[0],a[1]=r[1]+t*o[1],a[2]=r[2]+i*o[2],a[3]=a[0]+o[0],a[4]=a[1],a[5]=a[2],a[6]=a[0],a[7]=a[1]+o[1],a[8]=a[2],a[9]=a[3],a[10]=a[7],a[11]=a[2],a[12]=a[0],a[13]=a[1],a[14]=a[2]+o[2],a[15]=a[3],a[16]=a[1],a[17]=a[14],a[18]=a[0],a[19]=a[7],a[20]=a[14],a[21]=a[3],a[22]=a[7],a[23]=a[14]},_0xdf1e4f.prototype.getPointGradient=function(e,t,i,n,r,o,a,s){let l,u;0===e?(l=a[e+1+t*n[0]+i*r],u=a[e+t*n[0]+i*r],s[0]=(u-l)/o[0]):e===n[0]-1?(l=a[e+t*n[0]+i*r],u=a[e-1+t*n[0]+i*r],s[0]=(u-l)/o[0]):(l=a[e+1+t*n[0]+i*r],u=a[e-1+t*n[0]+i*r],s[0]=.5*(u-l)/o[0]),0===t?(l=a[e+(t+1)*n[0]+i*r],u=a[e+t*n[0]+i*r],s[1]=(u-l)/o[1]):t===n[1]-1?(l=a[e+t*n[0]+i*r],u=a[e+(t-1)*n[0]+i*r],s[1]=(u-l)/o[1]):(l=a[e+(t+1)*n[0]+i*r],u=a[e+(t-1)*n[0]+i*r],s[1]=.5*(u-l)/o[1]),0===i?(l=a[e+t*n[0]+(i+1)*r],u=a[e+t*n[0]+i*r],s[2]=(u-l)/o[2]):i===n[2]-1?(l=a[e+t*n[0]+i*r],u=a[e+t*n[0]+(i-1)*r],s[2]=(u-l)/o[2]):(l=a[e+t*n[0]+(i+1)*r],u=a[e+t*n[0]+(i-1)*r],s[2]=.5*(u-l)/o[2])},_0xdf1e4f.prototype.getVoxelGradients=function(e,t,i,n,r,o,a){var s=this._voxelGradients,l=[];this.getPointGradient(e,t,i,n,r,o,a,l),s[0]=l[0],s[1]=l[1],s[2]=l[2],this.getPointGradient(e+1,t,i,n,r,o,a,l),s[3]=l[0],s[4]=l[1],s[5]=l[2],this.getPointGradient(e,t+1,i,n,r,o,a,l),s[6]=l[0],s[7]=l[1],s[8]=l[2],this.getPointGradient(e+1,t+1,i,n,r,o,a,l),s[9]=l[0],s[10]=l[1],s[11]=l[2],this.getPointGradient(e,t,i+1,n,r,o,a,l),s[12]=l[0],s[13]=l[1],s[14]=l[2],this.getPointGradient(e+1,t,i+1,n,r,o,a,l),s[15]=l[0],s[16]=l[1],s[17]=l[2],this.getPointGradient(e,t+1,i+1,n,r,o,a,l),s[18]=l[0],s[19]=l[1],s[20]=l[2],this.getPointGradient(e+1,t+1,i+1,n,r,o,a,l),s[21]=l[0],s[22]=l[1],s[23]=l[2]},_0xdf1e4f.prototype.produceTriangles=function(e,t,i,n,r,o,a,s,l,u,c,h){var d,f,p=[1,2,4,8,16,32,64,128],_=[0,1,3,2,4,5,7,6],m=[],$=[],g=[];this.getVoxelScalars(t,i,n,r,o,a,s,l);for(var y=0,v=0;v<8;v++)this._voxelScalars[_[v]]>=e&&(y|=p[v]);var x=_0x435398.getCase(y);if(!(x[0]<0)){this.getVoxelPoints(t,i,n,o,a,s),this.computeNormals&&this.getVoxelGradients(t,i,n,o,r,s,l);var b=new a$11;for(v=0;x[v]>=0;v+=3){c.push(3);for(var S=0;S<3;S++){var w=_0x435398.getEdge(x[v+S]);if(d=void 0,this.mergePoints&&(g[0]=this._ids[w[0]],g[1]=this._ids[w[1]],g[0]>g[1]&&(f=g[0],g[0]=g[1],g[1]=f),d=this._edgeMap[g]),void 0===d){var C=(e-this._voxelScalars[w[0]])/(this._voxelScalars[w[1]]-this._voxelScalars[w[0]]),T=this._voxelPts.slice(3*w[0],3*(w[0]+1)),P=this._voxelPts.slice(3*w[1],3*(w[1]+1));if(m[0]=T[0]+C*(P[0]-T[0]),m[1]=T[1]+C*(P[1]-T[1]),m[2]=T[2]+C*(P[2]-T[2]),d=u.length/3,u.push(m[0],m[1],m[2]),this.computeNormals){var E=this._voxelGradients.slice(3*w[0],3*(w[0]+1)),A=this._voxelGradients.slice(3*w[1],3*(w[1]+1));$[0]=E[0]+C*(A[0]-E[0]),$[1]=E[1]+C*(A[1]-E[1]),$[2]=E[2]+C*(A[2]-E[2]),a$11.unpack($,0,b),a$11.equals(a$11.ZERO,b)||a$11.normalize(b,b),h.push(b.x,b.y,b.z)}this.mergePoints&&(g[0]=this._ids[w[0]],g[1]=this._ids[w[1]],g[0]>g[1]&&(f=g[0],g[0]=g[1],g[1]=f),this._edgeMap[g]=d)}c.push(d)}}}},_0xdf1e4f.prototype.compute=function(e){for(var t=e.xDimSize,i=e.yDimSize,n=e.zDimSize,r=(e.timeDimSize,[0,0,0]),o=[1/t,1/i,1/n],a=[t,i,n],s=e.array[0],l=[],u=[],c=[],h=a[0]*a[1],d=0;d<a[2]-1;++d)for(var f=0;f<a[1]-1;++f)for(var p=0;p<a[0]-1;++p)this.produceTriangles(this.contourValue,p,f,d,h,a,r,o,s,l,u,c);return{pBuffer:l,tBuffer:u,nBuffer:c}};var Ue$1="attribute vec4 aPosition;\nattribute vec4 aNormal;\nvarying vec3 vNormal;\nvarying vec3 positionEC;\nvoid main()\n{\nvNormal = aNormal.xyz;\npositionEC = (czm_modelView * vec4(aPosition.xyz, 1.0)).xyz;\ngl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}\n",We="varying vec3 vNormal;\nvarying vec3 positionEC;\nuniform float uContourValue;\nuniform sampler2D u_colorTexture;\n#ifdef APPLY_LIGHTING\nuniform vec3 uDiffuse;\nuniform vec3 uSpecular;\nuniform vec3 uAmbient;\nuniform float uShiness;\n#endif\nvec4 getColorForValue(float tValue)\n{\nfloat texCoord = tValue;\ntexCoord = clamp(texCoord, 0.0, 1.0);\nvec4 tColor = texture2D(u_colorTexture, vec2(texCoord, 0.5));\nreturn tColor;\n}\n#ifdef APPLY_LIGHTING\nvoid applyLighting(inout vec4 tColor, vec3 normal)\n{\nvec3 diffuse = uDiffuse;\nvec3 specular = uSpecular;\nvec3 ambient = uAmbient;\nfloat shiness = uShiness;\nvec3 normalEC = normalize(czm_normal * normal);\nfloat ndot = max( dot( normalEC, czm_sunDirectionEC ), 0.0 );\nndot = ndot * 0.5 + 0.5;\ndiffuse = diffuse * ndot;\nspecular = specular * czm_getSpecular(czm_sunDirectionEC, normalize(-positionEC), normalEC, shiness);\ntColor.rgb = tColor.rgb*(diffuse + ambient) + specular;\n}\n#endif\nvoid main()\n{\nvec4 color = getColorForValue(uContourValue);\n#ifdef APPLY_LIGHTING\napplyLighting(color, vNormal);\n#endif\ngl_FragColor = color;\n}\n";function Ze(e){for(var t=1;t<e;)t<<=1;return t}function qe$1(e){var t=new a$11(1,255,65025);(t=a$11.multiplyByScalar(t,e,t)).x=t.x-Math.floor(t.x),t.y=t.y-Math.floor(t.y),t.z=t.z-Math.floor(t.z);var i=new a$11,n=new a$11(1/255,1/255,0);return i.x=t.y*n.x,i.y=t.z*n.y,i.z=t.z*n.z,t=a$11.subtract(t,i,t)}function d$9(e,t){this._context=e,this._floor=0,this._ceil=1,this._dataBounds=s$1p.MAX_VALUE,this._zBounds=new r$T(0,1),this._nSideBlockCount=0,this._nBlockLength=0,this._nLength=0,this._nWidth=0,this._nHeight=0,this._nDepth=0,this._volTextures=[],this._dWidth=0,this._dHeight=0,this._dDepth=0,this._matLocalView=void 0,this._boundingSphere=void 0,this._timeDimension=1,this._timeIndex=0,this._xSliceCommand=void 0,this._ySliceCommand=void 0,this._zSliceCommand=void 0,this._initialized=!1,this._layer=t,this._attributeLocations={},this._visibleBoundingBox=new c$Z({minimum:a$11.ZERO,maximum:new a$11(1,1,1)}),this.m_vScale=new a$11(1,1,1),this._volumeBoxCommand=void 0,this.marchingCubes=new _0xdf1e4f,this.outlineCommand=void 0,this._mode=b$1d.SCENE3D}Object.defineProperties(d$9.prototype,{maxValue:{get:function(){return this._ceil}},minValue:{get:function(){return this._floor}},visibleBoundingBox:{get:function(){return this._visibleBoundingBox},set:function(e){this._visibleBoundingBox=e}}}),d$9.prototype._encodeImageData=function(e,t,i,n){for(var r=this._nLength*this._nLength*4,o=new Array(r),a=i-t,s=t,l=0;l<e.zDimSize;l++)for(var u=parseInt(l/this._nSideBlockCount)*this._nBlockLength,c=l%this._nSideBlockCount*this._nBlockLength,h=0;h<this._nBlockLength-2;h++)for(var d=0;d<this._nBlockLength-2;d++){var f=Math.min(d,e.xDimSize-1),p=Math.min(h,e.yDimSize-1),_=l*e.yDimSize*e.xDimSize+(e.yDimSize-1-p)*e.xDimSize+f,m=n[_],$=new a$10(0,0,0,0);if(-9999!=m){m<t||m>i?m=s:s=m;var g=qe$1(m=(m-t)/a);$.x=g.x,$.y=g.y,$.z=g.z,$.w=1}var y=255*$.x,v=255*$.y,x=255*$.z,b=255*$.w;o[4*(_=(u+h)*this._nLength+c+d)]=parseInt(y),o[4*_+1]=parseInt(v),o[4*_+2]=parseInt(x),o[4*_+3]=parseInt(b)}return new Uint8Array(o,0,r)},d$9.prototype._loadData=function(e,t){var i=b$g.loadData(e,t);this.output=i,this._timeDimension=i.timeDimSize,this._floor=i.minValue,this._ceil=i.maxValue,this._nWidth=i.xDimSize,this._nHeight=i.yDimSize,this._nDepth=i.zDimSize;var n=i.array;this._nSideBlockCount=Math.ceil(Math.sqrt(i.zDimSize)),this._nBlockLength=Math.max(i.xDimSize,i.yDimSize)+2,this._nLength=Ze(this._nBlockLength*this._nSideBlockCount-2);for(var r=[],o=0;o<this._timeDimension;o++)r.push(this._encodeImageData(i,i.minValue,i.maxValue,n[o]));return r},d$9.prototype._loadVolume=function(e,t){},d$9.prototype._loadTexture=function(e){var t=e.length,i=tt$l.LINEAR,n=et$k.LINEAR;this._layer._filterMode===J$O.FilterMode.NEAREST&&(i=tt$l.NEAREST,n=et$k.NEAREST);for(var r=0;r<t;r++){var o=new P$S({context:this._context,width:this._nLength,height:this._nLength,pixelFormat:Z$_.RGBA,flipY:!1,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:i,magnificationFilter:n})});o.copyFrom({width:this._nLength,height:this._nLength,arrayBufferView:e[r]}),this._volTextures.push(o)}},d$9.prototype._computePosition=function(){var e=this._mode,t=new a$11(.5*(this._dataBounds.west+this._dataBounds.east),.5*(this._dataBounds.north+this._dataBounds.south),this._zBounds.x);this._matLocalView=new c$1a,this._matInverseLocalView=new c$1a;var i=[];if(e===b$1d.COLUMBUS_VIEW)this._vecCenter=new a$11(t.z,t.x,t.y),c$1a.fromTranslation(this._vecCenter,this._matLocalView),c$1a.inverse(this._matLocalView,this._matInverseLocalView),i[0]=new a$11(this._zBounds.x,this._dataBounds.west,this._dataBounds.south),i[1]=new a$11(this._zBounds.x,this._dataBounds.east,this._dataBounds.south),i[2]=new a$11(this._zBounds.x,this._dataBounds.east,this._dataBounds.north),i[3]=new a$11(this._zBounds.x,this._dataBounds.west,this._dataBounds.north),i[4]=new a$11(this._zBounds.y,this._dataBounds.west,this._dataBounds.south),i[5]=new a$11(this._zBounds.y,this._dataBounds.east,this._dataBounds.south),i[6]=new a$11(this._zBounds.y,this._dataBounds.east,this._dataBounds.north),i[7]=new a$11(this._zBounds.y,this._dataBounds.west,this._dataBounds.north);else{this._vecCenter=a$11.fromDegrees(t.x,t.y,t.z);var n=new e$1L;m$13.headingPitchRollToFixedFrame(this._vecCenter,n,n$1c.WGS84,m$13.eastNorthUpToFixedFrame,this._matLocalView),c$1a.inverse(this._matLocalView,this._matInverseLocalView),i[0]=a$11.fromDegrees(this._dataBounds.west,this._dataBounds.south,this._zBounds.x),i[1]=a$11.fromDegrees(this._dataBounds.east,this._dataBounds.south,this._zBounds.x),i[2]=a$11.fromDegrees(this._dataBounds.east,this._dataBounds.north,this._zBounds.x),i[3]=a$11.fromDegrees(this._dataBounds.west,this._dataBounds.north,this._zBounds.x),i[4]=a$11.fromDegrees(this._dataBounds.west,this._dataBounds.south,this._zBounds.y),i[5]=a$11.fromDegrees(this._dataBounds.east,this._dataBounds.south,this._zBounds.y),i[6]=a$11.fromDegrees(this._dataBounds.east,this._dataBounds.north,this._zBounds.y),i[7]=a$11.fromDegrees(this._dataBounds.west,this._dataBounds.north,this._zBounds.y)}this._dWidth=a$11.distance(i[1],i[0]),this._dHeight=a$11.distance(i[3],i[0]),this._dDepth=a$11.distance(i[4],i[0]),this._boundingSphere=new c$19,c$1a.multiplyByPoint(this._matLocalView,a$11.ZERO,this._boundingSphere.center),this._boundingSphere.radius=.5*Math.sqrt(this._dWidth*this._dWidth+this._dHeight*this._dHeight+this._dDepth*this._dDepth)},d$9.prototype._createShaderPreDefines=function(e,t){var i=[];return i.push("Volume"),e._timeDimension>1&&i.push("TIME_ORDER"),t$$(t._hypsometricTexture)&&i.push("HAS_COLORTABLE"),t._useGradientOpacity&&i.push("GRADIENT_OPACITY"),t._clipPlanes.length>0&&i.push("CLIP_PLANE"),t.enableLighting&&i.push("APPLY_LIGHTING"),(0!=e._visibleBoundingBox._minimum.x||0!=e._visibleBoundingBox._minimum.y||0!=e._visibleBoundingBox._minimum.z||1!=e._visibleBoundingBox._maximum.x||1!=e._visibleBoundingBox._maximum.y||1!=e._visibleBoundingBox._maximum.z)&&i.push("TEXTURECOORD_CLIP"),i},d$9.prototype._createSliceCommand=function(){this._context;var e=this._mode===b$1d.COLUMBUS_VIEW,t=this.GetRealBoundTop(),i=this.GetRealBoundBottom(),n=this.GetRealBoundRight(),r=this.GetRealBoundLeft();this._dWidth,this._dHeight;var o,a,s=this._layer._layerBounds.width,l=this._layer._layerBounds.height,u=this._layer._sliceCoordinate,c=Math.min(u.x,1),h=c*s,d=(c=Math.min(u.y,1))*l,f=n-r,p=t-i;e?o=a=5:(o=Math.ceil(this._dataBounds.north-this._dataBounds.south),a=Math.ceil(this._dataBounds.east-this._dataBounds.west));for(var _=a+1,m=o+1,$=(t-i)/o,g=(n-r)/a,y=_*m,v=2*_,x=2*m,b=new Float32Array(3*v),S=new Float32Array(3*v),w=new Float32Array(3*x),C=new Float32Array(3*x),T=new Float32Array(3*y),P=new Float32Array(3*y),E=this.GetRealTop(),A=this.GetRealBottom(),L=E-A,M=(c=Math.min(u.z,1))*L,I=0,O=new a$11,D=A+M,R=(D-A)/L,N=0;N<m;N++)for(var F=i+N*$,B=0;B<_;B++){var z=r+B*g,G=e?new a$11(D,z,F):a$11.fromDegrees(z,F,D);c$1a.multiplyByPoint(this._matInverseLocalView,G,O),T[3*I]=O.x,T[3*I+1]=O.y,T[3*I+2]=O.z,P[3*I]=(z-r)/f,P[3*I+1]=(F-i)/p,P[3*I+2]=R,I++}I=0;var k=(t-d-i)/p;for(B=0;B<_;B++){z=r+B*g;var U=e?new a$11(E,z,t-d):a$11.fromDegrees(z,t-d,E);c$1a.multiplyByPoint(this._matInverseLocalView,U,O),b[6*I]=O.x,b[6*I+1]=O.y,b[6*I+2]=O.z,S[6*I]=(z-r)/f,S[6*I+1]=k,S[6*I+2]=1;var V=e?new a$11(this._zBounds.x,z,t-d):a$11.fromDegrees(z,t-d,this._zBounds.x);c$1a.multiplyByPoint(this._matInverseLocalView,V,O),b[6*I+3]=O.x,b[6*I+4]=O.y,b[6*I+5]=O.z,S[6*I+3]=(z-r)/f,S[6*I+4]=k,S[6*I+5]=0,I++}I=0;var W=h/f;for(N=0;N<m;N++){F=i+N*$;var H=e?new a$11(E,r+h,F):a$11.fromDegrees(r+h,F,E);c$1a.multiplyByPoint(this._matInverseLocalView,H,O),w[6*I]=O.x,w[6*I+1]=O.y,w[6*I+2]=O.z,C[6*I]=W,C[6*I+1]=(F-i)/p,C[6*I+2]=1;var Y=e?new a$11(this._zBounds.x,r+h,F):a$11.fromDegrees(r+h,F,this._zBounds.x);c$1a.multiplyByPoint(this._matInverseLocalView,Y,O),w[6*I+3]=O.x,w[6*I+4]=O.y,w[6*I+5]=O.z,C[6*I+3]=W,C[6*I+4]=(F-i)/p,C[6*I+5]=0,I++}for(var j=new Uint16Array(a*o*2*3),q=0,X=0;X<o;X++)for(var K=0;K<a;K++){var Z=K+_*X,J=K+_*(X+1),Q=K+1+_*(X+1),ee=K+1+_*X;j[q++]=Z,j[q++]=J,j[q++]=ee,j[q++]=J,j[q++]=Q,j[q++]=ee}for(var te=2*o*3,ie=new Uint16Array(2*a*3),ne=new Uint16Array(te),re=0,oe=0;oe<o;oe++){Z=X=2*oe,J=X+1,Q=X+2,ee=X+3;ne[re++]=Z,ne[re++]=Q,ne[re++]=J,ne[re++]=J,ne[re++]=Q,ne[re++]=ee}var ae=0;for(oe=0;oe<a;oe++){Z=K=2*oe,J=K+1,Q=K+2,ee=K+3;ie[ae++]=Z,ie[ae++]=Q,ie[ae++]=J,ie[ae++]=J,ie[ae++]=Q,ie[ae++]=ee}var se=u$Y.createVertexBuffer({context:this._context,typedArray:w,usage:A$13.STATIC_DRAW}),le=u$Y.createVertexBuffer({context:this._context,typedArray:C,usage:A$13.STATIC_DRAW}),ue=u$Y.createVertexBuffer({context:this._context,typedArray:b,usage:A$13.STATIC_DRAW}),ce=u$Y.createVertexBuffer({context:this._context,typedArray:S,usage:A$13.STATIC_DRAW}),he=u$Y.createVertexBuffer({context:this._context,typedArray:T,usage:A$13.STATIC_DRAW}),de=u$Y.createVertexBuffer({context:this._context,typedArray:P,usage:A$13.STATIC_DRAW}),fe=[],pe=[],_e=[],me=this._attributeLocations;me.aPosition=0,fe.push({index:me.aPosition,vertexBuffer:se,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),pe.push({index:me.aPosition,vertexBuffer:ue,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),_e.push({index:me.aPosition,vertexBuffer:he,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),me.aTexCoord0=1,fe.push({index:me.aTexCoord0,vertexBuffer:le,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),pe.push({index:me.aTexCoord0,vertexBuffer:ce,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),_e.push({index:me.aTexCoord0,vertexBuffer:de,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1});var $e=u$Y.createIndexBuffer({context:this._context,typedArray:ne,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT}),ge=u$Y.createIndexBuffer({context:this._context,typedArray:ie,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT}),ye=u$Y.createIndexBuffer({context:this._context,typedArray:j,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT}),ve=new a$O({sources:[Re]}),xe=new a$O({sources:[Fe$1]});ve.defines.push("Volume"),xe.defines.push("Volume"),this._timeDimension>1&&xe.defines.push("TIME_ORDER"),this._xSliceCommand=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:this._matLocalView,boundingVolume:this._boundingSphere,pass:we$l.OPAQUE,cull:!0}),this._ySliceCommand=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:this._matLocalView,boundingVolume:this._boundingSphere,pass:we$l.OPAQUE,cull:!0}),this._zSliceCommand=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:this._matLocalView,boundingVolume:this._boundingSphere,pass:we$l.OPAQUE,cull:!0}),this._xSliceCommand.vertexArray=new x$18({context:this._context,attributes:fe,indexBuffer:$e}),this._ySliceCommand.vertexArray=new x$18({context:this._context,attributes:pe,indexBuffer:ge}),this._zSliceCommand.vertexArray=new x$18({context:this._context,attributes:_e,indexBuffer:ye}),this._xSliceCommand.shaderProgram=p$15.fromCache({context:this._context,vertexShaderSource:ve,fragmentShaderSource:xe,attributeLocations:me}),this._ySliceCommand.shaderProgram=this._xSliceCommand.shaderProgram,this._zSliceCommand.shaderProgram=this._xSliceCommand.shaderProgram,this._xSliceCommand.renderState=p$1a.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:{enabled:!0}}),this._ySliceCommand.renderState=this._xSliceCommand.renderState,this._zSliceCommand.renderState=this._xSliceCommand.renderState},d$9.prototype._createContourCommand=function(e,t,i){var n=this._context,r=this._layer,o=e.length;if(!(o<3)){for(var a=new Float32Array(o),s=new Float32Array(i),l=this._dataBounds.west,u=this._dataBounds.south,c=this._zBounds.x,h=this._dataBounds.width,d=this._dataBounds.height,f=this._zBounds.y-this._zBounds.x,p=new a$11,_=this._mode===b$1d.COLUMBUS_VIEW,m=0;m<o;m+=3){var $=l+h*e[m],g=u+d*e[m+1],y=c+f*e[m+2],v=_?new a$11(y,$,g):a$11.fromDegrees($,g,y);c$1a.multiplyByPoint(this._matInverseLocalView,v,p),a[m]=p.x,a[m+1]=p.y,a[m+2]=p.z}var x=u$Y.createVertexBuffer({context:this._context,typedArray:a,usage:A$13.STATIC_DRAW}),b=u$Y.createVertexBuffer({context:this._context,typedArray:s,usage:A$13.STATIC_DRAW}),S=[],w={aPosition:0};S.push({index:w.aPosition,vertexBuffer:x,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),w.aNormal=1,S.push({index:w.aNormal,vertexBuffer:b,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1});var C=new a$O({sources:[Ue$1]}),T=new a$O({sources:[We]});C.defines.push("Volume"),T.defines.push("Volume"),r.enableLighting&&T.defines.push("APPLY_LIGHTING"),this._contourCommand=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:this._matLocalView,boundingVolume:this._boundingSphere,pass:we$l.OPAQUE,count:o/3,cull:!0}),this._contourCommand.vertexArray=new x$18({context:this._context,attributes:S}),this._contourCommand.shaderProgram=p$15.fromCache({context:this._context,vertexShaderSource:C,fragmentShaderSource:T,attributeLocations:w}),this._contourCommand.renderState=p$1a.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$s.ALPHA_BLEND});var P=this,E={u_colorTexture:function(){return t$$(r._colorTexture)?r._colorTexture:n.defaultTexture},uVolumeTexture:function(){return P._volTextures[0]},width:function(){return P._nWidth},height:function(){return P._nHeight},depth:function(){return P._nDepth},sideBlockCount:function(){return P._nSideBlockCount},blockLength:function(){return P._nBlockLength},texLength:function(){return P._nLength},uFilterMode:function(){return r._filterMode},uContourValue:function(){return(r.contourValue-r.minValue)/(r.maxValue-r.minValue)},uDiffuse:function(){return r.material.diffuse},uAmbient:function(){return r.material.ambient},uSpecular:function(){return r.material.specular},uShiness:function(){return r.material.shiness}};this._contourCommand.uniformMap=E}},d$9.prototype.GetRealTop=function(){return this._zBounds.x+(this._zBounds.y-this._zBounds.x)*this._layer.scale.z},d$9.prototype.GetRealBottom=function(){return this._zBounds.x},d$9.prototype.GetRealBoundLeft=function(){return.5*(this._dataBounds.east+this._dataBounds.west)-.5*(this._dataBounds.east-this._dataBounds.west)*this._layer.scale.x},d$9.prototype.GetRealBoundRight=function(){return.5*(this._dataBounds.east+this._dataBounds.west)+.5*(this._dataBounds.east-this._dataBounds.west)*this._layer.scale.x},d$9.prototype.GetRealBoundTop=function(){return.5*(this._dataBounds.north+this._dataBounds.south)+.5*(this._dataBounds.north-this._dataBounds.south)*this._layer.scale.y},d$9.prototype.GetRealBoundBottom=function(){return.5*(this._dataBounds.north+this._dataBounds.south)-.5*(this._dataBounds.north-this._dataBounds.south)*this._layer.scale.y};var Qt=new a$11;d$9.prototype._createVolumeBoxDrawCommand=function(e){this._context,new a$11(.5*(this._dataBounds.west+this._dataBounds.east),.5*(this._dataBounds.north+this._dataBounds.south),this._zBounds.x);var t,i,n=this._mode===b$1d.COLUMBUS_VIEW,r=this.GetRealBoundTop(),o=this.GetRealBoundBottom(),a=this.GetRealBoundRight(),s=this.GetRealBoundLeft(),l=a-s,u=r-o;n?(t=5,i=5):(t=Math.ceil(this._dataBounds.north-this._dataBounds.south),i=Math.ceil(this._dataBounds.east-this._dataBounds.west));for(var c=i+1,h=t+1,d=(r-o)/t,f=(a-s)/i,p=c*h,_=2*c,m=2*h,$=new Float32Array(3*_),g=new Float32Array(3*_),y=new Float32Array(3*_),v=new Float32Array(3*_),x=new Float32Array(3*m),b=new Float32Array(3*m),S=new Float32Array(3*m),w=new Float32Array(3*m),C=new Float32Array(3*p),T=new Float32Array(3*p),P=new Float32Array(3*p),E=new Float32Array(3*p),A=this.GetRealTop(),L=0,M=new a$11,I=0;I<h;I++)for(var O=o+I*d,D=0;D<c;D++){var R=s+D*f,N=n?new a$11(A,R,O):a$11.fromDegrees(R,O,A);c$1a.multiplyByPoint(this._matInverseLocalView,N,M),C[3*L]=M.x,C[3*L+1]=M.y,C[3*L+2]=M.z,T[3*L]=(R-s)/l,T[3*L+1]=(O-o)/u,T[3*L+2]=1;var F=n?new a$11(this._zBounds.x,R,O):a$11.fromDegrees(R,O,this._zBounds.x);c$1a.multiplyByPoint(this._matInverseLocalView,F,M),P[3*L]=M.x,P[3*L+1]=M.y,P[3*L+2]=M.z,E[3*L]=(R-s)/l,E[3*L+1]=(O-o)/u,E[3*L+2]=0,L++}L=0;for(D=0;D<c;D++){R=s+D*f;var B=n?new a$11(A,R,r):a$11.fromDegrees(R,r,A);c$1a.multiplyByPoint(this._matInverseLocalView,B,M),$[6*L]=M.x,$[6*L+1]=M.y,$[6*L+2]=M.z,g[6*L]=(R-s)/l,g[6*L+1]=1,g[6*L+2]=1;var z=n?new a$11(this._zBounds.x,R,r):a$11.fromDegrees(R,r,this._zBounds.x);c$1a.multiplyByPoint(this._matInverseLocalView,z,M),$[6*L+3]=M.x,$[6*L+4]=M.y,$[6*L+5]=M.z,g[6*L+3]=(R-s)/l,g[6*L+4]=1,g[6*L+5]=0;var G=n?new a$11(A,R,o):a$11.fromDegrees(R,o,A);c$1a.multiplyByPoint(this._matInverseLocalView,G,M),y[6*L]=M.x,y[6*L+1]=M.y,y[6*L+2]=M.z,v[6*L]=(R-s)/l,v[6*L+1]=0,v[6*L+2]=1;var k=n?new a$11(this._zBounds.x,R,o):a$11.fromDegrees(R,o,this._zBounds.x);c$1a.multiplyByPoint(this._matInverseLocalView,k,M),y[6*L+3]=M.x,y[6*L+4]=M.y,y[6*L+5]=M.z,v[6*L+3]=(R-s)/l,v[6*L+4]=0,v[6*L+5]=0,L++}L=0;for(I=0;I<h;I++){O=o+I*d;var U=n?new a$11(A,s,O):a$11.fromDegrees(s,O,A);c$1a.multiplyByPoint(this._matInverseLocalView,U,M),x[6*L]=M.x,x[6*L+1]=M.y,x[6*L+2]=M.z,b[6*L]=0,b[6*L+1]=(O-o)/u,b[6*L+2]=1;var V=n?new a$11(this._zBounds.x,s,O):a$11.fromDegrees(s,O,this._zBounds.x);c$1a.multiplyByPoint(this._matInverseLocalView,V,M),x[6*L+3]=M.x,x[6*L+4]=M.y,x[6*L+5]=M.z,b[6*L+3]=0,b[6*L+4]=(O-o)/u,b[6*L+5]=0;var W=n?new a$11(A,a,O):a$11.fromDegrees(a,O,A);c$1a.multiplyByPoint(this._matInverseLocalView,W,M),S[6*L]=M.x,S[6*L+1]=M.y,S[6*L+2]=M.z,w[6*L]=1,w[6*L+1]=(O-o)/u,w[6*L+2]=1;var H=n?new a$11(this._zBounds.x,a,O):a$11.fromDegrees(a,O,this._zBounds.x);c$1a.multiplyByPoint(this._matInverseLocalView,H,M),S[6*L+3]=M.x,S[6*L+4]=M.y,S[6*L+5]=M.z,w[6*L+3]=1,w[6*L+4]=(O-o)/u,w[6*L+5]=0,L++}for(var Y=i*t*2*3,j=new Uint16Array(Y),q=new Uint16Array(Y),X=0,K=0,Z=0;Z<t;Z++)for(var J=0;J<i;J++){var Q=J+c*Z,ee=J+c*(Z+1),te=J+1+c*(Z+1),ie=J+1+c*Z;j[X++]=ie,j[X++]=ee,j[X++]=Q,j[X++]=ie,j[X++]=te,j[X++]=ee,q[K++]=Q,q[K++]=ee,q[K++]=ie,q[K++]=ee,q[K++]=te,q[K++]=ie}for(var ne=2*i*3,re=2*t*3,oe=new Uint16Array(ne),ae=new Uint16Array(ne),se=new Uint16Array(re),le=new Uint16Array(re),ue=0,ce=0,he=0;he<t;he++){Q=Z=2*he,ee=Z+1,te=Z+2,ie=Z+3;se[ue++]=Q,se[ue++]=te,se[ue++]=ee,se[ue++]=ee,se[ue++]=te,se[ue++]=ie,le[ce++]=ee,le[ce++]=te,le[ce++]=Q,le[ce++]=ie,le[ce++]=te,le[ce++]=ee}var de=0,fe=0;for(he=0;he<i;he++){Q=J=2*he,ee=J+1,te=J+2,ie=J+3;oe[de++]=Q,oe[de++]=te,oe[de++]=ee,oe[de++]=ee,oe[de++]=te,oe[de++]=ie,ae[fe++]=ee,ae[fe++]=te,ae[fe++]=Q,ae[fe++]=ie,ae[fe++]=te,ae[fe++]=ee}var pe=2*p+2*_+2*m,_e=new Float32Array(3*pe),me=new Float32Array(3*pe),$e=new Uint16Array(2*Y+2*re+2*ne),ge=[],ye=[],ve=[];ge.push($),ge.push(y),ge.push(x),ge.push(S),ge.push(C),ge.push(P),ye.push(g),ye.push(v),ye.push(b),ye.push(w),ye.push(T),ye.push(E),ve.push(oe),ve.push(ae),ve.push(se),ve.push(le),ve.push(j),ve.push(q);for(var xe=ge.length,be=0,Se=0,we=0,Ce=0,Te=0;Te<xe;Te++){for(var Pe=ge[Te],Ee=ye[Te],Ae=ve[Te],Le=0;Le<Pe.length;Le++)_e[Se++]=Pe[Le],me[we++]=Ee[Le];for(Le=0;Le<Ae.length;Le++)$e[Ce++]=Ae[Le]+be;be+=Pe.length/3}var Me=u$Y.createVertexBuffer({context:this._context,typedArray:_e,usage:A$13.STATIC_DRAW}),Ie=u$Y.createVertexBuffer({context:this._context,typedArray:me,usage:A$13.STATIC_DRAW}),Oe=[],De={aPosition:0};Oe.push({index:De.aPosition,vertexBuffer:Me,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),De.aTexCoord0=1,Oe.push({index:De.aTexCoord0,vertexBuffer:Ie,componentsPerAttribute:3,componentDatatype:C$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1});var Re=u$Y.createIndexBuffer({context:this._context,typedArray:$e,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT}),Ne=new a$O({sources:[Me$3]}),Fe=new a$O({sources:[Ge$1]}),Be=this._createShaderPreDefines(this,e);Ne.defines=Be,Fe.defines=Be,this._volumeBoxCommand=new s$1d({primitiveType:H$11.TRIANGLES,modelMatrix:this._matLocalView,boundingVolume:this._boundingSphere,pass:we$l.OPAQUE,cull:!0}),this._volumeBoxCommand.vertexArray=new x$18({context:this._context,attributes:Oe,indexBuffer:Re}),this._volumeBoxCommand.shaderProgram=p$15.fromCache({context:this._context,vertexShaderSource:Ne,fragmentShaderSource:Fe,attributeLocations:De}),this._volumeBoxCommand.renderState=p$1a.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},depthMask:{enabled:!0},blending:Ee$s.ALPHA_BLEND})};for(var jt=new a$11,Mt=new a$10,Gt$1=new a$10,It=[],xe$2=0;xe$2<6;xe$2++)It.push(new a$10);function ye$1(e,t){var i=!1,n=t.split(" ");if(n.length>1){var r=n[0],o=n[1];for(var a in e.defines)if(-1!==e.defines[a].indexOf(r))return void(e.defines[a]=r+" "+o)}else{for(var a in e.defines)if(e.defines[a]===t){i=!0;break}i||e.defines.push(t)}}function Be$2(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function J$4(e){t$$(e)&&(e.vertexArray=e.vertexArray&&!e.vertexArray.isDestroyed()&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&!e.shaderProgram.isDestroyed()&&e.shaderProgram.destroy(),e.renderState=void 0,e.uniformMap=void 0)}function a$8(e,t){d$9.call(this,e,t),this._orientedBoundingBox=void 0,this._level=0,this._x=0,this._y=0,this._southwestChild=void 0,this._southeastChild=void 0,this._northwestChild=void 0,this._northeastChild=void 0,this._NetCDFInfo=void 0,this._NetCDFBuffer=void 0,this._isVisible=!1,this._disFromCamera=0,this._rangeList=256,this._isLessLodDis=!1,this._pix=0,this._s3mLoadState=W$q.UNLOAD,this._isRootTile=!1,this._rootTile=void 0,this._maxValue=void 0,this._minValue=void 0,this._multiTextures=[]}function H$5(e){for(var t=1;t<e;)t<<=1;return t}function q$3(e){var t=new a$11(1,255,65025);(t=a$11.multiplyByScalar(t,e,t)).x=t.x-Math.floor(t.x),t.y=t.y-Math.floor(t.y),t.z=t.z-Math.floor(t.z);var i=new a$11,n=new a$11(1/255,1/255,0);return i.x=t.y*n.x,i.y=t.z*n.y,i.z=t.z*n.z,t=a$11.subtract(t,i,t)}function G$8(e,t,i){var n=i.radius,r=i.center,o=a$11.distance(e.positionWC,r);e._mode===b$1d.SCENE2D&&(o=e.positionCartographic.height);var a=t.drawingBufferHeight,s=.5*n$1d.PI_OVER_FOUR,l=.5*a/Math.tan(s)*n/o;return Math.ceil(l)}d$9.prototype._createOutlineCommand=function(e){var t=new i$o(this._dWidth,this._dHeight,this._dDepth),i=(this._zBounds.y-this._zBounds.x)/2,n=a$11.fromArray([0,0,i]),r=c$1a.fromTranslation(n),o=new c$1a;c$1a.multiply(this._matLocalView,r,o);var a=new s$1d({primitiveType:H$11.LINES,modelMatrix:o,boundingVolume:this._boundingSphere,pass:we$l.OPAQUE,cull:!0,owner:e});a.vertexArray=t.getOutlineVertexArray(this._context),a.shaderProgram=p$15.fromCache({context:this._context,vertexShaderSource:He$5,fragmentShaderSource:Ye$6,attributeLocations:{aPosition:0}}),a.renderState=p$1a.fromCache({cull:{enabled:!0},depthTest:{enabled:!0}}),e._outlineCommand=a,this._outlineCommand=a},d$9.prototype._createUniformMap=function(e){var t=this,i={width:function(){return t._nWidth},height:function(){return t._nHeight},depth:function(){return t._nDepth},sideBlockCount:function(){return t._nSideBlockCount},blockLength:function(){return t._nBlockLength},texLength:function(){return t._nLength},u_maxVisibleTextureCoord:function(){return t._visibleBoundingBox._maximum},u_minVisibleTextureCoord:function(){return t._visibleBoundingBox._minimum},u_minMaxValueAndFiltration:function(){return Mt.x=t._floor,Mt.y=t._ceil,Mt.z=e._minFiltration,Mt.w=e._maxFiltration,Mt},uVolumeTexture:function(){var i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):t._timeIndex;return t._volTextures[i]},uNextVolumeTexture:function(){var i=t._timeIndex+1;return t._timeIndex+1==t._timeDimension&&(i=t._timeIndex),i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):i,t._volTextures[i]},uTimeRatio:function(){return e._timeRatio},u_colorTable:function(){return t$$(e._hypsometricTexture)?e._hypsometricTexture:t._context.defaultTexture},u_volumeBoxSize:function(){return jt.x=t._dWidth,jt.y=t._dHeight,jt.z=t._dDepth,jt},uFilterMode:function(){return e._filterMode},u_opacityTexture:function(){return t$$(e._opacityTexture)?e._opacityTexture:t._context.defaultTexture},u_colorTexture:function(){return t$$(e._colorTexture)?e._colorTexture:t._context.defaultTexture},u_jitterTexture:function(){return t$$(t._jitterTexture)?t._jitterTexture:t._context.defaultTexture},u_gradientOpacityInfo:function(){if(e._useGradientOpacity){var t=e._gradientOpacityMinOpacity,i=e._gradientOpacityMaxOpacity,n=[e._gradientOpacityMinValue,e._gradientOpacityMaxValue],r=(i-t)/(n[1]-n[0]),o=-n[0]*(i-t)/(n[1]-n[0])+t;Gt$1.x=t,Gt$1.y=i,Gt$1.z=r,Gt$1.w=o}return Gt$1},u_clip_planes:function(){for(var t=e._clipPlanes.length,i=0;i<t;i++)It[i].x=e._clipPlanes[i].normal.x,It[i].y=e._clipPlanes[i].normal.y,It[i].z=e._clipPlanes[i].normal.z,It[i].w=e._clipPlanes[i].distance;return It},u_clip_planes_count:function(){return e._clipPlanes.length},uDiffuse:function(){return e.material.diffuse},uAmbient:function(){return e.material.ambient},uSpecular:function(){return e.material.specular},uShiness:function(){return e.material.shiness}},n={uOffset:function(){return new a$11(e._sliceCoordinate.x,0,0)}},r={uOffset:function(){return new a$11(0,e._sliceCoordinate.y,0)}},o={uOffset:function(){return new a$11(0,0,e._sliceCoordinate.z)}};if(t$$(this._xSliceCommand)&&(this._xSliceCommand.uniformMap=s$1n(i,n),this._ySliceCommand.uniformMap=s$1n(i,r),this._zSliceCommand.uniformMap=s$1n(i,o)),t$$(this._volumeBoxCommand)){var a={u_camTexCoord:function(){var e,i,n=t.frameState.camera.positionCartographic;if(t._mode===b$1d.COLUMBUS_VIEW){var r=i$1g.toCartesian(n),o=m$13.convertToColumbusCartesian(r);e=o.y,i=o.z}else e=n$1d.toDegrees(n.longitude),i=n$1d.toDegrees(n.latitude);var a=n.height,s=t.GetRealTop()-t._zBounds.x,l=t.GetRealBoundLeft(),u=t.GetRealBoundRight(),c=t.GetRealBoundBottom(),h=t.GetRealBoundTop();return Qt.x=(e-l)/(u-l),Qt.y=(i-c)/(h-c),Qt.z=(a-t._zBounds.x)/s,Qt}};this._volumeBoxCommand.uniformMap=s$1n(i,a)}if(t$$(this._outlineCommand)){var s={uDiffuseColor:function(){return e._outlineColor}};this._outlineCommand.uniformMap=s$1n(i,s)}},d$9.prototype._initJitterTexture=function(){if(!t$$(this._jitterTexture)){for(var e=new Uint8Array(1024),t=0;t<1024;++t)e[t]=255*Math.random();this._jitterTexture=new P$S({context:this._context,width:32,height:32,pixelFormat:Z$_.LUMINANCE,pixelDatatype:v$Z.UNSIGNED_BYTE,flipY:!1}),this._jitterTexture.copyFrom({width:32,height:32,arrayBufferView:e})}},d$9.prototype._initialize=function(e,t,i){if(this.frameState=t,this._mode=t.mode,this._initialized){for(var n=this._volTextures.length,r=0;r<n;r++)this._volTextures[r].destroy();this._volTextures=[],t$$(this._volumeBoxCommand)&&(J$4(this._volumeBoxCommand),this._volumeBoxCommand=void 0),t$$(this._outlineCommand)&&(J$4(this._outlineCommand),this._outlineCommand=void 0),this._initialized=!1}this._initJitterTexture(),this._loadTexture(i),this._computePosition(),this._createVolumeBoxDrawCommand(e),this._createOutlineCommand(e),this._createSliceCommand(),this._createUniformMap(e),this._initialized=!0},d$9.prototype.update=function(e,t){if(this._mode=t.mode,(e._scaleDirty||e._sliceCoordDirty)&&(e._scaleDirty&&(J$4(this._volumeBoxCommand),this._volumeBoxCommand=void 0),J$4(this._xSliceCommand),this._xSliceCommand=void 0,J$4(this._ySliceCommand),this._ySliceCommand=void 0,J$4(this._zSliceCommand),this._zSliceCommand=void 0,J$4(this._outlineCommand),this._outlineCommand=void 0,this._createVolumeBoxDrawCommand(e),this._createOutlineCommand(e),this._createSliceCommand(),this._createUniformMap(e),e._scaleDirty=!1,e._sliceCoordDirty=!1),e._contourValueDirty){if(J$4(this._contourCommand),this._contourCommand=void 0,this.marchingCubes.contourValue=e.contourValue,t$$(this.output)){var i=this.marchingCubes.compute(this.output);this._createContourCommand(i.pBuffer,i.tBuffer,i.nBuffer)}e._contourValueDirty=!1}e._volumeRenderMode===xt.Slice?(t$$(this._xSliceCommand)&&t.commandList.push(this._xSliceCommand),t$$(this._ySliceCommand)&&t.commandList.push(this._ySliceCommand),t$$(this._zSliceCommand)&&t.commandList.push(this._zSliceCommand)):e._volumeRenderMode===xt.VolumeRendering?(t$$(this._volumeBoxCommand)&&e._fillStyle!==vr.WireFrame&&t.commandList.push(this._volumeBoxCommand),t$$(this._outlineCommand)&&e._fillStyle!==vr.Fill&&t.commandList.push(this._outlineCommand)):e._volumeRenderMode===xt.ContourValue&&t$$(this._contourCommand)&&t.commandList.push(this._contourCommand),this.updateTimeDimension(e)},d$9.prototype.updateTimeDimension=function(e){this._timeDimension>1?(e._timeIndexChange&&this._timeIndex++,this._timeIndex==this._timeDimension&&(this._timeIndex=0)):this._timeIndex=0},d$9.prototype._setDataBounds=function(e){this._dataBounds=e},d$9.prototype._useGradientOpacityChanged=function(e){e?this._appendProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"GRADIENT_OPACITY"):this._removeProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"GRADIENT_OPACITY")},d$9.prototype._enableLightingChange=function(e){e?(this._appendProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"APPLY_LIGHTING"),this._appendProgramDefineForCommand(this._contourCommand,!1,!0,"APPLY_LIGHTING")):(this._removeProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"APPLY_LIGHTING"),this._removeProgramDefineForCommand(this._contourCommand,!1,!0,"APPLY_LIGHTING"))},d$9.prototype._clipPlaneChanged=function(e){e._clipPlanes.length>0?this._appendProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"CLIP_PLANE"):this._removeProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"CLIP_PLANE")},d$9.prototype._setZBounds=function(e){this._zBounds=e},d$9.prototype._appendProgramDefineForCommand=function(e,t,i,n){if(t$$(e)){var r=this._context,o=e.shaderProgram.fragmentShaderSource,a=e.shaderProgram.vertexShaderSource;t&&ye$1(a,n),i&&ye$1(o,n),e.shaderProgram.destroy(),e.shaderProgram=p$15.fromCache({context:r,vertexShaderSource:a,fragmentShaderSource:o,attributeLocations:this._attributeLocations})}},d$9.prototype._removeProgramDefineForCommand=function(e,t,i,n){if(t$$(e)){var r=this._context,o=e.shaderProgram.fragmentShaderSource,a=e.shaderProgram.vertexShaderSource;t&&Be$2(a,n),i&&Be$2(o,n),e.shaderProgram.destroy(),e.shaderProgram=p$15.fromCache({context:r,vertexShaderSource:a,fragmentShaderSource:o,attributeLocations:this._attributeLocations})}},d$9.prototype.isDestroyed=function(){return!1},d$9.prototype.destroy=function(){for(var e=this._volTextures.length,t=0;t<e;t++)this._volTextures[t].destroy();return t$$(this._volumeBoxCommand)&&(J$4(this._volumeBoxCommand),this._volumeBoxCommand=void 0),t$$(this._outlineCommand)&&(J$4(this._outlineCommand),this._outlineCommand=void 0),t$$(this._xSliceCommand)&&(J$4(this._xSliceCommand),this._xSliceCommand=void 0),t$$(this._ySliceCommand)&&(J$4(this._ySliceCommand),this._ySliceCommand=void 0),t$$(this._zSliceCommand)&&(J$4(this._zSliceCommand),this._zSliceCommand=void 0),t$$(this._contourCommand)&&(J$4(this._contourCommand),this._contourCommand=void 0),t$$(this._jitterTexture)&&this._jitterTexture.destroy(),this.output=void 0,this.marchingCubes=void 0,s$1e(this)},a$8.prototype=new d$9,a$8.prototype.constructor=a$8,a$8.prototype.parent=d$9.prototype,Object.defineProperties(a$8.prototype,{}),a$8.prototype._encodeImageData=function(e,t,i,n){for(var r=this._nLength*this._nLength*4,o=new Array(r),a=i-t,s=t,l=0;l<e.zDimSize;l++)for(var u=parseInt(l/this._nSideBlockCount)*this._nBlockLength,c=l%this._nSideBlockCount*this._nBlockLength,h=-1;h<this._nBlockLength-1;h++)for(var d=-1;d<this._nBlockLength-1;d++){var f=Math.min(d,e.xValidSize-1),p=Math.min(h,e.yValidSize-1);f=Math.max(0,f),p=Math.max(0,p);var _=l*e.yDimSize*e.xDimSize+(e.yValidSize-1-p)*e.xDimSize+f;if(!(_<0)){var m=n[_],$=new a$10(0,0,0,0);if(-9999!=m){m<t||m>i?m=s:s=m;var g=q$3(m=(m-t)/a);$.x=g.x,$.y=g.y,$.z=g.z,$.w=1}var y=255*$.x,v=255*$.y,x=255*$.z,b=255*$.w;o[4*(_=(u+h)*this._nLength+c+d)]=parseInt(y),o[4*_+1]=parseInt(v),o[4*_+2]=parseInt(x),o[4*_+3]=parseInt(b)}}return new Uint8Array(o,0,r)},a$8.prototype._loadVolume=function(e,t){this._maxValue=t.maxValue,this._minValue=t.minValue,this._timeDimension=t.time,this._ceil=t.maxValue,this._floor=t.minValue,this._nWidth=t.xValidSize,this._nHeight=t.yValidSize,this._nDepth=t.zValidSize;var i=e.slice(36,e.byteLength),n=4*t.xDimSize*t.yDimSize*t.zDimSize;this._nSideBlockCount=Math.ceil(Math.sqrt(t.zDimSize)),this._nBlockLength=Math.max(t.xDimSize,t.yDimSize)+2,this._nLength=H$5(this._nBlockLength*this._nSideBlockCount-2);t.xValidSize,t.yValidSize,t.zValidSize;for(var r=[],o=0;o<this._timeDimension;o++){var a=new Float32Array(i.slice(o*n,(o+1)*n));r.push(this._encodeImageData(t,t.minValue,t.maxValue,a))}return r},a$8.prototype.updateTimeDimension=function(e){this._isRootTile?this._timeDimension>1?(e._timeIndexChange&&this._timeIndex++,this._timeIndex==this._timeDimension&&(this._timeIndex=0)):this._timeIndex=0:this._timeIndex=this._rootTile._timeIndex},a$8.prototype._computePosition=function(){var e=this._mode,t=new a$11(.5*(this._dataBounds.west+this._dataBounds.east),.5*(this._dataBounds.north+this._dataBounds.south),this._zBounds.x);this._matLocalView=new c$1a,this._matInverseLocalView=new c$1a;var i=[];if(e===b$1d.COLUMBUS_VIEW)this._vecCenter=new a$11(t.z,t.x,t.y),c$1a.fromTranslation(this._vecCenter,this._matLocalView),c$1a.inverse(this._matLocalView,this._matInverseLocalView),i[0]=new a$11(this._zBounds.x,this._dataBounds.west,this._dataBounds.south),i[1]=new a$11(this._zBounds.x,this._dataBounds.east,this._dataBounds.south),i[2]=new a$11(this._zBounds.x,this._dataBounds.east,this._dataBounds.north),i[3]=new a$11(this._zBounds.x,this._dataBounds.west,this._dataBounds.north),i[4]=new a$11(this._zBounds.y,this._dataBounds.west,this._dataBounds.south),i[5]=new a$11(this._zBounds.y,this._dataBounds.east,this._dataBounds.south),i[6]=new a$11(this._zBounds.y,this._dataBounds.east,this._dataBounds.north),i[7]=new a$11(this._zBounds.y,this._dataBounds.west,this._dataBounds.north);else{this._vecCenter=a$11.fromDegrees(t.x,t.y,t.z);var n=new e$1L;m$13.headingPitchRollToFixedFrame(this._vecCenter,n,n$1c.WGS84,m$13.eastNorthUpToFixedFrame,this._matLocalView),c$1a.inverse(this._matLocalView,this._matInverseLocalView),i[0]=a$11.fromDegrees(this._dataBounds.west,this._dataBounds.south,this._zBounds.x),i[1]=a$11.fromDegrees(this._dataBounds.east,this._dataBounds.south,this._zBounds.x),i[2]=a$11.fromDegrees(this._dataBounds.east,this._dataBounds.north,this._zBounds.x),i[3]=a$11.fromDegrees(this._dataBounds.west,this._dataBounds.north,this._zBounds.x),i[4]=a$11.fromDegrees(this._dataBounds.west,this._dataBounds.south,this._zBounds.y),i[5]=a$11.fromDegrees(this._dataBounds.east,this._dataBounds.south,this._zBounds.y),i[6]=a$11.fromDegrees(this._dataBounds.east,this._dataBounds.north,this._zBounds.y),i[7]=a$11.fromDegrees(this._dataBounds.west,this._dataBounds.north,this._zBounds.y)}this._dWidth=a$11.distance(i[1],i[0]),this._dHeight=a$11.distance(i[3],i[0]),this._dDepth=a$11.distance(i[4],i[0]),this._orientedBoundingBox=b$1o.fromPoints(i,this._orientedBoundingBox),this._boundingSphere=new c$19,c$1a.multiplyByPoint(this._matLocalView,a$11.ZERO,this._boundingSphere.center),this._boundingSphere.radius=.5*Math.sqrt(this._dWidth*this._dWidth+this._dHeight*this._dHeight+this._dDepth*this._dDepth)},a$8.prototype.calcPixFromCam=function(e,t,i){if(this._boundingSphere){var n=e.positionWC,r=a$11.clone(this._boundingSphere.center),o=a$11.distance(r,n);e._mode==b$1d.SCENE2D&&(o=e.positionCartographic.height),this._disFromCamera=o-this._boundingSphere.radius;var a;a=2*G$8(e,t,this._boundingSphere),this._isLessLodDis=a<=this._rangeList*i,this._pix=a}},a$8.prototype.load=function(e){var t,i,n=this._s3mLoadState,r=this;W$q.UNLOAD===n&&(r._s3mLoadState=W$q.LOADING,t=r._x<10?"000"+r._x:r._x<100?"00"+r._x:r._x<1e3?"0"+r._x:r._x,i=r._y<10?"000"+r._y:r._y<100?"00"+r._y:r._y<1e3?"0"+r._y:r._y,c$18(u$S(e._url+"/"+r._level+"/"+i+"/"+t+"/"+i+"_"+t+".vol"),(function(e){r._s3mLoadState=W$q.LOADED,r._arrayBuffer=e})).otherwise((function(e){throw new DeveloperError("Not a valid NetCDF file!")})))};var T$7=new c$1a;a$8.prototype._createUniformMap=function(e){this.parent._createUniformMap.call(this,e);var t=this,i={uMultiResolutionPara1:function(){return t$$(t._multiTextures[0])?t._multiTextures[0].multiResolutionPara:T$7},uMultiResolutionPara2:function(){return t$$(t._multiTextures[1])?t._multiTextures[1].multiResolutionPara:T$7},uMultiResolutionPara3:function(){return t$$(t._multiTextures[2])?t._multiTextures[2].multiResolutionPara:T$7},uVolumeTexture1:function(){var i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):t._timeIndex;return t$$(t._multiTextures[0])?t._multiTextures[0]._volTextures[i]:t._volTextures[i]},uNextVolumeTexture1:function(){var i=t._timeIndex+1;return t._timeIndex+1==t._timeDimension&&(i=t._timeIndex),i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):i,t$$(t._multiTextures[0])?t._multiTextures[0]._volTextures[i]:t._volTextures[i]},uVolumeTexture2:function(){var i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):t._timeIndex;return t$$(t._multiTextures[1])?t._multiTextures[1]._volTextures[i]:t._volTextures[i]},uNextVolumeTexture2:function(){var i=t._timeIndex+1;return t._timeIndex+1==t._timeDimension&&(i=t._timeIndex),i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):i,t$$(t._multiTextures[1])?t._multiTextures[1]._volTextures[i]:t._volTextures[i]},uVolumeTexture3:function(){var i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):t._timeIndex;return t$$(t._multiTextures[2])?t._multiTextures[2]._volTextures[i]:t._volTextures[i]},uNextVolumeTexture3:function(){var i=t._timeIndex+1;return t._timeIndex+1==t._timeDimension&&(i=t._timeIndex),i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):i,t$$(t._multiTextures[2])?t._multiTextures[2]._volTextures[i]:t._volTextures[i]}};t$$(this._xSliceCommand)&&(this._xSliceCommand.uniformMap=s$1n(i,this._xSliceCommand.uniformMap),this._ySliceCommand.uniformMap=s$1n(i,this._ySliceCommand.uniformMap),this._zSliceCommand.uniformMap=s$1n(i,this._zSliceCommand.uniformMap)),t$$(this._volumeBoxCommand)&&(this._volumeBoxCommand.uniformMap=s$1n(i,this._volumeBoxCommand.uniformMap)),t$$(this._outlineCommand)&&(this._outlineCommand.uniformMap=s$1n(i,this._outlineCommand.uniformMap))},a$8.prototype._createShaderPreDefines=function(e,t){var i=this.parent._createShaderPreDefines.call(this,e,t);return i.push("MultiResolution"),i};var _0x5628eb=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xf9d33a=_0x5628eb(void 0,(function(){return _0xf9d33a.toString().search("(((.+)+)+)+$").toString().constructor(_0xf9d33a).search("(((.+)+)+)+$")}));function _0x7787d7(){this.model={clamping:!0,allowDuplicateScalars:!1,range:[0,0]},this.model.nodes=[]}_0xf9d33a(),_0x7787d7.prototype.getSize=function(){return this.model.nodes.length},_0x7787d7.prototype.getType=function(){var e,t=0,i=0;this.model.nodes.length>0&&(t=this.model.nodes[0].y);for(var n=1;n<this.model.nodes.length;n++){if((e=this.model.nodes[n].y)!==t)if(e>t)switch(i){case 0:case 1:i=1;break;default:i=3}else switch(i){case 0:case 2:i=2;break;default:i=3}if(t=e,3===i)break}switch(i){case 0:return"Constant";case 1:return"NonDecreasing";case 2:return"NonIncreasing";default:return"Varied"}},_0x7787d7.prototype.getDataPointer=function(){var e=this.model.nodes.length;if(this.model.function=null,e>0){this.model.function=[];for(var t=0;t<e;t++)this.model.function[2*t]=this.model.nodes[t].x,this.model.function[2*t+1]=this.model.nodes[t].y}return this.model.function},_0x7787d7.prototype.getFirstNonZeroValue=function(){if(0===this.model.nodes.length)return 0;for(var e=1,t=0;t<this.model.nodes.length;t++)if(0!==this.model.nodes[t].y){e=0;break}return e?Number.MAX_VALUE:t>0?this.model.nodes[t-1].x:this.model.clamping?-Number.MAX_VALUE:this.model.nodes[0].x},_0x7787d7.prototype.getNodeValue=function(e,t){var i=this.model.nodes.length;return e<0||e>=i?-1:(t[0]=this.model.nodes[e].x,t[1]=this.model.nodes[e].y,t[2]=this.model.nodes[e].midpoint,t[3]=this.model.nodes[e].sharpness,1)},_0x7787d7.prototype.setNodeValue=function(e,t){var i=this.model.nodes.length;if(e<0||e>=i)return-1;var n=this.model.nodes[e].x;return this.model.nodes[e].x=t[0],this.model.nodes[e].y=t[1],this.model.nodes[e].midpoint=t[2],this.model.nodes[e].sharpness=t[3],n!==t[0]?this.sortAndUpdateRange():this.modified(),1},_0x7787d7.prototype.addPoint=function(e,t){this.addPointLong(e,t,.5,0)},_0x7787d7.prototype.addPointLong=function(e,t,i,n){if(i<0||i>1||n<0||n>1)return-1;this.model.allowDuplicateScalars||this.removePoint(e);var r,o={x:e,y:t,midpoint:i,sharpness:n};for(this.model.nodes.push(o),this.sortAndUpdateRange(),r=0;r<this.model.nodes.length&&this.model.nodes[r].x!==e;r++);return r<this.model.nodes.length?r:-1},_0x7787d7.prototype.setNodes=function(e){this.model.nodes!==e&&(this.model.nodes=e,this.sortAndUpdateRange())},_0x7787d7.prototype.getRange=function(){return this.model.range},_0x7787d7.prototype.updateRange=function(){var e=this.model.range.slice(),t=this.model.nodes.length;return t?(this.model.range[0]=this.model.nodes[0].x,this.model.range[1]=this.model.nodes[t-1].x):(this.model.range[0]=0,this.model.range[1]=0),(e[0]!==this.model.range[0]||e[1]!==this.model.range[1])&&(this.modified(),!0)},_0x7787d7.prototype.sortAndUpdateRange=function(e){this.model.nodes.sort((function(e,t){return e.x-t.x})),this.updateRange()||this.modified()},_0x7787d7.prototype.removePoint=function(e){var t;for(t=0;t<this.model.nodes.length&&this.model.nodes[t].x!==e;t++);if(t>=this.model.nodes.length)return-1;var i=t,n=!1;return this.model.nodes.splice(t,1),(0===t||t===this.model.nodes.length)&&(n=this.updateRange()),n||this.modified(),i},_0x7787d7.prototype.removeAllPoints=function(){this.model.nodes=[],this.sortAndUpdateRange()},_0x7787d7.prototype.addSegment=function(e,t,i,n){this.sortAndUpdateRange();for(var r=0;r<this.model.nodes.length;)this.model.nodes[r].x>=e&&this.model.nodes[r].x<=i?this.model.nodes.splice(r,1):r++;this.addPoint(e,t,.5,0),this.addPoint(i,n,.5,0)},_0x7787d7.prototype.getValue=function(e){var t=[];return this.getTable(e,e,1,t),t[0]},_0x7787d7.prototype.adjustRange=function(e){if(e.length<2)return 0;var t=this.getRange();t[0]<e[0]?this.addPoint(e[0],this.getValue(e[0])):this.addPoint(e[0],this.getValue(t[0])),t[1]>e[1]?this.addPoint(e[1],this.getValue(e[1])):this.addPoint(e[1],this.getValue(t[1])),this.sortAndUpdateRange();for(var i=0;i<this.model.nodes.length;)this.model.nodes[i].x>=e[0]&&this.model.nodes[i].x<=e[1]?this.model.nodes.splice(i,1):++i;return this.sortAndUpdateRange(),1},_0x7787d7.prototype.estimateMinNumberOfSamples=function(e,t){var i=this.findMinimumXDistance();return Math.ceil((t-e)/i)},_0x7787d7.prototype.findMinimumXDistance=function(){var e=this.model.nodes.length;if(e<2)return-1;for(var t=this.model.nodes[1].x-this.model.nodes[0].x,i=0;i<e-1;i++){var n=this.model.nodes[i+1].x-this.model.nodes[i].x;n<t&&(t=n)}return t},_0x7787d7.prototype.getTable=function(e,t,i,n,r){t$$(r)||(r=1);var o,a=0,s=this.model.nodes.length,l=0;0!==s&&(l=this.model.nodes[s-1].y);var u=0,c=0,h=0,d=0,f=0,p=0,_=0;for(o=0;o<i;o++){var m=r*o;for(u=i>1?e+o/(i-1)*(t-e):.5*(e+t);a<s&&u>this.model.nodes[a].x;)++a<s&&(c=this.model.nodes[a-1].x,h=this.model.nodes[a].x,d=this.model.nodes[a-1].y,f=this.model.nodes[a].y,p=this.model.nodes[a-1].midpoint,_=this.model.nodes[a-1].sharpness,p<1e-5&&(p=1e-5),p>.99999&&(p=.99999));if(a>=s)n[m]=this.model.clamping?l:0;else if(0===a)n[m]=this.model.clamping?this.model.nodes[0].y:0;else{var $=(u-c)/(h-c);if($=$<p?.5*$/p:.5+.5*($-p)/(1-p),_>.99){if($<.5){n[m]=d;continue}n[m]=f;continue}if(_<.01){n[m]=(1-$)*d+$*f;continue}$<.5?$=.5*(2*$)**(1+10*_):$>.5&&($=1-.5*(2*(1-$))**(1+10*_));var g=$*$,y=g*$,v=2*y-3*g+1,x=-2*y+3*g,b=y-2*g+$,S=y-g,w=(1-_)*(f-d);n[m]=v*d+x*f+b*w+S*w;var C=d<f?d:f,T=d>f?d:f;n[m]=n[m]<C?C:n[m],n[m]=n[m]>T?T:n[m]}}},_0x7787d7.prototype.modified=function(){},_0x7787d7.clone=function(e,t){if(t$$(e)){var i;for(t$$(t)||(t=new _0x7787d7),i=0;i<e.model.nodes.length;i++){var n=e.model.nodes[i];t.model.nodes.push({x:n.x,y:n.y,midpoint:n.midpoint,sharpness:n.sharpness})}return t.sortAndUpdateRange(),t}};var _0x53d6e3=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x424bbf=_0x53d6e3(void 0,(function(){return _0x424bbf.toString().search("(((.+)+)+)+$").toString().constructor(_0x424bbf).search("(((.+)+)+)+$")}));_0x424bbf();var _0x106ff0={RGB:0,HSV:1,LAB:2,DIVERGING:3},_0x4a80d5={LINEAR:0,LOG10:1};function _0x7fd6bb(e,t){var i=e[0],n=e[1],r=e[2],o=Math.sqrt(i*i+n*n+r*r),a=o>.001?Math.acos(i/o):0,s=a>.001?Math.atan2(r,n):0;t[0]=o,t[1]=a,t[2]=s}function _0x3d7b33(e,t){var i=e[0],n=e[1],r=e[2];t[0]=i*Math.cos(n),t[1]=i*Math.sin(n)*Math.cos(r),t[2]=i*Math.sin(n)*Math.sin(r)}function _0x39621c(e,t){if(e[0]>=t-.1)return e[2];var i=e[1]*Math.sqrt(t*t-e[0]*e[0])/(e[0]*Math.sin(e[1]));return e[2]>-.3*Math.PI?e[2]+i:e[2]-i}function _0x4f9f39(e,t){var i=e-t;for(i<0&&(i=-i);i>=2*Math.PI;)i-=2*Math.PI;return i>Math.PI&&(i=2*Math.PI-i),i}function _0x3ed28d(e,t,i,n){var r=[],o=[];_0x375b41(t,r),_0x375b41(i,o);var a=[],s=[];_0x7fd6bb(r,a),_0x7fd6bb(o,s);var l=e;if(a[1]>.05&&s[1]>.05&&_0x4f9f39(a[2],s[2])>.33*Math.PI){var u=Math.max(a[0],s[0]);u=Math.max(88,u),e<.5?(s[0]=u,s[1]=0,s[2]=0,l*=2):(a[0]=u,a[1]=0,a[2]=0,l=2*l-1)}a[1]<.05&&s[1]>.05?a[2]=_0x39621c(s,a[0]):s[1]<.05&&a[1]>.05&&(s[2]=_0x39621c(a,s[0]));var c=[];c[0]=(1-l)*a[0]+l*s[0],c[1]=(1-l)*a[1]+l*s[1],c[2]=(1-l)*a[2]+l*s[2];var h=[];_0x3d7b33(c,h),_0x51facf(h,n)}function _0x543bed(){this.model={clamping:!0,colorSpace:_0x106ff0.RGB,hSVWrap:!0,scale:_0x4a80d5.LINEAR,nanColor:null,belowRangeColor:null,aboveRangeColor:null,useAboveRangeColor:!1,useBelowRangeColor:!1,allowDuplicateScalars:!1,table:null,tableSize:0,buildTime:null,nodes:null,discretize:!1,numberOfValues:256,range:[0,1],mappingRange:[0,1]},this.model.table=[],this.model.nodes=[],this.model.nanColor=[.5,0,0,1],this.model.belowRangeColor=[0,0,0,1],this.model.aboveRangeColor=[1,1,1,1],this.model.buildTime={}}function _0x5ce534(e,t){var i,n,r=e[0],o=e[1],a=e[2],s=1/6,l=r,u=r;o>l?l=o:o<u&&(u=o),a>l?l=a:a<u&&(u=a);const c=l;(n=c>0?(l-u)/l:0)>0?(i=r===l?s*(o-a)/(l-u):o===l?1/3+s*(a-r)/(l-u):2/3+s*(r-o)/(l-u))<0&&(i+=1):i=0,t[0]=i,t[1]=n,t[2]=c}function _0x3306d8(e,t){var i,n,r,o=e[0],a=e[1],s=e[2],l=1/3,u=1/6,c=2/3,h=5/6;o>u&&o<=l?(n=1,i=(l-o)/u,r=0):o>l&&o<=.5?(n=1,r=(o-l)/u,i=0):o>.5&&o<=c?(r=1,n=(c-o)/u,i=0):o>c&&o<=h?(r=1,i=(o-c)/u,n=0):o>h&&o<=1?(i=1,r=(1-o)/u,n=0):(i=1,n=o/u,r=0),i=a*i+(1-a),n=a*n+(1-a),r=a*r+(1-a),i*=s,n*=s,r*=s,t[0]=i,t[1]=n,t[2]=r}function _0x193971(e,t){var i=(e[0]+16)/116,n=e[1]/500+i,r=i-e[2]/200;i**3>.008856?i**=3:i=(i-16/116)/7.787,n**3>.008856?n**=3:n=(n-16/116)/7.787,r**3>.008856?r**=3:r=(r-16/116)/7.787;t[0]=.9505*n,t[1]=1*i,t[2]=1.089*r}function _0x4321ee(e,t){var i=e[0]/.9505,n=e[1]/1,r=e[2]/1.089;i>.008856?i**=1/3:i=7.787*i+16/116,n>.008856?n**=1/3:n=7.787*n+16/116,r>.008856?r**=1/3:r=7.787*r+16/116,t[0]=116*n-16,t[1]=500*(i-n),t[2]=200*(n-r)}function _0x3d0ffc(e,t){var i=e[0],n=e[1],r=e[2],o=3.2406*i+-1.5372*n+-.4986*r,a=-.9689*i+1.8758*n+.0415*r,s=.0557*i+-.204*n+1.057*r;o>.0031308?o=1.055*o**(1/2.4)-.055:o*=12.92,a>.0031308?a=1.055*a**(1/2.4)-.055:a*=12.92,s>.0031308?s=1.055*s**(1/2.4)-.055:s*=12.92;var l=o;l<a&&(l=a),l<s&&(l=s),l>1&&(o/=l,a/=l,s/=l),o<0&&(o=0),a<0&&(a=0),s<0&&(s=0),t[0]=o,t[1]=a,t[2]=s}function _0x52eabb(e,t){var i=e[0],n=e[1],r=e[2];i>.04045?i=((i+.055)/1.055)**2.4:i/=12.92,n>.04045?n=((n+.055)/1.055)**2.4:n/=12.92,r>.04045?r=((r+.055)/1.055)**2.4:r/=12.92,t[0]=.4124*i+.3576*n+.1805*r,t[1]=.2126*i+.7152*n+.0722*r,t[2]=.0193*i+.1192*n+.9505*r}function _0x375b41(e,t){var i=[0,0,0];_0x52eabb(e,i),_0x4321ee(i,t)}function _0x51facf(e,t){var i=[0,0,0];_0x193971(e,i),_0x3d0ffc(i,t)}function x$7(e){n$1e.defined("context",e),this._context=e,this._NetCDFData=void 0,this._NetCDFInfo=void 0,this._NetCDFBuffer=void 0,this._dictColorTable=void 0,this._hasColorTable=0,this._hypsometricTexture=void 0,this._filterMode=J$O.FilterMode.LINEAR,this._volumeRenderMode=xt.VolumeRendering,this._scale=new a$11(1,1,1),this._scaleDirty=!1,this._sliceCoordDirty=!1,this._transparency=0,this._sliceCoordinate=new a$11(.5,.5,.5),this._floor=Number.MAX_VALUE,this._ceil=Number.MIN_VALUE,this._maxFiltration=Number.MAX_VALUE,this._minFiltration=Number.MIN_VALUE,this._visible=!0,this._type="VoxelGridLayer3D",this._name=void 0,this._url=void 0,this._voxelGridTile=void 0,this._zBounds=void 0,this._layerBounds=void 0,this._version=1,this._width=0,this._height=0,this._depth=0,this._time=0,this._cellWidth=0,this._cellHeight=0,this._cellDepth=0,this._cellTime=0,this._levels=0,this._availableNode=void 0,this._volumeBuffer=void 0,this._multiTextures=[],this._textureLevelLoaded=!0,this._period=500,this._prevTime=0,this._timeRatio=0,this._timeIndexChange=!1,this._duration=1,this._startRender=!1,this._frameIndex=-1,this._useGradientOpacity=!1,this._gradientOpacityMinOpacity=0,this._gradientOpacityMaxOpacity=1,this._gradientOpacityMinValue=0,this._gradientOpacityMaxValue=1,this._clipPlanes=[],this._contourValue=0,this._contourValueDirty=!1,this._enableLighting=!1,this._material={diffuse:new e$1z(.9,.9,.9),specular:new e$1z(.2,.2,.2),ambient:new e$1z(.1,.1,.1),shiness:10},this._fillStyle=vr.Fill,this._outlineColor=new e$1z(1,1,1,1)}_0x543bed.clone=function(e,t){if(t$$(e)){var i;for(t$$(t)||(t=new _0x543bed),i=0;i<e.model.nodes.length;i++){var n=e.model.nodes[i];t.model.nodes.push({x:n.x,r:n.r,g:n.g,b:n.b,midpoint:n.midpoint,sharpness:n.sharpness})}return t.sortAndUpdateRange(),t.model.mappingRange[0]=e.model.mappingRange[0],t.model.mappingRange[1]=e.model.mappingRange[1],t}},_0x543bed.prototype.getSize=function(){return this.model.nodes.length},_0x543bed.prototype.addRGBPoint=function(e,t,i,n){this.addRGBPointLong(e,t,i,n,.5,0)},_0x543bed.prototype.addRGBPointLong=function(e,t,i,n,r,o){var a=e$1Y(r,.5),s=e$1Y(o,0);if(a<0||a>1||s<0||s>1)return-1;this.model.allowDuplicateScalars||this.removePoint(e);var l={x:e,r:t,g:i,b:n,midpoint:a,sharpness:s};this.model.nodes.push(l),this.sortAndUpdateRange();for(var u=0;u<this.model.nodes.length&&this.model.nodes[u].x!==e;u++);return u<this.model.nodes.length?u:-1},_0x543bed.prototype.addHSVPoint=function(e,t,i,n){this.addHSVPointLong(e,t,i,n,.5,0)},_0x543bed.prototype.addHSVPointLong=function(e,t,i,n,r,o){var a=e$1Y(r,.5),s=e$1Y(o,0),l=[];return _0x3306d8([t,i,n],l),this.addRGBPoint(e,l[0],l[1],l[2],a,s)},_0x543bed.prototype.setNodes=function(e){this.model.nodes!==e&&(this.model.nodes=e,this.sortAndUpdateRange())},_0x543bed.prototype.sortAndUpdateRange=function(){this.model.nodes.sort((function(e,t){return e.x-t.x})),this.updateRange()||this.modified()},_0x543bed.prototype.getRange=function(){return this.model.mappingRange},_0x543bed.prototype.updateRange=function(){var e=[2];e[0]=this.model.mappingRange[0],e[1]=this.model.mappingRange[1];var t=this.model.nodes.length;return t?(this.model.mappingRange[0]=this.model.nodes[0].x,this.model.mappingRange[1]=this.model.nodes[t-1].x):(this.model.mappingRange[0]=0,this.model.mappingRange[1]=0),(e[0]!==this.model.mappingRange[0]||e[1]!==this.model.mappingRange[1])&&(this.modified(),!0)},_0x543bed.prototype.removePoint=function(e){for(var t=0;t<this.model.nodes.length&&this.model.nodes[t].x!==e;t++);var i=t;if(t>=this.model.nodes.length)return-1;var n=!1;return this.model.nodes.splice(t,1),(0===t||t===this.model.nodes.length)&&(n=this.updateRange()),n||this.modified(),i},_0x543bed.prototype.movePoint=function(e,t){if(e!==t){this.removePoint(t);for(var i=0;i<this.model.nodes.length;i++)if(this.model.nodes[i].x===e){this.model.nodes[i].x=t,this.sortAndUpdateRange();break}}},_0x543bed.prototype.removeAllPoints=function(){this.model.nodes=[],this.sortAndUpdateRange()},_0x543bed.prototype.addRGBSegment=function(e,t,i,n,r,o,a,s){this.sortAndUpdateRange();for(var l=0;l<this.model.nodes.length;)this.model.nodes[l].x>=e&&this.model.nodes[l].x<=r?this.model.nodes.splice(l,1):l++;this.addRGBPointLong(e,t,i,n,.5,0),this.addRGBPointLong(r,o,a,s,.5,0),this.modified()},_0x543bed.prototype.addHSVSegment=function(e,t,i,n,r,o,a,s){var l=[o,a,s],u=[],c=[];_0x3306d8([t,i,n],u),_0x3306d8(l,c),this.addRGBSegment(e,u[0],u[1],u[2],r,c[0],c[1],c[2])},_0x543bed.prototype.mapValue=function(e){var t=[];return this.getColor(e,t),[Math.floor(255*t[0]+.5),Math.floor(255*t[1]+.5),Math.floor(255*t[2]+.5),255]},_0x543bed.prototype.getColor=function(e,t){if(this.model.indexedLookup){var i=this.getSize(),n=this.getAnnotatedValueIndexInternal(e);if(n<0||0===i)this.getNanColor(t);else{var r=[];this.getNodeValue(n%i,r),t[0]=r.r,t[1]=r.g,t[2]=r.b}}else this.getTable(e,e,1,t)},_0x543bed.prototype.getRedValue=function(e){var t=[];return this.getColor(e,t),t[0]},_0x543bed.prototype.getGreenValue=function(e){var t=[];return this.getColor(e,t),t[1]},_0x543bed.prototype.getBlueValue=function(e){var t=[];return this.getColor(e,t),t[2]},_0x543bed.prototype.getTable=function(e,t,i,n){if(isNaN(e)||isNaN(t))for(var r=0;r<i;r++)n[3*r+0]=this.model.nanColor[0],n[3*r+1]=this.model.nanColor[1],n[3*r+2]=this.model.nanColor[2];else{var o=0,a=this.model.nodes.length,s=0,l=0,u=0;0!==a&&(s=this.model.nodes[a-1].r,l=this.model.nodes[a-1].g,u=this.model.nodes[a-1].b);var c=0,h=0,d=0,f=[0,0,0],p=[0,0,0],_=0,m=0,$=[],g=this.model.scale===_0x4a80d5.LOG10;g&&(g=this.model.mappingRange[0]>0);var y=0,v=0,x=0;g&&(y=Math.log10(e),v=Math.log10(t));for(r=0;r<i;r++){var b=3*r;if(i>1?g?c=10**(x=y+r/(i-1)*(v-y)):c=e+r/(i-1)*(t-e):g?c=10**(x=.5*(y+v)):c=.5*(e+t),this.model.discretize){var S=this.model.mappingRange;if(c>=S[0]&&c<=S[1]){var w=this.model.numberOfValues,C=S[1]-S[0];if(w<=1)c=S[0]+C/2;else{var T=(c-S[0])/C,P=Math.floor(w*T);c=S[0]+P/(w-1)*C}}}for(;o<a&&c>this.model.nodes[o].x;)++o<a&&(h=this.model.nodes[o-1].x,d=this.model.nodes[o].x,g&&(h=Math.log10(h),d=Math.log10(d)),f[0]=this.model.nodes[o-1].r,p[0]=this.model.nodes[o].r,f[1]=this.model.nodes[o-1].g,p[1]=this.model.nodes[o].g,f[2]=this.model.nodes[o-1].b,p[2]=this.model.nodes[o].b,_=this.model.nodes[o-1].midpoint,m=this.model.nodes[o-1].sharpness,_<1e-5&&(_=1e-5),_>.99999&&(_=.99999));if(c>this.model.mappingRange[1])n[b]=0,n[b+1]=0,n[b+2]=0,this.model.clamping&&(this.getUseAboveRangeColor()?(n[b]=this.model.aboveRangeColor[0],n[b+1]=this.model.aboveRangeColor[1],n[b+2]=this.model.aboveRangeColor[2]):(n[b]=s,n[b+1]=l,n[b+2]=u));else if(c<this.model.mappingRange[0]||!Number.isFinite(c)&&c<0)n[b]=0,n[b+1]=0,n[b+2]=0,this.model.clamping&&(this.getUseBelowRangeColor()?(n[b]=this.model.belowRangeColor[0],n[b+1]=this.model.belowRangeColor[1],n[b+2]=this.model.belowRangeColor[2]):a>0&&(n[b]=this.model.nodes[0].r,n[b+1]=this.model.nodes[0].g,n[b+2]=this.model.nodes[0].b));else if(0===o&&(Math.abs(c-e)<1e-6||this.model.discretize))a>0?(n[b]=this.model.nodes[0].r,n[b+1]=this.model.nodes[0].g,n[b+2]=this.model.nodes[0].b):(n[b]=0,n[b+1]=0,n[b+2]=0);else{var E=0;if(E=(E=g?(x-h)/(d-h):(c-h)/(d-h))<_?.5*E/_:.5+.5*(E-_)/(1-_),m>.99){if(E<.5){n[b]=f[0],n[b+1]=f[1],n[b+2]=f[2];continue}n[b]=p[0],n[b+1]=p[1],n[b+2]=p[2];continue}if(m<.01){if(this.model.colorSpace===_0x106ff0.RGB)n[b]=(1-E)*f[0]+E*p[0],n[b+1]=(1-E)*f[1]+E*p[1],n[b+2]=(1-E)*f[2]+E*p[2];else if(this.model.colorSpace===_0x106ff0.HSV){var A=[];_0x5ce534(f,z=[]),_0x5ce534(p,A),this.model.hSVWrap&&(z[0]-A[0]>.5||A[0]-z[0]>.5)&&(z[0]>A[0]?z[0]-=1:A[0]-=1),(G=[])[0]=(1-E)*z[0]+E*A[0],G[0]<0&&(G[0]+=1),G[1]=(1-E)*z[1]+E*A[1],G[2]=(1-E)*z[2]+E*A[2],_0x3306d8(G,$),n[b]=$[0],n[b+1]=$[1],n[b+2]=$[2]}else if(this.model.colorSpace===_0x106ff0.LAB){var L=[];_0x375b41(f,k=[]),_0x375b41(p,L),(U=[])[0]=(1-E)*k[0]+E*L[0],U[1]=(1-E)*k[1]+E*L[1],U[2]=(1-E)*k[2]+E*L[2],_0x51facf(U,$),n[b]=$[0],n[b+1]=$[1],n[b+2]=$[2]}else this.model.colorSpace===_0x106ff0.DIVERGING&&(_0x3ed28d(E,f,p,$),n[b]=$[0],n[b+1]=$[1],n[b+2]=$[2]);continue}E<.5?E=.5*(2*E)**(1+10*m):E>.5&&(E=1-.5*(2*(1-E))**(1+10*m));var M,I=E*E,O=I*E,D=2*O-3*I+1,R=-2*O+3*I,N=O-2*I+E,F=O-I;if(this.model.colorSpace===_0x106ff0.RGB)for(var B=0;B<3;B++)M=(1-m)*(p[B]-f[B]),n[b+B]=D*f[B]+R*p[B]+N*M+F*M;else if(this.model.colorSpace===_0x106ff0.HSV){var z;A=[];_0x5ce534(f,z=[]),_0x5ce534(p,A),this.model.hSVWrap&&(z[0]-A[0]>.5||A[0]-z[0]>.5)&&(z[0]>A[0]?z[0]-=1:A[0]-=1);var G=[];for(B=0;B<3;B++)M=(1-m)*(A[B]-z[B]),G[B]=D*z[B]+R*A[B]+N*M+F*M,0===B&&G[B]<0&&(G[B]+=1);_0x3306d8(G,$),n[b]=$[0],n[b+1]=$[1],n[b+2]=$[2]}else if(this.model.colorSpace===_0x106ff0.LAB){var k;L=[];_0x375b41(f,k=[]),_0x375b41(p,L);var U=[];for(B=0;B<3;B++)M=(1-m)*(L[B]-k[B]),U[B]=D*k[B]+R*L[B]+N*M+F*M;_0x51facf(U,$),n[b]=$[0],n[b+1]=$[1],n[b+2]=$[2]}else this.model.colorSpace===_0x106ff0.DIVERGING&&(_0x3ed28d(E,f,p,$),n[b]=$[0],n[b+1]=$[1],n[b+2]=$[2]);for(B=0;B<3;B++)n[b+B]=n[b+B]<0?0:n[b+B],n[b+B]=n[b+B]>1?1:n[b+B]}}}},_0x543bed.prototype.getUint8Table=function(e,t,i,n){if(n=e$1Y(n,!1),this.model.tableSize===i&&this.model.tableWithAlpha!==n)return this.model.table;if(0===this.model.nodes.length)return this.model.table;var r=n?4:3;(this.model.tableSize!==i||this.model.tableWithAlpha!==n)&&(this.model.table=new Uint8Array(i*r),this.model.tableSize=i,this.model.tableWithAlpha=n);var o=[];this.getTable(e,t,i,o);for(var a=0;a<i;a++)this.model.table[a*r+0]=Math.floor(255*o[3*a+0]+.5),this.model.table[a*r+1]=Math.floor(255*o[3*a+1]+.5),this.model.table[a*r+2]=Math.floor(255*o[3*a+2]+.5),n&&(this.model.table[a*r+3]=255);return this.model.buildTime.modified(),this.model.table},_0x543bed.prototype.buildFunctionFromTable=function(e,t,i,n){var r=0;this.removeAllPoints(),i>1&&(r=(t-e)/(i-1));for(var o=0;o<i;o++){var a={x:e+r*o,r:n[3*o],g:n[3*o+1],b:n[3*o+2],sharpness:0,midpoint:.5};this.model.nodes.push(a)}this.sortAndUpdateRange()},_0x543bed.prototype.getNodeValue=function(e,t){return e<0||e>=this.model.nodes.length?-1:(t[0]=this.model.nodes[e].x,t[1]=this.model.nodes[e].r,t[2]=this.model.nodes[e].g,t[3]=this.model.nodes[e].b,t[4]=this.model.nodes[e].midpoint,t[5]=this.model.nodes[e].sharpness,1)},_0x543bed.prototype.setNodeValue=function(e,t){if(e<0||e>=this.model.nodes.length)return-1;var i=this.model.nodes[e].x;return this.model.nodes[e].x=t[0],this.model.nodes[e].r=t[1],this.model.nodes[e].g=t[2],this.model.nodes[e].b=t[3],this.model.nodes[e].midpoint=t[4],this.model.nodes[e].sharpness=t[5],i!==t[0]?this.sortAndUpdateRange():this.modified(),1},_0x543bed.prototype.getNumberOfAvailableColors=function(){return this.model.indexedLookup&&this.getSize()?this.getSize():this.model.tableSize?this.model.tableSize:16777216},_0x543bed.prototype.getIndexedColor=function(e,t){var i=this.getSize();if(i>0&&e>=0){var n=[];this.getNodeValue(e%i,n);for(var r=0;r<3;++r)t[r]=n[r+1];t[3]=1}else this.getNanColor(t),t[3]=1},_0x543bed.prototype.fillFromDataPointer=function(e,t){if(!(e<=0)&&t){this.removeAllPoints();for(var i=0;i<e;i++)this.addRGBPoint(t[4*i],t[4*i+1],t[4*i+2],t[4*i+3])}},_0x543bed.prototype.setMappingRange=function(e,t){var i=[e,t],n=this.getRange();if((n[1]!==i[1]||n[0]!==i[0])&&i[1]!==i[0]){for(var r=(i[1]-i[0])/(n[1]-n[0]),o=i[0]-n[0]*r,a=0;a<this.model.nodes.length;++a)this.model.nodes[a].x=this.model.nodes[a].x*r+o;this.model.mappingRange[0]=i[0],this.model.mappingRange[1]=i[1],this.modified()}},_0x543bed.prototype.adjustRange=function(e){var t=this.getRange(),i=[];t[0]<e[0]?(this.getColor(e[0],i),this.addRGBPoint(e[0],i[0],i[1],i[2])):(this.getColor(t[0],i),this.addRGBPoint(e[0],i[0],i[1],i[2])),t[1]>e[1]?(this.getColor(e[1],i),this.addRGBPoint(e[1],i[0],i[1],i[2])):(this.getColor(t[1],i),this.addRGBPoint(e[1],i[0],i[1],i[2])),this.sortAndUpdateRange();for(var n=0;n<this.model.nodes.length;)this.model.nodes[n].x>=e[0]&&this.model.nodes[n].x<=e[1]?this.model.nodes.splice(n,1):++n;return 1},_0x543bed.prototype.estimateMinNumberOfSamples=function(e,t){var i=this.findMinimumXDistance();return Math.ceil((t-e)/i)},_0x543bed.prototype.findMinimumXDistance=function(){if(this.model.nodes.length<2)return-1;for(var e=Number.MAX_VALUE,t=0;t<this.model.nodes.length-1;t++){var i=this.model.nodes[t+1].x-this.model.nodes[t].x;i<e&&(e=i)}return e},_0x543bed.prototype.mapScalarsThroughTable=function(e,t,i,n){0!==this.getSize()&&(this.model.indexedLookup?this.mapDataIndexed(e,t,i,n):this.mapData(e,t,i,n))},_0x543bed.prototype.mapData=function(e,t,i,n){if(0!==this.getSize()){var r=Math.floor(255*this.getAlpha()+.5),o=e.getNumberOfTuples(),a=e.getNumberOfComponents(),s=t.getData(),l=e.getData(),u=[];if(i===ScalarMappingTarget.RGBA)for(var c=0;c<o;c++){var h=l[c*a+n];this.getColor(h,u),s[4*c]=Math.floor(255*u[0]+.5),s[4*c+1]=Math.floor(255*u[1]+.5),s[4*c+2]=Math.floor(255*u[2]+.5),s[4*c+3]=r}if(i===ScalarMappingTarget.RGB)for(c=0;c<o;c++){h=l[c*a+n];this.getColor(h,u),s[3*c]=Math.floor(255*u[0]+.5),s[3*c+1]=Math.floor(255*u[1]+.5),s[3*c+2]=Math.floor(255*u[2]+.5)}if(i===ScalarMappingTarget.LUMINANCE)for(c=0;c<o;c++){h=l[c*a+n];this.getColor(h,u),s[c]=Math.floor(76.5*u[0]+150.45*u[1]+28.05*u[2]+.5)}if(i===ScalarMappingTarget.LUMINANCE_ALPHA)for(c=0;c<o;c++){h=l[c*a+n];this.getColor(h,u),s[2*c]=Math.floor(76.5*u[0]+150.45*u[1]+28.05*u[2]+.5),s[2*c+1]=r}}},_0x543bed.prototype.applyColorMap=function(e){if(e.ColorSpace&&(this.model.colorSpace=_0x106ff0[e.ColorSpace.toUpperCase()],void 0===this.model.colorSpace&&(this.model.colorSpace=_0x106ff0.RGB)),e.NanColor)for(this.model.nanColor=[].concat(e.NanColor);this.model.nanColor.length<4;)this.model.nanColor.push(1);if(e.RGBPoints){var t=e.RGBPoints.length;this.model.nodes=[];for(var i=0;i<t;i+=4)this.model.nodes.push({x:e.RGBPoints[i],r:e.RGBPoints[i+1],g:e.RGBPoints[i+2],b:e.RGBPoints[i+3],midpoint:.5,sharpness:0})}this.sortAndUpdateRange()},_0x543bed.prototype.modified=function(){},Object.defineProperties(x$7.prototype,{visible:{get:function(){return this._visible},set:function(e){this._visible=e}},type:{get:function(){return this._type}},layerBounds:{get:function(){return this._layerBounds},set:function(e){this._layerBounds=e}},zBounds:{get:function(){return this._zBounds},set:function(e){this._zBounds=e}},name:{get:function(){return this._name}},NetCDFInfo:{get:function(){return this._NetCDFInfo}},maxFiltration:{get:function(){return this._maxFiltration},set:function(e){this._maxFiltration=e}},minFiltration:{get:function(){return this._minFiltration},set:function(e){this._minFiltration=e}},duration:{get:function(){return this._duration},set:function(e){n$1e.typeOf.number.greaterThan("duration",e,0),n$1e.typeOf.number.greaterThan("this._time",this._time,0),this._duration=e,this._period=1e3*this._duration/this._time}},opaqueRate:{get:function(){return this._transparency},set:function(e){this._transparency!==e&&(this._transparency=e)}},filterMode:{get:function(){return this._filterMode},set:function(e){this._filterMode!==e&&(this._filterMode=e)}},maxValue:{get:function(){return this._voxelGridTile.maxValue}},minValue:{get:function(){return this._voxelGridTile.minValue}},visibleBoundingBox:{get:function(){return this._voxelGridTile.visibleBoundingBox},set:function(e){this._voxelGridTile.visibleBoundingBox=e}},scale:{get:function(){return this._scale},set:function(e){a$11.equals(e,this._scale)||(this._scale=a$11.clone(e,this._scale),this._scaleDirty=!0)}},volumeRenderMode:{get:function(){return this._volumeRenderMode},set:function(e){this._volumeRenderMode=e}},sliceCoordinate:{get:function(){return this._sliceCoordinate},set:function(e){this._sliceCoordinate=e,this._sliceCoordDirty=!0}},frameIndex:{get:function(){return this._frameIndex},set:function(e){"number"!=typeof e||isNaN(e)||(this._frameIndex=e)}},colorTable:{get:function(){return this._dictColorTable},set:function(e){if(!t$$(e))return t$$(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null),void(this._hasColorTable=0);this._dictColorTable=o$T.clone(e,this._dictColorTable),this._dictColorTable.count()<1?this._hasColorTable=0:(this._dictColorTable.generateBuffer(),t$$(this._hypsometricTexture)||(this._hypsometricTexture=new P$S({context:this._context,width:1024,height:64,pixelFormat:Z$_.RGBA,flipY:!1})),this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._dictColorTable._imageBuffer}),this._hasColorTable=1)}},colorTransferFunction:{get:function(){return this._colorTransferFunction},set:function(e){if(t$$(e)){this._colorTransferFunction=_0x543bed.clone(e,this._colorTransferFunction);for(var t=1024,i=new Uint8Array(6144),n=new Float32Array(3*t),r=0;r<1;++r){var o=e.getRange();e.getTable(o[0],o[1],t,n,1);for(var a=0;a<3*t;++a)i[r*t*6+a]=255*n[a],i[r*t*6+a+3*t]=255*n[a]}t$$(this._colorTexture)||(this._colorTexture=new P$S({context:this._context,width:t,height:2,pixelFormat:Z$_.RGB,pixelDatatype:v$Z.UNSIGNED_BYTE,flipY:!1})),this._colorTexture.copyFrom({width:t,height:2,arrayBufferView:i})}else t$$(this._colorTransferFunction)&&(this._colorTransferFunction.destroy(),this._colorTransferFunction=null)}},opacityTransferFunction:{get:function(){return this._opacityTransferFunction},set:function(e){if(t$$(e)){this._opacityTransferFunction=_0x7787d7.clone(e,this._opacityTransferFunction);for(var t=1024,i=new Float32Array(2048),n=new Float32Array(t),r=0;r<1;++r){var o=e.getRange();e.getTable(o[0],o[1],t,n,1);for(var a=0;a<t;++a)i[r*t*2+a]=1-(1-n[a]),i[r*t*2+a+t]=i[r*t*2+a]}t$$(this._opacityTexture)||(this._opacityTexture=new P$S({context:this._context,width:t,height:2,pixelFormat:Z$_.LUMINANCE,pixelDatatype:v$Z.FLOAT,flipY:!1})),this._opacityTexture.copyFrom({width:t,height:2,arrayBufferView:i})}else t$$(this._opacityTransferFunction)&&(this._opacityTransferFunction.destroy(),this._opacityTransferFunction=null)}},useGradientOpacity:{get:function(){return this._useGradientOpacity},set:function(e){t$$(this._voxelGridTile)&&e!=this._useGradientOpacity&&this._voxelGridTile._useGradientOpacityChanged(e),this._useGradientOpacity=e}},gradientOpacityMinOpacity:{get:function(){return this._gradientOpacityMinOpacity},set:function(e){this._gradientOpacityMinOpacity=e}},gradientOpacityMaxOpacity:{get:function(){return this._gradientOpacityMaxOpacity},set:function(e){this._gradientOpacityMaxOpacity=e}},gradientOpacityMinValue:{get:function(){return this._gradientOpacityMinValue},set:function(e){this._gradientOpacityMinValue=e}},gradientOpacityMaxValue:{get:function(){return this._gradientOpacityMaxValue},set:function(e){this._gradientOpacityMaxValue=e}},contourValue:{get:function(){return this._contourValue},set:function(e){e!==this._contourValue&&(this._contourValue=Math.min(e,this.maxValue),this._contourValue=Math.max(e,this.minValue),this._contourValueDirty=!0)}},enableLighting:{get:function(){return this._enableLighting},set:function(e){e!==this._enableLighting&&(this._enableLighting=e,this._voxelGridTile._enableLightingChange(e))}},material:{get:function(){return this._material}},outlineColor:{get:function(){return this._outlineColor},set:function(e){this._outlineColor=e}},fillStyle:{get:function(){return this._fillStyle},set:function(e){this._fillStyle=e}}}),x$7.prototype.update=function(e,t){if(this._frameState=t,this._visible&&this._startRender){this._timeIndexChange=!1;var i=performance.now(),n=i-this._prevTime;this._timeRatio=n/this._period,n>this._period&&(this._prevTime=i,this._timeRatio=0,this._timeIndexChange=!0),t$$(this._voxelGridTile)&&(this._voxelGridTile instanceof a$8&&this.updateMultiResolution(e,t),this._voxelGridTile.update(this,t))}},x$7.prototype.setIsMultiResolution=function(e){t$$(this._voxelGridTile)||(e?(this._voxelGridTile=new a$8(this._context,this),this._voxelGridTile._isRootTile=!0):this._voxelGridTile=new d$9(this._context,this))};var Lt=new o$_("loadVol");function t$6(e,t){this._show=e$1Y(t,!0),this._command=new s$1d({owner:this}),this._ellipsoid=n$1c.fromCartesian3(new a$11(6378137-e,6378137-e,6356752.314245179-e)),this._baseColor=new e$1z(0,0,0,1),this._underDepth=1e3}x$7.prototype.updateMultiResolution=function(e,t){var i=t.camera,n=t.cullingVolume,r=e._gl,o=t.requests,a=this;if(this._voxelGridTile._isVisible=n.computeVisibility(this._voxelGridTile._orientedBoundingBox)!==cr$4.OUTSIDE,this._voxelGridTile._isVisible){if(!this._voxelGridTile._initialized)return void o.push({entity:this._voxelGridTile,priority:0,owner:this});this._voxelGridTile.calcPixFromCam(i,r,1),this._updateQueue=[[this._voxelGridTile]];for(var s,l,u,c,h,d,f=[this._voxelGridTile],p=1;p<this._levels;p++){for(var _={},m=0;m<f.length;m++){if(!(b=f[m])._isLessLodDis){if(u=this._availableNode[p].resolution.x,c=this._availableNode[p].resolution.y,t$$(b._southwestChild))_[JSON.stringify([b._southwestChild._x,b._southwestChild._y,b._southwestChild._level])]=b._southwestChild;else if(h=2*b._x,d=2*b._y+1,h<this._availableNode[p].EndCol&&d<this._availableNode[p].EndRow){b._southwestChild=new a$8(this._context,this),b._southwestChild._mode=t.mode,b._southwestChild._level=b._level+1,b._southwestChild._x=h,b._southwestChild._y=d,b._southwestChild._zBounds=b._zBounds,s=h==this._availableNode[p].EndCol-1?(this._availableNode[p].Width-h*this._cellWidth)*u:this._cellWidth*u,l=d==this._availableNode[p].EndRow-1?(this._availableNode[p].Height-d*this._cellHeight)*c:this._cellHeight*c;var $=this._layerBounds.north-d*c*this._cellHeight;b._southwestChild._dataBounds=new s$1p(b._dataBounds.west,$-l,b._dataBounds.west+s,$),b._southwestChild._computePosition(),b._southwestChild._rootTile=this._voxelGridTile,_[JSON.stringify([b._southwestChild._x,b._southwestChild._y,b._southwestChild._level])]=b._southwestChild}if(t$$(b._southeastChild))_[JSON.stringify([b._southeastChild._x,b._southeastChild._y,b._southeastChild._level])]=b._southeastChild;else if(h=2*b._x+1,d=2*b._y+1,h<this._availableNode[p].EndCol&&d<this._availableNode[p].EndRow){b._southeastChild=new a$8(this._context,this),b._southeastChild._mode=t.mode,b._southeastChild._level=b._level+1,b._southeastChild._x=h,b._southeastChild._y=d,b._southeastChild._zBounds=b._zBounds,s=h==this._availableNode[p].EndCol-1?(this._availableNode[p].Width-h*this._cellWidth)*u:this._cellWidth*u,l=d==this._availableNode[p].EndRow-1?(this._availableNode[p].Height-d*this._cellHeight)*c:this._cellHeight*c;$=this._layerBounds.north-d*c*this._cellHeight;var g=this._layerBounds.west+h*u*this._cellWidth;b._southeastChild._dataBounds=new s$1p(g,$-l,g+s,$),b._southeastChild._computePosition(),b._southeastChild._rootTile=this._voxelGridTile,_[JSON.stringify([b._southeastChild._x,b._southeastChild._y,b._southeastChild._level])]=b._southeastChild}if(t$$(b._northwestChild)?_[JSON.stringify([b._northwestChild._x,b._northwestChild._y,b._northwestChild._level])]=b._northwestChild:(h=2*b._x,d=2*b._y,h<this._availableNode[p].EndCol&&d<this._availableNode[p].EndRow&&(b._northwestChild=new a$8(this._context,this),b._northwestChild._mode=t.mode,b._northwestChild._level=b._level+1,b._northwestChild._x=h,b._northwestChild._y=d,b._northwestChild._zBounds=b._zBounds,s=h==this._availableNode[p].EndCol-1?(this._availableNode[p].Width-h*this._cellWidth)*u:this._cellWidth*u,l=d==this._availableNode[p].EndRow-1?(this._availableNode[p].Height-d*this._cellHeight)*c:this._cellHeight*c,b._northwestChild._dataBounds=new s$1p(b._dataBounds.west,b._dataBounds.north-l,b._dataBounds.west+s,b._dataBounds.north),b._northwestChild._computePosition(),b._northwestChild._rootTile=this._voxelGridTile,_[JSON.stringify([b._northwestChild._x,b._northwestChild._y,b._northwestChild._level])]=b._northwestChild)),t$$(b._northeastChild))_[JSON.stringify([b._northeastChild._x,b._northeastChild._y,b._northeastChild._level])]=b._northeastChild;else if(h=2*b._x+1,d=2*b._y,h<this._availableNode[p].EndCol&&d<this._availableNode[p].EndRow){b._northeastChild=new a$8(this._context,this),b._northeastChild._mode=t.mode,b._northeastChild._level=b._level+1,b._northeastChild._x=h,b._northeastChild._y=d,b._northeastChild._zBounds=b._zBounds,s=h==this._availableNode[p].EndCol-1?(this._availableNode[p].Width-h*this._cellWidth)*u:this._cellWidth*u,l=d==this._availableNode[p].EndRow-1?(this._availableNode[p].Height-d*this._cellHeight)*c:this._cellHeight*c;g=this._layerBounds.west+h*u*this._cellWidth;b._northeastChild._dataBounds=new s$1p(g,b._dataBounds.north-l,g+s,b._dataBounds.north),b._northeastChild._computePosition(),b._northeastChild._rootTile=this._voxelGridTile,_[JSON.stringify([b._northeastChild._x,b._northeastChild._y,b._northeastChild._level])]=b._northeastChild}}}f=[];var y=0,v=void 0;for(var x in _){var b;(b=_[x])._isVisible=n.computeVisibility(b._orientedBoundingBox)!==cr$4.OUTSIDE,b._isVisible&&(b.calcPixFromCam(i,r,1),b._pix>y&&(y=b._pix,v=b))}if(y=0,t$$(v)){var S=_[JSON.stringify([v._x-1,v._y,v._level])],w=_[JSON.stringify([v._x+1,v._y,v._level])],C=_[JSON.stringify([v._x,v._y-1,v._level])],T=_[JSON.stringify([v._x,v._y+1,v._level])],P=_[JSON.stringify([v._x+1,v._y-1,v._level])];t$$(P)&&P._isVisible&&t$$(w)&&t$$(C)&&w._isVisible&&C._isVisible&&(y=P._pix+w._pix+C._pix,f=[C,P,v,w]);var E=_[JSON.stringify([v._x+1,v._y+1,v._level])];if(t$$(E)&&E._isVisible&&t$$(w)&&t$$(T)&&w._isVisible&&T._isVisible)(L=E._pix+w._pix+T._pix)>y&&(y=L,f=[v,w,T,E]);var A=_[JSON.stringify([v._x-1,v._y+1,v._level])];if(t$$(A)&&A._isVisible&&t$$(S)&&t$$(T)&&S._isVisible&&T._isVisible)(L=A._pix+S._pix+T._pix)>y&&(y=L,f=[S,v,A,T]);var L,M=_[JSON.stringify([v._x-1,v._y-1,v._level])];if(t$$(M)&&M._isVisible&&t$$(S)&&t$$(C)&&S._isVisible&&C._isVisible)(L=M._pix+S._pix+C._pix)>y&&(y=L,f=[M,C,S,v]);0==f.length&&(t$$(S)&&S._isVisible&&(y=S._pix,f=[S,v]),t$$(w)&&w._isVisible&&w._pix>y&&(y=w._pix,f=[v,w]),t$$(C)&&C._isVisible&&C._pix>y&&(y=C._pix,f=[C,v]),t$$(T)&&T._isVisible&&T._pix>y&&(y=T._pix,f=[v,T]),0==f.length&&(f=[v]))}if(!(f.length>0))break;this._updateQueue.push(f);for(m=0;m<f.length;m++)f[m]._s3mLoadState===W$q.UNLOAD&&o.push({entity:f[m],priority:0,owner:this})}if(this._textureLevelLoaded){this._multiTextures.length>this._updateQueue.length-1&&(this._multiTextures.length=this._updateQueue.length-1);var I=void 0,O=void 0,D=void 0;for(p=1;p<this._updateQueue.length;p++){var R=this._updateQueue[p],N=R.length;if(0===N)break;var F=!0;for(m=0;m<R.length;m++)if(R[m]._s3mLoadState!=W$q.LOADED&&R[m]._s3mLoadState!=W$q.TRANSFORMED){F=!1;break}if(!F)break;if(this._multiTextures.length<p){var B;I={textureLevel:B={}},O=R,D=this._multiTextures.length;break}if(D=p-1,!t$$(B=this._multiTextures[D])||R[0]._x<B.startCol||R[0]._y<B.startRow||R[N-1]._x>B.endCol||R[N-1]._y>B.endRow){I={textureLevel:{}},O=R;break}}if(t$$(I)){I._cellWidth=this._cellWidth,I._cellHeight=this._cellHeight,I._cellDepth=this._cellDepth,I._availableNode=this._availableNode[O[0]._level],I._time=this._time,I._layerBounds=this._layerBounds,I._minFiltration=this._floor,I._maxFiltration=this._ceil;var z=[];for(p=0;p<O.length;p++){var G={_x:O[p]._x,_y:O[p]._y,_level:O[p]._level,_dataBounds:O[p]._dataBounds,_s3mLoadState:O[p]._s3mLoadState,_arrayBuffer:O[p]._arrayBuffer};z.push(G)}I.arrayWork=z;var k=Lt.scheduleTask(I);if(!t$$(k))return;this._textureLevelLoaded=!1;a=this;c$18(k,(function(e){var t;if(D<a._multiTextures.length){if(t$$(!(t=a._multiTextures[D])._volTextures))t._volTextures=[];else{for(var i=t._volTextures.length,n=0;n<i;n++)t._volTextures[n].destroy();t._volTextures=[]}t.bounds=e.textureLevel.bounds,t.cellDepth=e.textureLevel.cellDepth,t.cellHeight=e.textureLevel.cellHeight,t.cellWidth=e.textureLevel.cellWidth,t.endCol=e.textureLevel.endCol,t.endRow=e.textureLevel.endRow,t.multiResolutionTranslation=e.textureLevel.multiResolutionTranslation,t.startCol=e.textureLevel.startCol,t.startRow=e.textureLevel.startRow,t.validHeight=e.textureLevel.validHeight,t.validWidth=e.textureLevel.validWidth,t.xSpan=e.textureLevel.xSpan,t._nBlockLength=e.textureLevel._nBlockLength,t._nLength=e.textureLevel._nLength,t._nSideBlockCount=e.textureLevel._nSideBlockCount}else t$$(!(t=e.textureLevel)._volTextures)&&(t._volTextures=[]),a._multiTextures.push(t);t.multiResolutionPara=new c$1a(t.multiResolutionTranslation.x,0,t.validWidth,t._nLength,t.multiResolutionTranslation.y,0,t.validHeight,0,t.multiResolutionTranslation.z,0,t._nSideBlockCount,0,t.multiResolutionTranslation.w,0,t._nBlockLength,0);var r=tt$l.LINEAR,o=et$k.LINEAR;a._filterMode===J$O.FilterMode.NEAREST&&(r=tt$l.NEAREST,o=et$k.NEAREST);for(i=e.imageDatas.length,n=0;n<i;n++){var s=new P$S({context:a._context,width:t._nLength,height:t._nLength,pixelFormat:Z$_.RGBA,flipY:!1,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:r,magnificationFilter:o})});s.copyFrom({width:t._nLength,height:t._nLength,arrayBufferView:e.imageDatas[n]}),t._volTextures.push(s)}a._textureLevelLoaded=!0;for(n=0;n<e.unzipTile.length;n++){var l=e.unzipTile[n].index,u=e.unzipTile[n].buffer;O[l]._arrayBuffer=u,O[l]._s3mLoadState=W$q.TRANSFORMED}for(n=0;n<O.length;n++)O[n]._s3mLoadState=W$q.TRANSFORMED}))}}var U=[];for(p=0;p<this._multiTextures.length;p++)U.push(this._multiTextures[p]);p=0;for(U.length>3&&(p=U.length-3),this._voxelGridTile._multiTextures=[];p<U.length;p++)this._voxelGridTile._multiTextures.push(U[p])}},x$7.prototype.loadEntity=function(e){e.load(this)},x$7.prototype.addClipPlane=function(e){this._clipPlanes.length>=6?console.log("at most 6 clipping planes can be specified"):(this._clipPlanes.push(e),t$$(this._voxelGridTile)&&this._voxelGridTile._clipPlaneChanged(this))},x$7.prototype.removeAllClipPlanes=function(){var e=this._clipPlanes.length;this._clipPlanes.length=0,t$$(this._voxelGridTile)&&e>0&&this._voxelGridTile._clipPlaneChanged(this)},x$7.prototype.removeClipPlane=function(e){e<0||e>=6||(this._clipPlanes.splice(e,1),t$$(this._voxelGridTile)&&this._voxelGridTile._clipPlaneChanged(this))},x$7.prototype.getNumberOfClipPlanes=function(){return this._clipPlanes.length},x$7.prototype.startRender=function(e){if(this._startRender=!0,t$$(this._voxelGridTile)){var t;if(this._voxelGridTile._setDataBounds(this._layerBounds),this._voxelGridTile._setZBounds(this._zBounds),t$$(this._NetCDFBuffer))t=this._voxelGridTile._loadData(this._NetCDFBuffer,e),this._minFiltration==Number.MIN_VALUE&&(this._minFiltration=this._voxelGridTile._floor),this._maxFiltration==Number.MAX_VALUE&&(this._maxFiltration=this._voxelGridTile._ceil);else if(t$$(this._volumeBuffer)){var i=this._cellWidth,n=this._cellHeight,r=this._availableNode[this._voxelGridTile._level];r.EndCol-1==this._voxelGridTile._x&&(i=r.Width-this._voxelGridTile._x*i),r.EndRow-1==this._voxelGridTile._y&&(n=r.Height-this._voxelGridTile._y*n),t=this._voxelGridTile._loadVolume(this._volumeBuffer,{maxValue:this._ceil,minValue:this._floor,time:this._time,xDimSize:this._cellWidth,yDimSize:this._cellHeight,zDimSize:this._cellDepth,xValidSize:i,yValidSize:n,zValidSize:this._cellDepth})}this._voxelGridTile._initialize(this,this._frameState,t)}},x$7.prototype.render=function(e,t){},x$7.prototype.releaseSelection=function(e,t){},x$7.prototype.isDestroyed=function(){return!1},x$7.prototype.destroy=function(){return t$$(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null),t$$(this._hypsometricTexture)&&(this._hypsometricTexture.destroy(),this._hypsometricTexture=null),t$$(this._voxelGridTile)&&(this._voxelGridTile.destroy(),this._voxelGridTile=void 0),this._NetCDFInfo=void 0,this._NetCDFData=void 0,this._NetCDFBuffer=void 0,s$1e(this)},Object.defineProperties(t$6.prototype,{show:{get:function(){return this._show},set:function(e){n$1e.defined("UnderGlobe show",e),this._show=e}},underDepth:{get:function(){return this._underDepth},set:function(e){if(n$1e.defined("UnderGlobe underDepth",e),this._underDepth!==e){var t=this._command;t$$(t)&&(t.vertexArray=t.vertexArray&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy()),this._ellipsoid=n$1c.fromCartesian3(new a$11(6378137-e,6378137-e,6356752.314245179-e))}this._underDepth=e}},ellipsoid:{get:function(){return this._ellipsoid}},baseColor:{get:function(){return this._baseColor},set:function(e){n$1e.defined("UnderGlobe baseColor",e),this._baseColor=e}}});var S$9="attribute vec4 position;\nvoid main(void)\n{\ngl_Position = czm_modelViewProjection * position;\n}",G$7="uniform vec4 uBaseColor;\nvoid main (void)\n{\ngl_FragColor = uBaseColor;\n}";t$6.prototype.update=function(e){var t=e.camera.positionCartographic.height;if(this._show&&e.passes.render&&!(t>1e4)){var i=e.mode;if(i===b$1d.SCENE3D||i===b$1d.MORPHING){var n=this._command,r=this;if(!t$$(n.vertexArray)){var o=e.context,a=b$18.createGeometry(new b$18({radii:new a$11(6378137-this._underDepth,6378137-this._underDepth,6356752.314245179-this._underDepth),slicePartitions:256,stackPartitions:256,vertexFormat:n$12.POSITION_ONLY}));n.vertexArray=x$18.fromGeometry({context:o,geometry:a,attributeLocations:F$W.createAttributeLocations(a),bufferUsage:A$13.STATIC_DRAW}),n.renderState=p$1a.fromCache({cull:{enabled:!0}}),n.uniformMap={uBaseColor:function(){return r._baseColor}};var s=new a$O({sources:[S$9]}),l=new a$O({sources:[G$7]});n.shaderProgram=p$15.fromCache({context:o,vertexShaderSource:s,fragmentShaderSource:l})}return n}}},t$6.prototype.destroy=function(){var e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),s$1e(this)};var Bt=function(e){var t,i=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,r=Math.ceil,o=Math.floor,a="[BigNumber Error] ",s=a+"Number primitive has more than 15 significant digits: ",l=1e14,u=14,c=9007199254740991,h=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],d=1e7,f=1e9;function p(e){var t=0|e;return e>0||e===t?t:t-1}function _(e){for(var t,i,n=1,r=e.length,o=e[0]+"";n<r;){for(t=e[n++]+"",i=u-t.length;i--;t="0"+t);o+=t}for(r=o.length;48===o.charCodeAt(--r););return o.slice(0,r+1||1)}function m(e,t){var i,n,r=e.c,o=t.c,a=e.s,s=t.s,l=e.e,u=t.e;if(!a||!s)return null;if(i=r&&!r[0],n=o&&!o[0],i||n)return i?n?0:-s:a;if(a!=s)return a;if(i=a<0,n=l==u,!r||!o)return n?0:!r^i?1:-1;if(!n)return l>u^i?1:-1;for(s=(l=r.length)<(u=o.length)?l:u,a=0;a<s;a++)if(r[a]!=o[a])return r[a]>o[a]^i?1:-1;return l==u?0:l>u^i?1:-1}function $(e,t,i,n){if(e<t||e>i||e!==o(e))throw Error(a+(n||"Argument")+("number"==typeof e?e<t||e>i?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function g(e){var t=e.c.length-1;return p(e.e/u)==t&&e.c[t]%2!=0}function y(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function v(e,t,i){var n,r;if(t<0){for(r=i+".";++t;r+=i);e=r+e}else if(++t>(n=e.length)){for(r=i,t-=n;--t;r+=i);e+=r}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}return t=function e(t){var x,b,S,w=F.prototype={constructor:F,toString:null,valueOf:null},C=new F(1),T=20,P=4,E=-7,A=21,L=-1e7,M=1e7,I=!1,O=1,D=0,R={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},N="0123456789abcdefghijklmnopqrstuvwxyz";function F(e,t){var n,r,a,l,h,d,f,p,_=this;if(!(_ instanceof F))return new F(e,t);if(null==t){if(e&&!0===e._isBigNumber)return _.s=e.s,void(!e.c||e.e>M?_.c=_.e=null:e.e<L?_.c=[_.e=0]:(_.e=e.e,_.c=e.c.slice()));if((d="number"==typeof e)&&0*e==0){if(_.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,h=e;h>=10;h/=10,l++);return void(l>M?_.c=_.e=null:(_.e=l,_.c=[e]))}p=String(e)}else{if(!i.test(p=String(e)))return S(_,p,d);_.s=45==p.charCodeAt(0)?(p=p.slice(1),-1):1}(l=p.indexOf("."))>-1&&(p=p.replace(".","")),(h=p.search(/e/i))>0?(l<0&&(l=h),l+=+p.slice(h+1),p=p.substring(0,h)):l<0&&(l=p.length)}else{if($(t,2,N.length,"Base"),10==t)return k(_=new F(e),T+_.e+1,P);if(p=String(e),d="number"==typeof e){if(0*e!=0)return S(_,p,d,t);if(_.s=1/e<0?(p=p.slice(1),-1):1,F.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(s+e)}else _.s=45===p.charCodeAt(0)?(p=p.slice(1),-1):1;for(n=N.slice(0,t),l=h=0,f=p.length;h<f;h++)if(n.indexOf(r=p.charAt(h))<0){if("."==r){if(h>l){l=f;continue}}else if(!a&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){a=!0,h=-1,l=0;continue}return S(_,String(e),d,t)}d=!1,(l=(p=b(p,t,10,_.s)).indexOf("."))>-1?p=p.replace(".",""):l=p.length}for(h=0;48===p.charCodeAt(h);h++);for(f=p.length;48===p.charCodeAt(--f););if(p=p.slice(h,++f)){if(f-=h,d&&F.DEBUG&&f>15&&(e>c||e!==o(e)))throw Error(s+_.s*e);if((l=l-h-1)>M)_.c=_.e=null;else if(l<L)_.c=[_.e=0];else{if(_.e=l,_.c=[],h=(l+1)%u,l<0&&(h+=u),h<f){for(h&&_.c.push(+p.slice(0,h)),f-=u;h<f;)_.c.push(+p.slice(h,h+=u));h=u-(p=p.slice(h)).length}else h-=f;for(;h--;p+="0");_.c.push(+p)}}else _.c=[_.e=0]}function B(e,t,i,n){var r,o,a,s,l;if(null==i?i=P:$(i,0,8),!e.c)return e.toString();if(r=e.c[0],a=e.e,null==t)l=_(e.c),l=1==n||2==n&&(a<=E||a>=A)?y(l,a):v(l,a,"0");else if(o=(e=k(new F(e),t,i)).e,s=(l=_(e.c)).length,1==n||2==n&&(t<=o||o<=E)){for(;s<t;l+="0",s++);l=y(l,o)}else if(t-=a,l=v(l,o,"0"),o+1>s){if(--t>0)for(l+=".";t--;l+="0");}else if((t+=o-s)>0)for(o+1==s&&(l+=".");t--;l+="0");return e.s<0&&r?"-"+l:l}function z(e,t){for(var i,n=1,r=new F(e[0]);n<e.length;n++){if(!(i=new F(e[n])).s){r=i;break}t.call(r,i)&&(r=i)}return r}function G(e,t,i){for(var n=1,r=t.length;!t[--r];t.pop());for(r=t[0];r>=10;r/=10,n++);return(i=n+i*u-1)>M?e.c=e.e=null:i<L?e.c=[e.e=0]:(e.e=i,e.c=t),e}function k(e,t,i,n){var a,s,c,d,f,p,_,m=e.c,$=h;if(m){e:{for(a=1,d=m[0];d>=10;d/=10,a++);if((s=t-a)<0)s+=u,c=t,_=(f=m[p=0])/$[a-c-1]%10|0;else if((p=r((s+1)/u))>=m.length){if(!n)break e;for(;m.length<=p;m.push(0));f=_=0,a=1,c=(s%=u)-u+1}else{for(f=d=m[p],a=1;d>=10;d/=10,a++);_=(c=(s%=u)-u+a)<0?0:f/$[a-c-1]%10|0}if(n=n||t<0||null!=m[p+1]||(c<0?f:f%$[a-c-1]),n=i<4?(_||n)&&(0==i||i==(e.s<0?3:2)):_>5||5==_&&(4==i||n||6==i&&(s>0?c>0?f/$[a-c]:0:m[p-1])%10&1||i==(e.s<0?8:7)),t<1||!m[0])return m.length=0,n?(t-=e.e+1,m[0]=$[(u-t%u)%u],e.e=-t||0):m[0]=e.e=0,e;if(0==s?(m.length=p,d=1,p--):(m.length=p+1,d=$[u-s],m[p]=c>0?o(f/$[a-c]%$[c])*d:0),n)for(;;){if(0==p){for(s=1,c=m[0];c>=10;c/=10,s++);for(c=m[0]+=d,d=1;c>=10;c/=10,d++);s!=d&&(e.e++,m[0]==l&&(m[0]=1));break}if(m[p]+=d,m[p]!=l)break;m[p--]=0,d=1}for(s=m.length;0===m[--s];m.pop());}e.e>M?e.c=e.e=null:e.e<L&&(e.c=[e.e=0])}return e}function U(e){var t,i=e.e;return null===i?e.toString():(t=_(e.c),t=i<=E||i>=A?y(t,i):v(t,i,"0"),e.s<0?"-"+t:t)}return F.clone=e,F.ROUND_UP=0,F.ROUND_DOWN=1,F.ROUND_CEIL=2,F.ROUND_FLOOR=3,F.ROUND_HALF_UP=4,F.ROUND_HALF_DOWN=5,F.ROUND_HALF_EVEN=6,F.ROUND_HALF_CEIL=7,F.ROUND_HALF_FLOOR=8,F.EUCLID=9,F.config=F.set=function(e){var t,i;if(null!=e){if("object"!=typeof e)throw Error(a+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&($(i=e[t],0,f,t),T=i),e.hasOwnProperty(t="ROUNDING_MODE")&&($(i=e[t],0,8,t),P=i),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((i=e[t])&&i.pop?($(i[0],-f,0,t),$(i[1],0,f,t),E=i[0],A=i[1]):($(i,-f,f,t),E=-(A=i<0?-i:i))),e.hasOwnProperty(t="RANGE"))if((i=e[t])&&i.pop)$(i[0],-f,-1,t),$(i[1],1,f,t),L=i[0],M=i[1];else{if($(i,-f,f,t),!i)throw Error(a+t+" cannot be zero: "+i);L=-(M=i<0?-i:i)}if(e.hasOwnProperty(t="CRYPTO")){if((i=e[t])!==!!i)throw Error(a+t+" not true or false: "+i);if(i){if(!(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes)))throw I=!i,Error(a+"crypto unavailable");I=i}else I=i}if(e.hasOwnProperty(t="MODULO_MODE")&&($(i=e[t],0,9,t),O=i),e.hasOwnProperty(t="POW_PRECISION")&&($(i=e[t],0,f,t),D=i),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(i=e[t]))throw Error(a+t+" not an object: "+i);R=i}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(i=e[t])||/^.$|[+-.\s]|(.).*\1/.test(i))throw Error(a+t+" invalid: "+i);N=i}}return{DECIMAL_PLACES:T,ROUNDING_MODE:P,EXPONENTIAL_AT:[E,A],RANGE:[L,M],CRYPTO:I,MODULO_MODE:O,POW_PRECISION:D,FORMAT:R,ALPHABET:N}},F.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!F.DEBUG)return!0;var t,i,n=e.c,r=e.e,s=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===s||-1===s)&&r>=-f&&r<=f&&r===o(r)){if(0===n[0]){if(0===r&&1===n.length)return!0;break e}if((t=(r+1)%u)<1&&(t+=u),String(n[0]).length==t){for(t=0;t<n.length;t++)if((i=n[t])<0||i>=l||i!==o(i))break e;if(0!==i)return!0}}}else if(null===n&&null===r&&(null===s||1===s||-1===s))return!0;throw Error(a+"Invalid BigNumber: "+e)},F.maximum=F.max=function(){return z(arguments,w.lt)},F.minimum=F.min=function(){return z(arguments,w.gt)},F.random=function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return o(Math.random()*e)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var i,n,s,l,c,d=0,p=[],_=new F(C);if(null==e?e=T:$(e,0,f),l=r(e/u),I)if(crypto.getRandomValues){for(i=crypto.getRandomValues(new Uint32Array(l*=2));d<l;)(c=131072*i[d]+(i[d+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),i[d]=n[0],i[d+1]=n[1]):(p.push(c%1e14),d+=2);d=l/2}else{if(!crypto.randomBytes)throw I=!1,Error(a+"crypto unavailable");for(i=crypto.randomBytes(l*=7);d<l;)(c=281474976710656*(31&i[d])+1099511627776*i[d+1]+4294967296*i[d+2]+16777216*i[d+3]+(i[d+4]<<16)+(i[d+5]<<8)+i[d+6])>=9e15?crypto.randomBytes(7).copy(i,d):(p.push(c%1e14),d+=7);d=l/7}if(!I)for(;d<l;)(c=t())<9e15&&(p[d++]=c%1e14);for(l=p[--d],e%=u,l&&e&&(c=h[u-e],p[d]=o(l/c)*c);0===p[d];p.pop(),d--);if(d<0)p=[s=0];else{for(s=-1;0===p[0];p.splice(0,1),s-=u);for(d=1,c=p[0];c>=10;c/=10,d++);d<u&&(s-=u-d)}return _.e=s,_.c=p,_}}(),F.sum=function(){for(var e=1,t=arguments,i=new F(t[0]);e<t.length;)i=i.plus(t[e++]);return i},b=function(){var e="0123456789";function t(e,t,i,n){for(var r,o,a=[0],s=0,l=e.length;s<l;){for(o=a.length;o--;a[o]*=t);for(a[0]+=n.indexOf(e.charAt(s++)),r=0;r<a.length;r++)a[r]>i-1&&(null==a[r+1]&&(a[r+1]=0),a[r+1]+=a[r]/i|0,a[r]%=i)}return a.reverse()}return function(i,n,r,o,a){var s,l,u,c,h,d,f,p,m=i.indexOf("."),$=T,g=P;for(m>=0&&(c=D,D=0,i=i.replace(".",""),d=(p=new F(n)).pow(i.length-m),D=c,p.c=t(v(_(d.c),d.e,"0"),10,r,e),p.e=p.c.length),u=c=(f=t(i,n,r,a?(s=N,e):(s=e,N))).length;0==f[--c];f.pop());if(!f[0])return s.charAt(0);if(m<0?--u:(d.c=f,d.e=u,d.s=o,f=(d=x(d,p,$,g,r)).c,h=d.r,u=d.e),m=f[l=u+$+1],c=r/2,h=h||l<0||null!=f[l+1],h=g<4?(null!=m||h)&&(0==g||g==(d.s<0?3:2)):m>c||m==c&&(4==g||h||6==g&&1&f[l-1]||g==(d.s<0?8:7)),l<1||!f[0])i=h?v(s.charAt(1),-$,s.charAt(0)):s.charAt(0);else{if(f.length=l,h)for(--r;++f[--l]>r;)f[l]=0,l||(++u,f=[1].concat(f));for(c=f.length;!f[--c];);for(m=0,i="";m<=c;i+=s.charAt(f[m++]));i=v(i,u,s.charAt(0))}return i}}(),x=function(){function e(e,t,i){var n,r,o,a,s=0,l=e.length,u=t%d,c=t/d|0;for(e=e.slice();l--;)s=((r=u*(o=e[l]%d)+(n=c*o+(a=e[l]/d|0)*u)%d*d+s)/i|0)+(n/d|0)+c*a,e[l]=r%i;return s&&(e=[s].concat(e)),e}function t(e,t,i,n){var r,o;if(i!=n)o=i>n?1:-1;else for(r=o=0;r<i;r++)if(e[r]!=t[r]){o=e[r]>t[r]?1:-1;break}return o}function i(e,t,i,n){for(var r=0;i--;)e[i]-=r,r=e[i]<t[i]?1:0,e[i]=r*n+e[i]-t[i];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,r,a,s,c){var h,d,f,_,m,$,g,y,v,x,b,S,w,C,T,P,E,A=n.s==r.s?1:-1,L=n.c,M=r.c;if(!(L&&L[0]&&M&&M[0]))return new F(n.s&&r.s&&(L?!M||L[0]!=M[0]:M)?L&&0==L[0]||!M?0*A:A/0:NaN);for(v=(y=new F(A)).c=[],A=a+(d=n.e-r.e)+1,c||(c=l,d=p(n.e/u)-p(r.e/u),A=A/u|0),f=0;M[f]==(L[f]||0);f++);if(M[f]>(L[f]||0)&&d--,A<0)v.push(1),_=!0;else{for(C=L.length,P=M.length,f=0,A+=2,(m=o(c/(M[0]+1)))>1&&(M=e(M,m,c),L=e(L,m,c),P=M.length,C=L.length),w=P,b=(x=L.slice(0,P)).length;b<P;x[b++]=0);E=M.slice(),E=[0].concat(E),T=M[0],M[1]>=c/2&&T++;do{if(m=0,(h=t(M,x,P,b))<0){if(S=x[0],P!=b&&(S=S*c+(x[1]||0)),(m=o(S/T))>1)for(m>=c&&(m=c-1),g=($=e(M,m,c)).length,b=x.length;1==t($,x,g,b);)m--,i($,P<g?E:M,g,c),g=$.length,h=1;else 0==m&&(h=m=1),g=($=M.slice()).length;if(g<b&&($=[0].concat($)),i(x,$,b,c),b=x.length,-1==h)for(;t(M,x,P,b)<1;)m++,i(x,P<b?E:M,b,c),b=x.length}else 0===h&&(m++,x=[0]);v[f++]=m,x[0]?x[b++]=L[w]||0:(x=[L[w]],b=1)}while((w++<C||null!=x[0])&&A--);_=null!=x[0],v[0]||v.splice(0,1)}if(c==l){for(f=1,A=v[0];A>=10;A/=10,f++);k(y,a+(y.e=f+d*u-1)+1,s,_)}else y.e=d,y.r=+_;return y}}(),S=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,i=/^\.([^.]+)$/,n=/^-?(Infinity|NaN)$/,r=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,s,l,u){var c,h=l?s:s.replace(r,"");if(n.test(h))o.s=isNaN(h)?null:h<0?-1:1;else{if(!l&&(h=h.replace(e,(function(e,t,i){return c="x"==(i=i.toLowerCase())?16:"b"==i?2:8,u&&u!=c?e:t})),u&&(c=u,h=h.replace(t,"$1").replace(i,"0.$1")),s!=h))return new F(h,c);if(F.DEBUG)throw Error(a+"Not a"+(u?" base "+u:"")+" number: "+s);o.s=null}o.c=o.e=null}}(),w.absoluteValue=w.abs=function(){var e=new F(this);return e.s<0&&(e.s=1),e},w.comparedTo=function(e,t){return m(this,new F(e,t))},w.decimalPlaces=w.dp=function(e,t){var i,n,r,o=this;if(null!=e)return $(e,0,f),null==t?t=P:$(t,0,8),k(new F(o),e+o.e+1,t);if(!(i=o.c))return null;if(n=((r=i.length-1)-p(this.e/u))*u,r=i[r])for(;r%10==0;r/=10,n--);return n<0&&(n=0),n},w.dividedBy=w.div=function(e,t){return x(this,new F(e,t),T,P)},w.dividedToIntegerBy=w.idiv=function(e,t){return x(this,new F(e,t),0,1)},w.exponentiatedBy=w.pow=function(e,t){var i,n,s,l,c,h,d,f,p=this;if((e=new F(e)).c&&!e.isInteger())throw Error(a+"Exponent not an integer: "+U(e));if(null!=t&&(t=new F(t)),c=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return f=new F(Math.pow(+U(p),c?2-g(e):+U(e))),t?f.mod(t):f;if(h=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new F(NaN);(n=!h&&p.isInteger()&&t.isInteger())&&(p=p.mod(t))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||c&&p.c[1]>=24e7:p.c[0]<8e13||c&&p.c[0]<=9999975e7)))return l=p.s<0&&g(e)?-0:0,p.e>-1&&(l=1/l),new F(h?1/l:l);D&&(l=r(D/u+2))}for(c?(i=new F(.5),h&&(e.s=1),d=g(e)):d=(s=Math.abs(+U(e)))%2,f=new F(C);;){if(d){if(!(f=f.times(p)).c)break;l?f.c.length>l&&(f.c.length=l):n&&(f=f.mod(t))}if(s){if(0===(s=o(s/2)))break;d=s%2}else if(k(e=e.times(i),e.e+1,1),e.e>14)d=g(e);else{if(0===(s=+U(e)))break;d=s%2}p=p.times(p),l?p.c&&p.c.length>l&&(p.c.length=l):n&&(p=p.mod(t))}return n?f:(h&&(f=C.div(f)),t?f.mod(t):l?k(f,D,P,undefined):f)},w.integerValue=function(e){var t=new F(this);return null==e?e=P:$(e,0,8),k(t,t.e+1,e)},w.isEqualTo=w.eq=function(e,t){return 0===m(this,new F(e,t))},w.isFinite=function(){return!!this.c},w.isGreaterThan=w.gt=function(e,t){return m(this,new F(e,t))>0},w.isGreaterThanOrEqualTo=w.gte=function(e,t){return 1===(t=m(this,new F(e,t)))||0===t},w.isInteger=function(){return!!this.c&&p(this.e/u)>this.c.length-2},w.isLessThan=w.lt=function(e,t){return m(this,new F(e,t))<0},w.isLessThanOrEqualTo=w.lte=function(e,t){return-1===(t=m(this,new F(e,t)))||0===t},w.isNaN=function(){return!this.s},w.isNegative=function(){return this.s<0},w.isPositive=function(){return this.s>0},w.isZero=function(){return!!this.c&&0==this.c[0]},w.minus=function(e,t){var i,n,r,o,a=this,s=a.s;if(t=(e=new F(e,t)).s,!s||!t)return new F(NaN);if(s!=t)return e.s=-t,a.plus(e);var c=a.e/u,h=e.e/u,d=a.c,f=e.c;if(!c||!h){if(!d||!f)return d?(e.s=-t,e):new F(f?a:NaN);if(!d[0]||!f[0])return f[0]?(e.s=-t,e):new F(d[0]?a:3==P?-0:0)}if(c=p(c),h=p(h),d=d.slice(),s=c-h){for((o=s<0)?(s=-s,r=d):(h=c,r=f),r.reverse(),t=s;t--;r.push(0));r.reverse()}else for(n=(o=(s=d.length)<(t=f.length))?s:t,s=t=0;t<n;t++)if(d[t]!=f[t]){o=d[t]<f[t];break}if(o&&(r=d,d=f,f=r,e.s=-e.s),(t=(n=f.length)-(i=d.length))>0)for(;t--;d[i++]=0);for(t=l-1;n>s;){if(d[--n]<f[n]){for(i=n;i&&!d[--i];d[i]=t);--d[i],d[n]+=l}d[n]-=f[n]}for(;0==d[0];d.splice(0,1),--h);return d[0]?G(e,d,h):(e.s=3==P?-1:1,e.c=[e.e=0],e)},w.modulo=w.mod=function(e,t){var i,n,r=this;return e=new F(e,t),!r.c||!e.s||e.c&&!e.c[0]?new F(NaN):!e.c||r.c&&!r.c[0]?new F(r):(9==O?(n=e.s,e.s=1,i=x(r,e,0,3),e.s=n,i.s*=n):i=x(r,e,0,O),!(e=r.minus(i.times(e))).c[0]&&1==O&&(e.s=r.s),e)},w.multipliedBy=w.times=function(e,t){var i,n,r,o,a,s,c,h,f,_,m,$,g,y,v,x=this,b=x.c,S=(e=new F(e,t)).c;if(!(b&&S&&b[0]&&S[0]))return!x.s||!e.s||b&&!b[0]&&!S||S&&!S[0]&&!b?e.c=e.e=e.s=null:(e.s*=x.s,b&&S?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=p(x.e/u)+p(e.e/u),e.s*=x.s,(c=b.length)<(_=S.length)&&(g=b,b=S,S=g,r=c,c=_,_=r),r=c+_,g=[];r--;g.push(0));for(y=l,v=d,r=_;--r>=0;){for(i=0,m=S[r]%v,$=S[r]/v|0,o=r+(a=c);o>r;)i=((h=m*(h=b[--a]%v)+(s=$*h+(f=b[a]/v|0)*m)%v*v+g[o]+i)/y|0)+(s/v|0)+$*f,g[o--]=h%y;g[o]=i}return i?++n:g.splice(0,1),G(e,g,n)},w.negated=function(){var e=new F(this);return e.s=-e.s||null,e},w.plus=function(e,t){var i,n=this,r=n.s;if(t=(e=new F(e,t)).s,!r||!t)return new F(NaN);if(r!=t)return e.s=-t,n.minus(e);var o=n.e/u,a=e.e/u,s=n.c,c=e.c;if(!o||!a){if(!s||!c)return new F(r/0);if(!s[0]||!c[0])return c[0]?e:new F(s[0]?n:0*r)}if(o=p(o),a=p(a),s=s.slice(),r=o-a){for(r>0?(a=o,i=c):(r=-r,i=s),i.reverse();r--;i.push(0));i.reverse()}for((r=s.length)-(t=c.length)<0&&(i=c,c=s,s=i,t=r),r=0;t;)r=(s[--t]=s[t]+c[t]+r)/l|0,s[t]=l===s[t]?0:s[t]%l;return r&&(s=[r].concat(s),++a),G(e,s,a)},w.precision=w.sd=function(e,t){var i,n,r,o=this;if(null!=e&&e!==!!e)return $(e,1,f),null==t?t=P:$(t,0,8),k(new F(o),e,t);if(!(i=o.c))return null;if(n=(r=i.length-1)*u+1,r=i[r]){for(;r%10==0;r/=10,n--);for(r=i[0];r>=10;r/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},w.shiftedBy=function(e){return $(e,-c,c),this.times("1e"+e)},w.squareRoot=w.sqrt=function(){var e,t,i,n,r,o=this,a=o.c,s=o.s,l=o.e,u=T+4,c=new F("0.5");if(1!==s||!a||!a[0])return new F(!s||s<0&&(!a||a[0])?NaN:a?o:1/0);if(0==(s=Math.sqrt(+U(o)))||s==1/0?(((t=_(a)).length+l)%2==0&&(t+="0"),s=Math.sqrt(+t),l=p((l+1)/2)-(l<0||l%2),s==1/0?t="1e"+l:t=(t=s.toExponential()).slice(0,t.indexOf("e")+1)+l,i=new F(t)):i=new F(s+""),i.c[0])for((s=(l=i.e)+u)<3&&(s=0);;)if(r=i,i=c.times(r.plus(x(o,r,u,1))),_(r.c).slice(0,s)===(t=_(i.c)).slice(0,s)){if(i.e<l&&--s,"9999"!=(t=t.slice(s-3,s+1))&&(n||"4999"!=t)){(!+t||!+t.slice(1)&&"5"==t.charAt(0))&&(k(i,i.e+T+2,1),e=!i.times(i).eq(o));break}if(!n&&(k(r,r.e+T+2,0),r.times(r).eq(o))){i=r;break}u+=4,s+=4,n=1}return k(i,i.e+T+1,P,e)},w.toExponential=function(e,t){return null!=e&&($(e,0,f),e++),B(this,e,t,1)},w.toFixed=function(e,t){return null!=e&&($(e,0,f),e=e+this.e+1),B(this,e,t)},w.toFormat=function(e,t,i){var n,r=this;if(null==i)null!=e&&t&&"object"==typeof t?(i=t,t=null):e&&"object"==typeof e?(i=e,e=t=null):i=R;else if("object"!=typeof i)throw Error(a+"Argument not an object: "+i);if(n=r.toFixed(e,t),r.c){var o,s=n.split("."),l=+i.groupSize,u=+i.secondaryGroupSize,c=i.groupSeparator||"",h=s[0],d=s[1],f=r.s<0,p=f?h.slice(1):h,_=p.length;if(u&&(o=l,l=u,u=o,_-=o),l>0&&_>0){for(o=_%l||l,h=p.substr(0,o);o<_;o+=l)h+=c+p.substr(o,l);u>0&&(h+=c+p.slice(o)),f&&(h="-"+h)}n=d?h+(i.decimalSeparator||"")+((u=+i.fractionGroupSize)?d.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(i.fractionGroupSeparator||"")):d):h}return(i.prefix||"")+n+(i.suffix||"")},w.toFraction=function(e){var t,i,n,r,o,s,l,c,d,f,p,m,$=this,g=$.c;if(null!=e&&(!(l=new F(e)).isInteger()&&(l.c||1!==l.s)||l.lt(C)))throw Error(a+"Argument "+(l.isInteger()?"out of range: ":"not an integer: ")+U(l));if(!g)return new F($);for(t=new F(C),d=i=new F(C),n=c=new F(C),m=_(g),o=t.e=m.length-$.e-1,t.c[0]=h[(s=o%u)<0?u+s:s],e=!e||l.comparedTo(t)>0?o>0?t:d:l,s=M,M=1/0,l=new F(m),c.c[0]=0;f=x(l,t,0,1),1!=(r=i.plus(f.times(n))).comparedTo(e);)i=n,n=r,d=c.plus(f.times(r=d)),c=r,t=l.minus(f.times(r=t)),l=r;return r=x(e.minus(i),n,0,1),c=c.plus(r.times(d)),i=i.plus(r.times(n)),c.s=d.s=$.s,p=x(d,n,o*=2,P).minus($).abs().comparedTo(x(c,i,o,P).minus($).abs())<1?[d,n]:[c,i],M=s,p},w.toNumber=function(){return+U(this)},w.toPrecision=function(e,t){return null!=e&&$(e,1,f),B(this,e,t,2)},w.toString=function(e){var t,i=this,n=i.s,r=i.e;return null===r?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(null==e?t=r<=E||r>=A?y(_(i.c),r):v(_(i.c),r,"0"):10===e?t=v(_((i=k(new F(i),T+r+1,P)).c),i.e,"0"):($(e,2,N.length,"Base"),t=b(v(_(i.c),r,"0"),10,e,n,!0)),n<0&&i.c[0]&&(t="-"+t)),t},w.valueOf=w.toJSON=function(){return U(this)},w._isBigNumber=!0,n&&(w[Symbol.toStringTag]="BigNumber",w[Symbol.for("nodejs.util.inspect.custom")]=w.valueOf),null!=t&&F.set(t),F}(),t.default=t.BigNumber=t,"function"==typeof define&&define.amd?define((function(){return t})):typeof module<"u"&&module.exports?module.exports=t:(e||(e=typeof self<"u"&&self?self:window),e.BigNumber=t),t}(),S$8="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nuniform sampler2D u_accumulation;\nuniform sampler2D u_revealage;\nuniform sampler2D u_opaque;\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;\nvec4 transparent = vec4(accum.rgb / clamp(r, 1e-4, 5e4), accum.a);\ngl_FragColor = (1.0 - transparent.a) * transparent + transparent.a * opaque;\n}\n";function i$a(e){this._framebuffer=void 0,this._outputFramebuffer=void 0,this._accumulationTexture=void 0,this._revealageTexture=void 0,this._drawCommand=void 0,this._clearCommand=void 0,this._passType=we$l.OPAQUE,this._screenWidth=0,this._screenHeight=0,this._renderStateCache={},this.billboardQuality=.5,this.enable=!1}Object.defineProperties(i$a.prototype,{});var O$6={enabled:!0,color:new e$1z(0,0,0,0),equationRgb:x$16.ADD,equationAlpha:x$16.ADD,functionSourceRgb:h$13.ONE,functionDestinationRgb:h$13.ONE,functionSourceAlpha:h$13.ZERO,functionDestinationAlpha:h$13.ONE_MINUS_SOURCE_ALPHA},f$8=new n$13;function B$1(e,t){var i=e[t.id];if(!t$$(i)||i.viewport.width!=f$8.width||i.viewport.height!=f$8.height){var n=p$1a.getState(t);n.depthMask=!1,n.blending=O$6,n.viewport=f$8,i=p$1a.fromCache(n),e[t.id]=i}return i}function w$a(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy(),e._framebuffer=e._framebuffer&&!e._framebuffer.isDestroyed()&&e._framebuffer.destroy(),e._outputFramebuffer=e._outputFramebuffer&&!e._outputFramebuffer.isDestroyed()&&e._outputFramebuffer.destroy(),e._drawCommand=void 0,e._clearCommand=void 0}function R$2(e,t){var i=e._screenWidth,n=e._screenHeight,r=e._hdr?t.halfFloatingPointTexture?v$Z.HALF_FLOAT:v$Z.FLOAT:v$Z.UNSIGNED_BYTE;e._outputFramebuffer=new u$F({context:t,colorTextures:[new P$S({context:t,width:t.drawingBufferWidth,height:t.drawingBufferHeight,pixelFormat:Z$_.RGBA,pixelDatatype:r})],destroyAttachments:!0}),e._accumulationTexture=new P$S({context:t,width:i,height:n,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.FLOAT});var o=new Float32Array(i*n*4);e._revealageTexture=new P$S({context:t,pixelFormat:Z$_.RGBA,pixelDatatype:v$Z.FLOAT,source:{arrayBufferView:o,width:i,height:n},flipY:!1}),e._framebuffer=new u$F({context:t,colorTextures:[e._accumulationTexture,e._revealageTexture],destroyAttachments:!1})}function H$4(e,t){var i=new a$O({sources:[S$8]}),n={u_accumulation:function(){return e._accumulationTexture},u_revealage:function(){return e._revealageTexture},u_opaque:function(){return e._opaqueTexture}},r=p$1a.fromCache({});e._drawCommand=t.createViewportQuadCommand(i,{uniformMap:n,renderState:r,pass:e._passType,owner:e}),e._clearCommand=new r$M({framebuffer:e._framebuffer,color:new e$1z(0,0,0,1),depth:1,renderState:p$1a.fromCache(),pass:e._passType,owner:e})}function L$7(e,t){var i=e._screenWidth,n=e._screenHeight,r=e._accumulationTexture,o=!1,a=t$$(r)&&(r.width!==i||r.height!==n);return(!t$$(r)||a)&&(w$a(e),R$2(e,t),H$4(e,t),o=!0),o}function g$6(e){return e.drawBuffers&&e.fragmentDepth}function m$d(e){if(!t$$(e.provider))throw new t$_("options.provder and options.viewer is required.");this._provider=e.provider,this._inner=e.layer,this._imagelayerCollection=e.imagelayerCollection,this._name=e.name,this._billboardCollection=new O$t({ignoreShow:!0,scene:e.scene}),this._imageIconBillboard={},this._textBillboard={},this._imageCanvas={},this.kmlLayer=new D$t({camera:e.scene.camera,canvas:e.scene.canvas}),this.kmlLayer.clustering.enabled=!0,this.kmlLayer.clustering.pixelRange=10,t$$(e.viewer)&&e.viewer.dataSources.add(this.kmlLayer),this.kmlLayer.clustering.clusterEvent.addEventListener((function(e,t){if(e.length>0&&e[0].billboard){var i=e[0].billboard;t.billboard.position=e[0].position.getValue(0),t.billboard.image=i.image.getValue(),t.billboard.scale=i.scale.getValue(),t.billboard.heightReference=i.heightReference.getValue(),t.billboard.scaleByDistance=i.scaleByDistance.getValue(),t.billboard.pixelOffset=i.pixelOffset.getValue()}if(e.length>0&&e[0].label){var n=e[0].label;t.label.position=e[0].position.getValue(0),t.label.text=n.text.getValue(),t.label.font=n.font.getValue(),t.label.verticalOrigin=n.verticalOrigin.getValue(),t.label.horizontalOrigin=n.horizontalOrigin.getValue(),t.label.heightReference=n.heightReference.getValue(),t.label.pixelOffset=n.pixelOffset.getValue(),t.label.scaleByDistance=n.scaleByDistance.getValue(),t$$(n.style)&&(t.label.style=n.style.getValue()),t.label.fillColor=n.fillColor.getValue()}}))}function F$4(e,t){return t.level-e.level}i$a.isSupported=g$6,i$a.prototype.getOutputFramebuffer=function(){return this._outputFramebuffer},i$a.prototype.update=function(e,t,i){if(g$6(e.context)&&this.enable){var n=e.context;this._screenWidth=Math.floor(n.drawingBufferWidth*this.billboardQuality),this._screenHeight=Math.floor(n.drawingBufferHeight*this.billboardQuality),f$8.width=this._screenWidth,f$8.height=this._screenHeight,this._opaqueTexture=t.getColorTexture(0),this._hdr=i,L$7(this,n)}},i$a.prototype.execute=function(e,t){!t$$(this._drawCommand)||!this.enable||this._drawCommand.execute(e,t)},i$a.prototype.clear=function(e,t){!t$$(this._clearCommand)||!this.enable||this._clearCommand.execute(e,t)},i$a.prototype.createDerivedCommands=function(e){!t$$(e)||(this.enable=!0,e.framebuffer=this._framebuffer,e.renderState=B$1(this._renderStateCache,e.renderState))},i$a.prototype.isDestroyed=function(){return!1},i$a.prototype.destroy=function(){return w$a(this),s$1e(this)},Object.defineProperties(m$d.prototype,{tileWidth:{get:function(){return this._provider._tileWidth}},tileHeight:{get:function(){return this._provider._tileHeight}},maximumLevel:{get:function(){return this._provider._ready?this._provider._maximumLevel:-1}},minimumLevel:{get:function(){return this._provider._ready?this._provider._minimumLevel:-1}},tilingScheme:{get:function(){return this._provider._tilingScheme}},rectangle:{get:function(){return this._provider._ready?this._provider._rectangle:null}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._provider._errorEvent}},ready:{get:function(){return this._provider._ready}},readyPromise:{get:function(){return this._provider.readyPromise}},hasAlphaChannel:{get:function(){return!0}},show:{get:function(){return this._inner.show},set:function(e){this._inner.show=e}},mapboxStyle:{get:function(){return this._provider.mapboxStyle},set:function(e){this._provider.mapboxStyle=e}},alpha:{get:function(){return this._inner.alpha},set:function(e){this._inner.alpha=e}},selectColor:{get:function(){return this._inner._selectColor},set:function(e){this._inner._selectColor=e}},name:{get:function(){return this._name},set:function(e){this._name=e}},pausing:{get:function(){return this._inner._pausing},set:function(e){this._inner._pausing=e,this._provider._pausing=e}},indexedDBSetting:{get:function(){return this._provider._indexedDBSetting},set:function(e){t$$(e)&&"boolean"==typeof e.isOpen&&(this._provider._indexedDBSetting.isOpen=e.isOpen)}}});var b$7=new r$T,w$9=new a$11,u$9=new u$W;function D$6(e){return Array.isArray(e)?"rgb("+e[0]+","+e[1]+","+e[2]+")":""}function x$6(e,t,i,n){var r=t.getGeometry().getFlatCoordinates(),o=r[0],a=r[1],s=i[0]*o+i[2]*a+i[4],l=i[1]*o+i[3]*a+i[5],u=s/e._canvasWidth,c=l/e._canvasWidth,h=n.west+n.width*u,d=n.south+n.height*(1-c);return a$11.fromRadians(h,d,0,n$1c.WGS84,w$9),w$9}function z$4(e){var t=e.getId();return t-=16777216*Math.floor(t/16777216)}m$d.prototype.createIconImageBillboard=function(e){if(t$$(e.iconImageObjects))for(var t=e.rectangle,i=e.transform,n=0,r=e.iconImageObjects.length;n<r;n++){var o=e.iconImageObjects[n],a=o.feature,s=a.index;if(t$$(this._imageIconBillboard[s])){var l=this._imageIconBillboard[s];e.level>l.level&&(l.position=x$6(this._provider,a,i,t),l.level=e.level)}else{var u,c=o.style.layout;if(t$$(c)&&t$$(c["icon-image"])){var h=c["icon-image"],d=e$1Y(c["icon-size"],1);if(t$$(this._imageCanvas[h]))u=this._imageCanvas[h];else{var f=this._provider._subSpriteImage[h];if(!t$$(f))continue;(u=document.createElement("canvas")).width=f.width,u.height=f.height,u.getContext("2d").putImageData(f,0,0),this._imageCanvas[h]=u}}b$7.x=0,b$7.y=-u.height/2,u$9.near=1500,u$9.nearValue=1.5,u$9.far=8e6,u$9.farValue=0;var p=this._billboardCollection.add({image:u,scale:d,disableDepthTestDistance:Number.POSITIVE_INFINITY,heightReference:U$Y.CLAMP_TO_GROUND,pixelOffset:b$7,scaleByDistance:u$9,id:z$4(a)});p.position=x$6(this._provider,a,i,t),p.level=e.level,this._imageIconBillboard[s]=p}}},m$d.prototype.createTextBillboard=function(e){if(t$$(e.textObjects))for(var t=e.rectangle,i=e.transform,n=0;n<e.textObjects.length;n++){var r=e.textObjects[n],o=r.feature,a=o.index;if(t$$(this._textBillboard[a])){var s=this._textBillboard[a];e.level>s.level&&(s.position=x$6(this._provider,o,i,t),s.level=e.level)}else{var l=r.style,u=l.getText(),c=l.textSize,h=u.getText(),d=u.getFont(d),f=u.getTextAlign(),p=document.createElement("canvas"),_=p.getContext("2d"),m=c+"px "+d;_.font=m,_.textBaseline="top",_.textAlign=f;var $=_.measureText(h).width+2;p.width=$,p.height=c+1,_.font=m;var g=u.getFill(),y=u.getStroke();t$$(y)&&(_.strokeStyle=D$6(y.getColor()),_.lineWidth=y.getWidth(),_.strokeText(h,0,c-3)),t$$(g)&&(_.fillStyle=D$6(g.getColor()),_.fillText(h,0,c-3)),b$7.x=0,b$7.y=-p.height/2,u$9.near=1500,u$9.nearValue=2,u$9.far=1e6,u$9.farValue=0;var v=this._billboardCollection.add({image:p,imageId:h,disableDepthTestDistance:Number.POSITIVE_INFINITY,heightReference:U$Y.CLAMP_TO_GROUND,pixelOffset:b$7,scaleByDistance:u$9,verticalOrigin:j$10.TOP,horizontalOrigin:N$W.LEFT});v.position=x$6(this._provider,o,i,t),v.level=e.level,this._textBillboard[a]=v}}},m$d.prototype.update=function(e,t){if(t$$(this._billboardCollection)){var i=this._inner._imageryCache,n=[];for(var r in i)n.push(i[r]);n.sort(F$4);for(var o=0;o<n.length;o++){var a=n[o];!a.isMvtTexture||a.isRendered||(a.isRendered=!0)}this._billboardCollection.update(t)}},m$d.prototype.getProperty=function(e){return this._provider.getProperty(e)},m$d.prototype.refresh=function(){t$$(this._billboardCollection)&&this._billboardCollection.removeAll();var e=this._inner._imageryCache;for(var t in e)e[t].isRendered=!1;this._imageIconBillboard={},this._textBillboard={},this._imagelayerCollection.remove(this._inner),this._inner=this._imagelayerCollection.addImageryProvider(this._provider)},m$d.prototype.isDestroyed=function(){return!1},m$d.prototype.destroy=function(){return this._imagelayerCollection.remove(this._inner),t$$(this._billboardCollection)&&(this._billboardCollection.destroy(),this._billboardCollection=null),s$1e(this)};var e$6={NONE:0,ByKeyboard:1},si=Object.freeze(e$6);function s$9(e){if(!t$$(e))throw new t$_("scene are required.");this._scene=e,this._context=e._context,this._s3mInstanceCollection=new _0x1bf60e(e._context),this._s3mInstanceCollection._profile=!0,this._s3mInstanceCollection.minVisibleAltitude=-9e3,e.primitives.add(this._s3mInstanceCollection),this._textureAtlas=null,this._profileRenders=[],this._spatialQueryList=[],this._section=!0,this._name="solidModelsProfile"+this._scene._analyst3D._layerIndex,this._scene._analyst3D.add(this),this._modelInfo={},this._dataIndex=0,this._selectedProfileIDs=[],this._clippingType=L$o.KeepInside,this._visibleViewport=4095;var t=this,i=0;this._modelCount=0,this._modelPosition=[],this._addedEvent=new o$15,this._s3mInstanceCollection.addedEvent.addEventListener((function(){++i===t._modelCount&&t._addedEvent.raiseEvent({modelPosition:t._modelPosition})})),this._volume=void 0}function F$3(e,t){var i=t._group;for(var n in e)if(e.hasOwnProperty(n)){var r=e[n],o=i[n];if(!t$$(o)||0===o.renderEntities.length)continue;var a=o.renderEntities[0];r.texture=a._texture}}function J$3(e){this.pickColor=new a$11,this.id=e$1Y(e.id,0),t$$(e.color)?this.color=e$1z.clone(e.color):this.color=e$1z.fromRandom({alpha:1}),this.textureAtlasID=-1,t$$(e.textureMapParameter)?(this.textureTilingU=e$1Y(e.textureMapParameter.UTiling,1),this.textureTilingV=e$1Y(e.textureMapParameter.VTiling,1)):(this.textureTilingU=1,this.textureTilingV=1)}function Q$2(e){return e===L$o.KeepOutside?k$p.Disjoint:k$p.Intersects}Object.defineProperties(s$9.prototype,{selectedModelIDs:{get:function(){return this._selectedProfileIDs}},clippingType:{get:function(){return this._clippingType},set:function(e){if(e!==this._clippingType){this._clippingType=e;for(var t=0;t<this._spatialQueryList.length;t++)this._spatialQueryList[t].positionMode=Q$2(this._clippingType);for(t=0;t<this._profileRenders.length;t++)this._profileRenders[t]._clippingType=e}}},addedEvent:{get:function(){return this._addedEvent}},volume:{get:function(){return this._volume},set:function(e){this._volume=e,this._s3mInstanceCollection._volume=e}},mixColorType:{get:function(){return this._s3mInstanceCollection._mixColorType},set:function(e){this._s3mInstanceCollection._mixColorType!==e&&(this._s3mInstanceCollection._mixColorType=e)}}}),s$9.prototype.addProfileGeometry=function(e){if(t$$(e)){var t=e;Array.isArray(e)&&(t=new h$7(e),t$$(this._volume)&&(t._volBounds=this._volume._volBounds));var i=new f$a(this,this._profileRenders.length,this._modelInfo,t);i._clippingType=this._clippingType,t$$(this._volume)&&(i._attributeLocations.aRatio=3,i._volume=this._volume),this._profileRenders.push(i)}},s$9.prototype.clearProfile=function(){this._profileRenders.map((function(e){e.destroy()})),this._profileRenders=[],this._s3mInstanceCollection._profile=!1,this._s3mInstanceCollection._spatialQueryEnable=!1,this._s3mInstanceCollection.clampToObject=!1},s$9.prototype.addProfilePlane=function(e){},s$9.prototype.addProfileCylinder=function(e){},s$9.prototype.setClipGeometry=function(e){if(e.geoType!==b$K.GEOREGION3D&&e.geoType!==b$K.GEOCYLINDER&&e.geoType!==b$K.GEOBOX&&e.geoType!==b$K.GEOMODEL3D&&!(e instanceof N$Q))return!1;var t=new C$k(this._scene);t.geometry=e,t.positionMode=Q$2(this._clippingType),this._s3mInstanceCollection._profileMode=1,t._beQueryCollection=this._s3mInstanceCollection,this._s3mInstanceCollection._spatialQueryEnable=!0,t._profile=!0,this._spatialQueryList.push(t)},s$9.prototype.addModels=function(e){var t=this;e.map((function(e){var i=new J$3(e),n={id:i.id,primitive:t};i.profilePickId=t._context.createPickId(n),t._modelInfo[e.model]=i,t.requestImage(e.model,e.texture),t.requestModel(e.model,e.color,e.id),t._modelCount++}))},s$9.prototype.requestImage=function(e,t){if(t$$(t)){var i=this;t$$(this._textureAtlas)||(this._textureAtlas=new _$z({context:this._scene._context})),this._textureAtlas.addImage(t,t).then((function(t){i._modelInfo[e].textureAtlasID=t}))}},s$9.prototype.requestModel=function(e,t,i){var n=e$1Y(i,(o=this)._dataIndex);if(t$$(e)){var r=e.replace(/\?returnContent=.*$/,"");if(".json"===(r=r.substring(r.length-5).toLowerCase()))if(e.indexOf("spatialAnalysis-")>-1){var o=this;v$_({url:e,responseType:"arraybuffer",method:"POST",data:JSON.stringify({sourceDatasetFilter:{attributeFilter:""},isLonlat:!0,returnStream:!0}),headers:{"Content-type":"application/x-www-form-urlencoded; charset=UTF-8"}}).then((function(i){var r=new DataView(i),a=0,s=r.getInt32(a,!0);a+=4;var l=c$X(new Uint8Array(i,a,s)),u=JSON.parse(l);a+=s;var c=r.getInt32(a,!0);a+=4;var h,d,f=[];for(h=0;h<c;h++)d=r.getInt32(a,!0),f.push(d),a+=4;var p=[];for(h=0;h<c;h++){if(0===(d=f[h]))p.push(null);else{var _=new Uint8Array(i,a,d);p.push(new Uint8Array(_).buffer)}a+=d}var m=u.geometries[0],$={};$.id=n,$.position=m.position,o._modelPosition.push($),o._s3mInstanceCollection.add(e,{position:a$11.fromDegrees(m.position.x,m.position.y,m.position.z),color:t,id:n,scale:new a$11(m.scaleX,m.scaleY,m.scaleZ)},p[0],!1);var g=o._s3mInstanceCollection.getInstance(e,n),y=o._modelInfo[e].pickColor;y.x=g._pickColor.x,y.y=g._pickColor.y,y.z=g._pickColor.z,o._dataIndex++}))}else u$$(e).then((function(i){if(null!=i.geometry){var r=new Uint8Array(i.geometry.model),a={};a.id=n,a.position=i.geometry.position,o._modelPosition.push(a),o._s3mInstanceCollection.add(e,{position:a$11.fromDegrees(i.geometry.position.x,i.geometry.position.y,i.geometry.position.z),color:t,id:n,scale:new a$11(i.geometry.scaleX,i.geometry.scaleY,i.geometry.scaleZ),hpr:e$1L.fromDegrees(-i.geometry.rotationZ,i.geometry.rotationX,i.geometry.rotationY)},r.buffer);var s=o._s3mInstanceCollection.getInstance(e,n),l=o._modelInfo[e].pickColor;l.x=s._pickColor.x,l.y=s._pickColor.y,l.z=s._pickColor.z,o._dataIndex++}}));else u$S(e).then((function(i){var r=new DataView(i),a=0,s=r.getInt32(a,!0);a+=4;var l=c$X(new Uint8Array(i,a,s)),u=JSON.parse(l).geometry;if(null!=u){var c={};c.id=n,c.position=u.position,o._modelPosition.push(c),a+=s;var h=r.getInt32(a,!0);a+=4;var d,f,p=[];for(d=0;d<h;d++)f=r.getInt32(a,!0),p.push(f),a+=4;var _=[];for(d=0;d<h;d++){if(0===(f=p[d]))_.push(null);else{var m=new Uint8Array(i,a,f);_.push(new Uint8Array(m).buffer)}a+=f}o._s3mInstanceCollection.add(e,{position:a$11.fromDegrees(u.position.x,u.position.y,u.position.z),color:t,id:n,scale:new a$11(u.scaleX,u.scaleY,u.scaleZ),hpr:e$1L.fromDegrees(-u.rotationZ,u.rotationX,u.rotationY)},_[0],!1);var $=o._s3mInstanceCollection.getInstance(e,n);o._modelInfo[e].color=$._color;var g=o._modelInfo[e].pickColor;g.x=$._pickColor.x,g.y=$._pickColor.y,g.z=$._pickColor.z,o._dataIndex++}}))}},s$9.prototype.build=function(){this._s3mInstanceCollection._profile=!0,this._s3mInstanceCollection.clampToObject=!0},s$9.prototype.setSelected=function(e){this._selectedProfileIDs=[],this._selectedProfileIDs.push(e)},s$9.prototype.releaseSelection=function(){this._selectedProfileIDs=[]},s$9.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$_("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},s$9.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$_("the index is 0~8");return 1<<e&this._visibleViewport},s$9.prototype.clear=function(){for(var e in t$$(this._textureAtlas)&&(this._textureAtlas.destroy(),this._textureAtlas=null),this._profileRenders.map((function(e){e.destroy()})),this._profileRenders=[],this._s3mInstanceCollection._spatialQueryEnable=!1,this._spatialQueryList.map((function(e){e.destroy()})),this._spatialQueryList=[],this._modelInfo)this._s3mInstanceCollection.removeCollection(e);this._s3mInstanceCollection.clampToObject=!1,this._modelInfo={},this._dataIndex=0},s$9.prototype.destroy=function(){return this.clear(),this._scene._analyst3D.remove(this._name,!0),this._scene.primitives.remove(this._s3mInstanceCollection),this._s3mInstanceCollection.destroy(),s$1e(this)},s$9.prototype.update=function(e,t,i){this._spatialQueryList.map((function(n){n.update(e,t,i)}));var n=this._s3mInstanceCollection.clampToObject;F$3(this._modelInfo,this._s3mInstanceCollection),this._profileRenders.map((function(r){r.update(e,t,i,n)}))},s$9.prototype._updateTextures=function(e,t){this._spatialQueryList.map((function(i){i._updateTextures(e,t)}))};var M$6=81;function y$a(){this.powers=new Array(M$6)}var g$5=[[.0014,0,.0065],[.0022,1e-4,.0105],[.0042,1e-4,.0201],[.0076,2e-4,.0362],[.0143,4e-4,.0679],[.0232,6e-4,.1102],[.0435,.0012,.2074],[.0776,.0022,.3713],[.1344,.004,.6456],[.2148,.0073,1.0391],[.2839,.0116,1.3856],[.3285,.0168,1.623],[.3483,.023,1.7471],[.3481,.0298,1.7826],[.3362,.038,1.7721],[.3187,.048,1.7441],[.2908,.06,1.6692],[.2511,.0739,1.5281],[.1954,.091,1.2876],[.1421,.1126,1.0419],[.0956,.139,.813],[.058,.1693,.6162],[.032,.208,.4652],[.0147,.2586,.3533],[.0049,.323,.272],[.0024,.4073,.2123],[.0093,.503,.1582],[.0291,.6082,.1117],[.0633,.71,.0782],[.1096,.7932,.0573],[.1655,.862,.0422],[.2257,.9149,.0298],[.2904,.954,.0203],[.3597,.9803,.0134],[.4334,.995,.0087],[.5121,1,.0057],[.5945,.995,.0039],[.6784,.9786,.0027],[.7621,.952,.0021],[.8425,.9154,.0018],[.9163,.87,.0017],[.9786,.8163,.0014],[1.0263,.757,.0011],[1.0567,.6949,.001],[1.0622,.631,8e-4],[1.0456,.5668,6e-4],[1.0026,.503,3e-4],[.9384,.4412,2e-4],[.8544,.381,2e-4],[.7514,.321,1e-4],[.6424,.265,0],[.5419,.217,0],[.4479,.175,0],[.3608,.1382,0],[.2835,.107,0],[.2187,.0816,0],[.1649,.061,0],[.1212,.0446,0],[.0874,.032,0],[.0636,.0232,0],[.0468,.017,0],[.0329,.0119,0],[.0227,.0082,0],[.0158,.0057,0],[.0114,.0041,0],[.0081,.0029,0],[.0058,.0021,0],[.0041,.0015,0],[.0029,.001,0],[.002,7e-4,0],[.0014,5e-4,0],[.001,4e-4,0],[7e-4,2e-4,0],[5e-4,2e-4,0],[3e-4,1e-4,0],[2e-4,1e-4,0],[2e-4,1e-4,0],[1e-4,0,0],[1e-4,0,0],[1e-4,0,0],[0,0,0]];y$a.prototype.toXYZ=function(){for(var e=new a$11(0,0,0),t=1;t<M$6;t++){var i=t+0;i>M$6-1&&(i=M$6-1),i<1&&(i=1),e.x+=this.powers[i]*g$5[t][0],e.y+=this.powers[i]*g$5[t][1],e.z+=this.powers[i]*g$5[t][2]}return e};var t0=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,.003,.004,.006,.007,.009,.011,.014,.017,.021,.025,.03,.035,.04,.044,.048,.055,.063,.071,.075,.08,.085,.091,.12,.12,.12,.12,.12,.12,.12,.119,.12,.12,.12,.1,.09,.09,.085,.08,.075,.07,.07,.065,.06,.055,.05,.045,.04,.035,.028,.25,.023,.02,.018,.016,.012,.012,.012,.012,.01,.01,.01,.008,.007,.006,.005,.003,0],n$9=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.15,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0],m$c=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.075,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.016,.015,.014,.013,.0125,1.8,2.3,2.5,2.3,1.8,.061,.003,8e-4,1e-4,1e-5,1e-5,1e-4,3e-4,6e-4];y$a.prototype.applyAtmosphericTransmittance=function(e,t,i,n,r,o){var a=.04608*i-.04586,s=n$1d.toDegrees(e);if(s<90){var l=1;l=1/(t+.50572*Math.pow(96.07995-s,-1.6364));l*=1;l*=Math.exp(-n/8435);for(var u=1.003454/Math.sqrt(t*t+.006908),c=Math.log(.35),h=c*(1.459+c*(.1595+.4129*c)),d=c*(.0783+c*(-.3824-.5874*c)),f=1-.5*Math.exp((h+d/1.8)/1.8),p=1-.5*Math.exp((h+d*t)*t),_=0;_<M$6;_++){var m,$=.38+.005*_,g=Math.exp(-l/(Math.pow($,4)*(115.6406-1.3366/($*$))));m=$<.5?1.0274:1.206;var y=a*Math.pow(2*$,-m),v=Math.exp(-y*l),x=2.5*m$c[_]*l,b=Math.exp(-.2385*x/Math.pow(1+20.07*x,.45)),S=Math.exp(.35*-t0[_]*u),w=Math.exp(-1.41*n$9[_]*l/Math.pow(1+118.3*n$9[_]*l,.45)),C=Math.log($/.4),T=.945*Math.exp(-.095*C*C),P=Math.exp(-T*y*l),E=Math.exp((T-1)*y*l),A=Math.exp(-1.8/($*$*$*$)*(115.6406-1.3366/($*$))),L=Math.exp(-.4293*m$c[_]*2.5/Math.pow(1+36.126*m$c[_]*2.5,.45)),M=Math.exp(-2.538*n$9[_]/Math.pow(1+212.94*n$9[_],.45)),I=Math.exp(-T*y*1.8),O=Math.exp((T-1)*y*1.8),D=g*v*b*S*w;r.powers[_]=this.powers[_]*D;var R=this.powers[_]*S*b*w*t*E,N=1;$<=.45&&(N=Math.pow($+.55,1.8));var F=L*M*O*(.5*(1-A)+(1-f)*A*(1-I)),B=R*(1-Math.pow(g,.95))/2,z=R*Math.pow(g,1.5)*(1-P)*p,G=.3*(r.powers[_]*t+B+z)*F/(1-.3*F);o.powers[_]=(B+z+G)*N,o.powers[_]<0&&(o.powers[_]=0)}}else for(_=0;_<M$6;_++)r.powers[_]=0,o.powers[_]=0};var e$5=[[.3,.305,.31,.315,.32,.325,.33,.335,.34,.345,.35,.36,.37,.38,.39,.4,.41,.42,.43,.44,.45,.46,.47,.48,.49,.5,.51,.52,.53,.54,.55,.57,.593,.61,.63,.656,.6676,.69,.71,.718,.7244,.74,.7525,.7575,.7625,.7675,.78,.8,.816,.8237,.8315,.84,.86,.88,.905,.915,.925,.93,.937,.948,.965,.98,.9935,1.04,1.07,1.1,1.12,1.13,1.145,1.161,1.17,1.2,1.24,1.27,1.29,1.32,1.35,1.395,1.4425,1.4625,1.477,1.497,1.52,1.539,1.558,1.578,1.592,1.61,1.63,1.646,1.678,1.74,1.8,1.86,1.92,1.96,1.985,2.005,2.035,2.065,2.1,2.148,2.198,2.27,2.36,2.45,2.5,2.6,2.7,2.8,2.9,3,3.1,3.2,3.3,3.4,3.5,3.6,3.7,3.8,3.9,4],[535.9,558.3,622,692.7,715.1,832.9,961.9,931.9,900.6,911.3,975.5,975.9,1119.9,1103.8,1033.8,1479.1,1701.3,1740.4,1587.2,1837,2005,2043,1987,2027,1896,1909,1927,1831,1891,1898,1892,1840,1768,1728,1658,1524,1531,1420,1399,1374,1373,1298,1269,1245,1223,1205,1183,1148,1091,1062,1038,1022,998.7,947.2,893.2,868.2,829.7,830.3,814,786.9,768.3,767,757.6,688.1,640.7,606.2,585.9,570.2,564.1,544.2,533.4,501.6,477.5,442.7,440,416.8,391.4,358.9,327.5,317.5,307.3,300.4,292.8,275.5,272.1,259.3,246.9,244,243.5,234.8,220.5,190.8,171.1,144.5,135.7,123,123.8,113,108.5,97.5,92.4,82.4,74.6,68.3,63.8,49.5,48.5,38.6,36.6,32,28.1,24.8,22.1,19.6,17.5,15.7,14.1,12.7,11.5,10.4,9.5,8.6]],i$9=81,a$7=5;function p$8(){y$a.call(this);for(var e=e$5[1].length,t=1,i=.38,n=0;n<i$9;n++){for(var r=i+.001*a$7;t<e-1&&e$5[0][t]<=r;)t++;this.powers[n]=e$5[1][t],i+=.001*a$7}}function a$6(){}function s$8(e){var t,i=Math.log(e);return t=i<=-3.94?-2.86:i>=-1.44?i-.395:Math.pow(.405*i+1.6,2.18)-2.86,Math.exp(t)}function l$5(e){var t,i=Math.log(e);return t=i<=-2.6?-.72:i>=1.9?i-1.255:Math.pow(.249*i+.65,2.7)-.72,Math.exp(t)}p$8.prototype=Object.create(y$a.prototype),p$8.prototype.constructor=y$a,a$6.Ldmax=100,a$6.LsavgC=100,a$6.LsavgR=100,a$6.k=1,a$6.mR=1,a$6.mC=1,a$6.disableToneMapping=!1,a$6.setSceneLogAvg=function(e,t){e<0&&(e=0),t<0&&(t=0),a$6.LsavgR=e/.8,a$6.LsavgC=t/.8,a$6.computeScaleFactors()},a$6.durandMapperXYZ=function(e){var t=a$6.k,i=a$6.mR,n=a$6.Ldmax,r=a$6.mC,o=-.702*e.x+1.039*e.y+.433*e.z;o<0&&(o=0);var a=new a$11(.3*o,.3*o,.4*o),s=a$11.multiplyByScalar(e,(1-t)*r,new a$11),l=a$11.multiplyByScalar(a,t*i,new a$11),u=a$11.add(s,l,new a$11);e=a$11.multiplyByScalar(u,1/n,e)},a$6.computeScaleFactors=function(){var e,t,i;a$6.Ldmax=100,e=a$6.Ldmax,t=a$6.LsavgR,i=a$6.LsavgC;var n=l$5(e);a$6.mR=n/s$8(t),a$6.mC=n/l$5(i);a$6.k=(100-.25*t)/(100+t),a$6.k<0&&(a$6.k=0)};var P$5=new r$W(2.37067,-.90004,-.470634,-.513885,1.4253,.0885814,.00529818,-.0146949,1.0094);function _$6(){this._oneOverGammaHosek=1/2.4,this._T=3,this._lastSunT=0,this._lastSunZenith=0,this._lastMoonT=0,this._lastMoonZenith=0,this._lastMoonPhase=0,this._ephemeris=void 0,this._perezBlend=0,this._isothermalEffect=0,this._sunAboveHorizon=!1,this._sunSpectrum=new p$8,this._sunTransmittedLuminance=void 0,this._sunScatteredLuminance=void 0,this._sunTransmittedLuminanceSeaLevel=void 0,this._sunScatteredLuminanceSeaLevel=void 0,this._lunarSpectrum=new p$8,this._moonTransmittedLuminance=void 0,this._moonScatteredLuminance=void 0,this._moonTransmittedLuminanceSeaLevel=void 0,this._moonScatteredLuminanceSeaLevel=void 0,this._maxSkylightLuminance=1,this._monochromeAmbient=!0,this._lightPollution=0,this._nightSkyScale=1,this._skyLight=new e$1z,this._twilightLuminance=[],D$5(this),this._lightingChanged=!1}function D$5(e){e._twilightLuminance={},e._twilightLuminance[5]=2200,e._twilightLuminance[4]=1800,e._twilightLuminance[3]=1400,e._twilightLuminance[2]=1200,e._twilightLuminance[1]=710,e._twilightLuminance[0]=400,e._twilightLuminance[-1]=190,e._twilightLuminance[-2]=77,e._twilightLuminance[-3]=28,e._twilightLuminance[-4]=9.4,e._twilightLuminance[-5]=2.9,e._twilightLuminance[-6]=.9,e._twilightLuminance[-7]=.3,e._twilightLuminance[-8]=.11,e._twilightLuminance[-9]=.047,e._twilightLuminance[-10]=.021,e._twilightLuminance[-11]=.0092,e._twilightLuminance[-12]=.0031,e._twilightLuminance[-13]=.0022,e._twilightLuminance[-14]=.0019,e._twilightLuminance[-15]=.0018,e._twilightLuminance[-16]=.0018;for(var t in e._twilightLuminance){var i=e._twilightLuminance[t];e._twilightLuminance[t]=i/Math.PI*.1}}var p$7=new a$11;_$6.prototype.getToneMappedSkyLight=function(){return this._skyLight};var O$5=new a$11;function n$8(){this.year=0,this.month=0,this.day=0,this.hours=0,this.minutes=0,this.seconds=0,this.observingDST=!0,this.zoneCorrection=8}function i$8(){this._latitude=0,this._longitude=0,this._altitude=0}function a$5(){this._time=void 0,this._lastTime=new n$8,this._lastLocation=new i$8,this._T=0,this._tuncorr=0,this._epochDays=0,this._sunEclipticLongitude=0,this._sunEcl=new a$11,this._moonEcl=new a$11,this._sunEq=new a$11,this._moonEq=new a$11,this._eclipticToEquatorial=new r$W,this._equatorialToGeographic=new r$W,this._sunGeo=new a$11,this._moonGeo=new a$11,this._sunHoriz=new a$11,this._moonHoriz=new a$11,this._eclipticToHorizon=new r$W,this._equatorialToHorizon=new r$W,this._geographicToEquatorial=new r$W,this._horizonToEquatorial=new r$W,this._horizonToGeographic=new r$W,this._geographicToHorizon=new r$W,this._horizonToEcliptic=new r$W,this._moonPhase=void 0,this._moonPhaseAngle=void 0,this._moonDistance=void 0,this._precession=new r$W,this._forceSunHoriz=!1,this._forceMoonHoriz=!1,this._geoZUp=!0,this._primeMeridianZ=!1}function E$7(e,t,i){var n=new a$11;return n.x=e*Math.cos(i)*Math.cos(t),n.y=e*Math.sin(i)*Math.cos(t),n.z=e*Math.sin(t),n}function T$6(e){for(;e>2*Math.PI;)e-=2*Math.PI;for(;e<0;)e+=2*Math.PI;return e}function f$7(e){var t=new a$11;return t.x=e.y,t.y=e.z,t.z=e.x,t}function z$3(e){var t=new a$11;return t.x=e.z,t.y=e.x,t.z=e.y,t}function G$6(e){var t,i;if(e>n$1d.toRadians(85))t=0;else{if(i=Math.tan(e),e>=n$1d.toRadians(5))t=58.1/i-.07/Math.pow(i,3)+86e-6/Math.pow(i,5);else if(e>=n$1d.toRadians(-.575)){var n=n$1d.toDegrees(e);t=1735+n*(n*(103.4+n*(.711*n-12.79))-518.2)}else t=-20.774/i;t/=3600}return e+n$1d.toRadians(t)}_$6.prototype._computeSun=function(e){var t=this._ephemeris.getSunPositionHorizon(),i=(t=a$11.normalize(t,O$5)).y;if(this._lastSunT!==this._T||this._lastSunZenith!==i){this._lastSunT=this._T,this._lastSunZenith=i;var n=n$1d.toDegrees(Math.asin(t.y));n+=0,this._perezBlend=n>1?0:n<0?1:1-n;var r=Math.acos(i)-n$1d.toRadians(0),o=n$1d.toRadians(1),a=new y$a,s=new y$a,l=new y$a,u=new y$a;if(.5*Math.PI-r>o){this._sunAboveHorizon=!0,this._sunSpectrum.applyAtmosphericTransmittance(r,i,this._T,e,a,s),this._sunTransmittedLuminance=a.toXYZ(),this._sunScatteredLuminance=s.toXYZ(),e<1e3?(this._sunTransmittedLuminanceSeaLevel=this._sunTransmittedLuminance,this._sunScatteredLuminanceSeaLevel=this._sunScatteredLuminance):(this._sunSpectrum.applyAtmosphericTransmittance(r,i,this._T,0,l,u),this._sunTransmittedLuminanceSeaLevel=l.toXYZ(),this._sunScatteredLuminanceSeaLevel=u.toXYZ());for(var c=r/(.5*Math.PI),h=0;h<6;h++)c*=c;this._sunScatteredLuminance.x*=1+0*c,this._sunScatteredLuminance.y*=1+0*c,this._sunScatteredLuminance.z*=1+0*c,this._sunScatteredLuminanceSeaLevel.x*=1+0*c,this._sunScatteredLuminanceSeaLevel.y*=1+0*c,this._sunScatteredLuminanceSeaLevel.z*=1+0*c}else{this._sunAboveHorizon=!1;var d=Math.floor(n),f=Math.ceil(n);c=n-d;t$$(this._twilightLuminance[d])||(this._twilightLuminance[d]=0),t$$(this._twilightLuminance[f])||(this._twilightLuminance[f]=0);var p=this._twilightLuminance[d],_=this._twilightLuminance[f];r=.5*Math.PI-o;this._sunSpectrum.applyAtmosphericTransmittance(r,Math.cos(r),this._T,e,a,s),this._sunTransmittedLuminance=a.toXYZ(),this._sunScatteredLuminance=s.toXYZ(),e<1e3?(this._sunTransmittedLuminanceSeaLevel=this._sunTransmittedLuminance,this._sunScatteredLuminanceSeaLevel=this._sunScatteredLuminance):(this._sunSpectrum.applyAtmosphericTransmittance(r,Math.cos(r),this._T,0,l,u),this._sunTransmittedLuminanceSeaLevel=l.toXYZ(),this._sunScatteredLuminanceSeaLevel=u.toXYZ());var m=(1-c)*p+c*_,$=.25,g=m/$*.25,y=m/$*.5;(c=-n/2)>1&&(c=1),c<0&&(c=0);var v=0*m*(c*=c)+(1-c);a$11.multiplyByScalar(this._sunTransmittedLuminance,v,this._sunTransmittedLuminance),this._sunScatteredLuminance.x=g*c+this._sunScatteredLuminance.x*(1-c),this._sunScatteredLuminance.y=m*c+this._sunScatteredLuminance.y*(1-c),this._sunScatteredLuminance.z=y*c+this._sunScatteredLuminance.z*(1-c),v=0*m*c+(1-c),a$11.multiplyByScalar(this._sunScatteredLuminanceSeaLevel,v,this._sunScatteredLuminanceSeaLevel),this._sunScatteredLuminanceSeaLevel.x=g*c+this._sunScatteredLuminanceSeaLevel.x*(1-c),this._sunScatteredLuminanceSeaLevel.y=m*c+this._sunScatteredLuminanceSeaLevel.y*(1-c),this._sunScatteredLuminanceSeaLevel.z=y*c+this._sunScatteredLuminanceSeaLevel.z*(1-c),this._sunScatteredLuminance.x*=1,this._sunScatteredLuminance.y*=1,this._sunScatteredLuminance.z*=1,this._sunScatteredLuminanceSeaLevel.x*=1,this._sunScatteredLuminanceSeaLevel.y*=1,this._sunScatteredLuminanceSeaLevel.z*=1}}},_$6.prototype._moonLuminance=function(){var e=this._ephemeris.getMoonPositionHorizon();a$11.clone(e,p$7),a$11.normalize(p$7,p$7);var t=n$1d.toDegrees(Math.asin(p$7.z)),i=1738100,n=1e3*this._ephemeris.getMoonDistanceKM(),r=.001,o=this._ephemeris.getMoonPhaseAngle();o<r&&(o=r);for(var a=Math.PI-o;a<0;)a+=2*Math.PI;a<r&&(a=r);var s=683*(.144*i*i/(3*n*n)*(.095*(1-Math.sin(o/2)*Math.tan(o/2)*Math.log(1/Math.tan(o/4)))+1905*(1-Math.sin(a/2)*Math.tan(a/2)*Math.log(1/Math.tan(a/4)))))/3.14;return s*=.001,t<0&&(s*=Math.exp(1.1247*t)),s},_$6.prototype._computeMoon=function(e){var t=this._ephemeris.getMoonPositionHorizon();a$11.clone(t,p$7),a$11.normalize(p$7,p$7);var i=p$7.z,n=Math.acos(i),r=this._ephemeris.getMoonPhase();if(this._lastMoonT!==this._T||this._lastMoonZenith!==n||this._lastMoonPhase!==r){this._lastMoonT=this._T,this._lastMoonZenith=n,this._lastMoonPhase=r,this._lightingChanged=!0;var o=new y$a,a=new y$a;this._lunarSpectrum.applyAtmosphericTransmittance(n,i,this._T,e,o,a);var s=this._moonLuminance();this._moonTransmittedLuminance=a$11.multiplyByScalar(o.toXYZ(),s,new a$11),this._moonScatteredLuminance=a$11.multiplyByScalar(a.toXYZ(),s,new a$11);var l=new y$a,u=new y$a;this._lunarSpectrum.applyAtmosphericTransmittance(n,i,this._T,0,l,u),this._moonTransmittedLuminance=a$11.multiplyByScalar(o.toXYZ(),s,new a$11),this._moonScatteredLuminance=a$11.multiplyByScalar(a.toXYZ(),s,new a$11),this._moonTransmittedLuminanceSeaLevel=a$11.multiplyByScalar(l.toXYZ(),s,new a$11),this._moonScatteredLuminanceSeaLevel=a$11.multiplyByScalar(u.toXYZ(),s,new a$11)}},_$6.prototype.getSunColor=function(){var e=a$11.multiplyByScalar(this._sunTransmittedLuminance,1,new a$11);a$6.durandMapperXYZ(e);var t=r$W.multiplyByVector(P$5,e,new a$11);return this._applyGamma(t),new e$1z(t.x,t.y,t.z)},_$6.prototype._updateZenith=function(e){var t=this._ephemeris.getSunPositionHorizon();a$11.normalize(t,t),new a$11(0,1,0);this._isothermalEffect=Math.exp(-e/8435),this._isothermalEffect<0&&(this._isothermalEffect=0),this._isothermalEffect>1&&(this._isothermalEffect=1)},_$6.prototype._nightSkyLuminance=function(){return 683*(this._lightPollution+2e-6+12e-8+3e-8+51e-9+9.1e-9+9.1e-10)/3.14*this._isothermalEffect*.001*this._nightSkyScale},_$6.prototype._applyGamma=function(e){var t=0;e.x<t&&(t=e.x),e.y<t&&(t=e.y),e.z<t&&(t=e.z),t=-t,e.x=e.x+t,e.y=e.y+t,e.z=e.z+t;var i=e.x;e.y>i&&(i=e.y),e.z>i&&(i=e.z),i>1&&(e.x/=i,e.y/=i,e.z/=i);var n=this._oneOverGammaHosek;e.x>0&&(e.x=Math.pow(e.x,n)),e.y>0&&(e.y=Math.pow(e.y,n)),e.z>0&&(e.z=Math.pow(e.z,n))},_$6.prototype._computeLogAvg=function(){var e,t,i=new a$11;a$11.add(this._sunScatteredLuminance,this._moonScatteredLuminance,i),a$11.add(i,this._moonTransmittedLuminance,i),i.y+=1e3*this._nightSkyLuminance(),e=i.y,t=-.702*i.x+1.039*i.y+.433*i.z,a$6.setSceneLogAvg(t,e)},_$6.prototype._computeToneMappedSkyLight=function(){var e=a$11.multiplyByScalar(this._sunScatteredLuminance,.5,new a$11);e.y+=1e3*this._nightSkyLuminance();var t=a$11.multiplyByScalar(this._moonScatteredLuminance,.5,new a$11),i=a$11.multiplyByScalar(this._sunScatteredLuminanceSeaLevel,.5,new a$11);i.y+=1e3*this._nightSkyLuminance();var n=a$11.multiplyByScalar(this._moonScatteredLuminanceSeaLevel,.5,new a$11);a$6.durandMapperXYZ(e),a$6.durandMapperXYZ(t),a$6.durandMapperXYZ(i),a$6.durandMapperXYZ(n);var r=a$11.add(e,t,new a$11);r.x>this._maxSkylightLuminance&&(r.x=this._maxSkylightLuminance),r.y>this._maxSkylightLuminance&&(r.y=this._maxSkylightLuminance),r.z>this._maxSkylightLuminance&&(r.z=this._maxSkylightLuminance);var o=r$W.multiplyByVector(P$5,r,new a$11);this._monochromeAmbient&&(o.x=o.z=o.y),this._applyGamma(o),this._skyLight=new e$1z(o.x,o.y,o.z),(r=a$11.add(i,n,r)).x>this._maxSkylightLuminance&&(r.x=this._maxSkylightLuminance),r.y>this._maxSkylightLuminance&&(r.y=this._maxSkylightLuminance),r.z>this._maxSkylightLuminance&&(r.z=this._maxSkylightLuminance),o=r$W.multiplyByVector(P$5,r,new a$11),this._monochromeAmbient&&(o.x=o.z=o.y),this._applyGamma(o),this._skyLightSeaLevel=new e$1z(o.x,o.y,o.z)},_$6.prototype.setEphemeris=function(e,t){this._ephemeris=e,this._lightingChanged=!1,this._computeSun(t),this._computeMoon(t),this._updateZenith(t),this._computeLogAvg(),this._computeToneMappedSkyLight()},n$8.prototype.setTimeZone=function(e){e>=-12&&e<=12&&(this.zoneCorrection=e)},n$8.prototype.getEpoch2000Centuries=function(e){var t,i,n,r,o=this.hours+(this.minutes+this.seconds/60)/60;this.observingDST&&(o-=1),o-=this.zoneCorrection,n=this.day+o/24,this.month<3?(t=this.year-1,i=this.month+12):(t=this.year,i=this.month),r=1720996.5-Math.floor(t/100)+Math.floor(t/400)+Math.floor(365.25*t)+Math.floor(30.6001*(i+1));var a=(r-=2451545)+n;return e&&(a+=65/60/60/24),a/=36525},n$8.prototype.getEpoch1990Days=function(e){var t,i,n,r,o=this.hours+(this.minutes+this.seconds/60)/60;this.observingDST&&(o-=1),o-=this.zoneCorrection,r=this.day+o/24,this.month<3?(t=this.year-1,i=this.month+12):(t=this.year,i=this.month),n=1720996.5-Math.floor(t/100)+Math.floor(t/400)+Math.floor(365.25*t)+Math.floor(30.6001*(i+1));var a=(n-=2447891.5)+r;return e&&(a+=65/60/60/24),a},n$8.prototype.clone=function(e){return e.year=this.year,e.month=this.month,e.day=this.day,e.hours=this.hours,e.minutes=this.minutes,e.seconds=this.seconds,e},Object.defineProperties(i$8.prototype,{longitude:{get:function(){return this._longitude},set:function(e){e>=-180&&e<=180&&(this._longitude=e)}},latitude:{get:function(){return this._latitude},set:function(e){e>=-90&&e<=90&&(this._latitude=e)}},altitude:{get:function(){return this._altitude},set:function(e){this._altitude=e}}}),i$8.prototype.clone=function(e){return e._latitude=this.latitude,e._longitude=this.longitude,e._altitude=this.altitude,e},a$5.prototype.getSunPositionGeographic=function(){return this._sunGeo},a$5.prototype.getSunPositionHorizon=function(){return this._sunHoriz},a$5.prototype.computeMoonPosition=function(){var e=this._T,t=6.23+628.3019*e,i=1.628+8433.4663*e,n=2.3554+8328.6911*e,r=5.1985+7771.3772*e,o=3.8104+8399.7091*e+.1098*Math.sin(n)+.0222*Math.sin(2*r-n)+.0115*Math.sin(2*r)+.0037*Math.sin(2*n)-.0032*Math.sin(t)-.002*Math.sin(2*i)+.001*Math.sin(2*r-2*n)+.001*Math.sin(2*r-t-n)+9e-4*Math.sin(2*r+n)+8e-4*Math.sin(2*r-t)+7e-4*Math.sin(n-t)-6e-4*Math.sin(r)-5e-4*Math.sin(t+n),a=.0895*Math.sin(i)+.0049*Math.sin(n+i)+.0048*Math.sin(n-i)+.003*Math.sin(2*r-i)+.001*Math.sin(2*r+i-n)+8e-4*Math.sin(2*r-i-n)+6e-4*Math.sin(2*r+i),s=1/(.016593+904e-6*Math.cos(n)+166e-6*Math.cos(2*r-n)+137e-6*Math.cos(2*r)+49e-6*Math.cos(2*n)+15e-6*Math.cos(2*r+n)+9e-6*Math.cos(2*r-t));this._moonEcl=E$7(s,a,o),this._moonEq=r$W.multiplyByVector(this._eclipticToEquatorial,this._moonEcl,this._moonEq),this._moonGeo=r$W.multiplyByVector(this._equatorialToGeographic,this._moonEq,this._moonGeo),this._moonHoriz=r$W.multiplyByVector(this._eclipticToHorizon,this._moonEcl,new a$11),this._moonDistance=6378.137*a$11.distance(this._moonHoriz,new a$11(1,0,0)),o=T$6(o),this._sunEclipticLongitude=T$6(this._sunEclipticLongitude),this._moonPhaseAngle=o-this._sunEclipticLongitude,this._moonPhaseAngle=T$6(this._moonPhaseAngle),this._moonPhase=.5*(1-Math.cos(this._moonPhaseAngle))};var u$8=new a$11;function v$6(e,t){var i=Math.sin(-e),n=Math.cos(-e);t[0]=1,t[3]=0,t[6]=0,t[1]=0,t[4]=n,t[7]=i,t[2]=0,t[5]=-i,t[8]=n}function H$3(e,t){var i=Math.sin(-e),n=Math.cos(-e);t[0]=n,t[3]=0,t[6]=-i,t[1]=0,t[4]=1,t[7]=0,t[2]=i,t[5]=0,t[8]=n}function M$5(e,t){var i=Math.sin(-e),n=Math.cos(-e);t[0]=n,t[3]=i,t[6]=0,t[1]=-i,t[4]=n,t[7]=0,t[2]=0,t[5]=0,t[8]=1}a$5.prototype.computeSunPosition=function(){var e=this._T,t=6.24+628.302*e,i=4.895048+628.331951*e+(.033417-84e-6*e)*Math.sin(t)+351e-6*Math.sin(2*t),n=1.00014-(.016708-42e-6*e)*Math.cos(t)-141e-6*Math.cos(2*t);if(this._sunEclipticLongitude=i,this._sunEcl=E$7(n,0,i),this._sunEq=r$W.multiplyByVector(this._eclipticToEquatorial,this._sunEcl,this._sunEq),u$8=r$W.multiplyByVector(this._equatorialToGeographic,this._sunEq,u$8),this._geoZUp?(this._sunGeo.x=u$8.x,this._sunGeo.y=u$8.y,this._sunGeo.z=u$8.z):this._primeMeridianZ?(this._sunGeo.x=u$8.y,this._sunGeo.y=u$8.z,this._sunGeo.z=u$8.x):(this._sunGeo.x=u$8.x,this._sunGeo.y=u$8.z,this._sunGeo.z=-u$8.y),this._forceSunHoriz)this._sunHoriz.x=sin(forcedSunAzimuth)*cos(forcedSunAltitude),this._sunHoriz.z=-cos(forcedSunAzimuth)*cos(forcedSunAltitude),this._sunHoriz.y=sin(forcedSunAltitude),this._sunHoriz.Normalize(),this._geoZUp?this._sunGeo=horizonToGeographic*z$3(sunHoriz):this._sunGeo=f$7(horizonToGeographic*z$3(sunHoriz)),this._sunEcl=horizonToEcliptic*z$3(sunHoriz),this._sunEq=horizonToEquatorial*z$3(sunHoriz);else{var r=new a$11;r=r$W.multiplyByVector(this._eclipticToHorizon,this._sunEcl,r),this._sunHoriz=f$7(r)}var o=a$11.normalize(this._sunHoriz,new a$11),a=a$11.distance(this._sunHoriz,a$11.ZERO),s=Math.asin(o.y);s=G$6(s),this._sunHoriz.y=a*Math.sin(s)},a$5.prototype.getSunPositionHorizon=function(){return this._sunHoriz},a$5.prototype.getMoonPositionHorizon=function(){return this._moonHoriz},a$5.prototype.getMoonPhase=function(){return this._moonPhase},a$5.prototype.getMoonDistanceKM=function(){return this._moonDistance},a$5.prototype.getMoonPhaseAngle=function(){return this._moonPhaseAngle};var m$b=new r$W,g$4=new r$W,y$9=new r$W;function s$7(){this._ambientColor=new e$1z,this._sunColor=new e$1z,this._sky=new _$6,this._ephemeris=new a$5,this._localTime=new n$8,this._location=new i$8,this._atmosphereHeight=1e5,this._renderError=new o$15,this._basis3=new r$W,this._invBasis3=new r$W,this._upVector=new a$11(0,0,1),this._rightVector=new a$11(-1,0,0),this._sceneMode=b$1d.SCENE3D}a$5.prototype.update=function(e,t){var i=!1;if(e!==this._lastTime&&(i=!0,this._lastTime=e.clone(this._lastTime)),t!==this._lastLocation&&(i=!0,this._lastLocation=t.clone(this._lastLocation)),i){var n=this._T=e.getEpoch2000Centuries(!0);this._tuncorr=e.getEpoch2000Centuries(!1),this._epochDays=e.getEpoch1990Days(!1),M$5(.01118*n,m$b),H$3(-.00972*n,g$4),M$5(.01118*n,y$9);var r=r$W.multiply(m$b,g$4,new r$W);this._precession=r$W.multiply(r,y$9,this._precession);var o=4.894961+230121.675315*this._tuncorr,a=o+n$1d.toRadians(t.longitude),s=n$1d.toRadians(t.latitude),l=.409093-227e-6*this._T;H$3(s-Math.PI/2,g$4),M$5(-a,y$9),v$6(l,m$b),r=r$W.multiply(g$4,y$9,r),r$W.multiply(r,this._precession,this._equatorialToHorizon),r$W.multiply(r,m$b,this._eclipticToHorizon),r$W.clone(m$b,this._eclipticToEquatorial),M$5(-o,this._equatorialToGeographic),r$W.transpose(this._equatorialToGeographic,this._geographicToEquatorial),r$W.transpose(this._equatorialToHorizon,this._horizonToEquatorial),r$W.multiply(this._equatorialToGeographic,this._horizonToEquatorial,this._horizonToGeographic),r$W.multiply(this._equatorialToHorizon,this._geographicToEquatorial,this._geographicToHorizon),r$W.inverse(this._eclipticToHorizon,this._horizonToEcliptic),this.computeSunPosition(),this.computeMoonPosition()}};var T$5=new e$1z(1,.96,.94,1);function m$a(e){var t=0;e.red<t&&(t=e.red),e.green<t&&(t=e.green),e.blue<t&&(t=e.blue),t=-t,e.red+=t,e.green+=t,e.blue+=t;var i=e.red;e.green>i&&(i=e.green),e.blue>i&&(i=e.blue),i>1&&(e.red/=i,e.green/=i,e.blue/=i),e.red<0&&(e.red=0),e.green<0&&(e.green=0),e.blue<0&&(e.blue=0),e.a<0&&(e.a=0)}s$7.prototype._interpolate=function(e,t){var i=(this._atmosphereHeight+.5*this._atmosphereHeight-this._location.altitude)/(.5*this._atmosphereHeight);return i>1&&(i=1),i<0&&(i=0),e$1z.lerp(e,t,i,new e$1z)},s$7.prototype.getAmbientColor=function(){var e=this._sky.getToneMappedSkyLight();return m$a(e),this._location.altitude>this._atmosphereHeight&&(e=this._interpolate(new e$1z(0,0,0,1),e)),e},s$7.prototype.getSunColor=function(){var e=this._sky.getSunColor();return m$a(e),this._location.altitude>this._atmosphereHeight&&(e=this._interpolate(T$5,e)),e},s$7.prototype.getSunPosition=function(){if(this._sceneMode==b$1d.SCENE3D)return this.getSunPositionGeographic();var e=new a$11;return e=a$11.clone(this._ephemeris.getSunPositionHorizon(),e),a$11.normalize(e,e),r$W.multiplyByVector(this._basis3,e,e),e},s$7.prototype.getSunPositionGeographic=function(){return this._ephemeris.getSunPositionGeographic()},s$7.prototype._computeLocalTime=function(e){var t=o$10.toGregorianDate(e);this._localTime.year=t.year,this._localTime.month=t.month,this._localTime.day=t.day,this._localTime.hours=t.hour,this._localTime.minutes=t.minute,this._localTime.seconds=t.second,this._localTime.setTimeZone(0)},s$7.prototype.setLocation=function(e){this._location.longitude=n$1d.toDegrees(e.longitude),this._location.latitude=n$1d.toDegrees(e.latitude),this._location.altitude=e.height};var c$9=new a$11,u$7=new a$11,_$5=new a$11;s$7.prototype.updateBasis=function(){this.getXYZ(c$9,u$7,_$5,this._upVector,this._rightVector,!0),this.getBases(this._basis3,this._invBasis3,c$9,u$7,_$5)},s$7.prototype.getXYZ=function(e,t,i,n,r){i=a$11.cross(r,n,i),a$11.normalize(i,i),e=a$11.cross(n,i,e),a$11.normalize(e,e),t=a$11.cross(i,e,t),a$11.normalize(t,t)},s$7.prototype.getBases=function(e,t,i,n,r){e[0]=i.x,e[3]=i.y,e[6]=i.z,e[1]=n.x,e[4]=n.y,e[7]=n.z,e[2]=r.x,e[5]=r.y,e[8]=r.z,t[0]=i.x,t[3]=n.x,t[6]=r.x,t[1]=i.y,t[4]=n.y,t[7]=r.y,t[2]=i.z,t[5]=n.z,t[8]=r.z},s$7.prototype.update=function(e,t){try{this._sceneMode=t,this._sceneMode==b$1d.SCENE3D||this.updateBasis(),this.setLocation(e.camera.positionCartographic),this._computeLocalTime(e.time),this._ephemeris.update(this._localTime,this._location),this._sky.setEphemeris(this._ephemeris,this._location.altitude)}catch(e){this._renderError.raiseEvent(this,e)}};var Jt=function(e){return function(){e.frameState.afterRender.push((function(){e.requestRender()}))}};function ho(e,t,i){this.ray=e,this.width=t,this.primitives=i,this.ready=!1,this.deferred=c$18.defer(),this.promise=this.deferred.promise}function M$4(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).canvas,i=e.contextOptions,n=e.creditContainer,r=e.creditViewport;if(!t$$(t))throw new t$_("options and options.canvas are required.");var o=t$$(n),a=new d$k(t,i);o||((n=document.createElement("div")).style.position="absolute",n.style.bottom="0",n.style["text-shadow"]="0 0 2px #000000",n.style.color="#ffffff",n.style["font-size"]="10px",n.style["padding-right"]="5px",t.parentNode.appendChild(n)),t$$(r)||(r=t.parentNode),this._id=t$U(),this._jobScheduler=new o$d,this._frameState=new h$d(a,new r$e(n,"_",r),this._jobScheduler),this._frameState.scene3DOnly=e$1Y(e.scene3DOnly,!1),this._removeCreditContainer=!o,this._creditContainer=n;var s=new t$l(a);s.viewport=new n$13,s.viewport.x=0,s.viewport.y=0,s.viewport.width=a.drawingBufferWidth,s.viewport.height=a.drawingBufferHeight,this._passState=s,this._canvas=t,this._context=a,this._computeEngine=new a$j(a),this._globe=void 0,this._primitives=new r$l,this._groundPrimitives=new r$l,this._asyncRayPicks=[],this._logDepthBuffer=a.fragmentDepth,this._logDepthBufferDirty=!0,this._tweens=new p$a,this._shaderFrameCount=0,this._sunPostProcess=void 0,this._computeCommandList=[],this._overlayCommandList=[],this._overlayAgainstDepthCommandList=[],this._logDepthOverlayCommandList=[],this._useOIT=e$1Y(e.orderIndependentTranslucency,!0),this._executeOITFunction=void 0,this._depthPlane=new c$g,this._clearColorCommand=new r$M({color:new e$1z,stencil:0,owner:this}),this._depthClearCommand=new r$M({depth:1,owner:this}),this._stencilClearCommand=new r$M({stencil:0}),this._classificationStencilClearCommand=new r$M({stencil:0,renderState:p$1a.fromCache({stencilMask:Ia$1.CLASSIFICATION_MASK})}),this._depthOnlyRenderStateCache={},this._pickRenderStateCache={},this._transitioner=new N$5(this),this._preUpdate=new o$15,this._postUpdate=new o$15,this._renderError=new o$15,this._preRender=new o$15,this._postRender=new o$15,this._pickPositionCache={},this._pickPositionCacheDirty=!1,this._minimumDisableDepthTestDistance=0,this._customRequestHeaders=e.customRequestHeaders,this.frustumTolerance=0,this.rethrowRenderErrors=!1,this.completeMorphOnUserInput=!0,this.morphStart=new o$15,this.morphComplete=new o$15,this.skyBox=void 0,this._cloudBox=void 0,this.skyAtmosphere=void 0,this.sun=void 0,this.sunBloom=!0,this._sunBloom=void 0,this.moon=void 0,this.backgroundColor=e$1z.clone(e$1z.BLACK),this._mode=b$1d.SCENE3D,this._mapProjection=t$$(e.mapProjection)?e.mapProjection:new s$1q,this.morphTime=1,this.farToNearRatio=1e3,this.logarithmicDepthFarToNearRatio=1e11,this.nearToFarDistance2D=175e4,this.debugCommandFilter=void 0,this.debugShowCommands=!1,this.debugShowFrustums=!1,this.debugShowFramesPerSecond=!1,this.debugShowGlobeDepth=!1,this.debugShowDepthFrustum=1,this.debugShowFrustumPlanes=!1,this._debugShowFrustumPlanes=!1,this._debugFrustumPlanes=void 0,this.useDepthPicking=!0,this.pickTranslucentDepth=!0,this.cameraEventWaitTime=500,this.fog=new d$f,this._sunCamera=new p$m(this),this.shadowMap=new O$g({context:a,lightCamera:this._sunCamera,enabled:e$1Y(e.shadows,!1)}),this._analysisShadowMap=void 0,this.invertClassification=!1,this.invertClassificationColor=e$1z.clone(e$1z.WHITE),this._actualInvertClassificationColor=e$1z.clone(this._invertClassificationColor),this._invertClassification=new r$a,this.focalLength=void 0,this.eyeSeparation=void 0,this.postProcessStages=new _$8,this._brdfLutGenerator=new o$l,this._terrainExaggeration=e$1Y(e.terrainExaggeration,1),this._performanceDisplay=void 0,this._debugVolume=void 0,this._screenSpaceCameraController=new wt(this),this._mapMode2D=e$1Y(e.mapMode2D,Zr.INFINITE_SCROLL),this._environmentState={skyBoxCommand:void 0,skyAtmosphereCommand:void 0,sunDrawCommand:void 0,sunComputeCommand:void 0,moonCommand:void 0,isSunVisible:!1,isMoonVisible:!1,isReadyForAtmosphere:!1,isSkyAtmosphereVisible:!1,clearGlobeDepth:!1,useDepthPlane:!1,renderTranslucentDepthForPick:!1,originalFramebuffer:void 0,useGlobeDepthFramebuffer:!1,useOIT:!1,useInvertClassification:!1,usePostProcess:!1,usePostEffect:!1,usePostProcessSelected:!1,useWebVR:!1},this._environmentVisible={isSunVisible:!0,isMoonVisible:!0,isSkyAtmosphereVisible:!0,isSkyBoxVisible:!0,isUnderGlobeVisible:!0,isGlobalVisible:!0,isObjectVisible:!0,isOnlyS3MObjectVisible:!1,isBillboardVisible:!0},this._useWebVR=!1,this._cameraVR=void 0,this._aspectRatioVR=void 0,this.requestRenderMode=e$1Y(e.requestRenderMode,!1),this._renderRequested=!0,this.maximumRenderTimeChange=e$1Y(e.maximumRenderTimeChange,0),this._lastRenderTime=void 0,this._frameRateMonitor=void 0,this._removeRequestListenerCallback=r$U.requestCompletedEvent.addEventListener(Jt(this)),this._removeTaskProcessorListenerCallback=o$_.taskCompletedEvent.addEventListener(Jt(this)),this._removeGlobeCallbacks=[];var l=new n$13(0,0,a.drawingBufferWidth,a.drawingBufferHeight),u=new p$m(this);this._logDepthBuffer&&(u.frustum.near=.1,u.frustum.far=1e10),this.preloadFlightCamera=new p$m(this),this.preloadFlightCullingVolume=void 0,this._picking=new l$9(this);var c=new n$13(0,0,1,1),h=new p$m(this);h.frustum=new r$K({width:.1,aspectRatio:1,near:.1}),this._view=new x$c(this,u,l),this._pickOffscreenView=new x$c(this,h,c),this.pickOffscreenDefaultWidth=.1,this._defaultView=new x$c(this,u,l),this._view=this._defaultView,this._hdr=void 0,this._hdrDirty=void 0,this.highDynamicRange=!1,this.gamma=2.2,this._sunColor=new a$11(1.8,1.85,2),this._lightGroup=br.SUN_LIGHT,this._presetLightSource=[],this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this._specularEnvironmentMapAtlas=void 0,this._supportCompressType=0,a.s3tc?this._supportCompressType=1:a.pvrtc?this._supportCompressType=2:a.etc1&&(this._supportCompressType=3),this._plotLayers=new _0x5a5fb4,this._layers=new h$l,oo$1._attachLayers(this._layers),this._undergroundMode=!1,this._undergroundDepth=1e3,this._underGlobe=new t$6(this._undergroundDepth,!1),this._analyst3D=new h$l,this._vectorTileMaps=new h$l,this._vectorTileSource=new e$1F,this._multiViewportMode=te$5.NONE,this._multiViewportInfo=[],this._lightSource=new h$n(a),this.compositor=new o$i(a),pi(this,0,o$10.now()),Le$1(this),this.initializeFrame(),this._pickPointEnabled=!1,this._pickPointInterval=200,this._pos=void 0,this._pickPointTolerance=3,this._pickTolerance=3,this._pickDepthTolerance=0,this._rasterPickTexture=void 0,this._rasterPickFBO=void 0,this.voxelGridPostRender=new i$a({}),this.particlePostRender=new h$9({}),this.particleTrailsPostRenderer=new o$b({}),this._pickResult={pickFrameNumber:-1,pickObject:void 0},this._walkingMode=si.NONE,this._pickRect=void 0,this._isUpdatePickCommand=!1,this._pickRectFramebuffer=void 0,this._mvtVisibleControl=!1,this._mvtVisibleLevel=0,this._maskEnabled=!1,this._enableCompositor=!0,this._overlapDisplayedThreshold=0,this._overlapDisplayOptions={allowIconWithTextDisplay:!0},this._pbrMaterlParameters=[],this._saveLocalCachePerformance=!0,this._toneMappingExposure=1,this.RSAAuthenticationStatus={},this._silverLightingAtmosphere=new s$7,a.uniformState._silverLightingAtmosphere=this._silverLightingAtmosphere}function po(e,t){for(var i=0;i<e._removeGlobeCallbacks.length;++i)e._removeGlobeCallbacks[i]();e._removeGlobeCallbacks.length=0;var n=[];t$$(t)&&(n.push(t.imageryLayersUpdatedEvent.addEventListener(Jt(e))),n.push(t.terrainProviderChanged.addEventListener(Jt(e)))),e._removeGlobeCallbacks=n}function go(e,t){e.enableVertexCapture(t)}function vo(e,t){e.disableVertexCapture(t)}function fi(e,t,i){var n=e._frameState,r=e._context,o=e._view.oit,a=n.shadowState.lightShadowMaps,s=n.shadowState.lightShadowsEnabled,l=t.derivedCommands;t$$(t.pickId)&&(l.picking=p$h.createPickDerivedCommand(e,t,r,l.picking)),!t.pickOnly&&t.pass!==we$l.TERRAIN_CLASSIFICATION&&t.pass!==we$l.ClampObject&&(l.depth=p$h.createDepthOnlyDerivedCommand(e,t,r,l.depth)),n.passes.normal&&(l.normal=p$h.createNormalDerivedCommand(t,r)),l.originalCommand=t,e._hdr&&(l.hdr=p$h.createHdrCommand(t,r,l.hdr),l=(t=l.hdr.command).derivedCommands),s&&t.receiveShadows&&(l.shadows=O$g.createReceiveDerivedCommand(a,t,i,r,l.shadows)),t.pass===we$l.TRANSLUCENT&&t$$(o)&&o.isSupported()&&(s&&t.receiveShadows?(l.oit=t$$(l.oit)?l.oit:{},l.oit.shadows=o.createDerivedCommands(l.shadows.receiveCommand,r,l.oit.shadows)):l.oit=o.createDerivedCommands(t,r,l.oit)),t.pass===we$l.Voxel_Billboard&&t$$(e.voxelGridPostRender)&&e.voxelGridPostRender.createDerivedCommands(t),t.pass===we$l.Particle&&t$$(e.particlePostRender)&&e.particlePostRender.createDerivedCommands(t),e._maskEnabled&&(l.mask=p$h.createMaskCommand(t,r,l.mask))}Object.defineProperties(M$4.prototype,{toneMappingExposure:{get:function(){return this._toneMappingExposure},set:function(e){this._toneMappingExposure=e}},canvas:{get:function(){return this._canvas}},drawingBufferHeight:{get:function(){return this._context.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._context.drawingBufferWidth}},pixelRatio:{get:function(){return this._frameState.pixelRatio},set:function(e){this._frameState.pixelRatio=e}},maximumAliasedLineWidth:{get:function(){return e$1y.maximumAliasedLineWidth}},maximumCubeMapSize:{get:function(){return e$1y.maximumCubeMapSize}},pickPositionSupported:{get:function(){return!0}},sampleHeightSupported:{get:function(){return this._context.depthTexture}},clampToHeightSupported:{get:function(){return this._context.depthTexture}},invertClassificationSupported:{get:function(){return this._context.depthTexture}},specularEnvironmentMapsSupported:{get:function(){return n$E.isSupported(this._context)}},globe:{get:function(){return this._globe},set:function(e){this._globe=this._globe&&this._globe.destroy(),this._globe=e,po(this,e)}},primitives:{get:function(){return this._primitives}},groundPrimitives:{get:function(){return this._groundPrimitives}},camera:{get:function(){return this._view.camera},set:function(e){this._view.camera=e}},view:{get:function(){return this._view},set:function(e){this._view=e}},defaultView:{get:function(){return this._defaultView}},picking:{get:function(){return this._picking}},screenSpaceCameraController:{get:function(){return this._screenSpaceCameraController}},mapProjection:{get:function(){return this._mapProjection}},jobScheduler:{get:function(){return this._jobScheduler}},frameState:{get:function(){return this._frameState}},tweens:{get:function(){return this._tweens}},imageryLayers:{get:function(){if(t$$(this.globe))return this.globe.imageryLayers}},terrainLayers:{get:function(){if(t$$(this.globe))return this.globe.terrainLayers}},terrainProvider:{get:function(){if(t$$(this.globe))return this.globe.terrainProvider},set:function(e){t$$(this.globe)&&(this.globe.terrainProvider=e)}},terrainProviderChanged:{get:function(){if(t$$(this.globe))return this.globe.terrainProviderChanged}},preUpdate:{get:function(){return this._preUpdate}},postUpdate:{get:function(){return this._postUpdate}},renderError:{get:function(){return this._renderError}},preRender:{get:function(){return this._preRender}},postRender:{get:function(){return this._postRender}},lastRenderTime:{get:function(){return this._lastRenderTime}},context:{get:function(){return this._context}},debugFrustumStatistics:{get:function(){return this._view.debugFrustumStatistics}},scene3DOnly:{get:function(){return this._frameState.scene3DOnly}},orderIndependentTranslucency:{get:function(){return this._useOIT}},customRequestHeaders:{get:function(){return this._customRequestHeaders},set:function(e){this._customRequestHeaders=e}},id:{get:function(){return this._id}},mode:{get:function(){return this._mode},set:function(e){if(this.scene3DOnly&&e!==b$1d.SCENE3D)throw new t$_("Only SceneMode.SCENE3D is valid when scene3DOnly is true.");if(e===b$1d.SCENE2D)this.morphTo2D(0);else if(e===b$1d.SCENE3D)this.morphTo3D(0);else{if(e!==b$1d.COLUMBUS_VIEW)throw new t$_("value must be a valid SceneMode enumeration.");this.morphToColumbusView(0)}this._mode=e}},frustumCommandsList:{get:function(){return this._view.frustumCommandsList}},numberOfFrustums:{get:function(){return this._view.frustumCommandsList.length}},terrainExaggeration:{get:function(){return this._terrainExaggeration},set:function(e){this._terrainExaggeration!==e&&t$$(this.globe)&&this.globe._surface.invalidateAllTiles(),this._terrainExaggeration=e}},useWebVR:{get:function(){return this._useWebVR},set:function(e){if(this.camera.frustum instanceof r$K)throw new t$_("VR is unsupported with an orthographic projection.");this._useWebVR=e,this._useWebVR?(this._frameState.creditDisplay.container.style.visibility="hidden",this._cameraVR=new p$m(this),t$$(this._deviceOrientationCameraController)||(this._deviceOrientationCameraController=new m$i(this)),this._aspectRatioVR=this.camera.frustum.aspectRatio):(this._frameState.creditDisplay.container.style.visibility="visible",this._cameraVR=void 0,this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this.camera.frustum.aspectRatio=this._aspectRatioVR,this.camera.frustum.xOffset=0)}},mapMode2D:{get:function(){return this._mapMode2D}},imagerySplitPosition:{get:function(){return this._frameState.imagerySplitPosition},set:function(e){this._frameState.imagerySplitPosition=e}},globeSplitPosition:{get:function(){return this._frameState.globeSplitPosition},set:function(e){this._frameState.globeSplitPosition=e}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance},set:function(e){if(!t$$(e)||e<0)throw new t$_("minimumDisableDepthTestDistance must be greater than or equal to 0.0.");this._minimumDisableDepthTestDistance=e}},logarithmicDepthBuffer:{get:function(){return this._logDepthBuffer},set:function(e){e=this._context.fragmentDepth&&e,this._logDepthBuffer!==e&&(this._logDepthBuffer=e,this._logDepthBufferDirty=!0,this._defaultView.updateFrustums=!0)}},gamma:{get:function(){return this._context.uniformState.gamma},set:function(e){this._context.uniformState.gamma=e}},highDynamicRange:{get:function(){return this._hdr},set:function(e){var t=this._context,i=e&&t.depthTexture&&(t.colorBufferFloat||t.colorBufferHalfFloat);this._hdrDirty=i!==this._hdr,this._hdr=i}},highDynamicRangeSupported:{get:function(){var e=this._context;return e.depthTexture&&(e.colorBufferFloat||e.colorBufferHalfFloat)}},sunColor:{get:function(){return this._sunColor},set:function(e){this._sunColor=e}},opaqueFrustumNearOffset:{get:function(){return this._frameState.useLogDepth?.9:.9999}},layers:{get:function(){return this._layers}},plotLayers:{get:function(){return this._plotLayers}},multiViewportMode:{get:function(){return this._multiViewportMode},set:function(e){switch(this._multiViewportInfo.length=0,e){case te$5.NONE:this._frameState.multiViewportIndex=-1;break;case te$5.HORIZONTAL:this._multiViewportInfo[0]=new n$13(0,0,.5,1),this._multiViewportInfo[1]=new n$13(.5,0,.5,1);break;case te$5.VERTICAL:this._multiViewportInfo[0]=new n$13(0,.5,1,.5),this._multiViewportInfo[1]=new n$13(0,0,1,.5);break;case te$5.QUAD:this._multiViewportInfo[0]=new n$13(0,.5,.5,.5),this._multiViewportInfo[1]=new n$13(.5,.5,.5,.5),this._multiViewportInfo[2]=new n$13(.5,0,.5,.5),this._multiViewportInfo[3]=new n$13(0,0,.5,.5);break;case te$5.TRIPLE:this._multiViewportInfo[2]=new n$13(0,.5,.5,.5),this._multiViewportInfo[1]=new n$13(.5,.5,.5,.5),this._multiViewportInfo[0]=new n$13(0,0,1,.5);break;case te$5.VerticalTrisection:this._multiViewportInfo[2]=new n$13(2/3,0,1/3,1),this._multiViewportInfo[1]=new n$13(1/3,0,1/3,1),this._multiViewportInfo[0]=new n$13(0,0,1/3,1);break;case te$5.FIVE_DIVISIONS:this._multiViewportInfo[4]=new n$13(0,0,.5,.5),this._multiViewportInfo[3]=new n$13(0,.5,.5,.5),this._multiViewportInfo[2]=new n$13(.5,0,.5,1/3),this._multiViewportInfo[1]=new n$13(.5,1/3,.5,1/3),this._multiViewportInfo[0]=new n$13(.5,2/3,.5,1/3);break;case te$5.SIX_DIVISIONS:this._multiViewportInfo[5]=new n$13(2/3,0,1/3,1/3),this._multiViewportInfo[4]=new n$13(2/3,1/3,1/3,1/3),this._multiViewportInfo[3]=new n$13(2/3,2/3,1/3,1/3),this._multiViewportInfo[2]=new n$13(1/3,0,1/3,1/3),this._multiViewportInfo[1]=new n$13(0,0,1/3,1/3),this._multiViewportInfo[0]=new n$13(0,1/3,2/3,2/3);break;case te$5.SEVEN_DIVISIONS:this._multiViewportInfo[6]=new n$13(0,0,.3,.5),this._multiViewportInfo[5]=new n$13(.3,0,.4,1/3),this._multiViewportInfo[4]=new n$13(.7,0,.3,.5),this._multiViewportInfo[3]=new n$13(.7,.5,.3,.5),this._multiViewportInfo[2]=new n$13(.3,2/3,.4,1/3),this._multiViewportInfo[1]=new n$13(0,.5,.3,.5),this._multiViewportInfo[0]=new n$13(.3,1/3,.4,1/3);break;case te$5.EIGHT_DIVISIONS:this._multiViewportInfo[0]=new n$13(.5,0,.5,1/3),this._multiViewportInfo[1]=new n$13(0,0,.5,1/3),this._multiViewportInfo[2]=new n$13(2/3,1/3,1/3,1/3),this._multiViewportInfo[3]=new n$13(1/3,1/3,1/3,1/3),this._multiViewportInfo[4]=new n$13(0,1/3,1/3,1/3),this._multiViewportInfo[5]=new n$13(2/3,2/3,1/3,1/3),this._multiViewportInfo[6]=new n$13(1/3,2/3,1/3,1/3),this._multiViewportInfo[7]=new n$13(0,2/3,1/3,1/3);break;case te$5.NINE_DIVISIONS:this._multiViewportInfo[8]=new n$13(2/3,0,1/3,1/3),this._multiViewportInfo[7]=new n$13(1/3,0,1/3,1/3),this._multiViewportInfo[6]=new n$13(0,0,1/3,1/3),this._multiViewportInfo[5]=new n$13(2/3,1/3,1/3,1/3),this._multiViewportInfo[4]=new n$13(1/3,1/3,1/3,1/3),this._multiViewportInfo[3]=new n$13(0,1/3,1/3,1/3),this._multiViewportInfo[2]=new n$13(2/3,2/3,1/3,1/3),this._multiViewportInfo[1]=new n$13(1/3,2/3,1/3,1/3),this._multiViewportInfo[0]=new n$13(0,2/3,1/3,1/3);break;default:throw new t$_("the mode is error")}e!==te$5.NONE&&this._multiViewportMode===te$5.NONE?(this._frameState.creditDisplay.container.style.visibility="hidden",!t$$(this._deviceOrientationCameraController)&&this._useWebVR&&(this._deviceOrientationCameraController=new m$i(this),this._aspectRatioVR=this._camera.frustum.aspectRatio)):e===te$5.NONE&&this._multiViewportMode!==te$5.NONE&&(this._frameState.creditDisplay.container.style.visibility="visible",this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this.camera.frustum.aspectRatio=this.drawingBufferWidth/this.drawingBufferHeight),this._multiViewportMode=e}},undergroundMode:{get:function(){return this._undergroundMode},set:function(e){t$$(e)&&(this._undergroundMode=e,this._underGlobe.show=e)}},underGlobe:{get:function(){return this._underGlobe}},undergroundDepth:{get:function(){return this._undergroundDepth},set:function(e){e!==this._undergroundDepth&&t$$(this._underGlobe)&&(this._underGlobe.underDepth=e),this._undergroundDepth=e}},lightSource:{get:function(){return this._lightSource}},cloudBox:{get:function(){return this._cloudBox},set:function(e){t$$(e)||t$$(this._cloudBox)&&this.cloudBox.remove(),this._cloudBox=e}},enableOcclude:{get:function(){return this._enableOcclude},set:function(e){this._enableOcclude=e}},bloomEffect:{get:function(){return this.compositor.bloomEffect}},scanEffect:{get:function(){return this.compositor.scanEffect}},depthOfFieldEffect:{get:function(){return this.compositor.depthOfFieldEffect}},ssaoEffect:{get:function(){return this.compositor.SSAOEffect}},colorCorrection:{get:function(){return this.compositor.colorCorrection}},hdrEnabled:{get:function(){return this._hdr},set:function(e){var t=this._context,i=e&&t.depthTexture&&(t.colorBufferFloat||t.colorBufferHalfFloat);this._hdrDirty=i!==this._hdr,this._hdr=i}},toneMappingEnabled:{get:function(){return this.compositor.toneMappingEnabled},set:function(e){return this.compositor.toneMappingEnabled=e}},pickPoint:{get:function(){return this._pos}},pickPointEnabled:{get:function(){return this._pickPointEnabled},set:function(e){this._pickPointEnabled=e;for(var t=0;t<this._layers._layerQueue.length;t++){var i={};i.layer=this._layers._layerQueue[t],i.layer instanceof _0x4ab4f4&&(e?i.layer.traverseRenderEntity(i,go):i.layer.traverseRenderEntity(i,vo))}}},pickPointInterval:{get:function(){return this._pickPointInterval},set:function(e){this._pickPointInterval=e}},pickPointTolerance:{get:function(){return this._pickPointTolerance},set:function(e){this._pickPointTolerance=e}},pickDepthTolerance:{get:function(){return this._pickDepthTolerance},set:function(e){this._pickDepthTolerance=e}},rasterVectorCollection:{get:function(){return this.globe._rasterVectorCollection}},walkingMode:{get:function(){return this._walkingMode},set:function(e){if(e!==this._walkingMode){this._walkingMode=e;var t=this._screenSpaceCameraController;t.previousHeight=void 0,e===si.ByKeyboard?(t.enableWalk=!0,t.enableLook=!1,this.mode===b$1d.SCENE3D?t.enableTranslate=!1:this.mode===b$1d.COLUMBUS_VIEW&&(t.enableTranslate=!0)):(t.enableWalk=!1,t.enableTranslate=!0,t.enableZoom=!0,t.enableTilt=!0,t.enableLook=!0)}}},enableOutline:{get:function(){var e=this.layers.getSelectedLayer();return!(!t$$(e)||e.getSelection().length<1)&&e.selectColorType===Ja.SILHOUETTE_EDGE}},maskEnabled:{get:function(){return this._maskEnabled}},lightGroup:{get:function(){return this._lightGroup},set:function(e){e!==this._lightGroup&&(this._lightGroup=e,Co(this,e))}},enableCompositor:{get:function(){return this._enableCompositor},set:function(e){n$1e.typeOf.bool("Scene.enableCompositor",e),this._enableCompositor=e}},overlapDisplayedThreshold:{get:function(){return this._overlapDisplayedThreshold},set:function(e){n$1e.typeOf.number("Scene.clusterRange",e),this._overlapDisplayedThreshold=e}},overlapDisplayOptions:{get:function(){return this._overlapDisplayOptions},set:function(e){n$1e.typeOf.object("Scene.overlapDisplayOptions",e),this._overlapDisplayOptions=e}}}),M$4.prototype.setVectorTilesLayersControl=function(e,t){this._mvtVisibleControl=e,this._mvtVisibleLevel=t},M$4.prototype.getCompressedTextureFormatSupported=function(e){var t=this.context;return("WEBGL_compressed_texture_s3tc"===e||"s3tc"===e)&&t.s3tc||("WEBGL_compressed_texture_pvrtc"===e||"pvrtc"===e)&&t.pvrtc||("WEBGL_compressed_texture_etc1"===e||"etc1"===e)&&t.etc1},M$4.prototype.updateDerivedCommands=function(e){if(t$$(e.derivedCommands)){var t=this._frameState,i=this._context,n=!1,r=t.shadowState.lastDirtyTime;e.lastDirtyTime!==r&&(e.lastDirtyTime=r,e.dirty=!0,n=!0);var o=t.useLogDepth,a=this._hdr,s=t.passes.normal,l=this._maskEnabled,u=e.derivedCommands,c=t$$(u.logDepth),h=t$$(u.hdr),d=t$$(u.normal),f=t$$(u.mask),p=t$$(u.originalCommand),_=o&&!c,m=a&&!h,$=s&&!d,g=l&&!f,y=!(o&&a||p);if(e.dirty=e.dirty||this._logDepthBufferDirty||this._hdrDirty||this._maskEnabled||_||m||y||g||$,e.dirty){e.dirty=!1;var v=t.shadowState.shadowMaps;t.shadowState.shadowsEnabled&&e.castShadows&&(u.shadows=O$g.createCastDerivedCommand(v,e,n,i,u.shadows)),(c||_)&&(u.logDepth=p$h.createLogDepthCommand(e,i,u.logDepth),fi(this,u.logDepth.command,n)),(p||y)&&fi(this,e,n)}}};var _o=new i$h({pass:_t$6.RENDER}),Sr=new i$h({pass:_t$6.PRELOAD}),xr=new i$h({pass:_t$6.PRELOAD_FLIGHT}),yo=new i$h({pass:_t$6.REQUEST_RENDER_MODE_DEFER_CHECK});new i$h({pass:_t$6.MOST_DETAILED_PRELOAD});var bo=new i$h({pass:_t$6.MOST_DETAILED_PICK}),Vr=new i$h({pass:_t$6.PICK}),hi=new c$19,Tr;function wo(e){var t=e.globe;if(e._mode===b$1d.SCENE3D&&t$$(t)&&t.show){var i=t.ellipsoid;return hi.radius=i.minimumRadius,Tr=h$U.fromBoundingSphere(hi,e.camera.positionWC,Tr)}}function Dr(e){e.render=!1,e.pick=!1,e.depth=!1,e.postProcess=!1,e.offscreen=!1,e.asynchronous=!1,e.fbo=!1,e.normal=!1}function pi(e,t,i){var n=e._frameState;n.frameNumber=t,n.time=o$10.clone(i,n.time)}function Co(e,t){for(var i=0;i<e._presetLightSource.length;i++)e.removeLightSource(e._presetLightSource[i]);if(e._presetLightSource.length=0,t===br.SUN_LIGHT)e.hdrEnabled=!1,e.sun.show=!0,e._lightSource.ambientLightColor=new e$1z(.76,.76,.76,1);else if(t===br.LIGHT_GROUP1){e.hdrEnabled=!1,e.sun.show=!1,e._lightSource.ambientLightColor=new e$1z(.5,.5,.5,1);var n=new _$k(new a$11.fromDegrees(116.191153,40.147532,450),{targetPosition:new a$11.fromDegrees(116.19106,40.147858,430),color:new e$1z(.9,.9,.9,1),intensity:.78});e.addLightSource(n),e._presetLightSource.push(n);var r=new _$k(new a$11.fromDegrees(116.192153,40.147432,490),{targetPosition:new a$11.fromDegrees(116.19106,40.147858,430),color:new e$1z(.9,.9,.9,1),intensity:.25});e.addLightSource(r),e._presetLightSource.push(r)}}function Le$1(e){var t=e.camera,i=e._frameState;i.commandList.length=0,i.shadowMaps.length=0,i.brdfLutGenerator=e._brdfLutGenerator,i.environmentMap=e.skyBox&&e.skyBox._cubeMap,i.mode=e._mode,i.morphTime=e.morphTime,i.mapProjection=e.mapProjection,i.camera=t,i.cullingVolume=t.frustum.computeCullingVolume(t.positionWC,t.directionWC,t.upWC,e.frustumTolerance),i.cullingVolume.enableFusion=t$$(e.context.curFusionViewMatrix),i.occluder=wo(e),i.terrainExaggeration=e._terrainExaggeration,i.minimumDisableDepthTestDistance=e._minimumDisableDepthTestDistance,i.invertClassification=e.invertClassification,i.useLogDepth=e._logDepthBuffer&&!(e.camera.frustum instanceof r$K||e.camera.frustum instanceof l$W),i.sunColor=e._sunColor,e._lightSource.sunLightON=t$$(e.sun)&&e.sun.show,i.lightSource=e._lightSource,i.useBloom=e._environmentState.usePostProcess&&(e.postProcessStages.bloom.enabled||e.compositor.isBloomEnable()),i.shadowDarkness=e.shadowMap.darkness,i.toneMappingExposure=e.toneMappingExposure,t$$(e._specularEnvironmentMapAtlas)&&e._specularEnvironmentMapAtlas.ready?(i.specularEnvironmentMaps=e._specularEnvironmentMapAtlas.texture,i.specularEnvironmentMapsMaximumLOD=e._specularEnvironmentMapAtlas.maximumMipmapLevel):(i.specularEnvironmentMaps=void 0,i.specularEnvironmentMapsMaximumLOD=void 0),t$$(e._pmremGenerator)&&e._pmremGenerator.ready&&(i.hdrEnvMap=e._pmremGenerator.texture),i.sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,e._actualInvertClassificationColor=e$1z.clone(e.invertClassificationColor,e._actualInvertClassificationColor),r$a.isTranslucencySupported(e._context)||(e._actualInvertClassificationColor.alpha=1),i.invertClassificationColor=e._actualInvertClassificationColor,t$$(e.globe)?i.maximumScreenSpaceError=e.globe.maximumScreenSpaceError:i.maximumScreenSpaceError=2,Dr(i.passes),i.tilesetPassState=void 0,i.pbrMaterialsArr=e._pbrMaterlParameters,e.context._trangleCount=0}M$4.prototype.updateFrameState=function(){return Le$1(this)};var gi=new i$_;function So(e){var t={},i=e.vertexAttributes;for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n].index);return t}function xo(e,t,i){var n=t.context,r=e$1Y(i,e.shaderProgram),o=r.fragmentShaderSource.clone(),a=[];o.sources=o.sources.map((function(e){e=a$O.replaceMain(e,"czm_Debug_main");for(var t,i=/gl_FragData\[(\d+)\]/g;null!==(t=i.exec(e));)-1===a.indexOf(t[1])&&a.push(t[1]);return e}));var s,l=a.length,u="void main() \n{ \n czm_Debug_main(); \n";if(t.debugShowCommands){t$$(e._debugColor)||(e._debugColor=e$1z.fromRandom());var c=e._debugColor;if(l>0)for(s=0;s<l;++s)u+=" gl_FragData["+a[s]+"].rgb *= vec3("+c.red+", "+c.green+", "+c.blue+"); \n";else u+=" gl_FragColor.rgb *= vec3("+c.red+", "+c.green+", "+c.blue+"); \n"}if(t.debugShowFrustums){var h=1&e.debugOverlappingFrustums?"1.0":"0.0",d=2&e.debugOverlappingFrustums?"1.0":"0.0",f=4&e.debugOverlappingFrustums?"1.0":"0.0";if(l>0)for(s=0;s<l;++s)u+=" gl_FragData["+a[s]+"].rgb *= vec3("+h+", "+d+", "+f+"); \n";else u+=" gl_FragColor.rgb *= vec3("+h+", "+d+", "+f+"); \n"}u+="}",o.sources.push(u);var p=So(r);return p$15.fromCache({context:n,vertexShaderSource:r.vertexShaderSource,fragmentShaderSource:o,attributeLocations:p})}function Vo(e,t,i){var n=s$1d.shallowClone(e);n.shaderProgram=xo(e,t),n.execute(t.context,i),n.shaderProgram.destroy()}M$4.prototype.isVisible=function(e,t,i){return t$$(e)&&(!t$$(e.boundingVolume)||!e.cull||t.computeVisibility(e.boundingVolume)!==cr$4.OUTSIDE&&(!t$$(i)||!(e.occlude&&!this._undergroundMode)||!e.boundingVolume.isOccluded(i)))};var $t=new c$1a(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);function To(e,t,i,n){var r=t._frameState,o=r.context,a=e.boundingVolume;t$$(t._debugVolume)&&t._debugVolume.destroy();var s,l=a$11.clone(a.center);if(r.mode!==b$1d.SCENE3D){l=c$1a.multiplyByPoint($t,l,l);var u=r.mapProjection,c=u.unproject(l);l=u.ellipsoid.cartographicToCartesian(c)}if(t$$(a.radius)){var h=a.radius;s=F$W.toWireframe(b$18.createGeometry(new b$18({radii:new a$11(h,h,h),vertexFormat:r$u.FLAT_VERTEX_FORMAT}))),t._debugVolume=new y$H({geometryInstances:new m$P({geometry:s,modelMatrix:c$1a.fromTranslation(l),attributes:{color:new r$I(1,0,0,1)}}),appearance:new r$u({flat:!0,translucent:!1}),asynchronous:!1})}else{var d=a.halfAxes;s=F$W.toWireframe(c$Z.createGeometry(c$Z.fromDimensions({dimensions:new a$11(2,2,2),vertexFormat:r$u.FLAT_VERTEX_FORMAT}))),t._debugVolume=new y$H({geometryInstances:new m$P({geometry:s,modelMatrix:c$1a.fromRotationTranslation(d,l,new c$1a),attributes:{color:new r$I(1,0,0,1)}}),appearance:new r$u({flat:!0,translucent:!1}),asynchronous:!1})}var f,p=r.commandList,_=r.commandList=[];(t._debugVolume.update(r),e=_[0],r.useLogDepth)&&(e=p$h.createLogDepthCommand(e,o).command);t$$(n)&&(f=i.framebuffer,i.framebuffer=n),e.execute(o,i),t$$(f)&&(i.framebuffer=f),r.commandList=p}function ae$2(e,t,i,n,r){var o=t._frameState,a=o.passes;if(!t$$(t.debugCommandFilter)||t.debugCommandFilter(e)){if(e instanceof r$M)return void e.execute(i,n);if(!t$$(e.owner)||"function"!=typeof e.owner.isDestroyed||!e.owner.isDestroyed()){if(e.debugShowBoundingVolume&&t$$(e.boundingVolume)&&To(e,t,n,r),o.useLogDepth&&t$$(e.derivedCommands)&&t$$(e.derivedCommands.logDepth)&&(e=e.derivedCommands.logDepth.command),!a.pick&&t._hdr&&t$$(e.derivedCommands)&&t$$(e.derivedCommands.hdr)&&(e=e.derivedCommands.hdr.command),!a.pick&&t.maskEnabled&&t$$(e.derivedCommands)&&t$$(e.derivedCommands.mask)&&(e=e.derivedCommands.mask.command),a.pick&&a.normal){if(!t$$(e.derivedCommands))return;return void(e=e.derivedCommands.normal.command).execute(i,n)}if(a.pick||a.depth){if(!t$$(e.derivedCommands))return;if(a.pick&&!a.depth&&t$$(e.derivedCommands.picking))return void(e=e.derivedCommands.picking.pickCommand).execute(i,n);if(a.depth&&t$$(e.derivedCommands.depth)){if(e.pass===we$l.ANALYSIS||!e.renderState.depthTest.enabled)return;return void(e=e.derivedCommands.depth.depthOnlyCommand).execute(i,n)}}if(t.debugShowCommands||t.debugShowFrustums)return void Vo(e,t,n);o.shadowState.lightShadowsEnabled&&e.receiveShadows&&t$$(e.derivedCommands.shadows)?e.derivedCommands.shadows.receiveCommand.execute(i,n):e.execute(i,n)}}}function er(e,t,i,n){var r=t._frameState,o=e.derivedCommands;!t$$(o)||(r.useLogDepth&&t$$(o.logDepth)&&(e=o.logDepth.command),t$$((o=e.derivedCommands).picking)?(e=o.picking.pickCommand).execute(i,n):t$$(o.depth)&&(e=o.depth.depthOnlyCommand).execute(i,n))}function Do(e,t,i){return t.boundingVolume.distanceSquaredTo(i)-e.boundingVolume.distanceSquaredTo(i)}function Eo(e,t,i){return e.boundingVolume.distanceSquaredTo(i)-t.boundingVolume.distanceSquaredTo(i)+n$1d.EPSILON12}function No(e,t,i,n,r){var o=e.context;q$_(n,Do,e.camera.positionWC),t$$(r)&&t(r.unclassifiedCommand,e,o,i);for(var a=n.length,s=0;s<a;++s)t(n[s],e,o,i)}function Po(e,t,i,n,r){var o=e.context;q$_(n,Eo,e.camera.positionWC),t$$(r)&&t(r.unclassifiedCommand,e,o,i);for(var a=n.length,s=e.frameState.passes,l=0;l<a;++l)s.pick&&s.depth&&n[l].owner instanceof O$t||s.pick&&!t$$(n[l].pickId)&&!s.depth||t(n[l],e,o,i)}function vi(e,t){var i=e._view.debugGlobeDepths,n=i[t];return!t$$(n)&&e.context.depthTexture&&(n=new f$g,i[t]=n),n}function Ro(e,t,i,n,r){var o=e.context,a=e._frameState.passes,s=e._environmentState,l=r.length,u=a.pick,c=a.depth;a.pick=!0,a.depth=!0;var h,d=0;for(h=0;h<l;++h){(_=r[h]).opaquePass===we$l.GLOBE&&(ae$2(_,e,o,t),d++)}if(d>0){t$$(i)&&s.useGlobeDepthFramebuffer&&i.executeUpdateDepth(o,t,!0);var f=n.commands[we$l.TERRAIN_CLASSIFICATION],p=n.indices[we$l.TERRAIN_CLASSIFICATION];for(h=0;h<p;++h)ae$2(f[h],e,o,t)}for(d=0,h=0;h<l;++h){var _;(_=r[h]).opaquePass===we$l.S3MTiles&&(ae$2(_,e,o,t),d++)}if(d>0){t$$(i)&&s.useGlobeDepthFramebuffer&&i.executeUpdateDepth(o,t,!0);f=n.commands[we$l.ClampObject],p=n.indices[we$l.ClampObject];for(h=0;h<p;++h)ae$2(f[h],e,o,t)}a.pick=u,a.depth=c}$t=c$1a.inverseTransformation($t,$t);var tr=new f$V,rr=new l$V,ir=new r$K,ar=new l$W;function Er(e,t){var i,n=e.camera,r=e.context,o=r.uniformState;o.updateCamera(n),i=t$$(n.frustum.fov)?n.frustum.clone(tr):t$$(n.frustum.infiniteProjectionMatrix)?n.frustum.clone(rr):t$$(n.frustum.width)?n.frustum.clone(ir):n.frustum.clone(ar);var a=e._layers,s=e._frameState;a.render(r,s),e._plotLayers.render(s,r),i.near=n.frustum.near,i.far=n.frustum.far;var l=i.reflect;i.reflect=!1,o.updateFrustum(i),o.updatePass(we$l.ENVIRONMENT);var u,c=e._frameState.passes,h=c.pick,d=e._environmentState,f=e._view,p=d.renderTranslucentDepthForPick,_=d.useWebVR,m=e._environmentVisible;if(!h){var $=d.skyBoxCommand;if(t$$($)&&m.isSkyBoxVisible&&ae$2($,e,r,t),d.isSkyAtmosphereVisible&&m.isSkyAtmosphereVisible&&ae$2(d.skyAtmosphereCommand,e,r,t),d.isUnderGlobeVisible&&m.isUnderGlobeVisible&&d.underGlobeCommand.execute(r,t),d.isSunVisible&&m.isSunVisible&&!c.fbo&&(d.sunDrawCommand.execute(r,t),e.sunBloom&&!_)){var g;g=d.useGlobeDepthFramebuffer?f.globeDepth.framebuffer:d.usePostProcess?f.sceneFramebuffer.getFramebuffer():d.originalFramebuffer;var y=e._multiViewportMode!==te$5.NONE;e._sunPostProcess.execute(r),e._sunPostProcess.copy(r,g,y?t:void 0),t.framebuffer=g}d.isMoonVisible&&m.isMoonVisible&&d.moonCommand.execute(r,t),s.cullingVolume}i.reflect=l,d.useOIT?(t$$(e._executeOITFunction)||(e._executeOITFunction=function(e,t,i,n,r){f.oit.executeCommands(e,t,i,n,r)}),u=e._executeOITFunction):u=c.render?No:Po;var v,x=d.clearGlobeDepth,b=d.useDepthPlane,S=e._depthClearCommand,w=e._clearColorCommand,C=e._stencilClearCommand,T=e._classificationStencilClearCommand,P=e._depthPlane,E=d.usePostProcessSelected,A=n.position.z,L=f.frustumCommandsList,M=L.length;0===M&&t$$(f.globeDepth)&&d.useGlobeDepthFramebuffer&&f.globeDepth.executeCopyDepth(r,t);for(var I=0;I<M;++I){var O=M-I-1,D=L[O];e.mode===b$1d.SCENE2D?(n.position.z=A-D.near+1,i.far=Math.max(1,D.far-D.near),i.near=1,o.update(e.frameState),o.updateFrustum(i)):((!c.fbo||!r.depthTexture)&&(i.near=0!==O?D.near*e.opaqueFrustumNearOffset:D.near,i.far=D.far),e.logarithmicDepthBuffer&&n._positionCartographic.height>1e5&&i.near<10&&(i.near*=1e4),o.updateFrustum(i)),Qn(e,r,s);var R,N,F=e.debugShowGlobeDepth?vi(e,O):f.globeDepth;if(e.debugShowGlobeDepth&&t$$(F)&&d.useGlobeDepthFramebuffer&&(F.update(r,t,f.viewport),F.clear(r,t,e._clearColorCommand.color),R=t.framebuffer,t.framebuffer=F.framebuffer),S.execute(r,t),c.depth&&!r.depthTexture&&w.execute(r,t),r.stencilBuffer&&C.execute(r,t),m.isGlobalVisible){o.updatePass(we$l.GLOBE),N=D.commands[we$l.GLOBE];var B=D.indices[we$l.GLOBE];for(v=0;v<B;++v)ae$2(N[v],e,r,t);for(t$$(F)&&d.useGlobeDepthFramebuffer&&F.executeCopyDepth(r,t),e.debugShowGlobeDepth&&t$$(F)&&d.useGlobeDepthFramebuffer&&(t.framebuffer=R),o.updatePass(we$l.TERRAIN_CLASSIFICATION),N=D.commands[we$l.TERRAIN_CLASSIFICATION],B=D.indices[we$l.TERRAIN_CLASSIFICATION],v=0;v<B;++v)ae$2(N[v],e,r,t);x&&(S.execute(r,t),b&&P.execute(r,t)),m.isObjectVisible||F.copyFromRenderbufferToTexture(r,!0,!1,!1)}if(!d.useInvertClassification||h){for(o.updatePass(we$l.CESIUM_3D_TILE),N=D.commands[we$l.CESIUM_3D_TILE],B=D.indices[we$l.CESIUM_3D_TILE],v=0;v<B;++v)ae$2(N[v],e,r,t);if(B>0)for(t$$(F)&&d.useGlobeDepthFramebuffer&&F.executeUpdateDepth(r,t,x),o.updatePass(we$l.CESIUM_3D_TILE_CLASSIFICATION),N=D.commands[we$l.CESIUM_3D_TILE_CLASSIFICATION],B=D.indices[we$l.CESIUM_3D_TILE_CLASSIFICATION],v=0;v<B;++v)ae$2(N[v],e,r,t)}else{e._invertClassification.clear(r,t);var z=t.framebuffer;for(t.framebuffer=e._invertClassification._fbo,o.updatePass(we$l.CESIUM_3D_TILE),N=D.commands[we$l.CESIUM_3D_TILE],B=D.indices[we$l.CESIUM_3D_TILE],v=0;v<B;++v)ae$2(N[v],e,r,t);for(t$$(F)&&d.useGlobeDepthFramebuffer&&F.executeUpdateDepth(r,t,x),o.updatePass(we$l.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW),N=D.commands[we$l.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW],B=D.indices[we$l.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW],v=0;v<B;++v)ae$2(N[v],e,r,t);for(t.framebuffer=z,e._invertClassification.executeClassified(r,t),1===e.frameState.invertClassificationColor.alpha&&e._invertClassification.executeUnclassified(r,t),B>0&&r.stencilBuffer&&T.execute(r,t),o.updatePass(we$l.CESIUM_3D_TILE_CLASSIFICATION),N=D.commands[we$l.CESIUM_3D_TILE_CLASSIFICATION],B=D.indices[we$l.CESIUM_3D_TILE_CLASSIFICATION],v=0;v<B;++v)ae$2(N[v],e,r,t)}if(B>0&&r.stencilBuffer&&C.execute(r,t),m.isObjectVisible){var G,k=we$l.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW+1,U=we$l.OPAQUE;m.isOnlyS3MObjectVisible&&(k=we$l.S3MTiles,U=we$l.S3MTilesClampObjectColor);for(var V=k;V<=U;++V)if(o.updatePass(V),N=D.commands[V],B=D.indices[V],!s.passes.pick&&!s.passes.depth||V!==we$l.ProjectionImage)for(V===we$l.ProjectionImage&&B>0&&t$$(F)&&d.useGlobeDepthFramebuffer&&F.executeUpdateDepth(r,t,x),V===we$l.S3MTilesClampObjectColor&&B>0&&t$$(F)&&d.useGlobeDepthFramebuffer&&F.executeUpdateDepth(r,t,x),v=0;v<B;++v)ae$2(N[v],e,r,t);if(t$$(F)&&d.useGlobeDepthFramebuffer&&F.executeUpdateDepth(r,t,x),!i.reflect)for(o.updatePass(we$l.ClampObject),N=D.commands[we$l.ClampObject],B=D.indices[we$l.ClampObject],v=0;v<B;++v)ae$2(N[v],e,r,t);for(o.updatePass(we$l.NonClampObject),N=D.commands[we$l.NonClampObject],B=D.indices[we$l.NonClampObject],v=0;v<B;++v)ae$2(N[v],e,r,t);if(B>0&&t$$(F)&&d.useGlobeDepthFramebuffer&&F.executeUpdateDepth(r,t,x),m.isBillboardVisible&&(!h||!c.depth))for(o.updatePass(we$l.Label_Billboard),N=D.commands[we$l.Label_Billboard],B=D.indices[we$l.Label_Billboard],v=0;v<B;++v)ae$2(N[v],e,r,t);for(o.updatePass(we$l.Voxel_Billboard),N=D.commands[we$l.Voxel_Billboard],B=D.indices[we$l.Voxel_Billboard],v=0;v<B;++v)ae$2(N[v],e,r,t);if(o.updatePass(we$l.Particle),N=D.commands[we$l.Particle],(B=D.indices[we$l.Particle])>0)if(h){if(!c.depth)for(v=0;v<B;++v)ae$2(N[v],e,r,t)}else e.particlePostRender.executeCommand(e,ae$2,t,N,B);for(0!==O&&e.mode!==b$1d.SCENE2D&&(i.near=D.near,o.updateFrustum(i)),!h&&d.useInvertClassification&&e.frameState.invertClassificationColor.alpha<1&&(G=e._invertClassification),d.useOIT&&F.copyFromRenderbufferToTexture(r,!0,!0,!1),(c.pick&&c.normal||!m.isOnlyS3MObjectVisible||"sqResultTexture"===s._fboState.name)&&(o.updatePass(we$l.TRANSLUCENT),(N=D.commands[we$l.TRANSLUCENT]).length=D.indices[we$l.TRANSLUCENT],"sqResultTexture"===s._fboState.name&&(N=N.filter((function(e){return"sqResultTexture"===e.owner}))),u(e,ae$2,t,N,G),N.length>0&&Ro(e,t,F,D,N)),o.updatePass(we$l.ANALYSIS),N=D.commands[we$l.ANALYSIS],B=D.indices[we$l.ANALYSIS],v=0;v<B;++v)ae$2(N[v],e,r,t);(B>0||!d.useOIT)&&t$$(F)&&F.copyFromRenderbufferToTexture(r,!0,!1,!1)}if(!c.fbo)if(r.depthTexture&&e.useDepthPicking&&(d.useGlobeDepthFramebuffer||p))t$$(H=p?t.framebuffer.depthStencilTexture:F.depthStencilTexture)||(H=F.depthStencilTexture),(W=e._picking.getPickDepth(e,O)).update(r,H),W.executeCopyDepth(r,t);else if(t$$(t.framebuffer)&&t$$(t.framebuffer._colorTextures[0])){var W,H=t.framebuffer._colorTextures[0];(W=e._picking.getPickDepth(e,O)).update(r,H),W.executeCopyDepth(r,t)}if(!h&&E){var Y=t.framebuffer;for(t.framebuffer=f.sceneFramebuffer.getIdFramebuffer(),i.near=0!==O?D.near*e.opaqueFrustumNearOffset:D.near,i.far=D.far,o.updateFrustum(i),o.updatePass(we$l.GLOBE),N=D.commands[we$l.GLOBE],B=D.indices[we$l.GLOBE],v=0;v<B;++v)er(N[v],e,r,t);for(x&&(S.framebuffer=t.framebuffer,S.execute(r,t),S.framebuffer=void 0),x&&b&&P.execute(r,t),o.updatePass(we$l.CESIUM_3D_TILE),N=D.commands[we$l.CESIUM_3D_TILE],B=D.indices[we$l.CESIUM_3D_TILE],v=0;v<B;++v)er(N[v],e,r,t);for(o.updatePass(we$l.OPAQUE),N=D.commands[we$l.OPAQUE],B=D.indices[we$l.OPAQUE],v=0;v<B;++v)er(N[v],e,r,t);for(o.updatePass(we$l.TRANSLUCENT),N=D.commands[we$l.TRANSLUCENT],B=D.indices[we$l.TRANSLUCENT],v=0;v<B;++v)er(N[v],e,r,t);t.framebuffer=Y}}}function _i(e){e.context.uniformState.updatePass(we$l.COMPUTE);var t=e._environmentState.sunComputeCommand;t$$(t)&&t.execute(e._computeEngine);for(var i=e._computeCommandList,n=i.length,r=0;r<n;++r)i[r].execute(e._computeEngine)}function yi(e,t){var i=e.context,n=e._frameState.passes,r=e._view.globeDepth,o=e._environmentState,a=o.renderTranslucentDepthForPick,s=e._logDepthOverlayCommandList,l=s.length;if(l>0)for(var u=0;u<l;++u){var c=s[u];(n=e._frameState.passes).pick||n.depth?ae$2(s[u],e,i,t):(c=c.derivedCommands.logDepth.command).execute(i,t)}l=(s=e._overlayCommandList).length;for(u=0;u<l;++u){c=s[u];(n=e._frameState.passes).pick||n.depth?ae$2(s[u],e,i,t):c.execute(i,t)}if(!n.fbo&&i.depthTexture&&e.useDepthPicking&&(o.useGlobeDepthFramebuffer||a)){var h=a?t.framebuffer.depthStencilTexture:r.depthStencilTexture;t$$(h)||(h=r.depthStencilTexture);var d=e._picking.getPickDepth(e,0);d.update(i,h),d.executeCopyDepth(i,t)}if((l=(s=e._overlayAgainstDepthCommandList).length)>0){e._depthClearCommand.execute(e._context,t);for(u=0;u<l;++u)if(e.frameState.passes.pick){(c=e._hdr&&e.logarithmicDepthBuffer?s[u].derivedCommands.logDepth.command.derivedCommands.picking.pickCommand:s[u].derivedCommands.picking.pickCommand).execute(e._context,t)}else s[u].execute(i,t)}}function Nr(e,t){var i=e.context.uniformState;i.updatePass(we$l.OVERLAY);var n=e.context,r=e._frameState,o=e._view,a=o.viewport;if(a.x=0,a.y=0,a.width=n.drawingBufferWidth,a.height=n.drawingBufferHeight,t.viewport=n$13.clone(a,t.viewport),e._multiViewportMode===te$5.NONE)yi(e,t);else{for(var s=0;s<e._multiViewportInfo.length;s++)if(!r.passes.pick||e._frameState.multiViewportIndex===s){r.multiViewportIndex=s;var l=e._multiViewportInfo[s];a.x=n.drawingBufferWidth*l.x,a.y=n.drawingBufferHeight*l.y,a.width=n.drawingBufferWidth*l.width,a.height=n.drawingBufferHeight*l.height,r.camera.frustum.aspectRatio=a.width/a.height,r.passes.pick&&(a.x=0,a.y=0,a.width=n.drawingBufferWidth,a.height=n.drawingBufferHeight),t.viewport=n$13.clone(a),i.update(r),r.commandList.length=0,e._logDepthOverlayCommandList.length=0,e._overlayCommandList.length=0,e._overlayAgainstDepthCommandList.length=0,Pr(e,!1),o.createPotentiallyVisibleSet(e),yi(e,t)}a.x=0,a.y=0,a.width=n.drawingBufferWidth,a.height=n.drawingBufferHeight,t.viewport=n$13.clone(a)}}function ko$1(e,t,i){for(var n=i.shadowMapCullingVolume,r=i.isPointLight,o=i.passes,a=o.length,s=t.length,l=0;l<s;++l){var u=t[l];if(e.updateDerivedCommands(u),u.castShadows&&(u.pass===we$l.GLOBE||u.pass===we$l.CESIUM_3D_TILE||u.pass>=we$l.S3MTiles&&u.pass<=we$l.TRANSLUCENT)&&e.isVisible(u,n))if(r)for(var c=0;c<a;++c)o[c].commandList.push(u);else if(1===a)o[0].commandList.push(u);else for(var h=!1,d=a-1;d>=0;--d){var f=o[d].cullingVolume;if(e.isVisible(u,f))o[d].commandList.push(u),h=!0;else if(h)break}}}function bi(e){var t=e.frameState,i=t.shadowState.shadowMaps,n=i.length;if(t.shadowState.shadowsEnabled)for(var r=e.context,o=r.uniformState,a=0;a<n;++a){var s=i[a];if(!s.outOfView){var l,u=s.passes,c=u.length;for(l=0;l<c;++l)u[l].commandList.length=0;for(ko$1(e,e.frameState.commandList,s),l=0;l<c;++l){var h=s.passes[l];o.updateCamera(h.camera),s.updatePass(r,l);for(var d=h.commandList.length,f=0;f<d;++f){var p=h.commandList[f];o.updatePass(p.pass),ae$2(p.derivedCommands.shadows.castCommands[a],e,r,h.passState)}}}}}var Io=new a$11;function je(e,t,i,n){var r=e._context,o=r.uniformState,a=t.viewport;a.x=0,a.y=0,a.width=r.drawingBufferWidth,a.height=r.drawingBufferHeight;var s=e._frameState,l=s.camera,u=s.mode,c=(d=s.passes).pick;if(e._useWebVR&&u!==b$1d.SCENE2D)Fo(e,t,i);else if(s._fboState.enabled||e._multiViewportMode===te$5.NONE)or(e,t,i),u!==b$1d.SCENE2D||e._mapMode2D===Zr.ROTATE?Qe(!0,e,t):Go(e,t);else{or(e,t,i);for(var h=0;h<e._multiViewportInfo.length;h++)if(!c||e._frameState.multiViewportIndex===h){c=(d=e._frameState.passes).pick,n=d.fbo;var d,f=e._environmentState.useWebVR;e._environmentState.isSunVisible&&e.sunBloom&&!f&&!n&&(t.framebuffer=e._sunPostProcess._sceneFramebuffer.getFramebuffer());var p=e._multiViewportInfo[h];a.x=r.drawingBufferWidth*p.x,a.y=r.drawingBufferHeight*p.y,a.width=r.drawingBufferWidth*p.width,a.height=r.drawingBufferHeight*p.height,l.frustum.aspectRatio=a.width/a.height,c&&(a.x=0,a.y=0,a.width=r.drawingBufferWidth,a.height=r.drawingBufferHeight),o.update(s),e._frameState.multiViewportIndex=h,s.cullingVolume=s.camera.frustum.computeCullingVolume(s.camera.positionWC,s.camera.directionWC,s.camera.upWC),s.commandListRealtimeRaster.length=0,Qe(0==h||c,e,t)}}}function Fo(e,t,i){var n=e._view,r=n.camera,o=e._environmentState.renderTranslucentDepthForPick;or(e,t,i),o||Pr(e),n.createPotentiallyVisibleSet(e),o||(_i(e),bi(e));var a=t.viewport;a.x=0,a.y=0,a.width=.5*a.width;var s=p$m.clone(r,e._cameraVR);s.frustum=r.frustum;var l=r.frustum.near,u=l*e$1Y(e.focalLength,5),c=e$1Y(e.eyeSeparation,u/30),h=a$11.multiplyByScalar(s.right,.5*c,Io);r.frustum.aspectRatio=a.width/a.height;var d=.5*c*l/u;a$11.add(s.position,h,r.position),r.frustum.xOffset=d,Er(e,t),a.x=a.width,a$11.subtract(s.position,h,r.position),r.frustum.xOffset=-d,Er(e,t),p$m.clone(s,r)}M$4.prototype.updateAndExecuteCommands=function(e,t,i){return je(this,e,t,i)};var Lo=new i$1g(Math.PI,n$1d.PI_OVER_TWO),Mo=new a$11,Oo=new a$11,qo=new c$1a,Bo=new c$1a,Ao=new a$11,Wo=new a$11,Ho=new n$13;function Go(e,t){var i=e.context,n=e.frameState,r=e.camera,o=t.viewport,a=n$13.clone(o,Ho);t.viewport=a;var s=Lo,l=Mo;e.mapProjection.project(s,l);var u=a$11.clone(r.position,Oo),c=c$1a.clone(r.transform,Bo),h=r.frustum.clone();r._setTransform(c$1a.IDENTITY);var d=c$1a.computeViewportTransformation(a,0,1,qo),f=r.frustum.projectionMatrix,p=r.positionWC.y,_=a$11.fromElements(n$1d.sign(p)*l.x-p,0,-r.positionWC.x,Ao),m=m$13.pointToGLWindowCoordinates(f,d,_,Wo);m.x=Math.floor(m.x);var $=a.x,g=a.width;if(0===p||m.x<=$||m.x>=$+g)Qe(!0,e,t);else if(Math.abs($+.5*g-m.x)<1)a.width=m.x-a.x,r.position.x*=n$1d.sign(r.position.x),r.frustum.right=0,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),Qe(!0,e,t),a.x=m.x,r.position.x=-r.position.x,r.frustum.right=-r.frustum.left,r.frustum.left=0,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),Qe(!1,e,t);else if(m.x>$+.5*g){a.width=m.x-$;var y=r.frustum.right;r.frustum.right=l.x-p,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),Qe(!0,e,t),a.x=m.x,a.width=$+g-m.x,r.position.x=-r.position.x,r.frustum.left=-r.frustum.right,r.frustum.right=y-2*r.frustum.right,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),Qe(!1,e,t)}else{a.x=m.x,a.width=$+g-m.x;var v=r.frustum.left;r.frustum.left=-l.x-p,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),Qe(!0,e,t),a.x=$,a.width=m.x-$,r.position.x=-r.position.x,r.frustum.right=-r.frustum.left,r.frustum.left=v-2*r.frustum.left,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),Qe(!1,e,t)}r._setTransform(c),a$11.clone(u,r.position),r.frustum=h.clone(),t.viewport=o}function Qe(e,t,i,n){var r=t._environmentState,o=t._view,a=r.renderTranslucentDepthForPick;!e&&!a&&(t.frameState.commandList.length=0),(!a||t._frameState.multiViewportIndex>-1)&&Pr(t,e),o.createPotentiallyVisibleSet(t),e&&(t$$(n)&&or(t,i,n),a||(_i(t),bi(t))),Er(t,i)}var Uo=/(\.hdr$)/i;function De$2(e){var t=e._frameState,i=e._view,n=e._environmentState,r=t.passes.render,o=t.passes.offscreen,a=e.skyAtmosphere,s=e.globe;if(!r||e._mode!==b$1d.SCENE2D&&i.camera.frustum instanceof r$K)n.skyAtmosphereCommand=void 0,n.skyBoxCommand=void 0,n.sunDrawCommand=void 0,n.sunComputeCommand=void 0,n.moonCommand=void 0;else{t$$(a)&&t$$(s)&&(a.setDynamicAtmosphereColor(s.enableLighting),n.isReadyForAtmosphere=n.isReadyForAtmosphere||s._surface._tilesToRender.length>0),n.skyAtmosphereCommand=t$$(a)?a.update(t):void 0,n.skyBoxCommand=t$$(e.skyBox)?e.skyBox.update(t,e._hdr):void 0;var l=t$$(e.sun)?e.sun.update(t,i.passState,e._hdr):void 0;n.sunDrawCommand=t$$(l)?l.drawCommand:void 0,n.sunComputeCommand=t$$(l)?l.computeCommand:void 0,n.moonCommand=t$$(e.moon)?e.moon.update(t):void 0,n.underGlobeCommand=void 0,t$$(e._underGlobe)&&(e.globe&&e.globe.globeAlpha<1&&(e._underGlobe.show=!0),n.underGlobeCommand=e._underGlobe.update(t)),t$$(e.cloudBox)&&e.cloudBox.update(t)}var u=n.clearGlobeDepth=t$$(s)&&(!s.depthTestAgainstTerrain||e.mode===b$1d.SCENE2D);(n.useDepthPlane=u&&e.mode===b$1d.SCENE3D)&&e._depthPlane.update(t),n.renderTranslucentDepthForPick=!1,n.useWebVR=e._useWebVR&&e.mode!==b$1d.SCENE2D&&!o;for(var c=t.mode===b$1d.SCENE3D?t.occluder:void 0,h=t.cullingVolume,d=gi.planes,f=0;f<5;++f)d[f]=h.planes[f];h=gi,n.isSkyAtmosphereVisible=t$$(n.skyAtmosphereCommand)&&n.isReadyForAtmosphere,n.isSunVisible=e.isVisible(n.sunDrawCommand,h,c),n.isMoonVisible=e.isVisible(n.moonCommand,h,c),n.isUnderGlobeVisible=(e.undergroundMode||e._underGlobe.show)&&t$$(n.underGlobeCommand);var p=e.specularEnvironmentMaps,_=e._specularEnvironmentMapAtlas;t$$(p)?Uo.test(p)?t$$(e._pmremGenerator)||(e._pmremGenerator=new A$b(p)):(!t$$(_)||_.url!==p)&&(_=_&&_.destroy(),e._specularEnvironmentMapAtlas=new n$E(p)):t$$(_)?(_.destroy(),e._specularEnvironmentMapAtlas=void 0):t$$(e._pmremGenerator)&&(e._pmremGenerator=e._pmremGenerator.destroy()),t$$(e._specularEnvironmentMapAtlas)&&e._specularEnvironmentMapAtlas.update(t),t$$(e._pmremGenerator)&&e._pmremGenerator.update(t)}function jo(e){var t=e._frameState;e.debugShowFrustumPlanes!==e._debugShowFrustumPlanes&&(e.debugShowFrustumPlanes?e._debugFrustumPlanes=new u$k({camera:e.camera,updateOnChange:!1}):e._debugFrustumPlanes=e._debugFrustumPlanes&&e._debugFrustumPlanes.destroy(),e._debugShowFrustumPlanes=e.debugShowFrustumPlanes),t$$(e._debugFrustumPlanes)&&e._debugFrustumPlanes.update(t)}function zo(e){var t=e._frameState,i=t.shadowMaps,n=i.length,r=n>0&&!t.passes.pick&&e.mode===b$1d.SCENE3D;if(r!==t.shadowState.shadowsEnabled&&(++t.shadowState.lastDirtyTime,t.shadowState.shadowsEnabled=r),t.shadowState.lightShadowsEnabled=!1,r){for(var o=0;o<n;++o)if(i[o]!==t.shadowState.shadowMaps[o]){++t.shadowState.lastDirtyTime;break}t.shadowState.shadowMaps.length=0,t.shadowState.lightShadowMaps.length=0;for(var a=0;a<n;++a){var s=i[a];s.update(t),t.shadowState.shadowMaps.push(s),s.fromLightSource&&(t.shadowState.lightShadowMaps.push(s),t.shadowState.lightShadowsEnabled=!0),s.dirty&&(++t.shadowState.lastDirtyTime,s.dirty=!1)}}}function Pr(e,t){var i=e._frameState,n=e._context,r=i.commandList;e._groundPrimitives.update(i),e._primitives.update(i),jo(e),t&&zo(e);var o=e.layers.update(n,i,r,!0);if(i.rasterLayerIds=o,e.layers.update(n,i,r),e.layers.updateTextVisible(n,i),e._globe){for(var a in e._vectorTileSource._hash){(s=e._vectorTileSource.get(a))instanceof M$10&&s.resetVisible()}e._globe.render(i)}for(var a in i.rasterLayerIds=void 0,e._analyst3D.update(n,i,r),e._vectorTileMaps.update(n,i,r),e._plotLayers.update(i,n,r),e._vectorTileSource._hash){var s;(s=e._vectorTileSource.get(a)).update(n,i,r)}}function Xo(e,t){for(var i=e._context,n=e._frameState,r=e._view.camera,o=0,a=e._layers.layerQueue.length;o<a;o++){var s=e._layers.layerQueue[o];if("FieldLayer3D"===s._type)(c=s._particleVelocityFieldEffect)._showParticleTrails&&t$$(c._lastParticleStateTexture)&&(c.clearLastParticleStateTexture(r,e._hdr,i,t),e.particleTrailsPostRenderer._particleStateTexture=c._lastParticleStateTexture,e.particleTrailsPostRenderer.update(n))}for(var l=0,u=e._primitives.length;l<u;l++){var c,h=e._primitives._primitives[l];if("FieldLayer3D"==h.type)(c=h._particleVelocityFieldEffect)._showParticleTrails&&t$$(c._lastParticleStateTexture)&&(c.clearLastParticleStateTexture(r,e._hdr,i,t),e.particleTrailsPostRenderer._particleStateTexture=c._lastParticleStateTexture,e.particleTrailsPostRenderer.update(n))}}function or(e,t,i){var n=e._context,r=e._frameState,o=e._environmentState,a=e._view,s=e._frameState.passes,l=s.pick,u=s.fbo,c=o.useWebVR;o.originalFramebuffer=t.framebuffer,t$$(e.sun)&&e.sunBloom!==e._sunBloom?(e.sunBloom&&!c?e._sunPostProcess=new s$b:t$$(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy()),e._sunBloom=e.sunBloom):!t$$(e.sun)&&t$$(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy(),e._sunBloom=!1);var h=e._clearColorCommand;e$1z.clone(i,h.color),h.execute(n,t);var d=o.useGlobeDepthFramebuffer=e._enableCompositor&&t$$(a.globeDepth);d&&(a.globeDepth.update(n,t,a.viewport,e._hdr||e._pickPointEnabled),a.globeDepth.clear(n,t,i));var f=a.oit,p=o.useOIT=e._enableCompositor&&!u&&!l&&t$$(f)&&f.isSupported();p&&(f.update(n,t,a.globeDepth.framebufferWithTexture,e._hdr||e._pickPointEnabled),f.clear(n,t,i),o.useOIT=f.isSupported()),t$$(e.voxelGridPostRender)&&n.depthTexture&&(e.voxelGridPostRender.update(r,a.globeDepth.framebufferWithTexture,e._hdr),e.voxelGridPostRender.clear(n,t)),t$$(e.particlePostRender)&&(e.particlePostRender.update(r,e._hdr),e.particlePostRender.clear(n,t)),t$$(e.particleTrailsPostRenderer)&&!l&&Xo(e,t);var _,m=e.postProcessStages,$=o.usePostProcess=e._enableCompositor&&!u&&!l&&(e._hdr||m.length>0||m.ambientOcclusion.enabled||m.fxaa.enabled||m.bloom.enabled||m.smaa.enabled);(o.usePostProcessSelected=!1,$)&&(a.sceneFramebuffer.update(n,a.viewport,e._hdr),a.sceneFramebuffer.clear(n,t,i),m.update(n,r.useLogDepth,e._hdr,e),m.clear(n),$=o.usePostProcess=m.ready,o.usePostProcessSelected=$&&m.hasSelected,(o.usePostEffect=t$$(e.compositor)&&e.compositor.isEnable())&&(e.compositor.update(n,t,e,r),e.compositor.clear(n,i),m.compositor=e.compositor));if(o.isSunVisible&&e.sunBloom&&!c&&!u?(t.framebuffer=e._sunPostProcess.update(t),e._sunPostProcess.clear(n,t,i)):d?r._fboState.frameBufferType!==B$y.CLAMP&&(t.framebuffer=a.globeDepth.framebuffer):$&&(t.framebuffer=a.sceneFramebuffer.getFramebuffer()),t$$(t.framebuffer)&&h.execute(n,t),o.useInvertClassification=!l&&t$$(t.framebuffer)&&e.invertClassification)if(1===e.frameState.invertClassificationColor.alpha&&o.useGlobeDepthFramebuffer&&(_=a.globeDepth.framebuffer),t$$(_)||n.depthTexture){if(e._invertClassification.previousFramebuffer=_,e._invertClassification.update(n),e._invertClassification.clear(n,t),e.frameState.invertClassificationColor.alpha<1&&p){var g=e._invertClassification.unclassifiedCommand,y=g.derivedCommands;y.oit=f.createDerivedCommands(g,n,y.oit)}}else o.useInvertClassification=!1}M$4.prototype.updateEnvironment=function(){return De$2(this)};var wi=new n$13;function Me$2(e,t){var i=e._context,n=e._frameState,r=e._environmentState,o=e._view,a=e.voxelGridPostRender,s=e.particlePostRender,l=e.particleTrailsPostRenderer,u=n.passes.pick,c=r.useOIT,h=t$$(a)&&a.enable,d=r.useGlobeDepthFramebuffer,f=r.usePostProcess;r.usePostEffect,n._fboState.frameBufferType,B$y.NORMAL_AND_DEPTH;var p=r.originalFramebuffer,_=d?o.globeDepth.framebufferWithTexture:void 0,m=o.sceneFramebuffer.getFramebuffer(),$=o.sceneFramebuffer.getIdFramebuffer();if(t$$(l)&&!u&&l.execute(i,t),t$$(a)){if(t.framebuffer=f?m:p,c){var g=a.getOutputFramebuffer();t$$(g)&&(t.framebuffer=g,o.oit.setOpaqueTexture(g.getColorTexture(0)))}a.execute(i,t)}if(c&&(t.framebuffer=f?m:p,o.oit.execute(i,t)),t$$(s)&&s.execute(i,t),f){var y=m;d&&!c&&!h&&(y=_),e.compositor.outputFbo=y;var v=e.postProcessStages,x=y.getColorTexture(0),b=$.getColorTexture(0),S=e$1Y(_,m).depthStencilTexture;v.execute(i,x,S,b),v.copy(i,p,n.useLogDepth),e.compositor.outputFbo=void 0}!c&&!f&&d&&(t.framebuffer=p,n$13.clone(t.viewport,wi),t.viewport.x=0,t.viewport.y=0,t.viewport.width=i.drawingBufferWidth,t.viewport.height=i.drawingBufferHeight,o.globeDepth.executeCopyColor(i,t),n$13.clone(wi,t.viewport));var w=n.useLogDepth;e.debugShowGlobeDepth&&d&&vi(e,e.debugShowDepthFrustum-1).executeDebugGlobeDepth(i,t,w);e.debugShowPickDepth&&d&&e._picking.getPickDepth(e,e.debugShowDepthFrustum-1).executeDebugPickDepth(i,t,w)}function Ci(e){for(var t=e._frameState.afterRender,i=0,n=t.length;i<n;++i)t[i](),e.requestRender();t.length=0}function Yo(e,t){if(e.debugShowFramesPerSecond){if(!t$$(e._performanceDisplay)){var i=document.createElement("div");i.className="cesium-performanceDisplay-defaultContainer",e._canvas.parentNode.appendChild(i);var n=new n$a({container:i});e._performanceDisplay=n,e._performanceContainer=i}e._performanceDisplay.throttled=e.requestRenderMode,e._performanceDisplay.trangleCount=e.context._trangleCount,e._performanceDisplay.update(t)}else t$$(e._performanceDisplay)&&(e._performanceDisplay=e._performanceDisplay&&e._performanceDisplay.destroy(),e._performanceContainer.parentNode.removeChild(e._performanceContainer))}function Qo(e){e._jobScheduler.resetBudgets();var t=e._frameState;e.primitives.prePassesUpdate(t),t$$(e.globe)&&e.globe.update(t),e._picking.update(),t.creditDisplay.update()}function Ko(e){var t=e._frameState;e.primitives.postPassesUpdate(t),r$U.update()}function Zo(e){var t=e._frameState;t$$(e.globe)&&e.globe.update(t),t.creditDisplay.update()}M$4.prototype.resolveFramebuffers=function(e){return Me$2(this,e)},M$4.prototype.initializeFrame=function(){120==this._shaderFrameCount++&&(this._shaderFrameCount=0,this._context.shaderCache.destroyReleasedShaderPrograms(),this._context.textureCache.destroyReleasedTextures()),this._tweens.update(),this._screenSpaceCameraController.update(),t$$(this._deviceOrientationCameraController)&&this._deviceOrientationCameraController.update(),this.camera.update(this._mode),this.camera._updateCameraChanged()};var Jo=new e$1z,Si=0,Rr=0;const $o=50,xi=100;function en(){var e=performance.now(),t=!1;return e-Si<$o?++Rr>xi&&(t=!0):Rr=0,Si=e,t}var Vi=!1,kr=0;function tn(){return Vi?kr++:kr=0,kr>xi}function rn(e){e._pickPositionCacheDirty=!0;var t=e.context,i=t.uniformState,n=e._frameState,r=e._defaultView;e._view=r,Le$1(e),n.passes.render=!0,n.passes.postProcess=e.postProcessStages.hasSelected,n.tilesetPassState=_o;var o=e$1Y(e.backgroundColor,e$1z.BLACK);e._hdr&&((o=e$1z.clone(o,Jo)).red=Math.pow(o.red,e.gamma),o.green=Math.pow(o.green,e.gamma),o.blue=Math.pow(o.blue,e.gamma)),n.backgroundColor=o,n.creditDisplay.beginFrame(),e.fog.update(n),i.update(n);var a=e.shadowMap;t$$(a)&&a.enabled&&(a$11.negate(i.sunDirectionWC,e._sunCamera.direction),n.shadowMaps.push(a),t$$(e._analysisShadowMap)&&n.shadowMaps.push(e._analysisShadowMap)),e._computeCommandList.length=0,e._logDepthOverlayCommandList.length=0,e._overlayCommandList.length=0,e._overlayAgainstDepthCommandList.length=0;var s=r.viewport;s.x=0,s.y=0,s.width=t.drawingBufferWidth,s.height=t.drawingBufferHeight;var l=r.passState;if(l.framebuffer=void 0,l.blendingEnabled=void 0,l.scissorTest=void 0,l.viewport=n$13.clone(s,l.viewport),t$$(e.globe)&&e.globe.beginFrame(n),t$$(e.terrainProvider)){var u=e.terrainProvider;t$$(u._minHeight)&&t$$(u._maxHeight)&&(n.minTerrainHeight=u._minHeight,n.maxTerrainHeight=u._maxHeight)}An(e),Wn(e),Hn(e),Gn(e),Gi(e),zn(e),zi(e),De$2(e),je(e,l,o),Me$2(e,l),l.framebuffer=void 0,Nr(e,l),Ui(e),e.layers.endFrame(n),t$$(e.globe)&&(e.globe.endFrame(n),e.globe.tilesLoaded||(e._renderRequested=!0),e.camera._computeSensitivePosition()),an(e,n),e._lightSource.resetChange(),n.creditDisplay.endFrame(),t.endFrame(),(!e._saveLocalCachePerformance||en()&&tn())&&(e.layers.saveLocalCache(),e.imageryLayers.saveLocalCache(),e.terrainProvider instanceof se$y&&e.terrainProvider.saveLocalCache())}function an(e,t){for(var i=e.layers._layerQueue.length,n=0;n<i;n++){var r=e.layers._layerQueue[n];t$$(r._imageryLayer)&&t$$(r._layerScheduler)&&r._layerScheduler.loadImagery(r,t)}}function nt$2(e,t){try{t(e)}catch(t){if(e._renderError.raiseEvent(e,t),e.rethrowRenderErrors)throw t}}function on(e){return e._picking.updateMostDetailedRayPicks(e)}function nn(e){var t=e._frameState;Sr.camera=t.camera,Sr.cullingVolume=t.cullingVolume,e.primitives.updateForPass(t,Sr)}function sn(e){e.primitives.updateForPass(e._frameState,yo)}M$4.prototype.render=function(e){if(this.terrainLayers._layers.length>0&&t$$(this._globe)){var t=this.terrainLayers._layers.length-1;this._globe._terrainProvider=this._globe._terrainLayerCollection._layers[t]._terrainProvider}if(t$$(this._globe._terrainProvider._visible)&&this._globe._surface._visible!==this._globe._terrainProvider._visible){var i=this._globe._terrainProvider._visible;this._globe._surface.showInvalid(!i),this._globe._surface._visible=i}t$$(e)||(e=o$10.now());var n=this._frameState;n.newFrame=!1,this._jobScheduler.resetBudgets();var r=this._view.checkForCameraUpdates(this),o=!this.requestRenderMode||this._renderRequested||r||this._logDepthBufferDirty||this._hdrDirty||this.mode===b$1d.MORPHING;if(!o&&t$$(this.maximumRenderTimeChange)&&t$$(this._lastRenderTime)){var a=Math.abs(o$10.secondsDifference(this._lastRenderTime,e));o=o||a>this.maximumRenderTimeChange}o&&(this._lastRenderTime=o$10.clone(e,this._lastRenderTime),this._renderRequested=!1,pi(this,n$1d.incrementWrap(n.frameNumber,15e6,1),e),n.newFrame=!0,this.mode===b$1d.SCENE3D&&(this._silverLightingAtmosphere.update(n,this.mode),this._lightSource._enableAmbientLightColor||e$1z.clone(this._silverLightingAtmosphere.getAmbientColor(),this._lightSource._ambientLightColor),this._lightSource._enableSunLightColor||e$1z.clone(this._silverLightingAtmosphere.getSunColor(),this._lightSource._sunLightColor)));this._preUpdate.raiseEvent(this,e),nt$2(this,Zo),nt$2(this,Qo),this.primitives.show&&(nt$2(this,on),nt$2(this,nn),nt$2(this,bn),o||nt$2(this,sn)),this._postUpdate.raiseEvent(this,e),o&&(this._preRender.raiseEvent(this,e),nt$2(this,rn)),Yo(this,o),nt$2(this,Ko),Vi=0==r$U.activeRequestLength,Ci(this),o&&this._postRender.raiseEvent(this,e),this._logDepthBufferDirty=!1,this._hdrDirty=!1},M$4.prototype.forceRender=function(e){this._renderRequested=!0,this.render(e)},M$4.prototype.requestRender=function(){this._renderRequested=!0},M$4.prototype.clampLineWidth=function(e){return Math.max(e$1y.minimumAliasedLineWidth,Math.min(e,e$1y.maximumAliasedLineWidth))};var un=new l$W,ln=new a$11,nr=new a$11,mn=new r$T,dn=new c$1a;function cn(e,t,i,n,r){var o=e.camera,a=o.frustum;t$$(a._offCenterFrustum)&&(a=a._offCenterFrustum);var s=2*(t.x-r.x)/r.width-1;s*=.5*(a.right-a.left);var l=2*(r.height-t.y-r.y)/r.height-1;l*=.5*(a.top-a.bottom);var u=c$1a.clone(o.transform,dn);o._setTransform(c$1a.IDENTITY);var c=a$11.clone(o.position,ln);a$11.multiplyByScalar(o.right,s,nr),a$11.add(nr,c,c),a$11.multiplyByScalar(o.up,l,nr),a$11.add(nr,c,c),o._setTransform(u),e.mode===b$1d.SCENE2D&&a$11.fromElements(c.z,c.x,c.y,c);var h=a.getPixelDimensions(r.width,r.height,1,1,mn),d=un;return d.right=.5*h.x,d.left=-d.right,d.top=.5*h.y,d.bottom=-d.top,d.near=a.near,d.far=a.far,d.computeCullingVolume(c,o.directionWC,o.upWC)}var fn=new l$V,hn=new r$T;function pn(e,t,i,n,r){var o=e.camera,a=o.frustum,s=a.near,l=Math.tan(.5*a.fovy),u=a.aspectRatio*l,c=(2*(t.x-r.x)/r.width-1)*s*u,h=(2*(r.height-t.y-r.y)/r.height-1)*s*l,d=a.getPixelDimensions(r.width,r.height,1,1,hn),f=d.x*i*.5,p=d.y*n*.5,_=fn;return _.top=h+p,_.bottom=h-p,_.right=c+f,_.left=c-f,_.near=s,_.far=a.far,_.computeCullingVolume(o.positionWC,o.directionWC,o.upWC)}function Wt(e,t,i,n,r){var o=e.camera.frustum;return o instanceof r$K||o instanceof l$W?cn(e,t,i,n,r):pn(e,t,i,n,r)}var ge$1=3,Ee$1=3,ie$1=new n$13(0,0,ge$1,Ee$1),bt$1=new e$1z(0,0,0,0),sr=new r$T,Rt=new a$11;M$4.prototype.pick=function(e,t,i,n){if(!t$$(e))throw new t$_("windowPosition is undefined.");if(!this.requestRenderMode&&Math.abs(this._frameState.frameNumber-this._pickResult.pickFrameNumber)<5&&!t$$(n))return this._pickResult.pickObject;ge$1=e$1Y(t,this._pickTolerance),Ee$1=e$1Y(i,ge$1);var r=this._context,o=r.uniformState,a=this._frameState,s=this._defaultView;this._view=s;var l=s.viewport;l.x=0,l.y=0,l.width=r.drawingBufferWidth,l.height=r.drawingBufferHeight;var u=s.passState;u.viewport=n$13.clone(l,u.viewport);var c=u$V.transformWindowToDrawingBuffer(this,e,sr);if(this._multiViewportMode!==te$5.NONE){var h=Ht(this,c);if(c.y=r.drawingBufferHeight-c.y,h>-1){a.multiViewportIndex=h;var d=this._multiViewportInfo[h];J$2.x=r.drawingBufferWidth*d.x,J$2.y=r.drawingBufferHeight*d.y,J$2.width=r.drawingBufferWidth*d.width,J$2.height=r.drawingBufferHeight*d.height;var f=(c.x-J$2.x)/J$2.width,p=(c.y-J$2.y)/J$2.height;c.x=f*r.drawingBufferWidth,c.y=(1-p)*r.drawingBufferHeight}}for(var _=s.frustumCommandsList.length,m=0;m<_;++m){var $=this._picking.getPickDepth(this,m).getDepth(r,c.x,c.y);$>0&&$<1&&(Rt=u$V.drawingBufferToWgs84Coordinates(this,c,$,Rt))}r._pickPosition[0]=Rt.x,r._pickPosition[1]=Rt.y,r._pickPosition[2]=Rt.z;var g=i$1g.fromCartesian(Rt);t$$(g)&&(r._pickPositionHeight=g.height),this._jobScheduler.disableThisFrame(),Le$1(this),a.cullingVolume=Wt(this,c,ge$1,Ee$1,l),a.invertClassification=!1,a.passes.pick=!0,a.tilesetPassState=Vr,o.update(a),De$2(this);var y=!1,v=this.particlePostRender,x=this.particleTrailsPostRenderer;(v.enable||x.enable)&&(y=!0),ie$1.x=c.x-.5*(ge$1-1),ie$1.y=this.drawingBufferHeight-c.y-.5*(Ee$1-1),ie$1.width=ge$1,ie$1.height=Ee$1,je(this,u=s.pickFramebuffer.begin(ie$1,s.viewport,y),bt$1),Nr(this,u),Me$2(this,u);var b=s.pickFramebuffer.end(ie$1);r.endFrame();m=0;for(var S=this._primitives.length;m<S;m++){var w=this._primitives._primitives[m];w.type==ai$2.INSTANCED_LAYER&&w.setUnSelected()}var C=this._analyst3D.layerQueue;for(m=0,S=C.length;m<S;m++){var T=C[m];T instanceof s$9&&T.releaseSelection()}if(t$$(b)&&t$$(b.primitive)&&(b.primitive.type===ai$2.INSTANCED_OBJECT||b.primitive instanceof s$9)&&b.primitive.setSelected(b.id),t$$(b)&&t$$(b.primitive)&&b.primitive instanceof _0x38aae9){var P=b.id.split("_");2==P.length&&b.primitive.setPolygonOffset(P[1])}else{var E=t$$(b)&&t$$(b.primitive)&&b.primitive instanceof _0x4ab4f4;E?(this._layers._setSelection(b),t$$(b.primitive)&&!1===b.primitive.selectEnabled&&(b=void 0)):this._layers.releaseSelection()}var A={isS3MTilesLayerSel:!1,pickedObject:void 0};if(t$$(b)||(A=this.pickRasterData(e)),!E&&A.isS3MTilesLayerSel)return a.commandListRealtimeRaster.length=0,A.pickedObject;for(var L in this._vectorTileSource._hash){var M=this._vectorTileSource.get(L);t$$(M._labelCollection)&&M._labelCollection.releaseSelection()}return t$$(b)&&t$$(b.collection)&&(t$$(b.collection._isS3MTileLabels)&&b.collection._isS3MTileLabels||b.collection._isMVT)&&t$$(b.collection.setSelection)&&b.collection.setSelection(b.id),this._pickResult.pickFrameNumber=this._frameState.frameNumber,this._pickResult.pickObject=b,t$$(g)&&t$$(b)&&(b.height=g.height),b};var st=new s$1p,Ti=new a$11,Di=new a$11,Ei=new a$11,ur=new a$11,gn=new a$11(0,0,-1),vn=new a$11(0,1,0),_n=new n$13(0,0,1,1),Oe=new r$T;function Ni(e,t){var i=e._context,n=e._frameState,r=e._environmentState,o=e.globe.depthTestAgainstTerrain;e.globe.depthTestAgainstTerrain=!0;var a=e._defaultView;e._view=a;var s=a.viewport;s.x=0,s.y=0,s.width=i.drawingBufferWidth,s.height=i.drawingBufferHeight;var l=a.passState;l.viewport=n$13.clone(s,l.viewport),Dr(n.passes),n.passes.pick=!0,n.passes.depth=!0,n.cullingVolume=Wt(e,t,1,1,s),De$2(e),r.renderTranslucentDepthForPick=!0,je(e,l=a.pickDepthFramebuffer.update(i,t,s),bt$1,!0),Nr(e,l),Me$2(e,l),e.globe.depthTestAgainstTerrain=o,i.endFrame()}function Ht(e,t){if(e._mode===b$1d.SCENE2D||e._multiViewportMode==te$5.NONE)return-1;for(var i=e._context,n=new n$13(t.x,i.drawingBufferHeight-t.y),r=new n$13,o=-1,a=0;a<e._multiViewportInfo.length;a++){var s=e._multiViewportInfo[a];if(r.x=i.drawingBufferWidth*s.x,r.y=i.drawingBufferHeight*s.y,r.width=i.drawingBufferWidth*s.width,r.height=i.drawingBufferHeight*s.height,r.intersect(n)===cr$4.INTERSECTING){o=a;break}}return o}M$4.prototype.pickRasterData=function(e,t,i){if(!t$$(e))throw new t$_("windowPosition is undefined.");var n=this._frameState,r=n.commandListRealtimeRaster;if(0===r.length)return{isS3MTilesLayerSel:!1,pickedObject:void 0};var o=this.pickPosition(e),a=i$1g.fromCartesian(o),s=n$1d.toDegrees(a.longitude),l=n$1d.toDegrees(a.latitude);Oe.x=e.x,Oe.y=e.y+1;var u=this.pickPosition(Oe),c=i$1g.fromCartesian(u),h=n$1d.toDegrees(c.latitude);Oe.x=e.x,Oe.y=e.y-1,u=this.pickPosition(Oe),c=i$1g.fromCartesian(u);var d=n$1d.toDegrees(c.latitude);Oe.x=e.x-1,Oe.y=e.y,u=this.pickPosition(Oe),c=i$1g.fromCartesian(u);var f=n$1d.toDegrees(c.longitude);Oe.x=e.x+1,Oe.y=e.y,u=this.pickPosition(Oe),c=i$1g.fromCartesian(u);for(var p=n$1d.toDegrees(c.longitude),_=Math.abs(p-f),m=Math.abs(d-h),$=[],g=0;g<r.length;g++){let e=r[g]._boundingVolume.radius;e||(r[g]._boundingVolume._updateBBox(),e=a$11.distance(r[g]._boundingVolume.center,r[g]._boundingVolume.bbox[0])),st.west=r[g]._boundingVolume.center.x-e,st.south=r[g]._boundingVolume.center.y-e,st.east=r[g]._boundingVolume.center.x+e,st.north=r[g]._boundingVolume.center.y+e,s<st.east&&s>st.west&&l<st.north&&l>st.south&&$.push(r[g])}if(0===$.length)return{isS3MTilesLayerSel:!1,pickedObject:void 0};t$$(this._rasterPickTexture)||(this._rasterPickTexture=new P$S({context:n.context,width:1,height:1,pixelFormat:Z$_.RGBA,sampler:new a$Q({wrapS:j$13.CLAMP_TO_EDGE,wrapT:j$13.CLAMP_TO_EDGE,minificationFilter:tt$l.LINEAR,magnificationFilter:et$k.LINEAR})}),this._rasterPickFBO=new u$F({context:n.context,colorTextures:[this._rasterPickTexture],destroyAttachments:!1}));var y=this._clearColorCommand.framebuffer;this._clearColorCommand.framebuffer=this._rasterPickFBO,this._clearColorCommand.execute(n.context);var v=n.camera;a$11.clone(v.position,Ti),a$11.clone(v.direction,Di),a$11.clone(v.up,Ei);var x=s-_,b=s+_,S=l+m,w=l-m;ur.x=.5*(x+b),ur.y=.5*(S+w),ur.z=5,v.setView({destination:ur,orientation:{direction:gn,up:vn},convert:!1});var C=new r$K({width:b-x,aspectRatio:1,near:1,far:10});n.context.uniformState.update(n),n.context.uniformState.updateFrustum(C);for(g=0;g<$.length;g++){$[g].renderState=p$1a.fromCache({viewport:_n}),$[g].framebuffer=this._rasterPickFBO;var T=$[g].derivedCommands;T.picking=p$h.createPickDerivedCommand(this,$[g],n.context,T.picking),$[g].derivedCommands.picking.pickCommand.execute(n.context)}v.setView({destination:Ti,orientation:{direction:Di,up:Ei},convert:!1}),n.context.uniformState.update(n),n.context.uniformState.updateFrustum(v.frustum);var P=n.context.readPixels({x:0,y:0,width:1,height:1,framebuffer:this._rasterPickFBO});n.context.pixels=P;var E=e$1z.byteToRgba(P[0],P[1],P[2],P[3]),A=n.context.getObjectByPickId(E),L=t$$(A)&&t$$(A.primitive)&&A.primitive instanceof _0x4ab4f4;return L?this._layers._setSelection(A):this._layers.releaseSelection(),this._clearColorCommand.execute(n.context),this._clearColorCommand.framebuffer=y,{isS3MTilesLayerSel:L,pickedObject:A}},M$4.prototype.pickRasterData2D=function(e,t,i){var n=this.pickPosition(e),r=i$1g.fromCartesian(n),o=this._frameState.rasterVectorCollection,a=o.getPickID(r);o.setSelection(a)},M$4.prototype.pointPick=function(e){if(!t$$(e))throw new t$_("windowPosition is undefined.");var t=this._pickPointTolerance,i=t;ge$1=e$1Y(t,3),Ee$1=e$1Y(i,ge$1);var n=this._context,r=n.uniformState,o=this._frameState,a=this._defaultView;this._view=a;var s=a.viewport;s.x=0,s.y=0,s.width=n.drawingBufferWidth,s.height=n.drawingBufferHeight;var l=a.passState;l.viewport=n$13.clone(s,l.viewport);var u=u$V.transformWindowToDrawingBuffer(this,e,m);if(this._multiViewportMode!==te$5.NONE){var c=Ht(this,u);if(u.y=n.drawingBufferHeight-u.y,c>-1){o.multiViewportIndex=c;var h=this._multiViewportInfo[c];J$2.x=n.drawingBufferWidth*h.x,J$2.y=n.drawingBufferHeight*h.y,J$2.width=n.drawingBufferWidth*h.width,J$2.height=n.drawingBufferHeight*h.height;var d=(u.x-J$2.x)/J$2.width,f=(u.y-J$2.y)/J$2.height;u.x=d*n.drawingBufferWidth,u.y=f*n.drawingBufferHeight,u.y=n.drawingBufferHeight-qe.y}}this._jobScheduler.disableThisFrame(),Le$1(this),o.cullingVolume=Wt(this,u,ge$1,Ee$1,s),o.invertClassification=!1,o.passes.pick=!0;var p=this._environmentVisible;this._environmentVisible=a.pickPointFramebuffer._environmentVisible,r.update(o),De$2(this),ie$1.x=u.x-.5*(ge$1-1),ie$1.y=this.drawingBufferHeight-u.y-.5*(Ee$1-1),ie$1.width=ge$1,ie$1.height=Ee$1,je(this,l=a.pickPointFramebuffer.begin(ie$1,a.viewport),bt$1),Me$2(this,l);var _=a.pickPointFramebuffer.end(ie$1);if(n.endFrame(),this._environmentVisible=p,t$$(_))if(_.z>-n$1d.EPSILON10)this._pos=void 0;else{var m=new a$10,$=a$11.magnitude(_);c$1a.multiplyByVector(o.camera.inverseViewMatrix,_,m);var g=u$V.wgs84ToWindowCoordinates(this,m,new r$T),y=this.pickPosition(g,new a$11);if(t$$(y)&&!($>a$11.distance(y,o.camera.position)+5))return this._pos=new a$10,a$10.clone(m,this._pos),this._pos;this._pos=void 0}else this._pos=void 0},M$4.prototype.pickNormal=function(e){if(!t$$(e))throw new t$_("windowPosition is undefined.");ge$1=1,Ee$1=1;var t=this._context,i=t.uniformState,n=this._frameState,r=this._defaultView;this._view=r;var o=r.viewport;o.x=0,o.y=0,o.width=t.drawingBufferWidth,o.height=t.drawingBufferHeight;var a=r.passState;a.viewport=n$13.clone(o,a.viewport);var s=u$V.transformWindowToDrawingBuffer(this,e,sr);if(this._multiViewportMode!==te$5.NONE){var l=Ht(this,s);if(s.y=t.drawingBufferHeight-s.y,l>-1){n.multiViewportIndex=l;var u=this._multiViewportInfo[l];J$2.x=t.drawingBufferWidth*u.x,J$2.y=t.drawingBufferHeight*u.y,J$2.width=t.drawingBufferWidth*u.width,J$2.height=t.drawingBufferHeight*u.height;var c=(s.x-J$2.x)/J$2.width,h=(s.y-J$2.y)/J$2.height;s.x=c*t.drawingBufferWidth,s.y=h*t.drawingBufferHeight,s.y=t.drawingBufferHeight-qe.y}}this._jobScheduler.disableThisFrame(),Le$1(this),n.cullingVolume=Wt(this,s,ge$1,Ee$1,o),n.invertClassification=!1,n.passes.pick=!0,n.passes.normal=!0;var d=this._environmentVisible;this._environmentVisible=r.normalFramebuffer._environmentVisible,i.update(n),De$2(this),ie$1.x=s.x-.5*(ge$1-1),ie$1.y=this.drawingBufferHeight-s.y-.5*(Ee$1-1),ie$1.width=ge$1,ie$1.height=Ee$1,je(this,a=r.normalFramebuffer.begin(ie$1,r.viewport),bt$1),Me$2(this,a);var f=r.normalFramebuffer.end(ie$1);if(t.endFrame(),n.passes.pick=!1,n.passes.normal=!1,this._environmentVisible=d,t$$(f))return f};var J$2=new n$13,qe=new r$T,lr=new r$T;M$4.prototype.pickPositionWorldCoordinates=function(e,t,i){if(this.useDepthPicking){if(!t$$(e))throw new t$_("windowPosition is undefined.");var n=e.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(n))return a$11.clone(this._pickPositionCache[n],t);var r=this._frameState,o=this._context,a=o.uniformState,s=this._defaultView;this._view=s;var l=u$V.transformWindowToDrawingBuffer(this,e,sr);if(r$T.clone(l,lr),this.pickTranslucentDepth){if(this._multiViewportMode!==te$5.NONE){var u=Ht(this,l);if(r$T.clone(l,qe),qe.y=o.drawingBufferHeight-qe.y,u>-1){r.multiViewportIndex=u;var c=this._multiViewportInfo[u];J$2.x=o.drawingBufferWidth*c.x,J$2.y=o.drawingBufferHeight*c.y,J$2.width=o.drawingBufferWidth*c.width,J$2.height=o.drawingBufferHeight*c.height;var h=(qe.x-J$2.x)/J$2.width,d=(qe.y-J$2.y)/J$2.height;qe.x=h*o.drawingBufferWidth,qe.y=d*o.drawingBufferHeight,lr.x=qe.x,lr.y=o.drawingBufferHeight-qe.y,Le$1(this,r.frameNumber,r.time),r.tilesetPassState=Vr}}Ni(this,lr)}else Le$1(this,r.frameNumber,r.time),a.update(r),De$2(this);this._multiViewportMode!==te$5.NONE?l=qe:l.y=this.drawingBufferHeight-l.y;var f,p=this.camera;f=t$$(p.frustum.fov)?p.frustum.clone(tr):t$$(p.frustum.infiniteProjectionMatrix)?p.frustum.clone(rr):t$$(p.frustum.width)?p.frustum.clone(ir):p.frustum.clone(ar);for(var _=s.frustumCommandsList,m=_.length,$=0;$<m;++$){var g=this._picking.getPickDepth(this,$).getDepth(o,l.x,l.y,t$$(i)&&i?this._pickDepthTolerance:0);if(g>0&&g<1){var y,v=_[$];return this.mode===b$1d.SCENE2D?(y=p.position.z,p.position.z=y-v.near+1,f.far=Math.max(1,v.far-v.near),f.near=1,a.update(r),a.updateFrustum(f)):(f.near=v.near*(0!==$?this.opaqueFrustumNearOffset:1),f.far=v.far,a.updateFrustum(f)),t=u$V.drawingBufferToWgs84Coordinates(this,l,g,t),this.mode===b$1d.SCENE2D&&(p.position.z=y,a.update(r)),this._pickPositionCache[n]=a$11.clone(t),t}}this._pickPositionCache[n]=void 0}};var yn=new i$1g;function Pi(e,t){var i,n,r=[],o=[],a=[],s=[],l=Object.create(null);t$$(e)||(e=Number.MAX_VALUE);for(var u=t();t$$(u);){var c=u.object,h=u.position,d=u.exclude;if(t$$(h)&&!t$$(c)){r.push(u);break}if(!t$$(c)||!t$$(c.primitive)||!d&&(r.push(u),0>=--e))break;var f=c.primitive,p=!1;if("function"==typeof f.getGeometryInstanceAttributes&&t$$(c.id)&&(t$$(n=f.getGeometryInstanceAttributes(c.id))&&t$$(n.show)&&(p=!0,n.show=e$18.toValue(!1,n.show),a.push(n))),c instanceof e$Z&&(p=!0,c.show=!1,s.push(c)),f instanceof _0x4ab4f4){p=!0,f.setOnlyObjsVisible([c.id],!1);var _=f.id;(l[_]=l[_]||{}).layer=f,(l[_].ids=l[_].ids||[]).push(c.id)}p||(f.show=!1,o.push(f)),u=t()}for(i=0;i<o.length;++i)o[i].show=!0,o[i]instanceof _0x10007a&&o[i].setSelected();for(var m in l){var $=l[m];$.layer.setOnlyObjsVisible($.ids,!0)}for(i=0;i<a.length;++i)(n=a[i]).show=e$18.toValue(!0,n.show);for(i=0;i<s.length;++i)s[i].show=!0;return r}function bn(e){var t=e._frameState;t.camera.canPreloadFlight()&&(xr.camera=e.preloadFlightCamera,xr.cullingVolume=e.preloadFlightCullingVolume,e.primitives.updateForPass(t,xr))}M$4.prototype.pickPosition=function(e,t){if(t$$(t=this.pickPositionWorldCoordinates(e,t))&&this.mode!==b$1d.SCENE3D){a$11.fromElements(t.y,t.z,t.x,t);var i=this.mapProjection,n=i.ellipsoid,r=i.unproject(t,yn);n.cartographicToCartesian(r,t)}return t},M$4.prototype.pickPosition2D=function(e,t){if(t$$(t=this.pickPositionWorldCoordinates(e,t)))return t$$(t)&&this.mode!==b$1d.SCENE3D&&a$11.fromElements(t.y,t.z,t.x,t),t.x+=a$11.globalOffset.x,t.y+=a$11.globalOffset.y,t.z+=a$11.globalOffset.z,t},M$4.prototype.pickTileCoordinate=function(e){function t(e,t){return s$1p.contains(e.rectangle,t)?e:void 0}if(!t$$(e))throw new t$_("windowPosition is required");var i=this.globe._surface._levelZeroTiles;if(t$$(i)){var n,r;try{n=this.pickPosition(e,new a$11),r=i$1g.fromCartesian(n)}catch{return}for(var o=r.longitude,a=r.latitude,s=t(i[0],r)||t(i[1],r);s._lastSelectionResult===D$u.REFINED;)s=t(s.southwestChild,r)||t(s.southeastChild,r)||t(s.northwestChild,r)||s.northeastChild;var l=s.rectangle,u=(o-l.west)/l.width,c=(l.north-a)/l.height;return{x:s.x,y:s.y,level:s.level,xRatio:u,yRatio:c}}},M$4.prototype.drillPick=function(e,t,i,n){var r=this,o=Pi(t,(function(){var t=r.pick(e,i,n,!0);if(t$$(t))return{object:t,position:void 0,exclude:!1}}));return o.map((function(e){return e.object}))};var Ri=new a$11,wn=new a$11;function ki(e,t,i,n){var r=t.direction,o=a$11.mostOrthogonalAxis(r,Ri),a=a$11.cross(r,o,Ri),s=a$11.cross(r,a,wn);n.position=t.origin,n.direction=r,n.up=s,n.right=a,n.frustum.width=e$1Y(i,e.pickOffscreenDefaultWidth)}function Ir(e,t,i,n,r){for(var o=[],a=e.primitives,s=a.length,l=0;l<s;++l){var u=a.get(l);u instanceof f$B&&u.show&&(!t$$(i)||-1===i.indexOf(u))&&o.push(u)}if(0===o.length)return c$18.resolve(r());var c=new ho(t,n,o);return e._asyncRayPicks.push(c),c.promise.then((function(){return r()}))}function Sn(e,t){return!(!t$$(e)||!t$$(t)||0===t.length)&&(t.indexOf(e)>-1||t.indexOf(e.primitive)>-1||t.indexOf(e.id)>-1)}function xn(e,t,i,n,r,o,a){var s=e._context,l=s.uniformState,u=e._frameState,c=e._pickOffscreenView;e._view=c,ki(e,t,n,c.camera),ie$1=n$13.clone(c.viewport,ie$1);var h=c.pickFramebuffer.begin(ie$1,c.viewport);e._jobScheduler.disableThisFrame(),t$$(e.camera.frustum.left)&&(u.cullingVolume=Wt(e,{x:0,y:0},1,1,c.viewport)),Le$1(e),u.invertClassification=!1,u.passes.pick=!0,u.passes.offscreen=!0,u.passes.asynchronous=o,c.updateFrustums=!0,u.tilesetPassState=a?bo:Vr,l.update(u),De$2(e),je(e,h,bt$1),Me$2(e,h);var d,f=c.pickFramebuffer.end(s);if(e._context.depthTexture)for(var p=c.frustumCommandsList.length,_=0;_<p;++_){var m=e._picking.getPickDepth(e,_).getDepth(s,0,0);if(m>0&&m<1){var $=c.frustumCommandsList[_],g=$.near*(0!==_?e.opaqueFrustumNearOffset:1),y=g+m*($.far-g);d=n$18.getPoint(t,y);break}}if(e._view=e._defaultView,s.endFrame(),u.passes.pick=!1,u.passes.offscreen=!1,t$$(f)||t$$(d))return{object:f,position:d,exclude:!t$$(d)&&r||Sn(f,i)}}function Ii(e,t,i,n,r,o,a,s){return Pi(i,(function(){return xn(e,t,n,r,o,a,s)}))}function kt(e,t,i,n,r,o){var a=Ii(e,t,1,i,n,r,o,!1);if(a.length>0)return a[0]}function Fi(e,t,i,n,r,o,a){return Ii(e,t,i,n,r,o,a,!0)}M$4.prototype.pickFromRay=function(e,t,i){if(n$1e.defined("ray",e),this._mode!==b$1d.SCENE3D)throw new t$_("Ray intersections are only supported in 3D mode.");return kt(this,e,t,i,!1,!1)},M$4.prototype.drillPickFromRay=function(e,t,i,n){if(n$1e.defined("ray",e),this._mode!==b$1d.SCENE3D)throw new t$_("Ray intersections are only supported in 3D mode.");return Fi(this,e,t,i,n,!1,!1)},M$4.prototype.pickFromRayMostDetailed=function(e,t,i){if(n$1e.defined("ray",e),this._mode!==b$1d.SCENE3D)throw new t$_("Ray intersections are only supported in 3D mode.");var n=this;return e=n$18.clone(e),t=t$$(t)?t.slice():t,Ir(this,e,t,i,(function(){return kt(n,e,t,i,!1,!0)}))},M$4.prototype.drillPickFromRayMostDetailed=function(e,t,i,n){if(n$1e.defined("ray",e),this._mode!==b$1d.SCENE3D)throw new t$_("Ray intersections are only supported in 3D mode.");var r=this;return e=n$18.clone(e),i=t$$(i)?i.slice():i,Ir(this,e,i,n,(function(){return Fi(r,e,t,i,n,!1,!0)}))};var Vn=new a$11,Tn=new a$11,Dn=new n$18,Li=new i$1g;function Fr(e,t){var i=e.globe,n=t$$(i)?i.ellipsoid:e.mapProjection.ellipsoid,r=e$1P._defaultMaxTerrainHeight,o=n.geodeticSurfaceNormalCartographic(t,Tn),a=i$1g.toCartesian(t,n,Vn),s=Dn;s.origin=a,s.direction=o;var l=new n$18;return n$18.getPoint(s,r,l.origin),a$11.negate(o,l.direction),l}function Mi(e,t){var i=e.globe,n=t$$(i)?i.ellipsoid:e.mapProjection.ellipsoid;return Fr(e,i$1g.fromCartesian(t,n,Li))}function Oi(e,t){var i=e.globe,n=t$$(i)?i.ellipsoid:e.mapProjection.ellipsoid;return i$1g.fromCartesian(t,n,Li).height}function En(e,t,i,n){var r=Fr(e,t);return Ir(e,r,i,n,(function(){var t=kt(e,r,i,n,!0,!0);if(t$$(t))return Oi(e,t.position)}))}function qi(e){var t={},i=e.firstChild,n=f$10.queryStringValue(i,"Version");t.version=n;var r=f$10.queryStringValue(i,"FileType");t.fileType=r;var o=f$10.queryFirstNode(i,"WaterEffect"),a=f$10.queryNumericValue(o,"AverageHeight");t.averageHeight=a;var s=f$10.queryNodes(o,"GpuProgramParameters");t.gpuProgramParameters=[];for(var l=0,u=s.length;l<u;l++){var c={gpuConstants:[],atuoConstants:[]},h=s[l],d=f$10.queryFirstNode(h,"GpuConstants");if(d)for(var f=f$10.queryNodes(d,"GpuConstantDefinition"),p=0,_=f.length;p<_;p++){var m={},$=f[p],g=f$10.queryNumericValue($,"ConstType");m.constType=g;var y=f$10.queryNumericValue($,"Index");m.index=y;var v=f$10.queryStringValue($,"Name");m.name=v;var x=f$10.queryNumericValue($,"ArraySize");m.arraySize=x;var b=f$10.queryNumericValue($,"Multiple");m.multiple=b;var S=f$10.queryFirstNode($,"ArrayFloat");if(m.arrayFloat=[],S)for(var w=f$10.queryNodes(S,"Float"),C=0;C<x;){var T=parseFloat(w[C].textContent);m.arrayFloat.push(T),C++}c.gpuConstants.push(m)}var P=f$10.queryFirstNode(h,"AutoConstants");if(P){var E=f$10.queryNodes(P,"AutoConstantEntry");for(p=0,_=E.length;p<_;p++){m={};var A=E[p],L=f$10.queryNumericValue(A,"ParamType");m.paramType=L;v=f$10.queryStringValue(A,"Name");m.name=v;var M=f$10.queryNumericValue(A,"PhysicalIndex");m.physicalIndex=M;var I=f$10.queryNumericValue(A,"ElementCount");m.elementCount=I;var O=f$10.queryNumericValue(A,"Data");m.data=O;var D=f$10.queryNumericValue(A,"FData");m.fData=D;var R=f$10.queryBooleanValue(A,"IsReal");m.isReal=R,c.atuoConstants.push(m)}}t.gpuProgramParameters.push(c)}return t}function Nn(e,t,i,n){var r=c$18.defer(),o=e.toString()+"indexData.dat";if(t$$(a$R.CREDENTIAL)&&(o=a$R.addToken(o)),i===di$7.KEY_VALUE){var a=m$19(n.split("?")[1]),s={suffix:"dat"},l=a$Y(s=Object.assign(s,a),!0),u=n.match(/(\S*)\/config/);u.length>0&&(o=u[0]+"?"+l)}return c$18(u$_(o,t),(function(e){for(var t=new e$1F,i=e.firstChild,n=i.namespace,o=f$10.queryFirstNode(i,"FieldDefines",n),a=f$10.queryChildNodes(o,"FieldDefine",n),s=0;s<a.length;s++){var l=f$10.queryStringAttribute(a[s],"Name"),u=f$10.queryStringAttribute(a[s],"Type"),c=f$10.queryStringAttribute(a[s],"Size");t.set(l,{type:u,size:c})}r.resolve(t)}),(function(){r.reject()})),r.promise}function Pn(e,t,i,n){var r=c$18.defer();if(t$$(i)){var o,a=e.toString();if(n===di$7.KEY_VALUE){var s=m$19(a.split("?")[1]),l={suffix:"attribute.json"},u=a$Y(l=Object.assign(l,s),!0),c=a.match(/(\S*)\/config/);c.length>0&&(o=c[0]+"?"+u)}else{var h=a.substring(0,a.indexOf("/realspace")+10);o=a+"attribute.json",t$$(a$R.CREDENTIAL)&&(o=t$$(a$R.CREDENTIAL._keymap[h])?a$R.addTokenWithKey(h,o):a$R.addToken(o))}c$18(u$$(o,t),(function(e){if(e.layerInfos){for(var t=e.layerInfos[0].fieldInfos,i=new e$1F,n=0;n<t.length;n++)i.set(t[n].name,{type:t[n].type,size:t[n].size});var o;if(t$$(e.indexInfos)){o={};n=0;for(var a=e.indexInfos.length;n<a;n++){var s=e.indexInfos[n],l=a$J(s.rootNodePath);o[l=l.replace(".s3mb","")]=s.indexInfo}}r.resolve({fieldsInfo:i,indexInfoMap:o})}else r.reject()}),(function(){r.reject()}))}else r.reject();return r.promise}function Rn(e,t,i){if(e&&t){var n=e.firstChild;if(n){var r=n.namespaceURI,o=f$10.queryFirstNode(n,"AttachFiles",r);if(o){for(var a=f$10.queryNodes(o,"AttachFile",r),s=[],l=0,u=a.length;l<u;l++){var c=a[l].textContent;if(c.indexOf("water")>0){var h=t+c;s.push(u$_(h,i))}}if(!s.length)return;var d=c$18.defer();return c$18.all(s,(function(e){for(var t=[],i=0,n=e.length;i<n;i++){var r=e[i];if(!r)break;var o=qi(r);t.push(o)}d.resolve(t)}),(function(){})),d.promise}}}}function kn(e,t,i){if(e&&t){var n=e.extensions;if(t$$(n)&&t$$(n.attachFiles)){for(var r=n.attachFiles,o=[],a=0,s=r.length;a<s;a++){var l=r[a].attachFile;if(l.indexOf(".water")>0){var u=t+l;t$$(a$R.CREDENTIAL)&&(u=a$R.addToken(u)),o.push(u$_(u,i))}}if(o.length){var c=c$18.defer();return c$18.all(o,(function(e){for(var t=[],i=0,n=e.length;i<n;i++){var r=e[i];if(!r)break;var o=qi(r);t.push(o)}c.resolve(t)}),(function(){})),c.promise}}}}function In(e,t,i){var n=e.firstChild,r=n.namespace;if("Spatial3DModel"===n.localName){f$10.queryStringValue(n,"Asset",r),f$10.queryStringValue(n,"Version",r);var o=f$10.queryStringValue(n,"DataType",r);f$10.queryStringValue(n,"PyramidSplitType",r),f$10.queryStringValue(n,"LodType",r);var a=f$10.queryFirstNode(n,"Position",r),s=f$10.queryNumericValue(a,"X",r),l=f$10.queryNumericValue(a,"Y",r),u=f$10.queryNumericValue(a,"Z",r);if(t$$(ie=f$10.queryFirstNode(n,"GeoBounds",r))){var c=f$10.queryNumericValue(ie,"Left",r),h=f$10.queryNumericValue(ie,"Top",r),d=f$10.queryNumericValue(ie,"Right",r),f=f$10.queryNumericValue(ie,"Bottom",r);J=s$1p.fromDegrees(c,f,d,h)}var p=f$10.queryFirstNode(n,"HeightRange",r),_=f$10.queryNumericValue(p,"Min",r),m=f$10.queryNumericValue(p,"Max",r),$=f$10.queryFirstNode(n,"CategoryRange",r),g=f$10.queryNumericValue($,"MaxCategory",r),y=f$10.queryNumericValue($,"MinCategory",r),v=f$10.queryFirstNode(n,"WDescript",r),x=f$10.queryFirstNode(v,"Range",r),b=f$10.queryNumericValue(x,"Min",r),S=f$10.queryNumericValue(x,"Max",r);g=g||S,y=y||b;var w=f$10.queryFirstNode(n,"Extensions",r),C=f$10.queryStringValue(w,"FileType",r);f$10.queryStringValue(w,"TileSplitType",r);var T=f$10.queryBooleanValue(w,"TextureSharing",r),P=f$10.queryBooleanValue(w,"TransparencyOptimization",r),E=f$10.queryStringValue(w,"VertexWeightMode",r),A=f$10.queryStringValue(w,"ProcessType",r),L={};(we=t.split("?")).length>1&&(L=m$19(we[1]),t=we[0]);for(var M=new h$1f(i===tt$2.oss?t.substring(0,t.lastIndexOf("/")+1):t.replace(/config$/g,"data/path/")),I=[],O=/\\+/g,D=f$10.queryFirstNode(n,"Tiles",r),R=!1,N=0,F=(Ce=f$10.queryNodes(D,"Tile",r)).length;N<F;N++){var B=Ce[N],z=(De=f$10.queryStringValue(B,"Url",r)).lastIndexOf(".");".s3mbz"===De.substring(z,De.length)&&(R=!0);var G=o$17(De=(De=De.replace(O,"/")).replace(/(\.s3mbz)|(\.s3mb)|(\.osgb)/gi,"")),k=a$J(De);(Re={}).relativePath=new h$1f(G),Re.name=k;var U=f$10.queryFirstNode(B,"Boundingbox",r);if(t$$(U)){var V=f$10.queryFirstNode(U,"Min",r),W=f$10.queryFirstNode(U,"Max",r),H=f$10.queryNumericValue(V,"X",r),Y=f$10.queryNumericValue(V,"Y",r),j=f$10.queryNumericValue(V,"Z",r),q=f$10.queryNumericValue(W,"X",r),X=f$10.queryNumericValue(W,"Y",r),K=f$10.queryNumericValue(W,"Z",r),Z=new c$19;c$19.fromCornerPoints(new a$11(H,Y,j),new a$11(q,X,K),Z),Re.bSphere=Z}I.push(Re)}return{position:{lon:s,lat:l,height:u},fileType:C,maxInstensity:0,minInstensity:0,maxHeight:m,minHeight:_,maxCategory:g,minCategory:y,layerBounds:J,baseUri:M,rootEntities:I,isTextureShare:T,urlArguments:L,isS3MB:!0,isS3MZ:R,processType:A,dataType:o,isTransparencyOptimization:P,vertexWeightMode:E}}C=f$10.queryStringValue(n,"FileType",r),T=f$10.queryBooleanValue(n,"TextureSharing",r),P=f$10.queryBooleanValue(n,"TransparencyOptimization",r),E=f$10.queryStringValue(n,"VertexWeightMode",r);var J,Q=f$10.queryFirstNode(n,"InstensityRange",r),ee=f$10.queryNumericValue(Q,"MinInstensity",r),te=f$10.queryNumericValue(Q,"MaxInstensity",r),ie=(p=f$10.queryFirstNode(n,"HeightRange",r),_=f$10.queryNumericValue(p,"MinHeight",r),m=f$10.queryNumericValue(p,"MaxHeight",r),$=f$10.queryFirstNode(n,"CategoryRange",r),g=f$10.queryNumericValue($,"MaxCategory",r),y=f$10.queryNumericValue($,"MinCategory",r),A=f$10.queryStringValue(n,"ProcessType",r),a=f$10.queryFirstNode(n,"Position",r),s=f$10.queryNumericValue(a,"X",r),l=f$10.queryNumericValue(a,"Y",r),u=f$10.queryNumericValue(a,"Z",r),f$10.queryFirstNode(n,"Bounds",r)),ne=f$10.queryFirstNode(n,"BoundingBox",r),re=f$10.queryStringValue(n,"IDFieldName",r),oe=f$10.queryStringValue(n,"AttributeExtentName",r);if(t$$(ie)){c=f$10.queryNumericValue(ie,"Left",r),h=f$10.queryNumericValue(ie,"Top",r),d=f$10.queryNumericValue(ie,"Right",r),f=f$10.queryNumericValue(ie,"Bottom",r);J=s$1p.fromDegrees(c,f,d,h)}else if(t$$(ne)){var ae=f$10.queryNumericValue(ne,"MinX",r),se=f$10.queryNumericValue(ne,"MinY",r);f$10.queryNumericValue(ne,"MinZ",r);var le=f$10.queryNumericValue(ne,"MaxX",r),ue=f$10.queryNumericValue(ne,"MaxY",r);f$10.queryNumericValue(ne,"MaxZ",r),ae=180*Math.abs(ae)/(6378137*Math.PI),se=180*Math.abs(se)/(6378137*Math.PI),le=180*Math.abs(le)/(6378137*Math.PI),ue=180*Math.abs(ue)/(6378137*Math.PI),J=s$1p.fromDegrees(s-ae,l-se,s+le,l+ue)}else J=s$1p.fromDegrees(s-1e-5,l-1e-5,s+1e-5,l+1e-5);var ce=void 0,he=f$10.queryNodes(n,"Vol",r);if(t$$(he)&&he.length>0){var de=[],fe=[],pe=[],_e=[];for(N=0,F=he.length;N<F;N++){var me=he[N],$e=f$10.queryStringValue(me,"Name",r);de.push($e);var ge=f$10.queryStringValue(me,"AttachFileExt",r);_e.push(ge);var ye=f$10.queryFirstNode(me,"VolumeValueRange",r);if(t$$(ye)){var ve=f$10.queryNumericValue(ye,"MinValue",r),xe=f$10.queryNumericValue(ye,"MaxValue",r);fe.push(xe),pe.push(ve)}}ce={bVolume:!0,strVolumeExts:_e,volNames:de,maxValues:fe,minValues:pe}}var be=f$10.queryFirstNode(n,"VolumeValueRange",r);if(t$$(be)){ve=f$10.queryNumericValue(be,"MinValue",r),xe=f$10.queryNumericValue(be,"MaxValue",r);var Se=f$10.queryStringValue(n,"AttachFileExt",r);t$$(ce)?(ce.volNames.push(""),ce.maxValues.push(xe),ce.minValues.push(ve)):ce={bVolume:!0,strVolumeExts:[Se],volNames:[""],maxValues:[xe],minValues:[ve]}}var we;L={};(we=t.split("?")).length>1&&(L=m$19(we[1]),t=we[0]);M=new h$1f(i===tt$2.oss?t.substring(0,t.lastIndexOf("/")+1):t.replace(/config$/g,"data/path/")),I=[],O=/\\+/g,D=f$10.queryFirstNode(n,"OSGFiles",r);var Ce,Te=!1;if((Ce=f$10.queryNodes(D,"Files",r)).length>0)for(N=0,F=Ce.length;N<F;N++){B=Ce[N];(De=f$10.queryStringValue(B,"FileName",r)).endsWith(".osgb")&&(Te=!0);G=o$17(De=(De=De.replace(O,"/")).replace(/(\.s3m)|(\.osgb)/gi,"")),k=a$J(De);(Re={}).relativePath=new h$1f(G),Re.name=k;var Pe=f$10.queryFirstNode(B,"BoundingSphere",r);if(t$$(Pe)&&Pe.childNodes.length){var Ee=f$10.queryNumericValue(Pe,"CenterX",r),Ae=f$10.queryNumericValue(Pe,"CenterY",r),Le=f$10.queryNumericValue(Pe,"CenterZ",r),Me=f$10.queryNumericValue(Pe,"Radius",r),Ie=new a$11(Ee,Ae,Le);Re.bSphere=new c$19(Ie,Me)}I.push(Re)}else{var Oe=f$10.queryNodes(D,"FileName",r);for(N=0,F=Oe.length;N<F;N++){var De;(De=Oe[N].textContent).endsWith(".osgb")&&(Te=!0);var Re;G=o$17(De=(De=De.replace(O,"/")).replace(/(\.s3m)|(\.osgb)/gi,"")),k=a$J(De);(Re={}).relativePath=new h$1f(G),Re.name=k,I.push(Re)}}var Ne=void 0,Fe=f$10.queryFirstNode(n,"Levels",r);if(t$$(Fe)){var Be=f$10.queryNodes(Fe,"Level",r);t$$(Be)&&Be.length>0&&(Ne=parseInt(Be[0].textContent))}return{position:{lon:s,lat:l,height:u},fileType:C,maxInstensity:te,minInstensity:ee,maxHeight:m,minHeight:_,maxCategory:g,minCategory:y,processType:A,layerBounds:J,volumeObj:ce,baseUri:M,rootEntities:I,urlArguments:L,isTextureShare:T,isS3MB:!1,isOSGB:Te,isTransparencyOptimization:P,vertexWeightMode:E,level:Ne,idFieldName:re,attributeExtentName:oe}}function Bi(e,t,i){e.asset,e.version;var n=e.dataType;e.pyramidSplitType,e.lodType;var r,o,a,s,l=e.position.x,u=e.position.y,c=e.position.z,h=e.position.units;if(t$$(e.geoBounds)){var d=e.geoBounds.left,f=e.geoBounds.top,p=e.geoBounds.right,_=e.geoBounds.bottom;d>180||_>180||p>180||f>180?(d>20037508.342789244&&(d-=20037508.342789244*Math.floor(d/20037508.342789244)),p>20037508.342789244&&(p-=20037508.342789244*Math.floor(p/20037508.342789244)),f>10018754.171394622&&(f-=20037508.342789244*Math.floor((f+10018754.171394622)/20037508.342789244)),_>10018754.171394622&&(_-=20037508.342789244*Math.floor((_+10018754.171394622)/20037508.342789244)),k=new s$1p(d/=6378137,_/=6378137,p/=6378137,f/=6378137)):k=s$1p.fromDegrees(d,_,p,f)}if(t$$(e.heightRange)&&(r=e.heightRange.min,o=e.heightRange.max),t$$(e.wDescript)){var m=e.wDescript.range;a=m.min,s=m.max}else if(t$$(e.vertexAttributeDescript))for(let t=0;t<e.vertexAttributeDescript.length;t++){var $=e.vertexAttributeDescript[t];if("VertexWeight"==$.category){a=$.range.min[0],s=$.range.max[0];break}}var g,y,v,x,b,S,w,C,T,P,E,A,L,M=e.extensions,I=!0,O=-1;if(M.hasOwnProperty("s3m:FileType")&&(g=M["s3m:FileType"]),M.hasOwnProperty("s3m:TileSplitType")&&M["s3m:TileSplitType"],M.hasOwnProperty("s3m:ProcessType")&&(S=M["s3m:ProcessType"]),M.hasOwnProperty("IDFieldName")&&(w=M.IDFieldName),M.hasOwnProperty("textureLOD")&&(I="TRUE"===M.textureLOD),M.hasOwnProperty("s3m:MaterialType")&&(T=M["s3m:MaterialType"]),M.hasOwnProperty("globeType")&&(A=M.globeType),M.hasOwnProperty("temporalCount")&&(O=parseInt(M.temporalCount)),M.hasOwnProperty("levels"))for(var D=0,R=M.levels.length;D<R;D++){L=M.levels[D].level;break}M.hasOwnProperty("sml:Level")&&(L=parseInt(M["sml:Level"])),M.hasOwnProperty("s3m:TextureSharing")&&(y="TRUE"===M["s3m:TextureSharing"]),M.hasOwnProperty("s3m:TransparencyOptimization")&&(v="TRUE"===M["s3m:TransparencyOptimization"]),M.hasOwnProperty("s3m:VertexCompressionType")&&(x=M["s3m:VertexCompressionType"]),M.hasOwnProperty("s3m:VertexWeightMode")&&(b=M["s3m:VertexWeightMode"]),M.hasOwnProperty("s3m:AttributeExtentName")&&(C=M["s3m:AttributeExtentName"]),M.hasOwnProperty("associateMaterialUrl")&&(P=M.associateMaterialUrl),M.hasOwnProperty("hasAttributeIndex")&&(E="TRUE"==M.hasAttributeIndex);var N=[],F=new e$1F;if(M.hasOwnProperty("pointCloudLayers"))for(D=0,R=M.pointCloudLayers.length;D<R;D++){var B=M.pointCloudLayers[D].layerName;if(t$$(B)){var z=M.pointCloudLayers[D].layerBounds;N.push(B),F.set(B,z)}else{var G=M.pointCloudLayers[D].layer,k=new s$1p;F.set(G,k),N.push(G)}}var U=void 0,V=e.extensions.vol;if(t$$(V)&&V.length>0)for(var W=[],H=[],Y=[],j=[],q=(D=0,V.length);D<q;D++){var X=V[D],K=X.volName;W.push(K);var Z=X.volType;j.push(Z);var J=X.volRangeMin,Q=X.volRangeMax;H.push(Q),Y.push(J),U={bVolume:!0,strVolumeExts:j,volNames:W,maxValues:H,minValues:Y}}var ee=void 0,te=e.extensions.map;if(t$$(te)&&te.length>0){var ie=[],ne=[];for(D=0,q=te.length;D<q;D++){var re=te[D];K=re.mapName;ie.push(K);Z=re.dataType;ne.push(Z),ee={mapExts:ne,mapNames:ie}}}var oe={},ae=t.split("?");ae.length>1&&(oe=m$19(ae[1]),t=ae[0]);var se=new h$1f(i===tt$2.oss?t.substring(0,t.lastIndexOf("/")+1):t.replace(/config$/g,"data/path/")),le=[],ue=/\\+/g,ce=!1,he=!1,de=!1,fe=e.tiles||e.rootTiles;for(D=0,R=fe.length;D<R;D++)if(t$$(fe[D])){var pe=fe[D].url,_e=pe.lastIndexOf("."),me=pe.substring(_e,pe.length);".s3mbz"===me?ce=!0:".s3mblock"===me?he=!0:".osgb"===me&&(de=!0);var $e=o$17(pe=(pe=pe.replace(ue,"/")).replace(/(\.s3mblock)|(\.s3mbz)|(\.s3mb)|(\.osgb)/gi,"")),ge=a$J(pe),ye={};if(ye.relativePath=new h$1f($e),ye.name=ge,t$$(fe[D].boundingbox))if(t$$(fe[D].boundingbox.center))ye.obb=fe[D].boundingbox;else{var ve=fe[D].boundingbox.min.x,xe=fe[D].boundingbox.min.y,be=fe[D].boundingbox.min.z,Se=fe[D].boundingbox.max.x,we=fe[D].boundingbox.max.y,Ce=fe[D].boundingbox.max.z;ye.min=new a$11(ve,xe,be),ye.max=new a$11(Se,we,Ce);var Te=new c$19;c$19.fromCornerPoints(ye.min,ye.max,Te),ye.bSphere=Te}le.push(ye)}return{position:{lon:l,lat:u,height:c,units:h},fileType:g,maxInstensity:0,minInstensity:0,maxHeight:o,minHeight:r,maxCategory:s,minCategory:a,layerBounds:k,volumeObj:U,maps:ee,baseUri:se,rootEntities:le,isTextureShare:y,urlArguments:oe,isS3MB:!0,isS3MZ:ce,isS3MBlock:he,isOSGB:de,dataType:n,isTransparencyOptimization:v,vertexCompressionType:x,vertexWeightMode:b,level:L,pointCloudLayerNames:N,processType:S,groupNameBounds:F,idFieldName:w,attributeExtentName:C,materialType:T,textureLod:I,associateMaterialUrl:P,globeType:A,temporalCount:O,hasAttributeIndex:E}}M$4.prototype.sampleHeight=function(e,t,i){if(n$1e.defined("position",e),this._mode!==b$1d.SCENE3D)throw new t$_("sampleHeight is only supported in 3D mode.");if(!this.sampleHeightSupported)throw new t$_("sampleHeight requires depth texture support. Check sampleHeightSupported.");var n=kt(this,Fr(this,e),t,i,!0,!1);if(t$$(n))return Oi(this,n.position)},M$4.prototype.clampToHeight=function(e,t,i,n){if(n$1e.defined("cartesian",e),this._mode!==b$1d.SCENE3D)throw new t$_("sampleHeight is only supported in 3D mode.");if(!this.clampToHeightSupported)throw new t$_("clampToHeight requires depth texture support. Check clampToHeightSupported.");i instanceof a$11&&(n=i,i=void 0,i$1b("clampToHeight-parameter-change","clampToHeight now takes an optional width argument before the result argument in Cesium 1.54. The previous function definition will no longer work in 1.56."));var r=kt(this,Mi(this,e),t,i,!0,!1);if(t$$(r))return a$11.clone(r.position,n)},M$4.prototype.sampleHeightMostDetailed=function(e,t,i){if(n$1e.defined("positions",e),this._mode!==b$1d.SCENE3D)throw new t$_("sampleHeightMostDetailed is only supported in 3D mode.");if(!this.sampleHeightSupported)throw new t$_("sampleHeightMostDetailed requires depth texture support. Check sampleHeightSupported.");t=t$$(t)?t.slice():t;for(var n=e.length,r=new Array(n),o=0;o<n;++o)r[o]=En(this,e[o],t,i);return c$18.all(r).then((function(t){for(var i=t.length,n=0;n<i;++n)e[n].height=t[n];return e}))},M$4.prototype.clampToHeightMostDetailed=function(e,t,i){return this._picking.clampToHeightMostDetailed(this,e,t,i)},M$4.prototype.cartesianToCanvasCoordinates=function(e,t){return u$V.wgs84ToWindowCoordinates(this,e,t)},M$4.prototype.completeMorph=function(){this._transitioner.completeMorph()},M$4.prototype.morphTo2D=function(e){var t,i=this.globe;t=t$$(i)?i.ellipsoid:this.mapProjection.ellipsoid,e=e$1Y(e,2),this._transitioner.morphTo2D(e,t)},M$4.prototype.morphToColumbusView=function(e){var t,i=this.globe;t=t$$(i)?i.ellipsoid:this.mapProjection.ellipsoid,e=e$1Y(e,2),this._transitioner.morphToColumbusView(e,t)},M$4.prototype.morphTo3D=function(e){var t,i=this.globe;t=t$$(i)?i.ellipsoid:this.mapProjection.ellipsoid,e=e$1Y(e,2),this._transitioner.morphTo3D(e,t)},M$4.prototype.getViewport=function(e){if(this._multiViewportMode!==te$5.NONE){var t=Ht(this,u$V.transformWindowToDrawingBuffer(this,e,sr));if(t>-1){var i=this._context,n=new n$13,r=this._multiViewportInfo[t];return n.x=i.drawingBufferWidth*r.x,n.y=i.drawingBufferHeight*r.y,n.width=i.drawingBufferWidth*r.width,n.height=i.drawingBufferHeight*r.height,n}}return(n=new n$13).x=0,n.y=0,n.width=this._canvas.clientWidth,n.height=this._canvas.clientHeight,n};var ve$1={},tt$2={iServer:0,oss:1};function Ai(e,t,i,n,r,o,a){a=e$1Y(a,!1),c$18(e,(function(e){if(n.fieldsInfo=e.fieldsInfo,n.indexInfoMap=e.indexInfoMap,t$$(o.isFlyMode)&&!0===o.isFlyMode&&t$$(bounds))t.camera.flyTo({destination:bounds,complete:function(){setTimeout((function(){var e=new _0x4ab4f4(n);a||t._layers.add(e,r),t$$(t._clipRegions)&&e._setServerClipRegions(t._clipRegions,1),i.resolve(e)}),1e3)}});else{var s=new _0x4ab4f4(n);a||t._layers.add(s,r),t$$(t._clipRegions)&&s._setServerClipRegions(t._clipRegions,1),i.resolve(s)}}),(function(){if(!0===o.isFlyMode)t.camera.flyTo({destination:bounds,complete:function(){var e=new _0x4ab4f4(n);a||t._layers.add(e,r),t$$(t._clipRegions)&&e._setServerClipRegions(t._clipRegions,1),i.resolve(e)}});else{var e=new _0x4ab4f4(n);a||t._layers.add(e,r),t$$(t._clipRegions)&&e._setServerClipRegions(t._clipRegions,1),i.resolve(e)}}))}function Gt(e,t,i,n,r,o,a,s){if(n.useWebsocket){var l=new o$_("websocketTaskProcessor");l.scheduleTask({data:"init",scpUrl:e});var u=e.substring(e.indexOf("datas")+6,e.indexOf("/data/path"))+".scp";l.scheduleTask({dataType:"json",data:"/"+u}).then((function(u){var c=Bi(u,e,n.serverType);c.context=t.context,c.gl=t.context._gl,c.name=r,c.supportCompressType=t._supportCompressType,c.urlType=n.urlType,c.cullEnabled=n.cullEnabled,c.horizontalLine=n.horizontalLine,c.style3D=n.style3D,c.selectEnable=n.selectable,c.isVisible=n.isVisible,c.minVisibleAltitude=n.minVisibleAltitude,c.maxVisibleAltitude=n.maxVisibleAltitude,c.minVisibleDistance=n.minVisibleDistance,c.maxVisibleDistance=n.maxVisibleDistance,c.shadowType=n.shadowType,c.heading=n.heading,c.lodRangeScale=n.lodRangeScale,c.polygonOffset=n.polygonOffset,c.brightness=n.brightness,c.constrast=n.constrast,c.hue=n.hue,c.saturation=n.saturation,c.gamma=n.gamma,c.effect=n.effect,c.ignoreNormal=e$1Y(n.ignoreNormal,!1),c.groupName=e$1Y(n.groupName,""),c.cacheKey=e$1Y(n.cacheKey,""),c._isJson=!0,c.sceneMode=t.mode,c.scene=t,c.useMercatorProject=n.useMercatorProject,c.scpUrl=a,c.queryFieldNames=n.queryFieldNames,c.subdomainConfig=n.subdomainConfig,c.customRequestHeaders=n.customRequestHeaders,c.LoadingPriority=n.LoadingPriority;var h=new _0x4ab4f4(c);h._wstTaskProcessor=l,s||t._layers.add(h,o),t$$(t._clipRegions)&&h._setServerClipRegions(t._clipRegions,1),i.resolve(h)}))}else u$_(e,n.customRequestHeaders).then((function(l){var u=In(l,e,n.serverType);u.context=t.context,u.gl=t.context._gl,u.name=r,u.supportCompressType=t._supportCompressType,u.urlType=n.urlType,u.cullEnabled=n.cullEnabled,u.horizontalLine=n.horizontalLine,u.style3D=n.style3D,u.selectEnable=n.selectable,u.isVisible=n.isVisible,u.minVisibleAltitude=n.minVisibleAltitude,u.maxVisibleAltitude=n.maxVisibleAltitude,u.minVisibleDistance=n.minVisibleDistance,u.maxVisibleDistance=n.maxVisibleDistance,u.shadowType=n.shadowType,u.heading=n.heading,u.lodRangeScale=n.lodRangeScale,u.polygonOffset=n.polygonOffset,u.brightness=n.brightness,u.constrast=n.constrast,u.hue=n.hue,u.saturation=n.saturation,u.gamma=n.gamma,u.effect=n.effect,u.ignoreNormal=e$1Y(n.ignoreNormal,!1),u.groupName=e$1Y(n.groupName,""),u.cacheKey=e$1Y(n.cacheKey,""),u.customRequestHeaders=n.customRequestHeaders,u.sceneMode=t.mode,u.loadVolumeData=e$1Y(n.loadVolumeData,!0),u.scene=t,u.useMercatorProject=n.useMercatorProject,u.scpUrl=a,u.queryFieldNames=n.queryFieldNames,u.subdomainConfig=n.subdomainConfig,u.useMercatorProject=n.useMercatorProject;var c=Nn(u.baseUri,n.customRequestHeaders,n.urlType,u.scpUrl);c$18(Rn(l,u.baseUri,n.customRequestHeaders),(function(e){u.waterEffectSet=e,c$18(c,(function(e){if(u.fieldsInfo=e,t$$(n.isFlyMode)&&!0===n.isFlyMode&&t$$(bounds))t.camera.flyTo({destination:bounds,complete:function(){setTimeout((function(){var e=new _0x4ab4f4(u);t._layers.add(e,o),i.resolve(e)}),1e3)}});else{var r=new _0x4ab4f4(u);s||t._layers.add(r,o),t$$(t._clipRegions)&&r._setServerClipRegions(t._clipRegions,1),i.resolve(r)}}),(function(){if(!0===n.isFlyMode)t.camera.flyTo({destination:bounds,complete:function(){var e=new _0x4ab4f4(u);t._layers.add(e,o),i.resolve(e)}});else{var e=new _0x4ab4f4(u);s||t._layers.add(e,o),t$$(t._clipRegions)&&e._setServerClipRegions(t._clipRegions,1),i.resolve(e)}}))}),(function(){c$18(c,(function(e){if(u.fieldsInfo=e,t$$(n.isFlyMode)&&!0===n.isFlyMode&&t$$(bounds))t.camera.flyTo({destination:bounds,complete:function(){setTimeout((function(){var e=new _0x4ab4f4(u);s||t._layers.add(e,o),i.resolve(e)}),1e3)}});else{var r=new _0x4ab4f4(u);s||t._layers.add(r,o),t$$(t._clipRegions)&&r._setServerClipRegions(t._clipRegions,1),i.resolve(r)}}),(function(){if(!0===n.isFlyMode)t.camera.flyTo({destination:bounds,complete:function(){var e=new _0x4ab4f4(u);t._layers.add(e,o),i.resolve(e)}});else{var e=new _0x4ab4f4(u);s||t._layers.add(e,o),t$$(t._clipRegions)&&e._setServerClipRegions(t._clipRegions,1),i.resolve(e)}}))}))}),(function(l){u$$(e,n.customRequestHeaders).then((function(l){var u=Bi(l,e,n.serverType);u.context=t.context,u.gl=t.context._gl,u.name=r,u.supportCompressType=t._supportCompressType,u.urlType=n.urlType,u.cullEnabled=n.cullEnabled,u.horizontalLine=n.horizontalLine,u.style3D=n.style3D,u.selectEnable=n.selectable,u.isVisible=n.isVisible,u.minVisibleAltitude=n.minVisibleAltitude,u.maxVisibleAltitude=n.maxVisibleAltitude,u.minVisibleDistance=n.minVisibleDistance,u.maxVisibleDistance=n.maxVisibleDistance,u.shadowType=n.shadowType,u.heading=n.heading,u.lodRangeScale=n.lodRangeScale,u.polygonOffset=n.polygonOffset,u.brightness=n.brightness,u.constrast=n.constrast,u.hue=n.hue,u.saturation=n.saturation,u.gamma=n.gamma,u.effect=n.effect,u.ignoreNormal=e$1Y(n.ignoreNormal,!1),u.groupName=e$1Y(n.groupName,""),u.cacheKey=e$1Y(n.cacheKey,""),u._isJson=!0,u.sceneMode=t.mode,u.scene=t,u.useMercatorProject=n.useMercatorProject,u.scpUrl=a,u.queryFieldNames=n.queryFieldNames,u.subdomainConfig=n.subdomainConfig,u.customRequestHeaders=n.customRequestHeaders,u.useMercatorProject=n.useMercatorProject;var c=Pn(u.baseUri,n.customRequestHeaders,u.attributeExtentName,u.urlType);c$18(kn(l,u.baseUri,n.customRequestHeaders),(function(e){u.waterEffectSet=e,Ai(c,t,i,u,o,n,s)}),(function(){Ai(c,t,i,u,o,n,s)}))}),(function(e){i.reject("add s3m layer failed,"+e)}))})).otherwise((function(e){i.reject("add s3m layer failed,"+e)}))}function Wi(e,t,i){var n=i&&i.lexicographical,r=i&&i.zeroExtend,o=e.split("."),a=t.split(".");function s(e){return(n?/^\d+[A-Za-z]*$/:/^\d+$/).test(e)}if(!o.every(s)||!a.every(s))return NaN;if(r){for(;o.length<a.length;)o.push("0");for(;a.length<o.length;)a.push("0")}n||(o=o.map(Number),a=a.map(Number));for(var l=0;l<o.length;++l){if(a.length==l)return 1;if(o[l]!=a[l])return o[l]>a[l]?1:-1}}function Fn(e,t,i){return u$$(e,i).then((function(i){if(!(i.length<1)){var n=void 0;if(t$$(t)){for(var r=0;r<i.length;r++){var o=i[r];if(o.name===t){n=o;break}}if(!t$$(n))return void console.error("no named scene was found!")}else n=i[0];var a=new h$1f(e);return a.path=new h$1f(n.path).path,{name:n.name,path:a.toString()}}}))}function Ln(e,t,i){var n=e+"/layers.json";return t$$(a$R.CREDENTIAL)&&(n=t$$(a$R.CREDENTIAL._keymap[i])?a$R.addTokenWithKey(i,n):a$R.addToken(n)),u$$(n,t).then((function(e){for(var t={s3m:[],imagery:[],s3mGroup:[],terrain:void 0},i=0,n=e.length;i<n;i++){var r=e[i],o=r.layer3DType;"OSGBLayer"==o?t.s3m.push(r):"ImageFileLayer"==o?t.imagery.push(r):"TerrainFileLayer"==o?t.terrain=r:"OSGBGroup"==o&&t.s3mGroup.push(r)}return t}))}M$4.prototype.addS3MTilesLayerByScp=function(e,t,i,n){t=e$1Y(t,{});var r=/({.*?})/g;if(e.indexOf("?token")>-1){var o=new h$1f(e),a=m$19(o.query);o.query=void 0,e=o.toString();var s={};if(t$$(t.subdomains))for(let i=0;i<t.subdomains.length;i++){var l=e.replace(/({.*?})/g,t.subdomains[i]);s={rooturl:l,type:"token",value:a.token},t$$(a$R.CREDENTIAL)?l in a$R.CREDENTIAL._keymap||a$R.CREDENTIAL.addCredential([s]):a$R.CREDENTIAL=new a$R([s])}else{if(r.test(e))throw new t$_("detected subdomain url scheme, but no subdomain provided.");s={rooturl:e,type:"token",value:a.token},t$$(a$R.CREDENTIAL)?e in a$R.CREDENTIAL._keymap||a$R.CREDENTIAL.addCredential([s]):a$R.CREDENTIAL=new a$R([s])}}if(!t$$(e))throw new t$_("add s3m tiles layer,url is required.");if(t$$(t.subdomains))e=e.replace(r,(function(e,i){if(!t$$(t.subdomains.length))throw new t$_("detected subdomain url scheme, but no subdomain provided.");if("{s}"===i)return t.subdomains[0]}));else if(r.test(e))throw new t$_("detected subdomain url scheme, but no subdomain provided.");t=t||{};var u=c$18.defer();n=e$1Y(n,!1);var c,h,d=e,f=e$1Y(t.name,a$J(d)),p=this;if((-1!==e.indexOf("ws://")||-1!==e.indexOf("wss://"))&&(t.useWebsocket=!0),t.useWebsocket)return Gt(d,p,u,t,f,i,_,n),u.promise;(c=-1!==e.indexOf("aliyuncs")||-1!==e.indexOf("oss-cn")?tt$2.oss:tt$2.iServer)===tt$2.iServer&&(h=1===t.urlType?e+"&authentication=login":e.substring(0,e.indexOf("rest/realspace")+14));var _=e;return t$$(a$R.CREDENTIAL)&&(d=t$$(a$R.CREDENTIAL._keymap[d])?a$R.addTokenWithKey(d,d):a$R.addToken(d)),c===tt$2.iServer?(t.serverType=tt$2.iServer,t$$(this.RSAAuthenticationStatus[h])?(0===this.RSAAuthenticationStatus[h]&&(t$$(ve$1[h])||(ve$1[h]={}),t$$(ve$1[h][d])||(ve$1[h][d]={_this:p,deferred:u,options:t,layerName:f,index:i})),1===this.RSAAuthenticationStatus[h]&&Gt(d,p,u,t,f,i,_,n),2===this.RSAAuthenticationStatus[h]&&u.reject("add s3m layer failed,"+d)):(this.RSAAuthenticationStatus[h]=0,Xn(h,t.urlType,t.customRequestHeaders,d).then((function(){if(p.RSAAuthenticationStatus[h]=1,Gt(d,p,u,t,f,i,_,n),t$$(ve$1[h]))for(var e in ve$1[h]){var r=e$1Y(ve$1[h][e].options.groupName,n);Gt(e,ve$1[h][e]._this,ve$1[h][e].deferred,ve$1[h][e].options,ve$1[h][e].layerName,ve$1[h][e].index,void 0,r),delete ve$1[h][e]}}),(function(e){p.RSAAuthenticationStatus[h]=2,delete ve$1[h],u.reject("add s3m layer failed,"+e.url)})).otherwise((function(e){p.RSAAuthenticationStatus[h]=2,delete ve$1[h],u.reject("add s3m layer failed,"&e.url)})))):(t.serverType=tt$2.oss,Gt(d,p,u,t,f,i,_,n)),u.promise},M$4.prototype.addS3MGroupLayer=function(e,t,i){if(!t$$(e))throw new t$_("add S3MGroup layer,url is required.");t=t||{};var n=e;t$$(a$R.CREDENTIAL)&&(n=a$R.addToken(n));var r=e$1Y(t.name,a$J(n)),o=this,a=c$18.defer();return u$$(n).then((function(e){var t={name:r,url:n,layerBounds:e.geobounds,layers:e.layers,scene:o},a=new _0x74832c(t);o._layers.add(a,i)})).otherwise((function(e){a.reject("add S3MGroup layer failed,"+e)})),a.promise};var Mn=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,Hi=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)\)$/i;function Ut(e,t,i){return t$$(i)||(i=c$18.defer()),u$_(e,t).then((function(n){try{var r=On(n);i.resolve(r)}catch{Ut(e,t,i)}})).otherwise((function(){Ut(e,t,i)})),i.promise}function On(e){if(!t$$(e))throw new t$_("get s3m layer config failed,xml document undefined.");var t,i=e.firstChild,n=i.namespaceURI,r=f$10.queryStringValue(i,"LayerName",n),o=f$10.queryFirstNode(i,"GeoBounds",n);if(t$$(o)){var a=f$10.queryNumericValue(o,"bottom",n),s=f$10.queryNumericValue(o,"left",n),l=f$10.queryNumericValue(o,"top",n),u=f$10.queryNumericValue(o,"right",n);s>180||a>180||u>180||l>180?(s>20037508.342789244&&(s-=20037508.342789244*Math.floor(s/20037508.342789244)),u>20037508.342789244&&(u-=20037508.342789244*Math.floor(u/20037508.342789244)),l>10018754.171394622&&(l-=20037508.342789244*Math.floor((l+10018754.171394622)/20037508.342789244)),a>10018754.171394622&&(a-=20037508.342789244*Math.floor((a+10018754.171394622)/20037508.342789244)),t=new s$1p(s/=6378137,a/=6378137,u/=6378137,l/=6378137)):t=s$1p.fromDegrees(s,a,u,l)}var c=f$10.queryFirstNode(i,"Options",n),h=f$10.queryStringValue(i,"WithinLayer3DGroup",n),d=f$10.queryBooleanValue(c,"Selectable",n),f=f$10.queryBooleanValue(c,"Visible",n),p=f$10.queryNumericValue(c,"VisibleAltitudeMin",n),_=f$10.queryNumericValue(c,"VisibleAltitudeMax",n);_=0==_?Number.MAX_VALUE:_;var m=f$10.queryNumericValue(c,"VisibleDistanceMin",n),$=f$10.queryNumericValue(c,"VisibleDistanceMax",n),g=f$10.queryStringValue(c,"ShadowType",n),y=0;"SELECTION"==g?y=1:"ALL"==g&&(y=2);var v=!1;"S3MB"==f$10.queryStringValue(i,"CacheFileType",n)&&(v=!0);var x=f$10.queryFirstNode(i,"Style",n);if(!t$$(x)){var b=f$10.queryFirstNode(i,"LayerStyle",n);if(t$$(b)&&!t$$(x=f$10.queryFirstNode(b,"Style",n)))throw new t$_("get s3m layer config failed,extendxml.xml foamat error,layer name is "+r)}var S=f$10.queryNumericValue(x,"LineWidth",n),w=f$10.queryStringValue(x,"FillForeColor",n),C=Mn.exec(w),T=new e$1z;if(null!==C){var P=parseFloat(C[1]);P=189==P?255:P;var E=parseFloat(C[2]);E=235==E?255:E,T.red=n$1d.clamp(P/255,0,1),T.green=n$1d.clamp(E/255,0,1),T.blue=n$1d.clamp(parseFloat(C[3])%256/255,0,1),T.alpha=n$1d.clamp(parseFloat(C[3])%65536/256/255,0,1)}var A=f$10.queryFirstNode(x,"Style3D",n),L=new e$D;if(t$$(A)){var M=f$10.queryStringValue(A,"Fill3DMode",n),I=vr.Fill;"FILL_LINE"==M?I=vr.WireFrame:"FILL_FACEANDLINE"==M&&(I=vr.Fill_And_WireFrame);var O=f$10.queryNumericValue(A,"PointSize",n),D=f$10.queryStringValue(A,"LineColor",n),R=(C=Hi.exec(D),new e$1z);null!==C&&(R.red=n$1d.clamp(parseFloat(C[1]),0,1),R.green=n$1d.clamp(parseFloat(C[2]),0,1),R.blue=n$1d.clamp(parseFloat(C[3]),0,1),R.alpha=n$1d.clamp(parseFloat(C[4]),0,1));var N=f$10.queryNumericValue(x,"MarkerSize",n)||0;N*=2,O=Math.max(O,N);var F=f$10.queryStringValue(A,"ColorPoint",n);C=Hi.exec(F);var B=new e$1z;null!==C&&(B.red=n$1d.clamp(parseFloat(C[1]),0,1),B.green=n$1d.clamp(parseFloat(C[2]),0,1),B.blue=n$1d.clamp(parseFloat(C[3]),0,1),B.alpha=n$1d.clamp(parseFloat(C[4]),0,1));var z=f$10.queryNumericValue(A,"BottomAltitude",n);f$10.queryStringValue(A,"AltitudeMode",n);var G=f$10.queryStringValue(A,"BillboardMode",n),k=f$10.queryBooleanValue(A,"FixedPixelSize",n);G="AUTO_Z_AXIAL"==G?Cr$2.FixedZ:"FIXED_ANGLE"==G?Cr$2.FixedXYZ:Cr$2.None;var U=n$1d.toRadians(f$10.queryNumericValue(A,"RotateX",n)),V=n$1d.toRadians(f$10.queryNumericValue(A,"RotateY",n)),W=n$1d.toRadians(f$10.queryNumericValue(A,"RotateZ",n));new e$1L(U,V,W),L.fillForeColor=T,L.bottomAltitude=z,L.lineWidth=S,L.lineColor=R,L.pointSize=O,L.pointColor=B,L.fillStyle=I,L.billboardMode=G,L.fixedPixelSize=k}var H=void 0,Y=f$10.queryFirstNode(i,"Effect",n);if(t$$(Y)){var j=f$10.queryStringValue(Y,"EffectType",n);if("Region"===j){H=new _0x4f5b3a;var q=f$10.queryNumericValue(Y,"Type",n);H.setValue("RegionType",q);var X=f$10.queryNumericValue(Y,"ForeColor",n),K=e$1z.fromRgba(X);H.setValue("ForeColor",K);var Z=f$10.queryNumericValue(Y,"BackColor",n),J=e$1z.fromRgba(Z);H.setValue("BackColor",J);var Q=f$10.queryNumericValue(Y,"WidthX",n);H.setValue("WidthX",Q);var ee=f$10.queryNumericValue(Y,"WidthY",n);H.setValue("WidthY",ee);var te=f$10.queryNumericValue(Y,"OffsetX",n);H.setValue("OffsetX",te);var ie=f$10.queryNumericValue(Y,"OffsetY",n);H.setValue("OffsetY",ie);var ne=f$10.queryNumericValue(Y,"RepeatX",n);H.setValue("RepeatX",ne);var re=f$10.queryNumericValue(Y,"RepeatY",n);H.setValue("RepeatY",re);var oe=f$10.queryNumericValue(Y,"RotationAngle",n);H.setValue("RotationAngle",oe)}else if("Polyline"===j){H=new _0x840433;q=f$10.queryNumericValue(Y,"Type",n);H.setValue("PolylineType",q);var ae=f$10.queryNumericValue(Y,"Color",n),se=e$1z.fromRgba(ae);H.setValue("Color",se);var le=f$10.queryNumericValue(Y,"Width",n);H.setValue("Width",le);var ue=f$10.queryBooleanValue(Y,"IsArrow",n);H.setValue("IsArrow",ue);var ce=f$10.queryNumericValue(Y,"GapColor",n),he=e$1z.fromRgba(ce);H.setValue("GapColor",he);var de=f$10.queryNumericValue(Y,"DashLength",n);H.setValue("DashLength",de);var fe=f$10.queryNumericValue(Y,"DashPattern",n);H.setValue("DashPattern",fe);var pe=f$10.queryBooleanValue(Y,"IsMove",n);H.setValue("IsMove",pe);var _e=f$10.queryNumericValue(Y,"GlowPower",n);H.setValue("GlowPower",_e);var me=f$10.queryNumericValue(Y,"OutlineColor",n),$e=e$1z.fromRgba(me);H.setValue("OutlineColor",$e);var ge=f$10.queryNumericValue(Y,"OutlineWidth",n);H.setValue("OutlineWidth",ge)}}var ye=f$10.queryNumericValue(i,"LODRangeScale",n),ve=f$10.queryFirstNode(i,"PolygonOffset",n),xe=f$10.queryNumericValue(ve,"Constant",n),be=f$10.queryNumericValue(ve,"SlopeScale",n),Se=0!==xe&&0!==be,we=f$10.queryFirstNode(i,"ColorParams",n);return{name:r,groupName:h,layerBounds:t,isS3MB:v,style3D:L,selectEnable:d,isVisible:f,minVisibleAltitude:p,maxVisibleAltitude:_,minVisibleDistance:m,maxVisibleDistance:$,shadowType:y,heading:W,lodRangeScale:ye,polygonOffset:{enabled:Se,units:xe,factor:be},brightness:f$10.queryNumericValue(we,"Brightness",n),constrast:f$10.queryNumericValue(we,"Constrast",n),hue:f$10.queryNumericValue(we,"Hue",n),saturation:f$10.queryNumericValue(we,"Saturation",n),gamma:f$10.queryNumericValue(we,"Gamma",n),effect:H}}function qn(e,t){return u$$(e,t).then((function(e){return e}))}M$4.prototype.open=function(e,t,i){i=e$1Y(i,{});var n=/({.*?})/g;if(e.indexOf("?token")>-1&&e.indexOf("realspace")>-1){var r=new h$1f(e),o=m$19(r.query);r.query=void 0,e=r.toString();var a={};if(t$$(i.subdomains))for(let t=0;t<i.subdomains.length;t++){var s=e.replace(/({.*?})/g,i.subdomains[t]);a={rooturl:s,type:"token",value:o.token},t$$(a$R.CREDENTIAL)?s in a$R.CREDENTIAL._keymap||a$R.CREDENTIAL.addCredential([a]):a$R.CREDENTIAL=new a$R([a])}else{if(n.test(e))throw new t$_("detected subdomain url scheme, but no subdomain provided.");a={rooturl:e,type:"token",value:o.token},t$$(a$R.CREDENTIAL)?e in a$R.CREDENTIAL._keymap||a$R.CREDENTIAL.addCredential([a]):a$R.CREDENTIAL=new a$R([a])}}if("realspace"!=e.slice(-9))throw new t$_("open scene url error!");i=e$1Y(i,{}),this.customRequestHeaders=e$1Y(this.customRequestHeaders,i.customRequestHeaders);var l=e$1Y(i.useMercatorProject,!1),u=e$1Y(i.autoSetView,!0),c=e,h=i.subdomains;if(t$$(h))e=e.replace(n,(function(e,t){if(!t$$(h.length))throw new t$_("detected subdomain url scheme, but no subdomain provided.");if("{s}"===t)return h[0]}));else if(n.test(e))throw new t$_("detected subdomain url scheme, but no subdomain provided.");var d=e+"/scenes.json";t$$(a$R.CREDENTIAL)&&(d=t$$(a$R.CREDENTIAL._keymap[e])?a$R.addTokenWithKey(e,d):a$R.addToken(d));var f=this,p=this.camera,_=c$18.defer();return Fn(d,t,f._customRequestHeaders).then((function(t){if(t$$(t)){var i=t.path.indexOf("?");-1!==i&&(t.path=t.path.substring(0,i));var n=t.path+".json";t$$(a$R.CREDENTIAL)&&(n=t$$(a$R.CREDENTIAL._keymap[e])?a$R.addTokenWithKey(e,n):a$R.addToken(n)),qn(n,f._customRequestHeaders).then((function(t){try{var i,n;if(t$$(t.clipRegions)){for(var r=[],o=0;o<t.clipRegions.length;o++){for(var a=[],s=0;s<t.clipRegions[o].points.length;s++)a.push(t.clipRegions[o].points[s].x),a.push(t.clipRegions[o].points[s].y),a.push(t.clipRegions[o].points[s].z||0);r.push(a)}f._clipRegions=r}n=-1!==e.indexOf("/iserver")?e.substring(0,e.indexOf("/iserver")+8)+"/_setup.json":e.substring(0,e.indexOf("/realspace")+10)+"/_setup.json",t$$(a$R.CREDENTIAL)&&(n=t$$(a$R.CREDENTIAL._keymap[e])?a$R.addTokenWithKey(e,n):a$R.addToken(n)),"NONEARTHFLAT"===t.sceneType?(f.mode=b$1d.COLUMBUS_VIEW,u$$(n,f._customRequestHeaders).then((function(e){if(!t$$(e.systemUGOVersion)||Wi("11.1.0.22305",e.systemUGOVersion)>0?t.camera.tilt-=Math.PI:t.camera.tilt-=Math.PI/2,i=new a$11(t.camera.longitude,t.camera.latitude,t.camera.altitude),l){var n=(new e$1H).unproject(i);i=f.camera._projection.project(n)}var r=i.x,o=i.y;r>20037508.342789244&&(r-=20037508.342789244*Math.floor(r/20037508.342789244)),o>10018754.171394622&&(o-=20037508.342789244*Math.floor((o+10018754.171394622)/20037508.342789244)),i.x=r,i.y=o,u&&p.setView({destination:i,orientation:{heading:t.camera.heading,pitch:t.camera.tilt,roll:0},convert:!1})}))):(t.camera.tilt-=90,i=a$11.fromDegrees(t.camera.longitude,t.camera.latitude,t.camera.altitude),u&&p.setView({destination:i,orientation:{heading:n$1d.toRadians(t.camera.heading),pitch:n$1d.toRadians(t.camera.tilt),roll:0},convert:!1}),u$$(n,f._customRequestHeaders).then((function(e){if((!t$$(e.systemUGOVersion)||Wi("10.1.0.18325",e.systemUGOVersion)>0)&&-90!==t.camera.tilt){var n=new n$18(i,p.direction),r=h$1b.rayEllipsoid(n,n$1c.WGS84);if(r){var o=a$11.normalize(i,new a$11);a$11.negate(o,o);var a=new n$18(i,o),s=h$1b.rayEllipsoid(a,n$1c.WGS84);if(s){var l=r.start>0?r.start:r.stop,u=n$18.getPoint(n,l,new a$11),c=s.start>0?s.start:s.stop,h=n$18.getPoint(a,c,new a$11),d=a$11.cross(u,h,new a$11),f=a$11.angleBetween(u,h);p.rotate(d,-f)}}}})))}catch(e){_.reject("camera set view failed,"+e)}})).otherwise((function(e){_.reject("get scene config failed,"+e)})),Ln(t.path,f._customRequestHeaders,e).then((function(i){for(var n=i.s3m,r=i.imagery,o=i.terrain,a=i.s3mGroup,s=t.path+"/layers/",u=[],d=n.length-1,p=d;p>=0;p--){var m=n[p],$=s+encodeURIComponent(m.name)+"/extendxml.xml";t$$(a$R.CREDENTIAL)&&($=t$$(a$R.CREDENTIAL._keymap[e])?a$R.addTokenWithKey(e,$):a$R.addToken($)),function(t){t=f.layers._s3mLayerAddedIndex;var i=Ut($,f._customRequestHeaders).then((function(i){try{var n=e+"/datas/"+encodeURIComponent(i.name)+"/config";if(i.customRequestHeaders=f._customRequestHeaders,i.useMercatorProject=l,i.subdomainConfig={subdomains:h,urlScheme:c},!t$$(i.groupName)||""===i.groupName)return f.addS3MTilesLayerByScp(n,i,t);var r=f.layers.find(i.groupName),o=!r;if(!r){var a={scene:f,name:i.groupName};r=new _0x74832c(a),f.layers.add(r)}if(i.index=t,i.ready=!1,r._layerConfigs.set(n,i),r._s3mURLs[t]=n,o)return r}catch(e){_.reject("add S3M layer"+i.name+" failed,"+e)}})).otherwise((function(e){_.reject("get S3M layer config failed,"+e+",layer name is "+m.name)}));f.layers._s3mLayerAddedIndex++,t$$(i)&&u.push(i)}(d-p)}for(p=a.length-1;p>=0;p--){m=a[p],$=s+encodeURIComponent(m.name)+"/extendxml.xml";t$$(a$R.CREDENTIAL)&&($=t$$(a$R.CREDENTIAL._keymap[e])?a$R.addTokenWithKey(e,$):a$R.addToken($)),function(t){var i=Ut($,f._customRequestHeaders).then((function(i){try{var n=e+"/datas/"+encodeURIComponent(i.name)+"/config";return f.addS3MGroupLayer(n,i,t)}catch(e){_.reject("add S3MGroup layer"+i.name+" failed,"+e)}})).otherwise((function(e){_.reject("get S3MGroup layer config failed,"+e+",layer name is "+m.name)}));u.push(i)}(a.length-1-p)}for(p=r.length-1;p>=0;p--){var g=c+"/datas/"+encodeURIComponent(r[p].name),y=new U$4({url:g,subdomains:h,customRequestHeaders:f._customRequestHeaders});try{var v=f.imageryLayers.addImageryProvider(y);r[p].maxVisibleAltitude>0&&(v.maxHeight=r[p].maxVisibleAltitude,v.minHeight=r[p].minVisibleAltitude),u.push(v)}catch(e){_.reject("add imagery layer "+r[p].name+" failed,"+e)}}if(t$$(o)){var x=c+"/datas/"+encodeURIComponent(o.name);try{f.terrainProvider=new se$y({url:x,isSct:!0,subdomains:h,customRequestHeaders:f._customRequestHeaders}),u.push(f.terrainProvider)}catch(e){_.reject("add terrain layer "+o.name+" failed,"+e)}}c$18.all(u,(function(e){for(var t=[],i=0;i<e.length;i++)t$$(e[i])&&t.push(e[i]);_.resolve(t)}),(function(e){_.reject("add all layers failed,"+e)}))})).otherwise((function(e){_.reject("get layer list failed,"+e)}))}else _.reject("scene list response null!")})).otherwise((function(e){_.reject("get scene list failed,"+e)})),_.promise},M$4.prototype.addVectorTilesLayer=function(e){return e.renderer="canvas",this.addVectorTilesMap(e)},M$4.prototype.getVectorTilesLayer=function(e){return this.getVectorTilesMap(e)},M$4.prototype.removeVectorTilesLayer=function(e){return this.removeVectorTilesMap(e)},M$4.prototype.addVectorTilesMap=function(e){if(!t$$(e.url))throw new t$_("url is required!");var t=e.name||t$U(),i=this._vectorTileSource.get(t);if(t$$(i))return this._vectorTileMaps.find(e.name);i=new M$10(this._context,e),this._vectorTileSource.set(t,i);var n=this.imageryLayers.addVectorTileProvider(i);i.innerLayer=n,t$$(this._frameState.mvtLayerCount)?this._frameState.mvtLayerCount++:this._frameState.mvtLayerCount=1;var r=new i$r({provider:i,layer:i.innerLayer,imagelayerCollection:this.imageryLayers,scene:this,viewer:e.viewer,name:e.name||t$U(),layerConfig:e.layerConfig,swipeEnabled:e$1Y(e.swipeEnabled,!1),swipeRegion:e$1Y(e.swipeRegion,new n$13(0,0,1,1)),enableMorphing:e.enableMorphing,realtime:e.realtime,billboardMode:e.billboardMode,customRequestHeaders:e.customRequestHeaders,labelDepthTestEnabled:e.labelDepthTestEnabled});return e.isTdt&&(i._ready=!0,r._isTdt=!0),i.innerLayer.kmlLayer=r.kmlLayer,i._owner=r,this._vectorTileMaps.add(r),r},M$4.prototype.getVectorTilesMap=function(e){if(!t$$(e))throw new t$_("name is required!");return this._vectorTileMaps.find(e)},M$4.prototype.removeVectorTilesMap=function(e){var t=this._vectorTileMaps.find(e);return!!t$$(t)&&(this._removeCoverImageryLayer(t),this._vectorTileMaps.remove(e),this._vectorTileSource.remove(e),!0)},M$4.prototype._removeCoverImageryLayer=function(e){for(var t=0;t<this._layers.layerQueue.length;t++){var i=this._layers.layerQueue[t];i._imageryLayer===e&&i._removeCoverImageryLayer()}},M$4.prototype.addLayerService=function(e,t,i){if(!t$$(e)||!t$$(t)||!t$$(i))throw new t$_("url and sceneName and layerName is required!");if("realspace"!=e.slice(-9))throw new t$_("open scene url error!");var n=this,r=e+"/scenes/"+encodeURIComponent(t)+"/layers/"+encodeURIComponent(i)+"/extendxml.xml";t$$(a$R.CREDENTIAL)&&(r=a$R.addToken(r));var o=c$18.defer();return Ut(r,n._customRequestHeaders).then((function(t){try{var i=e+"/datas/"+encodeURIComponent(t.name)+"/config";t.customRequestHeaders=n._customRequestHeaders;var r=n.addS3MTilesLayerByScp(i,t);o.resolve(r)}catch(e){o.reject("add S3M layer"+t.name+" failed,"+e)}})).otherwise((function(e){o.reject("get S3M layer config failed,"+e+",layer name is "+i)})),o.promise},M$4.prototype.addS3MInstanceCollection=function(e,t){var i=new S3MInstanceCollection({url:e,instanceAttrs:t,gl:this._context._gl,context:this._context});return this.primitives.add(i),i};var Bn=new a$11;function An(e){var t=e._context;t.uniformState;var i=e._frameState,n=i.camera,r=n.positionWC,o=i.cullingVolume,a=i.mode===b$1d.SCENE3D?i.occluder:void 0;t$$(e._reflectFramebuffer)||(e._reflectFramebuffer=t.createReflectFramebuffer(),i._framebufferList.water=e._reflectFramebuffer);var s=6378137,l=0;e._reflectFramebuffer.isUpdate=!1;for(var u=0;u<e.layers._layerQueue.length;u++){var c=e.layers._layerQueue[u];if(t$$(c._waterPlanes)){var h=c._waterPlanes;for(var d in h._hash){var f=h.get(d);if(!(o.computeVisibility(f.boundingVolume)==cr$4.OUTSIDE||t$$(a)&&f.boundingVolume.isOccluded(a)))(_=(_=t$$(f.boundingVolume.radius)?a$11.distance(f.boundingVolume.center,r)-f.boundingVolume.radius:Math.sqrt(b$1o.distanceSquaredTo(f.boundingVolume,r)))<.01?.01:_)<s&&(s=_,l=f.distance),e._reflectFramebuffer.isUpdate=!0}}}var p=e._analyst3D.layerQueue.length;for(u=0;u<p;u++){if(-1!=e._analyst3D.layerQueue[u]._name.search("floodAnalysis3D")){var _,m=e._analyst3D.layerQueue[u];(_=(_=a$11.distance(m._boundingSphere.center,r)-m._boundingSphere.radius)<.01?.01:_)<s&&(s=_,l=m._waterHeight),e._reflectFramebuffer.isUpdate=!0}}if(!e._reflectFramebuffer.isUpdate||s>5e4)e._reflectFramebuffer.isUpdate=!1;else{if(e.mode==b$1d.SCENE3D){l+=a$11.magnitude(n.positionWC)-n.positionCartographic.height,e._reflectFramebuffer._reflectPlane.normal=a$11.normalize(r,Bn);var $=new a$11;e._reflectFramebuffer._reflectPlane.normal.clone($),a$11.multiplyByScalar($,l,$),e._reflectFramebuffer._reflectPlane.distance=-a$11.dot($,e._reflectFramebuffer._reflectPlane.normal)}else e._reflectFramebuffer._reflectPlane.normal=a$11.UNIT_X,e._reflectFramebuffer._reflectPlane.distance=-l;e._reflectFramebuffer.isUpdate=!0}}function Wn(e){var t=e._context;t.uniformState;var i=e._frameState;t.numNormalAndDepthObject>0?(t$$(e._normalFramebuffer)||(e._normalFramebuffer=t.createNormalFramebuffer(),i._framebufferList.normalAndDepth=e._normalFramebuffer),e._normalFramebuffer.isUpdate=!0):t$$(e._normalFramebuffer)&&(e._normalFramebuffer.isUpdate=!1)}function Hn(e){var t=e._context;t.uniformState;var i=e._frameState;t.numPostEffectFilterObject>0?(t$$(e._postEffectFilterFramebuffer)||(e._postEffectFilterFramebuffer=t.createPostEffectFilterlFramebuffer(),i._framebufferList.postEffectFilter=e._postEffectFilterFramebuffer),e._postEffectFilterFramebuffer.isUpdate=!0):t$$(e._postEffectFilterFramebuffer)&&(e._postEffectFilterFramebuffer.isUpdate=!1)}function Gn(e){var t=e._context;t.uniformState;var i=e._frameState;t.numClampClipPlaneLayer>0?(t$$(e._clampFramebuffer)||(e._clampFramebuffer=t.createClampFramebuffer(),i._framebufferList.clampTexture=e._clampFramebuffer),e._clampFramebuffer.isUpdate=!0):t$$(e._clampFramebuffer)&&(e._clampFramebuffer.isUpdate=!1)}function Gi(e){var t=e._context;t.uniformState;var i=e._frameState;e._isUpdatePickCommand?(t$$(e._pickRectFramebuffer)||(e._pickRectFramebuffer=t.createPickRectFramebuffer(),i._framebufferList.pickRectTexture=e._pickRectFramebuffer,e._pickRectFramebuffer.beginFunc=function(){this._renderTexture._passState.scissorTest={enabled:!0,rectangle:{x:e._pickRect.x,y:e._pickRect.y,width:e._pickRect.z-e._pickRect.x||1,height:e._pickRect.w-e._pickRect.y||1}}}),e._pickRectFramebuffer.isUpdate=!0,e._isUpdatePickCommand=!1):t$$(e._pickRectFramebuffer)&&(e._pickRectFramebuffer.isUpdate=!1)}function Ui(e){if(t$$(e._pickRectFramebuffer)&&e._pickRectFramebuffer.isUpdate){for(var t=e._context,i=e._pickRectFramebuffer.renderTexture._width,n=e._pickRectFramebuffer.renderTexture._height,r=t.readPixels({framebuffer:e._pickRectFramebuffer.renderTexture._fb,x:e._pickRect.x,y:e._pickRect.y,width:e._pickRect.z-e._pickRect.x||1,height:e._pickRect.w-e._pickRect.y||1}),o=[],a=[],s=[],l=e._layers.layerQueue,u=0;u<l.length;u++){s[$=ji(_=l[u].id)]=u,o.push($),a[$]=[]}r.length;for(var c=0;c<i;c++)for(var h=0;h<n;h++){var d=4*(h*i+c);if(0!==r[d]||0!==r[d+1]||0!==r[d+2]){var f=e$1z.byteToRgba(r[d],r[d+1],r[d+2],r[d+3]),p=t.getObjectByPickId(f);if(t$$(p)){var _=p.primitive.id,m=p.id,$=ji(_),g=o.indexOf($);if(g>=0){var y=l[s[$]];if(0==a[$].length)(b=[]).push(m),a[$]=b;else(g=a[$].indexOf(m))<0&&a[$].push(m)}}}}for(var v=Object.keys(a),x=0;x<v.length;x++){var b;y=l[u=s[v[x]]];(b=a[v[x]]).length>0&&y.setSelection(b)}}}function ji(e){return"id_"+e}function Un(e,t,i){var n=e._context,r=t.viewport;r.x=0,r.y=0,r.width=n.drawingBufferWidth,r.height=n.drawingBufferHeight,e._frameState;var o=i,a=e._clearColorCommand;e$1z.clone(o,a.color),a.execute(n,t),Qe(!0,e,t)}function jn(e,t,i){var n=e._context,r=e._frameState,o=t.begin(r),a=e._environmentVisible;e._environmentVisible=t.environmentVisible;var s=r.useType,l=r._isDepth;if(r.useType=t.useType,r._isDepth=!1,e._multiViewportMode!==te$5.NONE)for(var u=0;u<4;u++)if(1<<u&t._visibleViewport){r.multiViewportIndex=u;break}Un(e,o,e$1Y(e.backgroundColor,e$1z.BLACK)),r.multiViewportIndex=-1,t.update(o,e._pickDepths),e._environmentState,r.commandList.length=0,n.endFrame(),t.end(r),r._isDepth=l,r.useType=s,e._environmentVisible=a}function zi(e){var t=e._context,i=t.uniformState,n=e._frameState,r=n.camera,o=n._framebufferList;n.passes.fbo=!0;var a=e.enableCompositor;for(var s in e.enableCompositor=!0,o){var l=o[s];if(t$$(l)&&l.isUpdate&&(!l.isDestroyed||!l.isDestroyed())){var u=n.useType,c=n._isDepth,h=n._fboState.name,d=n._fboState.enabled,f=n._fboState.frameBufferType,p=e._sunCamera.direction;if(n._fboState.name=s,n._fboState.enabled=!0,n._fboState.frameBufferType=l.frameBufferType,l.frameBufferType===B$y.POSTEFFECT_FILTER)jn(e,l);else{var _=r.frustum.near;l.frameBufferType===B$y.REFLECT&&(r.frustum.near=1);var m=l.begin(n),$=e._environmentVisible;e._environmentVisible=l.environmentVisible,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.update(n);var g=e.shadowMap;t$$(g)&&g.enabled&&a$11.negate(i.sunDirectionWC,e._sunCamera.direction);var y=n.shadowState.nearPlane,v=n.shadowState.farPlane,x=n.shadowState.closestObjectSize;if(n.useType=l.useType,n._isDepth=(6&l.useType)>0||1&l.useType&&l.isManualDepth,e._multiViewportMode!==te$5.NONE)for(var b=0;b<4;b++)if(1<<b&l._visibleViewport){n.multiViewportIndex=b;break}De$2(e),je(e,m,e$1Y(e.backgroundColor,e$1z.BLACK),!0),n.multiViewportIndex=-1;var S=e._environmentState;if(t.msaaLevel>1&&S.useGlobeDepthFramebuffer){var w=e._view.globeDepth;w.copyFromRenderbufferToTexture(t,!1,!0,!1),l.update(t,m,w.framebufferWithTexture)}else l.update(t,m,m.framebuffer);n._fboState.frameBufferType!==B$y.CLAMP&&Me$2(e,m),n.commandList.length=0,t.endFrame(),Ci(e),l.end(n),t$$(g)&&g.enabled&&-1!==n._fboState.name.indexOf("ShadowQueryPoints")&&(e._sunCamera.direction=p),"water"==n._fboState.name&&(r.frustum.near=_),e._environmentVisible=$,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.update(n),t$$(g)&&g.enabled&&a$11.negate(i.sunDirectionWC,e._sunCamera.direction),n.shadowState.nearPlane=y,n.shadowState.farPlane=v,n.shadowState.closestObjectSize=x}n._fboState.name=h,n._fboState.enabled=d,n._fboState.frameBufferType=f,n._isDepth=c,n.useType=u}}n.passes.fbo=!1,e.enableCompositor=a}function Xi(e,t){var i=e._context,n=i.uniformState,r=e._frameState,o=r.camera,a=e.shadowMap.enabled,s=r.shadowState.shadowsEnabled;r.passes.fbo=!0,e.shadowMap.enabled=!1,r.shadowState.shadowsEnabled=!1;var l=r.useType,u=r._isDepth,c=r._fboState.name,h=r._fboState.enabled,d=r._fboState.frameBufferType;r._fboState.enabled=!0,r._fboState.frameBufferType=t.frameBufferType;var f=t.begin(r),p=e._environmentVisible;e._environmentVisible=t.environmentVisible,r.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.update(r),r.useType=t.useType,r._isDepth=(6&t.useType)>0||1&t.useType&&t.isManualDepth,De$2(e),je(e,f,e$1Y(e.backgroundColor,e$1z.BLACK),!0);var _=e._environmentState;if(i.msaaLevel>1&&_.useGlobeDepthFramebuffer){var m=e._view.globeDepth;m.copyFromRenderbufferToTexture(i,!1,!0,!1),t.update(i,f,m.framebufferWithTexture)}else t.update(i,f,f.framebuffer);Me$2(e,f),r.commandList.length=0,i.endFrame(),t.end(r),e._environmentVisible=p,r.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.update(r),r._fboState.name=c,r._fboState.enabled=h,r._fboState.frameBufferType=d,r._isDepth=u,r.useType=l,r.passes.fbo=!1,e.shadowMap.enabled=a,r.shadowState.shadowsEnabled=s}function zn(e){var t=e._context.uniformState;if(!e.enableOutline||e.camera._positionCartographic.height>2e3)return t.nonSelDepthTexture=void 0,void(t.maskTexture=void 0);var i=e.nonSelDepthbuffer;t$$(i)||((i=e.nonSelDepthbuffer=new n$m(e.context)).environmentVisible.isObjectVisible=!0,i.environmentVisible.isGlobalVisible=!0,i.isUpdate=!0,i._beginFunc=function(t){t.passes.pick=!0,t.passes.depth=!0,e.layers.getSelectedLayer().selectedColor.alpha=0},i._endFunc=function(t){t.passes.pick=!1,t.passes.depth=!1,e.layers.getSelectedLayer().selectedColor.alpha=1}),Xi(e,i),t.nonSelDepthTexture=i.depthTexture;var n=e.selMaskBuffer;t$$(n)||((n=e.selMaskBuffer=new t$i(e.context))._useHeight=!1,n.environmentVisible.isObjectVisible=!0,n.environmentVisible.isOnlyS3MObjectVisible=!0,n.environmentVisible.isGlobalVisible=!1,n.isUpdate=!0),e._maskEnabled=!0;var r=e.backgroundColor;e.backgroundColor=e$1z.clone(e$1z.WHITE),Xi(e,n),e.backgroundColor=r,e._maskEnabled=!1,t.maskTexture=n.renderTexture._fb.getColorTexture(0)}function Xn(e,t,i,n){var r,o,a=c$18.defer();return 1===t?(r=e,o=e):(r=e+"/login.json",o=e+"/login.json"),t$$(a$R.CREDENTIAL)&&(n=n.substring(0,n.indexOf("?")),t$$(a$R.CREDENTIAL._keymap[n])?(r=a$R.addTokenWithKey(n,r),o=a$R.addTokenWithKey(n,o)):(r=a$R.addToken(r),o=a$R.addToken(o))),u$$(r,i).then((function(t){var n=Number(t.jsessionID),r=Yn(Number(t.random),397245148883021,0x8f461e7bf61d5),s={jsessionID:n.toString(),random:r.toString()},l=new XMLHttpRequest;if(a$X.contains(e)&&(l.withCredentials=!0),l.open("POST",o,!0),l.onreadystatechange=function(){if(4===l.readyState)if(200===l.status||201===l.status){var e={};try{e=JSON.parse(l.response)}catch{-1!==(l.response||l.responseText).toString().indexOf("isSucceed : true")&&(e.succeed=!0)}!0===e.succeed?a.resolve(!0):a.reject(!1)}else a.reject(!1)},t$$(i))for(var u in i)i.hasOwnProperty(u)&&l.setRequestHeader(u,i[u]);l.send(JSON.stringify(s))}),(function(e){a.reject({status:!1,url:n})})).otherwise((function(){a.reject({status:!1,url:n})})),a.promise}function Yn(e,t,i){for(var n=new Bt(e),r=new Bt(t),o=new Bt(1),a=new Bt(2),s=new Bt(1);r.toNumber()>0;)0===r.mod(a).toNumber()?(r=r.dividedBy(a),n=n.multipliedBy(n).mod(i)):(r=r.minus(s),o=o.multipliedBy(n).mod(i));return o.toNumber()}function Qn(e,t,i){if(!(i.passes.fbo||i.passes.depth||i.passes.fbo.pick))for(var n=e._analyst3D.layerQueue,r=0,o=n.length;r<o;r++){var a=n[r];a instanceof s$9&&a._updateTextures(t,i)}} /** * @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. */M$4.prototype.addFieldLayer=function(e){if(!t$$(e))throw new t$_("url is required!");var t=this;if(e.indexOf(".nc")>-1){var i=c$18.defer();return c$18(u$S(e),(function(e){var n=new k$3(e),r=new i$f(t._context);r._NetCDFBuffer=n,r.NetCDFInfo=n.header,t._layers.add(r),i.resolve(r)})).otherwise((function(e){throw i.reject(e.message),new t$_("Not a valid NetCDF file!")})),i.promise}},M$4.prototype.addVoxelGridLayer=function(e,t){if(!t$$(e))throw new t$_("url is required!");var i=this,n=c$18.defer();return e.indexOf(".nc")>-1?(c$18(u$S(e),(function(e){var r=new k$3.NetCDFReader(e),o=new x$7(i._context);o.setIsMultiResolution(!1),o._NetCDFBuffer=r,o._NetCDFInfo=r.header,o._name=t,i._layers.add(o),n.resolve(o)})).otherwise((function(e){throw new t$_("Not a valid NetCDF file!")})),n.promise):(c$18(o$W(e),(function(t){for(var r=(t=(new DOMParser).parseFromString(t,"application/xml")).childNodes[0],o=e$1Y(f$10.queryStringAttribute(r,"xmlns:sml"),"http://www.supermap.com/SuperMapCache/scvo"),a=f$10.queryNumericValue(r,"Version",o),s=f$10.queryStringValue(r,"CacheName",o),l=(f$10.queryStringValue(r,"StoreType",o),f$10.queryStringValue(r,"FileExtentName",o),f$10.queryStringValue(r,"Type",o),f$10.queryStringValue(r,"VolumeType",o),f$10.queryNumericValue(r,"Width",o)),u=f$10.queryNumericValue(r,"Height",o),c=f$10.queryNumericValue(r,"Depth",o),h=f$10.queryNumericValue(r,"Time",o),d=f$10.queryNumericValue(r,"CellWidth",o),f=f$10.queryNumericValue(r,"CellHeight",o),p=f$10.queryNumericValue(r,"CellDepth",o),_=f$10.queryNumericValue(r,"CellTime",o),m=f$10.queryFirstNode(r,"Bounds",o),$=f$10.queryNumericValue(m,"Left",o),g=f$10.queryNumericValue(m,"Right",o),y=f$10.queryNumericValue(m,"Top",o),v=f$10.queryNumericValue(m,"Bottom",o),x=f$10.queryNumericValue(r,"MaxAltitude",o),b=f$10.queryNumericValue(r,"MinAltitude",o),S=f$10.queryNumericValue(r,"MaxValue",o),w=f$10.queryNumericValue(r,"MinValue",o),C=f$10.queryNumericValue(r,"Levels",o),T=f$10.queryFirstNode(r,"Available",o),P=f$10.queryNodes(T,"TilesBounds",o),E=[],A=0,L=P.length;A<L;A++){var M=f$10.queryNumericAttribute(P[A],"level",o),I=f$10.queryNodes(P[A],"TileBounds",o),O=f$10.queryNumericValue(I[0],"StartCol",o),D=f$10.queryNumericValue(I[0],"StartRow",o),R=f$10.queryNumericValue(I[0],"EndCol",o),N=f$10.queryNumericValue(I[0],"EndRow",o);E[M]={StartCol:O,StartRow:D,EndCol:R,EndRow:N}}var F=new x$7(i._context);F.setIsMultiResolution(!0);var B=e.lastIndexOf("/");F._url=e.slice(0,B),F._name=s,F._version=a,F._width=l,F._height=u,F._zBounds=new r$T(b,x),F._layerBounds=new s$1p($,v,g,y);var z=F._layerBounds.width/l,G=F._layerBounds.height/u;for(A=E.length-1;A>=0;A--)E[A].Width=l,E[A].Height=u,l=Math.floor(.5*l),u=Math.floor(.5*u),E[A].resolution=new r$T(z,G),z*=2,G*=2;F._depth=c,F._time=h,F._levels=C,F._cellWidth=d,F._cellHeight=f,F._cellDepth=p,F._cellTime=_,F._maxFiltration=S,F._minFiltration=w,F._floor=w,F._ceil=S,F._availableNode=E,c$18(u$S(F._url+"/0/0000/0000/0000_0000.vol"),(function(e){var t=e.slice(16,e.byteLength);F._volumeBuffer=lt$f.inflate(t).buffer,i._layers.add(F),n.resolve(F)})).otherwise((function(e){throw new t$_("Not load root file!")}))})).otherwise((function(e){throw new t$_("Not a valid SCVO file!")})),n.promise)},M$4.prototype.renderIds=function(e){var t=this._context,i=this._defaultView;this._view=i;var n=i.viewport;n.x=0,n.y=0,n.width=t.drawingBufferWidth,n.height=t.drawingBufferHeight,ie$1.x=0,ie$1.y=0,ie$1.width=t.drawingBufferWidth,ie$1.height=t.drawingBufferHeight;var r=t.uniformState,o=this._frameState;Le$1(this),o.invertClassification=!1,o.passes.pick=!0,r.update(o);var a=i.pickFramebuffer.begin(ie$1,n),s=this._environmentVisible.isGlobalVisible;this._environmentVisible.isGlobalVisible=!1,this._environmentVisible.isOnlyS3MObjectVisible=!0;var l=this.camera,u=a$11.clone(l.position),c=l.heading,h=l.pitch,d=l.roll;this.camera.setView(e),De$2(this),je(this,a,bt$1),Me$2(this,a),t.endFrame(),this._environmentVisible.isGlobalVisible=s,this._environmentVisible.isOnlyS3MObjectVisible=!1,l.setView({destination:u,orientation:{heading:c,pitch:h,roll:d}})},M$4.prototype.pickRect=function(e,t){var i=this._context.drawingBufferHeight-e.y,n=this._context.drawingBufferHeight-t.y,r=Math.min(e.x,t.x),o=Math.min(i,n),a=Math.max(e.x,t.x),s=Math.max(i,n),l=new a$10;l.x=r/this._context.drawingBufferWidth,l.y=o/this._context.drawingBufferHeight,l.z=a/this._context.drawingBufferWidth,l.w=s/this._context.drawingBufferHeight,this._isUpdatePickCommand=!0,this._pickRect=new a$10(r,o,a,s);for(var u=0,c=this._layers.layerQueue.length;u<c;u++){this._layers.layerQueue[u].selectBound=l}},M$4.prototype.getPickRectIDs=function(){for(var e=new e$1F,t=this._layers.layerQueue,i={},n=!1,r=0;r<t.length;r++){i[(_=t[r]).id]=Object.keys(_._objsVisibleMap),n=!!_._objsVisibleMap[i[_.id][0]]}for(var o=0;o<10;o++){this._isUpdatePickCommand=!0,this.initializeFrame(),this._renderForQuery();var a=!1;for(r=0;r<t.length;r++){var s=(_=t[r]).getSelection();if(!(s.length<=0)){if(e.contains(_.id)){var l;l=s.concat(e.get(_.id).ids),s=l}for(var u=[],c=(o=0,s.length);o<c;o++){var h=s[o],d=i[_.id].indexOf(h);(n&&d>-1||!n&&-1===d)&&u.push(h)}var f={layerName:_.name,layerIndex:r,ids:u};e.set(_.id,f),a=!0,_.releaseSelection(),_.setObjsVisible(s,!1)}}if(!a)break}var p=[];this._isUpdatePickCommand=!1;for(o=0;o<e.values.length;o++){var _;(_=t[e.values[o].layerIndex]).setObjsVisible([],!1),n||_.setOnlyObjsVisible(i[_.id],n);var m={layerName:e.values[o].layerName,ids:e.values[o].ids};p.push(m)}return p},M$4.prototype._renderForQuery=function(){var e=this.context,t=e.uniformState,i=this._frameState,n=this._defaultView;this._view=n,Le$1(this),i.passes.render=!0,i.passes.postProcess=this.postProcessStages.hasSelected,i.backgroundColor=e$1Y(this.backgroundColor,e$1z.BLACK),t.update(i);var r=n.viewport;r.x=0,r.y=0,r.width=e.drawingBufferWidth,r.height=e.drawingBufferHeight;var o=n.passState;o.framebuffer=void 0,o.blendingEnabled=void 0,o.scissorTest=void 0,o.viewport=n$13.clone(r,o.viewport),Gi(this),zi(this),De$2(this),Me$2(this,o),o.framebuffer=void 0,Ui(this),e.endFrame()},M$4.prototype.getHeight=function(e,t){var i=this._context,n=i.uniformState,r=this._frameState;this._environmentState;var o=this._defaultView;this._view=o;var a=o.viewport;a.x=0,a.y=0,a.width=i.drawingBufferWidth,a.height=i.drawingBufferHeight;var s=new r$T(.5*i.drawingBufferWidth,.5*i.drawingBufferHeight),l=o.passState;l.viewport=n$13.clone(a,l.viewport),Dr(r.passes),r.passes.pick=!0,r.passes.depth=!0,De$2(this),l=o.pickDepthFramebuffer.update(i,s,a);var u,c=this.camera,h=a$11.clone(c.positionWC),d=a$11.clone(c.direction),f=a$11.clone(c.up);c.setView({destination:a$11.fromDegrees(e,t,9e3)}),je(this,l,bt$1),Me$2(this,l),i.endFrame(),u=t$$(c.frustum.fov)?c.frustum.clone(tr):t$$(c.frustum.infiniteProjectionMatrix)?c.frustum.clone(rr):t$$(c.frustum.width)?c.frustum.clone(ir):c.frustum.clone(ar);for(var p,_=o.frustumCommandsList,m=_.length,$=new a$11,g=0;g<m;++g){var y=this._picking.getPickDepth(this,g).getDepth(i,s.x,s.y);if(y>0&&y<1){var v=_[g];u.near=v.near*(0!==g?this.opaqueFrustumNearOffset:1),u.far=v.far,n.updateFrustum(u),$=u$V.drawingBufferToWgs84Coordinates(this,s,y,$),p=i$1g.fromCartesian($).height;break}}return c.setView({destination:h,orientation:{direction:d,up:f}}),p},M$4.prototype.addLightSource=function(e){!t$$(e)||this._lightSource.addLightSource(e)},M$4.prototype.removeLightSource=function(e){!t$$(e)||this._lightSource.removeLightSource(e)},M$4.prototype.outputSceneToFile=function(){var e=this,t=c$18.defer(),i=!1;return this.postRender.addEventListener((function(){if(!i){i=!0;var n=e.context.readPixels({}),r=document.createElement("canvas");r.height=e.context.drawingBufferHeight,r.width=e.context.drawingBufferWidth;var o=r.getContext("2d"),a=o.createImageData(r.width,r.height);a.data.set(n),o.putImageData(a,0,0);for(var s=o.getImageData(0,0,r.width,r.height),l=0;l<s.height/2;++l)for(var u=0;u<s.width;++u){var c=4*l*s.width+4*u,h=4*(s.height-l)*s.width+4*u,d=s.data[c],f=s.data[c+1],p=s.data[c+2],_=s.data[c+3];s.data[c]=s.data[h],s.data[c+1]=s.data[h+1],s.data[c+2]=s.data[h+2],s.data[c+3]=s.data[h+3],s.data[h]=d,s.data[h+1]=f,s.data[h+2]=p,s.data[h+3]=_}o.clearRect(0,0,s.width,s.height),o.putImageData(s,0,0);var m=r.toDataURL();t.resolve(m)}})),t.promise},M$4.prototype.collideDetection=function(e){if(this.mode===b$1d.SCENE3D||this.mode===b$1d.COLUMBUS_VIEW){var t=this._context,i=this._defaultView;this._view=i;var n=this.camera,r=t.uniformState,o=a$11.clone(n.direction),a=a$11.clone(n.up),s=a$11.cross(e,n.right,new a$11);n.setView({destination:n.position,orientation:{direction:e,up:s},convert:n._mode!==b$1d.COLUMBUS_VIEW});var l,u=new r$T(.5*t.drawingBufferWidth,.5*t.drawingBufferHeight);Ni(this,u),this.camera.setView({destination:this.camera.position,orientation:{direction:o,up:a},convert:n._mode!==b$1d.COLUMBUS_VIEW}),l=t$$(n.frustum.fov)?n.frustum.clone(tr):t$$(n.frustum.infiniteProjectionMatrix)?n.frustum.clone(rr):t$$(n.frustum.width)?n.frustum.clone(ir):n.frustum.clone(ar);for(var c=i.frustumCommandsList,h=c.length,d=new a$11,f=0;f<h;++f){var p=this._picking.getPickDepth(this,f).getDepth(t,u.x,u.y);if(p>0&&p<1){var _=c[f];return l.near=_.near*(0!==f?this.opaqueFrustumNearOffset:1),l.far=_.far,r.updateFrustum(l),u$V.drawingBufferToWgs84Coordinates(this,u,p,d)}}}},M$4.prototype.parsePBRFromJson=function(e){for(var t=[],i=0,n=e.length;i<n;i++)t.push(t$X.createIfNeeded(e[i]).fetchJson());var r=this;c$18.all(t,(function(e){for(var t=0,i=e.length;t<i;t++){var n=e[t].material,o=new c$1a,a=n.pbrMetallicRoughness;n.textureunitstates,o[0]=a.roughnessFactor,o[1]=a.metallicFactor,o[2]=a.baseColor.x,o[3]=a.baseColor.y,o[4]=a.baseColor.z,o[5]=a.baseColor.w,r._pbrMaterlParameters.push(o)}}))},M$4.prototype.isDestroyed=function(){return!1},M$4.prototype.destroy=function(){this.layers.removeAll(),this.layers.endFrame(this._frameState),this._analyst3D.removeAll(),this._vectorTileMaps.removeAll(),this._plotLayers.removeAll(),this.compositor.destroy(),this._tweens.removeAll(),this._computeEngine=this._computeEngine&&this._computeEngine.destroy(),this._screenSpaceCameraController=this._screenSpaceCameraController&&this._screenSpaceCameraController.destroy(),this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this._primitives=this._primitives&&this._primitives.destroy(),this._groundPrimitives=this._groundPrimitives&&this._groundPrimitives.destroy(),this._globe=this._globe&&this._globe.destroy(),this.skyBox=this.skyBox&&this.skyBox.destroy(),this.cloudBox=this.cloudBox&&this.cloudBox.destroy(),this.skyAtmosphere=this.skyAtmosphere&&this.skyAtmosphere.destroy(),this._debugSphere=this._debugSphere&&this._debugSphere.destroy(),this.sun=this.sun&&this.sun.destroy(),this._sunPostProcess=this._sunPostProcess&&this._sunPostProcess.destroy(),this._depthPlane=this._depthPlane&&this._depthPlane.destroy(),this._transitioner=this._transitioner&&this._transitioner.destroy(),this._debugFrustumPlanes=this._debugFrustumPlanes&&this._debugFrustumPlanes.destroy(),this._brdfLutGenerator=this._brdfLutGenerator&&this._brdfLutGenerator.destroy(),this._defaultView=this._defaultView&&this._defaultView.destroy(),this._pickOffscreenView=this._pickOffscreenView&&this._pickOffscreenView.destroy(),this._view=void 0,this._removeCreditContainer&&this._canvas.parentNode.removeChild(this._creditContainer),t$$(this._reflectFramebuffer)&&(this._reflectFramebuffer.destroy(),this._frameState._framebufferList.water=void 0),t$$(this._normalFramebuffer)&&(this._normalFramebuffer.destroy(),this._frameState._framebufferList.normalAndDepth=void 0),t$$(this._postEffectFilterFramebuffer)&&(this._postEffectFilterFramebuffer.destroy(),this._frameState._framebufferList.postEffectFilter=void 0),t$$(this._clampFramebuffer)&&(this._clampFramebuffer.destroy(),this._frameState._framebufferList.clampTexture=void 0),t$$(this._pickRectFramebuffer)&&(this._pickRectFramebuffer.destroy(),this._frameState._framebufferList.pickRectTexture=void 0),this.postProcessStages=this.postProcessStages&&this.postProcessStages.destroy(),this._context=this._context&&this._context.destroy(),this._frameState.creditDisplay=this._frameState.creditDisplay&&this._frameState.creditDisplay.destroy(),t$$(this._performanceDisplay)&&(this._performanceDisplay=this._performanceDisplay&&this._performanceDisplay.destroy(),this._performanceContainer.parentNode.removeChild(this._performanceContainer)),this._removeRequestListenerCallback(),this._removeTaskProcessorListenerCallback();for(var e=0;e<this._removeGlobeCallbacks.length;++e)this._removeGlobeCallbacks[e]();return this._removeGlobeCallbacks.length=0,this._rasterPickTexture=this._rasterPickTexture&&!this._rasterPickTexture.isDestroyed()&&this._rasterPickTexture.destroy(),this._rasterPickFBO=this._rasterPickFBO&&!this._rasterPickFBO.isDestroyed()&&this._rasterPickFBO.destroy(),t$$(this.voxelGridPostRender)&&this.voxelGridPostRender.destroy(),this.voxelGridPostRender=void 0,t$$(this.particlePostRender)&&this.particlePostRender.destroy(),this.particlePostRender=void 0,t$$(this.particleTrailsPostRenderer)&&this.particleTrailsPostRenderer.destroy(),this.particleTrailsPostRenderer=void 0,t$$(this.nonSelDepthbuffer)&&this.nonSelDepthbuffer.destroy(),t$$(this.selMaskBuffer)&&this.selMaskBuffer.destroy(),s$1e(this)};var d$8="#ifdef COLOR_CORRECT\nuniform vec3 u_hsbShift;\n#endif\nuniform vec4 u_cameraAndRadiiAndDynamicAtmosphereColor;\nconst float g = -0.95;\nconst float g2 = g * g;\nvarying vec3 v_rayleighColor;\nvarying vec3 v_mieColor;\nvarying vec3 v_toCamera;\nvarying vec3 v_positionEC;\nvoid main (void)\n{\nfloat lightEnum = u_cameraAndRadiiAndDynamicAtmosphereColor.w;\nvec3 lightDirection =\nczm_viewerPositionWC * float(lightEnum == 0.0) +\nczm_lightDirectionWC * float(lightEnum == 1.0) +\nczm_sunDirectionWC * float(lightEnum == 2.0);\nlightDirection = normalize(lightDirection);\nfloat cosAngle = dot(lightDirection, normalize(v_toCamera)) / length(v_toCamera);\nfloat rayleighPhase = 0.75 * (1.0 + cosAngle * cosAngle);\nfloat miePhase = 1.5 * ((1.0 - g2) / (2.0 + g2)) * (1.0 + cosAngle * cosAngle) / pow(1.0 + g2 - 2.0 * g * cosAngle, 1.5);\nvec3 rgb = rayleighPhase * v_rayleighColor + miePhase * v_mieColor;\n#ifndef HDR\nconst float exposure = 2.0;\nrgb = vec3(1.0) - exp(-exposure * rgb);\n#endif\n#ifdef COLOR_CORRECT\nvec3 hsb = czm_RGBToHSB(rgb);\nhsb.x += u_hsbShift.x;\nhsb.y = clamp(hsb.y + u_hsbShift.y, 0.0, 1.0);\nhsb.z = hsb.z > czm_epsilon7 ? hsb.z + u_hsbShift.z : 0.0;\nrgb = czm_HSBToRGB(hsb);\n#endif\nfloat atmosphereAlpha = clamp((u_cameraAndRadiiAndDynamicAtmosphereColor.y - u_cameraAndRadiiAndDynamicAtmosphereColor.x) / (u_cameraAndRadiiAndDynamicAtmosphereColor.y - u_cameraAndRadiiAndDynamicAtmosphereColor.z), 0.0, 1.0);\nfloat nightAlpha = (lightEnum != 0.0) ? clamp(dot(normalize(czm_viewerPositionWC), lightDirection), 0.0, 1.0) : 1.0;\natmosphereAlpha *= pow(nightAlpha, 0.5);\ngl_FragColor = vec4(rgb, mix(rgb.b, 1.0, atmosphereAlpha) * smoothstep(0.0, 1.0, czm_morphTime));\n}\n",h$6="attribute vec4 position;\nuniform vec4 u_cameraAndRadiiAndDynamicAtmosphereColor;\nconst float Kr = 0.0025;\nconst float Kr4PI = Kr * 4.0 * czm_pi;\nconst float Km = 0.0015;\nconst float Km4PI = Km * 4.0 * czm_pi;\nconst float ESun = 15.0;\nconst float KmESun = Km * ESun;\nconst float KrESun = Kr * ESun;\nconst vec3 InvWavelength = vec3(\n5.60204474633241,\n9.473284437923038,\n19.643802610477206);\nconst float rayleighScaleDepth = 0.25;\nconst int nSamples = 2;\nconst float fSamples = 2.0;\nvarying vec3 v_rayleighColor;\nvarying vec3 v_mieColor;\nvarying vec3 v_toCamera;\nfloat scale(float cosAngle)\n{\nfloat x = 1.0 - cosAngle;\nreturn rayleighScaleDepth * exp(-0.00287 + x*(0.459 + x*(3.83 + x*(-6.80 + x*5.25))));\n}\nvoid main(void)\n{\nfloat cameraHeight = u_cameraAndRadiiAndDynamicAtmosphereColor.x;\nfloat outerRadius = u_cameraAndRadiiAndDynamicAtmosphereColor.y;\nfloat innerRadius = u_cameraAndRadiiAndDynamicAtmosphereColor.z;\nvec3 positionV3 = position.xyz;\nvec3 ray = positionV3 - czm_viewerPositionWC;\nfloat far = length(ray);\nray /= far;\nfloat atmosphereScale = 1.0 / (outerRadius - innerRadius);\n#ifdef SKY_FROM_SPACE\nfloat B = 2.0 * dot(czm_viewerPositionWC, ray);\nfloat C = cameraHeight * cameraHeight - outerRadius * outerRadius;\nfloat det = max(0.0, B*B - 4.0 * C);\nfloat near = 0.5 * (-B - sqrt(det));\nvec3 start = czm_viewerPositionWC + ray * near;\nfar -= near;\nfloat startAngle = dot(ray, start) / outerRadius;\nfloat startDepth = exp(-1.0 / rayleighScaleDepth );\nfloat startOffset = startDepth*scale(startAngle);\n#else // SKY_FROM_ATMOSPHERE\nvec3 start = czm_viewerPositionWC;\nfloat height = length(start);\nfloat depth = exp((atmosphereScale / rayleighScaleDepth ) * (innerRadius - cameraHeight));\nfloat startAngle = dot(ray, start) / height;\nfloat startOffset = depth*scale(startAngle);\n#endif\nfloat lightEnum = u_cameraAndRadiiAndDynamicAtmosphereColor.w;\nvec3 lightDirection =\nczm_viewerPositionWC * float(lightEnum == 0.0) +\nczm_lightDirectionWC * float(lightEnum == 1.0) +\nczm_sunDirectionWC * float(lightEnum == 2.0);\nlightDirection = normalize(lightDirection);\nfloat sampleLength = far / fSamples;\nfloat scaledLength = sampleLength * atmosphereScale;\nvec3 sampleRay = ray * sampleLength;\nvec3 samplePoint = start + sampleRay * 0.5;\nvec3 frontColor = vec3(0.0, 0.0, 0.0);\nfor(int i=0; i<nSamples; i++)\n{\nfloat height = length(samplePoint);\nfloat depth = exp((atmosphereScale / rayleighScaleDepth ) * (innerRadius - height));\nfloat fLightAngle = dot(lightDirection, samplePoint) / height;\nfloat fCameraAngle = dot(ray, samplePoint) / height;\nfloat fScatter = (startOffset + depth*(scale(fLightAngle) - scale(fCameraAngle)));\nvec3 attenuate = exp(-fScatter * (InvWavelength * Kr4PI + Km4PI));\nfrontColor += attenuate * (depth * scaledLength);\nsamplePoint += sampleRay;\n}\nv_mieColor = frontColor * KmESun;\nv_rayleighColor = frontColor * (InvWavelength * KrESun);\nv_toCamera = czm_viewerPositionWC - positionV3;\ngl_Position = czm_modelViewProjection * position;\n}\n"; /** * @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. */function s$6(e){e=e$1Y(e,n$1c.WGS84),this.show=!0,this._ellipsoid=e,this._command=new s$1d({owner:this}),this._spSkyFromSpace=void 0,this._spSkyFromAtmosphere=void 0,this._spSkyFromSpaceColorCorrect=void 0,this._spSkyFromAtmosphereColorCorrect=void 0,this.hueShift=0,this.saturationShift=0,this.brightnessShift=.4,this.alpha=1,this._hueSaturationBrightness=new a$11;var t=new a$10;t.w=0,t.y=a$11.maximumComponent(a$11.multiplyByScalar(e.radii,1.025,new a$11)),t.z=e.maximumRadius,this._cameraAndRadiiAndDynamicAtmosphereColor=t;var i=this;this._command.uniformMap={u_cameraAndRadiiAndDynamicAtmosphereColor:function(){return i._cameraAndRadiiAndDynamicAtmosphereColor},u_hsbShift:function(){return i._hueSaturationBrightness.x=i.hueShift,i._hueSaturationBrightness.y=i.saturationShift,i._hueSaturationBrightness.z=i.brightnessShift,i._hueSaturationBrightness},u_alpha:function(){return i.alpha}}}function M$3(e){return!(n$1d.equalsEpsilon(e.hueShift,0,n$1d.EPSILON7)&&n$1d.equalsEpsilon(e.saturationShift,0,n$1d.EPSILON7)&&n$1d.equalsEpsilon(e.brightnessShift,0,n$1d.EPSILON7))}Object.defineProperties(s$6.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),s$6.prototype.setDynamicAtmosphereColor=function(e){this._cameraAndRadiiAndDynamicAtmosphereColor.w=e?1:0},s$6.prototype.update=function(e){if(this.show){var t=e.mode;if((t===b$1d.SCENE3D||t===b$1d.MORPHING)&&e.passes.render){var i=this._command;if(!t$$(i.vertexArray)){var n=e.context,r=b$18.createGeometry(new b$18({radii:a$11.multiplyByScalar(this._ellipsoid.radii,1.025,new a$11),slicePartitions:256,stackPartitions:256,vertexFormat:n$12.POSITION_ONLY}));i.vertexArray=x$18.fromGeometry({context:n,geometry:r,attributeLocations:F$W.createAttributeLocations(r),bufferUsage:A$13.STATIC_DRAW}),this._rs=p$1a.fromCache({cull:{enabled:!0,face:k$F.FRONT},blending:Ee$s.ALPHA_BLEND,depthMask:!1}),this._rsReflect=p$1a.fromCache({cull:{enabled:!0,face:k$F.BACK},blending:Ee$s.ALPHA_BLEND,depthMask:!1}),i.renderState=this._rs;var o=new a$O({defines:["SKY_FROM_SPACE"],sources:[h$6]});this._spSkyFromSpace=p$15.fromCache({context:n,vertexShaderSource:o,fragmentShaderSource:d$8}),o=new a$O({defines:["SKY_FROM_ATMOSPHERE"],sources:[h$6]}),this._spSkyFromAtmosphere=p$15.fromCache({context:n,vertexShaderSource:o,fragmentShaderSource:d$8})}var a=M$3(this);if(a&&(!t$$(this._spSkyFromSpaceColorCorrect)||!t$$(this._spSkyFromAtmosphereColorCorrect))){var s=e.context,l=new a$O({defines:["SKY_FROM_SPACE"],sources:[h$6]}),u=new a$O({defines:["COLOR_CORRECT"],sources:[d$8]});this._spSkyFromSpaceColorCorrect=p$15.fromCache({context:s,vertexShaderSource:l,fragmentShaderSource:u}),l=new a$O({defines:["SKY_FROM_ATMOSPHERE"],sources:[h$6]}),this._spSkyFromAtmosphereColorCorrect=p$15.fromCache({context:s,vertexShaderSource:l,fragmentShaderSource:u})}var c=e.camera.positionWC,h=a$11.magnitude(c);return this._cameraAndRadiiAndDynamicAtmosphereColor.x=h,h>this._cameraAndRadiiAndDynamicAtmosphereColor.y?i.shaderProgram=a?this._spSkyFromSpaceColorCorrect:this._spSkyFromSpace:i.shaderProgram=a?this._spSkyFromAtmosphereColorCorrect:this._spSkyFromAtmosphere,e._fboState.frameBufferType===B$y.REFLECT?i.renderState=this._rsReflect:i.renderState=this._rs,i}}},s$6.prototype.isDestroyed=function(){return!1},s$6.prototype.destroy=function(){var e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),this._spSkyFromSpace=this._spSkyFromSpace&&this._spSkyFromSpace.destroy(),this._spSkyFromAtmosphere=this._spSkyFromAtmosphere&&this._spSkyFromAtmosphere.destroy(),this._spSkyFromSpaceColorCorrect=this._spSkyFromSpaceColorCorrect&&this._spSkyFromSpaceColorCorrect.destroy(),this._spSkyFromAtmosphereColorCorrect=this._spSkyFromAtmosphereColorCorrect&&this._spSkyFromAtmosphereColorCorrect.destroy(),s$1e(this)};var J$1="uniform samplerCube u_cubeMap;\nuniform float u_alpha;\nvarying vec3 v_texCoord;\nvoid main()\n{\nvec4 color = textureCube(u_cubeMap, normalize(v_texCoord));\nfloat alpha = czm_sceneMode == czm_sceneModeColumbusView ? u_alpha : u_alpha * czm_morphTime;\ngl_FragColor = vec4(czm_gammaCorrect(color).rgb, alpha);\n}\n",K$2="attribute vec3 position;\nuniform mat3 u_rotateMatrix;\nvarying vec3 v_texCoord;\nvoid main()\n{\nif (czm_sceneMode == czm_sceneModeColumbusView) {\nvec3 worldPosition = czm_entireFrustum.y * position;\ngl_Position = czm_modelViewProjection * vec4(worldPosition, 1.0);\nvec3 texCoord = normalize(worldPosition);\nv_texCoord = texCoord.zxy;\n}\nelse{\nvec3 p = czm_viewRotation * u_rotateMatrix * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));\ngl_Position = czm_projection * vec4(p, 1.0);\nv_texCoord = position.xyz;\n}\n}\n";function m$9(e){this.sources=e.sources,this._sources=void 0,this.show=e$1Y(e.show,!0),this._command=new s$1d({modelMatrix:c$1a.clone(c$1a.IDENTITY),owner:this}),this._cubeMap=void 0,this._attributeLocations=void 0,this._useHdr=void 0,this.alpha=1,this._uSpeed=0,this._vSpeed=0,this._wSpeed=0,this._horizontalRotationAngle=0,this._axisChanged=!0,this.imageUrl=e.imageUrl,this._imageUrl=void 0,this._PreprocessCubeMap=void 0}Object.defineProperties(m$9.prototype,{USpeed:{get:function(){return this._uSpeed},set:function(e){n$1e.typeOf.number("SkyBox.uSpeed",e),this._uSpeed=e,this._axisChanged=!0}},VSpeed:{get:function(){return this._vSpeed},set:function(e){n$1e.typeOf.number("SkyBox.vSpeed",e),this._vSpeed=e,this._axisChanged=!0}},WSpeed:{get:function(){return this._wSpeed},set:function(e){n$1e.typeOf.number("SkyBox.wSpeed",e),this._wSpeed=e,this._axisChanged=!0}},horizontalRotationAngle:{get:function(){return this._horizontalRotationAngle},set:function(e){n$1e.typeOf.number("SkyBox.horizontalRotationAngle",e),this._horizontalRotationAngle=e,this._axisChanged=!0}}});var re$2=new a$11,x$5=new a$11,S$7=new a$11,w$8=new a$11,oe$2=new a$11(1,1,1),A$9=new a$U,c$8=new a$11,C$4=0,P$4=c$1a.IDENTITY.clone(new c$1a);function t$5(){}m$9.prototype.update=function(e,t){var i=this;if(this.show&&(e.mode===b$1d.SCENE3D||e.mode===b$1d.COLUMBUS_VIEW||e.mode===b$1d.MORPHING)&&e.passes.render){var n=e.context;if(this._sources!==this.sources){this._sources=this.sources;var r=this.sources;if(!(t$$(r.positiveX)&&t$$(r.negativeX)&&t$$(r.positiveY)&&t$$(r.negativeY)&&t$$(r.positiveZ)&&t$$(r.negativeZ)))throw new t$_("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(typeof r.positiveX!=typeof r.negativeX||typeof r.positiveX!=typeof r.positiveY||typeof r.positiveX!=typeof r.negativeY||typeof r.positiveX!=typeof r.positiveZ||typeof r.positiveX!=typeof r.negativeZ)throw new t$_("this.sources properties must all be the same type.");"string"==typeof r.positiveX?d$j(n,this._sources).then((function(e){i._cubeMap=i._cubeMap&&i._cubeMap.destroy(),i._cubeMap=e})):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new X$y({context:n,source:r}))}this._imageUrl!==this.imageUrl&&!this._sources&&(this._imageUrl=this.imageUrl,this._PreprocessCubeMap=new b$p(n,this._imageUrl)),t$$(this._PreprocessCubeMap)&&(this._PreprocessCubeMap.update(e),this._PreprocessCubeMap.ready&&(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=this._PreprocessCubeMap.cubeMap,this._PreprocessCubeMap=void 0));var o=this._command;if(e.mode===b$1d.COLUMBUS_VIEW?o.modelMatrix=e.camera._actualInvTransform:o.modelMatrix=m$13.eastNorthUpToFixedFrame(e.camera._positionWC),this._axisChanged){var a=c$1a.multiplyByPoint(o.modelMatrix,a$11.ZERO,re$2),s=c$1a.multiplyByPoint(o.modelMatrix,a$11.UNIT_X,x$5),l=c$1a.multiplyByPoint(o.modelMatrix,a$11.UNIT_Y,S$7),u=c$1a.multiplyByPoint(o.modelMatrix,a$11.UNIT_Z,w$8),c=a$11.subtract(s,a,x$5),h=a$11.subtract(l,a,S$7),d=a$11.subtract(u,a,w$8),f=a$U.fromAxisAngle(c,this._uSpeed*performance.now()/1e5),p=a$U.fromAxisAngle(h,this._vSpeed*performance.now()/1e5),_=a$U.fromAxisAngle(d,this._wSpeed*performance.now()/1e5);this._horizontalRotationAngle&&(_=a$U.fromAxisAngle(d,this._horizontalRotationAngle));var m=a$U.multiply(f,a$U.multiply(p,_,A$9),A$9);c$8=a$U.computeAxis(m,c$8),C$4=Math.max(Math.max(Math.abs(this._uSpeed),Math.abs(this._vSpeed)),Math.abs(this._wSpeed)),this._axisChanged=!1}var $=c$1a.IDENTITY.clone(P$4);if(!a$11.equals(c$8,a$11.ZERO)&&!e.camera.bReflect){var g=C$4*performance.now()/1e5;this._horizontalRotationAngle&&(g=this._horizontalRotationAngle),$=c$1a.fromTranslationQuaternionRotationScale(a$11.ZERO,a$U.fromAxisAngle(c$8,g),oe$2,P$4),c$1a.multiply($,o.modelMatrix,o.modelMatrix)}if(!t$$(o.vertexArray)){o.uniformMap={u_cubeMap:function(){return i._cubeMap},u_rotateMatrix:function(){return c$1a.getRotation(o.modelMatrix,new r$W)},u_alpha:function(){return i.alpha}};var y=c$Z.createGeometry(c$Z.fromDimensions({dimensions:new a$11(2,2,2),vertexFormat:n$12.POSITION_ONLY})),v=this._attributeLocations=F$W.createAttributeLocations(y);o.vertexArray=x$18.fromGeometry({context:n,geometry:y,attributeLocations:v,bufferUsage:A$13.STATIC_DRAW}),o.renderState=p$1a.fromCache({blending:Ee$s.ALPHA_BLEND})}if(!t$$(o.shaderProgram)||this._useHdr!==t){var x=new a$O({defines:[t?"HDR":""],sources:[J$1]});o.shaderProgram=p$15.fromCache({context:n,vertexShaderSource:K$2,fragmentShaderSource:x,attributeLocations:this._attributeLocations}),this._useHdr=t}if(t$$(this._cubeMap))return o}},m$9.prototype.isDestroyed=function(){return!1},m$9.prototype.destroy=function(){var e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),s$1e(this)},t$5.prototype.evaluate=function(e,t){t$_.throwInstantiationError()},t$5.prototype.evaluateColor=function(e,t){t$_.throwInstantiationError()},t$5.prototype.getShaderFunction=function(e,t,i,n){t$_.throwInstantiationError()};var tt$1="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",rt$1="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",et$1="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";function m$8(){this.show=!0,this._drawCommand=new s$1d({primitiveType:H$11.TRIANGLES,boundingVolume:new c$19,owner:this}),this._commands={drawCommand:this._drawCommand,computeCommand:void 0},this._boundingVolume=new c$19,this._boundingVolume2D=new c$19,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 e=this;this._uniformMap={u_texture:function(){return e._texture},u_size:function(){return e._size}}}Object.defineProperties(m$8.prototype,{glowFactor:{get:function(){return this._glowFactor},set:function(e){e=Math.max(e,0),this._glowFactor=e,this._glowFactorDirty=!0}}});var it$1=new r$T,nt$1=new r$T,at$1=new a$10,u$6=new a$10;m$8.prototype.update=function(e,t,i){if(this.show){var n=e.mode;if(n!==b$1d.SCENE2D&&n!==b$1d.MORPHING&&e.passes.render){var r=e.context,o=t.viewport.width,a=t.viewport.height;if(!t$$(this._texture)||o!==this._drawingBufferWidth||a!==this._drawingBufferHeight||this._glowFactorDirty||i!==this._useHdr){this._texture=this._texture&&this._texture.destroy(),this._drawingBufferWidth=o,this._drawingBufferHeight=a,this._glowFactorDirty=!1,this._useHdr=i;var s=Math.max(o,a);s=Math.pow(2,Math.ceil(Math.log(s)/Math.log(2))-2),s=Math.max(1,s);var l=i?r.halfFloatingPointTexture?v$Z.HALF_FLOAT:v$Z.FLOAT:v$Z.UNSIGNED_BYTE;this._texture=new P$S({context:r,width:s,height:s,pixelFormat:Z$_.RGBA,pixelDatatype:l}),this._glowLengthTS=5*this._glowFactor,this._radiusTS=1/(1+2*this._glowLengthTS)*.5;var u=this,c={u_radiusTS:function(){return u._radiusTS}};this._commands.computeCommand=new t$w({fragmentShaderSource:rt$1,outputTexture:this._texture,uniformMap:c,persists:!1,owner:this,postExecute:function(){u._commands.computeCommand=void 0}})}var h=this._drawCommand;if(!t$$(h.vertexArray)){var d={direction:0},f=new Uint8Array(8);f[0]=0,f[1]=0,f[2]=255,f[3]=0,f[4]=255,f[5]=255,f[6]=0,f[7]=255;var p=u$Y.createVertexBuffer({context:r,typedArray:f,usage:A$13.STATIC_DRAW}),_=[{index:d.direction,vertexBuffer:p,componentsPerAttribute:2,normalize:!0,componentDatatype:C$12.UNSIGNED_BYTE}],m=u$Y.createIndexBuffer({context:r,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT});h.vertexArray=new x$18({context:r,attributes:_,indexBuffer:m}),h.shaderProgram=p$15.fromCache({context:r,vertexShaderSource:et$1,fragmentShaderSource:tt$1,attributeLocations:d}),h.renderState=p$1a.fromCache({blending:Ee$s.ALPHA_BLEND}),h.uniformMap=this._uniformMap}var $=r.uniformState.sunPositionWC,g=r.uniformState.sunPositionColumbusView,y=this._boundingVolume,v=this._boundingVolume2D;a$11.clone($,y.center),v.center.x=g.z,v.center.y=g.x,v.center.z=g.y,y.radius=n$1d.SOLAR_RADIUS+n$1d.SOLAR_RADIUS*this._glowLengthTS,v.radius=y.radius,n===b$1d.SCENE3D?c$19.clone(y,h.boundingVolume):n===b$1d.COLUMBUS_VIEW&&c$19.clone(v,h.boundingVolume);var x=u$V.computeActualWgs84Position(e,$,u$6),b=a$11.magnitude(a$11.subtract(x,e.camera.position,u$6)),S=r.uniformState.projection,w=at$1;w.x=0,w.y=0,w.z=-b,w.w=1;var C=c$1a.multiplyByVector(S,w,u$6),T=u$V.clipToGLWindowCoordinates(t.viewport,C,it$1);w.x=n$1d.SOLAR_RADIUS;var P=c$1a.multiplyByVector(S,w,u$6),E=u$V.clipToGLWindowCoordinates(t.viewport,P,nt$1);return this._size=r$T.magnitude(r$T.subtract(E,T,u$6)),this._size=2*this._size*(1+2*this._glowLengthTS),this._size=Math.ceil(this._size),this._commands}}},m$8.prototype.isDestroyed=function(){return!1},m$8.prototype.destroy=function(){var e=this._drawCommand;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._texture=this._texture&&this._texture.destroy(),s$1e(this) /** * @license * Copyright 2009 The Closure Library Authors. * Copyright 2020 Daniel Wirtz / The long.js Contributors. * SPDX-License-Identifier: Apache-2.0 */};var N$2=null;try{N$2=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function i$7(e,t,i){this.low=0|e,this.high=0|t,this.unsigned=!!i}function d$7(e){return!0===(e&&e.__isLong__)}i$7.prototype.__isLong__,Object.defineProperty(i$7.prototype,"__isLong__",{value:!0}),i$7.isLong=d$7;var M$2={},R$1={};function q$2(e,t){var i,n,r;return t?(r=0<=(e>>>=0)&&e<256)&&(n=R$1[e])?n:(i=e$4(e,(0|e)<0?-1:0,!0),r&&(R$1[e]=i),i):(r=-128<=(e|=0)&&e<128)&&(n=M$2[e])?n:(i=e$4(e,e<0?-1:0,!1),r&&(M$2[e]=i),i)}function E$6(e,t){if(isNaN(e))return t?p$6:y$8;if(t){if(e<0)return p$6;if(e>=A$8)return H$2}else{if(e<=-T$4)return w$7;if(e+1>=T$4)return V$5}return e<0?E$6(-e,t).neg():e$4(e%_$4|0,e/_$4|0,t)}function e$4(e,t,i){return new i$7(e,t,i)}i$7.fromInt=q$2,i$7.fromNumber=E$6,i$7.fromBits=e$4;var I$2=Math.pow;function O$4(e,t,i){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return y$8;if("number"==typeof t?(i=t,t=!1):t=!!t,(i=i||10)<2||36<i)throw RangeError("radix");var n;if((n=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return O$4(e.substring(1),t,i).neg();for(var r=E$6(I$2(i,8)),o=y$8,a=0;a<e.length;a+=8){var s=Math.min(8,e.length-a),l=parseInt(e.substring(a,a+s),i);if(s<8){var u=E$6(I$2(i,s));o=o.mul(u).add(E$6(l))}else o=(o=o.mul(r)).add(E$6(l))}return o.unsigned=t,o}function b$6(e,t){return"number"==typeof e?E$6(e,t):"string"==typeof e?O$4(e,t):e$4(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}i$7.fromString=O$4,i$7.fromValue=b$6;var Z$3=65536,P$3=1<<24,_$4=Z$3*Z$3,A$8=_$4*_$4,T$4=A$8/2,S$6=q$2(P$3),y$8=q$2(0);i$7.ZERO=y$8;var p$6=q$2(0,!0);i$7.UZERO=p$6;var B=q$2(1);i$7.ONE=B;var x$4=q$2(1,!0);i$7.UONE=x$4;var U$2=q$2(-1);i$7.NEG_ONE=U$2;var V$5=e$4(-1,2147483647,!1);i$7.MAX_VALUE=V$5;var H$2=e$4(-1,-1,!0);i$7.MAX_UNSIGNED_VALUE=H$2;var w$7=e$4(0,-2147483648,!1);i$7.MIN_VALUE=w$7;var h$5=i$7.prototype;h$5.toInt=function(){return this.unsigned?this.low>>>0:this.low},h$5.toNumber=function(){return this.unsigned?(this.high>>>0)*_$4+(this.low>>>0):this.high*_$4+(this.low>>>0)},h$5.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(w$7)){var t=E$6(e),i=this.div(t),n=i.mul(t).sub(this);return i.toString(e)+n.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var r=E$6(I$2(e,6),this.unsigned),o=this,a="";;){var s=o.div(r),l=(o.sub(s.mul(r)).toInt()>>>0).toString(e);if((o=s).isZero())return l+a;for(;l.length<6;)l="0"+l;a=""+l+a}},h$5.getHighBits=function(){return this.high},h$5.getHighBitsUnsigned=function(){return this.high>>>0},h$5.getLowBits=function(){return this.low},h$5.getLowBitsUnsigned=function(){return this.low>>>0},h$5.getNumBitsAbs=function(){if(this.isNegative())return this.eq(w$7)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},h$5.isZero=function(){return 0===this.high&&0===this.low},h$5.eqz=h$5.isZero,h$5.isNegative=function(){return!this.unsigned&&this.high<0},h$5.isPositive=function(){return this.unsigned||this.high>=0},h$5.isOdd=function(){return 1==(1&this.low)},h$5.isEven=function(){return 0==(1&this.low)},h$5.equals=function(e){return d$7(e)||(e=b$6(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&(this.high===e.high&&this.low===e.low)},h$5.eq=h$5.equals,h$5.notEquals=function(e){return!this.eq(e)},h$5.neq=h$5.notEquals,h$5.ne=h$5.notEquals,h$5.lessThan=function(e){return this.comp(e)<0},h$5.lt=h$5.lessThan,h$5.lessThanOrEqual=function(e){return this.comp(e)<=0},h$5.lte=h$5.lessThanOrEqual,h$5.le=h$5.lessThanOrEqual,h$5.greaterThan=function(e){return this.comp(e)>0},h$5.gt=h$5.greaterThan,h$5.greaterThanOrEqual=function(e){return this.comp(e)>=0},h$5.gte=h$5.greaterThanOrEqual,h$5.ge=h$5.greaterThanOrEqual,h$5.compare=function(e){if(d$7(e)||(e=b$6(e)),this.eq(e))return 0;var t=this.isNegative(),i=e.isNegative();return t&&!i?-1:!t&&i?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},h$5.comp=h$5.compare,h$5.negate=function(){return!this.unsigned&&this.eq(w$7)?w$7:this.not().add(B)},h$5.neg=h$5.negate,h$5.add=function(e){d$7(e)||(e=b$6(e));var t=this.high>>>16,i=65535&this.high,n=this.low>>>16,r=65535&this.low,o=e.high>>>16,a=65535&e.high,s=e.low>>>16,l=0,u=0,c=0,h=0;return c+=(h+=r+(65535&e.low))>>>16,u+=(c+=n+s)>>>16,l+=(u+=i+a)>>>16,l+=t+o,e$4((c&=65535)<<16|(h&=65535),(l&=65535)<<16|(u&=65535),this.unsigned)},h$5.subtract=function(e){return d$7(e)||(e=b$6(e)),this.add(e.neg())},h$5.sub=h$5.subtract,h$5.multiply=function(e){if(this.isZero())return y$8;if(d$7(e)||(e=b$6(e)),N$2)return e$4(N$2.mul(this.low,this.high,e.low,e.high),N$2.get_high(),this.unsigned);if(e.isZero())return y$8;if(this.eq(w$7))return e.isOdd()?w$7:y$8;if(e.eq(w$7))return this.isOdd()?w$7:y$8;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(S$6)&&e.lt(S$6))return E$6(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,i=65535&this.high,n=this.low>>>16,r=65535&this.low,o=e.high>>>16,a=65535&e.high,s=e.low>>>16,l=65535&e.low,u=0,c=0,h=0,d=0;return h+=(d+=r*l)>>>16,c+=(h+=n*l)>>>16,h&=65535,c+=(h+=r*s)>>>16,u+=(c+=i*l)>>>16,c&=65535,u+=(c+=n*s)>>>16,c&=65535,u+=(c+=r*a)>>>16,u+=t*l+i*s+n*a+r*o,e$4((h&=65535)<<16|(d&=65535),(u&=65535)<<16|(c&=65535),this.unsigned)},h$5.mul=h$5.multiply,h$5.divide=function(e){if(d$7(e)||(e=b$6(e)),e.isZero())throw Error("division by zero");var t,i,n;if(N$2)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?e$4((this.unsigned?N$2.div_u:N$2.div_s)(this.low,this.high,e.low,e.high),N$2.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?p$6:y$8;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return p$6;if(e.gt(this.shru(1)))return x$4;n=p$6}else{if(this.eq(w$7))return e.eq(B)||e.eq(U$2)?w$7:e.eq(w$7)?B:(t=this.shr(1).div(e).shl(1)).eq(y$8)?e.isNegative()?B:U$2:(i=this.sub(e.mul(t)),n=t.add(i.div(e)));if(e.eq(w$7))return this.unsigned?p$6:y$8;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();n=y$8}for(i=this;i.gte(e);){t=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var r=Math.ceil(Math.log(t)/Math.LN2),o=r<=48?1:I$2(2,r-48),a=E$6(t),s=a.mul(e);s.isNegative()||s.gt(i);)s=(a=E$6(t-=o,this.unsigned)).mul(e);a.isZero()&&(a=B),n=n.add(a),i=i.sub(s)}return n},h$5.div=h$5.divide,h$5.modulo=function(e){return d$7(e)||(e=b$6(e)),N$2?e$4((this.unsigned?N$2.rem_u:N$2.rem_s)(this.low,this.high,e.low,e.high),N$2.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},h$5.mod=h$5.modulo,h$5.rem=h$5.modulo,h$5.not=function(){return e$4(~this.low,~this.high,this.unsigned)},h$5.and=function(e){return d$7(e)||(e=b$6(e)),e$4(this.low&e.low,this.high&e.high,this.unsigned)},h$5.or=function(e){return d$7(e)||(e=b$6(e)),e$4(this.low|e.low,this.high|e.high,this.unsigned)},h$5.xor=function(e){return d$7(e)||(e=b$6(e)),e$4(this.low^e.low,this.high^e.high,this.unsigned)},h$5.shiftLeft=function(e){return d$7(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?e$4(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):e$4(0,this.low<<e-32,this.unsigned)},h$5.shl=h$5.shiftLeft,h$5.shiftRight=function(e){return d$7(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?e$4(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):e$4(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},h$5.shr=h$5.shiftRight,h$5.shiftRightUnsigned=function(e){return d$7(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?e$4(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):e$4(32===e?this.high:this.high>>>e-32,0,this.unsigned)},h$5.shru=h$5.shiftRightUnsigned,h$5.shr_u=h$5.shiftRightUnsigned,h$5.rotateLeft=function(e){var t;return d$7(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?e$4(this.high,this.low,this.unsigned):e<32?(t=32-e,e$4(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned)):(t=32-(e-=32),e$4(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned))},h$5.rotl=h$5.rotateLeft,h$5.rotateRight=function(e){var t;return d$7(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?e$4(this.high,this.low,this.unsigned):e<32?(t=32-e,e$4(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned)):(t=32-(e-=32),e$4(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned))},h$5.rotr=h$5.rotateRight,h$5.toSigned=function(){return this.unsigned?e$4(this.low,this.high,!1):this},h$5.toUnsigned=function(){return this.unsigned?this:e$4(this.low,this.high,!0)},h$5.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},h$5.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},h$5.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},i$7.fromBytes=function(e,t,i){return i?i$7.fromBytesLE(e,t):i$7.fromBytesBE(e,t)},i$7.fromBytesLE=function(e,t){return new i$7(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},i$7.fromBytesBE=function(e,t){return new i$7(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)};var a$4=function(e,t,i){if(typeof e>"u"&&(e=a$4.DEFAULT_CAPACITY),typeof t>"u"&&(t=a$4.DEFAULT_ENDIAN),typeof i>"u"&&(i=a$4.DEFAULT_NOASSERT),!i){if((e|=0)<0)throw RangeError("Illegal capacity");t=!!t,i=!!i}this.buffer=0===e?E$5:new ArrayBuffer(e),this.view=0===e?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=e,this.littleEndian=t,this.noAssert=i};a$4.VERSION="5.0.1",a$4.LITTLE_ENDIAN=!0,a$4.BIG_ENDIAN=!1,a$4.DEFAULT_CAPACITY=16,a$4.DEFAULT_ENDIAN=a$4.BIG_ENDIAN,a$4.DEFAULT_NOASSERT=!1,a$4.Long=i$7||null;var o$8=a$4.prototype;o$8.__isByteBuffer__,Object.defineProperty(o$8,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var E$5=new ArrayBuffer(0),I$1=String.fromCharCode;function c$7(e){var t=0;return function(){return t<e.length?e.charCodeAt(t++):null}}function d$6(){var e=[],t=[];return function(){if(0===arguments.length)return t.join("")+I$1.apply(String,e);e.length+arguments.length>1024&&(t.push(I$1.apply(String,e)),e.length=0),Array.prototype.push.apply(e,arguments)}}function T$3(e,t,i,n,r){var o,a,s=8*r-n-1,l=(1<<s)-1,u=l>>1,c=-7,h=i?r-1:0,d=i?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+h],h+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+h],h+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)}function L$6(e,t,i,n,r,o){var a,s,l,u=8*o-r-1,c=(1<<u)-1,h=c>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(t*l-1)*Math.pow(2,r),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,r),a=0));r>=8;e[i+f]=255&s,f+=p,s/=256,r-=8);for(a=a<<r|s,u+=r;u>0;e[i+f]=255&a,f+=p,a/=256,u-=8);e[i+f-p]|=128*_}a$4.accessor=function(){return Uint8Array},a$4.allocate=function(e,t,i){return new a$4(e,t,i)},a$4.concat=function(e,t,i,n){("boolean"==typeof t||"string"!=typeof t)&&(n=i,i=t,t=void 0);for(var r,o=0,a=0,s=e.length;a<s;++a)a$4.isByteBuffer(e[a])||(e[a]=a$4.wrap(e[a],t)),(r=e[a].limit-e[a].offset)>0&&(o+=r);if(0===o)return new a$4(0,i,n);var l,u=new a$4(o,i,n);for(a=0;a<s;)!((r=(l=e[a++]).limit-l.offset)<=0)&&(u.view.set(l.view.subarray(l.offset,l.limit),u.offset),u.offset+=r);return u.limit=u.offset,u.offset=0,u},a$4.isByteBuffer=function(e){return!0===(e&&e.__isByteBuffer__)},a$4.type=function(){return ArrayBuffer},a$4.wrap=function(e,t,i,n){if("string"!=typeof t&&(n=i,i=t,t=void 0),"string"==typeof e)switch(typeof t>"u"&&(t="utf8"),t){case"base64":return a$4.fromBase64(e,i);case"hex":return a$4.fromHex(e,i);case"binary":return a$4.fromBinary(e,i);case"utf8":return a$4.fromUTF8(e,i);case"debug":return a$4.fromDebug(e,i);default:throw Error("Unsupported encoding: "+t)}if(null===e||"object"!=typeof e)throw TypeError("Illegal buffer");var r;if(a$4.isByteBuffer(e))return(r=o$8.clone.call(e)).markedOffset=-1,r;if(e instanceof Uint8Array)r=new a$4(0,i,n),e.length>0&&(r.buffer=e.buffer,r.offset=e.byteOffset,r.limit=e.byteOffset+e.byteLength,r.view=new Uint8Array(e.buffer));else if(e instanceof ArrayBuffer)r=new a$4(0,i,n),e.byteLength>0&&(r.buffer=e,r.offset=0,r.limit=e.byteLength,r.view=e.byteLength>0?new Uint8Array(e):null);else{if("[object Array]"!==Object.prototype.toString.call(e))throw TypeError("Illegal buffer");(r=new a$4(e.length,i,n)).limit=e.length;for(var o=0;o<e.length;++o)r.view[o]=e[o]}return r},o$8.writeBitSet=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if(!(e instanceof Array))throw TypeError("Illegal BitSet: Not an array");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r=t,o=e.length,a=o>>3,s=0;for(t+=this.writeVarint32(o,t);a--;)n=1&!!e[s++]|(1&!!e[s++])<<1|(1&!!e[s++])<<2|(1&!!e[s++])<<3|(1&!!e[s++])<<4|(1&!!e[s++])<<5|(1&!!e[s++])<<6|(1&!!e[s++])<<7,this.writeByte(n,t++);if(s<o){var l=0;for(n=0;s<o;)n|=(1&!!e[s++])<<l++;this.writeByte(n,t++)}return i?(this.offset=t,this):t-r},o$8.readBitSet=function(e){var t=typeof e>"u";t&&(e=this.offset);var i,n=this.readVarint32(e),r=n.value,o=r>>3,a=0,s=[];for(e+=n.length;o--;)i=this.readByte(e++),s[a++]=!!(1&i),s[a++]=!!(2&i),s[a++]=!!(4&i),s[a++]=!!(8&i),s[a++]=!!(16&i),s[a++]=!!(32&i),s[a++]=!!(64&i),s[a++]=!!(128&i);if(a<r){var l=0;for(i=this.readByte(e++);a<r;)s[a++]=!!(i>>l++&1)}return t&&(this.offset=e),s},o$8.readBytes=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+"+e+") <= "+this.buffer.byteLength)}var n=this.slice(t,t+e);return i&&(this.offset+=e),n},o$8.writeBytes=o$8.append,o$8.writeInt8=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=1,this.view[t]=e,i&&(this.offset+=1),this},o$8.writeByte=o$8.writeInt8,o$8.readInt8=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i=this.view[e];return 128==(128&i)&&(i=-(255-i+1)),t&&(this.offset+=1),i},o$8.readByte=o$8.readInt8,o$8.writeUint8=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=1,this.view[t]=e,i&&(this.offset+=1),this},o$8.writeUInt8=o$8.writeUint8,o$8.readUint8=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i=this.view[e];return t&&(this.offset+=1),i},o$8.readUInt8=o$8.readUint8,o$8.writeInt16=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),i&&(this.offset+=2),this},o$8.writeShort=o$8.writeInt16,o$8.readInt16=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[e],i|=this.view[e+1]<<8):(i=this.view[e]<<8,i|=this.view[e+1]),32768==(32768&i)&&(i=-(65535-i+1)),t&&(this.offset+=2),i},o$8.readShort=o$8.readInt16,o$8.writeUint16=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),i&&(this.offset+=2),this},o$8.writeUInt16=o$8.writeUint16,o$8.readUint16=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[e],i|=this.view[e+1]<<8):(i=this.view[e]<<8,i|=this.view[e+1]),t&&(this.offset+=2),i},o$8.readUInt16=o$8.readUint16,o$8.writeInt32=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),i&&(this.offset+=4),this},o$8.writeInt=o$8.writeInt32,o$8.readInt32=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0),i|=0,t&&(this.offset+=4),i},o$8.readInt=o$8.readInt32,o$8.writeUint32=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),i&&(this.offset+=4),this},o$8.writeUInt32=o$8.writeUint32,o$8.readUint32=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0),t&&(this.offset+=4),i},o$8.readUInt32=o$8.readUint32,i$7&&(o$8.writeInt64=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=i$7.fromNumber(e);else if("string"==typeof e)e=i$7.fromString(e);else if(!(e&&e instanceof i$7))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=i$7.fromNumber(e):"string"==typeof e&&(e=i$7.fromString(e)),t+=8;var n=this.buffer.byteLength;t>n&&this.resize((n*=2)>t?n:t),t-=8;var r=e.low,o=e.high;return this.littleEndian?(this.view[t+3]=r>>>24&255,this.view[t+2]=r>>>16&255,this.view[t+1]=r>>>8&255,this.view[t]=255&r,t+=4,this.view[t+3]=o>>>24&255,this.view[t+2]=o>>>16&255,this.view[t+1]=o>>>8&255,this.view[t]=255&o):(this.view[t]=o>>>24&255,this.view[t+1]=o>>>16&255,this.view[t+2]=o>>>8&255,this.view[t+3]=255&o,t+=4,this.view[t]=r>>>24&255,this.view[t+1]=r>>>16&255,this.view[t+2]=r>>>8&255,this.view[t+3]=255&r),i&&(this.offset+=8),this},o$8.writeLong=o$8.writeInt64,o$8.readInt64=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var i=0,n=0;this.littleEndian?(i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0,e+=4,n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0,e+=4,i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0);var r=new i$7(i,n,!1);return t&&(this.offset+=8),r},o$8.readLong=o$8.readInt64,o$8.writeUint64=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=i$7.fromNumber(e);else if("string"==typeof e)e=i$7.fromString(e);else if(!(e&&e instanceof i$7))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=i$7.fromNumber(e):"string"==typeof e&&(e=i$7.fromString(e)),t+=8;var n=this.buffer.byteLength;t>n&&this.resize((n*=2)>t?n:t),t-=8;var r=e.low,o=e.high;return this.littleEndian?(this.view[t+3]=r>>>24&255,this.view[t+2]=r>>>16&255,this.view[t+1]=r>>>8&255,this.view[t]=255&r,t+=4,this.view[t+3]=o>>>24&255,this.view[t+2]=o>>>16&255,this.view[t+1]=o>>>8&255,this.view[t]=255&o):(this.view[t]=o>>>24&255,this.view[t+1]=o>>>16&255,this.view[t+2]=o>>>8&255,this.view[t+3]=255&o,t+=4,this.view[t]=r>>>24&255,this.view[t+1]=r>>>16&255,this.view[t+2]=r>>>8&255,this.view[t+3]=255&r),i&&(this.offset+=8),this},o$8.writeUInt64=o$8.writeUint64,o$8.readUint64=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var i=0,n=0;this.littleEndian?(i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0,e+=4,n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0,e+=4,i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0);var r=new i$7(i,n,!0);return t&&(this.offset+=8),r},o$8.readUInt64=o$8.readUint64),o$8.writeFloat32=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=4,L$6(this.view,e,t,this.littleEndian,23,4),i&&(this.offset+=4),this},o$8.writeFloat=o$8.writeFloat32,o$8.readFloat32=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var i=T$3(this.view,e,this.littleEndian,23,4);return t&&(this.offset+=4),i},o$8.readFloat=o$8.readFloat32,o$8.writeFloat64=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=8;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=8,L$6(this.view,e,t,this.littleEndian,52,8),i&&(this.offset+=8),this},o$8.writeDouble=o$8.writeFloat64,o$8.readFloat64=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var i=T$3(this.view,e,this.littleEndian,52,8);return t&&(this.offset+=8),i},o$8.readDouble=o$8.readFloat64,a$4.MAX_VARINT32_BYTES=5,a$4.calculateVarint32=function(e){return(e>>>=0)<128?1:e<16384?2:e<1<<21?3:e<1<<28?4:5},a$4.zigZagEncode32=function(e){return((e|=0)<<1^e>>31)>>>0},a$4.zigZagDecode32=function(e){return e>>>1^-(1&e)|0},o$8.writeVarint32=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r=a$4.calculateVarint32(e);t+=r;var o=this.buffer.byteLength;for(t>o&&this.resize((o*=2)>t?o:t),t-=r,e>>>=0;e>=128;)n=127&e|128,this.view[t++]=n,e>>>=7;return this.view[t++]=e,i?(this.offset=t,this):r},o$8.writeVarint32ZigZag=function(e,t){return this.writeVarint32(a$4.zigZagEncode32(e),t)},o$8.readVarint32=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i,n=0,r=0;do{if(!this.noAssert&&e>this.limit){var o=Error("Truncated");throw o.truncated=!0,o}i=this.view[e++],n<5&&(r|=(127&i)<<7*n),++n}while(0!=(128&i));return r|=0,t?(this.offset=e,r):{value:r,length:n}},o$8.readVarint32ZigZag=function(e){var t=this.readVarint32(e);return"object"==typeof t?t.value=a$4.zigZagDecode32(t.value):t=a$4.zigZagDecode32(t),t},i$7&&(a$4.MAX_VARINT64_BYTES=10,a$4.calculateVarint64=function(e){"number"==typeof e?e=i$7.fromNumber(e):"string"==typeof e&&(e=i$7.fromString(e));var t=e.toInt()>>>0,i=e.shiftRightUnsigned(28).toInt()>>>0,n=e.shiftRightUnsigned(56).toInt()>>>0;return 0==n?0==i?t<16384?t<128?1:2:t<1<<21?3:4:i<16384?i<128?5:6:i<1<<21?7:8:n<128?9:10},a$4.zigZagEncode64=function(e){return"number"==typeof e?e=i$7.fromNumber(e,!1):"string"==typeof e?e=i$7.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},a$4.zigZagDecode64=function(e){return"number"==typeof e?e=i$7.fromNumber(e,!1):"string"==typeof e?e=i$7.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(i$7.ONE).toSigned().negate()).toSigned()},o$8.writeVarint64=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=i$7.fromNumber(e);else if("string"==typeof e)e=i$7.fromString(e);else if(!(e&&e instanceof i$7))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=i$7.fromNumber(e,!1):"string"==typeof e?e=i$7.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned());var n=a$4.calculateVarint64(e),r=e.toInt()>>>0,o=e.shiftRightUnsigned(28).toInt()>>>0,a=e.shiftRightUnsigned(56).toInt()>>>0;t+=n;var s=this.buffer.byteLength;switch(t>s&&this.resize((s*=2)>t?s:t),t-=n,n){case 10:this.view[t+9]=a>>>7&1;case 9:this.view[t+8]=9!==n?128|a:127&a;case 8:this.view[t+7]=8!==n?o>>>21|128:o>>>21&127;case 7:this.view[t+6]=7!==n?o>>>14|128:o>>>14&127;case 6:this.view[t+5]=6!==n?o>>>7|128:o>>>7&127;case 5:this.view[t+4]=5!==n?128|o:127&o;case 4:this.view[t+3]=4!==n?r>>>21|128:r>>>21&127;case 3:this.view[t+2]=3!==n?r>>>14|128:r>>>14&127;case 2:this.view[t+1]=2!==n?r>>>7|128:r>>>7&127;case 1:this.view[t]=1!==n?128|r:127&r}return i?(this.offset+=n,this):n},o$8.writeVarint64ZigZag=function(e,t){return this.writeVarint64(a$4.zigZagEncode64(e),t)},o$8.readVarint64=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i=e,n=0,r=0,o=0,a=0;if(n=127&(a=this.view[e++]),128&a&&(n|=(127&(a=this.view[e++]))<<7,(128&a||this.noAssert&&typeof a>"u")&&(n|=(127&(a=this.view[e++]))<<14,(128&a||this.noAssert&&typeof a>"u")&&(n|=(127&(a=this.view[e++]))<<21,(128&a||this.noAssert&&typeof a>"u")&&(r=127&(a=this.view[e++]),(128&a||this.noAssert&&typeof a>"u")&&(r|=(127&(a=this.view[e++]))<<7,(128&a||this.noAssert&&typeof a>"u")&&(r|=(127&(a=this.view[e++]))<<14,(128&a||this.noAssert&&typeof a>"u")&&(r|=(127&(a=this.view[e++]))<<21,(128&a||this.noAssert&&typeof a>"u")&&(o=127&(a=this.view[e++]),(128&a||this.noAssert&&typeof a>"u")&&(o|=(127&(a=this.view[e++]))<<7,128&a||this.noAssert&&typeof a>"u"))))))))))throw Error("Buffer overrun");var s=i$7.fromBits(n|r<<28,r>>>4|o<<24,!1);return t?(this.offset=e,s):{value:s,length:e-i}},o$8.readVarint64ZigZag=function(e){var t=this.readVarint64(e);return t&&t.value instanceof i$7?t.value=a$4.zigZagDecode64(t.value):t=a$4.zigZagDecode64(t),t}),o$8.writeCString=function(e,t){var i=typeof t>"u";i&&(t=this.offset);var n,r=e.length;if(!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");for(n=0;n<r;++n)if(0===e.charCodeAt(n))throw RangeError("Illegal str: Contains NULL-characters");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}r=v$5.calculateUTF16asUTF8(c$7(e))[1],t+=r+1;var o=this.buffer.byteLength;return t>o&&this.resize((o*=2)>t?o:t),t-=r+1,v$5.encodeUTF16toUTF8(c$7(e),function(e){this.view[t++]=e}.bind(this)),this.view[t++]=0,i?(this.offset=t,this):r},o$8.readCString=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i,n=e,r=-1;return v$5.decodeUTF8toUTF16(function(){if(0===r)return null;if(e>=this.limit)throw RangeError("Illegal range: Truncated data, "+e+" < "+this.limit);return 0===(r=this.view[e++])?null:r}.bind(this),i=d$6(),!0),t?(this.offset=e,i()):{string:i(),length:e-n}},o$8.writeIString=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r=t;n=v$5.calculateUTF16asUTF8(c$7(e),this.noAssert)[1],t+=4+n;var o=this.buffer.byteLength;if(t>o&&this.resize((o*=2)>t?o:t),t-=4+n,this.littleEndian?(this.view[t+3]=n>>>24&255,this.view[t+2]=n>>>16&255,this.view[t+1]=n>>>8&255,this.view[t]=255&n):(this.view[t]=n>>>24&255,this.view[t+1]=n>>>16&255,this.view[t+2]=n>>>8&255,this.view[t+3]=255&n),t+=4,v$5.encodeUTF16toUTF8(c$7(e),function(e){this.view[t++]=e}.bind(this)),t!==r+4+n)throw RangeError("Illegal range: Truncated data, "+t+" == "+(t+4+n));return i?(this.offset=t,this):t-r},o$8.readIString=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var i=e,n=this.readUint32(e),r=this.readUTF8String(n,a$4.METRICS_BYTES,e+=4);return e+=r.length,t?(this.offset=e,r.string):{string:r.string,length:e-i}},a$4.METRICS_CHARS="c",a$4.METRICS_BYTES="b",o$8.writeUTF8String=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r=t;n=v$5.calculateUTF16asUTF8(c$7(e))[1],t+=n;var o=this.buffer.byteLength;return t>o&&this.resize((o*=2)>t?o:t),t-=n,v$5.encodeUTF16toUTF8(c$7(e),function(e){this.view[t++]=e}.bind(this)),i?(this.offset=t,this):t-r},o$8.writeString=o$8.writeUTF8String,a$4.calculateUTF8Chars=function(e){return v$5.calculateUTF16asUTF8(c$7(e))[0]},a$4.calculateUTF8Bytes=function(e){return v$5.calculateUTF16asUTF8(c$7(e))[1]},a$4.calculateString=a$4.calculateUTF8Bytes,o$8.readUTF8String=function(e,t,i){"number"==typeof t&&(i=t,t=void 0);var n=typeof i>"u";if(n&&(i=this.offset),typeof t>"u"&&(t=a$4.METRICS_CHARS),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal length: "+e+" (not an integer)");if(e|=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}var r,o=0,a=i;if(t===a$4.METRICS_CHARS){if(r=d$6(),v$5.decodeUTF8(function(){return o<e&&i<this.limit?this.view[i++]:null}.bind(this),(function(e){++o,v$5.UTF8toUTF16(e,r)})),o!==e)throw RangeError("Illegal range: Truncated data, "+o+" == "+e);return n?(this.offset=i,r()):{string:r(),length:i-a}}if(t===a$4.METRICS_BYTES){if(!this.noAssert){if("number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+"+e+") <= "+this.buffer.byteLength)}var s=i+e;if(v$5.decodeUTF8toUTF16(function(){return i<s?this.view[i++]:null}.bind(this),r=d$6(),this.noAssert),i!==s)throw RangeError("Illegal range: Truncated data, "+i+" == "+s);return n?(this.offset=i,r()):{string:r(),length:i-a}}throw TypeError("Unsupported metrics: "+t)},o$8.readString=o$8.readUTF8String,o$8.writeVString=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r,o=t;n=v$5.calculateUTF16asUTF8(c$7(e),this.noAssert)[1],r=a$4.calculateVarint32(n),t+=r+n;var a=this.buffer.byteLength;if(t>a&&this.resize((a*=2)>t?a:t),t-=r+n,t+=this.writeVarint32(n,t),v$5.encodeUTF16toUTF8(c$7(e),function(e){this.view[t++]=e}.bind(this)),t!==o+n+r)throw RangeError("Illegal range: Truncated data, "+t+" == "+(t+n+r));return i?(this.offset=t,this):t-o},o$8.readVString=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i=e,n=this.readVarint32(e),r=this.readUTF8String(n.value,a$4.METRICS_BYTES,e+=n.length);return e+=r.length,t?(this.offset=e,r.string):{string:r.string,length:e-i}},o$8.append=function(e,t,i){("number"==typeof t||"string"!=typeof t)&&(i=t,t=void 0);var n=typeof i>"u";if(n&&(i=this.offset),!this.noAssert){if("number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}e instanceof a$4||(e=a$4.wrap(e,t));var r=e.limit-e.offset;if(r<=0)return this;i+=r;var o=this.buffer.byteLength;return i>o&&this.resize((o*=2)>i?o:i),i-=r,this.view.set(e.view.subarray(e.offset,e.limit),i),e.offset+=r,n&&(this.offset+=r),this},o$8.appendTo=function(e,t){return e.append(this,t),this},o$8.assert=function(e){return this.noAssert=!e,this},o$8.capacity=function(){return this.buffer.byteLength},o$8.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},o$8.clone=function(e){var t=new a$4(0,this.littleEndian,this.noAssert);return e?(t.buffer=new ArrayBuffer(this.buffer.byteLength),t.view=new Uint8Array(t.buffer)):(t.buffer=this.buffer,t.view=this.view),t.offset=this.offset,t.markedOffset=this.markedOffset,t.limit=this.limit,t},o$8.compact=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}if(0===e&&t===this.buffer.byteLength)return this;var i=t-e;if(0===i)return this.buffer=E$5,this.view=null,this.markedOffset>=0&&(this.markedOffset-=e),this.offset=0,this.limit=0,this;var n=new ArrayBuffer(i),r=new Uint8Array(n);return r.set(this.view.subarray(e,t)),this.buffer=n,this.view=r,this.markedOffset>=0&&(this.markedOffset-=e),this.offset=0,this.limit=i,this},o$8.copy=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}if(e===t)return new a$4(0,this.littleEndian,this.noAssert);var i=t-e,n=new a$4(i,this.littleEndian,this.noAssert);return n.offset=0,n.limit=i,n.markedOffset>=0&&(n.markedOffset-=e),this.copyTo(n,0,e,t),n},o$8.copyTo=function(e,t,i,n){var r,o;if(!this.noAssert&&!a$4.isByteBuffer(e))throw TypeError("Illegal target: Not a ByteBuffer");if(t=(o=typeof t>"u")?e.offset:0|t,i=(r=typeof i>"u")?this.offset:0|i,n=typeof n>"u"?this.limit:0|n,t<0||t>e.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+t+" <= "+e.buffer.byteLength);if(i<0||n>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+i+" <= "+this.buffer.byteLength);var a=n-i;return 0===a?e:(e.ensureCapacity(t+a),e.view.set(this.view.subarray(i,n),t),r&&(this.offset+=a),o&&(e.offset+=a),this)},o$8.ensureCapacity=function(e){var t=this.buffer.byteLength;return t<e?this.resize((t*=2)>e?t:e):this},o$8.fill=function(e,t,i){var n=typeof t>"u";if(n&&(t=this.offset),"string"==typeof e&&e.length>0&&(e=e.charCodeAt(0)),typeof t>"u"&&(t=this.offset),typeof i>"u"&&(i=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal end: Not an integer");if(i>>>=0,t<0||t>i||i>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+i+" <= "+this.buffer.byteLength)}if(t>=i)return this;for(;t<i;)this.view[t++]=e;return n&&(this.offset=t),this},o$8.flip=function(){return this.limit=this.offset,this.offset=0,this},o$8.mark=function(e){if(e=typeof e>"u"?this.offset:e,!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=e,this},o$8.order=function(e){if(!this.noAssert&&"boolean"!=typeof e)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!e,this},o$8.LE=function(e){return this.littleEndian=!(typeof e<"u")||!!e,this},o$8.BE=function(e){return this.littleEndian=typeof e<"u"&&!e,this},o$8.prepend=function(e,t,i){("number"==typeof t||"string"!=typeof t)&&(i=t,t=void 0);var n=typeof i>"u";if(n&&(i=this.offset),!this.noAssert){if("number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}e instanceof a$4||(e=a$4.wrap(e,t));var r=e.limit-e.offset;if(r<=0)return this;var o=r-i;if(o>0){var a=new ArrayBuffer(this.buffer.byteLength+o),s=new Uint8Array(a);s.set(this.view.subarray(i,this.buffer.byteLength),r),this.buffer=a,this.view=s,this.offset+=o,this.markedOffset>=0&&(this.markedOffset+=o),this.limit+=o,i+=o}else new Uint8Array(this.buffer);return this.view.set(e.view.subarray(e.offset,e.limit),i-r),e.offset=e.limit,n&&(this.offset-=r),this},o$8.prependTo=function(e,t){return e.prepend(this,t),this},o$8.printDebug=function(e){"function"!=typeof e&&(e=console.log.bind(console)),e(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},o$8.remaining=function(){return this.limit-this.offset},o$8.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},o$8.resize=function(e){if(!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal capacity: "+e+" (not an integer)");if((e|=0)<0)throw RangeError("Illegal capacity: 0 <= "+e)}if(this.buffer.byteLength<e){var t=new ArrayBuffer(e),i=new Uint8Array(t);i.set(this.view),this.buffer=t,this.view=i}return this},o$8.reverse=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}return e===t||Array.prototype.reverse.call(this.view.subarray(e,t)),this},o$8.skip=function(e){if(!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal length: "+e+" (not an integer)");e|=0}var t=this.offset+e;if(!this.noAssert&&(t<0||t>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+e+" <= "+this.buffer.byteLength);return this.offset=t,this},o$8.slice=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}var i=this.clone();return i.offset=e,i.limit=t,i},o$8.toBuffer=function(e){var t=this.offset,i=this.limit;if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: Not an integer");if(t>>>=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal limit: Not an integer");if(i>>>=0,t<0||t>i||i>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+i+" <= "+this.buffer.byteLength)}if(!e&&0===t&&i===this.buffer.byteLength)return this.buffer;if(t===i)return E$5;var n=new ArrayBuffer(i-t);return new Uint8Array(n).set(new Uint8Array(this.buffer).subarray(t,i),0),n},o$8.toArrayBuffer=o$8.toBuffer,o$8.toString=function(e,t,i){if(typeof e>"u")return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof e&&(i=t=e="utf8"),e){case"utf8":return this.toUTF8(t,i);case"base64":return this.toBase64(t,i);case"hex":return this.toHex(t,i);case"binary":return this.toBinary(t,i);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+e)}};var A$7=function(){for(var e={},t=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],i=[],n=0,r=t.length;n<r;++n)i[t[n]]=n;return e.encode=function(e,i){for(var n,r;null!==(n=e());)i(t[n>>2&63]),r=(3&n)<<4,null!==(n=e())?(i(t[63&((r|=n>>4&15)|n>>4&15)]),r=(15&n)<<2,null!==(n=e())?(i(t[63&(r|n>>6&3)]),i(t[63&n])):(i(t[63&r]),i(61))):(i(t[63&r]),i(61),i(61))},e.decode=function(e,t){var n,r,o;function a(e){throw Error("Illegal character code: "+e)}for(;null!==(n=e());)if(typeof(r=i[n])>"u"&&a(n),null!==(n=e())&&(typeof(o=i[n])>"u"&&a(n),t(r<<2>>>0|(48&o)>>4),null!==(n=e()))){if(typeof(r=i[n])>"u"){if(61===n)break;a(n)}if(t((15&o)<<4>>>0|(60&r)>>2),null!==(n=e())){if(typeof(o=i[n])>"u"){if(61===n)break;a(n)}t((3&r)<<6>>>0|o)}}},e.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)},e}();o$8.toBase64=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),t|=0,(e|=0)<0||t>this.capacity||e>t)throw RangeError("begin, end");var i;return A$7.encode(function(){return e<t?this.view[e++]:null}.bind(this),i=d$6()),i()},a$4.fromBase64=function(e,t){if("string"!=typeof e)throw TypeError("str");var i=new a$4(e.length/4*3,t),n=0;return A$7.decode(c$7(e),(function(e){i.view[n++]=e})),i.limit=n,i},a$4.btoa=function(e){return a$4.fromBinary(e).toBase64()},a$4.atob=function(e){return a$4.fromBase64(e).toBinary()},o$8.toBinary=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),t|=0,(e|=0)<0||t>this.capacity()||e>t)throw RangeError("begin, end");if(e===t)return"";for(var i=[],n=[];e<t;)i.push(this.view[e++]),i.length>=1024&&(n.push(String.fromCharCode.apply(String,i)),i=[]);return n.join("")+String.fromCharCode.apply(String,i)},a$4.fromBinary=function(e,t){if("string"!=typeof e)throw TypeError("str");for(var i,n=0,r=e.length,o=new a$4(r,t);n<r;){if((i=e.charCodeAt(n))>255)throw RangeError("illegal char code: "+i);o.view[n++]=i}return o.limit=r,o},o$8.toDebug=function(e){for(var t,i=-1,n=this.buffer.byteLength,r="",o="",a="";i<n;){if(-1!==i&&(r+=(t=this.view[i])<16?"0"+t.toString(16).toUpperCase():t.toString(16).toUpperCase(),e&&(o+=t>32&&t<127?String.fromCharCode(t):".")),++i,e&&i>0&&i%16==0&&i!==n){for(;r.length<51;)r+=" ";a+=r+o+"\n",r=o=""}i===this.offset&&i===this.limit?r+=i===this.markedOffset?"!":"|":i===this.offset?r+=i===this.markedOffset?"[":"<":i===this.limit?r+=i===this.markedOffset?"]":">":r+=i===this.markedOffset?"'":e||0!==i&&i!==n?" ":""}if(e&&" "!==r){for(;r.length<51;)r+=" ";a+=r+o+"\n"}return e?a:r},a$4.fromDebug=function(e,t,i){for(var n,r,o=e.length,a=new a$4((o+1)/3|0,t,i),s=0,l=0,u=!1,c=!1,h=!1,d=!1,f=!1;s<o;){switch(n=e.charAt(s++)){case"!":if(!i){if(c||h||d){f=!0;break}c=h=d=!0}a.offset=a.markedOffset=a.limit=l,u=!1;break;case"|":if(!i){if(c||d){f=!0;break}c=d=!0}a.offset=a.limit=l,u=!1;break;case"[":if(!i){if(c||h){f=!0;break}c=h=!0}a.offset=a.markedOffset=l,u=!1;break;case"<":if(!i){if(c){f=!0;break}c=!0}a.offset=l,u=!1;break;case"]":if(!i){if(d||h){f=!0;break}d=h=!0}a.limit=a.markedOffset=l,u=!1;break;case">":if(!i){if(d){f=!0;break}d=!0}a.limit=l,u=!1;break;case"'":if(!i){if(h){f=!0;break}h=!0}a.markedOffset=l,u=!1;break;case" ":u=!1;break;default:if(!i&&u){f=!0;break}if(r=parseInt(n+e.charAt(s++),16),!i&&(isNaN(r)||r<0||r>255))throw TypeError("Illegal str: Not a debug encoded string");a.view[l++]=r,u=!0}if(f)throw TypeError("Illegal str: Invalid symbol at "+s)}if(!i){if(!c||!d)throw TypeError("Illegal str: Missing offset or limit");if(l<a.buffer.byteLength)throw TypeError("Illegal str: Not a debug encoded string (is it hex?) "+l+" < "+o)}return a},o$8.toHex=function(e,t){if(e=typeof e>"u"?this.offset:e,t=typeof t>"u"?this.limit:t,!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}for(var i,n=new Array(t-e);e<t;)(i=this.view[e++])<16?n.push("0",i.toString(16)):n.push(i.toString(16));return n.join("")},a$4.fromHex=function(e,t,i){if(!i){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if(e.length%2!=0)throw TypeError("Illegal str: Length not a multiple of 2")}for(var n,r=e.length,o=new a$4(r/2|0,t),a=0,s=0;a<r;a+=2){if(n=parseInt(e.substring(a,a+2),16),!i&&(!isFinite(n)||n<0||n>255))throw TypeError("Illegal str: Contains non-hex characters");o.view[s++]=n}return o.limit=s,o};var v$5=function(){var e={MAX_CODEPOINT:1114111,encodeUTF8:function(e,t){var i=null;for("number"==typeof e&&(i=e,e=function(){return null});null!==i||null!==(i=e());)i<128?t(127&i):i<2048?(t(i>>6&31|192),t(63&i|128)):i<65536?(t(i>>12&15|224),t(i>>6&63|128),t(63&i|128)):(t(i>>18&7|240),t(i>>12&63|128),t(i>>6&63|128),t(63&i|128)),i=null},decodeUTF8:function(e,t){for(var i,n,r,o,a=function(e){e=e.slice(0,e.indexOf(null));var t=Error(e.toString());throw t.name="TruncatedError",t.bytes=e,t};null!==(i=e());)if(0==(128&i))t(i);else if(192==(224&i))null===(n=e())&&a([i,n]),t((31&i)<<6|63&n);else if(224==(240&i))(null===(n=e())||null===(r=e()))&&a([i,n,r]),t((15&i)<<12|(63&n)<<6|63&r);else{if(240!=(248&i))throw RangeError("Illegal starting byte: "+i);(null===(n=e())||null===(r=e())||null===(o=e()))&&a([i,n,r,o]),t((7&i)<<18|(63&n)<<12|(63&r)<<6|63&o)}},UTF16toUTF8:function(e,t){for(var i,n=null;null!==(i=null!==n?n:e());)i>=55296&&i<=57343&&null!==(n=e())&&n>=56320&&n<=57343?(t(1024*(i-55296)+n-56320+65536),n=null):t(i);null!==n&&t(n)},UTF8toUTF16:function(e,t){var i=null;for("number"==typeof e&&(i=e,e=function(){return null});null!==i||null!==(i=e());)i<=65535?t(i):(t(55296+((i-=65536)>>10)),t(i%1024+56320)),i=null},encodeUTF16toUTF8:function(t,i){e.UTF16toUTF8(t,(function(t){e.encodeUTF8(t,i)}))},decodeUTF8toUTF16:function(t,i){e.decodeUTF8(t,(function(t){e.UTF8toUTF16(t,i)}))},calculateCodePoint:function(e){return e<128?1:e<2048?2:e<65536?3:4},calculateUTF8:function(e){for(var t,i=0;null!==(t=e());)i+=t<128?1:t<2048?2:t<65536?3:4;return i},calculateUTF16asUTF8:function(t){var i=0,n=0;return e.UTF16toUTF8(t,(function(e){++i,n+=e<128?1:e<2048?2:e<65536?3:4})),[i,n]}};return e}();o$8.toUTF8=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}var i;try{v$5.decodeUTF8toUTF16(function(){return e<t?this.view[e++]:null}.bind(this),i=d$6())}catch{if(e!==t)throw RangeError("Illegal range: Truncated data, "+e+" != "+t)}return i()},a$4.fromUTF8=function(e,t,i){if(!i&&"string"!=typeof e)throw TypeError("Illegal str: Not a string");var n=new a$4(v$5.calculateUTF16asUTF8(c$7(e),!0)[1],t,i),r=0;return v$5.encodeUTF16toUTF8(c$7(e),(function(e){n.view[r++]=e})),n.limit=r,n};var p$5={};function h$4(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this.proxy=e.proxy,this.viewer=e.viewer,this.url=e.url,this.metadata=e$1Y(e.metadata,{boundBox:{minX:-180,minY:-90,maxX:180,maxY:90},minLevel:1,maxLevel:20}),this.roadMetadata=e.roadMetadata,this.roadUrl=e.roadUrl,this.labelGraphics=e.labelGraphics?e.labelGraphics:{},this.billboardGraphics=e.billboardGraphics?e.billboardGraphics:{},this.aotuCollide=e$1Y(e.aotuCollide,!0),this.collisionPadding=e.collisionPadding?e.collisionPadding:[3,5,3,5],this.serverFirstStyle=e$1Y(e.serverFirstStyle,!0),this.subdomains=e.subdomains,Array.isArray(this.subdomains)?this.subdomains=this.subdomains.slice():t$$(this.subdomains)&&0<this.subdomains.length?this.subdomains=this.subdomains.split(""):this.subdomains=["t0","t1","t2","t3","t4","t5","t6","t7"],this.token=e.token,this.depthTestOptimization=e$1Y(e.depthTestOptimization,!1),this.dTOElevation=e$1Y(e.dTOElevation,2e4),this.dTOPitch=e$1Y(e.dTOPitch,-1.22),this.tileCache=[],this.labelCache=[],this._isInitial=!1,this._latelyGrid=[],this._latelyRefreshStamp=0,this._latelyCollisionStamp=0;var t=t$U();this._UUID="TDT_WTFS_LABEL_"+t,this._UUIDRoad="TDT_WTFS_LABEL_ROAD_"+t,this._isDTP=!1,this.viewer.camera.percentageChanged=.18,this.bindEvent()}function O$3(e,t){return t.minX>=e.minX&&t.minX<=e.maxX&&t.minY>=e.minY&&t.minY<=e.maxY||t.maxX>=e.minX&&t.maxX<=e.maxX&&t.maxY>=e.minY&&t.maxY<=e.maxY||t.minX>=e.minX&&t.minX<=e.maxX&&t.maxY>=e.minY&&t.maxY<=e.maxY||t.maxX>=e.minX&&t.maxX<=e.maxX&&t.minY>=e.minY&&t.minY<=e.maxY}function Y$2(e){return e.coord.x}function F$2(e){return e.coord.y}function X$3(e){return{x:e.anno.collisionBox.x,y:e.anno.collisionBox.y,width:e.anno.collisionBox.width,height:e.anno.collisionBox.height}}function q$1(e,t,i,n,r,o,a,s){a.anno;var l=s,u={x:i,y:n,width:r-i,height:o-n},c=l.x,h=l.y,d=u.x,f=u.y;return!(c>d+u.width||c+l.width<d||h+l.height<f||h>f+u.height)}p$5.ByteBuffer=a$4,p$5.Long=a$4.Long||null,p$5.VERSION="5.0.3",p$5.WIRE_TYPES={},p$5.WIRE_TYPES.VARINT=0,p$5.WIRE_TYPES.BITS64=1,p$5.WIRE_TYPES.LDELIM=2,p$5.WIRE_TYPES.STARTGROUP=3,p$5.WIRE_TYPES.ENDGROUP=4,p$5.WIRE_TYPES.BITS32=5,p$5.PACKABLE_WIRE_TYPES=[p$5.WIRE_TYPES.VARINT,p$5.WIRE_TYPES.BITS64,p$5.WIRE_TYPES.BITS32],p$5.TYPES={int32:{name:"int32",wireType:p$5.WIRE_TYPES.VARINT,defaultValue:0},uint32:{name:"uint32",wireType:p$5.WIRE_TYPES.VARINT,defaultValue:0},sint32:{name:"sint32",wireType:p$5.WIRE_TYPES.VARINT,defaultValue:0},int64:{name:"int64",wireType:p$5.WIRE_TYPES.VARINT,defaultValue:p$5.Long?p$5.Long.ZERO:void 0},uint64:{name:"uint64",wireType:p$5.WIRE_TYPES.VARINT,defaultValue:p$5.Long?p$5.Long.UZERO:void 0},sint64:{name:"sint64",wireType:p$5.WIRE_TYPES.VARINT,defaultValue:p$5.Long?p$5.Long.ZERO:void 0},bool:{name:"bool",wireType:p$5.WIRE_TYPES.VARINT,defaultValue:!1},double:{name:"double",wireType:p$5.WIRE_TYPES.BITS64,defaultValue:0},string:{name:"string",wireType:p$5.WIRE_TYPES.LDELIM,defaultValue:""},bytes:{name:"bytes",wireType:p$5.WIRE_TYPES.LDELIM,defaultValue:null},fixed32:{name:"fixed32",wireType:p$5.WIRE_TYPES.BITS32,defaultValue:0},sfixed32:{name:"sfixed32",wireType:p$5.WIRE_TYPES.BITS32,defaultValue:0},fixed64:{name:"fixed64",wireType:p$5.WIRE_TYPES.BITS64,defaultValue:p$5.Long?p$5.Long.UZERO:void 0},sfixed64:{name:"sfixed64",wireType:p$5.WIRE_TYPES.BITS64,defaultValue:p$5.Long?p$5.Long.ZERO:void 0},float:{name:"float",wireType:p$5.WIRE_TYPES.BITS32,defaultValue:0},enum:{name:"enum",wireType:p$5.WIRE_TYPES.VARINT,defaultValue:0},message:{name:"message",wireType:p$5.WIRE_TYPES.LDELIM,defaultValue:null},group:{name:"group",wireType:p$5.WIRE_TYPES.STARTGROUP,defaultValue:null}},p$5.MAP_KEY_TYPES=[p$5.TYPES.int32,p$5.TYPES.sint32,p$5.TYPES.sfixed32,p$5.TYPES.uint32,p$5.TYPES.fixed32,p$5.TYPES.int64,p$5.TYPES.sint64,p$5.TYPES.sfixed64,p$5.TYPES.uint64,p$5.TYPES.fixed64,p$5.TYPES.bool,p$5.TYPES.string,p$5.TYPES.bytes],p$5.ID_MIN=1,p$5.ID_MAX=536870911,p$5.convertFieldsToCamelCase=!1,p$5.populateAccessors=!0,p$5.populateDefaults=!0,p$5.Util=function(){var e={};return e.IS_NODE="object"==typeof process&&process+""=="[object process]"&&!process.browser,e.XHR=function(){for(var e=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],t=null,i=0;i<e.length;i++){try{t=e[i]()}catch{continue}break}if(!t)throw Error("XMLHttpRequest is not supported");return t},e.fetch=function(t,i){if(i&&"function"!=typeof i&&(i=null),e.IS_NODE){var n=require("fs");if(i)n.readFile(t,(function(e,t){i(e?null:""+t)}));else try{return n.readFileSync(t)}catch{return null}}else{var r=e.XHR();if(r.open("GET",t,!!i),r.setRequestHeader("Accept","text/plain"),"function"==typeof r.overrideMimeType&&r.overrideMimeType("text/plain"),!i)return r.send(null),200==r.status||0==r.status&&"string"==typeof r.responseText?r.responseText:null;if(r.onreadystatechange=function(){4==r.readyState&&(200==r.status||0==r.status&&"string"==typeof r.responseText?i(r.responseText):i(null))},4==r.readyState)return;r.send(null)}},e.toCamelCase=function(e){return e.replace(/_([a-zA-Z])/g,(function(e,t){return t.toUpperCase()}))},e}(),p$5.Lang={DELIM:/[\s\{\}=;:\[\],'"\(\)<>]/g,RULE:/^(?:required|optional|repeated|map)$/,TYPE:/^(?:double|float|int32|uint32|sint32|int64|uint64|sint64|fixed32|sfixed32|fixed64|sfixed64|bool|string|bytes)$/,NAME:/^[a-zA-Z_][a-zA-Z_0-9]*$/,TYPEDEF:/^[a-zA-Z][a-zA-Z_0-9]*$/,TYPEREF:/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,FQTYPEREF:/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/,NUMBER:/^-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+|([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?)|inf|nan)$/,NUMBER_DEC:/^(?:[1-9][0-9]*|0)$/,NUMBER_HEX:/^0[xX][0-9a-fA-F]+$/,NUMBER_OCT:/^0[0-7]+$/,NUMBER_FLT:/^([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?|inf|nan)$/,BOOL:/^(?:true|false)$/i,ID:/^(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,NEGID:/^\-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,WHITESPACE:/\s/,STRING:/(?:"([^"\\]*(?:\\.[^"\\]*)*)")|(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,STRING_DQ:/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,STRING_SQ:/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g},p$5.DotProto=function(e,t){var i={},n=function(e){this.source=e+"",this.index=0,this.line=1,this.stack=[],this._stringOpen=null},r=n.prototype;r._readString=function(){var e='"'===this._stringOpen?t.STRING_DQ:t.STRING_SQ;e.lastIndex=this.index-1;var i=e.exec(this.source);if(!i)throw Error("unterminated string");return this.index=e.lastIndex,this.stack.push(this._stringOpen),this._stringOpen=null,i[1]},r.next=function(){if(this.stack.length>0)return this.stack.shift();if(this.index>=this.source.length)return null;if(null!==this._stringOpen)return this._readString();var e,i,n;do{for(e=!1;t.WHITESPACE.test(n=this.source.charAt(this.index));)if("\n"===n&&++this.line,++this.index===this.source.length)return null;if("/"===this.source.charAt(this.index))if(++this.index,"/"===this.source.charAt(this.index)){for(;"\n"!==this.source.charAt(++this.index);)if(this.index==this.source.length)return null;++this.index,++this.line,e=!0}else{if("*"!==(n=this.source.charAt(this.index)))return"/";do{if("\n"===n&&++this.line,++this.index===this.source.length)return null;i=n,n=this.source.charAt(this.index)}while("*"!==i||"/"!==n);++this.index,e=!0}}while(e);if(this.index===this.source.length)return null;var r=this.index;if(t.DELIM.lastIndex=0,!t.DELIM.test(this.source.charAt(r++)))for(;r<this.source.length&&!t.DELIM.test(this.source.charAt(r));)++r;var o=this.source.substring(this.index,this.index=r);return('"'===o||"'"===o)&&(this._stringOpen=o),o},r.peek=function(){if(0===this.stack.length){var e=this.next();if(null===e)return null;this.stack.push(e)}return this.stack[0]},r.skip=function(e){var t=this.next();if(t!==e)throw Error("illegal '"+t+"', '"+e+"' expected")},r.omit=function(e){return this.peek()===e&&(this.next(),!0)},r.toString=function(){return"Tokenizer ("+this.index+"/"+this.source.length+" at line "+this.line+")"},i.Tokenizer=n;var o=function(e){this.tn=new n(e),this.proto3=!1},a=o.prototype;function s(e,i){var n=-1,r=1;if("-"==e.charAt(0)&&(r=-1,e=e.substring(1)),t.NUMBER_DEC.test(e))n=parseInt(e);else if(t.NUMBER_HEX.test(e))n=parseInt(e.substring(2),16);else{if(!t.NUMBER_OCT.test(e))throw Error("illegal id value: "+(r<0?"-":"")+e);n=parseInt(e.substring(1),8)}if(n=r*n|0,!i&&n<0)throw Error("illegal id value: "+(r<0?"-":"")+e);return n}function l(e){var i=1;if("-"==e.charAt(0)&&(i=-1,e=e.substring(1)),t.NUMBER_DEC.test(e))return i*parseInt(e,10);if(t.NUMBER_HEX.test(e))return i*parseInt(e.substring(2),16);if(t.NUMBER_OCT.test(e))return i*parseInt(e.substring(1),8);if("inf"===e)return i*(1/0);if("nan"===e)return NaN;if(t.NUMBER_FLT.test(e))return i*parseFloat(e);throw Error("illegal number value: "+(i<0?"-":"")+e)}function u(e,t,i){typeof e[t]>"u"?e[t]=i:(Array.isArray(e[t])||(e[t]=[e[t]]),e[t].push(i))}return a.parse=function(){var e,i,n={name:"[ROOT]",package:null,messages:[],enums:[],imports:[],options:{},services:[]},r=!0;try{for(;e=this.tn.next();)switch(e){case"package":if(!r||null!==n.package)throw Error("unexpected 'package'");if(e=this.tn.next(),!t.TYPEREF.test(e))throw Error("illegal package name: "+e);this.tn.skip(";"),n.package=e;break;case"import":if(!r)throw Error("unexpected 'import'");("public"===(e=this.tn.peek())||(i="weak"===e))&&this.tn.next(),e=this._readString(),this.tn.skip(";"),i||n.imports.push(e);break;case"syntax":if(!r)throw Error("unexpected 'syntax'");this.tn.skip("="),"proto3"===(n.syntax=this._readString())&&(this.proto3=!0),this.tn.skip(";");break;case"message":this._parseMessage(n,null),r=!1;break;case"enum":this._parseEnum(n),r=!1;break;case"option":this._parseOption(n);break;case"service":this._parseService(n);break;case"extend":this._parseExtend(n);break;default:throw Error("unexpected '"+e+"'")}}catch(e){throw e.message="Parse error at line "+this.tn.line+": "+e.message,e}return delete n.name,n},o.parse=function(e){return new o(e).parse()},a._readString=function(){var e,t,i="";do{if("'"!==(t=this.tn.next())&&'"'!==t)throw Error("illegal string delimiter: "+t);i+=this.tn.next(),this.tn.skip(t),e=this.tn.peek()}while('"'===e||'"'===e);return i},a._readValue=function(e){var i=this.tn.peek();if('"'===i||"'"===i)return this._readString();if(this.tn.next(),t.NUMBER.test(i))return l(i);if(t.BOOL.test(i))return"true"===i.toLowerCase();if(e&&t.TYPEREF.test(i))return i;throw Error("illegal value: "+i)},a._parseOption=function(e,i){var n=this.tn.next(),r=!1;if("("===n&&(r=!0,n=this.tn.next()),!t.TYPEREF.test(n))throw Error("illegal option name: "+n);var o=n;r&&(this.tn.skip(")"),o="("+o+")",n=this.tn.peek(),t.FQTYPEREF.test(n)&&(o+=n,this.tn.next())),this.tn.skip("="),this._parseOptionValue(e,o),i||this.tn.skip(";")},a._parseOptionValue=function(e,i){var n=this.tn.peek();if("{"!==n)u(e.options,i,this._readValue(!0));else for(this.tn.skip("{");"}"!==(n=this.tn.next());){if(!t.NAME.test(n))throw Error("illegal option name: "+i+"."+n);this.tn.omit(":")?u(e.options,i+"."+n,this._readValue(!0)):this._parseOptionValue(e,i+"."+n)}},a._parseService=function(e){var i=this.tn.next();if(!t.NAME.test(i))throw Error("illegal service name at line "+this.tn.line+": "+i);var n={name:i,rpc:{},options:{}};for(this.tn.skip("{");"}"!==(i=this.tn.next());)if("option"===i)this._parseOption(n);else{if("rpc"!==i)throw Error("illegal service token: "+i);this._parseServiceRPC(n)}this.tn.omit(";"),e.services.push(n)},a._parseServiceRPC=function(e){var i="rpc",n=this.tn.next();if(!t.NAME.test(n))throw Error("illegal rpc service method name: "+n);var r=n,o={request:null,response:null,request_stream:!1,response_stream:!1,options:{}};if(this.tn.skip("("),"stream"===(n=this.tn.next()).toLowerCase()&&(o.request_stream=!0,n=this.tn.next()),!t.TYPEREF.test(n))throw Error("illegal rpc service request type: "+n);if(o.request=n,this.tn.skip(")"),"returns"!==(n=this.tn.next()).toLowerCase())throw Error("illegal rpc service request type delimiter: "+n);if(this.tn.skip("("),"stream"===(n=this.tn.next()).toLowerCase()&&(o.response_stream=!0,n=this.tn.next()),o.response=n,this.tn.skip(")"),"{"===(n=this.tn.peek())){for(this.tn.next();"}"!==(n=this.tn.next());){if("option"!==n)throw Error("illegal rpc service token: "+n);this._parseOption(o)}this.tn.omit(";")}else this.tn.skip(";");typeof e[i]>"u"&&(e[i]={}),e[i][r]=o},a._parseMessage=function(e,i){var n=!!i,r=this.tn.next(),o={name:"",fields:[],enums:[],messages:[],options:{},services:[],oneofs:{}};if(!t.NAME.test(r))throw Error("illegal "+(n?"group":"message")+" name: "+r);for(o.name=r,n&&(this.tn.skip("="),i.id=s(this.tn.next()),o.isGroup=!0),"["===(r=this.tn.peek())&&i&&this._parseFieldOptions(i),this.tn.skip("{");"}"!==(r=this.tn.next());)if(t.RULE.test(r))this._parseMessageField(o,r);else if("oneof"===r)this._parseMessageOneOf(o);else if("enum"===r)this._parseEnum(o);else if("message"===r)this._parseMessage(o);else if("option"===r)this._parseOption(o);else if("service"===r)this._parseService(o);else if("extensions"===r)o.hasOwnProperty("extensions")?o.extensions=o.extensions.concat(this._parseExtensionRanges()):o.extensions=this._parseExtensionRanges();else if("reserved"===r)this._parseIgnored();else if("extend"===r)this._parseExtend(o);else{if(!t.TYPEREF.test(r))throw Error("illegal message token: "+r);if(!this.proto3)throw Error("illegal field rule: "+r);this._parseMessageField(o,"optional",r)}return this.tn.omit(";"),e.messages.push(o),o},a._parseIgnored=function(){for(;";"!==this.tn.peek();)this.tn.next();this.tn.skip(";")},a._parseMessageField=function(e,i,n){if(!t.RULE.test(i))throw Error("illegal message field rule: "+i);var r,o={rule:i,type:"",name:"",options:{},id:0};if("map"===i){if(n)throw Error("illegal type: "+n);if(this.tn.skip("<"),r=this.tn.next(),!t.TYPE.test(r)&&!t.TYPEREF.test(r))throw Error("illegal message field type: "+r);if(o.keytype=r,this.tn.skip(","),r=this.tn.next(),!t.TYPE.test(r)&&!t.TYPEREF.test(r))throw Error("illegal message field: "+r);if(o.type=r,this.tn.skip(">"),r=this.tn.next(),!t.NAME.test(r))throw Error("illegal message field name: "+r);o.name=r,this.tn.skip("="),o.id=s(this.tn.next()),"["===(r=this.tn.peek())&&this._parseFieldOptions(o),this.tn.skip(";")}else if("group"===(n=typeof n<"u"?n:this.tn.next())){var a=this._parseMessage(e,o);if(!/^[A-Z]/.test(a.name))throw Error("illegal group name: "+a.name);o.type=a.name,o.name=a.name.toLowerCase(),this.tn.omit(";")}else{if(!t.TYPE.test(n)&&!t.TYPEREF.test(n))throw Error("illegal message field type: "+n);if(o.type=n,r=this.tn.next(),!t.NAME.test(r))throw Error("illegal message field name: "+r);o.name=r,this.tn.skip("="),o.id=s(this.tn.next()),"["===(r=this.tn.peek())&&this._parseFieldOptions(o),this.tn.skip(";")}return e.fields.push(o),o},a._parseMessageOneOf=function(e){var i=this.tn.next();if(!t.NAME.test(i))throw Error("illegal oneof name: "+i);var n,r=i,o=[];for(this.tn.skip("{");"}"!==(i=this.tn.next());)(n=this._parseMessageField(e,"optional",i)).oneof=r,o.push(n.id);this.tn.omit(";"),e.oneofs[r]=o},a._parseFieldOptions=function(e){this.tn.skip("[");for(var t=!0;"]"!==this.tn.peek();)t||this.tn.skip(","),this._parseOption(e,!0),t=!1;this.tn.next()},a._parseEnum=function(e){var i={name:"",values:[],options:{}},n=this.tn.next();if(!t.NAME.test(n))throw Error("illegal name: "+n);for(i.name=n,this.tn.skip("{");"}"!==(n=this.tn.next());)if("option"===n)this._parseOption(i);else{if(!t.NAME.test(n))throw Error("illegal name: "+n);this.tn.skip("=");var r={name:n,id:s(this.tn.next(),!0)};"["===(n=this.tn.peek())&&this._parseFieldOptions({options:{}}),this.tn.skip(";"),i.values.push(r)}this.tn.omit(";"),e.enums.push(i)},a._parseExtensionRanges=function(){var t,i,n,r=[];do{for(i=[];;){switch(t=this.tn.next()){case"min":n=e.ID_MIN;break;case"max":n=e.ID_MAX;break;default:n=l(t)}if(i.push(n),2===i.length)break;if("to"!==this.tn.peek()){i.push(n);break}this.tn.next()}r.push(i)}while(this.tn.omit(","));return this.tn.skip(";"),r},a._parseExtend=function(e){var i=this.tn.next();if(!t.TYPEREF.test(i))throw Error("illegal extend reference: "+i);var n={ref:i,fields:[]};for(this.tn.skip("{");"}"!==(i=this.tn.next());)if(t.RULE.test(i))this._parseMessageField(n,i);else{if(!t.TYPEREF.test(i))throw Error("illegal extend token: "+i);if(!this.proto3)throw Error("illegal field rule: "+i);this._parseMessageField(n,"optional",i)}return this.tn.omit(";"),e.messages.push(n),n},a.toString=function(){return"Parser at line "+this.tn.line},i.Parser=o,i}(p$5,p$5.Lang),p$5.Reflect=function(e){var t={},i=function(e,t,i){this.builder=e,this.parent=t,this.name=i,this.className},n=i.prototype;n.fqn=function(){for(var e=this.name,t=this;;){if(null==(t=t.parent))break;e=t.name+"."+e}return e},n.toString=function(e){return(e?this.className+" ":"")+this.fqn()},n.build=function(){throw Error(this.toString(!0)+" cannot be built directly")},t.T=i;var r=function(e,t,n,r,o){i.call(this,e,t,n),this.className="Namespace",this.children=[],this.options=r||{},this.syntax=o||"proto2"},o=r.prototype=Object.create(i.prototype);o.getChildren=function(e){if(null==(e=e||null))return this.children.slice();for(var t=[],i=0,n=this.children.length;i<n;++i)this.children[i]instanceof e&&t.push(this.children[i]);return t},o.addChild=function(e){var t;if(t=this.getChild(e.name))if(t instanceof u.Field&&t.name!==t.originalName&&null===this.getChild(t.originalName))t.name=t.originalName;else{if(!(e instanceof u.Field&&e.name!==e.originalName&&null===this.getChild(e.originalName)))throw Error("Duplicate name in namespace "+this.toString(!0)+": "+e.name);e.name=e.originalName}this.children.push(e)},o.getChild=function(e){for(var t="number"==typeof e?"id":"name",i=0,n=this.children.length;i<n;++i)if(this.children[i][t]===e)return this.children[i];return null},o.resolve=function(e,i){var n,r="string"==typeof e?e.split("."):e,o=this,a=0;if(""===r[a]){for(;null!==o.parent;)o=o.parent;a++}do{do{if(!(o instanceof t.Namespace)){o=null;break}if(!(n=o.getChild(r[a]))||!(n instanceof t.T)||i&&!(n instanceof t.Namespace)){o=null;break}o=n,a++}while(a<r.length);if(null!=o)break;if(null!==this.parent)return this.parent.resolve(e,i)}while(null!=o);return o},o.qn=function(e){var i=[],n=e;do{i.unshift(n.name),n=n.parent}while(null!==n);for(var r=1;r<=i.length;r++){var o=i.slice(i.length-r);if(e===this.resolve(o,e instanceof t.Namespace))return o.join(".")}return e.fqn()},o.build=function(){for(var e,t={},i=this.children,n=0,o=i.length;n<o;++n)(e=i[n])instanceof r&&(t[e.name]=e.build());return Object.defineProperty&&Object.defineProperty(t,"$options",{value:this.buildOpt()}),t},o.buildOpt=function(){for(var e={},t=Object.keys(this.options),i=0,n=t.length;i<n;++i){var r=t[i],o=this.options[t[i]];e[r]=o}return e},o.getOption=function(e){return typeof e>"u"?this.options:typeof this.options[e]<"u"?this.options[e]:null},t.Namespace=r;var a=function(t,i,n,r,o){if(this.type=t,this.resolvedType=i,this.isMapKey=n,this.syntax=r,this.name=o,n&&e.MAP_KEY_TYPES.indexOf(t)<0)throw Error("Invalid map key type: "+t.name)},s=a.prototype;function l(t,i){if(t&&"number"==typeof t.low&&"number"==typeof t.high&&"boolean"==typeof t.unsigned&&t.low==t.low&&t.high==t.high)return new e.Long(t.low,t.high,typeof i>"u"?t.unsigned:i);if("string"==typeof t)return e.Long.fromString(t,i||!1,10);if("number"==typeof t)return e.Long.fromNumber(t,i||!1);throw Error("not convertible to Long")}a.defaultFieldValue=function(t){if("string"==typeof t&&(t=e.TYPES[t]),typeof t.defaultValue>"u")throw Error("default value for type "+t.name+" is not supported");return t==e.TYPES.bytes?new a$4(0):t.defaultValue},s.toString=function(){return(this.name||"")+(this.isMapKey?"map":"value")+" element"},s.verifyValue=function(t){var i=this;function n(e,t){throw Error("Illegal value for "+i.toString(!0)+" of type "+i.type.name+": "+e+" ("+t+")")}switch(this.type){case e.TYPES.int32:case e.TYPES.sint32:case e.TYPES.sfixed32:return("number"!=typeof t||t==t&&t%1!=0)&&n(typeof t,"not an integer"),t>4294967295?0|t:t;case e.TYPES.uint32:case e.TYPES.fixed32:return("number"!=typeof t||t==t&&t%1!=0)&&n(typeof t,"not an integer"),t<0?t>>>0:t;case e.TYPES.int64:case e.TYPES.sint64:case e.TYPES.sfixed64:if(e.Long)try{return l(t,!1)}catch(e){n(typeof t,e.message)}else n(typeof t,"requires Long.js");case e.TYPES.uint64:case e.TYPES.fixed64:if(e.Long)try{return l(t,!0)}catch(e){n(typeof t,e.message)}else n(typeof t,"requires Long.js");case e.TYPES.bool:return"boolean"!=typeof t&&n(typeof t,"not a boolean"),t;case e.TYPES.float:case e.TYPES.double:return"number"!=typeof t&&n(typeof t,"not a number"),t;case e.TYPES.string:return"string"!=typeof t&&!(t&&t instanceof String)&&n(typeof t,"not a string"),""+t;case e.TYPES.bytes:return a$4.isByteBuffer(t)?t:a$4.wrap(t,"base64");case e.TYPES.enum:var r=this.resolvedType.getChildren(e.Reflect.Enum.Value);for(a=0;a<r.length;a++)if(r[a].name==t||r[a].id==t)return r[a].id;if("proto3"===this.syntax)return("number"!=typeof t||t==t&&t%1!=0)&&n(typeof t,"not an integer"),(t>4294967295||t<0)&&n(typeof t,"not in range for uint32"),t;n(t,"not a valid enum value");case e.TYPES.group:case e.TYPES.message:if((!t||"object"!=typeof t)&&n(typeof t,"object expected"),t instanceof this.resolvedType.clazz)return t;if(t instanceof e.Builder.Message){var o={};for(var a in t)t.hasOwnProperty(a)&&(o[a]=t[a]);t=o}return new this.resolvedType.clazz(t)}throw Error("[INTERNAL] Illegal value for "+this.toString(!0)+": "+t+" (undefined type "+this.type+")")},s.calculateLength=function(t,i){if(null===i)return 0;var n;switch(this.type){case e.TYPES.int32:return i<0?a$4.calculateVarint64(i):a$4.calculateVarint32(i);case e.TYPES.uint32:return a$4.calculateVarint32(i);case e.TYPES.sint32:return a$4.calculateVarint32(a$4.zigZagEncode32(i));case e.TYPES.fixed32:case e.TYPES.sfixed32:case e.TYPES.float:return 4;case e.TYPES.int64:case e.TYPES.uint64:return a$4.calculateVarint64(i);case e.TYPES.sint64:return a$4.calculateVarint64(a$4.zigZagEncode64(i));case e.TYPES.fixed64:case e.TYPES.sfixed64:return 8;case e.TYPES.bool:return 1;case e.TYPES.enum:return a$4.calculateVarint32(i);case e.TYPES.double:return 8;case e.TYPES.string:return n=a$4.calculateUTF8Bytes(i),a$4.calculateVarint32(n)+n;case e.TYPES.bytes:if(i.remaining()<0)throw Error("Illegal value for "+this.toString(!0)+": "+i.remaining()+" bytes remaining");return a$4.calculateVarint32(i.remaining())+i.remaining();case e.TYPES.message:return n=this.resolvedType.calculate(i),a$4.calculateVarint32(n)+n;case e.TYPES.group:return(n=this.resolvedType.calculate(i))+a$4.calculateVarint32(t<<3|e.WIRE_TYPES.ENDGROUP)}throw Error("[INTERNAL] Illegal value to encode in "+this.toString(!0)+": "+i+" (unknown type)")},s.encodeValue=function(t,i,n){if(null===i)return n;switch(this.type){case e.TYPES.int32:i<0?n.writeVarint64(i):n.writeVarint32(i);break;case e.TYPES.uint32:n.writeVarint32(i);break;case e.TYPES.sint32:n.writeVarint32ZigZag(i);break;case e.TYPES.fixed32:n.writeUint32(i);break;case e.TYPES.sfixed32:n.writeInt32(i);break;case e.TYPES.int64:case e.TYPES.uint64:n.writeVarint64(i);break;case e.TYPES.sint64:n.writeVarint64ZigZag(i);break;case e.TYPES.fixed64:n.writeUint64(i);break;case e.TYPES.sfixed64:n.writeInt64(i);break;case e.TYPES.bool:"string"==typeof i?n.writeVarint32("false"===i.toLowerCase()?0:!!i):n.writeVarint32(i?1:0);break;case e.TYPES.enum:n.writeVarint32(i);break;case e.TYPES.float:n.writeFloat32(i);break;case e.TYPES.double:n.writeFloat64(i);break;case e.TYPES.string:n.writeVString(i);break;case e.TYPES.bytes:if(i.remaining()<0)throw Error("Illegal value for "+this.toString(!0)+": "+i.remaining()+" bytes remaining");var r=i.offset;n.writeVarint32(i.remaining()),n.append(i),i.offset=r;break;case e.TYPES.message:var o=(new a$4).LE();this.resolvedType.encode(i,o),n.writeVarint32(o.offset),n.append(o.flip());break;case e.TYPES.group:this.resolvedType.encode(i,n),n.writeVarint32(t<<3|e.WIRE_TYPES.ENDGROUP);break;default:throw Error("[INTERNAL] Illegal value to encode in "+this.toString(!0)+": "+i+" (unknown type)")}return n},s.decode=function(t,i,n){if(i!=this.type.wireType)throw Error("Unexpected wire type for element");var r,o;switch(this.type){case e.TYPES.int32:return 0|t.readVarint32();case e.TYPES.uint32:return t.readVarint32()>>>0;case e.TYPES.sint32:return 0|t.readVarint32ZigZag();case e.TYPES.fixed32:return t.readUint32()>>>0;case e.TYPES.sfixed32:return 0|t.readInt32();case e.TYPES.int64:return t.readVarint64();case e.TYPES.uint64:return t.readVarint64().toUnsigned();case e.TYPES.sint64:return t.readVarint64ZigZag();case e.TYPES.fixed64:return t.readUint64();case e.TYPES.sfixed64:return t.readInt64();case e.TYPES.bool:return!!t.readVarint32();case e.TYPES.enum:return t.readVarint32();case e.TYPES.float:return t.readFloat();case e.TYPES.double:return t.readDouble();case e.TYPES.string:return t.readVString();case e.TYPES.bytes:if(o=t.readVarint32(),t.remaining()<o)throw Error("Illegal number of bytes for "+this.toString(!0)+": "+o+" required but got only "+t.remaining());return(r=t.clone()).limit=r.offset+o,t.offset+=o,r;case e.TYPES.message:return o=t.readVarint32(),this.resolvedType.decode(t,o);case e.TYPES.group:return this.resolvedType.decode(t,-1,n)}throw Error("[INTERNAL] Illegal decode type")},s.valueFromString=function(t){if(!this.isMapKey)throw Error("valueFromString() called on non-map-key element");switch(this.type){case e.TYPES.int32:case e.TYPES.sint32:case e.TYPES.sfixed32:case e.TYPES.uint32:case e.TYPES.fixed32:return this.verifyValue(parseInt(t));case e.TYPES.int64:case e.TYPES.sint64:case e.TYPES.sfixed64:case e.TYPES.uint64:case e.TYPES.fixed64:return this.verifyValue(t);case e.TYPES.bool:return"true"===t;case e.TYPES.string:return this.verifyValue(t);case e.TYPES.bytes:return a$4.fromBinary(t)}},s.valueToString=function(t){if(!this.isMapKey)throw Error("valueToString() called on non-map-key element");return this.type===e.TYPES.bytes?t.toString("binary"):t.toString()},t.Element=a;var u=function(e,t,i,n,o,a){r.call(this,e,t,i,n,a),this.className="Message",this.extensions=void 0,this.clazz=null,this.isGroup=!!o,this._fields=null,this._fieldsById=null,this._fieldsByName=null},c=u.prototype=Object.create(r.prototype);function h(t,i){var n=i.readVarint32(),r=7&n,o=n>>>3;switch(r){case e.WIRE_TYPES.VARINT:do{n=i.readUint8()}while(128==(128&n));break;case e.WIRE_TYPES.BITS64:i.offset+=8;break;case e.WIRE_TYPES.LDELIM:n=i.readVarint32(),i.offset+=n;break;case e.WIRE_TYPES.STARTGROUP:h(o,i);break;case e.WIRE_TYPES.ENDGROUP:if(o===t)return!1;throw Error("Illegal GROUPEND after unknown group: "+o+" ("+t+" expected)");case e.WIRE_TYPES.BITS32:i.offset+=4;break;default:throw Error("Illegal wire type in unknown group "+t+": "+r)}return!0}c.build=function(t){if(this.clazz&&!t)return this.clazz;var i=function(e,t){var i=t.getChildren(e.Reflect.Message.Field),n=t.getChildren(e.Reflect.Message.OneOf),r=function(o,a){e.Builder.Message.call(this);for(var s=0,l=n.length;s<l;++s)this[n[s].name]=null;for(s=0,l=i.length;s<l;++s){var u=i[s];this[u.name]=u.repeated?[]:u.map?new e.Map(u):null,(u.required||"proto3"===t.syntax)&&null!==u.defaultValue&&(this[u.name]=u.defaultValue)}var c;if(arguments.length>0)if(1!==arguments.length||null===o||"object"!=typeof o||!("function"!=typeof o.encode||o instanceof r)||Array.isArray(o)||o instanceof e.Map||a$4.isByteBuffer(o)||o instanceof ArrayBuffer||e.Long&&o instanceof e.Long)for(s=0,l=arguments.length;s<l;++s)typeof(c=arguments[s])<"u"&&this.$set(i[s].name,c);else this.$set(o)},o=r.prototype=Object.create(e.Builder.Message.prototype);o.add=function(i,n,r){var o=t._fieldsByName[i];if(!r){if(!o)throw Error(this+"#"+i+" is undefined");if(!(o instanceof e.Reflect.Message.Field))throw Error(this+"#"+i+" is not a field: "+o.toString(!0));if(!o.repeated)throw Error(this+"#"+i+" is not a repeated field");n=o.verifyValue(n,!0)}return null===this[i]&&(this[i]=[]),this[i].push(n),this},o.$add=o.add,o.set=function(i,n,r){if(i&&"object"==typeof i){for(var o in r=n,i)i.hasOwnProperty(o)&&typeof(n=i[o])<"u"&&void 0===t._oneofsByName[o]&&this.$set(o,n,r);return this}var a=t._fieldsByName[i];if(r)this[i]=n;else{if(!a)throw Error(this+"#"+i+" is not a field: undefined");if(!(a instanceof e.Reflect.Message.Field))throw Error(this+"#"+i+" is not a field: "+a.toString(!0));this[a.name]=n=a.verifyValue(n)}if(a&&a.oneof){var s=this[a.oneof.name];null!==n?(null!==s&&s!==a.name&&(this[s]=null),this[a.oneof.name]=a.name):s===i&&(this[a.oneof.name]=null)}return this},o.$set=o.set,o.get=function(i,n){if(n)return this[i];var r=t._fieldsByName[i];if(!(r&&r instanceof e.Reflect.Message.Field))throw Error(this+"#"+i+" is not a field: undefined");if(!(r instanceof e.Reflect.Message.Field))throw Error(this+"#"+i+" is not a field: "+r.toString(!0));return this[r.name]},o.$get=o.get;for(var a=0;a<i.length;a++){var s=i[a];s instanceof e.Reflect.Message.ExtensionField||t.builder.options.populateAccessors&&function(e){var i=e.originalName.replace(/(_[a-zA-Z])/g,(function(e){return e.toUpperCase().replace("_","")}));i=i.substring(0,1).toUpperCase()+i.substring(1);var n=e.originalName.replace(/([A-Z])/g,(function(e){return"_"+e})),r=function(t,i){return this[e.name]=i?t:e.verifyValue(t),this},a=function(){return this[e.name]};null===t.getChild("set"+i)&&(o["set"+i]=r),null===t.getChild("set_"+n)&&(o["set_"+n]=r),null===t.getChild("get"+i)&&(o["get"+i]=a),null===t.getChild("get_"+n)&&(o["get_"+n]=a)}(s)}function l(t,i,n,r){if(null===t||"object"!=typeof t){if(r&&r instanceof e.Reflect.Enum){var o=e.Reflect.Enum.getName(r.object,t);if(null!==o)return o}return t}if(a$4.isByteBuffer(t))return i?t.toBase64():t.toBuffer();if(e.Long.isLong(t))return n?t.toString():e.Long.fromValue(t);var a;if(Array.isArray(t))return a=[],t.forEach((function(e,t){a[t]=l(e,i,n,r)})),a;if(a={},t instanceof e.Map){for(var s=t.entries(),u=s.next();!u.done;u=s.next())a[t.keyElem.valueToString(u.value[0])]=l(u.value[1],i,n,t.valueElem.resolvedType);return a}var c=t.$type,h=void 0;for(var d in t)t.hasOwnProperty(d)&&(c&&(h=c.getChild(d))?a[d]=l(t[d],i,n,h.resolvedType):a[d]=l(t[d],i,n));return a}return o.encode=function(e,i){"boolean"==typeof e&&(i=e,e=void 0);var n=!1;e||(e=new a$4,n=!0);var r=e.littleEndian;try{return t.encode(this,e.LE(),i),(n?e.flip():e).LE(r)}catch(t){throw e.LE(r),t}},r.encode=function(e,t,i){return new r(e).encode(t,i)},o.calculate=function(){return t.calculate(this)},o.encodeDelimited=function(e,i){var n=!1;e||(e=new a$4,n=!0);var r=(new a$4).LE();return t.encode(this,r,i).flip(),e.writeVarint32(r.remaining()),e.append(r),n?e.flip():e},o.encodeAB=function(){try{return this.encode().toArrayBuffer()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toArrayBuffer()),e}},o.toArrayBuffer=o.encodeAB,o.encodeNB=function(){try{return this.encode().toBuffer()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toBuffer()),e}},o.toBuffer=o.encodeNB,o.encode64=function(){try{return this.encode().toBase64()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toBase64()),e}},o.toBase64=o.encode64,o.encodeHex=function(){try{return this.encode().toHex()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toHex()),e}},o.toHex=o.encodeHex,o.toRaw=function(e,t){return l(this,!!e,!!t,this.$type)},o.encodeJSON=function(){return JSON.stringify(l(this,!0,!0,this.$type))},r.decode=function(e,i,n){"string"==typeof i&&(n=i,i=-1),"string"==typeof e?e=a$4.wrap(e,n||"base64"):a$4.isByteBuffer(e)||(e=a$4.wrap(e));var r=e.littleEndian;try{var o=t.decode(e.LE(),i);return e.LE(r),o}catch(t){throw e.LE(r),t}},r.decodeDelimited=function(e,i){if("string"==typeof e?e=a$4.wrap(e,i||"base64"):a$4.isByteBuffer(e)||(e=a$4.wrap(e)),e.remaining()<1)return null;var n=e.offset,r=e.readVarint32();if(e.remaining()<r)return e.offset=n,null;try{var o=t.decode(e.slice(e.offset,e.offset+r).LE());return e.offset+=r,o}catch(t){throw e.offset+=r,t}},r.decode64=function(e){return r.decode(e,"base64")},r.decodeHex=function(e){return r.decode(e,"hex")},r.decodeJSON=function(e){return new r(JSON.parse(e))},o.toString=function(){return t.toString()},Object.defineProperty&&(Object.defineProperty(r,"$options",{value:t.buildOpt()}),Object.defineProperty(o,"$options",{value:r.$options}),Object.defineProperty(r,"$type",{value:t}),Object.defineProperty(o,"$type",{value:t})),r}(e,this);this._fields=[],this._fieldsById={},this._fieldsByName={},this._oneofsByName={};for(var n,r=0,o=this.children.length;r<o;r++)if((n=this.children[r])instanceof _||n instanceof u||n instanceof g){if(i.hasOwnProperty(n.name))throw Error("Illegal reflect child of "+this.toString(!0)+": "+n.toString(!0)+" cannot override static property '"+n.name+"'");i[n.name]=n.build()}else if(n instanceof u.Field)n.build(),this._fields.push(n),this._fieldsById[n.id]=n,this._fieldsByName[n.name]=n;else if(n instanceof u.OneOf)this._oneofsByName[n.name]=n;else if(!(n instanceof u.OneOf||n instanceof $))throw Error("Illegal reflect child of "+this.toString(!0)+": "+this.children[r].toString(!0));return this.clazz=i},c.encode=function(e,t,i){for(var n,r,o=null,a=0,s=this._fields.length;a<s;++a)r=e[(n=this._fields[a]).name],n.required&&null===r?null===o&&(o=n):n.encode(i?r:n.verifyValue(r),t,e);if(null!==o){var l=Error("Missing at least one required field for "+this.toString(!0)+": "+o);throw l.encoded=t,l}return t},c.calculate=function(e){for(var t,i,n=0,r=0,o=this._fields.length;r<o;++r){if(i=e[(t=this._fields[r]).name],t.required&&null===i)throw Error("Missing at least one required field for "+this.toString(!0)+": "+t);n+=t.calculate(i,e)}return n},c.decode=function(t,i,n){"number"!=typeof i&&(i=-1);for(var r,o,a,s,l=t.offset,u=new this.clazz;t.offset<l+i||-1===i&&t.remaining()>0;){if(a=(r=t.readVarint32())>>>3,(o=7&r)===e.WIRE_TYPES.ENDGROUP){if(a!==n)throw Error("Illegal group end indicator for "+this.toString(!0)+": "+a+" ("+(n?n+" expected":"not a group")+")");break}if(s=this._fieldsById[a]){if(s.repeated&&!s.options.packed)u[s.name].push(s.decode(o,t));else if(s.map){var c=s.decode(o,t);u[s.name].set(c[0],c[1])}else if(u[s.name]=s.decode(o,t),s.oneof){var d=u[s.oneof.name];null!==d&&d!==s.name&&(u[d]=null),u[s.oneof.name]=s.name}}else switch(o){case e.WIRE_TYPES.VARINT:t.readVarint32();break;case e.WIRE_TYPES.BITS32:t.offset+=4;break;case e.WIRE_TYPES.BITS64:t.offset+=8;break;case e.WIRE_TYPES.LDELIM:var f=t.readVarint32();t.offset+=f;break;case e.WIRE_TYPES.STARTGROUP:for(;h(a,t););break;default:throw Error("Illegal wire type for unknown field "+a+" in "+this.toString(!0)+"#decode: "+o)}}for(var p=0,_=this._fields.length;p<_;++p)if(null===u[(s=this._fields[p]).name])if("proto3"===this.syntax)u[s.name]=s.defaultValue;else{if(s.required){var m=Error("Missing at least one required field for "+this.toString(!0)+": "+s.name);throw m.decoded=u,m}e.populateDefaults&&null!==s.defaultValue&&(u[s.name]=s.defaultValue)}return u},t.Message=u;var d=function(t,n,r,o,a,s,l,c,h,d){i.call(this,t,n,s),this.className="Message.Field",this.required="required"===r,this.repeated="repeated"===r,this.map="map"===r,this.keyType=o||null,this.type=a,this.resolvedType=null,this.id=l,this.options=c||{},this.defaultValue=null,this.oneof=h||null,this.syntax=d||"proto2",this.originalName=this.name,this.element=null,this.keyElement=null,this.builder.options.convertFieldsToCamelCase&&!(this instanceof u.ExtensionField)&&(this.name=e.Util.toCamelCase(this.name))},f=d.prototype=Object.create(i.prototype);f.build=function(){this.element=new a(this.type,this.resolvedType,!1,this.syntax,this.name),this.map&&(this.keyElement=new a(this.keyType,void 0,!0,this.syntax,this.name)),"proto3"!==this.syntax||this.repeated||this.map?typeof this.options.default<"u"&&(this.defaultValue=this.verifyValue(this.options.default)):this.defaultValue=a.defaultFieldValue(this.type)},f.verifyValue=function(t,i){i=i||!1;var n,r=this;function o(e,t){throw Error("Illegal value for "+r.toString(!0)+" of type "+r.type.name+": "+e+" ("+t+")")}if(null===t)return this.required&&o(typeof t,"required"),"proto3"===this.syntax&&this.type!==e.TYPES.message&&o(typeof t,"proto3 field without field presence cannot be null"),null;if(this.repeated&&!i){Array.isArray(t)||(t=[t]);var a=[];for(n=0;n<t.length;n++)a.push(this.element.verifyValue(t[n]));return a}return this.map&&!i?t instanceof e.Map?t:(t instanceof Object||o(typeof t,"expected ProtoBuf.Map or raw object for map field"),new e.Map(this,t)):(!this.repeated&&Array.isArray(t)&&o(typeof t,"no array expected"),this.element.verifyValue(t))},f.hasWirePresence=function(t,i){if("proto3"!==this.syntax)return null!==t;if(this.oneof&&i[this.oneof.name]===this.name)return!0;switch(this.type){case e.TYPES.int32:case e.TYPES.sint32:case e.TYPES.sfixed32:case e.TYPES.uint32:case e.TYPES.fixed32:return 0!==t;case e.TYPES.int64:case e.TYPES.sint64:case e.TYPES.sfixed64:case e.TYPES.uint64:case e.TYPES.fixed64:return 0!==t.low||0!==t.high;case e.TYPES.bool:return t;case e.TYPES.float:case e.TYPES.double:return 0!==t;case e.TYPES.string:return t.length>0;case e.TYPES.bytes:return t.remaining()>0;case e.TYPES.enum:return 0!==t;case e.TYPES.message:return null!==t;default:return!0}},f.encode=function(t,i,n){if(null===this.type||"object"!=typeof this.type)throw Error("[INTERNAL] Unresolved type in "+this.toString(!0)+": "+this.type);if(null===t||this.repeated&&0==t.length)return i;try{var r;if(this.repeated)if(this.options.packed&&e.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0){i.writeVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),i.ensureCapacity(i.offset+=1);var o=i.offset;for(r=0;r<t.length;r++)this.element.encodeValue(this.id,t[r],i);var a=i.offset-o,s=a$4.calculateVarint32(a);if(s>1){var l=i.slice(o,i.offset);o+=s-1,i.offset=o,i.append(l)}i.writeVarint32(a,o-s)}else for(r=0;r<t.length;r++)i.writeVarint32(this.id<<3|this.type.wireType),this.element.encodeValue(this.id,t[r],i);else this.map?t.forEach((function(t,n,r){var o=a$4.calculateVarint32(8|this.keyType.wireType)+this.keyElement.calculateLength(1,n)+a$4.calculateVarint32(16|this.type.wireType)+this.element.calculateLength(2,t);i.writeVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),i.writeVarint32(o),i.writeVarint32(8|this.keyType.wireType),this.keyElement.encodeValue(1,n,i),i.writeVarint32(16|this.type.wireType),this.element.encodeValue(2,t,i)}),this):this.hasWirePresence(t,n)&&(i.writeVarint32(this.id<<3|this.type.wireType),this.element.encodeValue(this.id,t,i))}catch(e){throw Error("Illegal value for "+this.toString(!0)+": "+t+" ("+e+")")}return i},f.calculate=function(t,i){if(t=this.verifyValue(t),null===this.type||"object"!=typeof this.type)throw Error("[INTERNAL] Unresolved type in "+this.toString(!0)+": "+this.type);if(null===t||this.repeated&&0==t.length)return 0;var n=0;try{var r,o;if(this.repeated)if(this.options.packed&&e.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0){for(n+=a$4.calculateVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),o=0,r=0;r<t.length;r++)o+=this.element.calculateLength(this.id,t[r]);n+=a$4.calculateVarint32(o),n+=o}else for(r=0;r<t.length;r++)n+=a$4.calculateVarint32(this.id<<3|this.type.wireType),n+=this.element.calculateLength(this.id,t[r]);else this.map?t.forEach((function(t,i,r){var o=a$4.calculateVarint32(8|this.keyType.wireType)+this.keyElement.calculateLength(1,i)+a$4.calculateVarint32(16|this.type.wireType)+this.element.calculateLength(2,t);n+=a$4.calculateVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),n+=a$4.calculateVarint32(o),n+=o}),this):this.hasWirePresence(t,i)&&(n+=a$4.calculateVarint32(this.id<<3|this.type.wireType),n+=this.element.calculateLength(this.id,t))}catch(e){throw Error("Illegal value for "+this.toString(!0)+": "+t+" ("+e+")")}return n},f.decode=function(t,i,n){var r,o;if(!(!this.map&&t==this.type.wireType||!n&&this.repeated&&this.options.packed&&t==e.WIRE_TYPES.LDELIM||this.map&&t==e.WIRE_TYPES.LDELIM))throw Error("Illegal wire type for field "+this.toString(!0)+": "+t+" ("+this.type.wireType+" expected)");if(t==e.WIRE_TYPES.LDELIM&&this.repeated&&this.options.packed&&e.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0&&!n){o=i.readVarint32(),o=i.offset+o;for(var s=[];i.offset<o;)s.push(this.decode(this.type.wireType,i,!0));return s}if(this.map){var l=a.defaultFieldValue(this.keyType);if(r=a.defaultFieldValue(this.type),o=i.readVarint32(),i.remaining()<o)throw Error("Illegal number of bytes for "+this.toString(!0)+": "+o+" required but got only "+i.remaining());var u=i.clone();for(u.limit=u.offset+o,i.offset+=o;u.remaining()>0;){var c=u.readVarint32();t=7&c;var h=c>>>3;if(1===h)l=this.keyElement.decode(u,t,h);else{if(2!==h)throw Error("Unexpected tag in map field key/value submessage");r=this.element.decode(u,t,h)}}return[l,r]}return this.element.decode(i,t,this.id)},t.Message.Field=d;var p=function(e,t,i,n,r,o,a){d.call(this,e,t,i,null,n,r,o,a),this.extension};p.prototype=Object.create(d.prototype),t.Message.ExtensionField=p;t.Message.OneOf=function(e,t,n){i.call(this,e,t,n),this.fields=[]};var _=function(e,t,i,n,o){r.call(this,e,t,i,n,o),this.className="Enum",this.object=null};_.getName=function(e,t){for(var i,n=Object.keys(e),r=0;r<n.length;++r)if(e[i=n[r]]===t)return i;return null},(_.prototype=Object.create(r.prototype)).build=function(t){if(this.object&&!t)return this.object;for(var i=new e.Builder.Enum,n=this.getChildren(_.Value),r=0,o=n.length;r<o;++r)i[n[r].name]=n[r].id;return Object.defineProperty&&Object.defineProperty(i,"$options",{value:this.buildOpt(),enumerable:!1}),this.object=i},t.Enum=_;var m=function(e,t,n,r){i.call(this,e,t,n),this.className="Enum.Value",this.id=r};m.prototype=Object.create(i.prototype),t.Enum.Value=m;var $=function(e,t,n,r){i.call(this,e,t,n),this.field=r};$.prototype=Object.create(i.prototype),t.Extension=$;var g=function(e,t,i,n){r.call(this,e,t,i,n),this.className="Service",this.clazz=null};(g.prototype=Object.create(r.prototype)).build=function(t){return this.clazz&&!t?this.clazz:this.clazz=function(e,t){for(var i=function(t){e.Builder.Service.call(this),this.rpcImpl=t||function(e,t,i){setTimeout(i.bind(this,Error("Not implemented, see: https://github.com/dcodeIO/ProtoBuf.js/wiki/Services")),0)}},n=i.prototype=Object.create(e.Builder.Service.prototype),r=t.getChildren(e.Reflect.Service.RPCMethod),o=0;o<r.length;o++)!function(e){n[e.name]=function(i,n){try{try{i=e.resolvedRequestType.clazz.decode(a$4.wrap(i))}catch(e){if(!(e instanceof TypeError))throw e}if(null===i||"object"!=typeof i)throw Error("Illegal arguments");i instanceof e.resolvedRequestType.clazz||(i=new e.resolvedRequestType.clazz(i)),this.rpcImpl(e.fqn(),i,(function(i,r){if(i)n(i);else{null===r&&(r="");try{r=e.resolvedResponseType.clazz.decode(r)}catch{}r&&r instanceof e.resolvedResponseType.clazz?n(null,r):n(Error("Illegal response type received in service method "+t.name+"#"+e.name))}}))}catch(e){setTimeout(n.bind(this,e),0)}},i[e.name]=function(t,n,r){new i(t)[e.name](n,r)},Object.defineProperty&&(Object.defineProperty(i[e.name],"$options",{value:e.buildOpt()}),Object.defineProperty(n[e.name],"$options",{value:i[e.name].$options}))}(r[o]);return Object.defineProperty&&(Object.defineProperty(i,"$options",{value:t.buildOpt()}),Object.defineProperty(n,"$options",{value:i.$options}),Object.defineProperty(i,"$type",{value:t}),Object.defineProperty(n,"$type",{value:t})),i}(e,this)},t.Service=g;var y=function(e,t,n,r){i.call(this,e,t,n),this.className="Service.Method",this.options=r||{}};(y.prototype=Object.create(i.prototype)).buildOpt=o.buildOpt,t.Service.Method=y;var v=function(e,t,i,n,r,o,a,s){y.call(this,e,t,i,s),this.className="Service.RPCMethod",this.requestName=n,this.responseName=r,this.requestStream=o,this.responseStream=a,this.resolvedRequestType=null,this.resolvedResponseType=null};return v.prototype=Object.create(y.prototype),t.Service.RPCMethod=v,t}(p$5),p$5.Builder=function(e,t,i){var n=function(e){this.ns=new i.Namespace(this,null,""),this.ptr=this.ns,this.resolved=!1,this.result=null,this.files={},this.importRoot=null,this.options=e||{}},r=n.prototype;function o(e){e.messages&&e.messages.forEach((function(t){t.syntax=e.syntax,o(t)})),e.enums&&e.enums.forEach((function(t){t.syntax=e.syntax}))}return n.isMessage=function(e){return!("string"!=typeof e.name||typeof e.values<"u"||typeof e.rpc<"u")},n.isMessageField=function(e){return!("string"!=typeof e.rule||"string"!=typeof e.name||"string"!=typeof e.type||typeof e.id>"u")},n.isEnum=function(e){return!("string"!=typeof e.name||typeof e.values>"u"||!Array.isArray(e.values)||0===e.values.length)},n.isService=function(e){return!("string"!=typeof e.name||"object"!=typeof e.rpc||!e.rpc)},n.isExtend=function(e){return"string"==typeof e.ref},r.reset=function(){return this.ptr=this.ns,this},r.define=function(e){if("string"!=typeof e||!t.TYPEREF.test(e))throw Error("illegal namespace: "+e);return e.split(".").forEach((function(e){var t=this.ptr.getChild(e);null===t&&this.ptr.addChild(t=new i.Namespace(this,this.ptr,e)),this.ptr=t}),this),this},r.create=function(t){if(!t)return this;if(Array.isArray(t)){if(0===t.length)return this;t=t.slice()}else t=[t];for(var r=[t];r.length>0;){if(t=r.pop(),!Array.isArray(t))throw Error("not a valid namespace: "+JSON.stringify(t));for(;t.length>0;){var o=t.shift();if(n.isMessage(o)){var a=new i.Message(this,this.ptr,o.name,o.options,o.isGroup,o.syntax),s={};o.oneofs&&Object.keys(o.oneofs).forEach((function(e){a.addChild(s[e]=new i.Message.OneOf(this,a,e))}),this),o.fields&&o.fields.forEach((function(e){if(null!==a.getChild(0|e.id))throw Error("duplicate or invalid field id in "+a.name+": "+e.id);if(e.options&&"object"!=typeof e.options)throw Error("illegal field options in "+a.name+"#"+e.name);var t=null;if("string"==typeof e.oneof&&!(t=s[e.oneof]))throw Error("illegal oneof in "+a.name+"#"+e.name+": "+e.oneof);e=new i.Message.Field(this,a,e.rule,e.keytype,e.type,e.name,e.id,e.options,t,o.syntax),t&&t.fields.push(e),a.addChild(e)}),this);var l=[];if(o.enums&&o.enums.forEach((function(e){l.push(e)})),o.messages&&o.messages.forEach((function(e){l.push(e)})),o.services&&o.services.forEach((function(e){l.push(e)})),o.extensions&&("number"==typeof o.extensions[0]?a.extensions=[o.extensions]:a.extensions=o.extensions),this.ptr.addChild(a),l.length>0){r.push(t),t=l,l=null,this.ptr=a,a=null;continue}l=null}else if(n.isEnum(o))a=new i.Enum(this,this.ptr,o.name,o.options,o.syntax),o.values.forEach((function(e){a.addChild(new i.Enum.Value(this,a,e.name,e.id))}),this),this.ptr.addChild(a);else if(n.isService(o))a=new i.Service(this,this.ptr,o.name,o.options),Object.keys(o.rpc).forEach((function(e){var t=o.rpc[e];a.addChild(new i.Service.RPCMethod(this,a,e,t.request,t.response,!!t.request_stream,!!t.response_stream,t.options))}),this),this.ptr.addChild(a);else{if(!n.isExtend(o))throw Error("not a valid definition: "+JSON.stringify(o));if(a=this.ptr.resolve(o.ref,!0))o.fields.forEach((function(t){if(null!==a.getChild(0|t.id))throw Error("duplicate extended field id in "+a.name+": "+t.id);if(a.extensions){var n=!1;if(a.extensions.forEach((function(e){t.id>=e[0]&&t.id<=e[1]&&(n=!0)})),!n)throw Error("illegal extended field id in "+a.name+": "+t.id+" (not within valid ranges)")}var r=t.name;this.options.convertFieldsToCamelCase&&(r=e.Util.toCamelCase(r));var o=new i.Message.ExtensionField(this,a,t.rule,t.type,this.ptr.fqn()+"."+r,t.id,t.options),s=new i.Extension(this,this.ptr,t.name,o);o.extension=s,this.ptr.addChild(s),a.addChild(o)}),this);else if(!/\.?google\.protobuf\./.test(o.ref))throw Error("extended message "+o.ref+" is not defined")}o=null,a=null}t=null,this.ptr=this.ptr.parent}return this.resolved=!1,this.result=null,this},r.import=function(t,i){var n="/";if("string"==typeof i){if(e.Util.IS_NODE&&(i=require("path").resolve(i)),!0===this.files[i])return this.reset();this.files[i]=!0}else if("object"==typeof i){var r,a=i.root;if(e.Util.IS_NODE&&(a=require("path").resolve(a)),(a.indexOf("\\")>=0||i.file.indexOf("\\")>=0)&&(n="\\"),r=e.Util.IS_NODE?require("path").join(a,i.file):a+n+i.file,!0===this.files[r])return this.reset();this.files[r]=!0}if(t.imports&&t.imports.length>0){var s,l=!1;"object"==typeof i?(this.importRoot=i.root,l=!0,s=this.importRoot,i=i.file,(s.indexOf("\\")>=0||i.indexOf("\\")>=0)&&(n="\\")):"string"==typeof i?this.importRoot?s=this.importRoot:i.indexOf("/")>=0?""===(s=i.replace(/\/[^\/]*$/,""))&&(s="/"):i.indexOf("\\")>=0?(s=i.replace(/\\[^\\]*$/,""),n="\\"):s=".":s=null;for(var u=0;u<t.imports.length;u++)if("string"==typeof t.imports[u]){if(!s)throw Error("cannot determine import root");var c=t.imports[u];if("google/protobuf/descriptor.proto"===c||(c=e.Util.IS_NODE?require("path").join(s,c):s+n+c,!0===this.files[c]))continue;/\.proto$/i.test(c)&&!e.DotProto&&(c=c.replace(/\.proto$/,".json"));var h=e.Util.fetch(c);if(null===h)throw Error("failed to import '"+c+"' in '"+i+"': file not found");/\.json$/i.test(c)?this.import(JSON.parse(h+""),c):this.import(e.DotProto.Parser.parse(h),c)}else i?/\.(\w+)$/.test(i)?this.import(t.imports[u],i.replace(/^(.+)\.(\w+)$/,(function(e,t,i){return t+"_import"+u+"."+i}))):this.import(t.imports[u],i+"_import"+u):this.import(t.imports[u]);l&&(this.importRoot=null)}t.package&&this.define(t.package),t.syntax&&o(t);var d=this.ptr;return t.options&&Object.keys(t.options).forEach((function(e){d.options[e]=t.options[e]})),t.messages&&(this.create(t.messages),this.ptr=d),t.enums&&(this.create(t.enums),this.ptr=d),t.services&&(this.create(t.services),this.ptr=d),t.extends&&this.create(t.extends),this.reset()},r.resolveAll=function(){var n;if(null==this.ptr||"object"==typeof this.ptr.type)return this;if(this.ptr instanceof i.Namespace)this.ptr.children.forEach((function(e){this.ptr=e,this.resolveAll()}),this);else if(this.ptr instanceof i.Message.Field){if(t.TYPE.test(this.ptr.type))this.ptr.type=e.TYPES[this.ptr.type];else{if(!t.TYPEREF.test(this.ptr.type))throw Error("illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);if(!(n=(this.ptr instanceof i.Message.ExtensionField?this.ptr.extension.parent:this.ptr.parent).resolve(this.ptr.type,!0)))throw Error("unresolvable type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);if(this.ptr.resolvedType=n,n instanceof i.Enum){if(this.ptr.type=e.TYPES.enum,"proto3"===this.ptr.syntax&&"proto3"!==n.syntax)throw Error("proto3 message cannot reference proto2 enum")}else{if(!(n instanceof i.Message))throw Error("illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);this.ptr.type=n.isGroup?e.TYPES.group:e.TYPES.message}}if(this.ptr.map){if(!t.TYPE.test(this.ptr.keyType))throw Error("illegal key type for map field in "+this.ptr.toString(!0)+": "+this.ptr.keyType);this.ptr.keyType=e.TYPES[this.ptr.keyType]}"proto3"===this.ptr.syntax&&this.ptr.repeated&&void 0===this.ptr.options.packed&&-1!==e.PACKABLE_WIRE_TYPES.indexOf(this.ptr.type.wireType)&&(this.ptr.options.packed=!0)}else if(this.ptr instanceof e.Reflect.Service.Method){if(!(this.ptr instanceof e.Reflect.Service.RPCMethod))throw Error("illegal service type in "+this.ptr.toString(!0));if(!((n=this.ptr.parent.resolve(this.ptr.requestName,!0))&&n instanceof e.Reflect.Message))throw Error("Illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.requestName);if(this.ptr.resolvedRequestType=n,!((n=this.ptr.parent.resolve(this.ptr.responseName,!0))&&n instanceof e.Reflect.Message))throw Error("Illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.responseName);this.ptr.resolvedResponseType=n}else if(!(this.ptr instanceof e.Reflect.Message.OneOf||this.ptr instanceof e.Reflect.Extension||this.ptr instanceof e.Reflect.Enum.Value))throw Error("illegal object in namespace: "+typeof this.ptr+": "+this.ptr);return this.reset()},r.build=function(e){if(this.reset(),this.resolved||(this.resolveAll(),this.resolved=!0,this.result=null),null===this.result&&(this.result=this.ns.build()),!e)return this.result;for(var t="string"==typeof e?e.split("."):e,i=this.result,n=0;n<t.length;n++){if(!i[t[n]]){i=null;break}i=i[t[n]]}return i},r.lookup=function(e,t){return e?this.ns.resolve(e,t):this.ns},r.toString=function(){return"Builder"},n.Message=function(){},n.Enum=function(){},n.Service=function(){},n}(p$5,p$5.Lang,p$5.Reflect),p$5.Map=function(e,t){var i=function(e,i){if(!e.map)throw Error("field is not a map");if(this.field=e,this.keyElem=new t.Element(e.keyType,null,!0,e.syntax),this.valueElem=new t.Element(e.type,e.resolvedType,!1,e.syntax),this.map={},Object.defineProperty(this,"size",{get:function(){return Object.keys(this.map).length}}),i)for(var n=Object.keys(i),r=0;r<n.length;r++){var o=this.keyElem.valueFromString(n[r]),a=this.valueElem.verifyValue(i[n[r]]);this.map[this.keyElem.valueToString(o)]={key:o,value:a}}},n=i.prototype;function r(e){var t=0;return{next:function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}}return n.clear=function(){this.map={}},n.delete=function(e){var t=this.keyElem.valueToString(this.keyElem.verifyValue(e)),i=t in this.map;return delete this.map[t],i},n.entries=function(){for(var e,t=[],i=Object.keys(this.map),n=0;n<i.length;n++)t.push([(e=this.map[i[n]]).key,e.value]);return r(t)},n.keys=function(){for(var e=[],t=Object.keys(this.map),i=0;i<t.length;i++)e.push(this.map[t[i]].key);return r(e)},n.values=function(){for(var e=[],t=Object.keys(this.map),i=0;i<t.length;i++)e.push(this.map[t[i]].value);return r(e)},n.forEach=function(e,t){for(var i,n=Object.keys(this.map),r=0;r<n.length;r++)e.call(t,(i=this.map[n[r]]).value,i.key,this)},n.set=function(e,t){var i=this.keyElem.verifyValue(e),n=this.valueElem.verifyValue(t);return this.map[this.keyElem.valueToString(i)]={key:i,value:n},this},n.get=function(e){var t=this.keyElem.valueToString(this.keyElem.verifyValue(e));if(t in this.map)return this.map[t].value},n.has=function(e){return this.keyElem.valueToString(this.keyElem.verifyValue(e))in this.map},i}(0,p$5.Reflect),p$5.loadProto=function(e,t,i){return("string"==typeof t||t&&"string"==typeof t.file&&"string"==typeof t.root)&&(i=t,t=void 0),p$5.loadJson(p$5.DotProto.Parser.parse(e),t,i)},p$5.protoFromString=p$5.loadProto,p$5.loadProtoFile=function(e,t,i){if(t&&"object"==typeof t?(i=t,t=null):(!t||"function"!=typeof t)&&(t=null),t)return p$5.Util.fetch("string"==typeof e?e:e.root+"/"+e.file,(function(n){if(null!==n)try{t(null,p$5.loadProto(n,i,e))}catch(e){t(e)}else t(Error("Failed to fetch file"))}));var n=p$5.Util.fetch("object"==typeof e?e.root+"/"+e.file:e);return null===n?null:p$5.loadProto(n,i,e)},p$5.protoFromFile=p$5.loadProtoFile,p$5.newBuilder=function(e){return typeof(e=e||{}).convertFieldsToCamelCase>"u"&&(e.convertFieldsToCamelCase=p$5.convertFieldsToCamelCase),typeof e.populateAccessors>"u"&&(e.populateAccessors=p$5.populateAccessors),new p$5.Builder(e)},p$5.loadJson=function(e,t,i){return("string"==typeof t||t&&"string"==typeof t.file&&"string"==typeof t.root)&&(i=t,t=null),(!t||"object"!=typeof t)&&(t=p$5.newBuilder()),"string"==typeof e&&(e=JSON.parse(e)),t.import(e,i),t.resolveAll(),t},p$5.loadJsonFile=function(e,t,i){if(t&&"object"==typeof t?(i=t,t=null):(!t||"function"!=typeof t)&&(t=null),t)return p$5.Util.fetch("string"==typeof e?e:e.root+"/"+e.file,(function(n){if(null!==n)try{t(null,p$5.loadJson(JSON.parse(n),i,e))}catch(e){t(e)}else t(Error("Failed to fetch file"))}));var n=p$5.Util.fetch("object"==typeof e?e.root+"/"+e.file:e);return null===n?null:p$5.loadJson(JSON.parse(n),i,e)},h$4.prototype.getCacheTile=function(e,t,i,n){for(var r=0;r<this.tileCache.length;r++)if(this.tileCache[r].x===e&&this.tileCache[r].y===t&&this.tileCache[r].z===i&&this.tileCache[r].t===n)return this.tileCache[r];return null},h$4.prototype.addCacheTile=function(e){this.tileCache.length>999&&this.tileCache.splice(0,500),this.removeCacheTile(e.x,e.y,e.z,e.t),this.tileCache.push(e)},h$4.prototype.removeCacheTile=function(e,t,i,n){for(var r=0;r<this.tileCache.length;r++)if(this.tileCache[r].x===e&&this.tileCache[r].y===t&&this.tileCache[r].z===i&&this.tileCache[r].t===n){this.tileCache.splice(r,1);break}},h$4.prototype.getCacheLabel=function(e){for(var t=0;t<this.labelCache.length;t++)if(this.labelCache[t].name===this._UUID&&this.labelCache[t].oid===e)return this.labelCache[t];return null},h$4.prototype.addCacheLabel=function(e){this.labelCache.length>999&&this.labelCache.splice(0,250),this.removeCacheLabel(e.oid),e.timestamp=(new Date).getTime(),this.labelCache.push(e)},h$4.prototype.removeCacheLabel=function(e){for(var t=0;t<this.labelCache.length;t++)if(this.labelCache[t].name===this._UUID&&this.labelCache[t].oid===e){this.labelCache.splice(t,1);break}},h$4.prototype.getTileUrl=function(){return(this.proxy?this.proxy.proxy:"")+this.url+"/GetTiles?lxys={z},{x},{y}"+(this.token?"&tk="+this.token:"")},h$4.prototype.getIcoUrl=function(){return(this.proxy?this.proxy.proxy:"")+this.url+"/GetIcon?id={id}"+(this.token?"&tk="+this.token:"")},h$4.prototype.getRoadTileUrl=function(){return(this.proxy?this.proxy.proxy:"")+this.roadUrl},h$4.prototype._cluster=function(e){if(!(t$$(e)&&e<.05)){var t=this;clearTimeout(this._timer);var i=this.viewer.scene.globe._surface;if(i._tilesToRender.length<8||0<i._tileLoadQueueHigh.length)this._timer=setTimeout((function(){t._cluster()}),100);else{var n=this.getTilesToRender();if(this.compareArray(n,this._latelyGrid))return;this._queueCall(n),t.delaySynchronous()}}},h$4.prototype._changed=function(e){if(!(t$$(e)&&e<.05)){var t=(new Date).getTime(),i=t-this._latelyRefreshStamp,n=t-this._latelyCollisionStamp;if(i>300&&this._cluster(),n>150&&this.aotuCollide&&this.collisionDetection(),this.depthTestOptimization){var r=this.viewer.scene,o=r.globe,a=r.camera,s=a.positionCartographic.height,l=a.pitch,u=this.dTOElevation,c=this.dTOPitch;this._isDTP=o.depthTestAgainstTerrain=s<u&&c<l}}},h$4.prototype._queueCall=function(e){var t=this;t._latelyGrid=e,t._latelyRefreshStamp=(new Date).getTime(),e.forEach((function(e,i,n){if(t.metadata&&O$3(t.metadata.boundBox,e.boundBox)){if(t.metadata.minLevel>e.level+1||t.metadata.maxLevel<e.level+1)return;var r=t.getCacheTile(e.x,e.y,e.level+1,0);if(r)t.addLabelAndIco(r);else{var o=t.getTileUrl().replace("{z}",e.level+1).replace("{y}",e.y).replace("{x}",e.x).replace("{s}",t.subdomains[(e.x+e.y+e.level)%t.subdomains.length]);(a=new XMLHttpRequest).open("GET",o,!0),a.responseType="arraybuffer",a.onload=function(){if(!(a.status<200||300<=a.status)){var e=t.CutString(a.response);if(e)(i=V$4(e)).x=this.tile.x,i.y=this.tile.y,i.z=this.tile.z,i.t=0,t.addCacheTile(i),t.addLabelAndIco(i);else{var i={x:this.tile.x,y:this.tile.y,z:this.tile.z,t:0};t.addCacheTile(i),t.delaySynchronous()}}},a.onerror=function(e){console.error(e)},a.send(),a.tile={x:e.x,y:e.y,z:e.level+1}}}if(t.roadMetadata&&O$3(t.roadMetadata.boundBox,e.boundBox)){if(t.roadMetadata.minLevel>e.level+1||t.roadMetadata.maxLevel<e.level+1)return;if(b=t.getCacheTile(e.x,e.y,e.level+1,1))t.addLabelAndIco(b);else{var a,s=t.getRoadTileUrl().replace("{z}",e.level+1).replace("{y}",e.y).replace("{x}",e.x);(a=new XMLHttpRequest).open("GET",s,!0),a.responseType="json",a.onload=function(){if(!(a.status<200||300<=a.status)){var e=a.response;if(e){var i={pois:e.map((function(e,t,i){return{oid:e.LabelPoint.X+"_"+e.LabelPoint.Y,name:e.Feature.properties.Name,coordinate:[e.LabelPoint.X,e.LabelPoint.Y,e.LabelPoint.Z?e.LabelPoint.Z:0]}})),x:this.tile.x,y:this.tile.y,z:this.tile.z,t:1};t.addCacheTile(i),t.addLabelAndIco(i)}else i={x:this.tile.x,y:this.tile.y,z:this.tile.z,t:1};t.addCacheTile(i),t.delaySynchronous()}},a.onerror=function(e){console.error(e)},a.send(),a.tile={x:e.x,y:e.y,z:e.level+1}}}}))},h$4.prototype.getTilesToRender=function(){var e=this.viewer.scene.globe._surface._tilesToRender.map((function(e){return{x:e.x,y:e.y,level:e.level,boundBox:{minX:n$1d.toDegrees(e.rectangle.west),minY:n$1d.toDegrees(e.rectangle.south),maxX:n$1d.toDegrees(e.rectangle.east),maxY:n$1d.toDegrees(e.rectangle.north)}}})).sort((function(e,t){return t.level-e.level}));return e},h$4.prototype.addLabelAndIco=function(e){if(e.pois)for(var t=0;t<e.pois.length;t++){var i=this.getCacheLabel(e.pois[t].oid);i=i||this.createLabel(e.pois[t],e),this.addCacheLabel(i)}this.delaySynchronous()},h$4.prototype.delaySynchronous=function(){var e=this;clearTimeout(this._timer2),e._timer2=setTimeout((function(){e.synchronousLabel()}),100)},h$4.prototype.synchronousLabel=function(){for(var e=0;e<this.labelCache.length;e++)this.labelCache[e].timestamp>=this._latelyRefreshStamp&&!this.viewer.entities.contains(this.labelCache[e])&&(this._isInitial&&this.aotuCollide&&(this.labelCache[e].show=!1),this.viewer.entities.add(this.labelCache[e]));if(!this._isInitial){for(e=0;e<this.viewer.entities.values.length;e++)!this.viewer.entities.values[e].name||this.viewer.entities.values[e].name!==this._UUID&&this.viewer.entities.values[e].name!==this._UUIDRoad||this.viewer.entities.values[e].timestamp<this._latelyRefreshStamp&&(this.viewer.entities.remove(this.viewer.entities.values[e]),e--);this.aotuCollide&&this.collisionDetection()}},h$4.prototype.createLabel=function(e,t){if(t$$(e)){var i={show:!0,position:a$11.fromDegrees(e.coordinate[0],e.coordinate[1],e.coordinate[2]),label:{text:e.name}};this.serverFirstStyle?(i.label.font=e.fontSize+"px "+t.stringTable[e.fontNameIndex],i.label.style=z$t.FILL_AND_OUTLINE,i.label.scale=e$1Y(e.scale,1),i.label.showBackground=e$1Y(e.showBackground,!1),i.label.backgroundColor=e.backgroundColor,i.label.backgroundPadding=e.backgroundPadding,i.label.pixelOffset=e$1Y(e.pixelOffset,new r$T(0,0)),i.label.eyeOffset=e.eyeOffset,i.label.horizontalOrigin=e.horizontalOrigin,i.label.verticalOrigin=e.verticalOrigin,i.label.heightReference=U$Y.NONE,i.label.fillColor=e$1z.fromCssColorString(this.HexadecimalConversion(e.fontColor)),i.label.outlineColor=e$1z.fromCssColorString(this.HexadecimalConversion(e.shiningColor)),i.label.outlineWidth=e.shiningSize,i.label.translucencyByDistance=void 0,i.label.pixelOffsetScaleByDistance=void 0,i.label.scaleByDistance=void 0,i.label.distanceDisplayCondition=void 0,i.label.disableDepthTestDistance=Number.POSITIVE_INFINITY):(i.label.font=this.labelGraphics.font,i.label.style=this.labelGraphics.style,i.label.scale=this.labelGraphics.scale,i.label.showBackground=this.labelGraphics.showBackground,i.label.backgroundColor=this.labelGraphics.backgroundColor,i.label.backgroundPadding=this.labelGraphics.backgroundPadding,i.label.pixelOffset=this.labelGraphics.pixelOffset,i.label.eyeOffset=this.labelGraphics.eyeOffset,i.label.horizontalOrigin=this.labelGraphics.horizontalOrigin,i.label.verticalOrigin=this.labelGraphics.verticalOrigin,i.label.heightReference=this.labelGraphics.heightReference,i.label.fillColor=this.labelGraphics.fillColor,i.label.outlineColor=this.labelGraphics.outlineColor,i.label.outlineWidth=this.labelGraphics.outlineWidth,i.label.translucencyByDistance=void 0,i.label.pixelOffsetScaleByDistance=void 0,i.label.scaleByDistance=this.labelGraphics.scaleByDistance,i.label.distanceDisplayCondition=void 0,i.label.disableDepthTestDistance=Number.POSITIVE_INFINITY);var n=new l$J(i);return n.name=t.t?this._UUIDRoad:this._UUID,n.oid=e.oid,n.priority=e.priority?e.priority:0,n.xyz=t.x+"_"+t.y+"_"+(t.z-1),n}},h$4.prototype.collisionDetection=function(){var e=this.viewer.scene._view.viewport,t=e.x,i=e.x+e.width,n=e.y,r=e.y+e.height,o=[],a=this,s=this.viewer.entities.values;s.sort((function(e,t){return e.priority-t.priority})),s.map((function(e){if(e.name&&(e.name===a._UUID||e.name===a._UUIDRoad)){var s=u$V.wgs84ToDrawingBufferCoordinates(a.viewer.scene,e.position.getValue(0));if(t$$(s)){e._screenSpacePosition=s;var l=a.getLabelReact({point:s,entity:e});e.collisionBox=l,s.x>=t&&s.x<=i&&s.y>=n&&s.y<=r?(e.show=!0,o.push({anno:e,clustered:!0,coord:s})):e.show=!1}else e.show=!1}}));for(var l=N$y(o,Y$2,F$2,64,Int32Array),u=o.length,c=0;c<u;c++){for(var h=o[c],d=h.anno.collisionBox,f=l.intersect(d.x,d.y,d.x+d.width,d.y+d.height,o,X$3,q$1),p=f.length,_=0,m=0;m<p;m++){var $=f[m],g=o[$];c!==$&&!g.clustered&&++_}_<1?h.clustered=!1:h.anno.show=!1}},h$4.prototype.bindEvent=function(){this.viewer.scene.camera.moveEnd.addEventListener(this._cluster,this),this.viewer.scene.camera.changed.addEventListener(this._changed,this);this.viewer.scene.terrainProvider.readyPromise.then(this._cluster.bind(this))},h$4.prototype.unbindEvent=function(){this.viewer.scene.camera.moveEnd.removeEventListener(this._cluster,this),this.viewer.scene.camera.changed.removeEventListener(this._changed,this)},h$4.prototype.activate=function(){this._latelyGrid=[],this._cluster()},h$4.prototype.destroy=function(){for(var e=0;e<this.viewer.entities.values.length;e++)!this.viewer.entities.values[e].name||this.viewer.entities.values[e].name!==this._UUID&&this.viewer.entities.values[e].name!==this._UUIDRoad||(this.viewer.entities.remove(this.viewer.entities.values[e]),e--);this.viewer.camera.percentageChanged=.5,this.unbindEvent(),this.handler=this.handler&&this.handler.destroy(),this.proxy=void 0,this.viewer=void 0,this.url=void 0,this.labelGraphics=void 0,this.billboardGraphics=void 0,this.aotuCollide=void 0,this.collisionPadding=void 0,this.tileCache=void 0,this.labelCache=void 0,this._latelyGrid=void 0,this._latelyRefreshStamp=void 0,this._roadTileset=void 0},h$4.prototype.compareArray=function(e,t){for(var i=!1,n=0;n<e.length;n++){for(var r=!1,o=0;o<t.length;o++)if(e[n].x===t[o].x&&e[n].y===t[o].y&&e[n].level===t[o].level){r=!0;break}if(!r){i=!0;break}}return!i},h$4.prototype.getLabelReact=function(e){var t=parseInt(e.entity.label.font);t=t>0?t:15;for(var i=e.entity.label.text.getValue(0).split("\n"),n=0,r=i.length,o=0;o<i.length;o++){var a=A$6(i[o])/2;n<a&&(n=a)}var s=e.entity.billboard?e.entity.billboard.width.getValue(0)*e.entity.billboard.scale.getValue(0):1,l=e.entity.billboard?e.entity.billboard.height.getValue(0)*e.entity.billboard.scale.getValue(0):1,u=e.entity.label.pixelOffset,c=u.getValue(0).x;c<0&&(c=0);var h=u.getValue(0).y;return h<0&&(h=0),{x:(e.point?e.point.x:-999)-s/2-this.collisionPadding[3],y:(e.point?e.point.y:-999)-l/2-this.collisionPadding[0],width:t*e.entity.label.scale.getValue(0)*n+c+s+this.collisionPadding[1],height:t*e.entity.label.scale.getValue(0)*(r+.5*(r-1))+h+l/2+this.collisionPadding[2]}},h$4.prototype.CutString=function(e){if(!e)return"";var t=e.byteLength;return t<=28?"":e.slice(19,t-9)},h$4.prototype.HexadecimalConversion=function(e){if(4278190080===e)return"#000000";var t=4278190080|parseInt(-Number(e));if(e="",(t=t.toString(16).substring(1)).length<6)for(var i=6-t.length,n=0;n<i;n++)e+="0";return"#"+e+t},h$4.prototype.getLabelVisibility=function(e){if(!e)return!1;var t=this.viewer.canvas.getBoundingClientRect();return!(e.x<-10||e.x>t.right+10||e.y<-10||e.y>t.bottom+10)};var A$6=function(e){for(var t=0,i=0;i<e.length;i++)null!=e.charAt(i).match(/[^\x00-\xff]/gi)?t+=2:t+=1;return t},V$4=function(e){var t={stringTable:[],pois:[],enumGeometryType:[{ePoint:0},{eMultiLineString:1},{ePolygon:2}],enumZCoordType:[{eCloseGround:0},{eCloseSeaSurface:1},{eRelativelyGround:2},{eAbsolute:3}]},i=function(){if(!p$5)throw new Error("ProtoBuf.js is not present. Please see www/index.html for manual setup instructions.");return p$5.loadProto("option optimize_for = LITE_RUNTIME;package GEOPOI;enum enumGeometryType {ePoint = 0;eMultiLineString = 1;ePolygon = 2;} ;message PBPOI{required uint64 OID = 1;required string Name =2;repeated double Coordinates =3 [packed=true];required enumGeometryType GeometryType = 4;optional int32 Interate = 5;optional int32 SymbolID = 10 [default = 0];optional double DisplayHeight = 11 [default = 32];optional uint32 ShiningColor=12 [default =0];optional uint32\tFontNameIndex=13 [default =0];optional int32\tFontSize=14 [default =18];optional uint32\tFontColor=15 [default =0];};message StringTable {repeated string s = 1;}message PBPOITile{required int64 Version = 1;required int64 TileKey = 2;required StringTable StringTable = 3;repeated PBPOI POIS = 4;};","GEOPOI","GeoPOI.proto").build("GEOPOI").PBPOITile}(),n=function(){if(!p$5)throw new Error("ProtoBuf.js is not present. Please see www/index.html for manual setup instructions.");return p$5.loadProto("option optimize_for = LITE_RUNTIME;package GEOPOI;enum enumGeometryType {ePoint = 0;eMultiLineString = 1;ePolygon = 2;};enum enumZCoordType {eCloseGround = 0;eCloseSeaSurface = 1;eRelativelyGround = 2;eAbsolute = 3;};message PBPOI{required uint64 OID = 1;required string Name =2;repeated double Coordinates =3 [packed=true];required enumGeometryType GeometryType = 4;optional int32 Interate = 5;optional int32 SymbolID = 10 [default = 0];optional double DisplayHeight = 11 [default = 32];optional uint32 ShiningColor=12 [default =0];optional uint32\tFontNameIndex=13 [default =0];optional int32\tFontSize=14 [default =18];optional uint32\tFontColor=15 [default =0];optional enumZCoordType ZCoordType = 16 [default = eAbsolute];};message StringTable {repeated string s = 1;}message PBPOITile{required int64 Version = 1;required int64 TileKey = 2;required StringTable StringTable = 3;repeated PBPOI POIS = 4;};","GEOPOI","GeoPOI2.proto").build("GEOPOI").PBPOITile}(),r=function(){if(!p$5)throw new Error("ProtoBuf.js is not present. Please see www/index.html for manual setup instructions.");return p$5.loadProto("option optimize_for = LITE_RUNTIME;package GEOPOI;enum enumGeometryType {ePoint = 0;eMultiLineString = 1;ePolygon = 2;};enum enumZCoordType {eCloseGround = 0;eCloseSeaSurface = 1;eRelativelyGround = 2;eAbsolute = 3;};message PBPOI{required uint64 OID = 1;required string Name =2;repeated double Coordinates =3 [packed=true];required enumGeometryType GeometryType = 4;optional int32 Priority = 5;repeated int32 Interates =6 [packed=true];optional int32 SymbolID = 10 [default = 0];optional double DisplayHeight = 11 [default = 32];optional uint32 ShiningColor=12 [default =0];optional uint32\tFontNameIndex=13 [default =0];optional int32\tFontSize=14 [default =18];optional uint32\tFontColor=15 [default =0];optional enumZCoordType ZCoordType = 16 [default = eAbsolute];optional int32 FontStyle=17;optional int32 ShiningSize=18;};message StringTable {repeated string s = 1;}message PBPOITile{required int64 Version = 1;required int64 TileKey = 2;required StringTable StringTable = 3;repeated PBPOI POIS = 4;};","GEOPOI","GeoPOI3.proto").build("GEOPOI").PBPOITile}();t.pois.length=0;var o,a=e;try{o=r.decode(a)}catch{console.log("message")}if(!o)try{results=n.decode(a)}catch{console.log("message"),results=i.decode(a)}t.version=parseInt(o.Version.toString()),t.titleKey=parseInt(o.TileKey.toString()),t.stringTable=[];for(var s=o.StringTable.s.length,l=0;l<s;l++)t.stringTable.push(o.StringTable.s[l].toString());return o.POIS.forEach((function(e){var i={};i.oid=parseInt(e.OID.toString())+"_"+t.titleKey,i.name=e.Name.toString(),i.symbolID=parseInt(e.SymbolID.toString()),i.displayHeight=e.DisplayHeight,i.shiningColor=e.ShiningColor,i.fontNameIndex=e.FontNameIndex,i.fontSize=e.FontSize,i.fontColor=e.FontColor,e.ZCoordType&&(i.zCoordType=e.ZCoordType),i.geometryType=e.GeometryType,i.coordinate=e.Coordinates,i.priority=void 0===e.Priority?null:e.Priority,i.interates=void 0===e.Interates?null:e.Interates,i.fontStyle=void 0===e.FontStyle?null:e.FontStyle,i.shiningSize=void 0===e.ShiningSize?null:e.ShiningSize,t.pois.push(i)})),t},_$3={IMG_W:"img_w",IMG_C:"img_c",CIA_W:"cia_w",CIA_C:"cia_c",VEC_W:"vec_w",VEC_C:"vec_c",TER_W:"ter_w",TER_C:"ter_c",CVA_W:"cva_w",CVA_C:"cva_c",CTA_W:"cta_w",CTA_C:"cta_c",IBO_W:"ibo_w",IBO_C:"ibo_c",EIA_W:"eia_w",EIA_C:"eia_c",EVA_W:"eva_w",EVA_C:"eva_c"},t$4=Object.freeze(_$3);function A$5(e){e=e$1Y(e,{}),this._mapStyle=e$1Y(e.mapStyle,t$4.IMG_W),this._url=e$1Y(e.url,_$2[this._mapStyle]),this._token=e.token,this._layer=e$1Y(e.layer,n$7[this._mapStyle]),this._style=e$1Y(e.style,"default"),this._tileMatrixSetID=e$1Y(e.tileMatrixSetID,r$7[this._mapStyle]),this._tileMatrixLabels=e$1Y(e.tileMatrixLabels,i$6[this._mapStyle]),this._format=e$1Y(e.format,s$5[this._mapStyle]),this._epsgCode=a$3[this._mapStyle],this._tilingScheme=e$1Y(e.tilingScheme,new o$Z({})),"4490"==this._epsgCode&&(this._tilingScheme=new a$W),this._tileWidth=e$1Y(e.tileWidth,256),this._tileHeight=e$1Y(e.tileHeight,256),this._minimumLevel=e$1Y(e.minimumLevel,0),this._maximumLevel=e$1Y(e.maximumLevel,i$6[this._mapStyle].length),this._rectangle=e$1Y(e.rectangle,this._tilingScheme.rectangle),this._readyPromise=c$18.resolve(!0),this._errorEvent=new o$15;var t=e.credit;this._credit="string"==typeof t?new i$17(t):t,this._subdomains=e$1Y(e.subdomains,["t0","t1","t2","t3","t4","t5","t6","t7"]),this._tileDiscardPolicy=e.tileDiscardPolicy;var i=this,n=this._url;i.tablename=this._url,new d$_({name:n}).then((function(e){e.checkObjectStoreExit(i.tablename)?i._indexedDBScheduler=e:e.createObjectStore(i.tablename).then((function(){i._indexedDBScheduler=e}))})),i._indexedDBSetting={isOpen:!1,clear:function(){i._indexedDBScheduler.clear(i.tablename)},cache:[]}}function O$2(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;e$1B(t,o)?e$1B(e,o)&&(a|=1):(a|=2,e$1B(e,o)||(a|=1)),n+=a}return n}Object.defineProperties(A$5.prototype,{url:{get:function(){return this._url}},mapStyle:{get:function(){return this._mapStyle}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},errorEvent:{get:function(){return this._errorEvent}},ready:{value:!0},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}}}),A$5.prototype.requestImage=function(e,t,i,n){var r=G$5(this,e,t,i),o=O$2(e,t,i);if(n.quadKey=o,!0===this._indexedDBSetting.isOpen&&n.cacheEnable){if(t$$(this._indexedDBScheduler)){var a=this._indexedDBScheduler.getElementFromDB(this.tablename,o);return t$$(a)?c$18(a,(function(e){return t$$(e)?e:"cacheError"}),(function(e){return"cacheError"})):o$n.loadImage(this,r)}return o$n.loadImage(this,r)}return o$n.loadImage(this,r)};var D$4=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetTile"});function G$5(e,t,i,n){"900913"==e._epsgCode&&(n-=1);var r=e._tileMatrixLabels,o=t$$(r)?r[n]:n.toString(),a=e._subdomains,s=e._url.replace("[subdomain]",a[(t+i+n)%a.length]),l=new h$1f(s),u=m$19(e$1Y(l.query,""));(u=s$1n(D$4,u)).tilematrix=o,u.layer=e._layer,u.style=e._style,u.tilerow=i,u.tilecol=t,u.tilematrixset=e._tileMatrixSetID,u.format=e._format,l.query=a$Y(u),s=l.toString();var c=e._proxy;return t$$(c)&&(s=c.getURL(s)),t$$(e._token)&&(s+="&tk="+e._token),s}A$5.prototype.pickFeatures=function(){};var _$2={};_$2[t$4.IMG_W]="https://[subdomain].tianditu.gov.cn/img_w/wmts",_$2[t$4.IMG_C]="https://[subdomain].tianditu.gov.cn/img_c/wmts",_$2[t$4.CIA_W]="https://[subdomain].tianditu.gov.cn/cia_w/wmts",_$2[t$4.CIA_C]="https://[subdomain].tianditu.gov.cn/cia_c/wmts",_$2[t$4.VEC_W]="https://[subdomain].tianditu.gov.cn/vec_w/wmts",_$2[t$4.VEC_C]="https://[subdomain].tianditu.gov.cn/vec_c/wmts",_$2[t$4.TER_W]="https://[subdomain].tianditu.gov.cn/ter_w/wmts",_$2[t$4.TER_C]="https://[subdomain].tianditu.gov.cn/ter_c/wmts",_$2[t$4.CVA_W]="https://[subdomain].tianditu.gov.cn/cva_w/wmts",_$2[t$4.CVA_C]="https://[subdomain].tianditu.gov.cn/cva_c/wmts",_$2[t$4.CTA_W]="https://[subdomain].tianditu.gov.cn/cta_w/wmts",_$2[t$4.CTA_C]="https://[subdomain].tianditu.gov.cn/cta_c/wmts",_$2[t$4.EIA_W]="https://[subdomain].tianditu.gov.cn/eia_w/wmts",_$2[t$4.EIA_C]="https://[subdomain].tianditu.gov.cn/eia_c/wmts",_$2[t$4.EVA_W]="https://[subdomain].tianditu.gov.cn/eva_w/wmts",_$2[t$4.EVA_C]="https://[subdomain].tianditu.gov.cn/eva_c/wmts",_$2[t$4.IBO_W]="https://[subdomain].tianditu.gov.cn/ibo_w/wmts",_$2[t$4.IBO_C]="https://[subdomain].tianditu.gov.cn/ibo_c/wmts";var n$7={};n$7[t$4.IMG_W]="img",n$7[t$4.IMG_C]="img",n$7[t$4.IBO_W]="ibo",n$7[t$4.IBO_C]="ibo",n$7[t$4.CIA_W]="cia",n$7[t$4.CIA_C]="cia",n$7[t$4.VEC_W]="vec",n$7[t$4.VEC_C]="vec",n$7[t$4.TER_W]="ter",n$7[t$4.TER_C]="ter",n$7[t$4.CVA_W]="cva",n$7[t$4.CVA_C]="cva",n$7[t$4.CTA_W]="cta",n$7[t$4.CTA_C]="cta",n$7[t$4.EIA_W]="eia",n$7[t$4.EIA_C]="eia",n$7[t$4.EVA_W]="eva",n$7[t$4.EVA_C]="eva";var r$7={};r$7[t$4.IMG_W]="w",r$7[t$4.IMG_C]="c",r$7[t$4.IBO_W]="w",r$7[t$4.IBO_C]="c",r$7[t$4.CIA_W]="w",r$7[t$4.CIA_C]="c",r$7[t$4.VEC_W]="w",r$7[t$4.VEC_C]="c",r$7[t$4.TER_W]="w",r$7[t$4.TER_C]="c",r$7[t$4.CVA_W]="w",r$7[t$4.CVA_C]="c",r$7[t$4.CTA_W]="w",r$7[t$4.CTA_C]="c",r$7[t$4.EIA_W]="w",r$7[t$4.EIA_C]="c",r$7[t$4.EVA_W]="w",r$7[t$4.EVA_C]="c";var s$5={};s$5[t$4.IMG_W]="tiles",s$5[t$4.IMG_C]="tiles",s$5[t$4.IBO_W]="tiles",s$5[t$4.IBO_C]="tiles",s$5[t$4.CIA_W]="tiles",s$5[t$4.CIA_C]="tiles",s$5[t$4.VEC_W]="tiles",s$5[t$4.VEC_C]="tiles",s$5[t$4.TER_W]="tiles",s$5[t$4.TER_C]="tiles",s$5[t$4.CVA_W]="tiles",s$5[t$4.CVA_C]="tiles",s$5[t$4.CTA_W]="tiles",s$5[t$4.CTA_C]="tiles",s$5[t$4.EIA_W]="tiles",s$5[t$4.EIA_C]="tiles",s$5[t$4.EVA_W]="tiles",s$5[t$4.EVA_C]="tiles";var a$3={};a$3[t$4.IMG_W]="900913",a$3[t$4.IMG_C]="4490",a$3[t$4.IBO_W]="900913",a$3[t$4.IBO_C]="4490",a$3[t$4.CIA_W]="900913",a$3[t$4.CIA_C]="4490",a$3[t$4.VEC_W]="900913",a$3[t$4.VEC_C]="4490",a$3[t$4.TER_W]="900913",a$3[t$4.TER_C]="4490",a$3[t$4.CVA_W]="900913",a$3[t$4.CVA_C]="4490",a$3[t$4.CTA_W]="900913",a$3[t$4.CTA_C]="4490",a$3[t$4.EIA_W]="900913",a$3[t$4.EIA_C]="4490",a$3[t$4.EVA_W]="900913",a$3[t$4.EVA_C]="4490";var i$6={};function p$4(e){if(!t$$(e)||!t$$(e.token))throw new t$_("options.token is required.");this._urls=["https://t0.tianditu.gov.cn/mapservice/swdx?T=elv_c","https://t1.tianditu.gov.cn/mapservice/swdx?T=elv_c","https://t2.tianditu.gov.cn/mapservice/swdx?T=elv_c","https://t3.tianditu.gov.cn/mapservice/swdx?T=elv_c","https://t4.tianditu.gov.cn/mapservice/swdx?T=elv_c","https://t5.tianditu.gov.cn/mapservice/swdx?T=elv_c","https://t6.tianditu.gov.cn/mapservice/swdx?T=elv_c","https://t7.tianditu.gov.cn/mapservice/swdx?T=elv_c"];for(var t=0;t<this._urls.length;t++)this._urls[t]+="&tk="+e.token;this._dataType=e$1Y(e.dataType,"int"),this._errorEvent=new o$15,this._ready=!0,this._readyPromise=c$18.defer(),this._terrainDataStructure={heightScale:.001,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0};var i=e.credit;"string"==typeof i&&(i=new i$17(i)),this._credit=i;var n=e$1Y(e.ellipsoid,n$1c.WGS84);this._tilingScheme=new a$W({ellipsoid:n}),this._heightmapWidth=64,this._heightmapHeight=64,this._levelZeroMaximumGeometricError=d$11.getEstimatedLevelZeroGeometricErrorForAHeightmap(n,Math.min(this._heightmapWidth,this._heightmapHeight),this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._minimumLevel=e$1Y(e.minimumLevel,5),this._maximumLevel=e$1Y(e.maximumLevel,25),this._hasWaterMask=!1,this._hasVertexNormals=!1}function E$4(e,t){return(t=t$$(t)?t:new r$V({url:e})).requestFunction=function(){var t=new XMLHttpRequest;t.open("get",e,!0),t.responseType="arraybuffer",t.async=!1,t.send(null);var i=c$18.defer();return t.onreadystatechange=function(){if(4===t.readyState)if(200===t.status&&t$$(t.response)){for(var e=new DataView(t.response),n=e.byteLength,r=new Uint8Array(n),o=0;o<n;o++)r[o]=e.getUint8(o,!0);if(n>1e3){var a=lt$f.inflate(r).buffer;t$$(a)?i.resolve(new Uint8Array(a)):i.reject(!1)}else i.reject(!1)}else(t.status>=400||0===t.status)&&i.reject(!1)},i.promise},r$U.request(t)}function o$7(){}function n$6(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._tilingScheme=t$$(e.tilingScheme)?e.tilingScheme:new a$W({ellipsoid:e.ellipsoid}),this._color=e$1Y(e.color,e$1z.YELLOW),this._errorEvent=new o$15,this._tileWidth=e$1Y(e.tileWidth,256),this._tileHeight=e$1Y(e.tileHeight,256),this._readyPromise=c$18.resolve(!0)}function o$6(e){t$_.throwInstantiationError()}i$6[t$4.IMG_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$6[t$4.IMG_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$6[t$4.IBO_W]=["1","2","3","4","5","6","7","8","9","10"],i$6[t$4.IBO_C]=["1","2","3","4","5","6","7","8","9","10"],i$6[t$4.CIA_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$6[t$4.CIA_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$6[t$4.VEC_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],i$6[t$4.VEC_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],i$6[t$4.TER_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14"],i$6[t$4.TER_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14"],i$6[t$4.CVA_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],i$6[t$4.CVA_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],i$6[t$4.CTA_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$6[t$4.CTA_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$6[t$4.EIA_W]=["1","2","3","4","5","6","7","8","9","10"],i$6[t$4.EIA_C]=["1","2","3","4","5","6","7","8","9","10"],i$6[t$4.EVA_W]=["1","2","3","4","5","6","7","8","9","10"],i$6[t$4.EVA_C]=["1","2","3","4","5","6","7","8","9","10"],Object.defineProperties(p$4.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}}}),p$4.prototype.requestTileGeometry=function(e,t,i,n){if(i<this._maximumLevel&&i>=this._minimumLevel){var r=this._urls[(e+t+i)%this._urls.length],o=-1===r.indexOf("?")?"?":"&",a=E$4(r+o+"x="+e+"&y="+t+"&l="+(i+1));if(!t$$(a))return;var s=this;return c$18(a,(function(e){var t=s.transformBuffer(e);return t$$(t)?new M$1a({buffer:t,width:s._heightmapWidth,height:s._heightmapHeight,childTileMask:void 0,structure:s._terrainDataStructure}):new M$1a({buffer:s.getvHeightBuffer(),width:s._heightmapWidth,height:s._heightmapHeight,childTileMask:void 0,structure:s._terrainDataStructure})}))}if(i<this._minimumLevel)return new M$1a({buffer:this.getvHeightBuffer(),width:this._heightmapWidth,height:this._heightmapHeight,childTileMask:void 0,structure:this._terrainDataStructure})},p$4.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},p$4.prototype.getTileDataAvailable=function(e,t,i){return i<25},p$4.prototype.getvHeightBuffer=function(){var e=this._vHeightBuffer;if(!t$$(e)){e=this._vHeightBuffer=new Uint8ClampedArray(this._heightmapWidth*this._heightmapHeight*4);for(var t=this._heightmapWidth*this._heightmapHeight*4,i=0;i<t;)e[i++]=15,e[i++]=66,e[i++]=64,e[i++]=255}return e},p$4.prototype.transformBuffer=function(e){var t=2;"int"===this._dataType?t=2:"float"===this._dataType&&(t=4);var i,n,r,o,a,s,l,u=new ArrayBuffer(t),c=new DataView(u),h=this._heightmapWidth,d=this._heightmapHeight,f=new Uint8Array(h*d*4);for(i=0;i<d;i++)for(n=0;n<h;n++){r=parseInt(149*i/(d-1)),o=parseInt(149*n/(h-1)),4===t?(a=t*(150*r+o),c.setInt8(0,e[a]),c.setInt8(0,e[a+1]),c.setInt8(0,e[a+2]),c.setInt8(0,e[a+3]),l=c.getFloat32(0,!0)):l=e[a=t*(150*r+o)]+256*e[a+1],(l>1e4||l<-2e3)&&(l=0);var p=(l+1e3)/.001;f[s=4*(i*h+n)]=p/65536,f[s+1]=(p-256*f[s]*256)/256,f[s+2]=p-256*f[s]*256-256*f[s+1],f[s+3]=256}return f},o$7.prototype.boundingVolume=void 0,o$7.prototype.boundingSphere=void 0,o$7.prototype.distanceToCamera=function(e){t$_.throwInstantiationError()},o$7.prototype.intersectPlane=function(e){t$_.throwInstantiationError()},o$7.prototype.createDebugVolume=function(e){t$_.throwInstantiationError()},Object.defineProperties(n$6.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}}),n$6.prototype.getTileCredits=function(e,t,i){},n$6.prototype.requestImage=function(e,t,i,n){var r=document.createElement("canvas");r.width=256,r.height=256;var o=r.getContext("2d"),a=this._color.toCssColorString();return o.strokeStyle=a,o.lineWidth=2,o.strokeRect(1,1,255,255),o.font="bold 25px Arial",o.textAlign="center",o.fillStyle=a,o.fillText("L: "+i,124,86),o.fillText("X: "+e,124,136),o.fillText("Y: "+t,124,186),r},n$6.prototype.pickFeatures=function(e,t,i,n,r){},o$6.prototype.isReady=t$_.throwInstantiationError,o$6.prototype.shouldDiscardImage=t$_.throwInstantiationError;var e$3={START:0,LOADING:1,READY:2,UPSAMPLED_ONLY:3},TileState=Object.freeze(e$3);function c$6(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),n$1e.typeOf.object("options.clock",e.clock),n$1e.typeOf.object("options.intervals",e.intervals),this.show=e$1Y(e.show,!0),this.modelMatrix=c$1a.clone(e$1Y(e.modelMatrix,c$1a.IDENTITY)),this.shadows=e$1Y(e.shadows,q$Q.ENABLED),this.maximumMemoryUsage=e$1Y(e.maximumMemoryUsage,256),this.shading=new n$C(e.shading),this.style=e.style,this.frameFailed=new o$15,this.frameChanged=new o$15,this._clock=e.clock,this._intervals=e.intervals,this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._pointCloudEyeDomeLighting=new u$E,this._loadTimestamp=void 0,this._clippingPlanesState=0,this._styleDirty=!1,this._pickId=void 0,this._totalMemoryUsageInBytes=0,this._frames=[],this._previousInterval=void 0,this._nextInterval=void 0,this._lastRenderedFrame=void 0,this._clockMultiplier=0,this._readyPromise=c$18.defer(),this._runningSum=0,this._runningLength=0,this._runningIndex=0,this._runningSamples=d$10(new Array(5),0),this._runningAverage=0}function W(e){return"uniform vec4 czm_pickColor;\n"+e}function X$2(e){return function(t){return s$1n(t,{czm_pickColor:function(){return e._pickId.color}})}}function Z$2(){return"czm_pickColor"}Object.defineProperties(c$6.prototype,{clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){l$G.setOwner(e,this,"_clippingPlanes")}},totalMemoryUsageInBytes:{get:function(){return this._totalMemoryUsageInBytes}},boundingSphere:{get:function(){if(t$$(this._lastRenderedFrame))return this._lastRenderedFrame.pointCloud.boundingSphere}},readyPromise:{get:function(){return this._readyPromise.promise}}}),c$6.prototype.makeStyleDirty=function(){this._styleDirty=!0},c$6.prototype._getAverageLoadTime=function(){return 0===this._runningLength?.05:this._runningAverage};var $$3=new o$10;function C$3(e){var t=e._clock,i=t.canAnimate&&t.shouldAnimate,n=t.multiplier;return i?n:0}function f$6(e,t){return e._intervals.indexOf(t.start)}function ee$2(e,t){var i=e._intervals,n=e._clock,r=C$3(e);if(0!==r){var o=e._getAverageLoadTime(),a=o$10.addSeconds(n.currentTime,o*r,$$3),s=i.indexOf(a);return s===f$6(e,t)&&(r>=0?++s:--s),i.get(s)}}function ie(e){var t=e._intervals,i=e._clock.currentTime,n=t.indexOf(i);return t.get(n)}function ne$1(e,t,i){var n=C$3(e),r=f$6(e,t),o=f$6(e,i);return n>=0?r>=o:r<=o}function re$1(e,t){return function(i){var n=t$$(i.message)?i.message:i.toString();e.frameFailed.numberOfListeners>0?e.frameFailed.raiseEvent({uri:t,message:n}):(console.log("A frame failed to load: "+t),console.log("Error: "+n))}}function te$1(e,t,i){var n=f$6(e,t),r=e._frames,o=r[n];if(!t$$(o)){var a=t.data.transform,s=t$$(a)?c$1a.fromArray(a):void 0,l=t.data.uri;o={pointCloud:void 0,transform:s,timestamp:yt$9(),sequential:!0,ready:!1,touchedFrameNumber:i.frameNumber},r[n]=o,t$X.fetchArrayBuffer({url:l}).then((function(t){return o.pointCloud=new ie$l({arrayBuffer:t,cull:!0,fragmentShaderLoaded:W,uniformMapLoaded:X$2(e),pickIdLoaded:Z$2}),o.pointCloud.readyPromise})).otherwise(re$1(e,l))}return o}function oe$1(e,t){e._runningSum+=t,e._runningSum-=e._runningSamples[e._runningIndex],e._runningSamples[e._runningIndex]=t,e._runningLength=Math.min(e._runningLength+1,e._runningSamples.length),e._runningIndex=(e._runningIndex+1)%e._runningSamples.length,e._runningAverage=e._runningSum/e._runningLength}function ae$1(e,t,i,n){t.touchedFrameNumber<n.frameNumber-1&&(t.sequential=!1);var r=t.pointCloud;if(t$$(r)&&!t.ready){var o=n.commandList,a=o.length;if(D$3(e,t,i,n),r.ready&&(t.ready=!0,e._totalMemoryUsageInBytes+=r.geometryByteLength,o.length=a,t.sequential))oe$1(e,(yt$9()-t.timestamp)/1e3)}t.touchedFrameNumber=n.frameNumber}var se=new c$1a;function me(e,t){var i=e.shading;return t$$(i)&&t$$(i.baseResolution)?i.baseResolution:t$$(t.boundingSphere)?n$1d.cbrt(t.boundingSphere.volume()/t.pointsLength):0}function le$3(e){var t=e.shading;return t$$(t)&&t$$(t.maximumAttenuation)?t.maximumAttenuation:10}var ue=new n$C;function D$3(e,t,i,n){var r=e$1Y(e.shading,ue),o=t.pointCloud,a=e$1Y(t.transform,c$1a.IDENTITY);o.modelMatrix=c$1a.multiplyTransformation(e.modelMatrix,a,se),o.style=e.style,o.time=i.timeSinceLoad,o.shadows=e.shadows,o.clippingPlanes=e._clippingPlanes,o.isClipped=i.isClipped,o.attenuation=r.attenuation,o.backFaceCulling=r.backFaceCulling,o.normalShading=r.normalShading,o.geometricError=me(e,o),o.geometricErrorScale=r.geometricErrorScale,o.maximumAttenuation=le$3(e),o.update(n),t.touchedFrameNumber=n.frameNumber}function S$5(e,t,i,n){ae$1(e,te$1(e,t,n),i,n)}function de(e){return function(t){return t.touchedFrameNumber<e.frameNumber}}function A$4(e,t){for(var i=e._frames,n=i.length,r=0;r<n;++r){var o=i[r];if(t$$(o)&&(!t$$(t)||t(o))){var a=o.pointCloud;o.ready&&(e._totalMemoryUsageInBytes-=a.geometryByteLength),t$$(a)&&a.destroy(),o===e._lastRenderedFrame&&(e._lastRenderedFrame=void 0),i[r]=void 0}}}function he(e,t){var i=f$6(e,t),n=e._frames[i];if(t$$(n)&&n.ready)return n}function T$2(e,t,i,n,r){return!!t$$(i)&&(!!i.ready||(S$5(e,t,n,r),i.ready))}function pe$1(e,t,i,n,r){var o,a,s=e._intervals,l=e._frames,u=f$6(e,i),c=f$6(e,t);if(u>=c){for(o=u;o>=c;--o)if(T$2(e,a=s.get(o),l[o],n,r))return a}else for(o=u;o<=c;++o)if(T$2(e,a=s.get(o),l[o],n,r))return a;return t}function ce$1(e,t,i){for(var n=e._frames,r=n.length,o=0;o<r;++o){var a=n[o];t$$(a)&&t$$(a.pointCloud)&&(a.pointCloud.clippingPlanesDirty=t,a.pointCloud.styleDirty=i)}}var y$7={timeSinceLoad:0,isClipped:!1,clippingPlanesDirty:!1};c$6.prototype.update=function(e){if(e.mode!==b$1d.MORPHING&&this.show){t$$(this._pickId)||(this._pickId=e.context.createPickId({primitive:this})),t$$(this._loadTimestamp)||(this._loadTimestamp=o$10.clone(e.time));var t=Math.max(1e3*o$10.secondsDifference(e.time,this._loadTimestamp),0),i=this._clippingPlanes,n=0,r=!1,o=t$$(i)&&i.enabled;o&&(i.update(e),n=i.clippingPlanesState),this._clippingPlanesState!==n&&(this._clippingPlanesState=n,r=!0);var a=this._styleDirty;this._styleDirty=!1,(r||a)&&ce$1(this,r,a),y$7.timeSinceLoad=t,y$7.isClipped=o;var s=this.shading,l=this._pointCloudEyeDomeLighting,u=e.commandList,c=u.length,h=this._previousInterval,d=this._nextInterval,f=ie(this);if(t$$(f)){var p=!1,_=C$3(this),m=0===_;_!==this._clockMultiplier&&(p=!0,this._clockMultiplier=_),(!t$$(h)||m)&&(h=f),(!t$$(d)||p||ne$1(this,f,d))&&(d=ee$2(this,f));var $=he(this,h=pe$1(this,h,f,y$7,e));t$$($)||(S$5(this,h,y$7,e),$=this._lastRenderedFrame),t$$($)&&D$3(this,$,y$7,e),t$$(d)&&S$5(this,d,y$7,e);var g=this;t$$($)&&!t$$(this._lastRenderedFrame)&&e.afterRender.push((function(){g._readyPromise.resolve(g)})),t$$($)&&$!==this._lastRenderedFrame&&g.frameChanged.numberOfListeners>0&&e.afterRender.push((function(){g.frameChanged.raiseEvent(g)})),this._previousInterval=h,this._nextInterval=d,this._lastRenderedFrame=$,this._totalMemoryUsageInBytes>1024*this.maximumMemoryUsage*1024&&A$4(this,de(e));var y=u.length-c;t$$(s)&&s.attenuation&&s.eyeDomeLighting&&y>0&&l.update(e,c,s)}}},c$6.prototype.isDestroyed=function(){return!1},c$6.prototype.destroy=function(){return A$4(this),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),s$1e(this)};var y$6="varying vec2 v_textureCoordinates;\nvoid main()\n{\nczm_materialInput materialInput;\nmaterialInput.s = v_textureCoordinates.s;\nmaterialInput.st = v_textureCoordinates;\nmaterialInput.str = vec3(v_textureCoordinates, 0.0);\nmaterialInput.normalEC = vec3(0.0, 0.0, -1.0);\nczm_material material = czm_getMaterial(materialInput);\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n}\n";function e$2(e,t){this.show=!0,t$$(e)||(e=new n$13),this.rectangle=n$13.clone(e),t$$(t)||(t=r$v.fromType(r$v.ColorType,{color:new e$1z(1,1,1,1)})),this.material=t,this._material=void 0,this._overlayCommand=void 0,this._rs=void 0}function T$1(e){this._url=e.url,this._hypsometricTexture=void 0,this.hypsometricSetting=e.hypsometricSetting,this._ready=!1,this._volBounds=void 0,this._volImageBuffer=void 0,this._volTexture=void 0,this._dataBuffer=void 0,this.loadData(this._url)}function ut$1(e,t,i){for(var n=e.length/4,r=new Float32Array(e.buffer,e.byteOffset,n),o=0;o<r.length;o++){var a=r[o],s=4*o;if(a<0||a>1)e[s+0]=255,e[s+1]=255,e[s+2]=255,e[s+3]=255;else{a=a*(t._ceiling-t._floor)+t._floor,i&&(a=Math.round(a));var l=t._dictColorTable.getColor(a);e[s+0]=255*l.red,e[s+1]=255*l.green,e[s+2]=255*l.blue,e[s+3]=255*l.alpha}}return new Uint8Array(e.buffer,0,e.length)}function pt(e){var t=new a$11(1,255,65025);(t=a$11.multiplyByScalar(t,e,t)).x=t.x-Math.floor(t.x),t.y=t.y-Math.floor(t.y),t.z=t.z-Math.floor(t.z);var i=new a$11,n=new a$11(1/255,1/255,0);return i.x=t.y*n.x,i.y=t.z*n.y,i.z=t.z*n.z,t=a$11.subtract(t,i,t)}function vt(e){for(var t=e.length/4,i=new Float32Array(e.buffer,e.byteOffset,t),n=0;n<i.length;n++){var r,o,a,s,l=i[n],u=4*n,c=new a$10(0,0,0,0);if(l>=0&&l<=1){l<n$1d.EPSILON9?l=n$1d.EPSILON9:1-l<n$1d.EPSILON9&&(l=1-n$1d.EPSILON9);var h=pt(l);c.x=h.x,c.y=h.y,c.z=h.z,c.w=1}r=255*c.x,o=255*c.y,a=255*c.z,s=255*c.w,e[u+0]=parseInt(r),e[u+1]=parseInt(o),e[u+2]=parseInt(a),e[u+3]=parseInt(s)}return new Uint8Array(e.buffer,0,e.length)}e$2.prototype.update=function(e){if(this.show){if(!t$$(this.material))throw new t$_("this.material must be defined.");if(!t$$(this.rectangle))throw new t$_("this.rectangle must be defined.");var t=this._rs;if((!t$$(t)||!n$13.equals(t.viewport,this.rectangle))&&(this._rs=p$1a.fromCache({blending:Ee$s.ALPHA_BLEND,viewport:this.rectangle})),e.passes.render){var i=e.context;if(this._material!==this.material||!t$$(this._overlayCommand)){this._material=this.material,t$$(this._overlayCommand)&&this._overlayCommand.shaderProgram.destroy();var n=new a$O({sources:[this._material.shaderSource,y$6]});this._overlayCommand=i.createViewportQuadCommand(n,{renderState:this._rs,uniformMap:this._material._uniforms,owner:this}),this._overlayCommand.pass=we$l.OVERLAY}this._material.update(i),this._overlayCommand.uniformMap=this._material._uniforms,e.commandList.push(this._overlayCommand)}}},e$2.prototype.isDestroyed=function(){return!1},e$2.prototype.destroy=function(){return t$$(this._overlayCommand)&&(this._overlayCommand.shaderProgram=this._overlayCommand.shaderProgram&&this._overlayCommand.shaderProgram.destroy()),s$1e(this)},Object.defineProperties(T$1.prototype,{hypsometricSetting:{get:function(){return this._hypsometricSetting},set:function(e){this._hypsometricSetting=e}}});var S$4=-9999,ct$1=new DOMParser;function _t(e,t,i){if(t$$(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(a.localName===t)return a}}T$1.prototype.loadData=function(e){var t=this;t._ready=!1;var i=o$W(e+"/config");!t$$(i)||i.then((function(i){var n=_t((i=ct$1.parseFromString(i,"application/xml")).childNodes[0],"sml:Bounds").textContent.split("\n"),r=Number(n[1]),o=Number(n[2]),a=Number(n[3]),s=Number(n[4]),l='/data/index/1/1.stream?bounds={"leftBottom":{"x":xLeft,"y":yBottom},"rightTop":{"x":xRight,"y":yTop}}';l=l.replace("xLeft",r).replace("yBottom",s).replace("xRight",a).replace("yTop",o);var u=u$S(e+l);!t$$(u)||u.then((function(e){var i=new Uint8Array(e,8),n=lt$f.inflate(i).buffer,r=new Float64Array(n,0,1),o=new Uint32Array(n,48,1);if(0===r[0]||3200===o[0]||3201===o[0]){var a=0;0===r[0]&&(a=8);var s=new Float64Array(n,a,6),l={left:s[0],top:s[1],right:s[2],bottom:s[3],minHeight:s[4]<s[5]?s[4]:s[5],maxHeight:s[4]>s[5]?s[4]:s[5]},u=new Uint32Array(n,48+a,7),c=u[0],h=u[1],d=u[2],f=u[3],p=u[4],_=u[5],m=u[6],$=new Uint8Array(n,76+a,f*f*4),g=new Float32Array(n,76+a,f*f),y=!1;Math.abs(t._hypsometricSetting._ceiling-Math.round(t._hypsometricSetting._ceiling))<n$1d.EPSILON6&&Math.abs(t._hypsometricSetting._floor-Math.round(t._hypsometricSetting._floor))<n$1d.EPSILON6&&(y=!0),t._dataBuffer=new Float32Array(p*_*m);for(var v=0;v<m;v++)for(var x=Math.floor(v/h),b=v%h,S=0;S<_;S++)for(var w=d*x+S,C=0;C<p;C++){var T=w*f+(d*b+C);if(g[T]<0||g[T]>1)t._dataBuffer[v*_*p+S*p+C]=S$4;else{var P=g[T]*(t._hypsometricSetting._ceiling-t._hypsometricSetting._floor)+t._hypsometricSetting._floor;y&&(P=Math.round(P)),t._dataBuffer[v*_*p+S*p+C]=P}}t._hypsometricSetting.filterMode===J$O.FilterMode.NEAREST?ut$1($,t.hypsometricSetting,y):vt($);var E={nFormat:c,nSideBlockCount:h,nBlockLength:d,nLength:f,nWidth:p,nHeight:_,nDepth:m,imageArray:$};t._volBounds=l,t._volImageBuffer=E,t._ready=!0}e=null})).otherwise((function(e){}))})).otherwise((function(e){}))},T$1.prototype.loadTexture=function(e){if(!t$$(this._volTexture)){var t=tt$l.NEAREST,i=et$k.NEAREST;if(this._hypsometricSetting.filterMode!==J$O.FilterMode.NEAREST)t=tt$l.LINEAR,i=et$k.LINEAR;this._volTexture=new P$S({context:e,width:this._volImageBuffer.nLength,height:this._volImageBuffer.nLength,pixelFormat:Z$_.RGBA,flipY:!1,sampler:new a$Q({minificationFilter:t,magnificationFilter:i})}),this._volTexture.copyFrom({width:this._volImageBuffer.nLength,height:this._volImageBuffer.nLength,arrayBufferView:this._volImageBuffer.imageArray}),this._volImageBuffer.imageArray=null}t$$(this._hypsometricTexture)||(this._hypsometricTexture=new P$S({context:e,width:1024,height:64,pixelFormat:Z$_.RGBA,flipY:!1}),this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._hypsometricSetting.ColorTable._imageBuffer}))},T$1.prototype.getPixel=function(e,t,i){var n=i*this._volImageBuffer.nWidth*this._volImageBuffer.nHeight+t*this._volImageBuffer.nWidth+e;return this._dataBuffer[n]},T$1.prototype.getValue=function(e){var t=Cesium.Cartographic.fromCartesian(e),i=Cesium.Math.toDegrees(t.longitude),n=Cesium.Math.toDegrees(t.latitude),r=t.height,o=(i-this._volBounds.left)/(this._volBounds.right-this._volBounds.left);if(!(o>1||o<0)){var a=(n-this._volBounds.bottom)/(this._volBounds.top-this._volBounds.bottom);if(!(a>1||a<0)){var s=(r-this._volBounds.minHeight)/(this._volBounds.maxHeight-this._volBounds.minHeight);if(!(s>1||s<0)){var l=o*this._volImageBuffer.nWidth-.5,u=a*this._volImageBuffer.nHeight-.5,c=s*(this._volImageBuffer.nDepth-1),h=Math.floor(l),d=Math.ceil(l),f=Math.floor(u),p=Math.ceil(u),_=Math.floor(c),m=Math.ceil(c);if(h=n$1d.clamp(h,0,this._volImageBuffer.nWidth-1),d=n$1d.clamp(d,0,this._volImageBuffer.nWidth-1),f=n$1d.clamp(f,0,this._volImageBuffer.nHeight-1),p=n$1d.clamp(p,0,this._volImageBuffer.nHeight-1),_=n$1d.clamp(_,0,this._volImageBuffer.nDepth-1),m=n$1d.clamp(m,0,this._volImageBuffer.nDepth-1),this._hypsometricSetting.filterMode===J$O.FilterMode.NEAREST)return l=l-h>.5?d:h,u=u-f>.5?p:f,c=c-_>.5?m:_,M=this.getPixel(l,u,c);var $=this.getPixel(h,f,_),g=this.getPixel(d,f,_);$==S$4&&($=0),g==S$4&&(g=0);var y=$;h!=d&&(y=g*(l-h)+$*(d-l));var v=this.getPixel(h,p,_),x=this.getPixel(d,p,_);v==S$4&&(v=0),x==S$4&&(x=0);var b=v;h!=d&&(b=x*(l-h)+v*(d-l));var S=b;if(f!=p)S=b*(u-f)+y*(p-u);var w=this.getPixel(h,f,m),C=this.getPixel(d,f,m);w==S$4&&(w=0),C==S$4&&(C=0);var T=w;h!=d&&(T=C*(l-h)+w*(d-l));var P=this.getPixel(h,p,m),E=this.getPixel(d,p,m);P==S$4&&(P=0),E==S$4&&(E=0);var A=P;h!=d&&(A=E*(l-h)+P*(d-l));var L=A;if(f!=p)L=A*(u-f)+T*(p-u);var M=L;if(_!=m)M=L*(c-_)+S*(m-c);return M}}}};var fe="#ifdef INSTANCED\nattribute vec2 direction;\n#endif\nattribute vec4 positionHighAndScale;\nattribute vec4 positionLowAndRotation;\nuniform vec4 u_tileRangeAndImageSize;\nattribute vec4 volTexCoord;\nvarying vec4 v_volTexCoord;\nvarying vec2 v_textureCoordinates;\nfloat getGlobeDepth(vec4 positionEC){\nvec4 posWC = czm_eyeToWindowCoordinates(positionEC);\nfloat globeDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));\nif (globeDepth == 0.0){\nreturn 0.0;\n}\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);\nreturn eyeCoordinate.z / eyeCoordinate.w;\n}\nvec4 addScreenSpaceOffset(vec4 positionEC, vec2 imageSize, float scale, vec2 direction)\n{\nvec2 halfSize = imageSize * scale * czm_resolutionScale * 0.5;\nhalfSize *= ((direction * 2.0) - 1.0);\npositionEC.xy += halfSize;\nreturn positionEC;\n}\nvoid main()\n{\nvec3 positionHigh = positionHighAndScale.xyz;\nvec3 positionLow = positionLowAndRotation.xyz;\nfloat scale = positionHighAndScale.w;\nvec2 textureCoordinates = direction;\nvec2 imageSize = u_tileRangeAndImageSize.zw;\nvec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\nvec4 positionEC = czm_modelViewRelativeToEye * p;\nfloat depthsilon = 10.0;\nfloat globeDepth = getGlobeDepth(positionEC);\nif (globeDepth != 0.0 && positionEC.z + depthsilon < globeDepth)\n{\npositionEC.xyz = vec3(0.0);\n}\nelse{\npositionEC = addScreenSpaceOffset(positionEC, imageSize, scale, direction);\n}\ngl_Position = czm_projection * positionEC;\nv_textureCoordinates = textureCoordinates;\n#ifdef LOG_DEPTH\nczm_vertexLogDepth();\n#endif\nv_volTexCoord = volTexCoord;\nvec2 halfSize = imageSize * scale * czm_resolutionScale * 0.5 / u_tileRangeAndImageSize.xy;\nhalfSize *= ((direction * 2.0) - 1.0);\nv_volTexCoord.xy += halfSize;\n}\n",ce="#extension GL_EXT_draw_buffers : enable\nuniform sampler2D u_atlas;\nuniform vec4 u_voxelGridLayerColor;\nuniform sampler2D u_colorTable;\nuniform vec4 u_minMaxValueAndFiltration;\nuniform vec3 u_maxVisibleTextureCoord;\nuniform vec3 u_minVisibleTextureCoord;\nvarying vec4 v_volTexCoord;\nvarying vec2 v_textureCoordinates;\nbool getSampleValueForVolume(float volumeValue, out vec4 colorFromColorTable)\n{\nfloat minValue = u_minMaxValueAndFiltration.x;\nfloat maxValue = u_minMaxValueAndFiltration.y;\nfloat minFiltration = u_minMaxValueAndFiltration.z;\nfloat maxFiltration = u_minMaxValueAndFiltration.w;\ncolorFromColorTable = vec4(1.0);\nfloat realValue = minValue + volumeValue * (maxValue - minValue);\nif(realValue > maxFiltration || realValue < minFiltration)\n{\nreturn false;\n}\n#ifdef HAS_COLORTABLE\ncolorFromColorTable = texture2D(u_colorTable, vec2(0.0, 1.0 - realValue)).rgba;\n#endif\nreturn true;\n}\nvoid main()\n{\nvec4 color = texture2D(u_atlas, v_textureCoordinates);\ncolor = czm_gammaCorrect(color);\nif (color.a < 0.005)\n{\ndiscard;\n}\n#ifdef TEXTURECOORD_CLIP\nif(v_volTexCoord.x > u_maxVisibleTextureCoord.x || v_volTexCoord.x < u_minVisibleTextureCoord.x\n|| v_volTexCoord.y > u_maxVisibleTextureCoord.y || v_volTexCoord.y < u_minVisibleTextureCoord.y\n|| v_volTexCoord.z > u_maxVisibleTextureCoord.z || v_volTexCoord.z < u_minVisibleTextureCoord.z)\n{\ndiscard;\n}\n#endif\nvec4 volumeColor = vec4(1.0);\nfloat noValue;\nfloat volumeValue = czm_getVolumeValue(v_volTexCoord.xyz, noValue);\nvec4 colorFromColorTable = vec4(1.0);\nif(!getSampleValueForVolume(volumeValue, colorFromColorTable))\n{\ndiscard;\n}\n#ifdef HAS_COLORTABLE\nvolumeColor = colorFromColorTable;\n#else\nfloat power = volumeValue * 40.0 - 30.0;\nvec3 hdrColor = u_voxelGridLayerColor.rgb * pow(2.0, power);\nvolumeColor.rgb = hdrColor;\n#endif\ncolor.rgb *= volumeColor.rgb;\nczm_writeLogDepth();\n#ifdef OIT\nvec3 Ci = color.rgb * color.a;\nfloat ai = color.a;\nfloat wzi = czm_alphaWeight(ai);\ngl_FragData[0] = vec4(Ci * wzi, ai);\ngl_FragData[1] = vec4(ai * wzi);\n#else\ngl_FragColor = color;\n#endif\n}\n",ve=s$1a.POSITION_INDEX,ee$1=s$1a.NUMBER_OF_PROPERTIES,v$4,xe$1={positionHighAndScale:0,positionLowAndRotation:1,volTexCoord:3},Ae={direction:0,positionHighAndScale:1,positionLowAndRotation:2,volTexCoord:3},F$1;function p$3(e){e=e$1Y(e,e$1Y.EMPTY_OBJECT),this._scene=e.scene,this._batchTable=e.batchTable,this._textureAtlas=void 0,this._textureAtlasGUID=void 0,this._destroyTextureAtlas=!0,this._sp=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._vaf=void 0,this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(ee$1),this._maxScale=1,this._allSizedInMeters=!0,this._baseVolume=new c$19,this._baseVolumeWC=new c$19,this._baseVolume2D=new c$19,this._boundingVolume=new c$19,this._boundingVolumeDirty=!1,this._colorCommands=[],this.modelMatrix=c$1a.clone(e$1Y(e.modelMatrix,c$1a.IDENTITY)),this._modelMatrix=c$1a.clone(c$1a.IDENTITY),this.debugShowBoundingVolume=e$1Y(e.debugShowBoundingVolume,!1),this.volumeShaderPredefine=e$1Y(e.volumeShaderPredefine,[]),this._volumeShaderPredefine=void 0,this._mode=b$1d.SCENE3D,this._highlightColor=e$1z.clone(e$1z.WHITE);var t=this;this._uniforms={u_atlas:function(){return t._textureAtlas.texture}};var i=this._scene;t$$(i)&&t$$(i.terrainProviderChanged)&&(this._removeCallbackFunc=i.terrainProviderChanged.addEventListener((function(){for(var e=this._billboards,t=e.length,i=0;i<t;++i)e[i]._updateClamping()}),this)),this.transparent=e$1Y(e.OIT,!0),this._transparent=void 0,this._postRender=e.postRender}function te(e){for(var t=e.length,i=0;i<t;++i)e[i]&&e[i]._destroy()}function z$2(e){if(e._billboardsRemoved){e._billboardsRemoved=!1;for(var t=[],i=e._billboards,n=i.length,r=0,o=0;r<n;++r){var a=i[r];a&&(a._index=o++,t.push(a))}e._billboards=t}}function ye(e){var t=e.cache.billboardCollection_indexBufferBatched;if(t$$(t))return t;for(var i=new Uint16Array(98298),n=0,r=0;n<98298;n+=6,r+=4)i[n]=r,i[n+1]=r+1,i[n+2]=r+2,i[n+3]=r+0,i[n+4]=r+2,i[n+5]=r+3;return(t=u$Y.createIndexBuffer({context:e,typedArray:i,usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT})).vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferBatched=t,t}function Te(e){var t=e.cache.billboardCollection_indexBufferInstanced;return t$$(t)||((t=u$Y.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:A$13.STATIC_DRAW,indexDatatype:fe$u.UNSIGNED_SHORT})).vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferInstanced=t),t}function ge(e){var t=e.cache.billboardCollection_vertexBufferInstanced;return t$$(t)||((t=u$Y.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:A$13.STATIC_DRAW})).vertexArrayDestroyable=!1,e.cache.billboardCollection_vertexBufferInstanced=t),t}function Ce(e,t,i,n){var r=[{index:v$4.positionHighAndScale,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,usage:A$13.STATIC_DRAW},{index:v$4.positionLowAndRotation,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,usage:A$13.STATIC_DRAW},{index:v$4.volTexCoord,componentsPerAttribute:4,componentDatatype:C$12.FLOAT,usage:A$13.STATIC_DRAW}];return i&&r.push({index:v$4.direction,componentsPerAttribute:2,componentDatatype:C$12.FLOAT,vertexBuffer:ge(e)}),t$$(n)&&r.push({index:v$4.a_batchId,componentsPerAttribute:1,componentDatatyps:C$12.FLOAT,bufferUsage:A$13.STATIC_DRAW}),new u$D(e,r,i?t:4*t,i)}Object.defineProperties(p$3.prototype,{length:{get:function(){return z$2(this),this._billboards.length}},textureAtlas:{get:function(){return this._textureAtlas},set:function(e){this._textureAtlas!==e&&(this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._textureAtlas=e,this._createVertexArray=!0)}},destroyTextureAtlas:{get:function(){return this._destroyTextureAtlas},set:function(e){this._destroyTextureAtlas=e}}}),p$3.prototype.add=function(e){var t=new s$1a(e,this);return t._index=this._billboards.length,this._billboards.push(t),this._createVertexArray=!0,t},p$3.prototype.remove=function(e){return!!this.contains(e)&&(this._billboards[e._index]=null,this._billboardsRemoved=!0,this._createVertexArray=!0,e._destroy(),!0)},p$3.prototype.removeAll=function(){te(this._billboards),this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!0},p$3.prototype._updateBillboard=function(e,t){e._dirty||(this._billboardsToUpdate[this._billboardsToUpdateIndex++]=e),++this._propertiesChanged[t]},p$3.prototype.contains=function(e){return t$$(e)&&e._billboardCollection===this},p$3.prototype.get=function(e){if(!t$$(e))throw new t$_("index is required.");return z$2(this),this._billboards[e]};var H$1=new t$R;function re(e,t,i,n,r){var o,a=n[v$4.positionHighAndScale],s=n[v$4.positionLowAndRotation],l=r._getActualPosition();e._mode===b$1d.SCENE3D&&(c$19.expand(e._baseVolume,l,e._baseVolume),e._boundingVolumeDirty=!0),t$R.fromCartesian(l,H$1);var u=r.scale,c=r.rotation;0!==c&&(e._shaderRotation=!0),e._maxScale=Math.max(e._maxScale,u);var h=H$1.high,d=H$1.low;e._instanced?(a(o=r._index,h.x,h.y,h.z,u),s(o,d.x,d.y,d.z,c)):(a((o=4*r._index)+0,h.x,h.y,h.z,u),a(o+1,h.x,h.y,h.z,u),a(o+2,h.x,h.y,h.z,u),a(o+3,h.x,h.y,h.z,u),s(o+0,d.x,d.y,d.z,c),s(o+1,d.x,d.y,d.z,c),s(o+2,d.x,d.y,d.z,c),s(o+3,d.x,d.y,d.z,c))}function Se(e,t,i,n,r){var o,a=n[v$4.volTexCoord],s=0,l=0,u=0;t$$(r._volTexCoord)&&(s=r._volTexCoord.x,l=r._volTexCoord.y,u=r._volTexCoord.z),e._instanced?a(o=r._index,s,l,u,0):(a((o=4*r._index)+0,s,l,u,0),a(o+1,s,l,u,0),a(o+2,s,l,u,0),a(o+3,s,l,u,0))}function De$1(e,t,i,n,r){re(e,t,i,n,r),Se(e,t,i,n,r)}function G$4(e,t,i,n,r,o){var a;n.mode===b$1d.SCENE3D?(a=e._baseVolume,e._boundingVolumeDirty=!0):a=e._baseVolume2D;for(var s=[],l=0;l<i;++l){var u=t[l],c=u.position,h=s$1a._computeActualPosition(u,c,n,r);t$$(h)&&(u._setActualPosition(h),o?s.push(h):c$19.expand(a,h,a))}o&&c$19.fromPoints(s,a)}function Ie$1(e,t){var i=t.mode,n=e._billboards,r=e._billboardsToUpdate,o=e._modelMatrix;e._createVertexArray||e._mode!==i||i!==b$1d.SCENE3D&&!c$1a.equals(o,e.modelMatrix)?(e._mode=i,c$1a.clone(e.modelMatrix,o),e._createVertexArray=!0,(i===b$1d.SCENE3D||i===b$1d.SCENE2D||i===b$1d.COLUMBUS_VIEW)&&G$4(e,n,n.length,t,o,!0)):i===b$1d.MORPHING?G$4(e,n,n.length,t,o,!0):(i===b$1d.SCENE2D||i===b$1d.COLUMBUS_VIEW)&&G$4(e,r,e._billboardsToUpdateIndex,t,o,!1)}function Ve$1(e){var t=e._volumeShaderPredefine,i=e.volumeShaderPredefine;if(!t$$(t)||t.length!==i.length)return!0;for(var n=0;n<i.length;n++)if(t[n]!=i[n])return!0;return!1}var Ee=[],Module;p$3.prototype.update=function(e){z$2(this);var t=this._billboards,i=t.length,n=e.context;this._instanced=n.instancedArrays,v$4=this._instanced?Ae:xe$1,F$1=this._instanced?Te:ye;var r=this._textureAtlas;if(!t$$(r)){r=this._textureAtlas=new _$z({context:n});for(var o=0;o<i;++o)t[o]._loadImage()}var a=r.textureCoordinates;if(0!==a.length){Ie$1(this,e),i=(t=this._billboards).length;var s=this._billboardsToUpdate,l=this._billboardsToUpdateIndex,u=this._propertiesChanged,c=r.guid,h=this._createVertexArray||this._textureAtlasGUID!==c;this._textureAtlasGUID=c;var d,f=e.passes;if(f.pick,h){this._createVertexArray=!1;for(var p=0;p<ee$1;++p)u[p]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),i>0){this._vaf=Ce(n,i,this._instanced,this._batchTable),d=this._vaf.writers;for(var _=0;_<i;++_){var m=this._billboards[_];m._dirty=!1,De$1(this,n,a,d,m)}this._vaf.commit(F$1(n))}this._billboardsToUpdateIndex=0}else if(l>0){var $=Ee;$.length=0,u[ve]&&$.push(re);var g=$.length;if(d=this._vaf.writers,l/i>.1){for(var y=0;y<l;++y){var v=s[y];v._dirty=!1;for(var x=0;x<g;++x)$[x](this,n,a,d,v)}this._vaf.commit(F$1(n))}else{for(var b=0;b<l;++b){var S=s[b];S._dirty=!1;for(var w=0;w<g;++w)$[w](this,n,a,d,S);this._instanced?this._vaf.subCommit(S._index,1):this._vaf.subCommit(4*S._index,4)}this._vaf.endSubCommits()}this._billboardsToUpdateIndex=0}if(l>1.5*i&&(s.length=i),t$$(this._vaf)&&t$$(this._vaf.va)){this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,c$19.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));var C,T=c$1a.IDENTITY;e.mode===b$1d.SCENE3D?(T=this.modelMatrix,C=c$19.clone(this._baseVolumeWC,this._boundingVolume)):C=c$19.clone(this._baseVolume2D,this._boundingVolume);var P=this._transparent!==this.transparent;this._transparent=this.transparent;var E,A,L=Ve$1(this);if(this._volumeShaderPredefine=this.volumeShaderPredefine,P&&(this._rsTranslucent=p$1a.fromCache({depthTest:{enabled:!1,func:de$x.LESS},depthMask:!this._transparent,blending:Ee$s.ALPHA_BLEND})),P||L)E=new a$O({defines:this._volumeShaderPredefine,sources:[fe]}),this._instanced&&E.defines.push("INSTANCED"),A=new a$O({defines:this._volumeShaderPredefine,sources:[ce]}),this._transparent&&A.defines.push("OIT"),this._sp=p$15.replaceCache({context:n,shaderProgram:this._sp,vertexShaderSource:E,fragmentShaderSource:A,attributeLocations:v$4});var M=e.commandList;if(f.render||f.pick){var I=this._colorCommands,O=this._vaf.va,D=O.length,R=this._uniforms;I.length=D;for(var N=0;N<D;++N){var F=I[N];t$$(F)||(F=I[N]=new s$1d),F.pass=we$l.Voxel_Billboard,F.boundingVolume=C,F.modelMatrix=T,F.count=O[N].indicesCount,F.shaderProgram=this._sp,F.uniformMap=R,F.vertexArray=O[N].va,F.renderState=this._rsTranslucent,F.debugShowBoundingVolume=this.debugShowBoundingVolume,this._instanced&&(F.count=6,F.instanceCount=i),M.push(F)}}}}},p$3.prototype.isDestroyed=function(){return!1},p$3.prototype.destroy=function(){return t$$(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._sp=this._sp&&this._sp.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),te(this._billboards),s$1e(this)},Module||(Module=(typeof Module<"u"?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1,nodeFS,nodePath;if(Module.ENVIRONMENT)if("WEB"===Module.ENVIRONMENT)ENVIRONMENT_IS_WEB=!0;else if("WORKER"===Module.ENVIRONMENT)ENVIRONMENT_IS_WORKER=!0;else if("NODE"===Module.ENVIRONMENT)ENVIRONMENT_IS_NODE=!0;else{if("SHELL"!==Module.ENVIRONMENT)throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");ENVIRONMENT_IS_SHELL=!0}else ENVIRONMENT_IS_WEB="object"==typeof window,ENVIRONMENT_IS_WORKER="function"==typeof importScripts,ENVIRONMENT_IS_NODE="object"==typeof process&&"function"==typeof require&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE)Module.print||(Module.print=console.log),Module.printErr||(Module.printErr=console.warn),Module.read=function(e,t){nodeFS||(nodeFS=require("fs")),nodePath||(nodePath=require("path")),e=nodePath.normalize(e);var i=nodeFS.readFileSync(e);return t?i:i.toString()},Module.readBinary=function(e){var t=Module.read(e,!0);return t.buffer||(t=new Uint8Array(t)),assert(t.buffer),t},Module.load=function(e){globalEval(read(e))},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program"),Module.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=Module),process.on("uncaughtException",(function(e){if(!(e instanceof ExitStatus))throw e})),Module.inspect=function(){return"[Emscripten Module object]"};else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),typeof printErr<"u"&&(Module.printErr=printErr),typeof read<"u"?Module.read=read:Module.read=function(){throw"no read() available"},Module.readBinary=function(e){if("function"==typeof readbuffer)return new Uint8Array(readbuffer(e));var t=read(e,"binary");return assert("object"==typeof t),t},typeof scriptArgs<"u"?Module.arguments=scriptArgs:typeof arguments<"u"&&(Module.arguments=arguments),"function"==typeof quit&&(Module.quit=function(e,t){quit(e)});else{if(!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER)throw"Unknown runtime environment. Where are we?";if(Module.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},ENVIRONMENT_IS_WORKER&&(Module.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),Module.readAsync=function(e,t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)},typeof arguments<"u"&&(Module.arguments=arguments),typeof console<"u")Module.print||(Module.print=function(e){console.log(e)}),Module.printErr||(Module.printErr=function(e){console.warn(e)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&typeof dump<"u"?function(e){dump(e)}:function(e){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),typeof Module.setWindowTitle>"u"&&(Module.setWindowTitle=function(e){document.title=e})}function globalEval(e){eval.call(null,e)}for(var key in!Module.load&&Module.read&&(Module.load=function(e){globalEval(Module.read(e))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram="./this.program"),Module.quit||(Module.quit=function(e,t){throw t}),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[],moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=void 0;var Runtime={setTempRet0:function(e){return tempRet0=e,e},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(e){STACKTOP=e},getNativeTypeSize:function(e){switch(e){case"i1":case"i8":return 1;case"i16":return 2;case"i32":case"float":return 4;case"i64":case"double":return 8;default:if("*"===e[e.length-1])return Runtime.QUANTUM_SIZE;if("i"===e[0]){var t=parseInt(e.substr(1));return assert(t%8==0),t/8}return 0}},getNativeFieldSize:function(e){return Math.max(Runtime.getNativeTypeSize(e),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(e,t){return"double"===t||"i64"===t?7&e&&(assert(4==(7&e)),e+=4):assert(0==(3&e)),e},getAlignSize:function(e,t,i){return i||"i64"!=e&&"double"!=e?e?Math.min(t||(e?Runtime.getNativeFieldSize(e):0),Runtime.QUANTUM_SIZE):Math.min(t,8):8},dynCall:function(e,t,i){return i&&i.length?Module["dynCall_"+e].apply(null,[t].concat(i)):Module["dynCall_"+e].call(null,t)},functionPointers:[],addFunction:function(e){for(var t=0;t<Runtime.functionPointers.length;t++)if(!Runtime.functionPointers[t])return Runtime.functionPointers[t]=e,2*(1+t);throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."},removeFunction:function(e){Runtime.functionPointers[(e-2)/2]=null},warnOnce:function(e){Runtime.warnOnce.shown||(Runtime.warnOnce.shown={}),Runtime.warnOnce.shown[e]||(Runtime.warnOnce.shown[e]=1,Module.printErr(e))},funcWrappers:{},getFuncWrapper:function(e,t){assert(t),Runtime.funcWrappers[t]||(Runtime.funcWrappers[t]={});var i=Runtime.funcWrappers[t];return i[e]||(1===t.length?i[e]=function(){return Runtime.dynCall(t,e)}:2===t.length?i[e]=function(i){return Runtime.dynCall(t,e,[i])}:i[e]=function(){return Runtime.dynCall(t,e,Array.prototype.slice.call(arguments))}),i[e]},getCompilerSetting:function(e){throw"You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work"},stackAlloc:function(e){var t=STACKTOP;return STACKTOP=(STACKTOP=STACKTOP+e|0)+15&-16,t},staticAlloc:function(e){var t=STATICTOP;return STATICTOP=(STATICTOP=STATICTOP+e|0)+15&-16,t},dynamicAlloc:function(e){var t=HEAP32[DYNAMICTOP_PTR>>2],i=-16&(t+e+15|0);if((HEAP32[DYNAMICTOP_PTR>>2]=i,i>=TOTAL_MEMORY)&&!enlargeMemory())return HEAP32[DYNAMICTOP_PTR>>2]=t,0;return t},alignMemory:function(e,t){return e=Math.ceil(e/(t||16))*(t||16)},makeBigInt:function(e,t,i){return i?+(e>>>0)+4294967296*+(t>>>0):+(e>>>0)+4294967296*+(0|t)},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var ABORT=0,cwrap,ccall;function assert(e,t){e||abort("Assertion failed: "+t)}function getCFunc(ident){var func=Module["_"+ident];if(!func)try{func=eval("_"+ident)}catch(e){}return assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)"),func}function setValue(e,t,i,n){switch("*"===(i=i||"i8").charAt(i.length-1)&&(i="i32"),i){case"i1":case"i8":HEAP8[e>>0]=t;break;case"i16":HEAP16[e>>1]=t;break;case"i32":HEAP32[e>>2]=t;break;case"i64":tempI64=[t>>>0,(tempDouble=t,+Math_abs(tempDouble)>=1?tempDouble>0?(0|Math_min(+Math_floor(tempDouble/4294967296),4294967295))>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[e>>2]=tempI64[0],HEAP32[e+4>>2]=tempI64[1];break;case"float":HEAPF32[e>>2]=t;break;case"double":HEAPF64[e>>3]=t;break;default:abort("invalid type for setValue: "+i)}}function getValue(e,t,i){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return HEAP8[e>>0];case"i16":return HEAP16[e>>1];case"i32":case"i64":return HEAP32[e>>2];case"float":return HEAPF32[e>>2];case"double":return HEAPF64[e>>3];default:abort("invalid type for setValue: "+t)}return null}(function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(e){var t=Runtime.stackAlloc(e.length);return writeArrayToMemory(e,t),t},stringToC:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);stringToUTF8(e,t=Runtime.stackAlloc(i),i)}return t}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(e,t,i,n,r){var o=getCFunc(e),a=[],s=0;if(n)for(var l=0;l<n.length;l++){var u=toC[i[l]];u?(0===s&&(s=Runtime.stackSave()),a[l]=u(n[l])):a[l]=n[l]}var c=o.apply(null,a);if("string"===t&&(c=Pointer_stringify(c)),0!==s){if(r&&r.async)return void EmterpreterAsync.asyncFinalizers.push((function(){Runtime.stackRestore(s)}));Runtime.stackRestore(s)}return c};var sourceRegex=/^function\s*[a-zA-Z$_0-9]*\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/;function parseJSFunc(e){var t=e.toString().match(sourceRegex).slice(1);return{arguments:t[0],body:t[1],returnValue:t[2]}}var JSsource=null;function ensureJSsource(){if(!JSsource)for(var e in JSsource={},JSfuncs)JSfuncs.hasOwnProperty(e)&&(JSsource[e]=parseJSFunc(JSfuncs[e]))}cwrap=function cwrap(ident,returnType,argTypes){argTypes=argTypes||[];var cfunc=getCFunc(ident),numericArgs=argTypes.every((function(e){return"number"===e})),numericRet="string"!==returnType;if(numericRet&&numericArgs)return cfunc;var argNames=argTypes.map((function(e,t){return"$"+t})),funcstr="(function("+argNames.join(",")+") {",nargs=argTypes.length;if(!numericArgs){ensureJSsource(),funcstr+="var stack = "+JSsource.stackSave.body+";";for(var i=0;i<nargs;i++){var arg=argNames[i],type=argTypes[i];if("number"!==type){var convertCode=JSsource[type+"ToC"];funcstr+="var "+convertCode.arguments+" = "+arg+";",funcstr+=convertCode.body+";",funcstr+=arg+"=("+convertCode.returnValue+");"}}}var cfuncname=parseJSFunc((function(){return cfunc})).returnValue;if(funcstr+="var ret = "+cfuncname+"("+argNames.join(",")+");",!numericRet){var strgfy=parseJSFunc((function(){return Pointer_stringify})).returnValue;funcstr+="ret = "+strgfy+"(ret);"}return numericArgs||(ensureJSsource(),funcstr+=JSsource.stackRestore.body.replace("()","(stack)")+";"),funcstr+="return ret})",eval(funcstr)}})(),Module.ccall=ccall,Module.cwrap=cwrap,Module.setValue=setValue,Module.getValue=getValue;var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_STATIC=2,ALLOC_DYNAMIC=3,ALLOC_NONE=4;function allocate(e,t,i,n){var r,o;"number"==typeof e?(r=!0,o=e):(r=!1,o=e.length);var a,s="string"==typeof t?t:null;if(a=i==ALLOC_NONE?n:["function"==typeof _malloc?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][void 0===i?ALLOC_STATIC:i](Math.max(o,s?1:t.length)),r){var l;n=a;for(assert(0==(3&a)),l=a+(-4&o);n<l;n+=4)HEAP32[n>>2]=0;for(l=a+o;n<l;)HEAP8[n++>>0]=0;return a}if("i8"===s)return e.subarray||e.slice?HEAPU8.set(e,a):HEAPU8.set(new Uint8Array(e),a),a;for(var u,c,h,d=0;d<o;){var f=e[d];("function"==typeof f&&(f=Runtime.getFunctionIndex(f)),0!==(u=s||t[d]))?("i64"==u&&(u="i32"),setValue(a+d,f,u),h!==u&&(c=Runtime.getNativeTypeSize(u),h=u),d+=c):d++}return a}function getMemory(e){return staticSealed?runtimeInitialized?_malloc(e):Runtime.dynamicAlloc(e):Runtime.staticAlloc(e)}function Pointer_stringify(e,t){if(0===t||!e)return"";for(var i,n=0,r=0;n|=i=HEAPU8[e+r>>0],(0!=i||t)&&(r++,!t||r!=t););t||(t=r);var o="";if(n<128){for(var a,s=1024;t>0;)a=String.fromCharCode.apply(String,HEAPU8.subarray(e,e+Math.min(t,s))),o=o?o+a:a,e+=s,t-=s;return o}return Module.UTF8ToString(e)}function AsciiToString(e){for(var t="";;){var i=HEAP8[e++>>0];if(!i)return t;t+=String.fromCharCode(i)}}function stringToAscii(e,t){return writeAsciiToMemory(e,t,!1)}Module.ALLOC_NORMAL=ALLOC_NORMAL,Module.ALLOC_STACK=ALLOC_STACK,Module.ALLOC_STATIC=ALLOC_STATIC,Module.ALLOC_DYNAMIC=ALLOC_DYNAMIC,Module.ALLOC_NONE=ALLOC_NONE,Module.allocate=allocate,Module.getMemory=getMemory,Module.Pointer_stringify=Pointer_stringify,Module.AsciiToString=AsciiToString,Module.stringToAscii=stringToAscii;var UTF8Decoder=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function UTF8ArrayToString(e,t){for(var i=t;e[i];)++i;if(i-t>16&&e.subarray&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(t,i));for(var n,r,o,a,s,l="";;){if(!(n=e[t++]))return l;if(128&n)if(r=63&e[t++],192!=(224&n))if(o=63&e[t++],224==(240&n)?n=(15&n)<<12|r<<6|o:(a=63&e[t++],240==(248&n)?n=(7&n)<<18|r<<12|o<<6|a:(s=63&e[t++],248==(252&n)?n=(3&n)<<24|r<<18|o<<12|a<<6|s:n=(1&n)<<30|r<<24|o<<18|a<<12|s<<6|63&e[t++])),n<65536)l+=String.fromCharCode(n);else{var u=n-65536;l+=String.fromCharCode(55296|u>>10,56320|1023&u)}else l+=String.fromCharCode((31&n)<<6|r);else l+=String.fromCharCode(n)}}function UTF8ToString(e){return UTF8ArrayToString(HEAPU8,e)}function stringToUTF8Array(e,t,i,n){if(!(n>0))return 0;for(var r=i,o=i+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(i>=o)break;t[i++]=s}else if(s<=2047){if(i+1>=o)break;t[i++]=192|s>>6,t[i++]=128|63&s}else if(s<=65535){if(i+2>=o)break;t[i++]=224|s>>12,t[i++]=128|s>>6&63,t[i++]=128|63&s}else if(s<=2097151){if(i+3>=o)break;t[i++]=240|s>>18,t[i++]=128|s>>12&63,t[i++]=128|s>>6&63,t[i++]=128|63&s}else if(s<=67108863){if(i+4>=o)break;t[i++]=248|s>>24,t[i++]=128|s>>18&63,t[i++]=128|s>>12&63,t[i++]=128|s>>6&63,t[i++]=128|63&s}else{if(i+5>=o)break;t[i++]=252|s>>30,t[i++]=128|s>>24&63,t[i++]=128|s>>18&63,t[i++]=128|s>>12&63,t[i++]=128|s>>6&63,t[i++]=128|63&s}}return t[i]=0,i-r}function stringToUTF8(e,t,i){return stringToUTF8Array(e,HEAPU8,t,i)}function lengthBytesUTF8(e){for(var t=0,i=0;i<e.length;++i){var n=e.charCodeAt(i);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++i)),n<=127?++t:t+=n<=2047?2:n<=65535?3:n<=2097151?4:n<=67108863?5:6}return t}function demangle(e){var t=Module.___cxa_demangle||Module.__cxa_demangle;if(t){try{var i=e.substr(1),n=lengthBytesUTF8(i)+1,r=_malloc(n);stringToUTF8(i,r,n);var o=_malloc(4),a=t(r,0,0,o);if(0===getValue(o,"i32")&&a)return Pointer_stringify(a)}catch{}finally{r&&_free(r),o&&_free(o),a&&_free(a)}return e}return Runtime.warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e}function demangleAll(e){return e.replace(/__Z[\w\d_]+/g,(function(e){var t=demangle(e);return e===t?e:e+" ["+t+"]"}))}function jsStackTrace(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}function stackTrace(){var e=jsStackTrace();return Module.extraStackTrace&&(e+="\n"+Module.extraStackTrace()),demangleAll(e)}Module.UTF8ArrayToString=UTF8ArrayToString,Module.UTF8ToString=UTF8ToString,Module.stringToUTF8Array=stringToUTF8Array,Module.stringToUTF8=stringToUTF8,Module.lengthBytesUTF8=lengthBytesUTF8,typeof TextDecoder<"u"&&new TextDecoder("utf-16le"),Module.stackTrace=stackTrace;var WASM_PAGE_SIZE=65536,ASMJS_PAGE_SIZE=16777216,MIN_TOTAL_MEMORY=16777216,HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR,byteLength;function alignUp(e,t){return e%t>0&&(e+=t-e%t),e}function updateGlobalBuffer(e){Module.buffer=buffer=e}function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){var e=Module.usingWasm?WASM_PAGE_SIZE:ASMJS_PAGE_SIZE,t=2147483648-e;if(HEAP32[DYNAMICTOP_PTR>>2]>t)return!1;var i=TOTAL_MEMORY;for(TOTAL_MEMORY=Math.max(TOTAL_MEMORY,MIN_TOTAL_MEMORY);TOTAL_MEMORY<HEAP32[DYNAMICTOP_PTR>>2];)TOTAL_MEMORY=TOTAL_MEMORY<=536870912?alignUp(2*TOTAL_MEMORY,e):Math.min(alignUp((3*TOTAL_MEMORY+2147483648)/4,e),t);var n=Module.reallocBuffer(TOTAL_MEMORY);return n&&n.byteLength==TOTAL_MEMORY?(updateGlobalBuffer(n),updateGlobalBufferViews(),!0):(TOTAL_MEMORY=i,!1)}STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1,Module.reallocBuffer||(Module.reallocBuffer=function(e){var t;try{if(ArrayBuffer.transfer)t=ArrayBuffer.transfer(buffer,e);else{var i=HEAP8;t=new ArrayBuffer(e),new Int8Array(t).set(i)}}catch{return!1}return!!_emscripten_replace_memory(t)&&t});try{byteLength=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get),byteLength(new ArrayBuffer(4))}catch(d){byteLength=function(e){return e.byteLength}}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||16777216;function getTotalMemory(){return TOTAL_MEMORY}if(TOTAL_MEMORY<TOTAL_STACK&&Module.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+TOTAL_MEMORY+"! (TOTAL_STACK="+TOTAL_STACK+")"),buffer=Module.buffer?Module.buffer:new ArrayBuffer(TOTAL_MEMORY),updateGlobalBufferViews(),HEAP32[0]=1668509029,HEAP16[1]=25459,115!==HEAPU8[2]||99!==HEAPU8[3])throw"Runtime error: expected the system to be little-endian!";function callRuntimeCallbacks(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?Module.dynCall_v(i):Module.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}}Module.HEAP=HEAP,Module.buffer=buffer,Module.HEAP8=HEAP8,Module.HEAP16=HEAP16,Module.HEAP32=HEAP32,Module.HEAPU8=HEAPU8,Module.HEAPU16=HEAPU16,Module.HEAPU32=HEAPU32,Module.HEAPF32=HEAPF32,Module.HEAPF64=HEAPF64;var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1;function preRun(){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__)}function postRun(){if(Module.postRun)for("function"==typeof Module.postRun&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(e){__ATPRERUN__.unshift(e)}function addOnInit(e){__ATINIT__.unshift(e)}function addOnPreMain(e){__ATMAIN__.unshift(e)}function addOnExit(e){__ATEXIT__.unshift(e)}function addOnPostRun(e){__ATPOSTRUN__.unshift(e)}function intArrayFromString(e,t,i){var n=i>0?i:lengthBytesUTF8(e)+1,r=new Array(n),o=stringToUTF8Array(e,r,0,r.length);return t&&(r.length=o),r}function intArrayToString(e){for(var t=[],i=0;i<e.length;i++){var n=e[i];n>255&&(n&=255),t.push(String.fromCharCode(n))}return t.join("")}function writeStringToMemory(e,t,i){var n,r;Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!"),i&&(r=t+lengthBytesUTF8(e),n=HEAP8[r]),stringToUTF8(e,t,1/0),i&&(HEAP8[r]=n)}function writeArrayToMemory(e,t){HEAP8.set(e,t)}function writeAsciiToMemory(e,t,i){for(var n=0;n<e.length;++n)HEAP8[t++>>0]=e.charCodeAt(n);i||(HEAP8[t>>0]=0)}Module.addOnPreRun=addOnPreRun,Module.addOnInit=addOnInit,Module.addOnPreMain=addOnPreMain,Module.addOnExit=addOnExit,Module.addOnPostRun=addOnPostRun,Module.intArrayFromString=intArrayFromString,Module.intArrayToString=intArrayToString,Module.writeStringToMemory=writeStringToMemory,Module.writeArrayToMemory=writeArrayToMemory,Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||-5!==Math.imul(4294967295,5))&&(Math.imul=function(e,t){var i=65535&e,n=65535&t;return i*n+((e>>>16)*n+i*(t>>>16)<<16)|0}),Math.imul=Math.imul,Math.clz32||(Math.clz32=function(e){e>>>=0;for(var t=0;t<32;t++)if(e&1<<31-t)return t;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_min=Math.min,runDependencies=0,dependenciesFulfilled=null;function addRunDependency(e){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}function removeRunDependency(e){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),0==runDependencies&&dependenciesFulfilled){var t=dependenciesFulfilled;dependenciesFulfilled=null,t()}}Module.addRunDependency=addRunDependency,Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={},STATIC_BASE=Runtime.GLOBAL_BASE,STATICTOP=STATIC_BASE+6192,__ATINIT__.push(),allocate([228,2,0,0,81,16,0,0,12,3,0,0,177,16,0,0,32,0,0,0,0,0,0,0,12,3,0,0,94,16,0,0,48,0,0,0,0,0,0,0,228,2,0,0,127,16,0,0,12,3,0,0,140,16,0,0,16,0,0,0,0,0,0,0,12,3,0,0,183,17,0,0,32,0,0,0,0,0,0,0,12,3,0,0,147,17,0,0,72,0,0,0,0,0,0,0,108,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,32,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,1,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,40,20,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,16,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,56,0,0,0,1,0,0,0,5,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,37,115,40,37,117,41,58,32,65,115,115,101,114,116,105,111,110,32,102,97,105,108,117,114,101,58,32,34,37,115,34,10,0,109,95,115,105,122,101,32,60,61,32,109,95,99,97,112,97,99,105,116,121,0,46,47,105,110,99,92,99,114,110,95,100,101,99,111,109,112,46,104,0,109,105,110,95,110,101,119,95,99,97,112,97,99,105,116,121,32,60,32,40,48,120,55,70,70,70,48,48,48,48,85,32,47,32,101,108,101,109,101,110,116,95,115,105,122,101,41,0,110,101,119,95,99,97,112,97,99,105,116,121,32,38,38,32,40,110,101,119,95,99,97,112,97,99,105,116,121,32,62,32,109,95,99,97,112,97,99,105,116,121,41,0,110,117,109,95,99,111,100,101,115,91,99,93,0,115,111,114,116,101,100,95,112,111,115,32,60,32,116,111,116,97,108,95,117,115,101,100,95,115,121,109,115,0,112,67,111,100,101,115,105,122,101,115,91,115,121,109,95,105,110,100,101,120,93,32,61,61,32,99,111,100,101,115,105,122,101,0,116,32,60,32,40,49,85,32,60,60,32,116,97,98,108,101,95,98,105,116,115,41,0,109,95,108,111,111,107,117,112,91,116,93,32,61,61,32,99,85,73,78,84,51,50,95,77,65,88,0,99,114,110,100,95,109,97,108,108,111,99,58,32,115,105,122,101,32,116,111,111,32,98,105,103,0,99,114,110,100,95,109,97,108,108,111,99,58,32,111,117,116,32,111,102,32,109,101,109,111,114,121,0,40,40,117,105,110,116,51,50,41,112,95,110,101,119,32,38,32,40,67,82,78,68,95,77,73,78,95,65,76,76,79,67,95,65,76,73,71,78,77,69,78,84,32,45,32,49,41,41,32,61,61,32,48,0,99,114,110,100,95,114,101,97,108,108,111,99,58,32,98,97,100,32,112,116,114,0,99,114,110,100,95,102,114,101,101,58,32,98,97,100,32,112,116,114,0,102,97,108,115,101,0,40,116,111,116,97,108,95,115,121,109,115,32,62,61,32,49,41,32,38,38,32,40,116,111,116,97,108,95,115,121,109,115,32,60,61,32,112,114,101,102,105,120,95,99,111,100,105,110,103,58,58,99,77,97,120,83,117,112,112,111,114,116,101,100,83,121,109,115,41,0,17,18,19,20,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15,16,48,0,110,117,109,95,98,105,116,115,32,60,61,32,51,50,85,0,109,95,98,105,116,95,99,111,117,110,116,32,60,61,32,99,66,105,116,66,117,102,83,105,122,101,0,116,32,33,61,32,99,85,73,78,84,51,50,95,77,65,88,0,109,111,100,101,108,46,109,95,99,111,100,101,95,115,105,122,101,115,91,115,121,109,93,32,61,61,32,108,101,110,0,0,2,3,1,0,2,3,4,5,6,7,1,40,108,101,110,32,62,61,32,49,41,32,38,38,32,40,108,101,110,32,60,61,32,99,77,97,120,69,120,112,101,99,116,101,100,67,111,100,101,83,105,122,101,41,0,105,32,60,32,109,95,115,105,122,101,0,110,101,120,116,95,108,101,118,101,108,95,111,102,115,32,62,32,99,117,114,95,108,101,118,101,108,95,111,102,115,0,1,2,2,3,3,3,3,4,0,0,0,0,0,0,1,1,0,1,0,1,0,0,1,2,1,2,0,0,0,1,0,2,1,0,2,0,0,1,2,3,110,117,109,32,38,38,32,40,110,117,109,32,61,61,32,126,110,117,109,95,99,104,101,99,107,41,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,46,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,58,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,102,111,114,101,105,103,110,32,101,120,99,101,112,116,105,111,110,0,116,101,114,109,105,110,97,116,105,110,103,0,117,110,99,97,117,103,104,116,0,83,116,57,101,120,99,101,112,116,105,111,110,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,54,95,95,115,104,105,109,95,116,121,112,101,95,105,110,102,111,69,0,83,116,57,116,121,112,101,95,105,110,102,111,0,78,49,48,95,95,99,120,120,97,98,105,118,49,50,48,95,95,115,105,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,112,116,104,114,101,97,100,95,111,110,99,101,32,102,97,105,108,117,114,101,32,105,110,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,95,102,97,115,116,40,41,0,99,97,110,110,111,116,32,99,114,101,97,116,101,32,112,116,104,114,101,97,100,32,107,101,121,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,99,97,110,110,111,116,32,122,101,114,111,32,111,117,116,32,116,104,114,101,97,100,32,118,97,108,117,101,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,116,101,114,109,105,110,97,116,101,95,104,97,110,100,108,101,114,32,117,110,101,120,112,101,99,116,101,100,108,121,32,114,101,116,117,114,110,101,100,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,57,95,95,112,111,105,110,116,101,114,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,112,98,97,115,101,95,116,121,112,101,95,105,110,102,111,69,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=STATICTOP;function _abort(){Module.abort()}function __ZSt18uncaught_exceptionv(){return!!__ZSt18uncaught_exceptionv.uncaught_exception}STATICTOP+=16;var EXCEPTIONS={last:0,caught:[],infos:{},deAdjust:function(e){if(!e||EXCEPTIONS.infos[e])return e;for(var t in EXCEPTIONS.infos){if(EXCEPTIONS.infos[t].adjusted===e)return t}return e},addRef:function(e){e&&EXCEPTIONS.infos[e].refcount++},decRef:function(e){if(e){var t=EXCEPTIONS.infos[e];assert(t.refcount>0),t.refcount--,0===t.refcount&&!t.rethrown&&(t.destructor&&Module.dynCall_vi(t.destructor,e),delete EXCEPTIONS.infos[e],___cxa_free_exception(e))}},clearRef:function(e){e&&(EXCEPTIONS.infos[e].refcount=0)}};function ___cxa_begin_catch(e){var t=EXCEPTIONS.infos[e];return t&&!t.caught&&(t.caught=!0,__ZSt18uncaught_exceptionv.uncaught_exception--),t&&(t.rethrown=!1),EXCEPTIONS.caught.push(e),EXCEPTIONS.addRef(EXCEPTIONS.deAdjust(e)),e}function _pthread_once(e,t){_pthread_once.seen||(_pthread_once.seen={}),!(e in _pthread_once.seen)&&(Module.dynCall_v(t),_pthread_once.seen[e]=1)}function _emscripten_memcpy_big(e,t,i){return HEAPU8.set(HEAPU8.subarray(t,t+i),e),e}var SYSCALLS={varargs:0,get:function(e){return SYSCALLS.varargs+=4,HEAP32[SYSCALLS.varargs-4>>2]},getStr:function(){return Pointer_stringify(SYSCALLS.get())},get64:function(){var e=SYSCALLS.get(),t=SYSCALLS.get();return assert(e>=0?0===t:-1===t),e},getZero:function(){assert(0===SYSCALLS.get())}};function ___syscall6(e,t){SYSCALLS.varargs=t;try{var i=SYSCALLS.getStreamFromFD();return FS.close(i),0}catch(e){return(typeof FS>"u"||!(e instanceof FS.ErrnoError))&&abort(e),-e.errno}}var cttz_i8=allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],"i8",ALLOC_STATIC),PTHREAD_SPECIFIC={};function _pthread_getspecific(e){return PTHREAD_SPECIFIC[e]||0}function ___setErrNo(e){return Module.___errno_location&&(HEAP32[Module.___errno_location()>>2]=e),e}var PTHREAD_SPECIFIC_NEXT_KEY=1,ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};function _pthread_key_create(e,t){return 0==e?ERRNO_CODES.EINVAL:(HEAP32[e>>2]=PTHREAD_SPECIFIC_NEXT_KEY,PTHREAD_SPECIFIC[PTHREAD_SPECIFIC_NEXT_KEY]=0,PTHREAD_SPECIFIC_NEXT_KEY++,0)}function ___resumeException(e){throw EXCEPTIONS.last||(EXCEPTIONS.last=e),e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."}function ___cxa_find_matching_catch(){var e=EXCEPTIONS.last;if(!e)return Runtime.setTempRet0(0),0;var t=EXCEPTIONS.infos[e],i=t.type;if(!i)return Runtime.setTempRet0(0),0|e;var n=Array.prototype.slice.call(arguments);Module.___cxa_is_pointer_type(i),___cxa_find_matching_catch.buffer||(___cxa_find_matching_catch.buffer=_malloc(4)),HEAP32[___cxa_find_matching_catch.buffer>>2]=e,e=___cxa_find_matching_catch.buffer;for(var r=0;r<n.length;r++)if(n[r]&&Module.___cxa_can_catch(n[r],i,e))return e=HEAP32[e>>2],t.adjusted=e,Runtime.setTempRet0(n[r]),0|e;return e=HEAP32[e>>2],Runtime.setTempRet0(i),0|e}function ___gxx_personality_v0(){}function _pthread_setspecific(e,t){return e in PTHREAD_SPECIFIC?(PTHREAD_SPECIFIC[e]=t,0):ERRNO_CODES.EINVAL}function ___syscall140(e,t){SYSCALLS.varargs=t;try{var i=SYSCALLS.getStreamFromFD(),n=(SYSCALLS.get(),SYSCALLS.get()),r=SYSCALLS.get(),o=SYSCALLS.get(),a=n;return FS.llseek(i,a,o),HEAP32[r>>2]=i.position,i.getdents&&0===a&&0===o&&(i.getdents=null),0}catch(e){return(typeof FS>"u"||!(e instanceof FS.ErrnoError))&&abort(e),-e.errno}}function ___syscall146(e,t){SYSCALLS.varargs=t;try{var i=SYSCALLS.get(),n=SYSCALLS.get(),r=SYSCALLS.get(),o=0;___syscall146.buffer||(___syscall146.buffers=[null,[],[]],___syscall146.printChar=function(e,t){var i=___syscall146.buffers[e];assert(i),0===t||10===t?((1===e?Module.print:Module.printErr)(UTF8ArrayToString(i,0)),i.length=0):i.push(t)});for(var a=0;a<r;a++){for(var s=HEAP32[n+8*a>>2],l=HEAP32[n+(8*a+4)>>2],u=0;u<l;u++)___syscall146.printChar(i,HEAPU8[s+u]);o+=l}return o}catch(e){return(typeof FS>"u"||!(e instanceof FS.ErrnoError))&&abort(e),-e.errno}}function ___syscall54(e,t){SYSCALLS.varargs=t;try{return 0}catch(e){return(typeof FS>"u"||!(e instanceof FS.ErrnoError))&&abort(e),-e.errno}}function invoke_iiii(e,t,i,n){try{return Module.dynCall_iiii(e,t,i,n)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_viiiii(e,t,i,n,r,o){try{Module.dynCall_viiiii(e,t,i,n,r,o)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_vi(e,t){try{Module.dynCall_vi(e,t)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_ii(e,t){try{return Module.dynCall_ii(e,t)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_viii(e,t,i,n){try{Module.dynCall_viii(e,t,i,n)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_v(e){try{Module.dynCall_v(e)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_viiiiii(e,t,i,n,r,o,a){try{Module.dynCall_viiiiii(e,t,i,n,r,o,a)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_viiii(e,t,i,n,r){try{Module.dynCall_viiii(e,t,i,n,r)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}__ATEXIT__.push((function(){var e=Module._fflush;e&&e(0);var t=___syscall146.printChar;if(t){var i=___syscall146.buffers;i[1].length&&t(1,10),i[2].length&&t(2,10)}})),DYNAMICTOP_PTR=allocate(1,"i32",ALLOC_STATIC),STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP),STACK_MAX=STACK_BASE+TOTAL_STACK,DYNAMIC_BASE=Runtime.alignMemory(STACK_MAX),HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE,staticSealed=!0,Module.asmGlobalArg={Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array,NaN:NaN,Infinity:1/0,byteLength:byteLength},Module.asmLibraryArg={abort:abort,assert:assert,enlargeMemory:enlargeMemory,getTotalMemory:getTotalMemory,abortOnCannotGrowMemory:abortOnCannotGrowMemory,invoke_iiii:invoke_iiii,invoke_viiiii:invoke_viiiii,invoke_vi:invoke_vi,invoke_ii:invoke_ii,invoke_viii:invoke_viii,invoke_v:invoke_v,invoke_viiiiii:invoke_viiiiii,invoke_viiii:invoke_viiii,_pthread_getspecific:_pthread_getspecific,___syscall54:___syscall54,_pthread_setspecific:_pthread_setspecific,___gxx_personality_v0:___gxx_personality_v0,___syscall6:___syscall6,___setErrNo:___setErrNo,_abort:_abort,___cxa_begin_catch:___cxa_begin_catch,_pthread_once:_pthread_once,_emscripten_memcpy_big:_emscripten_memcpy_big,_pthread_key_create:_pthread_key_create,___syscall140:___syscall140,___resumeException:___resumeException,___cxa_find_matching_catch:___cxa_find_matching_catch,___syscall146:___syscall146,__ZSt18uncaught_exceptionv:__ZSt18uncaught_exceptionv,DYNAMICTOP_PTR:DYNAMICTOP_PTR,tempDoublePtr:tempDoublePtr,ABORT:ABORT,STACKTOP:STACKTOP,STACK_MAX:STACK_MAX,cttz_i8:cttz_i8};var asm=function(e,t,i){var n=e.Int8Array,r=new n(i),o=e.Int16Array,a=new o(i),s=e.Int32Array,l=new s(i),u=e.Uint8Array,c=new u(i),h=e.Uint16Array,d=new h(i),f=e.Uint32Array;new f(i);var p=e.Float32Array;new p(i);var _=e.Float64Array,m=new _(i),$=e.byteLength,g=0|t.DYNAMICTOP_PTR,y=0|t.tempDoublePtr;t.ABORT;var v=0|t.STACKTOP;t.STACK_MAX;var x=0|t.cttz_i8;e.NaN,e.Infinity;var b=0;e.Math.floor,e.Math.abs,e.Math.sqrt,e.Math.pow,e.Math.cos,e.Math.sin,e.Math.tan,e.Math.acos,e.Math.asin,e.Math.atan,e.Math.atan2,e.Math.exp,e.Math.log,e.Math.ceil;var S=e.Math.imul;e.Math.min,e.Math.max;var w=e.Math.clz32,C=t.abort;t.assert;var T=t.enlargeMemory,P=t.getTotalMemory,E=t.abortOnCannotGrowMemory;t.invoke_iiii,t.invoke_viiiii,t.invoke_vi,t.invoke_ii,t.invoke_viii,t.invoke_v,t.invoke_viiiiii,t.invoke_viiii;var A=t._pthread_getspecific,L=t.___syscall54,M=t._pthread_setspecific;t.___gxx_personality_v0;var I=t.___syscall6,O=t.___setErrNo,D=t._abort;t.___cxa_begin_catch;var R=t._pthread_once,N=t._emscripten_memcpy_big,F=t._pthread_key_create,B=t.___syscall140;t.___resumeException,t.___cxa_find_matching_catch;var z=t.___syscall146;function G(e){e|=0;var t,i=0,n=0,r=0,o=0,a=0,s=0,u=0,c=0,h=0,d=0,f=0,p=0,_=0,m=0,$=0,g=0,y=0,x=0,b=0,S=0;t=v,v=v+16|0,p=t;do{if(e>>>0<245){if(e=(h=e>>>0<11?16:e+11&-8)>>>3,3&(n=(f=0|l[1144])>>>e)|0)return r=0|l[(n=(e=4616+((i=(1&n^1)+e|0)<<1<<2)|0)+8|0)>>2],(0|e)==(0|(a=0|l[(o=r+8|0)>>2]))?l[1144]=f&~(1<<i):(l[a+12>>2]=e,l[n>>2]=a),S=i<<3,l[r+4>>2]=3|S,l[(S=r+S+4|0)>>2]=1|l[S>>2],v=t,0|(S=o);if(h>>>0>(d=0|l[1146])>>>0){if(0|n)return i=((i=n<<e&((i=2<<e)|0-i))&0-i)-1|0,o=0|l[(e=(i=4616+((r=((n=(i>>>=s=i>>>12&16)>>>5&8)|s|(o=(i>>>=n)>>>2&4)|(e=(i>>>=o)>>>1&2)|(r=(i>>>=e)>>>1&1))+(i>>>r)|0)<<1<<2)|0)+8|0)>>2],(0|i)==(0|(n=0|l[(s=o+8|0)>>2]))?(e=f&~(1<<r),l[1144]=e):(l[n+12>>2]=i,l[e>>2]=n,e=f),a=(r<<3)-h|0,l[o+4>>2]=3|h,l[(r=o+h|0)+4>>2]=1|a,l[r+a>>2]=a,0|d&&(o=0|l[1149],n=4616+((i=d>>>3)<<1<<2)|0,e&(i=1<<i)?i=0|l[(e=n+8|0)>>2]:(l[1144]=e|i,i=n,e=n+8|0),l[e>>2]=o,l[i+12>>2]=o,l[o+8>>2]=i,l[o+12>>2]=n),l[1146]=a,l[1149]=r,v=t,0|(S=s);if(u=0|l[1145]){if(n=(u&0-u)-1|0,e=0|l[4880+(((a=(n>>>=s=n>>>12&16)>>>5&8)|s|(c=(n>>>=a)>>>2&4)|(r=(n>>>=c)>>>1&2)|(e=(n>>>=r)>>>1&1))+(n>>>e)<<2)>>2],n=(-8&l[e+4>>2])-h|0,r=0|l[e+16+((0==(0|l[e+16>>2])&1)<<2)>>2]){do{n=(c=(s=(-8&l[r+4>>2])-h|0)>>>0<n>>>0)?s:n,e=c?r:e,r=0|l[r+16+((0==(0|l[r+16>>2])&1)<<2)>>2]}while(0!=(0|r));c=e,a=n}else c=e,a=n;if(c>>>0<(s=c+h|0)>>>0){o=0|l[c+24>>2],i=0|l[c+12>>2];do{if((0|i)==(0|c)){if(!(i=0|l[(e=c+20|0)>>2])&&!(i=0|l[(e=c+16|0)>>2])){n=0;break}for(;;)if(0|(r=0|l[(n=i+20|0)>>2]))i=r,e=n;else{if(!(r=0|l[(n=i+16|0)>>2]))break;i=r,e=n}l[e>>2]=0,n=i}else n=0|l[c+8>>2],l[n+12>>2]=i,l[i+8>>2]=n,n=i}while(0);do{if(0|o){if(i=0|l[c+28>>2],(0|c)==(0|l[(e=4880+(i<<2)|0)>>2])){if(l[e>>2]=n,!n){l[1145]=u&~(1<<i);break}}else if(l[o+16+(((0|l[o+16>>2])!=(0|c)&1)<<2)>>2]=n,!n)break;l[n+24>>2]=o,0|(i=0|l[c+16>>2])&&(l[n+16>>2]=i,l[i+24>>2]=n),0|(i=0|l[c+20>>2])&&(l[n+20>>2]=i,l[i+24>>2]=n)}}while(0);return a>>>0<16?(S=a+h|0,l[c+4>>2]=3|S,l[(S=c+S+4|0)>>2]=1|l[S>>2]):(l[c+4>>2]=3|h,l[s+4>>2]=1|a,l[s+a>>2]=a,0|d&&(r=0|l[1149],n=4616+((i=d>>>3)<<1<<2)|0,f&(i=1<<i)?i=0|l[(e=n+8|0)>>2]:(l[1144]=f|i,i=n,e=n+8|0),l[e>>2]=r,l[i+12>>2]=r,l[r+8>>2]=i,l[r+12>>2]=n),l[1146]=a,l[1149]=s),v=t,0|(S=c+8|0)}f=h}else f=h}else f=h}else if(e>>>0<=4294967231)if(h=-8&(e=e+11|0),c=0|l[1145]){r=0-h|0,(e>>>=8)?h>>>0>16777215?u=31:u=h>>>((u=14-((d=((b=e<<(f=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|f|(u=((b<<=d)+245760|0)>>>16&2))+(b<<u>>>15)|0)+7|0)&1|u<<1:u=0,n=0|l[4880+(u<<2)>>2];e:do{if(n)for(e=0,s=h<<(31==(0|u)?0:25-(u>>>1)|0),a=0;;){if((o=(-8&l[n+4>>2])-h|0)>>>0<r>>>0){if(!o){e=n,r=0,o=n,b=61;break e}e=n,r=o}if(a=0==(0|(o=0|l[n+20>>2]))|(0|o)==(0|(n=0|l[n+16+(s>>>31<<2)>>2]))?a:o,o=0==(0|n)){n=a,b=57;break}s<<=1&(1^o)}else n=0,e=0,b=57}while(0);if(57==(0|b)){if(0==(0|n)&0==(0|e)){if(!(e=c&((e=2<<u)|0-e))){f=h;break}f=(e&0-e)-1|0,e=0,n=0|l[4880+(((a=(f>>>=s=f>>>12&16)>>>5&8)|s|(u=(f>>>=a)>>>2&4)|(d=(f>>>=u)>>>1&2)|(n=(f>>>=d)>>>1&1))+(f>>>n)<<2)>>2]}n?(o=n,b=61):(u=e,s=r)}if(61==(0|b))for(;;){if(b=0,n=(f=(n=(-8&l[o+4>>2])-h|0)>>>0<r>>>0)?n:r,e=f?o:e,!(o=0|l[o+16+((0==(0|l[o+16>>2])&1)<<2)>>2])){u=e,s=n;break}r=n,b=61}if(0!=(0|u)&&s>>>0<((0|l[1146])-h|0)>>>0){if(u>>>0>=(a=u+h|0)>>>0)return v=t,0|(S=0);o=0|l[u+24>>2],i=0|l[u+12>>2];do{if((0|i)==(0|u)){if(!(i=0|l[(e=u+20|0)>>2])&&!(i=0|l[(e=u+16|0)>>2])){i=0;break}for(;;)if(0|(r=0|l[(n=i+20|0)>>2]))i=r,e=n;else{if(!(r=0|l[(n=i+16|0)>>2]))break;i=r,e=n}l[e>>2]=0}else S=0|l[u+8>>2],l[S+12>>2]=i,l[i+8>>2]=S}while(0);do{if(o){if(e=0|l[u+28>>2],(0|u)==(0|l[(n=4880+(e<<2)|0)>>2])){if(l[n>>2]=i,!i){r=c&~(1<<e),l[1145]=r;break}}else if(l[o+16+(((0|l[o+16>>2])!=(0|u)&1)<<2)>>2]=i,!i){r=c;break}l[i+24>>2]=o,0|(e=0|l[u+16>>2])&&(l[i+16>>2]=e,l[e+24>>2]=i),(e=0|l[u+20>>2])&&(l[i+20>>2]=e,l[e+24>>2]=i),r=c}else r=c}while(0);do{if(s>>>0>=16){if(l[u+4>>2]=3|h,l[a+4>>2]=1|s,l[a+s>>2]=s,i=s>>>3,s>>>0<256){n=4616+(i<<1<<2)|0,(e=0|l[1144])&(i=1<<i)?i=0|l[(e=n+8|0)>>2]:(l[1144]=e|i,i=n,e=n+8|0),l[e>>2]=a,l[i+12>>2]=a,l[a+8>>2]=i,l[a+12>>2]=n;break}if((i=s>>>8)?s>>>0>16777215?i=31:i=s>>>((i=14-((x=((S=i<<(b=(i+1048320|0)>>>16&8))+520192|0)>>>16&4)|b|(i=((S<<=x)+245760|0)>>>16&2))+(S<<i>>>15)|0)+7|0)&1|i<<1:i=0,n=4880+(i<<2)|0,l[a+28>>2]=i,l[(e=a+16|0)+4>>2]=0,l[e>>2]=0,!(r&(e=1<<i))){l[1145]=r|e,l[n>>2]=a,l[a+24>>2]=n,l[a+12>>2]=a,l[a+8>>2]=a;break}for(e=s<<(31==(0|i)?0:25-(i>>>1)|0),n=0|l[n>>2];;){if((-8&l[n+4>>2]|0)==(0|s)){b=97;break}if(!(i=0|l[(r=n+16+(e>>>31<<2)|0)>>2])){b=96;break}e<<=1,n=i}if(96==(0|b)){l[r>>2]=a,l[a+24>>2]=n,l[a+12>>2]=a,l[a+8>>2]=a;break}if(97==(0|b)){S=0|l[(b=n+8|0)>>2],l[S+12>>2]=a,l[b>>2]=a,l[a+8>>2]=S,l[a+12>>2]=n,l[a+24>>2]=0;break}}else S=s+h|0,l[u+4>>2]=3|S,l[(S=u+S+4|0)>>2]=1|l[S>>2]}while(0);return v=t,0|(S=u+8|0)}f=h}else f=h;else f=-1}while(0);if((n=0|l[1146])>>>0>=f>>>0)return i=n-f|0,e=0|l[1149],i>>>0>15?(S=e+f|0,l[1149]=S,l[1146]=i,l[S+4>>2]=1|i,l[S+i>>2]=i,l[e+4>>2]=3|f):(l[1146]=0,l[1149]=0,l[e+4>>2]=3|n,l[(S=e+n+4|0)>>2]=1|l[S>>2]),v=t,0|(S=e+8|0);if((s=0|l[1147])>>>0>f>>>0)return x=s-f|0,l[1147]=x,b=(S=0|l[1150])+f|0,l[1150]=b,l[b+4>>2]=1|x,l[S+4>>2]=3|f,v=t,0|(S=S+8|0);if(0|l[1262]?e=0|l[1264]:(l[1264]=4096,l[1263]=4096,l[1265]=-1,l[1266]=-1,l[1267]=0,l[1255]=0,e=-16&p^1431655768,l[p>>2]=e,l[1262]=e,e=4096),u=f+48|0,(h=(a=e+(c=f+47|0)|0)&(o=0-e|0))>>>0<=f>>>0||0|(e=0|l[1254])&&(p=(d=0|l[1252])+h|0)>>>0<=d>>>0|p>>>0>e>>>0)return v=t,0|(S=0);e:do{if(4&l[1255])i=0,b=133;else{n=0|l[1150];t:do{if(n){for(r=5024;!((e=0|l[r>>2])>>>0<=n>>>0&&($=r+4|0,(e+(0|l[$>>2])|0)>>>0>n>>>0));){if(!(e=0|l[r+8>>2])){b=118;break t}r=e}if((i=a-s&o)>>>0<2147483647)if((0|(e=0|Ce(0|i)))==((0|l[r>>2])+(0|l[$>>2])|0)){if(-1!=(0|e)){s=i,a=e,b=135;break e}}else r=e,b=126;else i=0}else b=118}while(0);do{if(118==(0|b))if(-1!=(0|(n=0|Ce(0)))&&(i=n,m=(i=(0==((m=(_=0|l[1263])+-1|0)&i|0)?0:(m+i&0-_)-i|0)+h|0)+(_=0|l[1252])|0,i>>>0>f>>>0&i>>>0<2147483647)){if(0|($=0|l[1254])&&m>>>0<=_>>>0|m>>>0>$>>>0){i=0;break}if((0|(e=0|Ce(0|i)))==(0|n)){s=i,a=n,b=135;break e}r=e,b=126}else i=0}while(0);do{if(126==(0|b)){if(n=0-i|0,!(u>>>0>i>>>0&i>>>0<2147483647&-1!=(0|r))){if(-1==(0|r)){i=0;break}s=i,a=r,b=135;break e}if((e=c-i+(e=0|l[1264])&0-e)>>>0>=2147483647){s=i,a=r,b=135;break e}if(-1==(0|Ce(0|e))){Ce(0|n),i=0;break}s=e+i|0,a=r,b=135;break e}}while(0);l[1255]=4|l[1255],b=133}}while(0);if(133==(0|b)&&h>>>0<2147483647&&!(-1==(0|(x=0|Ce(0|h)))|1^(y=(g=($=0|Ce(0))-x|0)>>>0>(f+40|0)>>>0)|x>>>0<$>>>0&-1!=(0|x)&-1!=(0|$)^1)&&(s=y?g:i,a=x,b=135),135==(0|b)){i=(0|l[1252])+s|0,l[1252]=i,i>>>0>(0|l[1253])>>>0&&(l[1253]=i),c=0|l[1150];do{if(c){for(i=5024;;){if((0|a)==((e=0|l[i>>2])+(r=0|l[(n=i+4|0)>>2])|0)){b=145;break}if(!(o=0|l[i+8>>2]))break;i=o}if(145==(0|b)&&0==(8&l[i+12>>2]|0)&&c>>>0<a>>>0&c>>>0>=e>>>0){l[n>>2]=r+s,b=c+(S=0==(7&(S=c+8|0)|0)?0:0-S&7)|0,S=(0|l[1147])+(s-S)|0,l[1150]=b,l[1147]=S,l[b+4>>2]=1|S,l[b+S+4>>2]=40,l[1151]=l[1266];break}for(a>>>0<(0|l[1148])>>>0&&(l[1148]=a),n=a+s|0,i=5024;;){if((0|l[i>>2])==(0|n)){b=153;break}if(!(e=0|l[i+8>>2]))break;i=e}if(153==(0|b)&&0==(8&l[i+12>>2]|0)){l[i>>2]=a,l[(d=i+4|0)>>2]=(0|l[d>>2])+s,h=(d=a+(0==(7&(d=a+8|0)|0)?0:0-d&7)|0)+f|0,u=(i=n+(0==(7&(i=n+8|0)|0)?0:0-i&7)|0)-d-f|0,l[d+4>>2]=3|f;do{if((0|i)!=(0|c)){if((0|i)==(0|l[1149])){S=(0|l[1146])+u|0,l[1146]=S,l[1149]=h,l[h+4>>2]=1|S,l[h+S>>2]=S;break}if(1==(3&(e=0|l[i+4>>2])|0)){s=-8&e,r=e>>>3;e:do{if(e>>>0<256){if(e=0|l[i+8>>2],(0|(n=0|l[i+12>>2]))==(0|e)){l[1144]=l[1144]&~(1<<r);break}l[e+12>>2]=n,l[n+8>>2]=e;break}a=0|l[i+24>>2],e=0|l[i+12>>2];do{if((0|e)==(0|i)){if(!(e=0|l[(n=(r=i+16|0)+4|0)>>2])){if(!(e=0|l[r>>2])){e=0;break}n=r}for(;;)if(0|(o=0|l[(r=e+20|0)>>2]))e=o,n=r;else{if(!(o=0|l[(r=e+16|0)>>2]))break;e=o,n=r}l[n>>2]=0}else S=0|l[i+8>>2],l[S+12>>2]=e,l[e+8>>2]=S}while(0);if(!a)break;r=4880+((n=0|l[i+28>>2])<<2)|0;do{if((0|i)==(0|l[r>>2])){if(l[r>>2]=e,0|e)break;l[1145]=l[1145]&~(1<<n);break e}if(l[a+16+(((0|l[a+16>>2])!=(0|i)&1)<<2)>>2]=e,!e)break e}while(0);if(l[e+24>>2]=a,0|(r=0|l[(n=i+16|0)>>2])&&(l[e+16>>2]=r,l[r+24>>2]=e),!(n=0|l[n+4>>2]))break;l[e+20>>2]=n,l[n+24>>2]=e}while(0);i=i+s|0,o=s+u|0}else o=u;if(l[(i=i+4|0)>>2]=-2&l[i>>2],l[h+4>>2]=1|o,l[h+o>>2]=o,i=o>>>3,o>>>0<256){n=4616+(i<<1<<2)|0,(e=0|l[1144])&(i=1<<i)?i=0|l[(e=n+8|0)>>2]:(l[1144]=e|i,i=n,e=n+8|0),l[e>>2]=h,l[i+12>>2]=h,l[h+8>>2]=i,l[h+12>>2]=n;break}i=o>>>8;do{if(i){if(o>>>0>16777215){i=31;break}i=o>>>((i=14-((x=((S=i<<(b=(i+1048320|0)>>>16&8))+520192|0)>>>16&4)|b|(i=((S<<=x)+245760|0)>>>16&2))+(S<<i>>>15)|0)+7|0)&1|i<<1}else i=0}while(0);if(r=4880+(i<<2)|0,l[h+28>>2]=i,l[(e=h+16|0)+4>>2]=0,l[e>>2]=0,!((e=0|l[1145])&(n=1<<i))){l[1145]=e|n,l[r>>2]=h,l[h+24>>2]=r,l[h+12>>2]=h,l[h+8>>2]=h;break}for(e=o<<(31==(0|i)?0:25-(i>>>1)|0),n=0|l[r>>2];;){if((-8&l[n+4>>2]|0)==(0|o)){b=194;break}if(!(i=0|l[(r=n+16+(e>>>31<<2)|0)>>2])){b=193;break}e<<=1,n=i}if(193==(0|b)){l[r>>2]=h,l[h+24>>2]=n,l[h+12>>2]=h,l[h+8>>2]=h;break}if(194==(0|b)){S=0|l[(b=n+8|0)>>2],l[S+12>>2]=h,l[b>>2]=h,l[h+8>>2]=S,l[h+12>>2]=n,l[h+24>>2]=0;break}}else S=(0|l[1147])+u|0,l[1147]=S,l[1150]=h,l[h+4>>2]=1|S}while(0);return v=t,0|(S=d+8|0)}for(i=5024;!((e=0|l[i>>2])>>>0<=c>>>0&&(S=e+(0|l[i+4>>2])|0,S>>>0>c>>>0));)i=0|l[i+8>>2];i=(e=(e=(o=S+-47|0)+(0==(7&(e=o+8|0)|0)?0:0-e&7)|0)>>>0<(o=c+16|0)>>>0?c:e)+8|0,b=a+(n=0==(7&(n=a+8|0)|0)?0:0-n&7)|0,n=s+-40-n|0,l[1150]=b,l[1147]=n,l[b+4>>2]=1|n,l[b+n+4>>2]=40,l[1151]=l[1266],l[(n=e+4|0)>>2]=27,l[i>>2]=l[1256],l[i+4>>2]=l[1257],l[i+8>>2]=l[1258],l[i+12>>2]=l[1259],l[1256]=a,l[1257]=s,l[1259]=0,l[1258]=i,i=e+24|0;do{b=i,l[(i=i+4|0)>>2]=7}while((b+8|0)>>>0<S>>>0);if((0|e)!=(0|c)){if(a=e-c|0,l[n>>2]=-2&l[n>>2],l[c+4>>2]=1|a,l[e>>2]=a,i=a>>>3,a>>>0<256){n=4616+(i<<1<<2)|0,(e=0|l[1144])&(i=1<<i)?i=0|l[(e=n+8|0)>>2]:(l[1144]=e|i,i=n,e=n+8|0),l[e>>2]=c,l[i+12>>2]=c,l[c+8>>2]=i,l[c+12>>2]=n;break}if((i=a>>>8)?a>>>0>16777215?n=31:n=a>>>((n=14-((x=((S=i<<(b=(i+1048320|0)>>>16&8))+520192|0)>>>16&4)|b|(n=((S<<=x)+245760|0)>>>16&2))+(S<<n>>>15)|0)+7|0)&1|n<<1:n=0,r=4880+(n<<2)|0,l[c+28>>2]=n,l[c+20>>2]=0,l[o>>2]=0,!((i=0|l[1145])&(e=1<<n))){l[1145]=i|e,l[r>>2]=c,l[c+24>>2]=r,l[c+12>>2]=c,l[c+8>>2]=c;break}for(e=a<<(31==(0|n)?0:25-(n>>>1)|0),n=0|l[r>>2];;){if((-8&l[n+4>>2]|0)==(0|a)){b=216;break}if(!(i=0|l[(r=n+16+(e>>>31<<2)|0)>>2])){b=215;break}e<<=1,n=i}if(215==(0|b)){l[r>>2]=c,l[c+24>>2]=n,l[c+12>>2]=c,l[c+8>>2]=c;break}if(216==(0|b)){S=0|l[(b=n+8|0)>>2],l[S+12>>2]=c,l[b>>2]=c,l[c+8>>2]=S,l[c+12>>2]=n,l[c+24>>2]=0;break}}}else{0==(0|(S=0|l[1148]))|a>>>0<S>>>0&&(l[1148]=a),l[1256]=a,l[1257]=s,l[1259]=0,l[1153]=l[1262],l[1152]=-1,i=0;do{l[(S=4616+(i<<1<<2)|0)+12>>2]=S,l[S+8>>2]=S,i=i+1|0}while(32!=(0|i));b=a+(S=0==(7&(S=a+8|0)|0)?0:0-S&7)|0,S=s+-40-S|0,l[1150]=b,l[1147]=S,l[b+4>>2]=1|S,l[b+S+4>>2]=40,l[1151]=l[1266]}}while(0);if((i=0|l[1147])>>>0>f>>>0)return x=i-f|0,l[1147]=x,b=(S=0|l[1150])+f|0,l[1150]=b,l[b+4>>2]=1|x,l[S+4>>2]=3|f,v=t,0|(S=S+8|0)}return S=0|tt(),l[S>>2]=12,v=t,0|(S=0)}function k(e,t,i,n,o,a){e|=0,t=+t,i|=0,n|=0,o|=0,a|=0;var s,u=0,h=0,d=0,f=0,p=0,_=0,m=0,$=0,g=0,y=0,x=0,w=0,C=0,T=0,P=0,E=0,A=0,L=0,M=0,I=0,O=0,D=0;s=v,v=v+560|0,d=s+8|0,O=D=s+524|0,f=s+512|0,l[(x=s)>>2]=0,I=f+12|0,Be(t),(0|b)<0?(t=-t,L=1,A=2087):(L=0!=(2049&o|0)&1,A=0==(2048&o|0)?0==(1&o|0)?2088:2093:2090),Be(t),M=2146435072&b;do{if(M>>>0<2146435072|2146435072==(0|M)&!1){if((u=0!=($=2*+et(t,x)))&&(l[x>>2]=(0|l[x>>2])-1),97==(0|(C=32|a))){m=0==(0|(g=32&a))?A:A+9|0,_=2|L,u=12-n|0;do{if(!(n>>>0>11|0==(0|u))){t=8;do{u=u+-1|0,t*=16}while(0!=(0|u));if(45==(0|r[m>>0])){t=-(t+(-$-t));break}t=$+t-t;break}t=$}while(0);(0|(u=0|ge(u=(0|(h=0|l[x>>2]))<0?0-h|0:h,((0|u)<0)<<31>>31,I)))==(0|I)&&(r[(u=f+11|0)>>0]=48),r[u+-1>>0]=43+(h>>31&2),r[(p=u+-2|0)>>0]=a+15,f=(0|n)<1,d=0==(8&o|0),u=D;do{M=~~t,h=u+1|0,r[u>>0]=c[2122+M>>0]|g,t=16*(t-+(0|M)),1!=(h-O|0)||d&f&0==t?u=h:(r[h>>0]=46,u=u+2|0)}while(0!=t);M=u-O|0,be(e,32,i,u=(O=I-p|0)+_+(I=0!=(0|n)&(M+-2|0)<(0|n)?n+2|0:M)|0,o),Ue(e,m,_),be(e,48,i,u,65536^o),Ue(e,D,M),be(e,48,I-M|0,0,0),Ue(e,p,O),be(e,32,i,u,8192^o);break}h=(0|n)<0?6:n,u?(u=(0|l[x>>2])-28|0,l[x>>2]=u,t=268435456*$):(t=$,u=0|l[x>>2]),d=M=(0|u)<0?d:d+288|0;do{P=~~t>>>0,l[d>>2]=P,d=d+4|0,t=1e9*(t-+(P>>>0))}while(0!=t);if((0|u)>0)for(f=M,_=d;;){if(p=(0|u)<29?u:29,(u=_+-4|0)>>>0>=f>>>0){d=0;do{w=0|Me(0|(T=0|ze(0|(T=0|De(0|l[u>>2],0,0|p)),0|b,0|d,0)),0|(P=b),1e9,0),l[u>>2]=w,d=0|je(0|T,0|P,1e9,0),u=u+-4|0}while(u>>>0>=f>>>0);d&&(l[(f=f+-4|0)>>2]=d)}for(d=_;!(d>>>0<=f>>>0||(u=d+-4|0,0|l[u>>2]));)d=u;if(u=(0|l[x>>2])-p|0,l[x>>2]=u,!((0|u)>0))break;_=d}else f=M;if((0|u)<0){n=1+((h+25|0)/9|0)|0,y=102==(0|C);do{if(g=(0|(g=0-u|0))<9?g:9,f>>>0<d>>>0){p=(1<<g)-1|0,_=1e9>>>g,m=0,u=f;do{P=0|l[u>>2],l[u>>2]=(P>>>g)+m,m=0|S(P&p,_),u=u+4|0}while(u>>>0<d>>>0);u=0==(0|l[f>>2])?f+4|0:f,m?(l[d>>2]=m,f=u,u=d+4|0):(f=u,u=d)}else f=0==(0|l[f>>2])?f+4|0:f,u=d;d=(u-(d=y?M:f)>>2|0)>(0|n)?d+(n<<2)|0:u,u=(0|l[x>>2])+g|0,l[x>>2]=u}while((0|u)<0);u=f,n=d}else u=f,n=d;if(P=M,u>>>0<n>>>0){if(d=9*(P-u>>2)|0,(p=0|l[u>>2])>>>0>=10){f=10;do{f=10*f|0,d=d+1|0}while(p>>>0>=f>>>0)}}else d=0;if((0|(f=h-(102!=(0|C)?d:0)+(((w=0!=(0|h))&(y=103==(0|C)))<<31>>31)|0))<((9*(n-P>>2)|0)-9|0)){if(g=M+4+(((0|(f=f+9216|0))/9|0)-1024<<2)|0,(0|(f=1+((0|f)%9|0)|0))<9){p=10;do{p=10*p|0,f=f+1|0}while(9!=(0|f))}else p=10;if((f=(g+4|0)==(0|n))&0==(0|(m=((_=0|l[g>>2])>>>0)%(p>>>0)|0)))f=g;else if($=0==(1&((_>>>0)/(p>>>0)|0)|0)?9007199254740992:9007199254740994,t=m>>>0<(T=(0|p)/2|0)>>>0?.5:f&(0|m)==(0|T)?1:1.5,L&&(t=(T=45==(0|r[A>>0]))?-t:t,$=T?-$:$),f=_-m|0,l[g>>2]=f,$+t!=$){if(T=f+p|0,l[g>>2]=T,T>>>0>999999999)for(d=g;f=d+-4|0,l[d>>2]=0,f>>>0<u>>>0&&(l[(u=u+-4|0)>>2]=0),T=1+(0|l[f>>2])|0,l[f>>2]=T,T>>>0>999999999;)d=f;else f=g;if(d=9*(P-u>>2)|0,(_=0|l[u>>2])>>>0>=10){p=10;do{p=10*p|0,d=d+1|0}while(_>>>0>=p>>>0)}}else f=g;f=n>>>0>(f=f+4|0)>>>0?f:n,T=u}else f=n,T=u;for(C=f;;){if(C>>>0<=T>>>0){x=0;break}if(0|l[(u=C+-4|0)>>2]){x=1;break}C=u}n=0-d|0;do{if(y){if((0|(u=(1&(1^w))+h|0))>(0|d)&(0|d)>-5?(p=a+-1|0,h=u+-1-d|0):(p=a+-2|0,h=u+-1|0),!(u=8&o)){if(x&&0!=(0|(E=0|l[C+-4>>2])))if((E>>>0)%10|0)f=0;else{f=0,u=10;do{u=10*u|0,f=f+1|0}while(!(0|(E>>>0)%(u>>>0)))}else f=9;if(u=(9*(C-P>>2)|0)-9|0,102==(32|p)){h=(0|h)<(0|(g=(0|(g=u-f|0))>0?g:0))?h:g,g=0;break}h=(0|h)<(0|(g=(0|(g=u+d-f|0))>0?g:0))?h:g,g=0;break}g=u}else p=a,g=8&o}while(0);if(_=0!=(0|(y=h|g))&1,m=102==(32|p))w=0,u=(0|d)>0?d:0;else{if(((f=I)-(u=0|ge(u=(0|d)<0?n:d,((0|u)<0)<<31>>31,I))|0)<2)do{r[(u=u+-1|0)>>0]=48}while((f-u|0)<2);r[u+-1>>0]=43+(d>>31&2),r[(u=u+-2|0)>>0]=p,w=u,u=f-u|0}if(be(e,32,i,u=L+1+h+_+u|0,o),Ue(e,A,L),be(e,48,i,u,65536^o),m){_=g=D+9|0,m=D+8|0,f=p=T>>>0>M>>>0?M:T;do{if(d=0|ge(0|l[f>>2],0,g),(0|f)==(0|p))(0|d)==(0|g)&&(r[m>>0]=48,d=m);else if(d>>>0>D>>>0){de(0|D,48,d-O|0);do{d=d+-1|0}while(d>>>0>D>>>0)}Ue(e,d,_-d|0),f=f+4|0}while(f>>>0<=M>>>0);if(0|y&&Ue(e,2138,1),f>>>0<C>>>0&(0|h)>0)for(;;){if((d=0|ge(0|l[f>>2],0,g))>>>0>D>>>0){de(0|D,48,d-O|0);do{d=d+-1|0}while(d>>>0>D>>>0)}if(Ue(e,d,(0|h)<9?h:9),d=h+-9|0,!((f=f+4|0)>>>0<C>>>0&(0|h)>9)){h=d;break}h=d}be(e,48,h+9|0,9,0)}else{if(y=x?C:T+4|0,(0|h)>-1){g=0==(0|g),n=x=D+9|0,_=0-O|0,m=D+8|0,p=T;do{(0|(d=0|ge(0|l[p>>2],0,x)))==(0|x)&&(r[m>>0]=48,d=m);do{if((0|p)==(0|T)){if(f=d+1|0,Ue(e,d,1),g&(0|h)<1){d=f;break}Ue(e,2138,1),d=f}else{if(d>>>0<=D>>>0)break;de(0|D,48,d+_|0);do{d=d+-1|0}while(d>>>0>D>>>0)}}while(0);Ue(e,d,(0|h)>(0|(O=n-d|0))?O:h),h=h-O|0,p=p+4|0}while(p>>>0<y>>>0&(0|h)>-1)}be(e,48,h+18|0,18,0),Ue(e,w,I-w|0)}be(e,32,i,u,8192^o)}else D=0!=(32&a|0),be(e,32,i,u=L+3|0,-65537&o),Ue(e,A,L),Ue(e,t!=t|!1?D?2114:2118:D?2106:2110,3),be(e,32,i,u,8192^o)}while(0);return v=s,0|((0|u)<(0|i)?i:u)}function U(e,t,i,n,o){e|=0,t|=0,i|=0,n|=0,o|=0;var s,u,c,h,d,f,p,_,$,g=0,y=0,x=0,S=0,w=0,C=0,T=0,P=0,E=0,A=0,L=0,M=0,I=0,O=0;$=v,v=v+64|0,f=$,O=$+24|0,p=$+8|0,_=$+20|0,l[(d=$+16|0)>>2]=t,s=0!=(0|e),c=u=O+40|0,O=O+39|0,h=p+4|0,y=0,g=0,C=0;e:for(;;){do{if((0|g)>-1){if((0|y)>(2147483647-g|0)){g=0|tt(),l[g>>2]=75,g=-1;break}g=y+g|0;break}}while(0);if(!((y=0|r[t>>0])<<24>>24)){I=87;break}x=t;t:for(;;){switch(y<<24>>24){case 37:y=x,I=9;break t;case 0:y=x;break t}M=x+1|0,l[d>>2]=M,y=0|r[M>>0],x=M}t:do{if(9==(0|I))for(;;){if(I=0,37!=(0|r[x+1>>0]))break t;if(y=y+1|0,x=x+2|0,l[d>>2]=x,37!=(0|r[x>>0]))break;I=9}}while(0);if(y=y-t|0,s&&Ue(e,t,y),0|y)t=x;else{(y=(0|r[(S=x+1|0)>>0])-48|0)>>>0<10?(L=(M=36==(0|r[x+2>>0]))?y:-1,C=M?1:C,S=M?x+3|0:S):L=-1,l[d>>2]=S,x=((y=0|r[S>>0])<<24>>24)-32|0;t:do{if(x>>>0<32)for(w=0,T=y;;){if(!(75913&(y=1<<x))){y=T;break t}if(w|=y,S=S+1|0,l[d>>2]=S,(x=((y=0|r[S>>0])<<24>>24)-32|0)>>>0>=32)break;T=y}else w=0}while(0);if(y<<24>>24==42){if((y=(0|r[(x=S+1|0)>>0])-48|0)>>>0<10&&36==(0|r[S+2>>0]))l[o+(y<<2)>>2]=10,y=0|l[n+((0|r[x>>0])-48<<3)>>2],C=1,S=S+3|0;else{if(0|C){g=-1;break}s?(C=3+(0|l[i>>2])&-4,y=0|l[C>>2],l[i>>2]=C+4,C=0,S=x):(y=0,C=0,S=x)}l[d>>2]=S,y=(M=(0|y)<0)?0-y|0:y,w=M?8192|w:w}else{if((0|(y=0|Te(d)))<0){g=-1;break}S=0|l[d>>2]}do{if(46==(0|r[S>>0])){if(42!=(0|r[S+1>>0])){l[d>>2]=S+1,x=0|Te(d),S=0|l[d>>2];break}if((x=(0|r[(T=S+2|0)>>0])-48|0)>>>0<10&&36==(0|r[S+3>>0])){l[o+(x<<2)>>2]=10,x=0|l[n+((0|r[T>>0])-48<<3)>>2],S=S+4|0,l[d>>2]=S;break}if(0|C){g=-1;break e}s?(M=3+(0|l[i>>2])&-4,x=0|l[M>>2],l[i>>2]=M+4):x=0,l[d>>2]=T,S=T}else x=-1}while(0);for(A=0;;){if(((0|r[S>>0])-65|0)>>>0>57){g=-1;break e}if(M=S+1|0,l[d>>2]=M,!(((P=255&(T=0|r[(0|r[S>>0])-65+(1606+(58*A|0))>>0]))+-1|0)>>>0<8))break;A=P,S=M}if(!(T<<24>>24)){g=-1;break}E=(0|L)>-1;do{if(T<<24>>24==19){if(E){g=-1;break e}I=49}else{if(E){l[o+(L<<2)>>2]=P,L=0|l[(E=n+(L<<3)|0)+4>>2],l[(I=f)>>2]=l[E>>2],l[I+4>>2]=L,I=49;break}if(!s){g=0;break e}K(f,P,i)}}while(0);if(49!=(0|I)||(I=0,s)){S=0!=(0|A)&3==(15&(S=0|r[S>>0])|0)?-33&S:S,E=-65537&w,L=0==(8192&w|0)?w:E;t:do{switch(0|S){case 110:switch((255&A)<<24>>24){case 0:case 1:case 6:l[l[f>>2]>>2]=g,y=0,t=M;continue e;case 2:case 7:y=0|l[f>>2],l[y>>2]=g,l[y+4>>2]=((0|g)<0)<<31>>31,y=0,t=M;continue e;case 3:a[l[f>>2]>>1]=g,y=0,t=M;continue e;case 4:r[l[f>>2]>>0]=g,y=0,t=M;continue e;default:y=0,t=M;continue e}case 112:S=120,x=x>>>0>8?x:8,t=8|L,I=61;break;case 88:case 120:t=L,I=61;break;case 111:w=0,T=2070,x=0==(8&L|0)|(0|x)>(0|(E=c-(P=0|Le(t=0|l[(S=f)>>2],S=0|l[S+4>>2],u))|0))?x:E+1|0,E=L,I=67;break;case 105:case 100:if(t=0|l[(S=f)>>2],(0|(S=0|l[S+4>>2]))<0){t=0|Fe(0,0,0|t,0|S),S=b,l[(w=f)>>2]=t,l[w+4>>2]=S,w=1,T=2070,I=66;break t}w=0!=(2049&L|0)&1,T=0==(2048&L|0)?0==(1&L|0)?2070:2072:2071,I=66;break t;case 117:w=0,T=2070,t=0|l[(S=f)>>2],S=0|l[S+4>>2],I=66;break;case 99:r[O>>0]=l[f>>2],t=O,w=0,T=2070,P=u,S=1,x=E;break;case 109:S=0|tt(),S=0|Ve(0|l[S>>2]),I=71;break;case 115:S=0|(S=0|l[f>>2])?S:2080,I=71;break;case 67:l[p>>2]=l[f>>2],l[h>>2]=0,l[f>>2]=p,P=-1,S=p,I=75;break;case 83:t=0|l[f>>2],x?(P=x,S=t,I=75):(be(e,32,y,0,L),t=0,I=84);break;case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:y=0|k(e,+m[f>>3],y,x,L,S),t=M;continue e;default:w=0,T=2070,P=u,S=x,x=L}}while(0);t:do{if(61==(0|I))L=f,A=0|l[L>>2],L=0|l[L+4>>2],P=0|Pe(A,L,u,32&S),T=0==(8&t|0)|0==(0|A)&0==(0|L),w=T?0:2,T=T?2070:2070+(S>>4)|0,E=t,t=A,S=L,I=67;else if(66==(0|I))P=0|ge(t,S,u),E=L,I=67;else if(71==(0|I))I=0,L=0|se(S,0,x),A=0==(0|L),t=S,w=0,T=2070,P=A?S+x|0:L,S=A?x:L-S|0,x=E;else if(75==(0|I)){for(I=0,T=S,t=0,x=0;(w=0|l[T>>2])&&!((0|(x=0|We(_,w)))<0|x>>>0>(P-t|0)>>>0)&&P>>>0>(t=x+t|0)>>>0;)T=T+4|0;if((0|x)<0){g=-1;break e}if(be(e,32,y,t,L),t)for(w=0;;){if(!(x=0|l[S>>2])){I=84;break t}if((0|(w=(x=0|We(_,x))+w|0))>(0|t)){I=84;break t}if(Ue(e,_,x),w>>>0>=t>>>0){I=84;break}S=S+4|0}else t=0,I=84}}while(0);if(67==(0|I))I=0,L=0!=(0|x)|(S=0!=(0|t)|0!=(0|S)),S=c-P+(1&(1^S))|0,t=L?P:u,P=u,S=L?(0|x)>(0|S)?x:S:x,x=(0|x)>-1?-65537&E:E;else if(84==(0|I)){I=0,be(e,32,y,t,8192^L),y=(0|y)>(0|t)?y:t,t=M;continue}be(e,32,y=(0|y)<(0|(L=(E=(0|S)<(0|(A=P-t|0))?A:S)+w|0))?L:y,L,x),Ue(e,T,w),be(e,48,y,L,65536^x),be(e,48,E,A,0),Ue(e,t,A),be(e,32,y,L,8192^x),t=M}else y=0,t=M}}e:do{if(87==(0|I)&&!e)if(C){for(g=1;t=0|l[o+(g<<2)>>2];)if(K(n+(g<<3)|0,t,i),(0|(g=g+1|0))>=10){g=1;break e}for(;;){if(0|l[o+(g<<2)>>2]){g=-1;break e}if((0|(g=g+1|0))>=10){g=1;break}}}else g=0}while(0);return v=$,0|g}function V(e,t){t|=0;var i,n,o,a,s,u,h,d,f,p,_,m,$,g,y,x=0,b=0,S=0,w=0,C=0,T=0,P=0,E=0,A=0,L=0;if(y=v,v=v+704|0,$=y+144|0,m=y+128|0,_=y+112|0,p=y+96|0,f=y+80|0,d=y+64|0,h=y+48|0,g=y+32|0,i=y+16|0,T=y,o=y+184|0,L=y+160|0,a=0|function(e,t){e|=0;var i=0,n=0,r=0,o=0,a=0,s=0,u=0,h=0;if(h=v,v=v+528|0,a=h,o=h+16|0,!(t|=0))return v=h,0|(u=0);if(t>>>0<=16)return u=0|ae(e,t),v=h,0|u;if(s=0|ae(e,t+-16|0),(0|(t=0|l[(u=e+20|0)>>2]))<16){n=e+4|0,r=e+8|0,i=e+16|0;do{(0|(e=0|l[n>>2]))==(0|l[r>>2])?e=0:(l[n>>2]=e+1,e=0|c[e>>0]),t=t+8|0,l[u>>2]=t,(0|t)>=33&&(l[a>>2]=866,l[a+4>>2]=3208,l[a+8>>2]=1366,Oe(o,812,a),xe(o),t=0|l[u>>2]),e=e<<32-t|l[i>>2],l[i>>2]=e}while((0|t)<16)}else i=e=e+16|0,e=0|l[e>>2];return l[i>>2]=e<<16,l[u>>2]=t+-16,v=h,0|(u=e>>>16|s<<16)}(e|=0,14),!a)return function(e){var t=0,i=0,n=0,o=0,a=0,s=0;if(s=v,v=v+544|0,a=s+16|0,n=s,o=s+32|0,l[(e|=0)>>2]=0,0|(i=0|l[(t=e+4|0)>>2])&&(7&i?(l[n>>2]=866,l[n+4>>2]=2506,l[n+8>>2]=1232,Oe(o,812,n),xe(o)):_e(i,0,0,1,0),l[t>>2]=0,l[e+8>>2]=0,l[e+12>>2]=0),r[e+16>>0]=0,!(t=0|l[(e=e+20|0)>>2]))return void(v=s);re(t),7&t?(l[a>>2]=866,l[a+4>>2]=2506,l[a+8>>2]=1232,Oe(o,812,a),xe(o)):_e(t,0,0,1,0),l[e>>2]=0,v=s}(t),v=y,0|(L=1);if(s=t+4|0,(0|(x=0|l[(u=t+8|0)>>2]))!=(0|a)){if(x>>>0<=a>>>0){do{if((0|l[t+12>>2])>>>0<a>>>0){if(0|Z(s,a,(x+1|0)==(0|a),1,0)){x=0|l[u>>2];break}return r[t+16>>0]=1,v=y,0|(L=0)}}while(0);de((0|l[s>>2])+x|0,0,a-x|0)}l[u>>2]=a}if(de(0|l[s>>2],0,0|a),(0|(x=0|l[(n=e+20|0)>>2]))<5){w=e+4|0,C=e+8|0,S=e+16|0;do{(0|(b=0|l[w>>2]))==(0|l[C>>2])?b=0:(l[w>>2]=b+1,b=0|c[b>>0]),x=x+8|0,l[n>>2]=x,(0|x)>=33&&(l[T>>2]=866,l[T+4>>2]=3208,l[T+8>>2]=1366,Oe(o,812,T),xe(o),x=0|l[n>>2]),b=b<<32-x|l[S>>2],l[S>>2]=b}while((0|x)<5)}else S=b=e+16|0,b=0|l[b>>2];if(E=b>>>27,l[S>>2]=b<<5,l[n>>2]=x+-5,(E+-1|0)>>>0>20)return v=y,0|(L=0);l[L+20>>2]=0,l[L>>2]=0,l[L+4>>2]=0,l[L+8>>2]=0,l[L+12>>2]=0,r[L+16>>0]=0,x=L+4|0,b=L+8|0;e:do{if(0|Z(x,21,0,1,0)){w=0|l[b>>2],de((P=0|l[x>>2])+w|0,0,21-w|0),l[b>>2]=21,w=e+4|0,C=e+8|0,T=e+16|0,S=0;do{if((0|(x=0|l[n>>2]))<3)do{(0|(b=0|l[w>>2]))==(0|l[C>>2])?b=0:(l[w>>2]=b+1,b=0|c[b>>0]),x=x+8|0,l[n>>2]=x,(0|x)>=33&&(l[i>>2]=866,l[i+4>>2]=3208,l[i+8>>2]=1366,Oe(o,812,i),xe(o),x=0|l[n>>2]),b=b<<32-x|l[T>>2],l[T>>2]=b}while((0|x)<3);else b=0|l[T>>2];l[T>>2]=b<<3,l[n>>2]=x+-3,r[P+(0|c[1327+S>>0])>>0]=b>>>29,S=S+1|0}while((0|S)!=(0|E));if(0|ne(L)){T=e+4|0,P=e+8|0,E=e+16|0,x=0;t:do{C=a-x|0,S=0|q(e,L);i:do{if(S>>>0<17)(0|l[u>>2])>>>0<=x>>>0&&(l[g>>2]=866,l[g+4>>2]=910,l[g+8>>2]=1497,Oe(o,812,g),xe(o)),r[(0|l[s>>2])+x>>0]=S,x=x+1|0;else switch(0|S){case 17:if((0|(b=0|l[n>>2]))<3)do{(0|(S=0|l[T>>2]))==(0|l[P>>2])?S=0:(l[T>>2]=S+1,S=0|c[S>>0]),b=b+8|0,l[n>>2]=b,(0|b)>=33&&(l[h>>2]=866,l[h+4>>2]=3208,l[h+8>>2]=1366,Oe(o,812,h),xe(o),b=0|l[n>>2]),S=S<<32-b|l[E>>2],l[E>>2]=S}while((0|b)<3);else S=0|l[E>>2];if(l[E>>2]=S<<3,l[n>>2]=b+-3,b=(S=3+(S>>>29)|0)>>>0>C>>>0){x=0;break e}x=(b?0:S)+x|0;break i;case 18:if((0|(b=0|l[n>>2]))<7)do{(0|(S=0|l[T>>2]))==(0|l[P>>2])?S=0:(l[T>>2]=S+1,S=0|c[S>>0]),b=b+8|0,l[n>>2]=b,(0|b)>=33&&(l[d>>2]=866,l[d+4>>2]=3208,l[d+8>>2]=1366,Oe(o,812,d),xe(o),b=0|l[n>>2]),S=S<<32-b|l[E>>2],l[E>>2]=S}while((0|b)<7);else S=0|l[E>>2];if(l[E>>2]=S<<7,l[n>>2]=b+-7,b=(S=11+(S>>>25)|0)>>>0>C>>>0){x=0;break e}x=(b?0:S)+x|0;break i;default:if((S+-19|0)>>>0>=2){A=81;break t}if(b=0|l[n>>2],19==(0|S)){if((0|b)<2)for(S=b;(0|(b=0|l[T>>2]))==(0|l[P>>2])?w=0:(l[T>>2]=b+1,w=0|c[b>>0]),b=S+8|0,l[n>>2]=b,(0|b)>=33&&(l[f>>2]=866,l[f+4>>2]=3208,l[f+8>>2]=1366,Oe(o,812,f),xe(o),b=0|l[n>>2]),S=w<<32-b|l[E>>2],l[E>>2]=S,(0|b)<2;)S=b;else S=0|l[E>>2];l[E>>2]=S<<2,S>>>=30,w=3,b=b+-2|0}else{if((0|b)<6)do{(0|(S=0|l[T>>2]))==(0|l[P>>2])?S=0:(l[T>>2]=S+1,S=0|c[S>>0]),b=b+8|0,l[n>>2]=b,(0|b)>=33&&(l[p>>2]=866,l[p+4>>2]=3208,l[p+8>>2]=1366,Oe(o,812,p),xe(o),b=0|l[n>>2]),S=S<<32-b|l[E>>2],l[E>>2]=S}while((0|b)<6);else S=0|l[E>>2];l[E>>2]=S<<6,S>>>=26,w=7,b=b+-6|0}if(l[n>>2]=b,0==(0|x)|(S=S+w|0)>>>0>C>>>0){x=0;break e}if(b=x+-1|0,(0|l[u>>2])>>>0<=b>>>0&&(l[_>>2]=866,l[_+4>>2]=910,l[_+8>>2]=1497,Oe(o,812,_),xe(o)),!((w=0|r[(0|l[s>>2])+b>>0])<<24>>24)){x=0;break e}if(x>>>0>=(b=S+x|0)>>>0)break i;do{(0|l[u>>2])>>>0<=x>>>0&&(l[m>>2]=866,l[m+4>>2]=910,l[m+8>>2]=1497,Oe(o,812,m),xe(o)),r[(0|l[s>>2])+x>>0]=w,x=x+1|0}while((0|x)!=(0|b));x=b}}while(0)}while(a>>>0>x>>>0);if(81==(0|A)){l[$>>2]=866,l[$+4>>2]=3149,l[$+8>>2]=1348,Oe(o,812,$),xe(o),x=0;break}x=(0|a)==(0|x)?0|ne(t):0}else x=0}else r[L+16>>0]=1,x=0}while(0);return ce(L),v=y,0|(L=x)}function W(e,t,i,n){i|=0;var o,s,u,h,f,p,_=0,m=0,$=0,g=0,y=0,x=0,b=0,S=0,w=0,C=0,T=0,P=0,E=0,A=0,L=0,M=0,I=0,O=0,D=0,R=0,N=0,F=0;if(p=v,v=v+880|0,N=p+144|0,f=p+128|0,h=p+112|0,u=p+96|0,D=p+80|0,A=p+64|0,P=p+48|0,E=p+32|0,S=p+16|0,b=p,o=p+360|0,s=p+296|0,F=p+224|0,T=p+156|0,0==(0|(t|=0))|(n|=0)>>>0>11)return v=p,0|(F=0);l[(e|=0)>>2]=t,m=(_=F)+68|0;do{l[_>>2]=0,_=_+4|0}while((0|_)<(0|m));_=0;do{m=F+((255&(R=0|r[i+_>>0]))<<2)|0,R<<24>>24&&(l[m>>2]=1+(0|l[m>>2])),_=_+1|0}while((0|_)!=(0|t));for(m=0,$=0,g=0,y=-1,x=1;(_=0|l[F+(x<<2)>>2])?(l[s+((w=x+-1|0)<<2)>>2]=m,m=_+m|0,R=16-x|0,l[e+28+(w<<2)>>2]=1+(m+-1<<R|(1<<R)-1),l[e+96+(w<<2)>>2]=$,l[T+(x<<2)>>2]=$,w=_+$|0,g=g>>>0>x>>>0?g:x,y=y>>>0<x>>>0?y:x):(l[e+28+(x+-1<<2)>>2]=0,w=$),17!=(0|(x=x+1|0));)m<<=1,$=w;l[e+4>>2]=w,m=e+172|0;do{if(w>>>0>(0|l[m>>2])>>>0){(_=w+-1|0)&w?(_|=_>>>16,_|=_>>>8,_|=_>>>4,_=(_=1+((_|=_>>>2)>>>1|_)|0)>>>0>t>>>0?t:_):_=w,l[m>>2]=_,_=0|l[($=e+176|0)>>2];do{if(0|_){if(R=0|l[_+-4>>2],_=_+-8|0,0!=(0|R)&&(0|R)==(0|~l[_>>2])||(l[b>>2]=866,l[b+4>>2]=651,l[b+8>>2]=1579,Oe(o,812,b),xe(o)),7&_){l[S>>2]=866,l[S+4>>2]=2506,l[S+8>>2]=1232,Oe(o,812,S),xe(o);break}_e(_,0,0,1,0);break}}while(0);if(m=0|he(8+((_=0|(_=0|l[m>>2])?_:1)<<1)|0,0)){l[m+4>>2]=_,l[m>>2]=~_,l[$>>2]=m+8,C=24;break}l[$>>2]=0,n=0;break}C=24}while(0);e:do{if(24==(0|C)){r[(R=e+24|0)>>0]=y,r[e+25>>0]=g,$=e+176|0,m=0;do{_=255&(O=0|r[i+m>>0]),O<<24>>24&&(0|l[F+(_<<2)>>2]||(l[E>>2]=866,l[E+4>>2]=2276,l[E+8>>2]=977,Oe(o,812,E),xe(o)),_=0|l[(O=T+(_<<2)|0)>>2],l[O>>2]=_+1,_>>>0>=w>>>0&&(l[P>>2]=866,l[P+4>>2]=2280,l[P+8>>2]=990,Oe(o,812,P),xe(o)),a[(0|l[$>>2])+(_<<1)>>1]=m),m=m+1|0}while((0|m)!=(0|t));if(I=(0|c[R>>0])>>>0<n>>>0?n:0,l[(O=e+8|0)>>2]=I,M=0!=(0|I)){L=1<<I,_=e+164|0;do{if(L>>>0>(0|l[_>>2])>>>0){l[_>>2]=L,_=0|l[($=e+168|0)>>2];do{if(0|_){if(E=0|l[_+-4>>2],_=_+-8|0,0!=(0|E)&&(0|E)==(0|~l[_>>2])||(l[A>>2]=866,l[A+4>>2]=651,l[A+8>>2]=1579,Oe(o,812,A),xe(o)),7&_){l[D>>2]=866,l[D+4>>2]=2506,l[D+8>>2]=1232,Oe(o,812,D),xe(o);break}_e(_,0,0,1,0);break}}while(0);if(m=0|he((_=L<<2)+8|0,0)){D=m+8|0,l[m+4>>2]=L,l[m>>2]=~L,l[$>>2]=D,m=D;break}l[$>>2]=0,n=0;break e}_=L<<2,$=m=e+168|0,m=0|l[m>>2]}while(0);de(0|m,-1,0|_),P=e+176|0,T=1;do{if(0|l[F+(T<<2)>>2]&&(A=1<<(E=I-T|0),m=0|l[s+((_=T+-1|0)<<2)>>2],_>>>0>=16&&(l[u>>2]=866,l[u+4>>2]=1960,l[u+8>>2]=1453,Oe(o,812,u),xe(o)),m>>>0<=(t=0==(0|(t=0|l[e+28+(_<<2)>>2]))?-1:(t+-1|0)>>>(16-T|0))>>>0)){w=(0|l[e+96+(_<<2)>>2])-m|0,C=T<<16;do{_=0|d[(0|l[P>>2])+(w+m<<1)>>1],(0|c[i+_>>0])!=(0|T)&&(l[h>>2]=866,l[h+4>>2]=2322,l[h+8>>2]=1019,Oe(o,812,h),xe(o)),S=m<<E,x=_|C,y=0;do{(b=y+S|0)>>>0>=L>>>0&&(l[f>>2]=866,l[f+4>>2]=2328,l[f+8>>2]=1053,Oe(o,812,f),xe(o)),_=0|l[$>>2],-1!=(0|l[_+(b<<2)>>2])&&(l[N>>2]=866,l[N+4>>2]=2330,l[N+8>>2]=1076,Oe(o,812,N),xe(o),_=0|l[$>>2]),l[_+(b<<2)>>2]=x,y=y+1|0}while(y>>>0<A>>>0);m=m+1|0}while(m>>>0<=t>>>0)}T=T+1|0}while(I>>>0>=T>>>0)}l[(_=e+96|0)>>2]=(0|l[_>>2])-(0|l[s>>2]),l[(_=e+100|0)>>2]=(0|l[_>>2])-(0|l[s+4>>2]),l[(_=e+104|0)>>2]=(0|l[_>>2])-(0|l[s+8>>2]),l[(_=e+108|0)>>2]=(0|l[_>>2])-(0|l[s+12>>2]),l[(_=e+112|0)>>2]=(0|l[_>>2])-(0|l[s+16>>2]),l[(_=e+116|0)>>2]=(0|l[_>>2])-(0|l[s+20>>2]),l[(_=e+120|0)>>2]=(0|l[_>>2])-(0|l[s+24>>2]),l[(_=e+124|0)>>2]=(0|l[_>>2])-(0|l[s+28>>2]),l[(_=e+128|0)>>2]=(0|l[_>>2])-(0|l[s+32>>2]),l[(_=e+132|0)>>2]=(0|l[_>>2])-(0|l[s+36>>2]),l[(_=e+136|0)>>2]=(0|l[_>>2])-(0|l[s+40>>2]),l[(_=e+140|0)>>2]=(0|l[_>>2])-(0|l[s+44>>2]),l[(_=e+144|0)>>2]=(0|l[_>>2])-(0|l[s+48>>2]),l[(_=e+148|0)>>2]=(0|l[_>>2])-(0|l[s+52>>2]),l[(_=e+152|0)>>2]=(0|l[_>>2])-(0|l[s+56>>2]),l[(_=e+156|0)>>2]=(0|l[_>>2])-(0|l[s+60>>2]),l[(_=e+16|0)>>2]=0,l[(m=e+20|0)>>2]=c[R>>0];t:do{if(M){do{if(!n)break t;N=n,n=n+-1|0}while(!(0|l[F+(N<<2)>>2]));if(l[_>>2]=l[e+28+(n<<2)>>2],n=I+1|0,l[m>>2]=n,n>>>0<=g>>>0){for(;!(0|l[F+(n<<2)>>2]);)if((n=n+1|0)>>>0>g>>>0)break t;l[m>>2]=n}}}while(0);l[e+92>>2]=-1,l[e+160>>2]=1048575,l[e+12>>2]=32-(0|l[O>>2]),n=1}}while(0);return v=p,0|(F=n)}function H(e){var t=0,i=0,n=0,r=0,o=0,a=0,s=0,u=0;if(e|=0){i=e+-8|0,r=0|l[1148],u=i+(t=-8&(e=0|l[e+-4>>2]))|0;do{if(1&e)s=i,a=i;else{if(n=0|l[i>>2],!(3&e)||(o=n+t|0,(a=i+(0-n)|0)>>>0<r>>>0))return;if((0|a)==(0|l[1149])){if(3!=(3&(t=0|l[(e=u+4|0)>>2])|0)){s=a,t=o;break}return l[1146]=o,l[e>>2]=-2&t,l[a+4>>2]=1|o,void(l[a+o>>2]=o)}if(i=n>>>3,n>>>0<256){if(e=0|l[a+8>>2],(0|(t=0|l[a+12>>2]))==(0|e)){l[1144]=l[1144]&~(1<<i),s=a,t=o;break}l[e+12>>2]=t,l[t+8>>2]=e,s=a,t=o;break}r=0|l[a+24>>2],e=0|l[a+12>>2];do{if((0|e)==(0|a)){if(!(e=0|l[(t=(i=a+16|0)+4|0)>>2])){if(!(e=0|l[i>>2])){e=0;break}t=i}for(;;)if(0|(n=0|l[(i=e+20|0)>>2]))e=n,t=i;else{if(!(n=0|l[(i=e+16|0)>>2]))break;e=n,t=i}l[t>>2]=0}else s=0|l[a+8>>2],l[s+12>>2]=e,l[e+8>>2]=s}while(0);if(r){if(t=0|l[a+28>>2],(0|a)==(0|l[(i=4880+(t<<2)|0)>>2])){if(l[i>>2]=e,!e){l[1145]=l[1145]&~(1<<t),s=a,t=o;break}}else if(l[r+16+(((0|l[r+16>>2])!=(0|a)&1)<<2)>>2]=e,!e){s=a,t=o;break}l[e+24>>2]=r,0|(i=0|l[(t=a+16|0)>>2])&&(l[e+16>>2]=i,l[i+24>>2]=e),(t=0|l[t+4>>2])?(l[e+20>>2]=t,l[t+24>>2]=e,s=a,t=o):(s=a,t=o)}else s=a,t=o}}while(0);if(!(a>>>0>=u>>>0)&&1&(n=0|l[(e=u+4|0)>>2])){if(2&n)l[e>>2]=-2&n,l[s+4>>2]=1|t,l[a+t>>2]=t,r=t;else{if(e=0|l[1149],(0|u)==(0|l[1150])){if(u=(0|l[1147])+t|0,l[1147]=u,l[1150]=s,l[s+4>>2]=1|u,(0|s)!=(0|e))return;return l[1149]=0,void(l[1146]=0)}if((0|u)==(0|e))return u=(0|l[1146])+t|0,l[1146]=u,l[1149]=a,l[s+4>>2]=1|u,void(l[a+u>>2]=u);r=(-8&n)+t|0,i=n>>>3;do{if(n>>>0<256){if(t=0|l[u+8>>2],(0|(e=0|l[u+12>>2]))==(0|t)){l[1144]=l[1144]&~(1<<i);break}l[t+12>>2]=e,l[e+8>>2]=t;break}o=0|l[u+24>>2],e=0|l[u+12>>2];do{if((0|e)==(0|u)){if(!(e=0|l[(t=(i=u+16|0)+4|0)>>2])){if(!(e=0|l[i>>2])){i=0;break}t=i}for(;;)if(0|(n=0|l[(i=e+20|0)>>2]))e=n,t=i;else{if(!(n=0|l[(i=e+16|0)>>2]))break;e=n,t=i}l[t>>2]=0,i=e}else i=0|l[u+8>>2],l[i+12>>2]=e,l[e+8>>2]=i,i=e}while(0);if(0|o){if(e=0|l[u+28>>2],(0|u)==(0|l[(t=4880+(e<<2)|0)>>2])){if(l[t>>2]=i,!i){l[1145]=l[1145]&~(1<<e);break}}else if(l[o+16+(((0|l[o+16>>2])!=(0|u)&1)<<2)>>2]=i,!i)break;l[i+24>>2]=o,0|(t=0|l[(e=u+16|0)>>2])&&(l[i+16>>2]=t,l[t+24>>2]=i),0|(e=0|l[e+4>>2])&&(l[i+20>>2]=e,l[e+24>>2]=i)}}while(0);if(l[s+4>>2]=1|r,l[a+r>>2]=r,(0|s)==(0|l[1149]))return void(l[1146]=r)}if(e=r>>>3,r>>>0<256)return i=4616+(e<<1<<2)|0,(t=0|l[1144])&(e=1<<e)?e=0|l[(t=i+8|0)>>2]:(l[1144]=t|e,e=i,t=i+8|0),l[t>>2]=s,l[e+12>>2]=s,l[s+8>>2]=e,void(l[s+12>>2]=i);(e=r>>>8)?r>>>0>16777215?e=31:e=r>>>((e=14-((o=((u=e<<(a=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|a|(e=((u<<=o)+245760|0)>>>16&2))+(u<<e>>>15)|0)+7|0)&1|e<<1:e=0,n=4880+(e<<2)|0,l[s+28>>2]=e,l[s+20>>2]=0,l[s+16>>2]=0,t=0|l[1145],i=1<<e;do{if(t&i){for(t=r<<(31==(0|e)?0:25-(e>>>1)|0),i=0|l[n>>2];;){if((-8&l[i+4>>2]|0)==(0|r)){e=73;break}if(!(e=0|l[(n=i+16+(t>>>31<<2)|0)>>2])){e=72;break}t<<=1,i=e}if(72==(0|e)){l[n>>2]=s,l[s+24>>2]=i,l[s+12>>2]=s,l[s+8>>2]=s;break}if(73==(0|e)){u=0|l[(a=i+8|0)>>2],l[u+12>>2]=s,l[a>>2]=s,l[s+8>>2]=u,l[s+12>>2]=i,l[s+24>>2]=0;break}}else l[1145]=t|i,l[n>>2]=s,l[s+24>>2]=n,l[s+12>>2]=s,l[s+8>>2]=s}while(0);if(u=(0|l[1152])-1|0,l[1152]=u,u)return;for(e=5032;e=0|l[e>>2];)e=e+8|0;l[1152]=-1}}}function Y(e,t){var i=0,n=0,r=0,o=0,a=0,s=0,u=0;u=(e|=0)+(t|=0)|0,i=0|l[e+4>>2];do{if(1&i)s=e,i=t;else{if(n=0|l[e>>2],!(3&i))return;if(a=n+t|0,(0|(o=e+(0-n)|0))==(0|l[1149])){if(3!=(3&(i=0|l[(e=u+4|0)>>2])|0)){s=o,i=a;break}return l[1146]=a,l[e>>2]=-2&i,l[o+4>>2]=1|a,void(l[o+a>>2]=a)}if(t=n>>>3,n>>>0<256){if(e=0|l[o+8>>2],(0|(i=0|l[o+12>>2]))==(0|e)){l[1144]=l[1144]&~(1<<t),s=o,i=a;break}l[e+12>>2]=i,l[i+8>>2]=e,s=o,i=a;break}r=0|l[o+24>>2],e=0|l[o+12>>2];do{if((0|e)==(0|o)){if(!(e=0|l[(i=(t=o+16|0)+4|0)>>2])){if(!(e=0|l[t>>2])){e=0;break}i=t}for(;;)if(0|(n=0|l[(t=e+20|0)>>2]))e=n,i=t;else{if(!(n=0|l[(t=e+16|0)>>2]))break;e=n,i=t}l[i>>2]=0}else s=0|l[o+8>>2],l[s+12>>2]=e,l[e+8>>2]=s}while(0);if(r){if(i=0|l[o+28>>2],(0|o)==(0|l[(t=4880+(i<<2)|0)>>2])){if(l[t>>2]=e,!e){l[1145]=l[1145]&~(1<<i),s=o,i=a;break}}else if(l[r+16+(((0|l[r+16>>2])!=(0|o)&1)<<2)>>2]=e,!e){s=o,i=a;break}l[e+24>>2]=r,0|(t=0|l[(i=o+16|0)>>2])&&(l[e+16>>2]=t,l[t+24>>2]=e),(i=0|l[i+4>>2])?(l[e+20>>2]=i,l[i+24>>2]=e,s=o,i=a):(s=o,i=a)}else s=o,i=a}}while(0);if(2&(n=0|l[(e=u+4|0)>>2]))l[e>>2]=-2&n,l[s+4>>2]=1|i,l[s+i>>2]=i;else{if(e=0|l[1149],(0|u)==(0|l[1150])){if(u=(0|l[1147])+i|0,l[1147]=u,l[1150]=s,l[s+4>>2]=1|u,(0|s)!=(0|e))return;return l[1149]=0,void(l[1146]=0)}if((0|u)==(0|e))return u=(0|l[1146])+i|0,l[1146]=u,l[1149]=s,l[s+4>>2]=1|u,void(l[s+u>>2]=u);o=(-8&n)+i|0,t=n>>>3;do{if(n>>>0<256){if(i=0|l[u+8>>2],(0|(e=0|l[u+12>>2]))==(0|i)){l[1144]=l[1144]&~(1<<t);break}l[i+12>>2]=e,l[e+8>>2]=i;break}r=0|l[u+24>>2],e=0|l[u+12>>2];do{if((0|e)==(0|u)){if(!(e=0|l[(i=(t=u+16|0)+4|0)>>2])){if(!(e=0|l[t>>2])){t=0;break}i=t}for(;;)if(0|(n=0|l[(t=e+20|0)>>2]))e=n,i=t;else{if(!(n=0|l[(t=e+16|0)>>2]))break;e=n,i=t}l[i>>2]=0,t=e}else t=0|l[u+8>>2],l[t+12>>2]=e,l[e+8>>2]=t,t=e}while(0);if(0|r){if(e=0|l[u+28>>2],(0|u)==(0|l[(i=4880+(e<<2)|0)>>2])){if(l[i>>2]=t,!t){l[1145]=l[1145]&~(1<<e);break}}else if(l[r+16+(((0|l[r+16>>2])!=(0|u)&1)<<2)>>2]=t,!t)break;l[t+24>>2]=r,0|(i=0|l[(e=u+16|0)>>2])&&(l[t+16>>2]=i,l[i+24>>2]=t),0|(e=0|l[e+4>>2])&&(l[t+20>>2]=e,l[e+24>>2]=t)}}while(0);if(l[s+4>>2]=1|o,l[s+o>>2]=o,(0|s)==(0|l[1149]))return void(l[1146]=o);i=o}if(e=i>>>3,i>>>0<256)return t=4616+(e<<1<<2)|0,(i=0|l[1144])&(e=1<<e)?e=0|l[(i=t+8|0)>>2]:(l[1144]=i|e,e=t,i=t+8|0),l[i>>2]=s,l[e+12>>2]=s,l[s+8>>2]=e,void(l[s+12>>2]=t);if((e=i>>>8)?i>>>0>16777215?e=31:e=i>>>((e=14-((o=((u=e<<(a=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|a|(e=((u<<=o)+245760|0)>>>16&2))+(u<<e>>>15)|0)+7|0)&1|e<<1:e=0,r=4880+(e<<2)|0,l[s+28>>2]=e,l[s+20>>2]=0,l[s+16>>2]=0,!((t=0|l[1145])&(n=1<<e)))return l[1145]=t|n,l[r>>2]=s,l[s+24>>2]=r,l[s+12>>2]=s,void(l[s+8>>2]=s);for(t=i<<(31==(0|e)?0:25-(e>>>1)|0),n=0|l[r>>2];;){if((-8&l[n+4>>2]|0)==(0|i)){e=69;break}if(!(e=0|l[(r=n+16+(t>>>31<<2)|0)>>2])){e=68;break}t<<=1,n=e}return 68==(0|e)?(l[r>>2]=s,l[s+24>>2]=n,l[s+12>>2]=s,void(l[s+8>>2]=s)):69==(0|e)?(u=0|l[(a=n+8|0)>>2],l[u+12>>2]=s,l[a>>2]=s,l[s+8>>2]=u,l[s+12>>2]=n,void(l[s+24>>2]=0)):void 0}function j(e,t,i,n,r){r|=0;var o=0,a=0,s=0,u=0,c=0,h=0,d=0,f=0,p=0,_=0;if(h=e|=0,a=i|=0,s=f=n|=0,!(c=u=t|=0))return o=0!=(0|r),s?o?(l[r>>2]=0|e,l[r+4>>2]=0&t,b=f=0,0|(r=0)):(b=f=0,0|(r=0)):(o&&(l[r>>2]=(h>>>0)%(a>>>0),l[r+4>>2]=0),b=f=0,0|(r=(h>>>0)/(a>>>0)>>>0));o=0==(0|s);do{if(a){if(!o){if((o=(0|w(0|s))-(0|w(0|c))|0)>>>0<=31){a=d=o+1|0,e=h>>>(d>>>0)&(t=o-31>>31)|c<<(s=31-o|0),t&=c>>>(d>>>0),o=0,s=h<<s;break}return r?(l[r>>2]=0|e,l[r+4>>2]=u|0&t,b=f=0,0|(r=0)):(b=f=0,0|(r=0))}if((o=a-1|0)&a|0){a=s=33+(0|w(0|a))-(0|w(0|c))|0,e=(d=32-s|0)-1>>31&c>>>((p=s-32|0)>>>0)|(c<<d|h>>>(s>>>0))&(t=p>>31),t&=c>>>(s>>>0),o=h<<(_=64-s|0)&(u=d>>31),s=(c<<_|h>>>(p>>>0))&u|h<<d&s-33>>31;break}return 0|r&&(l[r>>2]=o&h,l[r+4>>2]=0),1==(0|a)?(b=p=u|0&t,0|(_=0|e)):(_=0|Ee(0|a),b=p=c>>>(_>>>0)|0,0|(_=c<<32-_|h>>>(_>>>0)|0))}if(o)return 0|r&&(l[r>>2]=(c>>>0)%(a>>>0),l[r+4>>2]=0),b=p=0,0|(_=(c>>>0)/(a>>>0)>>>0);if(!h)return 0|r&&(l[r>>2]=0,l[r+4>>2]=(c>>>0)%(s>>>0)),b=p=0,0|(_=(c>>>0)/(s>>>0)>>>0);if(!((o=s-1|0)&s))return 0|r&&(l[r>>2]=0|e,l[r+4>>2]=o&c|0&t),p=0,_=c>>>((0|Ee(0|s))>>>0),b=p,0|_;if((o=(0|w(0|s))-(0|w(0|c))|0)>>>0<=30){a=t=o+1|0,e=c<<(s=31-o|0)|h>>>(t>>>0),t=c>>>(t>>>0),o=0,s=h<<s;break}return r?(l[r>>2]=0|e,l[r+4>>2]=u|0&t,b=p=0,0|(_=0)):(b=p=0,0|(_=0))}while(0);if(a){c=0|ze(0|(d=0|i),0|(h=f|0&n),-1,-1),i=b,u=s,s=0;do{n=u,u=o>>>31|u<<1,o=s|o<<1,Fe(0|c,0|i,0|(n=e<<1|n>>>31|0),0|(f=e>>>31|t<<1|0)),s=1&(p=(_=b)>>31|((0|_)<0?-1:0)<<1),e=0|Fe(0|n,0|f,p&d|0,(((0|_)<0?-1:0)>>31|((0|_)<0?-1:0)<<1)&h|0),t=b,a=a-1|0}while(0!=(0|a));c=u,u=0}else c=s,u=0,s=0;return a=0,0|r&&(l[r>>2]=e,l[r+4>>2]=t),b=p=(0|o)>>>31|(c|a)<<1|0&(a<<1|o>>>31)|u,0|(_=-2&(o<<1|0)|s)}function q(e,t){e|=0;var i,n,r,o,a,s,u,h,f=0,p=0,_=0,m=0,$=0,g=0;h=v,v=v+576|0,r=h+48|0,a=h+32|0,o=h+16|0,n=h,u=h+64|0,s=0|l[(t|=0)+20>>2],(0|(i=0|l[(g=e+20|0)>>2]))<24?(p=(f=0|l[($=e+4|0)>>2])>>>0<(_=0|l[e+8>>2])>>>0,(0|i)<16?(p?(m=(0|c[f>>0])<<8,f=f+1|0):m=0,f>>>0<_>>>0?(_=0|c[f>>0],f=f+1|0):_=0,l[$>>2]=f,l[g>>2]=i+16,p=16,f=_|m):(p?(l[$>>2]=f+1,f=0|c[f>>0]):f=0,l[g>>2]=i+8,p=24),_=l[($=e+16|0)>>2]|f<<p-i,l[$>>2]=_):($=_=e+16|0,_=0|l[_>>2]),m=1+(_>>>16)|0;do{if(!(m>>>0<=(0|l[s+16>>2])>>>0)){for(p=0|l[s+20>>2];m>>>0>(0|l[s+28+((f=p+-1|0)<<2)>>2])>>>0;)p=p+1|0;if((f=(_>>>(32-p|0))+(0|l[s+96+(f<<2)>>2])|0)>>>0<(0|l[t>>2])>>>0){f=0|d[(0|l[s+176>>2])+(f<<1)>>1];break}return l[r>>2]=866,l[r+4>>2]=3275,l[r+8>>2]=1348,Oe(u,812,r),xe(u),v=h,0|(g=0)}-1==(0|(p=0|l[(0|l[s+168>>2])+(_>>>(32-(0|l[s+8>>2])|0)<<2)>>2]))&&(l[n>>2]=866,l[n+4>>2]=3253,l[n+8>>2]=1393,Oe(u,812,n),xe(u)),f=65535&p,p>>>=16,(0|l[t+8>>2])>>>0<=f>>>0&&(l[o>>2]=866,l[o+4>>2]=909,l[o+8>>2]=1497,Oe(u,812,o),xe(u)),(0|c[(0|l[t+4>>2])+f>>0])!=(0|p)&&(l[a>>2]=866,l[a+4>>2]=3257,l[a+8>>2]=1410,Oe(u,812,a),xe(u))}while(0);return l[$>>2]=l[$>>2]<<p,l[g>>2]=(0|l[g>>2])-p,v=h,0|(g=f)}function X(e){var t,i,n,o,a,s=0,u=0,c=0;if(a=v,v=v+576|0,c=a+48|0,n=a+32|0,i=a+16|0,t=a,o=a+64|0,l[(e|=0)>>2]=0,0|(u=0|l[(s=e+284|0)>>2])&&(7&u?(l[t>>2]=866,l[t+4>>2]=2506,l[t+8>>2]=1232,Oe(o,812,t),xe(o)):_e(u,0,0,1,0),l[s>>2]=0,l[e+288>>2]=0,l[e+292>>2]=0),r[e+296>>0]=0,0|(u=0|l[(s=e+268|0)>>2])&&(7&u?(l[i>>2]=866,l[i+4>>2]=2506,l[i+8>>2]=1232,Oe(o,812,i),xe(o)):_e(u,0,0,1,0),l[s>>2]=0,l[e+272>>2]=0,l[e+276>>2]=0),r[e+280>>0]=0,0|(u=0|l[(s=e+252|0)>>2])&&(7&u?(l[n>>2]=866,l[n+4>>2]=2506,l[n+8>>2]=1232,Oe(o,812,n),xe(o)):_e(u,0,0,1,0),l[s>>2]=0,l[e+256>>2]=0,l[e+260>>2]=0),r[e+264>>0]=0,!(u=0|l[(s=e+236|0)>>2]))return r[(c=e+248|0)>>0]=0,ce(c=e+212|0),ce(c=e+188|0),ce(c=e+164|0),ce(c=e+140|0),ce(c=e+116|0),void(v=a);7&u?(l[c>>2]=866,l[c+4>>2]=2506,l[c+8>>2]=1232,Oe(o,812,c),xe(o)):_e(u,0,0,1,0),l[s>>2]=0,l[e+240>>2]=0,l[e+244>>2]=0,r[(c=e+248|0)>>0]=0,ce(c=e+212|0),ce(c=e+188|0),ce(c=e+164|0),ce(c=e+140|0),ce(c=e+116|0),v=a}function K(e,t,i){e|=0,t|=0,i|=0;var n=0,r=0,o=0;e:do{if(t>>>0<=20){switch(0|t){case 9:n=3+(0|l[i>>2])&-4,t=0|l[n>>2],l[i>>2]=n+4,l[e>>2]=t;break e;case 10:n=3+(0|l[i>>2])&-4,t=0|l[n>>2],l[i>>2]=n+4,l[(n=e)>>2]=t,l[n+4>>2]=((0|t)<0)<<31>>31;break e;case 11:n=3+(0|l[i>>2])&-4,t=0|l[n>>2],l[i>>2]=n+4,l[(n=e)>>2]=t,l[n+4>>2]=0;break e;case 12:n=7+(0|l[i>>2])&-8,r=0|l[(t=n)>>2],t=0|l[t+4>>2],l[i>>2]=n+8,l[(n=e)>>2]=r,l[n+4>>2]=t;break e;case 13:r=3+(0|l[i>>2])&-4,n=0|l[r>>2],l[i>>2]=r+4,n=(65535&n)<<16>>16,l[(r=e)>>2]=n,l[r+4>>2]=((0|n)<0)<<31>>31;break e;case 14:r=3+(0|l[i>>2])&-4,n=0|l[r>>2],l[i>>2]=r+4,l[(r=e)>>2]=65535&n,l[r+4>>2]=0;break e;case 15:r=3+(0|l[i>>2])&-4,n=0|l[r>>2],l[i>>2]=r+4,n=(255&n)<<24>>24,l[(r=e)>>2]=n,l[r+4>>2]=((0|n)<0)<<31>>31;break e;case 16:r=3+(0|l[i>>2])&-4,n=0|l[r>>2],l[i>>2]=r+4,l[(r=e)>>2]=255&n,l[r+4>>2]=0;break e;case 17:case 18:r=7+(0|l[i>>2])&-8,o=+m[r>>3],l[i>>2]=r+8,m[e>>3]=o;break e;default:break e}}}while(0)}function Z(e,t,i,n,r){t|=0,i|=0,n|=0,r|=0;var o,a,s,u,c,h,d=0,f=0,p=0,_=0;if(h=v,v=v+576|0,u=h+48|0,o=h+32|0,f=h+16|0,d=h,s=h+64|0,c=h+60|0,_=(e|=0)+8|0,(0|l[(a=e+4|0)>>2])>>>0>(0|l[_>>2])>>>0&&(l[d>>2]=866,l[d+4>>2]=2123,l[d+8>>2]=845,Oe(s,812,d),xe(s)),(2147418112/(n>>>0)|0)>>>0<=t>>>0&&(l[f>>2]=866,l[f+4>>2]=2124,l[f+8>>2]=885,Oe(s,812,f),xe(s)),(d=0|l[_>>2])>>>0>=t>>>0)return v=h,0|(_=1);if(i&&0!=((p=t+-1|0)&t|0)?(t=p>>>16|p,t|=t>>>8,t|=t>>>4,(t=1+((t|=t>>>2)>>>1|t)|0)?i=9:(t=0,i=10)):i=9,9==(0|i)&&t>>>0<=d>>>0&&(i=10),10==(0|i)&&(l[o>>2]=866,l[o+4>>2]=2133,l[o+8>>2]=933,Oe(s,812,o),xe(s)),p=0|S(t,n),r)if(f=0|he(p,c)){ct[0&r](f,0|l[e>>2],0|l[a>>2]),d=0|l[e>>2];do{if(0|d){if(7&d){l[u>>2]=866,l[u+4>>2]=2506,l[u+8>>2]=1232,Oe(s,812,u),xe(s);break}_e(d,0,0,1,0);break}}while(0);l[e>>2]=f,i=20}else t=0;else d=0|function(e,t,i,n){t|=0,i|=0,n|=0;var r=0,o=0,a=0,s=0,u=0,c=0;return c=v,v=v+560|0,u=c+32|0,o=c+16|0,r=c,a=c+48|0,s=c+44|0,7&(e|=0)|0?(l[r>>2]=866,l[r+4>>2]=2506,l[r+8>>2]=1210,Oe(a,812,r),xe(a),v=c,0|(u=0)):t>>>0>2147418112?(l[o>>2]=866,l[o+4>>2]=2506,l[o+8>>2]=1103,Oe(a,812,o),xe(a),v=c,0|(u=0)):(l[s>>2]=t,e=0|_e(e,t,s,n,0),0|i&&(l[i>>2]=l[s>>2]),7&e|0&&(l[u>>2]=866,l[u+4>>2]=2558,l[u+8>>2]=1156,Oe(a,812,u),xe(a)),v=c,0|(u=e))}(0|l[e>>2],p,c,1),d?(l[e>>2]=d,i=20):t=0;return 20==(0|i)&&((d=0|l[c>>2])>>>0>p>>>0&&(t=(d>>>0)/(n>>>0)|0),l[_>>2]=t,t=1),v=h,0|(_=t)}function J(e,t,i,n,o,a,s){t|=0,i|=0,n|=0,o|=0,a|=0,s|=0;var u=0,h=0,f=0,p=0;if(p=0|l[(e|=0)+88>>2],h=(((h=(c[p+12>>0]<<8|c[p+13>>0])>>>s)>>>0>1?h:1)+3|0)>>>2,f=(((f=(c[p+14>>0]<<8|c[p+15>>0])>>>s)>>>0>1?f:1)+3|0)>>>2,s=0|r[(p=p+18|0)>>0],s=0|S(h,s<<24>>24==0|s<<24>>24==9?8:16),a){if(!(0==(3&a|0)&s>>>0<=a>>>0))return 0|(o=0);s=a}if((0|S(s,f))>>>0>o>>>0||(a=(h+1|0)>>>1,u=(f+1|0)>>>1,!i))return 0|(o=0);switch(l[e+92>>2]=t,l[e+96>>2]=t,l[e+104>>2]=i,l[e+100>>2]=t+i,l[e+108>>2]=0,l[e+112>>2]=0,0|r[p>>0]){case 0:if(!(0|function(e,t,i,n,o,a,s,u){t|=0,i|=0,n|=0,o|=0,a|=0,s|=0,u|=0;var h,d,f,p,_,m,$,g,y,x,b,w,C,T,P,E,A,L,M,I,O,D,R,N,F,B,z,G,k,U,V,W,H=0,Y=0,j=0,X=0,K=0,Z=0,J=0,Q=0,ee=0,te=0,ie=0,ne=0,re=0,oe=0,ae=0,se=0,le=0,ue=0;if(W=v,v=v+656|0,U=W+112|0,G=W+96|0,z=W+80|0,B=W+64|0,F=W+48|0,V=W+32|0,k=W+16|0,N=W,D=W+144|0,R=W+128|0,T=0|l[(C=240+(e|=0)|0)>>2],E=0|l[(P=e+256|0)>>2],A=255&(se=0|r[17+(0|l[e+88>>2])>>0]),!(se<<24>>24))return v=W,1;M=0==(0|u),O=(I=s+-1|0)<<4,se=u+-1|0,$=0!=(1&a|0),g=n<<1,y=e+92|0,x=e+116|0,b=e+140|0,w=e+236|0,m=0!=(1&o|0),_=e+188|0,h=e+252|0,d=1+(L=n>>>2)|0,f=L+2|0,p=L+3|0,ae=0,a=0,i=0,o=1;do{if(!M)for(re=0|l[t+(ae<<2)>>2],oe=0;;){if(Y=0==(0|(ie=1&oe)),te=(ie<<5^32)-16|0,ie=(ie<<1^2)-1|0,ne=$&(e=(0|oe)==(0|se)),(0|(H=Y?0:I))!=(0|(ee=Y?s:-1)))for(Q=$&e^1,J=Y?re:re+O|0;;){1==(0|o)&&(o=512|q(y,x)),Z=7&o,o>>>=3,Y=0|c[1539+Z>>0],e=0;do{i=(K=(X=(j=(0|q(y,b))+i|0)-T|0)>>31)&j|X&~K,(0|l[C>>2])>>>0<=i>>>0&&(l[N>>2]=866,l[N+4>>2]=910,l[N+8>>2]=1497,Oe(D,812,N),xe(D)),l[R+(e<<2)>>2]=l[(0|l[w>>2])+(i<<2)>>2],e=e+1|0}while(e>>>0<Y>>>0);if(ne|(K=m&(0|H)==(0|I))){X=0;do{e=J+(0|S(X,n))|0,j=0==(0|X)|Q,Y=X<<1,a=(a=(le=(ue=(0|q(y,_))+a|0)-E|0)>>31)&ue|le&~a;do{if(K){if(!j){a=(a=(ue=(le=(0|q(y,_))+a|0)-E|0)>>31)&le|ue&~a;break}l[e>>2]=l[R+((0|c[1547+(Z<<2)+Y>>0])<<2)>>2],(0|l[P>>2])>>>0<=a>>>0&&(l[G>>2]=866,l[G+4>>2]=910,l[G+8>>2]=1497,Oe(D,812,G),xe(D)),l[e+4>>2]=l[(0|l[h>>2])+(a<<2)>>2],a=(a=(ue=(le=(0|q(y,_))+a|0)-E|0)>>31)&le|ue&~a}else j&&(l[e>>2]=l[R+((0|c[1547+(Z<<2)+Y>>0])<<2)>>2],(0|l[P>>2])>>>0<=a>>>0&&(l[z>>2]=866,l[z+4>>2]=910,l[z+8>>2]=1497,Oe(D,812,z),xe(D)),l[e+4>>2]=l[(0|l[h>>2])+(a<<2)>>2]),e=e+8|0,a=(a=(ue=(le=(0|q(y,_))+a|0)-E|0)>>31)&le|ue&~a,j&&(l[e>>2]=l[R+((0|c[1547+(Z<<2)+(1|Y)>>0])<<2)>>2],(0|l[P>>2])>>>0<=a>>>0&&(l[U>>2]=866,l[U+4>>2]=910,l[U+8>>2]=1497,Oe(D,812,U),xe(D)),l[e+4>>2]=l[(0|l[h>>2])+(a<<2)>>2])}while(0);X=X+1|0}while(2!=(0|X))}else l[J>>2]=l[R+((0|c[1547+(Z<<2)>>0])<<2)>>2],a=(a=(ue=(le=(0|q(y,_))+a|0)-E|0)>>31)&le|ue&~a,(0|l[P>>2])>>>0<=a>>>0&&(l[k>>2]=866,l[k+4>>2]=910,l[k+8>>2]=1497,Oe(D,812,k),xe(D)),l[J+4>>2]=l[(0|l[h>>2])+(a<<2)>>2],l[J+8>>2]=l[R+((0|c[1547+(Z<<2)+1>>0])<<2)>>2],a=(a=(ue=(le=(0|q(y,_))+a|0)-E|0)>>31)&le|ue&~a,(0|l[P>>2])>>>0<=a>>>0&&(l[V>>2]=866,l[V+4>>2]=910,l[V+8>>2]=1497,Oe(D,812,V),xe(D)),l[J+12>>2]=l[(0|l[h>>2])+(a<<2)>>2],l[J+(L<<2)>>2]=l[R+((0|c[1547+(Z<<2)+2>>0])<<2)>>2],a=(a=(ue=(le=(0|q(y,_))+a|0)-E|0)>>31)&le|ue&~a,(0|l[P>>2])>>>0<=a>>>0&&(l[F>>2]=866,l[F+4>>2]=910,l[F+8>>2]=1497,Oe(D,812,F),xe(D)),l[J+(d<<2)>>2]=l[(0|l[h>>2])+(a<<2)>>2],l[J+(f<<2)>>2]=l[R+((0|c[1547+(Z<<2)+3>>0])<<2)>>2],a=(a=(ue=(le=(0|q(y,_))+a|0)-E|0)>>31)&le|ue&~a,(0|l[P>>2])>>>0<=a>>>0&&(l[B>>2]=866,l[B+4>>2]=910,l[B+8>>2]=1497,Oe(D,812,B),xe(D)),l[J+(p<<2)>>2]=l[(0|l[h>>2])+(a<<2)>>2];if((0|(H=ie+H|0))==(0|ee))break;J=J+te|0}if((0|(oe=oe+1|0))==(0|u))break;re=re+g|0}ae=ae+1|0}while((0|ae)!=(0|A));return v=W,1}(e,n,o,s,h,f,a,u)))return 0|(o=0);break;case 4:case 6:case 5:case 3:case 2:if(!(0|function(e,t,i,n,o,a,s,u){t|=0,i|=0,n|=0,o|=0,a|=0,s|=0,u|=0;var h,f,p,_,m,$,g,y,x,b,S,w,C,T,P,E,A,L,M,I,O,D,R,N,F,B,z,G,k,U,V,W,H,Y,j,X=0,K=0,Z=0,J=0,Q=0,ee=0,te=0,ie=0,ne=0,re=0,oe=0,ae=0,se=0,le=0,ue=0,ce=0,he=0,de=0,fe=0,pe=0,_e=0,me=0;if(j=v,v=v+640|0,W=j+80|0,V=j+64|0,U=j+48|0,Y=j+32|0,H=j+16|0,k=j,z=j+128|0,G=j+112|0,$=j+96|0,y=0|l[(g=240+(e|=0)|0)>>2],b=0|l[(x=e+256|0)>>2],w=0|l[(S=e+272|0)>>2],me=0|l[e+88>>2],C=(0|c[me+63>>0])<<8|0|c[me+64>>0],T=255&(me=0|r[me+17>>0]),!(me<<24>>24))return v=j,1;P=0==(0|u),A=(E=s+-1|0)<<5,L=u+-1|0,M=n<<1,I=e+92|0,O=e+116|0,D=e+164|0,R=e+268|0,N=e+140|0,F=e+236|0,B=e+212|0,me=e+188|0,m=0==(1&o|0),_=0==(1&a|0),f=e+288|0,p=e+284|0,h=e+252|0,_e=0,e=0,a=0,o=0,i=0,X=1;do{if(!P)for(fe=0|l[t+(_e<<2)>>2],pe=0;;){if(Z=0==(0|(de=1&pe)),he=(de<<6^64)-32|0,de=(de<<1^2)-1|0,(0|(K=Z?0:E))!=(0|(ue=Z?s:-1)))for(ce=_|(0|pe)!=(0|L),le=Z?fe:fe+A|0;;){1==(0|X)&&(X=512|q(I,O)),se=7&X,X>>>=3,J=0|c[1539+se>>0],Z=0;do{a=(ae=(oe=(re=(0|q(I,D))+a|0)-w|0)>>31)&re|oe&~ae,(0|l[S>>2])>>>0<=a>>>0&&(l[k>>2]=866,l[k+4>>2]=910,l[k+8>>2]=1497,Oe(z,812,k),xe(z)),l[$+(Z<<2)>>2]=d[(0|l[R>>2])+(a<<1)>>1],Z=Z+1|0}while(Z>>>0<J>>>0);Z=0;do{i=(ae=(oe=(re=(0|q(I,N))+i|0)-y|0)>>31)&re|oe&~ae,(0|l[g>>2])>>>0<=i>>>0&&(l[H>>2]=866,l[H+4>>2]=910,l[H+8>>2]=1497,Oe(z,812,H),xe(z)),l[G+(Z<<2)>>2]=l[(0|l[F>>2])+(i<<2)>>2],Z=Z+1|0}while(Z>>>0<J>>>0);for(ae=m|(0|K)!=(0|E),re=0,oe=le;;){if(te=ce|0==(0|re),ie=re<<1,ae)for(Q=0,ee=oe;e=(e=(J=(ne=(0|q(I,B))+e|0)-C|0)>>31)&ne|J&~e,o=(o=(ne=(J=(0|q(I,me))+o|0)-b|0)>>31)&J|ne&~o,te&&(Z=0|c[Q+ie+(1547+(se<<2))>>0],J=3*e|0,(0|l[f>>2])>>>0<=J>>>0&&(l[Y>>2]=866,l[Y+4>>2]=910,l[Y+8>>2]=1497,Oe(z,812,Y),xe(z)),ne=(0|l[p>>2])+(J<<1)|0,l[ee>>2]=(0|d[ne>>1])<<16|l[$+(Z<<2)>>2],l[ee+4>>2]=(0|d[ne+4>>1])<<16|0|d[ne+2>>1],l[ee+8>>2]=l[G+(Z<<2)>>2],(0|l[x>>2])>>>0<=o>>>0&&(l[U>>2]=866,l[U+4>>2]=910,l[U+8>>2]=1497,Oe(z,812,U),xe(z)),l[ee+12>>2]=l[(0|l[h>>2])+(o<<2)>>2]),2!=(0|(Q=Q+1|0));)ee=ee+16|0;else for(ne=1^te,te=1547+(se<<2)+ie|0,Q=0,ee=oe;e=(e=(J=(ie=(0|q(I,B))+e|0)-C|0)>>31)&ie|J&~e,o=(o=(ie=(J=(0|q(I,me))+o|0)-b|0)>>31)&J|ie&~o,0!=(0|Q)|ne||(Z=0|c[te>>0],J=3*e|0,(0|l[f>>2])>>>0<=J>>>0&&(l[V>>2]=866,l[V+4>>2]=910,l[V+8>>2]=1497,Oe(z,812,V),xe(z)),ie=(0|l[p>>2])+(J<<1)|0,l[ee>>2]=(0|d[ie>>1])<<16|l[$+(Z<<2)>>2],l[ee+4>>2]=(0|d[ie+4>>1])<<16|0|d[ie+2>>1],l[ee+8>>2]=l[G+(Z<<2)>>2],(0|l[x>>2])>>>0<=o>>>0&&(l[W>>2]=866,l[W+4>>2]=910,l[W+8>>2]=1497,Oe(z,812,W),xe(z)),l[ee+12>>2]=l[(0|l[h>>2])+(o<<2)>>2]),2!=(0|(Q=Q+1|0));)ee=ee+16|0;if(2==(0|(re=re+1|0)))break;oe=oe+n|0}if((0|(K=de+K|0))==(0|ue))break;le=le+he|0}if((0|(pe=pe+1|0))==(0|u))break;fe=fe+M|0}_e=_e+1|0}while((0|_e)!=(0|T));return v=j,1}(e,n,o,s,h,f,a,u)))return 0|(o=0);break;case 9:if(!(0|function(e,t,i,n,o,a,s,u){t|=0,i|=0,n|=0,o|=0,a|=0,s|=0,u|=0;var h,f,p,_,m,$,g,y,x,b,S,w,C,T,P,E,A,L,M,I,O,D,R,N,F=0,B=0,z=0,G=0,k=0,U=0,V=0,W=0,H=0,Y=0,j=0,X=0,K=0,Z=0,J=0,Q=0,ee=0,te=0;if(N=v,v=v+592|0,O=N+48|0,R=N+32|0,D=N+16|0,I=N,L=N+80|0,M=N+64|0,$=0|l[(m=272+(e|=0)|0)>>2],te=0|l[e+88>>2],g=(0|c[te+63>>0])<<8|0|c[te+64>>0],y=255&(te=0|r[te+17>>0]),!(te<<24>>24))return v=N,1;x=0==(0|u),S=(b=s+-1|0)<<4,w=u+-1|0,C=n<<1,T=e+92|0,P=e+116|0,E=e+164|0,A=e+268|0,te=e+212|0,_=0==(1&o|0),p=0==(1&a|0),f=e+288|0,h=e+284|0,ee=0,o=0,i=0,a=1;do{if(!x)for(J=0|l[t+(ee<<2)>>2],Q=0;;){if(F=0==(0|(Z=1&Q)),K=(Z<<5^32)-16|0,Z=(Z<<1^2)-1|0,(0|(e=F?0:b))!=(0|(j=F?s:-1)))for(X=p|(0|Q)!=(0|w),Y=F?J:J+S|0;;){1==(0|a)&&(a=512|q(T,P)),H=7&a,a>>>=3,B=0|c[1539+H>>0],F=0;do{i=(W=(V=(U=(0|q(T,E))+i|0)-$|0)>>31)&U|V&~W,(0|l[m>>2])>>>0<=i>>>0&&(l[I>>2]=866,l[I+4>>2]=910,l[I+8>>2]=1497,Oe(L,812,I),xe(L)),l[M+(F<<2)>>2]=d[(0|l[A>>2])+(i<<1)>>1],F=F+1|0}while(F>>>0<B>>>0);for(W=_|(0|e)!=(0|b),U=0,V=Y;k=X|0==(0|U),B=U<<1,G=(G=(z=(F=(0|q(T,te))+o|0)-g|0)>>31)&F|z&~G,W?(k&&(o=0|c[1547+(H<<2)+B>>0],F=3*G|0,(0|l[f>>2])>>>0<=F>>>0&&(l[D>>2]=866,l[D+4>>2]=910,l[D+8>>2]=1497,Oe(L,812,D),xe(L)),z=(0|l[h>>2])+(F<<1)|0,l[V>>2]=(0|d[z>>1])<<16|l[M+(o<<2)>>2],l[V+4>>2]=(0|d[z+4>>1])<<16|0|d[z+2>>1]),z=V+8|0,o=(o=(G=(F=(0|q(T,te))+G|0)-g|0)>>31)&F|G&~o,k&&(F=0|c[1547+(H<<2)+(1|B)>>0],B=3*o|0,(0|l[f>>2])>>>0<=B>>>0&&(l[O>>2]=866,l[O+4>>2]=910,l[O+8>>2]=1497,Oe(L,812,O),xe(L)),k=(0|l[h>>2])+(B<<1)|0,l[z>>2]=(0|d[k>>1])<<16|l[M+(F<<2)>>2],l[V+12>>2]=(0|d[k+4>>1])<<16|0|d[k+2>>1])):(k&&(o=0|c[1547+(H<<2)+B>>0],F=3*G|0,(0|l[f>>2])>>>0<=F>>>0&&(l[R>>2]=866,l[R+4>>2]=910,l[R+8>>2]=1497,Oe(L,812,R),xe(L)),k=(0|l[h>>2])+(F<<1)|0,l[V>>2]=(0|d[k>>1])<<16|l[M+(o<<2)>>2],l[V+4>>2]=(0|d[k+4>>1])<<16|0|d[k+2>>1]),o=(o=(k=(G=(0|q(T,te))+G|0)-g|0)>>31)&G|k&~o),2!=(0|(U=U+1|0));)V=V+n|0;if((0|(e=Z+e|0))==(0|j))break;Y=Y+K|0}if((0|(Q=Q+1|0))==(0|u))break;J=J+C|0}ee=ee+1|0}while((0|ee)!=(0|y));return v=N,1}(e,n,o,s,h,f,a,u)))return 0|(o=0);break;case 8:case 7:if(!(0|function(e,t,i,n,o,a,s,u){t|=0,i|=0,n|=0,o|=0,a|=0,s|=0,u|=0;var h,f,p,_,m,$,g,y,x,b,S,w,C,T,P,E,A,L,M,I,O,D,R,N,F,B,z,G=0,k=0,U=0,V=0,W=0,H=0,Y=0,j=0,X=0,K=0,Z=0,J=0,Q=0,ee=0,te=0,ie=0,ne=0,re=0,oe=0,ae=0,se=0,le=0,ue=0,ce=0,he=0;if(z=v,v=v+640|0,N=z+80|0,R=z+64|0,D=z+48|0,B=z+32|0,F=z+16|0,O=z,M=z+128|0,I=z+112|0,m=z+96|0,g=0|l[($=272+(e|=0)|0)>>2],he=0|l[e+88>>2],y=(0|c[he+63>>0])<<8|0|c[he+64>>0],x=255&(he=0|r[he+17>>0]),!(he<<24>>24))return v=z,1;b=0==(0|u),w=(S=s+-1|0)<<5,C=u+-1|0,T=n<<1,P=e+92|0,E=e+116|0,A=e+164|0,L=e+268|0,he=e+212|0,_=0==(1&o|0),p=0==(1&a|0),f=e+288|0,h=e+284|0,ce=0,e=0,a=0,o=0,i=0,G=1;do{if(!b)for(le=0|l[t+(ce<<2)>>2],ue=0;;){if(U=0==(0|(se=1&ue)),ae=(se<<6^64)-32|0,se=(se<<1^2)-1|0,(0|(k=U?0:S))!=(0|(re=U?s:-1)))for(oe=p|(0|ue)!=(0|C),ne=U?le:le+w|0;;){1==(0|G)&&(G=512|q(P,E)),ie=7&G,G>>>=3,V=0|c[1539+ie>>0],U=0;do{i=(te=(ee=(Q=(0|q(P,A))+i|0)-g|0)>>31)&Q|ee&~te,(0|l[$>>2])>>>0<=i>>>0&&(l[O>>2]=866,l[O+4>>2]=910,l[O+8>>2]=1497,Oe(M,812,O),xe(M)),l[I+(U<<2)>>2]=d[(0|l[L>>2])+(i<<1)>>1],U=U+1|0}while(U>>>0<V>>>0);U=0;do{a=(te=(ee=(Q=(0|q(P,A))+a|0)-g|0)>>31)&Q|ee&~te,(0|l[$>>2])>>>0<=a>>>0&&(l[F>>2]=866,l[F+4>>2]=910,l[F+8>>2]=1497,Oe(M,812,F),xe(M)),l[m+(U<<2)>>2]=d[(0|l[L>>2])+(a<<1)>>1],U=U+1|0}while(U>>>0<V>>>0);for(te=_|(0|k)!=(0|S),Q=0,ee=ne;;){if(K=oe|0==(0|Q),Z=Q<<1,te)for(j=0,X=ee;o=(o=(Y=(J=(0|q(P,he))+o|0)-y|0)>>31)&J|Y&~o,e=(e=(J=(Y=(0|q(P,he))+e|0)-y|0)>>31)&Y|J&~e,K&&(Y=0|c[j+Z+(1547+(ie<<2))>>0],V=3*o|0,(U=0|l[f>>2])>>>0<=V>>>0&&(l[B>>2]=866,l[B+4>>2]=910,l[B+8>>2]=1497,Oe(M,812,B),xe(M),U=0|l[f>>2]),V=(W=0|l[h>>2])+(V<<1)|0,U>>>0>(H=3*e|0)>>>0?U=W:(l[D>>2]=866,l[D+4>>2]=910,l[D+8>>2]=1497,Oe(M,812,D),xe(M),U=0|l[h>>2]),J=U+(H<<1)|0,l[X>>2]=(0|d[V>>1])<<16|l[I+(Y<<2)>>2],l[X+4>>2]=(0|d[V+4>>1])<<16|0|d[V+2>>1],l[X+8>>2]=(0|d[J>>1])<<16|l[m+(Y<<2)>>2],l[X+12>>2]=(0|d[J+4>>1])<<16|0|d[J+2>>1]),2!=(0|(j=j+1|0));)X=X+16|0;else for(J=1^K,K=1547+(ie<<2)+Z|0,j=0,X=ee;o=(o=(Y=(Z=(0|q(P,he))+o|0)-y|0)>>31)&Z|Y&~o,e=(e=(Z=(Y=(0|q(P,he))+e|0)-y|0)>>31)&Y|Z&~e,0!=(0|j)|J||(Y=0|c[K>>0],V=3*o|0,(U=0|l[f>>2])>>>0<=V>>>0&&(l[R>>2]=866,l[R+4>>2]=910,l[R+8>>2]=1497,Oe(M,812,R),xe(M),U=0|l[f>>2]),V=(W=0|l[h>>2])+(V<<1)|0,U>>>0>(H=3*e|0)>>>0?U=W:(l[N>>2]=866,l[N+4>>2]=910,l[N+8>>2]=1497,Oe(M,812,N),xe(M),U=0|l[h>>2]),Z=U+(H<<1)|0,l[X>>2]=(0|d[V>>1])<<16|l[I+(Y<<2)>>2],l[X+4>>2]=(0|d[V+4>>1])<<16|0|d[V+2>>1],l[X+8>>2]=(0|d[Z>>1])<<16|l[m+(Y<<2)>>2],l[X+12>>2]=(0|d[Z+4>>1])<<16|0|d[Z+2>>1]),2!=(0|(j=j+1|0));)X=X+16|0;if(2==(0|(Q=Q+1|0)))break;ee=ee+n|0}if((0|(k=se+k|0))==(0|re))break;ne=ne+ae|0}if((0|(ue=ue+1|0))==(0|u))break;le=le+T|0}ce=ce+1|0}while((0|ce)!=(0|x));return v=z,1}(e,n,o,s,h,f,a,u)))return 0|(o=0);break;default:return 0|(o=0)}return 0|(o=1)}function Q(e,t,i){e|=0,t|=0;var n,o,a=0;if((0|(i|=0))>=8192)return 0|N(0|e,0|t,0|i);if(o=0|e,n=e+i|0,(3&e)==(3&t)){for(;3&e;){if(!i)return 0|o;r[e>>0]=0|r[t>>0],e=e+1|0,t=t+1|0,i=i-1|0}for(a=(i=-4&n|0)-64|0;(0|e)<=(0|a);)l[e>>2]=l[t>>2],l[e+4>>2]=l[t+4>>2],l[e+8>>2]=l[t+8>>2],l[e+12>>2]=l[t+12>>2],l[e+16>>2]=l[t+16>>2],l[e+20>>2]=l[t+20>>2],l[e+24>>2]=l[t+24>>2],l[e+28>>2]=l[t+28>>2],l[e+32>>2]=l[t+32>>2],l[e+36>>2]=l[t+36>>2],l[e+40>>2]=l[t+40>>2],l[e+44>>2]=l[t+44>>2],l[e+48>>2]=l[t+48>>2],l[e+52>>2]=l[t+52>>2],l[e+56>>2]=l[t+56>>2],l[e+60>>2]=l[t+60>>2],e=e+64|0,t=t+64|0;for(;(0|e)<(0|i);)l[e>>2]=l[t>>2],e=e+4|0,t=t+4|0}else for(i=n-4|0;(0|e)<(0|i);)r[e>>0]=0|r[t>>0],r[e+1>>0]=0|r[t+1>>0],r[e+2>>0]=0|r[t+2>>0],r[e+3>>0]=0|r[t+3>>0],e=e+4|0,t=t+4|0;for(;(0|e)<(0|n);)r[e>>0]=0|r[t>>0],e=e+1|0,t=t+1|0;return 0|o}function ee(e,t,i){t|=0,i|=0;var n,r,o,a,s,u=0,c=0,h=0,d=0,f=0,p=0;s=v,v=v+48|0,a=s+16|0,h=s,c=s+32|0,u=0|l[(r=(e|=0)+28|0)>>2],l[c>>2]=u,u=(0|l[(o=e+20|0)>>2])-u|0,l[c+4>>2]=u,l[c+8>>2]=t,l[c+12>>2]=i,u=u+i|0,n=e+60|0,l[h>>2]=l[n>>2],l[h+4>>2]=c,l[h+8>>2]=2,h=0|Ge(0|z(146,0|h));e:do{if((0|u)!=(0|h)){for(t=2;!((0|h)<0);)if(u=u-h|0,t=((f=h>>>0>(p=0|l[c+4>>2])>>>0)<<31>>31)+t|0,p=h-(f?p:0)|0,l[(c=f?c+8|0:c)>>2]=(0|l[c>>2])+p,l[(f=c+4|0)>>2]=(0|l[f>>2])-p,l[a>>2]=l[n>>2],l[a+4>>2]=c,l[a+8>>2]=t,(0|u)==(0|(h=0|Ge(0|z(146,0|a))))){d=3;break e}l[e+16>>2]=0,l[r>>2]=0,l[o>>2]=0,l[e>>2]=32|l[e>>2],i=2==(0|t)?0:i-(0|l[c+4>>2])|0}else d=3}while(0);return 3==(0|d)&&(p=0|l[e+44>>2],l[e+16>>2]=p+(0|l[e+48>>2]),l[r>>2]=p,l[o>>2]=p),v=s,0|i}function te(e,t,i){e|=0,t|=0,i|=0;var n,o,a,s,u,c=0,h=0,d=0,f=0,p=0,_=0,m=0;u=v,v=v+224|0,n=u+120|0,a=u,s=u+136|0,h=(c=o=u+80|0)+40|0;do{l[c>>2]=0,c=c+4|0}while((0|c)<(0|h));return l[n>>2]=l[i>>2],(0|U(0,t,n,a,o))<0?i=-1:(l[e+76>>2],m=32&(i=0|l[e>>2]),(0|r[e+74>>0])<1&&(l[e>>2]=-33&i),0|l[(c=e+48|0)>>2]?i=0|U(e,t,n,a,o):(d=0|l[(h=e+44|0)>>2],l[h>>2]=s,l[(f=e+28|0)>>2]=s,l[(p=e+20|0)>>2]=s,l[c>>2]=80,l[(_=e+16|0)>>2]=s+80,i=0|U(e,t,n,a,o),d&&(at[7&l[e+36>>2]](e,0,0),i=0==(0|l[p>>2])?-1:i,l[h>>2]=d,l[c>>2]=0,l[_>>2]=0,l[f>>2]=0,l[p>>2]=0)),c=0|l[e>>2],l[e>>2]=c|m,i=0==(32&c|0)?i:-1),v=u,0|i}function ie(e,t,i,n){t|=0,i|=0,n|=0;var o,s,u,c,h,d,f,p=0,_=0;f=v,v=v+64|0,h=f,_=0|l[(e|=0)>>2],d=e+(0|l[_+-8>>2])|0,_=0|l[_+-4>>2],l[h>>2]=i,l[h+4>>2]=e,l[h+8>>2]=t,l[h+12>>2]=n,t=h+20|0,n=h+24|0,o=h+28|0,s=h+32|0,u=h+40|0,c=(p=e=h+16|0)+36|0;do{l[p>>2]=0,p=p+4|0}while((0|p)<(0|c));a[e+36>>1]=0,r[e+38>>0]=0;e:do{if(0|He(_,i))l[h+48>>2]=1,dt[3&l[20+(0|l[_>>2])>>2]](_,h,d,d,1,0),e=1==(0|l[n>>2])?d:0;else{switch(st[3&l[24+(0|l[_>>2])>>2]](_,h,d,1,0),0|l[h+36>>2]){case 0:e=1==(0|l[u>>2])&1==(0|l[o>>2])&1==(0|l[s>>2])?0|l[t>>2]:0;break e;case 1:break;default:e=0;break e}if(1!=(0|l[n>>2])&&!(0==(0|l[u>>2])&1==(0|l[o>>2])&1==(0|l[s>>2]))){e=0;break}e=0|l[e>>2]}}while(0);return v=f,0|e}function ne(e){var t,i=0,n=0,r=0,o=0,a=0,s=0,u=0;if(t=v,v=v+544|0,s=t+16|0,i=t,o=t+32|0,((n=0|l[(a=(e|=0)+8|0)>>2])+-1|0)>>>0>=8192&&(l[i>>2]=866,l[i+4>>2]=3006,l[i+8>>2]=1257,Oe(o,812,i),xe(o)),l[e>>2]=n,(i=0|l[(r=e+20|0)>>2])?u=n:((i=0|he(180,0))?(l[(u=i+164|0)>>2]=0,l[u+4>>2]=0,l[u+8>>2]=0,l[u+12>>2]=0):i=0,l[r>>2]=i,u=0|l[e>>2]),0|l[a>>2]?s=u:(l[s>>2]=866,l[s+4>>2]=910,l[s+8>>2]=1497,Oe(o,812,s),xe(o),s=0|l[e>>2]),o=0|l[e+4>>2],!(s>>>0>16))return e=0|W(i,u,o,e=0),v=t,0|e;for(n=s,r=0;a=r+1|0,n>>>0>3;)n>>>=1,r=a;return e=0|W(i,u,o,e=255&((e=r+2+(32!=(0|a)&1<<a>>>0<s>>>0&1)|0)>>>0<11?e:11)),v=t,0|e}function re(e){var t,i,n,r,o,a,s=0,u=0;a=v,v=v+576|0,r=a+48|0,o=a+32|0,i=a+16|0,t=a,n=a+64|0,s=0|l[(e|=0)+168>>2];do{if(0|s){if(u=0|l[s+-4>>2],s=s+-8|0,0!=(0|u)&&(0|u)==(0|~l[s>>2])||(l[t>>2]=866,l[t+4>>2]=651,l[t+8>>2]=1579,Oe(n,812,t),xe(n)),7&s){l[i>>2]=866,l[i+4>>2]=2506,l[i+8>>2]=1232,Oe(n,812,i),xe(n);break}_e(s,0,0,1,0);break}}while(0);if(s=0|l[e+176>>2])return u=0|l[s+-4>>2],s=s+-8|0,0!=(0|u)&&(0|u)==(0|~l[s>>2])||(l[o>>2]=866,l[o+4>>2]=651,l[o+8>>2]=1579,Oe(n,812,o),xe(n)),7&s?(l[r>>2]=866,l[r+4>>2]=2506,l[r+8>>2]=1232,Oe(n,812,r),xe(n),void(v=a)):(_e(s,0,0,1,0),void(v=a));v=a}function oe(e,t,i){var n=0;return!(0!=(0|(e|=0))&(t|=0)>>>0>73&0!=(0|(i|=0)))||40!=(0|l[i>>2])||18552!=((0|c[e>>0])<<8|0|c[e+1>>0]|0)||((0|c[e+2>>0])<<8|0|c[e+3>>0])>>>0<74||((0|c[e+7>>0])<<16|(0|c[e+6>>0])<<24|(0|c[e+8>>0])<<8|0|c[e+9>>0])>>>0>t>>>0?0|(i=0):(l[i+4>>2]=(0|c[e+12>>0])<<8|0|c[e+13>>0],l[i+8>>2]=(0|c[e+14>>0])<<8|0|c[e+15>>0],l[i+12>>2]=c[e+16>>0],l[i+16>>2]=c[e+17>>0],t=e+18|0,l[(n=i+32|0)>>2]=c[t>>0],l[n+4>>2]=0,t=0|r[t>>0],l[i+20>>2]=t<<24>>24==0|t<<24>>24==9?8:16,l[i+24>>2]=(0|c[e+26>>0])<<16|(0|c[e+25>>0])<<24|(0|c[e+27>>0])<<8|0|c[e+28>>0],l[i+28>>2]=(0|c[e+30>>0])<<16|(0|c[e+29>>0])<<24|(0|c[e+31>>0])<<8|0|c[e+32>>0],0|(i=1))}function ae(e,t){e|=0;var i,n,r,o=0,a=0,s=0,u=0,h=0;if(r=v,v=v+544|0,h=r+16|0,o=r,u=r+32|0,(t|=0)>>>0>=33&&(l[o>>2]=866,l[o+4>>2]=3199,l[o+8>>2]=1350,Oe(u,812,o),xe(u)),(0|(o=0|l[(n=e+20|0)>>2]))>=(0|t))return s=a=e+16|0,u=o,h=(a=0|l[a>>2])>>>(h=32-t|0),a<<=t,l[s>>2]=a,t=u-t|0,l[n>>2]=t,v=r,0|h;a=e+4|0,s=e+8|0,i=e+16|0;do{(0|(e=0|l[a>>2]))==(0|l[s>>2])?e=0:(l[a>>2]=e+1,e=0|c[e>>0]),o=o+8|0,l[n>>2]=o,(0|o)>=33&&(l[h>>2]=866,l[h+4>>2]=3208,l[h+8>>2]=1366,Oe(u,812,h),xe(u),o=0|l[n>>2]),e=e<<32-o|l[i>>2],l[i>>2]=e}while((0|o)<(0|t));return h=e>>>(h=32-t|0),u=e<<t,l[i>>2]=u,t=o-t|0,l[n>>2]=t,v=r,0|h}function se(e,t,i){e|=0;var n=0,o=0,a=0,s=0;a=255&(t|=0),n=0!=(0|(i|=0));e:do{if(n&0!=(3&e|0))for(o=255&t;;){if((0|r[e>>0])==o<<24>>24){s=6;break e}if(!((n=0!=(0|(i=i+-1|0)))&0!=(3&(e=e+1|0)|0))){s=5;break}}else s=5}while(0);5==(0|s)&&(n?s=6:i=0);e:do{if(6==(0|s)&&(o=255&t,(0|r[e>>0])!=o<<24>>24)){n=0|S(a,16843009);t:do{if(i>>>0>3){for(;!((-2139062144&(a=l[e>>2]^n)^-2139062144)&a+-16843009|0);)if(e=e+4|0,(i=i+-4|0)>>>0<=3){s=11;break t}}else s=11}while(0);if(11==(0|s)&&!i){i=0;break}for(;;){if((0|r[e>>0])==o<<24>>24)break e;if(e=e+1|0,!(i=i+-1|0)){i=0;break}}}}while(0);return 0|(0|i?e:0)}function le(e,t,i,n,r){t|=0,i|=0,n|=0,r|=0;var o,a,s,u=0,h=0,d=0;return s=v,v=v+528|0,d=s,h=s+16|0,o=0|l[(e|=0)+88>>2],a=(0|c[o+70+(r<<2)+1>>0])<<16|(0|c[o+70+(r<<2)>>0])<<24|(0|c[o+70+(r<<2)+2>>0])<<8|0|c[o+70+(r<<2)+3>>0],(u=(u=r+1|0)>>>0<(0|c[o+16>>0])>>>0?(0|c[o+70+(u<<2)+1>>0])<<16|(0|c[o+70+(u<<2)>>0])<<24|(0|c[o+70+(u<<2)+2>>0])<<8|0|c[o+70+(u<<2)+3>>0]:0|l[e+8>>2])>>>0>a>>>0?(d=0|J(e,h=(h=0|l[(h=e+4|0)>>2])+a|0,d=u-a|0,t,i,n,r),v=s,0|d):(l[d>>2]=866,l[d+4>>2]=3694,l[d+8>>2]=1508,Oe(h,812,d),xe(h),d=0|J(e,h=(h=0|l[(h=e+4|0)>>2])+a|0,d=u-a|0,t,i,n,r),v=s,0|d)}function ue(e,t,i){e|=0,t|=0;var n=0,o=0,a=0,s=0,u=0;(o=0|l[(n=(i|=0)+16|0)>>2])?a=5:0|Se(i)?n=0:(o=0|l[n>>2],a=5);e:do{if(5==(0|a)){if(n=s=0|l[(u=i+20|0)>>2],(o-s|0)>>>0<t>>>0){n=0|at[7&l[i+36>>2]](i,e,t);break}t:do{if((0|r[i+75>>0])>-1){for(s=t;;){if(!s){a=0,o=e;break t}if(10==(0|r[e+(o=s+-1|0)>>0]))break;s=o}if((n=0|at[7&l[i+36>>2]](i,e,s))>>>0<s>>>0)break e;a=s,o=e+s|0,t=t-s|0,n=0|l[u>>2]}else a=0,o=e}while(0);Q(0|n,0|o,0|t),l[u>>2]=(0|l[u>>2])+t,n=a+t|0}}while(0);return 0|n}function ce(e){var t,i,n=0,o=0,a=0;i=v,v=v+544|0,a=i+16|0,o=i,t=i+32|0,n=0|l[(e|=0)+20>>2];do{if(0|n){if(re(n),7&n){l[o>>2]=866,l[o+4>>2]=2506,l[o+8>>2]=1232,Oe(t,812,o),xe(t);break}_e(n,0,0,1,0);break}}while(0);if(!(o=0|l[(n=e+4|0)>>2]))return r[(a=e+16|0)>>0]=0,void(v=i);7&o?(l[a>>2]=866,l[a+4>>2]=2506,l[a+8>>2]=1232,Oe(t,812,a),xe(t)):_e(o,0,0,1,0),l[n>>2]=0,l[e+8>>2]=0,l[e+12>>2]=0,r[(a=e+16|0)>>0]=0,v=i}function he(e,t){t|=0;var i,n,r,o,a=0,s=0,u=0;return o=v,v=v+560|0,u=o+32|0,r=o+16|0,a=o,n=o+48|0,i=o+44|0,(s=0|(s=(e|=0)+3&-4)?s:4)>>>0>2147418112?(l[a>>2]=866,l[a+4>>2]=2506,l[a+8>>2]=1103,Oe(n,812,a),xe(n),v=o,0|(u=0)):(l[i>>2]=s,e=0|_e(0,s,i,1,0),a=0|l[i>>2],0|t&&(l[t>>2]=a),0==(0|e)|a>>>0<s>>>0?(l[r>>2]=866,l[r+4>>2]=2506,l[r+8>>2]=1129,Oe(n,812,r),xe(n),e=0):7&e&&(l[u>>2]=866,l[u+4>>2]=2533,l[u+8>>2]=1156,Oe(n,812,u),xe(n)),v=o,0|(u=e))}function de(e,t,i){t|=0;var n,o=0,a=0,s=0;if(n=(e|=0)+(i|=0)|0,t&=255,(0|i)>=67){for(;3&e;)r[e>>0]=t,e=e+1|0;for(a=(o=-4&n|0)-64|0,s=t|t<<8|t<<16|t<<24;(0|e)<=(0|a);)l[e>>2]=s,l[e+4>>2]=s,l[e+8>>2]=s,l[e+12>>2]=s,l[e+16>>2]=s,l[e+20>>2]=s,l[e+24>>2]=s,l[e+28>>2]=s,l[e+32>>2]=s,l[e+36>>2]=s,l[e+40>>2]=s,l[e+44>>2]=s,l[e+48>>2]=s,l[e+52>>2]=s,l[e+56>>2]=s,l[e+60>>2]=s,e=e+64|0;for(;(0|e)<(0|o);)l[e>>2]=s,e=e+4|0}for(;(0|e)<(0|n);)r[e>>0]=t,e=e+1|0;return n-i|0}function fe(e,t,i,n,o){e|=0,i|=0,n|=0,o|=0;var a=0,s=0,u=0,c=0;r[(t|=0)+53>>0]=1;do{if((0|l[t+4>>2])==(0|n)){if(r[t+52>>0]=1,u=t+54|0,c=t+48|0,s=t+24|0,e=t+36|0,!(a=0|l[(n=t+16|0)>>2])){if(l[n>>2]=i,l[s>>2]=o,l[e>>2]=1,!(1==(0|l[c>>2])&1==(0|o)))break;r[u>>0]=1;break}if((0|a)!=(0|i)){l[e>>2]=1+(0|l[e>>2]),r[u>>0]=1;break}2==(0|(e=0|l[s>>2]))&&(l[s>>2]=o,e=o),1==(0|l[c>>2])&1==(0|e)&&(r[u>>0]=1)}}while(0)}function pe(e,t){e|=0;var i,n,o,a=0,s=0,u=0,h=0;o=v,v=v+16|0,n=255&(t|=0),r[(i=o)>>0]=n,(u=0|l[(s=e+16|0)>>2])?h=4:0|Se(e)?a=-1:(u=0|l[s>>2],h=4);do{if(4==(0|h)){if((s=0|l[(h=e+20|0)>>2])>>>0<u>>>0&&(0|(a=255&t))!=(0|r[e+75>>0])){l[h>>2]=s+1,r[s>>0]=n;break}a=1==(0|at[7&l[e+36>>2]](e,i,1))?0|c[i>>0]:-1}}while(0);return v=o,0|a}function _e(e,t,i,n,r){e|=0,t|=0,i|=0,n|=0,r|=0;do{if(e){if(!t){if(H(e),!i){t=0;break}l[i>>2]=0,t=0;break}n?e=0==(0|(t=0|ye(e,t)))?e:t:t=0,i&&(r=0|Ie(e),l[i>>2]=r)}else t=0|G(t),i&&(e=t?0|Ie(t):0,l[i>>2]=e)}while(0);return 0|t}function me(e,t){e=+e,t|=0;var i,n,r=0;switch(m[y>>3]=e,2047&(n=0|Re(0|(r=0|l[y>>2]),0|(i=0|l[y+4>>2]),52))){case 0:0!=e?(e=+me(0x10000000000000000*e,t),r=(0|l[t>>2])-64|0):r=0,l[t>>2]=r;break;case 2047:break;default:l[t>>2]=(2047&n)-1022,l[y>>2]=r,l[y+4>>2]=-2146435073&i|1071644672,e=+m[y>>3]}return+e}function $e(e,t){e|=0,t|=0;var i=0,n=0;for(n=0;;){if((0|c[2140+n>>0])==(0|e)){e=2;break}if(87==(0|(i=n+1|0))){i=2228,n=87,e=5;break}n=i}if(2==(0|e)&&(n?(i=2228,e=5):i=2228),5==(0|e))for(;;){do{e=i,i=i+1|0}while(0!=(0|r[e>>0]));if(!(n=n+-1|0))break;e=5}return 0|function(e,t){return 0|function(e,t){return e|=0,t=(t|=0)?0|function(e,t,i){t|=0,i|=0;var n,o=0,a=0,s=0,u=0,c=0,h=0,d=0,f=0,p=0;n=1794895138+(0|l[(e|=0)>>2])|0,s=0|Ye(0|l[e+8>>2],n),o=0|Ye(0|l[e+12>>2],n),a=0|Ye(0|l[e+16>>2],n);e:do{if(s>>>0<t>>>2>>>0&&(p=t-(s<<2)|0,o>>>0<p>>>0&a>>>0<p>>>0)&&0==(3&(a|o)|0)){for(p=o>>>2,f=a>>>2,d=0;;){if(o=0|Ye(0|l[e+((a=(u=(h=d+(c=s>>>1)|0)<<1)+p|0)<<2)>>2],n),!((a=0|Ye(0|l[e+(a+1<<2)>>2],n))>>>0<t>>>0&o>>>0<(t-a|0)>>>0)){o=0;break e}if(0|r[e+(a+o)>>0]){o=0;break e}if(!(o=0|we(i,e+a|0)))break;if(o=(0|o)<0,1==(0|s)){o=0;break e}d=o?d:h,s=o?c:s-c|0}a=0|Ye(0|l[e+((o=u+f|0)<<2)>>2],n),o=(o=0|Ye(0|l[e+(o+1<<2)>>2],n))>>>0<t>>>0&a>>>0<(t-o|0)>>>0&&0==(0|r[e+(o+a)>>0])?e+o|0:0}else o=0}while(0);return 0|o}(0|l[t>>2],0|l[t+4>>2],e):0,0|(0|t?t:e)}(e|=0,t|=0)}(i,0|l[t+20>>2])}function ge(e,t,i){i|=0;var n=0;if((t|=0)>>>0>0|0==(0|t)&(e|=0)>>>0>4294967295){for(;n=0|Me(0|e,0|t,10,0),r[(i=i+-1|0)>>0]=255&n|48,n=e,e=0|je(0|e,0|t,10,0),t>>>0>9|9==(0|t)&n>>>0>4294967295;)t=b;t=e}else t=e;if(t)for(;r[(i=i+-1|0)>>0]=48|(t>>>0)%10,!(t>>>0<10);)t=(t>>>0)/10|0;return 0|i}function ye(e,t){t|=0;var i=0,n=0;return(e|=0)?t>>>0>4294967231?(t=0|tt(),l[t>>2]=12,0|(t=0)):(i=0|function(e,t){t|=0;var i,n=0,r=0,o=0,a=0,s=0,u=0,c=0,h=0,d=0;if(i=(e|=0)+(n=-8&(h=0|l[(d=e+4|0)>>2]))|0,!(3&h))return t>>>0<256?0|(e=0):(n>>>0>=(t+4|0)>>>0&&(n-t|0)>>>0<=l[1264]<<1>>>0||(e=0),0|e);if(n>>>0>=t>>>0)return(n=n-t|0)>>>0<=15||(c=e+t|0,l[d>>2]=1&h|t|2,l[c+4>>2]=3|n,l[(d=c+n+4|0)>>2]=1|l[d>>2],Y(c,n)),0|e;if((0|i)==(0|l[1150]))return n=(c=(0|l[1147])+n|0)-t|0,r=e+t|0,c>>>0<=t>>>0?0|(e=0):(l[d>>2]=1&h|t|2,l[r+4>>2]=1|n,l[1150]=r,l[1147]=n,0|e);if((0|i)==(0|l[1149]))return(o=(0|l[1146])+n|0)>>>0<t>>>0?0|(e=0):(r=1&h,(n=o-t|0)>>>0>15?(c=(h=e+t|0)+n|0,l[d>>2]=r|t|2,l[h+4>>2]=1|n,l[c>>2]=n,l[(r=c+4|0)>>2]=-2&l[r>>2],r=h):(l[d>>2]=r|o|2,l[(r=e+o+4|0)>>2]=1|l[r>>2],r=0,n=0),l[1146]=n,l[1149]=r,0|e);if(2&(r=0|l[i+4>>2])|0||(u=(-8&r)+n|0)>>>0<t>>>0)return 0;c=u-t|0,o=r>>>3;do{if(r>>>0<256){if(r=0|l[i+8>>2],(0|(n=0|l[i+12>>2]))==(0|r)){l[1144]=l[1144]&~(1<<o);break}l[r+12>>2]=n,l[n+8>>2]=r;break}s=0|l[i+24>>2],n=0|l[i+12>>2];do{if((0|n)==(0|i)){if(n=0|l[(r=4+(o=i+16|0)|0)>>2])a=r;else{if(!(n=0|l[o>>2])){o=0;break}a=o}for(;;)if(0|(r=0|l[(o=n+20|0)>>2]))n=r,a=o;else{if(!(o=0|l[(r=n+16|0)>>2]))break;n=o,a=r}l[a>>2]=0,o=n}else o=0|l[i+8>>2],l[o+12>>2]=n,l[n+8>>2]=o,o=n}while(0);if(0|s){if(n=0|l[i+28>>2],(0|i)==(0|l[(r=4880+(n<<2)|0)>>2])){if(l[r>>2]=o,!o){l[1145]=l[1145]&~(1<<n);break}}else if(l[s+16+(((0|l[s+16>>2])!=(0|i)&1)<<2)>>2]=o,!o)break;l[o+24>>2]=s,0|(r=0|l[(n=i+16|0)>>2])&&(l[o+16>>2]=r,l[r+24>>2]=o),0|(n=0|l[n+4>>2])&&(l[o+20>>2]=n,l[n+24>>2]=o)}}while(0);return n=1&h,c>>>0<16?(l[d>>2]=u|n|2,l[(d=e+u+4|0)>>2]=1|l[d>>2],0|e):(h=e+t|0,l[d>>2]=n|t|2,l[h+4>>2]=3|c,l[(d=h+c+4|0)>>2]=1|l[d>>2],Y(h,c),0|e)}(e+-8|0,t>>>0<11?16:t+11&-8),0|i?0|(t=i+8|0):(i=0|G(t))?(Q(0|i,0|e,0|((n=(-8&(n=0|l[e+-4>>2]))-(0==(3&n|0)?8:4)|0)>>>0<t>>>0?n:t)),H(e),0|(t=i)):0|(t=0)):0|(t=0|G(t))}function ve(e,t,i,n){e|=0,i|=0,n|=0;var o,a,s;o=0|l[(e=(t|=0)+16|0)>>2],a=t+36|0,s=t+24|0;do{if(o){if((0|o)!=(0|i)){l[a>>2]=1+(0|l[a>>2]),l[s>>2]=2,r[t+54>>0]=1;break}2==(0|l[s>>2])&&(l[s>>2]=n)}else l[e>>2]=i,l[s>>2]=n,l[a>>2]=1}while(0)}function xe(e){e|=0;var t,i=0,n=0;t=0|l[119],l[t+76>>2];do{if((0|ke(e,t))<0)e=1;else{if(10!=(0|r[t+75>>0])&&(n=0|l[(i=t+20|0)>>2])>>>0<(0|l[t+16>>2])>>>0){l[i>>2]=n+1,r[n>>0]=10,e=0;break}e=(0|pe(t,10))<0}}while(0);return e<<31>>31|0}function be(e,t,i,n,r){e|=0,t|=0;var o,a;if(a=v,v=v+256|0,o=a,(0|(i|=0))>(0|(n|=0))&0==(73728&(r|=0)|0)){if(de(0|o,0|t,0|((r=i-n|0)>>>0<256?r:256)),r>>>0>255){t=i-n|0;do{Ue(e,o,256),r=r+-256|0}while(r>>>0>255);r=255&t}Ue(e,o,r)}v=a}function Se(e){var t=0,i=0;return i=0|r[(t=(e|=0)+74|0)>>0],r[t>>0]=i+255|i,8&(t=0|l[e>>2])?(l[e>>2]=32|t,e=-1):(l[e+8>>2]=0,l[e+4>>2]=0,i=0|l[e+44>>2],l[e+28>>2]=i,l[e+20>>2]=i,l[e+16>>2]=i+(0|l[e+48>>2]),e=0),0|e}function we(e,t){t|=0;var i=0,n=0;if(i=0|r[(e|=0)>>0],n=0|r[t>>0],i<<24>>24==0||i<<24>>24!=n<<24>>24)e=n;else{do{t=t+1|0,i=0|r[(e=e+1|0)>>0],n=0|r[t>>0]}while(i<<24>>24!=0&&i<<24>>24==n<<24>>24);e=n}return(255&i)-(255&e)|0}function Ce(e){var t,i;return(0|(i=(e|=0)+15&-16|0))>0&(0|(e=(t=0|l[g>>2])+i|0))<(0|t)|(0|e)<0?(E(),O(12),-1):(l[g>>2]=e,(0|e)>(0|P())&&0==(0|T())?(l[g>>2]=t,O(12),-1):0|t)}function Te(e){var t=0,i=0,n=0;if(i=0|l[(e|=0)>>2],(n=(0|r[i>>0])-48|0)>>>0<10){t=0;do{t=n+(10*t|0)|0,i=i+1|0,l[e>>2]=i,n=(0|r[i>>0])-48|0}while(n>>>0<10)}else t=0;return 0|t}function Pe(e,t,i,n){if(i|=0,n|=0,!(0==(0|(e|=0))&0==(0|(t|=0))))do{r[(i=i+-1|0)>>0]=0|c[2122+(15&e)>>0]|n,e=0|Re(0|e,0|t,4),t=b}while(!(0==(0|e)&0==(0|t)));return 0|i}function Ee(e){var t=0;return(0|(t=0|r[x+(255&(e|=0))>>0]))<8?0|t:(0|(t=0|r[x+(e>>8&255)>>0]))<8?t+8|0:(0|(t=0|r[x+(e>>16&255)>>0]))<8?t+16|0:24+(0|r[x+(e>>>24)>>0])|0}function Ae(e,t,i,n){i|=0,n|=0;var r=0;(0|l[(t|=0)+4>>2])==(0|i)&&1!=(0|l[(r=t+28|0)>>2])&&(l[r>>2]=n)}function Le(e,t,i){if(i|=0,!(0==(0|(e|=0))&0==(0|(t|=0))))do{r[(i=i+-1|0)>>0]=7&e|48,e=0|Re(0|e,0|t,3),t=b}while(!(0==(0|e)&0==(0|t)));return 0|i}function Me(e,t,i,n){var r,o;return o=v,v=v+16|0,j(e|=0,t|=0,i|=0,n|=0,r=0|o),v=o,b=0|l[r+4>>2],0|l[r>>2]}function Ie(e){var t=0;return(e|=0)?0|(1==(0|(e=3&(t=0|l[e+-4>>2])))?0:(-8&t)-(0==(0|e)?8:4)|0):0}function Oe(e,t,i){e|=0,t|=0,i|=0;var n,o;return n=v,v=v+16|0,l[(o=n)>>2]=i,i=0|function(e,t,i){return 0|function(e,t,i,n){e|=0,t|=0,i|=0,n|=0;var o,a,s=0,u=0,c=0,h=0,d=0;a=v,v=v+128|0,s=a+124|0,c=604,o=(u=d=a)+124|0;do{l[u>>2]=l[c>>2],u=u+4|0,c=c+4|0}while((0|u)<(0|o));return(t+-1|0)>>>0>2147483646?t?(t=0|tt(),l[t>>2]=75,t=-1):(e=s,t=1,h=4):h=4,4==(0|h)&&(h=t>>>0>(h=-2-e|0)>>>0?h:t,l[d+48>>2]=h,l[(s=d+20|0)>>2]=e,l[d+44>>2]=e,t=e+h|0,l[(e=d+16|0)>>2]=t,l[d+28>>2]=t,t=0|te(d,i,n),h&&(d=0|l[s>>2],r[d+(((0|d)==(0|l[e>>2]))<<31>>31)>>0]=0)),v=a,0|t}(e|=0,2147483647,t|=0,i|=0)}(e,t,o),v=n,0|i}function De(e,t,i){return e|=0,t|=0,(0|(i|=0))<32?(b=t<<i|(e&(1<<i)-1<<32-i)>>>32-i,e<<i):(b=e<<i-32,0)}function Re(e,t,i){return e|=0,t|=0,(0|(i|=0))<32?(b=t>>>i,e>>>i|(t&(1<<i)-1)<<32-i):(b=0,t>>>i-32|0)}function Ne(e,t){e|=0,t|=0;var i;i=v,v=v+16|0,l[i>>2]=t,te(t=0|l[26],e,i),function(e,t){var i,n=0,o=0,a=0,s=0;i=255&(e|=0),n=255&e,l[76+(t|=0)>>2],s=3;do{if(3==(0|s)){if((0|n)!=(0|r[t+75>>0])&&(a=0|l[(o=t+20|0)>>2])>>>0<(0|l[t+16>>2])>>>0){l[o>>2]=a+1,r[a>>0]=i;break}n=0|pe(t,e)}}while(0)}(10,t),D()}function Fe(e,t,i,n){return b=n=(t|=0)-(n|=0)-((i|=0)>>>0>(e|=0)>>>0|0)>>>0,0|e-i>>>0}function Be(e){e=+e;var t;return m[y>>3]=e,t=0|l[y>>2],b=0|l[y+4>>2],0|t}function ze(e,t,i,n){return b=(t|=0)+(n|=0)+((i=(e|=0)+(i|=0)>>>0)>>>0<e>>>0|0)>>>0,0|i}function Ge(e){var t=0;return(e|=0)>>>0>4294963200&&(t=0|tt(),l[t>>2]=0-e,e=-1),0|e}function ke(e,t){t|=0;var i;return i=0|function(e){var t,i=0,n=0;t=e|=0;e:do{if(3&t)for(i=t;;){if(!(0|r[e>>0])){e=i;break e}if(!(3&(i=e=e+1|0))){n=4;break}}else n=4}while(0);if(4==(0|n)){for(;!((-2139062144&(i=0|l[e>>2])^-2139062144)&i+-16843009);)e=e+4|0;if((255&i)<<24>>24)do{e=e+1|0}while(0!=(0|r[e>>0]))}return e-t|0}(e|=0),((0|function(e,t,i,n){var r;return e|=0,n|=0,r=0|S(i|=0,t|=0),i=0==(0|t)?0:i,(0|(e=(l[n+76>>2],0|ue(e,r,n))))!=(0|r)&&(i=(e>>>0)/(t>>>0)|0),0|i}(e,1,i,t))!=(0|i))<<31>>31|0}function Ue(e,t,i){t|=0,i|=0,32&l[(e|=0)>>2]||ue(t,i,e)}function Ve(e){e|=0;var t;return t=188+(0|it())|0,0|$e(e,0|l[t>>2])}function We(e,t){return t|=0,e=(e|=0)?0|function(e,t,i){e|=0,t|=0,i|=0;do{if(e){if(t>>>0<128){r[e>>0]=t,e=1;break}if(i=188+(0|it())|0,!(0|l[l[i>>2]>>2])){if(57216==(-128&t|0)){r[e>>0]=t,e=1;break}e=0|tt(),l[e>>2]=84,e=-1;break}if(t>>>0<2048){r[e>>0]=t>>>6|192,r[e+1>>0]=63&t|128,e=2;break}if(t>>>0<55296|57344==(-8192&t|0)){r[e>>0]=t>>>12|224,r[e+1>>0]=t>>>6&63|128,r[e+2>>0]=63&t|128,e=3;break}if((t+-65536|0)>>>0<1048576){r[e>>0]=t>>>18|240,r[e+1>>0]=t>>>12&63|128,r[e+2>>0]=t>>>6&63|128,r[e+3>>0]=63&t|128,e=4;break}e=0|tt(),l[e>>2]=84,e=-1;break}e=1}while(0);return 0|e}(e,t,0):0,0|e}function He(e,t,i){return(0|(e|=0))==(0|(t|=0))|0}function Ye(e,t){t|=0;var i;return i=0|qe(0|(e|=0)),0|(0==(0|t)?e:i)}function je(e,t,i,n){return 0|j(e|=0,t|=0,i|=0,n|=0,0)}function qe(e){return(255&(e|=0))<<24|(e>>8&255)<<16|(e>>16&255)<<8|e>>>24|0}function Xe(e,t,i,n,r,o){C(6)}function Ke(e,t,i,n,r){C(1)}function Ze(e){(function(e){H(e|=0)})(e|=0)}function Je(e,t,i,n){C(7)}function Qe(e,t,i){return C(0),0}function et(e,t){return+ +me(e=+e,t|=0)}function tt(){return 64+(0|it())|0}function it(){return 232}function nt(e){}function rt(e){C(2)}function ot(){C(5)}t.__ZSt18uncaught_exceptionv;var at=[Qe,ee,function(e,t,i){var n,r,o;return e|=0,t|=0,i|=0,r=v,v=v+32|0,n=r+20|0,l[(o=r)>>2]=l[e+60>>2],l[o+4>>2]=0,l[o+8>>2]=t,l[o+12>>2]=n,l[o+16>>2]=i,(0|Ge(0|B(140,0|o)))<0?(l[n>>2]=-1,e=-1):e=0|l[n>>2],v=r,0|e},function(e,t,i){t|=0,i|=0;var n,o=0;return n=v,v=v+32|0,o=n,l[(e|=0)+36>>2]=1,0==(64&l[e>>2]|0)&&(l[o>>2]=l[e+60>>2],l[o+4>>2]=21523,l[o+8>>2]=n+16,0|L(54,0|o))&&(r[e+75>>0]=-1),o=0|ee(e,t,i),v=n,0|o},function(e,t,i){var n,r;return t|=0,i|=0,Q(0|(r=0|l[(n=(e|=0)+20|0)>>2]),0|t,0|(e=(e=(0|l[e+16>>2])-r|0)>>>0>i>>>0?i:e)),l[n>>2]=(0|l[n>>2])+e,0|i},function(e,t,i){i|=0;var n,r,o=0,a=0;if(r=v,v=v+64|0,n=r,0|He(e|=0,t|=0))t=1;else if(0!=(0|t)&&0!=(0|(a=0|ie(t,32,16,0)))){o=(t=n+4|0)+52|0;do{l[t>>2]=0,t=t+4|0}while((0|t)<(0|o));l[n>>2]=a,l[n+8>>2]=e,l[n+12>>2]=-1,l[n+48>>2]=1,ft[3&l[28+(0|l[a>>2])>>2]](a,n,0|l[i>>2],1),1==(0|l[n+24>>2])?(l[i>>2]=l[n+16>>2],t=1):t=0}else t=0;return v=r,0|t},Qe,Qe],st=[Ke,function(e,t,i,n,o){e|=0,t|=0,i|=0,n|=0;var a=0;do{if(0|He(e,0|l[t+8>>2]))Ae(0,t,i,n);else if(0|He(e,0|l[t>>2])){if(e=t+32|0,(0|l[t+16>>2])!=(0|i)&&(0|l[(a=t+20|0)>>2])!=(0|i)){l[e>>2]=n,l[a>>2]=i,l[(n=t+40|0)>>2]=1+(0|l[n>>2]),1==(0|l[t+36>>2])&&2==(0|l[t+24>>2])&&(r[t+54>>0]=1),l[t+44>>2]=4;break}1==(0|n)&&(l[e>>2]=1)}}while(0)},function(e,t,i,n,o){e|=0,t|=0,i|=0,n|=0,o|=0;var a=0,s=0,u=0,c=0;do{if(0|He(e,0|l[t+8>>2]))Ae(0,t,i,n);else{if(a=e+8|0,!(0|He(e,0|l[t>>2]))){u=0|l[a>>2],st[3&l[24+(0|l[u>>2])>>2]](u,t,i,n,o);break}if(e=t+32|0,(0|l[t+16>>2])!=(0|i)&&(0|l[(s=t+20|0)>>2])!=(0|i)){if(l[e>>2]=n,4==(0|l[(n=t+44|0)>>2]))break;r[(e=t+52|0)>>0]=0,r[(c=t+53|0)>>0]=0,a=0|l[a>>2],dt[3&l[20+(0|l[a>>2])>>2]](a,t,i,i,1,o),0|r[c>>0]?0|r[e>>0]?e=3:(e=3,u=11):(e=4,u=11),11==(0|u)&&(l[s>>2]=i,l[(c=t+40|0)>>2]=1+(0|l[c>>2]),1==(0|l[t+36>>2])&&2==(0|l[t+24>>2])&&(r[t+54>>0]=1)),l[n>>2]=e;break}1==(0|n)&&(l[e>>2]=1)}}while(0)},Ke],lt=[rt,nt,Ze,nt,nt,Ze,function(e){var t;t=v,v=v+16|0,H(e|=0),0|M(0|l[1285],0)?Ne(4406,t):v=t},rt],ut=[function(e){return C(3),0},function(e){var t,i;return t=v,v=v+16|0,i=t,e=0|function(e){return 0|(e|=0)}(0|l[(e|=0)+60>>2]),l[i>>2]=e,e=0|Ge(0|I(6,0|i)),v=t,0|e}],ct=[function(e,t,i){C(4)}],ht=[ot,function(){var e,t,i,n=0,r=0,o=0,a=0,s=0;a=v,v=v+48|0,i=a+32|0,e=a+24|0,s=a+16|0,t=a,a=a+36|0,n=0|function(){var e=0,t=0;if(e=v,v=v+16|0,!(0|R(5136,2)))return t=0|A(0|l[1285]),v=e,0|t;Ne(4307,e);return 0}(),0|n&&0|(o=0|l[n>>2])&&(1126902528==(-256&(r=0|l[(n=o+48|0)>>2])|0)&1129074247==(0|(n=0|l[n+4>>2]))||(l[e>>2]=4168,Ne(4118,e)),n=1126902529==(0|r)&1129074247==(0|n)?0|l[o+44>>2]:o+80|0,l[a>>2]=n,o=0|l[o>>2],n=0|l[o+4>>2],0|at[7&l[16+(0|l[2])>>2]](8,o,a)?(s=0|l[a>>2],s=0|ut[1&l[8+(0|l[s>>2])>>2]](s),l[t>>2]=4168,l[t+4>>2]=n,l[t+8>>2]=s,Ne(4032,t)):(l[s>>2]=4168,l[s+4>>2]=n,Ne(4077,s))),Ne(4156,i)},function(){var e;e=v,v=v+16|0,0|F(5140,6)?Ne(4356,e):v=e},ot],dt=[Xe,function(e,t,i,n,r,o){i|=0,n|=0,r|=0,0|He(e|=0,0|l[(t|=0)+8>>2])&&fe(0,t,i,n,r)},function(e,t,i,n,r,o){i|=0,n|=0,r|=0,o|=0,0|He(e|=0,0|l[(t|=0)+8>>2])?fe(0,t,i,n,r):(e=0|l[e+8>>2],dt[3&l[20+(0|l[e>>2])>>2]](e,t,i,n,r,o))},Xe],ft=[Je,function(e,t,i,n){i|=0,n|=0,0|He(e|=0,0|l[(t|=0)+8>>2])&&ve(0,t,i,n)},function(e,t,i,n){i|=0,n|=0,0|He(e|=0,0|l[(t|=0)+8>>2])?ve(0,t,i,n):(e=0|l[e+8>>2],ft[3&l[28+(0|l[e>>2])>>2]](e,t,i,n))},Je];return{stackSave:function(){return 0|v},_i64Subtract:Fe,_crn_get_bytes_per_block:function(e,t){e|=0,t|=0;var i,n,r,o=0;switch(r=v,v=v+576|0,n=r+40|0,i=r+56|0,l[(o=r)>>2]=40,oe(e,t,o),e=0|l[(t=o+32|0)+4>>2],0|l[t>>2]){case 0:case 9:case 10:if(!e)return v=r,0|(o=8);e=14;break;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:e=e?14:13;break;default:e=14}return 13==(0|e)?(v=r,0|(o=16)):14==(0|e)?(l[n>>2]=866,l[n+4>>2]=2672,l[n+8>>2]=1251,Oe(i,812,n),xe(i),v=r,0|(o=0)):0},setThrew:function(e,t){},dynCall_viii:function(e,t,i,n){t|=0,i|=0,n|=0,ct[0&(e|=0)](0|t,0|i,0|n)},_bitshift64Lshr:Re,_bitshift64Shl:De,dynCall_viiii:function(e,t,i,n,r){t|=0,i|=0,n|=0,r|=0,ft[3&(e|=0)](0|t,0|i,0|n,0|r)},setTempRet0:function(e){b=e|=0},_crn_decompress:function(e,t,i,n,o,s){e|=0,t|=0,i|=0,n|=0,o|=0,s|=0;var u,h,d,f,p=0,_=0,m=0,$=0,g=0;switch(f=v,v=v+592|0,d=f+56|0,m=f+40|0,u=f+72|0,h=f+68|0,l[(g=f)>>2]=40,oe(e,t,g),p=(0|l[g+4>>2])>>>o,_=(0|l[g+8>>2])>>>o,n=0|l[(g=g+32|0)+4>>2],0|l[g>>2]){case 0:case 9:case 10:n?$=14:g=8;break;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:$=n?14:13;break;default:$=14}13==(0|$)?g=16:14==(0|$)&&(l[m>>2]=866,l[m+4>>2]=2672,l[m+8>>2]=1251,Oe(u,812,m),xe(u),g=0),l[h>>2]=i,$=0|function(e,t){var i=0,n=0,o=0,s=0,u=0,h=0,d=0,f=0,p=0,_=0,m=0,$=0;if(m=v,v=v+528|0,p=m,h=m+16|0,0==(0|(e|=0))|(t|=0)>>>0<62||!(d=0|he(300,0)))return v=m,0|($=0);l[d>>2]=519686845,l[d+4>>2]=0,l[d+8>>2]=0,f=d+88|0,i=d+136|0,n=d+160|0,o=d+184|0,s=d+208|0,u=d+232|0,l[(_=d+252|0)>>2]=0,l[_+4>>2]=0,l[_+8>>2]=0,r[_+12>>0]=0,l[(_=d+268|0)>>2]=0,l[_+4>>2]=0,l[_+8>>2]=0,r[_+12>>0]=0,l[(_=d+284|0)>>2]=0,l[_+4>>2]=0,l[_+8>>2]=0,r[_+12>>0]=0,$=(_=f)+44|0;do{l[_>>2]=0,_=_+4|0}while((0|_)<(0|$));return r[f+44>>0]=0,l[i>>2]=0,l[i+4>>2]=0,l[i+8>>2]=0,l[i+12>>2]=0,l[i+16>>2]=0,r[i+20>>0]=0,l[n>>2]=0,l[n+4>>2]=0,l[n+8>>2]=0,l[n+12>>2]=0,l[n+16>>2]=0,r[n+20>>0]=0,l[o>>2]=0,l[o+4>>2]=0,l[o+8>>2]=0,l[o+12>>2]=0,l[o+16>>2]=0,r[o+20>>0]=0,l[s>>2]=0,l[s+4>>2]=0,l[s+8>>2]=0,l[s+12>>2]=0,l[s+16>>2]=0,r[s+20>>0]=0,l[u>>2]=0,l[u+4>>2]=0,l[u+8>>2]=0,l[u+12>>2]=0,r[u+16>>0]=0,0|function(e,t,i){e|=0;var n=0,o=0;return!(0==(0|(t|=0))|(i|=0)>>>0<74)&&18552==((0|c[t>>0])<<8|0|c[t+1>>0]|0)&&((0|c[t+2>>0])<<8|0|c[t+3>>0])>>>0>=74&&((0|c[t+7>>0])<<16|(0|c[t+6>>0])<<24|(0|c[t+8>>0])<<8|0|c[t+9>>0])>>>0<=i>>>0?(l[(n=e+88|0)>>2]=t,l[e+4>>2]=t,l[e+8>>2]=i,0|function(e){var t=0,i=0,n=0,r=0;if(r=92+(e|=0)|0,i=0|l[(n=e+88|0)>>2],t=(0|l[e+4>>2])+((0|c[i+68>>0])<<8|(0|c[i+67>>0])<<16|0|c[i+69>>0])|0,!((i=(0|c[i+65>>0])<<8|0|c[i+66>>0])&&(l[r>>2]=t,l[e+96>>2]=t,l[e+104>>2]=i,l[e+100>>2]=t+i,l[e+108>>2]=0,l[e+112>>2]=0,0|V(r,e+116|0))))return 0|(r=0);t=0|l[n>>2];do{if((0|c[t+39>>0])<<8|0|c[t+40>>0]){if(!(0|V(r,e+140|0)))return 0|(r=0);if(0|V(r,e+188|0)){t=0|l[n>>2];break}return 0|(r=0)}if(!((0|c[t+55>>0])<<8|0|c[t+56>>0]))return 0|(r=0)}while(0);return!((0|c[t+55>>0])<<8|0|c[t+56>>0]|0)||0|V(r,e+164|0)&&0|V(r,e+212|0)?0|(r=1):0|(r=0)}(e)?(t=0|l[n>>2],(0|c[t+39>>0])<<8|0|c[t+40>>0]?0|function(e){var t=0,i=0,n=0,o=0,a=0,s=0,u=0,h=0,d=0,f=0,p=0,_=0,m=0;if(m=v,v=v+576|0,s=m,o=m+64|0,_=m+16|0,t=0|l[(n=88+(e|=0)|0)>>2],p=(0|c[t+39>>0])<<8|0|c[t+40>>0],d=e+236|0,(0|(i=0|l[(a=e+240|0)>>2]))!=(0|p)){if(i>>>0<=p>>>0){do{if((0|l[e+244>>2])>>>0<p>>>0){if(0|Z(d,p,(i+1|0)==(0|p),4,0)){t=0|l[a>>2];break}return r[e+248>>0]=1,v=m,0|(_=0)}t=i}while(0);de((0|l[d>>2])+(t<<2)|0,0,p-t<<2|0),t=0|l[n>>2]}l[a>>2]=p}if(f=e+92|0,i=(0|l[e+4>>2])+((0|c[t+34>>0])<<8|(0|c[t+33>>0])<<16|0|c[t+35>>0])|0,!(t=(0|c[t+37>>0])<<8|(0|c[t+36>>0])<<16|0|c[t+38>>0]))return v=m,0|(_=0);if(l[f>>2]=i,l[e+96>>2]=i,l[e+104>>2]=t,l[e+100>>2]=i+t,l[e+108>>2]=0,l[e+112>>2]=0,u=_+20|0,l[_>>2]=0,l[_+4>>2]=0,l[_+8>>2]=0,l[_+12>>2]=0,r[_+16>>0]=0,h=_+24|0,l[_+44>>2]=0,l[u>>2]=0,l[u+4>>2]=0,l[u+8>>2]=0,l[u+12>>2]=0,l[u+16>>2]=0,r[u+20>>0]=0,0|V(f,_)&&0|V(f,h))if(0|l[a>>2]||(l[s>>2]=866,l[s+4>>2]=910,l[s+8>>2]=1497,Oe(o,812,s),xe(o)),p)for(s=0,u=0,i=0|l[d>>2],n=0,e=0,t=0,o=0,a=0;;){if(s=(0|q(f,_))+s&31,a=(0|q(f,h))+a&63,o=(0|q(f,_))+o&31,t=(0|q(f,_))+t|0,e=(0|q(f,h))+e&63,n=(0|q(f,_))+n&31,l[i>>2]=a<<5|s<<11|o|t<<27|e<<21|n<<16,(u=u+1|0)>>>0>=p>>>0){t=1;break}i=i+4|0,t&=31}else t=1;else t=0;return ce(_+24|0),ce(_),v=m,0|(_=t)}(e)&&0|function(e){var t,i,n,o,a,s,u=0,h=0,d=0,f=0,p=0,_=0,m=0,$=0,g=0,y=0,x=0,b=0,S=0,w=0,C=0,T=0,P=0,E=0,A=0,L=0,M=0,I=0,O=0,D=0,R=0,N=0,F=0,B=0,z=0,G=0,k=0,U=0,W=0;if(s=v,v=v+1008|0,_=s,p=s+496|0,A=s+472|0,n=s+276|0,o=s+80|0,a=s+16|0,h=0|l[88+(e|=0)>>2],t=(0|c[h+47>>0])<<8|0|c[h+48>>0],i=e+92|0,u=(0|l[e+4>>2])+((0|c[h+42>>0])<<8|(0|c[h+41>>0])<<16|0|c[h+43>>0])|0,!(h=(0|c[h+45>>0])<<8|(0|c[h+44>>0])<<16|0|c[h+46>>0]))return v=s,0;if(l[i>>2]=u,l[e+96>>2]=u,l[e+104>>2]=h,l[e+100>>2]=u+h,l[e+108>>2]=0,l[e+112>>2]=0,l[A+20>>2]=0,l[A>>2]=0,l[A+4>>2]=0,l[A+8>>2]=0,l[A+12>>2]=0,r[A+16>>0]=0,0|V(i,A)){for(u=0,h=-3,d=-3;l[n+(u<<2)>>2]=d,l[o+(u<<2)>>2]=h,f=(0|d)>2,49!=(0|(u=u+1|0));)h=(1&f)+h|0,d=f?-3:d+1|0;h=(u=a)+64|0;do{l[u>>2]=0,u=u+4|0}while((0|u)<(0|h));d=e+252|0,u=0|l[(h=e+256|0)>>2];e:do{if((0|u)==(0|t))m=13;else{if(u>>>0<=t>>>0){do{if((0|l[e+260>>2])>>>0<t>>>0){if(0|Z(d,t,(u+1|0)==(0|t),4,0)){u=0|l[h>>2];break}r[e+264>>0]=1,u=0;break e}}while(0);de((0|l[d>>2])+(u<<2)|0,0,t-u<<2|0)}l[h>>2]=t,m=13}}while(0);do{if(13==(0|m)){if(!t){l[_>>2]=866,l[_+4>>2]=910,l[_+8>>2]=1497,Oe(p,812,_),xe(p),u=1;break}for(e=a+4|0,p=a+8|0,_=a+12|0,m=a+16|0,$=a+20|0,g=a+24|0,y=a+28|0,x=a+32|0,b=a+36|0,S=a+40|0,w=a+44|0,C=a+48|0,T=a+52|0,P=a+56|0,E=a+60|0,f=0,u=0|l[d>>2],h=0|l[e>>2],d=0|l[a>>2];U=0|q(i,A),d=d+(0|l[n+(U<<2)>>2])&3,h=h+(0|l[o+(U<<2)>>2])&3,U=0|q(i,A),W=(0|l[p>>2])+(0|l[n+(U<<2)>>2])&3,l[p>>2]=W,U=(0|l[_>>2])+(0|l[o+(U<<2)>>2])&3,l[_>>2]=U,G=0|q(i,A),k=(0|l[m>>2])+(0|l[n+(G<<2)>>2])&3,l[m>>2]=k,G=(0|l[$>>2])+(0|l[o+(G<<2)>>2])&3,l[$>>2]=G,B=0|q(i,A),z=(0|l[g>>2])+(0|l[n+(B<<2)>>2])&3,l[g>>2]=z,B=(0|l[y>>2])+(0|l[o+(B<<2)>>2])&3,l[y>>2]=B,N=0|q(i,A),F=(0|l[x>>2])+(0|l[n+(N<<2)>>2])&3,l[x>>2]=F,N=(0|l[b>>2])+(0|l[o+(N<<2)>>2])&3,l[b>>2]=N,D=0|q(i,A),R=(0|l[S>>2])+(0|l[n+(D<<2)>>2])&3,l[S>>2]=R,D=(0|l[w>>2])+(0|l[o+(D<<2)>>2])&3,l[w>>2]=D,I=0|q(i,A),O=(0|l[C>>2])+(0|l[n+(I<<2)>>2])&3,l[C>>2]=O,I=(0|l[T>>2])+(0|l[o+(I<<2)>>2])&3,l[T>>2]=I,L=0|q(i,A),M=(0|l[P>>2])+(0|l[n+(L<<2)>>2])&3,l[P>>2]=M,L=(0|l[E>>2])+(0|l[o+(L<<2)>>2])&3,l[E>>2]=L,l[u>>2]=(0|c[1441+h>>0])<<2|0|c[1441+d>>0]|(0|c[1441+W>>0])<<4|(0|c[1441+U>>0])<<6|(0|c[1441+k>>0])<<8|(0|c[1441+G>>0])<<10|(0|c[1441+z>>0])<<12|(0|c[1441+B>>0])<<14|(0|c[1441+F>>0])<<16|(0|c[1441+N>>0])<<18|(0|c[1441+R>>0])<<20|(0|c[1441+D>>0])<<22|(0|c[1441+O>>0])<<24|(0|c[1441+I>>0])<<26|(0|c[1441+M>>0])<<28|(0|c[1441+L>>0])<<30,!((f=f+1|0)>>>0>=t>>>0);)u=u+4|0;l[a>>2]=d,l[e>>2]=h,u=1}}while(0)}else u=0;return ce(A),v=s,0|u}(e)&&(t=0|l[n>>2],o=11):o=11,11!=(0|o)||(0|c[t+55>>0])<<8|0|c[t+56>>0]&&!(0|function(e){var t=0,i=0,n=0,o=0,s=0,u=0,h=0,d=0,f=0;if(f=v,v=v+560|0,o=f,n=f+40|0,d=f+16|0,i=0|l[88+(e|=0)>>2],u=(0|c[i+55>>0])<<8|0|c[i+56>>0],h=e+92|0,t=(0|l[e+4>>2])+((0|c[i+50>>0])<<8|(0|c[i+49>>0])<<16|0|c[i+51>>0])|0,!(i=(0|c[i+53>>0])<<8|(0|c[i+52>>0])<<16|0|c[i+54>>0]))return v=f,0|(d=0);l[h>>2]=t,l[e+96>>2]=t,l[e+104>>2]=i,l[e+100>>2]=t+i,l[e+108>>2]=0,l[e+112>>2]=0,l[d+20>>2]=0,l[d>>2]=0,l[d+4>>2]=0,l[d+8>>2]=0,l[d+12>>2]=0,r[d+16>>0]=0;e:do{if(0|V(h,d)){if(s=e+268|0,(0|(t=0|l[(i=e+272|0)>>2]))!=(0|u)){if(t>>>0<=u>>>0){do{if((0|l[e+276>>2])>>>0<u>>>0){if(0|Z(s,u,(t+1|0)==(0|u),2,0)){t=0|l[i>>2];break}r[e+280>>0]=1,t=0;break e}}while(0);de((0|l[s>>2])+(t<<1)|0,0,u-t<<1|0)}l[i>>2]=u}if(!u){l[o>>2]=866,l[o+4>>2]=910,l[o+8>>2]=1497,Oe(n,812,o),xe(n),t=1;break}for(i=0,e=0,n=0,t=0|l[s>>2];;){if(n=(s=0|q(h,d))+n&255,e=(0|q(h,d))+e&255,a[t>>1]=e<<8|n,(i=i+1|0)>>>0>=u>>>0){t=1;break}t=t+2|0}}else t=0}while(0);return ce(d),v=f,0|(d=t)}(e)&&0|function(e){var t,i,n,o,s,u,h=0,d=0,f=0,p=0,_=0,m=0,$=0,g=0,y=0,x=0,b=0,S=0,w=0,C=0,T=0,P=0,E=0,A=0,L=0,M=0,I=0,O=0,D=0,R=0,N=0,F=0,B=0,z=0,G=0,k=0,U=0,W=0,H=0,Y=0,j=0;if(u=v,v=v+2416|0,m=u,_=u+1904|0,H=u+1880|0,n=u+980|0,o=u+80|0,s=u+16|0,d=0|l[88+(e|=0)>>2],t=(0|c[d+63>>0])<<8|0|c[d+64>>0],i=e+92|0,h=(0|l[e+4>>2])+((0|c[d+58>>0])<<8|(0|c[d+57>>0])<<16|0|c[d+59>>0])|0,!(d=(0|c[d+61>>0])<<8|(0|c[d+60>>0])<<16|0|c[d+62>>0]))return v=u,0;if(l[i>>2]=h,l[e+96>>2]=h,l[e+104>>2]=d,l[e+100>>2]=h+d,l[e+108>>2]=0,l[e+112>>2]=0,l[H+20>>2]=0,l[H>>2]=0,l[H+4>>2]=0,l[H+8>>2]=0,l[H+12>>2]=0,r[H+16>>0]=0,0|V(i,H)){for(h=0,d=-7,f=-7;l[n+(h<<2)>>2]=f,l[o+(h<<2)>>2]=d,p=(0|f)>6,225!=(0|(h=h+1|0));)d=(1&p)+d|0,f=p?-7:f+1|0;d=(h=s)+64|0;do{l[h>>2]=0,h=h+4|0}while((0|h)<(0|d));p=e+284|0,d=3*t|0,h=0|l[(f=e+288|0)>>2];e:do{if((0|h)==(0|d))$=13;else{if(h>>>0<=d>>>0){do{if((0|l[e+292>>2])>>>0<d>>>0){if(0|Z(p,d,(h+1|0)==(0|d),2,0)){h=0|l[f>>2];break}r[e+296>>0]=1,h=0;break e}}while(0);de((0|l[p>>2])+(h<<1)|0,0,d-h<<1|0)}l[f>>2]=d,$=13}}while(0);do{if(13==(0|$)){if(!t){l[m>>2]=866,l[m+4>>2]=910,l[m+8>>2]=1497,Oe(_,812,m),xe(_),h=1;break}for(A=s+4|0,L=s+8|0,M=s+12|0,I=s+16|0,O=s+20|0,D=s+24|0,R=s+28|0,N=s+32|0,F=s+36|0,B=s+40|0,z=s+44|0,G=s+48|0,k=s+52|0,U=s+56|0,W=s+60|0,E=0,h=0|l[p>>2],d=0|l[s>>2],f=0|l[A>>2],p=0|l[L>>2],e=0|l[M>>2],_=0|l[I>>2],m=0|l[O>>2],$=0|l[D>>2],g=0|l[R>>2],y=0|l[N>>2],x=0|l[F>>2],b=0|l[B>>2],S=0|l[z>>2],w=0,C=0,T=0,P=0;j=0|q(i,H),d=d+(0|l[n+(j<<2)>>2])&7,f=f+(0|l[o+(j<<2)>>2])&7,j=0|q(i,H),p=p+(0|l[n+(j<<2)>>2])&7,e=e+(0|l[o+(j<<2)>>2])&7,j=0|q(i,H),_=_+(0|l[n+(j<<2)>>2])&7,m=m+(0|l[o+(j<<2)>>2])&7,j=0|q(i,H),$=$+(0|l[n+(j<<2)>>2])&7,g=g+(0|l[o+(j<<2)>>2])&7,j=0|q(i,H),y=y+(0|l[n+(j<<2)>>2])&7,x=x+(0|l[o+(j<<2)>>2])&7,j=0|q(i,H),b=b+(0|l[n+(j<<2)>>2])&7,S=S+(0|l[o+(j<<2)>>2])&7,j=0|q(i,H),w=w+(0|l[n+(j<<2)>>2])&7,C=C+(0|l[o+(j<<2)>>2])&7,j=0|q(i,H),T=T+(0|l[n+(j<<2)>>2])&7,P=P+(0|l[o+(j<<2)>>2])&7,j=0|c[1445+m>>0],a[h>>1]=(0|c[1445+f>>0])<<3|0|c[1445+d>>0]|(0|c[1445+p>>0])<<6|(0|c[1445+e>>0])<<9|(0|c[1445+_>>0])<<12|j<<15,Y=0|c[1445+b>>0],a[h+2>>1]=(0|c[1445+$>>0])<<2|j>>>1|(0|c[1445+g>>0])<<5|(0|c[1445+y>>0])<<8|(0|c[1445+x>>0])<<11|Y<<14,a[h+4>>1]=(0|c[1445+S>>0])<<1|Y>>>2|(0|c[1445+w>>0])<<4|(0|c[1445+C>>0])<<7|(0|c[1445+T>>0])<<10|(0|c[1445+P>>0])<<13,!((E=E+1|0)>>>0>=t>>>0);)h=h+6|0;l[s>>2]=d,l[A>>2]=f,l[L>>2]=p,l[M>>2]=e,l[I>>2]=_,l[O>>2]=m,l[D>>2]=$,l[R>>2]=g,l[N>>2]=y,l[F>>2]=x,l[B>>2]=b,l[z>>2]=S,l[G>>2]=w,l[k>>2]=C,l[U>>2]=T,l[W>>2]=P,h=1}}while(0)}else h=0;return ce(H),v=u,0|h}(e))?0|(o=0):0|(o=1)):0|(o=0)):(l[e+88>>2]=0,0|(o=0))}(d,e,t)?(v=m,0|($=d)):(X(d),7&d?(l[p>>2]=866,l[p+4>>2]=2506,l[p+8>>2]=1232,Oe(h,812,p),xe(h),v=m,0|($=0)):(_e(d,0,0,1,0),v=m,0|($=0)))}(e,t),t=s+o|0;do{if(t>>>0>o>>>0){if(!$){for(n=i;n=n+(0|S(0|S((p+3|0)>>>2,g),(_+3|0)>>>2))|0,(0|(o=o+1|0))!=(0|t);)_>>>=1,p>>>=1;l[h>>2]=n;break}for(e=_,n=i;_=0|S((p+3|0)>>>2,g),!(o>>>0>15|(m=0|S(_,(e+3|0)>>>2))>>>0<8)&&519686845==(0|l[$>>2])&&(le($,h,m,_,o),n=0|l[h>>2]),n=n+m|0,l[h>>2]=n,(0|(o=o+1|0))!=(0|t);)e>>>=1,p>>>=1}}while(0);if($){if(519686845==(0|l[$>>2]))return X($),7&$?(l[d>>2]=866,l[d+4>>2]=2506,l[d+8>>2]=1232,Oe(u,812,d),xe(u),void(v=f)):(_e($,0,0,1,0),void(v=f));v=f}else v=f},_memset:de,_sbrk:Ce,_memcpy:Q,stackAlloc:function(e){var t;return t=v,v=(v=v+(e|=0)|0)+15&-16,0|t},_crn_get_height:function(e,t){var i,n;return e|=0,t|=0,n=v,v=v+48|0,l[(i=n)>>2]=40,oe(e,t,i),v=n,0|l[i+8>>2]},dynCall_vi:function(e,t){t|=0,lt[7&(e|=0)](0|t)},getTempRet0:function(){return 0|b},_crn_get_levels:function(e,t){var i,n;return e|=0,t|=0,n=v,v=v+48|0,l[(i=n)>>2]=40,oe(e,t,i),v=n,0|l[i+12>>2]},_crn_get_uncompressed_size:function(e,t,i){e|=0,t|=0,i|=0;var n,r,o,a,s=0,u=0;switch(a=v,v=v+576|0,o=a+40|0,r=a+56|0,l[(u=a)>>2]=40,oe(e,t,u),n=(3+((0|l[u+4>>2])>>>i)|0)>>>2,t=(3+((0|l[u+8>>2])>>>i)|0)>>>2,e=0|l[(i=u+32|0)+4>>2],0|l[i>>2]){case 0:case 9:case 10:e?s=14:e=8;break;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:s=e?14:13;break;default:s=14}return 13==(0|s)?e=16:14==(0|s)&&(l[o>>2]=866,l[o+4>>2]=2672,l[o+8>>2]=1251,Oe(r,812,o),xe(r),e=0),u=0|S(0|S(t,n),e),v=a,0|u},_i64Add:ze,dynCall_iiii:function(e,t,i,n){return t|=0,i|=0,n|=0,0|at[7&(e|=0)](0|t,0|i,0|n)},_emscripten_get_global_libc:function(){return 5072},dynCall_ii:function(e,t){return t|=0,0|ut[1&(e|=0)](0|t)},___udivdi3:je,_llvm_bswap_i32:qe,dynCall_viiiii:function(e,t,i,n,r,o){t|=0,i|=0,n|=0,r|=0,o|=0,st[3&(e|=0)](0|t,0|i,0|n,0|r,0|o)},___cxa_can_catch:function(e,t,i){var n,r;return e|=0,t|=0,i|=0,r=v,v=v+16|0,l[(n=r)>>2]=l[i>>2],(e=0|at[7&l[16+(0|l[e>>2])>>2]](e,t,n))&&(l[i>>2]=l[n>>2]),v=r,1&e|0},_free:H,runPostSets:function(){},dynCall_viiiiii:function(e,t,i,n,r,o,a){t|=0,i|=0,n|=0,r|=0,o|=0,a|=0,dt[3&(e|=0)](0|t,0|i,0|n,0|r,0|o,0|a)},establishStackSpace:function(e,t){v=e|=0},___uremdi3:Me,___cxa_is_pointer_type:function(e){return 1&(e=(e|=0)?0!=(0|ie(e,32,88,0)):0)|0},stackRestore:function(e){v=e|=0},_malloc:G,_emscripten_replace_memory:function(e){return!(16777215&$(e)||$(e)<=16777215||$(e)>2147483648)&&(r=new n(e),a=new o(e),l=new s(e),c=new u(e),d=new h(e),new f(e),new p(e),m=new _(e),i=e,!0)},dynCall_v:function(e){ht[3&(e|=0)]()},_crn_get_width:function(e,t){var i,n;return e|=0,t|=0,n=v,v=v+48|0,l[(i=n)>>2]=40,oe(e,t,i),v=n,0|l[i+4>>2]},_crn_get_dxt_format:function(e,t){var i,n;return e|=0,t|=0,n=v,v=v+48|0,l[(i=n)>>2]=40,oe(e,t,i),v=n,0|l[i+32>>2]}}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer);Module.stackSave=asm.stackSave,Module.getTempRet0=asm.getTempRet0,Module._memset=asm._memset,Module.setThrew=asm.setThrew,Module._bitshift64Lshr=asm._bitshift64Lshr,Module._bitshift64Shl=asm._bitshift64Shl,Module.setTempRet0=asm.setTempRet0,Module._crn_decompress=asm._crn_decompress,Module._crn_get_bytes_per_block=asm._crn_get_bytes_per_block,Module._sbrk=asm._sbrk,Module._memcpy=asm._memcpy,Module.stackAlloc=asm.stackAlloc,Module._crn_get_height=asm._crn_get_height,Module._i64Subtract=asm._i64Subtract,Module._crn_get_levels=asm._crn_get_levels,Module._crn_get_uncompressed_size=asm._crn_get_uncompressed_size,Module._i64Add=asm._i64Add,Module._emscripten_get_global_libc=asm._emscripten_get_global_libc,Module.___udivdi3=asm.___udivdi3,Module._llvm_bswap_i32=asm._llvm_bswap_i32,Module.___cxa_can_catch=asm.___cxa_can_catch;var _free=Module._free=asm._free;Module.runPostSets=asm.runPostSets,Module.establishStackSpace=asm.establishStackSpace,Module.___uremdi3=asm.___uremdi3,Module.___cxa_is_pointer_type=asm.___cxa_is_pointer_type,Module.stackRestore=asm.stackRestore;var _malloc=Module._malloc=asm._malloc,_emscripten_replace_memory=Module._emscripten_replace_memory=asm._emscripten_replace_memory,initialStackTop;function ExitStatus(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function run(e){function t(){Module.calledRun||(Module.calledRun=!0,!ABORT&&(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(e),postRun()))}e=e||Module.arguments,runDependencies>0||(preRun(),runDependencies>0)||Module.calledRun||(Module.setStatus?(Module.setStatus("Running..."),setTimeout((function(){setTimeout((function(){Module.setStatus("")}),1),t()}),1)):t())}function exit(e,t){t&&Module.noExitRuntime||(Module.noExitRuntime||(ABORT=!0,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(e)),ENVIRONMENT_IS_NODE&&process.exit(e),Module.quit(e,new ExitStatus(e)))}Module._crn_get_width=asm._crn_get_width,Module._crn_get_dxt_format=asm._crn_get_dxt_format,Module.dynCall_iiii=asm.dynCall_iiii,Module.dynCall_viiiii=asm.dynCall_viiiii,Module.dynCall_vi=asm.dynCall_vi,Module.dynCall_ii=asm.dynCall_ii,Module.dynCall_viii=asm.dynCall_viii,Module.dynCall_v=asm.dynCall_v,Module.dynCall_viiiiii=asm.dynCall_viiiiii,Module.dynCall_viiii=asm.dynCall_viiii,Runtime.stackAlloc=Module.stackAlloc,Runtime.stackSave=Module.stackSave,Runtime.stackRestore=Module.stackRestore,Runtime.establishStackSpace=Module.establishStackSpace,Runtime.setTempRet0=Module.setTempRet0,Runtime.getTempRet0=Module.getTempRet0,Module.asm=asm,ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus,dependenciesFulfilled=function e(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=e)},Module.callMain=Module.callMain=function(e){e=e||[],ensureInitRuntime();var t=e.length+1;function i(){for(var e=0;e<3;e++)n.push(0)}var n=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];i();for(var r=0;r<t-1;r+=1)n.push(allocate(intArrayFromString(e[r]),"i8",ALLOC_NORMAL)),i();n.push(0),n=allocate(n,"i32",ALLOC_NORMAL);try{exit(Module._main(t,n,0),!0)}catch(e){if(e instanceof ExitStatus)return;if("SimulateInfiniteLoop"==e)return void(Module.noExitRuntime=!0);var o=e;e&&"object"==typeof e&&e.stack&&(o=[e,e.stack]),Module.printErr("exception thrown: "+o),Module.quit(1,e)}},Module.run=Module.run=run,Module.exit=Module.exit=exit;var abortDecorators=[];function abort(e){Module.onAbort&&Module.onAbort(e),void 0!==e?(Module.print(e),Module.printErr(e),e=JSON.stringify(e)):e="",ABORT=!0;var t="abort("+e+") at "+stackTrace()+"\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";throw abortDecorators&&abortDecorators.forEach((function(i){t=i(t,e)})),t}if(Module.abort=Module.abort=abort,Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),Module.noExitRuntime=!0,run();var Module$1=Module,G$3;typeof ko<"u"&&(G$3=ko),function(e){var t=this||(0,eval)("this"),i=t.document,n=t.navigator,r=t.jQuery,o=t.JSON;r||typeof jQuery>"u"||(r=jQuery),function(a,s){function l(e,t){return(null===e||typeof e in _)&&e===t}function u(t,i){var n;return function(){n||(n=p.a.setTimeout((function(){n=e,t()}),i))}}function c(e,t){var i;return function(){clearTimeout(i),i=p.a.setTimeout(e,t)}}function h(e,t){t&&"change"!==t?"beforeChange"===t?this.pc(e):this.gb(e,t):this.qc(e)}function d(e,t){null!==t&&t.s&&t.s()}function f(e,t){var i=this.qd,n=i[v];n.ra||(this.Qb&&this.mb[t]?(i.uc(t,e,this.mb[t]),this.mb[t]=null,--this.Qb):n.I[t]||i.uc(t,e,n.J?{da:e}:i.$c(e)),e.Ja&&e.gd())}var p=typeof a<"u"?a:{};p.b=function(e,t){for(var i=e.split("."),n=p,r=0;r<i.length-1;r++)n=n[i[r]];n[i[i.length-1]]=t},p.L=function(e,t,i){e[t]=i},p.version="3.5.1",p.b("version",p.version),p.options={deferUpdates:!1,useOnlyNativeEvents:!1,foreachHidesDestroyed:!1},p.a=function(){function a(e,t){for(var i in e)c.call(e,i)&&t(i,e[i])}function s(e,t){if(t)for(var i in t)c.call(t,i)&&(e[i]=t[i]);return e}function l(e,t){return e.__proto__=t,e}function u(e,t,i,n){var r=e[t].match(y)||[];p.a.D(i.match(y),(function(e){p.a.Na(r,e,n)})),e[t]=r.join(" ")}var c=Object.prototype.hasOwnProperty,h={__proto__:[]}instanceof Array,d="function"==typeof Symbol,f={},_={};f[n&&/Firefox\/2/i.test(n.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],f.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),a(f,(function(e,t){if(t.length)for(var i=0,n=t.length;i<n;i++)_[t[i]]=e}));var m,$={propertychange:!0},g=i&&function(){for(var t=3,n=i.createElement("div"),r=n.getElementsByTagName("i");n.innerHTML="\x3c!--[if gt IE "+ ++t+"]><i></i><![endif]--\x3e",r[0];);return 4<t?t:e}(),y=/\S+/g;return{Jc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],D:function(e,t,i){for(var n=0,r=e.length;n<r;n++)t.call(i,e[n],n,e)},A:"function"==typeof Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t)}:function(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},Lb:function(t,i,n){for(var r=0,o=t.length;r<o;r++)if(i.call(n,t[r],r,t))return t[r];return e},Pa:function(e,t){var i=p.a.A(e,t);0<i?e.splice(i,1):0===i&&e.shift()},wc:function(e){var t=[];return e&&p.a.D(e,(function(e){0>p.a.A(t,e)&&t.push(e)})),t},Mb:function(e,t,i){var n=[];if(e)for(var r=0,o=e.length;r<o;r++)n.push(t.call(i,e[r],r));return n},jb:function(e,t,i){var n=[];if(e)for(var r=0,o=e.length;r<o;r++)t.call(i,e[r],r)&&n.push(e[r]);return n},Nb:function(e,t){if(t instanceof Array)e.push.apply(e,t);else for(var i=0,n=t.length;i<n;i++)e.push(t[i]);return e},Na:function(e,t,i){var n=p.a.A(p.a.bc(e),t);0>n?i&&e.push(t):i||e.splice(n,1)},Ba:h,extend:s,setPrototypeOf:l,Ab:h?l:s,P:a,Ga:function(e,t,i){if(!e)return e;var n,r={};for(n in e)c.call(e,n)&&(r[n]=t.call(i,e[n],n,e));return r},Tb:function(e){for(;e.firstChild;)p.removeNode(e.firstChild)},Yb:function(e){for(var t=((e=p.a.la(e))[0]&&e[0].ownerDocument||i).createElement("div"),n=0,r=e.length;n<r;n++)t.appendChild(p.oa(e[n]));return t},Ca:function(e,t){for(var i=0,n=e.length,r=[];i<n;i++){var o=e[i].cloneNode(!0);r.push(t?p.oa(o):o)}return r},va:function(e,t){if(p.a.Tb(e),t)for(var i=0,n=t.length;i<n;i++)e.appendChild(t[i])},Xc:function(e,t){var i=e.nodeType?[e]:e;if(0<i.length){for(var n=i[0],r=n.parentNode,o=0,a=t.length;o<a;o++)r.insertBefore(t[o],n);for(o=0,a=i.length;o<a;o++)p.removeNode(i[o])}},Ua:function(e,t){if(e.length){for(t=8===t.nodeType&&t.parentNode||t;e.length&&e[0].parentNode!==t;)e.splice(0,1);for(;1<e.length&&e[e.length-1].parentNode!==t;)e.length--;if(1<e.length){var i=e[0],n=e[e.length-1];for(e.length=0;i!==n;)e.push(i),i=i.nextSibling;e.push(n)}}return e},Zc:function(e,t){7>g?e.setAttribute("selected",t):e.selected=t},Db:function(t){return null===t||t===e?"":t.trim?t.trim():t.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ud:function(e,t){return e=e||"",!(t.length>e.length)&&e.substring(0,t.length)===t},vd:function(e,t){if(e===t)return!0;if(11===e.nodeType)return!1;if(t.contains)return t.contains(1!==e.nodeType?e.parentNode:e);if(t.compareDocumentPosition)return 16==(16&t.compareDocumentPosition(e));for(;e&&e!=t;)e=e.parentNode;return!!e},Sb:function(e){return p.a.vd(e,e.ownerDocument.documentElement)},kd:function(e){return!!p.a.Lb(e,p.a.Sb)},R:function(e){return e&&e.tagName&&e.tagName.toLowerCase()},Ac:function(e){return p.onError?function(){try{return e.apply(this,arguments)}catch(e){throw p.onError&&p.onError(e),e}}:e},setTimeout:function(e,t){return setTimeout(p.a.Ac(e),t)},Gc:function(e){setTimeout((function(){throw p.onError&&p.onError(e),e}),0)},B:function(e,t,i){var n=p.a.Ac(i);if(i=$[t],p.options.useOnlyNativeEvents||i||!r)if(i||"function"!=typeof e.addEventListener){if(!(typeof e.attachEvent<"u"))throw Error("Browser doesn't support addEventListener or attachEvent");var o=function(t){n.call(e,t)},a="on"+t;e.attachEvent(a,o),p.a.K.za(e,(function(){e.detachEvent(a,o)}))}else e.addEventListener(t,n,!1);else m||(m="function"==typeof r(e).on?"on":"bind"),r(e)[m](t,n)},Fb:function(e,n){if(!e||!e.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var o;if(o=!("input"!==p.a.R(e)||!e.type||"click"!=n.toLowerCase()||"checkbox"!=(o=e.type)&&"radio"!=o),p.options.useOnlyNativeEvents||!r||o)if("function"==typeof i.createEvent){if("function"!=typeof e.dispatchEvent)throw Error("The supplied element doesn't support dispatchEvent");(o=i.createEvent(_[n]||"HTMLEvents")).initEvent(n,!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,e),e.dispatchEvent(o)}else if(o&&e.click)e.click();else{if(!(typeof e.fireEvent<"u"))throw Error("Browser doesn't support triggering events");e.fireEvent("on"+n)}else r(e).trigger(n)},f:function(e){return p.O(e)?e():e},bc:function(e){return p.O(e)?e.v():e},Eb:function(e,t,i){var n;t&&("object"==typeof e.classList?(n=e.classList[i?"add":"remove"],p.a.D(t.match(y),(function(t){n.call(e.classList,t)}))):"string"==typeof e.className.baseVal?u(e.className,"baseVal",t,i):u(e,"className",t,i))},Bb:function(t,i){var n=p.a.f(i);(null===n||n===e)&&(n="");var r=p.h.firstChild(t);!r||3!=r.nodeType||p.h.nextSibling(r)?p.h.va(t,[t.ownerDocument.createTextNode(n)]):r.data=n,p.a.Ad(t)},Yc:function(e,t){if(e.name=t,7>=g)try{var n=e.name.replace(/[&<>'"]/g,(function(e){return"&#"+e.charCodeAt(0)+";"}));e.mergeAttributes(i.createElement("<input name='"+n+"'/>"),!1)}catch{}},Ad:function(e){9<=g&&(e=1==e.nodeType?e:e.parentNode).style&&(e.style.zoom=e.style.zoom)},wd:function(e){if(g){var t=e.style.width;e.style.width=0,e.style.width=t}},Pd:function(e,t){e=p.a.f(e),t=p.a.f(t);for(var i=[],n=e;n<=t;n++)i.push(n);return i},la:function(e){for(var t=[],i=0,n=e.length;i<n;i++)t.push(e[i]);return t},Da:function(e){return d?Symbol(e):e},Zd:6===g,$d:7===g,W:g,Lc:function(e,t){for(var i=p.a.la(e.getElementsByTagName("input")).concat(p.a.la(e.getElementsByTagName("textarea"))),n="string"==typeof t?function(e){return e.name===t}:function(e){return t.test(e.name)},r=[],o=i.length-1;0<=o;o--)n(i[o])&&r.push(i[o]);return r},Nd:function(e){return"string"==typeof e&&(e=p.a.Db(e))?o&&o.parse?o.parse(e):new Function("return "+e)():null},hc:function(e,t,i){if(!o||!o.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");return o.stringify(p.a.f(e),t,i)},Od:function(e,t,n){var r=(n=n||{}).params||{},o=n.includeFields||this.Jc,s=e;if("object"==typeof e&&"form"===p.a.R(e)){s=e.action;for(var l=o.length-1;0<=l;l--)for(var u=p.a.Lc(e,o[l]),c=u.length-1;0<=c;c--)r[u[c].name]=u[c].value}t=p.a.f(t);var h=i.createElement("form");for(var d in h.style.display="none",h.action=s,h.method="post",t)(e=i.createElement("input")).type="hidden",e.name=d,e.value=p.a.hc(p.a.f(t[d])),h.appendChild(e);a(r,(function(e,t){var n=i.createElement("input");n.type="hidden",n.name=e,n.value=t,h.appendChild(n)})),i.body.appendChild(h),n.submitter?n.submitter(h):h.submit(),setTimeout((function(){h.parentNode.removeChild(h)}),0)}}}(),p.b("utils",p.a),p.b("utils.arrayForEach",p.a.D),p.b("utils.arrayFirst",p.a.Lb),p.b("utils.arrayFilter",p.a.jb),p.b("utils.arrayGetDistinctValues",p.a.wc),p.b("utils.arrayIndexOf",p.a.A),p.b("utils.arrayMap",p.a.Mb),p.b("utils.arrayPushAll",p.a.Nb),p.b("utils.arrayRemoveItem",p.a.Pa),p.b("utils.cloneNodes",p.a.Ca),p.b("utils.createSymbolOrString",p.a.Da),p.b("utils.extend",p.a.extend),p.b("utils.fieldsIncludedWithJsonPost",p.a.Jc),p.b("utils.getFormFields",p.a.Lc),p.b("utils.objectMap",p.a.Ga),p.b("utils.peekObservable",p.a.bc),p.b("utils.postJson",p.a.Od),p.b("utils.parseJson",p.a.Nd),p.b("utils.registerEventHandler",p.a.B),p.b("utils.stringifyJson",p.a.hc),p.b("utils.range",p.a.Pd),p.b("utils.toggleDomNodeCssClass",p.a.Eb),p.b("utils.triggerEvent",p.a.Fb),p.b("utils.unwrapObservable",p.a.f),p.b("utils.objectForEach",p.a.P),p.b("utils.addOrRemoveItem",p.a.Na),p.b("utils.setTextContent",p.a.Bb),p.b("unwrap",p.a.f),Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(1===arguments.length)return function(){return t.apply(e,arguments)};var i=Array.prototype.slice.call(arguments,1);return function(){var n=i.slice(0);return n.push.apply(n,arguments),t.apply(e,n)}}),p.a.g=new function(){var t,i,n=0,r="__ko__"+(new Date).getTime(),o={};return p.a.W?(t=function(t,i){var a=t[r];if(!a||"null"===a||!o[a]){if(!i)return e;a=t[r]="ko"+n++,o[a]={}}return o[a]},i=function(e){var t=e[r];return!!t&&(delete o[t],e[r]=null,!0)}):(t=function(e,t){var i=e[r];return!i&&t&&(i=e[r]={}),i},i=function(e){return!!e[r]&&(delete e[r],!0)}),{get:function(e,i){var n=t(e,!1);return n&&n[i]},set:function(i,n,r){(i=t(i,r!==e))&&(i[n]=r)},Ub:function(e,i,n){return(e=t(e,!0))[i]||(e[i]=n)},clear:i,Z:function(){return n+++r}}},p.b("utils.domData",p.a.g),p.b("utils.domData.clear",p.a.g.clear),p.a.K=new function(){function t(t,i){var n=p.a.g.get(t,o);return n===e&&i&&(n=[],p.a.g.set(t,o,n)),n}function i(e){if(i=t(e,!1))for(var i=i.slice(0),r=0;r<i.length;r++)i[r](e);p.a.g.clear(e),p.a.K.cleanExternalData(e),s[e.nodeType]&&n(e.childNodes,!0)}function n(e,t){for(var n,r=[],o=0;o<e.length;o++)if((!t||8===e[o].nodeType)&&(i(r[r.length]=n=e[o]),e[o]!==n))for(;o--&&-1==p.a.A(r,e[o]););}var o=p.a.g.Z(),a={1:!0,8:!0,9:!0},s={1:!0,9:!0};return{za:function(e,i){if("function"!=typeof i)throw Error("Callback must be a function");t(e,!0).push(i)},yb:function(i,n){var r=t(i,!1);r&&(p.a.Pa(r,n),0==r.length&&p.a.g.set(i,o,e))},oa:function(e){return p.u.G((function(){a[e.nodeType]&&(i(e),s[e.nodeType]&&n(e.getElementsByTagName("*")))})),e},removeNode:function(e){p.oa(e),e.parentNode&&e.parentNode.removeChild(e)},cleanExternalData:function(e){r&&"function"==typeof r.cleanData&&r.cleanData([e])}}},p.oa=p.a.K.oa,p.removeNode=p.a.K.removeNode,p.b("cleanNode",p.oa),p.b("removeNode",p.removeNode),p.b("utils.domNodeDisposal",p.a.K),p.b("utils.domNodeDisposal.addDisposeCallback",p.a.K.za),p.b("utils.domNodeDisposal.removeDisposeCallback",p.a.K.yb),function(){var n=[0,"",""],o=[1,"<table>","</table>"],a=[3,"<table><tbody><tr>","</tr></tbody></table>"],s=[1,"<select multiple='multiple'>","</select>"],l={thead:o,tbody:o,tfoot:o,tr:[2,"<table><tbody>","</tbody></table>"],td:a,th:a,option:s,optgroup:s},u=8>=p.a.W;p.a.ua=function(e,o){var a;if(r){if(r.parseHTML)a=r.parseHTML(e,o)||[];else if((a=r.clean([e],o))&&a[0]){for(var s=a[0];s.parentNode&&11!==s.parentNode.nodeType;)s=s.parentNode;s.parentNode&&s.parentNode.removeChild(s)}}else{(a=o)||(a=i),s=a.parentWindow||a.defaultView||t;var c,h=p.a.Db(e).toLowerCase(),d=a.createElement("div");for(c=(h=h.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&l[h[1]]||n,h=c[0],c="ignored<div>"+c[1]+e+c[2]+"</div>","function"==typeof s.innerShiv?d.appendChild(s.innerShiv(c)):(u&&a.body.appendChild(d),d.innerHTML=c,u&&d.parentNode.removeChild(d));h--;)d=d.lastChild;a=p.a.la(d.lastChild.childNodes)}return a},p.a.Md=function(e,t){var i=p.a.ua(e,t);return i.length&&i[0].parentElement||p.a.Yb(i)},p.a.fc=function(t,i){if(p.a.Tb(t),null!==(i=p.a.f(i))&&i!==e)if("string"!=typeof i&&(i=i.toString()),r)r(t).html(i);else for(var n=p.a.ua(i,t.ownerDocument),o=0;o<n.length;o++)t.appendChild(n[o])}}(),p.b("utils.parseHtmlFragment",p.a.ua),p.b("utils.setHtml",p.a.fc),p.aa=function(){function t(e,i){if(e)if(8==e.nodeType)null!=(n=p.aa.Uc(e.nodeValue))&&i.push({ud:e,Kd:n});else if(1==e.nodeType)for(var n=0,r=e.childNodes,o=r.length;n<o;n++)t(r[n],i)}var i={};return{Xb:function(e){if("function"!=typeof e)throw Error("You can only pass a function to ko.memoization.memoize()");var t=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return i[t]=e,"\x3c!--[ko_memo:"+t+"]--\x3e"},bd:function(t,n){var r=i[t];if(r===e)throw Error("Couldn't find any memo with ID "+t+". Perhaps it's already been unmemoized.");try{return r.apply(null,n||[]),!0}finally{delete i[t]}},cd:function(e,i){var n=[];t(e,n);for(var r=0,o=n.length;r<o;r++){var a=n[r].ud,s=[a];i&&p.a.Nb(s,i),p.aa.bd(n[r].Kd,s),a.nodeValue="",a.parentNode&&a.parentNode.removeChild(a)}},Uc:function(e){return(e=e.match(/^\[ko_memo\:(.*?)\]$/))?e[1]:null}}}(),p.b("memoization",p.aa),p.b("memoization.memoize",p.aa.Xb),p.b("memoization.unmemoize",p.aa.bd),p.b("memoization.parseMemoText",p.aa.Uc),p.b("memoization.unmemoizeDomNodeAndDescendants",p.aa.cd),p.na=function(){function e(){if(a)for(var e,t=a,i=0;l<a;)if(e=o[l++]){if(l>t){if(5e3<=++i){l=a,p.a.Gc(Error("'Too much recursion' after processing "+i+" task groups."));break}t=a}try{e()}catch(e){p.a.Gc(e)}}}function n(){e(),l=a=o.length=0}var r,o=[],a=0,s=1,l=0;return r=t.MutationObserver?function(e){var t=i.createElement("div");return new MutationObserver(e).observe(t,{attributes:!0}),function(){t.classList.toggle("foo")}}(n):i&&"onreadystatechange"in i.createElement("script")?function(e){var t=i.createElement("script");t.onreadystatechange=function(){t.onreadystatechange=null,i.documentElement.removeChild(t),t=null,e()},i.documentElement.appendChild(t)}:function(e){setTimeout(e,0)},{scheduler:r,zb:function(e){return a||p.na.scheduler(n),o[a++]=e,s++},cancel:function(e){(e-=s-a)>=l&&e<a&&(o[e]=null)},resetForTesting:function(){var e=a-l;return l=a=o.length=0,e},Sd:e}}(),p.b("tasks",p.na),p.b("tasks.schedule",p.na.zb),p.b("tasks.runEarly",p.na.Sd),p.Ta={throttle:function(e,t){e.throttleEvaluation=t;var i=null;return p.$({read:e,write:function(n){clearTimeout(i),i=p.a.setTimeout((function(){e(n)}),t)}})},rateLimit:function(e,t){var i,n,r;"number"==typeof t?i=t:(i=t.timeout,n=t.method),e.Hb=!1,r="function"==typeof n?n:"notifyWhenChangesStop"==n?c:u,e.ub((function(e){return r(e,i,t)}))},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.Hb||(t.Hb=!0,t.ub((function(i){var n,r=!1;return function(){if(!r){p.na.cancel(n),n=p.na.zb(i);try{r=!0,t.notifySubscribers(e,"dirty")}finally{r=!1}}}})))},notify:function(e,t){e.equalityComparer="always"==t?null:l}};var _={undefined:1,boolean:1,number:1,string:1};p.b("extenders",p.Ta),p.ic=function(e,t,i){this.da=e,this.lc=t,this.mc=i,this.Ib=!1,this.fb=this.Jb=null,p.L(this,"dispose",this.s),p.L(this,"disposeWhenNodeIsRemoved",this.l)},p.ic.prototype.s=function(){this.Ib||(this.fb&&p.a.K.yb(this.Jb,this.fb),this.Ib=!0,this.mc(),this.da=this.lc=this.mc=this.Jb=this.fb=null)},p.ic.prototype.l=function(e){this.Jb=e,p.a.K.za(e,this.fb=this.s.bind(this))},p.T=function(){p.a.Ab(this,m),m.qb(this)};var m={qb:function(e){e.U={change:[]},e.sc=1},subscribe:function(e,t,i){var n=this;i=i||"change";var r=new p.ic(n,t?e.bind(t):e,(function(){p.a.Pa(n.U[i],r),n.hb&&n.hb(i)}));return n.Qa&&n.Qa(i),n.U[i]||(n.U[i]=[]),n.U[i].push(r),r},notifySubscribers:function(e,t){if("change"===(t=t||"change")&&this.Gb(),this.Wa(t)){var i="change"===t&&this.ed||this.U[t].slice(0);try{p.u.xc();for(var n,r=0;n=i[r];++r)n.Ib||n.lc(e)}finally{p.u.end()}}},ob:function(){return this.sc},Dd:function(e){return this.ob()!==e},Gb:function(){++this.sc},ub:function(e){var t,i,n,r,o,a=this,s=p.O(a);a.gb||(a.gb=a.notifySubscribers,a.notifySubscribers=h);var l=e((function(){a.Ja=!1,s&&r===a&&(r=a.nc?a.nc():a());var e=i||o&&a.sb(n,r);o=i=t=!1,e&&a.gb(n=r)}));a.qc=function(e,i){i&&a.Ja||(o=!i),a.ed=a.U.change.slice(0),a.Ja=t=!0,r=e,l()},a.pc=function(e){t||(n=e,a.gb(e,"beforeChange"))},a.rc=function(){o=!0},a.gd=function(){a.sb(n,a.v(!0))&&(i=!0)}},Wa:function(e){return this.U[e]&&this.U[e].length},Bd:function(e){if(e)return this.U[e]&&this.U[e].length||0;var t=0;return p.a.P(this.U,(function(e,i){"dirty"!==e&&(t+=i.length)})),t},sb:function(e,t){return!this.equalityComparer||!this.equalityComparer(e,t)},toString:function(){return"[object Object]"},extend:function(e){var t=this;return e&&p.a.P(e,(function(e,i){var n=p.Ta[e];"function"==typeof n&&(t=n(t,i)||t)})),t}};p.L(m,"init",m.qb),p.L(m,"subscribe",m.subscribe),p.L(m,"extend",m.extend),p.L(m,"getSubscriptionsCount",m.Bd),p.a.Ba&&p.a.setPrototypeOf(m,Function.prototype),p.T.fn=m,p.Qc=function(e){return null!=e&&"function"==typeof e.subscribe&&"function"==typeof e.notifySubscribers},p.b("subscribable",p.T),p.b("isSubscribable",p.Qc),p.S=p.u=function(){function e(e){n.push(i),i=e}function t(){i=n.pop()}var i,n=[],r=0;return{xc:e,end:t,cc:function(e){if(i){if(!p.Qc(e))throw Error("Only subscribable things can act as dependencies");i.od.call(i.pd,e,e.fd||(e.fd=++r))}},G:function(i,n,r){try{return e(),i.apply(n,r||[])}finally{t()}},qa:function(){if(i)return i.o.qa()},Va:function(){if(i)return i.o.Va()},Ya:function(){if(i)return i.Ya},o:function(){if(i)return i.o}}}(),p.b("computedContext",p.S),p.b("computedContext.getDependenciesCount",p.S.qa),p.b("computedContext.getDependencies",p.S.Va),p.b("computedContext.isInitial",p.S.Ya),p.b("computedContext.registerDependency",p.S.cc),p.b("ignoreDependencies",p.Yd=p.u.G);var $=p.a.Da("_latestValue");p.ta=function(e){function t(){return 0<arguments.length?(t.sb(t[$],arguments[0])&&(t.ya(),t[$]=arguments[0],t.xa()),this):(p.u.cc(t),t[$])}return t[$]=e,p.a.Ba||p.a.extend(t,p.T.fn),p.T.fn.qb(t),p.a.Ab(t,g),p.options.deferUpdates&&p.Ta.deferred(t,!0),t};var g={equalityComparer:l,v:function(){return this[$]},xa:function(){this.notifySubscribers(this[$],"spectate"),this.notifySubscribers(this[$])},ya:function(){this.notifySubscribers(this[$],"beforeChange")}};p.a.Ba&&p.a.setPrototypeOf(g,p.T.fn);var y=p.ta.Ma="__ko_proto__";g[y]=p.ta,p.O=function(e){if((e="function"==typeof e&&e[y])&&e!==g[y]&&e!==p.o.fn[y])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!e},p.Za=function(e){return"function"==typeof e&&(e[y]===g[y]||e[y]===p.o.fn[y]&&e.Nc)},p.b("observable",p.ta),p.b("isObservable",p.O),p.b("isWriteableObservable",p.Za),p.b("isWritableObservable",p.Za),p.b("observable.fn",g),p.L(g,"peek",g.v),p.L(g,"valueHasMutated",g.xa),p.L(g,"valueWillMutate",g.ya),p.Ha=function(e){if("object"!=typeof(e=e||[])||!("length"in e))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return e=p.ta(e),p.a.Ab(e,p.Ha.fn),e.extend({trackArrayChanges:!0})},p.Ha.fn={remove:function(e){for(var t=this.v(),i=[],n="function"!=typeof e||p.O(e)?function(t){return t===e}:e,r=0;r<t.length;r++){var o=t[r];if(n(o)){if(0===i.length&&this.ya(),t[r]!==o)throw Error("Array modified during remove; cannot remove item");i.push(o),t.splice(r,1),r--}}return i.length&&this.xa(),i},removeAll:function(t){if(t===e){var i=this.v(),n=i.slice(0);return this.ya(),i.splice(0,i.length),this.xa(),n}return t?this.remove((function(e){return 0<=p.a.A(t,e)})):[]},destroy:function(e){var t=this.v(),i="function"!=typeof e||p.O(e)?function(t){return t===e}:e;this.ya();for(var n=t.length-1;0<=n;n--){var r=t[n];i(r)&&(r._destroy=!0)}this.xa()},destroyAll:function(t){return t===e?this.destroy((function(){return!0})):t?this.destroy((function(e){return 0<=p.a.A(t,e)})):[]},indexOf:function(e){var t=this();return p.a.A(t,e)},replace:function(e,t){var i=this.indexOf(e);0<=i&&(this.ya(),this.v()[i]=t,this.xa())},sorted:function(e){var t=this().slice(0);return e?t.sort(e):t.sort()},reversed:function(){return this().slice(0).reverse()}},p.a.Ba&&p.a.setPrototypeOf(p.Ha.fn,p.ta.fn),p.a.D("pop push reverse shift sort splice unshift".split(" "),(function(e){p.Ha.fn[e]=function(){var t=this.v();this.ya(),this.zc(t,e,arguments);var i=t[e].apply(t,arguments);return this.xa(),i===t?this:i}})),p.a.D(["slice"],(function(e){p.Ha.fn[e]=function(){var t=this();return t[e].apply(t,arguments)}})),p.Pc=function(e){return p.O(e)&&"function"==typeof e.remove&&"function"==typeof e.push},p.b("observableArray",p.Ha),p.b("isObservableArray",p.Pc),p.Ta.trackArrayChanges=function(t,i){function n(){function e(){if(u){var e,i=[].concat(t.v()||[]);t.Wa("arrayChange")&&((!l||1<u)&&(l=p.a.Pb(a,i,t.Ob)),e=l),a=i,l=null,u=0,e&&e.length&&t.notifySubscribers(e,"arrayChange")}}s?e():(s=!0,o=t.subscribe((function(){++u}),null,"spectate"),a=[].concat(t.v()||[]),l=null,r=t.subscribe(e))}if(t.Ob={},i&&"object"==typeof i&&p.a.extend(t.Ob,i),t.Ob.sparse=!0,!t.zc){var r,o,a,s=!1,l=null,u=0,c=t.Qa,h=t.hb;t.Qa=function(e){c&&c.call(t,e),"arrayChange"===e&&n()},t.hb=function(i){h&&h.call(t,i),"arrayChange"!==i||t.Wa("arrayChange")||(r&&r.s(),o&&o.s(),o=r=null,s=!1,a=e)},t.zc=function(e,t,i){function n(e,t,i){return r[r.length]={status:e,value:t,index:i}}if(s&&!u){var r=[],o=e.length,a=i.length,c=0;switch(t){case"push":c=o;case"unshift":for(t=0;t<a;t++)n("added",i[t],c+t);break;case"pop":c=o-1;case"shift":o&&n("deleted",e[c],c);break;case"splice":t=Math.min(Math.max(0,0>i[0]?o+i[0]:i[0]),o),o=1===a?o:Math.min(t+(i[1]||0),o),a=t+a-2,c=Math.max(o,a);for(var h=[],d=[],f=2;t<c;++t,++f)t<o&&d.push(n("deleted",e[t],t)),t<a&&h.push(n("added",i[f],t));p.a.Kc(d,h);break;default:return}l=r}}}};var v=p.a.Da("_state");p.o=p.$=function(t,i,n){function r(){if(0<arguments.length){if("function"!=typeof o)throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return o.apply(a.nb,arguments),this}return a.ra||p.u.cc(r),(a.ka||a.J&&r.Xa())&&r.ha(),a.X}if("object"==typeof t?n=t:(n=n||{},t&&(n.read=t)),"function"!=typeof n.read)throw Error("Pass a function that returns the value of the ko.computed");var o=n.write,a={X:e,sa:!0,ka:!0,rb:!1,jc:!1,ra:!1,wb:!1,J:!1,Wc:n.read,nb:i||n.owner,l:n.disposeWhenNodeIsRemoved||n.l||null,Sa:n.disposeWhen||n.Sa,Rb:null,I:{},V:0,Ic:null};return r[v]=a,r.Nc="function"==typeof o,p.a.Ba||p.a.extend(r,p.T.fn),p.T.fn.qb(r),p.a.Ab(r,x),n.pure?(a.wb=!0,a.J=!0,p.a.extend(r,b)):n.deferEvaluation&&p.a.extend(r,S),p.options.deferUpdates&&p.Ta.deferred(r,!0),a.l&&(a.jc=!0,a.l.nodeType||(a.l=null)),a.J||n.deferEvaluation||r.ha(),a.l&&r.ja()&&p.a.K.za(a.l,a.Rb=function(){r.s()}),r};var x={equalityComparer:l,qa:function(){return this[v].V},Va:function(){var e=[];return p.a.P(this[v].I,(function(t,i){e[i.Ka]=i.da})),e},Vb:function(e){if(!this[v].V)return!1;var t=this.Va();return-1!==p.a.A(t,e)||!!p.a.Lb(t,(function(t){return t.Vb&&t.Vb(e)}))},uc:function(e,t,i){if(this[v].wb&&t===this)throw Error("A 'pure' computed must not be called recursively");this[v].I[e]=i,i.Ka=this[v].V++,i.La=t.ob()},Xa:function(){var e,t,i=this[v].I;for(e in i)if(Object.prototype.hasOwnProperty.call(i,e)&&(t=i[e],this.Ia&&t.da.Ja||t.da.Dd(t.La)))return!0},Jd:function(){this.Ia&&!this[v].rb&&this.Ia(!1)},ja:function(){var e=this[v];return e.ka||0<e.V},Rd:function(){this.Ja?this[v].ka&&(this[v].sa=!0):this.Hc()},$c:function(e){if(e.Hb){var t=e.subscribe(this.Jd,this,"dirty"),i=e.subscribe(this.Rd,this);return{da:e,s:function(){t.s(),i.s()}}}return e.subscribe(this.Hc,this)},Hc:function(){var e=this,t=e.throttleEvaluation;t&&0<=t?(clearTimeout(this[v].Ic),this[v].Ic=p.a.setTimeout((function(){e.ha(!0)}),t)):e.Ia?e.Ia(!0):e.ha(!0)},ha:function(e){var t=this[v],i=t.Sa,n=!1;if(!t.rb&&!t.ra){if(t.l&&!p.a.Sb(t.l)||i&&i()){if(!t.jc)return void this.s()}else t.jc=!1;t.rb=!0;try{n=this.zd(e)}finally{t.rb=!1}return n}},zd:function(t){var i=this[v],n=!1,r=i.wb?e:!i.V;n={qd:this,mb:i.I,Qb:i.V},p.u.xc({pd:n,od:f,o:this,Ya:r}),i.I={},i.V=0;var o=this.yd(i,n);return i.V?n=this.sb(i.X,o):(this.s(),n=!0),n&&(i.J?this.Gb():this.notifySubscribers(i.X,"beforeChange"),i.X=o,this.notifySubscribers(i.X,"spectate"),!i.J&&t&&this.notifySubscribers(i.X),this.rc&&this.rc()),r&&this.notifySubscribers(i.X,"awake"),n},yd:function(e,t){try{var i=e.Wc;return e.nb?i.call(e.nb):i()}finally{p.u.end(),t.Qb&&!e.J&&p.a.P(t.mb,d),e.sa=e.ka=!1}},v:function(e){var t=this[v];return(t.ka&&(e||!t.V)||t.J&&this.Xa())&&this.ha(),t.X},ub:function(e){p.T.fn.ub.call(this,e),this.nc=function(){return this[v].J||(this[v].sa?this.ha():this[v].ka=!1),this[v].X},this.Ia=function(e){this.pc(this[v].X),this[v].ka=!0,e&&(this[v].sa=!0),this.qc(this,!e)}},s:function(){var t=this[v];!t.J&&t.I&&p.a.P(t.I,(function(e,t){t.s&&t.s()})),t.l&&t.Rb&&p.a.K.yb(t.l,t.Rb),t.I=e,t.V=0,t.ra=!0,t.sa=!1,t.ka=!1,t.J=!1,t.l=e,t.Sa=e,t.Wc=e,this.Nc||(t.nb=e)}},b={Qa:function(e){var t=this,i=t[v];if(!i.ra&&i.J&&"change"==e){if(i.J=!1,i.sa||t.Xa())i.I=null,i.V=0,t.ha()&&t.Gb();else{var n=[];p.a.P(i.I,(function(e,t){n[t.Ka]=e})),p.a.D(n,(function(e,n){var r=i.I[e],o=t.$c(r.da);o.Ka=n,o.La=r.La,i.I[e]=o})),t.Xa()&&t.ha()&&t.Gb()}i.ra||t.notifySubscribers(i.X,"awake")}},hb:function(t){var i=this[v];i.ra||"change"!=t||this.Wa("change")||(p.a.P(i.I,(function(e,t){t.s&&(i.I[e]={da:t.da,Ka:t.Ka,La:t.La},t.s())})),i.J=!0,this.notifySubscribers(e,"asleep"))},ob:function(){var e=this[v];return e.J&&(e.sa||this.Xa())&&this.ha(),p.T.fn.ob.call(this)}},S={Qa:function(e){"change"!=e&&"beforeChange"!=e||this.v()}};p.a.Ba&&p.a.setPrototypeOf(x,p.T.fn);var w=p.ta.Ma;x[w]=p.o,p.Oc=function(e){return"function"==typeof e&&e[w]===x[w]},p.Fd=function(e){return p.Oc(e)&&e[v]&&e[v].wb},p.b("computed",p.o),p.b("dependentObservable",p.o),p.b("isComputed",p.Oc),p.b("isPureComputed",p.Fd),p.b("computed.fn",x),p.L(x,"peek",x.v),p.L(x,"dispose",x.s),p.L(x,"isActive",x.ja),p.L(x,"getDependenciesCount",x.qa),p.L(x,"getDependencies",x.Va),p.xb=function(e,t){return"function"==typeof e?p.o(e,t,{pure:!0}):((e=p.a.extend({},e)).pure=!0,p.o(e,t))},p.b("pureComputed",p.xb),function(){function t(r,o,a){if(a=a||new n,"object"!=typeof(r=o(r))||null===r||r===e||r instanceof RegExp||r instanceof Date||r instanceof String||r instanceof Number||r instanceof Boolean)return r;var s=r instanceof Array?[]:{};return a.save(r,s),i(r,(function(i){var n=o(r[i]);switch(typeof n){case"boolean":case"number":case"string":case"function":s[i]=n;break;case"object":case"undefined":var l=a.get(n);s[i]=l!==e?l:t(n,o,a)}})),s}function i(e,t){if(e instanceof Array){for(var i=0;i<e.length;i++)t(i);"function"==typeof e.toJSON&&t("toJSON")}else for(i in e)t(i)}function n(){this.keys=[],this.values=[]}p.ad=function(e){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");return t(e,(function(e){for(var t=0;p.O(e)&&10>t;t++)e=e();return e}))},p.toJSON=function(e,t,i){return e=p.ad(e),p.a.hc(e,t,i)},n.prototype={constructor:n,save:function(e,t){var i=p.a.A(this.keys,e);0<=i?this.values[i]=t:(this.keys.push(e),this.values.push(t))},get:function(t){return 0<=(t=p.a.A(this.keys,t))?this.values[t]:e}}}(),p.b("toJS",p.ad),p.b("toJSON",p.toJSON),p.Wd=function(e,t,i){function n(t){var n=p.xb(e,i).extend({ma:"always"}),r=n.subscribe((function(e){e&&(r.s(),t(e))}));return n.notifySubscribers(n.v()),r}return"function"!=typeof Promise||t?n(t.bind(i)):new Promise(n)},p.b("when",p.Wd),p.w={M:function(t){switch(p.a.R(t)){case"option":return!0===t.__ko__hasDomDataOptionValue__?p.a.g.get(t,p.c.options.$b):7>=p.a.W?t.getAttributeNode("value")&&t.getAttributeNode("value").specified?t.value:t.text:t.value;case"select":return 0<=t.selectedIndex?p.w.M(t.options[t.selectedIndex]):e;default:return t.value}},cb:function(t,i,n){switch(p.a.R(t)){case"option":"string"==typeof i?(p.a.g.set(t,p.c.options.$b,e),"__ko__hasDomDataOptionValue__"in t&&delete t.__ko__hasDomDataOptionValue__,t.value=i):(p.a.g.set(t,p.c.options.$b,i),t.__ko__hasDomDataOptionValue__=!0,t.value="number"==typeof i?i:"");break;case"select":(""===i||null===i)&&(i=e);for(var r,o=-1,a=0,s=t.options.length;a<s;++a)if((r=p.w.M(t.options[a]))==i||""===r&&i===e){o=a;break}(n||0<=o||i===e&&1<t.size)&&(t.selectedIndex=o,6===p.a.W&&p.a.setTimeout((function(){t.selectedIndex=o}),0));break;default:(null===i||i===e)&&(i=""),t.value=i}}},p.b("selectExtensions",p.w),p.b("selectExtensions.readValue",p.w.M),p.b("selectExtensions.writeValue",p.w.cb),p.m=function(){function e(e){123===(e=p.a.Db(e)).charCodeAt(0)&&(e=e.slice(1,-1));var t,i=[],a=(e+="\n,").match(n),s=[],l=0;if(1<a.length){for(var u,c=0;u=a[c];++c){var h=u.charCodeAt(0);if(44===h){if(0>=l){i.push(t&&s.length?{key:t,value:s.join("")}:{unknown:t||s.join("")}),t=l=0,s=[];continue}}else if(58===h){if(!l&&!t&&1===s.length){t=s.pop();continue}}else{if(47===h&&1<u.length&&(47===u.charCodeAt(1)||42===u.charCodeAt(1)))continue;47===h&&c&&1<u.length?(h=a[c-1].match(r))&&!o[h[0]]&&(a=(e=e.substr(e.indexOf(u)+1)).match(n),c=-1,u="/"):40===h||123===h||91===h?++l:41===h||125===h||93===h?--l:t||s.length||34!==h&&39!==h||(u=u.slice(1,-1))}s.push(u)}if(0<l)throw Error("Unbalanced parentheses, braces, or brackets")}return i}var t=["true","false","null","undefined"],i=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,n=RegExp("\"(?:\\\\.|[^\"])*\"|'(?:\\\\.|[^'])*'|`(?:\\\\.|[^`])*`|/\\*(?:[^*]|\\*+[^*/])*\\*+/|//.*\n|/(?:\\\\.|[^/])+/w*|[^\\s:,/][^,\"'`{}()/:[\\]]*[^\\s,\"'`{}()/:[\\]]|[^\\s]","g"),r=/[\])"'A-Za-z0-9_$]+$/,o={in:1,return:1,typeof:1},a={};return{Ra:[],wa:a,ac:e,vb:function(n,r){function o(e,n){var r;if(!c){var h=p.getBindingHandler(e);if(h&&h.preprocess&&!(n=h.preprocess(n,e,o)))return;(h=a[e])&&(r=n,0<=p.a.A(t,r)?r=!1:(h=r.match(i),r=null!==h&&(h[1]?"Object("+h[1]+")"+h[2]:r)),h=r),h&&l.push("'"+("string"==typeof a[e]?a[e]:e)+"':function(_z){"+r+"=_z}")}u&&(n="function(){return "+n+" }"),s.push("'"+e+"':"+n)}var s=[],l=[],u=(r=r||{}).valueAccessors,c=r.bindingParams,h="string"==typeof n?e(n):n;return p.a.D(h,(function(e){o(e.key||e.unknown,e.value)})),l.length&&o("_ko_property_writers","{"+l.join(",")+" }"),s.join(",")},Id:function(e,t){for(var i=0;i<e.length;i++)if(e[i].key==t)return!0;return!1},eb:function(e,t,i,n,r){e&&p.O(e)?!p.Za(e)||r&&e.v()===n||e(n):(e=t.get("_ko_property_writers"))&&e[i]&&e[i](n)}}}(),p.b("expressionRewriting",p.m),p.b("expressionRewriting.bindingRewriteValidators",p.m.Ra),p.b("expressionRewriting.parseObjectLiteral",p.m.ac),p.b("expressionRewriting.preProcessBindings",p.m.vb),p.b("expressionRewriting._twoWayBindings",p.m.wa),p.b("jsonExpressionRewriting",p.m),p.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",p.m.vb),function(){function e(e){return 8==e.nodeType&&a.test(o?e.text:e.nodeValue)}function t(e){return 8==e.nodeType&&s.test(o?e.text:e.nodeValue)}function n(i,n){for(var r=i,o=1,a=[];r=r.nextSibling;){if(t(r)&&(p.a.g.set(r,u,!0),0==--o))return a;a.push(r),e(r)&&o++}if(!n)throw Error("Cannot find closing comment tag to match: "+i.nodeValue);return null}function r(e,t){var i=n(e,t);return i?0<i.length?i[i.length-1].nextSibling:e.nextSibling:null}var o=i&&"\x3c!--test--\x3e"===i.createComment("test").text,a=o?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,s=o?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,l={ul:!0,ol:!0},u="__ko_matchedEndComment__";p.h={ea:{},childNodes:function(t){return e(t)?n(t):t.childNodes},Ea:function(t){if(e(t))for(var i=0,n=(t=p.h.childNodes(t)).length;i<n;i++)p.removeNode(t[i]);else p.a.Tb(t)},va:function(t,i){if(e(t)){p.h.Ea(t);for(var n=t.nextSibling,r=0,o=i.length;r<o;r++)n.parentNode.insertBefore(i[r],n)}else p.a.va(t,i)},Vc:function(t,i){var n;e(t)?(n=t.nextSibling,t=t.parentNode):n=t.firstChild,n?i!==n&&t.insertBefore(i,n):t.appendChild(i)},Wb:function(t,i,n){n?(n=n.nextSibling,e(t)&&(t=t.parentNode),n?i!==n&&t.insertBefore(i,n):t.appendChild(i)):p.h.Vc(t,i)},firstChild:function(i){if(e(i))return!i.nextSibling||t(i.nextSibling)?null:i.nextSibling;if(i.firstChild&&t(i.firstChild))throw Error("Found invalid end comment, as the first child of "+i);return i.firstChild},nextSibling:function(i){if(e(i)&&(i=r(i)),i.nextSibling&&t(i.nextSibling)){var n=i.nextSibling;if(t(n)&&!p.a.g.get(n,u))throw Error("Found end comment without a matching opening comment, as child of "+i);return null}return i.nextSibling},Cd:e,Vd:function(e){return(e=(o?e.text:e.nodeValue).match(a))?e[1]:null},Sc:function(i){if(l[p.a.R(i)]){var n=i.firstChild;if(n)do{if(1===n.nodeType){var o,a=null;if(o=n.firstChild)do{if(a)a.push(o);else if(e(o)){var s=r(o,!0);s?o=s:a=[o]}else t(o)&&(a=[o])}while(o=o.nextSibling);if(o=a)for(a=n.nextSibling,s=0;s<o.length;s++)a?i.insertBefore(o[s],a):i.appendChild(o[s])}}while(n=n.nextSibling)}}}}(),p.b("virtualElements",p.h),p.b("virtualElements.allowedBindings",p.h.ea),p.b("virtualElements.emptyNode",p.h.Ea),p.b("virtualElements.insertAfter",p.h.Wb),p.b("virtualElements.prepend",p.h.Vc),p.b("virtualElements.setDomNodeChildren",p.h.va),p.ga=function(){this.nd={}},p.a.extend(p.ga.prototype,{nodeHasBindings:function(e){switch(e.nodeType){case 1:return null!=e.getAttribute("data-bind")||p.j.getComponentNameForNode(e);case 8:return p.h.Cd(e);default:return!1}},getBindings:function(e,t){var i=(i=this.getBindingsString(e,t))?this.parseBindingsString(i,t,e):null;return p.j.tc(i,e,t,!1)},getBindingAccessors:function(e,t){var i=(i=this.getBindingsString(e,t))?this.parseBindingsString(i,t,e,{valueAccessors:!0}):null;return p.j.tc(i,e,t,!0)},getBindingsString:function(e){switch(e.nodeType){case 1:return e.getAttribute("data-bind");case 8:return p.h.Vd(e);default:return null}},parseBindingsString:function(e,t,i,n){try{var r,o=this.nd,a=e+(n&&n.valueAccessors||"");if(!(r=o[a])){var s,l="with($context){with($data||{}){return{"+p.m.vb(e,n)+"}}}";s=new Function("$context","$element",l),r=o[a]=s}return r(t,i)}catch(t){throw t.message="Unable to parse bindings.\nBindings value: "+e+"\nMessage: "+t.message,t}}}),p.ga.instance=new p.ga,p.b("bindingProvider",p.ga),function(){function n(e){var t=(e=p.a.g.get(e,b))&&e.N;t&&(e.N=null,t.Tc())}function o(e,t,i){this.node=e,this.yc=t,this.kb=[],this.H=!1,t.N||p.a.K.za(e,n),i&&i.N&&(i.N.kb.push(e),this.Kb=i)}function a(e){return function(){return e}}function s(e){return e()}function l(e){return p.a.Ga(p.u.G(e),(function(t,i){return function(){return e()[i]}}))}function u(e,t,i){return"function"==typeof e?l(e.bind(null,t,i)):p.a.Ga(e,a)}function c(e,t){return l(this.getBindings.bind(this,e,t))}function h(e,t){var i=p.h.firstChild(t);if(i){var n,r=p.ga.instance,o=r.preprocessNode;if(o){for(;n=i;)i=p.h.nextSibling(n),o.call(r,n);i=p.h.firstChild(t)}for(;n=i;)i=p.h.nextSibling(n),d(e,n)}p.i.ma(t,p.i.H)}function d(e,t){var i=e,n=1===t.nodeType;n&&p.h.Sc(t),(n||p.ga.instance.nodeHasBindings(t))&&(i=_(t,null,e).bindingContextForDescendants),i&&!v[p.a.R(t)]&&h(i,t)}function f(e){var t=[],i={},n=[];return p.a.P(e,(function r(o){if(!i[o]){var a=p.getBindingHandler(o);a&&(a.after&&(n.push(o),p.a.D(a.after,(function(t){if(e[t]){if(-1!==p.a.A(n,t))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+n.join(", "));r(t)}})),n.length--),t.push({key:o,Mc:a})),i[o]=!0}})),t}function _(t,i,n){var r,o=p.a.g.Ub(t,b,{}),a=o.hd;if(!i){if(a)throw Error("You cannot apply bindings multiple times to the same element.");o.hd=!0}if(a||(o.context=n),o.Zb||(o.Zb={}),i&&"function"!=typeof i)r=i;else{var l=p.ga.instance,u=l.getBindingAccessors||c,h=p.$((function(){return(r=i?i(n,t):u.call(l,t,n))&&(n[$]&&n[$](),n[y]&&n[y]()),r}),null,{l:t});r&&h.ja()||(h=null)}var d,_=n;if(r){var m=function(){return p.a.Ga(h?h():r,s)},g=h?function(e){return function(){return s(h()[e])}}:function(e){return r[e]};m.get=function(e){return r[e]&&s(g(e))},m.has=function(e){return e in r},p.i.H in r&&p.i.subscribe(t,p.i.H,(function(){var e=(0,r[p.i.H])();if(e){var i=p.h.childNodes(t);i.length&&e(i,p.Ec(i[0]))}})),p.i.pa in r&&(_=p.i.Cb(t,n),p.i.subscribe(t,p.i.pa,(function(){var e=(0,r[p.i.pa])();e&&p.h.firstChild(t)&&e(t)}))),o=f(r),p.a.D(o,(function(i){var n=i.Mc.init,o=i.Mc.update,a=i.key;if(8===t.nodeType&&!p.h.ea[a])throw Error("The binding '"+a+"' cannot be used with virtual elements");try{"function"==typeof n&&p.u.G((function(){var i=n(t,g(a),m,_.$data,_);if(i&&i.controlsDescendantBindings){if(d!==e)throw Error("Multiple bindings ("+d+" and "+a+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");d=a}})),"function"==typeof o&&p.$((function(){o(t,g(a),m,_.$data,_)}),null,{l:t})}catch(e){throw e.message='Unable to process binding "'+a+": "+r[a]+'"\nMessage: '+e.message,e}}))}return{shouldBindDescendants:o=d===e,bindingContextForDescendants:o&&_}}function m(t,i){return t&&t instanceof p.fa?t:new p.fa(t,e,e,i)}var $=p.a.Da("_subscribable"),g=p.a.Da("_ancestorBindingInfo"),y=p.a.Da("_dataDependency");p.c={};var v={script:!0,textarea:!0,template:!0};p.getBindingHandler=function(e){return p.c[e]};var x={};p.fa=function(t,i,n,r,o){function a(){var e=h?c():c,t=p.a.f(e);return i?(p.a.extend(l,i),g in i&&(l[g]=i[g])):(l.$parents=[],l.$root=t,l.ko=p),l[$]=s,u?t=l.$data:(l.$rawData=e,l.$data=t),n&&(l[n]=t),r&&r(l,i,t),i&&i[$]&&!p.S.o().Vb(i[$])&&i[$](),d&&(l[y]=d),l.$data}var s,l=this,u=t===x,c=u?e:t,h="function"==typeof c&&!p.O(c),d=o&&o.dataDependency;o&&o.exportDependencies?a():((s=p.xb(a)).v(),s.ja()?s.equalityComparer=null:l[$]=e)},p.fa.prototype.createChildContext=function(e,t,i,n){if(!n&&t&&"object"==typeof t&&(t=(n=t).as,i=n.extend),t&&n&&n.noChildContext){var r="function"==typeof e&&!p.O(e);return new p.fa(x,this,null,(function(n){i&&i(n),n[t]=r?e():e}),n)}return new p.fa(e,this,t,(function(e,t){e.$parentContext=t,e.$parent=t.$data,e.$parents=(t.$parents||[]).slice(0),e.$parents.unshift(e.$parent),i&&i(e)}),n)},p.fa.prototype.extend=function(e,t){return new p.fa(x,this,null,(function(t){p.a.extend(t,"function"==typeof e?e(t):e)}),t)};var b=p.a.g.Z();o.prototype.Tc=function(){this.Kb&&this.Kb.N&&this.Kb.N.sd(this.node)},o.prototype.sd=function(e){p.a.Pa(this.kb,e),!this.kb.length&&this.H&&this.Cc()},o.prototype.Cc=function(){this.H=!0,this.yc.N&&!this.kb.length&&(this.yc.N=null,p.a.K.yb(this.node,n),p.i.ma(this.node,p.i.pa),this.Tc())},p.i={H:"childrenComplete",pa:"descendantsComplete",subscribe:function(e,t,i,n,r){var o=p.a.g.Ub(e,b,{});return o.Fa||(o.Fa=new p.T),r&&r.notifyImmediately&&o.Zb[t]&&p.u.G(i,n,[e]),o.Fa.subscribe(i,n,t)},ma:function(t,i){var n=p.a.g.get(t,b);if(n&&(n.Zb[i]=!0,n.Fa&&n.Fa.notifySubscribers(t,i),i==p.i.H))if(n.N)n.N.Cc();else if(n.N===e&&n.Fa&&n.Fa.Wa(p.i.pa))throw Error("descendantsComplete event not supported for bindings on this node")},Cb:function(e,t){var i=p.a.g.Ub(e,b,{});return i.N||(i.N=new o(e,i,t[g])),t[g]==i?t:t.extend((function(e){e[g]=i}))}},p.Td=function(e){return(e=p.a.g.get(e,b))&&e.context},p.ib=function(e,t,i){return 1===e.nodeType&&p.h.Sc(e),_(e,t,m(i))},p.ld=function(e,t,i){return i=m(i),p.ib(e,u(t,i,e),i)},p.Oa=function(e,t){1!==t.nodeType&&8!==t.nodeType||h(m(e),t)},p.vc=function(e,n,o){if(!r&&t.jQuery&&(r=t.jQuery),2>arguments.length){if(!(n=i.body))throw Error("ko.applyBindings: could not find document.body; has the document been loaded?")}else if(!n||1!==n.nodeType&&8!==n.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");d(m(e,o),n)},p.Dc=function(t){return!t||1!==t.nodeType&&8!==t.nodeType?e:p.Td(t)},p.Ec=function(t){return(t=p.Dc(t))?t.$data:e},p.b("bindingHandlers",p.c),p.b("bindingEvent",p.i),p.b("bindingEvent.subscribe",p.i.subscribe),p.b("bindingEvent.startPossiblyAsyncContentBinding",p.i.Cb),p.b("applyBindings",p.vc),p.b("applyBindingsToDescendants",p.Oa),p.b("applyBindingAccessorsToNode",p.ib),p.b("applyBindingsToNode",p.ld),p.b("contextFor",p.Dc),p.b("dataFor",p.Ec)}(),function(e){function t(t,n){var a,s=Object.prototype.hasOwnProperty.call(r,t)?r[t]:e;s?s.subscribe(n):((s=r[t]=new p.T).subscribe(n),i(t,(function(e,i){var n=!(!i||!i.synchronous);o[t]={definition:e,Gd:n},delete r[t],a||n?s.notifySubscribers(e):p.na.zb((function(){s.notifySubscribers(e)}))})),a=!0)}function i(e,t){n("getConfig",[e],(function(i){i?n("loadComponent",[e,i],(function(e){t(e,i)})):t(null,null)}))}function n(t,i,r,o){o||(o=p.j.loaders.slice(0));var a=o.shift();if(a){var s=a[t];if(s){var l=!1;if(s.apply(a,i.concat((function(e){l?r(null):null!==e?r(e):n(t,i,r,o)})))!==e&&(l=!0,!a.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else n(t,i,r,o)}else r(null)}var r={},o={};p.j={get:function(i,n){var r=Object.prototype.hasOwnProperty.call(o,i)?o[i]:e;r?r.Gd?p.u.G((function(){n(r.definition)})):p.na.zb((function(){n(r.definition)})):t(i,n)},Bc:function(e){delete o[e]},oc:n},p.j.loaders=[],p.b("components",p.j),p.b("components.get",p.j.get),p.b("components.clearCachedDefinition",p.j.Bc)}(),function(){function e(e,t,i,n){function r(){0==--s&&n(o)}var o={},s=2,l=i.template;i=i.viewModel,l?a(t,l,(function(t){p.j.oc("loadTemplate",[e,t],(function(e){o.template=e,r()}))})):r(),i?a(t,i,(function(t){p.j.oc("loadViewModel",[e,t],(function(e){o[c]=e,r()}))})):r()}function n(e,t,i){if("function"==typeof t)i((function(e){return new t(e)}));else if("function"==typeof t[c])i(t[c]);else if("instance"in t){var r=t.instance;i((function(){return r}))}else"viewModel"in t?n(e,t.viewModel,i):e("Unknown viewModel value: "+t)}function r(e){switch(p.a.R(e)){case"script":return p.a.ua(e.text);case"textarea":return p.a.ua(e.value);case"template":if(o(e.content))return p.a.Ca(e.content.childNodes)}return p.a.Ca(e.childNodes)}function o(e){return t.DocumentFragment?e instanceof DocumentFragment:e&&11===e.nodeType}function a(e,i,n){"string"==typeof i.require?s||t.require?(s||t.require)([i.require],(function(e){e&&"object"==typeof e&&e.Xd&&e.default&&(e=e.default),n(e)})):e("Uses require, but no AMD loader is present"):n(i)}function l(e){return function(t){throw Error("Component '"+e+"': "+t)}}var u={};p.j.register=function(e,t){if(!t)throw Error("Invalid configuration for "+e);if(p.j.tb(e))throw Error("Component "+e+" is already registered");u[e]=t},p.j.tb=function(e){return Object.prototype.hasOwnProperty.call(u,e)},p.j.unregister=function(e){delete u[e],p.j.Bc(e)},p.j.Fc={getConfig:function(e,t){t(p.j.tb(e)?u[e]:null)},loadComponent:function(t,i,n){var r=l(t);a(r,i,(function(i){e(t,r,i,n)}))},loadTemplate:function(e,n,a){if(e=l(e),"string"==typeof n)a(p.a.ua(n));else if(n instanceof Array)a(n);else if(o(n))a(p.a.la(n.childNodes));else if(n.element)if(n=n.element,t.HTMLElement?n instanceof HTMLElement:n&&n.tagName&&1===n.nodeType)a(r(n));else if("string"==typeof n){var s=i.getElementById(n);s?a(r(s)):e("Cannot find element with ID "+n)}else e("Unknown element type: "+n);else e("Unknown template value: "+n)},loadViewModel:function(e,t,i){n(l(e),t,i)}};var c="createViewModel";p.b("components.register",p.j.register),p.b("components.isRegistered",p.j.tb),p.b("components.unregister",p.j.unregister),p.b("components.defaultLoader",p.j.Fc),p.j.loaders.push(p.j.Fc),p.j.dd=u}(),function(){function e(e,i){if(n=e.getAttribute("params")){var n=t.parseBindingsString(n,i,e,{valueAccessors:!0,bindingParams:!0}),r=(n=p.a.Ga(n,(function(t){return p.o(t,null,{l:e})})),p.a.Ga(n,(function(t){var i=t.v();return t.ja()?p.o({read:function(){return p.a.f(t())},write:p.Za(i)&&function(e){t()(e)},l:e}):i})));return Object.prototype.hasOwnProperty.call(r,"$raw")||(r.$raw=n),r}return{$raw:{}}}p.j.getComponentNameForNode=function(e){var t=p.a.R(e);if(p.j.tb(t)&&(-1!=t.indexOf("-")||""+e=="[object HTMLUnknownElement]"||8>=p.a.W&&e.tagName===t))return t},p.j.tc=function(t,i,n,r){if(1===i.nodeType){var o=p.j.getComponentNameForNode(i);if(o){if((t=t||{}).component)throw Error('Cannot use the "component" binding on a custom element matching a component');var a={name:o,params:e(i,n)};t.component=r?function(){return a}:a}}return t};var t=new p.ga;9>p.a.W&&(p.j.register=function(e){return function(t){return e.apply(this,arguments)}}(p.j.register),i.createDocumentFragment=function(e){return function(){var t=e();return p.j.dd,t}}(i.createDocumentFragment))}(),function(){function e(e,t,i){if(!(t=t.template))throw Error("Component '"+e+"' has no template");e=p.a.Ca(t),p.h.va(i,e)}function t(e,t,i){var n=e.createViewModel;return n?n.call(e,t,i):t}var i=0;p.c.component={init:function(n,r,o,a,s){function l(){var e=u&&u.dispose;"function"==typeof e&&e.call(u),h&&h.s(),c=u=h=null}var u,c,h,d=p.a.la(p.h.childNodes(n));return p.h.Ea(n),p.a.K.za(n,l),p.o((function(){var o,a,f=p.a.f(r());if("string"==typeof f?o=f:(o=p.a.f(f.name),a=p.a.f(f.params)),!o)throw Error("No component name specified");var _=p.i.Cb(n,s),m=c=++i;p.j.get(o,(function(i){if(c===m){if(l(),!i)throw Error("Unknown component '"+o+"'");e(o,i,n);var r=t(i,a,{element:n,templateNodes:d});i=_.createChildContext(r,{extend:function(e){e.$component=r,e.$componentTemplateNodes=d}}),r&&r.koDescendantsComplete&&(h=p.i.subscribe(n,p.i.pa,r.koDescendantsComplete,r)),u=r,p.Oa(i,n)}}))}),null,{l:n}),{controlsDescendantBindings:!0}}},p.h.ea.component=!0}();var C={class:"className",for:"htmlFor"};p.c.attr={update:function(t,i){var n=p.a.f(i())||{};p.a.P(n,(function(i,n){n=p.a.f(n);var r=i.indexOf(":"),o=(r="lookupNamespaceURI"in t&&0<r&&t.lookupNamespaceURI(i.substr(0,r)),!1===n||null===n||n===e);o?r?t.removeAttributeNS(r,i):t.removeAttribute(i):n=n.toString(),8>=p.a.W&&i in C?(i=C[i],o?t.removeAttribute(i):t[i]=n):o||(r?t.setAttributeNS(r,i,n):t.setAttribute(i,n)),"name"===i&&p.a.Yc(t,o?"":n)}))}},p.c.checked={after:["value","attr"],init:function(t,i,n){function r(){var r=t.checked,o=a();if(!p.S.Ya()&&(r||!l&&!p.S.qa())){var u=p.u.G(i);if(c){var d=h?u.v():u,_=f;f=o,_!==o?r&&(p.a.Na(d,o,!0),p.a.Na(d,_,!1)):p.a.Na(d,o,r),h&&p.Za(u)&&u(d)}else s&&(o===e?o=r:r||(o=e)),p.m.eb(u,n,"checked",o,!0)}}function o(){var n=p.a.f(i()),r=a();c?(t.checked=0<=p.a.A(n,r),f=r):t.checked=s&&r===e?!!n:a()===n}var a=p.xb((function(){return n.has("checkedValue")?p.a.f(n.get("checkedValue")):d?n.has("value")?p.a.f(n.get("value")):t.value:void 0})),s="checkbox"==t.type,l="radio"==t.type;if(s||l){var u=i(),c=s&&p.a.f(u)instanceof Array,h=!(c&&u.push&&u.splice),d=l||c,f=c?a():e;l&&!t.name&&p.c.uniqueName.init(t,(function(){return!0})),p.o(r,null,{l:t}),p.a.B(t,"click",r),p.o(o,null,{l:t}),u=e}}},p.m.wa.checked=!0,p.c.checkedValue={update:function(e,t){e.value=p.a.f(t())}},p.c.class={update:function(e,t){var i=p.a.Db(p.a.f(t()));p.a.Eb(e,e.__ko__cssValue,!1),e.__ko__cssValue=i,p.a.Eb(e,i,!0)}},p.c.css={update:function(e,t){var i=p.a.f(t());null!==i&&"object"==typeof i?p.a.P(i,(function(t,i){i=p.a.f(i),p.a.Eb(e,t,i)})):p.c.class.update(e,t)}},p.c.enable={update:function(e,t){var i=p.a.f(t());i&&e.disabled?e.removeAttribute("disabled"):i||e.disabled||(e.disabled=!0)}},p.c.disable={update:function(e,t){p.c.enable.update(e,(function(){return!p.a.f(t())}))}},p.c.event={init:function(e,t,i,n,r){var o=t()||{};p.a.P(o,(function(o){"string"==typeof o&&p.a.B(e,o,(function(e){var a,s=t()[o];if(s){try{var l=p.a.la(arguments);n=r.$data,l.unshift(n),a=s.apply(n,l)}finally{!0!==a&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}!1===i.get(o+"Bubble")&&(e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation())}}))}))}},p.c.foreach={Rc:function(e){return function(){var t=e(),i=p.a.bc(t);return i&&"number"!=typeof i.length?(p.a.f(t),{foreach:i.data,as:i.as,noChildContext:i.noChildContext,includeDestroyed:i.includeDestroyed,afterAdd:i.afterAdd,beforeRemove:i.beforeRemove,afterRender:i.afterRender,beforeMove:i.beforeMove,afterMove:i.afterMove,templateEngine:p.ba.Ma}):{foreach:t,templateEngine:p.ba.Ma}}},init:function(e,t){return p.c.template.init(e,p.c.foreach.Rc(t))},update:function(e,t,i,n,r){return p.c.template.update(e,p.c.foreach.Rc(t),i,n,r)}},p.m.Ra.foreach=!1,p.h.ea.foreach=!0,p.c.hasfocus={init:function(e,t,i){function n(n){e.__ko_hasfocusUpdating=!0;var r=e.ownerDocument;if("activeElement"in r){var o;try{o=r.activeElement}catch{o=r.body}n=o===e}r=t(),p.m.eb(r,i,"hasfocus",n,!0),e.__ko_hasfocusLastValue=n,e.__ko_hasfocusUpdating=!1}var r=n.bind(null,!0),o=n.bind(null,!1);p.a.B(e,"focus",r),p.a.B(e,"focusin",r),p.a.B(e,"blur",o),p.a.B(e,"focusout",o),e.__ko_hasfocusLastValue=!1},update:function(e,t){var i=!!p.a.f(t());e.__ko_hasfocusUpdating||e.__ko_hasfocusLastValue===i||(i?e.focus():e.blur(),!i&&e.__ko_hasfocusLastValue&&e.ownerDocument.body.focus(),p.u.G(p.a.Fb,null,[e,i?"focusin":"focusout"]))}},p.m.wa.hasfocus=!0,p.c.hasFocus=p.c.hasfocus,p.m.wa.hasFocus="hasfocus",p.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){p.a.fc(e,t())}},function(){function e(e,t,i){p.c[e]={init:function(e,n,r,o,a){var s,l,u,c,h,d={};if(t){o=r.get("as");var f=r.get("noChildContext");d={as:o,noChildContext:f,exportDependencies:h=!(o&&f)}}return c=(u="render"==r.get("completeOn"))||r.has(p.i.pa),p.o((function(){var r,o=p.a.f(n()),f=!i!=!o,_=!l;(h||f!==s)&&(c&&(a=p.i.Cb(e,a)),f&&((!t||h)&&(d.dataDependency=p.S.o()),r=t?a.createChildContext("function"==typeof o?o:n,d):p.S.qa()?a.extend(null,d):a),_&&p.S.qa()&&(l=p.a.Ca(p.h.childNodes(e),!0)),f?(_||p.h.va(e,p.a.Ca(l)),p.Oa(r,e)):(p.h.Ea(e),u||p.i.ma(e,p.i.H)),s=f)}),null,{l:e}),{controlsDescendantBindings:!0}}},p.m.Ra[e]=!1,p.h.ea[e]=!0}e("if"),e("ifnot",!1,!0),e("with",!0)}(),p.c.let={init:function(e,t,i,n,r){return t=r.extend(t),p.Oa(t,e),{controlsDescendantBindings:!0}}},p.h.ea.let=!0;var T={};p.c.options={init:function(e){if("select"!==p.a.R(e))throw Error("options binding applies only to SELECT elements");for(;0<e.length;)e.remove(0);return{controlsDescendantBindings:!0}},update:function(t,i,n){function r(){return p.a.jb(t.options,(function(e){return e.selected}))}function o(e,t,i){var n=typeof t;return"function"==n?t(e):"string"==n?e[t]:i}function a(e,i){if(_&&c)p.i.ma(t,p.i.H);else if(f.length){var n=0<=p.a.A(f,p.w.M(i[0]));p.a.Zc(i[0],n),_&&!n&&p.u.G(p.a.Fb,null,[t,"change"])}}var s=t.multiple,l=0!=t.length&&s?t.scrollTop:null,u=p.a.f(i()),c=n.get("valueAllowUnset")&&n.has("value"),h=n.get("optionsIncludeDestroyed");i={};var d,f=[];c||(s?f=p.a.Mb(r(),p.w.M):0<=t.selectedIndex&&f.push(p.w.M(t.options[t.selectedIndex]))),u&&(typeof u.length>"u"&&(u=[u]),d=p.a.jb(u,(function(t){return h||t===e||null===t||!p.a.f(t._destroy)})),n.has("optionsCaption")&&null!==(u=p.a.f(n.get("optionsCaption")))&&u!==e&&d.unshift(T));var _=!1;i.beforeRemove=function(e){t.removeChild(e)},u=a,n.has("optionsAfterRender")&&"function"==typeof n.get("optionsAfterRender")&&(u=function(t,i){a(0,i),p.u.G(n.get("optionsAfterRender"),null,[i[0],t!==T?t:e])}),p.a.ec(t,d,(function(i,r,a){return a.length&&(f=!c&&a[0].selected?[p.w.M(a[0])]:[],_=!0),r=t.ownerDocument.createElement("option"),i===T?(p.a.Bb(r,n.get("optionsCaption")),p.w.cb(r,e)):(a=o(i,n.get("optionsValue"),i),p.w.cb(r,p.a.f(a)),i=o(i,n.get("optionsText"),a),p.a.Bb(r,i)),[r]}),i,u),c||(s?f.length&&r().length<f.length:f.length&&0<=t.selectedIndex?p.w.M(t.options[t.selectedIndex])!==f[0]:f.length||0<=t.selectedIndex)&&p.u.G(p.a.Fb,null,[t,"change"]),(c||p.S.Ya())&&p.i.ma(t,p.i.H),p.a.wd(t),l&&20<Math.abs(l-t.scrollTop)&&(t.scrollTop=l)}},p.c.options.$b=p.a.g.Z(),p.c.selectedOptions={init:function(e,t,i){function n(){var n=t(),r=[];p.a.D(e.getElementsByTagName("option"),(function(e){e.selected&&r.push(p.w.M(e))})),p.m.eb(n,i,"selectedOptions",r)}function r(){var i=p.a.f(t()),n=e.scrollTop;i&&"number"==typeof i.length&&p.a.D(e.getElementsByTagName("option"),(function(e){var t=0<=p.a.A(i,p.w.M(e));e.selected!=t&&p.a.Zc(e,t)})),e.scrollTop=n}if("select"!=p.a.R(e))throw Error("selectedOptions binding applies only to SELECT elements");var o;p.i.subscribe(e,p.i.H,(function(){o?n():(p.a.B(e,"change",n),o=p.o(r,null,{l:e}))}),null,{notifyImmediately:!0})},update:function(){}},p.m.wa.selectedOptions=!0,p.c.style={update:function(t,i){var n=p.a.f(i()||{});p.a.P(n,(function(i,n){if((null===(n=p.a.f(n))||n===e||!1===n)&&(n=""),r)r(t).css(i,n);else if(/^--/.test(i))t.style.setProperty(i,n);else{i=i.replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}));var o=t.style[i];t.style[i]=n,n===o||t.style[i]!=o||isNaN(n)||(t.style[i]=n+"px")}}))}},p.c.submit={init:function(e,t,i,n,r){if("function"!=typeof t())throw Error("The value for a submit binding must be a function");p.a.B(e,"submit",(function(i){var n,o=t();try{n=o.call(r.$data,e)}finally{!0!==n&&(i.preventDefault?i.preventDefault():i.returnValue=!1)}}))}},p.c.text={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){p.a.Bb(e,t())}},p.h.ea.text=!0,function(){if(t&&t.navigator){var i,n,r,o,a,s=function(e){if(e)return parseFloat(e[1])},l=t.navigator.userAgent;(i=t.opera&&t.opera.version&&parseInt(t.opera.version()))||(a=s(l.match(/Edge\/([^ ]+)$/)))||s(l.match(/Chrome\/([^ ]+)/))||(n=s(l.match(/Version\/([^ ]+) Safari/)))||(r=s(l.match(/Firefox\/([^ ]+)/)))||(o=p.a.W||s(l.match(/MSIE ([^ ]+)/)))||(o=s(l.match(/rv:([^ )]+)/)))}if(8<=o&&10>o)var u=p.a.g.Z(),c=p.a.g.Z(),h=function(e){var t=this.activeElement;(t=t&&p.a.g.get(t,c))&&t(e)},d=function(e,t){var i=e.ownerDocument;p.a.g.get(i,u)||(p.a.g.set(i,u,!0),p.a.B(i,"selectionchange",h)),p.a.g.set(e,c,t)};p.c.textInput={init:function(t,s,l){function u(e,i){p.a.B(t,e,i)}function c(){var i=p.a.f(s());(null===i||i===e)&&(i=""),m!==e&&i===m?p.a.setTimeout(c,4):t.value!==i&&(y=!0,t.value=i,y=!1,$=t.value)}function h(){_||(m=t.value,_=p.a.setTimeout(f,4))}function f(){clearTimeout(_),m=_=e;var i=t.value;$!==i&&($=i,p.m.eb(s(),l,"textInput",i))}var _,m,$=t.value,g=9==p.a.W?h:f,y=!1;o&&u("keypress",f),11>o&&u("propertychange",(function(e){y||"value"!==e.propertyName||g()})),8==o&&(u("keyup",f),u("keydown",f)),d&&(d(t,g),u("dragend",h)),(!o||9<=o)&&u("input",g),5>n&&"textarea"===p.a.R(t)?(u("keydown",h),u("paste",h),u("cut",h)):11>i?u("keydown",h):4>r?(u("DOMAutoComplete",f),u("dragdrop",f),u("drop",f)):a&&"number"===t.type&&u("keydown",h),u("change",f),u("blur",f),p.o(c,null,{l:t})}},p.m.wa.textInput=!0,p.c.textinput={preprocess:function(e,t,i){i("textInput",e)}}}(),p.c.uniqueName={init:function(e,t){if(t()){var i="ko_unique_"+ ++p.c.uniqueName.rd;p.a.Yc(e,i)}}},p.c.uniqueName.rd=0,p.c.using={init:function(e,t,i,n,r){var o;return i.has("as")&&(o={as:i.get("as"),noChildContext:i.get("noChildContext")}),t=r.createChildContext(t,o),p.Oa(t,e),{controlsDescendantBindings:!0}}},p.h.ea.using=!0,p.c.value={init:function(t,i,n){var r=p.a.R(t),o="input"==r;if(!o||"checkbox"!=t.type&&"radio"!=t.type){var a=[],s=n.get("valueUpdate"),l=!1,u=null;s&&(a="string"==typeof s?[s]:p.a.wc(s),p.a.Pa(a,"change"));var c,h,d=function(){u=null,l=!1;var e=i(),r=p.w.M(t);p.m.eb(e,n,"value",r)};!p.a.W||!o||"text"!=t.type||"off"==t.autocomplete||t.form&&"off"==t.form.autocomplete||-1!=p.a.A(a,"propertychange")||(p.a.B(t,"propertychange",(function(){l=!0})),p.a.B(t,"focus",(function(){l=!1})),p.a.B(t,"blur",(function(){l&&d()}))),p.a.D(a,(function(e){var i=d;p.a.Ud(e,"after")&&(i=function(){u=p.w.M(t),p.a.setTimeout(d,0)},e=e.substring(5)),p.a.B(t,e,i)})),c=o&&"file"==t.type?function(){var n=p.a.f(i());null===n||n===e||""===n?t.value="":p.u.G(d)}:function(){var o=p.a.f(i()),a=p.w.M(t);null!==u&&o===u?p.a.setTimeout(c,0):(o!==a||a===e)&&("select"===r?(a=n.get("valueAllowUnset"),p.w.cb(t,o,a),a||o===p.w.M(t)||p.u.G(d)):p.w.cb(t,o))},"select"===r?p.i.subscribe(t,p.i.H,(function(){h?n.get("valueAllowUnset")?c():d():(p.a.B(t,"change",d),h=p.o(c,null,{l:t}))}),null,{notifyImmediately:!0}):(p.a.B(t,"change",d),p.o(c,null,{l:t}))}else p.ib(t,{checkedValue:i})},update:function(){}},p.m.wa.value=!0,p.c.visible={update:function(e,t){var i=p.a.f(t()),n="none"!=e.style.display;i&&!n?e.style.display="":!i&&n&&(e.style.display="none")}},p.c.hidden={update:function(e,t){p.c.visible.update(e,(function(){return!p.a.f(t())}))}},function(e){p.c[e]={init:function(t,i,n,r,o){return p.c.event.init.call(this,t,(function(){var t={};return t[e]=i(),t}),n,r,o)}}}("click"),p.ca=function(){},p.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},p.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},p.ca.prototype.makeTemplateSource=function(e,t){if("string"==typeof e){var n=(t=t||i).getElementById(e);if(!n)throw Error("Cannot find template with ID "+e);return new p.C.F(n)}if(1==e.nodeType||8==e.nodeType)return new p.C.ia(e);throw Error("Unknown template type: "+e)},p.ca.prototype.renderTemplate=function(e,t,i,n){return e=this.makeTemplateSource(e,n),this.renderTemplateSource(e,t,i,n)},p.ca.prototype.isTemplateRewritten=function(e,t){return!1===this.allowTemplateRewriting||this.makeTemplateSource(e,t).data("isRewritten")},p.ca.prototype.rewriteTemplate=function(e,t,i){t=t((e=this.makeTemplateSource(e,i)).text()),e.text(t),e.data("isRewritten",!0)},p.b("templateEngine",p.ca),p.kc=function(){function e(e,t,i,n){e=p.m.ac(e);for(var r=p.m.Ra,o=0;o<e.length;o++){var a=e[o].key;if(Object.prototype.hasOwnProperty.call(r,a)){var s=r[a];if("function"==typeof s){if(a=s(e[o].value))throw Error(a)}else if(!s)throw Error("This template engine does not support the '"+a+"' binding within its templates")}}return i="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+p.m.vb(e,{valueAccessors:!0})+" } })()},'"+i.toLowerCase()+"')",n.createJavaScriptEvaluatorBlock(i)+t}var t=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,i=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(e,t,i){t.isTemplateRewritten(e,i)||t.rewriteTemplate(e,(function(e){return p.kc.Ld(e,t)}),i)},Ld:function(n,r){return n.replace(t,(function(t,i,n,o,a){return e(a,i,n,r)})).replace(i,(function(t,i){return e(i,"\x3c!-- ko --\x3e","#comment",r)}))},md:function(e,t){return p.aa.Xb((function(i,n){var r=i.nextSibling;r&&r.nodeName.toLowerCase()===t&&p.ib(r,e,n)}))}}}(),p.b("__tr_ambtns",p.kc.md),function(){p.C={},p.C.F=function(e){if(this.F=e){var t=p.a.R(e);this.ab="script"===t?1:"textarea"===t?2:"template"==t&&e.content&&11===e.content.nodeType?3:4}},p.C.F.prototype.text=function(){var e=1===this.ab?"text":2===this.ab?"value":"innerHTML";if(0==arguments.length)return this.F[e];var t=arguments[0];"innerHTML"===e?p.a.fc(this.F,t):this.F[e]=t};var t=p.a.g.Z()+"_";p.C.F.prototype.data=function(e){if(1===arguments.length)return p.a.g.get(this.F,t+e);p.a.g.set(this.F,t+e,arguments[1])};var i=p.a.g.Z();p.C.F.prototype.nodes=function(){var t=this.F;if(0==arguments.length){var n=p.a.g.get(t,i)||{},r=n.lb||(3===this.ab?t.content:4===this.ab?t:e);if(!r||n.jd){var o=this.text();o&&o!==n.bb&&(r=p.a.Md(o,t.ownerDocument),p.a.g.set(t,i,{lb:r,bb:o,jd:!0}))}return r}n=arguments[0],this.ab!==e&&this.text(""),p.a.g.set(t,i,{lb:n})},p.C.ia=function(e){this.F=e},p.C.ia.prototype=new p.C.F,p.C.ia.prototype.constructor=p.C.ia,p.C.ia.prototype.text=function(){if(0==arguments.length){var t=p.a.g.get(this.F,i)||{};return t.bb===e&&t.lb&&(t.bb=t.lb.innerHTML),t.bb}p.a.g.set(this.F,i,{bb:arguments[0]})},p.b("templateSources",p.C),p.b("templateSources.domElement",p.C.F),p.b("templateSources.anonymousTemplate",p.C.ia)}(),function(){function t(e,t,i){var n;for(t=p.h.nextSibling(t);e&&(n=e)!==t;)i(n,e=p.h.nextSibling(n))}function i(e,i){if(e.length){var n=e[0],r=e[e.length-1],o=n.parentNode,a=p.ga.instance,s=a.preprocessNode;if(s){if(t(n,r,(function(e,t){var i=e.previousSibling,o=s.call(a,e);o&&(e===n&&(n=o[0]||t),e===r&&(r=o[o.length-1]||i))})),e.length=0,!n)return;n===r?e.push(n):(e.push(n,r),p.a.Ua(e,o))}t(n,r,(function(e){1!==e.nodeType&&8!==e.nodeType||p.vc(i,e)})),t(n,r,(function(e){1!==e.nodeType&&8!==e.nodeType||p.aa.cd(e,[i])})),p.a.Ua(e,o)}}function n(e){return e.nodeType?e:0<e.length?e[0]:null}function r(e,t,r,o,s){s=s||{};var l=(e&&n(e)||r||{}).ownerDocument,u=s.templateEngine||a;if(p.kc.xd(r,u,l),"number"!=typeof(r=u.renderTemplate(r,o,s,l)).length||0<r.length&&"number"!=typeof r[0].nodeType)throw Error("Template engine must return an array of DOM nodes");switch(l=!1,t){case"replaceChildren":p.h.va(e,r),l=!0;break;case"replaceNode":p.a.Xc(e,r),l=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+t)}return l&&(i(r,o),s.afterRender&&p.u.G(s.afterRender,null,[r,o[s.as||"$data"]]),"replaceChildren"==t&&p.i.ma(e,p.i.H)),r}function o(e,t,i){return p.O(e)?e():"function"==typeof e?e(t,i):e}var a;p.gc=function(t){if(t!=e&&!(t instanceof p.ca))throw Error("templateEngine must inherit from ko.templateEngine");a=t},p.dc=function(t,i,s,l,u){if(((s=s||{}).templateEngine||a)==e)throw Error("Set a template engine before calling renderTemplate");if(u=u||"replaceChildren",l){var c=n(l);return p.$((function(){var e=i&&i instanceof p.fa?i:new p.fa(i,null,null,null,{exportDependencies:!0}),a=o(t,e.$data,e);e=r(l,u,a,e,s),"replaceNode"==u&&(c=n(l=e))}),null,{Sa:function(){return!c||!p.a.Sb(c)},l:c&&"replaceNode"==u?c.parentNode:c})}return p.aa.Xb((function(e){p.dc(t,i,s,e,"replaceNode")}))},p.Qd=function(t,n,a,s,l){function u(e,t){p.u.G(p.a.ec,null,[s,e,h,a,c,t]),p.i.ma(s,p.i.H)}function c(e,t){i(t,d),a.afterRender&&a.afterRender(t,e),d=null}function h(e,i){d=l.createChildContext(e,{as:f,noChildContext:a.noChildContext,extend:function(e){e.$index=i,f&&(e[f+"Index"]=i)}});var n=o(t,e,d);return r(s,"ignoreTargetNode",n,d,a)}var d,f=a.as,_=!1===a.includeDestroyed||p.options.foreachHidesDestroyed&&!a.includeDestroyed;if(_||a.beforeRemove||!p.Pc(n))return p.$((function(){var t=p.a.f(n)||[];typeof t.length>"u"&&(t=[t]),_&&(t=p.a.jb(t,(function(t){return t===e||null===t||!p.a.f(t._destroy)}))),u(t)}),null,{l:s});u(n.v());var m=n.subscribe((function(e){u(n(),e)}),null,"arrayChange");return m.l(s),m};var s=p.a.g.Z(),l=p.a.g.Z();p.c.template={init:function(e,t){var i=p.a.f(t());if("string"==typeof i||"name"in i)p.h.Ea(e);else if("nodes"in i){if(i=i.nodes||[],p.O(i))throw Error('The "nodes" option must be a plain, non-observable array.');var n=i[0]&&i[0].parentNode;n&&p.a.g.get(n,l)||(n=p.a.Yb(i),p.a.g.set(n,l,!0)),new p.C.ia(e).nodes(n)}else{if(!(0<(i=p.h.childNodes(e)).length))throw Error("Anonymous template defined, but no template content was provided");n=p.a.Yb(i),new p.C.ia(e).nodes(n)}return{controlsDescendantBindings:!0}},update:function(t,i,n,r,o){var a=i();n=!0,r=null,"string"==typeof(i=p.a.f(a))?i={}:(a="name"in i?i.name:t,"if"in i&&(n=p.a.f(i.if)),n&&"ifnot"in i&&(n=!p.a.f(i.ifnot)),n&&!a&&(n=!1)),"foreach"in i?r=p.Qd(a,n&&i.foreach||[],i,t,o):n?(n=o,"data"in i&&(n=o.createChildContext(i.data,{as:i.as,noChildContext:i.noChildContext,exportDependencies:!0})),r=p.dc(a,n,i,t)):p.h.Ea(t),o=r,(i=p.a.g.get(t,s))&&"function"==typeof i.s&&i.s(),p.a.g.set(t,s,!o||o.ja&&!o.ja()?e:o)}},p.m.Ra.template=function(e){return 1==(e=p.m.ac(e)).length&&e[0].unknown||p.m.Id(e,"name")?null:"This template engine does not support anonymous templates nested within its templates"},p.h.ea.template=!0}(),p.b("setTemplateEngine",p.gc),p.b("renderTemplate",p.dc),p.a.Kc=function(e,t,i){var n,r,o,a,s;if(e.length&&t.length)for(n=r=0;(!i||n<i)&&(a=e[r]);++r){for(o=0;s=t[o];++o)if(a.value===s.value){a.moved=s.index,s.moved=a.index,t.splice(o,1),n=o=0;break}n+=o}},p.a.Pb=function(){function e(e,t,i,n,r){var o,a,s,l,u,c=Math.min,h=Math.max,d=[],f=e.length,_=t.length,m=_-f||1,$=f+_+1;for(o=0;o<=f;o++)for(l=s,d.push(s=[]),u=c(_,o+m),a=h(0,o-1);a<=u;a++)s[a]=a?o?e[o-1]===t[a-1]?l[a-1]:c(l[a]||$,s[a-1]||$)+1:a+1:o+1;for(c=[],h=[],m=[],o=f,a=_;o||a;)_=d[o][a]-1,a&&_===d[o][a-1]?h.push(c[c.length]={status:i,value:t[--a],index:a}):o&&_===d[o-1][a]?m.push(c[c.length]={status:n,value:e[--o],index:o}):(--a,--o,r.sparse||c.push({status:"retained",value:t[a]}));return p.a.Kc(m,h,!r.dontLimitMoves&&10*f),c.reverse()}return function(t,i,n){return n="boolean"==typeof n?{dontLimitMoves:n}:n||{},i=i||[],(t=t||[]).length<i.length?e(t,i,"added","deleted",n):e(i,t,"deleted","added",n)}}(),p.b("utils.compareArrays",p.a.Pb),function(){function t(t,i,n,r,o){var a=[],s=p.$((function(){var e=i(n,o,p.a.Ua(a,t))||[];0<a.length&&(p.a.Xc(a,e),r&&p.u.G(r,null,[n,e,o])),a.length=0,p.a.Nb(a,e)}),null,{l:t,Sa:function(){return!p.a.kd(a)}});return{Y:a,$:s.ja()?s:e}}var i=p.a.g.Z(),n=p.a.g.Z();p.a.ec=function(r,o,a,s,l,u){function c(e){f={Aa:e,pb:p.ta(b++)},v.push(f),y||P.push(f)}function h(e){f=g[e],b!==f.pb.v()&&T.push(f),f.pb(b++),p.a.Ua(f.Y,r),v.push(f)}function d(e,t){if(e)for(var i=0,n=t.length;i<n;i++)p.a.D(t[i].Y,(function(n){e(n,i,t[i].Aa)}))}typeof(o=o||[]).length>"u"&&(o=[o]),s=s||{};var f,_,m,$,g=p.a.g.get(r,i),y=!g,v=[],x=0,b=0,S=[],w=[],C=[],T=[],P=[],E=0;if(y)p.a.D(o,c);else{if(!u||g&&g._countWaitingForRemove){var A=p.a.Mb(g,(function(e){return e.Aa}));u=p.a.Pb(A,o,{dontLimitMoves:s.dontLimitMoves,sparse:!0})}var L,M,I;for(A=0;L=u[A];A++)switch(M=L.moved,I=L.index,L.status){case"deleted":for(;x<I;)h(x++);M===e&&((f=g[x]).$&&(f.$.s(),f.$=e),p.a.Ua(f.Y,r).length&&(s.beforeRemove&&(v.push(f),E++,f.Aa===n?f=null:C.push(f)),f&&S.push.apply(S,f.Y))),x++;break;case"added":for(;b<I;)h(x++);M!==e?(w.push(v.length),h(M)):c(L.value)}for(;b<o.length;)h(x++);v._countWaitingForRemove=E}p.a.g.set(r,i,v),d(s.beforeMove,T),p.a.D(S,s.beforeRemove?p.oa:p.removeNode);try{$=r.ownerDocument.activeElement}catch{}if(w.length)for(;(A=w.shift())!=e;){for(f=v[A],_=e;A;)if((m=v[--A].Y)&&m.length){_=m[m.length-1];break}for(o=0;x=f.Y[o];_=x,o++)p.h.Wb(r,x,_)}for(A=0;f=v[A];A++){for(f.Y||p.a.extend(f,t(r,a,f.Aa,l,f.pb)),o=0;x=f.Y[o];_=x,o++)p.h.Wb(r,x,_);!f.Ed&&l&&(l(f.Aa,f.Y,f.pb),f.Ed=!0,_=f.Y[f.Y.length-1])}for($&&r.ownerDocument.activeElement!=$&&$.focus(),d(s.beforeRemove,C),A=0;A<C.length;++A)C[A].Aa=n;d(s.afterMove,T),d(s.afterAdd,P)}}(),p.b("utils.setDomNodeChildrenFromArrayMapping",p.a.ec),p.ba=function(){this.allowTemplateRewriting=!1},p.ba.prototype=new p.ca,p.ba.prototype.constructor=p.ba,p.ba.prototype.renderTemplateSource=function(e,t,i,n){return(t=9>p.a.W||!e.nodes?null:e.nodes())?p.a.la(t.cloneNode(!0).childNodes):(e=e.text(),p.a.ua(e,n))},p.ba.Ma=new p.ba,p.gc(p.ba.Ma),p.b("nativeTemplateEngine",p.ba),function(){p.$a=function(){var e=this.Hd=function(){if(!r||!r.tmpl)return 0;try{if(0<=r.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch{}return 1}();this.renderTemplateSource=function(t,n,o,a){if(a=a||i,o=o||{},2>e)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var s=t.data("precompiled");return s||(s=t.text()||"",s=r.template(null,"{{ko_with $item.koBindingContext}}"+s+"{{/ko_with}}"),t.data("precompiled",s)),t=[n.$data],n=r.extend({koBindingContext:n},o.templateOptions),(n=r.tmpl(s,t,n)).appendTo(a.createElement("div")),r.fragments={},n},this.createJavaScriptEvaluatorBlock=function(e){return"{{ko_code ((function() { return "+e+" })()) }}"},this.addTemplate=function(e,t){i.write("<script type='text/html' id='"+e+"'>"+t+"<\/script>")},0<e&&(r.tmpl.tag.ko_code={open:"__.push($1 || '');"},r.tmpl.tag.ko_with={open:"with($1) {",close:"} "})},p.$a.prototype=new p.ca,p.$a.prototype.constructor=p.$a;var e=new p.$a;0<e.Hd&&p.gc(e),p.b("jqueryTmplTemplateEngine",p.$a)}()}(t.ko={})}();var le$2=ko;typeof window<"u"?(ko=window.ko,typeof G$3<"u"?window.ko=G$3:delete window.ko):(ko=global.ko,typeof G$3<"u"?global.ko=G$3:delete global.ko); /** * @license * Knockout ES5 plugin - https://github.com/SteveSanderson/knockout-es5 * Copyright (c) Steve Sanderson * MIT license */ var u$5="__knockoutObservables",s$4="__knockoutSubscribable";function f$5(e,t){if(!e)throw new Error("When calling ko.track, you must pass an object as the first parameter.");var i=this,n=l$4(e,!0);return(t=t||Object.getOwnPropertyNames(e)).forEach((function(t){if(t!==u$5&&t!==s$4&&!(t in n)){var r=e[t],o=r instanceof Array,a=i.isObservable(r)?r:o?i.observableArray(r):i.observable(r);Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:a,set:i.isWriteableObservable(a)?a:void 0}),n[t]=a,o&&p$2(i,a)}})),e}function l$4(e,t){var i=e[u$5];return!i&&t&&(i={},Object.defineProperty(e,u$5,{value:i})),i}function v$3(e,t,i){var n={owner:e,deferEvaluation:!0};if("function"==typeof i)n.read=i;else{if("value"in i)throw new Error('For ko.defineProperty, you must not specify a "value" for the property. You must provide a "get" function.');if("function"!=typeof i.get)throw new Error('For ko.defineProperty, the third parameter must be either an evaluator function, or an options object containing a function called "get".');n.read=i.get,n.write=i.set}return e[t]=this.computed(n),f$5.call(this,e,[t]),e}function p$2(e,t){var i=null;e.computed((function(){i&&(i.dispose(),i=null);var n=t();n instanceof Array&&(i=y$5(e,t,n))}))}function y$5(e,t,i){return d$5(e,i).subscribe(t)}function d$5(e,t){var i=t[s$4];if(!i){i=new e.subscribable,Object.defineProperty(t,s$4,{value:i});var n={};h$3(t,i,n),m$7(e,t,i,n)}return i}function h$3(e,t,i){["pop","push","reverse","shift","sort","splice","unshift"].forEach((function(n){var r=e[n];e[n]=function(){var e=r.apply(this,arguments);return!0!==i.pause&&t.notifySubscribers(this),e}}))}function m$7(e,t,i,n){["remove","removeAll","destroy","destroyAll","replace"].forEach((function(r){Object.defineProperty(t,r,{enumerable:!1,value:function(){var o;n.pause=!0;try{o=e.observableArray.fn[r].apply(e.observableArray(t),arguments)}finally{n.pause=!1}return i.notifySubscribers(t),o}})}))}function b$5(e,t){if(!e)return null;var i=l$4(e,!1);return i&&i[t]||null}function g$3(e,t){var i=b$5(e,t);i&&i.valueHasMutated()}function w$6(e){e.track=f$5,e.getObservable=b$5,e.valueHasMutated=g$3,e.defineProperty=v$3}var r$6={attachToKo:w$6},u$4="http://www.w3.org/2000/svg",d$4="cesium-svgPath-svg",c$5={register:function(e){e.bindingHandlers.cesiumSvgPath={init:function(t,i){var n=document.createElementNS(u$4,"svg:svg");n.setAttribute("class",d$4);var r=document.createElementNS(u$4,"path");return n.appendChild(r),e.virtualElements.setDomNodeChildren(t,[n]),e.computed({read:function(){var t=e.unwrap(i());r.setAttribute("d",e.unwrap(t.path));var o=e.unwrap(t.width),a=e.unwrap(t.height);n.setAttribute("width",o),n.setAttribute("height",a),n.setAttribute("viewBox","0 0 "+o+" "+a),t.css&&n.setAttribute("class",d$4+" "+e.unwrap(t.css))},disposeWhenNodeIsRemoved:t}),{controlsDescendantBindings:!0}}},e.virtualElements.allowedBindings.cesiumSvgPath=!0}};r$6.attachToKo(le$2),c$5.register(le$2); /* Copyright 2015-2018 Esri. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @preserve */var N$1={};!function(){var e=function(){var e={defaultNoDataValue:-34027999387901484e22,decode:function(o,a){var s=(a=a||{}).encodedMaskData||null===a.encodedMaskData,l=r(o,a.inputOffset||0,s),u=null!==a.noDataValue?a.noDataValue:e.defaultNoDataValue,c=t(l,a.pixelType||Float32Array,a.encodedMaskData,u,a.returnMask),h={width:l.width,height:l.height,pixelData:c.resultPixels,minValue:c.minValue,maxValue:l.pixels.maxValue,noDataValue:u};return c.resultMask&&(h.maskData=c.resultMask),a.returnEncodedMask&&l.mask&&(h.encodedMaskData=l.mask.bitset?l.mask.bitset:null),a.returnFileInfo&&(h.fileInfo=i(l),a.computeUsedBitDepths&&(h.fileInfo.bitDepths=n(l))),h}},t=function(e,t,i,n,r){var a,s,l,u=0,c=e.pixels.numBlocksX,h=e.pixels.numBlocksY,d=Math.floor(e.width/c),f=Math.floor(e.height/h),p=2*e.maxZError,_=Number.MAX_VALUE;i=i||(e.mask?e.mask.bitset:null),s=new t(e.width*e.height),r&&i&&(l=new Uint8Array(e.width*e.height));for(var m,$,g=new Float32Array(d*f),y=0;y<=h;y++){var v=y!==h?f:e.height%h;if(0!==v)for(var x=0;x<=c;x++){var b=x!==c?d:e.width%c;if(0!==b){var S,w,C,T,P=y*e.width*f+x*d,E=e.width-b,A=e.pixels.blocks[u];if(A.encoding<2?(0===A.encoding?S=A.rawData:(o(A.stuffedData,A.bitsPerPixel,A.numValidPixels,A.offset,p,g,e.pixels.maxValue),S=g),w=0):C=2===A.encoding?0:A.offset,i)for($=0;$<v;$++){for(7&P&&(T=i[P>>3],T<<=7&P),m=0;m<b;m++)7&P||(T=i[P>>3]),128&T?(l&&(l[P]=1),_=_>(a=A.encoding<2?S[w++]:C)?a:_,s[P++]=a):(l&&(l[P]=0),s[P++]=n),T<<=1;P+=E}else if(A.encoding<2)for($=0;$<v;$++){for(m=0;m<b;m++)_=_>(a=S[w++])?a:_,s[P++]=a;P+=E}else for(_=_>C?C:_,$=0;$<v;$++){for(m=0;m<b;m++)s[P++]=C;P+=E}if(1===A.encoding&&w!==A.numValidPixels)throw"Block and Mask do not match";u++}}}return{resultPixels:s,resultMask:l,minValue:_}},i=function(e){return{fileIdentifierString:e.fileIdentifierString,fileVersion:e.fileVersion,imageType:e.imageType,height:e.height,width:e.width,maxZError:e.maxZError,eofOffset:e.eofOffset,mask:e.mask?{numBlocksX:e.mask.numBlocksX,numBlocksY:e.mask.numBlocksY,numBytes:e.mask.numBytes,maxValue:e.mask.maxValue}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,numBytes:e.pixels.numBytes,maxValue:e.pixels.maxValue,noDataValue:e.noDataValue}}},n=function(e){for(var t=e.pixels.numBlocksX*e.pixels.numBlocksY,i={},n=0;n<t;n++){var r=e.pixels.blocks[n];0===r.encoding?i.float32=!0:1===r.encoding?i[r.bitsPerPixel]=!0:i[0]=!0}return Object.keys(i)},r=function(e,t,i){var n={},r=new Uint8Array(e,t,10);if(n.fileIdentifierString=String.fromCharCode.apply(null,r),"CntZImage"!==n.fileIdentifierString.trim())throw"Unexpected file identifier string: "+n.fileIdentifierString;t+=10;var o=new DataView(e,t,24);if(n.fileVersion=o.getInt32(0,!0),n.imageType=o.getInt32(4,!0),n.height=o.getUint32(8,!0),n.width=o.getUint32(12,!0),n.maxZError=o.getFloat64(16,!0),t+=24,!i)if(o=new DataView(e,t,16),n.mask={},n.mask.numBlocksY=o.getUint32(0,!0),n.mask.numBlocksX=o.getUint32(4,!0),n.mask.numBytes=o.getUint32(8,!0),n.mask.maxValue=o.getFloat32(12,!0),t+=16,n.mask.numBytes>0){var a=new Uint8Array(Math.ceil(n.width*n.height/8)),s=(o=new DataView(e,t,n.mask.numBytes)).getInt16(0,!0),l=2,u=0;do{if(s>0)for(;s--;)a[u++]=o.getUint8(l++);else{var c=o.getUint8(l++);for(s=-s;s--;)a[u++]=c}s=o.getInt16(l,!0),l+=2}while(l<n.mask.numBytes);if(-32768!==s||u<a.length)throw"Unexpected end of mask RLE encoding";n.mask.bitset=a,t+=n.mask.numBytes}else 0==(n.mask.numBytes|n.mask.numBlocksY|n.mask.maxValue)&&(n.mask.bitset=new Uint8Array(Math.ceil(n.width*n.height/8)));o=new DataView(e,t,16),n.pixels={},n.pixels.numBlocksY=o.getUint32(0,!0),n.pixels.numBlocksX=o.getUint32(4,!0),n.pixels.numBytes=o.getUint32(8,!0),n.pixels.maxValue=o.getFloat32(12,!0),t+=16;var h=n.pixels.numBlocksX,d=n.pixels.numBlocksY,f=h+(n.width%h>0?1:0),p=d+(n.height%d>0?1:0);n.pixels.blocks=new Array(f*p);for(var _=0,m=0;m<p;m++)for(var $=0;$<f;$++){var g=0,y=e.byteLength-t;o=new DataView(e,t,Math.min(10,y));var v={};n.pixels.blocks[_++]=v;var x=o.getUint8(0);if(g++,v.encoding=63&x,v.encoding>3)throw"Invalid block encoding ("+v.encoding+")";if(2!==v.encoding){if(0!==x&&2!==x){if(x>>=6,v.offsetType=x,2===x)v.offset=o.getInt8(1),g++;else if(1===x)v.offset=o.getInt16(1,!0),g+=2;else{if(0!==x)throw"Invalid block offset type";v.offset=o.getFloat32(1,!0),g+=4}if(1===v.encoding)if(x=o.getUint8(g),g++,v.bitsPerPixel=63&x,x>>=6,v.numValidPixelsType=x,2===x)v.numValidPixels=o.getUint8(g),g++;else if(1===x)v.numValidPixels=o.getUint16(g,!0),g+=2;else{if(0!==x)throw"Invalid valid pixel count type";v.numValidPixels=o.getUint32(g,!0),g+=4}}var b;if(t+=g,3!==v.encoding)if(0===v.encoding){var S=(n.pixels.numBytes-1)/4;if(S!==Math.floor(S))throw"uncompressed block has invalid length";b=new ArrayBuffer(4*S),new Uint8Array(b).set(new Uint8Array(e,t,4*S));var w=new Float32Array(b);v.rawData=w,t+=4*S}else if(1===v.encoding){var C=Math.ceil(v.numValidPixels*v.bitsPerPixel/8),T=Math.ceil(C/4);b=new ArrayBuffer(4*T),new Uint8Array(b).set(new Uint8Array(e,t,C)),v.stuffedData=new Uint32Array(b),t+=C}}else t++}return n.eofOffset=t,n},o=function(e,t,i,n,r,o,a){var s,l,u,c=(1<<t)-1,h=0,d=0,f=Math.ceil((a-n)/r),p=4*e.length-Math.ceil(t*i/8);for(e[e.length-1]<<=8*p,s=0;s<i;s++){if(0===d&&(u=e[h++],d=32),d>=t)l=u>>>d-t&c,d-=t;else{var _=t-d;l=(u&c)<<_&c,l+=(u=e[h++])>>>(d=32-_)}o[s]=l<f?n+l*r:a}return o};return e}(),t=function(){var e=function(e,t,i,n,r,o,a,s){var l,u,c,h,d,f=(1<<i)-1,p=0,_=0,m=4*e.length-Math.ceil(i*n/8);if(e[e.length-1]<<=8*m,r)for(l=0;l<n;l++)0===_&&(c=e[p++],_=32),_>=i?(u=c>>>_-i&f,_-=i):(u=(c&f)<<(h=i-_)&f,u+=(c=e[p++])>>>(_=32-h)),t[l]=r[u];else for(d=Math.ceil((s-o)/a),l=0;l<n;l++)0===_&&(c=e[p++],_=32),_>=i?(u=c>>>_-i&f,_-=i):(u=(c&f)<<(h=i-_)&f,u+=(c=e[p++])>>>(_=32-h)),t[l]=u<d?o+u*a:s},t=function(e,t,i,n,r,o){var a,s=(1<<t)-1,l=0,u=0,c=0,h=0,d=0,f=[],p=4*e.length-Math.ceil(t*i/8);e[e.length-1]<<=8*p;var _=Math.ceil((o-n)/r);for(u=0;u<i;u++)0===h&&(a=e[l++],h=32),h>=t?(d=a>>>h-t&s,h-=t):(d=(a&s)<<(c=t-h)&s,d+=(a=e[l++])>>>(h=32-c)),f[u]=d<_?n+d*r:o;return f.unshift(n),f},i=function(e,t,i,n,r,o,a,s){var l,u,c,h,d=(1<<i)-1,f=0,p=0,_=0;if(r)for(l=0;l<n;l++)0===p&&(c=e[f++],p=32,_=0),p>=i?(u=c>>>_&d,p-=i,_+=i):(u=c>>>_&d,p=32-(h=i-p),u|=((c=e[f++])&(1<<h)-1)<<i-h,_=h),t[l]=r[u];else{var m=Math.ceil((s-o)/a);for(l=0;l<n;l++)0===p&&(c=e[f++],p=32,_=0),p>=i?(u=c>>>_&d,p-=i,_+=i):(u=c>>>_&d,p=32-(h=i-p),u|=((c=e[f++])&(1<<h)-1)<<i-h,_=h),t[l]=u<m?o+u*a:s}return t},n=function(e,t,i,n,r,o){var a,s=(1<<t)-1,l=0,u=0,c=0,h=0,d=0,f=0,p=[],_=Math.ceil((o-n)/r);for(u=0;u<i;u++)0===h&&(a=e[l++],h=32,f=0),h>=t?(d=a>>>f&s,h-=t,f+=t):(d=a>>>f&s,h=32-(c=t-h),d|=((a=e[l++])&(1<<c)-1)<<t-c,f=c),p[u]=d<_?n+d*r:o;return p.unshift(n),p},r=function(e,t,i,n){var r,o,a,s,l=(1<<i)-1,u=0,c=0,h=4*e.length-Math.ceil(i*n/8);for(e[e.length-1]<<=8*h,r=0;r<n;r++)0===c&&(a=e[u++],c=32),c>=i?(o=a>>>c-i&l,c-=i):(o=(a&l)<<(s=i-c)&l,o+=(a=e[u++])>>>(c=32-s)),t[r]=o;return t},o=function(e,t,i,n){var r,o,a,s,l=(1<<i)-1,u=0,c=0,h=0;for(r=0;r<n;r++)0===c&&(a=e[u++],c=32,h=0),c>=i?(o=a>>>h&l,c-=i,h+=i):(o=a>>>h&l,c=32-(s=i-c),o|=((a=e[u++])&(1<<s)-1)<<i-s,h=s),t[r]=o;return t},a={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(e){for(var t=65535,i=65535,n=e.length,r=Math.floor(n/2),o=0;r;){var a=r>=359?359:r;r-=a;do{t+=e[o++]<<8,i+=t+=e[o++]}while(--a);t=(65535&t)+(t>>>16),i=(65535&i)+(i>>>16)}return 1&n&&(i+=t+=e[o]<<8),((i=(65535&i)+(i>>>16))<<16|(t=(65535&t)+(t>>>16)))>>>0},readHeaderInfo:function(e,t){var i=t.ptr,n=new Uint8Array(e,i,6),r={};if(r.fileIdentifierString=String.fromCharCode.apply(null,n),0!==r.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+r.fileIdentifierString;i+=6;var o,a=new DataView(e,i,8),s=a.getInt32(0,!0);if(r.fileVersion=s,i+=4,s>=3&&(r.checksum=a.getUint32(4,!0),i+=4),a=new DataView(e,i,12),r.height=a.getUint32(0,!0),r.width=a.getUint32(4,!0),i+=8,s>=4?(r.numDims=a.getUint32(8,!0),i+=4):r.numDims=1,a=new DataView(e,i,40),r.numValidPixel=a.getUint32(0,!0),r.microBlockSize=a.getInt32(4,!0),r.blobSize=a.getInt32(8,!0),r.imageType=a.getInt32(12,!0),r.maxZError=a.getFloat64(16,!0),r.zMin=a.getFloat64(24,!0),r.zMax=a.getFloat64(32,!0),i+=40,t.headerInfo=r,t.ptr=i,s>=3&&(o=s>=4?52:48,this.computeChecksumFletcher32(new Uint8Array(e,i-o,r.blobSize-14))!==r.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(e,t){var i=t.headerInfo,n=this.getDataTypeArray(i.imageType),r=i.numDims*this.getDataTypeSize(i.imageType),o=this.readSubArray(e,t.ptr,n,r),a=this.readSubArray(e,t.ptr+r,n,r);t.ptr+=2*r;var s,l=!0;for(s=0;s<i.numDims;s++)if(o[s]!==a[s]){l=!1;break}return i.minValues=o,i.maxValues=a,l},readSubArray:function(e,t,i,n){var r;if(i===Uint8Array)r=new Uint8Array(e,t,n);else{var o=new ArrayBuffer(n);new Uint8Array(o).set(new Uint8Array(e,t,n)),r=new i(o)}return r},readMask:function(e,t){var i,n,r=t.ptr,o=t.headerInfo,a=o.width*o.height,s=o.numValidPixel,l=new DataView(e,r,4),u={};if(u.numBytes=l.getUint32(0,!0),r+=4,(0===s||a===s)&&0!==u.numBytes)throw"invalid mask";if(0===s)i=new Uint8Array(Math.ceil(a/8)),u.bitset=i,n=new Uint8Array(a),t.pixels.resultMask=n,r+=u.numBytes;else if(u.numBytes>0){i=new Uint8Array(Math.ceil(a/8));var c=(l=new DataView(e,r,u.numBytes)).getInt16(0,!0),h=2,d=0,f=0;do{if(c>0)for(;c--;)i[d++]=l.getUint8(h++);else for(f=l.getUint8(h++),c=-c;c--;)i[d++]=f;c=l.getInt16(h,!0),h+=2}while(h<u.numBytes);if(-32768!==c||d<i.length)throw"Unexpected end of mask RLE encoding";n=new Uint8Array(a);var p=0,_=0;for(_=0;_<a;_++)7&_?(p=i[_>>3],p<<=7&_):p=i[_>>3],128&p&&(n[_]=1);t.pixels.resultMask=n,u.bitset=i,r+=u.numBytes}return t.ptr=r,t.mask=u,!0},readDataOneSweep:function(e,t,i){var n,r=t.ptr,o=t.headerInfo,s=o.numDims,l=o.width*o.height,u=o.imageType,c=o.numValidPixel*a.getDataTypeSize(u)*s,h=t.pixels.resultMask;if(i===Uint8Array)n=new Uint8Array(e,r,c);else{var d=new ArrayBuffer(c);new Uint8Array(d).set(new Uint8Array(e,r,c)),n=new i(d)}if(n.length===l*s)t.pixels.resultPixels=n;else{t.pixels.resultPixels=new i(l*s);var f=0,p=0,_=0,m=0;if(s>1)for(_=0;_<s;_++)for(m=_*l,p=0;p<l;p++)h[p]&&(t.pixels.resultPixels[m+p]=n[f++]);else for(p=0;p<l;p++)h[p]&&(t.pixels.resultPixels[p]=n[f++])}return r+=c,t.ptr=r,!0},readHuffmanTree:function(e,t){var i=this.HUFFMAN_LUT_BITS_MAX,n=new DataView(e,t.ptr,16);if(t.ptr+=16,n.getInt32(0,!0)<2)throw"unsupported Huffman version";var r=n.getInt32(4,!0),o=n.getInt32(8,!0),l=n.getInt32(12,!0);if(o>=l)return!1;var u=new Uint32Array(l-o);a.decodeBits(e,t,u);var c,h,d,f,p=[];for(c=o;c<l;c++)p[h=c-(c<r?0:r)]={first:u[c-o],second:null};var _=e.byteLength-t.ptr,m=Math.ceil(_/4),$=new ArrayBuffer(4*m);new Uint8Array($).set(new Uint8Array(e,t.ptr,_));var g,y=new Uint32Array($),v=0,x=0;for(g=y[0],c=o;c<l;c++)(f=p[h=c-(c<r?0:r)].first)>0&&(p[h].second=g<<v>>>32-f,32-v>=f?32===(v+=f)&&(v=0,g=y[++x]):(v+=f-32,g=y[++x],p[h].second|=g>>>32-v));var b=0,S=0,w=new s;for(c=0;c<p.length;c++)void 0!==p[c]&&(b=Math.max(b,p[c].first));S=b>=i?i:b,b>=30&&console.log("WARning, large NUM LUT BITS IS "+b);var C,T,P,E,A,L=[];for(c=o;c<l;c++)if((f=p[h=c-(c<r?0:r)].first)>0)if(C=[f,h],f<=S)for(T=p[h].second<<S-f,P=1<<S-f,d=0;d<P;d++)L[T|d]=C;else for(T=p[h].second,A=w,E=f-1;E>=0;E--)T>>>E&1?(A.right||(A.right=new s),A=A.right):(A.left||(A.left=new s),A=A.left),0===E&&!A.val&&(A.val=C[1]);return{decodeLut:L,numBitsLUTQick:S,numBitsLUT:b,tree:w,stuffedData:y,srcPtr:x,bitPos:v}},readHuffman:function(e,t,i){var n,r,o,a,s,l,u,c,h,d=t.headerInfo,f=d.numDims,p=t.headerInfo.height,_=t.headerInfo.width,m=_*p,$=this.readHuffmanTree(e,t),g=$.decodeLut,y=$.tree,v=$.stuffedData,x=$.srcPtr,b=$.bitPos,S=$.numBitsLUTQick,w=$.numBitsLUT,C=0===t.headerInfo.imageType?128:0,T=t.pixels.resultMask,P=0;b>0&&(x++,b=0);var E,A=v[x],L=1===t.encodeMode,M=new i(m*f),I=M;for(E=0;E<d.numDims;E++){if(f>1&&(I=new i(M.buffer,m*E,m),P=0),t.headerInfo.numValidPixel===_*p)for(c=0,l=0;l<p;l++)for(u=0;u<_;u++,c++){if(r=0,s=a=A<<b>>>32-S,32-b<S&&(s=a|=v[x+1]>>>64-b-S),g[s])r=g[s][1],b+=g[s][0];else for(s=a=A<<b>>>32-w,32-b<w&&(s=a|=v[x+1]>>>64-b-w),n=y,h=0;h<w;h++)if(!(n=a>>>w-h-1&1?n.right:n.left).left&&!n.right){r=n.val,b=b+h+1;break}b>=32&&(b-=32,A=v[++x]),o=r-C,L?(o+=u>0?P:l>0?I[c-_]:P,o&=255,I[c]=o,P=o):I[c]=o}else for(c=0,l=0;l<p;l++)for(u=0;u<_;u++,c++)if(T[c]){if(r=0,s=a=A<<b>>>32-S,32-b<S&&(s=a|=v[x+1]>>>64-b-S),g[s])r=g[s][1],b+=g[s][0];else for(s=a=A<<b>>>32-w,32-b<w&&(s=a|=v[x+1]>>>64-b-w),n=y,h=0;h<w;h++)if(!(n=a>>>w-h-1&1?n.right:n.left).left&&!n.right){r=n.val,b=b+h+1;break}b>=32&&(b-=32,A=v[++x]),o=r-C,L?(u>0&&T[c-1]?o+=P:l>0&&T[c-_]?o+=I[c-_]:o+=P,o&=255,I[c]=o,P=o):I[c]=o}t.ptr=t.ptr+4*(x+1)+(b>0?4:0)}t.pixels.resultPixels=M},decodeBits:function(a,s,l,u,c){var h=s.headerInfo,d=h.fileVersion,f=0,p=a.byteLength-s.ptr>=5?5:a.byteLength-s.ptr,_=new DataView(a,s.ptr,p),m=_.getUint8(0);f++;var $=m>>6,g=0===$?4:3-$,y=(32&m)>0,v=31&m,x=0;if(1===g)x=_.getUint8(f),f++;else if(2===g)x=_.getUint16(f,!0),f+=2;else{if(4!==g)throw"Invalid valid pixel count type";x=_.getUint32(f,!0),f+=4}var b,S,w,C,T,P,E,A,L,M=2*h.maxZError,I=h.numDims>1?h.maxValues[c]:h.zMax;if(y){for(s.counter.lut++,A=_.getUint8(f),f++,C=Math.ceil((A-1)*v/8),T=Math.ceil(C/4),S=new ArrayBuffer(4*T),w=new Uint8Array(S),s.ptr+=f,w.set(new Uint8Array(a,s.ptr,C)),E=new Uint32Array(S),s.ptr+=C,L=0;A-1>>>L;)L++;C=Math.ceil(x*L/8),T=Math.ceil(C/4),S=new ArrayBuffer(4*T),(w=new Uint8Array(S)).set(new Uint8Array(a,s.ptr,C)),b=new Uint32Array(S),s.ptr+=C,P=d>=3?n(E,v,A-1,u,M,I):t(E,v,A-1,u,M,I),d>=3?i(b,l,L,x,P):e(b,l,L,x,P)}else s.counter.bitstuffer++,L=v,s.ptr+=f,L>0&&(C=Math.ceil(x*L/8),T=Math.ceil(C/4),S=new ArrayBuffer(4*T),(w=new Uint8Array(S)).set(new Uint8Array(a,s.ptr,C)),b=new Uint32Array(S),s.ptr+=C,d>=3?null===u?o(b,l,L,x):i(b,l,L,x,!1,u,M,I):null===u?r(b,l,L,x):e(b,l,L,x,!1,u,M,I))},readTiles:function(e,t,i){var n=t.headerInfo,r=n.width,o=n.height,s=n.microBlockSize,l=n.imageType,u=a.getDataTypeSize(l),c=Math.ceil(r/s),h=Math.ceil(o/s);t.pixels.numBlocksY=h,t.pixels.numBlocksX=c,t.pixels.ptr=0;var d,f,p,_,m,$,g,y,v=0,x=0,b=0,S=0,w=0,C=0,T=0,P=0,E=0,A=0,L=0,M=0,I=0,O=0,D=0,R=new i(s*s),N=o%s||s,F=r%s||s,B=n.numDims,z=t.pixels.resultMask,G=t.pixels.resultPixels;for(b=0;b<h;b++)for(w=b!==h-1?s:N,S=0;S<c;S++)for(A=b*r*s+S*s,L=r-(C=S!==c-1?s:F),y=0;y<B;y++){if(B>1&&(G=new i(t.pixels.resultPixels.buffer,r*o*y*u,r*o)),T=e.byteLength-t.ptr,f={},D=0,D++,E=(P=(d=new DataView(e,t.ptr,Math.min(10,T))).getUint8(0))>>6&255,(P>>2&15)!==(S*s>>3&15))throw"integrity issue";if((m=3&P)>3)throw t.ptr+=D,"Invalid block encoding ("+m+")";if(2!==m)if(0===m){if(t.counter.uncompressed++,t.ptr+=D,M=(M=w*C*u)<(I=e.byteLength-t.ptr)?M:I,p=new ArrayBuffer(M%u==0?M:M+u-M%u),new Uint8Array(p).set(new Uint8Array(e,t.ptr,M)),_=new i(p),O=0,z)for(v=0;v<w;v++){for(x=0;x<C;x++)z[A]&&(G[A]=_[O++]),A++;A+=L}else for(v=0;v<w;v++){for(x=0;x<C;x++)G[A++]=_[O++];A+=L}t.ptr+=O*u}else if($=a.getDataTypeUsed(l,E),g=a.getOnePixel(f,D,$,d),D+=a.getDataTypeSize($),3===m)if(t.ptr+=D,t.counter.constantoffset++,z)for(v=0;v<w;v++){for(x=0;x<C;x++)z[A]&&(G[A]=g),A++;A+=L}else for(v=0;v<w;v++){for(x=0;x<C;x++)G[A++]=g;A+=L}else if(t.ptr+=D,a.decodeBits(e,t,R,g,y),D=0,z)for(v=0;v<w;v++){for(x=0;x<C;x++)z[A]&&(G[A]=R[D++]),A++;A+=L}else for(v=0;v<w;v++){for(x=0;x<C;x++)G[A++]=R[D++];A+=L}else t.counter.constant++,t.ptr+=D}},formatFileInfo:function(e){return{fileIdentifierString:e.headerInfo.fileIdentifierString,fileVersion:e.headerInfo.fileVersion,imageType:e.headerInfo.imageType,height:e.headerInfo.height,width:e.headerInfo.width,numValidPixel:e.headerInfo.numValidPixel,microBlockSize:e.headerInfo.microBlockSize,blobSize:e.headerInfo.blobSize,maxZError:e.headerInfo.maxZError,pixelType:a.getPixelType(e.headerInfo.imageType),eofOffset:e.eofOffset,mask:e.mask?{numBytes:e.mask.numBytes}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,maxValue:e.headerInfo.zMax,minValue:e.headerInfo.zMin,noDataValue:e.noDataValue}}},constructConstantSurface:function(e){var t=e.headerInfo.zMax,i=e.headerInfo.numDims,n=e.headerInfo.height*e.headerInfo.width,r=n*i,o=0,a=0,s=0,l=e.pixels.resultMask;if(l)if(i>1)for(o=0;o<i;o++)for(s=o*n,a=0;a<n;a++)l[a]&&(e.pixels.resultPixels[s+a]=t);else for(a=0;a<n;a++)l[a]&&(e.pixels.resultPixels[a]=t);else if(e.pixels.resultPixels.fill)e.pixels.resultPixels.fill(t);else for(a=0;a<r;a++)e.pixels.resultPixels[a]=t},getDataTypeArray:function(e){var t;switch(e){case 0:t=Int8Array;break;case 1:t=Uint8Array;break;case 2:t=Int16Array;break;case 3:t=Uint16Array;break;case 4:t=Int32Array;break;case 5:t=Uint32Array;break;case 6:default:t=Float32Array;break;case 7:t=Float64Array}return t},getPixelType:function(e){var t;switch(e){case 0:t="S8";break;case 1:t="U8";break;case 2:t="S16";break;case 3:t="U16";break;case 4:t="S32";break;case 5:t="U32";break;case 6:default:t="F32";break;case 7:t="F64"}return t},isValidPixelValue:function(e,t){if(null===t)return!1;var i;switch(e){case 0:i=t>=-128&&t<=127;break;case 1:i=t>=0&&t<=255;break;case 2:i=t>=-32768&&t<=32767;break;case 3:i=t>=0&&t<=65536;break;case 4:i=t>=-2147483648&&t<=2147483647;break;case 5:i=t>=0&&t<=4294967296;break;case 6:i=t>=-34027999387901484e22&&t<=34027999387901484e22;break;case 7:i=t>=5e-324&&t<=17976931348623157e292;break;default:i=!1}return i},getDataTypeSize:function(e){var t=0;switch(e){case 0:case 1:t=1;break;case 2:case 3:t=2;break;case 4:case 5:case 6:t=4;break;case 7:t=8;break;default:t=e}return t},getDataTypeUsed:function(e,t){var i=e;switch(e){case 2:case 4:i=e-t;break;case 3:case 5:i=e-2*t;break;case 6:i=0===t?e:1===t?2:1;break;case 7:i=0===t?e:e-2*t+1;break;default:i=e}return i},getOnePixel:function(e,t,i,n){var r=0;switch(i){case 0:r=n.getInt8(t);break;case 1:r=n.getUint8(t);break;case 2:r=n.getInt16(t,!0);break;case 3:r=n.getUint16(t,!0);break;case 4:r=n.getInt32(t,!0);break;case 5:r=n.getUInt32(t,!0);break;case 6:r=n.getFloat32(t,!0);break;case 7:r=n.getFloat64(t,!0);break;default:throw"the decoder does not understand this pixel type"}return r}},s=function(e,t,i){this.val=e,this.left=t,this.right=i},l={decode:function(e,t){var i=(t=t||{}).noDataValue,n=0,r={};if(r.ptr=t.inputOffset||0,r.pixels={},a.readHeaderInfo(e,r)){var o=r.headerInfo,s=o.fileVersion,l=a.getDataTypeArray(o.imageType);a.readMask(e,r),o.numValidPixel!==o.width*o.height&&!r.pixels.resultMask&&(r.pixels.resultMask=t.maskData);var u,c=o.width*o.height;if(r.pixels.resultPixels=new l(c*o.numDims),r.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},0!==o.numValidPixel)if(o.zMax===o.zMin)a.constructConstantSurface(r);else if(s>=4&&a.checkMinMaxRanges(e,r))a.constructConstantSurface(r);else{var h=new DataView(e,r.ptr,2),d=h.getUint8(0);if(r.ptr++,d)a.readDataOneSweep(e,r,l);else if(s>1&&o.imageType<=1&&Math.abs(o.maxZError-.5)<1e-5){var f=h.getUint8(1);if(r.ptr++,r.encodeMode=f,f>2||s<4&&f>1)throw"Invalid Huffman flag "+f;f?a.readHuffman(e,r,l):a.readTiles(e,r,l)}else a.readTiles(e,r,l)}r.eofOffset=r.ptr,t.inputOffset?(u=r.headerInfo.blobSize+t.inputOffset-r.ptr,Math.abs(u)>=1&&(r.eofOffset=t.inputOffset+r.headerInfo.blobSize)):(u=r.headerInfo.blobSize-r.ptr,Math.abs(u)>=1&&(r.eofOffset=r.headerInfo.blobSize));var p={width:o.width,height:o.height,pixelData:r.pixels.resultPixels,minValue:o.zMin,maxValue:o.zMax,validPixelCount:o.numValidPixel,dimCount:o.numDims,dimStats:{minValues:o.minValues,maxValues:o.maxValues},maskData:r.pixels.resultMask};if(r.pixels.resultMask&&a.isValidPixelValue(o.imageType,i)){var _=r.pixels.resultMask;for(n=0;n<c;n++)_[n]||(p.pixelData[n]=i);p.noDataValue=i}return r.noDataValue=i,t.returnFileInfo&&(p.fileInfo=a.formatFileInfo(r)),p}},getBandCount:function(e){for(var t=0,i=0,n={ptr:0,pixels:{}};i<e.byteLength-58;)a.readHeaderInfo(e,n),i+=n.headerInfo.blobSize,t++,n.ptr=i;return t}};return l}(),i=function(){var e=new ArrayBuffer(4),t=new Uint8Array(e);return new Uint32Array(e)[0]=1,1===t[0]}(),n={decode:function(n,r){if(!i)throw"Big endian system is not supported.";var o,a,s,l,u,c=(r=r||{}).inputOffset||0,h=new Uint8Array(n,c,10),d=String.fromCharCode.apply(null,h);if("CntZImage"===d.trim())o=e,a=1;else{if("Lerc2"!==d.substring(0,5))throw"Unexpected file identifier string: "+d;o=t,a=2}for(var f,p,_,m=0,$=n.byteLength-10,g=[],y={width:0,height:0,pixels:[],pixelType:r.pixelType,mask:null,statistics:[]};c<$;){var v=o.decode(n,{inputOffset:c,encodedMaskData:f,maskData:_,returnMask:0===m,returnEncodedMask:0===m,returnFileInfo:!0,pixelType:r.pixelType||null,noDataValue:r.noDataValue||null});c=v.fileInfo.eofOffset,0===m&&(f=v.encodedMaskData,_=v.maskData,y.width=v.width,y.height=v.height,y.dimCount=v.dimCount||1,y.pixelType=v.pixelType||v.fileInfo.pixelType,y.mask=v.maskData),a>1&&v.fileInfo.mask&&v.fileInfo.mask.numBytes>0&&g.push(v.maskData),m++,y.pixels.push(v.pixelData),y.statistics.push({minValue:v.minValue,maxValue:v.maxValue,noDataValue:v.noDataValue,dimStats:v.dimStats})}if(a>1&&g.length>1){for(u=y.width*y.height,y.bandMasks=g,(_=new Uint8Array(u)).set(g[0]),s=1;s<g.length;s++)for(p=g[s],l=0;l<u;l++)_[l]=_[l]&p[l];y.maskData=_}return y}};N$1.Lerc=n}();var LercDecode=N$1.Lerc,V$3=function(){var e=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),t=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if("object"!=typeof WebAssembly)return{supported:!1};var i="B9h79tEBBBE8fV9gBB9gVUUUUUEU9gIUUUB9gEUEU9gIUUUEUIKQBEEEDDDILLLVE9wEEEVIEBEOWEUEC+Q/IEKR/LEdO9tw9t9vv95DBh9f9f939h79t9f9j9h229f9jT9vv7BB8a9tw79o9v9wT9f9kw9j9v9kw9WwvTw949C919m9mwvBEy9tw79o9v9wT9f9kw9j9v9kw69u9kw949C919m9mwvBDe9tw79o9v9wT9f9kw9j9v9kw69u9kw949Twg91w9u9jwBIl9tw79o9v9wT9f9kw9j9v9kws9p2Twv9P9jTBLk9tw79o9v9wT9f9kw9j9v9kws9p2Twv9R919hTBVl9tw79o9v9wT9f9kw9j9v9kws9p2Twvt949wBOL79iv9rBRQ+x8yQDBK/qMEZU8jJJJJBCJ/EB9rGV8kJJJJBC9+HODNADCEFAL0MBCUHOAIrBBC+gE9HMBAVAIALFGRAD9rADZ1JJJBHWCJ/ABAD9uC/wfBgGOCJDAOCJD6eHdAICEFHLCBHQDNINAQAE9PMEAdAEAQ9rAQAdFAE6eHKDNDNADtMBAKCSFGOC9wgHXAOCL4CIFCD4HMAWCJDFHpCBHSALHZINDNARAZ9rAM9PMBCBHLXIKAZAMFHLDNAXtMBCBHhCBHIINDNARAL9rCk9PMBCBHLXVKAWCJ/CBFAIFHODNDNDNDNDNAZAICO4FrBBAhCOg4CIgpLBEDIBKAO9CB83IBAOCWF9CB83IBXIKAOALrBLALrBBGoCO4GaAaCIsGae86BBAOCEFALCLFAaFGarBBAoCL4CIgGcAcCIsGce86BBAOCDFAaAcFGarBBAoCD4CIgGcAcCIsGce86BBAOCIFAaAcFGarBBAoCIgGoAoCIsGoe86BBAOCLFAaAoFGarBBALrBEGoCO4GcAcCIsGce86BBAOCVFAaAcFGarBBAoCL4CIgGcAcCIsGce86BBAOCOFAaAcFGarBBAoCD4CIgGcAcCIsGce86BBAOCRFAaAcFGarBBAoCIgGoAoCIsGoe86BBAOCWFAaAoFGarBBALrBDGoCO4GcAcCIsGce86BBAOCdFAaAcFGarBBAoCL4CIgGcAcCIsGce86BBAOCQFAaAcFGarBBAoCD4CIgGcAcCIsGce86BBAOCKFAaAcFGarBBAoCIgGoAoCIsGoe86BBAOCXFAaAoFGorBBALrBIGLCO4GaAaCIsGae86BBAOCMFAoAaFGorBBALCL4CIgGaAaCIsGae86BBAOCpFAoAaFGorBBALCD4CIgGaAaCIsGae86BBAOCSFAoAaFGOrBBALCIgGLALCIsGLe86BBAOALFHLXDKAOALrBWALrBBGoCL4GaAaCSsGae86BBAOCEFALCWFAaFGarBBAoCSgGoAoCSsGoe86BBAOCDFAaAoFGorBBALrBEGaCL4GcAcCSsGce86BBAOCIFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCLFAoAaFGorBBALrBDGaCL4GcAcCSsGce86BBAOCVFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCOFAoAaFGorBBALrBIGaCL4GcAcCSsGce86BBAOCRFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCWFAoAaFGorBBALrBLGaCL4GcAcCSsGce86BBAOCdFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCQFAoAaFGorBBALrBVGaCL4GcAcCSsGce86BBAOCKFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCXFAoAaFGorBBALrBOGaCL4GcAcCSsGce86BBAOCMFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCpFAoAaFGorBBALrBRGLCL4GaAaCSsGae86BBAOCSFAoAaFGOrBBALCSgGLALCSsGLe86BBAOALFHLXEKAOAL8pBB83BBAOCWFALCWF8pBB83BBALCZFHLKAhCDFHhAICZFGIAX6MBKKDNALMBCBHLXIKDNAKtMBAWASFrBBHhCBHOApHIINAIAWCJ/CBFAOFrBBGZCE4CBAZCEg9r7AhFGh86BBAIADFHIAOCEFGOAK9HMBKKApCEFHpALHZASCEFGSAD9HMBKKABAQAD2FAWCJDFAKAD2Z1JJJB8aAWAWCJDFAKCUFAD2FADZ1JJJB8aKAKCBALeAQFHQALMBKC9+HOXEKCBC99ARAL9rADCAADCA0eseHOKAVCJ/EBF8kJJJJBAOK+OoEZU8jJJJJBC/AE9rGV8kJJJJBC9+HODNAECI9uGRChFAL0MBCUHOAIrBBGWC/wEgC/gE9HMBAWCSgGdCE0MBAVC/ABFCfECJEZ+JJJJB8aAVCuF9CU83IBAVC8wF9CU83IBAVCYF9CU83IBAVCAF9CU83IBAVCkF9CU83IBAVCZF9CU83IBAV9CU83IWAV9CU83IBAIALFC9wFHQAICEFGWARFHKDNAEtMBCMCSAdCEseHXABHICBHdCBHMCBHpCBHLCBHOINDNAKAQ9NMBC9+HOXIKDNDNAWrBBGRC/vE0MBAVC/ABFARCL4CU7AOFCSgCITFGSYDLHZASYDBHhDNARCSgGSAX9PMBAVARCU7ALFCSgCDTFYDBAdASeHRAStHSDNDNADCD9HMBABAh87EBABCLFAR87EBABCDFAZ87EBXEKAIAhbDBAICWFARbDBAICLFAZbDBKAdASFHdAVC/ABFAOCITFGoARbDBAoAZbDLAVALCDTFARbDBAVC/ABFAOCEFCSgGOCITFGZAhbDBAZARbDLALASFHLAOCEFHOXDKDNDNASCSsMBAMASFASC987FCEFHMXEKAK8sBBGSCfEgHRDNDNASCU9MMBAKCEFHKXEKAK8sBEGSCfBgCRTARCfBgvHRDNASCU9MMBAKCDFHKXEKAK8sBDGSCfBgCpTARvHRDNASCU9MMBAKCIFHKXEKAK8sBIGSCfBgCxTARvHRDNASCU9MMBAKCLFHKXEKAKrBLC3TARvHRAKCVFHKKARCE4CBARCEg9r7AMFHMKDNDNADCD9HMBABAh87EBABCLFAM87EBABCDFAZ87EBXEKAIAhbDBAICWFAMbDBAICLFAZbDBKAVC/ABFAOCITFGRAMbDBARAZbDLAVALCDTFAMbDBAVC/ABFAOCEFCSgGOCITFGRAhbDBARAMbDLALCEFHLAOCEFHOXEKDNARCPE0MBAVALAQARCSgFrBBGSCL4GZ9rCSgCDTFYDBAdCEFGhAZeHRAVALAS9rCSgCDTFYDBAhAZtGoFGhASCSgGZeHSAZtHZDNDNADCD9HMBABAd87EBABCLFAS87EBABCDFAR87EBXEKAIAdbDBAICWFASbDBAICLFARbDBKAVALCDTFAdbDBAVC/ABFAOCITFGaARbDBAaAdbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALAoFCSgGLCDTFASbDBAVC/ABFAOCDFCSgGOCITFGRAdbDBARASbDLAOCEFHOALAZFHLAhAZFHdXEKAdCBAKrBBGaeGZARC/+EsGcFHRAaCSgHhDNDNAaCL4GoMBARCEFHSXEKARHSAVALAo9rCSgCDTFYDBHRKDNDNAhMBASCEFHdXEKASHdAVALAa9rCSgCDTFYDBHSKDNDNActMBAKCEFHaXEKAK8sBEGaCfEgHZDNDNAaCU9MMBAKCDFHaXEKAK8sBDGaCfBgCRTAZCfBgvHZDNAaCU9MMBAKCIFHaXEKAK8sBIGaCfBgCpTAZvHZDNAaCU9MMBAKCLFHaXEKAK8sBLGaCfBgCxTAZvHZDNAaCU9MMBAKCVFHaXEKAKCOFHaAKrBVC3TAZvHZKAZCE4CBAZCEg9r7AMFGMHZKDNDNAoCSsMBAaHcXEKAa8sBBGKCfEgHRDNDNAKCU9MMBAaCEFHcXEKAa8sBEGKCfBgCRTARCfBgvHRDNAKCU9MMBAaCDFHcXEKAa8sBDGKCfBgCpTARvHRDNAKCU9MMBAaCIFHcXEKAa8sBIGKCfBgCxTARvHRDNAKCU9MMBAaCLFHcXEKAaCVFHcAarBLC3TARvHRKARCE4CBARCEg9r7AMFGMHRKDNDNAhCSsMBAcHKXEKAc8sBBGKCfEgHSDNDNAKCU9MMBAcCEFHKXEKAc8sBEGKCfBgCRTASCfBgvHSDNAKCU9MMBAcCDFHKXEKAc8sBDGKCfBgCpTASvHSDNAKCU9MMBAcCIFHKXEKAc8sBIGKCfBgCxTASvHSDNAKCU9MMBAcCLFHKXEKAcCVFHKAcrBLC3TASvHSKASCE4CBASCEg9r7AMFGMHSKDNDNADCD9HMBABAZ87EBABCLFAS87EBABCDFAR87EBXEKAIAZbDBAICWFASbDBAICLFARbDBKAVC/ABFAOCITFGaARbDBAaAZbDLAVALCDTFAZbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCDFCSgCITFGRAZbDBARASbDLAVALAotAoCSsvFGLCSgCDTFASbDBALAhtAhCSsvFHLAOCIFHOKAWCEFHWABCOFHBAICXFHIAOCSgHOALCSgHLApCIFGpAE6MBKKCBC99AKAQseHOKAVC/AEF8kJJJJBAOK/tLEDU8jJJJJBCZ9rHVC9+HODNAECVFAL0MBCUHOAIrBBC/+EgC/QE9HMBAV9CB83IWAICEFHOAIALFC98FHIDNAEtMBDNADCDsMBINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKAVCWFALCEgCDTvGDALCD4CBALCE4CEg9r7ADYDBFGLbDBABALbDBABCLFHBAECUFGEMBXDKKINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKABALCD4CBALCE4CEg9r7AVCWFALCEgCDTvGLYDBFGD87EBALADbDBABCDFHBAECUFGEMBKKCBC99AOAIseHOKAOK+lVOEUE99DUD99EUD99DNDNADCL9HMBAEtMEINDNDNjBBBzjBBB+/ABCDFGD8sBB+yAB8sBBGI+yGL+L+TABCEFGV8sBBGO+yGR+L+TGWjBBBB9gGdeAWjBB/+9CAWAWnjBBBBAWAdeGQAQ+MGKAICU9KeALmGLALnAQAKAOCU9KeARmGQAQnmm+R+VGRnmGW+LjBBB9P9dtMBAW+oHIXEKCJJJJ94HIKADAI86BBDNDNjBBBzjBBB+/AQjBBBB9geAQARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKAVAD86BBDNDNjBBBzjBBB+/ALjBBBB9geALARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKABAD86BBABCLFHBAECUFGEMBXDKKAEtMBINDNDNjBBBzjBBB+/ABCLFGD8uEB+yAB8uEBGI+yGL+L+TABCDFGV8uEBGO+yGR+L+TGWjBBBB9gGdeAWjB/+fsAWAWnjBBBBAWAdeGQAQ+MGKAICU9KeALmGLALnAQAKAOCU9KeARmGQAQnmm+R+VGRnmGW+LjBBB9P9dtMBAW+oHIXEKCJJJJ94HIKADAI87EBDNDNjBBBzjBBB+/AQjBBBB9geAQARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKAVAD87EBDNDNjBBBzjBBB+/ALjBBBB9geALARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKABAD87EBABCWFHBAECUFGEMBKKK/SILIUI99IUE99DNAEtMBCBHIABHLINDNDNj/zL81zALCOF8uEBGVCIv+y+VGOAL8uEB+ynGRjB/+fsnjBBBzjBBB+/ARjBBBB9gemGW+LjBBB9P9dtMBAW+oHdXEKCJJJJ94HdKALCLF8uEBHQALCDF8uEBHKABAVCEFCIgAIvCETFAd87EBDNDNAOAK+ynGWjB/+fsnjBBBzjBBB+/AWjBBBB9gemGX+LjBBB9P9dtMBAX+oHKXEKCJJJJ94HKKABAVCDFCIgAIvCETFAK87EBDNDNAOAQ+ynGOjB/+fsnjBBBzjBBB+/AOjBBBB9gemGX+LjBBB9P9dtMBAX+oHQXEKCJJJJ94HQKABAVCUFCIgAIvCETFAQ87EBDNDNjBBJzARARn+TAWAWn+TAOAOn+TGRjBBBBARjBBBB9ge+RjB/+fsnjBBBzmGR+LjBBB9P9dtMBAR+oHQXEKCJJJJ94HQKABAVCIgAIvCETFAQ87EBALCWFHLAICLFHIAECUFGEMBKKK6BDNADCD4AE2GEtMBINABABYDBGDCWTCW91+yADCk91ClTCJJJ/8IF++nuDBABCLFHBAECUFGEMBKKK9TEIUCBCBYDJ1JJBGEABCIFC98gFGBbDJ1JJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIK/lEEEUDNDNAEABvCIgtMBABHIXEKDNDNADCZ9PMBABHIXEKABHIINAIAEYDBbDBAICLFAECLFYDBbDBAICWFAECWFYDBbDBAICXFAECXFYDBbDBAICZFHIAECZFHEADC9wFGDCS0MBKKADCL6MBINAIAEYDBbDBAECLFHEAICLFHIADC98FGDCI0MBKKDNADtMBINAIAErBB86BBAICEFHIAECEFHEADCUFGDMBKKABK/AEEDUDNDNABCIgtMBABHIXEKAECfEgC+B+C+EW2HLDNDNADCZ9PMBABHIXEKABHIINAIALbDBAICXFALbDBAICWFALbDBAICLFALbDBAICZFHIADC9wFGDCS0MBKKADCL6MBINAIALbDBAICLFHIADC98FGDCI0MBKKDNADtMBINAIAE86BBAICEFHIADCUFGDMBKKABKKKEBCJWKLZ9kBB";WebAssembly.validate(e)&&(i="B9h79tEBBBE5V9gBB9gVUUUUUEU9gIUUUB9gDUUB9gEUEUIMXBBEBEEDIDIDLLVE9wEEEVIEBEOWEUEC+Q/aEKR/LEdO9tw9t9vv95DBh9f9f939h79t9f9j9h229f9jT9vv7BB8a9tw79o9v9wT9f9kw9j9v9kw9WwvTw949C919m9mwvBDy9tw79o9v9wT9f9kw9j9v9kw69u9kw949C919m9mwvBLe9tw79o9v9wT9f9kw9j9v9kw69u9kw949Twg91w9u9jwBVl9tw79o9v9wT9f9kw9j9v9kws9p2Twv9P9jTBOk9tw79o9v9wT9f9kw9j9v9kws9p2Twv9R919hTBWl9tw79o9v9wT9f9kw9j9v9kws9p2Twvt949wBQL79iv9rBKQ/j6XLBZIK9+EVU8jJJJJBCZ9rHBCBHEINCBHDCBHIINABCWFADFAICJUAEAD4CEgGLe86BBAIALFHIADCEFGDCW9HMBKAEC+Q+YJJBFAI86BBAECITC+Q1JJBFAB8pIW83IBAECEFGECJD9HMBKK1HLSUD97EUO978jJJJJBCJ/KB9rGV8kJJJJBC9+HODNADCEFAL0MBCUHOAIrBBC+gE9HMBAVAIALFGRAD9rAD/8QBBCJ/ABAD9uC/wfBgGOCJDAOCJD6eHWAICEFHOCBHdDNINAdAE9PMEAWAEAd9rAdAWFAE6eHQDNDNADtMBAQCSFGLC9wgGKCI2HXAKCETHMALCL4CIFCD4HpCBHSINAOHZCBHhDNINDNARAZ9rAp9PMBCBHOXVKAVCJ/CBFAhAK2FHoAZApFHOCBHIDNAKC/AB6MBARAO9rC/gB6MBCBHLINAoALFHIDNDNDNDNDNAZALCO4FrBBGaCIgpLBEDIBKAICBPhPKLBXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAIAOPBBBPKLBAOCZFHOKDNDNDNDNDNAaCD4CIgpLBEDIBKAICBPhPKLZXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLZAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLZAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAIAOPBBBPKLZAOCZFHOKDNDNDNDNDNAaCL4CIgpLBEDIBKAICBPhPKLAXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLAAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLAAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAIAOPBBBPKLAAOCZFHOKDNDNDNDNDNAaCO4pLBEDIBKAICBPhPKL8wXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBAaC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKL8wAOCLFAlPqBFAaC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBAaC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKL8wAOCWFAlPqBFAaC+Q+YJJBFrBBFHOXEKAIAOPBBBPKL8wAOCZFHOKALC/ABFHIALCJEFAK0MEAIHLARAO9rC/fB0MBKKDNAIAK9PMBAICI4HLINDNARAO9rCk9PMBCBHOXRKAoAIFHaDNDNDNDNDNAZAICO4FrBBALCOg4CIgpLBEDIBKAaCBPhPKLBXIKAaAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAaAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAaAOPBBBPKLBAOCZFHOKALCDFHLAICZFGIAK6MBKKDNAOtMBAOHZAhCEFGhCLsMDXEKKCBHOXIKDNAKtMBAVCJDFASFHIAVASFPBDBHlCBHaINAIAVCJ/CBFAaFGLPBLBGxCEP9tAxCEPSGcP9OP9hP9RGxALAKFPBLBGkCEP9tAkAcP9OP9hP9RGkPMBZEhDoIaLcVxOqRlGyALAMFPBLBG8aCEP9tA8aAcP9OP9hP9RG8aALAXFPBLBGeCEP9tAeAcP9OP9hP9RGePMBZEhDoIaLcVxOqRlG3PMBEZhDIoaLVcxORqlGcAcPMBEDIBEDIBEDIBEDIAlP9uGlPeBbDBAIADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFGLAlAyA3PMWdkyQK8aeXM35pS8e8fGcAcPMBEDIBEDIBEDIBEDIP9uGlPeBbDBALADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFGLAlAxAkPMWkdyQ8aKeX3M5p8eS8fGxA8aAePMWkdyQ8aKeX3M5p8eS8fGkPMBEZhDIoaLVcxORqlGcAcPMBEDIBEDIBEDIBEDIP9uGlPeBbDBALADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFGLAlAxAkPMWdkyQK8aeXM35pS8e8fGcAcPMBEDIBEDIBEDIBEDIP9uGlPeBbDBALADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFHIAaCZFGaAK6MBKKASCLFGSAD6MBKKABAdAD2FAVCJDFAQAD2/8QBBAVAVCJDFAQCUFAD2FAD/8QBBKAQCBAOeAdFHdAOMBKC9+HOXEKCBC99ARAO9rADCAADCA0eseHOKAVCJ/KBF8kJJJJBAOKWBZ+BJJJBK+KoEZU8jJJJJBC/AE9rGV8kJJJJBC9+HODNAECI9uGRChFAL0MBCUHOAIrBBGWC/wEgC/gE9HMBAWCSgGdCE0MBAVC/ABFCfECJE/8KBAVCuF9CU83IBAVC8wF9CU83IBAVCYF9CU83IBAVCAF9CU83IBAVCkF9CU83IBAVCZF9CU83IBAV9CU83IWAV9CU83IBAIALFC9wFHQAICEFGWARFHKDNAEtMBCMCSAdCEseHXABHICBHdCBHMCBHpCBHLCBHOINDNAKAQ9NMBC9+HOXIKDNDNAWrBBGRC/vE0MBAVC/ABFARCL4CU7AOFCSgCITFGSYDLHZASYDBHhDNARCSgGSAX9PMBAVARCU7ALFCSgCDTFYDBAdASeHRAStHSDNDNADCD9HMBABAh87EBABCLFAR87EBABCDFAZ87EBXEKAIAhbDBAICWFARbDBAICLFAZbDBKAdASFHdAVC/ABFAOCITFGoARbDBAoAZbDLAVALCDTFARbDBAVC/ABFAOCEFCSgGOCITFGZAhbDBAZARbDLALASFHLAOCEFHOXDKDNDNASCSsMBAMASFASC987FCEFHMXEKAK8sBBGSCfEgHRDNDNASCU9MMBAKCEFHKXEKAK8sBEGSCfBgCRTARCfBgvHRDNASCU9MMBAKCDFHKXEKAK8sBDGSCfBgCpTARvHRDNASCU9MMBAKCIFHKXEKAK8sBIGSCfBgCxTARvHRDNASCU9MMBAKCLFHKXEKAKrBLC3TARvHRAKCVFHKKARCE4CBARCEg9r7AMFHMKDNDNADCD9HMBABAh87EBABCLFAM87EBABCDFAZ87EBXEKAIAhbDBAICWFAMbDBAICLFAZbDBKAVC/ABFAOCITFGRAMbDBARAZbDLAVALCDTFAMbDBAVC/ABFAOCEFCSgGOCITFGRAhbDBARAMbDLALCEFHLAOCEFHOXEKDNARCPE0MBAVALAQARCSgFrBBGSCL4GZ9rCSgCDTFYDBAdCEFGhAZeHRAVALAS9rCSgCDTFYDBAhAZtGoFGhASCSgGZeHSAZtHZDNDNADCD9HMBABAd87EBABCLFAS87EBABCDFAR87EBXEKAIAdbDBAICWFASbDBAICLFARbDBKAVALCDTFAdbDBAVC/ABFAOCITFGaARbDBAaAdbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALAoFCSgGLCDTFASbDBAVC/ABFAOCDFCSgGOCITFGRAdbDBARASbDLAOCEFHOALAZFHLAhAZFHdXEKAdCBAKrBBGaeGZARC/+EsGcFHRAaCSgHhDNDNAaCL4GoMBARCEFHSXEKARHSAVALAo9rCSgCDTFYDBHRKDNDNAhMBASCEFHdXEKASHdAVALAa9rCSgCDTFYDBHSKDNDNActMBAKCEFHaXEKAK8sBEGaCfEgHZDNDNAaCU9MMBAKCDFHaXEKAK8sBDGaCfBgCRTAZCfBgvHZDNAaCU9MMBAKCIFHaXEKAK8sBIGaCfBgCpTAZvHZDNAaCU9MMBAKCLFHaXEKAK8sBLGaCfBgCxTAZvHZDNAaCU9MMBAKCVFHaXEKAKCOFHaAKrBVC3TAZvHZKAZCE4CBAZCEg9r7AMFGMHZKDNDNAoCSsMBAaHcXEKAa8sBBGKCfEgHRDNDNAKCU9MMBAaCEFHcXEKAa8sBEGKCfBgCRTARCfBgvHRDNAKCU9MMBAaCDFHcXEKAa8sBDGKCfBgCpTARvHRDNAKCU9MMBAaCIFHcXEKAa8sBIGKCfBgCxTARvHRDNAKCU9MMBAaCLFHcXEKAaCVFHcAarBLC3TARvHRKARCE4CBARCEg9r7AMFGMHRKDNDNAhCSsMBAcHKXEKAc8sBBGKCfEgHSDNDNAKCU9MMBAcCEFHKXEKAc8sBEGKCfBgCRTASCfBgvHSDNAKCU9MMBAcCDFHKXEKAc8sBDGKCfBgCpTASvHSDNAKCU9MMBAcCIFHKXEKAc8sBIGKCfBgCxTASvHSDNAKCU9MMBAcCLFHKXEKAcCVFHKAcrBLC3TASvHSKASCE4CBASCEg9r7AMFGMHSKDNDNADCD9HMBABAZ87EBABCLFAS87EBABCDFAR87EBXEKAIAZbDBAICWFASbDBAICLFARbDBKAVC/ABFAOCITFGaARbDBAaAZbDLAVALCDTFAZbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCDFCSgCITFGRAZbDBARASbDLAVALAotAoCSsvFGLCSgCDTFASbDBALAhtAhCSsvFHLAOCIFHOKAWCEFHWABCOFHBAICXFHIAOCSgHOALCSgHLApCIFGpAE6MBKKCBC99AKAQseHOKAVC/AEF8kJJJJBAOK/tLEDU8jJJJJBCZ9rHVC9+HODNAECVFAL0MBCUHOAIrBBC/+EgC/QE9HMBAV9CB83IWAICEFHOAIALFC98FHIDNAEtMBDNADCDsMBINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKAVCWFALCEgCDTvGDALCD4CBALCE4CEg9r7ADYDBFGLbDBABALbDBABCLFHBAECUFGEMBXDKKINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKABALCD4CBALCE4CEg9r7AVCWFALCEgCDTvGLYDBFGD87EBALADbDBABCDFHBAECUFGEMBKKCBC99AOAIseHOKAOK/xVDIUO978jJJJJBCA9rGI8kJJJJBDNDNADCL9HMBDNAEC98gGLtMBABHDCBHVINADADPBBBGOCkP+rECkP+sEP/6EGRAOCWP+rECkP+sEP/6EARP/gEAOCZP+rECkP+sEP/6EGWP/gEP/kEP/lEGdCBPhP+2EGQARCJJJJ94PhGKP9OP9RP/kEGRjBB/+9CPaARARP/mEAdAdP/mEAWAQAWAKP9OP9RP/kEGRARP/mEP/kEP/kEP/jEP/nEGWP/mEjBBN0PaGQP/kECfEPhP9OAOCJJJ94PhP9OP9QARAWP/mEAQP/kECWP+rECJ/+IPhP9OP9QAdAWP/mEAQP/kECZP+rECJJ/8RPhP9OP9QPKBBADCZFHDAVCLFGVAL6MBKKALAE9PMEAIAECIgGVCDTGDvCBCZAD9r/8KBAIABALCDTFGLAD/8QBBDNAVtMBAIAIPBLBGOCkP+rECkP+sEP/6EGRAOCWP+rECkP+sEP/6EARP/gEAOCZP+rECkP+sEP/6EGWP/gEP/kEP/lEGdCBPhP+2EGQARCJJJJ94PhGKP9OP9RP/kEGRjBB/+9CPaARARP/mEAdAdP/mEAWAQAWAKP9OP9RP/kEGRARP/mEP/kEP/kEP/jEP/nEGWP/mEjBBN0PaGQP/kECfEPhP9OAOCJJJ94PhP9OP9QARAWP/mEAQP/kECWP+rECJ/+IPhP9OP9QAdAWP/mEAQP/kECZP+rECJJ/8RPhP9OP9QPKLBKALAIAD/8QBBXEKABAEC98gGDZ+HJJJBADAE9PMBAIAECIgGLCITGVFCBCAAV9r/8KBAIABADCITFGDAV/8QBBAIALZ+HJJJBADAIAV/8QBBKAICAF8kJJJJBK+yIDDUR97DNAEtMBCBHDINABCZFGIAIPBBBGLCBPhGVCJJ98P3ECJJ98P3IGOP9OABPBBBGRALPMLVORXMpScxql358e8fCffEPhP9OP/6EARALPMBEDIWdQKZhoaky8aeGLCZP+sEP/6EGWP/gEALCZP+rECZP+sEP/6EGdP/gEP/kEP/lEGLjB/+fsPaAdALAVP+2EGVAdCJJJJ94PhGQP9OP9RP/kEGdAdP/mEALALP/mEAWAVAWAQP9OP9RP/kEGLALP/mEP/kEP/kEP/jEP/nEGWP/mEjBBN0PaGVP/kECZP+rEAdAWP/mEAVP/kECffIPhP9OP9QGdALAWP/mEAVP/kECUPSCBPlDCBPlICBPlOCBPlRCBPlQCBPlKCBPlpCBPlSP9OGLPMWdkyQK8aeXM35pS8e8fP9QPKBBABARAOP9OAdALPMBEZhDIoaLVcxORqlP9QPKBBABCAFHBADCLFGDAE6MBKKK94EIU8jJJJJBCA9rGI8kJJJJBABAEC98gGLZ+JJJJBDNALAE9PMBAIAECIgGVCITGEFCBCAAE9r/8KBAIABALCITFGBAE/8QBBAIAVZ+JJJJBABAIAE/8QBBKAICAF8kJJJJBK/hILDUE97EUV978jJJJJBCZ9rHDDNAEtMBCBHIINADABPBBBGLABCZFGVPBBBGOPMLVORXMpScxql358e8fGRCZP+sEGWCLP+rEPKLBABjBBJzPaj/zL81zPaAWCIPhP9QP/6EP/nEGWALAOPMBEDIWdQKZhoaky8aeGLCZP+rECZP+sEP/6EP/mEGOAOP/mEAWALCZP+sEP/6EP/mEGdAdP/mEAWARCZP+rECZP+sEP/6EP/mEGRARP/mEP/kEP/kEP/lECBPhP+4EP/jEjB/+fsPaGWP/mEjBBN0PaGLP/kECffIPhGQP9OAdAWP/mEALP/kECZP+rEP9QGdARAWP/mEALP/kECZP+rEAOAWP/mEALP/kEAQP9OP9QGWPMBEZhDIoaLVcxORqlGLP5BADPBLBPeB+t+J83IBABCWFALP5EADPBLBPeE+t+J83IBAVAdAWPMWdkyQK8aeXM35pS8e8fGWP5BADPBLBPeD+t+J83IBABCkFAWP5EADPBLBPeI+t+J83IBABCAFHBAICLFGIAE6MBKKK/3EDIUE978jJJJJBC/AB9rHIDNADCD4AE2GLC98gGVtMBCBHDABHEINAEAEPBBBGOCWP+rECWP+sEP/6EAOCkP+sEClP+rECJJJ/8IPhP+uEP/mEPKBBAECZFHEADCLFGDAV6MBKKDNAVAL9PMBAIALCIgGDCDTGEvCBC/ABAE9r/8KBAIABAVCDTFGVAE/8QBBDNADtMBAIAIPBLBGOCWP+rECWP+sEP/6EAOCkP+sEClP+rECJJJ/8IPhP+uEP/mEPKLBKAVAIAE/8QBBKK9TEIUCBCBYDJ1JJBGEABCIFC98gFGBbDJ1JJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIKKKEBCJWKLZ9tBB");var n,r=WebAssembly.instantiate(function(e){for(var i=new Uint8Array(e.length),n=0;n<e.length;++n){var r=e.charCodeAt(n);i[n]=r>96?r-71:r>64?r-65:r>47?r+4:r>46?63:62}var o=0;for(n=0;n<e.length;++n)i[o++]=i[n]<60?t[i[n]]:64*(i[n]-60)+i[++n];return i.buffer.slice(0,o)}(i),{}).then((function(e){(n=e.instance).exports.__wasm_call_ctors()}));function o(e,t,i,r,o,a){var s=n.exports.sbrk,l=i+3&-4,u=s(l*r),c=s(o.length),h=new Uint8Array(n.exports.memory.buffer);h.set(o,c);var d=e(u,i,r,c,o.length);if(0==d&&a&&a(u,l,r),t.set(h.subarray(u,u+i*r)),s(u-s(0)),0!=d)throw new Error("Malformed buffer data: "+d)}var a={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},s={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return{ready:r,supported:!0,decodeVertexBuffer:function(e,t,i,r,s){o(n.exports.meshopt_decodeVertexBuffer,e,t,i,r,n.exports[a[s]])},decodeIndexBuffer:function(e,t,i,r){o(n.exports.meshopt_decodeIndexBuffer,e,t,i,r)},decodeIndexSequence:function(e,t,i,r){o(n.exports.meshopt_decodeIndexSequence,e,t,i,r)},decodeGltfBuffer:function(e,t,i,r,l,u){o(n.exports[s[l]],e,t,i,r,n.exports[a[u]])}}}(),w$5={};/*! NoSleep.js v0.9.0 - git.io/vfn01 - Rich Tibbett - MIT license */!function(e,t){e.NoSleep=function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=0)}([function(e,t,i){var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=i(1),a=o.webm,s=o.mp4,l=typeof navigator<"u"&&parseFloat((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream,u=function(){function e(){var t=this;r(this,e),l?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("muted",""),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm",a),this._addSourceToVideo(this.noSleepVideo,"mp4",s),this.noSleepVideo.addEventListener("loadedmetadata",(function(){t.noSleepVideo.duration<=1?t.noSleepVideo.setAttribute("loop",""):t.noSleepVideo.addEventListener("timeupdate",(function(){t.noSleepVideo.currentTime>.5&&(t.noSleepVideo.currentTime=Math.random())}))})))}return n(e,[{key:"_addSourceToVideo",value:function(e,t,i){var n=document.createElement("source");n.src=i,n.type="video/"+t,e.appendChild(n)}},{key:"enable",value:function(){l?(this.disable(),console.warn("\n NoSleep enabled for older iOS devices. This can interrupt\n active or long-running network requests from completing successfully.\n See https://github.com/richtr/NoSleep.js/issues/15 for more details.\n "),this.noSleepTimer=window.setInterval((function(){document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))}),15e3)):this.noSleepVideo.play()}},{key:"disable",value:function(){l?this.noSleepTimer&&(console.warn("\n NoSleep now disabled for older iOS devices.\n "),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause()}}]),e}();e.exports=u},function(e,t,i){e.exports={webm:"data:video/webm;base64,GkXfo0AgQoaBAUL3gQFC8oEEQvOBCEKCQAR3ZWJtQoeBAkKFgQIYU4BnQI0VSalmQCgq17FAAw9CQE2AQAZ3aGFtbXlXQUAGd2hhbW15RIlACECPQAAAAAAAFlSua0AxrkAu14EBY8WBAZyBACK1nEADdW5khkAFVl9WUDglhohAA1ZQOIOBAeBABrCBCLqBCB9DtnVAIueBAKNAHIEAAIAwAQCdASoIAAgAAUAmJaQAA3AA/vz0AAA=",mp4:"data:video/mp4;base64,AAAAIGZ0eXBtcDQyAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACKBtZGF0AAAC8wYF///v3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE0MiByMjQ3OSBkZDc5YTYxIC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxNCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTEgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDExMSBtZT1oZXggc3VibWU9MiBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0wIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MCA4eDhkY3Q9MCBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0wIHRocmVhZHM9NiBsb29rYWhlYWRfdGhyZWFkcz0xIHNsaWNlZF90aHJlYWRzPTAgbnI9MCBkZWNpbWF0ZT0xIGludGVybGFjZWQ9MCBibHVyYXlfY29tcGF0PTAgY29uc3RyYWluZWRfaW50cmE9MCBiZnJhbWVzPTMgYl9weXJhbWlkPTIgYl9hZGFwdD0xIGJfYmlhcz0wIGRpcmVjdD0xIHdlaWdodGI9MSBvcGVuX2dvcD0wIHdlaWdodHA9MSBrZXlpbnQ9MzAwIGtleWludF9taW49MzAgc2NlbmVjdXQ9NDAgaW50cmFfcmVmcmVzaD0wIHJjX2xvb2thaGVhZD0xMCByYz1jcmYgbWJ0cmVlPTEgY3JmPTIwLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IHZidl9tYXhyYXRlPTIwMDAwIHZidl9idWZzaXplPTI1MDAwIGNyZl9tYXg9MC4wIG5hbF9ocmQ9bm9uZSBmaWxsZXI9MCBpcF9yYXRpbz0xLjQwIGFxPTE6MS4wMACAAAAAOWWIhAA3//p+C7v8tDDSTjf97w55i3SbRPO4ZY+hkjD5hbkAkL3zpJ6h/LR1CAABzgB1kqqzUorlhQAAAAxBmiQYhn/+qZYADLgAAAAJQZ5CQhX/AAj5IQADQGgcIQADQGgcAAAACQGeYUQn/wALKCEAA0BoHAAAAAkBnmNEJ/8ACykhAANAaBwhAANAaBwAAAANQZpoNExDP/6plgAMuSEAA0BoHAAAAAtBnoZFESwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBnqVEJ/8ACykhAANAaBwAAAAJAZ6nRCf/AAsoIQADQGgcIQADQGgcAAAADUGarDRMQz/+qZYADLghAANAaBwAAAALQZ7KRRUsK/8ACPkhAANAaBwAAAAJAZ7pRCf/AAsoIQADQGgcIQADQGgcAAAACQGe60Qn/wALKCEAA0BoHAAAAA1BmvA0TEM//qmWAAy5IQADQGgcIQADQGgcAAAAC0GfDkUVLCv/AAj5IQADQGgcAAAACQGfLUQn/wALKSEAA0BoHCEAA0BoHAAAAAkBny9EJ/8ACyghAANAaBwAAAANQZs0NExDP/6plgAMuCEAA0BoHAAAAAtBn1JFFSwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBn3FEJ/8ACyghAANAaBwAAAAJAZ9zRCf/AAsoIQADQGgcIQADQGgcAAAADUGbeDRMQz/+qZYADLkhAANAaBwAAAALQZ+WRRUsK/8ACPghAANAaBwhAANAaBwAAAAJAZ+1RCf/AAspIQADQGgcAAAACQGft0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bm7w0TEM//qmWAAy4IQADQGgcAAAAC0Gf2kUVLCv/AAj5IQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHAAAAAkBn/tEJ/8ACykhAANAaBwAAAANQZvgNExDP/6plgAMuSEAA0BoHCEAA0BoHAAAAAtBnh5FFSwr/wAI+CEAA0BoHAAAAAkBnj1EJ/8ACyghAANAaBwhAANAaBwAAAAJAZ4/RCf/AAspIQADQGgcAAAADUGaJDRMQz/+qZYADLghAANAaBwAAAALQZ5CRRUsK/8ACPkhAANAaBwhAANAaBwAAAAJAZ5hRCf/AAsoIQADQGgcAAAACQGeY0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bmmg0TEM//qmWAAy5IQADQGgcAAAAC0GehkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGepUQn/wALKSEAA0BoHAAAAAkBnqdEJ/8ACyghAANAaBwAAAANQZqsNExDP/6plgAMuCEAA0BoHCEAA0BoHAAAAAtBnspFFSwr/wAI+SEAA0BoHAAAAAkBnulEJ/8ACyghAANAaBwhAANAaBwAAAAJAZ7rRCf/AAsoIQADQGgcAAAADUGa8DRMQz/+qZYADLkhAANAaBwhAANAaBwAAAALQZ8ORRUsK/8ACPkhAANAaBwAAAAJAZ8tRCf/AAspIQADQGgcIQADQGgcAAAACQGfL0Qn/wALKCEAA0BoHAAAAA1BmzQ0TEM//qmWAAy4IQADQGgcAAAAC0GfUkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGfcUQn/wALKCEAA0BoHAAAAAkBn3NEJ/8ACyghAANAaBwhAANAaBwAAAANQZt4NExC//6plgAMuSEAA0BoHAAAAAtBn5ZFFSwr/wAI+CEAA0BoHCEAA0BoHAAAAAkBn7VEJ/8ACykhAANAaBwAAAAJAZ+3RCf/AAspIQADQGgcAAAADUGbuzRMQn/+nhAAYsAhAANAaBwhAANAaBwAAAAJQZ/aQhP/AAspIQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHAAACiFtb292AAAAbG12aGQAAAAA1YCCX9WAgl8AAAPoAAAH/AABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAGGlvZHMAAAAAEICAgAcAT////v7/AAAF+XRyYWsAAABcdGtoZAAAAAPVgIJf1YCCXwAAAAEAAAAAAAAH0AAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAygAAAMoAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAB9AAABdwAAEAAAAABXFtZGlhAAAAIG1kaGQAAAAA1YCCX9WAgl8AAV+QAAK/IFXEAAAAAAAtaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAFZpZGVvSGFuZGxlcgAAAAUcbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAAE3HN0YmwAAACYc3RzZAAAAAAAAAABAAAAiGF2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAygDKAEgAAABIAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAAyYXZjQwFNQCj/4QAbZ01AKOyho3ySTUBAQFAAAAMAEAAr8gDxgxlgAQAEaO+G8gAAABhzdHRzAAAAAAAAAAEAAAA8AAALuAAAABRzdHNzAAAAAAAAAAEAAAABAAAB8GN0dHMAAAAAAAAAPAAAAAEAABdwAAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAAC7gAAAAAQAAF3AAAAABAAAAAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAEEc3RzegAAAAAAAAAAAAAAPAAAAzQAAAAQAAAADQAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAANAAAADQAAAQBzdGNvAAAAAAAAADwAAAAwAAADZAAAA3QAAAONAAADoAAAA7kAAAPQAAAD6wAAA/4AAAQXAAAELgAABEMAAARcAAAEbwAABIwAAAShAAAEugAABM0AAATkAAAE/wAABRIAAAUrAAAFQgAABV0AAAVwAAAFiQAABaAAAAW1AAAFzgAABeEAAAX+AAAGEwAABiwAAAY/AAAGVgAABnEAAAaEAAAGnQAABrQAAAbPAAAG4gAABvUAAAcSAAAHJwAAB0AAAAdTAAAHcAAAB4UAAAeeAAAHsQAAB8gAAAfjAAAH9gAACA8AAAgmAAAIQQAACFQAAAhnAAAIhAAACJcAAAMsdHJhawAAAFx0a2hkAAAAA9WAgl/VgIJfAAAAAgAAAAAAAAf8AAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAACsm1kaWEAAAAgbWRoZAAAAADVgIJf1YCCXwAArEQAAWAAVcQAAAAAACdoZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU3RlcmVvAAAAAmNtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAidzdGJsAAAAZ3N0c2QAAAAAAAAAAQAAAFdtcDRhAAAAAAAAAAEAAAAAAAAAAAACABAAAAAArEQAAAAAADNlc2RzAAAAAAOAgIAiAAIABICAgBRAFQAAAAADDUAAAAAABYCAgAISEAaAgIABAgAAABhzdHRzAAAAAAAAAAEAAABYAAAEAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAAUc3RzegAAAAAAAAAGAAAAWAAAAXBzdGNvAAAAAAAAAFgAAAOBAAADhwAAA5oAAAOtAAADswAAA8oAAAPfAAAD5QAAA/gAAAQLAAAEEQAABCgAAAQ9AAAEUAAABFYAAARpAAAEgAAABIYAAASbAAAErgAABLQAAATHAAAE3gAABPMAAAT5AAAFDAAABR8AAAUlAAAFPAAABVEAAAVXAAAFagAABX0AAAWDAAAFmgAABa8AAAXCAAAFyAAABdsAAAXyAAAF+AAABg0AAAYgAAAGJgAABjkAAAZQAAAGZQAABmsAAAZ+AAAGkQAABpcAAAauAAAGwwAABskAAAbcAAAG7wAABwYAAAcMAAAHIQAABzQAAAc6AAAHTQAAB2QAAAdqAAAHfwAAB5IAAAeYAAAHqwAAB8IAAAfXAAAH3QAAB/AAAAgDAAAICQAACCAAAAg1AAAIOwAACE4AAAhhAAAIeAAACH4AAAiRAAAIpAAACKoAAAiwAAAItgAACLwAAAjCAAAAFnVkdGEAAAAObmFtZVN0ZXJlbwAAAHB1ZHRhAAAAaG1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAO2lsc3QAAAAzqXRvbwAAACtkYXRhAAAAAQAAAABIYW5kQnJha2UgMC4xMC4yIDIwMTUwNjExMDA="}}])}(w$5);var b$4=w$5.NoSleep;function t$3(){}t$3.array={},t$3.array.binarySearch=function(e,t,i){for(var n,r,o=i||t$3.array.numberSafeCompareFunction,a=0,s=e.length,l=!1;a<s;)(r=+o(e[n=a+(s-a>>1)],t))<0?a=n+1:(s=n,l=!r);return l?a:~a},t$3.array.numberSafeCompareFunction=function(e,t){return e>t?1:e<t?-1:0},t$3.array.includes=function(e,t){return e.indexOf(t)>=0},t$3.array.linearFindNearest=function(e,t,i){var n,r=e.length;if(e[0]<=t)return 0;if(t<=e[r-1])return r-1;if(i>0){for(n=1;n<r;++n)if(e[n]<t)return n-1}else if(i<0){for(n=1;n<r;++n)if(e[n]<=t)return n}else for(n=1;n<r;++n){if(e[n]==t)return n;if(e[n]<t)return e[n-1]-t<t-e[n]?n-1:n}return r-1},t$3.array.reverseSubArray=function(e,t,i){for(;t<i;){var n=e[t];e[t]=e[i],e[i]=n,++t,--i}},t$3.array.extend=function(e,t){var i,n=Array.isArray(t)?t:[t],r=n.length;for(i=0;i<r;i++)e[e.length]=n[i]},t$3.array.remove=function(e,t){var i=e.indexOf(t),n=i>-1;return n&&e.splice(i,1),n},t$3.array.find=function(e,t){for(var i,n=e.length>>>0,r=0;r<n;r++)if(t(i=e[r],r,e))return i;return null},t$3.array.equals=function(e,t){var i=e.length;if(i!==t.length)return!1;for(var n=0;n<i;n++)if(e[n]!==t[n])return!1;return!0},t$3.array.stableSort=function(e,t){var i,n=e.length,r=Array(e.length);for(i=0;i<n;i++)r[i]={index:i,value:e[i]};for(r.sort((function(e,i){return t(e.value,i.value)||e.index-i.index})),i=0;i<e.length;i++)e[i]=r[i].value},t$3.array.findIndex=function(e,t){var i,n=!e.every((function(n,r){return i=r,!t(n,r,e)}));return n?i:-1},t$3.array.isSorted=function(e,t,i){var n=t||t$3.array.numberSafeCompareFunction;return e.every((function(t,r){if(0===r)return!0;var o=n(e[r-1],t);return!(o>0||i&&0===o)}))},t$3.ASSUME_TOUCH=!1,t$3.DEFAULT_MAX_ZOOM=42,t$3.DEFAULT_MIN_ZOOM=0,t$3.DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD=.5,t$3.DEFAULT_TILE_SIZE=256,t$3.DEFAULT_WMS_VERSION="1.3.0",t$3.ENABLE_CANVAS=!0,t$3.ENABLE_PROJ4JS=!0,t$3.ENABLE_RASTER_REPROJECTION=!0,t$3.ENABLE_WEBGL=!0,t$3.DEBUG_WEBGL=!0,t$3.INITIAL_ATLAS_SIZE=256,t$3.MAX_ATLAS_SIZE=-1,t$3.MOUSEWHEELZOOM_MAXDELTA=1,t$3.OVERVIEWMAP_MAX_RATIO=.75,t$3.OVERVIEWMAP_MIN_RATIO=.1,t$3.RASTER_REPROJECTION_MAX_SOURCE_TILES=100,t$3.RASTER_REPROJECTION_MAX_SUBDIVISION=10,t$3.RASTER_REPROJECTION_MAX_TRIANGLE_WIDTH=.25,t$3.SIMPLIFY_TOLERANCE=.5,t$3.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK=1024,t$3.VERSION="",t$3.inherits=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e},t$3.nullFunction=function(){},t$3.getUid=function(e){return e.ol_uid||(e.ol_uid=++t$3.uidCounter_)},t$3.asserts={},t$3.asserts.assert=function(e,t){},t$3.has={};var U$1=typeof navigator<"u"?navigator.userAgent.toLowerCase():"";t$3.has.FIREFOX=-1!==U$1.indexOf("firefox"),t$3.has.SAFARI=-1!==U$1.indexOf("safari")&&-1==U$1.indexOf("chrom"),t$3.has.WEBKIT=-1!==U$1.indexOf("webkit")&&-1==U$1.indexOf("edge"),t$3.has.MAC=-1!==U$1.indexOf("macintosh"),t$3.has.DEVICE_PIXEL_RATIO=1,t$3.has.CANVAS_LINE_DASH=!0,t$3.structs={},t$3.CollectionEventType={ADD:"add",REMOVE:"remove"},t$3.ObjectEventType={PROPERTYCHANGE:"propertychange"},t$3.events={},t$3.events.bindListener_=function(e){var t=function(t){var i=e.listener,n=e.bindTo||e.target;return e.callOnce&&t$3.events.unlistenByKey(e),i.call(n,t)};return e.boundListener=t,t},t$3.events.findListener_=function(e,t,i,n){for(var r,o=0,a=e.length;o<a;++o)if((r=e[o]).listener===t&&r.bindTo===i)return n&&(r.deleteIndex=o),r},t$3.events.getListeners=function(e,t){var i=e.ol_lm;return i?i[t]:void 0},t$3.events.getListenerMap_=function(e){var t=e.ol_lm;return t||(t=e.ol_lm={}),t},t$3.events.removeListeners_=function(e,t){var i=t$3.events.getListeners(e,t);if(i){for(var n=0,r=i.length;n<r;++n)e.removeEventListener(t,i[n].boundListener),t$3.obj.clear(i[n]);i.length=0;var o=e.ol_lm;o&&(delete o[t],0===Object.keys(o).length&&delete e.ol_lm)}},t$3.events.listen=function(e,t,i,n,r){var o=t$3.events.getListenerMap_(e),a=o[t];a||(a=o[t]=[]);var s=t$3.events.findListener_(a,i,n,!1);return s?r||(s.callOnce=!1):(s={bindTo:n,callOnce:!!r,listener:i,target:e,type:t},e.addEventListener(t,t$3.events.bindListener_(s)),a.push(s)),s},t$3.events.listenOnce=function(e,t,i,n){return t$3.events.listen(e,t,i,n,!0)},t$3.events.unlisten=function(e,t,i,n){var r=t$3.events.getListeners(e,t);if(r){var o=t$3.events.findListener_(r,i,n,!0);o&&t$3.events.unlistenByKey(o)}},t$3.events.unlistenByKey=function(e){if(e&&e.target){e.target.removeEventListener(e.type,e.boundListener);var t=t$3.events.getListeners(e.target,e.type);if(t){var i="deleteIndex"in e?e.deleteIndex:t.indexOf(e);-1!==i&&t.splice(i,1),0===t.length&&t$3.events.removeListeners_(e.target,e.type)}t$3.obj.clear(e)}},t$3.events.unlistenAll=function(e){var t=t$3.events.getListenerMap_(e);for(var i in t)t$3.events.removeListeners_(e,i)},t$3.Disposable=function(){},t$3.Disposable.prototype.disposed_=!1,t$3.Disposable.prototype.dispose=function(){this.disposed_||(this.disposed_=!0,this.disposeInternal())},t$3.Disposable.prototype.disposeInternal=t$3.nullFunction,t$3.events.Event={},t$3.events.Event=function(e){this.propagationStopped,this.type=e,this.target=null},t$3.events.Event.prototype.preventDefault=t$3.events.Event.prototype.stopPropagation=function(){this.propagationStopped=!0},t$3.events.Event.stopPropagation=function(e){e.stopPropagation()},t$3.events.Event.preventDefault=function(e){e.preventDefault()},t$3.events.EventTarget={},t$3.events.EventTarget=function(){t$3.Disposable.call(this),this.pendingRemovals_={},this.dispatching_={},this.listeners_={}},t$3.inherits(t$3.events.EventTarget,t$3.Disposable),t$3.events.EventTarget.prototype.addEventListener=function(e,t){var i=this.listeners_[e];i||(i=this.listeners_[e]=[]),-1===i.indexOf(t)&&i.push(t)},t$3.events.EventTarget.prototype.dispatchEvent=function(e){var t="string"==typeof e?new t$3.events.Event(e):e,i=t.type;t.target=this;var n,r=this.listeners_[i];if(r){i in this.dispatching_||(this.dispatching_[i]=0,this.pendingRemovals_[i]=0),++this.dispatching_[i];for(var o=0,a=r.length;o<a;++o)if(!1===r[o].call(this,t)||t.propagationStopped){n=!1;break}if(--this.dispatching_[i],0===this.dispatching_[i]){var s=this.pendingRemovals_[i];for(delete this.pendingRemovals_[i];s--;)this.removeEventListener(i,t$3.nullFunction);delete this.dispatching_[i]}return n}},t$3.events.EventTarget.prototype.disposeInternal=function(){t$3.events.unlistenAll(this)},t$3.events.EventTarget.prototype.getListeners=function(e){return this.listeners_[e]},t$3.events.EventTarget.prototype.hasListener=function(e){return e?e in this.listeners_:Object.keys(this.listeners_).length>0},t$3.events.EventTarget.prototype.removeEventListener=function(e,t){var i=this.listeners_[e];if(i){var n=i.indexOf(t);e in this.pendingRemovals_?(i[n]=t$3.nullFunction,++this.pendingRemovals_[e]):(i.splice(n,1),0===i.length&&delete this.listeners_[e])}},t$3.events.EventType={CHANGE:"change",CLEAR:"clear",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",ERROR:"error",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",MOUSEDOWN:"mousedown",MOUSEMOVE:"mousemove",MOUSEOUT:"mouseout",MOUSEUP:"mouseup",MOUSEWHEEL:"mousewheel",MSPOINTERDOWN:"MSPointerDown",RESIZE:"resize",TOUCHSTART:"touchstart",TOUCHMOVE:"touchmove",TOUCHEND:"touchend",WHEEL:"wheel"},t$3.Observable=function(){this.revision_=0},t$3.inherits(t$3.Observable,t$3.events.EventTarget),t$3.Observable.unByKey=function(e){if(Array.isArray(e))for(var t=0,i=e.length;t<i;++t)t$3.events.unlistenByKey(e[t]);else t$3.events.unlistenByKey(e)},t$3.Observable.prototype.changed=function(){++this.revision_},t$3.Observable.prototype.dispatchEvent,t$3.Observable.prototype.getRevision=function(){return this.revision_},t$3.Observable.prototype.on=function(e,t,i){if(Array.isArray(e)){for(var n=e.length,r=new Array(n),o=0;o<n;++o)r[o]=t$3.events.listen(this,e[o],t,i);return r}return t$3.events.listen(this,e,t,i)},t$3.Observable.prototype.once=function(e,t,i){if(Array.isArray(e)){for(var n=e.length,r=new Array(n),o=0;o<n;++o)r[o]=t$3.events.listenOnce(this,e[o],t,i);return r}return t$3.events.listenOnce(this,e,t,i)},t$3.Observable.prototype.un=function(e,t,i){if(Array.isArray(e))for(var n=0,r=e.length;n<r;++n)t$3.events.unlisten(this,e[n],t,i);else t$3.events.unlisten(this,e,t,i)},t$3.uidCounter_=0,t$3.Object=function(e){t$3.Observable.call(this),t$3.getUid(this),this.values_={},void 0!==e&&this.setProperties(e)},t$3.inherits(t$3.Object,t$3.Observable),t$3.Object.changeEventTypeCache_={},t$3.Object.getChangeEventType=function(e){return t$3.Object.changeEventTypeCache_.hasOwnProperty(e)?t$3.Object.changeEventTypeCache_[e]:t$3.Object.changeEventTypeCache_[e]="change:"+e},t$3.Object.prototype.get=function(e){var t;return this.values_.hasOwnProperty(e)&&(t=this.values_[e]),t},t$3.Object.prototype.getKeys=function(){return Object.keys(this.values_)},t$3.Object.prototype.getProperties=function(){return t$3.obj.assign({},this.values_)},t$3.Object.prototype.notify=function(e,t){},t$3.Object.prototype.set=function(e,t,i){if(i)this.values_[e]=t;else{var n=this.values_[e];this.values_[e]=t,n!==t&&this.notify(e,n)}},t$3.Object.prototype.setProperties=function(e,t){var i;for(i in e)this.set(i,e[i],t)},t$3.Object.prototype.unset=function(e,t){if(e in this.values_){var i=this.values_[e];delete this.values_[e],t||this.notify(e,i)}},t$3.Object.Event=function(e,t,i){t$3.events.Event.call(this,e),this.key=t,this.oldValue=i},t$3.inherits(t$3.Object.Event,t$3.events.Event),t$3.functions={},t$3.functions.TRUE=function(){return!0},t$3.functions.FALSE=function(){return!1},t$3.math={},t$3.math.clamp=function(e,t,i){return Math.min(Math.max(e,t),i)},t$3.math.cosh=function(){var e;return e="cosh"in Math?Math.cosh:function(e){var t=Math.exp(e);return(t+1/t)/2},e}(),t$3.math.roundUpToPowerOfTwo=function(e){return t$3.asserts.assert(0<e,29),Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},t$3.math.squaredSegmentDistance=function(e,t,i,n,r,o){var a=r-i,s=o-n;if(0!==a||0!==s){var l=((e-i)*a+(t-n)*s)/(a*a+s*s);l>1?(i=r,n=o):l>0&&(i+=a*l,n+=s*l)}return t$3.math.squaredDistance(e,t,i,n)},t$3.math.squaredDistance=function(e,t,i,n){var r=i-e,o=n-t;return r*r+o*o},t$3.math.solveLinearSystem=function(e){for(var t=e.length,i=0;i<t;i++){for(var n=i,r=Math.abs(e[i][i]),o=i+1;o<t;o++){var a=Math.abs(e[o][i]);a>r&&(r=a,n=o)}if(0===r)return null;var s=e[n];e[n]=e[i],e[i]=s;for(var l=i+1;l<t;l++)for(var u=-e[l][i]/e[i][i],c=i;c<t+1;c++)i==c?e[l][c]=0:e[l][c]+=u*e[i][c]}for(var h=new Array(t),d=t-1;d>=0;d--){h[d]=e[d][t]/e[d][d];for(var f=d-1;f>=0;f--)e[f][t]-=e[f][d]*h[d]}return h},t$3.math.toDegrees=function(e){return 180*e/Math.PI},t$3.math.toRadians=function(e){return e*Math.PI/180},t$3.math.modulo=function(e,t){var i=e%t;return i*t<0?i+t:i},t$3.math.lerp=function(e,t,i){return e+i*(t-e)},t$3.ImageState={IDLE:0,LOADING:1,LOADED:2,ERROR:3},t$3.color={},t$3.color.HEX_COLOR_RE_=/^#(?:[0-9a-f]{3,4}){1,2}$/i,t$3.color.NAMED_COLOR_RE_=/^([a-z]*)$/i,t$3.color.asArray=function(e){return Array.isArray(e)?e:t$3.color.fromString(e)},t$3.color.asString=function(e){return"string"==typeof e?e:t$3.color.toString(e)},t$3.color.fromNamed=function(e){var t=document.createElement("div");t.style.color=e,document.body.appendChild(t);var i=getComputedStyle(t).color;return document.body.removeChild(t),i},t$3.color.fromString=function(){var e={},t=0;return function(i){var n;if(e.hasOwnProperty(i))n=e[i];else{if(t>=1024){var r,o=0;for(r in e)0==(3&o++)&&(delete e[r],--t)}n=t$3.color.fromStringInternal_(i),e[i]=n,++t}return n}}(),t$3.color.fromStringInternal_=function(e){var t,i,n,r,o,a;if(t$3.color.NAMED_COLOR_RE_.exec(e)&&(e=t$3.color.fromNamed(e)),t$3.color.HEX_COLOR_RE_.exec(e)){var s,l=e.length-1;s=l<=4?1:2;var u=4===l||8===l;t=parseInt(e.substr(1+0*s,s),16),i=parseInt(e.substr(1+1*s,s),16),n=parseInt(e.substr(1+2*s,s),16),r=u?parseInt(e.substr(1+3*s,s),16):255,1==s&&(t=(t<<4)+t,i=(i<<4)+i,n=(n<<4)+n,u&&(r=(r<<4)+r)),o=[t,i,n,r/255]}else 0==e.indexOf("rgba(")?(a=e.slice(5,-1).split(",").map(Number),o=t$3.color.normalize(a)):0==e.indexOf("rgb(")?((a=e.slice(4,-1).split(",").map(Number)).push(1),o=t$3.color.normalize(a)):t$3.asserts.assert(!1,14);return o},t$3.color.normalize=function(e,t){var i=t||[];return i[0]=t$3.math.clamp(e[0]+.5|0,0,255),i[1]=t$3.math.clamp(e[1]+.5|0,0,255),i[2]=t$3.math.clamp(e[2]+.5|0,0,255),i[3]=t$3.math.clamp(e[3],0,1),i},t$3.color.toString=function(e){var t=e[0];t!=(0|t)&&(t=t+.5|0);var i=e[1];i!=(0|i)&&(i=i+.5|0);var n=e[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+t+","+i+","+n+","+(void 0===e[3]?1:e[3])+")"},t$3.colorlike={},t$3.colorlike.asColorLike=function(e){return t$3.colorlike.isColorLike(e)?e:t$3.color.asString(e)},t$3.colorlike.isColorLike=function(e){return"string"==typeof e||e instanceof CanvasPattern||e instanceof CanvasGradient},t$3.css={},t$3.css.CLASS_HIDDEN="ol-hidden",t$3.css.CLASS_SELECTABLE="ol-selectable",t$3.css.CLASS_UNSELECTABLE="ol-unselectable",t$3.css.CLASS_UNSUPPORTED="ol-unsupported",t$3.css.CLASS_CONTROL="ol-control",t$3.css.getFontFamilies=function(){var e,t={};return function(i){if(e||(e=document.createElement("div").style),!(i in t)){e.font=i;var n=e.fontFamily;if(e.font="",!n)return null;t[i]=n.split(/,\s?/)}return t[i]}}(),t$3.dom={},t$3.dom.createCanvasContext2D=function(e,t){return(e&&t?new OffscreenCanvas(e,t):new OffscreenCanvas(1,1)).getContext("2d")},t$3.dom.outerWidth=function(e){var t=e.offsetWidth,i=getComputedStyle(e);return t+=parseInt(i.marginLeft,10)+parseInt(i.marginRight,10)},t$3.dom.outerHeight=function(e){var t=e.offsetHeight,i=getComputedStyle(e);return t+=parseInt(i.marginTop,10)+parseInt(i.marginBottom,10)},t$3.dom.replaceNode=function(e,t){var i=t.parentNode;i&&i.replaceChild(e,t)},t$3.dom.removeNode=function(e){return e&&e.parentNode?e.parentNode.removeChild(e):null},t$3.dom.removeChildren=function(e){for(;e.lastChild;)e.removeChild(e.lastChild)},t$3.extent={},t$3.extent.Corner={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},t$3.extent.Relationship={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16},t$3.extent.boundingExtent=function(e){for(var t=t$3.extent.createEmpty(),i=0,n=e.length;i<n;++i)t$3.extent.extendCoordinate(t,e[i]);return t},t$3.extent.boundingExtentXYs_=function(e,t,i){var n=Math.min.apply(null,e),r=Math.min.apply(null,t),o=Math.max.apply(null,e),a=Math.max.apply(null,t);return t$3.extent.createOrUpdate(n,r,o,a,i)},t$3.extent.buffer=function(e,t,i){return i?(i[0]=e[0]-t,i[1]=e[1]-t,i[2]=e[2]+t,i[3]=e[3]+t,i):[e[0]-t,e[1]-t,e[2]+t,e[3]+t]},t$3.extent.clone=function(e,t){return t?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):e.slice()},t$3.extent.closestSquaredDistanceXY=function(e,t,i){var n,r;return(n=t<e[0]?e[0]-t:e[2]<t?t-e[2]:0)*n+(r=i<e[1]?e[1]-i:e[3]<i?i-e[3]:0)*r},t$3.extent.containsCoordinate=function(e,t){return t$3.extent.containsXY(e,t[0],t[1])},t$3.extent.containsExtent=function(e,t){return e[0]<=t[0]&&t[2]<=e[2]&&e[1]<=t[1]&&t[3]<=e[3]},t$3.extent.containsXY=function(e,t,i){return e[0]<=t&&t<=e[2]&&e[1]<=i&&i<=e[3]},t$3.extent.coordinateRelationship=function(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=t[0],s=t[1],l=t$3.extent.Relationship.UNKNOWN;return a<i?l|=t$3.extent.Relationship.LEFT:a>r&&(l|=t$3.extent.Relationship.RIGHT),s<n?l|=t$3.extent.Relationship.BELOW:s>o&&(l|=t$3.extent.Relationship.ABOVE),l===t$3.extent.Relationship.UNKNOWN&&(l=t$3.extent.Relationship.INTERSECTING),l},t$3.extent.createEmpty=function(){return[1/0,1/0,-1/0,-1/0]},t$3.extent.createOrUpdate=function(e,t,i,n,r){return r?(r[0]=e,r[1]=t,r[2]=i,r[3]=n,r):[e,t,i,n]},t$3.extent.createOrUpdateEmpty=function(e){return t$3.extent.createOrUpdate(1/0,1/0,-1/0,-1/0,e)},t$3.extent.createOrUpdateFromCoordinate=function(e,t){var i=e[0],n=e[1];return t$3.extent.createOrUpdate(i,n,i,n,t)},t$3.extent.createOrUpdateFromCoordinates=function(e,t){var i=t$3.extent.createOrUpdateEmpty(t);return t$3.extent.extendCoordinates(i,e)},t$3.extent.createOrUpdateFromFlatCoordinates=function(e,t,i,n,r){var o=t$3.extent.createOrUpdateEmpty(r);return t$3.extent.extendFlatCoordinates(o,e,t,i,n)},t$3.extent.createOrUpdateFromRings=function(e,t){var i=t$3.extent.createOrUpdateEmpty(t);return t$3.extent.extendRings(i,e)},t$3.extent.equals=function(e,t){return e[0]==t[0]&&e[2]==t[2]&&e[1]==t[1]&&e[3]==t[3]},t$3.extent.extend=function(e,t){return t[0]<e[0]&&(e[0]=t[0]),t[2]>e[2]&&(e[2]=t[2]),t[1]<e[1]&&(e[1]=t[1]),t[3]>e[3]&&(e[3]=t[3]),e},t$3.extent.extendCoordinate=function(e,t){t[0]<e[0]&&(e[0]=t[0]),t[0]>e[2]&&(e[2]=t[0]),t[1]<e[1]&&(e[1]=t[1]),t[1]>e[3]&&(e[3]=t[1])},t$3.extent.extendCoordinates=function(e,t){var i,n;for(i=0,n=t.length;i<n;++i)t$3.extent.extendCoordinate(e,t[i]);return e},t$3.extent.extendFlatCoordinates=function(e,t,i,n,r){for(;i<n;i+=r)t$3.extent.extendXY(e,t[i],t[i+1]);return e},t$3.extent.extendRings=function(e,t){var i,n;for(i=0,n=t.length;i<n;++i)t$3.extent.extendCoordinates(e,t[i]);return e},t$3.extent.extendXY=function(e,t,i){e[0]=Math.min(e[0],t),e[1]=Math.min(e[1],i),e[2]=Math.max(e[2],t),e[3]=Math.max(e[3],i)},t$3.extent.forEachCorner=function(e,t,i){var n;return!!((n=t.call(i,t$3.extent.getBottomLeft(e)))||(n=t.call(i,t$3.extent.getBottomRight(e)),n)||(n=t.call(i,t$3.extent.getTopRight(e)),n)||(n=t.call(i,t$3.extent.getTopLeft(e)),n))&&n},t$3.extent.getArea=function(e){var t=0;return t$3.extent.isEmpty(e)||(t=t$3.extent.getWidth(e)*t$3.extent.getHeight(e)),t},t$3.extent.getBottomLeft=function(e){return[e[0],e[1]]},t$3.extent.getBottomRight=function(e){return[e[2],e[1]]},t$3.extent.getCenter=function(e){return[(e[0]+e[2])/2,(e[1]+e[3])/2]},t$3.extent.getCorner=function(e,t){var i;return t===t$3.extent.Corner.BOTTOM_LEFT?i=t$3.extent.getBottomLeft(e):t===t$3.extent.Corner.BOTTOM_RIGHT?i=t$3.extent.getBottomRight(e):t===t$3.extent.Corner.TOP_LEFT?i=t$3.extent.getTopLeft(e):t===t$3.extent.Corner.TOP_RIGHT?i=t$3.extent.getTopRight(e):t$3.asserts.assert(!1,13),i},t$3.extent.getEnlargedArea=function(e,t){var i=Math.min(e[0],t[0]),n=Math.min(e[1],t[1]);return(Math.max(e[2],t[2])-i)*(Math.max(e[3],t[3])-n)},t$3.extent.getForViewAndSize=function(e,t,i,n,r){var o=t*n[0]/2,a=t*n[1]/2,s=Math.cos(i),l=Math.sin(i),u=o*s,c=o*l,h=a*s,d=a*l,f=e[0],p=e[1],_=f-u+d,m=f-u-d,$=f+u-d,g=f+u+d,y=p-c-h,v=p-c+h,x=p+c+h,b=p+c-h;return t$3.extent.createOrUpdate(Math.min(_,m,$,g),Math.min(y,v,x,b),Math.max(_,m,$,g),Math.max(y,v,x,b),r)},t$3.extent.getHeight=function(e){return e[3]-e[1]},t$3.extent.getIntersectionArea=function(e,t){var i=t$3.extent.getIntersection(e,t);return t$3.extent.getArea(i)},t$3.extent.getIntersection=function(e,t,i){var n=i||t$3.extent.createEmpty();return t$3.extent.intersects(e,t)&&(e[0]>t[0]?n[0]=e[0]:n[0]=t[0],e[1]>t[1]?n[1]=e[1]:n[1]=t[1],e[2]<t[2]?n[2]=e[2]:n[2]=t[2],e[3]<t[3]?n[3]=e[3]:n[3]=t[3]),n},t$3.extent.getMargin=function(e){return t$3.extent.getWidth(e)+t$3.extent.getHeight(e)},t$3.extent.getSize=function(e){return[e[2]-e[0],e[3]-e[1]]},t$3.extent.getTopLeft=function(e){return[e[0],e[3]]},t$3.extent.getTopRight=function(e){return[e[2],e[3]]},t$3.extent.getWidth=function(e){return e[2]-e[0]},t$3.extent.intersects=function(e,t){return e[0]<=t[2]&&e[2]>=t[0]&&e[1]<=t[3]&&e[3]>=t[1]},t$3.extent.isEmpty=function(e){return e[2]<e[0]||e[3]<e[1]},t$3.extent.returnOrUpdate=function(e,t){return t?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):e},t$3.extent.scaleFromCenter=function(e,t){var i=(e[2]-e[0])/2*(t-1),n=(e[3]-e[1])/2*(t-1);e[0]-=i,e[2]+=i,e[1]-=n,e[3]+=n},t$3.extent.intersectsSegment=function(e,t,i){var n=!1,r=t$3.extent.coordinateRelationship(e,t),o=t$3.extent.coordinateRelationship(e,i);if(r===t$3.extent.Relationship.INTERSECTING||o===t$3.extent.Relationship.INTERSECTING)n=!0;else{var a,s,l=e[0],u=e[1],c=e[2],h=e[3],d=t[0],f=t[1],p=i[0],_=i[1],m=(_-f)/(p-d);!!(o&t$3.extent.Relationship.ABOVE)&&!(r&t$3.extent.Relationship.ABOVE)&&(n=(a=p-(_-h)/m)>=l&&a<=c),!n&&!!(o&t$3.extent.Relationship.RIGHT)&&!(r&t$3.extent.Relationship.RIGHT)&&(n=(s=_-(p-c)*m)>=u&&s<=h),!n&&!!(o&t$3.extent.Relationship.BELOW)&&!(r&t$3.extent.Relationship.BELOW)&&(n=(a=p-(_-u)/m)>=l&&a<=c),!n&&o&t$3.extent.Relationship.LEFT&&!(r&t$3.extent.Relationship.LEFT)&&(n=(s=_-(p-l)*m)>=u&&s<=h)}return n},t$3.extent.applyTransform=function(e,t,i){var n=[e[0],e[1],e[0],e[3],e[2],e[1],e[2],e[3]];t(n,n,2);var r=[n[0],n[2],n[4],n[6]],o=[n[1],n[3],n[5],n[7]];return t$3.extent.boundingExtentXYs_(r,o,i)},t$3.obj={},t$3.obj.assign="function"==typeof Object.assign?Object.assign:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(e),n=1,r=arguments.length;n<r;++n){var o=arguments[n];if(null!=o)for(var a in o)o.hasOwnProperty(a)&&(i[a]=o[a])}return i},t$3.obj.clear=function(e){for(var t in e)delete e[t]},t$3.obj.getValues=function(e){var t=[];for(var i in e)t.push(e[i]);return t},t$3.obj.isEmpty=function(e){var t;for(t in e)return!1;return!t},t$3.transform={},t$3.transform.tmp_=new Array(6),t$3.transform.create=function(){return[1,0,0,1,0,0]},t$3.transform.reset=function(e){return t$3.transform.set(e,1,0,0,1,0,0)},t$3.transform.multiply=function(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=t[0],u=t[1],c=t[2],h=t[3],d=t[4],f=t[5];return e[0]=i*l+r*u,e[1]=n*l+o*u,e[2]=i*c+r*h,e[3]=n*c+o*h,e[4]=i*d+r*f+a,e[5]=n*d+o*f+s,e},t$3.transform.set=function(e,t,i,n,r,o,a){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e[4]=o,e[5]=a,e},t$3.transform.setFromArray=function(e,t){return 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},t$3.transform.apply=function(e,t){var i=t[0],n=t[1];return t[0]=e[0]*i+e[2]*n+e[4],t[1]=e[1]*i+e[3]*n+e[5],t},t$3.transform.rotate=function(e,t){var i=Math.cos(t),n=Math.sin(t);return t$3.transform.multiply(e,t$3.transform.set(t$3.transform.tmp_,i,n,-n,i,0,0))},t$3.transform.scale=function(e,t,i){return t$3.transform.multiply(e,t$3.transform.set(t$3.transform.tmp_,t,0,0,i,0,0))},t$3.transform.translate=function(e,t,i){return t$3.transform.multiply(e,t$3.transform.set(t$3.transform.tmp_,1,0,0,1,t,i))},t$3.transform.compose=function(e,t,i,n,r,o,a,s){var l=Math.sin(o),u=Math.cos(o);return e[0]=n*u,e[1]=r*l,e[2]=-n*l,e[3]=r*u,e[4]=a*n*u-s*n*l+t,e[5]=a*r*l+s*r*u+i,e},t$3.transform.invert=function(e){var t=t$3.transform.determinant(e),i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5];return e[0]=o/t,e[1]=-n/t,e[2]=-r/t,e[3]=i/t,e[4]=(r*s-o*a)/t,e[5]=-(i*s-n*a)/t,e},t$3.transform.determinant=function(e){return e[0]*e[3]-e[1]*e[2]},t$3.geom={},t$3.geom.flat={},t$3.geom.flat.center={},t$3.geom.flat.reverse={},t$3.geom.flat.orient={},t$3.geom.flat.transform={},t$3.geom.flat.transform.transform2D=function(e,t,i,n,r,o){var a,s=o||[],l=0;for(a=t;a<i;a+=n){var u=e[a],c=e[a+1];s[l++]=r[0]*u+r[2]*c+r[4],s[l++]=r[1]*u+r[3]*c+r[5]}return o&&s.length!=l&&(s.length=l),s},t$3.geom.flat.transform.rotate=function(e,t,i,n,r,o,a){for(var s=a||[],l=Math.cos(r),u=Math.sin(r),c=o[0],h=o[1],d=0,f=t;f<i;f+=n){var p=e[f]-c,_=e[f+1]-h;s[d++]=c+p*l-_*u,s[d++]=h+p*u+_*l;for(var m=f+2;m<f+n;++m)s[d++]=e[m]}return a&&s.length!=d&&(s.length=d),s},t$3.geom.flat.transform.scale=function(e,t,i,n,r,o,a,s){for(var l=s||[],u=a[0],c=a[1],h=0,d=t;d<i;d+=n){var f=e[d]-u,p=e[d+1]-c;l[h++]=u+r*f,l[h++]=c+o*p;for(var _=d+2;_<d+n;++_)l[h++]=e[_]}return s&&l.length!=h&&(l.length=h),l},t$3.geom.GeometryLayout={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"},t$3.geom.flat.reverse.coordinates=function(e,t,i,n){for(;t<i-n;){var r;for(r=0;r<n;++r){var o=e[t+r];e[t+r]=e[i-n+r],e[i-n+r]=o}t+=n,i-=n}},t$3.geom.flat.orient.linearRingIsClockwise=function(e,t,i,n){for(var r=0,o=e[i-n],a=e[i-n+1];t<i;t+=n){var s=e[t],l=e[t+1];r+=(s-o)*(l+a),o=s,a=l}return r>0},t$3.geom.flat.orient.linearRingsAreOriented=function(e,t,i,n,r){var o,a,s=void 0!==r&&r;for(o=0,a=i.length;o<a;++o){var l=i[o],u=t$3.geom.flat.orient.linearRingIsClockwise(e,t,l,n);if(0===o){if(s&&u||!s&&!u)return!1}else if(s&&!u||!s&&u)return!1;t=l}return!0},t$3.geom.flat.orient.linearRingssAreOriented=function(e,t,i,n,r){var o,a;for(o=0,a=i.length;o<a;++o)if(!t$3.geom.flat.orient.linearRingsAreOriented(e,t,i[o],n,r))return!1;return!0},t$3.geom.flat.orient.orientLinearRings=function(e,t,i,n,r){var o,a,s=void 0!==r&&r;for(o=0,a=i.length;o<a;++o){var l=i[o],u=t$3.geom.flat.orient.linearRingIsClockwise(e,t,l,n);(0===o?s&&u||!s&&!u:s&&!u||!s&&u)&&t$3.geom.flat.reverse.coordinates(e,t,l,n),t=l}return t},t$3.geom.flat.orient.orientLinearRingss=function(e,t,i,n,r){var o,a;for(o=0,a=i.length;o<a;++o)t=t$3.geom.flat.orient.orientLinearRings(e,t,i[o],n,r);return t},t$3.geom.flat.simplify={},t$3.geom.flat.simplify.lineString=function(e,t,i,n,r,o,a){var s=void 0!==a?a:[];return o||(i=t$3.geom.flat.simplify.radialDistance(e,t,i,n,r,s,0),e=s,t=0,n=2),s.length=t$3.geom.flat.simplify.douglasPeucker(e,t,i,n,r,s,0),s},t$3.geom.flat.simplify.douglasPeucker=function(e,t,i,n,r,o,a){var s=(i-t)/n;if(s<3){for(;t<i;t+=n)o[a++]=e[t],o[a++]=e[t+1];return a}var l=new Array(s);l[0]=1,l[s-1]=1;for(var u,c=[t,i-n],h=0;c.length>0;){var d=c.pop(),f=c.pop(),p=0,_=e[f],m=e[f+1],$=e[d],g=e[d+1];for(u=f+n;u<d;u+=n){var y=e[u],v=e[u+1],x=t$3.math.squaredSegmentDistance(y,v,_,m,$,g);x>p&&(h=u,p=x)}p>r&&(l[(h-t)/n]=1,f+n<h&&c.push(f,h),h+n<d&&c.push(h,d))}for(u=0;u<s;++u)l[u]&&(o[a++]=e[t+u*n],o[a++]=e[t+u*n+1]);return a},t$3.geom.flat.simplify.douglasPeuckers=function(e,t,i,n,r,o,a,s){var l,u;for(l=0,u=i.length;l<u;++l){var c=i[l];a=t$3.geom.flat.simplify.douglasPeucker(e,t,c,n,r,o,a),s.push(a),t=c}return a},t$3.geom.flat.simplify.douglasPeuckerss=function(e,t,i,n,r,o,a,s){var l,u;for(l=0,u=i.length;l<u;++l){var c=i[l],h=[];a=t$3.geom.flat.simplify.douglasPeuckers(e,t,c,n,r,o,a,h),s.push(h),t=c[c.length-1]}return a},t$3.geom.flat.simplify.radialDistance=function(e,t,i,n,r,o,a){if(i<=t+n){for(;t<i;t+=n)o[a++]=e[t],o[a++]=e[t+1];return a}var s=e[t],l=e[t+1];o[a++]=s,o[a++]=l;var u=s,c=l;for(t+=n;t<i;t+=n)u=e[t],c=e[t+1],t$3.math.squaredDistance(s,l,u,c)>r&&(o[a++]=u,o[a++]=c,s=u,l=c);return(u!=s||c!=l)&&(o[a++]=u,o[a++]=c),a},t$3.geom.flat.simplify.snap=function(e,t){return t*Math.round(e/t)},t$3.geom.flat.simplify.quantize=function(e,t,i,n,r,o,a){if(t==i)return a;var s,l,u=t$3.geom.flat.simplify.snap(e[t],r),c=t$3.geom.flat.simplify.snap(e[t+1],r);t+=n,o[a++]=u,o[a++]=c;do{if(s=t$3.geom.flat.simplify.snap(e[t],r),l=t$3.geom.flat.simplify.snap(e[t+1],r),(t+=n)==i)return o[a++]=s,o[a++]=l,a}while(s==u&&l==c);for(;t<i;){var h,d;if(h=t$3.geom.flat.simplify.snap(e[t],r),d=t$3.geom.flat.simplify.snap(e[t+1],r),t+=n,h!=s||d!=l){var f=s-u,p=l-c,_=h-u,m=d-c;if(f*m==p*_&&(f<0&&_<f||f==_||f>0&&_>f)&&(p<0&&m<p||p==m||p>0&&m>p)){s=h,l=d;continue}o[a++]=s,o[a++]=l,u=s,c=l,s=h,l=d}}return o[a++]=s,o[a++]=l,a},t$3.geom.flat.simplify.quantizes=function(e,t,i,n,r,o,a,s){var l,u;for(l=0,u=i.length;l<u;++l){var c=i[l];a=t$3.geom.flat.simplify.quantize(e,t,c,n,r,o,a),s.push(a),t=c}return a},t$3.geom.flat.simplify.quantizess=function(e,t,i,n,r,o,a,s){var l,u;for(l=0,u=i.length;l<u;++l){var c=i[l],h=[];a=t$3.geom.flat.simplify.quantizes(e,t,c,n,r,o,a,h),s.push(h),t=c[c.length-1]}return a},t$3.geom.GeometryType={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"},t$3.geom.Geometry=function(){t$3.Object.call(this),this.extent_=t$3.extent.createEmpty(),this.extentRevision_=-1,this.simplifiedGeometryCache={},this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.tmpTransform_=t$3.transform.create()},t$3.inherits(t$3.geom.Geometry,t$3.Object),t$3.geom.Geometry.prototype.clone=function(){},t$3.geom.Geometry.prototype.closestPointXY=function(e,t,i,n){},t$3.geom.Geometry.prototype.getClosestPoint=function(e,t){var i=t||[NaN,NaN];return this.closestPointXY(e[0],e[1],i,1/0),i},t$3.geom.Geometry.prototype.intersectsCoordinate=function(e){return this.containsXY(e[0],e[1])},t$3.geom.Geometry.prototype.computeExtent=function(e){},t$3.geom.Geometry.prototype.containsXY=t$3.functions.FALSE,t$3.geom.Geometry.prototype.getExtent=function(e){return this.extentRevision_!=this.getRevision()&&(this.extent_=this.computeExtent(this.extent_),this.extentRevision_=this.getRevision()),t$3.extent.returnOrUpdate(this.extent_,e)},t$3.geom.Geometry.prototype.rotate=function(e,t){},t$3.geom.Geometry.prototype.scale=function(e,t,i){},t$3.geom.Geometry.prototype.simplify=function(e){return this.getSimplifiedGeometry(e*e)},t$3.geom.Geometry.prototype.getSimplifiedGeometry=function(e){},t$3.geom.Geometry.prototype.getType=function(){},t$3.geom.Geometry.prototype.applyTransform=function(e){},t$3.geom.Geometry.prototype.intersectsExtent=function(e){},t$3.geom.Geometry.prototype.translate=function(e,t){},t$3.geom.Geometry.prototype.transform=function(e,t){var i=this.tmpTransform_,n=(e=t$3.proj.get(e)).getUnits()==t$3.proj.Units.TILE_PIXELS?function(n,r,o){var a=e.getExtent(),s=e.getWorldExtent(),l=t$3.extent.getHeight(s)/t$3.extent.getHeight(a);return t$3.transform.compose(i,s[0],s[3],l,-l,0,0,0),t$3.geom.flat.transform.transform2D(n,0,n.length,o,i,r),t$3.proj.getTransform(e,t)(n,r,o)}:t$3.proj.getTransform(e,t);return this.applyTransform(n),this},t$3.geom.SimpleGeometry=function(){t$3.geom.Geometry.call(this),this.layout=t$3.geom.GeometryLayout.XY,this.stride=2,this.flatCoordinates=null},t$3.inherits(t$3.geom.SimpleGeometry,t$3.geom.Geometry),t$3.geom.SimpleGeometry.getLayoutForStride_=function(e){var t;return 2==e?t=t$3.geom.GeometryLayout.XY:3==e?t=t$3.geom.GeometryLayout.XYZ:4==e&&(t=t$3.geom.GeometryLayout.XYZM),t},t$3.geom.SimpleGeometry.getStrideForLayout=function(e){var t;return e==t$3.geom.GeometryLayout.XY?t=2:e==t$3.geom.GeometryLayout.XYZ||e==t$3.geom.GeometryLayout.XYM?t=3:e==t$3.geom.GeometryLayout.XYZM&&(t=4),t},t$3.geom.SimpleGeometry.prototype.containsXY=t$3.functions.FALSE,t$3.geom.SimpleGeometry.prototype.computeExtent=function(e){return t$3.extent.createOrUpdateFromFlatCoordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)},t$3.geom.SimpleGeometry.prototype.getCoordinates=function(){},t$3.geom.SimpleGeometry.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},t$3.geom.SimpleGeometry.prototype.getFlatCoordinates=function(){return this.flatCoordinates},t$3.geom.SimpleGeometry.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},t$3.geom.SimpleGeometry.prototype.getLayout=function(){return this.layout},t$3.geom.SimpleGeometry.prototype.getSimplifiedGeometry=function(e){if(this.simplifiedGeometryRevision!=this.getRevision()&&(t$3.obj.clear(this.simplifiedGeometryCache),this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&e<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var t=e.toString();if(this.simplifiedGeometryCache.hasOwnProperty(t))return this.simplifiedGeometryCache[t];var i=this.getSimplifiedGeometryInternal(e);return i.getFlatCoordinates().length<this.flatCoordinates.length?(this.simplifiedGeometryCache[t]=i,i):(this.simplifiedGeometryMaxMinSquaredTolerance=e,this)},t$3.geom.SimpleGeometry.prototype.getSimplifiedGeometryInternal=function(e){return this},t$3.geom.SimpleGeometry.prototype.getStride=function(){return this.stride},t$3.geom.SimpleGeometry.prototype.setFlatCoordinatesInternal=function(e,t){this.stride=t$3.geom.SimpleGeometry.getStrideForLayout(e),this.layout=e,this.flatCoordinates=t},t$3.geom.SimpleGeometry.prototype.setCoordinates=function(e,t){},t$3.geom.SimpleGeometry.prototype.setLayout=function(e,t,i){var n;if(e)n=t$3.geom.SimpleGeometry.getStrideForLayout(e);else{var r;for(r=0;r<i;++r){if(0===t.length)return this.layout=t$3.geom.GeometryLayout.XY,void(this.stride=2);t=t[0]}n=t.length,e=t$3.geom.SimpleGeometry.getLayoutForStride_(n)}this.layout=e,this.stride=n},t$3.geom.SimpleGeometry.prototype.applyTransform=function(e){this.flatCoordinates&&(e(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},t$3.geom.SimpleGeometry.prototype.rotate=function(e,t){var i=this.getFlatCoordinates();if(i){var n=this.getStride();t$3.geom.flat.transform.rotate(i,0,i.length,n,e,t,i),this.changed()}},t$3.geom.SimpleGeometry.prototype.scale=function(e,t,i){var n=t;void 0===n&&(n=e);var r=i;r||(r=t$3.extent.getCenter(this.getExtent()));var o=this.getFlatCoordinates();if(o){var a=this.getStride();t$3.geom.flat.transform.scale(o,0,o.length,a,e,n,r,o),this.changed()}},t$3.geom.SimpleGeometry.prototype.translate=function(e,t){var i=this.getFlatCoordinates();if(i){var n=this.getStride();t$3.geom.flat.transform.translate(i,0,i.length,n,e,t,i),this.changed()}},t$3.geom.SimpleGeometry.transform2D=function(e,t,i){var n=e.getFlatCoordinates();if(n){var r=e.getStride();return t$3.geom.flat.transform.transform2D(n,0,n.length,r,t,i)}return null},t$3.geom.Polygon=function(e,t){t$3.geom.SimpleGeometry.call(this),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,this.setCoordinates(e,t)},t$3.inherits(t$3.geom.Polygon,t$3.geom.SimpleGeometry),t$3.geom.Polygon.prototype.appendLinearRing=function(e){this.flatCoordinates?t$3.array.extend(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},t$3.geom.Polygon.prototype.clone=function(){var e=new t$3.geom.Polygon(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice(),this.ends_.slice()),e},t$3.geom.Polygon.prototype.closestPointXY=function(e,t,i,n){return n<t$3.extent.closestSquaredDistanceXY(this.getExtent(),e,t)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(t$3.geom.flat.closest.getsMaxSquaredDelta(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),t$3.geom.flat.closest.getsClosestPoint(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,e,t,i,n))},t$3.geom.Polygon.prototype.containsXY=function(e,t){return t$3.geom.flat.contains.linearRingsContainsXY(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,t)},t$3.geom.Polygon.prototype.getArea=function(){return t$3.geom.flat.area.linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},t$3.geom.Polygon.prototype.getCoordinates=function(e){var t;return void 0!==e?(t=this.getOrientedFlatCoordinates().slice(),t$3.geom.flat.orient.orientLinearRings(t,0,this.ends_,this.stride,e)):t=this.flatCoordinates,t$3.geom.flat.inflate.coordinatess(t,0,this.ends_,this.stride)},t$3.geom.Polygon.prototype.getEnds=function(){return this.ends_},t$3.geom.Polygon.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var e=t$3.extent.getCenter(this.getExtent());this.flatInteriorPoint_=t$3.geom.flat.interiorpoint.linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},t$3.geom.Polygon.prototype.getInteriorPoint=function(){return new t$3.geom.Point(this.getFlatInteriorPoint(),t$3.geom.GeometryLayout.XYM)},t$3.geom.Polygon.prototype.getLinearRingCount=function(){return this.ends_.length},t$3.geom.Polygon.prototype.getLinearRing=function(e){if(e<0||this.ends_.length<=e)return null;var t=new t$3.geom.LinearRing(null);return t.setFlatCoordinates(this.layout,this.flatCoordinates.slice(0===e?0:this.ends_[e-1],this.ends_[e])),t},t$3.geom.Polygon.prototype.getLinearRings=function(){var e,t,i=this.layout,n=this.flatCoordinates,r=this.ends_,o=[],a=0;for(e=0,t=r.length;e<t;++e){var s=r[e],l=new t$3.geom.LinearRing(null);l.setFlatCoordinates(i,n.slice(a,s)),o.push(l),a=s}return o},t$3.geom.Polygon.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var e=this.flatCoordinates;t$3.geom.flat.orient.linearRingsAreOriented(e,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=t$3.geom.flat.orient.orientLinearRings(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},t$3.geom.Polygon.prototype.getSimplifiedGeometryInternal=function(e){var t=[],i=[];t.length=t$3.geom.flat.simplify.quantizes(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(e),t,0,i);var n=new t$3.geom.Polygon(null);return n.setFlatCoordinates(t$3.geom.GeometryLayout.XY,t,i),n},t$3.geom.Polygon.prototype.getType=function(){return t$3.geom.GeometryType.POLYGON},t$3.geom.Polygon.prototype.intersectsExtent=function(e){return t$3.geom.flat.intersectsextent.linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e)},t$3.geom.Polygon.prototype.setCoordinates=function(e,t){if(e){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=t$3.geom.flat.deflate.coordinatess(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1]}else this.setFlatCoordinates(t$3.geom.GeometryLayout.XY,null,this.ends_)},t$3.geom.Polygon.prototype.setFlatCoordinates=function(e,t,i){this.setFlatCoordinatesInternal(e,t),this.ends_=i},t$3.geom.Polygon.circular=function(e,t,i,n){var r,o=n||32,a=[];for(r=0;r<o;++r)t$3.array.extend(a,e.offset(t,i,2*Math.PI*r/o));a.push(a[0],a[1]);var s=new t$3.geom.Polygon(null);return s.setFlatCoordinates(t$3.geom.GeometryLayout.XY,a,[a.length]),s},t$3.geom.Polygon.fromExtent=function(e){var t=e[0],i=e[1],n=e[2],r=e[3],o=[t,i,t,r,n,r,n,i,t,i],a=new t$3.geom.Polygon(null);return a.setFlatCoordinates(t$3.geom.GeometryLayout.XY,o,[o.length]),a},t$3.geom.Polygon.fromCircle=function(e,t,i){for(var n=t||32,r=e.getStride(),o=e.getLayout(),a=new t$3.geom.Polygon(null,o),s=r*(n+1),l=new Array(s),u=0;u<s;u++)l[u]=0;var c=[l.length];return a.setFlatCoordinates(o,l,c),t$3.geom.Polygon.makeRegular(a,e.getCenter(),e.getRadius(),i),a},t$3.geom.Polygon.makeRegular=function(e,t,i,n){for(var r,o,a=e.getFlatCoordinates(),s=e.getLayout(),l=e.getStride(),u=e.getEnds(),c=a.length/l-1,h=n||0,d=0;d<=c;++d)o=d*l,r=h+2*t$3.math.modulo(d,c)*Math.PI/c,a[o]=t[0]+i*Math.cos(r),a[o+1]=t[1]+i*Math.sin(r);e.setFlatCoordinates(s,a,u)},t$3.geom.LineString=function(e,t){t$3.geom.SimpleGeometry.call(this),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.setCoordinates(e,t)},t$3.inherits(t$3.geom.LineString,t$3.geom.SimpleGeometry),t$3.geom.LineString.prototype.appendCoordinate=function(e){this.flatCoordinates?t$3.array.extend(this.flatCoordinates,e):this.flatCoordinates=e.slice(),this.changed()},t$3.geom.LineString.prototype.clone=function(){var e=new t$3.geom.LineString(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice()),e},t$3.geom.LineString.prototype.closestPointXY=function(e,t,i,n){return n<t$3.extent.closestSquaredDistanceXY(this.getExtent(),e,t)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(t$3.geom.flat.closest.getMaxSquaredDelta(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),t$3.geom.flat.closest.getClosestPoint(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,e,t,i,n))},t$3.geom.LineString.prototype.forEachSegment=function(e,t){return t$3.geom.flat.segments.forEach(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t)},t$3.geom.LineString.prototype.getCoordinateAtM=function(e,t){if(this.layout!=t$3.geom.GeometryLayout.XYM&&this.layout!=t$3.geom.GeometryLayout.XYZM)return null;var i=void 0!==t&&t;return t$3.geom.flat.interpolate.lineStringCoordinateAtM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,i)},t$3.geom.LineString.prototype.getCoordinates=function(){return t$3.geom.flat.inflate.coordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},t$3.geom.LineString.prototype.getCoordinateAt=function(e,t){return t$3.geom.flat.interpolate.lineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t)},t$3.geom.LineString.prototype.getLength=function(){return t$3.geom.flat.length.lineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},t$3.geom.LineString.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},t$3.geom.LineString.prototype.getSimplifiedGeometryInternal=function(e){var t=[];t.length=t$3.geom.flat.simplify.douglasPeucker(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,0);var i=new t$3.geom.LineString(null);return i.setFlatCoordinates(t$3.geom.GeometryLayout.XY,t),i},t$3.geom.LineString.prototype.getType=function(){return t$3.geom.GeometryType.LINE_STRING},t$3.geom.LineString.prototype.intersectsExtent=function(e){return t$3.geom.flat.intersectsextent.lineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)},t$3.geom.LineString.prototype.setCoordinates=function(e,t){e?(this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=t$3.geom.flat.deflate.coordinates(this.flatCoordinates,0,e,this.stride),this.changed()):this.setFlatCoordinates(t$3.geom.GeometryLayout.XY,null)},t$3.geom.LineString.prototype.setFlatCoordinates=function(e,t){this.setFlatCoordinatesInternal(e,t),this.changed()},t$3.geom.Point=function(e,t){t$3.geom.SimpleGeometry.call(this),this.setCoordinates(e,t)},t$3.inherits(t$3.geom.Point,t$3.geom.SimpleGeometry),t$3.geom.Point.prototype.clone=function(){var e=new t$3.geom.Point(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice()),e},t$3.geom.Point.prototype.closestPointXY=function(e,t,i,n){var r=this.flatCoordinates,o=t$3.math.squaredDistance(e,t,r[0],r[1]);if(o<n){var a,s=this.stride;for(a=0;a<s;++a)i[a]=r[a];return i.length=s,o}return n},t$3.geom.Point.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},t$3.geom.Point.prototype.computeExtent=function(e){return t$3.extent.createOrUpdateFromCoordinate(this.flatCoordinates,e)},t$3.geom.Point.prototype.getType=function(){return t$3.geom.GeometryType.POINT},t$3.geom.Point.prototype.intersectsExtent=function(e){return t$3.extent.containsXY(e,this.flatCoordinates[0],this.flatCoordinates[1])},t$3.geom.Point.prototype.setCoordinates=function(e,t){e?(this.setLayout(t,e,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=t$3.geom.flat.deflate.coordinate(this.flatCoordinates,0,e,this.stride),this.changed()):this.setFlatCoordinates(t$3.geom.GeometryLayout.XY,null)},t$3.geom.Point.prototype.setFlatCoordinates=function(e,t){this.setFlatCoordinatesInternal(e,t),this.changed()},t$3.geom.MultiLineString=function(e,t){t$3.geom.SimpleGeometry.call(this),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.setCoordinates(e,t)},t$3.inherits(t$3.geom.MultiLineString,t$3.geom.SimpleGeometry),t$3.geom.MultiLineString.prototype.appendLineString=function(e){this.flatCoordinates?t$3.array.extend(this.flatCoordinates,e.getFlatCoordinates().slice()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},t$3.geom.MultiLineString.prototype.clone=function(){var e=new t$3.geom.MultiLineString(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice(),this.ends_.slice()),e},t$3.geom.MultiLineString.prototype.closestPointXY=function(e,t,i,n){return n<t$3.extent.closestSquaredDistanceXY(this.getExtent(),e,t)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(t$3.geom.flat.closest.getsMaxSquaredDelta(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),t$3.geom.flat.closest.getsClosestPoint(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,e,t,i,n))},t$3.geom.MultiLineString.prototype.getCoordinateAtM=function(e,t,i){if(this.layout!=t$3.geom.GeometryLayout.XYM&&this.layout!=t$3.geom.GeometryLayout.XYZM||0===this.flatCoordinates.length)return null;var n=void 0!==t&&t,r=void 0!==i&&i;return t$3.geom.flat.interpolate.lineStringsCoordinateAtM(this.flatCoordinates,0,this.ends_,this.stride,e,n,r)},t$3.geom.MultiLineString.prototype.getCoordinates=function(){return t$3.geom.flat.inflate.coordinatess(this.flatCoordinates,0,this.ends_,this.stride)},t$3.geom.MultiLineString.prototype.getEnds=function(){return this.ends_},t$3.geom.MultiLineString.prototype.getLineString=function(e){if(e<0||this.ends_.length<=e)return null;var t=new t$3.geom.LineString(null);return t.setFlatCoordinates(this.layout,this.flatCoordinates.slice(0===e?0:this.ends_[e-1],this.ends_[e])),t},t$3.geom.MultiLineString.prototype.getLineStrings=function(){var e,t,i=this.flatCoordinates,n=this.ends_,r=this.layout,o=[],a=0;for(e=0,t=n.length;e<t;++e){var s=n[e],l=new t$3.geom.LineString(null);l.setFlatCoordinates(r,i.slice(a,s)),o.push(l),a=s}return o},t$3.geom.MultiLineString.prototype.getFlatMidpoints=function(){var e,t,i=[],n=this.flatCoordinates,r=0,o=this.ends_,a=this.stride;for(e=0,t=o.length;e<t;++e){var s=o[e],l=t$3.geom.flat.interpolate.lineString(n,r,s,a,.5);t$3.array.extend(i,l),r=s}return i},t$3.geom.MultiLineString.prototype.getSimplifiedGeometryInternal=function(e){var t=[],i=[];t.length=t$3.geom.flat.simplify.douglasPeuckers(this.flatCoordinates,0,this.ends_,this.stride,e,t,0,i);var n=new t$3.geom.MultiLineString(null);return n.setFlatCoordinates(t$3.geom.GeometryLayout.XY,t,i),n},t$3.geom.MultiLineString.prototype.getType=function(){return t$3.geom.GeometryType.MULTI_LINE_STRING},t$3.geom.MultiLineString.prototype.intersectsExtent=function(e){return t$3.geom.flat.intersectsextent.lineStrings(this.flatCoordinates,0,this.ends_,this.stride,e)},t$3.geom.MultiLineString.prototype.setCoordinates=function(e,t){if(e){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=t$3.geom.flat.deflate.coordinatess(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()}else this.setFlatCoordinates(t$3.geom.GeometryLayout.XY,null,this.ends_)},t$3.geom.MultiLineString.prototype.setFlatCoordinates=function(e,t,i){this.setFlatCoordinatesInternal(e,t),this.ends_=i,this.changed()},t$3.geom.MultiLineString.prototype.setLineStrings=function(e){var t,i,n=this.getLayout(),r=[],o=[];for(t=0,i=e.length;t<i;++t){var a=e[t];0===t&&(n=a.getLayout()),t$3.array.extend(r,a.getFlatCoordinates()),o.push(r.length)}this.setFlatCoordinates(n,r,o)},t$3.geom.MultiPoint=function(e,t){t$3.geom.SimpleGeometry.call(this),this.setCoordinates(e,t)},t$3.inherits(t$3.geom.MultiPoint,t$3.geom.SimpleGeometry),t$3.geom.MultiPoint.prototype.appendPoint=function(e){this.flatCoordinates?t$3.array.extend(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.changed()},t$3.geom.MultiPoint.prototype.clone=function(){var e=new t$3.geom.MultiPoint(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice()),e},t$3.geom.MultiPoint.prototype.closestPointXY=function(e,t,i,n){if(n<t$3.extent.closestSquaredDistanceXY(this.getExtent(),e,t))return n;var r,o,a,s=this.flatCoordinates,l=this.stride;for(r=0,o=s.length;r<o;r+=l){var u=t$3.math.squaredDistance(e,t,s[r],s[r+1]);if(u<n){for(n=u,a=0;a<l;++a)i[a]=s[r+a];i.length=l}}return n},t$3.geom.MultiPoint.prototype.getCoordinates=function(){return t$3.geom.flat.inflate.coordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},t$3.geom.MultiPoint.prototype.getPoint=function(e){var t=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;if(e<0||t<=e)return null;var i=new t$3.geom.Point(null);return i.setFlatCoordinates(this.layout,this.flatCoordinates.slice(e*this.stride,(e+1)*this.stride)),i},t$3.geom.MultiPoint.prototype.getPoints=function(){var e,t,i=this.flatCoordinates,n=this.layout,r=this.stride,o=[];for(e=0,t=i.length;e<t;e+=r){var a=new t$3.geom.Point(null);a.setFlatCoordinates(n,i.slice(e,e+r)),o.push(a)}return o},t$3.geom.MultiPoint.prototype.getType=function(){return t$3.geom.GeometryType.MULTI_POINT},t$3.geom.MultiPoint.prototype.intersectsExtent=function(e){var t,i,n,r,o=this.flatCoordinates,a=this.stride;for(t=0,i=o.length;t<i;t+=a)if(n=o[t],r=o[t+1],t$3.extent.containsXY(e,n,r))return!0;return!1},t$3.geom.MultiPoint.prototype.setCoordinates=function(e,t){e?(this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=t$3.geom.flat.deflate.coordinates(this.flatCoordinates,0,e,this.stride),this.changed()):this.setFlatCoordinates(t$3.geom.GeometryLayout.XY,null)},t$3.geom.MultiPoint.prototype.setFlatCoordinates=function(e,t){this.setFlatCoordinatesInternal(e,t),this.changed()},t$3.geom.flat.center.linearRingss={},t$3.geom.flat.center.linearRingss=function(e,t,i,n){var r,o,a=[],s=t$3.extent.createEmpty();for(r=0,o=i.length;r<o;++r){var l=i[r];s=t$3.extent.createOrUpdateFromFlatCoordinates(e,t,l[0],n),a.push((s[0]+s[2])/2,(s[1]+s[3])/2),t=l[l.length-1]}return a},t$3.geom.MultiPolygon=function(e,t){t$3.geom.SimpleGeometry.call(this),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,this.setCoordinates(e,t)},t$3.inherits(t$3.geom.MultiPolygon,t$3.geom.SimpleGeometry),t$3.geom.MultiPolygon.prototype.appendPolygon=function(e){var t;if(this.flatCoordinates){var i,n,r=this.flatCoordinates.length;for(t$3.array.extend(this.flatCoordinates,e.getFlatCoordinates()),i=0,n=(t=e.getEnds().slice()).length;i<n;++i)t[i]+=r}else this.flatCoordinates=e.getFlatCoordinates().slice(),t=e.getEnds().slice(),this.endss_.push();this.endss_.push(t),this.changed()},t$3.geom.MultiPolygon.prototype.clone=function(){for(var e=new t$3.geom.MultiPolygon(null),t=this.endss_.length,i=new Array(t),n=0;n<t;++n)i[n]=this.endss_[n].slice();return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice(),i),e},t$3.geom.MultiPolygon.prototype.closestPointXY=function(e,t,i,n){return n<t$3.extent.closestSquaredDistanceXY(this.getExtent(),e,t)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(t$3.geom.flat.closest.getssMaxSquaredDelta(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),t$3.geom.flat.closest.getssClosestPoint(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,e,t,i,n))},t$3.geom.MultiPolygon.prototype.containsXY=function(e,t){return t$3.geom.flat.contains.linearRingssContainsXY(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e,t)},t$3.geom.MultiPolygon.prototype.getArea=function(){return t$3.geom.flat.area.linearRingss(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},t$3.geom.MultiPolygon.prototype.getCoordinates=function(e){var t;return void 0!==e?(t=this.getOrientedFlatCoordinates().slice(),t$3.geom.flat.orient.orientLinearRingss(t,0,this.endss_,this.stride,e)):t=this.flatCoordinates,t$3.geom.flat.inflate.coordinatesss(t,0,this.endss_,this.stride)},t$3.geom.MultiPolygon.prototype.getEndss=function(){return this.endss_},t$3.geom.MultiPolygon.prototype.getFlatInteriorPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var e=t$3.geom.flat.center.linearRingss(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=t$3.geom.flat.interiorpoint.linearRingss(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},t$3.geom.MultiPolygon.prototype.getInteriorPoints=function(){var e=new t$3.geom.MultiPoint(null);return e.setFlatCoordinates(t$3.geom.GeometryLayout.XYM,this.getFlatInteriorPoints().slice()),e},t$3.geom.MultiPolygon.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var e=this.flatCoordinates;t$3.geom.flat.orient.linearRingssAreOriented(e,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=t$3.geom.flat.orient.orientLinearRingss(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},t$3.geom.MultiPolygon.prototype.getSimplifiedGeometryInternal=function(e){var t=[],i=[];t.length=t$3.geom.flat.simplify.quantizess(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(e),t,0,i);var n=new t$3.geom.MultiPolygon(null);return n.setFlatCoordinates(t$3.geom.GeometryLayout.XY,t,i),n},t$3.geom.MultiPolygon.prototype.getPolygon=function(e){if(e<0||this.endss_.length<=e)return null;var t;if(0===e)t=0;else{var i=this.endss_[e-1];t=i[i.length-1]}var n,r,o=this.endss_[e].slice(),a=o[o.length-1];if(0!==t)for(n=0,r=o.length;n<r;++n)o[n]-=t;var s=new t$3.geom.Polygon(null);return s.setFlatCoordinates(this.layout,this.flatCoordinates.slice(t,a),o),s},t$3.geom.MultiPolygon.prototype.getPolygons=function(){var e,t,i,n,r=this.layout,o=this.flatCoordinates,a=this.endss_,s=[],l=0;for(e=0,t=a.length;e<t;++e){var u=a[e].slice(),c=u[u.length-1];if(0!==l)for(i=0,n=u.length;i<n;++i)u[i]-=l;var h=new t$3.geom.Polygon(null);h.setFlatCoordinates(r,o.slice(l,c),u),s.push(h),l=c}return s},t$3.geom.MultiPolygon.prototype.getType=function(){return t$3.geom.GeometryType.MULTI_POLYGON},t$3.geom.MultiPolygon.prototype.intersectsExtent=function(e){return t$3.geom.flat.intersectsextent.linearRingss(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e)},t$3.geom.MultiPolygon.prototype.setCoordinates=function(e,t){if(e){this.setLayout(t,e,3),this.flatCoordinates||(this.flatCoordinates=[]);var i=t$3.geom.flat.deflate.coordinatesss(this.flatCoordinates,0,e,this.stride,this.endss_);if(0===i.length)this.flatCoordinates.length=0;else{var n=i[i.length-1];this.flatCoordinates.length=0===n.length?0:n[n.length-1]}this.changed()}else this.setFlatCoordinates(t$3.geom.GeometryLayout.XY,null,this.endss_)},t$3.geom.MultiPolygon.prototype.setFlatCoordinates=function(e,t,i){this.setFlatCoordinatesInternal(e,t),this.endss_=i,this.changed()},t$3.geom.MultiPolygon.prototype.setPolygons=function(e){var t,i,n,r=this.getLayout(),o=[],a=[];for(t=0,i=e.length;t<i;++t){var s=e[t];0===t&&(r=s.getLayout());var l,u,c=o.length;for(l=0,u=(n=s.getEnds()).length;l<u;++l)n[l]+=c;t$3.array.extend(o,s.getFlatCoordinates()),a.push(n)}this.setFlatCoordinates(r,o,a)},t$3.Feature=function(e){if(t$3.Object.call(this),this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,void 0!==e)if(e instanceof t$3.geom.Geometry||!e){var t=e;this.setGeometry(t)}else{var i=e;this.setProperties(i)}},t$3.inherits(t$3.Feature,t$3.Object),t$3.Feature.prototype.clone=function(){var e=new t$3.Feature(this.getProperties());e.setGeometryName(this.getGeometryName());var t=this.getGeometry();t&&e.setGeometry(t.clone());var i=this.getStyle();return i&&e.setStyle(i),e},t$3.Feature.prototype.getGeometry=function(){return this.get(this.geometryName_)},t$3.Feature.prototype.getId=function(){return this.id_},t$3.Feature.prototype.getGeometryName=function(){return this.geometryName_},t$3.Feature.prototype.getStyle=function(){return this.style_},t$3.Feature.prototype.getStyleFunction=function(){return this.styleFunction_},t$3.Feature.prototype.handleGeometryChange_=function(){this.changed()},t$3.Feature.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&(t$3.events.unlistenByKey(this.geometryChangeKey_),this.geometryChangeKey_=null);var e=this.getGeometry();e&&(this.geometryChangeKey_=t$3.events.listen(e,t$3.events.EventType.CHANGE,this.handleGeometryChange_,this)),this.changed()},t$3.Feature.prototype.setGeometry=function(e){this.set(this.geometryName_,e)},t$3.Feature.prototype.setStyle=function(e){this.style_=e,this.styleFunction_=e?t$3.Feature.createStyleFunction(e):void 0,this.changed()},t$3.Feature.prototype.setId=function(e){this.id_=e,this.changed()},t$3.Feature.prototype.setGeometryName=function(e){t$3.events.unlisten(this,t$3.Object.getChangeEventType(this.geometryName_),this.handleGeometryChanged_,this),this.geometryName_=e,t$3.events.listen(this,t$3.Object.getChangeEventType(this.geometryName_),this.handleGeometryChanged_,this),this.handleGeometryChanged_()},t$3.Feature.createStyleFunction=function(e){var t,i;"function"==typeof e?t=2==e.length?function(t){return e(this,t)}:e:(Array.isArray(e)?i=e:(t$3.asserts.assert(e instanceof t$3.style.Style,41),i=[e]),t=function(){return i});return t},t$3.format={},t$3.format.Feature=function(){this.defaultDataProjection=null,this.defaultFeatureProjection=null},t$3.format.Feature.prototype.getReadOptions=function(e,t){var i;return t&&(i={dataProjection:t.dataProjection?t.dataProjection:this.readProjection(e),featureProjection:t.featureProjection}),this.adaptOptions(i)},t$3.format.Feature.prototype.adaptOptions=function(e){return t$3.obj.assign({dataProjection:this.defaultDataProjection,featureProjection:this.defaultFeatureProjection},e)},t$3.format.Feature.prototype.getLastExtent=function(){return null},t$3.format.Feature.prototype.getType=function(){},t$3.format.Feature.prototype.readFeature=function(e,t){},t$3.format.Feature.prototype.readFeatures=function(e,t){},t$3.format.Feature.prototype.readGeometry=function(e,t){},t$3.format.Feature.prototype.readProjection=function(e){},t$3.format.Feature.prototype.writeFeature=function(e,t){},t$3.format.Feature.prototype.writeFeatures=function(e,t){},t$3.format.Feature.prototype.writeGeometry=function(e,t){},t$3.format.Feature.transformWithOptions=function(e,t,i){var n;if(n=e,t&&i&&void 0!==i.decimals){var r=Math.pow(10,i.decimals);n===e&&(n=n.clone()),n.applyTransform((function(e){for(var t=0,i=e.length;t<i;++t)e[t]=Math.round(e[t]*r)/r;return e}))}return n},t$3.format.MVT=function(e){t$3.format.Feature.call(this);var t=e||{};this.featureClass_=t.featureClass?t.featureClass:t$3.render.Feature,this.geometryName_=t.geometryName,this.layerName_=t.layerName?t.layerName:"layer",this.layers_=t.layers?t.layers:null,this.extent_=null},t$3.inherits(t$3.format.MVT,t$3.format.Feature),t$3.format.MVT.pbfReaders_={layers:function(e,t,i){if(3===e){var n={keys:[],values:[],features:[]},r=i.readVarint()+i.pos;i.readFields(t$3.format.MVT.pbfReaders_.layer,n,r),n.length=n.features.length,n.length&&(t[n.name]=n)}},layer:function(e,t,i){if(15===e)t.version=i.readVarint();else if(1===e)t.name=i.readString();else if(5===e)t.extent=i.readVarint();else if(2===e)t.features.push(i.pos);else if(3===e)t.keys.push(i.readString());else if(4===e){for(var n=null,r=i.readVarint()+i.pos;i.pos<r;)n=1===(e=i.readVarint()>>3)?i.readString():2===e?i.readFloat():3===e?i.readDouble():4===e?i.readVarint64():5===e?i.readVarint():6===e?i.readSVarint():7===e?i.readBoolean():null;t.values.push(n)}},feature:function(e,t,i){if(1==e)t.id=i.readVarint();else if(2==e)for(var n=i.readVarint()+i.pos;i.pos<n;){var r=t.layer.keys[i.readVarint()],o=t.layer.values[i.readVarint()];t.properties[r]=o}else 3==e?t.type=i.readVarint():4==e&&(t.geometry=i.pos)}},t$3.format.MVT.readRawFeature_=function(e,t,i){e.pos=t.features[i];var n=e.readVarint()+e.pos,r={layer:t,type:0,properties:{}};return e.readFields(t$3.format.MVT.pbfReaders_.feature,r,n),r},t$3.format.MVT.readRawGeometry_=function(e,t,i,n){e.pos=t.geometry;for(var r=e.readVarint()+e.pos,o=1,a=0,s=0,l=0,u=0,c=0;e.pos<r;){if(!a){var h=e.readVarint();o=7&h,a=h>>3}a--,1===o||2===o?(s+=e.readSVarint(),l+=e.readSVarint(),1===o&&u>c&&(n.push(u),c=u),i.push(s,l),u+=2):7===o?u>c&&(i.push(i[c],i[c+1]),u+=2):t$3.asserts.assert(!1,59)}u>c&&(n.push(u),c=u)},t$3.format.MVT.getGeometryType_=function(e,t){var i;return 1===e?i=1===t?t$3.geom.GeometryType.POINT:t$3.geom.GeometryType.MULTI_POINT:2===e?i=1===t?t$3.geom.GeometryType.LINE_STRING:t$3.geom.GeometryType.MULTI_LINE_STRING:3===e&&(i=t$3.geom.GeometryType.POLYGON),i},t$3.format.MVT.prototype.createFeature_=function(e,t,i){var n=t.type;if(0===n)return null;var r,o=t.id,a=t.properties;a[this.layerName_]=t.layer.name;var s=[],l=[];t$3.format.MVT.readRawGeometry_(e,t,s,l);var u,c=t$3.format.MVT.getGeometryType_(n,l.length);if(c==t$3.geom.GeometryType.POLYGON){for(var h=[],d=0,f=0,p=0,_=l.length;p<_;++p){var m=l[p];t$3.geom.flat.orient.linearRingIsClockwise(s,d,m,2)||(h.push(l.slice(f,p+1)),f=p+1),d=m}h.length>1?(l=h,u=new t$3.geom.MultiPolygon(null)):u=new t$3.geom.Polygon(null)}else u=c===t$3.geom.GeometryType.POINT?new t$3.geom.Point(null):c===t$3.geom.GeometryType.LINE_STRING?new t$3.geom.LineString(null):c===t$3.geom.GeometryType.POLYGON?new t$3.geom.Polygon(null):c===t$3.geom.GeometryType.MULTI_POINT?new t$3.geom.MultiPoint(null):c===t$3.geom.GeometryType.MULTI_LINE_STRING?new t$3.geom.MultiLineString(null):null;u.setFlatCoordinates(t$3.geom.GeometryLayout.XY,s,l),r=new this.featureClass_,this.geometryName_&&r.setGeometryName(this.geometryName_);var $=t$3.format.Feature.transformWithOptions(u,!1,this.adaptOptions(i));return r.setGeometry($),r.setId(o),r.setProperties(a),r},t$3.format.MVT.prototype.readFeatures=function(e,t){var i,n=this.layers_,r=new h$12(e),o=r.readFields(t$3.format.MVT.pbfReaders_.layers,{}),a=[];for(var s in o)if(!n||-1!=n.indexOf(s)){if(void 0!==t){var l=t.needSourceLayerNames;if(void 0!==l&&void 0===l[s])continue}for(var u,c=0,h=(i=o[s]).length;c<h;++c)u=t$3.format.MVT.readRawFeature_(r,i,c),a.push(this.createFeature_(r,u));this.extent_=i?[0,0,i.extent,i.extent]:null}return a},t$3.style={},t$3.style.IconImageCache=function(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32},t$3.style.IconImageCache.getKey=function(e,t,i){return t+":"+e+":"+(i?t$3.color.asString(i):"null")},t$3.style.IconImageCache.prototype.clear=function(){this.cache_={},this.cacheSize_=0},t$3.style.IconImageCache.prototype.expire=function(){if(this.cacheSize_>this.maxCacheSize_){var e,t,i=0;for(e in this.cache_)t=this.cache_[e],0==(3&i++)&&!t.hasListener()&&(delete this.cache_[e],--this.cacheSize_)}},t$3.style.IconImageCache.prototype.get=function(e,t,i){var n=t$3.style.IconImageCache.getKey(e,t,i);return n in this.cache_?this.cache_[n]:null},t$3.style.IconImageCache.prototype.set=function(e,t,i,n){var r=t$3.style.IconImageCache.getKey(e,t,i);this.cache_[r]=n,++this.cacheSize_},t$3.style.IconImageCache.prototype.setSize=function(e){this.maxCacheSize_=e,this.expire()},t$3.style.iconImageCache=new t$3.style.IconImageCache,t$3.style.Image=function(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.snapToPixel_=e.snapToPixel},t$3.style.Image.prototype.getOpacity=function(){return this.opacity_},t$3.style.Image.prototype.getRotateWithView=function(){return this.rotateWithView_},t$3.style.Image.prototype.getRotation=function(){return this.rotation_},t$3.style.Image.prototype.getScale=function(){return this.scale_},t$3.style.Image.prototype.getSnapToPixel=function(){return this.snapToPixel_},t$3.style.Image.prototype.getAnchor=function(){},t$3.style.Image.prototype.getImage=function(e){},t$3.style.Image.prototype.getHitDetectionImage=function(e){},t$3.style.Image.prototype.getImageState=function(){},t$3.style.Image.prototype.getImageSize=function(){},t$3.style.Image.prototype.getHitDetectionImageSize=function(){},t$3.style.Image.prototype.getOrigin=function(){},t$3.style.Image.prototype.getSize=function(){},t$3.style.Image.prototype.setOpacity=function(e){this.opacity_=e},t$3.style.Image.prototype.setRotateWithView=function(e){this.rotateWithView_=e},t$3.style.Image.prototype.setRotation=function(e){this.rotation_=e},t$3.style.Image.prototype.setScale=function(e){this.scale_=e},t$3.style.Image.prototype.setSnapToPixel=function(e){this.snapToPixel_=e},t$3.style.Image.prototype.listenImageChange=function(e,t){},t$3.style.Image.prototype.load=function(){},t$3.style.Image.prototype.unlistenImageChange=function(e,t){},t$3.style.RegularShape=function(e){this.checksums_=null,this.canvas_=null,this.hitDetectionCanvas_=null,this.fill_=void 0!==e.fill?e.fill:null,this.origin_=[0,0],this.points_=e.points,this.radius_=void 0!==e.radius?e.radius:e.radius1,this.radius2_=e.radius2,this.angle_=void 0!==e.angle?e.angle:0,this.stroke_=void 0!==e.stroke?e.stroke:null,this.anchor_=null,this.size_=null,this.imageSize_=null,this.hitDetectionImageSize_=null,this.atlasManager_=e.atlasManager,this.render_(this.atlasManager_);var t=void 0===e.snapToPixel||e.snapToPixel,i=void 0!==e.rotateWithView&&e.rotateWithView;t$3.style.Image.call(this,{opacity:1,rotateWithView:i,rotation:void 0!==e.rotation?e.rotation:0,scale:1,snapToPixel:t})},t$3.inherits(t$3.style.RegularShape,t$3.style.Image),t$3.style.RegularShape.prototype.clone=function(){var e=new t$3.style.RegularShape({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),snapToPixel:this.getSnapToPixel(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),atlasManager:this.atlasManager_});return e.setOpacity(this.getOpacity()),e.setScale(this.getScale()),e},t$3.style.RegularShape.prototype.getAnchor=function(){return this.anchor_},t$3.style.RegularShape.prototype.getAngle=function(){return this.angle_},t$3.style.RegularShape.prototype.getFill=function(){return this.fill_},t$3.style.RegularShape.prototype.getHitDetectionImage=function(e){return this.hitDetectionCanvas_},t$3.style.RegularShape.prototype.getImage=function(e){return this.canvas_},t$3.style.RegularShape.prototype.getImageSize=function(){return this.imageSize_},t$3.style.RegularShape.prototype.getHitDetectionImageSize=function(){return this.hitDetectionImageSize_},t$3.style.RegularShape.prototype.getImageState=function(){return t$3.ImageState.LOADED},t$3.style.RegularShape.prototype.getOrigin=function(){return this.origin_},t$3.style.RegularShape.prototype.getPoints=function(){return this.points_},t$3.style.RegularShape.prototype.getRadius=function(){return this.radius_},t$3.style.RegularShape.prototype.getRadius2=function(){return this.radius2_},t$3.style.RegularShape.prototype.getSize=function(){return this.size_},t$3.style.RegularShape.prototype.getStroke=function(){return this.stroke_},t$3.style.RegularShape.prototype.listenImageChange=function(e,t){},t$3.style.RegularShape.prototype.load=function(){},t$3.style.RegularShape.prototype.unlistenImageChange=function(e,t){},t$3.style.RegularShape.prototype.render_=function(e){var t,i,n="",r="",o=0,a=null,s=0,l=0;this.stroke_&&(null===(i=this.stroke_.getColor())&&(i=t$3.render.canvas.defaultStrokeStyle),i=t$3.colorlike.asColorLike(i),void 0===(l=this.stroke_.getWidth())&&(l=t$3.render.canvas.defaultLineWidth),a=this.stroke_.getLineDash(),s=this.stroke_.getLineDashOffset(),t$3.has.CANVAS_LINE_DASH||(a=null,s=0),void 0===(r=this.stroke_.getLineJoin())&&(r=t$3.render.canvas.defaultLineJoin),void 0===(n=this.stroke_.getLineCap())&&(n=t$3.render.canvas.defaultLineCap),void 0===(o=this.stroke_.getMiterLimit())&&(o=t$3.render.canvas.defaultMiterLimit));var u=2*(this.radius_+l)+1,c={strokeStyle:i,strokeWidth:l,size:u,lineCap:n,lineDash:a,lineDashOffset:s,lineJoin:r,miterLimit:o};if(void 0===e){var h=t$3.dom.createCanvasContext2D(u,u);this.canvas_=h.canvas,t=u=this.canvas_.width,this.draw_(c,h,0,0),this.createHitDetectionCanvas_(c)}else{u=Math.round(u);var d,f=!this.fill_;f&&(d=this.drawHitDetectionCanvas_.bind(this,c));var p=this.getChecksum(),_=e.add(p,u,u,this.draw_.bind(this,c),d);this.canvas_=_.image,this.origin_=[_.offsetX,_.offsetY],t=_.image.width,f?(this.hitDetectionCanvas_=_.hitImage,this.hitDetectionImageSize_=[_.hitImage.width,_.hitImage.height]):(this.hitDetectionCanvas_=this.canvas_,this.hitDetectionImageSize_=[t,t])}this.anchor_=[u/2,u/2],this.size_=[u,u],this.imageSize_=[t,t]},t$3.style.RegularShape.prototype.draw_=function(e,t,i,n){var r,o,a;t.setTransform(1,0,0,1,0,0),t.translate(i,n),t.beginPath();var s=this.points_;if(s===1/0)t.arc(e.size/2,e.size/2,this.radius_,0,2*Math.PI,!0);else{var l=void 0!==this.radius2_?this.radius2_:this.radius_;for(l!==this.radius_&&(s*=2),r=0;r<=s;r++)o=2*r*Math.PI/s-Math.PI/2+this.angle_,a=r%2==0?this.radius_:l,t.lineTo(e.size/2+a*Math.cos(o),e.size/2+a*Math.sin(o))}if(this.fill_){var u=this.fill_.getColor();null===u&&(u=t$3.render.canvas.defaultFillStyle),t.fillStyle=t$3.colorlike.asColorLike(u),t.fill()}this.stroke_&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.miterLimit=e.miterLimit,t.stroke()),t.closePath()},t$3.style.RegularShape.prototype.createHitDetectionCanvas_=function(e){if(this.hitDetectionImageSize_=[e.size,e.size],this.fill_)this.hitDetectionCanvas_=this.canvas_;else{var t=t$3.dom.createCanvasContext2D(e.size,e.size);this.hitDetectionCanvas_=t.canvas,this.drawHitDetectionCanvas_(e,t,0,0)}},t$3.style.RegularShape.prototype.drawHitDetectionCanvas_=function(e,t,i,n){t.setTransform(1,0,0,1,0,0),t.translate(i,n),t.beginPath();var r=this.points_;if(r===1/0)t.arc(e.size/2,e.size/2,this.radius_,0,2*Math.PI,!0);else{var o,a,s,l=void 0!==this.radius2_?this.radius2_:this.radius_;for(l!==this.radius_&&(r*=2),o=0;o<=r;o++)s=2*o*Math.PI/r-Math.PI/2+this.angle_,a=o%2==0?this.radius_:l,t.lineTo(e.size/2+a*Math.cos(s),e.size/2+a*Math.sin(s))}t.fillStyle=t$3.render.canvas.defaultFillStyle,t.fill(),this.stroke_&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.stroke()),t.closePath()},t$3.style.RegularShape.prototype.getChecksum=function(){var e=this.stroke_?this.stroke_.getChecksum():"-",t=this.fill_?this.fill_.getChecksum():"-";if(!this.checksums_||e!=this.checksums_[1]||t!=this.checksums_[2]||this.radius_!=this.checksums_[3]||this.radius2_!=this.checksums_[4]||this.angle_!=this.checksums_[5]||this.points_!=this.checksums_[6]){var i="r"+e+t+(void 0!==this.radius_?this.radius_.toString():"-")+(void 0!==this.radius2_?this.radius2_.toString():"-")+(void 0!==this.angle_?this.angle_.toString():"-")+(void 0!==this.points_?this.points_.toString():"-");this.checksums_=[i,e,t,this.radius_,this.radius2_,this.angle_,this.points_]}return this.checksums_[0]},t$3.style.Circle=function(e){var t=e||{};t$3.style.RegularShape.call(this,{points:1/0,fill:t.fill,radius:t.radius,snapToPixel:t.snapToPixel,stroke:t.stroke,atlasManager:t.atlasManager})},t$3.inherits(t$3.style.Circle,t$3.style.RegularShape),t$3.style.Circle.prototype.clone=function(){var e=new t$3.style.Circle({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),snapToPixel:this.getSnapToPixel(),atlasManager:this.atlasManager_});return e.setOpacity(this.getOpacity()),e.setScale(this.getScale()),e},t$3.style.Circle.prototype.setRadius=function(e){this.radius_=e,this.render_(this.atlasManager_)},t$3.style.Fill=function(e){var t=e||{};this.color_=void 0!==t.color?t.color:null,this.checksum_=void 0},t$3.style.Fill.prototype.clone=function(){var e=this.getColor();return new t$3.style.Fill({color:e&&e.slice?e.slice():e||void 0})},t$3.style.Fill.prototype.getColor=function(){return this.color_},t$3.style.Fill.prototype.setColor=function(e){this.color_=e,this.checksum_=void 0},t$3.style.Fill.prototype.getChecksum=function(){return void 0===this.checksum_&&(this.color_ instanceof CanvasPattern||this.color_ instanceof CanvasGradient?this.checksum_=t$3.getUid(this.color_).toString():this.checksum_="f"+(this.color_?t$3.color.asString(this.color_):"-")),this.checksum_},t$3.style.Stroke=function(e){var t=e||{};this.color_=void 0!==t.color?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=void 0!==t.lineDash?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width,this.checksum_=void 0},t$3.style.Stroke.prototype.clone=function(){var e=this.getColor();return new t$3.style.Stroke({color:e&&e.slice?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},t$3.style.Stroke.prototype.getColor=function(){return this.color_},t$3.style.Stroke.prototype.getLineCap=function(){return this.lineCap_},t$3.style.Stroke.prototype.getLineDash=function(){return this.lineDash_},t$3.style.Stroke.prototype.getLineDashOffset=function(){return this.lineDashOffset_},t$3.style.Stroke.prototype.getLineJoin=function(){return this.lineJoin_},t$3.style.Stroke.prototype.getMiterLimit=function(){return this.miterLimit_},t$3.style.Stroke.prototype.getWidth=function(){return this.width_},t$3.style.Stroke.prototype.setColor=function(e){this.color_=e,this.checksum_=void 0},t$3.style.Stroke.prototype.setLineCap=function(e){this.lineCap_=e,this.checksum_=void 0},t$3.style.Stroke.prototype.setLineDash=function(e){this.lineDash_=e,this.checksum_=void 0},t$3.style.Stroke.prototype.setLineDashOffset=function(e){this.lineDashOffset_=e,this.checksum_=void 0},t$3.style.Stroke.prototype.setLineJoin=function(e){this.lineJoin_=e,this.checksum_=void 0},t$3.style.Stroke.prototype.setMiterLimit=function(e){this.miterLimit_=e,this.checksum_=void 0},t$3.style.Stroke.prototype.setWidth=function(e){this.width_=e,this.checksum_=void 0},t$3.style.Stroke.prototype.getChecksum=function(){return void 0===this.checksum_&&(this.checksum_="s",this.color_?"string"==typeof this.color_?this.checksum_+=this.color_:this.checksum_+=t$3.getUid(this.color_).toString():this.checksum_+="-",this.checksum_+=","+(void 0!==this.lineCap_?this.lineCap_.toString():"-")+","+(this.lineDash_?this.lineDash_.toString():"-")+","+(void 0!==this.lineDashOffset_?this.lineDashOffset_:"-")+","+(void 0!==this.lineJoin_?this.lineJoin_:"-")+","+(void 0!==this.miterLimit_?this.miterLimit_.toString():"-")+","+(void 0!==this.width_?this.width_.toString():"-")),this.checksum_},t$3.style.IconAnchorUnits={FRACTION:"fraction",PIXELS:"pixels"},t$3.style.IconImage=function(e,t,i,n,r,o){t$3.events.EventTarget.call(this),this.hitDetectionImage_=null,this.image_=e||new Image,null!==n&&(this.image_.crossOrigin=n),this.canvas_=o?document.createElement("CANVAS"):null,this.color_=o,this.imageListenerKeys_=null,this.imageState_=r,this.size_=i,this.src_=t,this.tainting_=!1,this.imageState_==t$3.ImageState.LOADED&&this.determineTainting_()},t$3.inherits(t$3.style.IconImage,t$3.events.EventTarget),t$3.style.IconImage.get=function(e,t,i,n,r,o){var a=t$3.style.iconImageCache,s=a.get(t,n,o);return s||(s=new t$3.style.IconImage(e,t,i,n,r,o),a.set(t,n,o,s)),s},t$3.style.IconImage.prototype.determineTainting_=function(){var e=t$3.dom.createCanvasContext2D(1,1);try{e.drawImage(this.image_,0,0),e.getImageData(0,0,1,1)}catch{this.tainting_=!0}},t$3.style.IconImage.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(t$3.events.EventType.CHANGE)},t$3.style.IconImage.prototype.handleImageError_=function(){this.imageState_=t$3.ImageState.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()},t$3.style.IconImage.prototype.handleImageLoad_=function(){this.imageState_=t$3.ImageState.LOADED,this.size_&&(this.image_.width=this.size_[0],this.image_.height=this.size_[1]),this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.determineTainting_(),this.replaceColor_(),this.dispatchChangeEvent_()},t$3.style.IconImage.prototype.getImage=function(e){return this.canvas_?this.canvas_:this.image_},t$3.style.IconImage.prototype.getImageState=function(){return this.imageState_},t$3.style.IconImage.prototype.getHitDetectionImage=function(e){if(!this.hitDetectionImage_)if(this.tainting_){var t=this.size_[0],i=this.size_[1],n=t$3.dom.createCanvasContext2D(t,i);n.fillRect(0,0,t,i),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},t$3.style.IconImage.prototype.getSize=function(){return this.size_},t$3.style.IconImage.prototype.getSrc=function(){return this.src_},t$3.style.IconImage.prototype.load=function(){if(this.imageState_==t$3.ImageState.IDLE){this.imageState_=t$3.ImageState.LOADING,this.imageListenerKeys_=[t$3.events.listenOnce(this.image_,t$3.events.EventType.ERROR,this.handleImageError_,this),t$3.events.listenOnce(this.image_,t$3.events.EventType.LOAD,this.handleImageLoad_,this)];try{this.image_.src=this.src_}catch{this.handleImageError_()}}},t$3.style.IconImage.prototype.replaceColor_=function(){if(!this.tainting_&&null!==this.color_){this.canvas_.width=this.image_.width,this.canvas_.height=this.image_.height;var e=this.canvas_.getContext("2d");e.drawImage(this.image_,0,0);for(var t=e.getImageData(0,0,this.image_.width,this.image_.height),i=t.data,n=this.color_[0]/255,r=this.color_[1]/255,o=this.color_[2]/255,a=0,s=i.length;a<s;a+=4)i[a]*=n,i[a+1]*=r,i[a+2]*=o;e.putImageData(t,0,0)}},t$3.style.IconImage.prototype.unlistenImage_=function(){this.imageListenerKeys_.forEach(t$3.events.unlistenByKey),this.imageListenerKeys_=null},t$3.style.IconOrigin={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},t$3.style.Icon=function(e){var t=e||{};this.anchor_=void 0!==t.anchor?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==t.anchorOrigin?t.anchorOrigin:t$3.style.IconOrigin.TOP_LEFT,this.anchorXUnits_=void 0!==t.anchorXUnits?t.anchorXUnits:t$3.style.IconAnchorUnits.FRACTION,this.anchorYUnits_=void 0!==t.anchorYUnits?t.anchorYUnits:t$3.style.IconAnchorUnits.FRACTION,this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null;var i=void 0!==t.img?t.img:null,n=void 0!==t.imgSize?t.imgSize:null,r=t.src;(void 0===r||0===r.length)&&i&&(r=i.src||t$3.getUid(i).toString());var o=void 0!==t.src?t$3.ImageState.IDLE:t$3.ImageState.LOADED;this.color_=void 0!==t.color?t$3.color.asArray(t.color):null,this.iconImage_=t$3.style.IconImage.get(i,r,n,this.crossOrigin_,o,this.color_),this.offset_=void 0!==t.offset?t.offset:[0,0],this.offsetOrigin_=void 0!==t.offsetOrigin?t.offsetOrigin:t$3.style.IconOrigin.TOP_LEFT,this.origin_=null,this.size_=void 0!==t.size?t.size:null;var a=void 0!==t.opacity?t.opacity:1,s=void 0!==t.rotateWithView&&t.rotateWithView,l=void 0!==t.rotation?t.rotation:0,u=void 0!==t.scale?t.scale:1,c=void 0===t.snapToPixel||t.snapToPixel;t$3.style.Image.call(this,{opacity:a,rotation:l,scale:u,snapToPixel:c,rotateWithView:s})},t$3.inherits(t$3.style.Icon,t$3.style.Image),t$3.style.Icon.prototype.clone=function(){return new t$3.style.Icon({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:null!==this.size_?this.size_.slice():void 0,opacity:this.getOpacity(),scale:this.getScale(),snapToPixel:this.getSnapToPixel(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},t$3.style.Icon.prototype.getAnchor=function(){if(this.normalizedAnchor_)return this.normalizedAnchor_;var e=this.anchor_,t=this.getSize();if(this.anchorXUnits_==t$3.style.IconAnchorUnits.FRACTION||this.anchorYUnits_==t$3.style.IconAnchorUnits.FRACTION){if(!t)return null;e=this.anchor_.slice(),this.anchorXUnits_==t$3.style.IconAnchorUnits.FRACTION&&(e[0]*=t[0]),this.anchorYUnits_==t$3.style.IconAnchorUnits.FRACTION&&(e[1]*=t[1])}if(this.anchorOrigin_!=t$3.style.IconOrigin.TOP_LEFT){if(!t)return null;e===this.anchor_&&(e=this.anchor_.slice()),(this.anchorOrigin_==t$3.style.IconOrigin.TOP_RIGHT||this.anchorOrigin_==t$3.style.IconOrigin.BOTTOM_RIGHT)&&(e[0]=-e[0]+t[0]),(this.anchorOrigin_==t$3.style.IconOrigin.BOTTOM_LEFT||this.anchorOrigin_==t$3.style.IconOrigin.BOTTOM_RIGHT)&&(e[1]=-e[1]+t[1])}return this.normalizedAnchor_=e,this.normalizedAnchor_},t$3.style.Icon.prototype.getColor=function(){return this.color_},t$3.style.Icon.prototype.getImage=function(e){return this.iconImage_.getImage(e)},t$3.style.Icon.prototype.getImageSize=function(){return this.iconImage_.getSize()},t$3.style.Icon.prototype.getHitDetectionImageSize=function(){return this.getImageSize()},t$3.style.Icon.prototype.getImageState=function(){return this.iconImage_.getImageState()},t$3.style.Icon.prototype.getHitDetectionImage=function(e){return this.iconImage_.getHitDetectionImage(e)},t$3.style.Icon.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var e=this.offset_;if(this.offsetOrigin_!=t$3.style.IconOrigin.TOP_LEFT){var t=this.getSize(),i=this.iconImage_.getSize();if(!t||!i)return null;e=e.slice(),(this.offsetOrigin_==t$3.style.IconOrigin.TOP_RIGHT||this.offsetOrigin_==t$3.style.IconOrigin.BOTTOM_RIGHT)&&(e[0]=i[0]-t[0]-e[0]),(this.offsetOrigin_==t$3.style.IconOrigin.BOTTOM_LEFT||this.offsetOrigin_==t$3.style.IconOrigin.BOTTOM_RIGHT)&&(e[1]=i[1]-t[1]-e[1])}return this.origin_=e,this.origin_},t$3.style.Icon.prototype.getSrc=function(){return this.iconImage_.getSrc()},t$3.style.Icon.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},t$3.style.Icon.prototype.listenImageChange=function(e,t){return t$3.events.listen(this.iconImage_,t$3.events.EventType.CHANGE,e,t)},t$3.style.Icon.prototype.load=function(){this.iconImage_.load()},t$3.style.Icon.prototype.unlistenImageChange=function(e,t){t$3.events.unlisten(this.iconImage_,t$3.events.EventType.CHANGE,e,t)},t$3.style.Text=function(e){var t=e||{};this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.text_=t.text,this.textAlign_=t.textAlign,this.textBaseline_=t.textBaseline,this.fill_=void 0!==t.fill?t.fill:new t$3.style.Fill({color:t$3.style.Text.DEFAULT_FILL_COLOR_}),this.maxAngle_=void 0!==t.maxAngle?t.maxAngle:Math.PI/4,this.placement_=void 0!==t.placement?t.placement:t$3.style.TextPlacement.POINT;var i=void 0===t.overflow?t.exceedLength:t.overflow;this.overflow_=void 0!==i&&i,this.stroke_=void 0!==t.stroke?t.stroke:null,this.offsetX_=void 0!==t.offsetX?t.offsetX:0,this.offsetY_=void 0!==t.offsetY?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=void 0===t.padding?null:t.padding},t$3.style.Text.DEFAULT_FILL_COLOR_="#333",t$3.style.Text.prototype.clone=function(){return new t$3.style.Text({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:this.getScale(),text:this.getText(),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY()})},t$3.style.Text.prototype.getOverflow=function(){return this.overflow_},t$3.style.Text.prototype.getFont=function(){return this.font_},t$3.style.Text.prototype.getMaxAngle=function(){return this.maxAngle_},t$3.style.Text.prototype.getPlacement=function(){return this.placement_},t$3.style.Text.prototype.getOffsetX=function(){return this.offsetX_},t$3.style.Text.prototype.getOffsetY=function(){return this.offsetY_},t$3.style.Text.prototype.getFill=function(){return this.fill_},t$3.style.Text.prototype.getRotateWithView=function(){return this.rotateWithView_},t$3.style.Text.prototype.getRotation=function(){return this.rotation_},t$3.style.Text.prototype.getScale=function(){return this.scale_},t$3.style.Text.prototype.getStroke=function(){return this.stroke_},t$3.style.Text.prototype.getText=function(){return this.text_},t$3.style.Text.prototype.getTextAlign=function(){return this.textAlign_},t$3.style.Text.prototype.getTextBaseline=function(){return this.textBaseline_},t$3.style.Text.prototype.getBackgroundFill=function(){return this.backgroundFill_},t$3.style.Text.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},t$3.style.Text.prototype.getPadding=function(){return this.padding_},t$3.style.Text.prototype.setOverflow=function(e){this.overflow_=e},t$3.style.Text.prototype.setFont=function(e){this.font_=e},t$3.style.Text.prototype.setMaxAngle=function(e){this.maxAngle_=e},t$3.style.Text.prototype.setOffsetX=function(e){this.offsetX_=e},t$3.style.Text.prototype.setOffsetY=function(e){this.offsetY_=e},t$3.style.Text.prototype.setPlacement=function(e){this.placement_=e},t$3.style.Text.prototype.setFill=function(e){this.fill_=e},t$3.style.Text.prototype.setRotation=function(e){this.rotation_=e},t$3.style.Text.prototype.setScale=function(e){this.scale_=e},t$3.style.Text.prototype.setStroke=function(e){this.stroke_=e},t$3.style.Text.prototype.setText=function(e){this.text_=e},t$3.style.Text.prototype.setTextAlign=function(e){this.textAlign_=e},t$3.style.Text.prototype.setTextBaseline=function(e){this.textBaseline_=e},t$3.style.Text.prototype.setBackgroundFill=function(e){this.backgroundFill_=e},t$3.style.Text.prototype.setBackgroundStroke=function(e){this.backgroundStroke_=e},t$3.style.Text.prototype.setPadding=function(e){this.padding_=e},t$3.style.Style=function(e){var t=e||{};this.geometry_=null,this.geometryFunction_=t$3.style.Style.defaultGeometryFunction,void 0!==t.geometry&&this.setGeometry(t.geometry),this.fill_=void 0!==t.fill?t.fill:null,this.image_=void 0!==t.image?t.image:null,this.renderer_=void 0!==t.renderer?t.renderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex},t$3.style.Style.prototype.clone=function(){var e=this.getGeometry();return e&&e.clone&&(e=e.clone()),new t$3.style.Style({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},t$3.style.Style.prototype.getRenderer=function(){return this.renderer_},t$3.style.Style.prototype.setRenderer=function(e){this.renderer_=e},t$3.style.Style.prototype.getGeometry=function(){return this.geometry_},t$3.style.Style.prototype.getGeometryFunction=function(){return this.geometryFunction_},t$3.style.Style.prototype.getFill=function(){return this.fill_},t$3.style.Style.prototype.setFill=function(e){this.fill_=e},t$3.style.Style.prototype.getImage=function(){return this.image_},t$3.style.Style.prototype.setImage=function(e){this.image_=e},t$3.style.Style.prototype.getStroke=function(){return this.stroke_},t$3.style.Style.prototype.setStroke=function(e){this.stroke_=e},t$3.style.Style.prototype.getText=function(){return this.text_},t$3.style.Style.prototype.setText=function(e){this.text_=e},t$3.style.Style.prototype.getZIndex=function(){return this.zIndex_},t$3.style.Style.prototype.setGeometry=function(e){"function"==typeof e?this.geometryFunction_=e:"string"==typeof e?this.geometryFunction_=function(t){return t.get(e)}:e?void 0!==e&&(this.geometryFunction_=function(){return e}):this.geometryFunction_=t$3.style.Style.defaultGeometryFunction,this.geometry_=e},t$3.style.Style.prototype.setZIndex=function(e){this.zIndex_=e},t$3.style.Style.createFunction=function(e){var t,i;"function"==typeof e?t=e:(Array.isArray(e)?i=e:(t$3.asserts.assert(e instanceof t$3.style.Style,41),i=[e]),t=function(){return i});return t},t$3.style.Style.default_=null,t$3.style.Style.defaultFunction=function(e,t){if(!t$3.style.Style.default_){var i=new t$3.style.Fill({color:"rgba(255,255,255,0.4)"}),n=new t$3.style.Stroke({color:"#3399CC",width:1.25});t$3.style.Style.default_=[new t$3.style.Style({image:new t$3.style.Circle({fill:i,stroke:n,radius:5}),fill:i,stroke:n})]}return t$3.style.Style.default_},t$3.style.Style.createDefaultEditing=function(){var e={},t=[255,255,255,1],i=[0,153,255,1];return e[t$3.geom.GeometryType.POLYGON]=[new t$3.style.Style({fill:new t$3.style.Fill({color:[255,255,255,.5]})})],e[t$3.geom.GeometryType.MULTI_POLYGON]=e[t$3.geom.GeometryType.POLYGON],e[t$3.geom.GeometryType.LINE_STRING]=[new t$3.style.Style({stroke:new t$3.style.Stroke({color:t,width:5})}),new t$3.style.Style({stroke:new t$3.style.Stroke({color:i,width:3})})],e[t$3.geom.GeometryType.MULTI_LINE_STRING]=e[t$3.geom.GeometryType.LINE_STRING],e[t$3.geom.GeometryType.CIRCLE]=e[t$3.geom.GeometryType.POLYGON].concat(e[t$3.geom.GeometryType.LINE_STRING]),e[t$3.geom.GeometryType.POINT]=[new t$3.style.Style({image:new t$3.style.Circle({radius:6,fill:new t$3.style.Fill({color:i}),stroke:new t$3.style.Stroke({color:t,width:1.5})}),zIndex:1/0})],e[t$3.geom.GeometryType.MULTI_POINT]=e[t$3.geom.GeometryType.POINT],e[t$3.geom.GeometryType.GEOMETRY_COLLECTION]=e[t$3.geom.GeometryType.POLYGON].concat(e[t$3.geom.GeometryType.LINE_STRING],e[t$3.geom.GeometryType.POINT]),e},t$3.style.Style.defaultGeometryFunction=function(e){return e.getGeometry()},t$3.ext={},t$3.ext.rbush=function(){},function(){!function(e){var t=n,i=n;function n(e,t,i,n,o){r(e,t,i||0,n||e.length-1,o||a)}function r(e,t,i,n,a){for(;n>i;){if(n-i>600){var s=n-i+1,l=t-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);r(e,t,Math.max(i,Math.floor(t-l*c/s+h)),Math.min(n,Math.floor(t+(s-l)*c/s+h)),a)}var d=e[t],f=i,p=n;for(o(e,i,t),a(e[n],d)>0&&o(e,i,n);f<p;){for(o(e,f,p),f++,p--;a(e[f],d)<0;)f++;for(;a(e[p],d)>0;)p--}0===a(e[i],d)?o(e,i,p):o(e,++p,n),p<=t&&(i=p+1),t<=p&&(n=p-1)}}function o(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function a(e,t){return e<t?-1:e>t?1:0}t.default=i;var s=l;function l(e,t){if(!(this instanceof l))return new l(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&this._initFormat(t),this.clear()}function u(e,t,i){if(!i)return t.indexOf(e);for(var n=0;n<t.length;n++)if(i(e,t[n]))return n;return-1}function c(e,t){h(e,0,e.children.length,t,e)}function h(e,t,i,n,r){r||(r=x(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o,a=t;a<i;a++)o=e.children[a],d(r,e.leaf?n(o):o);return r}function d(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function f(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function _(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function $(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){var i=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,r-i)*Math.max(0,o-n)}function y(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function v(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function b(e,i,n,r,o){for(var a,s=[i,n];s.length;)!((n=s.pop())-(i=s.pop())<=r)&&(a=i+Math.ceil((n-i)/r/2)*r,t(e,a,i,n,o),s.push(i,a,a,n))}l.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,i=[],n=this.toBBox;if(!v(e,t))return i;for(var r,o,a,s,l=[];t;){for(r=0,o=t.children.length;r<o;r++)a=t.children[r],v(e,s=t.leaf?n(a):a)&&(t.leaf?i.push(a):y(e,s)?this._all(a,i):l.push(a));t=l.pop()}return i},collides:function(e){var t=this.data,i=this.toBBox;if(!v(e,t))return!1;for(var n,r,o,a,s=[];t;){for(n=0,r=t.children.length;n<r;n++)if(o=t.children[n],v(e,a=t.leaf?i(o):o)){if(t.leaf||y(e,a))return!0;s.push(o)}t=s.pop()}return!1},load:function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}var n=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},insert:function(e){return e&&this._insert(e,this.data.height-1),this},clear:function(){return this.data=x([]),this},remove:function(e,t){if(!e)return this;for(var i,n,r,o,a=this.data,s=this.toBBox(e),l=[],c=[];a||l.length;){if(a||(a=l.pop(),n=l[l.length-1],i=c.pop(),o=!0),a.leaf&&-1!==(r=u(e,a.children,t)))return a.children.splice(r,1),l.push(a),this._condense(l),this;o||a.leaf||!y(a,s)?n?(i++,a=n.children[i],o=!1):a=null:(l.push(a),c.push(i),i=0,n=a,a=a.children[0])}return this},toBBox:function(e){return e},compareMinX:f,compareMinY:p,toJSON:function(){return this.data},fromJSON:function(e){return this.data=e,this},_all:function(e,t){for(var i=[];e;)e.leaf?t.push.apply(t,e.children):i.push.apply(i,e.children),e=i.pop();return t},_build:function(e,t,i,n){var r,o=i-t+1,a=this._maxEntries;if(o<=a)return c(r=x(e.slice(t,i+1)),this.toBBox),r;n||(n=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,n-1))),(r=x([])).leaf=!1,r.height=n;var s,l,u,h,d=Math.ceil(o/a),f=d*Math.ceil(Math.sqrt(a));for(b(e,t,i,f,this.compareMinX),s=t;s<=i;s+=f)for(b(e,s,u=Math.min(s+f-1,i),d,this.compareMinY),l=s;l<=u;l+=d)h=Math.min(l+d-1,u),r.children.push(this._build(e,l,h,n-1));return c(r,this.toBBox),r},_chooseSubtree:function(e,t,i,n){for(var r,o,a,s,l,u,c,h;n.push(t),!t.leaf&&n.length-1!==i;){for(c=h=1/0,r=0,o=t.children.length;r<o;r++)l=_(a=t.children[r]),(u=$(e,a)-l)<h?(h=u,c=l<c?l:c,s=a):u===h&&l<c&&(c=l,s=a);t=s||t.children[0]}return t},_insert:function(e,t,i){var n=this.toBBox,r=i?e:n(e),o=[],a=this._chooseSubtree(r,this.data,t,o);for(a.children.push(e),d(a,r);t>=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(r,o,t)},_split:function(e,t){var i=e[t],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);var o=this._chooseSplitIndex(i,r,n),a=x(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,c(i,this.toBBox),c(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(e,t){this.data=x([e,t]),this.data.height=e.height+1,this.data.leaf=!1,c(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,i){var n,r,o,a,s,l,u,c;for(l=u=1/0,n=t;n<=i-t;n++)a=g(r=h(e,0,n,this.toBBox),o=h(e,n,i,this.toBBox)),s=_(r)+_(o),a<l?(l=a,c=n,u=s<u?s:u):a===l&&s<u&&(u=s,c=n);return c},_chooseSplitAxis:function(e,t,i){var n=e.leaf?this.compareMinX:f,r=e.leaf?this.compareMinY:p;this._allDistMargin(e,t,i,n)<this._allDistMargin(e,t,i,r)&&e.children.sort(n)},_allDistMargin:function(e,t,i,n){e.children.sort(n);var r,o,a=this.toBBox,s=h(e,0,t,a),l=h(e,i-t,i,a),u=m(s)+m(l);for(r=t;r<i-t;r++)o=e.children[r],d(s,e.leaf?a(o):o),u+=m(s);for(r=i-t-1;r>=t;r--)o=e.children[r],d(l,e.leaf?a(o):o),u+=m(l);return u},_adjustParentBBoxes:function(e,t,i){for(var n=i;n>=0;n--)d(t[n],e)},_condense:function(e){for(var t,i=e.length-1;i>=0;i--)0===e[i].children.length?i>0?(t=e[i-1].children).splice(t.indexOf(e[i]),1):this.clear():c(e[i],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}},e.default=s}(this.rbush=this.rbush||{})}.call(t$3.ext),t$3.ext.rbush=t$3.ext.rbush.default,t$3.render={},t$3.render.VectorContext=function(){},t$3.render.VectorContext.prototype.drawCustom=function(e,t,i){},t$3.render.VectorContext.prototype.drawGeometry=function(e){},t$3.render.VectorContext.prototype.setStyle=function(e){},t$3.render.VectorContext.prototype.drawCircle=function(e,t){},t$3.render.VectorContext.prototype.drawFeature=function(e,t){},t$3.render.VectorContext.prototype.drawGeometryCollection=function(e,t){},t$3.render.VectorContext.prototype.drawLineString=function(e,t){},t$3.render.VectorContext.prototype.drawMultiLineString=function(e,t){},t$3.render.VectorContext.prototype.drawMultiPoint=function(e,t){},t$3.render.VectorContext.prototype.drawMultiPolygon=function(e,t){},t$3.render.VectorContext.prototype.drawPoint=function(e,t){},t$3.render.VectorContext.prototype.drawPolygon=function(e,t){},t$3.render.VectorContext.prototype.drawText=function(e,t){},t$3.render.VectorContext.prototype.setFillStrokeStyle=function(e,t){},t$3.render.VectorContext.prototype.setImageStyle=function(e,t){},t$3.render.VectorContext.prototype.setTextStyle=function(e,t){},t$3.render.ReplayGroup={},t$3.render.ReplayGroup=function(){},t$3.render.ReplayGroup.prototype.getReplay=function(e,t){},t$3.render.ReplayGroup.prototype.isEmpty=function(){},t$3.render.ReplayType={CIRCLE:"Circle",DEFAULT:"Default",IMAGE:"Image",LINE_STRING:"LineString",POLYGON:"Polygon",TEXT:"Text"},t$3.geom.flat.length={},t$3.geom.flat.length.lineString=function(e,t,i,n){var r,o=e[t],a=e[t+1],s=0;for(r=t+n;r<i;r+=n){var l=e[r],u=e[r+1];s+=Math.sqrt((l-o)*(l-o)+(u-a)*(u-a)),o=l,a=u}return s},t$3.geom.flat.length.linearRing=function(e,t,i,n){var r=t$3.geom.flat.length.lineString(e,t,i,n),o=e[i-n]-e[t],a=e[i-n+1]-e[t+1];return r+=Math.sqrt(o*o+a*a)},t$3.geom.flat.textpath={},t$3.geom.flat.textpath.lineString=function(e,t,i,n,r,o,a,s){for(var l,u,c,h=[],d=e[t]>e[i-n],f=r.length,p=e[t],_=e[t+1],m=e[t+=n],$=e[t+1],g=0,y=Math.sqrt(Math.pow(m-p,2)+Math.pow($-_,2)),v="",x=0,b=0;b<f;++b){u=d?f-b-1:b;var S=r.charAt(u),w=o(v=d?S+v:v+S)-x;x+=w;for(var C=a+w/2;t<i-n&&g+y<C;)p=m,_=$,m=e[t+=n],$=e[t+1],g+=y,y=Math.sqrt(Math.pow(m-p,2)+Math.pow($-_,2));var T=C-g,P=Math.atan2($-_,m-p);if(d&&(P+=P>0?-Math.PI:Math.PI),void 0!==c){var E=P-c;if(E+=E>Math.PI?-2*Math.PI:E<-Math.PI?2*Math.PI:0,Math.abs(E)>s)return null}var A=T/y,L=t$3.math.lerp(p,m,A),M=t$3.math.lerp(_,$,A);c==P?(d&&(l[0]=L,l[1]=M,l[2]=w/2),l[4]=v):(x=w,l=[L,M,w/2,P,v=S],d?h.unshift(l):h.push(l),c=P),a+=w}return h},t$3.structs.LRUCache=function(e){t$3.events.EventTarget.call(this),this.highWaterMark=void 0!==e?e:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t$3.inherits(t$3.structs.LRUCache,t$3.events.EventTarget),t$3.structs.LRUCache.prototype.canExpireCache=function(){return this.getCount()>this.highWaterMark},t$3.structs.LRUCache.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null,this.dispatchEvent(t$3.events.EventType.CLEAR)},t$3.structs.LRUCache.prototype.containsKey=function(e){return this.entries_.hasOwnProperty(e)},t$3.structs.LRUCache.prototype.forEach=function(e,t){for(var i=this.oldest_;i;)e.call(t,i.value_,i.key_,this),i=i.newer},t$3.structs.LRUCache.prototype.get=function(e){var t=this.entries_[e];return t$3.asserts.assert(void 0!==t,15),t===this.newest_||(t===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(t.newer.older=t.older,t.older.newer=t.newer),t.newer=null,t.older=this.newest_,this.newest_.newer=t,this.newest_=t),t.value_},t$3.structs.LRUCache.prototype.remove=function(e){var t=this.entries_[e];return t$3.asserts.assert(void 0!==t,15),t===this.newest_?(this.newest_=t.older,this.newest_&&(this.newest_.newer=null)):t===this.oldest_?(this.oldest_=t.newer,this.oldest_&&(this.oldest_.older=null)):(t.newer.older=t.older,t.older.newer=t.newer),delete this.entries_[e],--this.count_,t.value_},t$3.structs.LRUCache.prototype.getCount=function(){return this.count_},t$3.structs.LRUCache.prototype.getKeys=function(){var e,t=new Array(this.count_),i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.key_;return t},t$3.structs.LRUCache.prototype.getValues=function(){var e,t=new Array(this.count_),i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.value_;return t},t$3.structs.LRUCache.prototype.peekLast=function(){return this.oldest_.value_},t$3.structs.LRUCache.prototype.peekLastKey=function(){return this.oldest_.key_},t$3.structs.LRUCache.prototype.peekFirstKey=function(){return this.newest_.key_},t$3.structs.LRUCache.prototype.pop=function(){var e=this.oldest_;return delete this.entries_[e.key_],e.newer&&(e.newer.older=null),this.oldest_=e.newer,this.oldest_||(this.newest_=null),--this.count_,e.value_},t$3.structs.LRUCache.prototype.replace=function(e,t){this.get(e),this.entries_[e].value_=t},t$3.structs.LRUCache.prototype.set=function(e,t){t$3.asserts.assert(!(e in this.entries_),16);var i={key_:e,newer:null,older:this.newest_,value_:t};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[e]=i,++this.count_},t$3.structs.LRUCache.prototype.prune=function(){for(;this.canExpireCache();)this.pop()},t$3.render.canvas={},t$3.render.canvas.defaultFont="10px sans-serif",t$3.render.canvas.defaultFillStyle=[0,0,0,1],t$3.render.canvas.defaultLineCap="round",t$3.render.canvas.defaultLineDash=[],t$3.render.canvas.defaultLineDashOffset=0,t$3.render.canvas.defaultLineJoin="round",t$3.render.canvas.defaultMiterLimit=10,t$3.render.canvas.defaultStrokeStyle=[0,0,0,1],t$3.render.canvas.defaultTextAlign="center",t$3.render.canvas.defaultTextBaseline="middle",t$3.render.canvas.defaultPadding=[0,0,0,0],t$3.render.canvas.defaultLineWidth=1,t$3.render.canvas.labelCache=new t$3.structs.LRUCache,t$3.render.canvas.checkedFonts_={},t$3.render.canvas.measureContext_=null,t$3.render.canvas.textHeights_={},t$3.render.canvas.checkFont=function(){var e,t,i=t$3.render.canvas.checkedFonts_,n=t$3.render.canvas.labelCache,r="wmytzilWMYTZIL@#/&?$%10";function o(e){var i=t$3.render.canvas.getMeasureContext();i.font="32px monospace",t=i.measureText(r).width;var n=!0;"monospace"!=e&&(i.font="32px "+e+",monospace",n=i.measureText(r).width!=t);return n}function a(){var t=!0;for(var r in i)i[r]<60&&(o(r)?(i[r]=60,t$3.obj.clear(t$3.render.canvas.textHeights_),t$3.render.canvas.measureContext_=null,n.clear()):(++i[r],t=!1));t&&(window.clearInterval(e),e=void 0)}return function(t){var n=t$3.css.getFontFamilies(t);if(n)for(var r=0,s=n.length;r<s;++r){var l=n[r];l in i||(i[l]=60,o(l)||(i[l]=0,void 0===e&&(e=window.setInterval(a,32))))}}}(),t$3.render.canvas.getMeasureContext=function(){var e=t$3.render.canvas.measureContext_;return e||(e=t$3.render.canvas.measureContext_=t$3.dom.createCanvasContext2D(1,1)),e},t$3.render.canvas.measureTextHeight=function(){var e=t$3.render.canvas.textHeights_;return function(t){var i=e[t];return null==i&&(i=e[t]=19),i}}(),t$3.render.canvas.measureTextWidth=function(e,t){var i=t$3.render.canvas.getMeasureContext();return e!=i.font&&(i.font=e),i.measureText(t).width},t$3.render.canvas.rotateAtOffset=function(e,t,i,n){0!==t&&(e.translate(i,n),e.rotate(t),e.translate(-i,-n))},t$3.render.canvas.resetTransform_=t$3.transform.create(),t$3.render.canvas.drawImage=function(e,t,i,n,r,o,a,s,l,u,c){var h;1!=i&&(h=e.globalAlpha,e.globalAlpha=h*i),t&&e.setTransform.apply(e,t),e.drawImage(n,r,o,a,s,l,u,a*c,s*c),h&&(e.globalAlpha=h),t&&e.setTransform.apply(e,t$3.render.canvas.resetTransform_)},t$3.render.canvas.Instruction={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},t$3.render.replay={},t$3.render.replay.ORDER=[t$3.render.ReplayType.POLYGON,t$3.render.ReplayType.CIRCLE,t$3.render.ReplayType.LINE_STRING,t$3.render.ReplayType.IMAGE,t$3.render.ReplayType.TEXT,t$3.render.ReplayType.DEFAULT],t$3.render.replay.TEXT_ALIGN={},t$3.render.replay.TEXT_ALIGN.left=0,t$3.render.replay.TEXT_ALIGN.end=0,t$3.render.replay.TEXT_ALIGN.center=.5,t$3.render.replay.TEXT_ALIGN.right=1,t$3.render.replay.TEXT_ALIGN.start=1,t$3.render.replay.TEXT_ALIGN.top=0,t$3.render.replay.TEXT_ALIGN.middle=.5,t$3.render.replay.TEXT_ALIGN.hanging=.2,t$3.render.replay.TEXT_ALIGN.alphabetic=.8,t$3.render.replay.TEXT_ALIGN.ideographic=.8,t$3.render.replay.TEXT_ALIGN.bottom=1,t$3.render.canvas.Replay=function(e,t,i,n,r,o){t$3.render.VectorContext.call(this),this.declutterTree=o,this.tmpExtent_=t$3.extent.createEmpty(),this.tolerance=e,this.maxExtent=t,this.overlaps=r,this.pixelRatio=n,this.maxLineWidth=0,this.resolution=i,this.fillOrigin_,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.coordinateCache_={},this.renderedTransform_=t$3.transform.create(),this.hitDetectionInstructions=[],this.pixelCoordinates_=null,this.state={},this.viewRotation_=0,this.tmpLocalTransform_=t$3.transform.create(),this.resetTransform_=t$3.transform.create()},t$3.inherits(t$3.render.canvas.Replay,t$3.render.VectorContext),t$3.render.canvas.Replay.prototype.replayTextBackground_=function(e,t,i,n,r,o,a){e.beginPath(),e.moveTo.apply(e,t),e.lineTo.apply(e,i),e.lineTo.apply(e,n),e.lineTo.apply(e,r),e.lineTo.apply(e,t),o&&(this.fillOrigin_=o[2],this.fill_(e)),a&&(this.setStrokeStyle_(e,a),e.stroke())},t$3.render.canvas.Replay.prototype.replayImage_=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,$){var g=m||$,y=this.tmpLocalTransform_;t-=r*=d,i-=o*=d,f&&(t=Math.round(t),i=Math.round(i));var v,x,b,S,w=p+u>n.width?n.width-u:p,C=s+c>n.height?n.height-c:s,T=this.tmpExtent_,P=_[3]+w*d+_[1],E=_[0]+C*d+_[2],A=t-_[3],L=i-_[0];(g||0!==h)&&(v=[A,L],x=[A+P,L],b=[A+P,L+E],S=[A,L+E]);var M=null;if(0!==h){var I=t+r,O=i+o;M=t$3.transform.compose(y,I,O,1,1,h,-I,-O),t$3.extent.createOrUpdateEmpty(T),t$3.extent.extendCoordinate(T,t$3.transform.apply(y,v)),t$3.extent.extendCoordinate(T,t$3.transform.apply(y,x)),t$3.extent.extendCoordinate(T,t$3.transform.apply(y,b)),t$3.extent.extendCoordinate(T,t$3.transform.apply(y,S))}else t$3.extent.createOrUpdate(A,L,A+P,L+E,T);var D=e.canvas,R=T[0]<=D.width&&T[2]>=0&&T[1]<=D.height&&T[3]>=0;if(a){if(!R&&1==a[4])return;t$3.extent.extend(a,T);var N=R?[e,M?M.slice(0):null,l,n,u,c,w,C,t,i,d]:null;N&&g&&N.push(m,$,v,x,b,S),a.push(N)}else R&&(g&&this.replayTextBackground_(e,v,x,b,S,m,$),t$3.render.canvas.drawImage(e,M,l,n,u,c,w,C,t,i,d))},t$3.render.canvas.Replay.prototype.applyPixelRatio=function(e){var t=this.pixelRatio;return 1==t?e:e.map((function(e){return e*t}))},t$3.render.canvas.Replay.prototype.appendFlatCoordinates=function(e,t,i,n,r,o){var a=this.coordinates.length,s=this.getBufferedMaxExtent();o&&(t+=n);var l,u,c,h=[e[t],e[t+1]],d=[NaN,NaN],f=!0;for(l=t+n;l<i;l+=n)d[0]=e[l],d[1]=e[l+1],(c=t$3.extent.coordinateRelationship(s,d))!==u?(f&&(this.coordinates[a++]=h[0],this.coordinates[a++]=h[1]),this.coordinates[a++]=d[0],this.coordinates[a++]=d[1],f=!1):c===t$3.extent.Relationship.INTERSECTING?(this.coordinates[a++]=d[0],this.coordinates[a++]=d[1],f=!1):f=!0,h[0]=d[0],h[1]=d[1],u=c;return(r&&f||l===t+n)&&(this.coordinates[a++]=h[0],this.coordinates[a++]=h[1]),a},t$3.render.canvas.Replay.prototype.drawCustomCoordinates_=function(e,t,i,n,r){for(var o=0,a=i.length;o<a;++o){var s=i[o],l=this.appendFlatCoordinates(e,t,s,n,!1,!1);r.push(l),t=s}return t},t$3.render.canvas.Replay.prototype.drawCustom=function(e,t,i){this.beginGeometry(e,t);var n,r,o,a,s,l=e.getType(),u=e.getStride(),c=this.coordinates.length;if(l==t$3.geom.GeometryType.MULTI_POLYGON){n=(e=e).getOrientedFlatCoordinates(),a=[];var h=e.getEndss();s=0;for(var d=0,f=h.length;d<f;++d){var p=[];s=this.drawCustomCoordinates_(n,s,h[d],u,p),a.push(p)}this.instructions.push([t$3.render.canvas.Instruction.CUSTOM,c,a,e,i,t$3.geom.flat.inflate.coordinatesss])}else l==t$3.geom.GeometryType.POLYGON||l==t$3.geom.GeometryType.MULTI_LINE_STRING?(o=[],n=l==t$3.geom.GeometryType.POLYGON?e.getOrientedFlatCoordinates():e.getFlatCoordinates(),s=this.drawCustomCoordinates_(n,0,e.getEnds(),u,o),this.instructions.push([t$3.render.canvas.Instruction.CUSTOM,c,o,e,i,t$3.geom.flat.inflate.coordinatess])):l==t$3.geom.GeometryType.LINE_STRING||l==t$3.geom.GeometryType.MULTI_POINT?(n=e.getFlatCoordinates(),r=this.appendFlatCoordinates(n,0,n.length,u,!1,!1),this.instructions.push([t$3.render.canvas.Instruction.CUSTOM,c,r,e,i,t$3.geom.flat.inflate.coordinates])):l==t$3.geom.GeometryType.POINT&&(n=e.getFlatCoordinates(),this.coordinates.push(n[0],n[1]),r=this.coordinates.length,this.instructions.push([t$3.render.canvas.Instruction.CUSTOM,c,r,e,i]));this.endGeometry(e,t)},t$3.render.canvas.Replay.prototype.beginGeometry=function(e,t){this.beginGeometryInstruction1_=[t$3.render.canvas.Instruction.BEGIN_GEOMETRY,t,0],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[t$3.render.canvas.Instruction.BEGIN_GEOMETRY,t,0],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},t$3.render.canvas.Replay.prototype.fill_=function(e){if(this.fillOrigin_){var t=t$3.transform.apply(this.renderedTransform_,this.fillOrigin_.slice());e.translate(t[0],t[1]),e.rotate(this.viewRotation_)}e.fill(),this.fillOrigin_&&e.setTransform.apply(e,t$3.render.canvas.resetTransform_)},t$3.render.canvas.Replay.prototype.setStrokeStyle_=function(e,t){e.strokeStyle=t[1],e.lineWidth=t[2],e.lineCap=t[3],e.lineJoin=t[4],e.miterLimit=t[5],t$3.has.CANVAS_LINE_DASH&&(e.lineDashOffset=t[7],e.setLineDash(t[6]))},t$3.render.canvas.Replay.prototype.renderDeclutter_=function(e,t){if(e&&e.length>5){var i=e[4];if(1==i||i==e.length-5){var n={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3],value:t};if(!this.declutterTree.collides(n)){this.declutterTree.insert(n);for(var r=t$3.render.canvas.drawImage,o=5,a=e.length;o<a;++o){var s=e[o];s&&(s.length>11&&this.replayTextBackground_(s[0],s[13],s[14],s[15],s[16],s[11],s[12]),r.apply(void 0,s))}}e.length=5,t$3.extent.createOrUpdateEmpty(e)}}},t$3.render.canvas.Replay.prototype.replay_=function(e,t,i,n,r,o){var a;this.pixelCoordinates_&&t$3.array.equals(t,this.renderedTransform_)?a=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),a=t$3.geom.flat.transform.transform2D(this.coordinates,0,this.coordinates.length,2,t,this.pixelCoordinates_),t$3.transform.setFromArray(this.renderedTransform_,t));for(var s,l,u,c,h,d,f,p,_,m=!t$3.obj.isEmpty(i),$=0,g=n.length,y=0,v=0,x=0,b=null,S=null,w=this.coordinateCache_,C=this.viewRotation_,T={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:C},P=this.instructions!=n||this.overlaps?0:200;$<g;){var E,A,L,M=n[$];switch(M[0]){case t$3.render.canvas.Instruction.BEGIN_GEOMETRY:E=M[1],m&&i[t$3.getUid(E).toString()]||!E.getGeometry()?$=M[2]:void 0===o||t$3.extent.intersects(o,E.getGeometry().getExtent())?++$:$=M[2]+1;break;case t$3.render.canvas.Instruction.BEGIN_PATH:v>P&&(this.fill_(e),v=0),x>P&&(e.stroke(),x=0),!v&&!x&&(e.beginPath(),c=h=NaN),++$;break;case t$3.render.canvas.Instruction.CIRCLE:var I=a[y=M[1]],O=a[y+1],D=a[y+2]-I,R=a[y+3]-O,N=Math.sqrt(D*D+R*R);e.moveTo(I+N,O),e.arc(I,O,N,0,2*Math.PI,!0),++$;break;case t$3.render.canvas.Instruction.CLOSE_PATH:e.closePath(),++$;break;case t$3.render.canvas.Instruction.CUSTOM:y=M[1],s=M[2];var F=M[3],B=M[4],z=6==M.length?M[5]:void 0;T.geometry=F,T.feature=E,$ in w||(w[$]=[]);var G=w[$];z?z(a,y,s,2,G):(G[0]=a[y],G[1]=a[y+1],G.length=2),B(G,T),++$;break;case t$3.render.canvas.Instruction.DRAW_IMAGE:y=M[1],s=M[2],_=M[3],l=M[4],u=M[5],p=r?null:M[6];var k,U,V,W=M[7],H=M[8],Y=M[9],j=M[10],q=M[11],X=M[12],K=M[13],Z=M[14],J=M[15];for(M.length>16?(k=M[16],U=M[17],V=M[18]):(k=t$3.render.canvas.defaultPadding,U=V=!1),q&&(X+=C);y<s;y+=2)this.replayImage_(e,a[y],a[y+1],_,l,u,p,W,H,Y,j,X,K,Z,J,k,U?b:null,V?S:null);this.renderDeclutter_(p,E),++$;break;case t$3.render.canvas.Instruction.DRAW_CHARS:var Q=M[1],ee=M[2],te=M[3];p=r?null:M[4];var ie=M[5],ne=M[6],re=M[7],oe=M[8],ae=M[9],se=M[10],le=M[11],ue=M[12],ce=M[13],he=M[14],de=t$3.geom.flat.length.lineString(a,Q,ee,2),fe=oe(ue);if(ie||fe<=de){var pe=this.textStates[ce].textAlign,_e=(de-fe)*t$3.render.replay.TEXT_ALIGN[pe],me=t$3.geom.flat.textpath.lineString(a,Q,ee,2,ue,oe,_e,re);if(me){var $e,ge,ye,ve,xe;if(se)for($e=0,ge=me.length;$e<ge;++$e)ye=(xe=me[$e])[4],ve=this.getImage(ye,ce,"",se),l=xe[2]+le,u=te*ve.height+2*(.5-te)*le-ae,this.replayImage_(e,xe[0],xe[1],ve,l,u,p,ve.height,1,0,0,xe[3],he,!1,ve.width,t$3.render.canvas.defaultPadding,null,null);if(ne)for($e=0,ge=me.length;$e<ge;++$e)ye=(xe=me[$e])[4],ve=this.getImage(ye,ce,ne,""),l=xe[2],u=te*ve.height-ae,this.replayImage_(e,xe[0],xe[1],ve,l,u,p,ve.height,1,0,0,xe[3],he,!1,ve.width,t$3.render.canvas.defaultPadding,null,null)}}this.renderDeclutter_(p,E),++$;break;case t$3.render.canvas.Instruction.END_GEOMETRY:if(void 0!==r){var be=r(E=M[1]);if(be)return be}++$;break;case t$3.render.canvas.Instruction.FILL:P?v++:this.fill_(e),++$;break;case t$3.render.canvas.Instruction.MOVE_TO_LINE_TO:for(y=M[1],s=M[2],A=a[y],f=(L=a[y+1])+.5|0,((d=A+.5|0)!==c||f!==h)&&(e.moveTo(A,L),c=d,h=f),y+=2;y<s;y+=2)d=(A=a[y])+.5|0,f=(L=a[y+1])+.5|0,(y==s-2||d!==c||f!==h)&&(e.lineTo(A,L),c=d,h=f);++$;break;case t$3.render.canvas.Instruction.SET_FILL_STYLE:b=M,this.fillOrigin_=M[2],v&&(this.fill_(e),v=0,x&&(e.stroke(),x=0)),e.fillStyle=M[1],++$;break;case t$3.render.canvas.Instruction.SET_STROKE_STYLE:S=M,x&&(e.stroke(),x=0),this.setStrokeStyle_(e,M),++$;break;case t$3.render.canvas.Instruction.STROKE:P?x++:e.stroke(),++$;break;default:++$}}v&&this.fill_(e),x&&e.stroke()},t$3.render.canvas.Replay.prototype.replay=function(e,t,i,n){this.viewRotation_=i,this.replay_(e,t,n,this.instructions,void 0,void 0)},t$3.render.canvas.Replay.prototype.replayHitDetection=function(e,t,i,n,r,o){return this.viewRotation_=i,this.replay_(e,t,n,this.hitDetectionInstructions,r,o)},t$3.render.canvas.Replay.prototype.reverseHitDetectionInstructions=function(){var e=this.hitDetectionInstructions;e.reverse();var t,i,n,r=e.length,o=-1;for(t=0;t<r;++t)(n=(i=e[t])[0])==t$3.render.canvas.Instruction.END_GEOMETRY?o=t:n==t$3.render.canvas.Instruction.BEGIN_GEOMETRY&&(i[2]=t,t$3.array.reverseSubArray(this.hitDetectionInstructions,o,t),o=-1)},t$3.render.canvas.Replay.prototype.setFillStrokeStyle=function(e,t){var i=this.state;if(e){var n=e.getColor();i.fillStyle=t$3.colorlike.asColorLike(n||t$3.render.canvas.defaultFillStyle)}else i.fillStyle=void 0;if(t){var r=t.getColor();i.strokeStyle=t$3.colorlike.asColorLike(r||t$3.render.canvas.defaultStrokeStyle);var o=t.getLineCap();i.lineCap=void 0!==o?o:t$3.render.canvas.defaultLineCap;var a=t.getLineDash();i.lineDash=a?a.slice():t$3.render.canvas.defaultLineDash;var s=t.getLineDashOffset();i.lineDashOffset=s||t$3.render.canvas.defaultLineDashOffset;var l=t.getLineJoin();i.lineJoin=void 0!==l?l:t$3.render.canvas.defaultLineJoin;var u=t.getWidth();i.lineWidth=void 0!==u?u:t$3.render.canvas.defaultLineWidth;var c=t.getMiterLimit();i.miterLimit=void 0!==c?c:t$3.render.canvas.defaultMiterLimit,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0},t$3.render.canvas.Replay.prototype.applyFill=function(e,t){var i=e.fillStyle,n=[t$3.render.canvas.Instruction.SET_FILL_STYLE,i];if("string"!=typeof i){var r=t.getExtent();n.push([r[0],r[3]])}this.instructions.push(n)},t$3.render.canvas.Replay.prototype.applyStroke=function(e){this.instructions.push([t$3.render.canvas.Instruction.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth*this.pixelRatio,e.lineCap,e.lineJoin,e.miterLimit,this.applyPixelRatio(e.lineDash),e.lineDashOffset*this.pixelRatio])},t$3.render.canvas.Replay.prototype.updateFillStyle=function(e,t,i){var n=e.fillStyle;("string"!=typeof n||e.currentFillStyle!=n)&&(t.call(this,e,i),e.currentFillStyle=n)},t$3.render.canvas.Replay.prototype.updateStrokeStyle=function(e,t){var i=e.strokeStyle,n=e.lineCap,r=e.lineDash,o=e.lineDashOffset,a=e.lineJoin,s=e.lineWidth,l=e.miterLimit;(e.currentStrokeStyle!=i||e.currentLineCap!=n||r!=e.currentLineDash&&!t$3.array.equals(e.currentLineDash,r)||e.currentLineDashOffset!=o||e.currentLineJoin!=a||e.currentLineWidth!=s||e.currentMiterLimit!=l)&&(t.call(this,e),e.currentStrokeStyle=i,e.currentLineCap=n,e.currentLineDash=r,e.currentLineDashOffset=o,e.currentLineJoin=a,e.currentLineWidth=s,e.currentMiterLimit=l)},t$3.render.canvas.Replay.prototype.endGeometry=function(e,t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var i=[t$3.render.canvas.Instruction.END_GEOMETRY,t];this.instructions.push(i),this.hitDetectionInstructions.push(i)},t$3.render.canvas.Replay.prototype.finish=t$3.nullFunction,t$3.render.canvas.Replay.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=t$3.extent.clone(this.maxExtent),this.maxLineWidth>0)){var e=this.resolution*(this.maxLineWidth+1)/2;t$3.extent.buffer(this.bufferedMaxExtent_,e,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},t$3.render.canvas.ImageReplay=function(e,t,i,n,r,o){t$3.render.canvas.Replay.call(this,e,t,i,n,r,o),this.declutterGroup_=null,this.hitDetectionImage_=null,this.image_=null,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.snapToPixel_=void 0,this.width_=void 0},t$3.inherits(t$3.render.canvas.ImageReplay,t$3.render.canvas.Replay),t$3.render.canvas.ImageReplay.prototype.drawCoordinates_=function(e,t,i,n){return this.appendFlatCoordinates(e,t,i,n,!1,!1)},t$3.render.canvas.ImageReplay.prototype.drawPoint=function(e,t){if(this.image_){this.beginGeometry(e,t);var i=e.getFlatCoordinates(),n=e.getStride(),r=this.coordinates.length,o=this.drawCoordinates_(i,0,i.length,n);this.instructions.push([t$3.render.canvas.Instruction.DRAW_IMAGE,r,o,this.image_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.snapToPixel_,this.width_]),this.hitDetectionInstructions.push([t$3.render.canvas.Instruction.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.snapToPixel_,this.width_]),this.endGeometry(e,t)}},t$3.render.canvas.ImageReplay.prototype.drawMultiPoint=function(e,t){if(this.image_){this.beginGeometry(e,t);var i=e.getFlatCoordinates(),n=e.getStride(),r=this.coordinates.length,o=this.drawCoordinates_(i,0,i.length,n);this.instructions.push([t$3.render.canvas.Instruction.DRAW_IMAGE,r,o,this.image_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.snapToPixel_,this.width_]),this.hitDetectionInstructions.push([t$3.render.canvas.Instruction.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.snapToPixel_,this.width_]),this.endGeometry(e,t)}},t$3.render.canvas.ImageReplay.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.snapToPixel_=void 0,this.width_=void 0},t$3.render.canvas.ImageReplay.prototype.setImageStyle=function(e,t){var i=e.getAnchor(),n=e.getSize(),r=e.getHitDetectionImage(1),o=e.getImage(1),a=e.getOrigin();this.anchorX_=i[0],this.anchorY_=i[1],this.declutterGroup_=t,this.hitDetectionImage_=r,this.image_=o,this.height_=n[1],this.opacity_=e.getOpacity(),this.originX_=a[0],this.originY_=a[1],this.rotateWithView_=e.getRotateWithView(),this.rotation_=e.getRotation(),this.scale_=e.getScale(),this.snapToPixel_=e.getSnapToPixel(),this.width_=n[0]},t$3.render.canvas.LineStringReplay=function(e,t,i,n,r,o){t$3.render.canvas.Replay.call(this,e,t,i,n,r,o)},t$3.inherits(t$3.render.canvas.LineStringReplay,t$3.render.canvas.Replay),t$3.render.canvas.LineStringReplay.prototype.drawFlatCoordinates_=function(e,t,i,n){var r=this.coordinates.length,o=this.appendFlatCoordinates(e,t,i,n,!1,!1),a=[t$3.render.canvas.Instruction.MOVE_TO_LINE_TO,r,o];return this.instructions.push(a),this.hitDetectionInstructions.push(a),i},t$3.render.canvas.LineStringReplay.prototype.drawLineString=function(e,t){var i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0!==n&&void 0!==r){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(e,t),this.hitDetectionInstructions.push([t$3.render.canvas.Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],[t$3.render.canvas.Instruction.BEGIN_PATH]);var o=e.getFlatCoordinates(),a=e.getStride();this.drawFlatCoordinates_(o,0,o.length,a),this.hitDetectionInstructions.push([t$3.render.canvas.Instruction.STROKE]),this.endGeometry(e,t)}},t$3.render.canvas.LineStringReplay.prototype.drawMultiLineString=function(e,t){var i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0!==n&&void 0!==r){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(e,t),this.hitDetectionInstructions.push([t$3.render.canvas.Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],[t$3.render.canvas.Instruction.BEGIN_PATH]);var o,a,s=e.getEnds(),l=e.getFlatCoordinates(),u=e.getStride(),c=0;for(o=0,a=s.length;o<a;++o)c=this.drawFlatCoordinates_(l,c,s[o],u);this.hitDetectionInstructions.push([t$3.render.canvas.Instruction.STROKE]),this.endGeometry(e,t)}},t$3.render.canvas.LineStringReplay.prototype.finish=function(){var e=this.state;null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&this.instructions.push([t$3.render.canvas.Instruction.STROKE]),this.reverseHitDetectionInstructions(),this.state=null},t$3.render.canvas.LineStringReplay.prototype.applyStroke=function(e){null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push([t$3.render.canvas.Instruction.STROKE]),e.lastStroke=this.coordinates.length),e.lastStroke=0,t$3.render.canvas.Replay.prototype.applyStroke.call(this,e),this.instructions.push([t$3.render.canvas.Instruction.BEGIN_PATH])},t$3.render.canvas.PolygonReplay=function(e,t,i,n,r,o){t$3.render.canvas.Replay.call(this,e,t,i,n,r,o)},t$3.inherits(t$3.render.canvas.PolygonReplay,t$3.render.canvas.Replay),t$3.render.canvas.PolygonReplay.prototype.drawFlatCoordinatess_=function(e,t,i,n){var r=this.state,o=void 0!==r.fillStyle,a=null!=r.strokeStyle,s=i.length,l=[t$3.render.canvas.Instruction.BEGIN_PATH];this.instructions.push(l),this.hitDetectionInstructions.push(l);for(var u=0;u<s;++u){var c=i[u],h=this.coordinates.length,d=this.appendFlatCoordinates(e,t,c,n,!0,!a),f=[t$3.render.canvas.Instruction.MOVE_TO_LINE_TO,h,d];if(this.instructions.push(f),this.hitDetectionInstructions.push(f),a){var p=[t$3.render.canvas.Instruction.CLOSE_PATH];this.instructions.push(p),this.hitDetectionInstructions.push(p)}t=c}var _=[t$3.render.canvas.Instruction.FILL];if(this.hitDetectionInstructions.push(_),o&&this.instructions.push(_),a){var m=[t$3.render.canvas.Instruction.STROKE];this.instructions.push(m),this.hitDetectionInstructions.push(m)}return t},t$3.render.canvas.PolygonReplay.prototype.drawCircle=function(e,t){var i=this.state,n=i.fillStyle,r=i.strokeStyle;if(void 0!==n||void 0!==r){this.setFillStrokeStyles_(e),this.beginGeometry(e,t),this.hitDetectionInstructions.push([t$3.render.canvas.Instruction.SET_FILL_STYLE,t$3.color.asString(t$3.render.canvas.defaultFillStyle)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([t$3.render.canvas.Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var o=e.getFlatCoordinates(),a=e.getStride(),s=this.coordinates.length;this.appendFlatCoordinates(o,0,o.length,a,!1,!1);var l=[t$3.render.canvas.Instruction.BEGIN_PATH],u=[t$3.render.canvas.Instruction.CIRCLE,s];this.instructions.push(l,u),this.hitDetectionInstructions.push(l,u);var c=[t$3.render.canvas.Instruction.FILL];if(this.hitDetectionInstructions.push(c),void 0!==i.fillStyle&&this.instructions.push(c),void 0!==i.strokeStyle){var h=[t$3.render.canvas.Instruction.STROKE];this.instructions.push(h),this.hitDetectionInstructions.push(h)}this.endGeometry(e,t)}},t$3.render.canvas.PolygonReplay.prototype.drawPolygon=function(e,t){var i=this.state;this.setFillStrokeStyles_(e),this.beginGeometry(e,t),this.hitDetectionInstructions.push([t$3.render.canvas.Instruction.SET_FILL_STYLE,t$3.color.asString(t$3.render.canvas.defaultFillStyle)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([t$3.render.canvas.Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var n=e.getEnds(),r=e.getOrientedFlatCoordinates(),o=e.getStride();this.drawFlatCoordinatess_(r,0,n,o),this.endGeometry(e,t)},t$3.render.canvas.PolygonReplay.prototype.drawMultiPolygon=function(e,t){var i=this.state,n=i.fillStyle,r=i.strokeStyle;if(void 0!==n||void 0!==r){this.setFillStrokeStyles_(e),this.beginGeometry(e,t),this.hitDetectionInstructions.push([t$3.render.canvas.Instruction.SET_FILL_STYLE,t$3.color.asString(t$3.render.canvas.defaultFillStyle)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([t$3.render.canvas.Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var o,a,s=e.getEndss(),l=e.getOrientedFlatCoordinates(),u=e.getStride(),c=0;for(o=0,a=s.length;o<a;++o)c=this.drawFlatCoordinatess_(l,c,s[o],u);this.endGeometry(e,t)}},t$3.render.canvas.PolygonReplay.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var e=this.tolerance;if(0!==e){var t,i,n=this.coordinates;for(t=0,i=n.length;t<i;++t)n[t]=t$3.geom.flat.simplify.snap(n[t],e)}},t$3.render.canvas.PolygonReplay.prototype.setFillStrokeStyles_=function(e){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.applyFill,e),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},t$3.geom.flat.straightchunk={},t$3.geom.flat.straightchunk.lineString=function(e,t,i,n,r){var o,a,s,l,u,c,h,d,f,p=i,_=i,m=0,$=0,g=i;for(o=i;o<n;o+=r){var y=t[o],v=t[o+1];void 0!==l&&(d=y-l,f=v-u,s=Math.sqrt(d*d+f*f),void 0!==c&&($+=a,Math.acos((c*d+h*f)/(a*s))>e&&($>m&&(m=$,p=g,_=o),$=0,g=o-r)),a=s,c=d,h=f),l=y,u=v}return($+=s)>m?[g,o]:[p,_]},t$3.style.TextPlacement={POINT:"point",LINE:"line"},t$3.render.canvas.TextReplay=function(e,t,i,n,r,o){t$3.render.canvas.Replay.call(this,e,t,i,n,r,o),this.declutterGroup_,this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.widths_={},t$3.render.canvas.labelCache.prune()},t$3.inherits(t$3.render.canvas.TextReplay,t$3.render.canvas.Replay),t$3.render.canvas.TextReplay.measureTextWidths=function(e,t,i){var n,r,o=t.length,a=0;for(r=0;r<o;++r)n=t$3.render.canvas.measureTextWidth(e,t[r]),a=Math.max(a,n),i.push(n);return a},t$3.render.canvas.TextReplay.prototype.drawText=function(e,t){var i=this.textFillState_,n=this.textStrokeState_,r=this.textState_;if(""!==this.text_&&r&&(i||n)){var o,a,s=this.coordinates.length,l=e.getType(),u=null,c=2,h=2;if(r.placement===t$3.style.TextPlacement.LINE){if(!t$3.extent.intersects(this.getBufferedMaxExtent(),e.getExtent()))return;var d;if(u=e.getFlatCoordinates(),h=e.getStride(),l==t$3.geom.GeometryType.LINE_STRING)d=[u.length];else if(l==t$3.geom.GeometryType.MULTI_LINE_STRING)d=e.getEnds();else if(l==t$3.geom.GeometryType.POLYGON)d=e.getEnds().slice(0,1);else if(l==t$3.geom.GeometryType.MULTI_POLYGON){var f=e.getEndss();for(d=[],o=0,a=f.length;o<a;++o)d.push(f[o][0])}this.beginGeometry(e,t);for(var p,_=r.textAlign,m=0,$=0,g=d.length;$<g;++$){if(null==_){var y=t$3.geom.flat.straightchunk.lineString(r.maxAngle,u,m,d[$],h);m=y[0],p=y[1]}else p=d[$];for(o=m;o<p;o+=h)this.coordinates.push(u[o],u[o+1]);c=this.coordinates.length,m=d[$],this.drawChars_(s,c,this.declutterGroup_),s=c}this.endGeometry(e,t)}else{var v=this.getImage(this.text_,this.textKey_,this.fillKey_,this.strokeKey_),x=v.width/this.pixelRatio;switch(l){case t$3.geom.GeometryType.POINT:case t$3.geom.GeometryType.MULTI_POINT:c=(u=e.getFlatCoordinates()).length;break;case t$3.geom.GeometryType.LINE_STRING:u=e.getFlatMidpoint();break;case t$3.geom.GeometryType.CIRCLE:u=e.getCenter();break;case t$3.geom.GeometryType.MULTI_LINE_STRING:c=(u=e.getFlatMidpoints()).length;break;case t$3.geom.GeometryType.POLYGON:if(u=e.getFlatInteriorPoint(),!r.overflow&&u[2]/this.resolution<x)return;h=3;break;case t$3.geom.GeometryType.MULTI_POLYGON:var b=e.getFlatInteriorPoints();for(u=[],o=0,a=b.length;o<a;o+=3)(r.overflow||b[o+2]/this.resolution>=x)&&u.push(b[o],b[o+1]);if(0==(c=u.length))return}c=this.appendFlatCoordinates(u,0,c,h,!1,!1),this.beginGeometry(e,t),(r.backgroundFill||r.backgroundStroke)&&(this.setFillStrokeStyle(r.backgroundFill,r.backgroundStroke),this.updateFillStyle(this.state,this.applyFill,e),this.updateStrokeStyle(this.state,this.applyStroke)),this.drawTextImage_(v,s,c),this.endGeometry(e,t)}}},t$3.render.canvas.TextReplay.prototype.getImage=function(e,t,i,n){var r,o=n+t+e+i+this.pixelRatio,a=t$3.render.canvas.labelCache;if(!a.containsKey(o)){var s=n?this.strokeStates[n]||this.textStrokeState_:null,l=i?this.fillStates[i]||this.textFillState_:null,u=this.textStates[t]||this.textState_,c=this.pixelRatio,h=u.scale*c,d=t$3.render.replay.TEXT_ALIGN[u.textAlign||t$3.render.canvas.defaultTextAlign],f=n&&s.lineWidth?s.lineWidth:0,p=e.split("\n"),_=p.length,m=[],$=t$3.render.canvas.TextReplay.measureTextWidths(u.font,p,m),g=t$3.render.canvas.measureTextHeight(u.font),y=g*_,v=$+f,x=t$3.dom.createCanvasContext2D(Math.ceil(v*h),Math.ceil((y+f)*h));r=x.canvas,a.set(o,r),1!=h&&x.scale(h,h),x.font=u.font,n&&(x.strokeStyle=s.strokeStyle,x.lineWidth=f*(t$3.has.SAFARI?h:1),x.lineCap=s.lineCap,x.lineJoin=s.lineJoin,x.miterLimit=s.miterLimit,t$3.has.CANVAS_LINE_DASH&&s.lineDash.length&&(x.setLineDash(s.lineDash),x.lineDashOffset=s.lineDashOffset)),i&&(x.fillStyle=l.fillStyle),x.textBaseline="middle",x.textAlign="center";var b,S=.5-d,w=d*r.width/h+S*f;if(n)for(b=0;b<_;++b)x.strokeText(p[b],w+S*m[b],.5*(f+g)+b*g);if(i)for(b=0;b<_;++b)x.fillText(p[b],w+S*m[b],.5*(f+g)+b*g)}return a.get(o)},t$3.render.canvas.TextReplay.prototype.drawTextImage_=function(e,t,i){var n=this.textState_,r=this.textStrokeState_,o=this.pixelRatio,a=t$3.render.replay.TEXT_ALIGN[n.textAlign||t$3.render.canvas.defaultTextAlign],s=t$3.render.replay.TEXT_ALIGN[n.textBaseline],l=r&&r.lineWidth?r.lineWidth:0,u=a*e.width/o+2*(.5-a)*l,c=s*e.height/o+2*(.5-s)*l;this.instructions.push([t$3.render.canvas.Instruction.DRAW_IMAGE,t,i,e,(u-this.textOffsetX_)*o,(c-this.textOffsetY_)*o,this.declutterGroup_,e.height,1,0,0,this.textRotateWithView_,this.textRotation_,1,!0,e.width,n.padding==t$3.render.canvas.defaultPadding?t$3.render.canvas.defaultPadding:n.padding.map((function(e){return e*o})),!!n.backgroundFill,!!n.backgroundStroke]),this.hitDetectionInstructions.push([t$3.render.canvas.Instruction.DRAW_IMAGE,t,i,e,(u-this.textOffsetX_)*o,(c-this.textOffsetY_)*o,this.declutterGroup_,e.height,1,0,0,this.textRotateWithView_,this.textRotation_,1/o,!0,e.width,n.padding,!!n.backgroundFill,!!n.backgroundStroke])},t$3.render.canvas.TextReplay.prototype.drawChars_=function(e,t,i){var n=this.textStrokeState_,r=this.textState_,o=this.textFillState_,a=this.strokeKey_;n&&(a in this.strokeStates||(this.strokeStates[a]={strokeStyle:n.strokeStyle,lineCap:n.lineCap,lineDashOffset:n.lineDashOffset,lineWidth:n.lineWidth,lineJoin:n.lineJoin,miterLimit:n.miterLimit,lineDash:n.lineDash}));var s=this.textKey_;this.textKey_ in this.textStates||(this.textStates[this.textKey_]={font:r.font,textAlign:r.textAlign||t$3.render.canvas.defaultTextAlign,scale:r.scale});var l=this.fillKey_;o&&(l in this.fillStates||(this.fillStates[l]={fillStyle:o.fillStyle}));var u=this.pixelRatio,c=t$3.render.replay.TEXT_ALIGN[r.textBaseline],h=this.textOffsetY_*u,d=this.text_,f=r.font,p=r.scale,_=n?n.lineWidth*p/2:0,m=this.widths_[f];m||(this.widths_[f]=m={}),this.instructions.push([t$3.render.canvas.Instruction.DRAW_CHARS,e,t,c,i,r.overflow,l,r.maxAngle,function(e){var t=m[e];return t||(t=m[e]=t$3.render.canvas.measureTextWidth(f,e)),t*p*u},h,a,_*u,d,s,1]),this.hitDetectionInstructions.push([t$3.render.canvas.Instruction.DRAW_CHARS,e,t,c,i,r.overflow,l,r.maxAngle,function(e){var t=m[e];return t||(t=m[e]=t$3.render.canvas.measureTextWidth(f,e)),t*p},h,a,_,d,s,1/u])},t$3.render.canvas.TextReplay.prototype.setTextStyle=function(e,t){var i,n,r;if(e){this.declutterGroup_=t;var o=e.getFill();o?((n=this.textFillState_)||(n=this.textFillState_={}),n.fillStyle=t$3.colorlike.asColorLike(o.getColor()||t$3.render.canvas.defaultFillStyle)):n=this.textFillState_=null;var a=e.getStroke();if(a){(r=this.textStrokeState_)||(r=this.textStrokeState_={});var s=a.getLineDash(),l=a.getLineDashOffset(),u=a.getWidth(),c=a.getMiterLimit();r.lineCap=a.getLineCap()||t$3.render.canvas.defaultLineCap,r.lineDash=s?s.slice():t$3.render.canvas.defaultLineDash,r.lineDashOffset=void 0===l?t$3.render.canvas.defaultLineDashOffset:l,r.lineJoin=a.getLineJoin()||t$3.render.canvas.defaultLineJoin,r.lineWidth=void 0===u?t$3.render.canvas.defaultLineWidth:u,r.miterLimit=void 0===c?t$3.render.canvas.defaultMiterLimit:c,r.strokeStyle=t$3.colorlike.asColorLike(a.getColor()||t$3.render.canvas.defaultStrokeStyle)}else r=this.textStrokeState_=null;i=this.textState_;var h=e.getFont()||t$3.render.canvas.defaultFont,d=e.getScale();i.overflow=e.getOverflow(),i.font=h,i.maxAngle=e.getMaxAngle(),i.placement=e.getPlacement(),i.textAlign=e.getTextAlign(),i.textBaseline=e.getTextBaseline()||t$3.render.canvas.defaultTextBaseline,i.backgroundFill=e.getBackgroundFill(),i.backgroundStroke=e.getBackgroundStroke(),i.padding=e.getPadding()||t$3.render.canvas.defaultPadding,i.scale=void 0===d?1:d;var f=e.getOffsetX(),p=e.getOffsetY(),_=e.getRotateWithView(),m=e.getRotation();this.text_=e.getText()||"",this.textOffsetX_=void 0===f?0:f,this.textOffsetY_=void 0===p?0:p,this.textRotateWithView_=void 0!==_&&_,this.textRotation_=void 0===m?0:m,this.strokeKey_=r?("string"==typeof r.strokeStyle?r.strokeStyle:t$3.getUid(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?"),this.fillKey_=n?"string"==typeof n.fillStyle?n.fillStyle:"|"+t$3.getUid(n.fillStyle):""}else this.text_=""},t$3.render.canvas.ReplayGroup=function(e,t,i,n,r,o,a){t$3.render.ReplayGroup.call(this),this.declutterTree_=o,this.declutterGroup_=null,this.tolerance_=e,this.maxExtent_=t,this.overlaps_=r,this.pixelRatio_=n,this.resolution_=i,this.renderBuffer_=a,this.replaysByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=t$3.transform.create()},t$3.inherits(t$3.render.canvas.ReplayGroup,t$3.render.ReplayGroup),t$3.render.canvas.ReplayGroup.circleArrayCache_={0:[[!0]]},t$3.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_=function(e,t,i){var n,r=Math.floor(e.length/2);if(t>=r)for(n=r;n<t;n++)e[n][i]=!0;else if(t<r)for(n=t+1;n<r;n++)e[n][i]=!0},t$3.render.canvas.ReplayGroup.getCircleArray_=function(e){if(void 0!==t$3.render.canvas.ReplayGroup.circleArrayCache_[e])return t$3.render.canvas.ReplayGroup.circleArrayCache_[e];for(var t=2*e+1,i=new Array(t),n=0;n<t;n++)i[n]=new Array(t);for(var r=e,o=0,a=0;r>=o;)t$3.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e+r,e+o),t$3.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e+o,e+r),t$3.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e-o,e+r),t$3.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e-r,e+o),t$3.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e-r,e-o),t$3.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e-o,e-r),t$3.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e+o,e-r),t$3.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e+r,e-o),2*((a+=1+2*++o)-r)+1>0&&(a+=1-2*(r-=1));return t$3.render.canvas.ReplayGroup.circleArrayCache_[e]=i,i},t$3.render.canvas.ReplayGroup.replayDeclutter=function(e,t,i){for(var n=Object.keys(e).map(Number).sort(t$3.array.numberSafeCompareFunction),r={},o=0,a=n.length;o<a;++o)for(var s=e[n[o].toString()],l=0,u=s.length;l<u;){var c=s[l++],h=s[l++];c.replay(t,h,i,r)}},t$3.render.canvas.ReplayGroup.prototype.addDeclutter=function(e){var t=null;return this.declutterTree_&&(e?(t=this.declutterGroup_)[4]++:(t=this.declutterGroup_=t$3.extent.createEmpty()).push(1)),t},t$3.render.canvas.ReplayGroup.prototype.clip=function(e,t){var i=this.getClipCoords(t);e.beginPath(),e.moveTo(i[0],i[1]),e.lineTo(i[2],i[3]),e.lineTo(i[4],i[5]),e.lineTo(i[6],i[7]),e.clip()},t$3.render.canvas.ReplayGroup.prototype.hasReplays=function(e){for(var t in this.replaysByZIndex_)for(var i=this.replaysByZIndex_[t],n=0,r=e.length;n<r;++n)if(e[n]in i)return!0;return!1},t$3.render.canvas.ReplayGroup.prototype.finish=function(){var e;for(e in this.replaysByZIndex_){var t,i=this.replaysByZIndex_[e];for(t in i)i[t].finish()}},t$3.render.canvas.ReplayGroup.prototype.forEachFeatureAtCoordinate=function(e,t,i,n,r,o,a){var s,l=2*(n=Math.round(n))+1,u=t$3.transform.compose(this.hitDetectionTransform_,n+.5,n+.5,1/t,-1/t,-i,-e[0],-e[1]),c=this.hitDetectionContext_;c.canvas.width!==l||c.canvas.height!==l?(c.canvas.width=l,c.canvas.height=l):c.clearRect(0,0,l,l),void 0!==this.renderBuffer_&&(s=t$3.extent.createEmpty(),t$3.extent.extendCoordinate(s,e),t$3.extent.buffer(s,t*(this.renderBuffer_+n),s));var h,d,f=t$3.render.canvas.ReplayGroup.getCircleArray_(n);function p(e){for(var t=c.getImageData(0,0,l,l).data,i=0;i<l;i++)for(var n=0;n<l;n++)if(f[i][n]&&t[4*(n*l+i)+3]>0){var r;return(!(h&&(d==t$3.render.ReplayType.IMAGE||d==t$3.render.ReplayType.TEXT))||-1!==h.indexOf(e))&&(r=o(e)),r?r:void c.clearRect(0,0,l,l)}}this.declutterTree_&&(h=this.declutterTree_.all().map((function(e){return e.value})));var _,m,$,g,y,v=Object.keys(this.replaysByZIndex_).map(Number);for(v.sort(t$3.array.numberSafeCompareFunction),_=v.length-1;_>=0;--_){var x=v[_].toString();for($=this.replaysByZIndex_[x],m=t$3.render.replay.ORDER.length-1;m>=0;--m)if(void 0!==(g=$[d=t$3.render.replay.ORDER[m]]))if(!a||d!=t$3.render.ReplayType.IMAGE&&d!=t$3.render.ReplayType.TEXT){if(y=g.replayHitDetection(c,u,i,r,p,s))return y}else{var b=a[x];b?b.push(g,u.slice(0)):a[x]=[g,u.slice(0)]}}},t$3.render.canvas.ReplayGroup.prototype.getClipCoords=function(e){var t=this.maxExtent_,i=t[0],n=t[1],r=t[2],o=t[3],a=[i,n,i,o,r,o,r,n];return t$3.geom.flat.transform.transform2D(a,0,8,2,e,a),a},t$3.render.canvas.ReplayGroup.prototype.getReplay=function(e,t){var i=void 0!==e?e.toString():"0",n=this.replaysByZIndex_[i];void 0===n&&(n={},this.replaysByZIndex_[i]=n);var r=n[t];void 0===r&&(r=new(0,t$3.render.canvas.ReplayGroup.BATCH_CONSTRUCTORS_[t])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_,this.overlaps_,this.declutterTree_),n[t]=r);return r},t$3.render.canvas.ReplayGroup.prototype.getReplays=function(){return this.replaysByZIndex_},t$3.render.canvas.ReplayGroup.prototype.isEmpty=function(){return t$3.obj.isEmpty(this.replaysByZIndex_)},t$3.render.canvas.ReplayGroup.prototype.replay=function(e,t,i,n,r,o){var a=Object.keys(this.replaysByZIndex_).map(Number);a.sort(t$3.array.numberSafeCompareFunction),e.save(),this.clip(e,t);var s,l,u,c,h,d,f=r||t$3.render.replay.ORDER;for(s=0,l=a.length;s<l;++s){var p=a[s].toString();for(h=this.replaysByZIndex_[p],u=0,c=f.length;u<c;++u){var _=f[u];if(void 0!==(d=h[_]))if(!o||_!=t$3.render.ReplayType.IMAGE&&_!=t$3.render.ReplayType.TEXT)d.replay(e,t,i,n);else{var m=o[p];m?m.push(d,t.slice(0)):o[p]=[d,t.slice(0)]}}}e.restore()},t$3.render.canvas.ReplayGroup.BATCH_CONSTRUCTORS_={Circle:t$3.render.canvas.PolygonReplay,Default:t$3.render.canvas.Replay,Image:t$3.render.canvas.ImageReplay,LineString:t$3.render.canvas.LineStringReplay,Polygon:t$3.render.canvas.PolygonReplay,Text:t$3.render.canvas.TextReplay},t$3.renderer={},t$3.renderer.vector={},t$3.renderer.vector.defaultOrder=function(e,t){return t$3.getUid(e)-t$3.getUid(t)},t$3.renderer.vector.getSquaredTolerance=function(e,t){var i=t$3.renderer.vector.getTolerance(e,t);return i*i},t$3.renderer.vector.getTolerance=function(e,t){return t$3.SIMPLIFY_TOLERANCE*e/t},t$3.renderer.vector.renderCircleGeometry_=function(e,t,i,n){var r=i.getFill(),o=i.getStroke();if(r||o){var a=e.getReplay(i.getZIndex(),t$3.render.ReplayType.CIRCLE);a.setFillStrokeStyle(r,o),a.drawCircle(t,n)}var s=i.getText();if(s){var l=e.getReplay(i.getZIndex(),t$3.render.ReplayType.TEXT);l.setTextStyle(s,e.addDeclutter(!1)),l.drawText(t,n)}},t$3.renderer.vector.renderFeature=function(e,t,i,n,r,o){var a,s,l=!1;return(a=i.getImage())&&((s=a.getImageState())==t$3.ImageState.LOADED||s==t$3.ImageState.ERROR?a.unlistenImageChange(r,o):(s==t$3.ImageState.IDLE&&a.load(),s=a.getImageState(),a.listenImageChange(r,o),l=!0)),t$3.renderer.vector.renderFeature_(e,t,i,n),l},t$3.renderer.vector.renderFeature_=function(e,t,i,n){var r=i.getGeometryFunction()(t);if(r){var o=r.getSimplifiedGeometry(n);if(i.getRenderer())t$3.renderer.vector.renderGeometry_(e,o,i,t);else(0,t$3.renderer.vector.GEOMETRY_RENDERERS_[o.getType()])(e,o,i,t)}},t$3.renderer.vector.renderGeometry_=function(e,t,i,n){if(t.getType()!=t$3.geom.GeometryType.GEOMETRY_COLLECTION)e.getReplay(i.getZIndex(),t$3.render.ReplayType.DEFAULT).drawCustom(t,n,i.getRenderer());else for(var r=t.getGeometries(),o=0,a=r.length;o<a;++o)t$3.renderer.vector.renderGeometry_(e,r[o],i,n)},t$3.renderer.vector.renderGeometryCollectionGeometry_=function(e,t,i,n){var r,o,a=t.getGeometriesArray();for(r=0,o=a.length;r<o;++r){(0,t$3.renderer.vector.GEOMETRY_RENDERERS_[a[r].getType()])(e,a[r],i,n)}},t$3.renderer.vector.renderLineStringGeometry_=function(e,t,i,n){var r=i.getStroke();if(r){var o=e.getReplay(i.getZIndex(),t$3.render.ReplayType.LINE_STRING);o.setFillStrokeStyle(null,r),o.drawLineString(t,n)}var a=i.getText();if(a){var s=e.getReplay(i.getZIndex(),t$3.render.ReplayType.TEXT);s.setTextStyle(a,e.addDeclutter(!1)),s.drawText(t,n)}},t$3.renderer.vector.renderMultiLineStringGeometry_=function(e,t,i,n){var r=i.getStroke();if(r){var o=e.getReplay(i.getZIndex(),t$3.render.ReplayType.LINE_STRING);o.setFillStrokeStyle(null,r),o.drawMultiLineString(t,n)}var a=i.getText();if(a){var s=e.getReplay(i.getZIndex(),t$3.render.ReplayType.TEXT);s.setTextStyle(a,e.addDeclutter(!1)),s.drawText(t,n)}},t$3.renderer.vector.renderMultiPolygonGeometry_=function(e,t,i,n){var r=i.getFill(),o=i.getStroke();if(o||r){var a=e.getReplay(i.getZIndex(),t$3.render.ReplayType.POLYGON);a.setFillStrokeStyle(r,o),a.drawMultiPolygon(t,n)}var s=i.getText();if(s){var l=e.getReplay(i.getZIndex(),t$3.render.ReplayType.TEXT);l.setTextStyle(s,e.addDeclutter(!1)),l.drawText(t,n)}},t$3.renderer.vector.renderPointGeometry_=function(e,t,i,n){var r=i.getImage();if(r){if(r.getImageState()!=t$3.ImageState.LOADED)return;var o=e.getReplay(i.getZIndex(),t$3.render.ReplayType.IMAGE);o.setImageStyle(r,e.addDeclutter(!1)),o.drawPoint(t,n)}var a=i.getText();if(a){var s=e.getReplay(i.getZIndex(),t$3.render.ReplayType.TEXT);s.setTextStyle(a,e.addDeclutter(!!r)),s.drawText(t,n)}},t$3.renderer.vector.renderMultiPointGeometry_=function(e,t,i,n){var r=i.getImage();if(r){if(r.getImageState()!=t$3.ImageState.LOADED)return;var o=e.getReplay(i.getZIndex(),t$3.render.ReplayType.IMAGE);o.setImageStyle(r,e.addDeclutter(!1)),o.drawMultiPoint(t,n)}var a=i.getText();if(a){var s=e.getReplay(i.getZIndex(),t$3.render.ReplayType.TEXT);s.setTextStyle(a,e.addDeclutter(!!r)),s.drawText(t,n)}},t$3.renderer.vector.renderPolygonGeometry_=function(e,t,i,n){var r=i.getFill(),o=i.getStroke();if(r||o){var a=e.getReplay(i.getZIndex(),t$3.render.ReplayType.POLYGON);a.setFillStrokeStyle(r,o),a.drawPolygon(t,n)}var s=i.getText();if(s){var l=e.getReplay(i.getZIndex(),t$3.render.ReplayType.TEXT);l.setTextStyle(s,e.addDeclutter(!1)),l.drawText(t,n)}},t$3.renderer.vector.GEOMETRY_RENDERERS_={Point:t$3.renderer.vector.renderPointGeometry_,LineString:t$3.renderer.vector.renderLineStringGeometry_,Polygon:t$3.renderer.vector.renderPolygonGeometry_,MultiPoint:t$3.renderer.vector.renderMultiPointGeometry_,MultiLineString:t$3.renderer.vector.renderMultiLineStringGeometry_,MultiPolygon:t$3.renderer.vector.renderMultiPolygonGeometry_,GeometryCollection:t$3.renderer.vector.renderGeometryCollectionGeometry_,Circle:t$3.renderer.vector.renderCircleGeometry_};var d$3=1e20;function f$4(e,t,i,n,r,o){this.fontSize=e||24,this.buffer=void 0===t?3:t,this.cutoff=n||.25,this.fontFamily=r||"sans-serif",this.fontWeight=o||"normal",this.radius=i||8;var a=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=a,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(a*a),this.gridInner=new Float64Array(a*a),this.f=new Float64Array(a),this.d=new Float64Array(a),this.z=new Float64Array(a+1),this.v=new Int16Array(a),this.middle=Math.round(a/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function c$4(e,t,i,n,r,o,a){for(var s=0;s<t;s++){for(var l=0;l<i;l++)n[l]=e[l*t+s];for(l$3(n,r,o,a,i),l=0;l<i;l++)e[l*t+s]=r[l]}for(l=0;l<i;l++){for(s=0;s<t;s++)n[s]=e[l*t+s];for(l$3(n,r,o,a,t),s=0;s<t;s++)e[l*t+s]=Math.sqrt(r[s])}}function l$3(e,t,i,n,r){i[0]=0,n[0]=-d$3,n[1]=+d$3;for(var o=1,a=0;o<r;o++){for(var s=(e[o]+o*o-(e[i[a]]+i[a]*i[a]))/(2*o-2*i[a]);s<=n[a];)a--,s=(e[o]+o*o-(e[i[a]]+i[a]*i[a]))/(2*o-2*i[a]);i[++a]=o,n[a]=s,n[a+1]=+d$3}for(o=0,a=0;o<r;o++){for(;n[a+1]<o;)a++;t[o]=(o-i[a])*(o-i[a])+e[i[a]]}}function o$5(e){t$$(e)||(e=new a$M),this._clock=e,this._eventHelper=new n$W,this._eventHelper.add(e.onTick,this.synchronize,this),this.systemTime=le$2.observable(o$10.now()),this.systemTime.equalityComparer=o$10.equals,this.startTime=le$2.observable(e.startTime),this.startTime.equalityComparer=o$10.equals,this.startTime.subscribe((function(t){e.startTime=t,this.synchronize()}),this),this.stopTime=le$2.observable(e.stopTime),this.stopTime.equalityComparer=o$10.equals,this.stopTime.subscribe((function(t){e.stopTime=t,this.synchronize()}),this),this.currentTime=le$2.observable(e.currentTime),this.currentTime.equalityComparer=o$10.equals,this.currentTime.subscribe((function(t){e.currentTime=t,this.synchronize()}),this),this.multiplier=le$2.observable(e.multiplier),this.multiplier.subscribe((function(t){e.multiplier=t,this.synchronize()}),this),this.clockStep=le$2.observable(e.clockStep),this.clockStep.subscribe((function(t){e.clockStep=t,this.synchronize()}),this),this.clockRange=le$2.observable(e.clockRange),this.clockRange.subscribe((function(t){e.clockRange=t,this.synchronize()}),this),this.canAnimate=le$2.observable(e.canAnimate),this.canAnimate.subscribe((function(t){e.canAnimate=t,this.synchronize()}),this),this.shouldAnimate=le$2.observable(e.shouldAnimate),this.shouldAnimate.subscribe((function(t){e.shouldAnimate=t,this.synchronize()}),this),le$2.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}function e$1(){this.canExecute=void 0,this.beforeExecute=void 0,this.afterExecute=void 0,t$_.throwInstantiationError()}function s$3(e,t){if(!t$$(e))throw new t$_("func is required.");t=e$1Y(t,!0);var i=new o$15,n=new o$15;function r(){if(!r.canExecute)throw new t$_("Cannot execute command, canExecute is false.");var t,o={args:arguments,cancel:!1};return i.raiseEvent(o),o.cancel||(t=e.apply(null,arguments),n.raiseEvent(t)),t}return r.canExecute=t,le$2.track(r,["canExecute"]),Object.defineProperties(r,{beforeExecute:{value:i},afterExecute:{value:n}}),r}f$4.prototype.draw=function(e){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(e,this.buffer,this.middle);for(var t=this.ctx.getImageData(0,0,this.size,this.size),i=new Uint8ClampedArray(this.size*this.size),n=0;n<this.size*this.size;n++){var r=t.data[4*n+3]/255;this.gridOuter[n]=1===r?0:0===r?d$3:Math.pow(Math.max(0,.5-r),2),this.gridInner[n]=1===r?d$3:0===r?0:Math.pow(Math.max(0,r-.5),2)}for(c$4(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),c$4(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),n=0;n<this.size*this.size;n++){var o=this.gridOuter[n]-this.gridInner[n];i[n]=Math.max(0,Math.min(255,Math.round(255-255*(o/this.radius+this.cutoff))))}return i},Object.defineProperties(o$5.prototype,{clock:{get:function(){return this._clock}}}),o$5.prototype.synchronize=function(){var e=this._clock;this.systemTime=o$10.now(),this.startTime=e.startTime,this.stopTime=e.stopTime,this.currentTime=e.currentTime,this.multiplier=e.multiplier,this.clockStep=e.clockStep,this.clockRange=e.clockRange,this.canAnimate=e.canAnimate,this.shouldAnimate=e.shouldAnimate},o$5.prototype.isDestroyed=function(){return!1},o$5.prototype.destroy=function(){this._eventHelper.removeAll(),s$1e(this)};var s$2={};function a$2(e,t,i,n,r){return i.call(n,e[t]),le$2.getObservable(e,t).subscribe(i,n,r)}function i$5(e,t){if(!t$$(e))throw new t$_("command is required.");this._command=e,t=e$1Y(t,e$1Y.EMPTY_OBJECT),this.toggled=e$1Y(t.toggled,!1),this.tooltip=e$1Y(t.tooltip,""),le$2.track(this,["toggled","tooltip"])}s$2.createCheckbox=function(e,t,i){n$1e.typeOf.string("labelText",e),n$1e.typeOf.string("checkedBinding",t);var n=document.createElement("div"),r=document.createElement("label"),o=document.createElement("input");o.type="checkbox";var a="checked: "+t;return t$$(i)&&(a+=", enable: "+i),o.setAttribute("data-bind",a),r.appendChild(o),r.appendChild(document.createTextNode(e)),n.appendChild(r),n},s$2.createSection=function(e,t,i,n){n$1e.defined("panel",e),n$1e.typeOf.string("headerText",t),n$1e.typeOf.string("sectionVisibleBinding",i),n$1e.typeOf.string("toggleSectionVisibilityBinding",n);var r=document.createElement("div");r.className="cesium-cesiumInspector-section",r.setAttribute("data-bind",'css: { "cesium-cesiumInspector-section-collapsed": !'+i+" }"),e.appendChild(r);var o=document.createElement("h3");o.className="cesium-cesiumInspector-sectionHeader",o.appendChild(document.createTextNode(t)),o.setAttribute("data-bind","click: "+n),r.appendChild(o);var a=document.createElement("div");return a.className="cesium-cesiumInspector-sectionContent",r.appendChild(a),a},Object.defineProperties(i$5.prototype,{command:{get:function(){return this._command}}});var _0x5cde2e=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x5861d8=_0x5cde2e(void 0,(function(){return _0x5861d8.toString().search("(((.+)+)+)+$").toString().constructor(_0x5861d8).search("(((.+)+)+)+$")}));function _0x2d2c24(e){this.clampMode=0,this.handlerDis=new WebGLPlot.MeasureHandler(e,WebGLPlot.MeasureMode.Distance,this.clampMode),this.handlerArea=new WebGLPlot.MeasureHandler(e,WebGLPlot.MeasureMode.Area,this.clampMode),this.handlerHeight=new WebGLPlot.MeasureHandler(e,WebGLPlot.MeasureMode.DVH)}_0x5861d8(),_0x2d2c24.prototype.calDistance=function(){this.handlerDis.measureEvt.addEventListener(function(e){var t=Number(e.distance),i=t>1e3?(t/1e3).toFixed(2)+"km":t.toFixed(2)+"m";this.handlerDis.disLabel.text=WebGLPlot.plotI18n("Distance")+":"+i}.bind(this)),this.deactiveAll(),this.handlerDis&&this.handlerDis.activate()},_0x2d2c24.prototype.calArea=function(){this.handlerArea.measureEvt.addEventListener(function(e){var t=Number(e.area),i=t>1e6?(t/1e6).toFixed(2)+"km²":t.toFixed(2)+"㎡";this.handlerArea.areaLabel.text=WebGLPlot.plotI18n("Area")+":"+i}.bind(this)),this.deactiveAll(),this.handlerArea&&this.handlerArea.activate()},_0x2d2c24.prototype.calHeight=function(){this.handlerHeight.measureEvt.addEventListener((e=>{var t=e.distance>1e3?(e.distance/1e3).toFixed(2)+"km":e.distance+"m",i=e.verticalHeight>1e3?(e.verticalHeight/1e3).toFixed(2)+"km":e.verticalHeight+"m",n=e.horizontalDistance>1e3?(e.horizontalDistance/1e3).toFixed(2)+"km":e.horizontalDistance+"m";this.handlerHeight.disLabel.text=WebGLPlot.plotI18n("SpaceDistance")+":"+t,this.handlerHeight.vLabel.text=WebGLPlot.plotI18n("VerticalHeight")+":"+i,this.handlerHeight.hLabel.text=WebGLPlot.plotI18n("LevelDistance")+":"+n})),this.handlerHeight.clear(),this.deactiveAll(),this.handlerHeight&&this.handlerHeight.activate()},_0x2d2c24.prototype.clear=function(){this.deactiveAll(),this.handlerDis&&this.handlerDis.clear(),this.handlerArea&&this.handlerArea.clear(),this.handlerHeight&&this.handlerHeight.clear()},_0x2d2c24.prototype.deactiveAll=function(){this.handlerDis&&this.handlerDis.deactivate(),this.handlerArea&&this.handlerArea.deactivate(),this.handlerHeight&&this.handlerHeight.deactivate()};var _0x4d5ae3=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x10c68b=_0x4d5ae3(void 0,(function(){return _0x10c68b.toString().search("(((.+)+)+)+$").toString().constructor(_0x10c68b).search("(((.+)+)+)+$")}));_0x10c68b();var _0x24912c=null,_0x4609d9=null;function _0x2b31d2(e){this.sightline=new WebGLPlot.Sightline(e.scene),this.handlerPoint=new WebGLPlot.DrawHandler(e,WebGLPlot.DrawMode.Point),this.handler=new WebGLPlot.ScreenSpaceEventHandler(e.scene.canvas),this.sightline.lineWidth=5,this.sightline.build(),this.num=0,this.viewer=e,_0x24912c=this.sightline,_0x4609d9=this.num}function _0x469037(e){_0x4609d9+=1;var t=_0x7b45d7(e),i="point"+_0x4609d9;_0x24912c.addTargetPoint({position:t,name:i})}function _0x7b45d7(e){var t=WebGLPlot.Cartographic.fromCartesian(e);return[WebGLPlot.CesiumMath.toDegrees(t.longitude),WebGLPlot.CesiumMath.toDegrees(t.latitude),t.height]}_0x2b31d2.prototype.activate=function(){var e=!0;if(this.sightline.removeAllTargetPoint(),this.handlerPoint.clear(),this.num=0,!this.handlerPoint.active){var t=null;this.handlerPoint.activate(),this.handlerPoint.drawEvt.addEventListener(function(i){var n=_0x7b45d7(i.object.position);this.sightline.viewPosition=n,e=!1,t=i}.bind(this)),this.handler.setInputAction(function(i){e||t||_0x469037(this.viewer.scene.pickPosition(i.position));t=null}.bind(this),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this.handler.setInputAction(function(t){if(!e){var i=this.viewer.scene.pickPosition(t.endPosition);if(this.num>0){this.sightline.removeAllTargetPoint("point0");var n=Cartesian2toDegress(i);sightline.addTargetPoint({position:n,name:"point0"})}}}.bind(this),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this.handler.setInputAction(function(){e||(this.viewer.enableCursorStyle=!0,this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_CLICK))}.bind(this),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK)}},_0x2b31d2.prototype.clear=function(){this.handlerPoint.deactivate(),this.handlerPoint.clear(),this.num=0,this.viewer.entities.removeAll(),this.sightline.removeAllTargetPoint()},_0x2b31d2.prototype.deactivate=function(){this.handlerPoint.deactivate()};var _0x5238a6=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x377a67=_0x5238a6(void 0,(function(){return _0x377a67.toString().search("(((.+)+)+)+$").toString().constructor(_0x377a67).search("(((.+)+)+)+$")}));function _0x135d24(e){(WebGLPlot.ViewShed3D||WebGLPlot.DrawHandler)&&(this.pointHandler=new WebGLPlot.DrawHandler(e,WebGLPlot.DrawMode.Point),this.viewshed3D=new WebGLPlot.ViewShed3D(e.scene)),this.viewer=e,this.handler=new WebGLPlot.ScreenSpaceEventHandler(this.viewer.scene.canvas),this.viewer.scene.ViewFlag=!0,this.viewPosition=null}_0x377a67(),_0x135d24.prototype.activate=function(){this.pointHandler.active||(this.viewshed3D.distance=.1,this.viewer.scene.ViewFlag=!0,this.pointHandler.activate(),this.handler.setInputAction(function(e){if(!this.viewer.scene.ViewFlag){var t=e.endPosition,i=this.viewer.scene.pickPosition(t);if(WebGLPlot.Cartesian3.distance(this.viewPosition,i)>0){var n=WebGLPlot.Cartographic.fromCartesian(i),r=WebGLPlot.CesiumMath.toDegrees(n.longitude),o=WebGLPlot.CesiumMath.toDegrees(n.latitude),a=n.height;this.viewshed3D.setDistDirByPoint([r,o,a])}}}.bind(this),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this.handler.setInputAction(function(e){this.viewer.scene.ViewFlag=!0}.bind(this),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK),this.handler.setInputAction(function(e){!this.viewer.scene.ViewFlag&&.1!==this.viewshed3D.distance&&(this.viewer.scene.ViewFlag=!0)}.bind(this),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this.pointHandler.drawEvt.addEventListener(function(e){var t=e.object,i=t.position;this.viewPosition=i;var n=WebGLPlot.Cartographic.fromCartesian(i),r=WebGLPlot.CesiumMath.toDegrees(n.longitude),o=WebGLPlot.CesiumMath.toDegrees(n.latitude),a=n.height+1.8;t.position=WebGLPlot.Cartesian3.fromDegrees(r,o,a),this.viewer.scene.ViewFlag&&(this.viewshed3D.viewPosition=[r,o,a],this.viewshed3D.build(),this.viewer.scene.ViewFlag=!1)}.bind(this)))},_0x135d24.prototype.clear=function(){this.viewer.entities.removeAll(),this.viewshed3D.distance=.1,this.viewer.scene.ViewFlag=!0,this.pointHandler.clear()},_0x135d24.prototype.deactivate=function(){this.pointHandler.deactivate(),this.viewer.scene.ViewFlag=!0};var _0x1da2bf=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xcb6fe0=_0x1da2bf(void 0,(function(){return _0xcb6fe0.toString().search("(((.+)+)+)+$").toString().constructor(_0xcb6fe0).search("(((.+)+)+)+$")}));function _0x3359c6(e){if(!WebGLPlot.DrawHandler&&!WebGLPlot.SlopeSetting)throw new WebGLPlot.DeveloperError("SuperMap_DrawHandler SlopeSetting is required.");this.viewer=e,this.handlerPolygon=new WebGLPlot.DrawHandler(this.viewer,WebGLPlot.DrawMode.Polygon,1),this.slope=new WebGLPlot.SlopeSetting;var t=_0x2efbb7(this.viewer._element);this.handlerPolygon.activeEvt.addEventListener(function(e){1==e?(this.viewer.enableCursorStyle=!1,this.viewer._element.style.cursor="crosshair"):(this.viewer.enableCursorStyle=!0,this.viewer._element.style.cursor="")}.bind(this)),this.handlerPolygon.movingEvt.addEventListener((function(e){e.x<200&&e.y<150&&t.setVisible(!1)})),this.handlerPolygon.drawEvt.addEventListener(function(e){if(e.object.positions){var i=[].concat(e.object.positions);t.setVisible(!1);for(var n=[],r=0,o=i.length;r<o;r++){var a=WebGLPlot.Cartographic.fromCartesian(i[r]),s=WebGLPlot.CesiumMath.toDegrees(a.longitude),l=WebGLPlot.CesiumMath.toDegrees(a.latitude),u=a.height;-1==n.indexOf(s)&&-1==n.indexOf(l)&&(n.push(s),n.push(l),n.push(u))}this.slope.CoverageArea=n;var c=WebGLPlot.HypsometricSettingEnum.AnalysisRegionMode.ARM_REGION;this.viewer.scene.globe.SlopeSetting={slopeSetting:this.slope,analysisMode:c},this.handlerPolygon.polygon.show=!1,this.handlerPolygon.polyline.show=!0,this.handlerPolygon.deactivate(),this.handlerPolygon.activate()}else this.clear()}.bind(this))}function _0x2efbb7(e){var t=function(e){var t=document.createElement("DIV");t.className="twipsy right";var i=document.createElement("DIV");i.className="twipsy-arrow",t.appendChild(i);var n=document.createElement("DIV");n.className="twipsy-inner",t.appendChild(n),this._div=t,this._title=n,this.message="",e.appendChild(t);var r=this;t.onmousemove=function(e){r.showAt({x:e.clientX,y:e.clientY},r.message)}};return t.prototype.setVisible=function(e){this._div.style.display=e?"block":"none"},t.prototype.showAt=function(e,t){e&&t&&(this.setVisible(!0),this._title.innerHTML=t,this._div.style.left=e.x+10+"px",this._div.style.top=e.y-this._div.clientHeight/2+"px",this.message=t)},new t(e)}_0xcb6fe0(),_0x3359c6.prototype.activate=function(){if(this.slope){this.slope.DisplayMode=WebGLPlot.SlopeSettingEnum.DisplayMode.FACE_AND_ARROW,this.slope.MaxVisibleValue=78,this.slope.MinVisibleValue=0;var e=new WebGLPlot.ColorTable;e.insert(80,new WebGLPlot.Color(1,0,0)),e.insert(50,new WebGLPlot.Color(221/255,224/255,7/255)),e.insert(30,new WebGLPlot.Color(20/255,187/255,18/255)),e.insert(20,new WebGLPlot.Color(0,161/255,1)),e.insert(0,new WebGLPlot.Color(9/255,9/255,1)),this.slope.ColorTable=e,this.slope.Opacity=.5,this.handlerPolygon.activate()}},_0x3359c6.prototype.deactivate=function(){this.handlerPolygon.deactivate()},_0x3359c6.prototype.clear=function(){!this.slope||(this.slope.CoverageArea=[],null!=this.viewer.scene.globe.SlopeSetting.slopeSetting&&(this.viewer.scene.globe.SlopeSetting={slopeSetting:this.slope,analysisMode:WebGLPlot.HypsometricSettingEnum.AnalysisRegionMode.ARM_NONE},this.handlerPolygon.clear(),this.handlerPolygon.deactivate()))};var _0xa5c76b=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x148622=_0xa5c76b(void 0,(function(){return _0x148622.toString().search("(((.+)+)+)+$").toString().constructor(_0x148622).search("(((.+)+)+)+$")}));function _0x5dc5e7(e){null!=e&&(this.measurementTool=new _0x2d2c24(e),this.sightLineTool=new _0x2b31d2(e),this.viewshedTool=new _0x135d24(e),this.terrainSlopeTool=new _0x3359c6(e))}_0x148622(),_0x5dc5e7.prototype.activeDisMeasure=function(){this.measurementTool.calDistance()},_0x5dc5e7.prototype.activeAreaMeasure=function(){this.measurementTool.calArea()},_0x5dc5e7.prototype.activeHeightMeasure=function(){this.measurementTool.calHeight()},_0x5dc5e7.prototype.activeSightLine=function(){this.sightLineTool.activate()},_0x5dc5e7.prototype.activeViewShed=function(){this.viewshedTool.activate()},_0x5dc5e7.prototype.activeTerrainSlope=function(){this.terrainSlopeTool.activate()},_0x5dc5e7.prototype.clear=function(){this.measurementTool.clear(),this.sightLineTool.clear(),this.viewshedTool.clear(),this.terrainSlopeTool.clear()},_0x5dc5e7.prototype.deactivate=function(){this.measurementTool.deactiveAll(),this.sightLineTool.deactivate(),this.viewshedTool.deactivate(),this.terrainSlopeTool.deactivate()};var _0x5c92f9={extend:function(e){var t,i,n,r;for(i=1,n=arguments.length;i<n;i++)for(t in r=arguments[i])e[t]=r[t];return e},create:Object.create||function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=function(){var e=i(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var t=!0;return function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}}(),r=n(this,(function(){return r.toString().search("(((.+)+)+)+$").toString().constructor(r).search("(((.+)+)+)+$")}));function o(){}return r(),function(e){return o.prototype=e,new o}}(),bind:function(e,t){var i=Array.prototype.slice;if(e.bind)return e.bind.apply(e,i.call(arguments,1));var n=i.call(arguments,2);return function(){return e.apply(t,n.length?n.concat(i.call(arguments)):arguments)}},stamp:function(e){return e._leaflet_id=e._leaflet_id||++L.Util.lastId,e._leaflet_id},lastId:0,throttle:function(e,t,i){var n,r,o,a;return a=function(){n=!1,r&&(o.apply(i,r),r=!1)},o=function(){n?r=arguments:(e.apply(i,arguments),setTimeout(a,t),n=!0)},o},wrapNum:function(e,t,i){var n=t[1],r=t[0],o=n-r;return e===n&&i?e:((e-r)%o+o)%o+r},falseFn:function(){return!1},formatNum:function(e,t){var i=Math.pow(10,t||5);return Math.round(e*i)/i},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},splitWords:function(e){return _0x5c92f9.trim(e).split(/\s+/)},setOptions:function(e,t){for(var i in e.hasOwnProperty("options")||(e.options=e.options?_0x5c92f9.create(e.options):{}),t)e.options[i]=t[i];return e.options},getParamString:function(e,t,i){var n=[];for(var r in e)n.push(encodeURIComponent(i?r.toUpperCase():r)+"="+encodeURIComponent(e[r]));return(t&&-1!==t.indexOf("?")?"&":"?")+n.join("&")},template:function(e,t){return e.replace(_0x5c92f9.templateRe,(function(e,i){var n=t[i];if(void 0===n)throw new Error("No value provided for variable "+e);return"function"==typeof n&&(n=n(t)),n}))},templateRe:/\{ *([\w_\-]+) *\}/g,isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},indexOf:function(e,t){for(var i=0;i<e.length;i++)if(e[i]===t)return i;return-1},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},_0x5621d2=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1cea94=_0x5621d2(void 0,(function(){return _0x1cea94.toString().search("(((.+)+)+)+$").toString().constructor(_0x1cea94).search("(((.+)+)+)+$")}));function _0xeadc24(){}_0x1cea94(),_0xeadc24.extend=function(e){var t=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=t.__super__=this.prototype,n=_0x5c92f9.create(i);for(var r in n.constructor=t,t.prototype=n,this)this.hasOwnProperty(r)&&"prototype"!==r&&(t[r]=this[r]);return e.statics&&(_0x5c92f9.extend(t,e.statics),delete e.statics),e.includes&&(_0x5c92f9.extend.apply(null,[n].concat(e.includes)),delete e.includes),n.options&&(e.options=_0x5c92f9.extend(_0x5c92f9.create(n.options),e.options)),_0x5c92f9.extend(n,e),n._initHooks=[],n.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var e=0,t=n._initHooks.length;e<t;e++)n._initHooks[e].call(this)}},t},_0xeadc24.include=function(e){return _0x5c92f9.extend(this.prototype,e),this},_0xeadc24.mergeOptions=function(e){return _0x5c92f9.extend(this.prototype.options,e),this},_0xeadc24.addInitHook=function(e){var t=Array.prototype.slice.call(arguments,1),i="function"==typeof e?e:function(){this[e].apply(this,t)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var _0x57844b=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x547571=_0x57844b(void 0,(function(){return _0x547571.toString().search("(((.+)+)+)+$").toString().constructor(_0x547571).search("(((.+)+)+)+$")}));_0x547571();var _0x42561c=_0xeadc24.extend({on:function(e,t,i){if("object"==typeof e)for(var n in e)this._on(n,e[n],t);else for(var r=0,o=(e=_0x5c92f9.splitWords(e)).length;r<o;r++)this._on(e[r],t,i);return this},off:function(e,t,i){if(e)if("object"==typeof e)for(var n in e)this._off(n,e[n],t);else for(var r=0,o=(e=_0x5c92f9.splitWords(e)).length;r<o;r++)this._off(e[r],t,i);else delete this._events;return this},_on:function(e,t,i){this._events=this._events||{};var n=this._events[e];n||(n=[],this._events[e]=n),i===this&&(i=void 0);for(var r={fn:t,ctx:i},o=n,a=0,s=o.length;a<s;a++)if(o[a].fn===t&&o[a].ctx===i)return;o.push(r)},_off:function(e,t,i){var n,r,o;if(this._events&&(n=this._events[e])){if(!t){for(r=0,o=n.length;r<o;r++)n[r].fn=_0x5c92f9.falseFn;return void delete this._events[e]}if(i===this&&(i=void 0),n)for(r=0,o=n.length;r<o;r++){var a=n[r];if(a.ctx===i&&a.fn===t)return a.fn=_0x5c92f9.falseFn,this._firingCount&&(this._events[e]=n=n.slice()),void n.splice(r,1)}}},fire:function(e,t,i){if(!this.listens(e,i))return this;var n=_0x5c92f9.extend({},t,{type:e,target:this});if(this._events){var r=this._events[e];if(r){this._firingCount=this._firingCount+1||1;for(var o=0,a=r.length;o<a;o++){var s=r[o];s.fn.call(s.ctx||this,n)}this._firingCount--}}return i&&this._propagateEvent(n),this},listens:function(e,t){var i=this._events&&this._events[e];if(i&&i.length)return!0;if(t)for(var n in this._eventParents)if(this._eventParents[n].listens(e,t))return!0;return!1},once:function(e,t,i){if("object"==typeof e){for(var n in e)this.once(n,e[n],t);return this}var r=_0x5c92f9.bind((function(){this.off(e,t,i).off(e,r,i)}),this);return this.on(e,t,i).on(e,r,i)},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[_0x5c92f9.stamp(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[_0x5c92f9.stamp(e)],this},_propagateEvent:function(e){for(var t in this._eventParents)this._eventParents[t].fire(e.type,_0x5c92f9.extend({layer:e.target},e),!0)}}),_0xcc49b4=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x10d6b4=_0xcc49b4(void 0,(function(){return _0x10d6b4.toString().search("(((.+)+)+)+$").toString().constructor(_0x10d6b4).search("(((.+)+)+)+$")}));_0x10d6b4();class ServiceBase extends _0x42561c{constructor(e,t){super(),e&&(e=e.indexOf("/")!==e.length-1?e:e.substr(0,e.length-1)),this.url=e,_0x5c92f9.setOptions(this,t),this.fire("initialized",this)}destroy(){this.fire("destroy",this)}}var _0x49d5c3=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x6e8a4a=_0x49d5c3(void 0,(function(){return _0x6e8a4a.toString().search("(((.+)+)+)+$").toString().constructor(_0x6e8a4a).search("(((.+)+)+)+$")}));_0x6e8a4a();var _0x1adab2={GEOJSON:"GEOJSON",ISERVER:"ISERVER"};class NetworkAnalystServiceBase extends _0x36bd7a{constructor(e,t){super(e,t),this.format=_0x1adab2.GEOJSON,this.CLASS_NAME="SuperMap.NetworkAnalystServiceBase"}destroy(){super.destroy(),this.format=null}serviceProcessCompleted(e){var t,i=this;(e=_0x421c56.transformResult(e))&&i.format===_0x1adab2.GEOJSON&&"function"==typeof i.toGeoJSONResult&&(t=i.toGeoJSONResult(e)),t||(t=e),i.events.triggerEvent("processCompleted",{result:t})}toGeoJSONResult(e){return null}}function _0x27e7d4(){}_0x27e7d4.extend=function(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&(e.toString=t.toString)}return e},_0x27e7d4.copy=function(e,t){var i;if(e=e||{},t)for(var n in e)typeof(i=t[n])<"u"&&(e[n]=i)},_0x27e7d4.reset=function(e){for(var t in e=e||{})if(e.hasOwnProperty(t)){if("object"===_typeof(e[t])&&e[t]instanceof Array){for(var i in e[t])e[t][i].destroy&&e[t][i].destroy();e[t].length=0}else"object"===_typeof(e[t])&&e[t]instanceof Object&&e[t].destroy&&e[t].destroy();e[t]=null}},_0x27e7d4.getElement=function(){for(var e=[],t=0,i=arguments.length;t<i;t++){var n=arguments[t];if("string"==typeof n&&(n=document.getElementById(n)),1===arguments.length)return n;e.push(n)}return e},_0x27e7d4.isElement=function(e){return!(!e||1!==e.nodeType)},_0x27e7d4.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},_0x27e7d4.removeItem=function(e,t){for(var i=e.length-1;i>=0;i--)e[i]===t&&e.splice(i,1);return e},_0x27e7d4.indexOf=function(e,t){if(null==e)return-1;if("function"==typeof e.indexOf)return e.indexOf(t);for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},_0x27e7d4.modifyDOMElement=function(e,t,i,n,r,o,a,s){t&&(e.id=t),i&&(e.style.left=i.x+"px",e.style.top=i.y+"px"),n&&(e.style.width=n.w+"px",e.style.height=n.h+"px"),r&&(e.style.position=r),o&&(e.style.border=o),a&&(e.style.overflow=a),parseFloat(s)>=0&&parseFloat(s)<1?(e.style.filter="alpha(opacity="+100*s+")",e.style.opacity=s):1===parseFloat(s)&&(e.style.filter="",e.style.opacity="")},_0x27e7d4.applyDefaults=function(e,t){e=e||{};var i="function"==typeof window.Event&&t instanceof window.Event;for(var n in t)(void 0===e[n]||!i&&t.hasOwnProperty&&t.hasOwnProperty(n)&&!e.hasOwnProperty(n))&&(e[n]=t[n]);return!i&&t&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")&&(e.toString=t.toString),e},_0x27e7d4.getParameterString=function(e){var t=[];for(var i in e){var n,r=e[i];if(null!=r&&"function"!=typeof r)n=Array.isArray(r)||"[object Object]"===r.toString()?encodeURIComponent(JSON.stringify(r)):encodeURIComponent(r),t.push(encodeURIComponent(i)+"="+n)}return t.join("&")},_0x27e7d4.urlAppend=function(e,t){var i=e;if(t){0===t.indexOf("?")&&(t=t.substring(1));var n=(e+" ").split(/[?&]/);i+=" "===n.pop()?t:n.length?"&"+t:"?"+t}return i},_0x27e7d4.urlPathAppend=function(e,t){var i=e;if(!t)return i;0===t.indexOf("/")&&(t=t.substring(1));var n=e.split("?");return n[0].indexOf("/",n[0].length-1)<0&&(n[0]+="/"),i="".concat(n[0]).concat(t).concat(n.length>1?"?".concat(n[1]):"")},_0x27e7d4.DEFAULT_PRECISION=14,_0x27e7d4.toFloat=function(e,t){return null==t&&(t=_0x27e7d4.DEFAULT_PRECISION),"number"!=typeof e&&(e=parseFloat(e)),0===t?e:parseFloat(e.toPrecision(t))},_0x27e7d4.rad=function(e){return e*Math.PI/180},_0x27e7d4.getParameters=function(e){e=e??window.location.href;var t="";if(StringExt.contains(e,"?")){var i=e.indexOf("?")+1,n=StringExt.contains(e,"#")?e.indexOf("#"):e.length;t=e.substring(i,n)}for(var r={},o=t.split(/[&;]/),a=0,s=o.length;a<s;++a){var l=o[a].split("=");if(l[0]){var u=l[0];try{u=decodeURIComponent(u)}catch{u=unescape(u)}var c=(l[1]||"").replace(/\+/g," ");try{c=decodeURIComponent(c)}catch{c=unescape(c)}1==(c=c.split(",")).length&&(c=c[0]),r[u]=c}}return r},_0x27e7d4.lastSeqID=0,_0x27e7d4.createUniqueID=function(e){return null==e&&(e="id_"),_0x27e7d4.lastSeqID+=1,e+_0x27e7d4.lastSeqID},_0x27e7d4.normalizeScale=function(e){return e>1?1/e:e},_0x27e7d4.getResolutionFromScale=function(e,t){var i;e&&(null==t&&(t="degrees"),i=1/(_0x27e7d4.normalizeScale(e)*_0x47c7fb[t]*_0x50b4e));return i},_0x27e7d4.getScaleFromResolution=function(e,t){return null==t&&(t="degrees"),e*_0x47c7fb[t]*_0x50b4e},_0x27e7d4.getBrowser=function(){return _0x5c9faa},_0x27e7d4.isSupportCanvas=_0x259670,_0x27e7d4.supportCanvas=function(){return _0x27e7d4.isSupportCanvas},_0x27e7d4.isInTheSameDomain=function(e){if(!e)return!0;var t=e.indexOf("//"),i=document.location.toString(),n=i.indexOf("//");if(-1===t)return!0;var r,o=r=e.substring(0,t),a=i.substring(n+2);n=a.indexOf("/");var s=a.indexOf(":"),l=a.substring(0,n),u=document.location.protocol;if(-1!==s||(l+=":"+("http:"===u.toLowerCase()?80:443)),u.toLowerCase()!==o.toLowerCase())return!1;var c=(o=e.substring(t+2)).indexOf(":");t=o.indexOf("/");var h,d=o.substring(0,t);return-1!==c?h=o.substring(0,c):(h=o.substring(0,t),d+=":"+("http:"===r.toLowerCase()?80:443)),h===document.domain&&d===l},_0x27e7d4.calculateDpi=function(e,t,i,n,r){if(e&&t&&i){var o,a=1e4,s=e.getWidth(),l=e.getHeight(),u=t.w,c=t.h;if(r=r||6378137,"degree"===(n=n||"degrees").toLowerCase()||"degrees"===n.toLowerCase()||"dd"===n.toLowerCase()){var h=s/u,d=l/c;o=254/(h>d?h:d)/i/(2*Math.PI*r/360)/a}else{o=254/(s/u)/i/a}return o}},_0x27e7d4.toJSON=function(e){var t=e;if(null==t)return null;switch(t.constructor){case String:return t=(t=(t=(t=(t=(t=(t='"'+t.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%25")).replace(/&/g,"%26");case Array:for(var i="",n=0,r=t.length;n<r;n++)i+=_0x27e7d4.toJSON(t[n]),n!==t.length-1&&(i+=",");return"["+i+"]";case Number:return isFinite(t)?String(t):null;case Boolean:return String(t);case Date:return"{'__type':\"System.DateTime\",'Year':"+t.getFullYear()+",'Month':"+(t.getMonth()+1)+",'Day':"+t.getDate()+",'Hour':"+t.getHours()+",'Minute':"+t.getMinutes()+",'Second':"+t.getSeconds()+",'Millisecond':"+t.getMilliseconds()+",'TimezoneOffset':"+t.getTimezoneOffset()+"}";default:if(null!=t.toJSON&&"function"==typeof t.toJSON)return t.toJSON();if("object"===_typeof(t)){if(t.length){for(var o=[],a=0,s=t.length;a<s;a++)o.push(_0x27e7d4.toJSON(t[a]));return"["+o.join(",")+"]"}var l=[];for(var u in t)"function"!=typeof t[u]&&"CLASS_NAME"!==u&&"parent"!==u&&l.push("'"+u+"':"+_0x27e7d4.toJSON(t[u]));return l.length>0?"{"+l.join(",")+"}":"{}"}return t.toString()}},_0x27e7d4.getResolutionFromScaleDpi=function(e,t,i,n){var r=1e4;return n=n||6378137,i=i||"",e>0&&t>0?(e=_0x27e7d4.normalizeScale(e),"degree"===i.toLowerCase()||"degrees"===i.toLowerCase()||"dd"===i.toLowerCase()?254/t/e/(2*Math.PI*n/360)/r:254/t/e/r):-1},_0x27e7d4.getScaleFromResolutionDpi=function(e,t,i,n){var r=1e4;return n=n||6378137,i=i||"",e>0&&t>0?"degree"===i.toLowerCase()||"degrees"===i.toLowerCase()||"dd"===i.toLowerCase()?254/t/e/(2*Math.PI*n/360)/r:254/t/e/r:-1},_0x27e7d4.transformResult=function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},_0x27e7d4.copyAttributes=function(e,t){if(e=e||{},t)for(var i in t){var n=t[i];void 0!==n&&"CLASS_NAME"!==i&&"function"!=typeof n&&(e[i]=n)}return e},_0x27e7d4.copyAttributesWithClip=function(e,t,i){if(e=e||{},t)for(var n in t){var r=!1;if(i&&i.length)for(var o=0,a=i.length;o<a;o++)if(n===i[o]){r=!0;break}if(!0!==r){var s=t[n];void 0!==s&&"CLASS_NAME"!==n&&"function"!=typeof s&&(e[n]=s)}}return e},_0x27e7d4.cloneObject=function(e){if(null===e||"object"!==_typeof(e))return e;if(e instanceof Date){var t=new Date;return t.setTime(e.getTime()),t}if(e instanceof Array)return e.slice(0);if(e instanceof Object){var i={};for(var n in e)e.hasOwnProperty(n)&&(i[n]=_0x27e7d4.cloneObject(e[n]));return i}throw new Error("Unable to copy obj! Its type isn't supported.")},_0x27e7d4.lineIntersection=function(e,t,i,n){var r,o,a=null,s=(n.x-i.x)*(e.y-i.y)-(n.y-i.y)*(e.x-i.x),l=(t.x-e.x)*(e.y-i.y)-(t.y-e.y)*(e.x-i.x),u=(n.y-i.y)*(t.x-e.x)-(n.x-i.x)*(t.y-e.y);if(0!=u)o=l/u,a=(r=s/u)>=0&&o<=1&&r<=1&&o>=0?new Geometry.Point(e.x+r*(t.x-e.x),e.y+r*(t.y-e.y)):"No Intersection";else if(0==s&&0==l){var c=Math.max(e.y,t.y),h=Math.min(e.y,t.y),d=Math.max(e.x,t.x),f=Math.min(e.x,t.x);a=(i.y>=h&&i.y<=c||n.y>=h&&n.y<=c)&&i.x>=f&&i.x<=d||n.x>=f&&n.x<=d?"Coincident":"Parallel"}else a="Parallel";return a},_0x27e7d4.getTextBounds=function(e,t,i){document.body.appendChild(i),i.style.width="auto",i.style.height="auto",e.fontSize&&(i.style.fontSize=e.fontSize),e.fontFamily&&(i.style.fontFamily=e.fontFamily),e.fontWeight&&(i.style.fontWeight=e.fontWeight),i.style.position="relative",i.style.visibility="hidden",i.style.display="inline-block",i.innerHTML=t;var n=i.clientWidth,r=i.clientHeight;return document.body.removeChild(i),{textWidth:n,textHeight:r}},_0x27e7d4.convertPath=function(e,t){return t?e.replace(/\{([\w-\.]+)\}/g,(function(e,i){var n;return n=t.hasOwnProperty(i)?paramToString(t[i]):e,encodeURIComponent(n)})):e};var _0x50b4e=96,_0x47c7fb={inches:1,ft:12,mi:63360,m:39.3701,km:39370.1,dd:4374754,yd:36};_0x47c7fb.in=_0x47c7fb.inches,_0x47c7fb.degrees=_0x47c7fb.dd,_0x47c7fb.nmi=1852*_0x47c7fb.m;var _0x5c9faa=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=function(){var e=i(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var t=!0;return function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}}(),r=n(this,(function(){return r.toString().search("(((.+)+)+)+$").toString().constructor(r).search("(((.+)+)+)+$")}));r();var o,a="",s="",l="pc",u=navigator.userAgent.toLowerCase();return u.indexOf("msie")>-1||u.indexOf("trident")>-1&&u.indexOf("rv")>-1?(a="msie",o=u.match(/msie ([\d.]+)/)||u.match(/rv:([\d.]+)/)):u.indexOf("chrome")>-1?(a="chrome",o=u.match(/chrome\/([\d.]+)/)):u.indexOf("firefox")>-1?(a="firefox",o=u.match(/firefox\/([\d.]+)/)):u.indexOf("opera")>-1?(a="opera",o=u.match(/version\/([\d.]+)/)):u.indexOf("safari")>-1&&(a="safari",o=u.match(/version\/([\d.]+)/)),s=o?o[1]:"",u.indexOf("ipad")>-1||u.indexOf("ipod")>-1||u.indexOf("iphone")>-1?l="apple":u.indexOf("android")>-1&&(s=(o=u.match(/version\/([\d.]+)/))?o[1]:"",l="android"),{name:a,version:s,device:l}}(),_0x259670=(_0x5eb3d0=!0,_0x173038=_0x5c9faa,document.createElement("canvas").getContext?("firefox"===_0x173038.name&&parseFloat(_0x173038.version)<5&&(_0x5eb3d0=!1),"safari"===_0x173038.name&&parseFloat(_0x173038.version)<4&&(_0x5eb3d0=!1),"opera"===_0x173038.name&&parseFloat(_0x173038.version)<10&&(_0x5eb3d0=!1),"msie"===_0x173038.name&&parseFloat(_0x173038.version)<9&&(_0x5eb3d0=!1)):_0x5eb3d0=!1,_0x5eb3d0),_0x5eb3d0,_0x173038,_0x5a8526=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x57651a=_0x5a8526(void 0,(function(){return _0x57651a.toString().search("(((.+)+)+)+$").toString().constructor(_0x57651a).search("(((.+)+)+)+$")}));_0x57651a();class BurstPipelineAnalystService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.BurstPipelineAnalystService"}destroy(){super.destroy()}processAsync(e){if(!(e instanceof BurstPipelineAnalystParameters))return null;var t,i=this;if(i.url=_0x27e7d4.urlPathAppend(i.url,"burstAnalyse"),t={sourceNodeIDs:e.sourceNodeIDs,isUncertainDirectionValid:e.isUncertainDirectionValid},null!==e.edgeID&&null!==e.nodeID)throw new Error("edgeID and nodeID cannot be null at the same time.");if(null===e.edgeID&&null===e.nodeID)throw new Error("edgeID and nodeID cannot be null at the same time.");null!==e.edgeID?t.edgeID=e.edgeID:t.nodeID=e.nodeID,i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}var _0x16acab=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x279818=_0x16acab(void 0,(function(){return _0x279818.toString().search("(((.+)+)+)+$").toString().constructor(_0x279818).search("(((.+)+)+)+$")}));_0x279818();class TransportationAnalystResultSetting{constructor(e){!e||(this.returnEdgeFeatures=!1,this.returnEdgeGeometry=!1,this.returnEdgeIDs=!1,this.returnNodeFeatures=!1,this.returnNodeGeometry=!1,this.returnNodeIDs=!1,this.returnPathGuides=!1,this.returnRoutes=!1,_0x421c56.extend(this,e),this.CLASS_NAME="SuperMap.TransportationAnalystResultSetting")}destroy(){var e=this;e.returnEdgeFeatures=null,e.returnEdgeGeometry=null,e.returnEdgeIDs=null,e.returnNodeFeatures=null,e.returnNodeGeometry=null,e.returnNodeIDs=null,e.returnPathGuides=null,e.returnRoutes=null}}var _0x363c40=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x4f3cbe=_0x363c40(void 0,(function(){return _0x4f3cbe.toString().search("(((.+)+)+)+$").toString().constructor(_0x4f3cbe).search("(((.+)+)+)+$")}));_0x4f3cbe();class TransportationAnalystParameter{constructor(e){!e||(this.barrierEdgeIDs=null,this.barrierNodeIDs=null,this.barrierPoints=null,this.weightFieldName=null,this.turnWeightField=null,this.resultSetting=new TransportationAnalystResultSetting,_0x421c56.extend(this,e),this.CLASS_NAME="SuperMap.TransportationAnalystParameter")}destroy(){var e=this;if(e.barrierEdgeIDs=null,e.barrierNodeIDs=null,e.weightFieldName=null,e.turnWeightField=null,e.resultSetting&&(e.resultSetting.destroy(),e.resultSetting=null),e.barrierPoints&&e.barrierPoints.length)for(var t in e.barrierPoints)e.barrierPoints[t].destroy();e.barrierPoints=null}}var _0x4ca474=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2f58ac=_0x4ca474(void 0,(function(){return _0x2f58ac.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f58ac).search("(((.+)+)+)+$")}));_0x2f58ac();class ComputeWeightMatrixParameters{constructor(e){this.isAnalyzeById=!1,this.nodes=null,this.parameter=new TransportationAnalystParameter,_0x421c56.extend(this,e),this.CLASS_NAME="SuperMap.ComputeWeightMatrixParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}var _0x10453e=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2f05de=_0x10453e(void 0,(function(){return _0x2f05de.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f05de).search("(((.+)+)+)+$")}));_0x2f05de();class ComputeWeightMatrixService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.ComputeWeightMatrixService"}destroy(){super.destroy()}processAsync(e){if(e instanceof ComputeWeightMatrixParameters){var t,i=this;i.url=_0x27e7d4.urlPathAppend(i.url,"weightmatrix"),t={parameter:_0x421c56.toJSON(e.parameter),nodes:i.getJson(e.isAnalyzeById,e.nodes)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",n=t?t.length:0;if(!1===e)for(var r=0;r<n;r++)r>0&&(i+=","),i+='{"x":'+t[r].x+',"y":'+t[r].y+"}";else if(!0===e)for(var o=0;o<n;o++)o>0&&(i+=","),i+=t[o];return i+="]"}}var _0x5064f5=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x8e4ce=_0x5064f5(void 0,(function(){return _0x8e4ce.toString().search("(((.+)+)+)+$").toString().constructor(_0x8e4ce).search("(((.+)+)+)+$")}));_0x8e4ce();class _0xe0357d{constructor(e,t,i,n){_0x421c56.isArray(e)&&(n=e[3],i=e[2],t=e[1],e=e[0]),this.left=null!=e?_0x421c56.toFloat(e):this.left,this.bottom=null!=t?_0x421c56.toFloat(t):this.bottom,this.right=null!=i?_0x421c56.toFloat(i):this.right,this.top=null!=n?_0x421c56.toFloat(n):this.top,this.centerLonLat=null,this.CLASS_NAME="SuperMap.Bounds"}clone(){return new _0xe0357d(this.left,this.bottom,this.right,this.top)}equals(e){var t=!1;return null!=e&&(t=this.left===e.left&&this.right===e.right&&this.top===e.top&&this.bottom===e.bottom),t}toString(){return[this.left,this.bottom,this.right,this.top].join(",")}toArray(e){return!0===e?[this.bottom,this.left,this.top,this.right]:[this.left,this.bottom,this.right,this.top]}toBBOX(e,t){null==e&&(e=6);var i=Math.pow(10,e),n=Math.round(this.left*i)/i,r=Math.round(this.bottom*i)/i,o=Math.round(this.right*i)/i,a=Math.round(this.top*i)/i;return!0===t?r+","+n+","+a+","+o:n+","+r+","+o+","+a}getWidth(){return this.right-this.left}getHeight(){return this.top-this.bottom}getSize(){return new Size(this.getWidth(),this.getHeight())}getCenterPixel(){return new Pixel((this.left+this.right)/2,(this.bottom+this.top)/2)}getCenterLonLat(){return this.centerLonLat||(this.centerLonLat=new LonLat((this.left+this.right)/2,(this.bottom+this.top)/2)),this.centerLonLat}scale(e,t){var i,n;e=e||1,null==t&&(t=this.getCenterLonLat()),"SuperMap.LonLat"===t.CLASS_NAME?(i=t.lon,n=t.lat):(i=t.x,n=t.y);var r=(this.left-i)*e+i,o=(this.bottom-n)*e+n,a=(this.right-i)*e+i,s=(this.top-n)*e+n;return new _0xe0357d(r,o,a,s)}add(e,t){if(null==e||null==t)throw new TypeError("Bounds.add cannot receive null values");return new _0xe0357d(this.left+e,this.bottom+t,this.right+e,this.top+t)}extend(e){var t=null;if(e){switch(e.CLASS_NAME){case"SuperMap.LonLat":t=new _0xe0357d(e.lon,e.lat,e.lon,e.lat);break;case"SuperMap.Geometry.Point":t=new _0xe0357d(e.x,e.y,e.x,e.y);break;case"SuperMap.Bounds":t=e}t&&(this.centerLonLat=null,(null==this.left||t.left<this.left)&&(this.left=t.left),(null==this.bottom||t.bottom<this.bottom)&&(this.bottom=t.bottom),(null==this.right||t.right>this.right)&&(this.right=t.right),(null==this.top||t.top>this.top)&&(this.top=t.top))}}containsLonLat(e,t){"boolean"==typeof t&&(t={inclusive:t}),t=t||{};var i=this.contains(e.lon,e.lat,t.inclusive),n=t.worldBounds;if(n&&!i){var r=n.getWidth(),o=(n.left+n.right)/2,a=Math.round((e.lon-o)/r);i=this.containsLonLat({lon:e.lon-a*r,lat:e.lat},{inclusive:t.inclusive})}return i}containsPixel(e,t){return this.contains(e.x,e.y,t)}contains(e,t,i){if(null==i&&(i=!0),null==e||null==t)return!1;return i?e>=this.left&&e<=this.right&&t>=this.bottom&&t<=this.top:e>this.left&&e<this.right&&t>this.bottom&&t<this.top}intersectsBounds(e,t){if("boolean"==typeof t&&(t={inclusive:t}),(t=t||{}).worldBounds){var i=this.wrapDateLine(t.worldBounds);e=e.wrapDateLine(t.worldBounds)}else i=this;null==t.inclusive&&(t.inclusive=!0);var n=!1,r=i.left===e.right||i.right===e.left||i.top===e.bottom||i.bottom===e.top;if(t.inclusive||!r){var o=e.bottom>=i.bottom&&e.bottom<=i.top||i.bottom>=e.bottom&&i.bottom<=e.top,a=e.top>=i.bottom&&e.top<=i.top||i.top>e.bottom&&i.top<e.top,s=e.left>=i.left&&e.left<=i.right||i.left>=e.left&&i.left<=e.right,l=e.right>=i.left&&e.right<=i.right||i.right>=e.left&&i.right<=e.right;n=(o||a)&&(s||l)}if(t.worldBounds&&!n){var u=t.worldBounds,c=u.getWidth(),h=!u.containsBounds(i),d=!u.containsBounds(e);h&&!d?(e=e.add(-c,0),n=i.intersectsBounds(e,{inclusive:t.inclusive})):d&&!h&&(i=i.add(-c,0),n=e.intersectsBounds(i,{inclusive:t.inclusive}))}return n}containsBounds(e,t,i){null==t&&(t=!1),null==i&&(i=!0);var n=this.contains(e.left,e.bottom,i),r=this.contains(e.right,e.bottom,i),o=this.contains(e.left,e.top,i),a=this.contains(e.right,e.top,i);return t?n||r||o||a:n&&r&&o&&a}determineQuadrant(e){var t="",i=this.getCenterLonLat();return t+=e.lat<i.lat?"b":"t",t+=e.lon<i.lon?"l":"r"}wrapDateLine(e,t){var i=(t=t||{}).leftTolerance||0,n=t.rightTolerance||0,r=this.clone();if(e){for(var o=e.getWidth();r.left<e.left&&r.right-n<=e.left;)r=r.add(o,0);for(;r.left+i>=e.right&&r.right>e.right;)r=r.add(-o,0);var a=r.left+i;a<e.right&&a>e.left&&r.right-n>e.right&&(r=r.add(-o,0))}return r}toServerJSONObject(){return{rightTop:{x:this.right,y:this.top},leftBottom:{x:this.left,y:this.bottom},left:this.left,right:this.right,top:this.top,bottom:this.bottom}}destroy(){this.left=null,this.right=null,this.top=null,this.bottom=null,this.centerLonLat=null}fromString(e,t){var i=e.split(",");return _0xe0357d.fromArray(i,t)}fromArray(e,t){return!0===t?new _0xe0357d(e[1],e[0],e[3],e[2]):new _0xe0357d(e[0],e[1],e[2],e[3])}fromSize(e){return new _0xe0357d(0,e.h,e.w,0)}oppositeQuadrant(e){var t="";return t+="t"===e.charAt(0)?"b":"t",t+="l"===e.charAt(1)?"r":"l"}}var _0xf20265=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x21ff39=_0xf20265(void 0,(function(){return _0x21ff39.toString().search("(((.+)+)+)+$").toString().constructor(_0x21ff39).search("(((.+)+)+)+$")}));_0x21ff39();class _0x2c4bf1{constructor(){this.CLASS_NAME="SuperMap.GeometryServer",this.id=_0x421c56.createUniqueID(this.CLASS_NAME+"_"),this.parent=null,this.bounds=null,this.SRID=null}destroy(){this.id=null,this.bounds=null,this.SRID=null}clone(){return new _0x2c4bf1}setBounds(e){e&&(this.bounds=e.clone())}clearBounds(){this.bounds=null,this.parent&&this.parent.clearBounds()}extendBounds(e){this.getBounds()?this.bounds.extend(e):this.setBounds(e)}getBounds(){return null==this.bounds&&this.calculateBounds(),this.bounds}calculateBounds(){}getVertices(e){}getArea(){return 0}}var _0x3b15c9=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x26ccb8=_0x3b15c9(void 0,(function(){return _0x26ccb8.toString().search("(((.+)+)+)+$").toString().constructor(_0x26ccb8).search("(((.+)+)+)+$")}));_0x26ccb8();class Collection$1 extends _0x2c4bf1{constructor(e){super(),this.components=[],this.componentTypes=null,null!=e&&this.addComponents(e),this.CLASS_NAME="SuperMap.Geometry.Collection",this.geometryType="Collection"}destroy(){this.components.length=0,this.components=null,super.destroy()}clone(){for(var e=new Collection$1,t=0,i=this.components.length;t<i;t++)e.addComponent(this.components[t].clone());return _0x421c56.applyDefaults(e,this),e}getComponentsString(){for(var e=[],t=0,i=this.components.length;t<i;t++)e.push(this.components[t].toShortString());return e.join(",")}calculateBounds(){this.bounds=null;var e=new _0xe0357d,t=this.components;if(t)for(var i=0,n=t.length;i<n;i++)e.extend(t[i].getBounds());null!=e.left&&null!=e.bottom&&null!=e.right&&null!=e.top&&this.setBounds(e)}addComponents(e){_0x421c56.isArray(e)||(e=[e]);for(var t=0,i=e.length;t<i;t++)this.addComponent(e[t])}addComponent(e,t){var i=!1;if(e&&(null==this.componentTypes||_0x421c56.indexOf(this.componentTypes,e.CLASS_NAME)>-1)){if(null!=t&&t<this.components.length){var n=this.components.slice(0,t),r=this.components.slice(t,this.components.length);n.push(e),this.components=n.concat(r)}else this.components.push(e);e.parent=this,this.clearBounds(),i=!0}return i}removeComponents(e){var t=!1;_0x421c56.isArray(e)||(e=[e]);for(var i=e.length-1;i>=0;--i)t=this.removeComponent(e[i])||t;return t}removeComponent(e){return _0x421c56.removeItem(this.components,e),this.clearBounds(),!0}getArea(){for(var e=0,t=0,i=this.components.length;t<i;t++)e+=this.components[t].getArea();return e}equals(e){var t=!0;if(e&&e.CLASS_NAME&&this.CLASS_NAME===e.CLASS_NAME)if(_0x421c56.isArray(e.components)&&e.components.length===this.components.length){for(var i=0,n=this.components.length;i<n;++i)if(!this.components[i].equals(e.components[i])){t=!1;break}}else t=!1;else t=!1;return t}getVertices(e){for(var t=[],i=0,n=this.components.length;i<n;++i)Array.prototype.push.apply(t,this.components[i].getVertices(e));return t}}var _0x5850f2=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x528a0a=_0x5850f2(void 0,(function(){return _0x528a0a.toString().search("(((.+)+)+)+$").toString().constructor(_0x528a0a).search("(((.+)+)+)+$")}));_0x528a0a();class MultiPolygon extends Collection$1{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Polygon"],this.CLASS_NAME="SuperMap.Geometry.MultiPolygon",this.geometryType="MultiPolygon"}}var _0x3bb67e=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2a8c4d=_0x3bb67e(void 0,(function(){return _0x2a8c4d.toString().search("(((.+)+)+)+$").toString().constructor(_0x2a8c4d).search("(((.+)+)+)+$")}));_0x2a8c4d();class Point$1 extends _0x2c4bf1{constructor(e,t,i,n){super(e,t,i,n),this.x=parseFloat(e),this.y=parseFloat(t),this.tag=n||0==n?parseFloat(n):null,this.type=i||"Point",this.CLASS_NAME="SuperMap.Geometry.Point",this.geometryType="Point"}clone(e){return null==e&&(e=new Point$1(this.x,this.y)),_0x421c56.applyDefaults(e,this),e}calculateBounds(){this.bounds=new _0xe0357d(this.x,this.y,this.x,this.y)}equals(e){var t=!1;return null!=e&&(t=this.x===e.x&&this.y===e.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(e.x)&&isNaN(e.y)),t}move(e,t){this.x=this.x+e,this.y=this.y+t,this.clearBounds()}toShortString(){return this.x+", "+this.y}destroy(){this.x=null,this.y=null,this.tag=null,super.destroy()}getVertices(){return[this]}}var _0x3763aa=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x163556=_0x3763aa(void 0,(function(){return _0x163556.toString().search("(((.+)+)+)+$").toString().constructor(_0x163556).search("(((.+)+)+)+$")}));_0x163556();class MultiPoint extends Collection$1{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point"],this.CLASS_NAME="SuperMap.Geometry.MultiPoint",this.geometryType="MultiPoint"}addPoint(e,t){this.addComponent(e,t)}removePoint(e){this.removeComponent(e)}}var _0x23daac=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xa12f76=_0x23daac(void 0,(function(){return _0xa12f76.toString().search("(((.+)+)+)+$").toString().constructor(_0xa12f76).search("(((.+)+)+)+$")}));_0xa12f76();class Curve extends MultiPoint{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point","SuperMap.PointWithMeasure"],this.CLASS_NAME="SuperMap.Geometry.Curve",this.geometryType="Curve"}}var _0x544a1d=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x33aa5f=_0x544a1d(void 0,(function(){return _0x33aa5f.toString().search("(((.+)+)+)+$").toString().constructor(_0x33aa5f).search("(((.+)+)+)+$")}));_0x33aa5f();class LineString extends Curve{constructor(e){super(e),this.CLASS_NAME="SuperMap.Geometry.LineString",this.geometryType="LineString"}removeComponent(e){var t=this.components&&this.components.length>2;return t&&LineString_get(LineString_getPrototypeOf(LineString.prototype),"removeComponent",this).apply(this,arguments),t}getSortedSegments(){for(var e,t,i=this.components.length-1,n=new Array(i),r=0;r<i;++r)e=this.components[r],t=this.components[r+1],e.x<t.x?n[r]={x1:e.x,y1:e.y,x2:t.x,y2:t.y}:n[r]={x1:t.x,y1:t.y,x2:e.x,y2:e.y};return n.sort((function(e,t){return e.x1-t.x1}))}getVertices(e){return!0===e?[this.components[0],this.components[this.components.length-1]]:!1===e?this.components.slice(1,this.components.length-1):this.components.slice()}calculateCircle(e){if(e.length<3)return e;var t={},i=e[0],n=e[1],r=e[2],o=0,a=0,s=!0,l=0,u=0,c=0,h=[],d=(r.y-i.y)/(r.x-i.x),f=r.y-d*r.x;if(r.x!=i.x&&r.y!=i.y&&n.y==d*n.x+f||r.x==i.x&&n.x==i.x||r.y==i.y&&n.y==i.y||r.x==i.x&&r.y==i.y||r.x==n.x&&r.y==n.y||i.x==n.x&&i.y==n.y)h.push(i),h.push(n),h.push(r);else{var p=(n.x*n.x+n.y*n.y-(i.x*i.x+i.y*i.y))*(2*(r.y-i.y))-(r.x*r.x+r.y*r.y-(i.x*i.x+i.y*i.y))*(2*(n.y-i.y)),_=2*(n.x-i.x)*(r.x*r.x+r.y*r.y-(i.x*i.x+i.y*i.y))-2*(r.x-i.x)*(n.x*n.x+n.y*n.y-(i.x*i.x+i.y*i.y)),m=4*((n.x-i.x)*(r.y-i.y)-(r.x-i.x)*(n.y-i.y));t.x=p/m,t.y=_/m;var $=(2*(o=Math.sqrt((i.x-t.x)*(i.x-t.x)+(i.y-t.y)*(i.y-t.y)))*o-((i.x-r.x)*(i.x-r.x)+(i.y-r.y)*(i.y-r.y)))/(2*o*o);$=($=$>=1?1:$)<=-1?-1:$,c=180*Math.acos($)/Math.PI,a=(c=r.x==i.x?t.x>i.x&&n.x>i.x||t.x<i.x&&n.x<i.x?360-c:c:t.y>d*t.x+f&&n.y>d*n.x+f||t.y<d*t.x+f&&n.y<d*n.x+f?360-c:c)/72,r.y!=i.y?r.x==i.x?r.y>i.y?n.x<i.x&&(s=!1):n.x>i.x&&(s=!1):r.x<i.x?n.y<d*n.x+f&&(s=!1):n.y>d*n.x+f&&(s=!1):r.x>i.x?n.y>i.y&&(s=!1):n.y<i.y&&(s=!1);var g=(i.y-t.y)/(i.x-t.x),y=g>=0?180*Math.atan(g)/Math.PI:Math.abs(180*Math.atan(g)/Math.PI)+90,v=Math.abs(t.y);i.y==v&&v==r.y&&i.x<r.x&&(y+=180);var x=i.y-t.y;h.push(i);for(var b=1;b<72;b++){l=a*b,u=y,s?x>=0?g>=0?u+=l:u=180-(u-90)+l:u=g>0?u-180+l:90-u+l:x>=0?g>=0?u-=l:u=180-(u-90)-l:u=g>=0?u-180-l:90-u-l,u=u*Math.PI/180;var S=t.x+o*Math.cos(u),w=t.y+o*Math.sin(u);h.push(new Point(S,w))}h.push(r)}return h}createLineEPS(e){var t=[],i=e.length;if(i<2)return e;for(var n=0;n<i;){if("LTypeArc"==e[n].type){var r=LineString.createLineArc(t,n,i,e);t=r[0],n=r[1]}else t.push(e[n]),n++}return t}createLineArc(e,t,i,n){if(0==t){var r=LineString.addPointEPS(n,t,i,"LTypeArc");Array.prototype.push.apply(e,r[0]),t=r[1]+1}else if(t==i-1){var o=[n[t-1],n[t]],a=LineString.calculateCircle(o);Array.prototype.push.apply(e,a),t++}else{var s=LineString.addPointEPS(n,t,i,"LTypeArc");e.pop(),Array.prototype.push.apply(e,s[0]),t=s[1]+1}return[e,t]}addPointEPS(e,t,i,n){var r,o=[],a=t+1;return 0==t?Array.prototype.push.apply(o,[e[t],e[t+1]]):t==i-1?Array.prototype.push.apply(o,[e[t-1],e[t]]):Array.prototype.push.apply(o,[e[t-1],e[t],e[t+1]]),"LTypeCurve"==n?r=LineString.calculatePointsFBZN(o):"LTypeArc"==n&&(r=LineString.calculateCircle(o)),[r,a]}}var _0x1b4260=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x536223=_0x1b4260(void 0,(function(){return _0x536223.toString().search("(((.+)+)+)+$").toString().constructor(_0x536223).search("(((.+)+)+)+$")}));_0x536223();class MultiLineString extends Collection$1{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.LineString"],this.CLASS_NAME="SuperMap.Geometry.MultiLineString",this.geometryType="MultiLineString"}}var _0x29fce2=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1bf8cf=_0x29fce2(void 0,(function(){return _0x1bf8cf.toString().search("(((.+)+)+)+$").toString().constructor(_0x1bf8cf).search("(((.+)+)+)+$")}));_0x1bf8cf();class LinearRing extends LineString{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point"],this.CLASS_NAME="SuperMap.Geometry.LinearRing",this.geometryType="LinearRing"}addComponent(e,t){var i=!1,n=this.components.pop();(null!=t||!e.equals(n))&&(i=LinearRing_get(LinearRing_getPrototypeOf(LinearRing.prototype),"addComponent",this).apply(this,arguments));var r=this.components[0];return LinearRing_get(LinearRing_getPrototypeOf(LinearRing.prototype),"addComponent",this).apply(this,[r]),i}removeComponent(e){var t=this.components&&this.components.length>3;if(t){this.components.pop(),LinearRing_get(LinearRing_getPrototypeOf(LinearRing.prototype),"removeComponent",this).apply(this,arguments);var i=this.components[0];LinearRing_get(LinearRing_getPrototypeOf(LinearRing.prototype),"addComponent",this).apply(this,[i])}return t}getArea(){var e=0;if(this.components&&this.components.length>2){for(var t=0,i=0,n=this.components.length;i<n-1;i++){var r=this.components[i],o=this.components[i+1];t+=(r.x+o.x)*(o.y-r.y)}e=-t/2}return e}getVertices(e){return!0===e?[]:this.components.slice(0,this.components.length-1)}}var _0x16c43d=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x550755=_0x16c43d(void 0,(function(){return _0x550755.toString().search("(((.+)+)+)+$").toString().constructor(_0x550755).search("(((.+)+)+)+$")}));_0x550755();class Polygon extends Collection$1{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.LinearRing"],this.CLASS_NAME="SuperMap.Geometry.Polygon",this.geometryType="Polygon"}getArea(){var e=0;if(this.components&&this.components.length>0){e+=Math.abs(this.components[0].getArea());for(var t=1,i=this.components.length;t<i;t++)e-=Math.abs(this.components[t].getArea())}return e}}var _0x5a0427=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3a315f=_0x5a0427(void 0,(function(){return _0x3a315f.toString().search("(((.+)+)+)+$").toString().constructor(_0x3a315f).search("(((.+)+)+)+$")}));_0x3a315f();class Feature{constructor(e,t,i){this.CLASS_NAME="SuperMap.Feature",this.layer=e,this.id=_0x421c56.createUniqueID(this.CLASS_NAME+"_"),this.lonlat=t,this.data=i??{}}destroy(){this.id=null,this.lonlat=null,this.data=null}}var _0x55052a=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2bcaa5=_0x55052a(void 0,(function(){return _0x2bcaa5.toString().search("(((.+)+)+)+$").toString().constructor(_0x2bcaa5).search("(((.+)+)+)+$")}));_0x2bcaa5();var _0x104257={UNKNOWN:"Unknown",INSERT:"Insert",UPDATE:"Update",DELETE:"Delete"};class Vector extends Feature{constructor(e,t,i){super(null,null,t),this.fid=null,this.geometry=e||null,this.attributes={},t&&(this.attributes=Util.extend(_this.attributes,t)),this.bounds=null,this.state=null,this.style=i||null,this.url=null,this.lonlat=null,this.CLASS_NAME="SuperMap.Feature.Vector",Vector.style={default:{fillColor:"#ee9900",fillOpacity:.4,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"#ee9900",strokeOpacity:1,strokeWidth:1,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},select:{fillColor:"blue",fillOpacity:.4,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"blue",strokeOpacity:1,strokeWidth:2,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"pointer",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},temporary:{fillColor:"#66cccc",fillOpacity:.2,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"#66cccc",strokeOpacity:1,strokeLinecap:"round",strokeWidth:2,strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"default",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},delete:{display:"none"}}}destroy(){this.layer&&(this.layer.removeFeatures(this),this.layer=null),this.geometry=null,Vector_get(Vector_getPrototypeOf(Vector.prototype),"destroy",this).call(this)}clone(){return new Vector(this.geometry?this.geometry.clone():null,this.attributes,this.style)}toState(e){if(e===_0x104257.UPDATE)switch(this.state){case _0x104257.UNKNOWN:case _0x104257.DELETE:this.state=e}else if(e===_0x104257.INSERT)if(this.state===_0x104257.UNKNOWN);else this.state=e;else if(e===_0x104257.DELETE)switch(this.state){case _0x104257.INSERT:case _0x104257.DELETE:break;case _0x104257.UNKNOWN:case _0x104257.UPDATE:this.state=e}else e===_0x104257.UNKNOWN&&(this.state=e)}}var _0x45d629=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x33fb88=_0x45d629(void 0,(function(){return _0x33fb88.toString().search("(((.+)+)+)+$").toString().constructor(_0x33fb88).search("(((.+)+)+)+$")}));_0x33fb88();class PointWithMeasure extends Point$1{constructor(e){super(e),this.measure=null,this.CLASS_NAME="SuperMap.PointWithMeasure"}equals(e){var t=!1;if(null!=e){var i=this.x===e.x&&this.y===e.y&&this.measure===e.measure,n=isNaN(this.x)&&isNaN(this.y)&&isNaN(this.measure),r=isNaN(e.x)&&isNaN(e.y)&&isNaN(e.measure);t=i||n&&r}return t}static toJson(){var e="{";return null!=this.measure&&null!=this.measure&&(e+='"measure":'+this.measure+","),e+='"x":'+this.x+",",e+='"y":'+this.y,e+="}"}destroy(){var e=this;e.measure=null,e.x=null,e.y=null}static fromJson(e){if(e)return new PointWithMeasure({x:e.x,y:e.y,measure:e.measure})}}var _0x10ab3c=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x57986b=_0x10ab3c(void 0,(function(){return _0x57986b.toString().search("(((.+)+)+)+$").toString().constructor(_0x57986b).search("(((.+)+)+)+$")}));_0x57986b();class Route extends Collection$1{constructor(e,t){super(e,t),this.id=null,this.center=null,this.style=null,this.length=null,this.maxM=null,this.minM=null,this.parts=null,this.points=null,this.type=null,this.componentTypes=["SuperMap.Geometry.LinearRing","SuperMap.Geometry.LineString"],this.CLASS_NAME="SuperMap.Route",this.geometryType="LINEM"}static toJson(){var e="{";if(null!=this.id&&null!=this.id&&(e+='"id":'+this.id+","),null!=this.center&&null!=this.center&&(e+='"center":'+this.center+","),null!=this.style&&null!=this.style&&(e+='"style":'+this.style+","),null!=this.length&&null!=this.length&&(e+='"length":'+this.length+","),null!=this.maxM&&null!=this.maxM&&(e+='"maxM":'+this.maxM+","),null!=this.minM&&null!=this.minM&&(e+='"minM":'+this.minM+","),null!=this.type&&null!=this.type&&(e+='"type":"'+this.type+'",'),null!=this.parts&&null!=this.parts){e+='"parts":['+this.parts[0];for(var t=1;t<this.parts.length;t++)e+=","+this.parts[t];e+="],"}if(null!=this.components&&this.components.length>0){e+='"points":[';for(var i=0,n=this.components.length;i<n;i++)for(var r=0,o=this.components[i].components.length;r<o;r++)e+=this.components[i].components[r].toJson()+",";e=e.replace(/,$/g,""),e+="]"}return e=e.replace(/,$/g,""),e+="}"}destroy(){var e=this;e.id=null,e.center=null,e.style=null,e.length=null,e.maxM=null,e.minM=null,e.type=null,e.parts=null,e.components.length=0,e.components=null,e.componentTypes=null}static fromJson(e){if(e){var t=e.parts||[],i=e.points||[],n=t.length,r=[];if(!(n>0))return null;for(var o=0,a=0,s=[];o<n;o++){for(var l=0;l<t[o];l++)s.push(PointWithMeasure.fromJson(i[a+l]));a+=t[o],s[0].equals(s[t[o]-1])?r.push(new LinearRing(s)):r.push(new LineString(s)),s=[]}return new Route(r,{id:e.id,center:e.center,style:e.style,length:e.length,maxM:e.maxM,minM:e.minM,type:e.type,parts:e.parts})}}}var _0x32d756=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x43354a=_0x32d756(void 0,(function(){return _0x43354a.toString().search("(((.+)+)+)+$").toString().constructor(_0x43354a).search("(((.+)+)+)+$")}));_0x43354a();var _0x268c75={LINE:"LINE",LINEM:"LINEM",POINT:"POINT",REGION:"REGION",POINTEPS:"POINTEPS",LINEEPS:"LINEEPS",REGIONEPS:"REGIONEPS",ELLIPSE:"ELLIPSE",CIRCLE:"CIRCLE",TEXT:"TEXT",RECTANGLE:"RECTANGLE",UNKNOWN:"UNKNOWN",GEOCOMPOUND:"GEOCOMPOUND"};class ServerGeometry{constructor(e){this.id=0,this.style=null,this.parts=null,this.points=null,this.type=null,this.prjCoordSys=null,e&&_0x421c56.extend(this,e),this.CLASS_NAME="SuperMap.ServerGeometry"}destroy(){var e=this;e.id=null,e.style=null,e.parts=null,e.partTopo=null,e.points=null,e.type=null,e.prjCoordSys=null}toGeometry(){var e=this;switch(e.type.toUpperCase()){case _0x268c75.POINT:return e.toGeoPoint();case _0x268c75.LINE:return e.toGeoLine();case _0x268c75.LINEM:return e.toGeoLinem();case _0x268c75.REGION:return e.toGeoRegion();case _0x268c75.POINTEPS:return e.toGeoPoint();case _0x268c75.LINEEPS:return e.toGeoLineEPS();case _0x268c75.REGIONEPS:return e.toGeoRegionEPS();case _0x268c75.GEOCOMPOUND:return e.transformGeoCompound()}}toGeoPoint(){var e=this.parts||[],t=this.points||[],i=e.length;if(i>0){if(1===i)return new Point$1(t[0].x,t[0].y);for(var n=[],r=0;r<i;r++)n.push(new Point$1(t[r].x,t[r].y));return new MultiPoint(n)}return null}toGeoLine(){var e=this.parts||[],t=this.points||[],i=e.length;if(i>0){if(1===i){for(var n=[],r=0;r<e[0];r++)n.push(new Point$1(t[r].x,t[r].y));return n[0].equals(n[e[0]-1])?new LinearRing(n):new LineString(n)}for(var o=[],a=0;a<i;a++){for(var s=[],l=0;l<e[a];l++)s.push(new Point$1(t[l].x,t[l].y));o.push(new LineString(s)),t.splice(0,e[a])}return new MultiLineString(o)}return null}toGeoLineEPS(){var e,t,i,n,r,o=this.parts||[],a=this.points||[],s=o.length;if(s>0){if(1===s){for(e=0,i=[];e<o[0];e++)i.push(new Point$1(a[e].x,a[e].y,a[e].type));return i[0].equals(i[o[0]-1])?(r=LineString.createLineEPS(i),new LinearRing(r)):(r=LineString.createLineEPS(i),new LineString(r))}for(e=0,n=[];e<s;e++){for(t=0,i=[];t<o[e];t++)i.push(new Point$1(a[t].x,a[t].y));r=LineString.createLineEPS(i),n.push(new LineString(r)),a.splice(0,o[e])}return new MultiLineString(n)}return null}toGeoLinem(){return Route.fromJson(this)}toGeoRegion(){var e=this,t=e.parts||[],i=e.partTopo||[],n=e.points||[],r=t.length;if(r<=0)return null;var o=[],a=[];if(1==r){for(var s=0;s<n.length;s++)a.push(new Point$1(n[s].x,n[s].y));return o.push(new Polygon([new LinearRing(a)])),new MultiPolygon(o)}for(var l=[],u=[],c=[],h=[],d=[],f=0,p=0;f<r;f++){for(var _=0;_<t[f];_++)a.push(new Point$1(n[p+_].x,n[p+_].y));p+=t[f];var m=new Polygon([new LinearRing(a)]);a=[],c.push(m),0===i.length&&h.push(m.getBounds()),d.push(1),u.push(m.getArea())}if(0===i.length){ServerGeometry.bubbleSort(u,c,i,h);for(var $=[],g=1;g<c.length;g++)for(var y=g-1;y>=0;y--)if($[g]=-1,h[y].containsBounds(h[g])){d[g]=-1*d[y],d[g]<0&&($[g]=y);break}for(var v=0;v<c.length;v++)d[v]>0?o.push(c[v]):(o[$[v]].components=o[$[v]].components.concat(c[v].components),o.push(""))}else{o=new Array;for(var x=0;x<c.length;x++)if(i[x]&&-1==i[x]?l=l.concat(c[x].components):(l.length>0&&o.length>0&&(o[o.length-1].components=o[o.length-1].components.concat(l),l=[]),o.push(c[x])),x==r-1){var b=o.length;if(b)o[b-1].components=o[b-1].components.concat(l);else for(var S=0,w=l.length;S<w;S++)o.push(new Polygon(l))}}return new MultiPolygon(o)}toGeoRegionEPS(){var e=this,t=e.parts||[],i=e.partTopo||[],n=e.points||[],r=t.length;if(r<=0)return null;var o,a=[],s=[];if(1==r){for(var l=0;l<n.length;l++)s.push(new Point$1(n[l].x,n[l].y));return o=LineString.createLineEPS(s),a.push(new Polygon([new LinearRing(o)])),new MultiPolygon(a)}for(var u=[],c=[],h=[],d=[],f=[],p=0,_=0;p<r;p++){for(var m=0;m<t[p];m++)s.push(new Point$1(n[_+m].x,n[_+m].y));_+=t[p],o=LineString.createLineEPS(s);var $=new Polygon([new LinearRing(o)]);s=[],h.push($),0===i.length&&d.push($.getBounds()),f.push(1),c.push($.getArea())}if(0===i.length){ServerGeometry.bubbleSort(c,h,i,d);for(var g=[],y=1;y<h.length;y++)for(var v=y-1;v>=0;v--)if(g[y]=-1,d[v].containsBounds(d[y])){f[y]=-1*f[v],f[y]<0&&(g[y]=v);break}for(var x=0;x<h.length;x++)f[x]>0?a.push(h[x]):(a[g[x]].components=a[g[x]].components.concat(h[x].components),a.push(""))}else{a=new Array;for(var b=0;b<h.length;b++)if(i[b]&&-1==i[b]?u=u.concat(h[b].components):(u.length>0&&a.length>0&&(a[a.length-1].components=a[a.length-1].components.concat(u),u=[]),a.push(h[b])),b==r-1){var S=a.length;if(S)a[S-1].components=a[S-1].components.concat(u);else for(var w=0,C=u.length;w<C;w++)a.push(new Polygon(u))}}return new MultiPolygon(a)}transformGeoCompound(){var e=this.geoParts||[],t=e.length;if(t<=0)return null;for(var i=[],n=0;n<t;n++){var r=e[n];i.push(new ServerGeometry(r).toGeometry())}return new Collection(i)}fromJson(e){if(e)return new ServerGeometry({id:e.id,style:ServerStyle.fromJson(e.style),parts:e.parts,partTopo:e.partTopo,points:e.points,center:e.center,length:e.length,maxM:e.maxM,minM:e.minM,type:e.type})}fromGeometry(e){if(e){var t=0,i=[],n=[],r=null,o=e.components,a=e.CLASS_NAME,s={epsgCode:e.SRID};if(isNaN(e.id)||(t=e.id),"SuperMap.Geometry.LinearRing"!=a&&"SuperMap.Geometry.LineString"!=a&&(e instanceof MultiPoint||e instanceof MultiLineString)){for(var l=o.length,u=0;u<l;u++){var c=o[u].getVertices(),h=c.length;i.push(h);for(var d=0;d<h;d++)n.push(new Point$1(c[d].x,c[d].y))}r="SuperMap.Geometry.MultiPoint"==a?_0x268c75.POINT:_0x268c75.LINE}else if(e instanceof MultiPolygon){for(var f=o.length,p=0;p<f;p++)for(var _=o[p].components,m=_.length,$=0;$<m;$++){var g=_[$].getVertices(),y=g.length+1;i.push(y);for(var v=0;v<y-1;v++)n.push(new Point$1(g[v].x,g[v].y));n.push(new Point$1(g[0].x,g[0].y))}r=_0x268c75.REGION}else if(e instanceof Polygon){for(var x=o.length,b=0;b<x;b++){var S=o[b].getVertices(),w=S.length+1;i.push(w);for(var C=0;C<w-1;C++)n.push(new Point$1(S[C].x,S[C].y));n.push(new Point$1(S[0].x,S[0].y))}r=_0x268c75.REGION}else{for(var T=e.getVertices(),P=T.length,E=0;E<P;E++)n.push(new Point$1(T[E].x,T[E].y));e instanceof LinearRing&&(n.push(new Point$1(T[0].x,T[0].y)),P++),i.push(P),r=e instanceof Point$1?_0x268c75.POINT:_0x268c75.LINE}return new ServerGeometry({id:t,style:null,parts:i,points:n,type:r,prjCoordSys:s})}}IsClockWise(e){var t=e.length;if(t<3)return 0;var i=e[0].y*(e[t-1].x-e[1].x);e.push(e[0]);for(var n=1;n<t;n++)i+=e[n].y*(e[n-1].x-e[n+1].x);return.5*i}bubbleSort(e,t,i,n){for(var r=0;r<e.length;r++)for(var o=0;o<e.length;o++)if(e[r]>e[o]){var a=e[o];e[o]=e[r],e[r]=a;var s=t[o];if(t[o]=t[r],t[r]=s,i&&i.length>0){var l=i[o];i[o]=i[r],i[r]=l}if(n&&n.length>0){var u=n[o];n[o]=n[r],n[r]=u}}}}var _0x4a9064=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x34ada9=_0x4a9064(void 0,(function(){return _0x34ada9.toString().search("(((.+)+)+)+$").toString().constructor(_0x34ada9).search("(((.+)+)+)+$")}));_0x34ada9();class _0x3aca1b extends _0x6ca727{constructor(e){super(e),this.ignoreExtraDims=!0,this.CLASS_NAME="SuperMap.Format.GeoJSON",this.parseCoords={point:function(e){if(!1===this.ignoreExtraDims&&2!=e.length)throw"Only 2D points are supported: "+e;return new Point$1(e[0],e[1])},multipoint:function(e){for(var t=[],i=null,n=0,r=e.length;n<r;++n){try{i=this.parseCoords.point.apply(this,[e[n]])}catch(e){throw e}t.push(i)}return new MultiPoint(t)},linestring:function(e){for(var t=[],i=null,n=0,r=e.length;n<r;++n){try{i=this.parseCoords.point.apply(this,[e[n]])}catch(e){throw e}t.push(i)}return new LineString(t)},multilinestring:function(e){for(var t=[],i=null,n=0,r=e.length;n<r;++n){try{i=this.parseCoords.linestring.apply(this,[e[n]])}catch(e){throw e}t.push(i)}return new MultiLineString(t)},polygon:function(e){for(var t,i,n=[],r=0,o=e.length;r<o;++r){try{i=this.parseCoords.linestring.apply(this,[e[r]])}catch(e){throw e}t=new LinearRing(i.components),n.push(t)}return new Polygon(n)},multipolygon:function(e){for(var t=[],i=null,n=0,r=e.length;n<r;++n){try{i=this.parseCoords.polygon.apply(this,[e[n]])}catch(e){throw e}t.push(i)}return new MultiPolygon(t)},box:function(e){if(2!=e.length)throw"GeoJSON box coordinates must have 2 elements";return new Polygon([new LinearRing([new Point$1(e[0][0],e[0][1]),new Point$1(e[1][0],e[0][1]),new Point$1(e[1][0],e[1][1]),new Point$1(e[0][0],e[1][1]),new Point$1(e[0][0],e[0][1])])])}},this.extract={feature:function(e){var t=this.extract.geometry.apply(this,[e.geometry]),i={type:"Feature",properties:this.createAttributes(e),geometry:t};return e.geometry&&"TEXT"===e.geometry.type&&(i.properties.texts=e.geometry.texts,i.properties.textStyle=e.geometry.textStyle),e.fid&&(i.id=e.fid),e.ID&&(i.id=e.ID),i},geometry:function(e){if(null==e)return null;!e.parts&&e.points&&(e.parts=[e.points.length]);var t,i=e.hasOwnProperty("geometryType")?e:new ServerGeometry(e).toGeometry()||e,n=i.geometryType||i.type;return"LinearRing"===n&&(n="LineString"),"LINEM"===n&&(n="MultiLineString"),t=this.extract[n.toLowerCase()].apply(this,[i]),"Collection"===(n="TEXT"===n?"Point":n)?{type:"GeometryCollection",geometries:t}:{type:n,coordinates:t}},point:function(e){var t=[e.x,e.y];for(var i in e)"x"!==i&&"y"!==i&&null!==e[i]&&!isNaN(e[i])&&t.push(e[i]);return t},text:function(e){return[e.points[0].x,e.points[0].y]},multipoint:function(e){for(var t=[],i=0,n=e.components.length;i<n;++i)t.push(this.extract.point.apply(this,[e.components[i]]));return t},linestring:function(e){for(var t=[],i=0,n=e.components.length;i<n;++i)t.push(this.extract.point.apply(this,[e.components[i]]));return t},multilinestring:function(e){for(var t=[],i=0,n=e.components.length;i<n;++i)t.push(this.extract.linestring.apply(this,[e.components[i]]));return t},polygon:function(e){for(var t=[],i=0,n=e.components.length;i<n;++i)t.push(this.extract.linestring.apply(this,[e.components[i]]));return t},multipolygon:function(e){for(var t=[],i=0,n=e.components.length;i<n;++i)t.push(this.extract.polygon.apply(this,[e.components[i]]));return t},collection:function(e){for(var t=e.components.length,i=new Array(t),n=0;n<t;++n)i[n]=this.extract.geometry.apply(this,[e.components[n]]);return i}}}read(e,t,i){t=t||"FeatureCollection";var n=null,r=null;if((r="string"==typeof e?GeoJSON_get(GeoJSON_getPrototypeOf(_0x3aca1b.prototype),"read",this).call(this,e,i):e)&&"string"==typeof r.type&&this.isValidType(r,t))switch(t){case"Geometry":try{n=this.parseGeometry(r)}catch{}break;case"Feature":try{(n=this.parseFeature(r)).type="Feature"}catch{}break;case"FeatureCollection":switch(n=[],r.type){case"Feature":try{n.push(this.parseFeature(r))}catch{n=null}break;case"FeatureCollection":for(var o=0,a=r.features.length;o<a;++o)try{n.push(this.parseFeature(r.features[o]))}catch{n=null}break;default:try{var s=this.parseGeometry(r);n.push(new Vector(s))}catch{n=null}}}return n}write(e,t){return GeoJSON_get(GeoJSON_getPrototypeOf(_0x3aca1b.prototype),"write",this).call(this,this.toGeoJSON(e),t)}fromGeoJSON(e,t,i){var n=this,r=this.read(e,t,i);return Array.isArray(r)?r.map((function(e){return n._toiSevrerFeature(e)})):this._toiSevrerFeature(r)}toGeoJSON(e){var t={type:null};if(Array.isArray(e)){t.type="FeatureCollection";var i=e.length;t.features=new Array(i);for(var n=0;n<i;++n){var r=e[n];if(s(r)){var o={};o.geometry=r,t.features[n]=this.extract.feature.apply(this,[o])}else t.features[n]=this.extract.feature.apply(this,[r])}}else if(s(e)){var a={};a.geometry=e,t=this.extract.feature.apply(this,[a])}else t=this.extract.feature.apply(this,[e]);function s(e){return e.hasOwnProperty("parts")&&e.hasOwnProperty("points")||e.hasOwnProperty("geoParts")}return t}isValidType(e,t){var i=!1;switch(t){case"Geometry":-1==_0x421c56.indexOf(["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon","Box","GeometryCollection"],e.type)||(i=!0);break;case"FeatureCollection":i=!0;break;default:e.type==t&&(i=!0)}return i}parseFeature(e){var t,i,n,r;n=e.properties?e.properties:{},r=e.geometry&&e.geometry.bbox||e.bbox;try{i=this.parseGeometry(e.geometry)}catch(e){throw e}return t=new Vector(i,n),r&&(t.bounds=_0xe0357d.fromArray(r)),e.id&&(t.fid=e.id),t}parseGeometry(e){if(null==e)return null;var t;if("GeometryCollection"==e.type){if(!Array.isArray(e.geometries))throw"GeometryCollection must have geometries array: "+e;for(var i=e.geometries.length,n=new Array(i),r=0;r<i;++r)n[r]=this.parseGeometry.apply(this,[e.geometries[r]]);t=new Collection$1(n)}else{if(!Array.isArray(e.coordinates))throw"Geometry must have coordinates array: "+e;if(!this.parseCoords[e.type.toLowerCase()])throw"Unsupported geometry type: "+e.type;try{t=this.parseCoords[e.type.toLowerCase()].apply(this,[e.coordinates])}catch(e){throw e}}return t}createCRSObject(e){var t=e.layer.projection.toString(),i={};if(t.match(/epsg:/i)){var n=parseInt(t.substring(t.indexOf(":")+1));i=4326==n?{type:"name",properties:{name:"urn:ogc:def:crs:OGC:1.3:CRS84"}}:{type:"name",properties:{name:"EPSG:"+n}}}return i}_toiSevrerFeature(e){var t=e.attributes,i=[],n=[];for(var r in t)i.push(r),n.push(t[r]);var o={fieldNames:i,fieldValues:n,geometry:ServerGeometry.fromGeometry(e.geometry)};return o.geometry.id=e.fid,o}createAttributes(e){if(!e)return null;return{}}}var _0xbd974d=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x55c71d=_0xbd974d(void 0,(function(){return _0x55c71d.toString().search("(((.+)+)+)+$").toString().constructor(_0x55c71d).search("(((.+)+)+)+$")}));_0x55c71d();class FindClosestFacilitiesService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindClosestFacilitiesService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FindClosestFacilitiesParameters){var t,i=this;i.url=_0x27e7d4.urlPathAppend(i.url,"closestfacility"),t={expectFacilityCount:e.expectFacilityCount,fromEvent:e.fromEvent,maxWeight:e.maxWeight,parameter:_0x421c56.toJSON(e.parameter),event:_0x421c56.toJSON(e.event),facilities:i.getJson(e.isAnalyzeById,e.facilities)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",n=t?t.length:0;if(!1===e)for(var r=0;r<n;r++)r>0&&(i+=","),i+='{"x":'+t[r].x+',"y":'+t[r].y+"}";else if(!0===e)for(var o=0;o<n;o++)o>0&&(i+=","),i+=t[o];return i+="]"}toGeoJSONResult(e){if(!e||!e.facilityPathList)return e;var t=new _0x3aca1b;return e.facilityPathList.map((function(e){return e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e})),e}}var _0x19cfc5=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x5814e1=_0x19cfc5(void 0,(function(){return _0x5814e1.toString().search("(((.+)+)+)+$").toString().constructor(_0x5814e1).search("(((.+)+)+)+$")}));_0x5814e1();class FacilityAnalystStreamParameters{constructor(e){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=!1,this.queryType=null,_0x421c56.extend(this,e),this.CLASS_NAME="SuperMap.FacilityAnalystStreamParameters"}destroy(){var e=this;e.edgeID=null,e.nodeID=null,e.weightName=null,e.isUncertainDirectionValid=null,e.type=null}}var _0x18165c=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2c52f1=_0x18165c(void 0,(function(){return _0x2c52f1.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c52f1).search("(((.+)+)+)+$")}));_0x2c52f1();class FacilityAnalystStreamService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystStreamService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FacilityAnalystStreamParameters){var t,i=this;if(0===e.queryType)i.url=_0x27e7d4.urlPathAppend(i.url,"upstreamcirticalfaclilities");else{if(1!==e.queryType)return;i.url=_0x27e7d4.urlPathAppend(i.url,"downstreamcirticalfaclilities")}t={sourceNodeIDs:e.sourceNodeIDs,isUncertainDirectionValid:e.isUncertainDirectionValid},(null===e.edgeID||null===e.nodeID)&&(null===e.edgeID&&null===e.nodeID||(null!==e.edgeID?t.edgeID=e.edgeID:t.nodeID=e.nodeID,i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})))}}}var _0x320964=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2fd137=_0x320964(void 0,(function(){return _0x2fd137.toString().search("(((.+)+)+)+$").toString().constructor(_0x2fd137).search("(((.+)+)+)+$")}));_0x2fd137();class FindLocationParameters{constructor(e){this.expectedSupplyCenterCount=null,this.isFromCenter=!1,this.supplyCenters=null,this.turnWeightField=null,this.weightName=null,_0x421c56.extend(this,e),this.CLASS_NAME="SuperMap.FindLocationParameters"}destroy(){var e=this;if(e.expectedSupplyCenterCount=null,e.isFromCenter=null,e.turnWeightField=null,e.weightName=null,e.supplyCenters){for(var t=0,i=e.supplyCenters,n=i.length;t<n;t++)i[t].destroy();e.supplyCenters=null}}}var _0x5a9492=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x36c8d6=_0x5a9492(void 0,(function(){return _0x36c8d6.toString().search("(((.+)+)+)+$").toString().constructor(_0x36c8d6).search("(((.+)+)+)+$")}));_0x36c8d6();class FindLocationService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindLocationService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FindLocationParameters){var t,i=this;i.url=_0x27e7d4.urlPathAppend(i.url,"location"),t={isFromCenter:e.isFromCenter,expectedSupplyCenterCount:e.expectedSupplyCenterCount,weightName:e.weightName,turnWeightField:e.turnWeightField,returnEdgeFeature:!0,returnEdgeGeometry:!0,returnNodeFeature:!0,mapParameter:_0x421c56.toJSON(e.mapParameter),supplyCenters:i.getCentersJson(e.supplyCenters)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getCentersJson(e){for(var t="[",i=e?e.length:0,n=0;n<i;n++)n>0&&(t+=","),t+=_0x421c56.toJSON(e[n]);return t+="]"}toGeoJSONResult(e){if(!e)return null;var t=new _0x3aca1b;return e.demandResults&&(e.demandResults=t.toGeoJSON(e.demandResults)),e.supplyResults&&(e.supplyResults=t.toGeoJSON(e.supplyResults)),e}}var _0x53684f=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x5d08aa=_0x53684f(void 0,(function(){return _0x5d08aa.toString().search("(((.+)+)+)+$").toString().constructor(_0x5d08aa).search("(((.+)+)+)+$")}));_0x5d08aa();class FindPathParameters{constructor(e){this.isAnalyzeById=!1,this.hasLeastEdgeCount=null,this.nodes=null,this.parameter=new TransportationAnalystParameter,_0x421c56.extend(this,e),this.CLASS_NAME="SuperMap.FindPathParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.hasLeastEdgeCount=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}var _0x1bfc14=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2ab8cc=_0x1bfc14(void 0,(function(){return _0x2ab8cc.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ab8cc).search("(((.+)+)+)+$")}));_0x2ab8cc();class FindPathService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindPathService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FindPathParameters){var t,i=this;i.url=_0x27e7d4.urlPathAppend(i.url,"path"),t={hasLeastEdgeCount:e.hasLeastEdgeCount,parameter:_0x421c56.toJSON(e.parameter),nodes:i.getJson(e.isAnalyzeById,e.nodes)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",n=t?t.length:0;if(!1===e)for(var r=0;r<n;r++)r>0&&(i+=","),i+='{"x":'+t[r].x+',"y":'+t[r].y+"}";else if(!0===e)for(var o=0;o<n;o++)o>0&&(i+=","),i+=t[o];return i+="]"}toGeoJSONResult(e){if(!e||!e.pathList||e.pathList.length<1)return null;var t=new _0x3aca1b;return e.pathList.forEach((function(e){e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures))})),e}}var _0x28f8e8=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x394c29=_0x28f8e8(void 0,(function(){return _0x394c29.toString().search("(((.+)+)+)+$").toString().constructor(_0x394c29).search("(((.+)+)+)+$")}));_0x394c29();class FindTSPPathsParameters{constructor(e){this.endNodeAssigned=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new TransportationAnalystParameter,_0x421c56.extend(this,e),this.CLASS_NAME="SuperMap.FindTSPPathsParameters"}destroy(){var e=this;e.endNodeAssigned=null,e.isAnalyzeById=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}var _0x42897a=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x4dfd81=_0x42897a(void 0,(function(){return _0x4dfd81.toString().search("(((.+)+)+)+$").toString().constructor(_0x4dfd81).search("(((.+)+)+)+$")}));_0x4dfd81();class FindTSPPathsService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindTSPPathsService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FindTSPPathsParameters){var t,i=this;i.url=_0x27e7d4.urlPathAppend(i.url,"tsppath"),t={parameter:_0x421c56.toJSON(e.parameter),endNodeAssigned:e.endNodeAssigned,nodes:i.getNodesJson(e)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getNodesJson(e){var t,i,n,r,o="";if(!1===e.isAnalyzeById){for(t="[",i=0,n=(r=e.nodes).length;i<n;i++)i>0&&(t+=","),t+='{"x":'+r[i].x+',"y":'+r[i].y+"}";o+=t+="]"}else if(!0===e.isAnalyzeById){for(var a="[",s=e.nodes,l=s.length,u=0;u<l;u++)u>0&&(a+=","),a+=s[u];o+=a+="]"}return o}toGeoJSONResult(e){if(!e||!e.tspPathList)return null;var t=new _0x3aca1b;return e.tspPathList.forEach((function(e){e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures))})),e}}var _0x43003c=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x257d8d=_0x43003c(void 0,(function(){return _0x257d8d.toString().search("(((.+)+)+)+$").toString().constructor(_0x257d8d).search("(((.+)+)+)+$")}));_0x257d8d();class FindMTSPPathsParameters{constructor(e){this.centers=null,this.hasLeastTotalCost=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new TransportationAnalystParameter,_0x421c56.extend(this,e),this.CLASS_NAME="SuperMap.FindMTSPPathsParameters"}destroy(){var e=this;e.centers=null,e.hasLeastTotalCost=null,e.isAnalyzeById=null,e.nodes=null,e.maxWeight=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}var _0x3b2658=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x105a7e=_0x3b2658(void 0,(function(){return _0x105a7e.toString().search("(((.+)+)+)+$").toString().constructor(_0x105a7e).search("(((.+)+)+)+$")}));_0x105a7e();class FindMTSPPathsService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindMTSPPathsService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FindMTSPPathsParameters){var t,i=this,n=i.getJson(e.isAnalyzeById,e.centers),r=i.getJson(e.isAnalyzeById,e.nodes);i.url=_0x27e7d4.urlPathAppend(i.url,"mtsppath"),t={centers:n,nodes:r,parameter:_0x421c56.toJSON(e.parameter),hasLeastTotalCost:e.hasLeastTotalCost},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",n=t?t.length:0;if(!1===e)for(var r=0;r<n;r++)r>0&&(i+=","),i+='{"x":'+t[r].x+',"y":'+t[r].y+"}";else if(!0===e)for(var o=0;o<n;o++)o>0&&(i+=","),i+=t[o];return i+="]"}toGeoJSONResult(e){if(!e||!e.pathList)return null;var t=new _0x3aca1b;return e.pathList.map((function(e){return e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e})),e}}var _0x24f187=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xdd2790=_0x24f187(void 0,(function(){return _0xdd2790.toString().search("(((.+)+)+)+$").toString().constructor(_0xdd2790).search("(((.+)+)+)+$")}));_0xdd2790();class FindServiceAreasParameters{constructor(e){this.isAnalyzeById=!1,this.isCenterMutuallyExclusive=!1,this.centers=null,this.isFromCenter=!1,this.weights=null,this.parameter=new TransportationAnalystParameter,_0x421c56.extend(this,e),this.CLASS_NAME="SuperMap.FindServiceAreasParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.isCenterMutuallyExclusive=null,e.centers=null,e.isFromCenter=null,e.weights=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}var _0xdce4d=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x5da0f9=_0xdce4d(void 0,(function(){return _0x5da0f9.toString().search("(((.+)+)+)+$").toString().constructor(_0x5da0f9).search("(((.+)+)+)+$")}));_0x5da0f9();class FindServiceAreasService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindServiceAreasService"}destroy(){this.destroy()}processAsync(e){if(e instanceof FindServiceAreasParameters){var t,i=this;i.url=_0x27e7d4.urlPathAppend(i.url,"servicearea"),t={isFromCenter:e.isFromCenter,isCenterMutuallyExclusive:e.isCenterMutuallyExclusive,parameter:_0x421c56.toJSON(e.parameter),centers:i.getJson(e.isAnalyzeById,e.centers),weights:i.getJson(!0,e.weights)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",n=t?t.length:0;if(!1===e)for(var r=0;r<n;r++)r>0&&(i+=","),i+='{"x":'+t[r].x+',"y":'+t[r].y+"}";else if(!0===e)for(var o=0;o<n;o++)o>0&&(i+=","),i+=t[o];return i+="]"}toGeoJSONResult(e){if(!e||!e.serviceAreaList)return e;var t=new _0x3aca1b;return e.serviceAreaList.map((function(e){return e.serviceRegion&&(e.serviceRegion=t.toGeoJSON(e.serviceRegion)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e.routes&&(e.routes=t.toGeoJSON(e.routes)),e})),e}}var _0x25a52d=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2ac56f=_0x25a52d(void 0,(function(){return _0x2ac56f.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ac56f).search("(((.+)+)+)+$")}));_0x2ac56f();class UpdateEdgeWeightParameters{constructor(e){!e||(this.edgeId="",this.fromNodeId="",this.toNodeId="",this.weightField="",this.edgeWeight="",_0x421c56.extend(this,e),this.CLASS_NAME="SuperMap.UpdateEdgeWeightParameters")}destroy(){this.edgeId=null,this.fromNodeId=null,this.toNodeId=null,this.weightField=null,this.edgeWeight=null}}var _0x26d04a=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1e74f3=_0x26d04a(void 0,(function(){return _0x1e74f3.toString().search("(((.+)+)+)+$").toString().constructor(_0x1e74f3).search("(((.+)+)+)+$")}));_0x1e74f3();class UpdateEdgeWeightService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateEdgeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof UpdateEdgeWeightParameters){var t=this,i=t.parse(e);t.url=_0x27e7d4.urlPathAppend(t.url,i);var n=e.edgeWeight?e.edgeWeight:null;t.request({method:"PUT",scope:t,data:n,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var i in e)if(""!==e[i]&&"edgeWeight"!==e[i])switch(i){case"edgeId":t+="/edgeweight/"+e[i];break;case"fromNodeId":t+="/fromnode/"+e[i];break;case"toNodeId":t+="/tonode/"+e[i];break;case"weightField":t+="/weightfield/"+e[i]}return t}}}var _0x4de85d=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x71284b=_0x4de85d(void 0,(function(){return _0x71284b.toString().search("(((.+)+)+)+$").toString().constructor(_0x71284b).search("(((.+)+)+)+$")}));_0x71284b();class UpdateTurnNodeWeightParameters{constructor(e){!e||(this.nodeId="",this.fromEdgeId="",this.toEdgeId="",this.weightField="",this.turnNodeWeight="",_0x421c56.extend(this,e),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightParameters")}destroy(){this.nodeId=null,this.fromEdgeId=null,this.toEdgeId=null,this.weightField=null,this.turnNodeWeight=null}}var _0x412843=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1e41c1=_0x412843(void 0,(function(){return _0x1e41c1.toString().search("(((.+)+)+)+$").toString().constructor(_0x1e41c1).search("(((.+)+)+)+$")}));_0x1e41c1();class UpdateTurnNodeWeightService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof UpdateTurnNodeWeightParameters){var t=this,i=t.parse(e);t.url=_0x27e7d4.urlPathAppend(t.url,i);var n=e.turnNodeWeight?e.turnNodeWeight:null;t.request({method:"PUT",scope:t,data:n,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var i in e)if(""!==e[i]&&"turnNodeWeight"!==e[i])switch(i){case"nodeId":t+="/turnnodeweight/"+e[i];break;case"fromEdgeId":t+="/fromedge/"+e[i];break;case"toEdgeId":t+="/toedge/"+e[i];break;case"weightField":t+="/weightfield/"+e[i]}return t}}}var _0x425d8b=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1cd4c9=_0x425d8b(void 0,(function(){return _0x1cd4c9.toString().search("(((.+)+)+)+$").toString().constructor(_0x1cd4c9).search("(((.+)+)+)+$")}));_0x1cd4c9();var _0x4c5a30=function(e,t,i){if(isNaN(e)||isNaN(t))throw new Error("Invalid LatLng object: ("+e+", "+t+")");this.lat=+e,this.lng=+t,void 0!==i&&(this.alt=+i)};_0x4c5a30.prototype={equals:function(e,t){return!!e&&(e=L.latLng(e),Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng))<=(void 0===t?1e-9:t))},toString:function(e){return"LatLng("+L.Util.formatNum(this.lat,e)+", "+L.Util.formatNum(this.lng,e)+")"},distanceTo:function(e){return L.CRS.Earth.distance(this,L.latLng(e))},wrap:function(){return L.CRS.Earth.wrapLatLng(this)},toBounds:function(e){var t=180*e/40075017,i=t/Math.cos(Math.PI/180*this.lat);return L.latLngBounds([this.lat-t,this.lng-i],[this.lat+t,this.lng+i])},clone:function(){return new L.LatLng(this.lat,this.lng,this.alt)}};var _0xe66338=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2e8ef9=_0xe66338(void 0,(function(){return _0x2e8ef9.toString().search("(((.+)+)+)+$").toString().constructor(_0x2e8ef9).search("(((.+)+)+)+$")}));_0x2e8ef9();var _0x169003={GEOJSON:"GEOJSON",ISERVER:"ISERVER"};class NetworkAnalystService extends ServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.NetworkAnalystService"}burstPipelineAnalyst(e,t){var i=this;new BurstPipelineAnalystService(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(i._processParams(e))}computeWeightMatrix(e,t){var i=this;new ComputeWeightMatrixService(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(i._processParams(e))}findClosestFacilities(e,t,i){var n=this;new FindClosestFacilitiesService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}streamFacilityAnalyst(e,t,i){var n=this;new FacilityAnalystStreamService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}findLocation(e,t,i){var n=this;new FindLocationService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}findPath(e,t,i){var n=this;new FindPathService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}findTSPPaths(e,t,i){var n=this;new FindTSPPathsService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}findMTSPPaths(e,t,i){var n=this;new FindMTSPPathsService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}findServiceAreas(e,t,i){var n=this;new FindServiceAreasService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}updateEdgeWeight(e,t){var i=this;new UpdateEdgeWeightService(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e)}updateTurnNodeWeight(e,t){var i=this;new UpdateTurnNodeWeightService(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e)}_processParams(e){if(!e)return{};if(e.centers&&Array.isArray(e.centers)&&e.centers.map((function(t,i){return e.centers[i]=t instanceof _0x4c5a30?{x:t.lng,y:t.lat}:t,e.centers[i]})),e.nodes&&Array.isArray(e.nodes)&&e.nodes.map((function(t,i){return e.nodes[i]=t instanceof _0x4c5a30?{x:t.lng,y:t.lat}:t,e.nodes[i]})),e.event&&e.event instanceof _0x4c5a30&&(e.event={x:e.event.lng,y:e.event.lat}),e.facilities&&Array.isArray(e.facilities)&&e.facilities.map((function(t,i){return e.facilities[i]=t instanceof _0x4c5a30?{x:t.lng,y:t.lat}:t,e.facilities[i]})),e.parameter&&e.parameter.barrierPoints){var t=e.parameter.barrierPoints;Array.isArray(t)?t.map((function(t,i){return e.parameter.barrierPoints[i]=t instanceof _0x4c5a30?{x:t.lng,y:t.lat}:t,e.parameter.barrierPoints[i]})):e.parameter.barrierPoints=[t instanceof _0x4c5a30?{x:t.lng,y:t.lat}:t]}return e}_processFormat(e){return e||_0x169003.GEOJSON}}var _0x3cbf4b=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x405861=_0x3cbf4b(void 0,(function(){return _0x405861.toString().search("(((.+)+)+)+$").toString().constructor(_0x405861).search("(((.+)+)+)+$")}));_0x405861();var _0x5439f4={Dis_Least:1,Inter_Least:2,Tim_Least:3},_0x49bd1f=Object.freeze(_0x5439f4);const _0x1cca3a=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x59542f=_0x1cca3a(void 0,(function(){return _0x59542f.toString().search("(((.+)+)+)+$").toString().constructor(_0x59542f).search("(((.+)+)+)+$")}));_0x59542f();class _0x3140d8{constructor(e){if(!WebGLPlot.defined(e.viewer))throw new WebGLPlot.DeveloperError("RouteAnalysis options.viewer is required.");if(!WebGLPlot.defined(e.netWorkUrl))throw new WebGLPlot.DeveloperError("RouteAnalysis options.netWorkUrl is required.");e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.viewer=WebGLPlot.defaultValue(e.viewer,null),this.pictures=[],this._parametersCount=0,this.routeLines={},this.marks={},this.routeLineLabels={},this.features=[],this.active=!1,this.localPoints=[],this.image=WebGLPlot.defaultValue(e.image,_0x51d1e4.drawEditCtrlPtnPic(2)),this.handler=new WebGLPlot.ScreenSpaceEventHandler(viewer.scene.canvas),this.findPathService_length=new NetworkAnalystService(e.netWorkUrl),this.findPathService_jam=new NetworkAnalystService(e.netWorkUrl),this.resultSetting=new TransportationAnalystResultSetting({returnEdgeFeatures:!0,returnEdgeGeometry:!0,returnEdgeIDs:!0,returnNodeFeatures:!0,returnNodeGeometry:!0,returnNodeIDs:!0,returnPathGuides:!0,returnRoutes:!0}),this.analystParameter_length=new TransportationAnalystParameter({resultSetting:this.resultSetting,weightFieldName:"SmLength"}),this.analystParameter_jam=new TransportationAnalystParameter({resultSetting:this.resultSetting,weightFieldName:"Field_SmPerson"});let t=this;this.handler.setInputAction((e=>{if(t.active){var i=_0x51d1e4.getPosition(scene,e.position);i&&(this.localPoints.push(i),this.initMark(i,this.localPoints.length))}}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this.handler.setInputAction((e=>{var i=this.localPoints;t.active&&(t.features=[],t.doRoutesAnalyst(i,(e=>{t._parametersCount=0;let n={Chose:1,points:i,solutions:e,SMID:0,SMLength:0};t.resultCallback&&t.resultCallback(n)}))),t.active=!1,t.viewer.scene.canvas.style.cursor=""}),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK),this.solutionTypeArray=[]}drawRoutePts(e,t){this.removeRoutes(),this.localPoints=[],this.viewer.scene._canvas.style.cursor="crosshair",this.active=!0,e&&(this.resultCallback=e),t&&t.length>0&&(this.solutionTypeArray=t)}doRouteAnalyst(e){this.routePoints=e,this.removeRoutes(),this.solutionTypeArray=[],this.solutionTypeArray.push(_0x49bd1f.Dis_Least);let t=this,i=new FindPathParameters({isAnalyzeById:!1,nodes:e,hasLeastEdgeCount:!1,parameter:this.analystParameter_length});this.findPathService_length.findPath(i,(function(e){var i=e.result;i&&i.pathList&&i.pathList.map((function(e){t.initPolyline(e.nodeFeatures)}))}))}doRoutesAnalyst(e,t){this.solutionTypeArray=[],this.solutionTypeArray.push(_0x49bd1f.Dis_Least),this.solutionTypeArray.push(_0x49bd1f.Inter_Least),this.solutionTypeArray.push(_0x49bd1f.Tim_Least);let i=this;var n=[],r=[];for(let t=0;t<this.solutionTypeArray.length;t++)switch(this.solutionTypeArray[t]){case _0x49bd1f.Dis_Least:{let t=new FindPathParameters({isAnalyzeById:!1,nodes:e,hasLeastEdgeCount:!1,parameter:this.analystParameter_length});n.push(t),r.push({name:"最短路径",id:0});break}case _0x49bd1f.Inter_Least:{let t=new FindPathParameters({isAnalyzeById:!1,nodes:e,hasLeastEdgeCount:!0,parameter:this.analystParameter_length});n.push(t),r.push({name:"最少路口",id:1});break}case _0x49bd1f.Tim_Least:{let t=new FindPathParameters({isAnalyzeById:!1,nodes:e,hasLeastEdgeCount:!1,parameter:this.analystParameter_jam});n.push(t),r.push({name:"最短时间",id:2});break}}const o=n.length;for(let e=0;e<n.length;e++){let a=n[e];(0==e||1==e?this.findPathService_length:this.findPathService_jam).findPath(a,(n=>{var a=n.result;this._parametersCount++,a&&a.pathList?(a.pathList.forEach((function(t){i.initPolyline(t.nodeFeatures,r[e])})),this._parametersCount===o&&t&&t(r)):(this._parametersCount===o&&t&&t(r),this._parametersCount===o&&(this._parametersCount=0))}))}}initPolyline(e,t){var i=[],n=[],r=e.features.length;for(let t=0;t<r;t++){var o=new _0x45ea17(e.features[t].geometry.coordinates[0],e.features[t].geometry.coordinates[1],20);i.push(o)}var a=0;for(let e=0;e<i.length-1;e++){let t=WebGLPlot.Cartesian3.fromDegrees(i[e].x,i[e].y,0),n=WebGLPlot.Cartesian3.fromDegrees(i[e+1].x,i[e+1].y,0);a+=WebGLPlot.Cartesian3.distance(t,n)}var s="最短路径";void 0!==t&&(t.distance=a,s=t.name);for(let e=0;e<i.length;e++)n.push(i[e].x),n.push(i[e].y),n.push(i[e].z);var l=this.viewer.entities.add({name:s,polyline:{positions:WebGLPlot.Cartesian3.fromDegreesArrayHeights(n),width:8,material:new WebGLPlot.PolylineOutlineMaterialProperty({color:new WebGLPlot.Color(.24,.64,.91,.8)})}});this.routeLines[s]=l;let u=1;switch(s){case"最短路径":u=.25;break;case"最少路口":u=.5;break;case"最短时间":u=.75}var c=null;let h=0;for(let e=0;e<i.length-1;e++){let t=WebGLPlot.Cartesian3.fromDegrees(i[e].x,i[e].y,0),n=WebGLPlot.Cartesian3.fromDegrees(i[e+1].x,i[e+1].y,0);if(h+=WebGLPlot.Cartesian3.distance(t,n),h>=a*u){c=WebGLPlot.Cartesian3.fromDegrees(i[e].x,i[e].y,i[e].z);break}}var d=this.viewer.entities.add({name:s,position:c,point:{color:WebGLPlot.Color.RED,pixelSize:10},label:{text:s,font:"14pt Source Han Sans CN",fillColor:WebGLPlot.Color.BLACK,backgroundColor:WebGLPlot.Color.AQUA,showBackground:!0,style:WebGLPlot.LabelStyle.FILL,outlineWidth:2,verticalOrigin:WebGLPlot.VerticalOrigin.CENTER,horizontalOrigin:WebGLPlot.HorizontalOrigin.LEFT,pixelOffset:new WebGLPlot.Cartesian2(10,0)}});this.routeLineLabels[s]=d}initMark(e,t){var i=this.viewer.entities.add({position:WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z+3),billboard:{image:this.image,show:!0,eyeoffset:new WebGLPlot.Cartesian3(0,0,0),horizontalOrigin:WebGLPlot.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot.VerticalOrigin.BOTTOM,scale:1,width:25,height:25,pixelOffset:new WebGLPlot.Cartesian2(0,0)}}),n="mark"+t.toString();this.marks[n]=i}hightLightSolution(e){0==e?(this.viewer.entities.remove(this.routeLines["最短路径"]),this.viewer.entities.add(this.routeLines["最短路径"]),this.routeLines["最短路径"].polyline.material=WebGLPlot.Color.BLUE,this.routeLines["最少路口"].polyline.material=new WebGLPlot.Color(.24,.64,.91,.8),this.routeLines["最短时间"].polyline.material=new WebGLPlot.Color(.24,.64,.91,.8)):1==e?(this.viewer.entities.remove(this.routeLines["最少路口"]),this.viewer.entities.add(this.routeLines["最少路口"]),this.routeLines["最短路径"].polyline.material=new WebGLPlot.Color(.24,.64,.91,.8),this.routeLines["最少路口"].polyline.material=WebGLPlot.Color.BLUE,this.routeLines["最短时间"].polyline.material=new WebGLPlot.Color(.24,.64,.91,.8)):(e=2)&&(this.viewer.entities.remove(this.routeLines["最短时间"]),this.viewer.entities.add(this.routeLines["最短时间"]),this.routeLines["最短路径"].polyline.material=new WebGLPlot.Color(.24,.64,.91,.8),this.routeLines["最少路口"].polyline.material=new WebGLPlot.Color(.24,.64,.91,.8),this.routeLines["最短时间"].polyline.material=WebGLPlot.Color.BLUE)}removeRoutes(){for(let e=0;e<this.localPoints.length;e++)this.viewer.entities.remove(this.marks["mark"+(e+1).toString()]);this.viewer.entities.remove(this.routeLines["最短路径"]),this.viewer.entities.remove(this.routeLines["最少路口"]),this.viewer.entities.remove(this.routeLines["最短时间"]),this.viewer.entities.remove(this.routeLineLabels["最短路径"]),this.viewer.entities.remove(this.routeLineLabels["最少路口"]),this.viewer.entities.remove(this.routeLineLabels["最短时间"])}}var _0x52b360=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x828e3a=_0x52b360(void 0,(function(){return _0x828e3a.toString().search("(((.+)+)+)+$").toString().constructor(_0x828e3a).search("(((.+)+)+)+$")}));function _0x2074dd(){this._code=_0x585354.SYMBOL_ARBITRARYPOLYGON,this._libID=0,this._symbolType=_0x585354.SYMBOL_ARBITRARYPOLYGON,this._symbolName=WebGLPlot.plotI18n("polygon"),this._minEditPts=3,this._maxEditPts=9999}_0x828e3a(),_0x2074dd.prototype.getMinEditPts=function(){return this._minEditPts},_0x2074dd.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x2074dd.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;for(var i=[],n=0;n<t.length;++n)i.push(t[n].clone());return i.push(t[0].clone()),new _0x4df35e({symbolType:this._symbolType,points:i})},_0x2074dd.prototype.getSymbolName=function(){return this._symbolName};var _0x1f1914=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x4437ea=_0x1f1914(void 0,(function(){return _0x4437ea.toString().search("(((.+)+)+)+$").toString().constructor(_0x4437ea).search("(((.+)+)+)+$")}));function _0x36f740(){this._code=_0x585354.SYMBOL_BRACE,this._libID=0,this._symbolType=_0x585354.SYMBOL_BRACE,this._symbolName=WebGLPlot.plotI18n("brace"),this._minEditPts=2,this._maxEditPts=2,this._scaleValues=[],this._scaleValues.push(.1),this._scaleValues.push(.1),this._scalePoints=[]}_0x4437ea(),_0x36f740.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x36f740.prototype.getMinEditPts=function(){return this._minEditPts},_0x36f740.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts||2===t.length&&_0x51d1e4.isSamePt(t[0],t[1]))return null;for(var i=[],n=0;n<t.length;++n)i.push(t[n].clone());i.length;var r=i[0],o=i[1],a=_0x51d1e4.distance(r,o);this._scaleValues.length<2&&(this._scaleValues=[],this._scaleValues.push(.1),this._scaleValues.push(.1));var s=this._scaleValues[0],l=this._scaleValues[1],u=new WebGLPlot.Cartesian3(a*s,a*s,0),c=new WebGLPlot.Cartesian3(a*(.5-l/2),0,0),h=new WebGLPlot.Cartesian3(.5*a,-a*l,0),d=new WebGLPlot.Cartesian3(a*(.5+l/2),0,0),f=new WebGLPlot.Cartesian3(a*(1-s),a*s,0),p=[],_=180*Math.PI/180,m=270*Math.PI/180,$=3*Math.PI/180;for(n=_;n<=m;n+=$){var g=new WebGLPlot.Cartesian3(u.x+a*s,u.y,0);g=_0x51d1e4.rotateAngle(u,n,g),p.push(g)}p.push(c),p.push(h),p.push(d),_=270*Math.PI/180,m=360*Math.PI/180;for(n=_;n<=m;n+=$){g=new WebGLPlot.Cartesian3(f.x+a*s,f.y,0);g=_0x51d1e4.rotateAngle(f,n,g),p.push(g)}for(var y=_0x51d1e4.radian(r,o),v=[],x=0;x<p.length;x++){var b=new WebGLPlot.Cartesian3(p[x].x+r.x,p[x].y+r.y,0);b=_0x51d1e4.rotateAngle(r,y,b),v.push(b)}var S=new _0x4df35e({points:v,symbolType:_0x585354.SYMBOL_POLYLINE}),w=new WebGLPlot.Cartesian3(a*s,0,0),C=new WebGLPlot.Cartesian3(w.x+r.x,w.y+r.y,0);C=_0x51d1e4.rotateAngle(r,y,C),this._scalePoints.push(C);var T=new WebGLPlot.Cartesian3(h.x+r.x,h.y+r.y,0);return T=_0x51d1e4.rotateAngle(r,y,T),this._scalePoints.push(T),S},_0x36f740.prototype.modifyScalePoint=function(e,t,i){var n=e.points,r=_0x51d1e4.distance(n[0],n[1]);if(0===t){var o=_0x51d1e4.distance(n[0],i)/r;o>0&&o<.4&&(this._scaleValues[0]=o)}else if(1===t){var a=new WebGLPlot.Cartesian3((n[0].x+n[1].x)/2,(n[0].y+n[1].y)/2,0);new WebGLPlot.Cartesian3(i.x,a.y,0);var s=_0x51d1e4.distance(i,a)/r;0<s&&.2>s&&(this._scaleValues[1]=s)}return this.calculateParts({points:n})},_0x36f740.prototype.getSymbolName=function(){return this._symbolName};var _0x1ad636=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3eae3c=_0x1ad636(void 0,(function(){return _0x3eae3c.toString().search("(((.+)+)+)+$").toString().constructor(_0x3eae3c).search("(((.+)+)+)+$")}));function _0x4c00c5(){this._code=_0x585354.SYMBOL_CONCENTRICCIRCLE,this._libID=0,this._symbolType=_0x585354.SYMBOL_CONCENTRICCIRCLE,this._symbolName=WebGLPlot.plotI18n("concentricCircle"),this._startAngle=0,this._endAngle=360,this._minEditPts=3,this._maxEditPts=3}_0x3eae3c(),_0x4c00c5.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x4c00c5.prototype.getMinEditPts=function(){return this._minEditPts},_0x4c00c5.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;for(var t=[],i=0;i<e.points.length;++i)t.push(e.points[i].clone());if(t.length<this._minEditPts||2===t.length&&_0x51d1e4.isSamePt(t[0],t[1]))return null;for(2===t.length&&t.push(t[1].clone());this._startAngle>360;)this._startAngle-=360;for(;this._startAngle<0;)this._startAngle+=360;for(;this._endAngle>360;)this._endAngle-=360;for(;this._endAngle<0;)this._endAngle+=360;for(;this._endAngle<this._startAngle;)this._endAngle+=360;for(var n=_0x51d1e4.distance(t[0],t[1]),r=_0x51d1e4.distance(t[0],t[2]),o=[],a=[],s=[],l=Math.PI/180,u=(this._endAngle-this._startAngle)/72,c=this._startAngle;c<this._endAngle+u/2;c+=u){var h=t[0].x+n*Math.cos(c*l),d=t[0].y+n*Math.sin(c*l),f=t[0].x+r*Math.cos(c*l),p=t[0].y+r*Math.sin(c*l);o.push(new WebGLPlot.Cartesian3(h,d,0)),a.push(new WebGLPlot.Cartesian3(f,p,0))}o.push(o[0].clone()),a.push(a[0].clone());var _=new _0x4df35e({points:o,symbolType:_0x585354.SYMBOL_ARBITRARYPOLYGON});s.push(_);var m=new _0x4df35e({points:a,symbolType:_0x585354.SYMBOL_ARBITRARYPOLYGON});return s.push(m),s},_0x4c00c5.prototype.getSymbolName=function(){return this._symbolName};var _0x7b1438=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x50d4ff=_0x7b1438(void 0,(function(){return _0x50d4ff.toString().search("(((.+)+)+)+$").toString().constructor(_0x50d4ff).search("(((.+)+)+)+$")}));function _0x43bd24(){this._code=_0x585354.SYMBOL_CURVEEIGHT,this._libID=0,this._symbolType=_0x585354.SYMBOL_CURVEEIGHT,this._symbolName=WebGLPlot.plotI18n("curveEight"),this._minEditPts=2,this._maxEditPts=3}_0x50d4ff(),_0x43bd24.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x43bd24.prototype.getMinEditPts=function(){return this._minEditPts},_0x43bd24.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts||2==t.length&&_0x51d1e4.isSamePt(t[0],t[1]))return null;var i,n,r,o,a=[];if(2===t.length){var s=t[0].clone(),l=t[1].clone(),u=_0x51d1e4.distance(s,l)/2,c=180*_0x51d1e4.radian(s,l)/Math.PI,h=new WebGLPlot.Cartesian3((s.x+l.x)/2,(s.y+l.y)/2,0);i=_0x51d1e4.circlePoint(h,u,u,c+90);a=[];var d=new _0x4df35e({points:r=_0x51d1e4.calcCirclePts(u,i),symbolType:_0x585354.SYMBOL_CIRCLE});a.push(d),n=_0x51d1e4.circlePoint(h,3*u,3*u,c+90);var f=new _0x4df35e({points:o=_0x51d1e4.calcCirclePts(u,n),symbolType:_0x585354.SYMBOL_CIRCLE});a.push(f)}else{s=t[0],l=t[1];var p=t[2];c=0;c=_0x51d1e4.isRight(p,s,l)?180*_0x51d1e4.radian(l,s)/Math.PI+90:180*_0x51d1e4.radian(s,l)/Math.PI+90;u=_0x51d1e4.distance(s,l)/2,h=new WebGLPlot.Cartesian3((s.x+l.x)/2,(s.y+l.y)/2,0);i=_0x51d1e4.circlePoint(h,u,u,c);var _=_0x51d1e4.plumbLineLen(p,s,l);if(_<=4*u)n=_0x51d1e4.circlePoint(h,3*u,3*u,c),r=_0x51d1e4.calcCirclePts(u,i),a.push(new _0x4df35e({points:r,symbolType:_0x585354.SYMBOL_SYMBOL_ARBITRARYPOLYGON})),o=_0x51d1e4.calcCirclePts(u,n),a.push(new _0x4df35e({points:o,symbolType:_0x585354.SYMBOL_SYMBOL_ARBITRARYPOLYGON}));else{n=_0x51d1e4.circlePoint(h,_-u,_-u,c);for(var m=180*Math.acos(u/(_-2*u))/Math.PI,$=c-m,g=c-180+m,y=c-180-m+360,v=[],x=c+m-360;x<=$;x+=4){var b=_0x51d1e4.circlePoint(i,u,u,x);v.push(b)}var S=_0x51d1e4.circlePoint(i,u,u,$);v.push(S);var w=[];for(x=g;x<y;x+=4){b=_0x51d1e4.circlePoint(n,u,u,x);w.push(b)}var C=_0x51d1e4.circlePoint(n,u,u,y);w.push(C);var T=[];T=T.concat(v);for(x=w.length-1;x>=0;x--)T.push(w[x]);T.push(T[0].clone()),a.push(new _0x4df35e({points:T,symbolType:_0x585354.SYMBOL_ARBITRARYPOLYGON}))}}return a},_0x43bd24.prototype.getSymbolName=function(){return this._symbolName};var _0x36327e=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x12479e=_0x36327e(void 0,(function(){return _0x12479e.toString().search("(((.+)+)+)+$").toString().constructor(_0x12479e).search("(((.+)+)+)+$")}));function _0x1e2a22(){this._code=_0x585354.SYMBOL_KIDNEY,this._libID=0,this._symbolType=_0x585354.SYMBOL_KIDNEY,this._symbolName=WebGLPlot.plotI18n("kidney"),this._minEditPts=2,this._maxEditPts=3}_0x12479e(),_0x1e2a22.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x1e2a22.prototype.getMinEditPts=function(){return this._minEditPts},_0x1e2a22.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;return 2==t.length&&_0x51d1e4.isSamePt(t[0],t[1])||t.length<this._minEditPts?null:new _0x4df35e({points:_0x51d1e4.generateKidneyShapePts(t),symbolType:_0x585354.SYMBOL_ARBITRARYPOLYGON})},_0x1e2a22.prototype.getSymbolName=function(){return this._symbolName};var _0x48b9f0=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x42fc7e=_0x48b9f0(void 0,(function(){return _0x42fc7e.toString().search("(((.+)+)+)+$").toString().constructor(_0x42fc7e).search("(((.+)+)+)+$")}));function _0x208b05(){this._code=_0x585354.SYMBOL_PIE,this._libID=0,this._symbolType=_0x585354.SYMBOL_PIE,this._symbolName=WebGLPlot.plotI18n("sector"),this._maxEditPts=3,this._minEditPts=3}_0x42fc7e(),_0x208b05.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;var i,n=_0x51d1e4.innerAngle(t[0],t[1],t[2]),r=_0x51d1e4.distance(t[0],t[1]),o=_0x51d1e4.radian(t[0],t[1]),a=_0x51d1e4.radian(t[0],t[2]),s=[];return s.push(t[0]),(s=s.concat(_0x51d1e4.generateArcSpatialData(t[0],r,r,n,o,a))).push(t[0]),0!==s.length&&(i=new _0x4df35e({symbolType:_0x585354.SYMBOL_ARBITRARYPOLYGON,points:s})),i},_0x208b05.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x208b05.prototype.getMinEditPts=function(){return this._minEditPts},_0x208b05.prototype.getSymbolName=function(){return this._symbolName};var _0x45081c=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1c42aa=_0x45081c(void 0,(function(){return _0x1c42aa.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c42aa).search("(((.+)+)+)+$")}));function _0x2bd08e(){this._code=_0x585354.SYMBOL_POLYBEZIERCLOSED,this._libID=0,this._symbolType=_0x585354.SYMBOL_POLYBEZIERCLOSED,this._symbolName=WebGLPlot.plotI18n("closedBesselCurve"),this._minEditPts=3,this._maxEditPts=9999}_0x1c42aa(),_0x2bd08e.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points,i=t.length;if(2==i&&_0x51d1e4.isSamePt(t[0],t[1])||i<this._minEditPts)return null;for(var n=[],r=0;r<i;++r)n.push(t[r].clone());n.push(t[0].clone());var o=_0x51d1e4.generateBezierCtrlPts(n),a=_0x51d1e4.generateBezierPointsWithCtrlPts(o);return new _0x4df35e({points:a=_0x51d1e4.clearNextSamePts(a),symbolType:_0x585354.SYMBOL_ARBITRARYPOLYGON})},_0x2bd08e.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x2bd08e.prototype.getMinEditPts=function(){return this._minEditPts},_0x2bd08e.prototype.getSymbolName=function(){return this._symbolName};var _0x172b3b=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x5effc0=_0x172b3b(void 0,(function(){return _0x5effc0.toString().search("(((.+)+)+)+$").toString().constructor(_0x5effc0).search("(((.+)+)+)+$")}));function _0x4c3292(){this._code=_0x585354.SYMBOL_POLYLINE,this._libID=0,this._symbolType=_0x585354.SYMBOL_POLYLINE,this._symbolName=WebGLPlot.plotI18n("polyLine"),this._minEditPts=2,this._maxEditPts=9999}_0x5effc0(),_0x4c3292.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;return null===t||t.length<this._minEditPts||t.length<this._minEditPts?null:new _0x4df35e({symbolType:this._symbolType,points:t})},_0x4c3292.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x4c3292.prototype.getMinEditPts=function(){return this._minEditPts},_0x4c3292.prototype.getSymbolName=function(){return this._symbolName};var _0x1a4e3b=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x3c978f=_0x1a4e3b(void 0,(function(){return _0x3c978f.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c978f).search("(((.+)+)+)+$")}));function _0x56dda6(){this._code=_0x585354.SYMBOL_REGULARPOLYGON,this._libID=0,this._symbolType=_0x585354.SYMBOL_REGULARPOLYGON,this._symbolName=WebGLPlot.plotI18n("regularPolygon"),this._minEditPts=2,this._maxEditPts=9999}_0x3c978f(),_0x56dda6.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(null===t||t.length<this._minEditPts)return null;var i=[],n=t.length,r=2*Math.PI/(n+1),o=Math.PI/2,a=_0x51d1e4.distance(t[0],t[n-1]),s=new WebGLPlot.Cartesian3(t[0].x+a,t[0].y,t[0].z).clone();s=_0x51d1e4.rotateAngle(t[0],o,s),i.push(s.clone());for(var l=1;l<n+1;++l)s=_0x51d1e4.rotateAngle(t[0],r,s),i.push(s.clone());return i.push(i[0]),new _0x4df35e({symbolType:_0x585354.SYMBOL_ARBITRARYPOLYGON,points:i})},_0x56dda6.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x56dda6.prototype.getMinEditPts=function(){return this._minEditPts},_0x56dda6.prototype.getSymbolName=function(){return this._symbolName};var _0x7c892e=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x149406=_0x7c892e(void 0,(function(){return _0x149406.toString().search("(((.+)+)+)+$").toString().constructor(_0x149406).search("(((.+)+)+)+$")}));function _0x253eef(){this._code=_0x585354.SYMBOL_RUNWAY,this._libID=0,this._symbolType=_0x585354.SYMBOL_RUNWAY,this._symbolName=WebGLPlot.plotI18n("runway"),this._scalePoints=[],this._scaleValues=[],this._scaleValues.push(.2),this._minEditPts=2,this._maxEditPts=2}_0x149406(),_0x253eef.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x253eef.prototype.getMinEditPts=function(){return this._minEditPts},_0x253eef.prototype.getSymbolName=function(){return this._symbolName},_0x253eef.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts||2===t.length&&_0x51d1e4.isSamePt(t[0],t[1]))return null;for(var i=t[0].clone(),n=t[1].clone(),r=_0x51d1e4.distance(i,n)*this._scaleValues[0],o=_0x51d1e4.parallel(t,r/2),a=_0x51d1e4.parallel(t,-r/2),s=180*_0x51d1e4.radian(i,n)/Math.PI,l=[],u=s+90;u<=s+270;u+=10){var c=_0x51d1e4.circlePoint(i,r/2,r/2,u);l.push(c)}for(var h=[],d=s-90;d<=s+90;d+=10){c=_0x51d1e4.circlePoint(n,r/2,r/2,d);h.push(c)}var f=[];f=(f=(f=(f=f.concat(l)).concat(a)).concat(h)).concat(o);var p=new _0x4df35e({points:f=_0x51d1e4.clearNextSamePts(f),symbolType:_0x585354.SYMBOL_ARBITRARYPOLYGON}),_=new WebGLPlot.Cartesian3(l[0].x,l[0].y,l[0].z);return this._scalePoints.push(_),p},_0x253eef.prototype.modifyScalePoint=function(e,t,i){if(0==t){var n=_0x51d1e4.distance(i,e.points[0]),r=_0x51d1e4.distance(e.points[0],e.points[1]);this._scalePoints[0]=2*n/r}};var _0x25164f=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x7d8943=_0x25164f(void 0,(function(){return _0x7d8943.toString().search("(((.+)+)+)+$").toString().constructor(_0x7d8943).search("(((.+)+)+)+$")}));function _0x305d72(){this._code=_0x585354.SYMBOL_TRAPEZOID,this._libID=0,this._symbolType=_0x585354.SYMBOL_TRAPEZOID,this._symbolName=WebGLPlot.plotI18n("trapezoid"),this._minEditPts=3,this._maxEditPts=3}_0x7d8943(),_0x305d72.prototype.calculateParts=function(e){if(!defined(e)||!defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;t.length;var i=[],n=t[0].clone(),r=t[1].clone(),o=t[2].clone(),a=new WebGLPlot.Cartesian3(0,0,0);_0x51d1e4.getTrapezoidPoints(1,o,r,n,a),i.push(n),i.push(r),i.push(o),i.push(a);var s,l=_0x51d1e4.intersectLines(n,r,o,a),u=l.intersectPoint;return l.isIntersectLines&&(u.x>n.x&&u.x<r.x||u.y>n.y&&u.y<r.y||u.x<n.x&&u.x>r.x||u.y<n.y&&u.y>r.y)&&(i[0]=a,i[3]=n),4===i.length&&(i.push(i[0].clone()),s=new _0x4df35e({symbolType:_0x585354.SYMBOL_ARBITRARYPOLYGON,points:i})),s},_0x305d72.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x305d72.prototype.getMinEditPts=function(){return this._minEditPts},_0x305d72.prototype.getSymbolName=function(){return this._symbolName};var _0x1c7d8a=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x26e7fb=_0x1c7d8a(void 0,(function(){return _0x26e7fb.toString().search("(((.+)+)+)+$").toString().constructor(_0x26e7fb).search("(((.+)+)+)+$")}));function _0x4383d7(){}_0x26e7fb(),_0x4383d7.toJSON=function(e){var t=e;if(null==t)return null;switch(t.constructor){case String:return t=(t=(t=(t=(t=(t=(t='"'+t.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%2525")).replace(/&/g,"%26");case Array:for(var i=[],n=0,r=t.length;n<r;n++)i.push(this.toJSON(t[n]));return"["+i.join(",")+"]";case Number:return isFinite(t)?String(t):null;case Boolean:return String(t);case Date:return"{'__type':\"System.DateTime\",'Year':"+t.getFullYear()+",'Month':"+(t.getMonth()+1)+",'Day':"+t.getDate()+",'Hour':"+t.getHours()+",'Minute':"+t.getMinutes()+",'Second':"+t.getSeconds()+",'Millisecond':"+t.getMilliseconds()+",'TimezoneOffset':"+t.getTimezoneOffset()+"}";default:if(null!=t.toJSON&&"function"==typeof t.toJSON)return t.toJSON();if("object"==typeof t){if(t.length){for(i=[],n=0,r=t.length;n<r;n++)i.push(this.toJSON(t[n]));return"["+i.join(",")+"]"}i=[];for(var o in t)"function"!=typeof t[o]&&"CLASS_NAME"!==o&&"parent"!==o&&i.push('"'+o+'":'+this.toJSON(t[o]));return i.length>0?"{"+i.join(",")+"}":"{}"}return t.toString()}},_0x4383d7.geoGraphicObjectToSmlFeature=function(e,t){return WebGLPlot.defined(e)?e.getSymbolData():null},_0x4383d7.smlFeatureToGeoGraphicObject=function(e,t){t.geoJsonToGeoGraphicObject(e)};var _0x1b7f18=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xb859b5=_0x1b7f18(void 0,(function(){return _0xb859b5.toString().search("(((.+)+)+)+$").toString().constructor(_0xb859b5).search("(((.+)+)+)+$")}));function _0x9cade4(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.layerName=WebGLPlot.defaultValue(e.layerName,""),this.spatialAnalystUrl=WebGLPlot.defaultValue(e.spatialAnalystUrl,null),this.useCanvas2=WebGLPlot.defaultValue(e.useCanvas2,!1),this.useCanvas=WebGLPlot.defaultValue(e.useCanvas,!1),this.features=WebGLPlot.defaultValue(e.features,[])}_0xb859b5();var _0x15d507=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x228856=_0x15d507(void 0,(function(){return _0x228856.toString().search("(((.+)+)+)+$").toString().constructor(_0x228856).search("(((.+)+)+)+$")}));function _0x1ad33d(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),WebGLPlot.Check.defined("options.url",e.url);var t=e.url,i=e.responseType,n=WebGLPlot.defaultValue(e.method,"GET"),r=e.data,o=e.headers,a=e.overrideMimeType;t=WebGLPlot.defaultValue(t,e.url);var s=WebGLPlot.defined(e.request)?e.request:new WebGLPlot.Request;return s.url=t,s.requestFunction=function(e){var l=WebGLPlot.when.defer(),u=_0x1ad33d.load(WebGLPlot.defaultValue(e,t),i,n,r,o,l,a);return WebGLPlot.defined(u)&&WebGLPlot.defined(u.abort)&&(s.cancelFunction=function(){u.abort()}),l.promise},WebGLPlot.RequestScheduler.request(s)}_0x228856();var _0x14196d=/^data:(.*?)(;base64)?,(.*)$/;function _0x29264c(e,t){var i=decodeURIComponent(t);return e?atob(i):i}function _0x25546c(e,t){for(var i=_0x29264c(e,t),n=new ArrayBuffer(i.length),r=new Uint8Array(n),o=0;o<i.length;o++)r[o]=i.charCodeAt(o);return n}function _0x5f25c4(e,t){t=WebGLPlot.defaultValue(t,"");var i=e[1],n=!!e[2],r=e[3];switch(t){case"":case"text":return _0x29264c(n,r);case"arraybuffer":return _0x25546c(n,r);case"blob":var o=_0x25546c(n,r);return new Blob([o],{type:i});case"document":return(new DOMParser).parseFromString(_0x29264c(n,r),i);case"json":return JSON.parse(_0x29264c(n,r));default:throw new WebGLPlot.DeveloperError("Unhandled responseType: "+t)}}_0x1ad33d.load=function(e,t,i,n,r,o,a){var s=_0x14196d.exec(e);if(null===s){var l=new XMLHttpRequest;if(WebGLPlot.TrustedServers.contains(e)&&(l.withCredentials=!0),WebGLPlot.defined(a)&&WebGLPlot.defined(l.overrideMimeType)&&l.overrideMimeType(a),l.open(i,e,!0),WebGLPlot.defined(r))for(var u in r)r.hasOwnProperty(u)&&l.setRequestHeader(u,r[u]);WebGLPlot.defined(t)&&(l.responseType=t);var c=!1;return"string"==typeof e&&(c=0===e.indexOf("file://")),l.onload=function(){if(!(l.status<200||l.status>=300)||c&&0===l.status){var e=l.response,i=l.responseType;if(!WebGLPlot.defined(e)||WebGLPlot.defined(t)&&i!==t)if("json"===t&&"string"==typeof e)try{o.resolve(JSON.parse(e))}catch(e){o.reject(e)}else(""===i||"document"===i)&&WebGLPlot.defined(l.responseXML)&&l.responseXML.hasChildNodes()?o.resolve(l.responseXML):""!==i&&"text"!==i||!WebGLPlot.defined(l.responseText)?o.reject(new WebGLPlot.RuntimeError("Invalid XMLHttpRequest response type.")):o.resolve(l.responseText);else o.resolve(e)}else o.reject(new WebGLPlot.RequestErrorEvent(l.status,l.response,l.getAllResponseHeaders()))},l.onerror=function(e){o.reject(new WebGLPlot.RequestErrorEvent)},l.send(n),l}o.resolve(_0x5f25c4(s,t))},_0x1ad33d.defaultLoad=_0x1ad33d.load;var _0x230ab4=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x438910=_0x230ab4(void 0,(function(){return _0x438910.toString().search("(((.+)+)+)+$").toString().constructor(_0x438910).search("(((.+)+)+)+$")}));function _0x4334dd(e,t,i){return _0x1ad33d({url:e,headers:t,request:i})}_0x438910();var _0x50cdf6=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x53e918=_0x50cdf6(void 0,(function(){return _0x53e918.toString().search("(((.+)+)+)+$").toString().constructor(_0x53e918).search("(((.+)+)+)+$")}));_0x53e918();var _0x179bdc={Accept:"application/json,*/*;q=0.01"};function _0x2ff82a(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("url is required.");WebGLPlot.defined(t)?WebGLPlot.defined(t.Accept)||((t=WebGLPlot.clone(t)).Accept=_0x179bdc.Accept):t=_0x179bdc;var n=_0x4334dd(e,t,i);if(WebGLPlot.defined(n))return n.then((function(e){return JSON.parse(e)}))}var _0x47028f=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x221f4c=_0x47028f(void 0,(function(){return _0x221f4c.toString().search("(((.+)+)+)+$").toString().constructor(_0x221f4c).search("(((.+)+)+)+$")}));function _0x459245(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.smlInfo=WebGLPlot.defaultValue(e.smlInfo,void 0),this.mapInfo=WebGLPlot.defaultValue(e.mapInfo,""),this.layerDatas=WebGLPlot.defaultValue(e.layerDatas,void 0)}_0x221f4c(),_0x459245.prototype.destory=function(){this.smlInfo=null,this.mapInfo=null,this.layerDatas=null};var _0xc0bee5=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x36794d=_0xc0bee5(void 0,(function(){return _0x36794d.toString().search("(((.+)+)+)+$").toString().constructor(_0x36794d).search("(((.+)+)+)+$")}));function _0x6ba8ff(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.smlName=WebGLPlot.defaultValue(e.smlName,""),this.smlDesc=WebGLPlot.defaultValue(e.smlDesc,""),this.smlSeclevel=WebGLPlot.defaultValue(e.smlSeclevel,""),this.smlDepat=WebGLPlot.defaultValue(e.smlDepat,""),this.smlAuthor=WebGLPlot.defaultValue(e.smlAuthor,""),this.smlTime=WebGLPlot.defaultValue(e.smlTime,"")}_0x36794d(),_0x6ba8ff.prototype.fromJSON=function(e){this.smlName=e.SMLName,this.smlDesc=e.SMLDesc,this.smlSeclevel=e.SMLSeclevel,this.smlDepat=e.SMLDepat,this.smlAuthor=e.SMLAuthor,this.smlTime=e.SMLTime},_0x6ba8ff.prototype.toJSON=function(){return'{"SMLName":'+WebGLPlot.toJSON(this.smlName)+',"SMLDesc":'+WebGLPlot.toJSON(this.smlDesc)+',"SMLSeclevel":'+WebGLPlot.toJSON(this.smlSeclevel)+',"SMLDepat":'+WebGLPlot.toJSON(this.smlDepat)+',"SMLAuthor":'+WebGLPlot.toJSON(this.smlAuthor)+',"SMLTime":'+WebGLPlot.toJSON(this.smlTime)+"}"},_0x6ba8ff.prototype.destroy=function(){this.smlName="",this.smlDesc="",this.smlAuthor="",this.smlSeclevel="",this.smlDepat="",this.smlTime=""};var _0x48684f=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2e120c=_0x48684f(void 0,(function(){return _0x2e120c.toString().search("(((.+)+)+)+$").toString().constructor(_0x2e120c).search("(((.+)+)+)+$")}));_0x2e120c();var WebGLPlot$a=window.WebGLPlot=window.WebGLPlot||{},_0x9b5bc1=new Map;function _0x4d3d6b(e){e=WebGLPlot$a.defaultValue(e,WebGLPlot$a.defaultValue.EMPTY_OBJECT),this._scene=WebGLPlot$a.defaultValue(e.scene,void 0),this._serverUrl=WebGLPlot$a.defaultValue(e.serverUrl,""),this._smlInfo=WebGLPlot$a.defaultValue(e.smlInfo,new _0x6ba8ff),this._smlFileName=WebGLPlot$a.defaultValue(e.smlFileName,"situationMap"),this._sitData=WebGLPlot$a.defaultValue(e.sitData,new _0x459245),this._openSmlFileCompleted=new WebGLPlot$a.Event,this._openSmlFileFailed=new WebGLPlot$a.Event,this._saveSmlFileCompleted=new WebGLPlot$a.Event,this._saveSmlFileFailed=new WebGLPlot$a.Event,this._getSmlInfosCompleted=new WebGLPlot$a.Event,this._getSmlInfosFailed=new WebGLPlot$a.Event,this._getSmlInfoCompleted=new WebGLPlot$a.Event,this._getSmlInfoFailed=new WebGLPlot$a.Event,this._deleteSmlFileCompleted=new WebGLPlot$a.Event,this._deleteSmlFileFailed=new WebGLPlot$a.Event,this._openLocalSmlFileCompleted=new WebGLPlot$a.Event,this._openLocalSmlFileFailed=new WebGLPlot$a.Event,this._addSmlFileCompleted=new WebGLPlot$a.Event,this._addSmlFileFailed=new WebGLPlot$a.Event,this._addSmlFileToLayerCompleted=new WebGLPlot$a.Event,this._addSmlFileToLayerFailed=new WebGLPlot$a.Event,this.options={serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},e.options&&e.options.serviceParams&&_0x51d1e4.extend(this.options,e.options)}_0x4d3d6b.getInstance=function(e){let t;return e.scene&&(t=_0x9b5bc1.get(e.scene._plottingID)),WebGLPlot$a.defined(e)&&!WebGLPlot$a.defined(t)&&(t=new WebGLPlot$a.SitDataManager(e),_0x9b5bc1.set(e.scene._plottingID,t)),t},_0x4d3d6b.prototype.openJsonSitData=function(e,t){!WebGLPlot$a.defined(e)||null===e||((!WebGLPlot$a.defined(t)||""===t)&&(t="situationMap"),this._getCompletedInit(e,t))},_0x4d3d6b.prototype.openAndUploadLocalSmlFile=function(e){var t=this;this.uploadSmlFile((function(i){i.success?t.openSmlFileOnServer(i.smlFileName,e):t._openSmlFileFailed.raiseEvent()}))},_0x4d3d6b.prototype.openLocalSmlFile=function(){if(!window.FileReader)return;let e=document.createElement("input");e.setAttribute("type","file"),e.click(),e.onchange=function(){if(!e.files||0===e.files.length)return;let t=e.files[0].name;var i=new FileReader;i.readAsText(e.files[0]),i.onloadstart=function(e){(e.total>=5242880||e.total<=0)&&_self._openLocalSmlFileFailed.raiseEvent()},i.onerror=function(e){_self._openLocalSmlFileFailed.raiseEvent()},i.onloadend=function(){_self._openLocalSmlFileCompleted.raiseEvent()},i.onload=function(i){self._getCompletedInit(JSON.parse(i.target.result),t),e.remove()}}},_0x4d3d6b.prototype.addLocalSmlFile=function(e){var t=this;this.uploadSmlFile((function(i){if(!i.success)throw new WebGLPlot$a.DeveloperError("uploadSmlFile failed!!!");t.addSmlFileOnServer(i.smlFileName,e)}))},_0x4d3d6b.prototype.uploadSmlFile=function(e){if(!window.FileReader)return;let t=document.createElement("input");t.setAttribute("type","file"),t.click();var i=this;t.onchange=function(){if(!t.files||0===t.files.length)return;const n=t.files[0].name.split(".")[0];var r=new FileReader;r.readAsText(t.files[0]),r.onload=function(r){var o=WebGLPlot$a.smlFileService(i._serverUrl,i.options.serviceParams);if(!o)return;let a=JSON.parse(r.target.result);var s=o.editSmlFileParams;s.method="POST",s.sitData=a,s.smlFileName=n,s.isCover=!0,o.smlFileService.editSMLFile(s,(function(t){t.result.succeed&&"function"==typeof e?e({success:!0,smlFileName:n,message:"success"}):"function"==typeof e&&e({success:!1,message:"failed"})}),i),t.remove()}}},_0x4d3d6b.prototype.addSmlFileToLayer=function(e){var t=this;this.uploadSmlFile((function(i){i.success?t.addSmlFileToLayerOnServer(i.smlFileName,e):t._addSmlFileToLayerFailed.raiseEvent()}))},_0x4d3d6b.prototype.addSmlFileOnServer=function(e,t){var i=this,n=this._scene;var r=WebGLPlot$a.smlFileService(this._serverUrl,this.options.serviceParams);if(r){var o=r.editSmlFileParams;o.method="GET",o.smlFileName=e,r.smlFileService.editSMLFile(o,(function(e){e.result.succeed?function(e){if(WebGLPlot$a.defined(e)){for(var r=e.layerDatas,o=null,a=0;a<r.length;++a)if(null!==r[a].layerName){var s=_0x51d1e4.getPlotLayers(n);if(null===s)return;o=s.find(r[a].layerName),t&&!WebGLPlot$a.defined(o)&&(o=new _0x4ab86a(n,r[a].layerName),s.add(o)),WebGLPlot$a.defined(o)&&i._load(r[a],o)}null!==o?i._addSmlFileCompleted.raiseEvent():i._addSmlFileFailed.raiseEvent()}}(e.result):i._addSmlFileFailed.raiseEvent()}),this)}},_0x4d3d6b.prototype.addSmlFileToLayerOnServer=function(e,t){var i=this,n=this._scene;var r=WebGLPlot$a.smlFileService(this._serverUrl,this.options.serviceParams);if(r){var o=r.editSmlFileParams;o.method="GET",o.smlFileName=e,r.smlFileService.editSMLFile(o,(function(e){e.result.succeed?function(e){if(WebGLPlot$a.defined(e)){var r,o=e.layerDatas,a=_0x51d1e4.getPlotLayers(n);r=a.find(t),WebGLPlot$a.defined(r)||(r=new _0x4ab86a(n,t),a.add(r));for(var s=0;s<o.length;++s)i._load(o[s],r);i._addSmlFileToLayerCompleted.raiseEvent()}}(e.result):i._addSmlFileToLayerFailed.raiseEvent()}),this)}},_0x4d3d6b.prototype.downloadSmlFileUrl=function(e){return"smlFileDownload/"+e+".sml"},_0x4d3d6b.prototype.openSmlFileOnServer=function(e,t){var i=this;var n=WebGLPlot$a.smlFileService(this._serverUrl,this.options.serviceParams);if(n){var r=n.editSmlFileParams;r.method="GET",r.smlFileName=e,n.smlFileService.editSMLFile(r,(function(n){var r;n.result&&n.result.succeed?(r=n.result,i._getCompletedInit(r,e),"function"==typeof t&&t({success:!0,smlFileName:e,sitDataLayers:i.getPlottingLayers()})):(i._openSmlFileFailed.raiseEvent(),"function"==typeof t&&t({success:!1,message:"Open failed"}))}),this)}},_0x4d3d6b.prototype.deleteSmlFileOnServer=function(e){var t=this;var i={smlFileName:e},n=this.buildUrl(i);n+="?isCover=false";var r=WebGLPlot$a.EditSmlFile(n,this.options.serviceParams);if(r){var o=r.editSmlFile;o.events.on({processCompleted:function(e){t._deleteSmlFileCompleted.raiseEvent()},processFailed:function(e){t._deleteSmlFileFailed.raiseEvent()},scope:this});var a=r.editSmlFileParams;a.method="DELETE",a.smlFileName=e,o.processAsync(a)}},_0x4d3d6b.prototype.updateLayerData=function(e){if(WebGLPlot$a.defined(this._sitData)&&WebGLPlot$a.defined(this._sitData.layerDatas))for(var t=0;t<this._sitData.layerDatas.length;++t)if(e._name==this._sitData.layerDatas[t].layerName){for(var i=this._sitData.layerDatas[t],n=[],r=e.geoGraphicObjects,o=0;o<r.length;++o){var a,s=r[o];a=_0x4383d7.geoGraphicObjectToSmlFeature(s,s.feature),n.push(a)}i.features=n,i.isEditable=e.isEditable,i.isLocked=e.isLocked,i.isSelected=e.isSelected,i.vivibility=e.visibility}},_0x4d3d6b.prototype.getSmlInfos=function(e,t){var i=this;var n=e*t,r=t,o=i._serverUrl,a=o.substr(o.length-1,1);o+="/"===a?"smlInfos":"/smlInfos",o+=".json",_0x2ff82a(o+="?start="+n+"&count="+r).then((function(e){var t;t=e,i._getSmlInfosCompleted.raiseEvent(t)}),(function(e){var t;t=e,i._getSmlInfosFailed.raiseEvent(t)}))},_0x4d3d6b.prototype.getSmlInfo=function(e){this._scene;var t={smlFileName:e};_0x2ff82a(this.buildUrl(t)).then((function(e){!function(e){this._getSmlInfoCompleted.raiseEvent(e.smlInfo)}(e)}),(function(e){!function(e){this._getSmlInfoFailed.raiseEvent(null)}()}))},_0x4d3d6b.prototype.saveAsSmlFile=function(e){this._save(e,!0)},_0x4d3d6b.prototype.newSmlFile=function(){this._smlFileName="",this._smlInfo.destroy();for(var e,t=_0x51d1e4.getPlotLayers(this._scene),i=0;i<t._layerQueue.length;++i)(e=t.findByIndex(i))instanceof _0x4ab86a&&t.remove(e._name);_0x24dc2a.removeAll(this._scene)},_0x4d3d6b.prototype._getCompletedInit=function(e,t){this._smlFileName=t,this.openSitDataFromJson(e)},_0x4d3d6b.prototype.openSitDataFromJson=function(e){this._smlInfo.fromJSON(e.smlInfo),e.mapInfo&&(this._sitData.mapInfo=e.mapInfo),this._sitData.layerDatas=e.layerDatas;var t=e.layerDatas,i=this._scene,n=_0x51d1e4.getPlotLayers(i);if(null!==n){for(var r,o=n._layerQueue.length,a=0;a<o;){var s=n.findByIndex(a);s instanceof _0x4ab86a?(s._removeAll(!0),n.remove(s._name),o--):a++}for(var l=0;l<t.length;++l)r=new _0x4ab86a(i,t[l].layerName),n.add(r),this._load(t[l],r),void 0!==t[l].isEditable&&null!==t[l].isEditable&&(r._isEditable=t[l].isEditable),void 0!==t[l].isSelected&&null!==t[l].isSelected&&(r._isSelected=t[l].isSelected),void 0!==t[l].isLocked&&null!==t[l].isLocked&&(r.isLocked=t[l].isLocked),void 0!==t[l].visibility&&null!==t[l].visibility&&(r.visibility=t[l].visibility),WebGLPlot$a.defined(t[l]._bIsUseDepthTest)&&r.setUseDepthTest(t[l]._bIsUseDepthTest);this._openSmlFileCompleted.raiseEvent(e)}},_0x4d3d6b.prototype._load=function(e,t){for(var i=0,n=e.features.length;i<n;++i){var r=e.features[i];null!==r&&(r.hasOwnProperty("isEdit")||(r.isEdit=!0),_0x4383d7.smlFeatureToGeoGraphicObject(r,t))}},_0x4d3d6b.prototype.saveSmlFile=function(e,t){WebGLPlot$a.defined(e)||(e=this.smlFileName),WebGLPlot$a.defined(t)||(t=!0),this._save(e,t)},_0x4d3d6b.prototype._save=function(e,t){_0x9f2efc.getInstance({scene:this._scene}).reset();var i=this;function n(e){var t,n;e?(n=e,i._saveSmlFileCompleted.raiseEvent(n)):i._saveSmlFileFailed.raiseEvent(t)}var r=i._serverUrl,o=WebGLPlot$a.smlFileService(r,this.options.serviceParams);if(o){var a=o.editSmlFileParams;a.method="POST",a.sitData=this.saveSitData(),a.smlFileName=e,a.isCover=t,o.smlFileService.editSMLFile(a,(function(e){e.result.succeed?n({success:!0}):n({success:!1})}),this)}},_0x4d3d6b.prototype.saveSitData=function(){var e=this._scene,t=new _0x459245;t.smlInfo=this._smlInfo,this._sitData.mapInfo?t.mapInfo=this._sitData.mapInfo:t.mapInfo={zoom:4,centerX:112.5,centerY:36.5},t.layerDatas=[];var i=_0x51d1e4.getPlotLayers(e);if(null===i)return t;for(var n,r,o=0;o<i._layerQueue.length;++o)if((n=i.findByIndex(o))instanceof _0x4ab86a){(r=new _0x9cade4).layerName=n._name,r.spatialAnalystUrl=WebGLPlot$a.defaultValue(n.spatialAnalystUrl,null),r.useCanvas=!0,r.isEditable=n.isEditable,r.isLocked=n.isLocked,r.isSelected=n.isSelected,r.visibility=n.visibility,r._bIsUseDepthTest=n._bIsUseDepthTest;for(var a=0;a<n.geoGraphicObjects.length;++a){var s=_0x4383d7.geoGraphicObjectToSmlFeature(n.geoGraphicObjects[a]);r.features.push(s)}t.layerDatas.push(r)}return t},_0x4d3d6b.prototype.getPlottingLayers=function(){for(var e=[],t=this._scene,i=_0x51d1e4.getPlotLayers(t),n=0;n<i._layerQueue.length;++n){var r=i.findByIndex(n);r instanceof _0x4ab86a&&e.push(r)}return e},_0x4d3d6b.prototype.buildUrl=function(e){var t=this._serverUrl,i=t.substr(t.length-1,1);t+="/"===i?"smlInfos/":"/smlInfos/";var n=e.smlFileName,r=RegExp(/./);return n.match(r)&&(n=n.split(".")[0]),t+=n+".json"},Object.defineProperties(_0x4d3d6b.prototype,{scene:{get:function(){return this._scene}},serverUrl:{get:function(){return this._serverUrl}},smlInfo:{get:function(){return this._smlInfo},set:function(e){e!==this._smlInfo&&(this._smlInfo=e)}},smlFileName:{get:function(){return this._smlFileName},set:function(e){e!==this._smlFileName&&(this._smlFileName=e)}},openSmlFileCompleted:{get:function(){return this._openSmlFileCompleted}},openSmlFileFailed:{get:function(){return this._openSmlFileFailed}},saveSmlFileFailed:{get:function(){return this._saveSmlFileFailed}},saveSmlFileCompleted:{get:function(){return this._saveSmlFileCompleted}},getSmlInfosCompleted:{get:function(){return this._getSmlInfosCompleted}},getSmlInfosFailed:{get:function(){return this._getSmlInfosFailed}},getSmlInfoCompleted:{get:function(){return this._getSmlInfoCompleted}},getSmlInfoFailed:{get:function(){return this._getSmlInfoFailed}},openLocalSmlFileCompleted:{get:function(){return this._openLocalSmlFileCompleted}},openLocalSmlFileFailed:{get:function(){return this._openLocalSmlFileFailed}},addSmlFileToLayerCompleted:{get:function(){return this._addSmlFileToLayerCompleted}},addSmlFileToLayerFailed:{get:function(){return this._addSmlFileToLayerFailed}},addSmlFileCompleted:{get:function(){return this._addSmlFileCompleted}},addSmlFileFailed:{get:function(){return this._addSmlFileFailed}},deleteSmlFileCompleted:{get:function(){return this._deleteSmlFileCompleted}},deleteSmlFileFailed:{get:function(){return this._deleteSmlFileFailed}}}),WebGLPlot$a.SitDataManager=_0x4d3d6b;var _0x6edbb6=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x269069=_0x6edbb6(void 0,(function(){return _0x269069.toString().search("(((.+)+)+)+$").toString().constructor(_0x269069).search("(((.+)+)+)+$")}));function _0x585a75(e){this.style=this.getDefaultStyle(),this.viewer=e,this.rainStage=null,this.snowStage=null}_0x269069(),_0x585a75.prototype.smoke=function(e,t){var i=this.createSmokeSystem(e,t);return this.viewer.scene.primitives.add(i),i},_0x585a75.prototype.flame=function(e,t){var i=this.createFlameSystem(e,t);return this.viewer.scene.primitives.add(i),i},_0x585a75.prototype.blast=function(e,t){var i=this.createBlastSystem(e,t);return this.viewer.scene.primitives.add(i),i},_0x585a75.prototype.removeEfficiency=function(e){this.viewer.scene.primitives.remove(e)},_0x585a75.prototype.startRain=function(){this.rain()},_0x585a75.prototype.stopRain=function(){null!==this.rainStage&&(this.viewer.scene.postProcessStages.remove(this.rainStage),this.rainStage=null)},_0x585a75.prototype.startSnow=function(){this.snow()},_0x585a75.prototype.stopSnow=function(){null!==this.snowStage&&(this.viewer.scene.postProcessStages.remove(this.snowStage),this.snowStage=null)},_0x585a75.prototype.rain=function(){if(null===this.rainStage){var e=new Cesium.PostProcessStage({name:"czm_rain",fragmentShader:"uniform sampler2D colorTexture;\n varying vec2 v_textureCoordinates;\n \n float hash(float x){\n return fract(sin(x*133.3)*13.13);\n }\n \n void main(void){\n \n float time = czm_frameNumber / 60.0;\n vec2 resolution = czm_viewport.zw;\n \n vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\n vec3 c=vec3(.6,.7,.8);\n \n float a=-.4;\n float si=sin(a),co=cos(a);\n uv*=mat2(co,-si,si,co);\n uv*=length(uv+vec2(0,4.9))*.3+1.;\n \n float v=1.-sin(hash(floor(uv.x*100.))*100.);\n float b=clamp(abs(sin(15.*time*v+uv.y*(10./(2.+v))))-.95,0.,1.)*4.;\n c*=v*b; \n \n gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(c,1), 0.5); \n }\n"});this.viewer.scene.postProcessStages.add(e),this.rainStage=e}},_0x585a75.prototype.snow=function(){if(null===this.snowStage){var e=new Cesium.PostProcessStage({name:"czm_snow",fragmentShader:"uniform sampler2D colorTexture;\n varying vec2 v_textureCoordinates;\n \n float snow(vec2 uv,float scale)\n {\n float time = czm_frameNumber / 60.0;\n float w=smoothstep(1.,0.,-uv.y*(scale/10.));if(w<.1)return 0.;\n uv+=time/scale;uv.y+=time*2./scale;uv.x+=sin(uv.y+time*.5)/scale;\n uv*=scale;vec2 s=floor(uv),f=fract(uv),p;float k=3.,d;\n p=.5+.35*sin(11.*fract(sin((s+p+scale)*mat2(7,3,6,5))*5.))-f;d=length(p);k=min(d,k);\n k=smoothstep(0.,k,sin(f.x+f.y)*0.01);\n return k*w;\n }\n \n void main(void){\n vec2 resolution = czm_viewport.zw;\n vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\n vec3 finalColor=vec3(0);\n float c = 0.0;\n c+=snow(uv,30.)*.0;\n c+=snow(uv,20.)*.0;\n c+=snow(uv,15.)*.0;\n c+=snow(uv,10.);\n c+=snow(uv,8.);\n c+=snow(uv,6.);\n c+=snow(uv,5.);\n finalColor=(vec3(c)); \n gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(finalColor,1), 0.5); \n \n }\n "});this.viewer.scene.postProcessStages.add(e),this.snowStage=e}},_0x585a75.prototype.createSmokeSystem=function(e,t){var i=this.viewer.entities.add({position:WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z)});return new WebGLPlot.ParticleSystem({image:e,startColor:new WebGLPlot.Color(0,0,0,.6),endColor:new WebGLPlot.Color(0,0,0,0),startScale:this.style.startScale,endScale:this.style.endScale,minimumParticleLife:this.style.minimumParticleLife,maximumParticleLife:this.style.maximumParticleLife,minimumSpeed:this.style.minimumSpeed,maximumSpeed:this.style.maximumSpeed,imageSize:new WebGLPlot.Cartesian2(this.style.particleSize,this.style.particleSize),emissionRate:this.style.emissionRate,lifetime:16,emitter:new WebGLPlot.CircleEmitter(5),sizeInMeters:!0,performance:!1,modelMatrix:this.computeModelMatrix(i,WebGLPlot.JulianDate.now()),emitterModelMatrix:this.computeEmitterModelMatrix()})},_0x585a75.prototype.createFlameSystem=function(e,t){var i=this.viewer.entities.add({position:WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z)});return new WebGLPlot.ParticleSystem({image:e,startColor:new WebGLPlot.Color(1,1,1,1),endColor:new WebGLPlot.Color(.5,0,0,0),startScale:this.style.startScale,endScale:1.5,minimumParticleLife:this.style.minimumParticleLife,maximumParticleLife:this.style.maximumParticleLife,minimumSpeed:this.style.minimumSpeed,maximumSpeed:this.style.maximumSpeed,imageSize:new WebGLPlot.Cartesian2(2,2),emissionRate:this.style.emissionRate,lifetime:16,loop:!0,emitter:new WebGLPlot.ConeEmitter(.785398185),sizeInMeters:!0,modelMatrix:this.computeModelMatrix(i,WebGLPlot.JulianDate.now()),emitterModelMatrix:this.computeEmitterModelMatrix()})},_0x585a75.prototype.createBlastSystem=function(e,t){var i=this.viewer.entities.add({position:WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z)});return new WebGLPlot.ParticleSystem({image:e,startColor:WebGLPlot.Color.RED.withAlpha(.7),endColor:WebGLPlot.Color.YELLOW.withAlpha(.3),startScale:1,endScale:2,particleLife:1,speed:5,imageSize:new WebGLPlot.Cartesian2(2,2),emissionRate:50,lifetime:5,loop:!0,emitter:new WebGLPlot.BoxEmitter(new WebGLPlot.Cartesian3(1,1,1)),sizeInMeters:!0,modelMatrix:this.computeModelMatrix(i,WebGLPlot.JulianDate.now()),emitterModelMatrix:this.computeEmitterModelMatrix()})},_0x585a75.prototype.getDefaultStyle=function(e){return{fireImage:e,startScale:0,endScale:1.5,minimumParticleLife:1.5,maximumParticleLife:1.8,minimumSpeed:7,maximumSpeed:9,particleSize:2,emissionRate:200}},_0x585a75.prototype.computeModelMatrix=function(e,t){var i=WebGLPlot.Property.getValueOrUndefined(e.position,t,new WebGLPlot.Cartesian3);if(WebGLPlot.defined(i)){var n=WebGLPlot.Property.getValueOrUndefined(e.orientation,t,new WebGLPlot.Quaternion);if(WebGLPlot.defined(n))r=WebGLPlot.Matrix4.fromRotationTranslation(WebGLPlot.Matrix3.fromQuaternion(n,new WebGLPlot.Matrix3),i,new WebGLPlot.Matrix4);else var r=WebGLPlot.Transforms.eastNorthUpToFixedFrame(i,void 0,new WebGLPlot.Matrix4);return r}},_0x585a75.prototype.computeEmitterModelMatrix=function(){var e=WebGLPlot.HeadingPitchRoll.fromDegrees(0,0,0,new WebGLPlot.HeadingPitchRoll),t=new WebGLPlot.TranslationRotationScale;return t.translation=WebGLPlot.Cartesian3.fromElements(2.5,4,1,new WebGLPlot.Cartesian3),t.rotation=WebGLPlot.Quaternion.fromHeadingPitchRoll(e,new WebGLPlot.Quaternion),WebGLPlot.Matrix4.fromTranslationRotationScale(t,new WebGLPlot.Matrix4)};var _0x113fe5=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x55acb5=_0x113fe5(void 0,(function(){return _0x55acb5.toString().search("(((.+)+)+)+$").toString().constructor(_0x55acb5).search("(((.+)+)+)+$")}));_0x55acb5();var _0x3db8b5={u_globeMinimumAltitude:function(){return 55e3}};function _0x4544a9(e){var t=(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)).appearance,i=e.geometryInstances;if(!WebGLPlot.defined(t)&&WebGLPlot.defined(i))for(var n=Array.isArray(i)?i:[i],r=n.length,o=0;o<r;o++){var a=n[o].attributes;if(WebGLPlot.defined(a)&&WebGLPlot.defined(a.color)){t=new WebGLPlot.PerInstanceColorAppearance({flat:!0});break}}this.appearance=t,this.geometryInstances=e.geometryInstances,this.show=WebGLPlot.defaultValue(e.show,!0),this.classificationType=WebGLPlot.defaultValue(e.classificationType,WebGLPlot.ClassificationType.BOTH),this.debugShowBoundingVolume=WebGLPlot.defaultValue(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=WebGLPlot.defaultValue(e.debugShowShadowVolume,!1),this._boundingVolumes=[],this._boundingVolumes2D=[],this._ready=!1,this._readyPromise=WebGLPlot.when.defer(),this._primitive=void 0,this._maxHeight=void 0,this._minHeight=void 0,this._maxTerrainHeight=WebGLPlot.defaultValue(e.maxTerrainHeight,WebGLPlot.ApproximateTerrainHeights._defaultMaxTerrainHeight),this._minTerrainHeight=WebGLPlot.defaultValue(e.minTerrainHeight,WebGLPlot.ApproximateTerrainHeights._defaultMinTerrainHeight),this._boundingSpheresKeys=[],this._boundingSpheres=[],this._useFragmentCulling=!1,this._zIndex=void 0;this._classificationPrimitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:WebGLPlot.defaultValue(e.vertexCacheOptimize,!1),interleave:WebGLPlot.defaultValue(e.interleave,!1),releaseGeometryInstances:WebGLPlot.defaultValue(e.releaseGeometryInstances,!0),allowPicking:WebGLPlot.defaultValue(e.allowPicking,!0),asynchronous:WebGLPlot.defaultValue(e.asynchronous,!0),compressVertices:WebGLPlot.defaultValue(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_updateAndQueueCommandsFunction:void 0,_pickPrimitive:this,_extruded:!0,_uniformMap:_0x3db8b5,classificationType:this.classificationType}}function _0xcefc89(e){return function(t,i){return e._maxTerrainHeight}}function _0x272eed(e){return function(t,i){return e._minHeight}}Object.defineProperties(_0x4544a9.prototype,{vertexCacheOptimize:{get:function(){return this._classificationPrimitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._classificationPrimitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._classificationPrimitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._classificationPrimitiveOptions.allowPicking}},asynchronous:{get:function(){return this._classificationPrimitiveOptions.asynchronous}},compressVertices:{get:function(){return this._classificationPrimitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}}),_0x4544a9.isSupported=WebGLPlot.ClassificationPrimitive.isSupported;var _0x3c7c48=new WebGLPlot.Cartesian3,_0x2ece94=new WebGLPlot.Cartesian3,_0x5aa183=new WebGLPlot.Cartesian3,_0x4cdb88=new WebGLPlot.Cartographic,_0x24f4bd=new WebGLPlot.Rectangle;function _0xd49d31(e,t){var i=e.mapProjection.ellipsoid;if(!WebGLPlot.defined(t.attributes)||!WebGLPlot.defined(t.attributes.position3DHigh))return WebGLPlot.defined(t.rectangle)?t.rectangle:void 0;for(var n=t.attributes.position3DHigh.values,r=t.attributes.position3DLow.values,o=n.length,a=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,u=Number.NEGATIVE_INFINITY,c=0;c<o;c+=3){var h=WebGLPlot.Cartesian3.unpack(n,c,_0x3c7c48),d=WebGLPlot.Cartesian3.unpack(r,c,_0x2ece94),f=WebGLPlot.Cartesian3.add(h,d,_0x5aa183),p=i.cartesianToCartographic(f,_0x4cdb88),_=p.latitude,m=p.longitude;a=Math.min(a,_),s=Math.min(s,m),l=Math.max(l,_),u=Math.max(u,m)}var $=_0x24f4bd;return $.north=l,$.south=a,$.east=u,$.west=s,$}function _0x521b8f(e,t,i){var n=t.mapProjection.ellipsoid,r=_0xd49d31(t,i);if(e.geometryInstances){var o=Number.MIN_VALUE,a=Number.MAX_VALUE,s=!1;for(let t=0;t<e.geometryInstances.length>0;t++){var l=e.geometryInstances[t].geometry._groundBottomAltitude,u=e.geometryInstances[t].geometry._groundExtrudedHeight;if(WebGLPlot.defined(l)&&WebGLPlot.defined(u)){var c=l+u;o=Math.max(o,c),a=Math.min(a,l),s=!0}}e._maxHeight=s?o:e._maxHeight,e._minHeight=s?a:e._minHeight}var h=(Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances])[0].geometry._granularity,d=WebGLPlot.OrientedBoundingBox.fromRectangle(r,_0x272eed(e)(h,n),_0xcefc89(e)(h,n),n);if(e._boundingVolumes.push(d),!t.scene3DOnly){var f=t.mapProjection,p=WebGLPlot.BoundingSphere.fromRectangleWithHeights2D(r,f,e._maxHeight,e._minHeight);WebGLPlot.Cartesian3.fromElements(p.center.z,p.center.x,p.center.y,p.center),e._boundingVolumes2D.push(p)}}function _0x22b2ba(e,t){return Math.floor(e%t/3)}function _0x584fe5(e,t,i,n,r,o,a){var s=e._primitive;i.mode!==WebGLPlot.SceneMode.SCENE3D&&t.shaderProgram===s._spColor&&s._needs2DShader&&t.derivedCommands&&t.derivedCommands.appearance2D&&(t=t.derivedCommands.appearance2D),t.owner=e,t.modelMatrix=n,t.boundingVolume=o,t.cull=r,t.debugShowBoundingVolume=a,i.commandList.push(t)}function _0x199a5c(e,t,i,n,r,o){var a=e._primitive;i.mode!==WebGLPlot.SceneMode.SCENE3D&&t.shaderProgram===a._spPick&&a._needs2DShader&&(t=t.derivedCommands.pick2D),t.owner=e,t.modelMatrix=n,t.boundingVolume=o,t.cull=r,i.commandList.push(t)}function _0x5a34be(e,t,i,n,r,o,a,s){var l;l=t.mode===WebGLPlot.SceneMode.SCENE3D?e._boundingVolumes:e._boundingVolumes2D;var u,c,h=e.classificationType,d=h!==WebGLPlot.ClassificationType.CESIUM_3D_TILE&&h!==WebGLPlot.ClassificationType.S3M_TILE,f=h!==WebGLPlot.ClassificationType.TERRAIN&&h!==WebGLPlot.ClassificationType.S3M_TILE,p=h!==WebGLPlot.ClassificationType.TERRAIN&&h!==WebGLPlot.ClassificationType.CESIUM_3D_TILE,_=t.passes,m=e._primitive;if(_.render){var $=i.length;for(u=0;u<$;++u)c=l[_0x22b2ba(u,$)],d&&_0x584fe5(e,i[u],t,r,o,c,a),f&&_0x584fe5(e,i[u].derivedCommands.tileset,t,r,o,c,a),p&&_0x584fe5(e,i[u].derivedCommands.s3mtiles,t,r,o,c,a);if(t.invertClassification){var g=m._commandsIgnoreShow,y=g.length;for(u=0;u<y;++u)c=l[Math.floor(u/2)],_0x584fe5(e,g[u],t,r,o,c,a)}}if(_.pick){var v,x=n.length;for(e._useFragmentCulling||(v=m._primitive._pickOffsets),u=0;u<x;++u){if(c=l[_0x22b2ba(u,x)],!e._useFragmentCulling)c=l[v[_0x22b2ba(u,x)].index];d&&_0x199a5c(e,n[u],t,r,o,c),f&&_0x199a5c(e,n[u].derivedCommands.tileset,t,r,o,c),p&&_0x584fe5(e,n[u].derivedCommands.s3mtiles,t,r,o,c,a)}}}_0x4544a9.initializeTerrainHeights=function(){return WebGLPlot.ApproximateTerrainHeights.initialize()},_0x4544a9.prototype.update=function(e){if(WebGLPlot.defined(this._primitive)||WebGLPlot.defined(this.geometryInstances)){if(!WebGLPlot.ApproximateTerrainHeights.initialized){if(!this.asynchronous)throw new WebGLPlot.DeveloperError("For synchronous GroundPrimitives, you must call PlotGroundPrimitive.initializeTerrainHeights() and wait for the returned promise to resolve.");return void _0x4544a9.initializeTerrainHeights()}var t=this,i=this._classificationPrimitiveOptions;if(!WebGLPlot.defined(this._primitive)){var n,r,o,a,s,l=e.mapProjection.ellipsoid,u=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],c=u.length,h=new Array(c);for(a=0;a<c;++a){var d=_0xd49d31(e,r=(n=u[a]).geometry);WebGLPlot.defined(s)?WebGLPlot.defined(d)&&WebGLPlot.Rectangle.union(s,d,s):s=WebGLPlot.Rectangle.clone(d);var f=n.id;if(WebGLPlot.defined(f)&&WebGLPlot.defined(d)){var p=WebGLPlot.ApproximateTerrainHeights.getBoundingSphere(d,l);this._boundingSpheresKeys.push(f),this._boundingSpheres.push(p)}if(o=r.constructor,!WebGLPlot.defined(o)||!WebGLPlot.defined(o.createShadowVolume))throw new WebGLPlot.DeveloperError("Not all of the geometry instances have PlotGroundPrimitive support.")}var _=e.terrainExaggeration;this._minHeight=this._minTerrainHeight*_,this._maxHeight=this._maxTerrainHeight*_;var m=_0x4544a9._supportsMaterials(e.context);if(this._useFragmentCulling=m,m){var $,g=!0;for(a=0;a<c;++a)if(s=_0xd49d31(e,r=(n=u[a]).geometry),WebGLPlot.ShadowVolumeAppearance.shouldUseSphericalCoordinates(s)){g=!1;break}for(a=0;a<c;++a){o=(r=(n=u[a]).geometry).constructor;var y=_0xd49d31(e,r),v=r.textureCoordinateRotationPoints,x=e.context.floatTextureSixPlaces;$=g?WebGLPlot.ShadowVolumeAppearance.getPlanarTextureCoordinateAttributes(y,v,l,e.mapProjection,x,this._maxHeight):WebGLPlot.ShadowVolumeAppearance.getSphericalExtentGeometryInstanceAttributes(y,v,l,e.mapProjection,x);var b=n.attributes;for(var S in b)b.hasOwnProperty(S)&&($[S]=b[S]);n.created?h[a]=new WebGLPlot.GeometryInstance({geometry:n._groundGeometry,attributes:$,id:n.id}):(h[a]=new WebGLPlot.GeometryInstance({geometry:o.createShadowVolume(r,_0x272eed(this),_0xcefc89(this)),attributes:$,id:n.id}),n._groundGeometry=h[a].geometry,n.created=!0)}}else for(a=0;a<c;++a)o=(r=(n=u[a]).geometry).constructor,n.created?h[a]=new WebGLPlot.GeometryInstance({geometry:r,attributes:n.attributes,id:n.id}):(h[a]=new WebGLPlot.GeometryInstance({geometry:o.createShadowVolume(r,_0x272eed(this),_0xcefc89(this)),attributes:n.attributes,id:n.id}),n._groundGeometry=h[a].geometry,n.created=!0);i.geometryInstances=h,i.appearance=this.appearance,i._createBoundingVolumeFunction=function(e,i){_0x521b8f(t,e,i)},i._updateAndQueueCommandsFunction=function(e,i,n,r,o,a,s,l){_0x5a34be(t,i,n,r,o,a,s)},this._primitive=new WebGLPlot.ClassificationPrimitive(i),this._primitive.readyPromise.then((function(e){t._ready=!0,t.releaseGeometryInstances&&(t.geometryInstances=void 0);var i=e._error;WebGLPlot.defined(i)?t._readyPromise.reject(i):t._readyPromise.resolve(t)}))}this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowShadowVolume=this.debugShowShadowVolume,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e)}},_0x4544a9.prototype.getBoundingSphere=function(e){var t=this._boundingSpheresKeys.indexOf(e);if(-1!==t)return this._boundingSpheres[t]},_0x4544a9.prototype.getGeometryInstanceAttributes=function(e){if(!WebGLPlot.defined(this._primitive))throw new WebGLPlot.DeveloperError("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},_0x4544a9.prototype.isDestroyed=function(){return!1},_0x4544a9.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),WebGLPlot.destroyObject(this)},_0x4544a9._supportsMaterials=function(e){return e.depthTexture},_0x4544a9.supportsMaterials=function(e){return WebGLPlot.Check.typeOf.object("scene",e),_0x4544a9._supportsMaterials(e.frameState.context)};var _0x287008=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x19ef54=_0x287008(void 0,(function(){return _0x19ef54.toString().search("(((.+)+)+)+$").toString().constructor(_0x19ef54).search("(((.+)+)+)+$")}));function _0x2643a2(e){if(!e||!e.scene)throw new WebGLPlot.defined("GroundEffect scene is required.");this._scene=e.scene,this._show=WebGLPlot.defaultValue(e.show,!0),this._positions=WebGLPlot.defaultValue(e.positions,!0),this._color=WebGLPlot.defaultValue(e.color,WebGLPlot.Color.BLACK.withAlpha(.8)),this._maxTerrainHeight=WebGLPlot.defaultValue(e.maxTerrainHeight,void 0),this._minTerrainHeight=WebGLPlot.defaultValue(e.minTerrainHeight,void 0),this._id=WebGLPlot.defaultValue(e.id,WebGLPlot.createGuid()),this.initialize()}_0x19ef54(),_0x2643a2.prototype.initialize=function(){if(Array.isArray(this._positions)&&!(this._positions.length<3)){this._primitive&&this.destroy();var e=WebGLPlot.Cartesian3.fromDegreesArray(this._positions),t=new WebGLPlot.PolygonHierarchy(e),i=new WebGLPlot.PolygonGeometry({polygonHierarchy:t}),n={show:new WebGLPlot.ShowGeometryInstanceAttribute(this._show),distanceDisplayCondition:new WebGLPlot.DistanceDisplayConditionGeometryInstanceAttribute,color:WebGLPlot.ColorGeometryInstanceAttribute.fromColor(this._color)},r=new WebGLPlot.GeometryInstance({geometry:i,attributes:n,id:this._id}),o=new _0x4544a9({show:this._show,asynchronous:!0,geometryInstances:r,classificationType:3,appearance:new WebGLPlot.PerInstanceColorAppearance,maxTerrainHeight:this._maxTerrainHeight,minTerrainHeight:this._minTerrainHeight});this._primitive=this._scene.primitives.add(o)}},_0x2643a2.prototype.destroy=function(){this._scene&&this._primitive&&(this._scene.primitives.removeAndDestroy(this._primitive),this._primitive=void 0)},_0x2643a2.prototype._update=function(){this.destroy(),this.initialize()},Object.defineProperties(_0x2643a2.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,this._primitive&&(this._primitive.show=e))}},positions:{get:function(){return this._positions},set:function(e){Array.isArray(e)&&e.length>=3&&(this._positions=e,this._update())}},color:{get:function(){return this._color},set:function(e){WebGLPlot.Color.equals(e,this._color)||(this._color=e,this._update())}},maxTerrainHeight:{get:function(){return this._maxTerrainHeight},set:function(e){this._maxTerrainHeight!==e&&(this._maxTerrainHeight=e,this._update())}},minTerrainHeight:{get:function(){return this._minTerrainHeight},set:function(e){this._minTerrainHeight!==e&&(this._minTerrainHeight=e,this._update())}}});const _0x2c67ec=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x45dee7=_0x2c67ec(void 0,(function(){return _0x45dee7.toString().search("(((.+)+)+)+$").toString().constructor(_0x45dee7).search("(((.+)+)+)+$")}));_0x45dee7();var WebGLPlot$9=window.WebGLPlot=window.WebGLPlot||{};class _0xa7e371 extends _0x2c86f0{constructor(e){if(!WebGLPlot$9.defined(e.scene))throw new WebGLPlot$9.DeveloperError("OverLayerPicture options.scene is required.");super(e=WebGLPlot$9.defaultValue(e,WebGLPlot$9.defaultValue.EMPTY_OBJECT)),this._scene=WebGLPlot$9.defaultValue(e.scene,null),this._speedV=WebGLPlot$9.defaultValue(e.speedV,5),this._lineWidth=WebGLPlot$9.defaultValue(e.lineWidth,1),this._dashLength=WebGLPlot$9.defaultValue(e.dashLength,30),this._dashPattern=WebGLPlot$9.defaultValue(e.dashPattern,255),this._signalColor=WebGLPlot$9.defaultValue(e.signalColor,new WebGLPlot$9.Color(1,0,0,1)),this._gapColor=WebGLPlot$9.defaultValue(e.gapColor,new WebGLPlot$9.Color(0,0,0,0)),this._polylineCollection=void 0,this._linkPrimitive=void 0,this._id=WebGLPlot$9.createGuid(),this._startAssociatedUuid=null,this._endAssociatedUuid=null,this._localPoints=[]}setStartFeature(e){null!==this._startAssociatedUuid&&(this.removeEffectFromDotSymbol(this._startAssociatedUuid),this._startAssociatedUuid=null);var t=this._getFeatureByUuid(e);null==t||!(t instanceof _0x36b026)||null!==this._endAssociatedUuid&&e===this._endAssociatedUuid||(this._startAssociatedUuid=e,this.setEffectToDotSymbol(this._startAssociatedUuid),null!==this._endAssociatedUuid&&this.setFeatures(this._startAssociatedUuid,this._endAssociatedUuid))}setEndFeature(e){null!==this._endAssociatedUuid&&(this.removeEffectFromDotSymbol(this._endAssociatedUuid),this._endAssociatedUuid="");var t=this._getFeatureByUuid(e);null===t||!(t instanceof _0x36b026)||null!==this._startAssociatedUuid&&e===this._startAssociatedUuid||(this._endAssociatedUuid=e,this.setEffectToDotSymbol(this._endAssociatedUuid),null!==this._startAssociatedUuid&&this.setFeatures(this._startAssociatedUuid,this._endAssociatedUuid))}setFeatures(e,t){var i=this._getFeatureByUuid(e),n=this._getFeatureByUuid(t);null===i||null===n||!(i instanceof _0x36b026)||!(n instanceof _0x36b026)||(this._startAssociatedUuid=e,this._endAssociatedUuid=t,this.setEffectToDotSymbol(this._startAssociatedUuid),this.setEffectToDotSymbol(this._endAssociatedUuid),this._addEffectToScene())}setEffectToDotSymbol(e){var t=this._getFeatureByUuid(e);if(null!=t&&t instanceof _0x36b026){var i=!1;t.getGeoEffectByID(this._id)&&(i=!0),i||t.addGeoEffect(this)}}updateEffect(){this._pntStart=void 0;let e=this._getFeatureByUuid(this._startAssociatedUuid);this._pntStart=e.localPoints[0],this._pntEnd=void 0;let t=this._getFeatureByUuid(this._endAssociatedUuid);if(this._pntEnd=t.localPoints[0],!WebGLPlot$9.defined(this._pntStart)||!WebGLPlot$9.defined(this._pntEnd))return!1;let i=_0x1569f6.degreesToCartesian3(this._pntStart),n=_0x1569f6.degreesToCartesian3(this._pntEnd),r=_0x1569f6.calCurveLinkPoints(i,n);this._linkPrimitive.points=r}removeEffectFromDotSymbol(e){if(e&&"[object String]"===Object.prototype.toString.call(e)){var t=this._getFeatureByUuid(e);null!==t&&t instanceof _0x36b026&&(t.removeGeoEffectByID(this._id),this._removeEffectFromScene())}}_getFeatureByUuid(e){if(!WebGLPlot$9.defined(this._scene))return null;var t=null,i=this._scene.plotLayers;for(let n=0;n<i._layerQueue.length;n++)if(null!==(t=i._layerQueue[n].getFeatureByUuid(e)))return t;return null}_addEffectToScene(){WebGLPlot$9.defined(this._linkPrimitive)&&this._removeEffectFromScene(),this._pntStart=void 0;let e=this._getFeatureByUuid(this._startAssociatedUuid);this._pntStart=e.localPoints[0],this._pntEnd=void 0;let t=this._getFeatureByUuid(this._endAssociatedUuid);if(this._pntEnd=t.localPoints[0],this._localPoints.push(this._pntStart),this._localPoints.push(this._pntEnd),!WebGLPlot$9.defined(this._pntStart)||!WebGLPlot$9.defined(this._pntEnd))return!1;let i=new Cesium.Material({fabric:{type:"MyDashLineMaterial",uniforms:{color:this._signalColor,gapColor:this._gapColor,dashLength:this._dashLength,dashPattern:this._dashPattern,speedV:-this._speedV},source:"uniform vec4 gapColor;\n uniform float dashLength;\n uniform float dashPattern;\n uniform float xy;\n varying float v_polylineAngle;\n \n const float maskLength = 16.0;\n \n mat2 rotate(float rad) {\n float c = cos(rad);\n float s = sin(rad);\n return mat2(\n c, s,\n -s, c\n );\n }\n \n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n \n vec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;\n \n // Get the relative position within the dash from 0 to 1\n float dashPosition = fract(pos.x/ (dashLength * czm_pixelRatio) + czm_frameNumber * 0.01 * speedV);\n // Figure out the mask index.\n float maskIndex = floor(dashPosition * maskLength);\n // Test the bit mask.\n float maskTest = floor((dashPattern) / pow(2.0, maskIndex));\n vec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;\n if (fragColor.a < 0.005) { // matches 0/255 and 1/255\n discard;\n }\n \n fragColor = czm_gammaCorrect(fragColor);\n material.emission = fragColor.rgb;\n material.alpha = fragColor.a;\n return material;\n }"},translucent:!0}),n=_0x1569f6.degreesToCartesian3(this._pntStart),r=_0x1569f6.degreesToCartesian3(this._pntEnd),o=_0x1569f6.calCurveLinkPoints(n,r);this._polylineCollection=new WebGLPlot$9.PolylineCollection,this._linkPrimitive=this._polylineCollection.add({positions:o,width:this._lineWidth,material:i});let a=!1;return WebGLPlot$9.defined(this._linkPrimitive)&&(this._scene.primitives.add(this._polylineCollection),a=!0),a}destroy(){this._removeEffectFromScene()}_removeEffectFromScene(){WebGLPlot$9.defined(this._polylineCollection)&&this._scene.primitives.contains(this._polylineCollection)&&(this._scene.primitives.remove(this._polylineCollection),this._polylineCollection=void 0,this._linkPrimitive=void 0)}toJSON(){let e={};return e.hasOwnProperty("uuid")||(e.uuid=this._id),e.hasOwnProperty("startAssociation")||(e.startAssociation=this._startAssociatedUuid),e.hasOwnProperty("endAssociation")||(e.endAssociation=this._endAssociatedUuid),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("lineColor")||(e.lineColor=this._signalColor.toCssColorString()),e.hasOwnProperty("visible")||(e.visible=!0),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$9.defined(e))return;let t=JSON.parse(e);WebGLPlot$9.defined(t.uuid)&&(this._id=t.uuid),WebGLPlot$9.defined(t.startAssociation)&&(this._startAssociatedUuid=t.startAssociation),WebGLPlot$9.defined(t.endAssociation)&&(this._endAssociatedUuid=t.endAssociation),WebGLPlot$9.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$9.defined(t.lineColor)&&(this._lineColor=WebGLPlot$9.Color.fromCssColorString(t.lineColor))}}Object.defineProperties(_0xa7e371.prototype,{id:{get:function(){return this._id},set:function(e){e!==this._id&&(this._id=e)}}});const _0x365b1c=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0xaa3dd6=_0x365b1c(void 0,(function(){return _0xaa3dd6.toString().search("(((.+)+)+)+$").toString().constructor(_0xaa3dd6).search("(((.+)+)+)+$")}));function _0x35ec84(e){if(!e)throw new WebGLPlot.DeveloperError("CameraMoveHandler is required to initialize viewer");this._cameraMoveRate=100;let t=e.scene.globe.ellipsoid;_0x35ec84.flags={looking:!1,moveForward:!1,moveBackward:!1,moveUp:!1,moveDown:!1,moveLeft:!1,moveRight:!1};let i=this;e.clock.onTick.addEventListener((function(n){const r=e.camera,o=t.cartesianToCartographic(r.position).height/i._cameraMoveRate;_0x35ec84.flags.moveForward&&r.moveForward(o),_0x35ec84.flags.moveBackward&&r.moveBackward(o),_0x35ec84.flags.moveUp&&r.moveUp(o),_0x35ec84.flags.moveDown&&r.moveDown(o),_0x35ec84.flags.moveLeft&&r.moveLeft(o),_0x35ec84.flags.moveRight&&r.moveRight(o)}))}function _0x39a47d(e){switch(e){case"Z".charCodeAt(0):return"moveForward";case"X".charCodeAt(0):return"moveBackward";case"W".charCodeAt(0):return"moveUp";case"S".charCodeAt(0):return"moveDown";case"D".charCodeAt(0):return"moveRight";case"A".charCodeAt(0):case 37:return"moveLeft";case 38:return"moveUp";case 39:return"moveRight";case 40:return"moveDown";default:return}}_0xaa3dd6(),_0x35ec84.prototype.activate=function(){document.addEventListener("keydown",this.keydown,!1),document.addEventListener("keyup",this.keyup,!1)},_0x35ec84.prototype.deActivate=function(){document.removeEventListener("keydown",this.keydown),document.removeEventListener("keyup",this.keyup)},_0x35ec84.prototype.keydown=function(e){const t=_0x39a47d(e.keyCode);typeof t<"u"&&(_0x35ec84.flags[t]=!0)},_0x35ec84.prototype.keyup=function(e){const t=_0x39a47d(e.keyCode);typeof t<"u"&&(_0x35ec84.flags[t]=!1)},Object.defineProperties(_0x35ec84.prototype,{cameraMoveRate:{get:function(){return this._cameraMoveRate},set:function(e){if(e===this._cameraMoveRate||"number"!=typeof e)return!1;this._cameraMoveRate=e}}});var _0x57fa77=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1ab93a=_0x57fa77(void 0,(function(){return _0x1ab93a.toString().search("(((.+)+)+)+$").toString().constructor(_0x1ab93a).search("(((.+)+)+)+$")}));function _0x78acd5(e){e=e||{},this.method=e.method?e.method:"POST",this.sitData=e.sitData?e.sitData:null,this.smlFileName=e.smlFileName?e.smlFileName:"",this.isCover=!!e.isCover&&e.isCover,this.CLASS_NAME="SuperMap.EditSmlFileParameters"}_0x1ab93a(),_0x78acd5.prototype.destroy=function(){var e=this;e.method="POST",e.sitData=null,e.isCover=!1,e.smlFileName=""},_0x78acd5.toJsonParameters=function(e){if(e)return WebGLPlot.toJSON(e.sitData)};var _0x2255ea=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x417caa=_0x2255ea(void 0,(function(){return _0x417caa.toString().search("(((.+)+)+)+$").toString().constructor(_0x417caa).search("(((.+)+)+)+$")}));_0x417caa();class _0x34bda9 extends _0x407715{constructor(e,t){super(e,t),(t=t||{})&&this.extend(this,t);var i=this;i.events=new _0x47e9d7(i,null,i.EVENT_TYPES,!0),i.eventListeners instanceof Object&&i.events.on(i.eventListeners),this.CLASS_NAME="SuperMap.EditSmlFileService"}destroy(){super.destroy()}processAsync(e){if(e){var t=this,i=e.method,n=t.url.substr(t.url.length-1,1);t.url+="/"==n?"smlInfos/":"/smlInfos/",t.url+=e.smlFileName+".json",t.url+="?isCover="+e.isCover;var r=null;e.method&&"POST"===e.method&&(r=_0x78acd5.toJsonParameters(e)),t.request({method:i,data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}extend(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&void 0!==t.toString&&(e.toString=t.toString)}return e}}const _0x1185ef=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x372ea2=_0x1185ef(void 0,(function(){return _0x372ea2.toString().search("(((.+)+)+)+$").toString().constructor(_0x372ea2).search("(((.+)+)+)+$")}));function _0x590b69(e){e=e||{},this.libID=e.libID,this.code=e.code,this.inputPoints=e.inputPoints?e.inputPoints:null,this.symbolRank=e.symbolRank?e.symbolRank:0,this.negativeImage=!!e.negativeImage&&e.negativeImage,this.surroundLineType=e.surroundLineType?e.surroundLineType:0,this.subSymbols=e.subSymbols?e.subSymbols:null,this.scaleValues=e.scaleValues?e.scaleValues:null,this.scalePoints=e.scalePoints?e.scalePoints:null,this.newScalePoint=e.newScalePoint?e.newScalePoint:null,this.newScalePointIndex=e.newScalePointIndex?e.newScalePointIndex:0,this.CLASS_NAME="SuperMap.GetSymbolInfoParameters"}_0x372ea2(),_0x590b69.prototype.destroy=function(){var e=this;e.libID=null,e.code=null,e.inputPoints=null,e.symbolRank=null,e.negativeImage=null,e.surroundLineType=null,e.subSymbols=null,e.scaleValues=null,e.scalePoints=null,e.newScalePoint=null,e.newScalePointIndex=null},_0x590b69.toUrlParameters=function(e){if(e&&null!==e.libID&&null!==e.code){var t="libID="+encodeURIComponent(e.libID)+"&code="+encodeURIComponent(e.code);if(e.inputPoints&&null!==e.inputPoints&&0!==e.inputPoints.length){let i="[";for(let t=0;t<e.inputPoints.length;t++)t===e.inputPoints.length-1?i+='{"x":'+e.inputPoints[t].x+', "y":'+e.inputPoints[t].y+"}]":i+='{"x":'+e.inputPoints[t].x+', "y":'+e.inputPoints[t].y+"},";t+="&inputPoints="+encodeURIComponent(i)}if(e.scalePoints&&null!==e.scalePoints&&0!==e.scalePoints.length){let i="[";for(let t=0;t<e.scalePoints.length;t++)t===e.scalePoints.length-1?i+='{"x":'+e.scalePoints[t].x+', "y":'+e.scalePoints[t].y+"}]":i+='{"x":'+e.scalePoints[t].x+', "y":'+e.scalePoints[t].y+"},";t+="&scalePoints="+encodeURIComponent(i)}if(e.scaleValues&&null!==e.scaleValues&&0!==e.scaleValues.length){let i="[";for(let t=0;t<e.scaleValues.length;t++)t===e.scaleValues.length-1?i+=e.scaleValues[t]+"]":i+=e.scaleValues[t]+",";t+="&scaleValues="+encodeURIComponent(i)}if(e.subSymbols&&null!==e.subSymbols&&0!==e.subSymbols.length){let i="[";for(let t=0;t<e.subSymbols.length;t++)t===e.subSymbols.length-1?i+=e.subSymbols[t].code+"]":i+=e.subSymbols[t].code+",";t+="&subSymbols="+encodeURIComponent(i)}return e.newScalePoint&&null!==e.newScalePoint&&(t+="&newScalePoint="+encodeURIComponent('{"x":'+e.newScalePoint.x+', "y":'+e.newScalePoint.y+"}")),e.newScalePointIndex&&null!==e.newScalePointIndex&&(t+="&newScalePointIndex="+encodeURIComponent(e.newScalePointIndex)),e.symbolRank&&null!==e.symbolRank&&(t+="&symbolRank="+encodeURIComponent(e.symbolRank)),e.negativeImage&&null!==e.negativeImage&&(t+="&negativeImage="+encodeURIComponent(e.negativeImage)),e.surroundLineType&&null!==e.surroundLineType&&(t+="&surroundLineType="+encodeURIComponent(e.surroundLineType)),t}};var _0x23f1ae=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x416c0e=_0x23f1ae(void 0,(function(){return _0x416c0e.toString().search("(((.+)+)+)+$").toString().constructor(_0x416c0e).search("(((.+)+)+)+$")}));_0x416c0e();class _0x486022 extends _0x407715{constructor(e,t){super(e,t),(t=t||{})&&this.extend(this,t);var i,n=this;n.events=new _0x47e9d7(n,null,n.EVENT_TYPES,!0),n.eventListeners instanceof Object&&n.events.on(n.eventListeners),i=n.url.substr(n.url.length-1,1),n.url+="/"==i?"smlInfos":"/smlInfos",n.url+=".json",this.CLASS_NAME="SuperMap.GetSMLInfosService"}destroy(){super.destroy()}processAsync(e){if(e){var t=this;t.url+=_0x590b69.toUrlParameters(e),t.request({method:"GET",data:null,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}extend(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&void 0!==t.toString&&(e.toString=t.toString)}return e}}var _0x544b93=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x349e75=_0x544b93(void 0,(function(){return _0x349e75.toString().search("(((.+)+)+)+$").toString().constructor(_0x349e75).search("(((.+)+)+)+$")}));function _0x4f0c08(e,t){this.url=e,this.options=t}_0x349e75(),_0x4f0c08.prototype.getSMLInfos=function(e,t,i){var n=this;return i||(i=n),new _0x486022(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,serverType:n.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e),n},_0x4f0c08.prototype.editSMLFile=function(e,t,i){var n=this;return i||(i=n),new _0x34bda9(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,serverType:n.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e),n};var _0x594ad3=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x9d66f5=_0x594ad3(void 0,(function(){return _0x9d66f5.toString().search("(((.+)+)+)+$").toString().constructor(_0x9d66f5).search("(((.+)+)+)+$")}));_0x9d66f5();class _0x323f7a extends _0x407715{constructor(e,t){super(e,t=t||{});var i,n=this;i=n.url.substr(n.url.length-1,1),n.url+="/"==i?"graphicObject.json?":"/graphicObject.json?",this.CLASS_NAME="SuperMap.GetSymbolInfoService"}destroy(){super.destroy()}processAsync(e){if(e){var t,i=this;t=_0x55b53a.toUrlParameters(e),i.url+=t,e.dynamicToken&&(i.url+="&dynamicToken="+e.dynamicToken),navigator.userAgent.toUpperCase().includes("MSIE")&&(i.url=encodeURI(i.url)),i.request({method:"GET",params:null,scope:i,success:i.myServiceProcessCompleted,failure:i.serviceProcessFailed})}}myServiceProcessCompleted(e){null!=(e=this.transformResult(e))&&null!=e.textStyle2D&&null!=e.textStyle2D.fontHeight&&(e.textStyle2D.fontHeight=3),this.events.triggerEvent("processCompleted",{result:e})}transformResult(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e}}var _0x3e948f=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x22c7ee=_0x3e948f(void 0,(function(){return _0x22c7ee.toString().search("(((.+)+)+)+$").toString().constructor(_0x22c7ee).search("(((.+)+)+)+$")}));_0x22c7ee();var WebGLPlot$8=window.WebGLPlot=window.WebGLPlot||{};function _0x191499(){}var createAlgo=function(e){return void 0!==SuperMapAlgoPlot?SuperMapAlgoPlot.AlgoSymbolFactory.getAlgoSymbol({libID:e.libID,code:e.code}):void 0},getDefaultStyle=function(e){return void 0!==SuperMapAlgoPlot?_0xac664c.defaultStyle:void 0},getSpatialData=function(e,t){return void 0!==SuperMapAlgoPlot?SuperMapAlgoPlot.Primitives.getSpatialData(e,t):void 0},getServerData=function(e,t,i,n,r,o,a){if(void 0===i&&(i=_0xac664c.serverUrl),0===e)return e;var s=getLibManager(n);let l=s.getSymbolData(e,t);if(l&&!WebGLPlot$8.defined(r))return l;let u=i.substr(i.length-1,1);i+="/"===u?"graphicObject.json?":"/graphicObject.json?",i+="libID="+e+"&code="+t+"&surroundLineType=1",WebGLPlot$8.defined(r)&&(i+="&symbolRank="+r);let c=_0x14e586();if(!WebGLPlot$8.defined(o)||!o)return c.open("GET",encodeURI(i),!1,"",""),c.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),c.send(),l=JSON.parse(c.responseText),-1!==l.libID&&-1!==l.code?(s.setSymbolData(e,l),l):null;c.open("GET",encodeURI(i),o,"",""),c.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),c.onreadystatechange=function(){if(""!==c.responseText){try{l=JSON.parse(c.responseText)}catch(e){console.log(c.responseText,e)}if(-1!==l.libID&&-1!==l.code)return s.setSymbolData(e,l),a&&a(l),l}return null},c.send()},getServerData2=function(e,t,i,n){if(void 0===i&&(i=_0xac664c.serverUrl),void 0===SuperMap||0===e||WebGLPlot$8.getLibManager(n).getSymbolLibByLibId(this.libID))return 0===e?e:null;var r=new _0x55b53a;return r.libID=e,r.code=t,r.surroundLineType=1,{getSymbolInfoParameters:r,getSymbolInfo:new _0x323f7a(i,WebGLPlot$8.getLibManager(n).options.serviceParams)}},toJSON=function(e){return void 0!==SuperMapAlgoPlot?SuperMapAlgoPlot.PlottingUtil.toJSON(e):""},clonePoints=function(e){return void 0!==SuperMapAlgoPlot?SuperMapAlgoPlot.PlottingUtil.clonePoints(e):[]},EditSmlFile=function(e,t){return void 0!==SuperMap?{editSmlFile:new _0x34bda9(e,t),editSmlFileParams:new _0x78acd5}:void 0},smlFileService=function(e,t){return{smlFileService:new _0x4f0c08(e,t),editSmlFileParams:new _0x78acd5}},isAccessServer=function(e,t){return void 0!==SuperMapAlgoPlot&&SuperMapAlgoPlot.AlgoSymbolFactory.isAccessServer(e,t)},polylineDistance=function(e){return void 0!==SuperMapAlgoPlot?SuperMapAlgoPlot.PlottingUtil.polylineDistance(e):0},analysisSymbolCells=function(e){if(void 0!==SuperMapAlgoPlot)return SuperMapAlgoPlot.AnalysisSymbol.analysisSymbolCells(e)},rotateAngle=function(e,t,i){void 0!==SuperMapAlgoPlot&&SuperMapAlgoPlot.PlottingUtil.rotateAngle(e,t,i)},plotI18n=function(e){if(void 0!==SuperMapAlgoPlot)return SuperMapAlgoPlot.plotI18n(e)},getLibManager=function(e){let t=WebGLPlot$8.Plotting.g_Plotting.get(e);if(t)return t.getSymbolLibManager()};function _0x14e586(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{e=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}WebGLPlot$8.createAlgo=createAlgo,WebGLPlot$8.getDefaultStyle=getDefaultStyle,WebGLPlot$8.getSpatialData=getSpatialData,WebGLPlot$8.getServerData=getServerData,WebGLPlot$8.getServerData2=getServerData2,WebGLPlot$8.toJSON=toJSON,WebGLPlot$8.EditSmlFile=EditSmlFile,WebGLPlot$8.clonePoints=clonePoints,WebGLPlot$8.isAccessServer=isAccessServer,WebGLPlot$8.polylineDistance=polylineDistance,WebGLPlot$8.analysisSymbolCells=analysisSymbolCells,WebGLPlot$8.rotateAngle=rotateAngle,WebGLPlot$8.plotI18n=plotI18n,WebGLPlot$8.getLibManager=getLibManager,WebGLPlot$8.smlFileService=smlFileService,function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=function(){var e=i(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var t=!0;return function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}}(),r=function(){var e=n(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var t=!0;return function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}}(),o=r(this,(function(){return o.toString().search("(((.+)+)+)+$").toString().constructor(o).search("(((.+)+)+)+$")}));(o(),"object"==typeof exports&&typeof module<"u")?module.exports=e():"function"==typeof define&&define.amd?define([],e):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).html2canvas=e()}((function(){return function e(t,i,n){function r(a,s){if(!i[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=i[a]={exports:{}};t[a][0].call(c.exports,(function(e){return r(t[a][1][e]||e)}),c,c.exports,e,t,i,n)}return i[a].exports}for(var o="function"==typeof require&&require,a=0;a<n.length;a++)r(n[a]);return r}({1:[function(e,t,i){(function(e){!function(n){var r="object"==typeof i&&i&&!i.nodeType&&i,o="object"==typeof t&&t&&!t.nodeType&&t,a="object"==typeof e&&e;(a.global===a||a.window===a||a.self===a)&&(n=a);var s,l,u=2147483647,c=36,h=/^xn--/,d=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_=Math.floor,m=String.fromCharCode;function $(e){throw new RangeError(p[e])}function g(e,t){for(var i=e.length,n=[];i--;)n[i]=t(e[i]);return n}function y(e,t){var i=e.split("@"),n="";return i.length>1&&(n=i[0]+"@",e=i[1]),n+g((e=e.replace(f,".")).split("."),t).join(".")}function v(e){for(var t,i,n=[],r=0,o=e.length;r<o;)(t=e.charCodeAt(r++))>=55296&&t<=56319&&r<o?56320==(64512&(i=e.charCodeAt(r++)))?n.push(((1023&t)<<10)+(1023&i)+65536):(n.push(t),r--):n.push(t);return n}function x(e){return g(e,(function(e){var t="";return e>65535&&(t+=m((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=m(e)})).join("")}function b(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function S(e,t,i){var n=0;for(e=i?_(e/700):e>>1,e+=_(e/t);e>455;n+=c)e=_(e/35);return _(n+36*e/(e+38))}function w(e){var t,i,n,r,o,a,s,l,h,d,f,p=[],m=e.length,g=0,y=128,v=72;for((i=e.lastIndexOf("-"))<0&&(i=0),n=0;n<i;++n)e.charCodeAt(n)>=128&&$("not-basic"),p.push(e.charCodeAt(n));for(r=i>0?i+1:0;r<m;){for(o=g,a=1,s=c;r>=m&&$("invalid-input"),((l=(f=e.charCodeAt(r++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:c)>=c||l>_((u-g)/a))&&$("overflow"),g+=l*a,!(l<(h=s<=v?1:s>=v+26?26:s-v));s+=c)a>_(u/(d=c-h))&&$("overflow"),a*=d;v=S(g-o,t=p.length+1,0==o),_(g/t)>u-y&&$("overflow"),y+=_(g/t),g%=t,p.splice(g++,0,y)}return x(p)}function C(e){var t,i,n,r,o,a,s,l,h,d,f,p,g,y,x,w=[];for(p=(e=v(e)).length,t=128,i=0,o=72,a=0;a<p;++a)(f=e[a])<128&&w.push(m(f));for(n=r=w.length,r&&w.push("-");n<p;){for(s=u,a=0;a<p;++a)(f=e[a])>=t&&f<s&&(s=f);for(s-t>_((u-i)/(g=n+1))&&$("overflow"),i+=(s-t)*g,t=s,a=0;a<p;++a)if((f=e[a])<t&&++i>u&&$("overflow"),f==t){for(l=i,h=c;!(l<(d=h<=o?1:h>=o+26?26:h-o));h+=c)x=l-d,y=c-d,w.push(m(b(d+x%y,0))),l=_(x/y);w.push(m(b(l,0))),o=S(i,g,n==r),i=0,++n}++i,++t}return w.join("")}if(s={version:"1.4.1",ucs2:{decode:v,encode:x},decode:w,encode:C,toASCII:function(e){return y(e,(function(e){return d.test(e)?"xn--"+C(e):e}))},toUnicode:function(e){return y(e,(function(e){return h.test(e)?w(e.slice(4).toLowerCase()):e}))}},r&&o)if(t.exports==r)o.exports=s;else for(l in s)s.hasOwnProperty(l)&&(r[l]=s[l]);else n.punycode=s}(this)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(e,t,i){var n=e("./log");function r(e,t){for(var i=3===e.nodeType?document.createTextNode(e.nodeValue):e.cloneNode(!1),o=e.firstChild;o;)(!0===t||1!==o.nodeType||"SCRIPT"!==o.nodeName)&&i.appendChild(r(o,t)),o=o.nextSibling;return 1===e.nodeType&&(i._scrollTop=e.scrollTop,i._scrollLeft=e.scrollLeft,"CANVAS"===e.nodeName?function(e,t){try{t&&(t.width=e.width,t.height=e.height,t.getContext("2d").putImageData(e.getContext("2d").getImageData(0,0,e.width,e.height),0,0))}catch(t){n("Unable to copy canvas content from",e,t)}}(e,i):("TEXTAREA"===e.nodeName||"SELECT"===e.nodeName)&&(i.value=e.value)),i}function o(e){if(1===e.nodeType){e.scrollTop=e._scrollTop,e.scrollLeft=e._scrollLeft;for(var t=e.firstChild;t;)o(t),t=t.nextSibling}}t.exports=function(e,t,i,n,a,s,l){var u=r(e.documentElement,a.javascriptEnabled),c=t.createElement("iframe");return c.className="html2canvas-container",c.style.visibility="hidden",c.style.position="fixed",c.style.left="-10000px",c.style.top="0px",c.style.border="0",c.width=i,c.height=n,c.scrolling="no",t.body.appendChild(c),new Promise((function(t){var i,n,r,h=c.contentWindow.document;c.contentWindow.onload=c.onload=function(){var e=setInterval((function(){h.body.childNodes.length>0&&(o(h.documentElement),clearInterval(e),"view"===a.type&&(c.contentWindow.scrollTo(s,l),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(c.contentWindow.scrollY!==l||c.contentWindow.scrollX!==s)&&(h.documentElement.style.top=-l+"px",h.documentElement.style.left=-s+"px",h.documentElement.style.position="absolute")),t(c))}),50)},h.open(),h.write("<!DOCTYPE html><html></html>"),n=s,r=l,(i=e).defaultView&&(n!==i.defaultView.pageXOffset||r!==i.defaultView.pageYOffset)&&i.defaultView.scrollTo(n,r),h.replaceChild(h.adoptNode(u),h.documentElement),h.close()}))}},{"./log":13}],3:[function(e,t,i){function n(e){this.r=0,this.g=0,this.b=0,this.a=null,this.fromArray(e)||this.namedColor(e)||this.rgb(e)||this.rgba(e)||this.hex6(e)||this.hex3(e)}n.prototype.darken=function(e){var t=1-e;return new n([Math.round(this.r*t),Math.round(this.g*t),Math.round(this.b*t),this.a])},n.prototype.isTransparent=function(){return 0===this.a},n.prototype.isBlack=function(){return 0===this.r&&0===this.g&&0===this.b},n.prototype.fromArray=function(e){return Array.isArray(e)&&(this.r=Math.min(e[0],255),this.g=Math.min(e[1],255),this.b=Math.min(e[2],255),e.length>3&&(this.a=e[3])),Array.isArray(e)};var r=/^#([a-f0-9]{3})$/i;n.prototype.hex3=function(e){var t;return null!==(t=e.match(r))&&(this.r=parseInt(t[1][0]+t[1][0],16),this.g=parseInt(t[1][1]+t[1][1],16),this.b=parseInt(t[1][2]+t[1][2],16)),null!==t};var o=/^#([a-f0-9]{6})$/i;n.prototype.hex6=function(e){var t=null;return null!==(t=e.match(o))&&(this.r=parseInt(t[1].substring(0,2),16),this.g=parseInt(t[1].substring(2,4),16),this.b=parseInt(t[1].substring(4,6),16)),null!==t};var a=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/;n.prototype.rgb=function(e){var t;return null!==(t=e.match(a))&&(this.r=Number(t[1]),this.g=Number(t[2]),this.b=Number(t[3])),null!==t};var s=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d?\.?\d+)\s*\)$/;n.prototype.rgba=function(e){var t;return null!==(t=e.match(s))&&(this.r=Number(t[1]),this.g=Number(t[2]),this.b=Number(t[3]),this.a=Number(t[4])),null!==t},n.prototype.toString=function(){return null!==this.a&&1!==this.a?"rgba("+[this.r,this.g,this.b,this.a].join(",")+")":"rgb("+[this.r,this.g,this.b].join(",")+")"},n.prototype.namedColor=function(e){e=e.toLowerCase();var t=l[e];if(t)this.r=t[0],this.g=t[1],this.b=t[2];else if("transparent"===e)return this.r=this.g=this.b=this.a=0,!0;return!!t},n.prototype.isColor=!0;var l={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};t.exports=n},{}],4:[function(e,t,i){var n=e("./support"),r=e("./renderers/canvas"),o=e("./imageloader"),a=e("./nodeparser"),s=e("./nodecontainer"),l=e("./log"),u=e("./utils"),c=e("./clone"),h=e("./proxy").loadUrlDocument,d=u.getBounds,f="data-html2canvas-node",p=0;function _(e,t){var i,n,o=p++;if((t=t||{}).logging&&(l.options.logging=!0,l.options.start=Date.now()),t.async=typeof t.async>"u"||t.async,t.allowTaint=!(typeof t.allowTaint>"u")&&t.allowTaint,t.removeContainer=typeof t.removeContainer>"u"||t.removeContainer,t.javascriptEnabled=!(typeof t.javascriptEnabled>"u")&&t.javascriptEnabled,t.imageTimeout=typeof t.imageTimeout>"u"?1e4:t.imageTimeout,t.renderer="function"==typeof t.renderer?t.renderer:r,t.strict=!!t.strict,"string"==typeof e){if("string"!=typeof t.proxy)return Promise.reject("Proxy must be used when rendering url");var a=null!=t.width?t.width:window.innerWidth,s=null!=t.height?t.height:window.innerHeight;return h((i=e,n=document.createElement("a"),n.href=i,n.href=n.href,n),t.proxy,document,a,s,t).then((function(e){return $(e.contentWindow.document.documentElement,e,t,a,s)}))}var u,d,_,m,g,y=(void 0===e?[document.documentElement]:e.length?e:[e])[0];return y.setAttribute(f+o,o),(u=y.ownerDocument,d=t,_=y.ownerDocument.defaultView.innerWidth,m=y.ownerDocument.defaultView.innerHeight,g=o,c(u,u,_,m,d,u.defaultView.pageXOffset,u.defaultView.pageYOffset).then((function(e){l("Document cloned");var t=f+g,i="["+t+"='"+g+"']";if(!u.querySelector(i))return null;u.querySelector(i).removeAttribute(t);var n=e.contentWindow,r=n.document.querySelector(i);return("function"==typeof d.onclone?Promise.resolve(d.onclone(n.document)):Promise.resolve(!0)).then((function(){return $(r,e,d,_,m)}))}))).then((function(e){return"function"==typeof t.onrendered&&(l("options.onrendered is deprecated, html2canvas returns a Promise containing the canvas"),t.onrendered(e)),e}))}_.CanvasRenderer=r,_.NodeContainer=s,_.log=l,_.utils=u;var m=typeof document>"u"||"function"!=typeof Object.create||"function"!=typeof document.createElement("canvas").getContext?function(){return Promise.reject("No canvas support")}:_;function $(e,t,i,r,s){var u=t.contentWindow,c=new n(u.document),h=new o(i,c),f=d(e),p="view"===i.type?r:f.right+1,_="view"===i.type?s:f.bottom+1,m=new i.renderer(p,_,h,i,document);return new a(e,m,c,h,i).ready.then((function(){var n,r;if(l("Finished rendering"),"view"===i.type)n=g(m.canvas,{width:m.canvas.width,height:m.canvas.height,top:0,left:0,x:0,y:0});else if(e===u.document.body||e===u.document.documentElement||null!=i.canvas)n=m.canvas;else if(i.scale){var o={width:null!=i.width?i.width:f.width,height:null!=i.height?i.height:f.height,top:f.top,left:f.left,x:0,y:0},a={};for(var s in o)o.hasOwnProperty(s)&&(a[s]=o[s]*i.scale);(n=g(m.canvas,a)).style.width=o.width+"px",n.style.height=o.height+"px"}else n=g(m.canvas,{width:null!=i.width?i.width:f.width,height:null!=i.height?i.height:f.height,top:f.top,left:f.left,x:0,y:0});return r=t,i.removeContainer&&(r.parentNode.removeChild(r),l("Cleaned up container")),n}))}function g(e,t){var i=document.createElement("canvas"),n=Math.min(e.width-1,Math.max(0,t.left)),r=Math.min(e.width,Math.max(1,t.left+t.width)),o=Math.min(e.height-1,Math.max(0,t.top)),a=Math.min(e.height,Math.max(1,t.top+t.height));i.width=t.width,i.height=t.height;var s=r-n,u=a-o;return l("Cropping canvas at:","left:",t.left,"top:",t.top,"width:",s,"height:",u),l("Resulting crop with width",t.width,"and height",t.height,"with x",n,"and y",o),i.getContext("2d").drawImage(e,n,o,s,u,t.x,t.y,s,u),i}t.exports=m},{"./clone":2,"./imageloader":11,"./log":13,"./nodecontainer":14,"./nodeparser":15,"./proxy":16,"./renderers/canvas":20,"./support":22,"./utils":26}],5:[function(e,t,i){var n=e("./log"),r=e("./utils").smallImage;t.exports=function e(t){if(this.src=t,n("DummyImageContainer for",t),!this.promise||!this.image){n("Initiating DummyImageContainer"),e.prototype.image=new Image;var i=this.image;e.prototype.promise=new Promise((function(e,t){i.onload=e,i.onerror=t,i.src=r(),!0===i.complete&&e(i)}))}}},{"./log":13,"./utils":26}],6:[function(e,t,i){var n=e("./utils").smallImage;t.exports=function(e,t){var i,r,o=document.createElement("div"),a=document.createElement("img"),s=document.createElement("span"),l="Hidden Text";o.style.visibility="hidden",o.style.fontFamily=e,o.style.fontSize=t,o.style.margin=0,o.style.padding=0,document.body.appendChild(o),a.src=n(),a.width=1,a.height=1,a.style.margin=0,a.style.padding=0,a.style.verticalAlign="baseline",s.style.fontFamily=e,s.style.fontSize=t,s.style.margin=0,s.style.padding=0,s.appendChild(document.createTextNode(l)),o.appendChild(s),o.appendChild(a),i=a.offsetTop-s.offsetTop+1,o.removeChild(s),o.appendChild(document.createTextNode(l)),o.style.lineHeight="normal",a.style.verticalAlign="super",r=a.offsetTop-o.offsetTop+1,document.body.removeChild(o),this.baseline=i,this.lineWidth=1,this.middle=r}},{"./utils":26}],7:[function(e,t,i){var n=e("./font");function r(){this.data={}}r.prototype.getMetrics=function(e,t){return void 0===this.data[e+"-"+t]&&(this.data[e+"-"+t]=new n(e,t)),this.data[e+"-"+t]},t.exports=r},{"./font":6}],8:[function(e,t,i){var n=e("./utils").getBounds,r=e("./proxy").loadUrlDocument;function o(t,i,r){this.image=null,this.src=t;var o=this,a=n(t);this.promise=(i?new Promise((function(e){"about:blank"===t.contentWindow.document.URL||null==t.contentWindow.document.documentElement?t.contentWindow.onload=t.onload=function(){e(t)}:e(t)})):this.proxyLoad(r.proxy,a,r)).then((function(t){return e("./core")(t.contentWindow.document.documentElement,{type:"view",width:t.width,height:t.height,proxy:r.proxy,javascriptEnabled:r.javascriptEnabled,removeContainer:r.removeContainer,allowTaint:r.allowTaint,imageTimeout:r.imageTimeout/2})})).then((function(e){return o.image=e}))}o.prototype.proxyLoad=function(e,t,i){var n=this.src;return r(n.src,e,n.ownerDocument,t.width,t.height,i)},t.exports=o},{"./core":4,"./proxy":16,"./utils":26}],9:[function(e,t,i){function n(e){this.src=e.value,this.colorStops=[],this.type=null,this.x0=.5,this.y0=.5,this.x1=.5,this.y1=.5,this.promise=Promise.resolve(!0)}n.TYPES={LINEAR:1,RADIAL:2},n.REGEXP_COLORSTOP=/^\s*(rgba?\(\s*\d{1,3},\s*\d{1,3},\s*\d{1,3}(?:,\s*[0-9\.]+)?\s*\)|[a-z]{3,20}|#[a-f0-9]{3,6})(?:\s+(\d{1,3}(?:\.\d+)?)(%|px)?)?(?:\s|$)/i,t.exports=n},{}],10:[function(e,t,i){t.exports=function(e,t){this.src=e,this.image=new Image;var i=this;this.tainted=null,this.promise=new Promise((function(n,r){i.image.onload=n,i.image.onerror=r,t&&(i.image.crossOrigin="anonymous"),i.image.src=e,!0===i.image.complete&&n(i.image)}))}},{}],11:[function(e,t,i){var n=e("./log"),r=e("./imagecontainer"),o=e("./dummyimagecontainer"),a=e("./proxyimagecontainer"),s=e("./framecontainer"),l=e("./svgcontainer"),u=e("./svgnodecontainer"),c=e("./lineargradientcontainer"),h=e("./webkitgradientcontainer"),d=e("./utils").bind;function f(e,t){this.link=null,this.options=e,this.support=t,this.origin=this.getOrigin(window.location.href)}f.prototype.findImages=function(e){var t=[];return e.reduce((function(e,t){switch(t.node.nodeName){case"IMG":return e.concat([{args:[t.node.src],method:"url"}]);case"svg":case"IFRAME":return e.concat([{args:[t.node],method:t.node.nodeName}])}return e}),[]).forEach(this.addImage(t,this.loadImage),this),t},f.prototype.findBackgroundImage=function(e,t){return t.parseBackgroundImages().filter(this.hasImageBackground).forEach(this.addImage(e,this.loadImage),this),e},f.prototype.addImage=function(e,t){return function(i){i.args.forEach((function(r){this.imageExists(e,r)||(e.splice(0,0,t.call(this,i)),n("Added image #"+e.length,"string"==typeof r?r.substring(0,100):r))}),this)}},f.prototype.hasImageBackground=function(e){return"none"!==e.method},f.prototype.loadImage=function(e){if("url"===e.method){var t=e.args[0];return!this.isSVG(t)||this.support.svg||this.options.allowTaint?t.match(/data:image\/.*;base64,/i)?new r(t.replace(/url\(['"]{0,}|['"]{0,}\)$/gi,""),!1):this.isSameOrigin(t)||!0===this.options.allowTaint||this.isSVG(t)?new r(t,!1):this.support.cors&&!this.options.allowTaint&&this.options.useCORS?new r(t,!0):this.options.proxy?new a(t,this.options.proxy):new o(t):new l(t)}return"linear-gradient"===e.method?new c(e):"gradient"===e.method?new h(e):"svg"===e.method?new u(e.args[0],this.support.svg):"IFRAME"===e.method?new s(e.args[0],this.isSameOrigin(e.args[0].src),this.options):new o(e)},f.prototype.isSVG=function(e){return"svg"===e.substring(e.length-3).toLowerCase()||l.prototype.isInline(e)},f.prototype.imageExists=function(e,t){return e.some((function(e){return e.src===t}))},f.prototype.isSameOrigin=function(e){return this.getOrigin(e)===this.origin},f.prototype.getOrigin=function(e){var t=this.link||(this.link=document.createElement("a"));return t.href=e,t.href=t.href,t.protocol+t.hostname+t.port},f.prototype.getPromise=function(e){return this.timeout(e,this.options.imageTimeout).catch((function(){return new o(e.src).promise.then((function(t){e.image=t}))}))},f.prototype.get=function(e){var t=null;return this.images.some((function(i){return(t=i).src===e}))?t:null},f.prototype.fetch=function(e){return this.images=e.reduce(d(this.findBackgroundImage,this),this.findImages(e)),this.images.forEach((function(e,t){e.promise.then((function(){n("Succesfully loaded image #"+(t+1),e)}),(function(i){n("Failed loading image #"+(t+1),e,i)}))})),this.ready=Promise.all(this.images.map(this.getPromise,this)),n("Finished searching images"),this},f.prototype.timeout=function(e,t){var i,r=Promise.race([e.promise,new Promise((function(r,o){i=setTimeout((function(){n("Timed out loading image",e),o(e)}),t)}))]).then((function(e){return clearTimeout(i),e}));return r.catch((function(){clearTimeout(i)})),r},t.exports=f},{"./dummyimagecontainer":5,"./framecontainer":8,"./imagecontainer":10,"./lineargradientcontainer":12,"./log":13,"./proxyimagecontainer":17,"./svgcontainer":23,"./svgnodecontainer":24,"./utils":26,"./webkitgradientcontainer":27}],12:[function(e,t,i){var n=e("./gradientcontainer"),r=e("./color");function o(e){n.apply(this,arguments),this.type=n.TYPES.LINEAR;var t=o.REGEXP_DIRECTION.test(e.args[0])||!n.REGEXP_COLORSTOP.test(e.args[0]);t?e.args[0].split(/\s+/).reverse().forEach((function(e,t){switch(e){case"left":this.x0=0,this.x1=1;break;case"top":this.y0=0,this.y1=1;break;case"right":this.x0=1,this.x1=0;break;case"bottom":this.y0=1,this.y1=0;break;case"to":var i=this.y0,n=this.x0;this.y0=this.y1,this.x0=this.x1,this.x1=n,this.y1=i;break;case"center":break;default:var r=.01*parseFloat(e,10);if(isNaN(r))break;0===t?(this.y0=r,this.y1=1-this.y0):(this.x0=r,this.x1=1-this.x0)}}),this):(this.y0=0,this.y1=1),this.colorStops=e.args.slice(t?1:0).map((function(e){var t=e.match(n.REGEXP_COLORSTOP),i=+t[2],o=0===i?"%":t[3];return{color:new r(t[1]),stop:"%"===o?i/100:null}})),null===this.colorStops[0].stop&&(this.colorStops[0].stop=0),null===this.colorStops[this.colorStops.length-1].stop&&(this.colorStops[this.colorStops.length-1].stop=1),this.colorStops.forEach((function(e,t){null===e.stop&&this.colorStops.slice(t).some((function(i,n){return null!==i.stop&&(e.stop=(i.stop-this.colorStops[t-1].stop)/(n+1)+this.colorStops[t-1].stop,!0)}),this)}),this)}o.prototype=Object.create(n.prototype),o.REGEXP_DIRECTION=/^\s*(?:to|left|right|top|bottom|center|\d{1,3}(?:\.\d+)?%?)(?:\s|$)/i,t.exports=o},{"./color":3,"./gradientcontainer":9}],13:[function(e,t,i){var n=function(){n.options.logging&&window.console&&window.console.log&&Function.prototype.bind.call(window.console.log,window.console).apply(window.console,[Date.now()-n.options.start+"ms","html2canvas:"].concat([].slice.call(arguments,0)))};n.options={logging:!1},t.exports=n},{}],14:[function(e,t,i){var n=e("./color"),r=e("./utils"),o=r.getBounds,a=r.parseBackgrounds,s=r.offsetBounds;function l(e,t){this.node=e,this.parent=t,this.stack=null,this.bounds=null,this.borders=null,this.clip=[],this.backgroundClip=[],this.offsetBounds=null,this.visible=null,this.computedStyles=null,this.colors={},this.styles={},this.backgroundImages=null,this.transformData=null,this.transformMatrix=null,this.isPseudoElement=!1,this.opacity=null}function u(e){return-1!==e.toString().indexOf("%")}function c(e){return e.replace("px","")}function h(e){return parseFloat(e)}l.prototype.cloneTo=function(e){e.visible=this.visible,e.borders=this.borders,e.bounds=this.bounds,e.clip=this.clip,e.backgroundClip=this.backgroundClip,e.computedStyles=this.computedStyles,e.styles=this.styles,e.backgroundImages=this.backgroundImages,e.opacity=this.opacity},l.prototype.getOpacity=function(){return null===this.opacity?this.opacity=this.cssFloat("opacity"):this.opacity},l.prototype.assignStack=function(e){this.stack=e,e.children.push(this)},l.prototype.isElementVisible=function(){return this.node.nodeType===Node.TEXT_NODE?this.parent.visible:"none"!==this.css("display")&&"hidden"!==this.css("visibility")&&!this.node.hasAttribute("data-html2canvas-ignore")&&("INPUT"!==this.node.nodeName||"hidden"!==this.node.getAttribute("type"))},l.prototype.css=function(e){return this.computedStyles||(this.computedStyles=this.isPseudoElement?this.parent.computedStyle(this.before?":before":":after"):this.computedStyle(null)),this.styles[e]||(this.styles[e]=this.computedStyles[e])},l.prototype.prefixedCss=function(e){var t=this.css(e);return void 0===t&&["webkit","moz","ms","o"].some((function(i){return void 0!==(t=this.css(i+e.substr(0,1).toUpperCase()+e.substr(1)))}),this),void 0===t?null:t},l.prototype.computedStyle=function(e){return this.node.ownerDocument.defaultView.getComputedStyle(this.node,e)},l.prototype.cssInt=function(e){var t=parseInt(this.css(e),10);return isNaN(t)?0:t},l.prototype.color=function(e){return this.colors[e]||(this.colors[e]=new n(this.css(e)))},l.prototype.cssFloat=function(e){var t=parseFloat(this.css(e));return isNaN(t)?0:t},l.prototype.fontWeight=function(){var e=this.css("fontWeight");switch(parseInt(e,10)){case 401:e="bold";break;case 400:e="normal"}return e},l.prototype.parseClip=function(){var e=this.css("clip").match(this.CLIP);return e?{top:parseInt(e[1],10),right:parseInt(e[2],10),bottom:parseInt(e[3],10),left:parseInt(e[4],10)}:null},l.prototype.parseBackgroundImages=function(){return this.backgroundImages||(this.backgroundImages=a(this.css("backgroundImage")))},l.prototype.cssList=function(e,t){var i=(this.css(e)||"").split(",");return 1===(i=(i=i[t||0]||i[0]||"auto").trim().split(" ")).length&&(i=[i[0],u(i[0])?"auto":i[0]]),i},l.prototype.parseBackgroundSize=function(e,t,i){var n,r,o=this.cssList("backgroundSize",i);if(u(o[0]))n=e.width*parseFloat(o[0])/100;else{if(/contain|cover/.test(o[0])){var a=e.width/e.height,s=t.width/t.height;return a<s^"contain"===o[0]?{width:e.height*s,height:e.height}:{width:e.width,height:e.width/s}}n=parseInt(o[0],10)}return r="auto"===o[0]&&"auto"===o[1]?t.height:"auto"===o[1]?n/t.width*t.height:u(o[1])?e.height*parseFloat(o[1])/100:parseInt(o[1],10),"auto"===o[0]&&(n=r/t.height*t.width),{width:n,height:r}},l.prototype.parseBackgroundPosition=function(e,t,i,n){var r,o,a=this.cssList("backgroundPosition",i);return r=u(a[0])?(e.width-(n||t).width)*(parseFloat(a[0])/100):parseInt(a[0],10),o="auto"===a[1]?r/t.width*t.height:u(a[1])?(e.height-(n||t).height)*parseFloat(a[1])/100:parseInt(a[1],10),"auto"===a[0]&&(r=o/t.height*t.width),{left:r,top:o}},l.prototype.parseBackgroundRepeat=function(e){return this.cssList("backgroundRepeat",e)[0]},l.prototype.parseTextShadows=function(){var e=this.css("textShadow"),t=[];if(e&&"none"!==e)for(var i=e.match(this.TEXT_SHADOW_PROPERTY),r=0;i&&r<i.length;r++){var o=i[r].match(this.TEXT_SHADOW_VALUES);t.push({color:new n(o[0]),offsetX:o[1]?parseFloat(o[1].replace("px","")):0,offsetY:o[2]?parseFloat(o[2].replace("px","")):0,blur:o[3]?o[3].replace("px",""):0})}return t},l.prototype.parseTransform=function(){if(!this.transformData)if(this.hasTransform()){var e=this.parseBounds(),t=this.prefixedCss("transformOrigin").split(" ").map(c).map(h);t[0]+=e.left,t[1]+=e.top,this.transformData={origin:t,matrix:this.parseTransformMatrix()}}else this.transformData={origin:[0,0],matrix:[1,0,0,1,0,0]};return this.transformData},l.prototype.parseTransformMatrix=function(){if(!this.transformMatrix){var e=this.prefixedCss("transform"),t=e?function(e){if(e&&"matrix"===e[1])return e[2].split(",").map((function(e){return parseFloat(e.trim())}));if(e&&"matrix3d"===e[1]){var t=e[2].split(",").map((function(e){return parseFloat(e.trim())}));return[t[0],t[1],t[4],t[5],t[12],t[13]]}}(e.match(this.MATRIX_PROPERTY)):null;this.transformMatrix=t||[1,0,0,1,0,0]}return this.transformMatrix},l.prototype.inverseTransform=function(){var e,t,i,n,r,o,a,s,l,u=this.parseTransform();return{origin:u.origin,matrix:(e=u.matrix,t=e[0],i=e[2],n=e[4],r=e[1],o=e[3],a=e[5],s=t*o-i*r,l=[o,-r,-i,t,i*a-n*o,n*r-t*a].map((function(e){return e/s})),l)}},l.prototype.parseBounds=function(){return this.bounds||(this.bounds=this.hasTransform()?s(this.node):o(this.node))},l.prototype.hasTransform=function(){return"1,0,0,1,0,0"!==this.parseTransformMatrix().join(",")||this.parent&&this.parent.hasTransform()},l.prototype.getValue=function(){var e,t,i=this.node.value||"";return"SELECT"===this.node.tagName?(e=this.node,i=(t=e.options[e.selectedIndex||0])&&t.text||""):"password"===this.node.type&&(i=Array(i.length+1).join("•")),0===i.length?this.node.placeholder||"":i},l.prototype.MATRIX_PROPERTY=/(matrix|matrix3d)\((.+)\)/,l.prototype.TEXT_SHADOW_PROPERTY=/((rgba|rgb)\([^\)]+\)(\s-?\d+px){0,})/g,l.prototype.TEXT_SHADOW_VALUES=/(-?\d+px)|(#.+)|(rgb\(.+\))|(rgba\(.+\))/g,l.prototype.CLIP=/^rect\((\d+)px,? (\d+)px,? (\d+)px,? (\d+)px\)$/,t.exports=l},{"./color":3,"./utils":26}],15:[function(e,t,i){var n=e("./log"),r=e("punycode"),o=e("./nodecontainer"),a=e("./textcontainer"),s=e("./pseudoelementcontainer"),l=e("./fontmetrics"),u=e("./color"),c=e("./stackingcontext"),h=e("./utils"),d=h.bind,f=h.getBounds,p=h.parseBackgrounds,_=h.offsetBounds;function m(e,t,i,r,a){n("Starting NodeParser"),this.renderer=t,this.options=a,this.range=null,this.support=i,this.renderQueue=[],this.stack=new c(!0,1,e.ownerDocument,null);var s=new o(e,null);if(a.background&&t.rectangle(0,0,t.width,t.height,new u(a.background)),e===e.ownerDocument.documentElement){var h=new o(s.color("backgroundColor").isTransparent()?e.ownerDocument.body:e.ownerDocument.documentElement,null);t.rectangle(0,0,t.width,t.height,h.color("backgroundColor"))}s.visibile=s.isElementVisible(),this.createPseudoHideStyles(e.ownerDocument),this.disableAnimations(e.ownerDocument),this.nodes=V([s].concat(this.getChildren(s)).filter((function(e){return e.visible=e.isElementVisible()})).map(this.getPseudoElements,this)),this.fontMetrics=new l,n("Fetched nodes, total:",this.nodes.length),n("Calculate overflow clips"),this.calculateOverflowClips(),n("Start fetching images"),this.images=r.fetch(this.nodes.filter(F)),this.ready=this.images.ready.then(d((function(){return n("Images loaded, starting parsing"),n("Creating stacking contexts"),this.createStackingContexts(),n("Sorting stacking contexts"),this.sortStackingContexts(this.stack),this.parse(this.stack),n("Render queue created with "+this.renderQueue.length+" items"),new Promise(d((function(e){a.async?"function"==typeof a.async?a.async.call(this,this.renderQueue,e):this.renderQueue.length>0?(this.renderIndex=0,this.asyncRenderer(this.renderQueue,e)):e():(this.renderQueue.forEach(this.paint,this),e())}),this))}),this))}function $(e){return e.parent&&e.parent.clip.length}function g(){}m.prototype.calculateOverflowClips=function(){this.nodes.forEach((function(e){if(F(e)){B(e)&&e.appendToDOM(),e.borders=this.parseBorders(e);var t="hidden"===e.css("overflow")?[e.borders.clip]:[],i=e.parseClip();i&&-1!==["absolute","fixed"].indexOf(e.css("position"))&&t.push([["rect",e.bounds.left+i.left,e.bounds.top+i.top,i.right-i.left,i.bottom-i.top]]),e.clip=$(e)?e.parent.clip.concat(t):t,e.backgroundClip="hidden"!==e.css("overflow")?e.clip.concat([e.borders.clip]):e.clip,B(e)&&e.cleanDOM()}else z(e)&&(e.clip=$(e)?e.parent.clip:[]);B(e)||(e.bounds=null)}),this)},m.prototype.asyncRenderer=function(e,t,i){i=i||Date.now(),this.paint(e[this.renderIndex++]),e.length===this.renderIndex?t():i+20>Date.now()?this.asyncRenderer(e,t,i):setTimeout(d((function(){this.asyncRenderer(e,t)}),this),0)},m.prototype.createPseudoHideStyles=function(e){this.createStyles(e,"."+s.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+':before { content: "" !important; display: none !important; }.'+s.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER+':after { content: "" !important; display: none !important; }')},m.prototype.disableAnimations=function(e){this.createStyles(e,"* { -webkit-animation: none !important; -moz-animation: none !important; -o-animation: none !important; animation: none !important; -webkit-transition: none !important; -moz-transition: none !important; -o-transition: none !important; transition: none !important;}")},m.prototype.createStyles=function(e,t){var i=e.createElement("style");i.innerHTML=t,e.body.appendChild(i)},m.prototype.getPseudoElements=function(e){var t=[[e]];if(e.node.nodeType===Node.ELEMENT_NODE){var i=this.getPseudoElement(e,":before"),n=this.getPseudoElement(e,":after");i&&t.push(i),n&&t.push(n)}return V(t)},m.prototype.getPseudoElement=function(e,t){var i,n,r=e.computedStyle(t);if(!r||!r.content||"none"===r.content||"-moz-alt-content"===r.content||"none"===r.display)return null;for(var o=(i=r.content,n=void 0,(n=i.substr(0,1))===i.substr(i.length-1)&&n.match(/'|"/)?i.substr(1,i.length-2):i),l="url"===o.substr(0,3),u=document.createElement(l?"img":"html2canvaspseudoelement"),c=new s(u,e,t),h=r.length-1;h>=0;h--){var d=r.item(h).replace(/(\-[a-z])/g,(function(e){return e.toUpperCase().replace("-","")}));u.style[d]=r[d]}if(u.className=s.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+" "+s.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER,l)return u.src=p(o)[0].args[0],[c];var f=document.createTextNode(o);return u.appendChild(f),[c,new a(f,c)]},m.prototype.getChildren=function(e){return V([].filter.call(e.node.childNodes,O).map((function(t){var i=[t.nodeType===Node.TEXT_NODE?new a(t,e):new o(t,e)].filter(U);return t.nodeType===Node.ELEMENT_NODE&&i.length&&"TEXTAREA"!==t.tagName?i[0].isElementVisible()?i.concat(this.getChildren(i[0])):[]:i}),this))},m.prototype.newStackingContext=function(e,t){var i=new c(t,e.getOpacity(),e.node,e.parent);e.cloneTo(i),(t?i.getParentStack(this):i.parent.stack).contexts.push(i),e.stack=i},m.prototype.createStackingContexts=function(){this.nodes.forEach((function(e){var t,i;F(e)&&(this.isRootElement(e)||e.getOpacity()<1||(i=(t=e).css("position"),"auto"!==(-1!==["absolute","relative","fixed"].indexOf(i)?t.css("zIndex"):"auto"))||this.isBodyWithTransparentRoot(e)||e.hasTransform())?this.newStackingContext(e,!0):F(e)&&(D(e)&&A(e)||-1!==["inline-block","inline-table"].indexOf(e.css("display"))||R(e))?this.newStackingContext(e,!1):e.assignStack(e.parent.stack)}),this)},m.prototype.isBodyWithTransparentRoot=function(e){return"BODY"===e.node.nodeName&&e.parent.color("backgroundColor").isTransparent()},m.prototype.isRootElement=function(e){return null===e.parent},m.prototype.sortStackingContexts=function(e){var t;e.contexts.sort((t=e.contexts.slice(0),function(e,i){return e.cssInt("zIndex")+t.indexOf(e)/t.length-(i.cssInt("zIndex")+t.indexOf(i)/t.length)})),e.contexts.forEach(this.sortStackingContexts,this)},m.prototype.parseTextBounds=function(e){return function(t,i,n){if("none"!==e.parent.css("textDecoration").substr(0,4)||0!==t.trim().length){if(this.support.rangeBounds&&!e.parent.hasTransform()){var r=n.slice(0,i).join("").length;return this.getRangeBounds(e.node,r,t.length)}if(e.node&&"string"==typeof e.node.data){var o=e.node.splitText(t.length),a=this.getWrapperBounds(e.node,e.parent.hasTransform());return e.node=o,a}}else(!this.support.rangeBounds||e.parent.hasTransform())&&(e.node=e.node.splitText(t.length));return{}}},m.prototype.getWrapperBounds=function(e,t){var i=e.ownerDocument.createElement("html2canvaswrapper"),n=e.parentNode,r=e.cloneNode(!0);i.appendChild(e.cloneNode(!0)),n.replaceChild(i,e);var o=t?_(i):f(i);return n.replaceChild(r,i),o},m.prototype.getRangeBounds=function(e,t,i){var n=this.range||(this.range=e.ownerDocument.createRange());return n.setStart(e,t),n.setEnd(e,t+i),n.getBoundingClientRect()},m.prototype.parse=function(e){var t=e.contexts.filter(P),i=e.children.filter(F),n=i.filter(N(R)),r=n.filter(N(D)).filter(N(L)),o=i.filter(N(D)).filter(R),a=n.filter(N(D)).filter(L),s=e.contexts.concat(n.filter(D)).filter(A),l=e.children.filter(z).filter(I),u=e.contexts.filter(E);t.concat(r).concat(o).concat(a).concat(s).concat(l).concat(u).forEach((function(e){this.renderQueue.push(e),M(e)&&(this.parse(e),this.renderQueue.push(new g))}),this)},m.prototype.paint=function(e){try{e instanceof g?this.renderer.ctx.restore():z(e)?(B(e.parent)&&e.parent.appendToDOM(),this.paintText(e),B(e.parent)&&e.parent.cleanDOM()):this.paintNode(e)}catch(e){if(n(e),this.options.strict)throw e}},m.prototype.paintNode=function(e){M(e)&&(this.renderer.setOpacity(e.opacity),this.renderer.ctx.save(),e.hasTransform()&&this.renderer.setTransform(e.parseTransform())),"INPUT"===e.node.nodeName&&"checkbox"===e.node.type?this.paintCheckbox(e):"INPUT"===e.node.nodeName&&"radio"===e.node.type?this.paintRadio(e):this.paintElement(e)},m.prototype.paintElement=function(e){var t=e.parseBounds();this.renderer.clip(e.backgroundClip,(function(){this.renderer.renderBackground(e,t,e.borders.borders.map(k))}),this,e),this.renderer.mask(e.backgroundClip,(function(){this.renderer.renderShadows(e,e.borders.clip)}),this,e),this.renderer.clip(e.clip,(function(){this.renderer.renderBorders(e.borders.borders)}),this,e),this.renderer.clip(e.backgroundClip,(function(){switch(e.node.nodeName){case"svg":case"IFRAME":var i=this.images.get(e.node);i?this.renderer.renderImage(e,t,e.borders,i):n("Error loading <"+e.node.nodeName+">",e.node);break;case"IMG":var r=this.images.get(e.node.src);r?this.renderer.renderImage(e,t,e.borders,r):n("Error loading <img>",e.node.src);break;case"CANVAS":this.renderer.renderImage(e,t,e.borders,{image:e.node});break;case"SELECT":case"INPUT":case"TEXTAREA":this.paintFormValue(e)}}),this,e)},m.prototype.paintCheckbox=function(e){var t=e.parseBounds(),i=Math.min(t.width,t.height),n={width:i-1,height:i-1,top:t.top,left:t.left},r=[3,3],o=[r,r,r,r],a=[1,1,1,1].map((function(e){return{color:new u("#A5A5A5"),width:e}})),s=b(n,o,a);this.renderer.clip(e.backgroundClip,(function(){this.renderer.rectangle(n.left+1,n.top+1,n.width-2,n.height-2,new u("#DEDEDE")),this.renderer.renderBorders(v(a,n,s,o)),e.node.checked&&(this.renderer.font(new u("#424242"),"normal","normal","bold",i-3+"px","arial"),this.renderer.text("✔",n.left+i/6,n.top+i-1))}),this,e)},m.prototype.paintRadio=function(e){var t=e.parseBounds(),i=Math.min(t.width,t.height)-2;this.renderer.clip(e.backgroundClip,(function(){this.renderer.circleStroke(t.left+1,t.top+1,i,new u("#DEDEDE"),1,new u("#A5A5A5")),e.node.checked&&this.renderer.circle(Math.ceil(t.left+i/4)+1,Math.ceil(t.top+i/4)+1,Math.floor(i/2),new u("#424242"))}),this,e)},m.prototype.paintFormValue=function(e){var t=e.getValue();if(t.length>0){var i=e.node.ownerDocument,r=i.createElement("html2canvaswrapper");["lineHeight","textAlign","fontFamily","fontWeight","fontSize","color","paddingLeft","paddingTop","paddingRight","paddingBottom","width","height","borderLeftStyle","borderTopStyle","borderLeftWidth","borderTopWidth","boxSizing","whiteSpace","wordWrap"].forEach((function(t){try{r.style[t]=e.css(t)}catch(e){n("html2canvas: Parse: Exception caught in renderFormValue: "+e.message)}}));var o=e.parseBounds();r.style.position="fixed",r.style.left=o.left+"px",r.style.top=o.top+"px",r.textContent=t,i.body.appendChild(r),this.paintText(new a(r.firstChild,e)),i.body.removeChild(r)}},m.prototype.paintText=function(e){e.applyTextTransform();var t,i=r.ucs2.decode(e.node.data),n=(!this.options.letterRendering||/^(normal|none|0px)$/.test(e.parent.css("letterSpacing")))&&(t=e.node.data,!/[^\u0000-\u00ff]/.test(t)),o=n?function(e){for(var t,i=[],n=0,o=!1;e.length;)W(e[n])===o?((t=e.splice(0,n)).length&&i.push(r.ucs2.encode(t)),o=!o,n=0):n++,n>=e.length&&(t=e.splice(0,n)).length&&i.push(r.ucs2.encode(t));return i}(i):i.map((function(e){return r.ucs2.encode([e])}));n||(e.parent.node.style.fontVariantLigatures="none");var a=e.parent.fontWeight(),s=e.parent.css("fontSize"),l=e.parent.css("fontFamily"),u=e.parent.parseTextShadows();this.renderer.font(e.parent.color("color"),e.parent.css("fontStyle"),e.parent.css("fontVariant"),a,s,l),u.length?this.renderer.fontShadow(u[0].color,u[0].offsetX,u[0].offsetY,u[0].blur):this.renderer.clearShadow(),this.renderer.clip(e.parent.clip,(function(){o.map(this.parseTextBounds(e),this).forEach((function(t,i){t&&(this.renderer.text(o[i],t.left,t.bottom),this.renderTextDecoration(e.parent,t,this.fontMetrics.getMetrics(l,s)))}),this)}),this,e.parent)},m.prototype.renderTextDecoration=function(e,t,i){switch(e.css("textDecoration").split(" ")[0]){case"underline":this.renderer.rectangle(t.left,Math.round(t.top+i.baseline+i.lineWidth),t.width,1,e.color("color"));break;case"overline":this.renderer.rectangle(t.left,Math.round(t.top),t.width,1,e.color("color"));break;case"line-through":this.renderer.rectangle(t.left,Math.ceil(t.top+i.middle+i.lineWidth),t.width,1,e.color("color"))}};var y={inset:[["darken",.6],["darken",.1],["darken",.1],["darken",.6]]};function v(e,t,i,n){var r={top:t.top+e[0].width/2,right:t.right-e[1].width/2,bottom:t.bottom-e[2].width/2,left:t.left+e[3].width/2};return e.map((function(o,a){if(o.width>0){var s=t.left,l=t.top,u=t.width,c=t.height-e[2].width;switch(a){case 0:c=e[0].width,o.args=w({c1:[s,l],c2:[s+u,l],c3:[s+u-e[1].width,l+c],c4:[s+e[3].width,l+c]},n[0],n[1],i.topLeftOuter,i.topLeftInner,i.topRightOuter,i.topRightInner),o.pathArgs=C({c1:[r.left,r.top],c2:[r.right,r.top]},n[0],n[1],i.topLeft,i.topRight);break;case 1:s=t.left+t.width-e[1].width,u=e[1].width,o.args=w({c1:[s+u,l],c2:[s+u,l+c+e[2].width],c3:[s,l+c],c4:[s,l+e[0].width]},n[1],n[2],i.topRightOuter,i.topRightInner,i.bottomRightOuter,i.bottomRightInner),o.pathArgs=C({c1:[r.right,r.top],c2:[r.right,r.bottom]},n[1],n[2],i.topRight,i.bottomRight);break;case 2:l=l+t.height-e[2].width,c=e[2].width,o.args=w({c1:[s+u,l+c],c2:[s,l+c],c3:[s+e[3].width,l],c4:[s+u-e[3].width,l]},n[2],n[3],i.bottomRightOuter,i.bottomRightInner,i.bottomLeftOuter,i.bottomLeftInner),o.pathArgs=C({c1:[r.right,r.bottom],c2:[r.left,r.bottom]},n[2],n[3],i.bottomRight,i.bottomLeft);break;case 3:u=e[3].width,o.args=w({c1:[s,l+c+e[2].width],c2:[s,l],c3:[s+u,l+e[0].width],c4:[s+u,l+c]},n[3],n[0],i.bottomLeftOuter,i.bottomLeftInner,i.topLeftOuter,i.topLeftInner),o.pathArgs=C({c1:[r.left,r.bottom],c2:[r.left,r.top]},n[3],n[0],i.bottomLeft,i.topLeft)}}return o}))}function x(e,t,i,n){var r=(Math.sqrt(2)-1)/3*4,o=i*r,a=n*r,s=e+i,l=t+n;return{topLeft:S({x:e,y:l},{x:e,y:l-a},{x:s-o,y:t},{x:s,y:t}),topRight:S({x:e,y:t},{x:e+o,y:t},{x:s,y:l-a},{x:s,y:l}),bottomRight:S({x:s,y:t},{x:s,y:t+a},{x:e+o,y:l},{x:e,y:l}),bottomLeft:S({x:s,y:l},{x:s-o,y:l},{x:e,y:t+a},{x:e,y:t})}}function b(e,t,i){var n=e.left,r=e.top,o=e.width,a=e.height,s=t[0][0]<o/2?t[0][0]:o/2,l=t[0][1]<a/2?t[0][1]:a/2,u=t[1][0]<o/2?t[1][0]:o/2,c=t[1][1]<a/2?t[1][1]:a/2,h=t[2][0]<o/2?t[2][0]:o/2,d=t[2][1]<a/2?t[2][1]:a/2,f=t[3][0]<o/2?t[3][0]:o/2,p=t[3][1]<a/2?t[3][1]:a/2,_=o-u,m=a-d,$=o-h,g=a-p;return{topLeft:x(n+i[3].width/2,r+i[0].width/2,Math.max(0,s-i[3].width/2),Math.max(0,l-i[0].width/2)).topLeft.subdivide(.5),topRight:x(n+Math.min(_,o+i[3].width/2),r+i[0].width/2,_>o+i[3].width/2?0:u-i[3].width/2,c-i[0].width/2).topRight.subdivide(.5),bottomRight:x(n+Math.min($,o-i[3].width/2),r+Math.min(m,a+i[0].width/2),Math.max(0,h-i[1].width/2),d-i[2].width/2).bottomRight.subdivide(.5),bottomLeft:x(n+i[3].width/2,r+g,Math.max(0,f-i[3].width/2),p-i[2].width/2).bottomLeft.subdivide(.5),topLeftOuter:x(n,r,s,l).topLeft.subdivide(.5),topLeftInner:x(n+i[3].width,r+i[0].width,Math.max(0,s-i[3].width),Math.max(0,l-i[0].width)).topLeft.subdivide(.5),topRightOuter:x(n+_,r,u,c).topRight.subdivide(.5),topRightInner:x(n+Math.min(_,o+i[3].width),r+i[0].width,_>o+i[3].width?0:u-i[3].width,c-i[0].width).topRight.subdivide(.5),bottomRightOuter:x(n+$,r+m,h,d).bottomRight.subdivide(.5),bottomRightInner:x(n+Math.min($,o-i[3].width),r+Math.min(m,a+i[0].width),Math.max(0,h-i[1].width),d-i[2].width).bottomRight.subdivide(.5),bottomLeftOuter:x(n,r+g,f,p).bottomLeft.subdivide(.5),bottomLeftInner:x(n+i[3].width,r+g,Math.max(0,f-i[3].width),p-i[2].width).bottomLeft.subdivide(.5)}}function S(e,t,i,n){var r=function(e,t,i){return{x:e.x+(t.x-e.x)*i,y:e.y+(t.y-e.y)*i}};return{start:e,startControl:t,endControl:i,end:n,subdivide:function(o){var a=r(e,t,o),s=r(t,i,o),l=r(i,n,o),u=r(a,s,o),c=r(s,l,o),h=r(u,c,o);return[S(e,a,u,h),S(h,c,l,n)]},curveTo:function(e){e.push(["bezierCurve",t.x,t.y,i.x,i.y,n.x,n.y])},curveToReversed:function(n){n.push(["bezierCurve",i.x,i.y,t.x,t.y,e.x,e.y])}}}function w(e,t,i,n,r,o,a){var s=[];return t[0]>0||t[1]>0?(s.push(["line",n[1].start.x,n[1].start.y]),n[1].curveTo(s)):s.push(["line",e.c1[0],e.c1[1]]),i[0]>0||i[1]>0?(s.push(["line",o[0].start.x,o[0].start.y]),o[0].curveTo(s),s.push(["line",a[0].end.x,a[0].end.y]),a[0].curveToReversed(s)):(s.push(["line",e.c2[0],e.c2[1]]),s.push(["line",e.c3[0],e.c3[1]])),t[0]>0||t[1]>0?(s.push(["line",r[1].end.x,r[1].end.y]),r[1].curveToReversed(s)):s.push(["line",e.c4[0],e.c4[1]]),s}function C(e,t,i,n,r){var o=[];return t[0]>0||t[1]>0?(o.push(["line",n[1].start.x,n[1].start.y]),n[1].curveTo(o)):o.push(["line",e.c1[0],e.c1[1]]),i[0]>0||i[1]>0?(o.push(["line",r[0].start.x,r[0].start.y]),r[0].curveTo(o)):o.push(["line",e.c2[0],e.c2[1]]),o}function T(e,t,i,n,r,o,a){t[0]>0||t[1]>0?(e.push(["line",n[0].start.x,n[0].start.y]),n[0].curveTo(e),n[1].curveTo(e)):e.push(["line",o,a]),(i[0]>0||i[1]>0)&&e.push(["line",r[0].start.x,r[0].start.y])}function P(e){return e.cssInt("zIndex")<0}function E(e){return e.cssInt("zIndex")>0}function A(e){return 0===e.cssInt("zIndex")}function L(e){return-1!==["inline","inline-block","inline-table"].indexOf(e.css("display"))}function M(e){return e instanceof c}function I(e){return e.node.data.trim().length>0}function O(e){return e.nodeType===Node.TEXT_NODE||e.nodeType===Node.ELEMENT_NODE}function D(e){return"static"!==e.css("position")}function R(e){return"none"!==e.css("float")}function N(e){var t=this;return function(){return!e.apply(t,arguments)}}function F(e){return e.node.nodeType===Node.ELEMENT_NODE}function B(e){return!0===e.isPseudoElement}function z(e){return e.node.nodeType===Node.TEXT_NODE}function G(e){return parseInt(e,10)}function k(e){return e.width}function U(e){return e.node.nodeType!==Node.ELEMENT_NODE||-1===["SCRIPT","HEAD","TITLE","OBJECT","BR","OPTION"].indexOf(e.node.nodeName)}function V(e){return[].concat.apply([],e)}function W(e){return-1!==[32,13,10,9,45].indexOf(e)}m.prototype.parseBorders=function(e){var t,i=e.parseBounds(),n=(t=e,["TopLeft","TopRight","BottomRight","BottomLeft"].map((function(e){var i=t.css("border"+e+"Radius").split(" ");return i.length<=1&&(i[1]=i[0]),i.map(G)}))),r=["Top","Right","Bottom","Left"].map((function(t,i){var n=e.css("border"+t+"Style"),r=e.color("border"+t+"Color");"inset"===n&&r.isBlack()&&(r=new u([255,255,255,r.a]));var o=y[n]?y[n][i]:null;return{width:e.cssInt("border"+t+"Width"),color:o?r[o[0]](o[1]):r,style:n,pathArgs:null,args:null}})),o=b(i,n,r);return{clip:this.parseBackgroundClip(e,o,r,n,i),borders:v(r,i,o,n)}},m.prototype.parseBackgroundClip=function(e,t,i,n,r){var o=[];switch(e.css("backgroundClip")){case"content-box":case"padding-box":T(o,n[0],n[1],t.topLeftInner,t.topRightInner,r.left+i[3].width,r.top+i[0].width),T(o,n[1],n[2],t.topRightInner,t.bottomRightInner,r.left+r.width-i[1].width,r.top+i[0].width),T(o,n[2],n[3],t.bottomRightInner,t.bottomLeftInner,r.left+r.width-i[1].width,r.top+r.height-i[2].width),T(o,n[3],n[0],t.bottomLeftInner,t.topLeftInner,r.left+i[3].width,r.top+r.height-i[2].width);break;default:T(o,n[0],n[1],t.topLeftOuter,t.topRightOuter,r.left,r.top),T(o,n[1],n[2],t.topRightOuter,t.bottomRightOuter,r.left+r.width,r.top),T(o,n[2],n[3],t.bottomRightOuter,t.bottomLeftOuter,r.left+r.width,r.top+r.height),T(o,n[3],n[0],t.bottomLeftOuter,t.topLeftOuter,r.left,r.top+r.height)}return o},t.exports=m},{"./color":3,"./fontmetrics":7,"./log":13,"./nodecontainer":14,"./pseudoelementcontainer":18,"./stackingcontext":21,"./textcontainer":25,"./utils":26,punycode:1}],16:[function(e,t,i){var n=e("./xhr"),r=e("./utils"),o=e("./log"),a=e("./clone"),s=r.decode64;function l(e,t,i){var r="withCredentials"in new XMLHttpRequest;if(!t)return Promise.reject("No proxy configured");var o=h(r),a=d(t,e,o);return r?n(a):c(i,a,o).then((function(e){return s(e.content)}))}var u=0;function c(e,t,i){return new Promise((function(n,r){var o=e.createElement("script"),a=function(){delete window.html2canvas.proxy[i],e.body.removeChild(o)};window.html2canvas.proxy[i]=function(e){a(),n(e)},o.src=t,o.onerror=function(e){a(),r(e)},e.body.appendChild(o)}))}function h(e){return e?"":"html2canvas_"+Date.now()+"_"+ ++u+"_"+Math.round(1e5*Math.random())}function d(e,t,i){return e+"?url="+encodeURIComponent(t)+(i.length?"&callback=html2canvas.proxy."+i:"")}i.Proxy=l,i.ProxyURL=function(e,t,i){var n="crossOrigin"in new Image,r=h(n),o=d(t,e,r);return n?Promise.resolve(o):c(i,o,r).then((function(e){return"data:"+e.type+";base64,"+e.content}))},i.loadUrlDocument=function(e,t,i,n,r,s){return new l(e,t,window.document).then((u=e,function(e){var t,i=new DOMParser;try{t=i.parseFromString(e,"text/html")}catch{o("DOMParser not supported, falling back to createHTMLDocument"),t=document.implementation.createHTMLDocument("");try{t.open(),t.write(e),t.close()}catch{o("createHTMLDocument write not supported, falling back to document.body.innerHTML"),t.body.innerHTML=e}}var n=t.querySelector("base");if(!n||!n.href.host){var r=t.createElement("base");r.href=u,t.head.insertBefore(r,t.head.firstChild)}return t})).then((function(e){return a(e,i,n,r,s,0,0)}));var u}},{"./clone":2,"./log":13,"./utils":26,"./xhr":28}],17:[function(e,t,i){var n=e("./proxy").ProxyURL;t.exports=function(e,t){var i=document.createElement("a");i.href=e,e=i.href,this.src=e,this.image=new Image;var r=this;this.promise=new Promise((function(i,o){r.image.crossOrigin="Anonymous",r.image.onload=i,r.image.onerror=o,new n(e,t,document).then((function(e){r.image.src=e})).catch(o)}))}},{"./proxy":16}],18:[function(e,t,i){var n=e("./nodecontainer");function r(e,t,i){n.call(this,e,t),this.isPseudoElement=!0,this.before=":before"===i}r.prototype.cloneTo=function(e){r.prototype.cloneTo.call(this,e),e.isPseudoElement=!0,e.before=this.before},r.prototype=Object.create(n.prototype),r.prototype.appendToDOM=function(){this.before?this.parent.node.insertBefore(this.node,this.parent.node.firstChild):this.parent.node.appendChild(this.node),this.parent.node.className+=" "+this.getHideClass()},r.prototype.cleanDOM=function(){this.node.parentNode.removeChild(this.node),this.parent.node.className=this.parent.node.className.replace(this.getHideClass(),"")},r.prototype.getHideClass=function(){return this["PSEUDO_HIDE_ELEMENT_CLASS_"+(this.before?"BEFORE":"AFTER")]},r.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE="___html2canvas___pseudoelement_before",r.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER="___html2canvas___pseudoelement_after",t.exports=r},{"./nodecontainer":14}],19:[function(e,t,i){var n=e("./log");function r(e,t,i,n,r){this.width=e,this.height=t,this.images=i,this.options=n,this.document=r}r.prototype.renderImage=function(e,t,i,n){var r=e.cssInt("paddingLeft"),o=e.cssInt("paddingTop"),a=e.cssInt("paddingRight"),s=e.cssInt("paddingBottom"),l=i.borders,u=t.width-(l[1].width+l[3].width+r+a),c=t.height-(l[0].width+l[2].width+o+s);this.drawImage(n,0,0,n.image.width||u,n.image.height||c,t.left+r+l[3].width,t.top+o+l[0].width,u,c)},r.prototype.renderBackground=function(e,t,i){t.height>0&&t.width>0&&(this.renderBackgroundColor(e,t),this.renderBackgroundImage(e,t,i))},r.prototype.renderBackgroundColor=function(e,t){var i=e.color("backgroundColor");i.isTransparent()||this.rectangle(t.left,t.top,t.width,t.height,i)},r.prototype.renderShadows=function(e,t){var i=e.css("boxShadow");if("none"!==i){var n=i.split(/,(?![^(]*\))/);this.shadow(t,n)}},r.prototype.renderBorders=function(e){e.forEach(this.renderBorder,this)},r.prototype.renderBorder=function(e){if(!e.color.isTransparent()&&null!==e.args)if("dashed"===e.style||"dotted"===e.style){var t="dashed"===e.style?3:e.width;this.ctx.setLineDash([t]),this.path(e.pathArgs),this.ctx.strokeStyle=e.color,this.ctx.lineWidth=e.width,this.ctx.stroke()}else this.drawShape(e.args,e.color)},r.prototype.renderBackgroundImage=function(e,t,i){e.parseBackgroundImages().reverse().forEach((function(r,o,a){switch(r.method){case"url":var s=this.images.get(r.args[0]);s?this.renderBackgroundRepeating(e,t,s,a.length-(o+1),i):n("Error loading background-image",r.args[0]);break;case"linear-gradient":case"gradient":var l=this.images.get(r.value);l?this.renderBackgroundGradient(l,t,i):n("Error loading background-image",r.args[0]);break;case"none":break;default:n("Unknown background-image type",r.args[0])}}),this)},r.prototype.renderBackgroundRepeating=function(e,t,i,n,r){var o=e.parseBackgroundSize(t,i.image,n),a=e.parseBackgroundPosition(t,i.image,n,o);switch(e.parseBackgroundRepeat(n)){case"repeat-x":case"repeat no-repeat":this.backgroundRepeatShape(i,a,o,t,t.left+r[3],t.top+a.top+r[0],99999,o.height,r);break;case"repeat-y":case"no-repeat repeat":this.backgroundRepeatShape(i,a,o,t,t.left+a.left+r[3],t.top+r[0],o.width,99999,r);break;case"no-repeat":this.backgroundRepeatShape(i,a,o,t,t.left+a.left+r[3],t.top+a.top+r[0],o.width,o.height,r);break;default:this.renderBackgroundRepeat(i,a,o,{top:t.top,left:t.left},r[3],r[0])}},t.exports=r},{"./log":13}],20:[function(e,t,i){var n=e("../renderer"),r=e("../lineargradientcontainer"),o=e("../log");function a(e,t){n.apply(this,arguments),this.canvas=this.options.canvas||this.document.createElement("canvas"),this.ctx=this.canvas.getContext("2d"),this.options.canvas||(this.options.dpi&&(this.options.scale=this.options.dpi/96),this.options.scale?(this.canvas.style.width=e+"px",this.canvas.style.height=t+"px",this.canvas.width=Math.floor(e*this.options.scale),this.canvas.height=Math.floor(t*this.options.scale),this.ctx.scale(this.options.scale,this.options.scale)):(this.canvas.width=e,this.canvas.height=t)),this.taintCtx=this.document.createElement("canvas").getContext("2d"),this.ctx.textBaseline="bottom",this.variables={},o("Initialized CanvasRenderer with size",e,"x",t)}function s(e){return e.length>0}a.prototype=Object.create(n.prototype),a.prototype.setFillStyle=function(e){return this.ctx.fillStyle="object"==typeof e&&e.isColor?e.toString():e,this.ctx},a.prototype.rectangle=function(e,t,i,n,r){this.setFillStyle(r).fillRect(e,t,i,n)},a.prototype.circle=function(e,t,i,n){this.setFillStyle(n),this.ctx.beginPath(),this.ctx.arc(e+i/2,t+i/2,i/2,0,2*Math.PI,!0),this.ctx.closePath(),this.ctx.fill()},a.prototype.circleStroke=function(e,t,i,n,r,o){this.circle(e,t,i,n),this.ctx.strokeStyle=o.toString(),this.ctx.stroke()},a.prototype.shadow=function(e,t){var i=this.setFillStyle("white");i.save(),this.shape(e),t.forEach((function(e){var t=function(e){var t={color:/^(#|rgb|hsl|(?!(inset|initial|inherit))\D+)/i,inset:/^inset/i,px:/px$/i},i=["x","y","blur","spread"],n=e.split(/ (?![^(]*\))/),r={};for(var o in t)r[o]=n.filter(t[o].test.bind(t[o])),r[o]=0===r[o].length?null:1===r[o].length?r[o][0]:r[o];for(var a=0;a<r.px.length;a++)r[i[a]]=parseInt(r.px[a]);return r}(e);t.inset||(i.shadowOffsetX=t.x,i.shadowOffsetY=t.y,i.shadowColor=t.color,i.shadowBlur=t.blur,i.fill())}),this),i.restore()},a.prototype.drawShape=function(e,t){this.shape(e),this.setFillStyle(t).fill()},a.prototype.taints=function(e){if(null===e.tainted){this.taintCtx.drawImage(e.image,0,0);try{this.taintCtx.getImageData(0,0,1,1),e.tainted=!1}catch{this.taintCtx=document.createElement("canvas").getContext("2d"),e.tainted=!0}}return e.tainted},a.prototype.drawImage=function(e,t,i,n,r,o,a,s,l){(!this.taints(e)||this.options.allowTaint)&&this.ctx.drawImage(e.image,t,i,n,r,o,a,s,l)},a.prototype.clip=function(e,t,i,n){this.ctx.save(),n&&n.hasTransform()?(this.setTransform(n.inverseTransform()),e.filter(s).forEach((function(e){this.shape(e).clip()}),this),this.setTransform(n.parseTransform())):e.filter(s).forEach((function(e){this.shape(e).clip()}),this),t.call(i),this.ctx.restore()},a.prototype.mask=function(e,t,i,n){var r=e[e.length-1];if(r&&r.length){var o=[["rect",this.canvas.width,0,-this.canvas.width,this.canvas.height]].concat(r).concat([r[0]]);e=e.slice(0,-1).concat([o])}this.clip(e,t,i,n)},a.prototype.shape=function(e){return this.ctx.beginPath(),e.forEach((function(e,t){"rect"===e[0]?this.ctx.rect.apply(this.ctx,e.slice(1)):this.ctx[0===t?"moveTo":e[0]+"To"].apply(this.ctx,e.slice(1))}),this),this.ctx.closePath(),this.ctx},a.prototype.path=function(e){return this.ctx.beginPath(),e.forEach((function(e,t){"rect"===e[0]?this.ctx.rect.apply(this.ctx,e.slice(1)):this.ctx[0===t?"moveTo":e[0]+"To"].apply(this.ctx,e.slice(1))}),this),this.ctx},a.prototype.font=function(e,t,i,n,r,o){i=/^(normal|small-caps)$/i.test(i)?i:"",this.setFillStyle(e).font=[t,i,n,r,o].join(" ").split(",")[0]},a.prototype.fontShadow=function(e,t,i,n){this.setVariable("shadowColor",e.toString()).setVariable("shadowOffsetY",t).setVariable("shadowOffsetX",i).setVariable("shadowBlur",n)},a.prototype.clearShadow=function(){this.setVariable("shadowColor","rgba(0,0,0,0)")},a.prototype.setOpacity=function(e){this.ctx.globalAlpha=e},a.prototype.setTransform=function(e){this.ctx.translate(e.origin[0],e.origin[1]),this.ctx.transform.apply(this.ctx,e.matrix),this.ctx.translate(-e.origin[0],-e.origin[1])},a.prototype.setVariable=function(e,t){return this.variables[e]!==t&&(this.variables[e]=this.ctx[e]=t),this},a.prototype.text=function(e,t,i){this.ctx.fillText(e,t,i)},a.prototype.backgroundRepeatShape=function(e,t,i,n,r,o,a,s,l){var u=[["line",Math.round(r),Math.round(o)],["line",Math.round(r+a),Math.round(o)],["line",Math.round(r+a),Math.round(s+o)],["line",Math.round(r),Math.round(s+o)]];this.clip([u],(function(){this.renderBackgroundRepeat(e,t,i,n,l[3],l[0])}),this)},a.prototype.renderBackgroundRepeat=function(e,t,i,n,r,o){var a=Math.round(n.left+t.left+r),s=Math.round(n.top+t.top+o);this.setFillStyle(this.ctx.createPattern(this.resizeImage(e,i),"repeat")),this.ctx.translate(a,s),this.ctx.fill(),this.ctx.translate(-a,-s)},a.prototype.renderBackgroundGradient=function(e,t){if(e instanceof r){var i=this.ctx.createLinearGradient(t.left+t.width*e.x0,t.top+t.height*e.y0,t.left+t.width*e.x1,t.top+t.height*e.y1);e.colorStops.forEach((function(e){i.addColorStop(e.stop,e.color.toString())})),this.rectangle(t.left,t.top,t.width,t.height,i)}},a.prototype.resizeImage=function(e,t){var i=e.image;if(i.width===t.width&&i.height===t.height)return i;var n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").drawImage(i,0,0,i.width,i.height,0,0,t.width,t.height),n},t.exports=a},{"../lineargradientcontainer":12,"../log":13,"../renderer":19}],21:[function(e,t,i){var n=e("./nodecontainer");function r(e,t,i,r){n.call(this,i,r),this.ownStacking=e,this.contexts=[],this.children=[],this.opacity=(this.parent?this.parent.stack.opacity:1)*t}r.prototype=Object.create(n.prototype),r.prototype.getParentStack=function(e){var t=this.parent?this.parent.stack:null;return t?t.ownStacking?t:t.getParentStack(e):e.stack},t.exports=r},{"./nodecontainer":14}],22:[function(e,t,i){function n(e){this.rangeBounds=this.testRangeBounds(e),this.cors=this.testCORS(),this.svg=this.testSVG()}n.prototype.testRangeBounds=function(e){var t,i,n=!1;return e.createRange&&((t=e.createRange()).getBoundingClientRect&&((i=e.createElement("boundtest")).style.height="123px",i.style.display="block",e.body.appendChild(i),t.selectNode(i),123===t.getBoundingClientRect().height&&(n=!0),e.body.removeChild(i))),n},n.prototype.testCORS=function(){return typeof(new Image).crossOrigin<"u"},n.prototype.testSVG=function(){var e=new Image,t=document.createElement("canvas"),i=t.getContext("2d");e.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{i.drawImage(e,0,0),t.toDataURL()}catch{return!1}return!0},t.exports=n},{}],23:[function(e,t,i){var n=e("./xhr"),r=e("./utils").decode64;function o(e){this.src=e,this.image=null;var t=this;this.promise=this.hasFabric().then((function(){return t.isInline(e)?Promise.resolve(t.inlineFormatting(e)):n(e)})).then((function(e){return new Promise((function(i){window.html2canvas.svg.fabric.loadSVGFromString(e,t.createCanvas.call(t,i))}))}))}o.prototype.hasFabric=function(){return window.html2canvas.svg&&window.html2canvas.svg.fabric?Promise.resolve():Promise.reject(new Error("html2canvas.svg.js is not loaded, cannot render svg"))},o.prototype.inlineFormatting=function(e){return/^data:image\/svg\+xml;base64,/.test(e)?this.decode64(this.removeContentType(e)):this.removeContentType(e)},o.prototype.removeContentType=function(e){return e.replace(/^data:image\/svg\+xml(;base64)?,/,"")},o.prototype.isInline=function(e){return/^data:image\/svg\+xml/i.test(e)},o.prototype.createCanvas=function(e){var t=this;return function(i,n){var r=new window.html2canvas.svg.fabric.StaticCanvas("c");t.image=r.lowerCanvasEl,r.setWidth(n.width).setHeight(n.height).add(window.html2canvas.svg.fabric.util.groupSVGElements(i,n)).renderAll(),e(r.lowerCanvasEl)}},o.prototype.decode64=function(e){return"function"==typeof window.atob?window.atob(e):r(e)},t.exports=o},{"./utils":26,"./xhr":28}],24:[function(e,t,i){var n=e("./svgcontainer");function r(e,t){this.src=e,this.image=null;var i=this;this.promise=t?new Promise((function(t,n){i.image=new Image,i.image.onload=t,i.image.onerror=n,i.image.src="data:image/svg+xml,"+(new XMLSerializer).serializeToString(e),!0===i.image.complete&&t(i.image)})):this.hasFabric().then((function(){return new Promise((function(t){window.html2canvas.svg.fabric.parseSVGDocument(e,i.createCanvas.call(i,t))}))}))}r.prototype=Object.create(n.prototype),t.exports=r},{"./svgcontainer":23}],25:[function(e,t,i){var n=e("./nodecontainer");function r(e,t){n.call(this,e,t)}function o(e,t,i){if(e.length>0)return t+i.toUpperCase()}r.prototype=Object.create(n.prototype),r.prototype.applyTextTransform=function(){this.node.data=this.transform(this.parent.css("textTransform"))},r.prototype.transform=function(e){var t=this.node.data;switch(e){case"lowercase":return t.toLowerCase();case"capitalize":return t.replace(/(^|\s|:|-|\(|\))([a-z])/g,o);case"uppercase":return t.toUpperCase();default:return t}},t.exports=r},{"./nodecontainer":14}],26:[function(e,t,i){i.smallImage=function(){return"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},i.bind=function(e,t){return function(){return e.apply(t,arguments)}},i.decode64=function(e){var t,i,n,r,o,a,s,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=e.length,c="";for(t=0;t<u;t+=4)o=l.indexOf(e[t])<<2|(i=l.indexOf(e[t+1]))>>4,a=(15&i)<<4|(n=l.indexOf(e[t+2]))>>2,s=(3&n)<<6|(r=l.indexOf(e[t+3])),c+=64===n?String.fromCharCode(o):64===r||-1===r?String.fromCharCode(o,a):String.fromCharCode(o,a,s);return c},i.getBounds=function(e){if(e.getBoundingClientRect){var t=e.getBoundingClientRect(),i=null==e.offsetWidth?t.width:e.offsetWidth;return{top:t.top,bottom:t.bottom||t.top+t.height,right:t.left+i,left:t.left,width:i,height:null==e.offsetHeight?t.height:e.offsetHeight}}return{}},i.offsetBounds=function(e){var t=e.offsetParent?i.offsetBounds(e.offsetParent):{top:0,left:0};return{top:e.offsetTop+t.top,bottom:e.offsetTop+e.offsetHeight+t.top,right:e.offsetLeft+t.left+e.offsetWidth,left:e.offsetLeft+t.left,width:e.offsetWidth,height:e.offsetHeight}},i.parseBackgrounds=function(e){var t,i,n,r,o,a,s,l=[],u=0,c=0,h=function(){t&&('"'===i.substr(0,1)&&(i=i.substr(1,i.length-2)),i&&s.push(i),"-"===t.substr(0,1)&&(r=t.indexOf("-",1)+1)>0&&(n=t.substr(0,r),t=t.substr(r)),l.push({prefix:n,method:t.toLowerCase(),value:o,args:s,image:null})),s=[],t=n=i=o=""};return s=[],t=n=i=o="",e.split("").forEach((function(e){if(!(0===u&&" \r\n\t".indexOf(e)>-1)){switch(e){case'"':a?a===e&&(a=null):a=e;break;case"(":if(a)break;if(0===u)return u=1,void(o+=e);c++;break;case")":if(a)break;if(1===u){if(0===c)return u=0,o+=e,void h();c--}break;case",":if(a)break;if(0===u)return void h();if(1===u&&0===c&&!t.match(/^url$/i))return s.push(i),i="",void(o+=e)}o+=e,0===u?t+=e:i+=e}})),h(),l}},{}],27:[function(e,t,i){var n=e("./gradientcontainer");function r(e){n.apply(this,arguments),this.type="linear"===e.args[0]?n.TYPES.LINEAR:n.TYPES.RADIAL}r.prototype=Object.create(n.prototype),t.exports=r},{"./gradientcontainer":9}],28:[function(e,t,i){t.exports=function(e){return new Promise((function(t,i){var n=new XMLHttpRequest;n.open("GET",e),n.onload=function(){200===n.status?t(n.responseText):i(new Error(n.statusText))},n.onerror=function(){i(new Error("Network Error"))},n.send()}))}},{}]},{},[4])(4)}));var _0x4994c3=html2canvas,_0x4dcef2=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x23c792=_0x4dcef2(void 0,(function(){return _0x23c792.toString().search("(((.+)+)+)+$").toString().constructor(_0x23c792).search("(((.+)+)+)+$")}));_0x23c792();var _0x5c10c7=Object.freeze({simple:0,detail:1,notitle:2,element:3});const _0x2fa8c4={popup:{color:"#ffffff",font:"宋体",backgroundcolor:"#ff3f00",opacity:"0.3",borderwidth:"0.1px",bordertype:"solid",bordercolor:"#ff3f00"}},_0x8f337a={popup:{borderwidth:"0.1px",bordertype:"solid",bordercolor:"rgb(255, 255, 255)"},popupcontentwrapper:{backgroundcolor:"rgb(48, 123, 250)",opacity:"0.6"},popupcontent:{color:"rgb(255, 255, 255)",lineheight:"1",font:"宋体"},popupcontent_div:{lineheight:"1",textalign:"center",backgroundcolor:"#8585bf",opacity:"1"},popupcontent_table:{marginleft:"1px",marginright:"3px"},popupcontent_table_tr:{height:"15px"}},_0x19c3c5={popup:{borderwidth:"0.1px",bordertype:"solid",bordercolor:"rgb(255, 255, 255)"},popupcontentwrapper:{backgroundcolor:"rgb(48, 123, 250)",opacity:"0.6"},popupcontent:{color:"rgb(255, 255, 255)",lineheight:"1",font:"宋体"},popupcontent_table:{marginleft:"1px",marginright:"3px"},popupcontent_table_tr:{height:"15px"}};var _0x5c1d0c={StyleEnum:_0x5c10c7,SimpleStyle:_0x2fa8c4,DetailStyle:_0x8f337a,NotitleStyle:_0x19c3c5};const _0x5a6707=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x121a0a=_0x5a6707(void 0,(function(){return _0x121a0a.toString().search("(((.+)+)+)+$").toString().constructor(_0x121a0a).search("(((.+)+)+)+$")}));_0x121a0a();class _0x1d1ce6{constructor(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.rotateX=WebGLPlot.defaultValue(e.rotateX,0),this.rotateY=WebGLPlot.defaultValue(e.rotateY,0),this.rotateZ=WebGLPlot.defaultValue(e.rotateZ,0),this.offsetX=WebGLPlot.defaultValue(e.offsetX,0),this.offsetY=WebGLPlot.defaultValue(e.offsetY,0),this.offsetZ=WebGLPlot.defaultValue(e.offsetZ,0),this._simpleStyle=null,this._detailStyle=null,this._notitleStyle=null,this._offsetX=0,this._offsetY=-80,this.style=WebGLPlot.defaultValue(e.style,_0x5c1d0c.StyleEnum.simple)}setBorderColor(e){let t=this._getStyle();t&&(t.popup.bordercolor=e),_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}getBorderColor(){let e=this._getStyle();if(e)return e.popup.bordercolor}setBackGroundColor(e){let t=this._getStyle();this.style===_0x5c1d0c.StyleEnum.detail?t.popupcontent_div.backgroundcolor=e:this.style===_0x5c1d0c.StyleEnum.notitle?t.popupcontentwrapper.backgroundcolor=e:this.style===_0x5c1d0c.StyleEnum.simple&&(t.popup.backgroundcolor=e),_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}getBackGroundColor(){let e,t=this._getStyle();return this.style===_0x5c1d0c.StyleEnum.detail?e=t.popupcontent_div.backgroundcolor:this.style===_0x5c1d0c.StyleEnum.notitle?e=t.popupcontentwrapper.backgroundcolor:this.style===_0x5c1d0c.StyleEnum.simple&&(e=t.popup.backgroundcolor),e}setOpacity(e){let t=this._getStyle();this.style===_0x5c1d0c.StyleEnum.detail?t.popupcontent_div.opacity=e:this.style===_0x5c1d0c.StyleEnum.notitle?t.popupcontentwrapper.opacity=e:this.style===_0x5c1d0c.StyleEnum.simple&&(t.popup.opacity=e),_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}getOpacity(){let e,t=this._getStyle();return this.style===_0x5c1d0c.StyleEnum.detail?e=t.popupcontent_div.opacity:this.style===_0x5c1d0c.StyleEnum.notitle?e=t.popupcontentwrapper.opacity:this.style===_0x5c1d0c.StyleEnum.simple&&(e=t.popup.opacity),e}setTitle(e){this.style===_0x5c1d0c.StyleEnum.detail&&(this.title=e),_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}getTitle(){if(this.style===_0x5c1d0c.StyleEnum.detail)return this.title}setContent(e){this.content=e,_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}getContent(){let e;return this.style!==_0x5c1d0c.StyleEnum.element&&(e=this.content),e}setSize(e){this._scale=e,_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}getSize(){return this._scale}setFontColor(e){let t=this._getStyle();this.style===_0x5c1d0c.StyleEnum.detail||this.style===_0x5c1d0c.StyleEnum.notitle?t.popupcontent.color=e:this.style===_0x5c1d0c.StyleEnum.simple&&(t.popup.color=e),_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}getFontColor(){let e,t=this._getStyle();return this.style===_0x5c1d0c.StyleEnum.detail||this.style===_0x5c1d0c.StyleEnum.notitle?e=t.popupcontent.color:this.style===_0x5c1d0c.StyleEnum.simple&&(e=t.popup.color),e}setFont(e){let t=this._getStyle();this.style===_0x5c1d0c.StyleEnum.detail||this.style===_0x5c1d0c.StyleEnum.notitle?t.popupcontent.font=e:this.style===_0x5c1d0c.StyleEnum.simple&&(t.popup.font=e),_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}getFont(){let e,t=this._getStyle();return this.style===_0x5c1d0c.StyleEnum.detail||this.style===_0x5c1d0c.StyleEnum.notitle?e=t.popupcontent.font:this.style===_0x5c1d0c.StyleEnum.simple&&(e=t.popup.font),e}setElement(e){this.style===_0x5c1d0c.StyleEnum.element&&(this.content=$(e).get(0)),_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}getElement(){if(this.style===_0x5c1d0c.StyleEnum.element)return this.content}setOffSetX(e){this._offsetX=e,_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}setOffSetY(e){this._offsetY=e,_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}getOffSetX(){return this._offsetX}getOffSetY(){return this._offsetY}_getStyle(){let e;return this.style===_0x5c1d0c.StyleEnum.detail?e=null!==this._detailStyle?this._detailStyle:_0x5c1d0c.DetailStyle:this.style===_0x5c1d0c.StyleEnum.notitle?e=null!==this._notitleStyle?this._notitleStyle:_0x5c1d0c.NotitleStyle:this.style===_0x5c1d0c.StyleEnum.simple&&(e=null!==this._simpleStyle?this._simpleStyle:_0x5c1d0c.SimpleStyle),e}_getCssStyle(e){let t=null,i=null;return e===_0x5c1d0c.StyleEnum.detail?(null!==this._detailStyle?t=this._detailStyle:(t=_0x5c1d0c.DetailStyle,this._detailStyle=t),i=".popup {z-index:-1;position:absolute;text-align:center;border:"+t.popup.borderwidth+" "+t.popup.bordertype+" "+t.popup.bordercolor+";}.popupcontentwrapper {background-color:"+t.popupcontentwrapper.backgroundcolor+";opacity:"+t.popupcontentwrapper.opacity+";}.popupcontent {color:"+t.popupcontent.color+";line-height:"+t.popupcontent.lineheight+";font-family:"+t.popupcontent.font+";}.popupcontent div {font-weight: bold;line-height:"+t.popupcontent_div.lineheight+";text-align:center;background-color:"+t.popupcontent_div.backgroundcolor+";opacity:"+t.popupcontent_div.opacity+";}.popupcontent table {margin-left:"+t.popupcontent_table.marginleft+";margin-right:"+t.popupcontent_table.marginright+";}.popupcontent table tr {height:"+t.popupcontent_table_tr+";}"):e===_0x5c1d0c.StyleEnum.notitle?(null!==this._notitleStyle?t=this._notitleStyle:(t=_0x5c1d0c.NotitleStyle,this._notitleStyle=t),i=".popup {z-index:-1;position:absolute;text-align:center;border:"+t.popup.borderwidth+" "+t.popup.bordertype+" "+t.popup.bordercolor+";}.popupcontentwrapper {background-color:"+t.popupcontentwrapper.backgroundcolor+";opacity:"+t.popupcontentwrapper.opacity+";}.popupcontent {font-weight: bold;color:"+t.popupcontent.color+";line-height:"+t.popupcontent.lineheight+";font-family:"+t.popupcontent.font+";}.popupcontent table {margin-left:"+t.popupcontent_table.marginleft+";margin-right:"+t.popupcontent_table.marginright+";}.popupcontent table tr {height:"+t.popupcontent_table_tr+";}"):e===_0x5c1d0c.StyleEnum.simple&&(null!==this._simpleStyle?t=this._simpleStyle:(t=_0x5c1d0c.SimpleStyle,this._simpleStyle=t),i=".popup {z-index:-1;position:absolute;text-align:center;font-weight: bold;color:"+t.popup.color+";background-color:"+t.popup.backgroundcolor+";opacity:"+t.popup.opacity+";border:"+t.popup.borderwidth+" "+t.popup.bordertype+" "+t.popup.bordercolor+";font-family:"+t.popup.font+";}"),i}}const _0x444ecc=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x4e4424=_0x444ecc(void 0,(function(){return _0x4e4424.toString().search("(((.+)+)+)+$").toString().constructor(_0x4e4424).search("(((.+)+)+)+$")}));_0x4e4424();class _0x149357{constructor(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.rotateX3D=WebGLPlot.defaultValue(e.rotateX,0),this.rotateY3D=WebGLPlot.defaultValue(e.rotateY,0),this.rotateZ3D=WebGLPlot.defaultValue(e.rotateZ,0),this.offsetX3D=WebGLPlot.defaultValue(e.offsetX,0),this.offsetY3D=WebGLPlot.defaultValue(e.offsetY,0),this.offsetZ3D=WebGLPlot.defaultValue(e.offsetZ,0),this.content=WebGLPlot.defaultValue(e.content,""),this.title=WebGLPlot.defaultValue(e.title,""),this.scale=WebGLPlot.defaultValue(e.scale,1),this.style=WebGLPlot.defaultValue(e.style,_0x5c1d0c.StyleEnum.simple),this.simpleStyle=WebGLPlot.defaultValue(e.simpleStyle,null),this.detailStyle=WebGLPlot.defaultValue(e.detailStyle,null),this.notitleStyle=WebGLPlot.defaultValue(e.notitleStyle,null),this.offsetX2D=WebGLPlot.defaultValue(e.offsetX2D,0),this.offsetY2D=WebGLPlot.defaultValue(e.offsetX2D,-100)}setBorderColor(e){let t=this._getStyle();t&&(t.popup.bordercolor=e),_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}getBorderColor(){let e=this._getStyle();if(e)return e.popup.bordercolor}setBackGroundColor(e){let t=this._getStyle();this.style===_0x5c1d0c.StyleEnum.detail?t.popupcontent_div.backgroundcolor=e:this.style===_0x5c1d0c.StyleEnum.notitle?t.popupcontentwrapper.backgroundcolor=e:this.style===_0x5c1d0c.StyleEnum.simple&&(t.popup.backgroundcolor=e),_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}getBackGroundColor(){let e,t=this._getStyle();return this.style===_0x5c1d0c.StyleEnum.detail?e=t.popupcontent_div.backgroundcolor:this.style===_0x5c1d0c.StyleEnum.notitle?e=t.popupcontentwrapper.backgroundcolor:this.style===_0x5c1d0c.StyleEnum.simple&&(e=t.popup.backgroundcolor),e}setOpacity(e){let t=this._getStyle();this.style===_0x5c1d0c.StyleEnum.detail||this.style===_0x5c1d0c.StyleEnum.notitle?t.popupcontentwrapper.opacity=e:this.style===_0x5c1d0c.StyleEnum.simple&&(t.popup.opacity=e),_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}getOpacity(){let e,t=this._getStyle();return this.style===_0x5c1d0c.StyleEnum.detail||this.style===_0x5c1d0c.StyleEnum.notitle?e=t.popupcontentwrapper.opacity:this.style===_0x5c1d0c.StyleEnum.simple&&(e=t.popup.opacity),e}setTitle(e){this.style===_0x5c1d0c.StyleEnum.detail&&(this.title=e),_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}getTitle(){if(this.style===_0x5c1d0c.StyleEnum.detail)return this.title}setContent(e){this.content=e,_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}getContent(){let e;return this.style!==_0x5c1d0c.StyleEnum.element&&(e=this.content),e}setSize(e){this.scale=e,_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}getSize(){return this.scale}setFontColor(e){let t=this._getStyle();this.style===_0x5c1d0c.StyleEnum.detail||this.style===_0x5c1d0c.StyleEnum.notitle?t.popupcontent.color=e:this.style===_0x5c1d0c.StyleEnum.simple&&(t.popup.color=e),_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}getFontColor(){let e,t=this._getStyle();return this.style===_0x5c1d0c.StyleEnum.detail||this.style===_0x5c1d0c.StyleEnum.notitle?e=t.popupcontent.color:this.style===_0x5c1d0c.StyleEnum.simple&&(e=t.popup.color),e}setFont(e){let t=this._getStyle();this.style===_0x5c1d0c.StyleEnum.detail||this.style===_0x5c1d0c.StyleEnum.notitle?t.popupcontent.font=e:this.style===_0x5c1d0c.StyleEnum.simple&&(t.popup.font=e),_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}getFont(){let e,t=this._getStyle();return this.style===_0x5c1d0c.StyleEnum.detail||this.style===_0x5c1d0c.StyleEnum.notitle?e=t.popupcontent.font:this.style===_0x5c1d0c.StyleEnum.simple&&(e=t.popup.font),e}setElement(e){this.style===_0x5c1d0c.StyleEnum.element&&(this.content=$(e).get(0)),_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}getElement(){if(this.style===_0x5c1d0c.StyleEnum.element)return this.content}setOffSetX(e){this.offsetX2D=e,_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}setOffSetY(e){this.offsetY2D=e,_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}setOffSetX3D(e){this.offsetX3D=e,_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}setOffSetY3D(e){this.offsetY3D=e,_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}setOffSetZ3D(e){this.offsetZ3D=e,_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}setRotateX3D(e){this.rotateX3D=e,_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}setRotateY3D(e){this.rotateY3D=e,_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}setRotateZ3D(e){this.rotateZ3D=e,_0x43a805.getInstance().overlayerPropertyChanged.raiseEvent()}getOffSetX(){return this.offsetX2D}getOffSetY(){return this.offsetY2D}getOffSetX3D(){return this.offsetX3D}getOffSetY3D(){return this.offsetY3D}getOffSetZ3D(){return this.offsetZ3D}getRotateX3D(){return this.rotateX3D}getRotateY3D(){return this.rotateY3D}getRotateZ3D(){return this.rotateZ3D}_getStyle(){let e;return this.style===_0x5c1d0c.StyleEnum.detail?e=null!==this.detailStyle?this.detailStyle:_0x5c1d0c.DetailStyle:this.style===_0x5c1d0c.StyleEnum.notitle?e=null!==this.notitleStyle?this.notitleStyle:_0x5c1d0c.NotitleStyle:this.style===_0x5c1d0c.StyleEnum.simple&&(e=null!==this.simpleStyle?this.simpleStyle:_0x5c1d0c.SimpleStyle),e}_getCssStyle(e){let t=null,i=null;return e===_0x5c1d0c.StyleEnum.detail?(null!==this.detailStyle?t=this.detailStyle:(t=_0x5c1d0c.DetailStyle,this.detailStyle=t),i=".popup {z-index:-1;position:absolute;text-align:center;border:"+t.popup.borderwidth+" "+t.popup.bordertype+" "+t.popup.bordercolor+";}.popupcontentwrapper {background-color:"+t.popupcontentwrapper.backgroundcolor+";opacity:"+t.popupcontentwrapper.opacity+";}.popupcontent {color:"+t.popupcontent.color+";line-height:"+t.popupcontent.lineheight+";font-family:"+t.popupcontent.font+";}.popupcontent div {font-weight: bold;line-height:"+t.popupcontent_div.lineheight+";text-align:center;background-color:"+t.popupcontent_div.backgroundcolor+";opacity:"+t.popupcontent_div.opacity+";}.popupcontent table {margin-left:"+t.popupcontent_table.marginleft+";margin-right:"+t.popupcontent_table.marginright+";}.popupcontent table tr {height:"+t.popupcontent_table_tr+";}"):e===_0x5c1d0c.StyleEnum.notitle?(null!==this.notitleStyle?t=this.notitleStyle:(t=_0x5c1d0c.NotitleStyle,this.notitleStyle=t),i=".popup {z-index:-1;position:absolute;text-align:center;border:"+t.popup.borderwidth+" "+t.popup.bordertype+" "+t.popup.bordercolor+";}.popupcontentwrapper {background-color:"+t.popupcontentwrapper.backgroundcolor+";opacity:"+t.popupcontentwrapper.opacity+";}.popupcontent {font-weight: bold;color:"+t.popupcontent.color+";line-height:"+t.popupcontent.lineheight+";font-family:"+t.popupcontent.font+";}.popupcontent table {margin-left:"+t.popupcontent_table.marginleft+";margin-right:"+t.popupcontent_table.marginright+";}.popupcontent table tr {height:"+t.popupcontent_table_tr+";}"):e===_0x5c1d0c.StyleEnum.simple&&(null!==this.simpleStyle?t=this.simpleStyle:(t=_0x5c1d0c.SimpleStyle,this.simpleStyle=t),i=".popup {z-index:-1;position:absolute;text-align:center;font-weight: bold;color:"+t.popup.color+";background-color:"+t.popup.backgroundcolor+";opacity:"+t.popup.opacity+";border:"+t.popup.borderwidth+" "+t.popup.bordertype+" "+t.popup.bordercolor+";font-family:"+t.popup.font+";}"),i}}var _0x229a00=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x574021=_0x229a00(void 0,(function(){return _0x574021.toString().search("(((.+)+)+)+$").toString().constructor(_0x574021).search("(((.+)+)+)+$")}));_0x574021();var WebGLPlot$7=window.WebGLPlot=window.WebGLPlot||{};class _0x5c7178{constructor(){this.boxModelMatrix=null,this.symbol=null,this.fixedFrameTransform=WebGLPlot$7.Transforms.localFrameToFixedFrameGenerator("east","north")}static getElement(e){var t=null;return e===_0x5c1d0c.StyleEnum.detail||e===_0x5c1d0c.StyleEnum.notitle?t=$('<div id="trackPopUpContent" class="popup"><div class="popupcontentwrapper"><div id="trackPopUpLink" class="popupcontent"></div></div></div>').get(0):e===_0x5c1d0c.StyleEnum.notitle2?t=$('<div id="trackPopUpContent" class="popup"><div class="popup-content-wrapper"><div id="trackPopUpLink" class="popup-content"></div></div></div>').get(0):e===_0x5c1d0c.StyleEnum.notitle3?t=$('<div id="trackPopUpContent" class="popup"><div class="popup-content-wrapper"><div class="main"><div id="trackPopUpLink" class="popup-content"></div></div></div></div>').get(0):e===_0x5c1d0c.StyleEnum.simple&&(t=$('<div id="trackPopUpContent" class="popup"></div>').get(0)),{element:t,style:null}}static getModelHeight(e){if(void 0===e)return 0;this.symbol=e.clone();var t=e.localPoints[0].clone(),i=e._model;let n=i.modelMatrix;var r=i._boundingSphere.center;let o=r.x>r.y?r.x:r.y;o=(o>r.z?o:r.z)*i.scale;var a=_0x51d1e4.getModelMinAndMaxCorner(i),s=i.scale,l=WebGLPlot$7.Cartesian3.multiplyByScalar(WebGLPlot$7.Cartesian3.fromElements(a.minCorner.z,a.minCorner.x,a.minCorner.y),s,new WebGLPlot$7.Cartesian3),u=WebGLPlot$7.Cartesian3.multiplyByScalar(WebGLPlot$7.Cartesian3.fromElements(a.maxCorner.z,a.maxCorner.x,a.maxCorner.y),s,new WebGLPlot$7.Cartesian3),c=new WebGLPlot$7.AxisAlignedBoundingBox(l,u);this.BoundingBoxCenter=c.center,this.boxModelMatrix=this.computeBoundingBoxMatrix(t,e._modelRotate,n.clone(),this.fixedFrameTransform);var h=this.getLinePts(t,u,l,this.boxModelMatrix),d=[];for(let e=0;e<h.length;e++){let t=WebGLPlot$7.Cartographic.fromCartesian(h[e]);var f=WebGLPlot$7.CesiumMath.toDegrees(t.latitude),p=WebGLPlot$7.CesiumMath.toDegrees(t.longitude);let i=t.height;d.push({x:p,y:f,z:i})}return d}static getLinePts(e,t,i,n){var r=0,o=0,a=0,s=0;return WebGLPlot$7.defined(t)&&WebGLPlot$7.defined(i)?(r=Math.abs(t.x-i.x)/2,o=Math.abs(t.y-i.y)/2,a=i.z<=0?t.z:t.z-i.z,s=r>o?o:r):(s=(this.centerMax+this.modelRadius)/2,a=1.5*this.centerMax+this.modelRadius/2),this.rotateCircleCenter=WebGLPlot$7.Cartesian3.fromDegrees(e.x,e.y,a+e.z),this.computeHeightLines(r,o,s,a,n)}static computeHeightLines(e,t,i,n,r){var o=[],a=new WebGLPlot$7.Cartesian3,s=new WebGLPlot$7.Cartesian3,l=0,u=0;0!==e&&0!==t?(i=e,l=(t+this.BoundingBoxCenter.y)/i,u=n/i):0!==i&&(l=1,u=n/i);var c=WebGLPlot$7.Cartesian3.fromDegrees(this.symbol.localPoints[0].x,this.symbol.localPoints[0].y,this.symbol.localPoints[0].z),h=new WebGLPlot$7.HeadingPitchRoll,d=Math.PI/180;h.pitch=0,h.roll=0,this.symbol?h.heading=d*this.symbol._modelRotate.z:h.heading=d*this.symbol.vectorRotate.z;var f=WebGLPlot$7.Transforms.headingPitchRollToFixedFrame(c,h,WebGLPlot$7.Ellipsoid.WGS84,this.fixedFrameTransform,r.clone());return s=WebGLPlot$7.Cartesian3.multiplyByScalar(new WebGLPlot$7.Cartesian3(l,1,u),i,s),a=WebGLPlot$7.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot$7.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot$7.Cartesian3.multiplyByScalar(new WebGLPlot$7.Cartesian3(l,1,.7*u),i,s),a=WebGLPlot$7.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot$7.Cartesian3(a.x,a.y,a.z)),o}static computeBoundingBoxMatrix(e,t,i,n){var r=WebGLPlot$7.Cartesian3.fromDegrees(e.x,e.y,e.z),o=new WebGLPlot$7.HeadingPitchRoll,a=Math.PI/180;return o.pitch=0,o.roll=0,o.heading=a*t.z+90*a,WebGLPlot$7.Transforms.headingPitchRollToFixedFrame(r,o,WebGLPlot$7.Ellipsoid.WGS84,n,i),i}}var _0xbc6a9f=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x31aa86=_0xbc6a9f(void 0,(function(){return _0x31aa86.toString().search("(((.+)+)+)+$").toString().constructor(_0x31aa86).search("(((.+)+)+)+$")}));_0x31aa86();var WebGLPlot$6=window.WebGLPlot=window.WebGLPlot||{};class _0x4318a3 extends _0x2c86f0{constructor(e,t){if(!WebGLPlot$6.defined(t))throw new WebGLPlot$6.DeveloperError("OverLayerPicture viewer is required.");if(!WebGLPlot$6.defined(e.symbol))throw new WebGLPlot$6.DeveloperError("OverLayerPicture options.symbol is required.");(e=WebGLPlot$6.defaultValue(e,WebGLPlot$6.defaultValue.EMPTY_OBJECT)).scene=t.scene,super(e),this.symbol=e.symbol,this.showline=WebGLPlot$6.defaultValue(e.showline,!1),this.viewer=t,this.primitive=null,this._element=null,this._images=null,this._id=null,this._divContent=null,this._position=e.symbol.localPoints[0].clone(),this._endPosition=e.symbol.localPoints[0].clone(),this._bimHeight=0,this._modelHeight=0,this._lineEnd=null,this._init(e)}_init(e){this.overLayerOptions=new _0x149357(e),this._initOverlayer(),this._initHandler(),this.plotEventManager=_0x43a805.getInstance(),this.plotEventManager.overlayerPropertyChanged._listeners=[],this.plotEventManager.overlayerPropertyChanged.addEventListener(this._propertyChanged.bind(this))}_propertyChanged(){this._initOverlayer(),this._initHandler()}updateEffect(e){WebGLPlot$6.defined(e.point)&&(this._getModelHeight(),e.point.z=this._modelHeight,this.setPosition(e.point)),WebGLPlot$6.defined(e.visible)&&this.setVisible(e.visible)}_initOverlayer(){let e=[];if(""!==this.overLayerOptions.content&&this.overLayerOptions.content.split&&(e=this.overLayerOptions.content.split(";")),document.getElementById(this.viewer.container.id).style.setProperty("position","absolute"),this.overLayerOptions.style===_0x5c1d0c.StyleEnum.detail){var t=_0x5c7178.getElement(this.overLayerOptions.style);this._element=t.element,document.body.getElementsByClassName("popup").length>0&&document.body.removeChild(document.body.getElementsByClassName("popup")[0]),document.body.appendChild(this._element),this.htmlstyle=document.createElement("style"),this.htmlstyle.innerHTML=this.overLayerOptions._getCssStyle(this.overLayerOptions.style),this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.htmlstyle);var i="";for(var n in i="<div>"+this.overLayerOptions.title+"</div><table><tbody>",e)i+="<tr><td>"+e[n]+"</td></tr>";i+="</tbody></table>",this._element.id=WebGLPlot$6.createGuid(),$("#trackPopUpLink").append(i),$("#trackPopUpLink").get(0).id=WebGLPlot$6.createGuid(),this._divContent=this._element}else if(this.overLayerOptions.style===_0x5c1d0c.StyleEnum.notitle||this.overLayerOptions.style===_0x5c1d0c.StyleEnum.notitle2||this.overLayerOptions.style===_0x5c1d0c.StyleEnum.notitle3){t=_0x5c7178.getElement(this.overLayerOptions.style);this._element=t.element,document.body.getElementsByClassName("popup").length>0&&document.body.removeChild(document.body.getElementsByClassName("popup")[0]),document.body.appendChild(this._element),this.htmlstyle=document.createElement("style"),this.htmlstyle.innerHTML=this.overLayerOptions._getCssStyle(this.overLayerOptions.style),this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.htmlstyle);i="";for(var n in e)i+="<tr><td>"+e[n]+"</td></tr>";i+="</tbody></table>",this._element.id=WebGLPlot$6.createGuid(),$("#trackPopUpLink").append(i),$("#trackPopUpLink").get(0).id=WebGLPlot$6.createGuid(),this._divContent=this._element}else if(this.overLayerOptions.style===_0x5c1d0c.StyleEnum.simple){t=_0x5c7178.getElement(this.overLayerOptions.style);this._element=t.element,document.body.getElementsByClassName("popup").length>0&&document.body.removeChild(document.body.getElementsByClassName("popup")[0]),document.body.appendChild(this._element),this.htmlstyle=document.createElement("style"),this.htmlstyle.innerHTML=this.overLayerOptions._getCssStyle(this.overLayerOptions.style),this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.htmlstyle);i=e[0];this._element.id=WebGLPlot$6.createGuid(),this._element.append(i),this._divContent=this._element}else if(this.overLayerOptions.style===_0x5c1d0c.StyleEnum.element){if(!this.overLayerOptions.content||!this.overLayerOptions.content.getInnerHTML)return;this.bpDom=document.createElement("div"),this.bpDom.style.cssText=this.overLayerOptions.content.style.cssText,this.bpDom.id=WebGLPlot$6.createGuid(),this.bpDom.appendChild(this.overLayerOptions.content),document.body.getElementsByClassName("popup").length>0&&document.body.removeChild(document.body.getElementsByClassName("popup")[0]),document.body.appendChild(this.bpDom),this._divContent=this.bpDom}this._id=WebGLPlot$6.createGuid();var r=this._divContent.offsetWidth,o=this._divContent.offsetHeight,a=this.overLayerOptions.scale,s=document.createElement("canvas"),l=s.getContext("2d");s.width=r*a,s.height=o*a,s.style.width=r+"px",s.style.height=o+"px",l.scale(a,a);var u={backgroundColor:null,useCORS:!0,allowTaint:!1,canvas:s,width:r,height:o,foreignObjectRendering:!0,tainTest:!1};_0x4994c3(this._divContent,u).then(function(e){if(e){let t=e.toDataURL("image/png",1);this.images=t,this._divContent.style.display="none",this._create()}}.bind(this))}_create(){this._getModelHeight(),this._endPosition.x=this._position.x,this._endPosition.y=this._position.y,this._endPosition.z=this._modelHeight,this._position.z=this._endPosition.z;let e={id:this._id,show:!0,position:WebGLPlot$6.Cartesian3.fromDegrees(this._endPosition.x,this._endPosition.y,this._endPosition.z),image:this.images,pixelOffset:new WebGLPlot$6.Cartesian2(this.overLayerOptions.offsetX2D,this.overLayerOptions.offsetY2D),horizontalOrigin:WebGLPlot$6.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$6.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY,sizeInMeters:!1,scale:1};if(this._billboard&&(_0x24dc2a.removeBillboard(this._billboard,this.viewer.scene),this._billboard=void 0),this._billboard=_0x24dc2a.addBillboard(e,this.viewer.scene),this._polyline&&(_0x24dc2a.removeOverLayerPolyLine(this._polyline,this.viewer.scene),this._polyline=void 0),!this._polyline){let e={show:this.showline,width:1,positions:[WebGLPlot$6.Cartesian3.fromDegrees(this._position.x,this._position.y,this._position.z),WebGLPlot$6.Cartesian3.fromDegrees(this._endPosition.x,this._endPosition.y,this._endPosition.z)]};this._polyline=_0x24dc2a.addOverLayerPolyLine(e,this.viewer.scene)}}_getModelHeight(){if(this.symbol._model){var e=_0x5c7178.getModelHeight(this.symbol);let t=this.viewer.scene.sampleHeight(new WebGLPlot$6.Cartographic(WebGLPlot$6.CesiumMath.toRadians(e[0].x),WebGLPlot$6.CesiumMath.toRadians(e[0].y))),i=this.viewer.scene.sampleHeight(new WebGLPlot$6.Cartographic(WebGLPlot$6.CesiumMath.toRadians(e[1].x),WebGLPlot$6.CesiumMath.toRadians(e[1].y)));e[0].z<e[1].z?(this._bimHeight=t,this._modelHeight=e[1].z):(this._bimHeight=i,this._modelHeight=e[0].z)}else{var t=this.symbol.localPoints[0].clone();this._bimHeight=t.z,this._modelHeight=t.z}}delete(){this._billboard&&(_0x24dc2a.removeBillboard(this._billboard,this.viewer.scene),this._billboard=void 0),this._polyline&&(_0x24dc2a.removeOverLayerPolyLine(this._polyline,this.viewer.scene),this._polyline=void 0)}setPosition(e){this._endPosition=e,this._billboard&&(this._billboard.position=WebGLPlot$6.Cartesian3.fromDegrees(e.x,e.y,e.z)),this._polyline&&(this._polyline.positions=[WebGLPlot$6.Cartesian3.fromDegrees(this._position.x,this._position.y,this._position.z),WebGLPlot$6.Cartesian3.fromDegrees(this._endPosition.x,this._endPosition.y,this._endPosition.z)])}setShowline(e){this._polyline&&(this.showline=e,this._polyline.show=this.showline)}_initHandler(){var e=!1,t=-1,i=new WebGLPlot$6.ScreenSpaceEventHandler(viewer.scene.canvas);i.setInputAction(function(i){var n=viewer.scene.pick(i.position);n?null===n.id||n.id!==this._id||e?(e=!1,t=-1,this.viewer.scene.canvas.style.cursor="default"):(e=!0,t=n.id,this.viewer.scene.canvas.style.cursor="move"):(e=!1,t=-1,this.viewer.scene.canvas.style.cursor="default")}.bind(this),WebGLPlot$6.ScreenSpaceEventType.LEFT_CLICK),i.setInputAction(function(i){e=!1,t=-1}.bind(this),WebGLPlot$6.ScreenSpaceEventType.RIGHT_CLICK),i.setInputAction(function(i){if(e&&-1!==t){var n=this._bimHeight,r=WebGLPlot$6.Cartesian3.fromDegrees(this._position.x,this._position.y,n),o=WebGLPlot$6.SceneTransforms.wgs84ToWindowCoordinates(scene,r),a=this._modifyModelPosition(this._position,i.endPosition);i.endPosition.y=o.y;var s=_0x51d1e4.getPosition(this.viewer.scene,i.endPosition);this._endPosition={x:s.x,y:s.y,z:a.z};var l=WebGLPlot$6.Cartesian3.fromDegrees(s.x,s.y,a.z);this._billboard.position=l,this._polyline.positions=[WebGLPlot$6.Cartesian3.fromDegrees(this._position.x,this._position.y,this._position.z),WebGLPlot$6.Cartesian3.fromDegrees(s.x,s.y,a.z)]}}.bind(this),WebGLPlot$6.ScreenSpaceEventType.MOUSE_MOVE)}_modifyModelPosition(e,t){var i=1,n=this.viewer.scene,r=WebGLPlot$6.SceneTransforms.transformWindowToDrawingBuffer(n,t);r.y=n.drawingBufferHeight-r.y;var o=WebGLPlot$6.Cartesian3.fromDegrees(e.x,e.y,0),a=WebGLPlot$6.SceneTransforms.wgs84ToWindowCoordinates(n,o),s=this._getAltitudeByLogical(o,r,n);if(WebGLPlot$6.defined(s)){a.y<t.y&&(i=-1);var l=WebGLPlot$6.Cartesian3.distance(o,s)*i,u=n.globe.ellipsoid.cartesianToCartographic(s),c=WebGLPlot$6.CesiumMath.toDegrees(u.latitude);return new _0x45ea17(WebGLPlot$6.CesiumMath.toDegrees(u.longitude),c,l)}}_getAltitudeByLogical(e,t,i){var n=WebGLPlot$6.Cartographic.fromCartesian(e);n.height+=1,n=WebGLPlot$6.Cartesian3.fromRadians(n.longitude,n.latitude,n.height);var r=WebGLPlot$6.SceneTransforms.wgs84ToWindowCoordinates(i,e),o=WebGLPlot$6.SceneTransforms.wgs84ToWindowCoordinates(i,n);if(o){var a;o.x===r.x?(-1,a=0):o.y===r.y?(0,a=-1):a=-1/((o.y-r.y)/(o.x-r.x));var s=i._view.viewport,l={left:s.x,right:s.x+s.width,bottom:s.y,top:s.y+s.height},u=_0x51d1e4.intersectionOfRectByPointslopeline(t,a,l),c=u[0],h=u[1],d=new WebGLPlot$6.Cartesian3,f=new WebGLPlot$6.Cartesian3;WebGLPlot$6.SceneTransforms.drawingBufferToWgs84Coordinates(i,c,1,d),WebGLPlot$6.SceneTransforms.drawingBufferToWgs84Coordinates(i,h,1,f);var p=i.camera.position,_=new WebGLPlot$6.Cartesian3;WebGLPlot$6.Cartesian3.subtract(e,n,_);var m=new WebGLPlot$6.Cartesian3;WebGLPlot$6.Cartesian3.negate(_,m),WebGLPlot$6.Cartesian3.normalize(_,_),WebGLPlot$6.Cartesian3.normalize(m,m);var $=new WebGLPlot$6.Ray(e,_),g=new WebGLPlot$6.Ray(e,m),y=WebGLPlot$6.IntersectionTests.rayTriangleParametric($,d,f,p);if(y)return WebGLPlot$6.Ray.getPoint($,y);if(y=WebGLPlot$6.IntersectionTests.rayTriangleParametric(g,d,f,p))return WebGLPlot$6.Ray.getPoint(g,y)}}setVisible(e){this._billboard&&(this._billboard.show=e)}destroy(){document.body.getElementsByClassName("popup").length>0&&document.body.removeChild(document.body.getElementsByClassName("popup")[0]),this.delete()}clone(){}}Object.defineProperties(_0x4318a3.prototype,{id:{get:function(){return this._id},set:function(e){"string"==typeof e&&this._id!==e&&(this._id=e)}},visible:{get:function(){if(this._billboard)return this._billboard.show},set:function(e){this._billboard&&(this._billboard.show=e)}}});var _0x3b9fd4=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x31016d=_0x3b9fd4(void 0,(function(){return _0x31016d.toString().search("(((.+)+)+)+$").toString().constructor(_0x31016d).search("(((.+)+)+)+$")}));_0x31016d();var WebGLPlot$5=window.WebGLPlot=window.WebGLPlot||{};class _0x3dbdf5 extends _0x2c86f0{constructor(e,t){if(!WebGLPlot$5.defined(t))throw new WebGLPlot$5.DeveloperError("OverLayerPicture viewer is required.");if(!WebGLPlot$5.defined(e.symbol))throw new WebGLPlot$5.DeveloperError("OverLayerPicture options.symbol is required.");(e=WebGLPlot$5.defaultValue(e,WebGLPlot$5.defaultValue.EMPTY_OBJECT)).scene=t.scene,super(e),this._position=e.symbol.localPoints[0].clone(),this.symbol=e.symbol,this.viewer=t,this.primitive=null,this._element=null,this._images=null,this._width=0,this._height=0,this._divContent=null,this._id=null,this._init(e)}_init(e){this.overLayerOptions=new _0x149357(e),this._initOverlayer(),this.plotEventManager=_0x43a805.getInstance(),this.plotEventManager.overlayerPropertyChanged._listeners=[],this.plotEventManager.overlayerPropertyChanged.addEventListener(this._propertyChanged.bind(this))}_propertyChanged(){this._initOverlayer()}updateEffect(e){WebGLPlot$5.defined(e.point)&&this.setOffSet(e.point,void 0),WebGLPlot$5.defined(e.visible)&&this.setVisible(e.visible)}_initOverlayer(){let e=[];if(""!==this.overLayerOptions.content&&this.overLayerOptions.content.split&&(e=this.overLayerOptions.content.split(";")),document.getElementById(this.viewer.container.id).style.setProperty("position","absolute"),this.overLayerOptions.style===_0x5c1d0c.StyleEnum.detail){var t=_0x5c7178.getElement(this.overLayerOptions.style);this._element=t.element,document.body.getElementsByClassName("popup").length>0&&document.body.removeChild(document.body.getElementsByClassName("popup")[0]),document.body.appendChild(this._element),this.overLayerOptions.style=document.createElement("style"),this.overLayerOptions.style.innerHTML=this.overLayerOptions._getCssStyle(this.overLayerOptions.style),this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.overLayerOptions.style);var i="";for(var n in i="<div>"+this.title+"</div><table><tbody>",e)i+="<tr><td>"+e[n]+"</td></tr>";i+="</tbody></table>",this._element.id=Math.random().toString(15).slice(2,15),$("#trackPopUpLink").append(i),$("#trackPopUpLink").get(0).id=Math.random().toString(15).slice(2,15),this._divContent=this._element}else if(this.overLayerOptions.style===_0x5c1d0c.StyleEnum.simple){t=_0x5c7178.getElement(this.overLayerOptions.style);this._element=t.element,document.body.getElementsByClassName("popup").length>0&&document.body.removeChild(document.body.getElementsByClassName("popup")[0]),document.body.appendChild(this._element),this.htmlstyle=document.createElement("style"),this.htmlstyle.innerHTML=this.overLayerOptions._getCssStyle(this.overLayerOptions.style),this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.htmlstyle);i=e[0];this._element.id=Math.random().toString(15).slice(2,15),this._element.append(i),this._divContent=this._element}else if(this.overLayerOptions.style===_0x5c1d0c.StyleEnum.element){if(!this.overLayerOptions.content||!this.overLayerOptions.content.getInnerHTML)return;this.bpDom=document.createElement("div"),this.bpDom.style.cssText=this.overLayerOptions.content.style.cssText;var r=Math.random().toString(15);this.bpDom.id=r.slice(2,r.length),document.body.getElementsByClassName("popup").length>0&&document.body.removeChild(document.body.getElementsByClassName("popup")[0]),this.bpDom.appendChild(this.overLayerOptions.content),document.body.appendChild(this.bpDom),this._divContent=this.bpDom}else if(this.overLayerOptions.style===_0x5c1d0c.StyleEnum.notitle||this.overLayerOptions.style===_0x5c1d0c.StyleEnum.notitle2||this.overLayerOptions.style===_0x5c1d0c.StyleEnum.notitle3){t=_0x5c7178.getElement(this.overLayerOptions.style);this._element=t.element,document.body.getElementsByClassName("popup").length>0&&document.body.removeChild(document.body.getElementsByClassName("popup")[0]),document.body.appendChild(this._element),this.htmlstyle=document.createElement("style"),this.htmlstyle.innerHTML=this.overLayerOptions._getCssStyle(this.overLayerOptions.style),this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.htmlstyle);i="";for(var n in e)i+="<tr><td>"+e[n]+"</td></tr>";i+="</tbody></table>",this._element.id=Math.random().toString(15).slice(2,15),$("#trackPopUpLink").append(i),$("#trackPopUpLink").get(0).id=Math.random().toString(15).slice(2,15),this._divContent=this._element}this._width=this._divContent.offsetWidth,this._height=this._divContent.offsetHeight;var o=this.overLayerOptions.scale,a=document.createElement("canvas"),s=a.getContext("2d");a.width=this._width*o,a.height=this._height*o,a.style.width=this._width+"px",a.style.height=this._height+"px",a.style.background="transparent",s.scale(o,o),s.mozImageSmoothingEnabled=!1,s.webkitImageSmoothingEnabled=!1,s.msImageSmoothingEnabled=!1,s.imageSmoothingEnabled=!1,s.globalAlpha=.1,document.documentElement.scrollTop||document.body.scrollTop;var l={backgroundColor:null,useCORS:!0,allowTaint:!1,canvas:a,width:this._width,height:this._height,foreignObjectRendering:!0,tainTest:!1};_0x4994c3(this._divContent,l).then(function(e){if(e){var t=new Image;t.src=e.toDataURL("image/png",1),this._images=t,this._divContent.style.display="none",this._create()}}.bind(this)),this._id=WebGLPlot$5.createGuid()}_create(){this.setOffSet(this._position,this.overLayerOptions)}setOffSet(e,t){if(e&&(!WebGLPlot$5.defined(t)||t instanceof _0x149357)){WebGLPlot$5.defined(t)&&(this.overLayerOptions=t);var i=e.x,n=e.y,r=_0x5c7178.getModelHeight(this.symbol)[0].z+.5,o=this.overLayerOptions.rotateX3D,a=this.overLayerOptions.rotateY3D,s=this.overLayerOptions.rotateZ3D;i+=this.overLayerOptions.offsetX3D,n+=this.overLayerOptions.offsetY3D,r+=this.overLayerOptions.offsetZ3D;var l=new WebGLPlot$5.Cartesian3(this._width/40*this.overLayerOptions.scale,this._height/40*this.overLayerOptions.scale,1),u=WebGLPlot$5.Cartesian3.fromDegrees(i,n,r),c=WebGLPlot$5.Transforms.eastNorthUpToFixedFrame(u),h=WebGLPlot$5.Matrix4.fromRotationTranslation(WebGLPlot$5.Matrix3.fromRotationX(WebGLPlot$5.CesiumMath.toRadians(90+o))),d=WebGLPlot$5.Matrix4.fromRotationTranslation(WebGLPlot$5.Matrix3.fromRotationY(WebGLPlot$5.CesiumMath.toRadians(180+a))),f=WebGLPlot$5.Matrix4.fromRotationTranslation(WebGLPlot$5.Matrix3.fromRotationZ(WebGLPlot$5.CesiumMath.toRadians(0+s))),p=new WebGLPlot$5.Matrix4,_=new WebGLPlot$5.Matrix4,m=new WebGLPlot$5.Matrix4,$=WebGLPlot$5.Matrix4.fromScale(l);WebGLPlot$5.Matrix4.multiply(c,h,p),WebGLPlot$5.Matrix4.multiply(p,$,p),WebGLPlot$5.Matrix4.multiply(p,d,_),WebGLPlot$5.Matrix4.multiply(_,f,m),null!==this.primitive&&this.delete();var g=new WebGLPlot$5.PlaneGeometry,y=new WebGLPlot$5.GeometryInstance({geometry:g,modelMatrix:m}),v=new WebGLPlot$5.Material({fabric:{type:"DiffuseMap",uniforms:{image:this._images}},translucent:!0});this.primitive=this.viewer.scene.primitives.add(new WebGLPlot$5.Primitive({geometryInstances:y,appearance:new WebGLPlot$5.MaterialAppearance({closed:!0,translucent:!0,material:v})}))}}setVisible(e){null!==this.primitive&&(this.primitive.show=e)}delete(){null!==this.primitive&&(this.viewer.scene.primitives.removeAndDestroy(this.primitive),this.primitive=void 0)}destroy(){document.body.getElementsByClassName("popup").length>0&&document.body.removeChild(document.body.getElementsByClassName("popup")[0]),this.delete()}clone(){}}Object.defineProperties(_0x3dbdf5.prototype,{id:{get:function(){return this._id},set:function(e){"string"==typeof e&&this._id!==e&&(this._id=e)}},visible:{get:function(){if(null!==this.primitive)return this.primitive.show},set:function(e){null!==this.primitive&&(this.primitive.show=e)}}});var _0x3f28c7=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x544c7b=_0x3f28c7(void 0,(function(){return _0x544c7b.toString().search("(((.+)+)+)+$").toString().constructor(_0x544c7b).search("(((.+)+)+)+$")}));_0x544c7b();var WebGLPlot$4=window.WebGLPlot=window.WebGLPlot||{};function _0x51534c(e,t){void 0===e.showLine?this.showLine=!0:this.showLine=e.showLine,this.scene=t.scene,this.position=this.lonLatToPixel(e.position),void 0===this.position&&(this.position={x:100,y:200,z:0}),this.finalPosition=e.position,this.style=document.createElement("style"),this.style.innerHTML=".dialog{min-width:150px;min-height:100px;position:absolute; background-color: rgba(42, 69, 105,.3);border: none;display: block;left:"+this.position.x+"px;top:"+this.position.y+"px;z-index: 1;\n}\n.dialog-content{padding:4px;color:#00a7d0}\n",this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.style),this.bpDom=document.createElement("div"),this.bpDom.classList.add("dialog"),this.bpDom.style.cssText="display: block;";var i=Math.random().toString(15);this.bpDom.id=i.slice(2,i.length),this.bpDom.position=e.position,this.canvasDom=document.createElement("canvas"),this.canvasDom.id=this.bpDom.id+"c",this.canvasDom.style.cssText="position: absolute; z-index: 1",document.body.appendChild(this.canvasDom),this.contentDom=document.createElement("div"),this.contentDom.classList.add("dialog-content"),this.contentDom.appendChild(e.element),this.bpDom.appendChild(this.contentDom),document.body.appendChild(this.bpDom),this.Dragging(this.getDraggingDialog).enable(),this.self=this,this.canvas=document.getElementById(this.bpDom.id+"c"),this.lineCtx=this.canvas.getContext("2d"),this.bpDiv=document.getElementById(this.bpDom.id),this.bpPosition=this.getCordInContainer(this.bpDiv),t.camera.changed.addEventListener(function(){var t=document.getElementsByClassName("dialog");for(let e=0;e<t.length;e++){this.bpDiv=t[e],this.bpPosition=this.getCordInContainer(t[e]);var i=this.bpDiv.id,n=document.getElementById(i+"c");this.lineCtx=n.getContext("2d"),this.canvas=n,this.position=this.lonLatToPixel(this.bpDiv.position),void 0!==this.position&&this.showLine&&this.drawLine(this.canvas,this.lineCtx)}var r=this.lonLatToPixel(this.finalPosition),o=this.lonLatToPixel(e.position),a=null!==r&&r.x>=0&&r.y>=0&&r.x<this.scene.drawingBufferWidth&&r.y<this.scene.drawingBufferHeight,s=null!==o&&o.x>=0&&o.y>=0&&o.x<this.scene.drawingBufferWidth&&o.y<this.scene.drawingBufferHeight;if(a&&s){this.setLineVisible(!0),this.bpDiv.style.cssText="display: block;",this.pt=this.pixelToLonlat(r);var l=WebGLPlot$4.Cartesian3.fromDegrees(this.pt[0],this.pt[1]),u=new WebGLPlot$4.Cartesian2,c=this.scene.cartesianToCanvasCoordinates(l,u);WebGLPlot$4.defined(c)&&(this.bpDom.style.top=c.y+"px",this.bpDom.style.left=c.x+"px")}else this.bpDiv.style.cssText="display: none;",this.setLineVisible(!1)}.bind(this))}_0x51534c.prototype.Dragging=function(e){var t=null,i=0,n=0,r=null,o=o=>{switch(o.type){case"touchstart":case"mousedown":if(null!=(t=e(o))){this.bpDiv=t,this.bpPosition=this.getCordInContainer(this.bpDiv);var a=this.bpDiv.id,s=document.getElementById(a+"c");this.lineCtx=s.getContext("2d"),this.canvas=s,this.position=this.lonLatToPixel(this.bpDiv.position)}r=o.touches?o.touches[0]:o,null!=t&&(i=r.clientX-t.offsetLeft,n=r.clientY-t.offsetTop);break;case"touchmove":case"mousemove":r=o.touches?o.touches[0]:o,null!=t&&(t.style.left=r.clientX-i+"px",t.style.top=r.clientY-n+"px",void 0!==this.position&&this.showLine&&this.drawLine(this.canvas,this.lineCtx));break;case"touchend":case"mouseup":t=null,i=0,n=0;var l={x:this.bpDom.offsetLeft,y:this.bpDom.offsetTop};null!==l&&l.x>=0&&l.y>=0&&l.x<this.scene.drawingBufferWidth&&l.y<this.scene.drawingBufferHeight&&(this.finalPosition=this.pixelToLonlat(l))}};return{enable:function(){document.addEventListener("mousedown",o),document.addEventListener("mousemove",o),document.addEventListener("mouseup",o),document.addEventListener("touchstart",o),document.addEventListener("touchmove",o),document.addEventListener("touchend",o)},disable:function(){document.removeEventListener("mousedown",o),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",o),document.removeEventListener("touchstart",o),document.removeEventListener("touchmove",o),document.removeEventListener("touchend",o)}}},_0x51534c.prototype.getDraggingDialog=function(e){for(var t=e.target;t&&-1==t.className.indexOf("dialog");)t=t.offsetParent;return t},_0x51534c.prototype.getCordInContainer=function(e){return{x:e.getBoundingClientRect().left,y:e.getBoundingClientRect().top}},_0x51534c.prototype.getMinDisPoint=function(){let e={x:this.bpDiv.offsetLeft,y:this.bpDiv.offsetTop},t={x:this.bpDiv.offsetLeft,y:this.bpDiv.offsetTop+this.bpDiv.clientHeight},i={x:this.bpDiv.offsetLeft+this.bpDiv.clientWidth,y:this.bpDiv.offsetTop},n={x:this.bpDiv.offsetLeft+this.bpDiv.clientWidth,y:this.bpDiv.offsetTop+this.bpDiv.clientHeight};this.position;let r=(this.position.x-e.x)*(this.position.x-e.x)+(this.position.y-e.y)*(this.position.y-e.y),o=(this.position.x-t.x)*(this.position.x-t.x)+(this.position.y-t.y)*(this.position.y-t.y),a=(this.position.x-i.x)*(this.position.x-i.x)+(this.position.y-i.y)*(this.position.y-i.y),s=(this.position.x-n.x)*(this.position.x-n.x)+(this.position.y-n.y)*(this.position.y-n.y),l=[];l.push(r),l.push(o),l.push(a),l.push(s);let u=l[0],c=0;for(var h=1;h<l.length;h++)l[h]<u&&(u=l[h],c=h);return 0==c?e:1==c?t:2==c?i:3==c?n:null},_0x51534c.prototype.drawLine=function(e,t){let i=this.getMinDisPoint();if(null==i||0==i.x&&0==i.y)return;let n=Math.abs(i.x-this.position.x),r=Math.abs(this.position.y-i.y),o=this.position.x,a=this.position.y,s=i.x,l=i.y,u=Math.min(o,s),c=Math.min(a,l);e.width=Math.abs(n),e.height=Math.abs(r),e.style.setProperty("left",u+"px",""),e.style.setProperty("top",c+"px",""),e.style.setProperty("pointer-events","none"),t.clearRect(0,0,e.width,e.height),t.beginPath(),t.moveTo(o-u,a-c),t.lineTo(s-u,l-c),t.stroke()},_0x51534c.prototype.lonLatToPixel=function(e){2===e.length&&(e[2]=0);var t=WebGLPlot$4.Cartesian3.fromDegrees(e[0],e[1],e[2]);return WebGLPlot$4.SceneTransforms.wgs84ToWindowCoordinates(this.scene,t)},_0x51534c.prototype.pixelToLonlat=function(e){var t=this.scene.pickPosition(e),i=Cesium.Cartographic.fromCartesian(t);return[Cesium.Math.toDegrees(i.longitude),Cesium.Math.toDegrees(i.latitude),i.height]},_0x51534c.prototype.setPosition=function(e){this.position=this.lonLatToPixel(e),null!=this.position&&(this.lineCtx.clearRect(0,0,this.canvas.width,this.canvas.height),this.drawLine(this.canvas,this.lineCtx))},_0x51534c.prototype.setLineVisible=function(e){this.showLine=e,e?void 0!==this.position&&this.drawLine(this.canvas,this.lineCtx):this.lineCtx.clearRect(0,0,this.canvas.width,this.canvas.height)},_0x51534c.prototype.getPosition=function(){return this.bpDiv.position},_0x51534c.prototype.setContent=function(e){this.contentDom.childNodes.forEach((e=>e.remove())),this.contentDom.appendChild(e)},_0x51534c.prototype.setVisible=function(e){const t=this.bpDiv;if(t&&e){t.style.cssText="display: block;";var i=this.bpDiv.id,n=document.getElementById(i+"c");this.lineCtx=n.getContext("2d"),this.canvas=n,this.position=this.lonLatToPixel(this.bpDiv.position),void 0!==this.position&&this.showLine&&this.drawLine(this.canvas,this.lineCtx)}else t.style.cssText="display: none;",this.lineCtx.clearRect(0,0,this.canvas.width,this.canvas.height)},_0x51534c.prototype.remove=function(){document.body.removeChild(this.bpDiv),document.body.removeChild(this.canvas)},_0x51534c.prototype.updateDom=function(e){this.contentDom.childNodes.forEach((e=>e.remove())),this.contentDom.appendChild(e)};var _0x37b69b=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x5cbb68=_0x37b69b(void 0,(function(){return _0x5cbb68.toString().search("(((.+)+)+)+$").toString().constructor(_0x5cbb68).search("(((.+)+)+)+$")}));_0x5cbb68();var _0x4561b0={SYMBOL_NODE:0,SYMBOL_NODEGROUP:1},_0x443259=Object.freeze(_0x4561b0),_0x42811c=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x557846=_0x42811c(void 0,(function(){return _0x557846.toString().search("(((.+)+)+)+$").toString().constructor(_0x557846).search("(((.+)+)+)+$")}));_0x557846();class _0x1717b1{constructor(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._id=WebGLPlot.createGuid(),this._parent="",this._nodeType=_0x443259.SYMBOL_NODE,this._symbolUuid="",this._name="",this._symbolNodes=[],this._visible=!0}}Object.defineProperties(_0x1717b1.prototype,{nodeType:{get:function(){return this._nodeType},set:function(e){this._nodeType=e}},parent:{get:function(){return this._parent},set:function(e){this._parent=e}},name:{get:function(){return this._name},set:function(e){this._name=e}},id:{get:function(){return this._id},set:function(e){this._id=e}},symbolUUID:{get:function(){return this._symbolUuid},set:function(e){this._nodeType===_0x443259.SYMBOL_NODE&&(this._symbolUuid=e)}},visible:{get:function(){return this._visible},set:function(e){this._visible=e}}});var _0x5c217f=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x36a155=_0x5c217f(void 0,(function(){return _0x36a155.toString().search("(((.+)+)+)+$").toString().constructor(_0x36a155).search("(((.+)+)+)+$")}));_0x36a155();let _0x1701b9=null;class _0xd6c3ec{constructor(e){null!=e&&(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._serverUrl=WebGLPlot.defaultValue(e.serverUrl,""),this._scene=WebGLPlot.defaultValue(e.scene,-1),this._symbolNodes=[])}static getInstance(e){return null===_0x1701b9&&(_0x1701b9=new _0xd6c3ec(e)),_0x1701b9}addNode(e,t="root"){var i=new _0x1717b1;return i._nodeType=e,i.parent=t,"root"!==t&&null!==t?t._symbolNodes.push(i):this._symbolNodes.push(i),i}removeNode(e){for(let t=0;t<this._symbolNodes.length;t++){let i=this._symbolNodes[t];e.id===i.id?(this._symbolNodes[t].destroy(),this._symbolNodes[t]=void 0,this._symbolNodes.splice(t,1)):i._nodeType===_0x443259.SYMBOL_NODEGROUP&&this.removeNode(i)}}saveTo(){var e={};e.name=this.name,e.path="",e.plotLayers=[],e.plotNodes=this._getNodesJson(this._symbolNodes),this._savePlotLayers(e);let t={serverUrl:this._serverUrl,scene:this._scene};return e.animations=WebGLPlot.toJSON(Cesium.GOAnimationManager.getInstance(t).getJSONData()),JSON.stringify(e)}_getNodesJson(e){var t=[],i=JSON.stringify(e,((e,i)=>{if("object"==typeof i&&null!==i){if(-1!==t.indexOf(i))return;t.push(i)}return i}));return t=null,i}loadFrom(e){this.removeAllPlottingLayers();let t={serverUrl:this._serverUrl,scene:this._scene};this._loadPlotLayers(e.plotLayers,(()=>{null!=e.animations&&Cesium.GOAnimationManager.getInstance(t).fromJSONData(JSON.parse(e.animations))})),e.plotNodes&&this._loadLogicPlotLayers(e.plotNodes)}close(){var e=this._scene.plotLayers;if(e)for(let t=0;t<e._layerQueue.length;t++){let i=e._layerQueue[t].geoGraphicObjects[t],n=i.getGeoEffectArray();for(let e=0;e<n.length;e++)i.removeGeoEffectByIndex(e)}this.removeAllPlottingLayers()}addPlottingLayer(e){let t=!0;for(;t;){t=!1;for(let i=0;i<this._scene.plotLayers.length;i++)if(this.plotLayers[i].name===e.name){e.name+="#1",t=!0;break}}this._scene.plotLayers.add(e)}removeAllPlottingLayers(){this._symbolNodes=[],this._scene.plotLayers.removeAll()}_savePlotLayers(e){if(0===this._symbolNodes.length&&this._scene.plotLayers._layerQueue.length>0){var t=this._scene.plotLayers._layerQueue[0];(r=this.addNode(_0x443259.SYMBOL_NODEGROUP)).name=t.name,void 0===t.visibility?r.visible=t.visible:r.visible=t.visibility}for(var i=0;i<this._scene.plotLayers._layerQueue.length;i++){var n={};t=this._scene.plotLayers._layerQueue[i];n.caption=t.name,n.name=t.name,n.description="",n.editable=t.isEditable,n.visible=t.visibility,n.selectable=t.isSelected,n.childPlotLayers=[];var r=this._symbolNodes[i];this._saveChildPlotLayer(n,t,r),e.plotLayers.push(n)}}_saveChildPlotLayer(e,t,i){0===i._symbolNodes.length&&t.geoGraphicObjects.length>0&&((r=this.addNode(_0x443259.SYMBOL_NODEGROUP,i)).name="子图层",void 0===t.visibility?r.visible=t.visible:r.visible=t.visibility);for(var n=0;n<i._symbolNodes.length;n++){var r,o={};(r=i._symbolNodes[n])._nodeType===_0x443259.SYMBOL_NODEGROUP?(o.name=r.name,o.caption=r.name,o.visibility=r.visible,o.plotSymbols=[]):o=this._getChildLayer(),this._savePlotSymbols(o,t,r),e.childPlotLayers.push(o)}}_getChildLayer(){var e=null;for(let i=0;i<plotLayer.childPlotLayers.length;i++){var t=plotLayer.childPlotLayers[i];if("childLayer"===t.name){e=t;break}}return null===e&&(e.name="childLayer",e.caption="childLayer",e.visibility=!0,e.plotSymbols=[]),e}_savePlotSymbols(e,t,i){if(0===i._symbolNodes.length&&i._nodeType===_0x443259.SYMBOL_NODEGROUP)for(let e=0;e<t.geoGraphicObjects.length;e++){var n=this.addNode(_0x443259.SYMBOL_NODE,i);n.symbolUuid=t.geoGraphicObjects[e].id,n.name=t.geoGraphicObjects[e].symbolName,n.visible=t.geoGraphicObjects[e].display}if(i._nodeType===_0x443259.SYMBOL_NODEGROUP)for(let n=0;n<i._symbolNodes.length;n++){var r=i._symbolNodes[n];this._savePlotSymbols(e,t,r)}else if(i._nodeType===_0x443259.SYMBOL_NODE){var o=i.symbolUuid,a=t.findFeatureByUuid(o).feature,s={};if(s.bubbleHeight=a.bubbleHeight,s.bubbleWidth=a.bubbleWidth,s.description=a.description,s.mediaList=a.mediaList,s.name=a.symbolName,s.renderOrder=2,s.visible="none"!==a.display,a instanceof _0x20e33d)s.graphicCompound=JSON.parse(a.toGeoJson());else if(s.graphicObject=JSON.parse(a.toGeoJson()),a.getGeoEffectArray().length>0){for(var l=[],u=a.getGeoEffectArray(),c=0;c<u.length;c++){var h=u[c];if(h instanceof _0xa7e371&&h._startAssociatedUuid===a.id){var d={caption:"joinLines"};d.uuid=h.id,d.visible=!0,d.lineRelation=JSON.parse(h.toJSON()),d.lineRelation.libID=0,d.lineRelation.code=1001,d.lineRelation.localePoints=h._localPoints,l.push(d)}}s.lineRelations=l}s.uuid=o,e.plotSymbols.push(s)}}_loadLogicPlotLayers(e,t){this._symbolNodes=JSON.parse(e)}_loadPlotLayers(e,t){if(0!==e.length){this._symbolNodes=[];var i=new Cesium.PlottingLayer(this._scene,e[0].caption);this.addPlottingLayer(i);for(var n=0,r=e.length;n<r;n++){var o=e[n],a=this.addNode(_0x443259.SYMBOL_NODEGROUP);a.name=o.name,void 0===o.visibility?a.visible=o.visible:a.visible=o.visibility,this._loadChildLayers(o.childPlotLayers,i,a,t)}}}_loadChildLayers(e,t,i,n){for(var r=0;r<e.length;r++){var o=e[r],a=this.addNode(_0x443259.SYMBOL_NODEGROUP,i);a.name=o.name,void 0===o.visibility?a.visible=o.visible:a.visible=o.visibility,this._loadSymbols(o.plotSymbols,t,a,n)}}_loadSymbols(e,t,i,n){for(var r=0;r<e.length;r++){var o=e[r];if(null!=o.graphicObject){o.graphicObject.bubbleHeight=o.bubbleHeight,o.graphicObject.bubbleWidth=o.bubbleWidth,o.graphicObject.description=o.description,o.graphicObject.mediaList=o.mediaList,null!=o.name&&(o.graphicObject.symbolName=o.name),null!=o.visible&&(o.graphicObject.visible=o.visible);var a=this.addNode(_0x443259.SYMBOL_NODE,i),s=WebGLPlot.toJSON(o.graphicObject);if(t.geoJsonToGeoGraphicObject(JSON.parse(s),(e=>{a.symbolUuid=e.feature.id,a.name=e.feature.symbolName,a.visible=e.feature.display,"function"==typeof n&&n()})),null!=o.lineRelations&&0!=o.lineRelations.length)for(var l=0;l<o.lineRelations.length;l++){var u=o.lineRelations[l];u.lineRelation.visible=u.visible;var c=new Cesium.LineRelationEffect({scene:this._scene});c.setStartFeature(u.lineRelation.startAssociation),c.setEndFeature(u.lineRelation.endAssociation)}}else{null!=o.name&&(o.graphicCompound.symbolName=o.name),null!=o.visible&&(o.graphicCompound.visible=o.visible);s=WebGLPlot.toJSON(o.graphicCompound);t.geoJsonToGeoGraphicObject(s,childPlotLayer,(function(e){a.symbolUuid=e.feature.id,a.name=e.feature.symbolName,a.visible=e.feature.display,"function"==typeof n&&n()}))}}}}var _0x471141=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x25bacd=_0x471141(void 0,(function(){return _0x25bacd.toString().search("(((.+)+)+)+$").toString().constructor(_0x25bacd).search("(((.+)+)+)+$")}));_0x25bacd();class _0x8cedc2 extends _0x3c19a2{constructor(e,t){if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("PlotCustomRadar scene is required.");super(e,t),this.PlotRadarType=_0x1416c0.PlotCustomRadar,this._add2Scene()}_updated(e){this._isNeedUpdate&&(this._isNeedUpdate=!1,this._updatedRadarPrimitive())}_add2Scene(){this._createRadarPrimitive()}_createRadarFillGeometry(e){return _0x45871f.createGeometry(new _0x45871f({customPts:e._customPts,slicePartitions:e.slicePartitions,stackPartitions:e.stackPartitions,radii:e.radii}),!0)}_createRadarOutLineGeometry(e){return _0x1fe166.createGeometry(new _0x1fe166({customPts:e._customPts,slicePartitions:e.slicePartitions,stackPartitions:e.stackPartitions,radii:e.radii,outlineWidth:e.outlineWidth}),!0)}getScanPts(e,t){var i=[];for(let r=0;r<e.length;r++){var n=[];const o=e[r];for(let e=0;e<t;e++){const t=o[e];n.push(t)}i.push(n)}return i}clone(e){return WebGLPlot.defined(e)?(e.id=this.id,e.point=this.point.clone(),e.rotate=this.rotate.clone(),e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e.minimumClock=this.minimumClock,e.maximumClock=this.maximumClock,e.minimumCone=this.minimumCone,e.maximumCone=this.maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new _0x8cedc2(this,this._scene)}}Object.defineProperties(_0x8cedc2.prototype,{customPts:{get:function(){return this._customPts},set:function(e){Array.isArray(e)&&(this._customPts=e,this._isNeedUpdate=!0)}}});const _0x172783=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x9544f1=_0x172783(void 0,(function(){return _0x9544f1.toString().search("(((.+)+)+)+$").toString().constructor(_0x9544f1).search("(((.+)+)+)+$")}));_0x9544f1();var WebGLPlot$3=window.WebGLPlot=window.WebGLPlot||{};function _0x362a5f(e){e=e||{},this.defaultFlag=!!e.defaultFlag&&e.defaultFlag,this.symbolStyle=new _0x5bc221,this.symbolTextStyle=new _0x37327d,this._gridSymbolSize=e.gridSymbolSize?e.gridSymbolSize:new WebGLPlot$3.Cartesian2(-1,-1),this._lineSymbolID=e.lineSymbolID?e.lineSymbolID:-1,this._gridLineWidth=e.gridLineWidth?e.gridLineWidth:-1,this._modelPath=e.modelPath?e.modelPath:"",this._isDistanceChangeMode=!!e.isDistanceChangeMode&&e.isDistanceChangeMode,this._changeModeDistanceMap=new Map,this.CLASS_NAME="DefaultStyle"}Object.defineProperties(_0x362a5f.prototype,{lineColor:{get:function(){return this.symbolStyle._lineColor},set:function(e){e!==this.symbolStyle._lineColor&&(this.symbolStyle.lineColor=e)}},lineWidth:{get:function(){return this.symbolStyle._lineWidth},set:function(e){e!==this.symbolStyle._lineWidth&&(this.symbolStyle.lineWidth=e)}},fillBackColor:{get:function(){return this.symbolStyle._fillBackColor},set:function(e){e!==this.symbolStyle._fillBackColor&&(this.symbolStyle.fillBackColor=e)}},fillForeColor:{get:function(){return this.symbolStyle._fillForeColor},set:function(e){e!==this.symbolStyle._fillForeColor&&(this.symbolStyle.fillForeColor=e)}},fillBackOpaque:{get:function(){return this.symbolStyle._fillBackOpaque},set:function(e){e!==this.symbolStyle._fillBackOpaque&&(this.symbolStyle.fillBackOpaque=e)}},fillGradientAngle:{get:function(){return this.symbolStyle._fillGradientAngle},set:function(e){e!==this.symbolStyle._fillGradientAngle&&(this.symbolStyle.fillGradientAngle=e)}},fillGradientMode:{get:function(){return this.symbolStyle._fillGradientMode},set:function(e){e!==this.symbolStyle._fillGradientMode&&(this.symbolStyle.fillGradientMode=e)}},fillGradientOffsetRatioY:{get:function(){return this.symbolStyle._fillGradientOffsetRatioY},set:function(e){e!==this.symbolStyle._fillGradientOffsetRatioY&&(this.symbolStyle.fillGradientOffsetRatioY=e)}},fillGradientOffsetRatioX:{get:function(){return this.symbolStyle._fillGradientOffsetRatioX},set:function(e){e!==this.symbolStyle._fillGradientOffsetRatioX&&(this.symbolStyle.fillGradientOffsetRatioX=e)}},fillSymbolID:{get:function(){return this.symbolStyle._fillSymbolID},set:function(e){e!==this.symbolStyle._fillSymbolID&&(this.symbolStyle.fillSymbolID=e)}},fillOpaqueRate:{get:function(){return this.symbolStyle._fillOpaqueRate},set:function(e){e===this.symbolStyle._fillOpaqueRate||e>100||e<0||(this.symbolStyle.fillOpaqueRate=e)}},surroundLineWidth:{get:function(){return this.symbolStyle._surroundLineWidth},set:function(e){e!==this.symbolStyle._surroundLineWidth&&(this.symbolStyle.surroundLineWidth=e)}},surroundLineColor:{get:function(){return this.symbolStyle._surroundLineColor},set:function(e){e!==this.symbolStyle._surroundLineColor&&(this.symbolStyle.surroundLineColor=e)}},opacity:{get:function(){return this.symbolStyle._opacity},set:function(e){e!==this.symbolStyle._opacity&&(this.symbolStyle.opacity=e)}},surroundLineType:{get:function(){return this.symbolStyle._surroundLineType},set:function(e){e!==this.symbolStyle._surroundLineType&&(this.symbolStyle.surroundLineType=e)}},height:{get:function(){return this.symbolTextStyle._height},set:function(e){e!==this.symbolTextStyle._height&&(this.symbolTextStyle.height=e)}},foreColor:{get:function(){return this.symbolTextStyle._foreColor},set:function(e){e!==this.symbolTextStyle._foreColor&&(this.symbolTextStyle.foreColor=e)}},backColor:{get:function(){return this.symbolTextStyle._backColor},set:function(e){e!==this.symbolTextStyle._backColor&&(this.symbolTextStyle.backColor=e)}},outline:{get:function(){return this.symbolTextStyle._outline},set:function(e){e!==this.symbolTextStyle._outline&&(this.symbolTextStyle.outline=e)}},fontName:{get:function(){return this.symbolTextStyle._fontName},set:function(e){e!==this.symbolTextStyle._fontName&&(this.symbolTextStyle.fontName=e)}},italic:{get:function(){return this.symbolTextStyle._italic},set:function(e){e!==this.symbolTextStyle._italic&&(this.symbolTextStyle.italic=e)}},bold:{get:function(){return this.symbolTextStyle._bold},set:function(e){e!==this.symbolTextStyle._bold&&(this.symbolTextStyle.bold=e)}},align:{get:function(){return this.symbolTextStyle._align},set:function(e){e!==this.symbolTextStyle._italic&&(this.symbolTextStyle.align=e)}},italicAngle:{get:function(){return this.symbolTextStyle._italicAngle},set:function(e){e!==this.symbolTextStyle._italicAngle&&(this.symbolTextStyle.italicAngle=e)}},shadow:{get:function(){return this.symbolTextStyle._shadow},set:function(e){e!==this.symbolTextStyle._shadow&&(this.symbolTextStyle.shadow=e)}},sizeFixed:{get:function(){return this.symbolTextStyle._sizeFixed},set:function(e){e!==this.symbolTextStyle._sizeFixed&&(this.symbolTextStyle.sizeFixed=e)}},underline:{get:function(){return this.symbolTextStyle._underline},set:function(e){e!==this.symbolTextStyle._underline&&(this.symbolTextStyle.underline=e)}},backOpaque:{get:function(){return this.symbolTextStyle._backOpaque},set:function(e){e!==this.symbolTextStyle._backOpaque&&(this.symbolTextStyle.backOpaque=e)}},strikeout:{get:function(){return this.symbolTextStyle._strikeout},set:function(e){e!==this.symbolTextStyle._strikeout&&(this.symbolTextStyle.strikeout=e)}},borderSpacingWidth:{get:function(){return this._borderSpacingWidth},set:function(e){e!==this._borderSpacingWidth&&(this._borderSpacingWidth=e)}},outlineWidth:{get:function(){return this.symbolTextStyle._outlineWidth},set:function(e){e!==this.symbolTextStyle._outlineWidth&&(this.symbolTextStyle.outlineWidth=e)}},fontWidth:{get:function(){return this.symbolTextStyle._fontWidth},set:function(e){e!==this.symbolTextStyle._fontWidth&&(this.symbolTextStyle.fontWidth=e)}},opaqueRate:{get:function(){return this.symbolTextStyle._opaqueRate},set:function(e){e!==this.symbolTextStyle._opaqueRate&&(this.symbolTextStyle.opaqueRate=e)}},stringAlignment:{get:function(){return this.symbolTextStyle._stringAlignment},set:function(e){e!==this.symbolTextStyle._stringAlignment&&(this.symbolTextStyle.stringAlignment=e)}},text3DScale:{get:function(){return this.symbolTextStyle._text3DScale},set:function(e){e!==this.symbolTextStyle._text3DScale&&(this.symbolTextStyle.text3DScale=e)}},fontWeight:{get:function(){return this.symbolTextStyle._fontWeight},set:function(e){e!==this.symbolTextStyle._fontWeight&&(this.symbolTextStyle.fontWeight=e)}},fontSize:{get:function(){return this.symbolTextStyle._fontSize},set:function(e){e!==this.symbolTextStyle._fontSize&&(this.symbolTextStyle.fontSize=e)}},outlineColor:{get:function(){return this.symbolTextStyle._outlineColor},set:function(e){e!==this.symbolTextStyle._outlineColor&&(this.symbolTextStyle.outlineColor=e)}},gridSymbolSize:{get:function(){return this._gridSymbolSize},set:function(e){e.x>0&&e.y>0&&(this._gridSymbolSize=e)}},lineSymbolID:{get:function(){return this._lineSymbolID},set:function(e){this._lineSymbolID!==e&&(this._lineSymbolID=e)}},gridLineWidth:{get:function(){return this._gridLineWidth},set:function(e){this._gridLineWidth!==e&&(this._gridLineWidth=e)}},modelPath:{get:function(){return this._modelPath},set:function(e){this._modelPath!==e&&(this._modelPath=e)}},isDistanceChangeMode:{get:function(){return this._isDistanceChangeMode},set:function(e){this._isDistanceChangeMode!==e&&(this._isDistanceChangeMode=e)}},changeModeDistanceMap:{get:function(){return 0===this._changeModeDistanceMap.size&&(this._changeModeDistanceMap.set(_0x3f7d9f.Marker,5),this._changeModeDistanceMap.set(_0x3f7d9f.Picture,1/0)),this._changeModeDistanceMap},set:function(e){if(e instanceof Map){let t=new Map([...e.entries()]);this._changeModeDistanceMap.clear();for(let[e,i]of t)this._changeModeDistanceMap.set(e,i)}}}}),WebGLPlot$3.DefaultStyle=_0x362a5f;var _0x9c2368=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1e63e4=_0x9c2368(void 0,(function(){return _0x1e63e4.toString().search("(((.+)+)+)+$").toString().constructor(_0x1e63e4).search("(((.+)+)+)+$")}));_0x1e63e4();var CommonOneTextureFp="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform sampler2D uTexture0;\n\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\n\nvoid main()\n{\n#ifdef GL_EXT_frag_depth\n\tgl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef WEBGL2\n\tgl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n vec2 texcoord = vTexCoord.xy;\n gl_FragColor = texture2D(uTexture0, texcoord);\n}",_0x16040e=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1db635=_0x16040e(void 0,(function(){return _0x1db635.toString().search("(((.+)+)+)+$").toString().constructor(_0x1db635).search("(((.+)+)+)+$")}));_0x1db635();var DepthMapAnalysisVp="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\nuniform mat4 uRenderTextureMatrix;\nvarying vec4 renderTextureCoord;\nvarying float texcoordX;\n#ifdef LOG_DEPTH\nvarying float v_rttLogZ;\n#endif\nvarying vec4 vPositionEC;\nvoid main()\n{\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n vec4 viewPos = czm_modelView * vec4(aPosition.xyz, 1.0);\n vPositionEC = viewPos;\n renderTextureCoord = uRenderTextureMatrix * viewPos;\n texcoordX = aTexCoord0.x;\n}",_0x30e92d=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x77a281=_0x30e92d(void 0,(function(){return _0x77a281.toString().search("(((.+)+)+)+$").toString().constructor(_0x77a281).search("(((.+)+)+)+$")}));_0x77a281();var ModifyRegionBottomFp="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform sampler2D uColorTexture;\nuniform sampler2D uHypsometricTexture;\nuniform sampler2D uHypsometricRenderTexture;\nuniform float uHypHasColorTable;\nuniform float uHypContourFillMode;\nuniform float uHypContourInterval;\nuniform float uHypOpacity;\nuniform float uHypMaxVisibleValue;\nuniform float uHypMinVisibleValue;\nuniform float uHypFloor;\nuniform float uHypCeil;\nuniform vec4 uHypLineColor;\nuniform float uHypHasAnalysisRegion;\nuniform vec4 uGeoBounds;\nuniform vec4 uHypRect;\n\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvarying float fHeight;\n\n\nfloat computeMixCon(float height)\n{\n\tfloat distanceToContour = mod(height - 0.0002, uHypContourInterval);\n\tfloat dxc = abs(dFdx(height));\n\tfloat dyc = abs(dFdy(height));\n\tfloat dF = max(dxc, dyc);\n\treturn (distanceToContour < dF) ? 1.0 : 0.0;\n}\n\nvec4 computeContourMapColor(float height)\n{\n\tfloat threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n\tfloat contourRate = (height - uHypFloor) / threshold;\n\tfloat finalCoord = clamp(contourRate, 0.0, 1.0);\n\tvec2 contourCoord = vec2(0.0, finalCoord);\n\treturn texture2D(uHypsometricTexture, contourCoord).rgba;\n}\n\nvoid main()\n{\n#ifdef GL_EXT_frag_depth\n gl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef WEBGL2\n gl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n vec2 texcoord = vTexCoord.xy;\n gl_FragColor = texture2D(uColorTexture, texcoord);\n if(uHypHasColorTable > 0.1)\n {\n float bNext = 1.0;\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec2 polyTexCoord = vTexCoord.xy;\n polyTexCoord.x = polyTexCoord.x * (uGeoBounds.z - uGeoBounds.x) + uGeoBounds.x;\n polyTexCoord.y = polyTexCoord.y * (uGeoBounds.w - uGeoBounds.y) + uGeoBounds.y;\n if(polyTexCoord.x>uHypRect.x && polyTexCoord.x<uHypRect.z && polyTexCoord.y> uHypRect.y&& polyTexCoord.y < uHypRect.w)\n {\n polyTexCoord.xy = polyTexCoord.xy - vec2(uHypRect.x, uHypRect.w);\n polyTexCoord.x = polyTexCoord.x / (uHypRect.z - uHypRect.x);\n polyTexCoord.y = 1.0 - polyTexCoord.y / (uHypRect.y - uHypRect.w);\n vec4 hypColor = texture2D(uHypsometricRenderTexture, polyTexCoord);\n if(hypColor.r < 0.1)\n {\n bNext = 0.0;\n }\n }\n else\n {\n bNext = 0.0;\n }\n }\n if(bNext > 0.2)\n {\n vec4 contourMapColor = vec4(1.0);\n float finalOpacity = uHypOpacity;\n if(fHeight <= uHypMaxVisibleValue && fHeight >= uHypMinVisibleValue)\n {\n#ifdef GL_OES_standard_derivatives\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fHeight);\n contourMapColor = mix(computeContourMapColor(fHeight), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fHeight);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n#else\n if(uHypContourFillMode > 0.9)\n#endif\n {\n contourMapColor = computeContourMapColor(fHeight);\n }\n else\n {\n finalOpacity = 0.0;\n }\n }\n else\n {\n finalOpacity = 0.5;\n }\n gl_FragColor = mix(gl_FragColor, contourMapColor, finalOpacity);\n }\n }\n}",_0x3936db=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x144320=_0x3936db(void 0,(function(){return _0x144320.toString().search("(((.+)+)+)+$").toString().constructor(_0x144320).search("(((.+)+)+)+$")}));_0x144320();var ModifyRegionBottomVp="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\n#ifdef RENDER_POINT\nuniform float uPointSize;\n#endif\n\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvarying float fHeight;\n\nvec4 depthClampFarPlane(vec4 clipPos)\n{\n\tfWindowZ = (0.5 * (clipPos.z / clipPos.w) + 0.5) * clipPos.w;\n\tclipPos.z = min(clipPos.z, clipPos.w);\n\treturn clipPos;\n}\nvoid main()\n{\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n gl_Position = depthClampFarPlane(pos);\n vTexCoord = aTexCoord0.xy;\n clip_vertex = czm_modelView * vec4(aPosition.xyz, 1.0);\n fHeight = aPosition.w;\n#ifdef RENDER_POINT\n gl_PointSize = uPointSize;\n#endif\n}",_0x4d173f=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1d16bb=_0x4d173f(void 0,(function(){return _0x1d16bb.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d16bb).search("(((.+)+)+)+$")}));_0x1d16bb();var ModifyRegionOuterFS="varying vec2 vTexCoord;\nuniform sampler2D uColorTexture;\nvoid main()\n{\n gl_FragColor = texture2D(uColorTexture, vTexCoord);\n}",_0x1ee3a5=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x576ec1=_0x1ee3a5(void 0,(function(){return _0x576ec1.toString().search("(((.+)+)+)+$").toString().constructor(_0x576ec1).search("(((.+)+)+)+$")}));_0x576ec1();var ModifyRegionOuterVS="attribute vec4 aPosition;\nattribute vec2 aTexCoord;\nuniform vec2 uMinMaxModifyHeight;\nvarying vec2 vTexCoord;\nuniform sampler2D uHeightTexture;\nvoid main()\n{\n float terrainHeight = czm_unpackValue(texture2D(uHeightTexture, aTexCoord));\n float height = aPosition.z + terrainHeight;\n vec4 vertexPos = vec4(aPosition.xy, height, 1.0);\n gl_Position = czm_modelViewProjection * vertexPos;\n vTexCoord = aTexCoord;\n}",_0x37c340=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x371c19=_0x37c340(void 0,(function(){return _0x371c19.toString().search("(((.+)+)+)+$").toString().constructor(_0x371c19).search("(((.+)+)+)+$")}));_0x371c19();var ModifyRegionSideFp="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform sampler2D uHeightTexture;\nuniform sampler2D uColorTexture;\n\nuniform sampler2D uHypsometricTexture;\nuniform sampler2D uHypsometricRenderTexture;\nuniform float uHypHasColorTable;\nuniform float uHypContourFillMode;\nuniform float uHypContourInterval;\nuniform float uHypOpacity;\nuniform float uHypMaxVisibleValue;\nuniform float uHypMinVisibleValue;\nuniform float uHypFloor;\nuniform float uHypCeil;\nuniform vec4 uHypLineColor;\nuniform float uHypHasAnalysisRegion;\nuniform vec4 uGeoBounds;\nuniform vec4 uHypRect;\nvarying vec2 vTexcoord;\nvarying float fHeight;\nvarying float height;\nvarying float regionHeight;\n#ifdef Excavation\nvarying vec2 vTexcoord1;\n#endif\n\nfloat computeMixCon(float height)\n{\n\tfloat distanceToContour = mod(height - 0.0002, uHypContourInterval);\n\tfloat dxc = abs(dFdx(height));\n\tfloat dyc = abs(dFdy(height));\n\tfloat dF = max(dxc, dyc);\n\treturn (distanceToContour < dF) ? 1.0 : 0.0;\n}\n\nvec4 computeContourMapColor(float height)\n{\n\tfloat threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n\tfloat contourRate = (height - uHypFloor) / threshold;\n\tfloat finalCoord = clamp(contourRate, 0.0, 1.0);\n\tvec2 contourCoord = vec2(0.0, finalCoord);\n\treturn texture2D(uHypsometricTexture, contourCoord).rgba;\n}\n\nvoid main()\n{\nczm_writeDepthClampedToFarPlane();\n\tvec2 texcoord = vTexcoord;\n#ifdef Excavation\n\ttexcoord = vTexcoord1;\n#endif\nfloat terrainHeight = max(czm_unpackValue(texture2D(uHeightTexture, vTexcoord)), 0.0);\nif(terrainHeight < -10000.0 || terrainHeight > 20000.0){\n terrainHeight = 0.0;\n}\n#ifndef Excavation\n if(regionHeight > terrainHeight)\n {\n if(height > regionHeight|| height < terrainHeight - 500.0)\n {\n discard;\n }\n }\n else\n {\n if(height > terrainHeight || height < regionHeight - 500.0)\n {\n discard;\n }\n }\n#else\n if(height > terrainHeight || height < regionHeight)\n {\n discard;\n }\n#endif\n\tgl_FragColor = vec4(texture2D(uColorTexture, texcoord).rgb, 1.0);\n\tif(uHypHasColorTable > 0.1)\n {\n float bNext = 1.0;\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec2 polyTexCoord = vTexcoord.xy;\n polyTexCoord.x = polyTexCoord.x * (uGeoBounds.z - uGeoBounds.x) + uGeoBounds.x;\n polyTexCoord.y = polyTexCoord.y * (uGeoBounds.w - uGeoBounds.y) + uGeoBounds.y;\n if(polyTexCoord.x>uHypRect.x && polyTexCoord.x<uHypRect.z && polyTexCoord.y> uHypRect.y&& polyTexCoord.y < uHypRect.w)\n {\n polyTexCoord.xy = polyTexCoord.xy - vec2(uHypRect.x, uHypRect.w);\n polyTexCoord.x = polyTexCoord.x / (uHypRect.z - uHypRect.x);\n polyTexCoord.y = 1.0 - polyTexCoord.y / (uHypRect.y - uHypRect.w);\n vec4 hypColor = texture2D(uHypsometricRenderTexture, polyTexCoord);\n if(hypColor.r < 0.1)\n {\n bNext = 0.0;\n }\n }\n else\n {\n bNext = 0.0;\n }\n }\n if(bNext > 0.2)\n {\n vec4 contourMapColor = vec4(1.0);\n float finalOpacity = uHypOpacity;\n if(fHeight <= uHypMaxVisibleValue && fHeight >= uHypMinVisibleValue)\n {\n#ifdef GL_OES_standard_derivatives\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fHeight);\n contourMapColor = mix(computeContourMapColor(fHeight), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fHeight);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n#else\n if(uHypContourFillMode > 0.9)\n#endif\n {\n contourMapColor = computeContourMapColor(fHeight);\n }\n else\n {\n finalOpacity = 0.0;\n }\n }\n else\n {\n finalOpacity = 0.5;\n }\n gl_FragColor = mix(gl_FragColor, contourMapColor, finalOpacity);\n }\n }\n}",_0x3d6edd=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x357be6=_0x3d6edd(void 0,(function(){return _0x357be6.toString().search("(((.+)+)+)+$").toString().constructor(_0x357be6).search("(((.+)+)+)+$")}));_0x357be6();var ModifyRegionSideVp="attribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n\nuniform sampler2D uTexture0;\nvarying vec2 vTexcoord;\nvarying float fHeight;\nvarying float height;\nvarying float regionHeight;\n#ifdef Excavation\nvarying vec2 vTexcoord1;\n#endif\n\nvoid main()\n{\n\tvTexcoord = aTexCoord0.xy;\n#ifdef Excavation\n\tvTexcoord1 = aTexCoord1.xy;\n#endif\n\tgl_Position = czm_depthClampFarPlane(czm_modelViewProjection * vec4(aPosition.xyz, 1.0));\n\theight = aPosition.w;\n\tregionHeight = aTexCoord0.z;\n}",_0x10413b=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x56c59c=_0x10413b(void 0,(function(){return _0x56c59c.toString().search("(((.+)+)+)+$").toString().constructor(_0x56c59c).search("(((.+)+)+)+$")}));_0x56c59c();var S3MTilesBillboardVp="attribute vec3 aPosition;\n\nattribute vec3 aNormal;\n\nattribute vec4 aTexCoord0;\n\nattribute vec4 aTexCoord1;\n\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\n\nvarying vec4 vColor;\nvarying float fVertexColor;\nvarying vec4 vSecondColor;\nvarying vec4 vAmbientColor;\nvarying vec2 vTexCoord;\nvarying vec2 vSecondTexCoord;\nvarying vec4 clip_vertex;\n\nuniform vec4 uDiffuseColor;\nuniform vec4 uAmbientColor;\n\nvoid main()\n{\n vTexCoord = aTexCoord0.xy;\n vSecondTexCoord = aTexCoord1.xy;\n\tvec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n vColor = vertexColor * uDiffuseColor;\n fVertexColor = vertexColor.a;\n vec4 viewPos = czm_modelView * vec4(aPosition, 1.0);\n viewPos.xyz = viewPos.xyz + aNormal;\n clip_vertex = viewPos;\n gl_Position = czm_projection * viewPos;\n vAmbientColor = uAmbientColor;\n}",_0x4ca0d7=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x5224b0=_0x4ca0d7(void 0,(function(){return _0x5224b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x5224b0).search("(((.+)+)+)+$")}));_0x5224b0();var SightlineAnalysisFp="uniform sampler2D uTexture0;\nuniform vec4 uVisibleColor;\nuniform vec4 uHiddenColor;\n\nvarying vec4 renderTextureCoord;\nvarying float texcoordX;\nvarying vec4 vPositionEC;void main()\n{\n vec4 resultColor = vec4(uVisibleColor.rgb, 1.0);\n vec4 texCoord = renderTextureCoord / renderTextureCoord.w;\n float depth = texCoord.z * 0.5 + 0.5;\n // float depthBias = 0.0005 * max(-vPositionEC.z * 0.01, 1.0);\n // depth -= depthBias;\n texCoord.xy = texCoord.xy * 0.5 + 0.5;\n if(abs(texcoordX - 1.0) < 0.0001)\n {\n\t\tfloat z_window = czm_unpackDepth(texture2D(uTexture0, texCoord.xy));\n\t\tif(z_window < depth && z_window > 0.0 && z_window < 1.0)\n\t\t{\n\t\t\tresultColor = vec4(uHiddenColor.rgb, 1.0);\n\t\t}\n }\n else\n {\n\t\tresultColor = vec4(0.4, 0.4, 0.4, 1.0);\n }\n gl_FragColor = resultColor;\n}",N="http://www.w3.org/2000/svg",O$1="http://www.w3.org/1999/xlink",S$3,x$3=e$1z.fromCssColorString("rgba(247,250,255,0.384)"),E$3=e$1z.fromCssColorString("rgba(143,191,255,0.216)"),L$5=e$1z.fromCssColorString("rgba(153,197,255,0.098)"),R=e$1z.fromCssColorString("rgba(255,255,255,0.086)"),I=e$1z.fromCssColorString("rgba(255,255,255,0.267)"),Y$1=e$1z.fromCssColorString("rgba(255,255,255,0)"),F=e$1z.fromCssColorString("rgba(66,67,68,0.3)"),X$1=e$1z.fromCssColorString("rgba(0,0,0,0.5)");function b$3(e){return e$1z.fromCssColorString(window.getComputedStyle(e).getPropertyValue("color"))}function g$2(e){var t=document.createElementNS(N,e.tagName);for(var i in e)if(e.hasOwnProperty(i)&&"tagName"!==i)if("children"===i){var n,r=e.children.length;for(n=0;n<r;++n)t.appendChild(g$2(e.children[n]))}else 0===i.indexOf("xlink:")?t.setAttributeNS(O$1,i.substring(6),e[i]):"textContent"===i?t.textContent=e[i]:t.setAttribute(i,e[i]);return t}function z$1(e,t,i){var n=document.createElementNS(N,"text");n.setAttribute("x",e),n.setAttribute("y",t),n.setAttribute("class","cesium-animation-svgText");var r=document.createElementNS(N,"tspan");return r.textContent=i,n.appendChild(r),n}function K$1(e,t,i){e.setAttribute("transform","translate(100,100) rotate("+i+")"),t.setAttribute("transform","rotate("+i+")")}var k$2=new e$1z;function a$1(e,t){var i=t.alpha,n=1-i;return k$2.red=e.red*n+t.red*i,k$2.green=e.green*n+t.green*i,k$2.blue=e.blue*n+t.blue*i,k$2.toCssColorString()}function A$3(e,t,i){return g$2({tagName:"g",class:"cesium-animation-rectButton",transform:"translate("+e+","+t+")",children:[{tagName:"rect",class:"cesium-animation-buttonGlow",width:32,height:32,rx:2,ry:2},{tagName:"rect",class:"cesium-animation-buttonMain",width:32,height:32,rx:4,ry:4},{tagName:"use",class:"cesium-animation-buttonPath","xlink:href":i},{tagName:"title",textContent:""}]})}function q(e,t,i){return g$2({tagName:"g",class:"cesium-animation-rectButton",transform:"translate("+e+","+t+")",children:[{tagName:"use",class:"cesium-animation-buttonGlow","xlink:href":"#animation_pathWingButton"},{tagName:"use",class:"cesium-animation-buttonMain","xlink:href":"#animation_pathWingButton"},{tagName:"use",class:"cesium-animation-buttonPath","xlink:href":i},{tagName:"title",textContent:""}]})}function j$1(e,t){var i=e._viewModel,n=i.shuttleRingDragging;if(!n||S$3===e)if("mousedown"===t.type||n&&"mousemove"===t.type||"touchstart"===t.type&&1===t.touches.length||n&&"touchmove"===t.type&&1===t.touches.length){var r,o,a=e._centerX,s=e._centerY,l=e._svgNode.getBoundingClientRect();if("touchstart"===t.type||"touchmove"===t.type?(r=t.touches[0].clientX,o=t.touches[0].clientY):(r=t.clientX,o=t.clientY),!n&&(r>l.right||r<l.left||o<l.top||o>l.bottom))return;var u=e._shuttleRingPointer.getBoundingClientRect(),c=r-a-l.left,h=o-s-l.top,d=180*Math.atan2(h,c)/Math.PI+90;d>180&&(d-=360);var f=i.shuttleRingAngle;n||r<u.right&&r>u.left&&o>u.top&&o<u.bottom?(S$3=e,i.shuttleRingDragging=!0,i.shuttleRingAngle=d):d<f?i.slower():d>f&&i.faster(),t.preventDefault()}else e===S$3&&(S$3=void 0),i.shuttleRingDragging=!1}function f$3(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$2(t,"toggled",this.setToggled,this),a$2(t,"tooltip",this.setTooltip,this),a$2(t.command,"canExecute",this.setEnabled,this)]}function y$4(e,t){if(!t$$(e))throw new t$_("container is required.");if(!t$$(t))throw new t$_("viewModel is required.");e=o$a(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 i=document.createElement("style");i.textContent=".cesium-animation-rectButton .cesium-animation-buttonGlow { filter: url(#animation_blurred); }.cesium-animation-rectButton .cesium-animation-buttonMain { fill: url(#animation_buttonNormal); }.cesium-animation-buttonToggled .cesium-animation-buttonMain { fill: url(#animation_buttonToggled); }.cesium-animation-rectButton:hover .cesium-animation-buttonMain { fill: url(#animation_buttonHovered); }.cesium-animation-buttonDisabled .cesium-animation-buttonMain { fill: url(#animation_buttonDisabled); }.cesium-animation-shuttleRingG .cesium-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshGradient); }.cesium-animation-shuttleRingG:hover .cesium-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshHovered); }.cesium-animation-shuttleRingPointer { fill: url(#animation_shuttleRingPointerGradient); }.cesium-animation-shuttleRingPausePointer { fill: url(#animation_shuttleRingPointerPaused); }.cesium-animation-knobOuter { fill: url(#animation_knobOuter); }.cesium-animation-knobInner { fill: url(#animation_knobInner); }",document.head.insertBefore(i,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 r=document.createElementNS(N,"svg:svg");this._svgNode=r,r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",O$1);var o=document.createElementNS(N,"g");this._topG=o,this._realtimeSVG=new f$3(q(3,4,"#animation_pathClock"),t.playRealtimeViewModel),this._playReverseSVG=new f$3(A$3(44,99,"#animation_pathPlayReverse"),t.playReverseViewModel),this._playForwardSVG=new f$3(A$3(124,99,"#animation_pathPlay"),t.playForwardViewModel),this._pauseSVG=new f$3(A$3(84,99,"#animation_pathPause"),t.pauseViewModel);var a=document.createElementNS(N,"g");a.appendChild(this._realtimeSVG.svgElement),a.appendChild(this._playReverseSVG.svgElement),a.appendChild(this._playForwardSVG.svgElement),a.appendChild(this._pauseSVG.svgElement);var s=g$2({tagName:"circle",class:"cesium-animation-shuttleRingBack",cx:100,cy:100,r:99});this._shuttleRingBackPanel=s;var l=g$2({tagName:"g",class:"cesium-animation-shuttleRingSwoosh",children:[{tagName:"use",transform:"translate(100,97) scale(-1,1)","xlink:href":"#animation_pathSwooshFX"},{tagName:"use",transform:"translate(100,97)","xlink:href":"#animation_pathSwooshFX"},{tagName:"line",x1:100,y1:8,x2:100,y2:22}]});this._shuttleRingSwooshG=l,this._shuttleRingPointer=g$2({tagName:"use",class:"cesium-animation-shuttleRingPointer","xlink:href":"#animation_pathPointer"});var u=g$2({tagName:"g",transform:"translate(100,100)"});this._knobOuter=g$2({tagName:"circle",class:"cesium-animation-knobOuter",cx:0,cy:0,r:71});var c=g$2({tagName:"circle",class:"cesium-animation-knobInner",cx:0,cy:0,r:61});this._knobDate=z$1(0,-24,""),this._knobTime=z$1(0,-7,""),this._knobStatus=z$1(0,-41,"");var h=g$2({tagName:"circle",class:"cesium-animation-blank",cx:0,cy:0,r:61}),d=document.createElementNS(N,"g");d.setAttribute("class","cesium-animation-shuttleRingG"),e.appendChild(n),o.appendChild(d),o.appendChild(u),o.appendChild(a),d.appendChild(s),d.appendChild(l),d.appendChild(this._shuttleRingPointer),u.appendChild(this._knobOuter),u.appendChild(c),u.appendChild(this._knobDate),u.appendChild(this._knobTime),u.appendChild(this._knobStatus),u.appendChild(h),r.appendChild(o),e.appendChild(r);var f=this;function p(e){j$1(f,e)}this._mouseCallback=p,s.addEventListener("mousedown",p,!0),s.addEventListener("touchstart",p,!0),l.addEventListener("mousedown",p,!0),l.addEventListener("touchstart",p,!0),document.addEventListener("mousemove",p,!0),document.addEventListener("touchmove",p,!0),document.addEventListener("mouseup",p,!0),document.addEventListener("touchend",p,!0),document.addEventListener("touchcancel",p,!0),this._shuttleRingPointer.addEventListener("mousedown",p,!0),this._shuttleRingPointer.addEventListener("touchstart",p,!0),this._knobOuter.addEventListener("mousedown",p,!0),this._knobOuter.addEventListener("touchstart",p,!0);var _,m=this._knobTime.childNodes[0],$=this._knobDate.childNodes[0],g=this._knobStatus.childNodes[0];this._subscriptions=[a$2(t.pauseViewModel,"toggled",(function(e){_!==e&&((_=e)?f._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPausePointer"):f._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPointer"))})),a$2(t,"shuttleRingAngle",(function(e){K$1(f._shuttleRingPointer,f._knobOuter,e)})),a$2(t,"dateLabel",(function(e){$.textContent!==e&&($.textContent=e)})),a$2(t,"timeLabel",(function(e){m.textContent!==e&&(m.textContent=e)})),a$2(t,"multiplierLabel",(function(e){g.textContent!==e&&(g.textContent=e)}))],this.applyThemeChanges(),this.resize()}f$3.prototype.destroy=function(){this.svgElement.removeEventListener("click",this._clickFunction,!0);for(var e=this._subscriptions,t=0,i=e.length;t<i;t++)e[t].dispose();s$1e(this)},f$3.prototype.isDestroyed=function(){return!1},f$3.prototype.setEnabled=function(e){if(this._enabled!==e){if(this._enabled=e,!e)return void this.svgElement.setAttribute("class","cesium-animation-buttonDisabled");if(this._toggled)return void this.svgElement.setAttribute("class","cesium-animation-rectButton cesium-animation-buttonToggled");this.svgElement.setAttribute("class","cesium-animation-rectButton")}},f$3.prototype.setToggled=function(e){this._toggled!==e&&(this._toggled=e,this._enabled&&(e?this.svgElement.setAttribute("class","cesium-animation-rectButton cesium-animation-buttonToggled"):this.svgElement.setAttribute("class","cesium-animation-rectButton")))},f$3.prototype.setTooltip=function(e){this.svgElement.getElementsByTagName("title")[0].textContent=e},Object.defineProperties(y$4.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),y$4.prototype.isDestroyed=function(){return!1},y$4.prototype.destroy=function(){t$$(this._observer)&&(this._observer.disconnect(),this._observer=void 0);var e=this._mouseCallback;this._shuttleRingBackPanel.removeEventListener("mousedown",e,!0),this._shuttleRingBackPanel.removeEventListener("touchstart",e,!0),this._shuttleRingSwooshG.removeEventListener("mousedown",e,!0),this._shuttleRingSwooshG.removeEventListener("touchstart",e,!0),document.removeEventListener("mousemove",e,!0),document.removeEventListener("touchmove",e,!0),document.removeEventListener("mouseup",e,!0),document.removeEventListener("touchend",e,!0),document.removeEventListener("touchcancel",e,!0),this._shuttleRingPointer.removeEventListener("mousedown",e,!0),this._shuttleRingPointer.removeEventListener("touchstart",e,!0),this._knobOuter.removeEventListener("mousedown",e,!0),this._knobOuter.removeEventListener("touchstart",e,!0),this._container.removeChild(this._svgNode),this._container.removeChild(this._theme),this._realtimeSVG.destroy(),this._playReverseSVG.destroy(),this._playForwardSVG.destroy(),this._pauseSVG.destroy();for(var t=this._subscriptions,i=0,n=t.length;i<n;i++)t[i].dispose();return s$1e(this)},y$4.prototype.resize=function(){var e=this._container.clientWidth,t=this._container.clientHeight;if(e!==this._lastWidth||t!==this._lastHeight){var i=this._svgNode,n=200,r=132,o=e,a=t;0===e&&0===t?(o=n,a=r):0===e?(a=t,o=n*(t/r)):0===t&&(o=e,a=r*(e/n));var s=o/n,l=a/r;i.style.cssText="width: "+o+"px; height: "+a+"px; position: absolute; bottom: 0; left: 0; overflow: hidden;",i.setAttribute("width",o),i.setAttribute("height",a),i.setAttribute("viewBox","0 0 "+o+" "+a),this._topG.setAttribute("transform","scale("+s+","+l+")"),this._centerX=Math.max(1,100*s),this._centerY=Math.max(1,100*l),this._lastHeight=e,this._lastWidth=t}},y$4.prototype.applyThemeChanges=function(){if(!document.body.contains(this._container)){if(t$$(this._observer))return;var e=this;return e._observer=new MutationObserver((function(){document.body.contains(e._container)&&(e._observer.disconnect(),e._observer=void 0,e.applyThemeChanges())})),void e._observer.observe(document,{childList:!0,subtree:!0})}var t=b$3(this._themeNormal),i=b$3(this._themeHover),n=b$3(this._themeSelect),r=b$3(this._themeDisabled),o=b$3(this._themeKnob),a=b$3(this._themePointer),s=b$3(this._themeSwoosh),l=b$3(this._themeSwooshHover),u=g$2({tagName:"defs",children:[{id:"animation_buttonNormal",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":a$1(t,x$3)},{tagName:"stop",offset:"12%","stop-color":a$1(t,E$3)},{tagName:"stop",offset:"46%","stop-color":a$1(t,L$5)},{tagName:"stop",offset:"81%","stop-color":a$1(t,R)}]},{id:"animation_buttonHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":a$1(i,x$3)},{tagName:"stop",offset:"12%","stop-color":a$1(i,E$3)},{tagName:"stop",offset:"46%","stop-color":a$1(i,L$5)},{tagName:"stop",offset:"81%","stop-color":a$1(i,R)}]},{id:"animation_buttonToggled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":a$1(n,x$3)},{tagName:"stop",offset:"12%","stop-color":a$1(n,E$3)},{tagName:"stop",offset:"46%","stop-color":a$1(n,L$5)},{tagName:"stop",offset:"81%","stop-color":a$1(n,R)}]},{id:"animation_buttonDisabled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":a$1(r,I)},{tagName:"stop",offset:"75%","stop-color":a$1(r,Y$1)}]},{id:"animation_blurred",tagName:"filter",width:"200%",height:"200%",x:"-50%",y:"-50%",children:[{tagName:"feGaussianBlur",stdDeviation:4,in:"SourceGraphic"}]},{id:"animation_shuttleRingSwooshGradient",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":s.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":s.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":s.toCssColorString()}]},{id:"animation_shuttleRingSwooshHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":l.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":l.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":l.toCssColorString()}]},{id:"animation_shuttleRingPointerGradient",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":a.toCssColorString()},{tagName:"stop",offset:"40%","stop-color":a.toCssColorString()},{tagName:"stop",offset:"60%","stop-color":a$1(a,X$1)},{tagName:"stop",offset:"100%","stop-color":a$1(a,X$1)}]},{id:"animation_shuttleRingPointerPaused",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":"#CCC"},{tagName:"stop",offset:"40%","stop-color":"#CCC"},{tagName:"stop",offset:"60%","stop-color":"#555"},{tagName:"stop",offset:"100%","stop-color":"#555"}]},{id:"animation_knobOuter",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":a$1(o,x$3)},{tagName:"stop",offset:"60%","stop-color":a$1(o,F)},{tagName:"stop",offset:"85%","stop-color":a$1(o,E$3)}]},{id:"animation_knobInner",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":a$1(o,F)},{tagName:"stop",offset:"60%","stop-color":a$1(o,x$3)},{tagName:"stop",offset:"85%","stop-color":a$1(o,R)}]},{id:"animation_pathReset",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.316,5.318,9.833,13.682,9.833,5.5,5.5,5.5,5.5,25.5,9.833,25.5,9.833,17.318,24.316,25.682z"},{id:"animation_pathPause",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M13,5.5,7.5,5.5,7.5,25.5,13,25.5zM24.5,5.5,19,5.5,19,25.5,24.5,25.5z"},{id:"animation_pathPlay",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},{id:"animation_pathPlayReverse",tagName:"path",transform:"translate(16,16) scale(-0.85,0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},{id:"animation_pathLoop",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.249,15.499c-0.009,4.832-3.918,8.741-8.75,8.75c-2.515,0-4.768-1.064-6.365-2.763l2.068-1.442l-7.901-3.703l0.744,8.694l2.193-1.529c2.244,2.594,5.562,4.242,9.26,4.242c6.767,0,12.249-5.482,12.249-12.249H24.249zM15.499,6.75c2.516,0,4.769,1.065,6.367,2.764l-2.068,1.443l7.901,3.701l-0.746-8.693l-2.192,1.529c-2.245-2.594-5.562-4.245-9.262-4.245C8.734,3.25,3.25,8.734,3.249,15.499H6.75C6.758,10.668,10.668,6.758,15.499,6.75z"},{id:"animation_pathClock",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-15.5)",d:"M15.5,2.374C8.251,2.375,2.376,8.251,2.374,15.5C2.376,22.748,8.251,28.623,15.5,28.627c7.249-0.004,13.124-5.879,13.125-13.127C28.624,8.251,22.749,2.375,15.5,2.374zM15.5,25.623C9.909,25.615,5.385,21.09,5.375,15.5C5.385,9.909,9.909,5.384,15.5,5.374c5.59,0.01,10.115,4.535,10.124,10.125C25.615,21.09,21.091,25.615,15.5,25.623zM8.625,15.5c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,16.5,8.624,16.053,8.625,15.5zM8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.887,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572zM9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696zM22.822,12.428c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,12.54,22.344,12.705,22.822,12.428zM12.062,21.455c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,22.344,12.54,21.732,12.062,21.455zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM22.823,18.572c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.092,0.367,1.367c0.477,0.275,1.089,0.113,1.365-0.365C23.464,19.461,23.3,18.848,22.823,18.572zM19.938,7.813c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,8.702,20.418,8.089,19.938,7.813zM23.378,14.5c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,14.949,23.929,14.5,23.378,14.5zM15.501,6.624c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.365c0.275,0.479,0.889,0.643,1.365,0.367l3.305-1.676C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876C16.501,7.072,16.053,6.624,15.501,6.624zM15.501,22.377c-0.552,0-1,0.447-1,1s0.448,1,1,1s1-0.447,1-1S16.053,22.377,15.501,22.377zM18.939,21.455c-0.479,0.277-0.643,0.889-0.366,1.367c0.275,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.889,0.366-1.365C20.028,21.344,19.417,21.18,18.939,21.455z"},{id:"animation_pathWingButton",tagName:"path",d:"m 4.5,0.5 c -2.216,0 -4,1.784 -4,4 l 0,24 c 0,2.216 1.784,4 4,4 l 13.71875,0 C 22.478584,27.272785 27.273681,22.511272 32.5,18.25 l 0,-13.75 c 0,-2.216 -1.784,-4 -4,-4 l -24,0 z"},{id:"animation_pathPointer",tagName:"path",d:"M-15,-65,-15,-55,15,-55,15,-65,0,-95z"},{id:"animation_pathSwooshFX",tagName:"path",d:"m 85,0 c 0,16.617 -4.813944,35.356 -13.131081,48.4508 h 6.099803 c 8.317138,-13.0948 13.13322,-28.5955 13.13322,-45.2124 0,-46.94483 -38.402714,-85.00262 -85.7743869,-85.00262 -1.0218522,0 -2.0373001,0.0241 -3.0506131,0.0589 45.958443,1.59437 82.723058,35.77285 82.723058,81.70532 z"}]});t$$(this._defsElement)?this._svgNode.replaceChild(u,this._defsElement):this._svgNode.appendChild(u),this._defsElement=u};var A$2=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],d$2=15,M$1=105;function V$2(e,t){return e-t}function y$3(e,t){var i=u$16(t,e,V$2);return i<0?~i:i}function b$2(e,t){if(Math.abs(e)<=d$2)return e/d$2;var i,n=d$2,r=M$1;return e>0?(i=(Math.log(t[t.length-1])-0)/(r-n),Math.exp(0+i*(e-n))):(i=(Math.log(-t[0])-0)/(r-n),-Math.exp(0+i*(Math.abs(e)-n)))}function P$2(e,t,i){if(i.clockStep===g$M.SYSTEM_CLOCK)return d$2;if(Math.abs(e)<=1)return e*d$2;var n=t[t.length-1];e>n?e=n:e<-n&&(e=-n);var r,o=d$2,a=M$1;return e>0?(r=(Math.log(n)-0)/(a-o),(Math.log(e)-0)/r+o):(r=(Math.log(-t[0])-0)/(a-o),-((Math.log(Math.abs(e))-0)/r+o))}function m$6(e){if(!t$$(e))throw new t$_("clockViewModel is required.");var t=this;this._clockViewModel=e,this._allShuttleRingTicks=[],this._dateFormatter=m$6.defaultDateFormatter,this._timeFormatter=m$6.defaultTimeFormatter,this.shuttleRingDragging=!1,this.snapToTicks=!1,le$2.track(this,["_allShuttleRingTicks","_dateFormatter","_timeFormatter","shuttleRingDragging","snapToTicks"]),this._sortedFilteredPositiveTicks=[],this.setShuttleRingTicks(m$6.defaultTicks),this.timeLabel=void 0,le$2.defineProperty(this,"timeLabel",(function(){return t._timeFormatter(t._clockViewModel.currentTime,t)})),this.dateLabel=void 0,le$2.defineProperty(this,"dateLabel",(function(){return t._dateFormatter(t._clockViewModel.currentTime,t)})),this.multiplierLabel=void 0,le$2.defineProperty(this,"multiplierLabel",(function(){var e=t._clockViewModel;if(e.clockStep===g$M.SYSTEM_CLOCK)return"Today";var i=e.multiplier;return i%1==0?i.toFixed(0)+"x":i.toFixed(3).replace(/0{0,3}$/,"")+"x"})),this.shuttleRingAngle=void 0,le$2.defineProperty(this,"shuttleRingAngle",{get:function(){return P$2(e.multiplier,t._allShuttleRingTicks,e)},set:function(e){e=Math.max(Math.min(e,M$1),-M$1);var i=t._allShuttleRingTicks,n=t._clockViewModel;if(n.clockStep=g$M.SYSTEM_CLOCK_MULTIPLIER,Math.abs(e)!==M$1){var r=b$2(e,i);if(t.snapToTicks)r=i[y$3(r,i)];else if(0!==r){var o=Math.abs(r);if(o>100){var a=o.toFixed(0).length-2,s=Math.pow(10,a);r=Math.round(r/s)*s|0}else o>d$2?r=Math.round(r):o>1?r=+r.toFixed(1):o>0&&(r=+r.toFixed(2))}n.multiplier=r}else n.multiplier=e>0?i[i.length-1]:i[0]}}),this._canAnimate=void 0,le$2.defineProperty(this,"_canAnimate",(function(){var e=t._clockViewModel,i=e.clockRange;if(t.shuttleRingDragging||i===tt$j.UNBOUNDED)return!0;var n=e.multiplier,r=e.currentTime,o=e.startTime,a=!1;if(i===tt$j.LOOP_STOP)a=o$10.greaterThan(r,o)||r.equals(o)&&n>0;else{var s=e.stopTime;a=o$10.greaterThan(r,o)&&o$10.lessThan(r,s)||r.equals(o)&&n>0||r.equals(s)&&n<0}return a||(e.shouldAnimate=!1),a})),this._isSystemTimeAvailable=void 0,le$2.defineProperty(this,"_isSystemTimeAvailable",(function(){var e=t._clockViewModel;if(e.clockRange===tt$j.UNBOUNDED)return!0;var i=e.systemTime;return o$10.greaterThanOrEquals(i,e.startTime)&&o$10.lessThanOrEquals(i,e.stopTime)})),this._isAnimating=void 0,le$2.defineProperty(this,"_isAnimating",(function(){return t._clockViewModel.shouldAnimate&&(t._canAnimate||t.shuttleRingDragging)}));var i=s$3((function(){var e=t._clockViewModel;e.shouldAnimate?e.shouldAnimate=!1:t._canAnimate&&(e.shouldAnimate=!0)}));this._pauseViewModel=new i$5(i,{toggled:le$2.computed((function(){return!t._isAnimating})),tooltip:"Pause"});var n=s$3((function(){var e=t._clockViewModel,i=e.multiplier;i>0&&(e.multiplier=-i),e.shouldAnimate=!0}));this._playReverseViewModel=new i$5(n,{toggled:le$2.computed((function(){return t._isAnimating&&e.multiplier<0})),tooltip:"Play Reverse"});var r=s$3((function(){var e=t._clockViewModel,i=e.multiplier;i<0&&(e.multiplier=-i),e.shouldAnimate=!0}));this._playForwardViewModel=new i$5(r,{toggled:le$2.computed((function(){return t._isAnimating&&e.multiplier>0&&e.clockStep!==g$M.SYSTEM_CLOCK})),tooltip:"Play Forward"});var o=s$3((function(){t._clockViewModel.clockStep=g$M.SYSTEM_CLOCK}),le$2.getObservable(this,"_isSystemTimeAvailable"));this._playRealtimeViewModel=new i$5(o,{toggled:le$2.computed((function(){return e.clockStep===g$M.SYSTEM_CLOCK})),tooltip:le$2.computed((function(){return t._isSystemTimeAvailable?"Today (real-time)":"Current time not in range"}))}),this._slower=s$3((function(){var e=t._clockViewModel,i=t._allShuttleRingTicks,n=y$3(e.multiplier,i)-1;n>=0&&(e.multiplier=i[n])})),this._faster=s$3((function(){var e=t._clockViewModel,i=t._allShuttleRingTicks,n=y$3(e.multiplier,i)+1;n<i.length&&(e.multiplier=i[n])}))}function w$4(e){var t=(e=e$1Y(e,e$1Y.EMPTY_OBJECT)).globe,i=e$1Y(e.imageryProviderViewModels,[]),n=e$1Y(e.terrainProviderViewModels,[]);if(!t$$(t))throw new t$_("globe is required");this._globe=t,this.imageryProviderViewModels=i.slice(0),this.terrainProviderViewModels=n.slice(0),this.dropDownVisible=!1,le$2.track(this,["imageryProviderViewModels","terrainProviderViewModels","dropDownVisible"]);var r=le$2.getObservable(this,"imageryProviderViewModels"),o=le$2.pureComputed((function(){var e,t=r(),i={};for(e=0;e<t.length;e++){var n=t[e],o=n.category;t$$(i[o])?i[o].push(n):i[o]=[n]}var a=Object.keys(i),s=[];for(e=0;e<a.length;e++){var l=a[e];s.push({name:l,providers:i[l]})}return s}));this._imageryProviders=o;var a=le$2.getObservable(this,"terrainProviderViewModels"),s=le$2.pureComputed((function(){var e,t=a(),i={};for(e=0;e<t.length;e++){var n=t[e],r=n.category;t$$(i[r])?i[r].push(n):i[r]=[n]}var o=Object.keys(i),s=[];for(e=0;e<o.length;e++){var l=o[e];s.push({name:l,providers:i[l]})}return s}));this._terrainProviders=s,this.buttonTooltip=void 0,le$2.defineProperty(this,"buttonTooltip",(function(){var e=this.selectedImagery,t=this.selectedTerrain,i=t$$(e)?e.name:void 0,n=t$$(t)?t.name:void 0;return t$$(i)&&t$$(n)?i+"\n"+n:t$$(i)?i:n})),this.buttonImageUrl=void 0,le$2.defineProperty(this,"buttonImageUrl",(function(){var e=this.selectedImagery;if(t$$(e))return e.iconUrl})),this.selectedImagery=void 0;var l=le$2.observable();this._currentImageryProviders=[],le$2.defineProperty(this,"selectedImagery",{get:function(){return l()},set:function(e){if(l()!==e){var t,i=this._currentImageryProviders,n=i.length,r=this._globe.imageryLayers,o=!1;for(t=0;t<n;t++)for(var a=r.length,s=0;s<a;s++){var u=r.get(s);if(u.imageryProvider===i[t]){r.remove(u),o=!0;break}}if(t$$(e)){var c=e.creationCommand();if(Array.isArray(c)){for(t=c.length-1;t>=0;t--)r.addImageryProvider(c[t],0);this._currentImageryProviders=c.slice(0)}else if(this._currentImageryProviders=[c],o)r.addImageryProvider(c,0);else{var h=r.get(0);t$$(h)&&r.remove(h),r.addImageryProvider(c,0)}}l(e),this.dropDownVisible=!1}else this.dropDownVisible=!1}}),this.selectedTerrain=void 0;var u=le$2.observable();le$2.defineProperty(this,"selectedTerrain",{get:function(){return u()},set:function(e){var t;u()!==e?(t$$(e)&&(t=e.creationCommand()),this._globe.depthTestAgainstTerrain=!(t instanceof t$P),this._globe.terrainProvider=t,u(e),this.dropDownVisible=!1):this.dropDownVisible=!1}});var c=this;this._toggleDropDown=s$3((function(){c.dropDownVisible=!c.dropDownVisible})),this.selectedImagery=e$1Y(e.selectedImageryProviderViewModel,i[0]),this.selectedTerrain=e$1Y(e.selectedTerrainProviderViewModel,n[0])}function L$4(e,t){if(!t$$(e))throw new t$_("container is required.");e=o$a(e);var i=new w$4(t),n=document.createElement("button");n.type="button",n.className="cesium-button cesium-toolbar-button",n.setAttribute("data-bind","attr: { title: buttonTooltip },click: toggleDropDown"),e.appendChild(n);var r=document.createElement("img");r.setAttribute("draggable","false"),r.className="cesium-baseLayerPicker-selected",r.setAttribute("data-bind","attr: { src: buttonImageUrl }, visible: !!buttonImageUrl"),n.appendChild(r);var o=document.createElement("div");o.className="cesium-baseLayerPicker-dropDown",o.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-dropDown-visible" : dropDownVisible }'),e.appendChild(o);var a=document.createElement("div");a.className="cesium-baseLayerPicker-sectionTitle",a.setAttribute("data-bind","visible: imageryProviderViewModels.length > 0"),a.innerHTML="Imagery",o.appendChild(a);var s=document.createElement("div");s.className="cesium-baseLayerPicker-section",s.setAttribute("data-bind","foreach: _imageryProviders"),o.appendChild(s);var l=document.createElement("div");l.className="cesium-baseLayerPicker-category",s.appendChild(l);var u=document.createElement("div");u.className="cesium-baseLayerPicker-categoryTitle",u.setAttribute("data-bind","text: name"),l.appendChild(u);var c=document.createElement("div");c.className="cesium-baseLayerPicker-choices",c.setAttribute("data-bind","foreach: providers"),l.appendChild(c);var h=document.createElement("div");h.className="cesium-baseLayerPicker-item",h.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedImagery },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedImagery = $data; }'),c.appendChild(h);var d=document.createElement("img");d.className="cesium-baseLayerPicker-itemIcon",d.setAttribute("data-bind","attr: { src: iconUrl }"),d.setAttribute("draggable","false"),h.appendChild(d);var f=document.createElement("div");f.className="cesium-baseLayerPicker-itemLabel",f.setAttribute("data-bind","text: name"),h.appendChild(f);var p=document.createElement("div");p.className="cesium-baseLayerPicker-sectionTitle",p.setAttribute("data-bind","visible: terrainProviderViewModels.length > 0"),p.innerHTML="Terrain",o.appendChild(p);var _=document.createElement("div");_.className="cesium-baseLayerPicker-section",_.setAttribute("data-bind","foreach: _terrainProviders"),o.appendChild(_);var m=document.createElement("div");m.className="cesium-baseLayerPicker-category",_.appendChild(m);var $=document.createElement("div");$.className="cesium-baseLayerPicker-categoryTitle",$.setAttribute("data-bind","text: name"),m.appendChild($);var g=document.createElement("div");g.className="cesium-baseLayerPicker-choices",g.setAttribute("data-bind","foreach: providers"),m.appendChild(g);var y=document.createElement("div");y.className="cesium-baseLayerPicker-item",y.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedTerrain },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedTerrain = $data; }'),g.appendChild(y);var v=document.createElement("img");v.className="cesium-baseLayerPicker-itemIcon",v.setAttribute("data-bind","attr: { src: iconUrl }"),v.setAttribute("draggable","false"),y.appendChild(v);var x=document.createElement("div");x.className="cesium-baseLayerPicker-itemLabel",x.setAttribute("data-bind","text: name"),y.appendChild(x),le$2.applyBindings(i,n),le$2.applyBindings(i,o),this._viewModel=i,this._container=e,this._element=n,this._dropPanel=o,this._closeDropDown=function(e){n.contains(e.target)||o.contains(e.target)||(i.dropDownVisible=!1)},o$$.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}function n$5(e){if(!t$$(e.name))throw new t$_("options.name is required.");if(!t$$(e.tooltip))throw new t$_("options.tooltip is required.");if(!t$$(e.iconUrl))throw new t$_("options.iconUrl is required.");if("function"!=typeof e.creationFunction)throw new t$_("options.creationFunction is required.");var t=e.creationFunction;t$$(t.canExecute)||(t=s$3(t)),this._creationCommand=t,this.name=e.name,this.tooltip=e.tooltip,this.iconUrl=e.iconUrl,this._category=e$1Y(e.category,""),le$2.track(this,["name","tooltip","iconUrl"])}function p$1(){var e=[];return e.push(new n$5({name:"Bing Maps Aerial",iconUrl:o$12("Widgets/Images/ImageryProviders/bingAerial.png"),tooltip:"Bing Maps aerial imagery, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return f$m({style:n$g.AERIAL})}})),e.push(new n$5({name:"Bing Maps Aerial with Labels",iconUrl:o$12("Widgets/Images/ImageryProviders/bingAerialLabels.png"),tooltip:"Bing Maps aerial imagery with labels, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return f$m({style:n$g.AERIAL_WITH_LABELS})}})),e.push(new n$5({name:"Bing Maps Roads",iconUrl:o$12("Widgets/Images/ImageryProviders/bingRoads.png"),tooltip:"Bing Maps standard road maps, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return f$m({style:n$g.ROAD})}})),e.push(new n$5({name:"Mapbox Satellite",tooltip:"Mapbox satellite imagery https://www.mapbox.com/maps/",iconUrl:o$12("Widgets/Images/ImageryProviders/mapboxSatellite.png"),category:"Other",creationFunction:function(){return new a$f({mapId:"mapbox.satellite"})}})),e.push(new n$5({name:"Mapbox Streets",tooltip:"Mapbox streets imagery https://www.mapbox.com/maps/",iconUrl:o$12("Widgets/Images/ImageryProviders/mapboxTerrain.png"),category:"Other",creationFunction:function(){return new a$f({mapId:"mapbox.streets"})}})),e.push(new n$5({name:"Mapbox Streets Classic",tooltip:"Mapbox streets basic imagery https://www.mapbox.com/maps/",iconUrl:o$12("Widgets/Images/ImageryProviders/mapboxStreets.png"),category:"Other",creationFunction:function(){return new a$f({mapId:"mapbox.streets-basic"})}})),e.push(new n$5({name:"ESRI World Imagery",iconUrl:o$12("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 b$o({url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",enablePickFeatures:!1})}})),e.push(new n$5({name:"ESRI World Street Map",iconUrl:o$12("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; Japan; most countries in Europe; Australia and New Zealand; India; parts of South America including Argentina, Brazil, Chile, Colombia, and Venezuela; Ghana; and parts of southern Africa including Botswana, Lesotho, Namibia, South Africa, and Swaziland.\nhttp://www.esri.com",category:"Other",creationFunction:function(){return new b$o({url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer",enablePickFeatures:!1})}})),e.push(new n$5({name:"ESRI National Geographic",iconUrl:o$12("Widgets/Images/ImageryProviders/esriNationalGeographic.png"),tooltip:"This web map contains the National Geographic World Map service. This map service is designed to be used as a general reference map for informational and educational purposes as well as a basemap by GIS professionals and other users for creating web maps and web mapping applications.\nhttp://www.esri.com",category:"Other",creationFunction:function(){return new b$o({url:"https://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/",enablePickFeatures:!1})}})),e.push(new n$5({name:"Open­Street­Map",iconUrl:o$12("Widgets/Images/ImageryProviders/openStreetMap.png"),tooltip:"OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world.\nhttp://www.openstreetmap.org",category:"Other",creationFunction:function(){return T$j({url:"https://a.tile.openstreetmap.org/"})}})),e.push(new n$5({name:"Stamen Watercolor",iconUrl:o$12("Widgets/Images/ImageryProviders/stamenWatercolor.png"),tooltip:"Reminiscent of hand drawn maps, Stamen watercolor maps apply raster effect area washes and organic edges over a paper texture to add warm pop to any map.\nhttp://maps.stamen.com",category:"Other",creationFunction:function(){return T$j({url:"https://stamen-tiles.a.ssl.fastly.net/watercolor/",credit:"Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA."})}})),e.push(new n$5({name:"Stamen Toner",iconUrl:o$12("Widgets/Images/ImageryProviders/stamenToner.png"),tooltip:"A high contrast black and white map.\nhttp://maps.stamen.com",category:"Other",creationFunction:function(){return T$j({url:"https://stamen-tiles.a.ssl.fastly.net/toner/",credit:"Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA."})}})),e.push(new n$5({name:"Sentinel-2",iconUrl:o$12("Widgets/Images/ImageryProviders/sentinel-2.png"),tooltip:"Sentinel-2 cloudless by EOX IT Services GmbH (Contains modified Copernicus Sentinel data 2016 and 2017).",category:"Cesium ion",creationFunction:function(){return new a$e({assetId:3954})}})),e.push(new n$5({name:"Blue Marble",iconUrl:o$12("Widgets/Images/ImageryProviders/blueMarble.png"),tooltip:"Blue Marble Next Generation July, 2004 imagery from NASA.",category:"Cesium ion",creationFunction:function(){return new a$e({assetId:3845})}})),e.push(new n$5({name:"Earth at night",iconUrl:o$12("Widgets/Images/ImageryProviders/earthAtNight.png"),tooltip:"The Earth at night, also known as The Black Marble, is a 500 meter resolution global composite imagery layer released by NASA.",category:"Cesium ion",creationFunction:function(){return new a$e({assetId:3812})}})),e.push(new n$5({name:"Natural Earth II",iconUrl:o$12("Widgets/Images/ImageryProviders/naturalEarthII.png"),tooltip:"Natural Earth II, darkened for contrast.\nhttp://www.naturalearthdata.com/",category:"Cesium ion",creationFunction:function(){return re$8({url:o$12("Assets/Textures/NaturalEarthII")})}})),e}function t$2(){var e=[];return e.push(new n$5({name:"WGS84 Ellipsoid",iconUrl:o$12("Widgets/Images/TerrainProviders/Ellipsoid.png"),tooltip:"WGS84 standard ellipsoid, also known as EPSG:4326",category:"Cesium ion",creationFunction:function(){return new t$P}})),e.push(new n$5({name:"Cesium World Terrain",iconUrl:o$12("Widgets/Images/TerrainProviders/CesiumWorldTerrain.png"),tooltip:"High-resolution global terrain tileset curated from several datasources and hosted by Cesium ion",category:"Cesium ion",creationFunction:function(){return s$16({requestWaterMask:!0,requestVertexNormals:!0})}})),e}function ne(e){return function(t){var i=e._scene.pick(t.position);t$$(i)&&i.primitive instanceof f$B&&(e.tileset=i.primitive),e.pickActive=!1}}function Y(e,t){t?e._eventHandler.setInputAction((function(t){var i=e._scene.pick(t.endPosition);t$$(i)&&i.primitive instanceof f$B&&(e.tileset=i.primitive)}),Q$L.MOUSE_MOVE):(e._eventHandler.removeInputAction(Q$L.MOUSE_MOVE),e.picking=e.picking)}m$6.defaultDateFormatter=function(e,t){var i=o$10.toGregorianDate(e);return A$2[i.month-1]+" "+i.day+" "+i.year},m$6.defaultTicks=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800],m$6.defaultTimeFormatter=function(e,t){var i=o$10.toGregorianDate(e),n=Math.round(i.millisecond);return Math.abs(t._clockViewModel.multiplier)<1?$$10("%02d:%02d:%02d.%03d",i.hour,i.minute,i.second,n):$$10("%02d:%02d:%02d UTC",i.hour,i.minute,i.second)},m$6.prototype.getShuttleRingTicks=function(){return this._sortedFilteredPositiveTicks.slice(0)},m$6.prototype.setShuttleRingTicks=function(e){if(!t$$(e))throw new t$_("positiveTicks is required.");var t,i,n,r={},o=this._sortedFilteredPositiveTicks;for(o.length=0,t=0,i=e.length;t<i;++t)n=e[t],r.hasOwnProperty(n)||(r[n]=!0,o.push(n));o.sort(V$2);var a=[];for(t=(i=o.length)-1;t>=0;--t)0!==(n=o[t])&&a.push(-n);Array.prototype.push.apply(a,o),this._allShuttleRingTicks=a},Object.defineProperties(m$6.prototype,{slower:{get:function(){return this._slower}},faster:{get:function(){return this._faster}},clockViewModel:{get:function(){return this._clockViewModel}},pauseViewModel:{get:function(){return this._pauseViewModel}},playReverseViewModel:{get:function(){return this._playReverseViewModel}},playForwardViewModel:{get:function(){return this._playForwardViewModel}},playRealtimeViewModel:{get:function(){return this._playRealtimeViewModel}},dateFormatter:{get:function(){return this._dateFormatter},set:function(e){if("function"!=typeof e)throw new t$_("dateFormatter must be a function");this._dateFormatter=e}},timeFormatter:{get:function(){return this._timeFormatter},set:function(e){if("function"!=typeof e)throw new t$_("timeFormatter must be a function");this._timeFormatter=e}}}),m$6._maxShuttleRingAngle=M$1,m$6._realtimeShuttleRingAngle=d$2,Object.defineProperties(w$4.prototype,{toggleDropDown:{get:function(){return this._toggleDropDown}},globe:{get:function(){return this._globe}}}),Object.defineProperties(L$4.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),L$4.prototype.isDestroyed=function(){return!1},L$4.prototype.destroy=function(){return o$$.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),le$2.cleanNode(this._element),le$2.cleanNode(this._dropPanel),this._container.removeChild(this._element),this._container.removeChild(this._dropPanel),s$1e(this)},Object.defineProperties(n$5.prototype,{creationCommand:{get:function(){return this._creationCommand}},category:{get:function(){return this._category}}});var oe={maximumFractionDigits:3};function D$2(e){var t=e/1048576;return t<1?t.toLocaleString(void 0,oe):Math.round(t).toLocaleString()}function y$2(e,t){if(!t$$(e))return"";var i=t?e._statisticsLastPick:e._statisticsLastRender,n='<ul class="cesium-cesiumInspector-statistics">';return n+="<li><strong>Visited: </strong>"+i.visited.toLocaleString()+"</li><li><strong>Selected: </strong>"+i.selected.toLocaleString()+"</li><li><strong>Commands: </strong>"+i.numberOfCommands.toLocaleString()+"</li>",n+="</ul>",t||(n+='<ul class="cesium-cesiumInspector-statistics">',n+="<li><strong>Requests: </strong>"+i.numberOfPendingRequests.toLocaleString()+"</li><li><strong>Attempted: </strong>"+i.numberOfAttemptedRequests.toLocaleString()+"</li><li><strong>Processing: </strong>"+i.numberOfTilesProcessing.toLocaleString()+"</li><li><strong>Content Ready: </strong>"+i.numberOfTilesWithContentReady.toLocaleString()+"</li><li><strong>Total: </strong>"+i.numberOfTilesTotal.toLocaleString()+"</li>",n+="</ul>",n+='<ul class="cesium-cesiumInspector-statistics">',n+="<li><strong>Features Selected: </strong>"+i.numberOfFeaturesSelected.toLocaleString()+"</li><li><strong>Features Loaded: </strong>"+i.numberOfFeaturesLoaded.toLocaleString()+"</li><li><strong>Points Selected: </strong>"+i.numberOfPointsSelected.toLocaleString()+"</li><li><strong>Points Loaded: </strong>"+i.numberOfPointsLoaded.toLocaleString()+"</li><li><strong>Triangles Selected: </strong>"+i.numberOfTrianglesSelected.toLocaleString()+"</li>",n+="</ul>",n+='<ul class="cesium-cesiumInspector-statistics">',n+="<li><strong>Tiles styled: </strong>"+i.numberOfTilesStyled.toLocaleString()+"</li><li><strong>Features styled: </strong>"+i.numberOfFeaturesStyled.toLocaleString()+"</li>",n+="</ul>",n+='<ul class="cesium-cesiumInspector-statistics">',n+="<li><strong>Children Union Culled: </strong>"+i.numberOfTilesCulledWithChildrenUnion.toLocaleString()+"</li>",n+="</ul>",n+='<ul class="cesium-cesiumInspector-statistics">',n+="<li><strong>Geometry Memory (MB): </strong>"+D$2(i.geometryByteLength)+"</li><li><strong>Texture Memory (MB): </strong>"+D$2(i.texturesByteLength)+"</li><li><strong>Batch Table Memory (MB): </strong>"+D$2(i.batchTableByteLength)+"</li>",n+="</ul>"),n}var le$1=[{text:"Highlight",value:v$E.HIGHLIGHT},{text:"Replace",value:v$E.REPLACE},{text:"Mix",value:v$E.MIX}],Z$1=new e$1z(1,1,0,.4),ae=new e$1z,L$3=new e$1z;function l$2(e,t){n$1e.typeOf.object("scene",e),n$1e.typeOf.object("performanceContainer",t);var i=this,n=e.canvas;this._eventHandler=new f$N(n),this._scene=e,this._performanceContainer=t,this._canvas=n,this._performanceDisplay=new n$a({container:t}),this._statisticsText="",this._pickStatisticsText="",this._editorError="",this.performance=!1,this.showStatistics=!0,this.showPickStatistics=!0,this.inspectorVisible=!0,this.tilesetVisible=!1,this.displayVisible=!1,this.updateVisible=!1,this.loggingVisible=!1,this.styleVisible=!1,this.tileDebugLabelsVisible=!1,this.optimizationVisible=!1,this.styleString="{}",this._tileset=void 0,this._feature=void 0,this._tile=void 0,le$2.track(this,["performance","inspectorVisible","_statisticsText","_pickStatisticsText","_editorError","showPickStatistics","showStatistics","tilesetVisible","displayVisible","updateVisible","loggingVisible","styleVisible","optimizationVisible","tileDebugLabelsVisible","styleString","_feature","_tile"]),this._properties=le$2.observable({}),this.properties=[],le$2.defineProperty(this,"properties",(function(){var e=[],t=i._properties();for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}));var r=le$2.observable();le$2.defineProperty(this,"dynamicScreenSpaceError",{get:function(){return r()},set:function(e){r(e),t$$(i._tileset)&&(i._tileset.dynamicScreenSpaceError=e)}}),this.dynamicScreenSpaceError=!1;var o=le$2.observable();le$2.defineProperty(this,"colorBlendMode",{get:function(){return o()},set:function(e){o(e),t$$(i._tileset)&&(i._tileset.colorBlendMode=e,i._scene.requestRender())}}),this.colorBlendMode=v$E.HIGHLIGHT;var a=le$2.observable();le$2.defineProperty(this,"picking",{get:function(){return a()},set:function(t){a(t),t?i._eventHandler.setInputAction((function(t){var n=e.pick(t.endPosition);if(n instanceof e$Z?(i.feature=n,i.tile=n.content.tile):t$$(n)&&t$$(n.content)?(i.feature=void 0,i.tile=n.content.tile):(i.feature=void 0,i.tile=void 0),t$$(i._tileset)){var r;if(f&&t$$(n)&&t$$(n.content))e.pickPositionSupported&&(t$$(r=e.pickPosition(t.endPosition))&&(i._tileset.debugPickPosition=r)),i._tileset.debugPickedTile=n.content.tile;else i._tileset.debugPickedTile=void 0;i._scene.requestRender()}}),Q$L.MOUSE_MOVE):(i.feature=void 0,i.tile=void 0,i._eventHandler.removeInputAction(Q$L.MOUSE_MOVE))}}),this.picking=!0;var s=le$2.observable();le$2.defineProperty(this,"colorize",{get:function(){return s()},set:function(e){s(e),t$$(i._tileset)&&(i._tileset.debugColorizeTiles=e,i._scene.requestRender())}}),this.colorize=!1;var l=le$2.observable();le$2.defineProperty(this,"wireframe",{get:function(){return l()},set:function(e){l(e),t$$(i._tileset)&&(i._tileset.debugWireframe=e,i._scene.requestRender())}}),this.wireframe=!1;var u=le$2.observable();le$2.defineProperty(this,"showBoundingVolumes",{get:function(){return u()},set:function(e){u(e),t$$(i._tileset)&&(i._tileset.debugShowBoundingVolume=e,i._scene.requestRender())}}),this.showBoundingVolumes=!1;var c=le$2.observable();le$2.defineProperty(this,"showContentBoundingVolumes",{get:function(){return c()},set:function(e){c(e),t$$(i._tileset)&&(i._tileset.debugShowContentBoundingVolume=e,i._scene.requestRender())}}),this.showContentBoundingVolumes=!1;var h=le$2.observable();le$2.defineProperty(this,"showRequestVolumes",{get:function(){return h()},set:function(e){h(e),t$$(i._tileset)&&(i._tileset.debugShowViewerRequestVolume=e,i._scene.requestRender())}}),this.showRequestVolumes=!1;var d=le$2.observable();le$2.defineProperty(this,"freezeFrame",{get:function(){return d()},set:function(e){d(e),t$$(i._tileset)&&(i._tileset.debugFreezeFrame=e,i._scene.debugShowFrustumPlanes=e,i._scene.requestRender())}}),this.freezeFrame=!1;var f=le$2.observable();le$2.defineProperty(this,"showOnlyPickedTileDebugLabel",{get:function(){return f()},set:function(e){f(e),t$$(i._tileset)&&(i._tileset.debugPickedTileLabelOnly=e,i._scene.requestRender())}}),this.showOnlyPickedTileDebugLabel=!1;var p=le$2.observable();le$2.defineProperty(this,"showGeometricError",{get:function(){return p()},set:function(e){p(e),t$$(i._tileset)&&(i._tileset.debugShowGeometricError=e,i._scene.requestRender())}}),this.showGeometricError=!1;var _=le$2.observable();le$2.defineProperty(this,"showRenderingStatistics",{get:function(){return _()},set:function(e){_(e),t$$(i._tileset)&&(i._tileset.debugShowRenderingStatistics=e,i._scene.requestRender())}}),this.showRenderingStatistics=!1;var m=le$2.observable();le$2.defineProperty(this,"showMemoryUsage",{get:function(){return m()},set:function(e){m(e),t$$(i._tileset)&&(i._tileset.debugShowMemoryUsage=e,i._scene.requestRender())}}),this.showMemoryUsage=!1;var $=le$2.observable();le$2.defineProperty(this,"showUrl",{get:function(){return $()},set:function(e){$(e),t$$(i._tileset)&&(i._tileset.debugShowUrl=e,i._scene.requestRender())}}),this.showUrl=!1;var g=le$2.observable();le$2.defineProperty(this,"maximumScreenSpaceError",{get:function(){return g()},set:function(e){e=Number(e),isNaN(e)||(g(e),t$$(i._tileset)&&(i._tileset.maximumScreenSpaceError=e))}}),this.maximumScreenSpaceError=16;var y=le$2.observable();le$2.defineProperty(this,"dynamicScreenSpaceErrorDensity",{get:function(){return y()},set:function(e){e=Number(e),isNaN(e)||(y(e),t$$(i._tileset)&&(i._tileset.dynamicScreenSpaceErrorDensity=e))}}),this.dynamicScreenSpaceErrorDensity=.00278,this.dynamicScreenSpaceErrorDensitySliderValue=void 0,le$2.defineProperty(this,"dynamicScreenSpaceErrorDensitySliderValue",{get:function(){return Math.pow(y(),1/6)},set:function(e){y(Math.pow(e,6))}});var v=le$2.observable();le$2.defineProperty(this,"dynamicScreenSpaceErrorFactor",{get:function(){return v()},set:function(e){e=Number(e),isNaN(e)||(v(e),t$$(i._tileset)&&(i._tileset.dynamicScreenSpaceErrorFactor=e))}}),this.dynamicScreenSpaceErrorFactor=4;var x=ne(this),b=le$2.observable();le$2.defineProperty(this,"pickActive",{get:function(){return b()},set:function(e){b(e),e?i._eventHandler.setInputAction(x,Q$L.LEFT_CLICK):i._eventHandler.removeInputAction(Q$L.LEFT_CLICK)}});var S=le$2.observable();le$2.defineProperty(this,"pointCloudShading",{get:function(){return S()},set:function(e){S(e),t$$(i._tileset)&&(i._tileset.pointCloudShading.attenuation=e)}}),this.pointCloudShading=!1;var w=le$2.observable();le$2.defineProperty(this,"geometricErrorScale",{get:function(){return w()},set:function(e){e=Number(e),isNaN(e)||(w(e),t$$(i._tileset)&&(i._tileset.pointCloudShading.geometricErrorScale=e))}}),this.geometricErrorScale=1;var C=le$2.observable();le$2.defineProperty(this,"maximumAttenuation",{get:function(){return C()},set:function(e){e=Number(e),isNaN(e)||(C(e),t$$(i._tileset)&&(i._tileset.pointCloudShading.maximumAttenuation=0===e?void 0:e))}}),this.maximumAttenuation=0;var T=le$2.observable();le$2.defineProperty(this,"baseResolution",{get:function(){return T()},set:function(e){e=Number(e),isNaN(e)||(T(e),t$$(i._tileset)&&(i._tileset.pointCloudShading.baseResolution=0===e?void 0:e))}}),this.baseResolution=0;var P=le$2.observable();le$2.defineProperty(this,"eyeDomeLighting",{get:function(){return P()},set:function(e){P(e),t$$(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLighting=e)}}),this.eyeDomeLighting=!1;var E=le$2.observable();le$2.defineProperty(this,"eyeDomeLightingStrength",{get:function(){return E()},set:function(e){e=Number(e),isNaN(e)||(E(e),t$$(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLightingStrength=e))}}),this.eyeDomeLightingStrength=1;var A=le$2.observable();le$2.defineProperty(this,"eyeDomeLightingRadius",{get:function(){return A()},set:function(e){e=Number(e),isNaN(e)||(A(e),t$$(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLightingRadius=e))}}),this.eyeDomeLightingRadius=1,this.pickActive=!1;var L=le$2.observable();le$2.defineProperty(this,"skipLevelOfDetail",{get:function(){return L()},set:function(e){L(e),t$$(i._tileset)&&(i._tileset.skipLevelOfDetail=e)}}),this.skipLevelOfDetail=!0;var M=le$2.observable();le$2.defineProperty(this,"skipScreenSpaceErrorFactor",{get:function(){return M()},set:function(e){e=Number(e),isNaN(e)||(M(e),t$$(i._tileset)&&(i._tileset.skipScreenSpaceErrorFactor=e))}}),this.skipScreenSpaceErrorFactor=16;var I=le$2.observable();le$2.defineProperty(this,"baseScreenSpaceError",{get:function(){return I()},set:function(e){e=Number(e),isNaN(e)||(I(e),t$$(i._tileset)&&(i._tileset.baseScreenSpaceError=e))}}),this.baseScreenSpaceError=1024;var O=le$2.observable();le$2.defineProperty(this,"skipLevels",{get:function(){return O()},set:function(e){e=Number(e),isNaN(e)||(O(e),t$$(i._tileset)&&(i._tileset.skipLevels=e))}}),this.skipLevels=1;var D=le$2.observable();le$2.defineProperty(this,"immediatelyLoadDesiredLevelOfDetail",{get:function(){return D()},set:function(e){D(e),t$$(i._tileset)&&(i._tileset.immediatelyLoadDesiredLevelOfDetail=e)}}),this.immediatelyLoadDesiredLevelOfDetail=!1;var R=le$2.observable();le$2.defineProperty(this,"loadSiblings",{get:function(){return R()},set:function(e){R(e),t$$(i._tileset)&&(i._tileset.loadSiblings=e)}}),this.loadSiblings=!1,this._style=void 0,this._shouldStyle=!1,this._definedProperties=["properties","dynamicScreenSpaceError","colorBlendMode","picking","colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","maximumScreenSpaceError","dynamicScreenSpaceErrorDensity","baseScreenSpaceError","skipScreenSpaceErrorFactor","skipLevelOfDetail","skipLevels","immediatelyLoadDesiredLevelOfDetail","loadSiblings","dynamicScreenSpaceErrorDensitySliderValue","dynamicScreenSpaceErrorFactor","pickActive","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl","pointCloudShading","geometricErrorScale","maximumAttenuation","baseResolution","eyeDomeLighting","eyeDomeLightingStrength","eyeDomeLightingRadius"],this._removePostRenderEvent=e.postRender.addEventListener((function(){i._update()})),t$$(this._tileset)||Y(this,!0)}function w$3(e){if(e.featuresLength>0)return!0;var t=e.innerContents;if(t$$(t)){for(var i=t.length,n=0;n<i;++n)if(!w$3(t[n]))return!1;return!0}return!1}function y$1(e,t){n$1e.defined("container",e),n$1e.typeOf.object("scene",t),e=o$a(e);var i=document.createElement("div"),n=document.createElement("div");n.setAttribute("data-bind","visible: performance");var r=new l$2(t,n);this._viewModel=r,this._container=e,this._element=i;var o=document.createElement("div");o.textContent="3D Tiles Inspector",o.className="cesium-cesiumInspector-button",o.setAttribute("data-bind","click: toggleInspector"),i.appendChild(o),i.className="cesium-cesiumInspector cesium-3DTilesInspector",i.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'),e.appendChild(i);var a=document.createElement("div");this._panel=a,a.className="cesium-cesiumInspector-dropDown",i.appendChild(a);var s=s$2.createSection,l=s$2.createCheckbox,u=s(a,"Tileset","tilesetVisible","toggleTileset"),c=s(a,"Display","displayVisible","toggleDisplay"),h=s(a,"Update","updateVisible","toggleUpdate"),d=s(a,"Logging","loggingVisible","toggleLogging"),f=s(a,"Tile Debug Labels","tileDebugLabelsVisible","toggleTileDebugLabels"),p=s(a,"Style","styleVisible","toggleStyle"),_=s(a,"Optimization","optimizationVisible","toggleOptimization"),m=document.createElement("div");m.className="field-group";var $=document.createElement("label");$.className="field-label",$.appendChild(document.createTextNode("Properties: "));var g=document.createElement("div");g.setAttribute("data-bind","text: properties"),m.appendChild($),m.appendChild(g),u.appendChild(m),u.appendChild(w$2("togglePickTileset","Pick Tileset","pickActive")),u.appendChild(w$2("trimTilesCache","Trim Tiles Cache")),u.appendChild(l("Enable Picking","picking")),c.appendChild(l("Colorize","colorize")),c.appendChild(l("Wireframe","wireframe")),c.appendChild(l("Bounding Volumes","showBoundingVolumes")),c.appendChild(l("Content Volumes","showContentBoundingVolumes")),c.appendChild(l("Request Volumes","showRequestVolumes")),c.appendChild(l("Point Cloud Shading","pointCloudShading"));var y=document.createElement("div");y.setAttribute("data-bind","visible: pointCloudShading"),y.appendChild(d$1("geometricErrorScale",0,2,.01,"Geometric Error Scale")),y.appendChild(d$1("maximumAttenuation",0,32,1,"Maximum Attenuation")),y.appendChild(d$1("baseResolution",0,1,.01,"Base Resolution")),y.appendChild(l("Eye Dome Lighting (EDL)","eyeDomeLighting")),c.appendChild(y);var v=document.createElement("div");v.setAttribute("data-bind","visible: eyeDomeLighting"),v.appendChild(d$1("eyeDomeLightingStrength",0,2,.1,"EDL Strength")),v.appendChild(d$1("eyeDomeLightingRadius",0,4,.1,"EDL Radius")),y.appendChild(v),h.appendChild(l("Freeze Frame","freezeFrame")),h.appendChild(l("Dynamic Screen Space Error","dynamicScreenSpaceError"));var x=document.createElement("div");x.appendChild(d$1("maximumScreenSpaceError",0,128,1,"Maximum Screen Space Error")),h.appendChild(x);var b=document.createElement("div");b.setAttribute("data-bind","visible: dynamicScreenSpaceError"),b.appendChild(d$1("dynamicScreenSpaceErrorDensitySliderValue",0,1,.005,"Screen Space Error Density","dynamicScreenSpaceErrorDensity")),b.appendChild(d$1("dynamicScreenSpaceErrorFactor",1,10,.1,"Screen Space Error Factor")),h.appendChild(b),d.appendChild(l("Performance","performance")),d.appendChild(n),d.appendChild(l("Statistics","showStatistics"));var S=document.createElement("div");S.className="cesium-3dTilesInspector-statistics",S.setAttribute("data-bind","html: statisticsText, visible: showStatistics"),d.appendChild(S),d.appendChild(l("Pick Statistics","showPickStatistics"));var w=document.createElement("div");w.className="cesium-3dTilesInspector-statistics",w.setAttribute("data-bind","html: pickStatisticsText, visible: showPickStatistics"),d.appendChild(w);var C=document.createElement("div");p.appendChild(C),C.appendChild(document.createTextNode("Color Blend Mode: "));var T=document.createElement("select");T.setAttribute("data-bind",'options: colorBlendModes, optionsText: "text", optionsValue: "value", value: colorBlendMode'),C.appendChild(T);var P=document.createElement("textarea");P.setAttribute("data-bind","textInput: styleString, event: { keydown: styleEditorKeyPress }"),C.className="cesium-cesiumInspector-styleEditor",C.appendChild(P);var E=w$2("compileStyle","Compile (Ctrl+Enter)");C.appendChild(E);var A=document.createElement("div");A.className="cesium-cesiumInspector-error",A.setAttribute("data-bind","text: editorError"),C.appendChild(A),f.appendChild(l("Show Picked Only","showOnlyPickedTileDebugLabel")),f.appendChild(l("Geometric Error","showGeometricError")),f.appendChild(l("Rendering Statistics","showRenderingStatistics")),f.appendChild(l("Memory Usage (MB)","showMemoryUsage")),f.appendChild(l("Url","showUrl")),_.appendChild(l("Skip Tile LODs","skipLevelOfDetail"));var L=document.createElement("div");L.appendChild(d$1("skipScreenSpaceErrorFactor",1,50,1,"Skip SSE Factor")),_.appendChild(L);var M=document.createElement("div");M.appendChild(d$1("baseScreenSpaceError",0,4096,1,"SSE before skipping LOD")),_.appendChild(M);var I=document.createElement("div");I.appendChild(d$1("skipLevels",0,10,1,"Min. levels to skip")),_.appendChild(I),_.appendChild(l("Load only tiles that meet the max SSE.","immediatelyLoadDesiredLevelOfDetail")),_.appendChild(l("Load siblings of visible tiles","loadSiblings")),le$2.applyBindings(r,i)}function d$1(e,t,i,n,r,o){o=e$1Y(o,e);var a=document.createElement("input");a.setAttribute("data-bind","value: "+o),a.type="number";var s=document.createElement("input");s.type="range",s.min=t,s.max=i,s.step=n,s.setAttribute("data-bind",'valueUpdate: "input", value: '+e);var l=document.createElement("div");l.appendChild(s);var u=document.createElement("div");return u.className="cesium-cesiumInspector-slider",u.appendChild(document.createTextNode(r)),u.appendChild(a),u.appendChild(l),u}function w$2(e,t,i){var n=document.createElement("button");n.type="button",n.textContent=t,n.className="cesium-cesiumInspector-pickButton";var r="click: "+e;return t$$(i)&&(r+=', css: {"cesium-cesiumInspector-pickButtonHighlight" : '+i+"}"),n.setAttribute("data-bind",r),n}function y(e){var t;if(t$$(e)){t="Command Statistics";var i=e.commandsInFrustums;for(var n in i)if(i.hasOwnProperty(n)){var r,o=parseInt(n,10);if(7===o)r="1, 2 and 3";else{for(var a=[],s=2;s>=0;s--){var l=Math.pow(2,s);o>=l&&(a.push(s+1),o-=l)}r=a.reverse().join(" and ")}t+="<br>    "+i[n]+" in frustum "+r}t+="<br>Total: "+e.totalCommands}return t}function g$1(e,t,i){var n=Math.min(i,t);return n=Math.max(n,e)}function a(e,t){if(!t$$(e))throw new t$_("scene is required");if(!t$$(t))throw new t$_("performanceContainer is required");var i=this,n=e.canvas,r=new f$N(n);this._eventHandler=r,this._scene=e,this._canvas=n,this._primitive=void 0,this._tile=void 0,this._modelMatrixPrimitive=void 0,this._performanceDisplay=void 0,this._performanceContainer=t;var o,a=this._scene.globe;function s(e){var t=i._scene.pick({x:e.position.x,y:e.position.y});t$$(t)&&(i.primitive=t$$(t.collection)?t.collection:t.primitive),i._scene.requestRender(),i.pickPrimitiveActive=!1}function l(e){var t,n=a.ellipsoid,r=i._scene.camera.pickEllipsoid({x:e.position.x,y:e.position.y},n);if(t$$(r))for(var o=n.cartesianToCartographic(r),s=a._surface.tileProvider._tilesToRenderByTextureCount,l=0;!t&&l<s.length;++l){var u=s[l];if(t$$(u))for(var c=0;!t&&c<u.length;++c){var h=u[c];s$1p.contains(h.rectangle,o)&&(t=h)}}i.tile=t,i.pickTileActive=!1}a.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="",le$2.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=s$3((function(){i.dropDownVisible=!i.dropDownVisible})),this._toggleGeneral=s$3((function(){i.generalVisible=!i.generalVisible})),this._togglePrimitives=s$3((function(){i.primitivesVisible=!i.primitivesVisible})),this._toggleTerrain=s$3((function(){i.terrainVisible=!i.terrainVisible})),this._frustumsSubscription=le$2.getObservable(this,"frustums").subscribe((function(e){i._scene.debugShowFrustums=e,i._scene.requestRender()})),this._frustumPlanesSubscription=le$2.getObservable(this,"frustumPlanes").subscribe((function(e){i._scene.debugShowFrustumPlanes=e,i._scene.requestRender()})),this._performanceSubscription=le$2.getObservable(this,"performance").subscribe((function(e){e?i._performanceDisplay=new n$a({container:i._performanceContainer}):i._performanceContainer.innerHTML=""})),this._showPrimitiveBoundingSphere=s$3((function(){return i._primitive.debugShowBoundingVolume=i.primitiveBoundingSphere,i._scene.requestRender(),!0})),this._primitiveBoundingSphereSubscription=le$2.getObservable(this,"primitiveBoundingSphere").subscribe((function(){i._showPrimitiveBoundingSphere()})),this._showPrimitiveReferenceFrame=s$3((function(){if(i.primitiveReferenceFrame){var e=i._primitive.modelMatrix;i._modelMatrixPrimitive=new s$f({modelMatrix:e}),i._scene.primitives.add(i._modelMatrixPrimitive)}else t$$(i._modelMatrixPrimitive)&&(i._scene.primitives.remove(i._modelMatrixPrimitive),i._modelMatrixPrimitive=void 0);return i._scene.requestRender(),!0})),this._primitiveReferenceFrameSubscription=le$2.getObservable(this,"primitiveReferenceFrame").subscribe((function(){i._showPrimitiveReferenceFrame()})),this._doFilterPrimitive=s$3((function(){return i.filterPrimitive?i._scene.debugCommandFilter=function(e){return!(!t$$(i._modelMatrixPrimitive)||e.owner!==i._modelMatrixPrimitive._primitive)||!!t$$(i._primitive)&&(e.owner===i._primitive||e.owner===i._primitive._billboardCollection||e.owner.primitive===i._primitive)}:i._scene.debugCommandFilter=void 0,!0})),this._filterPrimitiveSubscription=le$2.getObservable(this,"filterPrimitive").subscribe((function(){i._doFilterPrimitive(),i._scene.requestRender()})),this._wireframeSubscription=le$2.getObservable(this,"wireframe").subscribe((function(e){a._surface.tileProvider._debug.wireframe=e,i._scene.requestRender()})),this._globeDepthSubscription=le$2.getObservable(this,"globeDepth").subscribe((function(e){i._scene.debugShowGlobeDepth=e,i._scene.requestRender()})),this._pickDepthSubscription=le$2.getObservable(this,"pickDepth").subscribe((function(e){i._scene.debugShowPickDepth=e,i._scene.requestRender()})),this._depthFrustumSubscription=le$2.getObservable(this,"depthFrustum").subscribe((function(e){i._scene.debugShowDepthFrustum=e,i._scene.requestRender()})),this._incrementDepthFrustum=s$3((function(){var e=i.depthFrustum+1;return i.depthFrustum=g$1(1,i._numberOfFrustums,e),i._scene.requestRender(),!0})),this._decrementDepthFrustum=s$3((function(){var e=i.depthFrustum-1;return i.depthFrustum=g$1(1,i._numberOfFrustums,e),i._scene.requestRender(),!0})),this._suspendUpdatesSubscription=le$2.getObservable(this,"suspendUpdates").subscribe((function(e){a._surface._debug.suspendLodUpdate=e,e||(i.filterTile=!1)})),this._showTileCoordinates=s$3((function(){return i.tileCoordinates&&!t$$(o)?o=e.imageryLayers.addImageryProvider(new n$6({tilingScheme:e.terrainProvider.tilingScheme})):!i.tileCoordinates&&t$$(o)&&(e.imageryLayers.remove(o),o=void 0),!0})),this._tileCoordinatesSubscription=le$2.getObservable(this,"tileCoordinates").subscribe((function(){i._showTileCoordinates(),i._scene.requestRender()})),this._tileBoundingSphereSubscription=le$2.getObservable(this,"tileBoundingSphere").subscribe((function(){i._showTileBoundingSphere(),i._scene.requestRender()})),this._showTileBoundingSphere=s$3((function(){return i.tileBoundingSphere?a._surface.tileProvider._debug.boundingSphereTile=i._tile:a._surface.tileProvider._debug.boundingSphereTile=void 0,i._scene.requestRender(),!0})),this._doFilterTile=s$3((function(){return i.filterTile?(i.suspendUpdates=!0,a._surface._tilesToRender=[],t$$(i._tile)&&i._tile.renderable&&a._surface._tilesToRender.push(i._tile)):i.suspendUpdates=!1,!0})),this._filterTileSubscription=le$2.getObservable(this,"filterTile").subscribe((function(){i.doFilterTile(),i._scene.requestRender()})),this._pickPrimitive=s$3((function(){i.pickPrimitiveActive=!i.pickPrimitiveActive})),this._pickPrimitiveActiveSubscription=le$2.getObservable(this,"pickPrimitiveActive").subscribe((function(e){e?r.setInputAction(s,Q$L.LEFT_CLICK):r.removeInputAction(Q$L.LEFT_CLICK)})),this._pickTile=s$3((function(){i.pickTileActive=!i.pickTileActive})),this._pickTileActiveSubscription=le$2.getObservable(this,"pickTileActive").subscribe((function(e){e?r.setInputAction(l,Q$L.LEFT_CLICK):r.removeInputAction(Q$L.LEFT_CLICK)})),this._removePostRenderEvent=e.postRender.addEventListener((function(){i._update()}))}function w$1(e,t){if(!t$$(e))throw new t$_("container is required.");if(!t$$(t))throw new t$_("scene is required.");e=o$a(e);var i=document.createElement("div"),n=new a(t,i);this._viewModel=n,this._container=e;var r=document.createElement("div");this._element=r;var o=document.createElement("div");o.textContent="Cesium Inspector",o.className="cesium-cesiumInspector-button",o.setAttribute("data-bind","click: toggleDropDown"),r.appendChild(o),r.className="cesium-cesiumInspector",r.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : dropDownVisible, "cesium-cesiumInspector-hidden" : !dropDownVisible }'),e.appendChild(this._element);var s=document.createElement("div");this._panel=s,s.className="cesium-cesiumInspector-dropDown",r.appendChild(s);var l=s$2.createSection,u=s$2.createCheckbox,c=l(s,"General","generalVisible","toggleGeneral"),h=u("Show Frustums","frustums"),d=document.createElement("div");d.className="cesium-cesiumInspector-frustumStatistics",d.setAttribute("data-bind","visible: frustums, html: frustumStatisticText"),h.appendChild(d),c.appendChild(h),c.appendChild(u("Show Frustum Planes","frustumPlanes")),c.appendChild(u("Performance Display","performance")),i.className="cesium-cesiumInspector-performanceDisplay",c.appendChild(i);var f=document.createElement("div");f.className="cesium-cesiumInspector-shaderCache",f.setAttribute("data-bind","html: shaderCacheText"),c.appendChild(f);var p=document.createElement("div");c.appendChild(p);var _=document.createElement("span");_.setAttribute("data-bind",'html: "     Frustum:"'),p.appendChild(_);var m=document.createElement("span");m.setAttribute("data-bind","text: depthFrustumText"),p.appendChild(m);var $=document.createElement("input");$.type="button",$.value="-",$.className="cesium-cesiumInspector-pickButton",$.setAttribute("data-bind","click: decrementDepthFrustum"),p.appendChild($);var g=document.createElement("input");g.type="button",g.value="+",g.className="cesium-cesiumInspector-pickButton",g.setAttribute("data-bind","click: incrementDepthFrustum"),p.appendChild(g);var y=l(s,"Primitives","primitivesVisible","togglePrimitives"),v=document.createElement("div");v.className="cesium-cesiumInspector-pickSection",y.appendChild(v);var x=document.createElement("input");x.type="button",x.value="Pick a primitive",x.className="cesium-cesiumInspector-pickButton",x.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive');var b=document.createElement("div");b.className="cesium-cesiumInspector-center",b.appendChild(x),v.appendChild(b),v.appendChild(u("Show bounding sphere","primitiveBoundingSphere","hasPickedPrimitive")),v.appendChild(u("Show reference frame","primitiveReferenceFrame","hasPickedPrimitive")),this._primitiveOnly=u("Show only selected","filterPrimitive","hasPickedPrimitive"),v.appendChild(this._primitiveOnly);var S=l(s,"Terrain","terrainVisible","toggleTerrain"),w=document.createElement("div");w.className="cesium-cesiumInspector-pickSection",S.appendChild(w);var C=document.createElement("input");C.type="button",C.value="Pick a tile",C.className="cesium-cesiumInspector-pickButton",C.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'),(b=document.createElement("div")).appendChild(C),b.className="cesium-cesiumInspector-center",w.appendChild(b);var T=document.createElement("div");w.appendChild(T);var P=document.createElement("input");P.type="button",P.value="Parent",P.className="cesium-cesiumInspector-pickButton",P.setAttribute("data-bind","click: selectParent");var E=document.createElement("input");E.type="button",E.value="NW",E.className="cesium-cesiumInspector-pickButton",E.setAttribute("data-bind","click: selectNW");var A=document.createElement("input");A.type="button",A.value="NE",A.className="cesium-cesiumInspector-pickButton",A.setAttribute("data-bind","click: selectNE");var L=document.createElement("input");L.type="button",L.value="SW",L.className="cesium-cesiumInspector-pickButton",L.setAttribute("data-bind","click: selectSW");var M=document.createElement("input");M.type="button",M.value="SE",M.className="cesium-cesiumInspector-pickButton",M.setAttribute("data-bind","click: selectSE");var I=document.createElement("div");I.className="cesium-cesiumInspector-tileText",T.className="cesium-cesiumInspector-frustumStatistics",T.appendChild(I),T.setAttribute("data-bind","visible: hasPickedTile"),I.setAttribute("data-bind","html: tileText");var O=document.createElement("div");O.className="cesium-cesiumInspector-relativeText",O.textContent="Select relative:",T.appendChild(O);var D=document.createElement("table"),R=document.createElement("tr"),N=document.createElement("tr"),F=document.createElement("td");F.appendChild(P);var B=document.createElement("td");B.appendChild(E);var z=document.createElement("td");z.appendChild(A),R.appendChild(F),R.appendChild(B),R.appendChild(z);var G=document.createElement("td"),k=document.createElement("td");k.appendChild(L);var U=document.createElement("td");U.appendChild(M),N.appendChild(G),N.appendChild(k),N.appendChild(U),D.appendChild(R),D.appendChild(N),T.appendChild(D),w.appendChild(u("Show bounding volume","tileBoundingSphere","hasPickedTile")),w.appendChild(u("Show only selected","filterTile","hasPickedTile")),S.appendChild(u("Wireframe","wireframe")),S.appendChild(u("Suspend LOD update","suspendUpdates")),S.appendChild(u("Show tile coordinates","tileCoordinates")),le$2.applyBindings(n,this._element)}function f$2(e){return o$12("Assets/Textures/SkyBox/tycho2t3_80_"+e+".jpg")}function K(e){e._renderLoopRunning=!0;var t=0;s$_((function i(n){if(!e.isDestroyed())if(e._useDefaultRenderLoop)try{var r=e._targetFrameRate;if(t$$(r)){var o=1e3/r,a=n-t;a>o&&(e.resize(),e.render(),t=n-a%o),s$_(i)}else e.resize(),e.render(),s$_(i)}catch(t){e._errorListenerEvent.raiseEvent(t)}else e._renderLoopRunning=!1}))}function J(e){var t=e._useBrowserRecommendedResolution?1:window.devicePixelRatio;return t*=e._resolutionScale,e._pixelRatio=t,t$$(e._scene)&&(e._scene.pixelRatio=t),t}function Q$1(e,t,i,n){var r=e,o=t;(r>i||o>n)&&(r/i>o/n?(r=i,o=t/e*i):(r=e/t*n,o=n));return{width:r,height:o}}function S$2(e){var t=e._canvas,i=t.clientWidth,n=t.clientHeight,r=J(e);e._canvasClientWidth=i,e._canvasClientHeight=n,i*=r,n*=r;var o=3840,a=1080,s=e._options;t$$(s.contextOptions)&&(o=e$1Y(s.contextOptions.maxDrawingBufferWidth,o),a=e$1Y(s.contextOptions.maxDrawingBufferHeight,a));var l=Q$1(i,n,o,a);t.width=l.width,t.height=l.height,e._canRender=0!==i&&0!==n,e._lastDevicePixelRatio=window.devicePixelRatio}function k$1(e){var t=e._canvas,i=t.width,n=t.height;if(0!==i&&0!==n){var r=e._scene.camera.frustum;t$$(r.aspectRatio)?r.aspectRatio=i/n:(r.top=r.right*(n/i),r.bottom=-r.top)}}function p(e,t){if(!t$$(e))throw new t$_("container is required.");e=o$a(e),t=e$1Y(t,{}),this._options=t;var i=document.createElement("div");i.className="cesium-widget",e.appendChild(i);var n=document.createElement("canvas"),r=o$$.supportsImageRenderingPixelated();this._supportsImageRenderingPixelated=r,r&&(n.style.imageRendering=o$$.imageRenderingValue()),n.oncontextmenu=function(){return!1},n.onselectstart=function(){return!1},i.appendChild(n);var o=document.createElement("div");o.className="cesium-widget-credits";var a=t$$(t.creditContainer)?o$a(t.creditContainer):i;a.appendChild(o);var s=t$$(t.creditViewport)?o$a(t.creditViewport):i,l=e$1Y(t.showRenderLoopErrors,!0),u=e$1Y(t.useBrowserRecommendedResolution,!0);this._element=i,this._container=e,this._canvas=n,this._canvasClientWidth=0,this._canvasClientHeight=0,this._lastDevicePixelRatio=0,this._creditViewport=s,this._creditContainer=a,this._innerCreditContainer=o,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=l,this._resolutionScale=1,this._useBrowserRecommendedResolution=u,this._forceResize=!1,this._clock=t$$(t.clock)?t.clock:new a$M,this._isShowErrorPanel=!0,this._errorListenerEvent=new o$15,S$2(this);try{var c=new M$4({canvas:n,contextOptions:t.contextOptions,creditContainer:o,creditViewport:s,mapProjection:t.mapProjection,orderIndependentTranslucency:t.orderIndependentTranslucency,scene3DOnly:e$1Y(t.scene3DOnly,!1),terrainExaggeration:t.terrainExaggeration,shadows:t.shadows,mapMode2D:t.mapMode2D,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange});c.pixelRatio=this._pixelRatio,this._scene=c,c.camera.constrainedAxis=a$11.UNIT_Z,k$1(this);var h=e$1Y(c.mapProjection.ellipsoid,n$1c.WGS84),d=t.globe;t$$(d)||(d=new u$c(h)),!1!==d&&(c.globe=d,c.globe.shadows=e$1Y(t.terrainShadows,q$Q.RECEIVE_ONLY));var f=t.skyBox;t$$(f)||(f=new m$9({sources:{positiveX:f$2("px"),negativeX:f$2("mx"),positiveY:f$2("py"),negativeY:f$2("my"),positiveZ:f$2("pz"),negativeZ:f$2("mz")}})),!1!==f&&(c.skyBox=f,c.sun=new m$8,c.moon=new s$d);var p=t.cloudBox;t$$(p)&&(c.cloudBox=p);var _=t.skyAtmosphere;t$$(_)||(_=new s$6(h)),!1!==_&&(c.skyAtmosphere=_);var m=!1!==t.globe&&t.imageryProvider;t$$(m)||(m=new h$f({url:o$12("Assets/Textures/GlobalBkLayer.jpg")})),!1!==m&&c.imageryLayers.addImageryProvider(m),t$$(t.terrainProvider)&&!1!==t.globe&&(c.terrainProvider=t.terrainProvider,t.terrainProvider.readyPromise.otherwise((function(){c.terrainProvider=c.globe._defaultTerrainProvider}))),t$$(t.gridProvider)&&c.imageryLayers.addGridProvider(t.gridProvider),this._screenSpaceEventHandler=new f$N(n,!1),t$$(t.sceneMode)&&(t.sceneMode===b$1d.SCENE2D&&this._scene.morphTo2D(0),t.sceneMode===b$1d.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=e$1Y(t.useDefaultRenderLoop,!0),this._targetFrameRate=void 0,this.targetFrameRate=t.targetFrameRate;var $=this;c.renderError.addEventListener((function(e,t){if($._useDefaultRenderLoop=!1,$._renderLoopRunning=!1,$._showRenderLoopErrors){$.showErrorPanel("An error occurred while rendering. Rendering has stopped.",void 0,t)}}))}catch(e){if(l){this.showErrorPanel("Error constructing CesiumWidget.",'Visit <a href="http://get.webgl.org">http://get.webgl.org</a> to verify that your web browser and hardware support WebGL. Consider trying a different web browser or updating your video drivers. Detailed error information is below:',e)}throw e}}function r$5(e){var t=this,i=le$2.observable(n$15.fullscreen),n=le$2.observable(n$15.enabled);this.isFullscreen=void 0,le$2.defineProperty(this,"isFullscreen",{get:function(){return i()}}),this.isFullscreenEnabled=void 0,le$2.defineProperty(this,"isFullscreenEnabled",{get:function(){return n()},set:function(e){n(e&&n$15.enabled)}}),this.tooltip=void 0,le$2.defineProperty(this,"tooltip",(function(){return this.isFullscreenEnabled?i()?"Exit full screen":"Full screen":"Full screen unavailable"})),this._command=s$3((function(){n$15.fullscreen?n$15.exitFullscreen():n$15.requestFullscreen(t._fullscreenElement)}),le$2.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=e$1Y(o$a(e),document.body),this._callback=function(){i(n$15.fullscreen)},document.addEventListener(n$15.changeEventName,this._callback)}Object.defineProperties(l$2.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},statisticsText:{get:function(){return this._statisticsText}},pickStatisticsText:{get:function(){return this._pickStatisticsText}},colorBlendModes:{get:function(){return le$1}},editorError:{get:function(){return this._editorError}},tileset:{get:function(){return this._tileset},set:function(e){if(this._tileset=e,this._style=void 0,this.styleString="{}",this.feature=void 0,this.tile=void 0,t$$(e)){var t=this;e.readyPromise.then((function(e){t.isDestroyed()||t._properties(e.properties)}));for(var i=["colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl"],n=i.length,r=0;r<n;++r){var o=i[r];this[o]=this[o]}this.maximumScreenSpaceError=e.maximumScreenSpaceError,this.dynamicScreenSpaceError=e.dynamicScreenSpaceError,this.dynamicScreenSpaceErrorDensity=e.dynamicScreenSpaceErrorDensity,this.dynamicScreenSpaceErrorFactor=e.dynamicScreenSpaceErrorFactor,this.colorBlendMode=e.colorBlendMode,this.skipLevelOfDetail=e.skipLevelOfDetail,this.skipScreenSpaceErrorFactor=e.skipScreenSpaceErrorFactor,this.baseScreenSpaceError=e.baseScreenSpaceError,this.skipLevels=e.skipLevels,this.immediatelyLoadDesiredLevelOfDetail=e.immediatelyLoadDesiredLevelOfDetail,this.loadSiblings=e.loadSiblings;var a=e.pointCloudShading;this.pointCloudShading=a.attenuation,this.geometricErrorScale=a.geometricErrorScale,this.maximumAttenuation=a.maximumAttenuation?a.maximumAttenuation:0,this.baseResolution=a.baseResolution?a.baseResolution:0,this.eyeDomeLighting=a.eyeDomeLighting,this.eyeDomeLightingStrength=a.eyeDomeLightingStrength,this.eyeDomeLightingRadius=a.eyeDomeLightingRadius,this._scene.requestRender()}else this._properties({});this._statisticsText=y$2(e,!1),this._pickStatisticsText=y$2(e,!0),Y(this,!1)}},feature:{get:function(){return this._feature},set:function(e){if(this._feature!==e){var t=this._feature;t$$(t)&&!t.content.isDestroyed()&&(!this.colorize&&t$$(this._style)?t.color=t$$(this._style.color)?this._style.color.evaluateColor(t,ae):e$1z.WHITE:t.color=L$3,this._scene.requestRender()),t$$(e)&&(e$1z.clone(e.color,L$3),e.color=Z$1,this._scene.requestRender()),this._feature=e}}},tile:{get:function(){return this._tile},set:function(e){if(this._tile!==e){var t=this._tile;t$$(t)&&!t.isDestroyed()&&!w$3(t.content)&&(t.color=L$3,this._scene.requestRender()),t$$(e)&&!w$3(e.content)&&(e$1z.clone(e.color,L$3),e.color=Z$1,this._scene.requestRender()),this._tile=e}}}}),l$2.prototype.togglePickTileset=function(){this.pickActive=!this.pickActive},l$2.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible},l$2.prototype.toggleTileset=function(){this.tilesetVisible=!this.tilesetVisible},l$2.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible},l$2.prototype.toggleUpdate=function(){this.updateVisible=!this.updateVisible},l$2.prototype.toggleLogging=function(){this.loggingVisible=!this.loggingVisible},l$2.prototype.toggleStyle=function(){this.styleVisible=!this.styleVisible},l$2.prototype.toggleTileDebugLabels=function(){this.tileDebugLabelsVisible=!this.tileDebugLabelsVisible},l$2.prototype.toggleOptimization=function(){this.optimizationVisible=!this.optimizationVisible},l$2.prototype.trimTilesCache=function(){t$$(this._tileset)&&this._tileset.trimLoadedTiles()},l$2.prototype.compileStyle=function(){var e=this._tileset;if(t$$(e)&&this.styleString!==JSON.stringify(e.style)){this._editorError="";try{0===this.styleString.length&&(this.styleString="{}"),this._style=new h$h(JSON.parse(this.styleString)),this._shouldStyle=!0,this._scene.requestRender()}catch(e){this._editorError=e.toString()}this.feature=this._feature,this.tile=this._tile}},l$2.prototype.styleEditorKeyPress=function(e,t){if(9===t.keyCode){t.preventDefault();var i,n=t.target,r=n.selectionStart,o=n.selectionEnd,a=o,s=n.value.slice(r,o).split("\n"),l=s.length;if(t.shiftKey)for(i=0;i<l;++i)" "===s[i][0]&&(" "===s[i][1]?(s[i]=s[i].substr(2),a-=2):(s[i]=s[i].substr(1),a-=1));else for(i=0;i<l;++i)s[i]=" "+s[i],a+=2;var u=s.join("\n");n.value=n.value.slice(0,r)+u+n.value.slice(o),n.selectionStart=r!==o?r:a,n.selectionEnd=a}else t.ctrlKey&&(10===t.keyCode||13===t.keyCode)&&this.compileStyle();return!0},l$2.prototype._update=function(){var e=this._tileset;if(this.performance&&this._performanceDisplay.update(),t$$(e)){if(e.isDestroyed())return this.tile=void 0,this.feature=void 0,void(this.tileset=void 0);var t=e.style;this._style!==e.style&&(this._shouldStyle?(e.style=this._style,this._shouldStyle=!1):(this._style=t,this.styleString=JSON.stringify(t.style,null," ")))}this.showStatistics&&(this._statisticsText=y$2(e,!1),this._pickStatisticsText=y$2(e,!0))},l$2.prototype.isDestroyed=function(){return!1},l$2.prototype.destroy=function(){this._eventHandler.destroy(),this._removePostRenderEvent();var e=this;return this._definedProperties.forEach((function(t){le$2.getObservable(e,t).dispose()})),s$1e(this)},l$2.getStatistics=y$2,Object.defineProperties(y$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),y$1.prototype.isDestroyed=function(){return!1},y$1.prototype.destroy=function(){return le$2.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),s$1e(this)},Object.defineProperties(a.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},toggleDropDown:{get:function(){return this._toggleDropDown}},showPrimitiveBoundingSphere:{get:function(){return this._showPrimitiveBoundingSphere}},showPrimitiveReferenceFrame:{get:function(){return this._showPrimitiveReferenceFrame}},doFilterPrimitive:{get:function(){return this._doFilterPrimitive}},incrementDepthFrustum:{get:function(){return this._incrementDepthFrustum}},decrementDepthFrustum:{get:function(){return this._decrementDepthFrustum}},showTileCoordinates:{get:function(){return this._showTileCoordinates}},showTileBoundingSphere:{get:function(){return this._showTileBoundingSphere}},doFilterTile:{get:function(){return this._doFilterTile}},toggleGeneral:{get:function(){return this._toggleGeneral}},togglePrimitives:{get:function(){return this._togglePrimitives}},toggleTerrain:{get:function(){return this._toggleTerrain}},pickPrimitive:{get:function(){return this._pickPrimitive}},pickTile:{get:function(){return this._pickTile}},selectParent:{get:function(){var e=this;return s$3((function(){e.tile=e.tile.parent}))}},selectNW:{get:function(){var e=this;return s$3((function(){e.tile=e.tile.northwestChild}))}},selectNE:{get:function(){var e=this;return s$3((function(){e.tile=e.tile.northeastChild}))}},selectSW:{get:function(){var e=this;return s$3((function(){e.tile=e.tile.southwestChild}))}},selectSE:{get:function(){var e=this;return s$3((function(){e.tile=e.tile.southeastChild}))}},primitive:{get:function(){return this._primitive},set:function(e){var t=this._primitive;e!==t&&(this.hasPickedPrimitive=!0,t$$(t)&&(t.debugShowBoundingVolume=!1),this._scene.debugCommandFilter=void 0,t$$(this._modelMatrixPrimitive)&&(this._scene.primitives.remove(this._modelMatrixPrimitive),this._modelMatrixPrimitive=void 0),this._primitive=e,e.show=!1,setTimeout((function(){e.show=!0}),50),this.showPrimitiveBoundingSphere(),this.showPrimitiveReferenceFrame(),this.doFilterPrimitive())}},tile:{get:function(){return this._tile},set:function(e){if(t$$(e)){if(this.hasPickedTile=!0,e!==this._tile){this.tileText="L: "+e.level+" X: "+e.x+" Y: "+e.y,this.tileText+="<br>SW corner: "+e.rectangle.west+", "+e.rectangle.south,this.tileText+="<br>NE corner: "+e.rectangle.east+", "+e.rectangle.north;var t=e.data;t$$(t)?this.tileText+="<br>Min: "+t.minimumHeight+" Max: "+t.maximumHeight:this.tileText+="<br>(Tile is not loaded)"}this._tile=e,this.showTileBoundingSphere(),this.doFilterTile()}else this.hasPickedTile=!1,this._tile=void 0}}}),a.prototype._update=function(){this.frustums&&(this.frustumStatisticText=y(this._scene.debugFrustumStatistics));var e=this._scene.numberOfFrustums;this._numberOfFrustums=e,this.depthFrustum=g$1(1,e,this.depthFrustum),this.depthFrustumText=this.depthFrustum+" of "+e,this.performance&&this._performanceDisplay.update(),this.primitiveReferenceFrame&&(this._modelMatrixPrimitive.modelMatrix=this._primitive.modelMatrix),this.shaderCacheText="Cached shaders: "+this._scene.context.shaderCache.numberOfShaders},a.prototype.isDestroyed=function(){return!1},a.prototype.destroy=function(){return this._eventHandler.destroy(),this._removePostRenderEvent(),this._frustumsSubscription.dispose(),this._frustumPlanesSubscription.dispose(),this._performanceSubscription.dispose(),this._primitiveBoundingSphereSubscription.dispose(),this._primitiveReferenceFrameSubscription.dispose(),this._filterPrimitiveSubscription.dispose(),this._wireframeSubscription.dispose(),this._globeDepthSubscription.dispose(),this._pickDepthSubscription.dispose(),this._depthFrustumSubscription.dispose(),this._suspendUpdatesSubscription.dispose(),this._tileCoordinatesSubscription.dispose(),this._tileBoundingSphereSubscription.dispose(),this._filterTileSubscription.dispose(),this._pickPrimitiveActiveSubscription.dispose(),this._pickTileActiveSubscription.dispose(),s$1e(this)},Object.defineProperties(w$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),w$1.prototype.isDestroyed=function(){return!1},w$1.prototype.destroy=function(){return le$2.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),s$1e(this)},Object.defineProperties(p.prototype,{container:{get:function(){return this._container}},canvas:{get:function(){return this._canvas}},creditContainer:{get:function(){return this._creditContainer}},creditViewport:{get:function(){return this._creditViewport}},scene:{get:function(){return this._scene}},imageryLayers:{get:function(){return this._scene.imageryLayers}},terrainProvider:{get:function(){return this._scene.terrainProvider},set:function(e){this._scene.terrainProvider=e}},camera:{get:function(){return this._scene.camera}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._targetFrameRate},set:function(e){if(e<=0)throw new t$_("targetFrameRate must be greater than 0, or undefined.");this._targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(e){this._useDefaultRenderLoop!==e&&(this._useDefaultRenderLoop=e,e&&!this._renderLoopRunning&&K(this))}},resolutionScale:{get:function(){return this._resolutionScale},set:function(e){if(e<=0)throw new t$_("resolutionScale must be greater than 0.");this._resolutionScale=e,this._forceResize=!0}},useBrowserRecommendedResolution:{get:function(){return this._useBrowserRecommendedResolution},set:function(e){this._useBrowserRecommendedResolution!==e&&(this._useBrowserRecommendedResolution=e,this._forceResize=!0)}},setErrorPanelIsShow:{get:function(){return this._isShowErrorPanel},set:function(e){this._isShowErrorPanel!==e&&(this._isShowErrorPanel=e)}},errorListenerEvent:{get:function(){return this._errorListenerEvent}}}),p.prototype.showErrorPanel=function(e,t,i){var n=this._element,r=document.createElement("div");r.className="cesium-widget-errorPanel",!1===this.setErrorPanelIsShow?r.style.display="none":r.style.display="block";var o=document.createElement("div");o.className="cesium-widget-errorPanel-content",r.appendChild(o);var a=document.createElement("div");a.className="cesium-widget-errorPanel-header",a.appendChild(document.createTextNode(e)),o.appendChild(a);var s=document.createElement("div");function l(){s.style.maxHeight=Math.max(Math.round(.9*n.clientHeight-100),30)+"px"}if(s.className="cesium-widget-errorPanel-scroll",o.appendChild(s),l(),t$$(window.addEventListener)&&window.addEventListener("resize",l,!1),t$$(t)){var u=document.createElement("div");u.className="cesium-widget-errorPanel-message",u.innerHTML="<p>"+t+"</p>",s.appendChild(u)}var c="(no error details available)";t$$(i)&&(c=f$12(i));var h=document.createElement("div");h.className="cesium-widget-errorPanel-message",h.appendChild(document.createTextNode(c)),s.appendChild(h);var d=document.createElement("div");d.className="cesium-widget-errorPanel-buttonPanel",o.appendChild(d);var f=document.createElement("button");f.setAttribute("type","button"),f.className="cesium-button",f.appendChild(document.createTextNode("OK")),f.onclick=function(){t$$(l)&&t$$(window.removeEventListener)&&window.removeEventListener("resize",l,!1),n.removeChild(r)},d.appendChild(f),n.appendChild(r),typeof console<"u"&&console.error(e+"\n"+t+"\n"+c)},p.prototype.isDestroyed=function(){return!1},p.prototype.destroy=function(){this._scene=this._scene&&this._scene.destroy(),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),s$1e(this)},p.prototype.resize=function(){var e=this._canvas,t=e.clientWidth,i=e.clientHeight;!this._forceResize&&this._canvasClientWidth===t&&this._canvasClientHeight===i&&this._lastDevicePixelRatio===window.devicePixelRatio||(this._forceResize=!1,S$2(this),k$1(this),this._scene.requestRender())},p.prototype.render=function(){if(this._canRender){this._scene.initializeFrame();var e=this._clock.tick();this._scene.render(e)}else this._clock.tick()},Object.defineProperties(r$5.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(e){if(!(e instanceof Element))throw new t$_("value must be a valid Element.");this._fullscreenElement=e}},command:{get:function(){return this._command}}}),r$5.prototype.isDestroyed=function(){return!1},r$5.prototype.destroy=function(){document.removeEventListener(n$15.changeEventName,this._callback),s$1e(this)};var u$3="M 83.96875 17.5625 L 83.96875 17.59375 L 76.65625 24.875 L 97.09375 24.96875 L 76.09375 45.96875 L 81.9375 51.8125 L 102.78125 30.9375 L 102.875 51.15625 L 110.15625 43.875 L 110.1875 17.59375 L 83.96875 17.5625 z M 44.125 17.59375 L 17.90625 17.625 L 17.9375 43.90625 L 25.21875 51.1875 L 25.3125 30.96875 L 46.15625 51.8125 L 52 45.96875 L 31 25 L 51.4375 24.90625 L 44.125 17.59375 z M 46.0625 76.03125 L 25.1875 96.875 L 25.09375 76.65625 L 17.8125 83.9375 L 17.8125 110.21875 L 44 110.25 L 51.3125 102.9375 L 30.90625 102.84375 L 51.875 81.875 L 46.0625 76.03125 z M 82 76.15625 L 76.15625 82 L 97.15625 103 L 76.71875 103.0625 L 84.03125 110.375 L 110.25 110.34375 L 110.21875 84.0625 L 102.9375 76.8125 L 102.84375 97 L 82 76.15625 z",m$5="M 104.34375 17.5625 L 83.5 38.4375 L 83.40625 18.21875 L 76.125 25.5 L 76.09375 51.78125 L 102.3125 51.8125 L 102.3125 51.78125 L 109.625 44.5 L 89.1875 44.40625 L 110.1875 23.40625 L 104.34375 17.5625 z M 23.75 17.59375 L 17.90625 23.4375 L 38.90625 44.4375 L 18.5 44.53125 L 25.78125 51.8125 L 52 51.78125 L 51.96875 25.53125 L 44.6875 18.25 L 44.625 38.46875 L 23.75 17.59375 z M 25.6875 76.03125 L 18.375 83.3125 L 38.78125 83.40625 L 17.8125 104.40625 L 23.625 110.25 L 44.5 89.375 L 44.59375 109.59375 L 51.875 102.3125 L 51.875 76.0625 L 25.6875 76.03125 z M 102.375 76.15625 L 76.15625 76.1875 L 76.1875 102.4375 L 83.46875 109.71875 L 83.5625 89.53125 L 104.40625 110.375 L 110.25 104.53125 L 89.25 83.53125 L 109.6875 83.46875 L 102.375 76.15625 z";function i$4(e,t){if(!t$$(e))throw new t$_("container is required.");e=o$a(e);var i=new r$5(t);i._exitFullScreenPath=m$5,i._enterFullScreenPath=u$3;var n=document.createElement("button");n.type="button",n.className="cesium-button cesium-fullscreenButton",n.setAttribute("data-bind","attr: { title: tooltip },click: command,enable: isFullscreenEnabled,cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }"),e.appendChild(n),le$2.applyBindings(i,n),this._container=e,this._viewModel=i,this._element=n}function x$2(e){if(!t$$(e)||!t$$(e.scene)||!t$$(e.viewer))throw new t$_("options.scene and optinss.viewer is required.");this._viewer=e.viewer,this._url=e$1Y(e.url,"//dev.virtualearth.net/"),this._url.length>0&&"/"!==this._url[this._url.length-1]&&(this._url+="/"),this._key=e$1E.getKey(e.key),this._scene=e.scene,this._flightDuration=e.flightDuration,this._searchText="",this._isSearchInProgress=!1,this._geocodeInProgress=void 0,this._complete=new o$15,this._dataSource=void 0;var t=this;this._searchCommand=s$3((function(){t.isSearchInProgress?U(t):Q(t)})),this.keepExpanded=!1,le$2.track(this,["_searchText","_isSearchInProgress","keepExpanded"]),this.isSearchInProgress=void 0,le$2.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,le$2.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(e){if("string"!=typeof e)throw new t$_("value must be a valid string.");this._searchText=e}}),this.flightDuration=void 0,le$2.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(e){if(t$$(e)&&e<0)throw new t$_("value must be positive.");this._flightDuration=e}})}function A$1(e,t){e._scene.camera.flyTo({destination:t,complete:function(){e._complete.raiseEvent()},duration:e._flightDuration,endTransform:c$1a.IDENTITY})}Object.defineProperties(i$4.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),i$4.prototype.isDestroyed=function(){return!1},i$4.prototype.destroy=function(){return this._viewModel.destroy(),le$2.cleanNode(this._element),this._container.removeChild(this._element),s$1e(this)},Object.defineProperties(x$2.prototype,{url:{get:function(){return this._url}},key:{get:function(){return this._key}},complete:{get:function(){return this._complete}},scene:{get:function(){return this._scene}},search:{get:function(){return this._searchCommand}},dataSource:{get:function(){return this._dataSource}}});var L$2="https://www.supermapol.com/iserver/services/localsearch/rest/searchdatas/China/poiinfos.json";function Q(e){var t=e.searchText;if(!/^\s*$/.test(t)){var i=t.match(/[^\s,\n]+/g);if(2===i.length||3===i.length){var n=+i[0],r=+i[1],o=3===i.length?+i[2]:300;if(!isNaN(n)&&!isNaN(r)&&!isNaN(o))return void A$1(e,a$11.fromDegrees(n,r,o))}e._isSearchInProgress=!0;var a={key:e.geoKey},s=t.match(/[^\s-\n]+/g);2===s.length?(a.city=s[0],a.keywords=s[1]):a.keywords=s[0],t$X.fetch({url:L$2,queryParameters:a}).then((t=>{t=JSON.parse(t);if(e._isSearchInProgress=!1,t$$(t.error))return e._isSearchInProgress=!1,void(e.searchText=t.error.errorMsg);t$$(e._datasource)&&(e._viewer.dataSources.remove(e._datasource),e._datasource=void 0);var i=t.poiInfos[0];e._searchText=i.name;var n=i.location;n.lon=n.x,n.lat=n.y,!t$$(a$11.fromDegrees(n.x,n.y,500))||(e._datasource=V$1(t,e),e._viewer.dataSources.add(e._datasource),c$18(e._datasource,(function(t){e._datasource=t,e._viewer.flyTo(t)}),(function(e){console.log(e)})))})).catch((e=>{console.log("error",e)}))}}function U(e){e._isSearchInProgress=!1,t$$(e._geocodeInProgress)&&(e._geocodeInProgress.cancel=!0,e._geocodeInProgress=void 0)}function V$1(e,t){for(var i={type:"FeatureCollection",features:[]},n=e.poiInfos,r=[],o=0,a=n.length;o<a;o++){var s=n[o];s.address;var l=s.location,u=n$1d.toRadians(l.x),c=n$1d.toRadians(l.y);r.push(new i$1g(u,c))}return c$18(S$B(t._viewer.terrainProvider,9,r),(function(e){for(var t=0,r=n.length;t<r;t++){var o=n[t],a=o.address,s=e[t],l={type:"Feature",geometry:{type:"Point",coordinates:[n$1d.toDegrees(s.longitude),n$1d.toDegrees(s.latitude),s.height]},properties:{title:o.name,"marker-color":"#B9EB14",tel:o.telephone,address:a}};i.features.push(l)}return(new y$u).loadPoiJsonData(i)}))}var l$1="M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z",E$2="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z";function s$1(e){if(!t$$(e)||!t$$(e.container))throw new t$_("options.container is required.");if(!t$$(e.scene)||!t$$(e.viewer))throw new t$_("options.scene and options.viewer is required.");var t=o$a(e.container),i=new x$2(e);i._startSearchPath=l$1,i._stopSearchPath=E$2;var n=document.createElement("form");n.setAttribute("data-bind","submit: search");var r=document.createElement("input");r.type="search",r.className="cesium-geocoder-input",r.setAttribute("placeholder","Enter an address or landmark..."),r.setAttribute("data-bind",'value: searchText,valueUpdate: "afterkeydown",disable: isSearchInProgress,css: { "cesium-geocoder-input-wide" : keepExpanded || searchText.length > 0 }'),n.appendChild(r);var o=document.createElement("span");o.className="cesium-geocoder-searchButton",o.setAttribute("data-bind","click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"),n.appendChild(o),t.appendChild(n),le$2.applyBindings(i,n),this._container=t,this._viewModel=i,this._form=n,this._onInputBegin=function(e){t.contains(e.target)||r.blur()},this._onInputEnd=function(e){t.contains(e.target)&&r.focus()},o$$.supportsPointerEvents()?(document.addEventListener("pointerdown",this._onInputBegin,!0),document.addEventListener("pointerup",this._onInputEnd,!0)):(document.addEventListener("mousedown",this._onInputBegin,!0),document.addEventListener("mouseup",this._onInputEnd,!0),document.addEventListener("touchstart",this._onInputBegin,!0),document.addEventListener("touchend",this._onInputEnd,!0))}function n$4(e,t){if(!t$$(e))throw new t$_("scene is required.");this._scene=e,this._duration=t;var i=this;this._command=s$3((function(){i._scene.camera.flyHome(i._duration)})),this.tooltip="View Home",le$2.track(this,["tooltip"])}function o$4(e,t,i){if(!t$$(e))throw new t$_("container is required.");e=o$a(e);var n=new n$4(t,i);n._svgPath="M14,4l-10,8.75h20l-4.25-3.7188v-4.6562h-2.812v2.1875l-2.938-2.5625zm-7.0938,9.906v10.094h14.094v-10.094h-14.094zm2.1876,2.313h3.3122v4.25h-3.3122v-4.25zm5.8442,1.281h3.406v6.438h-3.406v-6.438z";var r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button cesium-home-button",r.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"),e.appendChild(r),le$2.applyBindings(n,r),this._container=e,this._viewModel=n,this._element=r}Object.defineProperties(s$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),s$1.prototype.isDestroyed=function(){return!1},s$1.prototype.destroy=function(){return o$$.supportsPointerEvents()?(document.removeEventListener("pointerdown",this._onInputBegin,!0),document.removeEventListener("pointerup",this._onInputEnd,!0)):(document.removeEventListener("mousedown",this._onInputBegin,!0),document.removeEventListener("mouseup",this._onInputEnd,!0),document.removeEventListener("touchstart",this._onInputBegin,!0),document.removeEventListener("touchend",this._onInputEnd,!0)),le$2.cleanNode(this._form),this._container.removeChild(this._form),s$1e(this)},Object.defineProperties(n$4.prototype,{scene:{get:function(){return this._scene}},command:{get:function(){return this._command}},duration:{get:function(){return this._duration},set:function(e){if(t$$(e)&&e<0)throw new t$_("value must be positive.");this._duration=e}}}),Object.defineProperties(o$4.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),o$4.prototype.isDestroyed=function(){return!1},o$4.prototype.destroy=function(){return le$2.cleanNode(this._element),this._container.removeChild(this._element),s$1e(this)};var n$3="M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4853444 22.104033 11.423165 24.0625 13.84375 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 8.975298 28.305952 7.03125 25.875 7.03125 L 13.84375 7.03125 z",o$3="M 27.34375 1.65625 L 5.28125 27.9375 L 8.09375 30.3125 L 30.15625 4.03125 L 27.34375 1.65625 z M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4724893 20.232036 9.5676108 20.7379 9.75 21.21875 L 21.65625 7.03125 L 13.84375 7.03125 z M 28.21875 7.71875 L 14.53125 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 9.8371439 29.456025 8.4902779 28.21875 7.71875 z";function e(){this._cameraClicked=new o$15,this._closeClicked=new o$15,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",le$2.track(this,["showInfo","titleText","description","maxHeight","enableCamera","isCameraTracking"]),this._loadingIndicatorHtml='<div class="cesium-infoBox-loadingContainer"><span class="cesium-infoBox-loading"></span></div>',this.cameraIconPath=void 0,le$2.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?o$3:n$3}}),le$2.defineProperty(this,"_bodyless",{get:function(){return!t$$(this.description)||0===this.description.length}})}function c$3(t){n$1e.defined("container",t),t=o$a(t);var i=document.createElement("div");i.className="cesium-infoBox",i.setAttribute("data-bind",'css: { "cesium-infoBox-visible" : showInfo, "cesium-infoBox-bodyless" : _bodyless }'),t.appendChild(i);var n=document.createElement("div");n.className="cesium-infoBox-title",n.setAttribute("data-bind","text: titleText"),i.appendChild(n);var r=document.createElement("button");r.type="button",r.className="cesium-button cesium-infoBox-camera",r.setAttribute("data-bind",'attr: { title: "Focus camera on object" },click: function () { cameraClicked.raiseEvent(this); },enable: enableCamera,cesiumSvgPath: { path: cameraIconPath, width: 32, height: 32 }'),i.appendChild(r);var o=document.createElement("button");o.type="button",o.className="cesium-infoBox-close",o.setAttribute("data-bind","click: function () { closeClicked.raiseEvent(this); }"),o.innerHTML="×",i.appendChild(o);var a=document.createElement("iframe");a.className="cesium-infoBox-iframe",a.setAttribute("sandbox","allow-same-origin allow-popups allow-forms"),a.setAttribute("data-bind","style : { maxHeight : maxHeightOffset(40) }"),a.setAttribute("allowfullscreen",!0),i.appendChild(a);var s=new e;le$2.applyBindings(s,i),this._container=t,this._element=i,this._frame=a,this._viewModel=s,this._descriptionSubscription=void 0;var l=this;a.addEventListener("load",(function(){var e=a.contentDocument,t=e.createElement("link");t.href=o$12("Widgets/InfoBox/InfoBoxDescription.css"),t.rel="stylesheet",t.type="text/css";var n=e.createElement("div");n.className="cesium-infoBox-description",e.head.appendChild(t),e.body.appendChild(n),l._descriptionSubscription=a$2(s,"description",(function(e){a.style.height="5px",n.innerHTML=e;var t=null,r=n.firstElementChild;if(null!==r&&1===n.childNodes.length){var o=window.getComputedStyle(r);if(null!==o){var s=o["background-color"],l=e$1z.fromCssColorString(s);t$$(l)&&0!==l.alpha&&(t=o["background-color"])}}i.style["background-color"]=t;var u=n.getBoundingClientRect().height;a.style.height=u+"px"}))})),a.setAttribute("src","about:blank")}e.prototype.maxHeightOffset=function(e){return this.maxHeight-e+"px"},Object.defineProperties(e.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}}),Object.defineProperties(c$3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}}),c$3.prototype.isDestroyed=function(){return!1},c$3.prototype.destroy=function(){var e=this._container;return le$2.cleanNode(this._element),e.removeChild(this._element),t$$(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),s$1e(this)};var n$2=function(e){var t=document.createElement("div");t.innerHTML=e;for(var i=document.createDocumentFragment();t.firstChild;)i.appendChild(t.firstChild);return i},i$3=function(e,t,i){t=o$a(t);var n,r=n$2(e),o=[];for(n=0;n<r.childNodes.length;++n)o.push(r.childNodes[n]);for(t.appendChild(r),n=0;n<o.length;++n){var a=o[n];(1===a.nodeType||8===a.nodeType)&&le$2.applyBindings(i,a)}return o},k=function(e,t){if(!t$$(e)||!t$$(e.viewer)||!t$$(e.scene))throw new t$_("options and options.viewer and optins.scene is required.");this.viewer=e.viewer,this.viewer.afterViewerChanged=new o$15,this.viewer.beforeViewerChanged=new o$15,this.scene=e.scene,this.eventHelper=new n$W,this.showCompass=t$$(this.scene),this.heading=this.showCompass?this.scene.camera.heading:0,this.isOrbiting=!1,this.orbitCursorAngle=0,this.isRotating=!1,this.rotateInitialCursorAngle=void 0,this.rotateFrame=void 0,this.rotateMouseMoveFunction=void 0,this.rotateMouseUpFunction=void 0,this._unsubcribeFromPostRender=void 0,this.tiltbarLeft=56,this.tiltbarTop=3,this.isTilting=!1,this.zoombarTop=65,this.tiltInitialCursorAngle=0,this.screenSpaceEventHandler=new f$N(t),this.clickStartPosition=null,le$2.track(this,["showCompass","heading","isOrbiting","orbitCursorAngle","isRotating","tiltbarLeft","tiltbarTop","isTilting","zoombarTop"]);var i=this;function n(){t$$(i.viewer)?(i._unsubcribeFromPostRender&&(i._unsubcribeFromPostRender(),i._unsubcribeFromPostRender=void 0),i.showCompass=!0,i._unsubcribeFromPostRender=i.scene.postRender.addEventListener((function(){var e=Math.abs(i.scene.camera.heading-i.heading);if((e<n$1d.PI_OVER_TWO||e>3*n$1d.PI_OVER_TWO)&&(i.heading=i.scene.camera.heading),i.scene.screenSpaceCameraController,!i.isTilting){var t=i.scene.camera.pitch+n$1d.PI_OVER_TWO,n=n$1d.PI_OVER_TWO/20,r=Math.floor(t/n);r=(r=r>19?19:r)<0?0:r,i.tiltbarLeft=P$1[r].x,i.tiltbarTop=P$1[r].y}}))):(i._unsubcribeFromPostRender&&(i._unsubcribeFromPostRender(),i._unsubcribeFromPostRender=void 0),i.showCompass=!1)}this.eventHelper.add(this.viewer.afterViewerChanged,n,this),function(){var t=n$1d.PI_OVER_TWO+e.scene.camera.pitch,n=Math.PI/2/20,r=Math.floor(t/n);r=(r=r>19?19:r)<0?0:r,i.tiltbarLeft=P$1[r].x,i.tiltbarTop=P$1[r].y}(),n()},z=new r$T;new a$11,k.prototype.handleZoomBarScrollMouseDown=function(e,t){e.screenSpaceEventHandler.removeInputAction(Q$L.LEFT_UP),e.screenSpaceEventHandler.removeInputAction(Q$L.MOUSE_MOVE),t$$(e.zoombarTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoombarTickFunction),e.zoomBarScrollMouseUpFunction=void 0,e.zoombarTickFunction=void 0,e.isZoomBarScrolling=!0;var i=e.viewer.scene.camera;e.zoombarTickFunction=function(t){var n=e.zoombarTop-65;n>0?e.viewer.scene.mode===b$1d.COLUMBUS_VIEW?i.zoomOut():S$1(e,-1):n<0&&(e.viewer.scene.mode===b$1d.COLUMBUS_VIEW?i.zoomIn():S$1(e,1))},e.zoomBarScrollMouseMoveFunction=function(t,n){var r=e.zoombarTop,o=t.endPosition.y-t.startPosition.y+r;o=(o=o<0?0:o)>120?120:o,e.zoombarTop=o,e.zoombarTop-r>0?e.viewer.scene.mode===b$1d.COLUMBUS_VIEW?i.zoomOut():S$1(e,-1):e.viewer.scene.mode===b$1d.COLUMBUS_VIEW?i.zoomIn():S$1(e,1)},e.zoomBarScrollMouseUpFunction=function(t){e.isZoomBarScrolling=!1,e.screenSpaceEventHandler.removeInputAction(Q$L.LEFT_UP),e.screenSpaceEventHandler.removeInputAction(Q$L.MOUSE_MOVE),t$$(e.zoombarTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoombarTickFunction),e.zoomBarScrollMouseUpFunction=void 0,e.zoomBarScrollMouseMoveFunction=void 0,e.zoombarTickFunction=void 0,e.zoombarTop=65},e.screenSpaceEventHandler.setInputAction(e.zoomBarScrollMouseUpFunction,Q$L.LEFT_UP),e.screenSpaceEventHandler.setInputAction(e.zoomBarScrollMouseMoveFunction,Q$L.MOUSE_MOVE),e.viewer.clock.onTick.addEventListener(e.zoombarTickFunction)},k.prototype.handleZoomInMouseDown=function(e,t){e.screenSpaceEventHandler.removeInputAction(Q$L.LEFT_UP),t$$(e.zoominTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoominTickFunction),e.zoominMouseUpFunction=void 0,e.zoominTickFunction=void 0,e.isZoomin=!0,e.zoominLastTimestamp=yt$9();var i=e.viewer.scene,n=i.camera;e.zoominTickFunction=function(t){if(e.viewer.scene.mode===b$1d.COLUMBUS_VIEW){var r=Z(i,1);t$$(r)&&n.zoomIn(r)}else S$1(e,1)},e.zoominMouseUpFunction=function(t){e.isZoomin=!1,e.screenSpaceEventHandler.removeInputAction(Q$L.LEFT_UP),t$$(e.zoominTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoominTickFunction),e.zoominMouseUpFunction=void 0,e.zoominTickFunction=void 0},e.screenSpaceEventHandler.setInputAction(e.zoominMouseUpFunction,Q$L.LEFT_UP),e.viewer.clock.onTick.addEventListener(e.zoominTickFunction)},k.prototype.handleZoomOutMouseDown=function(e,t){e.screenSpaceEventHandler.removeInputAction(Q$L.LEFT_UP),t$$(e.zoomoutTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoomoutTickFunction),e.zoomoutMouseUpFunction=void 0,e.zoomoutTickFunction=void 0,e.iszoomout=!0,e.zoomoutLastTimestamp=yt$9();var i=e.viewer.scene,n=i.camera;e.zoomoutTickFunction=function(t){if(e.viewer.scene.mode===b$1d.COLUMBUS_VIEW){var r=Z(i,1);t$$(r)&&n.zoomOut(r)}else S$1(e,-1)},e.zoomoutMouseUpFunction=function(t){e.iszoomout=!1,e.screenSpaceEventHandler.removeInputAction(Q$L.LEFT_UP),t$$(e.zoomoutTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoomoutTickFunction),e.zoomoutMouseUpFunction=void 0,e.zoomoutTickFunction=void 0},e.screenSpaceEventHandler.setInputAction(e.zoomoutMouseUpFunction,Q$L.LEFT_UP),e.viewer.clock.onTick.addEventListener(e.zoomoutTickFunction)};var D$1=1;function $$2(e,t,i){e.screenSpaceEventHandler.removeInputAction(Q$L.LEFT_UP),t$$(e.rotateEastTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.rotateEastTickFunction),e.rotateEastMouseUpFunction=void 0,e.rotateEastTickFunction=void 0,e.isrotateEasting=!0,e.rotateEastLastTimestamp=yt$9(),e.viewer.scene.camera;var n=n$1d.PI_OVER_TWO-Math.atan2(-i.y,i.x),r=Math.PI/4,o=0,a=1,s=2,l=3,u=4;o=n>=-r&&n<=r?u:n>=r&&n<=3*r?s:n>=3*r&&n<=5*r?l:a,e.rotateEastTickFunction=function(t){var i=e.viewer.scene.camera,r=yt$9();switch(e.rotateEastLastTimestamp,n=20*Math.abs(i._positionCartographic.height/6378317)*5e-4,o){case a:i.rotate(i.up,n);break;case s:i.rotate(i.up,-n);break;case l:i.rotate(i.right,-n);break;case u:i.rotate(i.right,n)}e.rotateLastTimestamp=r},e.rotateEastMouseUpFunction=function(t){e.isRotateEasting=!1,e.screenSpaceEventHandler.removeInputAction(Q$L.LEFT_UP),t$$(e.rotateEastTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.rotateEastTickFunction),e.rotateEastMouseUpFunction=void 0,e.rotateEastTickFunction=void 0},e.screenSpaceEventHandler.setInputAction(e.rotateEastMouseUpFunction,Q$L.LEFT_UP),e.viewer.clock.onTick.addEventListener(e.rotateEastTickFunction)}k.prototype.handleMouseDown=function(e,t){var i=t.currentTarget,n=t.currentTarget.getBoundingClientRect();D$1=n.height/i.clientHeight,n.width;var r=new r$T((n.right-n.left)/2,(n.bottom-n.top)/2),o=0;o="mousedown"===t.type?new r$T(t.clientX-n.left,t.clientY-n.top):new r$T(t.originalEvent.touches[0].clientX-n.left,t.originalEvent.touches[0].clientY-n.top);var a=r$T.subtract(o,r,z);this.clickStartPosition=new r$T(t.clientX,t.clientY);var s=r$T.magnitude(a);if((s/=D$1)>30&&s<45)tt(this,i,a);else{if(!(s>50&&s<70))return $$2(this,i,a);var l=n$1d.PI_OVER_TWO-Math.atan2(-a.y,a.x);l>=0&&l<=n$1d.PI_OVER_TWO&&ot$1(this,i,a)}},k.prototype.handleMouseUp=function(e,t){var i=t.currentTarget.getBoundingClientRect(),n=new r$T((i.right-i.left)/2,(i.bottom-i.top)/2),r=0;r="mouseup"===t.type?new r$T(t.clientX-i.left,t.clientY-i.top):new r$T(t.originalEvent.touches[0].clientX-i.left,t.originalEvent.touches[0].clientY-i.top);var o=r$T.subtract(r,n,z),a=r$T.magnitude(o);if(a>30&&a<45){var s=n$1d.toDegrees(Math.atan2(-o.y,o.x)),l=new r$T(t.clientX,t.clientY),u=l.x-this.clickStartPosition.x,c=l.y-this.clickStartPosition.y;if(Math.sqrt(u*u+c*c)>5)return;var h=n$1d.toDegrees(e.heading),d=Math.abs(s-h),f=e.viewer.scene;(s>0&&h>0&&h<90&&d>80&&d<100||d>260&&d<280)&&f.camera.flyTo({destination:f.camera.position,orientation:{heading:0,pitch:f.camera.pitch}})}};var x$1=new c$1a,C$2=new c$1a,L$1=new a$11,V=new r$T;function tt(e,t,i){e.screenSpaceEventHandler.removeInputAction(Q$L.MOUSE_MOVE),e.screenSpaceEventHandler.removeInputAction(Q$L.LEFT_UP),e.rotateMouseMoveFunction=void 0,e.rotateMouseUpFunction=void 0,e.isRotating=!0,e.rotateInitialCursorAngle=Math.atan2(-i.y,i.x);var n=e.viewer.scene,r=n.camera,o=V;o.x=n.canvas.clientWidth/2,o.y=n.canvas.clientHeight/2;var a=r.pickEllipsoid(o,n.globe.ellipsoid,L$1);t$$(a)?(e.rotateFrame=m$13.eastNorthUpToFixedFrame(a,n.globe.ellipsoid,C$2),e.rotateIsLook=!1):(e.rotateFrame=m$13.eastNorthUpToFixedFrame(r.positionWC,n.globe.ellipsoid,C$2),e.rotateIsLook=!0);var s=c$1a.clone(r.transform,x$1);r.lookAtTransform(e.rotateFrame),e.rotateInitialCameraAngle=-r.heading,e.rotateInitialCameraDistance=a$11.magnitude(new a$11(r.position.x,r.position.y,0)),r.lookAtTransform(s),e.rotateMouseMoveFunction=function(i,n){var r=t.getBoundingClientRect(),o=new r$T((r.right-r.left)/2,(r.bottom-r.top)/2),a=new r$T(n.clientX-r.left,n.clientY-r.top),s=r$T.subtract(a,o,z),l=Math.atan2(-s.y,s.x)-e.rotateInitialCursorAngle,u=n$1d.zeroToTwoPi(e.rotateInitialCameraAngle-l),c=e.viewer.scene.camera,h=c$1a.clone(c.transform,x$1);c.lookAtTransform(e.rotateFrame);var d=-c.heading;c.rotateRight(u-d),c.lookAtTransform(h)},e.rotateMouseUpFunction=function(t){e.isRotating=!1,e.screenSpaceEventHandler.removeInputAction(Q$L.MOUSE_MOVE),e.screenSpaceEventHandler.removeInputAction(Q$L.LEFT_UP),e.rotateMouseMoveFunction=void 0,e.rotateMouseUpFunction=void 0},e.screenSpaceEventHandler.setInputAction(e.rotateMouseMoveFunction,Q$L.MOUSE_MOVE),e.screenSpaceEventHandler.setInputAction(e.rotateMouseUpFunction,Q$L.LEFT_UP)}var P$1=[{x:56,y:3},{x:59,y:4},{x:64,y:5},{x:69,y:6},{x:74,y:7},{x:79,y:9},{x:84,y:12},{x:89,y:15},{x:92,y:19},{x:94,y:20},{x:99,y:25},{x:104,y:34},{x:106,y:40},{x:107,y:44},{x:107,y:46},{x:107,y:48},{x:107,y:50},{x:107,y:52},{x:107,y:54},{x:107,y:56}],X=Math.PI/40;function ot$1(e,t,i){e.screenSpaceEventHandler.removeInputAction(Q$L.MOUSE_MOVE),e.screenSpaceEventHandler.removeInputAction(Q$L.LEFT_UP),e.tiltMouseMoveFunction=void 0,e.tiltMouseUpFunction=void 0;var n=n$1d.PI_OVER_TWO-Math.atan2(-i.y,i.x);n=(n=n<0?0:n)>n$1d.PI_OVER_TWO?n$1d.PI_OVER_TWO:n,e.tiltInitialCursorAngle=n,e.isTilting=!0;var r=e.viewer.scene,o=r.camera,a=V;a.x=r.canvas.clientWidth/2,a.y=r.canvas.clientHeight/2;for(var s=o.pickEllipsoid(a,r.globe.ellipsoid,L$1);!t$$(s)&&a.y<r.canvas.clientHeight;)a.y+=5,s=o.pickEllipsoid(a,r.globe.ellipsoid,L$1);!t$$(s)||(e.tiltFrame=m$13.eastNorthUpToFixedFrame(s,r.globe.ellipsoid,C$2),e.tiltMouseMoveFunction=function(i,n){e.isTilting=!0;var r=t.getBoundingClientRect(),o=new r$T((r.right-r.left)/2,(r.bottom-r.top)/2),a=new r$T(n.clientX-r.left,n.clientY-r.top),s=r$T.subtract(a,o,z),l=n$1d.PI_OVER_TWO-Math.atan2(-s.y,s.x);l=(l=l<0?0:l)>n$1d.PI_OVER_TWO?n$1d.PI_OVER_TWO:l;var u=e.viewer.scene.camera,c=c$1a.clone(u.transform,x$1);u.lookAtTransform(e.tiltFrame);var h=l-e.tiltInitialCursorAngle;u.rotateUp(h),e.tiltInitialCursorAngle=l,u.lookAtTransform(c);var d=Math.ceil(l/X),f=P$1[d=d>19?19:d];e.tiltbarLeft=f.x,e.tiltbarTop=f.y},e.tiltMouseUpFunction=function(t){e.isTilting=!1,e.screenSpaceEventHandler.removeInputAction(Q$L.MOUSE_MOVE),e.screenSpaceEventHandler.removeInputAction(Q$L.LEFT_UP),e.tiltMouseMoveFunction=void 0,e.tiltMouseUpFunction=void 0},e.screenSpaceEventHandler.setInputAction(e.tiltMouseMoveFunction,Q$L.MOUSE_MOVE),e.screenSpaceEventHandler.setInputAction(e.tiltMouseUpFunction,Q$L.LEFT_UP))}function Z(e,t){var i=e.camera,n=e.canvas,r=new r$T;r.x=n.clientWidth/2,r.y=n.clientHeight/2;var o=G$2(e,r);if(t$$(o)){var a=a$11.distance(i.positionWC,o),s=.0618*t*.2;return a*(s=a>300?s:2*s)}}function S$1(e,t){var i=e.viewer.scene,n=i.camera,r=i.canvas,o=new r$T;o.x=r.clientWidth/2,o.y=r.clientHeight/2;var a=G$2(i,o);if(t$$(a)){var s=a$11.distance(n.position,a),l=.0618*t*.2;l=s>300?l:2*l,n.position;var u=s*l,c=new a$11;a$11.subtract(a,n.position,c);var h=new a$11,d=(h=a$11.clone(n.right,h),a$11.dot(c,h)),f=new a$11;f=a$11.multiplyByScalar(h,d,f);var p=new a$11;p=a$11.subtract(c,f,p);var _=new a$11;_=a$11.normalize(p,_),new a$11,n.move(_,u);var m=new a$11;m=a$11.normalize(a,m);var $=a$11.magnitude(a),g=n$1c.fromCartesian3($),y=n.pickEllipsoid(o,g,new a$11);if(t$$(y)&&!isNaN(y.x)&&!isNaN(y.y)&&!isNaN(y.z)&&(y=a$11.normalize(y,y),!(n._positionCartographic.height<0))){var v=a$11.angleBetween(m,y);if(!n$1d.equalsEpsilon(v,0,n$1d.EPSILON10)){var x=new a$11;x=a$11.cross(m,y,x),n.rotate(x,v)}}}}var nt=new n$18,et=new a$11,it=new a$11;function G$2(e,t){var i=e.globe,n=e.camera;if(t$$(i)){var r;e.pickPositionSupported&&(r=e.pickPositionWorldCoordinates(t,et));var o=n.getPickRay(t,nt),a=i.pick(o,e,it);return(t$$(r)?a$11.distance(r,n.positionWC):Number.POSITIVE_INFINITY)<(t$$(a)?a$11.distance(a,n.positionWC):Number.POSITIVE_INFINITY)?r:a}}var t$1=function(e){if(!t$$(e)||!t$$(e.container))throw new t$_("options.container is required.");if(!t$$(e.scene))throw new t$_("options.scene is required.");if(!t$$(e.viewer))throw new t$_("options.viewer is required.");var t=o$a(e.container);this._viewModel=new k(e,t),m$4(t,this._viewModel),o$$.isPCBroswer()||(document.querySelector(".sm-zoom").style.visibility="visible",document.querySelector(".sm-compass-tiltbar").style.visibility="visible",document.querySelector(".sm-compass-arrows").style.visibility="visible",document.querySelector(".sm-compass-tilt").style.visibility="visible")};function m$4(e,t){var i=['<div class="sm-compass" data-bind="visible: showCompass, event: { mousedown: handleMouseDown , touchstart : handleMouseDown, mouseup: handleMouseUp, touchend: handleMouseUp}">','<div class="sm-compass-tilt"></div>',"<div class=\"sm-compass-tiltbar\" data-bind = \"style : { left : + tiltbarLeft + 'px',top : + tiltbarTop + 'px'}\"></div>",'<div class="sm-compass-arrows"></div>',"<div class=\"sm-compass-outer-ring\" data-bind=\"style: { transform: 'rotate(-' + heading + 'rad)', '-webkit-transform': 'rotate(-' + heading + 'rad)' }\"></div>",'<div class="arrows_e_active"></div>','<div class="arrows_n_active"></div>','<div class="arrows_s_active"></div>','<div class="arrows_w_active"></div>',"</div>",'<div class="sm-zoom">','<div class="sm-zoomin" data-bind="event : {mousedown : handleZoomInMouseDown,touchstart : handleZoomInMouseDown}"></div>','<div class="sm-zoomout" data-bind="event : {mousedown : handleZoomOutMouseDown, touchstart : handleZoomOutMouseDown}"></div>','<div class="sm-zoombar" data-bind="event : {mousedown : handleZoomBarScrollMouseDown, touchstart : handleZoomBarScrollMouseDown},style : {top : + zoombarTop + \'px\' }"></div>'," </div>"].join("");i$3(i,e,t)}function i$2(){this.showInstructions=!1;var e=this;this._command=s$3((function(){e.showInstructions=!e.showInstructions})),this._showClick=s$3((function(){e._touch=!1})),this._showTouch=s$3((function(){e._touch=!0})),this._touch=!1,this.tooltip="Navigation Instructions",le$2.track(this,["tooltip","showInstructions","_touch"])}function v$2(e){if(!t$$(e)||!t$$(e.container))throw new t$_("options.container is required.");var t=o$a(e.container),i=new i$2,n=e$1Y(e.instructionsInitiallyVisible,!1);i.showInstructions=n,i._svgPath="M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M17.328,24.371h-2.707v-2.596h2.707V24.371zM17.328,19.003v0.858h-2.707v-1.057c0-3.19,3.63-3.696,3.63-5.963c0-1.034-0.924-1.826-2.134-1.826c-1.254,0-2.354,0.924-2.354,0.924l-1.541-1.915c0,0,1.519-1.584,4.137-1.584c2.487,0,4.796,1.54,4.796,4.136C21.156,16.208,17.328,16.627,17.328,19.003z";var r=document.createElement("span");r.className="cesium-navigationHelpButton-wrapper",t.appendChild(r);var o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button cesium-navigation-help-button",o.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }"),r.appendChild(o);var a=document.createElement("div");a.className="cesium-navigation-help",a.setAttribute("data-bind",'css: { "cesium-navigation-help-visible" : showInstructions}'),r.appendChild(a);var s=document.createElement("button");s.type="button",s.className="cesium-navigation-button cesium-navigation-button-left",s.setAttribute("data-bind",'click: showClick, css: {"cesium-navigation-button-selected": !_touch, "cesium-navigation-button-unselected": _touch}');var l=document.createElement("img");l.src=o$12("Widgets/Images/NavigationHelp/Mouse.svg"),l.className="cesium-navigation-button-icon",l.style.width="25px",l.style.height="25px",s.appendChild(l),s.appendChild(document.createTextNode("Mouse"));var u=document.createElement("button");u.type="button",u.className="cesium-navigation-button cesium-navigation-button-right",u.setAttribute("data-bind",'click: showTouch, css: {"cesium-navigation-button-selected": _touch, "cesium-navigation-button-unselected": !_touch}');var c=document.createElement("img");c.src=o$12("Widgets/Images/NavigationHelp/Touch.svg"),c.className="cesium-navigation-button-icon",c.style.width="25px",c.style.height="25px",u.appendChild(c),u.appendChild(document.createTextNode("Touch")),a.appendChild(s),a.appendChild(u);var h=document.createElement("div");h.className="cesium-click-navigation-help cesium-navigation-help-instructions",h.setAttribute("data-bind",'css: { "cesium-click-navigation-help-visible" : !_touch}'),h.innerHTML=' <table> <tr> <td><img src="'+o$12("Widgets/Images/NavigationHelp/MouseLeft.svg")+'" width="48" height="48" /></td> <td> <div class="cesium-navigation-help-pan">Pan view</div> <div class="cesium-navigation-help-details">Left click + drag</div> </td> </tr> <tr> <td><img src="'+o$12("Widgets/Images/NavigationHelp/MouseRight.svg")+'" width="48" height="48" /></td> <td> <div class="cesium-navigation-help-zoom">Zoom view</div> <div class="cesium-navigation-help-details">Right click + drag, or</div> <div class="cesium-navigation-help-details">Mouse wheel scroll</div> </td> </tr> <tr> <td><img src="'+o$12("Widgets/Images/NavigationHelp/MouseMiddle.svg")+'" width="48" height="48" /></td> <td> <div class="cesium-navigation-help-rotate">Rotate view</div> <div class="cesium-navigation-help-details">Middle click + drag, or</div> <div class="cesium-navigation-help-details">CTRL + Left/Right click + drag</div> </td> </tr> </table>',a.appendChild(h);var d=document.createElement("div");d.className="cesium-touch-navigation-help cesium-navigation-help-instructions",d.setAttribute("data-bind",'css: { "cesium-touch-navigation-help-visible" : _touch}'),d.innerHTML=' <table> <tr> <td><img src="'+o$12("Widgets/Images/NavigationHelp/TouchDrag.svg")+'" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-pan">Pan view</div> <div class="cesium-navigation-help-details">One finger drag</div> </td> </tr> <tr> <td><img src="'+o$12("Widgets/Images/NavigationHelp/TouchZoom.svg")+'" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-zoom">Zoom view</div> <div class="cesium-navigation-help-details">Two finger pinch</div> </td> </tr> <tr> <td><img src="'+o$12("Widgets/Images/NavigationHelp/TouchTilt.svg")+'" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-rotate">Tilt view</div> <div class="cesium-navigation-help-details">Two finger drag, same direction</div> </td> </tr> <tr> <td><img src="'+o$12("Widgets/Images/NavigationHelp/TouchRotate.svg")+'" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-tilt">Rotate view</div> <div class="cesium-navigation-help-details">Two finger drag, opposite direction</div> </td> </tr> </table>',a.appendChild(d),le$2.applyBindings(i,r),this._container=t,this._viewModel=i,this._wrapper=r,this._closeInstructions=function(e){r.contains(e.target)||(i.showInstructions=!1)},o$$.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}function t(e){if(!t$$(e)||!t$$(e.scene))throw new t$_("options.scene is required.");this._scene=e.scene,this.lowFrameRateMessage=e$1Y(e.lowFrameRateMessage,"This application appears to be performing poorly on your system. Please try using a different web browser or updating your video drivers."),this.lowFrameRateMessageDismissed=!1,this.showingLowFrameRateMessage=!1,le$2.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);var t=this;this._dismissMessage=s$3((function(){t.showingLowFrameRateMessage=!1,t.lowFrameRateMessageDismissed=!0}));var i=i$d.fromScene(e.scene);this._unsubscribeLowFrameRate=i.lowFrameRate.addEventListener((function(){t.lowFrameRateMessageDismissed||(t.showingLowFrameRateMessage=!0)})),this._unsubscribeNominalFrameRate=i.nominalFrameRate.addEventListener((function(){t.showingLowFrameRateMessage=!1}))}function r$4(e){if(!t$$(e)||!t$$(e.container))throw new t$_("options.container is required.");if(!t$$(e.scene))throw new t$_("options.scene is required.");var i=o$a(e.container),n=new t(e),r=document.createElement("div");r.className="cesium-performance-watchdog-message-area",r.setAttribute("data-bind","visible: showingLowFrameRateMessage");var o=document.createElement("button");o.setAttribute("type","button"),o.className="cesium-performance-watchdog-message-dismiss",o.innerHTML="×",o.setAttribute("data-bind","click: dismissMessage"),r.appendChild(o);var a=document.createElement("div");a.className="cesium-performance-watchdog-message",a.setAttribute("data-bind","html: lowFrameRateMessage"),r.appendChild(a),i.appendChild(r),le$2.applyBindings(n,r),this._container=i,this._viewModel=n,this._element=r}function r$3(e){if(!t$$(e))throw new t$_("scene is required.");this._scene=e,this._orthographic=e.camera.frustum instanceof r$K,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=e.mode,le$2.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);var t=this;le$2.defineProperty(this,"selectedTooltip",(function(){return t._orthographic?t.tooltipOrthographic:t.tooltipPerspective})),this._toggleDropDown=s$3((function(){t.sceneMode===b$1d.SCENE2D||t._flightInProgress||(t.dropDownVisible=!t.dropDownVisible)})),this._eventHelper=new n$W,this._eventHelper.add(e.morphComplete,(function(e,i,n,r){t.sceneMode=n,t._orthographic=n===b$1d.SCENE2D||t._scene.camera.frustum instanceof r$K})),this._eventHelper.add(e.preRender,(function(){t._flightInProgress=t$$(e.camera._currentFlight)})),this._switchToPerspective=s$3((function(){t.sceneMode!==b$1d.SCENE2D&&(t._scene.camera.switchToPerspectiveFrustum(),t._orthographic=!1,t.dropDownVisible=!1)})),this._switchToOrthographic=s$3((function(){t.sceneMode!==b$1d.SCENE2D&&(t._scene.camera.switchToOrthographicFrustum(),t._orthographic=!0,t.dropDownVisible=!1)})),this._sceneMode=b$1d}Object.defineProperties(t$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),Object.defineProperties(i$2.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}}),Object.defineProperties(v$2.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),v$2.prototype.isDestroyed=function(){return!1},v$2.prototype.destroy=function(){return o$$.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),le$2.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),s$1e(this)},Object.defineProperties(t.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}}),t.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),s$1e(this)},Object.defineProperties(r$4.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),r$4.prototype.isDestroyed=function(){return!1},r$4.prototype.destroy=function(){return this._viewModel.destroy(),le$2.cleanNode(this._element),this._container.removeChild(this._element),s$1e(this)},Object.defineProperties(r$3.prototype,{scene:{get:function(){return this._scene}},toggleDropDown:{get:function(){return this._toggleDropDown}},switchToPerspective:{get:function(){return this._switchToPerspective}},switchToOrthographic:{get:function(){return this._switchToOrthographic}},isOrthographicProjection:{get:function(){return this._orthographic}}}),r$3.prototype.isDestroyed=function(){return!1},r$3.prototype.destroy=function(){this._eventHelper.removeAll(),s$1e(this)};var b$1="M 28.15625,10.4375 9.125,13.21875 13.75,43.25 41.75,55.09375 50.8125,37 54.5,11.9375 z m 0.125,3 19.976451,0.394265 L 43.03125,16.875 22.6875,14.28125 z M 50.971746,15.705477 47.90625,36.03125 42.53125,46 44.84375,19.3125 z M 12.625,16.03125 l 29.15625,3.6875 -2.65625,31 L 16.4375,41.125 z",v$1="m 31.560594,6.5254438 -20.75,12.4687502 0.1875,24.5625 22.28125,11.8125 19.5,-12 0.65625,-0.375 0,-0.75 0.0312,-23.21875 z m 0.0625,3.125 16.65625,9.5000002 -16.125,10.28125 -17.34375,-9.71875 z m 18.96875,11.1875002 0.15625,20.65625 -17.46875,10.59375 0.15625,-20.28125 z m -37.0625,1.25 17.21875,9.625 -0.15625,19.21875 -16.9375,-9 z";function c$2(e,t){if(!t$$(e))throw new t$_("container is required.");if(!t$$(t))throw new t$_("scene is required.");e=o$a(e);var i=new r$3(t);i._perspectivePath=b$1,i._orthographicPath=v$1;var n=document.createElement("span");n.className="cesium-projectionPicker-wrapper cesium-toolbar-button",e.appendChild(n);var r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button",r.setAttribute("data-bind",'css: { "cesium-projectionPicker-buttonPerspective": !_orthographic, "cesium-projectionPicker-buttonOrthographic": _orthographic, "cesium-button-disabled" : sceneMode === _sceneMode.SCENE2D || _flightInProgress, "cesium-projectionPicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),r.innerHTML='\x3c!-- ko cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64, css: "cesium-projectionPicker-iconPerspective" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64, css: "cesium-projectionPicker-iconOrthographic" } --\x3e\x3c!-- /ko --\x3e',n.appendChild(r);var o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",o.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && _orthographic), "cesium-projectionPicker-none" : !_orthographic, "cesium-projectionPicker-hidden" : !dropDownVisible },attr: { title: tooltipPerspective },click: switchToPerspective,cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64 }'),n.appendChild(o);var a=document.createElement("button");a.type="button",a.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",a.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && !_orthographic), "cesium-projectionPicker-none" : _orthographic, "cesium-projectionPicker-hidden" : !dropDownVisible},attr: { title: tooltipOrthographic },click: switchToOrthographic,cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64 }'),n.appendChild(a),le$2.applyBindings(i,n),this._viewModel=i,this._container=e,this._wrapper=n,this._closeDropDown=function(e){n.contains(e.target)||(i.dropDownVisible=!1)},o$$.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}function i$1(e,t){if(!t$$(e))throw new t$_("scene is required.");this._scene=e;var i=this;this._eventHelper=new n$W,this._eventHelper.add(e.morphStart,(function(e,t,n,r){i.sceneMode=n,i.dropDownVisible=!1})),this._duration=e$1Y(t,2),this.sceneMode=e.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",le$2.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,le$2.defineProperty(this,"selectedTooltip",(function(){var e=i.sceneMode;return e===b$1d.SCENE2D?i.tooltip2D:e===b$1d.SCENE3D?i.tooltip3D:i.tooltipColumbusView})),this._toggleDropDown=s$3((function(){i.dropDownVisible=!i.dropDownVisible})),this._morphTo2D=s$3((function(){e.morphTo2D(i._duration)})),this._morphTo3D=s$3((function(){e.morphTo3D(i._duration)})),this._morphToColumbusView=s$3((function(){e.morphToColumbusView(i._duration)})),this._sceneMode=b$1d}Object.defineProperties(c$2.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),c$2.prototype.isDestroyed=function(){return!1},c$2.prototype.destroy=function(){return this._viewModel.destroy(),o$$.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),le$2.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),s$1e(this)},Object.defineProperties(i$1.prototype,{scene:{get:function(){return this._scene}},duration:{get:function(){return this._duration},set:function(e){if(e<0)throw new t$_("duration value must be positive.");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}}}),i$1.prototype.isDestroyed=function(){return!1},i$1.prototype.destroy=function(){this._eventHelper.removeAll(),s$1e(this)};var D="m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878 -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132 -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285 11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201 5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461 -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z",P="m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z",_$1="m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z";function r$2(e,t,i){if(!t$$(e))throw new t$_("container is required.");if(!t$$(t))throw new t$_("scene is required.");e=o$a(e);var n=new i$1(t,i);n._globePath=D,n._flatMapPath=P,n._columbusViewPath=_$1;var r=document.createElement("span");r.className="cesium-sceneModePicker-wrapper cesium-toolbar-button",e.appendChild(r);var o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button",o.setAttribute("data-bind",'css: { "cesium-sceneModePicker-button2D": sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-button3D": sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-buttonColumbusView": sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),o.innerHTML='\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',r.appendChild(o);var a=document.createElement("button");a.type="button",a.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",a.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE3D)) || (!dropDownVisible && (sceneMode === _sceneMode.SCENE3D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip3D },click: morphTo3D,cesiumSvgPath: { path: _globePath, width: 64, height: 64 }'),r.appendChild(a);var s=document.createElement("button");s.type="button",s.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",s.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE2D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'),r.appendChild(s);var l=document.createElement("button");l.type="button",l.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",l.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'),r.appendChild(l),le$2.applyBindings(n,r),this._viewModel=n,this._container=e,this._wrapper=r,this._closeDropDown=function(e){r.contains(e.target)||(n.dropDownVisible=!1)},o$$.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(r$2.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),r$2.prototype.isDestroyed=function(){return!1},r$2.prototype.destroy=function(){return this._viewModel.destroy(),o$$.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),le$2.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),s$1e(this)};var m$3=new r$T,r$1="-1000px";function n$1(e,t,i){if(!t$$(e))throw new t$_("scene is required.");if(!t$$(t))throw new t$_("selectionIndicatorElement is required.");if(!t$$(i))throw new t$_("container is required.");this._scene=e,this._screenPositionX=r$1,this._screenPositionY=r$1,this._tweens=e.tweens,this._container=e$1Y(i,document.body),this._selectionIndicatorElement=t,this._scale=1,this.position=void 0,this.showSelection=!1,le$2.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,le$2.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&t$$(this.position)}}),le$2.defineProperty(this,"_transform",{get:function(){return"scale("+this._scale+")"}}),this.computeScreenSpacePosition=function(t,i){return u$V.wgs84ToWindowCoordinates(e,t,i)}}function r(e,t){if(!t$$(e))throw new t$_("container is required.");e=o$a(e),this._container=e;var i=document.createElement("div");i.className="cesium-selection-wrapper",i.setAttribute("data-bind",'style: { "top" : _screenPositionY, "left" : _screenPositionX },css: { "cesium-selection-wrapper-visible" : isVisible }'),e.appendChild(i),this._element=i;var n="http://www.w3.org/2000/svg",r=document.createElementNS(n,"svg:svg");r.setAttribute("width",160),r.setAttribute("height",160),r.setAttribute("viewBox","0 0 160 160");var o=document.createElementNS(n,"g");o.setAttribute("transform","translate(80,80)"),r.appendChild(o);var a=document.createElementNS(n,"path");a.setAttribute("data-bind","attr: { transform: _transform }"),a.setAttribute("d","M -34 -34 L -34 -11.25 L -30 -15.25 L -30 -30 L -15.25 -30 L -11.25 -34 L -34 -34 z M 11.25 -34 L 15.25 -30 L 30 -30 L 30 -15.25 L 34 -11.25 L 34 -34 L 11.25 -34 z M -34 11.25 L -34 34 L -11.25 34 L -15.25 30 L -30 30 L -30 15.25 L -34 11.25 z M 34 11.25 L 30 15.25 L 30 30 L 15.25 30 L 11.25 34 L 34 34 L 34 11.25 z"),o.appendChild(a),i.appendChild(r);var s=new n$1(t,this._element,this._container);this._viewModel=s,le$2.applyBindings(this._viewModel,this._element)}n$1.prototype.update=function(){if(this.showSelection&&t$$(this.position)){var e=this.computeScreenSpacePosition(this.position,m$3);if(t$$(e)){var t=this._container,i=t.parentNode.clientWidth,n=t.parentNode.clientHeight,r=this._selectionIndicatorElement.clientWidth,o=.5*r;e.x=Math.min(Math.max(e.x,-r),i+r)-o,e.y=Math.min(Math.max(e.y,-r),n+r)-o,this._screenPositionX=Math.floor(e.x+.25)+"px",this._screenPositionY=Math.floor(e.y+.25)+"px"}else this._screenPositionX=r$1,this._screenPositionY=r$1}},n$1.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:_$T.EXPONENTIAL_OUT})},n$1.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:_$T.EXPONENTIAL_OUT})},Object.defineProperties(n$1.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}}),Object.defineProperties(r.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),r.prototype.isDestroyed=function(){return!1},r.prototype.destroy=function(){var e=this._container;return le$2.cleanNode(this._element),e.removeChild(this._element),s$1e(this)};var x={UNLOAD:0,LOADING:1,LOADED:2,LOST:3},Ue=new o$_("S3MTilesParser",1e4);function C$1(e,t,i,n,r){this._context=t,this._state=x.UNLOAD,this._url=i,this._viewer=e,this._gl=t._gl,this._renderEntities=[],this._visible=!1,this._scale=e$1Y(r,1),this._position=a$11.clone(n),this._modelMatrix=m$13.eastNorthUpToFixedFrame(n,void 0,new c$1a),null!==t.s3tc?this._supportCompressType=1:null!==t.pvrtc?this._supportCompressType=2:null!==t.etc1&&(this._supportCompressType=3)}function Ge(e){let t=a$11.distance(e._position,e._viewer.camera.position),i=e._viewer.camera.frustum.near,n=e._viewer.scene._view.viewport.height,r=e._viewer.camera.frustum.fov;return 25/n*Math.tan(r/2)*i*2/(i/(i+t))}function v(e,t,i){if(t$$(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(t$$(i)){if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}else if(a.localName===t)return a}}function pe(e,t,i){if(t$$(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];t$$(i)?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}}function Me$1(e,t,i){if(!t$$(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];t$$(i)?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}function m$2(e,t,i){var n=v(e,t,i);if(t$$(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function S(e,t,i){var n=v(e,t,i);if(t$$(n))return n.textContent.trim()}function Be$1(e,t,i){var n=v(e,t,i);if(t$$(n)){var r=n.textContent.trim();return"1"===r||/^true$/i.test(r)}}Object.defineProperties(C$1.prototype,{visible:{set:function(e){this._visible=e},get:function(){return this._visible}},position:{get:function(){return this._position}},scale:{get:function(){return this._scale}}}),C$1.prototype.setModelMatrix=function(e,t){this._position=a$11.clone(t);var i=Ge(this),n=m$13.eastNorthUpToFixedFrame(t,void 0,new c$1a);c$1a.multiplyByUniformScale(n,i,this._modelMatrix);for(var r=this._renderEntities,o=0,a=r.length;o<a;o++){var s=r[o],l=s._oriCenter,u=s._colorCommand;t$$(u)&&c$1a.multiplyByPoint(this._modelMatrix,l,u.boundingVolume.center)}},C$1.prototype.load=function(){var e=this,t=this._state;if(x.UNLOAD==t){var i=m$I(this._url,(function(e){return u$S(e)}));t$$(i)&&(this._state=x.LOADING,i.then((function(t){Ve(e,t)}),(function(e){this._state=x.UNLOAD})))}},C$1.prototype.update=function(e){if(this._visible){if(!this._ready)return void this.load();e.context;var t=this._renderEntities;if(t&&0!=t.length)for(var i=0,n=t.length;i<n;i++){var r=t[i];t$$(r._colorCommand)&&!a$11.equals(r._colorCommand.boundingVolume.center,a$11.ZERO)&&e.commandList.push(r._colorCommand)}}},C$1.prototype.isDestroyed=function(){return!1},C$1.prototype.destroy=function(){for(var e=this._renderEntities,t=0,i=e.length;t<i;t++){e[t].destroy()}return this._renderEntities.length=0,s$1e(this)};var Fe=new f$10;function Ve(e,t){var i={buffer:t,supportCompressType:e._supportCompressType},n=Ue.scheduleTask(i,[t]);t$$(n)?n.then((function(t){if(t.result){e._gl;for(var i=e._context,n=Fe.read(t.xmlDoc).firstChild,r=n.namespaceURI,o=Me$1(v(n,"Material3Ds",r),"material",r),a={},s=0,l=o.length;s<l;s++){var u=o[s],c=S(u,"name",r),h=new _0x42161c({});a[c]=h;var d=v(u,"Ambient",r),f=m$2(d,"AmbientR",r),p=m$2(d,"AmbientG",r),_=m$2(d,"AmbientB",r),m=m$2(d,"AmbientA",r);h._ambientColor=new e$1z(f,p,_,m);var $=v(u,"Diffuse",r);f=m$2($,"DiffuseR",r),p=m$2($,"DiffuseG",r),_=m$2($,"DiffuseB",r),m=m$2($,"DiffuseA",r),h._diffuseColor=new e$1z(f,p,_,m);var g=v(u,"Specular",r);f=m$2(g,"SpecularR",r),p=m$2(g,"SpecularG",r),_=m$2(g,"SpecularB",r),m=m$2(g,"SpecularA",r),h._specularColor=new e$1z(f,p,_,m);var y=m$2(u,"Shininess",r);h._shininess=y,v(u,"TransparentSorting",r),h._bTransparentSorting=Be$1(u,"TransparentSorting",r);var b=v(u,"texture",r),w=S(b,"name",r),C=v(b,"AddressMode",r),P=S(C,"u",r),E=S(C,"v",r);P="TAM_WRAP"===P?j$13.REPEAT:j$13.CLAMP_TO_EDGE,E="TAM_WRAP"===E?j$13.REPEAT:j$13.CLAMP_TO_EDGE;var A=t.texturePackage[w];if(t$$(A)){w=i._id+"_"+w;var L=De$e.CreateTexture(w,i,A.width,A.height,A.nFormat,A.compressType,A.imageBuffer,!1,P,E);h._textures.push(L)}}var M=pe(v(n,"PageLods",r),"Geode",r);for(s=0,l=M.length;s<l;s++){for(var I=M[s],O=S(I,"GeoDeModMatrix",r).split(","),D=0;D<16;D++)O[D]=parseFloat(O[D]);O=c$1a.unpack(O,0);for(var R=pe(I,"GeoName",r),N=[],F=0,B=R.length;F<B;F++){var z=R[F].textContent.trim();N.push(z)}for(var G=[],k=new c$19,U=0;U<N.length;U++){var V=ze(Y=(H=t.geoPackage[N[U]]).vertexPackage,O);G.push(V)}var W=new a$11;G.length>0&&(c$19.fromBoundingSpheres(G,k),W=a$11.clone(k.center),G.length=0),e.oriRadius=k.radius;for(B=0;B<N.length;B++){var H,Y=(H=t.geoPackage[N[B]]).vertexPackage,j=H.arrIndexPackage,q={};for(var X in j){var K=j[X];if(t$$(K)){h=a[c=K.materialCode];q[c]=h}}var Z=new T({vertexPackage:Y,arrIndexPackage:j,version:t.version,mapPass:q,boundingVolume:k,oriCenter:W,owner:e});Z.initialize(e._context),e._renderEntities.push(Z)}}e._ready=!0,e._state=x.LOADED}else e._state=x.UNLOAD})):e.state=x.UNLOAD}function ze(e,t){for(var i=[],n=new c$19,r=new a$11,o=(new a$11,e.vertexAttributes[0]),a=o.componentsPerAttribute,s=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4),l=0;l<e.verticesCount;l++)a$11.fromArray(s,a*l,r),i.push(a$11.clone(r));return c$19.fromPoints(i,n),i.length=0,c$19.transform(n,t,n),n}function T(e){var t=(e=e||{}).arrIndexPackage,i=e.vertexPackage,n=e.mapPass;this._arrIndexPackage=t,this._vertexPackage=i,this._owner=e.owner,this._attributeLocations={},this._initialize=!1,this._mapPass=n,this._boundingVolume=e.boundingVolume,this._oriCenter=e.oriCenter}function o$2(e,t,i){this._color=e,this._height=t,this._base=e$1Y(i,0)}function g(e,t,i,n){this.interval=e,this.height=t,this.color=i||new e$1z(.5,.5,.5,1),this.backgroundColor=n||new e$1z(0,0,0,0)}T.prototype.initialize=function(e){this._initialize||(this.createCommand(e),this._initialize=!0)},T.prototype.createVertexData=function(e){for(var t=this._vertexPackage.vertexAttributes,i=0,n=t.length;i<n;i++){var r=t[i];!t$$(r.typedArray)||(r.vertexBuffer=u$Y.createVertexBuffer({context:e,typedArray:r.typedArray,usage:A$13.STATIC_DRAW}),r.typedArray=null,delete r.typedArray)}return this._attributeLocations=this._vertexPackage.attrLocation,t},T.prototype.createCommand=function(e){var t=this.createVertexData(e),i=we$l.OPAQUE,n=p$1a.fromCache({cull:{enabled:!1},depthTest:{enabled:!1},blending:Ee$s.ALPHA_BLEND}),r=this._vertexPackage.verticesCount,o=this._arrIndexPackage[0];if(t$$(o)){var a=fe$u.UNSIGNED_SHORT;(1===o.indexType||r>=n$1d.SIXTY_FOUR_KILOBYTES)&&e.elementIndexUint&&(a=fe$u.UNSIGNED_INT);var s=u$Y.createIndexBuffer({context:e,typedArray:o.indicesTypedArray,usage:A$13.STATIC_DRAW,indexDatatype:a}),l=this._mapPass[o.materialCode]||_0x42161c.Default,u=H$11.TRIANGLES;switch(o.primitiveType){case 1:u=H$11.POINTS;break;case 2:u=H$11.LINES;break;case 4:u=H$11.TRIANGLES}var c=new s$1d({primitiveType:u,boundingVolume:this._boundingVolume,pass:i,owner:this,cull:!1,modelMatrix:this._owner._modelMatrix});c.vertexArray=new x$18({context:e,attributes:t,indexBuffer:s});var h=new a$O({sources:["attribute vec4 aPosition;\n attribute vec3 aNormal;\n attribute vec4 aTexCoord0;\n #ifdef VertexColor\n attribute vec4 aColor;\n #endif\n uniform vec4 uAmbientColor;\n uniform vec4 uDiffuseColor;\n uniform vec4 uSpecularColor;\n varying vec2 vTexCoord;\n varying vec4 vColor;\n const float SHIFT_LEFT8 = 256.0;\n const float SHIFT_RIGHT8 = 1.0 / 256.0;\n const vec4 LIGHT_COLOR = vec4(0.8, 0.8, 0.8, 1.0);\n vec4 vertexColor = vec4(1.0);\n #ifdef VertexColor\n vertexColor = aColor;\n #endif\n void main()\n {\n vec4 vertexPos = aPosition;\n vTexCoord = aTexCoord0.xy;\n vertexPos.w = 1.0;\n gl_Position = czm_modelViewProjection * vertexPos;\n vColor = vertexColor;\n vec4 eyePosition = czm_modelView * vertexPos;\n vec3 normal = normalize(aNormal);\n vec3 lightDirection = normalize(czm_sunPositionWC - vec3(eyePosition));\n float nDotL = max(dot(lightDirection, normal), 0.0);\n vec4 diffuse = uDiffuseColor * LIGHT_COLOR * nDotL;\n vec4 ambient = uAmbientColor * LIGHT_COLOR;\n vec4 materialColor = clamp(diffuse + ambient, vec4(0.0), vec4(1.0));\n vColor = vColor * materialColor;\n }"]}),d=new a$O({sources:["#ifdef TEXTURE_ENABLE\n uniform sampler2D uTexture;\n #endif\n varying vec2 vTexCoord;\n varying vec4 vColor;\n void main()\n {\n #ifdef TEXTURE_ENABLE\n vec2 vecTexCoord = vec2(vTexCoord.x,1.0-vTexCoord.y);\n gl_FragColor = texture2D(uTexture, vecTexCoord.xy, 0.0) * vColor;\n #else\n gl_FragColor = vColor;\n #endif\n if(gl_FragColor.a < 0.1)\n {\n discard;\n }\n }"]});t$$(this._attributeLocations.aTexCoord0)&&l._textures.length>0&&d.defines.push("TEXTURE_ENABLE"),t$$(this._attributeLocations.aColor)&&h.defines.push("VertexColor"),c.shaderProgram=p$15.fromCache({context:e,vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:this._attributeLocations}),c.uniformMap={uTexture:function(){return l._textures[0]},uAmbientColor:function(){return l._ambientColor},uDiffuseColor:function(){return l._diffuseColor},uSpecularColor:function(){return l._specularColor}},c.renderState=n,this._colorCommand=c,this._vertexPackage=null,this._arrIndexPackage.length=0}},T.prototype.isDestroyed=function(){return!1},T.prototype.destroy=function(){for(var e in this._mapPass)this._mapPass.hasOwnProperty(e)&&this._mapPass[e].destroy();return this._mapPass.length=0,t$$(this._colorCommand)&&(this._colorCommand.vertexArray=this._colorCommand.vertexArray&&!this._colorCommand.vertexArray.isDestroyed()&&this._colorCommand.vertexArray.destroy(),this._colorCommand.shaderProgram=this._colorCommand.shaderProgram&&!this._colorCommand.shaderProgram.isDestroyed()&&this._colorCommand.shaderProgram.destroy(),this._colorCommand=void 0),this._vertexPackage=null,this._arrIndexPackage.length=0,this._attributeLocations=void 0,s$1e(this)},o$2.prototype.getHeight=function(){return this._height},o$2.prototype.getBase=function(){return this._base},o$2.prototype.getStartTime=function(){return this._start},o$2.prototype.getStopTime=function(){return this._stop},o$2.prototype.setRange=function(e,t){this._start=e,this._stop=t},o$2.prototype.render=function(e){var t="";if(this._start&&this._stop&&this._color){var i=o$10.secondsDifference(this._start,e.epochJulian),n=Math.round(e.timeBarWidth*e.getAlpha(i)),r=o$10.secondsDifference(this._stop,e.epochJulian),o=Math.round(e.timeBarWidth*e.getAlpha(r))-n;n<0&&(o+=n,n=0),n+o>e.timeBarWidth&&(o=e.timeBarWidth-n),o>0&&(t='<span class="cesium-timeline-highlight" style="left: '+n.toString()+"px; width: "+o.toString()+"px; bottom: "+this._base.toString()+"px; height: "+this._height+"px; background-color: "+this._color+';"></span>')}return t},g.prototype.render=function(e,t){var i=this.interval.start,n=this.interval.stop,r=t.startJulian,o=o$10.addSeconds(t.startJulian,t.duration,new o$10);if(o$10.lessThan(i,r)&&o$10.greaterThan(n,o))e.fillStyle=this.color.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height);else if(o$10.lessThanOrEquals(i,o)&&o$10.greaterThanOrEquals(n,r)){var a,s,l;for(a=0;a<t.timeBarWidth;++a){var u=o$10.addSeconds(t.startJulian,a/t.timeBarWidth*t.duration,new o$10);!t$$(s)&&o$10.greaterThanOrEquals(u,i)?s=a:!t$$(l)&&o$10.greaterThanOrEquals(u,n)&&(l=a)}e.fillStyle=this.backgroundColor.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height),t$$(s)&&(t$$(l)||(l=t.timeBarWidth),e.fillStyle=this.color.toCssColorString(),e.fillRect(s,t.y,Math.max(l-s,1),this.height))}};var A=1e12,_={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},h$2={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},E$1=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800,1296e3,2592e3,5184e3,7776e3,15552e3,31536e3,63072e3,126144e3,15768e4,31536e4,63072e4,126144e4,15768e5,31536e5,63072e5,126144e5,15768e6,31536e6],ot=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function u$2(e,t){if(!t$$(e))throw new t$_("container is required.");if(!t$$(t))throw new t$_("clock is required.");e=o$a(e),this.container=e;var i=document.createElement("div");i.className="cesium-timeline-main",e.appendChild(i),this._topDiv=i,this._endJulian=void 0,this._epochJulian=void 0,this._lastXPos=void 0,this._scrubElement=void 0,this._startJulian=void 0,this._timeBarSecondsSpan=void 0,this._clock=t,this._scrubJulian=t.currentTime,this._mainTicSpan=-1,this._mouseMode=_.none,this._touchMode=h$2.none,this._touchState={centerX:0,spanX:0},this._mouseX=0,this._timelineDrag=0,this._timelineDragLocation=void 0,this._lastHeight=void 0,this._lastWidth=void 0,this._topDiv.innerHTML='<div class="cesium-timeline-bar"></div><div class="cesium-timeline-trackContainer"><canvas class="cesium-timeline-tracks" width="10" height="1"></canvas></div><div class="cesium-timeline-needle"></div><span class="cesium-timeline-ruler"></span>',this._timeBarEle=this._topDiv.childNodes[0],this._trackContainer=this._topDiv.childNodes[1],this._trackListEle=this._topDiv.childNodes[1].childNodes[0],this._needleEle=this._topDiv.childNodes[2],this._rulerEle=this._topDiv.childNodes[3],this._context=this._trackListEle.getContext("2d"),this._trackList=[],this._highlightRanges=[],this.zoomTo(t.startTime,t.stopTime),this._onMouseDown=at(this),this._onMouseUp=rt(this),this._onMouseMove=ct(this),this._onMouseWheel=ht(this),this._onTouchStart=ut(this),this._onTouchMove=dt(this),this._onTouchEnd=lt(this);var n=this._timeBarEle;document.addEventListener("mouseup",this._onMouseUp,!1),document.addEventListener("mousemove",this._onMouseMove,!1),n.addEventListener("mousedown",this._onMouseDown,!1),n.addEventListener("DOMMouseScroll",this._onMouseWheel,!1),n.addEventListener("mousewheel",this._onMouseWheel,!1),n.addEventListener("touchstart",this._onTouchStart,!1),n.addEventListener("touchmove",this._onTouchMove,!1),n.addEventListener("touchend",this._onTouchEnd,!1),n.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},t.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}function G$1(e){return e<10?"0"+e.toString():e.toString()}function at(e){return function(t){e._mouseMode!==_.touchOnly&&(0===t.button?(e._mouseMode=_.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition="-16px 0"),e._onMouseMove(t)):(e._mouseX=t.clientX,2===t.button?e._mouseMode=_.zoom:e._mouseMode=_.slide)),t.preventDefault()}}function rt(e){return function(t){e._mouseMode=_.none,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0"),e._timelineDrag=0,e._timelineDragLocation=void 0}}function ct(e){return function(t){var i;if(e._mouseMode===_.scrub){t.preventDefault();var n=t.clientX-e._topDiv.getBoundingClientRect().left;n<0?(e._timelineDragLocation=0,e._timelineDrag=-.01*e._timeBarSecondsSpan):n>e._topDiv.clientWidth?(e._timelineDragLocation=e._topDiv.clientWidth,e._timelineDrag=.01*e._timeBarSecondsSpan):(e._timelineDragLocation=void 0,e._setTimeBarTime(n,n*e._timeBarSecondsSpan/e._topDiv.clientWidth))}else if(e._mouseMode===_.slide){if(i=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==i){var r=i*e._timeBarSecondsSpan/e._topDiv.clientWidth;e.zoomTo(o$10.addSeconds(e._startJulian,r,new o$10),o$10.addSeconds(e._endJulian,r,new o$10))}}else e._mouseMode===_.zoom&&(i=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==i&&e.zoomFrom(Math.pow(1.01,i)))}}function ht(e){return function(t){var i=t.wheelDeltaY||t.wheelDelta||-t.detail;i/=A=Math.max(Math.min(Math.abs(i),A),1),e.zoomFrom(Math.pow(1.05,-i))}}function ut(e){return function(t){var i,n,r=t.touches.length,o=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=_.touchOnly,1===r?(i=o$10.secondsDifference(e._scrubJulian,e._startJulian),n=Math.round(i*e._topDiv.clientWidth/e._timeBarSecondsSpan+o),Math.abs(t.touches[0].clientX-n)<50?(e._touchMode=h$2.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition=1===r?"-16px 0":"0 0")):(e._touchMode=h$2.singleTap,e._touchState.centerX=t.touches[0].clientX-o)):2===r?(e._touchMode=h$2.slideZoom,e._touchState.centerX=.5*(t.touches[0].clientX+t.touches[1].clientX)-o,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=h$2.ignore}}function lt(e){return function(t){var i=t.touches.length,n=e._topDiv.getBoundingClientRect().left;e._touchMode===h$2.singleTap?(e._touchMode=h$2.scrub,e._onTouchMove(t)):e._touchMode===h$2.scrub&&e._onTouchMove(t),e._mouseMode=_.touchOnly,1!==i?e._touchMode=i>0?h$2.ignore:h$2.none:e._touchMode===h$2.slideZoom&&(e._touchState.centerX=t.touches[0].clientX-n),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}function dt(e){return function(t){var i,n,r,o,a,s,l=1,u=e._topDiv.getBoundingClientRect().left;e._touchMode===h$2.singleTap&&(e._touchMode=h$2.slideZoom),e._mouseMode=_.touchOnly,e._touchMode===h$2.scrub?(t.preventDefault(),1===t.changedTouches.length&&((n=t.changedTouches[0].clientX-u)>=0&&n<=e._topDiv.clientWidth&&e._setTimeBarTime(n,n*e._timeBarSecondsSpan/e._topDiv.clientWidth))):e._touchMode===h$2.slideZoom&&(2===(r=t.touches.length)?(o=.5*(t.touches[0].clientX+t.touches[1].clientX)-u,a=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):1===r&&(o=t.touches[0].clientX-u,a=0),t$$(o)&&(a>0&&e._touchState.spanX>0?(l=e._touchState.spanX/a,s=o$10.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-o*e._timeBarSecondsSpan*l)/e._topDiv.clientWidth,new o$10)):(i=e._touchState.centerX-o,s=o$10.addSeconds(e._startJulian,i*e._timeBarSecondsSpan/e._topDiv.clientWidth,new o$10)),e.zoomTo(s,o$10.addSeconds(s,e._timeBarSecondsSpan*l,new o$10)),e._touchState.centerX=o,e._touchState.spanX=a))}}function E(e){var t=!1,i=window.screen;return t$$(i)&&(t$$(i.lockOrientation)?t=i.lockOrientation(e):t$$(i.mozLockOrientation)?t=i.mozLockOrientation(e):t$$(i.msLockOrientation)?t=i.msLockOrientation(e):t$$(i.orientation&&i.orientation.lock)&&(t=i.orientation.lock(e))),t}function d(){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 O(e,t,i,n){n()||(i()?(t.useWebVR=!1,e._locked&&(d(),e._locked=!1),e._noSleep.disable(),n$15.exitFullscreen(),i(!1)):(n$15.fullscreen||n$15.requestFullscreen(e._vrElement),e._noSleep.enable(),e._locked||(e._locked=E("landscape")),t.useWebVR=!0,i(!0)))}function s(e,t){if(!t$$(e))throw new t$_("scene is required.");var i=this,n=le$2.observable(n$15.enabled),r=le$2.observable(!1);this.isVRMode=void 0,le$2.defineProperty(this,"isVRMode",{get:function(){return r()}}),this.isVREnabled=void 0,le$2.defineProperty(this,"isVREnabled",{get:function(){return n()},set:function(e){n(e&&n$15.enabled)}}),this.tooltip=void 0,le$2.defineProperty(this,"tooltip",(function(){return n()?r()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"}));var o=le$2.observable(!1);this._isOrthographic=void 0,le$2.defineProperty(this,"_isOrthographic",{get:function(){return o()}}),this._eventHelper=new n$W,this._eventHelper.add(e.preRender,(function(){o(e.camera.frustum instanceof r$K)})),this._locked=!1,this._noSleep=new b$4,this._command=s$3((function(){O(i,e,r,o)}),le$2.getObservable(this,"isVREnabled")),this._vrElement=e$1Y(o$a(t),document.body),this._callback=function(){!n$15.fullscreen&&r()&&(e.useWebVR=!1,i._locked&&(d(),i._locked=!1),i._noSleep.disable(),r(!1))},document.addEventListener(n$15.changeEventName,this._callback)}u$2.prototype.addEventListener=function(e,t,i){this._topDiv.addEventListener(e,t,i)},u$2.prototype.removeEventListener=function(e,t,i){this._topDiv.removeEventListener(e,t,i)},u$2.prototype.isDestroyed=function(){return!1},u$2.prototype.destroy=function(){this._clock.onTick.removeEventListener(this.updateFromClock,this),document.removeEventListener("mouseup",this._onMouseUp,!1),document.removeEventListener("mousemove",this._onMouseMove,!1);var e=this._timeBarEle;e.removeEventListener("mousedown",this._onMouseDown,!1),e.removeEventListener("DOMMouseScroll",this._onMouseWheel,!1),e.removeEventListener("mousewheel",this._onMouseWheel,!1),e.removeEventListener("touchstart",this._onTouchStart,!1),e.removeEventListener("touchmove",this._onTouchMove,!1),e.removeEventListener("touchend",this._onTouchEnd,!1),e.removeEventListener("touchcancel",this._onTouchEnd,!1),this.container.removeChild(this._topDiv),s$1e(this)},u$2.prototype.addHighlightRange=function(e,t,i){var n=new o$2(e,t,i);return this._highlightRanges.push(n),this.resize(),n},u$2.prototype.addTrack=function(e,t,i,n){var r=new g(e,t,i,n);return this._trackList.push(r),this._lastHeight=void 0,this.resize(),r},u$2.prototype.zoomTo=function(e,t){if(!t$$(e))throw new t$_("startTime is required.");if(!t$$(t))throw new t$_("stopTime is required");if(o$10.lessThanOrEquals(t,e))throw new t$_("Start time must come before end time.");if(this._startJulian=e,this._endJulian=t,this._timeBarSecondsSpan=o$10.secondsDifference(t,e),this._clock&&this._clock.clockRange!==tt$j.UNBOUNDED){var i=this._clock.startTime,n=this._clock.stopTime,r=o$10.secondsDifference(n,i),o=o$10.secondsDifference(i,this._startJulian),a=o$10.secondsDifference(n,this._endJulian);this._timeBarSecondsSpan>=r?(this._timeBarSecondsSpan=r,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):o>0?(this._endJulian=o$10.addSeconds(this._endJulian,o,new o$10),this._startJulian=i,this._timeBarSecondsSpan=o$10.secondsDifference(this._endJulian,this._startJulian)):a<0&&(this._startJulian=o$10.addSeconds(this._startJulian,a,new o$10),this._endJulian=n,this._timeBarSecondsSpan=o$10.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();var s=document.createEvent("Event");s.initEvent("setzoom",!0,!0),s.startJulian=this._startJulian,s.endJulian=this._endJulian,s.epochJulian=this._epochJulian,s.totalSpan=this._timeBarSecondsSpan,s.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(s)},u$2.prototype.zoomFrom=function(e){var t=o$10.secondsDifference(this._scrubJulian,this._startJulian);e>1||t<0||t>this._timeBarSecondsSpan?t=.5*this._timeBarSecondsSpan:t+=t-.5*this._timeBarSecondsSpan;var i=this._timeBarSecondsSpan-t;this.zoomTo(o$10.addSeconds(this._startJulian,t-t*e,new o$10),o$10.addSeconds(this._endJulian,i*e-i,new o$10))},u$2.prototype.makeLabel=function(e){var t=o$10.toGregorianDate(e),i=t.millisecond,n=" UTC";if(i>0&&this._timeBarSecondsSpan<3600){for(n=Math.floor(i).toString();n.length<3;)n="0"+n;n="."+n}return ot[t.month-1]+" "+t.day+" "+t.year+" "+G$1(t.hour)+":"+G$1(t.minute)+":"+G$1(t.second)+n},u$2.prototype.smallestTicInPixels=7,u$2.prototype._makeTics=function(){var e,t=this._timeBarEle,i=o$10.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(i*this._topDiv.clientWidth/this._timeBarSecondsSpan),r=n-8,o=this;this._needleEle.style.left=n.toString()+"px";var a="",s=.01,l=31536e6,u=1e-10,c=0,h=this._timeBarSecondsSpan;h<s?(h=s,this._timeBarSecondsSpan=s,this._endJulian=o$10.addSeconds(this._startJulian,s,new o$10)):h>l&&(h=l,this._timeBarSecondsSpan=l,this._endJulian=o$10.addSeconds(this._startJulian,l,new o$10));var d=this._timeBarEle.clientWidth;d<10&&(d=10);var f,p=this._startJulian,_=Math.min(h/d*1e-5,.4),m=o$10.toGregorianDate(p);f=h>31536e4?o$10.fromDate(new Date(Date.UTC(100*Math.floor(m.year/100),0))):h>31536e3?o$10.fromDate(new Date(Date.UTC(10*Math.floor(m.year/10),0))):h>86400?o$10.fromDate(new Date(Date.UTC(m.year,0))):o$10.fromDate(new Date(Date.UTC(m.year,m.month,m.day)));var $=o$10.secondsDifference(this._startJulian,o$10.addSeconds(f,_,new o$10)),g=$+h;function y(e){return Math.floor($/e)*e}function v(e,t){return Math.ceil(e/t+.5)*t}function x(e){return(e-$)/h}function b(e,t){return e-t*Math.round(e/t)}this._epochJulian=f,this._rulerEle.innerHTML=this.makeLabel(o$10.addSeconds(this._endJulian,-s,new o$10));var S=this._rulerEle.offsetWidth+20;S<30&&(S=180);var w=c;c-=u;var C={startTime:$,startJulian:p,epochJulian:f,duration:h,timeBarWidth:d,getAlpha:x};this._highlightRanges.forEach((function(e){a+=e.render(C)}));var T=0,P=0,E=0,A=S/d;A>1&&(A=1),A*=this._timeBarSecondsSpan;var L,M=-1,I=-1,O=E$1.length;for(L=0;L<O;++L){var D=E$1[L];if(++M,T=D,D>A&&D>c)break;I<0&&d*(D/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(I=M)}if(M>0){for(;M>0;)if(--M,Math.abs(b(T,E$1[M]))<1e-5){E$1[M]>=c&&(P=E$1[M]);break}if(I>=0)for(;I<M;){if(Math.abs(b(P,E$1[I]))<1e-5&&E$1[I]>=c){E=E$1[I];break}++I}}(c=w)>u&&E<1e-5&&Math.abs(c-T)>u&&(E=c,c<=T+u&&(P=0));var R,N=-999999;if(d*(E/this._timeBarSecondsSpan)>=3)for(e=y(E);e<=g;e=v(e,E))a+='<span class="cesium-timeline-ticTiny" style="left: '+Math.round(d*x(e)).toString()+'px;"></span>';if(d*(P/this._timeBarSecondsSpan)>=3)for(e=y(P);e<=g;e=v(e,P))a+='<span class="cesium-timeline-ticSub" style="left: '+Math.round(d*x(e)).toString()+'px;"></span>';if(d*(T/this._timeBarSecondsSpan)>=2){this._mainTicSpan=T,g+=T,e=y(T);for(var F=o$10.computeTaiMinusUtc(f);e<=g;){var B=o$10.addSeconds(p,e-$,new o$10);if(T>2.1){var z=o$10.computeTaiMinusUtc(B);Math.abs(z-F)>.1&&(e+=z-F,B=o$10.addSeconds(p,e-$,new o$10))}var G=Math.round(d*x(e)),k=this.makeLabel(B);this._rulerEle.innerHTML=k,(R=this._rulerEle.offsetWidth)<10&&(R=S);var U=G-(R/2-1);U>N?(N=U+R+5,a+='<span class="cesium-timeline-ticMain" style="left: '+G.toString()+'px;"></span><span class="cesium-timeline-ticLabel" style="left: '+U.toString()+'px;">'+k+"</span>"):a+='<span class="cesium-timeline-ticSub" style="left: '+G.toString()+'px;"></span>',e=v(e,T)}}else this._mainTicSpan=-1;a+='<span class="cesium-timeline-icon16" style="left:'+r+'px;bottom:0;background-position: 0 0;"></span>',t.innerHTML=a,this._scrubElement=t.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),C.y=0,this._trackList.forEach((function(e){e.render(o._context,C),C.y+=e.height}))},u$2.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;var e=this._scrubElement;if(t$$(this._scrubElement)){var t=o$10.secondsDifference(this._scrubJulian,this._startJulian),i=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan);this._lastXPos!==i&&(this._lastXPos=i,e.style.left=i-8+"px",this._needleEle.style.left=i+"px")}t$$(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(o$10.addSeconds(this._startJulian,this._timelineDrag,new o$10),o$10.addSeconds(this._endJulian,this._timelineDrag,new o$10)))},u$2.prototype._setTimeBarTime=function(e,t){if(e=Math.round(e),this._scrubJulian=o$10.addSeconds(this._startJulian,t,new o$10),this._scrubElement){var i=e-8;this._scrubElement.style.left=i.toString()+"px",this._needleEle.style.left=e.toString()+"px"}var n=document.createEvent("Event");n.initEvent("settime",!0,!0),n.clientX=e,n.timeSeconds=t,n.timeJulian=this._scrubJulian,n.clock=this._clock,this._topDiv.dispatchEvent(n)},u$2.prototype.resize=function(){var e=this.container.clientWidth,t=this.container.clientHeight;if(e!==this._lastWidth||t!==this._lastHeight){this._trackContainer.style.height=t+"px";var i=1;this._trackList.forEach((function(e){i+=e.height})),this._trackListEle.style.height=i.toString()+"px",this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=i,this._makeTics(),this._lastXPos=void 0,this._lastWidth=e,this._lastHeight=t}},Object.defineProperties(s.prototype,{vrElement:{get:function(){return this._vrElement},set:function(e){if(!(e instanceof Element))throw new t$_("value must be a valid Element.");this._vrElement=e}},command:{get:function(){return this._command}}}),s.prototype.isDestroyed=function(){return!1},s.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(n$15.changeEventName,this._callback),s$1e(this)};var h$1="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$1="M 25.770585,2.4552065 C 15.72282,13.962707 10.699956,19.704407 8.1768352,22.580207 c -1.261561,1.4379 -1.902282,2.1427 -2.21875,2.5 -0.141624,0.1599 -0.208984,0.2355 -0.25,0.2813 l 0.6875,0.75 c 10e-5,-10e-5 0.679191,0.727 0.6875,0.7187 0.01662,-0.016 0.02451,-0.024 0.03125,-0.031 0.01348,-0.014 0.04013,-0.038 0.0625,-0.062 0.04474,-0.05 0.120921,-0.1315 0.28125,-0.3126 0.320657,-0.3619 0.956139,-1.0921 2.2187499,-2.5312 2.5252219,-2.8781 7.5454589,-8.6169 17.5937499,-20.1250005 l -1.5,-1.3125 z m -20.5624998,3.9063 c -1.304375,0 -2.34375,1.0391 -2.34375,2.3437 l 0,10.8125005 c 0,1.3043 1.039375,2.375 2.34375,2.375 l 2.25,0 c 1.9518039,-2.2246 7.4710958,-8.5584 13.5624998,-15.5312005 l -15.8124998,0 z m 21.1249998,0 c -1.855467,2.1245 -2.114296,2.4005 -3.59375,4.0936995 1.767282,0.1815 3.15625,1.685301 3.15625,3.500001 0,1.9349 -1.56511,3.5 -3.5,3.5 -1.658043,0 -3.043426,-1.1411 -3.40625,-2.6875 -1.089617,1.2461 -2.647139,2.9988 -3.46875,3.9375 0.191501,-0.062 0.388502,-0.094 0.59375,-0.094 1.373338,0 2.50006,1.4614 2.5625,3.2812 l 8.3125,0 c 1.304375,0 2.34375,-1.0707 2.34375,-2.375 l 0,-10.8125005 c 0,-1.3046 -1.039375,-2.3437 -2.34375,-2.3437 l -0.65625,0 z M 9.5518351,10.423906 c 1.9348899,0 3.4999999,1.596401 3.4999999,3.531301 0,1.9349 -1.56511,3.5 -3.4999999,3.5 -1.9348899,0 -3.4999999,-1.5651 -3.4999999,-3.5 0,-1.9349 1.56511,-3.531301 3.4999999,-3.531301 z m 4.2187499,10.312601 c -0.206517,0.2356 -0.844218,0.9428 -1.03125,1.1562 l 0.8125,0 c 0.01392,-0.4081 0.107026,-0.7968 0.21875,-1.1562 z";function o$1(e,t,i){if(!t$$(e))throw new t$_("container is required.");if(!t$$(t))throw new t$_("scene is required.");e=o$a(e);var n=new s(t,i);n._exitVRPath=u$1,n._enterVRPath=h$1;var r=document.createElement("button");r.type="button",r.className="cesium-button cesium-vrButton",r.setAttribute("data-bind",'css: { "cesium-button-disabled" : _isOrthographic }, attr: { title: tooltip },click: command,enable: isVREnabled,cesiumSvgPath: { path: isVRMode ? _exitVRPath : _enterVRPath, width: 32, height: 32 }'),e.appendChild(r),le$2.applyBindings(n,r),this._container=e,this._viewModel=n,this._element=r}Object.defineProperties(o$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),o$1.prototype.isDestroyed=function(){return!1},o$1.prototype.destroy=function(){return this._viewModel.destroy(),le$2.cleanNode(this._element),this._container.removeChild(this._element),s$1e(this)},new r$T;var f$1="-1000px";function n(e,t,i){if(!t$$(e))throw new t$_("scene is required.");if(!t$$(t))throw new t$_("zoomIndicatorElement is required.");if(!t$$(i))throw new t$_("container is required.");this._scene=e,this._screenPositionX=f$1,this._screenPositionY=f$1,this._tweens=e.tweens,this._container=e$1Y(i,document.body),this._zoomIndicatorElement=t,this._scale=1,this._opacity=1,this.position=void 0,this.showSelection=!1,le$2.track(this,["position","_screenPositionX","_screenPositionY","_opacity","showSelection"]),this.isVisible=void 0,le$2.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&t$$(this.position)}}),le$2.defineProperty(this,"_transform",{get:function(){return"scale("+this._scale+")"}}),this.computeScreenSpacePosition=function(t,i){return u$V.wgs84ToWindowCoordinates(e,t,i)}}function o(e,t){if(!t$$(e))throw new t$_("container is required.");e=o$a(e),this._container=e;var i=document.createElement("div");i.className="cesium-zoom-wrapper",i.setAttribute("data-bind",' style: { "top" : _screenPositionY, "left" : _screenPositionX,"opacity" : _opacity }, css: { "cesium-zoom-wrapper-visible" : isVisible }'),e.appendChild(i),this._element=i;var r=document.createElement("img");r.src=o$12("Widgets/Images/ZoomIndicator/zoom_Identifiers.png"),r.style.width="48px",r.style.height="48px",i.appendChild(r);var o=new n(t,this._element,this._container);this._viewModel=o,le$2.applyBindings(this._viewModel,this._element)}n.prototype.update=function(){var e=this.scene._screenSpaceCameraController;if(e.zoomActive){e.zoomActive=!1;var t=this._container,i=t.parentNode.clientWidth,n=t.parentNode.clientHeight,r=r$T.clone(e._zoomMouseStart);r.x=Math.min(Math.max(r.x,-48),i+48)-24,r.y=Math.min(Math.max(r.y,-48),n+48)-24,this._screenPositionX=Math.floor(r.x+.25)+"px",this._screenPositionY=Math.floor(r.y+.25)+"px",this._opacity=1,this.showSelection=!0,this.animateDepart()}},n.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:_$T.EXPONENTIAL_OUT})},n.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_opacity",startValue:this._opacity,stopValue:0,duration:1,easingFunction:_$T.EXPONENTIAL_OUT})},Object.defineProperties(n.prototype,{container:{get:function(){return this._container}},zoomIndicatorElement:{get:function(){return this._zoomIndicatorElement}},scene:{get:function(){return this._scene}}}),Object.defineProperties(o.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),o.prototype.isDestroyed=function(){return!1},o.prototype.destroy=function(){var e=this._container;return le$2.cleanNode(this._element),e.removeChild(this._element),s$1e(this)};var C=new c$19;function Pe(e){var t=e.clock;t.currentTime=e.timeJulian,t.shouldAnimate=!1}function Ie(e,t){t$$(e.scene._frameState)&&t$$(e.scene._frameState.pickIDColor)&&(e.scene._frameState.pickIDColor=new e$1z(1,1,1,1)),t$$(e._activeBillboard)&&(e._activeBillboard.billboard.color=e._activeBillboard.originalColor,e._activeBillboard=void 0);var i=e.scene.pick(t.position);if(t$$(i)){var n=e$1Y(i.id,i.primitive.id);if(n instanceof l$J)return n.pickHeight=i.height,n;if(t$$(i.primitive)){if(e.scene.layers._layerQueue.length>0&&Ct(e,t.position),t$$(i.collection)&&i.collection._isMVT)return t$$(i.primitive)&&i.primitive instanceof s$1a&&(e._activeBillboard={billboard:i.primitive,originalColor:e$1z.clone(i.primitive.color)},i.primitive.color=e$1z.CYAN),{pickResult:{featureID:i.primitive._id,layerID:i.primitive._mvtLayerID,mapName:i.primitive._mapName,position:i.primitive._position,primitive:i.primitive,properties:i.primitive._mvtProperties}};for(var r=e.scene._vectorTileSource.values.length-1;r>=0;r--){var o=scene._vectorTileSource.values[r];o._MVTStyle.cancelHighLight(o)}return i}}if(t$$(e.scene.globe))return Et(e,t.position)}function Be(e,t,i){if(t$$(i)){var n=i.clock;t$$(n)&&(n.getValue(t),t$$(e)&&(e.updateFromClock(),e.zoomTo(n.startTime,n.stopTime)))}}var De=new a$11;function St(e,t){var i,n=null,r=e._frameState;if(!t$$(i)){var o=e.pickPosition(t);if(!t$$(o))return null;i=i$1g.fromCartesian(o)}for(var a=e._vectorTileSource.values.length-1;a>=0;a--){var s=e._vectorTileSource.values[a];if((!t$$(s._selectEnabled)||s._selectEnabled)&&t$$(n=s.pick(i,r)))return n.mapName=s._owner._name,new l$J({id:n.featureID,layerID:n.layerID,pickResult:n})}return null}function Et(e,t){var i=e.scene,n=St(i,t);if(null!=n)return n;var r=i.camera.getPickRay(t),o=i.imageryLayers.pickImageryLayerFeatures(r,i);if(t$$(o)){var a=new l$J({id:"Loading...",description:"Loading feature information..."});return c$18(o,(function(t){if(e.selectedEntity===a){if(!t$$(t)||0===t.length)return void(e.selectedEntity=Me());var i=t[0],n=new l$J({id:i.name,description:i.description});if(t$$(i.position)){var r=e.scene.globe.ellipsoid.cartographicToCartesian(i.position,De);n.position=new t$B(r)}e.selectedEntity=n}}),(function(){e.selectedEntity===a&&(e.selectedEntity=Me())})),a}}function Ct(e,t){var i=e.scene,n=i.layers.pickFeatures(t,i);if(!t$$(n))return!1;var r=new l$J({id:"Loading...",description:"Loading feature information..."});c$18(n,(function(i){if(t$$(i)){var n=i.fieldNames,r=i.fieldValues;if(t$$(n)&&t$$(r)){for(var o={},a=0,s=n.length;a<s;a++)o[n[a]]=r[a];var l=new l$J({feature:o});if(l.scenePos=e.scene.pickPosition(t),t$$(o.position)){var u=e.scene.globe.ellipsoid.cartographicToCartesian(o.position,De);l.position=new t$B(u)}t$$(i.geometry)&&(o.geometry=i.geometry),e.selectedEntity=l,e.pickEvent.raiseEvent(o)}else e.selectedEntity=void 0}else e.selectedEntity=void 0}),(function(){e.selectedEntity===r&&(e.selectedEntity=void 0)}))}function Me(){return new l$J({id:"None",description:"No features found."})}function bt(e,t){var i=e._geocoder,n=e._homeButton,r=e._sceneModePicker,o=e._projectionPicker,a=e._baseLayerPicker,s=e._animation,l=e._timeline,u=e._fullscreenButton,c=e._infoBox,h=e._selectionIndicator,d=t?"hidden":"visible";if(t$$(i)&&(i.container.style.visibility=d),t$$(n)&&(n.container.style.visibility=d),t$$(r)&&(r.container.style.visibility=d),t$$(o)&&(o.container.style.visibility=d),t$$(a)&&(a.container.style.visibility=d),t$$(s)&&(s.container.style.visibility=d),t$$(l)&&(l.container.style.visibility=d),t$$(u)&&u.viewModel.isFullscreenEnabled&&(u.container.style.visibility=d),t$$(c)&&(c.container.style.visibility=d),t$$(h)&&(h.container.style.visibility=d),e._container){var f=t||!t$$(u)?0:u.container.clientWidth;e._vrButton.container.style.right=f+"px",e.forceResize()}}function u(e,t){if(!t$$(e))throw new t$_("container is required.");e=o$a(e);var i=(!t$$((t=e$1Y(t,e$1Y.EMPTY_OBJECT)).globe)||!1!==t.globe)&&t$$(t.baseLayerPicker)&&!1!==t.baseLayerPicker;if(!i&&t$$(t.selectedImageryProviderViewModel))throw new t$_("options.selectedImageryProviderViewModel is not available when not using the BaseLayerPicker widget. Either specify options.imageryProvider instead or set options.baseLayerPicker to true.");if(!i&&t$$(t.selectedTerrainProviderViewModel))throw new t$_("options.selectedTerrainProviderViewModel is not available when not using the BaseLayerPicker widget. Either specify options.terrainProvider instead or set options.baseLayerPicker to true.");var n=this,a=document.createElement("div");a.className="cesium-viewer",e.appendChild(a);var s=document.createElement("div");s.className="cesium-viewer-cesiumWidgetContainer",a.appendChild(s);var l=document.createElement("div");l.className="cesium-viewer-bottom",a.appendChild(l);var c,h,d=e$1Y(t.scene3DOnly,!1),f=!1;t$$(t.clockViewModel)?c=(h=t.clockViewModel).clock:(h=new o$5(c=new a$M),f=!0),c.shouldAnimate=e$1Y(t.shouldAnimate,!0);var _=new p(s,{terrainProvider:t.terrainProvider,imageryProvider:!i&&!t$$(t.imageryProvider)&&void 0,gridProvider:t.gridProvider,clock:c,skyBox:t.skyBox,skyAtmosphere:t.skyAtmosphere,sceneMode:t.sceneMode,mapProjection:t.mapProjection,globe:t.globe,orderIndependentTranslucency:t.orderIndependentTranslucency,contextOptions:t.contextOptions,useDefaultRenderLoop:t.useDefaultRenderLoop,targetFrameRate:t.targetFrameRate,showRenderLoopErrors:t.showRenderLoopErrors,useBrowserRecommendedResolution:t.useBrowserRecommendedResolution,creditContainer:t$$(t.creditContainer)?t.creditContainer:l,creditViewport:t.creditViewport,scene3DOnly:d,terrainExaggeration:t.terrainExaggeration,shadows:t.shadows,terrainShadows:t.terrainShadows,mapMode2D:t.mapMode2D,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,cloudBox:t.cloudBox}),m=t.dataSources,$=!1;t$$(m)||(m=new i$v,$=!0);var g,y,v=_.scene,x=new l$n({scene:v,dataSourceCollection:m}),b=new n$W;if(b.add(c.onTick,u.prototype._onTick,this),b.add(v.morphStart,u.prototype._clearTrackedObject,this),!t$$(t.selectionIndicator)||!1!==t.selectionIndicator){var S=document.createElement("div");S.className="cesium-viewer-selectionIndicatorContainer",a.appendChild(S),g=new r(S,v)}if(!t$$(t.infoBox)||!1!==t.infoBox){var w=document.createElement("div");w.className="cesium-viewer-infoBoxContainer",a.appendChild(w);var C=(y=new c$3(w)).viewModel;b.add(C.cameraClicked,u.prototype._onInfoBoxCameraClicked,this),b.add(C.closeClicked,u.prototype._onInfoBoxClockClicked,this)}var T,P,E,A,L,M,I,O,D,R,N,F,B,z,G,k,U=document.createElement("div");if(U.className="cesium-viewer-toolbar",a.appendChild(U),t$$(t.geocoder)&&!1!==t.geocoder){var V,W=document.createElement("div");W.className="cesium-viewer-geocoderContainer",U.appendChild(W),t$$(t.geocoder)&&"boolean"!=typeof t.geocoder&&(V=Array.isArray(t.geocoder)?t.geocoder:[t.geocoder]),T=new s$1({container:W,geocoderServices:V,scene:v,viewer:this}),b.add(T.viewModel.search.beforeExecute,u.prototype._clearObjects,this)}if(t$$(t.homeButton)&&!1!==t.homeButton&&(P=new o$4(U,v),t$$(T)&&b.add(P.viewModel.command.afterExecute,(function(){var e=T.viewModel;e.searchText="",e.isSearchInProgress&&e.search()})),b.add(P.viewModel.command.beforeExecute,u.prototype._clearTrackedObject,this)),!0===t.sceneModePicker&&d)throw new t$_("options.sceneModePicker is not available when options.scene3DOnly is set to true.");if(!d&&t$$(t.sceneModePicker)&&!1!==t.sceneModePicker&&(E=new r$2(U,v)),t.projectionPicker&&(A=new c$2(U,v)),i){var H=e$1Y(t.imageryProviderViewModels,p$1()),Y=e$1Y(t.terrainProviderViewModels,t$2());L=new L$4(U,{globe:v.globe,imageryProviderViewModels:H,selectedImageryProviderViewModel:t.selectedImageryProviderViewModel,terrainProviderViewModels:Y,selectedTerrainProviderViewModel:t.selectedTerrainProviderViewModel}),M=U.getElementsByClassName("cesium-baseLayerPicker-dropDown")[0]}if(t$$(t.imageryProvider)&&!1!==t.imageryProvider&&(i&&(L.viewModel.selectedImagery=void 0),v.imageryLayers.removeAll(),v.imageryLayers.addImageryProvider(t.imageryProvider)),t$$(t.terrainProvider)&&(i&&(L.viewModel.selectedTerrain=void 0),v.terrainProvider=t.terrainProvider),t$$(t.navigationHelpButton)&&!1!==t.navigationHelpButton){var j=!0;try{if(t$$(window.localStorage)){var q=window.localStorage.getItem("cesium-hasSeenNavHelp");t$$(q)&&Boolean(q)?j=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true")}}catch{}I=new v$2({container:U,instructionsInitiallyVisible:e$1Y(t.navigationInstructionsInitiallyVisible,j)})}if(t$$(t.animation)&&!1!==t.animation){var X=document.createElement("div");X.className="cesium-viewer-animationContainer",a.appendChild(X),O=new y$4(X,new m$6(h))}if(t$$(t.timeline)&&!1!==t.timeline){var K=document.createElement("div");K.className="cesium-viewer-timelineContainer",a.appendChild(K),(D=new u$2(K,c)).addEventListener("settime",Pe,!1),D.zoomTo(c.startTime,c.stopTime)}if(t$$(t.fullscreenButton)&&!1!==t.fullscreenButton&&((F=document.createElement("div")).className="cesium-viewer-fullscreenContainer",a.appendChild(F),N=a$2((R=new i$4(F,t.fullscreenElement)).viewModel,"isFullscreenEnabled",(function(e){F.style.display=e?"block":"none",t$$(D)&&(D.container.style.right=F.clientWidth+"px",D.resize())}))),t.vrButton){var Z=document.createElement("div");Z.className="cesium-viewer-vrContainer",a.appendChild(Z),z=a$2((B=new o$1(Z,v,t.fullScreenElement)).viewModel,"isVREnabled",(function(e){Z.style.display=e?"block":"none",t$$(R)&&(Z.style.right=F.clientWidth+"px"),t$$(D)&&(D.container.style.right=Z.clientWidth+"px",D.resize())})),G=a$2(B.viewModel,"isVRMode",(function(e){bt(n,e)}))}if(!t$$(t.navigation)||!1!==t.navigation){var J=document.createElement("div");J.className="cesium-viewer-navigationContainer",a.appendChild(J),k=new t$1({container:J,scene:v,viewer:this})}this._scratchHoldUrl="url("+o$12("Widgets/Images/cur/Hold.cur")+"), auto",this._scratchPanUrl="url("+o$12("Widgets/Images/cur/Pan.cur")+"), auto",this._activeBillboard=void 0,this._baseLayerPickerDropDown=M,this._fullscreenSubscription=N,this._vrSubscription=z,this._vrModeSubscription=G,this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=e$1Y(t.automaticallyTrackDataSourceClocks,!0),this._container=e,this._bottomContainer=l,this._element=a,this._cesiumWidget=_,this._selectionIndicator=g,this._infoBox=y,this._dataSourceCollection=m,this._destroyDataSourceCollection=$,this._dataSourceDisplay=x,this._clockViewModel=h,this._destroyClockViewModel=f,this._toolbar=U,this._homeButton=P,this._sceneModePicker=E,this._projectionPicker=A,this._baseLayerPicker=L,this._navigationHelpButton=I,this._animation=O,this._timeline=D,this._fullscreenButton=R,this._vrButton=B,this._geocoder=T,this._navigation=k,this._eventHelper=b,this._lastWidth=0,this._lastHeight=0,this._allowDataSourcesToSuspendAnimation=!0,this._entityView=void 0,this._enableInfoOrSelection=t$$(y)||t$$(g),this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._selectedEntity=void 0,this._clockTrackedDataSource=void 0,this._forceResize=!1,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,this._selectedEntityChanged=new o$15,this._trackedEntityChanged=new o$15,this._capturePointSize=16,this._capturePointColor=e$1z.fromCssColorString("#0173c7"),le$2.track(this,["_trackedEntity","_selectedEntity","_clockTrackedDataSource"]),b.add(m.dataSourceAdded,u.prototype._onDataSourceAdded,this),b.add(m.dataSourceRemoved,u.prototype._onDataSourceRemoved,this),b.add(v.postUpdate,u.prototype.resize,this),b.add(v.postRender,u.prototype._postRender,this);for(var Q=m.length,ee=0;ee<Q;ee++)this._dataSourceAdded(m,m.get(ee));this._dataSourceAdded(void 0,x.defaultDataSource),b.add(m.dataSourceAdded,u.prototype._dataSourceAdded,this),b.add(m.dataSourceRemoved,u.prototype._dataSourceRemoved,this),_.screenSpaceEventHandler.setInputAction((function(e){n.selectedEntity=Ie(n,e)}),Q$L.LEFT_CLICK),_.screenSpaceEventHandler.setInputAction((function(e){var t=Ie(n,e);t$$(t)?r$w.getValueOrUndefined(t.position,n.clock.currentTime)?n.trackedEntity=t:n.zoomTo(t):t$$(n.trackedEntity)&&(n.trackedEntity=void 0)}),Q$L.LEFT_DOUBLE_CLICK),this.pickEvent=new o$15;var te=document.createElement("div");te.className="cesium-viewer-zoomIndicatorContainer",a.appendChild(te),this._zoomIndicator=new o(te,_.scene);var ie=this._zoomIndicator._viewModel;ie._screenPositionX="100px",ie._screenPositionY="100px",ie.position="absolute",ie.showSelection=!1}Object.defineProperties(u.prototype,{container:{get:function(){return this._container}},bottomContainer:{get:function(){return this._bottomContainer}},cesiumWidget:{get:function(){return this._cesiumWidget}},selectionIndicator:{get:function(){return this._selectionIndicator}},infoBox:{get:function(){return this._infoBox}},geocoder:{get:function(){return this._geocoder}},navigation:{get:function(){return this._navigation}},homeButton:{get:function(){return this._homeButton}},sceneModePicker:{get:function(){return this._sceneModePicker}},projectionPicker:{get:function(){return this._projectionPicker}},baseLayerPicker:{get:function(){return this._baseLayerPicker}},navigationHelpButton:{get:function(){return this._navigationHelpButton}},animation:{get:function(){return this._animation}},timeline:{get:function(){return this._timeline}},fullscreenButton:{get:function(){return this._fullscreenButton}},vrButton:{get:function(){return this._vrButton}},dataSourceDisplay:{get:function(){return this._dataSourceDisplay}},entities:{get:function(){return this._dataSourceDisplay.defaultDataSource.entities}},dataSources:{get:function(){return this._dataSourceCollection}},canvas:{get:function(){return this._cesiumWidget.canvas}},cesiumLogo:{get:function(){return this._cesiumWidget.cesiumLogo}},scene:{get:function(){return this._cesiumWidget.scene}},shadows:{get:function(){return this.scene.shadowMap.enabled},set:function(e){this.scene.shadowMap.enabled=e}},terrainShadows:{get:function(){return this.scene.globe.shadows},set:function(e){this.scene.globe.shadows=e}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainLayers:{get:function(){return this.scene.terrainLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(e){this.scene.terrainProvider=e;var t=this;e.readyPromise.otherwise((function(){t.scene.terrainProvider=t.scene.globe._defaultTerrainProvider}))}},camera:{get:function(){return this.scene.camera}},postProcessStages:{get:function(){return this.scene.postProcessStages}},clock:{get:function(){return this._clockViewModel.clock}},clockViewModel:{get:function(){return this._clockViewModel}},screenSpaceEventHandler:{get:function(){return this._cesiumWidget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._cesiumWidget.targetFrameRate},set:function(e){this._cesiumWidget.targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._cesiumWidget.useDefaultRenderLoop},set:function(e){this._cesiumWidget.useDefaultRenderLoop=e}},resolutionScale:{get:function(){return this._cesiumWidget.resolutionScale},set:function(e){this._cesiumWidget.resolutionScale=e,this._forceResize=!0}},useBrowserRecommendedResolution:{get:function(){return this._cesiumWidget.useBrowserRecommendedResolution},set:function(e){this._cesiumWidget.useBrowserRecommendedResolution=e}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(e){this._allowDataSourcesToSuspendAnimation=e}},trackedEntity:{get:function(){return this._trackedEntity},set:function(e){if(this._trackedEntity!==e){this._trackedEntity=e,le(this);var t=this.scene,i=t.mode;t$$(e)&&t$$(e.position)?this._needTrackedEntityUpdate=!0:(this._needTrackedEntityUpdate=!1,(i===b$1d.COLUMBUS_VIEW||i===b$1d.SCENE2D)&&(t.screenSpaceCameraController.enableTranslate=!0),(i===b$1d.COLUMBUS_VIEW||i===b$1d.SCENE3D)&&(t.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(c$1a.IDENTITY)),this._trackedEntityChanged.raiseEvent(e),this.scene.requestRender()}}},selectedEntity:{get:function(){return this._selectedEntity},set:function(e){if(this._selectedEntity!==e){this._selectedEntity=e;var t=t$$(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;t$$(e)?t$$(t)&&t.animateAppear():t$$(t)&&t.animateDepart(),this._selectedEntityChanged.raiseEvent(e)}}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(e){this._clockTrackedDataSource!==e&&(this._clockTrackedDataSource=e,Be(this._timeline,this.clock,e))}}}),u.prototype.extend=function(e,t){if(!t$$(e))throw new t$_("mixin is required.");e(this,t)},u.prototype.resize=function(){var e=this._cesiumWidget,t=this._container,i=t.clientWidth,n=t.clientHeight,r=t$$(this._animation),o=t$$(this._timeline);if(this._forceResize||i!==this._lastWidth||n!==this._lastHeight){e.resize(),this._forceResize=!1;var a=n-125,s=this._baseLayerPickerDropDown;t$$(s)&&(s.style.maxHeight=a+"px"),t$$(this._infoBox)&&(this._infoBox.viewModel.maxHeight=a);var l,u=this._timeline,c=0,h=0,d=0;if(r&&"hidden"!==window.getComputedStyle(this._animation.container).visibility){var f=this._lastWidth;l=this._animation.container,i>900?(c=169,f<=900&&(l.style.width="169px",l.style.height="112px",this._animation.resize())):i>=600?(c=136,(f<600||f>900)&&(l.style.width="136px",l.style.height="90px",this._animation.resize())):(c=106,(f>600||0===f)&&(l.style.width="106px",l.style.height="70px",this._animation.resize())),h=c+5}if(o&&"hidden"!==window.getComputedStyle(this._timeline.container).visibility){var p=this._fullscreenButton,_=this._vrButton,m=u.container,$=m.style;d=m.clientHeight+3,$.left=c+"px";var g=0;t$$(p)&&(g+=p.container.clientWidth),t$$(_)&&(g+=_.container.clientWidth),$.right=g+"px",u.resize()}this._bottomContainer.style.left=h+"px",this._bottomContainer.style.bottom=d+"px",this._lastWidth=i,this._lastHeight=n}},u.prototype.forceResize=function(){this._lastWidth=0,this.resize()},u.prototype.render=function(){this._cesiumWidget.render()},u.prototype.isDestroyed=function(){return!1},u.prototype.destroy=function(){var e;this.screenSpaceEventHandler.removeInputAction(Q$L.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(Q$L.LEFT_DOUBLE_CLICK);var t=this.dataSources,i=t.length;for(e=0;e<i;e++)this._dataSourceRemoved(t,t.get(e));return this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._container.removeChild(this._element),this._element.removeChild(this._toolbar),this._eventHelper.removeAll(),t$$(this._geocoder)&&(this._geocoder=this._geocoder.destroy()),t$$(this._homeButton)&&(this._homeButton=this._homeButton.destroy()),t$$(this._sceneModePicker)&&(this._sceneModePicker=this._sceneModePicker.destroy()),t$$(this._projectionPicker)&&(this._projectionPicker=this._projectionPicker.destroy()),t$$(this._baseLayerPicker)&&(this._baseLayerPicker=this._baseLayerPicker.destroy()),t$$(this._animation)&&(this._element.removeChild(this._animation.container),this._animation=this._animation.destroy()),t$$(this._timeline)&&(this._timeline.removeEventListener("settime",Pe,!1),this._element.removeChild(this._timeline.container),this._timeline=this._timeline.destroy()),t$$(this._fullscreenButton)&&(this._fullscreenSubscription.dispose(),this._element.removeChild(this._fullscreenButton.container),this._fullscreenButton=this._fullscreenButton.destroy()),t$$(this._vrButton)&&(this._vrSubscription.dispose(),this._vrModeSubscription.dispose(),this._element.removeChild(this._vrButton.container),this._vrButton=this._vrButton.destroy()),t$$(this._infoBox)&&(this._element.removeChild(this._infoBox.container),this._infoBox=this._infoBox.destroy()),t$$(this._selectionIndicator)&&(this._element.removeChild(this._selectionIndicator.container),this._selectionIndicator=this._selectionIndicator.destroy()),this._destroyClockViewModel&&(this._clockViewModel=this._clockViewModel.destroy()),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),this._cesiumWidget=this._cesiumWidget.destroy(),this._destroyDataSourceCollection&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),s$1e(this)},u.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(u.prototype._onEntityCollectionChanged,this)},u.prototype._dataSourceRemoved=function(e,t){var i=t.entities;i.collectionChanged.removeEventListener(u.prototype._onEntityCollectionChanged,this),t$$(this.trackedEntity)&&i.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0),t$$(this.selectedEntity)&&i.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};var ee=!1,H,xe=0;function Le(e,t,i,n){if(!t$$(t))throw new t$_("zoomTarget is required.");le(e);var r=c$18.defer();return e._zoomPromise=r,e._zoomIsFlight=n,e._zoomOptions=i,c$18(t,(function(t){if(e._zoomPromise===r){if(t instanceof u$p)return void t.getViewableRectangle().then((function(t){return i$g(t,e.scene)})).then((function(t){e._zoomPromise===r&&(e._zoomTarget=t)}));if(t instanceof f$B)return void(e._zoomTarget=t);if(t instanceof c$6)return void(e._zoomTarget=t);if(t.isLoading&&t$$(t.loadingEvent)){var i=t.loadingEvent.addEventListener((function(){i(),e._zoomPromise===r&&(e._zoomTarget=t.entities.values.slice(0))}));return}if(Array.isArray(t))return void(e._zoomTarget=t.slice(0));if(t instanceof _0x4ab4f4)return void(e._zoomTarget=t.layerBounds);if(t instanceof p$f)return void t.getViewableRectangle().then((function(t){return i$g(t,e.scene)})).then((function(t){e._zoomPromise===r&&(e._zoomTarget=t)}));t$$((t=e$1Y(t.values,t)).entities)&&(t=t.entities.values),Array.isArray(t)?e._zoomTarget=t.slice(0):e._zoomTarget=[t]}})),e.scene.requestRender(),r.promise}function M(e){e._zoomPromise=void 0,e._zoomTarget=void 0,e._zoomOptions=void 0}function le(e){var t=e._zoomPromise;t$$(t)&&(M(e),t.resolve(!1))}function Tt(e){var t=e._zoomTarget;if(t$$(t)&&e.scene.mode!==b$1d.MORPHING){var i=e.scene,n=i.camera,r=e._zoomPromise,o=e$1Y(e._zoomOptions,{});if(t instanceof f$B)return t.readyPromise.then((function(){var i=t.boundingSphere;t$$(o.offset)||(o.offset=new h$V(0,-.5,i.radius)),s={offset:o.offset,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){r.resolve(!0)},cancel:function(){r.resolve(!1)}},e._zoomIsFlight?n.flyToBoundingSphere(t.boundingSphere,s):(n.viewBoundingSphere(i,o.offset),n.lookAtTransform(c$1a.IDENTITY),r.resolve(!0)),M(e)}));if(t instanceof c$6)return t.readyPromise.then((function(){var i=t.boundingSphere;t$$(o.offset)||(o.offset=new h$V(0,-.5,i.radius)),s={offset:o.offset,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){r.resolve(!0)},cancel:function(){r.resolve(!1)}},e._zoomIsFlight?n.flyToBoundingSphere(i,s):(n.viewBoundingSphere(i,o.offset),n.lookAtTransform(c$1a.IDENTITY),r.resolve(!0)),M(e)}));if(t instanceof i$1g)return s={destination:i.mapProjection.ellipsoid.cartographicToCartesian(t),duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){r.resolve(!0)},cancel:function(){r.resolve(!1)}},e._zoomIsFlight?n.flyTo(s):(n.setView(s),r.resolve(!0)),void M(e);var a=t;if(a instanceof s$1p){var s={offset:o.offset,destination:a,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){r.resolve(!0)},cancel:function(){r.resolve(!1)}};if(e._zoomIsFlight){var l=c$19.fromRectangle3D(t);n.flyToBoundingSphere(l,s)}else n.setView(s),r.resolve(!0);return void M(e)}for(var u=[],c=0,h=a.length;c<h;c++){var d=e._dataSourceDisplay.getBoundingSphere(a[c],!1,C);if(d===A$T.PENDING)return;d!==A$T.FAILED&&u.push(c$19.clone(C))}if(0===u.length)return void le(e);e.trackedEntity=void 0,l=c$19.fromBoundingSpheres(u),e._zoomIsFlight?(M(e),n.flyToBoundingSphere(l,{duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){r.resolve(!0)},cancel:function(){r.resolve(!1)},offset:o.offset})):(n.viewBoundingSphere(l,o.offset),n.lookAtTransform(c$1a.IDENTITY),M(e),r.resolve(!0))}}function Pt(e){if(e._needTrackedEntityUpdate){var t=e._trackedEntity,i=e.clock.currentTime;if(t$$(r$w.getValueOrUndefined(t.position,i))){var n=e.scene,r=e._dataSourceDisplay.getBoundingSphere(t,!1,C);if(r!==A$T.PENDING){var o=n.mode;(o===b$1d.COLUMBUS_VIEW||o===b$1d.SCENE2D)&&(n.screenSpaceCameraController.enableTranslate=!1),(o===b$1d.COLUMBUS_VIEW||o===b$1d.SCENE3D)&&(n.screenSpaceCameraController.enableTilt=!1);var a=r!==A$T.FAILED?C:void 0;e._entityView=new x$u(t,n,n.mapProjection.ellipsoid),e._entityView.update(i,a),e._needTrackedEntityUpdate=!1}}}}function c$1(e){n$1e.typeOf.object("viewer",e);var t=document.createElement("div");t.className="cesium-viewer-cesium3DTilesInspectorContainer",e.container.appendChild(t);var i=new y$1(t,e.scene);Object.defineProperties(e,{cesium3DTilesInspector:{get:function(){return i}}})}function c(e){if(!t$$(e))throw new t$_("viewer is required.");var t=document.createElement("div");t.className="cesium-viewer-cesiumInspectorContainer",e.container.appendChild(t);var i=new w$1(t,e.scene);Object.defineProperties(e,{cesiumInspector:{get:function(){return i}}})}function $$1(e,t){if(!t$$(e))throw new t$_("viewer is required.");if(e.hasOwnProperty("dropTarget"))throw new t$_("dropTarget is already defined by another mixin.");if(e.hasOwnProperty("dropEnabled"))throw new t$_("dropEnabled is already defined by another mixin.");if(e.hasOwnProperty("dropError"))throw new t$_("dropError is already defined by another mixin.");if(e.hasOwnProperty("clearOnDrop"))throw new t$_("clearOnDrop is already defined by another mixin.");if(e.hasOwnProperty("flyToOnDrop"))throw new t$_("flyToOnDrop is already defined by another mixin.");t=e$1Y(t,e$1Y.EMPTY_OBJECT);var i=!0,n=e$1Y(t.flyToOnDrop,!0),r=new o$15,o=e$1Y(t.clearOnDrop,!0),a=e$1Y(t.dropTarget,e.container),s=e$1Y(t.clampToGround,!0),l=t.proxy;function u(t){f(t),o&&(e.entities.removeAll(),e.dataSources.removeAll());for(var i=t.dataTransfer.files,n=i.length,r=0;r<n;r++){var a=i[r],u=new FileReader;u.onload=j(e,a,l,s),u.onerror=G(e,a),u.readAsText(a)}}a=o$a(a),Object.defineProperties(e,{dropTarget:{get:function(){return a},set:function(e){if(!t$$(e))throw new t$_("value is required.");h(a,u),w(a=e,u)}},dropEnabled:{get:function(){return i},set:function(e){e!==i&&(e?w(a,u):h(a,u),i=e)}},dropError:{get:function(){return r}},clearOnDrop:{get:function(){return o},set:function(e){o=e}},flyToOnDrop:{get:function(){return n},set:function(e){n=e}},proxy:{get:function(){return l},set:function(e){l=e}},clampToGround:{get:function(){return s},set:function(e){s=e}}}),w(a,u),e.destroy=i$P(e,e.destroy,(function(){e.dropEnabled=!1})),e._handleDrop=u}function f(e){e.stopPropagation(),e.preventDefault()}function h(e,t){var i=e;t$$(i)&&(i.removeEventListener("drop",t,!1),i.removeEventListener("dragenter",f,!1),i.removeEventListener("dragover",f,!1),i.removeEventListener("dragexit",f,!1))}function w(e,t){e.addEventListener("drop",t,!1),e.addEventListener("dragenter",f,!1),e.addEventListener("dragover",f,!1),e.addEventListener("dragexit",f,!1)}function j(e,t,i,n){var r=e.scene;return function(o){var a=t.name;try{var s;if(/\.czml$/i.test(a))s=P$m.load(JSON.parse(o.target.result),{sourceUri:a});else if(/\.geojson$/i.test(a)||/\.json$/i.test(a)||/\.topojson$/i.test(a))s=y$u.load(JSON.parse(o.target.result),{sourceUri:a,clampToGround:n});else{if(!/\.(kml|kmz)$/i.test(a))return void e.dropError.raiseEvent(e,a,"Unrecognized file: "+a);s=D$t.load(t,{sourceUri:a,proxy:i,camera:r.camera,canvas:r.canvas,clampToGround:n})}t$$(s)&&e.dataSources.add(s).then((function(t){e.flyToOnDrop&&e.flyTo(t)})).otherwise((function(t){e.dropError.raiseEvent(e,a,t)}))}catch(t){e.dropError.raiseEvent(e,a,t)}}}function G(e,t){return function(i){e.dropError.raiseEvent(e,t.name,i.target.error)}}function m$1(e,t){if(!t$$(e))throw new t$_("viewer is required.");t=e$1Y(t,e$1Y.EMPTY_OBJECT);var i=new r$4({scene:e.scene,container:e.bottomContainer,lowFrameRateMessage:t.lowFrameRateMessage});Object.defineProperties(e,{performanceWatchdog:{get:function(){return i}}})}u.prototype._onTick=function(e){var t=e.currentTime,i=this._dataSourceDisplay.update(t);this._allowDataSourcesToSuspendAnimation&&(this._clockViewModel.canAnimate=i);var n=this._entityView;if(t$$(n)){var r=this._trackedEntity;this._dataSourceDisplay.getBoundingSphere(r,!1,C)===A$T.DONE&&n.update(t,C)}var o,a=!1,s=this.selectedEntity,l=t$$(s)&&this._enableInfoOrSelection,u=this.customInfobox;if(t$$(u))if(this._enableInfoOrSelection=!1,t$$(s)&&t$$(s.scenePos)){var c=this.scene.canvas.height,h=s.scenePos,d=new r$T;u$V.wgs84ToWindowCoordinates(this.scene,h,d),u.style.bottom=c-d.y+45+"px",u.style.left=d.x-70+"px",u.style.visibility="visible"}else u.style.visibility="hidden";if((l=t$$(s)&&this._enableInfoOrSelection)&&s.isShowing&&s.isAvailable(t)){var f=this._dataSourceDisplay.getBoundingSphere(s,!0,C);if(t$$(s.position))o=s.position.getValue(t,o);else if(f!==A$T.FAILED){if(t$$(s.pickHeight)){var p=Cesium.Cartographic.fromCartesian(C.center);p.height=s.pickHeight,C.center=Cesium.Cartographic.toCartesian(p)}o=C.center}a=t$$(o)}var _=t$$(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;t$$(_)&&(_.position=a$11.clone(o,_.position),_.showSelection=l&&a,_.update());var m=t$$(this._infoBox)?this._infoBox.viewModel:void 0;t$$(m)&&(m.showInfo=l,m.enableCamera=a,m.isCameraTracking=this.trackedEntity===this.selectedEntity,l?(m.titleText=e$1Y(s.name,s.id),m.description=r$w.getValueOrDefault(s.description,t,"")):(m.titleText="",m.description="")),this._zoomIndicator._viewModel.update();var $=this.scene._screenSpaceCameraController,g=$.tiltEventTypes,y=$._aggregator._isDown;(y[g[0]]&&3==this.scene.mode?(t$$(this._tiltIndicator)?this._tiltIndicator.setModelMatrix(this.scene.frameState,$._tiltCenter):(this._tiltIndicator=new C$1(this,this.scene.context,o$12("Widgets/Images/compass.s3m"),$._tiltCenter),this.scene.primitives.add(this._tiltIndicator)),this._tiltIndicator._visible=!0):t$$(this._tiltIndicator)&&(this._tiltIndicator._visible=!1),t$$(this.enableCursorStyle)&&0==this.enableCursorStyle)||(""==this._element.style.cursor&&(this._element.style.cursor=this._scratchPanUrl),y[$.rotateEventTypes]?ee||(ee=!0,this._element.style.cursor=this._scratchHoldUrl):ee&&(ee=!1,this._element.style.cursor=this._scratchPanUrl));if($._scene.pickPointEnabled){t$$(this.pointCloudIndicator)||(this.pointCloudIndicator=this.entities.add({id:"pont-cloud-indicator",position:new n$K((function(){return $._scene.pickPoint}),!1),point:{pixelSize:this._capturePointSize,color:this._capturePointColor,disableDepthTestDistance:Number.POSITIVE_INFINITY}})),this.pointCloudIndicator.show=!0;var v=$._aggregator;t$$(H)||(H=r$T.clone(v.currentMousePosition));var x=yt$9();if(x-xe>$._scene.pickPointInterval){xe=x;var b=r$T.clone(v.currentMousePosition),S=b.x-H.x,w=b.y-H.y,T=Math.sqrt(S*S+w*w);H=r$T.clone(v.currentMousePosition),T>5&&$._scene.pointPick(b)}}else t$$(this.pointCloudIndicator)&&(this.pointCloudIndicator.show=!1)},u.prototype._onEntityCollectionChanged=function(e,t,i){for(var n=i.length,r=0;r<n;r++){var o=i[r];this.trackedEntity===o&&(this.trackedEntity=void 0),this.selectedEntity===o&&(this.selectedEntity=void 0)}},u.prototype._onInfoBoxCameraClicked=function(e){e.isCameraTracking&&this.trackedEntity===this.selectedEntity?this.trackedEntity=void 0:t$$(this.selectedEntity.position)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)},u.prototype._clearTrackedObject=function(){this.trackedEntity=void 0},u.prototype._onInfoBoxClockClicked=function(e){this.selectedEntity=void 0},u.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0},u.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&Be(this.timeline,this.clock,e)},u.prototype._onDataSourceAdded=function(e,t){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=t);var i=t.entities.id,n=this._eventHelper.add(t.changedEvent,u.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[i]=n},u.prototype._onDataSourceRemoved=function(e,t){var i=this.clockTrackedDataSource===t,n=t.entities.id;if(this._dataSourceChangedListeners[n](),this._dataSourceChangedListeners[n]=void 0,i){var r=e.length;this._automaticallyTrackDataSourceClocks&&r>0?this.clockTrackedDataSource=e.get(r-1):this.clockTrackedDataSource=void 0}},u.prototype.zoomTo=function(e,t){return Le(this,e,{offset:t},!1)},u.prototype.flyTo=function(e,t){return Le(this,e,t,!0)},u.prototype._postRender=function(){Tt(this),Pt(this)};const _0x770d53=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x4ae2f7=_0x770d53(void 0,(function(){return _0x4ae2f7.toString().search("(((.+)+)+)+$").toString().constructor(_0x4ae2f7).search("(((.+)+)+)+$")}));_0x4ae2f7();var _0x4144f6,_0x14a941=[],_0x1b4310=.1,_0x4d8076,_0x1eee4f,_0x3bbbef="Selection_Cube";function _0x42e5f0(e){this._scene=e,_0x4144f6=new WebGLPlot.ScreenSpaceEventHandler(e.canvas)}function _0x1a17be(e,t){let i=[];if(e&&e.plotLayers){let t=e.plotLayers._layerQueue.length;for(let n=0;n<t;n++){let t=e.plotLayers._layerQueue[n];if(WebGLPlot.defined(t)&&t instanceof _0x4ab86a){let e=t._geoGraphicObjects.length;for(let n=0;n<e;n++){let e=t._geoGraphicObjects[n];_0x4fa979(e)&&i.push(e)}}}}"function"==typeof t&&t({geoArray:i})}function _0x4fa979(e){let t=_0x14a941[0].x>_0x14a941[1].x?_0x14a941[0].x:_0x14a941[1].x,i=_0x14a941[0].y>_0x14a941[1].y?_0x14a941[0].y:_0x14a941[1].y,n=_0x14a941[0].z>_0x1b4310?_0x14a941[0].z:_0x1b4310,r=_0x14a941[0].x<_0x14a941[1].x?_0x14a941[0].x:_0x14a941[1].x,o=_0x14a941[0].y<_0x14a941[1].y?_0x14a941[0].y:_0x14a941[1].y,a=_0x14a941[0].z<_0x1b4310?_0x14a941[0].z:_0x1b4310,s=e.localPoints.length;for(let l=0;l<s;l++){let s=e.localPoints[l];if(s.x>r&&s.x<t&&s.y>o&&s.y<i&&s.z>a&&s.z<n)return!0}return!1}function _0x31b59a(e,t){_0x4144f6.setInputAction((function(i){var n=_0x51d1e4.getPosition(e._scene,i.position);if(n){if(_0x14a941.length>=3)return _0x1eee4f=i.position,_0x2adbfb(),_0x1a17be(e._scene,t),void e.deActivate();2===_0x14a941.length&&(_0x14a941[_0x14a941.length-1]=n,_0x4d8076=i.position),0===_0x14a941.length&&_0x14a941.push(n),_0x14a941.push(n),_0x14a941.length>=2&&_0x2adbfb()}}),WebGLPlot.ScreenSpaceEventType.LEFT_DOWN),_0x4144f6.setInputAction((function(t){var i=_0x51d1e4.getPosition(e._scene,t.endPosition);_0x14a941.length>=2&&(_0x14a941.pop(),_0x14a941.push(i),_0x14a941.length>=3&&(_0x1eee4f=t.endPosition),_0x2adbfb(e._scene))}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE)}function _0x2adbfb(e){if(!e||_0x14a941.length<2||_0x14a941[0].x===_0x14a941[1].x&&_0x14a941[0].y===_0x14a941[1].y)return;var t=WebGLPlot.Cartesian3.fromDegrees(_0x14a941[0].x,_0x14a941[0].y,_0x14a941[0].z),i=[t,WebGLPlot.Cartesian3.fromDegrees(_0x14a941[1].x,_0x14a941[0].y,_0x14a941[0].z),WebGLPlot.Cartesian3.fromDegrees(_0x14a941[1].x,_0x14a941[1].y,_0x14a941[0].z),WebGLPlot.Cartesian3.fromDegrees(_0x14a941[0].x,_0x14a941[1].y,_0x14a941[0].z),t];if(_0x4d8076&&_0x1eee4f){let t=e.camera;var n=t.getPickRay(_0x4d8076),r=new WebGLPlot.Cartesian2(_0x4d8076.x+1,_0x4d8076.y),o=t.getPickRay(r),a=e.globe.pick(n,e),s=e.globe.pick(o,e);let i=WebGLPlot.Cartesian3.distance(a,s);_0x1b4310=(_0x4d8076.y-_0x1eee4f.y)*i}const l=new WebGLPlot.PolygonGeometry({polygonHierarchy:new WebGLPlot.PolygonHierarchy(i),perPositionHeight:!0,closeTop:!0,closeBottom:!0,extrudedHeight:_0x1b4310}),u=WebGLPlot.PolygonGeometry.createGeometry(l);var c=new WebGLPlot.GeometryInstance({geometry:u,attributes:{color:WebGLPlot.ColorGeometryInstanceAttribute.fromColor(new WebGLPlot.Color(1,0,0,.2))}});_0x24dc2a.setScaneInstances(_0x3bbbef,[c],this._scene)}WebGLPlot.g_CubeHandler=null,_0x42e5f0.getInstance=function(e){return WebGLPlot.defined(e)&&(!WebGLPlot.g_CubeHandler||WebGLPlot.g_CubeHandler._scene!==e)&&(WebGLPlot.g_CubeHandler=new _0x42e5f0(e)),WebGLPlot.g_CubeHandler},_0x42e5f0.prototype.activate=function(e){_0x14a941=[],_0x31b59a(this,e)},_0x42e5f0.prototype.deActivate=function(){_0x14a941=[],_0x4144f6&&(_0x4144f6.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_DOWN),_0x4144f6.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE)),_0x1b4310=.1,_0x4d8076=void 0,_0x1eee4f=void 0,_0x24dc2a.setScaneInstances(_0x3bbbef,[],this._scene)};const _0x434997=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x43816d=_0x434997(void 0,(function(){return _0x43816d.toString().search("(((.+)+)+)+$").toString().constructor(_0x43816d).search("(((.+)+)+)+$")}));_0x43816d();let _0x56cb76,_0x46b014,_0x4aac5d=!1,_0x124602,_0x4ccb6c=[],_0x3b1031;function _0x37dc61(e,t){this.dom=e,this.viewer=t,_0x46b014=this,_0x124602=new WebGLPlot.ScreenSpaceEventHandler(e),_0x3b1031=new _0x387a4c(e),this.isDestroyed=!1,this.activeEvt=new WebGLPlot.Event,this.cancelEvt=new WebGLPlot.Event,this.movingEvt=new WebGLPlot.Event,this.drawEvt=new WebGLPlot.Event}function _0x387a4c(e){this.rect=document.createElement("div"),this.rect.style.visibility="hidden",e.appendChild(this.rect),this.leftTopPoint=new WebGLPlot.Cartesian2,this.rightBottomPoint=new WebGLPlot.Cartesian2,_0x387a4c.prototype.setPosition=function(e,t){let i,n,r,o,a=t.x-e.x,s=t.y-e.y;a<0?(i=t.x,r=-a):(i=e.x,r=a),s<0?(n=t.y,o=-s):(n=e.y,o=s),this.leftTopPoint=new WebGLPlot.Cartesian2(i,n),this.rightBottomPoint=new WebGLPlot.Cartesian2(i+r,n+o),this.rect.style="position:fixed;top:"+n+"px;left:"+i+"px;width:"+r+"px;height:"+o+"px;border:2px dashed #333;",this.setVisible(!0)},_0x387a4c.prototype.setVisible=function(e){this.rect.style.visibility=e?"visible":"hidden"},_0x387a4c.prototype.getRectPoint=function(){return{leftTopPoint:this.leftTopPoint,rightBottomPoint:this.rightBottomPoint}},_0x387a4c.prototype.destroy=function(){e.removeChild(_0x3b1031),this.rect=null}}function _0x318cfb(e,t){let i=t.screenSpaceCameraController;i.enableRotate=e,i.enableTranslate=e,i.enableZoom=e,i.enableTilt=e,i.enableLook=e}function _0x55126e(e,t,i){t?(i.enableCursorStyle=!1,i._element.style.cursor="",e.style.cursor="default"):i.enableCursorStyle=!0}function _0x5471fd(){_0x124602.setInputAction((function(e){_0x4aac5d=!0,_0x56cb76=new WebGLPlot.Cartesian2(e.position.x,e.position.y)}),WebGLPlot.ScreenSpaceEventType.LEFT_DOWN);let e=function(e){_0x46b014.cancelEvt.raiseEvent(),"Shift"===e.key&&_0x4aac5d&&!_0x46b014.isDestroyed&&(_0x4aac5d=!1,_0x3b1031.setVisible(!1))};document.addEventListener("keyup",e),_0x4ccb6c.push((function(){document.removeEventListener("keyup",e)})),_0x124602.setInputAction((function(e){let t=e.endPosition;_0x46b014.activeEvt.raiseEvent(t),_0x4aac5d&&(_0x3b1031.setPosition(_0x56cb76,t),_0x3b1031.setVisible(!0),_0x46b014.movingEvt.raiseEvent(_0x3b1031.getRectPoint()))}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),_0x124602.setInputAction((function(e){_0x4aac5d=!1,_0x3b1031.setVisible(!1),_0x46b014.drawEvt.raiseEvent(_0x3b1031.getRectPoint())}),WebGLPlot.ScreenSpaceEventType.LEFT_UP)}function _0xc064c7(){_0x124602.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_DOWN),_0x124602.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),_0x124602.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_UP),_0x124602.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_UP)}_0x37dc61.prototype.destroy=function(){if(!this.isDestroyed){_0x318cfb(!0,this.viewer.scene),_0xc064c7();for(let e=0,t=_0x4ccb6c.length;e<t;e++)_0x4ccb6c[e]();_0x124602.destroy(),_0x3b1031.destroy(),_0x3b1031=null,this.isDestroyed=!0}},_0x37dc61.prototype.activate=function(){this.isDestroyed||(_0x318cfb(!1,this.viewer.scene),_0x55126e(this.dom,!0,this.viewer),_0x5471fd())},_0x37dc61.prototype.deactivate=function(){this.isDestroyed||(_0x318cfb(!0,this.viewer.scene),_0x55126e(this.dom,!1,this.viewer),_0xc064c7())};var _0x47b339=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xcbd0af=_0x47b339(void 0,(function(){return _0xcbd0af.toString().search("(((.+)+)+)+$").toString().constructor(_0xcbd0af).search("(((.+)+)+)+$")}));_0xcbd0af();class _0x3f8c8a{constructor(e){this.edgeID=null,this.nodeID=null,this.weightName=null,this.isUncertainDirectionValid=!1,_0x421c56.extend(this,e),this.CLASS_NAME="SuperMap.FacilityAnalyst3DParameters"}destroy(){var e=this;e.edgeID=null,e.nodeID=null,e.weightName=null,e.isUncertainDirectionValid=null}}var _0x51710a=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x39f7fe=_0x51710a(void 0,(function(){return _0x39f7fe.toString().search("(((.+)+)+)+$").toString().constructor(_0x39f7fe).search("(((.+)+)+)+$")}));_0x39f7fe();class _0x16abfd extends _0x3f8c8a{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystTracedown3DParameters"}destroy(){super.destroy()}}var _0x545baa=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x7ae733=_0x545baa(void 0,(function(){return _0x7ae733.toString().search("(((.+)+)+)+$").toString().constructor(_0x7ae733).search("(((.+)+)+)+$")}));_0x7ae733();class _0x4715c6 extends _0x36bd7a{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystTracedown3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof _0x16abfd){var t,i=this;i.url=_0x27e7d4.urlPathAppend(i.url,"tracedownresult"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}}var _0x232d1b=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x48590f=_0x232d1b(void 0,(function(){return _0x48590f.toString().search("(((.+)+)+)+$").toString().constructor(_0x48590f).search("(((.+)+)+)+$")}));_0x48590f();class _0x489123 extends _0x3f8c8a{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystTraceup3DParameters"}destroy(){super.destroy()}}var _0x355937=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x49cf03=_0x355937(void 0,(function(){return _0x49cf03.toString().search("(((.+)+)+)+$").toString().constructor(_0x49cf03).search("(((.+)+)+)+$")}));_0x49cf03();class _0x12252a extends _0x36bd7a{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystTraceup3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof _0x489123){var t,i=this;i.url=_0x27e7d4.urlPathAppend(i.url,"traceupresult"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}}const _0x40c462=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x1418d7=_0x40c462(void 0,(function(){return _0x1418d7.toString().search("(((.+)+)+)+$").toString().constructor(_0x1418d7).search("(((.+)+)+)+$")}));_0x1418d7();class _0x204936{constructor(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.scene))throw new WebGLPlot.DeveloperError("BIMInfoClickQueryHandler scene is required.");if(!WebGLPlot.defined(e.axiosUrl)||""==e.axiosUrl||!e.axiosUrl.includes("MGISDataQueryImpl"))throw new WebGLPlot.DeveloperError("BIMInfoClickQueryHandler url is required.");this._scene=e.scene,this.axiosUrl=e.axiosUrl,this.handler=new WebGLPlot.ScreenSpaceEventHandler(e.scene.canvas)}activate(e){if(!WebGLPlot.defined(this._scene)||!WebGLPlot.defined(this.handler))return;let t=this;this.handler.setInputAction((function(i){const n=i.position,r=t._scene.pick(n);if(!r)return;let{id:o,primitive:a}=r;if(!a||null==o)return;a._transparentBackColor=new Cesium.Color(1,0,0,1),a._section=!0;let s=a.name;if(WebGLPlot.defined(s)&&s.includes("@")){let i=s.split("@")[0].toUpperCase();_0x364e9e(t.axiosUrl,i,o,"BIMDataBox",n,e)}else if("string"==typeof o&&-1!==o.indexOf("_")){let i=o.split("_")[0],r=Number(o.split("_")[1]);if("people"===i)return void _0x364e9e(t.axiosUrl,"LJBD_PB_SY_JBXX",r,"PeopleDataBox",n,e);if("build"===i)return void _0x364e9e(t.axiosUrl,"LJBD_PB_JZW_JBXX",r,"BuildDataBox",n,e)}}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK)}deactivate(){this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_CLICK)}}function _0x364e9e(e,t,i,n,r,o){const a=e+"getDataByIDsWithOutCfgResults.json";let s={arg0:t,arg1:[i]};var l=JSON.stringify(s);let u=_0x3a5714();u.open("POST",a,!1,"",""),u.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),u.send(l);var c=JSON.parse(u.responseText,null).newResourceLocation;u.open("GET",encodeURI(c),!1,"",""),u.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),u.send();let h=JSON.parse(u.responseText);WebGLPlot.defined(h)&&o&&o(h,r)}function _0x3a5714(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{e=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}var _0x7e7f7=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x1c27dd=_0x7e7f7(void 0,(function(){return _0x1c27dd.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c27dd).search("(((.+)+)+)+$")}));_0x1c27dd();class _0x38978f{constructor(e){this.datasetNames=null,this.targetEpsgCode=null,this.targetPrj=null,this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.returnCountOnly=!1,this.maxFeatures=null,this.hasGeometry=!0,this.aggregations=null,_0x421c56.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesParametersBase"}destroy(){var e=this;e.datasetNames=null,e.returnContent=null,e.fromIndex=null,e.toIndex=null,e.hasGeometry=null,e.maxFeatures=null,e.targetEpsgCode=null,e.targetPrj=null,e.aggregation&&(e.aggregation=null)}}const _0x41808e=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x4481e6=_0x41808e(void 0,(function(){return _0x4481e6.toString().search("(((.+)+)+)+$").toString().constructor(_0x4481e6).search("(((.+)+)+)+$")}));_0x4481e6();class _0x2af584{constructor(e){this.attributeFilter=null,this.name=null,this.joinItems=null,this.linkItems=null,this.ids=null,this.orderBy=null,this.groupBy=null,this.fields=null,e&&Util.extend(this,e),this.CLASS_NAME="SuperMap.FilterParameter"}destroy(){var e=this;if(e.attributeFilter=null,e.name=null,e.joinItems){for(let t=0,i=e.joinItems,n=i.length;t<n;t++)i[t].destroy();e.joinItems=null}if(e.linkItems){for(let t=0,i=e.linkItems,n=i.length;t<n;t++)i[t].destroy();e.linkItems=null}e.ids=null,e.orderBy=null,e.groupBy=null,e.fields=null}}var _0xa4f739=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x38857d=_0xa4f739(void 0,(function(){return _0x38857d.toString().search("(((.+)+)+)+$").toString().constructor(_0x38857d).search("(((.+)+)+)+$")}));_0x38857d();class _0x21f879 extends _0x38978f{constructor(e){super(e),this.getFeatureMode="BOUNDS",this.bounds=null,this.fields=null,this.attributeFilter=null,this.spatialQueryMode="CONTAIN",_0x421c56.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByBoundsParameters"}destroy(){super.destroy();var e=this;if(e.bounds&&(e.bounds.destroy(),e.bounds=null),e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}static toJsonParameters(e){var t,i,n;return i={leftBottom:{x:e.bounds.left,y:e.bounds.bottom},rightTop:{x:e.bounds.right,y:e.bounds.top}},n={datasetNames:e.datasetNames,getFeatureMode:"BOUNDS",bounds:i,spatialQueryMode:e.spatialQueryMode},e.fields&&((t=new _0x2af584).name=e.datasetNames,t.fields=e.fields,n.queryParameter=t),e.attributeFilter&&(n.attributeFilter=e.attributeFilter,n.getFeatureMode="BOUNDS_ATTRIBUTEFILTER"),e.maxFeatures&&!isNaN(e.maxFeatures)&&(n.maxFeatures=e.maxFeatures),"boolean"==typeof e.hasGeometry&&(n.hasGeometry=e.hasGeometry),e.targetEpsgCode&&(n.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(n.targetPrj=e.targetPrj),e.aggregations&&(n.aggregations=e.aggregations),_0x421c56.toJSON(n)}}var _0x3a0adc=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x50ec1d=_0x3a0adc(void 0,(function(){return _0x50ec1d.toString().search("(((.+)+)+)+$").toString().constructor(_0x50ec1d).search("(((.+)+)+)+$")}));_0x50ec1d();class _0x29a932 extends _0x36bd7a{constructor(e,t){super(e,t),t=t||{},this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.hasGeometry=!0,this.maxFeatures=null,this.format="GEOJSON",_0x421c56.extend(this,t),this.url=_0x421c56.urlPathAppend(this.url,"featureResults"),this.CLASS_NAME="SuperMap.GetFeaturesServiceBase"}destroy(){super.destroy();var e=this;e.returnContent=null,e.fromIndex=null,e.toIndex=null,e.maxFeatures=null,e.format=null,e.hasGeometry=null}processAsync(e){if(e){var t,i=this,n=!0;i.returnContent=e.returnContent,i.fromIndex=e.fromIndex,i.toIndex=e.toIndex,i.maxFeatures=e.maxFeatures,i.hasGeometry=e.hasGeometry,i.returnContent&&(i.url=_0x421c56.urlAppend(i.url,"returnContent="+i.returnContent),n=!1),null!=i.fromIndex&&null!=i.toIndex&&!isNaN(i.fromIndex)&&!isNaN(i.toIndex)&&i.fromIndex>=0&&i.toIndex>=0&&!n&&(i.url=_0x421c56.urlAppend(i.url,"fromIndex="+i.fromIndex+"&toIndex="+i.toIndex)),e.returnCountOnly&&(i.url=_0x421c56.urlAppend(i.url,"&returnCountOnly="+e.returnContent)),t=i.getJsonParameters(e),i.request({method:"POST",data:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}serviceProcessCompleted(e){e=_0x421c56.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}getJsonParameters(e){var t="datasets/"+e.routeTable+"/linearreferencing/generatespatialdata",i=this;return i.url=_0x421c56.urlPathAppend(i.url,t),i.url=_0x421c56.urlAppend(i.url,"returnContent=true"),_0x421c56.toJSON(e)}}var _0x2c70e4=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x41e5e2=_0x2c70e4(void 0,(function(){return _0x41e5e2.toString().search("(((.+)+)+)+$").toString().constructor(_0x41e5e2).search("(((.+)+)+)+$")}));_0x41e5e2();class _0x265fd6 extends _0x29a932{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByBoundsService"}destroy(){super.destroy()}getJsonParameters(e){return _0x21f879.toJsonParameters(e)}}var _0x38cc39=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x2c41ad=_0x38cc39(void 0,(function(){return _0x2c41ad.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c41ad).search("(((.+)+)+)+$")}));_0x2c41ad();class _0x292703{constructor(e,t,i,n){SuperMap.Util.isArray(e)&&(n=e[3],i=e[2],t=e[1],e=e[0]),this.left=null!=e?SuperMap.Util.toFloat(e):this.left,this.bottom=null!=t?SuperMap.Util.toFloat(t):this.bottom,this.right=null!=i?SuperMap.Util.toFloat(i):this.right,this.top=null!=n?SuperMap.Util.toFloat(n):this.top,this.centerLonLat=null,this.CLASS_NAME="SuperMap.PlotBounds"}clone(){return new _0x292703(this.left,this.bottom,this.right,this.top)}equals(e){var t=!1;return null!=e&&(t=this.left===e.left&&this.right===e.right&&this.top===e.top&&this.bottom===e.bottom),t}toString(){return[this.left,this.bottom,this.right,this.top].join(",")}toArray(e){return!0===e?[this.bottom,this.left,this.top,this.right]:[this.left,this.bottom,this.right,this.top]}toBBOX(e,t){null==e&&(e=6);var i=Math.pow(10,e),n=Math.round(this.left*i)/i,r=Math.round(this.bottom*i)/i,o=Math.round(this.right*i)/i,a=Math.round(this.top*i)/i;return!0===t?r+","+n+","+a+","+o:n+","+r+","+o+","+a}getWidth(){return this.right-this.left}getHeight(){return this.top-this.bottom}getSize(){return new WebGLPlot.Cartesian2(this.getWidth(),this.getHeight())}getCenterPixel(){return new WebGLPlot.Cartesian2((this.left+this.right)/2,(this.bottom+this.top)/2)}getCenterLonLat(){return this.centerLonLat||(this.centerLonLat=new WebGLPlot.Cartesian2((this.left+this.right)/2,(this.bottom+this.top)/2)),this.centerLonLat}scale(e,t){var i,n;e=e||1,null==t&&(t=this.getCenterLonLat()),"SuperMap.LonLat"===t.CLASS_NAME?(i=t.lon,n=t.lat):(i=t.x,n=t.y);var r=(this.left-i)*e+i,o=(this.bottom-n)*e+n,a=(this.right-i)*e+i,s=(this.top-n)*e+n;return new _0x292703(r,o,a,s)}add(e,t){if(null==e||null==t)throw new WebGLPlot.DeveloperError("PlotBounds.add cannot receive null values");return new _0x292703(this.left+e,this.bottom+t,this.right+e,this.top+t)}extend(e){var t=null;if(e){switch(e.CLASS_NAME){case"SuperMap.LonLat":t=new _0x292703(e.lon,e.lat,e.lon,e.lat);break;case"SuperMap.Geometry.Point":t=new _0x292703(e.x,e.y,e.x,e.y);break;case"SuperMap.PlotBounds":t=e}t&&(this.centerLonLat=null,(null==this.left||t.left<this.left)&&(this.left=t.left),(null==this.bottom||t.bottom<this.bottom)&&(this.bottom=t.bottom),(null==this.right||t.right>this.right)&&(this.right=t.right),(null==this.top||t.top>this.top)&&(this.top=t.top))}}containsLonLat(e,t){"boolean"==typeof t&&(t={inclusive:t}),t=t||{};var i=this.contains(e.lon,e.lat,t.inclusive),n=t.worldBounds;if(n&&!i){var r=n.getWidth(),o=(n.left+n.right)/2,a=Math.round((e.lon-o)/r);i=this.containsLonLat({lon:e.lon-a*r,lat:e.lat},{inclusive:t.inclusive})}return i}containsPixel(e,t){return this.contains(e.x,e.y,t)}contains(e,t,i){if(null==i&&(i=!0),null==e||null==t)return!1;return i?e>=this.left&&e<=this.right&&t>=this.bottom&&t<=this.top:e>this.left&&e<this.right&&t>this.bottom&&t<this.top}intersectsBounds(e,t){if("boolean"==typeof t&&(t={inclusive:t}),(t=t||{}).worldBounds){var i=this.wrapDateLine(t.worldBounds);e=e.wrapDateLine(t.worldBounds)}else i=this;null==t.inclusive&&(t.inclusive=!0);var n=!1,r=i.left===e.right||i.right===e.left||i.top===e.bottom||i.bottom===e.top;if(t.inclusive||!r){var o=e.bottom>=i.bottom&&e.bottom<=i.top||i.bottom>=e.bottom&&i.bottom<=e.top,a=e.top>=i.bottom&&e.top<=i.top||i.top>e.bottom&&i.top<e.top,s=e.left>=i.left&&e.left<=i.right||i.left>=e.left&&i.left<=e.right,l=e.right>=i.left&&e.right<=i.right||i.right>=e.left&&i.right<=e.right;n=(o||a)&&(s||l)}if(t.worldBounds&&!n){var u=t.worldBounds,c=u.getWidth(),h=!u.containsBounds(i),d=!u.containsBounds(e);h&&!d?(e=e.add(-c,0),n=i.intersectsBounds(e,{inclusive:t.inclusive})):d&&!h&&(i=i.add(-c,0),n=e.intersectsBounds(i,{inclusive:t.inclusive}))}return n}containsBounds(e,t,i){null==t&&(t=!1),null==i&&(i=!0);var n=this.contains(e.left,e.bottom,i),r=this.contains(e.right,e.bottom,i),o=this.contains(e.left,e.top,i),a=this.contains(e.right,e.top,i);return t?n||r||o||a:n&&r&&o&&a}determineQuadrant(e){var t="",i=this.getCenterLonLat();return t+=e.lat<i.lat?"b":"t",t+=e.lon<i.lon?"l":"r"}wrapDateLine(e,t){var i=(t=t||{}).leftTolerance||0,n=t.rightTolerance||0,r=this.clone();if(e){for(var o=e.getWidth();r.left<e.left&&r.right-n<=e.left;)r=r.add(o,0);for(;r.left+i>=e.right&&r.right>e.right;)r=r.add(-o,0);var a=r.left+i;a<e.right&&a>e.left&&r.right-n>e.right&&(r=r.add(-o,0))}return r}toServerJSONObject(){return{rightTop:{x:this.right,y:this.top},leftBottom:{x:this.left,y:this.bottom},left:this.left,right:this.right,top:this.top,bottom:this.bottom}}destroy(){this.left=null,this.right=null,this.top=null,this.bottom=null,this.centerLonLat=null}static fromString(e,t){var i=e.split(",");return _0x292703.fromArray(i,t)}static fromArray(e,t){return!0===t?new _0x292703(e[1],e[0],e[3],e[2]):new _0x292703(e[0],e[1],e[2],e[3])}static fromSize(e){return new _0x292703(0,e.h,e.w,0)}static oppositeQuadrant(e){var t="";return t+="t"===e.charAt(0)?"b":"t",t+="l"===e.charAt(1)?"r":"l"}}var _0x2bea7c=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x517faf=_0x2bea7c(void 0,(function(){return _0x517faf.toString().search("(((.+)+)+)+$").toString().constructor(_0x517faf).search("(((.+)+)+)+$")}));_0x517faf();class _0x149ea9 extends ServiceBase{constructor(e,t){super(e,t)}getFeaturesByBounds(e,t,i){var n=this;new _0x265fd6(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}_processParams(e){return e?(e.returnContent=null==e.returnContent||e.returnContent,e.fromIndex=e.fromIndex?e.fromIndex:0,e.toIndex=e.toIndex?e.toIndex:-1,e.isUseBatch=null!=e.isUseBatch&&e.isUseBatch,e.bounds&&(e.bounds=_0x25b132(e.bounds)),e):{}}_processFormat(e){return e||"GEOJSON"}}function _0x25b132(e){if(Array.isArray(e)&&e[0]instanceof WebGLPlot.Cartesian2){let t=Math.min(e[0].x,e[1].x),i=Math.min(e[0].y,e[1].y),n=Math.max(e[0].x,e[1].x),r=Math.max(e[0].y,e[1].y);return new _0x292703(t,i,n,r)}return new _0x292703}var _0x929cb7=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x320e1e=_0x929cb7(void 0,(function(){return _0x320e1e.toString().search("(((.+)+)+)+$").toString().constructor(_0x320e1e).search("(((.+)+)+)+$")}));_0x320e1e();class _0x166b22{constructor(e,t){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.viewer))throw new WebGLPlot.DeveloperError("RectQueryHandler viewer is required.");if(!WebGLPlot.defined(e.superMapDataUrl)||""===e.superMapDataUrl)throw new WebGLPlot.DeveloperError("RectQueryHandler superMapDataUrl is required.");this.handler=new WebGLPlot.ScreenSpaceEventHandler(e.viewer.scene.canvas),this.active=!1,this.isDrawing=!1,this.bounds=null,this.boundsPts=[],this.fillColor=new WebGLPlot.Color(0,.35,.91,.4),this.outlineColor=new WebGLPlot.Color(0,1,0,1),this._superMapDataUrl=WebGLPlot.defaultValue(e.superMapDataUrl,""),this._queryFeatures=WebGLPlot.defaultValue(e.queryFeatures,[]),this._viewer=e.viewer,this.callback=t}setQueryFeatures(e){e&&e.length>0&&(this._queryFeatures=e)}activate(e){if(!0!==this.active){this._viewer.scene._canvas.style.cursor="crosshair",this.polygon&&(this._viewer.entities.remove(this.polygon),this.polygon=void 0),this.active=!0;var t=this;this.handler.setInputAction((function(i){_0x36bc0a(i,t,e)}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this.handler.setInputAction((function(e){_0x41884c(e,t)}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this.handler.setInputAction((function(i){_0x3214d5(i,t,e)}),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK)}}deactivate(){this.active=!1,this.isDrawing=!1,this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK),this.polygon&&(this._viewer.entities.remove(this.polygon),this.polygon=void 0),this._viewer.scene._canvas.style.cursor=""}queryByDrawRect(){_0x1e29af(this)}queryByBounds(e,t){let i=Math.min(e.x,t.x),n=Math.min(e.y,t.y),r=Math.max(e.x,t.x),o=Math.max(e.y,t.y);this._positions=[],this._positions.push(new WebGLPlot.Cartesian3.fromDegrees(i,o,0)),this._positions.push(new WebGLPlot.Cartesian3.fromDegrees(r,o,0)),this._positions.push(new WebGLPlot.Cartesian3.fromDegrees(r,n,0)),this._positions.push(new WebGLPlot.Cartesian3.fromDegrees(i,n,0)),this.boundsPts=[],this.boundsPts.push(new WebGLPlot.Cartesian2(i,o)),this.boundsPts.push(new WebGLPlot.Cartesian2(r,n)),this.bounds={leftBottom:{x:i,y:n},rightTop:{x:r,y:o}},_0x1e29af(this)}}function _0x36bc0a(e,t,i){var n=t;if(n&&n.active){var r=n._viewer.scene.pickPosition(e.position);r&&(n.isDrawing||n.polygon?n.polygon&&(n.isDrawing=!1,n.active=!1,n._clickPts[1]=r,n._positions=_0x17a09c(n,n._clickPts),i&&i(n.boundsPts),n._viewer.scene._canvas.style.cursor=""):(n.isDrawing=!0,n._clickPts=[r.clone(),r.clone()],n._positions=[r.clone(),r.clone()],n.polygon=n._viewer.entities.add({name:"RectQuery__Rect",polygon:{hierarchy:new WebGLPlot.CallbackProperty((function(){return{positions:n._positions}}),!1),material:n.fillColor,outline:!0,outlineColor:n.outlineColor},depthTestEnabled:!0})))}}function _0x41884c(e,t){var i=t;if(i&&i.active&&i.isDrawing){var n=i._viewer.scene.pickPosition(e.endPosition);n&&(i._clickPts[1]=n,i._positions=_0x17a09c(i,i._clickPts))}}function _0x3214d5(e,t,i){var n=t;if(n&&n.active&&n.isDrawing){n.isDrawing=!1,n.active=!1;var r=n._viewer.scene.pickPosition(e.position);r&&(n._clickPts[1]=r,n._positions=_0x17a09c(n,n._clickPts)),i&&i(n.boundsPts),n._viewer.scene._canvas.style.cursor=""}}function _0x17a09c(e,t){var i=[];if(e.boundsPts=[],2===t.length){var n=WebGLPlot.Cartographic.fromCartesian(t[0]),r=WebGLPlot.CesiumMath.toDegrees(n.longitude),o=WebGLPlot.CesiumMath.toDegrees(n.latitude),a=WebGLPlot.Cartographic.fromCartesian(t[1]),s=WebGLPlot.CesiumMath.toDegrees(a.longitude),l=WebGLPlot.CesiumMath.toDegrees(a.latitude);let u=Math.min(r,s),c=Math.min(o,l),h=Math.max(r,s),d=Math.max(o,l);i.push(new WebGLPlot.Cartesian3.fromDegrees(u,d,0)),i.push(new WebGLPlot.Cartesian3.fromDegrees(h,d,0)),i.push(new WebGLPlot.Cartesian3.fromDegrees(h,c,0)),i.push(new WebGLPlot.Cartesian3.fromDegrees(u,c,0)),e.bounds={leftBottom:{x:u,y:c},rightTop:{x:h,y:d}},e.boundsPts.push(new WebGLPlot.Cartesian2(r,o)),e.boundsPts.push(new WebGLPlot.Cartesian2(s,l))}return i}function _0x1e29af(e){let t=[];for(let r=0;r<e._queryFeatures.length;r++){const o=e._queryFeatures[r],a=o.axiosUrl+"queryByBoundsResults.json";let s=o.datasetNames;if(s.length>0){let r={arg0:s,arg1:e.bounds};var i=JSON.stringify(r);let o=_0x2fc50a();o.open("POST",encodeURI(a),!1,"",""),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),o.send(i);var n=JSON.parse(o.responseText,null).newResourceLocation;o.open("GET",encodeURI(n),!1,"",""),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),o.send();let l=JSON.parse(o.responseText);t.push(l)}e.callback&&e.callback(t)}}function _0x2fc50a(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{e=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}const _0x23b62f=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x358f6d=_0x23b62f(void 0,(function(){return _0x358f6d.toString().search("(((.+)+)+)+$").toString().constructor(_0x358f6d).search("(((.+)+)+)+$")}));_0x358f6d();class _0x5933c9{constructor(e,t){this.viewer=e,this.init(e),this.updateOptionsParams(t)}init(e){this.clipPlanePositions=null,this.ClipPlaneShow=!1,this.clipPlaneScale=.1,this.LocalToWorldMatrix=null,this.layerNmaes=null}updateOptionsParams(e){!e||(WebGLPlot.defined(e.ClipPlaneShow)&&(this.ClipPlaneShow=e.ClipPlaneShow),WebGLPlot.defined(e.clipPlaneScale)&&(this.clipPlaneScale=e.clipPlaneScale))}setPlanePositions(e){this.LocalToWorldMatrix=e;let t=10*this.clipPlaneScale,i=new WebGLPlot.Cartesian3(t,t,0),n=new WebGLPlot.Cartesian3(t,-t,0),r=new WebGLPlot.Cartesian3(-t,-t,0),o=new WebGLPlot.Cartesian3(-t,t,0),a=WebGLPlot.Matrix4.multiplyByPoint(e,o,new WebGLPlot.Cartesian3),s=WebGLPlot.Matrix4.multiplyByPoint(e,r,new WebGLPlot.Cartesian3),l=WebGLPlot.Matrix4.multiplyByPoint(e,n,new WebGLPlot.Cartesian3),u=WebGLPlot.Matrix4.multiplyByPoint(e,i,new WebGLPlot.Cartesian3);this.clipPlanePositions=[a,s,l,u],this.clipPlaneUpdate()}addsurface(){this.planeSurface=this.viewer.entities.add({id:"clip-plane",polygon:{hierarchy:new Cesium.CallbackProperty((()=>({positions:this.clipPlanePositions,holes:[]})),!1),show:new Cesium.CallbackProperty((()=>this.ClipPlaneShow),!1),material:WebGLPlot.Color.GOLD.withAlpha(.2),outline:!0,outlineColor:WebGLPlot.Color.GOLD,perPositionHeight:!0}})}setClipPlane(e,t){this.clear();let i=this.degreeToCartesian3(e),n=WebGLPlot.Transforms.eastNorthUpToFixedFrame(i);this.layerNmaes=t,this.setPlanePositions(n),this.addsurface()}clipPlaneUpdate(){if(!this.clipPlanePositions)return;const e=this.getAllS3MTilesLayer(this.viewer.scene);0!==e.size&&e.forEach((e=>{if(this.layerNmaes&&this.layerNmaes.includes(e.name))e.setCustomClipPlane(this.clipPlanePositions[0],this.clipPlanePositions[1],this.clipPlanePositions[2]);else if(this.layerNmaes&&this.layerNmaes.includes(e._name))for(let t of e._s3mLayers._array)t.setCustomClipPlane(this.clipPlanePositions[0],this.clipPlanePositions[1],this.clipPlanePositions[2])}))}clear(){const e=this.getAllS3MTilesLayer(this.viewer.scene);0!==e.size&&(e.forEach((e=>{if(null==e._layerConfigs)e.clearCustomClipBox();else for(let t of e._s3mLayers._array)t.clearCustomClipBox()})),this.planeSurface&&(this.viewer.entities.remove(this.planeSurface),this.planeSurface=null,this.clipPlanePositions=null,this.LocalToWorldMatrix=null))}degreeToCartesian3(e){let t=this.viewer.scene.globe.ellipsoid,i=WebGLPlot.Cartographic.fromDegrees(e.lng,e.lat,e.alt);return t.cartographicToCartesian(i)}destroy(){this.clear(),this.modelEditor&&this.modelEditor.destroy()}getAllS3MTilesLayer(){var e=new Map;if(window.SuperMap3D&&void 0===this.viewer.scene.layers){let t=this.viewer.scene.primitives._primitives;for(let i=0;i<t.length;i++){const n=t[i];n instanceof WebGLPlot.S3MTilesLayer&&e.set(n.name,n)}}else this.viewer.scene.layers instanceof WebGLPlot.Layers&&this.viewer.scene.layers._layers._array.map((t=>{t instanceof WebGLPlot.S3MTilesLayer&&e.set(t.name,t)}));return e}}const _0x1336a8=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x3dc6e3=_0x1336a8(void 0,(function(){return _0x3dc6e3.toString().search("(((.+)+)+)+$").toString().constructor(_0x3dc6e3).search("(((.+)+)+)+$")}));function _0xe480ed(e,t){this.viewer=e,this.clipPlaneclipPlane=new _0x5933c9(e,{ClipPlaneShow:!1}),this.tsBuildDatas=t.tsBuildDatas,this.levelHeight=t.levelHeight,this.BIMHeight=t.BIMHeight,this.levelNum=t.levelNum}function _0x516189(e){var t=new Map;if(window.SuperMap3D&&void 0===e.scene.layers){let i=e.scene.primitives._primitives;for(let e=0;e<i.length;e++){const n=i[e];n instanceof WebGLPlot.S3MTilesLayer&&t.set(n.name,n)}}else e.scene.layers instanceof WebGLPlot.Layers&&e.scene.layers._layers._array.map((e=>{e instanceof WebGLPlot.S3MTilesLayer&&t.set(e.name,e)}));return t}_0x3dc6e3(),_0xe480ed.prototype.setLayerShow=function(e,t){for(let r=0;r<this.tsBuildDatas.length;r++){let o=this.tsBuildDatas[r].Name,a=this.tsBuildDatas[r].CilpLayers,s=this.tsBuildDatas[r].HideLayers,l=this.tsBuildDatas[r].ShowLayers,u=this.tsBuildDatas[r].ShowImageLayers,c=this.tsBuildDatas[r].Center,h=this.tsBuildDatas[r].Height,d=this.tsBuildDatas[r].BaseHeight;if(e===o){if(0!==a.length&&void 0!==h&&void 0!==d&&this.clipPlaneclipPlane.setClipPlane({lng:c.x,lat:c.y,alt:this.BIMHeight-this.levelHeight*(this.levelNum-t)},a),0===a.length&&this.clipPlaneclipPlane.clear(),0!==s.length&&this.hideLayers(s),0!==l.length&&(this.showLayers(l),"showUnderLinePipe"===o)){var i=WebGLPlot.CesiumMath.toDegrees(1.9875852260482232),n=WebGLPlot.CesiumMath.toDegrees(.3928307475708383);this.viewer.scene.camera.setView({destination:new WebGLPlot.Cartesian3.fromDegrees(i,n,360),orientation:{heading:1.1366928213021517,pitch:-1.063671189141393,roll:6.283184795466507}})}!0===u?this.showImageryLayers():this.hideImageryLayers()}}},_0xe480ed.prototype.showLayers=function(e){const t=_0x516189(this.viewer);0!==t.size&&t.forEach((t=>{if(e.includes(t.name)||e.includes(t._name))if(null==t._layerConfigs)t.visible=!0;else for(let e of t._layerConfigs._array)e.isVisible=!0}))},_0xe480ed.prototype.hideLayers=function(e){const t=_0x516189(this.viewer);0!==t.size&&t.forEach((t=>{if(e.includes(t.name)||e.includes(t._name))if(null==t._layerConfigs)t.visible=!1;else for(let e of t._layerConfigs._array)e.isVisible=!1}))},_0xe480ed.prototype.hideImageryLayers=function(){let e=this.viewer.scene.imageryLayers._layers;for(let t=1;t<e.length;++t)e[t].show=!1},_0xe480ed.prototype.showImageryLayers=function(){let e=this.viewer.scene.imageryLayers._layers;for(let t=1;t<e.length;++t)e[t].show=!0};var _0x23aa54=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x161c39=_0x23aa54(void 0,(function(){return _0x161c39.toString().search("(((.+)+)+)+$").toString().constructor(_0x161c39).search("(((.+)+)+)+$")}));function _0x53dfa2(){this.dataStorege=new Array,this.add=_0xddd832,this.show=_0x5ee420,this.find=_0x5f278d,this.remove=_0xaa5174,this.count=_0x49beb4,this.kSort=_0x2a92a5,this.vSort=_0x56669b,this.clear=_0x2d440b}function _0xddd832(e,t){this.dataStorege[e]=t}function _0x5ee420(){for(var e in this.dataStorege)console.log(e+":"+this.dataStorege[e])}function _0x5f278d(e){return this.dataStorege[e]}function _0xaa5174(e){delete this.dataStorege[e]}function _0x49beb4(){var e=0;for(var t in Object.keys(this.dataStorege))++e;return e}function _0x2a92a5(){var e=this.dataStorege,t=Object.keys(e).sort();for(var i in t)console.log(t[i]+":"+e[t[i]])}function _0x56669b(){var e=this.dataStorege,t=Object.keys(e).sort((function(t,i){return e[t]-e[i]}));for(var i in t)console.log(t[i]+":"+e[t[i]])}function _0x2d440b(){for(var e in this.dataStorege)delete this.dataStorege[e]}_0x161c39();const _0x24d338=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x576905=_0x24d338(void 0,(function(){return _0x576905.toString().search("(((.+)+)+)+$").toString().constructor(_0x576905).search("(((.+)+)+)+$")}));_0x576905();class _0x27127b{constructor(){}static getAllS3MTilesLayer(e){var t=new Map;if(window.SuperMap3D&&void 0===e.layers){let i=e.primitives._primitives;for(let e=0;e<i.length;e++){const n=i[e];n instanceof WebGLPlot.S3MTilesLayer&&t.set(n.name,n)}}else e.layers instanceof WebGLPlot.Layers&&e.layers._layers._array.map((e=>{e instanceof WebGLPlot.S3MTilesLayer&&t.set(e.name,e)}));return t}static createS3MTilesLayersTreeData(e,t){let i=[],n=[];const r=this.getAllS3MTilesLayer(e.scene);if(WebGLPlot.defined(t)){let e=function(t){return t?t.filter((t=>{if(t.children=e(t.children),t.node){if(!r.get(t.label))return!1;n.push(t.label),t.data=r.get(t.label)}return!0})):[]};i=e(window.tsLayerPanelConfig),r.forEach((e=>{n.includes(e.name)||i.push({label:e.name,data:e,show:e.visible})}))}else r.size>0&&r.forEach((e=>{var t={label:e.name,data:e,children:[],show:e.visible};i.push(t)}));return i}static createImageryLayerTreeData(e){let t=[];return e&&e.imageryLayers.length>0&&e.imageryLayers._layers&&(t=e.imageryLayers._layers.map((e=>{const t=e._imageryProvider;let i="";if(t._image){const e=t.url.split("/");i=e[e.length-1].split(".")[0],i=decodeURI(i)}else if(t._resource){const e=t._resource.url.split("/");i=e[e.length-1].split("/")[0],i.includes(".")&&(i=i.split(".")[0]),""===i&&(i=e[e.length-2].split("/")[0]),i=decodeURI(i)}return{label:i,data:e,show:e.show}}))),t}static createTerrainProviderTreeData(e){let t=[];return e&&e.terrainProvider&&e.terrainProvider.tablename&&(t=e.terrainProvider._layers.map((t=>{let i=e.terrainProvider;return{label:e.terrainProvider.tablename,data:i,show:i.visible}}))),t}}const _0x45978d=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x3fbe7b=_0x45978d(void 0,(function(){return _0x3fbe7b.toString().search("(((.+)+)+)+$").toString().constructor(_0x3fbe7b).search("(((.+)+)+)+$")}));_0x3fbe7b(),WebGLPlot.wtsConfigManager=void 0;class _0x1a6c33{constructor(e){try{if(!e||""===e||!e.includes("http://"))throw console.log("WTSConfig dataServerUrl is error!!!"),this._urlIsError=!0,"PlotCustomRadar scene is required.";if(this.dataServerUrl=e,this.queryServerUrl=this.dataServerUrl.split("datasources")[0]+"featureResults.rjson?returnContent=true",this._commit=_0xf8fde(),this._commit.open("GET",encodeURI(e),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(),404===this._commit.status)throw this._urlIsError=!0,"PlotCustomRadar scene is required."}catch(e){console.log(e)}}static getInstance(e){return e&&(!WebGLPlot.wtsConfigManager||WebGLPlot.wtsConfigManager.plotServerUrl!==e)&&(WebGLPlot.wtsConfigManager=new _0x1a6c33(e)),WebGLPlot.wtsConfigManager}updateDoorsCfg(e){if(e.length<=0||this._urlIsError)return!1;_0x2a2121(this._commit,e,this.dataServerUrl,"doorsConfig")}getDoorsCfg(){if(this._urlIsError)return[];return _0x1b7736(this._commit,this.dataServerUrl,"doorsConfig")}updateQuickPositionCfg(e){if(e.length<0||this._urlIsError)return!1;const t="quickPositionConfig",i=this.dataServerUrl+"/"+t+"/features.rjson";let n=[];n.push("groupName"),n.push("groupUuID"),n.push("keyCode"),n.push("stopUuID");let r=Object.keys(e[0].stops[0].stop);for(let e=0;e<r.length;e++)"key"!==r[e]&&n.push(r[e]);_0x557023(this._commit,this.dataServerUrl,t)?_0x249785(this._commit,i):_0x5a8dcd(this._commit,t,this.dataServerUrl,n);let o=[];o.push(_0x57e245(n));for(let t=0;t<e.length;t++){const i=e[t];for(let e=0;e<i.stops.length;e++){const t=i.stops[e].stop;t.stopUuID=i.stops[e].uuid,t.keyCode=t.key,t.groupName=i.groupName,t.groupUuID=i.uuid;let r=[];for(let e=0;e<n.length;e++)r.push(t[n[e]]);let a=_0x458077(n,r);o.push(a)}}_0x46f6a9(this._commit,i,o)}getQuickPositionCfg(){if(this._urlIsError)return[];let e=_0x1b7736(this._commit,this.dataServerUrl,"quickPositionConfig"),t=new Map;for(let i=0;i<e.length;i++){const n=e[i];let r={};r.key=n.keyCode,r.lat=n.lat,r.lng=n.lng,r.alt=n.alt,r.heading=n.heading,r.roll=n.roll,r.pitch=n.pitch,r.second=n.second,r.uuid=n.stopUuID,r.name=n.name,r.groupName=n.groupName,r.groupUuID=n.groupUuID,t.get(n.groupName)||t.set(n.groupName,[]),t.get(n.groupName).push(r)}let i=[];return t.forEach((function(e,t,n){let r={};r.groupName=t,e.length>0&&(r.uuid=e[0].groupUuID),r.stops=e,i.push(r)})),i}updateBuildClipCfg(e){if(e.length<0||this._urlIsError)return!1;_0x2a2121(this._commit,e,this.dataServerUrl,"buildClipsConfig")}getBuildClipCfg(){if(this._urlIsError)return[];return _0x1b7736(this._commit,this.dataServerUrl,"buildClipsConfig")}updataLayer3DGroupCfg(e){if(e.length<0||this._urlIsError)return!1;_0x2a2121(this._commit,e,this.dataServerUrl,"Layer3DGroupCfg")}getLayer3DGroupCfg(){if(this._urlIsError)return[];return _0x1b7736(this._commit,this.dataServerUrl,"Layer3DGroupCfg")}updateCommonSymbolsCfg(e){if(e.length<0||this._urlIsError)return!1;_0x2a2121(this._commit,e,this.dataServerUrl,"commonSymbolsConfig")}getCommonSymbols(){if(this._urlIsError)return[];return _0x1b7736(this._commit,this.dataServerUrl,"commonSymbolsConfig")}updateOhterSimpleCfg(e,t){if(e.length<0||this._urlIsError)return!1;_0x2a2121(this._commit,e,this.dataServerUrl,t)}getOhterSimpleCfg(e){return this._urlIsError?[]:_0x1b7736(this._commit,this.dataServerUrl,e)}deleteDataset(e){_0x3e68ae(this._commit,e,this.dataServerUrl)}}function _0x46f6a9(e,t,i){_0xa11a6e(e,t,i)}function _0x249785(e,t){t+="?_method=DELETE&deleteMode=SQL";e.open("POST",encodeURI(t),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(JSON.stringify({attributeFilter:"SmID>0"}))}function _0xa11a6e(e,t,i){e.open("POST",encodeURI(t),!0,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(JSON.stringify(i))}function _0x57e245(e){let t={fieldNames:["SmID","SmUserID"],fieldValues:["0","0"],geometry:null};for(let i in e){const n=e[i];t.fieldNames.push(n),t.fieldValues.push(n)}return t}function _0x458077(e,t){let i={fieldNames:["SmID","SmUserID"],fieldValues:["0","0"],geometry:null};for(let n in e){const r=e[n],o=t[n];i.fieldNames.push(r),i.fieldValues.push(o)}return i}function _0x3062ba(e){let t=[];for(let i=1;i<e.length;i++){const n=e[i];let r={};for(let t=2;t<n.fieldValues.length;t++){const i=e[0].fieldValues[t];r[i]=n.fieldValues[t],n.fieldValues[t].includes(",")&&(r[i]=JSON.parse(n.fieldValues[t]))}t.push(r)}return t}function _0x557023(e,t,i){e.open("GET",encodeURI(t+".json"),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(null);let n=JSON.parse(e.responseText,null);return!!(n&&n.datasetNames&&n.datasetNames.includes(i))}function _0x2a2121(e,t,i,n){const r=i+"/"+n+"/features.rjson";if(t.length<=0)return void _0x249785(e,r);let o=[],a=Object.keys(t[0]);for(let e=0;e<a.length;e++)o.push(a[e]);_0x557023(e,i,n)?_0x249785(e,r):_0x5a8dcd(e,n,i,o);let s=[];s.push(_0x57e245(o));for(let e=0;e<t.length;e++){const i=t[e];let n=[];for(let e=0;e<o.length;e++)n.push(i[o[e]]);let r=_0x458077(o,n);s.push(r)}_0x46f6a9(e,r,s)}function _0x1b7736(e,t,i){return _0x3062ba(_0x31fae2(e,t,i))}function _0x31fae2(e,t,i){const n=t+"/"+i+"/features.json";let r;e.open("GET",encodeURI(n),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");try{if(e.send(),r=JSON.parse(e.responseText,null),r.error)return console.log("WTSConfig request error!!!",r.error),[];if(r.featureCount<=0)return[]}catch(e){return console.log("WTSConfig request error!!!",e),[]}const o=n+"?fromIndex=0&toIndex="+(r.featureCount-1).toString();e.open("GET",encodeURI(o),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(),r=JSON.parse(e.responseText,null);let a=[];for(let t=0;t<r.childUriList.length;t++){const i=r.childUriList[t]+".json";e.open("GET",encodeURI(i),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send();let n=JSON.parse(e.responseText,null);a.push(n)}return a}function _0x5a8dcd(e,t,i,n){let r=i+".json",o={datasetType:"TABULAR",datasetName:t};if(e.open("POST",encodeURI(r),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(JSON.stringify(o)),JSON.parse(e.responseText,null).succeed){let r=i+"/"+t+"/fields.rjson";for(let t=0;t<n.length;t++){const i=n[t];let o={isZeroLengthAllowed:"true",maxLength:"50000",isRequired:"false",name:i,caption:i,type:"WTEXT",defaultValue:"null",isSystemField:"false"};e.open("POST",encodeURI(r),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(JSON.stringify(o)),JSON.parse(e.responseText,null)}}}function _0x3e68ae(e,t,i){let n=i+"/"+t+".rjson";e.open("DELETE",encodeURI(n),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(null)}function _0xf8fde(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{e=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}var _0x126f8b=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x5cf8db=_0x126f8b(void 0,(function(){return _0x5cf8db.toString().search("(((.+)+)+)+$").toString().constructor(_0x5cf8db).search("(((.+)+)+)+$")}));function _0xe827c2(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.SampleDataModelsCfg=WebGLPlot.defaultValue(e.SampleDataModelsCfg,[]),this.elementsCfg=WebGLPlot.defaultValue(e.elementsCfg,[]),this.tsBuildDatas=WebGLPlot.defaultValue(e.tsBuildDatas,[]),this.geoLayerConfig=WebGLPlot.defaultValue(e.geoLayerConfig,[]),this.MGISQueryConfig=WebGLPlot.defaultValue(e.MGISQueryConfig,[]),this.tsPositions=WebGLPlot.defaultValue(e.tsPositions,[])}_0x5cf8db(),_0xe827c2.prototype.fromJSON=function(e){this.SampleDataModelsCfg=e.SampleDataModelsCfg,this.elementsCfg=e.elementsCfg,this.tsBuildDatas=e.tsBuildDatas,this.geoLayerConfig=e.geoLayerConfig,this.MGISQueryConfig=e.MGISQueryConfig,this.tsPositions=e.tsPositions},_0xe827c2.prototype.toJSON=function(){return'{"SampleDataModelsCfg":'+WebGLPlot.toJSON(this.SampleDataModelsCfg)+',"elementsCfg":'+WebGLPlot.toJSON(this.elementsCfg)+',"tsBuildDatas":'+WebGLPlot.toJSON(this.tsBuildDatas)+',"geoLayerConfig":'+WebGLPlot.toJSON(this.geoLayerConfig)+',"MGISQueryConfig":'+WebGLPlot.toJSON(this.MGISQueryConfig)+',"tsPositions":'+WebGLPlot.toJSON(this.tsPositions)+"}"},_0xe827c2.prototype.destory=function(){this.SampleDataModelsCfg=null,this.elementsCfg=null,this.tsBuildDatas=null,this.geoLayerConfig=null,this.MGISQueryConfig=null,this.tsPositions=null};var _0x332141=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x26bc23=_0x332141(void 0,(function(){return _0x26bc23.toString().search("(((.+)+)+)+$").toString().constructor(_0x26bc23).search("(((.+)+)+)+$")}));_0x26bc23();var WebGLPlot$2=window.WebGLPlot=window.WebGLPlot||{},_0x1ae3b7=null,_0x5236d6=void 0;function _0x2e67ed(e){e=WebGLPlot$2.defaultValue(e,WebGLPlot$2.defaultValue.EMPTY_OBJECT),this._serverUrl=WebGLPlot$2.defaultValue(e.serverUrl,WebGLPlot$2.Plotting.serverUrl),this._configData=WebGLPlot$2.defaultValue(e.configSmlInfo,new _0xe827c2),this._configSmlFileName=WebGLPlot$2.defaultValue(e._configSmlFileName,"WTSPlotConfig_DoNotDel"),this._openSmlFileCompleted=new WebGLPlot$2.Event,this._openSmlFileFailed=new WebGLPlot$2.Event,this._saveSmlFileCompleted=new WebGLPlot$2.Event,this._saveSmlFileFailed=new WebGLPlot$2.Event,this.options={serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}}}_0x2e67ed.getInstance=function(e){return _0x1ae3b7||(_0x1ae3b7=new WebGLPlot$2.ConfigManager(e)),_0x1ae3b7},_0x2e67ed.prototype.openSmlFileOnServer=function(e,t){e||(e=this._configSmlFileName);var i=this;function n(e){i._openSmlFileFailed.raiseEvent(),"function"==typeof t&&t({success:!1,message:"Open failed"})}var r=WebGLPlot$2.smlFileService(this._serverUrl,this.options.serviceParams);if(r){var o=r.editSmlFileParams;o.method="GET",o.smlFileName=e,r.smlFileService.editSMLFile(o,(function(r){var o;r.result?r.result.succeed?(o=r.result,i._getCompletedInit(o,e),"function"==typeof t&&t({success:!0,configSmlFileName:e})):n():r.error&&n()}),this)}},_0x2e67ed.prototype._getCompletedInit=function(e,t){if(this._configSmlFileName=t,e.tsPositions)for(var i=0;i<e.tsPositions.length;i++){var n=e.tsPositions[i].key;e.tsPositions[i].key=n.replaceAll("%2b","+")}this.openConfigDataFromConfigData(e)},_0x2e67ed.prototype.openConfigDataFromConfigData=function(e){this._configData.fromJSON(e),e.SampleDataModelsCfg&&(this.configData.SampleDataModelsCfg=e.SampleDataModelsCfg),e.elementsCfg&&(this.configData.elementsCfg=e.elementsCfg),e.tsBuildDatas&&(this.configData.tsBuildDatas=e.tsBuildDatas),e.geoLayerConfig&&(this.configData.geoLayerConfig=e.geoLayerConfig),e.MGISQueryConfig&&(this.configData.MGISQueryConfig=e.MGISQueryConfig),e.tsPositions&&(this.configData.tsPositions=e.tsPositions),this._openSmlFileCompleted.raiseEvent(e)},_0x2e67ed.prototype.saveSmlFileToServer=function(e,t){if(!WebGLPlot$2.defined(e))throw new WebGLPlot$2.DeveloperError("Local ConfigData Path is required.");WebGLPlot$2.defaultValue(t,!1)},_0x2e67ed.prototype._save=function(e,t){var i=this;function n(e){var t,n;e?(n=e,i._saveSmlFileCompleted.raiseEvent(n)):i._saveSmlFileFailed.raiseEvent(t)}var r=i._serverUrl,o=WebGLPlot$2.smlFileService(r,this.options.serviceParams);if(o){var a=o.editSmlFileParams;a.method="POST",a.sitData=this.saveConfigData(),a.smlFileName=e,a.isCover=t,o.smlFileService.editSMLFile(a,(function(e){e.result.succeed?n({success:!0}):n({success:!1})}),this)}},_0x2e67ed.prototype.saveConfigData=function(){var e=new _0xe827c2;return e.SampleDataModelsCfg=_0x5236d6.SampleDataModelsCfg,e.elementsCfg=_0x5236d6.elementsCfg,e.tsBuildDatas=_0x5236d6.tsBuildDatas,e.geoLayerConfig=_0x5236d6.geoLayerConfig,e.MGISQueryConfig=_0x5236d6.MGISQueryConfig,e.tsPositions=_0x5236d6.tsPositions,e},Object.defineProperties(_0x2e67ed.prototype,{serverUrl:{get:function(){return this._serverUrl}},configData:{get:function(){return this._configData},set:function(e){e!==this._configData&&(this._configData=e)}},configSmlFileName:{get:function(){return this._configSmlFileName},set:function(e){e!==this._configSmlFileName&&(this._configSmlFileName=e)}},openSmlFileCompleted:{get:function(){return this._openSmlFileCompleted}},openSmlFileFailed:{get:function(){return this._openSmlFileFailed}},saveSmlFileFailed:{get:function(){return this._saveSmlFileFailed}},saveSmlFileCompleted:{get:function(){return this._saveSmlFileCompleted}}}),WebGLPlot$2.ConfigManager=_0x2e67ed;var _0x26ed6d=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x570371=_0x26ed6d(void 0,(function(){return _0x570371.toString().search("(((.+)+)+)+$").toString().constructor(_0x570371).search("(((.+)+)+)+$")}));_0x570371();class _0x50eaab{constructor(){}static doContourAnalyst(e,t,i,n,r){void 0===t&&(t=theCrimePoint),_0x50eaab.entity&&_0x50eaab.clear(e);let o=WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,i);_0x50eaab.entityEllipse=e.entities.add({position:o,ellipse:{height:i,semiMinorAxis:n,semiMajorAxis:n,material:new WebGLPlot.Color(1,1,0,.35),outline:!0}}),_0x50eaab.entityCirclePt=e.entities.add({position:o,point:{pixelSize:5,color:WebGLPlot.Color.WHITE,outlineColor:WebGLPlot.Color.fromCssColorString("#fff"),outlineWidth:2,show:!0}}),_0x50eaab.entityPolyline=e.entities.add({polyline:{show:!0,positions:WebGLPlot.Cartesian3.fromDegreesArrayHeights([t.x,t.y,i,r.x,r.y,i,r.x,r.y,0]),width:3,material:WebGLPlot.Color.fromCssColorString("#51ff00"),loop:!0,clampToGround:!1}});var a=(r.x+t.x)/2,s=(r.y+t.y)/2;_0x50eaab.labels=e.scene.primitives.add(new WebGLPlot.LabelCollection({depthTestEnable:!1})),_0x50eaab.labels.add({position:WebGLPlot.Cartesian3.fromDegrees(a,s,i+10),font:"500 16px sans-serif",style:WebGLPlot.LabelStyle.FILL_AND_OUTLINE,outlineWidth:1,outlineColor:WebGLPlot.Color.BLACK,showBackground:!0,backgroundColor:WebGLPlot.Color.fromCssColorString("rgba(38, 38, 38, 0.85)"),pixelOffset:new WebGLPlot.Cartesian2(15,0),pixelOffsetScaleByDistance:new WebGLPlot.NearFarScalar(150,3,15e6,.5),text:"height:"+i+"m\nradius:"+n+"m",show:!0,horizontalOrigin:WebGLPlot.HorizontalOrigin.LEFT})}static clear(e){_0x50eaab.entity&&(e.entities.remove(_0x50eaab.entity),e.entities.remove(_0x50eaab.entityCirclePt),e.entities.remove(_0x50eaab.entityPolyline),e.entities.remove(_0x50eaab.labels),_0x50eaab.entity=void 0),_0x50eaab.textGeo&&superMapTrackingLayer.removeGeoGraphicObject(_0x50eaab.textGeo)}}_0x50eaab.entity=1,_0x50eaab.textGeo=void 0;var _0x138c9a=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0xc5db5e=_0x138c9a(void 0,(function(){return _0xc5db5e.toString().search("(((.+)+)+)+$").toString().constructor(_0xc5db5e).search("(((.+)+)+)+$")}));_0xc5db5e();var WebGLPlot$1=window.WebGLPlot=window.WebGLPlot||{};function _0x2c69d6(e){this.viewer=e.viewer,this.theCrimePoint=WebGLPlot$1.defaultValue(e.theCrimePoint,new _0x45ea17(113.88122956581786,22.50809724778502,0)),this.groundEfficiency=void 0}function _0x379af4(e,t,i){WebGLPlot$1.defined(i)||(i=15);const n=e/6378137;for(var r=[_0x34187f(t[1]),_0x34187f(t[0])],o=[],a=0;a<i;a++){const e=a*(360/i)*Math.PI/180,t=r[0]+n*Math.cos(e),s=r[1]+n*Math.sin(e);o.push([_0x2b47f1(s),_0x2b47f1(t)])}return o.push(o[0]),[o]}function _0x34187f(e){return e*Math.PI/180}function _0x2b47f1(e){return 180*e/Math.PI}_0x2c69d6.prototype.contourAnalysisConfirm=function(e){this.groundEfficiency&&(this.groundEfficiency.destroy(),this.groundEfficiency=void 0);let t=e.height,i=e.radius,n=WebGLPlot$1.defined(e.minTerrainHeight)?e.minTerrainHeight:0;if(0===i)throw new WebGLPlot$1.DeveloperError("height or radius can not be empty!");for(var r=_0x379af4(i,[this.theCrimePoint.x,this.theCrimePoint.y],50),o=[],a=0;a<r[0].length;a++)o.push(r[0][a][0]),o.push(r[0][a][1]);_0x50eaab.doContourAnalyst(this.viewer,this.theCrimePoint,t,i,new _0x45ea17(o[0],o[1],0)),this.groundEfficiency=new _0x2643a2({scene:scene,id:"sniperGroundEffect",color:WebGLPlot$1.Color.RED.withAlpha(.5),positions:o,minTerrainHeight:n})},_0x2c69d6.prototype.contourAnalysisClose=function(){_0x50eaab.clear(this.viewer),this.groundEfficiency&&this.groundEfficiency.destroy()},WebGLPlot$1.BuildContourAnalyst=_0x2c69d6;const _0x1d6460=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x3c091c=_0x1d6460(void 0,(function(){return _0x3c091c.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c091c).search("(((.+)+)+)+$")}));function _0x1ee5e8(e){this.viewer=e,this.doorEntitise=[],this.doorExcID=-1,this._doorClickEvent=new WebGLPlot.Event}function _0x5524f4(e,t){let i=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z),n=WebGLPlot.Transforms.headingPitchRollQuaternion(i,new WebGLPlot.HeadingPitchRoll(WebGLPlot.CesiumMath.toRadians(e.radians),WebGLPlot.CesiumMath.toRadians(90),0)),r=t.entities.add({position:i,box:{dimensions:new WebGLPlot.Cartesian3(e.width,e.height,.5),material:new WebGLPlot.Color(1,0,0,.5)},orientation:n,show:!1});return r.show=!0,r}function _0x545ded(e,t){isNaN(e.lon)||isNaN(e.lat)||isNaN(e.height)?console.warn("flyToMap:option is not correct"):e.heading?t.camera.flyTo({destination:WebGLPlot.Cartesian3.fromDegrees(e.lon,e.lat,e.height),orientation:{heading:e.heading,pitch:e.pitch,roll:e.roll},aim:!0}):t.camera.flyTo({destination:WebGLPlot.Cartesian3.fromDegrees(e.lon,e.lat,e.height),aim:!0})}_0x3c091c(),_0x1ee5e8.prototype.createDoors=function(e){if(-1===this.doorExcID){for(let t=0;t<e.length;t++){let i=e[t];this.doorEntitise.push(_0x5524f4(i,this.viewer))}this._doorClickEvent.raiseEvent(e)}},_0x1ee5e8.prototype.removeDoors=function(){-1!==this.doorExcID&&(window.clearInterval(this.doorExcID),this.doorExcID=-1),this.doorEntitise&&this.doorEntitise.length>0&&(this.doorEntitise.map((e=>{this.viewer.entities.remove(e)})),this.doorEntitise=[])},_0x1ee5e8.prototype.blinkDoor=function(e){-1!==this.doorExcID&&(window.clearInterval(this.doorExcID),this.doorExcID=-1);var t=this.doorEntitise[e];this.doorExcID=window.setInterval(function(){t.show=!t.show}.bind(this),500)},_0x1ee5e8.prototype.blinkDoors=function(e){-1!==this.doorExcID&&(window.clearInterval(this.doorExcID),this.doorExcID=-1);for(var t=[],i=0;i<e.length;i++)t.push(this.doorEntitise[e[i]]);this.doorExcID=window.setInterval(function(){t.map((e=>{e.show=!e.show}))}.bind(this),500)},_0x1ee5e8.prototype.blinkAllDoors=function(){if(-1!==this.doorExcID&&(window.clearInterval(this.doorExcID),this.doorExcID=-1),!this.doorEntitise||this.doorEntitise.length<=0)return;let e=this;this.doorExcID=window.setInterval(function(){e.doorEntitise.map((e=>{e.show=!e.show}))}.bind(this),500)},_0x1ee5e8.prototype.flytoLocation=function(e){_0x545ded(e,this.viewer)},Object.defineProperties(_0x1ee5e8.prototype,{doorClickEvent:{get:function(){return this._doorClickEvent}}});const _0x2b7ae8=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x515f5f=_0x2b7ae8(void 0,(function(){return _0x515f5f.toString().search("(((.+)+)+)+$").toString().constructor(_0x515f5f).search("(((.+)+)+)+$")}));_0x515f5f();class _0x5414a0{constructor(){}createXMLflyLine(e){let t=new DOMParser;window.parser=t;let i=t.parseFromString("<cusxmlRoute></cusxmlRoute>","text/xml");window.xmlDoc=i;let n=this.createSceneRouteNode(i),r=this.createRouteNode(i,e),o=this.createRouteStyleNode(i);r.appendChild(o);let a=this,s=e.routeStops;if(!(s.length<2)){for(let e=0;e<s.length;e++){let t=s[e],n={longitude:t.point[0],latitude:t.point[1],altitude:t.point[2],heading:t.heading*(180/Math.PI),tilt:t.tilt*(180/Math.PI)+90},o=a.createStopNode(i,n,t,e);r.appendChild(o)}return n.appendChild(r),i.children[0].appendChild(n),i.children[0].innerHTML}}createXMLflyLines(e){let t=new DOMParser;window.parser=t;let i=t.parseFromString("<cusxmlRoute></cusxmlRoute>","text/xml");window.xmlDoc=i;let n=this.createSceneRouteNode(i);for(let t=0;t<e.length;t++){var r=e[t];let o=this.createRouteNode(i,r),a=this.createRouteStyleNode(i);o.appendChild(a);let s=this,l=r.routeStops;if(l.length<2)return void console.warn("节点数小于2");for(let e=0;e<l.length;e++){let t=l[e],n={longitude:t.point[0],latitude:t.point[1],altitude:t.point[2],heading:t.heading*(180/Math.PI),tilt:t.tilt*(180/Math.PI)+90},r=s.createStopNode(i,n,t,e);o.appendChild(r)}n.appendChild(o)}return i.children[0].appendChild(n),i.children[0].innerHTML}createSceneRouteNode(e){let t=e.createElement("SceneRoute");return t.setAttribute("xmlns","http://www.supermap.com.cn/ugc60"),t}createRouteNode(e,t){let i=e.createElement("route"),n={name:t.routeName||"飞行路线",speed:t.speed||"200",lineType:"0",showroutestop:"False",showrouteline:"False",altitudefree:"False",headingfree:"False",tiltfree:"False",flycircle:"False",alongline:t.isAlongLine||"False"};for(const e in n)i.setAttribute(e,n[e]);return i}createRouteStyleNode(e){let t=e.createElement("style"),i=e.createElement("geostyle3d"),n=e.createElement("linecolor");n.textContent="RGBA(147,112,219,255)";let r=e.createElement("linewidth");r.textContent=2;let o=e.createElement("altitudeMode");o.textContent="Absolute";let a=e.createElement("bottomAltitude");return a.textContent=0,i.appendChild(n),i.appendChild(r),i.appendChild(o),i.appendChild(a),t.appendChild(i),t}createStopNode(e,t,i,n){let r=e.createElement("routestop"),o={name:i.stopName||"Stop"+(n+1),speed:i.speed,excluded:"False",viewType:"camera"};for(const e in o)r.setAttribute(e,o[e]);let a=this.createStopCameraNode(e,t);r.appendChild(a);let s=this.createStopStyleNode(e,i);r.appendChild(s);let l=this.createStopSettingNode(e,i);return r.appendChild(l),r}createStopCameraNode(e,t){let i=e.createElement("camera");for(const n in t){let r=e.createElement(n);r.textContent=t[n],i.appendChild(r)}return i}createStopStyleNode(e,t){let i={icon:t.img,markersize:4.8,markericonscale:1,markercolor:"RGBA(255, 255, 255, 255)"},n=e.createElement("style"),r=e.createElement("geostyle3d");for(const t in i){let n=e.createElement(t);n.textContent=i[t],r.appendChild(n)}return n.appendChild(r),n}createStopSettingNode(e,t){let i=e.createElement("setting"),n={turnTime:t.surroundDuration||1.5,turnSlowly:"False",stopPlayMode:t.stopPlayMode||"StopPause",autoPlay:"False",pauseTime:t.waitTime||0,angularSpeed:1};for(const t in n){let r=e.createElement(t);r.textContent=n[t],i.appendChild(r)}return i}}const _0x18ae15=function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=function(){const t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();let i=!0;return function(e,t){const n=i?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();let n=!0;return function(e,t){const i=n?function(){if(t){const i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}}(),_0x6320b1=_0x18ae15(void 0,(function(){return _0x6320b1.toString().search("(((.+)+)+)+$").toString().constructor(_0x6320b1).search("(((.+)+)+)+$")}));_0x6320b1();class _0x319fa8{constructor(e){this.viewer=e,this.flyManager,this.routeCollection,this.reader=new FileReader,this.createXml,this.flyLineXmls=new _0x53dfa2,this.routesDictionary=new _0x53dfa2,this.routes=[],this.duration=5,this.showRoute=!1,this.showStop=!1,this.setStopSpeed=0,this.stopPlayMode="StopPause",this.waitTime=.001,this.surroundDuration=1,this.isAlongline=!1,this.routeSpeed=0,this.initFlyManager()}initFlyManager(){this.routeCollection=new c$m(this.viewer.entities),this.flyManager=new l$i({scene:this.viewer.scene,routes:this.routeCollection}),this.createXml=new _0x5414a0}addStop(e){this.route=this.routesDictionary.find(e);let t=this.route.routeStops,i=this.viewer.camera.position,n=this.CartesiantoDegrees(i);var r=0;if(t.length>0){let e=t[t.length-1],i=e.point,o=WebGLPlot.Cartesian3.fromDegrees(i[0],i[1],i[2]),a=WebGLPlot.Cartesian3.fromDegrees(n[0],n[1],n[2]);r=WebGLPlot.Cartesian3.distance(o,a)/this.duration,e.speed=r}let o=t.length,a="视点"+(Number(o)+1),s={uuid:Math.random().toString(15).slice(2,15),stopName:a,point:n,heading:this.viewer.camera.heading,tilt:this.viewer.camera.pitch,speed:r,stopPlayMode:this.stopPlayMode,surroundDuration:this.surroundDuration,waitTime:this.waitTime,duration:this.duration};t.push(s),this.loadRoute(e)}changeStop(e,t){this.flyManager&&this.flyManager.stop();let i=e.routename;this.route=this.routesDictionary.find(i);let n=this.route.routeStops,r=this.viewer.camera.position,o=this.CartesiantoDegrees(r),a=null,s=null,l=null;for(let t=0;t<n.length;t++){let i=n[t];if(t>0&&(s=n[t-1]),n.length!==t+1&&(l=n[t+1]),i.uuid===e.stop.uuid){a=i;break}}let u=a.speed;if(t.position&&null!==l){let e=l.point,i=WebGLPlot.Cartesian3.fromDegrees(e[0],e[1],e[2]),n=WebGLPlot.Cartesian3.fromDegrees(o[0],o[1],o[2]),r=WebGLPlot.Cartesian3.distance(i,n);u=t.duration?r/t.duration:r/a.duration}else if(t.position&&null!==s&&null===l){let e=s.point,t=WebGLPlot.Cartesian3.fromDegrees(e[0],e[1],e[2]),i=WebGLPlot.Cartesian3.fromDegrees(o[0],o[1],o[2]),n=WebGLPlot.Cartesian3.distance(t,i);s.speed=n/s.duration}else if(!t.position&&t.duration&&null!==l){o=a.point;let e=l.point,i=WebGLPlot.Cartesian3.fromDegrees(e[0],e[1],e[2]),n=WebGLPlot.Cartesian3.fromDegrees(o[0],o[1],o[2]),r=WebGLPlot.Cartesian3.distance(i,n);t.duration&&(u=r/t.duration)}var c=null,h=null,d=null;t.position?(c=this.viewer.camera.heading,h=this.viewer.camera.pitch):(c=a.heading,h=a.tilt,o=a.point,d=t.duration?parseInt(t.duration):a.duration);let f={uuid:e.stop.uuid,stopName:t.name||e.stop.stopName,point:o,heading:c,tilt:h,speed:u,stopPlayMode:this.stopPlayMode,surroundDuration:this.surroundDuration,waitTime:this.waitTime,duration:d||this.duration};for(let t=0;t<n.length;t++)if(n[t].uuid===e.stop.uuid){n[t]=f;break}this.loadRoute(i)}locateStop(e,t){this.flyManager&&this.flyManager.stop(),this.route=this.routesDictionary.find(e);let i=this.route.routeStops;for(let e=0;e<i.length;e++){let n=i[e];if(n.stopName===t){this.viewer.camera.flyTo({destination:WebGLPlot.Cartesian3.fromDegrees(n.point[0],n.point[1],n.point[2]),orientation:{heading:n.heading,pitch:n.tilt,roll:0},duration:1});break}}}deleteStop(e,t){this.flyManager&&this.flyManager.stop(),this.route=this.routesDictionary.find(e);let i=this.route.routeStops;for(let e=0;e<i.length;e++)if(i[e].stopName===t){i.splice(e,1);break}this.loadRoute(e)}createImage(){return this.viewer.render(),this.viewer.scene.canvas.toDataURL("image/png").replace("image/png","image/octet-stream")}addRoute(){let e={routeName:"飞行路线"+(this.routes.length+1),speed:this.routeSpeed,isAlongLine:"False",routeStops:[],showLine:!1};this.routesDictionary.add(e.routeName,e),this.routes.push(e)}changeRoute(e,t){this.flyManager&&this.flyManager.stop();let i=e.name;this.route=this.routesDictionary.find(i),this.route.routeName=t.name;let n=this.createXml.createXMLflyLine(this.route);this.routesDictionary.remove(i),this.routesDictionary.add(t.name,this.route),n&&(this.flyLineXmls.remove(i),this.flyLineXmls.add(t.name,n))}deleteRoute(e){if(this.flyManager&&this.flyManager.stop(),!(this.flyLineXmls.length<1)){this.flyLineXmls.remove(e);var t=this.routesDictionary.find(e);this.routes.splice(this.routes.indexOf(t),1),this.routesDictionary.remove(e)}}showCurRoute(e,t){let i=this.flyLineXmls.find(e),n=this.flyManager.currentRoute;if(this.route=this.routesDictionary.find(e),n.routeName===e)n.isLineVisible=t,n.isStopVisible=t,this.route.showLine=t;else{n&&n.clear(),this.routeCollection=new c$m(this.viewer.entities),this.routeCollection.fromXML(i),this.flyManager.routes=this.routeCollection,this.route.showLine=!0;for(let t=0;t<this.flyManager.routes._routes.length;t++){let i=this.flyManager.routes._routes[t];i.routeName===e&&(i.isLineVisible=!0,i.isStopVisible=!0)}}}loadRoute(e){var t=this.routesDictionary.find(e);if(t.routeStops.length<2)return;let i=this.createXml.createXMLflyLine(t);if(!i||(this.flyLineXmls.add(e,i),!e))return;let n=this.flyManager.currentRoute;n&&n.clear(),this.routeCollection=new c$m(this.viewer.entities),this.routeCollection.fromXML(i),this.flyManager.routes=this.routeCollection}readyPromise(){this.routesDictionary.clear(),this.flyLineXmls.clear(),this.routes=[],this.routeCollection.readyPromise.then((()=>{this.flyManager.routes=this.routeCollection;for(let e=0;e<this.routeCollection._routes.length;e++){let t=this.routeCollection._routes[e],i={routeName:t._routeName,speed:t._speed,isAlongLine:t._isAlongline,routeStops:[]};for(let e=0;e<t._stopCollection.length;e++){let n=t._stopCollection.get(e),r=n._point,o=this.CartesiantoDegrees(r),a=n._duration;(e===t._stopCollection.length-1||200===n._speed&&10===n._duration)&&(a=5);let s=n._waitTime;0===s&&(s=.001);let l={uuid:Math.random().toString(15).slice(2,15),stopName:n._stopName,point:o,heading:n._heading,tilt:n._tilt,speed:n._speed,stopPlayMode:n._stopPlayMode,surroundDuration:n._surroundDuration,waitTime:s,duration:a};i.routeStops.push(l)}this.routesDictionary.add(i.routeName,i),this.routes.push(i);let n=this.createXml.createXMLflyLine(i);if(!n)return;this.flyLineXmls.add(i.routeName,n)}}))}download(e){let t=this.flyLineXmls.find(e);if(!t)return;let i=new Blob([t]),n=document.createElement("a");n.download="view-flight-route.fpf",n.href=URL.createObjectURL(i),n.click()}downloadAll(){if(this.flyLineXmls.count()<1)return;let e=this.createXml.createXMLflyLines(this.routes);if(!e)return;let t=new Blob(["\ufeff",e],{type:"text/plain"}),i=document.createElement("a");i.download="view-flight-route.fpf",i.href=URL.createObjectURL(t),i.click()}uploading(e){this.flyManager.stop();let t=this.flyManager.currentRoute;t&&t.clear(),this.routeCollection=new c$m(this.viewer.entities),e&&(this.reader.onload=e=>{let t=e.target.result;this.routeCollection.fromXML(t),this.readyPromise()},this.reader.readAsText(e,"UTF-8"))}fromFile(e){let t=this;this.flyManager.stop();let i=this.flyManager.currentRoute;i&&i.clear(),this.routeCollection=new c$m(this.viewer.entities),WebGLPlot.when(WebGLPlot.loadXML(e),(function(e){let i=(new XMLSerializer).serializeToString(e);t.routeCollection.fromXML(i),t.readyPromise()}))}play(e){let t=this.flyLineXmls.find(e),i=this.flyManager.currentRoute;i&&i.clear(),this.routeCollection=new c$m(this.viewer.entities),this.routeCollection.fromXML(t),this.flyManager.routes=this.routeCollection,this.flyManager.readyPromise.then((()=>{this.flyManager.play()}))}pause(){this.flyManager&&this.flyManager.pause()}stop(){this.flyManager&&this.flyManager.stop()}CartesiantoDegrees(e){let t=[].concat(e),i=[];for(let e=0,n=t.length;e<n;e++){let n=WebGLPlot.Cartographic.fromCartesian(t[e]),r=WebGLPlot.CesiumMath.toDegrees(n.longitude),o=WebGLPlot.CesiumMath.toDegrees(n.latitude),a=n.height;-1==i.indexOf(r)&&-1==i.indexOf(o)&&(i.push(r),i.push(o),i.push(a))}return i}}var _0x4aac71=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x44a930=_0x4aac71(void 0,(function(){return _0x44a930.toString().search("(((.+)+)+)+$").toString().constructor(_0x44a930).search("(((.+)+)+)+$")}));_0x44a930();class _0x2d1dca{constructor(e){this.name=WebGLPlot.defaultValue(e.name,""),this.key=WebGLPlot.defaultValue(e.key,""),this.second=WebGLPlot.defaultValue(e.second,""),e.position&&e.position.heading&&(this.heading=e.position.heading,this.pitch=e.position.pitch,this.roll=e.position.roll,this.lng=e.position.point.lng,this.lat=e.position.point.lat,this.alt=e.position.point.alt)}}var _0x205273=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x49d12c=_0x205273(void 0,(function(){return _0x49d12c.toString().search("(((.+)+)+)+$").toString().constructor(_0x49d12c).search("(((.+)+)+)+$")}));function _0x406595(e){this.viewer=e}_0x49d12c(),_0x406595.prototype.addCamera=function(e,t){if(!this.viewer)return;let i=this.viewer.scene.camera,n=i.positionCartographic,r={point:{lng:Cesium.Math.toDegrees(n.longitude),lat:Cesium.Math.toDegrees(n.latitude),alt:n.height},heading:i.heading,pitch:i.pitch,roll:i.roll},o=t.root.uuid,a=this.groupDic.find(o),s=a.stops.count(),l=e+(Number(s)+1);o=Math.random().toString(15).slice(2,15),this.quickPosPara=new positionPara({name:l,position:r}),a.stops.add(o,this.quickPosPara)},_0x406595.prototype.addRoute=function(e){if(!this.viewer)return;let t=Math.random().toString(15).slice(2,15),i={groupName:e+(this.groupDic.count()+1),uuid:t,stops:new _0x53dfa2};this.quickGroupPara=i,this.groupDic.add(t,i)},_0x406595.prototype.inputRoute=function(){for(var e in this.keyboards=[],this.groupJson=[],this.groupDic.dataStorege){var t=this.groupDic.find(e),i=[];for(var n in t.stops.dataStorege){var r=t.stops.find(n);i.push({uuid:n,stop:r}),this.keyboards.push(r)}this.groupJson.push({groupName:t.groupName,uuid:e,stops:i})}return this.groupJson},_0x406595.prototype.locateCamera=function(e){let t=e.heading,i=e.pitch,n=e.roll,r=e.lng,o=e.lat,a=e.alt;this.viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(r,o,a),orientation:{heading:t,pitch:i,roll:n}})};var _0x31fc5b=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=function(){var e=t(this,(function(){return e.toString().search("(((.+)+)+)+$").toString().constructor(e).search("(((.+)+)+)+$")}));e();var i=!0;return function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}}(),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n();var r=!0;return function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}}(),_0x200bad=_0x31fc5b(void 0,(function(){return _0x200bad.toString().search("(((.+)+)+)+$").toString().constructor(_0x200bad).search("(((.+)+)+)+$")}));_0x200bad();var _0x3ff519={on:function(e,t,i){if("object"==typeof e)for(var n in e)this._on(n,e[n],t);else for(var r=0,o=(e=splitWords(e)).length;r<o;r++)this._on(e[r],t,i);return this},off:function(e,t,i){if(e)if("object"==typeof e)for(var n in e)this._off(n,e[n],t);else for(var r=0,o=(e=splitWords(e)).length;r<o;r++)this._off(e[r],t,i);else delete this._events;return this},_on:function(e,t,i){this._events=this._events||{};var n=this._events[e];n||(n=[],this._events[e]=n),i===this&&(i=void 0);for(var r={fn:t,ctx:i},o=n,a=0,s=o.length;a<s;a++)if(o[a].fn===t&&o[a].ctx===i)return;o.push(r)},_off:function(e,t,i){var n,r,o;if(this._events&&(n=this._events[e])){if(!t){for(r=0,o=n.length;r<o;r++)n[r].fn=falseFn;return void delete this._events[e]}if(i===this&&(i=void 0),n)for(r=0,o=n.length;r<o;r++){var a=n[r];if(a.ctx===i&&a.fn===t)return a.fn=falseFn,this._firingCount&&(this._events[e]=n=n.slice()),void n.splice(r,1)}}},fire:function(e,t,i){if(!this.listens(e,i))return this;var n=extend({},t,{type:e,target:this});if(this._events){var r=this._events[e];if(r){this._firingCount=this._firingCount+1||1;for(var o=0,a=r.length;o<a;o++){var s=r[o];s.fn.call(s.ctx||this,n)}this._firingCount--}}return i&&this._propagateEvent(n),this},listens:function(e,t){var i=this._events&&this._events[e];if(i&&i.length)return!0;if(t)for(var n in this._eventParents)if(this._eventParents[n].listens(e,t))return!0;return!1},once:function(e,t,i){if("object"==typeof e){for(var n in e)this.once(n,e[n],t);return this}var r=bind((function(){this.off(e,t,i).off(e,r,i)}),this);return this.on(e,t,i).on(e,r,i)},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[stamp(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[stamp(e)],this},_propagateEvent:function(e){for(var t in this._eventParents)this._eventParents[t].fire(e.type,extend({layer:e.target},e),!0)}};function m(e,t,i){try{return e(t,i)}catch(e){return c$18.reject(e)}}function l(e){var t;return function(i){var n=i.data,r=[],o={id:n.id,result:void 0,error:void 0};return c$18(m(e,n.parameters,r)).then((function(e){o.result=e})).otherwise((function(e){e instanceof Error?o.error={name:e.name,message:e.message,stack:e.stack}:o.error=e})).always((function(){t$$(t)||(t=e$1Y(self.webkitPostMessage,self.postMessage)),n.canTransferArrayBuffer||(r.length=0);try{t(o,r)}catch(e){o.result=void 0,o.error="postMessage failed with error: "+f$12(e)+"\n with responseMessage: "+JSON.stringify(o),t(o)}}))}}var SuperMapVersion="38574";exports.AlgoInclude=_0x191499,exports.AlgoSymbol=_0x34d5f9,exports.AlphaMode=_0x841277,exports.AnalysisTool=_0x5dc5e7,exports.Animation=y$4,exports.AnimationBlink=_0x25da3f,exports.AnimationBrokenLine=_0x5e08a4,exports.AnimationCurve=_0x1cc45e,exports.AnimationFollowType=_0x4daeca,exports.AnimationGrow=_0x5443f8,exports.AnimationHide=_0x4b4631,exports.AnimationMoveIn=_0x3548ca,exports.AnimationMoveOut=_0x3b5ece,exports.AnimationPlayType=_0x5158e5,exports.AnimationReduce=_0x179dd6,exports.AnimationShow=_0x990cf2,exports.AnimationViewModel=m$6,exports.AnimationWay=_0x24959f,exports.AnimationZoomIn=_0x498b55,exports.AnimationZoomOut=_0x527738,exports.Appearance=n$M,exports.ApproximateTerrainHeights=e$1P,exports.ArcGISTiledElevationTerrainProvider=p$1g,exports.ArcGisGeographicTilingScheme=I$1e,exports.ArcGisMapServerImageryProvider=b$o,exports.ArcType=m$_,exports.ArrowCommunicationLink=_0x5be414,exports.AssociativeArray=e$1F,exports.AttributeCompression=r$P,exports.AttributeType=N$G,exports.AutoExposure=a$i,exports.Autolinker=zt$3,exports.AutomaticUniforms=s$1c,exports.Axis=z$y,exports.AxisAlignedBoundingBox=e$1N,exports.BIMInfoClickQueryHandler=_0x204936,exports.BaseLayerPicker=L$4,exports.BaseLayerPickerViewModel=w$4,exports.BasicLineCommunicationLink=_0x3a2ce6,exports.BatchTable=p$U,exports.Batched3DModel3DTileContent=n$D,exports.Billboard=s$1a,exports.BillboardAxialVp=_0xdfcd48,exports.BillboardCollection=O$t,exports.BillboardGraphics=s$W,exports.BillboardMode=Cr$2,exports.BillboardPixelSizeWithAngleVp=_0x3c7572,exports.BillboardVisualizer=u$M,exports.BingMapsApi=e$1E,exports.BingMapsGeocoderService=o$Y,exports.BingMapsImageryProvider=o$m,exports.BingMapsStyle=W$d,exports.BlendEquation=x$16,exports.BlendFunction=h$13,exports.BlendOption=S$t,exports.BlendingState=Ee$s,exports.BlinkAnimationBlinkStyle=_0x160acc,exports.BlinkAnimationReplaceStyle=_0x3b00a4,exports.BlockCacheList=s$19,exports.BlockCacheNode=e$1p,exports.BloodPosition=_0x758b23,exports.BloodVolume=_0x225f00,exports.BloomEffect=e$k,exports.BoundingRectangle=n$13,exports.BoundingSphere=c$19,exports.BoundingSphereState=A$T,exports.Bounds=_0xe0357d,exports.BoxEditor=R$g,exports.BoxEmitter=o$p,exports.BoxGeometry=c$Z,exports.BoxGeometryUpdater=i$I,exports.BoxGraphics=s$S,exports.BoxOutlineGeometry=a$T,exports.BrdfLutGenerator=o$l,exports.Buffer=u$Y,exports.BufferManager=_0xd5ac20,exports.BufferUsage=A$13,exports.BuildContourAnalyst=_0x2c69d6,exports.BuildingDoors=_0x1ee5e8,exports.BurstPipelineAnalystService=BurstPipelineAnalystService,exports.CGCS2000MapServerImageryProvider=D$k,exports.CallbackProperty=n$K,exports.Camera=p$m,exports.CameraEventAggregator=v$j,exports.CameraEventType=Q$c,exports.CameraFlightPath=mt$2,exports.CameraMoveHandler=_0x35ec84,exports.Cartesian2=r$T,exports.Cartesian3=a$11,exports.Cartesian4=a$10,exports.Cartographic=i$1g,exports.CartographicGeocoderService=N$11,exports.CaseTable=_0x435398,exports.CategoryVisibleMode=_0x49e724,exports.Catenaryline=M$r,exports.CatmullRomSpline=p$1e,exports.Cesium3DTile=c$y,exports.Cesium3DTileBatchTable=p$Q,exports.Cesium3DTileColorBlendMode=v$E,exports.Cesium3DTileContent=n$k,exports.Cesium3DTileContentFactory=m$z,exports.Cesium3DTileContentState=X$p,exports.Cesium3DTileFeature=e$Z,exports.Cesium3DTileFeatureTable=p$P,exports.Cesium3DTileOptimizationHint=s$z,exports.Cesium3DTileOptimizations=A$E,exports.Cesium3DTilePass=_t$6,exports.Cesium3DTilePassState=i$h,exports.Cesium3DTilePointFeature=i$C,exports.Cesium3DTileRefine=l$D,exports.Cesium3DTileStyle=h$h,exports.Cesium3DTileStyleEngine=e$K,exports.Cesium3DTilesInspector=y$1,exports.Cesium3DTilesInspectorViewModel=l$2,exports.Cesium3DTileset=f$B,exports.Cesium3DTilesetAsyncTraversal=h$i,exports.Cesium3DTilesetCache=e$L,exports.Cesium3DTilesetGraphics=e$$,exports.Cesium3DTilesetHeatmap=o$y,exports.Cesium3DTilesetMostDetailedTraversal=h$E,exports.Cesium3DTilesetStatistics=s$x,exports.Cesium3DTilesetTraversal=R$r,exports.Cesium3DTilesetVisualizer=a$v,exports.CesiumInspector=w$1,exports.CesiumInspectorViewModel=a,exports.CesiumTerrainProvider=se$y,exports.CesiumWidget=p,exports.Check=n$1e,exports.CheckerboardMaterialProperty=r$o,exports.CircleEmitter=a$k,exports.CircleGeometry=n$_,exports.CircleOutlineGeometry=s$18,exports.ClampFramebuffer=t$e,exports.ClampMode=n$q,exports.Class=_0xeadc24,exports.ClassificationModel=w$K,exports.ClassificationPrimitive=M$M,exports.ClassificationType=_0x29401c,exports.ClearCommand=r$M,exports.ClipBuild=_0xe480ed,exports.ClipPlaneDepthFp=_0x54b635,exports.ClipPlaneFp=_0x3f5e7a,exports.ClipPlaneMode=_0xaa965,exports.ClipPlaneVp=V$j,exports.ClippingPlane=t$x,exports.ClippingPlaneCollection=l$G,exports.ClippingType=L$o,exports.Clock=a$M,exports.ClockRange=tt$j,exports.ClockStep=g$M,exports.ClockViewModel=o$5,exports.ClosedDepthFramebuffer=o$o,exports.CloudBox=t$9,exports.Collection=Collection$1,exports.Color=e$1z,exports.ColorBlendMode=I$J,exports.ColorCorrection=o$j,exports.ColorGeometryInstanceAttribute=r$I,exports.ColorMaterialProperty=t$F,exports.ColorTable=o$T,exports.ColorTransferFunction=_0x543bed,exports.Command=e$1,exports.CommonNoLigthNoTextureVp=He$5,exports.CommonNoLigthOneTextureVp=ce$6,exports.CommonNoTextureFS=me$9,exports.CommonNoTextureFp=Ye$6,exports.CommonNoTextureVS=le$b,exports.CommonOneTextureFp=CommonOneTextureFp,exports.CommonServiceBase=_0x36bd7a,exports.CommonUtil=_0x27e7d4,exports.CommunicationLinkBase=_0xa34c70,exports.CommunicationLinkType=_0x168c99,exports.ComponentDatatype=C$12,exports.Composite3DTileContent=i$D,exports.CompositeEntityCollection=s$v,exports.CompositeMaterialProperty=i$B,exports.CompositePositionProperty=t$t,exports.CompositeProperty=e$I,exports.Compositor=o$i,exports.CompressedTextureBuffer=e$1m,exports.ComputeCommand=t$w,exports.ComputeEngine=a$j,exports.ComputeWeightMatrixParameters=ComputeWeightMatrixParameters,exports.ComputeWeightMatrixService=ComputeWeightMatrixService,exports.ConditionsExpression=u$g,exports.ConeEmitter=n$n,exports.ConfigData=_0xe827c2,exports.ConfigManager=_0x2e67ed,exports.ConstantPositionProperty=t$B,exports.ConstantProperty=i$O,exports.Context=d$k,exports.ContextLimits=e$1y,exports.ContourAnalyst=_0x50eaab,exports.ControlMode=re$a,exports.CoplanarPolygonGeometry=A$X,exports.CoplanarPolygonGeometryLibrary=p$12,exports.CoplanarPolygonOutlineGeometry=a$L,exports.CornerType=ie$D,exports.CorridorGeometry=X$I,exports.CorridorGeometryLibrary=T$S,exports.CorridorGeometryUpdater=p$C,exports.CorridorGraphics=o$E,exports.CorridorOutlineGeometry=D$X,exports.Credential=a$R,exports.CredentialType=r$N,exports.Credit=i$17,exports.CreditDisplay=r$e,exports.CtrlPosition=_0x374198,exports.CtrlPositionType=_0x5edb39,exports.CubeMap=X$y,exports.CubeMapFace=A$Q,exports.CubicRealPolynomial=P$12,exports.CullFace=k$F,exports.CullingVolume=i$_,exports.Curve=Curve,exports.CustomDataSource=i$z,exports.CustomGeometryUpdater=m$u,exports.CustomProjection=_$V,exports.CylinderGeometry=x$V,exports.CylinderGeometryLibrary=x$W,exports.CylinderGeometryUpdater=s$t,exports.CylinderGraphics=o$C,exports.CylinderOutlineGeometry=d$T,exports.CzmlDataSource=P$m,exports.DDSTexture=_0x389226,exports.DDSTextureManager=De$e,exports.DXTTextureDecode=d$S,exports.DamBreakAnalysis=r$d,exports.DashLineCommunicationLink=_0x158030,exports.DataFileType=c$q,exports.DataSource=o$w,exports.DataSourceClock=t$r,exports.DataSourceCollection=i$v,exports.DataSourceDisplay=l$n,exports.DebugAppearance=n$f,exports.DebugCameraPrimitive=u$k,exports.DebugModelMatrixPrimitive=s$f,exports.DeductionScript=_0x5e9935,exports.DeductionScriptActionBasicParm=_0x54b539,exports.DeductionScriptActionEffect=_0xd598d1,exports.DeductionScriptActionMove=_0x3a7ce4,exports.DeductionScriptActionRotation=_0x57fe5e,exports.DeductionScriptActionScale=_0x518dfc,exports.DeductionScriptCalc=_0x7ccad,exports.DeductionScriptExecute=_0x378bcb,exports.DeductionScriptExecuteCalc=_0x1057a5,exports.DeductionScriptExecuteGroup=_0x2a28c8,exports.DeductionScriptExecuteManager=_0x182f7e,exports.DeductionScriptExecuteResetType=_0x4bcd4a,exports.DeductionScriptExecuteState=_0x168ee9,exports.DeductionScriptExtend=_0x2e1f61,exports.DeductionScriptGroup=_0xa3433e,exports.DeductionScriptManager=_0xdeda0a,exports.DefaultProxy=o$S,exports.DefaultStyle=_0x362a5f,exports.DepthFramebuffer=n$m,exports.DepthFunction=Re$h,exports.DepthMapAnalysisVp=DepthMapAnalysisVp,exports.DepthOfFieldEffect=s$h,exports.DepthPlane=c$g,exports.DerivedCommand=p$h,exports.DeveloperError=t$_,exports.DeviceOrientationCameraController=m$i,exports.Dictionary=_0x53dfa2,exports.DirectionalLight=_$k,exports.DiscardColorTileImagePolicy=t$8,exports.DiscardEmptyTileImagePolicy=A$o,exports.DiscardMissingTileImagePolicy=f$p,exports.DisplayStatus=_0x2654ba,exports.DistanceDisplayCondition=e$1w,exports.DistanceDisplayConditionGeometryInstanceAttribute=n$Z,exports.DomToImage=_0x283780,exports.DotMode=_0x3f7d9f,exports.DotPlotStyle=_0x248ebf,exports.DoublyLinkedList=s$15,exports.DracoLoader=r$s,exports.DrawCommand=s$1d,exports.DrawCubeHandler=_0x42e5f0,exports.DrawHandler=b$u,exports.DrawMode=_0xd8b438,exports.DrawRectHandler=_0x37dc61,exports.DxtTexture=_0x248355,exports.DynamicExtendRegionFp=_0x4425c8,exports.DynamicExtendRegionVp=_0x46e9c0,exports.DynamicGeometryBatch=r$k,exports.DynamicGeometryUpdater=a$B,exports.DynamicLayer3D=_0x3239f2,exports.DynamicLayerVertex=_0x268086,exports.DynamicObjectScane=_0x483eea,exports.DynamicObjectState=_0x37527e,exports.EarthOrientationParameters=R$Z,exports.EarthOrientationParametersSample=n$16,exports.EasingFunction=_$T,exports.EdgePreprocessing=_0x128acc,exports.EditHandler=l$g,exports.EditSmlFileParameters=_0x78acd5,exports.EditSmlFileService=_0x34bda9,exports.EfficiencyManager=_0x585a75,exports.EllipseGeometry=H$U,exports.EllipseGeometryLibrary=N$T,exports.EllipseGeometryUpdater=l$v,exports.EllipseGraphics=s$R,exports.EllipseOutlineGeometry=w$Y,exports.Ellipsoid=n$1c,exports.EllipsoidGeodesic=D$Y,exports.EllipsoidGeometry=b$18,exports.EllipsoidGeometryUpdater=l$u,exports.EllipsoidGraphics=s$Q,exports.EllipsoidOutlineGeometry=I$Z,exports.EllipsoidPrimitive=c$f,exports.EllipsoidRhumbLine=M$1c,exports.EllipsoidSurfaceAppearance=t$g,exports.EllipsoidTangentPlane=s$1h,exports.EllipsoidTerrainProvider=t$P,exports.EllipsoidalOccluder=c$15,exports.EmissionMaterialProperty=t$m,exports.EmissionTextureUnit=_0x575a61,exports.Empty3DTileContent=t$v,exports.EncodedCartesian3=t$R,exports.Entity=l$J,exports.EntityCluster=a$s,exports.EntityCollection=r$n,exports.EntityView=x$u,exports.Event=o$15,exports.EventHelper=n$W,exports.Evented=_0x42561c,exports.Events=_0x3ff519,exports.ExcavationBottomFS=da,exports.ExcavationBottomVS=ua,exports.ExcavationFS=Z$m,exports.ExcavationSources=b$w,exports.ExcavationVS=Y$o,exports.Expression=b$V,exports.ExpressionNodeType=s$E,exports.ExtendProperty=_0x37d005,exports.ExtrapolationType=_0x2f1e09,exports.FXAA3_11=j$h,exports.Facade=w$q,exports.FacilityAnalyst3DParameters=_0x3f8c8a,exports.FacilityAnalystStreamParameters=FacilityAnalystStreamParameters,exports.FacilityAnalystStreamService=FacilityAnalystStreamService,exports.FacilityAnalystTracedown3DParameters=_0x16abfd,exports.FacilityAnalystTracedown3DService=_0x4715c6,exports.FacilityAnalystTraceup3DParameters=_0x489123,exports.FacilityAnalystTraceup3DService=_0x12252a,exports.Feature=Feature,exports.FeatureDetection=o$$,exports.FeatureService=_0x149ea9,exports.FieldLayer3D=i$f,exports.FillGradientMode=_0x51b78d,exports.FillStyle=vr,exports.FilterParameter=_0x2af584,exports.FindClosestFacilitiesService=FindClosestFacilitiesService,exports.FindLocationParameters=FindLocationParameters,exports.FindLocationService=FindLocationService,exports.FindMTSPPathsParameters=FindMTSPPathsParameters,exports.FindMTSPPathsService=FindMTSPPathsService,exports.FindPathParameters=FindPathParameters,exports.FindPathService=FindPathService,exports.FindServiceAreasParameters=FindServiceAreasParameters,exports.FindServiceAreasService=FindServiceAreasService,exports.FindTSPPathsParameters=FindTSPPathsParameters,exports.FindTSPPathsService=FindTSPPathsService,exports.FlattenRegion=u$U,exports.FloodAnalysis3D=R$b,exports.FlyInterpolationMode=hi$2,exports.FlyManager=l$i,exports.FlyTurningMode=g$k,exports.Fog=d$f,exports.ForEach=t$A,exports.Format=_0x478df2,exports.FrameBufferType=B$y,exports.FrameRateMonitor=i$d,exports.FrameState=h$d,exports.Framebuffer=u$F,exports.FresnelFp=_0x20558b,exports.FresnelVp=_0x1d4945,exports.FrustumCommands=i$c,exports.FrustumGeometry=D$V,exports.FrustumOutlineGeometry=g$H,exports.Fullscreen=n$15,exports.FullscreenButton=i$4,exports.FullscreenButtonViewModel=r$5,exports.FunctionExt=_0x1f1377,exports.GLSLPreprocessor=p$18,exports.GOAnimation=_0x2fee9e,exports.GOAnimationAttribute=_0x22e2f7,exports.GOAnimationBlink=_0x9b417f,exports.GOAnimationGrow=_0x5118f6,exports.GOAnimationManager=_0x9f2efc,exports.GOAnimationManagerBase=GOAnimationManagerBase,exports.GOAnimationRotate=_0x268bb2,exports.GOAnimationScale=_0x27c5be,exports.GOAnimationShow=_0x2d3d95,exports.GOAnimationState=_0x4d33de,exports.GOAnimationType=_0x3b65eb,exports.GOAnimationWay=_0x569ba9,exports.GOAnimationWay_ModelGroup=_0x2a8935,exports.GeoBillboard=i$p,exports.GeoBox=i$o,exports.GeoCircle3D=i$n,exports.GeoCone=i$m,exports.GeoCylinder=o$r,exports.GeoEllipsoid=i$l,exports.GeoEntity=_0x5bd415,exports.GeoEntityBasicParameter=_0x209a53,exports.GeoEntityEffect=_0x4c64cd,exports.GeoEntityEffectAnnularDiffusion=_0x2a14e8,exports.GeoEntityEffectAttackline=_0x2035f0,exports.GeoEntityEffectAugment=_0x34b663,exports.GeoEntityEffectBurst=_0x59a1d3,exports.GeoEntityEffectDetecttoncone=_0x5d5876,exports.GeoEntityEffectDynamic=_0x7be4ad,exports.GeoEntityEffectExtend=_0x3db1bf,exports.GeoEntityEffectExtendFactory=_0xb0d84,exports.GeoEntityEffectFiresmoke=_0x5611a5,exports.GeoEntityEffectMechanicalRadar=_0x2cd796,exports.GeoEntityEffectParameter=_0x321ef3,exports.GeoEntityEffectParameterRadar=_0x2b9951,exports.GeoEntityEffectRadarBase=_0x24ebc9,exports.GeoEntityEffectRadarScanBase=_0x27577d,exports.GeoEntityEffectRotateRadar=_0x2ffa4d,exports.GeoEntityEffectScanRadar=_0x1a1490,exports.GeoEntityEffectScanWave=_0x53994b,exports.GeoEntityEffectScanWaveColorMode=_0x5c4879,exports.GeoEntityEffectScancone=_0x1d152e,exports.GeoEntityEffectScanconeType=_0x2cf107,exports.GeoEntityEffectSign=_0x5db3c1,exports.GeoEntityEffectTailflame=_0x5927c0,exports.GeoEntityEffectTailgas=_0x12c228,exports.GeoEntityEffectToolkit=_0x5f28ea,exports.GeoEntityEffectTrackLineType=_0x3246d7,exports.GeoEntityEffectTrackline=_0x327d5d,exports.GeoEntityEffectType=_0x370c4a,exports.GeoEntityEffectWarningRadar=_0x2412b9,exports.GeoEntityManager=_0x2d71fc,exports.GeoEntityMoveCalc=_0x386582,exports.GeoEntityMoveParameter=_0x1c784a,exports.GeoEntityNode=_0x47ddb3,exports.GeoEntityParamCyclicType=_0x37690a,exports.GeoEntityParameter=_0x30275b,exports.GeoEntityRotationCalc=_0x164388,exports.GeoEntityRotationParameter=_0x11d14c,exports.GeoEntityScaleCalc=_0x455abc,exports.GeoEntityScaleParameter=_0x21ab63,exports.GeoGraphicObject=_0x521a23,exports.GeoGraphicObjectConvert=_0x4383d7,exports.GeoJSON=_0x3aca1b,exports.GeoJsonDataSource=y$u,exports.GeoLine3D=i$y,exports.GeoModel3D=t$h,exports.GeoPoint3D=o$q,exports.GeoPolyline=n$r,exports.GeoRegion3D=n$A,exports.GeoSphere=e$t,exports.GeocodeType=d$R,exports.Geocoder=s$1,exports.GeocoderService=o$Q,exports.GeocoderViewModel=x$2,exports.GeographicProjection=s$1q,exports.GeographicTilingScheme=a$W,exports.Geometry=T$11,exports.Geometry3D=o$x,exports.Geometry3DTileContent=l$E,exports.Geometry3DType=b$K,exports.GeometryAttribute=r$Q,exports.GeometryAttributes=t$W,exports.GeometryInstance=m$P,exports.GeometryInstanceAttribute=r$G,exports.GeometryOffsetAttribute=_0x165ce0,exports.GeometryPipeline=F$W,exports.GeometryServer=_0x2c4bf1,exports.GeometryType=_0x348fdd,exports.GeometryUpdater=i$J,exports.GeometryVisualizer=c$s,exports.GetFeatureInfoFormat=F$e,exports.GetFeaturesByBoundsParameters=_0x21f879,exports.GetFeaturesByBoundsService=_0x265fd6,exports.GetFeaturesParametersBase=_0x38978f,exports.GetFeaturesServiceBase=_0x29a932,exports.GetLibIDsService=_0x1f653e,exports.GetLibInfoParameter=_0x4f9120,exports.GetLibInfoService=GetLibInfoService,exports.GetSMLInfosParameters=_0x590b69,exports.GetSMLInfosService=_0x486022,exports.GetSymbolInfoParameters=_0x55b53a,exports.GetSymbolInfoService=_0x323f7a,exports.Globe=u$c,exports.GlobeDepth=f$g,exports.GlobeSurfaceShaderSet=b$k,exports.GlobeSurfaceTile=f$t,exports.GlobeSurfaceTileProvider=R$h,exports.GltfSkeleton=_0x36ee04,exports.GltfSkeletonProcessor=_0x1fdb75,exports.GoogleEarthEnterpriseImageryProvider=u$b,exports.GoogleEarthEnterpriseMapsProvider=o$h,exports.GoogleEarthEnterpriseMetadata=f$U,exports.GoogleEarthEnterpriseTerrainData=_$Q,exports.GoogleEarthEnterpriseTerrainProvider=E$P,exports.GoogleEarthEnterpriseTileInformation=e$1g,exports.GregorianDate=d$15,exports.GridImagery=h$c,exports.GridImageryProvider=n$e,exports.GridLayer=p$f,exports.GridMaterialProperty=l$y,exports.GridProvider=E$d,exports.GridState=_$g,exports.GridTileImagery=d$e,exports.GroundEffect=_0x2643a2,exports.GroundGeometryUpdater=i$A,exports.GroundPolylineGeometry=ee$x,exports.GroundPolylinePrimitive=C$I,exports.GroundPrimitive=f$J,exports.GroupObject=_0x20e33d,exports.HeadingPitchRange=h$V,exports.HeadingPitchRoll=e$1L,exports.Heap=o$14,exports.HeatMap=r$b,exports.HeightReference=U$Y,exports.HeightmapEncoding=E$1c,exports.HeightmapTerrainData=M$1a,exports.HeightmapTessellator=m$$,exports.HemisphereLight=n$p,exports.HermitePolynomialApproximation=Z$S,exports.HermiteSpline=m$Z,exports.HomeButton=o$4,exports.HomeButtonViewModel=n$4,exports.HorizontalOrigin=N$W,exports.HypsometricSetting=_$P,exports.HypsometricSettingEnum=J$O,exports.Iau2000Orientation=L$R,exports.Iau2006XysData=w$19,exports.Iau2006XysSample=s$1j,exports.IauOrientationAxes=s$12,exports.IauOrientationParameters=s$13,exports.ImageMarchingCubes=_0xdf1e4f,exports.ImageMaterialProperty=i$M,exports.Imagery=n$v,exports.ImageryLayer=u$p,exports.ImageryLayerCollection=o$f,exports.ImageryLayerFeatureInfo=s$i,exports.ImageryProvider=o$n,exports.ImagerySplitDirection=Xe$4,exports.ImageryState=Tt$4,exports.IndexDatatype=fe$u,exports.IndexedDBScheduler=d$_,exports.InfoBox=c$3,exports.InfoBoxViewModel=e,exports.InspectorShared=s$2,exports.Instance=_0x4b234a,exports.InstanceInfo=_0x398ed3,exports.InstanceLayer=_0x512f9a,exports.InstanceMode=_0x1b51a8,exports.InstanceSkeletonManager=_0x35bc68,exports.InstanceTile=_0x1bf26a,exports.InstanceTilesLayerVS=_0x4bd2ca,exports.Instanced3DModel3DTileContent=h$F,exports.InstancedType=ai$2,exports.InterpolationAlgorithm=t$O,exports.InterpolationType=_0x2d9da3,exports.Intersect=cr$4,exports.IntersectionTests=h$1b,exports.Intersections2D=c$W,exports.Interval=i$1f,exports.InvertClassification=r$a,exports.Ion=i$X,exports.IonGeocoderService=p$$,exports.IonImageryProvider=a$e,exports.IonResource=r$H,exports.IonWorldImageryStyle=n$g,exports.Iso8601=f$S,exports.JSONFormat=_0x6ca727,exports.JobScheduler=o$d,exports.JobType=i$E,exports.JulianDate=o$10,exports.KTX2Transcoder=t$N,exports.KeyboardEventModifier=Ft$5,exports.KmlCamera=o$t,exports.KmlDataSource=D$t,exports.KmlLookAt=n$w,exports.KmlTour=l$l,exports.KmlTourFlyTo=a$n,exports.KmlTourWait=i$t,exports.Label=b$O,exports.LabelCollection=m$A,exports.LabelGraphics=s$P,exports.LabelStyle=z$t,exports.LabelVisualizer=d$s,exports.LagrangePolynomialApproximation=o$O,exports.LatLng=_0x4c5a30,exports.LayerDataStruct=_0x9cade4,exports.Layers=h$l,exports.LeapSecond=f$15,exports.LercDecode=LercDecode,exports.Light=r$9,exports.LightGroupType=br,exports.LightSource=h$n,exports.LightSourceType=w$x,exports.LimitBody=b$q,exports.LineCallOut=_$y,exports.LineCallOutVp=U$G,exports.LineDisplayType=q$P,exports.LineRelationEffect=_0xa7e371,exports.LineString=LineString,exports.LinearApproximation=f$R,exports.LinearRing=LinearRing,exports.LinearSpline=o$X,exports.LoadState=W$q,exports.LoadingPriorityMode=_0x271348,exports.ManagedArray=e$1d,exports.MapMode2D=Zr,exports.MapProjection=r$D,exports.MapboxApi=e$1c,exports.MapboxImageryProvider=a$f,exports.MapboxStyleImageryProvider=n$d,exports.Material=r$v,exports.MaterialAppearance=t$G,exports.MaterialExt=_0x3ce42d,exports.MaterialManager=_0x2b7210,exports.MaterialPass=_0x42161c,exports.MaterialProperty=t$D,exports.Math=n$1d,exports.Matrix2=u$14,exports.Matrix3=r$W,exports.Matrix4=c$1a,exports.MeasureHandler=O$j,exports.MeasureMode=_0x4057bc,exports.Measurement=_0x2d2c24,exports.MemoryManager=oo$1,exports.MeshProcessing=_0x427a19,exports.MeteorCommunicationLink=_0x44dd6d,exports.MipmapHint=D$12,exports.MixColorType=_0x28ce18,exports.Model=L$D,exports.ModelAnimation=o$z,exports.ModelAnimationCache=h$H,exports.ModelAnimationCollection=d$C,exports.ModelAnimationLoop=_0x1f6ea1,exports.ModelAnimationState=c$D,exports.ModelEdgeFp=_0x4d1076,exports.ModelEdgeVp=_0x31ab53,exports.ModelEditControl=_0x4bc9f5,exports.ModelEditor=u$o,exports.ModelGraphics=e$10,exports.ModelInstance=e$U,exports.ModelInstanceCollection=b$R,exports.ModelLoadResources=t$y,exports.ModelMaterial=a$y,exports.ModelMesh=n$F,exports.ModelNode=r$r,exports.ModelObject=_0x519a53,exports.ModelUtility=s$G,exports.ModelVisualizer=h$w,exports.ModifyRegionBottomFp=ModifyRegionBottomFp,exports.ModifyRegionBottomVp=ModifyRegionBottomVp,exports.ModifyRegionMode=je$8,exports.ModifyRegionOuterFS=ModifyRegionOuterFS,exports.ModifyRegionOuterVS=ModifyRegionOuterVS,exports.ModifyRegionSideFp=ModifyRegionSideFp,exports.ModifyRegionSideVp=ModifyRegionSideVp,exports.ModifyTerrain=Ne$8,exports.Module=_0x4c1f6f,exports.Moon=s$d,exports.MultiLineString=MultiLineString,exports.MultiPoint=MultiPoint,exports.MultiPolygon=MultiPolygon,exports.MultiViewShed3D=u$l,exports.MultiViewShedAnalysisFp=se$8,exports.MultiViewportMode=te$5,exports.MvtProviderGL=M$10,exports.Navigation=t$1,exports.NavigationHelpButton=v$2,exports.NavigationHelpButtonViewModel=i$2,exports.NavigationViewModel=k,exports.NearFarScalar=u$W,exports.NetCDFParser=b$g,exports.NetworkAnalystService=NetworkAnalystService,exports.NetworkAnalystServiceBase=NetworkAnalystServiceBase,exports.NeverTileDiscardPolicy=t$7,exports.NoSleep=b$4,exports.NodeTransformationProperty=i$K,exports.NormalFramebuffer=r$f,exports.OIT=_$c,exports.ObjsOperationType=_0x24b8f6,exports.Occluder=h$U,exports.OctahedralProjectedCubeMap=n$E,exports.OffsetGeometryInstanceAttribute=o$N,exports.OpenCageGeocoderService=s$10,exports.OpenStreetMapImageryProvider=o$c,exports.OrderedGroundPrimitiveCollection=o$u,exports.OrientedBoundingBox=b$1o,exports.OrthographicFrustum=r$K,exports.OrthographicOffCenterFrustum=l$W,exports.OverLayerOffsetOptions=_0x1d1ce6,exports.OverLayerOptions=_0x149357,exports.OverLayerPicture=_0x4318a3,exports.OverLayerSolid=_0x3dbdf5,exports.OverLayerStyle=_0x5c1d0c,exports.OverLayerSymbol=_0x51534c,exports.OverLayerUtilityTools=_0x5c7178,exports.PBRExtensionParamterType=ie$z,exports.PBRMaterialType=We$a,exports.Packable=t$M,exports.PackableForInterpolation=r$C,exports.PackingRequest=J$_,exports.PagedLOD=_0x10562c,exports.Particle=r$h,exports.ParticleBurst=e$b,exports.ParticleEmitter=e$a,exports.ParticlePostRenderer=h$9,exports.ParticleSystem=g$h,exports.ParticleSystemType=y$n,exports.ParticleTrailsPostRenderer=o$b,exports.ParticleVelocityFieldEffect=g$9,exports.Pass=we$l,exports.PassState=t$l,exports.PathGraphics=s$N,exports.PathVisualizer=w$z,exports.PeliasGeocoderService=i$V,exports.PerInstanceColorAppearance=r$u,exports.PerformanceDisplay=n$a,exports.PerformanceWatchdog=r$4,exports.PerformanceWatchdogViewModel=t,exports.PerspectiveFrustum=f$V,exports.PerspectiveOffCenterFrustum=l$V,exports.PickDepth=u$a,exports.PickDepthFramebuffer=f$d,exports.PickFramebuffer=a$b,exports.PickPointFramebuffer=f$c,exports.PickRectFramebuffer=t$c,exports.Picking=l$9,exports.PiecewiseFunction=_0x7787d7,exports.PinBuilder=h$T,exports.PixelDatatype=v$Z,exports.PixelFormat=Z$_,exports.Plane=n$17,exports.PlaneGeometry=f$Q,exports.PlaneGeometryUpdater=p$v,exports.PlaneGraphics=s$M,exports.PlaneOutlineGeometry=o$L,exports.PlotAnimationLayer=_0x1ec317,exports.PlotBounds=_0x292703,exports.PlotCesium=_0x120904,exports.PlotCollentionLayer=_0x1cfd72,exports.PlotCollentionManager=_0x24dc2a,exports.PlotCommonServiceBase=_0x407715,exports.PlotCredential=_0x3f233c,exports.PlotCustomRadar=_0x8cedc2,exports.PlotCustomRadarGeometry=_0x45871f,exports.PlotCustomRadarOutlineGeometry=_0x1fe166,exports.PlotCylinderGeometry=_0x3bc307,exports.PlotCylinderGeometryLibrary=_0x2d3b46,exports.PlotDrawControl=_0x39c322,exports.PlotEditControl=_0x5523fd,exports.PlotEditMode=_0x21c04d,exports.PlotEvent=_0x923b90,exports.PlotEventManager=_0x43a805,exports.PlotEvents=_0x47e9d7,exports.PlotFetchJsonp=_0x372214,exports.PlotFetchRequest=_0x5a12e5,exports.PlotFlyManager=_0x319fa8,exports.PlotGeoEffectBase=_0x2c86f0,exports.PlotGroundPrimitive=_0x4544a9,exports.PlotLayers=_0x5a5fb4,exports.PlotMapManager=_0xd6c3ec,exports.PlotMechanicalRadar=_0x1662dc,exports.PlotModeChange=_0x14382e,exports.PlotNode=_0x1717b1,exports.PlotNodeType=_0x443259,exports.PlotParameterRadar=_0x2ec863,exports.PlotParameterRadarScan=_0x20496d,exports.PlotPoint3D=_0x45ea17,exports.PlotProperty=_0x175b75,exports.PlotRadarBase=_0x3c19a2,exports.PlotRadarGeometry=_0x29734f,exports.PlotRadarOutlineGeometry=_0x2cfb49,exports.PlotRadarType=_0x1416c0,exports.PlotRadarUpdater=_0x5b76d9,exports.PlotRotateRadar=_0x508ffd,exports.PlotRotateRadarScan=_0x5a9732,exports.PlotScanRadar=_0x33eab6,exports.PlotScanRadarScan=_0x254b77,exports.PlotServicesUtil=_0x421c56,exports.PlotUtilityTools=_0x27127b,exports.PlotWarningRadar=_0x3d9e88,exports.Plotting=_0xac664c,exports.PlottingLayer=_0x4ab86a,exports.Point=Point$1,exports.Point3D=s$w,exports.Point3Ds=t$s,exports.PointCloud=ie$l,exports.PointCloud3DTileContent=a$x,exports.PointCloudClassificationInfo=_0x4e912a,exports.PointCloudEyeDomeLighting=u$E,exports.PointCloudRenderMode=_0x595b1d,exports.PointCloudShading=n$C,exports.PointGraphics=s$L,exports.PointHandler=d$n,exports.PointLight=c$l,exports.PointPrimitive=s$u;exports.PointPrimitiveCollection=f$A,exports.PointVisualizer=f$x,exports.PointWithMeasure=PointWithMeasure,exports.Polygon=Polygon,exports.PolygonEmitter=z$9,exports.PolygonGeometry=S$C,exports.PolygonGeometryLibrary=g$K,exports.PolygonGeometryUpdater=d$t,exports.PolygonGraphics=u$J,exports.PolygonHandler=d$m,exports.PolygonHierarchy=t$K,exports.PolygonOutlineGeometry=O$J,exports.PolygonPipeline=T$10,exports.Polyline=o$G,exports.PolylineArrowMaterialProperty=t$q,exports.PolylineCollection=W$P,exports.PolylineColorAppearance=e$12,exports.PolylineDashMaterialProperty=r$m,exports.PolylineDynamicMaterialProperty=e$x,exports.PolylineFp=_0xe94b2,exports.PolylineGeometry=R$H,exports.PolylineGeometryUpdater=y$v,exports.PolylineGlowMaterialProperty=t$p,exports.PolylineGraphics=o$B,exports.PolylineHandler=l$e,exports.PolylineMaterialAppearance=t$E,exports.PolylineOutlineMaterialProperty=e$H,exports.PolylinePipeline=v$V,exports.PolylineRasterVp=_0x5740ab,exports.PolylineShadowVolumeFS=_0xf4d6c4,exports.PolylineShadowVolumeVS=_0x26644a,exports.PolylineTrailMaterialProperty=s$o,exports.PolylineVisualizer=l$o,exports.PolylineVolumeGeometry=N$Q,exports.PolylineVolumeGeometryLibrary=K$L,exports.PolylineVolumeGeometryUpdater=s$p,exports.PolylineVolumeGraphics=s$K,exports.PolylineVolumeOutlineGeometry=v$N,exports.PolylineVp=_0x5f03b2,exports.PositionMode=k$p,exports.PositionProperty=t$C,exports.PositionPropertyArray=i$x,exports.PostEffectFilterlFramebuffer=t$d,exports.PostProcessStage=p$b,exports.PostProcessStageCollection=_$8,exports.PostProcessStageComposite=d$b,exports.PostProcessStageLibrary=o$9,exports.PostProcessStageSampleMode=e$9,exports.PostProcessStageTextureCache=g$7,exports.PrefilterRadianceMap=A$b,exports.PreprocessCubeMap=b$p,exports.Primitive=y$H,exports.PrimitiveCollection=r$l,exports.PrimitivePipeline=S$x,exports.PrimitiveState=ce$n,exports.PrimitiveType=H$11,exports.Profile=V$h,exports.ProfilePlaneGeometry=h$7,exports.ProfileRender=f$a,exports.ProgramDefines=H$r,exports.ProjectionImage=P$f,exports.ProjectionImageFp=ze$3,exports.ProjectionMode=K$b,exports.ProjectionName=ProjectionName,exports.ProjectionPicker=c$2,exports.ProjectionPickerViewModel=r$3,exports.Property=r$w,exports.PropertyArray=n$z,exports.PropertyBag=p$S,exports.ProviderViewModel=n$5,exports.QuadraticRealPolynomial=o$11,exports.QuadtreeOccluders=e$d,exports.QuadtreePrimitive=T$f,exports.QuadtreeTile=h$b,exports.QuadtreeTileLoadState=te$C,exports.QuadtreeTileProvider=r$8,exports.Quality=Quality,exports.QuantizedMeshTerrainData=k$11,exports.QuarticRealPolynomial=A$1e,exports.Quaternion=a$U,exports.QuaternionSpline=n$R,exports.Queue=i$Y,exports.QuickPosition=_0x2d1dca,exports.QuickPositionManager=_0x406595,exports.RGBELoader=F$l,exports.RangeMode=_0x2b4bc7,exports.RasterFramebuffer=t$i,exports.RasterGeometryType=C$o,exports.RasterVectorCollection=p$e,exports.Ray=n$18,exports.RectQueryHandler=_0x166b22,exports.Rectangle=s$1p,exports.RectangleCollisionChecker=o$K,exports.RectangleGeometry=B$B,exports.RectangleGeometryLibrary=W$V,exports.RectangleGeometryUpdater=m$r,exports.RectangleGraphics=o$A,exports.RectangleOutlineGeometry=P$H,exports.ReferenceFrame=be$t,exports.ReferenceProperty=a$p,exports.ReflectFramebuffer=i$i,exports.RegionAltitudeVectex=_0x37c24d,exports.RegionFragment=_0x4ee30e,exports.RegionMaterialFp=_0x3427e2,exports.RegionMaterialVp=_0x49a401,exports.RegionTextureVertex=_0x50e9a0,exports.RegionVectex=_0x38a169,exports.RenderClipPlane=_0x53c87f,exports.RenderEntityPagedLOD=_0x38aae9,exports.RenderState=p$1a,exports.RenderTexture=h$p,exports.Renderbuffer=h$q,exports.RenderbufferFormat=E$r,exports.Renderer2D=t$b,exports.Request=r$V,exports.RequestErrorEvent=e$1S,exports.RequestScheduler=r$U,exports.RequestState=Y$_,exports.RequestType=V$_,exports.Resource=t$X,exports.RotateDirection=_0x499c3d,exports.Rotation=h$B,exports.RotationOrigin=O$r,exports.Route=_$m,exports.Route2=Route,exports.RouteAnalysis=_0x3140d8,exports.RouteCollection=c$m,exports.RouteStop=n$t,exports.RuntimeError=t$Z,exports.S3MBDataParser=_0x3065fa,exports.S3MBSkeletonProcessor=_0x59c543,exports.S3MBlock=_0x27e125,exports.S3MBlockCache=_0x127a17,exports.S3MBloomEffect=_0x2d12d7,exports.S3MCompressType=_0x415d95,exports.S3MCreateIndexJob=_0x289f7f,exports.S3MCreateVertexJob=_0x2ce9d5,exports.S3MDataParser=_0x18a717,exports.S3MDracoDecode=_0x51c0ac,exports.S3MEdgeProcessor=_0x5d8d50,exports.S3MEntity=_0x56ff2,exports.S3MFeature=_0x15900a,exports.S3MGroupLayer=_0x74832c,exports.S3MInstance=_0x10007a,exports.S3MInstanceCollection=_0x1bf60e,exports.S3MInstanceCollectionVertex=_0x2b4a17,exports.S3MLayerScheduler=_0x2063a0,exports.S3MPBRMaterialLib=_0x20df78,exports.S3MPixelFormat=_0x5ce781,exports.S3MPointCloudEDL=_0x2e7394,exports.S3MPointCloudEDLFp=_0x25da3e,exports.S3MPointCloudFp=_0x2dcba9,exports.S3MPointCloudVp=_0xcda09f,exports.S3MPolylineEffect=_0x840433,exports.S3MRegionEffect=_0x4f5b3a,exports.S3MRenderStateCreator=_0x43be0d,exports.S3MShaderProgramJob=_0x2322b3,exports.S3MSkeleton=_0x2fde82,exports.S3MSkeletonProcessor=_0x571b82,exports.S3MTaskManager=_0xb658ed,exports.S3MTextureManager=_0x51a186,exports.S3MThemeGraph=_0x4f5be5,exports.S3MTilesBillboardPixelSizeVp=_0xf24962,exports.S3MTilesBillboardVp=S3MTilesBillboardVp,exports.S3MTilesCommonOntTextureFP=_0x138417,exports.S3MTilesExtendPolygonShadowVP=_0x13fac9,exports.S3MTilesFontWithHaloFp=_0x31bf11,exports.S3MTilesFragment=_0x580916,exports.S3MTilesFragmentRaster=_0xc718bd,exports.S3MTilesLabelStyle=_0x42f3a3,exports.S3MTilesLayer=_0x4ab4f4,exports.S3MTilesLineShadowVectex=_0x4e3bb1,exports.S3MTilesNormalFP=_0x422fc8,exports.S3MTilesRectSelection=_0x1a40d2,exports.S3MTilesRegionShadowVectex=_0x11528e,exports.S3MTilesSelection=_0x2f4415,exports.S3MTilesShadowVolumeFP=_0x5cfb95,exports.S3MTilesVectex=_0x3edf32,exports.S3MTilesVectexRaster=_0x2d1fa9,exports.S3MUniformBufferCreator=_0x35487f,exports.S3MUniformMapCreator=_0x1aa62d,exports.S3MUploadSubTextureJob=_0x28fcbd,exports.S3MVersion=_0x335bbd,exports.S3MVertexPackage=_0x1af262,exports.S3MVoxelGridFp=_0x40386e,exports.S3MVoxelGridVp=_0x4b8bdf,exports.S3ModelFP=_0x29dd65,exports.SCTTerrainProvider=se$s,exports.SDFSettings=F$y,exports.SMAA=i$b,exports.SMLFileService=_0x4f0c08,exports.SQFramebuffer=t$a,exports.SSAOEffect=a$h,exports.SampledPositionProperty=o$v,exports.SampledProperty=g$o,exports.Sampler=a$Q,exports.Satellite=_0x9fe1e0,exports.SatelliteEntity=_0x247aaa,exports.SatelliteEntityManager=_0x13f071,exports.SatelliteGroup=_0x13ae55,exports.SatelliteManager=_0x1975a7,exports.SatelliteOrbitsLayer=_0x559c70,exports.SatelliteToolkit=_0x1ff2e6,exports.ScaledPositionProperty=i$u,exports.ScanEffect=c$h,exports.ScanEffectMode=A$m,exports.Scene=M$4,exports.SceneFramebuffer=d$c,exports.SceneMode=b$1d,exports.SceneModePicker=r$2,exports.SceneModePickerViewModel=i$1,exports.SceneTransforms=u$V,exports.SceneTransitioner=N$5,exports.ScreenSpaceCameraController=wt,exports.ScreenSpaceEventHandler=f$N,exports.ScreenSpaceEventType=Q$L,exports.SelectColorType=Ja,exports.SelectionIndicator=r,exports.SelectionIndicatorViewModel=n$1,exports.ServerGeometry=ServerGeometry,exports.ServiceBase=ServiceBase,exports.ShaderCache=i$j,exports.ShaderChunk=h$11,exports.ShaderProgram=p$15,exports.ShaderProgramCreator=_0x15d634,exports.ShaderSource=a$O,exports.ShadowAnalysisFp=le$c,exports.ShadowMap=O$g,exports.ShadowMapShader=f$q,exports.ShadowMode=q$Q,exports.ShadowQueryFp=xe$b,exports.ShadowQueryPoints=P$e,exports.ShadowQueryVp=ge$6,exports.ShadowType=_0x3df1e1,exports.ShadowVolumeAppearance=T$L,exports.SharedEDLFrameBuffer=_0x21f1aa,exports.ShowGeometryInstanceAttribute=e$18,exports.SightLineAnalysis=_0x2b31d2,exports.Sightline=x$p,exports.SightlineAnalysisFp=SightlineAnalysisFp,exports.SilverLightingAtmosphere=s$7,exports.SilverLightingEphemeris=a$5,exports.SilverLightingLocalTime=n$8,exports.SilverLightingLocation=i$8,exports.SilverLightingLuminanceMapper=a$6,exports.SilverLightingSky=_$6,exports.SilverLightingSolarSpectrum=p$8,exports.SilverLightingSpectrum=y$a,exports.Simon1994PlanetaryPositions=x$M,exports.SimplePolylineGeometry=S$z,exports.SimulationController=_0x4a8e27,exports.SingleTileImageryProvider=h$f,exports.SitDataManager=_0x4d3d6b,exports.SitDataStruct=_0x459245,exports.SituationSimulationManager=_0x373a17,exports.SituationSimulationSchemeDataType=_0x4e109a,exports.SituationSimulationSchemeManager=_0x5a144a,exports.SituationSimulationToolkit=_0x1569f6,exports.SkeletonProcessor=_0x1ca2e5,exports.SkeletonState=_0x2bc85d,exports.SkyAtmosphere=s$6,exports.SkyBox=m$9,exports.Skyline=v$l,exports.SkylineFp=ne$5,exports.SkylineVp=oe$7,exports.SlopeSetting=r$A,exports.SlopeSettingEnum=_0x55779b,exports.SmlInfoStruct=_0x6ba8ff,exports.SmoothStepSpline=o$J,exports.SolidModelsProfile=s$9,exports.SolidProfileFp=k$6,exports.SolutionType=_0x49bd1f,exports.SpatialQuery3D=C$k,exports.SpatialQueryFp=z$m,exports.SphereEmitter=e$o,exports.SphereGeometry=n$P,exports.SphereOutlineGeometry=a$D,exports.Spherical=c$O,exports.Spline=i$13,exports.SplitDirection=_0x324096,exports.SpotLight=c$k,exports.StaticGeometryColorBatch=y$x,exports.StaticGeometryPerMaterialBatch=c$u,exports.StaticGroundGeometryColorBatch=c$t,exports.StaticGroundGeometryPerMaterialBatch=u$t,exports.StaticGroundPolylinePerMaterialBatch=v$v,exports.StaticOutlineGeometryBatch=w$A,exports.StencilConstants=Ia$1,exports.StencilFunction=h$N,exports.StencilOperation=o$F,exports.StopPlayMode=N$j,exports.StripeMaterialProperty=i$w,exports.StripeOrientation=me$j,exports.Style3D=e$D,exports.StyleExpression=t$5,exports.SubTextureCache=_0x3f7254,exports.SubTextureManager=_0x59fce4,exports.Sun=m$8,exports.SunLight=n$l,exports.SunPostProcess=s$b,exports.SuperMapImageryProvider=U$4,exports.SuperMapVersion=SuperMapVersion,exports.SupportTools=u$O,exports.SurroundLineType=_0x2bfc5b,exports.SvgPathBindingHandler=c$5,exports.SymbolAlgoUtil=_0x51d1e4,exports.SymbolAnnotation=_0x455ba7,exports.SymbolArbitraryPolygon=_0x2074dd,exports.SymbolArc=_0x1a65af,exports.SymbolBrace=_0x36f740,exports.SymbolCell=_0x4df35e,exports.SymbolChord=_0x34af79,exports.SymbolCircle=_0x1621e9,exports.SymbolConcentricCircle=_0x4c00c5,exports.SymbolCurveEight=_0x43bd24,exports.SymbolDot=_0x36b026,exports.SymbolDotGraphic=_0x494c68,exports.SymbolDotPicture=_0x484dc8,exports.SymbolDotVector=_0x2c042e,exports.SymbolEllipse=_0x2dd781,exports.SymbolKidney=_0x1e2a22,exports.SymbolLib=_0x25447e,exports.SymbolLibManager=_0x5dcc48,exports.SymbolLibService=_0x475bf3,exports.SymbolParallelogram=_0x3637c,exports.SymbolPie=_0x208b05,exports.SymbolPolyBezier=_0x50ef33,exports.SymbolPolyBezierClosed=_0x2bd08e,exports.SymbolPolyline=_0x4c3292,exports.SymbolRectangle=_0x4ca0d3,exports.SymbolRegularPolygon=_0x56dda6,exports.SymbolRunWay=_0x253eef,exports.SymbolStyle=_0x5bc221,exports.SymbolTextStyle=_0x37327d,exports.SymbolTrapezoid=_0x305d72,exports.SymbolType=_0x585354,exports.TSClipPlane=_0x5933c9,exports.TaskProcessor=o$_,exports.TemporalAA=n$i,exports.TemporalSetting=t$I,exports.TerrainData=r$y,exports.TerrainEncoding=u$13,exports.TerrainFillMesh=Y$n,exports.TerrainLayer=r$c,exports.TerrainLayerCollection=o$e,exports.TerrainMesh=B$R,exports.TerrainOffsetProperty=h$M,exports.TerrainProvider=d$11,exports.TerrainQuantization=me$D,exports.TerrainSlopeAnalysis=_0x3359c6,exports.TerrainState=Ie$c,exports.TextOverlapInfo=_0x53605a,exports.TextPos=_0x59fec3,exports.Texture=P$S,exports.Texture3D=E$l,exports.TextureAtlas=_$z,exports.TextureCache=r$g,exports.TextureMagnificationFilter=et$k,exports.TextureManager=_0x33811f,exports.TextureMinificationFilter=tt$l,exports.TextureWrap=j$13,exports.ThreeDDesigner=_0x163fa1,exports.ThreeDModeling=_0x4722cc,exports.TiandituAnnotationProvider=h$4,exports.TiandituImageryProvider=A$5,exports.TiandituMapsStyle=t$4,exports.TiandituTerrainProvider=p$4,exports.TileAvailability=f$13,exports.TileBoundingRegion=_$v,exports.TileBoundingSphere=t$u,exports.TileBoundingVolume=o$7,exports.TileCoordinatesImageryProvider=n$6,exports.TileDiscardPolicy=o$6,exports.TileEdge=T$N,exports.TileImagery=h$s,exports.TileMapServiceImageryProvider=g$a,exports.TileOrientedBoundingBox=s$y,exports.TileProviderError=c$_,exports.TileReplacementQueue=m$Q,exports.TileSelectionResult=D$u,exports.TileState=TileState,exports.TileTerrain=l$j,exports.Tileset3DTileContent=e$S,exports.TilingScheme=o$H,exports.TiltIndicator=C$1,exports.TimeConstants=h$1a,exports.TimeDynamicImagery=h$r,exports.TimeDynamicPointCloud=c$6,exports.TimeInterval=n$T,exports.TimeIntervalCollection=p$X,exports.TimeIntervalCollectionPositionProperty=t$o,exports.TimeIntervalCollectionProperty=t$n,exports.TimeStandard=J$14,exports.Timeline=u$2,exports.TimelineHighlightRange=o$2,exports.TimelineTrack=g,exports.Tipsify=y$V,exports.ToggleButtonViewModel=i$5,exports.Tonemapper=L$b,exports.TransformFeedback=s$j,exports.Transforms=m$13,exports.TranslationRotationScale=a$C,exports.TransportationAnalystParameter=TransportationAnalystParameter,exports.TransportationAnalystResultSetting=TransportationAnalystResultSetting,exports.TridiagonalSystemSolver=w$13,exports.TrustedServers=a$X,exports.TubularCommunicationLink=_0x398ff5,exports.Tween=f$W,exports.TweenCollection=p$a,exports.UnderGlobe=t$6,exports.UniformBuffer=r$j,exports.UniformBufferManager=f$v,exports.UniformDataBase=t$k,exports.UniformState=y$m,exports.UniformlyVariableMotionSpline=n$N,exports.UpdateEdgeWeightParameters=UpdateEdgeWeightParameters,exports.UpdateEdgeWeightService=UpdateEdgeWeightService,exports.UpdateTurnNodeWeightParameters=UpdateTurnNodeWeightParameters,exports.UpdateTurnNodeWeightService=UpdateTurnNodeWeightService,exports.Uri=h$1f,exports.UrlTemplateImageryProvider=v$d,exports.UrlType=di$7,exports.Util=_0x5c92f9,exports.VRButton=o$1,exports.VRButtonViewModel=s,exports.VRTheWorldTerrainProvider=h$R,exports.Vector=Vector,exports.Vector3DTileBatch=s$F,exports.Vector3DTileContent=u$C,exports.Vector3DTileGeometry=s$C,exports.Vector3DTilePoints=d$A,exports.Vector3DTilePolygons=s$A,exports.Vector3DTilePolylines=c$z,exports.Vector3DTilePrimitive=T$H,exports.VectorTilesLayer=m$d,exports.VectorTilesMap=i$r,exports.VelocityOrientationProperty=e$F,exports.VelocityVectorProperty=s$r,exports.VertexArray=x$18,exports.VertexArrayFacade=u$D,exports.VertexCompressOption=_0x107fdf,exports.VertexFormat=n$12,exports.VertexWeightMode=_0x4e00e3,exports.VerticalOrigin=j$10,exports.VideoSynchronizer=s$X,exports.View=x$c,exports.ViewDome=C$j,exports.ViewDomeFp=ee$8,exports.ViewDomeType=me$8,exports.ViewDomeVp=$$c,exports.ViewShed3D=w$r,exports.ViewShedAnalysis=_0x135d24,exports.ViewShedAnalysisFp=Te$9,exports.ViewShedAnalysisVp=Oe$8,exports.Viewer=u,exports.ViewportQuad=e$2,exports.Visibility=pe$q,exports.Visualizer=r$i,exports.Volume=T$1,exports.VolumeBillboardCollection=p$3,exports.VolumeBoxFp=Ge$1,exports.VolumeBoxVp=Me$3,exports.VolumeRenderMode=xt,exports.VoxelGridLayer3D=x$7,exports.VoxelGridPostRenderer=i$a,exports.VoxelGridTile=d$9,exports.VoxelGridTileMultiResolution=a$8,exports.VulkanConstants=VulkanConstants,exports.WTSConfigManager=_0x1a6c33,exports.WalkingMode=si,exports.WallGeometry=H$M,exports.WallGeometryLibrary=B$z,exports.WallGeometryUpdater=n$x,exports.WallGraphics=s$J,exports.WallOutlineGeometry=d$K,exports.WaterMode=k$d,exports.WayPathType=_0x4f5747,exports.WebGLConstants=de$x,exports.WebMapServiceImageryProvider=u$f,exports.WebMapTileServiceImageryProvider=g$m,exports.WebMercatorProjection=e$1H,exports.WebMercatorTilingScheme=o$Z,exports.WeightSpline=r$x,exports.WindingOrder=_0x2ee645,exports.WireFrameType=_0x39abaa,exports.XML=f$10,exports.ZoomIndicator=o,exports.ZoomIndicatorViewModel=n,exports.addBuffer=b$W,exports.addDefaults=h$K,exports.addExtensionsRequired=n$G,exports.addExtensionsUsed=n$H,exports.addPipelineExtras=f$H,exports.addToArray=e$Y,exports.appendForwardSlash=e$1Z,exports.arrayFill=d$10,exports.arrayRemoveDuplicates=u$11,exports.arraySlice=l$Z,exports.barycentricCoordinates=P$V,exports.bignumber=Bt,exports.binarySearch=u$16,exports.bitmap_sdf=F$x,exports.brdf=c$U,exports.buildModuleUrl=o$12,exports.bytebuffer=a$4,exports.cancelAnimationFrame=a$S,exports.checkFloatTexturePrecision=t$f,exports.clone=e$1W,exports.combine=s$1n,exports.computeFlyToLocationForRectangle=i$g,exports.createBillboardPointCallback=c$A,exports.createCommand=s$3,exports.createDefaultImageryProviderViewModels=p$1,exports.createDefaultTerrainProviderViewModels=t$2,exports.createFragmentFromTemplate=n$2,exports.createGuid=t$U,exports.createMaterialPropertyDescriptor=c$K,exports.createOpenStreetMapImageryProvider=T$j,exports.createPropertyDescriptor=v$J,exports.createRawPropertyDescriptor=u$I,exports.createTangentSpaceDebugPrimitive=w$n,exports.createTaskProcessorWorker=l,exports.createTileMapServiceImageryProvider=re$8,exports.createUniform=L$Z,exports.createUniformArray=k$X,exports.createWorldImagery=f$m,exports.createWorldTerrain=s$16,exports.crunchprevious=Module$1,exports.cubeUV_reflection=l$X,exports.decodeGoogleEarthEnterpriseData=h$X,exports.defaultValue=e$1Y,exports.defined=t$$,exports.deprecationWarning=i$1b,exports.destroyObject=s$1e,exports.directionLightDecl=m$V,exports.dynamicGeometryGetBoundingSphere=a$o,exports.earcut=_0x53dc63,exports.earcut_2_2_1=m$11,exports.executeServerExcavationDecl=f$_,exports.exportKml=oe$g,exports.fill_style_layer=_0x23f80c,exports.findAccessorMinMax=h$I,exports.flightLineXml=_0x5414a0,exports.formatError=f$12,exports.freezeRenderState=o$V,exports.getAbsoluteUri=i$1d,exports.getAccessorByteStride=p$O,exports.getBaseUri=o$17,exports.getBinaryAccessor=M$J,exports.getClipAndStyleCode=a$z,exports.getClippingFunction=f$F,exports.getComponentReader=i$G,exports.getElement=o$a,exports.getExtensionFromUri=a$_,exports.getFilenameFromUri=a$J,exports.getImagePixels=i$W,exports.getMagic=e$1h,exports.getPreciseArea=q$10,exports.getStringFromTypedArray=c$X,exports.getTimestamp=yt$9,exports.graphemesplitter=Z$z,exports.hasExtension=s$I,exports.heightReferenceOnEntityPropertyChanged=y$G,exports.hemisphereLightDecl=t$T,exports.html2canvas=_0x4994c3,exports.isBitSet=e$1B,exports.isBlobUri=i$1c,exports.isCrossOriginUrl=h$1e,exports.isDataUri=a$Z,exports.isLeapYear=i$16,exports.joinUrls=p$1c,exports.jsep=M$I,exports.kdbush=N$y,exports.knockout=le$2,exports.knockout_3_5_1=le$2,exports.knockout_es5=r$6,exports.lightSourceImpl=p$17,exports.line_style_layer=_0xd97cec,exports.loadAndExecuteScript=d$18,exports.loadArrayBuffer=u$S,exports.loadBlob=u$R,exports.loadCRN=I$W,exports.loadCRNForS3M=l$S,exports.loadCubeMap=d$j,exports.loadDXTZ=p$_,exports.loadImage=n$S,exports.loadImageFromTypedArray=b$14,exports.loadImageViaBlob=a$H,exports.loadJson=u$$,exports.loadJson2=_0x2ff82a,exports.loadJsonp=m$M,exports.loadKTX=k$L,exports.loadKTX2=i$T,exports.loadText=o$W,exports.loadText2=_0x4334dd,exports.loadView=i$3,exports.loadWithXhr=v$_,exports.loadWithXhr2=_0x1ad33d,exports.loadXML=u$_,exports.long=i$7,exports.measureText=E$O,exports.mergeSort=q$_,exports.mersenne_twister=h$1i,exports.meshopt_decoder_module=V$3,exports.modernizeShader=A$11,exports.moveTechniqueRenderStates=R$A,exports.moveTechniquesToExtension=_$D,exports.netcdf=k$3,exports.numberOfComponentsForType=r$t,exports.objectToQuery=a$Y,exports.oneTimeWarning=e$1Q,exports.parseGlb=h$J,exports.parseResponseHeaders=s$1m,exports.pbf=h$12,exports.pointInsideTriangle=i$Q,exports.pointLightDecl=e$1x,exports.potpack=m$Y,exports.processModelMaterialsCommon=le$o,exports.processPbrMaterials=_e$f,exports.proj4_src=L$U,exports.protobuf=p$5,exports.protobuf_minimal=j$T,exports.purify=Xe$e,exports.queryToObject=m$19,exports.quickselect=b$1g,exports.rainDecl=o$U,exports.rbush=p$Y,exports.readAccessorPacked=T$J,exports.removeExtensionsRequired=t$z,exports.removeExtensionsUsed=f$G,exports.removePipelineExtras=f$E,exports.removeUnusedElements=p$N,exports.requestAnimationFrame=s$_,exports.sampleTerrain=S$B,exports.sampleTerrainMostDetailed=g$C,exports.scaleToGeodeticSurface=b$1z,exports.snowDecl=r$L,exports.spotLightDecl=i$$,exports.sprintf=$$10,exports.subdivideArray=n$O,exports.subscribeAndEvaluate=a$2,exports.supermap3D_openlayer_4_6_5=t$3,exports.throttleRequestByServer=m$I,exports.tinySDF=f$4,exports.topojson=Ce$c,exports.unzip=_0x2a83d3,exports.updateAccessorComponentTypes=p$M,exports.updateVersion=te$r,exports.viewerCesium3DTilesInspectorMixin=c$1,exports.viewerCesiumInspectorMixin=c,exports.viewerDragDropMixin=$$1,exports.viewerPerformanceWatchdogMixin=m$1,exports.webGLConstantToGlslType=t$H,exports.websocketScheduler=f$L,exports.when=c$18,exports.wrapFunction=i$P,exports.writeTextToCanvas=y$N,exports.zip=he$a,Object.defineProperty(exports,"__esModule",{value:!0})}));